summaryrefslogtreecommitdiff
path: root/chromium
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-31 10:57:55 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-31 10:21:40 +0000
commit2f583e4aec1ae3a86fa047829c96b310dc12ecdf (patch)
tree23f76b8b6d7d0d591557301a728edbe60afa5695 /chromium
parent39d357e3248f80abea0159765ff39554affb40db (diff)
downloadqtwebengine-chromium-2f583e4aec1ae3a86fa047829c96b310dc12ecdf.tar.gz
Update Chromium baseline
Removes catapult sources and adds in the skia commit hash header. Change-Id: Ie2de97705eb4b234f6ac1b9f218123f20867a291 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Diffstat (limited to 'chromium')
-rw-r--r--chromium/build/util/LASTCHANGE2
-rw-r--r--chromium/build/util/LASTCHANGE.blink2
-rw-r--r--chromium/skia/ext/skia_commit_hash.h8
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/AUTHORS.txt43
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/COPYING.txt26
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/NEWS.txt1066
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/PKG-INFO20
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/README.chromium11
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/README.txt63
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/TODO.txt31
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/__init__.py406
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/__init__.py321
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_html5lib.py285
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_htmlparser.py258
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_lxml.py233
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/dammit.py829
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/diagnose.py204
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/element.py1611
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/bs4/testing.py592
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/doc/Makefile130
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/6.1.jpgbin22619 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/conf.py256
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/index.rst3049
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstrate_parser_differences.py95
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstration_markup.txt34
-rw-r--r--chromium/third_party/catapult/third_party/beautifulsoup4/setup.py29
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/.travis.yml37
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/AUTHORS.rst43
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/CHANGES.rst217
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/CONTRIBUTING.rst60
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/LICENSE20
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/MANIFEST.in6
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/README.chromium11
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/README.rst157
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/debug-info.py37
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/Makefile177
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/changes.rst3
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/conf.py280
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.filters.rst59
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.rst77
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.serializer.rst19
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treebuilders.rst43
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treewalkers.rst59
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/index.rst21
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/license.rst4
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/make.bat242
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/modules.rst7
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/doc/movingparts.rst209
-rwxr-xr-xchromium/third_party/catapult/third_party/html5lib-python/flake8-run.sh14
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/__init__.py25
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/constants.py3102
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/__init__.py0
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/_base.py12
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/alphabeticalattributes.py20
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/inject_meta_charset.py65
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/lint.py90
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/optionaltags.py205
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/sanitizer.py12
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/whitespace.py38
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/html5parser.py2724
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/ihatexml.py285
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/inputstream.py903
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/sanitizer.py296
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/__init__.py16
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/htmlserializer.py317
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/tokenizer.py1731
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/__init__.py0
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/sax.py44
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/__init__.py76
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/_base.py377
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/dom.py227
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree.py337
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree_lxml.py369
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/__init__.py147
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/_base.py200
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/dom.py43
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/etree.py136
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/genshistream.py69
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/lxmletree.py201
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/pulldom.py63
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/__init__.py12
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/_base.py37
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/datrie.py44
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/py.py67
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/html5lib/utils.py103
-rwxr-xr-xchromium/third_party/catapult/third_party/html5lib-python/parse.py241
-rwxr-xr-xchromium/third_party/catapult/third_party/html5lib-python/requirements-install.sh16
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-2.6.txt5
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-cpython.txt5
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/requirements-optional.txt13
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/requirements-test.txt5
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/requirements.txt1
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/setup.py58
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/tox.ini30
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/utils/entities.py88
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/utils/iana_parse.py24
-rw-r--r--chromium/third_party/catapult/third_party/html5lib-python/utils/spider.py122
-rw-r--r--chromium/third_party/catapult/third_party/polymer/.bowerrc3
-rw-r--r--chromium/third_party/catapult/third_party/polymer/LICENSE.polymer27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/README.chromium26
-rw-r--r--chromium/third_party/catapult/third_party/polymer/bower.json24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/.bower.json19
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/README.md9
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/bowager-logo.pngbin5165 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/bower.json9
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/core-component-page.html1
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/demo.html23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-component-page/index.html22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-media-query/.bower.json18
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-media-query/README.md7
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-media-query/bower.json8
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-media-query/core-media-query.html87
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-media-query/demo.html44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-media-query/index.html22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/README.md4
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/bower.json13
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.css104
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.html217
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/demo.html211
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/index.html23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/core-tooltip/metadata.html20
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/font-roboto/.bower.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/font-roboto/README.md1
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/font-roboto/bower.json22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/font-roboto/roboto.html11
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/README.md49
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/bower.json33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/index.html38
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/x-announces.html50
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/index.html28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/iron-a11y-announcer.html125
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.bower.json43
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/README.md58
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/bower.json33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/x-key-aware.html104
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html492
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.bower.json48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/README.md44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/bower.json39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/demo/index.html111
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/hero.svg33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/iron-autogrow-textarea.html353
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.bower.json42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.github/ISSUE_TEMPLATE.md33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/README.md22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/bower.json32
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/index.html48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/simple-button.html71
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/index.html27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-button-state.html228
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-control-state.html110
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.bower.json43
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.travis.yml22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/README.md25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/bower.json34
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/index.html39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/simple-checkbox.html64
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/iron-checked-element-behavior.html120
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.bower.json43
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/README.md58
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/bower.json34
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/demo/index.html104
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-collapse/hero.svg23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/index.html31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-collapse/iron-collapse.html285
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.bower.json48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/README.md46
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/bower.json39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/grow-height-animation.html36
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/index.html160
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/x-select.html80
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown-scroll-manager.html233
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown.html275
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/README.md57
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/bower.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/index.html166
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/simple-fit.html42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/iron-fit-behavior.html594
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/README.md55
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/bower.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-flex-layout.html311
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-shadow-flex-layout.html307
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/demo/index.html396
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout-classes.html431
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout.html399
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.travis.yml22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/README.md23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/bower.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/index.html67
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-element.html27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-form.html53
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/iron-form-element-behavior.html86
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/.bower.json45
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/README.md92
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/bower.json35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/async.html62
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/index.html48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/location.pngbin324 -> 0 bytes
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-icon/hero.svg19
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/index.html26
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icon/iron-icon.html207
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/.bower.json47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/README.md44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/av-icons.html88
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/bower.json38
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/communication-icons.html64
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/demo/index.html132
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/device-icons.html94
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/editor-icons.html76
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/hardware-icons.html63
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-icons/hero.svg35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/image-icons.html169
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/index.html25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/iron-icons.html338
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/maps-icons.html76
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/notification-icons.html66
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/places-icons.html33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-icons/social-icons.html40
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.bower.json43
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.travis.yml28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/README.md50
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/bower.json33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/index.html70
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/svg-sample-icons.html81
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/index.html26
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/iron-iconset-svg.html194
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/.github/ISSUE_TEMPLATE.md33
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/.travis.yml23
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/CONTRIBUTING.md77
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/README.md86
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/bower.json33
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/demo/index.html266
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/loading.pngbin2183 -> 0 bytes
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/demo/polymer.svg175
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/index.html24
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-image/iron-image.html403
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/.bower.json44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/README.md59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/bower.json35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/demo/index.html87
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-input/hero.svg19
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-input/iron-input.html306
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.bower.json46
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/README.md30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/bower.json37
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/index.html114
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menu.html52
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menubar.html56
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menu-behavior.html334
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menubar-behavior.html81
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/.bower.json39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/.travis.yml28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/README.md93
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/bower.json29
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/demo/index.html46
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-meta/hero.svg33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/index.html27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-meta/iron-meta.html333
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.bower.json47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.github/ISSUE_TEMPLATE.md33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/README.md71
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/bower.json37
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/index.html179
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/simple-overlay.html49
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-backdrop.html168
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-behavior.html628
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-manager.html398
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/.bower.json39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/README.md24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/bower.json29
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/demo/index.html79
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/iron-range-behavior.html121
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/.bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/README.md36
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/bower.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/index.html29
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/src/x-app.html114
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/index.html25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/iron-resizable-behavior.html195
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/.bower.json42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/.github/ISSUE_TEMPLATE.md33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/CONTRIBUTING.md77
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-selector/README.md91
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-selector/bower.json33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/demo/index.html101
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/iron-selector/index.html28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-multi-selectable.html154
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selectable.html388
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selection.html119
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selector.html87
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/.bower.json42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/README.md42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/bower.json33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/cats-only.html46
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/index.html71
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/validatable-input.html46
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/iron-validatable-behavior.html149
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/.bower.json61
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/README.md306
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/cascaded-animation.html95
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-in-animation.html49
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-out-animation.html49
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/hero-animation.html83
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/opaque-animation.html46
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/reverse-ripple-animation.html87
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/ripple-animation.html93
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-down-animation.html65
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-up-animation.html65
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-down-animation.html59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-bottom-animation.html59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-left-animation.html60
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-right-animation.html60
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-top-animation.html59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-left-animation.html59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-right-animation.html59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-up-animation.html59
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/transform-animation.html70
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/bower.json52
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/index.html166
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-card.html94
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-cards-list.html75
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/declarative/index.html132
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/index.html70
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-animatable.html68
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-dialog.html94
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/animated-dropdown.html90
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/index.html54
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/animated-grid.html164
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/fullsize-page-with-card.html122
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/index.html64
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/index.html45
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/full-view.html118
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/index.html35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-demo.html102
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-view.html124
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/animated-grid.html146
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/full-page.html82
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/index.html48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/animated-grid.html167
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/fullsize-page-with-card.html120
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/index.html63
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/reprojected-pages.html45
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/shared-styles.html47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/circles-page.html107
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/index.html70
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/squares-page.html100
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/guides/neon-animation.md314
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable-behavior.html150
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable.html57
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animated-pages.html224
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-behavior.html86
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html116
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation.html18
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animations.html29
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animatable-behavior.html43
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animation-behavior.html72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/neon-animation/web-animations.html11
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.bower.json51
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/README.md44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/bower.json42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/index.html57
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-button.html72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-radio-button.html119
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/index.html26
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-button-behavior.html103
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-checked-element-behavior.html61
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-inky-focus-behavior.html55
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-ripple-behavior.html130
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/.bower.json50
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/README.md94
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/demo/index.html138
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/index.html26
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-button/paper-button.html178
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/.travis.yml23
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/CONTRIBUTING.md77
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/README.md65
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/cafe.pngbin256315 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/donuts.pngbin395250 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/house.pngbin376570 -> 0 bytes
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/demo/index.html323
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/travel.pngbin364923 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/trip.pngbin283091 -> 0 bytes
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/index.html28
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-card/paper-card.html226
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.bower.json49
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/README.md54
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/bower.json40
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/index.html102
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/simple-dialog.html39
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/hero.svg51
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-behavior.html140
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-common.css57
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-shared-styles.html83
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.bower.json47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/README.md74
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/bower.json38
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/demo/index.html199
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-dialog/hero.svg58
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dialog/paper-dialog.html122
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.bower.json57
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/README.md149
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/bower.json48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/demo/index.html295
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-icons.html17
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-light.html576
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-shared-styles.html79
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu.html382
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-fab/README.md4
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-fab/bower.json16
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-fab/demo.html83
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-fab/index.html22
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-fab/metadata.html36
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-fab/paper-fab.html180
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.bower.json50
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/README.md81
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/bower.json40
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/index.html103
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/paper-icon-button-light.html57
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/index.html23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button-light.html91
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button.html176
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/.bower.json60
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/README.md254
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/all-imports.html12
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/bower.json51
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/index.html155
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-input.html96
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-validator.html27
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-input/hero.svg19
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/index.html28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-addon-behavior.html47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-behavior.html541
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-char-counter.html99
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-container.html621
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-error.html94
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input.html162
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-textarea.html138
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/.bower.json52
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/README.md163
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/all-imports.html13
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/bower.json43
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/demo/index.html191
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-icon-item.html86
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-behavior.html36
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-body.html83
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-shared-styles.html70
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item.html111
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-listbox/README.md5
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-listbox/bower.json38
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-listbox/demo/index.html93
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-listbox/hero.svg35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-listbox/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-listbox/paper-listbox.html96
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/.bower.json44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/README.md35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/bower.json35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/demo/index.html84
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material-shared-styles.html42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material.html78
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.bower.json55
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/README.md69
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/bower.json46
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/demo/index.html203
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-menu-button/hero.svg39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button-animations.html109
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button.html407
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/.bower.json48
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/CONTRIBUTING.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/README.md113
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/bower.json39
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/demo/index.html150
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-menu/hero.svg35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu-shared-styles.html47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu.html102
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-submenu.html231
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/.bower.json42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/README.md94
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/bower.json32
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/demo/index.html122
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-progress/hero.svg21
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/index.html28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-progress/paper-progress.html341
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.bower.json45
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/README.md90
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/bower.json35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/demo/index.html415
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-ripple/hero.svg30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/index.html27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-ripple/paper-ripple.html758
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.bower.json47
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.travis.yml23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/README.md93
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/bower.json38
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/demo/index.html97
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-spinner/hero.svg27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/index.html30
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-behavior.html87
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-lite.html71
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-styles.html341
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner.html91
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/.bower.json42
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/README.md49
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/bower.json33
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/global.html96
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow-layout.html302
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow.html52
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/typography.html169
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/color.html333
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/default-theme.html72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo-pages.html72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo.css25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo/index.html339
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/index.html24
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles-classes.html14
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles.html44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/shadow.html71
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-styles/typography.html169
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/.bower.json45
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/README.md72
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/bower.json35
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo.html63
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo/index.html96
-rwxr-xr-xchromium/third_party/catapult/third_party/polymer/components/paper-toast/hero.svg20
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/index.html26
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/metadata.html20
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.css80
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.html323
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.bower.json45
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.travis.yml25
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/CONTRIBUTING.md77
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/README.md62
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/bower.json36
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/index.html133
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/test-button.html37
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/index.html28
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/paper-tooltip.html372
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/.bower.json44
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/LICENSE.txt27
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/bower.json34
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/build.log473
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-micro.html715
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-mini.html2164
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/polymer/polymer.html5226
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/.bower.json41
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/COPYING202
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/History.md203
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/README.md172
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/bower.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js17
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js.map1
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js17
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js.map1
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.html50
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js17
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js.map1
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/.bower.json23
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.js950
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.min.js11
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.js1076
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.min.js11
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/README.md108
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.js4387
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.min.js14
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/bower.json14
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/build.log31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/package.json31
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.js2270
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.min.js12
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.js7064
-rw-r--r--chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.min.js16
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/README.chromium8
-rwxr-xr-xchromium/third_party/catapult/third_party/py_vulcanize/bin/run_py_tests29
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/__init__.py11
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs.py146
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs_unittest.py52
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate.py269
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate_unittest.py59
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_generation_controller.py28
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module.py145
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module_unittest.py318
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils.py7
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils_unittest.py18
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module.py269
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module_unittest.py130
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py216
-rwxr-xr-xchromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps_unittest.py274
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/project.py229
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource.py57
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py227
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_unittest.py17
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments.py81
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments_unittest.py54
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet.py138
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet_unittest.py67
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/LICENSE201
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/MANIFEST354
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/PKG-INFO316
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.chromium16
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.rst153
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/__init__.py39
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/include/cext.h244
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/__init__.py27
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/commands.py267
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/data.py165
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/dist.py51
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/ext.py254
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/setup.py419
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/shell.py478
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/__init__.py28
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/_term.py115
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/util.py73
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/__init__.py27
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/commands.py266
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/data.py165
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/dist.py51
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/ext.py253
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/setup.py420
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/shell.py351
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/__init__.py28
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/_term.py116
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/util.py63
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/LICENSE.cssmin64
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/__init__.py30
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/cssmin.py246
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/main.py236
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.css3861
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.min.css1
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/write.py344
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/BENCHMARKS61
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CHANGES42
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CLASSIFIERS19
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/DESCRIPTION85
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/PROVIDES1
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/SUMMARY1
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/api-objects.txt6
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/crarr.pngbin340 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.css322
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.js293
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/help.html261
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/identifier-index.html163
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/index.html224
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/module-tree.html94
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-module.html224
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-pysrc.html477
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/redirect.html38
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/package.cfg84
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.c1163
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.py374
-rwxr-xr-xchromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/run_tests.py166
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/setup.py42
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/LICENSE201
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/MANIFEST56
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/PKG-INFO303
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.chromium15
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.rst141
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/__init__.py39
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/include/cext.h244
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/__init__.py27
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/commands.py267
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/data.py165
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/dist.py51
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/ext.py254
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/setup.py419
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/shell.py478
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/util.py73
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/__init__.py27
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/commands.py266
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/data.py165
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/dist.py51
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/ext.py253
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/setup.py420
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/shell.py351
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/util.py63
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/__init__.py30
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/apiviewer.js178
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/bootstrap.js1829
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jquery-1.7.1.js9266
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.c291
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.py226
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin_2_0_9.py233
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/knockout-2.0.0.js97
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/main.py249
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/markermanager.js976
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/write.py347
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/BENCHMARKS388
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CHANGES89
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CLASSIFIERS19
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/DESCRIPTION72
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/PROVIDES1
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/SUMMARY1
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/api-objects.txt7
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/crarr.pngbin340 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.css322
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.js293
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/help.html261
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/identifier-index.html163
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/index.html219
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/module-tree.html94
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/redirect.html38
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-module.html219
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-pysrc.html549
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/package.cfg78
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.c456
-rwxr-xr-xchromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.py446
-rw-r--r--chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/setup.py42
-rw-r--r--chromium/third_party/catapult/tracing/bin/PRESUBMIT.py19
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/compare_samples54
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/generate_about_tracing_contents14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/html2trace53
-rw-r--r--chromium/third_party/catapult/tracing/bin/index.html115
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/map_traces14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/merge_traces14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/run_dev_server_tests14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/run_metric75
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/run_node_tests23
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/run_py_tests41
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/run_tests25
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/run_vinn_tests14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/slim_trace16
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/strip_memory_infra_trace13
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/symbolize_trace409
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/trace2html14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/update_gypi14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/validate_all_metrics43
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/vulcanize_trace_viewer14
-rwxr-xr-xchromium/third_party/catapult/tracing/bin/why_imported48
-rw-r--r--chromium/third_party/catapult/tracing/third_party/chai/LICENSE7
-rw-r--r--chromium/third_party/catapult/tracing/third_party/chai/README.chromium15
-rw-r--r--chromium/third_party/catapult/tracing/third_party/chai/chai.js2
-rw-r--r--chromium/third_party/catapult/tracing/third_party/css-element-queries/Gruntfile.js16
-rw-r--r--chromium/third_party/catapult/tracing/third_party/css-element-queries/LICENSE19
-rw-r--r--chromium/third_party/catapult/tracing/third_party/css-element-queries/README.chromium16
-rw-r--r--chromium/third_party/catapult/tracing/third_party/css-element-queries/README.md74
-rw-r--r--chromium/third_party/catapult/tracing/third_party/css-element-queries/bower.json19
-rw-r--r--chromium/third_party/catapult/tracing/third_party/css-element-queries/package.json26
-rwxr-xr-xchromium/third_party/catapult/tracing/third_party/css-element-queries/src/ElementQueries.js340
-rwxr-xr-xchromium/third_party/catapult/tracing/third_party/css-element-queries/src/ResizeSensor.js158
-rw-r--r--chromium/third_party/catapult/tracing/third_party/d3/LICENSE26
-rw-r--r--chromium/third_party/catapult/tracing/third_party/d3/README.chromium15
-rw-r--r--chromium/third_party/catapult/tracing/third_party/d3/d3.min.js5
-rw-r--r--chromium/third_party/catapult/tracing/third_party/devscripts/COPYING340
-rw-r--r--chromium/third_party/catapult/tracing/third_party/devscripts/README.chromium12
-rwxr-xr-xchromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl671
-rw-r--r--chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl.vanilla577
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/BUILDING.md7
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/LICENSE.md19
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/README.chromium15
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/README.md22
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/TESTING.md12
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/VERSION1
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/bower.json27
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix-min.js29
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix.js5020
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allclasses.tmpl14
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allfiles.tmpl65
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/class.tmpl340
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/index.tmpl52
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/publish.js201
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/default.css428
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/header.html2
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/index.html19
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/symbol.tmpl35
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/package.json30
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/common-spec.js14
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2-spec.js210
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2d-spec.js194
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js347
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat4-spec.js637
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/quat-spec.js559
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec2-spec.js549
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec3-spec.js661
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec4-spec.js492
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/worker-spec.js44
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/helpers/spec-helper.js32
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/jasmine.yml74
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix.js37
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/common.js52
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2.js302
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2d.js317
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat3.js565
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat4.js1283
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/quat.js553
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec2.js523
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec3.js709
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec4.js537
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build.rake2
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/compile.rake5
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/minify.rake5
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/default.rake1
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/release.rake21
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix.rb84
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/release_helper.rb104
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/version.rb28
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.js47
-rw-r--r--chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.min.js28
-rw-r--r--chromium/third_party/catapult/tracing/third_party/jszip/LICENSE.markdown651
-rw-r--r--chromium/third_party/catapult/tracing/third_party/jszip/README.chromium16
-rw-r--r--chromium/third_party/catapult/tracing/third_party/jszip/README.markdown32
-rw-r--r--chromium/third_party/catapult/tracing/third_party/jszip/jszip.min.js14
-rw-r--r--chromium/third_party/catapult/tracing/third_party/mannwhitneyu/README.chromium15
-rw-r--r--chromium/third_party/catapult/tracing/third_party/mannwhitneyu/mannwhitneyu.js197
-rw-r--r--chromium/third_party/catapult/tracing/third_party/mocha/LICENSE22
-rw-r--r--chromium/third_party/catapult/tracing/third_party/mocha/README.chromium9
-rw-r--r--chromium/third_party/catapult/tracing/third_party/mocha/mocha.css270
-rwxr-xr-xchromium/third_party/catapult/tracing/third_party/mocha/mocha.js6557
-rw-r--r--chromium/third_party/catapult/tracing/third_party/symbols/README.chromium21
-rw-r--r--chromium/third_party/catapult/tracing/third_party/symbols/symbols/PRESUBMIT.py21
-rw-r--r--chromium/third_party/catapult/tracing/third_party/symbols/symbols/__init__.py0
-rw-r--r--chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer.py467
-rwxr-xr-xchromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer_unittest.py174
-rw-r--r--chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/__init__.py0
-rwxr-xr-xchromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/mock_addr2line83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/__init__.py6
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/base.html194
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/base64.html94
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/base64_test.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/bbox2.html158
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/bbox2_test.html36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/category_util.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/color.html252
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/color_scheme.html242
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/color_scheme_test.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/color_test.html104
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/event.html101
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/event_target.html161
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/event_target_test.html36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/extension_registry.html65
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/extension_registry_base.html101
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/extension_registry_basic.html120
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/extension_registry_test.html132
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/extension_registry_type_based.html161
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/guid.html59
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/headless_tests.html78
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/interval_tree.html349
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/interval_tree_test.html236
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/iteration_helpers.html472
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/iteration_helpers_test.html351
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/math.html174
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/math_test.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view.html1167
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view_test.html13117
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function.html143
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function_test.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/quad.html232
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/quad_test.html130
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/raf.html214
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/raf_test.html247
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/range.html277
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/range_test.html465
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/range_utils.html140
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/range_utils_test.html133
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/rect.html162
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/rect_test.html31
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/running_statistics.html180
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/running_statistics_test.html195
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/settings.html204
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/settings_test.html113
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator.html92
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator_test.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils.html334
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils_test.html239
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/statistics.html848
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/statistics_test.html577
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/task.html186
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/task_test.html171
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/time_display_modes.html54
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/timing.html97
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/timing_test.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unit.html385
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unit_scale.html79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unit_test.html229
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/constants.html28
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html489
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html709
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html244
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html140
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/test_case_test.html18
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html273
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html135
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html117
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/unittest_test.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/utils.html144
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/utils_test.html33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/xhr.html144
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/auditor.html56
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/filter.html131
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/filter_test.html107
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/scripting_controller.html65
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/scripting_controller_test.html86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/scripting_object.html26
-rw-r--r--chromium/third_party/catapult/tracing/tracing/core/test_utils.html485
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category.html86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category_test.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor.html755
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor_test.html425
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context.html74
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context_test.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_blame_context_test.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_tree_node.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/render_frame.html79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/top_level.html59
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/cc.html12
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/constants.html27
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/debug_colors.html77
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list.html54
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list_test.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice.html629
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice_test.html689
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_impl.html208
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl.html192
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js330
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_impl.html170
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture.html413
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_as_image_data.html71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_test.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/raster_task.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/region.html62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/render_pass.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile.html88
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_coverage_rect.html28
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_test.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util.html148
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util_test.html114
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor_test.html129
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_test_utils.html161
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver.html213
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver_test.html84
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice_test.html72
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state.html52
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test.html31
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test_data.js22
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object.html205
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object_test.html77
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_tree.html47
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer.html37
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer_test.html28
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/chrome_config.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/full_config.html12
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/android/event_log_importer.html321
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer.html184
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer_test.html104
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer.html221
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer_test.html188
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer.html477
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer_test.html290
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser.html110
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser_test.html120
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/parser.html73
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser.html181
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser_test.html150
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser.html242
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser_test.html179
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html99
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer_test.html99
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer.html188
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer_test.html104
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/jszip.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser.html240
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser_test.html230
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser.html692
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser_test.html224
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser.html97
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser_test.html68
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser_test.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser.html115
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser_test.html173
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser.html313
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser_test.html119
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser.html71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser_test.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser.html128
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser_test.html128
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer.html932
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer_test.html530
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser.html144
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser_test.html213
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser.html182
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser_test.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser.html371
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser_test.html105
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser.html184
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser_test.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser.html113
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser_test.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser.html568
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser_test.html485
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser.html155
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser_test.html170
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/parser.html90
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser.html183
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser_test.html93
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser.html143
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser_test.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser.html150
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser_test.html222
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser.html125
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser_test.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser.html103
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser_test.html36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer.html95
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer_test.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry.html129
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry_test.html124
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_map.html127
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer.html3077
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_perf_test.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_test.html5754
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/v8/codemap.html381
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/v8/log_reader.html213
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/v8/splaytree.html306
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer.html381
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer_test.html305
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/importer/zip_importer.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/lean_config.html14
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/measure/measure.html8
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice_test.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/net/net.html8
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice.html99
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice_test.html194
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/system_stats/system_stats_snapshot.html53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/systrace_config.html15
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/context.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter.html50
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_all_of.html61
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_any_of.html68
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_ancestor.html53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_duration.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_title.html41
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_is_top_level.html50
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_not.html50
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery.html190
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery_test.html243
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/v8/v8_gc_stats_thread_slice.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/v8/v8_thread_slice.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/v8_config.html8
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor.html140
-rw-r--r--chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor_test.html139
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/clock_sync_test.html123
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/context_processor.html196
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/context_processor_test.html273
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/empty_importer.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/find_input_expectations.html1259
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/find_load_expectations.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/find_startup_expectations.html89
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/import.html396
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/import_test.html216
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/importer.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/proto_expectation.html188
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/simple_line_reader.html53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/user_expectation_verifier.html80
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/user_model_builder.html231
-rw-r--r--chromium/third_party/catapult/tracing/tracing/importer/user_model_builder_test.html1177
-rw-r--r--chromium/third_party/catapult/tracing/tracing/index.js23
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/__init__.py15
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/all_metrics.html22
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric.html199
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric_test.html202
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/buildbot_output_for_compare_samples_test.txt187
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/compare_samples.py55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_cmdline.html253
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_unittest.py225
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric.html87
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric_test.html121
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/discover.py34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/discover_cmdline.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/discover_unittest.py20
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function.html96
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function_test.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/metric_registry.html37
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/metric_registry_test.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/metric_runner.py46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/sample_metric.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric.html59
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric_test.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric.html89
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric_test.html123
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric.html142
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric_test.html86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric.html437
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric_test.html338
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric.html116
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric_test.html113
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric.html1120
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric_test.html3261
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric.html293
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric_test.html410
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric.html153
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric_test.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/system_health_metrics.html33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/utils.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric.html65
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric_test.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html203
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric_test.html166
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric.html226
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric_test.html71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric.html338
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric_test.html289
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/utils.html313
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/utils_test.html176
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/v8/v8_metrics.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/metrics/valueset_output_for_compare_samples_test.json1
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/activity.html56
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/alert.html56
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/annotation.html83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/annotation_test.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/async_slice.html151
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/async_slice_group.html166
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/async_slice_group_test.html68
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/async_slice_test.html57
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager.html427
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager_test.html380
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/comment_box_annotation.html61
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/compound_event_selection_state.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/constants.html25
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/container_memory_dump.html94
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/container_memory_dump_test.html177
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/counter.html195
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/counter_sample.html103
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/counter_sample_test.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/counter_series.html124
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/counter_test.html124
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/cpu.html272
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/cpu_slice.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/cpu_test.html202
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/device.html109
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/device_test.html71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event.html76
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event_container.html141
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event_info.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event_registry.html88
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event_set.html277
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event_set_test.html328
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/event_test.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/flow_event.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/frame.html96
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/global_memory_dump.html868
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/global_memory_dump_test.html3943
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/heap_dump.html67
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/heap_dump_test.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/android_app.html341
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper.html104
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper_test.html266
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/android_surface_flinger.html110
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper.html133
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper_test.html83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_gpu_helper.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper.html152
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper_test.html167
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_process_helper.html86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper.html174
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper_test.html156
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/instant_event.html100
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/interaction_record_test.html117
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/ir_coverage.html87
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/ir_coverage_test.html90
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/kernel.html134
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/kernel_test.html73
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/location.html162
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump.html221
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump_test.html220
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/memory_dump_test_utils.html215
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model.html650
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_indices.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_indices_test.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_settings.html140
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_settings_test.html178
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_stats.html88
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_stats_test.html62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/model_test.html341
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/object_collection.html233
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/object_collection_test.html231
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/object_instance.html197
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/object_instance_test.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/object_snapshot.html92
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/object_snapshot_test.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/power_sample.html72
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/power_sample_test.html52
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/power_series.html128
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/power_series_test.html150
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/process.html159
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/process_base.html236
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/process_memory_dump.html244
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/process_memory_dump_test.html560
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/process_test.html112
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item_test.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/rect_annotation.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/sample.html68
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/sample_test.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/scoped_id.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/selectable_item.html59
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/selectable_item_test.html80
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/selection_state.html72
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/slice.html291
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/slice_group.html673
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/slice_group_test.html888
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/slice_test.html237
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/source_info/js_source_info.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/source_info/source_info.html58
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/source_info/source_info_test.html27
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/stack_frame.html103
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/stack_frame_test.html29
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/thread.html333
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/thread_slice.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/thread_slice_test.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/thread_test.html183
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/thread_time_slice.html159
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map.html194
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map_test.html163
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/timed_event.html62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/timed_event_test.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/animation_expectation.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/idle_expectation.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/load_expectation.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/response_expectation.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/startup_expectation.html33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/stub_expectation.html74
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/user_expectation.html169
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/user_model/user_model.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/vm_region.html389
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/vm_region_test.html1071
-rw-r--r--chromium/third_party/catapult/tracing/tracing/model/x_marker_annotation.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/__init__.py3
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/cloud_storage.py71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/corpus_driver.py9
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/corpus_driver_cmdline.py23
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/failure.html47
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/failure.py53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/failure_test.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/failure_unittest.py56
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/file_handle.html109
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/file_handle.py100
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/function_handle.html178
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/function_handle.py139
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/function_handle_test.html122
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/function_handle_unittest.py86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/gtest_progress_reporter.py88
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/job.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/job.py36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/json_output_formatter.py20
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/local_directory_corpus_driver.py68
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_runner.py105
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.html63
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.py135
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_cmdline.html91
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_unittest.py208
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_traces.py67
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/map_traces_handler.py14
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/mre_result.html61
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/mre_result.py48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/mre_result_test.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/mre_result_unittest.py46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/output_formatter.py19
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/progress_reporter.py27
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html29
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results_cmdline.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/run_and_convert_errors_to_failures.html31
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue.py121
-rw-r--r--chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue_unittest.py33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/results2_template.html32
-rw-r--r--chromium/third_party/catapult/tracing/tracing/results_renderer.py40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/results_renderer_unittest.py79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/tests.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/trace2html.html75
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view.html180
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view_test.html82
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link.html145
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link_test.html59
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view.html266
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view_test.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view.html202
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view_test.html141
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view.html205
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view_test.html349
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view.html141
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view_test.html172
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier.html89
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier_test.html53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart.html141
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_perf_test.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_test.html267
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view.html347
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view_test.html216
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane.html862
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html1243
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane.html176
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane_test.html132
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html276
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane.html438
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane_test.html3999
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_path_view.html149
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_util.html106
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane.html765
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane_test.html812
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_test_utils.html587
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util.html911
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util_test.html1235
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane.html388
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane_test.html490
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view.html80
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view_test.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view_test.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view.html205
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view_test.html95
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary.html205
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table.html351
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table_test.html108
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_test.html112
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view_test.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_frame_sub_view.html58
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view_test.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view.html111
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view_test.html47
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view.html77
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view_test.html63
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view.html286
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view_test.html118
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view.html103
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view_test.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view_test.html50
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_user_expectation_sub_view.html79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/object_instance_view.html62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/object_snapshot_view.html63
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table.html137
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table_test.html137
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior.html59
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior_test.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events.html324
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events_test.html217
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table.html96
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table_test.html75
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view.html79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view_test.html41
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view.html149
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view_test.html81
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view.html342
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view_test.html263
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view.html82
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view_test.html53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_frame_sub_view.html62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view.html63
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view_test.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view.html126
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view_test.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view.html138
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view_test.html32
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view.html120
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view_test.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view.html99
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view_test.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view_test.html78
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html186
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view_test.html92
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/single_user_expectation_sub_view.html91
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame.html81
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame_test.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane.html62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_test.html38
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view.html192
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view_test.html203
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/stub_analysis_table.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table.html88
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table_test.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view.html31
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view_test.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/annotations/comment_box_annotation_view.html90
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/annotations/rect_annotation_view.html57
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/annotations/x_marker_annotation_view.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/animation.html79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller.html140
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller_test.html166
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart.html140
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart_test.html243
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/base.html18
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/camera.html349
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/camera_test.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/chart_base.html488
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d.html464
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d_brushable_x.html88
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/checkbox.html107
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker.html109
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker_test.html139
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_test.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/color_legend.html81
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/color_legend_test.html122
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/column_chart.html248
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/column_chart_test.html295
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/constants.html20
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children.html108
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children_test.html97
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/d3.html9
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/d3_postload.js8
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/d3_preload.js11
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils.html90
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils_test.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers.html346
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers_test.html152
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle.html186
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle_test.html94
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/draw_helpers.html419
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/dropdown.html160
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/dropdown_test.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/elided_cache.html113
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/event_presenter.html93
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/fast_rect_renderer.html134
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/favicons.html27
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/file.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table.html230
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker.html414
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker_test.html60
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/heading.html143
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/hot_key.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller.html302
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller_test.html138
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/info_bar.html83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group_test.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_test.html47
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.css13
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.html64
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/line_chart_test.html163
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.css17
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.html138
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view_test.html98
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/list_view.css30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/list_view.html169
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/list_view_test.html67
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon.html115
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon_test.html41
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector.html575
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector_test.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/mouse_modes.html93
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/mouse_tracker.html114
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart.html91
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart_test.html172
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/overlay.html348
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/overlay_test.html124
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.css16
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.html275
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart_test.html207
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/polymer_postload.html13
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/polymer_preload.html15
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/quad_stack_view.html689
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker.html143
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker_test.html122
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor_test.html56
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart.html118
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart_test.html71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/tab_view.html269
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/tab_view_test.html126
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/table.html1753
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/table_header_cell.html93
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/table_test.html2084
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool.html322
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool_test.html78
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/tool_button.css17
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button_test.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/ui.html169
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/ui_state.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/ui_state_test.html99
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/ui_test.html245
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/utils.html82
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/base/utils_test.html76
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/brushing_state.html257
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller.html304
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller_test.html204
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/brushing_state_test.html123
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/about_tracing.html26
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/common.css25
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_connection.html125
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html187
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client_test.html83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view.html371
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view_test.html84
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller.html181
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller_test.html65
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html691
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog_test.html391
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/tracing_controller_client.html36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/xhr_based_tracing_controller_client.html113
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/cc.html14
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html476
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger_test.html130
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_item.html136
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.css9
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.html54
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.pngbin3344 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.svg114
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.css43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.html326
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.css18
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html127
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view_test.html37
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html1200
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view_test.html49
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.css31
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.html149
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view_test.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger.html496
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger_test.html32
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css18
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.html472
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.css18
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.html501
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.css62
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.html238
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view_test.html57
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.css9
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.html54
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection.html131
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection_test.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view.html220
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view_test.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/selection.html302
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/tile_view.html57
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/gpu.html10
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/images/checkerboard.pngbin245 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.css15
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/layout_tree_sub_view.html226
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/chrome_config.html33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/html_results.html121
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/main.html65
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/scalar_value.html42
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comment_element.html84
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel.html185
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel_test.html71
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/drive/drive_comment_provider.html101
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/drive/index.html462
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/full_config.html19
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter.html122
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter_test.html151
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/lean_config.html22
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html171
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel_test.html61
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel.html340
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel_test.html165
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel.html334
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel_test.html143
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel.html440
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel_test.html206
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats.html12
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.css15
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.html355
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track_test.html67
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.css28
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.html84
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/systrace_config.html19
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/gc_objects_stats_table.html556
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_gc_stats_thread_slice_sub_view.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view_test.html79
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table.html230
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table_test.html181
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_gc_stats_thread_slice_sub_view.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view_test.html96
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/extras/v8_config.html15
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/find_control.html174
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/find_control_test.html66
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/find_controller.html154
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/find_controller_test.html307
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/images/chrome-left.pngbin14088 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/images/chrome-mid.pngbin382 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/images/chrome-right.pngbin3264 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/images/ui-states.pngbin4097 -> 0 bytes
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/metrics_debugger_app.html134
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/scripting_control.html192
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/scripting_control_test.html22
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel.html219
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel_test.html36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/metrics_side_panel.html216
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container.html257
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container_test.html58
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry_test.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform.html118
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations.html174
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations_test.html85
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_test.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_interest_range.html248
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view.html1151
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view_test.html200
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_view.html541
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay.html244
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay_test.html17
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay_test.html31
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_view_test.html160
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport.html418
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport_test.html69
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track_test.html76
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track.html136
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track_test.html252
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis.html127
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis_test.html312
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point_test.html37
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series.html494
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series_test.html285
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track.html241
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track_test.html237
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform.html84
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform_test.html86
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/container_to_track_map.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/container_track.html132
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track.html80
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_perf_test.html129
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_test.html201
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track.html139
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track_test.html98
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track.html187
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track_test.html240
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track.html91
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track_test.html146
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.css20
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.html180
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container_perf_test.html136
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/event_to_track_map.html34
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track.html72
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track_test.html106
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track.html102
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track_test.html61
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/highlighter.html53
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track.html68
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track_test.html51
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/kernel_track.html82
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track.html260
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track_test.html121
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_test_utils.html152
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util.html215
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util_test.html262
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/model_track.html441
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/multi_row_track.html218
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_group_track.html87
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.css8
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.html299
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track_test.html111
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track.html83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track_test.html122
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track.html73
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track_test.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track.html130
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track_test.html110
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track.html154
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.css24
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.html274
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.css8
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.html251
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track_test.html412
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.css12
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.html374
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track_test.html36
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track_test.html33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track.html168
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track_test.html292
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track.html44
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track_test.html29
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.css7
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/stacked_bars_track.html130
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.css10
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.html163
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track_test.html146
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/track.css33
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/tracks/track.html167
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state.html92
-rw-r--r--chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state_test.html67
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/breakdown.html96
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic.html52
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map.html82
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map_test.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/event_ref.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/generic.html45
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/iteration_info.html209
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set.html114
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set_test.html48
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown.html136
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown_test.html83
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_map.html112
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_set.html97
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/scalar.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/diagnostics/value_ref.html23
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/generic_table.html29
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/histogram.html1002
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/histogram_test.html508
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/numeric.html93
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/numeric_test.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span.html77
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span_test.html28
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span.html139
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span_test.html55
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table.html74
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table_test.html27
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_span.html70
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span.html43
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span_test.html22
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view.html301
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view_test.html199
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span.html299
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span_test.html63
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/iteration_info_span.html90
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit_test.html22
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span.html46
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span_test.html58
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span_test.html35
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span.html40
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span_test.html25
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller.html197
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller_test.html311
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span.html39
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span_test.html23
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table.html92
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table_test.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span.html586
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span_test.html988
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table.html955
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table_test.html544
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view.html209
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view_test.html30
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/value_set.html231
-rw-r--r--chromium/third_party/catapult/tracing/tracing/value/value_set_test.html182
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/__init__.py7
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/check_common.py90
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/check_common_unittest.py29
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/check_gypi.py30
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py66
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents_unittest.py20
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/html2trace.py106
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/merge_traces.py676
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/run_profile.py62
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/run_vinn_tests.py47
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/slim_trace.py112
-rwxr-xr-xchromium/third_party/catapult/tracing/tracing_build/strip_memory_infra_trace.py100
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/trace2html.py115
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/trace2html_unittest.py36
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/tracing_dev_server_config.py57
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/update_gypi.py123
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/update_gypi_unittest.py37
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer.py84
-rw-r--r--chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer_unittest.py26
-rw-r--r--chromium/third_party/catapult/tracing/tracing_project.py183
1851 files changed, 10 insertions, 342789 deletions
diff --git a/chromium/build/util/LASTCHANGE b/chromium/build/util/LASTCHANGE
index 03235febd38..cfe3c152045 100644
--- a/chromium/build/util/LASTCHANGE
+++ b/chromium/build/util/LASTCHANGE
@@ -1 +1 @@
-LASTCHANGE=d6c1ff06aac4bdbf7da50b983ade7983e5089b70
+LASTCHANGE=5f281616aa7ee1cb3fe68be6befa159204a59d3e
diff --git a/chromium/build/util/LASTCHANGE.blink b/chromium/build/util/LASTCHANGE.blink
index 03235febd38..cfe3c152045 100644
--- a/chromium/build/util/LASTCHANGE.blink
+++ b/chromium/build/util/LASTCHANGE.blink
@@ -1 +1 @@
-LASTCHANGE=d6c1ff06aac4bdbf7da50b983ade7983e5089b70
+LASTCHANGE=5f281616aa7ee1cb3fe68be6befa159204a59d3e
diff --git a/chromium/skia/ext/skia_commit_hash.h b/chromium/skia/ext/skia_commit_hash.h
new file mode 100644
index 00000000000..ebb81d047f5
--- /dev/null
+++ b/chromium/skia/ext/skia_commit_hash.h
@@ -0,0 +1,8 @@
+/* Generated by lastchange.py, do not edit.*/
+
+#ifndef SKIA_EXT_SKIA_COMMIT_HASH_H_
+#define SKIA_EXT_SKIA_COMMIT_HASH_H_
+
+#define SKIA_COMMIT_HASH "da904ab72511168080050d5fd3b5d71317a6e47a"
+
+#endif // SKIA_EXT_SKIA_COMMIT_HASH_H_
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/AUTHORS.txt b/chromium/third_party/catapult/third_party/beautifulsoup4/AUTHORS.txt
deleted file mode 100644
index 8c113de6cf0..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/AUTHORS.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-Behold, mortal, the origins of Beautiful Soup...
-================================================
-
-Leonard Richardson is the primary programmer.
-
-Aaron DeVore is awesome.
-
-Mark Pilgrim provided the encoding detection code that forms the base
-of UnicodeDammit.
-
-Thomas Kluyver and Ezio Melotti finished the work of getting Beautiful
-Soup 4 working under Python 3.
-
-Simon Willison wrote soupselect, which was used to make Beautiful Soup
-support CSS selectors.
-
-Sam Ruby helped with a lot of edge cases.
-
-Jonathan Ellis was awarded the prestigous Beau Potage D'Or for his
-work in solving the nestable tags conundrum.
-
-An incomplete list of people have contributed patches to Beautiful
-Soup:
-
- Istvan Albert, Andrew Lin, Anthony Baxter, Andrew Boyko, Tony Chang,
- Zephyr Fang, Fuzzy, Roman Gaufman, Yoni Gilad, Richie Hindle, Peteris
- Krumins, Kent Johnson, Ben Last, Robert Leftwich, Staffan Malmgren,
- Ksenia Marasanova, JP Moins, Adam Monsen, John Nagle, "Jon", Ed
- Oskiewicz, Greg Phillips, Giles Radford, Arthur Rudolph, Marko
- Samastur, Jouni Seppänen, Alexander Schmolck, Andy Theyers, Glyn
- Webster, Paul Wright, Danny Yoo
-
-An incomplete list of people who made suggestions or found bugs or
-found ways to break Beautiful Soup:
-
- Hanno Böck, Matteo Bertini, Chris Curvey, Simon Cusack, Bruce Eckel,
- Matt Ernst, Michael Foord, Tom Harris, Bill de hOra, Donald Howes,
- Matt Patterson, Scott Roberts, Steve Strassmann, Mike Williams,
- warchild at redho dot com, Sami Kuisma, Carlos Rocha, Bob Hutchison,
- Joren Mc, Michal Migurski, John Kleven, Tim Heaney, Tripp Lilley, Ed
- Summers, Dennis Sutch, Chris Smith, Aaron Sweep^W Swartz, Stuart
- Turner, Greg Edwards, Kevin J Kalupson, Nikos Kouremenos, Artur de
- Sousa Rocha, Yichun Wei, Per Vognsen
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/COPYING.txt b/chromium/third_party/catapult/third_party/beautifulsoup4/COPYING.txt
deleted file mode 100644
index d668d13f041..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/COPYING.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Beautiful Soup is made available under the MIT license:
-
- Copyright (c) 2004-2012 Leonard Richardson
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE, DAMMIT.
-
-Beautiful Soup incorporates code from the html5lib library, which is
-also made available under the MIT license.
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/NEWS.txt b/chromium/third_party/catapult/third_party/beautifulsoup4/NEWS.txt
deleted file mode 100644
index 88a60a2458f..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/NEWS.txt
+++ /dev/null
@@ -1,1066 +0,0 @@
-= 4.3.2 (20131002) =
-
-* Fixed a bug in which short Unicode input was improperly encoded to
- ASCII when checking whether or not it was the name of a file on
- disk. [bug=1227016]
-
-* Fixed a crash when a short input contains data not valid in
- filenames. [bug=1232604]
-
-* Fixed a bug that caused Unicode data put into UnicodeDammit to
- return None instead of the original data. [bug=1214983]
-
-* Combined two tests to stop a spurious test failure when tests are
- run by nosetests. [bug=1212445]
-
-= 4.3.1 (20130815) =
-
-* Fixed yet another problem with the html5lib tree builder, caused by
- html5lib's tendency to rearrange the tree during
- parsing. [bug=1189267]
-
-* Fixed a bug that caused the optimized version of find_all() to
- return nothing. [bug=1212655]
-
-= 4.3.0 (20130812) =
-
-* Instead of converting incoming data to Unicode and feeding it to the
- lxml tree builder in chunks, Beautiful Soup now makes successive
- guesses at the encoding of the incoming data, and tells lxml to
- parse the data as that encoding. Giving lxml more control over the
- parsing process improves performance and avoids a number of bugs and
- issues with the lxml parser which had previously required elaborate
- workarounds:
-
- - An issue in which lxml refuses to parse Unicode strings on some
- systems. [bug=1180527]
-
- - A returning bug that truncated documents longer than a (very
- small) size. [bug=963880]
-
- - A returning bug in which extra spaces were added to a document if
- the document defined a charset other than UTF-8. [bug=972466]
-
- This required a major overhaul of the tree builder architecture. If
- you wrote your own tree builder and didn't tell me, you'll need to
- modify your prepare_markup() method.
-
-* The UnicodeDammit code that makes guesses at encodings has been
- split into its own class, EncodingDetector. A lot of apparently
- redundant code has been removed from Unicode, Dammit, and some
- undocumented features have also been removed.
-
-* Beautiful Soup will issue a warning if instead of markup you pass it
- a URL or the name of a file on disk (a common beginner's mistake).
-
-* A number of optimizations improve the performance of the lxml tree
- builder by about 33%, the html.parser tree builder by about 20%, and
- the html5lib tree builder by about 15%.
-
-* All find_all calls should now return a ResultSet object. Patch by
- Aaron DeVore. [bug=1194034]
-
-= 4.2.1 (20130531) =
-
-* The default XML formatter will now replace ampersands even if they
- appear to be part of entities. That is, "&lt;" will become
- "&amp;lt;". The old code was left over from Beautiful Soup 3, which
- didn't always turn entities into Unicode characters.
-
- If you really want the old behavior (maybe because you add new
- strings to the tree, those strings include entities, and you want
- the formatter to leave them alone on output), it can be found in
- EntitySubstitution.substitute_xml_containing_entities(). [bug=1182183]
-
-* Gave new_string() the ability to create subclasses of
- NavigableString. [bug=1181986]
-
-* Fixed another bug by which the html5lib tree builder could create a
- disconnected tree. [bug=1182089]
-
-* The .previous_element of a BeautifulSoup object is now always None,
- not the last element to be parsed. [bug=1182089]
-
-* Fixed test failures when lxml is not installed. [bug=1181589]
-
-* html5lib now supports Python 3. Fixed some Python 2-specific
- code in the html5lib test suite. [bug=1181624]
-
-* The html.parser treebuilder can now handle numeric attributes in
- text when the hexidecimal name of the attribute starts with a
- capital X. Patch by Tim Shirley. [bug=1186242]
-
-= 4.2.0 (20130514) =
-
-* The Tag.select() method now supports a much wider variety of CSS
- selectors.
-
- - Added support for the adjacent sibling combinator (+) and the
- general sibling combinator (~). Tests by "liquider". [bug=1082144]
-
- - The combinators (>, +, and ~) can now combine with any supported
- selector, not just one that selects based on tag name.
-
- - Added limited support for the "nth-of-type" pseudo-class. Code
- by Sven Slootweg. [bug=1109952]
-
-* The BeautifulSoup class is now aliased to "_s" and "_soup", making
- it quicker to type the import statement in an interactive session:
-
- from bs4 import _s
- or
- from bs4 import _soup
-
- The alias may change in the future, so don't use this in code you're
- going to run more than once.
-
-* Added the 'diagnose' submodule, which includes several useful
- functions for reporting problems and doing tech support.
-
- - diagnose(data) tries the given markup on every installed parser,
- reporting exceptions and displaying successes. If a parser is not
- installed, diagnose() mentions this fact.
-
- - lxml_trace(data, html=True) runs the given markup through lxml's
- XML parser or HTML parser, and prints out the parser events as
- they happen. This helps you quickly determine whether a given
- problem occurs in lxml code or Beautiful Soup code.
-
- - htmlparser_trace(data) is the same thing, but for Python's
- built-in HTMLParser class.
-
-* In an HTML document, the contents of a <script> or <style> tag will
- no longer undergo entity substitution by default. XML documents work
- the same way they did before. [bug=1085953]
-
-* Methods like get_text() and properties like .strings now only give
- you strings that are visible in the document--no comments or
- processing commands. [bug=1050164]
-
-* The prettify() method now leaves the contents of <pre> tags
- alone. [bug=1095654]
-
-* Fix a bug in the html5lib treebuilder which sometimes created
- disconnected trees. [bug=1039527]
-
-* Fix a bug in the lxml treebuilder which crashed when a tag included
- an attribute from the predefined "xml:" namespace. [bug=1065617]
-
-* Fix a bug by which keyword arguments to find_parent() were not
- being passed on. [bug=1126734]
-
-* Stop a crash when unwisely messing with a tag that's been
- decomposed. [bug=1097699]
-
-* Now that lxml's segfault on invalid doctype has been fixed, fixed a
- corresponding problem on the Beautiful Soup end that was previously
- invisible. [bug=984936]
-
-* Fixed an exception when an overspecified CSS selector didn't match
- anything. Code by Stefaan Lippens. [bug=1168167]
-
-= 4.1.3 (20120820) =
-
-* Skipped a test under Python 2.6 and Python 3.1 to avoid a spurious
- test failure caused by the lousy HTMLParser in those
- versions. [bug=1038503]
-
-* Raise a more specific error (FeatureNotFound) when a requested
- parser or parser feature is not installed. Raise NotImplementedError
- instead of ValueError when the user calls insert_before() or
- insert_after() on the BeautifulSoup object itself. Patch by Aaron
- Devore. [bug=1038301]
-
-= 4.1.2 (20120817) =
-
-* As per PEP-8, allow searching by CSS class using the 'class_'
- keyword argument. [bug=1037624]
-
-* Display namespace prefixes for namespaced attribute names, instead of
- the fully-qualified names given by the lxml parser. [bug=1037597]
-
-* Fixed a crash on encoding when an attribute name contained
- non-ASCII characters.
-
-* When sniffing encodings, if the cchardet library is installed,
- Beautiful Soup uses it instead of chardet. cchardet is much
- faster. [bug=1020748]
-
-* Use logging.warning() instead of warning.warn() to notify the user
- that characters were replaced with REPLACEMENT
- CHARACTER. [bug=1013862]
-
-= 4.1.1 (20120703) =
-
-* Fixed an html5lib tree builder crash which happened when html5lib
- moved a tag with a multivalued attribute from one part of the tree
- to another. [bug=1019603]
-
-* Correctly display closing tags with an XML namespace declared. Patch
- by Andreas Kostyrka. [bug=1019635]
-
-* Fixed a typo that made parsing significantly slower than it should
- have been, and also waited too long to close tags with XML
- namespaces. [bug=1020268]
-
-* get_text() now returns an empty Unicode string if there is no text,
- rather than an empty bytestring. [bug=1020387]
-
-= 4.1.0 (20120529) =
-
-* Added experimental support for fixing Windows-1252 characters
- embedded in UTF-8 documents. (UnicodeDammit.detwingle())
-
-* Fixed the handling of &quot; with the built-in parser. [bug=993871]
-
-* Comments, processing instructions, document type declarations, and
- markup declarations are now treated as preformatted strings, the way
- CData blocks are. [bug=1001025]
-
-* Fixed a bug with the lxml treebuilder that prevented the user from
- adding attributes to a tag that didn't originally have
- attributes. [bug=1002378] Thanks to Oliver Beattie for the patch.
-
-* Fixed some edge-case bugs having to do with inserting an element
- into a tag it's already inside, and replacing one of a tag's
- children with another. [bug=997529]
-
-* Added the ability to search for attribute values specified in UTF-8. [bug=1003974]
-
- This caused a major refactoring of the search code. All the tests
- pass, but it's possible that some searches will behave differently.
-
-= 4.0.5 (20120427) =
-
-* Added a new method, wrap(), which wraps an element in a tag.
-
-* Renamed replace_with_children() to unwrap(), which is easier to
- understand and also the jQuery name of the function.
-
-* Made encoding substitution in <meta> tags completely transparent (no
- more %SOUP-ENCODING%).
-
-* Fixed a bug in decoding data that contained a byte-order mark, such
- as data encoded in UTF-16LE. [bug=988980]
-
-* Fixed a bug that made the HTMLParser treebuilder generate XML
- definitions ending with two question marks instead of
- one. [bug=984258]
-
-* Upon document generation, CData objects are no longer run through
- the formatter. [bug=988905]
-
-* The test suite now passes when lxml is not installed, whether or not
- html5lib is installed. [bug=987004]
-
-* Print a warning on HTMLParseErrors to let people know they should
- install a better parser library.
-
-= 4.0.4 (20120416) =
-
-* Fixed a bug that sometimes created disconnected trees.
-
-* Fixed a bug with the string setter that moved a string around the
- tree instead of copying it. [bug=983050]
-
-* Attribute values are now run through the provided output formatter.
- Previously they were always run through the 'minimal' formatter. In
- the future I may make it possible to specify different formatters
- for attribute values and strings, but for now, consistent behavior
- is better than inconsistent behavior. [bug=980237]
-
-* Added the missing renderContents method from Beautiful Soup 3. Also
- added an encode_contents() method to go along with decode_contents().
-
-* Give a more useful error when the user tries to run the Python 2
- version of BS under Python 3.
-
-* UnicodeDammit can now convert Microsoft smart quotes to ASCII with
- UnicodeDammit(markup, smart_quotes_to="ascii").
-
-= 4.0.3 (20120403) =
-
-* Fixed a typo that caused some versions of Python 3 to convert the
- Beautiful Soup codebase incorrectly.
-
-* Got rid of the 4.0.2 workaround for HTML documents--it was
- unnecessary and the workaround was triggering a (possibly different,
- but related) bug in lxml. [bug=972466]
-
-= 4.0.2 (20120326) =
-
-* Worked around a possible bug in lxml that prevents non-tiny XML
- documents from being parsed. [bug=963880, bug=963936]
-
-* Fixed a bug where specifying `text` while also searching for a tag
- only worked if `text` wanted an exact string match. [bug=955942]
-
-= 4.0.1 (20120314) =
-
-* This is the first official release of Beautiful Soup 4. There is no
- 4.0.0 release, to eliminate any possibility that packaging software
- might treat "4.0.0" as being an earlier version than "4.0.0b10".
-
-* Brought BS up to date with the latest release of soupselect, adding
- CSS selector support for direct descendant matches and multiple CSS
- class matches.
-
-= 4.0.0b10 (20120302) =
-
-* Added support for simple CSS selectors, taken from the soupselect project.
-
-* Fixed a crash when using html5lib. [bug=943246]
-
-* In HTML5-style <meta charset="foo"> tags, the value of the "charset"
- attribute is now replaced with the appropriate encoding on
- output. [bug=942714]
-
-* Fixed a bug that caused calling a tag to sometimes call find_all()
- with the wrong arguments. [bug=944426]
-
-* For backwards compatibility, brought back the BeautifulStoneSoup
- class as a deprecated wrapper around BeautifulSoup.
-
-= 4.0.0b9 (20120228) =
-
-* Fixed the string representation of DOCTYPEs that have both a public
- ID and a system ID.
-
-* Fixed the generated XML declaration.
-
-* Renamed Tag.nsprefix to Tag.prefix, for consistency with
- NamespacedAttribute.
-
-* Fixed a test failure that occured on Python 3.x when chardet was
- installed.
-
-* Made prettify() return Unicode by default, so it will look nice on
- Python 3 when passed into print().
-
-= 4.0.0b8 (20120224) =
-
-* All tree builders now preserve namespace information in the
- documents they parse. If you use the html5lib parser or lxml's XML
- parser, you can access the namespace URL for a tag as tag.namespace.
-
- However, there is no special support for namespace-oriented
- searching or tree manipulation. When you search the tree, you need
- to use namespace prefixes exactly as they're used in the original
- document.
-
-* The string representation of a DOCTYPE always ends in a newline.
-
-* Issue a warning if the user tries to use a SoupStrainer in
- conjunction with the html5lib tree builder, which doesn't support
- them.
-
-= 4.0.0b7 (20120223) =
-
-* Upon decoding to string, any characters that can't be represented in
- your chosen encoding will be converted into numeric XML entity
- references.
-
-* Issue a warning if characters were replaced with REPLACEMENT
- CHARACTER during Unicode conversion.
-
-* Restored compatibility with Python 2.6.
-
-* The install process no longer installs docs or auxillary text files.
-
-* It's now possible to deepcopy a BeautifulSoup object created with
- Python's built-in HTML parser.
-
-* About 100 unit tests that "test" the behavior of various parsers on
- invalid markup have been removed. Legitimate changes to those
- parsers caused these tests to fail, indicating that perhaps
- Beautiful Soup should not test the behavior of foreign
- libraries.
-
- The problematic unit tests have been reformulated as informational
- comparisons generated by the script
- scripts/demonstrate_parser_differences.py.
-
- This makes Beautiful Soup compatible with html5lib version 0.95 and
- future versions of HTMLParser.
-
-= 4.0.0b6 (20120216) =
-
-* Multi-valued attributes like "class" always have a list of values,
- even if there's only one value in the list.
-
-* Added a number of multi-valued attributes defined in HTML5.
-
-* Stopped generating a space before the slash that closes an
- empty-element tag. This may come back if I add a special XHTML mode
- (http://www.w3.org/TR/xhtml1/#C_2), but right now it's pretty
- useless.
-
-* Passing text along with tag-specific arguments to a find* method:
-
- find("a", text="Click here")
-
- will find tags that contain the given text as their
- .string. Previously, the tag-specific arguments were ignored and
- only strings were searched.
-
-* Fixed a bug that caused the html5lib tree builder to build a
- partially disconnected tree. Generally cleaned up the html5lib tree
- builder.
-
-* If you restrict a multi-valued attribute like "class" to a string
- that contains spaces, Beautiful Soup will only consider it a match
- if the values correspond to that specific string.
-
-= 4.0.0b5 (20120209) =
-
-* Rationalized Beautiful Soup's treatment of CSS class. A tag
- belonging to multiple CSS classes is treated as having a list of
- values for the 'class' attribute. Searching for a CSS class will
- match *any* of the CSS classes.
-
- This actually affects all attributes that the HTML standard defines
- as taking multiple values (class, rel, rev, archive, accept-charset,
- and headers), but 'class' is by far the most common. [bug=41034]
-
-* If you pass anything other than a dictionary as the second argument
- to one of the find* methods, it'll assume you want to use that
- object to search against a tag's CSS classes. Previously this only
- worked if you passed in a string.
-
-* Fixed a bug that caused a crash when you passed a dictionary as an
- attribute value (possibly because you mistyped "attrs"). [bug=842419]
-
-* Unicode, Dammit now detects the encoding in HTML 5-style <meta> tags
- like <meta charset="utf-8" />. [bug=837268]
-
-* If Unicode, Dammit can't figure out a consistent encoding for a
- page, it will try each of its guesses again, with errors="replace"
- instead of errors="strict". This may mean that some data gets
- replaced with REPLACEMENT CHARACTER, but at least most of it will
- get turned into Unicode. [bug=754903]
-
-* Patched over a bug in html5lib (?) that was crashing Beautiful Soup
- on certain kinds of markup. [bug=838800]
-
-* Fixed a bug that wrecked the tree if you replaced an element with an
- empty string. [bug=728697]
-
-* Improved Unicode, Dammit's behavior when you give it Unicode to
- begin with.
-
-= 4.0.0b4 (20120208) =
-
-* Added BeautifulSoup.new_string() to go along with BeautifulSoup.new_tag()
-
-* BeautifulSoup.new_tag() will follow the rules of whatever
- tree-builder was used to create the original BeautifulSoup object. A
- new <p> tag will look like "<p />" if the soup object was created to
- parse XML, but it will look like "<p></p>" if the soup object was
- created to parse HTML.
-
-* We pass in strict=False to html.parser on Python 3, greatly
- improving html.parser's ability to handle bad HTML.
-
-* We also monkeypatch a serious bug in html.parser that made
- strict=False disastrous on Python 3.2.2.
-
-* Replaced the "substitute_html_entities" argument with the
- more general "formatter" argument.
-
-* Bare ampersands and angle brackets are always converted to XML
- entities unless the user prevents it.
-
-* Added PageElement.insert_before() and PageElement.insert_after(),
- which let you put an element into the parse tree with respect to
- some other element.
-
-* Raise an exception when the user tries to do something nonsensical
- like insert a tag into itself.
-
-
-= 4.0.0b3 (20120203) =
-
-Beautiful Soup 4 is a nearly-complete rewrite that removes Beautiful
-Soup's custom HTML parser in favor of a system that lets you write a
-little glue code and plug in any HTML or XML parser you want.
-
-Beautiful Soup 4.0 comes with glue code for four parsers:
-
- * Python's standard HTMLParser (html.parser in Python 3)
- * lxml's HTML and XML parsers
- * html5lib's HTML parser
-
-HTMLParser is the default, but I recommend you install lxml if you
-can.
-
-For complete documentation, see the Sphinx documentation in
-bs4/doc/source/. What follows is a summary of the changes from
-Beautiful Soup 3.
-
-=== The module name has changed ===
-
-Previously you imported the BeautifulSoup class from a module also
-called BeautifulSoup. To save keystrokes and make it clear which
-version of the API is in use, the module is now called 'bs4':
-
- >>> from bs4 import BeautifulSoup
-
-=== It works with Python 3 ===
-
-Beautiful Soup 3.1.0 worked with Python 3, but the parser it used was
-so bad that it barely worked at all. Beautiful Soup 4 works with
-Python 3, and since its parser is pluggable, you don't sacrifice
-quality.
-
-Special thanks to Thomas Kluyver and Ezio Melotti for getting Python 3
-support to the finish line. Ezio Melotti is also to thank for greatly
-improving the HTML parser that comes with Python 3.2.
-
-=== CDATA sections are normal text, if they're understood at all. ===
-
-Currently, the lxml and html5lib HTML parsers ignore CDATA sections in
-markup:
-
- <p><![CDATA[foo]]></p> => <p></p>
-
-A future version of html5lib will turn CDATA sections into text nodes,
-but only within tags like <svg> and <math>:
-
- <svg><![CDATA[foo]]></svg> => <p>foo</p>
-
-The default XML parser (which uses lxml behind the scenes) turns CDATA
-sections into ordinary text elements:
-
- <p><![CDATA[foo]]></p> => <p>foo</p>
-
-In theory it's possible to preserve the CDATA sections when using the
-XML parser, but I don't see how to get it to work in practice.
-
-=== Miscellaneous other stuff ===
-
-If the BeautifulSoup instance has .is_xml set to True, an appropriate
-XML declaration will be emitted when the tree is transformed into a
-string:
-
- <?xml version="1.0" encoding="utf-8">
- <markup>
- ...
- </markup>
-
-The ['lxml', 'xml'] tree builder sets .is_xml to True; the other tree
-builders set it to False. If you want to parse XHTML with an HTML
-parser, you can set it manually.
-
-
-= 3.2.0 =
-
-The 3.1 series wasn't very useful, so I renamed the 3.0 series to 3.2
-to make it obvious which one you should use.
-
-= 3.1.0 =
-
-A hybrid version that supports 2.4 and can be automatically converted
-to run under Python 3.0. There are three backwards-incompatible
-changes you should be aware of, but no new features or deliberate
-behavior changes.
-
-1. str() may no longer do what you want. This is because the meaning
-of str() inverts between Python 2 and 3; in Python 2 it gives you a
-byte string, in Python 3 it gives you a Unicode string.
-
-The effect of this is that you can't pass an encoding to .__str__
-anymore. Use encode() to get a string and decode() to get Unicode, and
-you'll be ready (well, readier) for Python 3.
-
-2. Beautiful Soup is now based on HTMLParser rather than SGMLParser,
-which is gone in Python 3. There's some bad HTML that SGMLParser
-handled but HTMLParser doesn't, usually to do with attribute values
-that aren't closed or have brackets inside them:
-
- <a href="foo</a>, </a><a href="bar">baz</a>
- <a b="<a>">', '<a b="&lt;a&gt;"></a><a>"></a>
-
-A later version of Beautiful Soup will allow you to plug in different
-parsers to make tradeoffs between speed and the ability to handle bad
-HTML.
-
-3. In Python 3 (but not Python 2), HTMLParser converts entities within
-attributes to the corresponding Unicode characters. In Python 2 it's
-possible to parse this string and leave the &eacute; intact.
-
- <a href="http://crummy.com?sacr&eacute;&bleu">
-
-In Python 3, the &eacute; is always converted to \xe9 during
-parsing.
-
-
-= 3.0.7a =
-
-Added an import that makes BS work in Python 2.3.
-
-
-= 3.0.7 =
-
-Fixed a UnicodeDecodeError when unpickling documents that contain
-non-ASCII characters.
-
-Fixed a TypeError that occured in some circumstances when a tag
-contained no text.
-
-Jump through hoops to avoid the use of chardet, which can be extremely
-slow in some circumstances. UTF-8 documents should never trigger the
-use of chardet.
-
-Whitespace is preserved inside <pre> and <textarea> tags that contain
-nothing but whitespace.
-
-Beautiful Soup can now parse a doctype that's scoped to an XML namespace.
-
-
-= 3.0.6 =
-
-Got rid of a very old debug line that prevented chardet from working.
-
-Added a Tag.decompose() method that completely disconnects a tree or a
-subset of a tree, breaking it up into bite-sized pieces that are
-easy for the garbage collecter to collect.
-
-Tag.extract() now returns the tag that was extracted.
-
-Tag.findNext() now does something with the keyword arguments you pass
-it instead of dropping them on the floor.
-
-Fixed a Unicode conversion bug.
-
-Fixed a bug that garbled some <meta> tags when rewriting them.
-
-
-= 3.0.5 =
-
-Soup objects can now be pickled, and copied with copy.deepcopy.
-
-Tag.append now works properly on existing BS objects. (It wasn't
-originally intended for outside use, but it can be now.) (Giles
-Radford)
-
-Passing in a nonexistent encoding will no longer crash the parser on
-Python 2.4 (John Nagle).
-
-Fixed an underlying bug in SGMLParser that thinks ASCII has 255
-characters instead of 127 (John Nagle).
-
-Entities are converted more consistently to Unicode characters.
-
-Entity references in attribute values are now converted to Unicode
-characters when appropriate. Numeric entities are always converted,
-because SGMLParser always converts them outside of attribute values.
-
-ALL_ENTITIES happens to just be the XHTML entities, so I renamed it to
-XHTML_ENTITIES.
-
-The regular expression for bare ampersands was too loose. In some
-cases ampersands were not being escaped. (Sam Ruby?)
-
-Non-breaking spaces and other special Unicode space characters are no
-longer folded to ASCII spaces. (Robert Leftwich)
-
-Information inside a TEXTAREA tag is now parsed literally, not as HTML
-tags. TEXTAREA now works exactly the same way as SCRIPT. (Zephyr Fang)
-
-= 3.0.4 =
-
-Fixed a bug that crashed Unicode conversion in some cases.
-
-Fixed a bug that prevented UnicodeDammit from being used as a
-general-purpose data scrubber.
-
-Fixed some unit test failures when running against Python 2.5.
-
-When considering whether to convert smart quotes, UnicodeDammit now
-looks at the original encoding in a case-insensitive way.
-
-= 3.0.3 (20060606) =
-
-Beautiful Soup is now usable as a way to clean up invalid XML/HTML (be
-sure to pass in an appropriate value for convertEntities, or XML/HTML
-entities might stick around that aren't valid in HTML/XML). The result
-may not validate, but it should be good enough to not choke a
-real-world XML parser. Specifically, the output of a properly
-constructed soup object should always be valid as part of an XML
-document, but parts may be missing if they were missing in the
-original. As always, if the input is valid XML, the output will also
-be valid.
-
-= 3.0.2 (20060602) =
-
-Previously, Beautiful Soup correctly handled attribute values that
-contained embedded quotes (sometimes by escaping), but not other kinds
-of XML character. Now, it correctly handles or escapes all special XML
-characters in attribute values.
-
-I aliased methods to the 2.x names (fetch, find, findText, etc.) for
-backwards compatibility purposes. Those names are deprecated and if I
-ever do a 4.0 I will remove them. I will, I tell you!
-
-Fixed a bug where the findAll method wasn't passing along any keyword
-arguments.
-
-When run from the command line, Beautiful Soup now acts as an HTML
-pretty-printer, not an XML pretty-printer.
-
-= 3.0.1 (20060530) =
-
-Reintroduced the "fetch by CSS class" shortcut. I thought keyword
-arguments would replace it, but they don't. You can't call soup('a',
-class='foo') because class is a Python keyword.
-
-If Beautiful Soup encounters a meta tag that declares the encoding,
-but a SoupStrainer tells it not to parse that tag, Beautiful Soup will
-no longer try to rewrite the meta tag to mention the new
-encoding. Basically, this makes SoupStrainers work in real-world
-applications instead of crashing the parser.
-
-= 3.0.0 "Who would not give all else for two p" (20060528) =
-
-This release is not backward-compatible with previous releases. If
-you've got code written with a previous version of the library, go
-ahead and keep using it, unless one of the features mentioned here
-really makes your life easier. Since the library is self-contained,
-you can include an old copy of the library in your old applications,
-and use the new version for everything else.
-
-The documentation has been rewritten and greatly expanded with many
-more examples.
-
-Beautiful Soup autodetects the encoding of a document (or uses the one
-you specify), and converts it from its native encoding to
-Unicode. Internally, it only deals with Unicode strings. When you
-print out the document, it converts to UTF-8 (or another encoding you
-specify). [Doc reference]
-
-It's now easy to make large-scale changes to the parse tree without
-screwing up the navigation members. The methods are extract,
-replaceWith, and insert. [Doc reference. See also Improving Memory
-Usage with extract]
-
-Passing True in as an attribute value gives you tags that have any
-value for that attribute. You don't have to create a regular
-expression. Passing None for an attribute value gives you tags that
-don't have that attribute at all.
-
-Tag objects now know whether or not they're self-closing. This avoids
-the problem where Beautiful Soup thought that tags like <BR /> were
-self-closing even in XML documents. You can customize the self-closing
-tags for a parser object by passing them in as a list of
-selfClosingTags: you don't have to subclass anymore.
-
-There's a new built-in parser, MinimalSoup, which has most of
-BeautifulSoup's HTML-specific rules, but no tag nesting rules. [Doc
-reference]
-
-You can use a SoupStrainer to tell Beautiful Soup to parse only part
-of a document. This saves time and memory, often making Beautiful Soup
-about as fast as a custom-built SGMLParser subclass. [Doc reference,
-SoupStrainer reference]
-
-You can (usually) use keyword arguments instead of passing a
-dictionary of attributes to a search method. That is, you can replace
-soup(args={"id" : "5"}) with soup(id="5"). You can still use args if
-(for instance) you need to find an attribute whose name clashes with
-the name of an argument to findAll. [Doc reference: **kwargs attrs]
-
-The method names have changed to the better method names used in
-Rubyful Soup. Instead of find methods and fetch methods, there are
-only find methods. Instead of a scheme where you can't remember which
-method finds one element and which one finds them all, we have find
-and findAll. In general, if the method name mentions All or a plural
-noun (eg. findNextSiblings), then it finds many elements
-method. Otherwise, it only finds one element. [Doc reference]
-
-Some of the argument names have been renamed for clarity. For instance
-avoidParserProblems is now parserMassage.
-
-Beautiful Soup no longer implements a feed method. You need to pass a
-string or a filehandle into the soup constructor, not with feed after
-the soup has been created. There is still a feed method, but it's the
-feed method implemented by SGMLParser and calling it will bypass
-Beautiful Soup and cause problems.
-
-The NavigableText class has been renamed to NavigableString. There is
-no NavigableUnicodeString anymore, because every string inside a
-Beautiful Soup parse tree is a Unicode string.
-
-findText and fetchText are gone. Just pass a text argument into find
-or findAll.
-
-Null was more trouble than it was worth, so I got rid of it. Anything
-that used to return Null now returns None.
-
-Special XML constructs like comments and CDATA now have their own
-NavigableString subclasses, instead of being treated as oddly-formed
-data. If you parse a document that contains CDATA and write it back
-out, the CDATA will still be there.
-
-When you're parsing a document, you can get Beautiful Soup to convert
-XML or HTML entities into the corresponding Unicode characters. [Doc
-reference]
-
-= 2.1.1 (20050918) =
-
-Fixed a serious performance bug in BeautifulStoneSoup which was
-causing parsing to be incredibly slow.
-
-Corrected several entities that were previously being incorrectly
-translated from Microsoft smart-quote-like characters.
-
-Fixed a bug that was breaking text fetch.
-
-Fixed a bug that crashed the parser when text chunks that look like
-HTML tag names showed up within a SCRIPT tag.
-
-THEAD, TBODY, and TFOOT tags are now nestable within TABLE
-tags. Nested tables should parse more sensibly now.
-
-BASE is now considered a self-closing tag.
-
-= 2.1.0 "Game, or any other dish?" (20050504) =
-
-Added a wide variety of new search methods which, given a starting
-point inside the tree, follow a particular navigation member (like
-nextSibling) over and over again, looking for Tag and NavigableText
-objects that match certain criteria. The new methods are findNext,
-fetchNext, findPrevious, fetchPrevious, findNextSibling,
-fetchNextSiblings, findPreviousSibling, fetchPreviousSiblings,
-findParent, and fetchParents. All of these use the same basic code
-used by first and fetch, so you can pass your weird ways of matching
-things into these methods.
-
-The fetch method and its derivatives now accept a limit argument.
-
-You can now pass keyword arguments when calling a Tag object as though
-it were a method.
-
-Fixed a bug that caused all hand-created tags to share a single set of
-attributes.
-
-= 2.0.3 (20050501) =
-
-Fixed Python 2.2 support for iterators.
-
-Fixed a bug that gave the wrong representation to tags within quote
-tags like <script>.
-
-Took some code from Mark Pilgrim that treats CDATA declarations as
-data instead of ignoring them.
-
-Beautiful Soup's setup.py will now do an install even if the unit
-tests fail. It won't build a source distribution if the unit tests
-fail, so I can't release a new version unless they pass.
-
-= 2.0.2 (20050416) =
-
-Added the unit tests in a separate module, and packaged it with
-distutils.
-
-Fixed a bug that sometimes caused renderContents() to return a Unicode
-string even if there was no Unicode in the original string.
-
-Added the done() method, which closes all of the parser's open
-tags. It gets called automatically when you pass in some text to the
-constructor of a parser class; otherwise you must call it yourself.
-
-Reinstated some backwards compatibility with 1.x versions: referencing
-the string member of a NavigableText object returns the NavigableText
-object instead of throwing an error.
-
-= 2.0.1 (20050412) =
-
-Fixed a bug that caused bad results when you tried to reference a tag
-name shorter than 3 characters as a member of a Tag, eg. tag.table.td.
-
-Made sure all Tags have the 'hidden' attribute so that an attempt to
-access tag.hidden doesn't spawn an attempt to find a tag named
-'hidden'.
-
-Fixed a bug in the comparison operator.
-
-= 2.0.0 "Who cares for fish?" (20050410)
-
-Beautiful Soup version 1 was very useful but also pretty stupid. I
-originally wrote it without noticing any of the problems inherent in
-trying to build a parse tree out of ambiguous HTML tags. This version
-solves all of those problems to my satisfaction. It also adds many new
-clever things to make up for the removal of the stupid things.
-
-== Parsing ==
-
-The parser logic has been greatly improved, and the BeautifulSoup
-class should much more reliably yield a parse tree that looks like
-what the page author intended. For a particular class of odd edge
-cases that now causes problems, there is a new class,
-ICantBelieveItsBeautifulSoup.
-
-By default, Beautiful Soup now performs some cleanup operations on
-text before parsing it. This is to avoid common problems with bad
-definitions and self-closing tags that crash SGMLParser. You can
-provide your own set of cleanup operations, or turn it off
-altogether. The cleanup operations include fixing self-closing tags
-that don't close, and replacing Microsoft smart quotes and similar
-characters with their HTML entity equivalents.
-
-You can now get a pretty-print version of parsed HTML to get a visual
-picture of how Beautiful Soup parses it, with the Tag.prettify()
-method.
-
-== Strings and Unicode ==
-
-There are separate NavigableText subclasses for ASCII and Unicode
-strings. These classes directly subclass the corresponding base data
-types. This means you can treat NavigableText objects as strings
-instead of having to call methods on them to get the strings.
-
-str() on a Tag always returns a string, and unicode() always returns
-Unicode. Previously it was inconsistent.
-
-== Tree traversal ==
-
-In a first() or fetch() call, the tag name or the desired value of an
-attribute can now be any of the following:
-
- * A string (matches that specific tag or that specific attribute value)
- * A list of strings (matches any tag or attribute value in the list)
- * A compiled regular expression object (matches any tag or attribute
- value that matches the regular expression)
- * A callable object that takes the Tag object or attribute value as a
- string. It returns None/false/empty string if the given string
- doesn't match, and any other value if it does.
-
-This is much easier to use than SQL-style wildcards (see, regular
-expressions are good for something). Because of this, I took out
-SQL-style wildcards. I'll put them back if someone complains, but
-their removal simplifies the code a lot.
-
-You can use fetch() and first() to search for text in the parse tree,
-not just tags. There are new alias methods fetchText() and firstText()
-designed for this purpose. As with searching for tags, you can pass in
-a string, a regular expression object, or a method to match your text.
-
-If you pass in something besides a map to the attrs argument of
-fetch() or first(), Beautiful Soup will assume you want to match that
-thing against the "class" attribute. When you're scraping
-well-structured HTML, this makes your code a lot cleaner.
-
-1.x and 2.x both let you call a Tag object as a shorthand for
-fetch(). For instance, foo("bar") is a shorthand for
-foo.fetch("bar"). In 2.x, you can also access a specially-named member
-of a Tag object as a shorthand for first(). For instance, foo.barTag
-is a shorthand for foo.first("bar"). By chaining these shortcuts you
-traverse a tree in very little code: for header in
-soup.bodyTag.pTag.tableTag('th'):
-
-If an element relationship (like parent or next) doesn't apply to a
-tag, it'll now show up Null instead of None. first() will also return
-Null if you ask it for a nonexistent tag. Null is an object that's
-just like None, except you can do whatever you want to it and it'll
-give you Null instead of throwing an error.
-
-This lets you do tree traversals like soup.htmlTag.headTag.titleTag
-without having to worry if the intermediate stages are actually
-there. Previously, if there was no 'head' tag in the document, headTag
-in that instance would have been None, and accessing its 'titleTag'
-member would have thrown an AttributeError. Now, you can get what you
-want when it exists, and get Null when it doesn't, without having to
-do a lot of conditionals checking to see if every stage is None.
-
-There are two new relations between page elements: previousSibling and
-nextSibling. They reference the previous and next element at the same
-level of the parse tree. For instance, if you have HTML like this:
-
- <p><ul><li>Foo<br /><li>Bar</ul>
-
-The first 'li' tag has a previousSibling of Null and its nextSibling
-is the second 'li' tag. The second 'li' tag has a nextSibling of Null
-and its previousSibling is the first 'li' tag. The previousSibling of
-the 'ul' tag is the first 'p' tag. The nextSibling of 'Foo' is the
-'br' tag.
-
-I took out the ability to use fetch() to find tags that have a
-specific list of contents. See, I can't even explain it well. It was
-really difficult to use, I never used it, and I don't think anyone
-else ever used it. To the extent anyone did, they can probably use
-fetchText() instead. If it turns out someone needs it I'll think of
-another solution.
-
-== Tree manipulation ==
-
-You can add new attributes to a tag, and delete attributes from a
-tag. In 1.x you could only change a tag's existing attributes.
-
-== Porting Considerations ==
-
-There are three changes in 2.0 that break old code:
-
-In the post-1.2 release you could pass in a function into fetch(). The
-function took a string, the tag name. In 2.0, the function takes the
-actual Tag object.
-
-It's no longer to pass in SQL-style wildcards to fetch(). Use a
-regular expression instead.
-
-The different parsing algorithm means the parse tree may not be shaped
-like you expect. This will only actually affect you if your code uses
-one of the affected parts. I haven't run into this problem yet while
-porting my code.
-
-= Between 1.2 and 2.0 =
-
-This is the release to get if you want Python 1.5 compatibility.
-
-The desired value of an attribute can now be any of the following:
-
- * A string
- * A string with SQL-style wildcards
- * A compiled RE object
- * A callable that returns None/false/empty string if the given value
- doesn't match, and any other value otherwise.
-
-This is much easier to use than SQL-style wildcards (see, regular
-expressions are good for something). Because of this, I no longer
-recommend you use SQL-style wildcards. They may go away in a future
-release to clean up the code.
-
-Made Beautiful Soup handle processing instructions as text instead of
-ignoring them.
-
-Applied patch from Richie Hindle (richie at entrian dot com) that
-makes tag.string a shorthand for tag.contents[0].string when the tag
-has only one string-owning child.
-
-Added still more nestable tags. The nestable tags thing won't work in
-a lot of cases and needs to be rethought.
-
-Fixed an edge case where searching for "%foo" would match any string
-shorter than "foo".
-
-= 1.2 "Who for such dainties would not stoop?" (20040708) =
-
-Applied patch from Ben Last (ben at benlast dot com) that made
-Tag.renderContents() correctly handle Unicode.
-
-Made BeautifulStoneSoup even dumber by making it not implicitly close
-a tag when another tag of the same type is encountered; only when an
-actual closing tag is encountered. This change courtesy of Fuzzy (mike
-at pcblokes dot com). BeautifulSoup still works as before.
-
-= 1.1 "Swimming in a hot tureen" =
-
-Added more 'nestable' tags. Changed popping semantics so that when a
-nestable tag is encountered, tags are popped up to the previously
-encountered nestable tag (of whatever kind). I will revert this if
-enough people complain, but it should make more people's lives easier
-than harder. This enhancement was suggested by Anthony Baxter (anthony
-at interlink dot com dot au).
-
-= 1.0 "So rich and green" (20040420) =
-
-Initial release.
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/PKG-INFO b/chromium/third_party/catapult/third_party/beautifulsoup4/PKG-INFO
deleted file mode 100644
index c9fbab8f8a4..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/PKG-INFO
+++ /dev/null
@@ -1,20 +0,0 @@
-Metadata-Version: 1.1
-Name: beautifulsoup4
-Version: 4.3.2
-Summary: UNKNOWN
-Home-page: http://www.crummy.com/software/BeautifulSoup/bs4/
-Author: Leonard Richardson
-Author-email: leonardr@segfault.org
-License: MIT
-Download-URL: http://www.crummy.com/software/BeautifulSoup/bs4/download/
-Description: Beautiful Soup sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and modifying the parse tree.
-Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Text Processing :: Markup :: HTML
-Classifier: Topic :: Text Processing :: Markup :: XML
-Classifier: Topic :: Text Processing :: Markup :: SGML
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/README.chromium b/chromium/third_party/catapult/third_party/beautifulsoup4/README.chromium
deleted file mode 100644
index 0cb5289417f..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/README.chromium
+++ /dev/null
@@ -1,11 +0,0 @@
-Name: BeautifulSoup
-Short Name: bs4
-URL: http://www.crummy.com/software/BeautifulSoup/
-Version: 4.3.2
-License: MIT
-
-Description:
-Beautiful Soup is a library for HTML parsing.
-It's included in catapult because webtest depends on it.
-
-Local Modifications: None
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/README.txt b/chromium/third_party/catapult/third_party/beautifulsoup4/README.txt
deleted file mode 100644
index 305c51e05e3..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/README.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-= Introduction =
-
- >>> from bs4 import BeautifulSoup
- >>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
- >>> print soup.prettify()
- <html>
- <body>
- <p>
- Some
- <b>
- bad
- <i>
- HTML
- </i>
- </b>
- </p>
- </body>
- </html>
- >>> soup.find(text="bad")
- u'bad'
-
- >>> soup.i
- <i>HTML</i>
-
- >>> soup = BeautifulSoup("<tag1>Some<tag2/>bad<tag3>XML", "xml")
- >>> print soup.prettify()
- <?xml version="1.0" encoding="utf-8">
- <tag1>
- Some
- <tag2 />
- bad
- <tag3>
- XML
- </tag3>
- </tag1>
-
-= Full documentation =
-
-The bs4/doc/ directory contains full documentation in Sphinx
-format. Run "make html" in that directory to create HTML
-documentation.
-
-= Running the unit tests =
-
-Beautiful Soup supports unit test discovery from the project root directory:
-
- $ nosetests
-
- $ python -m unittest discover -s bs4 # Python 2.7 and up
-
-If you checked out the source tree, you should see a script in the
-home directory called test-all-versions. This script will run the unit
-tests under Python 2.7, then create a temporary Python 3 conversion of
-the source and run the unit tests again under Python 3.
-
-= Links =
-
-Homepage: http://www.crummy.com/software/BeautifulSoup/bs4/
-Documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/
- http://readthedocs.org/docs/beautiful-soup-4/
-Discussion group: http://groups.google.com/group/beautifulsoup/
-Development: https://code.launchpad.net/beautifulsoup/
-Bug tracker: https://bugs.launchpad.net/beautifulsoup/
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/TODO.txt b/chromium/third_party/catapult/third_party/beautifulsoup4/TODO.txt
deleted file mode 100644
index e26d6264dac..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/TODO.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Additions
----------
-
-More of the jQuery API: nextUntil?
-
-Optimizations
--------------
-
-The html5lib tree builder doesn't use the standard tree-building API,
-which worries me and has resulted in a number of bugs.
-
-markup_attr_map can be optimized since it's always a map now.
-
-Upon encountering UTF-16LE data or some other uncommon serialization
-of Unicode, UnicodeDammit will convert the data to Unicode, then
-encode it at UTF-8. This is wasteful because it will just get decoded
-back to Unicode.
-
-CDATA
------
-
-The elementtree XMLParser has a strip_cdata argument that, when set to
-False, should allow Beautiful Soup to preserve CDATA sections instead
-of treating them as text. Except it doesn't. (This argument is also
-present for HTMLParser, and also does nothing there.)
-
-Currently, htm5lib converts CDATA sections into comments. An
-as-yet-unreleased version of html5lib changes the parser's handling of
-CDATA sections to allow CDATA sections in tags like <svg> and
-<math>. The HTML5TreeBuilder will need to be updated to create CData
-objects instead of Comment objects in this situation.
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/__init__.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/__init__.py
deleted file mode 100644
index 7ba34269af7..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/__init__.py
+++ /dev/null
@@ -1,406 +0,0 @@
-"""Beautiful Soup
-Elixir and Tonic
-"The Screen-Scraper's Friend"
-http://www.crummy.com/software/BeautifulSoup/
-
-Beautiful Soup uses a pluggable XML or HTML parser to parse a
-(possibly invalid) document into a tree representation. Beautiful Soup
-provides provides methods and Pythonic idioms that make it easy to
-navigate, search, and modify the parse tree.
-
-Beautiful Soup works with Python 2.6 and up. It works better if lxml
-and/or html5lib is installed.
-
-For more than you ever wanted to know about Beautiful Soup, see the
-documentation:
-http://www.crummy.com/software/BeautifulSoup/bs4/doc/
-"""
-
-__author__ = "Leonard Richardson (leonardr@segfault.org)"
-__version__ = "4.3.2"
-__copyright__ = "Copyright (c) 2004-2013 Leonard Richardson"
-__license__ = "MIT"
-
-__all__ = ['BeautifulSoup']
-
-import os
-import re
-import warnings
-
-from .builder import builder_registry, ParserRejectedMarkup
-from .dammit import UnicodeDammit
-from .element import (
- CData,
- Comment,
- DEFAULT_OUTPUT_ENCODING,
- Declaration,
- Doctype,
- NavigableString,
- PageElement,
- ProcessingInstruction,
- ResultSet,
- SoupStrainer,
- Tag,
- )
-
-# The very first thing we do is give a useful error if someone is
-# running this code under Python 3 without converting it.
-syntax_error = u'You are trying to run the Python 2 version of Beautiful Soup under Python 3. This will not work. You need to convert the code, either by installing it (`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'
-
-class BeautifulSoup(Tag):
- """
- This class defines the basic interface called by the tree builders.
-
- These methods will be called by the parser:
- reset()
- feed(markup)
-
- The tree builder may call these methods from its feed() implementation:
- handle_starttag(name, attrs) # See note about return value
- handle_endtag(name)
- handle_data(data) # Appends to the current data node
- endData(containerClass=NavigableString) # Ends the current data node
-
- No matter how complicated the underlying parser is, you should be
- able to build a tree using 'start tag' events, 'end tag' events,
- 'data' events, and "done with data" events.
-
- If you encounter an empty-element tag (aka a self-closing tag,
- like HTML's <br> tag), call handle_starttag and then
- handle_endtag.
- """
- ROOT_TAG_NAME = u'[document]'
-
- # If the end-user gives no indication which tree builder they
- # want, look for one with these features.
- DEFAULT_BUILDER_FEATURES = ['html', 'fast']
-
- ASCII_SPACES = '\x20\x0a\x09\x0c\x0d'
-
- def __init__(self, markup="", features=None, builder=None,
- parse_only=None, from_encoding=None, **kwargs):
- """The Soup object is initialized as the 'root tag', and the
- provided markup (which can be a string or a file-like object)
- is fed into the underlying parser."""
-
- if 'convertEntities' in kwargs:
- warnings.warn(
- "BS4 does not respect the convertEntities argument to the "
- "BeautifulSoup constructor. Entities are always converted "
- "to Unicode characters.")
-
- if 'markupMassage' in kwargs:
- del kwargs['markupMassage']
- warnings.warn(
- "BS4 does not respect the markupMassage argument to the "
- "BeautifulSoup constructor. The tree builder is responsible "
- "for any necessary markup massage.")
-
- if 'smartQuotesTo' in kwargs:
- del kwargs['smartQuotesTo']
- warnings.warn(
- "BS4 does not respect the smartQuotesTo argument to the "
- "BeautifulSoup constructor. Smart quotes are always converted "
- "to Unicode characters.")
-
- if 'selfClosingTags' in kwargs:
- del kwargs['selfClosingTags']
- warnings.warn(
- "BS4 does not respect the selfClosingTags argument to the "
- "BeautifulSoup constructor. The tree builder is responsible "
- "for understanding self-closing tags.")
-
- if 'isHTML' in kwargs:
- del kwargs['isHTML']
- warnings.warn(
- "BS4 does not respect the isHTML argument to the "
- "BeautifulSoup constructor. You can pass in features='html' "
- "or features='xml' to get a builder capable of handling "
- "one or the other.")
-
- def deprecated_argument(old_name, new_name):
- if old_name in kwargs:
- warnings.warn(
- 'The "%s" argument to the BeautifulSoup constructor '
- 'has been renamed to "%s."' % (old_name, new_name))
- value = kwargs[old_name]
- del kwargs[old_name]
- return value
- return None
-
- parse_only = parse_only or deprecated_argument(
- "parseOnlyThese", "parse_only")
-
- from_encoding = from_encoding or deprecated_argument(
- "fromEncoding", "from_encoding")
-
- if len(kwargs) > 0:
- arg = kwargs.keys().pop()
- raise TypeError(
- "__init__() got an unexpected keyword argument '%s'" % arg)
-
- if builder is None:
- if isinstance(features, basestring):
- features = [features]
- if features is None or len(features) == 0:
- features = self.DEFAULT_BUILDER_FEATURES
- builder_class = builder_registry.lookup(*features)
- if builder_class is None:
- raise FeatureNotFound(
- "Couldn't find a tree builder with the features you "
- "requested: %s. Do you need to install a parser library?"
- % ",".join(features))
- builder = builder_class()
- self.builder = builder
- self.is_xml = builder.is_xml
- self.builder.soup = self
-
- self.parse_only = parse_only
-
- if hasattr(markup, 'read'): # It's a file-type object.
- markup = markup.read()
- elif len(markup) <= 256:
- # Print out warnings for a couple beginner problems
- # involving passing non-markup to Beautiful Soup.
- # Beautiful Soup will still parse the input as markup,
- # just in case that's what the user really wants.
- if (isinstance(markup, unicode)
- and not os.path.supports_unicode_filenames):
- possible_filename = markup.encode("utf8")
- else:
- possible_filename = markup
- is_file = False
- try:
- is_file = os.path.exists(possible_filename)
- except Exception, e:
- # This is almost certainly a problem involving
- # characters not valid in filenames on this
- # system. Just let it go.
- pass
- if is_file:
- warnings.warn(
- '"%s" looks like a filename, not markup. You should probably open this file and pass the filehandle into Beautiful Soup.' % markup)
- if markup[:5] == "http:" or markup[:6] == "https:":
- # TODO: This is ugly but I couldn't get it to work in
- # Python 3 otherwise.
- if ((isinstance(markup, bytes) and not b' ' in markup)
- or (isinstance(markup, unicode) and not u' ' in markup)):
- warnings.warn(
- '"%s" looks like a URL. Beautiful Soup is not an HTTP client. You should probably use an HTTP client to get the document behind the URL, and feed that document to Beautiful Soup.' % markup)
-
- for (self.markup, self.original_encoding, self.declared_html_encoding,
- self.contains_replacement_characters) in (
- self.builder.prepare_markup(markup, from_encoding)):
- self.reset()
- try:
- self._feed()
- break
- except ParserRejectedMarkup:
- pass
-
- # Clear out the markup and remove the builder's circular
- # reference to this object.
- self.markup = None
- self.builder.soup = None
-
- def _feed(self):
- # Convert the document to Unicode.
- self.builder.reset()
-
- self.builder.feed(self.markup)
- # Close out any unfinished strings and close all the open tags.
- self.endData()
- while self.currentTag.name != self.ROOT_TAG_NAME:
- self.popTag()
-
- def reset(self):
- Tag.__init__(self, self, self.builder, self.ROOT_TAG_NAME)
- self.hidden = 1
- self.builder.reset()
- self.current_data = []
- self.currentTag = None
- self.tagStack = []
- self.preserve_whitespace_tag_stack = []
- self.pushTag(self)
-
- def new_tag(self, name, namespace=None, nsprefix=None, **attrs):
- """Create a new tag associated with this soup."""
- return Tag(None, self.builder, name, namespace, nsprefix, attrs)
-
- def new_string(self, s, subclass=NavigableString):
- """Create a new NavigableString associated with this soup."""
- navigable = subclass(s)
- navigable.setup()
- return navigable
-
- def insert_before(self, successor):
- raise NotImplementedError("BeautifulSoup objects don't support insert_before().")
-
- def insert_after(self, successor):
- raise NotImplementedError("BeautifulSoup objects don't support insert_after().")
-
- def popTag(self):
- tag = self.tagStack.pop()
- if self.preserve_whitespace_tag_stack and tag == self.preserve_whitespace_tag_stack[-1]:
- self.preserve_whitespace_tag_stack.pop()
- #print "Pop", tag.name
- if self.tagStack:
- self.currentTag = self.tagStack[-1]
- return self.currentTag
-
- def pushTag(self, tag):
- #print "Push", tag.name
- if self.currentTag:
- self.currentTag.contents.append(tag)
- self.tagStack.append(tag)
- self.currentTag = self.tagStack[-1]
- if tag.name in self.builder.preserve_whitespace_tags:
- self.preserve_whitespace_tag_stack.append(tag)
-
- def endData(self, containerClass=NavigableString):
- if self.current_data:
- current_data = u''.join(self.current_data)
- # If whitespace is not preserved, and this string contains
- # nothing but ASCII spaces, replace it with a single space
- # or newline.
- if not self.preserve_whitespace_tag_stack:
- strippable = True
- for i in current_data:
- if i not in self.ASCII_SPACES:
- strippable = False
- break
- if strippable:
- if '\n' in current_data:
- current_data = '\n'
- else:
- current_data = ' '
-
- # Reset the data collector.
- self.current_data = []
-
- # Should we add this string to the tree at all?
- if self.parse_only and len(self.tagStack) <= 1 and \
- (not self.parse_only.text or \
- not self.parse_only.search(current_data)):
- return
-
- o = containerClass(current_data)
- self.object_was_parsed(o)
-
- def object_was_parsed(self, o, parent=None, most_recent_element=None):
- """Add an object to the parse tree."""
- parent = parent or self.currentTag
- most_recent_element = most_recent_element or self._most_recent_element
- o.setup(parent, most_recent_element)
-
- if most_recent_element is not None:
- most_recent_element.next_element = o
- self._most_recent_element = o
- parent.contents.append(o)
-
- def _popToTag(self, name, nsprefix=None, inclusivePop=True):
- """Pops the tag stack up to and including the most recent
- instance of the given tag. If inclusivePop is false, pops the tag
- stack up to but *not* including the most recent instqance of
- the given tag."""
- #print "Popping to %s" % name
- if name == self.ROOT_TAG_NAME:
- # The BeautifulSoup object itself can never be popped.
- return
-
- most_recently_popped = None
-
- stack_size = len(self.tagStack)
- for i in range(stack_size - 1, 0, -1):
- t = self.tagStack[i]
- if (name == t.name and nsprefix == t.prefix):
- if inclusivePop:
- most_recently_popped = self.popTag()
- break
- most_recently_popped = self.popTag()
-
- return most_recently_popped
-
- def handle_starttag(self, name, namespace, nsprefix, attrs):
- """Push a start tag on to the stack.
-
- If this method returns None, the tag was rejected by the
- SoupStrainer. You should proceed as if the tag had not occured
- in the document. For instance, if this was a self-closing tag,
- don't call handle_endtag.
- """
-
- # print "Start tag %s: %s" % (name, attrs)
- self.endData()
-
- if (self.parse_only and len(self.tagStack) <= 1
- and (self.parse_only.text
- or not self.parse_only.search_tag(name, attrs))):
- return None
-
- tag = Tag(self, self.builder, name, namespace, nsprefix, attrs,
- self.currentTag, self._most_recent_element)
- if tag is None:
- return tag
- if self._most_recent_element:
- self._most_recent_element.next_element = tag
- self._most_recent_element = tag
- self.pushTag(tag)
- return tag
-
- def handle_endtag(self, name, nsprefix=None):
- #print "End tag: " + name
- self.endData()
- self._popToTag(name, nsprefix)
-
- def handle_data(self, data):
- self.current_data.append(data)
-
- def decode(self, pretty_print=False,
- eventual_encoding=DEFAULT_OUTPUT_ENCODING,
- formatter="minimal"):
- """Returns a string or Unicode representation of this document.
- To get Unicode, pass None for encoding."""
-
- if self.is_xml:
- # Print the XML declaration
- encoding_part = ''
- if eventual_encoding != None:
- encoding_part = ' encoding="%s"' % eventual_encoding
- prefix = u'<?xml version="1.0"%s?>\n' % encoding_part
- else:
- prefix = u''
- if not pretty_print:
- indent_level = None
- else:
- indent_level = 0
- return prefix + super(BeautifulSoup, self).decode(
- indent_level, eventual_encoding, formatter)
-
-# Alias to make it easier to type import: 'from bs4 import _soup'
-_s = BeautifulSoup
-_soup = BeautifulSoup
-
-class BeautifulStoneSoup(BeautifulSoup):
- """Deprecated interface to an XML parser."""
-
- def __init__(self, *args, **kwargs):
- kwargs['features'] = 'xml'
- warnings.warn(
- 'The BeautifulStoneSoup class is deprecated. Instead of using '
- 'it, pass features="xml" into the BeautifulSoup constructor.')
- super(BeautifulStoneSoup, self).__init__(*args, **kwargs)
-
-
-class StopParsing(Exception):
- pass
-
-class FeatureNotFound(ValueError):
- pass
-
-
-#By default, act as an HTML pretty-printer.
-if __name__ == '__main__':
- import sys
- soup = BeautifulSoup(sys.stdin)
- print soup.prettify()
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/__init__.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/__init__.py
deleted file mode 100644
index 740f5f29cd7..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/__init__.py
+++ /dev/null
@@ -1,321 +0,0 @@
-from collections import defaultdict
-import itertools
-import sys
-from bs4.element import (
- CharsetMetaAttributeValue,
- ContentMetaAttributeValue,
- whitespace_re
- )
-
-__all__ = [
- 'HTMLTreeBuilder',
- 'SAXTreeBuilder',
- 'TreeBuilder',
- 'TreeBuilderRegistry',
- ]
-
-# Some useful features for a TreeBuilder to have.
-FAST = 'fast'
-PERMISSIVE = 'permissive'
-STRICT = 'strict'
-XML = 'xml'
-HTML = 'html'
-HTML_5 = 'html5'
-
-
-class TreeBuilderRegistry(object):
-
- def __init__(self):
- self.builders_for_feature = defaultdict(list)
- self.builders = []
-
- def register(self, treebuilder_class):
- """Register a treebuilder based on its advertised features."""
- for feature in treebuilder_class.features:
- self.builders_for_feature[feature].insert(0, treebuilder_class)
- self.builders.insert(0, treebuilder_class)
-
- def lookup(self, *features):
- if len(self.builders) == 0:
- # There are no builders at all.
- return None
-
- if len(features) == 0:
- # They didn't ask for any features. Give them the most
- # recently registered builder.
- return self.builders[0]
-
- # Go down the list of features in order, and eliminate any builders
- # that don't match every feature.
- features = list(features)
- features.reverse()
- candidates = None
- candidate_set = None
- while len(features) > 0:
- feature = features.pop()
- we_have_the_feature = self.builders_for_feature.get(feature, [])
- if len(we_have_the_feature) > 0:
- if candidates is None:
- candidates = we_have_the_feature
- candidate_set = set(candidates)
- else:
- # Eliminate any candidates that don't have this feature.
- candidate_set = candidate_set.intersection(
- set(we_have_the_feature))
-
- # The only valid candidates are the ones in candidate_set.
- # Go through the original list of candidates and pick the first one
- # that's in candidate_set.
- if candidate_set is None:
- return None
- for candidate in candidates:
- if candidate in candidate_set:
- return candidate
- return None
-
-# The BeautifulSoup class will take feature lists from developers and use them
-# to look up builders in this registry.
-builder_registry = TreeBuilderRegistry()
-
-class TreeBuilder(object):
- """Turn a document into a Beautiful Soup object tree."""
-
- features = []
-
- is_xml = False
- preserve_whitespace_tags = set()
- empty_element_tags = None # A tag will be considered an empty-element
- # tag when and only when it has no contents.
-
- # A value for these tag/attribute combinations is a space- or
- # comma-separated list of CDATA, rather than a single CDATA.
- cdata_list_attributes = {}
-
-
- def __init__(self):
- self.soup = None
-
- def reset(self):
- pass
-
- def can_be_empty_element(self, tag_name):
- """Might a tag with this name be an empty-element tag?
-
- The final markup may or may not actually present this tag as
- self-closing.
-
- For instance: an HTMLBuilder does not consider a <p> tag to be
- an empty-element tag (it's not in
- HTMLBuilder.empty_element_tags). This means an empty <p> tag
- will be presented as "<p></p>", not "<p />".
-
- The default implementation has no opinion about which tags are
- empty-element tags, so a tag will be presented as an
- empty-element tag if and only if it has no contents.
- "<foo></foo>" will become "<foo />", and "<foo>bar</foo>" will
- be left alone.
- """
- if self.empty_element_tags is None:
- return True
- return tag_name in self.empty_element_tags
-
- def feed(self, markup):
- raise NotImplementedError()
-
- def prepare_markup(self, markup, user_specified_encoding=None,
- document_declared_encoding=None):
- return markup, None, None, False
-
- def test_fragment_to_document(self, fragment):
- """Wrap an HTML fragment to make it look like a document.
-
- Different parsers do this differently. For instance, lxml
- introduces an empty <head> tag, and html5lib
- doesn't. Abstracting this away lets us write simple tests
- which run HTML fragments through the parser and compare the
- results against other HTML fragments.
-
- This method should not be used outside of tests.
- """
- return fragment
-
- def set_up_substitutions(self, tag):
- return False
-
- def _replace_cdata_list_attribute_values(self, tag_name, attrs):
- """Replaces class="foo bar" with class=["foo", "bar"]
-
- Modifies its input in place.
- """
- if not attrs:
- return attrs
- if self.cdata_list_attributes:
- universal = self.cdata_list_attributes.get('*', [])
- tag_specific = self.cdata_list_attributes.get(
- tag_name.lower(), None)
- for attr in attrs.keys():
- if attr in universal or (tag_specific and attr in tag_specific):
- # We have a "class"-type attribute whose string
- # value is a whitespace-separated list of
- # values. Split it into a list.
- value = attrs[attr]
- if isinstance(value, basestring):
- values = whitespace_re.split(value)
- else:
- # html5lib sometimes calls setAttributes twice
- # for the same tag when rearranging the parse
- # tree. On the second call the attribute value
- # here is already a list. If this happens,
- # leave the value alone rather than trying to
- # split it again.
- values = value
- attrs[attr] = values
- return attrs
-
-class SAXTreeBuilder(TreeBuilder):
- """A Beautiful Soup treebuilder that listens for SAX events."""
-
- def feed(self, markup):
- raise NotImplementedError()
-
- def close(self):
- pass
-
- def startElement(self, name, attrs):
- attrs = dict((key[1], value) for key, value in list(attrs.items()))
- #print "Start %s, %r" % (name, attrs)
- self.soup.handle_starttag(name, attrs)
-
- def endElement(self, name):
- #print "End %s" % name
- self.soup.handle_endtag(name)
-
- def startElementNS(self, nsTuple, nodeName, attrs):
- # Throw away (ns, nodeName) for now.
- self.startElement(nodeName, attrs)
-
- def endElementNS(self, nsTuple, nodeName):
- # Throw away (ns, nodeName) for now.
- self.endElement(nodeName)
- #handler.endElementNS((ns, node.nodeName), node.nodeName)
-
- def startPrefixMapping(self, prefix, nodeValue):
- # Ignore the prefix for now.
- pass
-
- def endPrefixMapping(self, prefix):
- # Ignore the prefix for now.
- # handler.endPrefixMapping(prefix)
- pass
-
- def characters(self, content):
- self.soup.handle_data(content)
-
- def startDocument(self):
- pass
-
- def endDocument(self):
- pass
-
-
-class HTMLTreeBuilder(TreeBuilder):
- """This TreeBuilder knows facts about HTML.
-
- Such as which tags are empty-element tags.
- """
-
- preserve_whitespace_tags = set(['pre', 'textarea'])
- empty_element_tags = set(['br' , 'hr', 'input', 'img', 'meta',
- 'spacer', 'link', 'frame', 'base'])
-
- # The HTML standard defines these attributes as containing a
- # space-separated list of values, not a single value. That is,
- # class="foo bar" means that the 'class' attribute has two values,
- # 'foo' and 'bar', not the single value 'foo bar'. When we
- # encounter one of these attributes, we will parse its value into
- # a list of values if possible. Upon output, the list will be
- # converted back into a string.
- cdata_list_attributes = {
- "*" : ['class', 'accesskey', 'dropzone'],
- "a" : ['rel', 'rev'],
- "link" : ['rel', 'rev'],
- "td" : ["headers"],
- "th" : ["headers"],
- "td" : ["headers"],
- "form" : ["accept-charset"],
- "object" : ["archive"],
-
- # These are HTML5 specific, as are *.accesskey and *.dropzone above.
- "area" : ["rel"],
- "icon" : ["sizes"],
- "iframe" : ["sandbox"],
- "output" : ["for"],
- }
-
- def set_up_substitutions(self, tag):
- # We are only interested in <meta> tags
- if tag.name != 'meta':
- return False
-
- http_equiv = tag.get('http-equiv')
- content = tag.get('content')
- charset = tag.get('charset')
-
- # We are interested in <meta> tags that say what encoding the
- # document was originally in. This means HTML 5-style <meta>
- # tags that provide the "charset" attribute. It also means
- # HTML 4-style <meta> tags that provide the "content"
- # attribute and have "http-equiv" set to "content-type".
- #
- # In both cases we will replace the value of the appropriate
- # attribute with a standin object that can take on any
- # encoding.
- meta_encoding = None
- if charset is not None:
- # HTML 5 style:
- # <meta charset="utf8">
- meta_encoding = charset
- tag['charset'] = CharsetMetaAttributeValue(charset)
-
- elif (content is not None and http_equiv is not None
- and http_equiv.lower() == 'content-type'):
- # HTML 4 style:
- # <meta http-equiv="content-type" content="text/html; charset=utf8">
- tag['content'] = ContentMetaAttributeValue(content)
-
- return (meta_encoding is not None)
-
-def register_treebuilders_from(module):
- """Copy TreeBuilders from the given module into this module."""
- # I'm fairly sure this is not the best way to do this.
- this_module = sys.modules['bs4.builder']
- for name in module.__all__:
- obj = getattr(module, name)
-
- if issubclass(obj, TreeBuilder):
- setattr(this_module, name, obj)
- this_module.__all__.append(name)
- # Register the builder while we're at it.
- this_module.builder_registry.register(obj)
-
-class ParserRejectedMarkup(Exception):
- pass
-
-# Builders are registered in reverse order of priority, so that custom
-# builder registrations will take precedence. In general, we want lxml
-# to take precedence over html5lib, because it's faster. And we only
-# want to use HTMLParser as a last result.
-from . import _htmlparser
-register_treebuilders_from(_htmlparser)
-try:
- from . import _html5lib
- register_treebuilders_from(_html5lib)
-except ImportError:
- # They don't have html5lib installed.
- pass
-try:
- from . import _lxml
- register_treebuilders_from(_lxml)
-except ImportError:
- # They don't have lxml installed.
- pass
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_html5lib.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_html5lib.py
deleted file mode 100644
index 7de36ae75e4..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_html5lib.py
+++ /dev/null
@@ -1,285 +0,0 @@
-__all__ = [
- 'HTML5TreeBuilder',
- ]
-
-import warnings
-from bs4.builder import (
- PERMISSIVE,
- HTML,
- HTML_5,
- HTMLTreeBuilder,
- )
-from bs4.element import NamespacedAttribute
-import html5lib
-from html5lib.constants import namespaces
-from bs4.element import (
- Comment,
- Doctype,
- NavigableString,
- Tag,
- )
-
-class HTML5TreeBuilder(HTMLTreeBuilder):
- """Use html5lib to build a tree."""
-
- features = ['html5lib', PERMISSIVE, HTML_5, HTML]
-
- def prepare_markup(self, markup, user_specified_encoding):
- # Store the user-specified encoding for use later on.
- self.user_specified_encoding = user_specified_encoding
- yield (markup, None, None, False)
-
- # These methods are defined by Beautiful Soup.
- def feed(self, markup):
- if self.soup.parse_only is not None:
- warnings.warn("You provided a value for parse_only, but the html5lib tree builder doesn't support parse_only. The entire document will be parsed.")
- parser = html5lib.HTMLParser(tree=self.create_treebuilder)
- doc = parser.parse(markup, encoding=self.user_specified_encoding)
-
- # Set the character encoding detected by the tokenizer.
- if isinstance(markup, unicode):
- # We need to special-case this because html5lib sets
- # charEncoding to UTF-8 if it gets Unicode input.
- doc.original_encoding = None
- else:
- doc.original_encoding = parser.tokenizer.stream.charEncoding[0]
-
- def create_treebuilder(self, namespaceHTMLElements):
- self.underlying_builder = TreeBuilderForHtml5lib(
- self.soup, namespaceHTMLElements)
- return self.underlying_builder
-
- def test_fragment_to_document(self, fragment):
- """See `TreeBuilder`."""
- return u'<html><head></head><body>%s</body></html>' % fragment
-
-
-class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
-
- def __init__(self, soup, namespaceHTMLElements):
- self.soup = soup
- super(TreeBuilderForHtml5lib, self).__init__(namespaceHTMLElements)
-
- def documentClass(self):
- self.soup.reset()
- return Element(self.soup, self.soup, None)
-
- def insertDoctype(self, token):
- name = token["name"]
- publicId = token["publicId"]
- systemId = token["systemId"]
-
- doctype = Doctype.for_name_and_ids(name, publicId, systemId)
- self.soup.object_was_parsed(doctype)
-
- def elementClass(self, name, namespace):
- tag = self.soup.new_tag(name, namespace)
- return Element(tag, self.soup, namespace)
-
- def commentClass(self, data):
- return TextNode(Comment(data), self.soup)
-
- def fragmentClass(self):
- self.soup = BeautifulSoup("")
- self.soup.name = "[document_fragment]"
- return Element(self.soup, self.soup, None)
-
- def appendChild(self, node):
- # XXX This code is not covered by the BS4 tests.
- self.soup.append(node.element)
-
- def getDocument(self):
- return self.soup
-
- def getFragment(self):
- return html5lib.treebuilders._base.TreeBuilder.getFragment(self).element
-
-class AttrList(object):
- def __init__(self, element):
- self.element = element
- self.attrs = dict(self.element.attrs)
- def __iter__(self):
- return list(self.attrs.items()).__iter__()
- def __setitem__(self, name, value):
- "set attr", name, value
- self.element[name] = value
- def items(self):
- return list(self.attrs.items())
- def keys(self):
- return list(self.attrs.keys())
- def __len__(self):
- return len(self.attrs)
- def __getitem__(self, name):
- return self.attrs[name]
- def __contains__(self, name):
- return name in list(self.attrs.keys())
-
-
-class Element(html5lib.treebuilders._base.Node):
- def __init__(self, element, soup, namespace):
- html5lib.treebuilders._base.Node.__init__(self, element.name)
- self.element = element
- self.soup = soup
- self.namespace = namespace
-
- def appendChild(self, node):
- string_child = child = None
- if isinstance(node, basestring):
- # Some other piece of code decided to pass in a string
- # instead of creating a TextElement object to contain the
- # string.
- string_child = child = node
- elif isinstance(node, Tag):
- # Some other piece of code decided to pass in a Tag
- # instead of creating an Element object to contain the
- # Tag.
- child = node
- elif node.element.__class__ == NavigableString:
- string_child = child = node.element
- else:
- child = node.element
-
- if not isinstance(child, basestring) and child.parent is not None:
- node.element.extract()
-
- if (string_child and self.element.contents
- and self.element.contents[-1].__class__ == NavigableString):
- # We are appending a string onto another string.
- # TODO This has O(n^2) performance, for input like
- # "a</a>a</a>a</a>..."
- old_element = self.element.contents[-1]
- new_element = self.soup.new_string(old_element + string_child)
- old_element.replace_with(new_element)
- self.soup._most_recent_element = new_element
- else:
- if isinstance(node, basestring):
- # Create a brand new NavigableString from this string.
- child = self.soup.new_string(node)
-
- # Tell Beautiful Soup to act as if it parsed this element
- # immediately after the parent's last descendant. (Or
- # immediately after the parent, if it has no children.)
- if self.element.contents:
- most_recent_element = self.element._last_descendant(False)
- else:
- most_recent_element = self.element
-
- self.soup.object_was_parsed(
- child, parent=self.element,
- most_recent_element=most_recent_element)
-
- def getAttributes(self):
- return AttrList(self.element)
-
- def setAttributes(self, attributes):
- if attributes is not None and len(attributes) > 0:
-
- converted_attributes = []
- for name, value in list(attributes.items()):
- if isinstance(name, tuple):
- new_name = NamespacedAttribute(*name)
- del attributes[name]
- attributes[new_name] = value
-
- self.soup.builder._replace_cdata_list_attribute_values(
- self.name, attributes)
- for name, value in attributes.items():
- self.element[name] = value
-
- # The attributes may contain variables that need substitution.
- # Call set_up_substitutions manually.
- #
- # The Tag constructor called this method when the Tag was created,
- # but we just set/changed the attributes, so call it again.
- self.soup.builder.set_up_substitutions(self.element)
- attributes = property(getAttributes, setAttributes)
-
- def insertText(self, data, insertBefore=None):
- if insertBefore:
- text = TextNode(self.soup.new_string(data), self.soup)
- self.insertBefore(data, insertBefore)
- else:
- self.appendChild(data)
-
- def insertBefore(self, node, refNode):
- index = self.element.index(refNode.element)
- if (node.element.__class__ == NavigableString and self.element.contents
- and self.element.contents[index-1].__class__ == NavigableString):
- # (See comments in appendChild)
- old_node = self.element.contents[index-1]
- new_str = self.soup.new_string(old_node + node.element)
- old_node.replace_with(new_str)
- else:
- self.element.insert(index, node.element)
- node.parent = self
-
- def removeChild(self, node):
- node.element.extract()
-
- def reparentChildren(self, new_parent):
- """Move all of this tag's children into another tag."""
- element = self.element
- new_parent_element = new_parent.element
- # Determine what this tag's next_element will be once all the children
- # are removed.
- final_next_element = element.next_sibling
-
- new_parents_last_descendant = new_parent_element._last_descendant(False, False)
- if len(new_parent_element.contents) > 0:
- # The new parent already contains children. We will be
- # appending this tag's children to the end.
- new_parents_last_child = new_parent_element.contents[-1]
- new_parents_last_descendant_next_element = new_parents_last_descendant.next_element
- else:
- # The new parent contains no children.
- new_parents_last_child = None
- new_parents_last_descendant_next_element = new_parent_element.next_element
-
- to_append = element.contents
- append_after = new_parent.element.contents
- if len(to_append) > 0:
- # Set the first child's previous_element and previous_sibling
- # to elements within the new parent
- first_child = to_append[0]
- first_child.previous_element = new_parents_last_descendant
- first_child.previous_sibling = new_parents_last_child
-
- # Fix the last child's next_element and next_sibling
- last_child = to_append[-1]
- last_child.next_element = new_parents_last_descendant_next_element
- last_child.next_sibling = None
-
- for child in to_append:
- child.parent = new_parent_element
- new_parent_element.contents.append(child)
-
- # Now that this element has no children, change its .next_element.
- element.contents = []
- element.next_element = final_next_element
-
- def cloneNode(self):
- tag = self.soup.new_tag(self.element.name, self.namespace)
- node = Element(tag, self.soup, self.namespace)
- for key,value in self.attributes:
- node.attributes[key] = value
- return node
-
- def hasContent(self):
- return self.element.contents
-
- def getNameTuple(self):
- if self.namespace == None:
- return namespaces["html"], self.name
- else:
- return self.namespace, self.name
-
- nameTuple = property(getNameTuple)
-
-class TextNode(Element):
- def __init__(self, element, soup):
- html5lib.treebuilders._base.Node.__init__(self, None)
- self.element = element
- self.soup = soup
-
- def cloneNode(self):
- raise NotImplementedError
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_htmlparser.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_htmlparser.py
deleted file mode 100644
index ca8d8b892bf..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_htmlparser.py
+++ /dev/null
@@ -1,258 +0,0 @@
-"""Use the HTMLParser library to parse HTML files that aren't too bad."""
-
-__all__ = [
- 'HTMLParserTreeBuilder',
- ]
-
-from HTMLParser import (
- HTMLParser,
- HTMLParseError,
- )
-import sys
-import warnings
-
-# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
-# argument, which we'd like to set to False. Unfortunately,
-# http://bugs.python.org/issue13273 makes strict=True a better bet
-# before Python 3.2.3.
-#
-# At the end of this file, we monkeypatch HTMLParser so that
-# strict=True works well on Python 3.2.2.
-major, minor, release = sys.version_info[:3]
-CONSTRUCTOR_TAKES_STRICT = (
- major > 3
- or (major == 3 and minor > 2)
- or (major == 3 and minor == 2 and release >= 3))
-
-from bs4.element import (
- CData,
- Comment,
- Declaration,
- Doctype,
- ProcessingInstruction,
- )
-from bs4.dammit import EntitySubstitution, UnicodeDammit
-
-from bs4.builder import (
- HTML,
- HTMLTreeBuilder,
- STRICT,
- )
-
-
-HTMLPARSER = 'html.parser'
-
-class BeautifulSoupHTMLParser(HTMLParser):
- def handle_starttag(self, name, attrs):
- # XXX namespace
- attr_dict = {}
- for key, value in attrs:
- # Change None attribute values to the empty string
- # for consistency with the other tree builders.
- if value is None:
- value = ''
- attr_dict[key] = value
- attrvalue = '""'
- self.soup.handle_starttag(name, None, None, attr_dict)
-
- def handle_endtag(self, name):
- self.soup.handle_endtag(name)
-
- def handle_data(self, data):
- self.soup.handle_data(data)
-
- def handle_charref(self, name):
- # XXX workaround for a bug in HTMLParser. Remove this once
- # it's fixed.
- if name.startswith('x'):
- real_name = int(name.lstrip('x'), 16)
- elif name.startswith('X'):
- real_name = int(name.lstrip('X'), 16)
- else:
- real_name = int(name)
-
- try:
- data = unichr(real_name)
- except (ValueError, OverflowError), e:
- data = u"\N{REPLACEMENT CHARACTER}"
-
- self.handle_data(data)
-
- def handle_entityref(self, name):
- character = EntitySubstitution.HTML_ENTITY_TO_CHARACTER.get(name)
- if character is not None:
- data = character
- else:
- data = "&%s;" % name
- self.handle_data(data)
-
- def handle_comment(self, data):
- self.soup.endData()
- self.soup.handle_data(data)
- self.soup.endData(Comment)
-
- def handle_decl(self, data):
- self.soup.endData()
- if data.startswith("DOCTYPE "):
- data = data[len("DOCTYPE "):]
- elif data == 'DOCTYPE':
- # i.e. "<!DOCTYPE>"
- data = ''
- self.soup.handle_data(data)
- self.soup.endData(Doctype)
-
- def unknown_decl(self, data):
- if data.upper().startswith('CDATA['):
- cls = CData
- data = data[len('CDATA['):]
- else:
- cls = Declaration
- self.soup.endData()
- self.soup.handle_data(data)
- self.soup.endData(cls)
-
- def handle_pi(self, data):
- self.soup.endData()
- if data.endswith("?") and data.lower().startswith("xml"):
- # "An XHTML processing instruction using the trailing '?'
- # will cause the '?' to be included in data." - HTMLParser
- # docs.
- #
- # Strip the question mark so we don't end up with two
- # question marks.
- data = data[:-1]
- self.soup.handle_data(data)
- self.soup.endData(ProcessingInstruction)
-
-
-class HTMLParserTreeBuilder(HTMLTreeBuilder):
-
- is_xml = False
- features = [HTML, STRICT, HTMLPARSER]
-
- def __init__(self, *args, **kwargs):
- if CONSTRUCTOR_TAKES_STRICT:
- kwargs['strict'] = False
- self.parser_args = (args, kwargs)
-
- def prepare_markup(self, markup, user_specified_encoding=None,
- document_declared_encoding=None):
- """
- :return: A 4-tuple (markup, original encoding, encoding
- declared within markup, whether any characters had to be
- replaced with REPLACEMENT CHARACTER).
- """
- if isinstance(markup, unicode):
- yield (markup, None, None, False)
- return
-
- try_encodings = [user_specified_encoding, document_declared_encoding]
- dammit = UnicodeDammit(markup, try_encodings, is_html=True)
- yield (dammit.markup, dammit.original_encoding,
- dammit.declared_html_encoding,
- dammit.contains_replacement_characters)
-
- def feed(self, markup):
- args, kwargs = self.parser_args
- parser = BeautifulSoupHTMLParser(*args, **kwargs)
- parser.soup = self.soup
- try:
- parser.feed(markup)
- except HTMLParseError, e:
- warnings.warn(RuntimeWarning(
- "Python's built-in HTMLParser cannot parse the given document. This is not a bug in Beautiful Soup. The best solution is to install an external parser (lxml or html5lib), and use Beautiful Soup with that parser. See http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser for help."))
- raise e
-
-# Patch 3.2 versions of HTMLParser earlier than 3.2.3 to use some
-# 3.2.3 code. This ensures they don't treat markup like <p></p> as a
-# string.
-#
-# XXX This code can be removed once most Python 3 users are on 3.2.3.
-if major == 3 and minor == 2 and not CONSTRUCTOR_TAKES_STRICT:
- import re
- attrfind_tolerant = re.compile(
- r'\s*((?<=[\'"\s])[^\s/>][^\s/=>]*)(\s*=+\s*'
- r'(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?')
- HTMLParserTreeBuilder.attrfind_tolerant = attrfind_tolerant
-
- locatestarttagend = re.compile(r"""
- <[a-zA-Z][-.a-zA-Z0-9:_]* # tag name
- (?:\s+ # whitespace before attribute name
- (?:[a-zA-Z_][-.:a-zA-Z0-9_]* # attribute name
- (?:\s*=\s* # value indicator
- (?:'[^']*' # LITA-enclosed value
- |\"[^\"]*\" # LIT-enclosed value
- |[^'\">\s]+ # bare value
- )
- )?
- )
- )*
- \s* # trailing whitespace
-""", re.VERBOSE)
- BeautifulSoupHTMLParser.locatestarttagend = locatestarttagend
-
- from html.parser import tagfind, attrfind
-
- def parse_starttag(self, i):
- self.__starttag_text = None
- endpos = self.check_for_whole_start_tag(i)
- if endpos < 0:
- return endpos
- rawdata = self.rawdata
- self.__starttag_text = rawdata[i:endpos]
-
- # Now parse the data between i+1 and j into a tag and attrs
- attrs = []
- match = tagfind.match(rawdata, i+1)
- assert match, 'unexpected call to parse_starttag()'
- k = match.end()
- self.lasttag = tag = rawdata[i+1:k].lower()
- while k < endpos:
- if self.strict:
- m = attrfind.match(rawdata, k)
- else:
- m = attrfind_tolerant.match(rawdata, k)
- if not m:
- break
- attrname, rest, attrvalue = m.group(1, 2, 3)
- if not rest:
- attrvalue = None
- elif attrvalue[:1] == '\'' == attrvalue[-1:] or \
- attrvalue[:1] == '"' == attrvalue[-1:]:
- attrvalue = attrvalue[1:-1]
- if attrvalue:
- attrvalue = self.unescape(attrvalue)
- attrs.append((attrname.lower(), attrvalue))
- k = m.end()
-
- end = rawdata[k:endpos].strip()
- if end not in (">", "/>"):
- lineno, offset = self.getpos()
- if "\n" in self.__starttag_text:
- lineno = lineno + self.__starttag_text.count("\n")
- offset = len(self.__starttag_text) \
- - self.__starttag_text.rfind("\n")
- else:
- offset = offset + len(self.__starttag_text)
- if self.strict:
- self.error("junk characters in start tag: %r"
- % (rawdata[k:endpos][:20],))
- self.handle_data(rawdata[i:endpos])
- return endpos
- if end.endswith('/>'):
- # XHTML-style empty tag: <span attr="value" />
- self.handle_startendtag(tag, attrs)
- else:
- self.handle_starttag(tag, attrs)
- if tag in self.CDATA_CONTENT_ELEMENTS:
- self.set_cdata_mode(tag)
- return endpos
-
- def set_cdata_mode(self, elem):
- self.cdata_elem = elem.lower()
- self.interesting = re.compile(r'</\s*%s\s*>' % self.cdata_elem, re.I)
-
- BeautifulSoupHTMLParser.parse_starttag = parse_starttag
- BeautifulSoupHTMLParser.set_cdata_mode = set_cdata_mode
-
- CONSTRUCTOR_TAKES_STRICT = True
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_lxml.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_lxml.py
deleted file mode 100644
index fa5d49875ea..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/builder/_lxml.py
+++ /dev/null
@@ -1,233 +0,0 @@
-__all__ = [
- 'LXMLTreeBuilderForXML',
- 'LXMLTreeBuilder',
- ]
-
-from io import BytesIO
-from StringIO import StringIO
-import collections
-from lxml import etree
-from bs4.element import Comment, Doctype, NamespacedAttribute
-from bs4.builder import (
- FAST,
- HTML,
- HTMLTreeBuilder,
- PERMISSIVE,
- ParserRejectedMarkup,
- TreeBuilder,
- XML)
-from bs4.dammit import EncodingDetector
-
-LXML = 'lxml'
-
-class LXMLTreeBuilderForXML(TreeBuilder):
- DEFAULT_PARSER_CLASS = etree.XMLParser
-
- is_xml = True
-
- # Well, it's permissive by XML parser standards.
- features = [LXML, XML, FAST, PERMISSIVE]
-
- CHUNK_SIZE = 512
-
- # This namespace mapping is specified in the XML Namespace
- # standard.
- DEFAULT_NSMAPS = {'http://www.w3.org/XML/1998/namespace' : "xml"}
-
- def default_parser(self, encoding):
- # This can either return a parser object or a class, which
- # will be instantiated with default arguments.
- if self._default_parser is not None:
- return self._default_parser
- return etree.XMLParser(
- target=self, strip_cdata=False, recover=True, encoding=encoding)
-
- def parser_for(self, encoding):
- # Use the default parser.
- parser = self.default_parser(encoding)
-
- if isinstance(parser, collections.Callable):
- # Instantiate the parser with default arguments
- parser = parser(target=self, strip_cdata=False, encoding=encoding)
- return parser
-
- def __init__(self, parser=None, empty_element_tags=None):
- # TODO: Issue a warning if parser is present but not a
- # callable, since that means there's no way to create new
- # parsers for different encodings.
- self._default_parser = parser
- if empty_element_tags is not None:
- self.empty_element_tags = set(empty_element_tags)
- self.soup = None
- self.nsmaps = [self.DEFAULT_NSMAPS]
-
- def _getNsTag(self, tag):
- # Split the namespace URL out of a fully-qualified lxml tag
- # name. Copied from lxml's src/lxml/sax.py.
- if tag[0] == '{':
- return tuple(tag[1:].split('}', 1))
- else:
- return (None, tag)
-
- def prepare_markup(self, markup, user_specified_encoding=None,
- document_declared_encoding=None):
- """
- :yield: A series of 4-tuples.
- (markup, encoding, declared encoding,
- has undergone character replacement)
-
- Each 4-tuple represents a strategy for parsing the document.
- """
- if isinstance(markup, unicode):
- # We were given Unicode. Maybe lxml can parse Unicode on
- # this system?
- yield markup, None, document_declared_encoding, False
-
- if isinstance(markup, unicode):
- # No, apparently not. Convert the Unicode to UTF-8 and
- # tell lxml to parse it as UTF-8.
- yield (markup.encode("utf8"), "utf8",
- document_declared_encoding, False)
-
- # Instead of using UnicodeDammit to convert the bytestring to
- # Unicode using different encodings, use EncodingDetector to
- # iterate over the encodings, and tell lxml to try to parse
- # the document as each one in turn.
- is_html = not self.is_xml
- try_encodings = [user_specified_encoding, document_declared_encoding]
- detector = EncodingDetector(markup, try_encodings, is_html)
- for encoding in detector.encodings:
- yield (detector.markup, encoding, document_declared_encoding, False)
-
- def feed(self, markup):
- if isinstance(markup, bytes):
- markup = BytesIO(markup)
- elif isinstance(markup, unicode):
- markup = StringIO(markup)
-
- # Call feed() at least once, even if the markup is empty,
- # or the parser won't be initialized.
- data = markup.read(self.CHUNK_SIZE)
- try:
- self.parser = self.parser_for(self.soup.original_encoding)
- self.parser.feed(data)
- while len(data) != 0:
- # Now call feed() on the rest of the data, chunk by chunk.
- data = markup.read(self.CHUNK_SIZE)
- if len(data) != 0:
- self.parser.feed(data)
- self.parser.close()
- except (UnicodeDecodeError, LookupError, etree.ParserError), e:
- raise ParserRejectedMarkup(str(e))
-
- def close(self):
- self.nsmaps = [self.DEFAULT_NSMAPS]
-
- def start(self, name, attrs, nsmap={}):
- # Make sure attrs is a mutable dict--lxml may send an immutable dictproxy.
- attrs = dict(attrs)
- nsprefix = None
- # Invert each namespace map as it comes in.
- if len(self.nsmaps) > 1:
- # There are no new namespaces for this tag, but
- # non-default namespaces are in play, so we need a
- # separate tag stack to know when they end.
- self.nsmaps.append(None)
- elif len(nsmap) > 0:
- # A new namespace mapping has come into play.
- inverted_nsmap = dict((value, key) for key, value in nsmap.items())
- self.nsmaps.append(inverted_nsmap)
- # Also treat the namespace mapping as a set of attributes on the
- # tag, so we can recreate it later.
- attrs = attrs.copy()
- for prefix, namespace in nsmap.items():
- attribute = NamespacedAttribute(
- "xmlns", prefix, "http://www.w3.org/2000/xmlns/")
- attrs[attribute] = namespace
-
- # Namespaces are in play. Find any attributes that came in
- # from lxml with namespaces attached to their names, and
- # turn then into NamespacedAttribute objects.
- new_attrs = {}
- for attr, value in attrs.items():
- namespace, attr = self._getNsTag(attr)
- if namespace is None:
- new_attrs[attr] = value
- else:
- nsprefix = self._prefix_for_namespace(namespace)
- attr = NamespacedAttribute(nsprefix, attr, namespace)
- new_attrs[attr] = value
- attrs = new_attrs
-
- namespace, name = self._getNsTag(name)
- nsprefix = self._prefix_for_namespace(namespace)
- self.soup.handle_starttag(name, namespace, nsprefix, attrs)
-
- def _prefix_for_namespace(self, namespace):
- """Find the currently active prefix for the given namespace."""
- if namespace is None:
- return None
- for inverted_nsmap in reversed(self.nsmaps):
- if inverted_nsmap is not None and namespace in inverted_nsmap:
- return inverted_nsmap[namespace]
- return None
-
- def end(self, name):
- self.soup.endData()
- completed_tag = self.soup.tagStack[-1]
- namespace, name = self._getNsTag(name)
- nsprefix = None
- if namespace is not None:
- for inverted_nsmap in reversed(self.nsmaps):
- if inverted_nsmap is not None and namespace in inverted_nsmap:
- nsprefix = inverted_nsmap[namespace]
- break
- self.soup.handle_endtag(name, nsprefix)
- if len(self.nsmaps) > 1:
- # This tag, or one of its parents, introduced a namespace
- # mapping, so pop it off the stack.
- self.nsmaps.pop()
-
- def pi(self, target, data):
- pass
-
- def data(self, content):
- self.soup.handle_data(content)
-
- def doctype(self, name, pubid, system):
- self.soup.endData()
- doctype = Doctype.for_name_and_ids(name, pubid, system)
- self.soup.object_was_parsed(doctype)
-
- def comment(self, content):
- "Handle comments as Comment objects."
- self.soup.endData()
- self.soup.handle_data(content)
- self.soup.endData(Comment)
-
- def test_fragment_to_document(self, fragment):
- """See `TreeBuilder`."""
- return u'<?xml version="1.0" encoding="utf-8"?>\n%s' % fragment
-
-
-class LXMLTreeBuilder(HTMLTreeBuilder, LXMLTreeBuilderForXML):
-
- features = [LXML, HTML, FAST, PERMISSIVE]
- is_xml = False
-
- def default_parser(self, encoding):
- return etree.HTMLParser
-
- def feed(self, markup):
- encoding = self.soup.original_encoding
- try:
- self.parser = self.parser_for(encoding)
- self.parser.feed(markup)
- self.parser.close()
- except (UnicodeDecodeError, LookupError, etree.ParserError), e:
- raise ParserRejectedMarkup(str(e))
-
-
- def test_fragment_to_document(self, fragment):
- """See `TreeBuilder`."""
- return u'<html><body>%s</body></html>' % fragment
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/dammit.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/dammit.py
deleted file mode 100644
index 59640b7ce3a..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/dammit.py
+++ /dev/null
@@ -1,829 +0,0 @@
-# -*- coding: utf-8 -*-
-"""Beautiful Soup bonus library: Unicode, Dammit
-
-This library converts a bytestream to Unicode through any means
-necessary. It is heavily based on code from Mark Pilgrim's Universal
-Feed Parser. It works best on XML and XML, but it does not rewrite the
-XML or HTML to reflect a new encoding; that's the tree builder's job.
-"""
-
-import codecs
-from htmlentitydefs import codepoint2name
-import re
-import logging
-import string
-
-# Import a library to autodetect character encodings.
-chardet_type = None
-try:
- # First try the fast C implementation.
- # PyPI package: cchardet
- import cchardet
- def chardet_dammit(s):
- return cchardet.detect(s)['encoding']
-except ImportError:
- try:
- # Fall back to the pure Python implementation
- # Debian package: python-chardet
- # PyPI package: chardet
- import chardet
- def chardet_dammit(s):
- return chardet.detect(s)['encoding']
- #import chardet.constants
- #chardet.constants._debug = 1
- except ImportError:
- # No chardet available.
- def chardet_dammit(s):
- return None
-
-# Available from http://cjkpython.i18n.org/.
-try:
- import iconv_codec
-except ImportError:
- pass
-
-xml_encoding_re = re.compile(
- '^<\?.*encoding=[\'"](.*?)[\'"].*\?>'.encode(), re.I)
-html_meta_re = re.compile(
- '<\s*meta[^>]+charset\s*=\s*["\']?([^>]*?)[ /;\'">]'.encode(), re.I)
-
-class EntitySubstitution(object):
-
- """Substitute XML or HTML entities for the corresponding characters."""
-
- def _populate_class_variables():
- lookup = {}
- reverse_lookup = {}
- characters_for_re = []
- for codepoint, name in list(codepoint2name.items()):
- character = unichr(codepoint)
- if codepoint != 34:
- # There's no point in turning the quotation mark into
- # &quot;, unless it happens within an attribute value, which
- # is handled elsewhere.
- characters_for_re.append(character)
- lookup[character] = name
- # But we do want to turn &quot; into the quotation mark.
- reverse_lookup[name] = character
- re_definition = "[%s]" % "".join(characters_for_re)
- return lookup, reverse_lookup, re.compile(re_definition)
- (CHARACTER_TO_HTML_ENTITY, HTML_ENTITY_TO_CHARACTER,
- CHARACTER_TO_HTML_ENTITY_RE) = _populate_class_variables()
-
- CHARACTER_TO_XML_ENTITY = {
- "'": "apos",
- '"': "quot",
- "&": "amp",
- "<": "lt",
- ">": "gt",
- }
-
- BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|"
- "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)"
- ")")
-
- AMPERSAND_OR_BRACKET = re.compile("([<>&])")
-
- @classmethod
- def _substitute_html_entity(cls, matchobj):
- entity = cls.CHARACTER_TO_HTML_ENTITY.get(matchobj.group(0))
- return "&%s;" % entity
-
- @classmethod
- def _substitute_xml_entity(cls, matchobj):
- """Used with a regular expression to substitute the
- appropriate XML entity for an XML special character."""
- entity = cls.CHARACTER_TO_XML_ENTITY[matchobj.group(0)]
- return "&%s;" % entity
-
- @classmethod
- def quoted_attribute_value(self, value):
- """Make a value into a quoted XML attribute, possibly escaping it.
-
- Most strings will be quoted using double quotes.
-
- Bob's Bar -> "Bob's Bar"
-
- If a string contains double quotes, it will be quoted using
- single quotes.
-
- Welcome to "my bar" -> 'Welcome to "my bar"'
-
- If a string contains both single and double quotes, the
- double quotes will be escaped, and the string will be quoted
- using double quotes.
-
- Welcome to "Bob's Bar" -> "Welcome to &quot;Bob's bar&quot;
- """
- quote_with = '"'
- if '"' in value:
- if "'" in value:
- # The string contains both single and double
- # quotes. Turn the double quotes into
- # entities. We quote the double quotes rather than
- # the single quotes because the entity name is
- # "&quot;" whether this is HTML or XML. If we
- # quoted the single quotes, we'd have to decide
- # between &apos; and &squot;.
- replace_with = "&quot;"
- value = value.replace('"', replace_with)
- else:
- # There are double quotes but no single quotes.
- # We can use single quotes to quote the attribute.
- quote_with = "'"
- return quote_with + value + quote_with
-
- @classmethod
- def substitute_xml(cls, value, make_quoted_attribute=False):
- """Substitute XML entities for special XML characters.
-
- :param value: A string to be substituted. The less-than sign
- will become &lt;, the greater-than sign will become &gt;,
- and any ampersands will become &amp;. If you want ampersands
- that appear to be part of an entity definition to be left
- alone, use substitute_xml_containing_entities() instead.
-
- :param make_quoted_attribute: If True, then the string will be
- quoted, as befits an attribute value.
- """
- # Escape angle brackets and ampersands.
- value = cls.AMPERSAND_OR_BRACKET.sub(
- cls._substitute_xml_entity, value)
-
- if make_quoted_attribute:
- value = cls.quoted_attribute_value(value)
- return value
-
- @classmethod
- def substitute_xml_containing_entities(
- cls, value, make_quoted_attribute=False):
- """Substitute XML entities for special XML characters.
-
- :param value: A string to be substituted. The less-than sign will
- become &lt;, the greater-than sign will become &gt;, and any
- ampersands that are not part of an entity defition will
- become &amp;.
-
- :param make_quoted_attribute: If True, then the string will be
- quoted, as befits an attribute value.
- """
- # Escape angle brackets, and ampersands that aren't part of
- # entities.
- value = cls.BARE_AMPERSAND_OR_BRACKET.sub(
- cls._substitute_xml_entity, value)
-
- if make_quoted_attribute:
- value = cls.quoted_attribute_value(value)
- return value
-
- @classmethod
- def substitute_html(cls, s):
- """Replace certain Unicode characters with named HTML entities.
-
- This differs from data.encode(encoding, 'xmlcharrefreplace')
- in that the goal is to make the result more readable (to those
- with ASCII displays) rather than to recover from
- errors. There's absolutely nothing wrong with a UTF-8 string
- containg a LATIN SMALL LETTER E WITH ACUTE, but replacing that
- character with "&eacute;" will make it more readable to some
- people.
- """
- return cls.CHARACTER_TO_HTML_ENTITY_RE.sub(
- cls._substitute_html_entity, s)
-
-
-class EncodingDetector:
- """Suggests a number of possible encodings for a bytestring.
-
- Order of precedence:
-
- 1. Encodings you specifically tell EncodingDetector to try first
- (the override_encodings argument to the constructor).
-
- 2. An encoding declared within the bytestring itself, either in an
- XML declaration (if the bytestring is to be interpreted as an XML
- document), or in a <meta> tag (if the bytestring is to be
- interpreted as an HTML document.)
-
- 3. An encoding detected through textual analysis by chardet,
- cchardet, or a similar external library.
-
- 4. UTF-8.
-
- 5. Windows-1252.
- """
- def __init__(self, markup, override_encodings=None, is_html=False):
- self.override_encodings = override_encodings or []
- self.chardet_encoding = None
- self.is_html = is_html
- self.declared_encoding = None
-
- # First order of business: strip a byte-order mark.
- self.markup, self.sniffed_encoding = self.strip_byte_order_mark(markup)
-
- def _usable(self, encoding, tried):
- if encoding is not None:
- encoding = encoding.lower()
- if encoding not in tried:
- tried.add(encoding)
- return True
- return False
-
- @property
- def encodings(self):
- """Yield a number of encodings that might work for this markup."""
- tried = set()
- for e in self.override_encodings:
- if self._usable(e, tried):
- yield e
-
- # Did the document originally start with a byte-order mark
- # that indicated its encoding?
- if self._usable(self.sniffed_encoding, tried):
- yield self.sniffed_encoding
-
- # Look within the document for an XML or HTML encoding
- # declaration.
- if self.declared_encoding is None:
- self.declared_encoding = self.find_declared_encoding(
- self.markup, self.is_html)
- if self._usable(self.declared_encoding, tried):
- yield self.declared_encoding
-
- # Use third-party character set detection to guess at the
- # encoding.
- if self.chardet_encoding is None:
- self.chardet_encoding = chardet_dammit(self.markup)
- if self._usable(self.chardet_encoding, tried):
- yield self.chardet_encoding
-
- # As a last-ditch effort, try utf-8 and windows-1252.
- for e in ('utf-8', 'windows-1252'):
- if self._usable(e, tried):
- yield e
-
- @classmethod
- def strip_byte_order_mark(cls, data):
- """If a byte-order mark is present, strip it and return the encoding it implies."""
- encoding = None
- if (len(data) >= 4) and (data[:2] == b'\xfe\xff') \
- and (data[2:4] != '\x00\x00'):
- encoding = 'utf-16be'
- data = data[2:]
- elif (len(data) >= 4) and (data[:2] == b'\xff\xfe') \
- and (data[2:4] != '\x00\x00'):
- encoding = 'utf-16le'
- data = data[2:]
- elif data[:3] == b'\xef\xbb\xbf':
- encoding = 'utf-8'
- data = data[3:]
- elif data[:4] == b'\x00\x00\xfe\xff':
- encoding = 'utf-32be'
- data = data[4:]
- elif data[:4] == b'\xff\xfe\x00\x00':
- encoding = 'utf-32le'
- data = data[4:]
- return data, encoding
-
- @classmethod
- def find_declared_encoding(cls, markup, is_html=False, search_entire_document=False):
- """Given a document, tries to find its declared encoding.
-
- An XML encoding is declared at the beginning of the document.
-
- An HTML encoding is declared in a <meta> tag, hopefully near the
- beginning of the document.
- """
- if search_entire_document:
- xml_endpos = html_endpos = len(markup)
- else:
- xml_endpos = 1024
- html_endpos = max(2048, int(len(markup) * 0.05))
-
- declared_encoding = None
- declared_encoding_match = xml_encoding_re.search(markup, endpos=xml_endpos)
- if not declared_encoding_match and is_html:
- declared_encoding_match = html_meta_re.search(markup, endpos=html_endpos)
- if declared_encoding_match is not None:
- declared_encoding = declared_encoding_match.groups()[0].decode(
- 'ascii')
- if declared_encoding:
- return declared_encoding.lower()
- return None
-
-class UnicodeDammit:
- """A class for detecting the encoding of a *ML document and
- converting it to a Unicode string. If the source encoding is
- windows-1252, can replace MS smart quotes with their HTML or XML
- equivalents."""
-
- # This dictionary maps commonly seen values for "charset" in HTML
- # meta tags to the corresponding Python codec names. It only covers
- # values that aren't in Python's aliases and can't be determined
- # by the heuristics in find_codec.
- CHARSET_ALIASES = {"macintosh": "mac-roman",
- "x-sjis": "shift-jis"}
-
- ENCODINGS_WITH_SMART_QUOTES = [
- "windows-1252",
- "iso-8859-1",
- "iso-8859-2",
- ]
-
- def __init__(self, markup, override_encodings=[],
- smart_quotes_to=None, is_html=False):
- self.smart_quotes_to = smart_quotes_to
- self.tried_encodings = []
- self.contains_replacement_characters = False
- self.is_html = is_html
-
- self.detector = EncodingDetector(markup, override_encodings, is_html)
-
- # Short-circuit if the data is in Unicode to begin with.
- if isinstance(markup, unicode) or markup == '':
- self.markup = markup
- self.unicode_markup = unicode(markup)
- self.original_encoding = None
- return
-
- # The encoding detector may have stripped a byte-order mark.
- # Use the stripped markup from this point on.
- self.markup = self.detector.markup
-
- u = None
- for encoding in self.detector.encodings:
- markup = self.detector.markup
- u = self._convert_from(encoding)
- if u is not None:
- break
-
- if not u:
- # None of the encodings worked. As an absolute last resort,
- # try them again with character replacement.
-
- for encoding in self.detector.encodings:
- if encoding != "ascii":
- u = self._convert_from(encoding, "replace")
- if u is not None:
- logging.warning(
- "Some characters could not be decoded, and were "
- "replaced with REPLACEMENT CHARACTER.")
- self.contains_replacement_characters = True
- break
-
- # If none of that worked, we could at this point force it to
- # ASCII, but that would destroy so much data that I think
- # giving up is better.
- self.unicode_markup = u
- if not u:
- self.original_encoding = None
-
- def _sub_ms_char(self, match):
- """Changes a MS smart quote character to an XML or HTML
- entity, or an ASCII character."""
- orig = match.group(1)
- if self.smart_quotes_to == 'ascii':
- sub = self.MS_CHARS_TO_ASCII.get(orig).encode()
- else:
- sub = self.MS_CHARS.get(orig)
- if type(sub) == tuple:
- if self.smart_quotes_to == 'xml':
- sub = '&#x'.encode() + sub[1].encode() + ';'.encode()
- else:
- sub = '&'.encode() + sub[0].encode() + ';'.encode()
- else:
- sub = sub.encode()
- return sub
-
- def _convert_from(self, proposed, errors="strict"):
- proposed = self.find_codec(proposed)
- if not proposed or (proposed, errors) in self.tried_encodings:
- return None
- self.tried_encodings.append((proposed, errors))
- markup = self.markup
- # Convert smart quotes to HTML if coming from an encoding
- # that might have them.
- if (self.smart_quotes_to is not None
- and proposed in self.ENCODINGS_WITH_SMART_QUOTES):
- smart_quotes_re = b"([\x80-\x9f])"
- smart_quotes_compiled = re.compile(smart_quotes_re)
- markup = smart_quotes_compiled.sub(self._sub_ms_char, markup)
-
- try:
- #print "Trying to convert document to %s (errors=%s)" % (
- # proposed, errors)
- u = self._to_unicode(markup, proposed, errors)
- self.markup = u
- self.original_encoding = proposed
- except Exception as e:
- #print "That didn't work!"
- #print e
- return None
- #print "Correct encoding: %s" % proposed
- return self.markup
-
- def _to_unicode(self, data, encoding, errors="strict"):
- '''Given a string and its encoding, decodes the string into Unicode.
- %encoding is a string recognized by encodings.aliases'''
- return unicode(data, encoding, errors)
-
- @property
- def declared_html_encoding(self):
- if not self.is_html:
- return None
- return self.detector.declared_encoding
-
- def find_codec(self, charset):
- value = (self._codec(self.CHARSET_ALIASES.get(charset, charset))
- or (charset and self._codec(charset.replace("-", "")))
- or (charset and self._codec(charset.replace("-", "_")))
- or (charset and charset.lower())
- or charset
- )
- if value:
- return value.lower()
- return None
-
- def _codec(self, charset):
- if not charset:
- return charset
- codec = None
- try:
- codecs.lookup(charset)
- codec = charset
- except (LookupError, ValueError):
- pass
- return codec
-
-
- # A partial mapping of ISO-Latin-1 to HTML entities/XML numeric entities.
- MS_CHARS = {b'\x80': ('euro', '20AC'),
- b'\x81': ' ',
- b'\x82': ('sbquo', '201A'),
- b'\x83': ('fnof', '192'),
- b'\x84': ('bdquo', '201E'),
- b'\x85': ('hellip', '2026'),
- b'\x86': ('dagger', '2020'),
- b'\x87': ('Dagger', '2021'),
- b'\x88': ('circ', '2C6'),
- b'\x89': ('permil', '2030'),
- b'\x8A': ('Scaron', '160'),
- b'\x8B': ('lsaquo', '2039'),
- b'\x8C': ('OElig', '152'),
- b'\x8D': '?',
- b'\x8E': ('#x17D', '17D'),
- b'\x8F': '?',
- b'\x90': '?',
- b'\x91': ('lsquo', '2018'),
- b'\x92': ('rsquo', '2019'),
- b'\x93': ('ldquo', '201C'),
- b'\x94': ('rdquo', '201D'),
- b'\x95': ('bull', '2022'),
- b'\x96': ('ndash', '2013'),
- b'\x97': ('mdash', '2014'),
- b'\x98': ('tilde', '2DC'),
- b'\x99': ('trade', '2122'),
- b'\x9a': ('scaron', '161'),
- b'\x9b': ('rsaquo', '203A'),
- b'\x9c': ('oelig', '153'),
- b'\x9d': '?',
- b'\x9e': ('#x17E', '17E'),
- b'\x9f': ('Yuml', ''),}
-
- # A parochial partial mapping of ISO-Latin-1 to ASCII. Contains
- # horrors like stripping diacritical marks to turn á into a, but also
- # contains non-horrors like turning “ into ".
- MS_CHARS_TO_ASCII = {
- b'\x80' : 'EUR',
- b'\x81' : ' ',
- b'\x82' : ',',
- b'\x83' : 'f',
- b'\x84' : ',,',
- b'\x85' : '...',
- b'\x86' : '+',
- b'\x87' : '++',
- b'\x88' : '^',
- b'\x89' : '%',
- b'\x8a' : 'S',
- b'\x8b' : '<',
- b'\x8c' : 'OE',
- b'\x8d' : '?',
- b'\x8e' : 'Z',
- b'\x8f' : '?',
- b'\x90' : '?',
- b'\x91' : "'",
- b'\x92' : "'",
- b'\x93' : '"',
- b'\x94' : '"',
- b'\x95' : '*',
- b'\x96' : '-',
- b'\x97' : '--',
- b'\x98' : '~',
- b'\x99' : '(TM)',
- b'\x9a' : 's',
- b'\x9b' : '>',
- b'\x9c' : 'oe',
- b'\x9d' : '?',
- b'\x9e' : 'z',
- b'\x9f' : 'Y',
- b'\xa0' : ' ',
- b'\xa1' : '!',
- b'\xa2' : 'c',
- b'\xa3' : 'GBP',
- b'\xa4' : '$', #This approximation is especially parochial--this is the
- #generic currency symbol.
- b'\xa5' : 'YEN',
- b'\xa6' : '|',
- b'\xa7' : 'S',
- b'\xa8' : '..',
- b'\xa9' : '',
- b'\xaa' : '(th)',
- b'\xab' : '<<',
- b'\xac' : '!',
- b'\xad' : ' ',
- b'\xae' : '(R)',
- b'\xaf' : '-',
- b'\xb0' : 'o',
- b'\xb1' : '+-',
- b'\xb2' : '2',
- b'\xb3' : '3',
- b'\xb4' : ("'", 'acute'),
- b'\xb5' : 'u',
- b'\xb6' : 'P',
- b'\xb7' : '*',
- b'\xb8' : ',',
- b'\xb9' : '1',
- b'\xba' : '(th)',
- b'\xbb' : '>>',
- b'\xbc' : '1/4',
- b'\xbd' : '1/2',
- b'\xbe' : '3/4',
- b'\xbf' : '?',
- b'\xc0' : 'A',
- b'\xc1' : 'A',
- b'\xc2' : 'A',
- b'\xc3' : 'A',
- b'\xc4' : 'A',
- b'\xc5' : 'A',
- b'\xc6' : 'AE',
- b'\xc7' : 'C',
- b'\xc8' : 'E',
- b'\xc9' : 'E',
- b'\xca' : 'E',
- b'\xcb' : 'E',
- b'\xcc' : 'I',
- b'\xcd' : 'I',
- b'\xce' : 'I',
- b'\xcf' : 'I',
- b'\xd0' : 'D',
- b'\xd1' : 'N',
- b'\xd2' : 'O',
- b'\xd3' : 'O',
- b'\xd4' : 'O',
- b'\xd5' : 'O',
- b'\xd6' : 'O',
- b'\xd7' : '*',
- b'\xd8' : 'O',
- b'\xd9' : 'U',
- b'\xda' : 'U',
- b'\xdb' : 'U',
- b'\xdc' : 'U',
- b'\xdd' : 'Y',
- b'\xde' : 'b',
- b'\xdf' : 'B',
- b'\xe0' : 'a',
- b'\xe1' : 'a',
- b'\xe2' : 'a',
- b'\xe3' : 'a',
- b'\xe4' : 'a',
- b'\xe5' : 'a',
- b'\xe6' : 'ae',
- b'\xe7' : 'c',
- b'\xe8' : 'e',
- b'\xe9' : 'e',
- b'\xea' : 'e',
- b'\xeb' : 'e',
- b'\xec' : 'i',
- b'\xed' : 'i',
- b'\xee' : 'i',
- b'\xef' : 'i',
- b'\xf0' : 'o',
- b'\xf1' : 'n',
- b'\xf2' : 'o',
- b'\xf3' : 'o',
- b'\xf4' : 'o',
- b'\xf5' : 'o',
- b'\xf6' : 'o',
- b'\xf7' : '/',
- b'\xf8' : 'o',
- b'\xf9' : 'u',
- b'\xfa' : 'u',
- b'\xfb' : 'u',
- b'\xfc' : 'u',
- b'\xfd' : 'y',
- b'\xfe' : 'b',
- b'\xff' : 'y',
- }
-
- # A map used when removing rogue Windows-1252/ISO-8859-1
- # characters in otherwise UTF-8 documents.
- #
- # Note that \x81, \x8d, \x8f, \x90, and \x9d are undefined in
- # Windows-1252.
- WINDOWS_1252_TO_UTF8 = {
- 0x80 : b'\xe2\x82\xac', # €
- 0x82 : b'\xe2\x80\x9a', # ‚
- 0x83 : b'\xc6\x92', # ƒ
- 0x84 : b'\xe2\x80\x9e', # „
- 0x85 : b'\xe2\x80\xa6', # …
- 0x86 : b'\xe2\x80\xa0', # †
- 0x87 : b'\xe2\x80\xa1', # ‡
- 0x88 : b'\xcb\x86', # ˆ
- 0x89 : b'\xe2\x80\xb0', # ‰
- 0x8a : b'\xc5\xa0', # Š
- 0x8b : b'\xe2\x80\xb9', # ‹
- 0x8c : b'\xc5\x92', # Œ
- 0x8e : b'\xc5\xbd', # Ž
- 0x91 : b'\xe2\x80\x98', # ‘
- 0x92 : b'\xe2\x80\x99', # ’
- 0x93 : b'\xe2\x80\x9c', # “
- 0x94 : b'\xe2\x80\x9d', # ”
- 0x95 : b'\xe2\x80\xa2', # •
- 0x96 : b'\xe2\x80\x93', # –
- 0x97 : b'\xe2\x80\x94', # —
- 0x98 : b'\xcb\x9c', # ˜
- 0x99 : b'\xe2\x84\xa2', # ™
- 0x9a : b'\xc5\xa1', # š
- 0x9b : b'\xe2\x80\xba', # ›
- 0x9c : b'\xc5\x93', # œ
- 0x9e : b'\xc5\xbe', # ž
- 0x9f : b'\xc5\xb8', # Ÿ
- 0xa0 : b'\xc2\xa0', #  
- 0xa1 : b'\xc2\xa1', # ¡
- 0xa2 : b'\xc2\xa2', # ¢
- 0xa3 : b'\xc2\xa3', # £
- 0xa4 : b'\xc2\xa4', # ¤
- 0xa5 : b'\xc2\xa5', # ¥
- 0xa6 : b'\xc2\xa6', # ¦
- 0xa7 : b'\xc2\xa7', # §
- 0xa8 : b'\xc2\xa8', # ¨
- 0xa9 : b'\xc2\xa9', # ©
- 0xaa : b'\xc2\xaa', # ª
- 0xab : b'\xc2\xab', # «
- 0xac : b'\xc2\xac', # ¬
- 0xad : b'\xc2\xad', # ­
- 0xae : b'\xc2\xae', # ®
- 0xaf : b'\xc2\xaf', # ¯
- 0xb0 : b'\xc2\xb0', # °
- 0xb1 : b'\xc2\xb1', # ±
- 0xb2 : b'\xc2\xb2', # ²
- 0xb3 : b'\xc2\xb3', # ³
- 0xb4 : b'\xc2\xb4', # ´
- 0xb5 : b'\xc2\xb5', # µ
- 0xb6 : b'\xc2\xb6', # ¶
- 0xb7 : b'\xc2\xb7', # ·
- 0xb8 : b'\xc2\xb8', # ¸
- 0xb9 : b'\xc2\xb9', # ¹
- 0xba : b'\xc2\xba', # º
- 0xbb : b'\xc2\xbb', # »
- 0xbc : b'\xc2\xbc', # ¼
- 0xbd : b'\xc2\xbd', # ½
- 0xbe : b'\xc2\xbe', # ¾
- 0xbf : b'\xc2\xbf', # ¿
- 0xc0 : b'\xc3\x80', # À
- 0xc1 : b'\xc3\x81', # Á
- 0xc2 : b'\xc3\x82', # Â
- 0xc3 : b'\xc3\x83', # Ã
- 0xc4 : b'\xc3\x84', # Ä
- 0xc5 : b'\xc3\x85', # Å
- 0xc6 : b'\xc3\x86', # Æ
- 0xc7 : b'\xc3\x87', # Ç
- 0xc8 : b'\xc3\x88', # È
- 0xc9 : b'\xc3\x89', # É
- 0xca : b'\xc3\x8a', # Ê
- 0xcb : b'\xc3\x8b', # Ë
- 0xcc : b'\xc3\x8c', # Ì
- 0xcd : b'\xc3\x8d', # Í
- 0xce : b'\xc3\x8e', # Î
- 0xcf : b'\xc3\x8f', # Ï
- 0xd0 : b'\xc3\x90', # Ð
- 0xd1 : b'\xc3\x91', # Ñ
- 0xd2 : b'\xc3\x92', # Ò
- 0xd3 : b'\xc3\x93', # Ó
- 0xd4 : b'\xc3\x94', # Ô
- 0xd5 : b'\xc3\x95', # Õ
- 0xd6 : b'\xc3\x96', # Ö
- 0xd7 : b'\xc3\x97', # ×
- 0xd8 : b'\xc3\x98', # Ø
- 0xd9 : b'\xc3\x99', # Ù
- 0xda : b'\xc3\x9a', # Ú
- 0xdb : b'\xc3\x9b', # Û
- 0xdc : b'\xc3\x9c', # Ü
- 0xdd : b'\xc3\x9d', # Ý
- 0xde : b'\xc3\x9e', # Þ
- 0xdf : b'\xc3\x9f', # ß
- 0xe0 : b'\xc3\xa0', # à
- 0xe1 : b'\xa1', # á
- 0xe2 : b'\xc3\xa2', # â
- 0xe3 : b'\xc3\xa3', # ã
- 0xe4 : b'\xc3\xa4', # ä
- 0xe5 : b'\xc3\xa5', # å
- 0xe6 : b'\xc3\xa6', # æ
- 0xe7 : b'\xc3\xa7', # ç
- 0xe8 : b'\xc3\xa8', # è
- 0xe9 : b'\xc3\xa9', # é
- 0xea : b'\xc3\xaa', # ê
- 0xeb : b'\xc3\xab', # ë
- 0xec : b'\xc3\xac', # ì
- 0xed : b'\xc3\xad', # í
- 0xee : b'\xc3\xae', # î
- 0xef : b'\xc3\xaf', # ï
- 0xf0 : b'\xc3\xb0', # ð
- 0xf1 : b'\xc3\xb1', # ñ
- 0xf2 : b'\xc3\xb2', # ò
- 0xf3 : b'\xc3\xb3', # ó
- 0xf4 : b'\xc3\xb4', # ô
- 0xf5 : b'\xc3\xb5', # õ
- 0xf6 : b'\xc3\xb6', # ö
- 0xf7 : b'\xc3\xb7', # ÷
- 0xf8 : b'\xc3\xb8', # ø
- 0xf9 : b'\xc3\xb9', # ù
- 0xfa : b'\xc3\xba', # ú
- 0xfb : b'\xc3\xbb', # û
- 0xfc : b'\xc3\xbc', # ü
- 0xfd : b'\xc3\xbd', # ý
- 0xfe : b'\xc3\xbe', # þ
- }
-
- MULTIBYTE_MARKERS_AND_SIZES = [
- (0xc2, 0xdf, 2), # 2-byte characters start with a byte C2-DF
- (0xe0, 0xef, 3), # 3-byte characters start with E0-EF
- (0xf0, 0xf4, 4), # 4-byte characters start with F0-F4
- ]
-
- FIRST_MULTIBYTE_MARKER = MULTIBYTE_MARKERS_AND_SIZES[0][0]
- LAST_MULTIBYTE_MARKER = MULTIBYTE_MARKERS_AND_SIZES[-1][1]
-
- @classmethod
- def detwingle(cls, in_bytes, main_encoding="utf8",
- embedded_encoding="windows-1252"):
- """Fix characters from one encoding embedded in some other encoding.
-
- Currently the only situation supported is Windows-1252 (or its
- subset ISO-8859-1), embedded in UTF-8.
-
- The input must be a bytestring. If you've already converted
- the document to Unicode, you're too late.
-
- The output is a bytestring in which `embedded_encoding`
- characters have been converted to their `main_encoding`
- equivalents.
- """
- if embedded_encoding.replace('_', '-').lower() not in (
- 'windows-1252', 'windows_1252'):
- raise NotImplementedError(
- "Windows-1252 and ISO-8859-1 are the only currently supported "
- "embedded encodings.")
-
- if main_encoding.lower() not in ('utf8', 'utf-8'):
- raise NotImplementedError(
- "UTF-8 is the only currently supported main encoding.")
-
- byte_chunks = []
-
- chunk_start = 0
- pos = 0
- while pos < len(in_bytes):
- byte = in_bytes[pos]
- if not isinstance(byte, int):
- # Python 2.x
- byte = ord(byte)
- if (byte >= cls.FIRST_MULTIBYTE_MARKER
- and byte <= cls.LAST_MULTIBYTE_MARKER):
- # This is the start of a UTF-8 multibyte character. Skip
- # to the end.
- for start, end, size in cls.MULTIBYTE_MARKERS_AND_SIZES:
- if byte >= start and byte <= end:
- pos += size
- break
- elif byte >= 0x80 and byte in cls.WINDOWS_1252_TO_UTF8:
- # We found a Windows-1252 character!
- # Save the string up to this point as a chunk.
- byte_chunks.append(in_bytes[chunk_start:pos])
-
- # Now translate the Windows-1252 character into UTF-8
- # and add it as another, one-byte chunk.
- byte_chunks.append(cls.WINDOWS_1252_TO_UTF8[byte])
- pos += 1
- chunk_start = pos
- else:
- # Go on to the next character.
- pos += 1
- if chunk_start == 0:
- # The string is unchanged.
- return in_bytes
- else:
- # Store the final chunk.
- byte_chunks.append(in_bytes[chunk_start:])
- return b''.join(byte_chunks)
-
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/diagnose.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/diagnose.py
deleted file mode 100644
index 4d0b00afadd..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/diagnose.py
+++ /dev/null
@@ -1,204 +0,0 @@
-"""Diagnostic functions, mainly for use when doing tech support."""
-import cProfile
-from StringIO import StringIO
-from HTMLParser import HTMLParser
-import bs4
-from bs4 import BeautifulSoup, __version__
-from bs4.builder import builder_registry
-
-import os
-import pstats
-import random
-import tempfile
-import time
-import traceback
-import sys
-import cProfile
-
-def diagnose(data):
- """Diagnostic suite for isolating common problems."""
- print "Diagnostic running on Beautiful Soup %s" % __version__
- print "Python version %s" % sys.version
-
- basic_parsers = ["html.parser", "html5lib", "lxml"]
- for name in basic_parsers:
- for builder in builder_registry.builders:
- if name in builder.features:
- break
- else:
- basic_parsers.remove(name)
- print (
- "I noticed that %s is not installed. Installing it may help." %
- name)
-
- if 'lxml' in basic_parsers:
- basic_parsers.append(["lxml", "xml"])
- from lxml import etree
- print "Found lxml version %s" % ".".join(map(str,etree.LXML_VERSION))
-
- if 'html5lib' in basic_parsers:
- import html5lib
- print "Found html5lib version %s" % html5lib.__version__
-
- if hasattr(data, 'read'):
- data = data.read()
- elif os.path.exists(data):
- print '"%s" looks like a filename. Reading data from the file.' % data
- data = open(data).read()
- elif data.startswith("http:") or data.startswith("https:"):
- print '"%s" looks like a URL. Beautiful Soup is not an HTTP client.' % data
- print "You need to use some other library to get the document behind the URL, and feed that document to Beautiful Soup."
- return
- print
-
- for parser in basic_parsers:
- print "Trying to parse your markup with %s" % parser
- success = False
- try:
- soup = BeautifulSoup(data, parser)
- success = True
- except Exception, e:
- print "%s could not parse the markup." % parser
- traceback.print_exc()
- if success:
- print "Here's what %s did with the markup:" % parser
- print soup.prettify()
-
- print "-" * 80
-
-def lxml_trace(data, html=True, **kwargs):
- """Print out the lxml events that occur during parsing.
-
- This lets you see how lxml parses a document when no Beautiful
- Soup code is running.
- """
- from lxml import etree
- for event, element in etree.iterparse(StringIO(data), html=html, **kwargs):
- print("%s, %4s, %s" % (event, element.tag, element.text))
-
-class AnnouncingParser(HTMLParser):
- """Announces HTMLParser parse events, without doing anything else."""
-
- def _p(self, s):
- print(s)
-
- def handle_starttag(self, name, attrs):
- self._p("%s START" % name)
-
- def handle_endtag(self, name):
- self._p("%s END" % name)
-
- def handle_data(self, data):
- self._p("%s DATA" % data)
-
- def handle_charref(self, name):
- self._p("%s CHARREF" % name)
-
- def handle_entityref(self, name):
- self._p("%s ENTITYREF" % name)
-
- def handle_comment(self, data):
- self._p("%s COMMENT" % data)
-
- def handle_decl(self, data):
- self._p("%s DECL" % data)
-
- def unknown_decl(self, data):
- self._p("%s UNKNOWN-DECL" % data)
-
- def handle_pi(self, data):
- self._p("%s PI" % data)
-
-def htmlparser_trace(data):
- """Print out the HTMLParser events that occur during parsing.
-
- This lets you see how HTMLParser parses a document when no
- Beautiful Soup code is running.
- """
- parser = AnnouncingParser()
- parser.feed(data)
-
-_vowels = "aeiou"
-_consonants = "bcdfghjklmnpqrstvwxyz"
-
-def rword(length=5):
- "Generate a random word-like string."
- s = ''
- for i in range(length):
- if i % 2 == 0:
- t = _consonants
- else:
- t = _vowels
- s += random.choice(t)
- return s
-
-def rsentence(length=4):
- "Generate a random sentence-like string."
- return " ".join(rword(random.randint(4,9)) for i in range(length))
-
-def rdoc(num_elements=1000):
- """Randomly generate an invalid HTML document."""
- tag_names = ['p', 'div', 'span', 'i', 'b', 'script', 'table']
- elements = []
- for i in range(num_elements):
- choice = random.randint(0,3)
- if choice == 0:
- # New tag.
- tag_name = random.choice(tag_names)
- elements.append("<%s>" % tag_name)
- elif choice == 1:
- elements.append(rsentence(random.randint(1,4)))
- elif choice == 2:
- # Close a tag.
- tag_name = random.choice(tag_names)
- elements.append("</%s>" % tag_name)
- return "<html>" + "\n".join(elements) + "</html>"
-
-def benchmark_parsers(num_elements=100000):
- """Very basic head-to-head performance benchmark."""
- print "Comparative parser benchmark on Beautiful Soup %s" % __version__
- data = rdoc(num_elements)
- print "Generated a large invalid HTML document (%d bytes)." % len(data)
-
- for parser in ["lxml", ["lxml", "html"], "html5lib", "html.parser"]:
- success = False
- try:
- a = time.time()
- soup = BeautifulSoup(data, parser)
- b = time.time()
- success = True
- except Exception, e:
- print "%s could not parse the markup." % parser
- traceback.print_exc()
- if success:
- print "BS4+%s parsed the markup in %.2fs." % (parser, b-a)
-
- from lxml import etree
- a = time.time()
- etree.HTML(data)
- b = time.time()
- print "Raw lxml parsed the markup in %.2fs." % (b-a)
-
- import html5lib
- parser = html5lib.HTMLParser()
- a = time.time()
- parser.parse(data)
- b = time.time()
- print "Raw html5lib parsed the markup in %.2fs." % (b-a)
-
-def profile(num_elements=100000, parser="lxml"):
-
- filehandle = tempfile.NamedTemporaryFile()
- filename = filehandle.name
-
- data = rdoc(num_elements)
- vars = dict(bs4=bs4, data=data, parser=parser)
- cProfile.runctx('bs4.BeautifulSoup(data, parser)' , vars, vars, filename)
-
- stats = pstats.Stats(filename)
- # stats.strip_dirs()
- stats.sort_stats("cumulative")
- stats.print_stats('_html5lib|bs4', 50)
-
-if __name__ == '__main__':
- diagnose(sys.stdin.read())
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/element.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/element.py
deleted file mode 100644
index da9afdf48ec..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/element.py
+++ /dev/null
@@ -1,1611 +0,0 @@
-import collections
-import re
-import sys
-import warnings
-from bs4.dammit import EntitySubstitution
-
-DEFAULT_OUTPUT_ENCODING = "utf-8"
-PY3K = (sys.version_info[0] > 2)
-
-whitespace_re = re.compile("\s+")
-
-def _alias(attr):
- """Alias one attribute name to another for backward compatibility"""
- @property
- def alias(self):
- return getattr(self, attr)
-
- @alias.setter
- def alias(self):
- return setattr(self, attr)
- return alias
-
-
-class NamespacedAttribute(unicode):
-
- def __new__(cls, prefix, name, namespace=None):
- if name is None:
- obj = unicode.__new__(cls, prefix)
- elif prefix is None:
- # Not really namespaced.
- obj = unicode.__new__(cls, name)
- else:
- obj = unicode.__new__(cls, prefix + ":" + name)
- obj.prefix = prefix
- obj.name = name
- obj.namespace = namespace
- return obj
-
-class AttributeValueWithCharsetSubstitution(unicode):
- """A stand-in object for a character encoding specified in HTML."""
-
-class CharsetMetaAttributeValue(AttributeValueWithCharsetSubstitution):
- """A generic stand-in for the value of a meta tag's 'charset' attribute.
-
- When Beautiful Soup parses the markup '<meta charset="utf8">', the
- value of the 'charset' attribute will be one of these objects.
- """
-
- def __new__(cls, original_value):
- obj = unicode.__new__(cls, original_value)
- obj.original_value = original_value
- return obj
-
- def encode(self, encoding):
- return encoding
-
-
-class ContentMetaAttributeValue(AttributeValueWithCharsetSubstitution):
- """A generic stand-in for the value of a meta tag's 'content' attribute.
-
- When Beautiful Soup parses the markup:
- <meta http-equiv="content-type" content="text/html; charset=utf8">
-
- The value of the 'content' attribute will be one of these objects.
- """
-
- CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)", re.M)
-
- def __new__(cls, original_value):
- match = cls.CHARSET_RE.search(original_value)
- if match is None:
- # No substitution necessary.
- return unicode.__new__(unicode, original_value)
-
- obj = unicode.__new__(cls, original_value)
- obj.original_value = original_value
- return obj
-
- def encode(self, encoding):
- def rewrite(match):
- return match.group(1) + encoding
- return self.CHARSET_RE.sub(rewrite, self.original_value)
-
-class HTMLAwareEntitySubstitution(EntitySubstitution):
-
- """Entity substitution rules that are aware of some HTML quirks.
-
- Specifically, the contents of <script> and <style> tags should not
- undergo entity substitution.
-
- Incoming NavigableString objects are checked to see if they're the
- direct children of a <script> or <style> tag.
- """
-
- cdata_containing_tags = set(["script", "style"])
-
- preformatted_tags = set(["pre"])
-
- @classmethod
- def _substitute_if_appropriate(cls, ns, f):
- if (isinstance(ns, NavigableString)
- and ns.parent is not None
- and ns.parent.name in cls.cdata_containing_tags):
- # Do nothing.
- return ns
- # Substitute.
- return f(ns)
-
- @classmethod
- def substitute_html(cls, ns):
- return cls._substitute_if_appropriate(
- ns, EntitySubstitution.substitute_html)
-
- @classmethod
- def substitute_xml(cls, ns):
- return cls._substitute_if_appropriate(
- ns, EntitySubstitution.substitute_xml)
-
-class PageElement(object):
- """Contains the navigational information for some part of the page
- (either a tag or a piece of text)"""
-
- # There are five possible values for the "formatter" argument passed in
- # to methods like encode() and prettify():
- #
- # "html" - All Unicode characters with corresponding HTML entities
- # are converted to those entities on output.
- # "minimal" - Bare ampersands and angle brackets are converted to
- # XML entities: &amp; &lt; &gt;
- # None - The null formatter. Unicode characters are never
- # converted to entities. This is not recommended, but it's
- # faster than "minimal".
- # A function - This function will be called on every string that
- # needs to undergo entity substitution.
- #
-
- # In an HTML document, the default "html" and "minimal" functions
- # will leave the contents of <script> and <style> tags alone. For
- # an XML document, all tags will be given the same treatment.
-
- HTML_FORMATTERS = {
- "html" : HTMLAwareEntitySubstitution.substitute_html,
- "minimal" : HTMLAwareEntitySubstitution.substitute_xml,
- None : None
- }
-
- XML_FORMATTERS = {
- "html" : EntitySubstitution.substitute_html,
- "minimal" : EntitySubstitution.substitute_xml,
- None : None
- }
-
- def format_string(self, s, formatter='minimal'):
- """Format the given string using the given formatter."""
- if not callable(formatter):
- formatter = self._formatter_for_name(formatter)
- if formatter is None:
- output = s
- else:
- output = formatter(s)
- return output
-
- @property
- def _is_xml(self):
- """Is this element part of an XML tree or an HTML tree?
-
- This is used when mapping a formatter name ("minimal") to an
- appropriate function (one that performs entity-substitution on
- the contents of <script> and <style> tags, or not). It's
- inefficient, but it should be called very rarely.
- """
- if self.parent is None:
- # This is the top-level object. It should have .is_xml set
- # from tree creation. If not, take a guess--BS is usually
- # used on HTML markup.
- return getattr(self, 'is_xml', False)
- return self.parent._is_xml
-
- def _formatter_for_name(self, name):
- "Look up a formatter function based on its name and the tree."
- if self._is_xml:
- return self.XML_FORMATTERS.get(
- name, EntitySubstitution.substitute_xml)
- else:
- return self.HTML_FORMATTERS.get(
- name, HTMLAwareEntitySubstitution.substitute_xml)
-
- def setup(self, parent=None, previous_element=None):
- """Sets up the initial relations between this element and
- other elements."""
- self.parent = parent
- self.previous_element = previous_element
- if previous_element is not None:
- self.previous_element.next_element = self
- self.next_element = None
- self.previous_sibling = None
- self.next_sibling = None
- if self.parent is not None and self.parent.contents:
- self.previous_sibling = self.parent.contents[-1]
- self.previous_sibling.next_sibling = self
-
- nextSibling = _alias("next_sibling") # BS3
- previousSibling = _alias("previous_sibling") # BS3
-
- def replace_with(self, replace_with):
- if replace_with is self:
- return
- if replace_with is self.parent:
- raise ValueError("Cannot replace a Tag with its parent.")
- old_parent = self.parent
- my_index = self.parent.index(self)
- self.extract()
- old_parent.insert(my_index, replace_with)
- return self
- replaceWith = replace_with # BS3
-
- def unwrap(self):
- my_parent = self.parent
- my_index = self.parent.index(self)
- self.extract()
- for child in reversed(self.contents[:]):
- my_parent.insert(my_index, child)
- return self
- replace_with_children = unwrap
- replaceWithChildren = unwrap # BS3
-
- def wrap(self, wrap_inside):
- me = self.replace_with(wrap_inside)
- wrap_inside.append(me)
- return wrap_inside
-
- def extract(self):
- """Destructively rips this element out of the tree."""
- if self.parent is not None:
- del self.parent.contents[self.parent.index(self)]
-
- #Find the two elements that would be next to each other if
- #this element (and any children) hadn't been parsed. Connect
- #the two.
- last_child = self._last_descendant()
- next_element = last_child.next_element
-
- if self.previous_element is not None:
- self.previous_element.next_element = next_element
- if next_element is not None:
- next_element.previous_element = self.previous_element
- self.previous_element = None
- last_child.next_element = None
-
- self.parent = None
- if self.previous_sibling is not None:
- self.previous_sibling.next_sibling = self.next_sibling
- if self.next_sibling is not None:
- self.next_sibling.previous_sibling = self.previous_sibling
- self.previous_sibling = self.next_sibling = None
- return self
-
- def _last_descendant(self, is_initialized=True, accept_self=True):
- "Finds the last element beneath this object to be parsed."
- if is_initialized and self.next_sibling:
- last_child = self.next_sibling.previous_element
- else:
- last_child = self
- while isinstance(last_child, Tag) and last_child.contents:
- last_child = last_child.contents[-1]
- if not accept_self and last_child == self:
- last_child = None
- return last_child
- # BS3: Not part of the API!
- _lastRecursiveChild = _last_descendant
-
- def insert(self, position, new_child):
- if new_child is self:
- raise ValueError("Cannot insert a tag into itself.")
- if (isinstance(new_child, basestring)
- and not isinstance(new_child, NavigableString)):
- new_child = NavigableString(new_child)
-
- position = min(position, len(self.contents))
- if hasattr(new_child, 'parent') and new_child.parent is not None:
- # We're 'inserting' an element that's already one
- # of this object's children.
- if new_child.parent is self:
- current_index = self.index(new_child)
- if current_index < position:
- # We're moving this element further down the list
- # of this object's children. That means that when
- # we extract this element, our target index will
- # jump down one.
- position -= 1
- new_child.extract()
-
- new_child.parent = self
- previous_child = None
- if position == 0:
- new_child.previous_sibling = None
- new_child.previous_element = self
- else:
- previous_child = self.contents[position - 1]
- new_child.previous_sibling = previous_child
- new_child.previous_sibling.next_sibling = new_child
- new_child.previous_element = previous_child._last_descendant(False)
- if new_child.previous_element is not None:
- new_child.previous_element.next_element = new_child
-
- new_childs_last_element = new_child._last_descendant(False)
-
- if position >= len(self.contents):
- new_child.next_sibling = None
-
- parent = self
- parents_next_sibling = None
- while parents_next_sibling is None and parent is not None:
- parents_next_sibling = parent.next_sibling
- parent = parent.parent
- if parents_next_sibling is not None:
- # We found the element that comes next in the document.
- break
- if parents_next_sibling is not None:
- new_childs_last_element.next_element = parents_next_sibling
- else:
- # The last element of this tag is the last element in
- # the document.
- new_childs_last_element.next_element = None
- else:
- next_child = self.contents[position]
- new_child.next_sibling = next_child
- if new_child.next_sibling is not None:
- new_child.next_sibling.previous_sibling = new_child
- new_childs_last_element.next_element = next_child
-
- if new_childs_last_element.next_element is not None:
- new_childs_last_element.next_element.previous_element = new_childs_last_element
- self.contents.insert(position, new_child)
-
- def append(self, tag):
- """Appends the given tag to the contents of this tag."""
- self.insert(len(self.contents), tag)
-
- def insert_before(self, predecessor):
- """Makes the given element the immediate predecessor of this one.
-
- The two elements will have the same parent, and the given element
- will be immediately before this one.
- """
- if self is predecessor:
- raise ValueError("Can't insert an element before itself.")
- parent = self.parent
- if parent is None:
- raise ValueError(
- "Element has no parent, so 'before' has no meaning.")
- # Extract first so that the index won't be screwed up if they
- # are siblings.
- if isinstance(predecessor, PageElement):
- predecessor.extract()
- index = parent.index(self)
- parent.insert(index, predecessor)
-
- def insert_after(self, successor):
- """Makes the given element the immediate successor of this one.
-
- The two elements will have the same parent, and the given element
- will be immediately after this one.
- """
- if self is successor:
- raise ValueError("Can't insert an element after itself.")
- parent = self.parent
- if parent is None:
- raise ValueError(
- "Element has no parent, so 'after' has no meaning.")
- # Extract first so that the index won't be screwed up if they
- # are siblings.
- if isinstance(successor, PageElement):
- successor.extract()
- index = parent.index(self)
- parent.insert(index+1, successor)
-
- def find_next(self, name=None, attrs={}, text=None, **kwargs):
- """Returns the first item that matches the given criteria and
- appears after this Tag in the document."""
- return self._find_one(self.find_all_next, name, attrs, text, **kwargs)
- findNext = find_next # BS3
-
- def find_all_next(self, name=None, attrs={}, text=None, limit=None,
- **kwargs):
- """Returns all items that match the given criteria and appear
- after this Tag in the document."""
- return self._find_all(name, attrs, text, limit, self.next_elements,
- **kwargs)
- findAllNext = find_all_next # BS3
-
- def find_next_sibling(self, name=None, attrs={}, text=None, **kwargs):
- """Returns the closest sibling to this Tag that matches the
- given criteria and appears after this Tag in the document."""
- return self._find_one(self.find_next_siblings, name, attrs, text,
- **kwargs)
- findNextSibling = find_next_sibling # BS3
-
- def find_next_siblings(self, name=None, attrs={}, text=None, limit=None,
- **kwargs):
- """Returns the siblings of this Tag that match the given
- criteria and appear after this Tag in the document."""
- return self._find_all(name, attrs, text, limit,
- self.next_siblings, **kwargs)
- findNextSiblings = find_next_siblings # BS3
- fetchNextSiblings = find_next_siblings # BS2
-
- def find_previous(self, name=None, attrs={}, text=None, **kwargs):
- """Returns the first item that matches the given criteria and
- appears before this Tag in the document."""
- return self._find_one(
- self.find_all_previous, name, attrs, text, **kwargs)
- findPrevious = find_previous # BS3
-
- def find_all_previous(self, name=None, attrs={}, text=None, limit=None,
- **kwargs):
- """Returns all items that match the given criteria and appear
- before this Tag in the document."""
- return self._find_all(name, attrs, text, limit, self.previous_elements,
- **kwargs)
- findAllPrevious = find_all_previous # BS3
- fetchPrevious = find_all_previous # BS2
-
- def find_previous_sibling(self, name=None, attrs={}, text=None, **kwargs):
- """Returns the closest sibling to this Tag that matches the
- given criteria and appears before this Tag in the document."""
- return self._find_one(self.find_previous_siblings, name, attrs, text,
- **kwargs)
- findPreviousSibling = find_previous_sibling # BS3
-
- def find_previous_siblings(self, name=None, attrs={}, text=None,
- limit=None, **kwargs):
- """Returns the siblings of this Tag that match the given
- criteria and appear before this Tag in the document."""
- return self._find_all(name, attrs, text, limit,
- self.previous_siblings, **kwargs)
- findPreviousSiblings = find_previous_siblings # BS3
- fetchPreviousSiblings = find_previous_siblings # BS2
-
- def find_parent(self, name=None, attrs={}, **kwargs):
- """Returns the closest parent of this Tag that matches the given
- criteria."""
- # NOTE: We can't use _find_one because findParents takes a different
- # set of arguments.
- r = None
- l = self.find_parents(name, attrs, 1, **kwargs)
- if l:
- r = l[0]
- return r
- findParent = find_parent # BS3
-
- def find_parents(self, name=None, attrs={}, limit=None, **kwargs):
- """Returns the parents of this Tag that match the given
- criteria."""
-
- return self._find_all(name, attrs, None, limit, self.parents,
- **kwargs)
- findParents = find_parents # BS3
- fetchParents = find_parents # BS2
-
- @property
- def next(self):
- return self.next_element
-
- @property
- def previous(self):
- return self.previous_element
-
- #These methods do the real heavy lifting.
-
- def _find_one(self, method, name, attrs, text, **kwargs):
- r = None
- l = method(name, attrs, text, 1, **kwargs)
- if l:
- r = l[0]
- return r
-
- def _find_all(self, name, attrs, text, limit, generator, **kwargs):
- "Iterates over a generator looking for things that match."
-
- if isinstance(name, SoupStrainer):
- strainer = name
- else:
- strainer = SoupStrainer(name, attrs, text, **kwargs)
-
- if text is None and not limit and not attrs and not kwargs:
- if name is True or name is None:
- # Optimization to find all tags.
- result = (element for element in generator
- if isinstance(element, Tag))
- return ResultSet(strainer, result)
- elif isinstance(name, basestring):
- # Optimization to find all tags with a given name.
- result = (element for element in generator
- if isinstance(element, Tag)
- and element.name == name)
- return ResultSet(strainer, result)
- results = ResultSet(strainer)
- while True:
- try:
- i = next(generator)
- except StopIteration:
- break
- if i:
- found = strainer.search(i)
- if found:
- results.append(found)
- if limit and len(results) >= limit:
- break
- return results
-
- #These generators can be used to navigate starting from both
- #NavigableStrings and Tags.
- @property
- def next_elements(self):
- i = self.next_element
- while i is not None:
- yield i
- i = i.next_element
-
- @property
- def next_siblings(self):
- i = self.next_sibling
- while i is not None:
- yield i
- i = i.next_sibling
-
- @property
- def previous_elements(self):
- i = self.previous_element
- while i is not None:
- yield i
- i = i.previous_element
-
- @property
- def previous_siblings(self):
- i = self.previous_sibling
- while i is not None:
- yield i
- i = i.previous_sibling
-
- @property
- def parents(self):
- i = self.parent
- while i is not None:
- yield i
- i = i.parent
-
- # Methods for supporting CSS selectors.
-
- tag_name_re = re.compile('^[a-z0-9]+$')
-
- # /^(\w+)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/
- # \---/ \---/\-------------/ \-------/
- # | | | |
- # | | | The value
- # | | ~,|,^,$,* or =
- # | Attribute
- # Tag
- attribselect_re = re.compile(
- r'^(?P<tag>\w+)?\[(?P<attribute>\w+)(?P<operator>[=~\|\^\$\*]?)' +
- r'=?"?(?P<value>[^\]"]*)"?\]$'
- )
-
- def _attr_value_as_string(self, value, default=None):
- """Force an attribute value into a string representation.
-
- A multi-valued attribute will be converted into a
- space-separated stirng.
- """
- value = self.get(value, default)
- if isinstance(value, list) or isinstance(value, tuple):
- value =" ".join(value)
- return value
-
- def _tag_name_matches_and(self, function, tag_name):
- if not tag_name:
- return function
- else:
- def _match(tag):
- return tag.name == tag_name and function(tag)
- return _match
-
- def _attribute_checker(self, operator, attribute, value=''):
- """Create a function that performs a CSS selector operation.
-
- Takes an operator, attribute and optional value. Returns a
- function that will return True for elements that match that
- combination.
- """
- if operator == '=':
- # string representation of `attribute` is equal to `value`
- return lambda el: el._attr_value_as_string(attribute) == value
- elif operator == '~':
- # space-separated list representation of `attribute`
- # contains `value`
- def _includes_value(element):
- attribute_value = element.get(attribute, [])
- if not isinstance(attribute_value, list):
- attribute_value = attribute_value.split()
- return value in attribute_value
- return _includes_value
- elif operator == '^':
- # string representation of `attribute` starts with `value`
- return lambda el: el._attr_value_as_string(
- attribute, '').startswith(value)
- elif operator == '$':
- # string represenation of `attribute` ends with `value`
- return lambda el: el._attr_value_as_string(
- attribute, '').endswith(value)
- elif operator == '*':
- # string representation of `attribute` contains `value`
- return lambda el: value in el._attr_value_as_string(attribute, '')
- elif operator == '|':
- # string representation of `attribute` is either exactly
- # `value` or starts with `value` and then a dash.
- def _is_or_starts_with_dash(element):
- attribute_value = element._attr_value_as_string(attribute, '')
- return (attribute_value == value or attribute_value.startswith(
- value + '-'))
- return _is_or_starts_with_dash
- else:
- return lambda el: el.has_attr(attribute)
-
- # Old non-property versions of the generators, for backwards
- # compatibility with BS3.
- def nextGenerator(self):
- return self.next_elements
-
- def nextSiblingGenerator(self):
- return self.next_siblings
-
- def previousGenerator(self):
- return self.previous_elements
-
- def previousSiblingGenerator(self):
- return self.previous_siblings
-
- def parentGenerator(self):
- return self.parents
-
-
-class NavigableString(unicode, PageElement):
-
- PREFIX = ''
- SUFFIX = ''
-
- def __new__(cls, value):
- """Create a new NavigableString.
-
- When unpickling a NavigableString, this method is called with
- the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
- passed in to the superclass's __new__ or the superclass won't know
- how to handle non-ASCII characters.
- """
- if isinstance(value, unicode):
- return unicode.__new__(cls, value)
- return unicode.__new__(cls, value, DEFAULT_OUTPUT_ENCODING)
-
- def __copy__(self):
- return self
-
- def __getnewargs__(self):
- return (unicode(self),)
-
- def __getattr__(self, attr):
- """text.string gives you text. This is for backwards
- compatibility for Navigable*String, but for CData* it lets you
- get the string without the CData wrapper."""
- if attr == 'string':
- return self
- else:
- raise AttributeError(
- "'%s' object has no attribute '%s'" % (
- self.__class__.__name__, attr))
-
- def output_ready(self, formatter="minimal"):
- output = self.format_string(self, formatter)
- return self.PREFIX + output + self.SUFFIX
-
- @property
- def name(self):
- return None
-
- @name.setter
- def name(self, name):
- raise AttributeError("A NavigableString cannot be given a name.")
-
-class PreformattedString(NavigableString):
- """A NavigableString not subject to the normal formatting rules.
-
- The string will be passed into the formatter (to trigger side effects),
- but the return value will be ignored.
- """
-
- def output_ready(self, formatter="minimal"):
- """CData strings are passed into the formatter.
- But the return value is ignored."""
- self.format_string(self, formatter)
- return self.PREFIX + self + self.SUFFIX
-
-class CData(PreformattedString):
-
- PREFIX = u'<![CDATA['
- SUFFIX = u']]>'
-
-class ProcessingInstruction(PreformattedString):
-
- PREFIX = u'<?'
- SUFFIX = u'?>'
-
-class Comment(PreformattedString):
-
- PREFIX = u'<!--'
- SUFFIX = u'-->'
-
-
-class Declaration(PreformattedString):
- PREFIX = u'<!'
- SUFFIX = u'!>'
-
-
-class Doctype(PreformattedString):
-
- @classmethod
- def for_name_and_ids(cls, name, pub_id, system_id):
- value = name or ''
- if pub_id is not None:
- value += ' PUBLIC "%s"' % pub_id
- if system_id is not None:
- value += ' "%s"' % system_id
- elif system_id is not None:
- value += ' SYSTEM "%s"' % system_id
-
- return Doctype(value)
-
- PREFIX = u'<!DOCTYPE '
- SUFFIX = u'>\n'
-
-
-class Tag(PageElement):
-
- """Represents a found HTML tag with its attributes and contents."""
-
- def __init__(self, parser=None, builder=None, name=None, namespace=None,
- prefix=None, attrs=None, parent=None, previous=None):
- "Basic constructor."
-
- if parser is None:
- self.parser_class = None
- else:
- # We don't actually store the parser object: that lets extracted
- # chunks be garbage-collected.
- self.parser_class = parser.__class__
- if name is None:
- raise ValueError("No value provided for new tag's name.")
- self.name = name
- self.namespace = namespace
- self.prefix = prefix
- if attrs is None:
- attrs = {}
- elif attrs and builder.cdata_list_attributes:
- attrs = builder._replace_cdata_list_attribute_values(
- self.name, attrs)
- else:
- attrs = dict(attrs)
- self.attrs = attrs
- self.contents = []
- self.setup(parent, previous)
- self.hidden = False
-
- # Set up any substitutions, such as the charset in a META tag.
- if builder is not None:
- builder.set_up_substitutions(self)
- self.can_be_empty_element = builder.can_be_empty_element(name)
- else:
- self.can_be_empty_element = False
-
- parserClass = _alias("parser_class") # BS3
-
- @property
- def is_empty_element(self):
- """Is this tag an empty-element tag? (aka a self-closing tag)
-
- A tag that has contents is never an empty-element tag.
-
- A tag that has no contents may or may not be an empty-element
- tag. It depends on the builder used to create the tag. If the
- builder has a designated list of empty-element tags, then only
- a tag whose name shows up in that list is considered an
- empty-element tag.
-
- If the builder has no designated list of empty-element tags,
- then any tag with no contents is an empty-element tag.
- """
- return len(self.contents) == 0 and self.can_be_empty_element
- isSelfClosing = is_empty_element # BS3
-
- @property
- def string(self):
- """Convenience property to get the single string within this tag.
-
- :Return: If this tag has a single string child, return value
- is that string. If this tag has no children, or more than one
- child, return value is None. If this tag has one child tag,
- return value is the 'string' attribute of the child tag,
- recursively.
- """
- if len(self.contents) != 1:
- return None
- child = self.contents[0]
- if isinstance(child, NavigableString):
- return child
- return child.string
-
- @string.setter
- def string(self, string):
- self.clear()
- self.append(string.__class__(string))
-
- def _all_strings(self, strip=False, types=(NavigableString, CData)):
- """Yield all strings of certain classes, possibly stripping them.
-
- By default, yields only NavigableString and CData objects. So
- no comments, processing instructions, etc.
- """
- for descendant in self.descendants:
- if (
- (types is None and not isinstance(descendant, NavigableString))
- or
- (types is not None and type(descendant) not in types)):
- continue
- if strip:
- descendant = descendant.strip()
- if len(descendant) == 0:
- continue
- yield descendant
-
- strings = property(_all_strings)
-
- @property
- def stripped_strings(self):
- for string in self._all_strings(True):
- yield string
-
- def get_text(self, separator=u"", strip=False,
- types=(NavigableString, CData)):
- """
- Get all child strings, concatenated using the given separator.
- """
- return separator.join([s for s in self._all_strings(
- strip, types=types)])
- getText = get_text
- text = property(get_text)
-
- def decompose(self):
- """Recursively destroys the contents of this tree."""
- self.extract()
- i = self
- while i is not None:
- next = i.next_element
- i.__dict__.clear()
- i.contents = []
- i = next
-
- def clear(self, decompose=False):
- """
- Extract all children. If decompose is True, decompose instead.
- """
- if decompose:
- for element in self.contents[:]:
- if isinstance(element, Tag):
- element.decompose()
- else:
- element.extract()
- else:
- for element in self.contents[:]:
- element.extract()
-
- def index(self, element):
- """
- Find the index of a child by identity, not value. Avoids issues with
- tag.contents.index(element) getting the index of equal elements.
- """
- for i, child in enumerate(self.contents):
- if child is element:
- return i
- raise ValueError("Tag.index: element not in tag")
-
- def get(self, key, default=None):
- """Returns the value of the 'key' attribute for the tag, or
- the value given for 'default' if it doesn't have that
- attribute."""
- return self.attrs.get(key, default)
-
- def has_attr(self, key):
- return key in self.attrs
-
- def __hash__(self):
- return str(self).__hash__()
-
- def __getitem__(self, key):
- """tag[key] returns the value of the 'key' attribute for the tag,
- and throws an exception if it's not there."""
- return self.attrs[key]
-
- def __iter__(self):
- "Iterating over a tag iterates over its contents."
- return iter(self.contents)
-
- def __len__(self):
- "The length of a tag is the length of its list of contents."
- return len(self.contents)
-
- def __contains__(self, x):
- return x in self.contents
-
- def __nonzero__(self):
- "A tag is non-None even if it has no contents."
- return True
-
- def __setitem__(self, key, value):
- """Setting tag[key] sets the value of the 'key' attribute for the
- tag."""
- self.attrs[key] = value
-
- def __delitem__(self, key):
- "Deleting tag[key] deletes all 'key' attributes for the tag."
- self.attrs.pop(key, None)
-
- def __call__(self, *args, **kwargs):
- """Calling a tag like a function is the same as calling its
- find_all() method. Eg. tag('a') returns a list of all the A tags
- found within this tag."""
- return self.find_all(*args, **kwargs)
-
- def __getattr__(self, tag):
- #print "Getattr %s.%s" % (self.__class__, tag)
- if len(tag) > 3 and tag.endswith('Tag'):
- # BS3: soup.aTag -> "soup.find("a")
- tag_name = tag[:-3]
- warnings.warn(
- '.%sTag is deprecated, use .find("%s") instead.' % (
- tag_name, tag_name))
- return self.find(tag_name)
- # We special case contents to avoid recursion.
- elif not tag.startswith("__") and not tag=="contents":
- return self.find(tag)
- raise AttributeError(
- "'%s' object has no attribute '%s'" % (self.__class__, tag))
-
- def __eq__(self, other):
- """Returns true iff this tag has the same name, the same attributes,
- and the same contents (recursively) as the given tag."""
- if self is other:
- return True
- if (not hasattr(other, 'name') or
- not hasattr(other, 'attrs') or
- not hasattr(other, 'contents') or
- self.name != other.name or
- self.attrs != other.attrs or
- len(self) != len(other)):
- return False
- for i, my_child in enumerate(self.contents):
- if my_child != other.contents[i]:
- return False
- return True
-
- def __ne__(self, other):
- """Returns true iff this tag is not identical to the other tag,
- as defined in __eq__."""
- return not self == other
-
- def __repr__(self, encoding=DEFAULT_OUTPUT_ENCODING):
- """Renders this tag as a string."""
- return self.encode(encoding)
-
- def __unicode__(self):
- return self.decode()
-
- def __str__(self):
- return self.encode()
-
- if PY3K:
- __str__ = __repr__ = __unicode__
-
- def encode(self, encoding=DEFAULT_OUTPUT_ENCODING,
- indent_level=None, formatter="minimal",
- errors="xmlcharrefreplace"):
- # Turn the data structure into Unicode, then encode the
- # Unicode.
- u = self.decode(indent_level, encoding, formatter)
- return u.encode(encoding, errors)
-
- def _should_pretty_print(self, indent_level):
- """Should this tag be pretty-printed?"""
- return (
- indent_level is not None and
- (self.name not in HTMLAwareEntitySubstitution.preformatted_tags
- or self._is_xml))
-
- def decode(self, indent_level=None,
- eventual_encoding=DEFAULT_OUTPUT_ENCODING,
- formatter="minimal"):
- """Returns a Unicode representation of this tag and its contents.
-
- :param eventual_encoding: The tag is destined to be
- encoded into this encoding. This method is _not_
- responsible for performing that encoding. This information
- is passed in so that it can be substituted in if the
- document contains a <META> tag that mentions the document's
- encoding.
- """
-
- # First off, turn a string formatter into a function. This
- # will stop the lookup from happening over and over again.
- if not callable(formatter):
- formatter = self._formatter_for_name(formatter)
-
- attrs = []
- if self.attrs:
- for key, val in sorted(self.attrs.items()):
- if val is None:
- decoded = key
- else:
- if isinstance(val, list) or isinstance(val, tuple):
- val = ' '.join(val)
- elif not isinstance(val, basestring):
- val = unicode(val)
- elif (
- isinstance(val, AttributeValueWithCharsetSubstitution)
- and eventual_encoding is not None):
- val = val.encode(eventual_encoding)
-
- text = self.format_string(val, formatter)
- decoded = (
- unicode(key) + '='
- + EntitySubstitution.quoted_attribute_value(text))
- attrs.append(decoded)
- close = ''
- closeTag = ''
-
- prefix = ''
- if self.prefix:
- prefix = self.prefix + ":"
-
- if self.is_empty_element:
- close = '/'
- else:
- closeTag = '</%s%s>' % (prefix, self.name)
-
- pretty_print = self._should_pretty_print(indent_level)
- space = ''
- indent_space = ''
- if indent_level is not None:
- indent_space = (' ' * (indent_level - 1))
- if pretty_print:
- space = indent_space
- indent_contents = indent_level + 1
- else:
- indent_contents = None
- contents = self.decode_contents(
- indent_contents, eventual_encoding, formatter)
-
- if self.hidden:
- # This is the 'document root' object.
- s = contents
- else:
- s = []
- attribute_string = ''
- if attrs:
- attribute_string = ' ' + ' '.join(attrs)
- if indent_level is not None:
- # Even if this particular tag is not pretty-printed,
- # we should indent up to the start of the tag.
- s.append(indent_space)
- s.append('<%s%s%s%s>' % (
- prefix, self.name, attribute_string, close))
- if pretty_print:
- s.append("\n")
- s.append(contents)
- if pretty_print and contents and contents[-1] != "\n":
- s.append("\n")
- if pretty_print and closeTag:
- s.append(space)
- s.append(closeTag)
- if indent_level is not None and closeTag and self.next_sibling:
- # Even if this particular tag is not pretty-printed,
- # we're now done with the tag, and we should add a
- # newline if appropriate.
- s.append("\n")
- s = ''.join(s)
- return s
-
- def prettify(self, encoding=None, formatter="minimal"):
- if encoding is None:
- return self.decode(True, formatter=formatter)
- else:
- return self.encode(encoding, True, formatter=formatter)
-
- def decode_contents(self, indent_level=None,
- eventual_encoding=DEFAULT_OUTPUT_ENCODING,
- formatter="minimal"):
- """Renders the contents of this tag as a Unicode string.
-
- :param eventual_encoding: The tag is destined to be
- encoded into this encoding. This method is _not_
- responsible for performing that encoding. This information
- is passed in so that it can be substituted in if the
- document contains a <META> tag that mentions the document's
- encoding.
- """
- # First off, turn a string formatter into a function. This
- # will stop the lookup from happening over and over again.
- if not callable(formatter):
- formatter = self._formatter_for_name(formatter)
-
- pretty_print = (indent_level is not None)
- s = []
- for c in self:
- text = None
- if isinstance(c, NavigableString):
- text = c.output_ready(formatter)
- elif isinstance(c, Tag):
- s.append(c.decode(indent_level, eventual_encoding,
- formatter))
- if text and indent_level and not self.name == 'pre':
- text = text.strip()
- if text:
- if pretty_print and not self.name == 'pre':
- s.append(" " * (indent_level - 1))
- s.append(text)
- if pretty_print and not self.name == 'pre':
- s.append("\n")
- return ''.join(s)
-
- def encode_contents(
- self, indent_level=None, encoding=DEFAULT_OUTPUT_ENCODING,
- formatter="minimal"):
- """Renders the contents of this tag as a bytestring."""
- contents = self.decode_contents(indent_level, encoding, formatter)
- return contents.encode(encoding)
-
- # Old method for BS3 compatibility
- def renderContents(self, encoding=DEFAULT_OUTPUT_ENCODING,
- prettyPrint=False, indentLevel=0):
- if not prettyPrint:
- indentLevel = None
- return self.encode_contents(
- indent_level=indentLevel, encoding=encoding)
-
- #Soup methods
-
- def find(self, name=None, attrs={}, recursive=True, text=None,
- **kwargs):
- """Return only the first child of this Tag matching the given
- criteria."""
- r = None
- l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
- if l:
- r = l[0]
- return r
- findChild = find
-
- def find_all(self, name=None, attrs={}, recursive=True, text=None,
- limit=None, **kwargs):
- """Extracts a list of Tag objects that match the given
- criteria. You can specify the name of the Tag and any
- attributes you want the Tag to have.
-
- The value of a key-value pair in the 'attrs' map can be a
- string, a list of strings, a regular expression object, or a
- callable that takes a string and returns whether or not the
- string matches for some custom definition of 'matches'. The
- same is true of the tag name."""
-
- generator = self.descendants
- if not recursive:
- generator = self.children
- return self._find_all(name, attrs, text, limit, generator, **kwargs)
- findAll = find_all # BS3
- findChildren = find_all # BS2
-
- #Generator methods
- @property
- def children(self):
- # return iter() to make the purpose of the method clear
- return iter(self.contents) # XXX This seems to be untested.
-
- @property
- def descendants(self):
- if not len(self.contents):
- return
- stopNode = self._last_descendant().next_element
- current = self.contents[0]
- while current is not stopNode:
- yield current
- current = current.next_element
-
- # CSS selector code
-
- _selector_combinators = ['>', '+', '~']
- _select_debug = False
- def select(self, selector, _candidate_generator=None):
- """Perform a CSS selection operation on the current element."""
- tokens = selector.split()
- current_context = [self]
-
- if tokens[-1] in self._selector_combinators:
- raise ValueError(
- 'Final combinator "%s" is missing an argument.' % tokens[-1])
- if self._select_debug:
- print 'Running CSS selector "%s"' % selector
- for index, token in enumerate(tokens):
- if self._select_debug:
- print ' Considering token "%s"' % token
- recursive_candidate_generator = None
- tag_name = None
- if tokens[index-1] in self._selector_combinators:
- # This token was consumed by the previous combinator. Skip it.
- if self._select_debug:
- print ' Token was consumed by the previous combinator.'
- continue
- # Each operation corresponds to a checker function, a rule
- # for determining whether a candidate matches the
- # selector. Candidates are generated by the active
- # iterator.
- checker = None
-
- m = self.attribselect_re.match(token)
- if m is not None:
- # Attribute selector
- tag_name, attribute, operator, value = m.groups()
- checker = self._attribute_checker(operator, attribute, value)
-
- elif '#' in token:
- # ID selector
- tag_name, tag_id = token.split('#', 1)
- def id_matches(tag):
- return tag.get('id', None) == tag_id
- checker = id_matches
-
- elif '.' in token:
- # Class selector
- tag_name, klass = token.split('.', 1)
- classes = set(klass.split('.'))
- def classes_match(candidate):
- return classes.issubset(candidate.get('class', []))
- checker = classes_match
-
- elif ':' in token:
- # Pseudo-class
- tag_name, pseudo = token.split(':', 1)
- if tag_name == '':
- raise ValueError(
- "A pseudo-class must be prefixed with a tag name.")
- pseudo_attributes = re.match('([a-zA-Z\d-]+)\(([a-zA-Z\d]+)\)', pseudo)
- found = []
- if pseudo_attributes is not None:
- pseudo_type, pseudo_value = pseudo_attributes.groups()
- if pseudo_type == 'nth-of-type':
- try:
- pseudo_value = int(pseudo_value)
- except:
- raise NotImplementedError(
- 'Only numeric values are currently supported for the nth-of-type pseudo-class.')
- if pseudo_value < 1:
- raise ValueError(
- 'nth-of-type pseudo-class value must be at least 1.')
- class Counter(object):
- def __init__(self, destination):
- self.count = 0
- self.destination = destination
-
- def nth_child_of_type(self, tag):
- self.count += 1
- if self.count == self.destination:
- return True
- if self.count > self.destination:
- # Stop the generator that's sending us
- # these things.
- raise StopIteration()
- return False
- checker = Counter(pseudo_value).nth_child_of_type
- else:
- raise NotImplementedError(
- 'Only the following pseudo-classes are implemented: nth-of-type.')
-
- elif token == '*':
- # Star selector -- matches everything
- pass
- elif token == '>':
- # Run the next token as a CSS selector against the
- # direct children of each tag in the current context.
- recursive_candidate_generator = lambda tag: tag.children
- elif token == '~':
- # Run the next token as a CSS selector against the
- # siblings of each tag in the current context.
- recursive_candidate_generator = lambda tag: tag.next_siblings
- elif token == '+':
- # For each tag in the current context, run the next
- # token as a CSS selector against the tag's next
- # sibling that's a tag.
- def next_tag_sibling(tag):
- yield tag.find_next_sibling(True)
- recursive_candidate_generator = next_tag_sibling
-
- elif self.tag_name_re.match(token):
- # Just a tag name.
- tag_name = token
- else:
- raise ValueError(
- 'Unsupported or invalid CSS selector: "%s"' % token)
-
- if recursive_candidate_generator:
- # This happens when the selector looks like "> foo".
- #
- # The generator calls select() recursively on every
- # member of the current context, passing in a different
- # candidate generator and a different selector.
- #
- # In the case of "> foo", the candidate generator is
- # one that yields a tag's direct children (">"), and
- # the selector is "foo".
- next_token = tokens[index+1]
- def recursive_select(tag):
- if self._select_debug:
- print ' Calling select("%s") recursively on %s %s' % (next_token, tag.name, tag.attrs)
- print '-' * 40
- for i in tag.select(next_token, recursive_candidate_generator):
- if self._select_debug:
- print '(Recursive select picked up candidate %s %s)' % (i.name, i.attrs)
- yield i
- if self._select_debug:
- print '-' * 40
- _use_candidate_generator = recursive_select
- elif _candidate_generator is None:
- # By default, a tag's candidates are all of its
- # children. If tag_name is defined, only yield tags
- # with that name.
- if self._select_debug:
- if tag_name:
- check = "[any]"
- else:
- check = tag_name
- print ' Default candidate generator, tag name="%s"' % check
- if self._select_debug:
- # This is redundant with later code, but it stops
- # a bunch of bogus tags from cluttering up the
- # debug log.
- def default_candidate_generator(tag):
- for child in tag.descendants:
- if not isinstance(child, Tag):
- continue
- if tag_name and not child.name == tag_name:
- continue
- yield child
- _use_candidate_generator = default_candidate_generator
- else:
- _use_candidate_generator = lambda tag: tag.descendants
- else:
- _use_candidate_generator = _candidate_generator
-
- new_context = []
- new_context_ids = set([])
- for tag in current_context:
- if self._select_debug:
- print " Running candidate generator on %s %s" % (
- tag.name, repr(tag.attrs))
- for candidate in _use_candidate_generator(tag):
- if not isinstance(candidate, Tag):
- continue
- if tag_name and candidate.name != tag_name:
- continue
- if checker is not None:
- try:
- result = checker(candidate)
- except StopIteration:
- # The checker has decided we should no longer
- # run the generator.
- break
- if checker is None or result:
- if self._select_debug:
- print " SUCCESS %s %s" % (candidate.name, repr(candidate.attrs))
- if id(candidate) not in new_context_ids:
- # If a tag matches a selector more than once,
- # don't include it in the context more than once.
- new_context.append(candidate)
- new_context_ids.add(id(candidate))
- elif self._select_debug:
- print " FAILURE %s %s" % (candidate.name, repr(candidate.attrs))
-
- current_context = new_context
-
- if self._select_debug:
- print "Final verdict:"
- for i in current_context:
- print " %s %s" % (i.name, i.attrs)
- return current_context
-
- # Old names for backwards compatibility
- def childGenerator(self):
- return self.children
-
- def recursiveChildGenerator(self):
- return self.descendants
-
- def has_key(self, key):
- """This was kind of misleading because has_key() (attributes)
- was different from __in__ (contents). has_key() is gone in
- Python 3, anyway."""
- warnings.warn('has_key is deprecated. Use has_attr("%s") instead.' % (
- key))
- return self.has_attr(key)
-
-# Next, a couple classes to represent queries and their results.
-class SoupStrainer(object):
- """Encapsulates a number of ways of matching a markup element (tag or
- text)."""
-
- def __init__(self, name=None, attrs={}, text=None, **kwargs):
- self.name = self._normalize_search_value(name)
- if not isinstance(attrs, dict):
- # Treat a non-dict value for attrs as a search for the 'class'
- # attribute.
- kwargs['class'] = attrs
- attrs = None
-
- if 'class_' in kwargs:
- # Treat class_="foo" as a search for the 'class'
- # attribute, overriding any non-dict value for attrs.
- kwargs['class'] = kwargs['class_']
- del kwargs['class_']
-
- if kwargs:
- if attrs:
- attrs = attrs.copy()
- attrs.update(kwargs)
- else:
- attrs = kwargs
- normalized_attrs = {}
- for key, value in attrs.items():
- normalized_attrs[key] = self._normalize_search_value(value)
-
- self.attrs = normalized_attrs
- self.text = self._normalize_search_value(text)
-
- def _normalize_search_value(self, value):
- # Leave it alone if it's a Unicode string, a callable, a
- # regular expression, a boolean, or None.
- if (isinstance(value, unicode) or callable(value) or hasattr(value, 'match')
- or isinstance(value, bool) or value is None):
- return value
-
- # If it's a bytestring, convert it to Unicode, treating it as UTF-8.
- if isinstance(value, bytes):
- return value.decode("utf8")
-
- # If it's listlike, convert it into a list of strings.
- if hasattr(value, '__iter__'):
- new_value = []
- for v in value:
- if (hasattr(v, '__iter__') and not isinstance(v, bytes)
- and not isinstance(v, unicode)):
- # This is almost certainly the user's mistake. In the
- # interests of avoiding infinite loops, we'll let
- # it through as-is rather than doing a recursive call.
- new_value.append(v)
- else:
- new_value.append(self._normalize_search_value(v))
- return new_value
-
- # Otherwise, convert it into a Unicode string.
- # The unicode(str()) thing is so this will do the same thing on Python 2
- # and Python 3.
- return unicode(str(value))
-
- def __str__(self):
- if self.text:
- return self.text
- else:
- return "%s|%s" % (self.name, self.attrs)
-
- def search_tag(self, markup_name=None, markup_attrs={}):
- found = None
- markup = None
- if isinstance(markup_name, Tag):
- markup = markup_name
- markup_attrs = markup
- call_function_with_tag_data = (
- isinstance(self.name, collections.Callable)
- and not isinstance(markup_name, Tag))
-
- if ((not self.name)
- or call_function_with_tag_data
- or (markup and self._matches(markup, self.name))
- or (not markup and self._matches(markup_name, self.name))):
- if call_function_with_tag_data:
- match = self.name(markup_name, markup_attrs)
- else:
- match = True
- markup_attr_map = None
- for attr, match_against in list(self.attrs.items()):
- if not markup_attr_map:
- if hasattr(markup_attrs, 'get'):
- markup_attr_map = markup_attrs
- else:
- markup_attr_map = {}
- for k, v in markup_attrs:
- markup_attr_map[k] = v
- attr_value = markup_attr_map.get(attr)
- if not self._matches(attr_value, match_against):
- match = False
- break
- if match:
- if markup:
- found = markup
- else:
- found = markup_name
- if found and self.text and not self._matches(found.string, self.text):
- found = None
- return found
- searchTag = search_tag
-
- def search(self, markup):
- # print 'looking for %s in %s' % (self, markup)
- found = None
- # If given a list of items, scan it for a text element that
- # matches.
- if hasattr(markup, '__iter__') and not isinstance(markup, (Tag, basestring)):
- for element in markup:
- if isinstance(element, NavigableString) \
- and self.search(element):
- found = element
- break
- # If it's a Tag, make sure its name or attributes match.
- # Don't bother with Tags if we're searching for text.
- elif isinstance(markup, Tag):
- if not self.text or self.name or self.attrs:
- found = self.search_tag(markup)
- # If it's text, make sure the text matches.
- elif isinstance(markup, NavigableString) or \
- isinstance(markup, basestring):
- if not self.name and not self.attrs and self._matches(markup, self.text):
- found = markup
- else:
- raise Exception(
- "I don't know how to match against a %s" % markup.__class__)
- return found
-
- def _matches(self, markup, match_against):
- # print u"Matching %s against %s" % (markup, match_against)
- result = False
- if isinstance(markup, list) or isinstance(markup, tuple):
- # This should only happen when searching a multi-valued attribute
- # like 'class'.
- if (isinstance(match_against, unicode)
- and ' ' in match_against):
- # A bit of a special case. If they try to match "foo
- # bar" on a multivalue attribute's value, only accept
- # the literal value "foo bar"
- #
- # XXX This is going to be pretty slow because we keep
- # splitting match_against. But it shouldn't come up
- # too often.
- return (whitespace_re.split(match_against) == markup)
- else:
- for item in markup:
- if self._matches(item, match_against):
- return True
- return False
-
- if match_against is True:
- # True matches any non-None value.
- return markup is not None
-
- if isinstance(match_against, collections.Callable):
- return match_against(markup)
-
- # Custom callables take the tag as an argument, but all
- # other ways of matching match the tag name as a string.
- if isinstance(markup, Tag):
- markup = markup.name
-
- # Ensure that `markup` is either a Unicode string, or None.
- markup = self._normalize_search_value(markup)
-
- if markup is None:
- # None matches None, False, an empty string, an empty list, and so on.
- return not match_against
-
- if isinstance(match_against, unicode):
- # Exact string match
- return markup == match_against
-
- if hasattr(match_against, 'match'):
- # Regexp match
- return match_against.search(markup)
-
- if hasattr(match_against, '__iter__'):
- # The markup must be an exact match against something
- # in the iterable.
- return markup in match_against
-
-
-class ResultSet(list):
- """A ResultSet is just a list that keeps track of the SoupStrainer
- that created it."""
- def __init__(self, source, result=()):
- super(ResultSet, self).__init__(result)
- self.source = source
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/testing.py b/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/testing.py
deleted file mode 100644
index fd4495ac58c..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/bs4/testing.py
+++ /dev/null
@@ -1,592 +0,0 @@
-"""Helper classes for tests."""
-
-import copy
-import functools
-import unittest
-from unittest import TestCase
-from bs4 import BeautifulSoup
-from bs4.element import (
- CharsetMetaAttributeValue,
- Comment,
- ContentMetaAttributeValue,
- Doctype,
- SoupStrainer,
-)
-
-from bs4.builder import HTMLParserTreeBuilder
-default_builder = HTMLParserTreeBuilder
-
-
-class SoupTest(unittest.TestCase):
-
- @property
- def default_builder(self):
- return default_builder()
-
- def soup(self, markup, **kwargs):
- """Build a Beautiful Soup object from markup."""
- builder = kwargs.pop('builder', self.default_builder)
- return BeautifulSoup(markup, builder=builder, **kwargs)
-
- def document_for(self, markup):
- """Turn an HTML fragment into a document.
-
- The details depend on the builder.
- """
- return self.default_builder.test_fragment_to_document(markup)
-
- def assertSoupEquals(self, to_parse, compare_parsed_to=None):
- builder = self.default_builder
- obj = BeautifulSoup(to_parse, builder=builder)
- if compare_parsed_to is None:
- compare_parsed_to = to_parse
-
- self.assertEqual(obj.decode(), self.document_for(compare_parsed_to))
-
-
-class HTMLTreeBuilderSmokeTest(object):
-
- """A basic test of a treebuilder's competence.
-
- Any HTML treebuilder, present or future, should be able to pass
- these tests. With invalid markup, there's room for interpretation,
- and different parsers can handle it differently. But with the
- markup in these tests, there's not much room for interpretation.
- """
-
- def assertDoctypeHandled(self, doctype_fragment):
- """Assert that a given doctype string is handled correctly."""
- doctype_str, soup = self._document_with_doctype(doctype_fragment)
-
- # Make sure a Doctype object was created.
- doctype = soup.contents[0]
- self.assertEqual(doctype.__class__, Doctype)
- self.assertEqual(doctype, doctype_fragment)
- self.assertEqual(str(soup)[:len(doctype_str)], doctype_str)
-
- # Make sure that the doctype was correctly associated with the
- # parse tree and that the rest of the document parsed.
- self.assertEqual(soup.p.contents[0], 'foo')
-
- def _document_with_doctype(self, doctype_fragment):
- """Generate and parse a document with the given doctype."""
- doctype = '<!DOCTYPE %s>' % doctype_fragment
- markup = doctype + '\n<p>foo</p>'
- soup = self.soup(markup)
- return doctype, soup
-
- def test_normal_doctypes(self):
- """Make sure normal, everyday HTML doctypes are handled correctly."""
- self.assertDoctypeHandled("html")
- self.assertDoctypeHandled(
- 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"')
-
- def test_empty_doctype(self):
- soup = self.soup("<!DOCTYPE>")
- doctype = soup.contents[0]
- self.assertEqual("", doctype.strip())
-
- def test_public_doctype_with_url(self):
- doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"'
- self.assertDoctypeHandled(doctype)
-
- def test_system_doctype(self):
- self.assertDoctypeHandled('foo SYSTEM "http://www.example.com/"')
-
- def test_namespaced_system_doctype(self):
- # We can handle a namespaced doctype with a system ID.
- self.assertDoctypeHandled('xsl:stylesheet SYSTEM "htmlent.dtd"')
-
- def test_namespaced_public_doctype(self):
- # Test a namespaced doctype with a public id.
- self.assertDoctypeHandled('xsl:stylesheet PUBLIC "htmlent.dtd"')
-
- def test_real_xhtml_document(self):
- """A real XHTML document should come out more or less the same as it went in."""
- markup = b"""<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><title>Hello.</title></head>
-<body>Goodbye.</body>
-</html>"""
- soup = self.soup(markup)
- self.assertEqual(
- soup.encode("utf-8").replace(b"\n", b""),
- markup.replace(b"\n", b""))
-
- def test_deepcopy(self):
- """Make sure you can copy the tree builder.
-
- This is important because the builder is part of a
- BeautifulSoup object, and we want to be able to copy that.
- """
- copy.deepcopy(self.default_builder)
-
- def test_p_tag_is_never_empty_element(self):
- """A <p> tag is never designated as an empty-element tag.
-
- Even if the markup shows it as an empty-element tag, it
- shouldn't be presented that way.
- """
- soup = self.soup("<p/>")
- self.assertFalse(soup.p.is_empty_element)
- self.assertEqual(str(soup.p), "<p></p>")
-
- def test_unclosed_tags_get_closed(self):
- """A tag that's not closed by the end of the document should be closed.
-
- This applies to all tags except empty-element tags.
- """
- self.assertSoupEquals("<p>", "<p></p>")
- self.assertSoupEquals("<b>", "<b></b>")
-
- self.assertSoupEquals("<br>", "<br/>")
-
- def test_br_is_always_empty_element_tag(self):
- """A <br> tag is designated as an empty-element tag.
-
- Some parsers treat <br></br> as one <br/> tag, some parsers as
- two tags, but it should always be an empty-element tag.
- """
- soup = self.soup("<br></br>")
- self.assertTrue(soup.br.is_empty_element)
- self.assertEqual(str(soup.br), "<br/>")
-
- def test_nested_formatting_elements(self):
- self.assertSoupEquals("<em><em></em></em>")
-
- def test_comment(self):
- # Comments are represented as Comment objects.
- markup = "<p>foo<!--foobar-->baz</p>"
- self.assertSoupEquals(markup)
-
- soup = self.soup(markup)
- comment = soup.find(text="foobar")
- self.assertEqual(comment.__class__, Comment)
-
- # The comment is properly integrated into the tree.
- foo = soup.find(text="foo")
- self.assertEqual(comment, foo.next_element)
- baz = soup.find(text="baz")
- self.assertEqual(comment, baz.previous_element)
-
- def test_preserved_whitespace_in_pre_and_textarea(self):
- """Whitespace must be preserved in <pre> and <textarea> tags."""
- self.assertSoupEquals("<pre> </pre>")
- self.assertSoupEquals("<textarea> woo </textarea>")
-
- def test_nested_inline_elements(self):
- """Inline elements can be nested indefinitely."""
- b_tag = "<b>Inside a B tag</b>"
- self.assertSoupEquals(b_tag)
-
- nested_b_tag = "<p>A <i>nested <b>tag</b></i></p>"
- self.assertSoupEquals(nested_b_tag)
-
- double_nested_b_tag = "<p>A <a>doubly <i>nested <b>tag</b></i></a></p>"
- self.assertSoupEquals(nested_b_tag)
-
- def test_nested_block_level_elements(self):
- """Block elements can be nested."""
- soup = self.soup('<blockquote><p><b>Foo</b></p></blockquote>')
- blockquote = soup.blockquote
- self.assertEqual(blockquote.p.b.string, 'Foo')
- self.assertEqual(blockquote.b.string, 'Foo')
-
- def test_correctly_nested_tables(self):
- """One table can go inside another one."""
- markup = ('<table id="1">'
- '<tr>'
- "<td>Here's another table:"
- '<table id="2">'
- '<tr><td>foo</td></tr>'
- '</table></td>')
-
- self.assertSoupEquals(
- markup,
- '<table id="1"><tr><td>Here\'s another table:'
- '<table id="2"><tr><td>foo</td></tr></table>'
- '</td></tr></table>')
-
- self.assertSoupEquals(
- "<table><thead><tr><td>Foo</td></tr></thead>"
- "<tbody><tr><td>Bar</td></tr></tbody>"
- "<tfoot><tr><td>Baz</td></tr></tfoot></table>")
-
- def test_deeply_nested_multivalued_attribute(self):
- # html5lib can set the attributes of the same tag many times
- # as it rearranges the tree. This has caused problems with
- # multivalued attributes.
- markup = '<table><div><div class="css"></div></div></table>'
- soup = self.soup(markup)
- self.assertEqual(["css"], soup.div.div['class'])
-
- def test_angle_brackets_in_attribute_values_are_escaped(self):
- self.assertSoupEquals('<a b="<a>"></a>', '<a b="&lt;a&gt;"></a>')
-
- def test_entities_in_attributes_converted_to_unicode(self):
- expect = u'<p id="pi\N{LATIN SMALL LETTER N WITH TILDE}ata"></p>'
- self.assertSoupEquals('<p id="pi&#241;ata"></p>', expect)
- self.assertSoupEquals('<p id="pi&#xf1;ata"></p>', expect)
- self.assertSoupEquals('<p id="pi&#Xf1;ata"></p>', expect)
- self.assertSoupEquals('<p id="pi&ntilde;ata"></p>', expect)
-
- def test_entities_in_text_converted_to_unicode(self):
- expect = u'<p>pi\N{LATIN SMALL LETTER N WITH TILDE}ata</p>'
- self.assertSoupEquals("<p>pi&#241;ata</p>", expect)
- self.assertSoupEquals("<p>pi&#xf1;ata</p>", expect)
- self.assertSoupEquals("<p>pi&#Xf1;ata</p>", expect)
- self.assertSoupEquals("<p>pi&ntilde;ata</p>", expect)
-
- def test_quot_entity_converted_to_quotation_mark(self):
- self.assertSoupEquals("<p>I said &quot;good day!&quot;</p>",
- '<p>I said "good day!"</p>')
-
- def test_out_of_range_entity(self):
- expect = u"\N{REPLACEMENT CHARACTER}"
- self.assertSoupEquals("&#10000000000000;", expect)
- self.assertSoupEquals("&#x10000000000000;", expect)
- self.assertSoupEquals("&#1000000000;", expect)
-
- def test_multipart_strings(self):
- "Mostly to prevent a recurrence of a bug in the html5lib treebuilder."
- soup = self.soup("<html><h2>\nfoo</h2><p></p></html>")
- self.assertEqual("p", soup.h2.string.next_element.name)
- self.assertEqual("p", soup.p.name)
-
- def test_basic_namespaces(self):
- """Parsers don't need to *understand* namespaces, but at the
- very least they should not choke on namespaces or lose
- data."""
-
- markup = b'<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg"><head></head><body><mathml:msqrt>4</mathml:msqrt><b svg:fill="red"></b></body></html>'
- soup = self.soup(markup)
- self.assertEqual(markup, soup.encode())
- html = soup.html
- self.assertEqual('http://www.w3.org/1999/xhtml', soup.html['xmlns'])
- self.assertEqual(
- 'http://www.w3.org/1998/Math/MathML', soup.html['xmlns:mathml'])
- self.assertEqual(
- 'http://www.w3.org/2000/svg', soup.html['xmlns:svg'])
-
- def test_multivalued_attribute_value_becomes_list(self):
- markup = b'<a class="foo bar">'
- soup = self.soup(markup)
- self.assertEqual(['foo', 'bar'], soup.a['class'])
-
- #
- # Generally speaking, tests below this point are more tests of
- # Beautiful Soup than tests of the tree builders. But parsers are
- # weird, so we run these tests separately for every tree builder
- # to detect any differences between them.
- #
-
- def test_can_parse_unicode_document(self):
- # A seemingly innocuous document... but it's in Unicode! And
- # it contains characters that can't be represented in the
- # encoding found in the declaration! The horror!
- markup = u'<html><head><meta encoding="euc-jp"></head><body>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</body>'
- soup = self.soup(markup)
- self.assertEqual(u'Sacr\xe9 bleu!', soup.body.string)
-
- def test_soupstrainer(self):
- """Parsers should be able to work with SoupStrainers."""
- strainer = SoupStrainer("b")
- soup = self.soup("A <b>bold</b> <meta/> <i>statement</i>",
- parse_only=strainer)
- self.assertEqual(soup.decode(), "<b>bold</b>")
-
- def test_single_quote_attribute_values_become_double_quotes(self):
- self.assertSoupEquals("<foo attr='bar'></foo>",
- '<foo attr="bar"></foo>')
-
- def test_attribute_values_with_nested_quotes_are_left_alone(self):
- text = """<foo attr='bar "brawls" happen'>a</foo>"""
- self.assertSoupEquals(text)
-
- def test_attribute_values_with_double_nested_quotes_get_quoted(self):
- text = """<foo attr='bar "brawls" happen'>a</foo>"""
- soup = self.soup(text)
- soup.foo['attr'] = 'Brawls happen at "Bob\'s Bar"'
- self.assertSoupEquals(
- soup.foo.decode(),
- """<foo attr="Brawls happen at &quot;Bob\'s Bar&quot;">a</foo>""")
-
- def test_ampersand_in_attribute_value_gets_escaped(self):
- self.assertSoupEquals('<this is="really messed up & stuff"></this>',
- '<this is="really messed up &amp; stuff"></this>')
-
- self.assertSoupEquals(
- '<a href="http://example.org?a=1&b=2;3">foo</a>',
- '<a href="http://example.org?a=1&amp;b=2;3">foo</a>')
-
- def test_escaped_ampersand_in_attribute_value_is_left_alone(self):
- self.assertSoupEquals('<a href="http://example.org?a=1&amp;b=2;3"></a>')
-
- def test_entities_in_strings_converted_during_parsing(self):
- # Both XML and HTML entities are converted to Unicode characters
- # during parsing.
- text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
- expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>"
- self.assertSoupEquals(text, expected)
-
- def test_smart_quotes_converted_on_the_way_in(self):
- # Microsoft smart quotes are converted to Unicode characters during
- # parsing.
- quote = b"<p>\x91Foo\x92</p>"
- soup = self.soup(quote)
- self.assertEqual(
- soup.p.string,
- u"\N{LEFT SINGLE QUOTATION MARK}Foo\N{RIGHT SINGLE QUOTATION MARK}")
-
- def test_non_breaking_spaces_converted_on_the_way_in(self):
- soup = self.soup("<a>&nbsp;&nbsp;</a>")
- self.assertEqual(soup.a.string, u"\N{NO-BREAK SPACE}" * 2)
-
- def test_entities_converted_on_the_way_out(self):
- text = "<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>"
- expected = u"<p>&lt;&lt;sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!&gt;&gt;</p>".encode("utf-8")
- soup = self.soup(text)
- self.assertEqual(soup.p.encode("utf-8"), expected)
-
- def test_real_iso_latin_document(self):
- # Smoke test of interrelated functionality, using an
- # easy-to-understand document.
-
- # Here it is in Unicode. Note that it claims to be in ISO-Latin-1.
- unicode_html = u'<html><head><meta content="text/html; charset=ISO-Latin-1" http-equiv="Content-type"/></head><body><p>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</p></body></html>'
-
- # That's because we're going to encode it into ISO-Latin-1, and use
- # that to test.
- iso_latin_html = unicode_html.encode("iso-8859-1")
-
- # Parse the ISO-Latin-1 HTML.
- soup = self.soup(iso_latin_html)
- # Encode it to UTF-8.
- result = soup.encode("utf-8")
-
- # What do we expect the result to look like? Well, it would
- # look like unicode_html, except that the META tag would say
- # UTF-8 instead of ISO-Latin-1.
- expected = unicode_html.replace("ISO-Latin-1", "utf-8")
-
- # And, of course, it would be in UTF-8, not Unicode.
- expected = expected.encode("utf-8")
-
- # Ta-da!
- self.assertEqual(result, expected)
-
- def test_real_shift_jis_document(self):
- # Smoke test to make sure the parser can handle a document in
- # Shift-JIS encoding, without choking.
- shift_jis_html = (
- b'<html><head></head><body><pre>'
- b'\x82\xb1\x82\xea\x82\xcdShift-JIS\x82\xc5\x83R\x81[\x83f'
- b'\x83B\x83\x93\x83O\x82\xb3\x82\xea\x82\xbd\x93\xfa\x96{\x8c'
- b'\xea\x82\xcc\x83t\x83@\x83C\x83\x8b\x82\xc5\x82\xb7\x81B'
- b'</pre></body></html>')
- unicode_html = shift_jis_html.decode("shift-jis")
- soup = self.soup(unicode_html)
-
- # Make sure the parse tree is correctly encoded to various
- # encodings.
- self.assertEqual(soup.encode("utf-8"), unicode_html.encode("utf-8"))
- self.assertEqual(soup.encode("euc_jp"), unicode_html.encode("euc_jp"))
-
- def test_real_hebrew_document(self):
- # A real-world test to make sure we can convert ISO-8859-9 (a
- # Hebrew encoding) to UTF-8.
- hebrew_document = b'<html><head><title>Hebrew (ISO 8859-8) in Visual Directionality</title></head><body><h1>Hebrew (ISO 8859-8) in Visual Directionality</h1>\xed\xe5\xec\xf9</body></html>'
- soup = self.soup(
- hebrew_document, from_encoding="iso8859-8")
- self.assertEqual(soup.original_encoding, 'iso8859-8')
- self.assertEqual(
- soup.encode('utf-8'),
- hebrew_document.decode("iso8859-8").encode("utf-8"))
-
- def test_meta_tag_reflects_current_encoding(self):
- # Here's the <meta> tag saying that a document is
- # encoded in Shift-JIS.
- meta_tag = ('<meta content="text/html; charset=x-sjis" '
- 'http-equiv="Content-type"/>')
-
- # Here's a document incorporating that meta tag.
- shift_jis_html = (
- '<html><head>\n%s\n'
- '<meta http-equiv="Content-language" content="ja"/>'
- '</head><body>Shift-JIS markup goes here.') % meta_tag
- soup = self.soup(shift_jis_html)
-
- # Parse the document, and the charset is seemingly unaffected.
- parsed_meta = soup.find('meta', {'http-equiv': 'Content-type'})
- content = parsed_meta['content']
- self.assertEqual('text/html; charset=x-sjis', content)
-
- # But that value is actually a ContentMetaAttributeValue object.
- self.assertTrue(isinstance(content, ContentMetaAttributeValue))
-
- # And it will take on a value that reflects its current
- # encoding.
- self.assertEqual('text/html; charset=utf8', content.encode("utf8"))
-
- # For the rest of the story, see TestSubstitutions in
- # test_tree.py.
-
- def test_html5_style_meta_tag_reflects_current_encoding(self):
- # Here's the <meta> tag saying that a document is
- # encoded in Shift-JIS.
- meta_tag = ('<meta id="encoding" charset="x-sjis" />')
-
- # Here's a document incorporating that meta tag.
- shift_jis_html = (
- '<html><head>\n%s\n'
- '<meta http-equiv="Content-language" content="ja"/>'
- '</head><body>Shift-JIS markup goes here.') % meta_tag
- soup = self.soup(shift_jis_html)
-
- # Parse the document, and the charset is seemingly unaffected.
- parsed_meta = soup.find('meta', id="encoding")
- charset = parsed_meta['charset']
- self.assertEqual('x-sjis', charset)
-
- # But that value is actually a CharsetMetaAttributeValue object.
- self.assertTrue(isinstance(charset, CharsetMetaAttributeValue))
-
- # And it will take on a value that reflects its current
- # encoding.
- self.assertEqual('utf8', charset.encode("utf8"))
-
- def test_tag_with_no_attributes_can_have_attributes_added(self):
- data = self.soup("<a>text</a>")
- data.a['foo'] = 'bar'
- self.assertEqual('<a foo="bar">text</a>', data.a.decode())
-
-class XMLTreeBuilderSmokeTest(object):
-
- def test_docstring_generated(self):
- soup = self.soup("<root/>")
- self.assertEqual(
- soup.encode(), b'<?xml version="1.0" encoding="utf-8"?>\n<root/>')
-
- def test_real_xhtml_document(self):
- """A real XHTML document should come out *exactly* the same as it went in."""
- markup = b"""<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><title>Hello.</title></head>
-<body>Goodbye.</body>
-</html>"""
- soup = self.soup(markup)
- self.assertEqual(
- soup.encode("utf-8"), markup)
-
- def test_formatter_processes_script_tag_for_xml_documents(self):
- doc = """
- <script type="text/javascript">
- </script>
-"""
- soup = BeautifulSoup(doc, "xml")
- # lxml would have stripped this while parsing, but we can add
- # it later.
- soup.script.string = 'console.log("< < hey > > ");'
- encoded = soup.encode()
- self.assertTrue(b"&lt; &lt; hey &gt; &gt;" in encoded)
-
- def test_can_parse_unicode_document(self):
- markup = u'<?xml version="1.0" encoding="euc-jp"><root>Sacr\N{LATIN SMALL LETTER E WITH ACUTE} bleu!</root>'
- soup = self.soup(markup)
- self.assertEqual(u'Sacr\xe9 bleu!', soup.root.string)
-
- def test_popping_namespaced_tag(self):
- markup = '<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>'
- soup = self.soup(markup)
- self.assertEqual(
- unicode(soup.rss), markup)
-
- def test_docstring_includes_correct_encoding(self):
- soup = self.soup("<root/>")
- self.assertEqual(
- soup.encode("latin1"),
- b'<?xml version="1.0" encoding="latin1"?>\n<root/>')
-
- def test_large_xml_document(self):
- """A large XML document should come out the same as it went in."""
- markup = (b'<?xml version="1.0" encoding="utf-8"?>\n<root>'
- + b'0' * (2**12)
- + b'</root>')
- soup = self.soup(markup)
- self.assertEqual(soup.encode("utf-8"), markup)
-
-
- def test_tags_are_empty_element_if_and_only_if_they_are_empty(self):
- self.assertSoupEquals("<p>", "<p/>")
- self.assertSoupEquals("<p>foo</p>")
-
- def test_namespaces_are_preserved(self):
- markup = '<root xmlns:a="http://example.com/" xmlns:b="http://example.net/"><a:foo>This tag is in the a namespace</a:foo><b:foo>This tag is in the b namespace</b:foo></root>'
- soup = self.soup(markup)
- root = soup.root
- self.assertEqual("http://example.com/", root['xmlns:a'])
- self.assertEqual("http://example.net/", root['xmlns:b'])
-
- def test_closing_namespaced_tag(self):
- markup = '<p xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>20010504</dc:date></p>'
- soup = self.soup(markup)
- self.assertEqual(unicode(soup.p), markup)
-
- def test_namespaced_attributes(self):
- markup = '<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bar xsi:schemaLocation="http://www.example.com"/></foo>'
- soup = self.soup(markup)
- self.assertEqual(unicode(soup.foo), markup)
-
- def test_namespaced_attributes_xml_namespace(self):
- markup = '<foo xml:lang="fr">bar</foo>'
- soup = self.soup(markup)
- self.assertEqual(unicode(soup.foo), markup)
-
-class HTML5TreeBuilderSmokeTest(HTMLTreeBuilderSmokeTest):
- """Smoke test for a tree builder that supports HTML5."""
-
- def test_real_xhtml_document(self):
- # Since XHTML is not HTML5, HTML5 parsers are not tested to handle
- # XHTML documents in any particular way.
- pass
-
- def test_html_tags_have_namespace(self):
- markup = "<a>"
- soup = self.soup(markup)
- self.assertEqual("http://www.w3.org/1999/xhtml", soup.a.namespace)
-
- def test_svg_tags_have_namespace(self):
- markup = '<svg><circle/></svg>'
- soup = self.soup(markup)
- namespace = "http://www.w3.org/2000/svg"
- self.assertEqual(namespace, soup.svg.namespace)
- self.assertEqual(namespace, soup.circle.namespace)
-
-
- def test_mathml_tags_have_namespace(self):
- markup = '<math><msqrt>5</msqrt></math>'
- soup = self.soup(markup)
- namespace = 'http://www.w3.org/1998/Math/MathML'
- self.assertEqual(namespace, soup.math.namespace)
- self.assertEqual(namespace, soup.msqrt.namespace)
-
- def test_xml_declaration_becomes_comment(self):
- markup = '<?xml version="1.0" encoding="utf-8"?><html></html>'
- soup = self.soup(markup)
- self.assertTrue(isinstance(soup.contents[0], Comment))
- self.assertEqual(soup.contents[0], '?xml version="1.0" encoding="utf-8"?')
- self.assertEqual("html", soup.contents[0].next_element.name)
-
-def skipIf(condition, reason):
- def nothing(test, *args, **kwargs):
- return None
-
- def decorator(test_item):
- if condition:
- return nothing
- else:
- return test_item
-
- return decorator
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/Makefile b/chromium/third_party/catapult/third_party/beautifulsoup4/doc/Makefile
deleted file mode 100644
index 8c833d2cedb..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/Makefile
+++ /dev/null
@@ -1,130 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/BeautifulSoup.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/BeautifulSoup.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/BeautifulSoup"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/BeautifulSoup"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- make -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/6.1.jpg b/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/6.1.jpg
deleted file mode 100644
index 97014f0ec04..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/6.1.jpg
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/conf.py b/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/conf.py
deleted file mode 100644
index 102c3cf972a..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/conf.py
+++ /dev/null
@@ -1,256 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Beautiful Soup documentation build configuration file, created by
-# sphinx-quickstart on Thu Jan 26 11:22:55 2012.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-
-# -- General configuration -----------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'Beautiful Soup'
-copyright = u'2012, Leonard Richardson'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '4'
-# The full version, including alpha/beta/rc tags.
-release = '4.2.0'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = []
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'BeautifulSoupdoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
- ('index', 'BeautifulSoup.tex', u'Beautiful Soup Documentation',
- u'Leonard Richardson', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'beautifulsoup', u'Beautiful Soup Documentation',
- [u'Leonard Richardson'], 1)
-]
-
-
-# -- Options for Epub output ---------------------------------------------------
-
-# Bibliographic Dublin Core info.
-epub_title = u'Beautiful Soup'
-epub_author = u'Leonard Richardson'
-epub_publisher = u'Leonard Richardson'
-epub_copyright = u'2012, Leonard Richardson'
-
-# The language of the text. It defaults to the language option
-# or en if the language is not set.
-#epub_language = ''
-
-# The scheme of the identifier. Typical schemes are ISBN or URL.
-#epub_scheme = ''
-
-# The unique identifier of the text. This can be a ISBN number
-# or the project homepage.
-#epub_identifier = ''
-
-# A unique identification for the text.
-#epub_uid = ''
-
-# HTML files that should be inserted before the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_pre_files = []
-
-# HTML files shat should be inserted after the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_post_files = []
-
-# A list of files that should not be packed into the epub file.
-#epub_exclude_files = []
-
-# The depth of the table of contents in toc.ncx.
-#epub_tocdepth = 3
-
-# Allow duplicate toc entries.
-#epub_tocdup = True
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/index.rst b/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/index.rst
deleted file mode 100644
index 0e5f6d174ee..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/doc/source/index.rst
+++ /dev/null
@@ -1,3049 +0,0 @@
-Beautiful Soup Documentation
-============================
-
-.. image:: 6.1.jpg
- :align: right
- :alt: "The Fish-Footman began by producing from under his arm a great letter, nearly as large as himself."
-
-`Beautiful Soup <http://www.crummy.com/software/BeautifulSoup/>`_ is a
-Python library for pulling data out of HTML and XML files. It works
-with your favorite parser to provide idiomatic ways of navigating,
-searching, and modifying the parse tree. It commonly saves programmers
-hours or days of work.
-
-These instructions illustrate all major features of Beautiful Soup 4,
-with examples. I show you what the library is good for, how it works,
-how to use it, how to make it do what you want, and what to do when it
-violates your expectations.
-
-The examples in this documentation should work the same way in Python
-2.7 and Python 3.2.
-
-You might be looking for the documentation for `Beautiful Soup 3
-<http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_.
-If so, you should know that Beautiful Soup 3 is no longer being
-developed, and that Beautiful Soup 4 is recommended for all new
-projects. If you want to learn about the differences between Beautiful
-Soup 3 and Beautiful Soup 4, see `Porting code to BS4`_.
-
-This documentation has been translated into other languages by its users.
-
-* 이 문서는 한국어 번역도 가능합니다. (`외부 링크 <http://coreapython.hosting.paran.com/etc/beautifulsoup4.html>`_)
-
-Getting help
-------------
-
-If you have questions about Beautiful Soup, or run into problems,
-`send mail to the discussion group
-<https://groups.google.com/forum/?fromgroups#!forum/beautifulsoup>`_. If
-your problem involves parsing an HTML document, be sure to mention
-:ref:`what the diagnose() function says <diagnose>` about
-that document.
-
-Quick Start
-===========
-
-Here's an HTML document I'll be using as an example throughout this
-document. It's part of a story from `Alice in Wonderland`::
-
- html_doc = """
- <html><head><title>The Dormouse's story</title></head>
- <body>
- <p class="title"><b>The Dormouse's story</b></p>
-
- <p class="story">Once upon a time there were three little sisters; and their names were
- <a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,
- <a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and
- <a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>;
- and they lived at the bottom of a well.</p>
-
- <p class="story">...</p>
- """
-
-Running the "three sisters" document through Beautiful Soup gives us a
-``BeautifulSoup`` object, which represents the document as a nested
-data structure::
-
- from bs4 import BeautifulSoup
- soup = BeautifulSoup(html_doc)
-
- print(soup.prettify())
- # <html>
- # <head>
- # <title>
- # The Dormouse's story
- # </title>
- # </head>
- # <body>
- # <p class="title">
- # <b>
- # The Dormouse's story
- # </b>
- # </p>
- # <p class="story">
- # Once upon a time there were three little sisters; and their names were
- # <a class="sister" href="http://example.com/elsie" id="link1">
- # Elsie
- # </a>
- # ,
- # <a class="sister" href="http://example.com/lacie" id="link2">
- # Lacie
- # </a>
- # and
- # <a class="sister" href="http://example.com/tillie" id="link2">
- # Tillie
- # </a>
- # ; and they lived at the bottom of a well.
- # </p>
- # <p class="story">
- # ...
- # </p>
- # </body>
- # </html>
-
-Here are some simple ways to navigate that data structure::
-
- soup.title
- # <title>The Dormouse's story</title>
-
- soup.title.name
- # u'title'
-
- soup.title.string
- # u'The Dormouse's story'
-
- soup.title.parent.name
- # u'head'
-
- soup.p
- # <p class="title"><b>The Dormouse's story</b></p>
-
- soup.p['class']
- # u'title'
-
- soup.a
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
-
- soup.find_all('a')
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.find(id="link3")
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>
-
-One common task is extracting all the URLs found within a page's <a> tags::
-
- for link in soup.find_all('a'):
- print(link.get('href'))
- # http://example.com/elsie
- # http://example.com/lacie
- # http://example.com/tillie
-
-Another common task is extracting all the text from a page::
-
- print(soup.get_text())
- # The Dormouse's story
- #
- # The Dormouse's story
- #
- # Once upon a time there were three little sisters; and their names were
- # Elsie,
- # Lacie and
- # Tillie;
- # and they lived at the bottom of a well.
- #
- # ...
-
-Does this look like what you need? If so, read on.
-
-Installing Beautiful Soup
-=========================
-
-If you're using a recent version of Debian or Ubuntu Linux, you can
-install Beautiful Soup with the system package manager:
-
-:kbd:`$ apt-get install python-bs4`
-
-Beautiful Soup 4 is published through PyPi, so if you can't install it
-with the system packager, you can install it with ``easy_install`` or
-``pip``. The package name is ``beautifulsoup4``, and the same package
-works on Python 2 and Python 3.
-
-:kbd:`$ easy_install beautifulsoup4`
-
-:kbd:`$ pip install beautifulsoup4`
-
-(The ``BeautifulSoup`` package is probably `not` what you want. That's
-the previous major release, `Beautiful Soup 3`_. Lots of software uses
-BS3, so it's still available, but if you're writing new code you
-should install ``beautifulsoup4``.)
-
-If you don't have ``easy_install`` or ``pip`` installed, you can
-`download the Beautiful Soup 4 source tarball
-<http://www.crummy.com/software/BeautifulSoup/download/4.x/>`_ and
-install it with ``setup.py``.
-
-:kbd:`$ python setup.py install`
-
-If all else fails, the license for Beautiful Soup allows you to
-package the entire library with your application. You can download the
-tarball, copy its ``bs4`` directory into your application's codebase,
-and use Beautiful Soup without installing it at all.
-
-I use Python 2.7 and Python 3.2 to develop Beautiful Soup, but it
-should work with other recent versions.
-
-Problems after installation
----------------------------
-
-Beautiful Soup is packaged as Python 2 code. When you install it for
-use with Python 3, it's automatically converted to Python 3 code. If
-you don't install the package, the code won't be converted. There have
-also been reports on Windows machines of the wrong version being
-installed.
-
-If you get the ``ImportError`` "No module named HTMLParser", your
-problem is that you're running the Python 2 version of the code under
-Python 3.
-
-If you get the ``ImportError`` "No module named html.parser", your
-problem is that you're running the Python 3 version of the code under
-Python 2.
-
-In both cases, your best bet is to completely remove the Beautiful
-Soup installation from your system (including any directory created
-when you unzipped the tarball) and try the installation again.
-
-If you get the ``SyntaxError`` "Invalid syntax" on the line
-``ROOT_TAG_NAME = u'[document]'``, you need to convert the Python 2
-code to Python 3. You can do this either by installing the package:
-
-:kbd:`$ python3 setup.py install`
-
-or by manually running Python's ``2to3`` conversion script on the
-``bs4`` directory:
-
-:kbd:`$ 2to3-3.2 -w bs4`
-
-.. _parser-installation:
-
-
-Installing a parser
--------------------
-
-Beautiful Soup supports the HTML parser included in Python's standard
-library, but it also supports a number of third-party Python parsers.
-One is the `lxml parser <http://lxml.de/>`_. Depending on your setup,
-you might install lxml with one of these commands:
-
-:kbd:`$ apt-get install python-lxml`
-
-:kbd:`$ easy_install lxml`
-
-:kbd:`$ pip install lxml`
-
-Another alternative is the pure-Python `html5lib parser
-<http://code.google.com/p/html5lib/>`_, which parses HTML the way a
-web browser does. Depending on your setup, you might install html5lib
-with one of these commands:
-
-:kbd:`$ apt-get install python-html5lib`
-
-:kbd:`$ easy_install html5lib`
-
-:kbd:`$ pip install html5lib`
-
-This table summarizes the advantages and disadvantages of each parser library:
-
-+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-| Parser | Typical usage | Advantages | Disadvantages |
-+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-| Python's html.parser | ``BeautifulSoup(markup, "html.parser")`` | * Batteries included | * Not very lenient |
-| | | * Decent speed | (before Python 2.7.3 |
-| | | * Lenient (as of Python 2.7.3 | or 3.2.2) |
-| | | and 3.2.) | |
-+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-| lxml's HTML parser | ``BeautifulSoup(markup, "lxml")`` | * Very fast | * External C dependency |
-| | | * Lenient | |
-+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-| lxml's XML parser | ``BeautifulSoup(markup, ["lxml", "xml"])`` | * Very fast | * External C dependency |
-| | ``BeautifulSoup(markup, "xml")`` | * The only currently supported | |
-| | | XML parser | |
-+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-| html5lib | ``BeautifulSoup(markup, "html5lib")`` | * Extremely lenient | * Very slow |
-| | | * Parses pages the same way a | * External Python |
-| | | web browser does | dependency |
-| | | * Creates valid HTML5 | |
-+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-
-If you can, I recommend you install and use lxml for speed. If you're
-using a version of Python 2 earlier than 2.7.3, or a version of Python
-3 earlier than 3.2.2, it's `essential` that you install lxml or
-html5lib--Python's built-in HTML parser is just not very good in older
-versions.
-
-Note that if a document is invalid, different parsers will generate
-different Beautiful Soup trees for it. See `Differences
-between parsers`_ for details.
-
-Making the soup
-===============
-
-To parse a document, pass it into the ``BeautifulSoup``
-constructor. You can pass in a string or an open filehandle::
-
- from bs4 import BeautifulSoup
-
- soup = BeautifulSoup(open("index.html"))
-
- soup = BeautifulSoup("<html>data</html>")
-
-First, the document is converted to Unicode, and HTML entities are
-converted to Unicode characters::
-
- BeautifulSoup("Sacr&eacute; bleu!")
- <html><head></head><body>Sacré bleu!</body></html>
-
-Beautiful Soup then parses the document using the best available
-parser. It will use an HTML parser unless you specifically tell it to
-use an XML parser. (See `Parsing XML`_.)
-
-Kinds of objects
-================
-
-Beautiful Soup transforms a complex HTML document into a complex tree
-of Python objects. But you'll only ever have to deal with about four
-`kinds` of objects.
-
-.. _Tag:
-
-``Tag``
--------
-
-A ``Tag`` object corresponds to an XML or HTML tag in the original document::
-
- soup = BeautifulSoup('<b class="boldest">Extremely bold</b>')
- tag = soup.b
- type(tag)
- # <class 'bs4.element.Tag'>
-
-Tags have a lot of attributes and methods, and I'll cover most of them
-in `Navigating the tree`_ and `Searching the tree`_. For now, the most
-important features of a tag are its name and attributes.
-
-Name
-^^^^
-
-Every tag has a name, accessible as ``.name``::
-
- tag.name
- # u'b'
-
-If you change a tag's name, the change will be reflected in any HTML
-markup generated by Beautiful Soup::
-
- tag.name = "blockquote"
- tag
- # <blockquote class="boldest">Extremely bold</blockquote>
-
-Attributes
-^^^^^^^^^^
-
-A tag may have any number of attributes. The tag ``<b
-class="boldest">`` has an attribute "class" whose value is
-"boldest". You can access a tag's attributes by treating the tag like
-a dictionary::
-
- tag['class']
- # u'boldest'
-
-You can access that dictionary directly as ``.attrs``::
-
- tag.attrs
- # {u'class': u'boldest'}
-
-You can add, remove, and modify a tag's attributes. Again, this is
-done by treating the tag as a dictionary::
-
- tag['class'] = 'verybold'
- tag['id'] = 1
- tag
- # <blockquote class="verybold" id="1">Extremely bold</blockquote>
-
- del tag['class']
- del tag['id']
- tag
- # <blockquote>Extremely bold</blockquote>
-
- tag['class']
- # KeyError: 'class'
- print(tag.get('class'))
- # None
-
-.. _multivalue:
-
-Multi-valued attributes
-&&&&&&&&&&&&&&&&&&&&&&&
-
-HTML 4 defines a few attributes that can have multiple values. HTML 5
-removes a couple of them, but defines a few more. The most common
-multi-valued attribute is ``class`` (that is, a tag can have more than
-one CSS class). Others include ``rel``, ``rev``, ``accept-charset``,
-``headers``, and ``accesskey``. Beautiful Soup presents the value(s)
-of a multi-valued attribute as a list::
-
- css_soup = BeautifulSoup('<p class="body strikeout"></p>')
- css_soup.p['class']
- # ["body", "strikeout"]
-
- css_soup = BeautifulSoup('<p class="body"></p>')
- css_soup.p['class']
- # ["body"]
-
-If an attribute `looks` like it has more than one value, but it's not
-a multi-valued attribute as defined by any version of the HTML
-standard, Beautiful Soup will leave the attribute alone::
-
- id_soup = BeautifulSoup('<p id="my id"></p>')
- id_soup.p['id']
- # 'my id'
-
-When you turn a tag back into a string, multiple attribute values are
-consolidated::
-
- rel_soup = BeautifulSoup('<p>Back to the <a rel="index">homepage</a></p>')
- rel_soup.a['rel']
- # ['index']
- rel_soup.a['rel'] = ['index', 'contents']
- print(rel_soup.p)
- # <p>Back to the <a rel="index contents">homepage</a></p>
-
-If you parse a document as XML, there are no multi-valued attributes::
-
- xml_soup = BeautifulSoup('<p class="body strikeout"></p>', 'xml')
- xml_soup.p['class']
- # u'body strikeout'
-
-
-
-``NavigableString``
--------------------
-
-A string corresponds to a bit of text within a tag. Beautiful Soup
-uses the ``NavigableString`` class to contain these bits of text::
-
- tag.string
- # u'Extremely bold'
- type(tag.string)
- # <class 'bs4.element.NavigableString'>
-
-A ``NavigableString`` is just like a Python Unicode string, except
-that it also supports some of the features described in `Navigating
-the tree`_ and `Searching the tree`_. You can convert a
-``NavigableString`` to a Unicode string with ``unicode()``::
-
- unicode_string = unicode(tag.string)
- unicode_string
- # u'Extremely bold'
- type(unicode_string)
- # <type 'unicode'>
-
-You can't edit a string in place, but you can replace one string with
-another, using :ref:`replace_with`::
-
- tag.string.replace_with("No longer bold")
- tag
- # <blockquote>No longer bold</blockquote>
-
-``NavigableString`` supports most of the features described in
-`Navigating the tree`_ and `Searching the tree`_, but not all of
-them. In particular, since a string can't contain anything (the way a
-tag may contain a string or another tag), strings don't support the
-``.contents`` or ``.string`` attributes, or the ``find()`` method.
-
-If you want to use a ``NavigableString`` outside of Beautiful Soup,
-you should call ``unicode()`` on it to turn it into a normal Python
-Unicode string. If you don't, your string will carry around a
-reference to the entire Beautiful Soup parse tree, even when you're
-done using Beautiful Soup. This is a big waste of memory.
-
-``BeautifulSoup``
------------------
-
-The ``BeautifulSoup`` object itself represents the document as a
-whole. For most purposes, you can treat it as a :ref:`Tag`
-object. This means it supports most of the methods described in
-`Navigating the tree`_ and `Searching the tree`_.
-
-Since the ``BeautifulSoup`` object doesn't correspond to an actual
-HTML or XML tag, it has no name and no attributes. But sometimes it's
-useful to look at its ``.name``, so it's been given the special
-``.name`` "[document]"::
-
- soup.name
- # u'[document]'
-
-Comments and other special strings
-----------------------------------
-
-``Tag``, ``NavigableString``, and ``BeautifulSoup`` cover almost
-everything you'll see in an HTML or XML file, but there are a few
-leftover bits. The only one you'll probably ever need to worry about
-is the comment::
-
- markup = "<b><!--Hey, buddy. Want to buy a used parser?--></b>"
- soup = BeautifulSoup(markup)
- comment = soup.b.string
- type(comment)
- # <class 'bs4.element.Comment'>
-
-The ``Comment`` object is just a special type of ``NavigableString``::
-
- comment
- # u'Hey, buddy. Want to buy a used parser'
-
-But when it appears as part of an HTML document, a ``Comment`` is
-displayed with special formatting::
-
- print(soup.b.prettify())
- # <b>
- # <!--Hey, buddy. Want to buy a used parser?-->
- # </b>
-
-Beautiful Soup defines classes for anything else that might show up in
-an XML document: ``CData``, ``ProcessingInstruction``,
-``Declaration``, and ``Doctype``. Just like ``Comment``, these classes
-are subclasses of ``NavigableString`` that add something extra to the
-string. Here's an example that replaces the comment with a CDATA
-block::
-
- from bs4 import CData
- cdata = CData("A CDATA block")
- comment.replace_with(cdata)
-
- print(soup.b.prettify())
- # <b>
- # <![CDATA[A CDATA block]]>
- # </b>
-
-
-Navigating the tree
-===================
-
-Here's the "Three sisters" HTML document again::
-
- html_doc = """
- <html><head><title>The Dormouse's story</title></head>
-
- <p class="title"><b>The Dormouse's story</b></p>
-
- <p class="story">Once upon a time there were three little sisters; and their names were
- <a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,
- <a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and
- <a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>;
- and they lived at the bottom of a well.</p>
-
- <p class="story">...</p>
- """
-
- from bs4 import BeautifulSoup
- soup = BeautifulSoup(html_doc)
-
-I'll use this as an example to show you how to move from one part of
-a document to another.
-
-Going down
-----------
-
-Tags may contain strings and other tags. These elements are the tag's
-`children`. Beautiful Soup provides a lot of different attributes for
-navigating and iterating over a tag's children.
-
-Note that Beautiful Soup strings don't support any of these
-attributes, because a string can't have children.
-
-Navigating using tag names
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The simplest way to navigate the parse tree is to say the name of the
-tag you want. If you want the <head> tag, just say ``soup.head``::
-
- soup.head
- # <head><title>The Dormouse's story</title></head>
-
- soup.title
- # <title>The Dormouse's story</title>
-
-You can do use this trick again and again to zoom in on a certain part
-of the parse tree. This code gets the first <b> tag beneath the <body> tag::
-
- soup.body.b
- # <b>The Dormouse's story</b>
-
-Using a tag name as an attribute will give you only the `first` tag by that
-name::
-
- soup.a
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
-
-If you need to get `all` the <a> tags, or anything more complicated
-than the first tag with a certain name, you'll need to use one of the
-methods described in `Searching the tree`_, such as `find_all()`::
-
- soup.find_all('a')
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-``.contents`` and ``.children``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-A tag's children are available in a list called ``.contents``::
-
- head_tag = soup.head
- head_tag
- # <head><title>The Dormouse's story</title></head>
-
- head_tag.contents
- [<title>The Dormouse's story</title>]
-
- title_tag = head_tag.contents[0]
- title_tag
- # <title>The Dormouse's story</title>
- title_tag.contents
- # [u'The Dormouse's story']
-
-The ``BeautifulSoup`` object itself has children. In this case, the
-<html> tag is the child of the ``BeautifulSoup`` object.::
-
- len(soup.contents)
- # 1
- soup.contents[0].name
- # u'html'
-
-A string does not have ``.contents``, because it can't contain
-anything::
-
- text = title_tag.contents[0]
- text.contents
- # AttributeError: 'NavigableString' object has no attribute 'contents'
-
-Instead of getting them as a list, you can iterate over a tag's
-children using the ``.children`` generator::
-
- for child in title_tag.children:
- print(child)
- # The Dormouse's story
-
-``.descendants``
-^^^^^^^^^^^^^^^^
-
-The ``.contents`` and ``.children`` attributes only consider a tag's
-`direct` children. For instance, the <head> tag has a single direct
-child--the <title> tag::
-
- head_tag.contents
- # [<title>The Dormouse's story</title>]
-
-But the <title> tag itself has a child: the string "The Dormouse's
-story". There's a sense in which that string is also a child of the
-<head> tag. The ``.descendants`` attribute lets you iterate over `all`
-of a tag's children, recursively: its direct children, the children of
-its direct children, and so on::
-
- for child in head_tag.descendants:
- print(child)
- # <title>The Dormouse's story</title>
- # The Dormouse's story
-
-The <head> tag has only one child, but it has two descendants: the
-<title> tag and the <title> tag's child. The ``BeautifulSoup`` object
-only has one direct child (the <html> tag), but it has a whole lot of
-descendants::
-
- len(list(soup.children))
- # 1
- len(list(soup.descendants))
- # 25
-
-.. _.string:
-
-``.string``
-^^^^^^^^^^^
-
-If a tag has only one child, and that child is a ``NavigableString``,
-the child is made available as ``.string``::
-
- title_tag.string
- # u'The Dormouse's story'
-
-If a tag's only child is another tag, and `that` tag has a
-``.string``, then the parent tag is considered to have the same
-``.string`` as its child::
-
- head_tag.contents
- # [<title>The Dormouse's story</title>]
-
- head_tag.string
- # u'The Dormouse's story'
-
-If a tag contains more than one thing, then it's not clear what
-``.string`` should refer to, so ``.string`` is defined to be
-``None``::
-
- print(soup.html.string)
- # None
-
-.. _string-generators:
-
-``.strings`` and ``stripped_strings``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If there's more than one thing inside a tag, you can still look at
-just the strings. Use the ``.strings`` generator::
-
- for string in soup.strings:
- print(repr(string))
- # u"The Dormouse's story"
- # u'\n\n'
- # u"The Dormouse's story"
- # u'\n\n'
- # u'Once upon a time there were three little sisters; and their names were\n'
- # u'Elsie'
- # u',\n'
- # u'Lacie'
- # u' and\n'
- # u'Tillie'
- # u';\nand they lived at the bottom of a well.'
- # u'\n\n'
- # u'...'
- # u'\n'
-
-These strings tend to have a lot of extra whitespace, which you can
-remove by using the ``.stripped_strings`` generator instead::
-
- for string in soup.stripped_strings:
- print(repr(string))
- # u"The Dormouse's story"
- # u"The Dormouse's story"
- # u'Once upon a time there were three little sisters; and their names were'
- # u'Elsie'
- # u','
- # u'Lacie'
- # u'and'
- # u'Tillie'
- # u';\nand they lived at the bottom of a well.'
- # u'...'
-
-Here, strings consisting entirely of whitespace are ignored, and
-whitespace at the beginning and end of strings is removed.
-
-Going up
---------
-
-Continuing the "family tree" analogy, every tag and every string has a
-`parent`: the tag that contains it.
-
-.. _.parent:
-
-``.parent``
-^^^^^^^^^^^
-
-You can access an element's parent with the ``.parent`` attribute. In
-the example "three sisters" document, the <head> tag is the parent
-of the <title> tag::
-
- title_tag = soup.title
- title_tag
- # <title>The Dormouse's story</title>
- title_tag.parent
- # <head><title>The Dormouse's story</title></head>
-
-The title string itself has a parent: the <title> tag that contains
-it::
-
- title_tag.string.parent
- # <title>The Dormouse's story</title>
-
-The parent of a top-level tag like <html> is the ``BeautifulSoup`` object
-itself::
-
- html_tag = soup.html
- type(html_tag.parent)
- # <class 'bs4.BeautifulSoup'>
-
-And the ``.parent`` of a ``BeautifulSoup`` object is defined as None::
-
- print(soup.parent)
- # None
-
-.. _.parents:
-
-``.parents``
-^^^^^^^^^^^^
-
-You can iterate over all of an element's parents with
-``.parents``. This example uses ``.parents`` to travel from an <a> tag
-buried deep within the document, to the very top of the document::
-
- link = soup.a
- link
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
- for parent in link.parents:
- if parent is None:
- print(parent)
- else:
- print(parent.name)
- # p
- # body
- # html
- # [document]
- # None
-
-Going sideways
---------------
-
-Consider a simple document like this::
-
- sibling_soup = BeautifulSoup("<a><b>text1</b><c>text2</c></b></a>")
- print(sibling_soup.prettify())
- # <html>
- # <body>
- # <a>
- # <b>
- # text1
- # </b>
- # <c>
- # text2
- # </c>
- # </a>
- # </body>
- # </html>
-
-The <b> tag and the <c> tag are at the same level: they're both direct
-children of the same tag. We call them `siblings`. When a document is
-pretty-printed, siblings show up at the same indentation level. You
-can also use this relationship in the code you write.
-
-``.next_sibling`` and ``.previous_sibling``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You can use ``.next_sibling`` and ``.previous_sibling`` to navigate
-between page elements that are on the same level of the parse tree::
-
- sibling_soup.b.next_sibling
- # <c>text2</c>
-
- sibling_soup.c.previous_sibling
- # <b>text1</b>
-
-The <b> tag has a ``.next_sibling``, but no ``.previous_sibling``,
-because there's nothing before the <b> tag `on the same level of the
-tree`. For the same reason, the <c> tag has a ``.previous_sibling``
-but no ``.next_sibling``::
-
- print(sibling_soup.b.previous_sibling)
- # None
- print(sibling_soup.c.next_sibling)
- # None
-
-The strings "text1" and "text2" are `not` siblings, because they don't
-have the same parent::
-
- sibling_soup.b.string
- # u'text1'
-
- print(sibling_soup.b.string.next_sibling)
- # None
-
-In real documents, the ``.next_sibling`` or ``.previous_sibling`` of a
-tag will usually be a string containing whitespace. Going back to the
-"three sisters" document::
-
- <a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>
- <a href="http://example.com/lacie" class="sister" id="link2">Lacie</a>
- <a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>
-
-You might think that the ``.next_sibling`` of the first <a> tag would
-be the second <a> tag. But actually, it's a string: the comma and
-newline that separate the first <a> tag from the second::
-
- link = soup.a
- link
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
-
- link.next_sibling
- # u',\n'
-
-The second <a> tag is actually the ``.next_sibling`` of the comma::
-
- link.next_sibling.next_sibling
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>
-
-.. _sibling-generators:
-
-``.next_siblings`` and ``.previous_siblings``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You can iterate over a tag's siblings with ``.next_siblings`` or
-``.previous_siblings``::
-
- for sibling in soup.a.next_siblings:
- print(repr(sibling))
- # u',\n'
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>
- # u' and\n'
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>
- # u'; and they lived at the bottom of a well.'
- # None
-
- for sibling in soup.find(id="link3").previous_siblings:
- print(repr(sibling))
- # ' and\n'
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>
- # u',\n'
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
- # u'Once upon a time there were three little sisters; and their names were\n'
- # None
-
-Going back and forth
---------------------
-
-Take a look at the beginning of the "three sisters" document::
-
- <html><head><title>The Dormouse's story</title></head>
- <p class="title"><b>The Dormouse's story</b></p>
-
-An HTML parser takes this string of characters and turns it into a
-series of events: "open an <html> tag", "open a <head> tag", "open a
-<title> tag", "add a string", "close the <title> tag", "open a <p>
-tag", and so on. Beautiful Soup offers tools for reconstructing the
-initial parse of the document.
-
-.. _element-generators:
-
-``.next_element`` and ``.previous_element``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The ``.next_element`` attribute of a string or tag points to whatever
-was parsed immediately afterwards. It might be the same as
-``.next_sibling``, but it's usually drastically different.
-
-Here's the final <a> tag in the "three sisters" document. Its
-``.next_sibling`` is a string: the conclusion of the sentence that was
-interrupted by the start of the <a> tag.::
-
- last_a_tag = soup.find("a", id="link3")
- last_a_tag
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>
-
- last_a_tag.next_sibling
- # '; and they lived at the bottom of a well.'
-
-But the ``.next_element`` of that <a> tag, the thing that was parsed
-immediately after the <a> tag, is `not` the rest of that sentence:
-it's the word "Tillie"::
-
- last_a_tag.next_element
- # u'Tillie'
-
-That's because in the original markup, the word "Tillie" appeared
-before that semicolon. The parser encountered an <a> tag, then the
-word "Tillie", then the closing </a> tag, then the semicolon and rest of
-the sentence. The semicolon is on the same level as the <a> tag, but the
-word "Tillie" was encountered first.
-
-The ``.previous_element`` attribute is the exact opposite of
-``.next_element``. It points to whatever element was parsed
-immediately before this one::
-
- last_a_tag.previous_element
- # u' and\n'
- last_a_tag.previous_element.next_element
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>
-
-``.next_elements`` and ``.previous_elements``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You should get the idea by now. You can use these iterators to move
-forward or backward in the document as it was parsed::
-
- for element in last_a_tag.next_elements:
- print(repr(element))
- # u'Tillie'
- # u';\nand they lived at the bottom of a well.'
- # u'\n\n'
- # <p class="story">...</p>
- # u'...'
- # u'\n'
- # None
-
-Searching the tree
-==================
-
-Beautiful Soup defines a lot of methods for searching the parse tree,
-but they're all very similar. I'm going to spend a lot of time explaining
-the two most popular methods: ``find()`` and ``find_all()``. The other
-methods take almost exactly the same arguments, so I'll just cover
-them briefly.
-
-Once again, I'll be using the "three sisters" document as an example::
-
- html_doc = """
- <html><head><title>The Dormouse's story</title></head>
-
- <p class="title"><b>The Dormouse's story</b></p>
-
- <p class="story">Once upon a time there were three little sisters; and their names were
- <a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,
- <a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and
- <a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>;
- and they lived at the bottom of a well.</p>
-
- <p class="story">...</p>
- """
-
- from bs4 import BeautifulSoup
- soup = BeautifulSoup(html_doc)
-
-By passing in a filter to an argument like ``find_all()``, you can
-zoom in on the parts of the document you're interested in.
-
-Kinds of filters
-----------------
-
-Before talking in detail about ``find_all()`` and similar methods, I
-want to show examples of different filters you can pass into these
-methods. These filters show up again and again, throughout the
-search API. You can use them to filter based on a tag's name,
-on its attributes, on the text of a string, or on some combination of
-these.
-
-.. _a string:
-
-A string
-^^^^^^^^
-
-The simplest filter is a string. Pass a string to a search method and
-Beautiful Soup will perform a match against that exact string. This
-code finds all the <b> tags in the document::
-
- soup.find_all('b')
- # [<b>The Dormouse's story</b>]
-
-If you pass in a byte string, Beautiful Soup will assume the string is
-encoded as UTF-8. You can avoid this by passing in a Unicode string instead.
-
-.. _a regular expression:
-
-A regular expression
-^^^^^^^^^^^^^^^^^^^^
-
-If you pass in a regular expression object, Beautiful Soup will filter
-against that regular expression using its ``match()`` method. This code
-finds all the tags whose names start with the letter "b"; in this
-case, the <body> tag and the <b> tag::
-
- import re
- for tag in soup.find_all(re.compile("^b")):
- print(tag.name)
- # body
- # b
-
-This code finds all the tags whose names contain the letter 't'::
-
- for tag in soup.find_all(re.compile("t")):
- print(tag.name)
- # html
- # title
-
-.. _a list:
-
-A list
-^^^^^^
-
-If you pass in a list, Beautiful Soup will allow a string match
-against `any` item in that list. This code finds all the <a> tags
-`and` all the <b> tags::
-
- soup.find_all(["a", "b"])
- # [<b>The Dormouse's story</b>,
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-.. _the value True:
-
-``True``
-^^^^^^^^
-
-The value ``True`` matches everything it can. This code finds `all`
-the tags in the document, but none of the text strings::
-
- for tag in soup.find_all(True):
- print(tag.name)
- # html
- # head
- # title
- # body
- # p
- # b
- # p
- # a
- # a
- # a
- # p
-
-.. a function:
-
-A function
-^^^^^^^^^^
-
-If none of the other matches work for you, define a function that
-takes an element as its only argument. The function should return
-``True`` if the argument matches, and ``False`` otherwise.
-
-Here's a function that returns ``True`` if a tag defines the "class"
-attribute but doesn't define the "id" attribute::
-
- def has_class_but_no_id(tag):
- return tag.has_attr('class') and not tag.has_attr('id')
-
-Pass this function into ``find_all()`` and you'll pick up all the <p>
-tags::
-
- soup.find_all(has_class_but_no_id)
- # [<p class="title"><b>The Dormouse's story</b></p>,
- # <p class="story">Once upon a time there were...</p>,
- # <p class="story">...</p>]
-
-This function only picks up the <p> tags. It doesn't pick up the <a>
-tags, because those tags define both "class" and "id". It doesn't pick
-up tags like <html> and <title>, because those tags don't define
-"class".
-
-Here's a function that returns ``True`` if a tag is surrounded by
-string objects::
-
- from bs4 import NavigableString
- def surrounded_by_strings(tag):
- return (isinstance(tag.next_element, NavigableString)
- and isinstance(tag.previous_element, NavigableString))
-
- for tag in soup.find_all(surrounded_by_strings):
- print tag.name
- # p
- # a
- # a
- # a
- # p
-
-Now we're ready to look at the search methods in detail.
-
-``find_all()``
---------------
-
-Signature: find_all(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`recursive
-<recursive>`, :ref:`text <text>`, :ref:`limit <limit>`, :ref:`**kwargs <kwargs>`)
-
-The ``find_all()`` method looks through a tag's descendants and
-retrieves `all` descendants that match your filters. I gave several
-examples in `Kinds of filters`_, but here are a few more::
-
- soup.find_all("title")
- # [<title>The Dormouse's story</title>]
-
- soup.find_all("p", "title")
- # [<p class="title"><b>The Dormouse's story</b></p>]
-
- soup.find_all("a")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.find_all(id="link2")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
- import re
- soup.find(text=re.compile("sisters"))
- # u'Once upon a time there were three little sisters; and their names were\n'
-
-Some of these should look familiar, but others are new. What does it
-mean to pass in a value for ``text``, or ``id``? Why does
-``find_all("p", "title")`` find a <p> tag with the CSS class "title"?
-Let's look at the arguments to ``find_all()``.
-
-.. _name:
-
-The ``name`` argument
-^^^^^^^^^^^^^^^^^^^^^
-
-Pass in a value for ``name`` and you'll tell Beautiful Soup to only
-consider tags with certain names. Text strings will be ignored, as
-will tags whose names that don't match.
-
-This is the simplest usage::
-
- soup.find_all("title")
- # [<title>The Dormouse's story</title>]
-
-Recall from `Kinds of filters`_ that the value to ``name`` can be `a
-string`_, `a regular expression`_, `a list`_, `a function`_, or `the value
-True`_.
-
-.. _kwargs:
-
-The keyword arguments
-^^^^^^^^^^^^^^^^^^^^^
-
-Any argument that's not recognized will be turned into a filter on one
-of a tag's attributes. If you pass in a value for an argument called ``id``,
-Beautiful Soup will filter against each tag's 'id' attribute::
-
- soup.find_all(id='link2')
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
-If you pass in a value for ``href``, Beautiful Soup will filter
-against each tag's 'href' attribute::
-
- soup.find_all(href=re.compile("elsie"))
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>]
-
-You can filter an attribute based on `a string`_, `a regular
-expression`_, `a list`_, `a function`_, or `the value True`_.
-
-This code finds all tags whose ``id`` attribute has a value,
-regardless of what the value is::
-
- soup.find_all(id=True)
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-You can filter multiple attributes at once by passing in more than one
-keyword argument::
-
- soup.find_all(href=re.compile("elsie"), id='link1')
- # [<a class="sister" href="http://example.com/elsie" id="link1">three</a>]
-
-Some attributes, like the data-* attributes in HTML 5, have names that
-can't be used as the names of keyword arguments::
-
- data_soup = BeautifulSoup('<div data-foo="value">foo!</div>')
- data_soup.find_all(data-foo="value")
- # SyntaxError: keyword can't be an expression
-
-You can use these attributes in searches by putting them into a
-dictionary and passing the dictionary into ``find_all()`` as the
-``attrs`` argument::
-
- data_soup.find_all(attrs={"data-foo": "value"})
- # [<div data-foo="value">foo!</div>]
-
-.. _attrs:
-
-Searching by CSS class
-^^^^^^^^^^^^^^^^^^^^^^
-
-It's very useful to search for a tag that has a certain CSS class, but
-the name of the CSS attribute, "class", is a reserved word in
-Python. Using ``class`` as a keyword argument will give you a syntax
-error. As of Beautiful Soup 4.1.2, you can search by CSS class using
-the keyword argument ``class_``::
-
- soup.find_all("a", class_="sister")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-As with any keyword argument, you can pass ``class_`` a string, a regular
-expression, a function, or ``True``::
-
- soup.find_all(class_=re.compile("itl"))
- # [<p class="title"><b>The Dormouse's story</b></p>]
-
- def has_six_characters(css_class):
- return css_class is not None and len(css_class) == 6
-
- soup.find_all(class_=has_six_characters)
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-:ref:`Remember <multivalue>` that a single tag can have multiple
-values for its "class" attribute. When you search for a tag that
-matches a certain CSS class, you're matching against `any` of its CSS
-classes::
-
- css_soup = BeautifulSoup('<p class="body strikeout"></p>')
- css_soup.find_all("p", class_="strikeout")
- # [<p class="body strikeout"></p>]
-
- css_soup.find_all("p", class_="body")
- # [<p class="body strikeout"></p>]
-
-You can also search for the exact string value of the ``class`` attribute::
-
- css_soup.find_all("p", class_="body strikeout")
- # [<p class="body strikeout"></p>]
-
-But searching for variants of the string value won't work::
-
- css_soup.find_all("p", class_="strikeout body")
- # []
-
-If you want to search for tags that match two or more CSS classes, you
-should use a CSS selector::
-
- css_soup.select("p.strikeout.body")
- # [<p class="body strikeout"></p>]
-
-In older versions of Beautiful Soup, which don't have the ``class_``
-shortcut, you can use the ``attrs`` trick mentioned above. Create a
-dictionary whose value for "class" is the string (or regular
-expression, or whatever) you want to search for::
-
- soup.find_all("a", attrs={"class": "sister"})
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-.. _text:
-
-The ``text`` argument
-^^^^^^^^^^^^^^^^^^^^^
-
-With ``text`` you can search for strings instead of tags. As with
-``name`` and the keyword arguments, you can pass in `a string`_, `a
-regular expression`_, `a list`_, `a function`_, or `the value True`_.
-Here are some examples::
-
- soup.find_all(text="Elsie")
- # [u'Elsie']
-
- soup.find_all(text=["Tillie", "Elsie", "Lacie"])
- # [u'Elsie', u'Lacie', u'Tillie']
-
- soup.find_all(text=re.compile("Dormouse"))
- [u"The Dormouse's story", u"The Dormouse's story"]
-
- def is_the_only_string_within_a_tag(s):
- """Return True if this string is the only child of its parent tag."""
- return (s == s.parent.string)
-
- soup.find_all(text=is_the_only_string_within_a_tag)
- # [u"The Dormouse's story", u"The Dormouse's story", u'Elsie', u'Lacie', u'Tillie', u'...']
-
-Although ``text`` is for finding strings, you can combine it with
-arguments that find tags: Beautiful Soup will find all tags whose
-``.string`` matches your value for ``text``. This code finds the <a>
-tags whose ``.string`` is "Elsie"::
-
- soup.find_all("a", text="Elsie")
- # [<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>]
-
-.. _limit:
-
-The ``limit`` argument
-^^^^^^^^^^^^^^^^^^^^^^
-
-``find_all()`` returns all the tags and strings that match your
-filters. This can take a while if the document is large. If you don't
-need `all` the results, you can pass in a number for ``limit``. This
-works just like the LIMIT keyword in SQL. It tells Beautiful Soup to
-stop gathering results after it's found a certain number.
-
-There are three links in the "three sisters" document, but this code
-only finds the first two::
-
- soup.find_all("a", limit=2)
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
-.. _recursive:
-
-The ``recursive`` argument
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If you call ``mytag.find_all()``, Beautiful Soup will examine all the
-descendants of ``mytag``: its children, its children's children, and
-so on. If you only want Beautiful Soup to consider direct children,
-you can pass in ``recursive=False``. See the difference here::
-
- soup.html.find_all("title")
- # [<title>The Dormouse's story</title>]
-
- soup.html.find_all("title", recursive=False)
- # []
-
-Here's that part of the document::
-
- <html>
- <head>
- <title>
- The Dormouse's story
- </title>
- </head>
- ...
-
-The <title> tag is beneath the <html> tag, but it's not `directly`
-beneath the <html> tag: the <head> tag is in the way. Beautiful Soup
-finds the <title> tag when it's allowed to look at all descendants of
-the <html> tag, but when ``recursive=False`` restricts it to the
-<html> tag's immediate children, it finds nothing.
-
-Beautiful Soup offers a lot of tree-searching methods (covered below),
-and they mostly take the same arguments as ``find_all()``: ``name``,
-``attrs``, ``text``, ``limit``, and the keyword arguments. But the
-``recursive`` argument is different: ``find_all()`` and ``find()`` are
-the only methods that support it. Passing ``recursive=False`` into a
-method like ``find_parents()`` wouldn't be very useful.
-
-Calling a tag is like calling ``find_all()``
---------------------------------------------
-
-Because ``find_all()`` is the most popular method in the Beautiful
-Soup search API, you can use a shortcut for it. If you treat the
-``BeautifulSoup`` object or a ``Tag`` object as though it were a
-function, then it's the same as calling ``find_all()`` on that
-object. These two lines of code are equivalent::
-
- soup.find_all("a")
- soup("a")
-
-These two lines are also equivalent::
-
- soup.title.find_all(text=True)
- soup.title(text=True)
-
-``find()``
-----------
-
-Signature: find(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`recursive
-<recursive>`, :ref:`text <text>`, :ref:`**kwargs <kwargs>`)
-
-The ``find_all()`` method scans the entire document looking for
-results, but sometimes you only want to find one result. If you know a
-document only has one <body> tag, it's a waste of time to scan the
-entire document looking for more. Rather than passing in ``limit=1``
-every time you call ``find_all``, you can use the ``find()``
-method. These two lines of code are `nearly` equivalent::
-
- soup.find_all('title', limit=1)
- # [<title>The Dormouse's story</title>]
-
- soup.find('title')
- # <title>The Dormouse's story</title>
-
-The only difference is that ``find_all()`` returns a list containing
-the single result, and ``find()`` just returns the result.
-
-If ``find_all()`` can't find anything, it returns an empty list. If
-``find()`` can't find anything, it returns ``None``::
-
- print(soup.find("nosuchtag"))
- # None
-
-Remember the ``soup.head.title`` trick from `Navigating using tag
-names`_? That trick works by repeatedly calling ``find()``::
-
- soup.head.title
- # <title>The Dormouse's story</title>
-
- soup.find("head").find("title")
- # <title>The Dormouse's story</title>
-
-``find_parents()`` and ``find_parent()``
-----------------------------------------
-
-Signature: find_parents(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`limit <limit>`, :ref:`**kwargs <kwargs>`)
-
-Signature: find_parent(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`**kwargs <kwargs>`)
-
-I spent a lot of time above covering ``find_all()`` and
-``find()``. The Beautiful Soup API defines ten other methods for
-searching the tree, but don't be afraid. Five of these methods are
-basically the same as ``find_all()``, and the other five are basically
-the same as ``find()``. The only differences are in what parts of the
-tree they search.
-
-First let's consider ``find_parents()`` and
-``find_parent()``. Remember that ``find_all()`` and ``find()`` work
-their way down the tree, looking at tag's descendants. These methods
-do the opposite: they work their way `up` the tree, looking at a tag's
-(or a string's) parents. Let's try them out, starting from a string
-buried deep in the "three daughters" document::
-
- a_string = soup.find(text="Lacie")
- a_string
- # u'Lacie'
-
- a_string.find_parents("a")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
- a_string.find_parent("p")
- # <p class="story">Once upon a time there were three little sisters; and their names were
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a> and
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>;
- # and they lived at the bottom of a well.</p>
-
- a_string.find_parents("p", class="title")
- # []
-
-One of the three <a> tags is the direct parent of the string in
-question, so our search finds it. One of the three <p> tags is an
-indirect parent of the string, and our search finds that as
-well. There's a <p> tag with the CSS class "title" `somewhere` in the
-document, but it's not one of this string's parents, so we can't find
-it with ``find_parents()``.
-
-You may have made the connection between ``find_parent()`` and
-``find_parents()``, and the `.parent`_ and `.parents`_ attributes
-mentioned earlier. The connection is very strong. These search methods
-actually use ``.parents`` to iterate over all the parents, and check
-each one against the provided filter to see if it matches.
-
-``find_next_siblings()`` and ``find_next_sibling()``
-----------------------------------------------------
-
-Signature: find_next_siblings(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`limit <limit>`, :ref:`**kwargs <kwargs>`)
-
-Signature: find_next_sibling(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`**kwargs <kwargs>`)
-
-These methods use :ref:`.next_siblings <sibling-generators>` to
-iterate over the rest of an element's siblings in the tree. The
-``find_next_siblings()`` method returns all the siblings that match,
-and ``find_next_sibling()`` only returns the first one::
-
- first_link = soup.a
- first_link
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
-
- first_link.find_next_siblings("a")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- first_story_paragraph = soup.find("p", "story")
- first_story_paragraph.find_next_sibling("p")
- # <p class="story">...</p>
-
-``find_previous_siblings()`` and ``find_previous_sibling()``
-------------------------------------------------------------
-
-Signature: find_previous_siblings(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`limit <limit>`, :ref:`**kwargs <kwargs>`)
-
-Signature: find_previous_sibling(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`**kwargs <kwargs>`)
-
-These methods use :ref:`.previous_siblings <sibling-generators>` to iterate over an element's
-siblings that precede it in the tree. The ``find_previous_siblings()``
-method returns all the siblings that match, and
-``find_previous_sibling()`` only returns the first one::
-
- last_link = soup.find("a", id="link3")
- last_link
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>
-
- last_link.find_previous_siblings("a")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>]
-
- first_story_paragraph = soup.find("p", "story")
- first_story_paragraph.find_previous_sibling("p")
- # <p class="title"><b>The Dormouse's story</b></p>
-
-
-``find_all_next()`` and ``find_next()``
----------------------------------------
-
-Signature: find_all_next(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`limit <limit>`, :ref:`**kwargs <kwargs>`)
-
-Signature: find_next(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`**kwargs <kwargs>`)
-
-These methods use :ref:`.next_elements <element-generators>` to
-iterate over whatever tags and strings that come after it in the
-document. The ``find_all_next()`` method returns all matches, and
-``find_next()`` only returns the first match::
-
- first_link = soup.a
- first_link
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
-
- first_link.find_all_next(text=True)
- # [u'Elsie', u',\n', u'Lacie', u' and\n', u'Tillie',
- # u';\nand they lived at the bottom of a well.', u'\n\n', u'...', u'\n']
-
- first_link.find_next("p")
- # <p class="story">...</p>
-
-In the first example, the string "Elsie" showed up, even though it was
-contained within the <a> tag we started from. In the second example,
-the last <p> tag in the document showed up, even though it's not in
-the same part of the tree as the <a> tag we started from. For these
-methods, all that matters is that an element match the filter, and
-show up later in the document than the starting element.
-
-``find_all_previous()`` and ``find_previous()``
------------------------------------------------
-
-Signature: find_all_previous(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`limit <limit>`, :ref:`**kwargs <kwargs>`)
-
-Signature: find_previous(:ref:`name <name>`, :ref:`attrs <attrs>`, :ref:`text <text>`, :ref:`**kwargs <kwargs>`)
-
-These methods use :ref:`.previous_elements <element-generators>` to
-iterate over the tags and strings that came before it in the
-document. The ``find_all_previous()`` method returns all matches, and
-``find_previous()`` only returns the first match::
-
- first_link = soup.a
- first_link
- # <a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>
-
- first_link.find_all_previous("p")
- # [<p class="story">Once upon a time there were three little sisters; ...</p>,
- # <p class="title"><b>The Dormouse's story</b></p>]
-
- first_link.find_previous("title")
- # <title>The Dormouse's story</title>
-
-The call to ``find_all_previous("p")`` found the first paragraph in
-the document (the one with class="title"), but it also finds the
-second paragraph, the <p> tag that contains the <a> tag we started
-with. This shouldn't be too surprising: we're looking at all the tags
-that show up earlier in the document than the one we started with. A
-<p> tag that contains an <a> tag must have shown up before the <a>
-tag it contains.
-
-CSS selectors
--------------
-
-Beautiful Soup supports the most commonly-used `CSS selectors
-<http://www.w3.org/TR/CSS2/selector.html>`_. Just pass a string into
-the ``.select()`` method of a ``Tag`` object or the ``BeautifulSoup``
-object itself.
-
-You can find tags::
-
- soup.select("title")
- # [<title>The Dormouse's story</title>]
-
- soup.select("p nth-of-type(3)")
- # [<p class="story">...</p>]
-
-Find tags beneath other tags::
-
- soup.select("body a")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.select("html head title")
- # [<title>The Dormouse's story</title>]
-
-Find tags `directly` beneath other tags::
-
- soup.select("head > title")
- # [<title>The Dormouse's story</title>]
-
- soup.select("p > a")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.select("p > a:nth-of-type(2)")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
- soup.select("p > #link1")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>]
-
- soup.select("body > a")
- # []
-
-Find the siblings of tags::
-
- soup.select("#link1 ~ .sister")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.select("#link1 + .sister")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
-Find tags by CSS class::
-
- soup.select(".sister")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.select("[class~=sister]")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-Find tags by ID::
-
- soup.select("#link1")
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>]
-
- soup.select("a#link2")
- # [<a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>]
-
-Test for the existence of an attribute::
-
- soup.select('a[href]')
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
-Find tags by attribute value::
-
- soup.select('a[href="http://example.com/elsie"]')
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>]
-
- soup.select('a[href^="http://example.com/"]')
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>,
- # <a class="sister" href="http://example.com/lacie" id="link2">Lacie</a>,
- # <a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.select('a[href$="tillie"]')
- # [<a class="sister" href="http://example.com/tillie" id="link3">Tillie</a>]
-
- soup.select('a[href*=".com/el"]')
- # [<a class="sister" href="http://example.com/elsie" id="link1">Elsie</a>]
-
-Match language codes::
-
- multilingual_markup = """
- <p lang="en">Hello</p>
- <p lang="en-us">Howdy, y'all</p>
- <p lang="en-gb">Pip-pip, old fruit</p>
- <p lang="fr">Bonjour mes amis</p>
- """
- multilingual_soup = BeautifulSoup(multilingual_markup)
- multilingual_soup.select('p[lang|=en]')
- # [<p lang="en">Hello</p>,
- # <p lang="en-us">Howdy, y'all</p>,
- # <p lang="en-gb">Pip-pip, old fruit</p>]
-
-This is a convenience for users who know the CSS selector syntax. You
-can do all this stuff with the Beautiful Soup API. And if CSS
-selectors are all you need, you might as well use lxml directly,
-because it's faster. But this lets you `combine` simple CSS selectors
-with the Beautiful Soup API.
-
-
-Modifying the tree
-==================
-
-Beautiful Soup's main strength is in searching the parse tree, but you
-can also modify the tree and write your changes as a new HTML or XML
-document.
-
-Changing tag names and attributes
----------------------------------
-
-I covered this earlier, in `Attributes`_, but it bears repeating. You
-can rename a tag, change the values of its attributes, add new
-attributes, and delete attributes::
-
- soup = BeautifulSoup('<b class="boldest">Extremely bold</b>')
- tag = soup.b
-
- tag.name = "blockquote"
- tag['class'] = 'verybold'
- tag['id'] = 1
- tag
- # <blockquote class="verybold" id="1">Extremely bold</blockquote>
-
- del tag['class']
- del tag['id']
- tag
- # <blockquote>Extremely bold</blockquote>
-
-
-Modifying ``.string``
----------------------
-
-If you set a tag's ``.string`` attribute, the tag's contents are
-replaced with the string you give::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
-
- tag = soup.a
- tag.string = "New link text."
- tag
- # <a href="http://example.com/">New link text.</a>
-
-Be careful: if the tag contained other tags, they and all their
-contents will be destroyed.
-
-``append()``
-------------
-
-You can add to a tag's contents with ``Tag.append()``. It works just
-like calling ``.append()`` on a Python list::
-
- soup = BeautifulSoup("<a>Foo</a>")
- soup.a.append("Bar")
-
- soup
- # <html><head></head><body><a>FooBar</a></body></html>
- soup.a.contents
- # [u'Foo', u'Bar']
-
-``BeautifulSoup.new_string()`` and ``.new_tag()``
--------------------------------------------------
-
-If you need to add a string to a document, no problem--you can pass a
-Python string in to ``append()``, or you can call the factory method
-``BeautifulSoup.new_string()``::
-
- soup = BeautifulSoup("<b></b>")
- tag = soup.b
- tag.append("Hello")
- new_string = soup.new_string(" there")
- tag.append(new_string)
- tag
- # <b>Hello there.</b>
- tag.contents
- # [u'Hello', u' there']
-
-If you want to create a comment or some other subclass of
-``NavigableString``, pass that class as the second argument to
-``new_string()``::
-
- from bs4 import Comment
- new_comment = soup.new_string("Nice to see you.", Comment)
- tag.append(new_comment)
- tag
- # <b>Hello there<!--Nice to see you.--></b>
- tag.contents
- # [u'Hello', u' there', u'Nice to see you.']
-
-(This is a new feature in Beautiful Soup 4.2.1.)
-
-What if you need to create a whole new tag? The best solution is to
-call the factory method ``BeautifulSoup.new_tag()``::
-
- soup = BeautifulSoup("<b></b>")
- original_tag = soup.b
-
- new_tag = soup.new_tag("a", href="http://www.example.com")
- original_tag.append(new_tag)
- original_tag
- # <b><a href="http://www.example.com"></a></b>
-
- new_tag.string = "Link text."
- original_tag
- # <b><a href="http://www.example.com">Link text.</a></b>
-
-Only the first argument, the tag name, is required.
-
-``insert()``
-------------
-
-``Tag.insert()`` is just like ``Tag.append()``, except the new element
-doesn't necessarily go at the end of its parent's
-``.contents``. It'll be inserted at whatever numeric position you
-say. It works just like ``.insert()`` on a Python list::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- tag = soup.a
-
- tag.insert(1, "but did not endorse ")
- tag
- # <a href="http://example.com/">I linked to but did not endorse <i>example.com</i></a>
- tag.contents
- # [u'I linked to ', u'but did not endorse', <i>example.com</i>]
-
-``insert_before()`` and ``insert_after()``
-------------------------------------------
-
-The ``insert_before()`` method inserts a tag or string immediately
-before something else in the parse tree::
-
- soup = BeautifulSoup("<b>stop</b>")
- tag = soup.new_tag("i")
- tag.string = "Don't"
- soup.b.string.insert_before(tag)
- soup.b
- # <b><i>Don't</i>stop</b>
-
-The ``insert_after()`` method moves a tag or string so that it
-immediately follows something else in the parse tree::
-
- soup.b.i.insert_after(soup.new_string(" ever "))
- soup.b
- # <b><i>Don't</i> ever stop</b>
- soup.b.contents
- # [<i>Don't</i>, u' ever ', u'stop']
-
-``clear()``
------------
-
-``Tag.clear()`` removes the contents of a tag::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- tag = soup.a
-
- tag.clear()
- tag
- # <a href="http://example.com/"></a>
-
-``extract()``
--------------
-
-``PageElement.extract()`` removes a tag or string from the tree. It
-returns the tag or string that was extracted::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- a_tag = soup.a
-
- i_tag = soup.i.extract()
-
- a_tag
- # <a href="http://example.com/">I linked to</a>
-
- i_tag
- # <i>example.com</i>
-
- print(i_tag.parent)
- None
-
-At this point you effectively have two parse trees: one rooted at the
-``BeautifulSoup`` object you used to parse the document, and one rooted
-at the tag that was extracted. You can go on to call ``extract`` on
-a child of the element you extracted::
-
- my_string = i_tag.string.extract()
- my_string
- # u'example.com'
-
- print(my_string.parent)
- # None
- i_tag
- # <i></i>
-
-
-``decompose()``
----------------
-
-``Tag.decompose()`` removes a tag from the tree, then `completely
-destroys it and its contents`::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- a_tag = soup.a
-
- soup.i.decompose()
-
- a_tag
- # <a href="http://example.com/">I linked to</a>
-
-
-.. _replace_with:
-
-``replace_with()``
-------------------
-
-``PageElement.replace_with()`` removes a tag or string from the tree,
-and replaces it with the tag or string of your choice::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- a_tag = soup.a
-
- new_tag = soup.new_tag("b")
- new_tag.string = "example.net"
- a_tag.i.replace_with(new_tag)
-
- a_tag
- # <a href="http://example.com/">I linked to <b>example.net</b></a>
-
-``replace_with()`` returns the tag or string that was replaced, so
-that you can examine it or add it back to another part of the tree.
-
-``wrap()``
-----------
-
-``PageElement.wrap()`` wraps an element in the tag you specify. It
-returns the new wrapper::
-
- soup = BeautifulSoup("<p>I wish I was bold.</p>")
- soup.p.string.wrap(soup.new_tag("b"))
- # <b>I wish I was bold.</b>
-
- soup.p.wrap(soup.new_tag("div")
- # <div><p><b>I wish I was bold.</b></p></div>
-
-This method is new in Beautiful Soup 4.0.5.
-
-``unwrap()``
----------------------------
-
-``Tag.unwrap()`` is the opposite of ``wrap()``. It replaces a tag with
-whatever's inside that tag. It's good for stripping out markup::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- a_tag = soup.a
-
- a_tag.i.unwrap()
- a_tag
- # <a href="http://example.com/">I linked to example.com</a>
-
-Like ``replace_with()``, ``unwrap()`` returns the tag
-that was replaced.
-
-Output
-======
-
-.. _.prettyprinting:
-
-Pretty-printing
----------------
-
-The ``prettify()`` method will turn a Beautiful Soup parse tree into a
-nicely formatted Unicode string, with each HTML/XML tag on its own line::
-
- markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
- soup = BeautifulSoup(markup)
- soup.prettify()
- # '<html>\n <head>\n </head>\n <body>\n <a href="http://example.com/">\n...'
-
- print(soup.prettify())
- # <html>
- # <head>
- # </head>
- # <body>
- # <a href="http://example.com/">
- # I linked to
- # <i>
- # example.com
- # </i>
- # </a>
- # </body>
- # </html>
-
-You can call ``prettify()`` on the top-level ``BeautifulSoup`` object,
-or on any of its ``Tag`` objects::
-
- print(soup.a.prettify())
- # <a href="http://example.com/">
- # I linked to
- # <i>
- # example.com
- # </i>
- # </a>
-
-Non-pretty printing
--------------------
-
-If you just want a string, with no fancy formatting, you can call
-``unicode()`` or ``str()`` on a ``BeautifulSoup`` object, or a ``Tag``
-within it::
-
- str(soup)
- # '<html><head></head><body><a href="http://example.com/">I linked to <i>example.com</i></a></body></html>'
-
- unicode(soup.a)
- # u'<a href="http://example.com/">I linked to <i>example.com</i></a>'
-
-The ``str()`` function returns a string encoded in UTF-8. See
-`Encodings`_ for other options.
-
-You can also call ``encode()`` to get a bytestring, and ``decode()``
-to get Unicode.
-
-.. _output_formatters:
-
-Output formatters
------------------
-
-If you give Beautiful Soup a document that contains HTML entities like
-"&lquot;", they'll be converted to Unicode characters::
-
- soup = BeautifulSoup("&ldquo;Dammit!&rdquo; he said.")
- unicode(soup)
- # u'<html><head></head><body>\u201cDammit!\u201d he said.</body></html>'
-
-If you then convert the document to a string, the Unicode characters
-will be encoded as UTF-8. You won't get the HTML entities back::
-
- str(soup)
- # '<html><head></head><body>\xe2\x80\x9cDammit!\xe2\x80\x9d he said.</body></html>'
-
-By default, the only characters that are escaped upon output are bare
-ampersands and angle brackets. These get turned into "&amp;", "&lt;",
-and "&gt;", so that Beautiful Soup doesn't inadvertently generate
-invalid HTML or XML::
-
- soup = BeautifulSoup("<p>The law firm of Dewey, Cheatem, & Howe</p>")
- soup.p
- # <p>The law firm of Dewey, Cheatem, &amp; Howe</p>
-
- soup = BeautifulSoup('<a href="http://example.com/?foo=val1&bar=val2">A link</a>')
- soup.a
- # <a href="http://example.com/?foo=val1&amp;bar=val2">A link</a>
-
-You can change this behavior by providing a value for the
-``formatter`` argument to ``prettify()``, ``encode()``, or
-``decode()``. Beautiful Soup recognizes four possible values for
-``formatter``.
-
-The default is ``formatter="minimal"``. Strings will only be processed
-enough to ensure that Beautiful Soup generates valid HTML/XML::
-
- french = "<p>Il a dit &lt;&lt;Sacr&eacute; bleu!&gt;&gt;</p>"
- soup = BeautifulSoup(french)
- print(soup.prettify(formatter="minimal"))
- # <html>
- # <body>
- # <p>
- # Il a dit &lt;&lt;Sacré bleu!&gt;&gt;
- # </p>
- # </body>
- # </html>
-
-If you pass in ``formatter="html"``, Beautiful Soup will convert
-Unicode characters to HTML entities whenever possible::
-
- print(soup.prettify(formatter="html"))
- # <html>
- # <body>
- # <p>
- # Il a dit &lt;&lt;Sacr&eacute; bleu!&gt;&gt;
- # </p>
- # </body>
- # </html>
-
-If you pass in ``formatter=None``, Beautiful Soup will not modify
-strings at all on output. This is the fastest option, but it may lead
-to Beautiful Soup generating invalid HTML/XML, as in these examples::
-
- print(soup.prettify(formatter=None))
- # <html>
- # <body>
- # <p>
- # Il a dit <<Sacré bleu!>>
- # </p>
- # </body>
- # </html>
-
- link_soup = BeautifulSoup('<a href="http://example.com/?foo=val1&bar=val2">A link</a>')
- print(link_soup.a.encode(formatter=None))
- # <a href="http://example.com/?foo=val1&bar=val2">A link</a>
-
-Finally, if you pass in a function for ``formatter``, Beautiful Soup
-will call that function once for every string and attribute value in
-the document. You can do whatever you want in this function. Here's a
-formatter that converts strings to uppercase and does absolutely
-nothing else::
-
- def uppercase(str):
- return str.upper()
-
- print(soup.prettify(formatter=uppercase))
- # <html>
- # <body>
- # <p>
- # IL A DIT <<SACRÉ BLEU!>>
- # </p>
- # </body>
- # </html>
-
- print(link_soup.a.prettify(formatter=uppercase))
- # <a href="HTTP://EXAMPLE.COM/?FOO=VAL1&BAR=VAL2">
- # A LINK
- # </a>
-
-If you're writing your own function, you should know about the
-``EntitySubstitution`` class in the ``bs4.dammit`` module. This class
-implements Beautiful Soup's standard formatters as class methods: the
-"html" formatter is ``EntitySubstitution.substitute_html``, and the
-"minimal" formatter is ``EntitySubstitution.substitute_xml``. You can
-use these functions to simulate ``formatter=html`` or
-``formatter==minimal``, but then do something extra.
-
-Here's an example that replaces Unicode characters with HTML entities
-whenever possible, but `also` converts all strings to uppercase::
-
- from bs4.dammit import EntitySubstitution
- def uppercase_and_substitute_html_entities(str):
- return EntitySubstitution.substitute_html(str.upper())
-
- print(soup.prettify(formatter=uppercase_and_substitute_html_entities))
- # <html>
- # <body>
- # <p>
- # IL A DIT &lt;&lt;SACR&Eacute; BLEU!&gt;&gt;
- # </p>
- # </body>
- # </html>
-
-One last caveat: if you create a ``CData`` object, the text inside
-that object is always presented `exactly as it appears, with no
-formatting`. Beautiful Soup will call the formatter method, just in
-case you've written a custom method that counts all the strings in the
-document or something, but it will ignore the return value::
-
- from bs4.element import CData
- soup = BeautifulSoup("<a></a>")
- soup.a.string = CData("one < three")
- print(soup.a.prettify(formatter="xml"))
- # <a>
- # <![CDATA[one < three]]>
- # </a>
-
-
-``get_text()``
---------------
-
-If you only want the text part of a document or tag, you can use the
-``get_text()`` method. It returns all the text in a document or
-beneath a tag, as a single Unicode string::
-
- markup = '<a href="http://example.com/">\nI linked to <i>example.com</i>\n</a>'
- soup = BeautifulSoup(markup)
-
- soup.get_text()
- u'\nI linked to example.com\n'
- soup.i.get_text()
- u'example.com'
-
-You can specify a string to be used to join the bits of text
-together::
-
- # soup.get_text("|")
- u'\nI linked to |example.com|\n'
-
-You can tell Beautiful Soup to strip whitespace from the beginning and
-end of each bit of text::
-
- # soup.get_text("|", strip=True)
- u'I linked to|example.com'
-
-But at that point you might want to use the :ref:`.stripped_strings <string-generators>`
-generator instead, and process the text yourself::
-
- [text for text in soup.stripped_strings]
- # [u'I linked to', u'example.com']
-
-Specifying the parser to use
-============================
-
-If you just need to parse some HTML, you can dump the markup into the
-``BeautifulSoup`` constructor, and it'll probably be fine. Beautiful
-Soup will pick a parser for you and parse the data. But there are a
-few additional arguments you can pass in to the constructor to change
-which parser is used.
-
-The first argument to the ``BeautifulSoup`` constructor is a string or
-an open filehandle--the markup you want parsed. The second argument is
-`how` you'd like the markup parsed.
-
-If you don't specify anything, you'll get the best HTML parser that's
-installed. Beautiful Soup ranks lxml's parser as being the best, then
-html5lib's, then Python's built-in parser. You can override this by
-specifying one of the following:
-
-* What type of markup you want to parse. Currently supported are
- "html", "xml", and "html5".
-
-* The name of the parser library you want to use. Currently supported
- options are "lxml", "html5lib", and "html.parser" (Python's
- built-in HTML parser).
-
-The section `Installing a parser`_ contrasts the supported parsers.
-
-If you don't have an appropriate parser installed, Beautiful Soup will
-ignore your request and pick a different parser. Right now, the only
-supported XML parser is lxml. If you don't have lxml installed, asking
-for an XML parser won't give you one, and asking for "lxml" won't work
-either.
-
-Differences between parsers
----------------------------
-
-Beautiful Soup presents the same interface to a number of different
-parsers, but each parser is different. Different parsers will create
-different parse trees from the same document. The biggest differences
-are between the HTML parsers and the XML parsers. Here's a short
-document, parsed as HTML::
-
- BeautifulSoup("<a><b /></a>")
- # <html><head></head><body><a><b></b></a></body></html>
-
-Since an empty <b /> tag is not valid HTML, the parser turns it into a
-<b></b> tag pair.
-
-Here's the same document parsed as XML (running this requires that you
-have lxml installed). Note that the empty <b /> tag is left alone, and
-that the document is given an XML declaration instead of being put
-into an <html> tag.::
-
- BeautifulSoup("<a><b /></a>", "xml")
- # <?xml version="1.0" encoding="utf-8"?>
- # <a><b/></a>
-
-There are also differences between HTML parsers. If you give Beautiful
-Soup a perfectly-formed HTML document, these differences won't
-matter. One parser will be faster than another, but they'll all give
-you a data structure that looks exactly like the original HTML
-document.
-
-But if the document is not perfectly-formed, different parsers will
-give different results. Here's a short, invalid document parsed using
-lxml's HTML parser. Note that the dangling </p> tag is simply
-ignored::
-
- BeautifulSoup("<a></p>", "lxml")
- # <html><body><a></a></body></html>
-
-Here's the same document parsed using html5lib::
-
- BeautifulSoup("<a></p>", "html5lib")
- # <html><head></head><body><a><p></p></a></body></html>
-
-Instead of ignoring the dangling </p> tag, html5lib pairs it with an
-opening <p> tag. This parser also adds an empty <head> tag to the
-document.
-
-Here's the same document parsed with Python's built-in HTML
-parser::
-
- BeautifulSoup("<a></p>", "html.parser")
- # <a></a>
-
-Like html5lib, this parser ignores the closing </p> tag. Unlike
-html5lib, this parser makes no attempt to create a well-formed HTML
-document by adding a <body> tag. Unlike lxml, it doesn't even bother
-to add an <html> tag.
-
-Since the document "<a></p>" is invalid, none of these techniques is
-the "correct" way to handle it. The html5lib parser uses techniques
-that are part of the HTML5 standard, so it has the best claim on being
-the "correct" way, but all three techniques are legitimate.
-
-Differences between parsers can affect your script. If you're planning
-on distributing your script to other people, or running it on multiple
-machines, you should specify a parser in the ``BeautifulSoup``
-constructor. That will reduce the chances that your users parse a
-document differently from the way you parse it.
-
-Encodings
-=========
-
-Any HTML or XML document is written in a specific encoding like ASCII
-or UTF-8. But when you load that document into Beautiful Soup, you'll
-discover it's been converted to Unicode::
-
- markup = "<h1>Sacr\xc3\xa9 bleu!</h1>"
- soup = BeautifulSoup(markup)
- soup.h1
- # <h1>Sacré bleu!</h1>
- soup.h1.string
- # u'Sacr\xe9 bleu!'
-
-It's not magic. (That sure would be nice.) Beautiful Soup uses a
-sub-library called `Unicode, Dammit`_ to detect a document's encoding
-and convert it to Unicode. The autodetected encoding is available as
-the ``.original_encoding`` attribute of the ``BeautifulSoup`` object::
-
- soup.original_encoding
- 'utf-8'
-
-Unicode, Dammit guesses correctly most of the time, but sometimes it
-makes mistakes. Sometimes it guesses correctly, but only after a
-byte-by-byte search of the document that takes a very long time. If
-you happen to know a document's encoding ahead of time, you can avoid
-mistakes and delays by passing it to the ``BeautifulSoup`` constructor
-as ``from_encoding``.
-
-Here's a document written in ISO-8859-8. The document is so short that
-Unicode, Dammit can't get a good lock on it, and misidentifies it as
-ISO-8859-7::
-
- markup = b"<h1>\xed\xe5\xec\xf9</h1>"
- soup = BeautifulSoup(markup)
- soup.h1
- <h1>νεμω</h1>
- soup.original_encoding
- 'ISO-8859-7'
-
-We can fix this by passing in the correct ``from_encoding``::
-
- soup = BeautifulSoup(markup, from_encoding="iso-8859-8")
- soup.h1
- <h1>םולש</h1>
- soup.original_encoding
- 'iso8859-8'
-
-In rare cases (usually when a UTF-8 document contains text written in
-a completely different encoding), the only way to get Unicode may be
-to replace some characters with the special Unicode character
-"REPLACEMENT CHARACTER" (U+FFFD, �). If Unicode, Dammit needs to do
-this, it will set the ``.contains_replacement_characters`` attribute
-to ``True`` on the ``UnicodeDammit`` or ``BeautifulSoup`` object. This
-lets you know that the Unicode representation is not an exact
-representation of the original--some data was lost. If a document
-contains �, but ``.contains_replacement_characters`` is ``False``,
-you'll know that the � was there originally (as it is in this
-paragraph) and doesn't stand in for missing data.
-
-Output encoding
----------------
-
-When you write out a document from Beautiful Soup, you get a UTF-8
-document, even if the document wasn't in UTF-8 to begin with. Here's a
-document written in the Latin-1 encoding::
-
- markup = b'''
- <html>
- <head>
- <meta content="text/html; charset=ISO-Latin-1" http-equiv="Content-type" />
- </head>
- <body>
- <p>Sacr\xe9 bleu!</p>
- </body>
- </html>
- '''
-
- soup = BeautifulSoup(markup)
- print(soup.prettify())
- # <html>
- # <head>
- # <meta content="text/html; charset=utf-8" http-equiv="Content-type" />
- # </head>
- # <body>
- # <p>
- # Sacré bleu!
- # </p>
- # </body>
- # </html>
-
-Note that the <meta> tag has been rewritten to reflect the fact that
-the document is now in UTF-8.
-
-If you don't want UTF-8, you can pass an encoding into ``prettify()``::
-
- print(soup.prettify("latin-1"))
- # <html>
- # <head>
- # <meta content="text/html; charset=latin-1" http-equiv="Content-type" />
- # ...
-
-You can also call encode() on the ``BeautifulSoup`` object, or any
-element in the soup, just as if it were a Python string::
-
- soup.p.encode("latin-1")
- # '<p>Sacr\xe9 bleu!</p>'
-
- soup.p.encode("utf-8")
- # '<p>Sacr\xc3\xa9 bleu!</p>'
-
-Any characters that can't be represented in your chosen encoding will
-be converted into numeric XML entity references. Here's a document
-that includes the Unicode character SNOWMAN::
-
- markup = u"<b>\N{SNOWMAN}</b>"
- snowman_soup = BeautifulSoup(markup)
- tag = snowman_soup.b
-
-The SNOWMAN character can be part of a UTF-8 document (it looks like
-☃), but there's no representation for that character in ISO-Latin-1 or
-ASCII, so it's converted into "&#9731" for those encodings::
-
- print(tag.encode("utf-8"))
- # <b>☃</b>
-
- print tag.encode("latin-1")
- # <b>&#9731;</b>
-
- print tag.encode("ascii")
- # <b>&#9731;</b>
-
-Unicode, Dammit
----------------
-
-You can use Unicode, Dammit without using Beautiful Soup. It's useful
-whenever you have data in an unknown encoding and you just want it to
-become Unicode::
-
- from bs4 import UnicodeDammit
- dammit = UnicodeDammit("Sacr\xc3\xa9 bleu!")
- print(dammit.unicode_markup)
- # Sacré bleu!
- dammit.original_encoding
- # 'utf-8'
-
-Unicode, Dammit's guesses will get a lot more accurate if you install
-the ``chardet`` or ``cchardet`` Python libraries. The more data you
-give Unicode, Dammit, the more accurately it will guess. If you have
-your own suspicions as to what the encoding might be, you can pass
-them in as a list::
-
- dammit = UnicodeDammit("Sacr\xe9 bleu!", ["latin-1", "iso-8859-1"])
- print(dammit.unicode_markup)
- # Sacré bleu!
- dammit.original_encoding
- # 'latin-1'
-
-Unicode, Dammit has two special features that Beautiful Soup doesn't
-use.
-
-Smart quotes
-^^^^^^^^^^^^
-
-You can use Unicode, Dammit to convert Microsoft smart quotes to HTML or XML
-entities::
-
- markup = b"<p>I just \x93love\x94 Microsoft Word\x92s smart quotes</p>"
-
- UnicodeDammit(markup, ["windows-1252"], smart_quotes_to="html").unicode_markup
- # u'<p>I just &ldquo;love&rdquo; Microsoft Word&rsquo;s smart quotes</p>'
-
- UnicodeDammit(markup, ["windows-1252"], smart_quotes_to="xml").unicode_markup
- # u'<p>I just &#x201C;love&#x201D; Microsoft Word&#x2019;s smart quotes</p>'
-
-You can also convert Microsoft smart quotes to ASCII quotes::
-
- UnicodeDammit(markup, ["windows-1252"], smart_quotes_to="ascii").unicode_markup
- # u'<p>I just "love" Microsoft Word\'s smart quotes</p>'
-
-Hopefully you'll find this feature useful, but Beautiful Soup doesn't
-use it. Beautiful Soup prefers the default behavior, which is to
-convert Microsoft smart quotes to Unicode characters along with
-everything else::
-
- UnicodeDammit(markup, ["windows-1252"]).unicode_markup
- # u'<p>I just \u201clove\u201d Microsoft Word\u2019s smart quotes</p>'
-
-Inconsistent encodings
-^^^^^^^^^^^^^^^^^^^^^^
-
-Sometimes a document is mostly in UTF-8, but contains Windows-1252
-characters such as (again) Microsoft smart quotes. This can happen
-when a website includes data from multiple sources. You can use
-``UnicodeDammit.detwingle()`` to turn such a document into pure
-UTF-8. Here's a simple example::
-
- snowmen = (u"\N{SNOWMAN}" * 3)
- quote = (u"\N{LEFT DOUBLE QUOTATION MARK}I like snowmen!\N{RIGHT DOUBLE QUOTATION MARK}")
- doc = snowmen.encode("utf8") + quote.encode("windows_1252")
-
-This document is a mess. The snowmen are in UTF-8 and the quotes are
-in Windows-1252. You can display the snowmen or the quotes, but not
-both::
-
- print(doc)
- # ☃☃☃�I like snowmen!�
-
- print(doc.decode("windows-1252"))
- # ☃☃☃“I like snowmen!”
-
-Decoding the document as UTF-8 raises a ``UnicodeDecodeError``, and
-decoding it as Windows-1252 gives you gibberish. Fortunately,
-``UnicodeDammit.detwingle()`` will convert the string to pure UTF-8,
-allowing you to decode it to Unicode and display the snowmen and quote
-marks simultaneously::
-
- new_doc = UnicodeDammit.detwingle(doc)
- print(new_doc.decode("utf8"))
- # ☃☃☃“I like snowmen!”
-
-``UnicodeDammit.detwingle()`` only knows how to handle Windows-1252
-embedded in UTF-8 (or vice versa, I suppose), but this is the most
-common case.
-
-Note that you must know to call ``UnicodeDammit.detwingle()`` on your
-data before passing it into ``BeautifulSoup`` or the ``UnicodeDammit``
-constructor. Beautiful Soup assumes that a document has a single
-encoding, whatever it might be. If you pass it a document that
-contains both UTF-8 and Windows-1252, it's likely to think the whole
-document is Windows-1252, and the document will come out looking like
-` ☃☃☃“I like snowmen!”`.
-
-``UnicodeDammit.detwingle()`` is new in Beautiful Soup 4.1.0.
-
-Parsing only part of a document
-===============================
-
-Let's say you want to use Beautiful Soup look at a document's <a>
-tags. It's a waste of time and memory to parse the entire document and
-then go over it again looking for <a> tags. It would be much faster to
-ignore everything that wasn't an <a> tag in the first place. The
-``SoupStrainer`` class allows you to choose which parts of an incoming
-document are parsed. You just create a ``SoupStrainer`` and pass it in
-to the ``BeautifulSoup`` constructor as the ``parse_only`` argument.
-
-(Note that *this feature won't work if you're using the html5lib parser*.
-If you use html5lib, the whole document will be parsed, no
-matter what. This is because html5lib constantly rearranges the parse
-tree as it works, and if some part of the document didn't actually
-make it into the parse tree, it'll crash. To avoid confusion, in the
-examples below I'll be forcing Beautiful Soup to use Python's
-built-in parser.)
-
-``SoupStrainer``
-----------------
-
-The ``SoupStrainer`` class takes the same arguments as a typical
-method from `Searching the tree`_: :ref:`name <name>`, :ref:`attrs
-<attrs>`, :ref:`text <text>`, and :ref:`**kwargs <kwargs>`. Here are
-three ``SoupStrainer`` objects::
-
- from bs4 import SoupStrainer
-
- only_a_tags = SoupStrainer("a")
-
- only_tags_with_id_link2 = SoupStrainer(id="link2")
-
- def is_short_string(string):
- return len(string) < 10
-
- only_short_strings = SoupStrainer(text=is_short_string)
-
-I'm going to bring back the "three sisters" document one more time,
-and we'll see what the document looks like when it's parsed with these
-three ``SoupStrainer`` objects::
-
- html_doc = """
- <html><head><title>The Dormouse's story</title></head>
-
- <p class="title"><b>The Dormouse's story</b></p>
-
- <p class="story">Once upon a time there were three little sisters; and their names were
- <a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,
- <a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and
- <a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>;
- and they lived at the bottom of a well.</p>
-
- <p class="story">...</p>
- """
-
- print(BeautifulSoup(html_doc, "html.parser", parse_only=only_a_tags).prettify())
- # <a class="sister" href="http://example.com/elsie" id="link1">
- # Elsie
- # </a>
- # <a class="sister" href="http://example.com/lacie" id="link2">
- # Lacie
- # </a>
- # <a class="sister" href="http://example.com/tillie" id="link3">
- # Tillie
- # </a>
-
- print(BeautifulSoup(html_doc, "html.parser", parse_only=only_tags_with_id_link2).prettify())
- # <a class="sister" href="http://example.com/lacie" id="link2">
- # Lacie
- # </a>
-
- print(BeautifulSoup(html_doc, "html.parser", parse_only=only_short_strings).prettify())
- # Elsie
- # ,
- # Lacie
- # and
- # Tillie
- # ...
- #
-
-You can also pass a ``SoupStrainer`` into any of the methods covered
-in `Searching the tree`_. This probably isn't terribly useful, but I
-thought I'd mention it::
-
- soup = BeautifulSoup(html_doc)
- soup.find_all(only_short_strings)
- # [u'\n\n', u'\n\n', u'Elsie', u',\n', u'Lacie', u' and\n', u'Tillie',
- # u'\n\n', u'...', u'\n']
-
-Troubleshooting
-===============
-
-.. _diagnose:
-
-``diagnose()``
---------------
-
-If you're having trouble understanding what Beautiful Soup does to a
-document, pass the document into the ``diagnose()`` function. (New in
-Beautiful Soup 4.2.0.) Beautiful Soup will print out a report showing
-you how different parsers handle the document, and tell you if you're
-missing a parser that Beautiful Soup could be using::
-
- from bs4.diagnose import diagnose
- data = open("bad.html").read()
- diagnose(data)
-
- # Diagnostic running on Beautiful Soup 4.2.0
- # Python version 2.7.3 (default, Aug 1 2012, 05:16:07)
- # I noticed that html5lib is not installed. Installing it may help.
- # Found lxml version 2.3.2.0
- #
- # Trying to parse your data with html.parser
- # Here's what html.parser did with the document:
- # ...
-
-Just looking at the output of diagnose() may show you how to solve the
-problem. Even if not, you can paste the output of ``diagnose()`` when
-asking for help.
-
-Errors when parsing a document
-------------------------------
-
-There are two different kinds of parse errors. There are crashes,
-where you feed a document to Beautiful Soup and it raises an
-exception, usually an ``HTMLParser.HTMLParseError``. And there is
-unexpected behavior, where a Beautiful Soup parse tree looks a lot
-different than the document used to create it.
-
-Almost none of these problems turn out to be problems with Beautiful
-Soup. This is not because Beautiful Soup is an amazingly well-written
-piece of software. It's because Beautiful Soup doesn't include any
-parsing code. Instead, it relies on external parsers. If one parser
-isn't working on a certain document, the best solution is to try a
-different parser. See `Installing a parser`_ for details and a parser
-comparison.
-
-The most common parse errors are ``HTMLParser.HTMLParseError:
-malformed start tag`` and ``HTMLParser.HTMLParseError: bad end
-tag``. These are both generated by Python's built-in HTML parser
-library, and the solution is to :ref:`install lxml or
-html5lib. <parser-installation>`
-
-The most common type of unexpected behavior is that you can't find a
-tag that you know is in the document. You saw it going in, but
-``find_all()`` returns ``[]`` or ``find()`` returns ``None``. This is
-another common problem with Python's built-in HTML parser, which
-sometimes skips tags it doesn't understand. Again, the solution is to
-:ref:`install lxml or html5lib. <parser-installation>`
-
-Version mismatch problems
--------------------------
-
-* ``SyntaxError: Invalid syntax`` (on the line ``ROOT_TAG_NAME =
- u'[document]'``): Caused by running the Python 2 version of
- Beautiful Soup under Python 3, without converting the code.
-
-* ``ImportError: No module named HTMLParser`` - Caused by running the
- Python 2 version of Beautiful Soup under Python 3.
-
-* ``ImportError: No module named html.parser`` - Caused by running the
- Python 3 version of Beautiful Soup under Python 2.
-
-* ``ImportError: No module named BeautifulSoup`` - Caused by running
- Beautiful Soup 3 code on a system that doesn't have BS3
- installed. Or, by writing Beautiful Soup 4 code without knowing that
- the package name has changed to ``bs4``.
-
-* ``ImportError: No module named bs4`` - Caused by running Beautiful
- Soup 4 code on a system that doesn't have BS4 installed.
-
-.. _parsing-xml:
-
-Parsing XML
------------
-
-By default, Beautiful Soup parses documents as HTML. To parse a
-document as XML, pass in "xml" as the second argument to the
-``BeautifulSoup`` constructor::
-
- soup = BeautifulSoup(markup, "xml")
-
-You'll need to :ref:`have lxml installed <parser-installation>`.
-
-Other parser problems
----------------------
-
-* If your script works on one computer but not another, it's probably
- because the two computers have different parser libraries
- available. For example, you may have developed the script on a
- computer that has lxml installed, and then tried to run it on a
- computer that only has html5lib installed. See `Differences between
- parsers`_ for why this matters, and fix the problem by mentioning a
- specific parser library in the ``BeautifulSoup`` constructor.
-
-* Because `HTML tags and attributes are case-insensitive
- <http://www.w3.org/TR/html5/syntax.html#syntax>`_, all three HTML
- parsers convert tag and attribute names to lowercase. That is, the
- markup <TAG></TAG> is converted to <tag></tag>. If you want to
- preserve mixed-case or uppercase tags and attributes, you'll need to
- :ref:`parse the document as XML. <parsing-xml>`
-
-.. _misc:
-
-Miscellaneous
--------------
-
-* ``UnicodeEncodeError: 'charmap' codec can't encode character
- u'\xfoo' in position bar`` (or just about any other
- ``UnicodeEncodeError``) - This is not a problem with Beautiful Soup.
- This problem shows up in two main situations. First, when you try to
- print a Unicode character that your console doesn't know how to
- display. (See `this page on the Python wiki
- <http://wiki.python.org/moin/PrintFails>`_ for help.) Second, when
- you're writing to a file and you pass in a Unicode character that's
- not supported by your default encoding. In this case, the simplest
- solution is to explicitly encode the Unicode string into UTF-8 with
- ``u.encode("utf8")``.
-
-* ``KeyError: [attr]`` - Caused by accessing ``tag['attr']`` when the
- tag in question doesn't define the ``attr`` attribute. The most
- common errors are ``KeyError: 'href'`` and ``KeyError:
- 'class'``. Use ``tag.get('attr')`` if you're not sure ``attr`` is
- defined, just as you would with a Python dictionary.
-
-* ``AttributeError: 'ResultSet' object has no attribute 'foo'`` - This
- usually happens because you expected ``find_all()`` to return a
- single tag or string. But ``find_all()`` returns a _list_ of tags
- and strings--a ``ResultSet`` object. You need to iterate over the
- list and look at the ``.foo`` of each one. Or, if you really only
- want one result, you need to use ``find()`` instead of
- ``find_all()``.
-
-* ``AttributeError: 'NoneType' object has no attribute 'foo'`` - This
- usually happens because you called ``find()`` and then tried to
- access the `.foo`` attribute of the result. But in your case,
- ``find()`` didn't find anything, so it returned ``None``, instead of
- returning a tag or a string. You need to figure out why your
- ``find()`` call isn't returning anything.
-
-Improving Performance
----------------------
-
-Beautiful Soup will never be as fast as the parsers it sits on top
-of. If response time is critical, if you're paying for computer time
-by the hour, or if there's any other reason why computer time is more
-valuable than programmer time, you should forget about Beautiful Soup
-and work directly atop `lxml <http://lxml.de/>`_.
-
-That said, there are things you can do to speed up Beautiful Soup. If
-you're not using lxml as the underlying parser, my advice is to
-:ref:`start <parser-installation>`. Beautiful Soup parses documents
-significantly faster using lxml than using html.parser or html5lib.
-
-You can speed up encoding detection significantly by installing the
-`cchardet <http://pypi.python.org/pypi/cchardet/>`_ library.
-
-`Parsing only part of a document`_ won't save you much time parsing
-the document, but it can save a lot of memory, and it'll make
-`searching` the document much faster.
-
-Beautiful Soup 3
-================
-
-Beautiful Soup 3 is the previous release series, and is no longer
-being actively developed. It's currently packaged with all major Linux
-distributions:
-
-:kbd:`$ apt-get install python-beautifulsoup`
-
-It's also published through PyPi as ``BeautifulSoup``.:
-
-:kbd:`$ easy_install BeautifulSoup`
-
-:kbd:`$ pip install BeautifulSoup`
-
-You can also `download a tarball of Beautiful Soup 3.2.0
-<http://www.crummy.com/software/BeautifulSoup/bs3/download/3.x/BeautifulSoup-3.2.0.tar.gz>`_.
-
-If you ran ``easy_install beautifulsoup`` or ``easy_install
-BeautifulSoup``, but your code doesn't work, you installed Beautiful
-Soup 3 by mistake. You need to run ``easy_install beautifulsoup4``.
-
-`The documentation for Beautiful Soup 3 is archived online
-<http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html>`_. If
-your first language is Chinese, it might be easier for you to read
-`the Chinese translation of the Beautiful Soup 3 documentation
-<http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.html>`_,
-then read this document to find out about the changes made in
-Beautiful Soup 4.
-
-Porting code to BS4
--------------------
-
-Most code written against Beautiful Soup 3 will work against Beautiful
-Soup 4 with one simple change. All you should have to do is change the
-package name from ``BeautifulSoup`` to ``bs4``. So this::
-
- from BeautifulSoup import BeautifulSoup
-
-becomes this::
-
- from bs4 import BeautifulSoup
-
-* If you get the ``ImportError`` "No module named BeautifulSoup", your
- problem is that you're trying to run Beautiful Soup 3 code, but you
- only have Beautiful Soup 4 installed.
-
-* If you get the ``ImportError`` "No module named bs4", your problem
- is that you're trying to run Beautiful Soup 4 code, but you only
- have Beautiful Soup 3 installed.
-
-Although BS4 is mostly backwards-compatible with BS3, most of its
-methods have been deprecated and given new names for `PEP 8 compliance
-<http://www.python.org/dev/peps/pep-0008/>`_. There are numerous other
-renames and changes, and a few of them break backwards compatibility.
-
-Here's what you'll need to know to convert your BS3 code and habits to BS4:
-
-You need a parser
-^^^^^^^^^^^^^^^^^
-
-Beautiful Soup 3 used Python's ``SGMLParser``, a module that was
-deprecated and removed in Python 3.0. Beautiful Soup 4 uses
-``html.parser`` by default, but you can plug in lxml or html5lib and
-use that instead. See `Installing a parser`_ for a comparison.
-
-Since ``html.parser`` is not the same parser as ``SGMLParser``, it
-will treat invalid markup differently. Usually the "difference" is
-that ``html.parser`` crashes. In that case, you'll need to install
-another parser. But sometimes ``html.parser`` just creates a different
-parse tree than ``SGMLParser`` would. If this happens, you may need to
-update your BS3 scraping code to deal with the new tree.
-
-Method names
-^^^^^^^^^^^^
-
-* ``renderContents`` -> ``encode_contents``
-* ``replaceWith`` -> ``replace_with``
-* ``replaceWithChildren`` -> ``unwrap``
-* ``findAll`` -> ``find_all``
-* ``findAllNext`` -> ``find_all_next``
-* ``findAllPrevious`` -> ``find_all_previous``
-* ``findNext`` -> ``find_next``
-* ``findNextSibling`` -> ``find_next_sibling``
-* ``findNextSiblings`` -> ``find_next_siblings``
-* ``findParent`` -> ``find_parent``
-* ``findParents`` -> ``find_parents``
-* ``findPrevious`` -> ``find_previous``
-* ``findPreviousSibling`` -> ``find_previous_sibling``
-* ``findPreviousSiblings`` -> ``find_previous_siblings``
-* ``nextSibling`` -> ``next_sibling``
-* ``previousSibling`` -> ``previous_sibling``
-
-Some arguments to the Beautiful Soup constructor were renamed for the
-same reasons:
-
-* ``BeautifulSoup(parseOnlyThese=...)`` -> ``BeautifulSoup(parse_only=...)``
-* ``BeautifulSoup(fromEncoding=...)`` -> ``BeautifulSoup(from_encoding=...)``
-
-I renamed one method for compatibility with Python 3:
-
-* ``Tag.has_key()`` -> ``Tag.has_attr()``
-
-I renamed one attribute to use more accurate terminology:
-
-* ``Tag.isSelfClosing`` -> ``Tag.is_empty_element``
-
-I renamed three attributes to avoid using words that have special
-meaning to Python. Unlike the others, these changes are *not backwards
-compatible.* If you used these attributes in BS3, your code will break
-on BS4 until you change them.
-
-* ``UnicodeDammit.unicode`` -> ``UnicodeDammit.unicode_markup``
-* ``Tag.next`` -> ``Tag.next_element``
-* ``Tag.previous`` -> ``Tag.previous_element``
-
-Generators
-^^^^^^^^^^
-
-I gave the generators PEP 8-compliant names, and transformed them into
-properties:
-
-* ``childGenerator()`` -> ``children``
-* ``nextGenerator()`` -> ``next_elements``
-* ``nextSiblingGenerator()`` -> ``next_siblings``
-* ``previousGenerator()`` -> ``previous_elements``
-* ``previousSiblingGenerator()`` -> ``previous_siblings``
-* ``recursiveChildGenerator()`` -> ``descendants``
-* ``parentGenerator()`` -> ``parents``
-
-So instead of this::
-
- for parent in tag.parentGenerator():
- ...
-
-You can write this::
-
- for parent in tag.parents:
- ...
-
-(But the old code will still work.)
-
-Some of the generators used to yield ``None`` after they were done, and
-then stop. That was a bug. Now the generators just stop.
-
-There are two new generators, :ref:`.strings and
-.stripped_strings <string-generators>`. ``.strings`` yields
-NavigableString objects, and ``.stripped_strings`` yields Python
-strings that have had whitespace stripped.
-
-XML
-^^^
-
-There is no longer a ``BeautifulStoneSoup`` class for parsing XML. To
-parse XML you pass in "xml" as the second argument to the
-``BeautifulSoup`` constructor. For the same reason, the
-``BeautifulSoup`` constructor no longer recognizes the ``isHTML``
-argument.
-
-Beautiful Soup's handling of empty-element XML tags has been
-improved. Previously when you parsed XML you had to explicitly say
-which tags were considered empty-element tags. The ``selfClosingTags``
-argument to the constructor is no longer recognized. Instead,
-Beautiful Soup considers any empty tag to be an empty-element tag. If
-you add a child to an empty-element tag, it stops being an
-empty-element tag.
-
-Entities
-^^^^^^^^
-
-An incoming HTML or XML entity is always converted into the
-corresponding Unicode character. Beautiful Soup 3 had a number of
-overlapping ways of dealing with entities, which have been
-removed. The ``BeautifulSoup`` constructor no longer recognizes the
-``smartQuotesTo`` or ``convertEntities`` arguments. (`Unicode,
-Dammit`_ still has ``smart_quotes_to``, but its default is now to turn
-smart quotes into Unicode.) The constants ``HTML_ENTITIES``,
-``XML_ENTITIES``, and ``XHTML_ENTITIES`` have been removed, since they
-configure a feature (transforming some but not all entities into
-Unicode characters) that no longer exists.
-
-If you want to turn Unicode characters back into HTML entities on
-output, rather than turning them into UTF-8 characters, you need to
-use an :ref:`output formatter <output_formatters>`.
-
-Miscellaneous
-^^^^^^^^^^^^^
-
-:ref:`Tag.string <.string>` now operates recursively. If tag A
-contains a single tag B and nothing else, then A.string is the same as
-B.string. (Previously, it was None.)
-
-`Multi-valued attributes`_ like ``class`` have lists of strings as
-their values, not strings. This may affect the way you search by CSS
-class.
-
-If you pass one of the ``find*`` methods both :ref:`text <text>` `and`
-a tag-specific argument like :ref:`name <name>`, Beautiful Soup will
-search for tags that match your tag-specific criteria and whose
-:ref:`Tag.string <.string>` matches your value for :ref:`text
-<text>`. It will `not` find the strings themselves. Previously,
-Beautiful Soup ignored the tag-specific arguments and looked for
-strings.
-
-The ``BeautifulSoup`` constructor no longer recognizes the
-`markupMassage` argument. It's now the parser's responsibility to
-handle markup correctly.
-
-The rarely-used alternate parser classes like
-``ICantBelieveItsBeautifulSoup`` and ``BeautifulSOAP`` have been
-removed. It's now the parser's decision how to handle ambiguous
-markup.
-
-The ``prettify()`` method now returns a Unicode string, not a bytestring.
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstrate_parser_differences.py b/chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstrate_parser_differences.py
deleted file mode 100644
index d84670a53a6..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstrate_parser_differences.py
+++ /dev/null
@@ -1,95 +0,0 @@
-"""Demonstrate how different parsers parse the same markup.
-
-Beautiful Soup can use any of a number of different parsers. Every
-parser should behave more or less the same on valid markup, and
-Beautiful Soup's unit tests make sure this is the case. But every
-parser handles invalid markup differently. Even different versions of
-the same parser handle invalid markup differently. So instead of unit
-tests I've created this educational demonstration script.
-
-The file demonstration_markup.txt contains many lines of HTML. This
-script tests each line of markup against every parser you have
-installed, and prints out how each parser sees that markup. This may
-help you choose a parser, or understand why Beautiful Soup presents
-your document the way it does.
-"""
-
-import os
-import sys
-from bs4 import BeautifulSoup
-parsers = ['html.parser']
-
-try:
- from bs4.builder import _lxml
- parsers.append('lxml')
-except ImportError, e:
- pass
-
-try:
- from bs4.builder import _html5lib
- parsers.append('html5lib')
-except ImportError, e:
- pass
-
-class Demonstration(object):
- def __init__(self, markup):
- self.results = {}
- self.markup = markup
-
- def run_against(self, *parser_names):
- uniform_results = True
- previous_output = None
- for parser in parser_names:
- try:
- soup = BeautifulSoup(self.markup, parser)
- if markup.startswith("<div>"):
- # Extract the interesting part
- output = soup.div
- else:
- output = soup
- except Exception, e:
- output = "[EXCEPTION] %s" % str(e)
- self.results[parser] = output
- if previous_output is None:
- previous_output = output
- elif previous_output != output:
- uniform_results = False
- return uniform_results
-
- def dump(self):
- print "%s: %s" % ("Markup".rjust(13), self.markup.encode("utf8"))
- for parser, output in self.results.items():
- print "%s: %s" % (parser.rjust(13), output.encode("utf8"))
-
-different_results = []
-uniform_results = []
-
-print "= Testing the following parsers: %s =" % ", ".join(parsers)
-print
-
-input_file = sys.stdin
-if sys.stdin.isatty():
- for filename in [
- "demonstration_markup.txt",
- os.path.join("scripts", "demonstration_markup.txt")]:
- if os.path.exists(filename):
- input_file = open(filename)
-
-for markup in input_file:
- demo = Demonstration(markup.decode("utf8").strip().replace("\\n", "\n"))
- is_uniform = demo.run_against(*parsers)
- if is_uniform:
- uniform_results.append(demo)
- else:
- different_results.append(demo)
-
-print "== Markup that's handled the same in every parser =="
-print
-for demo in uniform_results:
- demo.dump()
- print
-print "== Markup that's not handled the same in every parser =="
-print
-for demo in different_results:
- demo.dump()
- print
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstration_markup.txt b/chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstration_markup.txt
deleted file mode 100644
index a7914a0b04a..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/scripts/demonstration_markup.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-A bare string
-<!DOCTYPE xsl:stylesheet SYSTEM "htmlent.dtd">
-<!DOCTYPE xsl:stylesheet PUBLIC "htmlent.dtd">
-<div><![CDATA[A CDATA section where it doesn't belong]]></div>
-<div><svg><![CDATA[HTML5 does allow CDATA sections in SVG]]></svg></div>
-<div>A <meta> tag</div>
-<div>A <br> tag that supposedly has contents.</br></div>
-<div>AT&T</div>
-<div><textarea>Within a textarea, markup like <b> tags and <&<&amp; should be treated as literal</textarea></div>
-<div><script>if (i < 2) { alert("<b>Markup within script tags should be treated as literal.</b>"); }</script></div>
-<div>This numeric entity is missing the final semicolon: <x t="pi&#241ata"></div>
-<div><a href="http://example.com/</a> that attribute value never got closed</div>
-<div><a href="foo</a>, </a><a href="bar">that attribute value was closed by the subsequent tag</a></div>
-<! This document starts with a bogus declaration ><div>a</div>
-<div>This document contains <!an incomplete declaration <div>(do you see it?)</div>
-<div>This document ends with <!an incomplete declaration
-<div><a style={height:21px;}>That attribute value was bogus</a></div>
-<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">The doctype is invalid because it contains extra whitespace
-<div><table><td nowrap>That boolean attribute had no value</td></table></div>
-<div>Here's a nonexistent entity: &#foo; (do you see it?)</div>
-<div>This document ends before the entity finishes: &gt
-<div><p>Paragraphs shouldn't contain block display elements, but this one does: <dl><dt>you see?</dt></p>
-<b b="20" a="1" b="10" a="2" a="3" a="4">Multiple values for the same attribute.</b>
-<div><table><tr><td>Here's a table</td></tr></table></div>
-<div><table id="1"><tr><td>Here's a nested table:<table id="2"><tr><td>foo</td></tr></table></td></div>
-<div>This tag contains nothing but whitespace: <b> </b></div>
-<div><blockquote><p><b>This p tag is cut off by</blockquote></p>the end of the blockquote tag</div>
-<div><table><div>This table contains bare markup</div></table></div>
-<div><div id="1">\n <a href="link1">This link is never closed.\n</div>\n<div id="2">\n <div id="3">\n <a href="link2">This link is closed.</a>\n </div>\n</div></div>
-<div>This document contains a <!DOCTYPE surprise>surprise doctype</div>
-<div><a><B><Cd><EFG>Mixed case tags are folded to lowercase</efg></CD></b></A></div>
-<div><our☃>Tag name contains Unicode characters</our☃></div>
-<div><a ☃="snowman">Attribute name contains Unicode characters</a></div>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
diff --git a/chromium/third_party/catapult/third_party/beautifulsoup4/setup.py b/chromium/third_party/catapult/third_party/beautifulsoup4/setup.py
deleted file mode 100644
index 0142ea00e86..00000000000
--- a/chromium/third_party/catapult/third_party/beautifulsoup4/setup.py
+++ /dev/null
@@ -1,29 +0,0 @@
-from distutils.core import setup
-
-try:
- from distutils.command.build_py import build_py_2to3 as build_py
-except ImportError:
- # 2.x
- from distutils.command.build_py import build_py
-
-setup(name="beautifulsoup4",
- version = "4.3.2",
- author="Leonard Richardson",
- author_email='leonardr@segfault.org',
- url="http://www.crummy.com/software/BeautifulSoup/bs4/",
- download_url = "http://www.crummy.com/software/BeautifulSoup/bs4/download/",
- long_description="""Beautiful Soup sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and modifying the parse tree.""",
- license="MIT",
- packages=['bs4', 'bs4.builder', 'bs4.tests'],
- cmdclass = {'build_py':build_py},
- classifiers=["Development Status :: 4 - Beta",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: MIT License",
- "Programming Language :: Python",
- 'Programming Language :: Python :: 3',
- "Topic :: Text Processing :: Markup :: HTML",
- "Topic :: Text Processing :: Markup :: XML",
- "Topic :: Text Processing :: Markup :: SGML",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
-)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/.travis.yml b/chromium/third_party/catapult/third_party/html5lib-python/.travis.yml
deleted file mode 100644
index dd3130019e7..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/.travis.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-language: python
-python:
- - "2.6"
- - "2.7"
- - "3.2"
- - "3.3"
- - "3.4"
- - "pypy"
-
-env:
- - USE_OPTIONAL=true
- - USE_OPTIONAL=false
-
-matrix:
- exclude:
- - python: "2.7"
- env: USE_OPTIONAL=false
- - python: "3.4"
- env: USE_OPTIONAL=false
- include:
- - python: "2.7"
- env: USE_OPTIONAL=false FLAKE=true
- - python: "3.4"
- env: USE_OPTIONAL=false FLAKE=true
-
-before_install:
- - git submodule update --init --recursive
-
-install:
- - bash requirements-install.sh
-
-script:
- - nosetests
- - bash flake8-run.sh
-
-after_script:
- - python debug-info.py
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/AUTHORS.rst b/chromium/third_party/catapult/third_party/html5lib-python/AUTHORS.rst
deleted file mode 100644
index fe9ae89bcc1..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/AUTHORS.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-Credits
-=======
-
-``html5lib`` is written and maintained by:
-
-- James Graham
-- Geoffrey Sneddon
-- Łukasz Langa
-
-
-Patches and suggestions
------------------------
-(In chronological order, by first commit:)
-
-- Anne van Kesteren
-- Lachlan Hunt
-- lantis63
-- Sam Ruby
-- Thomas Broyer
-- Tim Fletcher
-- Mark Pilgrim
-- Ryan King
-- Philip Taylor
-- Edward Z. Yang
-- fantasai
-- Mike West
-- Philip Jägenstedt
-- Ms2ger
-- Mohammad Taha Jahangir
-- Andy Wingo
-- Juan Carlos Garcia Segovia
-- Andreas Madsack
-- Karim Valiev
-- Marc DM
-- Tony Lopes
-- lilbludevil
-- Simon Sapin
-- Jon Dufresne
-- Drew Hubl
-- Austin Kumbera
-- Jim Baker
-- Michael[tm] Smith
-- Marc Abramowitz
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/CHANGES.rst b/chromium/third_party/catapult/third_party/html5lib-python/CHANGES.rst
deleted file mode 100644
index 1279c27704b..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/CHANGES.rst
+++ /dev/null
@@ -1,217 +0,0 @@
-Change Log
-----------
-
-0.9999999/1.0b8
-~~~~~~~~~~~~~~~
-
-Released on XXX
-
-* XXX
-
-
-0.999999/1.0b7
-~~~~~~~~~~~~~~
-
-Released on July 7, 2015
-
-* Fix #189: fix the sanitizer to allow relative URLs again (as it did
- prior to 0.9999/1.0b5).
-
-
-0.99999/1.0b6
-~~~~~~~~~~~~~
-
-Released on April 30, 2015
-
-* Fix #188: fix the sanitizer to not throw an exception when sanitizing
- bogus data URLs.
-
-
-0.9999/1.0b5
-~~~~~~~~~~~~
-
-Released on April 29, 2015
-
-* Fix #153: Sanitizer fails to treat some attributes as URLs. Despite how
- this sounds, this has no known security implications. No known version
- of IE (5.5 to current), Firefox (3 to current), Safari (6 to current),
- Chrome (1 to current), or Opera (12 to current) will run any script
- provided in these attributes.
-
-* Pass error message to the ParseError exception in strict parsing mode.
-
-* Allow data URIs in the sanitizer, with a whitelist of content-types.
-
-* Add support for Python implementations that don't support lone
- surrogates (read: Jython). Fixes #2.
-
-* Remove localization of error messages. This functionality was totally
- unused (and untested that everything was localizable), so we may as
- well follow numerous browsers in not supporting translating technical
- strings.
-
-* Expose treewalkers.pprint as a public API.
-
-* Add a documentEncoding property to HTML5Parser, fix #121.
-
-
-0.999
-~~~~~
-
-Released on December 23, 2013
-
-* Fix #127: add work-around for CPython issue #20007: .read(0) on
- http.client.HTTPResponse drops the rest of the content.
-
-* Fix #115: lxml treewalker can now deal with fragments containing, at
- their root level, text nodes with non-ASCII characters on Python 2.
-
-
-0.99
-~~~~
-
-Released on September 10, 2013
-
-* No library changes from 1.0b3; released as 0.99 as pip has changed
- behaviour from 1.4 to avoid installing pre-release versions per
- PEP 440.
-
-
-1.0b3
-~~~~~
-
-Released on July 24, 2013
-
-* Removed ``RecursiveTreeWalker`` from ``treewalkers._base``. Any
- implementation using it should be moved to
- ``NonRecursiveTreeWalker``, as everything bundled with html5lib has
- for years.
-
-* Fix #67 so that ``BufferedStream`` to correctly returns a bytes
- object, thereby fixing any case where html5lib is passed a
- non-seekable RawIOBase-like object.
-
-
-1.0b2
-~~~~~
-
-Released on June 27, 2013
-
-* Removed reordering of attributes within the serializer. There is now
- an ``alphabetical_attributes`` option which preserves the previous
- behaviour through a new filter. This allows attribute order to be
- preserved through html5lib if the tree builder preserves order.
-
-* Removed ``dom2sax`` from DOM treebuilders. It has been replaced by
- ``treeadapters.sax.to_sax`` which is generic and supports any
- treewalker; it also resolves all known bugs with ``dom2sax``.
-
-* Fix treewalker assertions on hitting bytes strings on
- Python 2. Previous to 1.0b1, treewalkers coped with mixed
- bytes/unicode data on Python 2; this reintroduces this prior
- behaviour on Python 2. Behaviour is unchanged on Python 3.
-
-
-1.0b1
-~~~~~
-
-Released on May 17, 2013
-
-* Implementation updated to implement the `HTML specification
- <http://www.whatwg.org/specs/web-apps/current-work/>`_ as of 5th May
- 2013 (`SVN <http://svn.whatwg.org/webapps/>`_ revision r7867).
-
-* Python 3.2+ supported in a single codebase using the ``six`` library.
-
-* Removed support for Python 2.5 and older.
-
-* Removed the deprecated Beautiful Soup 3 treebuilder.
- ``beautifulsoup4`` can use ``html5lib`` as a parser instead. Note that
- since it doesn't support namespaces, foreign content like SVG and
- MathML is parsed incorrectly.
-
-* Removed ``simpletree`` from the package. The default tree builder is
- now ``etree`` (using the ``xml.etree.cElementTree`` implementation if
- available, and ``xml.etree.ElementTree`` otherwise).
-
-* Removed the ``XHTMLSerializer`` as it never actually guaranteed its
- output was well-formed XML, and hence provided little of use.
-
-* Removed default DOM treebuilder, so ``html5lib.treebuilders.dom`` is no
- longer supported. ``html5lib.treebuilders.getTreeBuilder("dom")`` will
- return the default DOM treebuilder, which uses ``xml.dom.minidom``.
-
-* Optional heuristic character encoding detection now based on
- ``charade`` for Python 2.6 - 3.3 compatibility.
-
-* Optional ``Genshi`` treewalker support fixed.
-
-* Many bugfixes, including:
-
- * #33: null in attribute value breaks XML AttValue;
-
- * #4: nested, indirect descendant, <button> causes infinite loop;
-
- * `Google Code 215
- <http://code.google.com/p/html5lib/issues/detail?id=215>`_: Properly
- detect seekable streams;
-
- * `Google Code 206
- <http://code.google.com/p/html5lib/issues/detail?id=206>`_: add
- support for <video preload=...>, <audio preload=...>;
-
- * `Google Code 205
- <http://code.google.com/p/html5lib/issues/detail?id=205>`_: add
- support for <video poster=...>;
-
- * `Google Code 202
- <http://code.google.com/p/html5lib/issues/detail?id=202>`_: Unicode
- file breaks InputStream.
-
-* Source code is now mostly PEP 8 compliant.
-
-* Test harness has been improved and now depends on ``nose``.
-
-* Documentation updated and moved to http://html5lib.readthedocs.org/.
-
-
-0.95
-~~~~
-
-Released on February 11, 2012
-
-
-0.90
-~~~~
-
-Released on January 17, 2010
-
-
-0.11.1
-~~~~~~
-
-Released on June 12, 2008
-
-
-0.11
-~~~~
-
-Released on June 10, 2008
-
-
-0.10
-~~~~
-
-Released on October 7, 2007
-
-
-0.9
-~~~
-
-Released on March 11, 2007
-
-
-0.2
-~~~
-
-Released on January 8, 2007
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/CONTRIBUTING.rst b/chromium/third_party/catapult/third_party/html5lib-python/CONTRIBUTING.rst
deleted file mode 100644
index 8c5e198535d..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/CONTRIBUTING.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-Contributing
-============
-
-Pull requests are more than welcome — both to the library and to the
-documentation. Some useful information:
-
-- We aim to follow PEP 8 in the library, but ignoring the
- 79-character-per-line limit, instead following a soft limit of 99,
- but allowing lines over this where it is the readable thing to do.
-
-- We aim to follow PEP 257 for all docstrings, and make them properly
- parseable by Sphinx while generating API documentation.
-
-- We keep ``pyflakes`` reporting no errors or warnings at all times.
-
-- We keep the master branch passing all tests at all times on all
- supported versions.
-
-`Travis CI <https://travis-ci.org/html5lib/html5lib-python/>`_ is run
-against all pull requests and should enforce all of the above.
-
-We use `Opera Critic <https://critic.hoppipolla.co.uk/>`_ as an external
-code-review tool, which uses your GitHub login to authenticate. You'll
-get email notifications for issues raised in the review.
-
-
-Patch submission guidelines
----------------------------
-
-- **Create a new Git branch specific to your change.** Do not put
- multiple fixes/features in the same pull request. If you find an
- unrelated bug, create a distinct branch and submit a separate pull
- request for the bugfix. This makes life much easier for maintainers
- and will speed up merging your patches.
-
-- **Write a test** whenever possible. Following existing tests is often
- easiest, and a good way to tell whether the feature you're modifying
- is easily testable.
-
-- **Make sure documentation is updated.** Keep docstrings current, and
- if necessary, update the Sphinx documentation in ``doc/``.
-
-- **Add a changelog entry** at the top of ``CHANGES.rst`` following
- existing entries' styles.
-
-- **Run tests with tox** if possible, to make sure your changes are
- compatible with all supported Python versions.
-
-- **Squash commits** before submitting the pull request so that a single
- commit contains the entire change, and only that change (see the first
- bullet).
-
-- **Don't rebase after creating the pull request.** Merge with upstream,
- if necessary, and use ``git commit --fixup`` for fixing issues raised
- in a Critic review or by a failing Travis build. The reviewer will
- squash and rebase your pull request while accepting it. Even though
- GitHub won't recognize the pull request as accepted, the squashed
- commits will properly specify you as the author.
-
-- **Attribute yourself** in ``AUTHORS.rst``.
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/LICENSE b/chromium/third_party/catapult/third_party/html5lib-python/LICENSE
deleted file mode 100644
index c87fa7a0006..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2006-2013 James Graham and other contributors
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/MANIFEST.in b/chromium/third_party/catapult/third_party/html5lib-python/MANIFEST.in
deleted file mode 100644
index 1edd0b7deea..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/MANIFEST.in
+++ /dev/null
@@ -1,6 +0,0 @@
-include LICENSE
-include CHANGES.rst
-include README.rst
-include requirements*.txt
-graft html5lib/tests/testdata
-recursive-include html5lib/tests *.py
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/README.chromium b/chromium/third_party/catapult/third_party/html5lib-python/README.chromium
deleted file mode 100644
index 18b86c0d399..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/README.chromium
+++ /dev/null
@@ -1,11 +0,0 @@
-Name: html5lib-python
-Short Name: html5lib
-URL: https://github.com/html5lib/html5lib-python
-Version: 01b1ebb7ce0146b8082b1a7315431aac023eb046
-License: MIT
-
-Description:
-Standards-compliant library for parsing and serializing HTML documents and
-fragments in Python
-
-Local Modifications: None
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/README.rst b/chromium/third_party/catapult/third_party/html5lib-python/README.rst
deleted file mode 100644
index 9e0a0f74048..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/README.rst
+++ /dev/null
@@ -1,157 +0,0 @@
-html5lib
-========
-
-.. image:: https://travis-ci.org/html5lib/html5lib-python.png?branch=master
- :target: https://travis-ci.org/html5lib/html5lib-python
-
-html5lib is a pure-python library for parsing HTML. It is designed to
-conform to the WHATWG HTML specification, as is implemented by all major
-web browsers.
-
-
-Usage
------
-
-Simple usage follows this pattern:
-
-.. code-block:: python
-
- import html5lib
- with open("mydocument.html", "rb") as f:
- document = html5lib.parse(f)
-
-or:
-
-.. code-block:: python
-
- import html5lib
- document = html5lib.parse("<p>Hello World!")
-
-By default, the ``document`` will be an ``xml.etree`` element instance.
-Whenever possible, html5lib chooses the accelerated ``ElementTree``
-implementation (i.e. ``xml.etree.cElementTree`` on Python 2.x).
-
-Two other tree types are supported: ``xml.dom.minidom`` and
-``lxml.etree``. To use an alternative format, specify the name of
-a treebuilder:
-
-.. code-block:: python
-
- import html5lib
- with open("mydocument.html", "rb") as f:
- lxml_etree_document = html5lib.parse(f, treebuilder="lxml")
-
-When using with ``urllib2`` (Python 2), the charset from HTTP should be
-pass into html5lib as follows:
-
-.. code-block:: python
-
- from contextlib import closing
- from urllib2 import urlopen
- import html5lib
-
- with closing(urlopen("http://example.com/")) as f:
- document = html5lib.parse(f, encoding=f.info().getparam("charset"))
-
-When using with ``urllib.request`` (Python 3), the charset from HTTP
-should be pass into html5lib as follows:
-
-.. code-block:: python
-
- from urllib.request import urlopen
- import html5lib
-
- with urlopen("http://example.com/") as f:
- document = html5lib.parse(f, encoding=f.info().get_content_charset())
-
-To have more control over the parser, create a parser object explicitly.
-For instance, to make the parser raise exceptions on parse errors, use:
-
-.. code-block:: python
-
- import html5lib
- with open("mydocument.html", "rb") as f:
- parser = html5lib.HTMLParser(strict=True)
- document = parser.parse(f)
-
-When you're instantiating parser objects explicitly, pass a treebuilder
-class as the ``tree`` keyword argument to use an alternative document
-format:
-
-.. code-block:: python
-
- import html5lib
- parser = html5lib.HTMLParser(tree=html5lib.getTreeBuilder("dom"))
- minidom_document = parser.parse("<p>Hello World!")
-
-More documentation is available at http://html5lib.readthedocs.org/.
-
-
-Installation
-------------
-
-html5lib works on CPython 2.6+, CPython 3.2+ and PyPy. To install it,
-use:
-
-.. code-block:: bash
-
- $ pip install html5lib
-
-
-Optional Dependencies
----------------------
-
-The following third-party libraries may be used for additional
-functionality:
-
-- ``datrie`` can be used to improve parsing performance (though in
- almost all cases the improvement is marginal);
-
-- ``lxml`` is supported as a tree format (for both building and
- walking) under CPython (but *not* PyPy where it is known to cause
- segfaults);
-
-- ``genshi`` has a treewalker (but not builder); and
-
-- ``charade`` can be used as a fallback when character encoding cannot
- be determined; ``chardet``, from which it was forked, can also be used
- on Python 2.
-
-- ``ordereddict`` can be used under Python 2.6
- (``collections.OrderedDict`` is used instead on later versions) to
- serialize attributes in alphabetical order.
-
-
-Bugs
-----
-
-Please report any bugs on the `issue tracker
-<https://github.com/html5lib/html5lib-python/issues>`_.
-
-
-Tests
------
-
-Unit tests require the ``nose`` library and can be run using the
-``nosetests`` command in the root directory; ``ordereddict`` is
-required under Python 2.6. All should pass.
-
-Test data are contained in a separate `html5lib-tests
-<https://github.com/html5lib/html5lib-tests>`_ repository and included
-as a submodule, thus for git checkouts they must be initialized::
-
- $ git submodule init
- $ git submodule update
-
-If you have all compatible Python implementations available on your
-system, you can run tests on all of them using the ``tox`` utility,
-which can be found on PyPI.
-
-
-Questions?
-----------
-
-There's a mailing list available for support on Google Groups,
-`html5lib-discuss <http://groups.google.com/group/html5lib-discuss>`_,
-though you may get a quicker response asking on IRC in `#whatwg on
-irc.freenode.net <http://wiki.whatwg.org/wiki/IRC>`_.
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/debug-info.py b/chromium/third_party/catapult/third_party/html5lib-python/debug-info.py
deleted file mode 100644
index b5d2bb6a305..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/debug-info.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from __future__ import print_function, unicode_literals
-
-import platform
-import sys
-
-
-info = {
- "impl": platform.python_implementation(),
- "version": platform.python_version(),
- "revision": platform.python_revision(),
- "maxunicode": sys.maxunicode,
- "maxsize": sys.maxsize
-}
-
-search_modules = ["charade", "chardet", "datrie", "genshi", "html5lib", "lxml", "six"]
-found_modules = []
-
-for m in search_modules:
- try:
- __import__(m)
- except ImportError:
- pass
- else:
- found_modules.append(m)
-
-info["modules"] = ", ".join(found_modules)
-
-
-print("""html5lib debug info:
-
-Python %(version)s (revision: %(revision)s)
-Implementation: %(impl)s
-
-sys.maxunicode: %(maxunicode)X
-sys.maxsize: %(maxsize)X
-
-Installed modules: %(modules)s""" % info)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/Makefile b/chromium/third_party/catapult/third_party/html5lib-python/doc/Makefile
deleted file mode 100644
index e0e58667e7d..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/Makefile
+++ /dev/null
@@ -1,177 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = _build
-
-# User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
-endif
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " texinfo to make Texinfo files"
- @echo " info to make Texinfo files and run them through makeinfo"
- @echo " gettext to make PO message catalogs"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " xml to make Docutils-native XML files"
- @echo " pseudoxml to make pseudoxml-XML files for display purposes"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/html5lib.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/html5lib.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/html5lib"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/html5lib"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-latexpdfja:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through platex and dvipdfmx..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
- @echo "Run \`make' in that directory to run these through makeinfo" \
- "(use \`make info' here to do that automatically)."
-
-info:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo "Running Texinfo files through makeinfo..."
- make -C $(BUILDDIR)/texinfo info
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-gettext:
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
- @echo
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
-
-xml:
- $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
- @echo
- @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
-
-pseudoxml:
- $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
- @echo
- @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/changes.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/changes.rst
deleted file mode 100644
index ded3b705d0f..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/changes.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-.. :changelog:
-
-.. include:: ../CHANGES.rst
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/conf.py b/chromium/third_party/catapult/third_party/html5lib-python/doc/conf.py
deleted file mode 100644
index 434f21c42eb..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/conf.py
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-#
-# html5lib documentation build configuration file, created by
-# sphinx-quickstart on Wed May 8 00:04:49 2013.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-
-# -- General configuration -----------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.viewcode']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = 'html5lib'
-copyright = '2006 - 2013, James Graham, Geoffrey Sneddon, and contributors'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '1.0'
-# The full version, including alpha/beta/rc tags.
-sys.path.append(os.path.abspath('..'))
-from html5lib import __version__
-release = __version__
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = 'en'
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['_build', 'theme']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'html5libdoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
- ('index', 'html5lib.tex', 'html5lib Documentation',
- 'James Graham, Geoffrey Sneddon, and contributors', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'html5lib', 'html5lib Documentation',
- ['James Graham, Geoffrey Sneddon, and contributors'], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output ------------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- ('index', 'html5lib', 'html5lib Documentation',
- 'James Graham, Geoffrey Sneddon, and contributors', 'html5lib', 'One line description of project.',
- 'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
-
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
-
-class CExtMock(object):
- """Required for autodoc on readthedocs.org where you cannot build C extensions."""
- def __init__(self, *args, **kwargs):
- pass
-
- def __call__(self, *args, **kwargs):
- return CExtMock()
-
- @classmethod
- def __getattr__(cls, name):
- if name in ('__file__', '__path__'):
- return '/dev/null'
- else:
- return CExtMock()
-
-try:
- import lxml # flake8: noqa
-except ImportError:
- sys.modules['lxml'] = CExtMock()
- sys.modules['lxml.etree'] = CExtMock()
- print("warning: lxml modules mocked.")
-
-try:
- import genshi # flake8: noqa
-except ImportError:
- sys.modules['genshi'] = CExtMock()
- sys.modules['genshi.core'] = CExtMock()
- print("warning: genshi modules mocked.")
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.filters.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.filters.rst
deleted file mode 100644
index 1fda38a735a..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.filters.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-filters Package
-===============
-
-:mod:`_base` Module
--------------------
-
-.. automodule:: html5lib.filters._base
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`alphabeticalattributes` Module
-------------------------------------
-
-.. automodule:: html5lib.filters.alphabeticalattributes
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`inject_meta_charset` Module
----------------------------------
-
-.. automodule:: html5lib.filters.inject_meta_charset
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`lint` Module
-------------------
-
-.. automodule:: html5lib.filters.lint
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`optionaltags` Module
---------------------------
-
-.. automodule:: html5lib.filters.optionaltags
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`sanitizer` Module
------------------------
-
-.. automodule:: html5lib.filters.sanitizer
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`whitespace` Module
-------------------------
-
-.. automodule:: html5lib.filters.whitespace
- :members:
- :undoc-members:
- :show-inheritance:
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.rst
deleted file mode 100644
index d4ed12b4646..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.rst
+++ /dev/null
@@ -1,77 +0,0 @@
-html5lib Package
-================
-
-:mod:`html5lib` Package
------------------------
-
-.. automodule:: html5lib.__init__
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`constants` Module
------------------------
-
-.. automodule:: html5lib.constants
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`html5parser` Module
--------------------------
-
-.. automodule:: html5lib.html5parser
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`ihatexml` Module
-----------------------
-
-.. automodule:: html5lib.ihatexml
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`inputstream` Module
--------------------------
-
-.. automodule:: html5lib.inputstream
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`sanitizer` Module
------------------------
-
-.. automodule:: html5lib.sanitizer
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`tokenizer` Module
------------------------
-
-.. automodule:: html5lib.tokenizer
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`utils` Module
--------------------
-
-.. automodule:: html5lib.utils
- :members:
- :undoc-members:
- :show-inheritance:
-
-Subpackages
------------
-
-.. toctree::
-
- html5lib.filters
- html5lib.serializer
- html5lib.treebuilders
- html5lib.treewalkers
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.serializer.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.serializer.rst
deleted file mode 100644
index fa9547421b1..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.serializer.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-serializer Package
-==================
-
-:mod:`serializer` Package
--------------------------
-
-.. automodule:: html5lib.serializer
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`htmlserializer` Module
-----------------------------
-
-.. automodule:: html5lib.serializer.htmlserializer
- :members:
- :undoc-members:
- :show-inheritance:
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treebuilders.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treebuilders.rst
deleted file mode 100644
index 9911983948d..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treebuilders.rst
+++ /dev/null
@@ -1,43 +0,0 @@
-treebuilders Package
-====================
-
-:mod:`treebuilders` Package
----------------------------
-
-.. automodule:: html5lib.treebuilders
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`_base` Module
--------------------
-
-.. automodule:: html5lib.treebuilders._base
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`dom` Module
------------------
-
-.. automodule:: html5lib.treebuilders.dom
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`etree` Module
--------------------
-
-.. automodule:: html5lib.treebuilders.etree
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`etree_lxml` Module
-------------------------
-
-.. automodule:: html5lib.treebuilders.etree_lxml
- :members:
- :undoc-members:
- :show-inheritance:
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treewalkers.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treewalkers.rst
deleted file mode 100644
index 80595e2d7d0..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/html5lib.treewalkers.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-treewalkers Package
-===================
-
-:mod:`treewalkers` Package
---------------------------
-
-.. automodule:: html5lib.treewalkers
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`_base` Module
--------------------
-
-.. automodule:: html5lib.treewalkers._base
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`dom` Module
------------------
-
-.. automodule:: html5lib.treewalkers.dom
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`etree` Module
--------------------
-
-.. automodule:: html5lib.treewalkers.etree
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`genshistream` Module
---------------------------
-
-.. automodule:: html5lib.treewalkers.genshistream
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`lxmletree` Module
------------------------
-
-.. automodule:: html5lib.treewalkers.lxmletree
- :members:
- :undoc-members:
- :show-inheritance:
-
-:mod:`pulldom` Module
----------------------
-
-.. automodule:: html5lib.treewalkers.pulldom
- :members:
- :undoc-members:
- :show-inheritance:
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/index.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/index.rst
deleted file mode 100644
index ca2e1b969cd..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/index.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-Overview
-========
-
-.. include:: ../README.rst
- :start-line: 6
-
-.. toctree::
- :maxdepth: 2
-
- movingparts
- changes
- License <license>
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/license.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/license.rst
deleted file mode 100644
index 7e6291f3b9b..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/license.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-License
-=======
-
-.. include:: ../LICENSE
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/make.bat b/chromium/third_party/catapult/third_party/html5lib-python/doc/make.bat
deleted file mode 100644
index 1df9d1811f6..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/make.bat
+++ /dev/null
@@ -1,242 +0,0 @@
-@ECHO OFF
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-set BUILDDIR=_build
-set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
-set I18NSPHINXOPTS=%SPHINXOPTS% .
-if NOT "%PAPER%" == "" (
- set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
- set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
-)
-
-if "%1" == "" goto help
-
-if "%1" == "help" (
- :help
- echo.Please use `make ^<target^>` where ^<target^> is one of
- echo. html to make standalone HTML files
- echo. dirhtml to make HTML files named index.html in directories
- echo. singlehtml to make a single large HTML file
- echo. pickle to make pickle files
- echo. json to make JSON files
- echo. htmlhelp to make HTML files and a HTML help project
- echo. qthelp to make HTML files and a qthelp project
- echo. devhelp to make HTML files and a Devhelp project
- echo. epub to make an epub
- echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
- echo. text to make text files
- echo. man to make manual pages
- echo. texinfo to make Texinfo files
- echo. gettext to make PO message catalogs
- echo. changes to make an overview over all changed/added/deprecated items
- echo. xml to make Docutils-native XML files
- echo. pseudoxml to make pseudoxml-XML files for display purposes
- echo. linkcheck to check all external links for integrity
- echo. doctest to run all doctests embedded in the documentation if enabled
- goto end
-)
-
-if "%1" == "clean" (
- for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
- del /q /s %BUILDDIR%\*
- goto end
-)
-
-
-%SPHINXBUILD% 2> nul
-if errorlevel 9009 (
- echo.
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
- echo.installed, then set the SPHINXBUILD environment variable to point
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
- echo.may add the Sphinx directory to PATH.
- echo.
- echo.If you don't have Sphinx installed, grab it from
- echo.http://sphinx-doc.org/
- exit /b 1
-)
-
-if "%1" == "html" (
- %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/html.
- goto end
-)
-
-if "%1" == "dirhtml" (
- %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
- goto end
-)
-
-if "%1" == "singlehtml" (
- %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
- goto end
-)
-
-if "%1" == "pickle" (
- %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can process the pickle files.
- goto end
-)
-
-if "%1" == "json" (
- %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can process the JSON files.
- goto end
-)
-
-if "%1" == "htmlhelp" (
- %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can run HTML Help Workshop with the ^
-.hhp project file in %BUILDDIR%/htmlhelp.
- goto end
-)
-
-if "%1" == "qthelp" (
- %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can run "qcollectiongenerator" with the ^
-.qhcp project file in %BUILDDIR%/qthelp, like this:
- echo.^> qcollectiongenerator %BUILDDIR%\qthelp\html5lib.qhcp
- echo.To view the help file:
- echo.^> assistant -collectionFile %BUILDDIR%\qthelp\html5lib.ghc
- goto end
-)
-
-if "%1" == "devhelp" (
- %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished.
- goto end
-)
-
-if "%1" == "epub" (
- %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The epub file is in %BUILDDIR%/epub.
- goto end
-)
-
-if "%1" == "latex" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "latexpdf" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- cd %BUILDDIR%/latex
- make all-pdf
- cd %BUILDDIR%/..
- echo.
- echo.Build finished; the PDF files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "latexpdfja" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- cd %BUILDDIR%/latex
- make all-pdf-ja
- cd %BUILDDIR%/..
- echo.
- echo.Build finished; the PDF files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "text" (
- %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The text files are in %BUILDDIR%/text.
- goto end
-)
-
-if "%1" == "man" (
- %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The manual pages are in %BUILDDIR%/man.
- goto end
-)
-
-if "%1" == "texinfo" (
- %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
- goto end
-)
-
-if "%1" == "gettext" (
- %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
- goto end
-)
-
-if "%1" == "changes" (
- %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
- if errorlevel 1 exit /b 1
- echo.
- echo.The overview file is in %BUILDDIR%/changes.
- goto end
-)
-
-if "%1" == "linkcheck" (
- %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
- if errorlevel 1 exit /b 1
- echo.
- echo.Link check complete; look for any errors in the above output ^
-or in %BUILDDIR%/linkcheck/output.txt.
- goto end
-)
-
-if "%1" == "doctest" (
- %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
- if errorlevel 1 exit /b 1
- echo.
- echo.Testing of doctests in the sources finished, look at the ^
-results in %BUILDDIR%/doctest/output.txt.
- goto end
-)
-
-if "%1" == "xml" (
- %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The XML files are in %BUILDDIR%/xml.
- goto end
-)
-
-if "%1" == "pseudoxml" (
- %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
- goto end
-)
-
-:end
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/modules.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/modules.rst
deleted file mode 100644
index 59fbcc86bc1..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/modules.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-html5lib
-========
-
-.. toctree::
- :maxdepth: 4
-
- html5lib
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/doc/movingparts.rst b/chromium/third_party/catapult/third_party/html5lib-python/doc/movingparts.rst
deleted file mode 100644
index 36539785a7e..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/doc/movingparts.rst
+++ /dev/null
@@ -1,209 +0,0 @@
-The moving parts
-================
-
-html5lib consists of a number of components, which are responsible for
-handling its features.
-
-
-Tree builders
--------------
-
-The parser reads HTML by tokenizing the content and building a tree that
-the user can later access. There are three main types of trees that
-html5lib can build:
-
-* ``etree`` - this is the default; builds a tree based on ``xml.etree``,
- which can be found in the standard library. Whenever possible, the
- accelerated ``ElementTree`` implementation (i.e.
- ``xml.etree.cElementTree`` on Python 2.x) is used.
-
-* ``dom`` - builds a tree based on ``xml.dom.minidom``.
-
-* ``lxml.etree`` - uses lxml's implementation of the ``ElementTree``
- API. The performance gains are relatively small compared to using the
- accelerated ``ElementTree`` module.
-
-You can specify the builder by name when using the shorthand API:
-
-.. code-block:: python
-
- import html5lib
- with open("mydocument.html", "rb") as f:
- lxml_etree_document = html5lib.parse(f, treebuilder="lxml")
-
-When instantiating a parser object, you have to pass a tree builder
-class in the ``tree`` keyword attribute:
-
-.. code-block:: python
-
- import html5lib
- parser = html5lib.HTMLParser(tree=SomeTreeBuilder)
- document = parser.parse("<p>Hello World!")
-
-To get a builder class by name, use the ``getTreeBuilder`` function:
-
-.. code-block:: python
-
- import html5lib
- parser = html5lib.HTMLParser(tree=html5lib.getTreeBuilder("dom"))
- minidom_document = parser.parse("<p>Hello World!")
-
-The implementation of builders can be found in `html5lib/treebuilders/
-<https://github.com/html5lib/html5lib-python/tree/master/html5lib/treebuilders>`_.
-
-
-Tree walkers
-------------
-
-Once a tree is ready, you can work on it either manually, or using
-a tree walker, which provides a streaming view of the tree. html5lib
-provides walkers for all three supported types of trees (``etree``,
-``dom`` and ``lxml``).
-
-The implementation of walkers can be found in `html5lib/treewalkers/
-<https://github.com/html5lib/html5lib-python/tree/master/html5lib/treewalkers>`_.
-
-Walkers make consuming HTML easier. html5lib uses them to provide you
-with has a couple of handy tools.
-
-
-HTMLSerializer
-~~~~~~~~~~~~~~
-
-The serializer lets you write HTML back as a stream of bytes.
-
-.. code-block:: pycon
-
- >>> import html5lib
- >>> element = html5lib.parse('<p xml:lang="pl">Witam wszystkich')
- >>> walker = html5lib.getTreeWalker("etree")
- >>> stream = walker(element)
- >>> s = html5lib.serializer.HTMLSerializer()
- >>> output = s.serialize(stream)
- >>> for item in output:
- ... print("%r" % item)
- '<p'
- ' '
- 'xml:lang'
- '='
- 'pl'
- '>'
- 'Witam wszystkich'
-
-You can customize the serializer behaviour in a variety of ways, consult
-the :class:`~html5lib.serializer.htmlserializer.HTMLSerializer`
-documentation.
-
-
-Filters
-~~~~~~~
-
-You can alter the stream content with filters provided by html5lib:
-
-* :class:`alphabeticalattributes.Filter
- <html5lib.filters.alphabeticalattributes.Filter>` sorts attributes on
- tags to be in alphabetical order
-
-* :class:`inject_meta_charset.Filter
- <html5lib.filters.inject_meta_charset.Filter>` sets a user-specified
- encoding in the correct ``<meta>`` tag in the ``<head>`` section of
- the document
-
-* :class:`lint.Filter <html5lib.filters.lint.Filter>` raises
- ``LintError`` exceptions on invalid tag and attribute names, invalid
- PCDATA, etc.
-
-* :class:`optionaltags.Filter <html5lib.filters.optionaltags.Filter>`
- removes tags from the stream which are not necessary to produce valid
- HTML
-
-* :class:`sanitizer.Filter <html5lib.filters.sanitizer.Filter>` removes
- unsafe markup and CSS. Elements that are known to be safe are passed
- through and the rest is converted to visible text. The default
- configuration of the sanitizer follows the `WHATWG Sanitization Rules
- <http://wiki.whatwg.org/wiki/Sanitization_rules>`_.
-
-* :class:`whitespace.Filter <html5lib.filters.whitespace.Filter>`
- collapses all whitespace characters to single spaces unless they're in
- ``<pre/>`` or ``textarea`` tags.
-
-To use a filter, simply wrap it around a stream:
-
-.. code-block:: python
-
- >>> import html5lib
- >>> from html5lib.filters import sanitizer
- >>> dom = html5lib.parse("<p><script>alert('Boo!')", treebuilder="dom")
- >>> walker = html5lib.getTreeWalker("dom")
- >>> stream = walker(dom)
- >>> sane_stream = sanitizer.Filter(stream) clean_stream = sanitizer.Filter(stream)
-
-
-Tree adapters
--------------
-
-Used to translate one type of tree to another. More documentation
-pending, sorry.
-
-
-Encoding discovery
-------------------
-
-Parsed trees are always Unicode. However a large variety of input
-encodings are supported. The encoding of the document is determined in
-the following way:
-
-* The encoding may be explicitly specified by passing the name of the
- encoding as the encoding parameter to the
- :meth:`~html5lib.html5parser.HTMLParser.parse` method on
- ``HTMLParser`` objects.
-
-* If no encoding is specified, the parser will attempt to detect the
- encoding from a ``<meta>`` element in the first 512 bytes of the
- document (this is only a partial implementation of the current HTML
- 5 specification).
-
-* If no encoding can be found and the chardet library is available, an
- attempt will be made to sniff the encoding from the byte pattern.
-
-* If all else fails, the default encoding will be used. This is usually
- `Windows-1252 <http://en.wikipedia.org/wiki/Windows-1252>`_, which is
- a common fallback used by Web browsers.
-
-
-Tokenizers
-----------
-
-The part of the parser responsible for translating a raw input stream
-into meaningful tokens is the tokenizer. Currently html5lib provides
-two.
-
-To set up a tokenizer, simply pass it when instantiating
-a :class:`~html5lib.html5parser.HTMLParser`:
-
-.. code-block:: python
-
- import html5lib
- from html5lib import sanitizer
-
- p = html5lib.HTMLParser(tokenizer=sanitizer.HTMLSanitizer)
- p.parse("<p>Surprise!<script>alert('Boo!');</script>")
-
-HTMLTokenizer
-~~~~~~~~~~~~~
-
-This is the default tokenizer, the heart of html5lib. The implementation
-can be found in `html5lib/tokenizer.py
-<https://github.com/html5lib/html5lib-python/blob/master/html5lib/tokenizer.py>`_.
-
-HTMLSanitizer
-~~~~~~~~~~~~~
-
-This is a tokenizer that removes unsafe markup and CSS styles from the
-input. Elements that are known to be safe are passed through and the
-rest is converted to visible text. The default configuration of the
-sanitizer follows the `WHATWG Sanitization Rules
-<http://wiki.whatwg.org/wiki/Sanitization_rules>`_.
-
-The implementation can be found in `html5lib/sanitizer.py
-<https://github.com/html5lib/html5lib-python/blob/master/html5lib/sanitizer.py>`_.
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/flake8-run.sh b/chromium/third_party/catapult/third_party/html5lib-python/flake8-run.sh
deleted file mode 100755
index d1a587d3506..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/flake8-run.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash -e
-
-if [[ ! -x $(which flake8) ]]; then
- echo "fatal: flake8 not found on $PATH. Exiting."
- exit 1
-fi
-
-if [[ $TRAVIS != "true" || $FLAKE == "true" ]]; then
- find html5lib/ -name '*.py' -and -not -name 'constants.py' -print0 | xargs -0 flake8 --ignore=E501
- flake1=$?
- flake8 --max-line-length=99 --ignore=E126 html5lib/constants.py
- flake2=$?
- exit $[$flake1 || $flake2]
-fi
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/__init__.py
deleted file mode 100644
index 3765c676149..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-HTML parsing library based on the WHATWG "HTML5"
-specification. The parser is designed to be compatible with existing
-HTML found in the wild and implements well-defined error recovery that
-is largely compatible with modern desktop web browsers.
-
-Example usage:
-
-import html5lib
-f = open("my_document.html")
-tree = html5lib.parse(f)
-"""
-
-from __future__ import absolute_import, division, unicode_literals
-
-from .html5parser import HTMLParser, parse, parseFragment
-from .treebuilders import getTreeBuilder
-from .treewalkers import getTreeWalker
-from .serializer import serialize
-
-__all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
- "getTreeWalker", "serialize"]
-
-# this has to be at the top level, see how setup.py parses this
-__version__ = "0.9999999-dev"
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/constants.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/constants.py
deleted file mode 100644
index d938e0ae666..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/constants.py
+++ /dev/null
@@ -1,3102 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-import string
-
-EOF = None
-
-E = {
- "null-character":
- "Null character in input stream, replaced with U+FFFD.",
- "invalid-codepoint":
- "Invalid codepoint in stream.",
- "incorrectly-placed-solidus":
- "Solidus (/) incorrectly placed in tag.",
- "incorrect-cr-newline-entity":
- "Incorrect CR newline entity, replaced with LF.",
- "illegal-windows-1252-entity":
- "Entity used with illegal number (windows-1252 reference).",
- "cant-convert-numeric-entity":
- "Numeric entity couldn't be converted to character "
- "(codepoint U+%(charAsInt)08x).",
- "illegal-codepoint-for-numeric-entity":
- "Numeric entity represents an illegal codepoint: "
- "U+%(charAsInt)08x.",
- "numeric-entity-without-semicolon":
- "Numeric entity didn't end with ';'.",
- "expected-numeric-entity-but-got-eof":
- "Numeric entity expected. Got end of file instead.",
- "expected-numeric-entity":
- "Numeric entity expected but none found.",
- "named-entity-without-semicolon":
- "Named entity didn't end with ';'.",
- "expected-named-entity":
- "Named entity expected. Got none.",
- "attributes-in-end-tag":
- "End tag contains unexpected attributes.",
- 'self-closing-flag-on-end-tag':
- "End tag contains unexpected self-closing flag.",
- "expected-tag-name-but-got-right-bracket":
- "Expected tag name. Got '>' instead.",
- "expected-tag-name-but-got-question-mark":
- "Expected tag name. Got '?' instead. (HTML doesn't "
- "support processing instructions.)",
- "expected-tag-name":
- "Expected tag name. Got something else instead",
- "expected-closing-tag-but-got-right-bracket":
- "Expected closing tag. Got '>' instead. Ignoring '</>'.",
- "expected-closing-tag-but-got-eof":
- "Expected closing tag. Unexpected end of file.",
- "expected-closing-tag-but-got-char":
- "Expected closing tag. Unexpected character '%(data)s' found.",
- "eof-in-tag-name":
- "Unexpected end of file in the tag name.",
- "expected-attribute-name-but-got-eof":
- "Unexpected end of file. Expected attribute name instead.",
- "eof-in-attribute-name":
- "Unexpected end of file in attribute name.",
- "invalid-character-in-attribute-name":
- "Invalid character in attribute name",
- "duplicate-attribute":
- "Dropped duplicate attribute on tag.",
- "expected-end-of-tag-name-but-got-eof":
- "Unexpected end of file. Expected = or end of tag.",
- "expected-attribute-value-but-got-eof":
- "Unexpected end of file. Expected attribute value.",
- "expected-attribute-value-but-got-right-bracket":
- "Expected attribute value. Got '>' instead.",
- 'equals-in-unquoted-attribute-value':
- "Unexpected = in unquoted attribute",
- 'unexpected-character-in-unquoted-attribute-value':
- "Unexpected character in unquoted attribute",
- "invalid-character-after-attribute-name":
- "Unexpected character after attribute name.",
- "unexpected-character-after-attribute-value":
- "Unexpected character after attribute value.",
- "eof-in-attribute-value-double-quote":
- "Unexpected end of file in attribute value (\").",
- "eof-in-attribute-value-single-quote":
- "Unexpected end of file in attribute value (').",
- "eof-in-attribute-value-no-quotes":
- "Unexpected end of file in attribute value.",
- "unexpected-EOF-after-solidus-in-tag":
- "Unexpected end of file in tag. Expected >",
- "unexpected-character-after-solidus-in-tag":
- "Unexpected character after / in tag. Expected >",
- "expected-dashes-or-doctype":
- "Expected '--' or 'DOCTYPE'. Not found.",
- "unexpected-bang-after-double-dash-in-comment":
- "Unexpected ! after -- in comment",
- "unexpected-space-after-double-dash-in-comment":
- "Unexpected space after -- in comment",
- "incorrect-comment":
- "Incorrect comment.",
- "eof-in-comment":
- "Unexpected end of file in comment.",
- "eof-in-comment-end-dash":
- "Unexpected end of file in comment (-)",
- "unexpected-dash-after-double-dash-in-comment":
- "Unexpected '-' after '--' found in comment.",
- "eof-in-comment-double-dash":
- "Unexpected end of file in comment (--).",
- "eof-in-comment-end-space-state":
- "Unexpected end of file in comment.",
- "eof-in-comment-end-bang-state":
- "Unexpected end of file in comment.",
- "unexpected-char-in-comment":
- "Unexpected character in comment found.",
- "need-space-after-doctype":
- "No space after literal string 'DOCTYPE'.",
- "expected-doctype-name-but-got-right-bracket":
- "Unexpected > character. Expected DOCTYPE name.",
- "expected-doctype-name-but-got-eof":
- "Unexpected end of file. Expected DOCTYPE name.",
- "eof-in-doctype-name":
- "Unexpected end of file in DOCTYPE name.",
- "eof-in-doctype":
- "Unexpected end of file in DOCTYPE.",
- "expected-space-or-right-bracket-in-doctype":
- "Expected space or '>'. Got '%(data)s'",
- "unexpected-end-of-doctype":
- "Unexpected end of DOCTYPE.",
- "unexpected-char-in-doctype":
- "Unexpected character in DOCTYPE.",
- "eof-in-innerhtml":
- "XXX innerHTML EOF",
- "unexpected-doctype":
- "Unexpected DOCTYPE. Ignored.",
- "non-html-root":
- "html needs to be the first start tag.",
- "expected-doctype-but-got-eof":
- "Unexpected End of file. Expected DOCTYPE.",
- "unknown-doctype":
- "Erroneous DOCTYPE.",
- "expected-doctype-but-got-chars":
- "Unexpected non-space characters. Expected DOCTYPE.",
- "expected-doctype-but-got-start-tag":
- "Unexpected start tag (%(name)s). Expected DOCTYPE.",
- "expected-doctype-but-got-end-tag":
- "Unexpected end tag (%(name)s). Expected DOCTYPE.",
- "end-tag-after-implied-root":
- "Unexpected end tag (%(name)s) after the (implied) root element.",
- "expected-named-closing-tag-but-got-eof":
- "Unexpected end of file. Expected end tag (%(name)s).",
- "two-heads-are-not-better-than-one":
- "Unexpected start tag head in existing head. Ignored.",
- "unexpected-end-tag":
- "Unexpected end tag (%(name)s). Ignored.",
- "unexpected-start-tag-out-of-my-head":
- "Unexpected start tag (%(name)s) that can be in head. Moved.",
- "unexpected-start-tag":
- "Unexpected start tag (%(name)s).",
- "missing-end-tag":
- "Missing end tag (%(name)s).",
- "missing-end-tags":
- "Missing end tags (%(name)s).",
- "unexpected-start-tag-implies-end-tag":
- "Unexpected start tag (%(startName)s) "
- "implies end tag (%(endName)s).",
- "unexpected-start-tag-treated-as":
- "Unexpected start tag (%(originalName)s). Treated as %(newName)s.",
- "deprecated-tag":
- "Unexpected start tag %(name)s. Don't use it!",
- "unexpected-start-tag-ignored":
- "Unexpected start tag %(name)s. Ignored.",
- "expected-one-end-tag-but-got-another":
- "Unexpected end tag (%(gotName)s). "
- "Missing end tag (%(expectedName)s).",
- "end-tag-too-early":
- "End tag (%(name)s) seen too early. Expected other end tag.",
- "end-tag-too-early-named":
- "Unexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s).",
- "end-tag-too-early-ignored":
- "End tag (%(name)s) seen too early. Ignored.",
- "adoption-agency-1.1":
- "End tag (%(name)s) violates step 1, "
- "paragraph 1 of the adoption agency algorithm.",
- "adoption-agency-1.2":
- "End tag (%(name)s) violates step 1, "
- "paragraph 2 of the adoption agency algorithm.",
- "adoption-agency-1.3":
- "End tag (%(name)s) violates step 1, "
- "paragraph 3 of the adoption agency algorithm.",
- "adoption-agency-4.4":
- "End tag (%(name)s) violates step 4, "
- "paragraph 4 of the adoption agency algorithm.",
- "unexpected-end-tag-treated-as":
- "Unexpected end tag (%(originalName)s). Treated as %(newName)s.",
- "no-end-tag":
- "This element (%(name)s) has no end tag.",
- "unexpected-implied-end-tag-in-table":
- "Unexpected implied end tag (%(name)s) in the table phase.",
- "unexpected-implied-end-tag-in-table-body":
- "Unexpected implied end tag (%(name)s) in the table body phase.",
- "unexpected-char-implies-table-voodoo":
- "Unexpected non-space characters in "
- "table context caused voodoo mode.",
- "unexpected-hidden-input-in-table":
- "Unexpected input with type hidden in table context.",
- "unexpected-form-in-table":
- "Unexpected form in table context.",
- "unexpected-start-tag-implies-table-voodoo":
- "Unexpected start tag (%(name)s) in "
- "table context caused voodoo mode.",
- "unexpected-end-tag-implies-table-voodoo":
- "Unexpected end tag (%(name)s) in "
- "table context caused voodoo mode.",
- "unexpected-cell-in-table-body":
- "Unexpected table cell start tag (%(name)s) "
- "in the table body phase.",
- "unexpected-cell-end-tag":
- "Got table cell end tag (%(name)s) "
- "while required end tags are missing.",
- "unexpected-end-tag-in-table-body":
- "Unexpected end tag (%(name)s) in the table body phase. Ignored.",
- "unexpected-implied-end-tag-in-table-row":
- "Unexpected implied end tag (%(name)s) in the table row phase.",
- "unexpected-end-tag-in-table-row":
- "Unexpected end tag (%(name)s) in the table row phase. Ignored.",
- "unexpected-select-in-select":
- "Unexpected select start tag in the select phase "
- "treated as select end tag.",
- "unexpected-input-in-select":
- "Unexpected input start tag in the select phase.",
- "unexpected-start-tag-in-select":
- "Unexpected start tag token (%(name)s in the select phase. "
- "Ignored.",
- "unexpected-end-tag-in-select":
- "Unexpected end tag (%(name)s) in the select phase. Ignored.",
- "unexpected-table-element-start-tag-in-select-in-table":
- "Unexpected table element start tag (%(name)s) in the select in table phase.",
- "unexpected-table-element-end-tag-in-select-in-table":
- "Unexpected table element end tag (%(name)s) in the select in table phase.",
- "unexpected-char-after-body":
- "Unexpected non-space characters in the after body phase.",
- "unexpected-start-tag-after-body":
- "Unexpected start tag token (%(name)s)"
- " in the after body phase.",
- "unexpected-end-tag-after-body":
- "Unexpected end tag token (%(name)s)"
- " in the after body phase.",
- "unexpected-char-in-frameset":
- "Unexpected characters in the frameset phase. Characters ignored.",
- "unexpected-start-tag-in-frameset":
- "Unexpected start tag token (%(name)s)"
- " in the frameset phase. Ignored.",
- "unexpected-frameset-in-frameset-innerhtml":
- "Unexpected end tag token (frameset) "
- "in the frameset phase (innerHTML).",
- "unexpected-end-tag-in-frameset":
- "Unexpected end tag token (%(name)s)"
- " in the frameset phase. Ignored.",
- "unexpected-char-after-frameset":
- "Unexpected non-space characters in the "
- "after frameset phase. Ignored.",
- "unexpected-start-tag-after-frameset":
- "Unexpected start tag (%(name)s)"
- " in the after frameset phase. Ignored.",
- "unexpected-end-tag-after-frameset":
- "Unexpected end tag (%(name)s)"
- " in the after frameset phase. Ignored.",
- "unexpected-end-tag-after-body-innerhtml":
- "Unexpected end tag after body(innerHtml)",
- "expected-eof-but-got-char":
- "Unexpected non-space characters. Expected end of file.",
- "expected-eof-but-got-start-tag":
- "Unexpected start tag (%(name)s)"
- ". Expected end of file.",
- "expected-eof-but-got-end-tag":
- "Unexpected end tag (%(name)s)"
- ". Expected end of file.",
- "eof-in-table":
- "Unexpected end of file. Expected table content.",
- "eof-in-select":
- "Unexpected end of file. Expected select content.",
- "eof-in-frameset":
- "Unexpected end of file. Expected frameset content.",
- "eof-in-script-in-script":
- "Unexpected end of file. Expected script content.",
- "eof-in-foreign-lands":
- "Unexpected end of file. Expected foreign content",
- "non-void-element-with-trailing-solidus":
- "Trailing solidus not allowed on element %(name)s",
- "unexpected-html-element-in-foreign-content":
- "Element %(name)s not allowed in a non-html context",
- "unexpected-end-tag-before-html":
- "Unexpected end tag (%(name)s) before html.",
- "XXX-undefined-error":
- "Undefined error (this sucks and should be fixed)",
-}
-
-namespaces = {
- "html": "http://www.w3.org/1999/xhtml",
- "mathml": "http://www.w3.org/1998/Math/MathML",
- "svg": "http://www.w3.org/2000/svg",
- "xlink": "http://www.w3.org/1999/xlink",
- "xml": "http://www.w3.org/XML/1998/namespace",
- "xmlns": "http://www.w3.org/2000/xmlns/"
-}
-
-scopingElements = frozenset([
- (namespaces["html"], "applet"),
- (namespaces["html"], "caption"),
- (namespaces["html"], "html"),
- (namespaces["html"], "marquee"),
- (namespaces["html"], "object"),
- (namespaces["html"], "table"),
- (namespaces["html"], "td"),
- (namespaces["html"], "th"),
- (namespaces["mathml"], "mi"),
- (namespaces["mathml"], "mo"),
- (namespaces["mathml"], "mn"),
- (namespaces["mathml"], "ms"),
- (namespaces["mathml"], "mtext"),
- (namespaces["mathml"], "annotation-xml"),
- (namespaces["svg"], "foreignObject"),
- (namespaces["svg"], "desc"),
- (namespaces["svg"], "title"),
-])
-
-formattingElements = frozenset([
- (namespaces["html"], "a"),
- (namespaces["html"], "b"),
- (namespaces["html"], "big"),
- (namespaces["html"], "code"),
- (namespaces["html"], "em"),
- (namespaces["html"], "font"),
- (namespaces["html"], "i"),
- (namespaces["html"], "nobr"),
- (namespaces["html"], "s"),
- (namespaces["html"], "small"),
- (namespaces["html"], "strike"),
- (namespaces["html"], "strong"),
- (namespaces["html"], "tt"),
- (namespaces["html"], "u")
-])
-
-specialElements = frozenset([
- (namespaces["html"], "address"),
- (namespaces["html"], "applet"),
- (namespaces["html"], "area"),
- (namespaces["html"], "article"),
- (namespaces["html"], "aside"),
- (namespaces["html"], "base"),
- (namespaces["html"], "basefont"),
- (namespaces["html"], "bgsound"),
- (namespaces["html"], "blockquote"),
- (namespaces["html"], "body"),
- (namespaces["html"], "br"),
- (namespaces["html"], "button"),
- (namespaces["html"], "caption"),
- (namespaces["html"], "center"),
- (namespaces["html"], "col"),
- (namespaces["html"], "colgroup"),
- (namespaces["html"], "command"),
- (namespaces["html"], "dd"),
- (namespaces["html"], "details"),
- (namespaces["html"], "dir"),
- (namespaces["html"], "div"),
- (namespaces["html"], "dl"),
- (namespaces["html"], "dt"),
- (namespaces["html"], "embed"),
- (namespaces["html"], "fieldset"),
- (namespaces["html"], "figure"),
- (namespaces["html"], "footer"),
- (namespaces["html"], "form"),
- (namespaces["html"], "frame"),
- (namespaces["html"], "frameset"),
- (namespaces["html"], "h1"),
- (namespaces["html"], "h2"),
- (namespaces["html"], "h3"),
- (namespaces["html"], "h4"),
- (namespaces["html"], "h5"),
- (namespaces["html"], "h6"),
- (namespaces["html"], "head"),
- (namespaces["html"], "header"),
- (namespaces["html"], "hr"),
- (namespaces["html"], "html"),
- (namespaces["html"], "iframe"),
- # Note that image is commented out in the spec as "this isn't an
- # element that can end up on the stack, so it doesn't matter,"
- (namespaces["html"], "image"),
- (namespaces["html"], "img"),
- (namespaces["html"], "input"),
- (namespaces["html"], "isindex"),
- (namespaces["html"], "li"),
- (namespaces["html"], "link"),
- (namespaces["html"], "listing"),
- (namespaces["html"], "marquee"),
- (namespaces["html"], "menu"),
- (namespaces["html"], "meta"),
- (namespaces["html"], "nav"),
- (namespaces["html"], "noembed"),
- (namespaces["html"], "noframes"),
- (namespaces["html"], "noscript"),
- (namespaces["html"], "object"),
- (namespaces["html"], "ol"),
- (namespaces["html"], "p"),
- (namespaces["html"], "param"),
- (namespaces["html"], "plaintext"),
- (namespaces["html"], "pre"),
- (namespaces["html"], "script"),
- (namespaces["html"], "section"),
- (namespaces["html"], "select"),
- (namespaces["html"], "style"),
- (namespaces["html"], "table"),
- (namespaces["html"], "tbody"),
- (namespaces["html"], "td"),
- (namespaces["html"], "textarea"),
- (namespaces["html"], "tfoot"),
- (namespaces["html"], "th"),
- (namespaces["html"], "thead"),
- (namespaces["html"], "title"),
- (namespaces["html"], "tr"),
- (namespaces["html"], "ul"),
- (namespaces["html"], "wbr"),
- (namespaces["html"], "xmp"),
- (namespaces["svg"], "foreignObject")
-])
-
-htmlIntegrationPointElements = frozenset([
- (namespaces["mathml"], "annotaion-xml"),
- (namespaces["svg"], "foreignObject"),
- (namespaces["svg"], "desc"),
- (namespaces["svg"], "title")
-])
-
-mathmlTextIntegrationPointElements = frozenset([
- (namespaces["mathml"], "mi"),
- (namespaces["mathml"], "mo"),
- (namespaces["mathml"], "mn"),
- (namespaces["mathml"], "ms"),
- (namespaces["mathml"], "mtext")
-])
-
-adjustForeignAttributes = {
- "xlink:actuate": ("xlink", "actuate", namespaces["xlink"]),
- "xlink:arcrole": ("xlink", "arcrole", namespaces["xlink"]),
- "xlink:href": ("xlink", "href", namespaces["xlink"]),
- "xlink:role": ("xlink", "role", namespaces["xlink"]),
- "xlink:show": ("xlink", "show", namespaces["xlink"]),
- "xlink:title": ("xlink", "title", namespaces["xlink"]),
- "xlink:type": ("xlink", "type", namespaces["xlink"]),
- "xml:base": ("xml", "base", namespaces["xml"]),
- "xml:lang": ("xml", "lang", namespaces["xml"]),
- "xml:space": ("xml", "space", namespaces["xml"]),
- "xmlns": (None, "xmlns", namespaces["xmlns"]),
- "xmlns:xlink": ("xmlns", "xlink", namespaces["xmlns"])
-}
-
-unadjustForeignAttributes = dict([((ns, local), qname) for qname, (prefix, local, ns) in
- adjustForeignAttributes.items()])
-
-spaceCharacters = frozenset([
- "\t",
- "\n",
- "\u000C",
- " ",
- "\r"
-])
-
-tableInsertModeElements = frozenset([
- "table",
- "tbody",
- "tfoot",
- "thead",
- "tr"
-])
-
-asciiLowercase = frozenset(string.ascii_lowercase)
-asciiUppercase = frozenset(string.ascii_uppercase)
-asciiLetters = frozenset(string.ascii_letters)
-digits = frozenset(string.digits)
-hexDigits = frozenset(string.hexdigits)
-
-asciiUpper2Lower = dict([(ord(c), ord(c.lower()))
- for c in string.ascii_uppercase])
-
-# Heading elements need to be ordered
-headingElements = (
- "h1",
- "h2",
- "h3",
- "h4",
- "h5",
- "h6"
-)
-
-voidElements = frozenset([
- "base",
- "command",
- "event-source",
- "link",
- "meta",
- "hr",
- "br",
- "img",
- "embed",
- "param",
- "area",
- "col",
- "input",
- "source",
- "track"
-])
-
-cdataElements = frozenset(['title', 'textarea'])
-
-rcdataElements = frozenset([
- 'style',
- 'script',
- 'xmp',
- 'iframe',
- 'noembed',
- 'noframes',
- 'noscript'
-])
-
-booleanAttributes = {
- "": frozenset(["irrelevant"]),
- "style": frozenset(["scoped"]),
- "img": frozenset(["ismap"]),
- "audio": frozenset(["autoplay", "controls"]),
- "video": frozenset(["autoplay", "controls"]),
- "script": frozenset(["defer", "async"]),
- "details": frozenset(["open"]),
- "datagrid": frozenset(["multiple", "disabled"]),
- "command": frozenset(["hidden", "disabled", "checked", "default"]),
- "hr": frozenset(["noshade"]),
- "menu": frozenset(["autosubmit"]),
- "fieldset": frozenset(["disabled", "readonly"]),
- "option": frozenset(["disabled", "readonly", "selected"]),
- "optgroup": frozenset(["disabled", "readonly"]),
- "button": frozenset(["disabled", "autofocus"]),
- "input": frozenset(["disabled", "readonly", "required", "autofocus", "checked", "ismap"]),
- "select": frozenset(["disabled", "readonly", "autofocus", "multiple"]),
- "output": frozenset(["disabled", "readonly"]),
-}
-
-# entitiesWindows1252 has to be _ordered_ and needs to have an index. It
-# therefore can't be a frozenset.
-entitiesWindows1252 = (
- 8364, # 0x80 0x20AC EURO SIGN
- 65533, # 0x81 UNDEFINED
- 8218, # 0x82 0x201A SINGLE LOW-9 QUOTATION MARK
- 402, # 0x83 0x0192 LATIN SMALL LETTER F WITH HOOK
- 8222, # 0x84 0x201E DOUBLE LOW-9 QUOTATION MARK
- 8230, # 0x85 0x2026 HORIZONTAL ELLIPSIS
- 8224, # 0x86 0x2020 DAGGER
- 8225, # 0x87 0x2021 DOUBLE DAGGER
- 710, # 0x88 0x02C6 MODIFIER LETTER CIRCUMFLEX ACCENT
- 8240, # 0x89 0x2030 PER MILLE SIGN
- 352, # 0x8A 0x0160 LATIN CAPITAL LETTER S WITH CARON
- 8249, # 0x8B 0x2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK
- 338, # 0x8C 0x0152 LATIN CAPITAL LIGATURE OE
- 65533, # 0x8D UNDEFINED
- 381, # 0x8E 0x017D LATIN CAPITAL LETTER Z WITH CARON
- 65533, # 0x8F UNDEFINED
- 65533, # 0x90 UNDEFINED
- 8216, # 0x91 0x2018 LEFT SINGLE QUOTATION MARK
- 8217, # 0x92 0x2019 RIGHT SINGLE QUOTATION MARK
- 8220, # 0x93 0x201C LEFT DOUBLE QUOTATION MARK
- 8221, # 0x94 0x201D RIGHT DOUBLE QUOTATION MARK
- 8226, # 0x95 0x2022 BULLET
- 8211, # 0x96 0x2013 EN DASH
- 8212, # 0x97 0x2014 EM DASH
- 732, # 0x98 0x02DC SMALL TILDE
- 8482, # 0x99 0x2122 TRADE MARK SIGN
- 353, # 0x9A 0x0161 LATIN SMALL LETTER S WITH CARON
- 8250, # 0x9B 0x203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- 339, # 0x9C 0x0153 LATIN SMALL LIGATURE OE
- 65533, # 0x9D UNDEFINED
- 382, # 0x9E 0x017E LATIN SMALL LETTER Z WITH CARON
- 376 # 0x9F 0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS
-)
-
-xmlEntities = frozenset(['lt;', 'gt;', 'amp;', 'apos;', 'quot;'])
-
-entities = {
- "AElig": "\xc6",
- "AElig;": "\xc6",
- "AMP": "&",
- "AMP;": "&",
- "Aacute": "\xc1",
- "Aacute;": "\xc1",
- "Abreve;": "\u0102",
- "Acirc": "\xc2",
- "Acirc;": "\xc2",
- "Acy;": "\u0410",
- "Afr;": "\U0001d504",
- "Agrave": "\xc0",
- "Agrave;": "\xc0",
- "Alpha;": "\u0391",
- "Amacr;": "\u0100",
- "And;": "\u2a53",
- "Aogon;": "\u0104",
- "Aopf;": "\U0001d538",
- "ApplyFunction;": "\u2061",
- "Aring": "\xc5",
- "Aring;": "\xc5",
- "Ascr;": "\U0001d49c",
- "Assign;": "\u2254",
- "Atilde": "\xc3",
- "Atilde;": "\xc3",
- "Auml": "\xc4",
- "Auml;": "\xc4",
- "Backslash;": "\u2216",
- "Barv;": "\u2ae7",
- "Barwed;": "\u2306",
- "Bcy;": "\u0411",
- "Because;": "\u2235",
- "Bernoullis;": "\u212c",
- "Beta;": "\u0392",
- "Bfr;": "\U0001d505",
- "Bopf;": "\U0001d539",
- "Breve;": "\u02d8",
- "Bscr;": "\u212c",
- "Bumpeq;": "\u224e",
- "CHcy;": "\u0427",
- "COPY": "\xa9",
- "COPY;": "\xa9",
- "Cacute;": "\u0106",
- "Cap;": "\u22d2",
- "CapitalDifferentialD;": "\u2145",
- "Cayleys;": "\u212d",
- "Ccaron;": "\u010c",
- "Ccedil": "\xc7",
- "Ccedil;": "\xc7",
- "Ccirc;": "\u0108",
- "Cconint;": "\u2230",
- "Cdot;": "\u010a",
- "Cedilla;": "\xb8",
- "CenterDot;": "\xb7",
- "Cfr;": "\u212d",
- "Chi;": "\u03a7",
- "CircleDot;": "\u2299",
- "CircleMinus;": "\u2296",
- "CirclePlus;": "\u2295",
- "CircleTimes;": "\u2297",
- "ClockwiseContourIntegral;": "\u2232",
- "CloseCurlyDoubleQuote;": "\u201d",
- "CloseCurlyQuote;": "\u2019",
- "Colon;": "\u2237",
- "Colone;": "\u2a74",
- "Congruent;": "\u2261",
- "Conint;": "\u222f",
- "ContourIntegral;": "\u222e",
- "Copf;": "\u2102",
- "Coproduct;": "\u2210",
- "CounterClockwiseContourIntegral;": "\u2233",
- "Cross;": "\u2a2f",
- "Cscr;": "\U0001d49e",
- "Cup;": "\u22d3",
- "CupCap;": "\u224d",
- "DD;": "\u2145",
- "DDotrahd;": "\u2911",
- "DJcy;": "\u0402",
- "DScy;": "\u0405",
- "DZcy;": "\u040f",
- "Dagger;": "\u2021",
- "Darr;": "\u21a1",
- "Dashv;": "\u2ae4",
- "Dcaron;": "\u010e",
- "Dcy;": "\u0414",
- "Del;": "\u2207",
- "Delta;": "\u0394",
- "Dfr;": "\U0001d507",
- "DiacriticalAcute;": "\xb4",
- "DiacriticalDot;": "\u02d9",
- "DiacriticalDoubleAcute;": "\u02dd",
- "DiacriticalGrave;": "`",
- "DiacriticalTilde;": "\u02dc",
- "Diamond;": "\u22c4",
- "DifferentialD;": "\u2146",
- "Dopf;": "\U0001d53b",
- "Dot;": "\xa8",
- "DotDot;": "\u20dc",
- "DotEqual;": "\u2250",
- "DoubleContourIntegral;": "\u222f",
- "DoubleDot;": "\xa8",
- "DoubleDownArrow;": "\u21d3",
- "DoubleLeftArrow;": "\u21d0",
- "DoubleLeftRightArrow;": "\u21d4",
- "DoubleLeftTee;": "\u2ae4",
- "DoubleLongLeftArrow;": "\u27f8",
- "DoubleLongLeftRightArrow;": "\u27fa",
- "DoubleLongRightArrow;": "\u27f9",
- "DoubleRightArrow;": "\u21d2",
- "DoubleRightTee;": "\u22a8",
- "DoubleUpArrow;": "\u21d1",
- "DoubleUpDownArrow;": "\u21d5",
- "DoubleVerticalBar;": "\u2225",
- "DownArrow;": "\u2193",
- "DownArrowBar;": "\u2913",
- "DownArrowUpArrow;": "\u21f5",
- "DownBreve;": "\u0311",
- "DownLeftRightVector;": "\u2950",
- "DownLeftTeeVector;": "\u295e",
- "DownLeftVector;": "\u21bd",
- "DownLeftVectorBar;": "\u2956",
- "DownRightTeeVector;": "\u295f",
- "DownRightVector;": "\u21c1",
- "DownRightVectorBar;": "\u2957",
- "DownTee;": "\u22a4",
- "DownTeeArrow;": "\u21a7",
- "Downarrow;": "\u21d3",
- "Dscr;": "\U0001d49f",
- "Dstrok;": "\u0110",
- "ENG;": "\u014a",
- "ETH": "\xd0",
- "ETH;": "\xd0",
- "Eacute": "\xc9",
- "Eacute;": "\xc9",
- "Ecaron;": "\u011a",
- "Ecirc": "\xca",
- "Ecirc;": "\xca",
- "Ecy;": "\u042d",
- "Edot;": "\u0116",
- "Efr;": "\U0001d508",
- "Egrave": "\xc8",
- "Egrave;": "\xc8",
- "Element;": "\u2208",
- "Emacr;": "\u0112",
- "EmptySmallSquare;": "\u25fb",
- "EmptyVerySmallSquare;": "\u25ab",
- "Eogon;": "\u0118",
- "Eopf;": "\U0001d53c",
- "Epsilon;": "\u0395",
- "Equal;": "\u2a75",
- "EqualTilde;": "\u2242",
- "Equilibrium;": "\u21cc",
- "Escr;": "\u2130",
- "Esim;": "\u2a73",
- "Eta;": "\u0397",
- "Euml": "\xcb",
- "Euml;": "\xcb",
- "Exists;": "\u2203",
- "ExponentialE;": "\u2147",
- "Fcy;": "\u0424",
- "Ffr;": "\U0001d509",
- "FilledSmallSquare;": "\u25fc",
- "FilledVerySmallSquare;": "\u25aa",
- "Fopf;": "\U0001d53d",
- "ForAll;": "\u2200",
- "Fouriertrf;": "\u2131",
- "Fscr;": "\u2131",
- "GJcy;": "\u0403",
- "GT": ">",
- "GT;": ">",
- "Gamma;": "\u0393",
- "Gammad;": "\u03dc",
- "Gbreve;": "\u011e",
- "Gcedil;": "\u0122",
- "Gcirc;": "\u011c",
- "Gcy;": "\u0413",
- "Gdot;": "\u0120",
- "Gfr;": "\U0001d50a",
- "Gg;": "\u22d9",
- "Gopf;": "\U0001d53e",
- "GreaterEqual;": "\u2265",
- "GreaterEqualLess;": "\u22db",
- "GreaterFullEqual;": "\u2267",
- "GreaterGreater;": "\u2aa2",
- "GreaterLess;": "\u2277",
- "GreaterSlantEqual;": "\u2a7e",
- "GreaterTilde;": "\u2273",
- "Gscr;": "\U0001d4a2",
- "Gt;": "\u226b",
- "HARDcy;": "\u042a",
- "Hacek;": "\u02c7",
- "Hat;": "^",
- "Hcirc;": "\u0124",
- "Hfr;": "\u210c",
- "HilbertSpace;": "\u210b",
- "Hopf;": "\u210d",
- "HorizontalLine;": "\u2500",
- "Hscr;": "\u210b",
- "Hstrok;": "\u0126",
- "HumpDownHump;": "\u224e",
- "HumpEqual;": "\u224f",
- "IEcy;": "\u0415",
- "IJlig;": "\u0132",
- "IOcy;": "\u0401",
- "Iacute": "\xcd",
- "Iacute;": "\xcd",
- "Icirc": "\xce",
- "Icirc;": "\xce",
- "Icy;": "\u0418",
- "Idot;": "\u0130",
- "Ifr;": "\u2111",
- "Igrave": "\xcc",
- "Igrave;": "\xcc",
- "Im;": "\u2111",
- "Imacr;": "\u012a",
- "ImaginaryI;": "\u2148",
- "Implies;": "\u21d2",
- "Int;": "\u222c",
- "Integral;": "\u222b",
- "Intersection;": "\u22c2",
- "InvisibleComma;": "\u2063",
- "InvisibleTimes;": "\u2062",
- "Iogon;": "\u012e",
- "Iopf;": "\U0001d540",
- "Iota;": "\u0399",
- "Iscr;": "\u2110",
- "Itilde;": "\u0128",
- "Iukcy;": "\u0406",
- "Iuml": "\xcf",
- "Iuml;": "\xcf",
- "Jcirc;": "\u0134",
- "Jcy;": "\u0419",
- "Jfr;": "\U0001d50d",
- "Jopf;": "\U0001d541",
- "Jscr;": "\U0001d4a5",
- "Jsercy;": "\u0408",
- "Jukcy;": "\u0404",
- "KHcy;": "\u0425",
- "KJcy;": "\u040c",
- "Kappa;": "\u039a",
- "Kcedil;": "\u0136",
- "Kcy;": "\u041a",
- "Kfr;": "\U0001d50e",
- "Kopf;": "\U0001d542",
- "Kscr;": "\U0001d4a6",
- "LJcy;": "\u0409",
- "LT": "<",
- "LT;": "<",
- "Lacute;": "\u0139",
- "Lambda;": "\u039b",
- "Lang;": "\u27ea",
- "Laplacetrf;": "\u2112",
- "Larr;": "\u219e",
- "Lcaron;": "\u013d",
- "Lcedil;": "\u013b",
- "Lcy;": "\u041b",
- "LeftAngleBracket;": "\u27e8",
- "LeftArrow;": "\u2190",
- "LeftArrowBar;": "\u21e4",
- "LeftArrowRightArrow;": "\u21c6",
- "LeftCeiling;": "\u2308",
- "LeftDoubleBracket;": "\u27e6",
- "LeftDownTeeVector;": "\u2961",
- "LeftDownVector;": "\u21c3",
- "LeftDownVectorBar;": "\u2959",
- "LeftFloor;": "\u230a",
- "LeftRightArrow;": "\u2194",
- "LeftRightVector;": "\u294e",
- "LeftTee;": "\u22a3",
- "LeftTeeArrow;": "\u21a4",
- "LeftTeeVector;": "\u295a",
- "LeftTriangle;": "\u22b2",
- "LeftTriangleBar;": "\u29cf",
- "LeftTriangleEqual;": "\u22b4",
- "LeftUpDownVector;": "\u2951",
- "LeftUpTeeVector;": "\u2960",
- "LeftUpVector;": "\u21bf",
- "LeftUpVectorBar;": "\u2958",
- "LeftVector;": "\u21bc",
- "LeftVectorBar;": "\u2952",
- "Leftarrow;": "\u21d0",
- "Leftrightarrow;": "\u21d4",
- "LessEqualGreater;": "\u22da",
- "LessFullEqual;": "\u2266",
- "LessGreater;": "\u2276",
- "LessLess;": "\u2aa1",
- "LessSlantEqual;": "\u2a7d",
- "LessTilde;": "\u2272",
- "Lfr;": "\U0001d50f",
- "Ll;": "\u22d8",
- "Lleftarrow;": "\u21da",
- "Lmidot;": "\u013f",
- "LongLeftArrow;": "\u27f5",
- "LongLeftRightArrow;": "\u27f7",
- "LongRightArrow;": "\u27f6",
- "Longleftarrow;": "\u27f8",
- "Longleftrightarrow;": "\u27fa",
- "Longrightarrow;": "\u27f9",
- "Lopf;": "\U0001d543",
- "LowerLeftArrow;": "\u2199",
- "LowerRightArrow;": "\u2198",
- "Lscr;": "\u2112",
- "Lsh;": "\u21b0",
- "Lstrok;": "\u0141",
- "Lt;": "\u226a",
- "Map;": "\u2905",
- "Mcy;": "\u041c",
- "MediumSpace;": "\u205f",
- "Mellintrf;": "\u2133",
- "Mfr;": "\U0001d510",
- "MinusPlus;": "\u2213",
- "Mopf;": "\U0001d544",
- "Mscr;": "\u2133",
- "Mu;": "\u039c",
- "NJcy;": "\u040a",
- "Nacute;": "\u0143",
- "Ncaron;": "\u0147",
- "Ncedil;": "\u0145",
- "Ncy;": "\u041d",
- "NegativeMediumSpace;": "\u200b",
- "NegativeThickSpace;": "\u200b",
- "NegativeThinSpace;": "\u200b",
- "NegativeVeryThinSpace;": "\u200b",
- "NestedGreaterGreater;": "\u226b",
- "NestedLessLess;": "\u226a",
- "NewLine;": "\n",
- "Nfr;": "\U0001d511",
- "NoBreak;": "\u2060",
- "NonBreakingSpace;": "\xa0",
- "Nopf;": "\u2115",
- "Not;": "\u2aec",
- "NotCongruent;": "\u2262",
- "NotCupCap;": "\u226d",
- "NotDoubleVerticalBar;": "\u2226",
- "NotElement;": "\u2209",
- "NotEqual;": "\u2260",
- "NotEqualTilde;": "\u2242\u0338",
- "NotExists;": "\u2204",
- "NotGreater;": "\u226f",
- "NotGreaterEqual;": "\u2271",
- "NotGreaterFullEqual;": "\u2267\u0338",
- "NotGreaterGreater;": "\u226b\u0338",
- "NotGreaterLess;": "\u2279",
- "NotGreaterSlantEqual;": "\u2a7e\u0338",
- "NotGreaterTilde;": "\u2275",
- "NotHumpDownHump;": "\u224e\u0338",
- "NotHumpEqual;": "\u224f\u0338",
- "NotLeftTriangle;": "\u22ea",
- "NotLeftTriangleBar;": "\u29cf\u0338",
- "NotLeftTriangleEqual;": "\u22ec",
- "NotLess;": "\u226e",
- "NotLessEqual;": "\u2270",
- "NotLessGreater;": "\u2278",
- "NotLessLess;": "\u226a\u0338",
- "NotLessSlantEqual;": "\u2a7d\u0338",
- "NotLessTilde;": "\u2274",
- "NotNestedGreaterGreater;": "\u2aa2\u0338",
- "NotNestedLessLess;": "\u2aa1\u0338",
- "NotPrecedes;": "\u2280",
- "NotPrecedesEqual;": "\u2aaf\u0338",
- "NotPrecedesSlantEqual;": "\u22e0",
- "NotReverseElement;": "\u220c",
- "NotRightTriangle;": "\u22eb",
- "NotRightTriangleBar;": "\u29d0\u0338",
- "NotRightTriangleEqual;": "\u22ed",
- "NotSquareSubset;": "\u228f\u0338",
- "NotSquareSubsetEqual;": "\u22e2",
- "NotSquareSuperset;": "\u2290\u0338",
- "NotSquareSupersetEqual;": "\u22e3",
- "NotSubset;": "\u2282\u20d2",
- "NotSubsetEqual;": "\u2288",
- "NotSucceeds;": "\u2281",
- "NotSucceedsEqual;": "\u2ab0\u0338",
- "NotSucceedsSlantEqual;": "\u22e1",
- "NotSucceedsTilde;": "\u227f\u0338",
- "NotSuperset;": "\u2283\u20d2",
- "NotSupersetEqual;": "\u2289",
- "NotTilde;": "\u2241",
- "NotTildeEqual;": "\u2244",
- "NotTildeFullEqual;": "\u2247",
- "NotTildeTilde;": "\u2249",
- "NotVerticalBar;": "\u2224",
- "Nscr;": "\U0001d4a9",
- "Ntilde": "\xd1",
- "Ntilde;": "\xd1",
- "Nu;": "\u039d",
- "OElig;": "\u0152",
- "Oacute": "\xd3",
- "Oacute;": "\xd3",
- "Ocirc": "\xd4",
- "Ocirc;": "\xd4",
- "Ocy;": "\u041e",
- "Odblac;": "\u0150",
- "Ofr;": "\U0001d512",
- "Ograve": "\xd2",
- "Ograve;": "\xd2",
- "Omacr;": "\u014c",
- "Omega;": "\u03a9",
- "Omicron;": "\u039f",
- "Oopf;": "\U0001d546",
- "OpenCurlyDoubleQuote;": "\u201c",
- "OpenCurlyQuote;": "\u2018",
- "Or;": "\u2a54",
- "Oscr;": "\U0001d4aa",
- "Oslash": "\xd8",
- "Oslash;": "\xd8",
- "Otilde": "\xd5",
- "Otilde;": "\xd5",
- "Otimes;": "\u2a37",
- "Ouml": "\xd6",
- "Ouml;": "\xd6",
- "OverBar;": "\u203e",
- "OverBrace;": "\u23de",
- "OverBracket;": "\u23b4",
- "OverParenthesis;": "\u23dc",
- "PartialD;": "\u2202",
- "Pcy;": "\u041f",
- "Pfr;": "\U0001d513",
- "Phi;": "\u03a6",
- "Pi;": "\u03a0",
- "PlusMinus;": "\xb1",
- "Poincareplane;": "\u210c",
- "Popf;": "\u2119",
- "Pr;": "\u2abb",
- "Precedes;": "\u227a",
- "PrecedesEqual;": "\u2aaf",
- "PrecedesSlantEqual;": "\u227c",
- "PrecedesTilde;": "\u227e",
- "Prime;": "\u2033",
- "Product;": "\u220f",
- "Proportion;": "\u2237",
- "Proportional;": "\u221d",
- "Pscr;": "\U0001d4ab",
- "Psi;": "\u03a8",
- "QUOT": "\"",
- "QUOT;": "\"",
- "Qfr;": "\U0001d514",
- "Qopf;": "\u211a",
- "Qscr;": "\U0001d4ac",
- "RBarr;": "\u2910",
- "REG": "\xae",
- "REG;": "\xae",
- "Racute;": "\u0154",
- "Rang;": "\u27eb",
- "Rarr;": "\u21a0",
- "Rarrtl;": "\u2916",
- "Rcaron;": "\u0158",
- "Rcedil;": "\u0156",
- "Rcy;": "\u0420",
- "Re;": "\u211c",
- "ReverseElement;": "\u220b",
- "ReverseEquilibrium;": "\u21cb",
- "ReverseUpEquilibrium;": "\u296f",
- "Rfr;": "\u211c",
- "Rho;": "\u03a1",
- "RightAngleBracket;": "\u27e9",
- "RightArrow;": "\u2192",
- "RightArrowBar;": "\u21e5",
- "RightArrowLeftArrow;": "\u21c4",
- "RightCeiling;": "\u2309",
- "RightDoubleBracket;": "\u27e7",
- "RightDownTeeVector;": "\u295d",
- "RightDownVector;": "\u21c2",
- "RightDownVectorBar;": "\u2955",
- "RightFloor;": "\u230b",
- "RightTee;": "\u22a2",
- "RightTeeArrow;": "\u21a6",
- "RightTeeVector;": "\u295b",
- "RightTriangle;": "\u22b3",
- "RightTriangleBar;": "\u29d0",
- "RightTriangleEqual;": "\u22b5",
- "RightUpDownVector;": "\u294f",
- "RightUpTeeVector;": "\u295c",
- "RightUpVector;": "\u21be",
- "RightUpVectorBar;": "\u2954",
- "RightVector;": "\u21c0",
- "RightVectorBar;": "\u2953",
- "Rightarrow;": "\u21d2",
- "Ropf;": "\u211d",
- "RoundImplies;": "\u2970",
- "Rrightarrow;": "\u21db",
- "Rscr;": "\u211b",
- "Rsh;": "\u21b1",
- "RuleDelayed;": "\u29f4",
- "SHCHcy;": "\u0429",
- "SHcy;": "\u0428",
- "SOFTcy;": "\u042c",
- "Sacute;": "\u015a",
- "Sc;": "\u2abc",
- "Scaron;": "\u0160",
- "Scedil;": "\u015e",
- "Scirc;": "\u015c",
- "Scy;": "\u0421",
- "Sfr;": "\U0001d516",
- "ShortDownArrow;": "\u2193",
- "ShortLeftArrow;": "\u2190",
- "ShortRightArrow;": "\u2192",
- "ShortUpArrow;": "\u2191",
- "Sigma;": "\u03a3",
- "SmallCircle;": "\u2218",
- "Sopf;": "\U0001d54a",
- "Sqrt;": "\u221a",
- "Square;": "\u25a1",
- "SquareIntersection;": "\u2293",
- "SquareSubset;": "\u228f",
- "SquareSubsetEqual;": "\u2291",
- "SquareSuperset;": "\u2290",
- "SquareSupersetEqual;": "\u2292",
- "SquareUnion;": "\u2294",
- "Sscr;": "\U0001d4ae",
- "Star;": "\u22c6",
- "Sub;": "\u22d0",
- "Subset;": "\u22d0",
- "SubsetEqual;": "\u2286",
- "Succeeds;": "\u227b",
- "SucceedsEqual;": "\u2ab0",
- "SucceedsSlantEqual;": "\u227d",
- "SucceedsTilde;": "\u227f",
- "SuchThat;": "\u220b",
- "Sum;": "\u2211",
- "Sup;": "\u22d1",
- "Superset;": "\u2283",
- "SupersetEqual;": "\u2287",
- "Supset;": "\u22d1",
- "THORN": "\xde",
- "THORN;": "\xde",
- "TRADE;": "\u2122",
- "TSHcy;": "\u040b",
- "TScy;": "\u0426",
- "Tab;": "\t",
- "Tau;": "\u03a4",
- "Tcaron;": "\u0164",
- "Tcedil;": "\u0162",
- "Tcy;": "\u0422",
- "Tfr;": "\U0001d517",
- "Therefore;": "\u2234",
- "Theta;": "\u0398",
- "ThickSpace;": "\u205f\u200a",
- "ThinSpace;": "\u2009",
- "Tilde;": "\u223c",
- "TildeEqual;": "\u2243",
- "TildeFullEqual;": "\u2245",
- "TildeTilde;": "\u2248",
- "Topf;": "\U0001d54b",
- "TripleDot;": "\u20db",
- "Tscr;": "\U0001d4af",
- "Tstrok;": "\u0166",
- "Uacute": "\xda",
- "Uacute;": "\xda",
- "Uarr;": "\u219f",
- "Uarrocir;": "\u2949",
- "Ubrcy;": "\u040e",
- "Ubreve;": "\u016c",
- "Ucirc": "\xdb",
- "Ucirc;": "\xdb",
- "Ucy;": "\u0423",
- "Udblac;": "\u0170",
- "Ufr;": "\U0001d518",
- "Ugrave": "\xd9",
- "Ugrave;": "\xd9",
- "Umacr;": "\u016a",
- "UnderBar;": "_",
- "UnderBrace;": "\u23df",
- "UnderBracket;": "\u23b5",
- "UnderParenthesis;": "\u23dd",
- "Union;": "\u22c3",
- "UnionPlus;": "\u228e",
- "Uogon;": "\u0172",
- "Uopf;": "\U0001d54c",
- "UpArrow;": "\u2191",
- "UpArrowBar;": "\u2912",
- "UpArrowDownArrow;": "\u21c5",
- "UpDownArrow;": "\u2195",
- "UpEquilibrium;": "\u296e",
- "UpTee;": "\u22a5",
- "UpTeeArrow;": "\u21a5",
- "Uparrow;": "\u21d1",
- "Updownarrow;": "\u21d5",
- "UpperLeftArrow;": "\u2196",
- "UpperRightArrow;": "\u2197",
- "Upsi;": "\u03d2",
- "Upsilon;": "\u03a5",
- "Uring;": "\u016e",
- "Uscr;": "\U0001d4b0",
- "Utilde;": "\u0168",
- "Uuml": "\xdc",
- "Uuml;": "\xdc",
- "VDash;": "\u22ab",
- "Vbar;": "\u2aeb",
- "Vcy;": "\u0412",
- "Vdash;": "\u22a9",
- "Vdashl;": "\u2ae6",
- "Vee;": "\u22c1",
- "Verbar;": "\u2016",
- "Vert;": "\u2016",
- "VerticalBar;": "\u2223",
- "VerticalLine;": "|",
- "VerticalSeparator;": "\u2758",
- "VerticalTilde;": "\u2240",
- "VeryThinSpace;": "\u200a",
- "Vfr;": "\U0001d519",
- "Vopf;": "\U0001d54d",
- "Vscr;": "\U0001d4b1",
- "Vvdash;": "\u22aa",
- "Wcirc;": "\u0174",
- "Wedge;": "\u22c0",
- "Wfr;": "\U0001d51a",
- "Wopf;": "\U0001d54e",
- "Wscr;": "\U0001d4b2",
- "Xfr;": "\U0001d51b",
- "Xi;": "\u039e",
- "Xopf;": "\U0001d54f",
- "Xscr;": "\U0001d4b3",
- "YAcy;": "\u042f",
- "YIcy;": "\u0407",
- "YUcy;": "\u042e",
- "Yacute": "\xdd",
- "Yacute;": "\xdd",
- "Ycirc;": "\u0176",
- "Ycy;": "\u042b",
- "Yfr;": "\U0001d51c",
- "Yopf;": "\U0001d550",
- "Yscr;": "\U0001d4b4",
- "Yuml;": "\u0178",
- "ZHcy;": "\u0416",
- "Zacute;": "\u0179",
- "Zcaron;": "\u017d",
- "Zcy;": "\u0417",
- "Zdot;": "\u017b",
- "ZeroWidthSpace;": "\u200b",
- "Zeta;": "\u0396",
- "Zfr;": "\u2128",
- "Zopf;": "\u2124",
- "Zscr;": "\U0001d4b5",
- "aacute": "\xe1",
- "aacute;": "\xe1",
- "abreve;": "\u0103",
- "ac;": "\u223e",
- "acE;": "\u223e\u0333",
- "acd;": "\u223f",
- "acirc": "\xe2",
- "acirc;": "\xe2",
- "acute": "\xb4",
- "acute;": "\xb4",
- "acy;": "\u0430",
- "aelig": "\xe6",
- "aelig;": "\xe6",
- "af;": "\u2061",
- "afr;": "\U0001d51e",
- "agrave": "\xe0",
- "agrave;": "\xe0",
- "alefsym;": "\u2135",
- "aleph;": "\u2135",
- "alpha;": "\u03b1",
- "amacr;": "\u0101",
- "amalg;": "\u2a3f",
- "amp": "&",
- "amp;": "&",
- "and;": "\u2227",
- "andand;": "\u2a55",
- "andd;": "\u2a5c",
- "andslope;": "\u2a58",
- "andv;": "\u2a5a",
- "ang;": "\u2220",
- "ange;": "\u29a4",
- "angle;": "\u2220",
- "angmsd;": "\u2221",
- "angmsdaa;": "\u29a8",
- "angmsdab;": "\u29a9",
- "angmsdac;": "\u29aa",
- "angmsdad;": "\u29ab",
- "angmsdae;": "\u29ac",
- "angmsdaf;": "\u29ad",
- "angmsdag;": "\u29ae",
- "angmsdah;": "\u29af",
- "angrt;": "\u221f",
- "angrtvb;": "\u22be",
- "angrtvbd;": "\u299d",
- "angsph;": "\u2222",
- "angst;": "\xc5",
- "angzarr;": "\u237c",
- "aogon;": "\u0105",
- "aopf;": "\U0001d552",
- "ap;": "\u2248",
- "apE;": "\u2a70",
- "apacir;": "\u2a6f",
- "ape;": "\u224a",
- "apid;": "\u224b",
- "apos;": "'",
- "approx;": "\u2248",
- "approxeq;": "\u224a",
- "aring": "\xe5",
- "aring;": "\xe5",
- "ascr;": "\U0001d4b6",
- "ast;": "*",
- "asymp;": "\u2248",
- "asympeq;": "\u224d",
- "atilde": "\xe3",
- "atilde;": "\xe3",
- "auml": "\xe4",
- "auml;": "\xe4",
- "awconint;": "\u2233",
- "awint;": "\u2a11",
- "bNot;": "\u2aed",
- "backcong;": "\u224c",
- "backepsilon;": "\u03f6",
- "backprime;": "\u2035",
- "backsim;": "\u223d",
- "backsimeq;": "\u22cd",
- "barvee;": "\u22bd",
- "barwed;": "\u2305",
- "barwedge;": "\u2305",
- "bbrk;": "\u23b5",
- "bbrktbrk;": "\u23b6",
- "bcong;": "\u224c",
- "bcy;": "\u0431",
- "bdquo;": "\u201e",
- "becaus;": "\u2235",
- "because;": "\u2235",
- "bemptyv;": "\u29b0",
- "bepsi;": "\u03f6",
- "bernou;": "\u212c",
- "beta;": "\u03b2",
- "beth;": "\u2136",
- "between;": "\u226c",
- "bfr;": "\U0001d51f",
- "bigcap;": "\u22c2",
- "bigcirc;": "\u25ef",
- "bigcup;": "\u22c3",
- "bigodot;": "\u2a00",
- "bigoplus;": "\u2a01",
- "bigotimes;": "\u2a02",
- "bigsqcup;": "\u2a06",
- "bigstar;": "\u2605",
- "bigtriangledown;": "\u25bd",
- "bigtriangleup;": "\u25b3",
- "biguplus;": "\u2a04",
- "bigvee;": "\u22c1",
- "bigwedge;": "\u22c0",
- "bkarow;": "\u290d",
- "blacklozenge;": "\u29eb",
- "blacksquare;": "\u25aa",
- "blacktriangle;": "\u25b4",
- "blacktriangledown;": "\u25be",
- "blacktriangleleft;": "\u25c2",
- "blacktriangleright;": "\u25b8",
- "blank;": "\u2423",
- "blk12;": "\u2592",
- "blk14;": "\u2591",
- "blk34;": "\u2593",
- "block;": "\u2588",
- "bne;": "=\u20e5",
- "bnequiv;": "\u2261\u20e5",
- "bnot;": "\u2310",
- "bopf;": "\U0001d553",
- "bot;": "\u22a5",
- "bottom;": "\u22a5",
- "bowtie;": "\u22c8",
- "boxDL;": "\u2557",
- "boxDR;": "\u2554",
- "boxDl;": "\u2556",
- "boxDr;": "\u2553",
- "boxH;": "\u2550",
- "boxHD;": "\u2566",
- "boxHU;": "\u2569",
- "boxHd;": "\u2564",
- "boxHu;": "\u2567",
- "boxUL;": "\u255d",
- "boxUR;": "\u255a",
- "boxUl;": "\u255c",
- "boxUr;": "\u2559",
- "boxV;": "\u2551",
- "boxVH;": "\u256c",
- "boxVL;": "\u2563",
- "boxVR;": "\u2560",
- "boxVh;": "\u256b",
- "boxVl;": "\u2562",
- "boxVr;": "\u255f",
- "boxbox;": "\u29c9",
- "boxdL;": "\u2555",
- "boxdR;": "\u2552",
- "boxdl;": "\u2510",
- "boxdr;": "\u250c",
- "boxh;": "\u2500",
- "boxhD;": "\u2565",
- "boxhU;": "\u2568",
- "boxhd;": "\u252c",
- "boxhu;": "\u2534",
- "boxminus;": "\u229f",
- "boxplus;": "\u229e",
- "boxtimes;": "\u22a0",
- "boxuL;": "\u255b",
- "boxuR;": "\u2558",
- "boxul;": "\u2518",
- "boxur;": "\u2514",
- "boxv;": "\u2502",
- "boxvH;": "\u256a",
- "boxvL;": "\u2561",
- "boxvR;": "\u255e",
- "boxvh;": "\u253c",
- "boxvl;": "\u2524",
- "boxvr;": "\u251c",
- "bprime;": "\u2035",
- "breve;": "\u02d8",
- "brvbar": "\xa6",
- "brvbar;": "\xa6",
- "bscr;": "\U0001d4b7",
- "bsemi;": "\u204f",
- "bsim;": "\u223d",
- "bsime;": "\u22cd",
- "bsol;": "\\",
- "bsolb;": "\u29c5",
- "bsolhsub;": "\u27c8",
- "bull;": "\u2022",
- "bullet;": "\u2022",
- "bump;": "\u224e",
- "bumpE;": "\u2aae",
- "bumpe;": "\u224f",
- "bumpeq;": "\u224f",
- "cacute;": "\u0107",
- "cap;": "\u2229",
- "capand;": "\u2a44",
- "capbrcup;": "\u2a49",
- "capcap;": "\u2a4b",
- "capcup;": "\u2a47",
- "capdot;": "\u2a40",
- "caps;": "\u2229\ufe00",
- "caret;": "\u2041",
- "caron;": "\u02c7",
- "ccaps;": "\u2a4d",
- "ccaron;": "\u010d",
- "ccedil": "\xe7",
- "ccedil;": "\xe7",
- "ccirc;": "\u0109",
- "ccups;": "\u2a4c",
- "ccupssm;": "\u2a50",
- "cdot;": "\u010b",
- "cedil": "\xb8",
- "cedil;": "\xb8",
- "cemptyv;": "\u29b2",
- "cent": "\xa2",
- "cent;": "\xa2",
- "centerdot;": "\xb7",
- "cfr;": "\U0001d520",
- "chcy;": "\u0447",
- "check;": "\u2713",
- "checkmark;": "\u2713",
- "chi;": "\u03c7",
- "cir;": "\u25cb",
- "cirE;": "\u29c3",
- "circ;": "\u02c6",
- "circeq;": "\u2257",
- "circlearrowleft;": "\u21ba",
- "circlearrowright;": "\u21bb",
- "circledR;": "\xae",
- "circledS;": "\u24c8",
- "circledast;": "\u229b",
- "circledcirc;": "\u229a",
- "circleddash;": "\u229d",
- "cire;": "\u2257",
- "cirfnint;": "\u2a10",
- "cirmid;": "\u2aef",
- "cirscir;": "\u29c2",
- "clubs;": "\u2663",
- "clubsuit;": "\u2663",
- "colon;": ":",
- "colone;": "\u2254",
- "coloneq;": "\u2254",
- "comma;": ",",
- "commat;": "@",
- "comp;": "\u2201",
- "compfn;": "\u2218",
- "complement;": "\u2201",
- "complexes;": "\u2102",
- "cong;": "\u2245",
- "congdot;": "\u2a6d",
- "conint;": "\u222e",
- "copf;": "\U0001d554",
- "coprod;": "\u2210",
- "copy": "\xa9",
- "copy;": "\xa9",
- "copysr;": "\u2117",
- "crarr;": "\u21b5",
- "cross;": "\u2717",
- "cscr;": "\U0001d4b8",
- "csub;": "\u2acf",
- "csube;": "\u2ad1",
- "csup;": "\u2ad0",
- "csupe;": "\u2ad2",
- "ctdot;": "\u22ef",
- "cudarrl;": "\u2938",
- "cudarrr;": "\u2935",
- "cuepr;": "\u22de",
- "cuesc;": "\u22df",
- "cularr;": "\u21b6",
- "cularrp;": "\u293d",
- "cup;": "\u222a",
- "cupbrcap;": "\u2a48",
- "cupcap;": "\u2a46",
- "cupcup;": "\u2a4a",
- "cupdot;": "\u228d",
- "cupor;": "\u2a45",
- "cups;": "\u222a\ufe00",
- "curarr;": "\u21b7",
- "curarrm;": "\u293c",
- "curlyeqprec;": "\u22de",
- "curlyeqsucc;": "\u22df",
- "curlyvee;": "\u22ce",
- "curlywedge;": "\u22cf",
- "curren": "\xa4",
- "curren;": "\xa4",
- "curvearrowleft;": "\u21b6",
- "curvearrowright;": "\u21b7",
- "cuvee;": "\u22ce",
- "cuwed;": "\u22cf",
- "cwconint;": "\u2232",
- "cwint;": "\u2231",
- "cylcty;": "\u232d",
- "dArr;": "\u21d3",
- "dHar;": "\u2965",
- "dagger;": "\u2020",
- "daleth;": "\u2138",
- "darr;": "\u2193",
- "dash;": "\u2010",
- "dashv;": "\u22a3",
- "dbkarow;": "\u290f",
- "dblac;": "\u02dd",
- "dcaron;": "\u010f",
- "dcy;": "\u0434",
- "dd;": "\u2146",
- "ddagger;": "\u2021",
- "ddarr;": "\u21ca",
- "ddotseq;": "\u2a77",
- "deg": "\xb0",
- "deg;": "\xb0",
- "delta;": "\u03b4",
- "demptyv;": "\u29b1",
- "dfisht;": "\u297f",
- "dfr;": "\U0001d521",
- "dharl;": "\u21c3",
- "dharr;": "\u21c2",
- "diam;": "\u22c4",
- "diamond;": "\u22c4",
- "diamondsuit;": "\u2666",
- "diams;": "\u2666",
- "die;": "\xa8",
- "digamma;": "\u03dd",
- "disin;": "\u22f2",
- "div;": "\xf7",
- "divide": "\xf7",
- "divide;": "\xf7",
- "divideontimes;": "\u22c7",
- "divonx;": "\u22c7",
- "djcy;": "\u0452",
- "dlcorn;": "\u231e",
- "dlcrop;": "\u230d",
- "dollar;": "$",
- "dopf;": "\U0001d555",
- "dot;": "\u02d9",
- "doteq;": "\u2250",
- "doteqdot;": "\u2251",
- "dotminus;": "\u2238",
- "dotplus;": "\u2214",
- "dotsquare;": "\u22a1",
- "doublebarwedge;": "\u2306",
- "downarrow;": "\u2193",
- "downdownarrows;": "\u21ca",
- "downharpoonleft;": "\u21c3",
- "downharpoonright;": "\u21c2",
- "drbkarow;": "\u2910",
- "drcorn;": "\u231f",
- "drcrop;": "\u230c",
- "dscr;": "\U0001d4b9",
- "dscy;": "\u0455",
- "dsol;": "\u29f6",
- "dstrok;": "\u0111",
- "dtdot;": "\u22f1",
- "dtri;": "\u25bf",
- "dtrif;": "\u25be",
- "duarr;": "\u21f5",
- "duhar;": "\u296f",
- "dwangle;": "\u29a6",
- "dzcy;": "\u045f",
- "dzigrarr;": "\u27ff",
- "eDDot;": "\u2a77",
- "eDot;": "\u2251",
- "eacute": "\xe9",
- "eacute;": "\xe9",
- "easter;": "\u2a6e",
- "ecaron;": "\u011b",
- "ecir;": "\u2256",
- "ecirc": "\xea",
- "ecirc;": "\xea",
- "ecolon;": "\u2255",
- "ecy;": "\u044d",
- "edot;": "\u0117",
- "ee;": "\u2147",
- "efDot;": "\u2252",
- "efr;": "\U0001d522",
- "eg;": "\u2a9a",
- "egrave": "\xe8",
- "egrave;": "\xe8",
- "egs;": "\u2a96",
- "egsdot;": "\u2a98",
- "el;": "\u2a99",
- "elinters;": "\u23e7",
- "ell;": "\u2113",
- "els;": "\u2a95",
- "elsdot;": "\u2a97",
- "emacr;": "\u0113",
- "empty;": "\u2205",
- "emptyset;": "\u2205",
- "emptyv;": "\u2205",
- "emsp13;": "\u2004",
- "emsp14;": "\u2005",
- "emsp;": "\u2003",
- "eng;": "\u014b",
- "ensp;": "\u2002",
- "eogon;": "\u0119",
- "eopf;": "\U0001d556",
- "epar;": "\u22d5",
- "eparsl;": "\u29e3",
- "eplus;": "\u2a71",
- "epsi;": "\u03b5",
- "epsilon;": "\u03b5",
- "epsiv;": "\u03f5",
- "eqcirc;": "\u2256",
- "eqcolon;": "\u2255",
- "eqsim;": "\u2242",
- "eqslantgtr;": "\u2a96",
- "eqslantless;": "\u2a95",
- "equals;": "=",
- "equest;": "\u225f",
- "equiv;": "\u2261",
- "equivDD;": "\u2a78",
- "eqvparsl;": "\u29e5",
- "erDot;": "\u2253",
- "erarr;": "\u2971",
- "escr;": "\u212f",
- "esdot;": "\u2250",
- "esim;": "\u2242",
- "eta;": "\u03b7",
- "eth": "\xf0",
- "eth;": "\xf0",
- "euml": "\xeb",
- "euml;": "\xeb",
- "euro;": "\u20ac",
- "excl;": "!",
- "exist;": "\u2203",
- "expectation;": "\u2130",
- "exponentiale;": "\u2147",
- "fallingdotseq;": "\u2252",
- "fcy;": "\u0444",
- "female;": "\u2640",
- "ffilig;": "\ufb03",
- "fflig;": "\ufb00",
- "ffllig;": "\ufb04",
- "ffr;": "\U0001d523",
- "filig;": "\ufb01",
- "fjlig;": "fj",
- "flat;": "\u266d",
- "fllig;": "\ufb02",
- "fltns;": "\u25b1",
- "fnof;": "\u0192",
- "fopf;": "\U0001d557",
- "forall;": "\u2200",
- "fork;": "\u22d4",
- "forkv;": "\u2ad9",
- "fpartint;": "\u2a0d",
- "frac12": "\xbd",
- "frac12;": "\xbd",
- "frac13;": "\u2153",
- "frac14": "\xbc",
- "frac14;": "\xbc",
- "frac15;": "\u2155",
- "frac16;": "\u2159",
- "frac18;": "\u215b",
- "frac23;": "\u2154",
- "frac25;": "\u2156",
- "frac34": "\xbe",
- "frac34;": "\xbe",
- "frac35;": "\u2157",
- "frac38;": "\u215c",
- "frac45;": "\u2158",
- "frac56;": "\u215a",
- "frac58;": "\u215d",
- "frac78;": "\u215e",
- "frasl;": "\u2044",
- "frown;": "\u2322",
- "fscr;": "\U0001d4bb",
- "gE;": "\u2267",
- "gEl;": "\u2a8c",
- "gacute;": "\u01f5",
- "gamma;": "\u03b3",
- "gammad;": "\u03dd",
- "gap;": "\u2a86",
- "gbreve;": "\u011f",
- "gcirc;": "\u011d",
- "gcy;": "\u0433",
- "gdot;": "\u0121",
- "ge;": "\u2265",
- "gel;": "\u22db",
- "geq;": "\u2265",
- "geqq;": "\u2267",
- "geqslant;": "\u2a7e",
- "ges;": "\u2a7e",
- "gescc;": "\u2aa9",
- "gesdot;": "\u2a80",
- "gesdoto;": "\u2a82",
- "gesdotol;": "\u2a84",
- "gesl;": "\u22db\ufe00",
- "gesles;": "\u2a94",
- "gfr;": "\U0001d524",
- "gg;": "\u226b",
- "ggg;": "\u22d9",
- "gimel;": "\u2137",
- "gjcy;": "\u0453",
- "gl;": "\u2277",
- "glE;": "\u2a92",
- "gla;": "\u2aa5",
- "glj;": "\u2aa4",
- "gnE;": "\u2269",
- "gnap;": "\u2a8a",
- "gnapprox;": "\u2a8a",
- "gne;": "\u2a88",
- "gneq;": "\u2a88",
- "gneqq;": "\u2269",
- "gnsim;": "\u22e7",
- "gopf;": "\U0001d558",
- "grave;": "`",
- "gscr;": "\u210a",
- "gsim;": "\u2273",
- "gsime;": "\u2a8e",
- "gsiml;": "\u2a90",
- "gt": ">",
- "gt;": ">",
- "gtcc;": "\u2aa7",
- "gtcir;": "\u2a7a",
- "gtdot;": "\u22d7",
- "gtlPar;": "\u2995",
- "gtquest;": "\u2a7c",
- "gtrapprox;": "\u2a86",
- "gtrarr;": "\u2978",
- "gtrdot;": "\u22d7",
- "gtreqless;": "\u22db",
- "gtreqqless;": "\u2a8c",
- "gtrless;": "\u2277",
- "gtrsim;": "\u2273",
- "gvertneqq;": "\u2269\ufe00",
- "gvnE;": "\u2269\ufe00",
- "hArr;": "\u21d4",
- "hairsp;": "\u200a",
- "half;": "\xbd",
- "hamilt;": "\u210b",
- "hardcy;": "\u044a",
- "harr;": "\u2194",
- "harrcir;": "\u2948",
- "harrw;": "\u21ad",
- "hbar;": "\u210f",
- "hcirc;": "\u0125",
- "hearts;": "\u2665",
- "heartsuit;": "\u2665",
- "hellip;": "\u2026",
- "hercon;": "\u22b9",
- "hfr;": "\U0001d525",
- "hksearow;": "\u2925",
- "hkswarow;": "\u2926",
- "hoarr;": "\u21ff",
- "homtht;": "\u223b",
- "hookleftarrow;": "\u21a9",
- "hookrightarrow;": "\u21aa",
- "hopf;": "\U0001d559",
- "horbar;": "\u2015",
- "hscr;": "\U0001d4bd",
- "hslash;": "\u210f",
- "hstrok;": "\u0127",
- "hybull;": "\u2043",
- "hyphen;": "\u2010",
- "iacute": "\xed",
- "iacute;": "\xed",
- "ic;": "\u2063",
- "icirc": "\xee",
- "icirc;": "\xee",
- "icy;": "\u0438",
- "iecy;": "\u0435",
- "iexcl": "\xa1",
- "iexcl;": "\xa1",
- "iff;": "\u21d4",
- "ifr;": "\U0001d526",
- "igrave": "\xec",
- "igrave;": "\xec",
- "ii;": "\u2148",
- "iiiint;": "\u2a0c",
- "iiint;": "\u222d",
- "iinfin;": "\u29dc",
- "iiota;": "\u2129",
- "ijlig;": "\u0133",
- "imacr;": "\u012b",
- "image;": "\u2111",
- "imagline;": "\u2110",
- "imagpart;": "\u2111",
- "imath;": "\u0131",
- "imof;": "\u22b7",
- "imped;": "\u01b5",
- "in;": "\u2208",
- "incare;": "\u2105",
- "infin;": "\u221e",
- "infintie;": "\u29dd",
- "inodot;": "\u0131",
- "int;": "\u222b",
- "intcal;": "\u22ba",
- "integers;": "\u2124",
- "intercal;": "\u22ba",
- "intlarhk;": "\u2a17",
- "intprod;": "\u2a3c",
- "iocy;": "\u0451",
- "iogon;": "\u012f",
- "iopf;": "\U0001d55a",
- "iota;": "\u03b9",
- "iprod;": "\u2a3c",
- "iquest": "\xbf",
- "iquest;": "\xbf",
- "iscr;": "\U0001d4be",
- "isin;": "\u2208",
- "isinE;": "\u22f9",
- "isindot;": "\u22f5",
- "isins;": "\u22f4",
- "isinsv;": "\u22f3",
- "isinv;": "\u2208",
- "it;": "\u2062",
- "itilde;": "\u0129",
- "iukcy;": "\u0456",
- "iuml": "\xef",
- "iuml;": "\xef",
- "jcirc;": "\u0135",
- "jcy;": "\u0439",
- "jfr;": "\U0001d527",
- "jmath;": "\u0237",
- "jopf;": "\U0001d55b",
- "jscr;": "\U0001d4bf",
- "jsercy;": "\u0458",
- "jukcy;": "\u0454",
- "kappa;": "\u03ba",
- "kappav;": "\u03f0",
- "kcedil;": "\u0137",
- "kcy;": "\u043a",
- "kfr;": "\U0001d528",
- "kgreen;": "\u0138",
- "khcy;": "\u0445",
- "kjcy;": "\u045c",
- "kopf;": "\U0001d55c",
- "kscr;": "\U0001d4c0",
- "lAarr;": "\u21da",
- "lArr;": "\u21d0",
- "lAtail;": "\u291b",
- "lBarr;": "\u290e",
- "lE;": "\u2266",
- "lEg;": "\u2a8b",
- "lHar;": "\u2962",
- "lacute;": "\u013a",
- "laemptyv;": "\u29b4",
- "lagran;": "\u2112",
- "lambda;": "\u03bb",
- "lang;": "\u27e8",
- "langd;": "\u2991",
- "langle;": "\u27e8",
- "lap;": "\u2a85",
- "laquo": "\xab",
- "laquo;": "\xab",
- "larr;": "\u2190",
- "larrb;": "\u21e4",
- "larrbfs;": "\u291f",
- "larrfs;": "\u291d",
- "larrhk;": "\u21a9",
- "larrlp;": "\u21ab",
- "larrpl;": "\u2939",
- "larrsim;": "\u2973",
- "larrtl;": "\u21a2",
- "lat;": "\u2aab",
- "latail;": "\u2919",
- "late;": "\u2aad",
- "lates;": "\u2aad\ufe00",
- "lbarr;": "\u290c",
- "lbbrk;": "\u2772",
- "lbrace;": "{",
- "lbrack;": "[",
- "lbrke;": "\u298b",
- "lbrksld;": "\u298f",
- "lbrkslu;": "\u298d",
- "lcaron;": "\u013e",
- "lcedil;": "\u013c",
- "lceil;": "\u2308",
- "lcub;": "{",
- "lcy;": "\u043b",
- "ldca;": "\u2936",
- "ldquo;": "\u201c",
- "ldquor;": "\u201e",
- "ldrdhar;": "\u2967",
- "ldrushar;": "\u294b",
- "ldsh;": "\u21b2",
- "le;": "\u2264",
- "leftarrow;": "\u2190",
- "leftarrowtail;": "\u21a2",
- "leftharpoondown;": "\u21bd",
- "leftharpoonup;": "\u21bc",
- "leftleftarrows;": "\u21c7",
- "leftrightarrow;": "\u2194",
- "leftrightarrows;": "\u21c6",
- "leftrightharpoons;": "\u21cb",
- "leftrightsquigarrow;": "\u21ad",
- "leftthreetimes;": "\u22cb",
- "leg;": "\u22da",
- "leq;": "\u2264",
- "leqq;": "\u2266",
- "leqslant;": "\u2a7d",
- "les;": "\u2a7d",
- "lescc;": "\u2aa8",
- "lesdot;": "\u2a7f",
- "lesdoto;": "\u2a81",
- "lesdotor;": "\u2a83",
- "lesg;": "\u22da\ufe00",
- "lesges;": "\u2a93",
- "lessapprox;": "\u2a85",
- "lessdot;": "\u22d6",
- "lesseqgtr;": "\u22da",
- "lesseqqgtr;": "\u2a8b",
- "lessgtr;": "\u2276",
- "lesssim;": "\u2272",
- "lfisht;": "\u297c",
- "lfloor;": "\u230a",
- "lfr;": "\U0001d529",
- "lg;": "\u2276",
- "lgE;": "\u2a91",
- "lhard;": "\u21bd",
- "lharu;": "\u21bc",
- "lharul;": "\u296a",
- "lhblk;": "\u2584",
- "ljcy;": "\u0459",
- "ll;": "\u226a",
- "llarr;": "\u21c7",
- "llcorner;": "\u231e",
- "llhard;": "\u296b",
- "lltri;": "\u25fa",
- "lmidot;": "\u0140",
- "lmoust;": "\u23b0",
- "lmoustache;": "\u23b0",
- "lnE;": "\u2268",
- "lnap;": "\u2a89",
- "lnapprox;": "\u2a89",
- "lne;": "\u2a87",
- "lneq;": "\u2a87",
- "lneqq;": "\u2268",
- "lnsim;": "\u22e6",
- "loang;": "\u27ec",
- "loarr;": "\u21fd",
- "lobrk;": "\u27e6",
- "longleftarrow;": "\u27f5",
- "longleftrightarrow;": "\u27f7",
- "longmapsto;": "\u27fc",
- "longrightarrow;": "\u27f6",
- "looparrowleft;": "\u21ab",
- "looparrowright;": "\u21ac",
- "lopar;": "\u2985",
- "lopf;": "\U0001d55d",
- "loplus;": "\u2a2d",
- "lotimes;": "\u2a34",
- "lowast;": "\u2217",
- "lowbar;": "_",
- "loz;": "\u25ca",
- "lozenge;": "\u25ca",
- "lozf;": "\u29eb",
- "lpar;": "(",
- "lparlt;": "\u2993",
- "lrarr;": "\u21c6",
- "lrcorner;": "\u231f",
- "lrhar;": "\u21cb",
- "lrhard;": "\u296d",
- "lrm;": "\u200e",
- "lrtri;": "\u22bf",
- "lsaquo;": "\u2039",
- "lscr;": "\U0001d4c1",
- "lsh;": "\u21b0",
- "lsim;": "\u2272",
- "lsime;": "\u2a8d",
- "lsimg;": "\u2a8f",
- "lsqb;": "[",
- "lsquo;": "\u2018",
- "lsquor;": "\u201a",
- "lstrok;": "\u0142",
- "lt": "<",
- "lt;": "<",
- "ltcc;": "\u2aa6",
- "ltcir;": "\u2a79",
- "ltdot;": "\u22d6",
- "lthree;": "\u22cb",
- "ltimes;": "\u22c9",
- "ltlarr;": "\u2976",
- "ltquest;": "\u2a7b",
- "ltrPar;": "\u2996",
- "ltri;": "\u25c3",
- "ltrie;": "\u22b4",
- "ltrif;": "\u25c2",
- "lurdshar;": "\u294a",
- "luruhar;": "\u2966",
- "lvertneqq;": "\u2268\ufe00",
- "lvnE;": "\u2268\ufe00",
- "mDDot;": "\u223a",
- "macr": "\xaf",
- "macr;": "\xaf",
- "male;": "\u2642",
- "malt;": "\u2720",
- "maltese;": "\u2720",
- "map;": "\u21a6",
- "mapsto;": "\u21a6",
- "mapstodown;": "\u21a7",
- "mapstoleft;": "\u21a4",
- "mapstoup;": "\u21a5",
- "marker;": "\u25ae",
- "mcomma;": "\u2a29",
- "mcy;": "\u043c",
- "mdash;": "\u2014",
- "measuredangle;": "\u2221",
- "mfr;": "\U0001d52a",
- "mho;": "\u2127",
- "micro": "\xb5",
- "micro;": "\xb5",
- "mid;": "\u2223",
- "midast;": "*",
- "midcir;": "\u2af0",
- "middot": "\xb7",
- "middot;": "\xb7",
- "minus;": "\u2212",
- "minusb;": "\u229f",
- "minusd;": "\u2238",
- "minusdu;": "\u2a2a",
- "mlcp;": "\u2adb",
- "mldr;": "\u2026",
- "mnplus;": "\u2213",
- "models;": "\u22a7",
- "mopf;": "\U0001d55e",
- "mp;": "\u2213",
- "mscr;": "\U0001d4c2",
- "mstpos;": "\u223e",
- "mu;": "\u03bc",
- "multimap;": "\u22b8",
- "mumap;": "\u22b8",
- "nGg;": "\u22d9\u0338",
- "nGt;": "\u226b\u20d2",
- "nGtv;": "\u226b\u0338",
- "nLeftarrow;": "\u21cd",
- "nLeftrightarrow;": "\u21ce",
- "nLl;": "\u22d8\u0338",
- "nLt;": "\u226a\u20d2",
- "nLtv;": "\u226a\u0338",
- "nRightarrow;": "\u21cf",
- "nVDash;": "\u22af",
- "nVdash;": "\u22ae",
- "nabla;": "\u2207",
- "nacute;": "\u0144",
- "nang;": "\u2220\u20d2",
- "nap;": "\u2249",
- "napE;": "\u2a70\u0338",
- "napid;": "\u224b\u0338",
- "napos;": "\u0149",
- "napprox;": "\u2249",
- "natur;": "\u266e",
- "natural;": "\u266e",
- "naturals;": "\u2115",
- "nbsp": "\xa0",
- "nbsp;": "\xa0",
- "nbump;": "\u224e\u0338",
- "nbumpe;": "\u224f\u0338",
- "ncap;": "\u2a43",
- "ncaron;": "\u0148",
- "ncedil;": "\u0146",
- "ncong;": "\u2247",
- "ncongdot;": "\u2a6d\u0338",
- "ncup;": "\u2a42",
- "ncy;": "\u043d",
- "ndash;": "\u2013",
- "ne;": "\u2260",
- "neArr;": "\u21d7",
- "nearhk;": "\u2924",
- "nearr;": "\u2197",
- "nearrow;": "\u2197",
- "nedot;": "\u2250\u0338",
- "nequiv;": "\u2262",
- "nesear;": "\u2928",
- "nesim;": "\u2242\u0338",
- "nexist;": "\u2204",
- "nexists;": "\u2204",
- "nfr;": "\U0001d52b",
- "ngE;": "\u2267\u0338",
- "nge;": "\u2271",
- "ngeq;": "\u2271",
- "ngeqq;": "\u2267\u0338",
- "ngeqslant;": "\u2a7e\u0338",
- "nges;": "\u2a7e\u0338",
- "ngsim;": "\u2275",
- "ngt;": "\u226f",
- "ngtr;": "\u226f",
- "nhArr;": "\u21ce",
- "nharr;": "\u21ae",
- "nhpar;": "\u2af2",
- "ni;": "\u220b",
- "nis;": "\u22fc",
- "nisd;": "\u22fa",
- "niv;": "\u220b",
- "njcy;": "\u045a",
- "nlArr;": "\u21cd",
- "nlE;": "\u2266\u0338",
- "nlarr;": "\u219a",
- "nldr;": "\u2025",
- "nle;": "\u2270",
- "nleftarrow;": "\u219a",
- "nleftrightarrow;": "\u21ae",
- "nleq;": "\u2270",
- "nleqq;": "\u2266\u0338",
- "nleqslant;": "\u2a7d\u0338",
- "nles;": "\u2a7d\u0338",
- "nless;": "\u226e",
- "nlsim;": "\u2274",
- "nlt;": "\u226e",
- "nltri;": "\u22ea",
- "nltrie;": "\u22ec",
- "nmid;": "\u2224",
- "nopf;": "\U0001d55f",
- "not": "\xac",
- "not;": "\xac",
- "notin;": "\u2209",
- "notinE;": "\u22f9\u0338",
- "notindot;": "\u22f5\u0338",
- "notinva;": "\u2209",
- "notinvb;": "\u22f7",
- "notinvc;": "\u22f6",
- "notni;": "\u220c",
- "notniva;": "\u220c",
- "notnivb;": "\u22fe",
- "notnivc;": "\u22fd",
- "npar;": "\u2226",
- "nparallel;": "\u2226",
- "nparsl;": "\u2afd\u20e5",
- "npart;": "\u2202\u0338",
- "npolint;": "\u2a14",
- "npr;": "\u2280",
- "nprcue;": "\u22e0",
- "npre;": "\u2aaf\u0338",
- "nprec;": "\u2280",
- "npreceq;": "\u2aaf\u0338",
- "nrArr;": "\u21cf",
- "nrarr;": "\u219b",
- "nrarrc;": "\u2933\u0338",
- "nrarrw;": "\u219d\u0338",
- "nrightarrow;": "\u219b",
- "nrtri;": "\u22eb",
- "nrtrie;": "\u22ed",
- "nsc;": "\u2281",
- "nsccue;": "\u22e1",
- "nsce;": "\u2ab0\u0338",
- "nscr;": "\U0001d4c3",
- "nshortmid;": "\u2224",
- "nshortparallel;": "\u2226",
- "nsim;": "\u2241",
- "nsime;": "\u2244",
- "nsimeq;": "\u2244",
- "nsmid;": "\u2224",
- "nspar;": "\u2226",
- "nsqsube;": "\u22e2",
- "nsqsupe;": "\u22e3",
- "nsub;": "\u2284",
- "nsubE;": "\u2ac5\u0338",
- "nsube;": "\u2288",
- "nsubset;": "\u2282\u20d2",
- "nsubseteq;": "\u2288",
- "nsubseteqq;": "\u2ac5\u0338",
- "nsucc;": "\u2281",
- "nsucceq;": "\u2ab0\u0338",
- "nsup;": "\u2285",
- "nsupE;": "\u2ac6\u0338",
- "nsupe;": "\u2289",
- "nsupset;": "\u2283\u20d2",
- "nsupseteq;": "\u2289",
- "nsupseteqq;": "\u2ac6\u0338",
- "ntgl;": "\u2279",
- "ntilde": "\xf1",
- "ntilde;": "\xf1",
- "ntlg;": "\u2278",
- "ntriangleleft;": "\u22ea",
- "ntrianglelefteq;": "\u22ec",
- "ntriangleright;": "\u22eb",
- "ntrianglerighteq;": "\u22ed",
- "nu;": "\u03bd",
- "num;": "#",
- "numero;": "\u2116",
- "numsp;": "\u2007",
- "nvDash;": "\u22ad",
- "nvHarr;": "\u2904",
- "nvap;": "\u224d\u20d2",
- "nvdash;": "\u22ac",
- "nvge;": "\u2265\u20d2",
- "nvgt;": ">\u20d2",
- "nvinfin;": "\u29de",
- "nvlArr;": "\u2902",
- "nvle;": "\u2264\u20d2",
- "nvlt;": "<\u20d2",
- "nvltrie;": "\u22b4\u20d2",
- "nvrArr;": "\u2903",
- "nvrtrie;": "\u22b5\u20d2",
- "nvsim;": "\u223c\u20d2",
- "nwArr;": "\u21d6",
- "nwarhk;": "\u2923",
- "nwarr;": "\u2196",
- "nwarrow;": "\u2196",
- "nwnear;": "\u2927",
- "oS;": "\u24c8",
- "oacute": "\xf3",
- "oacute;": "\xf3",
- "oast;": "\u229b",
- "ocir;": "\u229a",
- "ocirc": "\xf4",
- "ocirc;": "\xf4",
- "ocy;": "\u043e",
- "odash;": "\u229d",
- "odblac;": "\u0151",
- "odiv;": "\u2a38",
- "odot;": "\u2299",
- "odsold;": "\u29bc",
- "oelig;": "\u0153",
- "ofcir;": "\u29bf",
- "ofr;": "\U0001d52c",
- "ogon;": "\u02db",
- "ograve": "\xf2",
- "ograve;": "\xf2",
- "ogt;": "\u29c1",
- "ohbar;": "\u29b5",
- "ohm;": "\u03a9",
- "oint;": "\u222e",
- "olarr;": "\u21ba",
- "olcir;": "\u29be",
- "olcross;": "\u29bb",
- "oline;": "\u203e",
- "olt;": "\u29c0",
- "omacr;": "\u014d",
- "omega;": "\u03c9",
- "omicron;": "\u03bf",
- "omid;": "\u29b6",
- "ominus;": "\u2296",
- "oopf;": "\U0001d560",
- "opar;": "\u29b7",
- "operp;": "\u29b9",
- "oplus;": "\u2295",
- "or;": "\u2228",
- "orarr;": "\u21bb",
- "ord;": "\u2a5d",
- "order;": "\u2134",
- "orderof;": "\u2134",
- "ordf": "\xaa",
- "ordf;": "\xaa",
- "ordm": "\xba",
- "ordm;": "\xba",
- "origof;": "\u22b6",
- "oror;": "\u2a56",
- "orslope;": "\u2a57",
- "orv;": "\u2a5b",
- "oscr;": "\u2134",
- "oslash": "\xf8",
- "oslash;": "\xf8",
- "osol;": "\u2298",
- "otilde": "\xf5",
- "otilde;": "\xf5",
- "otimes;": "\u2297",
- "otimesas;": "\u2a36",
- "ouml": "\xf6",
- "ouml;": "\xf6",
- "ovbar;": "\u233d",
- "par;": "\u2225",
- "para": "\xb6",
- "para;": "\xb6",
- "parallel;": "\u2225",
- "parsim;": "\u2af3",
- "parsl;": "\u2afd",
- "part;": "\u2202",
- "pcy;": "\u043f",
- "percnt;": "%",
- "period;": ".",
- "permil;": "\u2030",
- "perp;": "\u22a5",
- "pertenk;": "\u2031",
- "pfr;": "\U0001d52d",
- "phi;": "\u03c6",
- "phiv;": "\u03d5",
- "phmmat;": "\u2133",
- "phone;": "\u260e",
- "pi;": "\u03c0",
- "pitchfork;": "\u22d4",
- "piv;": "\u03d6",
- "planck;": "\u210f",
- "planckh;": "\u210e",
- "plankv;": "\u210f",
- "plus;": "+",
- "plusacir;": "\u2a23",
- "plusb;": "\u229e",
- "pluscir;": "\u2a22",
- "plusdo;": "\u2214",
- "plusdu;": "\u2a25",
- "pluse;": "\u2a72",
- "plusmn": "\xb1",
- "plusmn;": "\xb1",
- "plussim;": "\u2a26",
- "plustwo;": "\u2a27",
- "pm;": "\xb1",
- "pointint;": "\u2a15",
- "popf;": "\U0001d561",
- "pound": "\xa3",
- "pound;": "\xa3",
- "pr;": "\u227a",
- "prE;": "\u2ab3",
- "prap;": "\u2ab7",
- "prcue;": "\u227c",
- "pre;": "\u2aaf",
- "prec;": "\u227a",
- "precapprox;": "\u2ab7",
- "preccurlyeq;": "\u227c",
- "preceq;": "\u2aaf",
- "precnapprox;": "\u2ab9",
- "precneqq;": "\u2ab5",
- "precnsim;": "\u22e8",
- "precsim;": "\u227e",
- "prime;": "\u2032",
- "primes;": "\u2119",
- "prnE;": "\u2ab5",
- "prnap;": "\u2ab9",
- "prnsim;": "\u22e8",
- "prod;": "\u220f",
- "profalar;": "\u232e",
- "profline;": "\u2312",
- "profsurf;": "\u2313",
- "prop;": "\u221d",
- "propto;": "\u221d",
- "prsim;": "\u227e",
- "prurel;": "\u22b0",
- "pscr;": "\U0001d4c5",
- "psi;": "\u03c8",
- "puncsp;": "\u2008",
- "qfr;": "\U0001d52e",
- "qint;": "\u2a0c",
- "qopf;": "\U0001d562",
- "qprime;": "\u2057",
- "qscr;": "\U0001d4c6",
- "quaternions;": "\u210d",
- "quatint;": "\u2a16",
- "quest;": "?",
- "questeq;": "\u225f",
- "quot": "\"",
- "quot;": "\"",
- "rAarr;": "\u21db",
- "rArr;": "\u21d2",
- "rAtail;": "\u291c",
- "rBarr;": "\u290f",
- "rHar;": "\u2964",
- "race;": "\u223d\u0331",
- "racute;": "\u0155",
- "radic;": "\u221a",
- "raemptyv;": "\u29b3",
- "rang;": "\u27e9",
- "rangd;": "\u2992",
- "range;": "\u29a5",
- "rangle;": "\u27e9",
- "raquo": "\xbb",
- "raquo;": "\xbb",
- "rarr;": "\u2192",
- "rarrap;": "\u2975",
- "rarrb;": "\u21e5",
- "rarrbfs;": "\u2920",
- "rarrc;": "\u2933",
- "rarrfs;": "\u291e",
- "rarrhk;": "\u21aa",
- "rarrlp;": "\u21ac",
- "rarrpl;": "\u2945",
- "rarrsim;": "\u2974",
- "rarrtl;": "\u21a3",
- "rarrw;": "\u219d",
- "ratail;": "\u291a",
- "ratio;": "\u2236",
- "rationals;": "\u211a",
- "rbarr;": "\u290d",
- "rbbrk;": "\u2773",
- "rbrace;": "}",
- "rbrack;": "]",
- "rbrke;": "\u298c",
- "rbrksld;": "\u298e",
- "rbrkslu;": "\u2990",
- "rcaron;": "\u0159",
- "rcedil;": "\u0157",
- "rceil;": "\u2309",
- "rcub;": "}",
- "rcy;": "\u0440",
- "rdca;": "\u2937",
- "rdldhar;": "\u2969",
- "rdquo;": "\u201d",
- "rdquor;": "\u201d",
- "rdsh;": "\u21b3",
- "real;": "\u211c",
- "realine;": "\u211b",
- "realpart;": "\u211c",
- "reals;": "\u211d",
- "rect;": "\u25ad",
- "reg": "\xae",
- "reg;": "\xae",
- "rfisht;": "\u297d",
- "rfloor;": "\u230b",
- "rfr;": "\U0001d52f",
- "rhard;": "\u21c1",
- "rharu;": "\u21c0",
- "rharul;": "\u296c",
- "rho;": "\u03c1",
- "rhov;": "\u03f1",
- "rightarrow;": "\u2192",
- "rightarrowtail;": "\u21a3",
- "rightharpoondown;": "\u21c1",
- "rightharpoonup;": "\u21c0",
- "rightleftarrows;": "\u21c4",
- "rightleftharpoons;": "\u21cc",
- "rightrightarrows;": "\u21c9",
- "rightsquigarrow;": "\u219d",
- "rightthreetimes;": "\u22cc",
- "ring;": "\u02da",
- "risingdotseq;": "\u2253",
- "rlarr;": "\u21c4",
- "rlhar;": "\u21cc",
- "rlm;": "\u200f",
- "rmoust;": "\u23b1",
- "rmoustache;": "\u23b1",
- "rnmid;": "\u2aee",
- "roang;": "\u27ed",
- "roarr;": "\u21fe",
- "robrk;": "\u27e7",
- "ropar;": "\u2986",
- "ropf;": "\U0001d563",
- "roplus;": "\u2a2e",
- "rotimes;": "\u2a35",
- "rpar;": ")",
- "rpargt;": "\u2994",
- "rppolint;": "\u2a12",
- "rrarr;": "\u21c9",
- "rsaquo;": "\u203a",
- "rscr;": "\U0001d4c7",
- "rsh;": "\u21b1",
- "rsqb;": "]",
- "rsquo;": "\u2019",
- "rsquor;": "\u2019",
- "rthree;": "\u22cc",
- "rtimes;": "\u22ca",
- "rtri;": "\u25b9",
- "rtrie;": "\u22b5",
- "rtrif;": "\u25b8",
- "rtriltri;": "\u29ce",
- "ruluhar;": "\u2968",
- "rx;": "\u211e",
- "sacute;": "\u015b",
- "sbquo;": "\u201a",
- "sc;": "\u227b",
- "scE;": "\u2ab4",
- "scap;": "\u2ab8",
- "scaron;": "\u0161",
- "sccue;": "\u227d",
- "sce;": "\u2ab0",
- "scedil;": "\u015f",
- "scirc;": "\u015d",
- "scnE;": "\u2ab6",
- "scnap;": "\u2aba",
- "scnsim;": "\u22e9",
- "scpolint;": "\u2a13",
- "scsim;": "\u227f",
- "scy;": "\u0441",
- "sdot;": "\u22c5",
- "sdotb;": "\u22a1",
- "sdote;": "\u2a66",
- "seArr;": "\u21d8",
- "searhk;": "\u2925",
- "searr;": "\u2198",
- "searrow;": "\u2198",
- "sect": "\xa7",
- "sect;": "\xa7",
- "semi;": ";",
- "seswar;": "\u2929",
- "setminus;": "\u2216",
- "setmn;": "\u2216",
- "sext;": "\u2736",
- "sfr;": "\U0001d530",
- "sfrown;": "\u2322",
- "sharp;": "\u266f",
- "shchcy;": "\u0449",
- "shcy;": "\u0448",
- "shortmid;": "\u2223",
- "shortparallel;": "\u2225",
- "shy": "\xad",
- "shy;": "\xad",
- "sigma;": "\u03c3",
- "sigmaf;": "\u03c2",
- "sigmav;": "\u03c2",
- "sim;": "\u223c",
- "simdot;": "\u2a6a",
- "sime;": "\u2243",
- "simeq;": "\u2243",
- "simg;": "\u2a9e",
- "simgE;": "\u2aa0",
- "siml;": "\u2a9d",
- "simlE;": "\u2a9f",
- "simne;": "\u2246",
- "simplus;": "\u2a24",
- "simrarr;": "\u2972",
- "slarr;": "\u2190",
- "smallsetminus;": "\u2216",
- "smashp;": "\u2a33",
- "smeparsl;": "\u29e4",
- "smid;": "\u2223",
- "smile;": "\u2323",
- "smt;": "\u2aaa",
- "smte;": "\u2aac",
- "smtes;": "\u2aac\ufe00",
- "softcy;": "\u044c",
- "sol;": "/",
- "solb;": "\u29c4",
- "solbar;": "\u233f",
- "sopf;": "\U0001d564",
- "spades;": "\u2660",
- "spadesuit;": "\u2660",
- "spar;": "\u2225",
- "sqcap;": "\u2293",
- "sqcaps;": "\u2293\ufe00",
- "sqcup;": "\u2294",
- "sqcups;": "\u2294\ufe00",
- "sqsub;": "\u228f",
- "sqsube;": "\u2291",
- "sqsubset;": "\u228f",
- "sqsubseteq;": "\u2291",
- "sqsup;": "\u2290",
- "sqsupe;": "\u2292",
- "sqsupset;": "\u2290",
- "sqsupseteq;": "\u2292",
- "squ;": "\u25a1",
- "square;": "\u25a1",
- "squarf;": "\u25aa",
- "squf;": "\u25aa",
- "srarr;": "\u2192",
- "sscr;": "\U0001d4c8",
- "ssetmn;": "\u2216",
- "ssmile;": "\u2323",
- "sstarf;": "\u22c6",
- "star;": "\u2606",
- "starf;": "\u2605",
- "straightepsilon;": "\u03f5",
- "straightphi;": "\u03d5",
- "strns;": "\xaf",
- "sub;": "\u2282",
- "subE;": "\u2ac5",
- "subdot;": "\u2abd",
- "sube;": "\u2286",
- "subedot;": "\u2ac3",
- "submult;": "\u2ac1",
- "subnE;": "\u2acb",
- "subne;": "\u228a",
- "subplus;": "\u2abf",
- "subrarr;": "\u2979",
- "subset;": "\u2282",
- "subseteq;": "\u2286",
- "subseteqq;": "\u2ac5",
- "subsetneq;": "\u228a",
- "subsetneqq;": "\u2acb",
- "subsim;": "\u2ac7",
- "subsub;": "\u2ad5",
- "subsup;": "\u2ad3",
- "succ;": "\u227b",
- "succapprox;": "\u2ab8",
- "succcurlyeq;": "\u227d",
- "succeq;": "\u2ab0",
- "succnapprox;": "\u2aba",
- "succneqq;": "\u2ab6",
- "succnsim;": "\u22e9",
- "succsim;": "\u227f",
- "sum;": "\u2211",
- "sung;": "\u266a",
- "sup1": "\xb9",
- "sup1;": "\xb9",
- "sup2": "\xb2",
- "sup2;": "\xb2",
- "sup3": "\xb3",
- "sup3;": "\xb3",
- "sup;": "\u2283",
- "supE;": "\u2ac6",
- "supdot;": "\u2abe",
- "supdsub;": "\u2ad8",
- "supe;": "\u2287",
- "supedot;": "\u2ac4",
- "suphsol;": "\u27c9",
- "suphsub;": "\u2ad7",
- "suplarr;": "\u297b",
- "supmult;": "\u2ac2",
- "supnE;": "\u2acc",
- "supne;": "\u228b",
- "supplus;": "\u2ac0",
- "supset;": "\u2283",
- "supseteq;": "\u2287",
- "supseteqq;": "\u2ac6",
- "supsetneq;": "\u228b",
- "supsetneqq;": "\u2acc",
- "supsim;": "\u2ac8",
- "supsub;": "\u2ad4",
- "supsup;": "\u2ad6",
- "swArr;": "\u21d9",
- "swarhk;": "\u2926",
- "swarr;": "\u2199",
- "swarrow;": "\u2199",
- "swnwar;": "\u292a",
- "szlig": "\xdf",
- "szlig;": "\xdf",
- "target;": "\u2316",
- "tau;": "\u03c4",
- "tbrk;": "\u23b4",
- "tcaron;": "\u0165",
- "tcedil;": "\u0163",
- "tcy;": "\u0442",
- "tdot;": "\u20db",
- "telrec;": "\u2315",
- "tfr;": "\U0001d531",
- "there4;": "\u2234",
- "therefore;": "\u2234",
- "theta;": "\u03b8",
- "thetasym;": "\u03d1",
- "thetav;": "\u03d1",
- "thickapprox;": "\u2248",
- "thicksim;": "\u223c",
- "thinsp;": "\u2009",
- "thkap;": "\u2248",
- "thksim;": "\u223c",
- "thorn": "\xfe",
- "thorn;": "\xfe",
- "tilde;": "\u02dc",
- "times": "\xd7",
- "times;": "\xd7",
- "timesb;": "\u22a0",
- "timesbar;": "\u2a31",
- "timesd;": "\u2a30",
- "tint;": "\u222d",
- "toea;": "\u2928",
- "top;": "\u22a4",
- "topbot;": "\u2336",
- "topcir;": "\u2af1",
- "topf;": "\U0001d565",
- "topfork;": "\u2ada",
- "tosa;": "\u2929",
- "tprime;": "\u2034",
- "trade;": "\u2122",
- "triangle;": "\u25b5",
- "triangledown;": "\u25bf",
- "triangleleft;": "\u25c3",
- "trianglelefteq;": "\u22b4",
- "triangleq;": "\u225c",
- "triangleright;": "\u25b9",
- "trianglerighteq;": "\u22b5",
- "tridot;": "\u25ec",
- "trie;": "\u225c",
- "triminus;": "\u2a3a",
- "triplus;": "\u2a39",
- "trisb;": "\u29cd",
- "tritime;": "\u2a3b",
- "trpezium;": "\u23e2",
- "tscr;": "\U0001d4c9",
- "tscy;": "\u0446",
- "tshcy;": "\u045b",
- "tstrok;": "\u0167",
- "twixt;": "\u226c",
- "twoheadleftarrow;": "\u219e",
- "twoheadrightarrow;": "\u21a0",
- "uArr;": "\u21d1",
- "uHar;": "\u2963",
- "uacute": "\xfa",
- "uacute;": "\xfa",
- "uarr;": "\u2191",
- "ubrcy;": "\u045e",
- "ubreve;": "\u016d",
- "ucirc": "\xfb",
- "ucirc;": "\xfb",
- "ucy;": "\u0443",
- "udarr;": "\u21c5",
- "udblac;": "\u0171",
- "udhar;": "\u296e",
- "ufisht;": "\u297e",
- "ufr;": "\U0001d532",
- "ugrave": "\xf9",
- "ugrave;": "\xf9",
- "uharl;": "\u21bf",
- "uharr;": "\u21be",
- "uhblk;": "\u2580",
- "ulcorn;": "\u231c",
- "ulcorner;": "\u231c",
- "ulcrop;": "\u230f",
- "ultri;": "\u25f8",
- "umacr;": "\u016b",
- "uml": "\xa8",
- "uml;": "\xa8",
- "uogon;": "\u0173",
- "uopf;": "\U0001d566",
- "uparrow;": "\u2191",
- "updownarrow;": "\u2195",
- "upharpoonleft;": "\u21bf",
- "upharpoonright;": "\u21be",
- "uplus;": "\u228e",
- "upsi;": "\u03c5",
- "upsih;": "\u03d2",
- "upsilon;": "\u03c5",
- "upuparrows;": "\u21c8",
- "urcorn;": "\u231d",
- "urcorner;": "\u231d",
- "urcrop;": "\u230e",
- "uring;": "\u016f",
- "urtri;": "\u25f9",
- "uscr;": "\U0001d4ca",
- "utdot;": "\u22f0",
- "utilde;": "\u0169",
- "utri;": "\u25b5",
- "utrif;": "\u25b4",
- "uuarr;": "\u21c8",
- "uuml": "\xfc",
- "uuml;": "\xfc",
- "uwangle;": "\u29a7",
- "vArr;": "\u21d5",
- "vBar;": "\u2ae8",
- "vBarv;": "\u2ae9",
- "vDash;": "\u22a8",
- "vangrt;": "\u299c",
- "varepsilon;": "\u03f5",
- "varkappa;": "\u03f0",
- "varnothing;": "\u2205",
- "varphi;": "\u03d5",
- "varpi;": "\u03d6",
- "varpropto;": "\u221d",
- "varr;": "\u2195",
- "varrho;": "\u03f1",
- "varsigma;": "\u03c2",
- "varsubsetneq;": "\u228a\ufe00",
- "varsubsetneqq;": "\u2acb\ufe00",
- "varsupsetneq;": "\u228b\ufe00",
- "varsupsetneqq;": "\u2acc\ufe00",
- "vartheta;": "\u03d1",
- "vartriangleleft;": "\u22b2",
- "vartriangleright;": "\u22b3",
- "vcy;": "\u0432",
- "vdash;": "\u22a2",
- "vee;": "\u2228",
- "veebar;": "\u22bb",
- "veeeq;": "\u225a",
- "vellip;": "\u22ee",
- "verbar;": "|",
- "vert;": "|",
- "vfr;": "\U0001d533",
- "vltri;": "\u22b2",
- "vnsub;": "\u2282\u20d2",
- "vnsup;": "\u2283\u20d2",
- "vopf;": "\U0001d567",
- "vprop;": "\u221d",
- "vrtri;": "\u22b3",
- "vscr;": "\U0001d4cb",
- "vsubnE;": "\u2acb\ufe00",
- "vsubne;": "\u228a\ufe00",
- "vsupnE;": "\u2acc\ufe00",
- "vsupne;": "\u228b\ufe00",
- "vzigzag;": "\u299a",
- "wcirc;": "\u0175",
- "wedbar;": "\u2a5f",
- "wedge;": "\u2227",
- "wedgeq;": "\u2259",
- "weierp;": "\u2118",
- "wfr;": "\U0001d534",
- "wopf;": "\U0001d568",
- "wp;": "\u2118",
- "wr;": "\u2240",
- "wreath;": "\u2240",
- "wscr;": "\U0001d4cc",
- "xcap;": "\u22c2",
- "xcirc;": "\u25ef",
- "xcup;": "\u22c3",
- "xdtri;": "\u25bd",
- "xfr;": "\U0001d535",
- "xhArr;": "\u27fa",
- "xharr;": "\u27f7",
- "xi;": "\u03be",
- "xlArr;": "\u27f8",
- "xlarr;": "\u27f5",
- "xmap;": "\u27fc",
- "xnis;": "\u22fb",
- "xodot;": "\u2a00",
- "xopf;": "\U0001d569",
- "xoplus;": "\u2a01",
- "xotime;": "\u2a02",
- "xrArr;": "\u27f9",
- "xrarr;": "\u27f6",
- "xscr;": "\U0001d4cd",
- "xsqcup;": "\u2a06",
- "xuplus;": "\u2a04",
- "xutri;": "\u25b3",
- "xvee;": "\u22c1",
- "xwedge;": "\u22c0",
- "yacute": "\xfd",
- "yacute;": "\xfd",
- "yacy;": "\u044f",
- "ycirc;": "\u0177",
- "ycy;": "\u044b",
- "yen": "\xa5",
- "yen;": "\xa5",
- "yfr;": "\U0001d536",
- "yicy;": "\u0457",
- "yopf;": "\U0001d56a",
- "yscr;": "\U0001d4ce",
- "yucy;": "\u044e",
- "yuml": "\xff",
- "yuml;": "\xff",
- "zacute;": "\u017a",
- "zcaron;": "\u017e",
- "zcy;": "\u0437",
- "zdot;": "\u017c",
- "zeetrf;": "\u2128",
- "zeta;": "\u03b6",
- "zfr;": "\U0001d537",
- "zhcy;": "\u0436",
- "zigrarr;": "\u21dd",
- "zopf;": "\U0001d56b",
- "zscr;": "\U0001d4cf",
- "zwj;": "\u200d",
- "zwnj;": "\u200c",
-}
-
-replacementCharacters = {
- 0x0: "\uFFFD",
- 0x0d: "\u000D",
- 0x80: "\u20AC",
- 0x81: "\u0081",
- 0x81: "\u0081",
- 0x82: "\u201A",
- 0x83: "\u0192",
- 0x84: "\u201E",
- 0x85: "\u2026",
- 0x86: "\u2020",
- 0x87: "\u2021",
- 0x88: "\u02C6",
- 0x89: "\u2030",
- 0x8A: "\u0160",
- 0x8B: "\u2039",
- 0x8C: "\u0152",
- 0x8D: "\u008D",
- 0x8E: "\u017D",
- 0x8F: "\u008F",
- 0x90: "\u0090",
- 0x91: "\u2018",
- 0x92: "\u2019",
- 0x93: "\u201C",
- 0x94: "\u201D",
- 0x95: "\u2022",
- 0x96: "\u2013",
- 0x97: "\u2014",
- 0x98: "\u02DC",
- 0x99: "\u2122",
- 0x9A: "\u0161",
- 0x9B: "\u203A",
- 0x9C: "\u0153",
- 0x9D: "\u009D",
- 0x9E: "\u017E",
- 0x9F: "\u0178",
-}
-
-encodings = {
- '437': 'cp437',
- '850': 'cp850',
- '852': 'cp852',
- '855': 'cp855',
- '857': 'cp857',
- '860': 'cp860',
- '861': 'cp861',
- '862': 'cp862',
- '863': 'cp863',
- '865': 'cp865',
- '866': 'cp866',
- '869': 'cp869',
- 'ansix341968': 'ascii',
- 'ansix341986': 'ascii',
- 'arabic': 'iso8859-6',
- 'ascii': 'ascii',
- 'asmo708': 'iso8859-6',
- 'big5': 'big5',
- 'big5hkscs': 'big5hkscs',
- 'chinese': 'gbk',
- 'cp037': 'cp037',
- 'cp1026': 'cp1026',
- 'cp154': 'ptcp154',
- 'cp367': 'ascii',
- 'cp424': 'cp424',
- 'cp437': 'cp437',
- 'cp500': 'cp500',
- 'cp775': 'cp775',
- 'cp819': 'windows-1252',
- 'cp850': 'cp850',
- 'cp852': 'cp852',
- 'cp855': 'cp855',
- 'cp857': 'cp857',
- 'cp860': 'cp860',
- 'cp861': 'cp861',
- 'cp862': 'cp862',
- 'cp863': 'cp863',
- 'cp864': 'cp864',
- 'cp865': 'cp865',
- 'cp866': 'cp866',
- 'cp869': 'cp869',
- 'cp936': 'gbk',
- 'cpgr': 'cp869',
- 'cpis': 'cp861',
- 'csascii': 'ascii',
- 'csbig5': 'big5',
- 'cseuckr': 'cp949',
- 'cseucpkdfmtjapanese': 'euc_jp',
- 'csgb2312': 'gbk',
- 'cshproman8': 'hp-roman8',
- 'csibm037': 'cp037',
- 'csibm1026': 'cp1026',
- 'csibm424': 'cp424',
- 'csibm500': 'cp500',
- 'csibm855': 'cp855',
- 'csibm857': 'cp857',
- 'csibm860': 'cp860',
- 'csibm861': 'cp861',
- 'csibm863': 'cp863',
- 'csibm864': 'cp864',
- 'csibm865': 'cp865',
- 'csibm866': 'cp866',
- 'csibm869': 'cp869',
- 'csiso2022jp': 'iso2022_jp',
- 'csiso2022jp2': 'iso2022_jp_2',
- 'csiso2022kr': 'iso2022_kr',
- 'csiso58gb231280': 'gbk',
- 'csisolatin1': 'windows-1252',
- 'csisolatin2': 'iso8859-2',
- 'csisolatin3': 'iso8859-3',
- 'csisolatin4': 'iso8859-4',
- 'csisolatin5': 'windows-1254',
- 'csisolatin6': 'iso8859-10',
- 'csisolatinarabic': 'iso8859-6',
- 'csisolatincyrillic': 'iso8859-5',
- 'csisolatingreek': 'iso8859-7',
- 'csisolatinhebrew': 'iso8859-8',
- 'cskoi8r': 'koi8-r',
- 'csksc56011987': 'cp949',
- 'cspc775baltic': 'cp775',
- 'cspc850multilingual': 'cp850',
- 'cspc862latinhebrew': 'cp862',
- 'cspc8codepage437': 'cp437',
- 'cspcp852': 'cp852',
- 'csptcp154': 'ptcp154',
- 'csshiftjis': 'shift_jis',
- 'csunicode11utf7': 'utf-7',
- 'cyrillic': 'iso8859-5',
- 'cyrillicasian': 'ptcp154',
- 'ebcdiccpbe': 'cp500',
- 'ebcdiccpca': 'cp037',
- 'ebcdiccpch': 'cp500',
- 'ebcdiccphe': 'cp424',
- 'ebcdiccpnl': 'cp037',
- 'ebcdiccpus': 'cp037',
- 'ebcdiccpwt': 'cp037',
- 'ecma114': 'iso8859-6',
- 'ecma118': 'iso8859-7',
- 'elot928': 'iso8859-7',
- 'eucjp': 'euc_jp',
- 'euckr': 'cp949',
- 'extendedunixcodepackedformatforjapanese': 'euc_jp',
- 'gb18030': 'gb18030',
- 'gb2312': 'gbk',
- 'gb231280': 'gbk',
- 'gbk': 'gbk',
- 'greek': 'iso8859-7',
- 'greek8': 'iso8859-7',
- 'hebrew': 'iso8859-8',
- 'hproman8': 'hp-roman8',
- 'hzgb2312': 'hz',
- 'ibm037': 'cp037',
- 'ibm1026': 'cp1026',
- 'ibm367': 'ascii',
- 'ibm424': 'cp424',
- 'ibm437': 'cp437',
- 'ibm500': 'cp500',
- 'ibm775': 'cp775',
- 'ibm819': 'windows-1252',
- 'ibm850': 'cp850',
- 'ibm852': 'cp852',
- 'ibm855': 'cp855',
- 'ibm857': 'cp857',
- 'ibm860': 'cp860',
- 'ibm861': 'cp861',
- 'ibm862': 'cp862',
- 'ibm863': 'cp863',
- 'ibm864': 'cp864',
- 'ibm865': 'cp865',
- 'ibm866': 'cp866',
- 'ibm869': 'cp869',
- 'iso2022jp': 'iso2022_jp',
- 'iso2022jp2': 'iso2022_jp_2',
- 'iso2022kr': 'iso2022_kr',
- 'iso646irv1991': 'ascii',
- 'iso646us': 'ascii',
- 'iso88591': 'windows-1252',
- 'iso885910': 'iso8859-10',
- 'iso8859101992': 'iso8859-10',
- 'iso885911987': 'windows-1252',
- 'iso885913': 'iso8859-13',
- 'iso885914': 'iso8859-14',
- 'iso8859141998': 'iso8859-14',
- 'iso885915': 'iso8859-15',
- 'iso885916': 'iso8859-16',
- 'iso8859162001': 'iso8859-16',
- 'iso88592': 'iso8859-2',
- 'iso885921987': 'iso8859-2',
- 'iso88593': 'iso8859-3',
- 'iso885931988': 'iso8859-3',
- 'iso88594': 'iso8859-4',
- 'iso885941988': 'iso8859-4',
- 'iso88595': 'iso8859-5',
- 'iso885951988': 'iso8859-5',
- 'iso88596': 'iso8859-6',
- 'iso885961987': 'iso8859-6',
- 'iso88597': 'iso8859-7',
- 'iso885971987': 'iso8859-7',
- 'iso88598': 'iso8859-8',
- 'iso885981988': 'iso8859-8',
- 'iso88599': 'windows-1254',
- 'iso885991989': 'windows-1254',
- 'isoceltic': 'iso8859-14',
- 'isoir100': 'windows-1252',
- 'isoir101': 'iso8859-2',
- 'isoir109': 'iso8859-3',
- 'isoir110': 'iso8859-4',
- 'isoir126': 'iso8859-7',
- 'isoir127': 'iso8859-6',
- 'isoir138': 'iso8859-8',
- 'isoir144': 'iso8859-5',
- 'isoir148': 'windows-1254',
- 'isoir149': 'cp949',
- 'isoir157': 'iso8859-10',
- 'isoir199': 'iso8859-14',
- 'isoir226': 'iso8859-16',
- 'isoir58': 'gbk',
- 'isoir6': 'ascii',
- 'koi8r': 'koi8-r',
- 'koi8u': 'koi8-u',
- 'korean': 'cp949',
- 'ksc5601': 'cp949',
- 'ksc56011987': 'cp949',
- 'ksc56011989': 'cp949',
- 'l1': 'windows-1252',
- 'l10': 'iso8859-16',
- 'l2': 'iso8859-2',
- 'l3': 'iso8859-3',
- 'l4': 'iso8859-4',
- 'l5': 'windows-1254',
- 'l6': 'iso8859-10',
- 'l8': 'iso8859-14',
- 'latin1': 'windows-1252',
- 'latin10': 'iso8859-16',
- 'latin2': 'iso8859-2',
- 'latin3': 'iso8859-3',
- 'latin4': 'iso8859-4',
- 'latin5': 'windows-1254',
- 'latin6': 'iso8859-10',
- 'latin8': 'iso8859-14',
- 'latin9': 'iso8859-15',
- 'ms936': 'gbk',
- 'mskanji': 'shift_jis',
- 'pt154': 'ptcp154',
- 'ptcp154': 'ptcp154',
- 'r8': 'hp-roman8',
- 'roman8': 'hp-roman8',
- 'shiftjis': 'shift_jis',
- 'tis620': 'cp874',
- 'unicode11utf7': 'utf-7',
- 'us': 'ascii',
- 'usascii': 'ascii',
- 'utf16': 'utf-16',
- 'utf16be': 'utf-16-be',
- 'utf16le': 'utf-16-le',
- 'utf8': 'utf-8',
- 'windows1250': 'cp1250',
- 'windows1251': 'cp1251',
- 'windows1252': 'cp1252',
- 'windows1253': 'cp1253',
- 'windows1254': 'cp1254',
- 'windows1255': 'cp1255',
- 'windows1256': 'cp1256',
- 'windows1257': 'cp1257',
- 'windows1258': 'cp1258',
- 'windows936': 'gbk',
- 'x-x-big5': 'big5'}
-
-tokenTypes = {
- "Doctype": 0,
- "Characters": 1,
- "SpaceCharacters": 2,
- "StartTag": 3,
- "EndTag": 4,
- "EmptyTag": 5,
- "Comment": 6,
- "ParseError": 7
-}
-
-tagTokenTypes = frozenset([tokenTypes["StartTag"], tokenTypes["EndTag"],
- tokenTypes["EmptyTag"]])
-
-
-prefixes = dict([(v, k) for k, v in namespaces.items()])
-prefixes["http://www.w3.org/1998/Math/MathML"] = "math"
-
-
-class DataLossWarning(UserWarning):
- pass
-
-
-class ReparseException(Exception):
- pass
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/__init__.py
+++ /dev/null
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/_base.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/_base.py
deleted file mode 100644
index c7dbaed0fab..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/_base.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-
-class Filter(object):
- def __init__(self, source):
- self.source = source
-
- def __iter__(self):
- return iter(self.source)
-
- def __getattr__(self, name):
- return getattr(self.source, name)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/alphabeticalattributes.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/alphabeticalattributes.py
deleted file mode 100644
index fed6996c1d9..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/alphabeticalattributes.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from . import _base
-
-try:
- from collections import OrderedDict
-except ImportError:
- from ordereddict import OrderedDict
-
-
-class Filter(_base.Filter):
- def __iter__(self):
- for token in _base.Filter.__iter__(self):
- if token["type"] in ("StartTag", "EmptyTag"):
- attrs = OrderedDict()
- for name, value in sorted(token["data"].items(),
- key=lambda x: x[0]):
- attrs[name] = value
- token["data"] = attrs
- yield token
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/inject_meta_charset.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/inject_meta_charset.py
deleted file mode 100644
index ca33b70b530..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/inject_meta_charset.py
+++ /dev/null
@@ -1,65 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from . import _base
-
-
-class Filter(_base.Filter):
- def __init__(self, source, encoding):
- _base.Filter.__init__(self, source)
- self.encoding = encoding
-
- def __iter__(self):
- state = "pre_head"
- meta_found = (self.encoding is None)
- pending = []
-
- for token in _base.Filter.__iter__(self):
- type = token["type"]
- if type == "StartTag":
- if token["name"].lower() == "head":
- state = "in_head"
-
- elif type == "EmptyTag":
- if token["name"].lower() == "meta":
- # replace charset with actual encoding
- has_http_equiv_content_type = False
- for (namespace, name), value in token["data"].items():
- if namespace is not None:
- continue
- elif name.lower() == 'charset':
- token["data"][(namespace, name)] = self.encoding
- meta_found = True
- break
- elif name == 'http-equiv' and value.lower() == 'content-type':
- has_http_equiv_content_type = True
- else:
- if has_http_equiv_content_type and (None, "content") in token["data"]:
- token["data"][(None, "content")] = 'text/html; charset=%s' % self.encoding
- meta_found = True
-
- elif token["name"].lower() == "head" and not meta_found:
- # insert meta into empty head
- yield {"type": "StartTag", "name": "head",
- "data": token["data"]}
- yield {"type": "EmptyTag", "name": "meta",
- "data": {(None, "charset"): self.encoding}}
- yield {"type": "EndTag", "name": "head"}
- meta_found = True
- continue
-
- elif type == "EndTag":
- if token["name"].lower() == "head" and pending:
- # insert meta into head (if necessary) and flush pending queue
- yield pending.pop(0)
- if not meta_found:
- yield {"type": "EmptyTag", "name": "meta",
- "data": {(None, "charset"): self.encoding}}
- while pending:
- yield pending.pop(0)
- meta_found = True
- state = "post_head"
-
- if state == "in_head":
- pending.append(token)
- else:
- yield token
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/lint.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/lint.py
deleted file mode 100644
index 8884696dc51..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/lint.py
+++ /dev/null
@@ -1,90 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from . import _base
-from ..constants import cdataElements, rcdataElements, voidElements
-
-from ..constants import spaceCharacters
-spaceCharacters = "".join(spaceCharacters)
-
-
-class LintError(Exception):
- pass
-
-
-class Filter(_base.Filter):
- def __iter__(self):
- open_elements = []
- contentModelFlag = "PCDATA"
- for token in _base.Filter.__iter__(self):
- type = token["type"]
- if type in ("StartTag", "EmptyTag"):
- name = token["name"]
- if contentModelFlag != "PCDATA":
- raise LintError("StartTag not in PCDATA content model flag: %(tag)s" % {"tag": name})
- if not isinstance(name, str):
- raise LintError("Tag name is not a string: %(tag)r" % {"tag": name})
- if not name:
- raise LintError("Empty tag name")
- if type == "StartTag" and name in voidElements:
- raise LintError("Void element reported as StartTag token: %(tag)s" % {"tag": name})
- elif type == "EmptyTag" and name not in voidElements:
- raise LintError("Non-void element reported as EmptyTag token: %(tag)s" % {"tag": token["name"]})
- if type == "StartTag":
- open_elements.append(name)
- for name, value in token["data"]:
- if not isinstance(name, str):
- raise LintError("Attribute name is not a string: %(name)r" % {"name": name})
- if not name:
- raise LintError("Empty attribute name")
- if not isinstance(value, str):
- raise LintError("Attribute value is not a string: %(value)r" % {"value": value})
- if name in cdataElements:
- contentModelFlag = "CDATA"
- elif name in rcdataElements:
- contentModelFlag = "RCDATA"
- elif name == "plaintext":
- contentModelFlag = "PLAINTEXT"
-
- elif type == "EndTag":
- name = token["name"]
- if not isinstance(name, str):
- raise LintError("Tag name is not a string: %(tag)r" % {"tag": name})
- if not name:
- raise LintError("Empty tag name")
- if name in voidElements:
- raise LintError("Void element reported as EndTag token: %(tag)s" % {"tag": name})
- start_name = open_elements.pop()
- if start_name != name:
- raise LintError("EndTag (%(end)s) does not match StartTag (%(start)s)" % {"end": name, "start": start_name})
- contentModelFlag = "PCDATA"
-
- elif type == "Comment":
- if contentModelFlag != "PCDATA":
- raise LintError("Comment not in PCDATA content model flag")
-
- elif type in ("Characters", "SpaceCharacters"):
- data = token["data"]
- if not isinstance(data, str):
- raise LintError("Attribute name is not a string: %(name)r" % {"name": data})
- if not data:
- raise LintError("%(type)s token with empty data" % {"type": type})
- if type == "SpaceCharacters":
- data = data.strip(spaceCharacters)
- if data:
- raise LintError("Non-space character(s) found in SpaceCharacters token: %(token)r" % {"token": data})
-
- elif type == "Doctype":
- name = token["name"]
- if contentModelFlag != "PCDATA":
- raise LintError("Doctype not in PCDATA content model flag: %(name)s" % {"name": name})
- if not isinstance(name, str):
- raise LintError("Tag name is not a string: %(tag)r" % {"tag": name})
- # XXX: what to do with token["data"] ?
-
- elif type in ("ParseError", "SerializeError"):
- pass
-
- else:
- raise LintError("Unknown token type: %(type)s" % {"type": type})
-
- yield token
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/optionaltags.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/optionaltags.py
deleted file mode 100644
index fefe0b3097b..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/optionaltags.py
+++ /dev/null
@@ -1,205 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from . import _base
-
-
-class Filter(_base.Filter):
- def slider(self):
- previous1 = previous2 = None
- for token in self.source:
- if previous1 is not None:
- yield previous2, previous1, token
- previous2 = previous1
- previous1 = token
- yield previous2, previous1, None
-
- def __iter__(self):
- for previous, token, next in self.slider():
- type = token["type"]
- if type == "StartTag":
- if (token["data"] or
- not self.is_optional_start(token["name"], previous, next)):
- yield token
- elif type == "EndTag":
- if not self.is_optional_end(token["name"], next):
- yield token
- else:
- yield token
-
- def is_optional_start(self, tagname, previous, next):
- type = next and next["type"] or None
- if tagname in 'html':
- # An html element's start tag may be omitted if the first thing
- # inside the html element is not a space character or a comment.
- return type not in ("Comment", "SpaceCharacters")
- elif tagname == 'head':
- # A head element's start tag may be omitted if the first thing
- # inside the head element is an element.
- # XXX: we also omit the start tag if the head element is empty
- if type in ("StartTag", "EmptyTag"):
- return True
- elif type == "EndTag":
- return next["name"] == "head"
- elif tagname == 'body':
- # A body element's start tag may be omitted if the first thing
- # inside the body element is not a space character or a comment,
- # except if the first thing inside the body element is a script
- # or style element and the node immediately preceding the body
- # element is a head element whose end tag has been omitted.
- if type in ("Comment", "SpaceCharacters"):
- return False
- elif type == "StartTag":
- # XXX: we do not look at the preceding event, so we never omit
- # the body element's start tag if it's followed by a script or
- # a style element.
- return next["name"] not in ('script', 'style')
- else:
- return True
- elif tagname == 'colgroup':
- # A colgroup element's start tag may be omitted if the first thing
- # inside the colgroup element is a col element, and if the element
- # is not immediately preceeded by another colgroup element whose
- # end tag has been omitted.
- if type in ("StartTag", "EmptyTag"):
- # XXX: we do not look at the preceding event, so instead we never
- # omit the colgroup element's end tag when it is immediately
- # followed by another colgroup element. See is_optional_end.
- return next["name"] == "col"
- else:
- return False
- elif tagname == 'tbody':
- # A tbody element's start tag may be omitted if the first thing
- # inside the tbody element is a tr element, and if the element is
- # not immediately preceeded by a tbody, thead, or tfoot element
- # whose end tag has been omitted.
- if type == "StartTag":
- # omit the thead and tfoot elements' end tag when they are
- # immediately followed by a tbody element. See is_optional_end.
- if previous and previous['type'] == 'EndTag' and \
- previous['name'] in ('tbody', 'thead', 'tfoot'):
- return False
- return next["name"] == 'tr'
- else:
- return False
- return False
-
- def is_optional_end(self, tagname, next):
- type = next and next["type"] or None
- if tagname in ('html', 'head', 'body'):
- # An html element's end tag may be omitted if the html element
- # is not immediately followed by a space character or a comment.
- return type not in ("Comment", "SpaceCharacters")
- elif tagname in ('li', 'optgroup', 'tr'):
- # A li element's end tag may be omitted if the li element is
- # immediately followed by another li element or if there is
- # no more content in the parent element.
- # An optgroup element's end tag may be omitted if the optgroup
- # element is immediately followed by another optgroup element,
- # or if there is no more content in the parent element.
- # A tr element's end tag may be omitted if the tr element is
- # immediately followed by another tr element, or if there is
- # no more content in the parent element.
- if type == "StartTag":
- return next["name"] == tagname
- else:
- return type == "EndTag" or type is None
- elif tagname in ('dt', 'dd'):
- # A dt element's end tag may be omitted if the dt element is
- # immediately followed by another dt element or a dd element.
- # A dd element's end tag may be omitted if the dd element is
- # immediately followed by another dd element or a dt element,
- # or if there is no more content in the parent element.
- if type == "StartTag":
- return next["name"] in ('dt', 'dd')
- elif tagname == 'dd':
- return type == "EndTag" or type is None
- else:
- return False
- elif tagname == 'p':
- # A p element's end tag may be omitted if the p element is
- # immediately followed by an address, article, aside,
- # blockquote, datagrid, dialog, dir, div, dl, fieldset,
- # footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu,
- # nav, ol, p, pre, section, table, or ul, element, or if
- # there is no more content in the parent element.
- if type in ("StartTag", "EmptyTag"):
- return next["name"] in ('address', 'article', 'aside',
- 'blockquote', 'datagrid', 'dialog',
- 'dir', 'div', 'dl', 'fieldset', 'footer',
- 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
- 'header', 'hr', 'menu', 'nav', 'ol',
- 'p', 'pre', 'section', 'table', 'ul')
- else:
- return type == "EndTag" or type is None
- elif tagname == 'option':
- # An option element's end tag may be omitted if the option
- # element is immediately followed by another option element,
- # or if it is immediately followed by an <code>optgroup</code>
- # element, or if there is no more content in the parent
- # element.
- if type == "StartTag":
- return next["name"] in ('option', 'optgroup')
- else:
- return type == "EndTag" or type is None
- elif tagname in ('rt', 'rp'):
- # An rt element's end tag may be omitted if the rt element is
- # immediately followed by an rt or rp element, or if there is
- # no more content in the parent element.
- # An rp element's end tag may be omitted if the rp element is
- # immediately followed by an rt or rp element, or if there is
- # no more content in the parent element.
- if type == "StartTag":
- return next["name"] in ('rt', 'rp')
- else:
- return type == "EndTag" or type is None
- elif tagname == 'colgroup':
- # A colgroup element's end tag may be omitted if the colgroup
- # element is not immediately followed by a space character or
- # a comment.
- if type in ("Comment", "SpaceCharacters"):
- return False
- elif type == "StartTag":
- # XXX: we also look for an immediately following colgroup
- # element. See is_optional_start.
- return next["name"] != 'colgroup'
- else:
- return True
- elif tagname in ('thead', 'tbody'):
- # A thead element's end tag may be omitted if the thead element
- # is immediately followed by a tbody or tfoot element.
- # A tbody element's end tag may be omitted if the tbody element
- # is immediately followed by a tbody or tfoot element, or if
- # there is no more content in the parent element.
- # A tfoot element's end tag may be omitted if the tfoot element
- # is immediately followed by a tbody element, or if there is no
- # more content in the parent element.
- # XXX: we never omit the end tag when the following element is
- # a tbody. See is_optional_start.
- if type == "StartTag":
- return next["name"] in ['tbody', 'tfoot']
- elif tagname == 'tbody':
- return type == "EndTag" or type is None
- else:
- return False
- elif tagname == 'tfoot':
- # A tfoot element's end tag may be omitted if the tfoot element
- # is immediately followed by a tbody element, or if there is no
- # more content in the parent element.
- # XXX: we never omit the end tag when the following element is
- # a tbody. See is_optional_start.
- if type == "StartTag":
- return next["name"] == 'tbody'
- else:
- return type == "EndTag" or type is None
- elif tagname in ('td', 'th'):
- # A td element's end tag may be omitted if the td element is
- # immediately followed by a td or th element, or if there is
- # no more content in the parent element.
- # A th element's end tag may be omitted if the th element is
- # immediately followed by a td or th element, or if there is
- # no more content in the parent element.
- if type == "StartTag":
- return next["name"] in ('td', 'th')
- else:
- return type == "EndTag" or type is None
- return False
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/sanitizer.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/sanitizer.py
deleted file mode 100644
index b206b54e7a7..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/sanitizer.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from . import _base
-from ..sanitizer import HTMLSanitizerMixin
-
-
-class Filter(_base.Filter, HTMLSanitizerMixin):
- def __iter__(self):
- for token in _base.Filter.__iter__(self):
- token = self.sanitize_token(token)
- if token:
- yield token
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/whitespace.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/whitespace.py
deleted file mode 100644
index dfc60eebd35..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/filters/whitespace.py
+++ /dev/null
@@ -1,38 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-import re
-
-from . import _base
-from ..constants import rcdataElements, spaceCharacters
-spaceCharacters = "".join(spaceCharacters)
-
-SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)
-
-
-class Filter(_base.Filter):
-
- spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements))
-
- def __iter__(self):
- preserve = 0
- for token in _base.Filter.__iter__(self):
- type = token["type"]
- if type == "StartTag" \
- and (preserve or token["name"] in self.spacePreserveElements):
- preserve += 1
-
- elif type == "EndTag" and preserve:
- preserve -= 1
-
- elif not preserve and type == "SpaceCharacters" and token["data"]:
- # Test on token["data"] above to not introduce spaces where there were not
- token["data"] = " "
-
- elif not preserve and type == "Characters":
- token["data"] = collapse_spaces(token["data"])
-
- yield token
-
-
-def collapse_spaces(text):
- return SPACES_REGEX.sub(' ', text)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/html5parser.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/html5parser.py
deleted file mode 100644
index 12aa6a35e1a..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/html5parser.py
+++ /dev/null
@@ -1,2724 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import with_metaclass
-
-import types
-
-from . import inputstream
-from . import tokenizer
-
-from . import treebuilders
-from .treebuilders._base import Marker
-
-from . import utils
-from . import constants
-from .constants import spaceCharacters, asciiUpper2Lower
-from .constants import specialElements
-from .constants import headingElements
-from .constants import cdataElements, rcdataElements
-from .constants import tokenTypes, ReparseException, namespaces
-from .constants import htmlIntegrationPointElements, mathmlTextIntegrationPointElements
-from .constants import adjustForeignAttributes as adjustForeignAttributesMap
-from .constants import E
-
-
-def parse(doc, treebuilder="etree", encoding=None,
- namespaceHTMLElements=True):
- """Parse a string or file-like object into a tree"""
- tb = treebuilders.getTreeBuilder(treebuilder)
- p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
- return p.parse(doc, encoding=encoding)
-
-
-def parseFragment(doc, container="div", treebuilder="etree", encoding=None,
- namespaceHTMLElements=True):
- tb = treebuilders.getTreeBuilder(treebuilder)
- p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements)
- return p.parseFragment(doc, container=container, encoding=encoding)
-
-
-def method_decorator_metaclass(function):
- class Decorated(type):
- def __new__(meta, classname, bases, classDict):
- for attributeName, attribute in classDict.items():
- if isinstance(attribute, types.FunctionType):
- attribute = function(attribute)
-
- classDict[attributeName] = attribute
- return type.__new__(meta, classname, bases, classDict)
- return Decorated
-
-
-class HTMLParser(object):
- """HTML parser. Generates a tree structure from a stream of (possibly
- malformed) HTML"""
-
- def __init__(self, tree=None, tokenizer=tokenizer.HTMLTokenizer,
- strict=False, namespaceHTMLElements=True, debug=False):
- """
- strict - raise an exception when a parse error is encountered
-
- tree - a treebuilder class controlling the type of tree that will be
- returned. Built in treebuilders can be accessed through
- html5lib.treebuilders.getTreeBuilder(treeType)
-
- tokenizer - a class that provides a stream of tokens to the treebuilder.
- This may be replaced for e.g. a sanitizer which converts some tags to
- text
- """
-
- # Raise an exception on the first error encountered
- self.strict = strict
-
- if tree is None:
- tree = treebuilders.getTreeBuilder("etree")
- self.tree = tree(namespaceHTMLElements)
- self.tokenizer_class = tokenizer
- self.errors = []
-
- self.phases = dict([(name, cls(self, self.tree)) for name, cls in
- getPhases(debug).items()])
-
- def _parse(self, stream, innerHTML=False, container="div",
- encoding=None, parseMeta=True, useChardet=True, **kwargs):
-
- self.innerHTMLMode = innerHTML
- self.container = container
- self.tokenizer = self.tokenizer_class(stream, encoding=encoding,
- parseMeta=parseMeta,
- useChardet=useChardet,
- parser=self, **kwargs)
- self.reset()
-
- while True:
- try:
- self.mainLoop()
- break
- except ReparseException:
- self.reset()
-
- def reset(self):
- self.tree.reset()
- self.firstStartTag = False
- self.errors = []
- self.log = [] # only used with debug mode
- # "quirks" / "limited quirks" / "no quirks"
- self.compatMode = "no quirks"
-
- if self.innerHTMLMode:
- self.innerHTML = self.container.lower()
-
- if self.innerHTML in cdataElements:
- self.tokenizer.state = self.tokenizer.rcdataState
- elif self.innerHTML in rcdataElements:
- self.tokenizer.state = self.tokenizer.rawtextState
- elif self.innerHTML == 'plaintext':
- self.tokenizer.state = self.tokenizer.plaintextState
- else:
- # state already is data state
- # self.tokenizer.state = self.tokenizer.dataState
- pass
- self.phase = self.phases["beforeHtml"]
- self.phase.insertHtmlElement()
- self.resetInsertionMode()
- else:
- self.innerHTML = False
- self.phase = self.phases["initial"]
-
- self.lastPhase = None
-
- self.beforeRCDataPhase = None
-
- self.framesetOK = True
-
- @property
- def documentEncoding(self):
- """The name of the character encoding
- that was used to decode the input stream,
- or :obj:`None` if that is not determined yet.
-
- """
- if not hasattr(self, 'tokenizer'):
- return None
- return self.tokenizer.stream.charEncoding[0]
-
- def isHTMLIntegrationPoint(self, element):
- if (element.name == "annotation-xml" and
- element.namespace == namespaces["mathml"]):
- return ("encoding" in element.attributes and
- element.attributes["encoding"].translate(
- asciiUpper2Lower) in
- ("text/html", "application/xhtml+xml"))
- else:
- return (element.namespace, element.name) in htmlIntegrationPointElements
-
- def isMathMLTextIntegrationPoint(self, element):
- return (element.namespace, element.name) in mathmlTextIntegrationPointElements
-
- def mainLoop(self):
- CharactersToken = tokenTypes["Characters"]
- SpaceCharactersToken = tokenTypes["SpaceCharacters"]
- StartTagToken = tokenTypes["StartTag"]
- EndTagToken = tokenTypes["EndTag"]
- CommentToken = tokenTypes["Comment"]
- DoctypeToken = tokenTypes["Doctype"]
- ParseErrorToken = tokenTypes["ParseError"]
-
- for token in self.normalizedTokens():
- new_token = token
- while new_token is not None:
- currentNode = self.tree.openElements[-1] if self.tree.openElements else None
- currentNodeNamespace = currentNode.namespace if currentNode else None
- currentNodeName = currentNode.name if currentNode else None
-
- type = new_token["type"]
-
- if type == ParseErrorToken:
- self.parseError(new_token["data"], new_token.get("datavars", {}))
- new_token = None
- else:
- if (len(self.tree.openElements) == 0 or
- currentNodeNamespace == self.tree.defaultNamespace or
- (self.isMathMLTextIntegrationPoint(currentNode) and
- ((type == StartTagToken and
- token["name"] not in frozenset(["mglyph", "malignmark"])) or
- type in (CharactersToken, SpaceCharactersToken))) or
- (currentNodeNamespace == namespaces["mathml"] and
- currentNodeName == "annotation-xml" and
- token["name"] == "svg") or
- (self.isHTMLIntegrationPoint(currentNode) and
- type in (StartTagToken, CharactersToken, SpaceCharactersToken))):
- phase = self.phase
- else:
- phase = self.phases["inForeignContent"]
-
- if type == CharactersToken:
- new_token = phase.processCharacters(new_token)
- elif type == SpaceCharactersToken:
- new_token = phase.processSpaceCharacters(new_token)
- elif type == StartTagToken:
- new_token = phase.processStartTag(new_token)
- elif type == EndTagToken:
- new_token = phase.processEndTag(new_token)
- elif type == CommentToken:
- new_token = phase.processComment(new_token)
- elif type == DoctypeToken:
- new_token = phase.processDoctype(new_token)
-
- if (type == StartTagToken and token["selfClosing"]
- and not token["selfClosingAcknowledged"]):
- self.parseError("non-void-element-with-trailing-solidus",
- {"name": token["name"]})
-
- # When the loop finishes it's EOF
- reprocess = True
- phases = []
- while reprocess:
- phases.append(self.phase)
- reprocess = self.phase.processEOF()
- if reprocess:
- assert self.phase not in phases
-
- def normalizedTokens(self):
- for token in self.tokenizer:
- yield self.normalizeToken(token)
-
- def parse(self, stream, encoding=None, parseMeta=True, useChardet=True):
- """Parse a HTML document into a well-formed tree
-
- stream - a filelike object or string containing the HTML to be parsed
-
- The optional encoding parameter must be a string that indicates
- the encoding. If specified, that encoding will be used,
- regardless of any BOM or later declaration (such as in a meta
- element)
- """
- self._parse(stream, innerHTML=False, encoding=encoding,
- parseMeta=parseMeta, useChardet=useChardet)
- return self.tree.getDocument()
-
- def parseFragment(self, stream, container="div", encoding=None,
- parseMeta=False, useChardet=True):
- """Parse a HTML fragment into a well-formed tree fragment
-
- container - name of the element we're setting the innerHTML property
- if set to None, default to 'div'
-
- stream - a filelike object or string containing the HTML to be parsed
-
- The optional encoding parameter must be a string that indicates
- the encoding. If specified, that encoding will be used,
- regardless of any BOM or later declaration (such as in a meta
- element)
- """
- self._parse(stream, True, container=container, encoding=encoding)
- return self.tree.getFragment()
-
- def parseError(self, errorcode="XXX-undefined-error", datavars={}):
- # XXX The idea is to make errorcode mandatory.
- self.errors.append((self.tokenizer.stream.position(), errorcode, datavars))
- if self.strict:
- raise ParseError(E[errorcode] % datavars)
-
- def normalizeToken(self, token):
- """ HTML5 specific normalizations to the token stream """
-
- if token["type"] == tokenTypes["StartTag"]:
- token["data"] = dict(token["data"][::-1])
-
- return token
-
- def adjustMathMLAttributes(self, token):
- replacements = {"definitionurl": "definitionURL"}
- for k, v in replacements.items():
- if k in token["data"]:
- token["data"][v] = token["data"][k]
- del token["data"][k]
-
- def adjustSVGAttributes(self, token):
- replacements = {
- "attributename": "attributeName",
- "attributetype": "attributeType",
- "basefrequency": "baseFrequency",
- "baseprofile": "baseProfile",
- "calcmode": "calcMode",
- "clippathunits": "clipPathUnits",
- "contentscripttype": "contentScriptType",
- "contentstyletype": "contentStyleType",
- "diffuseconstant": "diffuseConstant",
- "edgemode": "edgeMode",
- "externalresourcesrequired": "externalResourcesRequired",
- "filterres": "filterRes",
- "filterunits": "filterUnits",
- "glyphref": "glyphRef",
- "gradienttransform": "gradientTransform",
- "gradientunits": "gradientUnits",
- "kernelmatrix": "kernelMatrix",
- "kernelunitlength": "kernelUnitLength",
- "keypoints": "keyPoints",
- "keysplines": "keySplines",
- "keytimes": "keyTimes",
- "lengthadjust": "lengthAdjust",
- "limitingconeangle": "limitingConeAngle",
- "markerheight": "markerHeight",
- "markerunits": "markerUnits",
- "markerwidth": "markerWidth",
- "maskcontentunits": "maskContentUnits",
- "maskunits": "maskUnits",
- "numoctaves": "numOctaves",
- "pathlength": "pathLength",
- "patterncontentunits": "patternContentUnits",
- "patterntransform": "patternTransform",
- "patternunits": "patternUnits",
- "pointsatx": "pointsAtX",
- "pointsaty": "pointsAtY",
- "pointsatz": "pointsAtZ",
- "preservealpha": "preserveAlpha",
- "preserveaspectratio": "preserveAspectRatio",
- "primitiveunits": "primitiveUnits",
- "refx": "refX",
- "refy": "refY",
- "repeatcount": "repeatCount",
- "repeatdur": "repeatDur",
- "requiredextensions": "requiredExtensions",
- "requiredfeatures": "requiredFeatures",
- "specularconstant": "specularConstant",
- "specularexponent": "specularExponent",
- "spreadmethod": "spreadMethod",
- "startoffset": "startOffset",
- "stddeviation": "stdDeviation",
- "stitchtiles": "stitchTiles",
- "surfacescale": "surfaceScale",
- "systemlanguage": "systemLanguage",
- "tablevalues": "tableValues",
- "targetx": "targetX",
- "targety": "targetY",
- "textlength": "textLength",
- "viewbox": "viewBox",
- "viewtarget": "viewTarget",
- "xchannelselector": "xChannelSelector",
- "ychannelselector": "yChannelSelector",
- "zoomandpan": "zoomAndPan"
- }
- for originalName in list(token["data"].keys()):
- if originalName in replacements:
- svgName = replacements[originalName]
- token["data"][svgName] = token["data"][originalName]
- del token["data"][originalName]
-
- def adjustForeignAttributes(self, token):
- replacements = adjustForeignAttributesMap
-
- for originalName in token["data"].keys():
- if originalName in replacements:
- foreignName = replacements[originalName]
- token["data"][foreignName] = token["data"][originalName]
- del token["data"][originalName]
-
- def reparseTokenNormal(self, token):
- self.parser.phase()
-
- def resetInsertionMode(self):
- # The name of this method is mostly historical. (It's also used in the
- # specification.)
- last = False
- newModes = {
- "select": "inSelect",
- "td": "inCell",
- "th": "inCell",
- "tr": "inRow",
- "tbody": "inTableBody",
- "thead": "inTableBody",
- "tfoot": "inTableBody",
- "caption": "inCaption",
- "colgroup": "inColumnGroup",
- "table": "inTable",
- "head": "inBody",
- "body": "inBody",
- "frameset": "inFrameset",
- "html": "beforeHead"
- }
- for node in self.tree.openElements[::-1]:
- nodeName = node.name
- new_phase = None
- if node == self.tree.openElements[0]:
- assert self.innerHTML
- last = True
- nodeName = self.innerHTML
- # Check for conditions that should only happen in the innerHTML
- # case
- if nodeName in ("select", "colgroup", "head", "html"):
- assert self.innerHTML
-
- if not last and node.namespace != self.tree.defaultNamespace:
- continue
-
- if nodeName in newModes:
- new_phase = self.phases[newModes[nodeName]]
- break
- elif last:
- new_phase = self.phases["inBody"]
- break
-
- self.phase = new_phase
-
- def parseRCDataRawtext(self, token, contentType):
- """Generic RCDATA/RAWTEXT Parsing algorithm
- contentType - RCDATA or RAWTEXT
- """
- assert contentType in ("RAWTEXT", "RCDATA")
-
- self.tree.insertElement(token)
-
- if contentType == "RAWTEXT":
- self.tokenizer.state = self.tokenizer.rawtextState
- else:
- self.tokenizer.state = self.tokenizer.rcdataState
-
- self.originalPhase = self.phase
-
- self.phase = self.phases["text"]
-
-
-def getPhases(debug):
- def log(function):
- """Logger that records which phase processes each token"""
- type_names = dict((value, key) for key, value in
- constants.tokenTypes.items())
-
- def wrapped(self, *args, **kwargs):
- if function.__name__.startswith("process") and len(args) > 0:
- token = args[0]
- try:
- info = {"type": type_names[token['type']]}
- except:
- raise
- if token['type'] in constants.tagTokenTypes:
- info["name"] = token['name']
-
- self.parser.log.append((self.parser.tokenizer.state.__name__,
- self.parser.phase.__class__.__name__,
- self.__class__.__name__,
- function.__name__,
- info))
- return function(self, *args, **kwargs)
- else:
- return function(self, *args, **kwargs)
- return wrapped
-
- def getMetaclass(use_metaclass, metaclass_func):
- if use_metaclass:
- return method_decorator_metaclass(metaclass_func)
- else:
- return type
-
- class Phase(with_metaclass(getMetaclass(debug, log))):
- """Base class for helper object that implements each phase of processing
- """
-
- def __init__(self, parser, tree):
- self.parser = parser
- self.tree = tree
-
- def processEOF(self):
- raise NotImplementedError
-
- def processComment(self, token):
- # For most phases the following is correct. Where it's not it will be
- # overridden.
- self.tree.insertComment(token, self.tree.openElements[-1])
-
- def processDoctype(self, token):
- self.parser.parseError("unexpected-doctype")
-
- def processCharacters(self, token):
- self.tree.insertText(token["data"])
-
- def processSpaceCharacters(self, token):
- self.tree.insertText(token["data"])
-
- def processStartTag(self, token):
- return self.startTagHandler[token["name"]](token)
-
- def startTagHtml(self, token):
- if not self.parser.firstStartTag and token["name"] == "html":
- self.parser.parseError("non-html-root")
- # XXX Need a check here to see if the first start tag token emitted is
- # this token... If it's not, invoke self.parser.parseError().
- for attr, value in token["data"].items():
- if attr not in self.tree.openElements[0].attributes:
- self.tree.openElements[0].attributes[attr] = value
- self.parser.firstStartTag = False
-
- def processEndTag(self, token):
- return self.endTagHandler[token["name"]](token)
-
- class InitialPhase(Phase):
- def processSpaceCharacters(self, token):
- pass
-
- def processComment(self, token):
- self.tree.insertComment(token, self.tree.document)
-
- def processDoctype(self, token):
- name = token["name"]
- publicId = token["publicId"]
- systemId = token["systemId"]
- correct = token["correct"]
-
- if (name != "html" or publicId is not None or
- systemId is not None and systemId != "about:legacy-compat"):
- self.parser.parseError("unknown-doctype")
-
- if publicId is None:
- publicId = ""
-
- self.tree.insertDoctype(token)
-
- if publicId != "":
- publicId = publicId.translate(asciiUpper2Lower)
-
- if (not correct or token["name"] != "html"
- or publicId.startswith(
- ("+//silmaril//dtd html pro v0r11 19970101//",
- "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
- "-//as//dtd html 3.0 aswedit + extensions//",
- "-//ietf//dtd html 2.0 level 1//",
- "-//ietf//dtd html 2.0 level 2//",
- "-//ietf//dtd html 2.0 strict level 1//",
- "-//ietf//dtd html 2.0 strict level 2//",
- "-//ietf//dtd html 2.0 strict//",
- "-//ietf//dtd html 2.0//",
- "-//ietf//dtd html 2.1e//",
- "-//ietf//dtd html 3.0//",
- "-//ietf//dtd html 3.2 final//",
- "-//ietf//dtd html 3.2//",
- "-//ietf//dtd html 3//",
- "-//ietf//dtd html level 0//",
- "-//ietf//dtd html level 1//",
- "-//ietf//dtd html level 2//",
- "-//ietf//dtd html level 3//",
- "-//ietf//dtd html strict level 0//",
- "-//ietf//dtd html strict level 1//",
- "-//ietf//dtd html strict level 2//",
- "-//ietf//dtd html strict level 3//",
- "-//ietf//dtd html strict//",
- "-//ietf//dtd html//",
- "-//metrius//dtd metrius presentational//",
- "-//microsoft//dtd internet explorer 2.0 html strict//",
- "-//microsoft//dtd internet explorer 2.0 html//",
- "-//microsoft//dtd internet explorer 2.0 tables//",
- "-//microsoft//dtd internet explorer 3.0 html strict//",
- "-//microsoft//dtd internet explorer 3.0 html//",
- "-//microsoft//dtd internet explorer 3.0 tables//",
- "-//netscape comm. corp.//dtd html//",
- "-//netscape comm. corp.//dtd strict html//",
- "-//o'reilly and associates//dtd html 2.0//",
- "-//o'reilly and associates//dtd html extended 1.0//",
- "-//o'reilly and associates//dtd html extended relaxed 1.0//",
- "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//",
- "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//",
- "-//spyglass//dtd html 2.0 extended//",
- "-//sq//dtd html 2.0 hotmetal + extensions//",
- "-//sun microsystems corp.//dtd hotjava html//",
- "-//sun microsystems corp.//dtd hotjava strict html//",
- "-//w3c//dtd html 3 1995-03-24//",
- "-//w3c//dtd html 3.2 draft//",
- "-//w3c//dtd html 3.2 final//",
- "-//w3c//dtd html 3.2//",
- "-//w3c//dtd html 3.2s draft//",
- "-//w3c//dtd html 4.0 frameset//",
- "-//w3c//dtd html 4.0 transitional//",
- "-//w3c//dtd html experimental 19960712//",
- "-//w3c//dtd html experimental 970421//",
- "-//w3c//dtd w3 html//",
- "-//w3o//dtd w3 html 3.0//",
- "-//webtechs//dtd mozilla html 2.0//",
- "-//webtechs//dtd mozilla html//"))
- or publicId in
- ("-//w3o//dtd w3 html strict 3.0//en//",
- "-/w3c/dtd html 4.0 transitional/en",
- "html")
- or publicId.startswith(
- ("-//w3c//dtd html 4.01 frameset//",
- "-//w3c//dtd html 4.01 transitional//")) and
- systemId is None
- or systemId and systemId.lower() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"):
- self.parser.compatMode = "quirks"
- elif (publicId.startswith(
- ("-//w3c//dtd xhtml 1.0 frameset//",
- "-//w3c//dtd xhtml 1.0 transitional//"))
- or publicId.startswith(
- ("-//w3c//dtd html 4.01 frameset//",
- "-//w3c//dtd html 4.01 transitional//")) and
- systemId is not None):
- self.parser.compatMode = "limited quirks"
-
- self.parser.phase = self.parser.phases["beforeHtml"]
-
- def anythingElse(self):
- self.parser.compatMode = "quirks"
- self.parser.phase = self.parser.phases["beforeHtml"]
-
- def processCharacters(self, token):
- self.parser.parseError("expected-doctype-but-got-chars")
- self.anythingElse()
- return token
-
- def processStartTag(self, token):
- self.parser.parseError("expected-doctype-but-got-start-tag",
- {"name": token["name"]})
- self.anythingElse()
- return token
-
- def processEndTag(self, token):
- self.parser.parseError("expected-doctype-but-got-end-tag",
- {"name": token["name"]})
- self.anythingElse()
- return token
-
- def processEOF(self):
- self.parser.parseError("expected-doctype-but-got-eof")
- self.anythingElse()
- return True
-
- class BeforeHtmlPhase(Phase):
- # helper methods
- def insertHtmlElement(self):
- self.tree.insertRoot(impliedTagToken("html", "StartTag"))
- self.parser.phase = self.parser.phases["beforeHead"]
-
- # other
- def processEOF(self):
- self.insertHtmlElement()
- return True
-
- def processComment(self, token):
- self.tree.insertComment(token, self.tree.document)
-
- def processSpaceCharacters(self, token):
- pass
-
- def processCharacters(self, token):
- self.insertHtmlElement()
- return token
-
- def processStartTag(self, token):
- if token["name"] == "html":
- self.parser.firstStartTag = True
- self.insertHtmlElement()
- return token
-
- def processEndTag(self, token):
- if token["name"] not in ("head", "body", "html", "br"):
- self.parser.parseError("unexpected-end-tag-before-html",
- {"name": token["name"]})
- else:
- self.insertHtmlElement()
- return token
-
- class BeforeHeadPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("head", self.startTagHead)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- (("head", "body", "html", "br"), self.endTagImplyHead)
- ])
- self.endTagHandler.default = self.endTagOther
-
- def processEOF(self):
- self.startTagHead(impliedTagToken("head", "StartTag"))
- return True
-
- def processSpaceCharacters(self, token):
- pass
-
- def processCharacters(self, token):
- self.startTagHead(impliedTagToken("head", "StartTag"))
- return token
-
- def startTagHtml(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagHead(self, token):
- self.tree.insertElement(token)
- self.tree.headPointer = self.tree.openElements[-1]
- self.parser.phase = self.parser.phases["inHead"]
-
- def startTagOther(self, token):
- self.startTagHead(impliedTagToken("head", "StartTag"))
- return token
-
- def endTagImplyHead(self, token):
- self.startTagHead(impliedTagToken("head", "StartTag"))
- return token
-
- def endTagOther(self, token):
- self.parser.parseError("end-tag-after-implied-root",
- {"name": token["name"]})
-
- class InHeadPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("title", self.startTagTitle),
- (("noscript", "noframes", "style"), self.startTagNoScriptNoFramesStyle),
- ("script", self.startTagScript),
- (("base", "basefont", "bgsound", "command", "link"),
- self.startTagBaseLinkCommand),
- ("meta", self.startTagMeta),
- ("head", self.startTagHead)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self. endTagHandler = utils.MethodDispatcher([
- ("head", self.endTagHead),
- (("br", "html", "body"), self.endTagHtmlBodyBr)
- ])
- self.endTagHandler.default = self.endTagOther
-
- # the real thing
- def processEOF(self):
- self.anythingElse()
- return True
-
- def processCharacters(self, token):
- self.anythingElse()
- return token
-
- def startTagHtml(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagHead(self, token):
- self.parser.parseError("two-heads-are-not-better-than-one")
-
- def startTagBaseLinkCommand(self, token):
- self.tree.insertElement(token)
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
-
- def startTagMeta(self, token):
- self.tree.insertElement(token)
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
-
- attributes = token["data"]
- if self.parser.tokenizer.stream.charEncoding[1] == "tentative":
- if "charset" in attributes:
- self.parser.tokenizer.stream.changeEncoding(attributes["charset"])
- elif ("content" in attributes and
- "http-equiv" in attributes and
- attributes["http-equiv"].lower() == "content-type"):
- # Encoding it as UTF-8 here is a hack, as really we should pass
- # the abstract Unicode string, and just use the
- # ContentAttrParser on that, but using UTF-8 allows all chars
- # to be encoded and as a ASCII-superset works.
- data = inputstream.EncodingBytes(attributes["content"].encode("utf-8"))
- parser = inputstream.ContentAttrParser(data)
- codec = parser.parse()
- self.parser.tokenizer.stream.changeEncoding(codec)
-
- def startTagTitle(self, token):
- self.parser.parseRCDataRawtext(token, "RCDATA")
-
- def startTagNoScriptNoFramesStyle(self, token):
- # Need to decide whether to implement the scripting-disabled case
- self.parser.parseRCDataRawtext(token, "RAWTEXT")
-
- def startTagScript(self, token):
- self.tree.insertElement(token)
- self.parser.tokenizer.state = self.parser.tokenizer.scriptDataState
- self.parser.originalPhase = self.parser.phase
- self.parser.phase = self.parser.phases["text"]
-
- def startTagOther(self, token):
- self.anythingElse()
- return token
-
- def endTagHead(self, token):
- node = self.parser.tree.openElements.pop()
- assert node.name == "head", "Expected head got %s" % node.name
- self.parser.phase = self.parser.phases["afterHead"]
-
- def endTagHtmlBodyBr(self, token):
- self.anythingElse()
- return token
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- def anythingElse(self):
- self.endTagHead(impliedTagToken("head"))
-
- # XXX If we implement a parser for which scripting is disabled we need to
- # implement this phase.
- #
- # class InHeadNoScriptPhase(Phase):
- class AfterHeadPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("body", self.startTagBody),
- ("frameset", self.startTagFrameset),
- (("base", "basefont", "bgsound", "link", "meta", "noframes", "script",
- "style", "title"),
- self.startTagFromHead),
- ("head", self.startTagHead)
- ])
- self.startTagHandler.default = self.startTagOther
- self.endTagHandler = utils.MethodDispatcher([(("body", "html", "br"),
- self.endTagHtmlBodyBr)])
- self.endTagHandler.default = self.endTagOther
-
- def processEOF(self):
- self.anythingElse()
- return True
-
- def processCharacters(self, token):
- self.anythingElse()
- return token
-
- def startTagHtml(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagBody(self, token):
- self.parser.framesetOK = False
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inBody"]
-
- def startTagFrameset(self, token):
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inFrameset"]
-
- def startTagFromHead(self, token):
- self.parser.parseError("unexpected-start-tag-out-of-my-head",
- {"name": token["name"]})
- self.tree.openElements.append(self.tree.headPointer)
- self.parser.phases["inHead"].processStartTag(token)
- for node in self.tree.openElements[::-1]:
- if node.name == "head":
- self.tree.openElements.remove(node)
- break
-
- def startTagHead(self, token):
- self.parser.parseError("unexpected-start-tag", {"name": token["name"]})
-
- def startTagOther(self, token):
- self.anythingElse()
- return token
-
- def endTagHtmlBodyBr(self, token):
- self.anythingElse()
- return token
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- def anythingElse(self):
- self.tree.insertElement(impliedTagToken("body", "StartTag"))
- self.parser.phase = self.parser.phases["inBody"]
- self.parser.framesetOK = True
-
- class InBodyPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-inbody
- # the really-really-really-very crazy mode
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- # Keep a ref to this for special handling of whitespace in <pre>
- self.processSpaceCharactersNonPre = self.processSpaceCharacters
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- (("base", "basefont", "bgsound", "command", "link", "meta",
- "script", "style", "title"),
- self.startTagProcessInHead),
- ("body", self.startTagBody),
- ("frameset", self.startTagFrameset),
- (("address", "article", "aside", "blockquote", "center", "details",
- "details", "dir", "div", "dl", "fieldset", "figcaption", "figure",
- "footer", "header", "hgroup", "main", "menu", "nav", "ol", "p",
- "section", "summary", "ul"),
- self.startTagCloseP),
- (headingElements, self.startTagHeading),
- (("pre", "listing"), self.startTagPreListing),
- ("form", self.startTagForm),
- (("li", "dd", "dt"), self.startTagListItem),
- ("plaintext", self.startTagPlaintext),
- ("a", self.startTagA),
- (("b", "big", "code", "em", "font", "i", "s", "small", "strike",
- "strong", "tt", "u"), self.startTagFormatting),
- ("nobr", self.startTagNobr),
- ("button", self.startTagButton),
- (("applet", "marquee", "object"), self.startTagAppletMarqueeObject),
- ("xmp", self.startTagXmp),
- ("table", self.startTagTable),
- (("area", "br", "embed", "img", "keygen", "wbr"),
- self.startTagVoidFormatting),
- (("param", "source", "track"), self.startTagParamSource),
- ("input", self.startTagInput),
- ("hr", self.startTagHr),
- ("image", self.startTagImage),
- ("isindex", self.startTagIsIndex),
- ("textarea", self.startTagTextarea),
- ("iframe", self.startTagIFrame),
- (("noembed", "noframes", "noscript"), self.startTagRawtext),
- ("select", self.startTagSelect),
- (("rp", "rt"), self.startTagRpRt),
- (("option", "optgroup"), self.startTagOpt),
- (("math"), self.startTagMath),
- (("svg"), self.startTagSvg),
- (("caption", "col", "colgroup", "frame", "head",
- "tbody", "td", "tfoot", "th", "thead",
- "tr"), self.startTagMisplaced)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("body", self.endTagBody),
- ("html", self.endTagHtml),
- (("address", "article", "aside", "blockquote", "button", "center",
- "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure",
- "footer", "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre",
- "section", "summary", "ul"), self.endTagBlock),
- ("form", self.endTagForm),
- ("p", self.endTagP),
- (("dd", "dt", "li"), self.endTagListItem),
- (headingElements, self.endTagHeading),
- (("a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small",
- "strike", "strong", "tt", "u"), self.endTagFormatting),
- (("applet", "marquee", "object"), self.endTagAppletMarqueeObject),
- ("br", self.endTagBr),
- ])
- self.endTagHandler.default = self.endTagOther
-
- def isMatchingFormattingElement(self, node1, node2):
- if node1.name != node2.name or node1.namespace != node2.namespace:
- return False
- elif len(node1.attributes) != len(node2.attributes):
- return False
- else:
- attributes1 = sorted(node1.attributes.items())
- attributes2 = sorted(node2.attributes.items())
- for attr1, attr2 in zip(attributes1, attributes2):
- if attr1 != attr2:
- return False
- return True
-
- # helper
- def addFormattingElement(self, token):
- self.tree.insertElement(token)
- element = self.tree.openElements[-1]
-
- matchingElements = []
- for node in self.tree.activeFormattingElements[::-1]:
- if node is Marker:
- break
- elif self.isMatchingFormattingElement(node, element):
- matchingElements.append(node)
-
- assert len(matchingElements) <= 3
- if len(matchingElements) == 3:
- self.tree.activeFormattingElements.remove(matchingElements[-1])
- self.tree.activeFormattingElements.append(element)
-
- # the real deal
- def processEOF(self):
- allowed_elements = frozenset(("dd", "dt", "li", "p", "tbody", "td",
- "tfoot", "th", "thead", "tr", "body",
- "html"))
- for node in self.tree.openElements[::-1]:
- if node.name not in allowed_elements:
- self.parser.parseError("expected-closing-tag-but-got-eof")
- break
- # Stop parsing
-
- def processSpaceCharactersDropNewline(self, token):
- # Sometimes (start of <pre>, <listing>, and <textarea> blocks) we
- # want to drop leading newlines
- data = token["data"]
- self.processSpaceCharacters = self.processSpaceCharactersNonPre
- if (data.startswith("\n") and
- self.tree.openElements[-1].name in ("pre", "listing", "textarea")
- and not self.tree.openElements[-1].hasContent()):
- data = data[1:]
- if data:
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertText(data)
-
- def processCharacters(self, token):
- if token["data"] == "\u0000":
- # The tokenizer should always emit null on its own
- return
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertText(token["data"])
- # This must be bad for performance
- if (self.parser.framesetOK and
- any([char not in spaceCharacters
- for char in token["data"]])):
- self.parser.framesetOK = False
-
- def processSpaceCharacters(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertText(token["data"])
-
- def startTagProcessInHead(self, token):
- return self.parser.phases["inHead"].processStartTag(token)
-
- def startTagBody(self, token):
- self.parser.parseError("unexpected-start-tag", {"name": "body"})
- if (len(self.tree.openElements) == 1
- or self.tree.openElements[1].name != "body"):
- assert self.parser.innerHTML
- else:
- self.parser.framesetOK = False
- for attr, value in token["data"].items():
- if attr not in self.tree.openElements[1].attributes:
- self.tree.openElements[1].attributes[attr] = value
-
- def startTagFrameset(self, token):
- self.parser.parseError("unexpected-start-tag", {"name": "frameset"})
- if (len(self.tree.openElements) == 1 or self.tree.openElements[1].name != "body"):
- assert self.parser.innerHTML
- elif not self.parser.framesetOK:
- pass
- else:
- if self.tree.openElements[1].parent:
- self.tree.openElements[1].parent.removeChild(self.tree.openElements[1])
- while self.tree.openElements[-1].name != "html":
- self.tree.openElements.pop()
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inFrameset"]
-
- def startTagCloseP(self, token):
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- self.tree.insertElement(token)
-
- def startTagPreListing(self, token):
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- self.tree.insertElement(token)
- self.parser.framesetOK = False
- self.processSpaceCharacters = self.processSpaceCharactersDropNewline
-
- def startTagForm(self, token):
- if self.tree.formPointer:
- self.parser.parseError("unexpected-start-tag", {"name": "form"})
- else:
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- self.tree.insertElement(token)
- self.tree.formPointer = self.tree.openElements[-1]
-
- def startTagListItem(self, token):
- self.parser.framesetOK = False
-
- stopNamesMap = {"li": ["li"],
- "dt": ["dt", "dd"],
- "dd": ["dt", "dd"]}
- stopNames = stopNamesMap[token["name"]]
- for node in reversed(self.tree.openElements):
- if node.name in stopNames:
- self.parser.phase.processEndTag(
- impliedTagToken(node.name, "EndTag"))
- break
- if (node.nameTuple in specialElements and
- node.name not in ("address", "div", "p")):
- break
-
- if self.tree.elementInScope("p", variant="button"):
- self.parser.phase.processEndTag(
- impliedTagToken("p", "EndTag"))
-
- self.tree.insertElement(token)
-
- def startTagPlaintext(self, token):
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- self.tree.insertElement(token)
- self.parser.tokenizer.state = self.parser.tokenizer.plaintextState
-
- def startTagHeading(self, token):
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- if self.tree.openElements[-1].name in headingElements:
- self.parser.parseError("unexpected-start-tag", {"name": token["name"]})
- self.tree.openElements.pop()
- self.tree.insertElement(token)
-
- def startTagA(self, token):
- afeAElement = self.tree.elementInActiveFormattingElements("a")
- if afeAElement:
- self.parser.parseError("unexpected-start-tag-implies-end-tag",
- {"startName": "a", "endName": "a"})
- self.endTagFormatting(impliedTagToken("a"))
- if afeAElement in self.tree.openElements:
- self.tree.openElements.remove(afeAElement)
- if afeAElement in self.tree.activeFormattingElements:
- self.tree.activeFormattingElements.remove(afeAElement)
- self.tree.reconstructActiveFormattingElements()
- self.addFormattingElement(token)
-
- def startTagFormatting(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.addFormattingElement(token)
-
- def startTagNobr(self, token):
- self.tree.reconstructActiveFormattingElements()
- if self.tree.elementInScope("nobr"):
- self.parser.parseError("unexpected-start-tag-implies-end-tag",
- {"startName": "nobr", "endName": "nobr"})
- self.processEndTag(impliedTagToken("nobr"))
- # XXX Need tests that trigger the following
- self.tree.reconstructActiveFormattingElements()
- self.addFormattingElement(token)
-
- def startTagButton(self, token):
- if self.tree.elementInScope("button"):
- self.parser.parseError("unexpected-start-tag-implies-end-tag",
- {"startName": "button", "endName": "button"})
- self.processEndTag(impliedTagToken("button"))
- return token
- else:
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertElement(token)
- self.parser.framesetOK = False
-
- def startTagAppletMarqueeObject(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertElement(token)
- self.tree.activeFormattingElements.append(Marker)
- self.parser.framesetOK = False
-
- def startTagXmp(self, token):
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- self.tree.reconstructActiveFormattingElements()
- self.parser.framesetOK = False
- self.parser.parseRCDataRawtext(token, "RAWTEXT")
-
- def startTagTable(self, token):
- if self.parser.compatMode != "quirks":
- if self.tree.elementInScope("p", variant="button"):
- self.processEndTag(impliedTagToken("p"))
- self.tree.insertElement(token)
- self.parser.framesetOK = False
- self.parser.phase = self.parser.phases["inTable"]
-
- def startTagVoidFormatting(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertElement(token)
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
- self.parser.framesetOK = False
-
- def startTagInput(self, token):
- framesetOK = self.parser.framesetOK
- self.startTagVoidFormatting(token)
- if ("type" in token["data"] and
- token["data"]["type"].translate(asciiUpper2Lower) == "hidden"):
- # input type=hidden doesn't change framesetOK
- self.parser.framesetOK = framesetOK
-
- def startTagParamSource(self, token):
- self.tree.insertElement(token)
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
-
- def startTagHr(self, token):
- if self.tree.elementInScope("p", variant="button"):
- self.endTagP(impliedTagToken("p"))
- self.tree.insertElement(token)
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
- self.parser.framesetOK = False
-
- def startTagImage(self, token):
- # No really...
- self.parser.parseError("unexpected-start-tag-treated-as",
- {"originalName": "image", "newName": "img"})
- self.processStartTag(impliedTagToken("img", "StartTag",
- attributes=token["data"],
- selfClosing=token["selfClosing"]))
-
- def startTagIsIndex(self, token):
- self.parser.parseError("deprecated-tag", {"name": "isindex"})
- if self.tree.formPointer:
- return
- form_attrs = {}
- if "action" in token["data"]:
- form_attrs["action"] = token["data"]["action"]
- self.processStartTag(impliedTagToken("form", "StartTag",
- attributes=form_attrs))
- self.processStartTag(impliedTagToken("hr", "StartTag"))
- self.processStartTag(impliedTagToken("label", "StartTag"))
- # XXX Localization ...
- if "prompt" in token["data"]:
- prompt = token["data"]["prompt"]
- else:
- prompt = "This is a searchable index. Enter search keywords: "
- self.processCharacters(
- {"type": tokenTypes["Characters"], "data": prompt})
- attributes = token["data"].copy()
- if "action" in attributes:
- del attributes["action"]
- if "prompt" in attributes:
- del attributes["prompt"]
- attributes["name"] = "isindex"
- self.processStartTag(impliedTagToken("input", "StartTag",
- attributes=attributes,
- selfClosing=token["selfClosing"]))
- self.processEndTag(impliedTagToken("label"))
- self.processStartTag(impliedTagToken("hr", "StartTag"))
- self.processEndTag(impliedTagToken("form"))
-
- def startTagTextarea(self, token):
- self.tree.insertElement(token)
- self.parser.tokenizer.state = self.parser.tokenizer.rcdataState
- self.processSpaceCharacters = self.processSpaceCharactersDropNewline
- self.parser.framesetOK = False
-
- def startTagIFrame(self, token):
- self.parser.framesetOK = False
- self.startTagRawtext(token)
-
- def startTagRawtext(self, token):
- """iframe, noembed noframes, noscript(if scripting enabled)"""
- self.parser.parseRCDataRawtext(token, "RAWTEXT")
-
- def startTagOpt(self, token):
- if self.tree.openElements[-1].name == "option":
- self.parser.phase.processEndTag(impliedTagToken("option"))
- self.tree.reconstructActiveFormattingElements()
- self.parser.tree.insertElement(token)
-
- def startTagSelect(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertElement(token)
- self.parser.framesetOK = False
- if self.parser.phase in (self.parser.phases["inTable"],
- self.parser.phases["inCaption"],
- self.parser.phases["inColumnGroup"],
- self.parser.phases["inTableBody"],
- self.parser.phases["inRow"],
- self.parser.phases["inCell"]):
- self.parser.phase = self.parser.phases["inSelectInTable"]
- else:
- self.parser.phase = self.parser.phases["inSelect"]
-
- def startTagRpRt(self, token):
- if self.tree.elementInScope("ruby"):
- self.tree.generateImpliedEndTags()
- if self.tree.openElements[-1].name != "ruby":
- self.parser.parseError()
- self.tree.insertElement(token)
-
- def startTagMath(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.parser.adjustMathMLAttributes(token)
- self.parser.adjustForeignAttributes(token)
- token["namespace"] = namespaces["mathml"]
- self.tree.insertElement(token)
- # Need to get the parse error right for the case where the token
- # has a namespace not equal to the xmlns attribute
- if token["selfClosing"]:
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
-
- def startTagSvg(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.parser.adjustSVGAttributes(token)
- self.parser.adjustForeignAttributes(token)
- token["namespace"] = namespaces["svg"]
- self.tree.insertElement(token)
- # Need to get the parse error right for the case where the token
- # has a namespace not equal to the xmlns attribute
- if token["selfClosing"]:
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
-
- def startTagMisplaced(self, token):
- """ Elements that should be children of other elements that have a
- different insertion mode; here they are ignored
- "caption", "col", "colgroup", "frame", "frameset", "head",
- "option", "optgroup", "tbody", "td", "tfoot", "th", "thead",
- "tr", "noscript"
- """
- self.parser.parseError("unexpected-start-tag-ignored", {"name": token["name"]})
-
- def startTagOther(self, token):
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertElement(token)
-
- def endTagP(self, token):
- if not self.tree.elementInScope("p", variant="button"):
- self.startTagCloseP(impliedTagToken("p", "StartTag"))
- self.parser.parseError("unexpected-end-tag", {"name": "p"})
- self.endTagP(impliedTagToken("p", "EndTag"))
- else:
- self.tree.generateImpliedEndTags("p")
- if self.tree.openElements[-1].name != "p":
- self.parser.parseError("unexpected-end-tag", {"name": "p"})
- node = self.tree.openElements.pop()
- while node.name != "p":
- node = self.tree.openElements.pop()
-
- def endTagBody(self, token):
- if not self.tree.elementInScope("body"):
- self.parser.parseError()
- return
- elif self.tree.openElements[-1].name != "body":
- for node in self.tree.openElements[2:]:
- if node.name not in frozenset(("dd", "dt", "li", "optgroup",
- "option", "p", "rp", "rt",
- "tbody", "td", "tfoot",
- "th", "thead", "tr", "body",
- "html")):
- # Not sure this is the correct name for the parse error
- self.parser.parseError(
- "expected-one-end-tag-but-got-another",
- {"expectedName": "body", "gotName": node.name})
- break
- self.parser.phase = self.parser.phases["afterBody"]
-
- def endTagHtml(self, token):
- # We repeat the test for the body end tag token being ignored here
- if self.tree.elementInScope("body"):
- self.endTagBody(impliedTagToken("body"))
- return token
-
- def endTagBlock(self, token):
- # Put us back in the right whitespace handling mode
- if token["name"] == "pre":
- self.processSpaceCharacters = self.processSpaceCharactersNonPre
- inScope = self.tree.elementInScope(token["name"])
- if inScope:
- self.tree.generateImpliedEndTags()
- if self.tree.openElements[-1].name != token["name"]:
- self.parser.parseError("end-tag-too-early", {"name": token["name"]})
- if inScope:
- node = self.tree.openElements.pop()
- while node.name != token["name"]:
- node = self.tree.openElements.pop()
-
- def endTagForm(self, token):
- node = self.tree.formPointer
- self.tree.formPointer = None
- if node is None or not self.tree.elementInScope(node):
- self.parser.parseError("unexpected-end-tag",
- {"name": "form"})
- else:
- self.tree.generateImpliedEndTags()
- if self.tree.openElements[-1] != node:
- self.parser.parseError("end-tag-too-early-ignored",
- {"name": "form"})
- self.tree.openElements.remove(node)
-
- def endTagListItem(self, token):
- if token["name"] == "li":
- variant = "list"
- else:
- variant = None
- if not self.tree.elementInScope(token["name"], variant=variant):
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
- else:
- self.tree.generateImpliedEndTags(exclude=token["name"])
- if self.tree.openElements[-1].name != token["name"]:
- self.parser.parseError(
- "end-tag-too-early",
- {"name": token["name"]})
- node = self.tree.openElements.pop()
- while node.name != token["name"]:
- node = self.tree.openElements.pop()
-
- def endTagHeading(self, token):
- for item in headingElements:
- if self.tree.elementInScope(item):
- self.tree.generateImpliedEndTags()
- break
- if self.tree.openElements[-1].name != token["name"]:
- self.parser.parseError("end-tag-too-early", {"name": token["name"]})
-
- for item in headingElements:
- if self.tree.elementInScope(item):
- item = self.tree.openElements.pop()
- while item.name not in headingElements:
- item = self.tree.openElements.pop()
- break
-
- def endTagFormatting(self, token):
- """The much-feared adoption agency algorithm"""
- # http://svn.whatwg.org/webapps/complete.html#adoptionAgency revision 7867
- # XXX Better parseError messages appreciated.
-
- # Step 1
- outerLoopCounter = 0
-
- # Step 2
- while outerLoopCounter < 8:
-
- # Step 3
- outerLoopCounter += 1
-
- # Step 4:
-
- # Let the formatting element be the last element in
- # the list of active formatting elements that:
- # - is between the end of the list and the last scope
- # marker in the list, if any, or the start of the list
- # otherwise, and
- # - has the same tag name as the token.
- formattingElement = self.tree.elementInActiveFormattingElements(
- token["name"])
- if (not formattingElement or
- (formattingElement in self.tree.openElements and
- not self.tree.elementInScope(formattingElement.name))):
- # If there is no such node, then abort these steps
- # and instead act as described in the "any other
- # end tag" entry below.
- self.endTagOther(token)
- return
-
- # Otherwise, if there is such a node, but that node is
- # not in the stack of open elements, then this is a
- # parse error; remove the element from the list, and
- # abort these steps.
- elif formattingElement not in self.tree.openElements:
- self.parser.parseError("adoption-agency-1.2", {"name": token["name"]})
- self.tree.activeFormattingElements.remove(formattingElement)
- return
-
- # Otherwise, if there is such a node, and that node is
- # also in the stack of open elements, but the element
- # is not in scope, then this is a parse error; ignore
- # the token, and abort these steps.
- elif not self.tree.elementInScope(formattingElement.name):
- self.parser.parseError("adoption-agency-4.4", {"name": token["name"]})
- return
-
- # Otherwise, there is a formatting element and that
- # element is in the stack and is in scope. If the
- # element is not the current node, this is a parse
- # error. In any case, proceed with the algorithm as
- # written in the following steps.
- else:
- if formattingElement != self.tree.openElements[-1]:
- self.parser.parseError("adoption-agency-1.3", {"name": token["name"]})
-
- # Step 5:
-
- # Let the furthest block be the topmost node in the
- # stack of open elements that is lower in the stack
- # than the formatting element, and is an element in
- # the special category. There might not be one.
- afeIndex = self.tree.openElements.index(formattingElement)
- furthestBlock = None
- for element in self.tree.openElements[afeIndex:]:
- if element.nameTuple in specialElements:
- furthestBlock = element
- break
-
- # Step 6:
-
- # If there is no furthest block, then the UA must
- # first pop all the nodes from the bottom of the stack
- # of open elements, from the current node up to and
- # including the formatting element, then remove the
- # formatting element from the list of active
- # formatting elements, and finally abort these steps.
- if furthestBlock is None:
- element = self.tree.openElements.pop()
- while element != formattingElement:
- element = self.tree.openElements.pop()
- self.tree.activeFormattingElements.remove(element)
- return
-
- # Step 7
- commonAncestor = self.tree.openElements[afeIndex - 1]
-
- # Step 8:
- # The bookmark is supposed to help us identify where to reinsert
- # nodes in step 15. We have to ensure that we reinsert nodes after
- # the node before the active formatting element. Note the bookmark
- # can move in step 9.7
- bookmark = self.tree.activeFormattingElements.index(formattingElement)
-
- # Step 9
- lastNode = node = furthestBlock
- innerLoopCounter = 0
-
- index = self.tree.openElements.index(node)
- while innerLoopCounter < 3:
- innerLoopCounter += 1
- # Node is element before node in open elements
- index -= 1
- node = self.tree.openElements[index]
- if node not in self.tree.activeFormattingElements:
- self.tree.openElements.remove(node)
- continue
- # Step 9.6
- if node == formattingElement:
- break
- # Step 9.7
- if lastNode == furthestBlock:
- bookmark = self.tree.activeFormattingElements.index(node) + 1
- # Step 9.8
- clone = node.cloneNode()
- # Replace node with clone
- self.tree.activeFormattingElements[
- self.tree.activeFormattingElements.index(node)] = clone
- self.tree.openElements[
- self.tree.openElements.index(node)] = clone
- node = clone
- # Step 9.9
- # Remove lastNode from its parents, if any
- if lastNode.parent:
- lastNode.parent.removeChild(lastNode)
- node.appendChild(lastNode)
- # Step 9.10
- lastNode = node
-
- # Step 10
- # Foster parent lastNode if commonAncestor is a
- # table, tbody, tfoot, thead, or tr we need to foster
- # parent the lastNode
- if lastNode.parent:
- lastNode.parent.removeChild(lastNode)
-
- if commonAncestor.name in frozenset(("table", "tbody", "tfoot", "thead", "tr")):
- parent, insertBefore = self.tree.getTableMisnestedNodePosition()
- parent.insertBefore(lastNode, insertBefore)
- else:
- commonAncestor.appendChild(lastNode)
-
- # Step 11
- clone = formattingElement.cloneNode()
-
- # Step 12
- furthestBlock.reparentChildren(clone)
-
- # Step 13
- furthestBlock.appendChild(clone)
-
- # Step 14
- self.tree.activeFormattingElements.remove(formattingElement)
- self.tree.activeFormattingElements.insert(bookmark, clone)
-
- # Step 15
- self.tree.openElements.remove(formattingElement)
- self.tree.openElements.insert(
- self.tree.openElements.index(furthestBlock) + 1, clone)
-
- def endTagAppletMarqueeObject(self, token):
- if self.tree.elementInScope(token["name"]):
- self.tree.generateImpliedEndTags()
- if self.tree.openElements[-1].name != token["name"]:
- self.parser.parseError("end-tag-too-early", {"name": token["name"]})
-
- if self.tree.elementInScope(token["name"]):
- element = self.tree.openElements.pop()
- while element.name != token["name"]:
- element = self.tree.openElements.pop()
- self.tree.clearActiveFormattingElements()
-
- def endTagBr(self, token):
- self.parser.parseError("unexpected-end-tag-treated-as",
- {"originalName": "br", "newName": "br element"})
- self.tree.reconstructActiveFormattingElements()
- self.tree.insertElement(impliedTagToken("br", "StartTag"))
- self.tree.openElements.pop()
-
- def endTagOther(self, token):
- for node in self.tree.openElements[::-1]:
- if node.name == token["name"]:
- self.tree.generateImpliedEndTags(exclude=token["name"])
- if self.tree.openElements[-1].name != token["name"]:
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
- while self.tree.openElements.pop() != node:
- pass
- break
- else:
- if node.nameTuple in specialElements:
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
- break
-
- class TextPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
- self.startTagHandler = utils.MethodDispatcher([])
- self.startTagHandler.default = self.startTagOther
- self.endTagHandler = utils.MethodDispatcher([
- ("script", self.endTagScript)])
- self.endTagHandler.default = self.endTagOther
-
- def processCharacters(self, token):
- self.tree.insertText(token["data"])
-
- def processEOF(self):
- self.parser.parseError("expected-named-closing-tag-but-got-eof",
- {"name": self.tree.openElements[-1].name})
- self.tree.openElements.pop()
- self.parser.phase = self.parser.originalPhase
- return True
-
- def startTagOther(self, token):
- assert False, "Tried to process start tag %s in RCDATA/RAWTEXT mode" % token['name']
-
- def endTagScript(self, token):
- node = self.tree.openElements.pop()
- assert node.name == "script"
- self.parser.phase = self.parser.originalPhase
- # The rest of this method is all stuff that only happens if
- # document.write works
-
- def endTagOther(self, token):
- self.tree.openElements.pop()
- self.parser.phase = self.parser.originalPhase
-
- class InTablePhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-table
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("caption", self.startTagCaption),
- ("colgroup", self.startTagColgroup),
- ("col", self.startTagCol),
- (("tbody", "tfoot", "thead"), self.startTagRowGroup),
- (("td", "th", "tr"), self.startTagImplyTbody),
- ("table", self.startTagTable),
- (("style", "script"), self.startTagStyleScript),
- ("input", self.startTagInput),
- ("form", self.startTagForm)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("table", self.endTagTable),
- (("body", "caption", "col", "colgroup", "html", "tbody", "td",
- "tfoot", "th", "thead", "tr"), self.endTagIgnore)
- ])
- self.endTagHandler.default = self.endTagOther
-
- # helper methods
- def clearStackToTableContext(self):
- # "clear the stack back to a table context"
- while self.tree.openElements[-1].name not in ("table", "html"):
- # self.parser.parseError("unexpected-implied-end-tag-in-table",
- # {"name": self.tree.openElements[-1].name})
- self.tree.openElements.pop()
- # When the current node is <html> it's an innerHTML case
-
- # processing methods
- def processEOF(self):
- if self.tree.openElements[-1].name != "html":
- self.parser.parseError("eof-in-table")
- else:
- assert self.parser.innerHTML
- # Stop parsing
-
- def processSpaceCharacters(self, token):
- originalPhase = self.parser.phase
- self.parser.phase = self.parser.phases["inTableText"]
- self.parser.phase.originalPhase = originalPhase
- self.parser.phase.processSpaceCharacters(token)
-
- def processCharacters(self, token):
- originalPhase = self.parser.phase
- self.parser.phase = self.parser.phases["inTableText"]
- self.parser.phase.originalPhase = originalPhase
- self.parser.phase.processCharacters(token)
-
- def insertText(self, token):
- # If we get here there must be at least one non-whitespace character
- # Do the table magic!
- self.tree.insertFromTable = True
- self.parser.phases["inBody"].processCharacters(token)
- self.tree.insertFromTable = False
-
- def startTagCaption(self, token):
- self.clearStackToTableContext()
- self.tree.activeFormattingElements.append(Marker)
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inCaption"]
-
- def startTagColgroup(self, token):
- self.clearStackToTableContext()
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inColumnGroup"]
-
- def startTagCol(self, token):
- self.startTagColgroup(impliedTagToken("colgroup", "StartTag"))
- return token
-
- def startTagRowGroup(self, token):
- self.clearStackToTableContext()
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inTableBody"]
-
- def startTagImplyTbody(self, token):
- self.startTagRowGroup(impliedTagToken("tbody", "StartTag"))
- return token
-
- def startTagTable(self, token):
- self.parser.parseError("unexpected-start-tag-implies-end-tag",
- {"startName": "table", "endName": "table"})
- self.parser.phase.processEndTag(impliedTagToken("table"))
- if not self.parser.innerHTML:
- return token
-
- def startTagStyleScript(self, token):
- return self.parser.phases["inHead"].processStartTag(token)
-
- def startTagInput(self, token):
- if ("type" in token["data"] and
- token["data"]["type"].translate(asciiUpper2Lower) == "hidden"):
- self.parser.parseError("unexpected-hidden-input-in-table")
- self.tree.insertElement(token)
- # XXX associate with form
- self.tree.openElements.pop()
- else:
- self.startTagOther(token)
-
- def startTagForm(self, token):
- self.parser.parseError("unexpected-form-in-table")
- if self.tree.formPointer is None:
- self.tree.insertElement(token)
- self.tree.formPointer = self.tree.openElements[-1]
- self.tree.openElements.pop()
-
- def startTagOther(self, token):
- self.parser.parseError("unexpected-start-tag-implies-table-voodoo", {"name": token["name"]})
- # Do the table magic!
- self.tree.insertFromTable = True
- self.parser.phases["inBody"].processStartTag(token)
- self.tree.insertFromTable = False
-
- def endTagTable(self, token):
- if self.tree.elementInScope("table", variant="table"):
- self.tree.generateImpliedEndTags()
- if self.tree.openElements[-1].name != "table":
- self.parser.parseError("end-tag-too-early-named",
- {"gotName": "table",
- "expectedName": self.tree.openElements[-1].name})
- while self.tree.openElements[-1].name != "table":
- self.tree.openElements.pop()
- self.tree.openElements.pop()
- self.parser.resetInsertionMode()
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def endTagIgnore(self, token):
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag-implies-table-voodoo", {"name": token["name"]})
- # Do the table magic!
- self.tree.insertFromTable = True
- self.parser.phases["inBody"].processEndTag(token)
- self.tree.insertFromTable = False
-
- class InTableTextPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
- self.originalPhase = None
- self.characterTokens = []
-
- def flushCharacters(self):
- data = "".join([item["data"] for item in self.characterTokens])
- if any([item not in spaceCharacters for item in data]):
- token = {"type": tokenTypes["Characters"], "data": data}
- self.parser.phases["inTable"].insertText(token)
- elif data:
- self.tree.insertText(data)
- self.characterTokens = []
-
- def processComment(self, token):
- self.flushCharacters()
- self.parser.phase = self.originalPhase
- return token
-
- def processEOF(self):
- self.flushCharacters()
- self.parser.phase = self.originalPhase
- return True
-
- def processCharacters(self, token):
- if token["data"] == "\u0000":
- return
- self.characterTokens.append(token)
-
- def processSpaceCharacters(self, token):
- # pretty sure we should never reach here
- self.characterTokens.append(token)
- # assert False
-
- def processStartTag(self, token):
- self.flushCharacters()
- self.parser.phase = self.originalPhase
- return token
-
- def processEndTag(self, token):
- self.flushCharacters()
- self.parser.phase = self.originalPhase
- return token
-
- class InCaptionPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-caption
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th",
- "thead", "tr"), self.startTagTableElement)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("caption", self.endTagCaption),
- ("table", self.endTagTable),
- (("body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th",
- "thead", "tr"), self.endTagIgnore)
- ])
- self.endTagHandler.default = self.endTagOther
-
- def ignoreEndTagCaption(self):
- return not self.tree.elementInScope("caption", variant="table")
-
- def processEOF(self):
- self.parser.phases["inBody"].processEOF()
-
- def processCharacters(self, token):
- return self.parser.phases["inBody"].processCharacters(token)
-
- def startTagTableElement(self, token):
- self.parser.parseError()
- # XXX Have to duplicate logic here to find out if the tag is ignored
- ignoreEndTag = self.ignoreEndTagCaption()
- self.parser.phase.processEndTag(impliedTagToken("caption"))
- if not ignoreEndTag:
- return token
-
- def startTagOther(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def endTagCaption(self, token):
- if not self.ignoreEndTagCaption():
- # AT this code is quite similar to endTagTable in "InTable"
- self.tree.generateImpliedEndTags()
- if self.tree.openElements[-1].name != "caption":
- self.parser.parseError("expected-one-end-tag-but-got-another",
- {"gotName": "caption",
- "expectedName": self.tree.openElements[-1].name})
- while self.tree.openElements[-1].name != "caption":
- self.tree.openElements.pop()
- self.tree.openElements.pop()
- self.tree.clearActiveFormattingElements()
- self.parser.phase = self.parser.phases["inTable"]
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def endTagTable(self, token):
- self.parser.parseError()
- ignoreEndTag = self.ignoreEndTagCaption()
- self.parser.phase.processEndTag(impliedTagToken("caption"))
- if not ignoreEndTag:
- return token
-
- def endTagIgnore(self, token):
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- def endTagOther(self, token):
- return self.parser.phases["inBody"].processEndTag(token)
-
- class InColumnGroupPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-column
-
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("col", self.startTagCol)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("colgroup", self.endTagColgroup),
- ("col", self.endTagCol)
- ])
- self.endTagHandler.default = self.endTagOther
-
- def ignoreEndTagColgroup(self):
- return self.tree.openElements[-1].name == "html"
-
- def processEOF(self):
- if self.tree.openElements[-1].name == "html":
- assert self.parser.innerHTML
- return
- else:
- ignoreEndTag = self.ignoreEndTagColgroup()
- self.endTagColgroup(impliedTagToken("colgroup"))
- if not ignoreEndTag:
- return True
-
- def processCharacters(self, token):
- ignoreEndTag = self.ignoreEndTagColgroup()
- self.endTagColgroup(impliedTagToken("colgroup"))
- if not ignoreEndTag:
- return token
-
- def startTagCol(self, token):
- self.tree.insertElement(token)
- self.tree.openElements.pop()
-
- def startTagOther(self, token):
- ignoreEndTag = self.ignoreEndTagColgroup()
- self.endTagColgroup(impliedTagToken("colgroup"))
- if not ignoreEndTag:
- return token
-
- def endTagColgroup(self, token):
- if self.ignoreEndTagColgroup():
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
- else:
- self.tree.openElements.pop()
- self.parser.phase = self.parser.phases["inTable"]
-
- def endTagCol(self, token):
- self.parser.parseError("no-end-tag", {"name": "col"})
-
- def endTagOther(self, token):
- ignoreEndTag = self.ignoreEndTagColgroup()
- self.endTagColgroup(impliedTagToken("colgroup"))
- if not ignoreEndTag:
- return token
-
- class InTableBodyPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-table0
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("tr", self.startTagTr),
- (("td", "th"), self.startTagTableCell),
- (("caption", "col", "colgroup", "tbody", "tfoot", "thead"),
- self.startTagTableOther)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- (("tbody", "tfoot", "thead"), self.endTagTableRowGroup),
- ("table", self.endTagTable),
- (("body", "caption", "col", "colgroup", "html", "td", "th",
- "tr"), self.endTagIgnore)
- ])
- self.endTagHandler.default = self.endTagOther
-
- # helper methods
- def clearStackToTableBodyContext(self):
- while self.tree.openElements[-1].name not in ("tbody", "tfoot",
- "thead", "html"):
- # self.parser.parseError("unexpected-implied-end-tag-in-table",
- # {"name": self.tree.openElements[-1].name})
- self.tree.openElements.pop()
- if self.tree.openElements[-1].name == "html":
- assert self.parser.innerHTML
-
- # the rest
- def processEOF(self):
- self.parser.phases["inTable"].processEOF()
-
- def processSpaceCharacters(self, token):
- return self.parser.phases["inTable"].processSpaceCharacters(token)
-
- def processCharacters(self, token):
- return self.parser.phases["inTable"].processCharacters(token)
-
- def startTagTr(self, token):
- self.clearStackToTableBodyContext()
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inRow"]
-
- def startTagTableCell(self, token):
- self.parser.parseError("unexpected-cell-in-table-body",
- {"name": token["name"]})
- self.startTagTr(impliedTagToken("tr", "StartTag"))
- return token
-
- def startTagTableOther(self, token):
- # XXX AT Any ideas on how to share this with endTagTable?
- if (self.tree.elementInScope("tbody", variant="table") or
- self.tree.elementInScope("thead", variant="table") or
- self.tree.elementInScope("tfoot", variant="table")):
- self.clearStackToTableBodyContext()
- self.endTagTableRowGroup(
- impliedTagToken(self.tree.openElements[-1].name))
- return token
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def startTagOther(self, token):
- return self.parser.phases["inTable"].processStartTag(token)
-
- def endTagTableRowGroup(self, token):
- if self.tree.elementInScope(token["name"], variant="table"):
- self.clearStackToTableBodyContext()
- self.tree.openElements.pop()
- self.parser.phase = self.parser.phases["inTable"]
- else:
- self.parser.parseError("unexpected-end-tag-in-table-body",
- {"name": token["name"]})
-
- def endTagTable(self, token):
- if (self.tree.elementInScope("tbody", variant="table") or
- self.tree.elementInScope("thead", variant="table") or
- self.tree.elementInScope("tfoot", variant="table")):
- self.clearStackToTableBodyContext()
- self.endTagTableRowGroup(
- impliedTagToken(self.tree.openElements[-1].name))
- return token
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def endTagIgnore(self, token):
- self.parser.parseError("unexpected-end-tag-in-table-body",
- {"name": token["name"]})
-
- def endTagOther(self, token):
- return self.parser.phases["inTable"].processEndTag(token)
-
- class InRowPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-row
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- (("td", "th"), self.startTagTableCell),
- (("caption", "col", "colgroup", "tbody", "tfoot", "thead",
- "tr"), self.startTagTableOther)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("tr", self.endTagTr),
- ("table", self.endTagTable),
- (("tbody", "tfoot", "thead"), self.endTagTableRowGroup),
- (("body", "caption", "col", "colgroup", "html", "td", "th"),
- self.endTagIgnore)
- ])
- self.endTagHandler.default = self.endTagOther
-
- # helper methods (XXX unify this with other table helper methods)
- def clearStackToTableRowContext(self):
- while self.tree.openElements[-1].name not in ("tr", "html"):
- self.parser.parseError("unexpected-implied-end-tag-in-table-row",
- {"name": self.tree.openElements[-1].name})
- self.tree.openElements.pop()
-
- def ignoreEndTagTr(self):
- return not self.tree.elementInScope("tr", variant="table")
-
- # the rest
- def processEOF(self):
- self.parser.phases["inTable"].processEOF()
-
- def processSpaceCharacters(self, token):
- return self.parser.phases["inTable"].processSpaceCharacters(token)
-
- def processCharacters(self, token):
- return self.parser.phases["inTable"].processCharacters(token)
-
- def startTagTableCell(self, token):
- self.clearStackToTableRowContext()
- self.tree.insertElement(token)
- self.parser.phase = self.parser.phases["inCell"]
- self.tree.activeFormattingElements.append(Marker)
-
- def startTagTableOther(self, token):
- ignoreEndTag = self.ignoreEndTagTr()
- self.endTagTr(impliedTagToken("tr"))
- # XXX how are we sure it's always ignored in the innerHTML case?
- if not ignoreEndTag:
- return token
-
- def startTagOther(self, token):
- return self.parser.phases["inTable"].processStartTag(token)
-
- def endTagTr(self, token):
- if not self.ignoreEndTagTr():
- self.clearStackToTableRowContext()
- self.tree.openElements.pop()
- self.parser.phase = self.parser.phases["inTableBody"]
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def endTagTable(self, token):
- ignoreEndTag = self.ignoreEndTagTr()
- self.endTagTr(impliedTagToken("tr"))
- # Reprocess the current tag if the tr end tag was not ignored
- # XXX how are we sure it's always ignored in the innerHTML case?
- if not ignoreEndTag:
- return token
-
- def endTagTableRowGroup(self, token):
- if self.tree.elementInScope(token["name"], variant="table"):
- self.endTagTr(impliedTagToken("tr"))
- return token
- else:
- self.parser.parseError()
-
- def endTagIgnore(self, token):
- self.parser.parseError("unexpected-end-tag-in-table-row",
- {"name": token["name"]})
-
- def endTagOther(self, token):
- return self.parser.phases["inTable"].processEndTag(token)
-
- class InCellPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-cell
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th",
- "thead", "tr"), self.startTagTableOther)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- (("td", "th"), self.endTagTableCell),
- (("body", "caption", "col", "colgroup", "html"), self.endTagIgnore),
- (("table", "tbody", "tfoot", "thead", "tr"), self.endTagImply)
- ])
- self.endTagHandler.default = self.endTagOther
-
- # helper
- def closeCell(self):
- if self.tree.elementInScope("td", variant="table"):
- self.endTagTableCell(impliedTagToken("td"))
- elif self.tree.elementInScope("th", variant="table"):
- self.endTagTableCell(impliedTagToken("th"))
-
- # the rest
- def processEOF(self):
- self.parser.phases["inBody"].processEOF()
-
- def processCharacters(self, token):
- return self.parser.phases["inBody"].processCharacters(token)
-
- def startTagTableOther(self, token):
- if (self.tree.elementInScope("td", variant="table") or
- self.tree.elementInScope("th", variant="table")):
- self.closeCell()
- return token
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def startTagOther(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def endTagTableCell(self, token):
- if self.tree.elementInScope(token["name"], variant="table"):
- self.tree.generateImpliedEndTags(token["name"])
- if self.tree.openElements[-1].name != token["name"]:
- self.parser.parseError("unexpected-cell-end-tag",
- {"name": token["name"]})
- while True:
- node = self.tree.openElements.pop()
- if node.name == token["name"]:
- break
- else:
- self.tree.openElements.pop()
- self.tree.clearActiveFormattingElements()
- self.parser.phase = self.parser.phases["inRow"]
- else:
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- def endTagIgnore(self, token):
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- def endTagImply(self, token):
- if self.tree.elementInScope(token["name"], variant="table"):
- self.closeCell()
- return token
- else:
- # sometimes innerHTML case
- self.parser.parseError()
-
- def endTagOther(self, token):
- return self.parser.phases["inBody"].processEndTag(token)
-
- class InSelectPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("option", self.startTagOption),
- ("optgroup", self.startTagOptgroup),
- ("select", self.startTagSelect),
- (("input", "keygen", "textarea"), self.startTagInput),
- ("script", self.startTagScript)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("option", self.endTagOption),
- ("optgroup", self.endTagOptgroup),
- ("select", self.endTagSelect)
- ])
- self.endTagHandler.default = self.endTagOther
-
- # http://www.whatwg.org/specs/web-apps/current-work/#in-select
- def processEOF(self):
- if self.tree.openElements[-1].name != "html":
- self.parser.parseError("eof-in-select")
- else:
- assert self.parser.innerHTML
-
- def processCharacters(self, token):
- if token["data"] == "\u0000":
- return
- self.tree.insertText(token["data"])
-
- def startTagOption(self, token):
- # We need to imply </option> if <option> is the current node.
- if self.tree.openElements[-1].name == "option":
- self.tree.openElements.pop()
- self.tree.insertElement(token)
-
- def startTagOptgroup(self, token):
- if self.tree.openElements[-1].name == "option":
- self.tree.openElements.pop()
- if self.tree.openElements[-1].name == "optgroup":
- self.tree.openElements.pop()
- self.tree.insertElement(token)
-
- def startTagSelect(self, token):
- self.parser.parseError("unexpected-select-in-select")
- self.endTagSelect(impliedTagToken("select"))
-
- def startTagInput(self, token):
- self.parser.parseError("unexpected-input-in-select")
- if self.tree.elementInScope("select", variant="select"):
- self.endTagSelect(impliedTagToken("select"))
- return token
- else:
- assert self.parser.innerHTML
-
- def startTagScript(self, token):
- return self.parser.phases["inHead"].processStartTag(token)
-
- def startTagOther(self, token):
- self.parser.parseError("unexpected-start-tag-in-select",
- {"name": token["name"]})
-
- def endTagOption(self, token):
- if self.tree.openElements[-1].name == "option":
- self.tree.openElements.pop()
- else:
- self.parser.parseError("unexpected-end-tag-in-select",
- {"name": "option"})
-
- def endTagOptgroup(self, token):
- # </optgroup> implicitly closes <option>
- if (self.tree.openElements[-1].name == "option" and
- self.tree.openElements[-2].name == "optgroup"):
- self.tree.openElements.pop()
- # It also closes </optgroup>
- if self.tree.openElements[-1].name == "optgroup":
- self.tree.openElements.pop()
- # But nothing else
- else:
- self.parser.parseError("unexpected-end-tag-in-select",
- {"name": "optgroup"})
-
- def endTagSelect(self, token):
- if self.tree.elementInScope("select", variant="select"):
- node = self.tree.openElements.pop()
- while node.name != "select":
- node = self.tree.openElements.pop()
- self.parser.resetInsertionMode()
- else:
- # innerHTML case
- assert self.parser.innerHTML
- self.parser.parseError()
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag-in-select",
- {"name": token["name"]})
-
- class InSelectInTablePhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- (("caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th"),
- self.startTagTable)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- (("caption", "table", "tbody", "tfoot", "thead", "tr", "td", "th"),
- self.endTagTable)
- ])
- self.endTagHandler.default = self.endTagOther
-
- def processEOF(self):
- self.parser.phases["inSelect"].processEOF()
-
- def processCharacters(self, token):
- return self.parser.phases["inSelect"].processCharacters(token)
-
- def startTagTable(self, token):
- self.parser.parseError("unexpected-table-element-start-tag-in-select-in-table", {"name": token["name"]})
- self.endTagOther(impliedTagToken("select"))
- return token
-
- def startTagOther(self, token):
- return self.parser.phases["inSelect"].processStartTag(token)
-
- def endTagTable(self, token):
- self.parser.parseError("unexpected-table-element-end-tag-in-select-in-table", {"name": token["name"]})
- if self.tree.elementInScope(token["name"], variant="table"):
- self.endTagOther(impliedTagToken("select"))
- return token
-
- def endTagOther(self, token):
- return self.parser.phases["inSelect"].processEndTag(token)
-
- class InForeignContentPhase(Phase):
- breakoutElements = frozenset(["b", "big", "blockquote", "body", "br",
- "center", "code", "dd", "div", "dl", "dt",
- "em", "embed", "h1", "h2", "h3",
- "h4", "h5", "h6", "head", "hr", "i", "img",
- "li", "listing", "menu", "meta", "nobr",
- "ol", "p", "pre", "ruby", "s", "small",
- "span", "strong", "strike", "sub", "sup",
- "table", "tt", "u", "ul", "var"])
-
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- def adjustSVGTagNames(self, token):
- replacements = {"altglyph": "altGlyph",
- "altglyphdef": "altGlyphDef",
- "altglyphitem": "altGlyphItem",
- "animatecolor": "animateColor",
- "animatemotion": "animateMotion",
- "animatetransform": "animateTransform",
- "clippath": "clipPath",
- "feblend": "feBlend",
- "fecolormatrix": "feColorMatrix",
- "fecomponenttransfer": "feComponentTransfer",
- "fecomposite": "feComposite",
- "feconvolvematrix": "feConvolveMatrix",
- "fediffuselighting": "feDiffuseLighting",
- "fedisplacementmap": "feDisplacementMap",
- "fedistantlight": "feDistantLight",
- "feflood": "feFlood",
- "fefunca": "feFuncA",
- "fefuncb": "feFuncB",
- "fefuncg": "feFuncG",
- "fefuncr": "feFuncR",
- "fegaussianblur": "feGaussianBlur",
- "feimage": "feImage",
- "femerge": "feMerge",
- "femergenode": "feMergeNode",
- "femorphology": "feMorphology",
- "feoffset": "feOffset",
- "fepointlight": "fePointLight",
- "fespecularlighting": "feSpecularLighting",
- "fespotlight": "feSpotLight",
- "fetile": "feTile",
- "feturbulence": "feTurbulence",
- "foreignobject": "foreignObject",
- "glyphref": "glyphRef",
- "lineargradient": "linearGradient",
- "radialgradient": "radialGradient",
- "textpath": "textPath"}
-
- if token["name"] in replacements:
- token["name"] = replacements[token["name"]]
-
- def processCharacters(self, token):
- if token["data"] == "\u0000":
- token["data"] = "\uFFFD"
- elif (self.parser.framesetOK and
- any(char not in spaceCharacters for char in token["data"])):
- self.parser.framesetOK = False
- Phase.processCharacters(self, token)
-
- def processStartTag(self, token):
- currentNode = self.tree.openElements[-1]
- if (token["name"] in self.breakoutElements or
- (token["name"] == "font" and
- set(token["data"].keys()) & set(["color", "face", "size"]))):
- self.parser.parseError("unexpected-html-element-in-foreign-content",
- {"name": token["name"]})
- while (self.tree.openElements[-1].namespace !=
- self.tree.defaultNamespace and
- not self.parser.isHTMLIntegrationPoint(self.tree.openElements[-1]) and
- not self.parser.isMathMLTextIntegrationPoint(self.tree.openElements[-1])):
- self.tree.openElements.pop()
- return token
-
- else:
- if currentNode.namespace == namespaces["mathml"]:
- self.parser.adjustMathMLAttributes(token)
- elif currentNode.namespace == namespaces["svg"]:
- self.adjustSVGTagNames(token)
- self.parser.adjustSVGAttributes(token)
- self.parser.adjustForeignAttributes(token)
- token["namespace"] = currentNode.namespace
- self.tree.insertElement(token)
- if token["selfClosing"]:
- self.tree.openElements.pop()
- token["selfClosingAcknowledged"] = True
-
- def processEndTag(self, token):
- nodeIndex = len(self.tree.openElements) - 1
- node = self.tree.openElements[-1]
- if node.name != token["name"]:
- self.parser.parseError("unexpected-end-tag", {"name": token["name"]})
-
- while True:
- if node.name.translate(asciiUpper2Lower) == token["name"]:
- # XXX this isn't in the spec but it seems necessary
- if self.parser.phase == self.parser.phases["inTableText"]:
- self.parser.phase.flushCharacters()
- self.parser.phase = self.parser.phase.originalPhase
- while self.tree.openElements.pop() != node:
- assert self.tree.openElements
- new_token = None
- break
- nodeIndex -= 1
-
- node = self.tree.openElements[nodeIndex]
- if node.namespace != self.tree.defaultNamespace:
- continue
- else:
- new_token = self.parser.phase.processEndTag(token)
- break
- return new_token
-
- class AfterBodyPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([("html", self.endTagHtml)])
- self.endTagHandler.default = self.endTagOther
-
- def processEOF(self):
- # Stop parsing
- pass
-
- def processComment(self, token):
- # This is needed because data is to be appended to the <html> element
- # here and not to whatever is currently open.
- self.tree.insertComment(token, self.tree.openElements[0])
-
- def processCharacters(self, token):
- self.parser.parseError("unexpected-char-after-body")
- self.parser.phase = self.parser.phases["inBody"]
- return token
-
- def startTagHtml(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagOther(self, token):
- self.parser.parseError("unexpected-start-tag-after-body",
- {"name": token["name"]})
- self.parser.phase = self.parser.phases["inBody"]
- return token
-
- def endTagHtml(self, name):
- if self.parser.innerHTML:
- self.parser.parseError("unexpected-end-tag-after-body-innerhtml")
- else:
- self.parser.phase = self.parser.phases["afterAfterBody"]
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag-after-body",
- {"name": token["name"]})
- self.parser.phase = self.parser.phases["inBody"]
- return token
-
- class InFramesetPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#in-frameset
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("frameset", self.startTagFrameset),
- ("frame", self.startTagFrame),
- ("noframes", self.startTagNoframes)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("frameset", self.endTagFrameset)
- ])
- self.endTagHandler.default = self.endTagOther
-
- def processEOF(self):
- if self.tree.openElements[-1].name != "html":
- self.parser.parseError("eof-in-frameset")
- else:
- assert self.parser.innerHTML
-
- def processCharacters(self, token):
- self.parser.parseError("unexpected-char-in-frameset")
-
- def startTagFrameset(self, token):
- self.tree.insertElement(token)
-
- def startTagFrame(self, token):
- self.tree.insertElement(token)
- self.tree.openElements.pop()
-
- def startTagNoframes(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagOther(self, token):
- self.parser.parseError("unexpected-start-tag-in-frameset",
- {"name": token["name"]})
-
- def endTagFrameset(self, token):
- if self.tree.openElements[-1].name == "html":
- # innerHTML case
- self.parser.parseError("unexpected-frameset-in-frameset-innerhtml")
- else:
- self.tree.openElements.pop()
- if (not self.parser.innerHTML and
- self.tree.openElements[-1].name != "frameset"):
- # If we're not in innerHTML mode and the the current node is not a
- # "frameset" element (anymore) then switch.
- self.parser.phase = self.parser.phases["afterFrameset"]
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag-in-frameset",
- {"name": token["name"]})
-
- class AfterFramesetPhase(Phase):
- # http://www.whatwg.org/specs/web-apps/current-work/#after3
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("noframes", self.startTagNoframes)
- ])
- self.startTagHandler.default = self.startTagOther
-
- self.endTagHandler = utils.MethodDispatcher([
- ("html", self.endTagHtml)
- ])
- self.endTagHandler.default = self.endTagOther
-
- def processEOF(self):
- # Stop parsing
- pass
-
- def processCharacters(self, token):
- self.parser.parseError("unexpected-char-after-frameset")
-
- def startTagNoframes(self, token):
- return self.parser.phases["inHead"].processStartTag(token)
-
- def startTagOther(self, token):
- self.parser.parseError("unexpected-start-tag-after-frameset",
- {"name": token["name"]})
-
- def endTagHtml(self, token):
- self.parser.phase = self.parser.phases["afterAfterFrameset"]
-
- def endTagOther(self, token):
- self.parser.parseError("unexpected-end-tag-after-frameset",
- {"name": token["name"]})
-
- class AfterAfterBodyPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml)
- ])
- self.startTagHandler.default = self.startTagOther
-
- def processEOF(self):
- pass
-
- def processComment(self, token):
- self.tree.insertComment(token, self.tree.document)
-
- def processSpaceCharacters(self, token):
- return self.parser.phases["inBody"].processSpaceCharacters(token)
-
- def processCharacters(self, token):
- self.parser.parseError("expected-eof-but-got-char")
- self.parser.phase = self.parser.phases["inBody"]
- return token
-
- def startTagHtml(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagOther(self, token):
- self.parser.parseError("expected-eof-but-got-start-tag",
- {"name": token["name"]})
- self.parser.phase = self.parser.phases["inBody"]
- return token
-
- def processEndTag(self, token):
- self.parser.parseError("expected-eof-but-got-end-tag",
- {"name": token["name"]})
- self.parser.phase = self.parser.phases["inBody"]
- return token
-
- class AfterAfterFramesetPhase(Phase):
- def __init__(self, parser, tree):
- Phase.__init__(self, parser, tree)
-
- self.startTagHandler = utils.MethodDispatcher([
- ("html", self.startTagHtml),
- ("noframes", self.startTagNoFrames)
- ])
- self.startTagHandler.default = self.startTagOther
-
- def processEOF(self):
- pass
-
- def processComment(self, token):
- self.tree.insertComment(token, self.tree.document)
-
- def processSpaceCharacters(self, token):
- return self.parser.phases["inBody"].processSpaceCharacters(token)
-
- def processCharacters(self, token):
- self.parser.parseError("expected-eof-but-got-char")
-
- def startTagHtml(self, token):
- return self.parser.phases["inBody"].processStartTag(token)
-
- def startTagNoFrames(self, token):
- return self.parser.phases["inHead"].processStartTag(token)
-
- def startTagOther(self, token):
- self.parser.parseError("expected-eof-but-got-start-tag",
- {"name": token["name"]})
-
- def processEndTag(self, token):
- self.parser.parseError("expected-eof-but-got-end-tag",
- {"name": token["name"]})
-
- return {
- "initial": InitialPhase,
- "beforeHtml": BeforeHtmlPhase,
- "beforeHead": BeforeHeadPhase,
- "inHead": InHeadPhase,
- # XXX "inHeadNoscript": InHeadNoScriptPhase,
- "afterHead": AfterHeadPhase,
- "inBody": InBodyPhase,
- "text": TextPhase,
- "inTable": InTablePhase,
- "inTableText": InTableTextPhase,
- "inCaption": InCaptionPhase,
- "inColumnGroup": InColumnGroupPhase,
- "inTableBody": InTableBodyPhase,
- "inRow": InRowPhase,
- "inCell": InCellPhase,
- "inSelect": InSelectPhase,
- "inSelectInTable": InSelectInTablePhase,
- "inForeignContent": InForeignContentPhase,
- "afterBody": AfterBodyPhase,
- "inFrameset": InFramesetPhase,
- "afterFrameset": AfterFramesetPhase,
- "afterAfterBody": AfterAfterBodyPhase,
- "afterAfterFrameset": AfterAfterFramesetPhase,
- # XXX after after frameset
- }
-
-
-def impliedTagToken(name, type="EndTag", attributes=None,
- selfClosing=False):
- if attributes is None:
- attributes = {}
- return {"type": tokenTypes[type], "name": name, "data": attributes,
- "selfClosing": selfClosing}
-
-
-class ParseError(Exception):
- """Error in parsed document"""
- pass
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/ihatexml.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/ihatexml.py
deleted file mode 100644
index 0fc79308ef4..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/ihatexml.py
+++ /dev/null
@@ -1,285 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-import re
-import warnings
-
-from .constants import DataLossWarning
-
-baseChar = """
-[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
-[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
-[#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] |
-[#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 |
-[#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] |
-[#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] |
-[#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] |
-[#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] |
-[#x04EE-#x04F5] | [#x04F8-#x04F9] | [#x0531-#x0556] | #x0559 |
-[#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] |
-[#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] |
-[#x06D0-#x06D3] | #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D |
-[#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] |
-[#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] |
-[#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] |
-[#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] |
-[#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | [#x0A72-#x0A74] |
-[#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] |
-[#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 |
-[#x0B05-#x0B0C] | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] |
-[#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] |
-[#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] |
-[#x0B99-#x0B9A] | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] |
-[#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] |
-[#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] |
-[#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] |
-[#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] |
-[#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | [#x0D2A-#x0D39] |
-[#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] |
-[#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A |
-#x0E8D | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 |
-#x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] |
-#x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] |
-[#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] |
-[#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C |
-#x113E | #x1140 | #x114C | #x114E | #x1150 | [#x1154-#x1155] | #x1159 |
-[#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] |
-[#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] |
-[#x11B7-#x11B8] | #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 |
-[#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] |
-[#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | #x1F5B |
-#x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE |
-[#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] |
-[#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 |
-[#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] |
-[#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3]"""
-
-ideographic = """[#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]"""
-
-combiningCharacter = """
-[#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] | [#x0591-#x05A1] |
-[#x05A3-#x05B9] | [#x05BB-#x05BD] | #x05BF | [#x05C1-#x05C2] | #x05C4 |
-[#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] | [#x06DD-#x06DF] |
-[#x06E0-#x06E4] | [#x06E7-#x06E8] | [#x06EA-#x06ED] | [#x0901-#x0903] |
-#x093C | [#x093E-#x094C] | #x094D | [#x0951-#x0954] | [#x0962-#x0963] |
-[#x0981-#x0983] | #x09BC | #x09BE | #x09BF | [#x09C0-#x09C4] |
-[#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 | [#x09E2-#x09E3] | #x0A02 |
-#x0A3C | #x0A3E | #x0A3F | [#x0A40-#x0A42] | [#x0A47-#x0A48] |
-[#x0A4B-#x0A4D] | [#x0A70-#x0A71] | [#x0A81-#x0A83] | #x0ABC |
-[#x0ABE-#x0AC5] | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] |
-#x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] | [#x0B4B-#x0B4D] |
-[#x0B56-#x0B57] | [#x0B82-#x0B83] | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] |
-[#x0BCA-#x0BCD] | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] |
-[#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] | [#x0C82-#x0C83] |
-[#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] |
-[#x0D02-#x0D03] | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] |
-#x0D57 | #x0E31 | [#x0E34-#x0E3A] | [#x0E47-#x0E4E] | #x0EB1 |
-[#x0EB4-#x0EB9] | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] |
-#x0F35 | #x0F37 | #x0F39 | #x0F3E | #x0F3F | [#x0F71-#x0F84] |
-[#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 | [#x0F99-#x0FAD] |
-[#x0FB1-#x0FB7] | #x0FB9 | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] |
-#x3099 | #x309A"""
-
-digit = """
-[#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] | [#x0966-#x096F] |
-[#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] |
-[#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] |
-[#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]"""
-
-extender = """
-#x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 |
-#[#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]"""
-
-letter = " | ".join([baseChar, ideographic])
-
-# Without the
-name = " | ".join([letter, digit, ".", "-", "_", combiningCharacter,
- extender])
-nameFirst = " | ".join([letter, "_"])
-
-reChar = re.compile(r"#x([\d|A-F]{4,4})")
-reCharRange = re.compile(r"\[#x([\d|A-F]{4,4})-#x([\d|A-F]{4,4})\]")
-
-
-def charStringToList(chars):
- charRanges = [item.strip() for item in chars.split(" | ")]
- rv = []
- for item in charRanges:
- foundMatch = False
- for regexp in (reChar, reCharRange):
- match = regexp.match(item)
- if match is not None:
- rv.append([hexToInt(item) for item in match.groups()])
- if len(rv[-1]) == 1:
- rv[-1] = rv[-1] * 2
- foundMatch = True
- break
- if not foundMatch:
- assert len(item) == 1
-
- rv.append([ord(item)] * 2)
- rv = normaliseCharList(rv)
- return rv
-
-
-def normaliseCharList(charList):
- charList = sorted(charList)
- for item in charList:
- assert item[1] >= item[0]
- rv = []
- i = 0
- while i < len(charList):
- j = 1
- rv.append(charList[i])
- while i + j < len(charList) and charList[i + j][0] <= rv[-1][1] + 1:
- rv[-1][1] = charList[i + j][1]
- j += 1
- i += j
- return rv
-
-# We don't really support characters above the BMP :(
-max_unicode = int("FFFF", 16)
-
-
-def missingRanges(charList):
- rv = []
- if charList[0] != 0:
- rv.append([0, charList[0][0] - 1])
- for i, item in enumerate(charList[:-1]):
- rv.append([item[1] + 1, charList[i + 1][0] - 1])
- if charList[-1][1] != max_unicode:
- rv.append([charList[-1][1] + 1, max_unicode])
- return rv
-
-
-def listToRegexpStr(charList):
- rv = []
- for item in charList:
- if item[0] == item[1]:
- rv.append(escapeRegexp(chr(item[0])))
- else:
- rv.append(escapeRegexp(chr(item[0])) + "-" +
- escapeRegexp(chr(item[1])))
- return "[%s]" % "".join(rv)
-
-
-def hexToInt(hex_str):
- return int(hex_str, 16)
-
-
-def escapeRegexp(string):
- specialCharacters = (".", "^", "$", "*", "+", "?", "{", "}",
- "[", "]", "|", "(", ")", "-")
- for char in specialCharacters:
- string = string.replace(char, "\\" + char)
-
- return string
-
-# output from the above
-nonXmlNameBMPRegexp = re.compile('[\x00-,/:-@\\[-\\^`\\{-\xb6\xb8-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u02cf\u02d2-\u02ff\u0346-\u035f\u0362-\u0385\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482\u0487-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u0590\u05a2\u05ba\u05be\u05c0\u05c3\u05c5-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u063f\u0653-\u065f\u066a-\u066f\u06b8-\u06b9\u06bf\u06cf\u06d4\u06e9\u06ee-\u06ef\u06fa-\u0900\u0904\u093a-\u093b\u094e-\u0950\u0955-\u0957\u0964-\u0965\u0970-\u0980\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09bb\u09bd\u09c5-\u09c6\u09c9-\u09ca\u09ce-\u09d6\u09d8-\u09db\u09de\u09e4-\u09e5\u09f2-\u0a01\u0a03-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a3b\u0a3d\u0a43-\u0a46\u0a49-\u0a4a\u0a4e-\u0a58\u0a5d\u0a5f-\u0a65\u0a75-\u0a80\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abb\u0ac6\u0aca\u0ace-\u0adf\u0ae1-\u0ae5\u0af0-\u0b00\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3b\u0b44-\u0b46\u0b49-\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b62-\u0b65\u0b70-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce-\u0bd6\u0bd8-\u0be6\u0bf0-\u0c00\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c3d\u0c45\u0c49\u0c4e-\u0c54\u0c57-\u0c5f\u0c62-\u0c65\u0c70-\u0c81\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cbd\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce2-\u0ce5\u0cf0-\u0d01\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d3d\u0d44-\u0d45\u0d49\u0d4e-\u0d56\u0d58-\u0d5f\u0d62-\u0d65\u0d70-\u0e00\u0e2f\u0e3b-\u0e3f\u0e4f\u0e5a-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eba\u0ebe-\u0ebf\u0ec5\u0ec7\u0ece-\u0ecf\u0eda-\u0f17\u0f1a-\u0f1f\u0f2a-\u0f34\u0f36\u0f38\u0f3a-\u0f3d\u0f48\u0f6a-\u0f70\u0f85\u0f8c-\u0f8f\u0f96\u0f98\u0fae-\u0fb0\u0fb8\u0fba-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u20cf\u20dd-\u20e0\u20e2-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3004\u3006\u3008-\u3020\u3030\u3036-\u3040\u3095-\u3098\u309b-\u309c\u309f-\u30a0\u30fb\u30ff-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]')
-
-nonXmlNameFirstBMPRegexp = re.compile('[\x00-@\\[-\\^`\\{-\xbf\xd7\xf7\u0132-\u0133\u013f-\u0140\u0149\u017f\u01c4-\u01cc\u01f1-\u01f3\u01f6-\u01f9\u0218-\u024f\u02a9-\u02ba\u02c2-\u0385\u0387\u038b\u038d\u03a2\u03cf\u03d7-\u03d9\u03db\u03dd\u03df\u03e1\u03f4-\u0400\u040d\u0450\u045d\u0482-\u048f\u04c5-\u04c6\u04c9-\u04ca\u04cd-\u04cf\u04ec-\u04ed\u04f6-\u04f7\u04fa-\u0530\u0557-\u0558\u055a-\u0560\u0587-\u05cf\u05eb-\u05ef\u05f3-\u0620\u063b-\u0640\u064b-\u0670\u06b8-\u06b9\u06bf\u06cf\u06d4\u06d6-\u06e4\u06e7-\u0904\u093a-\u093c\u093e-\u0957\u0962-\u0984\u098d-\u098e\u0991-\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba-\u09db\u09de\u09e2-\u09ef\u09f2-\u0a04\u0a0b-\u0a0e\u0a11-\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a-\u0a58\u0a5d\u0a5f-\u0a71\u0a75-\u0a84\u0a8c\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba-\u0abc\u0abe-\u0adf\u0ae1-\u0b04\u0b0d-\u0b0e\u0b11-\u0b12\u0b29\u0b31\u0b34-\u0b35\u0b3a-\u0b3c\u0b3e-\u0b5b\u0b5e\u0b62-\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bb6\u0bba-\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c5f\u0c62-\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba-\u0cdd\u0cdf\u0ce2-\u0d04\u0d0d\u0d11\u0d29\u0d3a-\u0d5f\u0d62-\u0e00\u0e2f\u0e31\u0e34-\u0e3f\u0e46-\u0e80\u0e83\u0e85-\u0e86\u0e89\u0e8b-\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8-\u0ea9\u0eac\u0eaf\u0eb1\u0eb4-\u0ebc\u0ebe-\u0ebf\u0ec5-\u0f3f\u0f48\u0f6a-\u109f\u10c6-\u10cf\u10f7-\u10ff\u1101\u1104\u1108\u110a\u110d\u1113-\u113b\u113d\u113f\u1141-\u114b\u114d\u114f\u1151-\u1153\u1156-\u1158\u115a-\u115e\u1162\u1164\u1166\u1168\u116a-\u116c\u116f-\u1171\u1174\u1176-\u119d\u119f-\u11a7\u11a9-\u11aa\u11ac-\u11ad\u11b0-\u11b6\u11b9\u11bb\u11c3-\u11ea\u11ec-\u11ef\u11f1-\u11f8\u11fa-\u1dff\u1e9c-\u1e9f\u1efa-\u1eff\u1f16-\u1f17\u1f1e-\u1f1f\u1f46-\u1f47\u1f4e-\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e-\u1f7f\u1fb5\u1fbd\u1fbf-\u1fc1\u1fc5\u1fcd-\u1fcf\u1fd4-\u1fd5\u1fdc-\u1fdf\u1fed-\u1ff1\u1ff5\u1ffd-\u2125\u2127-\u2129\u212c-\u212d\u212f-\u217f\u2183-\u3006\u3008-\u3020\u302a-\u3040\u3095-\u30a0\u30fb-\u3104\u312d-\u4dff\u9fa6-\uabff\ud7a4-\uffff]')
-
-# Simpler things
-nonPubidCharRegexp = re.compile("[^\x20\x0D\x0Aa-zA-Z0-9\-\'()+,./:=?;!*#@$_%]")
-
-
-class InfosetFilter(object):
- replacementRegexp = re.compile(r"U[\dA-F]{5,5}")
-
- def __init__(self, replaceChars=None,
- dropXmlnsLocalName=False,
- dropXmlnsAttrNs=False,
- preventDoubleDashComments=False,
- preventDashAtCommentEnd=False,
- replaceFormFeedCharacters=True,
- preventSingleQuotePubid=False):
-
- self.dropXmlnsLocalName = dropXmlnsLocalName
- self.dropXmlnsAttrNs = dropXmlnsAttrNs
-
- self.preventDoubleDashComments = preventDoubleDashComments
- self.preventDashAtCommentEnd = preventDashAtCommentEnd
-
- self.replaceFormFeedCharacters = replaceFormFeedCharacters
-
- self.preventSingleQuotePubid = preventSingleQuotePubid
-
- self.replaceCache = {}
-
- def coerceAttribute(self, name, namespace=None):
- if self.dropXmlnsLocalName and name.startswith("xmlns:"):
- warnings.warn("Attributes cannot begin with xmlns", DataLossWarning)
- return None
- elif (self.dropXmlnsAttrNs and
- namespace == "http://www.w3.org/2000/xmlns/"):
- warnings.warn("Attributes cannot be in the xml namespace", DataLossWarning)
- return None
- else:
- return self.toXmlName(name)
-
- def coerceElement(self, name, namespace=None):
- return self.toXmlName(name)
-
- def coerceComment(self, data):
- if self.preventDoubleDashComments:
- while "--" in data:
- warnings.warn("Comments cannot contain adjacent dashes", DataLossWarning)
- data = data.replace("--", "- -")
- return data
-
- def coerceCharacters(self, data):
- if self.replaceFormFeedCharacters:
- for i in range(data.count("\x0C")):
- warnings.warn("Text cannot contain U+000C", DataLossWarning)
- data = data.replace("\x0C", " ")
- # Other non-xml characters
- return data
-
- def coercePubid(self, data):
- dataOutput = data
- for char in nonPubidCharRegexp.findall(data):
- warnings.warn("Coercing non-XML pubid", DataLossWarning)
- replacement = self.getReplacementCharacter(char)
- dataOutput = dataOutput.replace(char, replacement)
- if self.preventSingleQuotePubid and dataOutput.find("'") >= 0:
- warnings.warn("Pubid cannot contain single quote", DataLossWarning)
- dataOutput = dataOutput.replace("'", self.getReplacementCharacter("'"))
- return dataOutput
-
- def toXmlName(self, name):
- nameFirst = name[0]
- nameRest = name[1:]
- m = nonXmlNameFirstBMPRegexp.match(nameFirst)
- if m:
- warnings.warn("Coercing non-XML name", DataLossWarning)
- nameFirstOutput = self.getReplacementCharacter(nameFirst)
- else:
- nameFirstOutput = nameFirst
-
- nameRestOutput = nameRest
- replaceChars = set(nonXmlNameBMPRegexp.findall(nameRest))
- for char in replaceChars:
- warnings.warn("Coercing non-XML name", DataLossWarning)
- replacement = self.getReplacementCharacter(char)
- nameRestOutput = nameRestOutput.replace(char, replacement)
- return nameFirstOutput + nameRestOutput
-
- def getReplacementCharacter(self, char):
- if char in self.replaceCache:
- replacement = self.replaceCache[char]
- else:
- replacement = self.escapeChar(char)
- return replacement
-
- def fromXmlName(self, name):
- for item in set(self.replacementRegexp.findall(name)):
- name = name.replace(item, self.unescapeChar(item))
- return name
-
- def escapeChar(self, char):
- replacement = "U%05X" % ord(char)
- self.replaceCache[char] = replacement
- return replacement
-
- def unescapeChar(self, charcode):
- return chr(int(charcode[1:], 16))
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/inputstream.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/inputstream.py
deleted file mode 100644
index 7020aa60f6a..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/inputstream.py
+++ /dev/null
@@ -1,903 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type
-from six.moves import http_client
-
-import codecs
-import re
-
-from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
-from .constants import encodings, ReparseException
-from . import utils
-
-from io import StringIO
-
-try:
- from io import BytesIO
-except ImportError:
- BytesIO = StringIO
-
-try:
- from io import BufferedIOBase
-except ImportError:
- class BufferedIOBase(object):
- pass
-
-# Non-unicode versions of constants for use in the pre-parser
-spaceCharactersBytes = frozenset([item.encode("ascii") for item in spaceCharacters])
-asciiLettersBytes = frozenset([item.encode("ascii") for item in asciiLetters])
-asciiUppercaseBytes = frozenset([item.encode("ascii") for item in asciiUppercase])
-spacesAngleBrackets = spaceCharactersBytes | frozenset([b">", b"<"])
-
-
-invalid_unicode_no_surrogate = "[\u0001-\u0008\u000B\u000E-\u001F\u007F-\u009F\uFDD0-\uFDEF\uFFFE\uFFFF\U0001FFFE\U0001FFFF\U0002FFFE\U0002FFFF\U0003FFFE\U0003FFFF\U0004FFFE\U0004FFFF\U0005FFFE\U0005FFFF\U0006FFFE\U0006FFFF\U0007FFFE\U0007FFFF\U0008FFFE\U0008FFFF\U0009FFFE\U0009FFFF\U000AFFFE\U000AFFFF\U000BFFFE\U000BFFFF\U000CFFFE\U000CFFFF\U000DFFFE\U000DFFFF\U000EFFFE\U000EFFFF\U000FFFFE\U000FFFFF\U0010FFFE\U0010FFFF]"
-
-if utils.supports_lone_surrogates:
- # Use one extra step of indirection and create surrogates with
- # unichr. Not using this indirection would introduce an illegal
- # unicode literal on platforms not supporting such lone
- # surrogates.
- invalid_unicode_re = re.compile(invalid_unicode_no_surrogate +
- eval('"\\uD800-\\uDFFF"'))
-else:
- invalid_unicode_re = re.compile(invalid_unicode_no_surrogate)
-
-non_bmp_invalid_codepoints = set([0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
- 0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE, 0x5FFFF,
- 0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE,
- 0x8FFFF, 0x9FFFE, 0x9FFFF, 0xAFFFE, 0xAFFFF,
- 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE,
- 0xDFFFF, 0xEFFFE, 0xEFFFF, 0xFFFFE, 0xFFFFF,
- 0x10FFFE, 0x10FFFF])
-
-ascii_punctuation_re = re.compile("[\u0009-\u000D\u0020-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]")
-
-# Cache for charsUntil()
-charsUntilRegEx = {}
-
-
-class BufferedStream(object):
- """Buffering for streams that do not have buffering of their own
-
- The buffer is implemented as a list of chunks on the assumption that
- joining many strings will be slow since it is O(n**2)
- """
-
- def __init__(self, stream):
- self.stream = stream
- self.buffer = []
- self.position = [-1, 0] # chunk number, offset
-
- def tell(self):
- pos = 0
- for chunk in self.buffer[:self.position[0]]:
- pos += len(chunk)
- pos += self.position[1]
- return pos
-
- def seek(self, pos):
- assert pos <= self._bufferedBytes()
- offset = pos
- i = 0
- while len(self.buffer[i]) < offset:
- offset -= len(self.buffer[i])
- i += 1
- self.position = [i, offset]
-
- def read(self, bytes):
- if not self.buffer:
- return self._readStream(bytes)
- elif (self.position[0] == len(self.buffer) and
- self.position[1] == len(self.buffer[-1])):
- return self._readStream(bytes)
- else:
- return self._readFromBuffer(bytes)
-
- def _bufferedBytes(self):
- return sum([len(item) for item in self.buffer])
-
- def _readStream(self, bytes):
- data = self.stream.read(bytes)
- self.buffer.append(data)
- self.position[0] += 1
- self.position[1] = len(data)
- return data
-
- def _readFromBuffer(self, bytes):
- remainingBytes = bytes
- rv = []
- bufferIndex = self.position[0]
- bufferOffset = self.position[1]
- while bufferIndex < len(self.buffer) and remainingBytes != 0:
- assert remainingBytes > 0
- bufferedData = self.buffer[bufferIndex]
-
- if remainingBytes <= len(bufferedData) - bufferOffset:
- bytesToRead = remainingBytes
- self.position = [bufferIndex, bufferOffset + bytesToRead]
- else:
- bytesToRead = len(bufferedData) - bufferOffset
- self.position = [bufferIndex, len(bufferedData)]
- bufferIndex += 1
- rv.append(bufferedData[bufferOffset:bufferOffset + bytesToRead])
- remainingBytes -= bytesToRead
-
- bufferOffset = 0
-
- if remainingBytes:
- rv.append(self._readStream(remainingBytes))
-
- return b"".join(rv)
-
-
-def HTMLInputStream(source, encoding=None, parseMeta=True, chardet=True):
- if isinstance(source, http_client.HTTPResponse):
- # Work around Python bug #20007: read(0) closes the connection.
- # http://bugs.python.org/issue20007
- isUnicode = False
- elif hasattr(source, "read"):
- isUnicode = isinstance(source.read(0), text_type)
- else:
- isUnicode = isinstance(source, text_type)
-
- if isUnicode:
- if encoding is not None:
- raise TypeError("Cannot explicitly set an encoding with a unicode string")
-
- return HTMLUnicodeInputStream(source)
- else:
- return HTMLBinaryInputStream(source, encoding, parseMeta, chardet)
-
-
-class HTMLUnicodeInputStream(object):
- """Provides a unicode stream of characters to the HTMLTokenizer.
-
- This class takes care of character encoding and removing or replacing
- incorrect byte-sequences and also provides column and line tracking.
-
- """
-
- _defaultChunkSize = 10240
-
- def __init__(self, source):
- """Initialises the HTMLInputStream.
-
- HTMLInputStream(source, [encoding]) -> Normalized stream from source
- for use by html5lib.
-
- source can be either a file-object, local filename or a string.
-
- The optional encoding parameter must be a string that indicates
- the encoding. If specified, that encoding will be used,
- regardless of any BOM or later declaration (such as in a meta
- element)
-
- parseMeta - Look for a <meta> element containing encoding information
-
- """
-
- if not utils.supports_lone_surrogates:
- # Such platforms will have already checked for such
- # surrogate errors, so no need to do this checking.
- self.reportCharacterErrors = None
- self.replaceCharactersRegexp = None
- elif len("\U0010FFFF") == 1:
- self.reportCharacterErrors = self.characterErrorsUCS4
- self.replaceCharactersRegexp = re.compile(eval('"[\\uD800-\\uDFFF]"'))
- else:
- self.reportCharacterErrors = self.characterErrorsUCS2
- self.replaceCharactersRegexp = re.compile(
- eval('"([\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?<![\\uD800-\\uDBFF])[\\uDC00-\\uDFFF])"'))
-
- # List of where new lines occur
- self.newLines = [0]
-
- self.charEncoding = ("utf-8", "certain")
- self.dataStream = self.openStream(source)
-
- self.reset()
-
- def reset(self):
- self.chunk = ""
- self.chunkSize = 0
- self.chunkOffset = 0
- self.errors = []
-
- # number of (complete) lines in previous chunks
- self.prevNumLines = 0
- # number of columns in the last line of the previous chunk
- self.prevNumCols = 0
-
- # Deal with CR LF and surrogates split over chunk boundaries
- self._bufferedCharacter = None
-
- def openStream(self, source):
- """Produces a file object from source.
-
- source can be either a file object, local filename or a string.
-
- """
- # Already a file object
- if hasattr(source, 'read'):
- stream = source
- else:
- stream = StringIO(source)
-
- return stream
-
- def _position(self, offset):
- chunk = self.chunk
- nLines = chunk.count('\n', 0, offset)
- positionLine = self.prevNumLines + nLines
- lastLinePos = chunk.rfind('\n', 0, offset)
- if lastLinePos == -1:
- positionColumn = self.prevNumCols + offset
- else:
- positionColumn = offset - (lastLinePos + 1)
- return (positionLine, positionColumn)
-
- def position(self):
- """Returns (line, col) of the current position in the stream."""
- line, col = self._position(self.chunkOffset)
- return (line + 1, col)
-
- def char(self):
- """ Read one character from the stream or queue if available. Return
- EOF when EOF is reached.
- """
- # Read a new chunk from the input stream if necessary
- if self.chunkOffset >= self.chunkSize:
- if not self.readChunk():
- return EOF
-
- chunkOffset = self.chunkOffset
- char = self.chunk[chunkOffset]
- self.chunkOffset = chunkOffset + 1
-
- return char
-
- def readChunk(self, chunkSize=None):
- if chunkSize is None:
- chunkSize = self._defaultChunkSize
-
- self.prevNumLines, self.prevNumCols = self._position(self.chunkSize)
-
- self.chunk = ""
- self.chunkSize = 0
- self.chunkOffset = 0
-
- data = self.dataStream.read(chunkSize)
-
- # Deal with CR LF and surrogates broken across chunks
- if self._bufferedCharacter:
- data = self._bufferedCharacter + data
- self._bufferedCharacter = None
- elif not data:
- # We have no more data, bye-bye stream
- return False
-
- if len(data) > 1:
- lastv = ord(data[-1])
- if lastv == 0x0D or 0xD800 <= lastv <= 0xDBFF:
- self._bufferedCharacter = data[-1]
- data = data[:-1]
-
- if self.reportCharacterErrors:
- self.reportCharacterErrors(data)
-
- # Replace invalid characters
- # Note U+0000 is dealt with in the tokenizer
- data = self.replaceCharactersRegexp.sub("\ufffd", data)
-
- data = data.replace("\r\n", "\n")
- data = data.replace("\r", "\n")
-
- self.chunk = data
- self.chunkSize = len(data)
-
- return True
-
- def characterErrorsUCS4(self, data):
- for i in range(len(invalid_unicode_re.findall(data))):
- self.errors.append("invalid-codepoint")
-
- def characterErrorsUCS2(self, data):
- # Someone picked the wrong compile option
- # You lose
- skip = False
- for match in invalid_unicode_re.finditer(data):
- if skip:
- continue
- codepoint = ord(match.group())
- pos = match.start()
- # Pretty sure there should be endianness issues here
- if utils.isSurrogatePair(data[pos:pos + 2]):
- # We have a surrogate pair!
- char_val = utils.surrogatePairToCodepoint(data[pos:pos + 2])
- if char_val in non_bmp_invalid_codepoints:
- self.errors.append("invalid-codepoint")
- skip = True
- elif (codepoint >= 0xD800 and codepoint <= 0xDFFF and
- pos == len(data) - 1):
- self.errors.append("invalid-codepoint")
- else:
- skip = False
- self.errors.append("invalid-codepoint")
-
- def charsUntil(self, characters, opposite=False):
- """ Returns a string of characters from the stream up to but not
- including any character in 'characters' or EOF. 'characters' must be
- a container that supports the 'in' method and iteration over its
- characters.
- """
-
- # Use a cache of regexps to find the required characters
- try:
- chars = charsUntilRegEx[(characters, opposite)]
- except KeyError:
- if __debug__:
- for c in characters:
- assert(ord(c) < 128)
- regex = "".join(["\\x%02x" % ord(c) for c in characters])
- if not opposite:
- regex = "^%s" % regex
- chars = charsUntilRegEx[(characters, opposite)] = re.compile("[%s]+" % regex)
-
- rv = []
-
- while True:
- # Find the longest matching prefix
- m = chars.match(self.chunk, self.chunkOffset)
- if m is None:
- # If nothing matched, and it wasn't because we ran out of chunk,
- # then stop
- if self.chunkOffset != self.chunkSize:
- break
- else:
- end = m.end()
- # If not the whole chunk matched, return everything
- # up to the part that didn't match
- if end != self.chunkSize:
- rv.append(self.chunk[self.chunkOffset:end])
- self.chunkOffset = end
- break
- # If the whole remainder of the chunk matched,
- # use it all and read the next chunk
- rv.append(self.chunk[self.chunkOffset:])
- if not self.readChunk():
- # Reached EOF
- break
-
- r = "".join(rv)
- return r
-
- def unget(self, char):
- # Only one character is allowed to be ungotten at once - it must
- # be consumed again before any further call to unget
- if char is not None:
- if self.chunkOffset == 0:
- # unget is called quite rarely, so it's a good idea to do
- # more work here if it saves a bit of work in the frequently
- # called char and charsUntil.
- # So, just prepend the ungotten character onto the current
- # chunk:
- self.chunk = char + self.chunk
- self.chunkSize += 1
- else:
- self.chunkOffset -= 1
- assert self.chunk[self.chunkOffset] == char
-
-
-class HTMLBinaryInputStream(HTMLUnicodeInputStream):
- """Provides a unicode stream of characters to the HTMLTokenizer.
-
- This class takes care of character encoding and removing or replacing
- incorrect byte-sequences and also provides column and line tracking.
-
- """
-
- def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
- """Initialises the HTMLInputStream.
-
- HTMLInputStream(source, [encoding]) -> Normalized stream from source
- for use by html5lib.
-
- source can be either a file-object, local filename or a string.
-
- The optional encoding parameter must be a string that indicates
- the encoding. If specified, that encoding will be used,
- regardless of any BOM or later declaration (such as in a meta
- element)
-
- parseMeta - Look for a <meta> element containing encoding information
-
- """
- # Raw Stream - for unicode objects this will encode to utf-8 and set
- # self.charEncoding as appropriate
- self.rawStream = self.openStream(source)
-
- HTMLUnicodeInputStream.__init__(self, self.rawStream)
-
- self.charEncoding = (codecName(encoding), "certain")
-
- # Encoding Information
- # Number of bytes to use when looking for a meta element with
- # encoding information
- self.numBytesMeta = 512
- # Number of bytes to use when using detecting encoding using chardet
- self.numBytesChardet = 100
- # Encoding to use if no other information can be found
- self.defaultEncoding = "windows-1252"
-
- # Detect encoding iff no explicit "transport level" encoding is supplied
- if (self.charEncoding[0] is None):
- self.charEncoding = self.detectEncoding(parseMeta, chardet)
-
- # Call superclass
- self.reset()
-
- def reset(self):
- self.dataStream = codecs.getreader(self.charEncoding[0])(self.rawStream,
- 'replace')
- HTMLUnicodeInputStream.reset(self)
-
- def openStream(self, source):
- """Produces a file object from source.
-
- source can be either a file object, local filename or a string.
-
- """
- # Already a file object
- if hasattr(source, 'read'):
- stream = source
- else:
- stream = BytesIO(source)
-
- try:
- stream.seek(stream.tell())
- except:
- stream = BufferedStream(stream)
-
- return stream
-
- def detectEncoding(self, parseMeta=True, chardet=True):
- # First look for a BOM
- # This will also read past the BOM if present
- encoding = self.detectBOM()
- confidence = "certain"
- # If there is no BOM need to look for meta elements with encoding
- # information
- if encoding is None and parseMeta:
- encoding = self.detectEncodingMeta()
- confidence = "tentative"
- # Guess with chardet, if avaliable
- if encoding is None and chardet:
- confidence = "tentative"
- try:
- try:
- from charade.universaldetector import UniversalDetector
- except ImportError:
- from chardet.universaldetector import UniversalDetector
- buffers = []
- detector = UniversalDetector()
- while not detector.done:
- buffer = self.rawStream.read(self.numBytesChardet)
- assert isinstance(buffer, bytes)
- if not buffer:
- break
- buffers.append(buffer)
- detector.feed(buffer)
- detector.close()
- encoding = detector.result['encoding']
- self.rawStream.seek(0)
- except ImportError:
- pass
- # If all else fails use the default encoding
- if encoding is None:
- confidence = "tentative"
- encoding = self.defaultEncoding
-
- # Substitute for equivalent encodings:
- encodingSub = {"iso-8859-1": "windows-1252"}
-
- if encoding.lower() in encodingSub:
- encoding = encodingSub[encoding.lower()]
-
- return encoding, confidence
-
- def changeEncoding(self, newEncoding):
- assert self.charEncoding[1] != "certain"
- newEncoding = codecName(newEncoding)
- if newEncoding in ("utf-16", "utf-16-be", "utf-16-le"):
- newEncoding = "utf-8"
- if newEncoding is None:
- return
- elif newEncoding == self.charEncoding[0]:
- self.charEncoding = (self.charEncoding[0], "certain")
- else:
- self.rawStream.seek(0)
- self.reset()
- self.charEncoding = (newEncoding, "certain")
- raise ReparseException("Encoding changed from %s to %s" % (self.charEncoding[0], newEncoding))
-
- def detectBOM(self):
- """Attempts to detect at BOM at the start of the stream. If
- an encoding can be determined from the BOM return the name of the
- encoding otherwise return None"""
- bomDict = {
- codecs.BOM_UTF8: 'utf-8',
- codecs.BOM_UTF16_LE: 'utf-16-le', codecs.BOM_UTF16_BE: 'utf-16-be',
- codecs.BOM_UTF32_LE: 'utf-32-le', codecs.BOM_UTF32_BE: 'utf-32-be'
- }
-
- # Go to beginning of file and read in 4 bytes
- string = self.rawStream.read(4)
- assert isinstance(string, bytes)
-
- # Try detecting the BOM using bytes from the string
- encoding = bomDict.get(string[:3]) # UTF-8
- seek = 3
- if not encoding:
- # Need to detect UTF-32 before UTF-16
- encoding = bomDict.get(string) # UTF-32
- seek = 4
- if not encoding:
- encoding = bomDict.get(string[:2]) # UTF-16
- seek = 2
-
- # Set the read position past the BOM if one was found, otherwise
- # set it to the start of the stream
- self.rawStream.seek(encoding and seek or 0)
-
- return encoding
-
- def detectEncodingMeta(self):
- """Report the encoding declared by the meta element
- """
- buffer = self.rawStream.read(self.numBytesMeta)
- assert isinstance(buffer, bytes)
- parser = EncodingParser(buffer)
- self.rawStream.seek(0)
- encoding = parser.getEncoding()
-
- if encoding in ("utf-16", "utf-16-be", "utf-16-le"):
- encoding = "utf-8"
-
- return encoding
-
-
-class EncodingBytes(bytes):
- """String-like object with an associated position and various extra methods
- If the position is ever greater than the string length then an exception is
- raised"""
- def __new__(self, value):
- assert isinstance(value, bytes)
- return bytes.__new__(self, value.lower())
-
- def __init__(self, value):
- self._position = -1
-
- def __iter__(self):
- return self
-
- def __next__(self):
- p = self._position = self._position + 1
- if p >= len(self):
- raise StopIteration
- elif p < 0:
- raise TypeError
- return self[p:p + 1]
-
- def next(self):
- # Py2 compat
- return self.__next__()
-
- def previous(self):
- p = self._position
- if p >= len(self):
- raise StopIteration
- elif p < 0:
- raise TypeError
- self._position = p = p - 1
- return self[p:p + 1]
-
- def setPosition(self, position):
- if self._position >= len(self):
- raise StopIteration
- self._position = position
-
- def getPosition(self):
- if self._position >= len(self):
- raise StopIteration
- if self._position >= 0:
- return self._position
- else:
- return None
-
- position = property(getPosition, setPosition)
-
- def getCurrentByte(self):
- return self[self.position:self.position + 1]
-
- currentByte = property(getCurrentByte)
-
- def skip(self, chars=spaceCharactersBytes):
- """Skip past a list of characters"""
- p = self.position # use property for the error-checking
- while p < len(self):
- c = self[p:p + 1]
- if c not in chars:
- self._position = p
- return c
- p += 1
- self._position = p
- return None
-
- def skipUntil(self, chars):
- p = self.position
- while p < len(self):
- c = self[p:p + 1]
- if c in chars:
- self._position = p
- return c
- p += 1
- self._position = p
- return None
-
- def matchBytes(self, bytes):
- """Look for a sequence of bytes at the start of a string. If the bytes
- are found return True and advance the position to the byte after the
- match. Otherwise return False and leave the position alone"""
- p = self.position
- data = self[p:p + len(bytes)]
- rv = data.startswith(bytes)
- if rv:
- self.position += len(bytes)
- return rv
-
- def jumpTo(self, bytes):
- """Look for the next sequence of bytes matching a given sequence. If
- a match is found advance the position to the last byte of the match"""
- newPosition = self[self.position:].find(bytes)
- if newPosition > -1:
- # XXX: This is ugly, but I can't see a nicer way to fix this.
- if self._position == -1:
- self._position = 0
- self._position += (newPosition + len(bytes) - 1)
- return True
- else:
- raise StopIteration
-
-
-class EncodingParser(object):
- """Mini parser for detecting character encoding from meta elements"""
-
- def __init__(self, data):
- """string - the data to work on for encoding detection"""
- self.data = EncodingBytes(data)
- self.encoding = None
-
- def getEncoding(self):
- methodDispatch = (
- (b"<!--", self.handleComment),
- (b"<meta", self.handleMeta),
- (b"</", self.handlePossibleEndTag),
- (b"<!", self.handleOther),
- (b"<?", self.handleOther),
- (b"<", self.handlePossibleStartTag))
- for byte in self.data:
- keepParsing = True
- for key, method in methodDispatch:
- if self.data.matchBytes(key):
- try:
- keepParsing = method()
- break
- except StopIteration:
- keepParsing = False
- break
- if not keepParsing:
- break
-
- return self.encoding
-
- def handleComment(self):
- """Skip over comments"""
- return self.data.jumpTo(b"-->")
-
- def handleMeta(self):
- if self.data.currentByte not in spaceCharactersBytes:
- # if we have <meta not followed by a space so just keep going
- return True
- # We have a valid meta element we want to search for attributes
- hasPragma = False
- pendingEncoding = None
- while True:
- # Try to find the next attribute after the current position
- attr = self.getAttribute()
- if attr is None:
- return True
- else:
- if attr[0] == b"http-equiv":
- hasPragma = attr[1] == b"content-type"
- if hasPragma and pendingEncoding is not None:
- self.encoding = pendingEncoding
- return False
- elif attr[0] == b"charset":
- tentativeEncoding = attr[1]
- codec = codecName(tentativeEncoding)
- if codec is not None:
- self.encoding = codec
- return False
- elif attr[0] == b"content":
- contentParser = ContentAttrParser(EncodingBytes(attr[1]))
- tentativeEncoding = contentParser.parse()
- if tentativeEncoding is not None:
- codec = codecName(tentativeEncoding)
- if codec is not None:
- if hasPragma:
- self.encoding = codec
- return False
- else:
- pendingEncoding = codec
-
- def handlePossibleStartTag(self):
- return self.handlePossibleTag(False)
-
- def handlePossibleEndTag(self):
- next(self.data)
- return self.handlePossibleTag(True)
-
- def handlePossibleTag(self, endTag):
- data = self.data
- if data.currentByte not in asciiLettersBytes:
- # If the next byte is not an ascii letter either ignore this
- # fragment (possible start tag case) or treat it according to
- # handleOther
- if endTag:
- data.previous()
- self.handleOther()
- return True
-
- c = data.skipUntil(spacesAngleBrackets)
- if c == b"<":
- # return to the first step in the overall "two step" algorithm
- # reprocessing the < byte
- data.previous()
- else:
- # Read all attributes
- attr = self.getAttribute()
- while attr is not None:
- attr = self.getAttribute()
- return True
-
- def handleOther(self):
- return self.data.jumpTo(b">")
-
- def getAttribute(self):
- """Return a name,value pair for the next attribute in the stream,
- if one is found, or None"""
- data = self.data
- # Step 1 (skip chars)
- c = data.skip(spaceCharactersBytes | frozenset([b"/"]))
- assert c is None or len(c) == 1
- # Step 2
- if c in (b">", None):
- return None
- # Step 3
- attrName = []
- attrValue = []
- # Step 4 attribute name
- while True:
- if c == b"=" and attrName:
- break
- elif c in spaceCharactersBytes:
- # Step 6!
- c = data.skip()
- break
- elif c in (b"/", b">"):
- return b"".join(attrName), b""
- elif c in asciiUppercaseBytes:
- attrName.append(c.lower())
- elif c is None:
- return None
- else:
- attrName.append(c)
- # Step 5
- c = next(data)
- # Step 7
- if c != b"=":
- data.previous()
- return b"".join(attrName), b""
- # Step 8
- next(data)
- # Step 9
- c = data.skip()
- # Step 10
- if c in (b"'", b'"'):
- # 10.1
- quoteChar = c
- while True:
- # 10.2
- c = next(data)
- # 10.3
- if c == quoteChar:
- next(data)
- return b"".join(attrName), b"".join(attrValue)
- # 10.4
- elif c in asciiUppercaseBytes:
- attrValue.append(c.lower())
- # 10.5
- else:
- attrValue.append(c)
- elif c == b">":
- return b"".join(attrName), b""
- elif c in asciiUppercaseBytes:
- attrValue.append(c.lower())
- elif c is None:
- return None
- else:
- attrValue.append(c)
- # Step 11
- while True:
- c = next(data)
- if c in spacesAngleBrackets:
- return b"".join(attrName), b"".join(attrValue)
- elif c in asciiUppercaseBytes:
- attrValue.append(c.lower())
- elif c is None:
- return None
- else:
- attrValue.append(c)
-
-
-class ContentAttrParser(object):
- def __init__(self, data):
- assert isinstance(data, bytes)
- self.data = data
-
- def parse(self):
- try:
- # Check if the attr name is charset
- # otherwise return
- self.data.jumpTo(b"charset")
- self.data.position += 1
- self.data.skip()
- if not self.data.currentByte == b"=":
- # If there is no = sign keep looking for attrs
- return None
- self.data.position += 1
- self.data.skip()
- # Look for an encoding between matching quote marks
- if self.data.currentByte in (b'"', b"'"):
- quoteMark = self.data.currentByte
- self.data.position += 1
- oldPosition = self.data.position
- if self.data.jumpTo(quoteMark):
- return self.data[oldPosition:self.data.position]
- else:
- return None
- else:
- # Unquoted value
- oldPosition = self.data.position
- try:
- self.data.skipUntil(spaceCharactersBytes)
- return self.data[oldPosition:self.data.position]
- except StopIteration:
- # Return the whole remaining value
- return self.data[oldPosition:]
- except StopIteration:
- return None
-
-
-def codecName(encoding):
- """Return the python codec name corresponding to an encoding or None if the
- string doesn't correspond to a valid encoding."""
- if isinstance(encoding, bytes):
- try:
- encoding = encoding.decode("ascii")
- except UnicodeDecodeError:
- return None
- if encoding:
- canonicalName = ascii_punctuation_re.sub("", encoding).lower()
- return encodings.get(canonicalName, None)
- else:
- return None
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/sanitizer.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/sanitizer.py
deleted file mode 100644
index 2cef2655544..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/sanitizer.py
+++ /dev/null
@@ -1,296 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-import re
-from xml.sax.saxutils import escape, unescape
-from six.moves import urllib_parse as urlparse
-
-from .tokenizer import HTMLTokenizer
-from .constants import tokenTypes
-
-
-content_type_rgx = re.compile(r'''
- ^
- # Match a content type <application>/<type>
- (?P<content_type>[-a-zA-Z0-9.]+/[-a-zA-Z0-9.]+)
- # Match any character set and encoding
- (?:(?:;charset=(?:[-a-zA-Z0-9]+)(?:;(?:base64))?)
- |(?:;(?:base64))?(?:;charset=(?:[-a-zA-Z0-9]+))?)
- # Assume the rest is data
- ,.*
- $
- ''',
- re.VERBOSE)
-
-
-class HTMLSanitizerMixin(object):
- """ sanitization of XHTML+MathML+SVG and of inline style attributes."""
-
- acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area',
- 'article', 'aside', 'audio', 'b', 'big', 'blockquote', 'br', 'button',
- 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup',
- 'command', 'datagrid', 'datalist', 'dd', 'del', 'details', 'dfn',
- 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'event-source', 'fieldset',
- 'figcaption', 'figure', 'footer', 'font', 'form', 'header', 'h1',
- 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input', 'ins',
- 'keygen', 'kbd', 'label', 'legend', 'li', 'm', 'map', 'menu', 'meter',
- 'multicol', 'nav', 'nextid', 'ol', 'output', 'optgroup', 'option',
- 'p', 'pre', 'progress', 'q', 's', 'samp', 'section', 'select',
- 'small', 'sound', 'source', 'spacer', 'span', 'strike', 'strong',
- 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'time', 'tfoot',
- 'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'video']
-
- mathml_elements = ['maction', 'math', 'merror', 'mfrac', 'mi',
- 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom',
- 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub',
- 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',
- 'munderover', 'none']
-
- svg_elements = ['a', 'animate', 'animateColor', 'animateMotion',
- 'animateTransform', 'clipPath', 'circle', 'defs', 'desc', 'ellipse',
- 'font-face', 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern',
- 'linearGradient', 'line', 'marker', 'metadata', 'missing-glyph',
- 'mpath', 'path', 'polygon', 'polyline', 'radialGradient', 'rect',
- 'set', 'stop', 'svg', 'switch', 'text', 'title', 'tspan', 'use']
-
- acceptable_attributes = ['abbr', 'accept', 'accept-charset', 'accesskey',
- 'action', 'align', 'alt', 'autocomplete', 'autofocus', 'axis',
- 'background', 'balance', 'bgcolor', 'bgproperties', 'border',
- 'bordercolor', 'bordercolordark', 'bordercolorlight', 'bottompadding',
- 'cellpadding', 'cellspacing', 'ch', 'challenge', 'char', 'charoff',
- 'choff', 'charset', 'checked', 'cite', 'class', 'clear', 'color',
- 'cols', 'colspan', 'compact', 'contenteditable', 'controls', 'coords',
- 'data', 'datafld', 'datapagesize', 'datasrc', 'datetime', 'default',
- 'delay', 'dir', 'disabled', 'draggable', 'dynsrc', 'enctype', 'end',
- 'face', 'for', 'form', 'frame', 'galleryimg', 'gutter', 'headers',
- 'height', 'hidefocus', 'hidden', 'high', 'href', 'hreflang', 'hspace',
- 'icon', 'id', 'inputmode', 'ismap', 'keytype', 'label', 'leftspacing',
- 'lang', 'list', 'longdesc', 'loop', 'loopcount', 'loopend',
- 'loopstart', 'low', 'lowsrc', 'max', 'maxlength', 'media', 'method',
- 'min', 'multiple', 'name', 'nohref', 'noshade', 'nowrap', 'open',
- 'optimum', 'pattern', 'ping', 'point-size', 'poster', 'pqg', 'preload',
- 'prompt', 'radiogroup', 'readonly', 'rel', 'repeat-max', 'repeat-min',
- 'replace', 'required', 'rev', 'rightspacing', 'rows', 'rowspan',
- 'rules', 'scope', 'selected', 'shape', 'size', 'span', 'src', 'start',
- 'step', 'style', 'summary', 'suppress', 'tabindex', 'target',
- 'template', 'title', 'toppadding', 'type', 'unselectable', 'usemap',
- 'urn', 'valign', 'value', 'variable', 'volume', 'vspace', 'vrml',
- 'width', 'wrap', 'xml:lang']
-
- mathml_attributes = ['actiontype', 'align', 'columnalign', 'columnalign',
- 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'depth',
- 'display', 'displaystyle', 'equalcolumns', 'equalrows', 'fence',
- 'fontstyle', 'fontweight', 'frame', 'height', 'linethickness', 'lspace',
- 'mathbackground', 'mathcolor', 'mathvariant', 'mathvariant', 'maxsize',
- 'minsize', 'other', 'rowalign', 'rowalign', 'rowalign', 'rowlines',
- 'rowspacing', 'rowspan', 'rspace', 'scriptlevel', 'selection',
- 'separator', 'stretchy', 'width', 'width', 'xlink:href', 'xlink:show',
- 'xlink:type', 'xmlns', 'xmlns:xlink']
-
- svg_attributes = ['accent-height', 'accumulate', 'additive', 'alphabetic',
- 'arabic-form', 'ascent', 'attributeName', 'attributeType',
- 'baseProfile', 'bbox', 'begin', 'by', 'calcMode', 'cap-height',
- 'class', 'clip-path', 'color', 'color-rendering', 'content', 'cx',
- 'cy', 'd', 'dx', 'dy', 'descent', 'display', 'dur', 'end', 'fill',
- 'fill-opacity', 'fill-rule', 'font-family', 'font-size',
- 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'from',
- 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'gradientUnits', 'hanging',
- 'height', 'horiz-adv-x', 'horiz-origin-x', 'id', 'ideographic', 'k',
- 'keyPoints', 'keySplines', 'keyTimes', 'lang', 'marker-end',
- 'marker-mid', 'marker-start', 'markerHeight', 'markerUnits',
- 'markerWidth', 'mathematical', 'max', 'min', 'name', 'offset',
- 'opacity', 'orient', 'origin', 'overline-position',
- 'overline-thickness', 'panose-1', 'path', 'pathLength', 'points',
- 'preserveAspectRatio', 'r', 'refX', 'refY', 'repeatCount',
- 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart',
- 'rotate', 'rx', 'ry', 'slope', 'stemh', 'stemv', 'stop-color',
- 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness',
- 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap',
- 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity',
- 'stroke-width', 'systemLanguage', 'target', 'text-anchor', 'to',
- 'transform', 'type', 'u1', 'u2', 'underline-position',
- 'underline-thickness', 'unicode', 'unicode-range', 'units-per-em',
- 'values', 'version', 'viewBox', 'visibility', 'width', 'widths', 'x',
- 'x-height', 'x1', 'x2', 'xlink:actuate', 'xlink:arcrole',
- 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type',
- 'xml:base', 'xml:lang', 'xml:space', 'xmlns', 'xmlns:xlink', 'y',
- 'y1', 'y2', 'zoomAndPan']
-
- attr_val_is_uri = ['href', 'src', 'cite', 'action', 'longdesc', 'poster', 'background', 'datasrc',
- 'dynsrc', 'lowsrc', 'ping', 'poster', 'xlink:href', 'xml:base']
-
- svg_attr_val_allows_ref = ['clip-path', 'color-profile', 'cursor', 'fill',
- 'filter', 'marker', 'marker-start', 'marker-mid', 'marker-end',
- 'mask', 'stroke']
-
- svg_allow_local_href = ['altGlyph', 'animate', 'animateColor',
- 'animateMotion', 'animateTransform', 'cursor', 'feImage', 'filter',
- 'linearGradient', 'pattern', 'radialGradient', 'textpath', 'tref',
- 'set', 'use']
-
- acceptable_css_properties = ['azimuth', 'background-color',
- 'border-bottom-color', 'border-collapse', 'border-color',
- 'border-left-color', 'border-right-color', 'border-top-color', 'clear',
- 'color', 'cursor', 'direction', 'display', 'elevation', 'float', 'font',
- 'font-family', 'font-size', 'font-style', 'font-variant', 'font-weight',
- 'height', 'letter-spacing', 'line-height', 'overflow', 'pause',
- 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'richness',
- 'speak', 'speak-header', 'speak-numeral', 'speak-punctuation',
- 'speech-rate', 'stress', 'text-align', 'text-decoration', 'text-indent',
- 'unicode-bidi', 'vertical-align', 'voice-family', 'volume',
- 'white-space', 'width']
-
- acceptable_css_keywords = ['auto', 'aqua', 'black', 'block', 'blue',
- 'bold', 'both', 'bottom', 'brown', 'center', 'collapse', 'dashed',
- 'dotted', 'fuchsia', 'gray', 'green', '!important', 'italic', 'left',
- 'lime', 'maroon', 'medium', 'none', 'navy', 'normal', 'nowrap', 'olive',
- 'pointer', 'purple', 'red', 'right', 'solid', 'silver', 'teal', 'top',
- 'transparent', 'underline', 'white', 'yellow']
-
- acceptable_svg_properties = ['fill', 'fill-opacity', 'fill-rule',
- 'stroke', 'stroke-width', 'stroke-linecap', 'stroke-linejoin',
- 'stroke-opacity']
-
- acceptable_protocols = ['ed2k', 'ftp', 'http', 'https', 'irc',
- 'mailto', 'news', 'gopher', 'nntp', 'telnet', 'webcal',
- 'xmpp', 'callto', 'feed', 'urn', 'aim', 'rsync', 'tag',
- 'ssh', 'sftp', 'rtsp', 'afs', 'data']
-
- acceptable_content_types = ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/bmp', 'text/plain']
-
- # subclasses may define their own versions of these constants
- allowed_elements = acceptable_elements + mathml_elements + svg_elements
- allowed_attributes = acceptable_attributes + mathml_attributes + svg_attributes
- allowed_css_properties = acceptable_css_properties
- allowed_css_keywords = acceptable_css_keywords
- allowed_svg_properties = acceptable_svg_properties
- allowed_protocols = acceptable_protocols
- allowed_content_types = acceptable_content_types
-
- # Sanitize the +html+, escaping all elements not in ALLOWED_ELEMENTS, and
- # stripping out all # attributes not in ALLOWED_ATTRIBUTES. Style
- # attributes are parsed, and a restricted set, # specified by
- # ALLOWED_CSS_PROPERTIES and ALLOWED_CSS_KEYWORDS, are allowed through.
- # attributes in ATTR_VAL_IS_URI are scanned, and only URI schemes specified
- # in ALLOWED_PROTOCOLS are allowed.
- #
- # sanitize_html('<script> do_nasty_stuff() </script>')
- # => &lt;script> do_nasty_stuff() &lt;/script>
- # sanitize_html('<a href="javascript: sucker();">Click here for $100</a>')
- # => <a>Click here for $100</a>
- def sanitize_token(self, token):
-
- # accommodate filters which use token_type differently
- token_type = token["type"]
- if token_type in list(tokenTypes.keys()):
- token_type = tokenTypes[token_type]
-
- if token_type in (tokenTypes["StartTag"], tokenTypes["EndTag"],
- tokenTypes["EmptyTag"]):
- if token["name"] in self.allowed_elements:
- return self.allowed_token(token, token_type)
- else:
- return self.disallowed_token(token, token_type)
- elif token_type == tokenTypes["Comment"]:
- pass
- else:
- return token
-
- def allowed_token(self, token, token_type):
- if "data" in token:
- attrs = dict([(name, val) for name, val in
- token["data"][::-1]
- if name in self.allowed_attributes])
- for attr in self.attr_val_is_uri:
- if attr not in attrs:
- continue
- val_unescaped = re.sub("[`\000-\040\177-\240\s]+", '',
- unescape(attrs[attr])).lower()
- # remove replacement characters from unescaped characters
- val_unescaped = val_unescaped.replace("\ufffd", "")
- uri = urlparse.urlparse(val_unescaped)
- if uri and uri.scheme:
- if uri.scheme not in self.allowed_protocols:
- del attrs[attr]
- if uri.scheme == 'data':
- m = content_type_rgx.match(uri.path)
- if not m:
- del attrs[attr]
- elif m.group('content_type') not in self.allowed_content_types:
- del attrs[attr]
-
- for attr in self.svg_attr_val_allows_ref:
- if attr in attrs:
- attrs[attr] = re.sub(r'url\s*\(\s*[^#\s][^)]+?\)',
- ' ',
- unescape(attrs[attr]))
- if (token["name"] in self.svg_allow_local_href and
- 'xlink:href' in attrs and re.search('^\s*[^#\s].*',
- attrs['xlink:href'])):
- del attrs['xlink:href']
- if 'style' in attrs:
- attrs['style'] = self.sanitize_css(attrs['style'])
- token["data"] = [[name, val] for name, val in list(attrs.items())]
- return token
-
- def disallowed_token(self, token, token_type):
- if token_type == tokenTypes["EndTag"]:
- token["data"] = "</%s>" % token["name"]
- elif token["data"]:
- attrs = ''.join([' %s="%s"' % (k, escape(v)) for k, v in token["data"]])
- token["data"] = "<%s%s>" % (token["name"], attrs)
- else:
- token["data"] = "<%s>" % token["name"]
- if token.get("selfClosing"):
- token["data"] = token["data"][:-1] + "/>"
-
- if token["type"] in list(tokenTypes.keys()):
- token["type"] = "Characters"
- else:
- token["type"] = tokenTypes["Characters"]
-
- del token["name"]
- return token
-
- def sanitize_css(self, style):
- # disallow urls
- style = re.compile('url\s*\(\s*[^\s)]+?\s*\)\s*').sub(' ', style)
-
- # gauntlet
- if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style):
- return ''
- if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style):
- return ''
-
- clean = []
- for prop, value in re.findall("([-\w]+)\s*:\s*([^:;]*)", style):
- if not value:
- continue
- if prop.lower() in self.allowed_css_properties:
- clean.append(prop + ': ' + value + ';')
- elif prop.split('-')[0].lower() in ['background', 'border', 'margin',
- 'padding']:
- for keyword in value.split():
- if keyword not in self.acceptable_css_keywords and \
- not re.match("^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$", keyword):
- break
- else:
- clean.append(prop + ': ' + value + ';')
- elif prop.lower() in self.allowed_svg_properties:
- clean.append(prop + ': ' + value + ';')
-
- return ' '.join(clean)
-
-
-class HTMLSanitizer(HTMLTokenizer, HTMLSanitizerMixin):
- def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
- lowercaseElementName=False, lowercaseAttrName=False, parser=None):
- # Change case matching defaults as we only output lowercase html anyway
- # This solution doesn't seem ideal...
- HTMLTokenizer.__init__(self, stream, encoding, parseMeta, useChardet,
- lowercaseElementName, lowercaseAttrName, parser=parser)
-
- def __iter__(self):
- for token in HTMLTokenizer.__iter__(self):
- token = self.sanitize_token(token)
- if token:
- yield token
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/__init__.py
deleted file mode 100644
index 8380839a6d3..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from .. import treewalkers
-
-from .htmlserializer import HTMLSerializer
-
-
-def serialize(input, tree="etree", format="html", encoding=None,
- **serializer_opts):
- # XXX: Should we cache this?
- walker = treewalkers.getTreeWalker(tree)
- if format == "html":
- s = HTMLSerializer(**serializer_opts)
- else:
- raise ValueError("type must be html")
- return s.render(walker(input), encoding)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/htmlserializer.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/htmlserializer.py
deleted file mode 100644
index be4d6344119..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/serializer/htmlserializer.py
+++ /dev/null
@@ -1,317 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type
-
-try:
- from functools import reduce
-except ImportError:
- pass
-
-from ..constants import voidElements, booleanAttributes, spaceCharacters
-from ..constants import rcdataElements, entities, xmlEntities
-from .. import utils
-from xml.sax.saxutils import escape
-
-spaceCharacters = "".join(spaceCharacters)
-
-try:
- from codecs import register_error, xmlcharrefreplace_errors
-except ImportError:
- unicode_encode_errors = "strict"
-else:
- unicode_encode_errors = "htmlentityreplace"
-
- encode_entity_map = {}
- is_ucs4 = len("\U0010FFFF") == 1
- for k, v in list(entities.items()):
- # skip multi-character entities
- if ((is_ucs4 and len(v) > 1) or
- (not is_ucs4 and len(v) > 2)):
- continue
- if v != "&":
- if len(v) == 2:
- v = utils.surrogatePairToCodepoint(v)
- else:
- v = ord(v)
- if v not in encode_entity_map or k.islower():
- # prefer &lt; over &LT; and similarly for &amp;, &gt;, etc.
- encode_entity_map[v] = k
-
- def htmlentityreplace_errors(exc):
- if isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
- res = []
- codepoints = []
- skip = False
- for i, c in enumerate(exc.object[exc.start:exc.end]):
- if skip:
- skip = False
- continue
- index = i + exc.start
- if utils.isSurrogatePair(exc.object[index:min([exc.end, index + 2])]):
- codepoint = utils.surrogatePairToCodepoint(exc.object[index:index + 2])
- skip = True
- else:
- codepoint = ord(c)
- codepoints.append(codepoint)
- for cp in codepoints:
- e = encode_entity_map.get(cp)
- if e:
- res.append("&")
- res.append(e)
- if not e.endswith(";"):
- res.append(";")
- else:
- res.append("&#x%s;" % (hex(cp)[2:]))
- return ("".join(res), exc.end)
- else:
- return xmlcharrefreplace_errors(exc)
-
- register_error(unicode_encode_errors, htmlentityreplace_errors)
-
- del register_error
-
-
-class HTMLSerializer(object):
-
- # attribute quoting options
- quote_attr_values = False
- quote_char = '"'
- use_best_quote_char = True
-
- # tag syntax options
- omit_optional_tags = True
- minimize_boolean_attributes = True
- use_trailing_solidus = False
- space_before_trailing_solidus = True
-
- # escaping options
- escape_lt_in_attrs = False
- escape_rcdata = False
- resolve_entities = True
-
- # miscellaneous options
- alphabetical_attributes = False
- inject_meta_charset = True
- strip_whitespace = False
- sanitize = False
-
- options = ("quote_attr_values", "quote_char", "use_best_quote_char",
- "omit_optional_tags", "minimize_boolean_attributes",
- "use_trailing_solidus", "space_before_trailing_solidus",
- "escape_lt_in_attrs", "escape_rcdata", "resolve_entities",
- "alphabetical_attributes", "inject_meta_charset",
- "strip_whitespace", "sanitize")
-
- def __init__(self, **kwargs):
- """Initialize HTMLSerializer.
-
- Keyword options (default given first unless specified) include:
-
- inject_meta_charset=True|False
- Whether it insert a meta element to define the character set of the
- document.
- quote_attr_values=True|False
- Whether to quote attribute values that don't require quoting
- per HTML5 parsing rules.
- quote_char=u'"'|u"'"
- Use given quote character for attribute quoting. Default is to
- use double quote unless attribute value contains a double quote,
- in which case single quotes are used instead.
- escape_lt_in_attrs=False|True
- Whether to escape < in attribute values.
- escape_rcdata=False|True
- Whether to escape characters that need to be escaped within normal
- elements within rcdata elements such as style.
- resolve_entities=True|False
- Whether to resolve named character entities that appear in the
- source tree. The XML predefined entities &lt; &gt; &amp; &quot; &apos;
- are unaffected by this setting.
- strip_whitespace=False|True
- Whether to remove semantically meaningless whitespace. (This
- compresses all whitespace to a single space except within pre.)
- minimize_boolean_attributes=True|False
- Shortens boolean attributes to give just the attribute value,
- for example <input disabled="disabled"> becomes <input disabled>.
- use_trailing_solidus=False|True
- Includes a close-tag slash at the end of the start tag of void
- elements (empty elements whose end tag is forbidden). E.g. <hr/>.
- space_before_trailing_solidus=True|False
- Places a space immediately before the closing slash in a tag
- using a trailing solidus. E.g. <hr />. Requires use_trailing_solidus.
- sanitize=False|True
- Strip all unsafe or unknown constructs from output.
- See `html5lib user documentation`_
- omit_optional_tags=True|False
- Omit start/end tags that are optional.
- alphabetical_attributes=False|True
- Reorder attributes to be in alphabetical order.
-
- .. _html5lib user documentation: http://code.google.com/p/html5lib/wiki/UserDocumentation
- """
- if 'quote_char' in kwargs:
- self.use_best_quote_char = False
- for attr in self.options:
- setattr(self, attr, kwargs.get(attr, getattr(self, attr)))
- self.errors = []
- self.strict = False
-
- def encode(self, string):
- assert(isinstance(string, text_type))
- if self.encoding:
- return string.encode(self.encoding, unicode_encode_errors)
- else:
- return string
-
- def encodeStrict(self, string):
- assert(isinstance(string, text_type))
- if self.encoding:
- return string.encode(self.encoding, "strict")
- else:
- return string
-
- def serialize(self, treewalker, encoding=None):
- self.encoding = encoding
- in_cdata = False
- self.errors = []
-
- if encoding and self.inject_meta_charset:
- from ..filters.inject_meta_charset import Filter
- treewalker = Filter(treewalker, encoding)
- # WhitespaceFilter should be used before OptionalTagFilter
- # for maximum efficiently of this latter filter
- if self.strip_whitespace:
- from ..filters.whitespace import Filter
- treewalker = Filter(treewalker)
- if self.sanitize:
- from ..filters.sanitizer import Filter
- treewalker = Filter(treewalker)
- if self.omit_optional_tags:
- from ..filters.optionaltags import Filter
- treewalker = Filter(treewalker)
- # Alphabetical attributes must be last, as other filters
- # could add attributes and alter the order
- if self.alphabetical_attributes:
- from ..filters.alphabeticalattributes import Filter
- treewalker = Filter(treewalker)
-
- for token in treewalker:
- type = token["type"]
- if type == "Doctype":
- doctype = "<!DOCTYPE %s" % token["name"]
-
- if token["publicId"]:
- doctype += ' PUBLIC "%s"' % token["publicId"]
- elif token["systemId"]:
- doctype += " SYSTEM"
- if token["systemId"]:
- if token["systemId"].find('"') >= 0:
- if token["systemId"].find("'") >= 0:
- self.serializeError("System identifer contains both single and double quote characters")
- quote_char = "'"
- else:
- quote_char = '"'
- doctype += " %s%s%s" % (quote_char, token["systemId"], quote_char)
-
- doctype += ">"
- yield self.encodeStrict(doctype)
-
- elif type in ("Characters", "SpaceCharacters"):
- if type == "SpaceCharacters" or in_cdata:
- if in_cdata and token["data"].find("</") >= 0:
- self.serializeError("Unexpected </ in CDATA")
- yield self.encode(token["data"])
- else:
- yield self.encode(escape(token["data"]))
-
- elif type in ("StartTag", "EmptyTag"):
- name = token["name"]
- yield self.encodeStrict("<%s" % name)
- if name in rcdataElements and not self.escape_rcdata:
- in_cdata = True
- elif in_cdata:
- self.serializeError("Unexpected child element of a CDATA element")
- for (attr_namespace, attr_name), attr_value in token["data"].items():
- # TODO: Add namespace support here
- k = attr_name
- v = attr_value
- yield self.encodeStrict(' ')
-
- yield self.encodeStrict(k)
- if not self.minimize_boolean_attributes or \
- (k not in booleanAttributes.get(name, tuple())
- and k not in booleanAttributes.get("", tuple())):
- yield self.encodeStrict("=")
- if self.quote_attr_values or not v:
- quote_attr = True
- else:
- quote_attr = reduce(lambda x, y: x or (y in v),
- spaceCharacters + ">\"'=", False)
- v = v.replace("&", "&amp;")
- if self.escape_lt_in_attrs:
- v = v.replace("<", "&lt;")
- if quote_attr:
- quote_char = self.quote_char
- if self.use_best_quote_char:
- if "'" in v and '"' not in v:
- quote_char = '"'
- elif '"' in v and "'" not in v:
- quote_char = "'"
- if quote_char == "'":
- v = v.replace("'", "&#39;")
- else:
- v = v.replace('"', "&quot;")
- yield self.encodeStrict(quote_char)
- yield self.encode(v)
- yield self.encodeStrict(quote_char)
- else:
- yield self.encode(v)
- if name in voidElements and self.use_trailing_solidus:
- if self.space_before_trailing_solidus:
- yield self.encodeStrict(" /")
- else:
- yield self.encodeStrict("/")
- yield self.encode(">")
-
- elif type == "EndTag":
- name = token["name"]
- if name in rcdataElements:
- in_cdata = False
- elif in_cdata:
- self.serializeError("Unexpected child element of a CDATA element")
- yield self.encodeStrict("</%s>" % name)
-
- elif type == "Comment":
- data = token["data"]
- if data.find("--") >= 0:
- self.serializeError("Comment contains --")
- yield self.encodeStrict("<!--%s-->" % token["data"])
-
- elif type == "Entity":
- name = token["name"]
- key = name + ";"
- if key not in entities:
- self.serializeError("Entity %s not recognized" % name)
- if self.resolve_entities and key not in xmlEntities:
- data = entities[key]
- else:
- data = "&%s;" % name
- yield self.encodeStrict(data)
-
- else:
- self.serializeError(token["data"])
-
- def render(self, treewalker, encoding=None):
- if encoding:
- return b"".join(list(self.serialize(treewalker, encoding)))
- else:
- return "".join(list(self.serialize(treewalker)))
-
- def serializeError(self, data="XXX ERROR MESSAGE NEEDED"):
- # XXX The idea is to make data mandatory.
- self.errors.append(data)
- if self.strict:
- raise SerializeError
-
-
-def SerializeError(Exception):
- """Error in serialized tree"""
- pass
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/tokenizer.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/tokenizer.py
deleted file mode 100644
index 797745787a4..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/tokenizer.py
+++ /dev/null
@@ -1,1731 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-try:
- chr = unichr # flake8: noqa
-except NameError:
- pass
-
-from collections import deque
-
-from .constants import spaceCharacters
-from .constants import entities
-from .constants import asciiLetters, asciiUpper2Lower
-from .constants import digits, hexDigits, EOF
-from .constants import tokenTypes, tagTokenTypes
-from .constants import replacementCharacters
-
-from .inputstream import HTMLInputStream
-
-from .trie import Trie
-
-entitiesTrie = Trie(entities)
-
-
-class HTMLTokenizer(object):
- """ This class takes care of tokenizing HTML.
-
- * self.currentToken
- Holds the token that is currently being processed.
-
- * self.state
- Holds a reference to the method to be invoked... XXX
-
- * self.stream
- Points to HTMLInputStream object.
- """
-
- def __init__(self, stream, encoding=None, parseMeta=True, useChardet=True,
- lowercaseElementName=True, lowercaseAttrName=True, parser=None):
-
- self.stream = HTMLInputStream(stream, encoding, parseMeta, useChardet)
- self.parser = parser
-
- # Perform case conversions?
- self.lowercaseElementName = lowercaseElementName
- self.lowercaseAttrName = lowercaseAttrName
-
- # Setup the initial tokenizer state
- self.escapeFlag = False
- self.lastFourChars = []
- self.state = self.dataState
- self.escape = False
-
- # The current token being created
- self.currentToken = None
- super(HTMLTokenizer, self).__init__()
-
- def __iter__(self):
- """ This is where the magic happens.
-
- We do our usually processing through the states and when we have a token
- to return we yield the token which pauses processing until the next token
- is requested.
- """
- self.tokenQueue = deque([])
- # Start processing. When EOF is reached self.state will return False
- # instead of True and the loop will terminate.
- while self.state():
- while self.stream.errors:
- yield {"type": tokenTypes["ParseError"], "data": self.stream.errors.pop(0)}
- while self.tokenQueue:
- yield self.tokenQueue.popleft()
-
- def consumeNumberEntity(self, isHex):
- """This function returns either U+FFFD or the character based on the
- decimal or hexadecimal representation. It also discards ";" if present.
- If not present self.tokenQueue.append({"type": tokenTypes["ParseError"]}) is invoked.
- """
-
- allowed = digits
- radix = 10
- if isHex:
- allowed = hexDigits
- radix = 16
-
- charStack = []
-
- # Consume all the characters that are in range while making sure we
- # don't hit an EOF.
- c = self.stream.char()
- while c in allowed and c is not EOF:
- charStack.append(c)
- c = self.stream.char()
-
- # Convert the set of characters consumed to an int.
- charAsInt = int("".join(charStack), radix)
-
- # Certain characters get replaced with others
- if charAsInt in replacementCharacters:
- char = replacementCharacters[charAsInt]
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "illegal-codepoint-for-numeric-entity",
- "datavars": {"charAsInt": charAsInt}})
- elif ((0xD800 <= charAsInt <= 0xDFFF) or
- (charAsInt > 0x10FFFF)):
- char = "\uFFFD"
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "illegal-codepoint-for-numeric-entity",
- "datavars": {"charAsInt": charAsInt}})
- else:
- # Should speed up this check somehow (e.g. move the set to a constant)
- if ((0x0001 <= charAsInt <= 0x0008) or
- (0x000E <= charAsInt <= 0x001F) or
- (0x007F <= charAsInt <= 0x009F) or
- (0xFDD0 <= charAsInt <= 0xFDEF) or
- charAsInt in frozenset([0x000B, 0xFFFE, 0xFFFF, 0x1FFFE,
- 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
- 0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE,
- 0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE,
- 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE,
- 0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE,
- 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE,
- 0xDFFFF, 0xEFFFE, 0xEFFFF, 0xFFFFE,
- 0xFFFFF, 0x10FFFE, 0x10FFFF])):
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data":
- "illegal-codepoint-for-numeric-entity",
- "datavars": {"charAsInt": charAsInt}})
- try:
- # Try/except needed as UCS-2 Python builds' unichar only works
- # within the BMP.
- char = chr(charAsInt)
- except ValueError:
- v = charAsInt - 0x10000
- char = chr(0xD800 | (v >> 10)) + chr(0xDC00 | (v & 0x3FF))
-
- # Discard the ; if present. Otherwise, put it back on the queue and
- # invoke parseError on parser.
- if c != ";":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "numeric-entity-without-semicolon"})
- self.stream.unget(c)
-
- return char
-
- def consumeEntity(self, allowedChar=None, fromAttribute=False):
- # Initialise to the default output for when no entity is matched
- output = "&"
-
- charStack = [self.stream.char()]
- if (charStack[0] in spaceCharacters or charStack[0] in (EOF, "<", "&")
- or (allowedChar is not None and allowedChar == charStack[0])):
- self.stream.unget(charStack[0])
-
- elif charStack[0] == "#":
- # Read the next character to see if it's hex or decimal
- hex = False
- charStack.append(self.stream.char())
- if charStack[-1] in ("x", "X"):
- hex = True
- charStack.append(self.stream.char())
-
- # charStack[-1] should be the first digit
- if (hex and charStack[-1] in hexDigits) \
- or (not hex and charStack[-1] in digits):
- # At least one digit found, so consume the whole number
- self.stream.unget(charStack[-1])
- output = self.consumeNumberEntity(hex)
- else:
- # No digits found
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "expected-numeric-entity"})
- self.stream.unget(charStack.pop())
- output = "&" + "".join(charStack)
-
- else:
- # At this point in the process might have named entity. Entities
- # are stored in the global variable "entities".
- #
- # Consume characters and compare to these to a substring of the
- # entity names in the list until the substring no longer matches.
- while (charStack[-1] is not EOF):
- if not entitiesTrie.has_keys_with_prefix("".join(charStack)):
- break
- charStack.append(self.stream.char())
-
- # At this point we have a string that starts with some characters
- # that may match an entity
- # Try to find the longest entity the string will match to take care
- # of &noti for instance.
- try:
- entityName = entitiesTrie.longest_prefix("".join(charStack[:-1]))
- entityLength = len(entityName)
- except KeyError:
- entityName = None
-
- if entityName is not None:
- if entityName[-1] != ";":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "named-entity-without-semicolon"})
- if (entityName[-1] != ";" and fromAttribute and
- (charStack[entityLength] in asciiLetters or
- charStack[entityLength] in digits or
- charStack[entityLength] == "=")):
- self.stream.unget(charStack.pop())
- output = "&" + "".join(charStack)
- else:
- output = entities[entityName]
- self.stream.unget(charStack.pop())
- output += "".join(charStack[entityLength:])
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-named-entity"})
- self.stream.unget(charStack.pop())
- output = "&" + "".join(charStack)
-
- if fromAttribute:
- self.currentToken["data"][-1][1] += output
- else:
- if output in spaceCharacters:
- tokenType = "SpaceCharacters"
- else:
- tokenType = "Characters"
- self.tokenQueue.append({"type": tokenTypes[tokenType], "data": output})
-
- def processEntityInAttribute(self, allowedChar):
- """This method replaces the need for "entityInAttributeValueState".
- """
- self.consumeEntity(allowedChar=allowedChar, fromAttribute=True)
-
- def emitCurrentToken(self):
- """This method is a generic handler for emitting the tags. It also sets
- the state to "data" because that's what's needed after a token has been
- emitted.
- """
- token = self.currentToken
- # Add token to the queue to be yielded
- if (token["type"] in tagTokenTypes):
- if self.lowercaseElementName:
- token["name"] = token["name"].translate(asciiUpper2Lower)
- if token["type"] == tokenTypes["EndTag"]:
- if token["data"]:
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "attributes-in-end-tag"})
- if token["selfClosing"]:
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "self-closing-flag-on-end-tag"})
- self.tokenQueue.append(token)
- self.state = self.dataState
-
- # Below are the various tokenizer states worked out.
- def dataState(self):
- data = self.stream.char()
- if data == "&":
- self.state = self.entityDataState
- elif data == "<":
- self.state = self.tagOpenState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\u0000"})
- elif data is EOF:
- # Tokenization ends.
- return False
- elif data in spaceCharacters:
- # Directly after emitting a token you switch back to the "data
- # state". At that point spaceCharacters are important so they are
- # emitted separately.
- self.tokenQueue.append({"type": tokenTypes["SpaceCharacters"], "data":
- data + self.stream.charsUntil(spaceCharacters, True)})
- # No need to update lastFourChars here, since the first space will
- # have already been appended to lastFourChars and will have broken
- # any <!-- or --> sequences
- else:
- chars = self.stream.charsUntil(("&", "<", "\u0000"))
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
- data + chars})
- return True
-
- def entityDataState(self):
- self.consumeEntity()
- self.state = self.dataState
- return True
-
- def rcdataState(self):
- data = self.stream.char()
- if data == "&":
- self.state = self.characterReferenceInRcdata
- elif data == "<":
- self.state = self.rcdataLessThanSignState
- elif data == EOF:
- # Tokenization ends.
- return False
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- elif data in spaceCharacters:
- # Directly after emitting a token you switch back to the "data
- # state". At that point spaceCharacters are important so they are
- # emitted separately.
- self.tokenQueue.append({"type": tokenTypes["SpaceCharacters"], "data":
- data + self.stream.charsUntil(spaceCharacters, True)})
- # No need to update lastFourChars here, since the first space will
- # have already been appended to lastFourChars and will have broken
- # any <!-- or --> sequences
- else:
- chars = self.stream.charsUntil(("&", "<", "\u0000"))
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
- data + chars})
- return True
-
- def characterReferenceInRcdata(self):
- self.consumeEntity()
- self.state = self.rcdataState
- return True
-
- def rawtextState(self):
- data = self.stream.char()
- if data == "<":
- self.state = self.rawtextLessThanSignState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- elif data == EOF:
- # Tokenization ends.
- return False
- else:
- chars = self.stream.charsUntil(("<", "\u0000"))
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
- data + chars})
- return True
-
- def scriptDataState(self):
- data = self.stream.char()
- if data == "<":
- self.state = self.scriptDataLessThanSignState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- elif data == EOF:
- # Tokenization ends.
- return False
- else:
- chars = self.stream.charsUntil(("<", "\u0000"))
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
- data + chars})
- return True
-
- def plaintextState(self):
- data = self.stream.char()
- if data == EOF:
- # Tokenization ends.
- return False
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
- data + self.stream.charsUntil("\u0000")})
- return True
-
- def tagOpenState(self):
- data = self.stream.char()
- if data == "!":
- self.state = self.markupDeclarationOpenState
- elif data == "/":
- self.state = self.closeTagOpenState
- elif data in asciiLetters:
- self.currentToken = {"type": tokenTypes["StartTag"],
- "name": data, "data": [],
- "selfClosing": False,
- "selfClosingAcknowledged": False}
- self.state = self.tagNameState
- elif data == ">":
- # XXX In theory it could be something besides a tag name. But
- # do we really care?
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-tag-name-but-got-right-bracket"})
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<>"})
- self.state = self.dataState
- elif data == "?":
- # XXX In theory it could be something besides a tag name. But
- # do we really care?
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-tag-name-but-got-question-mark"})
- self.stream.unget(data)
- self.state = self.bogusCommentState
- else:
- # XXX
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-tag-name"})
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.stream.unget(data)
- self.state = self.dataState
- return True
-
- def closeTagOpenState(self):
- data = self.stream.char()
- if data in asciiLetters:
- self.currentToken = {"type": tokenTypes["EndTag"], "name": data,
- "data": [], "selfClosing": False}
- self.state = self.tagNameState
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-closing-tag-but-got-right-bracket"})
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-closing-tag-but-got-eof"})
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
- self.state = self.dataState
- else:
- # XXX data can be _'_...
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-closing-tag-but-got-char",
- "datavars": {"data": data}})
- self.stream.unget(data)
- self.state = self.bogusCommentState
- return True
-
- def tagNameState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.beforeAttributeNameState
- elif data == ">":
- self.emitCurrentToken()
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-tag-name"})
- self.state = self.dataState
- elif data == "/":
- self.state = self.selfClosingStartTagState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["name"] += "\uFFFD"
- else:
- self.currentToken["name"] += data
- # (Don't use charsUntil here, because tag names are
- # very short and it's faster to not do anything fancy)
- return True
-
- def rcdataLessThanSignState(self):
- data = self.stream.char()
- if data == "/":
- self.temporaryBuffer = ""
- self.state = self.rcdataEndTagOpenState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.stream.unget(data)
- self.state = self.rcdataState
- return True
-
- def rcdataEndTagOpenState(self):
- data = self.stream.char()
- if data in asciiLetters:
- self.temporaryBuffer += data
- self.state = self.rcdataEndTagNameState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
- self.stream.unget(data)
- self.state = self.rcdataState
- return True
-
- def rcdataEndTagNameState(self):
- appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
- data = self.stream.char()
- if data in spaceCharacters and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.beforeAttributeNameState
- elif data == "/" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.selfClosingStartTagState
- elif data == ">" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.emitCurrentToken()
- self.state = self.dataState
- elif data in asciiLetters:
- self.temporaryBuffer += data
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "</" + self.temporaryBuffer})
- self.stream.unget(data)
- self.state = self.rcdataState
- return True
-
- def rawtextLessThanSignState(self):
- data = self.stream.char()
- if data == "/":
- self.temporaryBuffer = ""
- self.state = self.rawtextEndTagOpenState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.stream.unget(data)
- self.state = self.rawtextState
- return True
-
- def rawtextEndTagOpenState(self):
- data = self.stream.char()
- if data in asciiLetters:
- self.temporaryBuffer += data
- self.state = self.rawtextEndTagNameState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
- self.stream.unget(data)
- self.state = self.rawtextState
- return True
-
- def rawtextEndTagNameState(self):
- appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
- data = self.stream.char()
- if data in spaceCharacters and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.beforeAttributeNameState
- elif data == "/" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.selfClosingStartTagState
- elif data == ">" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.emitCurrentToken()
- self.state = self.dataState
- elif data in asciiLetters:
- self.temporaryBuffer += data
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "</" + self.temporaryBuffer})
- self.stream.unget(data)
- self.state = self.rawtextState
- return True
-
- def scriptDataLessThanSignState(self):
- data = self.stream.char()
- if data == "/":
- self.temporaryBuffer = ""
- self.state = self.scriptDataEndTagOpenState
- elif data == "!":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<!"})
- self.state = self.scriptDataEscapeStartState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.stream.unget(data)
- self.state = self.scriptDataState
- return True
-
- def scriptDataEndTagOpenState(self):
- data = self.stream.char()
- if data in asciiLetters:
- self.temporaryBuffer += data
- self.state = self.scriptDataEndTagNameState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
- self.stream.unget(data)
- self.state = self.scriptDataState
- return True
-
- def scriptDataEndTagNameState(self):
- appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
- data = self.stream.char()
- if data in spaceCharacters and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.beforeAttributeNameState
- elif data == "/" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.selfClosingStartTagState
- elif data == ">" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.emitCurrentToken()
- self.state = self.dataState
- elif data in asciiLetters:
- self.temporaryBuffer += data
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "</" + self.temporaryBuffer})
- self.stream.unget(data)
- self.state = self.scriptDataState
- return True
-
- def scriptDataEscapeStartState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- self.state = self.scriptDataEscapeStartDashState
- else:
- self.stream.unget(data)
- self.state = self.scriptDataState
- return True
-
- def scriptDataEscapeStartDashState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- self.state = self.scriptDataEscapedDashDashState
- else:
- self.stream.unget(data)
- self.state = self.scriptDataState
- return True
-
- def scriptDataEscapedState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- self.state = self.scriptDataEscapedDashState
- elif data == "<":
- self.state = self.scriptDataEscapedLessThanSignState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- elif data == EOF:
- self.state = self.dataState
- else:
- chars = self.stream.charsUntil(("<", "-", "\u0000"))
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
- data + chars})
- return True
-
- def scriptDataEscapedDashState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- self.state = self.scriptDataEscapedDashDashState
- elif data == "<":
- self.state = self.scriptDataEscapedLessThanSignState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- self.state = self.scriptDataEscapedState
- elif data == EOF:
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- self.state = self.scriptDataEscapedState
- return True
-
- def scriptDataEscapedDashDashState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- elif data == "<":
- self.state = self.scriptDataEscapedLessThanSignState
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": ">"})
- self.state = self.scriptDataState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- self.state = self.scriptDataEscapedState
- elif data == EOF:
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- self.state = self.scriptDataEscapedState
- return True
-
- def scriptDataEscapedLessThanSignState(self):
- data = self.stream.char()
- if data == "/":
- self.temporaryBuffer = ""
- self.state = self.scriptDataEscapedEndTagOpenState
- elif data in asciiLetters:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<" + data})
- self.temporaryBuffer = data
- self.state = self.scriptDataDoubleEscapeStartState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.stream.unget(data)
- self.state = self.scriptDataEscapedState
- return True
-
- def scriptDataEscapedEndTagOpenState(self):
- data = self.stream.char()
- if data in asciiLetters:
- self.temporaryBuffer = data
- self.state = self.scriptDataEscapedEndTagNameState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "</"})
- self.stream.unget(data)
- self.state = self.scriptDataEscapedState
- return True
-
- def scriptDataEscapedEndTagNameState(self):
- appropriate = self.currentToken and self.currentToken["name"].lower() == self.temporaryBuffer.lower()
- data = self.stream.char()
- if data in spaceCharacters and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.beforeAttributeNameState
- elif data == "/" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.state = self.selfClosingStartTagState
- elif data == ">" and appropriate:
- self.currentToken = {"type": tokenTypes["EndTag"],
- "name": self.temporaryBuffer,
- "data": [], "selfClosing": False}
- self.emitCurrentToken()
- self.state = self.dataState
- elif data in asciiLetters:
- self.temporaryBuffer += data
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "</" + self.temporaryBuffer})
- self.stream.unget(data)
- self.state = self.scriptDataEscapedState
- return True
-
- def scriptDataDoubleEscapeStartState(self):
- data = self.stream.char()
- if data in (spaceCharacters | frozenset(("/", ">"))):
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- if self.temporaryBuffer.lower() == "script":
- self.state = self.scriptDataDoubleEscapedState
- else:
- self.state = self.scriptDataEscapedState
- elif data in asciiLetters:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- self.temporaryBuffer += data
- else:
- self.stream.unget(data)
- self.state = self.scriptDataEscapedState
- return True
-
- def scriptDataDoubleEscapedState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- self.state = self.scriptDataDoubleEscapedDashState
- elif data == "<":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.state = self.scriptDataDoubleEscapedLessThanSignState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- elif data == EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-script-in-script"})
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- return True
-
- def scriptDataDoubleEscapedDashState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- self.state = self.scriptDataDoubleEscapedDashDashState
- elif data == "<":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.state = self.scriptDataDoubleEscapedLessThanSignState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- self.state = self.scriptDataDoubleEscapedState
- elif data == EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-script-in-script"})
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- self.state = self.scriptDataDoubleEscapedState
- return True
-
- def scriptDataDoubleEscapedDashDashState(self):
- data = self.stream.char()
- if data == "-":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "-"})
- elif data == "<":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "<"})
- self.state = self.scriptDataDoubleEscapedLessThanSignState
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": ">"})
- self.state = self.scriptDataState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": "\uFFFD"})
- self.state = self.scriptDataDoubleEscapedState
- elif data == EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-script-in-script"})
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- self.state = self.scriptDataDoubleEscapedState
- return True
-
- def scriptDataDoubleEscapedLessThanSignState(self):
- data = self.stream.char()
- if data == "/":
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": "/"})
- self.temporaryBuffer = ""
- self.state = self.scriptDataDoubleEscapeEndState
- else:
- self.stream.unget(data)
- self.state = self.scriptDataDoubleEscapedState
- return True
-
- def scriptDataDoubleEscapeEndState(self):
- data = self.stream.char()
- if data in (spaceCharacters | frozenset(("/", ">"))):
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- if self.temporaryBuffer.lower() == "script":
- self.state = self.scriptDataEscapedState
- else:
- self.state = self.scriptDataDoubleEscapedState
- elif data in asciiLetters:
- self.tokenQueue.append({"type": tokenTypes["Characters"], "data": data})
- self.temporaryBuffer += data
- else:
- self.stream.unget(data)
- self.state = self.scriptDataDoubleEscapedState
- return True
-
- def beforeAttributeNameState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.stream.charsUntil(spaceCharacters, True)
- elif data in asciiLetters:
- self.currentToken["data"].append([data, ""])
- self.state = self.attributeNameState
- elif data == ">":
- self.emitCurrentToken()
- elif data == "/":
- self.state = self.selfClosingStartTagState
- elif data in ("'", '"', "=", "<"):
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "invalid-character-in-attribute-name"})
- self.currentToken["data"].append([data, ""])
- self.state = self.attributeNameState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"].append(["\uFFFD", ""])
- self.state = self.attributeNameState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-attribute-name-but-got-eof"})
- self.state = self.dataState
- else:
- self.currentToken["data"].append([data, ""])
- self.state = self.attributeNameState
- return True
-
- def attributeNameState(self):
- data = self.stream.char()
- leavingThisState = True
- emitToken = False
- if data == "=":
- self.state = self.beforeAttributeValueState
- elif data in asciiLetters:
- self.currentToken["data"][-1][0] += data +\
- self.stream.charsUntil(asciiLetters, True)
- leavingThisState = False
- elif data == ">":
- # XXX If we emit here the attributes are converted to a dict
- # without being checked and when the code below runs we error
- # because data is a dict not a list
- emitToken = True
- elif data in spaceCharacters:
- self.state = self.afterAttributeNameState
- elif data == "/":
- self.state = self.selfClosingStartTagState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"][-1][0] += "\uFFFD"
- leavingThisState = False
- elif data in ("'", '"', "<"):
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data":
- "invalid-character-in-attribute-name"})
- self.currentToken["data"][-1][0] += data
- leavingThisState = False
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "eof-in-attribute-name"})
- self.state = self.dataState
- else:
- self.currentToken["data"][-1][0] += data
- leavingThisState = False
-
- if leavingThisState:
- # Attributes are not dropped at this stage. That happens when the
- # start tag token is emitted so values can still be safely appended
- # to attributes, but we do want to report the parse error in time.
- if self.lowercaseAttrName:
- self.currentToken["data"][-1][0] = (
- self.currentToken["data"][-1][0].translate(asciiUpper2Lower))
- for name, value in self.currentToken["data"][:-1]:
- if self.currentToken["data"][-1][0] == name:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "duplicate-attribute"})
- break
- # XXX Fix for above XXX
- if emitToken:
- self.emitCurrentToken()
- return True
-
- def afterAttributeNameState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.stream.charsUntil(spaceCharacters, True)
- elif data == "=":
- self.state = self.beforeAttributeValueState
- elif data == ">":
- self.emitCurrentToken()
- elif data in asciiLetters:
- self.currentToken["data"].append([data, ""])
- self.state = self.attributeNameState
- elif data == "/":
- self.state = self.selfClosingStartTagState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"].append(["\uFFFD", ""])
- self.state = self.attributeNameState
- elif data in ("'", '"', "<"):
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "invalid-character-after-attribute-name"})
- self.currentToken["data"].append([data, ""])
- self.state = self.attributeNameState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-end-of-tag-but-got-eof"})
- self.state = self.dataState
- else:
- self.currentToken["data"].append([data, ""])
- self.state = self.attributeNameState
- return True
-
- def beforeAttributeValueState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.stream.charsUntil(spaceCharacters, True)
- elif data == "\"":
- self.state = self.attributeValueDoubleQuotedState
- elif data == "&":
- self.state = self.attributeValueUnQuotedState
- self.stream.unget(data)
- elif data == "'":
- self.state = self.attributeValueSingleQuotedState
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-attribute-value-but-got-right-bracket"})
- self.emitCurrentToken()
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"][-1][1] += "\uFFFD"
- self.state = self.attributeValueUnQuotedState
- elif data in ("=", "<", "`"):
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "equals-in-unquoted-attribute-value"})
- self.currentToken["data"][-1][1] += data
- self.state = self.attributeValueUnQuotedState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-attribute-value-but-got-eof"})
- self.state = self.dataState
- else:
- self.currentToken["data"][-1][1] += data
- self.state = self.attributeValueUnQuotedState
- return True
-
- def attributeValueDoubleQuotedState(self):
- data = self.stream.char()
- if data == "\"":
- self.state = self.afterAttributeValueState
- elif data == "&":
- self.processEntityInAttribute('"')
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"][-1][1] += "\uFFFD"
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-attribute-value-double-quote"})
- self.state = self.dataState
- else:
- self.currentToken["data"][-1][1] += data +\
- self.stream.charsUntil(("\"", "&", "\u0000"))
- return True
-
- def attributeValueSingleQuotedState(self):
- data = self.stream.char()
- if data == "'":
- self.state = self.afterAttributeValueState
- elif data == "&":
- self.processEntityInAttribute("'")
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"][-1][1] += "\uFFFD"
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-attribute-value-single-quote"})
- self.state = self.dataState
- else:
- self.currentToken["data"][-1][1] += data +\
- self.stream.charsUntil(("'", "&", "\u0000"))
- return True
-
- def attributeValueUnQuotedState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.beforeAttributeNameState
- elif data == "&":
- self.processEntityInAttribute(">")
- elif data == ">":
- self.emitCurrentToken()
- elif data in ('"', "'", "=", "<", "`"):
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-character-in-unquoted-attribute-value"})
- self.currentToken["data"][-1][1] += data
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"][-1][1] += "\uFFFD"
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-attribute-value-no-quotes"})
- self.state = self.dataState
- else:
- self.currentToken["data"][-1][1] += data + self.stream.charsUntil(
- frozenset(("&", ">", '"', "'", "=", "<", "`", "\u0000")) | spaceCharacters)
- return True
-
- def afterAttributeValueState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.beforeAttributeNameState
- elif data == ">":
- self.emitCurrentToken()
- elif data == "/":
- self.state = self.selfClosingStartTagState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-EOF-after-attribute-value"})
- self.stream.unget(data)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-character-after-attribute-value"})
- self.stream.unget(data)
- self.state = self.beforeAttributeNameState
- return True
-
- def selfClosingStartTagState(self):
- data = self.stream.char()
- if data == ">":
- self.currentToken["selfClosing"] = True
- self.emitCurrentToken()
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data":
- "unexpected-EOF-after-solidus-in-tag"})
- self.stream.unget(data)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-character-after-solidus-in-tag"})
- self.stream.unget(data)
- self.state = self.beforeAttributeNameState
- return True
-
- def bogusCommentState(self):
- # Make a new comment token and give it as value all the characters
- # until the first > or EOF (charsUntil checks for EOF automatically)
- # and emit it.
- data = self.stream.charsUntil(">")
- data = data.replace("\u0000", "\uFFFD")
- self.tokenQueue.append(
- {"type": tokenTypes["Comment"], "data": data})
-
- # Eat the character directly after the bogus comment which is either a
- # ">" or an EOF.
- self.stream.char()
- self.state = self.dataState
- return True
-
- def markupDeclarationOpenState(self):
- charStack = [self.stream.char()]
- if charStack[-1] == "-":
- charStack.append(self.stream.char())
- if charStack[-1] == "-":
- self.currentToken = {"type": tokenTypes["Comment"], "data": ""}
- self.state = self.commentStartState
- return True
- elif charStack[-1] in ('d', 'D'):
- matched = True
- for expected in (('o', 'O'), ('c', 'C'), ('t', 'T'),
- ('y', 'Y'), ('p', 'P'), ('e', 'E')):
- charStack.append(self.stream.char())
- if charStack[-1] not in expected:
- matched = False
- break
- if matched:
- self.currentToken = {"type": tokenTypes["Doctype"],
- "name": "",
- "publicId": None, "systemId": None,
- "correct": True}
- self.state = self.doctypeState
- return True
- elif (charStack[-1] == "[" and
- self.parser is not None and
- self.parser.tree.openElements and
- self.parser.tree.openElements[-1].namespace != self.parser.tree.defaultNamespace):
- matched = True
- for expected in ["C", "D", "A", "T", "A", "["]:
- charStack.append(self.stream.char())
- if charStack[-1] != expected:
- matched = False
- break
- if matched:
- self.state = self.cdataSectionState
- return True
-
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-dashes-or-doctype"})
-
- while charStack:
- self.stream.unget(charStack.pop())
- self.state = self.bogusCommentState
- return True
-
- def commentStartState(self):
- data = self.stream.char()
- if data == "-":
- self.state = self.commentStartDashState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"] += "\uFFFD"
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "incorrect-comment"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-comment"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["data"] += data
- self.state = self.commentState
- return True
-
- def commentStartDashState(self):
- data = self.stream.char()
- if data == "-":
- self.state = self.commentEndState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"] += "-\uFFFD"
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "incorrect-comment"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-comment"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["data"] += "-" + data
- self.state = self.commentState
- return True
-
- def commentState(self):
- data = self.stream.char()
- if data == "-":
- self.state = self.commentEndDashState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"] += "\uFFFD"
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "eof-in-comment"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["data"] += data + \
- self.stream.charsUntil(("-", "\u0000"))
- return True
-
- def commentEndDashState(self):
- data = self.stream.char()
- if data == "-":
- self.state = self.commentEndState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"] += "-\uFFFD"
- self.state = self.commentState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-comment-end-dash"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["data"] += "-" + data
- self.state = self.commentState
- return True
-
- def commentEndState(self):
- data = self.stream.char()
- if data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"] += "--\uFFFD"
- self.state = self.commentState
- elif data == "!":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-bang-after-double-dash-in-comment"})
- self.state = self.commentEndBangState
- elif data == "-":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-dash-after-double-dash-in-comment"})
- self.currentToken["data"] += data
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-comment-double-dash"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- # XXX
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-comment"})
- self.currentToken["data"] += "--" + data
- self.state = self.commentState
- return True
-
- def commentEndBangState(self):
- data = self.stream.char()
- if data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data == "-":
- self.currentToken["data"] += "--!"
- self.state = self.commentEndDashState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["data"] += "--!\uFFFD"
- self.state = self.commentState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-comment-end-bang-state"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["data"] += "--!" + data
- self.state = self.commentState
- return True
-
- def doctypeState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.beforeDoctypeNameState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-doctype-name-but-got-eof"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "need-space-after-doctype"})
- self.stream.unget(data)
- self.state = self.beforeDoctypeNameState
- return True
-
- def beforeDoctypeNameState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- pass
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-doctype-name-but-got-right-bracket"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["name"] = "\uFFFD"
- self.state = self.doctypeNameState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-doctype-name-but-got-eof"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["name"] = data
- self.state = self.doctypeNameState
- return True
-
- def doctypeNameState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
- self.state = self.afterDoctypeNameState
- elif data == ">":
- self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["name"] += "\uFFFD"
- self.state = self.doctypeNameState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype-name"})
- self.currentToken["correct"] = False
- self.currentToken["name"] = self.currentToken["name"].translate(asciiUpper2Lower)
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["name"] += data
- return True
-
- def afterDoctypeNameState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- pass
- elif data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.currentToken["correct"] = False
- self.stream.unget(data)
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- if data in ("p", "P"):
- matched = True
- for expected in (("u", "U"), ("b", "B"), ("l", "L"),
- ("i", "I"), ("c", "C")):
- data = self.stream.char()
- if data not in expected:
- matched = False
- break
- if matched:
- self.state = self.afterDoctypePublicKeywordState
- return True
- elif data in ("s", "S"):
- matched = True
- for expected in (("y", "Y"), ("s", "S"), ("t", "T"),
- ("e", "E"), ("m", "M")):
- data = self.stream.char()
- if data not in expected:
- matched = False
- break
- if matched:
- self.state = self.afterDoctypeSystemKeywordState
- return True
-
- # All the characters read before the current 'data' will be
- # [a-zA-Z], so they're garbage in the bogus doctype and can be
- # discarded; only the latest character might be '>' or EOF
- # and needs to be ungetted
- self.stream.unget(data)
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "expected-space-or-right-bracket-in-doctype", "datavars":
- {"data": data}})
- self.currentToken["correct"] = False
- self.state = self.bogusDoctypeState
-
- return True
-
- def afterDoctypePublicKeywordState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.beforeDoctypePublicIdentifierState
- elif data in ("'", '"'):
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.stream.unget(data)
- self.state = self.beforeDoctypePublicIdentifierState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.stream.unget(data)
- self.state = self.beforeDoctypePublicIdentifierState
- return True
-
- def beforeDoctypePublicIdentifierState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- pass
- elif data == "\"":
- self.currentToken["publicId"] = ""
- self.state = self.doctypePublicIdentifierDoubleQuotedState
- elif data == "'":
- self.currentToken["publicId"] = ""
- self.state = self.doctypePublicIdentifierSingleQuotedState
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-end-of-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["correct"] = False
- self.state = self.bogusDoctypeState
- return True
-
- def doctypePublicIdentifierDoubleQuotedState(self):
- data = self.stream.char()
- if data == "\"":
- self.state = self.afterDoctypePublicIdentifierState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["publicId"] += "\uFFFD"
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-end-of-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["publicId"] += data
- return True
-
- def doctypePublicIdentifierSingleQuotedState(self):
- data = self.stream.char()
- if data == "'":
- self.state = self.afterDoctypePublicIdentifierState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["publicId"] += "\uFFFD"
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-end-of-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["publicId"] += data
- return True
-
- def afterDoctypePublicIdentifierState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.betweenDoctypePublicAndSystemIdentifiersState
- elif data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data == '"':
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["systemId"] = ""
- self.state = self.doctypeSystemIdentifierDoubleQuotedState
- elif data == "'":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["systemId"] = ""
- self.state = self.doctypeSystemIdentifierSingleQuotedState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["correct"] = False
- self.state = self.bogusDoctypeState
- return True
-
- def betweenDoctypePublicAndSystemIdentifiersState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- pass
- elif data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data == '"':
- self.currentToken["systemId"] = ""
- self.state = self.doctypeSystemIdentifierDoubleQuotedState
- elif data == "'":
- self.currentToken["systemId"] = ""
- self.state = self.doctypeSystemIdentifierSingleQuotedState
- elif data == EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["correct"] = False
- self.state = self.bogusDoctypeState
- return True
-
- def afterDoctypeSystemKeywordState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- self.state = self.beforeDoctypeSystemIdentifierState
- elif data in ("'", '"'):
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.stream.unget(data)
- self.state = self.beforeDoctypeSystemIdentifierState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.stream.unget(data)
- self.state = self.beforeDoctypeSystemIdentifierState
- return True
-
- def beforeDoctypeSystemIdentifierState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- pass
- elif data == "\"":
- self.currentToken["systemId"] = ""
- self.state = self.doctypeSystemIdentifierDoubleQuotedState
- elif data == "'":
- self.currentToken["systemId"] = ""
- self.state = self.doctypeSystemIdentifierSingleQuotedState
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.currentToken["correct"] = False
- self.state = self.bogusDoctypeState
- return True
-
- def doctypeSystemIdentifierDoubleQuotedState(self):
- data = self.stream.char()
- if data == "\"":
- self.state = self.afterDoctypeSystemIdentifierState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["systemId"] += "\uFFFD"
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-end-of-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["systemId"] += data
- return True
-
- def doctypeSystemIdentifierSingleQuotedState(self):
- data = self.stream.char()
- if data == "'":
- self.state = self.afterDoctypeSystemIdentifierState
- elif data == "\u0000":
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- self.currentToken["systemId"] += "\uFFFD"
- elif data == ">":
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-end-of-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.currentToken["systemId"] += data
- return True
-
- def afterDoctypeSystemIdentifierState(self):
- data = self.stream.char()
- if data in spaceCharacters:
- pass
- elif data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "eof-in-doctype"})
- self.currentToken["correct"] = False
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- self.tokenQueue.append({"type": tokenTypes["ParseError"], "data":
- "unexpected-char-in-doctype"})
- self.state = self.bogusDoctypeState
- return True
-
- def bogusDoctypeState(self):
- data = self.stream.char()
- if data == ">":
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- elif data is EOF:
- # XXX EMIT
- self.stream.unget(data)
- self.tokenQueue.append(self.currentToken)
- self.state = self.dataState
- else:
- pass
- return True
-
- def cdataSectionState(self):
- data = []
- while True:
- data.append(self.stream.charsUntil("]"))
- data.append(self.stream.charsUntil(">"))
- char = self.stream.char()
- if char == EOF:
- break
- else:
- assert char == ">"
- if data[-1][-2:] == "]]":
- data[-1] = data[-1][:-2]
- break
- else:
- data.append(char)
-
- data = "".join(data)
- # Deal with null here rather than in the parser
- nullCount = data.count("\u0000")
- if nullCount > 0:
- for i in range(nullCount):
- self.tokenQueue.append({"type": tokenTypes["ParseError"],
- "data": "invalid-codepoint"})
- data = data.replace("\u0000", "\uFFFD")
- if data:
- self.tokenQueue.append({"type": tokenTypes["Characters"],
- "data": data})
- self.state = self.dataState
- return True
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/__init__.py
+++ /dev/null
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/sax.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/sax.py
deleted file mode 100644
index ad47df95648..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treeadapters/sax.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from xml.sax.xmlreader import AttributesNSImpl
-
-from ..constants import adjustForeignAttributes, unadjustForeignAttributes
-
-prefix_mapping = {}
-for prefix, localName, namespace in adjustForeignAttributes.values():
- if prefix is not None:
- prefix_mapping[prefix] = namespace
-
-
-def to_sax(walker, handler):
- """Call SAX-like content handler based on treewalker walker"""
- handler.startDocument()
- for prefix, namespace in prefix_mapping.items():
- handler.startPrefixMapping(prefix, namespace)
-
- for token in walker:
- type = token["type"]
- if type == "Doctype":
- continue
- elif type in ("StartTag", "EmptyTag"):
- attrs = AttributesNSImpl(token["data"],
- unadjustForeignAttributes)
- handler.startElementNS((token["namespace"], token["name"]),
- token["name"],
- attrs)
- if type == "EmptyTag":
- handler.endElementNS((token["namespace"], token["name"]),
- token["name"])
- elif type == "EndTag":
- handler.endElementNS((token["namespace"], token["name"]),
- token["name"])
- elif type in ("Characters", "SpaceCharacters"):
- handler.characters(token["data"])
- elif type == "Comment":
- pass
- else:
- assert False, "Unknown token type"
-
- for prefix, namespace in prefix_mapping.items():
- handler.endPrefixMapping(prefix)
- handler.endDocument()
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/__init__.py
deleted file mode 100644
index 6a6b2a4c45c..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/__init__.py
+++ /dev/null
@@ -1,76 +0,0 @@
-"""A collection of modules for building different kinds of tree from
-HTML documents.
-
-To create a treebuilder for a new type of tree, you need to do
-implement several things:
-
-1) A set of classes for various types of elements: Document, Doctype,
-Comment, Element. These must implement the interface of
-_base.treebuilders.Node (although comment nodes have a different
-signature for their constructor, see treebuilders.etree.Comment)
-Textual content may also be implemented as another node type, or not, as
-your tree implementation requires.
-
-2) A treebuilder object (called TreeBuilder by convention) that
-inherits from treebuilders._base.TreeBuilder. This has 4 required attributes:
-documentClass - the class to use for the bottommost node of a document
-elementClass - the class to use for HTML Elements
-commentClass - the class to use for comments
-doctypeClass - the class to use for doctypes
-It also has one required method:
-getDocument - Returns the root node of the complete document tree
-
-3) If you wish to run the unit tests, you must also create a
-testSerializer method on your treebuilder which accepts a node and
-returns a string containing Node and its children serialized according
-to the format used in the unittests
-"""
-
-from __future__ import absolute_import, division, unicode_literals
-
-from ..utils import default_etree
-
-treeBuilderCache = {}
-
-
-def getTreeBuilder(treeType, implementation=None, **kwargs):
- """Get a TreeBuilder class for various types of tree with built-in support
-
- treeType - the name of the tree type required (case-insensitive). Supported
- values are:
-
- "dom" - A generic builder for DOM implementations, defaulting to
- a xml.dom.minidom based implementation.
- "etree" - A generic builder for tree implementations exposing an
- ElementTree-like interface, defaulting to
- xml.etree.cElementTree if available and
- xml.etree.ElementTree if not.
- "lxml" - A etree-based builder for lxml.etree, handling
- limitations of lxml's implementation.
-
- implementation - (Currently applies to the "etree" and "dom" tree types). A
- module implementing the tree type e.g.
- xml.etree.ElementTree or xml.etree.cElementTree."""
-
- treeType = treeType.lower()
- if treeType not in treeBuilderCache:
- if treeType == "dom":
- from . import dom
- # Come up with a sane default (pref. from the stdlib)
- if implementation is None:
- from xml.dom import minidom
- implementation = minidom
- # NEVER cache here, caching is done in the dom submodule
- return dom.getDomModule(implementation, **kwargs).TreeBuilder
- elif treeType == "lxml":
- from . import etree_lxml
- treeBuilderCache[treeType] = etree_lxml.TreeBuilder
- elif treeType == "etree":
- from . import etree
- if implementation is None:
- implementation = default_etree
- # NEVER cache here, caching is done in the etree submodule
- return etree.getETreeModule(implementation, **kwargs).TreeBuilder
- else:
- raise ValueError("""Unrecognised treebuilder "%s" """ % treeType)
- return treeBuilderCache.get(treeType)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/_base.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/_base.py
deleted file mode 100644
index 8b97cc11a21..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/_base.py
+++ /dev/null
@@ -1,377 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type
-
-from ..constants import scopingElements, tableInsertModeElements, namespaces
-
-# The scope markers are inserted when entering object elements,
-# marquees, table cells, and table captions, and are used to prevent formatting
-# from "leaking" into tables, object elements, and marquees.
-Marker = None
-
-listElementsMap = {
- None: (frozenset(scopingElements), False),
- "button": (frozenset(scopingElements | set([(namespaces["html"], "button")])), False),
- "list": (frozenset(scopingElements | set([(namespaces["html"], "ol"),
- (namespaces["html"], "ul")])), False),
- "table": (frozenset([(namespaces["html"], "html"),
- (namespaces["html"], "table")]), False),
- "select": (frozenset([(namespaces["html"], "optgroup"),
- (namespaces["html"], "option")]), True)
-}
-
-
-class Node(object):
- def __init__(self, name):
- """Node representing an item in the tree.
- name - The tag name associated with the node
- parent - The parent of the current node (or None for the document node)
- value - The value of the current node (applies to text nodes and
- comments
- attributes - a dict holding name, value pairs for attributes of the node
- childNodes - a list of child nodes of the current node. This must
- include all elements but not necessarily other node types
- _flags - A list of miscellaneous flags that can be set on the node
- """
- self.name = name
- self.parent = None
- self.value = None
- self.attributes = {}
- self.childNodes = []
- self._flags = []
-
- def __str__(self):
- attributesStr = " ".join(["%s=\"%s\"" % (name, value)
- for name, value in
- self.attributes.items()])
- if attributesStr:
- return "<%s %s>" % (self.name, attributesStr)
- else:
- return "<%s>" % (self.name)
-
- def __repr__(self):
- return "<%s>" % (self.name)
-
- def appendChild(self, node):
- """Insert node as a child of the current node
- """
- raise NotImplementedError
-
- def insertText(self, data, insertBefore=None):
- """Insert data as text in the current node, positioned before the
- start of node insertBefore or to the end of the node's text.
- """
- raise NotImplementedError
-
- def insertBefore(self, node, refNode):
- """Insert node as a child of the current node, before refNode in the
- list of child nodes. Raises ValueError if refNode is not a child of
- the current node"""
- raise NotImplementedError
-
- def removeChild(self, node):
- """Remove node from the children of the current node
- """
- raise NotImplementedError
-
- def reparentChildren(self, newParent):
- """Move all the children of the current node to newParent.
- This is needed so that trees that don't store text as nodes move the
- text in the correct way
- """
- # XXX - should this method be made more general?
- for child in self.childNodes:
- newParent.appendChild(child)
- self.childNodes = []
-
- def cloneNode(self):
- """Return a shallow copy of the current node i.e. a node with the same
- name and attributes but with no parent or child nodes
- """
- raise NotImplementedError
-
- def hasContent(self):
- """Return true if the node has children or text, false otherwise
- """
- raise NotImplementedError
-
-
-class ActiveFormattingElements(list):
- def append(self, node):
- equalCount = 0
- if node != Marker:
- for element in self[::-1]:
- if element == Marker:
- break
- if self.nodesEqual(element, node):
- equalCount += 1
- if equalCount == 3:
- self.remove(element)
- break
- list.append(self, node)
-
- def nodesEqual(self, node1, node2):
- if not node1.nameTuple == node2.nameTuple:
- return False
-
- if not node1.attributes == node2.attributes:
- return False
-
- return True
-
-
-class TreeBuilder(object):
- """Base treebuilder implementation
- documentClass - the class to use for the bottommost node of a document
- elementClass - the class to use for HTML Elements
- commentClass - the class to use for comments
- doctypeClass - the class to use for doctypes
- """
-
- # Document class
- documentClass = None
-
- # The class to use for creating a node
- elementClass = None
-
- # The class to use for creating comments
- commentClass = None
-
- # The class to use for creating doctypes
- doctypeClass = None
-
- # Fragment class
- fragmentClass = None
-
- def __init__(self, namespaceHTMLElements):
- if namespaceHTMLElements:
- self.defaultNamespace = "http://www.w3.org/1999/xhtml"
- else:
- self.defaultNamespace = None
- self.reset()
-
- def reset(self):
- self.openElements = []
- self.activeFormattingElements = ActiveFormattingElements()
-
- # XXX - rename these to headElement, formElement
- self.headPointer = None
- self.formPointer = None
-
- self.insertFromTable = False
-
- self.document = self.documentClass()
-
- def elementInScope(self, target, variant=None):
-
- # If we pass a node in we match that. if we pass a string
- # match any node with that name
- exactNode = hasattr(target, "nameTuple")
-
- listElements, invert = listElementsMap[variant]
-
- for node in reversed(self.openElements):
- if (node.name == target and not exactNode or
- node == target and exactNode):
- return True
- elif (invert ^ (node.nameTuple in listElements)):
- return False
-
- assert False # We should never reach this point
-
- def reconstructActiveFormattingElements(self):
- # Within this algorithm the order of steps described in the
- # specification is not quite the same as the order of steps in the
- # code. It should still do the same though.
-
- # Step 1: stop the algorithm when there's nothing to do.
- if not self.activeFormattingElements:
- return
-
- # Step 2 and step 3: we start with the last element. So i is -1.
- i = len(self.activeFormattingElements) - 1
- entry = self.activeFormattingElements[i]
- if entry == Marker or entry in self.openElements:
- return
-
- # Step 6
- while entry != Marker and entry not in self.openElements:
- if i == 0:
- # This will be reset to 0 below
- i = -1
- break
- i -= 1
- # Step 5: let entry be one earlier in the list.
- entry = self.activeFormattingElements[i]
-
- while True:
- # Step 7
- i += 1
-
- # Step 8
- entry = self.activeFormattingElements[i]
- clone = entry.cloneNode() # Mainly to get a new copy of the attributes
-
- # Step 9
- element = self.insertElement({"type": "StartTag",
- "name": clone.name,
- "namespace": clone.namespace,
- "data": clone.attributes})
-
- # Step 10
- self.activeFormattingElements[i] = element
-
- # Step 11
- if element == self.activeFormattingElements[-1]:
- break
-
- def clearActiveFormattingElements(self):
- entry = self.activeFormattingElements.pop()
- while self.activeFormattingElements and entry != Marker:
- entry = self.activeFormattingElements.pop()
-
- def elementInActiveFormattingElements(self, name):
- """Check if an element exists between the end of the active
- formatting elements and the last marker. If it does, return it, else
- return false"""
-
- for item in self.activeFormattingElements[::-1]:
- # Check for Marker first because if it's a Marker it doesn't have a
- # name attribute.
- if item == Marker:
- break
- elif item.name == name:
- return item
- return False
-
- def insertRoot(self, token):
- element = self.createElement(token)
- self.openElements.append(element)
- self.document.appendChild(element)
-
- def insertDoctype(self, token):
- name = token["name"]
- publicId = token["publicId"]
- systemId = token["systemId"]
-
- doctype = self.doctypeClass(name, publicId, systemId)
- self.document.appendChild(doctype)
-
- def insertComment(self, token, parent=None):
- if parent is None:
- parent = self.openElements[-1]
- parent.appendChild(self.commentClass(token["data"]))
-
- def createElement(self, token):
- """Create an element but don't insert it anywhere"""
- name = token["name"]
- namespace = token.get("namespace", self.defaultNamespace)
- element = self.elementClass(name, namespace)
- element.attributes = token["data"]
- return element
-
- def _getInsertFromTable(self):
- return self._insertFromTable
-
- def _setInsertFromTable(self, value):
- """Switch the function used to insert an element from the
- normal one to the misnested table one and back again"""
- self._insertFromTable = value
- if value:
- self.insertElement = self.insertElementTable
- else:
- self.insertElement = self.insertElementNormal
-
- insertFromTable = property(_getInsertFromTable, _setInsertFromTable)
-
- def insertElementNormal(self, token):
- name = token["name"]
- assert isinstance(name, text_type), "Element %s not unicode" % name
- namespace = token.get("namespace", self.defaultNamespace)
- element = self.elementClass(name, namespace)
- element.attributes = token["data"]
- self.openElements[-1].appendChild(element)
- self.openElements.append(element)
- return element
-
- def insertElementTable(self, token):
- """Create an element and insert it into the tree"""
- element = self.createElement(token)
- if self.openElements[-1].name not in tableInsertModeElements:
- return self.insertElementNormal(token)
- else:
- # We should be in the InTable mode. This means we want to do
- # special magic element rearranging
- parent, insertBefore = self.getTableMisnestedNodePosition()
- if insertBefore is None:
- parent.appendChild(element)
- else:
- parent.insertBefore(element, insertBefore)
- self.openElements.append(element)
- return element
-
- def insertText(self, data, parent=None):
- """Insert text data."""
- if parent is None:
- parent = self.openElements[-1]
-
- if (not self.insertFromTable or (self.insertFromTable and
- self.openElements[-1].name
- not in tableInsertModeElements)):
- parent.insertText(data)
- else:
- # We should be in the InTable mode. This means we want to do
- # special magic element rearranging
- parent, insertBefore = self.getTableMisnestedNodePosition()
- parent.insertText(data, insertBefore)
-
- def getTableMisnestedNodePosition(self):
- """Get the foster parent element, and sibling to insert before
- (or None) when inserting a misnested table node"""
- # The foster parent element is the one which comes before the most
- # recently opened table element
- # XXX - this is really inelegant
- lastTable = None
- fosterParent = None
- insertBefore = None
- for elm in self.openElements[::-1]:
- if elm.name == "table":
- lastTable = elm
- break
- if lastTable:
- # XXX - we should really check that this parent is actually a
- # node here
- if lastTable.parent:
- fosterParent = lastTable.parent
- insertBefore = lastTable
- else:
- fosterParent = self.openElements[
- self.openElements.index(lastTable) - 1]
- else:
- fosterParent = self.openElements[0]
- return fosterParent, insertBefore
-
- def generateImpliedEndTags(self, exclude=None):
- name = self.openElements[-1].name
- # XXX td, th and tr are not actually needed
- if (name in frozenset(("dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"))
- and name != exclude):
- self.openElements.pop()
- # XXX This is not entirely what the specification says. We should
- # investigate it more closely.
- self.generateImpliedEndTags(exclude)
-
- def getDocument(self):
- "Return the final tree"
- return self.document
-
- def getFragment(self):
- "Return the final fragment"
- # assert self.innerHTML
- fragment = self.fragmentClass()
- self.openElements[0].reparentChildren(fragment)
- return fragment
-
- def testSerializer(self, node):
- """Serialize the subtree of node in the format required by unit tests
- node - the node from which to start serializing"""
- raise NotImplementedError
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/dom.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/dom.py
deleted file mode 100644
index 234233b7932..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/dom.py
+++ /dev/null
@@ -1,227 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-
-from xml.dom import minidom, Node
-import weakref
-
-from . import _base
-from .. import constants
-from ..constants import namespaces
-from ..utils import moduleFactoryFactory
-
-
-def getDomBuilder(DomImplementation):
- Dom = DomImplementation
-
- class AttrList(object):
- def __init__(self, element):
- self.element = element
-
- def __iter__(self):
- return list(self.element.attributes.items()).__iter__()
-
- def __setitem__(self, name, value):
- self.element.setAttribute(name, value)
-
- def __len__(self):
- return len(list(self.element.attributes.items()))
-
- def items(self):
- return [(item[0], item[1]) for item in
- list(self.element.attributes.items())]
-
- def keys(self):
- return list(self.element.attributes.keys())
-
- def __getitem__(self, name):
- return self.element.getAttribute(name)
-
- def __contains__(self, name):
- if isinstance(name, tuple):
- raise NotImplementedError
- else:
- return self.element.hasAttribute(name)
-
- class NodeBuilder(_base.Node):
- def __init__(self, element):
- _base.Node.__init__(self, element.nodeName)
- self.element = element
-
- namespace = property(lambda self: hasattr(self.element, "namespaceURI")
- and self.element.namespaceURI or None)
-
- def appendChild(self, node):
- node.parent = self
- self.element.appendChild(node.element)
-
- def insertText(self, data, insertBefore=None):
- text = self.element.ownerDocument.createTextNode(data)
- if insertBefore:
- self.element.insertBefore(text, insertBefore.element)
- else:
- self.element.appendChild(text)
-
- def insertBefore(self, node, refNode):
- self.element.insertBefore(node.element, refNode.element)
- node.parent = self
-
- def removeChild(self, node):
- if node.element.parentNode == self.element:
- self.element.removeChild(node.element)
- node.parent = None
-
- def reparentChildren(self, newParent):
- while self.element.hasChildNodes():
- child = self.element.firstChild
- self.element.removeChild(child)
- newParent.element.appendChild(child)
- self.childNodes = []
-
- def getAttributes(self):
- return AttrList(self.element)
-
- def setAttributes(self, attributes):
- if attributes:
- for name, value in list(attributes.items()):
- if isinstance(name, tuple):
- if name[0] is not None:
- qualifiedName = (name[0] + ":" + name[1])
- else:
- qualifiedName = name[1]
- self.element.setAttributeNS(name[2], qualifiedName,
- value)
- else:
- self.element.setAttribute(
- name, value)
- attributes = property(getAttributes, setAttributes)
-
- def cloneNode(self):
- return NodeBuilder(self.element.cloneNode(False))
-
- def hasContent(self):
- return self.element.hasChildNodes()
-
- def getNameTuple(self):
- if self.namespace is None:
- return namespaces["html"], self.name
- else:
- return self.namespace, self.name
-
- nameTuple = property(getNameTuple)
-
- class TreeBuilder(_base.TreeBuilder):
- def documentClass(self):
- self.dom = Dom.getDOMImplementation().createDocument(None, None, None)
- return weakref.proxy(self)
-
- def insertDoctype(self, token):
- name = token["name"]
- publicId = token["publicId"]
- systemId = token["systemId"]
-
- domimpl = Dom.getDOMImplementation()
- doctype = domimpl.createDocumentType(name, publicId, systemId)
- self.document.appendChild(NodeBuilder(doctype))
- if Dom == minidom:
- doctype.ownerDocument = self.dom
-
- def elementClass(self, name, namespace=None):
- if namespace is None and self.defaultNamespace is None:
- node = self.dom.createElement(name)
- else:
- node = self.dom.createElementNS(namespace, name)
-
- return NodeBuilder(node)
-
- def commentClass(self, data):
- return NodeBuilder(self.dom.createComment(data))
-
- def fragmentClass(self):
- return NodeBuilder(self.dom.createDocumentFragment())
-
- def appendChild(self, node):
- self.dom.appendChild(node.element)
-
- def testSerializer(self, element):
- return testSerializer(element)
-
- def getDocument(self):
- return self.dom
-
- def getFragment(self):
- return _base.TreeBuilder.getFragment(self).element
-
- def insertText(self, data, parent=None):
- data = data
- if parent != self:
- _base.TreeBuilder.insertText(self, data, parent)
- else:
- # HACK: allow text nodes as children of the document node
- if hasattr(self.dom, '_child_node_types'):
- if Node.TEXT_NODE not in self.dom._child_node_types:
- self.dom._child_node_types = list(self.dom._child_node_types)
- self.dom._child_node_types.append(Node.TEXT_NODE)
- self.dom.appendChild(self.dom.createTextNode(data))
-
- implementation = DomImplementation
- name = None
-
- def testSerializer(element):
- element.normalize()
- rv = []
-
- def serializeElement(element, indent=0):
- if element.nodeType == Node.DOCUMENT_TYPE_NODE:
- if element.name:
- if element.publicId or element.systemId:
- publicId = element.publicId or ""
- systemId = element.systemId or ""
- rv.append("""|%s<!DOCTYPE %s "%s" "%s">""" %
- (' ' * indent, element.name, publicId, systemId))
- else:
- rv.append("|%s<!DOCTYPE %s>" % (' ' * indent, element.name))
- else:
- rv.append("|%s<!DOCTYPE >" % (' ' * indent,))
- elif element.nodeType == Node.DOCUMENT_NODE:
- rv.append("#document")
- elif element.nodeType == Node.DOCUMENT_FRAGMENT_NODE:
- rv.append("#document-fragment")
- elif element.nodeType == Node.COMMENT_NODE:
- rv.append("|%s<!-- %s -->" % (' ' * indent, element.nodeValue))
- elif element.nodeType == Node.TEXT_NODE:
- rv.append("|%s\"%s\"" % (' ' * indent, element.nodeValue))
- else:
- if (hasattr(element, "namespaceURI") and
- element.namespaceURI is not None):
- name = "%s %s" % (constants.prefixes[element.namespaceURI],
- element.nodeName)
- else:
- name = element.nodeName
- rv.append("|%s<%s>" % (' ' * indent, name))
- if element.hasAttributes():
- attributes = []
- for i in range(len(element.attributes)):
- attr = element.attributes.item(i)
- name = attr.nodeName
- value = attr.value
- ns = attr.namespaceURI
- if ns:
- name = "%s %s" % (constants.prefixes[ns], attr.localName)
- else:
- name = attr.nodeName
- attributes.append((name, value))
-
- for name, value in sorted(attributes):
- rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
- indent += 2
- for child in element.childNodes:
- serializeElement(child, indent)
- serializeElement(element, 0)
-
- return "\n".join(rv)
-
- return locals()
-
-
-# The actual means to get a module!
-getDomModule = moduleFactoryFactory(getDomBuilder)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree.py
deleted file mode 100644
index 2c8ed19f8fe..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree.py
+++ /dev/null
@@ -1,337 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type
-
-import re
-
-from . import _base
-from .. import ihatexml
-from .. import constants
-from ..constants import namespaces
-from ..utils import moduleFactoryFactory
-
-tag_regexp = re.compile("{([^}]*)}(.*)")
-
-
-def getETreeBuilder(ElementTreeImplementation, fullTree=False):
- ElementTree = ElementTreeImplementation
- ElementTreeCommentType = ElementTree.Comment("asd").tag
-
- class Element(_base.Node):
- def __init__(self, name, namespace=None):
- self._name = name
- self._namespace = namespace
- self._element = ElementTree.Element(self._getETreeTag(name,
- namespace))
- if namespace is None:
- self.nameTuple = namespaces["html"], self._name
- else:
- self.nameTuple = self._namespace, self._name
- self.parent = None
- self._childNodes = []
- self._flags = []
-
- def _getETreeTag(self, name, namespace):
- if namespace is None:
- etree_tag = name
- else:
- etree_tag = "{%s}%s" % (namespace, name)
- return etree_tag
-
- def _setName(self, name):
- self._name = name
- self._element.tag = self._getETreeTag(self._name, self._namespace)
-
- def _getName(self):
- return self._name
-
- name = property(_getName, _setName)
-
- def _setNamespace(self, namespace):
- self._namespace = namespace
- self._element.tag = self._getETreeTag(self._name, self._namespace)
-
- def _getNamespace(self):
- return self._namespace
-
- namespace = property(_getNamespace, _setNamespace)
-
- def _getAttributes(self):
- return self._element.attrib
-
- def _setAttributes(self, attributes):
- # Delete existing attributes first
- # XXX - there may be a better way to do this...
- for key in list(self._element.attrib.keys()):
- del self._element.attrib[key]
- for key, value in attributes.items():
- if isinstance(key, tuple):
- name = "{%s}%s" % (key[2], key[1])
- else:
- name = key
- self._element.set(name, value)
-
- attributes = property(_getAttributes, _setAttributes)
-
- def _getChildNodes(self):
- return self._childNodes
-
- def _setChildNodes(self, value):
- del self._element[:]
- self._childNodes = []
- for element in value:
- self.insertChild(element)
-
- childNodes = property(_getChildNodes, _setChildNodes)
-
- def hasContent(self):
- """Return true if the node has children or text"""
- return bool(self._element.text or len(self._element))
-
- def appendChild(self, node):
- self._childNodes.append(node)
- self._element.append(node._element)
- node.parent = self
-
- def insertBefore(self, node, refNode):
- index = list(self._element).index(refNode._element)
- self._element.insert(index, node._element)
- node.parent = self
-
- def removeChild(self, node):
- self._element.remove(node._element)
- node.parent = None
-
- def insertText(self, data, insertBefore=None):
- if not(len(self._element)):
- if not self._element.text:
- self._element.text = ""
- self._element.text += data
- elif insertBefore is None:
- # Insert the text as the tail of the last child element
- if not self._element[-1].tail:
- self._element[-1].tail = ""
- self._element[-1].tail += data
- else:
- # Insert the text before the specified node
- children = list(self._element)
- index = children.index(insertBefore._element)
- if index > 0:
- if not self._element[index - 1].tail:
- self._element[index - 1].tail = ""
- self._element[index - 1].tail += data
- else:
- if not self._element.text:
- self._element.text = ""
- self._element.text += data
-
- def cloneNode(self):
- element = type(self)(self.name, self.namespace)
- for name, value in self.attributes.items():
- element.attributes[name] = value
- return element
-
- def reparentChildren(self, newParent):
- if newParent.childNodes:
- newParent.childNodes[-1]._element.tail += self._element.text
- else:
- if not newParent._element.text:
- newParent._element.text = ""
- if self._element.text is not None:
- newParent._element.text += self._element.text
- self._element.text = ""
- _base.Node.reparentChildren(self, newParent)
-
- class Comment(Element):
- def __init__(self, data):
- # Use the superclass constructor to set all properties on the
- # wrapper element
- self._element = ElementTree.Comment(data)
- self.parent = None
- self._childNodes = []
- self._flags = []
-
- def _getData(self):
- return self._element.text
-
- def _setData(self, value):
- self._element.text = value
-
- data = property(_getData, _setData)
-
- class DocumentType(Element):
- def __init__(self, name, publicId, systemId):
- Element.__init__(self, "<!DOCTYPE>")
- self._element.text = name
- self.publicId = publicId
- self.systemId = systemId
-
- def _getPublicId(self):
- return self._element.get("publicId", "")
-
- def _setPublicId(self, value):
- if value is not None:
- self._element.set("publicId", value)
-
- publicId = property(_getPublicId, _setPublicId)
-
- def _getSystemId(self):
- return self._element.get("systemId", "")
-
- def _setSystemId(self, value):
- if value is not None:
- self._element.set("systemId", value)
-
- systemId = property(_getSystemId, _setSystemId)
-
- class Document(Element):
- def __init__(self):
- Element.__init__(self, "DOCUMENT_ROOT")
-
- class DocumentFragment(Element):
- def __init__(self):
- Element.__init__(self, "DOCUMENT_FRAGMENT")
-
- def testSerializer(element):
- rv = []
-
- def serializeElement(element, indent=0):
- if not(hasattr(element, "tag")):
- element = element.getroot()
- if element.tag == "<!DOCTYPE>":
- if element.get("publicId") or element.get("systemId"):
- publicId = element.get("publicId") or ""
- systemId = element.get("systemId") or ""
- rv.append("""<!DOCTYPE %s "%s" "%s">""" %
- (element.text, publicId, systemId))
- else:
- rv.append("<!DOCTYPE %s>" % (element.text,))
- elif element.tag == "DOCUMENT_ROOT":
- rv.append("#document")
- if element.text is not None:
- rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
- if element.tail is not None:
- raise TypeError("Document node cannot have tail")
- if hasattr(element, "attrib") and len(element.attrib):
- raise TypeError("Document node cannot have attributes")
- elif element.tag == ElementTreeCommentType:
- rv.append("|%s<!-- %s -->" % (' ' * indent, element.text))
- else:
- assert isinstance(element.tag, text_type), \
- "Expected unicode, got %s, %s" % (type(element.tag), element.tag)
- nsmatch = tag_regexp.match(element.tag)
-
- if nsmatch is None:
- name = element.tag
- else:
- ns, name = nsmatch.groups()
- prefix = constants.prefixes[ns]
- name = "%s %s" % (prefix, name)
- rv.append("|%s<%s>" % (' ' * indent, name))
-
- if hasattr(element, "attrib"):
- attributes = []
- for name, value in element.attrib.items():
- nsmatch = tag_regexp.match(name)
- if nsmatch is not None:
- ns, name = nsmatch.groups()
- prefix = constants.prefixes[ns]
- attr_string = "%s %s" % (prefix, name)
- else:
- attr_string = name
- attributes.append((attr_string, value))
-
- for name, value in sorted(attributes):
- rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
- if element.text:
- rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
- indent += 2
- for child in element:
- serializeElement(child, indent)
- if element.tail:
- rv.append("|%s\"%s\"" % (' ' * (indent - 2), element.tail))
- serializeElement(element, 0)
-
- return "\n".join(rv)
-
- def tostring(element):
- """Serialize an element and its child nodes to a string"""
- rv = []
- filter = ihatexml.InfosetFilter()
-
- def serializeElement(element):
- if isinstance(element, ElementTree.ElementTree):
- element = element.getroot()
-
- if element.tag == "<!DOCTYPE>":
- if element.get("publicId") or element.get("systemId"):
- publicId = element.get("publicId") or ""
- systemId = element.get("systemId") or ""
- rv.append("""<!DOCTYPE %s PUBLIC "%s" "%s">""" %
- (element.text, publicId, systemId))
- else:
- rv.append("<!DOCTYPE %s>" % (element.text,))
- elif element.tag == "DOCUMENT_ROOT":
- if element.text is not None:
- rv.append(element.text)
- if element.tail is not None:
- raise TypeError("Document node cannot have tail")
- if hasattr(element, "attrib") and len(element.attrib):
- raise TypeError("Document node cannot have attributes")
-
- for child in element:
- serializeElement(child)
-
- elif element.tag == ElementTreeCommentType:
- rv.append("<!--%s-->" % (element.text,))
- else:
- # This is assumed to be an ordinary element
- if not element.attrib:
- rv.append("<%s>" % (filter.fromXmlName(element.tag),))
- else:
- attr = " ".join(["%s=\"%s\"" % (
- filter.fromXmlName(name), value)
- for name, value in element.attrib.items()])
- rv.append("<%s %s>" % (element.tag, attr))
- if element.text:
- rv.append(element.text)
-
- for child in element:
- serializeElement(child)
-
- rv.append("</%s>" % (element.tag,))
-
- if element.tail:
- rv.append(element.tail)
-
- serializeElement(element)
-
- return "".join(rv)
-
- class TreeBuilder(_base.TreeBuilder):
- documentClass = Document
- doctypeClass = DocumentType
- elementClass = Element
- commentClass = Comment
- fragmentClass = DocumentFragment
- implementation = ElementTreeImplementation
-
- def testSerializer(self, element):
- return testSerializer(element)
-
- def getDocument(self):
- if fullTree:
- return self.document._element
- else:
- if self.defaultNamespace is not None:
- return self.document._element.find(
- "{%s}html" % self.defaultNamespace)
- else:
- return self.document._element.find("html")
-
- def getFragment(self):
- return _base.TreeBuilder.getFragment(self)._element
-
- return locals()
-
-
-getETreeModule = moduleFactoryFactory(getETreeBuilder)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree_lxml.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree_lxml.py
deleted file mode 100644
index 35d08efaa61..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treebuilders/etree_lxml.py
+++ /dev/null
@@ -1,369 +0,0 @@
-"""Module for supporting the lxml.etree library. The idea here is to use as much
-of the native library as possible, without using fragile hacks like custom element
-names that break between releases. The downside of this is that we cannot represent
-all possible trees; specifically the following are known to cause problems:
-
-Text or comments as siblings of the root element
-Docypes with no name
-
-When any of these things occur, we emit a DataLossWarning
-"""
-
-from __future__ import absolute_import, division, unicode_literals
-
-import warnings
-import re
-import sys
-
-from . import _base
-from ..constants import DataLossWarning
-from .. import constants
-from . import etree as etree_builders
-from .. import ihatexml
-
-import lxml.etree as etree
-
-
-fullTree = True
-tag_regexp = re.compile("{([^}]*)}(.*)")
-
-comment_type = etree.Comment("asd").tag
-
-
-class DocumentType(object):
- def __init__(self, name, publicId, systemId):
- self.name = name
- self.publicId = publicId
- self.systemId = systemId
-
-
-class Document(object):
- def __init__(self):
- self._elementTree = None
- self._childNodes = []
-
- def appendChild(self, element):
- self._elementTree.getroot().addnext(element._element)
-
- def _getChildNodes(self):
- return self._childNodes
-
- childNodes = property(_getChildNodes)
-
-
-def testSerializer(element):
- rv = []
- finalText = None
- infosetFilter = ihatexml.InfosetFilter()
-
- def serializeElement(element, indent=0):
- if not hasattr(element, "tag"):
- if hasattr(element, "getroot"):
- # Full tree case
- rv.append("#document")
- if element.docinfo.internalDTD:
- if not (element.docinfo.public_id or
- element.docinfo.system_url):
- dtd_str = "<!DOCTYPE %s>" % element.docinfo.root_name
- else:
- dtd_str = """<!DOCTYPE %s "%s" "%s">""" % (
- element.docinfo.root_name,
- element.docinfo.public_id,
- element.docinfo.system_url)
- rv.append("|%s%s" % (' ' * (indent + 2), dtd_str))
- next_element = element.getroot()
- while next_element.getprevious() is not None:
- next_element = next_element.getprevious()
- while next_element is not None:
- serializeElement(next_element, indent + 2)
- next_element = next_element.getnext()
- elif isinstance(element, str) or isinstance(element, bytes):
- # Text in a fragment
- assert isinstance(element, str) or sys.version_info.major == 2
- rv.append("|%s\"%s\"" % (' ' * indent, element))
- else:
- # Fragment case
- rv.append("#document-fragment")
- for next_element in element:
- serializeElement(next_element, indent + 2)
- elif element.tag == comment_type:
- rv.append("|%s<!-- %s -->" % (' ' * indent, element.text))
- if hasattr(element, "tail") and element.tail:
- rv.append("|%s\"%s\"" % (' ' * indent, element.tail))
- else:
- assert isinstance(element, etree._Element)
- nsmatch = etree_builders.tag_regexp.match(element.tag)
- if nsmatch is not None:
- ns = nsmatch.group(1)
- tag = nsmatch.group(2)
- prefix = constants.prefixes[ns]
- rv.append("|%s<%s %s>" % (' ' * indent, prefix,
- infosetFilter.fromXmlName(tag)))
- else:
- rv.append("|%s<%s>" % (' ' * indent,
- infosetFilter.fromXmlName(element.tag)))
-
- if hasattr(element, "attrib"):
- attributes = []
- for name, value in element.attrib.items():
- nsmatch = tag_regexp.match(name)
- if nsmatch is not None:
- ns, name = nsmatch.groups()
- name = infosetFilter.fromXmlName(name)
- prefix = constants.prefixes[ns]
- attr_string = "%s %s" % (prefix, name)
- else:
- attr_string = infosetFilter.fromXmlName(name)
- attributes.append((attr_string, value))
-
- for name, value in sorted(attributes):
- rv.append('|%s%s="%s"' % (' ' * (indent + 2), name, value))
-
- if element.text:
- rv.append("|%s\"%s\"" % (' ' * (indent + 2), element.text))
- indent += 2
- for child in element:
- serializeElement(child, indent)
- if hasattr(element, "tail") and element.tail:
- rv.append("|%s\"%s\"" % (' ' * (indent - 2), element.tail))
- serializeElement(element, 0)
-
- if finalText is not None:
- rv.append("|%s\"%s\"" % (' ' * 2, finalText))
-
- return "\n".join(rv)
-
-
-def tostring(element):
- """Serialize an element and its child nodes to a string"""
- rv = []
- finalText = None
-
- def serializeElement(element):
- if not hasattr(element, "tag"):
- if element.docinfo.internalDTD:
- if element.docinfo.doctype:
- dtd_str = element.docinfo.doctype
- else:
- dtd_str = "<!DOCTYPE %s>" % element.docinfo.root_name
- rv.append(dtd_str)
- serializeElement(element.getroot())
-
- elif element.tag == comment_type:
- rv.append("<!--%s-->" % (element.text,))
-
- else:
- # This is assumed to be an ordinary element
- if not element.attrib:
- rv.append("<%s>" % (element.tag,))
- else:
- attr = " ".join(["%s=\"%s\"" % (name, value)
- for name, value in element.attrib.items()])
- rv.append("<%s %s>" % (element.tag, attr))
- if element.text:
- rv.append(element.text)
-
- for child in element:
- serializeElement(child)
-
- rv.append("</%s>" % (element.tag,))
-
- if hasattr(element, "tail") and element.tail:
- rv.append(element.tail)
-
- serializeElement(element)
-
- if finalText is not None:
- rv.append("%s\"" % (' ' * 2, finalText))
-
- return "".join(rv)
-
-
-class TreeBuilder(_base.TreeBuilder):
- documentClass = Document
- doctypeClass = DocumentType
- elementClass = None
- commentClass = None
- fragmentClass = Document
- implementation = etree
-
- def __init__(self, namespaceHTMLElements, fullTree=False):
- builder = etree_builders.getETreeModule(etree, fullTree=fullTree)
- infosetFilter = self.infosetFilter = ihatexml.InfosetFilter()
- self.namespaceHTMLElements = namespaceHTMLElements
-
- class Attributes(dict):
- def __init__(self, element, value={}):
- self._element = element
- dict.__init__(self, value)
- for key, value in self.items():
- if isinstance(key, tuple):
- name = "{%s}%s" % (key[2], infosetFilter.coerceAttribute(key[1]))
- else:
- name = infosetFilter.coerceAttribute(key)
- self._element._element.attrib[name] = value
-
- def __setitem__(self, key, value):
- dict.__setitem__(self, key, value)
- if isinstance(key, tuple):
- name = "{%s}%s" % (key[2], infosetFilter.coerceAttribute(key[1]))
- else:
- name = infosetFilter.coerceAttribute(key)
- self._element._element.attrib[name] = value
-
- class Element(builder.Element):
- def __init__(self, name, namespace):
- name = infosetFilter.coerceElement(name)
- builder.Element.__init__(self, name, namespace=namespace)
- self._attributes = Attributes(self)
-
- def _setName(self, name):
- self._name = infosetFilter.coerceElement(name)
- self._element.tag = self._getETreeTag(
- self._name, self._namespace)
-
- def _getName(self):
- return infosetFilter.fromXmlName(self._name)
-
- name = property(_getName, _setName)
-
- def _getAttributes(self):
- return self._attributes
-
- def _setAttributes(self, attributes):
- self._attributes = Attributes(self, attributes)
-
- attributes = property(_getAttributes, _setAttributes)
-
- def insertText(self, data, insertBefore=None):
- data = infosetFilter.coerceCharacters(data)
- builder.Element.insertText(self, data, insertBefore)
-
- def appendChild(self, child):
- builder.Element.appendChild(self, child)
-
- class Comment(builder.Comment):
- def __init__(self, data):
- data = infosetFilter.coerceComment(data)
- builder.Comment.__init__(self, data)
-
- def _setData(self, data):
- data = infosetFilter.coerceComment(data)
- self._element.text = data
-
- def _getData(self):
- return self._element.text
-
- data = property(_getData, _setData)
-
- self.elementClass = Element
- self.commentClass = builder.Comment
- # self.fragmentClass = builder.DocumentFragment
- _base.TreeBuilder.__init__(self, namespaceHTMLElements)
-
- def reset(self):
- _base.TreeBuilder.reset(self)
- self.insertComment = self.insertCommentInitial
- self.initial_comments = []
- self.doctype = None
-
- def testSerializer(self, element):
- return testSerializer(element)
-
- def getDocument(self):
- if fullTree:
- return self.document._elementTree
- else:
- return self.document._elementTree.getroot()
-
- def getFragment(self):
- fragment = []
- element = self.openElements[0]._element
- if element.text:
- fragment.append(element.text)
- fragment.extend(list(element))
- if element.tail:
- fragment.append(element.tail)
- return fragment
-
- def insertDoctype(self, token):
- name = token["name"]
- publicId = token["publicId"]
- systemId = token["systemId"]
-
- if not name:
- warnings.warn("lxml cannot represent empty doctype", DataLossWarning)
- self.doctype = None
- else:
- coercedName = self.infosetFilter.coerceElement(name)
- if coercedName != name:
- warnings.warn("lxml cannot represent non-xml doctype", DataLossWarning)
-
- doctype = self.doctypeClass(coercedName, publicId, systemId)
- self.doctype = doctype
-
- def insertCommentInitial(self, data, parent=None):
- self.initial_comments.append(data)
-
- def insertCommentMain(self, data, parent=None):
- if (parent == self.document and
- self.document._elementTree.getroot()[-1].tag == comment_type):
- warnings.warn("lxml cannot represent adjacent comments beyond the root elements", DataLossWarning)
- super(TreeBuilder, self).insertComment(data, parent)
-
- def insertRoot(self, token):
- """Create the document root"""
- # Because of the way libxml2 works, it doesn't seem to be possible to
- # alter information like the doctype after the tree has been parsed.
- # Therefore we need to use the built-in parser to create our iniial
- # tree, after which we can add elements like normal
- docStr = ""
- if self.doctype:
- assert self.doctype.name
- docStr += "<!DOCTYPE %s" % self.doctype.name
- if (self.doctype.publicId is not None or
- self.doctype.systemId is not None):
- docStr += (' PUBLIC "%s" ' %
- (self.infosetFilter.coercePubid(self.doctype.publicId or "")))
- if self.doctype.systemId:
- sysid = self.doctype.systemId
- if sysid.find("'") >= 0 and sysid.find('"') >= 0:
- warnings.warn("DOCTYPE system cannot contain single and double quotes", DataLossWarning)
- sysid = sysid.replace("'", 'U00027')
- if sysid.find("'") >= 0:
- docStr += '"%s"' % sysid
- else:
- docStr += "'%s'" % sysid
- else:
- docStr += "''"
- docStr += ">"
- if self.doctype.name != token["name"]:
- warnings.warn("lxml cannot represent doctype with a different name to the root element", DataLossWarning)
- docStr += "<THIS_SHOULD_NEVER_APPEAR_PUBLICLY/>"
- root = etree.fromstring(docStr)
-
- # Append the initial comments:
- for comment_token in self.initial_comments:
- root.addprevious(etree.Comment(comment_token["data"]))
-
- # Create the root document and add the ElementTree to it
- self.document = self.documentClass()
- self.document._elementTree = root.getroottree()
-
- # Give the root element the right name
- name = token["name"]
- namespace = token.get("namespace", self.defaultNamespace)
- if namespace is None:
- etree_tag = name
- else:
- etree_tag = "{%s}%s" % (namespace, name)
- root.tag = etree_tag
-
- # Add the root element to the internal child/open data structures
- root_element = self.elementClass(name, namespace)
- root_element._element = root
- self.document._childNodes.append(root_element)
- self.openElements.append(root_element)
-
- # Reset to the default insert comment function
- self.insertComment = self.insertCommentMain
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/__init__.py
deleted file mode 100644
index 20b91b114ab..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/__init__.py
+++ /dev/null
@@ -1,147 +0,0 @@
-"""A collection of modules for iterating through different kinds of
-tree, generating tokens identical to those produced by the tokenizer
-module.
-
-To create a tree walker for a new type of tree, you need to do
-implement a tree walker object (called TreeWalker by convention) that
-implements a 'serialize' method taking a tree as sole argument and
-returning an iterator generating tokens.
-"""
-
-from __future__ import absolute_import, division, unicode_literals
-
-__all__ = ["getTreeWalker", "pprint", "dom", "etree", "genshistream", "lxmletree",
- "pulldom"]
-
-import sys
-
-from .. import constants
-from ..utils import default_etree
-
-treeWalkerCache = {}
-
-
-def getTreeWalker(treeType, implementation=None, **kwargs):
- """Get a TreeWalker class for various types of tree with built-in support
-
- treeType - the name of the tree type required (case-insensitive). Supported
- values are:
-
- "dom" - The xml.dom.minidom DOM implementation
- "pulldom" - The xml.dom.pulldom event stream
- "etree" - A generic walker for tree implementations exposing an
- elementtree-like interface (known to work with
- ElementTree, cElementTree and lxml.etree).
- "lxml" - Optimized walker for lxml.etree
- "genshi" - a Genshi stream
-
- implementation - (Currently applies to the "etree" tree type only). A module
- implementing the tree type e.g. xml.etree.ElementTree or
- cElementTree."""
-
- treeType = treeType.lower()
- if treeType not in treeWalkerCache:
- if treeType in ("dom", "pulldom"):
- name = "%s.%s" % (__name__, treeType)
- __import__(name)
- mod = sys.modules[name]
- treeWalkerCache[treeType] = mod.TreeWalker
- elif treeType == "genshi":
- from . import genshistream
- treeWalkerCache[treeType] = genshistream.TreeWalker
- elif treeType == "lxml":
- from . import lxmletree
- treeWalkerCache[treeType] = lxmletree.TreeWalker
- elif treeType == "etree":
- from . import etree
- if implementation is None:
- implementation = default_etree
- # XXX: NEVER cache here, caching is done in the etree submodule
- return etree.getETreeModule(implementation, **kwargs).TreeWalker
- return treeWalkerCache.get(treeType)
-
-
-def concatenateCharacterTokens(tokens):
- pendingCharacters = []
- for token in tokens:
- type = token["type"]
- if type in ("Characters", "SpaceCharacters"):
- pendingCharacters.append(token["data"])
- else:
- if pendingCharacters:
- yield {"type": "Characters", "data": "".join(pendingCharacters)}
- pendingCharacters = []
- yield token
- if pendingCharacters:
- yield {"type": "Characters", "data": "".join(pendingCharacters)}
-
-
-def pprint(walker):
- """Pretty printer for tree walkers"""
- output = []
- indent = 0
- for token in concatenateCharacterTokens(walker):
- type = token["type"]
- if type in ("StartTag", "EmptyTag"):
- # tag name
- if token["namespace"] and token["namespace"] != constants.namespaces["html"]:
- if token["namespace"] in constants.prefixes:
- ns = constants.prefixes[token["namespace"]]
- else:
- ns = token["namespace"]
- name = "%s %s" % (ns, token["name"])
- else:
- name = token["name"]
- output.append("%s<%s>" % (" " * indent, name))
- indent += 2
- # attributes (sorted for consistent ordering)
- attrs = token["data"]
- for (namespace, localname), value in sorted(attrs.items()):
- if namespace:
- if namespace in constants.prefixes:
- ns = constants.prefixes[namespace]
- else:
- ns = namespace
- name = "%s %s" % (ns, localname)
- else:
- name = localname
- output.append("%s%s=\"%s\"" % (" " * indent, name, value))
- # self-closing
- if type == "EmptyTag":
- indent -= 2
-
- elif type == "EndTag":
- indent -= 2
-
- elif type == "Comment":
- output.append("%s<!-- %s -->" % (" " * indent, token["data"]))
-
- elif type == "Doctype":
- if token["name"]:
- if token["publicId"]:
- output.append("""%s<!DOCTYPE %s "%s" "%s">""" %
- (" " * indent,
- token["name"],
- token["publicId"],
- token["systemId"] if token["systemId"] else ""))
- elif token["systemId"]:
- output.append("""%s<!DOCTYPE %s "" "%s">""" %
- (" " * indent,
- token["name"],
- token["systemId"]))
- else:
- output.append("%s<!DOCTYPE %s>" % (" " * indent,
- token["name"]))
- else:
- output.append("%s<!DOCTYPE >" % (" " * indent,))
-
- elif type == "Characters":
- output.append("%s\"%s\"" % (" " * indent, token["data"]))
-
- elif type == "SpaceCharacters":
- assert False, "concatenateCharacterTokens should have got rid of all Space tokens"
-
- else:
- raise ValueError("Unknown token type, %s" % type)
-
- return "\n".join(output)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/_base.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/_base.py
deleted file mode 100644
index 4e11cd02024..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/_base.py
+++ /dev/null
@@ -1,200 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type, string_types
-
-__all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN",
- "TreeWalker", "NonRecursiveTreeWalker"]
-
-from xml.dom import Node
-
-DOCUMENT = Node.DOCUMENT_NODE
-DOCTYPE = Node.DOCUMENT_TYPE_NODE
-TEXT = Node.TEXT_NODE
-ELEMENT = Node.ELEMENT_NODE
-COMMENT = Node.COMMENT_NODE
-ENTITY = Node.ENTITY_NODE
-UNKNOWN = "<#UNKNOWN#>"
-
-from ..constants import voidElements, spaceCharacters
-spaceCharacters = "".join(spaceCharacters)
-
-
-def to_text(s, blank_if_none=True):
- """Wrapper around six.text_type to convert None to empty string"""
- if s is None:
- if blank_if_none:
- return ""
- else:
- return None
- elif isinstance(s, text_type):
- return s
- else:
- return text_type(s)
-
-
-def is_text_or_none(string):
- """Wrapper around isinstance(string_types) or is None"""
- return string is None or isinstance(string, string_types)
-
-
-class TreeWalker(object):
- def __init__(self, tree):
- self.tree = tree
-
- def __iter__(self):
- raise NotImplementedError
-
- def error(self, msg):
- return {"type": "SerializeError", "data": msg}
-
- def emptyTag(self, namespace, name, attrs, hasChildren=False):
- assert namespace is None or isinstance(namespace, string_types), type(namespace)
- assert isinstance(name, string_types), type(name)
- assert all((namespace is None or isinstance(namespace, string_types)) and
- isinstance(name, string_types) and
- isinstance(value, string_types)
- for (namespace, name), value in attrs.items())
-
- yield {"type": "EmptyTag", "name": to_text(name, False),
- "namespace": to_text(namespace),
- "data": attrs}
- if hasChildren:
- yield self.error("Void element has children")
-
- def startTag(self, namespace, name, attrs):
- assert namespace is None or isinstance(namespace, string_types), type(namespace)
- assert isinstance(name, string_types), type(name)
- assert all((namespace is None or isinstance(namespace, string_types)) and
- isinstance(name, string_types) and
- isinstance(value, string_types)
- for (namespace, name), value in attrs.items())
-
- return {"type": "StartTag",
- "name": text_type(name),
- "namespace": to_text(namespace),
- "data": dict(((to_text(namespace, False), to_text(name)),
- to_text(value, False))
- for (namespace, name), value in attrs.items())}
-
- def endTag(self, namespace, name):
- assert namespace is None or isinstance(namespace, string_types), type(namespace)
- assert isinstance(name, string_types), type(namespace)
-
- return {"type": "EndTag",
- "name": to_text(name, False),
- "namespace": to_text(namespace),
- "data": {}}
-
- def text(self, data):
- assert isinstance(data, string_types), type(data)
-
- data = to_text(data)
- middle = data.lstrip(spaceCharacters)
- left = data[:len(data) - len(middle)]
- if left:
- yield {"type": "SpaceCharacters", "data": left}
- data = middle
- middle = data.rstrip(spaceCharacters)
- right = data[len(middle):]
- if middle:
- yield {"type": "Characters", "data": middle}
- if right:
- yield {"type": "SpaceCharacters", "data": right}
-
- def comment(self, data):
- assert isinstance(data, string_types), type(data)
-
- return {"type": "Comment", "data": text_type(data)}
-
- def doctype(self, name, publicId=None, systemId=None, correct=True):
- assert is_text_or_none(name), type(name)
- assert is_text_or_none(publicId), type(publicId)
- assert is_text_or_none(systemId), type(systemId)
-
- return {"type": "Doctype",
- "name": to_text(name),
- "publicId": to_text(publicId),
- "systemId": to_text(systemId),
- "correct": to_text(correct)}
-
- def entity(self, name):
- assert isinstance(name, string_types), type(name)
-
- return {"type": "Entity", "name": text_type(name)}
-
- def unknown(self, nodeType):
- return self.error("Unknown node type: " + nodeType)
-
-
-class NonRecursiveTreeWalker(TreeWalker):
- def getNodeDetails(self, node):
- raise NotImplementedError
-
- def getFirstChild(self, node):
- raise NotImplementedError
-
- def getNextSibling(self, node):
- raise NotImplementedError
-
- def getParentNode(self, node):
- raise NotImplementedError
-
- def __iter__(self):
- currentNode = self.tree
- while currentNode is not None:
- details = self.getNodeDetails(currentNode)
- type, details = details[0], details[1:]
- hasChildren = False
-
- if type == DOCTYPE:
- yield self.doctype(*details)
-
- elif type == TEXT:
- for token in self.text(*details):
- yield token
-
- elif type == ELEMENT:
- namespace, name, attributes, hasChildren = details
- if name in voidElements:
- for token in self.emptyTag(namespace, name, attributes,
- hasChildren):
- yield token
- hasChildren = False
- else:
- yield self.startTag(namespace, name, attributes)
-
- elif type == COMMENT:
- yield self.comment(details[0])
-
- elif type == ENTITY:
- yield self.entity(details[0])
-
- elif type == DOCUMENT:
- hasChildren = True
-
- else:
- yield self.unknown(details[0])
-
- if hasChildren:
- firstChild = self.getFirstChild(currentNode)
- else:
- firstChild = None
-
- if firstChild is not None:
- currentNode = firstChild
- else:
- while currentNode is not None:
- details = self.getNodeDetails(currentNode)
- type, details = details[0], details[1:]
- if type == ELEMENT:
- namespace, name, attributes, hasChildren = details
- if name not in voidElements:
- yield self.endTag(namespace, name)
- if self.tree is currentNode:
- currentNode = None
- break
- nextSibling = self.getNextSibling(currentNode)
- if nextSibling is not None:
- currentNode = nextSibling
- break
- else:
- currentNode = self.getParentNode(currentNode)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/dom.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/dom.py
deleted file mode 100644
index ac4dcf31bf6..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/dom.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from xml.dom import Node
-
-from . import _base
-
-
-class TreeWalker(_base.NonRecursiveTreeWalker):
- def getNodeDetails(self, node):
- if node.nodeType == Node.DOCUMENT_TYPE_NODE:
- return _base.DOCTYPE, node.name, node.publicId, node.systemId
-
- elif node.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE):
- return _base.TEXT, node.nodeValue
-
- elif node.nodeType == Node.ELEMENT_NODE:
- attrs = {}
- for attr in list(node.attributes.keys()):
- attr = node.getAttributeNode(attr)
- if attr.namespaceURI:
- attrs[(attr.namespaceURI, attr.localName)] = attr.value
- else:
- attrs[(None, attr.name)] = attr.value
- return (_base.ELEMENT, node.namespaceURI, node.nodeName,
- attrs, node.hasChildNodes())
-
- elif node.nodeType == Node.COMMENT_NODE:
- return _base.COMMENT, node.nodeValue
-
- elif node.nodeType in (Node.DOCUMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE):
- return (_base.DOCUMENT,)
-
- else:
- return _base.UNKNOWN, node.nodeType
-
- def getFirstChild(self, node):
- return node.firstChild
-
- def getNextSibling(self, node):
- return node.nextSibling
-
- def getParentNode(self, node):
- return node.parentNode
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/etree.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/etree.py
deleted file mode 100644
index 69840c21e48..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/etree.py
+++ /dev/null
@@ -1,136 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-try:
- from collections import OrderedDict
-except ImportError:
- try:
- from ordereddict import OrderedDict
- except ImportError:
- OrderedDict = dict
-
-import re
-
-from six import string_types
-
-from . import _base
-from ..utils import moduleFactoryFactory
-
-tag_regexp = re.compile("{([^}]*)}(.*)")
-
-
-def getETreeBuilder(ElementTreeImplementation):
- ElementTree = ElementTreeImplementation
- ElementTreeCommentType = ElementTree.Comment("asd").tag
-
- class TreeWalker(_base.NonRecursiveTreeWalker):
- """Given the particular ElementTree representation, this implementation,
- to avoid using recursion, returns "nodes" as tuples with the following
- content:
-
- 1. The current element
-
- 2. The index of the element relative to its parent
-
- 3. A stack of ancestor elements
-
- 4. A flag "text", "tail" or None to indicate if the current node is a
- text node; either the text or tail of the current element (1)
- """
- def getNodeDetails(self, node):
- if isinstance(node, tuple): # It might be the root Element
- elt, key, parents, flag = node
- if flag in ("text", "tail"):
- return _base.TEXT, getattr(elt, flag)
- else:
- node = elt
-
- if not(hasattr(node, "tag")):
- node = node.getroot()
-
- if node.tag in ("DOCUMENT_ROOT", "DOCUMENT_FRAGMENT"):
- return (_base.DOCUMENT,)
-
- elif node.tag == "<!DOCTYPE>":
- return (_base.DOCTYPE, node.text,
- node.get("publicId"), node.get("systemId"))
-
- elif node.tag == ElementTreeCommentType:
- return _base.COMMENT, node.text
-
- else:
- assert isinstance(node.tag, string_types), type(node.tag)
- # This is assumed to be an ordinary element
- match = tag_regexp.match(node.tag)
- if match:
- namespace, tag = match.groups()
- else:
- namespace = None
- tag = node.tag
- attrs = OrderedDict()
- for name, value in list(node.attrib.items()):
- match = tag_regexp.match(name)
- if match:
- attrs[(match.group(1), match.group(2))] = value
- else:
- attrs[(None, name)] = value
- return (_base.ELEMENT, namespace, tag,
- attrs, len(node) or node.text)
-
- def getFirstChild(self, node):
- if isinstance(node, tuple):
- element, key, parents, flag = node
- else:
- element, key, parents, flag = node, None, [], None
-
- if flag in ("text", "tail"):
- return None
- else:
- if element.text:
- return element, key, parents, "text"
- elif len(element):
- parents.append(element)
- return element[0], 0, parents, None
- else:
- return None
-
- def getNextSibling(self, node):
- if isinstance(node, tuple):
- element, key, parents, flag = node
- else:
- return None
-
- if flag == "text":
- if len(element):
- parents.append(element)
- return element[0], 0, parents, None
- else:
- return None
- else:
- if element.tail and flag != "tail":
- return element, key, parents, "tail"
- elif key < len(parents[-1]) - 1:
- return parents[-1][key + 1], key + 1, parents, None
- else:
- return None
-
- def getParentNode(self, node):
- if isinstance(node, tuple):
- element, key, parents, flag = node
- else:
- return None
-
- if flag == "text":
- if not parents:
- return element
- else:
- return element, key, parents, None
- else:
- parent = parents.pop()
- if not parents:
- return parent
- else:
- return parent, list(parents[-1]).index(parent), parents, None
-
- return locals()
-
-getETreeModule = moduleFactoryFactory(getETreeBuilder)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/genshistream.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/genshistream.py
deleted file mode 100644
index f559c45d044..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/genshistream.py
+++ /dev/null
@@ -1,69 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from genshi.core import QName
-from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
-from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT
-
-from . import _base
-
-from ..constants import voidElements, namespaces
-
-
-class TreeWalker(_base.TreeWalker):
- def __iter__(self):
- # Buffer the events so we can pass in the following one
- previous = None
- for event in self.tree:
- if previous is not None:
- for token in self.tokens(previous, event):
- yield token
- previous = event
-
- # Don't forget the final event!
- if previous is not None:
- for token in self.tokens(previous, None):
- yield token
-
- def tokens(self, event, next):
- kind, data, pos = event
- if kind == START:
- tag, attribs = data
- name = tag.localname
- namespace = tag.namespace
- converted_attribs = {}
- for k, v in attribs:
- if isinstance(k, QName):
- converted_attribs[(k.namespace, k.localname)] = v
- else:
- converted_attribs[(None, k)] = v
-
- if namespace == namespaces["html"] and name in voidElements:
- for token in self.emptyTag(namespace, name, converted_attribs,
- not next or next[0] != END
- or next[1] != tag):
- yield token
- else:
- yield self.startTag(namespace, name, converted_attribs)
-
- elif kind == END:
- name = data.localname
- namespace = data.namespace
- if name not in voidElements:
- yield self.endTag(namespace, name)
-
- elif kind == COMMENT:
- yield self.comment(data)
-
- elif kind == TEXT:
- for token in self.text(data):
- yield token
-
- elif kind == DOCTYPE:
- yield self.doctype(*data)
-
- elif kind in (XML_NAMESPACE, DOCTYPE, START_NS, END_NS,
- START_CDATA, END_CDATA, PI):
- pass
-
- else:
- yield self.unknown(kind)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/lxmletree.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/lxmletree.py
deleted file mode 100644
index 90e116d3866..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/lxmletree.py
+++ /dev/null
@@ -1,201 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type
-
-from lxml import etree
-from ..treebuilders.etree import tag_regexp
-
-from . import _base
-
-from .. import ihatexml
-
-
-def ensure_str(s):
- if s is None:
- return None
- elif isinstance(s, text_type):
- return s
- else:
- return s.decode("utf-8", "strict")
-
-
-class Root(object):
- def __init__(self, et):
- self.elementtree = et
- self.children = []
- if et.docinfo.internalDTD:
- self.children.append(Doctype(self,
- ensure_str(et.docinfo.root_name),
- ensure_str(et.docinfo.public_id),
- ensure_str(et.docinfo.system_url)))
- root = et.getroot()
- node = root
-
- while node.getprevious() is not None:
- node = node.getprevious()
- while node is not None:
- self.children.append(node)
- node = node.getnext()
-
- self.text = None
- self.tail = None
-
- def __getitem__(self, key):
- return self.children[key]
-
- def getnext(self):
- return None
-
- def __len__(self):
- return 1
-
-
-class Doctype(object):
- def __init__(self, root_node, name, public_id, system_id):
- self.root_node = root_node
- self.name = name
- self.public_id = public_id
- self.system_id = system_id
-
- self.text = None
- self.tail = None
-
- def getnext(self):
- return self.root_node.children[1]
-
-
-class FragmentRoot(Root):
- def __init__(self, children):
- self.children = [FragmentWrapper(self, child) for child in children]
- self.text = self.tail = None
-
- def getnext(self):
- return None
-
-
-class FragmentWrapper(object):
- def __init__(self, fragment_root, obj):
- self.root_node = fragment_root
- self.obj = obj
- if hasattr(self.obj, 'text'):
- self.text = ensure_str(self.obj.text)
- else:
- self.text = None
- if hasattr(self.obj, 'tail'):
- self.tail = ensure_str(self.obj.tail)
- else:
- self.tail = None
-
- def __getattr__(self, name):
- return getattr(self.obj, name)
-
- def getnext(self):
- siblings = self.root_node.children
- idx = siblings.index(self)
- if idx < len(siblings) - 1:
- return siblings[idx + 1]
- else:
- return None
-
- def __getitem__(self, key):
- return self.obj[key]
-
- def __bool__(self):
- return bool(self.obj)
-
- def getparent(self):
- return None
-
- def __str__(self):
- return str(self.obj)
-
- def __unicode__(self):
- return str(self.obj)
-
- def __len__(self):
- return len(self.obj)
-
-
-class TreeWalker(_base.NonRecursiveTreeWalker):
- def __init__(self, tree):
- if hasattr(tree, "getroot"):
- tree = Root(tree)
- elif isinstance(tree, list):
- tree = FragmentRoot(tree)
- _base.NonRecursiveTreeWalker.__init__(self, tree)
- self.filter = ihatexml.InfosetFilter()
-
- def getNodeDetails(self, node):
- if isinstance(node, tuple): # Text node
- node, key = node
- assert key in ("text", "tail"), "Text nodes are text or tail, found %s" % key
- return _base.TEXT, ensure_str(getattr(node, key))
-
- elif isinstance(node, Root):
- return (_base.DOCUMENT,)
-
- elif isinstance(node, Doctype):
- return _base.DOCTYPE, node.name, node.public_id, node.system_id
-
- elif isinstance(node, FragmentWrapper) and not hasattr(node, "tag"):
- return _base.TEXT, node.obj
-
- elif node.tag == etree.Comment:
- return _base.COMMENT, ensure_str(node.text)
-
- elif node.tag == etree.Entity:
- return _base.ENTITY, ensure_str(node.text)[1:-1] # strip &;
-
- else:
- # This is assumed to be an ordinary element
- match = tag_regexp.match(ensure_str(node.tag))
- if match:
- namespace, tag = match.groups()
- else:
- namespace = None
- tag = ensure_str(node.tag)
- attrs = {}
- for name, value in list(node.attrib.items()):
- name = ensure_str(name)
- value = ensure_str(value)
- match = tag_regexp.match(name)
- if match:
- attrs[(match.group(1), match.group(2))] = value
- else:
- attrs[(None, name)] = value
- return (_base.ELEMENT, namespace, self.filter.fromXmlName(tag),
- attrs, len(node) > 0 or node.text)
-
- def getFirstChild(self, node):
- assert not isinstance(node, tuple), "Text nodes have no children"
-
- assert len(node) or node.text, "Node has no children"
- if node.text:
- return (node, "text")
- else:
- return node[0]
-
- def getNextSibling(self, node):
- if isinstance(node, tuple): # Text node
- node, key = node
- assert key in ("text", "tail"), "Text nodes are text or tail, found %s" % key
- if key == "text":
- # XXX: we cannot use a "bool(node) and node[0] or None" construct here
- # because node[0] might evaluate to False if it has no child element
- if len(node):
- return node[0]
- else:
- return None
- else: # tail
- return node.getnext()
-
- return (node, "tail") if node.tail else node.getnext()
-
- def getParentNode(self, node):
- if isinstance(node, tuple): # Text node
- node, key = node
- assert key in ("text", "tail"), "Text nodes are text or tail, found %s" % key
- if key == "text":
- return node
- # else: fallback to "normal" processing
-
- return node.getparent()
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/pulldom.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/pulldom.py
deleted file mode 100644
index 0b0f515fec7..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/treewalkers/pulldom.py
+++ /dev/null
@@ -1,63 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
- COMMENT, IGNORABLE_WHITESPACE, CHARACTERS
-
-from . import _base
-
-from ..constants import voidElements
-
-
-class TreeWalker(_base.TreeWalker):
- def __iter__(self):
- ignore_until = None
- previous = None
- for event in self.tree:
- if previous is not None and \
- (ignore_until is None or previous[1] is ignore_until):
- if previous[1] is ignore_until:
- ignore_until = None
- for token in self.tokens(previous, event):
- yield token
- if token["type"] == "EmptyTag":
- ignore_until = previous[1]
- previous = event
- if ignore_until is None or previous[1] is ignore_until:
- for token in self.tokens(previous, None):
- yield token
- elif ignore_until is not None:
- raise ValueError("Illformed DOM event stream: void element without END_ELEMENT")
-
- def tokens(self, event, next):
- type, node = event
- if type == START_ELEMENT:
- name = node.nodeName
- namespace = node.namespaceURI
- attrs = {}
- for attr in list(node.attributes.keys()):
- attr = node.getAttributeNode(attr)
- attrs[(attr.namespaceURI, attr.localName)] = attr.value
- if name in voidElements:
- for token in self.emptyTag(namespace,
- name,
- attrs,
- not next or next[1] is not node):
- yield token
- else:
- yield self.startTag(namespace, name, attrs)
-
- elif type == END_ELEMENT:
- name = node.nodeName
- namespace = node.namespaceURI
- if name not in voidElements:
- yield self.endTag(namespace, name)
-
- elif type == COMMENT:
- yield self.comment(node.nodeValue)
-
- elif type in (IGNORABLE_WHITESPACE, CHARACTERS):
- for token in self.text(node.nodeValue):
- yield token
-
- else:
- yield self.unknown(type)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/__init__.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/__init__.py
deleted file mode 100644
index a8cca8a9acf..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/__init__.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from .py import Trie as PyTrie
-
-Trie = PyTrie
-
-try:
- from .datrie import Trie as DATrie
-except ImportError:
- pass
-else:
- Trie = DATrie
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/_base.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/_base.py
deleted file mode 100644
index 724486b16eb..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/_base.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from collections import Mapping
-
-
-class Trie(Mapping):
- """Abstract base class for tries"""
-
- def keys(self, prefix=None):
- keys = super().keys()
-
- if prefix is None:
- return set(keys)
-
- # Python 2.6: no set comprehensions
- return set([x for x in keys if x.startswith(prefix)])
-
- def has_keys_with_prefix(self, prefix):
- for key in self.keys():
- if key.startswith(prefix):
- return True
-
- return False
-
- def longest_prefix(self, prefix):
- if prefix in self:
- return prefix
-
- for i in range(1, len(prefix) + 1):
- if prefix[:-i] in self:
- return prefix[:-i]
-
- raise KeyError(prefix)
-
- def longest_prefix_item(self, prefix):
- lprefix = self.longest_prefix(prefix)
- return (lprefix, self[lprefix])
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/datrie.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/datrie.py
deleted file mode 100644
index 51f3d046a74..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/datrie.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from datrie import Trie as DATrie
-from six import text_type
-
-from ._base import Trie as ABCTrie
-
-
-class Trie(ABCTrie):
- def __init__(self, data):
- chars = set()
- for key in data.keys():
- if not isinstance(key, text_type):
- raise TypeError("All keys must be strings")
- for char in key:
- chars.add(char)
-
- self._data = DATrie("".join(chars))
- for key, value in data.items():
- self._data[key] = value
-
- def __contains__(self, key):
- return key in self._data
-
- def __len__(self):
- return len(self._data)
-
- def __iter__(self):
- raise NotImplementedError()
-
- def __getitem__(self, key):
- return self._data[key]
-
- def keys(self, prefix=None):
- return self._data.keys(prefix)
-
- def has_keys_with_prefix(self, prefix):
- return self._data.has_keys_with_prefix(prefix)
-
- def longest_prefix(self, prefix):
- return self._data.longest_prefix(prefix)
-
- def longest_prefix_item(self, prefix):
- return self._data.longest_prefix_item(prefix)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/py.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/py.py
deleted file mode 100644
index c2ba3da7576..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/trie/py.py
+++ /dev/null
@@ -1,67 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-from six import text_type
-
-from bisect import bisect_left
-
-from ._base import Trie as ABCTrie
-
-
-class Trie(ABCTrie):
- def __init__(self, data):
- if not all(isinstance(x, text_type) for x in data.keys()):
- raise TypeError("All keys must be strings")
-
- self._data = data
- self._keys = sorted(data.keys())
- self._cachestr = ""
- self._cachepoints = (0, len(data))
-
- def __contains__(self, key):
- return key in self._data
-
- def __len__(self):
- return len(self._data)
-
- def __iter__(self):
- return iter(self._data)
-
- def __getitem__(self, key):
- return self._data[key]
-
- def keys(self, prefix=None):
- if prefix is None or prefix == "" or not self._keys:
- return set(self._keys)
-
- if prefix.startswith(self._cachestr):
- lo, hi = self._cachepoints
- start = i = bisect_left(self._keys, prefix, lo, hi)
- else:
- start = i = bisect_left(self._keys, prefix)
-
- keys = set()
- if start == len(self._keys):
- return keys
-
- while self._keys[i].startswith(prefix):
- keys.add(self._keys[i])
- i += 1
-
- self._cachestr = prefix
- self._cachepoints = (start, i)
-
- return keys
-
- def has_keys_with_prefix(self, prefix):
- if prefix in self._data:
- return True
-
- if prefix.startswith(self._cachestr):
- lo, hi = self._cachepoints
- i = bisect_left(self._keys, prefix, lo, hi)
- else:
- i = bisect_left(self._keys, prefix)
-
- if i == len(self._keys):
- return False
-
- return self._keys[i].startswith(prefix)
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/utils.py b/chromium/third_party/catapult/third_party/html5lib-python/html5lib/utils.py
deleted file mode 100644
index fdc18febb53..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/html5lib/utils.py
+++ /dev/null
@@ -1,103 +0,0 @@
-from __future__ import absolute_import, division, unicode_literals
-
-from types import ModuleType
-
-from six import text_type
-
-try:
- import xml.etree.cElementTree as default_etree
-except ImportError:
- import xml.etree.ElementTree as default_etree
-
-
-__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair",
- "surrogatePairToCodepoint", "moduleFactoryFactory",
- "supports_lone_surrogates"]
-
-
-# Platforms not supporting lone surrogates (\uD800-\uDFFF) should be
-# caught by the below test. In general this would be any platform
-# using UTF-16 as its encoding of unicode strings, such as
-# Jython. This is because UTF-16 itself is based on the use of such
-# surrogates, and there is no mechanism to further escape such
-# escapes.
-try:
- _x = eval('"\\uD800"')
- if not isinstance(_x, text_type):
- # We need this with u"" because of http://bugs.jython.org/issue2039
- _x = eval('u"\\uD800"')
- assert isinstance(_x, text_type)
-except:
- supports_lone_surrogates = False
-else:
- supports_lone_surrogates = True
-
-
-class MethodDispatcher(dict):
- """Dict with 2 special properties:
-
- On initiation, keys that are lists, sets or tuples are converted to
- multiple keys so accessing any one of the items in the original
- list-like object returns the matching value
-
- md = MethodDispatcher({("foo", "bar"):"baz"})
- md["foo"] == "baz"
-
- A default value which can be set through the default attribute.
- """
-
- def __init__(self, items=()):
- # Using _dictEntries instead of directly assigning to self is about
- # twice as fast. Please do careful performance testing before changing
- # anything here.
- _dictEntries = []
- for name, value in items:
- if type(name) in (list, tuple, frozenset, set):
- for item in name:
- _dictEntries.append((item, value))
- else:
- _dictEntries.append((name, value))
- dict.__init__(self, _dictEntries)
- self.default = None
-
- def __getitem__(self, key):
- return dict.get(self, key, self.default)
-
-
-# Some utility functions to dal with weirdness around UCS2 vs UCS4
-# python builds
-
-def isSurrogatePair(data):
- return (len(data) == 2 and
- ord(data[0]) >= 0xD800 and ord(data[0]) <= 0xDBFF and
- ord(data[1]) >= 0xDC00 and ord(data[1]) <= 0xDFFF)
-
-
-def surrogatePairToCodepoint(data):
- char_val = (0x10000 + (ord(data[0]) - 0xD800) * 0x400 +
- (ord(data[1]) - 0xDC00))
- return char_val
-
-# Module Factory Factory (no, this isn't Java, I know)
-# Here to stop this being duplicated all over the place.
-
-
-def moduleFactoryFactory(factory):
- moduleCache = {}
-
- def moduleFactory(baseModule, *args, **kwargs):
- if isinstance(ModuleType.__name__, type("")):
- name = "_%s_factory" % baseModule.__name__
- else:
- name = b"_%s_factory" % baseModule.__name__
-
- if name in moduleCache:
- return moduleCache[name]
- else:
- mod = ModuleType(name)
- objs = factory(baseModule, *args, **kwargs)
- mod.__dict__.update(objs)
- moduleCache[name] = mod
- return mod
-
- return moduleFactory
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/parse.py b/chromium/third_party/catapult/third_party/html5lib-python/parse.py
deleted file mode 100755
index b9bea288ea9..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/parse.py
+++ /dev/null
@@ -1,241 +0,0 @@
-#!/usr/bin/env python
-"""usage: %prog [options] filename
-
-Parse a document to a tree, with optional profiling
-"""
-
-import sys
-import os
-import traceback
-from optparse import OptionParser
-
-from html5lib import html5parser, sanitizer
-from html5lib.tokenizer import HTMLTokenizer
-from html5lib import treebuilders, serializer, treewalkers
-from html5lib import constants
-from html5lib import utils
-
-def parse():
- optParser = getOptParser()
- opts,args = optParser.parse_args()
- encoding = "utf8"
-
- try:
- f = args[-1]
- # Try opening from the internet
- if f.startswith('http://'):
- try:
- import urllib.request, urllib.parse, urllib.error, cgi
- f = urllib.request.urlopen(f)
- contentType = f.headers.get('content-type')
- if contentType:
- (mediaType, params) = cgi.parse_header(contentType)
- encoding = params.get('charset')
- except:
- pass
- elif f == '-':
- f = sys.stdin
- if sys.version_info[0] >= 3:
- encoding = None
- else:
- try:
- # Try opening from file system
- f = open(f, "rb")
- except IOError as e:
- sys.stderr.write("Unable to open file: %s\n" % e)
- sys.exit(1)
- except IndexError:
- sys.stderr.write("No filename provided. Use -h for help\n")
- sys.exit(1)
-
- treebuilder = treebuilders.getTreeBuilder(opts.treebuilder)
-
- if opts.sanitize:
- tokenizer = sanitizer.HTMLSanitizer
- else:
- tokenizer = HTMLTokenizer
-
- p = html5parser.HTMLParser(tree=treebuilder, tokenizer=tokenizer, debug=opts.log)
-
- if opts.fragment:
- parseMethod = p.parseFragment
- else:
- parseMethod = p.parse
-
- if opts.profile:
- import cProfile
- import pstats
- cProfile.runctx("run(parseMethod, f, encoding)", None,
- {"run": run,
- "parseMethod": parseMethod,
- "f": f,
- "encoding": encoding},
- "stats.prof")
- # XXX - We should use a temp file here
- stats = pstats.Stats('stats.prof')
- stats.strip_dirs()
- stats.sort_stats('time')
- stats.print_stats()
- elif opts.time:
- import time
- t0 = time.time()
- document = run(parseMethod, f, encoding)
- t1 = time.time()
- if document:
- printOutput(p, document, opts)
- t2 = time.time()
- sys.stderr.write("\n\nRun took: %fs (plus %fs to print the output)"%(t1-t0, t2-t1))
- else:
- sys.stderr.write("\n\nRun took: %fs"%(t1-t0))
- else:
- document = run(parseMethod, f, encoding)
- if document:
- printOutput(p, document, opts)
-
-def run(parseMethod, f, encoding):
- try:
- document = parseMethod(f, encoding=encoding)
- except:
- document = None
- traceback.print_exc()
- return document
-
-def printOutput(parser, document, opts):
- if opts.encoding:
- print("Encoding:", parser.tokenizer.stream.charEncoding)
-
- for item in parser.log:
- print(item)
-
- if document is not None:
- if opts.xml:
- tb = opts.treebuilder.lower()
- if tb == "dom":
- document.writexml(sys.stdout, encoding="utf-8")
- elif tb == "lxml":
- import lxml.etree
- sys.stdout.write(lxml.etree.tostring(document))
- elif tb == "etree":
- sys.stdout.write(utils.default_etree.tostring(document))
- elif opts.tree:
- if not hasattr(document,'__getitem__'):
- document = [document]
- for fragment in document:
- print(parser.tree.testSerializer(fragment))
- elif opts.hilite:
- sys.stdout.write(document.hilite("utf-8"))
- elif opts.html:
- kwargs = {}
- for opt in serializer.HTMLSerializer.options:
- try:
- kwargs[opt] = getattr(opts,opt)
- except:
- pass
- if not kwargs['quote_char']:
- del kwargs['quote_char']
-
- tokens = treewalkers.getTreeWalker(opts.treebuilder)(document)
- if sys.version_info[0] >= 3:
- encoding = None
- else:
- encoding = "utf-8"
- for text in serializer.HTMLSerializer(**kwargs).serialize(tokens, encoding=encoding):
- sys.stdout.write(text)
- if not text.endswith('\n'): sys.stdout.write('\n')
- if opts.error:
- errList=[]
- for pos, errorcode, datavars in parser.errors:
- errList.append("Line %i Col %i"%pos + " " + constants.E.get(errorcode, 'Unknown error "%s"' % errorcode) % datavars)
- sys.stdout.write("\nParse errors:\n" + "\n".join(errList)+"\n")
-
-def getOptParser():
- parser = OptionParser(usage=__doc__)
-
- parser.add_option("-p", "--profile", action="store_true", default=False,
- dest="profile", help="Use the hotshot profiler to "
- "produce a detailed log of the run")
-
- parser.add_option("-t", "--time",
- action="store_true", default=False, dest="time",
- help="Time the run using time.time (may not be accurate on all platforms, especially for short runs)")
-
- parser.add_option("-b", "--treebuilder", action="store", type="string",
- dest="treebuilder", default="etree")
-
- parser.add_option("-e", "--error", action="store_true", default=False,
- dest="error", help="Print a list of parse errors")
-
- parser.add_option("-f", "--fragment", action="store_true", default=False,
- dest="fragment", help="Parse as a fragment")
-
- parser.add_option("", "--tree", action="store_true", default=False,
- dest="tree", help="Output as debug tree")
-
- parser.add_option("-x", "--xml", action="store_true", default=False,
- dest="xml", help="Output as xml")
-
- parser.add_option("", "--no-html", action="store_false", default=True,
- dest="html", help="Don't output html")
-
- parser.add_option("", "--hilite", action="store_true", default=False,
- dest="hilite", help="Output as formatted highlighted code.")
-
- parser.add_option("-c", "--encoding", action="store_true", default=False,
- dest="encoding", help="Print character encoding used")
-
- parser.add_option("", "--inject-meta-charset", action="store_true",
- default=False, dest="inject_meta_charset",
- help="inject <meta charset>")
-
- parser.add_option("", "--strip-whitespace", action="store_true",
- default=False, dest="strip_whitespace",
- help="strip whitespace")
-
- parser.add_option("", "--omit-optional-tags", action="store_true",
- default=False, dest="omit_optional_tags",
- help="omit optional tags")
-
- parser.add_option("", "--quote-attr-values", action="store_true",
- default=False, dest="quote_attr_values",
- help="quote attribute values")
-
- parser.add_option("", "--use-best-quote-char", action="store_true",
- default=False, dest="use_best_quote_char",
- help="use best quote character")
-
- parser.add_option("", "--quote-char", action="store",
- default=None, dest="quote_char",
- help="quote character")
-
- parser.add_option("", "--no-minimize-boolean-attributes",
- action="store_false", default=True,
- dest="minimize_boolean_attributes",
- help="minimize boolean attributes")
-
- parser.add_option("", "--use-trailing-solidus", action="store_true",
- default=False, dest="use_trailing_solidus",
- help="use trailing solidus")
-
- parser.add_option("", "--space-before-trailing-solidus",
- action="store_true", default=False,
- dest="space_before_trailing_solidus",
- help="add space before trailing solidus")
-
- parser.add_option("", "--escape-lt-in-attrs", action="store_true",
- default=False, dest="escape_lt_in_attrs",
- help="escape less than signs in attribute values")
-
- parser.add_option("", "--escape-rcdata", action="store_true",
- default=False, dest="escape_rcdata",
- help="escape rcdata element values")
-
- parser.add_option("", "--sanitize", action="store_true", default=False,
- dest="sanitize", help="sanitize")
-
- parser.add_option("-l", "--log", action="store_true", default=False,
- dest="log", help="log state transitions")
-
- return parser
-
-if __name__ == "__main__":
- parse()
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/requirements-install.sh b/chromium/third_party/catapult/third_party/html5lib-python/requirements-install.sh
deleted file mode 100755
index 5f8ba50645f..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/requirements-install.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash -e
-
-if [[ $USE_OPTIONAL != "true" && $USE_OPTIONAL != "false" ]]; then
- echo "fatal: \$USE_OPTIONAL not set to true or false. Exiting."
- exit 1
-fi
-
-pip install -r requirements-test.txt
-
-if [[ $USE_OPTIONAL == "true" && $TRAVIS_PYTHON_VERSION != "pypy" ]]; then
- if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then
- pip install --allow-external Genshi --allow-insecure Genshi -r requirements-optional-2.6.txt
- else
- pip install --allow-external Genshi --allow-insecure Genshi -r requirements-optional-cpython.txt
- fi
-fi
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-2.6.txt b/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-2.6.txt
deleted file mode 100644
index 37557ac403d..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-2.6.txt
+++ /dev/null
@@ -1,5 +0,0 @@
--r requirements-optional-cpython.txt
-
-# Can be used to force attributes to be serialized in alphabetical
-# order.
-ordereddict
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-cpython.txt b/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-cpython.txt
deleted file mode 100644
index 35ed3529c2c..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional-cpython.txt
+++ /dev/null
@@ -1,5 +0,0 @@
--r requirements-optional.txt
-
-# lxml is supported with its own treebuilder ("lxml") and otherwise
-# uses the standard ElementTree support
-lxml
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional.txt b/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional.txt
deleted file mode 100644
index c6355270127..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/requirements-optional.txt
+++ /dev/null
@@ -1,13 +0,0 @@
--r requirements.txt
-
-# We support a Genshi treewalker that can be used to serialize Genshi
-# streams.
-genshi
-
-# DATrie can be used in place of our Python trie implementation for
-# slightly better parsing performance.
-datrie
-
-# charade can be used as a fallback in case we are unable to determine
-# the encoding of a document.
-charade
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/requirements-test.txt b/chromium/third_party/catapult/third_party/html5lib-python/requirements-test.txt
deleted file mode 100644
index d5f8088c1c1..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/requirements-test.txt
+++ /dev/null
@@ -1,5 +0,0 @@
--r requirements.txt
-
-flake8
-nose
-ordereddict # Python 2.6
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/requirements.txt b/chromium/third_party/catapult/third_party/html5lib-python/requirements.txt
deleted file mode 100644
index ffe2fce4989..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/requirements.txt
+++ /dev/null
@@ -1 +0,0 @@
-six
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/setup.py b/chromium/third_party/catapult/third_party/html5lib-python/setup.py
deleted file mode 100644
index 34474724ff9..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/setup.py
+++ /dev/null
@@ -1,58 +0,0 @@
-from distutils.core import setup
-import ast
-import os
-import codecs
-
-classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: MIT License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.2',
- 'Programming Language :: Python :: 3.3',
- 'Programming Language :: Python :: 3.4',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- 'Topic :: Text Processing :: Markup :: HTML'
- ]
-
-packages = ['html5lib'] + ['html5lib.'+name
- for name in os.listdir(os.path.join('html5lib'))
- if os.path.isdir(os.path.join('html5lib', name)) and
- not name.startswith('.') and name != 'tests']
-
-current_dir = os.path.dirname(__file__)
-with codecs.open(os.path.join(current_dir, 'README.rst'), 'r', 'utf8') as readme_file:
- with codecs.open(os.path.join(current_dir, 'CHANGES.rst'), 'r', 'utf8') as changes_file:
- long_description = readme_file.read() + '\n' + changes_file.read()
-
-version = None
-with open(os.path.join("html5lib", "__init__.py"), "rb") as init_file:
- t = ast.parse(init_file.read(), filename="__init__.py", mode="exec")
- assert isinstance(t, ast.Module)
- assignments = filter(lambda x: isinstance(x, ast.Assign), t.body)
- for a in assignments:
- if (len(a.targets) == 1 and
- isinstance(a.targets[0], ast.Name) and
- a.targets[0].id == "__version__" and
- isinstance(a.value, ast.Str)):
- version = a.value.s
-
-setup(name='html5lib',
- version=version,
- url='https://github.com/html5lib/html5lib-python',
- license="MIT License",
- description='HTML parser based on the WHATWG HTML specification',
- long_description=long_description,
- classifiers=classifiers,
- maintainer='James Graham',
- maintainer_email='james@hoppipolla.co.uk',
- packages=packages,
- install_requires=[
- 'six',
- ],
- )
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/tox.ini b/chromium/third_party/catapult/third_party/html5lib-python/tox.ini
deleted file mode 100644
index 479f9e1f732..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/tox.ini
+++ /dev/null
@@ -1,30 +0,0 @@
-[tox]
-envlist = py26,py27,py32,py33,py34,pypy
-
-[testenv]
-deps =
- -r{toxinidir}/requirements-optional-cpython.txt
- flake8
- nose
-commands =
- {envbindir}/nosetests -q
- {toxinidir}/flake8-run.sh
-install_command =
- pip install {opts} {packages}
-
-[testenv:pypy]
-# lxml doesn't work and datrie doesn't make sense
-# (it's slower than the pure-python version)
-deps =
- charade
- flake8
- Genshi
- nose
- six
-
-[testenv:py26]
-basepython = python2.6
-deps =
- -r{toxinidir}/requirements-optional-2.6.txt
- flake8
- nose
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/utils/entities.py b/chromium/third_party/catapult/third_party/html5lib-python/utils/entities.py
deleted file mode 100644
index 116a27cbc9b..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/utils/entities.py
+++ /dev/null
@@ -1,88 +0,0 @@
-import json
-
-import html5lib
-
-def parse(path="html5ents.xml"):
- return html5lib.parse(open(path), treebuilder="lxml")
-
-def entity_table(tree):
- return dict((entity_name("".join(tr[0].xpath(".//text()"))),
- entity_characters(tr[1].text))
- for tr in tree.xpath("//h:tbody/h:tr",
- namespaces={"h":"http://www.w3.org/1999/xhtml"}))
-
-def entity_name(inp):
- return inp.strip()
-
-def entity_characters(inp):
- return "".join(codepoint_to_character(item)
- for item in inp.split()
- if item)
-
-def codepoint_to_character(inp):
- return ("\U000"+inp[2:]).decode("unicode-escape")
-
-def make_tests_json(entities):
- test_list = make_test_list(entities)
- tests_json = {"tests":
- [make_test(*item) for item in test_list]
- }
- return tests_json
-
-def make_test(name, characters, good):
- return {
- "description":test_description(name, good),
- "input":"&%s"%name,
- "output":test_expected(name, characters, good)
- }
-
-def test_description(name, good):
- with_semicolon = name.endswith(";")
- semicolon_text = {True:"with a semi-colon",
- False:"without a semi-colon"}[with_semicolon]
- if good:
- text = "Named entity: %s %s"%(name, semicolon_text)
- else:
- text = "Bad named entity: %s %s"%(name, semicolon_text)
- return text
-
-def test_expected(name, characters, good):
- rv = []
- if not good or not name.endswith(";"):
- rv.append("ParseError")
- rv.append(["Character", characters])
- return rv
-
-def make_test_list(entities):
- tests = []
- for entity_name, characters in entities.items():
- if entity_name.endswith(";") and not subentity_exists(entity_name, entities):
- tests.append((entity_name[:-1], "&" + entity_name[:-1], False))
- tests.append((entity_name, characters, True))
- return sorted(tests)
-
-def subentity_exists(entity_name, entities):
- for i in range(1, len(entity_name)):
- if entity_name[:-i] in entities:
- return True
- return False
-
-def make_entities_code(entities):
- entities_text = "\n".join(" \"%s\": u\"%s\","%(
- name, entities[name].encode(
- "unicode-escape").replace("\"", "\\\""))
- for name in sorted(entities.keys()))
- return """entities = {
-%s
-}"""%entities_text
-
-def main():
- entities = entity_table(parse())
- tests_json = make_tests_json(entities)
- json.dump(tests_json, open("namedEntities.test", "w"), indent=4)
- code = make_entities_code(entities)
- open("entities_constants.py", "w").write(code)
-
-if __name__ == "__main__":
- main()
-
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/utils/iana_parse.py b/chromium/third_party/catapult/third_party/html5lib-python/utils/iana_parse.py
deleted file mode 100644
index 6dde94c2829..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/utils/iana_parse.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-import sys
-import urllib.request, urllib.error, urllib.parse
-import codecs
-
-def main():
- encodings = []
- f = urllib.request.urlopen(sys.argv[1])
- for line in f:
- if line.startswith("Name: ") or line.startswith("Alias: "):
- enc = line.split()[1]
- try:
- codecs.lookup(enc)
- if enc.lower not in encodings:
- encodings.append(enc.lower())
- except LookupError:
- pass
- sys.stdout.write("encodings = frozenset((\n")
- for enc in encodings:
- sys.stdout.write(' "%s",\n'%enc)
- sys.stdout.write(' ))')
-
-if __name__ == "__main__":
- main() \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/html5lib-python/utils/spider.py b/chromium/third_party/catapult/third_party/html5lib-python/utils/spider.py
deleted file mode 100644
index a7b8031974b..00000000000
--- a/chromium/third_party/catapult/third_party/html5lib-python/utils/spider.py
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env python
-"""Spider to try and find bugs in the parser. Requires httplib2 and elementtree
-
-usage:
-import spider
-s = spider.Spider()
-s.spider("http://www.google.com", maxURLs=100)
-"""
-
-import urllib.request, urllib.error, urllib.parse
-import urllib.robotparser
-import md5
-
-import httplib2
-
-import html5lib
-from html5lib.treebuilders import etree
-
-class Spider(object):
- def __init__(self):
- self.unvisitedURLs = set()
- self.visitedURLs = set()
- self.buggyURLs=set()
- self.robotParser = urllib.robotparser.RobotFileParser()
- self.contentDigest = {}
- self.http = httplib2.Http(".cache")
-
- def run(self, initialURL, maxURLs=1000):
- urlNumber = 0
- self.visitedURLs.add(initialURL)
- content = self.loadURL(initialURL)
- while maxURLs is None or urlNumber < maxURLs:
- if content is not None:
- self.parse(content)
- urlNumber += 1
- if not self.unvisitedURLs:
- break
- content = self.loadURL(self.unvisitedURLs.pop())
-
- def parse(self, content):
- failed = False
- p = html5lib.HTMLParser(tree=etree.TreeBuilder)
- try:
- tree = p.parse(content)
- except:
- self.buggyURLs.add(self.currentURL)
- failed = True
- print("BUGGY:", self.currentURL)
- self.visitedURLs.add(self.currentURL)
- if not failed:
- self.updateURLs(tree)
-
- def loadURL(self, url):
- resp, content = self.http.request(url, "GET")
- self.currentURL = url
- digest = md5.md5(content).hexdigest()
- if digest in self.contentDigest:
- content = None
- self.visitedURLs.add(url)
- else:
- self.contentDigest[digest] = url
-
- if resp['status'] != "200":
- content = None
-
- return content
-
- def updateURLs(self, tree):
- """Take all the links in the current document, extract the URLs and
- update the list of visited and unvisited URLs according to whether we
- have seen them before or not"""
- urls = set()
- #Remove all links we have already visited
- for link in tree.findall(".//a"):
- try:
- url = urllib.parse.urldefrag(link.attrib['href'])[0]
- if (url and url not in self.unvisitedURLs and url
- not in self.visitedURLs):
- urls.add(url)
- except KeyError:
- pass
-
- #Remove all non-http URLs and a dd a sutiable base URL where that is
- #missing
- newUrls = set()
- for url in urls:
- splitURL = list(urllib.parse.urlsplit(url))
- if splitURL[0] != "http":
- continue
- if splitURL[1] == "":
- splitURL[1] = urllib.parse.urlsplit(self.currentURL)[1]
- newUrls.add(urllib.parse.urlunsplit(splitURL))
- urls = newUrls
-
- responseHeaders = {}
- #Now we want to find the content types of the links we haven't visited
- for url in urls:
- try:
- resp, content = self.http.request(url, "HEAD")
- responseHeaders[url] = resp
- except AttributeError as KeyError:
- #Don't know why this happens
- pass
-
-
- #Remove links not of content-type html or pages not found
- #XXX - need to deal with other status codes?
- toVisit = set([url for url in urls if url in responseHeaders and
- "html" in responseHeaders[url]['content-type'] and
- responseHeaders[url]['status'] == "200"])
-
- #Now check we are allowed to spider the page
- for url in toVisit:
- robotURL = list(urllib.parse.urlsplit(url)[:2])
- robotURL.extend(["robots.txt", "", ""])
- robotURL = urllib.parse.urlunsplit(robotURL)
- self.robotParser.set_url(robotURL)
- if not self.robotParser.can_fetch("*", url):
- toVisit.remove(url)
-
- self.visitedURLs.update(urls)
- self.unvisitedURLs.update(toVisit)
diff --git a/chromium/third_party/catapult/third_party/polymer/.bowerrc b/chromium/third_party/catapult/third_party/polymer/.bowerrc
deleted file mode 100644
index 1d83b677782..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory:" : "components"
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/LICENSE.polymer b/chromium/third_party/catapult/third_party/polymer/LICENSE.polymer
deleted file mode 100644
index 92d60b019fd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/LICENSE.polymer
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/chromium/third_party/catapult/third_party/polymer/README.chromium b/chromium/third_party/catapult/third_party/polymer/README.chromium
deleted file mode 100644
index af8e9ad5214..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/README.chromium
+++ /dev/null
@@ -1,26 +0,0 @@
-Name: Polymer
-Short Name: polymer
-URL: http://www.polymer-project.org
-Version: 0.5.2-4
-Revision: (See components/<component>/.bower.json)
-License: BSD
-License File: LICENSE.polymer
-Security Critical: no
-
-Description:
-This directory contains a subset of the components provided by the
-Polymer project. See bower.json for a full list of components.
-
-The version can be found in header of polymer/polymer.js. The license can
-be found in polymer/LICENSE.
-
-The source git repositories can be found at:
-https://github.com/Polymer/<component>
-
-Note on Bower:
-New components can be added by editing bower.json and running `bower update`,
-which requires first installing bower (see http://bower.io/).
-
-Local Modifications:
-Removed unused file with no license header:
-components/web-animations-js/.travis-setup.sh
diff --git a/chromium/third_party/catapult/third_party/polymer/bower.json b/chromium/third_party/catapult/third_party/polymer/bower.json
deleted file mode 100644
index 8b69028b045..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/bower.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "catapult",
- "private": true,
- "dependencies": {
- "iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-menu": "PolymerElements/paper-menu#^1.0.0",
- "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",
- "iron-selector": "PolymerElements/iron-selector#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-dialog": "PolymerElements/paper-dialog#^1.0.0",
- "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",
- "paper-input": "PolymerElements/paper-input#^1.0.0",
- "paper-progress": "PolymerElements/paper-progress#^1.0.0",
- "paper-spinner": "PolymerElements/paper-spinner#^1.0.0",
- "paper-toast": "PolymerElements/paper-toast#^1.0.0",
- "paper-tooltip": "PolymerElements/paper-tooltip#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0",
- "paper-listbox": "polymerelements/paper-listbox#^1.1.2"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/.bower.json
deleted file mode 100644
index 25da64479c2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/.bower.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "core-component-page",
- "private": true,
- "dependencies": {
- "webcomponentsjs": "Polymer/webcomponentsjs",
- "polymer": "Polymer/polymer#^0.5"
- },
- "version": "0.5.6",
- "homepage": "https://github.com/Polymer/core-component-page",
- "_release": "0.5.6",
- "_resolution": {
- "type": "version",
- "tag": "0.5.6",
- "commit": "01a1d3968d7ece144783bcd03bc87b18344265e3"
- },
- "_source": "git://github.com/Polymer/core-component-page.git",
- "_target": "^0.5",
- "_originalSource": "Polymer/core-component-page"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/README.md b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/README.md
deleted file mode 100644
index 9e2384294a3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-core-component-page
-===================
-
-**This element is compatible with Polymer 0.5 and lower only, and will be deprecated.**
-You can check out a similar 0.8-compatible version of this element at [https://github.com/polymerelements/iron-components-page](https://github.com/polymerelements/iron-component-page)
-
-See the [component page](https://www.polymer-project.org/0.5/docs/elements/core-component-page.html) for more information.
-
-Note: this is the vulcanized version of [`core-component-page-dev`](https://github.com/Polymer/core-component-page-dev) (the source).
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/bowager-logo.png b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/bowager-logo.png
deleted file mode 100644
index 76be9fb04c1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/bowager-logo.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/bower.json b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/bower.json
deleted file mode 100644
index df2d599bd82..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/bower.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "core-component-page",
- "private": true,
- "dependencies": {
- "webcomponentsjs": "Polymer/webcomponentsjs",
- "polymer": "Polymer/polymer#^0.5"
- },
- "version": "0.5.6"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/core-component-page.html b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/core-component-page.html
deleted file mode 100644
index 82a87e7ea8e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/core-component-page.html
+++ /dev/null
@@ -1 +0,0 @@
-<html><head><style> body { margin: 0; }</style><link rel="import" href="../polymer/polymer.html"><style shim-shadowdom="">html /deep/ core-icon { display: inline-block; vertical-align: middle; background-repeat: no-repeat; fill: currentcolor; position: relative; height: 24px; width: 24px;}</style><script>(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/ *\| */)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^ *> ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^ *([*+-]|\d+\.) +/,"");if(~item.indexOf("\n ")){space-=item.length;item=!this.options.pedantic?item.replace(new RegExp("^ {1,"+space+"}","gm"),""):item.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return this.tokens};var inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a /i.test(cap[0])){this.inLink=true}else if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+' id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0){return""}}var out='<a href="'+href+'"';if(title){out+=' title="'+title+'"'}out+=">"+text+"</a>";return out};Renderer.prototype.image=function(href,title,text){var out='<img src="'+href+'" alt="'+text+'"';if(title){out+=' title="'+title+'"'}out+=this.options.xhtml?"/>":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return this.renderer.table(header,body)}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return this.renderer.blockquote(body)}case"list_start":{var body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return this.renderer.list(body,ordered)}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(body)}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return this.renderer.listitem(body)}case"html":{var html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return this.renderer.html(html)}case"paragraph":{return this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return this.renderer.paragraph(this.parseText())}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key in target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj}function marked(src,opt,callback){if(callback||typeof opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return callback(e)}pending=tokens.length;var done=function(){var out,err;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return done()}delete opt.highlight;if(!pending)return done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occured:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());</script><script>var IN_GLOBAL_SCOPE=true;window["PR_SHOULD_USE_CONTINUATION"]=true;var prettyPrintOne;var prettyPrint;(function(){var win=window;var FLOW_CONTROL_KEYWORDS=["break,continue,do,else,for,if,return,while"];var C_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default,"+"double,enum,extern,float,goto,inline,int,long,register,short,signed,"+"sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var COMMON_KEYWORDS=[C_KEYWORDS,"catch,class,delete,false,import,"+"new,operator,private,protected,public,this,throw,true,try,typeof"];var CPP_KEYWORDS=[COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool,"+"concept,concept_map,const_cast,constexpr,decltype,delegate,"+"dynamic_cast,explicit,export,friend,generic,late_check,"+"mutable,namespace,nullptr,property,reinterpret_cast,static_assert,"+"static_cast,template,typeid,typename,using,virtual,where"];var JAVA_KEYWORDS=[COMMON_KEYWORDS,"abstract,assert,boolean,byte,extends,final,finally,implements,import,"+"instanceof,interface,null,native,package,strictfp,super,synchronized,"+"throws,transient"];var CSHARP_KEYWORDS=[JAVA_KEYWORDS,"as,base,by,checked,decimal,delegate,descending,dynamic,event,"+"fixed,foreach,from,group,implicit,in,internal,into,is,let,"+"lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,"+"sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,"+"var,virtual,where"];var COFFEE_KEYWORDS="all,and,by,catch,class,else,extends,false,finally,"+"for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,"+"throw,true,try,unless,until,when,while,yes";var JSCRIPT_KEYWORDS=[COMMON_KEYWORDS,"debugger,eval,export,function,get,null,set,undefined,var,with,"+"Infinity,NaN"];var PERL_KEYWORDS="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,"+"goto,if,import,last,local,my,next,no,our,print,package,redo,require,"+"sub,undef,unless,until,use,wantarray,while,BEGIN,END";var PYTHON_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"and,as,assert,class,def,del,"+"elif,except,exec,finally,from,global,import,in,is,lambda,"+"nonlocal,not,or,pass,print,raise,try,with,yield,"+"False,True,None"];var RUBY_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"alias,and,begin,case,class,"+"def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,"+"rescue,retry,self,super,then,true,undef,unless,until,when,yield,"+"BEGIN,END"];var RUST_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"as,assert,const,copy,drop,"+"enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,"+"pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];var SH_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"case,done,elif,esac,eval,fi,"+"function,in,local,set,then,until"];var ALL_KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS,PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS];var C_TYPES=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;var PR_STRING="str";var PR_KEYWORD="kwd";var PR_COMMENT="com";var PR_TYPE="typ";var PR_LITERAL="lit";var PR_PUNCTUATION="pun";var PR_PLAIN="pln";var PR_TAG="tag";var PR_DECLARATION="dec";var PR_SOURCE="src";var PR_ATTRIB_NAME="atn";var PR_ATTRIB_VALUE="atv";var PR_NOCODE="nocode";var REGEXP_PRECEDER_PATTERN="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function combinePrefixPatterns(regexs){var capturedGroupIndex=0;var needToFoldCase=false;var ignoreCase=false;for(var i=0,n=regexs.length;i<n;++i){var regex=regexs[i];if(regex.ignoreCase){ignoreCase=true}else if(/[a-z]/i.test(regex.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){needToFoldCase=true;ignoreCase=false;break}}var escapeCharToCodeUnit={b:8,t:9,n:10,v:11,f:12,r:13};function decodeEscape(charsetPart){var cc0=charsetPart.charCodeAt(0);if(cc0!==92){return cc0}var c1=charsetPart.charAt(1);cc0=escapeCharToCodeUnit[c1];if(cc0){return cc0}else if("0"<=c1&&c1<="7"){return parseInt(charsetPart.substring(1),8)}else if(c1==="u"||c1==="x"){return parseInt(charsetPart.substring(2),16)}else{return charsetPart.charCodeAt(1)}}function encodeEscape(charCode){if(charCode<32){return(charCode<16?"\\x0":"\\x")+charCode.toString(16)}var ch=String.fromCharCode(charCode);return ch==="\\"||ch==="-"||ch==="]"||ch==="^"?"\\"+ch:ch}function caseFoldCharset(charSet){var charsetParts=charSet.substring(1,charSet.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}"+"|\\\\x[0-9A-Fa-f]{2}"+"|\\\\[0-3][0-7]{0,2}"+"|\\\\[0-7]{1,2}"+"|\\\\[\\s\\S]"+"|-"+"|[^-\\\\]","g"));var ranges=[];var inverse=charsetParts[0]==="^";var out=["["];if(inverse){out.push("^")}for(var i=inverse?1:0,n=charsetParts.length;i<n;++i){var p=charsetParts[i];if(/\\[bdsw]/i.test(p)){out.push(p)}else{var start=decodeEscape(p);var end;if(i+2<n&&"-"===charsetParts[i+1]){end=decodeEscape(charsetParts[i+2]);i+=2}else{end=start}ranges.push([start,end]);if(!(end<65||start>122)){if(!(end<65||start>90)){ranges.push([Math.max(65,start)|32,Math.min(end,90)|32])}if(!(end<97||start>122)){ranges.push([Math.max(97,start)&~32,Math.min(end,122)&~32])}}}}ranges.sort(function(a,b){return a[0]-b[0]||b[1]-a[1]});var consolidatedRanges=[];var lastRange=[];for(var i=0;i<ranges.length;++i){var range=ranges[i];if(range[0]<=lastRange[1]+1){lastRange[1]=Math.max(lastRange[1],range[1])}else{consolidatedRanges.push(lastRange=range)}}for(var i=0;i<consolidatedRanges.length;++i){var range=consolidatedRanges[i];out.push(encodeEscape(range[0]));if(range[1]>range[0]){if(range[1]+1>range[0]){out.push("-")}out.push(encodeEscape(range[1]))}}out.push("]");return out.join("")}function allowAnywhereFoldCaseAndRenumberGroups(regex){var parts=regex.source.match(new RegExp("(?:"+"\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]"+"|\\\\u[A-Fa-f0-9]{4}"+"|\\\\x[A-Fa-f0-9]{2}"+"|\\\\[0-9]+"+"|\\\\[^ux0-9]"+"|\\(\\?[:!=]"+"|[\\(\\)\\^]"+"|[^\\x5B\\x5C\\(\\)\\^]+"+")","g"));var n=parts.length;var capturedGroups=[];for(var i=0,groupIndex=0;i<n;++i){var p=parts[i];if(p==="("){++groupIndex}else if("\\"===p.charAt(0)){var decimalValue=+p.substring(1);if(decimalValue){if(decimalValue<=groupIndex){capturedGroups[decimalValue]=-1}else{parts[i]=encodeEscape(decimalValue)}}}}for(var i=1;i<capturedGroups.length;++i){if(-1===capturedGroups[i]){capturedGroups[i]=++capturedGroupIndex}}for(var i=0,groupIndex=0;i<n;++i){var p=parts[i];if(p==="("){++groupIndex;if(!capturedGroups[groupIndex]){parts[i]="(?:"}}else if("\\"===p.charAt(0)){var decimalValue=+p.substring(1);if(decimalValue&&decimalValue<=groupIndex){parts[i]="\\"+capturedGroups[decimalValue]}}}for(var i=0;i<n;++i){if("^"===parts[i]&&"^"!==parts[i+1]){parts[i]=""}}if(regex.ignoreCase&&needToFoldCase){for(var i=0;i<n;++i){var p=parts[i];var ch0=p.charAt(0);if(p.length>=2&&ch0==="["){parts[i]=caseFoldCharset(p)}else if(ch0!=="\\"){parts[i]=p.replace(/[a-zA-Z]/g,function(ch){var cc=ch.charCodeAt(0);return"["+String.fromCharCode(cc&~32,cc|32)+"]"})}}}return parts.join("")}var rewritten=[];for(var i=0,n=regexs.length;i<n;++i){var regex=regexs[i];if(regex.global||regex.multiline){throw new Error(""+regex)}rewritten.push("(?:"+allowAnywhereFoldCaseAndRenumberGroups(regex)+")")}return new RegExp(rewritten.join("|"),ignoreCase?"gi":"g")}function extractSourceSpans(node,isPreformatted){var nocode=/(?:^|\s)nocode(?:\s|$)/;var chunks=[];var length=0;var spans=[];var k=0;function walk(node){var type=node.nodeType;if(type==1){if(nocode.test(node.className)){return}for(var child=node.firstChild;child;child=child.nextSibling){walk(child)}var nodeName=node.nodeName.toLowerCase();if("br"===nodeName||"li"===nodeName){chunks[k]="\n";spans[k<<1]=length++;spans[k++<<1|1]=node}}else if(type==3||type==4){var text=node.nodeValue;if(text.length){if(!isPreformatted){text=text.replace(/[ \t\r\n]+/g," ")}else{text=text.replace(/\r\n?/g,"\n")}chunks[k]=text;spans[k<<1]=length;length+=text.length;spans[k++<<1|1]=node}}}walk(node);return{sourceCode:chunks.join("").replace(/\n$/,""),spans:spans}}function appendDecorations(basePos,sourceCode,langHandler,out){if(!sourceCode){return}var job={sourceCode:sourceCode,basePos:basePos};langHandler(job);out.push.apply(out,job.decorations)}var notWs=/\S/;function childContentWrapper(element){var wrapper=undefined;for(var c=element.firstChild;c;c=c.nextSibling){var type=c.nodeType;wrapper=type===1?wrapper?element:c:type===3?notWs.test(c.nodeValue)?element:wrapper:wrapper}return wrapper===element?undefined:wrapper}function createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};var tokenizer;(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);var allRegexs=[];var regexKeys={};for(var i=0,n=allPatterns.length;i<n;++i){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts}}var regex=patternParts[1];var k=""+regex;if(!regexKeys.hasOwnProperty(k)){allRegexs.push(regex);regexKeys[k]=null}}allRegexs.push(/[\0-\uffff]/);tokenizer=combinePrefixPatterns(allRegexs)})();var nPatterns=fallthroughStylePatterns.length;var decorate=function(job){var sourceCode=job.sourceCode,basePos=job.basePos;var decorations=[basePos,PR_PLAIN];var pos=0;var tokens=sourceCode.match(tokenizer)||[];var styleCache={};for(var ti=0,nTokens=tokens.length;ti<nTokens;++ti){var token=tokens[ti];var style=styleCache[token];var match=void 0;var isEmbedded;if(typeof style==="string"){isEmbedded=false}else{var patternParts=shortcuts[token.charAt(0)];if(patternParts){match=token.match(patternParts[1]);style=patternParts[0]}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];match=token.match(patternParts[1]);if(match){style=patternParts[0];break}}if(!match){style=PR_PLAIN}}isEmbedded=style.length>=5&&"lang-"===style.substring(0,5);if(isEmbedded&&!(match&&typeof match[1]==="string")){isEmbedded=false;style=PR_SOURCE}if(!isEmbedded){styleCache[token]=style}}var tokenStart=pos;pos+=token.length;if(!isEmbedded){decorations.push(basePos+tokenStart,style)}else{var embeddedSource=match[1];var embeddedSourceStart=token.indexOf(embeddedSource);var embeddedSourceEnd=embeddedSourceStart+embeddedSource.length;if(match[2]){embeddedSourceEnd=token.length-match[2].length;embeddedSourceStart=embeddedSourceEnd-embeddedSource.length}var lang=style.substring(5);appendDecorations(basePos+tokenStart,token.substring(0,embeddedSourceStart),decorate,decorations);appendDecorations(basePos+tokenStart+embeddedSourceStart,embeddedSource,langHandlerForExtension(lang,embeddedSource),decorations);appendDecorations(basePos+tokenStart+embeddedSourceEnd,token.substring(embeddedSourceEnd),decorate,decorations)}}job.decorations=decorations};return decorate}function sourceDecorator(options){var shortcutStylePatterns=[],fallthroughStylePatterns=[];if(options["tripleQuotedStrings"]){shortcutStylePatterns.push([PR_STRING,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else if(options["multiLineStrings"]){shortcutStylePatterns.push([PR_STRING,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{shortcutStylePatterns.push([PR_STRING,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}if(options["verbatimStrings"]){fallthroughStylePatterns.push([PR_STRING,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var hc=options["hashComments"];if(hc){if(options["cStyleComments"]){if(hc>1){shortcutStylePatterns.push([PR_COMMENT,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{shortcutStylePatterns.push([PR_COMMENT,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}fallthroughStylePatterns.push([PR_STRING,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])}else{shortcutStylePatterns.push([PR_COMMENT,/^#[^\r\n]*/,null,"#"])}}if(options["cStyleComments"]){fallthroughStylePatterns.push([PR_COMMENT,/^\/\/[^\r\n]*/,null]);fallthroughStylePatterns.push([PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}var regexLiterals=options["regexLiterals"];if(regexLiterals){var regexExcls=regexLiterals>1?"":"\n\r";var regexAny=regexExcls?".":"[\\S\\s]";var REGEX_LITERAL="/(?=[^/*"+regexExcls+"])"+"(?:[^/\\x5B\\x5C"+regexExcls+"]"+"|\\x5C"+regexAny+"|\\x5B(?:[^\\x5C\\x5D"+regexExcls+"]"+"|\\x5C"+regexAny+")*(?:\\x5D|$))+"+"/";fallthroughStylePatterns.push(["lang-regex",RegExp("^"+REGEXP_PRECEDER_PATTERN+"("+REGEX_LITERAL+")")])}var types=options["types"];if(types){fallthroughStylePatterns.push([PR_TYPE,types])}var keywords=(""+options["keywords"]).replace(/^ | $/g,"");if(keywords.length){fallthroughStylePatterns.push([PR_KEYWORD,new RegExp("^(?:"+keywords.replace(/[\s,]+/g,"|")+")\\b"),null])}shortcutStylePatterns.push([PR_PLAIN,/^\s+/,null," \r\n  "]);var punctuation="^.[^\\s\\w.$@'\"`/\\\\]*";if(options["regexLiterals"]){punctuation+="(?!s*/)"}fallthroughStylePatterns.push([PR_LITERAL,/^@[a-z_$][a-z_$@0-9]*/i,null],[PR_TYPE,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[PR_PLAIN,/^[a-z_$][a-z_$@0-9]*/i,null],[PR_LITERAL,new RegExp("^(?:"+"0x[a-f0-9]+"+"|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)"+"(?:e[+\\-]?\\d+)?"+")"+"[a-z]*","i"),null,"0123456789"],[PR_PLAIN,/^\\[\s\S]?/,null],[PR_PUNCTUATION,new RegExp(punctuation),null]);return createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns)}var decorateSource=sourceDecorator({keywords:ALL_KEYWORDS,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function numberLines(node,opt_startLineNum,isPreformatted){var nocode=/(?:^|\s)nocode(?:\s|$)/;var lineBreak=/\r\n?|\n/;var document=node.ownerDocument;var li=document.createElement("li");while(node.firstChild){li.appendChild(node.firstChild)}var listItems=[li];function walk(node){var type=node.nodeType;if(type==1&&!nocode.test(node.className)){if("br"===node.nodeName){breakAfter(node);if(node.parentNode){node.parentNode.removeChild(node)}}else{for(var child=node.firstChild;child;child=child.nextSibling){walk(child)}}}else if((type==3||type==4)&&isPreformatted){var text=node.nodeValue;var match=text.match(lineBreak);if(match){var firstLine=text.substring(0,match.index);node.nodeValue=firstLine;var tail=text.substring(match.index+match[0].length);if(tail){var parent=node.parentNode;parent.insertBefore(document.createTextNode(tail),node.nextSibling)}breakAfter(node);if(!firstLine){node.parentNode.removeChild(node)}}}}function breakAfter(lineEndNode){while(!lineEndNode.nextSibling){lineEndNode=lineEndNode.parentNode;if(!lineEndNode){return}}function breakLeftOf(limit,copy){var rightSide=copy?limit.cloneNode(false):limit;var parent=limit.parentNode;if(parent){var parentClone=breakLeftOf(parent,1);var next=limit.nextSibling;parentClone.appendChild(rightSide);for(var sibling=next;sibling;sibling=next){next=sibling.nextSibling;parentClone.appendChild(sibling)}}return rightSide}var copiedListItem=breakLeftOf(lineEndNode.nextSibling,0);for(var parent;(parent=copiedListItem.parentNode)&&parent.nodeType===1;){copiedListItem=parent}listItems.push(copiedListItem)}for(var i=0;i<listItems.length;++i){walk(listItems[i])}if(opt_startLineNum===(opt_startLineNum|0)){listItems[0].setAttribute("value",opt_startLineNum)}var ol=document.createElement("ol");ol.className="linenums";var offset=Math.max(0,opt_startLineNum-1|0)||0;for(var i=0,n=listItems.length;i<n;++i){li=listItems[i];li.className="L"+(i+offset)%10;if(!li.firstChild){li.appendChild(document.createTextNode(" "))}ol.appendChild(li)}node.appendChild(ol)}function recombineTagsAndDecorations(job){var isIE8OrEarlier=/\bMSIE\s(\d+)/.exec(navigator.userAgent);isIE8OrEarlier=isIE8OrEarlier&&+isIE8OrEarlier[1]<=8;var newlineRe=/\n/g;var source=job.sourceCode;var sourceLength=source.length;var sourceIndex=0;var spans=job.spans;var nSpans=spans.length;var spanIndex=0;var decorations=job.decorations;var nDecorations=decorations.length;var decorationIndex=0;decorations[nDecorations]=sourceLength;var decPos,i;for(i=decPos=0;i<nDecorations;){if(decorations[i]!==decorations[i+2]){decorations[decPos++]=decorations[i++];decorations[decPos++]=decorations[i++]}else{i+=2}}nDecorations=decPos;for(i=decPos=0;i<nDecorations;){var startPos=decorations[i];var startDec=decorations[i+1];var end=i+2;while(end+2<=nDecorations&&decorations[end+1]===startDec){end+=2}decorations[decPos++]=startPos;decorations[decPos++]=startDec;i=end}nDecorations=decorations.length=decPos;var sourceNode=job.sourceNode;var oldDisplay;if(sourceNode){oldDisplay=sourceNode.style.display;sourceNode.style.display="none"}try{var decoration=null;while(spanIndex<nSpans){var spanStart=spans[spanIndex];var spanEnd=spans[spanIndex+2]||sourceLength;var decEnd=decorations[decorationIndex+2]||sourceLength;var end=Math.min(spanEnd,decEnd);var textNode=spans[spanIndex+1];var styledText;if(textNode.nodeType!==1&&(styledText=source.substring(sourceIndex,end))){if(isIE8OrEarlier){styledText=styledText.replace(newlineRe,"\r")}textNode.nodeValue=styledText;var document=textNode.ownerDocument;var span=document.createElement("span");span.className=decorations[decorationIndex+1];var parentNode=textNode.parentNode;parentNode.replaceChild(span,textNode);span.appendChild(textNode);if(sourceIndex<spanEnd){spans[spanIndex+1]=textNode=document.createTextNode(source.substring(end,spanEnd));parentNode.insertBefore(textNode,span.nextSibling)}}sourceIndex=end;if(sourceIndex>=spanEnd){spanIndex+=2}if(sourceIndex>=decEnd){decorationIndex+=2}}}finally{if(sourceNode){sourceNode.style.display=oldDisplay}}}var langHandlerRegistry={};function registerLangHandler(handler,fileExtensions){for(var i=fileExtensions.length;--i>=0;){var ext=fileExtensions[i];if(!langHandlerRegistry.hasOwnProperty(ext)){langHandlerRegistry[ext]=handler}else if(win["console"]){console["warn"]("cannot override language handler %s",ext)}}}function langHandlerForExtension(extension,source){if(!(extension&&langHandlerRegistry.hasOwnProperty(extension))){extension=/^\s*</.test(source)?"default-markup":"default-code"}return langHandlerRegistry[extension]}registerLangHandler(decorateSource,["default-code"]);registerLangHandler(createSimpleLexer([],[[PR_PLAIN,/^[^<?]+/],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);registerLangHandler(createSimpleLexer([[PR_PLAIN,/^[\s]+/,null," \r\n"],[PR_ATTRIB_VALUE,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[PR_TAG,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[PR_ATTRIB_NAME,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[PR_PUNCTUATION,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);registerLangHandler(createSimpleLexer([],[[PR_ATTRIB_VALUE,/^[\s\S]+/]]),["uq.val"]);registerLangHandler(sourceDecorator({keywords:CPP_KEYWORDS,hashComments:true,cStyleComments:true,types:C_TYPES}),["c","cc","cpp","cxx","cyc","m"]);registerLangHandler(sourceDecorator({keywords:"null,true,false"}),["json"]);registerLangHandler(sourceDecorator({keywords:CSHARP_KEYWORDS,hashComments:true,cStyleComments:true,verbatimStrings:true,types:C_TYPES}),["cs"]);registerLangHandler(sourceDecorator({keywords:JAVA_KEYWORDS,cStyleComments:true}),["java"]);registerLangHandler(sourceDecorator({keywords:SH_KEYWORDS,hashComments:true,multiLineStrings:true}),["bash","bsh","csh","sh"]);registerLangHandler(sourceDecorator({keywords:PYTHON_KEYWORDS,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py","python"]);registerLangHandler(sourceDecorator({keywords:PERL_KEYWORDS,hashComments:true,multiLineStrings:true,regexLiterals:2}),["perl","pl","pm"]);registerLangHandler(sourceDecorator({keywords:RUBY_KEYWORDS,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb","ruby"]);registerLangHandler(sourceDecorator({keywords:JSCRIPT_KEYWORDS,cStyleComments:true,regexLiterals:true}),["javascript","js"]);registerLangHandler(sourceDecorator({keywords:COFFEE_KEYWORDS,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);registerLangHandler(sourceDecorator({keywords:RUST_KEYWORDS,cStyleComments:true,multilineStrings:true}),["rc","rs","rust"]);registerLangHandler(createSimpleLexer([],[[PR_STRING,/^[\s\S]+/]]),["regex"]);function applyDecorator(job){var opt_langExtension=job.langExtension;try{var sourceAndSpans=extractSourceSpans(job.sourceNode,job.pre);var source=sourceAndSpans.sourceCode;job.sourceCode=source;job.spans=sourceAndSpans.spans;job.basePos=0;langHandlerForExtension(opt_langExtension,source)(job);recombineTagsAndDecorations(job)}catch(e){if(win["console"]){console["log"](e&&e["stack"]||e)}}}function $prettyPrintOne(sourceCodeHtml,opt_langExtension,opt_numberLines){var container=document.createElement("div");container.innerHTML="<pre>"+sourceCodeHtml+"</pre>";container=container.firstChild;if(opt_numberLines){numberLines(container,opt_numberLines,true)}var job={langExtension:opt_langExtension,numberLines:opt_numberLines,sourceNode:container,pre:1};applyDecorator(job);return container.innerHTML}function $prettyPrint(opt_whenDone,opt_root){var root=opt_root||document.body;var doc=root.ownerDocument||document;function byTagName(tn){return root.getElementsByTagName(tn)}var codeSegments=[byTagName("pre"),byTagName("code"),byTagName("xmp")];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0,n=codeSegments[i].length;j<n;++j){elements.push(codeSegments[i][j])}}codeSegments=null;var clock=Date;if(!clock["now"]){clock={now:function(){return+new Date}}}var k=0;var prettyPrintingJob;var langExtensionRe=/\blang(?:uage)?-([\w.]+)(?!\S)/;var prettyPrintRe=/\bprettyprint\b/;var prettyPrintedRe=/\bprettyprinted\b/;var preformattedTagNameRe=/pre|xmp/i;var codeRe=/^code$/i;var preCodeXmpRe=/^(?:pre|code|xmp)$/i;var EMPTY={};function doWork(){var endTime=win["PR_SHOULD_USE_CONTINUATION"]?clock["now"]()+250:Infinity;for(;k<elements.length&&clock["now"]()<endTime;k++){var cs=elements[k];var attrs=EMPTY;{for(var preceder=cs;preceder=preceder.previousSibling;){var nt=preceder.nodeType;var value=(nt===7||nt===8)&&preceder.nodeValue;if(value?!/^\??prettify\b/.test(value):nt!==3||/\S/.test(preceder.nodeValue)){break}if(value){attrs={};value.replace(/\b(\w+)=([\w:.%+-]+)/g,function(_,name,value){attrs[name]=value});break}}}var className=cs.className;if((attrs!==EMPTY||prettyPrintRe.test(className))&&!prettyPrintedRe.test(className)){var nested=false;for(var p=cs.parentNode;p;p=p.parentNode){var tn=p.tagName;if(preCodeXmpRe.test(tn)&&p.className&&prettyPrintRe.test(p.className)){nested=true;break}}if(!nested){cs.className+=" prettyprinted";var langExtension=attrs["lang"];if(!langExtension){langExtension=className.match(langExtensionRe);var wrapper;if(!langExtension&&(wrapper=childContentWrapper(cs))&&codeRe.test(wrapper.tagName)){langExtension=wrapper.className.match(langExtensionRe)}if(langExtension){langExtension=langExtension[1]}}var preformatted;if(preformattedTagNameRe.test(cs.tagName)){preformatted=1}else{var currentStyle=cs["currentStyle"];var defaultView=doc.defaultView;var whitespace=currentStyle?currentStyle["whiteSpace"]:defaultView&&defaultView.getComputedStyle?defaultView.getComputedStyle(cs,null).getPropertyValue("white-space"):0;preformatted=whitespace&&"pre"===whitespace.substring(0,3)}var lineNums=attrs["linenums"];if(!(lineNums=lineNums==="true"||+lineNums)){lineNums=className.match(/\blinenums\b(?::(\d+))?/);lineNums=lineNums?lineNums[1]&&lineNums[1].length?+lineNums[1]:true:false}if(lineNums){numberLines(cs,lineNums,preformatted)}prettyPrintingJob={langExtension:langExtension,sourceNode:cs,numberLines:lineNums,pre:preformatted};applyDecorator(prettyPrintingJob)}}}if(k<elements.length){setTimeout(doWork,250)}else if("function"===typeof opt_whenDone){opt_whenDone()}}doWork()}var PR=win["PR"]={createSimpleLexer:createSimpleLexer,registerLangHandler:registerLangHandler,sourceDecorator:sourceDecorator,PR_ATTRIB_NAME:PR_ATTRIB_NAME,PR_ATTRIB_VALUE:PR_ATTRIB_VALUE,PR_COMMENT:PR_COMMENT,PR_DECLARATION:PR_DECLARATION,PR_KEYWORD:PR_KEYWORD,PR_LITERAL:PR_LITERAL,PR_NOCODE:PR_NOCODE,PR_PLAIN:PR_PLAIN,PR_PUNCTUATION:PR_PUNCTUATION,PR_SOURCE:PR_SOURCE,PR_STRING:PR_STRING,PR_TAG:PR_TAG,PR_TYPE:PR_TYPE,prettyPrintOne:IN_GLOBAL_SCOPE?win["prettyPrintOne"]=$prettyPrintOne:prettyPrintOne=$prettyPrintOne,prettyPrint:prettyPrint=IN_GLOBAL_SCOPE?win["prettyPrint"]=$prettyPrint:prettyPrint=$prettyPrint};if(typeof define==="function"&&define["amd"]){define("google-code-prettify",[],function(){return PR})}})();</script><script>(function(scope){var ContextFreeParser={parse:function(text){var top={};var entities=[];var current=top;var subCurrent={};var scriptDocCommentClause="\\/\\*\\*([\\s\\S]*?)\\*\\/";var htmlDocCommentClause="<!--([\\s\\S]*?)-->";var docCommentRegex=new RegExp(scriptDocCommentClause+"|"+htmlDocCommentClause,"g");var docComments=text.match(docCommentRegex)||[];docComments.forEach(function(m){var lines=m.replace(/\r\n/g,"\n").replace(/^\s*\/\*\*|^\s*\*\/|^\s*\* ?|^\s*\<\!-\-|^s*\-\-\>/gm,"").split("\n");var pragmas=[];lines=lines.filter(function(l){var m=l.match(/\s*@([\w-]*) (.*)/);if(!m){return true}pragmas.push(m)});var code=lines.join("\n");pragmas.forEach(function(m){var pragma=m[1],content=m[2];switch(pragma){case"class":case"element":current={name:content,description:code};entities.push(current);break;case"attribute":case"property":case"method":case"event":subCurrent={name:content,description:code};var label=pragma=="property"?"properties":pragma+"s";makePragma(current,label,subCurrent);break;case"default":case"type":subCurrent[pragma]=content;break;case"param":var eventParmsRe=/\{(.+)\}\s+(\w+[.\w+]+)\s+(.*)$/;var params=content.match(eventParmsRe);if(params){var subEventObj={type:params[1],name:params[2],description:params[3]};makePragma(subCurrent,pragma+"s",subEventObj)}break;case"extends":case"mixins":var parts=content.split(" ");var subObj={name:parts[0],url:parts[1]||null};makePragma(current,pragma,subObj);break;case"return":var returnRe=/\{(.+)\}\s+(.*)$/;var returnReResult=content.match(returnRe);if(returnReResult){var subReturnObj={type:returnReResult[1],description:returnReResult[2]};subCurrent[pragma]=subReturnObj}break;default:current[pragma]=content;break}});function makePragma(object,pragma,content){var p$=object;var p=p$[pragma];if(!p){p$[pragma]=p=[]}p.push(content)}});if(entities.length===0){entities.push({name:"Entity",description:"**Undocumented**"})}return entities}};if(typeof module!=="undefined"&&module.exports){module.exports=ContextFreeParser}else{scope.ContextFreeParser=ContextFreeParser}})(this);</script><link href="http://fonts.googleapis.com/css?family=Roboto:400,300,500,700|Source+Code+Pro" rel="stylesheet" type="text/css"><style shim-shadowdom=""> html /deep/ core-a11y-keys { display: none; }</style></head><body><div hidden=""><polymer-element name="core-meta" attributes="label type" hidden="" assetpath="../core-meta/"><script>(function(){var SKIP_ID="meta";var metaData={},metaArray={};Polymer("core-meta",{type:"default",alwaysPrepare:true,ready:function(){this.register(this.id)},get metaArray(){var t=this.type;if(!metaArray[t]){metaArray[t]=[]}return metaArray[t]},get metaData(){var t=this.type;if(!metaData[t]){metaData[t]={}}return metaData[t]},register:function(id,old){if(id&&id!==SKIP_ID){this.unregister(this,old);this.metaData[id]=this;this.metaArray.push(this)}},unregister:function(meta,id){delete this.metaData[id||meta.id];var i=this.metaArray.indexOf(meta);if(i>=0){this.metaArray.splice(i,1)}},get list(){return this.metaArray},byId:function(id){return this.metaData[id]}})})();</script></polymer-element><polymer-element name="core-iconset" extends="core-meta" attributes="src width icons iconSize" assetpath="../core-iconset/"><script>Polymer("core-iconset",{src:"",width:0,icons:"",iconSize:24,offsetX:0,offsetY:0,type:"iconset",created:function(){this.iconMap={};this.iconNames=[];this.themes={}},ready:function(){if(this.src&&this.ownerDocument!==document){this.src=this.resolvePath(this.src,this.ownerDocument.baseURI)}this.super();this.updateThemes()},iconsChanged:function(){var ox=this.offsetX;var oy=this.offsetY;this.icons&&this.icons.split(/\s+/g).forEach(function(name,i){this.iconNames.push(name);this.iconMap[name]={offsetX:ox,offsetY:oy};if(ox+this.iconSize<this.width){ox+=this.iconSize}else{ox=this.offsetX;oy+=this.iconSize}},this)},updateThemes:function(){var ts=this.querySelectorAll("property[theme]");ts&&ts.array().forEach(function(t){this.themes[t.getAttribute("theme")]={offsetX:parseInt(t.getAttribute("offsetX"))||0,offsetY:parseInt(t.getAttribute("offsetY"))||0}},this)},getOffset:function(icon,theme){var i=this.iconMap[icon];if(!i){var n=this.iconNames[Number(icon)];i=this.iconMap[n]}var t=this.themes[theme];if(i&&t){return{offsetX:i.offsetX+t.offsetX,offsetY:i.offsetY+t.offsetY}}return i},applyIcon:function(element,icon,scale){var offset=this.getOffset(icon);scale=scale||1;if(element&&offset){var icon=element._icon||document.createElement("div");var style=icon.style;style.backgroundImage="url("+this.src+")";style.backgroundPosition=-offset.offsetX*scale+"px"+" "+(-offset.offsetY*scale+"px");style.backgroundSize=scale===1?"auto":this.width*scale+"px";if(icon.parentNode!==element){element.appendChild(icon)}return icon}}});</script></polymer-element><polymer-element name="core-icon" attributes="src icon alt" assetpath="../core-icon/"><script>(function(){var meta;Polymer("core-icon",{src:"",icon:"",alt:null,observe:{icon:"updateIcon",alt:"updateAlt"},defaultIconset:"icons",ready:function(){if(!meta){meta=document.createElement("core-iconset")}if(this.hasAttribute("aria-label")){if(!this.hasAttribute("role")){this.setAttribute("role","img")}return}this.updateAlt()},srcChanged:function(){var icon=this._icon||document.createElement("div");icon.textContent="";icon.setAttribute("fit","");icon.style.backgroundImage="url("+this.src+")";icon.style.backgroundPosition="center";icon.style.backgroundSize="100%";if(!icon.parentNode){this.appendChild(icon)}this._icon=icon},getIconset:function(name){return meta.byId(name||this.defaultIconset)},updateIcon:function(oldVal,newVal){if(!this.icon){this.updateAlt();return}var parts=String(this.icon).split(":");var icon=parts.pop();if(icon){var set=this.getIconset(parts.pop());if(set){this._icon=set.applyIcon(this,icon);if(this._icon){this._icon.setAttribute("fit","")}}}if(oldVal){if(oldVal.split(":").pop()==this.getAttribute("aria-label")){this.updateAlt()}}},updateAlt:function(){if(this.getAttribute("aria-hidden")){return}if(this.alt===""){this.setAttribute("aria-hidden","true");if(this.hasAttribute("role")){this.removeAttribute("role")}if(this.hasAttribute("aria-label")){this.removeAttribute("aria-label")}}else{this.setAttribute("aria-label",this.alt||this.icon.split(":").pop());if(!this.hasAttribute("role")){this.setAttribute("role","img")}if(this.hasAttribute("aria-hidden")){this.removeAttribute("aria-hidden")}}}})})();</script></polymer-element><polymer-element name="core-iconset-svg" extends="core-meta" attributes="iconSize" assetpath="../core-iconset-svg/"><script>Polymer("core-iconset-svg",{iconSize:24,type:"iconset",created:function(){this._icons={}},ready:function(){this.super();this.updateIcons()},iconById:function(id){return this._icons[id]||(this._icons[id]=this.querySelector('[id="'+id+'"]'))},cloneIcon:function(id){var icon=this.iconById(id);if(icon){var content=icon.cloneNode(true);content.removeAttribute("id");var svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 "+this.iconSize+" "+this.iconSize);svg.style.pointerEvents="none";svg.appendChild(content);return svg}},get iconNames(){if(!this._iconNames){this._iconNames=this.findIconNames()}return this._iconNames},findIconNames:function(){var icons=this.querySelectorAll("[id]").array();if(icons.length){return icons.map(function(n){return n.id})}},applyIcon:function(element,icon){var root=element;var old=root.querySelector("svg");if(old){old.remove()}var svg=this.cloneIcon(icon);if(!svg){return}svg.setAttribute("height","100%");svg.setAttribute("width","100%");svg.setAttribute("preserveAspectRatio","xMidYMid meet");svg.style.display="block";root.insertBefore(svg,root.firstElementChild);return svg},updateIcons:function(selector,method){selector=selector||"[icon]";method=method||"updateIcon";var deep=window.ShadowDOMPolyfill?"":"html /deep/ ";var i$=document.querySelectorAll(deep+selector);for(var i=0,e;e=i$[i];i++){if(e[method]){e[method].call(e)}}}});</script></polymer-element><core-iconset-svg id="icons" iconsize="24"><svg><defs><g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"></path></g><g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"></path></g><g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"></path></g><g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g><g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"></path></g><g id="account-child"><circle cx="12" cy="13.49" r="1.5"></circle><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 2.5c1.24 0 2.25 1.01 2.25 2.25S13.24 9 12 9 9.75 7.99 9.75 6.75 10.76 4.5 12 4.5zm5 10.56v2.5c-.45.41-.96.77-1.5 1.05v-.68c0-.34-.17-.65-.46-.92-.65-.62-1.89-1.02-3.04-1.02-.96 0-1.96.28-2.65.73l-.17.12-.21.17c.78.47 1.63.72 2.54.82l1.33.15c.37.04.66.36.66.75 0 .29-.16.53-.4.66-.28.15-.64.09-.95.09-.35 0-.69-.01-1.03-.05-.5-.06-.99-.17-1.46-.33-.49-.16-.97-.38-1.42-.64-.22-.13-.44-.27-.65-.43l-.31-.24c-.04-.02-.28-.18-.28-.23v-4.28c0-1.58 2.63-2.78 5-2.78s5 1.2 5 2.78v1.78z"></path></g><g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></g><g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></g><g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g><g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g><g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g><g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"></path></g><g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path></g><g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"></path></g><g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"></path></g><g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"></path></g><g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"></path></g><g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"></path></g><g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"></path></g><g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"></path></g><g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"></path></g><g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g><g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"></path></g><g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"></path></g><g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"></path></g><g id="aspect-ratio"><path d="M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"></path></g><g id="assessment"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"></path></g><g id="assignment"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"></path></g><g id="assignment-ind"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></g><g id="assignment-late"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-6 15h-2v-2h2v2zm0-4h-2V8h2v6zm-1-9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></g><g id="assignment-return"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 12h-4v3l-5-5 5-5v3h4v4z"></path></g><g id="assignment-returned"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h3l-5 5z"></path></g><g id="assignment-turned-in"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-2 14l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></g><g id="attachment"><path d="M7.5 18C4.46 18 2 15.54 2 12.5S4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v1.5H9.5c-.55 0-1 .45-1 1s.45 1 1 1H18c1.38 0 2.5-1.12 2.5-2.5S19.38 8.5 18 8.5H7.5c-2.21 0-4 1.79-4 4s1.79 4 4 4H17V18H7.5z"></path></g><g id="autorenew"><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"></path></g><g id="backspace"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z"></path></g><g id="backup"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path></g><g id="block"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"></path></g><g id="book"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"></path></g><g id="bookmark"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"></path></g><g id="bookmark-outline"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"></path></g><g id="bug-report"><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"></path></g><g id="cached"><path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"></path></g><g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path></g><g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></g><g id="check-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></g><g id="check-box-outline-blank"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g><g id="check-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></g><g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g><g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g><g id="class"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"></path></g><g id="clear"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g><g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g><g id="cloud"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"></path></g><g id="cloud-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z"></path></g><g id="cloud-done"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"></path></g><g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"></path></g><g id="cloud-off"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z"></path></g><g id="cloud-queue"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z"></path></g><g id="cloud-upload"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path></g><g id="content-copy"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></g><g id="content-cut"><path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"></path></g><g id="content-paste"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path></g><g id="create"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></g><g id="credit-card"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"></path></g><g id="dashboard"><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path></g><g id="delete"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"></path></g><g id="description"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"></path></g><g id="dns"><path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g><g id="done"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></g><g id="done-all"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"></path></g><g id="drafts"><path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"></path></g><g id="error"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"></path></g><g id="event"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"></path></g><g id="exit-to-app"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g><g id="expand-less"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"></path></g><g id="expand-more"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"></path></g><g id="explore"><path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"></path></g><g id="extension"><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"></path></g><g id="face"><path d="M14.69 17.1c-.74.58-1.7.9-2.69.9s-1.95-.32-2.69-.9c-.22-.17-.53-.13-.7.09-.17.22-.13.53.09.7.91.72 2.09 1.11 3.3 1.11s2.39-.39 3.31-1.1c.22-.17.26-.48.09-.7-.17-.23-.49-.26-.71-.1z"></path><circle cx="8.5" cy="12.5" r="1"></circle><path d="M12 0C5.37 0 0 5.37 0 12s5.37 12 12 12 12-5.37 12-12S18.63 0 12 0zm7.96 14.82c-1.09 3.74-4.27 6.46-8.04 6.46-3.78 0-6.96-2.72-8.04-6.47-1.19-.11-2.13-1.18-2.13-2.52 0-1.27.85-2.31 1.97-2.5 2.09-1.46 3.8-3.49 4.09-5.05v-.01c1.35 2.63 6.3 5.19 11.83 5.06l.3-.03c1.28 0 2.31 1.14 2.31 2.54 0 1.38-1.02 2.51-2.29 2.52z"></path><circle cx="15.5" cy="12.5" r="1"></circle></g><g id="favorite"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></g><g id="favorite-outline"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"></path></g><g id="file-download"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path></g><g id="file-upload"><path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"></path></g><g id="filter-list"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"></path></g><g id="find-in-page"><path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"></path></g><g id="find-replace"><path d="M11 6c1.38 0 2.63.56 3.54 1.46L12 10h6V4l-2.05 2.05C14.68 4.78 12.93 4 11 4c-3.53 0-6.43 2.61-6.92 6H6.1c.46-2.28 2.48-4 4.9-4zm5.64 9.14c.66-.9 1.12-1.97 1.28-3.14H15.9c-.46 2.28-2.48 4-4.9 4-1.38 0-2.63-.56-3.54-1.46L10 12H4v6l2.05-2.05C7.32 17.22 9.07 18 11 18c1.55 0 2.98-.51 4.14-1.36L20 21.49 21.49 20l-4.85-4.86z"></path></g><g id="flag"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"></path></g><g id="flip-to-back"><path d="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4 12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1.89 2 2 2zm10-4h2v-2h-2v2zm0-4h2V7h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zM5 7H3v12c0 1.1.89 2 2 2h12v-2H5V7zm10-2h2V3h-2v2zm0 12h2v-2h-2v2z"></path></g><g id="flip-to-front"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"></path></g><g id="folder"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"></path></g><g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"></path></g><g id="folder-shared"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z"></path></g><g id="forward"><path d="M12 8V4l8 8-8 8v-4H4V8z"></path></g><g id="fullscreen"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"></path></g><g id="fullscreen-exit"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"></path></g><g id="gesture"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"></path></g><g id="get-app"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path></g><g id="grade"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"></path></g><g id="group-work"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM8 17.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM9.5 8c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8zm6.5 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g><g id="help"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"></path></g><g id="highlight-remove"><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g><g id="history"><path opacity=".9" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></g><g id="home"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"></path></g><g id="https"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></g><g id="inbox"><path d="M19 3H4.99c-1.1 0-1.98.9-1.98 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.34 3-3 3s-3-1.34-3-3H4.99V5H19v10zm-3-5h-2V7h-4v3H8l4 4 4-4z"></path></g><g id="info"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"></path></g><g id="info-outline"><path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"></path></g><g id="input"><path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"></path></g><g id="invert-colors"><path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"></path></g><g id="label"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"></path></g><g id="label-outline"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"></path></g><g id="language"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"></path></g><g id="launch"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></g><g id="link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path></g><g id="list"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"></path></g><g id="lock"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></g><g id="lock-open"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"></path></g><g id="lock-outline"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6-5.1c1.71 0 3.1 1.39 3.1 3.1v2H9V6h-.1c0-1.71 1.39-3.1 3.1-3.1zM18 20H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></g><g id="loyalty"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7zm11.77 8.27L13 19.54l-4.27-4.27C8.28 14.81 8 14.19 8 13.5c0-1.38 1.12-2.5 2.5-2.5.69 0 1.32.28 1.77.74l.73.72.73-.73c.45-.45 1.08-.73 1.77-.73 1.38 0 2.5 1.12 2.5 2.5 0 .69-.28 1.32-.73 1.77z"></path></g><g id="mail"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g><g id="markunread"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g><g id="markunread-mailbox"><path d="M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"></path></g><g id="menu"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></g><g id="more-horiz"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g><g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g><g id="note-add"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"></path></g><g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"></path></g><g id="open-in-new"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></g><g id="open-with"><path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"></path></g><g id="pageview"><path d="M11 8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm8-5H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1.41 16l-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L19 17.59 17.59 19z"></path></g><g id="payment"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"></path></g><g id="perm-camera-mic"><path d="M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v-2.09c-2.83-.48-5-2.94-5-5.91h2c0 2.21 1.79 4 4 4s4-1.79 4-4h2c0 2.97-2.17 5.43-5 5.91V21h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-6 8c0 1.1-.9 2-2 2s-2-.9-2-2V9c0-1.1.9-2 2-2s2 .9 2 2v4z"></path></g><g id="perm-contact-cal"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z"></path></g><g id="perm-data-setting"><path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.49l1.06-.83c.09-.08.12-.21.06-.32l-1-1.73c-.06-.11-.19-.15-.31-.11l-1.24.5c-.26-.2-.54-.37-.85-.49l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.49l-1.24-.5c-.11-.04-.24 0-.31.11l-1 1.73c-.06.11-.04.24.06.32l1.06.83c-.02.16-.03.32-.03.49 0 .17.01.33.03.49l-1.06.83c-.09.08-.12.21-.06.32l1 1.73c.06.11.19.15.31.11l1.24-.5c.26.2.54.37.85.49l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.59-.29.84-.49l1.25.5c.11.04.24 0 .31-.11l1-1.73c.06-.11.03-.24-.06-.32l-1.07-.83zm-3.71 1.01c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g><g id="perm-device-info"><path d="M13 7h-2v2h2V7zm0 4h-2v6h2v-6zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"></path></g><g id="perm-identity"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"></path></g><g id="perm-media"><path d="M2 6H0v5h.01L0 20c0 1.1.9 2 2 2h18v-2H2V6zm20-2h-8l-2-2H6c-1.1 0-1.99.9-1.99 2L4 16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 15l4.5-6 3.5 4.51 2.5-3.01L21 15H7z"></path></g><g id="perm-phone-msg"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM12 3v10l3-3h6V3h-9z"></path></g><g id="perm-scan-wifi"><path d="M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"></path></g><g id="picture-in-picture"><path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"></path></g><g id="polymer"><path d="M19 4h-4L7.11 16.63 4.5 12 9 4H5L.5 12 5 20h4l7.89-12.63L19.5 12 15 20h4l4.5-8z"></path></g><g id="print"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></g><g id="query-builder"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g><g id="question-answer"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"></path></g><g id="radio-button-off"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g><g id="radio-button-on"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g><g id="receipt"><path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"></path></g><g id="redeem"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"></path></g><g id="redo"><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"></path></g><g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></g><g id="remove"><path d="M19 13H5v-2h14v2z"></path></g><g id="remove-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"></path></g><g id="remove-circle-outline"><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g><g id="reorder"><path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"></path></g><g id="reply"><path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"></path></g><g id="reply-all"><path d="M7 8V5l-7 7 7 7v-3l-4-4 4-4zm6 1V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"></path></g><g id="report"><path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"></path></g><g id="report-problem"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g><g id="restore"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></g><g id="room"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g><g id="save"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"></path></g><g id="schedule"><path fill-opacity=".9" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g><g id="search"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></g><g id="select-all"><path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"></path></g><g id="send"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"></path></g><g id="settings"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></g><g id="settings-applications"><path d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"></path></g><g id="settings-backup-restore"><path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"></path></g><g id="settings-bluetooth"><path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 3.83l1.88 1.88L13 7.59V3.83zm1.88 10.46L13 16.17v-3.76l1.88 1.88z"></path></g><g id="settings-cell"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM16 .01L8 0C6.9 0 6 .9 6 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V2c0-1.1-.9-1.99-2-1.99zM16 16H8V4h8v12z"></path></g><g id="settings-display"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5V16zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3V9z"></path></g><g id="settings-ethernet"><path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z"></path></g><g id="settings-input-antenna"><path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.62 9.5 12c0 1.02.62 1.9 1.5 2.29v3.3L7.59 21 9 22.41l3-3 3 3L16.41 21 13 17.59v-3.3zM12 1C5.93 1 1 5.93 1 12h2c0-4.97 4.03-9 9-9s9 4.03 9 9h2c0-6.07-4.93-11-11-11z"></path></g><g id="settings-input-component"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"></path></g><g id="settings-input-composite"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"></path></g><g id="settings-input-hdmi"><path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"></path></g><g id="settings-input-svideo"><path d="M8 11.5c0-.83-.67-1.5-1.5-1.5S5 10.67 5 11.5 5.67 13 6.5 13 8 12.33 8 11.5zm7-5c0-.83-.67-1.5-1.5-1.5h-3C9.67 5 9 5.67 9 6.5S9.67 8 10.5 8h3c.83 0 1.5-.67 1.5-1.5zM8.5 15c-.83 0-1.5.67-1.5 1.5S7.67 18 8.5 18s1.5-.67 1.5-1.5S9.33 15 8.5 15zM12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm0 20c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9-4.04 9-9 9zm5.5-11c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm-2 5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path></g><g id="settings-overscan"><path d="M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"></path></g><g id="settings-phone"><path d="M13 9h-2v2h2V9zm4 0h-2v2h2V9zm3 6.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 9v2h2V9h-2z"></path></g><g id="settings-power"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-5.12L7.44 4.44C5.36 5.88 4 8.28 4 11c0 4.42 3.58 8 8 8s8-3.58 8-8c0-2.72-1.36-5.12-3.44-6.56zM15 24h2v-2h-2v2z"></path></g><g id="settings-remote"><path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05zM12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0z"></path></g><g id="settings-voice"><path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3-2.54 5.1-5.3 5.1S6.7 13 6.7 10H5c0 3.41 2.72 6.23 6 6.72V20h2v-3.28c3.28-.49 6-3.31 6-6.72z"></path></g><g id="shop"><path d="M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z"></path></g><g id="shop-two"><path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4v2h-4V3zm0 12V8l5.5 3-5.5 4z"></path></g><g id="shopping-basket"><path d="M17.21 9l-4.38-6.56c-.19-.28-.51-.42-.83-.42-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g><g id="shopping-cart"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"></path></g><g id="sort"><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"></path></g><g id="speaker-notes"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z"></path></g><g id="spellcheck"><path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"></path></g><g id="star"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"></path></g><g id="star-half"><path d="M22 9.74l-7.19-.62L12 2.5 9.19 9.13 2 9.74l5.46 4.73-1.64 7.03L12 17.77l6.18 3.73-1.63-7.03L22 9.74zM12 15.9V6.6l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.9z"></path></g><g id="star-outline"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"></path></g><g id="star-rate"><path d="M12 14.3l3.71 2.7-1.42-4.36L18 10h-4.55L12 5.5 10.55 10H6l3.71 2.64L8.29 17z"></path></g><g id="stars"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z"></path></g><g id="store"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"></path></g><g id="subject"><path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"></path></g><g id="supervisor-account"><path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"></path></g><g id="swap-horiz"><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"></path></g><g id="swap-vert"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"></path></g><g id="swap-vert-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM6.5 9L10 5.5 13.5 9H11v4H9V9H6.5zm11 6L14 18.5 10.5 15H13v-4h2v4h2.5z"></path></g><g id="system-update-tv"><path d="M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z"></path></g><g id="tab"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h10v4h8v10z"></path></g><g id="tab-unselected"><path d="M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"></path></g><g id="text-format"><path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"></path></g><g id="theaters"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"></path></g><g id="thumb-down"><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"></path></g><g id="thumb-up"><path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z"></path></g><g id="thumbs-up-down"><path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z"></path></g><g id="toc"><path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"></path></g><g id="today"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"></path></g><g id="track-changes"><path fill="#231F20" d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"></path></g><g id="translate"><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></g><g id="trending-down"><path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"></path></g><g id="trending-neutral"><path d="M22 12l-4-4v3H3v2h15v3z"></path></g><g id="trending-up"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"></path></g><g id="turned-in"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"></path></g><g id="turned-in-not"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"></path></g><g id="undo"><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></g><g id="unfold-less"><path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"></path></g><g id="unfold-more"><path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"></path></g><g id="verified-user"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></g><g id="view-agenda"><path d="M20 13H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zm0-10H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"></path></g><g id="view-array"><path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"></path></g><g id="view-carousel"><path d="M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"></path></g><g id="view-column"><path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"></path></g><g id="view-day"><path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"></path></g><g id="view-headline"><path d="M4 15h17v-2H4v2zm0 4h17v-2H4v2zm0-8h17V9H4v2zm0-6v2h17V5H4z"></path></g><g id="view-list"><path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"></path></g><g id="view-module"><path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"></path></g><g id="view-quilt"><path d="M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z"></path></g><g id="view-stream"><path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"></path></g><g id="view-week"><path d="M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"></path></g><g id="visibility"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g><g id="visibility-off"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"></path></g><g id="wallet-giftcard"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"></path></g><g id="wallet-membership"><path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"></path></g><g id="wallet-travel"><path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H4v-2h16v2zm0-5H4V8h3v2h2V8h6v2h2V8h3v6z"></path></g><g id="warning"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g><g id="work"><path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"></path></g></defs></svg></core-iconset-svg><polymer-element name="core-icon-button" attributes="src icon active" assetpath="../core-icon-button/"><template><style>:host { display: inline-block; box-sizing: border-box; -moz-box-sizing: border-box; user-select: none; -moz-user-select: none; -webkit-user-select: none; border-radius: 2px; padding: 7px; margin: 2px; vertical-align: middle; font-size: 1rem; cursor: pointer;}:host([disabled]) { opacity: 0.6; pointer-events: none;}:host(.outline) { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);}:host(:hover:not([disabled])) { box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1);}:host(.selected:not([disabled])) { background-color: rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.12);}:host(:active:not([disabled]), .selected:active:not([disabled])) { background-color: rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.12);}:host(.core-dark-theme.outline) { background-color: rgba(200, 200, 200, 0.05); box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.1);}:host(.core-dark-theme:hover) { background-color: rgba(200, 200, 200, 0.05); box-shadow: 0 1px 0 0 rgba(200, 200, 200, 0.12), 0 0 0 1px rgba(200, 200, 200, 0.1);}:host(.core-dark-theme.selected) { background-color: rgba(220, 220, 220, 0.05); box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.05), 0 0 0 1px rgba(200, 200, 200, 0.12);}:host(.core-dark-theme:active, .core-dark-theme.selected:active) { background-color: rgba(200, 200, 200, 0.05); box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.1), 0 0 0 1px rgba(200, 200, 200, 0.12);}core-icon { pointer-events: none;}:host ::content > :not(core-icon) { margin-left: 4px;}</style><core-icon src="{{src}}" icon="{{icon}}"></core-icon><content></content></template><script>Polymer("core-icon-button",{src:"",active:false,icon:"",activeChanged:function(){this.classList.toggle("selected",this.active)}});</script></polymer-element><polymer-element name="core-toolbar" attributes="justify middleJustify bottomJustify" assetpath="../core-toolbar/"><template><style>:host { display: block; position: relative; box-sizing: border-box; -moz-box-sizing: border-box; height: 64px; font-size: 1.3em; background-color: #CFD8DC;}:host(.animate) { transition: height 0.18s ease-in;}:host(.medium-tall) { height: 128px;}:host(.tall) { height: 192px;}.toolbar-tools { position: relative; height: 64px; padding: 0 8px; pointer-events: none;}:host(.core-narrow),:host-context(.core-narrow) { height: 56px;}polyfill-next-selector { content: ':host.core-narrow.medium-tall, .core-narrow :host.medium-tall'; }:host(.core-narrow.medium-tall),:host-context(.core-narrow):host(.medium-tall) { height: 112px;}polyfill-next-selector { content: ':host.core-narrow.tall, .core-narrow :host.tall'; }:host(.core-narrow.tall),:host-context(.core-narrow):host(.tall) { height: 168px;}polyfill-next-selector { content: ':host.core-narrow .toolbar-tools, .core-narrow :host .toolbar-tools'; }:host(.core-narrow) .toolbar-tools,:host-context(.core-narrow) .toolbar-tools { height: 56px; padding: 0;}#middleBar { position: absolute; top: 0; right: 0; left: 0;}:host(.tall, .medium-tall) #middleBar { -webkit-transform: translateY(100%); transform: translateY(100%);}#bottomBar { position: absolute; right: 0; bottom: 0; left: 0;}polyfill-next-selector { content: '.toolbar-tools > *:not([disabled])'; }::content > *:not([disabled]) { pointer-events: auto;}polyfill-next-selector { content: '.toolbar-tools > *'; }::content > * { margin: 0 8px;}polyfill-next-selector { content: '.toolbar-tools > .fit'; }::content > .fit { position: absolute; top: auto; right: 0; bottom: 0; left: 0; width: auto; margin: 0;}polyfill-next-selector { content: ':host .indent'; }::content > .indent { margin-left: 60px;}</style><div id="bottomBar" class="toolbar-tools" center="" horizontal="" layout=""><content select=".bottom"></content></div><div id="middleBar" class="toolbar-tools" center="" horizontal="" layout=""><content select=".middle"></content></div><div id="topBar" class="toolbar-tools" center="" horizontal="" layout=""><content></content></div></template><script>(function(){Polymer("core-toolbar",{justify:"",middleJustify:"",bottomJustify:"",justifyChanged:function(old){this.updateBarJustify(this.$.topBar,this.justify,old)},middleJustifyChanged:function(old){this.updateBarJustify(this.$.middleBar,this.middleJustify,old)},bottomJustifyChanged:function(old){this.updateBarJustify(this.$.bottomBar,this.bottomJustify,old)},updateBarJustify:function(bar,justify,old){if(old){bar.removeAttribute(this.toLayoutAttrName(old))}if(justify){bar.setAttribute(this.toLayoutAttrName(justify),"")}},toLayoutAttrName:function(value){return value==="between"?"justified":value+"-justified"}})})();</script></polymer-element><polymer-element name="core-header-panel" assetpath="../core-header-panel/"><template><style>:host { display: block; position: relative;}#outerContainer { position: absolute; top: 0; right: 0; bottom: 0; left: 0;}#mainPanel { position: relative;}#mainContainer { position: relative; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;}#dropShadow { position: absolute; top: 0; left: 0; right: 0; height: 6px; box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);}#dropShadow.hidden { display: none;}:host([mode=scroll]) #mainContainer { overflow: visible;}:host([mode=scroll]) #outerContainer { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;}:host([mode=cover]) #mainPanel { position: static;}:host([mode=cover]) #mainContainer { position: absolute; top: 0; right: 0; bottom: 0; left: 0;}:host([mode=cover]) #dropShadow { position: static; width: 100%;}</style><div id="outerContainer" vertical="" layout=""><content id="headerContent" select="core-toolbar, .core-header"></content><div id="mainPanel" flex="" vertical="" layout=""><div id="mainContainer" flex?="{{mode !== 'cover'}}"><content id="mainContent" select="*"></content></div><div id="dropShadow"></div></div></div></template><script>Polymer("core-header-panel",{publish:{mode:{value:"",reflect:true},tallClass:"tall",shadow:false},animateDuration:200,modeConfigs:{shadowMode:{waterfall:1,"waterfall-tall":1},noShadow:{seamed:1,cover:1,scroll:1},tallMode:{"waterfall-tall":1},outerScroll:{scroll:1}},ready:function(){this.scrollHandler=this.scroll.bind(this);this.addListener()},detached:function(){this.removeListener(this.mode)},addListener:function(){this.scroller.addEventListener("scroll",this.scrollHandler)},removeListener:function(mode){var s=this.getScrollerForMode(mode);s.removeEventListener("scroll",this.scrollHandler)},domReady:function(){this.async("scroll")},modeChanged:function(old){var configs=this.modeConfigs;var header=this.header;if(header){if(configs.tallMode[old]&&!configs.tallMode[this.mode]){header.classList.remove(this.tallClass);this.async(function(){header.classList.remove("animate")},null,this.animateDuration)}else{header.classList.toggle("animate",configs.tallMode[this.mode])}}if(configs&&(configs.outerScroll[this.mode]||configs.outerScroll[old])){this.removeListener(old);this.addListener()}this.scroll()},get header(){return this.$.headerContent.getDistributedNodes()[0]},getScrollerForMode:function(mode){return this.modeConfigs.outerScroll[mode]?this.$.outerContainer:this.$.mainContainer},get scroller(){return this.getScrollerForMode(this.mode)},scroll:function(){var configs=this.modeConfigs;var main=this.$.mainContainer;var header=this.header;var sTop=main.scrollTop;var atTop=sTop===0;this.$.dropShadow.classList.toggle("hidden",!this.shadow&&(atTop&&configs.shadowMode[this.mode]||configs.noShadow[this.mode]));if(header&&configs.tallMode[this.mode]){header.classList.toggle(this.tallClass,atTop||header.classList.contains(this.tallClass)&&main.scrollHeight<this.$.outerContainer.offsetHeight)}this.fire("scroll",{target:this.scroller},this,false)}});</script></polymer-element><polymer-element name="marked-element" attributes="text" assetpath="../marked-element/"><script>Polymer("marked-element",{text:"",attached:function(){marked.setOptions({highlight:this.highlight.bind(this)});if(!this.text){this.text=this.innerHTML}},textChanged:function(oldVal,newVal){if(newVal){this.innerHTML=marked(this.text)}},highlight:function(code,lang){var event=this.fire("marked-js-highlight",{code:code,lang:lang});return event.detail.code||code}});</script></polymer-element><polymer-element name="core-xhr" hidden="" assetpath="../core-ajax/"><script>Polymer("core-xhr",{request:function(options){var xhr=new XMLHttpRequest;var url=options.url;var method=options.method||"GET";var async=!options.sync;var params=this.toQueryString(options.params);if(params&&method.toUpperCase()=="GET"){url+=(url.indexOf("?")>0?"&":"?")+params}var xhrParams=this.isBodyMethod(method)?options.body||params:null;xhr.open(method,url,async);if(options.responseType){xhr.responseType=options.responseType}if(options.withCredentials){xhr.withCredentials=true}this.makeReadyStateHandler(xhr,options.callback);this.setRequestHeaders(xhr,options.headers);xhr.send(xhrParams);if(!async){xhr.onreadystatechange(xhr)}return xhr},toQueryString:function(params){var r=[];for(var n in params){var v=params[n];n=encodeURIComponent(n);r.push(v==null?n:n+"="+encodeURIComponent(v))}return r.join("&")},isBodyMethod:function(method){return this.bodyMethods[(method||"").toUpperCase()]},bodyMethods:{POST:1,PUT:1,PATCH:1,DELETE:1},makeReadyStateHandler:function(xhr,callback){xhr.onreadystatechange=function(){if(xhr.readyState==4){callback&&callback.call(null,xhr.response,xhr)}}},setRequestHeaders:function(xhr,headers){if(headers){for(var name in headers){xhr.setRequestHeader(name,headers[name])}}}});</script></polymer-element><polymer-element name="core-ajax" hidden="" attributes="url handleAs auto params response error method headers body contentType withCredentials progress loading" assetpath="../core-ajax/"><script>Polymer("core-ajax",{url:"",handleAs:"",auto:false,params:"",response:null,error:null,loading:false,progress:null,method:"",headers:null,body:null,contentType:"application/x-www-form-urlencoded",withCredentials:false,xhrArgs:null,created:function(){this.progress={}},ready:function(){this.xhr=document.createElement("core-xhr")},receive:function(response,xhr){if(this.isSuccess(xhr)){this.processResponse(xhr)}else{this.processError(xhr)}this.complete(xhr)},isSuccess:function(xhr){var status=xhr.status||0;return status>=200&&status<300},processResponse:function(xhr){var response=this.evalResponse(xhr);if(xhr===this.activeRequest){this.response=response}this.fire("core-response",{response:response,xhr:xhr})},processError:function(xhr){var response=this.evalResponse(xhr);var error={statusCode:xhr.status,response:response};if(xhr===this.activeRequest){this.error=error}this.fire("core-error",{response:error,xhr:xhr})},processProgress:function(progress,xhr){if(xhr!==this.activeRequest){return}var progressProxy={lengthComputable:progress.lengthComputable,loaded:progress.loaded,total:progress.total};this.progress=progressProxy},complete:function(xhr){if(xhr===this.activeRequest){this.loading=false}this.fire("core-complete",{response:xhr.status,xhr:xhr})},evalResponse:function(xhr){return this[(this.handleAs||"text")+"Handler"](xhr)},xmlHandler:function(xhr){return xhr.responseXML},textHandler:function(xhr){return xhr.responseText},jsonHandler:function(xhr){var r=xhr.responseText;try{return JSON.parse(r)}catch(x){console.warn("core-ajax caught an exception trying to parse response as JSON:");console.warn("url:",this.url);console.warn(x);return r}},documentHandler:function(xhr){return xhr.response},blobHandler:function(xhr){return xhr.response},arraybufferHandler:function(xhr){return xhr.response},urlChanged:function(){if(!this.handleAs){var ext=String(this.url).split(".").pop();switch(ext){case"json":this.handleAs="json";break}}this.autoGo()},paramsChanged:function(){this.autoGo()},bodyChanged:function(){this.autoGo()},autoChanged:function(){this.autoGo()},autoGo:function(){if(this.auto){this.goJob=this.job(this.goJob,this.go,0)}},getParams:function(params){params=this.params||params;if(params&&typeof params=="string"){params=JSON.parse(params)}return params},go:function(){var args=this.xhrArgs||{};args.body=this.body||args.body;args.params=this.getParams(args.params);args.headers=this.headers||args.headers||{};if(args.headers&&typeof args.headers=="string"){args.headers=JSON.parse(args.headers)}var hasContentType=Object.keys(args.headers).some(function(header){return header.toLowerCase()==="content-type"});if(args.body instanceof FormData){delete args.headers["Content-Type"]}else if(!hasContentType&&this.contentType){args.headers["Content-Type"]=this.contentType}if(this.handleAs==="arraybuffer"||this.handleAs==="blob"||this.handleAs==="document"){args.responseType=this.handleAs}args.withCredentials=this.withCredentials;args.callback=this.receive.bind(this);args.url=this.url;args.method=this.method;this.response=this.error=this.progress=null;this.activeRequest=args.url&&this.xhr.request(args);if(this.activeRequest){this.loading=true;var activeRequest=this.activeRequest;if("onprogress"in activeRequest){this.activeRequest.addEventListener("progress",function(progress){this.processProgress(progress,activeRequest)}.bind(this),false)}else{this.progress={lengthComputable:false}}}return this.activeRequest},abort:function(){if(!this.activeRequest)return;this.activeRequest.abort();this.activeRequest=null;this.progress={};this.loading=false}});</script></polymer-element><polymer-element name="context-free-parser" attributes="url text data" assetpath="../context-free-parser/"><template><core-ajax url="{{url}}" response="{{text}}" auto=""></core-ajax></template><script>Polymer("context-free-parser",{text:null,textChanged:function(){if(this.text){var entities=ContextFreeParser.parse(this.text);if(!entities||entities.length===0){entities=[{name:this.url.split("/").pop(),description:"**Undocumented**"}]}this.data={classes:entities}}},dataChanged:function(){this.fire("data-ready")}});</script></polymer-element><polymer-element name="core-doc-page" attributes="data" relative="" assetpath="../core-doc-viewer/elements/"><template><style>:host { display: block; font-family: Roboto;}#info > * { margin-right: 20px;}core-icon { margin-right: 5px;}.main { padding: 0 72px; max-width: 832px; margin: 0 auto;}marked-element { display: block;}h1 { color: #E91E63; font-size: 52px; line-height: 60px; font-weight: 300;}h3 { font-weight: 500;}.box { margin-bottom: 40px;}.box:not(.top) .details { padding: 16px;}.box:not(.top) .details .params { margin-top: 40px;}.params > p:first-child { text-decoration: underline;}.box:not(.top) h3 { padding: 16px; color: white; font-weight: inherit; font-size: 20px; line-height: 48px; margin: 0;}.box:not(.top) pre { padding: initial; background-color: transparent; margin: initial; font-size: 12px;}.box code { color: currentcolor; font-weight: 500;}.inheritance { border-bottom: 1px solid #eee; border-top: 1px solid #eee; padding: 16px 0;}.inheritance h3 { margin: 0 10px 0 0;}.inheritance .top > * { margin-right: 7px;}.top b,.top strong { text-transform: uppercase; font-size: 14px;}.top pre { background-color: rgb(250, 250, 250); padding: 16px;}pre { max-width: 832px; white-space: pre-wrap; overflow: hidden; border: none;}.attribute-box .details { background-color: #ffcbbb; border-bottom: 1px solid rgba(255, 86, 33, 0.5);}.attribute-box h3 { background-color: #ff5621;}.property-box .details { background-color: #fbe7b1; border-bottom: 1px solid rgba(243, 179, 0, 0.5);}.property-box h3 { background-color: #f3b300;}.method-box .details { background-color: #a6ffea; border-bottom: 1px solid rgba(0, 190, 164, 0.5);}.method-box h3 { background-color: #00bea4;}.event-box .details { background-color: #c5d9fb; border-bottom: 1px solid rgba(65, 132, 243, 0.5);}.event-box h3 { background-color: #4184f3;}.badge { color: currentcolor;}code, pre { color: #9f499b; font-family: "Source Code Pro",Monaco,Menlo,Consolas,"Courier New",monospace;}pre .typ,pre .inline,.prettyprint .typ,.prettyprint .inline { color: #6b499f}pre .pun,.prettyprint .pun { color: #5c6bc0}pre .str,pre .string,.prettyprint .str,.prettyprint .string { color: #ff4081}pre .pln,.prettyprint .pln { color: #7986cb}pre .kwd,.prettyprint .kwd { color: #d61a7f}pre .atn,pre .attribute-name,.prettyprint .atn,.prettyprint .attribute-name { color: #6b499f}pre .atv,pre .attribute-value,.prettyprint .atv,.prettyprint .attribute-value { color: #7986cb}pre .com,pre .comment,.prettyprint .com,.prettyprint .comment { color: #8a8a8a}</style><core-header-panel id="panel" mode="waterfall" fit=""><div class="main" on-marked-js-highlight="{{hilight}}"><h1>{{data.name}}</h1><p id="info" layout="" horizontal="" center=""><span layout="" horizontal="" center=""><core-icon icon="home"></core-icon><a href="{{data | homepageFilter}}">Home Page</a></span><span layout="" horizontal="" center="" hidden?="{{!data.version}}"><core-icon icon="info-outline"></core-icon>Version: {{data.version}}</span></p><template bind="{{data as data}}" if="{{data.extends || data.mixins}}"><div class="inheritance"><template if="{{data.extends}}"><section class="top extends" layout="" horizontal="" center=""><h3 id="{{data.name}}.extends">Extends:</h3><template repeat="{{e, i in data.extends}}"><div><template if="{{e.url}}"><a href="{{e.url}}">{{e.name}}</a></template><template if="{{!e.url}}"><a href="#{{e.name}}">{{e.name}}</a></template><span hidden?="{{i == data.extends.length - 1}}">,</span></div></template></section></template><template if="{{data.mixins}}"><section class="top mixins" layout="" horizontal="" center=""><h3 id="{{data.name}}.mixins">Mixins:</h3><template repeat="{{e, i in data.mixins}}"><div><template if="{{e.url}}"><a href="{{e.url ? e.url : e.name}}">{{e.name}}</a></template><template if="{{!e.url}}"><span>{{e.name}}</span></template><span hidden?="{{i == data.mixins.length - 1}}">,</span></div></template></section></template></div></template><template if="{{data.description}}"><section class="box top"><h3 id="{{data.name}}.summary">Summary</h3><marked-element text="{{data.description}}"></marked-element></section></template><template if="{{data.attributes.length}}"><section class="box attribute-box"><h3 id="{{data.name}}.attributes">Attributes</h3><template repeat="{{attribute in data.attributes}}"><div class="details" horizontal="" layout=""><div class="details-name" flex="" id="{{data.name}}.attributes.{{attribute.name}}"><p><code>{{attribute.name}}</code></p></div><div class="details-info" flex="" three=""><p layout="" horizontal="" center="" justified=""><code>&lt;<em>{{attribute.type}}</em>&gt;</code><span class="default" hidden?="{{!attribute.default}}">default: <code>{{attribute.default}}</code></span></p><marked-element text="{{attribute.description}}"></marked-element></div></div></template></section></template><template if="{{data.properties.length}}"><section class="box property-box"><h3 id="{{data.name}}.properties">Properties</h3><template repeat="{{property in data.properties}}"><div class="details" horizontal="" layout=""><div class="details-name" flex="" id="{{data.name}}.properties.{{property.name}}"><p><code>{{property.name}}</code></p></div><div class="details-info" flex="" three=""><p layout="" horizontal="" center="" justified=""><code>&lt;<em>{{property.type}}</em>&gt;</code><span class="default" hidden?="{{!property.default}}">default: <code>{{property.default}}</code></span></p><marked-element text="{{property.description}}"></marked-element></div></div></template></section></template><template if="{{data.events.length}}"><section class="box event-box"><h3 id="{{data.name}}.events">Events</h3><template repeat="{{event in data.events}}"><div class="details" horizontal="" layout=""><div class="details-name" flex="" id="{{data.name}}.events.{{event.name}}"><p><code>{{event.name}}</code></p></div><div class="details-info" flex="" three=""><marked-element text="{{event.description}}"></marked-element><template if="{{event.params.length}}"><div class="params"><p>Event details:</p><template repeat="{{param in event.params}}"><p><code>&lt;<em>{{param.type}}</em>&gt; {{param.name}}</code></p><p><span>{{param.description}}</span></p></template></div></template></div></div></template></section></template><template if="{{data.methods.length}}"><section class="box method-box"><h3 id="{{data.name}}.methods">Methods</h3><template repeat="{{method in data.methods}}"><div class="details" horizontal="" layout=""><div class="details-name" flex="" id="{{data.name}}.methods.{{method.name}}"><p><code>{{method.name}}</code></p></div><div class="details-info" flex="" three=""><marked-element text="{{method.description}}"></marked-element><template if="{{method.params.length}}"><div class="params"><p>Method parameters:</p><template repeat="{{param in method.params}}"><p><code>&lt;<em>{{param.type}}</em>&gt; {{param.name}}</code></p><p><span>{{param.description}}</span></p></template></div></template><template if="{{method.return}}"><div class="params"><p>Returns:</p><p><code>&lt;<em>{{method.return.type}}</em>&gt;</code></p><p><span>{{method.return.description}}</span></p></div></template></div></div></template></section></template></div></core-header-panel></template><script>Polymer("core-doc-page",{hilight:function(event,detail,sender){detail.code=prettyPrintOne((detail.code||"").replace(/</g,"&lt;").replace(/>/g,"&gt;"))},homepageFilter:function(data){if(!data){return""}if(!data.homepage||data.homepage==="github.io"){return"//polymer.github.io/"+data.name}else{return data.homepage}},dataChanged:function(){this.async(function(){var elementToFocus=this.shadowRoot.getElementById(window.location.hash.slice(1));if(elementToFocus){elementToFocus.scrollIntoView()}else{var viewer=this.$.panel.scroller;viewer.scrollTop=0;viewer.scrollLeft=0}})}});</script></polymer-element><polymer-element name="core-selection" attributes="multi" hidden="" assetpath="../core-selection/"><script>Polymer("core-selection",{multi:false,ready:function(){this.clear()},clear:function(){this.selection=[]},getSelection:function(){return this.multi?this.selection:this.selection[0]},isSelected:function(item){return this.selection.indexOf(item)>=0},setItemSelected:function(item,isSelected){if(item!==undefined&&item!==null){if(isSelected){this.selection.push(item)}else{var i=this.selection.indexOf(item);if(i>=0){this.selection.splice(i,1)}}this.fire("core-select",{isSelected:isSelected,item:item})}},select:function(item){if(this.multi){this.toggle(item)}else if(this.getSelection()!==item){this.setItemSelected(this.getSelection(),false);this.setItemSelected(item,true)}},toggle:function(item){this.setItemSelected(item,!this.isSelected(item))}});</script></polymer-element><polymer-element name="core-selector" attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap excludedLocalNames target itemsSelector activateEvent" assetpath="../core-selector/"><template><core-selection id="selection" multi="{{multi}}" on-core-select="{{selectionSelect}}"></core-selection><content id="items" select="*"></content></template><script>Polymer("core-selector",{selected:null,multi:false,valueattr:"name",selectedClass:"core-selected",selectedProperty:"",selectedAttribute:"active",selectedItem:null,selectedModel:null,selectedIndex:-1,excludedLocalNames:"",target:null,itemsSelector:"",activateEvent:"tap",notap:false,defaultExcludedLocalNames:"template",observe:{"selected multi":"selectedChanged"},ready:function(){this.activateListener=this.activateHandler.bind(this);this.itemFilter=this.filterItem.bind(this);this.excludedLocalNamesChanged();this.observer=new MutationObserver(this.updateSelected.bind(this));if(!this.target){this.target=this}},get items(){if(!this.target){return[]}var nodes=this.target!==this?this.itemsSelector?this.target.querySelectorAll(this.itemsSelector):this.target.children:this.$.items.getDistributedNodes();return Array.prototype.filter.call(nodes,this.itemFilter)},filterItem:function(node){return!this._excludedNames[node.localName]},excludedLocalNamesChanged:function(){this._excludedNames={};var s=this.defaultExcludedLocalNames;if(this.excludedLocalNames){s+=" "+this.excludedLocalNames}s.split(/\s+/g).forEach(function(n){this._excludedNames[n]=1},this)},targetChanged:function(old){if(old){this.removeListener(old);this.observer.disconnect();this.clearSelection()}if(this.target){this.addListener(this.target);this.observer.observe(this.target,{childList:true});this.updateSelected()}},addListener:function(node){Polymer.addEventListener(node,this.activateEvent,this.activateListener)},removeListener:function(node){Polymer.removeEventListener(node,this.activateEvent,this.activateListener)},get selection(){return this.$.selection.getSelection()},selectedChanged:function(){if(arguments.length===1){this.processSplices(arguments[0])}else{this.updateSelected()}},updateSelected:function(){this.validateSelected();if(this.multi){this.clearSelection(this.selected);this.selected&&this.selected.forEach(function(s){this.setValueSelected(s,true)},this)}else{this.valueToSelection(this.selected)}},validateSelected:function(){if(this.multi&&!Array.isArray(this.selected)&&this.selected!=null){this.selected=[this.selected]}else if(!this.multi&&Array.isArray(this.selected)){var s=this.selected[0];this.clearSelection([s]);this.selected=s}},processSplices:function(splices){for(var i=0,splice;splice=splices[i];i++){for(var j=0;j<splice.removed.length;j++){this.setValueSelected(splice.removed[j],false)}for(var j=0;j<splice.addedCount;j++){this.setValueSelected(this.selected[splice.index+j],true)}}},clearSelection:function(excludes){this.$.selection.selection.slice().forEach(function(item){var v=this.valueForNode(item)||this.items.indexOf(item);if(!excludes||excludes.indexOf(v)<0){this.$.selection.setItemSelected(item,false)}},this)},valueToSelection:function(value){var item=this.valueToItem(value);this.$.selection.select(item)},setValueSelected:function(value,isSelected){var item=this.valueToItem(value);if(isSelected^this.$.selection.isSelected(item)){this.$.selection.setItemSelected(item,isSelected)}},updateSelectedItem:function(){this.selectedItem=this.selection},selectedItemChanged:function(){if(this.selectedItem){var t=this.selectedItem.templateInstance;this.selectedModel=t?t.model:undefined}else{this.selectedModel=null}this.selectedIndex=this.selectedItem?parseInt(this.valueToIndex(this.selected)):-1},valueToItem:function(value){return value===null||value===undefined?null:this.items[this.valueToIndex(value)]},valueToIndex:function(value){for(var i=0,items=this.items,c;c=items[i];i++){if(this.valueForNode(c)==value){return i}}return value},valueForNode:function(node){return node[this.valueattr]||node.getAttribute(this.valueattr)},selectionSelect:function(e,detail){this.updateSelectedItem();if(detail.item){this.applySelection(detail.item,detail.isSelected)}},applySelection:function(item,isSelected){if(this.selectedClass){item.classList.toggle(this.selectedClass,isSelected)}if(this.selectedProperty){item[this.selectedProperty]=isSelected}if(this.selectedAttribute&&item.setAttribute){if(isSelected){item.setAttribute(this.selectedAttribute,"")}else{item.removeAttribute(this.selectedAttribute)}}},activateHandler:function(e){if(!this.notap){var i=this.findDistributedTarget(e.target,this.items);if(i>=0){var item=this.items[i];var s=this.valueForNode(item)||i;if(this.multi){if(this.selected){this.addRemoveSelected(s)}else{this.selected=[s]}}else{this.selected=s}this.asyncFire("core-activate",{item:item})}}},addRemoveSelected:function(value){var i=this.selected.indexOf(value);if(i>=0){this.selected.splice(i,1)}else{this.selected.push(value)}},findDistributedTarget:function(target,nodes){while(target&&target!=this){var i=Array.prototype.indexOf.call(nodes,target);if(i>=0){return i}target=target.parentNode}},selectIndex:function(index){var item=this.items[index];if(item){this.selected=this.valueForNode(item)||index;return item}},selectPrevious:function(wrapped){var i=wrapped&&!this.selectedIndex?this.items.length-1:this.selectedIndex-1;return this.selectIndex(i)},selectNext:function(wrapped){var i=wrapped&&this.selectedIndex>=this.items.length-1?0:this.selectedIndex+1;return this.selectIndex(i)}});</script></polymer-element><polymer-element name="core-a11y-keys" assetpath="../core-a11y-keys/"><script>(function(){var KEY_IDENTIFIER={"U+0009":"tab","U+001B":"esc","U+0020":"space","U+002A":"*","U+0030":"0","U+0031":"1","U+0032":"2","U+0033":"3","U+0034":"4","U+0035":"5","U+0036":"6","U+0037":"7","U+0038":"8","U+0039":"9","U+0041":"a","U+0042":"b","U+0043":"c","U+0044":"d","U+0045":"e","U+0046":"f","U+0047":"g","U+0048":"h","U+0049":"i","U+004A":"j","U+004B":"k","U+004C":"l","U+004D":"m","U+004E":"n","U+004F":"o","U+0050":"p","U+0051":"q","U+0052":"r","U+0053":"s","U+0054":"t","U+0055":"u","U+0056":"v","U+0057":"w","U+0058":"x","U+0059":"y","U+005A":"z","U+007F":"del"};var KEY_CODE={9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"};var KEY_CHAR=/[a-z0-9*]/;function transformKey(key){var validKey="";if(key){var lKey=key.toLowerCase();if(lKey.length==1){if(KEY_CHAR.test(lKey)){validKey=lKey}}else if(lKey=="multiply"){validKey="*"}else{validKey=lKey}}return validKey}var IDENT_CHAR=/U\+/;function transformKeyIdentifier(keyIdent){var validKey="";if(keyIdent){if(IDENT_CHAR.test(keyIdent)){validKey=KEY_IDENTIFIER[keyIdent]}else{validKey=keyIdent.toLowerCase()}}return validKey}function transformKeyCode(keyCode){var validKey="";if(Number(keyCode)){if(keyCode>=65&&keyCode<=90){validKey=String.fromCharCode(32+keyCode)}else if(keyCode>=112&&keyCode<=123){validKey="f"+(keyCode-112)}else if(keyCode>=48&&keyCode<=57){validKey=String(48-keyCode)}else if(keyCode>=96&&keyCode<=105){validKey=String(96-keyCode)}else{validKey=KEY_CODE[keyCode]}}return validKey}function keyboardEventToKey(ev){var normalizedKey=transformKey(ev.key)||transformKeyIdentifier(ev.keyIdentifier)||transformKeyCode(ev.keyCode)||transformKey(ev.detail.key)||"";return{shift:ev.shiftKey,ctrl:ev.ctrlKey,meta:ev.metaKey,alt:ev.altKey,key:normalizedKey}}function stringToKey(keyCombo){var keys=keyCombo.split("+");var keyObj=Object.create(null);keys.forEach(function(key){if(key=="shift"){keyObj.shift=true}else if(key=="ctrl"){keyObj.ctrl=true}else if(key=="alt"){keyObj.alt=true}else{keyObj.key=key}});return keyObj}function keyMatches(a,b){return Boolean(a.alt)==Boolean(b.alt)&&Boolean(a.ctrl)==Boolean(b.ctrl)&&Boolean(a.shift)==Boolean(b.shift)&&a.key===b.key}function processKeys(ev){var current=keyboardEventToKey(ev);for(var i=0,dk;i<this._desiredKeys.length;i++){dk=this._desiredKeys[i];if(keyMatches(dk,current)){ev.preventDefault();ev.stopPropagation();this.fire("keys-pressed",current,this,false);break}}}function listen(node,handler){if(node&&node.addEventListener){node.addEventListener("keydown",handler)}}function unlisten(node,handler){if(node&&node.removeEventListener){node.removeEventListener("keydown",handler)}}Polymer("core-a11y-keys",{created:function(){this._keyHandler=processKeys.bind(this)},attached:function(){if(!this.target){this.target=this.parentNode}listen(this.target,this._keyHandler)},detached:function(){unlisten(this.target,this._keyHandler)},publish:{keys:"",target:null},keysChanged:function(){var normalized=this.keys.replace("*","* shift+*");this._desiredKeys=normalized.toLowerCase().split(" ").map(stringToKey)},targetChanged:function(oldTarget){unlisten(oldTarget,this._keyHandler);listen(this.target,this._keyHandler)}})})();</script></polymer-element><polymer-element name="core-menu" extends="core-selector" assetpath="../core-menu/"><template><style>:host { display: block; margin: 12px;}polyfill-next-selector { content: ':host > core-item'; }::content > core-item { cursor: default;}</style><core-a11y-keys target="{{}}" keys="up" on-keys-pressed="{{ selectPrevious }}"></core-a11y-keys><core-a11y-keys target="{{}}" keys="down" on-keys-pressed="{{ selectNext }}"></core-a11y-keys><core-a11y-keys target="{{}}" keys="enter" on-keys-pressed="{{ validateSelected }}"></core-a11y-keys><shadow></shadow></template><script>Polymer("core-menu");</script></polymer-element><polymer-element name="core-item" attributes="label icon src" horizontal="" center="" layout="" assetpath="../core-item/"><template><style>:host { display: block; position: relative; min-height: 40px; white-space: nowrap;}:host(.font-scalable) { min-height: 2.5em;}:host(.core-selected) { font-weight: bold;}#icon { margin: 0 16px 0 4px;}:host(.font-scalable) #icon { margin: 0 1em 0 0.25em; height: 1.5em; width: 1.5em;}polyfill-next-selector { content: ':host > a'; }::content > a { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.000001);}</style><template if="{{icon || src}}"><core-icon src="{{src}}" id="icon" icon="{{icon}}" hidden?="{{!src &amp;&amp; !icon}}"></core-icon></template><div id="label">{{label}}</div><content></content></template><script>Polymer("core-item",{});</script></polymer-element><polymer-element name="core-doc-toc" attributes="data selected" assetpath="../core-doc-viewer/elements/"><template><style>:host { display: block; position: relative; border-right: 1px solid silver;}core-header-panel { position: absolute; top: 0; left: 0; height: 100%; width: 100%;}core-toolbar { background-color: #eeeeee;}</style><core-header-panel mode="waterfall"><core-menu selected="{{selected}}"><template repeat="{{data}}"><core-item><a href="#{{name}}">{{name}}</a></core-item></template></core-menu></core-header-panel></template><script>Polymer("core-doc-toc",{searchAction:function(){this.$.searchBar.style.opacity=1;this.$.searchBar.style.display=""},closeSearchAction:function(){this.$.searchBar.style.opacity=0;this.$.searchBar.style.display="none"}});</script></polymer-element><polymer-element name="core-doc-viewer" attributes="sources route url" horizontal="" layout="" assetpath="../core-doc-viewer/"><template><style> core-doc-toc { display: none; width: 332px; overflow-x: hidden; } </style><context-free-parser url="{{url}}" on-data-ready="{{parserDataReady}}"></context-free-parser><template repeat="{{sources}}"><context-free-parser url="{{}}" on-data-ready="{{parserDataReady}}"></context-free-parser></template><core-doc-toc id="toc" data="{{classes}}" selected="{{selected}}"></core-doc-toc><core-doc-page flex="" data="{{data}}"></core-doc-page></template><script>Polymer("core-doc-viewer",{classes:[],sources:[],ready:function(){window.addEventListener("hashchange",this.parseLocationHash.bind(this));this.parseLocationHash()},parseLocationHash:function(){this.route=window.location.hash.slice(1)},routeChanged:function(){this.validateRoute()},validateRoute:function(){if(this.route){this.classes.some(function(c){if(c.name===this.route.split(".")[0]){this.data=c;this.route="";return}},this)}},selectedChanged:function(){this.data=this.classes[this.selected]},parserDataReady:function(event,detail,sender){var path="";if(this.sources.length){var path=event.target.templateInstance.model;var idx=path.lastIndexOf("/");path=idx!=-1?path.substr(0,idx):"."}else{var parts=location.pathname.split("/");parts.pop();path=parts.join("/")}var data=event.target.data;var xhr=new XMLHttpRequest;xhr.open("GET",path+"/bower.json");xhr.onerror=function(e){this.assimilateData(data)}.bind(this);xhr.onloadend=function(e){if(e.target.status==200){var version=JSON.parse(e.target.response).version;for(var i=0,c;c=data.classes[i];++i){c.version=version}}this.assimilateData(data)}.bind(this);xhr.send()},assimilateData:function(data){this.classes=this.classes.concat(data.classes);this.classes.sort(function(a,b){var na=a&&a.name.toLowerCase(),nb=b&&b.name.toLowerCase();return na<nb?-1:na==nb?0:1});if(!this.data&&!this.route&&this.classes.length){this.data=this.classes[0]}if(this.classes.length>1){this.$.toc.style.display="block"}this.validateRoute()}});</script></polymer-element></div><polymer-element name="core-component-page" attributes="moduleName sources" layout="" vertical="" assetpath="../core-component-page-dev/"><template><style>:host { font-family: Arial, sans-serif; height: 100vh;}h2 { display: inline-block; margin: 8px 6px; vertical-align: middle;}.choiceB, .choiceC, .choiceD { color: white; font-size: 12px; font-weight: bold; text-decoration: none; background-color: #4285F4; box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.1); box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1); border-radius: 2px; cursor: pointer; display: inline-block; padding: 4px 12px 5px 12px; margin: 4px 0;}.appbar { background-color: #E91E63; color: white;}</style><core-toolbar class="appbar"><span>{{moduleName}}</span><a class="choiceC" target="_blank" href="../{{moduleName}}/demo.html">demo</a></core-toolbar><core-doc-viewer flex="" url="{{url}}" sources="{{sources}}"></core-doc-viewer></template><script>Polymer("core-component-page",{moduleName:"",sources:[],ready:function(){this.moduleName=this.moduleName||this.findModuleName()},moduleNameChanged:function(){document.title=this.moduleName;this.url=!this.sources.length&&this.moduleName?this.moduleName+".html":""},findModuleName:function(){var path=location.pathname.split("/");var name=path.pop()||path.pop();if(name.indexOf(".html")>=0){name=path.pop()}return name||""}});</script></polymer-element></body></html> \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/demo.html b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/demo.html
deleted file mode 100644
index 92313c48211..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/demo.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/index.html b/chromium/third_party/catapult/third_party/polymer/components/core-component-page/index.html
deleted file mode 100644
index 294215a738b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-component-page/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="../core-component-page/core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/core-media-query/.bower.json
deleted file mode 100644
index 5ce64b34c5b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/.bower.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "core-media-query",
- "private": true,
- "dependencies": {
- "polymer": "Polymer/polymer#^0.5"
- },
- "version": "0.5.6",
- "homepage": "https://github.com/Polymer/core-media-query",
- "_release": "0.5.6",
- "_resolution": {
- "type": "version",
- "tag": "0.5.6",
- "commit": "5d2a477d8f28ebd195b8a781a7bb053ac6b44299"
- },
- "_source": "git://github.com/Polymer/core-media-query.git",
- "_target": "^0.5",
- "_originalSource": "Polymer/core-media-query"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/README.md b/chromium/third_party/catapult/third_party/polymer/components/core-media-query/README.md
deleted file mode 100644
index 6c5158bfe90..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-core-media-query
-================
-
-**This element is compatible with Polymer 0.5 and lower only, and will be deprecated.**
-You can check out a similar 0.8-compatible version of this element at [https://github.com/polymerelements/iron-media-query](https://github.com/polymerelements/iron-media-query)
-
-See the [component page](https://www.polymer-project.org/0.5/docs/elements/core-media-query.html) for more information.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/bower.json b/chromium/third_party/catapult/third_party/polymer/components/core-media-query/bower.json
deleted file mode 100644
index 1d182f51989..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/bower.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "core-media-query",
- "private": true,
- "dependencies": {
- "polymer": "Polymer/polymer#^0.5"
- },
- "version": "0.5.6"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/core-media-query.html b/chromium/third_party/catapult/third_party/polymer/components/core-media-query/core-media-query.html
deleted file mode 100644
index 20cfd09ef30..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/core-media-query.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!--
-/**
- * @group Polymer Core Elements
- * @element core-media-query
- * @status beta
- * @homepage github.io
- *
- * core-media-query can be used to data bind to a CSS media query.
- * The "query" property is a bare CSS media query.
- * The "queryMatches" property will be a boolean representing if the page matches that media query.
- *
- * core-media-query uses media query listeners to dynamically update the "queryMatches" property.
- * A "core-media-change" event also fires when queryMatches changes.
- *
- * Example:
- *
- * <core-media-query query="max-width: 640px" queryMatches="{{phoneScreen}}"></core-media-query>
- *
- */
-
- /**
- * Fired when the media query state changes
- *
- * @event core-media-change
- */
--->
-<link rel="import" href="../polymer/polymer.html">
-
-<polymer-element name="core-media-query" attributes="query queryMatches">
- <template>
- <style>
- :host {
- display: none;
- }
- </style>
- </template>
- <script>
- Polymer('core-media-query', {
-
- /**
- * The Boolean return value of the media query
- *
- * @attribute queryMatches
- * @type Boolean
- * @default false
- */
- queryMatches: false,
-
- /**
- * The CSS media query to evaulate
- *
- * @attribute query
- * @type string
- * @default ''
- */
- query: '',
- ready: function() {
- this._mqHandler = this.queryHandler.bind(this);
- this._mq = null;
- },
- queryChanged: function() {
- if (this._mq) {
- this._mq.removeListener(this._mqHandler);
- }
- var query = this.query;
- if (query[0] !== '(') {
- query = '(' + this.query + ')';
- }
- this._mq = window.matchMedia(query);
- this._mq.addListener(this._mqHandler);
- this.queryHandler(this._mq);
- },
- queryHandler: function(mq) {
- this.queryMatches = mq.matches;
- this.asyncFire('core-media-change', mq);
- }
- });
- </script>
-</polymer-element>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/demo.html b/chromium/third_party/catapult/third_party/polymer/components/core-media-query/demo.html
deleted file mode 100644
index 8c1d6397610..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/demo.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title>Polymer match media</title>
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="core-media-query.html" />
-</head>
-<body>
-
- <polymer-element name="match-example">
- <template>
- <core-media-query query="{{query}}" queryMatches="{{qMatches}}"></core-media-query>
- My query of "{{query}}" {{qMatches ? "matches" : "doesn't match"}}
- </template>
- <script>
- Polymer('match-example', {
- query: 'min-width: 600px'
- });
- </script>
- </polymer-element>
-
- <match-example id="me"></match-example>
- <pre id="output">
- Log of 'mediachange' events on document, from polymer-match-media:
- </pre>
-
- <script>
- var output = document.querySelector('#output');
- // on-mediachange would give true or false as second param to the handler
- document.addEventListener('core-media-change', function(e) {
- output.textContent += '\nevent: ' + e.type + ' query: ' + e.detail.media + ' matches: ' + e.detail.matches;
- });
- </script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/index.html b/chromium/third_party/catapult/third_party/polymer/components/core-media-query/index.html
deleted file mode 100644
index 294215a738b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-media-query/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="../core-component-page/core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/README.md b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/README.md
deleted file mode 100644
index 22d55c10825..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-core-tooltip
-============
-
-See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-tooltip) for more information.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/bower.json b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/bower.json
deleted file mode 100644
index 9f116444c47..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/bower.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "core-tooltip",
- "private": true,
- "description": "Tooltip popup for content",
- "dependencies": {
- "polymer": "Polymer/polymer#^0.5",
- "core-focusable": "Polymer/core-focusable#^0.5",
- "core-icon-button": "Polymer/core-icon-button#^0.5",
- "paper-fab": "Polymer/paper-fab#^0.5",
- "core-resizable": "Polymer/core-resizable#^0.5"
- },
- "version": "0.5.5"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.css b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.css
deleted file mode 100644
index aa24c39fcaa..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.css
+++ /dev/null
@@ -1,104 +0,0 @@
-/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */
-
-:host {
- box-sizing: border-box;
- position: relative;
- display: inline-block;
- outline: none;
-}
-
-:host(:hover:not([disabled])) .core-tooltip {
- visibility: visible !important;
-}
-
-:host([focused]) .core-tooltip {
- visibility: visible !important;
-}
-
-.core-tooltip:not(.show) {
- visibility: hidden;
-}
-
-.core-tooltip {
- position: absolute;
- font-size: 10px;
- font-weight: 500;
- padding: 8px;
- color: white;
- background-color: rgba(0, 0, 0, 0.9);
- box-sizing: border-box;
- border-radius: 3px; /* TODO: not in spec. */
- white-space: nowrap;
- line-height: 6px;
- z-index: 1002; /* TODO: this is brittle. */
- -webkit-user-select: none;
- user-select: none;
-}
-
-:host([large]) .core-tooltip {
- line-height: 14px;
- font-size: 14px;
- padding: 16px;
-}
-
-.core-tooltip.noarrow::after {
- display: none;
-}
-
-.core-tooltip::after {
- position: absolute;
- border: solid transparent;
- content: '';
- height: 0;
- width: 0;
- border-width: 4px;
-}
-
-.top {
- margin-bottom: 10px; /* TODO: not specified in spec */
- bottom: 100%;
-}
-
-.right {
- margin-left: 10px; /* TODO: not specified in spec */
- left: 100%;
-}
-
-.bottom {
- top: 100%;
- margin-top: 10px; /* TODO: not specified in spec */
-}
-
-.left {
- margin-right: 10px; /* TODO: not specified in spec */
- right: 100%;
-}
-
-.core-tooltip.bottom::after {
- bottom: 100%;
- left: calc(50% - 4px);
- border-bottom-color: rgba(0,0,0,0.8);
-}
-
-.core-tooltip.left::after {
- left: 100%;
- top: calc(50% - 4px);
- border-left-color: rgba(0,0,0,0.8);
-}
-
-.core-tooltip.top::after {
- top: 100%;
- left: calc(50% - 4px);
- border-top-color: rgba(0,0,0,0.8);
-}
-
-.core-tooltip.right::after {
- right: 100%;
- top: calc(50% - 4px);
- border-right-color: rgba(0,0,0,0.8);
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.html b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.html
deleted file mode 100644
index 634be4696a8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/core-tooltip.html
+++ /dev/null
@@ -1,217 +0,0 @@
-<!--
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<!--
-The `core-tooltip` element creates a hover tooltip centered for the content
-it contains. It can be positioned on the top|bottom|left|right of content using
-the `position` attribute.
-
-To include HTML in the tooltip, include the `tip` attribute on the relevant
-content.
-
-<b>Example</b>:
-
- <core-tooltip label="I'm a tooltip">
- <span>Hover over me.</span>
- </core-tooltip>
-
-<b>Example</b> - positioning the tooltip to the right:
-
- <core-tooltip label="I'm a tooltip to the right" position="right">
- <core-icon-button icon="drawer"></core-icon-button>
- </core-tooltip>
-
-<b>Example</b> - no arrow and showing by default:
-
- <core-tooltip label="Tooltip with no arrow and always on" noarrow show>
- <img src="image.jpg">
- </core-tooltip>
-
-<b>Example</b> - disable the tooltip.
-
- <core-tooltip label="Disabled label never shows" disabled>
- ...
- </core-tooltip>
-
-<b>Example</b> - rich tooltip using the `tip` attribute:
-
- <core-tooltip>
- <div>Example of a rich information tooltip</div>
- <div tip>
- <img src="profile.jpg">Foo <b>Bar</b> - <a href="#">@baz</a>
- </div>
- </core-tooltip>
-
-By default, the `tip` attribute specifies the HTML content for a rich tooltip.
-You can customize this attribute with the `tipAttribute` attribute:
-
- <core-tooltip tipAttribute="htmltooltip">
- <div>Example of a rich information tooltip</div>
- <div htmltooltip>
- ...
- </div>
- </core-tooltip>
-
-@group Polymer Core Elements
-@element core-tooltip
-@mixins Polymer.CoreFocusable https://github.com/polymer/core-focusable
-@mixins Polymer.CoreResizable https://github.com/polymer/core-resizable
-@homepage http://www.polymer-project.org/components/core-tooltip/index.html
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../core-focusable/core-focusable.html">
-<link rel="import" href="../core-resizable/core-resizable.html">
-
-<!-- TODO: would be nice to inherit from label to get .htmlFor, and .control,
- but the latter is readonly. -->
-<!-- TODO: support off center arrows. -->
-<!-- TODO: detect mobile and apply the .large class, instead of manual
- control. -->
-<!-- TODO: possibly reuse core-overlay. -->
-<polymer-element name="core-tooltip" attributes="noarrow position label show tipAttribute" role="tooltip" tabindex="0">
-<template>
- <link rel="stylesheet" href="core-tooltip.css">
-
- <div id="tooltip" hidden?="{{!hasTooltipContent}}"
- class="core-tooltip {{position}} {{ {noarrow: noarrow, show: show && !disabled} | tokenList}}">
- <content id="c" select="[{{tipAttribute}}]">{{label}}</content>
- </div>
-
- <content></content>
-
-</template>
-<script>
-(function() {
-
- var proto = {
-
- /**
- * A simple string label for the tooltip to display. To display a rich
- * HTML tooltip instead, omit `label` and include the `tip` attribute
- * on a child node of `core-tooltip`.
- *
- * @attribute label
- * @type string
- * @default null
- */
- label: null,
-
- eventDelegates: {
- 'core-resize': 'positionChanged'
- },
-
- computed: {
- // Indicates whether the tooltip has a set label propety or
- // an element with the `tip` attribute.
- hasTooltipContent: 'label || !!tipElement'
- },
-
- publish: {
- /**
- * Forces the tooltip to display. If `disabled` is set, this property is ignored.
- *
- * @attribute show
- * @type boolean
- * @default false
- */
- show: {value: false, reflect: true},
-
- /**
- * Positions the tooltip to the top, right, bottom, left of its content.
- *
- * @attribute position
- * @type string
- * @default 'bottom'
- */
- position: {value: 'bottom', reflect: true},
-
- /**
- * If true, the tooltip an arrow pointing towards the content.
- *
- * @attribute noarrow
- * @type boolean
- * @default false
- */
- noarrow: {value: false, reflect: true}
- },
-
- /**
- * Customizes the attribute used to specify which content
- * is the rich HTML tooltip.
- *
- * @attribute tipAttribute
- * @type string
- * @default 'tip'
- */
- tipAttribute: 'tip',
-
- attached: function() {
- this.updatedChildren();
- this.resizableAttachedHandler();
- },
-
- detached: function() {
- this.resizableDetachedHandler();
- },
-
- updatedChildren: function () {
- this.tipElement = null;
-
- for (var i = 0, el; el = this.$.c.getDistributedNodes()[i]; ++i) {
- if (el.hasAttribute && el.hasAttribute(this.tipAttribute)) {
- this.tipElement = el;
- break;
- }
- }
-
- // Job ensures we're not double calling setPosition() on DOM attach.
- this.job('positionJob', this.setPosition);
-
- // Monitor children to re-position tooltip when light dom changes.
- this.onMutation(this, this.updatedChildren);
- },
-
- labelChanged: function(oldVal, newVal) {
- this.job('positionJob', this.setPosition);
- },
-
- positionChanged: function(oldVal, newVal) {
- this.job('positionJob', this.setPosition);
- },
-
- setPosition: function() {
- var controlWidth = this.clientWidth;
- var controlHeight = this.clientHeight;
- var toolTipWidth = this.$.tooltip.clientWidth;
- var toolTipHeight = this.$.tooltip.clientHeight;
-
- switch (this.position) {
- case 'top':
- case 'bottom':
- this.$.tooltip.style.left = (controlWidth - toolTipWidth) / 2 + 'px';
- this.$.tooltip.style.top = null;
- break;
- case 'left':
- case 'right':
- this.$.tooltip.style.left = null;
- this.$.tooltip.style.top = (controlHeight - toolTipHeight) / 2 + 'px';
- break;
- }
- }
-
- };
-
- Polymer.mixin2(proto, Polymer.CoreFocusable);
- Polymer.mixin(proto, Polymer.CoreResizable);
- Polymer(proto);
- })();
-
-</script>
-</polymer-element>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/demo.html b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/demo.html
deleted file mode 100644
index 7ea6aea9d57..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/demo.html
+++ /dev/null
@@ -1,211 +0,0 @@
-<!--
- @license
- Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!doctype html>
-<html lang="en">
-<head>
-
- <meta charset="utf-8">
- <title>Core Tooltip</title>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
-
- <link rel="import" href="../core-icon-button/core-icon-button.html">
- <link rel="import" href="../paper-fab/paper-fab.html">
- <link rel="import" href="core-tooltip.html">
-
- <style>
- body {
- font-family: "Open Sans", sans-serif;
- font-weight: 300;
- padding: 24px;
- }
-
- .example {
- margin: 35px 15px;
- }
-
- .example > * {
- margin: 0 15px;
- }
-
- .fakebutton {
- box-shadow: 0 0 3px #aaa inset;
- border-radius: 3px;
- padding: 7px 5px;
- }
- .fakebutton:hover {
- background-color: white;
- }
-
- img {
- width: 400px;
- height: 150px;
- object-fit: cover;
- }
-
- img.large {
- border: 15px solid white;
- box-sizing: border-box;
- }
-
- .profile {
- width: 60px;
- height: auto;
- border-radius: 50%;
- vertical-align: middle;
- }
-
- a {
- color: currentcolor;
- text-decoration: none;
- }
-
- .rich {
- background: hotpink;
- color: white;
- padding:20px;
- border-radius: 5px;
- }
-
- </style>
-
- <style shim-shadowdom>
- core-tooltip.fancy::shadow .core-tooltip {
- opacity: 0;
- -webkit-transition: all 300ms cubic-bezier(0,1.92,.99,1.07);
- transition: all 300ms cubic-bezier(0,1.92,.99,1.07);
- -webkit-transform: translate3d(0, -10px, 0);
- transform: translate3d(0, -10px, 0);
- }
-
- core-tooltip.fancy:hover::shadow .core-tooltip,
- core-tooltip.fancy:focus::shadow .core-tooltip {
- opacity: 1;
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
- </style>
-
-</head>
-<body unresolved>
-
- <article>
-
- <button>Toggle all</button>
-
- <section class="small" layout horizontal center-center>
-
- <div class="example">
-
- <core-tooltip label='position="left"' position="left">
- <core-icon-button icon="drawer"></core-icon-button>
- </core-tooltip>
-
- <core-tooltip label='position="top"' position="top">
- <core-icon-button icon="drawer"></core-icon-button>
- </core-tooltip>
-
- <core-tooltip label='position="bottom"' position="bottom">
- <core-icon-button icon="drawer"></core-icon-button>
- </core-tooltip>
-
- <core-tooltip label='position="right"' position="right">
- <core-icon-button icon="drawer"></core-icon-button>
- </core-tooltip>
-
- </div>
-
- <div class="example">
-
- <core-tooltip label="Fancy effect" class="fancy">
- <paper-fab icon="add"></paper-fab>
- </core-tooltip>
-
- </div>
-
- </section>
-
- <section layout horizontal center-center>
-
- <div class="example">
-
- <core-tooltip>
- <div class="rich">Rich tooltip with HTML</div>
- <div tip>
- <img src="https://pbs.twimg.com/profile_images/378800000548263523/c110b0a4c3e3e4d3dcce1d2020f3eded.jpeg
- " class="profile" style="width: 40px;margin-right: 8px;">Eric <b>Bidelman</b> - <a href="#">@ebidel</a></div>
- </core-tooltip>
-
- </div>
-
- <div class="example">
-
- <core-tooltip label="<core-tooltip large>" large>
- Larger tooltips for mobile
- </core-tooltip>
-
- </div>
-
- <div class="example">
-
- <core-tooltip label="disabled" disabled>
- Disabled Tooltip
- </core-tooltip>
-
- </div>
-
- </section>
-
- <section layout horizontal center-center>
-
- <div class="example">
-
- <core-tooltip label="Tooltip with no arrow and always on: <core-tooltip noarrow show>" position="bottom" noarrow show>
- <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/building.jpg" class="large">
- </core-tooltip>
-
- </div>
-
- </section>
-
- <section layout horizontal center-center>
-
- <div class="example">
-
- <core-tooltip id="dynamic" show>
- Tooltips are only shown (on hover) when a label is set<br> or a html rich snippet is given. &rarr;
- </core-tooltip>
- <button id="fillbutton">Fill tooltip</button>
-
- </div>
-
- </section>
-
- </article>
-
-<script>
- document.querySelector('button').addEventListener('click', function(e) {
- var tooltips = document.querySelectorAll('core-tooltip');
- Array.prototype.forEach.call(tooltips, function(tooltip) {
- tooltip.show = !tooltip.show;
- });
- });
-
- document.querySelector('#fillbutton').addEventListener('click', function(e) {
- e.stopPropagation();
-
- var el = document.querySelector('#dynamic');
- el.insertAdjacentHTML('beforeend', '<div tip><b>See</b>. Told ya so!</div>');
-
- });
-</script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/index.html b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/index.html
deleted file mode 100644
index cdf58085266..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="../core-component-page/core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/metadata.html b/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/metadata.html
deleted file mode 100644
index ffcf73ac715..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/core-tooltip/metadata.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
- @license
- Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<x-meta id="core-tooltip" label="Tooltip" group="Core">
- <template>
- <core-tooltip label="I'm a tooltip">
- <span>Hover over me.</span>
- </core-tooltip>
- </template>
- <template id="imports">
- <link rel="import" href="core-tooltip.html">
- </template>
-</x-meta>
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/font-roboto/.bower.json
deleted file mode 100644
index eafbb18866b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/.bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "font-roboto",
- "version": "1.0.1",
- "description": "An HTML import for Roboto",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "font",
- "roboto"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/font-roboto.git"
- },
- "main": "roboto.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/font-roboto/",
- "ignore": [
- "/.*"
- ],
- "_release": "1.0.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.1",
- "commit": "21ce9b51a417fa9995cf6606e886aba0728f70a1"
- },
- "_source": "git://github.com/PolymerElements/font-roboto.git",
- "_target": "^1.0.1",
- "_originalSource": "PolymerElements/font-roboto"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/README.md b/chromium/third_party/catapult/third_party/polymer/components/font-roboto/README.md
deleted file mode 100644
index 61c6394ce36..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# font-roboto
diff --git a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/bower.json b/chromium/third_party/catapult/third_party/polymer/components/font-roboto/bower.json
deleted file mode 100644
index 977cf2d4ed8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/bower.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "font-roboto",
- "version": "1.0.1",
- "description": "An HTML import for Roboto",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "font",
- "roboto"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/font-roboto.git"
- },
- "main": "roboto.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/font-roboto/",
- "ignore": [
- "/.*"
- ]
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/roboto.html b/chromium/third_party/catapult/third_party/polymer/components/font-roboto/roboto.html
deleted file mode 100644
index 7a24999fffd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/font-roboto/roboto.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700">
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/README.md
deleted file mode 100644
index ffadd3db606..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-a11y-announcer.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/iron-a11y-announcer.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-a11y-announcer)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-a11y-announcer)_
-
-
-##&lt;iron-a11y-announcer&gt;
-
-
-`iron-a11y-announcer` is a singleton element that is intended to add a11y
-to features that require on-demand announcement from screen readers. In
-order to make use of the announcer, it is best to request its availability
-in the announcing element.
-
-Example:
-
- Polymer({
-
- is: 'x-chatty',
-
- attached: function() {
- // This will create the singleton element if it has not
- // been created yet:
- Polymer.IronA11yAnnouncer.requestAvailability();
- }
- });
-
-After the `iron-a11y-announcer` has been made available, elements can
-make announces by firing bubbling `iron-announce` events.
-
-Example:
-
- this.fire('iron-announce', {
- text: 'This is an announcement!'
- }, { bubbles: true });
-
-Note: announcements are only audible if you have a screen reader enabled.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/bower.json
deleted file mode 100644
index ed8d8d00816..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "iron-a11y-announcer",
- "version": "1.0.4",
- "description": "A singleton element that simplifies announcing text to screen readers.",
- "keywords": [
- "web-components",
- "polymer",
- "a11y",
- "live"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-a11y-announcer.git"
- },
- "main": "iron-a11y-announcer.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "dependencies": {
- "polymer": "polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-button": "polymerelements/paper-button#^1.0.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "polymer/web-component-tester#^3.4.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/index.html
deleted file mode 100644
index 0dd286acf5e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/index.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>iron-a11y-announcer demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="x-announces.html">
-
-</head>
-<body>
- <div class="horizontal-section-container">
- <div>
- <div class="vertical-section">
- <span>Note: in order to hear the announcements, be sure to turn on your favorite screen reader!</span>
- <x-announces>Hello, my name is Ava.</x-announces>
- <x-announces>This true sentence is false.</x-announces>
- <x-announces>Are you paying attention?</x-announces>
- </div>
- </div>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/x-announces.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/x-announces.html
deleted file mode 100644
index 404f7c09b55..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/demo/x-announces.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../paper-button/paper-button.html">
-<link rel="import" href="../iron-a11y-announcer.html">
-
-<dom-module id="x-announces">
- <style>
- :host {
- display: block;
- position: relative;
- padding: 1em 0;
- }
-
- paper-button {
- background: #4285f4;
- color: #fff;
- }
- </style>
- <template>
- <paper-button on-tap="_onTapAnnounce" raised>Announce</paper-button>
- <span id="content" aria-hidden="true">
- <content></content>
- </span>
- </template>
- <script>
- Polymer({
- is: 'x-announces',
-
- attached: function() {
- Polymer.IronA11yAnnouncer.requestAvailability();
- },
-
- _onTapAnnounce: function() {
- this.fire('iron-announce', {
- text: this.$.content.textContent.trim()
- }, {
- bubbles: true
- });
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/index.html
deleted file mode 100644
index 1f8889a8da9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-a11y-announcer</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/iron-a11y-announcer.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/iron-a11y-announcer.html
deleted file mode 100644
index da42ba964ef..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-announcer/iron-a11y-announcer.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<!--
-`iron-a11y-announcer` is a singleton element that is intended to add a11y
-to features that require on-demand announcement from screen readers. In
-order to make use of the announcer, it is best to request its availability
-in the announcing element.
-
-Example:
-
- Polymer({
-
- is: 'x-chatty',
-
- attached: function() {
- // This will create the singleton element if it has not
- // been created yet:
- Polymer.IronA11yAnnouncer.requestAvailability();
- }
- });
-
-After the `iron-a11y-announcer` has been made available, elements can
-make announces by firing bubbling `iron-announce` events.
-
-Example:
-
- this.fire('iron-announce', {
- text: 'This is an announcement!'
- }, { bubbles: true });
-
-Note: announcements are only audible if you have a screen reader enabled.
-
-@group Iron Elements
-@demo demo/index.html
--->
-
-<dom-module id="iron-a11y-announcer">
- <style>
- :host {
- display: inline-block;
- position: fixed;
- clip: rect(0px,0px,0px,0px);
- }
- </style>
-
- <template>
- <div aria-live$="[[mode]]">[[_text]]</div>
- </template>
-
- <script>
-
- (function() {
- 'use strict';
-
- Polymer.IronA11yAnnouncer = Polymer({
- is: 'iron-a11y-announcer',
-
- properties: {
-
- /**
- * The value of mode is used to set the `aria-live` attribute
- * for the element that will be announced. Valid values are: `off`,
- * `polite` and `assertive`.
- */
- mode: {
- type: String,
- value: 'polite'
- },
-
- _text: {
- type: String,
- value: ''
- }
- },
-
- created: function() {
- if (!Polymer.IronA11yAnnouncer.instance) {
- Polymer.IronA11yAnnouncer.instance = this;
- }
-
- document.body.addEventListener('iron-announce', this._onIronAnnounce.bind(this));
- },
-
- /**
- * Cause a text string to be announced by screen readers.
- *
- * @param {string} text The text that should be announced.
- */
- announce: function(text) {
- this._text = '';
- this.async(function() {
- this._text = text;
- }, 100);
- },
-
- _onIronAnnounce: function(event) {
- if (event.detail && event.detail.text) {
- this.announce(event.detail.text);
- }
- }
- });
-
- Polymer.IronA11yAnnouncer.instance = null;
-
- Polymer.IronA11yAnnouncer.requestAvailability = function() {
- if (!Polymer.IronA11yAnnouncer.instance) {
- Polymer.IronA11yAnnouncer.instance = document.createElement('iron-a11y-announcer');
- }
-
- document.body.appendChild(Polymer.IronA11yAnnouncer.instance);
- };
- })();
-
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.bower.json
deleted file mode 100644
index 22dfa4486ba..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.bower.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "iron-a11y-keys-behavior",
- "version": "1.1.6",
- "description": "A behavior that enables keybindings for greater a11y.",
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "a11y",
- "input"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git"
- },
- "main": "iron-a11y-keys-behavior.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "PolymerElements/paper-styles#^1.0.2",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior",
- "_release": "1.1.6",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.6",
- "commit": "28435b2e02d0e5e5268e984d925b03643cea5e34"
- },
- "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-a11y-keys-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.travis.yml
deleted file mode 100644
index bb7b10a3e24..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: OZhLlPsjjnWU4FyZ+RKq5i/Nv/tElvcjr9+OT04ENGKfh9+fkuij/XdHJQe6EpOCjrNkwt23c+I6V5YWRrSatRX/AxEkViW8EXnF32rX3HV8fWnjD6Vfn+4Qz82y4huc9II8OV5I7jFDln6yzEGZn08zAtbmhj5dSpYtT1spSf/ZuUkqn4mMRJW2wCOnzbjueP56Ry40IwQm0enLXVQLPYB3LC4fBWfT+VFrsE9qH1ZgGKcSD/n2dOD3d6xjts4FSilNp2IZ8Km5RNAFUxYmkcwrY4O2ltNtKUngWwIpeplpz0bNj5k8kOpT5xA/FT630M5sFd1ODVp846kTr/EyYTq/VCiwTaA/vDfZL85DC3O+Zt0vTHAvkxKAaXkg9sMp8gJOJ6gt6cK8rV8z7npeAUVsK1gmuHYXne1Z76SRgWwbE0/z82vyFLNgitmZDLLM1fP3TpzsK1QQg1ikn6iYXdWpHcrzBi6lk8mCafnP7D7B/yFB/Z6Y9AFI6NQI/jWP2FMMJjMWbaJVG9DAU4PWlVTiFnhfVjPI7FUEmW46/QjH1ztSZWpDA9SBozJluIpKRA1qk1EgGX1RBFBHrbFtHG//x0AGyAV6gWOfdKjl/nqcM02xFUSrDb0tkNUnEAS6K7l+X1eDaBbiaAQiakPt9Je2WvvHyc+OiZviSc72Gmc=
- - secure: vIs86+z7s1QwihkHtLBRQzlmJRSIWIadq3SlDdZHS4HOivH7fNV0d4hm8QnZYZ9X8yvSvxFCzEFdLuX1TpU0H3oy5wgYky7DnfJtsEhuOfW8dobHHZeCNi/t2FQAXpobqpRwojC3A+1b1lNrY1XNpYRz7aEialO4Yr8e1SQSLex5zw/pqm7g9Vz6PnQwobDQcGXKc6ZWc84+DqOo9qfkSlnEJC/1vQxHYpUa172UnnAnmHJ7gZKdhf9aLWJSZcSpPcoKEnvslRFmeDyRMNRDWVzcg2vHnV+tc1aYzp1wsrRW3P+oqwYlvGlxo+5U92QLXKIcKZhGblVWxe8BtXgiVzgS1sz5D11vKs61Xe46onbguG/XK3UxX9bPRK5uklkC5fwAY2hhvOTGXqimTb2YrlyEWO3BCKGBk6Is3KGyCe7c2nNEmXPUSun9X1JLGRPivJb9iBR4/WSEFvibYHl6/gIke9LdXPOCHuJ3+Iu14lCz+pwi8ADIWVuGpDIxFcorG8a3BCoxQo5VouUbSe0mcNttAvSzBNxhljaaBuFs56DLDpLRr0sGhqvfA1JzdCyzVyrk4WECfZw26pAnYCyTczVXmu5msVdKnjPJKtDqWazvIhHk2G1mk8CKb14lrN58u/Kh6PQ3miJ+61c1stBWhRDlp2QffOkBJiOATKHF+AA=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/README.md
deleted file mode 100644
index b0949871d18..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-a11y-keys-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-a11y-keys-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-a11y-keys-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-a11y-keys-behavior)_
-
-
-##Polymer.IronA11yKeysBehavior
-
-`Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
-keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
-The element takes care of browser differences with respect to Keyboard events
-and uses an expressive syntax to filter key presses.
-
-Use the `keyBindings` prototype property to express what combination of keys
-will trigger the callback. A key binding has the format
-`"KEY+MODIFIER:EVENT": "callback"` (`"KEY": "callback"` or
-`"KEY:EVENT": "callback"` are valid as well). Some examples:
-
-```javascript
- keyBindings: {
- 'space': '_onKeydown', // same as 'space:keydown'
- 'shift+tab': '_onKeydown',
- 'enter:keypress': '_onKeypress',
- 'esc:keyup': '_onKeyup'
- }
-```
-
-The callback will receive with an event containing the following information in `event.detail`:
-
-```javascript
- _onKeydown: function(event) {
- console.log(event.detail.combo); // KEY+MODIFIER, e.g. "shift+tab"
- console.log(event.detail.key); // KEY only, e.g. "tab"
- console.log(event.detail.event); // EVENT, e.g. "keydown"
- console.log(event.detail.keyboardEvent); // the original KeyboardEvent
- }
-```
-
-Use the `keyEventTarget` attribute to set up event handlers on a specific
-node.
-
-See the [demo source code](https://github.com/PolymerElements/iron-a11y-keys-behavior/blob/master/demo/x-key-aware.html)
-for an example.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/bower.json
deleted file mode 100644
index ae6cb655989..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "iron-a11y-keys-behavior",
- "version": "1.1.6",
- "description": "A behavior that enables keybindings for greater a11y.",
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "a11y",
- "input"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git"
- },
- "main": "iron-a11y-keys-behavior.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "PolymerElements/paper-styles#^1.0.2",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/index.html
deleted file mode 100644
index 2c3fec7c598..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <meta charset="UTF-8">
- <title>Iron A11y Keys Behavior demo</title>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="x-key-aware.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
-</head>
-<body>
- <div class="vertical-section vertical-section-container centered">
- <x-key-aware></x-key-aware>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/x-key-aware.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/x-key-aware.html
deleted file mode 100644
index 16b9b2a518d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/demo/x-key-aware.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../paper-styles/color.html">
-<link rel="import" href="../iron-a11y-keys-behavior.html">
-
-<dom-module id="x-key-aware">
- <style>
- :host {
- display: block;
- position: relative;
- }
-
- pre {
- color: var(--google-blue-700);
- }
-
- .keys {
- line-height: 25px;
- }
-
- .keys span {
- cursor: default;
- background-color: var(--google-grey-100);
- border: 1px solid var(--google-grey-300);
- padding: 1px 5px;
- border-radius: 5px;
- }
- </style>
- <template>
- <h4>Press any of these keys</h4>
- <input type="checkbox" checked="{{preventDefault::change}}"> prevent default = {{preventDefault}}
- <p class="keys">
- <template is="dom-repeat" items="[[boundKeys]]">
- <span>{{item}}</span>
- </template>
- </p>
- <pre>[[pressed]]</pre>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'x-key-aware',
-
- behaviors: [
- Polymer.IronA11yKeysBehavior
- ],
-
- properties: {
- pressed: {
- type: String,
- readOnly: true,
- value: ''
- },
-
- boundKeys: {
- type: Array,
- value: function() {
- return Object.keys(this.keyBindings).join(' ').split(' ');
- }
- },
-
- preventDefault: {
- type: Boolean,
- value: true,
- notify: true
- },
-
- keyEventTarget: {
- type: Object,
- value: function() {
- return document.body;
- }
- }
- },
-
- keyBindings: {
- '* pageup pagedown left right down up home end space enter @ ~ " $ ? ! \\ + : # backspace': '_updatePressed',
- 'a': '_updatePressed',
- 'shift+a alt+a': '_updatePressed',
- 'shift+tab shift+space': '_updatePressed'
- },
-
- _updatePressed: function(event) {
- console.log(event.detail);
-
- if (this.preventDefault) {
- event.preventDefault();
- }
- this._setPressed(
- this.pressed + event.detail.combo + ' pressed!\n'
- );
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/index.html
deleted file mode 100644
index c53ba6cf31e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>iron-a11y-keys-behavior</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
deleted file mode 100644
index 35756c61e61..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
+++ /dev/null
@@ -1,492 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
- (function() {
- 'use strict';
-
- /**
- * Chrome uses an older version of DOM Level 3 Keyboard Events
- *
- * Most keys are labeled as text, but some are Unicode codepoints.
- * Values taken from: http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html#KeySet-Set
- */
- var KEY_IDENTIFIER = {
- 'U+0008': 'backspace',
- 'U+0009': 'tab',
- 'U+001B': 'esc',
- 'U+0020': 'space',
- 'U+007F': 'del'
- };
-
- /**
- * Special table for KeyboardEvent.keyCode.
- * KeyboardEvent.keyIdentifier is better, and KeyBoardEvent.key is even better
- * than that.
- *
- * Values from: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode#Value_of_keyCode
- */
- var KEY_CODE = {
- 8: 'backspace',
- 9: 'tab',
- 13: 'enter',
- 27: 'esc',
- 33: 'pageup',
- 34: 'pagedown',
- 35: 'end',
- 36: 'home',
- 32: 'space',
- 37: 'left',
- 38: 'up',
- 39: 'right',
- 40: 'down',
- 46: 'del',
- 106: '*'
- };
-
- /**
- * MODIFIER_KEYS maps the short name for modifier keys used in a key
- * combo string to the property name that references those same keys
- * in a KeyboardEvent instance.
- */
- var MODIFIER_KEYS = {
- 'shift': 'shiftKey',
- 'ctrl': 'ctrlKey',
- 'alt': 'altKey',
- 'meta': 'metaKey'
- };
-
- /**
- * KeyboardEvent.key is mostly represented by printable character made by
- * the keyboard, with unprintable keys labeled nicely.
- *
- * However, on OS X, Alt+char can make a Unicode character that follows an
- * Apple-specific mapping. In this case, we fall back to .keyCode.
- */
- var KEY_CHAR = /[a-z0-9*]/;
-
- /**
- * Matches a keyIdentifier string.
- */
- var IDENT_CHAR = /U\+/;
-
- /**
- * Matches arrow keys in Gecko 27.0+
- */
- var ARROW_KEY = /^arrow/;
-
- /**
- * Matches space keys everywhere (notably including IE10's exceptional name
- * `spacebar`).
- */
- var SPACE_KEY = /^space(bar)?/;
-
- /**
- * Matches ESC key.
- *
- * Value from: http://w3c.github.io/uievents-key/#key-Escape
- */
- var ESC_KEY = /^escape$/;
-
- /**
- * Transforms the key.
- * @param {string} key The KeyBoardEvent.key
- * @param {Boolean} [noSpecialChars] Limits the transformation to
- * alpha-numeric characters.
- */
- function transformKey(key, noSpecialChars) {
- var validKey = '';
- if (key) {
- var lKey = key.toLowerCase();
- if (lKey === ' ' || SPACE_KEY.test(lKey)) {
- validKey = 'space';
- } else if (ESC_KEY.test(lKey)) {
- validKey = 'esc';
- } else if (lKey.length == 1) {
- if (!noSpecialChars || KEY_CHAR.test(lKey)) {
- validKey = lKey;
- }
- } else if (ARROW_KEY.test(lKey)) {
- validKey = lKey.replace('arrow', '');
- } else if (lKey == 'multiply') {
- // numpad '*' can map to Multiply on IE/Windows
- validKey = '*';
- } else {
- validKey = lKey;
- }
- }
- return validKey;
- }
-
- function transformKeyIdentifier(keyIdent) {
- var validKey = '';
- if (keyIdent) {
- if (keyIdent in KEY_IDENTIFIER) {
- validKey = KEY_IDENTIFIER[keyIdent];
- } else if (IDENT_CHAR.test(keyIdent)) {
- keyIdent = parseInt(keyIdent.replace('U+', '0x'), 16);
- validKey = String.fromCharCode(keyIdent).toLowerCase();
- } else {
- validKey = keyIdent.toLowerCase();
- }
- }
- return validKey;
- }
-
- function transformKeyCode(keyCode) {
- var validKey = '';
- if (Number(keyCode)) {
- if (keyCode >= 65 && keyCode <= 90) {
- // ascii a-z
- // lowercase is 32 offset from uppercase
- validKey = String.fromCharCode(32 + keyCode);
- } else if (keyCode >= 112 && keyCode <= 123) {
- // function keys f1-f12
- validKey = 'f' + (keyCode - 112);
- } else if (keyCode >= 48 && keyCode <= 57) {
- // top 0-9 keys
- validKey = String(keyCode - 48);
- } else if (keyCode >= 96 && keyCode <= 105) {
- // num pad 0-9
- validKey = String(keyCode - 96);
- } else {
- validKey = KEY_CODE[keyCode];
- }
- }
- return validKey;
- }
-
- /**
- * Calculates the normalized key for a KeyboardEvent.
- * @param {KeyboardEvent} keyEvent
- * @param {Boolean} [noSpecialChars] Set to true to limit keyEvent.key
- * transformation to alpha-numeric chars. This is useful with key
- * combinations like shift + 2, which on FF for MacOS produces
- * keyEvent.key = @
- * To get 2 returned, set noSpecialChars = true
- * To get @ returned, set noSpecialChars = false
- */
- function normalizedKeyForEvent(keyEvent, noSpecialChars) {
- // Fall back from .key, to .keyIdentifier, to .keyCode, and then to
- // .detail.key to support artificial keyboard events.
- return transformKey(keyEvent.key, noSpecialChars) ||
- transformKeyIdentifier(keyEvent.keyIdentifier) ||
- transformKeyCode(keyEvent.keyCode) ||
- transformKey(keyEvent.detail ? keyEvent.detail.key : keyEvent.detail, noSpecialChars) || '';
- }
-
- function keyComboMatchesEvent(keyCombo, event) {
- // For combos with modifiers we support only alpha-numeric keys
- var keyEvent = normalizedKeyForEvent(event, keyCombo.hasModifiers);
- return keyEvent === keyCombo.key &&
- (!keyCombo.hasModifiers || (
- !!event.shiftKey === !!keyCombo.shiftKey &&
- !!event.ctrlKey === !!keyCombo.ctrlKey &&
- !!event.altKey === !!keyCombo.altKey &&
- !!event.metaKey === !!keyCombo.metaKey)
- );
- }
-
- function parseKeyComboString(keyComboString) {
- if (keyComboString.length === 1) {
- return {
- combo: keyComboString,
- key: keyComboString,
- event: 'keydown'
- };
- }
- return keyComboString.split('+').reduce(function(parsedKeyCombo, keyComboPart) {
- var eventParts = keyComboPart.split(':');
- var keyName = eventParts[0];
- var event = eventParts[1];
-
- if (keyName in MODIFIER_KEYS) {
- parsedKeyCombo[MODIFIER_KEYS[keyName]] = true;
- parsedKeyCombo.hasModifiers = true;
- } else {
- parsedKeyCombo.key = keyName;
- parsedKeyCombo.event = event || 'keydown';
- }
-
- return parsedKeyCombo;
- }, {
- combo: keyComboString.split(':').shift()
- });
- }
-
- function parseEventString(eventString) {
- return eventString.trim().split(' ').map(function(keyComboString) {
- return parseKeyComboString(keyComboString);
- });
- }
-
- /**
- * `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
- * keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
- * The element takes care of browser differences with respect to Keyboard events
- * and uses an expressive syntax to filter key presses.
- *
- * Use the `keyBindings` prototype property to express what combination of keys
- * will trigger the callback. A key binding has the format
- * `"KEY+MODIFIER:EVENT": "callback"` (`"KEY": "callback"` or
- * `"KEY:EVENT": "callback"` are valid as well). Some examples:
- *
- * keyBindings: {
- * 'space': '_onKeydown', // same as 'space:keydown'
- * 'shift+tab': '_onKeydown',
- * 'enter:keypress': '_onKeypress',
- * 'esc:keyup': '_onKeyup'
- * }
- *
- * The callback will receive with an event containing the following information in `event.detail`:
- *
- * _onKeydown: function(event) {
- * console.log(event.detail.combo); // KEY+MODIFIER, e.g. "shift+tab"
- * console.log(event.detail.key); // KEY only, e.g. "tab"
- * console.log(event.detail.event); // EVENT, e.g. "keydown"
- * console.log(event.detail.keyboardEvent); // the original KeyboardEvent
- * }
- *
- * Use the `keyEventTarget` attribute to set up event handlers on a specific
- * node.
- *
- * See the [demo source code](https://github.com/PolymerElements/iron-a11y-keys-behavior/blob/master/demo/x-key-aware.html)
- * for an example.
- *
- * @demo demo/index.html
- * @polymerBehavior
- */
- Polymer.IronA11yKeysBehavior = {
- properties: {
- /**
- * The EventTarget that will be firing relevant KeyboardEvents. Set it to
- * `null` to disable the listeners.
- * @type {?EventTarget}
- */
- keyEventTarget: {
- type: Object,
- value: function() {
- return this;
- }
- },
-
- /**
- * If true, this property will cause the implementing element to
- * automatically stop propagation on any handled KeyboardEvents.
- */
- stopKeyboardEventPropagation: {
- type: Boolean,
- value: false
- },
-
- _boundKeyHandlers: {
- type: Array,
- value: function() {
- return [];
- }
- },
-
- // We use this due to a limitation in IE10 where instances will have
- // own properties of everything on the "prototype".
- _imperativeKeyBindings: {
- type: Object,
- value: function() {
- return {};
- }
- }
- },
-
- observers: [
- '_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)'
- ],
-
-
- /**
- * To be used to express what combination of keys will trigger the relative
- * callback. e.g. `keyBindings: { 'esc': '_onEscPressed'}`
- * @type {Object}
- */
- keyBindings: {},
-
- registered: function() {
- this._prepKeyBindings();
- },
-
- attached: function() {
- this._listenKeyEventListeners();
- },
-
- detached: function() {
- this._unlistenKeyEventListeners();
- },
-
- /**
- * Can be used to imperatively add a key binding to the implementing
- * element. This is the imperative equivalent of declaring a keybinding
- * in the `keyBindings` prototype property.
- */
- addOwnKeyBinding: function(eventString, handlerName) {
- this._imperativeKeyBindings[eventString] = handlerName;
- this._prepKeyBindings();
- this._resetKeyEventListeners();
- },
-
- /**
- * When called, will remove all imperatively-added key bindings.
- */
- removeOwnKeyBindings: function() {
- this._imperativeKeyBindings = {};
- this._prepKeyBindings();
- this._resetKeyEventListeners();
- },
-
- /**
- * Returns true if a keyboard event matches `eventString`.
- *
- * @param {KeyboardEvent} event
- * @param {string} eventString
- * @return {boolean}
- */
- keyboardEventMatchesKeys: function(event, eventString) {
- var keyCombos = parseEventString(eventString);
- for (var i = 0; i < keyCombos.length; ++i) {
- if (keyComboMatchesEvent(keyCombos[i], event)) {
- return true;
- }
- }
- return false;
- },
-
- _collectKeyBindings: function() {
- var keyBindings = this.behaviors.map(function(behavior) {
- return behavior.keyBindings;
- });
-
- if (keyBindings.indexOf(this.keyBindings) === -1) {
- keyBindings.push(this.keyBindings);
- }
-
- return keyBindings;
- },
-
- _prepKeyBindings: function() {
- this._keyBindings = {};
-
- this._collectKeyBindings().forEach(function(keyBindings) {
- for (var eventString in keyBindings) {
- this._addKeyBinding(eventString, keyBindings[eventString]);
- }
- }, this);
-
- for (var eventString in this._imperativeKeyBindings) {
- this._addKeyBinding(eventString, this._imperativeKeyBindings[eventString]);
- }
-
- // Give precedence to combos with modifiers to be checked first.
- for (var eventName in this._keyBindings) {
- this._keyBindings[eventName].sort(function (kb1, kb2) {
- var b1 = kb1[0].hasModifiers;
- var b2 = kb2[0].hasModifiers;
- return (b1 === b2) ? 0 : b1 ? -1 : 1;
- })
- }
- },
-
- _addKeyBinding: function(eventString, handlerName) {
- parseEventString(eventString).forEach(function(keyCombo) {
- this._keyBindings[keyCombo.event] =
- this._keyBindings[keyCombo.event] || [];
-
- this._keyBindings[keyCombo.event].push([
- keyCombo,
- handlerName
- ]);
- }, this);
- },
-
- _resetKeyEventListeners: function() {
- this._unlistenKeyEventListeners();
-
- if (this.isAttached) {
- this._listenKeyEventListeners();
- }
- },
-
- _listenKeyEventListeners: function() {
- if (!this.keyEventTarget) {
- return;
- }
- Object.keys(this._keyBindings).forEach(function(eventName) {
- var keyBindings = this._keyBindings[eventName];
- var boundKeyHandler = this._onKeyBindingEvent.bind(this, keyBindings);
-
- this._boundKeyHandlers.push([this.keyEventTarget, eventName, boundKeyHandler]);
-
- this.keyEventTarget.addEventListener(eventName, boundKeyHandler);
- }, this);
- },
-
- _unlistenKeyEventListeners: function() {
- var keyHandlerTuple;
- var keyEventTarget;
- var eventName;
- var boundKeyHandler;
-
- while (this._boundKeyHandlers.length) {
- // My kingdom for block-scope binding and destructuring assignment..
- keyHandlerTuple = this._boundKeyHandlers.pop();
- keyEventTarget = keyHandlerTuple[0];
- eventName = keyHandlerTuple[1];
- boundKeyHandler = keyHandlerTuple[2];
-
- keyEventTarget.removeEventListener(eventName, boundKeyHandler);
- }
- },
-
- _onKeyBindingEvent: function(keyBindings, event) {
- if (this.stopKeyboardEventPropagation) {
- event.stopPropagation();
- }
-
- // if event has been already prevented, don't do anything
- if (event.defaultPrevented) {
- return;
- }
-
- for (var i = 0; i < keyBindings.length; i++) {
- var keyCombo = keyBindings[i][0];
- var handlerName = keyBindings[i][1];
- if (keyComboMatchesEvent(keyCombo, event)) {
- this._triggerKeyHandler(keyCombo, handlerName, event);
- // exit the loop if eventDefault was prevented
- if (event.defaultPrevented) {
- return;
- }
- }
- }
- },
-
- _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) {
- var detail = Object.create(keyCombo);
- detail.keyboardEvent = keyboardEvent;
- var event = new CustomEvent(keyCombo.event, {
- detail: detail,
- cancelable: true
- });
- this[handlerName].call(this, event);
- if (event.defaultPrevented) {
- keyboardEvent.preventDefault();
- }
- }
- };
- })();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.bower.json
deleted file mode 100644
index e6d37e625c7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.bower.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "iron-autogrow-textarea",
- "version": "1.0.12",
- "description": "A textarea element that automatically grows with input",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input",
- "textarea"
- ],
- "main": "iron-autogrow-textarea.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-autogrow-textarea.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-autogrow-textarea",
- "ignore": [],
- "dependencies": {
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.0.12",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.12",
- "commit": "86f8fd61b412bcea6bc7b8feaee9b24bc2ad48ea"
- },
- "_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-autogrow-textarea"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.travis.yml
deleted file mode 100644
index 771bf35d1e6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: lIogwlz5kFUKYy1OWASXxQgZE4YTyjUY0QcEgnqbv6wQ0GX8wRMgbI3zhbAv+xXU5ieYXg6Bd47ZFZZ1kVEWzQynAdd2od14Eu1vfN60/yc/llz62VTYuFsPt8r+Tgw41Iz8plwejK4a+V26Da5tXW+soJQOJKvE/MOiPzKi2m0=
- - secure: cj3uSCQwLY6pyP3oTdGFjJoTRjv3G1lSe73fMd6i15XnMMxM4DVarfDtK+a0dPPxDY8BBhfr4sFClZuWX71bAHQuqUA84oigbeWt2xfl8d3HUuvr9aEnQxAGe2eQE7atpYJPC9M447sw48QKiUVgQo33DeJ1BGj6SBqkw0BJXO8=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/README.md
deleted file mode 100644
index b207d330fd1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-autogrow-textarea.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-autogrow-textarea.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-autogrow-textarea)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-autogrow-textarea)_
-
-
-##&lt;iron-autogrow-textarea&gt;
-
-`iron-autogrow-textarea` is an element containing a textarea that grows in height as more
-lines of input are entered. Unless an explicit height or the `maxRows` property is set, it will
-never scroll.
-
-Example:
-
-```html
-<iron-autogrow-textarea></iron-autogrow-textarea>
-```
-
-Because the `textarea`'s `value` property is not observable, you should use
-this element's `bind-value` instead for imperative updates.
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--iron-autogrow-textarea` | Mixin applied to the textarea | `{}` |
-| `--iron-autogrow-textarea-placeholder` | Mixin applied to the textarea placeholder | `{}` |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/bower.json
deleted file mode 100644
index 67be4a66860..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "iron-autogrow-textarea",
- "version": "1.0.12",
- "description": "A textarea element that automatically grows with input",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input",
- "textarea"
- ],
- "main": "iron-autogrow-textarea.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-autogrow-textarea.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-autogrow-textarea",
- "ignore": [],
- "dependencies": {
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/demo/index.html
deleted file mode 100644
index 525d90a43e8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/demo/index.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>iron-autogrow-textarea demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../iron-autogrow-textarea.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- iron-autogrow-textarea {
- display: block;
- width: 200px;
- margin: 5px 0;
- }
-
- textarea {
- width: 200px;
- }
-
- .vertical-section {
- box-sizing: border-box;
- width: 400px;
- margin: 0;
- }
- </style>
- </head>
- <body unresolved>
- <div class="vertical-section-container centered">
- <h3>An iron-autogrow-textarea grows automatically as more text is entered</h3>
- <demo-snippet class="centered-demo">
- <template>
- <iron-autogrow-textarea></iron-autogrow-textarea>
- </template>
- </demo-snippet>
-
- <h3>The maximum height can be controlled either through the <i>max-rows</i>
- property, or through a fixed max height</h3>
- <demo-snippet class="centered-demo">
- <template>
- <iron-autogrow-textarea max-rows="4" placeholder="scrolls after 4 rows"></iron-autogrow-textarea>
- <iron-autogrow-textarea style="max-height: 50px;" placeholder="scrolls after 50px"></iron-autogrow-textarea>
- </template>
- </demo-snippet>
-
- <h3>The initial height can also be controlled using the <i>rows</i> property,
- or through a fixed height</h3>
- <demo-snippet class="centered-demo">
- <template>
- <iron-autogrow-textarea rows="4" placeholder="start with 4 rows"></iron-autogrow-textarea>
- <iron-autogrow-textarea style="height: 50px;"></iron-autogrow-textarea>
- </template>
- </demo-snippet>
-
- <h3>Example of updating the value imperatively</h3>
- <!-- TODO: replace this with a demo-snippet when https://github.com/webcomponents/webcomponentsjs/issues/362
- is fixed -->
- <div class="example">
- <template is="dom-bind">
- <div class="vertical-section">
- <iron-autogrow-textarea bind-value="{{bindValue}}" id="a1"></iron-autogrow-textarea>
- <br>
- <code>bind-value</code>: <span>[[bindValue]]</span>
- <p on-click="setValue">
- Imperatively changing <code>bind-value</code> will also update
- <code>textarea.value</code>:<br>
- <textarea></textarea>
- <button value="bindValue">set</button>
- <br><br>
-
- Imperatively updating <code>textarea.value</code> will update
- the display, but not update <code>bind-value</code>:<br>
- <textarea></textarea>
- <button value="value">set</button>
- </p>
- </div>
- </template>
- </div>
- </div>
- <script>
- var scope = document.querySelector('template[is=dom-bind]');
-
- scope.setValue = function(event) {
- if (!(event.target instanceof HTMLButtonElement)) {
- return;
- }
- var inputValue = event.target.previousElementSibling.value;
- if (event.target.value == "bindValue") {
- document.querySelector('#a1').bindValue = inputValue;
- } else {
- document.querySelector('#a1').textarea.value = inputValue;
- }
- }
- </script>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/hero.svg
deleted file mode 100755
index 19ec70a0545..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/hero.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <path d="M140,47c-3,0-4.7-2.4-6.2-4.4c-1.3-1.9-2.4-3.6-4.7-3.6c-2.3,0-3.4,1.7-4.7,3.6c-1.5,2.1-3.1,4.4-6.4,4.4
- c-3.3,0-4.9-2.4-6.4-4.4c-1.3-1.9-2.5-3.6-4.8-3.6c-2.3,0-3.4,1.7-4.8,3.6c-1.5,2.1-3.1,4.4-6.4,4.4s-5.2-2.4-6.7-4.4
- c-1.3-1.9-2-3.6-5-3.6v-2c4,0,5.2,2.4,6.7,4.4c1.3,1.9,2.6,3.6,4.9,3.6c2.3,0,3.5-1.7,4.8-3.6c1.5-2.1,3.1-4.4,6.5-4.4
- s5,2.4,6.4,4.4c1.3,1.9,2.5,3.6,4.8,3.6c2.3,0,3.4-1.7,4.8-3.6c1.5-2.1,3.1-4.4,6.4-4.4c3.3,0,4.7,2.4,6.2,4.4
- c1.3,1.9,2.5,3.6,4.5,3.6V47z"/>
- <path d="M140,65c-3,0-4.7-2.4-6.2-4.4c-1.3-1.9-2.4-3.6-4.7-3.6c-2.3,0-3.4,1.7-4.7,3.6c-1.5,2.1-3.1,4.4-6.4,4.4
- c-3.3,0-4.9-2.4-6.4-4.4c-1.3-1.9-2.5-3.6-4.8-3.6c-2.3,0-3.4,1.7-4.8,3.6c-1.5,2.1-3.1,4.4-6.4,4.4s-5.2-2.4-6.7-4.4
- c-1.3-1.9-2-3.6-5-3.6v-2c4,0,5.2,2.4,6.7,4.4c1.3,1.9,2.6,3.6,4.9,3.6c2.3,0,3.5-1.7,4.8-3.6c1.5-2.1,3.1-4.4,6.5-4.4
- s5,2.4,6.4,4.4c1.3,1.9,2.5,3.6,4.8,3.6c2.3,0,3.4-1.7,4.8-3.6c1.5-2.1,3.1-4.4,6.4-4.4c3.3,0,4.7,2.4,6.2,4.4
- c1.3,1.9,2.5,3.6,4.5,3.6V65z"/>
- <path d="M140,83c-3,0-4.7-2.4-6.2-4.4c-1.3-1.9-2.4-3.6-4.7-3.6c-2.3,0-3.4,1.7-4.7,3.6c-1.5,2.1-3.1,4.4-6.4,4.4
- c-3.3,0-4.9-2.4-6.4-4.4c-1.3-1.9-2.5-3.6-4.8-3.6c-2.3,0-3.4,1.7-4.8,3.6c-1.5,2.1-3.1,4.4-6.4,4.4s-5.2-2.4-6.7-4.4
- c-1.3-1.9-2-3.6-5-3.6v-2c4,0,5.2,2.4,6.7,4.4c1.3,1.9,2.6,3.6,4.9,3.6c2.3,0,3.5-1.7,4.8-3.6c1.5-2.1,3.1-4.4,6.5-4.4
- s5,2.4,6.4,4.4c1.3,1.9,2.5,3.6,4.8,3.6c2.3,0,3.4-1.7,4.8-3.6c1.5-2.1,3.1-4.4,6.4-4.4c3.3,0,4.7,2.4,6.2,4.4
- c1.3,1.9,2.5,3.6,4.5,3.6V83z"/>
- <g id="ic_x5F_add_x0D_">
- </g>
- <path d="M151,102H73V24h78V102z M75,100h74V26H75V100z"/>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/index.html
deleted file mode 100644
index 3be2964faf2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-autogrow-textarea</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
- </head>
- <body>
-
- <iron-component-page></iron-component-page>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/iron-autogrow-textarea.html b/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/iron-autogrow-textarea.html
deleted file mode 100644
index b04f89b3bd7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-autogrow-textarea/iron-autogrow-textarea.html
+++ /dev/null
@@ -1,353 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
-<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
-
-<!--
-`iron-autogrow-textarea` is an element containing a textarea that grows in height as more
-lines of input are entered. Unless an explicit height or the `maxRows` property is set, it will
-never scroll.
-
-Example:
-
- <iron-autogrow-textarea></iron-autogrow-textarea>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--iron-autogrow-textarea` | Mixin applied to the textarea | `{}`
-`--iron-autogrow-textarea-placeholder` | Mixin applied to the textarea placeholder | `{}`
-
-@group Iron Elements
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="iron-autogrow-textarea">
-
- <style>
- :host {
- display: inline-block;
- position: relative;
- width: 400px;
- border: 1px solid;
- padding: 2px;
- -moz-appearance: textarea;
- -webkit-appearance: textarea;
- overflow: hidden;
- }
-
- .mirror-text {
- visibility: hidden;
- word-wrap: break-word;
- }
-
- .fit {
- @apply(--layout-fit);
- }
-
- textarea {
- position: relative;
- outline: none;
- border: none;
- resize: none;
- background: inherit;
- color: inherit;
- /* see comments in template */
- width: 100%;
- height: 100%;
- font-size: inherit;
- font-family: inherit;
- line-height: inherit;
- text-align: inherit;
- @apply(--iron-autogrow-textarea);
- }
-
- ::content textarea:invalid {
- box-shadow: none;
- }
-
- textarea::-webkit-input-placeholder {
- @apply(--iron-autogrow-textarea-placeholder);
- }
-
- textarea:-moz-placeholder {
- @apply(--iron-autogrow-textarea-placeholder);
- }
-
- textarea::-moz-placeholder {
- @apply(--iron-autogrow-textarea-placeholder);
- }
-
- textarea:-ms-input-placeholder {
- @apply(--iron-autogrow-textarea-placeholder);
- }
- </style>
- <template>
- <!-- the mirror sizes the input/textarea so it grows with typing -->
- <!-- use &#160; instead &nbsp; of to allow this element to be used in XHTML -->
- <div id="mirror" class="mirror-text" aria-hidden="true">&#160;</div>
-
- <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff -->
- <div class="textarea-container fit">
- <textarea id="textarea"
- name$="[[name]]"
- autocomplete$="[[autocomplete]]"
- autofocus$="[[autofocus]]"
- inputmode$="[[inputmode]]"
- placeholder$="[[placeholder]]"
- readonly$="[[readonly]]"
- required$="[[required]]"
- disabled$="[[disabled]]"
- rows$="[[rows]]"
- maxlength$="[[maxlength]]"></textarea>
- </div>
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'iron-autogrow-textarea',
-
- behaviors: [
- Polymer.IronFormElementBehavior,
- Polymer.IronValidatableBehavior,
- Polymer.IronControlState
- ],
-
- properties: {
-
- /**
- * Use this property instead of `value` for two-way data binding.
- * This property will be deprecated in the future. Use `value` instead.
- * @type {string|number}
- */
- bindValue: {
- observer: '_bindValueChanged',
- type: String
- },
-
- /**
- * The initial number of rows.
- *
- * @attribute rows
- * @type number
- * @default 1
- */
- rows: {
- type: Number,
- value: 1,
- observer: '_updateCached'
- },
-
- /**
- * The maximum number of rows this element can grow to until it
- * scrolls. 0 means no maximum.
- *
- * @attribute maxRows
- * @type number
- * @default 0
- */
- maxRows: {
- type: Number,
- value: 0,
- observer: '_updateCached'
- },
-
- /**
- * Bound to the textarea's `autocomplete` attribute.
- */
- autocomplete: {
- type: String,
- value: 'off'
- },
-
- /**
- * Bound to the textarea's `autofocus` attribute.
- */
- autofocus: {
- type: Boolean,
- value: false
- },
-
- /**
- * Bound to the textarea's `inputmode` attribute.
- */
- inputmode: {
- type: String
- },
-
- /**
- * Bound to the textarea's `placeholder` attribute.
- */
- placeholder: {
- type: String
- },
-
- /**
- * Bound to the textarea's `readonly` attribute.
- */
- readonly: {
- type: String
- },
-
- /**
- * Set to true to mark the textarea as required.
- */
- required: {
- type: Boolean
- },
-
- /**
- * The maximum length of the input value.
- */
- maxlength: {
- type: Number
- }
-
- },
-
- listeners: {
- 'input': '_onInput'
- },
-
- observers: [
- '_onValueChanged(value)'
- ],
-
- /**
- * Returns the underlying textarea.
- * @type HTMLTextAreaElement
- */
- get textarea() {
- return this.$.textarea;
- },
-
- /**
- * Returns textarea's selection start.
- * @type Number
- */
- get selectionStart() {
- return this.$.textarea.selectionStart;
- },
-
- /**
- * Returns textarea's selection end.
- * @type Number
- */
- get selectionEnd() {
- return this.$.textarea.selectionEnd;
- },
-
- /**
- * Sets the textarea's selection start.
- */
- set selectionStart(value) {
- this.$.textarea.selectionStart = value;
- },
-
- /**
- * Sets the textarea's selection end.
- */
- set selectionEnd(value) {
- this.$.textarea.selectionEnd = value;
- },
-
- /**
- * Returns true if `value` is valid. The validator provided in `validator`
- * will be used first, if it exists; otherwise, the `textarea`'s validity
- * is used.
- * @return {boolean} True if the value is valid.
- */
- validate: function() {
- // Empty, non-required input is valid.
- if (!this.required && this.value == '') {
- this.invalid = false;
- return true;
- }
-
- var valid;
- if (this.hasValidator()) {
- valid = Polymer.IronValidatableBehavior.validate.call(this, this.value);
- } else {
- valid = this.$.textarea.validity.valid;
- this.invalid = !valid;
- }
- this.fire('iron-input-validate');
- return valid;
- },
-
- _bindValueChanged: function() {
- var textarea = this.textarea;
- if (!textarea) {
- return;
- }
-
- // If the bindValue changed manually, then we need to also update
- // the underlying textarea's value. Otherwise this change was probably
- // generated from the _onInput handler, and the two values are already
- // the same.
- if (textarea.value !== this.bindValue) {
- textarea.value = !(this.bindValue || this.bindValue === 0) ? '' : this.bindValue;
- }
-
- this.value = this.bindValue;
- this.$.mirror.innerHTML = this._valueForMirror();
- // manually notify because we don't want to notify until after setting value
- this.fire('bind-value-changed', {value: this.bindValue});
- },
-
- _onInput: function(event) {
- this.bindValue = event.path ? event.path[0].value : event.target.value;
- },
-
- _constrain: function(tokens) {
- var _tokens;
- tokens = tokens || [''];
- // Enforce the min and max heights for a multiline input to avoid measurement
- if (this.maxRows > 0 && tokens.length > this.maxRows) {
- _tokens = tokens.slice(0, this.maxRows);
- } else {
- _tokens = tokens.slice(0);
- }
- while (this.rows > 0 && _tokens.length < this.rows) {
- _tokens.push('');
- }
- // Use &#160; instead &nbsp; of to allow this element to be used in XHTML.
- return _tokens.join('<br/>') + '&#160;';
- },
-
- _valueForMirror: function() {
- var input = this.textarea;
- if (!input) {
- return;
- }
- this.tokens = (input && input.value) ? input.value.replace(/&/gm, '&amp;').replace(/"/gm, '&quot;').replace(/'/gm, '&#39;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;').split('\n') : [''];
- return this._constrain(this.tokens);
- },
-
- _updateCached: function() {
- this.$.mirror.innerHTML = this._constrain(this.tokens);
- },
-
- _onValueChanged: function() {
- this.bindValue = this.value;
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.bower.json
deleted file mode 100644
index a8b8863cc88..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.bower.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "iron-behaviors",
- "version": "1.0.16",
- "description": "Provides a set of behaviors for the iron elements",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-behaviors.git"
- },
- "main": [
- "iron-button-state.html",
- "iron-control-state.html"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.2.0",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "paper-input": "polymerelements/paper-input#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/polymerelements/iron-behaviors",
- "_release": "1.0.16",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.16",
- "commit": "161e67233c4776e32a275a719a000865ed309393"
- },
- "_source": "git://github.com/polymerelements/iron-behaviors.git",
- "_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-behaviors"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.github/ISSUE_TEMPLATE.md b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 1cc85c0c790..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- Instructions: https://github.com/PolymerElements/iron-behaviors/CONTRIBUTING.md#filing-issues -->
-### Description
-<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
-
-### Expected outcome
-
-<!-- Example: The page stays the same color. -->
-
-### Actual outcome
-
-<!-- Example: The page turns pink. -->
-
-### Live Demo
-<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
-
-### Steps to reproduce
-
-<!-- Example
-1. Put a `paper-foo` element in the page.
-2. Open the page in a web browser.
-3. Click the `paper-foo` element.
--->
-
-### Browsers Affected
-<!-- Check all that apply -->
-- [ ] Chrome
-- [ ] Firefox
-- [ ] Safari 9
-- [ ] Safari 8
-- [ ] Safari 7
-- [ ] Edge
-- [ ] IE 11
-- [ ] IE 10
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.travis.yml
deleted file mode 100644
index 9379f90f5b0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
- - secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/README.md
deleted file mode 100644
index 0a0629ec7e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-button-state.html iron-control-state.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-behaviors.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-behaviors)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-behaviors)_
-
-
-<!-- No docs for Polymer.IronButtonState found. -->
-
-<!-- No docs for Polymer.IronControlState found. -->
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/bower.json
deleted file mode 100644
index 89d24c05148..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/bower.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "iron-behaviors",
- "version": "1.0.16",
- "description": "Provides a set of behaviors for the iron elements",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-behaviors.git"
- },
- "main": [
- "iron-button-state.html",
- "iron-control-state.html"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.2.0",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "paper-input": "polymerelements/paper-input#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/index.html
deleted file mode 100644
index 51fe2d648a4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>simple-button</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link href="../../paper-styles/demo-pages.html" rel="import">
- <link href="simple-button.html" rel="import">
-
- <style>
-
- .vertical-section {
- text-align: center;
- }
-
- </style>
-
-</head>
-<body>
- <div class="vertical-section vertical-section-container centered">
- <h3>Normal</h3>
-
- <simple-button tabindex="0">Hello World</simple-button>
-
- <h3>Toggles</h3>
-
- <simple-button toggles tabindex="0">Hello World</simple-button>
-
- <h3>Disabled</h3>
-
- <simple-button disabled tabindex="0">Hello World</simple-button>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/simple-button.html b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/simple-button.html
deleted file mode 100644
index 8df8635de34..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/demo/simple-button.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-button-state.html">
-<link rel="import" href="../iron-control-state.html">
-
-<dom-module id="simple-button">
-
- <style>
-
- :host {
- display: inline-block;
- background-color: #4285F4;
- color: #fff;
- min-height: 8px;
- min-width: 8px;
- padding: 16px;
- text-transform: uppercase;
- border-radius: 3px;
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- cursor: pointer;
- }
-
- :host([disabled]) {
- opacity: 0.3;
- pointer-events: none;
- }
-
- :host([active]),
- :host([pressed]) {
- background-color: #3367D6;
- box-shadow: inset 0 3px 5px rgba(0,0,0,.2);
- }
-
- </style>
-
- <template>
-
- <content></content>
-
- </template>
-
- <script>
-
- Polymer({
-
- behaviors: [
- Polymer.IronControlState,
- Polymer.IronButtonState
- ],
-
- hostAttributes: {
- role: 'button'
- }
- });
-
- </script>
-
-</dom-module>
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/index.html
deleted file mode 100644
index 220deb00349..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>Iron Behaviors</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page src="iron-button-state.html"></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-button-state.html b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-button-state.html
deleted file mode 100644
index 8114e2ddea8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-button-state.html
+++ /dev/null
@@ -1,228 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="iron-control-state.html">
-
-<script>
-
- /**
- * @demo demo/index.html
- * @polymerBehavior Polymer.IronButtonState
- */
- Polymer.IronButtonStateImpl = {
-
- properties: {
-
- /**
- * If true, the user is currently holding down the button.
- */
- pressed: {
- type: Boolean,
- readOnly: true,
- value: false,
- reflectToAttribute: true,
- observer: '_pressedChanged'
- },
-
- /**
- * If true, the button toggles the active state with each tap or press
- * of the spacebar.
- */
- toggles: {
- type: Boolean,
- value: false,
- reflectToAttribute: true
- },
-
- /**
- * If true, the button is a toggle and is currently in the active state.
- */
- active: {
- type: Boolean,
- value: false,
- notify: true,
- reflectToAttribute: true
- },
-
- /**
- * True if the element is currently being pressed by a "pointer," which
- * is loosely defined as mouse or touch input (but specifically excluding
- * keyboard input).
- */
- pointerDown: {
- type: Boolean,
- readOnly: true,
- value: false
- },
-
- /**
- * True if the input device that caused the element to receive focus
- * was a keyboard.
- */
- receivedFocusFromKeyboard: {
- type: Boolean,
- readOnly: true
- },
-
- /**
- * The aria attribute to be set if the button is a toggle and in the
- * active state.
- */
- ariaActiveAttribute: {
- type: String,
- value: 'aria-pressed',
- observer: '_ariaActiveAttributeChanged'
- }
- },
-
- listeners: {
- down: '_downHandler',
- up: '_upHandler',
- tap: '_tapHandler'
- },
-
- observers: [
- '_detectKeyboardFocus(focused)',
- '_activeChanged(active, ariaActiveAttribute)'
- ],
-
- keyBindings: {
- 'enter:keydown': '_asyncClick',
- 'space:keydown': '_spaceKeyDownHandler',
- 'space:keyup': '_spaceKeyUpHandler',
- },
-
- _mouseEventRe: /^mouse/,
-
- _tapHandler: function() {
- if (this.toggles) {
- // a tap is needed to toggle the active state
- this._userActivate(!this.active);
- } else {
- this.active = false;
- }
- },
-
- _detectKeyboardFocus: function(focused) {
- this._setReceivedFocusFromKeyboard(!this.pointerDown && focused);
- },
-
- // to emulate native checkbox, (de-)activations from a user interaction fire
- // 'change' events
- _userActivate: function(active) {
- if (this.active !== active) {
- this.active = active;
- this.fire('change');
- }
- },
-
- _downHandler: function(event) {
- this._setPointerDown(true);
- this._setPressed(true);
- this._setReceivedFocusFromKeyboard(false);
- },
-
- _upHandler: function() {
- this._setPointerDown(false);
- this._setPressed(false);
- },
-
- /**
- * @param {!KeyboardEvent} event .
- */
- _spaceKeyDownHandler: function(event) {
- var keyboardEvent = event.detail.keyboardEvent;
- var target = Polymer.dom(keyboardEvent).localTarget;
-
- // Ignore the event if this is coming from a focused light child, since that
- // element will deal with it.
- if (this.isLightDescendant(/** @type {Node} */(target)))
- return;
-
- keyboardEvent.preventDefault();
- keyboardEvent.stopImmediatePropagation();
- this._setPressed(true);
- },
-
- /**
- * @param {!KeyboardEvent} event .
- */
- _spaceKeyUpHandler: function(event) {
- var keyboardEvent = event.detail.keyboardEvent;
- var target = Polymer.dom(keyboardEvent).localTarget;
-
- // Ignore the event if this is coming from a focused light child, since that
- // element will deal with it.
- if (this.isLightDescendant(/** @type {Node} */(target)))
- return;
-
- if (this.pressed) {
- this._asyncClick();
- }
- this._setPressed(false);
- },
-
- // trigger click asynchronously, the asynchrony is useful to allow one
- // event handler to unwind before triggering another event
- _asyncClick: function() {
- this.async(function() {
- this.click();
- }, 1);
- },
-
- // any of these changes are considered a change to button state
-
- _pressedChanged: function(pressed) {
- this._changedButtonState();
- },
-
- _ariaActiveAttributeChanged: function(value, oldValue) {
- if (oldValue && oldValue != value && this.hasAttribute(oldValue)) {
- this.removeAttribute(oldValue);
- }
- },
-
- _activeChanged: function(active, ariaActiveAttribute) {
- if (this.toggles) {
- this.setAttribute(this.ariaActiveAttribute,
- active ? 'true' : 'false');
- } else {
- this.removeAttribute(this.ariaActiveAttribute);
- }
- this._changedButtonState();
- },
-
- _controlStateChanged: function() {
- if (this.disabled) {
- this._setPressed(false);
- } else {
- this._changedButtonState();
- }
- },
-
- // provide hook for follow-on behaviors to react to button-state
-
- _changedButtonState: function() {
- if (this._buttonStateChanged) {
- this._buttonStateChanged(); // abstract
- }
- }
-
- };
-
- /** @polymerBehavior */
- Polymer.IronButtonState = [
- Polymer.IronA11yKeysBehavior,
- Polymer.IronButtonStateImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-control-state.html b/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-control-state.html
deleted file mode 100644
index f34d057994a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-behaviors/iron-control-state.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-
- /**
- * @demo demo/index.html
- * @polymerBehavior
- */
- Polymer.IronControlState = {
-
- properties: {
-
- /**
- * If true, the element currently has focus.
- */
- focused: {
- type: Boolean,
- value: false,
- notify: true,
- readOnly: true,
- reflectToAttribute: true
- },
-
- /**
- * If true, the user cannot interact with this element.
- */
- disabled: {
- type: Boolean,
- value: false,
- notify: true,
- observer: '_disabledChanged',
- reflectToAttribute: true
- },
-
- _oldTabIndex: {
- type: Number
- },
-
- _boundFocusBlurHandler: {
- type: Function,
- value: function() {
- return this._focusBlurHandler.bind(this);
- }
- }
-
- },
-
- observers: [
- '_changedControlState(focused, disabled)'
- ],
-
- ready: function() {
- this.addEventListener('focus', this._boundFocusBlurHandler, true);
- this.addEventListener('blur', this._boundFocusBlurHandler, true);
- },
-
- _focusBlurHandler: function(event) {
- // NOTE(cdata): if we are in ShadowDOM land, `event.target` will
- // eventually become `this` due to retargeting; if we are not in
- // ShadowDOM land, `event.target` will eventually become `this` due
- // to the second conditional which fires a synthetic event (that is also
- // handled). In either case, we can disregard `event.path`.
-
- if (event.target === this) {
- this._setFocused(event.type === 'focus');
- } else if (!this.shadowRoot) {
- var target = /** @type {Node} */(Polymer.dom(event).localTarget);
- if (!this.isLightDescendant(target)) {
- this.fire(event.type, {sourceEvent: event}, {
- node: this,
- bubbles: event.bubbles,
- cancelable: event.cancelable
- });
- }
- }
- },
-
- _disabledChanged: function(disabled, old) {
- this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
- this.style.pointerEvents = disabled ? 'none' : '';
- if (disabled) {
- this._oldTabIndex = this.tabIndex;
- this._setFocused(false);
- this.tabIndex = -1;
- this.blur();
- } else if (this._oldTabIndex !== undefined) {
- this.tabIndex = this._oldTabIndex;
- }
- },
-
- _changedControlState: function() {
- // _controlStateChanged is abstract, follow-on behaviors may implement it
- if (this._controlStateChanged) {
- this._controlStateChanged();
- }
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.bower.json
deleted file mode 100644
index 31b32b0aef1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.bower.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "iron-checked-element-behavior",
- "version": "1.0.4",
- "description": "Implements an element that has a checked attribute and can be added to a form",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "main": "iron-checked-element-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-checked-element-behavior.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-checked-element-behavior",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "*",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.0.4",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.4",
- "commit": "cc30263ec2871ae8f8f944948f44299d3f3cdf0d"
- },
- "_source": "git://github.com/PolymerElements/iron-checked-element-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-checked-element-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.travis.yml
deleted file mode 100644
index 0b7456d71e8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install web-component-tester
- - npm install bower
- - 'export PATH=$PWD/node_modules/.bin:$PATH'
- - bower install
-env:
- global:
- - secure: EJSBYkW/C3ppDTbxHYRzyFPAko5R1ET1LSbdM484/j0OHGLkSIwtKrrZLNz5+QEmKSw79MpLpBoD+SfXuSCn0yKkf6tvK4mt+kRs32vKVfoWrYReVcfth+EWV7QDpTDJw1QEijT1bKUxULhP0OrT2/5vVpKpXX2zczg+VFL7IZuY3y1dsA4qWmWTfMiAk3762dZx47D5qzJ4POHlpG0i/cHH2EgqV8sFXFBctf6EY68GqzStPUuMuea6xX2wMrebg6vqQDfDb1gs8N34gxGE+u8QaqOSniW1Vzdoe1vwOUo4dbJYw3JMYK5Qn2pj3p2E4m9J609JNnBfqjS7mB5KVC7Hf5r9ul3UMsAIlOnlmSqOq1oO22/3regjWHGjlrzCNHzma2SgDhTxGaLDJl1LnsUevbVb6TGloiQPXwum8oa7dvZ1PqspqyqZEb31t/FyUnG+VXnC0YYpdRj3eRGqeoqqaNtad97DrPHP7er9LdvJIKjsXux7gUW4hKWsr+jsU/krdHpTUC8GYWdTF54EcLhxfzNYKL7voTq+xoQ2yxCOSiBmcQCviuQyVvNQyhde/+edAmOt24CLiuSQjHCbEWzBQs9QinUPRekg6+LJ1WaifTIKkhsm04AdaZrs7LR34hF+Mpqp4HHl/AfcbtVeB/W7jUnhJyMFaQDfGkpzSZs=
- - secure: izhN5Z3WdajR3ois2T55qepsvLwVg/wv8u4kVQ4TqWhUL08tka83m/W+EMzS/tcvfz7J3VkuTFrJ5scYD9kaTVhRo4dv2u+DdbPmTNcf/hmADXLVLxddyueK3bWEcBurg8+rSdqq/RdI+5CPwWeGtQl+lmjRCyBzodIpQ90zJQF4Al7nmmLuEUhiNVjuqQ3VB1pFLYgky4SVM0bfJnoKSDsZ2z9DOOJE34ZUUmcNqVcQoZ5/oM+PWdVDkUqW3vMK1lTMtE/dk6WcSztQwFyoMrW+uzEstPwUsJCyuBEx4KdioXZH3vrlxRApySfHmEf5eVWwE6jyPSHuWj/2D5O4R9LY1dq1Wcoiu3BJj19B4V3s4L2uJF+xL077d4Mna6z9dE4RSRzs8Z8MvSMTgzDkga/A25JI3XxJMJ78WTbkNQ4hVFN2xwcU5cm+fbs3Sr1ZEdFW/MWAPtUQOzscqS5Op7sSLLaiqO+R0zj56H2NA2bl/zCmbZhyLcOPl0oAfJ85bqNxyF8CoO+GZ98UG15ROigC90/HCP7TUHZnQSrGtiFGTiPTBm+VCITYmC5IEyJBTwgqh/ljbDzz4UuSZ3KsldL3MwWnqO3tGr6VvPfqKF6xq0vuyn9P7f9WNAYwZGcRi3AtxtY+znO+IGv2sGmrfo7ZY+U4nceXTEDrG8OY0Jo=
-node_js: 4
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/README.md
deleted file mode 100644
index fc570916df1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-checked-element-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/iron-checked-element-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-checked-element-behavior)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-checked-element-behavior)_
-
-
-##Polymer.IronCheckedElementBehavior
-
-
-Use `Polymer.IronCheckedElementBehavior` to implement a custom element
-that has a `checked` property, which can be used for validation if the
-element is also `required`. Element instances implementing this behavior
-will also be registered for use in an `iron-form` element.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/bower.json
deleted file mode 100644
index 65154c82faf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/bower.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "iron-checked-element-behavior",
- "version": "1.0.4",
- "description": "Implements an element that has a checked attribute and can be added to a form",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "main": "iron-checked-element-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-checked-element-behavior.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-checked-element-behavior",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "*",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/index.html
deleted file mode 100644
index 788a64f0016..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/index.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>iron-checked-element-behavior demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="simple-checkbox.html">
-</head>
-<body unresolved>
- <div class="horizontal-section-container">
- <div>
- <h4>Not required</h4>
- <div class="horizontal-section">
- <simple-checkbox></simple-checkbox>
- </div>
- </div>
- <div>
- <h4>Required</h4>
- <div class="horizontal-section">
- <simple-checkbox required></simple-checkbox>
- </div>
- </div>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/simple-checkbox.html b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/simple-checkbox.html
deleted file mode 100644
index fd99c98a486..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/demo/simple-checkbox.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../paper-button/paper-button.html">
-<link rel="import" href="../iron-checked-element-behavior.html">
-
-<dom-module id="simple-checkbox">
- <style>
- :host {
- display: block;
- }
-
- :host([invalid]) span {
- color: red;
- }
-
- #labelText {
- display: inline-block;
- width: 100px;
- }
- </style>
- <template>
- <input type="checkbox" id="checkbox" on-tap="_onCheckTap">
- <span id="labelText">{{label}}</span>
- <paper-button raised on-click="_onClick">validate</paper-button>
-
- </template>
- <script>
- Polymer({
-
- is: 'simple-checkbox',
-
- behaviors: [
- Polymer.IronCheckedElementBehavior
- ],
-
- properties: {
- label: {
- type: String,
- value: 'not validated'
- }
- },
-
- _onCheckTap: function() {
- this.checked = this.$.checkbox.checked;
- },
-
- _onClick: function() {
- this.validate();
- this.label = this.invalid ? 'is invalid' : 'is valid';
- }
- });
-
- </script>
-
- </dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/index.html
deleted file mode 100644
index 1975dc5a75c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-checked-element-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/iron-checked-element-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/iron-checked-element-behavior.html
deleted file mode 100644
index 5809c03761a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-checked-element-behavior/iron-checked-element-behavior.html
+++ /dev/null
@@ -1,120 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
-<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
-
-<script>
-
- /**
- * Use `Polymer.IronCheckedElementBehavior` to implement a custom element
- * that has a `checked` property, which can be used for validation if the
- * element is also `required`. Element instances implementing this behavior
- * will also be registered for use in an `iron-form` element.
- *
- * @demo demo/index.html
- * @polymerBehavior Polymer.IronCheckedElementBehavior
- */
- Polymer.IronCheckedElementBehaviorImpl = {
-
- properties: {
- /**
- * Fired when the checked state changes.
- *
- * @event iron-change
- */
-
- /**
- * Gets or sets the state, `true` is checked and `false` is unchecked.
- */
- checked: {
- type: Boolean,
- value: false,
- reflectToAttribute: true,
- notify: true,
- observer: '_checkedChanged'
- },
-
- /**
- * If true, the button toggles the active state with each tap or press
- * of the spacebar.
- */
- toggles: {
- type: Boolean,
- value: true,
- reflectToAttribute: true
- },
-
- /* Overriden from Polymer.IronFormElementBehavior */
- value: {
- type: String,
- value: 'on',
- observer: '_valueChanged'
- }
- },
-
- observers: [
- '_requiredChanged(required)'
- ],
-
- created: function() {
- // Used by `iron-form` to handle the case that an element with this behavior
- // doesn't have a role of 'checkbox' or 'radio', but should still only be
- // included when the form is serialized if `this.checked === true`.
- this._hasIronCheckedElementBehavior = true;
- },
-
- /**
- * Returns false if the element is required and not checked, and true otherwise.
- * @param {*=} _value Ignored.
- * @return {boolean} true if `required` is false, or if `required` and `checked` are both true.
- */
- _getValidity: function(_value) {
- return this.disabled || !this.required || (this.required && this.checked);
- },
-
- /**
- * Update the aria-required label when `required` is changed.
- */
- _requiredChanged: function() {
- if (this.required) {
- this.setAttribute('aria-required', 'true');
- } else {
- this.removeAttribute('aria-required');
- }
- },
-
- /**
- * Fire `iron-changed` when the checked state changes.
- */
- _checkedChanged: function() {
- this.active = this.checked;
- this.fire('iron-change');
- },
-
- /**
- * Reset value to 'on' if it is set to `undefined`.
- */
- _valueChanged: function() {
- if (this.value === undefined || this.value === null) {
- this.value = 'on';
- }
- }
- };
-
- /** @polymerBehavior Polymer.IronCheckedElementBehavior */
- Polymer.IronCheckedElementBehavior = [
- Polymer.IronFormElementBehavior,
- Polymer.IronValidatableBehavior,
- Polymer.IronCheckedElementBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.bower.json
deleted file mode 100644
index 5156c032c2a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.bower.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "iron-collapse",
- "version": "1.1.0",
- "description": "Provides a collapsable container",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "container"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "https://github.com/PolymerElements/iron-collapse"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-collapse",
- "ignore": [],
- "dependencies": {
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.5.0"
- },
- "devDependencies": {
- "web-component-tester": "^4.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": "iron-collapse.html",
- "_release": "1.1.0",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.0",
- "commit": "f9e64ea7731c43430f48d64dddb80166334122c7"
- },
- "_source": "git://github.com/PolymerElements/iron-collapse.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-collapse"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.travis.yml
deleted file mode 100644
index e865fbcba66..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: W+IhreK2iEWsI8CtHVmTx6PVuXrQ6wULdox7o18XIcd3V2HMRKb0Wqz3OF8CqJ+OfkU6R5pKZI3pGhmba+2ecyTAzvF24f4bX6xP1XLKQn61fNFmwihhMkcCsjrv48mMsKIFTzmlIel2Wbvajks5ahf6Q3MfWa9/1rIATXgbEFE=
- - secure: UIS5DqFiRpXOxaalEiBcEqWSqn0SgXq7s0crXxa1391dojKCHY5Q/j8nQ0rfrVw5gT19wFnvci20Fn9i2USa1BbBCmzBSXAckDXt40G5ajHt0BwVdYB8eA4N5WBOlIjti8LfNRkrRy0yCvRq2OwpLmiFciCaQXGL1aZ6dig8x+k=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/README.md
deleted file mode 100644
index d1bf46b8655..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/README.md
+++ /dev/null
@@ -1,58 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-collapse.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-collapse.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-collapse)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-collapse)_
-
-
-##&lt;iron-collapse&gt;
-
-`iron-collapse` creates a collapsible block of content. By default, the content
-will be collapsed. Use `opened` or `toggle()` to show/hide the content.
-
-```html
-<button on-click="toggle">toggle collapse</button>
-
-<iron-collapse id="collapse">
- <div>Content goes here...</div>
-</iron-collapse>
-
-...
-
-toggle: function() {
- this.$.collapse.toggle();
-}
-```
-
-`iron-collapse` adjusts the max-height/max-width of the collapsible element to show/hide
-the content. So avoid putting padding/margin/border on the collapsible directly,
-and instead put a div inside and style that.
-
-```html
-<style>
- .collapse-content {
- padding: 15px;
- border: 1px solid #dedede;
- }
-</style>
-
-<iron-collapse>
- <div class="collapse-content">
- <div>Content goes here...</div>
- </div>
-</iron-collapse>
-```
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/bower.json
deleted file mode 100644
index c11034a9422..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/bower.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "iron-collapse",
- "version": "1.1.0",
- "description": "Provides a collapsable container",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "container"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "https://github.com/PolymerElements/iron-collapse"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-collapse",
- "ignore": [],
- "dependencies": {
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.5.0"
- },
- "devDependencies": {
- "web-component-tester": "^4.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": "iron-collapse.html"
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/demo/index.html
deleted file mode 100644
index 79a873c3c57..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/demo/index.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
- <head>
-
- <title>iron-collapse demo</title>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-collapse.html">
- <link rel="import" href="../../paper-styles/shadow.html">
- <link rel="stylesheet" href="../../paper-styles/demo.css">
-
- <style is="custom-style">
- .heading {
- padding: 10px 15px;
- margin-top: 20px;
- background-color: #f3f3f3;
- border: 1px solid #dedede;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- font-size: 18px;
- cursor: pointer;
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- width: 100%;
- text-align: left;
- }
-
- .content {
- padding: 15px;
- border: 1px solid #dedede;
- border-top: none;
- border-bottom-left-radius: 5px;
- border-bottom-right-radius: 5px;
- @apply(--shadow-elevation-2dp);
- }
-
- #collapse3 {
- max-height: 250px;
- }
-
- </style>
-
- </head>
- <body unresolved>
- <template is="dom-bind">
-
- <button class="heading" aria-expanded$="[[isExpanded(opened1)]]" aria-controls="collapse1" onclick="toggle('#collapse1')">Collapse #1</button>
-
- <iron-collapse id="collapse1" tabindex="0" opened="{{opened1}}">
- <div class="content">
- <div>Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus. Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.</div>
- </div>
- </iron-collapse>
-
- <button class="heading" aria-expanded$="[[isExpanded(opened2)]]" aria-controls="collapse2" onclick="toggle('#collapse2')">Collapse #2</button>
-
- <iron-collapse id="collapse2" tabindex="0" opened="{{opened2}}">
- <div class="content">
- <div>Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per. Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per.</div>
-
- <button class="heading" aria-expanded$="[[isExpanded(opened3)]]" aria-controls="collapse3" onclick="toggle('#collapse3')">Collapse #3 (horizontal)</button>
-
- <iron-collapse id="collapse3" tabindex="0" opened="{{opened3}}" horizontal>
- <div class="content">
- <div>Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel. Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel.</div>
- </div>
- </iron-collapse>
-
- <button class="heading" aria-expanded$="[[isExpanded(opened4)]]" aria-controls="collapse4" onclick="toggle('#collapse4')">Collapse #4 (no animation)</button>
-
- <iron-collapse id="collapse4" tabindex="0" opened="{{opened4}}" no-animation>
- <div class="content">
- <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
- </div>
- </iron-collapse>
- </div>
- </iron-collapse>
-</template>
-
-<script>
-
- function toggle(selector) {
- document.querySelector(selector).toggle();
- }
-
- document.querySelector('template[is=dom-bind]').isExpanded = function(opened) {
- return String(opened);
- };
-
-</script>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/hero.svg
deleted file mode 100755
index ae1a49efab0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/hero.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
- <path display="inline" fill="none" d="M167.5,51.7c3.7-0.8,6.9,2.4,6.1,6.1c-0.4,1.9-1.9,3.4-3.8,3.8c-3.7,0.8-6.9-2.4-6.1-6.1
- C164.2,53.6,165.7,52.1,167.5,51.7z"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <path d="M151,102H73V52h78V102z M75,100h74V54H75V100z"/>
- <path d="M151,38H73V24h78V38z M75,36h74V26H75V36z"/>
- <circle cx="171" cy="51" r="4"/>
- <path d="M151,72v-2c10.5,0,19-8.5,19-19s-8.5-19-19-19v-2c11.6,0,21,9.4,21,21S162.6,72,151,72z"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/index.html
deleted file mode 100644
index b5d20077c41..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-collapse</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
- </head>
- <body>
-
- <iron-component-page></iron-component-page>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/iron-collapse.html b/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/iron-collapse.html
deleted file mode 100644
index 03e32f46659..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-collapse/iron-collapse.html
+++ /dev/null
@@ -1,285 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
-
-<!--
-`iron-collapse` creates a collapsible block of content. By default, the content
-will be collapsed. Use `opened` or `toggle()` to show/hide the content.
-
- <button on-click="toggle">toggle collapse</button>
-
- <iron-collapse id="collapse">
- <div>Content goes here...</div>
- </iron-collapse>
-
- ...
-
- toggle: function() {
- this.$.collapse.toggle();
- }
-
-`iron-collapse` adjusts the max-height/max-width of the collapsible element to show/hide
-the content. So avoid putting padding/margin/border on the collapsible directly,
-and instead put a div inside and style that.
-
- <style>
- .collapse-content {
- padding: 15px;
- border: 1px solid #dedede;
- }
- </style>
-
- <iron-collapse>
- <div class="collapse-content">
- <div>Content goes here...</div>
- </div>
- </iron-collapse>
-
-@group Iron Elements
-@hero hero.svg
-@demo demo/index.html
-@element iron-collapse
--->
-
-<dom-module id="iron-collapse">
-
- <template>
-
- <style>
- :host {
- display: block;
- transition-duration: 300ms;
- overflow: visible;
- }
-
- :host(.iron-collapse-closed) {
- display: none;
- }
-
- :host(:not(.iron-collapse-opened)) {
- overflow: hidden;
- }
- </style>
-
- <content></content>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'iron-collapse',
-
- behaviors: [
- Polymer.IronResizableBehavior
- ],
-
- properties: {
-
- /**
- * If true, the orientation is horizontal; otherwise is vertical.
- *
- * @attribute horizontal
- */
- horizontal: {
- type: Boolean,
- value: false,
- observer: '_horizontalChanged'
- },
-
- /**
- * Set opened to true to show the collapse element and to false to hide it.
- *
- * @attribute opened
- */
- opened: {
- type: Boolean,
- value: false,
- notify: true,
- observer: '_openedChanged'
- },
-
- /**
- * Set noAnimation to true to disable animations
- *
- * @attribute noAnimation
- */
- noAnimation: {
- type: Boolean
- },
-
- },
-
- get dimension() {
- return this.horizontal ? 'width' : 'height';
- },
-
- /**
- * `maxWidth` or `maxHeight`.
- * @private
- */
- get _dimensionMax() {
- return this.horizontal ? 'maxWidth' : 'maxHeight';
- },
-
- /**
- * `max-width` or `max-height`.
- * @private
- */
- get _dimensionMaxCss() {
- return this.horizontal ? 'max-width' : 'max-height';
- },
-
- hostAttributes: {
- role: 'group',
- 'aria-hidden': 'true',
- 'aria-expanded': 'false'
- },
-
- listeners: {
- transitionend: '_transitionEnd'
- },
-
- attached: function() {
- // It will take care of setting correct classes and styles.
- this._transitionEnd();
- },
-
- /**
- * Toggle the opened state.
- *
- * @method toggle
- */
- toggle: function() {
- this.opened = !this.opened;
- },
-
- show: function() {
- this.opened = true;
- },
-
- hide: function() {
- this.opened = false;
- },
-
- /**
- * Updates the size of the element.
- * @param {!String} size The new value for `maxWidth`/`maxHeight` as css property value, usually `auto` or `0px`.
- * @param {boolean=} animated if `true` updates the size with an animation, otherwise without.
- */
- updateSize: function(size, animated) {
- // No change!
- var curSize = this.style[this._dimensionMax];
- if (curSize === size || (size === 'auto' && !curSize)) {
- return;
- }
-
- this._updateTransition(false);
- // If we can animate, must do some prep work.
- if (animated && !this.noAnimation && this._isDisplayed) {
- // Animation will start at the current size.
- var startSize = this._calcSize();
- // For `auto` we must calculate what is the final size for the animation.
- // After the transition is done, _transitionEnd will set the size back to `auto`.
- if (size === 'auto') {
- this.style[this._dimensionMax] = '';
- size = this._calcSize();
- }
- // Go to startSize without animation.
- this.style[this._dimensionMax] = startSize;
- // Force layout to ensure transition will go. Set offsetHeight to itself
- // so that compilers won't remove it.
- this.offsetHeight = this.offsetHeight;
- // Enable animation.
- this._updateTransition(true);
- }
- // Set the final size.
- if (size === 'auto') {
- this.style[this._dimensionMax] = '';
- } else {
- this.style[this._dimensionMax] = size;
- }
- },
-
- /**
- * enableTransition() is deprecated, but left over so it doesn't break existing code.
- * Please use `noAnimation` property instead.
- *
- * @method enableTransition
- * @deprecated since version 1.0.4
- */
- enableTransition: function(enabled) {
- Polymer.Base._warn('`enableTransition()` is deprecated, use `noAnimation` instead.');
- this.noAnimation = !enabled;
- },
-
- _updateTransition: function(enabled) {
- this.style.transitionDuration = (enabled && !this.noAnimation) ? '' : '0s';
- },
-
- _horizontalChanged: function() {
- this.style.transitionProperty = this._dimensionMaxCss;
- var otherDimension = this._dimensionMax === 'maxWidth' ? 'maxHeight' : 'maxWidth';
- this.style[otherDimension] = '';
- this.updateSize(this.opened ? 'auto' : '0px', false);
- },
-
- _openedChanged: function() {
- this.setAttribute('aria-expanded', this.opened);
- this.setAttribute('aria-hidden', !this.opened);
-
- this.toggleClass('iron-collapse-closed', false);
- this.toggleClass('iron-collapse-opened', false);
- this.updateSize(this.opened ? 'auto' : '0px', true);
-
- // Focus the current collapse.
- if (this.opened) {
- this.focus();
- }
- if (this.noAnimation) {
- this._transitionEnd();
- }
- },
-
- _transitionEnd: function() {
- if (this.opened) {
- this.style[this._dimensionMax] = '';
- }
- this.toggleClass('iron-collapse-closed', !this.opened);
- this.toggleClass('iron-collapse-opened', this.opened);
- this._updateTransition(false);
- this.notifyResize();
- },
-
- /**
- * Simplistic heuristic to detect if element has a parent with display: none
- *
- * @private
- */
- get _isDisplayed() {
- var rect = this.getBoundingClientRect();
- for (var prop in rect) {
- if (rect[prop] !== 0) return true;
- }
- return false;
- },
-
- _calcSize: function() {
- return this.getBoundingClientRect()[this.dimension] + 'px';
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.bower.json
deleted file mode 100644
index f5990d896ba..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.bower.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "iron-dropdown",
- "version": "1.4.1",
- "description": "An unstyled element that works similarly to a native browser select",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer"
- ],
- "main": "iron-dropdown.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-dropdown"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-dropdown",
- "dependencies": {
- "polymer": "polymer/polymer#^1.0.0",
- "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0",
- "iron-overlay-behavior": "polymerelements/iron-overlay-behavior#^1.0.0",
- "iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
- "neon-animation": "polymerelements/neon-animation#^1.0.0",
- "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0",
- "iron-image": "polymerelements/iron-image#^1.0.0"
- },
- "ignore": [],
- "_release": "1.4.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.4.1",
- "commit": "fc5ce3d2ee6be97beef00b9456e6e06498408401"
- },
- "_source": "git://github.com/PolymerElements/iron-dropdown.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-dropdown"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.travis.yml
deleted file mode 100644
index 52bdee54eb8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: Nd7sbgkYVekuQRB4K3svNCL3veA6t6aGopNP2FUxlJvQuzRV1vKV67angPvMUAFelEA7/rTzrFPBMfNbsz9C2wInLLLPux4wEk1MQX+2KYZVeXKMHjgl8iQKMXnodaL7XXwBPg0L7053TWtYkIt8wZ/vN0JGPQFKhlQkSrduztkPCJQfkFsMPJ7SudPG3Ld0UPBVxo8TwH/d44p8VhLGiI0oEWw3GnGZZ1T7RJLDAVBwj1BiVHAOaS0SSeOR3ngpZyXbk8OItgzw4o/bbAt2yrHMfwymBy0Xv9v3G0QLFJnMi/gE2lWnN4+IttUPI8gVyr1TuiTgtFxdwteLO3R5iFe+qlQjq0VGssmAHcPwtLhvrT4wEkGMc8ZeyW11z+GdkIw4XHGACWj+9Jz9f19mJd9xU3fkJ+f5mFiB8vEkzjsUI9pswgd3RoHt2WewcVdHnCED2wRdQCw9H34dX7d2ieWKPl/pv+EKZOgEJJ8UNZMyKnj57Y25WRrTpIQBt6p9uVv5MsiZQm7Sd1pYQnJKPQ+BxvvL5fsoT1YkFSjyz9gwijtftXhfL8KLB6i04V3mra3f9d5hc20wAOt+ad+mTOkaM/aGxE/I3Ko13BceMvRSNzuz+N2WE6FEJj1NuOCW/AeSh5/6n9nnlDeu7Nu7VeM9kjk4dyBGNRDWLNcSCEk=
- - secure: aFsYKL6Sw8/r57wzj3pnzEwBE1mnTajJasHAbXgQMd336S2Sq/f39DCNTXgKBA4AKZGvWKe8w9nzaocQoMa4l9bLWEBJMCMPQFawOhTkuEjsLjpU3g74b46/EhjBP5zixR32xoyF5o9FTzC6UyrDjt2XpKwIQJYxaEfoyIW1vTPdoasWdaG5rXvWFTsmXtaMDpCKFH9aQ1DHn9Sbi9NZlR4izdULsbv9GZwg53xvuH4xYEkGtB29KKy04uK1nJ+9SmRWTAnu4Q/ivYWlbwBArjiYTTi0wclvDNvT1iaFNAaeK2pJea8CnoyJJ0pg9NcuzZtStGUvP00kGUpJQ4lqkr+gBCHDPYtoZ17XCz59cg6LrhG1q//vPi7Yz0xW51GHuwmcVs+PsjmWaRuO/1UFreDCQYf+GU4I1pQZf2q1R4m8noe4i5CcFXLKTrC4udBzPmzVB4As2LsxRc3HCIXmhaMxI8MJwdkQBA22u4vCwU2xpqBawJocj0Gvbeme6wG99PW7+XSkijQDk2cTJ5/CJtY22nAECvn4tve3OVvybSTjQ1yipLxJm/dtjgEXFWtknFZr++tId88wPd3EBtrwEhliD3zD/TyLPO2RPZGuI0i6oD3O89P5d8qp66T/eByDr1IEm0+FIQjgiCEMbhmaIuUKGG2GCfwPglI3uR0kbg0=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/README.md
deleted file mode 100644
index 6440ec68a7c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-dropdown.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-dropdown.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-dropdown)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-dropdown)_
-
-
-##&lt;iron-dropdown&gt;
-
-`<iron-dropdown>` is a generalized element that is useful when you have
-hidden content (`.dropdown-content`) that is revealed due to some change in
-state that should cause it to do so.
-
-Note that this is a low-level element intended to be used as part of other
-composite elements that cause dropdowns to be revealed.
-
-Examples of elements that might be implemented using an `iron-dropdown`
-include comboboxes, menubuttons, selects. The list goes on.
-
-The `<iron-dropdown>` element exposes attributes that allow the position
-of the `.dropdown-content` relative to the `.dropdown-trigger` to be
-configured.
-
-```html
-<iron-dropdown horizontal-align="right" vertical-align="top">
- <div class="dropdown-content">Hello!</div>
-</iron-dropdown>
-```
-
-In the above example, the `<div>` with class `.dropdown-content` will be
-hidden until the dropdown element has `opened` set to true, or when the `open`
-method is called on the element.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/bower.json
deleted file mode 100644
index 0cc2bc59764..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "iron-dropdown",
- "version": "1.4.1",
- "description": "An unstyled element that works similarly to a native browser select",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer"
- ],
- "main": "iron-dropdown.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-dropdown"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-dropdown",
- "dependencies": {
- "polymer": "polymer/polymer#^1.0.0",
- "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0",
- "iron-overlay-behavior": "polymerelements/iron-overlay-behavior#^1.0.0",
- "iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
- "neon-animation": "polymerelements/neon-animation#^1.0.0",
- "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0",
- "iron-image": "polymerelements/iron-image#^1.0.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/grow-height-animation.html b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/grow-height-animation.html
deleted file mode 100644
index e2fdc448a07..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/grow-height-animation.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../neon-animation/neon-animation-behavior.html">
-
-<script>
- Polymer({
- is: 'expand-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- var height = node.getBoundingClientRect().height;
-
- this._effect = new KeyframeEffect(node, [{
- height: (height / 2) + 'px'
- }, {
- height: height + 'px'
- }], this.timingFromConfig(config));
-
- return this._effect;
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/index.html
deleted file mode 100644
index 3ddbaf209bc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/index.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>iron-dropdown</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../iron-image/iron-image.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="x-select.html">
- <style>
-
- .dropdown-content {
- background-color: white;
- line-height: 20px;
- border-radius: 3px;
- box-shadow: 0px 2px 6px #ccc;
- }
-
- .random-content {
- padding: 1.5em 2em;
- max-width: 250px;
- }
-
- button {
- border: 1px solid #ccc;
- background-color: #eee;
- padding: 1em;
- border-radius: 3px;
- cursor: pointer;
- }
-
- button:focus {
- outline: none;
- border-color: blue;
- }
-
- ul {
- margin: 0;
- padding: 0;
- }
-
- li {
- display: block;
- position: relative;
- margin: 0;
- padding: 0;
- }
-
- a {
- display: block;
- position: relative;
- padding: 1em;
- text-decoration: none;
- }
-
- li:not(:last-of-type) {
- border-bottom: 1px solid #eee;
- }
-
- a:hover {
- text-decoration: underline;
- }
-
- iron-image {
- padding: 1em;
- background-color: #fff;
- box-shadow: 0px 2px 6px #ccc;
- border-radius: 3px;
- }
- </style>
-</head>
-<body>
- <template is="dom-bind" id="Demo">
- <div class="vertical-section vertical-section-container ">
- <h1>iron-dropdown</h1>
- <p>Examples of vanilla elements.</p>
- <div>
- <x-select>
- <button class="dropdown-trigger">Basic</button>
- <div class="dropdown-content random-content">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </div>
- </x-select>
- <x-select>
- <button class="dropdown-trigger">Overflowing</button>
- <div class="dropdown-content random-content">
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
- </div>
- </x-select>
- <x-select vertical-align="bottom">
- <button class="dropdown-trigger">Bottom-left Aligned</button>
- <div class="dropdown-content random-content">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </div>
- </x-select>
- <x-select horizontal-align="right" vertical-align="top">
- <button class="dropdown-trigger">Top-right Aligned</button>
- <div class="dropdown-content random-content">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </div>
- </x-select>
- <x-select horizontal-align="left" vertical-align="top">
- <button class="dropdown-trigger"> Content</button>
- <iron-image class="dropdown-content" src="../../iron-image/demo/polymer.svg"></iron-image>
- </x-select>
- <x-select horizontal-align="right" vertical-align="top">
- <button class="dropdown-trigger">Unordered list</button>
- <ul class="dropdown-content" tabindex="0">
- <template is="dom-repeat" items="[[dinosaurs]]">
- <li><a href="javascript:void(0)">[[item]]</a></li>
- </template>
- </ul>
- </x-select>
- </div>
- </div>
- </template>
-
- <script>
- Demo.dinosaurs = [
- 'allosaurus',
- 'brontosaurus',
- 'carcharodontosaurus',
- 'diplodocus',
- 'ekrixinatosaurus',
- 'fukuiraptor',
- 'gallimimus',
- 'hadrosaurus',
- 'iguanodon',
- 'jainosaurus',
- 'kritosaurus',
- 'liaoceratops',
- 'megalosaurus',
- 'nemegtosaurus',
- 'ornithomimus',
- 'protoceratops',
- 'quetecsaurus',
- 'rajasaurus',
- 'stegosaurus',
- 'triceratops',
- 'utahraptor',
- 'vulcanodon',
- 'wannanosaurus',
- 'xenoceratops',
- 'yandusaurus',
- 'zephyrosaurus'
- ];
- </script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/x-select.html b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/x-select.html
deleted file mode 100644
index 2216c659461..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/demo/x-select.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-dropdown.html">
-<link rel="import" href="../../neon-animation/neon-animations.html">
-<link rel="import" href="grow-height-animation.html">
-
-<dom-module id="x-select">
- <style>
- :host {
- display: inline-block;
- margin: 1em;
- }
- </style>
- <template>
- <div on-tap="open">
- <content select=".dropdown-trigger"></content>
- </div>
- <iron-dropdown id="dropdown"
- vertical-align="[[verticalAlign]]"
- horizontal-align="[[horizontalAlign]]"
- disabled="[[disabled]]"
- open-animation-config="[[openAnimationConfig]]"
- close-animation-config="[[closeAnimationConfig]]">
- <content select=".dropdown-content"></content>
- </iron-dropdown>
- </template>
- <script>
- Polymer({
- is: 'x-select',
-
- properties: {
- verticalAlign: String,
- horizontalAlign: String,
- disabled: Boolean,
- openAnimationConfig: {
- type: Array,
- value: function() {
- return [{
- name: 'fade-in-animation',
- timing: {
- delay: 150,
- duration: 50
- }
- }, {
- name: 'expand-animation',
- timing: {
- delay: 150,
- duration: 200
- }
- }];
- }
- },
-
- closeAnimationConfig: {
- type: Array,
- value: function() {
- return [{
- name: 'fade-out-animation',
- timing: {
- duration: 200
- }
- }];
- }
- }
- },
-
- open: function() {
- this.$.dropdown.open();
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/index.html
deleted file mode 100644
index 1d3d6cada97..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <title>iron-dropdown</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown-scroll-manager.html b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown-scroll-manager.html
deleted file mode 100644
index 5e9176efafe..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown-scroll-manager.html
+++ /dev/null
@@ -1,233 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-
-<script>
- (function() {
- 'use strict';
-
- /**
- * The IronDropdownScrollManager is intended to provide a central source
- * of authority and control over which elements in a document are currently
- * allowed to scroll.
- */
-
- Polymer.IronDropdownScrollManager = {
-
- /**
- * The current element that defines the DOM boundaries of the
- * scroll lock. This is always the most recently locking element.
- */
- get currentLockingElement() {
- return this._lockingElements[this._lockingElements.length - 1];
- },
-
-
- /**
- * Returns true if the provided element is "scroll locked," which is to
- * say that it cannot be scrolled via pointer or keyboard interactions.
- *
- * @param {HTMLElement} element An HTML element instance which may or may
- * not be scroll locked.
- */
- elementIsScrollLocked: function(element) {
- var currentLockingElement = this.currentLockingElement;
-
- if (currentLockingElement === undefined)
- return false;
-
- var scrollLocked;
-
- if (this._hasCachedLockedElement(element)) {
- return true;
- }
-
- if (this._hasCachedUnlockedElement(element)) {
- return false;
- }
-
- scrollLocked = !!currentLockingElement &&
- currentLockingElement !== element &&
- !this._composedTreeContains(currentLockingElement, element);
-
- if (scrollLocked) {
- this._lockedElementCache.push(element);
- } else {
- this._unlockedElementCache.push(element);
- }
-
- return scrollLocked;
- },
-
- /**
- * Push an element onto the current scroll lock stack. The most recently
- * pushed element and its children will be considered scrollable. All
- * other elements will not be scrollable.
- *
- * Scroll locking is implemented as a stack so that cases such as
- * dropdowns within dropdowns are handled well.
- *
- * @param {HTMLElement} element The element that should lock scroll.
- */
- pushScrollLock: function(element) {
- // Prevent pushing the same element twice
- if (this._lockingElements.indexOf(element) >= 0) {
- return;
- }
-
- if (this._lockingElements.length === 0) {
- this._lockScrollInteractions();
- }
-
- this._lockingElements.push(element);
-
- this._lockedElementCache = [];
- this._unlockedElementCache = [];
- },
-
- /**
- * Remove an element from the scroll lock stack. The element being
- * removed does not need to be the most recently pushed element. However,
- * the scroll lock constraints only change when the most recently pushed
- * element is removed.
- *
- * @param {HTMLElement} element The element to remove from the scroll
- * lock stack.
- */
- removeScrollLock: function(element) {
- var index = this._lockingElements.indexOf(element);
-
- if (index === -1) {
- return;
- }
-
- this._lockingElements.splice(index, 1);
-
- this._lockedElementCache = [];
- this._unlockedElementCache = [];
-
- if (this._lockingElements.length === 0) {
- this._unlockScrollInteractions();
- }
- },
-
- _lockingElements: [],
-
- _lockedElementCache: null,
-
- _unlockedElementCache: null,
-
- _originalBodyStyles: {},
-
- _isScrollingKeypress: function(event) {
- return Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(
- event, 'pageup pagedown home end up left down right');
- },
-
- _hasCachedLockedElement: function(element) {
- return this._lockedElementCache.indexOf(element) > -1;
- },
-
- _hasCachedUnlockedElement: function(element) {
- return this._unlockedElementCache.indexOf(element) > -1;
- },
-
- _composedTreeContains: function(element, child) {
- // NOTE(cdata): This method iterates over content elements and their
- // corresponding distributed nodes to implement a contains-like method
- // that pierces through the composed tree of the ShadowDOM. Results of
- // this operation are cached (elsewhere) on a per-scroll-lock basis, to
- // guard against potentially expensive lookups happening repeatedly as
- // a user scrolls / touchmoves.
- var contentElements;
- var distributedNodes;
- var contentIndex;
- var nodeIndex;
-
- if (element.contains(child)) {
- return true;
- }
-
- contentElements = Polymer.dom(element).querySelectorAll('content');
-
- for (contentIndex = 0; contentIndex < contentElements.length; ++contentIndex) {
-
- distributedNodes = Polymer.dom(contentElements[contentIndex]).getDistributedNodes();
-
- for (nodeIndex = 0; nodeIndex < distributedNodes.length; ++nodeIndex) {
-
- if (this._composedTreeContains(distributedNodes[nodeIndex], child)) {
- return true;
- }
- }
- }
-
- return false;
- },
-
- _scrollInteractionHandler: function(event) {
- var scrolledElement =
- /** @type {HTMLElement} */(Polymer.dom(event).rootTarget);
- if (Polymer
- .IronDropdownScrollManager
- .elementIsScrollLocked(scrolledElement)) {
- if (event.type === 'keydown' &&
- !Polymer.IronDropdownScrollManager._isScrollingKeypress(event)) {
- return;
- }
-
- event.preventDefault();
- }
- },
-
- _lockScrollInteractions: function() {
- // Memoize body inline styles:
- this._originalBodyStyles.overflow = document.body.style.overflow;
- this._originalBodyStyles.overflowX = document.body.style.overflowX;
- this._originalBodyStyles.overflowY = document.body.style.overflowY;
-
- // Disable overflow scrolling on body:
- // TODO(cdata): It is technically not sufficient to hide overflow on
- // body alone. A better solution might be to traverse all ancestors of
- // the current scroll locking element and hide overflow on them. This
- // becomes expensive, though, as it would have to be redone every time
- // a new scroll locking element is added.
- document.body.style.overflow = 'hidden';
- document.body.style.overflowX = 'hidden';
- document.body.style.overflowY = 'hidden';
-
- // Modern `wheel` event for mouse wheel scrolling:
- document.addEventListener('wheel', this._scrollInteractionHandler, true);
- // Older, non-standard `mousewheel` event for some FF:
- document.addEventListener('mousewheel', this._scrollInteractionHandler, true);
- // IE:
- document.addEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
- // Mobile devices can scroll on touch move:
- document.addEventListener('touchmove', this._scrollInteractionHandler, true);
- // Capture keydown to prevent scrolling keys (pageup, pagedown etc.)
- document.addEventListener('keydown', this._scrollInteractionHandler, true);
- },
-
- _unlockScrollInteractions: function() {
- document.body.style.overflow = this._originalBodyStyles.overflow;
- document.body.style.overflowX = this._originalBodyStyles.overflowX;
- document.body.style.overflowY = this._originalBodyStyles.overflowY;
-
- document.removeEventListener('wheel', this._scrollInteractionHandler, true);
- document.removeEventListener('mousewheel', this._scrollInteractionHandler, true);
- document.removeEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
- document.removeEventListener('touchmove', this._scrollInteractionHandler, true);
- document.removeEventListener('keydown', this._scrollInteractionHandler, true);
- }
- };
- })();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown.html b/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown.html
deleted file mode 100644
index 21b074a5b13..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-dropdown/iron-dropdown.html
+++ /dev/null
@@ -1,275 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html">
-<link rel="import" href="../neon-animation/neon-animation-runner-behavior.html">
-<link rel="import" href="../neon-animation/animations/opaque-animation.html">
-<link rel="import" href="iron-dropdown-scroll-manager.html">
-
-<!--
-`<iron-dropdown>` is a generalized element that is useful when you have
-hidden content (`.dropdown-content`) that is revealed due to some change in
-state that should cause it to do so.
-
-Note that this is a low-level element intended to be used as part of other
-composite elements that cause dropdowns to be revealed.
-
-Examples of elements that might be implemented using an `iron-dropdown`
-include comboboxes, menubuttons, selects. The list goes on.
-
-The `<iron-dropdown>` element exposes attributes that allow the position
-of the `.dropdown-content` relative to the `.dropdown-trigger` to be
-configured.
-
- <iron-dropdown horizontal-align="right" vertical-align="top">
- <div class="dropdown-content">Hello!</div>
- </iron-dropdown>
-
-In the above example, the `<div>` with class `.dropdown-content` will be
-hidden until the dropdown element has `opened` set to true, or when the `open`
-method is called on the element.
-
-@demo demo/index.html
--->
-
-<dom-module id="iron-dropdown">
- <style>
- :host {
- position: fixed;
- }
-
- #contentWrapper ::content > * {
- overflow: auto;
- }
-
- #contentWrapper.animating ::content > * {
- overflow: hidden;
- }
- </style>
- <template>
- <div id="contentWrapper">
- <content id="content" select=".dropdown-content"></content>
- </div>
- </template>
-
- <script>
- (function() {
- 'use strict';
-
- Polymer({
- is: 'iron-dropdown',
-
- behaviors: [
- Polymer.IronControlState,
- Polymer.IronA11yKeysBehavior,
- Polymer.IronOverlayBehavior,
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
- /**
- * The orientation against which to align the dropdown content
- * horizontally relative to the dropdown trigger.
- * Overridden from `Polymer.IronFitBehavior`.
- */
- horizontalAlign: {
- type: String,
- value: 'left',
- reflectToAttribute: true
- },
-
- /**
- * The orientation against which to align the dropdown content
- * vertically relative to the dropdown trigger.
- * Overridden from `Polymer.IronFitBehavior`.
- */
- verticalAlign: {
- type: String,
- value: 'top',
- reflectToAttribute: true
- },
-
- /**
- * An animation config. If provided, this will be used to animate the
- * opening of the dropdown.
- */
- openAnimationConfig: {
- type: Object
- },
-
- /**
- * An animation config. If provided, this will be used to animate the
- * closing of the dropdown.
- */
- closeAnimationConfig: {
- type: Object
- },
-
- /**
- * If provided, this will be the element that will be focused when
- * the dropdown opens.
- */
- focusTarget: {
- type: Object
- },
-
- /**
- * Set to true to disable animations when opening and closing the
- * dropdown.
- */
- noAnimations: {
- type: Boolean,
- value: false
- },
-
- /**
- * By default, the dropdown will constrain scrolling on the page
- * to itself when opened.
- * Set to true in order to prevent scroll from being constrained
- * to the dropdown when it opens.
- */
- allowOutsideScroll: {
- type: Boolean,
- value: false
- }
- },
-
- listeners: {
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
-
- observers: [
- '_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)'
- ],
-
- /**
- * The element that is contained by the dropdown, if any.
- */
- get containedElement() {
- return Polymer.dom(this.$.content).getDistributedNodes()[0];
- },
-
- /**
- * The element that should be focused when the dropdown opens.
- * @deprecated
- */
- get _focusTarget() {
- return this.focusTarget || this.containedElement;
- },
-
- detached: function() {
- this.cancelAnimation();
- Polymer.IronDropdownScrollManager.removeScrollLock(this);
- },
-
- /**
- * Called when the value of `opened` changes.
- * Overridden from `IronOverlayBehavior`
- */
- _openedChanged: function() {
- if (this.opened && this.disabled) {
- this.cancel();
- } else {
- this.cancelAnimation();
- this.sizingTarget = this.containedElement || this.sizingTarget;
- this._updateAnimationConfig();
- if (this.opened && !this.allowOutsideScroll) {
- Polymer.IronDropdownScrollManager.pushScrollLock(this);
- } else {
- Polymer.IronDropdownScrollManager.removeScrollLock(this);
- }
- Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this, arguments);
- }
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- */
- _renderOpened: function() {
- if (!this.noAnimations && this.animationConfig.open) {
- this.$.contentWrapper.classList.add('animating');
- this.playAnimation('open');
- } else {
- Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this, arguments);
- }
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- */
- _renderClosed: function() {
- if (!this.noAnimations && this.animationConfig.close) {
- this.$.contentWrapper.classList.add('animating');
- this.playAnimation('close');
- } else {
- Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this, arguments);
- }
- },
-
- /**
- * Called when animation finishes on the dropdown (when opening or
- * closing). Responsible for "completing" the process of opening or
- * closing the dropdown by positioning it or setting its display to
- * none.
- */
- _onNeonAnimationFinish: function() {
- this.$.contentWrapper.classList.remove('animating');
- if (this.opened) {
- this._finishRenderOpened();
- } else {
- this._finishRenderClosed();
- }
- },
-
- /**
- * Constructs the final animation config from different properties used
- * to configure specific parts of the opening and closing animations.
- */
- _updateAnimationConfig: function() {
- var animations = (this.openAnimationConfig || []).concat(this.closeAnimationConfig || []);
- for (var i = 0; i < animations.length; i++) {
- animations[i].node = this.containedElement;
- }
- this.animationConfig = {
- open: this.openAnimationConfig,
- close: this.closeAnimationConfig
- };
- },
-
- /**
- * Updates the overlay position based on configured horizontal
- * and vertical alignment.
- */
- _updateOverlayPosition: function() {
- if (this.isAttached) {
- // This triggers iron-resize, and iron-overlay-behavior will call refit if needed.
- this.notifyResize();
- }
- },
-
- /**
- * Apply focus to focusTarget or containedElement
- */
- _applyFocus: function () {
- var focusTarget = this.focusTarget || this.containedElement;
- if (focusTarget && this.opened && !this.noAutoFocus) {
- focusTarget.focus();
- } else {
- Polymer.IronOverlayBehaviorImpl._applyFocus.apply(this, arguments);
- }
- }
- });
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.bower.json
deleted file mode 100644
index f1de37bd86d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "iron-fit-behavior",
- "version": "1.2.3",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Fits an element inside another element",
- "private": true,
- "main": "iron-fit-behavior.html",
- "keywords": [
- "web-components",
- "polymer",
- "behavior"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-fit-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/iron-fit-behavior",
- "_release": "1.2.3",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.3",
- "commit": "ad54693c57aeb893407a4b5d843e36ee8178f72b"
- },
- "_source": "git://github.com/PolymerElements/iron-fit-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-fit-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.travis.yml
deleted file mode 100644
index f7ceec787f7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: QL2j7nfSA/40iIPMKLMosv9hj8q7eGBbPQXVQmCL3uXD5qoMPTqo1qronKKX+bi3Rh7W104ufV4CzzbWvBwQh8gipx+4REGijzc77Fro2y3v3/wUp9H/UEWnbhAWPDsqEoAD8xQXFHkVv7874/VwOlubQyXDGlvqh0fzYbUNUQo=
- - secure: ajBo8YcSzi4kNuCHcmajCirWQKf5Mj4OZ3tQjNAcJJAy0UtyrAgTenayWN2ijKqD5V8wfTK66jUXGYMZkoJV4EpknrUliqRgRqKHHfULXYWRSC7lDGxf835ReFxstkPun4HmNtxraAWJgmgFz7mylntTVKm46Ce4INj3n8reWaY=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/README.md
deleted file mode 100644
index 8dbc78e363d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-fit-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-fit-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-fit-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-fit-behavior)_
-
-
-##Polymer.IronFitBehavior
-
-`Polymer.IronFitBehavior` fits an element in another element using `max-height` and `max-width`, and
-optionally centers it in the window or another element.
-
-The element will only be sized and/or positioned if it has not already been sized and/or positioned
-by CSS.
-
-| CSS properties | Action |
-| --- | --- |
-| `position` set | Element is not centered horizontally or vertically |
-| `top` or `bottom` set | Element is not vertically centered |
-| `left` or `right` set | Element is not horizontally centered |
-| `max-height` set | Element respects `max-height` |
-| `max-width` set | Element respects `max-width` |
-
-`Polymer.IronFitBehavior` can position an element into another element using
-`verticalAlign` and `horizontalAlign`. This will override the element's css position.
-
-```html
- <div class="container">
- <iron-fit-impl vertical-align="top" horizontal-align="auto">
- Positioned into the container
- </iron-fit-impl>
- </div>
-```
-
-Use `noOverlap` to position the element around another element without overlapping it.
-
-```html
- <div class="container">
- <iron-fit-impl no-overlap vertical-align="auto" horizontal-align="auto">
- Positioned around the container
- </iron-fit-impl>
- </div>
-```
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/bower.json
deleted file mode 100644
index 715b5737ac3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "iron-fit-behavior",
- "version": "1.2.3",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Fits an element inside another element",
- "private": true,
- "main": "iron-fit-behavior.html",
- "keywords": [
- "web-components",
- "polymer",
- "behavior"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-fit-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/index.html
deleted file mode 100644
index 2c716e06e0a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/index.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-
-<head>
-
- <title>iron-fit-behavior demo</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="simple-fit.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- .centered {
- min-width: 500px;
- }
- demo-snippet {
- --demo-snippet-code: {
- max-height: 250px;
- }
- }
- </style>
-
-</head>
-
-<body unresolved class="centered">
- <h3>
- An element with <code>IronFitBehavior</code> can be centered in
- <code>fitInto</code> or positioned around a <code>positionTarget</code>
- </h3>
- <demo-snippet>
- <template>
- <style>
- .target {
- cursor: pointer;
- text-align: center;
- display: inline-block;
- box-sizing: border-box;
- border: 1px solid;
- width: 100px;
- padding: 20px 0;
- margin: 5px;
- }
-
- #myFit {
- z-index: 10;
- padding: 20px;
- overflow: auto;
- min-width: 100px;
- min-height: 100px;
- }
-
- button {
- background-color: white;
- border-radius: 5px;
- border-width: 1px;
- }
-
- button.selected {
- background-color: #b3e5fc;
- }
- </style>
- <template is="dom-bind">
- <template is="dom-repeat" items="[[containers]]">
- <div class="target" on-tap="updatePositionTarget">Target</div>
- </template>
- <simple-fit id="myFit" auto-fit-on-attach>
- <h2>Align</h2>
- <p>
- <button on-tap="updateAlign" vertical-align="top">top</button>
- <button on-tap="updateAlign" vertical-align="bottom">bottom</button>
- <button on-tap="updateAlign" vertical-align="auto">auto</button>
- <button on-tap="updateAlign" vertical-align>null</button>
- </p>
- <p>
- <button on-tap="updateAlign" horizontal-align="left">left</button>
- <button on-tap="updateAlign" horizontal-align="right">right</button>
- <button on-tap="updateAlign" horizontal-align="auto">auto</button>
- <button on-tap="updateAlign" horizontal-align>null</button>
- </p>
- <button on-tap="toggleNoOverlap">no overlap</button>
- <button on-tap="toggleDynamicAlign">dynamic align</button>
- </simple-fit>
- <script>
- var defaultTarget = Polymer.dom(myFit).parentNode;
- var template = document.querySelector('template[is="dom-bind"]');
-
- template.containers = new Array(30);
-
- template.updatePositionTarget = function(e) {
- var target = Polymer.dom(e).rootTarget;
- target = myFit.positionTarget === target ? defaultTarget : target;
- myFit.positionTarget.style.backgroundColor = '';
- target.style.backgroundColor = 'orange';
- myFit.positionTarget = target;
- template.refit();
- };
-
- template._raf = null;
- template.refit = function() {
- template._raf && window.cancelAnimationFrame(template._raf);
- template._raf = window.requestAnimationFrame(function() {
- template._raf = null;
- myFit.refit();
- });
- };
-
- template.updateAlign = function(e) {
- var target = Polymer.dom(e).rootTarget;
- if (target.hasAttribute('horizontal-align')) {
- myFit.horizontalAlign = target.getAttribute('horizontal-align');
- var children = target.parentNode.querySelectorAll('[horizontal-align]');
- for (var i = 0; i < children.length; i++) {
- toggleClass(children[i], 'selected', children[i] === target);
- }
- }
- if (target.hasAttribute('vertical-align')) {
- myFit.verticalAlign = target.getAttribute('vertical-align');
- var children = target.parentNode.querySelectorAll('[vertical-align]');
- for (var i = 0; i < children.length; i++) {
- toggleClass(children[i], 'selected', children[i] === target);
- }
- }
- template.refit();
- };
-
- template.toggleNoOverlap = function(e) {
- myFit.noOverlap = !myFit.noOverlap;
- toggleClass(Polymer.dom(e).rootTarget, 'selected', myFit.noOverlap);
- template.refit();
- };
-
- template.toggleDynamicAlign = function(e) {
- myFit.dynamicAlign = !myFit.dynamicAlign;
- toggleClass(Polymer.dom(e).rootTarget, 'selected', myFit.dynamicAlign);
- template.refit();
- };
-
- // Listen for resize and scroll on window.
- window.addEventListener('resize', template.refit);
- window.addEventListener('scroll', template.refit);
-
- function toggleClass(element, cssClass, condition) {
- element.classList[condition ? 'add' : 'remove'](cssClass);
- }
- </script>
- </template>
- </template>
- </demo-snippet>
-
-</body>
-
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/simple-fit.html b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/simple-fit.html
deleted file mode 100644
index 2283e526aeb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/demo/simple-fit.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-fit-behavior.html">
-<link rel="import" href="../../paper-styles/color.html">
-
-<dom-module id="simple-fit">
-
- <style>
- :host {
- background-color: var(--paper-light-blue-500);
- color: white;
- text-align: center;
- }
- </style>
-
- <template>
- <content></content>
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'simple-fit',
-
- behaviors: [
- Polymer.IronFitBehavior
- ]
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/index.html
deleted file mode 100644
index 5ffa7d61cec..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-fit-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/iron-fit-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/iron-fit-behavior.html
deleted file mode 100644
index d51d87dfe44..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-fit-behavior/iron-fit-behavior.html
+++ /dev/null
@@ -1,594 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-/**
-`Polymer.IronFitBehavior` fits an element in another element using `max-height` and `max-width`, and
-optionally centers it in the window or another element.
-
-The element will only be sized and/or positioned if it has not already been sized and/or positioned
-by CSS.
-
-CSS properties | Action
------------------------------|-------------------------------------------
-`position` set | Element is not centered horizontally or vertically
-`top` or `bottom` set | Element is not vertically centered
-`left` or `right` set | Element is not horizontally centered
-`max-height` set | Element respects `max-height`
-`max-width` set | Element respects `max-width`
-
-`Polymer.IronFitBehavior` can position an element into another element using
-`verticalAlign` and `horizontalAlign`. This will override the element's css position.
-
- <div class="container">
- <iron-fit-impl vertical-align="top" horizontal-align="auto">
- Positioned into the container
- </iron-fit-impl>
- </div>
-
-Use `noOverlap` to position the element around another element without overlapping it.
-
- <div class="container">
- <iron-fit-impl no-overlap vertical-align="auto" horizontal-align="auto">
- Positioned around the container
- </iron-fit-impl>
- </div>
-
-@demo demo/index.html
-@polymerBehavior
-*/
-
- Polymer.IronFitBehavior = {
-
- properties: {
-
- /**
- * The element that will receive a `max-height`/`width`. By default it is the same as `this`,
- * but it can be set to a child element. This is useful, for example, for implementing a
- * scrolling region inside the element.
- * @type {!Element}
- */
- sizingTarget: {
- type: Object,
- value: function() {
- return this;
- }
- },
-
- /**
- * The element to fit `this` into.
- */
- fitInto: {
- type: Object,
- value: window
- },
-
- /**
- * Will position the element around the positionTarget without overlapping it.
- */
- noOverlap: {
- type: Boolean
- },
-
- /**
- * The element that should be used to position the element. If not set, it will
- * default to the parent node.
- * @type {!Element}
- */
- positionTarget: {
- type: Element
- },
-
- /**
- * The orientation against which to align the element horizontally
- * relative to the `positionTarget`. Possible values are "left", "right", "auto".
- */
- horizontalAlign: {
- type: String
- },
-
- /**
- * The orientation against which to align the element vertically
- * relative to the `positionTarget`. Possible values are "top", "bottom", "auto".
- */
- verticalAlign: {
- type: String
- },
-
- /**
- * If true, it will use `horizontalAlign` and `verticalAlign` values as preferred alignment
- * and if there's not enough space, it will pick the values which minimize the cropping.
- */
- dynamicAlign: {
- type: Boolean
- },
-
- /**
- * The same as setting margin-left and margin-right css properties.
- * @deprecated
- */
- horizontalOffset: {
- type: Number,
- value: 0,
- notify: true
- },
-
- /**
- * The same as setting margin-top and margin-bottom css properties.
- * @deprecated
- */
- verticalOffset: {
- type: Number,
- value: 0,
- notify: true
- },
-
- /**
- * Set to true to auto-fit on attach.
- */
- autoFitOnAttach: {
- type: Boolean,
- value: false
- },
-
- /** @type {?Object} */
- _fitInfo: {
- type: Object
- }
- },
-
- get _fitWidth() {
- var fitWidth;
- if (this.fitInto === window) {
- fitWidth = this.fitInto.innerWidth;
- } else {
- fitWidth = this.fitInto.getBoundingClientRect().width;
- }
- return fitWidth;
- },
-
- get _fitHeight() {
- var fitHeight;
- if (this.fitInto === window) {
- fitHeight = this.fitInto.innerHeight;
- } else {
- fitHeight = this.fitInto.getBoundingClientRect().height;
- }
- return fitHeight;
- },
-
- get _fitLeft() {
- var fitLeft;
- if (this.fitInto === window) {
- fitLeft = 0;
- } else {
- fitLeft = this.fitInto.getBoundingClientRect().left;
- }
- return fitLeft;
- },
-
- get _fitTop() {
- var fitTop;
- if (this.fitInto === window) {
- fitTop = 0;
- } else {
- fitTop = this.fitInto.getBoundingClientRect().top;
- }
- return fitTop;
- },
-
- /**
- * The element that should be used to position the element,
- * if no position target is configured.
- */
- get _defaultPositionTarget() {
- var parent = Polymer.dom(this).parentNode;
-
- if (parent && parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
- parent = parent.host;
- }
-
- return parent;
- },
-
- /**
- * The horizontal align value, accounting for the RTL/LTR text direction.
- */
- get _localeHorizontalAlign() {
- if (this._isRTL) {
- // In RTL, "left" becomes "right".
- if (this.horizontalAlign === 'right') {
- return 'left';
- }
- if (this.horizontalAlign === 'left') {
- return 'right';
- }
- }
- return this.horizontalAlign;
- },
-
- attached: function() {
- // Memoize this to avoid expensive calculations & relayouts.
- this._isRTL = window.getComputedStyle(this).direction == 'rtl';
- this.positionTarget = this.positionTarget || this._defaultPositionTarget;
- if (this.autoFitOnAttach) {
- if (window.getComputedStyle(this).display === 'none') {
- setTimeout(function() {
- this.fit();
- }.bind(this));
- } else {
- this.fit();
- }
- }
- },
-
- /**
- * Positions and fits the element into the `fitInto` element.
- */
- fit: function() {
- this._discoverInfo();
- this.position();
- this.constrain();
- this.center();
- },
-
- /**
- * Memoize information needed to position and size the target element.
- * @suppress {deprecated}
- */
- _discoverInfo: function() {
- if (this._fitInfo) {
- return;
- }
- var target = window.getComputedStyle(this);
- var sizer = window.getComputedStyle(this.sizingTarget);
-
- this._fitInfo = {
- inlineStyle: {
- top: this.style.top || '',
- left: this.style.left || '',
- position: this.style.position || ''
- },
- sizerInlineStyle: {
- maxWidth: this.sizingTarget.style.maxWidth || '',
- maxHeight: this.sizingTarget.style.maxHeight || '',
- boxSizing: this.sizingTarget.style.boxSizing || ''
- },
- positionedBy: {
- vertically: target.top !== 'auto' ? 'top' : (target.bottom !== 'auto' ?
- 'bottom' : null),
- horizontally: target.left !== 'auto' ? 'left' : (target.right !== 'auto' ?
- 'right' : null)
- },
- sizedBy: {
- height: sizer.maxHeight !== 'none',
- width: sizer.maxWidth !== 'none',
- minWidth: parseInt(sizer.minWidth, 10) || 0,
- minHeight: parseInt(sizer.minHeight, 10) || 0
- },
- margin: {
- top: parseInt(target.marginTop, 10) || 0,
- right: parseInt(target.marginRight, 10) || 0,
- bottom: parseInt(target.marginBottom, 10) || 0,
- left: parseInt(target.marginLeft, 10) || 0
- }
- };
-
- // Support these properties until they are removed.
- if (this.verticalOffset) {
- this._fitInfo.margin.top = this._fitInfo.margin.bottom = this.verticalOffset;
- this._fitInfo.inlineStyle.marginTop = this.style.marginTop || '';
- this._fitInfo.inlineStyle.marginBottom = this.style.marginBottom || '';
- this.style.marginTop = this.style.marginBottom = this.verticalOffset + 'px';
- }
- if (this.horizontalOffset) {
- this._fitInfo.margin.left = this._fitInfo.margin.right = this.horizontalOffset;
- this._fitInfo.inlineStyle.marginLeft = this.style.marginLeft || '';
- this._fitInfo.inlineStyle.marginRight = this.style.marginRight || '';
- this.style.marginLeft = this.style.marginRight = this.horizontalOffset + 'px';
- }
- },
-
- /**
- * Resets the target element's position and size constraints, and clear
- * the memoized data.
- */
- resetFit: function() {
- var info = this._fitInfo || {};
- for (var property in info.sizerInlineStyle) {
- this.sizingTarget.style[property] = info.sizerInlineStyle[property];
- }
- for (var property in info.inlineStyle) {
- this.style[property] = info.inlineStyle[property];
- }
-
- this._fitInfo = null;
- },
-
- /**
- * Equivalent to calling `resetFit()` and `fit()`. Useful to call this after
- * the element or the `fitInto` element has been resized, or if any of the
- * positioning properties (e.g. `horizontalAlign, verticalAlign`) is updated.
- * It preserves the scroll position of the sizingTarget.
- */
- refit: function() {
- var scrollLeft = this.sizingTarget.scrollLeft;
- var scrollTop = this.sizingTarget.scrollTop;
- this.resetFit();
- this.fit();
- this.sizingTarget.scrollLeft = scrollLeft;
- this.sizingTarget.scrollTop = scrollTop;
- },
-
- /**
- * Positions the element according to `horizontalAlign, verticalAlign`.
- */
- position: function() {
- if (!this.horizontalAlign && !this.verticalAlign) {
- // needs to be centered, and it is done after constrain.
- return;
- }
-
- this.style.position = 'fixed';
- // Need border-box for margin/padding.
- this.sizingTarget.style.boxSizing = 'border-box';
- // Set to 0, 0 in order to discover any offset caused by parent stacking contexts.
- this.style.left = '0px';
- this.style.top = '0px';
-
- var rect = this.getBoundingClientRect();
- var positionRect = this.__getNormalizedRect(this.positionTarget);
- var fitRect = this.__getNormalizedRect(this.fitInto);
-
- var margin = this._fitInfo.margin;
-
- // Consider the margin as part of the size for position calculations.
- var size = {
- width: rect.width + margin.left + margin.right,
- height: rect.height + margin.top + margin.bottom
- };
-
- var position = this.__getPosition(this._localeHorizontalAlign, this.verticalAlign, size, positionRect, fitRect);
-
- var left = position.left + margin.left;
- var top = position.top + margin.top;
-
- // Use original size (without margin).
- var right = Math.min(fitRect.right - margin.right, left + rect.width);
- var bottom = Math.min(fitRect.bottom - margin.bottom, top + rect.height);
-
- var minWidth = this._fitInfo.sizedBy.minWidth;
- var minHeight = this._fitInfo.sizedBy.minHeight;
- if (left < margin.left) {
- left = margin.left;
- if (right - left < minWidth) {
- left = right - minWidth;
- }
- }
- if (top < margin.top) {
- top = margin.top;
- if (bottom - top < minHeight) {
- top = bottom - minHeight;
- }
- }
-
- this.sizingTarget.style.maxWidth = (right - left) + 'px';
- this.sizingTarget.style.maxHeight = (bottom - top) + 'px';
-
- // Remove the offset caused by any stacking context.
- this.style.left = (left - rect.left) + 'px';
- this.style.top = (top - rect.top) + 'px';
- },
-
- /**
- * Constrains the size of the element to `fitInto` by setting `max-height`
- * and/or `max-width`.
- */
- constrain: function() {
- if (this.horizontalAlign || this.verticalAlign) {
- return;
- }
- var info = this._fitInfo;
- // position at (0px, 0px) if not already positioned, so we can measure the natural size.
- if (!info.positionedBy.vertically) {
- this.style.position = 'fixed';
- this.style.top = '0px';
- }
- if (!info.positionedBy.horizontally) {
- this.style.position = 'fixed';
- this.style.left = '0px';
- }
-
- // need border-box for margin/padding
- this.sizingTarget.style.boxSizing = 'border-box';
- // constrain the width and height if not already set
- var rect = this.getBoundingClientRect();
- if (!info.sizedBy.height) {
- this.__sizeDimension(rect, info.positionedBy.vertically, 'top', 'bottom', 'Height');
- }
- if (!info.sizedBy.width) {
- this.__sizeDimension(rect, info.positionedBy.horizontally, 'left', 'right', 'Width');
- }
- },
-
- /**
- * @protected
- * @deprecated
- */
- _sizeDimension: function(rect, positionedBy, start, end, extent) {
- this.__sizeDimension(rect, positionedBy, start, end, extent);
- },
-
- /**
- * @private
- */
- __sizeDimension: function(rect, positionedBy, start, end, extent) {
- var info = this._fitInfo;
- var fitRect = this.__getNormalizedRect(this.fitInto);
- var max = extent === 'Width' ? fitRect.width : fitRect.height;
- var flip = (positionedBy === end);
- var offset = flip ? max - rect[end] : rect[start];
- var margin = info.margin[flip ? start : end];
- var offsetExtent = 'offset' + extent;
- var sizingOffset = this[offsetExtent] - this.sizingTarget[offsetExtent];
- this.sizingTarget.style['max' + extent] = (max - margin - offset - sizingOffset) + 'px';
- },
-
- /**
- * Centers horizontally and vertically if not already positioned. This also sets
- * `position:fixed`.
- */
- center: function() {
- if (this.horizontalAlign || this.verticalAlign) {
- return;
- }
- var positionedBy = this._fitInfo.positionedBy;
- if (positionedBy.vertically && positionedBy.horizontally) {
- // Already positioned.
- return;
- }
- // Need position:fixed to center
- this.style.position = 'fixed';
- // Take into account the offset caused by parents that create stacking
- // contexts (e.g. with transform: translate3d). Translate to 0,0 and
- // measure the bounding rect.
- if (!positionedBy.vertically) {
- this.style.top = '0px';
- }
- if (!positionedBy.horizontally) {
- this.style.left = '0px';
- }
- // It will take in consideration margins and transforms
- var rect = this.getBoundingClientRect();
- var fitRect = this.__getNormalizedRect(this.fitInto);
- if (!positionedBy.vertically) {
- var top = fitRect.top - rect.top + (fitRect.height - rect.height) / 2;
- this.style.top = top + 'px';
- }
- if (!positionedBy.horizontally) {
- var left = fitRect.left - rect.left + (fitRect.width - rect.width) / 2;
- this.style.left = left + 'px';
- }
- },
-
- __getNormalizedRect: function(target) {
- if (target === document.documentElement || target === window) {
- return {
- top: 0,
- left: 0,
- width: window.innerWidth,
- height: window.innerHeight,
- right: window.innerWidth,
- bottom: window.innerHeight
- };
- }
- return target.getBoundingClientRect();
- },
-
- __getCroppedArea: function(position, size, fitRect) {
- var verticalCrop = Math.min(0, position.top) + Math.min(0, fitRect.bottom - (position.top + size.height));
- var horizontalCrop = Math.min(0, position.left) + Math.min(0, fitRect.right - (position.left + size.width));
- return Math.abs(verticalCrop) * size.width + Math.abs(horizontalCrop) * size.height;
- },
-
-
- __getPosition: function(hAlign, vAlign, size, positionRect, fitRect) {
- // All the possible configurations.
- // Ordered as top-left, top-right, bottom-left, bottom-right.
- var positions = [{
- verticalAlign: 'top',
- horizontalAlign: 'left',
- top: positionRect.top,
- left: positionRect.left
- }, {
- verticalAlign: 'top',
- horizontalAlign: 'right',
- top: positionRect.top,
- left: positionRect.right - size.width
- }, {
- verticalAlign: 'bottom',
- horizontalAlign: 'left',
- top: positionRect.bottom - size.height,
- left: positionRect.left
- }, {
- verticalAlign: 'bottom',
- horizontalAlign: 'right',
- top: positionRect.bottom - size.height,
- left: positionRect.right - size.width
- }];
-
- if (this.noOverlap) {
- // Duplicate.
- for (var i = 0, l = positions.length; i < l; i++) {
- var copy = {};
- for (var key in positions[i]) {
- copy[key] = positions[i][key];
- }
- positions.push(copy);
- }
- // Horizontal overlap only.
- positions[0].top = positions[1].top += positionRect.height;
- positions[2].top = positions[3].top -= positionRect.height;
- // Vertical overlap only.
- positions[4].left = positions[6].left += positionRect.width;
- positions[5].left = positions[7].left -= positionRect.width;
- }
-
- // Consider auto as null for coding convenience.
- vAlign = vAlign === 'auto' ? null : vAlign;
- hAlign = hAlign === 'auto' ? null : hAlign;
-
- var position;
- for (var i = 0; i < positions.length; i++) {
- var pos = positions[i];
-
- // If both vAlign and hAlign are defined, return exact match.
- // For dynamicAlign and noOverlap we'll have more than one candidate, so
- // we'll have to check the croppedArea to make the best choice.
- if (!this.dynamicAlign && !this.noOverlap &&
- pos.verticalAlign === vAlign && pos.horizontalAlign === hAlign) {
- position = pos;
- break;
- }
-
- // Align is ok if alignment preferences are respected. If no preferences,
- // it is considered ok.
- var alignOk = (!vAlign || pos.verticalAlign === vAlign) &&
- (!hAlign || pos.horizontalAlign === hAlign);
-
- // Filter out elements that don't match the alignment (if defined).
- // With dynamicAlign, we need to consider all the positions to find the
- // one that minimizes the cropped area.
- if (!this.dynamicAlign && !alignOk) {
- continue;
- }
-
- position = position || pos;
- pos.croppedArea = this.__getCroppedArea(pos, size, fitRect);
- var diff = pos.croppedArea - position.croppedArea;
- // Check which crops less. If it crops equally, check if align is ok.
- if (diff < 0 || (diff === 0 && alignOk)) {
- position = pos;
- }
- // If not cropped and respects the align requirements, keep it.
- // This allows to prefer positions overlapping horizontally over the
- // ones overlapping vertically.
- if (position.croppedArea === 0 && alignOk) {
- break;
- }
- }
-
- return position;
- }
-
- };
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.bower.json
deleted file mode 100644
index 023b53e0e53..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "iron-flex-layout",
- "version": "1.3.1",
- "description": "Provide flexbox-based layouts",
- "keywords": [
- "web-components",
- "polymer",
- "layout"
- ],
- "main": "iron-flex-layout.html",
- "private": true,
- "license": "http://polymer.github.io/LICENSE.txt",
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-flex-layout.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0"
- },
- "ignore": [],
- "homepage": "https://github.com/polymerelements/iron-flex-layout",
- "_release": "1.3.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.3.1",
- "commit": "6d88f29f3a7181daa2a5c7f678de44f0a0e6a717"
- },
- "_source": "git://github.com/polymerelements/iron-flex-layout.git",
- "_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-flex-layout"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.travis.yml
deleted file mode 100644
index 516b453f813..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: jFaXkmco40NlJT4VyFYM34Zv9D1XVfLXgixobnyHQyJDBKSXrNLcwDuvrGUpJx/pwBCxEhKAbvxeJ+PBMUv8QV08MAdw2S6QOsIe3CUxAehoNoOMJw5duhE8faWlz8qzmCWEowHVFUeVsd0ZUsgOu6RTspj2A51D/CztQuW0Ljw=
- - secure: fKrO5yMx8kZM1WQ3k0bzo6MCREKGW2WkCl2suDjuEtb1SQ/SaZa9Tun0fcqIHVJqg9+jOS1Romt/+MN27Nc6IT1tv/NdLd+uWjtMA+OzLyv48gzcdu8Ls/TISUGm5Wb7XHkcvMAb1tRoBs5BOvQ/85FilZLEq1km8snG9ZsOOWI=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/README.md
deleted file mode 100644
index 219fca7d721..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-flex-layout.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-flex-layout.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-flex-layout)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-flex-layout)_
-
-
-##&lt;iron-flex-layout&gt;
-
-The `<iron-flex-layout>` component provides simple ways to use
-[CSS flexible box layout](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes),
-also known as flexbox. This component provides two different ways to use flexbox:
-
-1. [Layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
-The layout class stylesheet provides a simple set of class-based flexbox rules, that
-let you specify layout properties directly in markup. You must include this file
-in every element that needs to use them.
-
-Sample use:
-
- <link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
-
- <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
-
- <div class="layout horizontal layout-start">
- <div>cross axis start alignment</div>
- </div>
-
-1. [Custom CSS mixins](https://github.com/PolymerElements/iron-flex-layout/blob/master/iron-flex-layout.html).
-The mixin stylesheet includes custom CSS mixins that can be applied inside a CSS rule using the `@apply` function.
-
-
-
-Please note that the old [/deep/ layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/classes)
-are deprecated, and should not be used. To continue using layout properties
-directly in markup, please switch to using the new `dom-module`-based
-[layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
-Please note that the new version does not use `/deep/`, and therefore requires you
-to import the `dom-modules` in every element that needs to use them.
-
-A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `<iron-flex-layout>` is available.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/bower.json
deleted file mode 100644
index e1752973341..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "iron-flex-layout",
- "version": "1.3.1",
- "description": "Provide flexbox-based layouts",
- "keywords": [
- "web-components",
- "polymer",
- "layout"
- ],
- "main": "iron-flex-layout.html",
- "private": true,
- "license": "http://polymer.github.io/LICENSE.txt",
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-flex-layout.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-flex-layout.html b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-flex-layout.html
deleted file mode 100644
index 0c6aad604b6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-flex-layout.html
+++ /dev/null
@@ -1,311 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="iron-shadow-flex-layout.html">
-
-<script>
- console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
-</script>
-
-<style>
-
- /*******************************
- Flex Layout
- *******************************/
-
- .layout.horizontal,
- .layout.horizontal-reverse,
- .layout.vertical,
- .layout.vertical-reverse {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- }
-
- .layout.inline {
- display: -ms-inline-flexbox;
- display: -webkit-inline-flex;
- display: inline-flex;
- }
-
- .layout.horizontal {
- -ms-flex-direction: row;
- -webkit-flex-direction: row;
- flex-direction: row;
- }
-
- .layout.horizontal-reverse {
- -ms-flex-direction: row-reverse;
- -webkit-flex-direction: row-reverse;
- flex-direction: row-reverse;
- }
-
- .layout.vertical {
- -ms-flex-direction: column;
- -webkit-flex-direction: column;
- flex-direction: column;
- }
-
- .layout.vertical-reverse {
- -ms-flex-direction: column-reverse;
- -webkit-flex-direction: column-reverse;
- flex-direction: column-reverse;
- }
-
- .layout.wrap {
- -ms-flex-wrap: wrap;
- -webkit-flex-wrap: wrap;
- flex-wrap: wrap;
- }
-
- .layout.wrap-reverse {
- -ms-flex-wrap: wrap-reverse;
- -webkit-flex-wrap: wrap-reverse;
- flex-wrap: wrap-reverse;
- }
-
- .flex-auto {
- -ms-flex: 1 1 auto;
- -webkit-flex: 1 1 auto;
- flex: 1 1 auto;
- }
-
- .flex-none {
- -ms-flex: none;
- -webkit-flex: none;
- flex: none;
- }
-
- .flex,
- .flex-1 {
- -ms-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- }
-
- .flex-2 {
- -ms-flex: 2;
- -webkit-flex: 2;
- flex: 2;
- }
-
- .flex-3 {
- -ms-flex: 3;
- -webkit-flex: 3;
- flex: 3;
- }
-
- .flex-4 {
- -ms-flex: 4;
- -webkit-flex: 4;
- flex: 4;
- }
-
- .flex-5 {
- -ms-flex: 5;
- -webkit-flex: 5;
- flex: 5;
- }
-
- .flex-6 {
- -ms-flex: 6;
- -webkit-flex: 6;
- flex: 6;
- }
-
- .flex-7 {
- -ms-flex: 7;
- -webkit-flex: 7;
- flex: 7;
- }
-
- .flex-8 {
- -ms-flex: 8;
- -webkit-flex: 8;
- flex: 8;
- }
-
- .flex-9 {
- -ms-flex: 9;
- -webkit-flex: 9;
- flex: 9;
- }
-
- .flex-10 {
- -ms-flex: 10;
- -webkit-flex: 10;
- flex: 10;
- }
-
- .flex-11 {
- -ms-flex: 11;
- -webkit-flex: 11;
- flex: 11;
- }
-
- .flex-12 {
- -ms-flex: 12;
- -webkit-flex: 12;
- flex: 12;
- }
-
- /* alignment in cross axis */
-
- .layout.start {
- -ms-flex-align: start;
- -webkit-align-items: flex-start;
- align-items: flex-start;
- }
-
- .layout.center,
- .layout.center-center {
- -ms-flex-align: center;
- -webkit-align-items: center;
- align-items: center;
- }
-
- .layout.end {
- -ms-flex-align: end;
- -webkit-align-items: flex-end;
- align-items: flex-end;
- }
-
- /* alignment in main axis */
-
- .layout.start-justified {
- -ms-flex-pack: start;
- -webkit-justify-content: flex-start;
- justify-content: flex-start;
- }
-
- .layout.center-justified,
- .layout.center-center {
- -ms-flex-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- }
-
- .layout.end-justified {
- -ms-flex-pack: end;
- -webkit-justify-content: flex-end;
- justify-content: flex-end;
- }
-
- .layout.around-justified {
- -ms-flex-pack: around;
- -webkit-justify-content: space-around;
- justify-content: space-around;
- }
-
- .layout.justified {
- -ms-flex-pack: justify;
- -webkit-justify-content: space-between;
- justify-content: space-between;
- }
-
- /* self alignment */
-
- .self-start {
- -ms-align-self: flex-start;
- -webkit-align-self: flex-start;
- align-self: flex-start;
- }
-
- .self-center {
- -ms-align-self: center;
- -webkit-align-self: center;
- align-self: center;
- }
-
- .self-end {
- -ms-align-self: flex-end;
- -webkit-align-self: flex-end;
- align-self: flex-end;
- }
-
- .self-stretch {
- -ms-align-self: stretch;
- -webkit-align-self: stretch;
- align-self: stretch;
- }
-
- /*******************************
- Other Layout
- *******************************/
-
- .block {
- display: block;
- }
-
- /* IE 10 support for HTML5 hidden attr */
- [hidden] {
- display: none !important;
- }
-
- .invisible {
- visibility: hidden !important;
- }
-
- .relative {
- position: relative;
- }
-
- .fit {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- body.fullbleed {
- margin: 0;
- height: 100vh;
- }
-
- .scroll {
- -webkit-overflow-scrolling: touch;
- overflow: auto;
- }
-
- /* fixed position */
-
- .fixed-bottom,
- .fixed-left,
- .fixed-right,
- .fixed-top {
- position: fixed;
- }
-
- .fixed-top {
- top: 0;
- left: 0;
- right: 0;
- }
-
- .fixed-right {
- top: 0;
- right: 0;
- bottom: 0;
- }
-
- .fixed-bottom {
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- .fixed-left {
- top: 0;
- bottom: 0;
- left: 0;
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-shadow-flex-layout.html b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-shadow-flex-layout.html
deleted file mode 100644
index 196df284c05..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/classes/iron-shadow-flex-layout.html
+++ /dev/null
@@ -1,307 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<script>
- console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
-</script>
-
-<style>
-
- /*******************************
- Flex Layout
- *******************************/
-
- html /deep/ .layout.horizontal,
- html /deep/ .layout.horizontal-reverse,
- html /deep/ .layout.vertical,
- html /deep/ .layout.vertical-reverse {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- }
-
- html /deep/ .layout.inline {
- display: -ms-inline-flexbox;
- display: -webkit-inline-flex;
- display: inline-flex;
- }
-
- html /deep/ .layout.horizontal {
- -ms-flex-direction: row;
- -webkit-flex-direction: row;
- flex-direction: row;
- }
-
- html /deep/ .layout.horizontal-reverse {
- -ms-flex-direction: row-reverse;
- -webkit-flex-direction: row-reverse;
- flex-direction: row-reverse;
- }
-
- html /deep/ .layout.vertical {
- -ms-flex-direction: column;
- -webkit-flex-direction: column;
- flex-direction: column;
- }
-
- html /deep/ .layout.vertical-reverse {
- -ms-flex-direction: column-reverse;
- -webkit-flex-direction: column-reverse;
- flex-direction: column-reverse;
- }
-
- html /deep/ .layout.wrap {
- -ms-flex-wrap: wrap;
- -webkit-flex-wrap: wrap;
- flex-wrap: wrap;
- }
-
- html /deep/ .layout.wrap-reverse {
- -ms-flex-wrap: wrap-reverse;
- -webkit-flex-wrap: wrap-reverse;
- flex-wrap: wrap-reverse;
- }
-
- html /deep/ .flex-auto {
- -ms-flex: 1 1 auto;
- -webkit-flex: 1 1 auto;
- flex: 1 1 auto;
- }
-
- html /deep/ .flex-none {
- -ms-flex: none;
- -webkit-flex: none;
- flex: none;
- }
-
- html /deep/ .flex,
- html /deep/ .flex-1 {
- -ms-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- }
-
- html /deep/ .flex-2 {
- -ms-flex: 2;
- -webkit-flex: 2;
- flex: 2;
- }
-
- html /deep/ .flex-3 {
- -ms-flex: 3;
- -webkit-flex: 3;
- flex: 3;
- }
-
- html /deep/ .flex-4 {
- -ms-flex: 4;
- -webkit-flex: 4;
- flex: 4;
- }
-
- html /deep/ .flex-5 {
- -ms-flex: 5;
- -webkit-flex: 5;
- flex: 5;
- }
-
- html /deep/ .flex-6 {
- -ms-flex: 6;
- -webkit-flex: 6;
- flex: 6;
- }
-
- html /deep/ .flex-7 {
- -ms-flex: 7;
- -webkit-flex: 7;
- flex: 7;
- }
-
- html /deep/ .flex-8 {
- -ms-flex: 8;
- -webkit-flex: 8;
- flex: 8;
- }
-
- html /deep/ .flex-9 {
- -ms-flex: 9;
- -webkit-flex: 9;
- flex: 9;
- }
-
- html /deep/ .flex-10 {
- -ms-flex: 10;
- -webkit-flex: 10;
- flex: 10;
- }
-
- html /deep/ .flex-11 {
- -ms-flex: 11;
- -webkit-flex: 11;
- flex: 11;
- }
-
- html /deep/ .flex-12 {
- -ms-flex: 12;
- -webkit-flex: 12;
- flex: 12;
- }
-
- /* alignment in cross axis */
-
- html /deep/ .layout.start {
- -ms-flex-align: start;
- -webkit-align-items: flex-start;
- align-items: flex-start;
- }
-
- html /deep/ .layout.center,
- html /deep/ .layout.center-center {
- -ms-flex-align: center;
- -webkit-align-items: center;
- align-items: center;
- }
-
- html /deep/ .layout.end {
- -ms-flex-align: end;
- -webkit-align-items: flex-end;
- align-items: flex-end;
- }
-
- /* alignment in main axis */
-
- html /deep/ .layout.start-justified {
- -ms-flex-pack: start;
- -webkit-justify-content: flex-start;
- justify-content: flex-start;
- }
-
- html /deep/ .layout.center-justified,
- html /deep/ .layout.center-center {
- -ms-flex-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- }
-
- html /deep/ .layout.end-justified {
- -ms-flex-pack: end;
- -webkit-justify-content: flex-end;
- justify-content: flex-end;
- }
-
- html /deep/ .layout.around-justified {
- -ms-flex-pack: around;
- -webkit-justify-content: space-around;
- justify-content: space-around;
- }
-
- html /deep/ .layout.justified {
- -ms-flex-pack: justify;
- -webkit-justify-content: space-between;
- justify-content: space-between;
- }
-
- /* self alignment */
-
- html /deep/ .self-start {
- -ms-align-self: flex-start;
- -webkit-align-self: flex-start;
- align-self: flex-start;
- }
-
- html /deep/ .self-center {
- -ms-align-self: center;
- -webkit-align-self: center;
- align-self: center;
- }
-
- html /deep/ .self-end {
- -ms-align-self: flex-end;
- -webkit-align-self: flex-end;
- align-self: flex-end;
- }
-
- html /deep/ .self-stretch {
- -ms-align-self: stretch;
- -webkit-align-self: stretch;
- align-self: stretch;
- }
-
- /*******************************
- Other Layout
- *******************************/
-
- html /deep/ .block {
- display: block;
- }
-
- /* IE 10 support for HTML5 hidden attr */
- html /deep/ [hidden] {
- display: none !important;
- }
-
- html /deep/ .invisible {
- visibility: hidden !important;
- }
-
- html /deep/ .relative {
- position: relative;
- }
-
- html /deep/ .fit {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- body.fullbleed {
- margin: 0;
- height: 100vh;
- }
-
- html /deep/ .scroll {
- -webkit-overflow-scrolling: touch;
- overflow: auto;
- }
-
- .fixed-bottom,
- .fixed-left,
- .fixed-right,
- .fixed-top {
- position: fixed;
- }
-
- html /deep/ .fixed-top {
- top: 0;
- left: 0;
- right: 0;
- }
-
- html /deep/ .fixed-right {
- top: 0;
- right: 0;
- bottom: 0;
- }
-
- html /deep/ .fixed-bottom {
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- html /deep/ .fixed-left {
- top: 0;
- bottom: 0;
- left: 0;
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/demo/index.html
deleted file mode 100644
index 2c3f5f7d213..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/demo/index.html
+++ /dev/null
@@ -1,396 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-flex-layout demo</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../iron-flex-layout.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- demo-snippet {
- --demo-snippet-demo: {
- padding: 0;
- }
- }
- .container {
- background-color: #ccc;
- padding: 5px;
- margin: 0;
- }
- .container > div {
- padding: 15px;
- margin: 5px;
- background-color: white;
- min-height: 20px;
- }
-
- .vertical-section-container {
- max-width: 700px
- }
- </style>
-
-</head>
-<body unresolved class="fullbleed">
- <div class="vertical-section-container centered">
- <h4>Horizontal and vertical layout</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex {
- @apply(--layout-horizontal);
- }
- </style>
- <div class="container flex">
- <div>one</div>
- <div>two</div>
- <div>three</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Flexible children</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-horizontal {
- @apply(--layout-horizontal);
- }
- .flexchild {
- @apply(--layout-flex);
- }
- </style>
-
- <div class="container flex-horizontal">
- <div>one</div>
- <div class="flexchild">two (flex)</div>
- <div>three</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Flexible children in vertical layouts</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-vertical {
- @apply(--layout-vertical);
- height: 220px;
- }
- .flexchild-vertical {
- @apply(--layout-flex);
- }
- </style>
-
- <div class="container flex-vertical">
- <div>one</div>
- <div class="flexchild-vertical">two (flex)</div>
- <div>three</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Flex ratios</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-horizontal-with-ratios {
- @apply(--layout-horizontal);
- }
- .flexchild {
- @apply(--layout-flex);
- }
- .flex2child {
- @apply(--layout-flex-2);
- }
- .flex3child {
- @apply(--layout-flex-3);
- }
- </style>
-
- <div class="container flex-horizontal-with-ratios">
- <div class="flex3child">one</div>
- <div class="flexchild">two</div>
- <div class="flex2child">three</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Cross-axis stretch alignment (default)</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-stretch-align {
- @apply(--layout-horizontal);
- height: 120px;
- }
- </style>
-
- <div class="container flex-stretch-align">
- <div>stretch</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Cross-axis center alignment</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-center-align {
- @apply(--layout-horizontal);
- @apply(--layout-center);
- height: 120px;
- }
- </style>
-
- <div class="container flex-center-align">
- <div>center</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Cross-axis start alignment</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-start-align {
- @apply(--layout-horizontal);
- @apply(--layout-start);
- height: 120px;
- }
- </style>
-
- <div class="container flex-start-align">
- <div>start</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Cross-axis end alignment</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-end-align {
- @apply(--layout-horizontal);
- @apply(--layout-end);
- height: 120px;
- }
- </style>
-
- <div class="container flex-end-align">
- <div>end</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Justification, start justified</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-start-justified {
- @apply(--layout-horizontal);
- @apply(--layout-start-justified);
- }
- </style>
-
- <div class="container flex-start-justified">
- <div>start-justified</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Justification, start justified</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-center-justified {
- @apply(--layout-horizontal);
- @apply(--layout-center-justified);
- }
- </style>
-
- <div class="container flex-center-justified">
- <div>center-justified</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Justification, end justified</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-end-justified {
- @apply(--layout-horizontal);
- @apply(--layout-end-justified);
- }
- </style>
-
- <div class="container flex-end-justified">
- <div>end-justified</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Justification, equal space between elements</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-equal-justified {
- @apply(--layout-horizontal);
- @apply(--layout-justified);
- }
- </style>
-
- <div class="container flex-equal-justified">
- <div>justified</div>
- <div>justified</div>
- <div>justified</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Justification, equal space around each element</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-equal-around-justified {
- @apply(--layout-horizontal);
- @apply(--layout-around-justified);
- }
- </style>
-
- <div class="container flex-equal-around-justified">
- <div>around-justified</div>
- <div>around-justified</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Self alignment</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-self-align {
- @apply(--layout-horizontal);
- @apply(--layout-justified);
- height: 120px;
- }
- .flex-self-align div {
- @apply(--layout-flex);
- }
- .child1 {
- @apply(--layout-self-start);
- }
- .child2 {
- @apply(--layout-self-center);
- }
- .child3 {
- @apply(--layout-self-end);
- }
- .child4 {
- @apply(--layout-self-stretch);
- }
- </style>
-
- <div class="container flex-self-align">
- <div class="child1">one</div>
- <div class="child2">two</div>
- <div class="child3">three</div>
- <div class="child4">four</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Wrapping</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-wrap {
- @apply(--layout-horizontal);
- @apply(--layout-wrap);
- width: 200px;
- }
- </style>
-
- <div class="container flex-wrap">
- <div>one</div>
- <div>two</div>
- <div>three</div>
- <div>four</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>Reversed layouts</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .flex-reversed {
- @apply(--layout-horizontal-reverse);
- }
- </style>
-
- <div class="container flex-reversed">
- <div>one</div>
- <div>two</div>
- <div>three</div>
- <div>four</div>
- </div>
- </template>
- </demo-snippet>
-
- <h4>General purpose rules</h4>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .general {
- width: 100%;
- }
- .general > div {
- background-color: #ccc;
- padding: 4px;
- margin: 12px;
- }
- .block {
- @apply(--layout-block);
- }
- .invisible {
- @apply(--layout-invisible);
- }
- .relative {
- @apply(--layout-relative);
- }
- .fit {
- @apply(--layout-fit);
- }
- </style>
-
- <div class="general">
- <div>Before <span>[A Span]</span> After</div>
- <div>Before <span class="block">[A Block Span]</span> After</div>
- <div>Before invisible span <span class="invisible">Not displayed</span> After invisible span</div>
- <div class="relative" style="height: 100px;">
- <div class="fit" style="background-color: #000;color: white">Fit</div>
- </div>
- </div>
- </template>
- </demo-snippet>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/index.html
deleted file mode 100644
index 7d3b0881f8c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>iron-flex-layout</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout-classes.html b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout-classes.html
deleted file mode 100644
index d382652b717..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout-classes.html
+++ /dev/null
@@ -1,431 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<!--
-A set of layout classes that let you specify layout properties directly in markup.
-You must include this file in every element that needs to use them.
-
-Sample use:
-
- <link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
- <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
-
- <div class="layout horizontal layout-start">
- <div>cross axis start alignment</div>
- </div>
-
-The following imports are available:
- - iron-flex
- - iron-flex-reverse
- - iron-flex-alignment
- - iron-flex-factors
- - iron-positioning
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<!-- Most common used flex styles-->
-<dom-module id="iron-flex">
- <template>
- <style>
- .layout.horizontal,
- .layout.vertical {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- }
-
- .layout.inline {
- display: -ms-inline-flexbox;
- display: -webkit-inline-flex;
- display: inline-flex;
- }
-
- .layout.horizontal {
- -ms-flex-direction: row;
- -webkit-flex-direction: row;
- flex-direction: row;
- }
-
- .layout.vertical {
- -ms-flex-direction: column;
- -webkit-flex-direction: column;
- flex-direction: column;
- }
-
- .layout.wrap {
- -ms-flex-wrap: wrap;
- -webkit-flex-wrap: wrap;
- flex-wrap: wrap;
- }
-
- .layout.center,
- .layout.center-center {
- -ms-flex-align: center;
- -webkit-align-items: center;
- align-items: center;
- }
-
- .layout.center-justified,
- .layout.center-center {
- -ms-flex-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- }
-
- .flex {
- -ms-flex: 1 1 0.000000001px;
- -webkit-flex: 1;
- flex: 1;
- -webkit-flex-basis: 0.000000001px;
- flex-basis: 0.000000001px;
- }
-
- .flex-auto {
- -ms-flex: 1 1 auto;
- -webkit-flex: 1 1 auto;
- flex: 1 1 auto;
- }
-
- .flex-none {
- -ms-flex: none;
- -webkit-flex: none;
- flex: none;
- }
- </style>
- </template>
-</dom-module>
-
-<!-- Basic flexbox reverse styles -->
-<dom-module id="iron-flex-reverse">
- <template>
- <style>
- .layout.horizontal-reverse,
- .layout.vertical-reverse {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- }
-
- .layout.horizontal-reverse {
- -ms-flex-direction: row-reverse;
- -webkit-flex-direction: row-reverse;
- flex-direction: row-reverse;
- }
-
- .layout.vertical-reverse {
- -ms-flex-direction: column-reverse;
- -webkit-flex-direction: column-reverse;
- flex-direction: column-reverse;
- }
-
- .layout.wrap-reverse {
- -ms-flex-wrap: wrap-reverse;
- -webkit-flex-wrap: wrap-reverse;
- flex-wrap: wrap-reverse;
- }
- </style>
- </template>
-</dom-module>
-
-<!-- Flexbox alignment -->
-<dom-module id="iron-flex-alignment">
- <template>
- <style>
- /**
- * Alignment in cross axis.
- */
- .layout.start {
- -ms-flex-align: start;
- -webkit-align-items: flex-start;
- align-items: flex-start;
- }
-
- .layout.center,
- .layout.center-center {
- -ms-flex-align: center;
- -webkit-align-items: center;
- align-items: center;
- }
-
- .layout.end {
- -ms-flex-align: end;
- -webkit-align-items: flex-end;
- align-items: flex-end;
- }
-
- .layout.baseline {
- -ms-flex-align: baseline;
- -webkit-align-items: baseline;
- align-items: baseline;
- }
-
- /**
- * Alignment in main axis.
- */
- .layout.start-justified {
- -ms-flex-pack: start;
- -webkit-justify-content: flex-start;
- justify-content: flex-start;
- }
-
- .layout.center-justified,
- .layout.center-center {
- -ms-flex-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- }
-
- .layout.end-justified {
- -ms-flex-pack: end;
- -webkit-justify-content: flex-end;
- justify-content: flex-end;
- }
-
- .layout.around-justified {
- -ms-flex-pack: distribute;
- -webkit-justify-content: space-around;
- justify-content: space-around;
- }
-
- .layout.justified {
- -ms-flex-pack: justify;
- -webkit-justify-content: space-between;
- justify-content: space-between;
- }
-
- /**
- * Self alignment.
- */
- .self-start {
- -ms-align-self: flex-start;
- -webkit-align-self: flex-start;
- align-self: flex-start;
- }
-
- .self-center {
- -ms-align-self: center;
- -webkit-align-self: center;
- align-self: center;
- }
-
- .self-end {
- -ms-align-self: flex-end;
- -webkit-align-self: flex-end;
- align-self: flex-end;
- }
-
- .self-stretch {
- -ms-align-self: stretch;
- -webkit-align-self: stretch;
- align-self: stretch;
- }
-
- .self-baseline {
- -ms-align-self: baseline;
- -webkit-align-self: baseline;
- align-self: baseline;
- };
-
- /**
- * multi-line alignment in main axis.
- */
- .layout.start-aligned {
- -ms-flex-line-pack: start; /* IE10 */
- -ms-align-content: flex-start;
- -webkit-align-content: flex-start;
- align-content: flex-start;
- }
-
- .layout.end-aligned {
- -ms-flex-line-pack: end; /* IE10 */
- -ms-align-content: flex-end;
- -webkit-align-content: flex-end;
- align-content: flex-end;
- }
-
- .layout.center-aligned {
- -ms-flex-line-pack: center; /* IE10 */
- -ms-align-content: center;
- -webkit-align-content: center;
- align-content: center;
- }
-
- .layout.between-aligned {
- -ms-flex-line-pack: justify; /* IE10 */
- -ms-align-content: space-between;
- -webkit-align-content: space-between;
- align-content: space-between;
- }
-
- .layout.around-aligned {
- -ms-flex-line-pack: distribute; /* IE10 */
- -ms-align-content: space-around;
- -webkit-align-content: space-around;
- align-content: space-around;
- }
- </style>
- </template>
-</dom-module>
-
-<dom-module id="iron-flex-factors">
- <template>
- <style>
- .flex,
- .flex-1 {
- -ms-flex: 1 1 0.000000001px;
- -webkit-flex: 1;
- flex: 1;
- -webkit-flex-basis: 0.000000001px;
- flex-basis: 0.000000001px;
- }
-
- .flex-2 {
- -ms-flex: 2;
- -webkit-flex: 2;
- flex: 2;
- }
-
- .flex-3 {
- -ms-flex: 3;
- -webkit-flex: 3;
- flex: 3;
- }
-
- .flex-4 {
- -ms-flex: 4;
- -webkit-flex: 4;
- flex: 4;
- }
-
- .flex-5 {
- -ms-flex: 5;
- -webkit-flex: 5;
- flex: 5;
- }
-
- .flex-6 {
- -ms-flex: 6;
- -webkit-flex: 6;
- flex: 6;
- }
-
- .flex-7 {
- -ms-flex: 7;
- -webkit-flex: 7;
- flex: 7;
- }
-
- .flex-8 {
- -ms-flex: 8;
- -webkit-flex: 8;
- flex: 8;
- }
-
- .flex-9 {
- -ms-flex: 9;
- -webkit-flex: 9;
- flex: 9;
- }
-
- .flex-10 {
- -ms-flex: 10;
- -webkit-flex: 10;
- flex: 10;
- }
-
- .flex-11 {
- -ms-flex: 11;
- -webkit-flex: 11;
- flex: 11;
- }
-
- .flex-12 {
- -ms-flex: 12;
- -webkit-flex: 12;
- flex: 12;
- }
- </style>
- </template>
-</dom-module>
-
-<!-- Non-flexbox positioning helper styles -->
-<dom-module id="iron-positioning">
- <template>
- <style>
- .block {
- display: block;
- }
-
- /* IE 10 support for HTML5 hidden attr */
- [hidden] {
- display: none !important;
- }
-
- .invisible {
- visibility: hidden !important;
- }
-
- .relative {
- position: relative;
- }
-
- .fit {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- body.fullbleed {
- margin: 0;
- height: 100vh;
- }
-
- .scroll {
- -webkit-overflow-scrolling: touch;
- overflow: auto;
- }
-
- /* fixed position */
- .fixed-bottom,
- .fixed-left,
- .fixed-right,
- .fixed-top {
- position: fixed;
- }
-
- .fixed-top {
- top: 0;
- left: 0;
- right: 0;
- }
-
- .fixed-right {
- top: 0;
- right: 0;
- bottom: 0;
- }
-
- .fixed-bottom {
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- .fixed-left {
- top: 0;
- bottom: 0;
- left: 0;
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout.html b/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout.html
deleted file mode 100644
index d98e9d0fddf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-flex-layout/iron-flex-layout.html
+++ /dev/null
@@ -1,399 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<!--
-The `<iron-flex-layout>` component provides simple ways to use
-[CSS flexible box layout](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes),
-also known as flexbox. This component provides two different ways to use flexbox:
-
-1. [Layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
-The layout class stylesheet provides a simple set of class-based flexbox rules, that
-let you specify layout properties directly in markup. You must include this file
-in every element that needs to use them.
-
- Sample use:
-
- <link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
- <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
-
- <div class="layout horizontal layout-start">
- <div>cross axis start alignment</div>
- </div>
-
-2. [Custom CSS mixins](https://github.com/PolymerElements/iron-flex-layout/blob/master/iron-flex-layout.html).
-The mixin stylesheet includes custom CSS mixins that can be applied inside a CSS rule using the `@apply` function.
-
-Please note that the old [/deep/ layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/classes)
-are deprecated, and should not be used. To continue using layout properties
-directly in markup, please switch to using the new `dom-module`-based
-[layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
-Please note that the new version does not use `/deep/`, and therefore requires you
-to import the `dom-modules` in every element that needs to use them.
-
-A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `<iron-flex-layout>` is available.
-
-@group Iron Elements
-@pseudoElement iron-flex-layout
-@demo demo/index.html
--->
-
-<style>
- /* IE 10 support for HTML5 hidden attr */
- [hidden] {
- display: none !important;
- }
-</style>
-
-<style is="custom-style">
- :root {
-
- --layout: {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- };
-
- --layout-inline: {
- display: -ms-inline-flexbox;
- display: -webkit-inline-flex;
- display: inline-flex;
- };
-
- --layout-horizontal: {
- @apply(--layout);
-
- -ms-flex-direction: row;
- -webkit-flex-direction: row;
- flex-direction: row;
- };
-
- --layout-horizontal-reverse: {
- @apply(--layout);
-
- -ms-flex-direction: row-reverse;
- -webkit-flex-direction: row-reverse;
- flex-direction: row-reverse;
- };
-
- --layout-vertical: {
- @apply(--layout);
-
- -ms-flex-direction: column;
- -webkit-flex-direction: column;
- flex-direction: column;
- };
-
- --layout-vertical-reverse: {
- @apply(--layout);
-
- -ms-flex-direction: column-reverse;
- -webkit-flex-direction: column-reverse;
- flex-direction: column-reverse;
- };
-
- --layout-wrap: {
- -ms-flex-wrap: wrap;
- -webkit-flex-wrap: wrap;
- flex-wrap: wrap;
- };
-
- --layout-wrap-reverse: {
- -ms-flex-wrap: wrap-reverse;
- -webkit-flex-wrap: wrap-reverse;
- flex-wrap: wrap-reverse;
- };
-
- --layout-flex-auto: {
- -ms-flex: 1 1 auto;
- -webkit-flex: 1 1 auto;
- flex: 1 1 auto;
- };
-
- --layout-flex-none: {
- -ms-flex: none;
- -webkit-flex: none;
- flex: none;
- };
-
- --layout-flex: {
- -ms-flex: 1 1 0.000000001px;
- -webkit-flex: 1;
- flex: 1;
- -webkit-flex-basis: 0.000000001px;
- flex-basis: 0.000000001px;
- };
-
- --layout-flex-2: {
- -ms-flex: 2;
- -webkit-flex: 2;
- flex: 2;
- };
-
- --layout-flex-3: {
- -ms-flex: 3;
- -webkit-flex: 3;
- flex: 3;
- };
-
- --layout-flex-4: {
- -ms-flex: 4;
- -webkit-flex: 4;
- flex: 4;
- };
-
- --layout-flex-5: {
- -ms-flex: 5;
- -webkit-flex: 5;
- flex: 5;
- };
-
- --layout-flex-6: {
- -ms-flex: 6;
- -webkit-flex: 6;
- flex: 6;
- };
-
- --layout-flex-7: {
- -ms-flex: 7;
- -webkit-flex: 7;
- flex: 7;
- };
-
- --layout-flex-8: {
- -ms-flex: 8;
- -webkit-flex: 8;
- flex: 8;
- };
-
- --layout-flex-9: {
- -ms-flex: 9;
- -webkit-flex: 9;
- flex: 9;
- };
-
- --layout-flex-10: {
- -ms-flex: 10;
- -webkit-flex: 10;
- flex: 10;
- };
-
- --layout-flex-11: {
- -ms-flex: 11;
- -webkit-flex: 11;
- flex: 11;
- };
-
- --layout-flex-12: {
- -ms-flex: 12;
- -webkit-flex: 12;
- flex: 12;
- };
-
- /* alignment in cross axis */
-
- --layout-start: {
- -ms-flex-align: start;
- -webkit-align-items: flex-start;
- align-items: flex-start;
- };
-
- --layout-center: {
- -ms-flex-align: center;
- -webkit-align-items: center;
- align-items: center;
- };
-
- --layout-end: {
- -ms-flex-align: end;
- -webkit-align-items: flex-end;
- align-items: flex-end;
- };
-
- --layout-baseline: {
- -ms-flex-align: baseline;
- -webkit-align-items: baseline;
- align-items: baseline;
- };
-
- /* alignment in main axis */
-
- --layout-start-justified: {
- -ms-flex-pack: start;
- -webkit-justify-content: flex-start;
- justify-content: flex-start;
- };
-
- --layout-center-justified: {
- -ms-flex-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- };
-
- --layout-end-justified: {
- -ms-flex-pack: end;
- -webkit-justify-content: flex-end;
- justify-content: flex-end;
- };
-
- --layout-around-justified: {
- -ms-flex-pack: distribute;
- -webkit-justify-content: space-around;
- justify-content: space-around;
- };
-
- --layout-justified: {
- -ms-flex-pack: justify;
- -webkit-justify-content: space-between;
- justify-content: space-between;
- };
-
- --layout-center-center: {
- @apply(--layout-center);
- @apply(--layout-center-justified);
- };
-
- /* self alignment */
-
- --layout-self-start: {
- -ms-align-self: flex-start;
- -webkit-align-self: flex-start;
- align-self: flex-start;
- };
-
- --layout-self-center: {
- -ms-align-self: center;
- -webkit-align-self: center;
- align-self: center;
- };
-
- --layout-self-end: {
- -ms-align-self: flex-end;
- -webkit-align-self: flex-end;
- align-self: flex-end;
- };
-
- --layout-self-stretch: {
- -ms-align-self: stretch;
- -webkit-align-self: stretch;
- align-self: stretch;
- };
-
- --layout-self-baseline: {
- -ms-align-self: baseline;
- -webkit-align-self: baseline;
- align-self: baseline;
- };
-
- /* multi-line alignment in main axis */
-
- --layout-start-aligned: {
- -ms-flex-line-pack: start; /* IE10 */
- -ms-align-content: flex-start;
- -webkit-align-content: flex-start;
- align-content: flex-start;
- };
-
- --layout-end-aligned: {
- -ms-flex-line-pack: end; /* IE10 */
- -ms-align-content: flex-end;
- -webkit-align-content: flex-end;
- align-content: flex-end;
- };
-
- --layout-center-aligned: {
- -ms-flex-line-pack: center; /* IE10 */
- -ms-align-content: center;
- -webkit-align-content: center;
- align-content: center;
- };
-
- --layout-between-aligned: {
- -ms-flex-line-pack: justify; /* IE10 */
- -ms-align-content: space-between;
- -webkit-align-content: space-between;
- align-content: space-between;
- };
-
- --layout-around-aligned: {
- -ms-flex-line-pack: distribute; /* IE10 */
- -ms-align-content: space-around;
- -webkit-align-content: space-around;
- align-content: space-around;
- };
-
- /*******************************
- Other Layout
- *******************************/
-
- --layout-block: {
- display: block;
- };
-
- --layout-invisible: {
- visibility: hidden !important;
- };
-
- --layout-relative: {
- position: relative;
- };
-
- --layout-fit: {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- };
-
- --layout-scroll: {
- -webkit-overflow-scrolling: touch;
- overflow: auto;
- };
-
- --layout-fullbleed: {
- margin: 0;
- height: 100vh;
- };
-
- /* fixed position */
-
- --layout-fixed-top: {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- };
-
- --layout-fixed-right: {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- };
-
- --layout-fixed-bottom: {
- position: fixed;
- right: 0;
- bottom: 0;
- left: 0;
- };
-
- --layout-fixed-left: {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- };
-
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.bower.json
deleted file mode 100644
index e09f62a1606..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "iron-form-element-behavior",
- "version": "1.0.6",
- "license": "http://polymer.github.io/LICENSE.txt",
- "private": true,
- "main": "iron-form-element-behavior.html",
- "authors": [
- "The Polymer Authors"
- ],
- "description": "Enables a custom element to be included in an iron-form",
- "keywords": [
- "web-components",
- "polymer",
- "form"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-form-element-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "polymer/web-component-tester#^3.4.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/iron-form-element-behavior",
- "_release": "1.0.6",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.6",
- "commit": "cf9e09ded62daf3363852ce98260aaad1ed0fae1"
- },
- "_source": "git://github.com/PolymerElements/iron-form-element-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-form-element-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.travis.yml
deleted file mode 100644
index 6d4a6216ae0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install web-component-tester
- - npm install bower
- - 'export PATH=$PWD/node_modules/.bin:$PATH'
- - bower install
-env:
- global:
- - secure: EN5HtbAeaCE1IzGk5JlSq7GWcANh/zYgbpZn1y0VocfkZfzOv8cIh8Zmr4Q6shII6K07Fyx1LQuAjsURqX9mc3AmfMHgPIbpZGpOKrjvt1Vf0bPN+uIC9vIFj3sLQj12gcfJg48EXk6HWsHscCZ3+am1xvRflhNEY3TjHPrUTgkF+KLbBEfb4mCZwVc4dln76ffvTQ/cPI9eYczNp1q9wWpYvn794qRLtAkKuQ5Z1b6hunOAx/hzCjGNbJDO3gkxO68dzzSp9YDIhKEFAUlMDalwLRr7sNgB4sNeDCg4mmie5fe6xk831HvBYFxZxmXD1uS6/Hvd8MiBDiols3lwz8uEUnPyrwDlxUkjn2sl5S+gO8CcHU2mShUCl73JfBtyWDKPSfQLR5QHEk4eqNzNn2HinAE/aezi4/TVCY7P3ujeK8sFlTsb9vlywnlJO3fqyZ+lBwZ4CbNjOTs1L2W+guT1Oq30PJ5TVxU2mvmIMtdpPveZB0iM/PM9FECsb303KeV5Zomk4dp2MxirK1O/4mPAHIz9UUpGopGOtpuODnRV4Lq7V9HaDxYOZzAHZDK4mJ1y6tSRH/yMUTEidhG2j5F6MXmhbKXj3I0oR95xx1RH+b8myErvUBlto4jR21Pd+mOVlkU78CBSN9XGhtBQjklF5+aC8YeH1DEv6mTn2o8=
- - secure: q3AjjaoaTZcdAdjIvzSf8Q1SdEg1mY6lBkeoDTMKJcftJ8zz1qIfjGzEuycSVVnOJhZ6WmvMMBxdThQCymF1wzT++SV+u34DYSFoZ5EhjM0TFhP63PRuhbE3DquPaISpM5aCH7epV4nMFD7PFE1BP4u/qiETAgPeAoY9LMT/JPclOfcQ3euwks3TSM6O8g7Ro1h1ElywCQ1souzkcjvJ3FxsqysJb7Mg/n9bmtwnkol/mrBaP6JzQMURUyswx7ZPj3qiFoA9ZLiNirzf+O781A4msKursjYrKr6TZtB6xcMlEg89YhFBXrLE9IEEM/fNp+vPNhaIA5VjYRy8iIK402RXpbh7/AlPD7yMFITeMSfT+Bqldur+pi0oN1N9SeWrmk6P+bdfdkdyGl1CVKP4S35z8cyFRgmvxO4/UG65cb66AdMeNVBEQsi2flCWgPyaTmOQ53YryCs7cFRu3zSMnU3F/gWqlmletgxGhFOBHTtEmr2A9QBLgg+EvB/83wj2dEEfMlIpoeq83/2PaE8hKAWyqPga7t532vU5AIFNOUk9vGzRCxsqGKF2j0/zFBdgHSLYCsWVrbjxmxdu6Fzi8ZATeqjDoc0eaIPhBkekOvDrUtUSHA9sSSG8j69GGUL4+WkoCMB74dz+GXz85fMJlMZWBXPtazDlNXYfU60T/1E=
-node_js: 4
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/README.md
deleted file mode 100644
index b68d08fb068..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-form-element-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/iron-form-element-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-form-element-behavior)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-form-element-behavior)_
-
-
-##Polymer.IronFormElementBehavior
-
-
- Polymer.IronFormElementBehavior enables a custom element to be included
- in an `iron-form`.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/bower.json
deleted file mode 100644
index 865f9b549c0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "iron-form-element-behavior",
- "version": "1.0.6",
- "license": "http://polymer.github.io/LICENSE.txt",
- "private": true,
- "main": "iron-form-element-behavior.html",
- "authors": [
- "The Polymer Authors"
- ],
- "description": "Enables a custom element to be included in an iron-form",
- "keywords": [
- "web-components",
- "polymer",
- "form"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-form-element-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "polymer/web-component-tester#^3.4.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/index.html
deleted file mode 100644
index e919d0bcca5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/index.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
-
- <title>iron-form-element-behavior demo</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="simple-form.html">
- <link rel="import" href="simple-element.html">
- </head>
- <style>
- input {
- margin-bottom: 24px;
- width: 200px;
- }
- </style>
- <body>
-
- <div class="vertical-section-container centered">
- <div class="vertical-section">
- <form is="simple-form" id="form">
- Element with iron-form-element-behavior <input is="simple-element" type="text" name="one" value="one">
- <br>
- Element without iron-form-element-behavior <input type="text" name="two" value="two">
- <br>
- Element with iron-form-element-behavior <input is="simple-element" type="text" name="three" value="three">
- </form>
-
- <h4>Elements tracked by the form: <button onclick="update()">Update</button> </h4>
-
- <ul id="output">
- </ul>
- </div>
- </div>
-
- <script>
- function update() {
- var output = document.getElementById('output');
- var elements = document.getElementById('form').formElements;
- document.getElementById('output').innerHTML = '';
- for (var i = 0; i < elements.length; i++) {
- var li = document.createElement('li');
- var text = document.createTextNode(elements[i].value);
- li.appendChild(text);
- output.appendChild(li);
- }
- }
- </script>
- </body>
-
-
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-element.html b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-element.html
deleted file mode 100644
index 450276923b3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-element.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-form-element-behavior.html">
-
-<script>
-
- Polymer({
-
- is: 'simple-element',
-
- extends: 'input',
-
- behaviors: [
- Polymer.IronFormElementBehavior
- ]
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-form.html b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-form.html
deleted file mode 100644
index 4dc5dc6bb8f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/demo/simple-form.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../polymer/polymer.html">
-
-<script>
-
- Polymer({
-
- is: 'simple-form',
-
- extends: 'form',
-
- properties: {
- formElements: {
- type: Object,
- notify: true
- }
- },
-
- listeners: {
- 'iron-form-element-register': '_elementRegistered',
- 'iron-form-element-unregister': '_elementUnregistered'
- },
-
- ready: function() {
- this.formElements = [];
- },
-
- _elementRegistered: function(e) {
- this.formElements.push(e.target);
- e.target._parentForm = this;
- },
-
- _elementUnregistered: function(e) {
- var target = e.detail.target;
- if (target) {
- var index = this.formElements.indexOf(target);
- if (index > -1) {
- this.formElements.splice(index, 1);
- }
- }
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/index.html
deleted file mode 100644
index 8d748c0509b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-form-element-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/iron-form-element-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/iron-form-element-behavior.html
deleted file mode 100644
index cd9c6b4ab66..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-form-element-behavior/iron-form-element-behavior.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
- /**
- Polymer.IronFormElementBehavior enables a custom element to be included
- in an `iron-form`.
-
- @demo demo/index.html
- @polymerBehavior
- */
- Polymer.IronFormElementBehavior = {
-
- properties: {
- /**
- * Fired when the element is added to an `iron-form`.
- *
- * @event iron-form-element-register
- */
-
- /**
- * Fired when the element is removed from an `iron-form`.
- *
- * @event iron-form-element-unregister
- */
-
- /**
- * The name of this element.
- */
- name: {
- type: String
- },
-
- /**
- * The value for this element.
- */
- value: {
- notify: true,
- type: String
- },
-
- /**
- * Set to true to mark the input as required. If used in a form, a
- * custom element that uses this behavior should also use
- * Polymer.IronValidatableBehavior and define a custom validation method.
- * Otherwise, a `required` element will always be considered valid.
- * It's also strongly recommended to provide a visual style for the element
- * when its value is invalid.
- */
- required: {
- type: Boolean,
- value: false
- },
-
- /**
- * The form that the element is registered to.
- */
- _parentForm: {
- type: Object
- }
- },
-
- attached: function() {
- // Note: the iron-form that this element belongs to will set this
- // element's _parentForm property when handling this event.
- this.fire('iron-form-element-register');
- },
-
- detached: function() {
- if (this._parentForm) {
- this._parentForm.fire('iron-form-element-unregister', {target: this});
- }
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/.bower.json
deleted file mode 100644
index 9784e3a3b78..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/.bower.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "iron-icon",
- "private": true,
- "version": "1.0.8",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "An element that supports displaying an icon",
- "main": "iron-icon.html",
- "author": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "icon"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-icon.git"
- },
- "ignore": [],
- "dependencies": {
- "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
- "iron-meta": "polymerelements/iron-meta#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0",
- "iron-iconset": "polymerelements/iron-iconset#^1.0.0",
- "iron-icons": "polymerelements/iron-icons#^1.0.0",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "homepage": "https://github.com/PolymerElements/iron-icon",
- "_release": "1.0.8",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.8",
- "commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
- },
- "_source": "git://github.com/PolymerElements/iron-icon.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-icon"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/.travis.yml
deleted file mode 100644
index 982392253e0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: Cyo7MV8FASyf2EZyrSmDbmoZmopQhuTbV79Ntl6eDq6JxEOAApULHn6W+ht0tvmaA+L2cRNq3Z4uvy3tbZCI5SCgQuEKLDJFoghzNp4Izc54bBlJzsxMjcgxEEMbw1jDIKp+PJ+1+8oyT5H1NogcGoNWcvMCjn+8Vl64/999mhw=
- - secure: dI3wfjJoooFlq6Kb8V1fkbc9N5jrvw7dExN4tp4KlvJFiXIvgb823jEyLGnK/oeVLwP9yncvOYxiG/enNbjpk6fId3zjwptN2H1am3pIsPQASOZJ0Pwvwa1dX7EYGk2kxOwY1pyX4is/QRVDrlUkLm3YAPOFfYJEiVB7m6TNFIo=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/README.md
deleted file mode 100644
index a08298f6495..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-icon.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-icon.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-icon)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-icon)_
-
-
-##&lt;iron-icon&gt;
-
-The `iron-icon` element displays an icon. By default an icon renders as a 24px square.
-
-Example using src:
-
-```html
-<iron-icon src="star.png"></iron-icon>
-```
-
-Example setting size to 32px x 32px:
-
-```html
-<iron-icon class="big" src="big_star.png"></iron-icon>
-
-<style is="custom-style">
- .big {
- --iron-icon-height: 32px;
- --iron-icon-width: 32px;
- }
-</style>
-```
-
-The iron elements include several sets of icons.
-To use the default set of icons, import `iron-icons.html` and use the `icon` attribute to specify an icon:
-
-```html
-<link rel="import" href="/components/iron-icons/iron-icons.html">
-
-<iron-icon icon="menu"></iron-icon>
-```
-
-To use a different built-in set of icons, import the specific `iron-icons/<iconset>-icons.html`, and
-specify the icon as `<iconset>:<icon>`. For example, to use a communication icon, you would
-use:
-
-```html
-<link rel="import" href="/components/iron-icons/communication-icons.html">
-
-<iron-icon icon="communication:email"></iron-icon>
-```
-
-You can also create custom icon sets of bitmap or SVG icons.
-
-Example of using an icon named `cherry` from a custom iconset with the ID `fruit`:
-
-```html
-<iron-icon icon="fruit:cherry"></iron-icon>
-```
-
-See [iron-iconset](iron-iconset) and [iron-iconset-svg](iron-iconset-svg) for more information about
-how to create a custom iconset.
-
-See the [iron-icons demo](iron-icons?view=demo:demo/index.html) to see the icons available
-in the various iconsets.
-
-To load a subset of icons from one of the default `iron-icons` sets, you can
-use the [poly-icon](https://poly-icon.appspot.com/) tool. It allows you
-to select individual icons, and creates an iconset from them that you can
-use directly in your elements.
-
-### Styling
-
-The following custom properties are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--iron-icon-width` | Width of the icon | `24px` |
-| `--iron-icon-height` | Height of the icon | `24px` |
-| `--iron-icon-fill-color` | Fill color of the svg icon | `currentcolor` |
-| `--iron-icon-stroke-color` | Stroke color of the svg icon | none |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/bower.json
deleted file mode 100644
index 38e4ba45d0a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/bower.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "iron-icon",
- "private": true,
- "version": "1.0.8",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "An element that supports displaying an icon",
- "main": "iron-icon.html",
- "author": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "icon"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-icon.git"
- },
- "ignore": [],
- "dependencies": {
- "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
- "iron-meta": "polymerelements/iron-meta#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0",
- "iron-iconset": "polymerelements/iron-iconset#^1.0.0",
- "iron-icons": "polymerelements/iron-icons#^1.0.0",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/async.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/async.html
deleted file mode 100644
index eaf40d1ba2c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/async.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <title>iron-icon demo</title>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-icon.html">
- <link rel="import" href="../../paper-styles/demo-pages.html" >
-
- <style is="custom-style">
- #loading_message {
- color: #444;
- margin-bottom: 16px;
- }
- .vertical-section h4 {
- border-left: 3px solid var(--paper-grey-300);
- padding-left: 10px;
- }
-
- .vertical-section h4:hover {
- border-left-color: var(--google-blue-700);
- }
- </style>
-</head>
-<body>
- <div class="vertical-section-container centered">
- <h4>
- This demo is for an &lt;iron-icon&gt; with an asynchronously loaded
- iconset.
- </h4>
-
- <div id='loading_message'>Waiting to load iconset...</div>
-
- <div class="vertical-section">
- <!-- iron-icon using a iron-iconset as its icon source -->
- <iron-iconset name="example" icons="location" src="location.png" size="24" width="24"></iron-iconset>
-
- <h4>&lt;iron-icon icon="example:location"&gt;</h4>
- <iron-icon icon="example:location"></iron-icon>
-
- </div>
- </div>
- <script>
- setTimeout(function() {
- // Import the code that powers the iron-iconset asynchronously
- var linkElem = document.createElement('link');
- linkElem.setAttribute('rel', 'import');
- linkElem.setAttribute('href', '../../iron-iconset/iron-iconset.html');
- document.head.appendChild(linkElem);
- document.querySelector('#loading_message').innerText = "Iconset Loaded.";
- }, 1000);
- </script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/index.html
deleted file mode 100644
index 999ed35b484..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <title>iron-icon demo</title>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-icon.html">
- <link rel="import" href="../../iron-iconset/iron-iconset.html">
- <link href="../../paper-styles/demo-pages.html" rel="import">
-
- <style is="custom-style">
- .vertical-section h4 {
- border-left: 3px solid var(--paper-grey-300);
- padding-left: 10px;
- }
-
- .vertical-section h4:hover {
- border-left-color: var(--google-blue-700);
- }
- </style>
-</head>
-<body>
- <div class="vertical-section-container centered">
- <h4>This demo is for a single &lt;iron-icon&gt;. If you're looking for the
- whole set of available icons, check out the <a href="/elements/iron-icons?view=demo:demo/index.html">&lt;iron-icons&gt; demo.</a></h5>
-
- <div class="vertical-section">
- <!-- iron-icon using a iron-iconset as its icon source -->
- <iron-iconset name="example" icons="location" src="location.png" size="24" width="24"></iron-iconset>
-
- <h4>&lt;iron-icon icon="example:location"&gt;</h4>
- <iron-icon icon="example:location"></iron-icon>
-
- <!-- iron-icon using an image url as its icon source -->
- <h4>&lt;iron-icon src="location.png"&gt;</h4>
- <iron-icon src="location.png"></iron-icon>
- </div>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/location.png b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/location.png
deleted file mode 100644
index 9bb74236b85..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/demo/location.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/hero.svg
deleted file mode 100755
index f0f58536e53..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/hero.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <circle cx="112" cy="61" r="8"/>
- <path d="M129,78H95V44h34V78z M97,76h30V46H97V76z"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/index.html
deleted file mode 100644
index 487bb5c38a5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/iron-icon.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icon/iron-icon.html
deleted file mode 100644
index 3428062b9db..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icon/iron-icon.html
+++ /dev/null
@@ -1,207 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-meta/iron-meta.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-
-<!--
-
-The `iron-icon` element displays an icon. By default an icon renders as a 24px square.
-
-Example using src:
-
- <iron-icon src="star.png"></iron-icon>
-
-Example setting size to 32px x 32px:
-
- <iron-icon class="big" src="big_star.png"></iron-icon>
-
- <style is="custom-style">
- .big {
- --iron-icon-height: 32px;
- --iron-icon-width: 32px;
- }
- </style>
-
-The iron elements include several sets of icons.
-To use the default set of icons, import `iron-icons.html` and use the `icon` attribute to specify an icon:
-
- <link rel="import" href="/components/iron-icons/iron-icons.html">
-
- <iron-icon icon="menu"></iron-icon>
-
-To use a different built-in set of icons, import the specific `iron-icons/<iconset>-icons.html`, and
-specify the icon as `<iconset>:<icon>`. For example, to use a communication icon, you would
-use:
-
- <link rel="import" href="/components/iron-icons/communication-icons.html">
-
- <iron-icon icon="communication:email"></iron-icon>
-
-You can also create custom icon sets of bitmap or SVG icons.
-
-Example of using an icon named `cherry` from a custom iconset with the ID `fruit`:
-
- <iron-icon icon="fruit:cherry"></iron-icon>
-
-See [iron-iconset](iron-iconset) and [iron-iconset-svg](iron-iconset-svg) for more information about
-how to create a custom iconset.
-
-See the [iron-icons demo](iron-icons?view=demo:demo/index.html) to see the icons available
-in the various iconsets.
-
-To load a subset of icons from one of the default `iron-icons` sets, you can
-use the [poly-icon](https://poly-icon.appspot.com/) tool. It allows you
-to select individual icons, and creates an iconset from them that you can
-use directly in your elements.
-
-### Styling
-
-The following custom properties are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--iron-icon-width` | Width of the icon | `24px`
-`--iron-icon-height` | Height of the icon | `24px`
-`--iron-icon-fill-color` | Fill color of the svg icon | `currentcolor`
-`--iron-icon-stroke-color` | Stroke color of the svg icon | none
-
-@group Iron Elements
-@element iron-icon
-@demo demo/index.html
-@hero hero.svg
-@homepage polymer.github.io
--->
-
-<dom-module id="iron-icon">
-
- <style>
- :host {
- @apply(--layout-inline);
- @apply(--layout-center-center);
- position: relative;
-
- vertical-align: middle;
-
- fill: var(--iron-icon-fill-color, currentcolor);
- stroke: var(--iron-icon-stroke-color, none);
-
- width: var(--iron-icon-width, 24px);
- height: var(--iron-icon-height, 24px);
- }
- </style>
-
- <template>
- </template>
-
- <script>
-
- Polymer({
-
- is: 'iron-icon',
-
- properties: {
-
- /**
- * The name of the icon to use. The name should be of the form:
- * `iconset_name:icon_name`.
- */
- icon: {
- type: String,
- observer: '_iconChanged'
- },
-
- /**
- * The name of the theme to used, if one is specified by the
- * iconset.
- */
- theme: {
- type: String,
- observer: '_updateIcon'
- },
-
- /**
- * If using iron-icon without an iconset, you can set the src to be
- * the URL of an individual icon image file. Note that this will take
- * precedence over a given icon attribute.
- */
- src: {
- type: String,
- observer: '_srcChanged'
- },
-
- /**
- * @type {!Polymer.IronMeta}
- */
- _meta: {
- value: Polymer.Base.create('iron-meta', {type: 'iconset'}),
- observer: '_updateIcon'
- }
-
- },
-
- _DEFAULT_ICONSET: 'icons',
-
- _iconChanged: function(icon) {
- var parts = (icon || '').split(':');
- this._iconName = parts.pop();
- this._iconsetName = parts.pop() || this._DEFAULT_ICONSET;
- this._updateIcon();
- },
-
- _srcChanged: function(src) {
- this._updateIcon();
- },
-
- _usesIconset: function() {
- return this.icon || !this.src;
- },
-
- /** @suppress {visibility} */
- _updateIcon: function() {
- if (this._usesIconset()) {
- if (this._img && this._img.parentNode) {
- Polymer.dom(this.root).removeChild(this._img);
- }
- if (this._iconName === "") {
- if (this._iconset) {
- this._iconset.removeIcon(this);
- }
- } else if (this._iconsetName && this._meta) {
- this._iconset = /** @type {?Polymer.Iconset} */ (
- this._meta.byKey(this._iconsetName));
- if (this._iconset) {
- this._iconset.applyIcon(this, this._iconName, this.theme);
- this.unlisten(window, 'iron-iconset-added', '_updateIcon');
- } else {
- this.listen(window, 'iron-iconset-added', '_updateIcon');
- }
- }
- } else {
- if (this._iconset) {
- this._iconset.removeIcon(this);
- }
- if (!this._img) {
- this._img = document.createElement('img');
- this._img.style.width = '100%';
- this._img.style.height = '100%';
- this._img.draggable = false;
- }
- this._img.src = this.src;
- Polymer.dom(this.root).appendChild(this._img);
- }
- }
-
- });
-
- </script>
-
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/.bower.json
deleted file mode 100644
index be52e7bfd21..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/.bower.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "iron-icons",
- "version": "1.1.3",
- "description": "A set of icons for use with iron-icon",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "icon"
- ],
- "main": "iron-icons.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-icons"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-icons",
- "dependencies": {
- "iron-icon": "polymerelements/iron-icon#^1.0.0",
- "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "polymerelements/iron-component-page#1.0.0",
- "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
- "iron-meta": "polymerelements/iron-meta#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0"
- },
- "ignore": [
- "util",
- "update-icons.sh"
- ],
- "_release": "1.1.3",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.3",
- "commit": "c13869b57a9464dfc3a1f26e89858f8be37e7441"
- },
- "_source": "git://github.com/PolymerElements/iron-icons.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-icons"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/.travis.yml
deleted file mode 100644
index 57e6cef9c9e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: itlu3qIX/3ggZQIuzTJc62A5MD2Rdms+zB1EvNEWFiQZQgNGu2+hhp72PcVB/urybOTFmMeq4W12RGr53KMvwj6mwNlXPhQxeP1oyR+icZZVbuLDfj5pF8OvNf4OXEkGv0yH+OTuNTB8CU4msJzgB2W8iuC+pFH/dIas6fQDTfE=
- - secure: LBT0VumsEPWUYm0OLhqHU1XWmVY18QP64cMeqZAwASnYYyH/R5OGYAcI7aH8To29FWpkZSL85NPto37bN+f8DWRSULq4p+1wl2HviYHsam8x1NzN7hKq6nv+203qaT9SflheaNy6sSDfZJQ+36bRcGQ5khKkVeDpw7h8D/osSQ4=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/README.md
deleted file mode 100644
index bd11ba7082a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-icons.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/iron-icons.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-icons)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-icons)_
-
-
-##&lt;iron-icons&gt;
-
-`iron-icons` is a utility import that includes the definition for the `iron-icon` element, `iron-iconset-svg` element, as well as an import for the default icon set.
-
-The `iron-icons` directory also includes imports for additional icon sets that can be loaded into your project.
-
-Example loading icon set:
-
-```html
-<link rel="import" href="../iron-icons/maps-icons.html">
-```
-
-To use an icon from one of these sets, first prefix your `iron-icon` with the icon set name, followed by a colon, ":", and then the icon id.
-
-Example using the directions-bus icon from the maps icon set:
-
-```html
-<iron-icon icon="maps:directions-bus"></iron-icon>
-```
-
-See [iron-icon](#iron-icon) for more information about working with icons.
-
-See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about how to create a custom iconset.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/av-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/av-icons.html
deleted file mode 100644
index e4a0d245bda..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/av-icons.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="av" size="24">
-<svg><defs>
-<g id="add-to-queue"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2h-3v3h-2v-3H8v-2h3V7h2v3h3z"/></g>
-<g id="airplay"><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
-<g id="album"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"/></g>
-<g id="art-track"><path d="M22 13h-8v-2h8v2zm0-6h-8v2h8V7zm-8 10h8v-2h-8v2zm-2-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-1.5 6l-2.25-3-1.75 2.26-1.25-1.51L3.5 15h7z"/></g>
-<g id="av-timer"><path d="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-1.41-6.8-6.8v.02C4.42 6.45 3 9.05 3 12c0 4.97 4.02 9 9 9 4.97 0 9-4.03 9-9s-4.03-9-9-9h-1zm7 9c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zM6 12c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z"/></g>
-<g id="closed-caption"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z"/></g>
-<g id="equalizer"><path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"/></g>
-<g id="explicit"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h4v2h-4v2h4v2H9V7h6v2z"/></g>
-<g id="fast-forward"><path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/></g>
-<g id="fast-rewind"><path d="M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"/></g>
-<g id="fiber-dvr"><path d="M17.5 10.5h2v1h-2zm-13 0h2v3h-2zM21 3H3c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h18c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zM8 13.5c0 .85-.65 1.5-1.5 1.5H3V9h3.5c.85 0 1.5.65 1.5 1.5v3zm4.62 1.5h-1.5L9.37 9h1.5l1 3.43 1-3.43h1.5l-1.75 6zM21 11.5c0 .6-.4 1.15-.9 1.4L21 15h-1.5l-.85-2H17.5v2H16V9h3.5c.85 0 1.5.65 1.5 1.5v1z"/></g>
-<g id="fiber-manual-record"><circle cx="12" cy="12" r="8"/></g>
-<g id="fiber-new"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM8.5 15H7.3l-2.55-3.5V15H3.5V9h1.25l2.5 3.5V9H8.5v6zm5-4.74H11v1.12h2.5v1.26H11v1.11h2.5V15h-4V9h4v1.26zm7 3.74c0 .55-.45 1-1 1h-4c-.55 0-1-.45-1-1V9h1.25v4.51h1.13V9.99h1.25v3.51h1.12V9h1.25v5z"/></g>
-<g id="fiber-pin"><path d="M5.5 10.5h2v1h-2zM20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM9 11.5c0 .85-.65 1.5-1.5 1.5h-2v2H4V9h3.5c.85 0 1.5.65 1.5 1.5v1zm3.5 3.5H11V9h1.5v6zm7.5 0h-1.2l-2.55-3.5V15H15V9h1.25l2.5 3.5V9H20v6z"/></g>
-<g id="fiber-smart-record"><g><circle cx="9" cy="12" r="8"/><path d="M17 4.26v2.09c2.33.82 4 3.04 4 5.65s-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74s-2.55-6.85-6-7.74z"/></g></g>
-<g id="forward-10"><path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.8-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z"/></g>
-<g id="forward-30"><path d="M9.6 13.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4 0 .6.1s.3.1.5.2.2.2.3.4.1.3.1.5v.3s-.1.2-.1.3-.1.2-.2.2-.2.1-.3.2c.2.1.4.2.5.4s.2.4.2.6c0 .2 0 .4-.1.5s-.2.3-.3.4-.3.2-.5.2-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.4-.1-.6h.8v.2s.1.1.1.2.1.1.2.1h.5s.1-.1.2-.1.1-.1.1-.2v-.5s-.1-.1-.1-.2-.1-.1-.2-.1h-.6v-.7zm5.7.7c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.9-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5zM4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8z"/></g>
-<g id="forward-5"><path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.7.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.5.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.6z"/></g>
-<g id="games"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/></g>
-<g id="hd"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"/></g>
-<g id="hearing"><path d="M17 20c-.29 0-.56-.06-.76-.15-.71-.37-1.21-.88-1.71-2.38-.51-1.56-1.47-2.29-2.39-3-.79-.61-1.61-1.24-2.32-2.53C9.29 10.98 9 9.93 9 9c0-2.8 2.2-5 5-5s5 2.2 5 5h2c0-3.93-3.07-7-7-7S7 5.07 7 9c0 1.26.38 2.65 1.07 3.9.91 1.65 1.98 2.48 2.85 3.15.81.62 1.39 1.07 1.71 2.05.6 1.82 1.37 2.84 2.73 3.55.51.23 1.07.35 1.64.35 2.21 0 4-1.79 4-4h-2c0 1.1-.9 2-2 2zM7.64 2.64L6.22 1.22C4.23 3.21 3 5.96 3 9s1.23 5.79 3.22 7.78l1.41-1.41C6.01 13.74 5 11.49 5 9s1.01-4.74 2.64-6.36zM11.5 9c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5-2.5 1.12-2.5 2.5z"/></g>
-<g id="high-quality"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z"/></g>
-<g id="library-add"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g>
-<g id="library-books"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"/></g>
-<g id="library-music"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57 0 1.08.19 1.5.51V5h4v2zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z"/></g>
-<g id="loop"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></g>
-<g id="mic"><path d="M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
-<g id="mic-none"><path d="M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1.2-9.1c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2l-.01 6.2c0 .66-.53 1.2-1.19 1.2-.66 0-1.2-.54-1.2-1.2V4.9zm6.5 6.1c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
-<g id="mic-off"><path d="M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28zm-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18l5.98 5.99zM4.27 3L3 4.27l6.01 6.01V11c0 1.66 1.33 3 2.99 3 .22 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c.91-.13 1.77-.45 2.54-.9L19.73 21 21 19.73 4.27 3z"/></g>
-<g id="movie"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></g>
-<g id="music-video"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"/></g>
-<g id="new-releases"><path d="M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"/></g>
-<g id="not-interested"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"/></g>
-<g id="pause"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></g>
-<g id="pause-circle-filled"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/></g>
-<g id="pause-circle-outline"><path d="M9 16h2V8H9v8zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm1-4h2V8h-2v8z"/></g>
-<g id="play-arrow"><path d="M8 5v14l11-7z"/></g>
-<g id="play-circle-filled"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/></g>
-<g id="play-circle-outline"><path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="playlist-add"><path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2 16h8v-2H2v2z"/></g>
-<g id="playlist-add-check"><path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zM2 16h8v-2H2v2zm19.5-4.5L23 13l-6.99 7-4.51-4.5L13 14l3.01 3 5.49-5.5z"/></g>
-<g id="playlist-play"><path d="M19 9H2v2h17V9zm0-4H2v2h17V5zM2 15h13v-2H2v2zm15-2v6l5-3-5-3z"/></g>
-<g id="queue"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g>
-<g id="queue-music"><path d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"/></g>
-<g id="queue-play-next"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h2v-2H3V5h18v8h2V5c0-1.11-.9-2-2-2zm-8 7V7h-2v3H8v2h3v3h2v-3h3v-2h-3zm11 8l-4.5 4.5L18 21l3-3-3-3 1.5-1.5L24 18z"/></g>
-<g id="radio"><path d="M3.24 6.15C2.51 6.43 2 7.17 2 8v12c0 1.1.89 2 2 2h16c1.11 0 2-.9 2-2V8c0-1.11-.89-2-2-2H8.3l8.26-3.34L15.88 1 3.24 6.15zM7 20c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-8h-2v-2h-2v2H4V8h16v4z"/></g>
-<g id="recent-actors"><path d="M21 5v14h2V5h-2zm-4 14h2V5h-2v14zM14 5H2c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM8 7.75c1.24 0 2.25 1.01 2.25 2.25S9.24 12.25 8 12.25 5.75 11.24 5.75 10 6.76 7.75 8 7.75zM12.5 17h-9v-.75c0-1.5 3-2.25 4.5-2.25s4.5.75 4.5 2.25V17z"/></g>
-<g id="remove-from-queue"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2H8v-2h8z"/></g>
-<g id="repeat"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/></g>
-<g id="repeat-one"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4zm-4-2V9h-1l-2 1v1h1.5v4H13z"/></g>
-<g id="replay"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/></g>
-<g id="replay-10"><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.1 11H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1c.2.1.3.2.5.3s.2.3.3.6.1.5.1.8v.7zm-.9-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z"/></g>
-<g id="replay-30"><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-2.4 8.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4 0 .6.1s.3.1.5.2.2.2.3.4.1.3.1.5v.3s-.1.2-.1.3-.1.2-.2.2-.2.1-.3.2c.2.1.4.2.5.4s.2.4.2.6c0 .2 0 .4-.1.5s-.2.3-.3.4-.3.2-.5.2-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.4-.1-.6h.8v.2s.1.1.1.2.1.1.2.1h.5s.1-.1.2-.1.1-.1.1-.2v-.5s-.1-.1-.1-.2-.1-.1-.2-.1h-.6v-.7zm5.7.7c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.8-.8v-.5c0-.1-.1-.2-.1-.3s-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z"/></g>
-<g id="replay-5"><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.3 8.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.4.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.7z"/></g>
-<g id="shuffle"><path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z"/></g>
-<g id="skip-next"><path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"/></g>
-<g id="skip-previous"><path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/></g>
-<g id="slow-motion-video"><path d="M13.05 9.79L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zM11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zm1.61 6.74C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43zM22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12z"/></g>
-<g id="snooze"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-3-9h3.63L9 15.2V17h6v-2h-3.63L15 10.8V9H9v2z"/></g>
-<g id="sort-by-alpha"><path d="M14.94 4.66h-4.72l2.36-2.36zm-4.69 14.71h4.66l-2.33 2.33zM6.1 6.27L1.6 17.73h1.84l.92-2.45h5.11l.92 2.45h1.84L7.74 6.27H6.1zm-1.13 7.37l1.94-5.18 1.94 5.18H4.97zm10.76 2.5h6.12v1.59h-8.53v-1.29l5.92-8.56h-5.88v-1.6h8.3v1.26l-5.93 8.6z"/></g>
-<g id="stop"><path d="M6 6h12v12H6z"/></g>
-<g id="subscriptions"><path d="M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z"/></g>
-<g id="subtitles"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/></g>
-<g id="surround-sound"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.76 16.24l-1.41 1.41C4.78 16.1 4 14.05 4 12c0-2.05.78-4.1 2.34-5.66l1.41 1.41C6.59 8.93 6 10.46 6 12s.59 3.07 1.76 4.24zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm5.66 1.66l-1.41-1.41C17.41 15.07 18 13.54 18 12s-.59-3.07-1.76-4.24l1.41-1.41C19.22 7.9 20 9.95 20 12c0 2.05-.78 4.1-2.34 5.66zM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="video-library"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"/></g>
-<g id="videocam"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></g>
-<g id="videocam-off"><path d="M21 6.5l-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18V6.5zM3.27 2L2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73 3.27 2z"/></g>
-<g id="volume-down"><path d="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"/></g>
-<g id="volume-mute"><path d="M7 9v6h4l5 5V4l-5 5H7z"/></g>
-<g id="volume-off"><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/></g>
-<g id="volume-up"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></g>
-<g id="web"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/></g>
-<g id="web-asset"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H5V8h14v10z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/bower.json
deleted file mode 100644
index c5066e9fbcd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/bower.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "iron-icons",
- "version": "1.1.3",
- "description": "A set of icons for use with iron-icon",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "icon"
- ],
- "main": "iron-icons.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-icons"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-icons",
- "dependencies": {
- "iron-icon": "polymerelements/iron-icon#^1.0.0",
- "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "polymerelements/iron-component-page#1.0.0",
- "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
- "iron-meta": "polymerelements/iron-meta#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0"
- },
- "ignore": [
- "util",
- "update-icons.sh"
- ]
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/communication-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/communication-icons.html
deleted file mode 100644
index b522e6db68f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/communication-icons.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="communication" size="24">
-<svg><defs>
-<g id="business"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/></g>
-<g id="call"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></g>
-<g id="call-end"><path d="M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7 0-.28.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71 0 .28-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9z"/></g>
-<g id="call-made"><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/></g>
-<g id="call-merge"><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/></g>
-<g id="call-missed"><path d="M19.59 7L12 14.59 6.41 9H11V7H3v8h2v-4.59l7 7 9-9z"/></g>
-<g id="call-missed-outgoing"><path d="M3 8.41l9 9 7-7V15h2V7h-8v2h4.59L12 14.59 4.41 7 3 8.41z"/></g>
-<g id="call-received"><path d="M20 5.41L18.59 4 7 15.59V9H5v10h10v-2H8.41z"/></g>
-<g id="call-split"><path d="M14 4l2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3z"/></g>
-<g id="chat"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/></g>
-<g id="chat-bubble"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/></g>
-<g id="chat-bubble-outline"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></g>
-<g id="clear-all"><path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"/></g>
-<g id="comment"><path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/></g>
-<g id="contact-mail"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></g>
-<g id="contact-phone"><path d="M22 3H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm3.85-4h1.64L21 16l-1.99 1.99c-1.31-.98-2.28-2.38-2.73-3.99-.18-.64-.28-1.31-.28-2s.1-1.36.28-2c.45-1.62 1.42-3.01 2.73-3.99L21 8l-1.51 2h-1.64c-.22.63-.35 1.3-.35 2s.13 1.37.35 2z"/></g>
-<g id="contacts"><path d="M20 0H4v2h16V0zM4 24h16v-2H4v2zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 2.75c1.24 0 2.25 1.01 2.25 2.25s-1.01 2.25-2.25 2.25S9.75 10.24 9.75 9 10.76 6.75 12 6.75zM17 17H7v-1.5c0-1.67 3.33-2.5 5-2.5s5 .83 5 2.5V17z"/></g>
-<g id="dialer-sip"><path d="M17 3h-1v5h1V3zm-2 2h-2V4h2V3h-3v3h2v1h-2v1h3V5zm3-2v5h1V6h2V3h-3zm2 2h-1V4h1v1zm0 10.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.01.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.27-.26.35-.65.24-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"/></g>
-<g id="dialpad"><path d="M12 19c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="email"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
-<g id="forum"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/></g>
-<g id="import-contacts"><path d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1zm0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5v11.5z"/></g>
-<g id="import-export"><path d="M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"/></g>
-<g id="invert-colors-off"><path d="M20.65 20.87l-2.35-2.35-6.3-6.29-3.56-3.57-1.42-1.41L4.27 4.5 3 5.77l2.78 2.78c-2.55 3.14-2.36 7.76.56 10.69C7.9 20.8 9.95 21.58 12 21.58c1.79 0 3.57-.59 5.03-1.78l2.7 2.7L21 21.23l-.35-.36zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59c0-1.32.43-2.57 1.21-3.6L12 14.77v4.82zM12 5.1v4.58l7.25 7.26c1.37-2.96.84-6.57-1.6-9.01L12 2.27l-3.7 3.7 1.41 1.41L12 5.1z"/></g>
-<g id="live-help"><path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 16h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 11.9 13 12.5 13 14h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/></g>
-<g id="location-off"><path d="M12 6.5c1.38 0 2.5 1.12 2.5 2.5 0 .74-.33 1.39-.83 1.85l3.63 3.63c.98-1.86 1.7-3.8 1.7-5.48 0-3.87-3.13-7-7-7-1.98 0-3.76.83-5.04 2.15l3.19 3.19c.46-.52 1.11-.84 1.85-.84zm4.37 9.6l-4.63-4.63-.11-.11L3.27 3 2 4.27l3.18 3.18C5.07 7.95 5 8.47 5 9c0 5.25 7 13 7 13s1.67-1.85 3.38-4.35L18.73 21 20 19.73l-3.63-3.63z"/></g>
-<g id="location-on"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
-<g id="mail-outline"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"/></g>
-<g id="message"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/></g>
-<g id="no-sim"><path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 1.27-1.27L3.65 3.88z"/></g>
-<g id="phone"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></g>
-<g id="phonelink-erase"><path d="M13 8.2l-1-1-4 4-4-4-1 1 4 4-4 4 1 1 4-4 4 4 1-1-4-4 4-4zM19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2z"/></g>
-<g id="phonelink-lock"><path d="M19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm-8.2 10V9.5C10.8 8.1 9.4 7 8 7S5.2 8.1 5.2 9.5V11c-.6 0-1.2.6-1.2 1.2v3.5c0 .7.6 1.3 1.2 1.3h5.5c.7 0 1.3-.6 1.3-1.2v-3.5c0-.7-.6-1.3-1.2-1.3zm-1.3 0h-3V9.5c0-.8.7-1.3 1.5-1.3s1.5.5 1.5 1.3V11z"/></g>
-<g id="phonelink-ring"><path d="M20.1 7.7l-1 1c1.8 1.8 1.8 4.6 0 6.5l1 1c2.5-2.3 2.5-6.1 0-8.5zM18 9.8l-1 1c.5.7.5 1.6 0 2.3l1 1c1.2-1.2 1.2-3 0-4.3zM14 1H4c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 19H4V4h10v16z"/></g>
-<g id="phonelink-setup"><path d="M11.8 12.5v-1l1.1-.8c.1-.1.1-.2.1-.3l-1-1.7c-.1-.1-.2-.2-.3-.1l-1.3.4c-.3-.2-.6-.4-.9-.5l-.2-1.3c0-.1-.1-.2-.3-.2H7c-.1 0-.2.1-.3.2l-.2 1.3c-.3.1-.6.3-.9.5l-1.3-.5c-.1 0-.2 0-.3.1l-1 1.7c-.1.1 0 .2.1.3l1.1.8v1l-1.1.8c-.1.2-.1.3-.1.4l1 1.7c.1.1.2.2.3.1l1.4-.4c.3.2.6.4.9.5l.2 1.3c-.1.1.1.2.2.2h2c.1 0 .2-.1.3-.2l.2-1.3c.3-.1.6-.3.9-.5l1.3.5c.1 0 .2 0 .3-.1l1-1.7c.1-.1 0-.2-.1-.3l-1.1-.9zM8 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2z"/></g>
-<g id="portable-wifi-off"><path d="M17.56 14.24c.28-.69.44-1.45.44-2.24 0-3.31-2.69-6-6-6-.79 0-1.55.16-2.24.44l1.62 1.62c.2-.03.41-.06.62-.06 2.21 0 4 1.79 4 4 0 .21-.02.42-.05.63l1.61 1.61zM12 4c4.42 0 8 3.58 8 8 0 1.35-.35 2.62-.95 3.74l1.47 1.47C21.46 15.69 22 13.91 22 12c0-5.52-4.48-10-10-10-1.91 0-3.69.55-5.21 1.47l1.46 1.46C9.37 4.34 10.65 4 12 4zM3.27 2.5L2 3.77l2.1 2.1C2.79 7.57 2 9.69 2 12c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 17.53 4 14.96 4 12c0-1.76.57-3.38 1.53-4.69l1.43 1.44C6.36 9.68 6 10.8 6 12c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-.65.17-1.25.44-1.79l1.58 1.58L10 12c0 1.1.9 2 2 2l.21-.02.01.01 7.51 7.51L21 20.23 4.27 3.5l-1-1z"/></g>
-<g id="present-to-all"><path d="M21 3H3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h18c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 16.02H3V4.98h18v14.04zM10 12H8l4-4 4 4h-2v4h-4v-4z"/></g>
-<g id="ring-volume"><path d="M23.71 16.67C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71 0 .28.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73s3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.66 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71 0-.27-.11-.52-.29-.7zM21.16 6.26l-1.41-1.41-3.56 3.55 1.41 1.41s3.45-3.52 3.56-3.55zM13 2h-2v5h2V2zM6.4 9.81L7.81 8.4 4.26 4.84 2.84 6.26c.11.03 3.56 3.55 3.56 3.55z"/></g>
-<g id="screen-share"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.11-.9-2-2-2H4c-1.11 0-2 .89-2 2v10c0 1.1.89 2 2 2H0v2h24v-2h-4zm-7-3.53v-2.19c-2.78 0-4.61.85-6 2.72.56-2.67 2.11-5.33 6-5.87V7l4 3.73-4 3.74z"/></g>
-<g id="speaker-phone"><path d="M7 7.07L8.43 8.5c.91-.91 2.18-1.48 3.57-1.48s2.66.57 3.57 1.48L17 7.07C15.72 5.79 13.95 5 12 5s-3.72.79-5 2.07zM12 1C8.98 1 6.24 2.23 4.25 4.21l1.41 1.41C7.28 4 9.53 3 12 3s4.72 1 6.34 2.62l1.41-1.41C17.76 2.23 15.02 1 12 1zm2.86 9.01L9.14 10C8.51 10 8 10.51 8 11.14v9.71c0 .63.51 1.14 1.14 1.14h5.71c.63 0 1.14-.51 1.14-1.14v-9.71c.01-.63-.5-1.13-1.13-1.13zM15 20H9v-8h6v8z"/></g>
-<g id="stay-current-landscape"><path d="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z"/></g>
-<g id="stay-current-portrait"><path d="M17 1.01L7 1c-1.1 0-1.99.9-1.99 2v18c0 1.1.89 2 1.99 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
-<g id="stay-primary-landscape"><path d="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z"/></g>
-<g id="stay-primary-portrait"><path d="M17 1.01L7 1c-1.1 0-1.99.9-1.99 2v18c0 1.1.89 2 1.99 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
-<g id="stop-screen-share"><path d="M21.22 18.02l2 2H24v-2h-2.78zm.77-2l.01-10c0-1.11-.9-2-2-2H7.22l5.23 5.23c.18-.04.36-.07.55-.1V7.02l4 3.73-1.58 1.47 5.54 5.54c.61-.33 1.03-.99 1.03-1.74zM2.39 1.73L1.11 3l1.54 1.54c-.4.36-.65.89-.65 1.48v10c0 1.1.89 2 2 2H0v2h18.13l2.71 2.71 1.27-1.27L2.39 1.73zM7 15.02c.31-1.48.92-2.95 2.07-4.06l1.59 1.59c-1.54.38-2.7 1.18-3.66 2.47z"/></g>
-<g id="swap-calls"><path d="M18 4l-4 4h3v7c0 1.1-.9 2-2 2s-2-.9-2-2V8c0-2.21-1.79-4-4-4S5 5.79 5 8v7H2l4 4 4-4H7V8c0-1.1.9-2 2-2s2 .9 2 2v7c0 2.21 1.79 4 4 4s4-1.79 4-4V8h3l-4-4z"/></g>
-<g id="textsms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></g>
-<g id="voicemail"><path d="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3.04 0 5.5-2.46 5.5-5.5S21.54 6 18.5 6zm-13 9C3.57 15 2 13.43 2 11.5S3.57 8 5.5 8 9 9.57 9 11.5 7.43 15 5.5 15zm13 0c-1.93 0-3.5-1.57-3.5-3.5S16.57 8 18.5 8 22 9.57 22 11.5 20.43 15 18.5 15z"/></g>
-<g id="vpn-key"><path d="M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/demo/index.html
deleted file mode 100644
index acfbf36cc7d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/demo/index.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-icons demo</title>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
-
- <!-- load default iconset -->
- <link rel="import" href="../iron-icons.html">
-
- <!-- load the rest -->
- <link rel="import" href="../av-icons.html">
- <link rel="import" href="../communication-icons.html">
- <link rel="import" href="../device-icons.html">
- <link rel="import" href="../editor-icons.html">
- <link rel="import" href="../hardware-icons.html">
- <link rel="import" href="../image-icons.html">
- <link rel="import" href="../maps-icons.html">
- <link rel="import" href="../notification-icons.html">
- <link rel="import" href="../social-icons.html">
- <link rel="import" href="../places-icons.html">
-
- <style is="custom-style">
-
- h2 {
- text-transform: capitalize;
- }
-
- iron-icon {
- transition: all 0.2s;
- -webkit-transition: all 0.2s;
- }
-
- iron-icon:hover {
- fill: var(--google-yellow-700);
- }
-
- .set {
- margin: auto;
- padding: 1em 0;
- border-bottom: 1px solid silver;
- @apply(--layout-horizontal);
- @apply(--layout-wrap);
- }
-
- .set:last-of-type {
- border-bottom: none;
- }
-
- .set:nth-of-type(4n-3) {
- color: var(--paper-grey-700);
- }
-
- .set:nth-of-type(4n-2) {
- color: var(--paper-pink-500);
- }
-
- .set:nth-of-type(4n-1) {
- color: var(--google-green-500);
- }
-
- .set:nth-of-type(4n) {
- color: var( --google-blue-500);
- }
-
- .container {
- min-width: 10em;
- padding: 1em 0.5em;
- text-align: center;
- @apply(--layout-vertical);
- @apply(--layout-center);
- @apply(--layout-flex-1);
- }
-
- .container > div {
- margin-top: 0.5em;
- color: black;
- font-size: 10px;
- }
-
- </style>
-
-</head>
-<body>
-
- <template is="dom-bind">
-
- <iron-meta type="iconset" list="{{iconsets}}"></iron-meta>
-
- <template is="dom-repeat" items="{{iconsets}}">
-
- <h2>{{item.name}}</h2>
-
- <div class="set">
-
- <template is="dom-repeat" items="{{getIconNames(item)}}">
-
- <span class="container">
- <iron-icon icon="{{item}}"></iron-icon>
- <div>{{item}}</div>
- </span>
-
- </template>
-
- </div>
-
- </template>
-
- </template>
-
- <script>
-
- document.querySelector('[is=dom-bind]').getIconNames = function(iconset) {
- return iconset.getIconNames();
- };
-
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/device-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/device-icons.html
deleted file mode 100644
index 03809ee5171..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/device-icons.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="device" size="24">
-<svg><defs>
-<g id="access-alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="access-alarms"><path d="M22 5.7l-4.6-3.9-1.3 1.5 4.6 3.9L22 5.7zM7.9 3.4L6.6 1.9 2 5.7l1.3 1.5 4.6-3.8zM12.5 8H11v6l4.7 2.9.8-1.2-4-2.4V8zM12 4c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z"/></g>
-<g id="access-time"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></g>
-<g id="add-alarm"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g>
-<g id="airplanemode-active"><path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>
-<g id="airplanemode-inactive"><path d="M13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.68l7.83 7.83L21 16v-2l-8-5zM3 5.27l4.99 4.99L2 14v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-3.73L18.73 21 20 19.73 4.27 4 3 5.27z"/></g>
-<g id="battery-20"><path d="M7 17v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17H7z"/><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V17h10V5.33z"/></g>
-<g id="battery-30"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V15h10V5.33z"/><path d="M7 15v5.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V15H7z"/></g>
-<g id="battery-50"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V13h10V5.33z"/><path d="M7 13v7.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13H7z"/></g>
-<g id="battery-60"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h10V5.33z"/><path d="M7 11v9.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V11H7z"/></g>
-<g id="battery-80"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h10V5.33z"/><path d="M7 9v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V9H7z"/></g>
-<g id="battery-90"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V8H7z"/></g>
-<g id="battery-alert"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0-4h-2V9h2v5z"/></g>
-<g id="battery-charging-20"><path d="M11 20v-3H7v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17h-4.4L11 20z"/><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V17h4v-2.5H9L13 7v5.5h2L12.6 17H17V5.33C17 4.6 16.4 4 15.67 4z"/></g>
-<g id="battery-charging-30"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v9.17h2L13 7v5.5h2l-1.07 2H17V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M11 20v-5.5H7v6.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V14.5h-3.07L11 20z"/></g>
-<g id="battery-charging-50"><path d="M14.47 13.5L11 20v-5.5H9l.53-1H7v7.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13.5h-2.53z"/><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v8.17h2.53L13 7v5.5h2l-.53 1H17V5.33C17 4.6 16.4 4 15.67 4z"/></g>
-<g id="battery-charging-60"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h3.87L13 7v4h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9l1.87-3.5H7v9.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V11h-4v1.5z"/></g>
-<g id="battery-charging-80"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h4.93L13 7v2h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9L11.93 9H7v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V9h-4v3.5z"/></g>
-<g id="battery-charging-90"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h5.47L13 7v1h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9L12.47 8H7v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V8h-4v4.5z"/></g>
-<g id="battery-charging-full"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H9L13 7v5.5h2L11 20z"/></g>
-<g id="battery-full"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/></g>
-<g id="battery-std"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/></g>
-<g id="battery-unknown"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zm-2.72 13.95h-1.9v-1.9h1.9v1.9zm1.35-5.26s-.38.42-.67.71c-.48.48-.83 1.15-.83 1.6h-1.6c0-.83.46-1.52.93-2l.93-.94c.27-.27.44-.65.44-1.06 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5H9c0-1.66 1.34-3 3-3s3 1.34 3 3c0 .66-.27 1.26-.7 1.69z"/></g>
-<g id="bluetooth"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></g>
-<g id="bluetooth-connected"><path d="M7 12l-2-2-2 2 2 2 2-2zm10.71-4.29L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88zM19 10l-2 2 2 2 2-2-2-2z"/></g>
-<g id="bluetooth-disabled"><path d="M13 5.83l1.88 1.88-1.6 1.6 1.41 1.41 3.02-3.02L12 2h-1v5.03l2 2v-3.2zM5.41 4L4 5.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l4.29-4.29 2.3 2.29L20 18.59 5.41 4zM13 18.17v-3.76l1.88 1.88L13 18.17z"/></g>
-<g id="bluetooth-searching"><path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-1.48-5.19zm-3.82 1L10 2H9v7.59L4.41 5 3 6.41 8.59 12 3 17.59 4.41 19 9 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM11 5.83l1.88 1.88L11 9.59V5.83zm1.88 10.46L11 18.17v-3.76l1.88 1.88z"/></g>
-<g id="brightness-auto"><path d="M10.85 12.65h2.3L12 9l-1.15 3.65zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9h-1.9z"/></g>
-<g id="brightness-high"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></g>
-<g id="brightness-low"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/></g>
-<g id="brightness-medium"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/></g>
-<g id="data-usage"><path d="M13 2.05v3.03c3.39.49 6 3.39 6 6.92 0 .9-.18 1.75-.48 2.54l2.6 1.53c.56-1.24.88-2.62.88-4.07 0-5.18-3.95-9.45-9-9.95zM12 19c-3.87 0-7-3.13-7-7 0-3.53 2.61-6.43 6-6.92V2.05c-5.06.5-9 4.76-9 9.95 0 5.52 4.47 10 9.99 10 3.31 0 6.24-1.61 8.06-4.09l-2.6-1.53C16.17 17.98 14.21 19 12 19z"/></g>
-<g id="developer-mode"><path d="M7 5h10v2h2V3c0-1.1-.9-1.99-2-1.99L7 1c-1.1 0-2 .9-2 2v4h2V5zm8.41 11.59L20 12l-4.59-4.59L14 8.83 17.17 12 14 15.17l1.41 1.42zM10 15.17L6.83 12 10 8.83 8.59 7.41 4 12l4.59 4.59L10 15.17zM17 19H7v-2H5v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2v2z"/></g>
-<g id="devices"><path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/></g>
-<g id="dvr"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zm-2-9H8v2h11V8zm0 4H8v2h11v-2zM7 8H5v2h2V8zm0 4H5v2h2v-2z"/></g>
-<g id="gps-fixed"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="gps-not-fixed"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="gps-off"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5 1.5c.5-.96.84-2.02.97-3.15H23v-2h-2.06zM3 4.27l2.04 2.04C3.97 7.62 3.25 9.23 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c1.77-.2 3.38-.91 4.69-1.98L19.73 21 21 19.73 4.27 3 3 4.27zm13.27 13.27C15.09 18.45 13.61 19 12 19c-3.87 0-7-3.13-7-7 0-1.61.55-3.09 1.46-4.27l9.81 9.81z"/></g>
-<g id="graphic-eq"><path d="M7 18h2V6H7v12zm4 4h2V2h-2v20zm-8-8h2v-4H3v4zm12 4h2V6h-2v12zm4-8v4h2v-4h-2z"/></g>
-<g id="location-disabled"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5 1.5c.5-.96.84-2.02.97-3.15H23v-2h-2.06zM3 4.27l2.04 2.04C3.97 7.62 3.25 9.23 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c1.77-.2 3.38-.91 4.69-1.98L19.73 21 21 19.73 4.27 3 3 4.27zm13.27 13.27C15.09 18.45 13.61 19 12 19c-3.87 0-7-3.13-7-7 0-1.61.55-3.09 1.46-4.27l9.81 9.81z"/></g>
-<g id="location-searching"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="network-cell"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/></g>
-<g id="network-wifi"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.01.01.01-.01 8.46-10.54C20.04 10.62 16.81 8 12 8c-4.81 0-8.04 2.62-8.47 2.95z"/></g>
-<g id="nfc"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V8h3v8H8V8h2V6H6v12h12V6z"/></g>
-<g id="screen-lock-landscape"><path d="M21 5H3c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-2 12H5V7h14v10zm-9-1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2v1h-2.4v-1z"/></g>
-<g id="screen-lock-portrait"><path d="M10 16h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2v1h-2.4v-1zM17 1H7c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 18H7V5h10v14z"/></g>
-<g id="screen-lock-rotation"><path d="M23.25 12.77l-2.57-2.57-1.41 1.41 2.22 2.22-5.66 5.66L4.51 8.17l5.66-5.66 2.1 2.1 1.41-1.41L11.23.75c-.59-.59-1.54-.59-2.12 0L2.75 7.11c-.59.59-.59 1.54 0 2.12l12.02 12.02c.59.59 1.54.59 2.12 0l6.36-6.36c.59-.59.59-1.54 0-2.12zM8.47 20.48C5.2 18.94 2.86 15.76 2.5 12H1c.51 6.16 5.66 11 11.95 11l.66-.03-3.81-3.82-1.33 1.33zM16 9h5c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1v-.5C21 1.12 19.88 0 18.5 0S16 1.12 16 2.5V3c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1zm.8-6.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V3h-3.4v-.5z"/></g>
-<g id="screen-rotation"><path d="M16.48 2.52c3.27 1.55 5.61 4.72 5.97 8.48h1.5C23.44 4.84 18.29 0 12 0l-.66.03 3.81 3.81 1.33-1.32zm-6.25-.77c-.59-.59-1.54-.59-2.12 0L1.75 8.11c-.59.59-.59 1.54 0 2.12l12.02 12.02c.59.59 1.54.59 2.12 0l6.36-6.36c.59-.59.59-1.54 0-2.12L10.23 1.75zm4.6 19.44L2.81 9.17l6.36-6.36 12.02 12.02-6.36 6.36zm-7.31.29C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32z"/></g>
-<g id="sd-storage"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/></g>
-<g id="settings-system-daydream"><path d="M9 16h6.5c1.38 0 2.5-1.12 2.5-2.5S16.88 11 15.5 11h-.05c-.24-1.69-1.69-3-3.45-3-1.4 0-2.6.83-3.16 2.02h-.16C7.17 10.18 6 11.45 6 13c0 1.66 1.34 3 3 3zM21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"/></g>
-<g id="signal-cellular-0-bar"><path fill-opacity=".3" d="M2 22h20V2z"/></g>
-<g id="signal-cellular-1-bar"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M12 12L2 22h10z"/></g>
-<g id="signal-cellular-2-bar"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M14 10L2 22h12z"/></g>
-<g id="signal-cellular-3-bar"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/></g>
-<g id="signal-cellular-4-bar"><path d="M2 22h20V2z"/></g>
-<g id="signal-cellular-connected-no-internet-0-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M20 22h2v-2h-2v2zm0-12v8h2v-8h-2z"/></g>
-<g id="signal-cellular-connected-no-internet-1-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M20 10v8h2v-8h-2zm-8 12V12L2 22h10zm8 0h2v-2h-2v2z"/></g>
-<g id="signal-cellular-connected-no-internet-2-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M14 22V10L2 22h12zm6-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/></g>
-<g id="signal-cellular-connected-no-internet-3-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M17 22V7L2 22h15zm3-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/></g>
-<g id="signal-cellular-connected-no-internet-4-bar"><path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/></g>
-<g id="signal-cellular-no-sim"><path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 1.27-1.27L3.65 3.88z"/></g>
-<g id="signal-cellular-null"><path d="M20 6.83V20H6.83L20 6.83M22 2L2 22h20V2z"/></g>
-<g id="signal-cellular-off"><path d="M21 1l-8.59 8.59L21 18.18V1zM4.77 4.5L3.5 5.77l6.36 6.36L1 21h17.73l2 2L22 21.73 4.77 4.5z"/></g>
-<g id="signal-wifi-0-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/></g>
-<g id="signal-wifi-1-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M6.67 14.86L12 21.49v.01l.01-.01 5.33-6.63C17.06 14.65 15.03 13 12 13s-5.06 1.65-5.33 1.86z"/></g>
-<g id="signal-wifi-1-bar-lock"><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16z"/><path d="M15.5 14.5c0-2.8 2.2-5 5-5 .4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4C5.3 3 .8 6.7.4 7L12 21.5l3.5-4.3v-2.7z" opacity=".3"/><path d="M6.7 14.9l5.3 6.6 3.5-4.3v-2.6c0-.2 0-.5.1-.7-.9-.5-2.2-.9-3.6-.9-3 0-5.1 1.7-5.3 1.9z"/></g>
-<g id="signal-wifi-2-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M4.79 12.52l7.2 8.98H12l.01-.01 7.2-8.98C18.85 12.24 16.1 10 12 10s-6.85 2.24-7.21 2.52z"/></g>
-<g id="signal-wifi-2-bar-lock"><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16z"/><path d="M15.5 14.5c0-2.8 2.2-5 5-5 .4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4C5.3 3 .8 6.7.4 7L12 21.5l3.5-4.3v-2.7z" opacity=".3"/><path d="M4.8 12.5l7.2 9 3.5-4.4v-2.6c0-1.3.5-2.5 1.4-3.4C15.6 10.5 14 10 12 10c-4.1 0-6.8 2.2-7.2 2.5z"/></g>
-<g id="signal-wifi-3-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.01.01.01-.01 8.46-10.54C20.04 10.62 16.81 8 12 8c-4.81 0-8.04 2.62-8.47 2.95z"/></g>
-<g id="signal-wifi-3-bar-lock"><path opacity=".3" d="M12 3C5.3 3 .8 6.7.4 7l3.2 3.9L12 21.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7.3-.1.5-.2.8-.2.3-.1.6-.1.9-.1.4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4z"/><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16zm-10 5.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7C17.3 9 14.9 8 12 8c-4.8 0-8 2.6-8.5 2.9"/></g>
-<g id="signal-wifi-4-bar"><path d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/></g>
-<g id="signal-wifi-4-bar-lock"><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16zm-6.5-1.5c0-2.8 2.2-5 5-5 .4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4C5.3 3 .8 6.7.4 7L12 21.5l3.5-4.4v-2.6z"/></g>
-<g id="signal-wifi-off"><path d="M23.64 7c-.45-.34-4.93-4-11.64-4-1.5 0-2.89.19-4.15.48L18.18 13.8 23.64 7zm-6.6 8.22L3.27 1.44 2 2.72l2.05 2.06C1.91 5.76.59 6.82.36 7l11.63 14.49.01.01.01-.01 3.9-4.86 3.32 3.32 1.27-1.27-3.46-3.46z"/></g>
-<g id="storage"><path d="M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"/></g>
-<g id="usb"><path d="M15 7v4h1v2h-3V5h2l-3-4-3 4h2v8H8v-2.07c.7-.37 1.2-1.08 1.2-1.93 0-1.21-.99-2.2-2.2-2.2-1.21 0-2.2.99-2.2 2.2 0 .85.5 1.56 1.2 1.93V13c0 1.11.89 2 2 2h3v3.05c-.71.37-1.2 1.1-1.2 1.95 0 1.22.99 2.2 2.2 2.2 1.21 0 2.2-.98 2.2-2.2 0-.85-.49-1.58-1.2-1.95V15h3c1.11 0 2-.89 2-2v-2h1V7h-4z"/></g>
-<g id="wallpaper"><path d="M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"/></g>
-<g id="widgets"><path d="M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"/></g>
-<g id="wifi-lock"><path d="M20.5 9.5c.28 0 .55.04.81.08L24 6c-3.34-2.51-7.5-4-12-4S3.34 3.49 0 6l12 16 3.5-4.67V14.5c0-2.76 2.24-5 5-5zM23 16v-1.5c0-1.38-1.12-2.5-2.5-2.5S18 13.12 18 14.5V16c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1zm-1 0h-3v-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V16z"/></g>
-<g id="wifi-tethering"><path d="M12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 2c0-3.31-2.69-6-6-6s-6 2.69-6 6c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.48-.81 2.75-2 3.45l1 1.74c1.79-1.04 3-2.97 3-5.19zM12 3C6.48 3 2 7.48 2 13c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 18.53 4 15.96 4 13c0-4.42 3.58-8 8-8s8 3.58 8 8c0 2.96-1.61 5.53-4 6.92l1 1.73c2.99-1.73 5-4.95 5-8.65 0-5.52-4.48-10-10-10z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/editor-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/editor-icons.html
deleted file mode 100644
index cb6ea04ae17..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/editor-icons.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="editor" size="24">
-<svg><defs>
-<g id="attach-file"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></g>
-<g id="attach-money"><path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"/></g>
-<g id="border-all"><path d="M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z"/></g>
-<g id="border-bottom"><path d="M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm0 4h2v-2h-2v2zM5 7H3v2h2V7zm14-4v2h2V3h-2zm0 6h2V7h-2v2zM5 11H3v2h2v-2zM3 21h18v-2H3v2zm2-6H3v2h2v-2z"/></g>
-<g id="border-clear"><path d="M7 5h2V3H7v2zm0 8h2v-2H7v2zm0 8h2v-2H7v2zm4-4h2v-2h-2v2zm0 4h2v-2h-2v2zm-8 0h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2V7H3v2zm0-4h2V3H3v2zm8 8h2v-2h-2v2zm8 4h2v-2h-2v2zm0-4h2v-2h-2v2zm0 8h2v-2h-2v2zm0-12h2V7h-2v2zm-8 0h2V7h-2v2zm8-6v2h2V3h-2zm-8 2h2V3h-2v2zm4 16h2v-2h-2v2zm0-8h2v-2h-2v2zm0-8h2V3h-2v2z"/></g>
-<g id="border-color"><path d="M17.75 7L14 3.25l-10 10V17h3.75l10-10zm2.96-2.96c.39-.39.39-1.02 0-1.41L18.37.29c-.39-.39-1.02-.39-1.41 0L15 2.25 18.75 6l1.96-1.96z"/><path fill-opacity=".36" d="M0 20h24v4H0z"/></g>
-<g id="border-horizontal"><path d="M3 21h2v-2H3v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zm4 4h2v-2H7v2zM5 3H3v2h2V3zm4 0H7v2h2V3zm8 0h-2v2h2V3zm-4 4h-2v2h2V7zm0-4h-2v2h2V3zm6 14h2v-2h-2v2zm-8 4h2v-2h-2v2zm-8-8h18v-2H3v2zM19 3v2h2V3h-2zm0 6h2V7h-2v2zm-8 8h2v-2h-2v2zm4 4h2v-2h-2v2zm4 0h2v-2h-2v2z"/></g>
-<g id="border-inner"><path d="M3 21h2v-2H3v2zm4 0h2v-2H7v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zM9 3H7v2h2V3zM5 3H3v2h2V3zm12 0h-2v2h2V3zm2 6h2V7h-2v2zm0-6v2h2V3h-2zm-4 18h2v-2h-2v2zM13 3h-2v8H3v2h8v8h2v-8h8v-2h-8V3zm6 18h2v-2h-2v2zm0-4h2v-2h-2v2z"/></g>
-<g id="border-left"><path d="M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2zm-4 12h2v-2h-2v2zm4-4h2v-2h-2v2zm0-14v2h2V3h-2zm0 10h2v-2h-2v2zm0 8h2v-2h-2v2zm-4-8h2v-2h-2v2zm0-8h2V3h-2v2z"/></g>
-<g id="border-outer"><path d="M13 7h-2v2h2V7zm0 4h-2v2h2v-2zm4 0h-2v2h2v-2zM3 3v18h18V3H3zm16 16H5V5h14v14zm-6-4h-2v2h2v-2zm-4-4H7v2h2v-2z"/></g>
-<g id="border-right"><path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h2v-2h-2v2zm4-10v18h2V3h-2zm-4 18h2v-2h-2v2zm0-16h2V3h-2v2zm-4 8h2v-2h-2v2zm0-8h2V3h-2v2zm0 4h2V7h-2v2z"/></g>
-<g id="border-style"><path d="M15 21h2v-2h-2v2zm4 0h2v-2h-2v2zM7 21h2v-2H7v2zm4 0h2v-2h-2v2zm8-4h2v-2h-2v2zm0-4h2v-2h-2v2zM3 3v18h2V5h16V3H3zm16 6h2V7h-2v2z"/></g>
-<g id="border-top"><path d="M7 21h2v-2H7v2zm0-8h2v-2H7v2zm4 0h2v-2h-2v2zm0 8h2v-2h-2v2zm-8-4h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2v-2H3v2zm0-4h2V7H3v2zm8 8h2v-2h-2v2zm8-8h2V7h-2v2zm0 4h2v-2h-2v2zM3 3v2h18V3H3zm16 14h2v-2h-2v2zm-4 4h2v-2h-2v2zM11 9h2V7h-2v2zm8 12h2v-2h-2v2zm-4-8h2v-2h-2v2z"/></g>
-<g id="border-vertical"><path d="M3 9h2V7H3v2zm0-4h2V3H3v2zm4 16h2v-2H7v2zm0-8h2v-2H7v2zm-4 0h2v-2H3v2zm0 8h2v-2H3v2zm0-4h2v-2H3v2zM7 5h2V3H7v2zm12 12h2v-2h-2v2zm-8 4h2V3h-2v18zm8 0h2v-2h-2v2zm0-8h2v-2h-2v2zm0-10v2h2V3h-2zm0 6h2V7h-2v2zm-4-4h2V3h-2v2zm0 16h2v-2h-2v2zm0-8h2v-2h-2v2z"/></g>
-<g id="drag-handle"><path d="M20 9H4v2h16V9zM4 15h16v-2H4v2z"/></g>
-<g id="format-align-center"><path d="M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"/></g>
-<g id="format-align-justify"><path d="M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zm0-6v2h18V3H3z"/></g>
-<g id="format-align-left"><path d="M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"/></g>
-<g id="format-align-right"><path d="M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"/></g>
-<g id="format-bold"><path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"/></g>
-<g id="format-clear"><path d="M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"/></g>
-<g id="format-color-fill"><path d="M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z"/><path fill-opacity=".36" d="M0 20h24v4H0z"/></g>
-<g id="format-color-reset"><path d="M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31zm-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27-2.74-2.74z"/></g>
-<g id="format-color-text"><path fill-opacity=".36" d="M0 20h24v4H0z"/><path d="M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"/></g>
-<g id="format-indent-decrease"><path d="M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/></g>
-<g id="format-indent-increase"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/></g>
-<g id="format-italic"><path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"/></g>
-<g id="format-line-spacing"><path d="M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm4-2v2h12V5H10zm0 14h12v-2H10v2zm0-6h12v-2H10v2z"/></g>
-<g id="format-list-bulleted"><path d="M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12.17c-.74 0-1.33.6-1.33 1.33s.6 1.33 1.33 1.33 1.33-.6 1.33-1.33-.59-1.33-1.33-1.33zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"/></g>
-<g id="format-list-numbered"><path d="M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"/></g>
-<g id="format-paint"><path d="M18 4V3c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6h1v4H9v11c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9h8V4h-3z"/></g>
-<g id="format-quote"><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></g>
-<g id="format-shapes"><path d="M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z"/></g>
-<g id="format-size"><path d="M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3V9H3v3z"/></g>
-<g id="format-strikethrough"><path d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/></g>
-<g id="format-textdirection-l-to-r"><path d="M9 10v5h2V4h2v11h2V4h2V2H9C6.79 2 5 3.79 5 6s1.79 4 4 4zm12 8l-4-4v3H5v2h12v3l4-4z"/></g>
-<g id="format-textdirection-r-to-l"><path d="M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z"/></g>
-<g id="format-underlined"><path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/></g>
-<g id="functions"><path d="M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"/></g>
-<g id="highlight"><path d="M6 14l3 3v5h6v-5l3-3V9H6zm5-12h2v3h-2zM3.5 5.875L4.914 4.46l2.12 2.122L5.62 7.997zm13.46.71l2.123-2.12 1.414 1.414L18.375 8z"/></g>
-<g id="insert-chart"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
-<g id="insert-comment"><path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/></g>
-<g id="insert-drive-file"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/></g>
-<g id="insert-emoticon"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
-<g id="insert-invitation"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/></g>
-<g id="insert-link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></g>
-<g id="insert-photo"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></g>
-<g id="linear-scale"><path d="M19.5 9.5c-1.03 0-1.9.62-2.29 1.5h-2.92c-.39-.88-1.26-1.5-2.29-1.5s-1.9.62-2.29 1.5H6.79c-.39-.88-1.26-1.5-2.29-1.5C3.12 9.5 2 10.62 2 12s1.12 2.5 2.5 2.5c1.03 0 1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5s1.9-.62 2.29-1.5h2.92c.39.88 1.26 1.5 2.29 1.5 1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5z"/></g>
-<g id="merge-type"><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/></g>
-<g id="mode-comment"><path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/></g>
-<g id="mode-edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></g>
-<g id="money-off"><path d="M12.5 6.9c1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-.53.12-1.03.3-1.48.54l1.47 1.47c.41-.17.91-.27 1.51-.27zM5.33 4.06L4.06 5.33 7.5 8.77c0 2.08 1.56 3.21 3.91 3.91l3.51 3.51c-.34.48-1.05.91-2.42.91-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c.96-.18 1.82-.55 2.45-1.12l2.22 2.22 1.27-1.27L5.33 4.06z"/></g>
-<g id="publish"><path d="M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z"/></g>
-<g id="short-text"><path d="M4 9h16v2H4zm0 4h10v2H4z"/></g>
-<g id="space-bar"><path d="M18 9v4H6V9H4v6h16V9z"/></g>
-<g id="strikethrough-s"><path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 2.21.34.66.22 1.23.54 1.69.94.47.4.83.88 1.08 1.43.25.55.38 1.15.38 1.81h-3.01c0-.31-.05-.59-.15-.85-.09-.27-.24-.49-.44-.68-.2-.19-.45-.33-.75-.44-.3-.1-.66-.16-1.06-.16-.39 0-.74.04-1.03.13-.29.09-.53.21-.72.36-.19.16-.34.34-.44.55-.1.21-.15.43-.15.66 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.05-.08-.11-.17-.15-.25zM21 12v-2H3v2h9.62c.18.07.4.14.55.2.37.17.66.34.87.51.21.17.35.36.43.57.07.2.11.43.11.69 0 .23-.05.45-.14.66-.09.2-.23.38-.42.53-.19.15-.42.26-.71.35-.29.08-.63.13-1.01.13-.43 0-.83-.04-1.18-.13s-.66-.23-.91-.42c-.25-.19-.45-.44-.59-.75-.14-.31-.25-.76-.25-1.21H6.4c0 .55.08 1.13.24 1.58.16.45.37.85.65 1.21.28.35.6.66.98.92.37.26.78.48 1.22.65.44.17.9.3 1.38.39.48.08.96.13 1.44.13.8 0 1.53-.09 2.18-.28s1.21-.45 1.67-.79c.46-.34.82-.77 1.07-1.27s.38-1.07.38-1.71c0-.6-.1-1.14-.31-1.61-.05-.11-.11-.23-.17-.33H21z"/></g>
-<g id="text-fields"><path d="M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"/></g>
-<g id="vertical-align-bottom"><path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/></g>
-<g id="vertical-align-center"><path d="M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"/></g>
-<g id="vertical-align-top"><path d="M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"/></g>
-<g id="wrap-text"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/hardware-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/hardware-icons.html
deleted file mode 100644
index ddaddbdae6c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/hardware-icons.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="hardware" size="24">
-<svg><defs>
-<g id="cast"><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z"/></g>
-<g id="cast-connected"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
-<g id="computer"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/></g>
-<g id="desktop-mac"><path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z"/></g>
-<g id="desktop-windows"><path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"/></g>
-<g id="developer-board"><path d="M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zm-4 10H4V5h14v14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z"/></g>
-<g id="device-hub"><path d="M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"/></g>
-<g id="devices-other"><path d="M3 6h18V4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V6zm10 6H9v1.78c-.61.55-1 1.33-1 2.22s.39 1.67 1 2.22V20h4v-1.78c.61-.55 1-1.34 1-2.22s-.39-1.67-1-2.22V12zm-2 5.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM22 8h-6c-.5 0-1 .5-1 1v10c0 .5.5 1 1 1h6c.5 0 1-.5 1-1V9c0-.5-.5-1-1-1zm-1 10h-4v-8h4v8z"/></g>
-<g id="dock"><path d="M8 23h8v-2H8v2zm8-21.99L8 1c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM16 15H8V5h8v10z"/></g>
-<g id="gamepad"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/></g>
-<g id="headset"><path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z"/></g>
-<g id="headset-mic"><path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h4v1h-7v2h6c1.66 0 3-1.34 3-3V10c0-4.97-4.03-9-9-9z"/></g>
-<g id="keyboard"><path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"/></g>
-<g id="keyboard-arrow-down"><path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"/></g>
-<g id="keyboard-arrow-left"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/></g>
-<g id="keyboard-arrow-right"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/></g>
-<g id="keyboard-arrow-up"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></g>
-<g id="keyboard-backspace"><path d="M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"/></g>
-<g id="keyboard-capslock"><path d="M12 8.41L16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z"/></g>
-<g id="keyboard-hide"><path d="M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15l4-4H8l4 4z"/></g>
-<g id="keyboard-return"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/></g>
-<g id="keyboard-tab"><path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"/></g>
-<g id="keyboard-voice"><path d="M12 15c1.66 0 2.99-1.34 2.99-3L15 6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 15 6.7 12H5c0 3.42 2.72 6.23 6 6.72V22h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
-<g id="laptop"><path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/></g>
-<g id="laptop-chromebook"><path d="M22 18V3H2v15H0v2h24v-2h-2zm-8 0h-4v-1h4v1zm6-3H4V5h16v10z"/></g>
-<g id="laptop-mac"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
-<g id="laptop-windows"><path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z"/></g>
-<g id="memory"><path d="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z"/></g>
-<g id="mouse"><path d="M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z"/></g>
-<g id="phone-android"><path d="M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z"/></g>
-<g id="phone-iphone"><path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"/></g>
-<g id="phonelink"><path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/></g>
-<g id="phonelink-off"><path d="M22 6V4H6.82l2 2H22zM1.92 1.65L.65 2.92l1.82 1.82C2.18 5.08 2 5.52 2 6v11H0v3h17.73l2.35 2.35 1.27-1.27L3.89 3.62 1.92 1.65zM4 6.27L14.73 17H4V6.27zM23 8h-6c-.55 0-1 .45-1 1v4.18l2 2V10h4v7h-2.18l3 3H23c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1z"/></g>
-<g id="power-input"><path d="M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"/></g>
-<g id="router"><path d="M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z"/></g>
-<g id="scanner"><path d="M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z"/></g>
-<g id="security"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></g>
-<g id="sim-card"><path d="M19.99 4c0-1.1-.89-2-1.99-2h-8L4 8v12c0 1.1.9 2 2 2h12.01c1.1 0 1.99-.9 1.99-2l-.01-16zM9 19H7v-2h2v2zm8 0h-2v-2h2v2zm-8-4H7v-4h2v4zm4 4h-2v-4h2v4zm0-6h-2v-2h2v2zm4 2h-2v-4h2v4z"/></g>
-<g id="smartphone"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
-<g id="speaker"><path d="M17 2H7c-1.1 0-2 .9-2 2v16c0 1.1.9 1.99 2 1.99L17 22c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 2c1.1 0 2 .9 2 2s-.9 2-2 2c-1.11 0-2-.9-2-2s.89-2 2-2zm0 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
-<g id="speaker-group"><path d="M18.2 1H9.8C8.81 1 8 1.81 8 2.8v14.4c0 .99.81 1.79 1.8 1.79l8.4.01c.99 0 1.8-.81 1.8-1.8V2.8c0-.99-.81-1.8-1.8-1.8zM14 3c1.1 0 2 .89 2 2s-.9 2-2 2-2-.89-2-2 .9-2 2-2zm0 13.5c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/><circle cx="14" cy="12.5" r="2.5"/><path d="M6 5H4v16c0 1.1.89 2 2 2h10v-2H6V5z"/></g>
-<g id="tablet"><path d="M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z"/></g>
-<g id="tablet-android"><path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z"/></g>
-<g id="tablet-mac"><path d="M18.5 0h-14C3.12 0 2 1.12 2 2.5v19C2 22.88 3.12 24 4.5 24h14c1.38 0 2.5-1.12 2.5-2.5v-19C21 1.12 19.88 0 18.5 0zm-7 23c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7.5-4H4V3h15v16z"/></g>
-<g id="toys"><path d="M12 12c0-3 2.5-5.5 5.5-5.5S23 9 23 12H12zm0 0c0 3-2.5 5.5-5.5 5.5S1 15 1 12h11zm0 0c-3 0-5.5-2.5-5.5-5.5S9 1 12 1v11zm0 0c3 0 5.5 2.5 5.5 5.5S15 23 12 23V12z"/></g>
-<g id="tv"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"/></g>
-<g id="videogame-asset"><path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2zm4.5 2c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4-3c-.83 0-1.5-.67-1.5-1.5S18.67 9 19.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="watch"><path d="M20 12c0-2.54-1.19-4.81-3.04-6.27L16 0H8l-.95 5.73C5.19 7.19 4 9.45 4 12s1.19 4.81 3.05 6.27L8 24h8l.96-5.73C18.81 16.81 20 14.54 20 12zM6 12c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/hero.svg
deleted file mode 100755
index 167321c9422..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/hero.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <circle cx="73" cy="24" r="4"/>
- <path d="M82,33H64V15h18V33z M66,31h14V17H66V31z"/>
- <circle cx="112.5" cy="24" r="4"/>
- <circle cx="151" cy="24" r="4"/>
- <path d="M121,33h-18V15h18V33z M105,31h14V17h-14V31z"/>
- <path d="M160,33h-18V15h18V33z M144,31h14V17h-14V31z"/>
- <circle cx="73" cy="62" r="4"/>
- <path d="M82,71H64V53h18V71z M66,69h14V55H66V69z"/>
- <circle cx="112.5" cy="62" r="4"/>
- <path d="M121,71h-18V53h18V71z M105,69h14V55h-14V69z"/>
- <circle cx="151" cy="62" r="4"/>
- <path d="M160,71h-18V53h18V71z M144,69h14V55h-14V69z"/>
- <circle cx="73" cy="102" r="4"/>
- <path d="M82,111H64V93h18V111z M66,109h14V95H66V109z"/>
- <circle cx="112.5" cy="102" r="4"/>
- <path d="M121,111h-18V93h18V111z M105,109h14V95h-14V109z"/>
- <circle cx="151" cy="102" r="4"/>
- <path d="M160,111h-18V93h18V111z M144,109h14V95h-14V109z"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/image-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/image-icons.html
deleted file mode 100644
index 96dee0697db..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/image-icons.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="image" size="24">
-<svg><defs>
-<g id="add-a-photo"><path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-3.2-5c0 1.77 1.43 3.2 3.2 3.2s3.2-1.43 3.2-3.2-1.43-3.2-3.2-3.2-3.2 1.43-3.2 3.2z"/></g>
-<g id="add-to-photos"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g>
-<g id="adjust"><path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"/></g>
-<g id="assistant"><path d="M19 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5.12 10.88L12 17l-1.88-4.12L6 11l4.12-1.88L12 5l1.88 4.12L18 11l-4.12 1.88z"/></g>
-<g id="assistant-photo"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/></g>
-<g id="audiotrack"><path d="M12 3v9.28c-.47-.17-.97-.28-1.5-.28C8.01 12 6 14.01 6 16.5S8.01 21 10.5 21c2.31 0 4.2-1.75 4.45-4H15V6h4V3h-7z"/></g>
-<g id="blur-circular"><path d="M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"/></g>
-<g id="blur-linear"><path d="M5 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 13c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zM3 21h18v-2H3v2zM5 9.5c.83 0 1.5-.67 1.5-1.5S5.83 6.5 5 6.5 3.5 7.17 3.5 8 4.17 9.5 5 9.5zm0 4c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 17c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8-.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM3 3v2h18V3H3zm14 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm0 4c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM13 9c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z"/></g>
-<g id="blur-off"><path d="M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-.2 4.48l.2.02c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5l.02.2c.09.67.61 1.19 1.28 1.28zM14 3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-4 0c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm11 7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 8c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-4 13.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM2.5 5.27l3.78 3.78L6 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l2.81 2.81c-.71.11-1.25.73-1.25 1.47 0 .83.67 1.5 1.5 1.5.74 0 1.36-.54 1.47-1.25l2.81 2.81c-.09-.03-.18-.06-.28-.06-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l3.78 3.78L20 20.23 3.77 4 2.5 5.27zM10 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm11-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM3 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 11c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"/></g>
-<g id="blur-on"><path d="M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"/></g>
-<g id="brightness-1"><circle cx="12" cy="12" r="10"/></g>
-<g id="brightness-2"><path d="M10 2c-1.82 0-3.53.5-5 1.35C7.99 5.08 10 8.3 10 12s-2.01 6.92-5 8.65C6.47 21.5 8.18 22 10 22c5.52 0 10-4.48 10-10S15.52 2 10 2z"/></g>
-<g id="brightness-3"><path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"/></g>
-<g id="brightness-4"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/></g>
-<g id="brightness-5"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/></g>
-<g id="brightness-6"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/></g>
-<g id="brightness-7"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></g>
-<g id="broken-image"><path d="M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4 4-3.99z"/></g>
-<g id="brush"><path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41z"/></g>
-<g id="camera"><path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4.76 8.25C21 16.97 22 14.61 22 12c0-.69-.07-1.35-.2-2zM8.54 12l-3.9-6.75C3.01 7.03 2 9.39 2 12c0 .69.07 1.35.2 2h7.49l-1.15-2zm-6.08 3c.92 2.92 3.15 5.26 6 6.34L12.12 15H2.46zm11.27 0l-3.9 6.76c.7.15 1.42.24 2.17.24 2.4 0 4.6-.85 6.32-2.25l-3.66-6.35-.93 1.6z"/></g>
-<g id="camera-alt"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
-<g id="camera-front"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8zm5-8H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM7 2h10v10.5c0-1.67-3.33-2.5-5-2.5s-5 .83-5 2.5V2z"/></g>
-<g id="camera-rear"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zm3-20H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm-5 6c-1.11 0-2-.9-2-2s.89-2 1.99-2 2 .9 2 2C14 5.1 13.1 6 12 6z"/></g>
-<g id="camera-roll"><path d="M14 5c0-1.1-.9-2-2-2h-1V2c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2h8V5h-8zm-2 13h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2z"/></g>
-<g id="center-focus-strong"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"/></g>
-<g id="center-focus-weak"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-<g id="collections"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"/></g>
-<g id="collections-bookmark"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 10l-2.5-1.5L15 12V4h5v8z"/></g>
-<g id="color-lens"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="colorize"><path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></g>
-<g id="compare"><path d="M10 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v2h2V1h-2v2zm0 15H5l5-6v6zm9-15h-5v2h5v13l-5-6v9h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
-<g id="control-point"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="control-point-duplicate"><path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 12zm13-9c-4.96 0-9 4.04-9 9s4.04 9 9 9 9-4.04 9-9-4.04-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"/></g>
-<g id="crop"><path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"/></g>
-<g id="crop-16-9"><path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/></g>
-<g id="crop-3-2"><path d="M19 4H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H5V6h14v12z"/></g>
-<g id="crop-5-4"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"/></g>
-<g id="crop-7-5"><path d="M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z"/></g>
-<g id="crop-din"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></g>
-<g id="crop-free"><path d="M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"/></g>
-<g id="crop-landscape"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"/></g>
-<g id="crop-original"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"/></g>
-<g id="crop-portrait"><path d="M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z"/></g>
-<g id="crop-rotate"><path d="M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81 1.33-1.33C19.8 4.07 22.14 7.24 22.5 11H24c-.51-6.16-5.66-11-11.95-11zM16 14h2V8c0-1.11-.9-2-2-2h-6v2h6v6zm-8 2V4H6v2H4v2h2v8c0 1.1.89 2 2 2h8v2h2v-2h2v-2H8z"/></g>
-<g id="crop-square"><path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"/></g>
-<g id="dehaze"><path d="M2 15.5v2h20v-2H2zm0-5v2h20v-2H2zm0-5v2h20v-2H2z"/></g>
-<g id="details"><path d="M3 4l9 16 9-16H3zm3.38 2h11.25L12 16 6.38 6z"/></g>
-<g id="edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></g>
-<g id="exposure"><path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"/></g>
-<g id="exposure-neg-1"><path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"/></g>
-<g id="exposure-neg-2"><path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H21v-1.71h-5.95zM2 11v2h8v-2H2z"/></g>
-<g id="exposure-plus-1"><path d="M10 7H8v4H4v2h4v4h2v-4h4v-2h-4V7zm10 11h-2V7.38L15 8.4V6.7L19.7 5h.3v13z"/></g>
-<g id="exposure-plus-2"><path d="M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H22v-1.71h-5.95zM8 7H6v4H2v2h4v4h2v-4h4v-2H8V7z"/></g>
-<g id="exposure-zero"><path d="M16.14 12.5c0 1-.1 1.85-.3 2.55-.2.7-.48 1.27-.83 1.7-.36.44-.79.75-1.3.95-.51.2-1.07.3-1.7.3-.62 0-1.18-.1-1.69-.3-.51-.2-.95-.51-1.31-.95-.36-.44-.65-1.01-.85-1.7-.2-.7-.3-1.55-.3-2.55v-2.04c0-1 .1-1.85.3-2.55.2-.7.48-1.26.84-1.69.36-.43.8-.74 1.31-.93C10.81 5.1 11.38 5 12 5c.63 0 1.19.1 1.7.29.51.19.95.5 1.31.93.36.43.64.99.84 1.69.2.7.3 1.54.3 2.55v2.04zm-2.11-2.36c0-.64-.05-1.18-.13-1.62-.09-.44-.22-.79-.4-1.06-.17-.27-.39-.46-.64-.58-.25-.13-.54-.19-.86-.19-.32 0-.61.06-.86.18s-.47.31-.64.58c-.17.27-.31.62-.4 1.06s-.13.98-.13 1.62v2.67c0 .64.05 1.18.14 1.62.09.45.23.81.4 1.09s.39.48.64.61.54.19.87.19c.33 0 .62-.06.87-.19s.46-.33.63-.61c.17-.28.3-.64.39-1.09.09-.45.13-.99.13-1.62v-2.66z"/></g>
-<g id="filter"><path d="M15.96 10.29l-2.75 3.54-1.96-2.36L8.5 15h11l-3.54-4.71zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
-<g id="filter-1"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
-<g id="filter-2"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"/></g>
-<g id="filter-3"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"/></g>
-<g id="filter-4"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
-<g id="filter-5"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"/></g>
-<g id="filter-6"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-2c0-1.11-.9-2-2-2h-2V7h4V5h-4c-1.1 0-2 .89-2 2v6c0 1.11.9 2 2 2zm0-4h2v2h-2v-2z"/></g>
-<g id="filter-7"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2l4-8V5h-6v2h4l-4 8h2z"/></g>
-<g id="filter-8"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-2c-1.1 0-2 .89-2 2v1.5c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5V13c0 1.11.9 2 2 2zm0-8h2v2h-2V7zm0 4h2v2h-2v-2z"/></g>
-<g id="filter-9"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM15 5h-2c-1.1 0-2 .89-2 2v2c0 1.11.9 2 2 2h2v2h-4v2h4c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2zm0 4h-2V7h2v2z"/></g>
-<g id="filter-9-plus"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 7V8c0-1.11-.9-2-2-2h-1c-1.1 0-2 .89-2 2v1c0 1.11.9 2 2 2h1v1H9v2h3c1.1 0 2-.89 2-2zm-3-3V8h1v1h-1zm10-8H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 8h-2V7h-2v2h-2v2h2v2h2v-2h2v6H7V3h14v6z"/></g>
-<g id="filter-b-and-w"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"/></g>
-<g id="filter-center-focus"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
-<g id="filter-drama"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4h2c0-2.76-1.86-5.08-4.4-5.78C8.61 6.88 10.2 6 12 6c3.03 0 5.5 2.47 5.5 5.5v.5H19c1.65 0 3 1.35 3 3s-1.35 3-3 3z"/></g>
-<g id="filter-frames"><path d="M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM18 8H6v10h12"/></g>
-<g id="filter-hdr"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/></g>
-<g id="filter-none"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
-<g id="filter-tilt-shift"><path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43zM19.93 11h2.02c-.2-2.01-1-3.84-2.21-5.32L18.31 7.1c.86 1.11 1.44 2.44 1.62 3.9zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zM15 12c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3zm3.31 4.9l1.43 1.43c1.21-1.48 2.01-3.32 2.21-5.32h-2.02c-.18 1.45-.76 2.78-1.62 3.89zM13 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.43-1.43c-1.1.86-2.43 1.44-3.89 1.62zm-7.32-.19C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43z"/></g>
-<g id="filter-vintage"><path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/></g>
-<g id="flare"><path d="M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05l-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24l2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71l1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"/></g>
-<g id="flash-auto"><path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/></g>
-<g id="flash-off"><path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"/></g>
-<g id="flash-on"><path d="M7 2v11h3v9l7-12h-4l4-8z"/></g>
-<g id="flip"><path d="M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"/></g>
-<g id="gradient"><path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"/></g>
-<g id="grain"><path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="grid-off"><path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27L1.27 1.27zM10 12.55L11.45 14H10v-1.45zm-6-6L5.45 8H4V6.55zM8 20H4v-4h4v4zm0-6H4v-4h3.45l.55.55V14zm6 6h-4v-4h3.45l.55.54V20zm2 0v-1.46L17.46 20H16z"/></g>
-<g id="grid-on"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"/></g>
-<g id="hdr-off"><path d="M17.5 15v-2h1.1l.9 2H21l-.9-2.1c.5-.2.9-.8.9-1.4v-1c0-.8-.7-1.5-1.5-1.5H16v4.9l1.1 1.1h.4zm0-4.5h2v1h-2v-1zm-4.5 0v.4l1.5 1.5v-1.9c0-.8-.7-1.5-1.5-1.5h-1.9l1.5 1.5h.4zm-3.5-1l-7-7-1.1 1L6.9 9h-.4v2h-2V9H3v6h1.5v-2.5h2V15H8v-4.9l1.5 1.5V15h3.4l7.6 7.6 1.1-1.1-12.1-12z"/></g>
-<g id="hdr-on"><path d="M21 11.5v-1c0-.8-.7-1.5-1.5-1.5H16v6h1.5v-2h1.1l.9 2H21l-.9-2.1c.5-.3.9-.8.9-1.4zm-1.5 0h-2v-1h2v1zm-13-.5h-2V9H3v6h1.5v-2.5h2V15H8V9H6.5v2zM13 9H9.5v6H13c.8 0 1.5-.7 1.5-1.5v-3c0-.8-.7-1.5-1.5-1.5zm0 4.5h-2v-3h2v3z"/></g>
-<g id="hdr-strong"><path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-<g id="hdr-weak"><path d="M5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm12-2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/></g>
-<g id="healing"><path d="M17.73 12.02l3.98-3.98c.39-.39.39-1.02 0-1.41l-4.34-4.34c-.39-.39-1.02-.39-1.41 0l-3.98 3.98L8 2.29C7.8 2.1 7.55 2 7.29 2c-.25 0-.51.1-.7.29L2.25 6.63c-.39.39-.39 1.02 0 1.41l3.98 3.98L2.25 16c-.39.39-.39 1.02 0 1.41l4.34 4.34c.39.39 1.02.39 1.41 0l3.98-3.98 3.98 3.98c.2.2.45.29.71.29.26 0 .51-.1.71-.29l4.34-4.34c.39-.39.39-1.02 0-1.41l-3.99-3.98zM12 9c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-4.71 1.96L3.66 7.34l3.63-3.63 3.62 3.62-3.62 3.63zM10 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2-4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2.66 9.34l-3.63-3.62 3.63-3.63 3.62 3.62-3.62 3.63z"/></g>
-<g id="image"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></g>
-<g id="image-aspect-ratio"><path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"/></g>
-<g id="iso"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5.5 7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5zM19 19H5L19 5v14zm-2-2v-1.5h-5V17h5z"/></g>
-<g id="landscape"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/></g>
-<g id="leak-add"><path d="M6 3H3v3c1.66 0 3-1.34 3-3zm8 0h-2c0 4.97-4.03 9-9 9v2c6.08 0 11-4.93 11-11zm-4 0H8c0 2.76-2.24 5-5 5v2c3.87 0 7-3.13 7-7zm0 18h2c0-4.97 4.03-9 9-9v-2c-6.07 0-11 4.93-11 11zm8 0h3v-3c-1.66 0-3 1.34-3 3zm-4 0h2c0-2.76 2.24-5 5-5v-2c-3.87 0-7 3.13-7 7z"/></g>
-<g id="leak-remove"><path d="M10 3H8c0 .37-.04.72-.12 1.06l1.59 1.59C9.81 4.84 10 3.94 10 3zM3 4.27l2.84 2.84C5.03 7.67 4.06 8 3 8v2c1.61 0 3.09-.55 4.27-1.46L8.7 9.97C7.14 11.24 5.16 12 3 12v2c2.71 0 5.19-.99 7.11-2.62l2.5 2.5C10.99 15.81 10 18.29 10 21h2c0-2.16.76-4.14 2.03-5.69l1.43 1.43C14.55 17.91 14 19.39 14 21h2c0-1.06.33-2.03.89-2.84L19.73 21 21 19.73 4.27 3 3 4.27zM14 3h-2c0 1.5-.37 2.91-1.02 4.16l1.46 1.46C13.42 6.98 14 5.06 14 3zm5.94 13.12c.34-.08.69-.12 1.06-.12v-2c-.94 0-1.84.19-2.66.52l1.6 1.6zm-4.56-4.56l1.46 1.46C18.09 12.37 19.5 12 21 12v-2c-2.06 0-3.98.58-5.62 1.56z"/></g>
-<g id="lens"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"/></g>
-<g id="linked-camera"><circle cx="12" cy="14" r="3.2"/><path d="M16 3.33c2.58 0 4.67 2.09 4.67 4.67H22c0-3.31-2.69-6-6-6v1.33M16 6c1.11 0 2 .89 2 2h1.33c0-1.84-1.49-3.33-3.33-3.33V6"/><path d="M17 9c0-1.11-.89-2-2-2V4H9L7.17 6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9h-5zm-5 10c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
-<g id="looks"><path d="M12 10c-3.86 0-7 3.14-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.86-3.14-7-7-7zm0-4C5.93 6 1 10.93 1 17h2c0-4.96 4.04-9 9-9s9 4.04 9 9h2c0-6.07-4.93-11-11-11z"/></g>
-<g id="looks-3"><path d="M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4c1.1 0 2 .89 2 2v1.5z"/></g>
-<g id="looks-4"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z"/></g>
-<g id="looks-5"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2H9v-2h4v-2H9V7h6v2z"/></g>
-<g id="looks-6"><path d="M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2h-2c-1.1 0-2-.89-2-2V9c0-1.11.9-2 2-2h4v2z"/></g>
-<g id="looks-one"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z"/></g>
-<g id="looks-two"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z"/></g>
-<g id="loupe"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="monochrome-photos"><path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3-6c0-2.8-2.2-5-5-5v1.8c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2V18c2.8 0 5-2.2 5-5zm-8.2 0c0 1.8 1.4 3.2 3.2 3.2V9.8c-1.8 0-3.2 1.4-3.2 3.2z"/></g>
-<g id="movie-creation"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></g>
-<g id="movie-filter"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4zm-6.58 11.68L10.37 18l-1.05-2.32L7 14.63l2.32-1.05 1.05-2.32 1.05 2.32 2.32 1.05-2.32 1.05zm3.69-3.47l-.53 1.16-.53-1.16-1.16-.53 1.16-.53.53-1.15.53 1.16 1.16.53-1.16.52z"/></g>
-<g id="music-note"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"/></g>
-<g id="nature"><path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"/></g>
-<g id="nature-people"><path d="M22.17 9.17c0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H6v-3h1v-4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v4h1v5h16v-2h-3v-3.88c3.47-.41 6.17-3.36 6.17-6.95zM4.5 11c.83 0 1.5-.67 1.5-1.5S5.33 8 4.5 8 3 8.67 3 9.5 3.67 11 4.5 11z"/></g>
-<g id="navigate-before"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
-<g id="navigate-next"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
-<g id="palette"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="panorama"><path d="M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zM8.5 12.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z"/></g>
-<g id="panorama-fish-eye"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="panorama-horizontal"><path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C18.18 5.16 15.09 5.7 12 5.7c-3.09 0-6.18-.55-9.12-1.64-.11-.04-.22-.06-.31-.06-.34 0-.57.23-.57.63v14.75c0 .39.23.62.57.62.1 0 .2-.02.31-.06 2.94-1.1 6.03-1.64 9.12-1.64 3.09 0 6.18.55 9.12 1.64.11.04.21.06.31.06.33 0 .57-.23.57-.63V4.63c0-.4-.24-.63-.57-.63z"/></g>
-<g id="panorama-vertical"><path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02.2.06.31C5.16 5.82 5.71 8.91 5.71 12c0 3.09-.55 6.18-1.64 9.12-.05.11-.07.22-.07.31 0 .33.23.57.63.57h14.75c.39 0 .63-.24.63-.57-.01-.1-.03-.2-.07-.31zM6.54 20c.77-2.6 1.16-5.28 1.16-8 0-2.72-.39-5.4-1.16-8h10.91c-.77 2.6-1.16 5.28-1.16 8 0 2.72.39 5.4 1.16 8H6.54z"/></g>
-<g id="panorama-wide-angle"><path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12c0-1.78.24-3.58.71-5.36C7.29 6.2 9.55 6 12 6m0-2c-2.73 0-5.22.24-7.95.72l-.93.16-.25.9C2.29 7.85 2 9.93 2 12s.29 4.15.87 6.22l.25.89.93.16c2.73.49 5.22.73 7.95.73s5.22-.24 7.95-.72l.93-.16.25-.89c.58-2.08.87-4.16.87-6.23s-.29-4.15-.87-6.22l-.25-.89-.93-.16C17.22 4.24 14.73 4 12 4z"/></g>
-<g id="photo"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></g>
-<g id="photo-album"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4zm0 15l3-3.86 2.14 2.58 3-3.86L18 19H6z"/></g>
-<g id="photo-camera"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
-<g id="photo-filter"><path d="M17.13 8.9l.59-1.3 1.3-.6-1.3-.59-.59-1.3-.59 1.3-1.31.59 1.31.6zm-4.74-2.37l-1.18 2.61-2.61 1.18 2.61 1.18 1.18 2.61 1.19-2.61 2.6-1.18-2.6-1.18zM19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2z"/></g>
-<g id="photo-library"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"/></g>
-<g id="photo-size-select-actual"><path d="M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zM5 17l3.5-4.5 2.5 3.01L14.5 11l4.5 6H5z"/></g>
-<g id="photo-size-select-large"><path d="M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h-2v-2zM3 3C2 3 1 4 1 5h2V3zm6 0h2v2H9V3zM5 3h2v2H5V3zm-4 8v8c0 1.1.9 2 2 2h12V11H1zm2 8l2.5-3.21 1.79 2.15 2.5-3.22L13 19H3z"/></g>
-<g id="photo-size-select-small"><path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H1v2h2V7zm12 12h-2v2h2v-2zm4-16h-2v2h2V3zm0 16h-2v2h2v-2zM3 3C2 3 1 4 1 5h2V3zm0 8H1v2h2v-2zm8-8H9v2h2V3zM7 3H5v2h2V3z"/></g>
-<g id="picture-as-pdf"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"/></g>
-<g id="portrait"><path d="M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></g>
-<g id="remove-red-eye"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
-<g id="rotate-90-degrees-ccw"><path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.76 5 13 9.24V6c1.79 0 3.58.68 4.95 2.05 2.73 2.73 2.73 7.17 0 9.9C16.58 19.32 14.79 20 13 20c-.97 0-1.94-.21-2.84-.61l-1.49 1.49C10.02 21.62 11.51 22 13 22c2.3 0 4.61-.88 6.36-2.64 3.52-3.51 3.52-9.21 0-12.72z"/></g>
-<g id="rotate-left"><path d="M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"/></g>
-<g id="rotate-right"><path d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/></g>
-<g id="slideshow"><path d="M10 8v8l5-4-5-4zm9-5H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></g>
-<g id="straighten"><path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/></g>
-<g id="style"><path d="M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zM7.88 8.75c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-2 11c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"/></g>
-<g id="switch-camera"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"/></g>
-<g id="switch-video"><path d="M18 9.5V6c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-3.5l4 4v-13l-4 4zm-5 6V13H7v2.5L3.5 12 7 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"/></g>
-<g id="tag-faces"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
-<g id="texture"><path d="M19.51 3.08L3.08 19.51c.09.34.27.65.51.9.25.24.56.42.9.51L20.93 4.49c-.19-.69-.73-1.23-1.42-1.41zM11.88 3L3 11.88v2.83L14.71 3h-2.83zM5 3c-1.1 0-2 .9-2 2v2l4-4H5zm14 18c.55 0 1.05-.22 1.41-.59.37-.36.59-.86.59-1.41v-2l-4 4h2zm-9.71 0h2.83L21 12.12V9.29L9.29 21z"/></g>
-<g id="timelapse"><path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
-<g id="timer"><path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="timer-10"><path d="M0 7.72V9.4l3-1V18h2V6h-.25L0 7.72zm23.78 6.65c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39 0-.14.03-.28.09-.41.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59C21.49 9.07 21 9 20.46 9c-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.69.23.96c.15.28.36.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02zm-9.96-7.32c-.34-.4-.75-.7-1.23-.88-.47-.18-1.01-.27-1.59-.27-.58 0-1.11.09-1.59.27-.48.18-.89.47-1.23.88-.34.41-.6.93-.79 1.59-.18.65-.28 1.45-.28 2.39v1.92c0 .94.09 1.74.28 2.39.19.66.45 1.19.8 1.6.34.41.75.71 1.23.89.48.18 1.01.28 1.59.28.59 0 1.12-.09 1.59-.28.48-.18.88-.48 1.22-.89.34-.41.6-.94.78-1.6.18-.65.28-1.45.28-2.39v-1.92c0-.94-.09-1.74-.28-2.39-.18-.66-.44-1.19-.78-1.59zm-.92 6.17c0 .6-.04 1.11-.12 1.53-.08.42-.2.76-.36 1.02-.16.26-.36.45-.59.57-.23.12-.51.18-.82.18-.3 0-.58-.06-.82-.18s-.44-.31-.6-.57c-.16-.26-.29-.6-.38-1.02-.09-.42-.13-.93-.13-1.53v-2.5c0-.6.04-1.11.13-1.52.09-.41.21-.74.38-1 .16-.25.36-.43.6-.55.24-.11.51-.17.81-.17.31 0 .58.06.81.17.24.11.44.29.6.55.16.25.29.58.37.99.08.41.13.92.13 1.52v2.51z"/></g>
-<g id="timer-3"><path d="M11.61 12.97c-.16-.24-.36-.46-.62-.65-.25-.19-.56-.35-.93-.48.3-.14.57-.3.8-.5.23-.2.42-.41.57-.64.15-.23.27-.46.34-.71.08-.24.11-.49.11-.73 0-.55-.09-1.04-.28-1.46-.18-.42-.44-.77-.78-1.06-.33-.28-.73-.5-1.2-.64-.45-.13-.97-.2-1.53-.2-.55 0-1.06.08-1.52.24-.47.17-.87.4-1.2.69-.33.29-.6.63-.78 1.03-.2.39-.29.83-.29 1.29h1.98c0-.26.05-.49.14-.69.09-.2.22-.38.38-.52.17-.14.36-.25.58-.33.22-.08.46-.12.73-.12.61 0 1.06.16 1.36.47.3.31.44.75.44 1.32 0 .27-.04.52-.12.74-.08.22-.21.41-.38.57-.17.16-.38.28-.63.37-.25.09-.55.13-.89.13H6.72v1.57H7.9c.34 0 .64.04.91.11.27.08.5.19.69.35.19.16.34.36.44.61.1.24.16.54.16.87 0 .62-.18 1.09-.53 1.42-.35.33-.84.49-1.45.49-.29 0-.56-.04-.8-.13-.24-.08-.44-.2-.61-.36-.17-.16-.3-.34-.39-.56-.09-.22-.14-.46-.14-.72H4.19c0 .55.11 1.03.32 1.45.21.42.5.77.86 1.05s.77.49 1.24.63.96.21 1.48.21c.57 0 1.09-.08 1.58-.23.49-.15.91-.38 1.26-.68.36-.3.64-.66.84-1.1.2-.43.3-.93.3-1.48 0-.29-.04-.58-.11-.86-.08-.25-.19-.51-.35-.76zm9.26 1.4c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39s.03-.28.09-.41c.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59-.43-.15-.92-.22-1.46-.22-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.68.23.96c.15.28.37.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02z"/></g>
-<g id="timer-off"><path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z"/></g>
-<g id="tonality"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z"/></g>
-<g id="transform"><path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"/></g>
-<g id="tune"><path d="M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"/></g>
-<g id="view-comfy"><path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z"/></g>
-<g id="view-compact"><path d="M3 19h6v-7H3v7zm7 0h12v-7H10v7zM3 5v6h19V5H3z"/></g>
-<g id="vignette"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 15c-4.42 0-8-2.69-8-6s3.58-6 8-6 8 2.69 8 6-3.58 6-8 6z"/></g>
-<g id="wb-auto"><path d="M6.85 12.65h2.3L8 9l-1.15 3.65zM22 7l-1.2 6.29L19.3 7h-1.6l-1.49 6.29L15 7h-.76C12.77 5.17 10.53 4 8 4c-4.42 0-8 3.58-8 8s3.58 8 8 8c3.13 0 5.84-1.81 7.15-4.43l.1.43H17l1.5-6.1L20 16h1.75l2.05-9H22zm-11.7 9l-.7-2H6.4l-.7 2H3.8L7 7h2l3.2 9h-1.9z"/></g>
-<g id="wb-cloudy"><path d="M19.36 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.64-4.96z"/></g>
-<g id="wb-incandescent"><path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4.15-3-5.19zm5 4.19v2h3v-2h-3zm-2.76 7.66l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4z"/></g>
-<g id="wb-iridescent"><path d="M5 14.5h14v-6H5v6zM11 .55V3.5h2V.55h-2zm8.04 2.5l-1.79 1.79 1.41 1.41 1.8-1.79-1.42-1.41zM13 22.45V19.5h-2v2.95h2zm7.45-3.91l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM3.55 4.46l1.79 1.79 1.41-1.41-1.79-1.79-1.41 1.41zm1.41 15.49l1.79-1.8-1.41-1.41-1.79 1.79 1.41 1.42z"/></g>
-<g id="wb-sunny"><path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/index.html
deleted file mode 100644
index cea02f96d91..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/index.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/iron-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/iron-icons.html
deleted file mode 100644
index c219575b3bc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/iron-icons.html
+++ /dev/null
@@ -1,338 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!--
-
-`iron-icons` is a utility import that includes the definition for the `iron-icon` element, `iron-iconset-svg` element, as well as an import for the default icon set.
-
-The `iron-icons` directory also includes imports for additional icon sets that can be loaded into your project.
-
-Example loading icon set:
-
- <link rel="import" href="../iron-icons/maps-icons.html">
-
-To use an icon from one of these sets, first prefix your `iron-icon` with the icon set name, followed by a colon, ":", and then the icon id.
-
-Example using the directions-bus icon from the maps icon set:
-
- <iron-icon icon="maps:directions-bus"></iron-icon>
-
-
-See [iron-icon](#iron-icon) for more information about working with icons.
-
-See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about how to create a custom iconset.
-
-@group Iron Elements
-@pseudoElement iron-icons
-@demo demo/index.html
--->
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="icons" size="24">
-<svg><defs>
-<g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"/></g>
-<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"/></g>
-<g id="accessible"><circle cx="12" cy="4" r="2"/><path d="M19 13v-2c-1.54.02-3.09-.75-4.07-1.83l-1.29-1.43c-.17-.19-.38-.34-.61-.45-.01 0-.01-.01-.02-.01H13c-.35-.2-.75-.3-1.19-.26C10.76 7.11 10 8.04 10 9.09V15c0 1.1.9 2 2 2h5v5h2v-5.5c0-1.1-.9-2-2-2h-3v-3.45c1.29 1.07 3.25 1.94 5 1.95zm-6.17 5c-.41 1.16-1.52 2-2.83 2-1.66 0-3-1.34-3-3 0-1.31.84-2.41 2-2.83V12.1c-2.28.46-4 2.48-4 4.9 0 2.76 2.24 5 5 5 2.42 0 4.44-1.72 4.9-4h-2.07z"/></g>
-<g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/></g>
-<g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"/></g>
-<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></g>
-<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></g>
-<g id="add-alert"><path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z"/></g>
-<g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
-<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
-<g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></g>
-<g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g>
-<g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"/></g>
-<g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"/></g>
-<g id="all-out"><path d="M16.21 4.16l4 4v-4zm4 12l-4 4h4zm-12 4l-4-4v4zm-4-12l4-4h-4zm12.95-.95c-2.73-2.73-7.17-2.73-9.9 0s-2.73 7.17 0 9.9 7.17 2.73 9.9 0 2.73-7.16 0-9.9zm-1.1 8.8c-2.13 2.13-5.57 2.13-7.7 0s-2.13-5.57 0-7.7 5.57-2.13 7.7 0 2.13 5.57 0 7.7z"/></g>
-<g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g>
-<g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/></g>
-<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"/></g>
-<g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"/></g>
-<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></g>
-<g id="arrow-downward"><path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/></g>
-<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"/></g>
-<g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/></g>
-<g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"/></g>
-<g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></g>
-<g id="arrow-upward"><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></g>
-<g id="aspect-ratio"><path d="M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"/></g>
-<g id="assessment"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
-<g id="assignment"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></g>
-<g id="assignment-ind"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"/></g>
-<g id="assignment-late"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-6 15h-2v-2h2v2zm0-4h-2V8h2v6zm-1-9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
-<g id="assignment-return"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 12h-4v3l-5-5 5-5v3h4v4z"/></g>
-<g id="assignment-returned"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h3l-5 5z"/></g>
-<g id="assignment-turned-in"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-2 14l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></g>
-<g id="attachment"><path d="M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5z"/></g>
-<g id="autorenew"><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"/></g>
-<g id="backspace"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z"/></g>
-<g id="backup"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></g>
-<g id="block"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"/></g>
-<g id="book"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/></g>
-<g id="bookmark"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/></g>
-<g id="bookmark-border"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/></g>
-<g id="bug-report"><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/></g>
-<g id="build"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></g>
-<g id="cached"><path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"/></g>
-<g id="camera-enhance"><path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-1l1.25-2.75L16 13l-2.75-1.25L12 9l-1.25 2.75L8 13l2.75 1.25z"/></g>
-<g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></g>
-<g id="card-giftcard"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"/></g>
-<g id="card-membership"><path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"/></g>
-<g id="card-travel"><path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H4v-2h16v2zm0-5H4V8h3v2h2V8h6v2h2V8h3v6z"/></g>
-<g id="change-history"><path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"/></g>
-<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></g>
-<g id="check-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></g>
-<g id="check-box-outline-blank"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
-<g id="check-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></g>
-<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
-<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
-<g id="chrome-reader-mode"><path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z"/></g>
-<g id="class"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/></g>
-<g id="clear"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></g>
-<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></g>
-<g id="cloud"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/></g>
-<g id="cloud-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z"/></g>
-<g id="cloud-done"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"/></g>
-<g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"/></g>
-<g id="cloud-off"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z"/></g>
-<g id="cloud-queue"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z"/></g>
-<g id="cloud-upload"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></g>
-<g id="code"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/></g>
-<g id="compare-arrows"><path d="M9.01 14H2v2h7.01v3L13 15l-3.99-4v3zm5.98-1v-3H22V8h-7.01V5L11 9l3.99 4z"/></g>
-<g id="content-copy"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></g>
-<g id="content-cut"><path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"/></g>
-<g id="content-paste"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/></g>
-<g id="copyright"><path d="M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91 1.05.34 1.7.34c.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="create"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></g>
-<g id="create-new-folder"><path d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z"/></g>
-<g id="credit-card"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/></g>
-<g id="dashboard"><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/></g>
-<g id="date-range"><path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"/></g>
-<g id="delete"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></g>
-<g id="description"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></g>
-<g id="dns"><path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-<g id="done"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></g>
-<g id="done-all"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></g>
-<g id="donut-large"><path d="M11 5.08V2c-5 .5-9 4.81-9 10s4 9.5 9 10v-3.08c-3-.48-6-3.4-6-6.92s3-6.44 6-6.92zM18.97 11H22c-.47-5-4-8.53-9-9v3.08C16 5.51 18.54 8 18.97 11zM13 18.92V22c5-.47 8.53-4 9-9h-3.03c-.43 3-2.97 5.49-5.97 5.92z"/></g>
-<g id="donut-small"><path d="M11 9.16V2c-5 .5-9 4.79-9 10s4 9.5 9 10v-7.16c-1-.41-2-1.52-2-2.84s1-2.43 2-2.84zM14.86 11H22c-.48-4.75-4-8.53-9-9v7.16c1 .3 1.52.98 1.86 1.84zM13 14.84V22c5-.47 8.52-4.25 9-9h-7.14c-.34.86-.86 1.54-1.86 1.84z"/></g>
-<g id="drafts"><path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"/></g>
-<g id="eject"><path d="M5 17h14v2H5zm7-12L5.33 15h13.34z"/></g>
-<g id="error"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></g>
-<g id="error-outline"><path d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
-<g id="event"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/></g>
-<g id="event-seat"><path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z"/></g>
-<g id="exit-to-app"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
-<g id="expand-less"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/></g>
-<g id="expand-more"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></g>
-<g id="explore"><path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"/></g>
-<g id="extension"><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></g>
-<g id="face"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"/></g>
-<g id="favorite"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></g>
-<g id="favorite-border"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"/></g>
-<g id="feedback"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/></g>
-<g id="file-download"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></g>
-<g id="file-upload"><path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/></g>
-<g id="filter-list"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/></g>
-<g id="find-in-page"><path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"/></g>
-<g id="find-replace"><path d="M11 6c1.38 0 2.63.56 3.54 1.46L12 10h6V4l-2.05 2.05C14.68 4.78 12.93 4 11 4c-3.53 0-6.43 2.61-6.92 6H6.1c.46-2.28 2.48-4 4.9-4zm5.64 9.14c.66-.9 1.12-1.97 1.28-3.14H15.9c-.46 2.28-2.48 4-4.9 4-1.38 0-2.63-.56-3.54-1.46L10 12H4v6l2.05-2.05C7.32 17.22 9.07 18 11 18c1.55 0 2.98-.51 4.14-1.36L20 21.49 21.49 20l-4.85-4.86z"/></g>
-<g id="fingerprint"><path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"/></g>
-<g id="flag"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/></g>
-<g id="flight-land"><path d="M2.5 19h19v2h-19zm7.18-5.73l4.35 1.16 5.31 1.42c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5.15 8.95l-.93-2.32-1.45-.39v5.17l1.6.43 5.31 1.43z"/></g>
-<g id="flight-takeoff"><path d="M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 1.82 3.16.77 1.33 1.6-.43 5.31-1.42 4.35-1.16L21 11.49c.81-.23 1.28-1.05 1.07-1.85z"/></g>
-<g id="flip-to-back"><path d="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4 12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1.89 2 2 2zm10-4h2v-2h-2v2zm0-4h2V7h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zM5 7H3v12c0 1.1.89 2 2 2h12v-2H5V7zm10-2h2V3h-2v2zm0 12h2v-2h-2v2z"/></g>
-<g id="flip-to-front"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"/></g>
-<g id="folder"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></g>
-<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"/></g>
-<g id="folder-shared"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z"/></g>
-<g id="font-download"><path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"/></g>
-<g id="forward"><path d="M12 8V4l8 8-8 8v-4H4V8z"/></g>
-<g id="fullscreen"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></g>
-<g id="fullscreen-exit"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></g>
-<g id="gavel"><path d="M1 21h12v2H1zM5.245 8.07l2.83-2.827 14.14 14.142-2.828 2.828zM12.317 1l5.657 5.656-2.83 2.83-5.654-5.66zM3.825 9.485l5.657 5.657-2.828 2.828-5.657-5.657z"/></g>
-<g id="gesture"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></g>
-<g id="get-app"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></g>
-<g id="gif"><path d="M11.5 9H13v6h-1.5zM9 9H6c-.6 0-1 .5-1 1v4c0 .5.4 1 1 1h3c.6 0 1-.5 1-1v-2H8.5v1.5h-2v-3H10V10c0-.5-.4-1-1-1zm10 1.5V9h-4.5v6H16v-2h2v-1.5h-2v-1z"/></g>
-<g id="grade"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></g>
-<g id="group-work"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM8 17.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM9.5 8c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8zm6.5 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
-<g id="help"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/></g>
-<g id="help-outline"><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"/></g>
-<g id="highlight-off"><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="history"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></g>
-<g id="home"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></g>
-<g id="hourglass-empty"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"/></g>
-<g id="hourglass-full"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"/></g>
-<g id="http"><path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5zm0 2.5h-2v-1h2v1z"/></g>
-<g id="https"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></g>
-<g id="important-devices"><path d="M23 11.01L18 11c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-9c0-.55-.45-.99-1-.99zM23 20h-5v-7h5v7zM20 2H2C.89 2 0 2.89 0 4v12c0 1.1.89 2 2 2h7v2H7v2h8v-2h-2v-2h2v-2H2V4h18v5h2V4c0-1.11-.9-2-2-2zm-8.03 7L11 6l-.97 3H7l2.47 1.76-.94 2.91 2.47-1.8 2.47 1.8-.94-2.91L15 9h-3.03z"/></g>
-<g id="inbox"><path d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"/></g>
-<g id="indeterminate-check-box"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"/></g>
-<g id="info"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></g>
-<g id="info-outline"><path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"/></g>
-<g id="input"><path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"/></g>
-<g id="invert-colors"><path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"/></g>
-<g id="label"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"/></g>
-<g id="label-outline"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"/></g>
-<g id="language"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/></g>
-<g id="launch"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></g>
-<g id="lightbulb-outline"><path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"/></g>
-<g id="line-style"><path d="M3 16h5v-2H3v2zm6.5 0h5v-2h-5v2zm6.5 0h5v-2h-5v2zM3 20h2v-2H3v2zm4 0h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM3 12h8v-2H3v2zm10 0h8v-2h-8v2zM3 4v4h18V4H3z"/></g>
-<g id="line-weight"><path d="M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"/></g>
-<g id="link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></g>
-<g id="list"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/></g>
-<g id="lock"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></g>
-<g id="lock-open"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"/></g>
-<g id="lock-outline"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM18 20H6V10h12v10z"/></g>
-<g id="loyalty"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7zm11.77 8.27L13 19.54l-4.27-4.27C8.28 14.81 8 14.19 8 13.5c0-1.38 1.12-2.5 2.5-2.5.69 0 1.32.28 1.77.74l.73.72.73-.73c.45-.45 1.08-.73 1.77-.73 1.38 0 2.5 1.12 2.5 2.5 0 .69-.28 1.32-.73 1.77z"/></g>
-<g id="mail"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
-<g id="markunread"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
-<g id="markunread-mailbox"><path d="M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"/></g>
-<g id="menu"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></g>
-<g id="more-horiz"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="motorcycle"><path d="M19.44 9.03L15.41 5H11v2h3.59l2 2H5c-2.8 0-5 2.2-5 5s2.2 5 5 5c2.46 0 4.45-1.69 4.9-4h1.65l2.77-2.77c-.21.54-.32 1.14-.32 1.77 0 2.8 2.2 5 5 5s5-2.2 5-5c0-2.65-1.97-4.77-4.56-4.97zM7.82 15C7.4 16.15 6.28 17 5 17c-1.63 0-3-1.37-3-3s1.37-3 3-3c1.28 0 2.4.85 2.82 2H5v2h2.82zM19 17c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"/></g>
-<g id="move-to-inbox"><path d="M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10zm-3-5h-2V7h-4v3H8l4 4 4-4z"/></g>
-<g id="next-week"><path d="M20 7h-4V5c0-.55-.22-1.05-.59-1.41C15.05 3.22 14.55 3 14 3h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM10 5h4v2h-4V5zm1 13.5l-1-1 3-3-3-3 1-1 4 4-4 4z"/></g>
-<g id="note-add"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"/></g>
-<g id="offline-pin"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z"/></g>
-<g id="opacity"><path d="M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"/></g>
-<g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"/></g>
-<g id="open-in-new"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></g>
-<g id="open-with"><path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"/></g>
-<g id="pageview"><path d="M11.5 9C10.12 9 9 10.12 9 11.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5S12.88 9 11.5 9zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3.21 14.21l-2.91-2.91c-.69.44-1.51.7-2.39.7C9.01 16 7 13.99 7 11.5S9.01 7 11.5 7 16 9.01 16 11.5c0 .88-.26 1.69-.7 2.39l2.91 2.9-1.42 1.42z"/></g>
-<g id="pan-tool"><path d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/></g>
-<g id="payment"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/></g>
-<g id="perm-camera-mic"><path d="M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v-2.09c-2.83-.48-5-2.94-5-5.91h2c0 2.21 1.79 4 4 4s4-1.79 4-4h2c0 2.97-2.17 5.43-5 5.91V21h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-6 8c0 1.1-.9 2-2 2s-2-.9-2-2V9c0-1.1.9-2 2-2s2 .9 2 2v4z"/></g>
-<g id="perm-contact-calendar"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z"/></g>
-<g id="perm-data-setting"><path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.49l1.06-.83c.09-.08.12-.21.06-.32l-1-1.73c-.06-.11-.19-.15-.31-.11l-1.24.5c-.26-.2-.54-.37-.85-.49l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.49l-1.24-.5c-.11-.04-.24 0-.31.11l-1 1.73c-.06.11-.04.24.06.32l1.06.83c-.02.16-.03.32-.03.49 0 .17.01.33.03.49l-1.06.83c-.09.08-.12.21-.06.32l1 1.73c.06.11.19.15.31.11l1.24-.5c.26.2.54.37.85.49l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.59-.29.84-.49l1.25.5c.11.04.24 0 .31-.11l1-1.73c.06-.11.03-.24-.06-.32l-1.07-.83zm-3.71 1.01c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="perm-device-information"><path d="M13 7h-2v2h2V7zm0 4h-2v6h2v-6zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
-<g id="perm-identity"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"/></g>
-<g id="perm-media"><path d="M2 6H0v5h.01L0 20c0 1.1.9 2 2 2h18v-2H2V6zm20-2h-8l-2-2H6c-1.1 0-1.99.9-1.99 2L4 16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 15l4.5-6 3.5 4.51 2.5-3.01L21 15H7z"/></g>
-<g id="perm-phone-msg"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM12 3v10l3-3h6V3h-9z"/></g>
-<g id="perm-scan-wifi"><path d="M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"/></g>
-<g id="pets"><circle cx="4.5" cy="9.5" r="2.5"/><circle cx="9" cy="5.5" r="2.5"/><circle cx="15" cy="5.5" r="2.5"/><circle cx="19.5" cy="9.5" r="2.5"/><path d="M17.34 14.86c-.87-1.02-1.6-1.89-2.48-2.91-.46-.54-1.05-1.08-1.75-1.32-.11-.04-.22-.07-.33-.09-.25-.04-.52-.04-.78-.04s-.53 0-.79.05c-.11.02-.22.05-.33.09-.7.24-1.28.78-1.75 1.32-.87 1.02-1.6 1.89-2.48 2.91-1.31 1.31-2.92 2.76-2.62 4.79.29 1.02 1.02 2.03 2.33 2.32.73.15 3.06-.44 5.54-.44h.18c2.48 0 4.81.58 5.54.44 1.31-.29 2.04-1.31 2.33-2.32.31-2.04-1.3-3.49-2.61-4.8z"/></g>
-<g id="picture-in-picture"><path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"/></g>
-<g id="picture-in-picture-alt"><path d="M19 11h-8v6h8v-6zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H3V4.97h18v14.05z"/></g>
-<g id="play-for-work"><path d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z"/></g>
-<g id="polymer"><path d="M19 4h-4L7.11 16.63 4.5 12 9 4H5L.5 12 5 20h4l7.89-12.63L19.5 12 15 20h4l4.5-8z"/></g>
-<g id="power-settings-new"><path d="M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"/></g>
-<g id="pregnant-woman"><path d="M9 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm7 9c-.01-1.34-.83-2.51-2-3 0-1.66-1.34-3-3-3s-3 1.34-3 3v7h2v5h3v-5h3v-4z"/></g>
-<g id="print"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/></g>
-<g id="query-builder"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></g>
-<g id="question-answer"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/></g>
-<g id="radio-button-checked"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
-<g id="radio-button-unchecked"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
-<g id="receipt"><path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"/></g>
-<g id="record-voice-over"><circle cx="9" cy="9" r="4"/><path d="M9 15c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm7.76-9.64l-1.68 1.69c.84 1.18.84 2.71 0 3.89l1.68 1.69c2.02-2.02 2.02-5.07 0-7.27zM20.07 2l-1.63 1.63c2.77 3.02 2.77 7.56 0 10.74L20.07 16c3.9-3.89 3.91-9.95 0-14z"/></g>
-<g id="redeem"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"/></g>
-<g id="redo"><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></g>
-<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></g>
-<g id="remove"><path d="M19 13H5v-2h14v2z"/></g>
-<g id="remove-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"/></g>
-<g id="remove-circle-outline"><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
-<g id="reorder"><path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"/></g>
-<g id="reply"><path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/></g>
-<g id="reply-all"><path d="M7 8V5l-7 7 7 7v-3l-4-4 4-4zm6 1V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/></g>
-<g id="report"><path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"/></g>
-<g id="report-problem"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></g>
-<g id="restore"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></g>
-<g id="room"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
-<g id="rounded-corner"><path d="M19 19h2v2h-2v-2zm0-2h2v-2h-2v2zM3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm0-4h2V3H3v2zm4 0h2V3H7v2zm8 16h2v-2h-2v2zm-4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm-8 0h2v-2H7v2zm-4 0h2v-2H3v2zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2V8z"/></g>
-<g id="rowing"><path d="M8.5 14.5L4 19l1.5 1.5L9 17h2l-2.5-2.5zM15 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 20.01L18 24l-2.99-3.01V19.5l-7.1-7.09c-.31.05-.61.07-.91.07v-2.16c1.66.03 3.61-.87 4.67-2.04l1.4-1.55c.19-.21.43-.38.69-.5.29-.14.62-.23.96-.23h.03C15.99 6.01 17 7.02 17 8.26v5.75c0 .84-.35 1.61-.92 2.16l-3.58-3.58v-2.27c-.63.52-1.43 1.02-2.29 1.39L16.5 18H18l3 3.01z"/></g>
-<g id="save"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/></g>
-<g id="schedule"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></g>
-<g id="search"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></g>
-<g id="select-all"><path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"/></g>
-<g id="send"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></g>
-<g id="settings"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"/></g>
-<g id="settings-applications"><path d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"/></g>
-<g id="settings-backup-restore"><path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"/></g>
-<g id="settings-bluetooth"><path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 3.83l1.88 1.88L13 7.59V3.83zm1.88 10.46L13 16.17v-3.76l1.88 1.88z"/></g>
-<g id="settings-brightness"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5V16zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3V9z"/></g>
-<g id="settings-cell"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM16 .01L8 0C6.9 0 6 .9 6 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V2c0-1.1-.9-1.99-2-1.99zM16 16H8V4h8v12z"/></g>
-<g id="settings-ethernet"><path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z"/></g>
-<g id="settings-input-antenna"><path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.62 9.5 12c0 1.02.62 1.9 1.5 2.29v3.3L7.59 21 9 22.41l3-3 3 3L16.41 21 13 17.59v-3.3zM12 1C5.93 1 1 5.93 1 12h2c0-4.97 4.03-9 9-9s9 4.03 9 9h2c0-6.07-4.93-11-11-11z"/></g>
-<g id="settings-input-component"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"/></g>
-<g id="settings-input-composite"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"/></g>
-<g id="settings-input-hdmi"><path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"/></g>
-<g id="settings-input-svideo"><path d="M8 11.5c0-.83-.67-1.5-1.5-1.5S5 10.67 5 11.5 5.67 13 6.5 13 8 12.33 8 11.5zm7-5c0-.83-.67-1.5-1.5-1.5h-3C9.67 5 9 5.67 9 6.5S9.67 8 10.5 8h3c.83 0 1.5-.67 1.5-1.5zM8.5 15c-.83 0-1.5.67-1.5 1.5S7.67 18 8.5 18s1.5-.67 1.5-1.5S9.33 15 8.5 15zM12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm0 20c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9-4.04 9-9 9zm5.5-11c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm-2 5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"/></g>
-<g id="settings-overscan"><path d="M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"/></g>
-<g id="settings-phone"><path d="M13 9h-2v2h2V9zm4 0h-2v2h2V9zm3 6.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 9v2h2V9h-2z"/></g>
-<g id="settings-power"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-5.12L7.44 4.44C5.36 5.88 4 8.28 4 11c0 4.42 3.58 8 8 8s8-3.58 8-8c0-2.72-1.36-5.12-3.44-6.56zM15 24h2v-2h-2v2z"/></g>
-<g id="settings-remote"><path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05zM12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0z"/></g>
-<g id="settings-voice"><path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3-2.54 5.1-5.3 5.1S6.7 13 6.7 10H5c0 3.41 2.72 6.23 6 6.72V20h2v-3.28c3.28-.49 6-3.31 6-6.72z"/></g>
-<g id="shop"><path d="M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z"/></g>
-<g id="shop-two"><path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4v2h-4V3zm0 12V8l5.5 3-5.5 4z"/></g>
-<g id="shopping-basket"><path d="M17.21 9l-4.38-6.56c-.19-.28-.51-.42-.83-.42-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-<g id="shopping-cart"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="sort"><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/></g>
-<g id="speaker-notes"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z"/></g>
-<g id="spellcheck"><path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"/></g>
-<g id="star"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></g>
-<g id="star-border"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></g>
-<g id="star-half"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></g>
-<g id="stars"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z"/></g>
-<g id="store"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"/></g>
-<g id="subdirectory-arrow-left"><path d="M11 9l1.42 1.42L8.83 14H18V4h2v12H8.83l3.59 3.58L11 21l-6-6 6-6z"/></g>
-<g id="subdirectory-arrow-right"><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/></g>
-<g id="subject"><path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/></g>
-<g id="supervisor-account"><path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></g>
-<g id="swap-horiz"><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"/></g>
-<g id="swap-vert"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/></g>
-<g id="swap-vertical-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM6.5 9L10 5.5 13.5 9H11v4H9V9H6.5zm11 6L14 18.5 10.5 15H13v-4h2v4h2.5z"/></g>
-<g id="system-update-alt"><path d="M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z"/></g>
-<g id="tab"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h10v4h8v10z"/></g>
-<g id="tab-unselected"><path d="M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"/></g>
-<g id="text-format"><path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"/></g>
-<g id="theaters"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/></g>
-<g id="thumb-down"><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"/></g>
-<g id="thumb-up"><path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z"/></g>
-<g id="thumbs-up-down"><path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z"/></g>
-<g id="timeline"><path d="M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"/></g>
-<g id="toc"><path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"/></g>
-<g id="today"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></g>
-<g id="toll"><path d="M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zM3 12c0-2.61 1.67-4.83 4-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09c-2.33-.82-4-3.04-4-5.65z"/></g>
-<g id="touch-app"><path d="M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74l-3.43-.72c-.08-.01-.15-.03-.24-.03-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38z"/></g>
-<g id="track-changes"><path d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"/></g>
-<g id="translate"><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></g>
-<g id="trending-down"><path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"/></g>
-<g id="trending-flat"><path d="M22 12l-4-4v3H3v2h15v3z"/></g>
-<g id="trending-up"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"/></g>
-<g id="turned-in"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/></g>
-<g id="turned-in-not"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/></g>
-<g id="unarchive"><path d="M20.55 5.22l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.49-.17-.93-.45-1.28zM12 9.5l5.5 5.5H14v2h-4v-2H6.5L12 9.5zM5.12 5l.82-1h12l.93 1H5.12z"/></g>
-<g id="undo"><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></g>
-<g id="unfold-less"><path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"/></g>
-<g id="unfold-more"><path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"/></g>
-<g id="update"><path d="M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79 2.73 2.71 7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58 3.51-3.47 9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z"/></g>
-<g id="verified-user"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></g>
-<g id="view-agenda"><path d="M20 13H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zm0-10H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"/></g>
-<g id="view-array"><path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/></g>
-<g id="view-carousel"><path d="M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"/></g>
-<g id="view-column"><path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"/></g>
-<g id="view-day"><path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"/></g>
-<g id="view-headline"><path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"/></g>
-<g id="view-list"><path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"/></g>
-<g id="view-module"><path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"/></g>
-<g id="view-quilt"><path d="M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z"/></g>
-<g id="view-stream"><path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"/></g>
-<g id="view-week"><path d="M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"/></g>
-<g id="visibility"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
-<g id="visibility-off"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></g>
-<g id="warning"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></g>
-<g id="watch-later"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"/></g>
-<g id="weekend"><path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51 2 2.82V14h12v-2.03c0-1.3.84-2.4 2-2.82V7c0-1.1-.9-2-2-2z"/></g>
-<g id="work"><path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"/></g>
-<g id="youtube-searched-for"><path d="M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z"/></g>
-<g id="zoom-in"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></g>
-<g id="zoom-out"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/maps-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/maps-icons.html
deleted file mode 100644
index 059ae91d4b5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/maps-icons.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="maps" size="24">
-<svg><defs>
-<g id="add-location"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm4 8h-3v3h-2v-3H8V8h3V5h2v3h3v2z"/></g>
-<g id="beenhere"><path d="M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-9 15l-5-5 1.41-1.41L10 13.17l7.59-7.59L19 7l-9 9z"/></g>
-<g id="directions"><path d="M21.71 11.29l-9-9c-.39-.39-1.02-.39-1.41 0l-9 9c-.39.39-.39 1.02 0 1.41l9 9c.39.39 1.02.39 1.41 0l9-9c.39-.38.39-1.01 0-1.41zM14 14.5V12h-4v3H8v-4c0-.55.45-1 1-1h5V7.5l3.5 3.5-3.5 3.5z"/></g>
-<g id="directions-bike"><path d="M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"/></g>
-<g id="directions-boat"><path d="M20 21c-1.39 0-2.78-.47-4-1.32-2.44 1.71-5.56 1.71-8 0C6.78 20.53 5.39 21 4 21H2v2h2c1.38 0 2.74-.35 4-.99 2.52 1.29 5.48 1.29 8 0 1.26.65 2.62.99 4 .99h2v-2h-2zM3.95 19H4c1.6 0 3.02-.88 4-2 .98 1.12 2.4 2 4 2s3.02-.88 4-2c.98 1.12 2.4 2 4 2h.05l1.89-6.68c.08-.26.06-.54-.06-.78s-.34-.42-.6-.5L20 10.62V6c0-1.1-.9-2-2-2h-3V1H9v3H6c-1.1 0-2 .9-2 2v4.62l-1.29.42c-.26.08-.48.26-.6.5s-.15.52-.06.78L3.95 19zM6 6h12v3.97L12 8 6 9.97V6z"/></g>
-<g id="directions-bus"><path d="M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm9 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6H6V6h12v5z"/></g>
-<g id="directions-car"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"/></g>
-<g id="directions-railway"><path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-7H6V5h12v5z"/></g>
-<g id="directions-run"><path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"/></g>
-<g id="directions-subway"><path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"/></g>
-<g id="directions-transit"><path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"/></g>
-<g id="directions-walk"><path d="M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7"/></g>
-<g id="edit-location"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm-1.56 10H9v-1.44l3.35-3.34 1.43 1.43L10.44 12zm4.45-4.45l-.7.7-1.44-1.44.7-.7c.15-.15.39-.15.54 0l.9.9c.15.15.15.39 0 .54z"/></g>
-<g id="flight"><path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>
-<g id="hotel"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/></g>
-<g id="layers"><path d="M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"/></g>
-<g id="layers-clear"><path d="M19.81 14.99l1.19-.92-1.43-1.43-1.19.92 1.43 1.43zm-.45-4.72L21 9l-9-7-2.91 2.27 7.87 7.88 2.4-1.88zM3.27 1L2 2.27l4.22 4.22L3 9l1.63 1.27L12 16l2.1-1.63 1.43 1.43L12 18.54l-7.37-5.73L3 14.07l9 7 4.95-3.85L20.73 21 22 19.73 3.27 1z"/></g>
-<g id="local-activity"><path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"/></g>
-<g id="local-airport"><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>
-<g id="local-atm"><path d="M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"/></g>
-<g id="local-bar"><path d="M21 5V3H3v2l8 9v5H6v2h12v-2h-5v-5l8-9zM7.43 7L5.66 5h12.69l-1.78 2H7.43z"/></g>
-<g id="local-cafe"><path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM2 21h18v-2H2v2z"/></g>
-<g id="local-car-wash"><path d="M17 5c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zm-5 0c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zM7 5c.83 0 1.5-.67 1.5-1.5C8.5 2.5 7 .8 7 .8S5.5 2.5 5.5 3.5C5.5 4.33 6.17 5 7 5zm11.92 3.01C18.72 7.42 18.16 7 17.5 7h-11c-.66 0-1.21.42-1.42 1.01L3 14v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 18c-.83 0-1.5-.67-1.5-1.5S5.67 15 6.5 15s1.5.67 1.5 1.5S7.33 18 6.5 18zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 13l1.5-4.5h11L19 13H5z"/></g>
-<g id="local-convenience-store"><path d="M19 7V4H5v3H2v13h8v-4h4v4h8V7h-3zm-8 3H9v1h2v1H8V9h2V8H8V7h3v3zm5 2h-1v-2h-2V7h1v2h1V7h1v5z"/></g>
-<g id="local-dining"><path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"/></g>
-<g id="local-drink"><path d="M3 2l2.01 18.23C5.13 21.23 5.97 22 7 22h10c1.03 0 1.87-.77 1.99-1.77L21 2H3zm9 17c-1.66 0-3-1.34-3-3 0-2 3-5.4 3-5.4s3 3.4 3 5.4c0 1.66-1.34 3-3 3zm6.33-11H5.67l-.44-4h13.53l-.43 4z"/></g>
-<g id="local-florist"><path d="M12 22c4.97 0 9-4.03 9-9-4.97 0-9 4.03-9 9zM5.6 10.25c0 1.38 1.12 2.5 2.5 2.5.53 0 1.01-.16 1.42-.44l-.02.19c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5l-.02-.19c.4.28.89.44 1.42.44 1.38 0 2.5-1.12 2.5-2.5 0-1-.59-1.85-1.43-2.25.84-.4 1.43-1.25 1.43-2.25 0-1.38-1.12-2.5-2.5-2.5-.53 0-1.01.16-1.42.44l.02-.19C14.5 2.12 13.38 1 12 1S9.5 2.12 9.5 3.5l.02.19c-.4-.28-.89-.44-1.42-.44-1.38 0-2.5 1.12-2.5 2.5 0 1 .59 1.85 1.43 2.25-.84.4-1.43 1.25-1.43 2.25zM12 5.5c1.38 0 2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8s1.12-2.5 2.5-2.5zM3 13c0 4.97 4.03 9 9 9 0-4.97-4.03-9-9-9z"/></g>
-<g id="local-gas-station"><path d="M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
-<g id="local-grocery-store"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></g>
-<g id="local-hospital"><path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z"/></g>
-<g id="local-hotel"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/></g>
-<g id="local-laundry-service"><path d="M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5.66zM18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V4c0-1.11-.89-1.99-2-1.99zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM7 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/></g>
-<g id="local-library"><path d="M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"/></g>
-<g id="local-mall"><path d="M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"/></g>
-<g id="local-movies"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/></g>
-<g id="local-offer"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"/></g>
-<g id="local-parking"><path d="M13 3H6v18h4v-6h3c3.31 0 6-2.69 6-6s-2.69-6-6-6zm.2 8H10V7h3.2c1.1 0 2 .9 2 2s-.9 2-2 2z"/></g>
-<g id="local-pharmacy"><path d="M21 5h-2.64l1.14-3.14L17.15 1l-1.46 4H3v2l2 6-2 6v2h18v-2l-2-6 2-6V5zm-5 9h-3v3h-2v-3H8v-2h3V9h2v3h3v2z"/></g>
-<g id="local-phone"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></g>
-<g id="local-pizza"><path d="M12 2C8.43 2 5.23 3.54 3.01 6L12 22l8.99-16C18.78 3.55 15.57 2 12 2zM7 7c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm5 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-<g id="local-play"><path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"/></g>
-<g id="local-post-office"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
-<g id="local-printshop"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/></g>
-<g id="local-see"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
-<g id="local-shipping"><path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="local-taxi"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"/></g>
-<g id="map"><path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"/></g>
-<g id="my-location"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
-<g id="navigation"><path d="M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z"/></g>
-<g id="near-me"><path d="M21 3L3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"/></g>
-<g id="person-pin"><path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2.7-1.21-2.7-2.7 0-1.49 1.21-2.7 2.7-2.7zM18 16H6v-.9c0-2 4-3.1 6-3.1s6 1.1 6 3.1v.9z"/></g>
-<g id="person-pin-circle"><path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 2c1.1 0 2 .9 2 2 0 1.11-.9 2-2 2s-2-.89-2-2c0-1.1.9-2 2-2zm0 10c-1.67 0-3.14-.85-4-2.15.02-1.32 2.67-2.05 4-2.05s3.98.73 4 2.05c-.86 1.3-2.33 2.15-4 2.15z"/></g>
-<g id="pin-drop"><path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/></g>
-<g id="place"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
-<g id="rate-review"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 14v-2.47l6.88-6.88c.2-.2.51-.2.71 0l1.77 1.77c.2.2.2.51 0 .71L8.47 14H6zm12 0h-7.5l2-2H18v2z"/></g>
-<g id="restaurant-menu"><path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"/></g>
-<g id="satellite"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.99h3C8 6.65 6.66 8 5 8V4.99zM5 12v-2c2.76 0 5-2.25 5-5.01h2C12 8.86 8.87 12 5 12zm0 6l3.5-4.5 2.5 3.01L14.5 12l4.5 6H5z"/></g>
-<g id="store-mall-directory"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"/></g>
-<g id="terrain"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/></g>
-<g id="traffic"><path d="M20 10h-3V8.86c1.72-.45 3-2 3-3.86h-3V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v1H4c0 1.86 1.28 3.41 3 3.86V10H4c0 1.86 1.28 3.41 3 3.86V15H4c0 1.86 1.28 3.41 3 3.86V20c0 .55.45 1 1 1h8c.55 0 1-.45 1-1v-1.14c1.72-.45 3-2 3-3.86h-3v-1.14c1.72-.45 3-2 3-3.86zm-8 9c-1.11 0-2-.9-2-2s.89-2 2-2c1.1 0 2 .9 2 2s-.89 2-2 2zm0-5c-1.11 0-2-.9-2-2s.89-2 2-2c1.1 0 2 .9 2 2s-.89 2-2 2zm0-5c-1.11 0-2-.9-2-2 0-1.11.89-2 2-2 1.1 0 2 .89 2 2 0 1.1-.89 2-2 2z"/></g>
-<g id="zoom-out-map"><path d="M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/notification-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/notification-icons.html
deleted file mode 100644
index ac6744a2031..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/notification-icons.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="notification" size="24">
-<svg><defs>
-<g id="adb"><path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14 5.64 5 7.68 5 10v1h14v-1c0-2.32-1.14-4.36-2.88-5.63zM9 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
-<g id="airline-seat-flat"><path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.14 3.08.04 4.24 1.19 1.16 3.08 1.14 4.24-.04z"/></g>
-<g id="airline-seat-flat-angled"><path d="M22.25 14.29l-.69 1.89L9.2 11.71l2.08-5.66 8.56 3.09c2.1.76 3.18 3.06 2.41 5.15zM1.5 12.14L8 14.48V19h8v-1.63L20.52 19l.69-1.89-19.02-6.86-.69 1.89zm5.8-1.94c1.49-.72 2.12-2.51 1.41-4C7.99 4.71 6.2 4.08 4.7 4.8c-1.49.71-2.12 2.5-1.4 4 .71 1.49 2.5 2.12 4 1.4z"/></g>
-<g id="airline-seat-individual-suite"><path d="M7 13c1.65 0 3-1.35 3-3S8.65 7 7 7s-3 1.35-3 3 1.35 3 3 3zm12-6h-8v7H3V7H1v10h22v-6c0-2.21-1.79-4-4-4z"/></g>
-<g id="airline-seat-legroom-extra"><path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.12-1.79-1.12L11 9V3H5v8c0 1.66 1.34 3 3 3h7l3.41 7 3.72-1.7c.77-.36 1.1-1.3.7-2.06z"/></g>
-<g id="airline-seat-legroom-normal"><path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5z"/></g>
-<g id="airline-seat-legroom-reduced"><path d="M19.97 19.2c.18.96-.55 1.8-1.47 1.8H14v-3l1-4H9c-1.65 0-3-1.35-3-3V3h6v6h5c1.1 0 2 .9 2 2l-2 7h1.44c.73 0 1.39.49 1.53 1.2zM5 12V3H3v9c0 2.76 2.24 5 5 5h4v-2H8c-1.66 0-3-1.34-3-3z"/></g>
-<g id="airline-seat-recline-extra"><path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0-2.74-1.08-2.96-2.54L4 7H2l1.99 9.76C4.37 19.2 6.47 21 8.94 21H16v-2zm.23-4h-4.88l-1.03-4.1c1.58.89 3.28 1.54 5.15 1.22V9.99c-1.63.31-3.44-.27-4.69-1.25L9.14 7.47c-.23-.18-.49-.3-.76-.38-.32-.09-.66-.12-.99-.06h-.02c-1.23.22-2.05 1.39-1.84 2.61l1.35 5.92C7.16 16.98 8.39 18 9.83 18h6.85l3.82 3 1.5-1.5-5.77-4.5z"/></g>
-<g id="airline-seat-recline-normal"><path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3zm14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5L20 20.07z"/></g>
-<g id="bluetooth-audio"><path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-1.48-5.19zm-3.82 1L10 2H9v7.59L4.41 5 3 6.41 8.59 12 3 17.59 4.41 19 9 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM11 5.83l1.88 1.88L11 9.59V5.83zm1.88 10.46L11 18.17v-3.76l1.88 1.88z"/></g>
-<g id="confirmation-number"><path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2zm-9 7.5h-2v-2h2v2zm0-4.5h-2v-2h2v2zm0-4.5h-2v-2h2v2z"/></g>
-<g id="disc-full"><path d="M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
-<g id="do-not-disturb"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"/></g>
-<g id="do-not-disturb-alt"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM4 12c0-4.4 3.6-8 8-8 1.8 0 3.5.6 4.9 1.7L5.7 16.9C4.6 15.5 4 13.8 4 12zm8 8c-1.8 0-3.5-.6-4.9-1.7L18.3 7.1C19.4 8.5 20 10.2 20 12c0 4.4-3.6 8-8 8z"/></g>
-<g id="drive-eta"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"/></g>
-<g id="enhanced-encryption"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM16 16h-3v3h-2v-3H8v-2h3v-3h2v3h3v2z"/></g>
-<g id="event-available"><path d="M16.53 11.06L15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17l5.94-5.94zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"/></g>
-<g id="event-busy"><path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"/></g>
-<g id="event-note"><path d="M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"/></g>
-<g id="folder-special"><path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24.78 3.33z"/></g>
-<g id="live-tv"><path d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"/></g>
-<g id="mms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 14l3.5-4.5 2.5 3.01L14.5 8l4.5 6H5z"/></g>
-<g id="more"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
-<g id="network-check"><path d="M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5zM1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9zm20 2l2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75zm-4 4l2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97zM5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88z"/></g>
-<g id="network-locked"><path d="M19.5 10c.17 0 .33.03.5.05V1L1 20h13v-3c0-.89.39-1.68 1-2.23v-.27c0-2.48 2.02-4.5 4.5-4.5zm2.5 6v-1.5c0-1.38-1.12-2.5-2.5-2.5S17 13.12 17 14.5V16c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1zm-1 0h-3v-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V16z"/></g>
-<g id="no-encryption"><path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H9.66L20 18.34V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5-2.56 0-4.64 1.93-4.94 4.4L8.9 7.24V6z"/></g>
-<g id="ondemand-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-6l-7 4V7z"/></g>
-<g id="personal-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/></g>
-<g id="phone-bluetooth-speaker"><path d="M14.71 9.5L17 7.21V11h.5l2.85-2.85L18.21 6l2.15-2.15L17.5 1H17v3.79L14.71 2.5l-.71.71L16.79 6 14 8.79l.71.71zM18 2.91l.94.94-.94.94V2.91zm0 4.3l.94.94-.94.94V7.21zm2 8.29c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"/></g>
-<g id="phone-forwarded"><path d="M18 11l5-5-5-5v3h-4v4h4v3zm2 4.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"/></g>
-<g id="phone-in-talk"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 12h2c0-4.97-4.03-9-9-9v2c3.87 0 7 3.13 7 7zm-4 0h2c0-2.76-2.24-5-5-5v2c1.66 0 3 1.34 3 3z"/></g>
-<g id="phone-locked"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM20 4v-.5C20 2.12 18.88 1 17.5 1S15 2.12 15 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4z"/></g>
-<g id="phone-missed"><path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71s.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73 1.6 0 3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.67 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.12-.52-.3-.7z"/></g>
-<g id="phone-paused"><path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 3v7h2V3h-2z"/></g>
-<g id="power"><path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"/></g>
-<g id="rv-hookup"><path d="M20 17v-6c0-1.1-.9-2-2-2H7V7l-3 3 3 3v-2h4v3H4v3c0 1.1.9 2 2 2h2c0 1.66 1.34 3 3 3s3-1.34 3-3h8v-2h-2zm-9 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm7-6h-4v-3h4v3zM17 2v2H9v2h8v2l3-3z"/></g>
-<g id="sd-card"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/></g>
-<g id="sim-card-alert"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"/></g>
-<g id="sms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></g>
-<g id="sms-failed"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/></g>
-<g id="sync"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></g>
-<g id="sync-disabled"><path d="M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33zm-7.14-.94l2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14 2.86 5.41zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64L20 4z"/></g>
-<g id="sync-problem"><path d="M3 12c0 2.21.91 4.2 2.36 5.64L3 20h6v-6l-2.24 2.24C5.68 15.15 5 13.66 5 12c0-2.61 1.67-4.83 4-5.65V4.26C5.55 5.15 3 8.27 3 12zm8 5h2v-2h-2v2zM21 4h-6v6l2.24-2.24C18.32 8.85 19 10.34 19 12c0 2.61-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74 0-2.21-.91-4.2-2.36-5.64L21 4zm-10 9h2V7h-2v6z"/></g>
-<g id="system-update"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14zm-1-6h-3V8h-2v5H8l4 4 4-4z"/></g>
-<g id="tap-and-play"><path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2 .9-2 2v7.37c.69.16 1.36.37 2 .64V5h10v13h-3.03c.52 1.25.84 2.59.95 4H17c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"/></g>
-<g id="time-to-leave"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"/></g>
-<g id="vibration"><path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5zM16 19H8V5h8v14z"/></g>
-<g id="voice-chat"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12l-4-3.2V14H6V6h8v3.2L18 6v8z"/></g>
-<g id="vpn-lock"><path d="M22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4zm-2.28 8c.04.33.08.66.08 1 0 2.08-.8 3.97-2.1 5.39-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H7v-2h2c.55 0 1-.45 1-1V8h2c1.1 0 2-.9 2-2V3.46c-.95-.3-1.95-.46-3-.46C5.48 3 1 7.48 1 13s4.48 10 10 10 10-4.48 10-10c0-.34-.02-.67-.05-1h-2.03zM10 20.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L8 16v1c0 1.1.9 2 2 2v1.93z"/></g>
-<g id="wc"><path d="M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"/></g>
-<g id="wifi"><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/places-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/places-icons.html
deleted file mode 100644
index 5084b8c54d2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/places-icons.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="places" size="24">
-<svg><defs>
-<g id="ac-unit"><path d="M22 11h-4.17l3.24-3.24-1.41-1.42L15 11h-2V9l4.66-4.66-1.42-1.41L13 6.17V2h-2v4.17L7.76 2.93 6.34 4.34 11 9v2H9L4.34 6.34 2.93 7.76 6.17 11H2v2h4.17l-3.24 3.24 1.41 1.42L9 13h2v2l-4.66 4.66 1.42 1.41L11 17.83V22h2v-4.17l3.24 3.24 1.42-1.41L13 15v-2h2l4.66 4.66 1.41-1.42L17.83 13H22z"/></g>
-<g id="airport-shuttle"><path d="M17 5H3c-1.1 0-2 .89-2 2v9h2c0 1.65 1.34 3 3 3s3-1.35 3-3h5.5c0 1.65 1.34 3 3 3s3-1.35 3-3H23v-5l-6-6zM3 11V7h4v4H3zm3 6.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7-6.5H9V7h4v4zm4.5 6.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM15 11V7h1l4 4h-5z"/></g>
-<g id="all-inclusive"><path d="M18.6 6.62c-1.44 0-2.8.56-3.77 1.53L12 10.66 10.48 12h.01L7.8 14.39c-.64.64-1.49.99-2.4.99-1.87 0-3.39-1.51-3.39-3.38S3.53 8.62 5.4 8.62c.91 0 1.76.35 2.44 1.03l1.13 1 1.51-1.34L9.22 8.2C8.2 7.18 6.84 6.62 5.4 6.62 2.42 6.62 0 9.04 0 12s2.42 5.38 5.4 5.38c1.44 0 2.8-.56 3.77-1.53l2.83-2.5.01.01L13.52 12h-.01l2.69-2.39c.64-.64 1.49-.99 2.4-.99 1.87 0 3.39 1.51 3.39 3.38s-1.52 3.38-3.39 3.38c-.9 0-1.76-.35-2.44-1.03l-1.14-1.01-1.51 1.34 1.27 1.12c1.02 1.01 2.37 1.57 3.82 1.57 2.98 0 5.4-2.41 5.4-5.38s-2.42-5.37-5.4-5.37z"/></g>
-<g id="beach-access"><path d="M13.127 14.56l1.43-1.43 6.44 6.443L19.57 21zm4.293-5.73l2.86-2.86c-3.95-3.95-10.35-3.96-14.3-.02 3.93-1.3 8.31-.25 11.44 2.88zM5.95 5.98c-3.94 3.95-3.93 10.35.02 14.3l2.86-2.86C5.7 14.29 4.65 9.91 5.95 5.98zm.02-.02l-.01.01c-.38 3.01 1.17 6.88 4.3 10.02l5.73-5.73c-3.13-3.13-7.01-4.68-10.02-4.3z"/></g>
-<g id="business-center"><path d="M10 16v-1H3.01L3 19c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2v-4h-7v1h-4zm10-9h-4.01V5l-2-2h-4l-2 2v2H4c-1.1 0-2 .9-2 2v3c0 1.11.89 2 2 2h6v-2h4v2h6c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-6 0h-4V5h4v2z"/></g>
-<g id="casino"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM7.5 18c-.83 0-1.5-.67-1.5-1.5S6.67 15 7.5 15s1.5.67 1.5 1.5S8.33 18 7.5 18zm0-9C6.67 9 6 8.33 6 7.5S6.67 6 7.5 6 9 6.67 9 7.5 8.33 9 7.5 9zm4.5 4.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5 4.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm0-9c-.83 0-1.5-.67-1.5-1.5S15.67 6 16.5 6s1.5.67 1.5 1.5S17.33 9 16.5 9z"/></g>
-<g id="child-care"><circle cx="14.5" cy="10.5" r="1.25"/><circle cx="9.5" cy="10.5" r="1.25"/><path d="M22.94 12.66c.04-.21.06-.43.06-.66s-.02-.45-.06-.66c-.25-1.51-1.36-2.74-2.81-3.17-.53-1.12-1.28-2.1-2.19-2.91C16.36 3.85 14.28 3 12 3s-4.36.85-5.94 2.26c-.92.81-1.67 1.8-2.19 2.91-1.45.43-2.56 1.65-2.81 3.17-.04.21-.06.43-.06.66s.02.45.06.66c.25 1.51 1.36 2.74 2.81 3.17.52 1.11 1.27 2.09 2.17 2.89C7.62 20.14 9.71 21 12 21s4.38-.86 5.97-2.28c.9-.8 1.65-1.79 2.17-2.89 1.44-.43 2.55-1.65 2.8-3.17zM19 14c-.1 0-.19-.02-.29-.03-.2.67-.49 1.29-.86 1.86C16.6 17.74 14.45 19 12 19s-4.6-1.26-5.85-3.17c-.37-.57-.66-1.19-.86-1.86-.1.01-.19.03-.29.03-1.1 0-2-.9-2-2s.9-2 2-2c.1 0 .19.02.29.03.2-.67.49-1.29.86-1.86C7.4 6.26 9.55 5 12 5s4.6 1.26 5.85 3.17c.37.57.66 1.19.86 1.86.1-.01.19-.03.29-.03 1.1 0 2 .9 2 2s-.9 2-2 2zM7.5 14c.76 1.77 2.49 3 4.5 3s3.74-1.23 4.5-3h-9z"/></g>
-<g id="child-friendly"><path d="M13 2v8h8c0-4.42-3.58-8-8-8zm6.32 13.89C20.37 14.54 21 12.84 21 11H6.44l-.95-2H2v2h2.22s1.89 4.07 2.12 4.42c-1.1.59-1.84 1.75-1.84 3.08C4.5 20.43 6.07 22 8 22c1.76 0 3.22-1.3 3.46-3h2.08c.24 1.7 1.7 3 3.46 3 1.93 0 3.5-1.57 3.5-3.5 0-1.04-.46-1.97-1.18-2.61zM8 20c-.83 0-1.5-.67-1.5-1.5S7.17 17 8 17s1.5.67 1.5 1.5S8.83 20 8 20zm9 0c-.83 0-1.5-.67-1.5-1.5S16.17 17 17 17s1.5.67 1.5 1.5S17.83 20 17 20z"/></g>
-<g id="fitness-center"><path d="M20.57 14.86L22 13.43 20.57 12 17 15.57 8.43 7 12 3.43 10.57 2 9.14 3.43 7.71 2 5.57 4.14 4.14 2.71 2.71 4.14l1.43 1.43L2 7.71l1.43 1.43L2 10.57 3.43 12 7 8.43 15.57 17 12 20.57 13.43 22l1.43-1.43L16.29 22l2.14-2.14 1.43 1.43 1.43-1.43-1.43-1.43L22 16.29z"/></g>
-<g id="free-breakfast"><path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"/></g>
-<g id="golf-course"><circle cx="19.5" cy="19.5" r="1.5"/><path d="M17 5.92L9 2v18H7v-1.73c-1.79.35-3 .99-3 1.73 0 1.1 2.69 2 6 2s6-.9 6-2c0-.99-2.16-1.81-5-1.97V8.98l6-3.06z"/></g>
-<g id="hot-tub"><circle cx="7" cy="6" r="2"/><path d="M11.15 12c-.31-.22-.59-.46-.82-.72l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C6.01 9 5 10.01 5 11.25V12H2v8c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-8H11.15zM7 20H5v-6h2v6zm4 0H9v-6h2v6zm4 0h-2v-6h2v6zm4 0h-2v-6h2v6zm-.35-14.14l-.07-.07c-.57-.62-.82-1.41-.67-2.2L18 3h-1.89l-.06.43c-.2 1.36.27 2.71 1.3 3.72l.07.06c.57.62.82 1.41.67 2.2l-.11.59h1.91l.06-.43c.21-1.36-.27-2.71-1.3-3.71zm-4 0l-.07-.07c-.57-.62-.82-1.41-.67-2.2L14 3h-1.89l-.06.43c-.2 1.36.27 2.71 1.3 3.72l.07.06c.57.62.82 1.41.67 2.2l-.11.59h1.91l.06-.43c.21-1.36-.27-2.71-1.3-3.71z"/></g>
-<g id="kitchen"><path d="M18 2.01L6 2c-1.1 0-2 .89-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.11-.9-1.99-2-1.99zM18 20H6v-9.02h12V20zm0-11H6V4h12v5zM8 5h2v3H8zm0 7h2v5H8z"/></g>
-<g id="pool"><path d="M22 21c-1.11 0-1.73-.37-2.18-.64-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.46.27-1.07.64-2.18.64s-1.73-.37-2.18-.64c-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.46.27-1.08.64-2.19.64-1.11 0-1.73-.37-2.18-.64-.37-.23-.6-.36-1.15-.36s-.78.13-1.15.36c-.46.27-1.08.64-2.19.64v-2c.56 0 .78-.13 1.15-.36.46-.27 1.08-.64 2.19-.64s1.73.37 2.18.64c.37.23.59.36 1.15.36.56 0 .78-.13 1.15-.36.46-.27 1.08-.64 2.19-.64 1.11 0 1.73.37 2.18.64.37.22.6.36 1.15.36s.78-.13 1.15-.36c.45-.27 1.07-.64 2.18-.64s1.73.37 2.18.64c.37.23.59.36 1.15.36v2zm0-4.5c-1.11 0-1.73-.37-2.18-.64-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.45.27-1.07.64-2.18.64s-1.73-.37-2.18-.64c-.37-.22-.6-.36-1.15-.36-.56 0-.78.13-1.15.36-.45.27-1.07.64-2.18.64s-1.73-.37-2.18-.64c-.37-.22-.6-.36-1.15-.36s-.78.13-1.15.36c-.47.27-1.09.64-2.2.64v-2c.56 0 .78-.13 1.15-.36.45-.27 1.07-.64 2.18-.64s1.73.37 2.18.64c.37.22.6.36 1.15.36.56 0 .78-.13 1.15-.36.45-.27 1.07-.64 2.18-.64s1.73.37 2.18.64c.37.22.6.36 1.15.36s.78-.13 1.15-.36c.45-.27 1.07-.64 2.18-.64s1.73.37 2.18.64c.37.22.6.36 1.15.36v2zM8.67 12c.56 0 .78-.13 1.15-.36.46-.27 1.08-.64 2.19-.64 1.11 0 1.73.37 2.18.64.37.22.6.36 1.15.36s.78-.13 1.15-.36c.12-.07.26-.15.41-.23L10.48 5C8.93 3.45 7.5 2.99 5 3v2.5c1.82-.01 2.89.39 4 1.5l1 1-3.25 3.25c.31.12.56.27.77.39.37.23.59.36 1.15.36z"/><circle cx="16.5" cy="5.5" r="2.5"/></g>
-<g id="room-service"><path d="M2 17h20v2H2zm11.84-9.21c.1-.24.16-.51.16-.79 0-1.1-.9-2-2-2s-2 .9-2 2c0 .28.06.55.16.79C6.25 8.6 3.27 11.93 3 16h18c-.27-4.07-3.25-7.4-7.16-8.21z"/></g>
-<g id="smoke-free"><path d="M2 6l6.99 7H2v3h9.99l7 7 1.26-1.25-17-17zm18.5 7H22v3h-1.5zM18 13h1.5v3H18zm.85-8.12c.62-.61 1-1.45 1-2.38h-1.5c0 1.02-.83 1.85-1.85 1.85v1.5c2.24 0 4 1.83 4 4.07V12H22V9.92c0-2.23-1.28-4.15-3.15-5.04zM14.5 8.7h1.53c1.05 0 1.97.74 1.97 2.05V12h1.5v-1.59c0-1.8-1.6-3.16-3.47-3.16H14.5c-1.02 0-1.85-.98-1.85-2s.83-1.75 1.85-1.75V2c-1.85 0-3.35 1.5-3.35 3.35s1.5 3.35 3.35 3.35zm2.5 7.23V13h-2.93z"/></g>
-<g id="smoking-rooms"><path d="M2 16h15v3H2zm18.5 0H22v3h-1.5zM18 16h1.5v3H18zm.85-8.27c.62-.61 1-1.45 1-2.38C19.85 3.5 18.35 2 16.5 2v1.5c1.02 0 1.85.83 1.85 1.85S17.52 7.2 16.5 7.2v1.5c2.24 0 4 1.83 4 4.07V15H22v-2.24c0-2.22-1.28-4.14-3.15-5.03zm-2.82 2.47H14.5c-1.02 0-1.85-.98-1.85-2s.83-1.75 1.85-1.75v-1.5c-1.85 0-3.35 1.5-3.35 3.35s1.5 3.35 3.35 3.35h1.53c1.05 0 1.97.74 1.97 2.05V15h1.5v-1.64c0-1.81-1.6-3.16-3.47-3.16z"/></g>
-<g id="spa"><path d="M8.55 12c-1.07-.71-2.25-1.27-3.53-1.61 1.28.34 2.46.9 3.53 1.61zm10.43-1.61c-1.29.34-2.49.91-3.57 1.64 1.08-.73 2.28-1.3 3.57-1.64z"/><path d="M15.49 9.63c-.18-2.79-1.31-5.51-3.43-7.63-2.14 2.14-3.32 4.86-3.55 7.63 1.28.68 2.46 1.56 3.49 2.63 1.03-1.06 2.21-1.94 3.49-2.63zm-6.5 2.65c-.14-.1-.3-.19-.45-.29.15.11.31.19.45.29zm6.42-.25c-.13.09-.27.16-.4.26.13-.1.27-.17.4-.26zM12 15.45C9.85 12.17 6.18 10 2 10c0 5.32 3.36 9.82 8.03 11.49.63.23 1.29.4 1.97.51.68-.12 1.33-.29 1.97-.51C18.64 19.82 22 15.32 22 10c-4.18 0-7.85 2.17-10 5.45z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/social-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-icons/social-icons.html
deleted file mode 100644
index 8848395ef9c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-icons/social-icons.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-<iron-iconset-svg name="social" size="24">
-<svg><defs>
-<g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g>
-<g id="domain"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/></g>
-<g id="group"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></g>
-<g id="group-add"><path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.14zm-5 0c1.66 0 2.99-1.34 2.99-3S14.66 5 13 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm6.62 2.16c.83.73 1.38 1.66 1.38 2.84v2h3v-2c0-1.54-2.37-2.49-4.38-2.84zM13 13c-2 0-6 1-6 3v2h12v-2c0-2-4-3-6-3z"/></g>
-<g id="location-city"><path d="M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"/></g>
-<g id="mood"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
-<g id="mood-bad"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 3c-2.33 0-4.31 1.46-5.11 3.5h10.22c-.8-2.04-2.78-3.5-5.11-3.5z"/></g>
-<g id="notifications"><path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"/></g>
-<g id="notifications-active"><path d="M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"/></g>
-<g id="notifications-none"><path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"/></g>
-<g id="notifications-off"><path d="M20 18.69L7.84 6.14 5.27 3.49 4 4.76l2.8 2.8v.01c-.52.99-.8 2.16-.8 3.42v5l-2 2v1h13.73l2 2L21 19.72l-1-1.03zM12 22c1.11 0 2-.89 2-2h-4c0 1.11.89 2 2 2zm6-7.32V11c0-3.08-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.15.03-.29.08-.42.12-.1.03-.2.07-.3.11h-.01c-.01 0-.01 0-.02.01-.23.09-.46.2-.68.31 0 0-.01 0-.01.01L18 14.68z"/></g>
-<g id="notifications-paused"><path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.93 6 11v5l-2 2v1h16v-1l-2-2zm-3.5-6.2l-2.8 3.4h2.8V15h-5v-1.8l2.8-3.4H9.5V8h5v1.8z"/></g>
-<g id="pages"><path d="M3 5v6h5L7 7l4 1V3H5c-1.1 0-2 .9-2 2zm5 8H3v6c0 1.1.9 2 2 2h6v-5l-4 1 1-4zm9 4l-4-1v5h6c1.1 0 2-.9 2-2v-6h-5l1 4zm2-14h-6v5l4-1-1 4h5V5c0-1.1-.9-2-2-2z"/></g>
-<g id="party-mode"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 3c1.63 0 3.06.79 3.98 2H12c-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H7.1c-.06-.32-.1-.66-.1-1 0-2.76 2.24-5 5-5zm0 10c-1.63 0-3.06-.79-3.98-2H12c1.66 0 3-1.34 3-3 0-.35-.07-.69-.18-1h2.08c.07.32.1.66.1 1 0 2.76-2.24 5-5 5z"/></g>
-<g id="people"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></g>
-<g id="people-outline"><path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.75 5-1.75s5 1.21 5 1.75v1.25zm9 0H14v-1.25c0-.46-.2-.86-.52-1.22.88-.3 1.96-.53 3.02-.53 2.44 0 5 1.21 5 1.75v1.25zM7.5 12c1.93 0 3.5-1.57 3.5-3.5S9.43 5 7.5 5 4 6.57 4 8.5 5.57 12 7.5 12zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 5.5c1.93 0 3.5-1.57 3.5-3.5S18.43 5 16.5 5 13 6.57 13 8.5s1.57 3.5 3.5 3.5zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z"/></g>
-<g id="person"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></g>
-<g id="person-add"><path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></g>
-<g id="person-outline"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"/></g>
-<g id="plus-one"><path d="M10 8H8v4H4v2h4v4h2v-4h4v-2h-4zm4.5-1.92V7.9l2.5-.5V18h2V5z"/></g>
-<g id="poll"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
-<g id="public"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></g>
-<g id="school"><path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/></g>
-<g id="share"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/></g>
-<g id="whatshot"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.bower.json
deleted file mode 100644
index b142eb2262c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.bower.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "iron-iconset-svg",
- "description": "Manages a set of svg icons",
- "version": "1.0.9",
- "keywords": [
- "web-components",
- "polymer",
- "icon"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-iconset-svg.git"
- },
- "dependencies": {
- "polymer": "polymer/polymer#^1.0.0",
- "iron-meta": "polymerelements/iron-meta#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-icon": "polymerelements/iron-icon#^1.0.0",
- "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "*"
- },
- "main": "iron-iconset-svg.html",
- "homepage": "https://github.com/polymerelements/iron-iconset-svg",
- "_release": "1.0.9",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.9",
- "commit": "ce9b2ea1f73d936cffdd05f3fe34b1f69d1d32db"
- },
- "_source": "git://github.com/polymerelements/iron-iconset-svg.git",
- "_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-iconset-svg"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.travis.yml
deleted file mode 100644
index d4e78c40f20..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: node_js
-sudo: false
-matrix:
- include:
- - node_js: stable
- script: xvfb-run wct
- addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- - node_js: node
- script:
- - |
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
- wct -s 'default'
- fi
-before_script:
-- npm install web-component-tester
-- npm install bower
-- export PATH=$PWD/node_modules/.bin:$PATH
-- bower install
-env:
- global:
- - secure: UR1rxThVZH+l6fFHhAlgNIWs9wHmC5A102oAQBtCuQqKiXPZCDAPQHdjufX8z6hH93JkR+Esh2VPv0baSXFrHteKTRN6bsNDTMFDdHJ5BiRAdhVoV6bsdNH2GTgRXQ+ACMgrh4sXLA5+2Z+JGq7m0zaHehDfNZqmo/1U59qImP8=
- - secure: PmWDypBdjKlUGPn9UoBEkjoYiyJFQGe2QiACmdOgueOLSLeA6xW+/1521uFIBHpwuWn29mxVYv5gS1D8hafWhZdXn4OYQl550RrT092jXIO6+mMKZXPmUaKCkPMY6QYJJ5j9ZOC36KgF//IpoE7OCxpLReYOD2KBR3mhw0jOYJA=
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/README.md
deleted file mode 100644
index f5b7e563e34..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-iconset-svg.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/iron-iconset-svg.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-iconset-svg)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-iconset-svg)_
-
-
-##&lt;iron-iconset-svg&gt;
-
-
-The `iron-iconset-svg` element allows users to define their own icon sets
-that contain svg icons. The svg icon elements should be children of the
-`iron-iconset-svg` element. Multiple icons should be given distinct id's.
-
-Using svg elements to create icons has a few advantages over traditional
-bitmap graphics like jpg or png. Icons that use svg are vector based so
-they are resolution independent and should look good on any device. They
-are stylable via css. Icons can be themed, colorized, and even animated.
-
-Example:
-
- <iron-iconset-svg name="my-svg-icons" size="24">
- <svg>
- <defs>
- <g id="shape">
- <rect x="50" y="50" width="50" height="50" />
- <circle cx="50" cy="50" r="50" />
- </g>
- </defs>
- </svg>
- </iron-iconset-svg>
-
-This will automatically register the icon set "my-svg-icons" to the iconset
-database. To use these icons from within another element, make a
-`iron-iconset` element and call the `byId` method
-to retrieve a given iconset. To apply a particular icon inside an
-element use the `applyIcon` method. For example:
-
- iconset.applyIcon(iconNode, 'car');
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/bower.json
deleted file mode 100644
index 8467a3b7e5d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "iron-iconset-svg",
- "description": "Manages a set of svg icons",
- "version": "1.0.9",
- "keywords": [
- "web-components",
- "polymer",
- "icon"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-iconset-svg.git"
- },
- "dependencies": {
- "polymer": "polymer/polymer#^1.0.0",
- "iron-meta": "polymerelements/iron-meta#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-icon": "polymerelements/iron-icon#^1.0.0",
- "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "*"
- },
- "main": "iron-iconset-svg.html"
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/index.html
deleted file mode 100644
index 53b291aa357..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-iconset-svg</title>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link href="../../paper-styles/demo-pages.html" rel="import">
-
- <link rel="import" href="svg-sample-icons.html">
- <style is="custom-style">
-
- .centered {
- text-align: center;
- }
-
- iron-icon {
- height: 64px;
- width: 64px;
- margin: auto 1em;
- }
-
- iron-icon:nth-of-type(1) {
- fill: orange;
- }
-
- iron-icon:nth-of-type(2) {
- fill: green;
- }
-
- iron-icon:nth-of-type(3) {
- fill: navy;
- }
-
- iron-icon:nth-of-type(4) {
- fill: red;
- }
-
- iron-icon {
- transition: all 0.5s;
- -webkit-transition: all 0.5s;
- }
-
- iron-icon:hover {
- -webkit-filter: drop-shadow( 2px 2px 2px var(--google-grey-700) );
- filter: drop-shadow( 2px 2px 2px var(--google-grey-700) );
- }
- </style>
-</head>
-<body>
-
- <div class="vertical-section vertical-section-container centered">
- <iron-icon icon="svg-sample-icons:codepen"></iron-icon>
- <iron-icon icon="svg-sample-icons:twitter"></iron-icon>
- <iron-icon icon="svg-sample-icons:youtube"></iron-icon>
- <iron-icon icon="inline:shape"></iron-icon>
- </div>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/svg-sample-icons.html b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/svg-sample-icons.html
deleted file mode 100644
index 3eed843f098..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/demo/svg-sample-icons.html
+++ /dev/null
@@ -1,81 +0,0 @@
-
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-iconset-svg.html">
-
-<iron-iconset-svg name="svg-sample-icons" size="100">
- <svg>
- <defs>
- <g id="codepen">
- <path class="outer-ring" d="M50,0C22.385,0,0,22.385,0,50c0,27.615,22.385,50,50,50c27.614,0,50-22.385,50-50C100,22.385,77.615,0,50,0z M50,91.789
- C26.958,91.789,8.212,73.042,8.212,50C8.212,26.958,26.958,8.212,50,8.212c23.042,0,41.788,18.747,41.788,41.789
- C91.788,73.042,73.042,91.789,50,91.789z"></path>
- <path class="inner-logo" d="M80.893,40.234c-0.006-0.039-0.016-0.076-0.022-0.115c-0.013-0.075-0.027-0.15-0.046-0.223
- c-0.012-0.044-0.028-0.086-0.042-0.128c-0.021-0.065-0.042-0.13-0.068-0.193c-0.018-0.044-0.039-0.088-0.059-0.13
- c-0.028-0.06-0.057-0.119-0.09-0.175c-0.024-0.042-0.051-0.083-0.076-0.124c-0.036-0.055-0.073-0.109-0.112-0.161
- c-0.029-0.039-0.06-0.078-0.091-0.115c-0.042-0.049-0.086-0.098-0.132-0.143c-0.035-0.036-0.069-0.072-0.106-0.104
- c-0.049-0.044-0.099-0.086-0.15-0.127c-0.04-0.031-0.079-0.062-0.12-0.091c-0.016-0.01-0.029-0.023-0.044-0.033L51.474,19.531
- c-0.893-0.595-2.055-0.595-2.947,0L20.267,38.371c-0.015,0.01-0.028,0.023-0.044,0.033c-0.042,0.029-0.081,0.06-0.12,0.091
- c-0.052,0.041-0.102,0.083-0.15,0.127c-0.037,0.032-0.071,0.068-0.106,0.104c-0.046,0.045-0.09,0.094-0.132,0.143
- c-0.031,0.038-0.062,0.077-0.092,0.115c-0.039,0.052-0.076,0.106-0.111,0.161c-0.027,0.041-0.052,0.082-0.076,0.124
- c-0.033,0.057-0.062,0.115-0.09,0.175c-0.021,0.042-0.042,0.086-0.06,0.13c-0.026,0.063-0.047,0.128-0.068,0.193
- c-0.014,0.042-0.029,0.084-0.042,0.128c-0.02,0.073-0.032,0.148-0.046,0.223c-0.006,0.039-0.016,0.076-0.021,0.115
- c-0.016,0.114-0.024,0.229-0.024,0.346V59.42c0,0.117,0.009,0.233,0.024,0.348c0.005,0.038,0.015,0.077,0.021,0.114
- c0.014,0.075,0.027,0.149,0.046,0.223c0.012,0.043,0.028,0.086,0.042,0.128c0.021,0.065,0.042,0.13,0.068,0.195
- c0.018,0.044,0.039,0.086,0.06,0.129c0.028,0.06,0.058,0.118,0.09,0.177c0.024,0.041,0.049,0.082,0.076,0.122
- c0.035,0.056,0.072,0.109,0.111,0.161c0.029,0.041,0.061,0.078,0.092,0.115c0.042,0.049,0.086,0.098,0.132,0.144
- c0.035,0.036,0.069,0.071,0.106,0.104c0.048,0.044,0.099,0.086,0.15,0.127c0.039,0.031,0.078,0.062,0.12,0.091
- c0.016,0.01,0.029,0.023,0.044,0.032l28.259,18.84c0.446,0.297,0.96,0.447,1.474,0.447c0.513,0,1.027-0.149,1.473-0.447
- l28.259-18.84c0.015-0.009,0.028-0.022,0.044-0.032c0.042-0.029,0.081-0.06,0.12-0.091c0.051-0.041,0.102-0.083,0.15-0.127
- c0.037-0.033,0.071-0.068,0.106-0.104c0.046-0.046,0.09-0.095,0.132-0.144c0.031-0.037,0.062-0.075,0.091-0.115
- c0.04-0.052,0.076-0.105,0.112-0.161c0.025-0.041,0.051-0.081,0.076-0.122c0.033-0.059,0.062-0.117,0.09-0.177
- c0.02-0.042,0.041-0.085,0.059-0.129c0.026-0.065,0.047-0.13,0.068-0.195c0.014-0.042,0.03-0.085,0.042-0.128
- c0.02-0.074,0.033-0.148,0.046-0.223c0.006-0.037,0.016-0.076,0.022-0.114c0.014-0.115,0.023-0.231,0.023-0.348V40.581
- C80.916,40.464,80.907,40.348,80.893,40.234z M52.657,26.707l20.817,13.877l-9.298,6.221l-11.519-7.706V26.707z M47.343,26.707
- v12.393l-11.518,7.706l-9.299-6.221L47.343,26.707z M24.398,45.554L31.046,50l-6.648,4.446V45.554z M47.343,73.294L26.525,59.417
- l9.299-6.219l11.518,7.704V73.294z M50,56.286L40.603,50L50,43.715L59.397,50L50,56.286z M52.657,73.294V60.902l11.519-7.704
- l9.298,6.219L52.657,73.294z M75.602,54.447L68.955,50l6.647-4.446V54.447z"></path>
- </g>
-
- <path id="twitter" d="M100.001,17.942c-3.681,1.688-7.633,2.826-11.783,3.339
- c4.236-2.624,7.49-6.779,9.021-11.73c-3.965,2.432-8.354,4.193-13.026,5.146C80.47,10.575,75.138,8,69.234,8
- c-11.33,0-20.518,9.494-20.518,21.205c0,1.662,0.183,3.281,0.533,4.833c-17.052-0.884-32.168-9.326-42.288-22.155
- c-1.767,3.133-2.778,6.773-2.778,10.659c0,7.357,3.622,13.849,9.127,17.65c-3.363-0.109-6.525-1.064-9.293-2.651
- c-0.002,0.089-0.002,0.178-0.002,0.268c0,10.272,7.072,18.845,16.458,20.793c-1.721,0.484-3.534,0.744-5.405,0.744
- c-1.322,0-2.606-0.134-3.859-0.379c2.609,8.424,10.187,14.555,19.166,14.726c-7.021,5.688-15.867,9.077-25.48,9.077
- c-1.656,0-3.289-0.102-4.895-0.297C9.08,88.491,19.865,92,31.449,92c37.737,0,58.374-32.312,58.374-60.336
- c0-0.92-0.02-1.834-0.059-2.743C93.771,25.929,97.251,22.195,100.001,17.942L100.001,17.942z"></path>
-
- <g id="youtube">
- <path class="youtube" d="M98.77,27.492c-1.225-5.064-5.576-8.799-10.811-9.354C75.561,16.818,63.01,15.993,50.514,16
- c-12.495-0.007-25.045,0.816-37.446,2.139c-5.235,0.557-9.583,4.289-10.806,9.354C0.522,34.704,0.5,42.574,0.5,50.001
- c0,7.426,0,15.296,1.741,22.509c1.224,5.061,5.572,8.799,10.807,9.352c12.399,1.32,24.949,2.145,37.446,2.14
- c12.494,0.005,25.047-0.817,37.443-2.14c5.234-0.555,9.586-4.291,10.81-9.352c1.741-7.213,1.753-15.083,1.753-22.509
- S100.51,34.704,98.77,27.492 M67.549,52.203L43.977,64.391c-2.344,1.213-4.262,0.119-4.262-2.428V38.036
- c0-2.548,1.917-3.644,4.262-2.429l23.572,12.188C69.896,49.008,69.896,50.992,67.549,52.203"></path>
- </g>
-
- </defs>
-
- </svg>
-</iron-iconset-svg>
-
-<iron-iconset-svg name="inline" size="24">
- <svg>
- <defs>
- <g id="shape">
- <rect x="12" y="0" width="12" height="24" />
- <circle cx="12" cy="12" r="12" />
- </g>
- </defs>
- </svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/index.html
deleted file mode 100644
index e871f17d98d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/iron-iconset-svg.html b/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/iron-iconset-svg.html
deleted file mode 100644
index 5bd143ad6b6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-iconset-svg/iron-iconset-svg.html
+++ /dev/null
@@ -1,194 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-meta/iron-meta.html">
-
-<script>
- /**
- * The `iron-iconset-svg` element allows users to define their own icon sets
- * that contain svg icons. The svg icon elements should be children of the
- * `iron-iconset-svg` element. Multiple icons should be given distinct id's.
- *
- * Using svg elements to create icons has a few advantages over traditional
- * bitmap graphics like jpg or png. Icons that use svg are vector based so
- * they are resolution independent and should look good on any device. They
- * are stylable via css. Icons can be themed, colorized, and even animated.
- *
- * Example:
- *
- * <iron-iconset-svg name="my-svg-icons" size="24">
- * <svg>
- * <defs>
- * <g id="shape">
- * <rect x="12" y="0" width="12" height="24" />
- * <circle cx="12" cy="12" r="12" />
- * </g>
- * </defs>
- * </svg>
- * </iron-iconset-svg>
- *
- * This will automatically register the icon set "my-svg-icons" to the iconset
- * database. To use these icons from within another element, make a
- * `iron-iconset` element and call the `byId` method
- * to retrieve a given iconset. To apply a particular icon inside an
- * element use the `applyIcon` method. For example:
- *
- * iconset.applyIcon(iconNode, 'car');
- *
- * @element iron-iconset-svg
- * @demo demo/index.html
- * @implements {Polymer.Iconset}
- */
- Polymer({
- is: 'iron-iconset-svg',
-
- properties: {
-
- /**
- * The name of the iconset.
- */
- name: {
- type: String,
- observer: '_nameChanged'
- },
-
- /**
- * The size of an individual icon. Note that icons must be square.
- */
- size: {
- type: Number,
- value: 24
- }
-
- },
-
- attached: function() {
- this.style.display = 'none';
- },
-
- /**
- * Construct an array of all icon names in this iconset.
- *
- * @return {!Array} Array of icon names.
- */
- getIconNames: function() {
- this._icons = this._createIconMap();
- return Object.keys(this._icons).map(function(n) {
- return this.name + ':' + n;
- }, this);
- },
-
- /**
- * Applies an icon to the given element.
- *
- * An svg icon is prepended to the element's shadowRoot if it exists,
- * otherwise to the element itself.
- *
- * @method applyIcon
- * @param {Element} element Element to which the icon is applied.
- * @param {string} iconName Name of the icon to apply.
- * @return {?Element} The svg element which renders the icon.
- */
- applyIcon: function(element, iconName) {
- // insert svg element into shadow root, if it exists
- element = element.root || element;
- // Remove old svg element
- this.removeIcon(element);
- // install new svg element
- var svg = this._cloneIcon(iconName);
- if (svg) {
- var pde = Polymer.dom(element);
- pde.insertBefore(svg, pde.childNodes[0]);
- return element._svgIcon = svg;
- }
- return null;
- },
-
- /**
- * Remove an icon from the given element by undoing the changes effected
- * by `applyIcon`.
- *
- * @param {Element} element The element from which the icon is removed.
- */
- removeIcon: function(element) {
- // Remove old svg element
- if (element._svgIcon) {
- Polymer.dom(element).removeChild(element._svgIcon);
- element._svgIcon = null;
- }
- },
-
- /**
- *
- * When name is changed, register iconset metadata
- *
- */
- _nameChanged: function() {
- new Polymer.IronMeta({type: 'iconset', key: this.name, value: this});
- this.async(function() {
- this.fire('iron-iconset-added', this, {node: window});
- });
- },
-
- /**
- * Create a map of child SVG elements by id.
- *
- * @return {!Object} Map of id's to SVG elements.
- */
- _createIconMap: function() {
- // Objects chained to Object.prototype (`{}`) have members. Specifically,
- // on FF there is a `watch` method that confuses the icon map, so we
- // need to use a null-based object here.
- var icons = Object.create(null);
- Polymer.dom(this).querySelectorAll('[id]')
- .forEach(function(icon) {
- icons[icon.id] = icon;
- });
- return icons;
- },
-
- /**
- * Produce installable clone of the SVG element matching `id` in this
- * iconset, or `undefined` if there is no matching element.
- *
- * @return {Element} Returns an installable clone of the SVG element
- * matching `id`.
- */
- _cloneIcon: function(id) {
- // create the icon map on-demand, since the iconset itself has no discrete
- // signal to know when it's children are fully parsed
- this._icons = this._icons || this._createIconMap();
- return this._prepareSvgClone(this._icons[id], this.size);
- },
-
- /**
- * @param {Element} sourceSvg
- * @param {number} size
- * @return {Element}
- */
- _prepareSvgClone: function(sourceSvg, size) {
- if (sourceSvg) {
- var content = sourceSvg.cloneNode(true),
- svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'),
- viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + size;
- svg.setAttribute('viewBox', viewBox);
- svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
- // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
- // TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
- svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
- svg.appendChild(content).removeAttribute('id');
- return svg;
- }
- return null;
- }
-
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/.github/ISSUE_TEMPLATE.md b/chromium/third_party/catapult/third_party/polymer/components/iron-image/.github/ISSUE_TEMPLATE.md
deleted file mode 100755
index d7459c59a5b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- Instructions: https://github.com/PolymerElements/iron-image/CONTRIBUTING.md#filing-issues -->
-### Description
-<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
-
-### Expected outcome
-
-<!-- Example: The page stays the same color. -->
-
-### Actual outcome
-
-<!-- Example: The page turns pink. -->
-
-### Live Demo
-<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
-
-### Steps to reproduce
-
-<!-- Example
-1. Put a `paper-foo` element in the page.
-2. Open the page in a web browser.
-3. Click the `paper-foo` element.
--->
-
-### Browsers Affected
-<!-- Check all that apply -->
-- [ ] Chrome
-- [ ] Firefox
-- [ ] Safari 9
-- [ ] Safari 8
-- [ ] Safari 7
-- [ ] Edge
-- [ ] IE 11
-- [ ] IE 10
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-image/.travis.yml
deleted file mode 100755
index 74afb74311c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: citR35FLXNRA4C4o5Gl7gb6yvFhOq3rTd9+IQ8i9Zcf2TV2Ip2wCNANNXOvJV8szsu2fhZLttSclpW+MVePsW3ORYWOVm9neZeTczzNZkUExRKOztAyaujzzIgRd+f5ClJOsjUfGVLWKKWgKMJ8UT4pNRgqwKe4V73oW7LhYpto=
- - secure: bWeuwHFJSBQu3v2K5I2++tCWh3K05I8NEfi6mywbrxuiOCGNvCWFLTO42+aqUp/yAnolNIKYR5NJFtty5CX2YD4oaRbryk2gzv7UtpIXRx9Jqhe7b/UBzfHIxPoT12TFS/iub+oRnZPAVPPoDrXwwoHkWltZHZwpOVTp86T6DPI=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-image/CONTRIBUTING.md
deleted file mode 100755
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-image/README.md
deleted file mode 100755
index 379796269f0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-image.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-image.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-image)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-image)_
-
-
-##&lt;iron-image&gt;
-
-`iron-image` is an element for displaying an image that provides useful sizing and
-preloading options not found on the standard `<img>` tag.
-
-The `sizing` option allows the image to be either cropped (`cover`) or
-letterboxed (`contain`) to fill a fixed user-size placed on the element.
-
-The `preload` option prevents the browser from rendering the image until the
-image is fully loaded. In the interim, either the element's CSS `background-color`
-can be be used as the placeholder, or the `placeholder` property can be
-set to a URL (preferably a data-URI, for instant rendering) for an
-placeholder image.
-
-The `fade` option (only valid when `preload` is set) will cause the placeholder
-image/color to be faded out once the image is rendered.
-
-Examples:
-
- Basically identical to `<img src="...">` tag:
-
-```html
-<iron-image src="http://lorempixel.com/400/400"></iron-image>
-```
-
- Will letterbox the image to fit:
-
-```html
-<iron-image style="width:400px; height:400px;" sizing="contain"
- src="http://lorempixel.com/600/400"></iron-image>
-```
-
- Will crop the image to fit:
-
-```html
-<iron-image style="width:400px; height:400px;" sizing="cover"
- src="http://lorempixel.com/600/400"></iron-image>
-```
-
- Will show light-gray background until the image loads:
-
-```html
-<iron-image style="width:400px; height:400px; background-color: lightgray;"
- sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
-```
-
- Will show a base-64 encoded placeholder image until the image loads:
-
-```html
-<iron-image style="width:400px; height:400px;" placeholder="data:image/gif;base64,..."
- sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
-```
-
- Will fade the light-gray background out once the image is loaded:
-
-```html
-<iron-image style="width:400px; height:400px; background-color: lightgray;"
- sizing="cover" preload fade src="http://lorempixel.com/600/400"></iron-image>
-```
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--iron-image-placeholder` | Mixin applied to #placeholder | `{}` |
-| `--iron-image-width` | Sets the width of the wrapped image | `auto` |
-| `--iron-image-height` | Sets the height of the wrapped image | `auto` |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-image/bower.json
deleted file mode 100755
index 9ac7b5d6552..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "iron-image",
- "version": "1.2.3",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "An image-displaying element with lots of convenient features",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "media"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-image.git"
- },
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.4",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": "iron-image.html",
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/index.html
deleted file mode 100755
index 06c533cf0b5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/index.html
+++ /dev/null
@@ -1,266 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
-
- <title>iron-image demo</title>
-
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../polymer/polymer.html">
- <link rel="import" href="../iron-image.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- .example {
- margin: 4px;
- flex: 1;
- }
-
- code {
- white-space: nowrap;
- }
- </style>
-
- <script>
- function load(id) {
- document.getElementById(id).src = "./polymer.svg?" + Math.random();
- }
- </script>
-
- </head>
- <body unresolved>
-
- <div class="vertical-section-container centered">
-
- <h3>A plain <code>iron-image</code>.</h3>
- <demo-snippet class="centered-demo">
- <template>
- <iron-image alt="The Polymer logo." src="./polymer.svg"></iron-image>
- </template>
- </demo-snippet>
-
- <h3>
- <code>sizing="cover"</code> expands the image to cover all of its
- specified size.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- #example-sizing-cover {
- width: 150px;
- height: 150px;
- background: #ddd;
- }
- </style>
-
- <iron-image sizing="cover" id="example-sizing-cover" alt="The Polymer logo." src="./polymer.svg"></iron-image>
- </template>
- </demo-snippet>
-
- <h3>
- <code>sizing="contain"</code> expands the image to fit within its
- specified size.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- #example-sizing-contain {
- width: 150px;
- height: 150px;
- background: #ddd;
- }
- </style>
-
- <iron-image sizing="contain" id="example-sizing-contain" alt="The Polymer logo." src="./polymer.svg"></iron-image>
- </template>
- </demo-snippet>
-
- <h3>
- Use the <code>--iron-image-width</code> property to set the width of
- the image wrapped by the <code>iron-image</code>.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- #example-full-width-container {
- width: 200px;
- border: 2px solid #444;
- background: #444;
- }
-
- #example-full-width-container iron-image {
- background: #ddd;
- }
-
- #example-full-width {
- width: 100%;
- --iron-image-width: 100%;
- }
-
- #example-half-width {
- width: 50%;
- --iron-image-width: 100%;
- }
- </style>
-
-
- <div id="example-full-width-container">
- <iron-image id="example-full-width" alt="The Polymer logo." src="./polymer.svg"></iron-image>
- <iron-image id="example-half-width" alt="The Polymer logo." src="./polymer.svg"></iron-image>
- </div>
- </template>
- </demo-snippet>
-
- <h3>
- Use the <code>--iron-image-height</code> property to set the height of
- the image wrapped by the <code>iron-image</code>.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- #example-full-height-container {
- height: 150px;
- border: 2px solid #444;
- background: #444;
- }
-
- #example-full-height-container iron-image{
- background: #ddd;
- }
-
- #example-full-height {
- height: 100%;
- --iron-image-height: 100%;
- }
-
- #example-half-height {
- height: 50%;
- --iron-image-height: 100%;
- }
- </style>
-
-
- <div id="example-full-height-container">
- <iron-image id="example-full-height" alt="The Polymer logo." src="./polymer.svg"></iron-image>
- <iron-image id="example-half-height" alt="The Polymer logo." src="./polymer.svg"></iron-image>
- </div>
- </template>
- </demo-snippet>
-
- <h3>
- No placeholder is shown by default.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- .example.without-preload iron-image {
- width: 150px;
- height: 150px;
- background: #ddd;
- }
- </style>
-
- <div class="example without-preload">
- <button onclick="load('example-without-preload-1')">
- Load image
- </button>
- <br>
- <iron-image sizing="contain" alt="The Polymer logo." id="example-without-preload-1"></iron-image>
- </div>
- </template>
- </demo-snippet>
-
- <h3>
- The <code>preload</code> attribute shows a placeholder element in front
- of the image before it has loaded. Use the
- <code>--iron-image-placeholder</code> CSS mixin to style it.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- .example.preload iron-image {
- width: 150px;
- height: 150px;
- background: #ddd;
- --iron-image-placeholder: {
- background: #939ed5;
- };
- }
- </style>
-
- <div class="example preload">
- <button onclick="load('example-preload-1')">
- Load image
- </button>
- <br>
- <iron-image preload id="example-preload-1" alt="The Polymer logo." class="sized" sizing="contain"></iron-image>
- <br>
- Without the <code>fade</code> attribute, the placeholder element is
- hidden with no transition when the image loads.
- </div>
- <div class="example preload">
- <button onclick="load('example-preload-2')">
- Load image
- </button>
- <br>
- <iron-image preload fade id="example-preload-2" alt="The Polymer logo." class="sized" sizing="contain"></iron-image>
- <br>
- With the <code>fade</code> attribute, the placeholder element is
- fades away when the image loads.
- </div>
- </template>
- </demo-snippet>
-
- <h3>
- Use the <code>placeholder</code> attribute to specify a background image
- for the placeholder element.
- </h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- .example.preload-image iron-image {
- width: 150px;
- height: 150px;
- background: #ddd;
- }
- </style>
-
- <div class="example preload-image">
- <button onclick="load('example-preload-image-1')">
- Load image
- </button>
- <br>
- <iron-image preload placeholder="./loading.png" id="example-preload-image-1" alt="The Polymer logo." class="sized" sizing="contain"></iron-image>
- <br>
- (without <code>fade</code> attribute)
- </div>
- <div class="example preload-image">
- <button onclick="load('example-preload-image-2')">
- Load image
- </button>
- <br>
- <iron-image preload placeholder="./loading.png" fade id="example-preload-image-2" alt="The Polymer logo." class="sized" sizing="contain"></iron-image>
- <br>
- (with <code>fade</code> attribute)
- </div>
- </template>
- </demo-snippet>
-
- </div>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/loading.png b/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/loading.png
deleted file mode 100644
index a87e1719d8c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/loading.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/polymer.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/polymer.svg
deleted file mode 100755
index f7a815dda5b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/demo/polymer.svg
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- width="208px" height="143px" viewBox="0 0 416 286" enable-background="new 0 0 416 286" xml:space="preserve">
-<g>
- <g>
- <polygon fill="#303F9F" points="84.157,143 42.878,214.5 84.157,286 125.436,214.5 "/>
- <polygon fill="#3F51B5" points="331.842,0 290.561,71.5 331.842,143 373.121,71.5 "/>
- <polygon fill="#7986CB" points="373.121,71.5 249.278,286 331.842,286 414.4,143 "/>
- <polygon fill="#FF4081" points="249.278,0 84.157,286 166.721,286 331.842,0 "/>
- <polygon fill="#536DFE" points="84.157,0 1.596,143 42.878,214.5 166.721,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="249.278,0 290.561,71.5 331.842,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="208,71.5 249.278,0 290.561,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="208,71.5 249.278,143 290.561,71.5 "/>
- <polygon fill-opacity="0.1" points="166.721,143 208,71.5 249.278,143 "/>
- <polygon fill-opacity="0.2" points="166.721,143 208,214.5 249.278,143 "/>
- <polygon fill-opacity="0.3" points="125.438,214.5 166.721,143 208,214.5 "/>
- <polygon fill-opacity="0.4" points="125.438,214.5 166.721,286 208,214.5 "/>
- <polygon fill-opacity="0.5" points="84.157,286 125.438,214.5 166.721,286 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.438,71.5 166.721,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.438,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.438,71.5 "/>
- <polygon fill-opacity="0.1" points="1.598,143 42.878,71.5 84.157,143 "/>
- <polygon fill-opacity="0.2" points="1.598,143 42.878,214.5 84.157,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="125.438,214.5 84.157,143 42.878,214.5 "/>
- <polygon fill-opacity="0.2" points="125.438,214.5 84.157,286 42.878,214.5 "/>
- <polygon fill-opacity="0.2" points="373.121,71.5 331.842,0 290.561,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="373.121,71.5 331.842,143 290.561,71.5 "/>
- <g>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="331.842,143 373.121,71.5 414.4,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="331.842,143 373.121,214.5 414.4,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="290.561,214.5 331.842,143 373.121,214.5 "/>
- <polygon fill-opacity="0.1" points="290.561,214.5 331.842,286 373.121,214.5 "/>
- <polygon fill-opacity="0.2" points="249.278,286 290.561,214.5 331.842,286 "/>
- </g>
- </g>
- <rect y="-65" fill="none" width="416" height="416"/>
-</g>
-<g display="none">
- <g display="inline">
- <polygon fill="#303F9F" points="84.157,143 42.878,214.5 84.157,286 166.721,286 "/>
- <polygon fill="#3F51B5" points="331.842,0 249.278,0 331.842,143 373.121,71.5 "/>
- <polygon fill="#7986CB" points="373.121,71.5 249.278,286 331.842,286 414.4,143 "/>
- <polygon fill="#536DFE" points="84.157,0 1.596,143 42.878,214.5 166.721,0 "/>
- <polygon fill-opacity="0.5" points="249.278,0 290.561,71.5 331.842,0 "/>
- <polygon fill-opacity="0.5" points="84.157,286 125.438,214.5 166.721,286 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.438,71.5 166.721,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.438,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.438,71.5 "/>
- <polygon fill-opacity="0.1" points="1.598,143 42.878,71.5 84.157,143 "/>
- <polygon fill-opacity="0.2" points="1.598,143 42.878,214.5 84.157,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="125.438,214.5 84.157,143 42.878,214.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="373.121,71.5 331.842,143 290.561,71.5 "/>
- <g>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="331.842,143 373.121,71.5 414.4,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="331.842,143 373.121,214.5 414.4,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="290.561,214.5 331.842,143 373.121,214.5 "/>
- <polygon fill-opacity="0.1" points="290.561,214.5 331.842,286 373.121,214.5 "/>
- <polygon fill-opacity="0.2" points="249.278,286 290.561,214.5 331.842,286 "/>
- </g>
- <polygon fill-opacity="0.2" points="125.438,214.5 84.157,286 42.878,214.5 "/>
- <polygon fill-opacity="0.2" points="373.121,71.5 331.842,0 290.561,71.5 "/>
- </g>
- <rect y="-65" display="inline" fill="none" width="416" height="416"/>
-</g>
-<g display="none">
- <g display="inline">
- <polygon fill="#FF4081" points="249.279,0 84.157,286 166.721,286 331.843,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="249.279,0 290.558,71.5 331.843,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="208,71.5 249.279,0 290.558,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="208,71.5 249.279,143 290.558,71.5 "/>
- <polygon fill-opacity="0.2" points="166.721,143 208,214.5 249.279,143 "/>
- <polygon fill-opacity="0.3" points="125.439,214.5 166.721,143 208,214.5 "/>
- <polygon fill-opacity="0.4" points="125.439,214.5 166.721,286 208,214.5 "/>
- <polygon fill-opacity="0.5" points="84.157,286 125.439,214.5 166.721,286 "/>
- <polygon fill-opacity="0.1" points="166.721,143 208,71.5 249.279,143 "/>
- </g>
- <g display="inline">
- <polygon fill="#FF4081" points="331.84,0 166.718,286 249.279,286 373.121,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="290.558,71.5 331.84,0 373.121,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="290.558,71.5 331.84,143 373.121,71.5 "/>
- <polygon fill-opacity="0.2" points="249.279,143 290.558,214.5 331.84,143 "/>
- <polygon fill-opacity="0.3" points="208,214.5 249.279,143 290.558,214.5 "/>
- <polygon fill-opacity="0.4" points="208,214.5 249.279,286 290.558,214.5 "/>
- <polygon fill-opacity="0.5" points="166.718,286 208,214.5 249.279,286 "/>
- <polygon fill-opacity="0.1" points="249.279,143 290.558,71.5 331.84,143 "/>
- </g>
- <g display="inline">
- <polygon fill="#FF4081" points="166.718,0 42.878,214.5 84.16,286 249.279,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="166.718,0 208,71.5 249.279,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="125.439,71.5 166.718,0 208,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="125.439,71.5 166.718,143 208,71.5 "/>
- <polygon fill-opacity="0.2" points="84.16,143 125.439,214.5 166.718,143 "/>
- <polygon fill-opacity="0.3" points="42.878,214.5 84.16,143 125.439,214.5 "/>
- <polygon fill-opacity="0.4" points="42.878,214.5 84.16,286 125.439,214.5 "/>
- <polygon fill-opacity="0.1" points="84.16,143 125.439,71.5 166.718,143 "/>
- </g>
- <rect y="-65" display="inline" fill="none" width="416" height="416"/>
- <g display="inline">
- <polygon fill="#303F9F" points="84.157,143 42.878,214.5 84.157,286 166.721,286 "/>
- <polygon fill="#3F51B5" points="331.843,0 249.279,0 331.843,143 373.121,71.5 "/>
- <polygon fill="#7986CB" points="373.121,71.5 249.279,286 331.843,286 414.4,143 "/>
- <polygon fill="#536DFE" points="84.157,0 1.597,143 42.878,214.5 166.721,0 "/>
- <polygon fill-opacity="0.5" points="249.279,0 290.558,71.5 331.843,0 "/>
- <polygon fill-opacity="0.5" points="84.157,286 125.439,214.5 166.721,286 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.439,71.5 166.721,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.439,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.439,71.5 "/>
- <polygon fill-opacity="0.1" points="1.6,143 42.878,71.5 84.157,143 "/>
- <polygon fill-opacity="0.2" points="1.6,143 42.878,214.5 84.157,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="125.439,214.5 84.157,143 42.878,214.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="373.121,71.5 331.843,143 290.558,71.5 "/>
- <g>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="331.843,143 373.121,71.5 414.4,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="331.843,143 373.121,214.5 414.4,143 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="290.558,214.5 331.843,143 373.121,214.5 "/>
- <polygon fill-opacity="0.1" points="290.558,214.5 331.843,286 373.121,214.5 "/>
- <polygon fill-opacity="0.2" points="249.279,286 290.558,214.5 331.843,286 "/>
- </g>
- <polygon fill-opacity="0.2" points="125.439,214.5 84.157,286 42.878,214.5 "/>
- <polygon fill-opacity="0.2" points="373.121,71.5 331.843,0 290.558,71.5 "/>
- </g>
-</g>
-<g display="none">
- <g display="inline">
- <polygon fill="#9F499B" points="249.279,0 84.157,286 166.721,286 331.843,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="249.279,0 290.558,71.5 331.843,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="208,71.5 249.279,0 290.558,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="208,71.5 249.279,143 290.558,71.5 "/>
- <polygon fill-opacity="0.2" points="166.721,143 208,214.5 249.279,143 "/>
- <polygon fill-opacity="0.3" points="125.439,214.5 166.721,143 208,214.5 "/>
- <polygon fill-opacity="0.4" points="125.439,214.5 166.721,286 208,214.5 "/>
- <polygon fill-opacity="0.5" points="84.157,286 125.439,214.5 166.721,286 "/>
- <polygon fill-opacity="0.1" points="166.721,143 208,71.5 249.279,143 "/>
- </g>
- <g display="inline">
- <polygon fill="#9F499B" points="331.84,0 166.718,286 249.279,286 373.121,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="290.558,71.5 331.84,0 373.121,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="290.558,71.5 331.84,143 373.121,71.5 "/>
- <polygon fill-opacity="0.2" points="249.279,143 290.558,214.5 331.84,143 "/>
- <polygon fill-opacity="0.3" points="208,214.5 249.279,143 290.558,214.5 "/>
- <polygon fill-opacity="0.4" points="208,214.5 249.279,286 290.558,214.5 "/>
- <polygon fill-opacity="0.5" points="166.718,286 208,214.5 249.279,286 "/>
- <polygon fill-opacity="0.1" points="249.279,143 290.558,71.5 331.84,143 "/>
- </g>
- <g display="inline">
- <polygon fill="#9F499B" points="373.121,71.5 249.279,286 331.843,286 414.4,143 "/>
- <polygon fill-opacity="0.2" points="331.843,143 373.121,214.5 414.4,143 "/>
- <polygon fill-opacity="0.3" points="290.558,214.5 331.843,143 373.121,214.5 "/>
- <polygon fill-opacity="0.4" points="290.558,214.5 331.843,286 373.121,214.5 "/>
- <polygon fill-opacity="0.5" points="249.279,286 290.558,214.5 331.843,286 "/>
- <polygon fill-opacity="0.1" points="331.843,143 373.121,71.5 414.4,143 "/>
- </g>
- <g display="inline">
- <polygon fill="#9F499B" points="166.718,0 42.878,214.5 84.16,286 249.279,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="166.718,0 208,71.5 249.279,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="125.439,71.5 166.718,0 208,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="125.439,71.5 166.718,143 208,71.5 "/>
- <polygon fill-opacity="0.2" points="84.16,143 125.439,214.5 166.718,143 "/>
- <polygon fill-opacity="0.3" points="42.878,214.5 84.16,143 125.439,214.5 "/>
- <polygon fill-opacity="0.4" points="42.878,214.5 84.16,286 125.439,214.5 "/>
- <polygon fill-opacity="0.1" points="84.16,143 125.439,71.5 166.718,143 "/>
- </g>
- <g display="inline">
- <polygon fill="#9F499B" points="84.157,0 1.6,143 42.878,214.5 166.721,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.439,71.5 166.721,0 "/>
- <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.439,71.5 "/>
- <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.439,71.5 "/>
- <polygon fill-opacity="0.2" points="1.6,143 42.878,214.5 84.157,143 "/>
- <polygon fill-opacity="0.1" points="1.6,143 42.878,71.5 84.157,143 "/>
- </g>
- <rect y="-65" display="inline" fill="none" width="416" height="416"/>
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-image/index.html
deleted file mode 100755
index bb7da82e87c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>iron-image</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-image/iron-image.html b/chromium/third_party/catapult/third_party/polymer/components/iron-image/iron-image.html
deleted file mode 100755
index bf774d6ccbc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-image/iron-image.html
+++ /dev/null
@@ -1,403 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-
-<!--
-`iron-image` is an element for displaying an image that provides useful sizing and
-preloading options not found on the standard `<img>` tag.
-
-The `sizing` option allows the image to be either cropped (`cover`) or
-letterboxed (`contain`) to fill a fixed user-size placed on the element.
-
-The `preload` option prevents the browser from rendering the image until the
-image is fully loaded. In the interim, either the element's CSS `background-color`
-can be be used as the placeholder, or the `placeholder` property can be
-set to a URL (preferably a data-URI, for instant rendering) for an
-placeholder image.
-
-The `fade` option (only valid when `preload` is set) will cause the placeholder
-image/color to be faded out once the image is rendered.
-
-Examples:
-
- Basically identical to `<img src="...">` tag:
-
- <iron-image src="http://lorempixel.com/400/400"></iron-image>
-
- Will letterbox the image to fit:
-
- <iron-image style="width:400px; height:400px;" sizing="contain"
- src="http://lorempixel.com/600/400"></iron-image>
-
- Will crop the image to fit:
-
- <iron-image style="width:400px; height:400px;" sizing="cover"
- src="http://lorempixel.com/600/400"></iron-image>
-
- Will show light-gray background until the image loads:
-
- <iron-image style="width:400px; height:400px; background-color: lightgray;"
- sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
-
- Will show a base-64 encoded placeholder image until the image loads:
-
- <iron-image style="width:400px; height:400px;" placeholder="data:image/gif;base64,..."
- sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
-
- Will fade the light-gray background out once the image is loaded:
-
- <iron-image style="width:400px; height:400px; background-color: lightgray;"
- sizing="cover" preload fade src="http://lorempixel.com/600/400"></iron-image>
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--iron-image-placeholder` | Mixin applied to #placeholder | `{}`
-`--iron-image-width` | Sets the width of the wrapped image | `auto`
-`--iron-image-height` | Sets the height of the wrapped image | `auto`
-
-@group Iron Elements
-@element iron-image
-@demo demo/index.html
--->
-
-<dom-module id="iron-image">
- <template>
- <style>
- :host {
- display: inline-block;
- overflow: hidden;
- position: relative;
- }
-
- #sizedImgDiv {
- @apply(--layout-fit);
-
- display: none;
- }
-
- #img {
- display: block;
- width: var(--iron-image-width, auto);
- height: var(--iron-image-height, auto);
- }
-
- :host([sizing]) #sizedImgDiv {
- display: block;
- }
-
- :host([sizing]) #img {
- display: none;
- }
-
- #placeholder {
- @apply(--layout-fit);
-
- background-color: inherit;
- opacity: 1;
-
- @apply(--iron-image-placeholder);
- }
-
- #placeholder.faded-out {
- transition: opacity 0.5s linear;
- opacity: 0;
- }
- </style>
-
- <div id="sizedImgDiv"
- role="img"
- hidden$="[[_computeImgDivHidden(sizing)]]"
- aria-hidden$="[[_computeImgDivARIAHidden(alt)]]"
- aria-label$="[[_computeImgDivARIALabel(alt, src)]]"></div>
- <img id="img" alt$="[[alt]]" hidden$="[[_computeImgHidden(sizing)]]">
- <div id="placeholder"
- hidden$="[[_computePlaceholderHidden(preload, fade, loading, loaded)]]"
- class$="[[_computePlaceholderClassName(preload, fade, loading, loaded)]]"></div>
- </template>
-
- <script>
- Polymer({
- is: 'iron-image',
-
- properties: {
- /**
- * The URL of an image.
- */
- src: {
- observer: '_srcChanged',
- type: String,
- value: ''
- },
-
- /**
- * A short text alternative for the image.
- */
- alt: {
- type: String,
- value: null
- },
-
- /**
- * When true, the image is prevented from loading and any placeholder is
- * shown. This may be useful when a binding to the src property is known to
- * be invalid, to prevent 404 requests.
- */
- preventLoad: {
- type: Boolean,
- value: false,
- observer: '_preventLoadChanged'
- },
-
- /**
- * Sets a sizing option for the image. Valid values are `contain` (full
- * aspect ratio of the image is contained within the element and
- * letterboxed) or `cover` (image is cropped in order to fully cover the
- * bounds of the element), or `null` (default: image takes natural size).
- */
- sizing: {
- type: String,
- value: null,
- reflectToAttribute: true
- },
-
- /**
- * When a sizing option is used (`cover` or `contain`), this determines
- * how the image is aligned within the element bounds.
- */
- position: {
- type: String,
- value: 'center'
- },
-
- /**
- * When `true`, any change to the `src` property will cause the `placeholder`
- * image to be shown until the new image has loaded.
- */
- preload: {
- type: Boolean,
- value: false
- },
-
- /**
- * This image will be used as a background/placeholder until the src image has
- * loaded. Use of a data-URI for placeholder is encouraged for instant rendering.
- */
- placeholder: {
- type: String,
- value: null,
- observer: '_placeholderChanged'
- },
-
- /**
- * When `preload` is true, setting `fade` to true will cause the image to
- * fade into place.
- */
- fade: {
- type: Boolean,
- value: false
- },
-
- /**
- * Read-only value that is true when the image is loaded.
- */
- loaded: {
- notify: true,
- readOnly: true,
- type: Boolean,
- value: false
- },
-
- /**
- * Read-only value that tracks the loading state of the image when the `preload`
- * option is used.
- */
- loading: {
- notify: true,
- readOnly: true,
- type: Boolean,
- value: false
- },
-
- /**
- * Read-only value that indicates that the last set `src` failed to load.
- */
- error: {
- notify: true,
- readOnly: true,
- type: Boolean,
- value: false
- },
-
- /**
- * Can be used to set the width of image (e.g. via binding); size may also be
- * set via CSS.
- */
- width: {
- observer: '_widthChanged',
- type: Number,
- value: null
- },
-
- /**
- * Can be used to set the height of image (e.g. via binding); size may also be
- * set via CSS.
- *
- * @attribute height
- * @type number
- * @default null
- */
- height: {
- observer: '_heightChanged',
- type: Number,
- value: null
- },
- },
-
- observers: [
- '_transformChanged(sizing, position)'
- ],
-
- ready: function() {
- var img = this.$.img;
-
- img.onload = function() {
- if (this.$.img.src !== this._resolveSrc(this.src)) return;
-
- this._setLoading(false);
- this._setLoaded(true);
- this._setError(false);
- }.bind(this);
-
- img.onerror = function() {
- if (this.$.img.src !== this._resolveSrc(this.src)) return;
-
- this._reset();
-
- this._setLoading(false);
- this._setLoaded(false);
- this._setError(true);
- }.bind(this);
-
- this._resolvedSrc = '';
- },
-
- _load: function(src) {
- if (src) {
- this.$.img.src = src;
- } else {
- this.$.img.removeAttribute('src');
- }
- this.$.sizedImgDiv.style.backgroundImage = src ? 'url("' + src + '")' : '';
-
- this._setLoading(!!src);
- this._setLoaded(false);
- this._setError(false);
- },
-
- _reset: function() {
- this.$.img.removeAttribute('src');
- this.$.sizedImgDiv.style.backgroundImage = '';
-
- this._setLoading(false);
- this._setLoaded(false);
- this._setError(false);
- },
-
- _computePlaceholderHidden: function() {
- return !this.preload || (!this.fade && !this.loading && this.loaded);
- },
-
- _computePlaceholderClassName: function() {
- return (this.preload && this.fade && !this.loading && this.loaded) ? 'faded-out' : '';
- },
-
- _computeImgDivHidden: function() {
- return !this.sizing;
- },
-
- _computeImgDivARIAHidden: function() {
- return this.alt === '' ? 'true' : undefined;
- },
-
- _computeImgDivARIALabel: function() {
- if (this.alt !== null) {
- return this.alt;
- }
-
- // Polymer.ResolveUrl.resolveUrl will resolve '' relative to a URL x to
- // that URL x, but '' is the default for src.
- if (this.src === '') {
- return '';
- }
-
- var pathComponents = (new URL(this._resolveSrc(this.src))).pathname.split("/");
- return pathComponents[pathComponents.length - 1];
- },
-
- _computeImgHidden: function() {
- return !!this.sizing;
- },
-
- _widthChanged: function() {
- this.style.width = isNaN(this.width) ? this.width : this.width + 'px';
- },
-
- _heightChanged: function() {
- this.style.height = isNaN(this.height) ? this.height : this.height + 'px';
- },
-
- _preventLoadChanged: function() {
- if (this.preventLoad || this.loaded) return;
-
- this._reset();
- this._load(this.src);
- },
-
- _srcChanged: function(newSrc, oldSrc) {
- var newResolvedSrc = this._resolveSrc(newSrc);
- if (newResolvedSrc === this._resolvedSrc) return;
- this._resolvedSrc = newResolvedSrc;
-
- this._reset();
- if (!this.preventLoad) {
- this._load(newSrc);
- }
- },
-
- _placeholderChanged: function() {
- this.$.placeholder.style.backgroundImage =
- this.placeholder ? 'url("' + this.placeholder + '")' : '';
- },
-
- _transformChanged: function() {
- var sizedImgDivStyle = this.$.sizedImgDiv.style;
- var placeholderStyle = this.$.placeholder.style;
-
- sizedImgDivStyle.backgroundSize =
- placeholderStyle.backgroundSize =
- this.sizing;
-
- sizedImgDivStyle.backgroundPosition =
- placeholderStyle.backgroundPosition =
- this.sizing ? this.position : '';
-
- sizedImgDivStyle.backgroundRepeat =
- placeholderStyle.backgroundRepeat =
- this.sizing ? 'no-repeat' : '';
- },
-
- _resolveSrc: function(testSrc) {
- return Polymer.ResolveUrl.resolveUrl(testSrc, this.ownerDocument.baseURI);
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-input/.bower.json
deleted file mode 100644
index 28b0a135d8d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/.bower.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "iron-input",
- "version": "1.0.10",
- "description": "An input element with data binding",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input"
- ],
- "main": "iron-input.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-input.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-input",
- "ignore": [],
- "dependencies": {
- "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.0.10",
- "_resolution": {
- "type": "version",
- "tag": "1.0.10",
- "commit": "01d17407672ad8033ee447c9c7a65162f13c8f49"
- },
- "_source": "git://github.com/PolymerElements/iron-input.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-input"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-input/.travis.yml
deleted file mode 100644
index 05aea78b053..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: AnFRDBxxASn2RP4u+CHJS04g2klVTM+YL1fgNfkNIiECChymGRkeBiF7zvWPfodqPGKWhBZPAMxVuFKbztawQ95kWlbPSTNJtWhHhPcRarV5AYvjhyUV372E3REZ4CGt+T8nghD9bdJiMX5x0pXAz+wfBPPpiHwbiSPPjFLFvTs=
- - secure: SvsE+VQL35CZ967ZVy0+7o5xclnBM8egjhsjNRG7WxVPZQboCQ3Xwm8tIDQSWeagM3ZQRkTGca4ta91F1ZEhm4Jdt5CwKhhSNC6JgS3CX819r9UKgUnSS3nvWdqcZq4GXcMoOZm4qE9ttd3xdoKCfkLRQlEGAvM2TEw69mBhj24=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-input/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-input/README.md
deleted file mode 100644
index f32ac12e1f6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/README.md
+++ /dev/null
@@ -1,59 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-input.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-input.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-input)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-input)_
-
-
-##&lt;iron-input&gt;
-
-`<iron-input>` adds two-way binding and custom validators using `Polymer.IronValidatorBehavior`
-to `<input>`.
-
-### Two-way binding
-
-By default you can only get notified of changes to an `input`'s `value` due to user input:
-
-```html
-<input value="{{myValue::input}}">
-```
-
-`iron-input` adds the `bind-value` property that mirrors the `value` property, and can be used
-for two-way data binding. `bind-value` will notify if it is changed either by user input or by script.
-
-```html
-<input is="iron-input" bind-value="{{myValue}}">
-```
-
-### Custom validators
-
-You can use custom validators that implement `Polymer.IronValidatorBehavior` with `<iron-input>`.
-
-```html
-<input is="iron-input" validator="my-custom-validator">
-```
-
-### Stopping invalid input
-
-It may be desirable to only allow users to enter certain characters. You can use the
-`prevent-invalid-input` and `allowed-pattern` attributes together to accomplish this. This feature
-is separate from validation, and `allowed-pattern` does not affect how the input is validated.
-
-```html
-<!-- only allow characters that match [0-9] -->
-<input is="iron-input" prevent-invalid-input allowed-pattern="[0-9]">
-```
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-input/bower.json
deleted file mode 100644
index 018f4a163f3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/bower.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "iron-input",
- "version": "1.0.10",
- "description": "An input element with data binding",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input"
- ],
- "main": "iron-input.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-input.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-input",
- "ignore": [],
- "dependencies": {
- "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-input/demo/index.html
deleted file mode 100644
index 59d37b2d949..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/demo/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>iron-input demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../iron-input.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../../paper-styles/typography.html">
-
- <style is="custom-style">
-
- .vertical-section {
- @apply(--paper-font-body1);
-
- line-height: 40px;
- }
-
- code {
- color: var(--google-grey-700);
- }
-
- input[is=iron-input] {
- width: 100%;
- box-sizing: border-box;
- }
-
- input, button {
- font-size: 20px;
- padding: 0.2em;
- }
-
- </style>
-</head>
-<body>
-
- <div class="vertical-section vertical-section-container centered">
- <template is="dom-bind">
- <p>
- <input is="iron-input" bind-value="{{bindValue}}" value="{{value::input}}">
- <br>
- bind to <code>bind-value</code>: <b>[[bindValue]]</b>
- <br>
- bind to <code>value::input</code>: <b>{{value}}</b>
- </p>
-
- <p on-click="setValue">
- set bind-value to: <input> <button is="paper-button" value="bindValue">set</button>
- <br>
- set value to: <input> <button value="value">set</button>
- </p>
- </template>
- <p>only allows these characters:
- <code>!@#0123456789</code></p>
- <input is="iron-input" allowed-pattern="[!@#0-9]" prevent-invalid-input>
-
- </div>
-
- <script>
- var scope = document.querySelector('template[is=dom-bind]');
-
- scope.setValue = function(event) {
- if (!(event.target instanceof HTMLButtonElement)) {
- return;
- }
- document.querySelector('input[is=iron-input]')[event.target.value] = event.target.previousElementSibling.value;
- }
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-input/hero.svg
deleted file mode 100755
index 146ffeac67c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/hero.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <rect x="49" y="53" width="2" height="18"/>
- <path d="M188,78H37V44h151V78z M39,76h147V46H39V76z"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-input/index.html
deleted file mode 100644
index ca0dac066a5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-input</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-input/iron-input.html b/chromium/third_party/catapult/third_party/polymer/components/iron-input/iron-input.html
deleted file mode 100644
index 3424b64a3a4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-input/iron-input.html
+++ /dev/null
@@ -1,306 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-announcer/iron-a11y-announcer.html">
-<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
-
-<script>
-
-/*
-`<iron-input>` adds two-way binding and custom validators using `Polymer.IronValidatorBehavior`
-to `<input>`.
-
-### Two-way binding
-
-By default you can only get notified of changes to an `input`'s `value` due to user input:
-
- <input value="{{myValue::input}}">
-
-`iron-input` adds the `bind-value` property that mirrors the `value` property, and can be used
-for two-way data binding. `bind-value` will notify if it is changed either by user input or by script.
-
- <input is="iron-input" bind-value="{{myValue}}">
-
-### Custom validators
-
-You can use custom validators that implement `Polymer.IronValidatorBehavior` with `<iron-input>`.
-
- <input is="iron-input" validator="my-custom-validator">
-
-### Stopping invalid input
-
-It may be desirable to only allow users to enter certain characters. You can use the
-`prevent-invalid-input` and `allowed-pattern` attributes together to accomplish this. This feature
-is separate from validation, and `allowed-pattern` does not affect how the input is validated.
-
- <!-- only allow characters that match [0-9] -->
- <input is="iron-input" prevent-invalid-input allowed-pattern="[0-9]">
-
-@hero hero.svg
-@demo demo/index.html
-*/
-
- Polymer({
-
- is: 'iron-input',
-
- extends: 'input',
-
- behaviors: [
- Polymer.IronValidatableBehavior
- ],
-
- properties: {
-
- /**
- * Use this property instead of `value` for two-way data binding.
- */
- bindValue: {
- observer: '_bindValueChanged',
- type: String
- },
-
- /**
- * Set to true to prevent the user from entering invalid input. If `allowedPattern` is set,
- * any character typed by the user will be matched against that pattern, and rejected if it's not a match.
- * Pasted input will have each character checked individually; if any character
- * doesn't match `allowedPattern`, the entire pasted string will be rejected.
- * If `allowedPattern` is not set, it will use the `type` attribute (only supported for `type=number`).
- */
- preventInvalidInput: {
- type: Boolean
- },
-
- /**
- * Regular expression that list the characters allowed as input.
- * This pattern represents the allowed characters for the field; as the user inputs text,
- * each individual character will be checked against the pattern (rather than checking
- * the entire value as a whole). The recommended format should be a list of allowed characters;
- * for example, `[a-zA-Z0-9.+-!;:]`
- */
- allowedPattern: {
- type: String,
- observer: "_allowedPatternChanged"
- },
-
- _previousValidInput: {
- type: String,
- value: ''
- },
-
- _patternAlreadyChecked: {
- type: Boolean,
- value: false
- }
-
- },
-
- listeners: {
- 'input': '_onInput',
- 'keypress': '_onKeypress'
- },
-
- /** @suppress {checkTypes} */
- registered: function() {
- // Feature detect whether we need to patch dispatchEvent (i.e. on FF and IE).
- if (!this._canDispatchEventOnDisabled()) {
- this._origDispatchEvent = this.dispatchEvent;
- this.dispatchEvent = this._dispatchEventFirefoxIE;
- }
- },
-
- created: function() {
- Polymer.IronA11yAnnouncer.requestAvailability();
- },
-
- _canDispatchEventOnDisabled: function() {
- var input = document.createElement('input');
- var canDispatch = false;
- input.disabled = true;
-
- input.addEventListener('feature-check-dispatch-event', function() {
- canDispatch = true;
- });
-
- try {
- input.dispatchEvent(new Event('feature-check-dispatch-event'));
- } catch(e) {}
-
- return canDispatch;
- },
-
- _dispatchEventFirefoxIE: function() {
- // Due to Firefox bug, events fired on disabled form controls can throw
- // errors; furthermore, neither IE nor Firefox will actually dispatch
- // events from disabled form controls; as such, we toggle disable around
- // the dispatch to allow notifying properties to notify
- // See issue #47 for details
- var disabled = this.disabled;
- this.disabled = false;
- this._origDispatchEvent.apply(this, arguments);
- this.disabled = disabled;
- },
-
- get _patternRegExp() {
- var pattern;
- if (this.allowedPattern) {
- pattern = new RegExp(this.allowedPattern);
- } else {
- switch (this.type) {
- case 'number':
- pattern = /[0-9.,e-]/;
- break;
- }
- }
- return pattern;
- },
-
- ready: function() {
- this.bindValue = this.value;
- },
-
- /**
- * @suppress {checkTypes}
- */
- _bindValueChanged: function() {
- if (this.value !== this.bindValue) {
- this.value = !(this.bindValue || this.bindValue === 0 || this.bindValue === false) ? '' : this.bindValue;
- }
- // manually notify because we don't want to notify until after setting value
- this.fire('bind-value-changed', {value: this.bindValue});
- },
-
- _allowedPatternChanged: function() {
- // Force to prevent invalid input when an `allowed-pattern` is set
- this.preventInvalidInput = this.allowedPattern ? true : false;
- },
-
- _onInput: function() {
- // Need to validate each of the characters pasted if they haven't
- // been validated inside `_onKeypress` already.
- if (this.preventInvalidInput && !this._patternAlreadyChecked) {
- var valid = this._checkPatternValidity();
- if (!valid) {
- this._announceInvalidCharacter('Invalid string of characters not entered.');
- this.value = this._previousValidInput;
- }
- }
-
- this.bindValue = this.value;
- this._previousValidInput = this.value;
- this._patternAlreadyChecked = false;
- },
-
- _isPrintable: function(event) {
- // What a control/printable character is varies wildly based on the browser.
- // - most control characters (arrows, backspace) do not send a `keypress` event
- // in Chrome, but the *do* on Firefox
- // - in Firefox, when they do send a `keypress` event, control chars have
- // a charCode = 0, keyCode = xx (for ex. 40 for down arrow)
- // - printable characters always send a keypress event.
- // - in Firefox, printable chars always have a keyCode = 0. In Chrome, the keyCode
- // always matches the charCode.
- // None of this makes any sense.
-
- // For these keys, ASCII code == browser keycode.
- var anyNonPrintable =
- (event.keyCode == 8) || // backspace
- (event.keyCode == 9) || // tab
- (event.keyCode == 13) || // enter
- (event.keyCode == 27); // escape
-
- // For these keys, make sure it's a browser keycode and not an ASCII code.
- var mozNonPrintable =
- (event.keyCode == 19) || // pause
- (event.keyCode == 20) || // caps lock
- (event.keyCode == 45) || // insert
- (event.keyCode == 46) || // delete
- (event.keyCode == 144) || // num lock
- (event.keyCode == 145) || // scroll lock
- (event.keyCode > 32 && event.keyCode < 41) || // page up/down, end, home, arrows
- (event.keyCode > 111 && event.keyCode < 124); // fn keys
-
- return !anyNonPrintable && !(event.charCode == 0 && mozNonPrintable);
- },
-
- _onKeypress: function(event) {
- if (!this.preventInvalidInput && this.type !== 'number') {
- return;
- }
- var regexp = this._patternRegExp;
- if (!regexp) {
- return;
- }
-
- // Handle special keys and backspace
- if (event.metaKey || event.ctrlKey || event.altKey)
- return;
-
- // Check the pattern either here or in `_onInput`, but not in both.
- this._patternAlreadyChecked = true;
-
- var thisChar = String.fromCharCode(event.charCode);
- if (this._isPrintable(event) && !regexp.test(thisChar)) {
- event.preventDefault();
- this._announceInvalidCharacter('Invalid character ' + thisChar + ' not entered.');
- }
- },
-
- _checkPatternValidity: function() {
- var regexp = this._patternRegExp;
- if (!regexp) {
- return true;
- }
- for (var i = 0; i < this.value.length; i++) {
- if (!regexp.test(this.value[i])) {
- return false;
- }
- }
- return true;
- },
-
- /**
- * Returns true if `value` is valid. The validator provided in `validator` will be used first,
- * then any constraints.
- * @return {boolean} True if the value is valid.
- */
- validate: function() {
- // First, check what the browser thinks. Some inputs (like type=number)
- // behave weirdly and will set the value to "" if something invalid is
- // entered, but will set the validity correctly.
- var valid = this.checkValidity();
-
- // Only do extra checking if the browser thought this was valid.
- if (valid) {
- // Empty, required input is invalid
- if (this.required && this.value === '') {
- valid = false;
- } else if (this.hasValidator()) {
- valid = Polymer.IronValidatableBehavior.validate.call(this, this.value);
- }
- }
-
- this.invalid = !valid;
- this.fire('iron-input-validate');
- return valid;
- },
-
- _announceInvalidCharacter: function(message) {
- this.fire('iron-announce', { text: message });
- }
- });
-
- /*
- The `iron-input-validate` event is fired whenever `validate()` is called.
- @event iron-input-validate
- */
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.bower.json
deleted file mode 100644
index dafbede4798..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.bower.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "iron-menu-behavior",
- "version": "1.1.7",
- "description": "Provides accessible menu behavior",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "behavior",
- "menu"
- ],
- "main": [
- "iron-menu-behavior.html",
- "iron-menubar-behavior.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-menu-behavior"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-menu-behavior",
- "ignore": [],
- "dependencies": {
- "iron-selector": "PolymerElements/iron-selector#^1.0.0",
- "polymer": "Polymer/polymer#^1.2.4",
- "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.1.7",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.7",
- "commit": "ea59e6ce5644d8f7a20c22f13f614ea60604a812"
- },
- "_source": "git://github.com/PolymerElements/iron-menu-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-menu-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.travis.yml
deleted file mode 100644
index a6517a39ba0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: QxZD8yzz7s3F6b7h87ztWYiEbD2TrQp1Z1mib5u1wL7EAwsrQVkFhIEo4cJPAsTGS98qgeZAITg0ifwp/jOKVC2QKoPnC1qjm4L0AjlhXBTRbqyS5G8jvfJ8M4DgkQXADh4e+lw9ba3h2AxceJELKTYaQVq/cpTrpPg0/RH7H4o=
- - secure: i76J23Bpwj6qJ4ybCCsQpGCTT+5s1PA+x0Avjbl1JTS4OsJLDFfvVl0YIWZ5xMIKJtdPC/mGDoZ2LNrh9hz82DBqDnzBlSnNjFbjnU1Aqy5CUmRWzyAF5NOjJGotISZcDYDGZd6gjsOfN0r+rICyRUiOadeyPf0Nm+6HSVQMjfM=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/README.md
deleted file mode 100644
index f8d90c65a3c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-menu-behavior.html iron-menubar-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-menu-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-menu-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-menu-behavior)_
-
-
-##Polymer.IronMenuBehavior
-
-`Polymer.IronMenuBehavior` implements accessible menu behavior.
-
-
-
-##Polymer.IronMenubarBehavior
-
-`Polymer.IronMenubarBehavior` implements accessible menubar behavior.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/bower.json
deleted file mode 100644
index 921662cc58d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/bower.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "iron-menu-behavior",
- "version": "1.1.7",
- "description": "Provides accessible menu behavior",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "behavior",
- "menu"
- ],
- "main": [
- "iron-menu-behavior.html",
- "iron-menubar-behavior.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-menu-behavior"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-menu-behavior",
- "ignore": [],
- "dependencies": {
- "iron-selector": "PolymerElements/iron-selector#^1.0.0",
- "polymer": "Polymer/polymer#^1.2.4",
- "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/index.html
deleted file mode 100644
index 7fbd5e780c4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/index.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>iron-menu-behavior demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../../paper-styles/default-theme.html">
- <link rel="import" href="simple-menu.html">
- <link rel="import" href="simple-menubar.html">
-
- <style is="custom-style">
- simple-menu,
- simple-menubar {
- display: inline-block;
- width: 100%;
- }
-
- simple-menu a {
- display: block;
- }
-
- simple-menubar a,
- simple-menu a {
- padding: 15px 20px;
- color: var(--primary-text-color);
- text-decoration: none;
- }
-
- simple-menu a[disabled],
- simple-menubar a[disabled] {
- color: var(--google-grey-300);
- }
-
- .horizontal-section {
- padding: 0;
- margin-bottom: 20px;
- }
-
- .row {
- height: 120px;
- }
- </style>
-</head>
-<body unresolved>
-
- <div class="horizontal-section-container">
- <div>
- <h3>Simple menu</h3>
- <div class="horizontal-section">
- <simple-menu>
- <a href="javascript:void(0)" role="menuitem">Item 0</a>
- <a href="javascript:void(0)" role="menuitem">Item 1</a>
- <a href="javascript:void(0)" role="menuitem" disabled>Item 2</a>
- <a href="javascript:void(0)" role="menuitem">Item 3</a>
- </simple-menu>
- </div>
- </div>
-
- <div>
- <h3>Multi-select menu</h3>
- <div class="horizontal-section">
- <simple-menu multi>
- <a href="javascript:void(0)" role="menuitem">Item 0</a>
- <a href="javascript:void(0)" role="menuitem">Item 1</a>
- <a href="javascript:void(0)" role="menuitem">Item 2</a>
- <a href="javascript:void(0)" role="menuitem">Item 3</a>
- </simple-menu>
- </div>
- </div>
-
- <div>
- <div class="row">
- <h3>Simple menubar</h3>
- <div class="horizontal-section">
- <simple-menubar>
- <a href="javascript:void(0)" role="menuitem">Item 0</a>
- <a href="javascript:void(0)" role="menuitem">Item 1</a>
- <a href="javascript:void(0)" role="menuitem" disabled>Item 2</a>
- <a href="javascript:void(0)" role="menuitem">Item 3</a>
- </simple-menubar>
- </div>
- </div>
- <div class="row">
- <h3>Multi-select menubar</h3>
- <div class="horizontal-section">
- <simple-menubar multi>
- <a href="javascript:void(0)" role="menuitem">Item 0</a>
- <a href="javascript:void(0)" role="menuitem">Item 1</a>
- <a href="javascript:void(0)" role="menuitem">Item 2</a>
- <a href="javascript:void(0)" role="menuitem">Item 3</a>
- </simple-menubar>
- </div>
- </div>
- </div>
-
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menu.html b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menu.html
deleted file mode 100644
index 748e1d75cc6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menu.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-menu-behavior.html">
-<link rel="import" href="../../paper-styles/color.html">
-
-<dom-module id="simple-menu">
-
- <style>
-
- .content ::content > .iron-selected {
- color: white;
- background-color: var(--google-blue-500);
- }
-
- </style>
-
- <template>
-
- <div class="content">
- <content></content>
- </div>
-
- </template>
-
-</dom-module>
-
-<script>
-
-(function() {
-
- Polymer({
-
- is: 'simple-menu',
-
- behaviors: [
- Polymer.IronMenuBehavior
- ]
-
- });
-
-})();
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menubar.html b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menubar.html
deleted file mode 100644
index 0f09cdbd2ad..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/demo/simple-menubar.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-menubar-behavior.html">
-<link rel="import" href="../../paper-styles/color.html">
-
-<dom-module id="simple-menubar">
-
- <style>
-
- .content ::content > .iron-selected {
- color: white;
- background-color: var(--google-red-500);
- }
-
- .content ::content > * {
- display: inline-block;
- }
-
- </style>
-
- <template>
-
- <div class="content">
- <content></content>
- </div>
-
- </template>
-
-</dom-module>
-
-<script>
-
-(function() {
-
- Polymer({
-
- is: 'simple-menubar',
-
- behaviors: [
- Polymer.IronMenubarBehavior
- ]
-
- });
-
-})();
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/index.html
deleted file mode 100644
index 2c643c4a037..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-menu-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page src="iron-menubar-behavior.html"></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menu-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menu-behavior.html
deleted file mode 100644
index 46c06c588b0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menu-behavior.html
+++ /dev/null
@@ -1,334 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-selector/iron-multi-selectable.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-
-<script>
-
- /**
- * `Polymer.IronMenuBehavior` implements accessible menu behavior.
- *
- * @demo demo/index.html
- * @polymerBehavior Polymer.IronMenuBehavior
- */
- Polymer.IronMenuBehaviorImpl = {
-
- properties: {
-
- /**
- * Returns the currently focused item.
- * @type {?Object}
- */
- focusedItem: {
- observer: '_focusedItemChanged',
- readOnly: true,
- type: Object
- },
-
- /**
- * The attribute to use on menu items to look up the item title. Typing the first
- * letter of an item when the menu is open focuses that item. If unset, `textContent`
- * will be used.
- */
- attrForItemTitle: {
- type: String
- }
- },
-
- hostAttributes: {
- 'role': 'menu',
- 'tabindex': '0'
- },
-
- observers: [
- '_updateMultiselectable(multi)'
- ],
-
- listeners: {
- 'focus': '_onFocus',
- 'keydown': '_onKeydown',
- 'iron-items-changed': '_onIronItemsChanged'
- },
-
- keyBindings: {
- 'up': '_onUpKey',
- 'down': '_onDownKey',
- 'esc': '_onEscKey',
- 'shift+tab:keydown': '_onShiftTabDown'
- },
-
- attached: function() {
- this._resetTabindices();
- },
-
- /**
- * Selects the given value. If the `multi` property is true, then the selected state of the
- * `value` will be toggled; otherwise the `value` will be selected.
- *
- * @param {string|number} value the value to select.
- */
- select: function(value) {
- // Cancel automatically focusing a default item if the menu received focus
- // through a user action selecting a particular item.
- if (this._defaultFocusAsync) {
- this.cancelAsync(this._defaultFocusAsync);
- this._defaultFocusAsync = null;
- }
- var item = this._valueToItem(value);
- if (item && item.hasAttribute('disabled')) return;
- this._setFocusedItem(item);
- Polymer.IronMultiSelectableBehaviorImpl.select.apply(this, arguments);
- },
-
- /**
- * Resets all tabindex attributes to the appropriate value based on the
- * current selection state. The appropriate value is `0` (focusable) for
- * the default selected item, and `-1` (not keyboard focusable) for all
- * other items.
- */
- _resetTabindices: function() {
- var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
-
- this.items.forEach(function(item) {
- item.setAttribute('tabindex', item === selectedItem ? '0' : '-1');
- }, this);
- },
-
- /**
- * Sets appropriate ARIA based on whether or not the menu is meant to be
- * multi-selectable.
- *
- * @param {boolean} multi True if the menu should be multi-selectable.
- */
- _updateMultiselectable: function(multi) {
- if (multi) {
- this.setAttribute('aria-multiselectable', 'true');
- } else {
- this.removeAttribute('aria-multiselectable');
- }
- },
-
- /**
- * Given a KeyboardEvent, this method will focus the appropriate item in the
- * menu (if there is a relevant item, and it is possible to focus it).
- *
- * @param {KeyboardEvent} event A KeyboardEvent.
- */
- _focusWithKeyboardEvent: function(event) {
- for (var i = 0, item; item = this.items[i]; i++) {
- var attr = this.attrForItemTitle || 'textContent';
- var title = item[attr] || item.getAttribute(attr);
-
- if (!item.hasAttribute('disabled') && title &&
- title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
- this._setFocusedItem(item);
- break;
- }
- }
- },
-
- /**
- * Focuses the previous item (relative to the currently focused item) in the
- * menu, disabled items will be skipped.
- */
- _focusPrevious: function() {
- var length = this.items.length;
- var curFocusIndex = Number(this.indexOf(this.focusedItem));
- for (var i = 1; i < length; i++) {
- var item = this.items[(curFocusIndex - i + length) % length];
- if (!item.hasAttribute('disabled')) {
- this._setFocusedItem(item);
- return;
- }
- }
- },
-
- /**
- * Focuses the next item (relative to the currently focused item) in the
- * menu, disabled items will be skipped.
- */
- _focusNext: function() {
- var length = this.items.length;
- var curFocusIndex = Number(this.indexOf(this.focusedItem));
- for (var i = 1; i < length; i++) {
- var item = this.items[(curFocusIndex + i) % length];
- if (!item.hasAttribute('disabled')) {
- this._setFocusedItem(item);
- return;
- }
- }
- },
-
- /**
- * Mutates items in the menu based on provided selection details, so that
- * all items correctly reflect selection state.
- *
- * @param {Element} item An item in the menu.
- * @param {boolean} isSelected True if the item should be shown in a
- * selected state, otherwise false.
- */
- _applySelection: function(item, isSelected) {
- if (isSelected) {
- item.setAttribute('aria-selected', 'true');
- } else {
- item.removeAttribute('aria-selected');
- }
- Polymer.IronSelectableBehavior._applySelection.apply(this, arguments);
- },
-
- /**
- * Discretely updates tabindex values among menu items as the focused item
- * changes.
- *
- * @param {Element} focusedItem The element that is currently focused.
- * @param {?Element} old The last element that was considered focused, if
- * applicable.
- */
- _focusedItemChanged: function(focusedItem, old) {
- old && old.setAttribute('tabindex', '-1');
- if (focusedItem) {
- focusedItem.setAttribute('tabindex', '0');
- focusedItem.focus();
- }
- },
-
- /**
- * A handler that responds to mutation changes related to the list of items
- * in the menu.
- *
- * @param {CustomEvent} event An event containing mutation records as its
- * detail.
- */
- _onIronItemsChanged: function(event) {
- if (event.detail.addedNodes.length) {
- this._resetTabindices();
- }
- },
-
- /**
- * Handler that is called when a shift+tab keypress is detected by the menu.
- *
- * @param {CustomEvent} event A key combination event.
- */
- _onShiftTabDown: function(event) {
- var oldTabIndex = this.getAttribute('tabindex');
-
- Polymer.IronMenuBehaviorImpl._shiftTabPressed = true;
-
- this._setFocusedItem(null);
-
- this.setAttribute('tabindex', '-1');
-
- this.async(function() {
- this.setAttribute('tabindex', oldTabIndex);
- Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
- // NOTE(cdata): polymer/polymer#1305
- }, 1);
- },
-
- /**
- * Handler that is called when the menu receives focus.
- *
- * @param {FocusEvent} event A focus event.
- */
- _onFocus: function(event) {
- if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) {
- // do not focus the menu itself
- return;
- }
-
- // Do not focus the selected tab if the deepest target is part of the
- // menu element's local DOM and is focusable.
- var rootTarget = /** @type {?HTMLElement} */(
- Polymer.dom(event).rootTarget);
- if (rootTarget !== this && typeof rootTarget.tabIndex !== "undefined" && !this.isLightDescendant(rootTarget)) {
- return;
- }
-
- // clear the cached focus item
- this._defaultFocusAsync = this.async(function() {
- // focus the selected item when the menu receives focus, or the first item
- // if no item is selected
- var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
-
- this._setFocusedItem(null);
-
- if (selectedItem) {
- this._setFocusedItem(selectedItem);
- } else if (this.items[0]) {
- // We find the first none-disabled item (if one exists)
- this._focusNext();
- }
- });
- },
-
- /**
- * Handler that is called when the up key is pressed.
- *
- * @param {CustomEvent} event A key combination event.
- */
- _onUpKey: function(event) {
- // up and down arrows moves the focus
- this._focusPrevious();
- event.detail.keyboardEvent.preventDefault();
- },
-
- /**
- * Handler that is called when the down key is pressed.
- *
- * @param {CustomEvent} event A key combination event.
- */
- _onDownKey: function(event) {
- this._focusNext();
- event.detail.keyboardEvent.preventDefault();
- },
-
- /**
- * Handler that is called when the esc key is pressed.
- *
- * @param {CustomEvent} event A key combination event.
- */
- _onEscKey: function(event) {
- // esc blurs the control
- this.focusedItem.blur();
- },
-
- /**
- * Handler that is called when a keydown event is detected.
- *
- * @param {KeyboardEvent} event A keyboard event.
- */
- _onKeydown: function(event) {
- if (!this.keyboardEventMatchesKeys(event, 'up down esc')) {
- // all other keys focus the menu item starting with that character
- this._focusWithKeyboardEvent(event);
- }
- event.stopPropagation();
- },
-
- // override _activateHandler
- _activateHandler: function(event) {
- Polymer.IronSelectableBehavior._activateHandler.call(this, event);
- event.stopPropagation();
- }
- };
-
- Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
-
- /** @polymerBehavior Polymer.IronMenuBehavior */
- Polymer.IronMenuBehavior = [
- Polymer.IronMultiSelectableBehavior,
- Polymer.IronA11yKeysBehavior,
- Polymer.IronMenuBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menubar-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menubar-behavior.html
deleted file mode 100644
index f3b65186104..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-menu-behavior/iron-menubar-behavior.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="iron-menu-behavior.html">
-
-<script>
-
- /**
- * `Polymer.IronMenubarBehavior` implements accessible menubar behavior.
- *
- * @polymerBehavior Polymer.IronMenubarBehavior
- */
- Polymer.IronMenubarBehaviorImpl = {
-
- hostAttributes: {
- 'role': 'menubar'
- },
-
- keyBindings: {
- 'left': '_onLeftKey',
- 'right': '_onRightKey'
- },
-
- _onUpKey: function(event) {
- this.focusedItem.click();
- event.detail.keyboardEvent.preventDefault();
- },
-
- _onDownKey: function(event) {
- this.focusedItem.click();
- event.detail.keyboardEvent.preventDefault();
- },
-
- get _isRTL() {
- return window.getComputedStyle(this)['direction'] === 'rtl';
- },
-
- _onLeftKey: function(event) {
- if (this._isRTL) {
- this._focusNext();
- } else {
- this._focusPrevious();
- }
- event.detail.keyboardEvent.preventDefault();
- },
-
- _onRightKey: function(event) {
- if (this._isRTL) {
- this._focusPrevious();
- } else {
- this._focusNext();
- }
- event.detail.keyboardEvent.preventDefault();
- },
-
- _onKeydown: function(event) {
- if (this.keyboardEventMatchesKeys(event, 'up down left right esc')) {
- return;
- }
-
- // all other keys focus the menu item starting with that character
- this._focusWithKeyboardEvent(event);
- }
-
- };
-
- /** @polymerBehavior Polymer.IronMenubarBehavior */
- Polymer.IronMenubarBehavior = [
- Polymer.IronMenuBehavior,
- Polymer.IronMenubarBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/.bower.json
deleted file mode 100644
index f4bfef4a7cc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/.bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "iron-meta",
- "version": "1.1.1",
- "keywords": [
- "web-components",
- "polymer"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Useful for sharing information across a DOM tree",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-meta.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.4",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "*",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": "iron-meta.html",
- "homepage": "https://github.com/polymerelements/iron-meta",
- "_release": "1.1.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.1",
- "commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
- },
- "_source": "git://github.com/polymerelements/iron-meta.git",
- "_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-meta"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/.travis.yml
deleted file mode 100644
index fd27446be59..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: node_js
-sudo: false
-matrix:
- include:
- - node_js: stable
- script: xvfb-run wct
- addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- - node_js: node
- script:
- - |
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
- wct -s 'default'
- fi
-before_script:
-- npm install web-component-tester
-- npm install bower
-- export PATH=$PWD/node_modules/.bin:$PATH
-- bower install
-env:
- global:
- - secure: eGcuDAJt+1GPrC6u95vHufjnSXWbVBZpW7oKQhZjcHrN19l9COdOb7RVkTPsZzEanHaH/D6Psr4WJKyd72Wx5wj+bqGh4nPHTFSnK3+gNT4eJAgLvsxLwHxW8QkYYHEdZe8Wd6sOdal9geeLZ8fG9xELYEtuJR6lww5uLvFv/cw=
- - secure: DoBz8LDaS4/lQ9sTXE5pnp8fqEvG47mmdQaQ14EnHQ+wLbajIaLk59vRfau5c7mIef8dEgaT40r/kVP5QRr3OiH5UJY3jLnCMVIxWJ3ZTkuGGuU6QDQvoGSSBhdA+b+G94bbK6LtHQxRBrkiyT9d0IzT5ZiHlDlteGbjdDWAgw0=
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/README.md
deleted file mode 100644
index 615c85b6da0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-meta.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/iron-meta.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-meta)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-meta)_
-
-
-##&lt;iron-meta&gt;
-
-
-`iron-meta` is a generic element you can use for sharing information across the DOM tree.
-It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
-instance of iron-meta has access to the shared
-information. You can use `iron-meta` to share whatever you want (or create an extension
-[like x-meta] for enhancements).
-
-The `iron-meta` instances containing your actual data can be loaded in an import,
-or constructed in any way you see fit. The only requirement is that you create them
-before you try to access them.
-
-Examples:
-
-If I create an instance like this:
-
- <iron-meta key="info" value="foo/bar"></iron-meta>
-
-Note that value="foo/bar" is the metadata I've defined. I could define more
-attributes or use child nodes to define additional metadata.
-
-Now I can access that element (and it's metadata) from any iron-meta instance
-via the byKey method, e.g.
-
- meta.byKey('info').getAttribute('value');
-
-Pure imperative form would be like:
-
- document.createElement('iron-meta').byKey('info').getAttribute('value');
-
-Or, in a Polymer element, you can include a meta in your template:
-
- <iron-meta id="meta"></iron-meta>
- ...
- this.$.meta.byKey('info').getAttribute('value');
-
-
-
-##&lt;iron-meta-query&gt;
-
-
-`iron-meta` is a generic element you can use for sharing information across the DOM tree.
-It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
-instance of iron-meta has access to the shared
-information. You can use `iron-meta` to share whatever you want (or create an extension
-[like x-meta] for enhancements).
-
-The `iron-meta` instances containing your actual data can be loaded in an import,
-or constructed in any way you see fit. The only requirement is that you create them
-before you try to access them.
-
-Examples:
-
-If I create an instance like this:
-
- <iron-meta key="info" value="foo/bar"></iron-meta>
-
-Note that value="foo/bar" is the metadata I've defined. I could define more
-attributes or use child nodes to define additional metadata.
-
-Now I can access that element (and it's metadata) from any iron-meta instance
-via the byKey method, e.g.
-
- meta.byKey('info').getAttribute('value');
-
-Pure imperative form would be like:
-
- document.createElement('iron-meta').byKey('info').getAttribute('value');
-
-Or, in a Polymer element, you can include a meta in your template:
-
- <iron-meta id="meta"></iron-meta>
- ...
- this.$.meta.byKey('info').getAttribute('value');
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/bower.json
deleted file mode 100644
index 614c5b3a660..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/bower.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "iron-meta",
- "version": "1.1.1",
- "keywords": [
- "web-components",
- "polymer"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Useful for sharing information across a DOM tree",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-meta.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.4",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "*",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": "iron-meta.html"
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/demo/index.html
deleted file mode 100644
index 3deee3cbd5a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/demo/index.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>iron-meta</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../iron-meta.html">
-</head>
-<body>
-
- <div class="vertical-section vertical-section-container centered">
- <h1>&lt;iron-meta&gt;</h1>
- <iron-meta key="info" value="foo/bar"></iron-meta>
- The <code>value</code> stored at <code>key="info"</code> is <code><meta-test></meta-test></code>.
- </div>
-
- <script>
-
- Polymer({
-
- is: 'meta-test',
-
- ready: function() {
- this.textContent = new Polymer.IronMetaQuery({key: 'info'}).value;
- }
-
- });
-
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/hero.svg
deleted file mode 100755
index ea8548dcecb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/hero.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <circle cx="22" cy="85" r="4"/>
- <circle cx="88" cy="98" r="4"/>
- <path d="M87.5,100c-3.8-0.3-5.5-2.8-7-5c-1.4-2.1-2.7-3.9-5.5-4.2c-2.8-0.3-4.4,1.3-6.2,3.1c-1.9,1.9-4,4-7.8,3.7
- c-3.8-0.3-5.5-2.8-7-5c-1.4-2.1-2.7-3.9-5.5-4.2c-2.8-0.3-4.4,1.3-6.2,3.1c-1.9,1.9-4,4-7.8,3.7c-3.8-0.3-5.5-2.8-7-5
- c-1.4-2.1-2.7-3.9-5.5-4.2l0.2-2c3.8,0.3,5.5,2.8,7,5c1.4,2.1,2.7,3.9,5.5,4.2c2.8,0.3,4.4-1.3,6.2-3.1c1.9-1.9,4-4,7.8-3.7
- c3.8,0.3,5.5,2.8,7,5c1.4,2.1,2.7,3.9,5.5,4.2c2.8,0.3,4.4-1.3,6.2-3.1c1.9-1.9,4-4,7.8-3.7c3.8,0.3,5.5,2.8,7,5
- c1.4,2.1,2.7,3.9,5.5,4.2L87.5,100z"/>
- <circle cx="96" cy="86" r="4"/>
- <circle cx="162" cy="98" r="4"/>
- <rect x="95.5" y="91" transform="matrix(0.9839 0.1789 -0.1789 0.9839 18.5382 -21.5923)" width="67.1" height="2"/>
- <g>
- <path d="M27,41.5l4.5,13.4l4.9-13.4h5.4v32h-4.4V61l0.4-13.4l-5.4,14.5h-2L25.6,48L26,61v12.5h-4.4v-32H27z"/>
- <path d="M67.5,58.7H53.4V70h16.4v3.5H49v-32h20.6V45H53.4v10.2h14.2V58.7z"/>
- <path d="M98.5,45H88.3v28.5h-4.4V45H73.6v-3.5h24.9V45z"/>
- <path d="M116.2,65.3H105l-2.6,8.2h-4.5l10.9-32h3.8l10.6,32h-4.5L116.2,65.3z M106.2,61.6h8.9l-4.4-14.2L106.2,61.6z"/>
- </g>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/index.html
deleted file mode 100644
index c70dc6e5dae..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>iron-meta</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/iron-meta.html b/chromium/third_party/catapult/third_party/polymer/components/iron-meta/iron-meta.html
deleted file mode 100644
index 1521be5c0ea..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-meta/iron-meta.html
+++ /dev/null
@@ -1,333 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<!--
-`iron-meta` is a generic element you can use for sharing information across the DOM tree.
-It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
-instance of iron-meta has access to the shared
-information. You can use `iron-meta` to share whatever you want (or create an extension
-[like x-meta] for enhancements).
-
-The `iron-meta` instances containing your actual data can be loaded in an import,
-or constructed in any way you see fit. The only requirement is that you create them
-before you try to access them.
-
-Examples:
-
-If I create an instance like this:
-
- <iron-meta key="info" value="foo/bar"></iron-meta>
-
-Note that value="foo/bar" is the metadata I've defined. I could define more
-attributes or use child nodes to define additional metadata.
-
-Now I can access that element (and it's metadata) from any iron-meta instance
-via the byKey method, e.g.
-
- meta.byKey('info').getAttribute('value');
-
-Pure imperative form would be like:
-
- document.createElement('iron-meta').byKey('info').getAttribute('value');
-
-Or, in a Polymer element, you can include a meta in your template:
-
- <iron-meta id="meta"></iron-meta>
- ...
- this.$.meta.byKey('info').getAttribute('value');
-
-@group Iron Elements
-@demo demo/index.html
-@hero hero.svg
-@element iron-meta
--->
-
-<script>
-
- (function() {
-
- // monostate data
- var metaDatas = {};
- var metaArrays = {};
- var singleton = null;
-
- Polymer.IronMeta = Polymer({
-
- is: 'iron-meta',
-
- properties: {
-
- /**
- * The type of meta-data. All meta-data of the same type is stored
- * together.
- */
- type: {
- type: String,
- value: 'default',
- observer: '_typeChanged'
- },
-
- /**
- * The key used to store `value` under the `type` namespace.
- */
- key: {
- type: String,
- observer: '_keyChanged'
- },
-
- /**
- * The meta-data to store or retrieve.
- */
- value: {
- type: Object,
- notify: true,
- observer: '_valueChanged'
- },
-
- /**
- * If true, `value` is set to the iron-meta instance itself.
- */
- self: {
- type: Boolean,
- observer: '_selfChanged'
- },
-
- /**
- * Array of all meta-data values for the given type.
- */
- list: {
- type: Array,
- notify: true
- }
-
- },
-
- hostAttributes: {
- hidden: true
- },
-
- /**
- * Only runs if someone invokes the factory/constructor directly
- * e.g. `new Polymer.IronMeta()`
- *
- * @param {{type: (string|undefined), key: (string|undefined), value}=} config
- */
- factoryImpl: function(config) {
- if (config) {
- for (var n in config) {
- switch(n) {
- case 'type':
- case 'key':
- case 'value':
- this[n] = config[n];
- break;
- }
- }
- }
- },
-
- created: function() {
- // TODO(sjmiles): good for debugging?
- this._metaDatas = metaDatas;
- this._metaArrays = metaArrays;
- },
-
- _keyChanged: function(key, old) {
- this._resetRegistration(old);
- },
-
- _valueChanged: function(value) {
- this._resetRegistration(this.key);
- },
-
- _selfChanged: function(self) {
- if (self) {
- this.value = this;
- }
- },
-
- _typeChanged: function(type) {
- this._unregisterKey(this.key);
- if (!metaDatas[type]) {
- metaDatas[type] = {};
- }
- this._metaData = metaDatas[type];
- if (!metaArrays[type]) {
- metaArrays[type] = [];
- }
- this.list = metaArrays[type];
- this._registerKeyValue(this.key, this.value);
- },
-
- /**
- * Retrieves meta data value by key.
- *
- * @method byKey
- * @param {string} key The key of the meta-data to be returned.
- * @return {*}
- */
- byKey: function(key) {
- return this._metaData && this._metaData[key];
- },
-
- _resetRegistration: function(oldKey) {
- this._unregisterKey(oldKey);
- this._registerKeyValue(this.key, this.value);
- },
-
- _unregisterKey: function(key) {
- this._unregister(key, this._metaData, this.list);
- },
-
- _registerKeyValue: function(key, value) {
- this._register(key, value, this._metaData, this.list);
- },
-
- _register: function(key, value, data, list) {
- if (key && data && value !== undefined) {
- data[key] = value;
- list.push(value);
- }
- },
-
- _unregister: function(key, data, list) {
- if (key && data) {
- if (key in data) {
- var value = data[key];
- delete data[key];
- this.arrayDelete(list, value);
- }
- }
- }
-
- });
-
- Polymer.IronMeta.getIronMeta = function getIronMeta() {
- if (singleton === null) {
- singleton = new Polymer.IronMeta();
- }
- return singleton;
- };
-
- /**
- `iron-meta-query` can be used to access infomation stored in `iron-meta`.
-
- Examples:
-
- If I create an instance like this:
-
- <iron-meta key="info" value="foo/bar"></iron-meta>
-
- Note that value="foo/bar" is the metadata I've defined. I could define more
- attributes or use child nodes to define additional metadata.
-
- Now I can access that element (and it's metadata) from any `iron-meta-query` instance:
-
- var value = new Polymer.IronMetaQuery({key: 'info'}).value;
-
- @group Polymer Iron Elements
- @element iron-meta-query
- */
- Polymer.IronMetaQuery = Polymer({
-
- is: 'iron-meta-query',
-
- properties: {
-
- /**
- * The type of meta-data. All meta-data of the same type is stored
- * together.
- */
- type: {
- type: String,
- value: 'default',
- observer: '_typeChanged'
- },
-
- /**
- * Specifies a key to use for retrieving `value` from the `type`
- * namespace.
- */
- key: {
- type: String,
- observer: '_keyChanged'
- },
-
- /**
- * The meta-data to store or retrieve.
- */
- value: {
- type: Object,
- notify: true,
- readOnly: true
- },
-
- /**
- * Array of all meta-data values for the given type.
- */
- list: {
- type: Array,
- notify: true
- }
-
- },
-
- /**
- * Actually a factory method, not a true constructor. Only runs if
- * someone invokes it directly (via `new Polymer.IronMeta()`);
- *
- * @param {{type: (string|undefined), key: (string|undefined)}=} config
- */
- factoryImpl: function(config) {
- if (config) {
- for (var n in config) {
- switch(n) {
- case 'type':
- case 'key':
- this[n] = config[n];
- break;
- }
- }
- }
- },
-
- created: function() {
- // TODO(sjmiles): good for debugging?
- this._metaDatas = metaDatas;
- this._metaArrays = metaArrays;
- },
-
- _keyChanged: function(key) {
- this._setValue(this._metaData && this._metaData[key]);
- },
-
- _typeChanged: function(type) {
- this._metaData = metaDatas[type];
- this.list = metaArrays[type];
- if (this.key) {
- this._keyChanged(this.key);
- }
- },
-
- /**
- * Retrieves meta data value by key.
- * @param {string} key The key of the meta-data to be returned.
- * @return {*}
- */
- byKey: function(key) {
- return this._metaData && this._metaData[key];
- }
-
- });
-
- })();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.bower.json
deleted file mode 100644
index d4e20a5aa1d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.bower.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "iron-overlay-behavior",
- "version": "1.8.2",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Provides a behavior for making an element an overlay",
- "private": true,
- "main": "iron-overlay-behavior.html",
- "keywords": [
- "web-components",
- "polymer",
- "behavior",
- "overlay"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-overlay-behavior.git"
- },
- "dependencies": {
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.0.0",
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.2",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/polymerelements/iron-overlay-behavior",
- "_release": "1.8.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.8.2",
- "commit": "9d0fc18ed7b6a8d3e9ec244d20897e4803ec3201"
- },
- "_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-overlay-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.github/ISSUE_TEMPLATE.md b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 9925d374459..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- Instructions: https://github.com/PolymerElements/iron-overlay-behavior/CONTRIBUTING.md#filing-issues -->
-### Description
-<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
-
-### Expected outcome
-
-<!-- Example: The page stays the same color. -->
-
-### Actual outcome
-
-<!-- Example: The page turns pink. -->
-
-### Live Demo
-<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
-
-### Steps to reproduce
-
-<!-- Example
-1. Put a `paper-foo` element in the page.
-2. Open the page in a web browser.
-3. Click the `paper-foo` element.
--->
-
-### Browsers Affected
-<!-- Check all that apply -->
-- [ ] Chrome
-- [ ] Firefox
-- [ ] Safari 9
-- [ ] Safari 8
-- [ ] Safari 7
-- [ ] Edge
-- [ ] IE 11
-- [ ] IE 10
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.travis.yml
deleted file mode 100644
index 73919f91f4a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: H8AA9JkWfG/vc3MiimoIoYi45KD10hKzitLJnExkomgzFI/f5o9SGtwjCii5P8Kvf4xndftDjYwRgbYyJpSg0IJeq8rm1WS89cY8O6/1dlI/tK1j5xbVRrhqmRQncxUb3K4MAT6Z9br1jwEeamRa+NKmq+v+VEpQY5vwuQ/BHJw=
- - secure: EaE1AUVgWyn0Y6kqkb54z5r39RvTJzAOmeM0lRl7wXzr5k0mq3VGlxTksJqCVd1PdJESXEhy8eldBnlkwZir/imDTNQxKm13k7ZiFC0000XAzpLZElkH2cLlYCRWcuM+vS7dA9hytV0UcGK2VGqbxfpcesB20dPSneDEUuc5X64=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/README.md
deleted file mode 100644
index 7dc5b30df39..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-overlay-backdrop.html iron-overlay-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-overlay-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-overlay-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-overlay-behavior)_
-
-
-##Polymer.IronOverlayBehavior
-
-Use `Polymer.IronOverlayBehavior` to implement an element that can be hidden or shown, and displays
-on top of other content. It includes an optional backdrop, and can be used to implement a variety
-of UI controls including dialogs and drop downs. Multiple overlays may be displayed at once.
-
-### Closing and canceling
-
-A dialog may be hidden by closing or canceling. The difference between close and cancel is user
-intent. Closing generally implies that the user acknowledged the content on the overlay. By default,
-it will cancel whenever the user taps outside it or presses the escape key. This behavior is
-configurable with the `no-cancel-on-esc-key` and the `no-cancel-on-outside-click` properties.
-`close()` should be called explicitly by the implementer when the user interacts with a control
-in the overlay element. When the dialog is canceled, the overlay fires an 'iron-overlay-canceled'
-event. Call `preventDefault` on this event to prevent the overlay from closing.
-
-### Positioning
-
-By default the element is sized and positioned to fit and centered inside the window. You can
-position and size it manually using CSS. See `Polymer.IronFitBehavior`.
-
-### Backdrop
-
-Set the `with-backdrop` attribute to display a backdrop behind the overlay. The backdrop is
-appended to `<body>` and is of type `<iron-overlay-backdrop>`. See its doc page for styling
-options.
-
-### Limitations
-
-The element is styled to appear on top of other content by setting its `z-index` property. You
-must ensure no element has a stacking context with a higher `z-index` than its parent stacking
-context. You should place this element as a child of `<body>` whenever possible.
-
-
-
-##&lt;iron-overlay-backdrop&gt;
-
-`iron-overlay-backdrop` is a backdrop used by `Polymer.IronOverlayBehavior`. It should be a
-singleton.
-
-### Styling
-
-The following custom properties and mixins are available for styling.
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--iron-overlay-backdrop-background-color` | Backdrop background color | #000 |
-| `--iron-overlay-backdrop-opacity` | Backdrop opacity | 0.6 |
-| `--iron-overlay-backdrop` | Mixin applied to `iron-overlay-backdrop`. | {} |
-| `--iron-overlay-backdrop-opened` | Mixin applied to `iron-overlay-backdrop` when it is displayed | {} |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/bower.json
deleted file mode 100644
index 2443076b88c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/bower.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "iron-overlay-behavior",
- "version": "1.8.2",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Provides a behavior for making an element an overlay",
- "private": true,
- "main": "iron-overlay-behavior.html",
- "keywords": [
- "web-components",
- "polymer",
- "behavior",
- "overlay"
- ],
- "authors": [
- "The Polymer Authors"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-overlay-behavior.git"
- },
- "dependencies": {
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.0.0",
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.2",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/index.html
deleted file mode 100644
index 92ed1e052dd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/index.html
+++ /dev/null
@@ -1,179 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-
-<head>
-
- <title>simple-overlay demo</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="simple-overlay.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- demo-snippet {
- --demo-snippet-code: {
- max-height: 250px;
- }
- }
- </style>
-
-</head>
-
-<body unresolved class="centered">
-
- <h3>An element with <code>IronOverlayBehavior</code> can be opened, closed, toggled.</h3>
- <demo-snippet>
- <template>
- <button onclick="plain.open()">Plain overlay</button>
- <simple-overlay id="plain" tabindex=-1>
- <h2>Hello world!</h2>
- <p>This can be closed by pressing the ESC key too.</p>
- <button onclick="plain.close()">Close</button>
- </simple-overlay>
- </template>
- </demo-snippet>
-
- <h3>Use <code>with-backdrop</code> to add a backdrop to your overlay. Tabbing will be trapped within the overlay.</h3>
- <demo-snippet>
- <template>
- <button onclick="backdrop.open()">Overlay with backdrop</button>
- <simple-overlay id="backdrop" with-backdrop>
- <p>Hello world!</p>
- <button>Button</button>
- <button onclick="backdrop.close()">Close</button>
- </simple-overlay>
- </template>
- </demo-snippet>
-
- <h3>Use <code>restore-focus-on-close</code> to return the focus to the element that opened the overlay when it gets closed.</h3>
- <demo-snippet>
- <template>
- <button onclick="returnFocus.open()">Overlay that restores focus</button>
- <simple-overlay id="returnFocus" restore-focus-on-close>
- <p>Hello world!</p>
- <button onclick="returnFocus.close()">Close</button>
- </simple-overlay>
- </template>
- </demo-snippet>
-
- <h3>The child with <code>autofocus</code> gets focused when opening the overlay.</h3>
- <demo-snippet>
- <template>
- <button onclick="withAutofocus.open()">Overlay with autofocus child</button>
- <simple-overlay id="withAutofocus">
- <p>Hello world!</p>
- <button autofocus>autofocus</button>
- <button onclick="withAutofocus.close()">Close</button>
- </simple-overlay>
- </template>
- </demo-snippet>
-
- <h3>Multiple overlays can be opened.</h3>
- <demo-snippet>
- <template>
- <button onclick="multiple.open()">Open first overlay</button>
- <simple-overlay id="multiple" tabindex=-1>
- <p>click to open another overlay</p>
- <button onclick="multiple2.open()">Open second overlay</button>
- <button onclick="multiple.close()">Close this</button>
- </simple-overlay>
- <simple-overlay id="multiple2" tabindex=-1>
- <h2>Hi!</h2>
- <button onclick="multiple2.close()">Close</button>
- </simple-overlay>
- </template>
- </demo-snippet>
-
- <h3>Use <code>always-on-top</code> to keep the overlay on top of others.</h3>
- <demo-snippet>
- <template>
- <button onclick="onTop.open()">Open always-on-top</button>
- <simple-overlay id="onTop" always-on-top tabindex=-1>
- <h2>Always on top</h2>
- <button onclick="backdrop2.open()">Open with backdrop</button>
- <button onclick="onTop.close()">Close this</button>
- </simple-overlay>
- <simple-overlay id="backdrop2" with-backdrop tabindex=-1>
- <h2>With backdrop</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <button onclick="backdrop2.close()">Close</button>
- </simple-overlay>
- </template>
- </demo-snippet>
-
- <h3>An element with <code>IronOverlayBehavior</code> can be scrollable or contain scrollable content.</h3>
- <demo-snippet>
- <template>
- <style>
- .with-margin {
- margin: 24px 40px;
- }
- .scrollable {
- max-height: 300px;
- overflow: auto;
- }
- </style>
- <button onclick="scrolling.open()">Scrolling overlay</button>
-
- <simple-overlay id="scrolling" class="with-margin scrollable" tabindex=-1>
- <h2>This dialog scrolls internally.</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <button onclick="scrolling.close()">Close</button>
- </simple-overlay>
-
- <button onclick="scrolling2.open()">Scrolling content</button>
-
- <simple-overlay id="scrolling2" class="with-margin" tabindex=-1>
- <h2>This dialog has a scrolling child.</h2>
- <div class="scrollable">
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
- dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </div>
- <p>
- <button onclick="scrolling2.close()">Close</button>
- </p>
-
- </simple-overlay>
- </template>
- </demo-snippet>
-
-</body>
-
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/simple-overlay.html b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/simple-overlay.html
deleted file mode 100644
index 7eab2432ac6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/demo/simple-overlay.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-overlay-behavior.html">
-
-<dom-module id="simple-overlay">
-
- <style>
-
- :host {
- background: white;
- color: black;
- padding: 24px;
- box-shadow: rgba(0, 0, 0, 0.24) -2.3408942051048403px 5.524510324047423px 12.090680100755666px 0px, rgba(0, 0, 0, 0.12) 0px 0px 12px 0px;
- }
-
- </style>
-
- <template>
- <content></content>
- </template>
-
-</dom-module>
-
-<script>
-
-(function() {
-
- Polymer({
-
- is: 'simple-overlay',
-
- behaviors: [
- Polymer.IronOverlayBehavior
- ]
-
- });
-
-})();
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/index.html
deleted file mode 100644
index d69e30442ea..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-overlay-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-backdrop.html b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-backdrop.html
deleted file mode 100644
index 432a57e1132..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-backdrop.html
+++ /dev/null
@@ -1,168 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<!--
-`iron-overlay-backdrop` is a backdrop used by `Polymer.IronOverlayBehavior`. It should be a
-singleton.
-
-### Styling
-
-The following custom properties and mixins are available for styling.
-
-Custom property | Description | Default
--------------------------------------------|------------------------|---------
-`--iron-overlay-backdrop-background-color` | Backdrop background color | #000
-`--iron-overlay-backdrop-opacity` | Backdrop opacity | 0.6
-`--iron-overlay-backdrop` | Mixin applied to `iron-overlay-backdrop`. | {}
-`--iron-overlay-backdrop-opened` | Mixin applied to `iron-overlay-backdrop` when it is displayed | {}
--->
-
-<dom-module id="iron-overlay-backdrop">
-
- <template>
- <style>
- :host {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: var(--iron-overlay-backdrop-background-color, #000);
- opacity: 0;
- transition: opacity 0.2s;
- pointer-events: none;
- @apply(--iron-overlay-backdrop);
- }
-
- :host(.opened) {
- opacity: var(--iron-overlay-backdrop-opacity, 0.6);
- pointer-events: auto;
- @apply(--iron-overlay-backdrop-opened);
- }
- </style>
-
- <content></content>
- </template>
-
-</dom-module>
-
-<script>
-(function() {
-'use strict';
-
- Polymer({
-
- is: 'iron-overlay-backdrop',
-
- properties: {
-
- /**
- * Returns true if the backdrop is opened.
- */
- opened: {
- reflectToAttribute: true,
- type: Boolean,
- value: false,
- observer: '_openedChanged'
- }
-
- },
-
- listeners: {
- 'transitionend': '_onTransitionend'
- },
-
- created: function() {
- // Used to cancel previous requestAnimationFrame calls when opened changes.
- this.__openedRaf = null;
- },
-
- attached: function() {
- this.opened && this._openedChanged(this.opened);
- },
-
- /**
- * Appends the backdrop to document body if needed.
- */
- prepare: function() {
- if (this.opened && !this.parentNode) {
- Polymer.dom(document.body).appendChild(this);
- }
- },
-
- /**
- * Shows the backdrop.
- */
- open: function() {
- this.opened = true;
- },
-
- /**
- * Hides the backdrop.
- */
- close: function() {
- this.opened = false;
- },
-
- /**
- * Removes the backdrop from document body if needed.
- */
- complete: function() {
- if (!this.opened && this.parentNode === document.body) {
- Polymer.dom(this.parentNode).removeChild(this);
- }
- },
-
- _onTransitionend: function(event) {
- if (event && event.target === this) {
- this.complete();
- }
- },
-
- /**
- * @param {boolean} opened
- * @private
- */
- _openedChanged: function(opened) {
- if (opened) {
- // Auto-attach.
- this.prepare();
- } else {
- // Animation might be disabled via the mixin or opacity custom property.
- // If it is disabled in other ways, it's up to the user to call complete.
- var cs = window.getComputedStyle(this);
- if (cs.transitionDuration === '0s' || cs.opacity == 0) {
- this.complete();
- }
- }
-
- if (!this.isAttached) {
- return;
- }
-
- // Always cancel previous requestAnimationFrame.
- if (this.__openedRaf) {
- window.cancelAnimationFrame(this.__openedRaf);
- this.__openedRaf = null;
- }
- // Force relayout to ensure proper transitions.
- this.scrollTop = this.scrollTop;
- this.__openedRaf = window.requestAnimationFrame(function() {
- this.__openedRaf = null;
- this.toggleClass('opened', this.opened);
- }.bind(this));
- }
- });
-
-})();
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-behavior.html
deleted file mode 100644
index b1f2326661e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-behavior.html
+++ /dev/null
@@ -1,628 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-fit-behavior/iron-fit-behavior.html">
-<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
-<link rel="import" href="iron-overlay-manager.html">
-
-<script>
-(function() {
-'use strict';
-
-/**
-Use `Polymer.IronOverlayBehavior` to implement an element that can be hidden or shown, and displays
-on top of other content. It includes an optional backdrop, and can be used to implement a variety
-of UI controls including dialogs and drop downs. Multiple overlays may be displayed at once.
-
-See the [demo source code](https://github.com/PolymerElements/iron-overlay-behavior/blob/master/demo/simple-overlay.html)
-for an example.
-
-### Closing and canceling
-
-An overlay may be hidden by closing or canceling. The difference between close and cancel is user
-intent. Closing generally implies that the user acknowledged the content on the overlay. By default,
-it will cancel whenever the user taps outside it or presses the escape key. This behavior is
-configurable with the `no-cancel-on-esc-key` and the `no-cancel-on-outside-click` properties.
-`close()` should be called explicitly by the implementer when the user interacts with a control
-in the overlay element. When the dialog is canceled, the overlay fires an 'iron-overlay-canceled'
-event. Call `preventDefault` on this event to prevent the overlay from closing.
-
-### Positioning
-
-By default the element is sized and positioned to fit and centered inside the window. You can
-position and size it manually using CSS. See `Polymer.IronFitBehavior`.
-
-### Backdrop
-
-Set the `with-backdrop` attribute to display a backdrop behind the overlay. The backdrop is
-appended to `<body>` and is of type `<iron-overlay-backdrop>`. See its doc page for styling
-options.
-
-In addition, `with-backdrop` will wrap the focus within the content in the light DOM.
-Override the [`_focusableNodes` getter](#Polymer.IronOverlayBehavior:property-_focusableNodes)
-to achieve a different behavior.
-
-### Limitations
-
-The element is styled to appear on top of other content by setting its `z-index` property. You
-must ensure no element has a stacking context with a higher `z-index` than its parent stacking
-context. You should place this element as a child of `<body>` whenever possible.
-
-@demo demo/index.html
-@polymerBehavior Polymer.IronOverlayBehavior
-*/
-
- Polymer.IronOverlayBehaviorImpl = {
-
- properties: {
-
- /**
- * True if the overlay is currently displayed.
- */
- opened: {
- observer: '_openedChanged',
- type: Boolean,
- value: false,
- notify: true
- },
-
- /**
- * True if the overlay was canceled when it was last closed.
- */
- canceled: {
- observer: '_canceledChanged',
- readOnly: true,
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to display a backdrop behind the overlay. It traps the focus
- * within the light DOM of the overlay.
- */
- withBackdrop: {
- observer: '_withBackdropChanged',
- type: Boolean
- },
-
- /**
- * Set to true to disable auto-focusing the overlay or child nodes with
- * the `autofocus` attribute` when the overlay is opened.
- */
- noAutoFocus: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to disable canceling the overlay with the ESC key.
- */
- noCancelOnEscKey: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to disable canceling the overlay by clicking outside it.
- */
- noCancelOnOutsideClick: {
- type: Boolean,
- value: false
- },
-
- /**
- * Contains the reason(s) this overlay was last closed (see `iron-overlay-closed`).
- * `IronOverlayBehavior` provides the `canceled` reason; implementers of the
- * behavior can provide other reasons in addition to `canceled`.
- */
- closingReason: {
- // was a getter before, but needs to be a property so other
- // behaviors can override this.
- type: Object
- },
-
- /**
- * Set to true to enable restoring of focus when overlay is closed.
- */
- restoreFocusOnClose: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to keep overlay always on top.
- */
- alwaysOnTop: {
- type: Boolean
- },
-
- /**
- * Shortcut to access to the overlay manager.
- * @private
- * @type {Polymer.IronOverlayManagerClass}
- */
- _manager: {
- type: Object,
- value: Polymer.IronOverlayManager
- },
-
- /**
- * The node being focused.
- * @type {?Node}
- */
- _focusedChild: {
- type: Object
- }
-
- },
-
- listeners: {
- 'iron-resize': '_onIronResize'
- },
-
- /**
- * The backdrop element.
- * @type {Element}
- */
- get backdropElement() {
- return this._manager.backdropElement;
- },
-
- /**
- * Returns the node to give focus to.
- * @type {Node}
- */
- get _focusNode() {
- return this._focusedChild || Polymer.dom(this).querySelector('[autofocus]') || this;
- },
-
- /**
- * Array of nodes that can receive focus (overlay included), ordered by `tabindex`.
- * This is used to retrieve which is the first and last focusable nodes in order
- * to wrap the focus for overlays `with-backdrop`.
- *
- * If you know what is your content (specifically the first and last focusable children),
- * you can override this method to return only `[firstFocusable, lastFocusable];`
- * @type {Array<Node>}
- * @protected
- */
- get _focusableNodes() {
- // Elements that can be focused even if they have [disabled] attribute.
- var FOCUSABLE_WITH_DISABLED = [
- 'a[href]',
- 'area[href]',
- 'iframe',
- '[tabindex]',
- '[contentEditable=true]'
- ];
-
- // Elements that cannot be focused if they have [disabled] attribute.
- var FOCUSABLE_WITHOUT_DISABLED = [
- 'input',
- 'select',
- 'textarea',
- 'button'
- ];
-
- // Discard elements with tabindex=-1 (makes them not focusable).
- var selector = FOCUSABLE_WITH_DISABLED.join(':not([tabindex="-1"]),') +
- ':not([tabindex="-1"]),' +
- FOCUSABLE_WITHOUT_DISABLED.join(':not([disabled]):not([tabindex="-1"]),') +
- ':not([disabled]):not([tabindex="-1"])';
-
- var focusables = Polymer.dom(this).querySelectorAll(selector);
- if (this.tabIndex >= 0) {
- // Insert at the beginning because we might have all elements with tabIndex = 0,
- // and the overlay should be the first of the list.
- focusables.splice(0, 0, this);
- }
- // Sort by tabindex.
- return focusables.sort(function (a, b) {
- if (a.tabIndex === b.tabIndex) {
- return 0;
- }
- if (a.tabIndex === 0 || a.tabIndex > b.tabIndex) {
- return 1;
- }
- return -1;
- });
- },
-
- ready: function() {
- // Used to skip calls to notifyResize and refit while the overlay is animating.
- this.__isAnimating = false;
- // with-backdrop needs tabindex to be set in order to trap the focus.
- // If it is not set, IronOverlayBehavior will set it, and remove it if with-backdrop = false.
- this.__shouldRemoveTabIndex = false;
- // Used for wrapping the focus on TAB / Shift+TAB.
- this.__firstFocusableNode = this.__lastFocusableNode = null;
- // Used for requestAnimationFrame when opened changes.
- this.__openChangedAsync = null;
- // Used for requestAnimationFrame when iron-resize is fired.
- this.__onIronResizeAsync = null;
- this._ensureSetup();
- },
-
- attached: function() {
- // Call _openedChanged here so that position can be computed correctly.
- if (this.opened) {
- this._openedChanged();
- }
- this._observer = Polymer.dom(this).observeNodes(this._onNodesChange);
- },
-
- detached: function() {
- Polymer.dom(this).unobserveNodes(this._observer);
- this._observer = null;
- this.opened = false;
- },
-
- /**
- * Toggle the opened state of the overlay.
- */
- toggle: function() {
- this._setCanceled(false);
- this.opened = !this.opened;
- },
-
- /**
- * Open the overlay.
- */
- open: function() {
- this._setCanceled(false);
- this.opened = true;
- },
-
- /**
- * Close the overlay.
- */
- close: function() {
- this._setCanceled(false);
- this.opened = false;
- },
-
- /**
- * Cancels the overlay.
- * @param {Event=} event The original event
- */
- cancel: function(event) {
- var cancelEvent = this.fire('iron-overlay-canceled', event, {cancelable: true});
- if (cancelEvent.defaultPrevented) {
- return;
- }
-
- this._setCanceled(true);
- this.opened = false;
- },
-
- _ensureSetup: function() {
- if (this._overlaySetup) {
- return;
- }
- this._overlaySetup = true;
- this.style.outline = 'none';
- this.style.display = 'none';
- },
-
- _openedChanged: function() {
- if (this.opened) {
- this.removeAttribute('aria-hidden');
- } else {
- this.setAttribute('aria-hidden', 'true');
- }
-
- // wait to call after ready only if we're initially open
- if (!this._overlaySetup) {
- return;
- }
-
- if (this.__openChangedAsync) {
- window.cancelAnimationFrame(this.__openChangedAsync);
- }
-
- // Synchronously remove the overlay.
- // The adding is done asynchronously to go out of the scope of the event
- // which might have generated the opening.
- if (!this.opened) {
- this._manager.removeOverlay(this);
- }
-
- // Defer any animation-related code on attached
- // (_openedChanged gets called again on attached).
- if (!this.isAttached) {
- return;
- }
-
- this.__isAnimating = true;
-
- // requestAnimationFrame for non-blocking rendering
- this.__openChangedAsync = window.requestAnimationFrame(function() {
- this.__openChangedAsync = null;
- if (this.opened) {
- this._manager.addOverlay(this);
- this._prepareRenderOpened();
- this._renderOpened();
- } else {
- this._renderClosed();
- }
- }.bind(this));
- },
-
- _canceledChanged: function() {
- this.closingReason = this.closingReason || {};
- this.closingReason.canceled = this.canceled;
- },
-
- _withBackdropChanged: function() {
- // If tabindex is already set, no need to override it.
- if (this.withBackdrop && !this.hasAttribute('tabindex')) {
- this.setAttribute('tabindex', '-1');
- this.__shouldRemoveTabIndex = true;
- } else if (this.__shouldRemoveTabIndex) {
- this.removeAttribute('tabindex');
- this.__shouldRemoveTabIndex = false;
- }
- if (this.opened && this.isAttached) {
- this._manager.trackBackdrop();
- }
- },
-
- /**
- * tasks which must occur before opening; e.g. making the element visible.
- * @protected
- */
- _prepareRenderOpened: function() {
-
- // Needed to calculate the size of the overlay so that transitions on its size
- // will have the correct starting points.
- this._preparePositioning();
- this.refit();
- this._finishPositioning();
-
- // Safari will apply the focus to the autofocus element when displayed for the first time,
- // so we blur it. Later, _applyFocus will set the focus if necessary.
- if (this.noAutoFocus && document.activeElement === this._focusNode) {
- this._focusNode.blur();
- }
- },
-
- /**
- * Tasks which cause the overlay to actually open; typically play an animation.
- * @protected
- */
- _renderOpened: function() {
- this._finishRenderOpened();
- },
-
- /**
- * Tasks which cause the overlay to actually close; typically play an animation.
- * @protected
- */
- _renderClosed: function() {
- this._finishRenderClosed();
- },
-
- /**
- * Tasks to be performed at the end of open action. Will fire `iron-overlay-opened`.
- * @protected
- */
- _finishRenderOpened: function() {
- // Focus the child node with [autofocus]
- this._applyFocus();
-
- this.notifyResize();
- this.__isAnimating = false;
-
- // Store it so we don't query too much.
- var focusableNodes = this._focusableNodes;
- this.__firstFocusableNode = focusableNodes[0];
- this.__lastFocusableNode = focusableNodes[focusableNodes.length - 1];
-
- this.fire('iron-overlay-opened');
- },
-
- /**
- * Tasks to be performed at the end of close action. Will fire `iron-overlay-closed`.
- * @protected
- */
- _finishRenderClosed: function() {
- // Hide the overlay and remove the backdrop.
- this.style.display = 'none';
- // Reset z-index only at the end of the animation.
- this.style.zIndex = '';
-
- this._applyFocus();
-
- this.notifyResize();
- this.__isAnimating = false;
- this.fire('iron-overlay-closed', this.closingReason);
- },
-
- _preparePositioning: function() {
- this.style.transition = this.style.webkitTransition = 'none';
- this.style.transform = this.style.webkitTransform = 'none';
- this.style.display = '';
- },
-
- _finishPositioning: function() {
- // First, make it invisible & reactivate animations.
- this.style.display = 'none';
- // Force reflow before re-enabling animations so that they don't start.
- // Set scrollTop to itself so that Closure Compiler doesn't remove this.
- this.scrollTop = this.scrollTop;
- this.style.transition = this.style.webkitTransition = '';
- this.style.transform = this.style.webkitTransform = '';
- // Now that animations are enabled, make it visible again
- this.style.display = '';
- // Force reflow, so that following animations are properly started.
- // Set scrollTop to itself so that Closure Compiler doesn't remove this.
- this.scrollTop = this.scrollTop;
- },
-
- /**
- * Applies focus according to the opened state.
- * @protected
- */
- _applyFocus: function() {
- if (this.opened) {
- if (!this.noAutoFocus) {
- this._focusNode.focus();
- }
- } else {
- this._focusNode.blur();
- this._focusedChild = null;
- this._manager.focusOverlay();
- }
- },
-
- /**
- * Cancels (closes) the overlay. Call when click happens outside the overlay.
- * @param {!Event} event
- * @protected
- */
- _onCaptureClick: function(event) {
- if (!this.noCancelOnOutsideClick) {
- this.cancel(event);
- }
- },
-
- /**
- * Keeps track of the focused child. If withBackdrop, traps focus within overlay.
- * @param {!Event} event
- * @protected
- */
- _onCaptureFocus: function (event) {
- if (!this.withBackdrop) {
- return;
- }
- var path = Polymer.dom(event).path;
- if (path.indexOf(this) === -1) {
- event.stopPropagation();
- this._applyFocus();
- } else {
- this._focusedChild = path[0];
- }
- },
-
- /**
- * Handles the ESC key event and cancels (closes) the overlay.
- * @param {!Event} event
- * @protected
- */
- _onCaptureEsc: function(event) {
- if (!this.noCancelOnEscKey) {
- this.cancel(event);
- }
- },
-
- /**
- * Handles TAB key events to track focus changes.
- * Will wrap focus for overlays withBackdrop.
- * @param {!Event} event
- * @protected
- */
- _onCaptureTab: function(event) {
- if (!this.withBackdrop) {
- return;
- }
- // TAB wraps from last to first focusable.
- // Shift + TAB wraps from first to last focusable.
- var shift = event.shiftKey;
- var nodeToCheck = shift ? this.__firstFocusableNode : this.__lastFocusableNode;
- var nodeToSet = shift ? this.__lastFocusableNode : this.__firstFocusableNode;
- var shouldWrap = false;
- if (nodeToCheck === nodeToSet) {
- // If nodeToCheck is the same as nodeToSet, it means we have an overlay
- // with 0 or 1 focusables; in either case we still need to trap the
- // focus within the overlay.
- shouldWrap = true;
- } else {
- // In dom=shadow, the manager will receive focus changes on the main
- // root but not the ones within other shadow roots, so we can't rely on
- // _focusedChild, but we should check the deepest active element.
- var focusedNode = this._manager.deepActiveElement;
- // If the active element is not the nodeToCheck but the overlay itself,
- // it means the focus is about to go outside the overlay, hence we
- // should prevent that (e.g. user opens the overlay and hit Shift+TAB).
- shouldWrap = (focusedNode === nodeToCheck || focusedNode === this);
- }
-
- if (shouldWrap) {
- // When the overlay contains the last focusable element of the document
- // and it's already focused, pressing TAB would move the focus outside
- // the document (e.g. to the browser search bar). Similarly, when the
- // overlay contains the first focusable element of the document and it's
- // already focused, pressing Shift+TAB would move the focus outside the
- // document (e.g. to the browser search bar).
- // In both cases, we would not receive a focus event, but only a blur.
- // In order to achieve focus wrapping, we prevent this TAB event and
- // force the focus. This will also prevent the focus to temporarily move
- // outside the overlay, which might cause scrolling.
- event.preventDefault();
- this._focusedChild = nodeToSet;
- this._applyFocus();
- }
- },
-
- /**
- * Refits if the overlay is opened and not animating.
- * @protected
- */
- _onIronResize: function() {
- if (this.__onIronResizeAsync) {
- window.cancelAnimationFrame(this.__onIronResizeAsync);
- this.__onIronResizeAsync = null;
- }
- if (this.opened && !this.__isAnimating) {
- this.__onIronResizeAsync = window.requestAnimationFrame(function() {
- this.__onIronResizeAsync = null;
- this.refit();
- }.bind(this));
- }
- },
-
- /**
- * Will call notifyResize if overlay is opened.
- * Can be overridden in order to avoid multiple observers on the same node.
- * @protected
- */
- _onNodesChange: function() {
- if (this.opened && !this.__isAnimating) {
- this.notifyResize();
- }
- }
- };
-
- /** @polymerBehavior */
- Polymer.IronOverlayBehavior = [Polymer.IronFitBehavior, Polymer.IronResizableBehavior, Polymer.IronOverlayBehaviorImpl];
-
- /**
- * Fired after the overlay opens.
- * @event iron-overlay-opened
- */
-
- /**
- * Fired when the overlay is canceled, but before it is closed.
- * @event iron-overlay-canceled
- * @param {Event} event The closing of the overlay can be prevented
- * by calling `event.preventDefault()`. The `event.detail` is the original event that
- * originated the canceling (e.g. ESC keyboard event or click event outside the overlay).
- */
-
- /**
- * Fired after the overlay closes.
- * @event iron-overlay-closed
- * @param {Event} event The `event.detail` is the `closingReason` property
- * (contains `canceled`, whether the overlay was canceled).
- */
-
-})();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-manager.html b/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-manager.html
deleted file mode 100644
index 2462742f0af..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-overlay-behavior/iron-overlay-manager.html
+++ /dev/null
@@ -1,398 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="iron-overlay-backdrop.html">
-
-<script>
-
- /**
- * @struct
- * @constructor
- * @private
- */
- Polymer.IronOverlayManagerClass = function() {
- /**
- * Used to keep track of the opened overlays.
- * @private {Array<Element>}
- */
- this._overlays = [];
-
- /**
- * iframes have a default z-index of 100,
- * so this default should be at least that.
- * @private {number}
- */
- this._minimumZ = 101;
-
- /**
- * Memoized backdrop element.
- * @private {Element|null}
- */
- this._backdropElement = null;
-
- // Enable document-wide tap recognizer.
- Polymer.Gestures.add(document, 'tap', null);
- // Need to have useCapture=true, Polymer.Gestures doesn't offer that.
- document.addEventListener('tap', this._onCaptureClick.bind(this), true);
- document.addEventListener('focus', this._onCaptureFocus.bind(this), true);
- document.addEventListener('keydown', this._onCaptureKeyDown.bind(this), true);
- };
-
- Polymer.IronOverlayManagerClass.prototype = {
-
- constructor: Polymer.IronOverlayManagerClass,
-
- /**
- * The shared backdrop element.
- * @type {!Element} backdropElement
- */
- get backdropElement() {
- if (!this._backdropElement) {
- this._backdropElement = document.createElement('iron-overlay-backdrop');
- }
- return this._backdropElement;
- },
-
- /**
- * The deepest active element.
- * @type {!Element} activeElement the active element
- */
- get deepActiveElement() {
- // document.activeElement can be null
- // https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement
- // In case of null, default it to document.body.
- var active = document.activeElement || document.body;
- while (active.root && Polymer.dom(active.root).activeElement) {
- active = Polymer.dom(active.root).activeElement;
- }
- return active;
- },
-
- /**
- * Brings the overlay at the specified index to the front.
- * @param {number} i
- * @private
- */
- _bringOverlayAtIndexToFront: function(i) {
- var overlay = this._overlays[i];
- if (!overlay) {
- return;
- }
- var lastI = this._overlays.length - 1;
- var currentOverlay = this._overlays[lastI];
- // Ensure always-on-top overlay stays on top.
- if (currentOverlay && this._shouldBeBehindOverlay(overlay, currentOverlay)) {
- lastI--;
- }
- // If already the top element, return.
- if (i >= lastI) {
- return;
- }
- // Update z-index to be on top.
- var minimumZ = Math.max(this.currentOverlayZ(), this._minimumZ);
- if (this._getZ(overlay) <= minimumZ) {
- this._applyOverlayZ(overlay, minimumZ);
- }
-
- // Shift other overlays behind the new on top.
- while (i < lastI) {
- this._overlays[i] = this._overlays[i + 1];
- i++;
- }
- this._overlays[lastI] = overlay;
- },
-
- /**
- * Adds the overlay and updates its z-index if it's opened, or removes it if it's closed.
- * Also updates the backdrop z-index.
- * @param {!Element} overlay
- */
- addOrRemoveOverlay: function(overlay) {
- if (overlay.opened) {
- this.addOverlay(overlay);
- } else {
- this.removeOverlay(overlay);
- }
- },
-
- /**
- * Tracks overlays for z-index and focus management.
- * Ensures the last added overlay with always-on-top remains on top.
- * @param {!Element} overlay
- */
- addOverlay: function(overlay) {
- var i = this._overlays.indexOf(overlay);
- if (i >= 0) {
- this._bringOverlayAtIndexToFront(i);
- this.trackBackdrop();
- return;
- }
- var insertionIndex = this._overlays.length;
- var currentOverlay = this._overlays[insertionIndex - 1];
- var minimumZ = Math.max(this._getZ(currentOverlay), this._minimumZ);
- var newZ = this._getZ(overlay);
-
- // Ensure always-on-top overlay stays on top.
- if (currentOverlay && this._shouldBeBehindOverlay(overlay, currentOverlay)) {
- // This bumps the z-index of +2.
- this._applyOverlayZ(currentOverlay, minimumZ);
- insertionIndex--;
- // Update minimumZ to match previous overlay's z-index.
- var previousOverlay = this._overlays[insertionIndex - 1];
- minimumZ = Math.max(this._getZ(previousOverlay), this._minimumZ);
- }
-
- // Update z-index and insert overlay.
- if (newZ <= minimumZ) {
- this._applyOverlayZ(overlay, minimumZ);
- }
- this._overlays.splice(insertionIndex, 0, overlay);
-
- // Get focused node.
- var element = this.deepActiveElement;
- overlay.restoreFocusNode = this._overlayParent(element) ? null : element;
- this.trackBackdrop();
- },
-
- /**
- * @param {!Element} overlay
- */
- removeOverlay: function(overlay) {
- var i = this._overlays.indexOf(overlay);
- if (i === -1) {
- return;
- }
- this._overlays.splice(i, 1);
-
- var node = overlay.restoreFocusOnClose ? overlay.restoreFocusNode : null;
- overlay.restoreFocusNode = null;
- // Focus back only if still contained in document.body
- if (node && Polymer.dom(document.body).deepContains(node)) {
- node.focus();
- }
- this.trackBackdrop();
- },
-
- /**
- * Returns the current overlay.
- * @return {Element|undefined}
- */
- currentOverlay: function() {
- var i = this._overlays.length - 1;
- return this._overlays[i];
- },
-
- /**
- * Returns the current overlay z-index.
- * @return {number}
- */
- currentOverlayZ: function() {
- return this._getZ(this.currentOverlay());
- },
-
- /**
- * Ensures that the minimum z-index of new overlays is at least `minimumZ`.
- * This does not effect the z-index of any existing overlays.
- * @param {number} minimumZ
- */
- ensureMinimumZ: function(minimumZ) {
- this._minimumZ = Math.max(this._minimumZ, minimumZ);
- },
-
- focusOverlay: function() {
- var current = /** @type {?} */ (this.currentOverlay());
- // We have to be careful to focus the next overlay _after_ any current
- // transitions are complete (due to the state being toggled prior to the
- // transition). Otherwise, we risk infinite recursion when a transitioning
- // (closed) overlay becomes the current overlay.
- //
- // NOTE: We make the assumption that any overlay that completes a transition
- // will call into focusOverlay to kick the process back off. Currently:
- // transitionend -> _applyFocus -> focusOverlay.
- if (current && !current.transitioning) {
- current._applyFocus();
- }
- },
-
- /**
- * Updates the backdrop z-index.
- */
- trackBackdrop: function() {
- var overlay = this._overlayWithBackdrop();
- // Avoid creating the backdrop if there is no overlay with backdrop.
- if (!overlay && !this._backdropElement) {
- return;
- }
- this.backdropElement.style.zIndex = this._getZ(overlay) - 1;
- this.backdropElement.opened = !!overlay;
- },
-
- /**
- * @return {Array<Element>}
- */
- getBackdrops: function() {
- var backdrops = [];
- for (var i = 0; i < this._overlays.length; i++) {
- if (this._overlays[i].withBackdrop) {
- backdrops.push(this._overlays[i]);
- }
- }
- return backdrops;
- },
-
- /**
- * Returns the z-index for the backdrop.
- * @return {number}
- */
- backdropZ: function() {
- return this._getZ(this._overlayWithBackdrop()) - 1;
- },
-
- /**
- * Returns the first opened overlay that has a backdrop.
- * @return {Element|undefined}
- * @private
- */
- _overlayWithBackdrop: function() {
- for (var i = 0; i < this._overlays.length; i++) {
- if (this._overlays[i].withBackdrop) {
- return this._overlays[i];
- }
- }
- },
-
- /**
- * Calculates the minimum z-index for the overlay.
- * @param {Element=} overlay
- * @private
- */
- _getZ: function(overlay) {
- var z = this._minimumZ;
- if (overlay) {
- var z1 = Number(overlay.style.zIndex || window.getComputedStyle(overlay).zIndex);
- // Check if is a number
- // Number.isNaN not supported in IE 10+
- if (z1 === z1) {
- z = z1;
- }
- }
- return z;
- },
-
- /**
- * @param {!Element} element
- * @param {number|string} z
- * @private
- */
- _setZ: function(element, z) {
- element.style.zIndex = z;
- },
-
- /**
- * @param {!Element} overlay
- * @param {number} aboveZ
- * @private
- */
- _applyOverlayZ: function(overlay, aboveZ) {
- this._setZ(overlay, aboveZ + 2);
- },
-
- /**
- * Returns the overlay containing the provided node. If the node is an overlay,
- * it returns the node.
- * @param {Element=} node
- * @return {Element|undefined}
- * @private
- */
- _overlayParent: function(node) {
- while (node && node !== document.body) {
- // Check if it is an overlay.
- if (node._manager === this) {
- return node;
- }
- // Use logical parentNode, or native ShadowRoot host.
- node = Polymer.dom(node).parentNode || node.host;
- }
- },
-
- /**
- * Returns the deepest overlay in the path.
- * @param {Array<Element>=} path
- * @return {Element|undefined}
- * @suppress {missingProperties}
- * @private
- */
- _overlayInPath: function(path) {
- path = path || [];
- for (var i = 0; i < path.length; i++) {
- if (path[i]._manager === this) {
- return path[i];
- }
- }
- },
-
- /**
- * Ensures the click event is delegated to the right overlay.
- * @param {!Event} event
- * @private
- */
- _onCaptureClick: function(event) {
- var overlay = /** @type {?} */ (this.currentOverlay());
- // Check if clicked outside of top overlay.
- if (overlay && this._overlayInPath(Polymer.dom(event).path) !== overlay) {
- overlay._onCaptureClick(event);
- }
- },
-
- /**
- * Ensures the focus event is delegated to the right overlay.
- * @param {!Event} event
- * @private
- */
- _onCaptureFocus: function(event) {
- var overlay = /** @type {?} */ (this.currentOverlay());
- if (overlay) {
- overlay._onCaptureFocus(event);
- }
- },
-
- /**
- * Ensures TAB and ESC keyboard events are delegated to the right overlay.
- * @param {!Event} event
- * @private
- */
- _onCaptureKeyDown: function(event) {
- var overlay = /** @type {?} */ (this.currentOverlay());
- if (overlay) {
- if (Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(event, 'esc')) {
- overlay._onCaptureEsc(event);
- } else if (Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(event, 'tab')) {
- overlay._onCaptureTab(event);
- }
- }
- },
-
- /**
- * Returns if the overlay1 should be behind overlay2.
- * @param {!Element} overlay1
- * @param {!Element} overlay2
- * @return {boolean}
- * @suppress {missingProperties}
- * @private
- */
- _shouldBeBehindOverlay: function(overlay1, overlay2) {
- return !overlay1.alwaysOnTop && overlay2.alwaysOnTop;
- }
- };
-
- Polymer.IronOverlayManager = new Polymer.IronOverlayManagerClass();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/.bower.json
deleted file mode 100644
index 76d8b27a181..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/.bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "iron-range-behavior",
- "version": "1.0.5",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Provides a behavior for something with a minimum and maximum value",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "behavior"
- ],
- "main": "iron-range-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-range-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-input": "PolymerElements/iron-input#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/iron-range-behavior",
- "_release": "1.0.5",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.5",
- "commit": "645ffc6b39ae4fb0efd23b97016a9c4aac777978"
- },
- "_source": "git://github.com/PolymerElements/iron-range-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-range-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/README.md
deleted file mode 100644
index 99202696516..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-range-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-range-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-range-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-range-behavior)_
-
-
-##Polymer.IronRangeBehavior
-
-`iron-range-behavior` provides the behavior for something with a minimum to maximum range.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/bower.json
deleted file mode 100644
index a58ad63f132..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/bower.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "iron-range-behavior",
- "version": "1.0.5",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Provides a behavior for something with a minimum and maximum value",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "behavior"
- ],
- "main": "iron-range-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-range-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-input": "PolymerElements/iron-input#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/demo/index.html
deleted file mode 100644
index ce397365e0d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/demo/index.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!doctype html>
-<html>
- <head>
- <title>iron-range-behavior demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../iron-range-behavior.html">
- <link rel="import" href="../../iron-input/iron-input.html">
-
- <style>
-
- body {
- font-family: sans-serif;
- }
-
- </style>
- </head>
-
- <body unresolved>
-
- <dom-module id="x-progressbar">
- <style>
- :host {
- display: block;
- height: 40px;
- background-color: #555;
- border-radius: 4px;
- padding: 8px;
- box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.5);
- }
-
- .progress {
- background-color: #999;
- height: 100%;
- border-radius: 4px;
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
- }
-
- .progress-value {
- padding: 0 8px;
- font-size: 18px;
- color: #fff;
- }
- </style>
- <template>
- <div class="progress" horizontal center layout style$="{{_computeStyle(ratio)}}">
- <div class="progress-value"><span>{{ratio}}</span>%</div>
- </div>
- </template>
- </dom-module>
-
- <script>
- HTMLImports.whenReady(function() {
- Polymer({
- is: 'x-progressbar',
-
- behaviors: [Polymer.IronRangeBehavior],
-
- _computeStyle: function(ratio) {
- return 'width: ' + ratio + '%;';
- }
- });
- });
- </script>
-
- <x-progressbar min="0" max="200" value="120"></x-progressbar>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/index.html
deleted file mode 100644
index cc77788735d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/iron-range-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/iron-range-behavior.html
deleted file mode 100644
index 96f3c15b02a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-range-behavior/iron-range-behavior.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-
- /**
- * `iron-range-behavior` provides the behavior for something with a minimum to maximum range.
- *
- * @demo demo/index.html
- * @polymerBehavior
- */
- Polymer.IronRangeBehavior = {
-
- properties: {
-
- /**
- * The number that represents the current value.
- */
- value: {
- type: Number,
- value: 0,
- notify: true,
- reflectToAttribute: true
- },
-
- /**
- * The number that indicates the minimum value of the range.
- */
- min: {
- type: Number,
- value: 0,
- notify: true
- },
-
- /**
- * The number that indicates the maximum value of the range.
- */
- max: {
- type: Number,
- value: 100,
- notify: true
- },
-
- /**
- * Specifies the value granularity of the range's value.
- */
- step: {
- type: Number,
- value: 1,
- notify: true
- },
-
- /**
- * Returns the ratio of the value.
- */
- ratio: {
- type: Number,
- value: 0,
- readOnly: true,
- notify: true
- },
- },
-
- observers: [
- '_update(value, min, max, step)'
- ],
-
- _calcRatio: function(value) {
- return (this._clampValue(value) - this.min) / (this.max - this.min);
- },
-
- _clampValue: function(value) {
- return Math.min(this.max, Math.max(this.min, this._calcStep(value)));
- },
-
- _calcStep: function(value) {
- // polymer/issues/2493
- value = parseFloat(value);
-
- if (!this.step) {
- return value;
- }
-
- var numSteps = Math.round((value - this.min) / this.step);
- if (this.step < 1) {
- /**
- * For small values of this.step, if we calculate the step using
- * `Math.round(value / step) * step` we may hit a precision point issue
- * eg. 0.1 * 0.2 = 0.020000000000000004
- * http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
- *
- * as a work around we can divide by the reciprocal of `step`
- */
- return numSteps / (1 / this.step) + this.min;
- } else {
- return numSteps * this.step + this.min;
- }
- },
-
- _validateValue: function() {
- var v = this._clampValue(this.value);
- this.value = this.oldValue = isNaN(v) ? this.oldValue : v;
- return this.value !== v;
- },
-
- _update: function() {
- this._validateValue();
- this._setRatio(this._calcRatio(this.value) * 100);
- }
-
-};
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/.bower.json
deleted file mode 100644
index 2e765b93245..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/.bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "iron-resizable-behavior",
- "version": "1.0.3",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Coordinates the flow of resizeable elements",
- "private": true,
- "main": "iron-resizable-behavior.html",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-resizable-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/iron-resizable-behavior",
- "_release": "1.0.3",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.3",
- "commit": "dda1df6aaf452aedf3e52ff0cf69e72439452216"
- },
- "_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-resizable-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/README.md
deleted file mode 100644
index 2f37628c126..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-resizable-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-resizable-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-resizable-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-resizable-behavior)_
-
-
-##Polymer.IronResizableBehavior
-
-`IronResizableBehavior` is a behavior that can be used in Polymer elements to
-coordinate the flow of resize events between "resizers" (elements that control the
-size or hidden state of their children) and "resizables" (elements that need to be
-notified when they are resized or un-hidden by their parents in order to take
-action on their new measurements).
-
-Elements that perform measurement should add the `IronResizableBehavior` behavior to
-their element definition and listen for the `iron-resize` event on themselves.
-This event will be fired when they become showing after having been hidden,
-when they are resized explicitly by another resizable, or when the window has been
-resized.
-
-Note, the `iron-resize` event is non-bubbling.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/bower.json
deleted file mode 100644
index 053bfd0c88a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "iron-resizable-behavior",
- "version": "1.0.3",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Coordinates the flow of resizeable elements",
- "private": true,
- "main": "iron-resizable-behavior.html",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-resizable-behavior.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/index.html
deleted file mode 100644
index 2896c50d256..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/index.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-resizable-behavior demo</title>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="src/x-app.html">
-
-</head>
-<body>
-
- <x-app></x-app>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/src/x-app.html b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/src/x-app.html
deleted file mode 100644
index c334ad3d2fa..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/demo/src/x-app.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../iron-resizable-behavior.html">
-
-<dom-module id="x-puck">
-
- <style>
-
- :host {
- display: inline-block;
- border: 3px solid lightblue;
- }
-
- </style>
-
- <template>
-
- <b>I'm a resize-aware, thirdifying puck at (<span>{{x}}</span> x <span>{{y}}</span>).</b>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'x-puck',
-
- behaviors: [
- Polymer.IronResizableBehavior
- ],
-
- properties: {
- x: {
- type: Number,
- value: 0
- },
-
- y: {
- type: Number,
- value: 0
- }
- },
-
- listeners: {
- 'iron-resize': '_onIronResize'
- },
-
- attached: function() {
- this.async(this.notifyResize, 1);
- },
-
- get parent() {
- if (this.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
- return this.parentNode.host;
- }
-
- return this.parentNode;
- },
-
- _onIronResize: function() {
- var x = this.x = Math.floor(this.parent.offsetWidth / 3);
- var y = this.y = Math.floor(this.parent.offsetHeight / 3);
-
- this.translate3d(x + 'px', y + 'px', 0);
- }
- });
-
-</script>
-
-<dom-module id="x-app">
-
- <style>
-
- :host {
- display: block;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- </style>
-
- <template>
-
- <x-puck></x-puck>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'x-app',
-
- behaviors: [
- Polymer.IronResizableBehavior
- ]
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/index.html
deleted file mode 100644
index b9b8809560f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/index.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-resizable-behavior</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/iron-resizable-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/iron-resizable-behavior.html
deleted file mode 100644
index 9ac0d3967e8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-resizable-behavior/iron-resizable-behavior.html
+++ /dev/null
@@ -1,195 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
- /**
- * `IronResizableBehavior` is a behavior that can be used in Polymer elements to
- * coordinate the flow of resize events between "resizers" (elements that control the
- * size or hidden state of their children) and "resizables" (elements that need to be
- * notified when they are resized or un-hidden by their parents in order to take
- * action on their new measurements).
- *
- * Elements that perform measurement should add the `IronResizableBehavior` behavior to
- * their element definition and listen for the `iron-resize` event on themselves.
- * This event will be fired when they become showing after having been hidden,
- * when they are resized explicitly by another resizable, or when the window has been
- * resized.
- *
- * Note, the `iron-resize` event is non-bubbling.
- *
- * @polymerBehavior Polymer.IronResizableBehavior
- * @demo demo/index.html
- **/
- Polymer.IronResizableBehavior = {
- properties: {
- /**
- * The closest ancestor element that implements `IronResizableBehavior`.
- */
- _parentResizable: {
- type: Object,
- observer: '_parentResizableChanged'
- },
-
- /**
- * True if this element is currently notifying its descedant elements of
- * resize.
- */
- _notifyingDescendant: {
- type: Boolean,
- value: false
- }
- },
-
- listeners: {
- 'iron-request-resize-notifications': '_onIronRequestResizeNotifications'
- },
-
- created: function() {
- // We don't really need property effects on these, and also we want them
- // to be created before the `_parentResizable` observer fires:
- this._interestedResizables = [];
- this._boundNotifyResize = this.notifyResize.bind(this);
- },
-
- attached: function() {
- this.fire('iron-request-resize-notifications', null, {
- node: this,
- bubbles: true,
- cancelable: true
- });
-
- if (!this._parentResizable) {
- window.addEventListener('resize', this._boundNotifyResize);
- this.notifyResize();
- }
- },
-
- detached: function() {
- if (this._parentResizable) {
- this._parentResizable.stopResizeNotificationsFor(this);
- } else {
- window.removeEventListener('resize', this._boundNotifyResize);
- }
-
- this._parentResizable = null;
- },
-
- /**
- * Can be called to manually notify a resizable and its descendant
- * resizables of a resize change.
- */
- notifyResize: function() {
- if (!this.isAttached) {
- return;
- }
-
- this._interestedResizables.forEach(function(resizable) {
- if (this.resizerShouldNotify(resizable)) {
- this._notifyDescendant(resizable);
- }
- }, this);
-
- this._fireResize();
- },
-
- /**
- * Used to assign the closest resizable ancestor to this resizable
- * if the ancestor detects a request for notifications.
- */
- assignParentResizable: function(parentResizable) {
- this._parentResizable = parentResizable;
- },
-
- /**
- * Used to remove a resizable descendant from the list of descendants
- * that should be notified of a resize change.
- */
- stopResizeNotificationsFor: function(target) {
- var index = this._interestedResizables.indexOf(target);
-
- if (index > -1) {
- this._interestedResizables.splice(index, 1);
- this.unlisten(target, 'iron-resize', '_onDescendantIronResize');
- }
- },
-
- /**
- * This method can be overridden to filter nested elements that should or
- * should not be notified by the current element. Return true if an element
- * should be notified, or false if it should not be notified.
- *
- * @param {HTMLElement} element A candidate descendant element that
- * implements `IronResizableBehavior`.
- * @return {boolean} True if the `element` should be notified of resize.
- */
- resizerShouldNotify: function(element) { return true; },
-
- _onDescendantIronResize: function(event) {
- if (this._notifyingDescendant) {
- event.stopPropagation();
- return;
- }
-
- // NOTE(cdata): In ShadowDOM, event retargetting makes echoing of the
- // otherwise non-bubbling event "just work." We do it manually here for
- // the case where Polymer is not using shadow roots for whatever reason:
- if (!Polymer.Settings.useShadow) {
- this._fireResize();
- }
- },
-
- _fireResize: function() {
- this.fire('iron-resize', null, {
- node: this,
- bubbles: false
- });
- },
-
- _onIronRequestResizeNotifications: function(event) {
- var target = event.path ? event.path[0] : event.target;
-
- if (target === this) {
- return;
- }
-
- if (this._interestedResizables.indexOf(target) === -1) {
- this._interestedResizables.push(target);
- this.listen(target, 'iron-resize', '_onDescendantIronResize');
- }
-
- target.assignParentResizable(this);
- this._notifyDescendant(target);
-
- event.stopPropagation();
- },
-
- _parentResizableChanged: function(parentResizable) {
- if (parentResizable) {
- window.removeEventListener('resize', this._boundNotifyResize);
- }
- },
-
- _notifyDescendant: function(descendant) {
- // NOTE(cdata): In IE10, attached is fired on children first, so it's
- // important not to notify them if the parent is not attached yet (or
- // else they will get redundantly notified when the parent attaches).
- if (!this.isAttached) {
- return;
- }
-
- this._notifyingDescendant = true;
- descendant.notifyResize();
- this._notifyingDescendant = false;
- }
- };
-</script>
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.bower.json
deleted file mode 100644
index 955c9dc566d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.bower.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "iron-selector",
- "version": "1.5.2",
- "description": "Manages a set of elements that can be selected",
- "private": true,
- "license": "http://polymer.github.io/LICENSE.txt",
- "main": "iron-selector.html",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "selector"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-selector.git"
- },
- "homepage": "https://github.com/PolymerElements/iron-selector",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.2.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.4",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.5.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.5.2",
- "commit": "18e8e12dcd9a4560de480562f65935feed334b86"
- },
- "_source": "git://github.com/PolymerElements/iron-selector.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-selector"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.github/ISSUE_TEMPLATE.md b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 07a3448a7ae..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,33 +0,0 @@
-<!-- Instructions: https://github.com/PolymerElements/iron-selector/CONTRIBUTING.md#filing-issues -->
-### Description
-<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
-
-### Expected outcome
-
-<!-- Example: The page stays the same color. -->
-
-### Actual outcome
-
-<!-- Example: The page turns pink. -->
-
-### Live Demo
-<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
-
-### Steps to reproduce
-
-<!-- Example
-1. Put a `paper-foo` element in the page.
-2. Open the page in a web browser.
-3. Click the `paper-foo` element.
--->
-
-### Browsers Affected
-<!-- Check all that apply -->
-- [ ] Chrome
-- [ ] Firefox
-- [ ] Safari 9
-- [ ] Safari 8
-- [ ] Safari 7
-- [ ] Edge
-- [ ] IE 11
-- [ ] IE 10
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.travis.yml
deleted file mode 100644
index d1b0332b45b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: ltCkwJM0nkTS9WjikyjqBsB5J2hQon4UnVVrINk4y+Vq4v9PQJH3+83nya0jnxilKaeAJs4d2/OS02F9GkqYpsSmDz7OgXPfk0hrHA8UksvvpSALfnukleIAN2YTOcxXJKeNHcfpqCKPk1dGeNQOEM61H+QgTBIyFB3sMugygqs=
- - secure: TJuu1WdpFLTaBN/prBafm8Pld/BQCySNuuG1nATbF3fqiOpgehXu8Z5URAz5syUhqZAyEmuRMxvXpEVD/t1jrtaXVwkdCFkkQ4ckkP4gTIeSGA/Puw8sveB2q7QAqXyTmeFkocNlh8fxV+B07o0SPWdhcvdZnDVU9VrpSqL+92M=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/README.md
deleted file mode 100755
index 9d2ef310843..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/README.md
+++ /dev/null
@@ -1,91 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-multi-selectable.html iron-selectable.html iron-selector.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-selector.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-selector)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-selector)_
-
-
-##&lt;iron-selector&gt;
-
- `iron-selector` is an element which can be used to manage a list of elements
- that can be selected. Tapping on the item will make the item selected. The `selected` indicates
- which item is being selected. The default is to use the index of the item.
-
- Example:
-
-```html
- <iron-selector selected="0">
- <div>Item 1</div>
- <div>Item 2</div>
- <div>Item 3</div>
- </iron-selector>
-```
-
- If you want to use the attribute value of an element for `selected` instead of the index,
- set `attrForSelected` to the name of the attribute. For example, if you want to select item by
- `name`, set `attrForSelected` to `name`.
-
- Example:
-
-```html
- <iron-selector attr-for-selected="name" selected="foo">
- <div name="foo">Foo</div>
- <div name="bar">Bar</div>
- <div name="zot">Zot</div>
- </iron-selector>
-```
-
- You can specify a default fallback with `fallbackSelection` in case the `selected` attribute does
- not match the `attrForSelected` attribute of any elements.
-
- Example:
-
-```html
- <iron-selector attr-for-selected="name" selected="non-existing"
- fallback-selection="default">
- <div name="foo">Foo</div>
- <div name="bar">Bar</div>
- <div name="default">Default</div>
- </iron-selector>
-```
-
- Note: When the selector is multi, the selection will set to `fallbackSelection` iff
- the number of matching elements is zero.
-
- `iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
-
- Example:
-
-```html
- <style>
- .iron-selected {
- background: #eee;
- }
- </style>
-
- ...
-
- <iron-selector selected="0">
- <div>Item 1</div>
- <div>Item 2</div>
- <div>Item 3</div>
- </iron-selector>
-```
-
-
-
-<!-- No docs for Polymer.IronMultiSelectableBehavior found. -->
-
-<!-- No docs for Polymer.IronSelectableBehavior found. -->
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/bower.json
deleted file mode 100755
index 8aad3d47a1e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "iron-selector",
- "version": "1.5.2",
- "description": "Manages a set of elements that can be selected",
- "private": true,
- "license": "http://polymer.github.io/LICENSE.txt",
- "main": "iron-selector.html",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "selector"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-selector.git"
- },
- "homepage": "https://github.com/PolymerElements/iron-selector",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.2.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.4",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/demo/index.html
deleted file mode 100644
index 66724a19fe5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/demo/index.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
- <head>
-
- <title>iron-selector</title>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../iron-selector.html">
-
- <style is="custom-style">
-
- iron-selector > * {
- padding: 8px;
- }
-
- .horizontal-section {
- padding: 0;
- }
-
- .iron-selected {
- background-color: var(--google-blue-500);
- color: white;
- }
-
- </style>
-
- </head>
- <body unresolved>
-
- <div class="horizontal center-justified layout">
- <div>
- <h3>Basic</h3>
- <div class="horizontal-section">
- <iron-selector selected="0">
- <div>Item 0</div>
- <div>Item 1</div>
- <div>Item 2</div>
- <div>Item 3</div>
- <div>Item 4</div>
- </iron-selector>
- </div>
- </div>
-
- <div>
- <h3>Multi-select</h3>
- <div class="horizontal-section">
- <iron-selector multi selected-values='[0,2]'>
- <div>Item 0</div>
- <div>Item 1</div>
- <div>Item 2</div>
- <div>Item 3</div>
- <div>Item 4</div>
- </iron-selector>
- </div>
- </div>
-
- <div>
- <h3>Example with attr-for-selected</h3>
- <div class="horizontal-section">
- <iron-selector selected="foo" attr-for-selected="name">
- <div name="foo">Foo</div>
- <div name="bar">Bar</div>
- <div name="baz">Baz</div>
- <div name="qux">Qux</div>
- <div name="quux">Quux</div>
- </iron-selector>
- </div>
- </div>
-
- <div>
- <h3>Example with fallback-selection</h3>
- <div class="horizontal-section">
- <iron-selector selected="non-existing" attr-for-selected="name" fallback-selection="default">
- <div name="foo">Foo</div>
- <div name="bar">Bar</div>
- <div name="baz">Baz</div>
- <div name="qux">Qux</div>
- <div name="quux">Quux</div>
- <div name="default">Default</div>
- </iron-selector>
- </div>
- </div>
- </div>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/index.html
deleted file mode 100755
index 741693ce702..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <title>iron-selector</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-multi-selectable.html b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-multi-selectable.html
deleted file mode 100644
index 9993151da82..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-multi-selectable.html
+++ /dev/null
@@ -1,154 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="iron-selectable.html">
-
-<script>
- /** @polymerBehavior Polymer.IronMultiSelectableBehavior */
- Polymer.IronMultiSelectableBehaviorImpl = {
- properties: {
-
- /**
- * If true, multiple selections are allowed.
- */
- multi: {
- type: Boolean,
- value: false,
- observer: 'multiChanged'
- },
-
- /**
- * Gets or sets the selected elements. This is used instead of `selected` when `multi`
- * is true.
- */
- selectedValues: {
- type: Array,
- notify: true
- },
-
- /**
- * Returns an array of currently selected items.
- */
- selectedItems: {
- type: Array,
- readOnly: true,
- notify: true
- },
-
- },
-
- observers: [
- '_updateSelected(selectedValues.splices)'
- ],
-
- /**
- * Selects the given value. If the `multi` property is true, then the selected state of the
- * `value` will be toggled; otherwise the `value` will be selected.
- *
- * @method select
- * @param {string|number} value the value to select.
- */
- select: function(value) {
- if (this.multi) {
- if (this.selectedValues) {
- this._toggleSelected(value);
- } else {
- this.selectedValues = [value];
- }
- } else {
- this.selected = value;
- }
- },
-
- multiChanged: function(multi) {
- this._selection.multi = multi;
- },
-
- get _shouldUpdateSelection() {
- return this.selected != null ||
- (this.selectedValues != null && this.selectedValues.length);
- },
-
- _updateAttrForSelected: function() {
- if (!this.multi) {
- Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this);
- } else if (this._shouldUpdateSelection) {
- this.selectedValues = this.selectedItems.map(function(selectedItem) {
- return this._indexToValue(this.indexOf(selectedItem));
- }, this).filter(function(unfilteredValue) {
- return unfilteredValue != null;
- }, this);
- }
- },
-
- _updateSelected: function() {
- if (this.multi) {
- this._selectMulti(this.selectedValues);
- } else {
- this._selectSelected(this.selected);
- }
- },
-
- _selectMulti: function(values) {
- if (values) {
- var selectedItems = this._valuesToItems(values);
- // clear all but the current selected items
- this._selection.clear(selectedItems);
- // select only those not selected yet
- for (var i = 0; i < selectedItems.length; i++) {
- this._selection.setItemSelected(selectedItems[i], true);
- }
- // Check for items, since this array is populated only when attached
- if (this.fallbackSelection && this.items.length && !this._selection.get().length) {
- var fallback = this._valueToItem(this.fallbackSelection);
- if (fallback) {
- this.selectedValues = [this.fallbackSelection];
- }
- }
- } else {
- this._selection.clear();
- }
- },
-
- _selectionChange: function() {
- var s = this._selection.get();
- if (this.multi) {
- this._setSelectedItems(s);
- } else {
- this._setSelectedItems([s]);
- this._setSelectedItem(s);
- }
- },
-
- _toggleSelected: function(value) {
- var i = this.selectedValues.indexOf(value);
- var unselected = i < 0;
- if (unselected) {
- this.push('selectedValues',value);
- } else {
- this.splice('selectedValues',i,1);
- }
- },
-
- _valuesToItems: function(values) {
- return (values == null) ? null : values.map(function(value) {
- return this._valueToItem(value);
- }, this);
- }
- };
-
- /** @polymerBehavior */
- Polymer.IronMultiSelectableBehavior = [
- Polymer.IronSelectableBehavior,
- Polymer.IronMultiSelectableBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selectable.html b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selectable.html
deleted file mode 100644
index 25cfe91e3d8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selectable.html
+++ /dev/null
@@ -1,388 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="iron-selection.html">
-
-<script>
-
- /** @polymerBehavior */
- Polymer.IronSelectableBehavior = {
-
- /**
- * Fired when iron-selector is activated (selected or deselected).
- * It is fired before the selected items are changed.
- * Cancel the event to abort selection.
- *
- * @event iron-activate
- */
-
- /**
- * Fired when an item is selected
- *
- * @event iron-select
- */
-
- /**
- * Fired when an item is deselected
- *
- * @event iron-deselect
- */
-
- /**
- * Fired when the list of selectable items changes (e.g., items are
- * added or removed). The detail of the event is a mutation record that
- * describes what changed.
- *
- * @event iron-items-changed
- */
-
- properties: {
-
- /**
- * If you want to use an attribute value or property of an element for
- * `selected` instead of the index, set this to the name of the attribute
- * or property. Hyphenated values are converted to camel case when used to
- * look up the property of a selectable element. Camel cased values are
- * *not* converted to hyphenated values for attribute lookup. It's
- * recommended that you provide the hyphenated form of the name so that
- * selection works in both cases. (Use `attr-or-property-name` instead of
- * `attrOrPropertyName`.)
- */
- attrForSelected: {
- type: String,
- value: null
- },
-
- /**
- * Gets or sets the selected element. The default is to use the index of the item.
- * @type {string|number}
- */
- selected: {
- type: String,
- notify: true
- },
-
- /**
- * Returns the currently selected item.
- *
- * @type {?Object}
- */
- selectedItem: {
- type: Object,
- readOnly: true,
- notify: true
- },
-
- /**
- * The event that fires from items when they are selected. Selectable
- * will listen for this event from items and update the selection state.
- * Set to empty string to listen to no events.
- */
- activateEvent: {
- type: String,
- value: 'tap',
- observer: '_activateEventChanged'
- },
-
- /**
- * This is a CSS selector string. If this is set, only items that match the CSS selector
- * are selectable.
- */
- selectable: String,
-
- /**
- * The class to set on elements when selected.
- */
- selectedClass: {
- type: String,
- value: 'iron-selected'
- },
-
- /**
- * The attribute to set on elements when selected.
- */
- selectedAttribute: {
- type: String,
- value: null
- },
-
- /**
- * Default fallback if the selection based on selected with `attrForSelected`
- * is not found.
- */
- fallbackSelection: {
- type: String,
- value: null
- },
-
- /**
- * The list of items from which a selection can be made.
- */
- items: {
- type: Array,
- readOnly: true,
- notify: true,
- value: function() {
- return [];
- }
- },
-
- /**
- * The set of excluded elements where the key is the `localName`
- * of the element that will be ignored from the item list.
- *
- * @default {template: 1}
- */
- _excludedLocalNames: {
- type: Object,
- value: function() {
- return {
- 'template': 1
- };
- }
- }
- },
-
- observers: [
- '_updateAttrForSelected(attrForSelected)',
- '_updateSelected(selected)',
- '_checkFallback(fallbackSelection)'
- ],
-
- created: function() {
- this._bindFilterItem = this._filterItem.bind(this);
- this._selection = new Polymer.IronSelection(this._applySelection.bind(this));
- },
-
- attached: function() {
- this._observer = this._observeItems(this);
- this._updateItems();
- if (!this._shouldUpdateSelection) {
- this._updateSelected();
- }
- this._addListener(this.activateEvent);
- },
-
- detached: function() {
- if (this._observer) {
- Polymer.dom(this).unobserveNodes(this._observer);
- }
- this._removeListener(this.activateEvent);
- },
-
- /**
- * Returns the index of the given item.
- *
- * @method indexOf
- * @param {Object} item
- * @returns Returns the index of the item
- */
- indexOf: function(item) {
- return this.items.indexOf(item);
- },
-
- /**
- * Selects the given value.
- *
- * @method select
- * @param {string|number} value the value to select.
- */
- select: function(value) {
- this.selected = value;
- },
-
- /**
- * Selects the previous item.
- *
- * @method selectPrevious
- */
- selectPrevious: function() {
- var length = this.items.length;
- var index = (Number(this._valueToIndex(this.selected)) - 1 + length) % length;
- this.selected = this._indexToValue(index);
- },
-
- /**
- * Selects the next item.
- *
- * @method selectNext
- */
- selectNext: function() {
- var index = (Number(this._valueToIndex(this.selected)) + 1) % this.items.length;
- this.selected = this._indexToValue(index);
- },
-
- /**
- * Selects the item at the given index.
- *
- * @method selectIndex
- */
- selectIndex: function(index) {
- this.select(this._indexToValue(index));
- },
-
- /**
- * Force a synchronous update of the `items` property.
- *
- * NOTE: Consider listening for the `iron-items-changed` event to respond to
- * updates to the set of selectable items after updates to the DOM list and
- * selection state have been made.
- *
- * WARNING: If you are using this method, you should probably consider an
- * alternate approach. Synchronously querying for items is potentially
- * slow for many use cases. The `items` property will update asynchronously
- * on its own to reflect selectable items in the DOM.
- */
- forceSynchronousItemUpdate: function() {
- this._updateItems();
- },
-
- get _shouldUpdateSelection() {
- return this.selected != null;
- },
-
- _checkFallback: function() {
- if (this._shouldUpdateSelection) {
- this._updateSelected();
- }
- },
-
- _addListener: function(eventName) {
- this.listen(this, eventName, '_activateHandler');
- },
-
- _removeListener: function(eventName) {
- this.unlisten(this, eventName, '_activateHandler');
- },
-
- _activateEventChanged: function(eventName, old) {
- this._removeListener(old);
- this._addListener(eventName);
- },
-
- _updateItems: function() {
- var nodes = Polymer.dom(this).queryDistributedElements(this.selectable || '*');
- nodes = Array.prototype.filter.call(nodes, this._bindFilterItem);
- this._setItems(nodes);
- },
-
- _updateAttrForSelected: function() {
- if (this._shouldUpdateSelection) {
- this.selected = this._indexToValue(this.indexOf(this.selectedItem));
- }
- },
-
- _updateSelected: function() {
- this._selectSelected(this.selected);
- },
-
- _selectSelected: function(selected) {
- this._selection.select(this._valueToItem(this.selected));
- // Check for items, since this array is populated only when attached
- // Since Number(0) is falsy, explicitly check for undefined
- if (this.fallbackSelection && this.items.length && (this._selection.get() === undefined)) {
- this.selected = this.fallbackSelection;
- }
- },
-
- _filterItem: function(node) {
- return !this._excludedLocalNames[node.localName];
- },
-
- _valueToItem: function(value) {
- return (value == null) ? null : this.items[this._valueToIndex(value)];
- },
-
- _valueToIndex: function(value) {
- if (this.attrForSelected) {
- for (var i = 0, item; item = this.items[i]; i++) {
- if (this._valueForItem(item) == value) {
- return i;
- }
- }
- } else {
- return Number(value);
- }
- },
-
- _indexToValue: function(index) {
- if (this.attrForSelected) {
- var item = this.items[index];
- if (item) {
- return this._valueForItem(item);
- }
- } else {
- return index;
- }
- },
-
- _valueForItem: function(item) {
- var propValue = item[Polymer.CaseMap.dashToCamelCase(this.attrForSelected)];
- return propValue != undefined ? propValue : item.getAttribute(this.attrForSelected);
- },
-
- _applySelection: function(item, isSelected) {
- if (this.selectedClass) {
- this.toggleClass(this.selectedClass, isSelected, item);
- }
- if (this.selectedAttribute) {
- this.toggleAttribute(this.selectedAttribute, isSelected, item);
- }
- this._selectionChange();
- this.fire('iron-' + (isSelected ? 'select' : 'deselect'), {item: item});
- },
-
- _selectionChange: function() {
- this._setSelectedItem(this._selection.get());
- },
-
- // observe items change under the given node.
- _observeItems: function(node) {
- return Polymer.dom(node).observeNodes(function(mutation) {
- this._updateItems();
-
- if (this._shouldUpdateSelection) {
- this._updateSelected();
- }
-
- // Let other interested parties know about the change so that
- // we don't have to recreate mutation observers everywhere.
- this.fire('iron-items-changed', mutation, {
- bubbles: false,
- cancelable: false
- });
- });
- },
-
- _activateHandler: function(e) {
- var t = e.target;
- var items = this.items;
- while (t && t != this) {
- var i = items.indexOf(t);
- if (i >= 0) {
- var value = this._indexToValue(i);
- this._itemActivate(value, t);
- return;
- }
- t = t.parentNode;
- }
- },
-
- _itemActivate: function(value, item) {
- if (!this.fire('iron-activate',
- {selected: value, item: item}, {cancelable: true}).defaultPrevented) {
- this.select(value);
- }
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selection.html b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selection.html
deleted file mode 100644
index 408ccae9d8b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selection.html
+++ /dev/null
@@ -1,119 +0,0 @@
-
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-
- /**
- * @param {!Function} selectCallback
- * @constructor
- */
- Polymer.IronSelection = function(selectCallback) {
- this.selection = [];
- this.selectCallback = selectCallback;
- };
-
- Polymer.IronSelection.prototype = {
-
- /**
- * Retrieves the selected item(s).
- *
- * @method get
- * @returns Returns the selected item(s). If the multi property is true,
- * `get` will return an array, otherwise it will return
- * the selected item or undefined if there is no selection.
- */
- get: function() {
- return this.multi ? this.selection.slice() : this.selection[0];
- },
-
- /**
- * Clears all the selection except the ones indicated.
- *
- * @method clear
- * @param {Array} excludes items to be excluded.
- */
- clear: function(excludes) {
- this.selection.slice().forEach(function(item) {
- if (!excludes || excludes.indexOf(item) < 0) {
- this.setItemSelected(item, false);
- }
- }, this);
- },
-
- /**
- * Indicates if a given item is selected.
- *
- * @method isSelected
- * @param {*} item The item whose selection state should be checked.
- * @returns Returns true if `item` is selected.
- */
- isSelected: function(item) {
- return this.selection.indexOf(item) >= 0;
- },
-
- /**
- * Sets the selection state for a given item to either selected or deselected.
- *
- * @method setItemSelected
- * @param {*} item The item to select.
- * @param {boolean} isSelected True for selected, false for deselected.
- */
- setItemSelected: function(item, isSelected) {
- if (item != null) {
- if (isSelected !== this.isSelected(item)) {
- // proceed to update selection only if requested state differs from current
- if (isSelected) {
- this.selection.push(item);
- } else {
- var i = this.selection.indexOf(item);
- if (i >= 0) {
- this.selection.splice(i, 1);
- }
- }
- if (this.selectCallback) {
- this.selectCallback(item, isSelected);
- }
- }
- }
- },
-
- /**
- * Sets the selection state for a given item. If the `multi` property
- * is true, then the selected state of `item` will be toggled; otherwise
- * the `item` will be selected.
- *
- * @method select
- * @param {*} item The item to select.
- */
- select: function(item) {
- if (this.multi) {
- this.toggle(item);
- } else if (this.get() !== item) {
- this.setItemSelected(this.get(), false);
- this.setItemSelected(item, true);
- }
- },
-
- /**
- * Toggles the selection state for `item`.
- *
- * @method toggle
- * @param {*} item The item to toggle.
- */
- toggle: function(item) {
- this.setItemSelected(item, !this.isSelected(item));
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selector.html b/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selector.html
deleted file mode 100644
index 0ecc9fbcd19..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-selector/iron-selector.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="iron-multi-selectable.html">
-
-<script>
- /**
- `iron-selector` is an element which can be used to manage a list of elements
- that can be selected. Tapping on the item will make the item selected. The `selected` indicates
- which item is being selected. The default is to use the index of the item.
-
- Example:
-
- <iron-selector selected="0">
- <div>Item 1</div>
- <div>Item 2</div>
- <div>Item 3</div>
- </iron-selector>
-
- If you want to use the attribute value of an element for `selected` instead of the index,
- set `attrForSelected` to the name of the attribute. For example, if you want to select item by
- `name`, set `attrForSelected` to `name`.
-
- Example:
-
- <iron-selector attr-for-selected="name" selected="foo">
- <div name="foo">Foo</div>
- <div name="bar">Bar</div>
- <div name="zot">Zot</div>
- </iron-selector>
-
- You can specify a default fallback with `fallbackSelection` in case the `selected` attribute does
- not match the `attrForSelected` attribute of any elements.
-
- Example:
-
- <iron-selector attr-for-selected="name" selected="non-existing"
- fallback-selection="default">
- <div name="foo">Foo</div>
- <div name="bar">Bar</div>
- <div name="default">Default</div>
- </iron-selector>
-
- Note: When the selector is multi, the selection will set to `fallbackSelection` iff
- the number of matching elements is zero.
-
- `iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
-
- Example:
-
- <style>
- .iron-selected {
- background: #eee;
- }
- </style>
-
- ...
-
- <iron-selector selected="0">
- <div>Item 1</div>
- <div>Item 2</div>
- <div>Item 3</div>
- </iron-selector>
-
- @demo demo/index.html
- */
-
- Polymer({
-
- is: 'iron-selector',
-
- behaviors: [
- Polymer.IronMultiSelectableBehavior
- ]
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/.bower.json
deleted file mode 100644
index 9b49957bf5d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/.bower.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "iron-validatable-behavior",
- "version": "1.1.1",
- "description": "Provides a behavior for an element that validates user input",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "main": "iron-validatable-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-validatable-behavior.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-validatable-behavior",
- "ignore": [],
- "dependencies": {
- "iron-meta": "PolymerElements/iron-meta#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "PolymerElements/paper-styles#^1.0.4",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.1.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.1",
- "commit": "2ecd3f411e298733b29f1660f75cb9b03ea31d77"
- },
- "_source": "git://github.com/PolymerElements/iron-validatable-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/iron-validatable-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/README.md
deleted file mode 100644
index 6fff76e42bf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-iron-validatable-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/iron-validatable-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-validatable-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/iron-validatable-behavior)_
-
-
-##Polymer.IronValidatableBehavior
-
-`Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
-Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
-
-By default, an `<iron-form>` element validates its fields when the user presses the submit button.
-To validate a form imperatively, call the form's `validate()` method, which in turn will
-call `validate()` on all its children. By using `Polymer.IronValidatableBehavior`, your
-custom element will get a public `validate()`, which
-will return the validity of the element, and a corresponding `invalid` attribute,
-which can be used for styling.
-
-To implement the custom validation logic of your element, you must override
-the protected `_getValidity()` method of this behaviour, rather than `validate()`.
-See [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
-for an example.
-
-### Accessibility
-
-Changing the `invalid` property, either manually or by calling `validate()` will update the
-`aria-invalid` attribute.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/bower.json
deleted file mode 100644
index 2ebf2bcb7e6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "iron-validatable-behavior",
- "version": "1.1.1",
- "description": "Provides a behavior for an element that validates user input",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "main": "iron-validatable-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-validatable-behavior.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-validatable-behavior",
- "ignore": [],
- "dependencies": {
- "iron-meta": "PolymerElements/iron-meta#^1.0.0",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "paper-styles": "PolymerElements/paper-styles#^1.0.4",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/cats-only.html b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/cats-only.html
deleted file mode 100644
index 83ef9ba617f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/cats-only.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../iron-validator-behavior/iron-validator-behavior.html">
-
-<script>
-
- Polymer({
-
- is: 'cats-only',
-
- behaviors: [
- Polymer.IronValidatorBehavior
- ],
-
- validateObject: function(obj) {
- var valid = true;
- for (key in obj) {
- if (obj[key] !== 'cats') {
- valid = false;
- break;
- }
- }
- return valid;
- },
-
- validate: function(values) {
- if (typeof values === 'object') {
- return this.validateObject(values);
- } else {
- var value = Array.isArray(values) ? values.join('') : values;
- return value.match(/^(c|ca|cat|cats)?$/) !== null;
- }
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/index.html
deleted file mode 100644
index 84b96a8dc25..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>iron-validatable-behavior demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="cats-only.html">
- <link rel="import" href="validatable-input.html">
-
- <style is="custom-style">
-
- .valid {
- color: var(--google-green-500);
- }
-
- .invalid {
- color: var(--google-red-500);
- }
-
- </style>
-
-</head>
-<body>
- <div class="vertical-section vertical-section-container centered">
- <h1>&lt;iron-validatable-behavior&gt;</h1>
-
- <template is="dom-bind">
-
- <cats-only></cats-only>
-
- <section>
-
- <p>
- only type <code>cats</code>:
-
- <input is="validatable-input" invalid="{{invalid}}" validator="cats-only">
-
- <span class="valid" hidden$="[[invalid]]">valid</span>
- <span class="invalid" hidden$="[[!invalid]]">invalid</span>
- </p>
-
- </section>
-
- </template>
-
- </div>
-
- <script>
-
- document.querySelector('template[is="dom-bind"]').invalid = false;
-
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/validatable-input.html b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/validatable-input.html
deleted file mode 100644
index 19cf4775989..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/demo/validatable-input.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../iron-validatable-behavior.html">
-
-<script>
-
- Polymer({
-
- is: 'validatable-input',
-
- extends: 'input',
-
- properties: {
-
- invalid: {
- notify: true,
- type: Boolean,
- value: false
- }
-
- },
-
- behaviors: [
- Polymer.IronValidatableBehavior
- ],
-
- listeners: {
- 'input': '_onInput'
- },
-
- _onInput: function(event) {
- this.invalid = !this.validate(event.target.value);
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/index.html
deleted file mode 100644
index cfaa5b17598..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>iron-validatable-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/iron-validatable-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/iron-validatable-behavior.html
deleted file mode 100644
index 803731be930..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/iron-validatable-behavior/iron-validatable-behavior.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-meta/iron-meta.html">
-
-<script>
- /**
- * Singleton IronMeta instance.
- */
- Polymer.IronValidatableBehaviorMeta = null;
-
- /**
- * `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
- * Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
- *
- * By default, an `<iron-form>` element validates its fields when the user presses the submit button.
- * To validate a form imperatively, call the form's `validate()` method, which in turn will
- * call `validate()` on all its children. By using `Polymer.IronValidatableBehavior`, your
- * custom element will get a public `validate()`, which
- * will return the validity of the element, and a corresponding `invalid` attribute,
- * which can be used for styling.
- *
- * To implement the custom validation logic of your element, you must override
- * the protected `_getValidity()` method of this behaviour, rather than `validate()`.
- * See [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
- * for an example.
- *
- * ### Accessibility
- *
- * Changing the `invalid` property, either manually or by calling `validate()` will update the
- * `aria-invalid` attribute.
- *
- * @demo demo/index.html
- * @polymerBehavior
- */
- Polymer.IronValidatableBehavior = {
-
- properties: {
-
- /**
- * Name of the validator to use.
- */
- validator: {
- type: String
- },
-
- /**
- * True if the last call to `validate` is invalid.
- */
- invalid: {
- notify: true,
- reflectToAttribute: true,
- type: Boolean,
- value: false
- },
-
- /**
- * This property is deprecated and should not be used. Use the global
- * validator meta singleton, `Polymer.IronValidatableBehaviorMeta` instead.
- */
- _validatorMeta: {
- type: Object
- },
-
- /**
- * Namespace for this validator. This property is deprecated and should
- * not be used. For all intents and purposes, please consider it a
- * read-only, config-time property.
- */
- validatorType: {
- type: String,
- value: 'validator'
- },
-
- _validator: {
- type: Object,
- computed: '__computeValidator(validator)'
- }
- },
-
- observers: [
- '_invalidChanged(invalid)'
- ],
-
- registered: function() {
- Polymer.IronValidatableBehaviorMeta = new Polymer.IronMeta({type: 'validator'});
- },
-
- _invalidChanged: function() {
- if (this.invalid) {
- this.setAttribute('aria-invalid', 'true');
- } else {
- this.removeAttribute('aria-invalid');
- }
- },
-
- /**
- * @return {boolean} True if the validator `validator` exists.
- */
- hasValidator: function() {
- return this._validator != null;
- },
-
- /**
- * Returns true if the `value` is valid, and updates `invalid`. If you want
- * your element to have custom validation logic, do not override this method;
- * override `_getValidity(value)` instead.
-
- * @param {Object} value The value to be validated. By default, it is passed
- * to the validator's `validate()` function, if a validator is set.
- * @return {boolean} True if `value` is valid.
- */
- validate: function(value) {
- this.invalid = !this._getValidity(value);
- return !this.invalid;
- },
-
- /**
- * Returns true if `value` is valid. By default, it is passed
- * to the validator's `validate()` function, if a validator is set. You
- * should override this method if you want to implement custom validity
- * logic for your element.
- *
- * @param {Object} value The value to be validated.
- * @return {boolean} True if `value` is valid.
- */
-
- _getValidity: function(value) {
- if (this.hasValidator()) {
- return this._validator.validate(value);
- }
- return true;
- },
-
- __computeValidator: function() {
- return Polymer.IronValidatableBehaviorMeta &&
- Polymer.IronValidatableBehaviorMeta.byKey(this.validator);
- }
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/.bower.json
deleted file mode 100644
index 2d3a1da519a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/.bower.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "name": "neon-animation",
- "description": "A system for animating Polymer-based web components",
- "version": "1.2.3",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "web-animations"
- ],
- "main": [
- "neon-animated-pages.html",
- "neon-animatable-behavior.html",
- "neon-animation-behavior.html",
- "neon-animation-runner-behavior.html",
- "neon-shared-element-animatable-behavior.html",
- "neon-shared-element-animation-behavior.html",
- "neon-animatable.html",
- "neon-animations.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/neon-animation"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/neon-animation",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-meta": "PolymerElements/iron-meta#^1.0.0",
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
- "iron-selector": "PolymerElements/iron-selector#^1.0.0",
- "web-animations-js": "web-animations/web-animations-js#^2.2.0"
- },
- "devDependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"
- },
- "_release": "1.2.3",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.3",
- "commit": "c50d51e62825f4aa53f10e93f746796a174af232"
- },
- "_source": "git://github.com/PolymerElements/neon-animation.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/neon-animation"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/.travis.yml
deleted file mode 100644
index dd1a81e7102..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-env:
- global:
- - secure: AnPpB3uzTWU0hmrDmPyOb/3mJZRv4BgPFJrpaT/mQ/9979IBeFfFHJX6MqQlgo894lJWvKSvAjEutgK5Z3LQh6cLB3JuhPBInwKgFPUx/V14VIju+Z7jwx6RycE3flb2f9Y6y5My13ovswsTNnhJEkpDGlbRnJlh5c+HeP+6D0oFPFaGWvULZsAHQnEykir1TMPL2TD8SfuYWifmBj7QYQ2vsYnqZoAkPNedv/OtdoA3rziFXSG3GqXX2NJVnYqlaLj/HiHK7xLlZu/ODfo6En12DMtqJajBP7NfJkEUAF72ScOsYxlwiI1aYcVSUy6upkxxPwkBj5x7wDZ0tRFmlautyq2skDAh/fgIfRw9AMe8kj/YLef+T8bmZNT9IIelNaNcpfTQHpYWcOpPk2uBT3iIOcmp+Ys8RZKqzYmekBtHTwCGmQcfQrjBXjrjz5xlUaoMH7vauh7Ct7SkD7Fu87XSUvks4v2yypxxmHXO8jUilKuUdtAzb3dtOboO0ptsoLuBm/qSeURco4be6KPyVnDxdWdbYOxIZtE8JeY2DbonS45OgFtL1NKeEIhiTQIcOuSs0qwJFFzaBBAfek1tkTvBhMJP3JPWpIbNJhdZWzSd0LUSe892sbiZJY67FA4xcY8vK5JZNWnxFyKX1+A8ljPEd1yBImxMzUDMNS9t0G0=
- - secure: jdh0G/FDRghnjasav0/8nOZsYgXUd5DLKgD5XrDCVrBvPwXly+AnMXE+Hr/bztEXylcEmcqrWUUfB1ODUdVn1EGk8CJaYpHyKcoMcpJiEjHYS/3i1rXRsnHs2o3dcRO69rA8A5LZeG3yYfiPVUiKlyl7MWOal3pNohDGi8dZcT0CoWnA8UaV//0uXG3GGG3X8KcbVfB2hQvG1mK6wM6W4eHVOplcBaE2xnnFDMxfU2KnRgjLSPw66PeJGczWOBR9fZql9p6kV38ZM2s4qnUsMlTZkNqn0f6CuEPqcG6+S6Tk9+0dvAHet+Ky9fgiyJPq+p6sDGfdm1ZJwOjz5MoyudzGSuHAJHH2nscQf8pUBQ1gxKaGg7GV9LUj0cjLDAFWA2KpxTlabDZhZPIMoMKFpqpvJG49gDVga5gGabom21nd/+E1i/2vvoP16kY9rjf+Gd5+tIzajXCu8Tq06Xz63idZDJbt38GjArfFFqe5k7CqE+m2vpWx/iTwe+cT70wnIq/xigvaNq6CgUuNdzkVnVBj/C7yVqwwZkfbBC7HhRna9Nyzts/j2M2vwy0oYB73WzuhpYSweaAOZq2kcUIQ5ZMGO3UkZRjwWnHxAi5mrvZhRcRIqkvJJhoMQnjwJSTah/3cz0cJh19DL+Ozde24/tuY+vOnhFb+ddo1OKD6FtM=
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/README.md b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/README.md
deleted file mode 100644
index 29c07539967..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/README.md
+++ /dev/null
@@ -1,306 +0,0 @@
-# neon-animation
-
-`neon-animation` is a suite of elements and behaviors to implement pluggable animated transitions for Polymer Elements using [Web Animations](https://w3c.github.io/web-animations/).
-
-*Warning: The API may change.*
-
-* [A basic animatable element](#basic)
-* [Animation configuration](#configuration)
- * [Animation types](#configuration-types)
- * [Configuration properties](#configuration-properties)
- * [Using multiple animations](#configuration-multiple)
- * [Running animations encapsulated in children nodes](#configuration-encapsulation)
-* [Page transitions](#page-transitions)
- * [Shared element animations](#shared-element)
- * [Declarative page transitions](#declarative-page)
-* [Included animations](#animations)
-* [Demos](#demos)
-
-<a name="basic"></a>
-## A basic animatable element
-
-Elements that can be animated should implement the `Polymer.NeonAnimatableBehavior` behavior, or `Polymer.NeonAnimationRunnerBehavior` if they're also responsible for running an animation.
-
-```js
-Polymer({
- is: 'my-animatable',
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
- properties: {
- animationConfig: {
- value: function() {
- return {
- // provided by neon-animation/animations/scale-down-animation.html
- name: 'scale-down-animation',
- node: this
- }
- }
- }
- },
- listeners: {
- // this event is fired when the animation finishes
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
- animate: function() {
- // run scale-down-animation
- this.playAnimation();
- },
- _onNeonAnimationFinish: function() {
- console.log('animation done!');
- }
-});
-```
-
-[Live demo](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/doc/basic.html)
-
-<a name="configuration"></a>
-## Animation configuration
-
-<a name="configuration-types"></a>
-### Animation types
-
-An element might run different animations, for example it might do something different when it enters the view and when it exits from view. You can set the `animationConfig` property to a map from an animation type to configuration.
-
-```js
-Polymer({
- is: 'my-dialog',
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
- properties: {
- opened: {
- type: Boolean
- },
- animationConfig: {
- value: function() {
- return {
- 'entry': {
- // provided by neon-animation/animations/scale-up-animation.html
- name: 'scale-up-animation',
- node: this
- },
- 'exit': {
- // provided by neon-animation/animations/fade-out-animation.html
- name: 'fade-out-animation',
- node: this
- }
- }
- }
- }
- },
- listeners: {
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
- show: function() {
- this.opened = true;
- this.style.display = 'inline-block';
- // run scale-up-animation
- this.playAnimation('entry');
- },
- hide: function() {
- this.opened = false;
- // run fade-out-animation
- this.playAnimation('exit');
- },
- _onNeonAnimationFinish: function() {
- if (!this.opened) {
- this.style.display = 'none';
- }
- }
-});
-```
-
-[Live demo](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/doc/types.html)
-
-You can also use the convenience properties `entryAnimation` and `exitAnimation` to set `entry` and `exit` animations:
-
-```js
-properties: {
- entryAnimation: {
- value: 'scale-up-animation'
- },
- exitAnimation: {
- value: 'fade-out-animation'
- }
-}
-```
-
-<a name="configuration-properties"></a>
-### Configuration properties
-
-You can pass additional parameters to configure an animation in the animation configuration object.
-All animations should accept the following properties:
-
- * `name`: The name of an animation, ie. an element implementing `Polymer.NeonAnimationBehavior`.
- * `node`: The target node to apply the animation to. Defaults to `this`.
- * `timing`: Timing properties to use in this animation. They match the [Web Animations Animation Effect Timing interface](https://w3c.github.io/web-animations/#the-animationeffecttiming-interface). The
- properties include the following:
- * `duration`: The duration of the animation in milliseconds.
- * `delay`: The delay before the start of the animation in milliseconds.
- * `easing`: A timing function for the animation. Matches the CSS timing function values.
-
-Animations may define additional configuration properties and they are listed in their documentation.
-
-<a name="configuration-multiple"></a>
-### Using multiple animations
-
-Set the animation configuration to an array to combine animations, like this:
-
-```js
-animationConfig: {
- value: function() {
- return {
- // fade-in-animation is run with a 50ms delay from slide-down-animation
- 'entry': [{
- name: 'slide-down-animation',
- node: this
- }, {
- name: 'fade-in-animation',
- node: this,
- timing: {delay: 50}
- }]
- }
- }
-}
-```
-
-<a name="configuration-encapsulation"></a>
-### Running animations encapsulated in children nodes
-
-You can include animations in the configuration that are encapsulated in a child element that implement `Polymer.NeonAnimatableBehavior` with the `animatable` property.
-
-```js
-animationConfig: {
- value: function() {
- return {
- // run fade-in-animation on this, and the entry animation on this.$.myAnimatable
- 'entry': [
- {name: 'fade-in-animation', node: this},
- {animatable: this.$.myAnimatable, type: 'entry'}
- ]
- }
- }
-}
-```
-
-<a name="page-transitions"></a>
-## Page transitions
-
-*The artist formerly known as `<core-animated-pages>`*
-
-The `neon-animated-pages` element manages a set of pages to switch between, and runs animations between the page transitions. It implements the `Polymer.IronSelectableBehavior` behavior. Each child node should implement `Polymer.NeonAnimatableBehavior` and define the `entry` and `exit` animations. During a page transition, the `entry` animation is run on the new page and the `exit` animation is run on the old page.
-
-<a name="shared-element"></a>
-### Shared element animations
-
-Shared element animations work on multiple nodes. For example, a "hero" animation is used during a page transition to make two elements from separate pages appear to animate as a single element. Shared element animation configurations have an `id` property that identify they belong in the same animation. Elements containing shared elements also have a `sharedElements` property defines a map from `id` to element, the element involved with the animation.
-
-In the incoming page:
-
-```js
-properties: {
- animationConfig: {
- value: function() {
- return {
- // the incoming page defines the 'entry' animation
- 'entry': {
- name: 'hero-animation',
- id: 'hero',
- toPage: this
- }
- }
- }
- },
- sharedElements: {
- value: function() {
- return {
- 'hero': this.$.hero
- }
- }
- }
-}
-```
-
-In the outgoing page:
-
-```js
-properties: {
- animationConfig: {
- value: function() {
- return {
- // the outgoing page defines the 'exit' animation
- 'exit': {
- name: 'hero-animation',
- id: 'hero',
- fromPage: this
- }
- }
- }
- },
- sharedElements: {
- value: function() {
- return {
- 'hero': this.$.otherHero
- }
- }
- }
-}
-```
-
-<a name="declarative-page"></a>
-### Declarative page transitions
-
-For convenience, if you define the `entry-animation` and `exit-animation` attributes on `<neon-animated-pages>`, those animations will apply for all page transitions.
-
-For example:
-
-```js
-<neon-animated-pages id="pages" class="flex" selected="[[selected]]" entry-animation="slide-from-right-animation" exit-animation="slide-left-animation">
- <neon-animatable>1</neon-animatable>
- <neon-animatable>2</neon-animatable>
- <neon-animatable>3</neon-animatable>
- <neon-animatable>4</neon-animatable>
- <neon-animatable>5</neon-animatable>
-</neon-animated-pages>
-```
-
-The new page will slide in from the right, and the old page slide away to the left.
-
-<a name="animations"></a>
-## Included animations
-
-Single element animations:
-
- * `fade-in-animation` Animates opacity from `0` to `1`;
- * `fade-out-animation` Animates opacity from `1` to `0`;
- * `scale-down-animation` Animates transform from `scale(1)` to `scale(0)`;
- * `scale-up-animation` Animates transform from `scale(0)` to `scale(1)`;
- * `slide-down-animation` Animates transform from `none` to `translateY(100%)`;
- * `slide-up-animation` Animates transform from `none` to `translateY(-100%)`;
- * `slide-from-top-animation` Animates transform from `translateY(-100%)` to `none`;
- * `slide-from-bottom-animation` Animates transform from `translateY(100%)` to `none`;
- * `slide-left-animation` Animates transform from `none` to `translateX(-100%)`;
- * `slide-right-animation` Animates transform from `none` to `translateX(100%)`;
- * `slide-from-left-animation` Animates transform from `translateX(-100%)` to `none`;
- * `slide-from-right-animation` Animates transform from `translateX(100%)` to `none`;
- * `transform-animation` Animates a custom transform.
-
-Note that there is a restriction that only one transform animation can be applied on the same element at a time. Use the custom `transform-animation` to combine transform properties.
-
-Shared element animations
-
- * `hero-animation` Animates an element such that it looks like it scales and transforms from another element.
- * `ripple-animation` Animates an element to full screen such that it looks like it ripples from another element.
-
-Group animations
- * `cascaded-animation` Applys an animation to an array of elements with a delay between each.
-
-<a name="demos"></a>
-## Demos
-
- * [Grid to full screen](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/grid/index.html)
- * [Animation on load](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/load/index.html)
- * [List item to detail](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/list/index.html) (For narrow width)
- * [Dots to squares](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/tiles/index.html)
- * [Declarative](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/declarative/index.html)
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/cascaded-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/cascaded-animation.html
deleted file mode 100644
index 539975333d1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/cascaded-animation.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<cascaded-animation>` applies an animation on an array of elements with a delay between each.
-the delay defaults to 50ms.
-
-Configuration:
-```
-{
- name: 'cascaded-animation',
- animation: <animation-name>,
- nodes: <array-of-nodes>,
- nodeDelay: <node-delay-in-ms>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'cascaded-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- /**
- * @param {{
- * animation: string,
- * nodes: !Array<!Element>,
- * nodeDelay: (number|undefined),
- * timing: (Object|undefined)
- * }} config
- */
- configure: function(config) {
- this._animations = [];
- var nodes = config.nodes;
- var effects = [];
- var nodeDelay = config.nodeDelay || 50;
-
- config.timing = config.timing || {};
- config.timing.delay = config.timing.delay || 0;
-
- var oldDelay = config.timing.delay;
- var abortedConfigure;
- for (var node, index = 0; node = nodes[index]; index++) {
- config.timing.delay += nodeDelay;
- config.node = node;
-
- var animation = document.createElement(config.animation);
- if (animation.isNeonAnimation) {
- var effect = animation.configure(config);
-
- this._animations.push(animation);
- effects.push(effect);
- } else {
- console.warn(this.is + ':', config.animation, 'not found!');
- abortedConfigure = true;
- break;
- }
- }
- config.timing.delay = oldDelay;
- config.node = null;
- // if a bad animation was configured, abort config.
- if (abortedConfigure) {
- return;
- }
-
- this._effect = new GroupEffect(effects);
- return this._effect;
- },
-
- complete: function() {
- for (var animation, index = 0; animation = this._animations[index]; index++) {
- animation.complete(animation.config);
- }
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-in-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-in-animation.html
deleted file mode 100644
index cdb74e30953..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-in-animation.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<fade-in-animation>` animates the opacity of an element from 0 to 1.
-
-Configuration:
-```
-{
- name: 'fade-in-animation',
- node: <node>
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'fade-in-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- this._effect = new KeyframeEffect(node, [
- {'opacity': '0'},
- {'opacity': '1'}
- ], this.timingFromConfig(config));
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-out-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-out-animation.html
deleted file mode 100644
index 82cc3997cfb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/fade-out-animation.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<fade-out-animation>` animates the opacity of an element from 1 to 0.
-
-Configuration:
-```
-{
- name: 'fade-out-animation',
- node: <node>
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'fade-out-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- this._effect = new KeyframeEffect(node, [
- {'opacity': '1'},
- {'opacity': '0'}
- ], this.timingFromConfig(config));
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/hero-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/hero-animation.html
deleted file mode 100644
index 176bee789e8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/hero-animation.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-shared-element-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<hero-animation>` is a shared element animation that scales and transform an element such that it
-appears to be shared between two pages. Use this in `<neon-animated-pages>`. The source page
-should use this animation in an 'exit' animation and set the `fromPage` configuration property to
-itself, and the destination page should use this animation in an `entry` animation and set the
-`toPage` configuration property to itself. They should also define the hero elements in the
-`sharedElements` property (not a configuration property, see
-`Polymer.NeonSharedElementAnimatableBehavior`).
-
-Configuration:
-```
-{
- name: 'hero-animation',
- id: <shared-element-id>,
- timing: <animation-timing>,
- toPage: <node>, /* define for the destination page */
- fromPage: <node>, /* define for the source page */
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'hero-animation',
-
- behaviors: [
- Polymer.NeonSharedElementAnimationBehavior
- ],
-
- configure: function(config) {
- var shared = this.findSharedElements(config);
- if (!shared) {
- return;
- }
-
- var fromRect = shared.from.getBoundingClientRect();
- var toRect = shared.to.getBoundingClientRect();
-
- var deltaLeft = fromRect.left - toRect.left;
- var deltaTop = fromRect.top - toRect.top;
- var deltaWidth = fromRect.width / toRect.width;
- var deltaHeight = fromRect.height / toRect.height;
-
- this._effect = new KeyframeEffect(shared.to, [
- {'transform': 'translate(' + deltaLeft + 'px,' + deltaTop + 'px) scale(' + deltaWidth + ',' + deltaHeight + ')'},
- {'transform': 'none'}
- ], this.timingFromConfig(config));
-
- this.setPrefixedProperty(shared.to, 'transformOrigin', '0 0');
- shared.to.style.zIndex = 10000;
- shared.from.style.visibility = 'hidden';
-
- return this._effect;
- },
-
- complete: function(config) {
- var shared = this.findSharedElements(config);
- if (!shared) {
- return null;
- }
- shared.to.style.zIndex = '';
- shared.from.style.visibility = '';
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/opaque-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/opaque-animation.html
deleted file mode 100644
index e3a007258c9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/opaque-animation.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<opaque-animation>` makes an element `opacity:1` for the duration of the animation. Used to prevent
-webkit/safari from drawing a frame before an animation for elements that animate from display:none.
--->
-
-<script>
-
- Polymer({
-
- is: 'opaque-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- this._effect = new KeyframeEffect(node, [
- {'opacity': '1'},
- {'opacity': '1'}
- ], this.timingFromConfig(config));
- node.style.opacity = '0';
- return this._effect;
- },
-
- complete: function(config) {
- config.node.style.opacity = '';
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/reverse-ripple-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/reverse-ripple-animation.html
deleted file mode 100644
index f1f9de96f83..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/reverse-ripple-animation.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-shared-element-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<reverse-ripple-animation>` scales and transform an element such that it appears to ripple down from this element, to either
-a shared element, or a screen position.
-
-If using as a shared element animation in `<neon-animated-pages>`, use this animation in an `exit`
-animation in the source page and in an `entry` animation in the destination page. Also, define the
-reverse-ripple elements in the `sharedElements` property (not a configuration property, see
-`Polymer.NeonSharedElementAnimatableBehavior`).
-If using a screen position, define the `gesture` property.
-Configuration:
-```
-{
- name: 'reverse-ripple-animation`.
- id: <shared-element-id>, /* set this or gesture */
- gesture: {x: <page-x>, y: <page-y>}, /* set this or id */
- timing: <animation-timing>,
- toPage: <node>, /* define for the destination page */
- fromPage: <node>, /* define for the source page */
-}
-```
--->
-
-<script>
- Polymer({
- is: 'reverse-ripple-animation',
-
- behaviors: [
- Polymer.NeonSharedElementAnimationBehavior
- ],
-
- configure: function(config) {
- var shared = this.findSharedElements(config);
- if (!shared) {
- return null;
- }
-
- var translateX, translateY;
- var fromRect = shared.from.getBoundingClientRect();
- if (config.gesture) {
- translateX = config.gesture.x - (fromRect.left + (fromRect.width / 2));
- translateY = config.gesture.y - (fromRect.top + (fromRect.height / 2));
- } else {
- var toRect = shared.to.getBoundingClientRect();
- translateX = (toRect.left + (toRect.width / 2)) - (fromRect.left + (fromRect.width / 2));
- translateY = (toRect.top + (toRect.height / 2)) - (fromRect.top + (fromRect.height / 2));
- }
- var translate = 'translate(' + translateX + 'px,' + translateY + 'px)';
-
- var size = Math.max(fromRect.width + Math.abs(translateX) * 2, fromRect.height + Math.abs(translateY) * 2);
- var diameter = Math.sqrt(2 * size * size);
- var scaleX = diameter / fromRect.width;
- var scaleY = diameter / fromRect.height;
- var scale = 'scale(' + scaleX + ',' + scaleY + ')';
-
- this._effect = new KeyframeEffect(shared.from, [
- {'transform': translate + ' ' + scale},
- {'transform': translate + ' scale(0)'}
- ], this.timingFromConfig(config));
-
- this.setPrefixedProperty(shared.from, 'transformOrigin', '50% 50%');
- shared.from.style.borderRadius = '50%';
-
- return this._effect;
- },
-
- complete: function() {
- if (this.sharedElements) {
- this.setPrefixedProperty(this.sharedElements.from, 'transformOrigin', '');
- this.sharedElements.from.style.borderRadius = '';
- }
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/ripple-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/ripple-animation.html
deleted file mode 100644
index d97186c3772..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/ripple-animation.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-shared-element-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<ripple-animation>` scales and transform an element such that it appears to ripple from either
-a shared element, or from a screen position, to full screen.
-
-If using as a shared element animation in `<neon-animated-pages>`, use this animation in an `exit`
-animation in the source page and in an `entry` animation in the destination page. Also, define the
-hero elements in the `sharedElements` property (not a configuration property, see
-`Polymer.NeonSharedElementAnimatableBehavior`).
-
-If using a screen position, define the `gesture` property.
-
-Configuration:
-```
-{
- name: 'ripple-animation`.
- id: <shared-element-id>, /* set this or gesture */
- gesture: {x: <page-x>, y: <page-y>}, /* set this or id */
- timing: <animation-timing>,
- toPage: <node>, /* define for the destination page */
- fromPage: <node>, /* define for the source page */
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'ripple-animation',
-
- behaviors: [
- Polymer.NeonSharedElementAnimationBehavior
- ],
-
- configure: function(config) {
- var shared = this.findSharedElements(config);
- if (!shared) {
- return null;
- }
-
- var translateX, translateY;
- var toRect = shared.to.getBoundingClientRect();
- if (config.gesture) {
- translateX = config.gesture.x - (toRect.left + (toRect.width / 2));
- translateY = config.gesture.y - (toRect.top + (toRect.height / 2));
- } else {
- var fromRect = shared.from.getBoundingClientRect();
- translateX = (fromRect.left + (fromRect.width / 2)) - (toRect.left + (toRect.width / 2));
- translateY = (fromRect.top + (fromRect.height / 2)) - (toRect.top + (toRect.height / 2));
- }
- var translate = 'translate(' + translateX + 'px,' + translateY + 'px)';
-
- var size = Math.max(toRect.width + Math.abs(translateX) * 2, toRect.height + Math.abs(translateY) * 2);
- var diameter = Math.sqrt(2 * size * size);
- var scaleX = diameter / toRect.width;
- var scaleY = diameter / toRect.height;
- var scale = 'scale(' + scaleX + ',' + scaleY + ')';
-
- this._effect = new KeyframeEffect(shared.to, [
- {'transform': translate + ' scale(0)'},
- {'transform': translate + ' ' + scale}
- ], this.timingFromConfig(config));
-
- this.setPrefixedProperty(shared.to, 'transformOrigin', '50% 50%');
- shared.to.style.borderRadius = '50%';
-
- return this._effect;
- },
-
- complete: function() {
- if (this.sharedElements) {
- this.setPrefixedProperty(this.sharedElements.to, 'transformOrigin', '');
- this.sharedElements.to.style.borderRadius = '';
- }
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-down-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-down-animation.html
deleted file mode 100644
index 1dcb1713ae4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-down-animation.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<scale-down-animation>` animates the scale transform of an element from 1 to 0. By default it
-scales in both the x and y axes.
-
-Configuration:
-```
-{
- name: 'scale-down-animation',
- node: <node>,
- axis: 'x' | 'y' | '',
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'scale-down-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- var scaleProperty = 'scale(0, 0)';
- if (config.axis === 'x') {
- scaleProperty = 'scale(0, 1)';
- } else if (config.axis === 'y') {
- scaleProperty = 'scale(1, 0)';
- }
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'scale(1,1)'},
- {'transform': scaleProperty}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-up-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-up-animation.html
deleted file mode 100644
index 42ec3f3228f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/scale-up-animation.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<scale-up-animation>` animates the scale transform of an element from 0 to 1. By default it
-scales in both the x and y axes.
-
-Configuration:
-```
-{
- name: 'scale-up-animation',
- node: <node>,
- axis: 'x' | 'y' | '',
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'scale-up-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- var scaleProperty = 'scale(0)';
- if (config.axis === 'x') {
- scaleProperty = 'scale(0, 1)';
- } else if (config.axis === 'y') {
- scaleProperty = 'scale(1, 0)';
- }
-
- this._effect = new KeyframeEffect(node, [
- {'transform': scaleProperty},
- {'transform': 'scale(1, 1)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-down-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-down-animation.html
deleted file mode 100644
index 9db28dd17e5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-down-animation.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-down-animation>` animates the transform of an element from `none` `translateY(100%)`.
-The `transformOrigin` defaults to `50% 0`.
-
-Configuration:
-```
-{
- name: 'slide-down-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-down-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'translateY(0%)'},
- {'transform': 'translateY(100%)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '50% 0');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-bottom-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-bottom-animation.html
deleted file mode 100644
index d1156e9353b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-bottom-animation.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-from-bottom-animation>` animates the transform of an element from `none` to `translateY(100%)`.
-The `transformOrigin` defaults to `50% 0`.
-
-Configuration:
-```
-{
- name: 'slide-from-bottom-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-from-bottom-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'translateY(100%)'},
- {'transform': 'translateY(0)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '50% 0');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-left-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-left-animation.html
deleted file mode 100644
index 5386c9b04f8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-left-animation.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-from-left-animation>` animates the transform of an element from
-`translateX(-100%)` to `none`.
-The `transformOrigin` defaults to `0 50%`.
-
-Configuration:
-```
-{
- name: 'slide-from-left-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-from-left-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'translateX(-100%)'},
- {'transform': 'none'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-right-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-right-animation.html
deleted file mode 100644
index 2afb591f15f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-right-animation.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-from-right-animation>` animates the transform of an element from
-`translateX(100%)` to `none`.
-The `transformOrigin` defaults to `0 50%`.
-
-Configuration:
-```
-{
- name: 'slide-from-right-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-from-right-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'translateX(100%)'},
- {'transform': 'none'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-top-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-top-animation.html
deleted file mode 100644
index c0a4881128a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-from-top-animation.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-from-top-animation>` animates the transform of an element from `translateY(-100%)` to
-`none`. The `transformOrigin` defaults to `50% 0`.
-
-Configuration:
-```
-{
- name: 'slide-from-top-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-from-top-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'translateY(-100%)'},
- {'transform': 'translateY(0%)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '50% 0');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-left-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-left-animation.html
deleted file mode 100644
index da80a6bd7d1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-left-animation.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-left-animation>` animates the transform of an element from `none` to `translateX(-100%)`.
-The `transformOrigin` defaults to `0 50%`.
-
-Configuration:
-```
-{
- name: 'slide-left-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-left-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'none'},
- {'transform': 'translateX(-100%)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-right-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-right-animation.html
deleted file mode 100644
index 99b5794e49f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-right-animation.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-right-animation>` animates the transform of an element from `none` to `translateX(100%)`.
-The `transformOrigin` defaults to `0 50%`.
-
-Configuration:
-```
-{
- name: 'slide-right-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-right-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'none'},
- {'transform': 'translateX(100%)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-up-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-up-animation.html
deleted file mode 100644
index 6464e78ed33..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/slide-up-animation.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<slide-up-animation>` animates the transform of an element from `translateY(0)` to
-`translateY(-100%)`. The `transformOrigin` defaults to `50% 0`.
-
-Configuration:
-```
-{
- name: 'slide-up-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'slide-up-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
-
- this._effect = new KeyframeEffect(node, [
- {'transform': 'translate(0)'},
- {'transform': 'translateY(-100%)'}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- } else {
- this.setPrefixedProperty(node, 'transformOrigin', '50% 0');
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/transform-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/transform-animation.html
deleted file mode 100644
index 2e5044422ef..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/animations/transform-animation.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../neon-animation-behavior.html">
-<link rel="import" href="../web-animations.html">
-
-<!--
-`<transform-animation>` animates a custom transform on an element. Use this to animate multiple
-transform properties, or to apply a custom transform value.
-
-Configuration:
-```
-{
- name: 'transform-animation',
- node: <node>,
- transformOrigin: <transform-origin>,
- transformFrom: <transform-from-string>,
- transformTo: <transform-to-string>,
- timing: <animation-timing>
-}
-```
--->
-
-<script>
-
- Polymer({
-
- is: 'transform-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- /**
- * @param {{
- * node: !Element,
- * transformOrigin: (string|undefined),
- * transformFrom: (string|undefined),
- * transformTo: (string|undefined),
- * timing: (Object|undefined)
- * }} config
- */
- configure: function(config) {
- var node = config.node;
- var transformFrom = config.transformFrom || 'none';
- var transformTo = config.transformTo || 'none';
-
- this._effect = new KeyframeEffect(node, [
- {'transform': transformFrom},
- {'transform': transformTo}
- ], this.timingFromConfig(config));
-
- if (config.transformOrigin) {
- this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
- }
-
- return this._effect;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/bower.json b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/bower.json
deleted file mode 100644
index 29499b822e2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/bower.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "neon-animation",
- "description": "A system for animating Polymer-based web components",
- "version": "1.2.3",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "web-animations"
- ],
- "main": [
- "neon-animated-pages.html",
- "neon-animatable-behavior.html",
- "neon-animation-behavior.html",
- "neon-animation-runner-behavior.html",
- "neon-shared-element-animatable-behavior.html",
- "neon-shared-element-animation-behavior.html",
- "neon-animatable.html",
- "neon-animations.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/neon-animation"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/neon-animation",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-meta": "PolymerElements/iron-meta#^1.0.0",
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
- "iron-selector": "PolymerElements/iron-selector#^1.0.0",
- "web-animations-js": "web-animations/web-animations-js#^2.2.0"
- },
- "devDependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/index.html
deleted file mode 100644
index 44993465fc4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/index.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: card</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="../../neon-animated-pages.html">
- <link rel="import" href="../../neon-animations.html">
- <link rel="import" href="../../../paper-styles/typography.html">
- <link rel="import" href="x-card.html">
- <link rel="import" href="x-cards-list.html">
-
- <style is="custom-style">
-
- body {
- padding: 15px;
- @apply(--layout-fullbleed);
- @apply(--paper-font-common-base);
- }
-
- neon-animated-pages {
- height: 100%;
- }
-
- .large {
- width: 100%
- }
-
- .button {
- text-align: center;
- width: 120px;
- height: 32px;
- line-height: 32px;
- border-radius: 2px;
- font-size: 0.9em;
- background-color: #fff;
- color: #646464;
- }
-
- .button.blue {
- background-color: #4285f4;
- color: #fff;
- }
-
- .button.raised {
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
- }
-
- .button.back {
- position: fixed;
- top: 30px;
- left: 30px;
- }
-
- .card-contents {
- @apply(--layout-vertical);
- @apply(--layout-center-center);
- @apply(--layout-fit);
- }
-
- .button-container {
- @apply(--layout-flex);
- @apply(--layout-horizontal);
- @apply(--layout-around-justified);
- }
- </style>
-
- </head>
- <body>
-
- <template is="dom-bind">
- <neon-animated-pages id="pages" selected="0">
- <x-cards-list id="list">
- <div class="card-contents">
- <h2>Choose a subject</h2>
- <div class="button-container large">
- <div class="blue raised button" on-click="_onPolymerClick">
- POLYMER
- </div>
- <div class="blue raised button" on-click="_onAngularClick">
- ANGULAR
- </div>
- </div>
- </div>
- </x-cards-list>
-
- <x-card>
- <div class="card-contents">
- <div class="raised back button" on-click="_onBackClick">
- BACK
- </div>
- <h2>Polymer</h2>
- <p>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </p>
- </div>
- </x-card>
-
- <x-card>
- <div class="card-contents">
- <div class="raised back button" on-click="_onBackClick">
- BACK
- </div>
- <h2>Angular</h2>
- <p>
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
- quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
- consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
- cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
- proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- </p>
- </div>
- </x-card>
-
- </neon-animated-pages>
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
-
- scope._onPolymerClick = function(event) {
- this.$.list.sharedElements = {
- 'ripple': event.target,
- 'reverse-ripple': event.target
- };
- this.$.pages.selected = 1;
- };
-
- scope._onAngularClick = function(event) {
- this.$.list.sharedElements = {
- 'ripple': event.target,
- 'reverse-ripple': event.target
- };
- this.$.pages.selected = 2;
- };
-
- scope._onBackClick = function(event) {
- this.$.pages.selected = 0;
- };
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-card.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-card.html
deleted file mode 100644
index 92885d29c82..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-card.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-
-<dom-module id="x-card">
- <template>
- <style>
- :host {
- display: block;
- overflow: hidden;
- }
- #placeholder {
- opacity: 0;
- background-color: grey;
- @apply(--layout-fit);
- }
- </style>
-
- <div id="placeholder"></div>
- <div id="container">
- <content select="div"></content>
- </div>
-
- </template>
-</dom-module>
-
-<script>
-(function() {
- Polymer({
- is: 'x-card',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
- animationConfig: {
- value: function() {
- return {
- 'entry': [{
- name: 'ripple-animation',
- id: 'ripple',
- toPage: this
- }, {
- name: 'fade-out-animation',
- node: this.$.placeholder,
- timing: {
- delay: 250
- }
- }, {
- name: 'fade-in-animation',
- node: this.$.container,
- timing: {
- delay: 50
- }
- }],
-
- 'exit': [{
- name: 'fade-out-animation',
- node: this.$.container,
- timing: {
- duration: 0
- }
- }, {
- name: 'reverse-ripple-animation',
- id: 'reverse-ripple',
- fromPage: this
- }]
- };
- }
- },
-
- sharedElements: {
- value: function() {
- return {
- 'ripple': this.$.placeholder,
- 'reverse-ripple': this.$.placeholder
- };
- }
- }
- }
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-cards-list.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-cards-list.html
deleted file mode 100644
index b817698fb55..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/card/x-cards-list.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-
-<dom-module id="x-cards-list">
- <template>
- <style>
- :host {
- display: block;
- overflow: hidden;
- }
-
- #placeholder {
- opacity: 0;
- background-color: grey;
- @apply(--layout-fit);
- }
- </style>
-
- <div id="placeholder"></div>
- <div id="container">
- <content select="div"></content>
- </div>
-
- </template>
-</dom-module>
-
-<script>
-(function() {
- Polymer({
- is: 'x-cards-list',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
- animationConfig: {
- value: function() {
- return {
- 'entry': [{
- name: 'reverse-ripple-animation',
- id: 'reverse-ripple',
- toPage: this
- }],
-
- 'exit': [{
- name: 'fade-out-animation',
- node: this.$.container,
- timing: {
- delay: 150,
- duration: 0
- }
- }, {
- name: 'ripple-animation',
- id: 'ripple',
- fromPage: this
- }]
- };
- }
- }
- }
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/declarative/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/declarative/index.html
deleted file mode 100644
index 26ba53ff9b3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/declarative/index.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: declarative</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="../../../paper-styles/typography.html">
- <link rel="import" href="../../../paper-styles/color.html">
- <link rel="import" href="../../neon-animated-pages.html">
- <link rel="import" href="../../neon-animatable.html">
- <link rel="import" href="../../neon-animations.html">
-
- <style is="custom-style">
- body {
- overflow: hidden;
- @apply(--layout-fullbleed);
- @apply(--layout-vertical);
- }
-
- .toolbar {
- position: relative;
-
- padding: 8px;
-
- background-color: white;
-
- z-index: 12;
- }
-
- neon-animated-pages {
- @apply(--layout-flex);
- }
-
- neon-animatable {
- color: white;
- @apply(--layout-horizontal);
- @apply(--layout-center-center);
- @apply(--paper-font-display4);
- }
-
- neon-animatable:nth-child(1) {
- background: var(--paper-red-500);
- }
-
- neon-animatable:nth-child(2) {
- background: var(--paper-blue-500);
- }
-
- neon-animatable:nth-child(3) {
- background: var(--paper-orange-500);
- }
-
- neon-animatable:nth-child(4) {
- background: var(--paper-green-500);
- }
-
- neon-animatable:nth-child(5) {
- background: var(--paper-purple-500);
- }
-
- </style>
-
- </head>
- <body>
-
- <template is="dom-bind">
-
- <div class="toolbar">
- <button on-click="_onPrevClick">&#8678;</button>
- <button on-click="_onNextClick">&#8680;</button>
- <button on-click="_onUpClick">&#8679;</button>
- <button on-click="_onDownClick">&#8681;</button>
- </div>
-
- <neon-animated-pages id="pages" selected="[[selected]]" entry-animation="[[entryAnimation]]" exit-animation="[[exitAnimation]]">
- <neon-animatable>1</neon-animatable>
- <neon-animatable>2</neon-animatable>
- <neon-animatable>3</neon-animatable>
- <neon-animatable>4</neon-animatable>
- <neon-animatable>5</neon-animatable>
- </neon-animated-pages>
-
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
- scope.selected = 0;
-
- scope._onPrevClick = function() {
- this.entryAnimation = 'slide-from-left-animation';
- this.exitAnimation = 'slide-right-animation';
- this.selected = this.selected === 0 ? 4 : (this.selected - 1);
- }
-
- scope._onNextClick = function() {
- this.entryAnimation = 'slide-from-right-animation';
- this.exitAnimation = 'slide-left-animation';
- this.selected = this.selected === 4 ? 0 : (this.selected + 1);
- }
-
- scope._onUpClick = function() {
- this.entryAnimation = 'slide-from-top-animation';
- this.exitAnimation = 'slide-down-animation';
- this.selected = this.selected === 4 ? 0 : (this.selected + 1);
- }
-
- scope._onDownClick = function() {
- this.entryAnimation = 'slide-from-bottom-animation';
- this.exitAnimation = 'slide-up-animation';
- this.selected = this.selected === 0 ? 4 : (this.selected - 1);
- }
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/index.html
deleted file mode 100644
index 8b3875e7ec1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animation demo: basic</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="my-animatable.html">
- <link rel="import" href="my-dialog.html">
-
- </head>
- <style>
- my-animatable {
- margin-top: 50px;
- }
- </style>
- <body>
-
- <template is="dom-bind">
-
- <button on-click="_onCircleButtonClick">toggle circle</button>
- <button on-click="_onDialogButtonClick">toggle dialog</button>
-
- <div style="text-align: center">
- <my-dialog>Hello World!</my-dialog>
- </div>
-
- <my-animatable></my-animatable>
-
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
-
- scope._onCircleButtonClick = function(event) {
- var node = document.querySelector('my-animatable');
- if (node) {
- node.animate();
- }
- };
-
- scope._onDialogButtonClick = function(event) {
- var node = document.querySelector('my-dialog');
- if (node) {
- if (node.opened) {
- node.hide();
- } else {
- node.show();
- }
- }
- };
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-animatable.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-animatable.html
deleted file mode 100644
index 5063f74ba66..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-animatable.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../neon-animation-runner-behavior.html">
-<link rel="import" href="../../animations/scale-down-animation.html">
-
-<dom-module id="my-animatable">
- <template>
- <style>
- :host {
- display: inline-block;
- border-radius: 50%;
- width: 300px;
- height: 300px;
- background: orange;
- }
- </style>
- <content></content>
-
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'my-animatable',
-
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- name: 'scale-down-animation',
- node: this
- }
- }
- }
-
- },
-
- listeners: {
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
-
- animate: function() {
- this.playAnimation();
- },
-
- _onNeonAnimationFinish: function() {
- console.log('animation finish!');
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-dialog.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-dialog.html
deleted file mode 100644
index bd3344c0ea7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/doc/my-dialog.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../paper-styles/shadow.html">
-<link rel="import" href="../../neon-animation-runner-behavior.html">
-<link rel="import" href="../../animations/scale-up-animation.html">
-<link rel="import" href="../../animations/fade-out-animation.html">
-
-
-<dom-module id="my-dialog">
- <template>
- <style>
- :host {
- display: none;
- padding: 16px;
- background: white;
- color: black;
- margin: 0 auto;
- z-index: 100;
- position: absolute;
- @apply(--shadow-elevation-2dp);
- }
- </style>
- <content></content>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'my-dialog',
-
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
-
- opened: {
- type: Boolean
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'scale-up-animation',
- node: this
- }],
- 'exit': [{
- name: 'fade-out-animation',
- node: this
- }]
- }
- }
- }
-
- },
-
- listeners: {
- 'neon-animation-finish': '_onAnimationFinish'
- },
-
- _onAnimationFinish: function() {
- if (!this.opened) {
- this.style.display = '';
- }
- },
-
- show: function() {
- this.opened = true;
- this.style.display = 'inline-block';
- this.playAnimation('entry');
- },
-
- hide: function() {
- this.opened = false;
- this.playAnimation('exit');
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/animated-dropdown.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/animated-dropdown.html
deleted file mode 100644
index 9a61530fb74..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/animated-dropdown.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../paper-styles/shadow.html">
-<link rel="import" href="../../neon-animation-runner-behavior.html">
-
-<dom-module id="animated-dropdown">
- <template>
- <style>
- :host {
- display: none;
- padding: 16px;
- background: white;
- color: black;
-
- @apply(--shadow-elevation-2dp);
- }
- </style>
- <content></content>
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'animated-dropdown',
-
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'scale-up-animation',
- node: this,
- transformOrigin: '0 0'
- }],
- 'exit': [{
- name: 'fade-out-animation',
- node: this
- }]
- }
- }
- },
-
- _showing: {
- type: Boolean,
- value: false
- }
-
- },
-
- listeners: {
- 'neon-animation-finish': '_onAnimationFinish'
- },
-
- _onAnimationFinish: function() {
- if (this._showing) {
- } else {
- this.style.display = '';
- }
- },
-
- show: function() {
- this.style.display = 'inline-block';
- this._showing = true;
- this.playAnimation('entry');
- },
-
- hide: function() {
- this._showing = false;
- this.playAnimation('exit');
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/index.html
deleted file mode 100644
index b238474cbf4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/dropdown/index.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: dropdown</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../neon-animated-pages.html">
- <link rel="import" href="../../neon-animations.html">
- <link rel="import" href="animated-dropdown.html">
-
- </head>
- <body>
-
- <template is="dom-bind">
-
- <button dropdown-id="dropdown" on-click="_onButtonClick">dropdown</button>
- <br>
- <animated-dropdown id="dropdown" on-click="_onDropdownClick">Hello world!</animated-dropdown>
-
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
-
- scope._onButtonClick = function(event) {
- var dropdown = document.querySelector('#' + event.target.getAttribute('dropdown-id'));
- if (dropdown) {
- dropdown.show();
- }
- };
-
- scope._onDropdownClick = function(event) {
- event.target.hide();
- };
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/animated-grid.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/animated-grid.html
deleted file mode 100644
index a2689364169..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/animated-grid.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../paper-styles/typography.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-<link rel="import" href="../shared-styles.html">
-
-<dom-module id="animated-grid">
- <template>
- <style include="shared-styles"></style>
- <style>
-
- :host {
- display: block;
- background: #000;
- }
-
- .tile {
- display: inline-block;
- float: left;
- vertical-align: top;
- width: calc(100% / 6);
- height: calc(100% / 3);
-
- @apply(--paper-font-title);
- @apply(--layout-vertical);
- @apply(--layout-center-center);
- }
-
- .tile:nth-of-type(1) {
- width: calc(100% / 3);
- height: calc(100% / 3 * 2);
- }
-
- .tile:nth-of-type(4) {
- width: calc(100% / 3);
- }
-
- .tile:nth-of-type(5) {
- width: calc(100% / 3);
- height: calc(100% / 3 * 2);
- }
-
- .tile:nth-of-type(8) {
- width: calc(100% / 3);
- height: calc(100% / 3);
- }
-
- .tile:nth-of-type(9) {
- position: absolute;
- top: calc(100% / 3 * 2);
- left: 0;
- width: calc(100% / 6);
- height: calc(100% / 3);
- }
-
- .tile:nth-of-type(10) {
- position: absolute;
- top: calc(100% / 3 * 2);
- left: calc(100% / 6);;
- width: calc(100% / 6);
- height: calc(100% / 3);
- }
- </style>
-
- <template is="dom-repeat" items="[[config]]">
- <div class$="[[_computeTileClass(item.color)]]">
- <span>[[item.value]]</span>
- </div>
- </template>
-
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'animated-grid',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- config: {
- type: Array,
- value: function() {
- return [
- {value: 1, color: 'blue'},
- {value: 2, color: 'red'},
- {value: 3, color: 'blue'},
- {value: 4, color: 'green'},
- {value: 5, color: 'yellow'},
- {value: 6, color: 'blue'},
- {value: 7, color: 'red'},
- {value: 8, color: 'green'},
- {value: 9, color: 'yellow'},
- {value: 10, color: 'red'}
- ]
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'exit': [{
- name: 'ripple-animation',
- id: 'ripple',
- fromPage: this
- }, {
- name: 'hero-animation',
- id: 'hero',
- fromPage: this
- }]
- }
- }
- }
-
- },
-
- listeners: {
- click: '_onClick'
- },
-
- _computeTileClass: function(color) {
- return 'tile ' + color + '-300';
- },
-
- _onClick: function(event) {
- var target = event.target;
- while (target !== this && !target._templateInstance) {
- target = target.parentNode;
- }
-
- // configure the page animation
- this.sharedElements = {
- 'hero': target,
- 'ripple': target
- };
- this.animationConfig['exit'][0].gesture = {
- x: event.x || event.pageX,
- y: event.y || event.pageY
- };
-
- this.fire('tile-click', {
- tile: target,
- data: target._templateInstance.item
- });
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/fullsize-page-with-card.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/fullsize-page-with-card.html
deleted file mode 100644
index 63d35bbf688..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/fullsize-page-with-card.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-<link rel="import" href="../../../paper-styles/color.html">
-<link rel="import" href="../shared-styles.html">
-
-<dom-module id="fullsize-page-with-card">
- <template>
- <style include="shared-styles"></style>
- <style>
-
- :host {
- display: block;
- }
-
- .fixed {
- position: fixed;
- top: 0;
- left: 0;
- height: 100vh;
- width: 100vw;
- }
-
- .card {
- position: relative;
- margin: 200px 100px 0;
- height: 700px;
- }
-
- </style>
-
- <div id="fixed" class$="[[_computeFixedBackgroundClass(color)]]"></div>
- <div id="card" class$="[[_computeCardClass(color)]]"></div>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'fullsize-page-with-card',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- color: {
- type: String
- },
-
- sharedElements: {
- type: Object,
- value: function() {
- return {
- 'hero': this.$.card,
- 'ripple': this.$.fixed
- }
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'ripple-animation',
- id: 'ripple',
- toPage: this,
- }, {
- name: 'hero-animation',
- id: 'hero',
- toPage: this,
- timing: {
- delay: 150
- }
- }],
- 'exit': [{
- name: 'fade-out-animation',
- node: this.$.fixed
- }, {
- name: 'transform-animation',
- transformFrom: 'none',
- transformTo: 'translate(0px,-200vh) scale(0.9,1)',
- node: this.$.card
- }]
- }
- }
- }
-
- },
-
- _computeCardClass: function(color) {
- var cls = 'card';
- if (color) {
- cls += ' ' + color + '-300';
- }
- return cls;
- },
-
- _computeFixedBackgroundClass: function(color) {
- var cls = 'fixed';
- if (color) {
- cls += ' ' + color + '-100';
- }
- return cls;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/index.html
deleted file mode 100644
index b102dba40b5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/grid/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: grid</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../neon-animated-pages.html">
- <link rel="import" href="../../neon-animations.html">
- <link rel="import" href="animated-grid.html">
- <link rel="import" href="fullsize-page-with-card.html">
-
- <style is="custom-style">
- body {
- overflow: hidden;
- @apply(--layout-fullbleed);
- }
-
- neon-animated-pages {
- height: 100%;
- }
- </style>
-
- </head>
- <body>
-
- <template is="dom-bind">
- <neon-animated-pages id="pages" selected="0">
- <animated-grid on-tile-click="_onTileClick"></animated-grid>
- <fullsize-page-with-card id="fullsize-card" on-click="_onFullsizeClick">
- </fullsize-page-with-card>
- </neon-animated-pages>
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
-
- scope._onTileClick = function(event) {
- this.$['fullsize-card'].color = event.detail.data.color;
- this.$.pages.selected = 1;
- };
-
- scope._onFullsizeClick = function(event) {
- this.$.pages.selected = 0;
- };
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/index.html
deleted file mode 100644
index 1e4e1204a8e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html lang="en">
-<head>
- <title>neon-animated pages demo</title>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-styles/demo-pages.html">
-</head>
-<style>
- a {
- display: block;
- margin-bottom: 10px;
- }
-</style>
-<body unresolved>
- <div class="horizontal-section-container">
- <div>
- <h4>Sample demos</h4>
- <div class="horizontal-section">
- <a href="doc/index.html">basic</a>
- <a href="declarative/index.html">declarative</a>
- <a href="dropdown/index.html">dropdown</a>
- <a href="grid/index.html">grid</a>
- <a href="list/index.html">list</a>
- <a href="load/index.html">load</a>
- <a href="tiles/index.html">tiles</a>
- <a href="card/index.html">card</a>
- </div>
- </div>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/full-view.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/full-view.html
deleted file mode 100644
index 565618c2182..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/full-view.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../../paper-styles/shadow.html">
-<link rel="import" href="../../neon-animatable-behavior.html">
-
-<dom-module id="full-view">
- <template>
- <style>
- :host {
- @apply(--layout-vertical);
- }
-
- .main {
- background: white;
- @apply(--layout-flex);
- @apply(--layout-scroll);
- @apply(--shadow-elevation-8dp);
- }
-
- .image-container {
- position: relative;
- width: 100%;
- padding-bottom: 100%;
- }
-
- .image {
- position: absolute;
- width: 100%;
- height: 100%;
- background: repeating-linear-gradient(
- 45deg,
- #f5f5f5,
- #f5f5f5 8px,
- #e0e0e0 8px,
- #e0e0e0 16px
- );
- }
- </style>
- <paper-toolbar class="medium-tall">
- <paper-icon-button id="button" icon="clear" on-click="_onClearButtonClick"></paper-icon-button>
- </paper-toolbar>
-
- <div id="main" class="main">
- <div class="image-container">
- <div class="image">
- </div>
- </div>
- </div>
-
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'full-view',
-
- behaviors: [
- Polymer.NeonAnimatableBehavior
- ],
-
- properties: {
-
- sharedElements: {
- type: Object,
- value: function() {
- return {
- 'hero': this.$.main
- };
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'fade-in-animation',
- node: this.$.button
- }, {
- name: 'hero-animation',
- id: 'hero',
- toPage: this
- }],
-
- 'exit': [{
- name: 'fade-out-animation',
- node: this.$.button
- }, {
- name: 'scale-down-animation',
- node: this.$.main,
- transformOrigin: '50% 50%',
- axis: 'y'
- }]
-
- }
- }
- }
-
- },
-
- _onClearButtonClick: function() {
- this.fire('close');
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/index.html
deleted file mode 100644
index eabb02e5b6d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/index.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: list</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="list-demo.html">
-
- </head>
- <style is="custom-style">
- body {
- @apply(--layout-fullbleed);
- }
-
- list-demo {
- @apply(--layout-fit);
- }
- </style>
- <body>
- <list-demo></list-demo>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-demo.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-demo.html
deleted file mode 100644
index 45808c8cae3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-demo.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../paper-toolbar/paper-toolbar.html">
-<link rel="import" href="../../neon-animated-pages.html">
-<link rel="import" href="../../neon-animations.html">
-<link rel="import" href="list-view.html">
-<link rel="import" href="full-view.html">
-
-<dom-module id="list-demo">
- <template>
- <style>
- :host {
- display: block;
- }
- neon-animated-pages {
- height: 100%;
- }
- </style>
- <neon-animated-pages id="pages" selected="0">
- <list-view data="[[fileData]]" on-item-click="_onItemClick"></list-view>
- <full-view on-close="_onClose"></full-view>
- </neon-animated-pages>
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'list-demo',
-
- properties: {
-
- fileData: {
- type: Array,
- value: function() {
- return [
- {fileName: 'IMG_4130.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4131.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4132.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4133.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4134.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4135.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4136.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4137.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4138.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4139.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4140.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4141.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4142.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4143.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4144.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4145.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4146.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4147.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4148.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4149.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4150.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4151.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4152.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4153.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4154.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4155.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4156.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4157.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4158.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4159.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4160.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4161.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4162.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4163.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4164.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4165.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4166.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4167.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4168.jpg', modifiedDate: 'May 12 2015'},
- {fileName: 'IMG_4169.jpg', modifiedDate: 'May 12 2015'}
- ]
- }
- }
- },
-
- _onItemClick: function() {
- this.$.pages.selected = 1;
- },
-
- _onClose: function() {
- this.$.pages.selected = 0;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-view.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-view.html
deleted file mode 100644
index ddb05502caf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/list/list-view.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-icons/iron-icons.html">
-<link rel="import" href="../../../iron-icon/iron-icon.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../../paper-icon-button/paper-icon-button.html">
-<link rel="import" href="../../../paper-item/paper-item.html">
-<link rel="import" href="../../../paper-item/paper-item-body.html">
-<link rel="import" href="../../../paper-styles/color.html">
-<link rel="import" href="../../neon-animatable-behavior.html">
-
-<dom-module id="list-view">
- <template>
- <style>
- :host {
- @apply(--layout-vertical);
- }
-
- .main {
- @apply(--layout-flex);
- @apply(--layout-scroll);
- }
-
- iron-icon {
- color: var(--google-grey-500);
- }
- </style>
- <paper-toolbar class="medium-tall">
- <paper-icon-button id="button" icon="arrow-back"></paper-icon-button>
- </paper-toolbar>
-
- <div class="main">
-
- <template is="dom-repeat" items="[[data]]">
-
- <paper-item>
- <paper-item-body two-line>
- <div>[[item.fileName]]</div>
- <div secondary>[[item.modifiedDate]]</div>
- </paper-item-body>
- <iron-icon icon="info"></iron-icon>
- </paper-item>
-
- </template>
-
- </div>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'list-view',
-
- behaviors: [
- Polymer.NeonAnimatableBehavior
- ],
-
- listeners: {
- 'click': '_onClick'
- },
-
- properties: {
-
- data: {
- type: Array,
- value: function() {
- return [];
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'fade-in-animation',
- node: this.$.button
- }],
-
- 'exit': [{
- name: 'fade-out-animation',
- node: this.$.button
- }, {
- name: 'hero-animation',
- id: 'hero',
- fromPage: this
- }]
- };
- }
- }
-
- },
-
- _onClick: function(event) {
- var target = event.target;
- while (target !== this && !target._templateInstance) {
- target = target.parentNode;
- }
-
- // configure the page animation
- this.sharedElements = {
- 'hero': target,
- };
-
- this.fire('item-click', {
- item: target,
- });
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/animated-grid.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/animated-grid.html
deleted file mode 100644
index c1d52c1a5e0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/animated-grid.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-<link rel="import" href="../../../paper-styles/typography.html">
-<link rel="import" href="../../../paper-styles/color.html">
-<link rel="import" href="../shared-styles.html">
-
-<dom-module id="animated-grid">
- <template>
- <style include="shared-styles"></style>
- <style>
- :host {
- display: block;
- background: #000;
- }
-
- .tile {
- display: inline-block;
- float: left;
- vertical-align: top;
- width: calc(100% / 6);
- height: calc(100% / 3);
-
- @apply(--paper-font-title);
- @apply(--layout-vertical);
- @apply(--layout-center-center);
- }
-
- .tile:nth-of-type(1) {
- width: calc(100% / 3);
- height: calc(100% / 3 * 2);
- }
-
- .tile:nth-of-type(4) {
- width: calc(100% / 3);
- }
-
- .tile:nth-of-type(5) {
- width: calc(100% / 3);
- height: calc(100% / 3 * 2);
- }
-
- .tile:nth-of-type(8) {
- width: calc(100% / 3);
- height: calc(100% / 3);
- }
-
- .tile:nth-of-type(9) {
- position: absolute;
- top: calc(100% / 3 * 2);
- left: 0;
- width: calc(100% / 6);
- height: calc(100% / 3);
- }
-
- .tile:nth-of-type(10) {
- position: absolute;
- top: calc(100% / 3 * 2);
- left: calc(100% / 6);;
- width: calc(100% / 6);
- height: calc(100% / 3);
- }
- </style>
-
- <template is="dom-repeat" items="[[config]]">
- <div class$="[[_computeTileClass(item.color)]]">
- <span>[[item.value]]</span>
- </div>
- </template>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'animated-grid',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- config: {
- type: Array,
- value: function() {
- return [
- {value: 1, color: 'blue'},
- {value: 2, color: 'red'},
- {value: 3, color: 'blue'},
- {value: 4, color: 'green'},
- {value: 5, color: 'yellow'},
- {value: 6, color: 'blue'},
- {value: 7, color: 'red'},
- {value: 8, color: 'green'},
- {value: 9, color: 'yellow'},
- {value: 10, color: 'red'}
- ]
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'cascaded-animation',
- animation: 'transform-animation',
- transformFrom: 'translateY(100%)',
- transformTo: 'none',
- timing: {
- delay: 50
- }
- }]
- }
- }
- }
-
- },
-
- attached: function() {
- this.async(function() {
- var nodeList = Polymer.dom(this.root).querySelectorAll('.tile');
- this.animationConfig['entry'][0].nodes = Array.prototype.slice.call(nodeList);
- });
- },
-
- _computeTileClass: function(color) {
- return 'tile ' + color + '-300';
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/full-page.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/full-page.html
deleted file mode 100644
index 61a11bd7baa..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/full-page.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-animatable-behavior.html">
-<link rel="import" href="../../neon-animation-runner-behavior.html">
-<link rel="import" href="../../../paper-styles/shadow.html">
-<link rel="import" href="animated-grid.html">
-
-<dom-module id="full-page">
- <template>
- <style>
- :host {
- background: black;
- visibility: hidden;
- @apply(--layout-vertical);
- }
-
- .toolbar {
- background: #9c27b0;
- height: 72px;
- z-index: 1;
- @apply(--shadow-elevation-2dp);
- }
-
- animated-grid {
- height: calc(100% - 72px);
- @apply(--layout-flex);
- }
- </style>
-
- <div id="toolbar" class="toolbar"></div>
- <animated-grid id="grid"></animated-grid>
-
- </template>
-</dom-module>
-
-<script>
-
-Polymer({
-
- is: 'full-page',
-
- behaviors: [
- Polymer.NeonAnimatableBehavior,
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'slide-from-top-animation',
- node: this.$.toolbar
- }, {
- animatable: this.$.grid,
- type: 'entry'
- }]
- };
- }
- }
-
- },
-
- show: function() {
- this.style.visibility = 'visible';
- this.playAnimation('entry');
- }
-
-});
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/index.html
deleted file mode 100644
index 54c8d68a5a9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/load/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: load</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="../../neon-animated-pages.html">
- <link rel="import" href="../../neon-animations.html">
- <link rel="import" href="full-page.html">
-
- <style is="custom-style">
- body {
- overflow: hidden;
- @apply(--layout-fullbleed);
- }
- full-page {
- @apply(--layout-fit);
- }
- </style>
- </head>
- <body>
-
- <full-page></full-page>
-
- <script>
-
- document.addEventListener('WebComponentsReady', function() {
- document.querySelector('full-page').show();
- });
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/animated-grid.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/animated-grid.html
deleted file mode 100644
index f1244b442c5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/animated-grid.html
+++ /dev/null
@@ -1,167 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-<link rel="import" href="../../../paper-styles/typography.html">
-<link rel="import" href="../../../paper-styles/color.html">
-<link rel="import" href="../shared-styles.html">
-
-<dom-module id="animated-grid">
- <template>
- <style include="shared-styles"></style>
- <style>
-
- :host {
- display: block;
- background: #000;
- }
-
- .tile {
- display: inline-block;
- float: left;
- vertical-align: top;
- width: calc(100% / 6);
- height: calc(100% / 3);
-
- @apply(--paper-font-title);
- @apply(--layout-vertical);
- @apply(--layout-center-center);
- }
-
- .tile:nth-of-type(1) {
- width: calc(100% / 3);
- height: calc(100% / 3 * 2);
- }
-
- .tile:nth-of-type(4) {
- width: calc(100% / 3);
- }
-
- .tile:nth-of-type(5) {
- width: calc(100% / 3);
- height: calc(100% / 3 * 2);
- }
-
- .tile:nth-of-type(8) {
- width: calc(100% / 3);
- height: calc(100% / 3);
- }
-
- .tile:nth-of-type(9) {
- position: absolute;
- top: calc(100% / 3 * 2);
- left: 0;
- width: calc(100% / 6);
- height: calc(100% / 3);
- }
-
- .tile:nth-of-type(10) {
- position: absolute;
- top: calc(100% / 3 * 2);
- left: calc(100% / 6);;
- width: calc(100% / 6);
- height: calc(100% / 3);
- }
-
- </style>
-
- <template is="dom-repeat" items="[[config]]">
- <div class$="[[_computeTileClass(item.color)]]">
- <span>[[item.value]]</span>
- </div>
- </template>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'animated-grid',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- config: {
- type: Array,
- value: function() {
- return [
- {value: 1, color: 'blue'},
- {value: 2, color: 'red'},
- {value: 3, color: 'blue'},
- {value: 4, color: 'green'},
- {value: 5, color: 'yellow'},
- {value: 6, color: 'blue'},
- {value: 7, color: 'red'},
- {value: 8, color: 'green'},
- {value: 9, color: 'yellow'},
- {value: 10, color: 'red'}
- ]
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'exit': [{
- name: 'ripple-animation',
- id: 'ripple',
- fromPage: this
- }, {
- name: 'hero-animation',
- id: 'hero',
- fromPage: this
- }]
- }
- }
- }
-
- },
-
- listeners: {
- click: '_onClick'
- },
-
- _computeTileClass: function(color) {
- return 'tile ' + color + '-300';
- },
-
- _onClick: function(event) {
- var target = event.target;
- while (target !== this && !target._templateInstance) {
- target = target.parentNode;
- }
-
- // configure the page animation
- this.sharedElements = {
- 'hero': target,
- 'ripple': target
- };
- this.animationConfig['exit'][0].gesture = {
- x: event.x,
- y: event.y
- };
-
- this.fire('tile-click', {
- tile: target,
- data: target._templateInstance.item
- });
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/fullsize-page-with-card.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/fullsize-page-with-card.html
deleted file mode 100644
index 83b8a9170cb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/fullsize-page-with-card.html
+++ /dev/null
@@ -1,120 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-<link rel="import" href="../shared-styles.html">
-
-<dom-module id="fullsize-page-with-card">
- <template>
- <style include="shared-styles"></style>
- <style>
-
- :host {
- display: block;
- }
-
- .fixed {
- position: fixed;
- top: 0;
- left: 0;
- height: 100vh;
- width: 100vw;
- }
-
- .card {
- position: relative;
- margin: 200px 100px 0;
- height: 700px;
- }
-
- </style>
-
- <div id="fixed" class$="[[_computeFixedBackgroundClass(color)]]"></div>
- <div id="card" class$="[[_computeCardClass(color)]]"></div>
-
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'fullsize-page-with-card',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- color: {
- type: String
- },
-
- sharedElements: {
- type: Object,
- value: function() {
- return {
- 'hero': this.$.card,
- 'ripple': this.$.fixed
- }
- }
- },
-
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'ripple-animation',
- id: 'ripple',
- toPage: this,
- }, {
- name: 'hero-animation',
- id: 'hero',
- toPage: this,
- timing: {
- delay: 150
- }
- }],
- 'exit': [{
- name: 'fade-out-animation',
- node: this.$.fixed
- }, {
- name: 'transform-animation',
- transformFrom: 'none',
- transformTo: 'translate(0px,-200vh) scale(0.9,1)',
- node: this.$.card
- }]
- }
- }
- }
-
- },
-
- _computeCardClass: function(color) {
- var cls = 'card';
- if (color) {
- cls += ' ' + color + '-300';
- }
- return cls;
- },
-
- _computeFixedBackgroundClass: function(color) {
- var cls = 'fixed';
- if (color) {
- cls += ' ' + color + '-100';
- }
- return cls;
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/index.html
deleted file mode 100644
index 591d63c6980..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: grid</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="../../neon-animations.html">
- <link rel="import" href="reprojected-pages.html">
- <link rel="import" href="animated-grid.html">
- <link rel="import" href="fullsize-page-with-card.html">
-
- <style is="custom-style">
- body {
- overflow: hidden;
- @apply(--layout-fullbleed);
- }
- reprojected-pages {
- height: 100%;
- }
- </style>
- </head>
- <body>
- <template is="dom-bind">
-
- <reprojected-pages id="pages" selected="0">
- <animated-grid on-tile-click="_onTileClick"></animated-grid>
- <fullsize-page-with-card id="fullsize-card" hero-id="hero" on-click="_onFullsizeClick">
- </fullsize-page-with-card>
- </reprojected-pages>
-
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
-
- scope._onTileClick = function(event) {
- this.$['fullsize-card'].color = event.detail.data.color;
- this.$.pages.selected = 1;
- };
-
- scope._onFullsizeClick = function(event) {
- this.$.pages.selected = 0;
- };
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/reprojected-pages.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/reprojected-pages.html
deleted file mode 100644
index e71f2e055de..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/reprojection/reprojected-pages.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../neon-animated-pages.html">
-
-<dom-module id="reprojected-pages">
- <template>
- <style>
- neon-animated-pages {
- height: 100%;
- }
- </style>
- <neon-animated-pages selected="{{selected}}">
- <content></content>
- </neon-animated-pages>
-
- </template>
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'reprojected-pages',
-
- properties: {
-
- selected: {
- type: String,
- notify: true
- }
-
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/shared-styles.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/shared-styles.html
deleted file mode 100644
index 4e48c8c4065..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/shared-styles.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<dom-module id="shared-styles">
- <template>
- <style>
- .red-100 {
- background: var(--google-red-100);
- }
-
- .yellow-100 {
- background: var(--google-yellow-100);
- }
-
- .blue-100 {
- background: var(--google-blue-100);
- }
-
- .green-100 {
- background: var(--google-green-100);
- }
-
- .red-300 {
- background: var(--google-red-300);
- }
-
- .yellow-300 {
- background: var(--google-yellow-300);
- }
-
- .blue-300 {
- background: var(--google-blue-300);
- }
-
- .green-300 {
- background: var(--google-green-300);
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/circles-page.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/circles-page.html
deleted file mode 100644
index 70a4a75210f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/circles-page.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-
-<dom-module id="circles-page">
- <template>
- <style>
- :host {
- @apply(--layout-horizontal);
- @apply(--layout-center-center);
- }
-
- .circle {
- display: inline-block;
- box-sizing: border-box;
- width: 100px;
- height: 100px;
- margin: 16px;
- border-radius: 50%;
- background: var(--color-one);
- }
- </style>
-
- <div>
- <div class="circle"></div>
- <div class="circle"></div>
- <div class="circle"></div>
- <div class="circle"></div>
- </div>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'circles-page',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- animationConfig: {
- value: function() {
- var circles = Polymer.dom(this.root).querySelectorAll('.circle');
- var circlesArray = Array.prototype.slice.call(circles);
- return {
- 'entry': [{
- name: 'cascaded-animation',
- animation: 'scale-up-animation',
- nodes: circlesArray
- }],
-
- 'exit': [{
- name: 'hero-animation',
- id: 'hero',
- fromPage: this
- }, {
- name: 'cascaded-animation',
- animation: 'scale-down-animation'
- }]
- };
- }
- }
- },
-
- listeners: {
- 'click': '_onClick'
- },
-
- _onClick: function(event) {
- var target = event.target;
- if (target.classList.contains('circle')) {
- // configure the page animation
- this.sharedElements = {
- 'hero': target
- };
-
- var nodesToScale = [];
- var circles = Polymer.dom(this.root).querySelectorAll('.circle');
- for (var node, index = 0; node = circles[index]; index++) {
- if (node !== event.target) {
- nodesToScale.push(node);
- }
- }
- this.animationConfig['exit'][1].nodes = nodesToScale;
-
- this.fire('circle-click');
- }
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/index.html
deleted file mode 100644
index f509f0b5e6c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>neon-animated-pages demo: tiles</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="../../neon-animated-pages.html">
- <link rel="import" href="../../neon-animations.html">
- <link rel="import" href="../../../paper-styles/color.html">
- <link rel="import" href="circles-page.html">
- <link rel="import" href="squares-page.html">
-
- <style is="custom-style">
- body {
- overflow: hidden;
- @apply(--layout-fullbleed);
- }
- neon-animated-pages {
- height: 100%;
- }
-
- :root {
- --color-one: var(--paper-cyan-300);
- --color-two: var(--paper-orange-500);
- }
- </style>
-
- </head>
- <body>
-
- <template is="dom-bind">
-
- <neon-animated-pages id="pages" selected="0">
- <circles-page on-circle-click="_onCircleClick"></circles-page>
- <squares-page on-click="_onSquaresClick"></squares-page>
- </neon-animated-pages>
-
- </template>
-
- <script>
-
- var scope = document.querySelector('template[is="dom-bind"]');
-
- scope._onCircleClick = function(event) {
- this.$.pages.selected = 1;
- };
-
- scope._onSquaresClick = function(event) {
- this.$.pages.selected = 0;
- };
-
- </script>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/squares-page.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/squares-page.html
deleted file mode 100644
index 52fe7e18801..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/demo/tiles/squares-page.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../../polymer/polymer.html">
-<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
-
-<dom-module id="squares-page">
- <template>
- <style>
- .header {
- height: 40%;
- background: var(--color-one);
- }
-
- .body {
- text-align: center;
- padding: 8px;
- }
-
- .square {
- display: inline-block;
- width: 150px;
- height: 150px;
- margin: 8px;
- background: var(--color-two);
- }
- </style>
-
- <div id="header" class="header"></div>
-
- <div class="body">
- <div class="square"></div>
- <div class="square"></div>
- <div class="square"></div>
- <div class="square"></div>
- </div>
-
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'squares-page',
-
- behaviors: [
- Polymer.NeonSharedElementAnimatableBehavior
- ],
-
- properties: {
-
- sharedElements: {
- value: function() {
- return {
- 'hero': this.$.header
- }
- }
- },
-
- animationConfig: {
- value: function() {
- var squares = Polymer.dom(this.root).querySelectorAll('.square');
- var squaresArray = Array.prototype.slice.call(squares);
- return {
- 'entry': [{
- name: 'hero-animation',
- id: 'hero',
- toPage: this
- }, {
- name: 'cascaded-animation',
- animation: 'transform-animation',
- transformFrom: 'translateY(100%)',
- nodes: squaresArray
- }],
-
- 'exit': [{
- name: 'slide-up-animation',
- node: this.$.header
- }, {
- name: 'cascaded-animation',
- animation: 'transform-animation',
- transformTo: 'translateY(60vh)',
- nodes: squaresArray
- }]
- };
- }
- }
- }
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/guides/neon-animation.md b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/guides/neon-animation.md
deleted file mode 100644
index 69727b864ff..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/guides/neon-animation.md
+++ /dev/null
@@ -1,314 +0,0 @@
----
-title: neon-animation
-summary: "A short guide to neon-animation and neon-animated-pages"
-tags: ['animation','core-animated-pages']
-elements: ['neon-animation','neon-animated-pages']
-updated: 2015-05-26
----
-
-# neon-animation
-
-`neon-animation` is a suite of elements and behaviors to implement pluggable animated transitions for Polymer Elements using [Web Animations](https://w3c.github.io/web-animations/).
-
-*Warning: The API may change.*
-
-* [A basic animatable element](#basic)
-* [Animation configuration](#configuration)
- * [Animation types](#configuration-types)
- * [Configuration properties](#configuration-properties)
- * [Using multiple animations](#configuration-multiple)
- * [Running animations encapsulated in children nodes](#configuration-encapsulation)
-* [Page transitions](#page-transitions)
- * [Shared element animations](#shared-element)
- * [Declarative page transitions](#declarative-page)
-* [Included animations](#animations)
-* [Demos](#demos)
-
-<a name="basic"></a>
-## A basic animatable element
-
-Elements that can be animated should implement the `Polymer.NeonAnimatableBehavior` behavior, or `Polymer.NeonAnimationRunnerBehavior` if they're also responsible for running an animation.
-
-```js
-Polymer({
- is: 'my-animatable',
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
- properties: {
- animationConfig: {
- value: function() {
- return {
- // provided by neon-animation/animations/scale-down-animation.html
- name: 'scale-down-animation',
- node: this
- }
- }
- }
- },
- listeners: {
- // this event is fired when the animation finishes
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
- animate: function() {
- // run scale-down-animation
- this.playAnimation();
- },
- _onNeonAnimationFinish: function() {
- console.log('animation done!');
- }
-});
-```
-
-[Live demo](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/doc/basic.html)
-
-<a name="configuration"></a>
-## Animation configuration
-
-<a name="configuration-types"></a>
-### Animation types
-
-An element might run different animations, for example it might do something different when it enters the view and when it exits from view. You can set the `animationConfig` property to a map from an animation type to configuration.
-
-```js
-Polymer({
- is: 'my-dialog',
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
- properties: {
- opened: {
- type: Boolean
- },
- animationConfig: {
- value: function() {
- return {
- 'entry': {
- // provided by neon-animation/animations/scale-up-animation.html
- name: 'scale-up-animation',
- node: this
- },
- 'exit': {
- // provided by neon-animation-animations/fade-out-animation.html
- name: 'fade-out-animation',
- node: this
- }
- }
- }
- }
- },
- listeners: {
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
- show: function() {
- this.opened = true;
- this.style.display = 'inline-block';
- // run scale-up-animation
- this.playAnimation('entry');
- },
- hide: function() {
- this.opened = false;
- // run fade-out-animation
- this.playAnimation('exit');
- },
- _onNeonAnimationFinish: function() {
- if (!this.opened) {
- this.style.display = 'none';
- }
- }
-});
-```
-
-[Live demo](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/doc/types.html)
-
-You can also use the convenience properties `entryAnimation` and `exitAnimation` to set `entry` and `exit` animations:
-
-```js
-properties: {
- entryAnimation: {
- value: 'scale-up-animation'
- },
- exitAnimation: {
- value: 'fade-out-animation'
- }
-}
-```
-
-<a name="configuration-properties"></a>
-### Configuration properties
-
-You can pass additional parameters to configure an animation in the animation configuration object.
-All animations should accept the following properties:
-
- * `name`: The name of an animation, ie. an element implementing `Polymer.NeonAnimationBehavior`.
- * `node`: The target node to apply the animation to. Defaults to `this`.
- * `timing`: Timing properties to use in this animation. They match the [Web Animations Animation Effect Timing interface](https://w3c.github.io/web-animations/#the-animationeffecttiming-interface). The
- properties include the following:
- * `duration`: The duration of the animation in milliseconds.
- * `delay`: The delay before the start of the animation in milliseconds.
- * `easing`: A timing function for the animation. Matches the CSS timing function values.
-
-Animations may define additional configuration properties and they are listed in their documentation.
-
-<a name="configuration-multiple"></a>
-### Using multiple animations
-
-Set the animation configuration to an array to combine animations, like this:
-
-```js
-animationConfig: {
- value: function() {
- return {
- // fade-in-animation is run with a 50ms delay from slide-down-animation
- 'entry': [{
- name: 'slide-down-animation',
- node: this
- }, {
- name: 'fade-in-animation',
- node: this,
- timing: {delay: 50}
- }]
- }
- }
-}
-```
-
-<a name="configuration-encapsulation"></a>
-### Running animations encapsulated in children nodes
-
-You can include animations in the configuration that are encapsulated in a child element that implement `Polymer.NeonAnimatableBehavior` with the `animatable` property.
-
-```js
-animationConfig: {
- value: function() {
- return {
- // run fade-in-animation on this, and the entry animation on this.$.myAnimatable
- 'entry': [
- {name: 'fade-in-animation', node: this},
- {animatable: this.$.myAnimatable, type: 'entry'}
- ]
- }
- }
-}
-```
-
-<a name="page-transitions"></a>
-## Page transitions
-
-*The artist formerly known as `<core-animated-pages>`*
-
-The `neon-animated-pages` element manages a set of pages to switch between, and runs animations between the page transitions. It implements the `Polymer.IronSelectableBehavior` behavior. Each child node should implement `Polymer.NeonAnimatableBehavior` and define the `entry` and `exit` animations. During a page transition, the `entry` animation is run on the new page and the `exit` animation is run on the old page.
-
-<a name="shared-element"></a>
-### Shared element animations
-
-Shared element animations work on multiple nodes. For example, a "hero" animation is used during a page transition to make two elements from separate pages appear to animate as a single element. Shared element animation configurations have an `id` property that identify they belong in the same animation. Elements containing shared elements also have a `sharedElements` property defines a map from `id` to element, the element involved with the animation.
-
-In the incoming page:
-
-```js
-properties: {
- animationConfig: {
- value: function() {
- return {
- // the incoming page defines the 'entry' animation
- 'entry': {
- name: 'hero-animation',
- id: 'hero',
- toPage: this
- }
- }
- }
- },
- sharedElements: {
- value: function() {
- return {
- 'hero': this.$.hero
- }
- }
- }
-}
-```
-
-In the outgoing page:
-
-```js
-properties: {
- animationConfig: {
- value: function() {
- return {
- // the outgoing page defines the 'exit' animation
- 'exit': {
- name: 'hero-animation',
- id: 'hero',
- fromPage: this
- }
- }
- }
- },
- sharedElements: {
- value: function() {
- return {
- 'hero': this.$.otherHero
- }
- }
- }
-}
-```
-
-<a name="declarative-page"></a>
-### Declarative page transitions
-
-For convenience, if you define the `entry-animation` and `exit-animation` attributes on `<neon-animated-pages>`, those animations will apply for all page transitions.
-
-For example:
-
-```js
-<neon-animated-pages id="pages" class="flex" selected="[[selected]]" entry-animation="slide-from-right-animation" exit-animation="slide-left-animation">
- <neon-animatable>1</neon-animatable>
- <neon-animatable>2</neon-animatable>
- <neon-animatable>3</neon-animatable>
- <neon-animatable>4</neon-animatable>
- <neon-animatable>5</neon-animatable>
-</neon-animated-pages>
-```
-
-The new page will slide in from the right, and the old page slide away to the left.
-
-<a name="animations"></a>
-## Included animations
-
-Single element animations:
-
- * `fade-in-animation` Animates opacity from `0` to `1`;
- * `fade-out-animation` Animates opacity from `1` to `0`;
- * `scale-down-animation` Animates transform from `scale(1)` to `scale(0)`;
- * `scale-up-animation` Animates transform from `scale(0)` to `scale(1)`;
- * `slide-down-animation` Animates transform from `none` to `translateY(100%)`;
- * `slide-up-animation` Animates transform from `none` to `translateY(-100%)`;
- * `slide-from-top-animation` Animates transform from `translateY(-100%)` to `none`;
- * `slide-from-bottom-animation` Animates transform from `translateY(100%)` to `none`;
- * `slide-left-animation` Animates transform from `none` to `translateX(-100%)`;
- * `slide-right-animation` Animates transform from `none` to `translateX(100%)`;
- * `slide-from-left-animation` Animates transform from `translateX(-100%)` to `none`;
- * `slide-from-right-animation` Animates transform from `translateX(100%)` to `none`;
- * `transform-animation` Animates a custom transform.
-
-Note that there is a restriction that only one transform animation can be applied on the same element at a time. Use the custom `transform-animation` to combine transform properties.
-
-Shared element animations
-
- * `hero-animation` Animates an element such that it looks like it scales and transforms from another element.
- * `ripple-animation` Animates an element to full screen such that it looks like it ripples from another element.
-
-Group animations
- * `cascaded-animation` Applys an animation to an array of elements with a delay between each.
-
-<a name="demos"></a>
-## Demos
-
- * [Grid to full screen](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/grid/index.html)
- * [Animation on load](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/load/index.html)
- * [List item to detail](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/list/index.html) (For narrow width)
- * [Dots to squares](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/tiles/index.html)
- * [Declarative](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/declarative/index.html)
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/index.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/index.html
deleted file mode 100644
index 6f5feedf455..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>neon-animation</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable-behavior.html
deleted file mode 100644
index dd58a6cfbac..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable-behavior.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-
- /**
- * `Polymer.NeonAnimatableBehavior` is implemented by elements containing animations for use with
- * elements implementing `Polymer.NeonAnimationRunnerBehavior`.
- * @polymerBehavior
- */
- Polymer.NeonAnimatableBehavior = {
-
- properties: {
-
- /**
- * Animation configuration. See README for more info.
- */
- animationConfig: {
- type: Object
- },
-
- /**
- * Convenience property for setting an 'entry' animation. Do not set `animationConfig.entry`
- * manually if using this. The animated node is set to `this` if using this property.
- */
- entryAnimation: {
- observer: '_entryAnimationChanged',
- type: String
- },
-
- /**
- * Convenience property for setting an 'exit' animation. Do not set `animationConfig.exit`
- * manually if using this. The animated node is set to `this` if using this property.
- */
- exitAnimation: {
- observer: '_exitAnimationChanged',
- type: String
- }
-
- },
-
- _entryAnimationChanged: function() {
- this.animationConfig = this.animationConfig || {};
- this.animationConfig['entry'] = [{
- name: this.entryAnimation,
- node: this
- }];
- },
-
- _exitAnimationChanged: function() {
- this.animationConfig = this.animationConfig || {};
- this.animationConfig['exit'] = [{
- name: this.exitAnimation,
- node: this
- }];
- },
-
- _copyProperties: function(config1, config2) {
- // shallowly copy properties from config2 to config1
- for (var property in config2) {
- config1[property] = config2[property];
- }
- },
-
- _cloneConfig: function(config) {
- var clone = {
- isClone: true
- };
- this._copyProperties(clone, config);
- return clone;
- },
-
- _getAnimationConfigRecursive: function(type, map, allConfigs) {
- if (!this.animationConfig) {
- return;
- }
-
- if(this.animationConfig.value && typeof this.animationConfig.value === 'function') {
- this._warn(this._logf('playAnimation', "Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));
- return;
- }
-
- // type is optional
- var thisConfig;
- if (type) {
- thisConfig = this.animationConfig[type];
- } else {
- thisConfig = this.animationConfig;
- }
-
- if (!Array.isArray(thisConfig)) {
- thisConfig = [thisConfig];
- }
-
- // iterate animations and recurse to process configurations from child nodes
- if (thisConfig) {
- for (var config, index = 0; config = thisConfig[index]; index++) {
- if (config.animatable) {
- config.animatable._getAnimationConfigRecursive(config.type || type, map, allConfigs);
- } else {
- if (config.id) {
- var cachedConfig = map[config.id];
- if (cachedConfig) {
- // merge configurations with the same id, making a clone lazily
- if (!cachedConfig.isClone) {
- map[config.id] = this._cloneConfig(cachedConfig)
- cachedConfig = map[config.id];
- }
- this._copyProperties(cachedConfig, config);
- } else {
- // put any configs with an id into a map
- map[config.id] = config;
- }
- } else {
- allConfigs.push(config);
- }
- }
- }
- }
- },
-
- /**
- * An element implementing `Polymer.NeonAnimationRunnerBehavior` calls this method to configure
- * an animation with an optional type. Elements implementing `Polymer.NeonAnimatableBehavior`
- * should define the property `animationConfig`, which is either a configuration object
- * or a map of animation type to array of configuration objects.
- */
- getAnimationConfig: function(type) {
- var map = {};
- var allConfigs = [];
- this._getAnimationConfigRecursive(type, map, allConfigs);
- // append the configurations saved in the map to the array
- for (var key in map) {
- allConfigs.push(map[key]);
- }
- return allConfigs;
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable.html
deleted file mode 100644
index 82deb610b65..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animatable.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
-<link rel="import" href="neon-animatable-behavior.html">
-
-<!--
-`<neon-animatable>` is a simple container element implementing `Polymer.NeonAnimatableBehavior`. This is a convenience element for use with `<neon-animated-pages>`.
-
-```
-<neon-animated-pages selected="0"
- entry-animation="slide-from-right-animation"
- exit-animation="slide-left-animation">
- <neon-animatable>1</neon-animatable>
- <neon-animatable>2</neon-animatable>
-</neon-animated-pages>
-```
--->
-
-<dom-module id="neon-animatable">
-
- <style>
-
- :host {
- display: block;
- }
-
- </style>
-
- <template>
- <content></content>
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'neon-animatable',
-
- behaviors: [
- Polymer.NeonAnimatableBehavior,
- Polymer.IronResizableBehavior
- ]
-
- });
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animated-pages.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animated-pages.html
deleted file mode 100644
index 4cc94c72b6e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animated-pages.html
+++ /dev/null
@@ -1,224 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
-<link rel="import" href="../iron-selector/iron-selectable.html">
-<link rel="import" href="neon-animation-runner-behavior.html">
-<link rel="import" href="animations/opaque-animation.html">
-
-<!--
-Material design: [Meaningful transitions](https://www.google.com/design/spec/animation/meaningful-transitions.html)
-
-`neon-animated-pages` manages a set of pages and runs an animation when switching between them. Its
-children pages should implement `Polymer.NeonAnimatableBehavior` and define `entry` and `exit`
-animations to be run when switching to or switching out of the page.
-
-@group Neon Elements
-@element neon-animated-pages
-@demo demo/index.html
--->
-
-<dom-module id="neon-animated-pages">
-
- <style>
-
- :host {
- display: block;
- position: relative;
- }
-
- :host > ::content > * {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- }
-
- :host > ::content > :not(.iron-selected):not(.neon-animating) {
- display: none !important;
- }
-
- :host > ::content > .neon-animating {
- pointer-events: none;
- }
-
- </style>
-
- <template>
- <content id="content"></content>
- </template>
-
-</dom-module>
-
-<script>
-(function() {
-
- Polymer({
-
- is: 'neon-animated-pages',
-
- behaviors: [
- Polymer.IronResizableBehavior,
- Polymer.IronSelectableBehavior,
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
-
- activateEvent: {
- type: String,
- value: ''
- },
-
- // if true, the initial page selection will also be animated according to its animation config.
- animateInitialSelection: {
- type: Boolean,
- value: false
- }
-
- },
-
- listeners: {
- 'iron-select': '_onIronSelect',
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
-
- _onIronSelect: function(event) {
- var selectedPage = event.detail.item;
-
- // Only consider child elements.
- if (this.items.indexOf(selectedPage) < 0) {
- return;
- }
-
- var oldPage = this._valueToItem(this._prevSelected) || false;
- this._prevSelected = this.selected;
-
- // on initial load and if animateInitialSelection is negated, simply display selectedPage.
- if (!oldPage && !this.animateInitialSelection) {
- this._completeSelectedChanged();
- return;
- }
-
- this.animationConfig = [];
-
- // configure selectedPage animations.
- if (this.entryAnimation) {
- this.animationConfig.push({
- name: this.entryAnimation,
- node: selectedPage
- });
- } else {
- if (selectedPage.getAnimationConfig) {
- this.animationConfig.push({
- animatable: selectedPage,
- type: 'entry'
- });
- }
- }
-
- // configure oldPage animations iff exists.
- if (oldPage) {
-
- // cancel the currently running animation if one is ongoing.
- if (oldPage.classList.contains('neon-animating')) {
- this._squelchNextFinishEvent = true;
- this.cancelAnimation();
- this._completeSelectedChanged();
- this._squelchNextFinishEvent = false;
- }
-
- // configure the animation.
- if (this.exitAnimation) {
- this.animationConfig.push({
- name: this.exitAnimation,
- node: oldPage
- });
- } else {
- if (oldPage.getAnimationConfig) {
- this.animationConfig.push({
- animatable: oldPage,
- type: 'exit'
- });
- }
- }
-
- // display the oldPage during the transition.
- oldPage.classList.add('neon-animating');
- }
-
- // display the selectedPage during the transition.
- selectedPage.classList.add('neon-animating');
-
- // actually run the animations.
- if (this.animationConfig.length >= 1) {
-
- // on first load, ensure we run animations only after element is attached.
- if (!this.isAttached) {
- this.async(function () {
- this.playAnimation(undefined, {
- fromPage: null,
- toPage: selectedPage
- });
- });
-
- } else {
- this.playAnimation(undefined, {
- fromPage: oldPage,
- toPage: selectedPage
- });
- }
-
- } else {
- this._completeSelectedChanged(oldPage, selectedPage);
- }
- },
-
- /**
- * @param {Object=} oldPage
- * @param {Object=} selectedPage
- */
- _completeSelectedChanged: function(oldPage, selectedPage) {
- if (selectedPage) {
- selectedPage.classList.remove('neon-animating');
- }
- if (oldPage) {
- oldPage.classList.remove('neon-animating');
- }
- if (!selectedPage || !oldPage) {
- var nodes = Polymer.dom(this.$.content).getDistributedNodes();
- for (var node, index = 0; node = nodes[index]; index++) {
- node.classList && node.classList.remove('neon-animating');
- }
- }
- this.async(this._notifyPageResize);
- },
-
- _onNeonAnimationFinish: function(event) {
- if (this._squelchNextFinishEvent) {
- this._squelchNextFinishEvent = false;
- return;
- }
- this._completeSelectedChanged(event.detail.fromPage, event.detail.toPage);
- },
-
- _notifyPageResize: function() {
- var selectedPage = this.selectedItem || this._valueToItem(this.selected);
- this.resizerShouldNotify = function(element) {
- return element == selectedPage;
- }
- this.notifyResize();
- }
-
- })
-
-})();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-behavior.html
deleted file mode 100644
index 6939d3428a0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-behavior.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-meta/iron-meta.html">
-
-<script>
-
- /**
- * Use `Polymer.NeonAnimationBehavior` to implement an animation.
- * @polymerBehavior
- */
- Polymer.NeonAnimationBehavior = {
-
- properties: {
-
- /**
- * Defines the animation timing.
- */
- animationTiming: {
- type: Object,
- value: function() {
- return {
- duration: 500,
- easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
- fill: 'both'
- }
- }
- }
-
- },
-
- /**
- * Can be used to determine that elements implement this behavior.
- */
- isNeonAnimation: true,
-
- /**
- * Do any animation configuration here.
- */
- // configure: function(config) {
- // },
-
- /**
- * Returns the animation timing by mixing in properties from `config` to the defaults defined
- * by the animation.
- */
- timingFromConfig: function(config) {
- if (config.timing) {
- for (var property in config.timing) {
- this.animationTiming[property] = config.timing[property];
- }
- }
- return this.animationTiming;
- },
-
- /**
- * Sets `transform` and `transformOrigin` properties along with the prefixed versions.
- */
- setPrefixedProperty: function(node, property, value) {
- var map = {
- 'transform': ['webkitTransform'],
- 'transformOrigin': ['mozTransformOrigin', 'webkitTransformOrigin']
- };
- var prefixes = map[property];
- for (var prefix, index = 0; prefix = prefixes[index]; index++) {
- node.style[prefix] = value;
- }
- node.style[property] = value;
- },
-
- /**
- * Called when the animation finishes.
- */
- complete: function() {}
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html
deleted file mode 100644
index 2b414e25778..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-meta/iron-meta.html">
-<link rel="import" href="neon-animatable-behavior.html">
-
-<script>
-
- /**
- * `Polymer.NeonAnimationRunnerBehavior` adds a method to run animations.
- *
- * @polymerBehavior Polymer.NeonAnimationRunnerBehavior
- */
- Polymer.NeonAnimationRunnerBehaviorImpl = {
-
- properties: {
-
- /** @type {?Object} */
- _player: {
- type: Object
- }
-
- },
-
- _configureAnimationEffects: function(allConfigs) {
- var allAnimations = [];
- if (allConfigs.length > 0) {
- for (var config, index = 0; config = allConfigs[index]; index++) {
- var animation = document.createElement(config.name);
- // is this element actually a neon animation?
- if (animation.isNeonAnimation) {
- var effect = animation.configure(config);
- if (effect) {
- allAnimations.push({
- animation: animation,
- config: config,
- effect: effect
- });
- }
- } else {
- console.warn(this.is + ':', config.name, 'not found!');
- }
- }
- }
- return allAnimations;
- },
-
- _runAnimationEffects: function(allEffects) {
- return document.timeline.play(new GroupEffect(allEffects));
- },
-
- _completeAnimations: function(allAnimations) {
- for (var animation, index = 0; animation = allAnimations[index]; index++) {
- animation.animation.complete(animation.config);
- }
- },
-
- /**
- * Plays an animation with an optional `type`.
- * @param {string=} type
- * @param {!Object=} cookie
- */
- playAnimation: function(type, cookie) {
- var allConfigs = this.getAnimationConfig(type);
- if (!allConfigs) {
- return;
- }
- try {
- var allAnimations = this._configureAnimationEffects(allConfigs);
- var allEffects = allAnimations.map(function(animation) {
- return animation.effect;
- });
-
- if (allEffects.length > 0) {
- this._player = this._runAnimationEffects(allEffects);
- this._player.onfinish = function() {
- this._completeAnimations(allAnimations);
-
- if (this._player) {
- this._player.cancel();
- this._player = null;
- }
-
- this.fire('neon-animation-finish', cookie, {bubbles: false});
- }.bind(this);
- return;
- }
- } catch (e) {
- console.warn('Couldnt play', '(', type, allConfigs, ').', e);
- }
- this.fire('neon-animation-finish', cookie, {bubbles: false});
- },
-
- /**
- * Cancels the currently running animation.
- */
- cancelAnimation: function() {
- if (this._player) {
- this._player.cancel();
- }
- }
- };
-
- /** @polymerBehavior Polymer.NeonAnimationRunnerBehavior */
- Polymer.NeonAnimationRunnerBehavior = [
- Polymer.NeonAnimatableBehavior,
- Polymer.NeonAnimationRunnerBehaviorImpl
- ];
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation.html
deleted file mode 100644
index da645048597..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animation.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="neon-animatable-behavior.html">
-<link rel="import" href="neon-animated-pages.html">
-<link rel="import" href="neon-animatable.html">
-<link rel="import" href="neon-animation-behavior.html">
-<link rel="import" href="neon-animation-runner-behavior.html">
-<link rel="import" href="neon-animations.html">
-<link rel="import" href="neon-shared-element-animatable-behavior.html">
-<link rel="import" href="neon-shared-element-animation-behavior.html">
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animations.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animations.html
deleted file mode 100644
index 67c4df4c76a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-animations.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="animations/cascaded-animation.html">
-<link rel="import" href="animations/fade-in-animation.html">
-<link rel="import" href="animations/fade-out-animation.html">
-<link rel="import" href="animations/hero-animation.html">
-<link rel="import" href="animations/opaque-animation.html">
-<link rel="import" href="animations/ripple-animation.html">
-<link rel="import" href="animations/reverse-ripple-animation.html">
-<link rel="import" href="animations/scale-down-animation.html">
-<link rel="import" href="animations/scale-up-animation.html">
-<link rel="import" href="animations/slide-from-left-animation.html">
-<link rel="import" href="animations/slide-from-right-animation.html">
-<link rel="import" href="animations/slide-from-top-animation.html">
-<link rel="import" href="animations/slide-from-bottom-animation.html">
-<link rel="import" href="animations/slide-left-animation.html">
-<link rel="import" href="animations/slide-right-animation.html">
-<link rel="import" href="animations/slide-up-animation.html">
-<link rel="import" href="animations/slide-down-animation.html">
-<link rel="import" href="animations/transform-animation.html">
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animatable-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animatable-behavior.html
deleted file mode 100644
index e63173d368d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animatable-behavior.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="neon-animatable-behavior.html">
-
-<script>
-
- /**
- * Use `Polymer.NeonSharedElementAnimatableBehavior` to implement elements containing shared element
- * animations.
- * @polymerBehavior Polymer.NeonSharedElementAnimatableBehavior
- */
- Polymer.NeonSharedElementAnimatableBehaviorImpl = {
-
- properties: {
-
- /**
- * A map of shared element id to node.
- */
- sharedElements: {
- type: Object,
- value: {}
- }
-
- }
-
- };
-
- /** @polymerBehavior Polymer.NeonSharedElementAnimatableBehavior */
- Polymer.NeonSharedElementAnimatableBehavior = [
- Polymer.NeonAnimatableBehavior,
- Polymer.NeonSharedElementAnimatableBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animation-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animation-behavior.html
deleted file mode 100644
index 7787615b039..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/neon-shared-element-animation-behavior.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="neon-animation-behavior.html">
-
-<script>
-
- /**
- * Use `Polymer.NeonSharedElementAnimationBehavior` to implement shared element animations.
- * @polymerBehavior Polymer.NeonSharedElementAnimationBehavior
- */
- Polymer.NeonSharedElementAnimationBehaviorImpl = {
-
- properties: {
-
- /**
- * Cached copy of shared elements.
- */
- sharedElements: {
- type: Object
- }
-
- },
-
- /**
- * Finds shared elements based on `config`.
- */
- findSharedElements: function(config) {
- var fromPage = config.fromPage;
- var toPage = config.toPage;
- if (!fromPage || !toPage) {
- console.warn(this.is + ':', !fromPage ? 'fromPage' : 'toPage', 'is undefined!');
- return null;
- };
-
- if (!fromPage.sharedElements || !toPage.sharedElements) {
- console.warn(this.is + ':', 'sharedElements are undefined for', !fromPage.sharedElements ? fromPage : toPage);
- return null;
- };
-
- var from = fromPage.sharedElements[config.id]
- var to = toPage.sharedElements[config.id];
-
- if (!from || !to) {
- console.warn(this.is + ':', 'sharedElement with id', config.id, 'not found in', !from ? fromPage : toPage);
- return null;
- }
-
- this.sharedElements = {
- from: from,
- to: to
- };
- return this.sharedElements;
- }
-
- };
-
- /** @polymerBehavior Polymer.NeonSharedElementAnimationBehavior */
- Polymer.NeonSharedElementAnimationBehavior = [
- Polymer.NeonAnimationBehavior,
- Polymer.NeonSharedElementAnimationBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/web-animations.html b/chromium/third_party/catapult/third_party/polymer/components/neon-animation/web-animations.html
deleted file mode 100644
index c871854017a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/neon-animation/web-animations.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<script src="../web-animations-js/web-animations-next-lite.min.js"></script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.bower.json
deleted file mode 100644
index 2b04bf9f8a9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.bower.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "paper-behaviors",
- "version": "1.0.11",
- "description": "Common behaviors across the paper elements",
- "authors": [
- "The Polymer Authors"
- ],
- "main": [
- "paper-button-behavior.html",
- "paper-checked-element-behavior.html",
- "paper-inky-focus-behavior.html"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "paper",
- "behavior"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-behaviors"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-behaviors",
- "dependencies": {
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
- "paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
- "polymer": "Polymer/polymer#^1.2.1"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-material": "PolymerElements/paper-material#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "_release": "1.0.11",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.11",
- "commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
- },
- "_source": "git://github.com/PolymerElements/paper-behaviors.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-behaviors"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.travis.yml
deleted file mode 100644
index f44cf504cff..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: Mni8srJPpo7GAk5wCLTiqqVqAJxxKMpGuxYxooqIAuc050n26KkHfDWLPY69taFY9WYjU3pzVEwrYX3HqSbib1CTlcfeATGs1+q2rXKZKmBAnKKPi12CEEXOcbMoVgzVQs7rzr8MQF9LR2TLtBuMQEoAimebA7uQcYGXcSWKJR4=
- - secure: LYF3qBtJ6zZcf9dsSJ9t/My4Cne5ieI6RkHFj/0MBcy0vMbUazTH38vuy+FILYlrzbaxkVs36lPQFBXH83Ue3TxjdfjeNvK8YiuEcFjE5lQi2u7+x54eSV3myp2SIdtBLGE7rqmY0zj/Oeg91fV22OdfSHhJxuV/RxFFZIuZtHY=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/README.md
deleted file mode 100644
index 969e7967c01..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-button-behavior.html paper-checked-element-behavior.html paper-inky-focus-behavior.html paper-ripple-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/paper-behaviors.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-behaviors)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/paper-behaviors)_
-
-
-<!-- No docs for Polymer.PaperButtonBehavior found. -->
-
-##Polymer.PaperCheckedElementBehavior
-
-Use `Polymer.PaperCheckedElementBehavior` to implement a custom element
-that has a `checked` property similar to `Polymer.IronCheckedElementBehavior`
-and is compatible with having a ripple effect.
-
-
-
-##Polymer.PaperInkyFocusBehavior
-
-`Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus.
-
-
-
-##Polymer.PaperRippleBehavior
-
-`Polymer.PaperRippleBehavior` dynamically implements a ripple
-when the element has focus via pointer or keyboard.
-
-NOTE: This behavior is intended to be used in conjunction with and after
-`Polymer.IronButtonState` and `Polymer.IronControlState`.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/bower.json
deleted file mode 100644
index 5933ab1de9b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/bower.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "paper-behaviors",
- "version": "1.0.11",
- "description": "Common behaviors across the paper elements",
- "authors": [
- "The Polymer Authors"
- ],
- "main": [
- "paper-button-behavior.html",
- "paper-checked-element-behavior.html",
- "paper-inky-focus-behavior.html"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "paper",
- "behavior"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-behaviors"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-behaviors",
- "dependencies": {
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
- "paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
- "polymer": "Polymer/polymer#^1.2.1"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
- "paper-material": "PolymerElements/paper-material#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/index.html
deleted file mode 100644
index cc3b3fd3348..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/index.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-behaviors demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link href="paper-button.html" rel="import">
- <link href="paper-radio-button.html" rel="import">
-
- <style>
-
- body {
- font-family: sans-serif;
- padding: 24px;
- margin: 0;
- }
-
- </style>
-
-</head>
-<body unresolved>
-
- <h3>Normal</h3>
-
- <paper-button tabindex="0">Hello World</paper-button>
-
- <h3>Toggles</h3>
-
- <paper-button toggles tabindex="0">Hello World</paper-button>
-
- <h3>Disabled</h3>
-
- <paper-button disabled tabindex="0">Hello World</paper-button>
-
- <h3>Radio button with focus state</h3>
-
- <paper-radio-button tabindex="0" title="Radio button with focus state"></paper-radio-button>
-
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-button.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-button.html
deleted file mode 100644
index a520a0f9ec2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-button.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../paper-material/paper-material.html">
-<link rel="import" href="../paper-button-behavior.html">
-
-<dom-module id="paper-button">
-
- <style>
-
- :host {
- display: inline-block;
- position: relative;
- background-color: #4285F4;
- color: #fff;
- border-radius: 3px;
- text-transform: uppercase;
- outline: none;
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- cursor: pointer;
- }
-
- paper-material {
- border-radius: inherit;
- padding: 16px;
- }
-
- :host([disabled]) {
- background-color: #888;
- pointer-events: none;
- }
-
- :host([active]),
- :host([pressed]) {
- background-color: #3367D6;
- box-shadow: inset 0 3px 5px rgba(0,0,0,.2);
- }
-
- </style>
-
- <template>
-
- <paper-material class="content" elevation="[[_elevation]]" animated>
- <content></content>
- </paper-material>
-
- </template>
-
- <script>
-
- Polymer({
- is: 'paper-button',
-
- behaviors: [
- Polymer.PaperButtonBehavior
- ]
- });
-
- </script>
-
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-radio-button.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-radio-button.html
deleted file mode 100644
index b6644942846..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/demo/paper-radio-button.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../paper-checked-element-behavior.html">
-
-<dom-module id="paper-radio-button">
-
- <style>
- :host {
- display: inline-block;
- white-space: nowrap;
- }
-
- :host(:focus) {
- outline: none
- }
-
- #radioContainer {
- display: inline-block;
- position: relative;
- width: 16px;
- height: 16px;
- cursor: pointer;
- vertical-align: middle;
- }
-
- #offRadio {
- position: absolute;
- top: 0px;
- left: 0px;
- width: 12px;
- height: 12px;
- border-radius: 50%;
- border: solid 2px;
- border-color: black;
- transition: border-color 0.28s;
- }
-
- #onRadio {
- position: absolute;
- top: 4px;
- left: 4px;
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background-color: red;
- -webkit-transform: scale(0);
- transform: scale(0);
- transition: -webkit-transform ease 0.28s;
- transition: transform ease 0.28s;
- }
-
- :host([disabled]) {
- opacity: 0.3;
- pointer-events: none;
- }
-
- :host([pressed]) #offRadio,
- :host([active]) #offRadio {
- border-color: red;
- }
-
- :host([pressed]) #onRadio,
- :host([active]) #onRadio {
- -webkit-transform: scale(1);
- transform: scale(1);
- }
-
- #ink {
- position: absolute;
- top: -16px;
- left: -16px;
- width: 48px;
- height: 48px;
- }
-
- </style>
-
- <template>
- <div id="radioContainer">
- <div id="offRadio"></div>
- <div id="onRadio"></div>
- </div>
- </template>
-
- <script>
-
- Polymer({
-
- behaviors: [
- Polymer.PaperCheckedElementBehavior
- ],
-
- hostAttributes: {
- role: 'radio'
- },
-
- ready: function() {
- this.toggles = true;
- },
-
- _createRipple: function() {
- this._rippleContainer = this.$.radioContainer;
- return Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this);
- }
-
- });
-
- </script>
-
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/index.html
deleted file mode 100644
index 37184eaa0db..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page src="paper-button-behavior.html"></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-button-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-button-behavior.html
deleted file mode 100644
index 21b999f5b4f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-button-behavior.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-behaviors/iron-button-state.html">
-<link rel="import" href="paper-ripple-behavior.html">
-
-<script>
-
- /** @polymerBehavior Polymer.PaperButtonBehavior */
- Polymer.PaperButtonBehaviorImpl = {
-
- properties: {
-
- /**
- * The z-depth of this element, from 0-5. Setting to 0 will remove the
- * shadow, and each increasing number greater than 0 will be "deeper"
- * than the last.
- *
- * @attribute elevation
- * @type number
- * @default 1
- */
- elevation: {
- type: Number,
- reflectToAttribute: true,
- readOnly: true
- }
-
- },
-
- observers: [
- '_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)',
- '_computeKeyboardClass(receivedFocusFromKeyboard)'
- ],
-
- hostAttributes: {
- role: 'button',
- tabindex: '0',
- animated: true
- },
-
- _calculateElevation: function() {
- var e = 1;
- if (this.disabled) {
- e = 0;
- } else if (this.active || this.pressed) {
- e = 4;
- } else if (this.receivedFocusFromKeyboard) {
- e = 3;
- }
- this._setElevation(e);
- },
-
- _computeKeyboardClass: function(receivedFocusFromKeyboard) {
- this.toggleClass('keyboard-focus', receivedFocusFromKeyboard);
- },
-
- /**
- * In addition to `IronButtonState` behavior, when space key goes down,
- * create a ripple down effect.
- *
- * @param {!KeyboardEvent} event .
- */
- _spaceKeyDownHandler: function(event) {
- Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this, event);
- // Ensure that there is at most one ripple when the space key is held down.
- if (this.hasRipple() && this.getRipple().ripples.length < 1) {
- this._ripple.uiDownAction();
- }
- },
-
- /**
- * In addition to `IronButtonState` behavior, when space key goes up,
- * create a ripple up effect.
- *
- * @param {!KeyboardEvent} event .
- */
- _spaceKeyUpHandler: function(event) {
- Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this, event);
- if (this.hasRipple()) {
- this._ripple.uiUpAction();
- }
- }
-
- };
-
- /** @polymerBehavior */
- Polymer.PaperButtonBehavior = [
- Polymer.IronButtonState,
- Polymer.IronControlState,
- Polymer.PaperRippleBehavior,
- Polymer.PaperButtonBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-checked-element-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-checked-element-behavior.html
deleted file mode 100644
index 806392aa2cf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-checked-element-behavior.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
-<link rel="import" href="paper-inky-focus-behavior.html">
-
-<script>
-
- /**
- * Use `Polymer.PaperCheckedElementBehavior` to implement a custom element
- * that has a `checked` property similar to `Polymer.IronCheckedElementBehavior`
- * and is compatible with having a ripple effect.
- * @polymerBehavior Polymer.PaperCheckedElementBehavior
- */
- Polymer.PaperCheckedElementBehaviorImpl = {
-
- /**
- * Synchronizes the element's checked state with its ripple effect.
- */
- _checkedChanged: function() {
- Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this);
- if (this.hasRipple()) {
- if (this.checked) {
- this._ripple.setAttribute('checked', '');
- } else {
- this._ripple.removeAttribute('checked');
- }
- }
- },
-
- /**
- * Synchronizes the element's `active` and `checked` state.
- */
- _buttonStateChanged: function() {
- Polymer.PaperRippleBehavior._buttonStateChanged.call(this);
- if (this.disabled) {
- return;
- }
- if (this.isAttached) {
- this.checked = this.active;
- }
- }
-
- };
-
- /** @polymerBehavior Polymer.PaperCheckedElementBehavior */
- Polymer.PaperCheckedElementBehavior = [
- Polymer.PaperInkyFocusBehavior,
- Polymer.IronCheckedElementBehavior,
- Polymer.PaperCheckedElementBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-inky-focus-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-inky-focus-behavior.html
deleted file mode 100644
index 76fffc116ba..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-inky-focus-behavior.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-behaviors/iron-button-state.html">
-<link rel="import" href="paper-ripple-behavior.html">
-
-<script>
-
- /**
- * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus.
- *
- * @polymerBehavior Polymer.PaperInkyFocusBehavior
- */
- Polymer.PaperInkyFocusBehaviorImpl = {
-
- observers: [
- '_focusedChanged(receivedFocusFromKeyboard)'
- ],
-
- _focusedChanged: function(receivedFocusFromKeyboard) {
- if (receivedFocusFromKeyboard) {
- this.ensureRipple();
- }
- if (this.hasRipple()) {
- this._ripple.holdDown = receivedFocusFromKeyboard;
- }
- },
-
- _createRipple: function() {
- var ripple = Polymer.PaperRippleBehavior._createRipple();
- ripple.id = 'ink';
- ripple.setAttribute('center', '');
- ripple.classList.add('circle');
- return ripple;
- }
-
- };
-
- /** @polymerBehavior Polymer.PaperInkyFocusBehavior */
- Polymer.PaperInkyFocusBehavior = [
- Polymer.IronButtonState,
- Polymer.IronControlState,
- Polymer.PaperRippleBehavior,
- Polymer.PaperInkyFocusBehaviorImpl
- ];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-ripple-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-ripple-behavior.html
deleted file mode 100644
index 1d63b75e89f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-behaviors/paper-ripple-behavior.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../paper-ripple/paper-ripple.html">
-
-<script>
-
- /**
- * `Polymer.PaperRippleBehavior` dynamically implements a ripple
- * when the element has focus via pointer or keyboard.
- *
- * NOTE: This behavior is intended to be used in conjunction with and after
- * `Polymer.IronButtonState` and `Polymer.IronControlState`.
- *
- * @polymerBehavior Polymer.PaperRippleBehavior
- */
- Polymer.PaperRippleBehavior = {
-
- properties: {
- /**
- * If true, the element will not produce a ripple effect when interacted
- * with via the pointer.
- */
- noink: {
- type: Boolean,
- observer: '_noinkChanged'
- },
-
- /**
- * @type {Element|undefined}
- */
- _rippleContainer: {
- type: Object,
- }
- },
-
- /**
- * Ensures a `<paper-ripple>` element is available when the element is
- * focused.
- */
- _buttonStateChanged: function() {
- if (this.focused) {
- this.ensureRipple();
- }
- },
-
- /**
- * In addition to the functionality provided in `IronButtonState`, ensures
- * a ripple effect is created when the element is in a `pressed` state.
- */
- _downHandler: function(event) {
- Polymer.IronButtonStateImpl._downHandler.call(this, event);
- if (this.pressed) {
- this.ensureRipple(event);
- }
- },
-
- /**
- * Ensures this element contains a ripple effect. For startup efficiency
- * the ripple effect is dynamically on demand when needed.
- * @param {!Event=} optTriggeringEvent (optional) event that triggered the
- * ripple.
- */
- ensureRipple: function(optTriggeringEvent) {
- if (!this.hasRipple()) {
- this._ripple = this._createRipple();
- this._ripple.noink = this.noink;
- var rippleContainer = this._rippleContainer || this.root;
- if (rippleContainer) {
- Polymer.dom(rippleContainer).appendChild(this._ripple);
- }
- if (optTriggeringEvent) {
- // Check if the event happened inside of the ripple container
- // Fall back to host instead of the root because distributed text
- // nodes are not valid event targets
- var domContainer = Polymer.dom(this._rippleContainer || this);
- var target = Polymer.dom(optTriggeringEvent).rootTarget;
- if (domContainer.deepContains( /** @type {Node} */(target))) {
- this._ripple.uiDownAction(optTriggeringEvent);
- }
- }
- }
- },
-
- /**
- * Returns the `<paper-ripple>` element used by this element to create
- * ripple effects. The element's ripple is created on demand, when
- * necessary, and calling this method will force the
- * ripple to be created.
- */
- getRipple: function() {
- this.ensureRipple();
- return this._ripple;
- },
-
- /**
- * Returns true if this element currently contains a ripple effect.
- * @return {boolean}
- */
- hasRipple: function() {
- return Boolean(this._ripple);
- },
-
- /**
- * Create the element's ripple effect via creating a `<paper-ripple>`.
- * Override this method to customize the ripple element.
- * @return {!PaperRippleElement} Returns a `<paper-ripple>` element.
- */
- _createRipple: function() {
- return /** @type {!PaperRippleElement} */ (
- document.createElement('paper-ripple'));
- },
-
- _noinkChanged: function(noink) {
- if (this.hasRipple()) {
- this._ripple.noink = noink;
- }
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-button/.bower.json
deleted file mode 100644
index fae79a51e8b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/.bower.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "paper-button",
- "version": "1.0.12",
- "description": "Material design button",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "paper",
- "button"
- ],
- "main": "paper-button.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-button.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-button",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
- "paper-material": "PolymerElements/paper-material#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "_release": "1.0.12",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.12",
- "commit": "96c3a2661c355223d0b41e1d34126f9c62d544dc"
- },
- "_source": "git://github.com/PolymerElements/paper-button.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-button"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-button/.travis.yml
deleted file mode 100644
index 070e3e5403b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: geFs7Ipj7/9knSKT2FEYAB7b/zbmgWFXCgZm7cEcrG71EX/HB1do3spANGOlRly77xaZtNNF1OGYBHIP36DSyMEHRYj6TYtTrPIr2ySeHvoOv0nzYakXdscxBvfI5HJrNiFpld80KoGl8vKfroLNpVLallgumX3diydypolvW1I=
- - secure: IILEhg3m49exN5hpxbPP1JA/q+s4v/QpOMbDiXVRV4Uz1XwOPGLCyrAB0ENjwzMCyeOah1Z2MyQSUiPisLheHKvZifhviNqizWN//8EDkg1gkU0R6egGdotD5mBb3UpCD0CNZ8+D0FYwOpdCWCruwr7N+zDUN+6r5H07KP/VeUU=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-button/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-button/README.md
deleted file mode 100644
index 3bf90b5eaec..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-button.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-button.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-button)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-button)_
-
-
-##&lt;paper-button&gt;
-
-Material design: [Buttons](https://www.google.com/design/spec/components/buttons.html)
-
-`paper-button` is a button. When the user touches the button, a ripple effect emanates
-from the point of contact. It may be flat or raised. A raised button is styled with a
-shadow.
-
-Example:
-
-```html
-<paper-button>Flat button</paper-button>
-<paper-button raised>Raised button</paper-button>
-<paper-button noink>No ripple effect</paper-button>
-<paper-button toggles>Toggle-able button</paper-button>
-```
-
-A button that has `toggles` true will remain `active` after being clicked (and
-will have an `active` attribute set). For more information, see the `Polymer.IronButtonState`
-behavior.
-
-You may use custom DOM in the button body to create a variety of buttons. For example, to
-create a button with an icon and some text:
-
-```html
-<paper-button>
- <iron-icon icon="favorite"></iron-icon>
- custom button content
-</paper-button>
-```
-
-To use `paper-button` as a link, wrap it in an anchor tag. Since `paper-button` will already
-receive focus, you may want to prevent the anchor tag from receiving focus as well by setting
-its tabindex to -1.
-
-```html
-<a href="https://www.polymer-project.org/" tabindex="-1">
- <paper-button raised>Polymer Project</paper-button>
-</a>
-```
-
-### Styling
-
-Style the button with CSS as you would a normal DOM element.
-
-```css
-paper-button.fancy {
- background: green;
- color: yellow;
-}
-
-paper-button.fancy:hover {
- background: lime;
-}
-
-paper-button[disabled],
-paper-button[toggles][active] {
- background: red;
-}
-```
-
-By default, the ripple is the same color as the foreground at 25% opacity. You may
-customize the color using the `--paper-button-ink-color` custom property.
-
-The following custom properties and mixins are also available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-button-ink-color` | Background color of the ripple | `Based on the button's color` |
-| `--paper-button` | Mixin applied to the button | `{}` |
-| `--paper-button-disabled` | Mixin applied to the disabled button. Note that you can also use the `paper-button[disabled]` selector | `{}` |
-| `--paper-button-flat-keyboard-focus` | Mixin applied to a flat button after it's been focused using the keyboard | `{}` |
-| `--paper-button-raised-keyboard-focus` | Mixin applied to a raised button after it's been focused using the keyboard | `{}` |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-button/bower.json
deleted file mode 100644
index 71a919d013c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "paper-button",
- "version": "1.0.12",
- "description": "Material design button",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "paper",
- "button"
- ],
- "main": "paper-button.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-button.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-button",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
- "paper-material": "PolymerElements/paper-material#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-button/demo/index.html
deleted file mode 100644
index c2130909f33..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/demo/index.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-button demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../paper-button.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- .vertical-section-container {
- max-width: 500px;
- }
- paper-button {
- margin-left: 10px;
- margin-right: 10px;
- }
- </style>
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h3>Buttons can be flat, raised, toggleable, or disabled</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button>link</paper-button>
- <paper-button raised>raised</paper-button>
- <paper-button toggles raised>toggles</paper-button>
- <paper-button disabled>disabled</paper-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can have icons</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button><iron-icon icon="check"></iron-icon>link</paper-button>
- <paper-button raised><iron-icon icon="file-download"></iron-icon>raised</paper-button>
- <paper-button toggles raised><iron-icon icon="favorite"></iron-icon>toggles</paper-button>
- <paper-button disabled><iron-icon icon="block"></iron-icon>disabled</paper-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button noink>link</paper-button>
- <paper-button raised noink>raised</paper-button>
- <paper-button toggles raised noink>toggles</paper-button>
- <paper-button disabled noink>disabled</paper-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can be styled using custom properties</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button class="custom pink">link</paper-button>
- <paper-button raised class="custom indigo">raised</paper-button>
- <paper-button toggles raised class="custom green">toggles</paper-button>
- <paper-button disabled class="custom disabled">disabled</paper-button>
-
- <style is="custom-style">
- paper-button.custom {
- --paper-button-ink-color: var(--paper-pink-a200);
- /* These could also be individually defined for each of the
- specific css classes, but we'll just do it once as an example */
- --paper-button-flat-keyboard-focus: {
- background-color: var(--paper-pink-a200);
- color: white !important;
- };
- --paper-button-raised-keyboard-focus: {
- background-color: var(--paper-pink-a200) !important;
- color: white !important;
- };
- }
- paper-button.custom:hover {
- background-color: var(--paper-indigo-100);
- }
- paper-button.pink {
- color: var(--paper-pink-a200);
-
- }
- paper-button.indigo {
- background-color: var(--paper-indigo-500);
- color: white;
- --paper-button-raised-keyboard-focus: {
- background-color: var(--paper-pink-a200) !important;
- color: white !important;
- };
- }
- paper-button.green {
- background-color: var(--paper-green-500);
- color: white;
- }
- paper-button.green[active] {
- background-color: var(--paper-red-500);
- }
- paper-button.disabled {
- color: white;
- }
- </style>
- </template>
- </demo-snippet>
-
- <h3>Buttons can be used as a link</h3>
- <demo-snippet class="centered-demo">
- <template>
- <a href="https://www.polymer-project.org/" tabindex="-1">
- <paper-button raised>Polymer Project</paper-button>
- </a>
- <style>
- a paper-button,
- a:active paper-button,
- a:visited paper-button {
- color: #000;
- }
- </style>
- </template>
- </demo-snippet>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-button/index.html
deleted file mode 100644
index 487bb5c38a5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-button/paper-button.html b/chromium/third_party/catapult/third_party/polymer/components/paper-button/paper-button.html
deleted file mode 100644
index bf3b083b740..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-button/paper-button.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-behaviors/paper-button-behavior.html">
-<link rel="import" href="../paper-material/paper-material.html">
-
-<!--
-Material design: [Buttons](https://www.google.com/design/spec/components/buttons.html)
-
-`paper-button` is a button. When the user touches the button, a ripple effect emanates
-from the point of contact. It may be flat or raised. A raised button is styled with a
-shadow.
-
-Example:
-
- <paper-button>Flat button</paper-button>
- <paper-button raised>Raised button</paper-button>
- <paper-button noink>No ripple effect</paper-button>
- <paper-button toggles>Toggle-able button</paper-button>
-
-A button that has `toggles` true will remain `active` after being clicked (and
-will have an `active` attribute set). For more information, see the `Polymer.IronButtonState`
-behavior.
-
-You may use custom DOM in the button body to create a variety of buttons. For example, to
-create a button with an icon and some text:
-
- <paper-button>
- <iron-icon icon="favorite"></iron-icon>
- custom button content
- </paper-button>
-
-To use `paper-button` as a link, wrap it in an anchor tag. Since `paper-button` will already
-receive focus, you may want to prevent the anchor tag from receiving focus as well by setting
-its tabindex to -1.
-
- <a href="https://www.polymer-project.org/" tabindex="-1">
- <paper-button raised>Polymer Project</paper-button>
- </a>
-
-### Styling
-
-Style the button with CSS as you would a normal DOM element.
-
- paper-button.fancy {
- background: green;
- color: yellow;
- }
-
- paper-button.fancy:hover {
- background: lime;
- }
-
- paper-button[disabled],
- paper-button[toggles][active] {
- background: red;
- }
-
-By default, the ripple is the same color as the foreground at 25% opacity. You may
-customize the color using the `--paper-button-ink-color` custom property.
-
-The following custom properties and mixins are also available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-button-ink-color` | Background color of the ripple | `Based on the button's color`
-`--paper-button` | Mixin applied to the button | `{}`
-`--paper-button-disabled` | Mixin applied to the disabled button. Note that you can also use the `paper-button[disabled]` selector | `{}`
-`--paper-button-flat-keyboard-focus` | Mixin applied to a flat button after it's been focused using the keyboard | `{}`
-`--paper-button-raised-keyboard-focus` | Mixin applied to a raised button after it's been focused using the keyboard | `{}`
-
-@demo demo/index.html
--->
-
-<dom-module id="paper-button">
- <template strip-whitespace>
- <style include="paper-material">
- :host {
- @apply(--layout-inline);
- @apply(--layout-center-center);
- position: relative;
- box-sizing: border-box;
- min-width: 5.14em;
- margin: 0 0.29em;
- background: transparent;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- -webkit-tap-highlight-color: transparent;
- font: inherit;
- text-transform: uppercase;
- outline-width: 0;
- border-radius: 3px;
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- cursor: pointer;
- z-index: 0;
- padding: 0.7em 0.57em;
-
- @apply(--paper-font-common-base);
- @apply(--paper-button);
- }
-
- :host([raised].keyboard-focus) {
- font-weight: bold;
- @apply(--paper-button-raised-keyboard-focus);
- }
-
- :host(:not([raised]).keyboard-focus) {
- font-weight: bold;
- @apply(--paper-button-flat-keyboard-focus);
- }
-
- :host([disabled]) {
- background: #eaeaea;
- color: #a8a8a8;
- cursor: auto;
- pointer-events: none;
-
- @apply(--paper-button-disabled);
- }
-
- paper-ripple {
- color: var(--paper-button-ink-color);
- }
- </style>
-
- <content></content>
- </template>
-
- <script>
- Polymer({
- is: 'paper-button',
-
- behaviors: [
- Polymer.PaperButtonBehavior
- ],
-
- properties: {
- /**
- * If true, the button should be styled with a shadow.
- */
- raised: {
- type: Boolean,
- reflectToAttribute: true,
- value: false,
- observer: '_calculateElevation'
- }
- },
-
- _calculateElevation: function() {
- if (!this.raised) {
- this._setElevation(0);
- } else {
- Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this);
- }
- }
-
- /**
- Fired when the animation finishes.
- This is useful if you want to wait until
- the ripple animation finishes to perform some action.
-
- @event transitionend
- Event param: {{node: Object}} detail Contains the animated node.
- */
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-card/.travis.yml
deleted file mode 100755
index dd8f99e33b9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: KuASkT/4CBzdndyZ91e/plGIXpvostP2XOjiVc+Uwpfgu4ktzPdGxZS18NowS5sp0eXhQQRxtON28P4+xNcCULQ6gUe6HYErZUY9ijWEvYRdnt8HZyywZZpI4H1ZlXGFnCmsTvOI9azSaw56AwWnN7buVnEK0k7BHvnuofTs8qpcgZR3P7cMjoT/jcxu+S+nfO/hrsFBRwjw8vT1AitHp/tVTzLoiv26noLcPm3k8fQaAAVKWtioFlUV50fBCbCfDkbPwUMTlZiQxhVHbYxwNfPzgoJp+ETtJpS3VApXAClKWg4CvAinf3kVQI8cw6AG4hnaz9IRNnkwPUviQXrojb3QjZI14MRdTS+hjwGM7FypX3ZzKw2ttAGHLquJZKTX4G7Yh2LsWRvzzKPv4J/DIBKsGbxwgcHf71KSoPKY6pLqlAF74rcAb3MeahmeYT98gxmr1Bs9tKjR5/iw8knEqPa2K4KUTr2iv+qqkpoiQZOx5IM6niLv4IcAIlaYzJQTL/IuFSJ5/vAYk7B3GiBxtGfmh2C7Kc0xlNIwbYMqtI4vwOSGCUXPhnrxqvuD2ffGLgO+8jbGK37k3T4egbCc5ekA01I7faMK+hOrTyrIx6rwwvCuuoTPrqwCGE3en7oovzRBw3TzuD+HyixTYA6Q1AOTKH57qXPTInRh9YO220w=
- - secure: xPkO7EnyvasJh1KedwftJzAx9kcxV0f+lmIvUIJyGCAvBhrdGrIuWDzTzYu9iZnTcRJKIN6FBd8pimUxs3LEY8QNl/eZ+iLqNstKCdzHKvkHhn9M4cBOyKo4+iI7z7mBmw1+qDBEC6hJ6Wr097ojF9IonAQqvXYXbbm5QLujThuY3tPviRUQuBWOSG8PVIcOtt+ExvjsRhqo7hS2hlxeSHcGiBNtWsCXdI+wFBPBCu0mXwZnOvpIrTapPyhm97NzDJmgb5/SPuZmiXAACjRPWQKAemHLyhBBvq4RFpDZQvQaNEiGeurF2pCwtQ1G3XfuWhlAE+hp0dSluOrRFPrqiLjtuk7sXrDTt8MzfA1lwksWr7o/05H37sk5Ay3Un25jmWz1ZYjn0Fzpgm73ycgljQqaeizl05Q0YVtNbv8asKFbZ4qAs/MXFcubw6z7LxjS7bEiSAT5P2SLQbKUI3hYsT1LbqZNAKTZw4zgPyS/kOq1MSTgILy3c5R4vSi3P8/dn72lqvmXveRH2EchQPwO+kwvPcQ1NWqwAUj1FNtvsc6ahBsJ9JQLl3Yo8/nIp/ssg0OtgqTOmm0f3RQ5Jzbg65iRguKqCpq1CKaXmIH2zlVUBW2NQpqc/bwulbYHMjR1dV+T3WbpRJ1X6g7WazsS1NZVzNB/qw+kTZ6SFA+8VHM=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-card/CONTRIBUTING.md
deleted file mode 100755
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-card/README.md
deleted file mode 100755
index 94466db7745..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-card.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-card.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-card)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-card)_
-
-
-##&lt;paper-card&gt;
-
-Material design: [Cards](https://www.google.com/design/spec/components/cards.html)
-
-`paper-card` is a container with a drop shadow.
-
-Example:
-
-```html
-<paper-card heading="Card Title">
- <div class="card-content">Some content</div>
- <div class="card-actions">
- <paper-button>Some action</paper-button>
- </div>
-</paper-card>
-```
-
-Example - top card image:
-
-```html
-<paper-card heading="Card Title" image="/path/to/image.png">
- ...
-</paper-card>
-```
-
-### Accessibility
-
-By default, the `aria-label` will be set to the value of the `heading` attribute.
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-card-background-color` | The background color of the card | `--primary-background-color` |
-| `--paper-card-header-color` | The color of the header text | `#000` |
-| `--paper-card-header` | Mixin applied to the card header section | `{}` |
-| `--paper-card-header-text` | Mixin applied to the title in the card header section | `{}` |
-| `--paper-card-header-image` | Mixin applied to the image in the card header section | `{}` |
-| `--paper-card-header-image-text` | Mixin applied to the text overlapping the image in the card header section | `{}` |
-| `--paper-card-content` | Mixin applied to the card content section | `{}` |
-| `--paper-card-actions` | Mixin applied to the card action section | `{}` |
-| `--paper-card` | Mixin applied to the card | `{}` |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-card/bower.json
deleted file mode 100755
index b17e3fa85c4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "paper-card",
- "version": "1.1.1",
- "description": "Material design piece of paper with unique related data",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "card"
- ],
- "main": "paper-card.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-card.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-card",
- "ignore": [],
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-image": "PolymerElements/iron-image#^1.2.0",
- "paper-material": "PolymerElements/paper-material#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.1.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/cafe.png b/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/cafe.png
deleted file mode 100644
index a3dc6a8a8ae..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/cafe.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/donuts.png b/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/donuts.png
deleted file mode 100644
index 5f668800d41..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/donuts.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/house.png b/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/house.png
deleted file mode 100644
index a7f1c24e82b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/house.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/index.html
deleted file mode 100755
index c4dfbe99e4b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/index.html
+++ /dev/null
@@ -1,323 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html lang="en">
-<head>
- <title>paper-card demo</title>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
-
- <link rel="import" href="../../iron-collapse/iron-collapse.html">
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../iron-icons/communication-icons.html">
- <link rel="import" href="../../iron-icons/hardware-icons.html">
- <link rel="import" href="../../iron-icons/social-icons.html">
- <link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
- <link rel="import" href="../../paper-button/paper-button.html">
- <link rel="import" href="../../paper-checkbox/paper-checkbox.html">
- <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../paper-styles/typography.html">
- <link rel="import" href="../paper-card.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- demo-snippet {
- --demo-snippet-demo: {
- background: var(--paper-grey-200);
- padding: 8px;
- };
- --demo-snippet-code: {
- max-height: 300px;
- };
- }
-
- paper-card {
- width: 100%;
- }
-
- .horizontal {
- @apply(--layout-horizontal);
- }
-
- .justified {
- @apply(--layout-justified);
- }
-
- .amber {
- background: var(--paper-amber-900);
- }
-
- .lime {
- background: var(--paper-lime-500);
- }
-
- .cyan {
- background: var(--paper-cyan-500);
- }
-
- .dark {
- background: var(--paper-blue-grey-500);
- }
- paper-card.dark, paper-card.amber, paper-card.lime, paper-card.cyan {
- color: white;
- --paper-card-header-color: white;
- }
-
- paper-checkbox {
- display: block;
- margin-bottom: 4px;
- --paper-checkbox-label-color: white;
- --paper-checkbox-unchecked-color: white;
- }
-
- paper-icon-button {
- color: var(--paper-grey-600);
- }
-
- paper-icon-button.white {
- color: white !important;
- }
- </style>
-
-</head>
-<body unresolved>
- <body unresolved>
- <div class="vertical-section-container centered">
- <h3>A paper-card with a simple heading, header image, body content, and actions</h3>
- <demo-snippet>
- <template>
- <paper-card heading="Emmental" image="http://placehold.it/350x150/FFC107/000000">
- <div class="card-content">
- Emmentaler or Emmental is a yellow, medium-hard cheese that originated in the area around Emmental, Switzerland. It is one of the cheeses of Switzerland, and is sometimes known as Swiss cheese.
- </div>
- <div class="card-actions">
- <paper-button>Share</paper-button>
- <paper-button>Explore!</paper-button>
- </div>
- </paper-card>
- </template>
- </demo-snippet>
-
- <h3>Paper-cards can contain advanced content</h3>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .cafe-header { @apply(--paper-font-headline); }
- .cafe-light { color: var(--paper-grey-600); }
- .cafe-location {
- float: right;
- font-size: 15px;
- vertical-align: middle;
- }
- .cafe-reserve { color: var(--google-blue-500); }
- iron-icon.star {
- --iron-icon-width: 16px;
- --iron-icon-height: 16px;
- color: var(--paper-amber-500);
- }
- iron-icon.star:last-of-type { color: var(--paper-grey-500); }
- </style>
- <paper-card image="./donuts.png">
- <div class="card-content">
- <div class="cafe-header">Cafe Basilico
- <div class="cafe-location cafe-light">
- <iron-icon icon="communication:location-on"></iron-icon>
- <span>250ft</span>
- </div>
- </div>
- <div class="cafe-rating">
- <iron-icon class="star" icon="star"></iron-icon>
- <iron-icon class="star" icon="star"></iron-icon>
- <iron-icon class="star" icon="star"></iron-icon>
- <iron-icon class="star" icon="star"></iron-icon>
- <iron-icon class="star" icon="star"></iron-icon>
- </div>
- <p>$・Italian, Cafe</p>
- <p class="cafe-light">Small plates, salads &amp; sandwiches in an intimate setting with 12 indoor seats plus patio seating.</p>
- </div>
- <div class="card-actions">
- <p>Tonight's availability</p>
- <div class="horizontal justified">
- <paper-icon-button icon="icons:event"></paper-icon-button>
- <paper-button>5:30PM</paper-button>
- <paper-button>7:30PM</paper-button>
- <paper-button>9:00PM</paper-button>
- </div>
- <paper-button class="cafe-reserve">Reserve</paper-button>
- </div>
- </paper-card>
- </template>
- </demo-snippet>
-
- <h3>Paper-cards can have a horizontal image</h3>
- <demo-snippet>
- <template>
- <style is="custom-style">
- paper-card.rate { @apply(--layout-horizontal); }
- .rate-image {
- width: 100px;
- height: 170px;
- background: url('./donuts.png');
- background-size: cover;
- }
- .rate-content {
- @apply(--layout-flex);
- float: left;
- }
- .rate-header { @apply(--paper-font-headline); }
- .rate-name { color: var(--paper-grey-600); margin: 10px 0; }
- paper-icon-button.rate-icon {
- --iron-icon-fill-color: white;
- --iron-icon-stroke-color: var(--paper-grey-600);
- }
- </style>
- <paper-card class="rate">
- <div class="rate-content">
- <div class="card-content">
- <div class="rate-header">Rate this album</div>
- <div class="rate-name">Mac Miller</div>
- <div>Live from space</div>
- </div>
- <div class="card-actions">
- <paper-icon-button class="rate-icon" icon="star"></paper-icon-button>
- <paper-icon-button class="rate-icon" icon="star"></paper-icon-button>
- <paper-icon-button class="rate-icon" icon="star"></paper-icon-button>
- <paper-icon-button class="rate-icon" icon="star"></paper-icon-button>
- <paper-icon-button class="rate-icon" icon="star"></paper-icon-button>
- </div>
- </div>
- <div class="rate-image"></div>
- </paper-card>
- </template>
- </demo-snippet>
-
- <h3>Paper-cards can have expanded supporting text</h3>
- <demo-snippet>
- <template>
- <paper-card heading="Top western road trips" image="./trip.png" class="white">
- <div class="card-content">1,000 miles of wonder</div>
- <div class="card-actions">
- <paper-button>Share</paper-button>
- <paper-button>Explore</paper-button>
- <paper-icon-button
- icon="hardware:keyboard-arrow-up"
- title="more info"
- onclick="_toggle()"
- style="float:right;">
- </paper-icon-button>
- <iron-collapse id="more-info" style="width:100%;">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent enim ante, tempus eget volutpat ac, cursus ac ante. Nulla facilisi. Praesent sed lacinia ligula. Donec malesuada nisl eget quam iaculis, vel placerat justo cursus.
- </iron-collapse>
- <script>
- function _toggle() {
- var moreInfo = document.getElementById('more-info');
- var iconButton = Polymer.dom(event).localTarget;
- iconButton.icon = moreInfo.opened ? 'hardware:keyboard-arrow-up'
- : 'hardware:keyboard-arrow-down';
- moreInfo.toggle();
- }
- </script>
- </div>
- </paper-card>
- </template>
- </demo-snippet>
-
- <h3>Paper-cards can be organized in different collections</h3>
-
- <h3>Same layout, different content</h3>
- <demo-snippet>
- <template>
- <style is="custom-style">
- paper-card.white {
- --paper-card-header-color: #fff;
- }
- </style>
- <paper-card heading="Pre-fab homes" image="./house.png" class="white" style="margin-bottom:8px;">
- <div class="card-actions">
- <paper-icon-button icon="favorite"></paper-icon-button>
- <paper-icon-button icon="bookmark"></paper-icon-button>
- <paper-icon-button icon="social:share"></paper-icon-button>
- </div>
- </paper-card>
- <div class="horizontal">
- <paper-card heading="Favorite trips" image="./trip.png" class="white" style="margin-right:4px;">
- <div class="card-actions horizontal justified">
- <paper-icon-button icon="favorite"></paper-icon-button>
- <paper-icon-button icon="bookmark"></paper-icon-button>
- <paper-icon-button icon="social:share"></paper-icon-button>
- </div>
- </paper-card>
- <paper-card heading="Best airlines" image="./travel.png" class="white" style="margin-left:4px;">
- <div class="card-actions horizontal justified">
- <paper-icon-button icon="favorite"></paper-icon-button>
- <paper-icon-button icon="bookmark"></paper-icon-button>
- <paper-icon-button icon="social:share"></paper-icon-button>
- </div>
- </paper-card>
- </div>
- </template>
- </demo-snippet>
-
- <h3>Different layout and content</h3>
- <demo-snippet>
- <template>
- <style is="custom-style">
- #notes {
- @apply(--layout-vertical);
- @apply(--layout-wrap);
- height: 344px;
- width: 384px;
- }
-
- #notes > paper-card {
- box-sizing: border-box;
- max-width: 184px;
- margin: 4px;
- flex: 0 0 auto;
- }
- </style>
- <div id="notes">
- <paper-card heading="Call Jennifer" class="cyan">
- <div class="card-actions">
- <paper-icon-button icon="communication:call" style="color:white;"></paper-icon-button>
- <span>March 19, 2017</span>
- </div>
- </paper-card>
- <paper-card class="dark">
- <div class="card-content">
- <p>Groceries:</p>
- <paper-checkbox>almond milk</paper-checkbox>
- <paper-checkbox>coconut water</paper-checkbox>
- <paper-checkbox>cheese</paper-checkbox>
- <paper-checkbox>green apples</paper-checkbox>
- </div>
- <div class="card-actions">
- <paper-icon-button icon="communication:location-on" style="color:white"></paper-icon-button>
- <span>Campbell</span>
- </div>
- </paper-card>
- <paper-card heading="clean desk" class="lime"></paper-card>
- <paper-card image="./donuts.png" class="amber">
- <div class="card-content">New cafe opened on Valencia St.</div>
- </paper-card>
- <paper-card heading="Yuna tickets on sale 6/24" class="cyan">
- </paper-card>
- </div>
- </template>
- </demo-snippet>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/travel.png b/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/travel.png
deleted file mode 100644
index 7d8e8215877..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/travel.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/trip.png b/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/trip.png
deleted file mode 100644
index 746d0b304d9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/demo/trip.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-card/index.html
deleted file mode 100755
index fab428a1d1c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>paper-card</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
-<iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-card/paper-card.html b/chromium/third_party/catapult/third_party/polymer/components/paper-card/paper-card.html
deleted file mode 100755
index 20c462c4445..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-card/paper-card.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../iron-image/iron-image.html">
-<link rel="import" href="../paper-material/paper-material.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<!--
-Material design: [Cards](https://www.google.com/design/spec/components/cards.html)
-
-`paper-card` is a container with a drop shadow.
-
-Example:
-
- <paper-card heading="Card Title">
- <div class="card-content">Some content</div>
- <div class="card-actions">
- <paper-button>Some action</paper-button>
- </div>
- </paper-card>
-
-Example - top card image:
-
- <paper-card heading="Card Title" image="/path/to/image.png">
- ...
- </paper-card>
-
-### Accessibility
-
-By default, the `aria-label` will be set to the value of the `heading` attribute.
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-card-background-color` | The background color of the card | `--primary-background-color`
-`--paper-card-header-color` | The color of the header text | `#000`
-`--paper-card-header` | Mixin applied to the card header section | `{}`
-`--paper-card-header-text` | Mixin applied to the title in the card header section | `{}`
-`--paper-card-header-image` | Mixin applied to the image in the card header section | `{}`
-`--paper-card-header-image-text` | Mixin applied to the text overlapping the image in the card header section | `{}`
-`--paper-card-content` | Mixin applied to the card content section| `{}`
-`--paper-card-actions` | Mixin applied to the card action section | `{}`
-`--paper-card` | Mixin applied to the card | `{}`
-
-@group Paper Elements
-@element paper-card
-@demo demo/index.html
--->
-
-<dom-module id="paper-card">
- <template>
- <style include="paper-material">
- :host {
- display: inline-block;
- position: relative;
- box-sizing: border-box;
- background-color: var(--paper-card-background-color, --primary-background-color);
- border-radius: 2px;
-
- @apply(--paper-font-common-base);
- @apply(--paper-card);
- }
-
- /* IE 10 support for HTML5 hidden attr */
- [hidden] {
- display: none !important;
- }
-
- .header {
- position: relative;
- border-top-left-radius: inherit;
- border-top-right-radius: inherit;
- overflow: hidden;
-
- @apply(--paper-card-header);
- }
-
- .header iron-image {
- display: block;
- width: 100%;
- --iron-image-width: 100%;
- pointer-events: none;
-
- @apply(--paper-card-header-image);
- }
-
- .header .title-text {
- padding: 16px;
- font-size: 24px;
- font-weight: 400;
- color: var(--paper-card-header-color, #000);
-
- @apply(--paper-card-header-text);
- }
-
- .header .title-text.over-image {
- position: absolute;
- bottom: 0px;
-
- @apply(--paper-card-header-image-text);
- }
-
- :host ::content .card-content {
- padding: 16px;
- position:relative;
-
- @apply(--paper-card-content);
- }
-
- :host ::content .card-actions {
- border-top: 1px solid #e8e8e8;
- padding: 5px 16px;
- position:relative;
-
- @apply(--paper-card-actions);
- }
- </style>
-
- <div class="header">
- <iron-image hidden$="[[!image]]" src="[[image]]" preload$="[[preloadImage]]" fade$="[[fadeImage]]"></iron-image>
- <div hidden$="[[!heading]]" class$="[[_computeHeadingClass(image)]]">[[heading]]</div>
- </div>
-
- <content></content>
- </template>
-
- <script>
- Polymer({
- is: 'paper-card',
-
- properties: {
- /**
- * The title of the card.
- */
- heading: {
- type: String,
- value: '',
- observer: '_headingChanged'
- },
-
- /**
- * The url of the title image of the card.
- */
- image: {
- type: String,
- value: ''
- },
-
- /**
- * When `true`, any change to the image url property will cause the
- * `placeholder` image to be shown until the image is fully rendered.
- */
- preloadImage: {
- type: Boolean,
- value: false
- },
-
- /**
- * When `preloadImage` is true, setting `fadeImage` to true will cause the
- * image to fade into place.
- */
- fadeImage: {
- type: Boolean,
- value: false
- },
-
- /**
- * The z-depth of the card, from 0-5.
- */
- elevation: {
- type: Number,
- value: 1,
- reflectToAttribute: true
- },
-
- /**
- * Set this to true to animate the card shadow when setting a new
- * `z` value.
- */
- animatedShadow: {
- type: Boolean,
- value: false
- },
-
- /**
- * Read-only property used to pass down the `animatedShadow` value to
- * the underlying paper-material style (since they have different names).
- */
- animated: {
- type: Boolean,
- reflectToAttribute: true,
- readOnly: true,
- computed: '_computeAnimated(animatedShadow)'
- }
- },
-
- _headingChanged: function(heading) {
- var label = this.getAttribute('aria-label');
- this.setAttribute('aria-label', heading);
- },
-
- _computeHeadingClass: function(image) {
- var cls = 'title-text';
- if (image)
- cls += ' over-image';
- return cls;
- },
-
- _computeAnimated: function(animatedShadow) {
- return animatedShadow;
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.bower.json
deleted file mode 100644
index 1aa393b5604..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.bower.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "name": "paper-dialog-behavior",
- "version": "1.2.7",
- "description": "Implements a behavior used for material design dialogs",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "dialog",
- "overlay",
- "behavior"
- ],
- "main": "paper-dialog-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-dialog-behavior"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-dialog-behavior",
- "ignore": [],
- "dependencies": {
- "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.1.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",
- "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-listbox": "PolymerElements/paper-listbox#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.2.7",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.7",
- "commit": "decc77ca55c0381cf01d7409ddf1eb966543e84e"
- },
- "_source": "git://github.com/PolymerElements/paper-dialog-behavior.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-dialog-behavior"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.travis.yml
deleted file mode 100644
index 7319854afdb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: ZBrrZGA8OWY95x8yHSsKUNrQfowhRe/s/pMZhHgnoppnZ1+bDfpoms+ggOdvH0TgURAAdF+1Wq1mTCgNp0FYLJ3Oe34XseDIxiA3wXSQO/E2m4Cfj/w4fRvaSy8ikdz5urQJET33SjDKdggm1FmWmnt6vSVgW/mg8M7AW2KWDcE=
- - secure: P5UKkTar39Q1k0VwtF5LhOphqNiW3r+DSnN1vRNA4oKZPrt6l3dJE1hpA9+1x1m6SryG856lLekPM6/fVZuC7nyDKFLz4vU/EWhiGdyWN1lHhE2MDh281TsCtzK56S0uJxdmlIpSiWTFWIrrEiiewN2b8dXy3FSPfy0Fo1sGn54=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/README.md
deleted file mode 100644
index ba8acc40913..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-dialog-behavior.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-dialog-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-dialog-behavior)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dialog-behavior)_
-
-
-##Polymer.PaperDialogBehavior
-
-Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to implement a Material Design
-dialog.
-
-For example, if `<paper-dialog-impl>` implements this behavior:
-
-```html
-<paper-dialog-impl>
- <h2>Header</h2>
- <div>Dialog body</div>
- <div class="buttons">
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm>Accept</paper-button>
- </div>
-</paper-dialog-impl>
-```
-
-`paper-dialog-shared-styles.html` provide styles for a header, content area, and an action area for buttons.
-Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the
-`paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area.
-
-Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls to close the
-dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReason` will update
-to include `confirmed: true`.
-
-### Accessibility
-
-This element has `role="dialog"` by default. Depending on the context, it may be more appropriate
-to override this attribute with `role="alertdialog"`.
-
-If `modal` is set, the element will set `aria-modal` and prevent the focus from exiting the element.
-It will also ensure that focus remains in the dialog.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/bower.json
deleted file mode 100644
index cbe17d39c00..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/bower.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "paper-dialog-behavior",
- "version": "1.2.7",
- "description": "Implements a behavior used for material design dialogs",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "dialog",
- "overlay",
- "behavior"
- ],
- "main": "paper-dialog-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-dialog-behavior"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-dialog-behavior",
- "ignore": [],
- "dependencies": {
- "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.1.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",
- "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-listbox": "PolymerElements/paper-listbox#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/index.html
deleted file mode 100644
index 193dddcc2e0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/index.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-dialog-behavior demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="simple-dialog.html">
-
- <link rel="import" href="../../paper-button/paper-button.html">
- <link rel="import" href="../../paper-dropdown-menu/paper-dropdown-menu.html">
- <link rel="import" href="../../paper-item/paper-item.html">
- <link rel="import" href="../../paper-listbox/paper-listbox.html">
- <link rel="import" href="../../paper-dialog-scrollable/paper-dialog-scrollable.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
-
- <style is="custom-style" include="demo-pages-shared-styles"></style>
-</head>
-<body unresolved class="centered">
-
- <h3>An element with <code>PaperDialogBehavior</code> can be opened, closed, toggled. Use <code>h2</code> for the title</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button raised onclick="dialog.toggle()">dialog</paper-button>
- <simple-dialog id="dialog">
- <h2>Dialog Title</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </simple-dialog>
- </template>
- </demo-snippet>
-
- <h3>An element with <code>PaperDialogBehavior</code> can be modal. Use the attributes <code>dialog-dismiss</code> and <code>dialog-confirm</code> on the children to close it.</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button raised onclick="modalAlert.toggle()">modal alert</paper-button>
- <simple-dialog id="modalAlert" modal role="alertdialog">
- <h2>Alert</h2>
- <paper-dropdown-menu label="Draft to discard">
- <paper-listbox class="dropdown-content">
- <paper-item>Draft 1</paper-item>
- <paper-item>Draft 2</paper-item>
- <paper-item>Draft 3</paper-item>
- <paper-item>Draft 4</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
- <div class="buttons">
- <paper-button onclick="modalDetails.toggle()">More details</paper-button>
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm autofocus>Discard</paper-button>
- </div>
- </simple-dialog>
- <simple-dialog id="modalDetails" modal>
- <h2>Details</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <div class="buttons">
- <paper-button dialog-confirm autofocus>OK</paper-button>
- </div>
- </simple-dialog>
- </template>
- </demo-snippet>
-
- <h3>Use <code>paper-dialog-scrollable</code> for scrolling content</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button raised onclick="scrolling.toggle()">scrolling</paper-button>
- <simple-dialog id="scrolling">
- <h2>Scrolling</h2>
- <paper-dialog-scrollable>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </paper-dialog-scrollable>
- <div class="buttons">
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm>OK</paper-button>
- </div>
- </simple-dialog>
- </template>
- </demo-snippet>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/simple-dialog.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/simple-dialog.html
deleted file mode 100644
index a204372393b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/demo/simple-dialog.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../paper-dialog-behavior.html">
-<link rel="import" href="../paper-dialog-shared-styles.html">
-
-<dom-module id="simple-dialog">
- <template>
- <style include="paper-dialog-shared-styles"></style>
- <content></content>
- </template>
-
-</dom-module>
-
-<script>
-
-(function() {
-
- Polymer({
-
- is: 'simple-dialog',
-
- behaviors: [
- Polymer.PaperDialogBehavior
- ]
-
- });
-
-})();
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/hero.svg
deleted file mode 100755
index d47381685f8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/hero.svg
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <g>
- <polygon points="76.7,98 79.2,98 74,91.1 74,94.4 "/>
- <polygon points="74,81.4 74,84.7 84.1,98 86.6,98 "/>
- <polygon points="74,71.7 74,75 91.5,98 94,98 "/>
- <polygon points="74,62 74,65.3 98.9,98 101.4,98 "/>
- <polygon points="94.3,79 92,79 92,76 74,52.3 74,55.6 106.2,98 108.7,98 "/>
- <polygon points="92,69.6 92,66.3 74,42.6 74,45.9 "/>
- <polygon points="101.7,79 99.2,79 113.6,98 116.1,98 "/>
- <polygon points="92,59.9 92,56.6 74,32.9 74,36.2 "/>
- <polygon points="109.1,79 106.5,79 121,98 123.5,98 "/>
- <polygon points="92,50.2 92,47 92.1,47 77.7,28 75.2,28 "/>
- <polygon points="116.4,79 113.9,79 128.4,98 130.9,98 "/>
- <polygon points="97,47 99.5,47 85,28 82.5,28 "/>
- <polygon points="123.8,79 121.3,79 135.7,98 138.2,98 "/>
- <polygon points="104.4,47 106.9,47 92.4,28 89.9,28 "/>
- <polygon points="131.2,79 128.7,79 143.1,98 145.6,98 "/>
- <polygon points="132,70.4 132,73.7 150,97.4 150,94.1 "/>
- <polygon points="111.7,47 114.2,47 99.8,28 97.3,28 "/>
- <polygon points="132,60.7 132,64 150,87.7 150,84.3 "/>
- <polygon points="119.1,47 121.6,47 107.2,28 104.7,28 "/>
- <polygon points="132,51 132,54.3 150,77.9 150,74.6 "/>
- <polygon points="114.6,28 112,28 126.5,47 129,47 "/>
- <polygon points="121.9,28 119.4,28 150,68.2 150,64.9 "/>
- <polygon points="129.3,28 126.8,28 150,58.5 150,55.2 "/>
- <polygon points="136.7,28 134.2,28 150,48.8 150,45.5 "/>
- <polygon points="144.1,28 141.5,28 150,39.1 150,35.8 "/>
- <polygon points="150,29.4 150,28 148.9,28 "/>
- </g>
- <path d="M133,80H91V46h42V80z M93,78h38V48H93V78z"/>
- <path d="M151,99H73V27h78V99z M75,97h74V29H75V97z"/>
- <circle cx="74" cy="28" r="4"/>
- <circle cx="150" cy="28" r="4"/>
- <circle cx="150" cy="98" r="4"/>
- <circle cx="74" cy="98" r="4"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/index.html
deleted file mode 100644
index af98b85acdc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-dialog-behavior</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-behavior.html
deleted file mode 100644
index 6b45ddd1601..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-behavior.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html">
-
-<script>
-
-/**
-Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to implement a Material Design
-dialog.
-
-For example, if `<paper-dialog-impl>` implements this behavior:
-
- <paper-dialog-impl>
- <h2>Header</h2>
- <div>Dialog body</div>
- <div class="buttons">
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm>Accept</paper-button>
- </div>
- </paper-dialog-impl>
-
-`paper-dialog-shared-styles.html` provide styles for a header, content area, and an action area for buttons.
-Use the `<h2>` tag for the header and the `buttons` class for the action area. You can use the
-`paper-dialog-scrollable` element (in its own repository) if you need a scrolling content area.
-
-Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive controls to close the
-dialog. If the user dismisses the dialog with `dialog-confirm`, the `closingReason` will update
-to include `confirmed: true`.
-
-### Accessibility
-
-This element has `role="dialog"` by default. Depending on the context, it may be more appropriate
-to override this attribute with `role="alertdialog"`.
-
-If `modal` is set, the element will prevent the focus from exiting the element.
-It will also ensure that focus remains in the dialog.
-
-@hero hero.svg
-@demo demo/index.html
-@polymerBehavior Polymer.PaperDialogBehavior
-*/
-
- Polymer.PaperDialogBehaviorImpl = {
-
- hostAttributes: {
- 'role': 'dialog',
- 'tabindex': '-1'
- },
-
- properties: {
-
- /**
- * If `modal` is true, this implies `no-cancel-on-outside-click`, `no-cancel-on-esc-key` and `with-backdrop`.
- */
- modal: {
- type: Boolean,
- value: false
- }
-
- },
-
- observers: [
- '_modalChanged(modal, _readied)'
- ],
-
- listeners: {
- 'tap': '_onDialogClick'
- },
-
- ready: function () {
- // Only now these properties can be read.
- this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;
- this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;
- this.__prevWithBackdrop = this.withBackdrop;
- },
-
- _modalChanged: function(modal, readied) {
- // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.
- // We need to wait for the element to be ready before we can read the
- // properties values.
- if (!readied) {
- return;
- }
-
- if (modal) {
- this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;
- this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;
- this.__prevWithBackdrop = this.withBackdrop;
- this.noCancelOnOutsideClick = true;
- this.noCancelOnEscKey = true;
- this.withBackdrop = true;
- } else {
- // If the value was changed to false, let it false.
- this.noCancelOnOutsideClick = this.noCancelOnOutsideClick &&
- this.__prevNoCancelOnOutsideClick;
- this.noCancelOnEscKey = this.noCancelOnEscKey &&
- this.__prevNoCancelOnEscKey;
- this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;
- }
- },
-
- _updateClosingReasonConfirmed: function(confirmed) {
- this.closingReason = this.closingReason || {};
- this.closingReason.confirmed = confirmed;
- },
-
- /**
- * Will dismiss the dialog if user clicked on an element with dialog-dismiss
- * or dialog-confirm attribute.
- */
- _onDialogClick: function(event) {
- // Search for the element with dialog-confirm or dialog-dismiss,
- // from the root target until this (excluded).
- var path = Polymer.dom(event).path;
- for (var i = 0; i < path.indexOf(this); i++) {
- var target = path[i];
- if (target.hasAttribute && (target.hasAttribute('dialog-dismiss') || target.hasAttribute('dialog-confirm'))) {
- this._updateClosingReasonConfirmed(target.hasAttribute('dialog-confirm'));
- this.close();
- event.stopPropagation();
- break;
- }
- }
- }
-
- };
-
- /** @polymerBehavior */
- Polymer.PaperDialogBehavior = [Polymer.IronOverlayBehavior, Polymer.PaperDialogBehaviorImpl];
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-common.css b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-common.css
deleted file mode 100644
index 560b0a56aa2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-common.css
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-*/
-
-:host {
- display: block;
- margin: 24px 40px;
-
- background: var(--paper-dialog-background-color, --primary-background-color);
- color: var(--paper-dialog-color, --primary-text-color);
-
- @apply(--paper-font-body1);
- @apply(--shadow-elevation-16dp);
- @apply(--paper-dialog);
-}
-
-:host > ::content > * {
- margin-top: 20px;
- padding: 0 24px;
-}
-
-:host > ::content > .no-padding {
- padding: 0;
-}
-
-:host > ::content > *:first-child {
- margin-top: 24px;
-}
-
-:host > ::content > *:last-child {
- margin-bottom: 24px;
-}
-
-:host > ::content h2 {
- position: relative;
- margin: 0;
- @apply(--paper-font-title);
-
- @apply(--paper-dialog-title);
-}
-
-:host > ::content .buttons {
- position: relative;
- padding: 8px 8px 8px 24px;
- margin: 0;
-
- color: var(--paper-dialog-button-color, --primary-color);
-
- @apply(--layout-horizontal);
- @apply(--layout-end-justified);
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-shared-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-shared-styles.html
deleted file mode 100644
index 35ea74bd7fb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog-behavior/paper-dialog-shared-styles.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-<link rel="import" href="../paper-styles/shadow.html">
-
-<!--
-### Styling
-
-The following custom properties and mixins are available for styling.
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`
-`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`
-`--paper-dialog` | Mixin applied to the dialog | `{}`
-`--paper-dialog-title` | Mixin applied to the title (`<h2>`) element | `{}`
-`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`
--->
-
-<dom-module id="paper-dialog-shared-styles">
- <template>
- <style>
- :host {
- display: block;
- margin: 24px 40px;
-
- background: var(--paper-dialog-background-color, --primary-background-color);
- color: var(--paper-dialog-color, --primary-text-color);
-
- @apply(--paper-font-body1);
- @apply(--shadow-elevation-16dp);
- @apply(--paper-dialog);
- }
-
- :host > ::content > * {
- margin-top: 20px;
- padding: 0 24px;
- }
-
- :host > ::content > .no-padding {
- padding: 0;
- }
-
- :host > ::content > *:first-child {
- margin-top: 24px;
- }
-
- :host > ::content > *:last-child {
- margin-bottom: 24px;
- }
-
- :host > ::content h2 {
- position: relative;
- margin: 0;
- @apply(--paper-font-title);
-
- @apply(--paper-dialog-title);
- }
-
- :host > ::content .buttons {
- position: relative;
- padding: 8px 8px 8px 24px;
- margin: 0;
-
- color: var(--paper-dialog-button-color, --primary-color);
-
- @apply(--layout-horizontal);
- @apply(--layout-end-justified);
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.bower.json
deleted file mode 100644
index 2882e47923c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.bower.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "paper-dialog",
- "description": "A Material Design dialog",
- "version": "1.0.4",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "dialog",
- "overlay"
- ],
- "main": "paper-dialog.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-dialog"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-dialog",
- "ignore": [],
- "dependencies": {
- "neon-animation": "PolymerElements/neon-animation#^1.0.0",
- "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",
- "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-menu": "PolymerElements/paper-menu#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.0.4",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.4",
- "commit": "53b099bed06bbbab7cb0f82c8209328c1a82aee6"
- },
- "_source": "git://github.com/PolymerElements/paper-dialog.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-dialog"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.travis.yml
deleted file mode 100644
index eda70b02787..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: CiislAd2L7WGhu3ZFWeP/tq7aToNIKX//D4gUbafyI1vmFykDOTeZ22UzoFZ/SJ2pHUdoMGyjiYBr+MGS0G81+CEAgUC/8RI5HzWRg10KdEWB7qWQgWlxABdl0MV2T6RY2rv1gMss2b8sFL8FoBsR2ydqeKyGHhiuNG3/th7HBUdyLur4VnGlVHcQAHk8CgszBgL78RFU61+FbJR1RyJpjytAkJJP4X2DFdNx5XYh6nwDWKnRciZEHFzgj9c52eaQKBNOKwJjm/Gc2Mcyhq7inUM9di5qfRhP3EVn3aENC3WJoIyGu3wgzjD+r3Mp+PsEq6OLvm09g6ljbeMKfV9haQ0MPRQTmZiEjsiEXmxzL3qfYZhA/YoySyl/PyrXoAXFE19sbCBV9tCbbmR9vStIZOiFQLtUGAHUosWQOhR2Nym23q7B1sSlYAhaAaQlzkflhkb+h4QFCUW5IBjQEDl4CwG0n0dm7YO+Z+jZFoEz1kiper3D5T8mJxso69WQskG/kENqnrP1U9RMJbFQOQFYXauNBpc5ufbODTRivwHnNA+Gu2D5AbljGM8xcUNlzLJx+BWUU5QIt/ddfjynCdFyUazHNU/P2gH6R8e2ROVzupvBsdr2PyU5kQqdD8yTGPHkOimtlRY2Hsnp50NkNzDzuxIz+1SYjve7OOZXFWpRi4=
- - secure: iEyYkfoa4Sp68fk1ttK0AEdoJ2i+3Ggx1cFcEuNtTjyrmSDVVb10E6LeTBWgWgxnK1EmV5MRY+5m3BzONDaPJMoChNa1ddqitPSqfK8SARjIUZ9DrliLwgsnfl/k/5EkKxzayH+xASYSqqMknpJC+irIs48oMZPB1zEVRK4FdhaCTPcWlDbdHtqwhDeRjXWmpY4uggRTyuql9PLwSU+P+e2S6UqBvXs5ldwHbC+361l8nDX4eB2AC/RmcSoawHoptd2+40+vJ2hs9+bcmQcD5rwGN3Y793q+F5L5ZTJu3v9KKU+9ABNT7yaIEk497dSA3lWa0I4MNT+pe5UcvJ6A1f5/pKLPZ8gYVdOx61Y9yHYW8c86k+QasGBTgwrzwIhk71iu+t9c6Jtt39mmZpewsfGpmUKoVTCBpO7YYlQwe1BCxQOLwdiudXE1wZKy2yLFSBHGa6wM1C9tLw6IW9Wb0ncUCSP/SIsXFlzBQKpOHBtJe0yGqw6yPf5/mxoVcsm5+F49Vh8nu7CTNVpZ9rcQcObLMAsy9qs7etiCHlzA5bAXtX0mmTob8+R5Cbjiir9LwR8ZltASivJg87taMldtXJDEDxNuHiSytxMTF56OxnWx82ek8aOaDY0WiIzUNEVufVh+sLTp47OHKOJXMRsLXu16TkaOkCVPsBkF2KVNwT4=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/README.md
deleted file mode 100644
index 787cb7ee2bc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-dialog.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-dialog.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-dialog)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dialog)_
-
-
-##&lt;paper-dialog&gt;
-
-Material design: [Dialogs](https://www.google.com/design/spec/components/dialogs.html)
-
-`<paper-dialog>` is a dialog with Material Design styling and optional animations when it is
-opened or closed. It provides styles for a header, content area, and an action area for buttons.
-You can use the `<paper-dialog-scrollable>` element (in its own repository) if you need a scrolling
-content area. See `Polymer.PaperDialogBehavior` for specifics.
-
-For example, the following code implements a dialog with a header, scrolling content area and
-buttons.
-
-```html
-<paper-dialog>
- <h2>Header</h2>
- <paper-dialog-scrollable>
- Lorem ipsum...
- </paper-dialog-scrollable>
- <div class="buttons">
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm>Accept</paper-button>
- </div>
-</paper-dialog>
-```
-
-### Styling
-
-See the docs for `Polymer.PaperDialogBehavior` for the custom properties available for styling
-this element.
-
-### Animations
-
-Set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog
-is opened or closed. See the documentation in
-[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation) for more info.
-
-For example:
-
-```html
-<link rel="import" href="components/neon-animation/animations/scale-up-animation.html">
-<link rel="import" href="components/neon-animation/animations/fade-out-animation.html">
-
-<paper-dialog entry-animation="scale-up-animation"
- exit-animation="fade-out-animation">
- <h2>Header</h2>
- <div>Dialog body</div>
-</paper-dialog>
-```
-
-### Accessibility
-
-See the docs for `Polymer.PaperDialogBehavior` for accessibility features implemented by this
-element.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/bower.json
deleted file mode 100644
index ab3be847f4c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/bower.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "paper-dialog",
- "description": "A Material Design dialog",
- "version": "1.0.4",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "dialog",
- "overlay"
- ],
- "main": "paper-dialog.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-dialog"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-dialog",
- "ignore": [],
- "dependencies": {
- "neon-animation": "PolymerElements/neon-animation#^1.0.0",
- "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0",
- "paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-menu": "PolymerElements/paper-menu#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/demo/index.html
deleted file mode 100644
index 8b7549607ca..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/demo/index.html
+++ /dev/null
@@ -1,199 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-dialog demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../paper-dialog.html">
- <link rel="import" href="../../paper-button/paper-button.html">
- <link rel="import" href="../../paper-dialog-scrollable/paper-dialog-scrollable.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
- <link rel="import" href="../../neon-animation/neon-animations.html">
- <link rel="import" href="../../paper-dropdown-menu/paper-dropdown-menu.html">
- <link rel="import" href="../../paper-menu/paper-menu.html">
- <link rel="import" href="../../paper-item/paper-item.html">
-
- <link rel="stylesheet" href="../../paper-styles/demo.css">
-
- <style is="custom-style">
-
- section {
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- }
-
- section > paper-button {
- background-color: var(--google-grey-300);
- padding: 5px;
- }
-
- section > paper-button:hover {
- background-color: var(--paper-light-blue-200);
- padding: 5px;
- }
-
- paper-dialog.colored {
- border: 2px solid;
- border-color: var(--paper-green-500);
- background-color: var(--paper-light-green-50);
- color: var(--paper-green-500);
- }
-
- paper-dialog.size-position {
- position: fixed;
- top: 16px;
- right: 16px;
- width: 300px;
- height: 300px;
- overflow: auto;
- }
- </style>
-
-</head>
-<body unresolved>
-
- <section onclick="clickHandler(event)">
- <h4>Dialog layouts</h4>
-
- <paper-button data-dialog="dialog">plain dialog</paper-button>
- <paper-button data-dialog="scrolling">scrolling dialog</paper-button>
- <paper-button data-dialog="actions">dialog with actions</paper-button>
- <paper-button data-dialog="modal">modal dialog</paper-button>
- <paper-button data-dialog="dropdown">dialog with dropdown</paper-button>
- <paper-button data-dialog="nested">dialog with nested dialog</paper-button>
-
- <paper-dialog id="dialog">
- <h2>Dialog Title</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </paper-dialog>
-
- <paper-dialog id="scrolling">
- <h2>Scrolling</h2>
- <paper-dialog-scrollable>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </paper-dialog-scrollable>
- <div class="buttons">
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm autofocus>OK</paper-button>
- </div>
- </paper-dialog>
-
- <paper-dialog id="actions">
- <h2>Dialog Title</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <div class="buttons">
- <paper-button >More Info...</paper-button>
- <paper-button dialog-dismiss>Decline</paper-button>
- <paper-button dialog-confirm autofocus>Accept</paper-button>
- </div>
- </paper-dialog>
-
- <paper-dialog id="modal" modal>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
- <div class="buttons">
- <paper-button dialog-confirm autofocus>Tap me to close</paper-button>
- </div>
- </paper-dialog>
-
- <paper-dialog id="dropdown">
- <h2>Dialog Title</h2>
- <paper-dropdown-menu label="Value">
- <paper-menu class="dropdown-content">
- <paper-item>1</paper-item>
- <paper-item>2</paper-item>
- <paper-item>3</paper-item>
- <paper-item>4</paper-item>
- <paper-item>5</paper-item>
- <paper-item>6</paper-item>
- <paper-item>7</paper-item>
- <paper-item>8</paper-item>
- <paper-item>9</paper-item>
- <paper-item>10</paper-item>
- </paper-menu>
- </paper-dropdown-menu>
- </paper-dialog>
-
- <paper-dialog id="nested">
- <h2>Dialog Title</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- <div class="buttons">
- <paper-button data-dialog="innerDialog">Open nested dialog</paper-button>
- </div>
- </paper-dialog>
-
- <paper-dialog id="innerDialog">
- <h2>Dialog Title</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
- </paper-dialog>
-
- </section>
-
- <section onclick="clickHandler(event)">
- <h4>Custom styling</h4>
- <paper-button data-dialog="colors">colors</paper-button>
- <paper-button data-dialog="position">size &amp; position</paper-button>
-
- <paper-dialog id="colors" class="colored">
- <h2>Custom Colors</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </paper-dialog>
-
- <paper-dialog id="position" class="size-position">
- <h2>Custom Size &amp; Position</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </paper-dialog>
- </section>
-
- <section onclick="clickHandler(event)">
- <h4>Transitions</h4>
- <paper-button data-dialog="animated">transitions</paper-button>
- <paper-dialog id="animated" entry-animation="scale-up-animation" exit-animation="fade-out-animation" with-backdrop>
- <h2>Dialog Title</h2>
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
- </paper-dialog>
- </section>
-
- <script>
- function clickHandler(e) {
- var button = e.target;
- while (!button.hasAttribute('data-dialog') && button !== document.body) {
- button = button.parentElement;
- }
-
- if (!button.hasAttribute('data-dialog')) {
- return;
- }
-
- var id = button.getAttribute('data-dialog');
- var dialog = document.getElementById(id);
- if (dialog) {
- dialog.open();
- }
- }
-
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/hero.svg
deleted file mode 100755
index 713329b8470..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/hero.svg
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <g>
- <polygon points="0,124 0,126 2,126 "/>
- <polygon points="0,111.6 0,114.4 11.6,126 14.4,126 "/>
- <polygon points="0,99.1 0,101.9 24.1,126 26.9,126 "/>
- <polygon points="0,86.6 0,89.5 36.5,126 39.4,126 "/>
- <polygon points="0,74.2 0,77 49,126 51.8,126 "/>
- <polygon points="0,61.7 0,64.5 61.5,126 64.3,126 "/>
- <polygon points="0,49.2 0,52.1 73.9,126 76.8,126 "/>
- <polygon points="0,36.8 0,39.6 86.4,126 89.2,126 "/>
- <polygon points="0,24.3 0,27.1 98.9,126 101.7,126 "/>
- <polygon points="75.2,87 74,87 74,85.8 0,11.8 0,14.7 111.3,126 114.2,126 "/>
- <polygon points="87.6,87 84.8,87 123.8,126 126.6,126 "/>
- <polygon points="74,76.2 74,73.4 0.6,0 0,0 0,2.2 "/>
- <polygon points="74,63.7 74,60.9 13.1,0 10.3,0 "/>
- <polygon points="100.1,87 97.3,87 136.3,126 139.1,126 "/>
- <polygon points="112.6,87 109.7,87 148.7,126 151.6,126 "/>
- <polygon points="74,51.3 74,48.4 25.6,0 22.7,0 "/>
- <polygon points="125,87 122.2,87 161.2,126 164,126 "/>
- <polygon points="74.2,39 77,39 38,0 35.2,0 "/>
- <polygon points="86.7,39 89.5,39 50.5,0 47.7,0 "/>
- <polygon points="137.5,87 134.7,87 173.7,126 176.5,126 "/>
- <polygon points="150,87 147.1,87 186.1,126 189,126 "/>
- <polygon points="99.1,39 102,39 63,0 60.1,0 "/>
- <polygon points="150,74.6 150,77.4 198.6,126 201.4,126 "/>
- <polygon points="111.6,39 114.4,39 75.4,0 72.6,0 "/>
- <polygon points="150,62.1 150,64.9 211.1,126 213.9,126 "/>
- <polygon points="124.1,39 126.9,39 87.9,0 85.1,0 "/>
- <polygon points="100.3,0 97.5,0 136.5,39 139.3,39 "/>
- <polygon points="150,49.7 150,52.5 223.5,126 225,126 225,124.7 "/>
- <polygon points="112.8,0 110,0 149,39 150,39 150,40 225,115 225,112.2 "/>
- <polygon points="125.3,0 122.5,0 225,102.5 225,99.7 "/>
- <polygon points="137.7,0 134.9,0 225,90.1 225,87.3 "/>
- <polygon points="150.2,0 147.4,0 225,77.6 225,74.8 "/>
- <polygon points="162.7,0 159.8,0 225,65.2 225,62.3 "/>
- <polygon points="175.1,0 172.3,0 225,52.7 225,49.9 "/>
- <polygon points="187.6,0 184.8,0 225,40.2 225,37.4 "/>
- <polygon points="200.1,0 197.2,0 225,27.8 225,24.9 "/>
- <polygon points="212.5,0 209.7,0 225,15.3 225,12.5 "/>
- <polygon points="225,0 222.2,0 225,2.8 225,0 "/>
- </g>
- <g id="ic_x5F_add_x0D_">
- </g>
- <path d="M151,88H73V38h78V88z M75,86h74V40H75V86z"/>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/index.html
deleted file mode 100644
index 6304b8dc641..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-dialog</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/paper-dialog.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/paper-dialog.html
deleted file mode 100644
index ce3aab9f850..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dialog/paper-dialog.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../neon-animation/neon-animation-runner-behavior.html">
-<link rel="import" href="../paper-dialog-behavior/paper-dialog-behavior.html">
-<link rel="import" href="../paper-dialog-behavior/paper-dialog-shared-styles.html">
-<!--
-Material design: [Dialogs](https://www.google.com/design/spec/components/dialogs.html)
-
-`<paper-dialog>` is a dialog with Material Design styling and optional animations when it is
-opened or closed. It provides styles for a header, content area, and an action area for buttons.
-You can use the `<paper-dialog-scrollable>` element (in its own repository) if you need a scrolling
-content area. See `Polymer.PaperDialogBehavior` for specifics.
-
-For example, the following code implements a dialog with a header, scrolling content area and
-buttons.
-
- <paper-dialog>
- <h2>Header</h2>
- <paper-dialog-scrollable>
- Lorem ipsum...
- </paper-dialog-scrollable>
- <div class="buttons">
- <paper-button dialog-dismiss>Cancel</paper-button>
- <paper-button dialog-confirm>Accept</paper-button>
- </div>
- </paper-dialog>
-
-### Styling
-
-See the docs for `Polymer.PaperDialogBehavior` for the custom properties available for styling
-this element.
-
-### Animations
-
-Set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog
-is opened or closed. See the documentation in
-[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation) for more info.
-
-For example:
-
- <link rel="import" href="components/neon-animation/animations/scale-up-animation.html">
- <link rel="import" href="components/neon-animation/animations/fade-out-animation.html">
-
- <paper-dialog entry-animation="scale-up-animation"
- exit-animation="fade-out-animation">
- <h2>Header</h2>
- <div>Dialog body</div>
- </paper-dialog>
-
-### Accessibility
-
-See the docs for `Polymer.PaperDialogBehavior` for accessibility features implemented by this
-element.
-
-@group Paper Elements
-@element paper-dialog
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-dialog">
- <template>
- <style include="paper-dialog-shared-styles"></style>
- <content></content>
- </template>
-</dom-module>
-
-<script>
-
-(function() {
-
- Polymer({
-
- is: 'paper-dialog',
-
- behaviors: [
- Polymer.PaperDialogBehavior,
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- listeners: {
- 'neon-animation-finish': '_onNeonAnimationFinish'
- },
-
- _renderOpened: function() {
- this.cancelAnimation();
- if (this.withBackdrop) {
- this.backdropElement.open();
- }
- this.playAnimation('entry');
- },
-
- _renderClosed: function() {
- this.cancelAnimation();
- if (this.withBackdrop) {
- this.backdropElement.close();
- }
- this.playAnimation('exit');
- },
-
- _onNeonAnimationFinish: function() {
- if (this.opened) {
- this._finishRenderOpened();
- } else {
- this._finishRenderClosed();
- }
- }
-
- });
-
-})();
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.bower.json
deleted file mode 100644
index 7a545934187..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.bower.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "paper-dropdown-menu",
- "version": "1.2.2",
- "description": "An element that works similarly to a native browser select",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "dropdown",
- "select"
- ],
- "main": "paper-dropdown-menu.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-dropdown-menu.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-dropdown-menu",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
- "paper-input": "PolymerElements/paper-input#^1.0.9",
- "paper-menu-button": "PolymerElements/paper-menu-button#^1.0.0",
- "paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-listbox": "PolymerElements/paper-listbox#^1.0.0",
- "paper-tabs": "PolymerElements/paper-tabs#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "_release": "1.2.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.2",
- "commit": "2e990c4b2a27529dead9d9ebcc5830f74379c63e"
- },
- "_source": "git://github.com/PolymerElements/paper-dropdown-menu.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-dropdown-menu"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.travis.yml
deleted file mode 100644
index bf7731c2517..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: Uv6d6W9yI2Lbj7gYh73LCGHpwvvdE1sdqdElVsTN4LSYW4msyLweDD4/Irbk5Nw5bavxkXraYkN655p5VU1SBucTRFMYYtpTDA7xBT/HvXVP3+OgkrN+joVStHcRJXHJCoVtq+YalZ07Q0dltw/brtSUCHhZkcNMxHd/p0NGD1FBSgXC1oXv+MSLjPsSKujz8WuXbfnGXkW682rZhS8Mp5x4Y31AAuGl64gNypAYTdWZ9bKLjeAx4ZY1poiw4Bs1z+V9tO3EeD6YQb/CVpxOH+67FQ2cX0ybLXumNuJQFIzki+EzFwXxuKrJsD4gu8B4kJKVWuAS9wuWkNgGdjR2HVe3/5+nMe7RiLL/wD6yGvcD2ZjP8S0RrxbOeZ03IzadH1NT0FWGf0J55VQgt4XjN0j9bVTYMfX5Xyg5bQ/E1qPzHbyteMAw6LF4Wmh2PyWzKHfz1uPGiZP/3BOKj8EbGMKPBci2181kbotPDENMT/5lk24e944tr7hKWWatNxCmkeb+lJomAxGwDYt2+I4mrpHFz/r4w9qgNr3DelhHTkBw2lNKzGAL5I177IJvsvGnZaCpGuRDWfq2xLGg2aTa9J1iyvil8gQP4CVxffWbqpPxvOax3V5nfbnAUpyYWvCtVSpOV5ndZA9FlBIn/pOsXqIjdiOTmmeJwFoddpCcZ1Y=
- - secure: X0QrO1SQJs/ktfeJRfAzSTTAyLeMLu0NB5uj+hQCLPZ6QPacaOEaKmwx57CY2qsD9X34ijtXZHP8A3RWKXeQHt2H4CrQ/drWWzNjKMmaf42w8fzHNKkqlwsQV7Bh/g5qXnbzrkcsViOfDVkyPLIKumyG2NqZPrhjl8QDMGseiELB5oznBH/z8APY3lJVB1baT3Wxyzz7TdAYCpZGfdGjr/3bAx1qBNHJXeEMFJDYH4q2nKfqVhdNQx2VdB6nyxIoGKoDynPIGty2pVPOKrp6ctdJYFwtljbO1/AOh3uvkiZRB1dAwr8vE6xVBcUnpM8vseRhlipCSO6qcNTolF67DzlakjxNd8CUwnokJ1juxH9x4uUTAaUpaAHOFqL130Ogcqye6KJ4RavD9cs198dZE3Al9savUF8N2Q8Mpc04dc7AuMOglTTQqhIpLSdtFWsIptMUmhBS3hMgWfVAH7DEzR41SFwwXCN4ZvYC1ooCJK1+wL2po4kIHRaEHx+L6r+1+RKXQ+zBAG5VMtFtc0OoFtInTvyNqBcyHGkbxQaGdHN1FpBWo3wL5qcP37DtYbGe0iEtASk1w0MLlujQjHIY4smxVB/XmNRiOEkWHAtGxbBOu4NAHU5Qhxe22/w1fgPnO3YRoiNO4liJEYJNN1TpTYO3VolNq0IvdFKswj/p0vM=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/README.md
deleted file mode 100644
index fc59e19f963..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/README.md
+++ /dev/null
@@ -1,149 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-dropdown-menu-light.html paper-dropdown-menu.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-dropdown-menu.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-dropdown-menu)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-dropdown-menu)_
-
-
-##&lt;paper-dropdown-menu&gt;
-
-Material design: [Dropdown menus](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
-
-`paper-dropdown-menu` is similar to a native browser select element.
-`paper-dropdown-menu` works with selectable content. The currently selected
-item is displayed in the control. If no item is selected, the `label` is
-displayed instead.
-
-Example:
-
-```html
-<paper-dropdown-menu label="Your favourite pastry">
- <paper-listbox class="dropdown-content">
- <paper-item>Croissant</paper-item>
- <paper-item>Donut</paper-item>
- <paper-item>Financier</paper-item>
- <paper-item>Madeleine</paper-item>
- </paper-listbox>
-</paper-dropdown-menu>
-```
-
-This example renders a dropdown menu with 4 options.
-
-The child element with the class `dropdown-content` is used as the dropdown
-menu. This can be a [`paper-listbox`](paper-listbox), or any other or
-element that acts like an [`iron-selector`](iron-selector).
-
-Specifically, the menu child must fire an
-[`iron-select`](iron-selector#event-iron-select) event when one of its
-children is selected, and an [`iron-deselect`](iron-selector#event-iron-deselect)
-event when a child is deselected. The selected or deselected item must
-be passed as the event's `detail.item` property.
-
-Applications can listen for the `iron-select` and `iron-deselect` events
-to react when options are selected and deselected.
-
-### Styling
-
-The following custom properties and mixins are also available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-dropdown-menu` | A mixin that is applied to the element host | `{}` |
-| `--paper-dropdown-menu-disabled` | A mixin that is applied to the element host when disabled | `{}` |
-| `--paper-dropdown-menu-ripple` | A mixin that is applied to the internal ripple | `{}` |
-| `--paper-dropdown-menu-button` | A mixin that is applied to the internal menu button | `{}` |
-| `--paper-dropdown-menu-input` | A mixin that is applied to the internal paper input | `{}` |
-| `--paper-dropdown-menu-icon` | A mixin that is applied to the internal icon | `{}` |
-
-You can also use any of the `paper-input-container` and `paper-menu-button`
-style mixins and custom properties to style the internal input and menu button
-respectively.
-
-
-
-##&lt;paper-dropdown-menu-light&gt;
-
-Material design: [Dropdown menus](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
-
-This is a faster, lighter version of `paper-dropdown-menu`, that does not
-use a `<paper-input>` internally. Use this element if you're concerned about
-the performance of this element, i.e., if you plan on using many dropdowns on
-the same page. Note that this element has a slightly different styling API
-than `paper-dropdown-menu`.
-
-`paper-dropdown-menu-light` is similar to a native browser select element.
-`paper-dropdown-menu-light` works with selectable content. The currently selected
-item is displayed in the control. If no item is selected, the `label` is
-displayed instead.
-
-Example:
-
-```html
-<paper-dropdown-menu-light label="Your favourite pastry">
- <paper-listbox class="dropdown-content">
- <paper-item>Croissant</paper-item>
- <paper-item>Donut</paper-item>
- <paper-item>Financier</paper-item>
- <paper-item>Madeleine</paper-item>
- </paper-listbox>
-</paper-dropdown-menu-light>
-```
-
-This example renders a dropdown menu with 4 options.
-
-The child element with the class `dropdown-content` is used as the dropdown
-menu. This can be a [`paper-listbox`](paper-listbox), or any other or
-element that acts like an [`iron-selector`](iron-selector).
-
-Specifically, the menu child must fire an
-[`iron-select`](iron-selector#event-iron-select) event when one of its
-children is selected, and an [`iron-deselect`](iron-selector#event-iron-deselect)
-event when a child is deselected. The selected or deselected item must
-be passed as the event's `detail.item` property.
-
-Applications can listen for the `iron-select` and `iron-deselect` events
-to react when options are selected and deselected.
-
-### Styling
-
-The following custom properties and mixins are also available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-dropdown-menu` | A mixin that is applied to the element host | `{}` |
-| `--paper-dropdown-menu-disabled` | A mixin that is applied to the element host when disabled | `{}` |
-| `--paper-dropdown-menu-ripple` | A mixin that is applied to the internal ripple | `{}` |
-| `--paper-dropdown-menu-button` | A mixin that is applied to the internal menu button | `{}` |
-| `--paper-dropdown-menu-icon` | A mixin that is applied to the internal icon | `{}` |
-| `--paper-dropdown-menu-disabled-opacity` | The opacity of the dropdown when disabled | `0.33` |
-| `--paper-dropdown-menu-color` | The color of the input/label/underline when the dropdown is unfocused | `--primary-text-color` |
-| `--paper-dropdown-menu-focus-color` | The color of the label/underline when the dropdown is focused | `--primary-color` |
-| `--paper-dropdown-error-color` | The color of the label/underline when the dropdown is invalid | `--error-color` |
-| `--paper-dropdown-menu-label` | Mixin applied to the label | `{}` |
-| `--paper-dropdown-menu-input` | Mixin appled to the input | `{}` |
-
-Note that in this element, the underline is just the bottom border of the "input".
-To style it:
-
-```html
-<style is=custom-style>
- paper-dropdown-menu-light.custom {
- --paper-dropdown-menu-input: {
- border-bottom: 2px dashed lavender;
- };
-</style>
-```
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/bower.json
deleted file mode 100644
index 6a945cbeeb8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/bower.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "paper-dropdown-menu",
- "version": "1.2.2",
- "description": "An element that works similarly to a native browser select",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "dropdown",
- "select"
- ],
- "main": "paper-dropdown-menu.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-dropdown-menu.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-dropdown-menu",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
- "paper-input": "PolymerElements/paper-input#^1.0.9",
- "paper-menu-button": "PolymerElements/paper-menu-button#^1.0.0",
- "paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-listbox": "PolymerElements/paper-listbox#^1.0.0",
- "paper-tabs": "PolymerElements/paper-tabs#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/demo/index.html
deleted file mode 100644
index 4bb258e6c92..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/demo/index.html
+++ /dev/null
@@ -1,295 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-dropdown-menu demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../paper-item/paper-item.html">
- <link rel="import" href="../../paper-listbox/paper-listbox.html">
- <link rel="import" href="../../paper-tabs/paper-tabs.html">
- <link rel="import" href="../paper-dropdown-menu.html">
- <link rel="import" href="../paper-dropdown-menu-light.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- paper-tabs {
- width: 400px;
- }
-
- .vertical-section-container {
- max-width: 500px;
- }
-
- paper-dropdown-menu {
- width: 200px;
- margin-right: 20px;
- }
- </style>
-
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h4>This is a plain paper-dropdown-menu</h4>
- <demo-snippet class="centered-demo">
- <template>
- <paper-dropdown-menu label="Dinosaurs">
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light label="Dinosaurs (light)">
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
-
- <h4>You can pre-select a value using the <i>selected</i> attribute</h4>
- <demo-snippet class="centered-demo">
- <template>
- <paper-dropdown-menu label="Dinosaurs">
- <paper-listbox class="dropdown-content" selected="1">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light label="Dinosaurs (light)">
- <paper-listbox class="dropdown-content" selected="1">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
-
- <h4>You can change the direction in which the menu opens</h4>
- <demo-snippet class="centered-demo">
- <template>
- <paper-dropdown-menu label="Upwards and to the left!" vertical-align="bottom" horizontal-align="left">
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light label="Upwards and to the left! (light)" vertical-align="bottom" horizontal-align="left">
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
-
-
- <h4>A paper-dropdown-menu can be disabled</h4>
- <demo-snippet class="centered-demo">
- <template>
- <paper-dropdown-menu label="Disabled dinosaurs" disabled>
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light label="Disabled dinosaurs (light)" disabled>
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
-
- <!-- TODO(noms): enable this demo when the webcomponentsjs bug is fixed -->
- <!-- <h4>Here is an example of a long, scrolling menu, using a <i>dom-repeat</i></h4>
- <demo-snippet class="centered-demo">
- <template>
- <template is="dom-bind" id="Demo">
- <paper-dropdown-menu label="Dinosaurs">
- <paper-listbox class="dropdown-content">
- <template is="dom-repeat" items='[[dinosaurs]]' as="dinosaur">
- <paper-item>[[dinosaur]]</paper-item>
- </template>
- </paper-listbox>
- </paper-dropdown-menu>
- </template>
- </template>
- </demo-snippet> -->
-
- <h4>A paper-dropdown-menu can contain any kind of content, such as tabs</h4>
- <demo-snippet class="centered-demo">
- <template>
- <paper-dropdown-menu label="Menu tabs!?">
- <paper-tabs class="dropdown-content">
- <paper-tab>cheddar</paper-tab>
- <paper-tab>stilton</paper-tab>
- <paper-tab>emmental</paper-tab>
- </paper-tabs>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light label="Menu tabs!? (light)">
- <paper-tabs class="dropdown-content">
- <paper-tab>cheddar</paper-tab>
- <paper-tab>stilton</paper-tab>
- <paper-tab>emmental</paper-tab>
- </paper-tabs>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
-
- <h4>You can remove the ripple and the animations</h4>
- <demo-snippet class="centered-demo">
- <template>
- <paper-dropdown-menu label="Dinosaurs" noink no-animations>
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light label="Dinosaurs (light)" noink no-animations>
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
-
- <h4>You can style a paper-dropdown-menu using custom properties</h4>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- paper-dropdown-menu.custom {
- --paper-input-container-label: {
- color: var(--paper-pink-500);
- font-style: italic;
- text-align: center;
- font-weight: bold;
- };
- --paper-input-container-input: {
- color: var(--paper-indigo-500);
- font-style: normal;
- font-family: serif;
- text-transform: uppercase;
- }
- /* no underline */
- --paper-input-container-underline: {
- display: none;
- };
- }
-
- paper-dropdown-menu-light.custom {
- --paper-dropdown-menu-label: {
- color: var(--paper-pink-500);
- font-style: italic;
- text-align: center;
- font-weight: bold;
- };
- --paper-dropdown-menu-input: {
- color: var(--paper-indigo-500);
- font-style: normal;
- font-family: serif;
- text-transform: uppercase;
- /* no underline */
- border-bottom: none;
- }
- }
- </style>
- <paper-dropdown-menu class="custom" label="Custom" no-label-float>
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
- <paper-dropdown-menu-light class="custom" label="Custom (light)" no-label-float>
- <paper-listbox class="dropdown-content">
- <paper-item>allosaurus</paper-item>
- <paper-item>brontosaurus</paper-item>
- <paper-item>carcharodontosaurus</paper-item>
- <paper-item>diplodocus</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
- </template>
- </demo-snippet>
- </div>
-
- <script>
- // document.addEventListener('WebComponentsReady', function() {
- // Demo.dinosaurs = [
- // 'allosaurus',
- // 'brontosaurus',
- // 'carcharodontosaurus',
- // 'diplodocus',
- // 'ekrixinatosaurus',
- // 'fukuiraptor',
- // 'gallimimus',
- // 'hadrosaurus',
- // 'iguanodon',
- // 'jainosaurus',
- // 'kritosaurus',
- // 'liaoceratops',
- // 'megalosaurus',
- // 'nemegtosaurus',
- // 'ornithomimus',
- // 'protoceratops',
- // 'quetecsaurus',
- // 'rajasaurus',
- // 'stegosaurus',
- // 'triceratops',
- // 'utahraptor',
- // 'vulcanodon',
- // 'wannanosaurus',
- // 'xenoceratops',
- // 'yandusaurus',
- // 'zephyrosaurus'
- // ];
- // });
- </script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/index.html
deleted file mode 100644
index b8053bfbf33..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>paper-dropdown-menu</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-icons.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-icons.html
deleted file mode 100644
index d8ca87c0a29..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-icons.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!--
-@license
-Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
-
-<iron-iconset-svg name="paper-dropdown-menu" size="24">
-<svg><defs>
-<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>
-</defs></svg>
-</iron-iconset-svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-light.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-light.html
deleted file mode 100644
index 383550952dd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-light.html
+++ /dev/null
@@ -1,576 +0,0 @@
-<!--
-@license
-Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="../iron-behaviors/iron-button-state.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
-<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
-<link rel="import" href="../paper-menu-button/paper-menu-button.html">
-<link rel="import" href="../paper-behaviors/paper-ripple-behavior.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<link rel="import" href="paper-dropdown-menu-icons.html">
-<link rel="import" href="paper-dropdown-menu-shared-styles.html">
-
-<!--
-Material design: [Dropdown menus](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
-
-This is a faster, lighter version of `paper-dropdown-menu`, that does not
-use a `<paper-input>` internally. Use this element if you're concerned about
-the performance of this element, i.e., if you plan on using many dropdowns on
-the same page. Note that this element has a slightly different styling API
-than `paper-dropdown-menu`.
-
-`paper-dropdown-menu-light` is similar to a native browser select element.
-`paper-dropdown-menu-light` works with selectable content. The currently selected
-item is displayed in the control. If no item is selected, the `label` is
-displayed instead.
-
-Example:
-
- <paper-dropdown-menu-light label="Your favourite pastry">
- <paper-listbox class="dropdown-content">
- <paper-item>Croissant</paper-item>
- <paper-item>Donut</paper-item>
- <paper-item>Financier</paper-item>
- <paper-item>Madeleine</paper-item>
- </paper-listbox>
- </paper-dropdown-menu-light>
-
-This example renders a dropdown menu with 4 options.
-
-The child element with the class `dropdown-content` is used as the dropdown
-menu. This can be a [`paper-listbox`](paper-listbox), or any other or
-element that acts like an [`iron-selector`](iron-selector).
-
-Specifically, the menu child must fire an
-[`iron-select`](iron-selector#event-iron-select) event when one of its
-children is selected, and an [`iron-deselect`](iron-selector#event-iron-deselect)
-event when a child is deselected. The selected or deselected item must
-be passed as the event's `detail.item` property.
-
-Applications can listen for the `iron-select` and `iron-deselect` events
-to react when options are selected and deselected.
-
-### Styling
-
-The following custom properties and mixins are also available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-dropdown-menu` | A mixin that is applied to the element host | `{}`
-`--paper-dropdown-menu-disabled` | A mixin that is applied to the element host when disabled | `{}`
-`--paper-dropdown-menu-ripple` | A mixin that is applied to the internal ripple | `{}`
-`--paper-dropdown-menu-button` | A mixin that is applied to the internal menu button | `{}`
-`--paper-dropdown-menu-icon` | A mixin that is applied to the internal icon | `{}`
-`--paper-dropdown-menu-disabled-opacity` | The opacity of the dropdown when disabled | `0.33`
-`--paper-dropdown-menu-color` | The color of the input/label/underline when the dropdown is unfocused | `--primary-text-color`
-`--paper-dropdown-menu-focus-color` | The color of the label/underline when the dropdown is focused | `--primary-color`
-`--paper-dropdown-error-color` | The color of the label/underline when the dropdown is invalid | `--error-color`
-`--paper-dropdown-menu-label` | Mixin applied to the label | `{}`
-`--paper-dropdown-menu-input` | Mixin appled to the input | `{}`
-
-Note that in this element, the underline is just the bottom border of the "input".
-To style it:
-
- <style is=custom-style>
- paper-dropdown-menu-light.custom {
- --paper-dropdown-menu-input: {
- border-bottom: 2px dashed lavender;
- };
- </style>
-
-@group Paper Elements
-@element paper-dropdown-menu-light
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-dropdown-menu-light">
- <template>
- <style include="paper-dropdown-menu-shared-styles">
- :host(:focus) {
- outline: none;
- }
-
- /**
- * All of these styles below are for styling the fake-input display
- */
- .dropdown-trigger {
- box-sizing: border-box;
- position: relative;
- width: 100%;
- padding: 16px 0 8px 0;
- }
-
- :host([disabled]) .dropdown-trigger {
- pointer-events: none;
- opacity: var(--paper-dropdown-menu-disabled-opacity, 0.33);
- }
-
- :host([no-label-float]) .dropdown-trigger {
- padding-top: 8px; /* If there's no label, we need less space up top. */
- }
-
- #input {
- @apply(--paper-font-subhead);
- @apply(--paper-font-common-nowrap);
- border-bottom: 1px solid var(--paper-dropdown-menu-color, --secondary-text-color);
- color: var(--paper-dropdown-menu-color, --primary-text-color);
- width: 200px; /* Default size of an <input> */
- min-height: 24px;
- box-sizing: border-box;
- padding: 12px 20px 0 0; /* Right padding so that text doesn't overlap the icon */
- outline: none;
- @apply(--paper-dropdown-menu-input);
- }
-
- :host-context([dir="rtl"]) #input {
- padding-right: 0px;
- padding-left: 20px;
- }
-
- :host([disabled]) #input {
- border-bottom: 1px dashed var(--paper-dropdown-menu-color, --secondary-text-color);
- }
-
- :host([invalid]) #input {
- border-bottom: 2px solid var(--paper-dropdown-error-color, --error-color);
- }
-
- :host([no-label-float]) #input {
- padding-top: 0; /* If there's no label, we need less space up top. */
- }
-
- label {
- @apply(--paper-font-subhead);
- @apply(--paper-font-common-nowrap);
- display: block;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- /**
- * The container has a 16px top padding, and there's 12px of padding
- * between the input and the label (from the input's padding-top)
- */
- top: 28px;
- box-sizing: border-box;
- width: 100%;
- padding-right: 20px; /* Right padding so that text doesn't overlap the icon */
- text-align: left;
- transition-duration: .2s;
- transition-timing-function: cubic-bezier(.4,0,.2,1);
- color: var(--paper-dropdown-menu-color, --secondary-text-color);
- @apply(--paper-dropdown-menu-label);
- }
-
- :host-context([dir="rtl"]) label {
- padding-right: 0px;
- padding-left: 20px;
- }
-
- :host([no-label-float]) label {
- top: 8px;
- }
-
- label.label-is-floating {
- font-size: 12px;
- top: 8px;
- }
-
- label.label-is-hidden {
- display: none;
- }
-
- :host([focused]) label.label-is-floating {
- color: var(--paper-dropdown-menu-focus-color, --primary-color);
- }
-
- :host([invalid]) label.label-is-floating {
- color: var(--paper-dropdown-error-color, --error-color);
- }
-
- /**
- * Sets up the focused underline. It's initially hidden, and becomes
- * visible when it's focused.
- */
- label:after {
- background-color: var(--paper-dropdown-menu-focus-color, --primary-color);
- bottom: 7px; /* The container has an 8px bottom padding */
- content: '';
- height: 2px;
- left: 45%;
- position: absolute;
- transition-duration: .2s;
- transition-timing-function: cubic-bezier(.4,0,.2,1);
- visibility: hidden;
- width: 8px;
- z-index: 10;
- }
-
- :host([invalid]) label:after {
- background-color: var(--paper-dropdown-error-color, --error-color);
- }
-
- :host([no-label-float]) label:after {
- bottom: 7px; /* The container has a 8px bottom padding */
- }
-
- :host([focused]:not([disabled])) label:after {
- left: 0;
- visibility: visible;
- width: 100%;
- }
-
- iron-icon {
- position: absolute;
- right: 0px;
- bottom: 8px; /* The container has an 8px bottom padding */
- @apply(--paper-font-subhead);
- margin-top: 12px;
- color: var(--disabled-text-color);
- @apply(--paper-dropdown-menu-icon);
- }
-
- :host-context([dir="rtl"]) iron-icon {
- left: 0;
- right: auto;
- }
-
- :host([no-label-float]) iron-icon {
- margin-top: 0px;
- }
-
- .error {
- display: inline-block;
- visibility: hidden;
- color: var(--paper-dropdown-error-color, --error-color);
- @apply(--paper-font-caption);
- position: absolute;
- left:0;
- right:0;
- bottom: -12px;
- }
-
- :host([invalid]) .error {
- visibility: visible;
- }
- </style>
-
- <!-- this div fulfills an a11y requirement for combobox, do not remove -->
- <div role="button"></div>
- <paper-menu-button
- id="menuButton"
- vertical-align="[[verticalAlign]]"
- horizontal-align="[[horizontalAlign]]"
- vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]"
- disabled="[[disabled]]"
- no-animations="[[noAnimations]]"
- on-iron-select="_onIronSelect"
- on-iron-deselect="_onIronDeselect"
- opened="{{opened}}">
- <div class="dropdown-trigger">
- <label hidden$="[[!label]]"
- class$="[[_computeLabelClass(noLabelFloat,alwaysFloatLabel,hasContent)]]">[[label]]</label>
- <div id="input" tabindex="-1">&nbsp;</div>
- <iron-icon icon="paper-dropdown-menu:arrow-drop-down"></iron-icon>
- <span class="error">[[errorMessage]]</span>
- </div>
- <content id="content" select=".dropdown-content"></content>
- </paper-menu-button>
- </template>
-
- <script>
- (function() {
- 'use strict';
-
- Polymer({
- is: 'paper-dropdown-menu-light',
-
- behaviors: [
- Polymer.IronButtonState,
- Polymer.IronControlState,
- Polymer.PaperRippleBehavior,
- Polymer.IronFormElementBehavior,
- Polymer.IronValidatableBehavior
- ],
-
- properties: {
- /**
- * The derived "label" of the currently selected item. This value
- * is the `label` property on the selected item if set, or else the
- * trimmed text content of the selected item.
- */
- selectedItemLabel: {
- type: String,
- notify: true,
- readOnly: true
- },
-
- /**
- * The last selected item. An item is selected if the dropdown menu has
- * a child with class `dropdown-content`, and that child triggers an
- * `iron-select` event with the selected `item` in the `detail`.
- *
- * @type {?Object}
- */
- selectedItem: {
- type: Object,
- notify: true,
- readOnly: true
- },
-
- /**
- * The value for this element that will be used when submitting in
- * a form. It is read only, and will always have the same value
- * as `selectedItemLabel`.
- */
- value: {
- type: String,
- notify: true,
- readOnly: true,
- observer: '_valueChanged',
- },
-
- /**
- * The label for the dropdown.
- */
- label: {
- type: String
- },
-
- /**
- * The placeholder for the dropdown.
- */
- placeholder: {
- type: String
- },
-
- /**
- * True if the dropdown is open. Otherwise, false.
- */
- opened: {
- type: Boolean,
- notify: true,
- value: false,
- observer: '_openedChanged'
- },
-
- /**
- * Set to true to disable the floating label. Bind this to the
- * `<paper-input-container>`'s `noLabelFloat` property.
- */
- noLabelFloat: {
- type: Boolean,
- value: false,
- reflectToAttribute: true
- },
-
- /**
- * Set to true to always float the label. Bind this to the
- * `<paper-input-container>`'s `alwaysFloatLabel` property.
- */
- alwaysFloatLabel: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to disable animations when opening and closing the
- * dropdown.
- */
- noAnimations: {
- type: Boolean,
- value: false
- },
-
- /**
- * The orientation against which to align the menu dropdown
- * horizontally relative to the dropdown trigger.
- */
- horizontalAlign: {
- type: String,
- value: 'right'
- },
-
- /**
- * The orientation against which to align the menu dropdown
- * vertically relative to the dropdown trigger.
- */
- verticalAlign: {
- type: String,
- value: 'top'
- },
-
- hasContent: {
- type: Boolean,
- readOnly: true
- }
- },
-
- listeners: {
- 'tap': '_onTap'
- },
-
- keyBindings: {
- 'up down': 'open',
- 'esc': 'close'
- },
-
- hostAttributes: {
- tabindex: 0,
- role: 'combobox',
- 'aria-autocomplete': 'none',
- 'aria-haspopup': 'true'
- },
-
- observers: [
- '_selectedItemChanged(selectedItem)'
- ],
-
- attached: function() {
- // NOTE(cdata): Due to timing, a preselected value in a `IronSelectable`
- // child will cause an `iron-select` event to fire while the element is
- // still in a `DocumentFragment`. This has the effect of causing
- // handlers not to fire. So, we double check this value on attached:
- var contentElement = this.contentElement;
- if (contentElement && contentElement.selectedItem) {
- this._setSelectedItem(contentElement.selectedItem);
- }
- },
-
- /**
- * The content element that is contained by the dropdown menu, if any.
- */
- get contentElement() {
- return Polymer.dom(this.$.content).getDistributedNodes()[0];
- },
-
- /**
- * Show the dropdown content.
- */
- open: function() {
- this.$.menuButton.open();
- },
-
- /**
- * Hide the dropdown content.
- */
- close: function() {
- this.$.menuButton.close();
- },
-
- /**
- * A handler that is called when `iron-select` is fired.
- *
- * @param {CustomEvent} event An `iron-select` event.
- */
- _onIronSelect: function(event) {
- this._setSelectedItem(event.detail.item);
- },
-
- /**
- * A handler that is called when `iron-deselect` is fired.
- *
- * @param {CustomEvent} event An `iron-deselect` event.
- */
- _onIronDeselect: function(event) {
- this._setSelectedItem(null);
- },
-
- /**
- * A handler that is called when the dropdown is tapped.
- *
- * @param {CustomEvent} event A tap event.
- */
- _onTap: function(event) {
- if (Polymer.Gestures.findOriginalTarget(event) === this) {
- this.open();
- }
- },
-
- /**
- * Compute the label for the dropdown given a selected item.
- *
- * @param {Element} selectedItem A selected Element item, with an
- * optional `label` property.
- */
- _selectedItemChanged: function(selectedItem) {
- var value = '';
- if (!selectedItem) {
- value = '';
- } else {
- value = selectedItem.label || selectedItem.textContent.trim();
- }
-
- this._setValue(value);
- this._setSelectedItemLabel(value);
- },
-
- /**
- * Compute the vertical offset of the menu based on the value of
- * `noLabelFloat`.
- *
- * @param {boolean} noLabelFloat True if the label should not float
- * above the input, otherwise false.
- */
- _computeMenuVerticalOffset: function(noLabelFloat) {
- // NOTE(cdata): These numbers are somewhat magical because they are
- // derived from the metrics of elements internal to `paper-input`'s
- // template. The metrics will change depending on whether or not the
- // input has a floating label.
- return noLabelFloat ? -4 : 8;
- },
-
- /**
- * Returns false if the element is required and does not have a selection,
- * and true otherwise.
- * @param {*=} _value Ignored.
- * @return {boolean} true if `required` is false, or if `required` is true
- * and the element has a valid selection.
- */
- _getValidity: function(_value) {
- return this.disabled || !this.required || (this.required && !!this.value);
- },
-
- _openedChanged: function() {
- var openState = this.opened ? 'true' : 'false';
- var e = this.contentElement;
- if (e) {
- e.setAttribute('aria-expanded', openState);
- }
- },
-
- _computeLabelClass: function(noLabelFloat, alwaysFloatLabel, hasContent) {
- var cls = '';
- if (noLabelFloat === true) {
- return hasContent ? 'label-is-hidden' : '';
- }
-
- if (hasContent || alwaysFloatLabel === true) {
- cls += ' label-is-floating';
- }
- return cls;
- },
-
- _valueChanged: function() {
- // Only update if it's actually different.
- if (this.$.input && this.$.input.textContent !== this.value) {
- this.$.input.textContent = this.value;
- }
- this._setHasContent(!!this.value);
- },
- });
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-shared-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-shared-styles.html
deleted file mode 100644
index e265a714f56..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu-shared-styles.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!--
-@license
-Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<dom-module id="paper-dropdown-menu-shared-styles">
- <template>
- <style>
- :host {
- display: inline-block;
- position: relative;
- text-align: left;
- cursor: pointer;
-
- /* NOTE(cdata): Both values are needed, since some phones require the
- * value to be `transparent`.
- */
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- -webkit-tap-highlight-color: transparent;
-
- --paper-input-container-input: {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- max-width: 100%;
- box-sizing: border-box;
- cursor: pointer;
- };
-
- @apply(--paper-dropdown-menu);
- }
-
- :host([disabled]) {
- @apply(--paper-dropdown-menu-disabled);
- }
-
- :host([noink]) paper-ripple {
- display: none;
- }
-
- :host([no-label-float]) paper-ripple {
- top: 8px;
- }
-
- paper-ripple {
- top: 12px;
- left: 0px;
- bottom: 8px;
- right: 0px;
-
- @apply(--paper-dropdown-menu-ripple);
- }
-
- paper-menu-button {
- display: block;
- padding: 0;
-
- @apply(--paper-dropdown-menu-button);
- }
-
- paper-input {
- @apply(--paper-dropdown-menu-input);
- }
-
- iron-icon {
- color: var(--disabled-text-color);
-
- @apply(--paper-dropdown-menu-icon);
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu.html b/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu.html
deleted file mode 100644
index d3c5c673d07..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-dropdown-menu/paper-dropdown-menu.html
+++ /dev/null
@@ -1,382 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="../iron-behaviors/iron-button-state.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
-<link rel="import" href="../paper-input/paper-input.html">
-<link rel="import" href="../paper-menu-button/paper-menu-button.html">
-<link rel="import" href="../paper-ripple/paper-ripple.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<link rel="import" href="paper-dropdown-menu-icons.html">
-<link rel="import" href="paper-dropdown-menu-shared-styles.html">
-
-<!--
-Material design: [Dropdown menus](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
-
-`paper-dropdown-menu` is similar to a native browser select element.
-`paper-dropdown-menu` works with selectable content. The currently selected
-item is displayed in the control. If no item is selected, the `label` is
-displayed instead.
-
-Example:
-
- <paper-dropdown-menu label="Your favourite pastry">
- <paper-listbox class="dropdown-content">
- <paper-item>Croissant</paper-item>
- <paper-item>Donut</paper-item>
- <paper-item>Financier</paper-item>
- <paper-item>Madeleine</paper-item>
- </paper-listbox>
- </paper-dropdown-menu>
-
-This example renders a dropdown menu with 4 options.
-
-The child element with the class `dropdown-content` is used as the dropdown
-menu. This can be a [`paper-listbox`](paper-listbox), or any other or
-element that acts like an [`iron-selector`](iron-selector).
-
-Specifically, the menu child must fire an
-[`iron-select`](iron-selector#event-iron-select) event when one of its
-children is selected, and an [`iron-deselect`](iron-selector#event-iron-deselect)
-event when a child is deselected. The selected or deselected item must
-be passed as the event's `detail.item` property.
-
-Applications can listen for the `iron-select` and `iron-deselect` events
-to react when options are selected and deselected.
-
-### Styling
-
-The following custom properties and mixins are also available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-dropdown-menu` | A mixin that is applied to the element host | `{}`
-`--paper-dropdown-menu-disabled` | A mixin that is applied to the element host when disabled | `{}`
-`--paper-dropdown-menu-ripple` | A mixin that is applied to the internal ripple | `{}`
-`--paper-dropdown-menu-button` | A mixin that is applied to the internal menu button | `{}`
-`--paper-dropdown-menu-input` | A mixin that is applied to the internal paper input | `{}`
-`--paper-dropdown-menu-icon` | A mixin that is applied to the internal icon | `{}`
-
-You can also use any of the `paper-input-container` and `paper-menu-button`
-style mixins and custom properties to style the internal input and menu button
-respectively.
-
-@group Paper Elements
-@element paper-dropdown-menu
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-dropdown-menu">
- <template>
- <style include="paper-dropdown-menu-shared-styles"></style>
-
- <!-- this div fulfills an a11y requirement for combobox, do not remove -->
- <div role="button"></div>
- <paper-menu-button
- id="menuButton"
- vertical-align="[[verticalAlign]]"
- horizontal-align="[[horizontalAlign]]"
- vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]"
- disabled="[[disabled]]"
- no-animations="[[noAnimations]]"
- on-iron-select="_onIronSelect"
- on-iron-deselect="_onIronDeselect"
- opened="{{opened}}">
- <div class="dropdown-trigger">
- <paper-ripple></paper-ripple>
- <!-- paper-input has type="text" for a11y, do not remove -->
- <paper-input
- type="text"
- invalid="[[invalid]]"
- readonly
- disabled="[[disabled]]"
- value="[[selectedItemLabel]]"
- placeholder="[[placeholder]]"
- error-message="[[errorMessage]]"
- always-float-label="[[alwaysFloatLabel]]"
- no-label-float="[[noLabelFloat]]"
- label="[[label]]">
- <iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix></iron-icon>
- </paper-input>
- </div>
- <content id="content" select=".dropdown-content"></content>
- </paper-menu-button>
- </template>
-
- <script>
- (function() {
- 'use strict';
-
- Polymer({
- is: 'paper-dropdown-menu',
-
- behaviors: [
- Polymer.IronButtonState,
- Polymer.IronControlState,
- Polymer.IronFormElementBehavior,
- Polymer.IronValidatableBehavior
- ],
-
- properties: {
- /**
- * The derived "label" of the currently selected item. This value
- * is the `label` property on the selected item if set, or else the
- * trimmed text content of the selected item.
- */
- selectedItemLabel: {
- type: String,
- notify: true,
- readOnly: true
- },
-
- /**
- * The last selected item. An item is selected if the dropdown menu has
- * a child with class `dropdown-content`, and that child triggers an
- * `iron-select` event with the selected `item` in the `detail`.
- *
- * @type {?Object}
- */
- selectedItem: {
- type: Object,
- notify: true,
- readOnly: true
- },
-
- /**
- * The value for this element that will be used when submitting in
- * a form. It is read only, and will always have the same value
- * as `selectedItemLabel`.
- */
- value: {
- type: String,
- notify: true,
- readOnly: true
- },
-
- /**
- * The label for the dropdown.
- */
- label: {
- type: String
- },
-
- /**
- * The placeholder for the dropdown.
- */
- placeholder: {
- type: String
- },
-
- /**
- * The error message to display when invalid.
- */
- errorMessage: {
- type: String
- },
-
- /**
- * True if the dropdown is open. Otherwise, false.
- */
- opened: {
- type: Boolean,
- notify: true,
- value: false,
- observer: '_openedChanged'
- },
-
- /**
- * Set to true to disable the floating label. Bind this to the
- * `<paper-input-container>`'s `noLabelFloat` property.
- */
- noLabelFloat: {
- type: Boolean,
- value: false,
- reflectToAttribute: true
- },
-
- /**
- * Set to true to always float the label. Bind this to the
- * `<paper-input-container>`'s `alwaysFloatLabel` property.
- */
- alwaysFloatLabel: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to disable animations when opening and closing the
- * dropdown.
- */
- noAnimations: {
- type: Boolean,
- value: false
- },
-
- /**
- * The orientation against which to align the menu dropdown
- * horizontally relative to the dropdown trigger.
- */
- horizontalAlign: {
- type: String,
- value: 'right'
- },
-
- /**
- * The orientation against which to align the menu dropdown
- * vertically relative to the dropdown trigger.
- */
- verticalAlign: {
- type: String,
- value: 'top'
- }
- },
-
- listeners: {
- 'tap': '_onTap'
- },
-
- keyBindings: {
- 'up down': 'open',
- 'esc': 'close'
- },
-
- hostAttributes: {
- role: 'combobox',
- 'aria-autocomplete': 'none',
- 'aria-haspopup': 'true'
- },
-
- observers: [
- '_selectedItemChanged(selectedItem)'
- ],
-
- attached: function() {
- // NOTE(cdata): Due to timing, a preselected value in a `IronSelectable`
- // child will cause an `iron-select` event to fire while the element is
- // still in a `DocumentFragment`. This has the effect of causing
- // handlers not to fire. So, we double check this value on attached:
- var contentElement = this.contentElement;
- if (contentElement && contentElement.selectedItem) {
- this._setSelectedItem(contentElement.selectedItem);
- }
- },
-
- /**
- * The content element that is contained by the dropdown menu, if any.
- */
- get contentElement() {
- return Polymer.dom(this.$.content).getDistributedNodes()[0];
- },
-
- /**
- * Show the dropdown content.
- */
- open: function() {
- this.$.menuButton.open();
- },
-
- /**
- * Hide the dropdown content.
- */
- close: function() {
- this.$.menuButton.close();
- },
-
- /**
- * A handler that is called when `iron-select` is fired.
- *
- * @param {CustomEvent} event An `iron-select` event.
- */
- _onIronSelect: function(event) {
- this._setSelectedItem(event.detail.item);
- },
-
- /**
- * A handler that is called when `iron-deselect` is fired.
- *
- * @param {CustomEvent} event An `iron-deselect` event.
- */
- _onIronDeselect: function(event) {
- this._setSelectedItem(null);
- },
-
- /**
- * A handler that is called when the dropdown is tapped.
- *
- * @param {CustomEvent} event A tap event.
- */
- _onTap: function(event) {
- if (Polymer.Gestures.findOriginalTarget(event) === this) {
- this.open();
- }
- },
-
- /**
- * Compute the label for the dropdown given a selected item.
- *
- * @param {Element} selectedItem A selected Element item, with an
- * optional `label` property.
- */
- _selectedItemChanged: function(selectedItem) {
- var value = '';
- if (!selectedItem) {
- value = '';
- } else {
- value = selectedItem.label || selectedItem.textContent.trim();
- }
-
- this._setValue(value);
- this._setSelectedItemLabel(value);
- },
-
- /**
- * Compute the vertical offset of the menu based on the value of
- * `noLabelFloat`.
- *
- * @param {boolean} noLabelFloat True if the label should not float
- * above the input, otherwise false.
- */
- _computeMenuVerticalOffset: function(noLabelFloat) {
- // NOTE(cdata): These numbers are somewhat magical because they are
- // derived from the metrics of elements internal to `paper-input`'s
- // template. The metrics will change depending on whether or not the
- // input has a floating label.
- return noLabelFloat ? -4 : 8;
- },
-
- /**
- * Returns false if the element is required and does not have a selection,
- * and true otherwise.
- * @param {*=} _value Ignored.
- * @return {boolean} true if `required` is false, or if `required` is true
- * and the element has a valid selection.
- */
- _getValidity: function(_value) {
- return this.disabled || !this.required || (this.required && !!this.value);
- },
-
- _openedChanged: function() {
- var openState = this.opened ? 'true' : 'false';
- var e = this.contentElement;
- if (e) {
- e.setAttribute('aria-expanded', openState);
- }
- }
- });
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-fab/README.md
deleted file mode 100644
index 3637258acf6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-paper-fab
-===================
-
-See the [component page](https://www.polymer-project.org/0.5/docs/elements/paper-fab.html) for more information.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-fab/bower.json
deleted file mode 100644
index ec35f259cee..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/bower.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "paper-fab",
- "private": true,
- "dependencies": {
- "polymer": "Polymer/polymer#^0.5",
- "core-icon": "Polymer/core-icon#^0.5",
- "core-icons": "Polymer/core-icons#^0.5",
- "paper-button": "Polymer/paper-button#^0.5",
- "paper-ripple": "Polymer/paper-ripple#^0.5",
- "paper-shadow": "Polymer/paper-shadow#^0.5"
- },
- "devDependencies": {
- "web-component-tester": "Polymer/web-component-tester#^1.1.4"
- },
- "version": "0.5.6"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/demo.html b/chromium/third_party/catapult/third_party/polymer/components/paper-fab/demo.html
deleted file mode 100644
index f6b9261366f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/demo.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!doctype html>
-<!--
-Copyright 2013 The Polymer Authors. All rights reserved.
-Use of this source code is governed by a BSD-style
-license that can be found in the LICENSE file.
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-fab</title>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
-
- <link href="../font-roboto/roboto.html" rel="import">
- <link href="../core-icons/core-icons.html" rel="import">
- <link href="paper-fab.html" rel="import">
-
- <style shim-shadowdom>
-
- body {
- font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
- font-size: 14px;
- margin: 0;
- padding: 24px;
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- -webkit-touch-callout: none;
- }
-
- section {
- padding: 20px 0;
- }
-
- section > div {
- padding: 14px;
- font-size: 16px;
- }
-
- paper-fab {
- color: #fff;
- margin-right:2em;
- }
-
- paper-fab.blue {
- background: #5677fc;
- }
-
- paper-fab.green {
- background: #259b24;
- }
-
- paper-fab.yellow {
- background: #ffeb3b;
- }
-
- </style>
-
-</head>
-<body unresolved>
-
- <section>
-
- <div>Regular</div>
-
- <paper-fab icon="arrow-forward" title="arrow-forward"></paper-fab>
- <paper-fab icon="create" class="blue" title="create"></paper-fab>
-
- </section>
-
- <section>
-
- <div>Mini</div>
-
- <paper-fab mini icon="done" class="green" title="done"></paper-fab>
- <paper-fab mini icon="reply" class="yellow" title="reply"></paper-fab>
-
- </section>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-fab/index.html
deleted file mode 100644
index 294215a738b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="../core-component-page/core-component-page.html">
-
-</head>
-<body unresolved>
-
- <core-component-page></core-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/metadata.html b/chromium/third_party/catapult/third_party/polymer/components/paper-fab/metadata.html
deleted file mode 100644
index bfb9d6eee94..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/metadata.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- @license
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<x-meta id="paper-fab" label="Floating Action Button" group="Paper">
-
- <template>
- <paper-fab icon="av:play-arrow"></paper-fab>
- </template>
-
- <template id="imports">
- <link rel="import" href="../core-icons/core-icons.html">
- <link rel="import" href="../core-icons/av-icons.html">
- <link rel="import" href="paper-fab.html">
- </template>
-
-</x-meta>
-
-<x-meta id="paper-fab-right-aligned" label="Floating Action Button Panel" group="Paper">
-
- <template>
- <div layout horizontal>
- <paper-fab icon="check"></paper-fab>
- </div>
- </template>
-
- <template id="imports">
- <link rel="import" href="../core-icons/core-icons.html">
- <link rel="import" href="paper-fab.html">
- </template>
-</x-meta>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/paper-fab.html b/chromium/third_party/catapult/third_party/polymer/components/paper-fab/paper-fab.html
deleted file mode 100644
index c71a5bb7f46..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-fab/paper-fab.html
+++ /dev/null
@@ -1,180 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<!--
-@group Paper Elements
-
-Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Button</a>
-
-`paper-fab` is a floating action button. It contains an image placed in the center and
-comes in two sizes: regular size and a smaller size by applying the attribute `mini`. When
-the user touches the button, a ripple effect emanates from the center of the button.
-
-You may import `core-icons` to use with this element, or provide an URL to a custom icon.
-See `core-iconset` for more information about how to use a custom icon set.
-
-Example:
-
- <link href="path/to/core-icons/core-icons.html" rel="import">
-
- <paper-fab icon="add"></paper-fab>
- <paper-fab mini icon="favorite"></paper-fab>
- <paper-fab src="star.png"></paper-fab>
-
-Styling
--------
-
-Style the button with CSS as you would a normal DOM element. If you are using the icons
-provided by `core-icons`, the icon will inherit the foreground color of the button.
-
- /* make a blue "cloud" button */
- <paper-fab icon="cloud" style="color: blue;"></paper-fab>
-
-By default, the ripple is the same color as the foreground at 25% opacity. You may
-customize the color using this selector:
-
- /* make #my-button use a blue ripple instead of foreground color */
- #my-button::shadow #ripple {
- color: blue;
- }
-
-The opacity of the ripple is not customizable via CSS.
-
-Accessibility
--------------
-
-The button is accessible by default if you use the `icon` property. By default, the
-`aria-label` attribute will be set to the `icon` property. If you use a custom icon,
-you should ensure that the `aria-label` attribute is set.
-
- <paper-fab src="star.png" aria-label="star"></paper-fab>
-
-@element paper-fab
-@extends paper-button-base
-@status unstable
--->
-
-<link href="../polymer/polymer.html" rel="import">
-<link href="../core-icon/core-icon.html" rel="import">
-<link href="../paper-button/paper-button-base.html" rel="import">
-<link href="../paper-ripple/paper-ripple.html" rel="import">
-<link href="../paper-shadow/paper-shadow.html" rel="import">
-
-<polymer-element name="paper-fab" extends="paper-button-base" attributes="src icon mini" role="button">
-
- <template>
-
- <style>
- :host {
- display: inline-block;
- position: relative;
- outline: none;
- -webkit-user-select: none;
- user-select: none;
- cursor: pointer;
- z-index: 0;
-
- box-sizing: border-box;
- width: 56px;
- height: 56px;
- background: #d23f31;
- color: #fff;
- border-radius: 50%;
- padding: 16px;
- }
-
- :host([mini]) {
- width: 40px;
- height: 40px;
- padding: 8px;
- }
-
- :host([disabled]) {
- color: #c9c9c9;
- pointer-events: none;
- cursor: auto;
- }
-
- #ripple {
- pointer-events: none;
- z-index: -1;
- }
-
- #shadow {
- border-radius: inherit;
- pointer-events: none;
- }
-
- #icon {
- display: block;
- pointer-events: none;
- }
- </style>
-
- <template if="{{raised}}">
- <paper-shadow id="shadow" fit animated></paper-shadow>
- </template>
-
- <!-- to position to ripple behind the icon -->
- <core-icon relative id="icon" src="{{src}}" icon="{{icon}}"></core-icon>
-
- </template>
-
- <script>
- Polymer({
-
- publish: {
-
- /**
- * The URL of an image for the icon. If the src property is specified,
- * the icon property should not be.
- *
- * @attribute src
- * @type string
- * @default ''
- */
- src: '',
-
- /**
- * Specifies the icon name or index in the set of icons available in
- * the icon's icon set. If the icon property is specified,
- * the src property should not be.
- *
- * @attribute icon
- * @type string
- * @default ''
- */
- icon: '',
-
- /**
- * Set this to true to style this is a "mini" FAB.
- *
- * @attribute mini
- * @type boolean
- * @default false
- */
- mini: false,
-
- raised: true,
- recenteringTouch: true,
- fill: false
-
- },
-
- iconChanged: function(oldIcon) {
- var label = this.getAttribute('aria-label');
- if (!label || label === oldIcon) {
- this.setAttribute('aria-label', this.icon);
- }
- }
-
- });
-
- </script>
-</polymer-element>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.bower.json
deleted file mode 100644
index abf5a6ac5ee..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.bower.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "paper-icon-button",
- "private": true,
- "version": "1.1.2",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "A material design icon button",
- "main": [
- "paper-icon-button.html",
- "paper-icon-button-light.html"
- ],
- "author": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "button",
- "icon",
- "control"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-icon-button.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/paper-icon-button",
- "_release": "1.1.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.2",
- "commit": "0a6c65f73765d6f6ae6cfe90ddc9905a2cf45f20"
- },
- "_source": "git://github.com/PolymerElements/paper-icon-button.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-icon-button"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.travis.yml
deleted file mode 100644
index 82fb60bde23..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: A+iEL5FUMQWkkaOduE26bo0jW49LYKxDwWGZOty9H9fCDpBNQSADOhIvLzScGtjE7Rr3jVmowVsDN0XfVSRpJneEIvj7+tHAXUFoVey8vDVklOmhlR25IH2OczEmCkOS+sAKRiSF54aptdPeJhmpbMH0FyZfuX+jJfhdonJ+YQg=
- - secure: Ps1Hy0fzmYRYF/ur2Myg7ol43HpzpooCoDvqzpMbIBWkXjXcN0KlPoNc6lEFlhjSpjddMFavdajKYIO0j9adAjZA7HYlf+BglhxV45lz13o04+QlNbDSADNyAlKJLrIvFacn9DE3VXlvBwBu83m+ndHUN/uMyHyZo0VE1/ad9Iw=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/README.md
deleted file mode 100644
index b48be667741..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-icon-button-light.html paper-icon-button.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-icon-button.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-icon-button)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-icon-button)_
-
-
-##&lt;paper-icon-button&gt;
-
-Material design: [Icon toggles](https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons)
-
-`paper-icon-button` is a button with an image placed at the center. When the user touches
-the button, a ripple effect emanates from the center of the button.
-
-`paper-icon-button` includes a default icon set. Use `icon` to specify which icon
-from the icon set to use.
-
-```html
-<paper-icon-button icon="menu"></paper-icon-button>
-```
-
-See [`iron-iconset`](iron-iconset) for more information about
-how to use a custom icon set.
-
-Example:
-
-```html
-<link href="path/to/iron-icons/iron-icons.html" rel="import">
-
-<paper-icon-button icon="favorite"></paper-icon-button>
-<paper-icon-button src="star.png"></paper-icon-button>
-```
-
-To use `paper-icon-button` as a link, wrap it in an anchor tag. Since `paper-icon-button`
-will already receive focus, you may want to prevent the anchor tag from receiving focus
-as well by setting its tabindex to -1.
-
-```html
-<a href="https://www.polymer-project.org" tabindex="-1">
- <paper-icon-button icon="polymer"></paper-icon-button>
-</a>
-```
-
-### Styling
-
-Style the button with CSS as you would a normal DOM element. If you are using the icons
-provided by `iron-icons`, they will inherit the foreground color of the button.
-
-```html
-/* make a red "favorite" button */
-<paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
-```
-
-By default, the ripple is the same color as the foreground at 25% opacity. You may
-customize the color using the `--paper-icon-button-ink-color` custom property.
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-icon-button-disabled-text` | The color of the disabled button | `--disabled-text-color` |
-| `--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-color` |
-| `--paper-icon-button` | Mixin for a button | `{}` |
-| `--paper-icon-button-disabled` | Mixin for a disabled button | `{}` |
-| `--paper-icon-button-hover` | Mixin for button on hover | `{}` |
-
-
-
-<!-- No docs for <paper-icon-button-light> found. -->
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/bower.json
deleted file mode 100644
index ab58e4c2beb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/bower.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "paper-icon-button",
- "private": true,
- "version": "1.1.2",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "A material design icon button",
- "main": [
- "paper-icon-button.html",
- "paper-icon-button-light.html"
- ],
- "author": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "button",
- "icon",
- "control"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-icon-button.git"
- },
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/index.html
deleted file mode 100644
index 98d496f82bc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/index.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>paper-icon-button demo</title>
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../paper-icon-button.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- paper-icon-button {
- margin-left: 10px;
- margin-right: 10px;
- }
- </style>
- </head>
- <body unresolved>
- <div class="vertical-section-container centered">
- <h3>Buttons can use iron-icons or external images, and can be disabled</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-icon-button icon="favorite" title="heart"></paper-icon-button>
- <paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button>
- <paper-icon-button disabled icon="reply" title="reply"></paper-icon-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-icon-button noink icon="find-in-page" title="find"></paper-icon-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can be styled using regular CSS and custom properties</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- paper-icon-button.pink {
- color: var(--paper-pink-500);
- --paper-icon-button-ink-color: var(--paper-indigo-500);
- }
- paper-icon-button.pink:hover {
- background-color: var(--paper-pink-500);
- color: white;
- }
- paper-icon-button.blue {
- --paper-icon-button-ink-color: var(--paper-orange-500);
- background-color: var(--paper-light-blue-500);
- color: white;
- border-radius: 3px;
- padding: 2px;
- }
- </style>
- <paper-icon-button icon="favorite" title="heart" class="pink"></paper-icon-button>
- <paper-icon-button icon="flight-takeoff" title="take off" class="blue"></paper-icon-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can be resized</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- paper-icon-button.giant {
- width: 100px;
- height: 100px;
- }
- </style>
- <paper-icon-button icon="alarm-on" title="wake up" class="giant"></paper-icon-button>
- </template>
- </demo-snippet>
-
- <h3>Buttons can be used as a link</h3>
- <demo-snippet class="centered-demo">
- <template>
- <a href="https://www.polymer-project.org" tabindex="-1">
- <paper-icon-button icon="polymer"></paper-icon-button>
- </a>
- <style>
- a paper-icon-button,
- a:active paper-icon-button,
- a:visited paper-icon-button {
- color: #000000;
- }
- </style>
- </template>
- </demo-snippet>
- </div>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/paper-icon-button-light.html b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/paper-icon-button-light.html
deleted file mode 100644
index 6bae8e372a6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/demo/paper-icon-button-light.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <title>paper-icon-button-light demo</title>
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../paper-icon-button-light.html">
-
- <style is="custom-style" include="demo-pages-shared-styles"></style>
- </head>
- <body unresolved>
- <div class="vertical-section-container centered">
- <h3>paper-icon-button-light can contain iron-icons or external images and can be disabled</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- button[is=paper-icon-button-light] {
- width: 40px;
- height: 40px;
- padding: 8px;
- margin: 10px;
- }
-
- button[is=paper-icon-button-light] > img {
- width: 24px;
- height: 24px;
- }
- </style>
-
- <button is="paper-icon-button-light" title="heart">
- <iron-icon icon="favorite"></iron-icon>
- </button>
- <button is="paper-icon-button-light" title="octocat">
- <img src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat">
- </button>
- <button is="paper-icon-button-light" title="reply" disabled>
- <iron-icon icon="reply"></iron-icon>
- </button>
- </template>
- </demo-snippet>
- </div>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/index.html
deleted file mode 100644
index 78f963c7e89..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button-light.html b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button-light.html
deleted file mode 100644
index c1c6c4e3c5b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button-light.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!--
-@license
-Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../paper-behaviors/paper-ripple-behavior.html">
-
-<!--
-@group Paper Elements
-@element paper-icon-button-light
-@demo demo/paper-icon-button-light.html
--->
-<dom-module id="paper-icon-button-light">
- <template strip-whitespace>
- <style>
- :host {
- vertical-align: middle;
- color: inherit;
- outline: none;
- width: 24px;
- height: 24px;
- background: none;
- margin: 0;
- border: none;
- padding: 0;
-
- position: relative;
- cursor: pointer;
-
- /* NOTE: Both values are needed, since some phones require the value to be `transparent`. */
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- -webkit-tap-highlight-color: transparent;
- }
-
- :host([disabled]) {
- color: #9b9b9b;
- pointer-events: none;
- cursor: auto;
- }
-
- paper-ripple {
- opacity: 0.6;
- color: currentColor;
- }
- </style>
- <content></content>
- </template>
- <script>
- Polymer({
- is: 'paper-icon-button-light',
- extends: 'button',
-
- behaviors: [
- Polymer.PaperRippleBehavior
- ],
-
- listeners: {
- 'down': '_rippleDown',
- 'up': '_rippleUp',
- 'focus': '_rippleDown',
- 'blur': '_rippleUp',
- },
-
- _rippleDown: function() {
- this.getRipple().downAction();
- },
-
- _rippleUp: function() {
- this.getRipple().upAction();
- },
-
- /**
- * @param {...*} var_args
- */
- ensureRipple: function(var_args) {
- var lastRipple = this._ripple;
- Polymer.PaperRippleBehavior.ensureRipple.apply(this, arguments);
- if (this._ripple && this._ripple !== lastRipple) {
- this._ripple.center = true;
- this._ripple.classList.add('circle');
- }
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button.html b/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button.html
deleted file mode 100644
index b69330fbb07..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-icon-button/paper-icon-button.html
+++ /dev/null
@@ -1,176 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-icon/iron-icon.html">
-<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<!--
-Material design: [Icon toggles](https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons)
-
-`paper-icon-button` is a button with an image placed at the center. When the user touches
-the button, a ripple effect emanates from the center of the button.
-
-`paper-icon-button` includes a default icon set. Use `icon` to specify which icon
-from the icon set to use.
-
- <paper-icon-button icon="menu"></paper-icon-button>
-
-See [`iron-iconset`](iron-iconset) for more information about
-how to use a custom icon set.
-
-Example:
-
- <link href="path/to/iron-icons/iron-icons.html" rel="import">
-
- <paper-icon-button icon="favorite"></paper-icon-button>
- <paper-icon-button src="star.png"></paper-icon-button>
-
-To use `paper-icon-button` as a link, wrap it in an anchor tag. Since `paper-icon-button`
-will already receive focus, you may want to prevent the anchor tag from receiving focus
-as well by setting its tabindex to -1.
-
- <a href="https://www.polymer-project.org" tabindex="-1">
- <paper-icon-button icon="polymer"></paper-icon-button>
- </a>
-
-### Styling
-
-Style the button with CSS as you would a normal DOM element. If you are using the icons
-provided by `iron-icons`, they will inherit the foreground color of the button.
-
- /* make a red "favorite" button */
- <paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
-
-By default, the ripple is the same color as the foreground at 25% opacity. You may
-customize the color using the `--paper-icon-button-ink-color` custom property.
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-icon-button-disabled-text` | The color of the disabled button | `--disabled-text-color`
-`--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-color`
-`--paper-icon-button` | Mixin for a button | `{}`
-`--paper-icon-button-disabled` | Mixin for a disabled button | `{}`
-`--paper-icon-button-hover` | Mixin for button on hover | `{}`
-
-@group Paper Elements
-@element paper-icon-button
-@demo demo/index.html
--->
-
-<dom-module id="paper-icon-button">
- <template strip-whitespace>
- <style>
- :host {
- display: inline-block;
- position: relative;
- padding: 8px;
- outline: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- cursor: pointer;
- z-index: 0;
- line-height: 1;
-
- width: 40px;
- height: 40px;
-
- /* NOTE: Both values are needed, since some phones require the value to be `transparent`. */
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- -webkit-tap-highlight-color: transparent;
-
- /* Because of polymer/2558, this style has lower specificity than * */
- box-sizing: border-box !important;
-
- @apply(--paper-icon-button);
- }
-
- :host #ink {
- color: var(--paper-icon-button-ink-color, --primary-text-color);
- opacity: 0.6;
- }
-
- :host([disabled]) {
- color: var(--paper-icon-button-disabled-text, --disabled-text-color);
- pointer-events: none;
- cursor: auto;
-
- @apply(--paper-icon-button-disabled);
- }
-
- :host(:hover) {
- @apply(--paper-icon-button-hover);
- }
-
- iron-icon {
- --iron-icon-width: 100%;
- --iron-icon-height: 100%;
- }
- </style>
-
- <iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
- </template>
-
- <script>
- Polymer({
- is: 'paper-icon-button',
-
- hostAttributes: {
- role: 'button',
- tabindex: '0'
- },
-
- behaviors: [
- Polymer.PaperInkyFocusBehavior
- ],
-
- properties: {
- /**
- * The URL of an image for the icon. If the src property is specified,
- * the icon property should not be.
- */
- src: {
- type: String
- },
-
- /**
- * Specifies the icon name or index in the set of icons available in
- * the icon's icon set. If the icon property is specified,
- * the src property should not be.
- */
- icon: {
- type: String
- },
-
- /**
- * Specifies the alternate text for the button, for accessibility.
- */
- alt: {
- type: String,
- observer: "_altChanged"
- }
- },
-
- _altChanged: function(newValue, oldValue) {
- var label = this.getAttribute('aria-label');
-
- // Don't stomp over a user-set aria-label.
- if (!label || oldValue == label) {
- this.setAttribute('aria-label', newValue);
- }
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-input/.bower.json
deleted file mode 100644
index 4e060b99175..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/.bower.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "paper-input",
- "version": "1.1.14",
- "description": "Material design text fields",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input"
- ],
- "main": [
- "paper-input.html",
- "paper-textarea.html",
- "paper-input-behavior.html",
- "paper-input-container.html",
- "paper-input-error.html",
- "paper-input-addon-behavior.html",
- "paper-input-char-counter.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-input.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-input",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.2.0",
- "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
- "iron-input": "PolymerElements/iron-input#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.1.4",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.1.14",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.14",
- "commit": "6f43713e93e1f3f21593b7f231f53bc19289fc42"
- },
- "_source": "git://github.com/PolymerElements/paper-input.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-input"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-input/.travis.yml
deleted file mode 100644
index 2212dafd547..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: TcDqx+YdNCa/DRQjdKt9dgYCPgXtPl2EZ7Nnv6bRvbcmUjW2eSr7Zwb+e0fO8wgwms/RqFaVx+u5jo7D1lnC4Ybcg1HKiMOvCyzY36MjF9oB/VKSEUC+p4tMVQfw1IZ/RmK3dD+WEWaoT/EKmNfctz7v5kR+yk2lZo44D9I7rrc=
- - secure: nh65tvhnhOrK05qKvDJKMV7Jm9yiCoG1wFkP3ZnqOHix9Ny+KmcTa41Bl6NXQdvYaMTFtzS7lMZX5cqIziyKyGWHVN30LzGMHJNz12fhcMi3nJ84trhQGcu/9qR9yDv16q9ouGlcz1VxnDOHaRAHnIKjLIbhN3aJtMtZBbnWihA=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-input/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-input/README.md
deleted file mode 100644
index 0561f76ec68..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/README.md
+++ /dev/null
@@ -1,254 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-input-addon-behavior.html paper-input-behavior.html paper-input-char-counter.html paper-input-container.html paper-input-error.html paper-input.html paper-textarea.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-input.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-input)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-input)_
-
-
-##&lt;paper-input&gt;
-
-Material design: [Text fields](https://www.google.com/design/spec/components/text-fields.html)
-
-`<paper-input>` is a single-line text field with Material Design styling.
-
-```html
-<paper-input label="Input label"></paper-input>
-```
-
-It may include an optional error message or character counter.
-
-```html
-<paper-input error-message="Invalid input!" label="Input label"></paper-input>
-<paper-input char-counter label="Input label"></paper-input>
-```
-
-It can also include custom prefix or suffix elements, which are displayed
-before or after the text input itself. In order for an element to be
-considered as a prefix, it must have the `prefix` attribute (and similarly
-for `suffix`).
-
-```html
-<paper-input label="total">
- <div prefix>$</div>
- <paper-icon-button suffix icon="clear"></paper-icon-button>
-</paper-input>
-```
-
-A `paper-input` can use the native `type=search` or `type=file` features.
-However, since we can't control the native styling of the input (search icon,
-file button, date placeholder, etc.), in these cases the label will be
-automatically floated. The `placeholder` attribute can still be used for
-additional informational text.
-
-```html
-<paper-input label="search!" type="search"
- placeholder="search for cats" autosave="test" results="5">
-</paper-input>
-```
-
-See `Polymer.PaperInputBehavior` for more API docs.
-
-### Focus
-
-To focus a paper-input, you can call the native `focus()` method as long as the
-paper input has a tab index.
-
-### Styling
-
-See `Polymer.PaperInputContainer` for a list of custom properties used to
-style this element.
-
-
-
-##&lt;paper-input-char-counter&gt;
-
-`<paper-input-char-counter>` is a character counter for use with `<paper-input-container>`. It
-shows the number of characters entered in the input and the max length if it is specified.
-
-```html
-<paper-input-container>
- <input is="iron-input" maxlength="20">
- <paper-input-char-counter></paper-input-char-counter>
-</paper-input-container>
-```
-
-### Styling
-
-The following mixin is available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-input-char-counter` | Mixin applied to the element | `{}` |
-
-
-
-##&lt;paper-input-container&gt;
-
-`<paper-input-container>` is a container for a `<label>`, an `<input is="iron-input">` or
-`<iron-autogrow-textarea>` and optional add-on elements such as an error message or character
-counter, used to implement Material Design text fields.
-
-For example:
-
-```html
-<paper-input-container>
- <label>Your name</label>
- <input is="iron-input">
-</paper-input-container>
-```
-
-Do not wrap `<paper-input-container>` around elements that already include it, such as `<paper-input>`.
-Doing so may cause events to bounce infintely between the container and its contained element.
-
-### Listening for input changes
-
-By default, it listens for changes on the `bind-value` attribute on its children nodes and perform
-tasks such as auto-validating and label styling when the `bind-value` changes. You can configure
-the attribute it listens to with the `attr-for-value` attribute.
-
-### Using a custom input element
-
-You can use a custom input element in a `<paper-input-container>`, for example to implement a
-compound input field like a social security number input. The custom input element should have the
-`paper-input-input` class, have a `notify:true` value property and optionally implements
-`Polymer.IronValidatableBehavior` if it is validatable.
-
-```html
-<paper-input-container attr-for-value="ssn-value">
- <label>Social security number</label>
- <ssn-input class="paper-input-input"></ssn-input>
-</paper-input-container>
-```
-
-If you're using a `<paper-input-container>` imperatively, it's important to make sure
-that you attach its children (the `iron-input` and the optional `label`) before you
-attach the `<paper-input-container>` itself, so that it can be set up correctly.
-
-### Validation
-
-If the `auto-validate` attribute is set, the input container will validate the input and update
-the container styling when the input value changes.
-
-### Add-ons
-
-Add-ons are child elements of a `<paper-input-container>` with the `add-on` attribute and
-implements the `Polymer.PaperInputAddonBehavior` behavior. They are notified when the input value
-or validity changes, and may implement functionality such as error messages or character counters.
-They appear at the bottom of the input.
-
-### Prefixes and suffixes
-
-These are child elements of a `<paper-input-container>` with the `prefix`
-or `suffix` attribute, and are displayed inline with the input, before or after.
-
-```html
-<paper-input-container>
- <div prefix>$</div>
- <label>Total</label>
- <input is="iron-input">
- <paper-icon-button suffix icon="clear"></paper-icon-button>
-</paper-input-container>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color` |
-| `--paper-input-container-focus-color` | Label and underline color when the input is focused | `--primary-color` |
-| `--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--error-color` |
-| `--paper-input-container-input-color` | Input foreground color | `--primary-text-color` |
-| `--paper-input-container` | Mixin applied to the container | `{}` |
-| `--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}` |
-| `--paper-input-container-label` | Mixin applied to the label | `{}` |
-| `--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}` |
-| `--paper-input-container-label-floating` | Mixin applied to the label when floating | `{}` |
-| `--paper-input-container-input` | Mixin applied to the input | `{}` |
-| `--paper-input-container-underline` | Mixin applied to the underline | `{}` |
-| `--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focused | `{}` |
-| `--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}` |
-| `--paper-input-prefix` | Mixin applied to the input prefix | `{}` |
-| `--paper-input-suffix` | Mixin applied to the input suffix | `{}` |
-
-This element is `display:block` by default, but you can set the `inline` attribute to make it
-`display:inline-block`.
-
-
-
-##&lt;paper-input-error&gt;
-
-`<paper-input-error>` is an error message for use with `<paper-input-container>`. The error is
-displayed when the `<paper-input-container>` is `invalid`.
-
-```html
-<paper-input-container>
- <input is="iron-input" pattern="[0-9]*">
- <paper-input-error>Only numbers are allowed!</paper-input-error>
-</paper-input-container>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-input-container-invalid-color` | The foreground color of the error | `--error-color` |
-| `--paper-input-error` | Mixin applied to the error | `{}` |
-
-
-
-##&lt;paper-textarea&gt;
-
-`<paper-textarea>` is a multi-line text field with Material Design styling.
-
-```html
-<paper-textarea label="Textarea label"></paper-textarea>
-```
-
-See `Polymer.PaperInputBehavior` for more API docs.
-
-### Validation
-
-Currently only `required` and `maxlength` validation is supported.
-
-### Styling
-
-See `Polymer.PaperInputContainer` for a list of custom properties used to
-style this element.
-
-
-
-##Polymer.PaperInputAddonBehavior
-
-Use `Polymer.PaperInputAddonBehavior` to implement an add-on for `<paper-input-container>`. A
-add-on appears below the input, and may display information based on the input value and
-validity such as a character counter or an error message.
-
-
-
-##Polymer.PaperInputBehavior
-
-Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-container>`. This
-behavior is implemented by `<paper-input>`. It exposes a number of properties from
-`<paper-input-container>` and `<input is="iron-input">` and they should be bound in your
-template.
-
-The input element can be accessed by the `inputElement` property if you need to access
-properties or methods that are not exposed.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/all-imports.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/all-imports.html
deleted file mode 100644
index 0f457718644..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/all-imports.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="paper-input.html">
-<link rel="import" href="paper-textarea.html">
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-input/bower.json
deleted file mode 100644
index 15be02fc355..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/bower.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "paper-input",
- "version": "1.1.14",
- "description": "Material design text fields",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input"
- ],
- "main": [
- "paper-input.html",
- "paper-textarea.html",
- "paper-input-behavior.html",
- "paper-input-container.html",
- "paper-input-error.html",
- "paper-input-addon-behavior.html",
- "paper-input-char-counter.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-input.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-input",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.2.0",
- "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
- "iron-input": "PolymerElements/iron-input#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.1.4",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/index.html
deleted file mode 100644
index f84799de75d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/index.html
+++ /dev/null
@@ -1,155 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-input demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-icon/iron-icon.html">
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../iron-input/iron-input.html">
- <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../paper-input-container.html">
- <link rel="import" href="../paper-input-error.html">
- <link rel="import" href="../paper-input.html">
- <link rel="import" href="../paper-textarea.html">
- <link rel="import" href="ssn-input.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- paper-input {
- display: block;
- }
-
- demo-snippet.horizontal {
- --demo-snippet-demo: {
- @apply(--layout-horizontal);
- @apply(--layout-justified);
- @apply(--layout-wrap);
- }
- }
- demo-snippet.horizontal paper-input {
- display: inline-block;
- }
-
- button {
- width: 70px;
- }
-
- #inputForValidation {
- display: inline-block;
- width: calc(100% - 75px);
- }
-
- .vertical-section-container {
- max-width: 600px;
- }
-
- paper-icon-button {
- color: var(--paper-red-300);
- --paper-icon-button-ink-color: var(--paper-red-a100);
- width: 23px; /* 15px + 2*4px for padding */
- height: 23px;
- padding: 0px 4px;
- }
-
- iron-icon {
- padding-right: 5px;
- }
- </style>
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h3>Inputs can have different types, and be disabled</h3>
- <demo-snippet>
- <template>
- <paper-input label="text input"></paper-input>
- <paper-textarea label="autoresizing textarea input"></paper-textarea>
- <paper-input label="password input" type="password"></paper-input>
- <paper-input label="disabled input" disabled></paper-input>
- </template>
- </demo-snippet>
-
- <h3>Inputs can have character counters</h3>
- <demo-snippet>
- <template>
- <paper-input label="simple character counter" char-counter></paper-input>
- <paper-input label="input with at most 10 characters" char-counter maxlength="10"></paper-input>
- </template>
- </demo-snippet>
-
- <h3>The label can have different floating states</h3>
- <demo-snippet>
- <template>
- <paper-input label="this label floats after typing"></paper-input>
- <paper-input label="this label is always floating" always-float-label></paper-input>
- <paper-input label="this label never floats" no-label-float></paper-input>
- <paper-input label="this label is always floating" always-float-label placeholder="placeholder text"></paper-input>
- </template>
- </demo-snippet>
-
- <h3>Inputs can validate automatically or on demand, and can have custom error messages</h3>
- <demo-snippet>
- <template>
- <paper-input label="this input requires some text" required auto-validate error-message="needs some text!"></paper-input>
- <paper-input label="this input requires letters only" auto-validate pattern="[a-zA-Z]*" error-message="letters only!"></paper-input>
- <paper-input label="this input will only let you type letters" auto-validate allowed-pattern="[a-zA-Z]"></paper-input>
- <paper-input id="inputForValidation" required label="this input is manually validated" pattern="[a-zA-Z]*" error-message="letters only!"></paper-input>
- <button onclick="validate()">Validate!</button>
- </template>
- </demo-snippet>
-
- <h3>Inputs can have prefixes and suffixes</h3>
- <demo-snippet class="horizontal">
- <template>
- <paper-input label="total" type="number">
- <div prefix>$</div>
- </paper-input>
- <paper-input label="username" id="inputWithButton">
- <iron-icon icon="mail" prefix></iron-icon>
- <div suffix>@email.com</div>
- <paper-icon-button suffix onclick="clearInput()"
- icon="clear" alt="clear" title="clear">
- </paper-icon-button>
- </paper-input>
- </template>
- </demo-snippet>
-
- <h3>Inputs can have custom logic</h3>
- <demo-snippet>
- <template>
- <paper-input-container always-float-label auto-validate attr-for-value="value">
- <label>Social Security Number</label>
- <ssn-input class="paper-input-input"></ssn-input>
- <paper-input-error>SSN invalid!</paper-input-error>
- </paper-input-container>
- </template>
- </demo-snippet>
- </div>
-
- <script>
- function validate() {
- document.getElementById('inputForValidation').validate();
- }
-
- function clearInput() {
- document.getElementById('inputWithButton').value = '';
- }
- </script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-input.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-input.html
deleted file mode 100644
index c7ab51dd61c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-input.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../iron-input/iron-input.html">
-<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="ssn-validator.html">
-
-<dom-module id="ssn-input">
- <template>
-
- <style>
- :host {
- display: inline-block;
- }
-
- :host([hidden]) {
- display: none !important;
- }
-
- input[is="iron-input"] {
- font: inherit;
- outline: none;
- box-shadow: none;
- border: none;
- width: auto;
- text-align: center;
- }
-
- .container {
- @apply(--layout-horizontal);
- }
- </style>
-
- <ssn-validator></ssn-validator>
-
- <div class="container">
-
- <input is="iron-input" maxlength="3" bind-value="{{_ssn1}}" size="3" aria-label="First 3 digits of social security number">
- -
- <input is="iron-input" maxlength="2" bind-value="{{_ssn2}}" size="2" aria-label="Middle 2 digits of social security number">
- -
- <input is="iron-input" maxlength="4" bind-value="{{_ssn3}}" size="4" aria-label="Last 4 digits of social security number">
-
- </div>
-
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'ssn-input',
-
- behaviors: [
- Polymer.IronValidatableBehavior
- ],
-
- properties: {
- value: {
- notify: true,
- type: String
- },
-
- _ssn1: {
- type: String
- },
-
- _ssn2: {
- type: String
- },
-
- _ssn3: {
- type: String
- },
-
- validator: {
- type: String,
- value: 'ssn-validator'
- }
- },
-
- observers: [
- '_computeValue(_ssn1,_ssn2,_ssn3)'
- ],
-
- _computeValue: function(ssn1, ssn2, ssn3) {
- this.value = ssn1.trim() + '-' + ssn2.trim() + '-' + ssn3.trim();
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-validator.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-validator.html
deleted file mode 100644
index e45365b51b2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/demo/ssn-validator.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../iron-validator-behavior/iron-validator-behavior.html">
-
-<script>
- Polymer({
- is: 'ssn-validator',
-
- behaviors: [
- Polymer.IronValidatorBehavior
- ],
-
- validate: function(value) {
- // this regex validates incomplete ssn's (by design)
- return !value || value.match(/^[0-9]{0,3}-[0-9]{0,2}-[0-9]{0,4}$/);
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-input/hero.svg
deleted file mode 100755
index 146ffeac67c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/hero.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <rect x="49" y="53" width="2" height="18"/>
- <path d="M188,78H37V44h151V78z M39,76h147V46H39V76z"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/index.html
deleted file mode 100644
index e6c9fadcee5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>paper-input</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page src="all-imports.html"></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-addon-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-addon-behavior.html
deleted file mode 100644
index 41081c71361..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-addon-behavior.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-
- /**
- * Use `Polymer.PaperInputAddonBehavior` to implement an add-on for `<paper-input-container>`. A
- * add-on appears below the input, and may display information based on the input value and
- * validity such as a character counter or an error message.
- * @polymerBehavior
- */
- Polymer.PaperInputAddonBehavior = {
-
- hostAttributes: {
- 'add-on': ''
- },
-
- attached: function() {
- this.fire('addon-attached');
- },
-
- /**
- * The function called by `<paper-input-container>` when the input value or validity changes.
- * @param {{
- * inputElement: (Element|undefined),
- * value: (string|undefined),
- * invalid: boolean
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {
- }
-
- };
-
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-behavior.html
deleted file mode 100644
index 9bb10019aac..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-behavior.html
+++ /dev/null
@@ -1,541 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-
-<script>
-
- // Generate unique, monotonically increasing IDs for labels (needed by
- // aria-labelledby) and add-ons.
- Polymer.PaperInputHelper = {};
- Polymer.PaperInputHelper.NextLabelID = 1;
- Polymer.PaperInputHelper.NextAddonID = 1;
-
- /**
- * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-container>`. This
- * behavior is implemented by `<paper-input>`. It exposes a number of properties from
- * `<paper-input-container>` and `<input is="iron-input">` and they should be bound in your
- * template.
- *
- * The input element can be accessed by the `inputElement` property if you need to access
- * properties or methods that are not exposed.
- * @polymerBehavior Polymer.PaperInputBehavior
- */
- Polymer.PaperInputBehaviorImpl = {
-
- properties: {
- /**
- * Fired when the input changes due to user interaction.
- *
- * @event change
- */
-
- /**
- * The label for this input. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * `<label>`'s content and `hidden` property, e.g.
- * `<label hidden$="[[!label]]">[[label]]</label>` in your `template`
- */
- label: {
- type: String
- },
-
- /**
- * The value for this input. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<input is="iron-input">`'s `bindValue`
- * property, or the value property of your input that is `notify:true`.
- */
- value: {
- notify: true,
- type: String
- },
-
- /**
- * Set to true to disable this input. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * both the `<paper-input-container>`'s and the input's `disabled` property.
- */
- disabled: {
- type: Boolean,
- value: false
- },
-
- /**
- * Returns true if the value is invalid. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to both the
- * `<paper-input-container>`'s and the input's `invalid` property.
- *
- * If `autoValidate` is true, the `invalid` attribute is managed automatically,
- * which can clobber attempts to manage it manually.
- */
- invalid: {
- type: Boolean,
- value: false,
- notify: true
- },
-
- /**
- * Set to true to prevent the user from entering invalid input. If you're
- * using PaperInputBehavior to implement your own paper-input-like element,
- * bind this to `<input is="iron-input">`'s `preventInvalidInput` property.
- */
- preventInvalidInput: {
- type: Boolean
- },
-
- /**
- * Set this to specify the pattern allowed by `preventInvalidInput`. If
- * you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `allowedPattern`
- * property.
- */
- allowedPattern: {
- type: String
- },
-
- /**
- * The type of the input. The supported types are `text`, `number` and `password`.
- * If you're using PaperInputBehavior to implement your own paper-input-like element,
- * bind this to the `<input is="iron-input">`'s `type` property.
- */
- type: {
- type: String
- },
-
- /**
- * The datalist of the input (if any). This should match the id of an existing `<datalist>`.
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `list` property.
- */
- list: {
- type: String
- },
-
- /**
- * A pattern to validate the `input` with. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<input is="iron-input">`'s `pattern` property.
- */
- pattern: {
- type: String
- },
-
- /**
- * Set to true to mark the input as required. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<input is="iron-input">`'s `required` property.
- */
- required: {
- type: Boolean,
- value: false
- },
-
- /**
- * The error message to display when the input is invalid. If you're using
- * PaperInputBehavior to implement your own paper-input-like element,
- * bind this to the `<paper-input-error>`'s content, if using.
- */
- errorMessage: {
- type: String
- },
-
- /**
- * Set to true to show a character counter.
- */
- charCounter: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to disable the floating label. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<paper-input-container>`'s `noLabelFloat` property.
- */
- noLabelFloat: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to always float the label. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<paper-input-container>`'s `alwaysFloatLabel` property.
- */
- alwaysFloatLabel: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to auto-validate the input value. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<paper-input-container>`'s `autoValidate` property.
- */
- autoValidate: {
- type: Boolean,
- value: false
- },
-
- /**
- * Name of the validator to use. If you're using PaperInputBehavior to
- * implement your own paper-input-like element, bind this to
- * the `<input is="iron-input">`'s `validator` property.
- */
- validator: {
- type: String
- },
-
- // HTMLInputElement attributes for binding if needed
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `autocomplete` property.
- */
- autocomplete: {
- type: String,
- value: 'off'
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `autofocus` property.
- */
- autofocus: {
- type: Boolean
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `inputmode` property.
- */
- inputmode: {
- type: String
- },
-
- /**
- * The minimum length of the input value.
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `minlength` property.
- */
- minlength: {
- type: Number
- },
-
- /**
- * The maximum length of the input value.
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `maxlength` property.
- */
- maxlength: {
- type: Number
- },
-
- /**
- * The minimum (numeric or date-time) input value.
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `min` property.
- */
- min: {
- type: String
- },
-
- /**
- * The maximum (numeric or date-time) input value.
- * Can be a String (e.g. `"2000-1-1"`) or a Number (e.g. `2`).
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `max` property.
- */
- max: {
- type: String
- },
-
- /**
- * Limits the numeric or date-time increments.
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `step` property.
- */
- step: {
- type: String
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `name` property.
- */
- name: {
- type: String
- },
-
- /**
- * A placeholder string in addition to the label. If this is set, the label will always float.
- */
- placeholder: {
- type: String,
- // need to set a default so _computeAlwaysFloatLabel is run
- value: ''
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `readonly` property.
- */
- readonly: {
- type: Boolean,
- value: false
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `size` property.
- */
- size: {
- type: Number
- },
-
- // Nonstandard attributes for binding if needed
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `autocapitalize` property.
- */
- autocapitalize: {
- type: String,
- value: 'none'
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `autocorrect` property.
- */
- autocorrect: {
- type: String,
- value: 'off'
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `autosave` property,
- * used with type=search.
- */
- autosave: {
- type: String
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `results` property,
- * used with type=search.
- */
- results: {
- type: Number
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the `<input is="iron-input">`'s `accept` property,
- * used with type=file.
- */
- accept: {
- type: String
- },
-
- /**
- * If you're using PaperInputBehavior to implement your own paper-input-like
- * element, bind this to the`<input is="iron-input">`'s `multiple` property,
- * used with type=file.
- */
- multiple: {
- type: Boolean
- },
-
- _ariaDescribedBy: {
- type: String,
- value: ''
- },
-
- _ariaLabelledBy: {
- type: String,
- value: ''
- }
-
- },
-
- listeners: {
- 'addon-attached': '_onAddonAttached',
- },
-
- keyBindings: {
- 'shift+tab:keydown': '_onShiftTabDown'
- },
-
- hostAttributes: {
- tabindex: 0
- },
-
- /**
- * Returns a reference to the input element.
- */
- get inputElement() {
- return this.$.input;
- },
-
- /**
- * Returns a reference to the focusable element.
- */
- get _focusableElement() {
- return this.inputElement;
- },
-
- registered: function() {
- // These types have some default placeholder text; overlapping
- // the label on top of it looks terrible. Auto-float the label in this case.
- this._typesThatHaveText = ["date", "datetime", "datetime-local", "month",
- "time", "week", "file"];
- },
-
- attached: function() {
- this._updateAriaLabelledBy();
-
- if (this.inputElement &&
- this._typesThatHaveText.indexOf(this.inputElement.type) !== -1) {
- this.alwaysFloatLabel = true;
- }
- },
-
- _appendStringWithSpace: function(str, more) {
- if (str) {
- str = str + ' ' + more;
- } else {
- str = more;
- }
- return str;
- },
-
- _onAddonAttached: function(event) {
- var target = event.path ? event.path[0] : event.target;
- if (target.id) {
- this._ariaDescribedBy = this._appendStringWithSpace(this._ariaDescribedBy, target.id);
- } else {
- var id = 'paper-input-add-on-' + Polymer.PaperInputHelper.NextAddonID++;
- target.id = id;
- this._ariaDescribedBy = this._appendStringWithSpace(this._ariaDescribedBy, id);
- }
- },
-
- /**
- * Validates the input element and sets an error style if needed.
- *
- * @return {boolean}
- */
- validate: function() {
- return this.inputElement.validate();
- },
-
- /**
- * Forward focus to inputElement. Overriden from IronControlState.
- */
- _focusBlurHandler: function(event) {
- Polymer.IronControlState._focusBlurHandler.call(this, event);
-
- // Forward the focus to the nested input.
- if (this.focused && !this._shiftTabPressed)
- this._focusableElement.focus();
- },
-
- /**
- * Handler that is called when a shift+tab keypress is detected by the menu.
- *
- * @param {CustomEvent} event A key combination event.
- */
- _onShiftTabDown: function(event) {
- var oldTabIndex = this.getAttribute('tabindex');
- this._shiftTabPressed = true;
- this.setAttribute('tabindex', '-1');
- this.async(function() {
- this.setAttribute('tabindex', oldTabIndex);
- this._shiftTabPressed = false;
- }, 1);
- },
-
- /**
- * If `autoValidate` is true, then validates the element.
- */
- _handleAutoValidate: function() {
- if (this.autoValidate)
- this.validate();
- },
-
- /**
- * Restores the cursor to its original position after updating the value.
- * @param {string} newValue The value that should be saved.
- */
- updateValueAndPreserveCaret: function(newValue) {
- // Not all elements might have selection, and even if they have the
- // right properties, accessing them might throw an exception (like for
- // <input type=number>)
- try {
- var start = this.inputElement.selectionStart;
- this.value = newValue;
-
- // The cursor automatically jumps to the end after re-setting the value,
- // so restore it to its original position.
- this.inputElement.selectionStart = start;
- this.inputElement.selectionEnd = start;
- } catch (e) {
- // Just set the value and give up on the caret.
- this.value = newValue;
- }
- },
-
- _computeAlwaysFloatLabel: function(alwaysFloatLabel, placeholder) {
- return placeholder || alwaysFloatLabel;
- },
-
- _updateAriaLabelledBy: function() {
- var label = Polymer.dom(this.root).querySelector('label');
- if (!label) {
- this._ariaLabelledBy = '';
- return;
- }
- var labelledBy;
- if (label.id) {
- labelledBy = label.id;
- } else {
- labelledBy = 'paper-input-label-' + Polymer.PaperInputHelper.NextLabelID++;
- label.id = labelledBy;
- }
- this._ariaLabelledBy = labelledBy;
- },
-
- _onChange:function(event) {
- // In the Shadow DOM, the `change` event is not leaked into the
- // ancestor tree, so we must do this manually.
- // See https://w3c.github.io/webcomponents/spec/shadow/#events-that-are-not-leaked-into-ancestor-trees.
- if (this.shadowRoot) {
- this.fire(event.type, {sourceEvent: event}, {
- node: this,
- bubbles: event.bubbles,
- cancelable: event.cancelable
- });
- }
- }
- }
-
- /** @polymerBehavior */
- Polymer.PaperInputBehavior = [
- Polymer.IronControlState,
- Polymer.IronA11yKeysBehavior,
- Polymer.PaperInputBehaviorImpl
- ];
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-char-counter.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-char-counter.html
deleted file mode 100644
index 1a09a06d0ee..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-char-counter.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../paper-styles/typography.html">
-<link rel="import" href="paper-input-addon-behavior.html">
-
-<!--
-`<paper-input-char-counter>` is a character counter for use with `<paper-input-container>`. It
-shows the number of characters entered in the input and the max length if it is specified.
-
- <paper-input-container>
- <input is="iron-input" maxlength="20">
- <paper-input-char-counter></paper-input-char-counter>
- </paper-input-container>
-
-### Styling
-
-The following mixin is available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-char-counter` | Mixin applied to the element | `{}`
--->
-
-<dom-module id="paper-input-char-counter">
- <template>
- <style>
- :host {
- display: inline-block;
- float: right;
-
- @apply(--paper-font-caption);
- @apply(--paper-input-char-counter);
- }
-
- :host([hidden]) {
- display: none !important;
- }
-
- :host-context([dir="rtl"]) {
- float: left;
- }
- </style>
-
- <span>[[_charCounterStr]]</span>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-input-char-counter',
-
- behaviors: [
- Polymer.PaperInputAddonBehavior
- ],
-
- properties: {
- _charCounterStr: {
- type: String,
- value: '0'
- }
- },
-
- /**
- * This overrides the update function in PaperInputAddonBehavior.
- * @param {{
- * inputElement: (Element|undefined),
- * value: (string|undefined),
- * invalid: boolean
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {
- if (!state.inputElement) {
- return;
- }
-
- state.value = state.value || '';
-
- var counter = state.value.toString().length.toString();
-
- if (state.inputElement.hasAttribute('maxlength')) {
- counter += '/' + state.inputElement.getAttribute('maxlength');
- }
-
- this._charCounterStr = counter;
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-container.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-container.html
deleted file mode 100644
index 815a0a36ad1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-container.html
+++ /dev/null
@@ -1,621 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-
-<!--
-`<paper-input-container>` is a container for a `<label>`, an `<input is="iron-input">` or
-`<iron-autogrow-textarea>` and optional add-on elements such as an error message or character
-counter, used to implement Material Design text fields.
-
-For example:
-
- <paper-input-container>
- <label>Your name</label>
- <input is="iron-input">
- </paper-input-container>
-
-Do not wrap `<paper-input-container>` around elements that already include it, such as `<paper-input>`.
-Doing so may cause events to bounce infintely between the container and its contained element.
-
-### Listening for input changes
-
-By default, it listens for changes on the `bind-value` attribute on its children nodes and perform
-tasks such as auto-validating and label styling when the `bind-value` changes. You can configure
-the attribute it listens to with the `attr-for-value` attribute.
-
-### Using a custom input element
-
-You can use a custom input element in a `<paper-input-container>`, for example to implement a
-compound input field like a social security number input. The custom input element should have the
-`paper-input-input` class, have a `notify:true` value property and optionally implements
-`Polymer.IronValidatableBehavior` if it is validatable.
-
- <paper-input-container attr-for-value="ssn-value">
- <label>Social security number</label>
- <ssn-input class="paper-input-input"></ssn-input>
- </paper-input-container>
-
-
-If you're using a `<paper-input-container>` imperatively, it's important to make sure
-that you attach its children (the `iron-input` and the optional `label`) before you
-attach the `<paper-input-container>` itself, so that it can be set up correctly.
-
-### Validation
-
-If the `auto-validate` attribute is set, the input container will validate the input and update
-the container styling when the input value changes.
-
-### Add-ons
-
-Add-ons are child elements of a `<paper-input-container>` with the `add-on` attribute and
-implements the `Polymer.PaperInputAddonBehavior` behavior. They are notified when the input value
-or validity changes, and may implement functionality such as error messages or character counters.
-They appear at the bottom of the input.
-
-### Prefixes and suffixes
-These are child elements of a `<paper-input-container>` with the `prefix`
-or `suffix` attribute, and are displayed inline with the input, before or after.
-
- <paper-input-container>
- <div prefix>$</div>
- <label>Total</label>
- <input is="iron-input">
- <paper-icon-button suffix icon="clear"></paper-icon-button>
- </paper-input-container>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color`
-`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--primary-color`
-`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--error-color`
-`--paper-input-container-input-color` | Input foreground color | `--primary-text-color`
-`--paper-input-container` | Mixin applied to the container | `{}`
-`--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}`
-`--paper-input-container-label` | Mixin applied to the label | `{}`
-`--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}`
-`--paper-input-container-label-floating` | Mixin applied to the label when floating | `{}`
-`--paper-input-container-input` | Mixin applied to the input | `{}`
-`--paper-input-container-underline` | Mixin applied to the underline | `{}`
-`--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focused | `{}`
-`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}`
-`--paper-input-prefix` | Mixin applied to the input prefix | `{}`
-`--paper-input-suffix` | Mixin applied to the input suffix | `{}`
-
-This element is `display:block` by default, but you can set the `inline` attribute to make it
-`display:inline-block`.
--->
-
-<dom-module id="paper-input-container">
- <template>
- <style>
- :host {
- display: block;
- padding: 8px 0;
-
- @apply(--paper-input-container);
- }
-
- :host([inline]) {
- display: inline-block;
- }
-
- :host([disabled]) {
- pointer-events: none;
- opacity: 0.33;
-
- @apply(--paper-input-container-disabled);
- }
-
- :host([hidden]) {
- display: none !important;
- }
-
- .floated-label-placeholder {
- @apply(--paper-font-caption);
- }
-
- .underline {
- position: relative;
- }
-
- .focused-line {
- @apply(--layout-fit);
-
- background: var(--paper-input-container-focus-color, --primary-color);
- height: 2px;
-
- -webkit-transform-origin: center center;
- transform-origin: center center;
- -webkit-transform: scale3d(0,1,1);
- transform: scale3d(0,1,1);
-
- @apply(--paper-input-container-underline-focus);
- }
-
- .underline.is-highlighted .focused-line {
- -webkit-transform: none;
- transform: none;
- -webkit-transition: -webkit-transform 0.25s;
- transition: transform 0.25s;
-
- @apply(--paper-transition-easing);
- }
-
- .underline.is-invalid .focused-line {
- background: var(--paper-input-container-invalid-color, --error-color);
- -webkit-transform: none;
- transform: none;
- -webkit-transition: -webkit-transform 0.25s;
- transition: transform 0.25s;
-
- @apply(--paper-transition-easing);
- }
-
- .unfocused-line {
- @apply(--layout-fit);
-
- background: var(--paper-input-container-color, --secondary-text-color);
- height: 1px;
-
- @apply(--paper-input-container-underline);
- }
-
- :host([disabled]) .unfocused-line {
- border-bottom: 1px dashed;
- border-color: var(--paper-input-container-color, --secondary-text-color);
- background: transparent;
-
- @apply(--paper-input-container-underline-disabled);
- }
-
- .label-and-input-container {
- @apply(--layout-flex-auto);
- @apply(--layout-relative);
-
- width: 100%;
- max-width: 100%;
- }
-
- .input-content {
- @apply(--layout-horizontal);
- @apply(--layout-center);
-
- position: relative;
- }
-
- .input-content ::content label,
- .input-content ::content .paper-input-label {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- width: 100%;
- font: inherit;
- color: var(--paper-input-container-color, --secondary-text-color);
- -webkit-transition: -webkit-transform 0.25s, width 0.25s;
- transition: transform 0.25s, width 0.25s;
- -webkit-transform-origin: left top;
- transform-origin: left top;
-
- @apply(--paper-font-common-nowrap);
- @apply(--paper-font-subhead);
- @apply(--paper-input-container-label);
- @apply(--paper-transition-easing);
- }
-
- .input-content.label-is-floating ::content label,
- .input-content.label-is-floating ::content .paper-input-label {
- -webkit-transform: translateY(-75%) scale(0.75);
- transform: translateY(-75%) scale(0.75);
-
- /* Since we scale to 75/100 of the size, we actually have 100/75 of the
- original space now available */
- width: 133%;
-
- @apply(--paper-input-container-label-floating);
- }
-
- :host-context([dir="rtl"]) .input-content.label-is-floating ::content label,
- :host-context([dir="rtl"]) .input-content.label-is-floating ::content .paper-input-label {
- /* TODO(noms): Figure out why leaving the width at 133% before the animation
- * actually makes
- * it wider on the right side, not left side, as you would expect in RTL */
- width: 100%;
- -webkit-transform-origin: right top;
- transform-origin: right top;
- }
-
- .input-content.label-is-highlighted ::content label,
- .input-content.label-is-highlighted ::content .paper-input-label {
- color: var(--paper-input-container-focus-color, --primary-color);
-
- @apply(--paper-input-container-label-focus);
- }
-
- .input-content.is-invalid ::content label,
- .input-content.is-invalid ::content .paper-input-label {
- color: var(--paper-input-container-invalid-color, --error-color);
- }
-
- .input-content.label-is-hidden ::content label,
- .input-content.label-is-hidden ::content .paper-input-label {
- visibility: hidden;
- }
-
- .input-content ::content input,
- .input-content ::content textarea,
- .input-content ::content iron-autogrow-textarea,
- .input-content ::content .paper-input-input {
- position: relative; /* to make a stacking context */
- outline: none;
- box-shadow: none;
- padding: 0;
- width: 100%;
- max-width: 100%;
- background: transparent;
- border: none;
- color: var(--paper-input-container-input-color, --primary-text-color);
- -webkit-appearance: none;
- text-align: inherit;
-
- @apply(--paper-font-subhead);
- @apply(--paper-input-container-input);
- }
-
- ::content [prefix] {
- @apply(--paper-font-subhead);
-
- @apply(--paper-input-prefix);
- @apply(--layout-flex-none);
- }
-
- ::content [suffix] {
- @apply(--paper-font-subhead);
-
- @apply(--paper-input-suffix);
- @apply(--layout-flex-none);
- }
-
- /* Firefox sets a min-width on the input, which can cause layout issues */
- .input-content ::content input {
- min-width: 0;
- }
-
- .input-content ::content textarea {
- resize: none;
- }
-
- .add-on-content {
- position: relative;
- }
-
- .add-on-content.is-invalid ::content * {
- color: var(--paper-input-container-invalid-color, --error-color);
- }
-
- .add-on-content.is-highlighted ::content * {
- color: var(--paper-input-container-focus-color, --primary-color);
- }
- </style>
-
- <template is="dom-if" if="[[!noLabelFloat]]">
- <div class="floated-label-placeholder" aria-hidden="true">&nbsp;</div>
- </template>
-
- <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]">
- <content select="[prefix]" id="prefix"></content>
-
- <div class="label-and-input-container" id="labelAndInputContainer">
- <content select=":not([add-on]):not([prefix]):not([suffix])"></content>
- </div>
-
- <content select="[suffix]"></content>
- </div>
-
- <div class$="[[_computeUnderlineClass(focused,invalid)]]">
- <div class="unfocused-line"></div>
- <div class="focused-line"></div>
- </div>
-
- <div class$="[[_computeAddOnContentClass(focused,invalid)]]">
- <content id="addOnContent" select="[add-on]"></content>
- </div>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-input-container',
-
- properties: {
- /**
- * Set to true to disable the floating label. The label disappears when the input value is
- * not null.
- */
- noLabelFloat: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to always float the floating label.
- */
- alwaysFloatLabel: {
- type: Boolean,
- value: false
- },
-
- /**
- * The attribute to listen for value changes on.
- */
- attrForValue: {
- type: String,
- value: 'bind-value'
- },
-
- /**
- * Set to true to auto-validate the input value when it changes.
- */
- autoValidate: {
- type: Boolean,
- value: false
- },
-
- /**
- * True if the input is invalid. This property is set automatically when the input value
- * changes if auto-validating, or when the `iron-input-validate` event is heard from a child.
- */
- invalid: {
- observer: '_invalidChanged',
- type: Boolean,
- value: false
- },
-
- /**
- * True if the input has focus.
- */
- focused: {
- readOnly: true,
- type: Boolean,
- value: false,
- notify: true
- },
-
- _addons: {
- type: Array
- // do not set a default value here intentionally - it will be initialized lazily when a
- // distributed child is attached, which may occur before configuration for this element
- // in polyfill.
- },
-
- _inputHasContent: {
- type: Boolean,
- value: false
- },
-
- _inputSelector: {
- type: String,
- value: 'input,textarea,.paper-input-input'
- },
-
- _boundOnFocus: {
- type: Function,
- value: function() {
- return this._onFocus.bind(this);
- }
- },
-
- _boundOnBlur: {
- type: Function,
- value: function() {
- return this._onBlur.bind(this);
- }
- },
-
- _boundOnInput: {
- type: Function,
- value: function() {
- return this._onInput.bind(this);
- }
- },
-
- _boundValueChanged: {
- type: Function,
- value: function() {
- return this._onValueChanged.bind(this);
- }
- }
- },
-
- listeners: {
- 'addon-attached': '_onAddonAttached',
- 'iron-input-validate': '_onIronInputValidate'
- },
-
- get _valueChangedEvent() {
- return this.attrForValue + '-changed';
- },
-
- get _propertyForValue() {
- return Polymer.CaseMap.dashToCamelCase(this.attrForValue);
- },
-
- get _inputElement() {
- return Polymer.dom(this).querySelector(this._inputSelector);
- },
-
- get _inputElementValue() {
- return this._inputElement[this._propertyForValue] || this._inputElement.value;
- },
-
- ready: function() {
- if (!this._addons) {
- this._addons = [];
- }
- this.addEventListener('focus', this._boundOnFocus, true);
- this.addEventListener('blur', this._boundOnBlur, true);
- },
-
- attached: function() {
- if (this.attrForValue) {
- this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged);
- } else {
- this.addEventListener('input', this._onInput);
- }
-
- // Only validate when attached if the input already has a value.
- if (this._inputElementValue != '') {
- this._handleValueAndAutoValidate(this._inputElement);
- } else {
- this._handleValue(this._inputElement);
- }
- },
-
- _onAddonAttached: function(event) {
- if (!this._addons) {
- this._addons = [];
- }
- var target = event.target;
- if (this._addons.indexOf(target) === -1) {
- this._addons.push(target);
- if (this.isAttached) {
- this._handleValue(this._inputElement);
- }
- }
- },
-
- _onFocus: function() {
- this._setFocused(true);
- },
-
- _onBlur: function() {
- this._setFocused(false);
- this._handleValueAndAutoValidate(this._inputElement);
- },
-
- _onInput: function(event) {
- this._handleValueAndAutoValidate(event.target);
- },
-
- _onValueChanged: function(event) {
- this._handleValueAndAutoValidate(event.target);
- },
-
- _handleValue: function(inputElement) {
- var value = this._inputElementValue;
-
- // type="number" hack needed because this.value is empty until it's valid
- if (value || value === 0 || (inputElement.type === 'number' && !inputElement.checkValidity())) {
- this._inputHasContent = true;
- } else {
- this._inputHasContent = false;
- }
-
- this.updateAddons({
- inputElement: inputElement,
- value: value,
- invalid: this.invalid
- });
- },
-
- _handleValueAndAutoValidate: function(inputElement) {
- if (this.autoValidate) {
- var valid;
- if (inputElement.validate) {
- valid = inputElement.validate(this._inputElementValue);
- } else {
- valid = inputElement.checkValidity();
- }
- this.invalid = !valid;
- }
-
- // Call this last to notify the add-ons.
- this._handleValue(inputElement);
- },
-
- _onIronInputValidate: function(event) {
- this.invalid = this._inputElement.invalid;
- },
-
- _invalidChanged: function() {
- if (this._addons) {
- this.updateAddons({invalid: this.invalid});
- }
- },
-
- /**
- * Call this to update the state of add-ons.
- * @param {Object} state Add-on state.
- */
- updateAddons: function(state) {
- for (var addon, index = 0; addon = this._addons[index]; index++) {
- addon.update(state);
- }
- },
-
- _computeInputContentClass: function(noLabelFloat, alwaysFloatLabel, focused, invalid, _inputHasContent) {
- var cls = 'input-content';
- if (!noLabelFloat) {
- var label = this.querySelector('label');
-
- if (alwaysFloatLabel || _inputHasContent) {
- cls += ' label-is-floating';
- // If the label is floating, ignore any offsets that may have been
- // applied from a prefix element.
- this.$.labelAndInputContainer.style.position = 'static';
-
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += " label-is-highlighted";
- }
- } else {
- // When the label is not floating, it should overlap the input element.
- if (label) {
- this.$.labelAndInputContainer.style.position = 'relative';
- }
- }
- } else {
- if (_inputHasContent) {
- cls += ' label-is-hidden';
- }
- }
- return cls;
- },
-
- _computeUnderlineClass: function(focused, invalid) {
- var cls = 'underline';
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' is-highlighted'
- }
- return cls;
- },
-
- _computeAddOnContentClass: function(focused, invalid) {
- var cls = 'add-on-content';
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' is-highlighted'
- }
- return cls;
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-error.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-error.html
deleted file mode 100644
index 645f1e722b0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input-error.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-<link rel="import" href="paper-input-addon-behavior.html">
-
-<!--
-`<paper-input-error>` is an error message for use with `<paper-input-container>`. The error is
-displayed when the `<paper-input-container>` is `invalid`.
-
- <paper-input-container>
- <input is="iron-input" pattern="[0-9]*">
- <paper-input-error>Only numbers are allowed!</paper-input-error>
- </paper-input-container>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-container-invalid-color` | The foreground color of the error | `--error-color`
-`--paper-input-error` | Mixin applied to the error | `{}`
--->
-
-<dom-module id="paper-input-error">
- <template>
- <style>
- :host {
- display: inline-block;
- visibility: hidden;
-
- color: var(--paper-input-container-invalid-color, --error-color);
-
- @apply(--paper-font-caption);
- @apply(--paper-input-error);
- position: absolute;
- left:0;
- right:0;
- }
-
- :host([invalid]) {
- visibility: visible;
- };
- </style>
-
- <content></content>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-input-error',
-
- behaviors: [
- Polymer.PaperInputAddonBehavior
- ],
-
- properties: {
- /**
- * True if the error is showing.
- */
- invalid: {
- readOnly: true,
- reflectToAttribute: true,
- type: Boolean
- }
- },
-
- /**
- * This overrides the update function in PaperInputAddonBehavior.
- * @param {{
- * inputElement: (Element|undefined),
- * value: (string|undefined),
- * invalid: boolean
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {
- this._setInvalid(state.invalid);
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input.html
deleted file mode 100644
index 075cfa68b45..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-input.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
-<link rel="import" href="../iron-input/iron-input.html">
-<link rel="import" href="paper-input-behavior.html">
-<link rel="import" href="paper-input-char-counter.html">
-<link rel="import" href="paper-input-container.html">
-<link rel="import" href="paper-input-error.html">
-
-<!--
-Material design: [Text fields](https://www.google.com/design/spec/components/text-fields.html)
-
-`<paper-input>` is a single-line text field with Material Design styling.
-
- <paper-input label="Input label"></paper-input>
-
-It may include an optional error message or character counter.
-
- <paper-input error-message="Invalid input!" label="Input label"></paper-input>
- <paper-input char-counter label="Input label"></paper-input>
-
-It can also include custom prefix or suffix elements, which are displayed
-before or after the text input itself. In order for an element to be
-considered as a prefix, it must have the `prefix` attribute (and similarly
-for `suffix`).
-
- <paper-input label="total">
- <div prefix>$</div>
- <paper-icon-button suffix icon="clear"></paper-icon-button>
- </paper-input>
-
-A `paper-input` can use the native `type=search` or `type=file` features.
-However, since we can't control the native styling of the input (search icon,
-file button, date placeholder, etc.), in these cases the label will be
-automatically floated. The `placeholder` attribute can still be used for
-additional informational text.
-
- <paper-input label="search!" type="search"
- placeholder="search for cats" autosave="test" results="5">
- </paper-input>
-
-See `Polymer.PaperInputBehavior` for more API docs.
-
-### Focus
-
-To focus a paper-input, you can call the native `focus()` method as long as the
-paper input has a tab index.
-
-### Styling
-
-See `Polymer.PaperInputContainer` for a list of custom properties used to
-style this element.
-
-
-@group Paper Elements
-@element paper-input
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-input">
- <template>
- <style>
- :host {
- display: block;
- }
-
- :host([hidden]) {
- display: none !important;
- }
-
- input::-webkit-input-placeholder {
- color: var(--paper-input-container-color, --secondary-text-color);
- }
-
- input:-moz-placeholder {
- color: var(--paper-input-container-color, --secondary-text-color);
- }
-
- input::-moz-placeholder {
- color: var(--paper-input-container-color, --secondary-text-color);
- }
-
- input:-ms-input-placeholder {
- color: var(--paper-input-container-color, --secondary-text-color);
- }
- </style>
-
- <paper-input-container no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">
-
- <content select="[prefix]"></content>
-
- <label hidden$="[[!label]]" aria-hidden="true">[[label]]</label>
-
- <input is="iron-input" id="input"
- aria-labelledby$="[[_ariaLabelledBy]]"
- aria-describedby$="[[_ariaDescribedBy]]"
- disabled$="[[disabled]]"
- title$="[[title]]"
- bind-value="{{value}}"
- invalid="{{invalid}}"
- prevent-invalid-input="[[preventInvalidInput]]"
- allowed-pattern="[[allowedPattern]]"
- validator="[[validator]]"
- type$="[[type]]"
- pattern$="[[pattern]]"
- required$="[[required]]"
- autocomplete$="[[autocomplete]]"
- autofocus$="[[autofocus]]"
- inputmode$="[[inputmode]]"
- minlength$="[[minlength]]"
- maxlength$="[[maxlength]]"
- min$="[[min]]"
- max$="[[max]]"
- step$="[[step]]"
- name$="[[name]]"
- placeholder$="[[placeholder]]"
- readonly$="[[readonly]]"
- list$="[[list]]"
- size$="[[size]]"
- autocapitalize$="[[autocapitalize]]"
- autocorrect$="[[autocorrect]]"
- on-change="_onChange"
- tabindex$="[[tabindex]]"
- autosave$="[[autosave]]"
- results$="[[results]]"
- accept$="[[accept]]"
- multiple$="[[multiple]]">
-
- <content select="[suffix]"></content>
-
- <template is="dom-if" if="[[errorMessage]]">
- <paper-input-error>[[errorMessage]]</paper-input-error>
- </template>
-
- <template is="dom-if" if="[[charCounter]]">
- <paper-input-char-counter></paper-input-char-counter>
- </template>
-
- </paper-input-container>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-input',
-
- behaviors: [
- Polymer.IronFormElementBehavior,
- Polymer.PaperInputBehavior
- ]
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-textarea.html b/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-textarea.html
deleted file mode 100644
index 064efec83dc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-input/paper-textarea.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-autogrow-textarea/iron-autogrow-textarea.html">
-<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
-<link rel="import" href="paper-input-behavior.html">
-<link rel="import" href="paper-input-char-counter.html">
-<link rel="import" href="paper-input-container.html">
-<link rel="import" href="paper-input-error.html">
-
-<!--
-`<paper-textarea>` is a multi-line text field with Material Design styling.
-
- <paper-textarea label="Textarea label"></paper-textarea>
-
-See `Polymer.PaperInputBehavior` for more API docs.
-
-### Validation
-
-Currently only `required` and `maxlength` validation is supported.
-
-### Styling
-
-See `Polymer.PaperInputContainer` for a list of custom properties used to
-style this element.
--->
-
-<dom-module id="paper-textarea">
- <template>
- <style>
- :host {
- display: block;
- }
-
- :host([hidden]) {
- display: none !important;
- }
- </style>
-
- <paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">
-
- <label hidden$="[[!label]]" aria-hidden="true">[[label]]</label>
-
- <iron-autogrow-textarea id="input" class="paper-input-input"
- bind-value="{{value}}"
- disabled$="[[disabled]]"
- autocomplete$="[[autocomplete]]"
- autofocus$="[[autofocus]]"
- inputmode$="[[inputmode]]"
- name$="[[name]]"
- placeholder$="[[placeholder]]"
- readonly$="[[readonly]]"
- required$="[[required]]"
- maxlength$="[[maxlength]]"
- autocapitalize$="[[autocapitalize]]"
- rows$="[[rows]]"
- max-rows$="[[maxRows]]"
- on-change="_onChange"></iron-autogrow-textarea>
-
- <template is="dom-if" if="[[errorMessage]]">
- <paper-input-error>[[errorMessage]]</paper-input-error>
- </template>
-
- <template is="dom-if" if="[[charCounter]]">
- <paper-input-char-counter></paper-input-char-counter>
- </template>
-
- </paper-input-container>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-textarea',
-
- behaviors: [
- Polymer.PaperInputBehavior,
- Polymer.IronFormElementBehavior
- ],
-
- properties: {
- _ariaLabelledBy: {
- observer: '_ariaLabelledByChanged',
- type: String
- },
-
- _ariaDescribedBy: {
- observer: '_ariaDescribedByChanged',
- type: String
- },
-
- /**
- * The initial number of rows.
- *
- * @attribute rows
- * @type number
- * @default 1
- */
- rows: {
- type: Number,
- value: 1
- },
-
- /**
- * The maximum number of rows this element can grow to until it
- * scrolls. 0 means no maximum.
- *
- * @attribute maxRows
- * @type number
- * @default 0
- */
- maxRows: {
- type: Number,
- value: 0
- }
- },
-
- _ariaLabelledByChanged: function(ariaLabelledBy) {
- this.$.input.textarea.setAttribute('aria-labelledby', ariaLabelledBy);
- },
-
- _ariaDescribedByChanged: function(ariaDescribedBy) {
- this.$.input.textarea.setAttribute('aria-describedby', ariaDescribedBy);
- },
-
- get _focusableElement() {
- return this.$.input.textarea;
- },
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-item/.bower.json
deleted file mode 100644
index 91f23cd9745..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/.bower.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "paper-item",
- "version": "1.2.1",
- "description": "A material-design styled list item",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "item"
- ],
- "main": [
- "paper-item.html",
- "paper-icon-item.html",
- "paper-item-body.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-item"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-item",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
- },
- "_release": "1.2.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.1",
- "commit": "1eab91333b318ae19e315866575b2dddd38e6abc"
- },
- "_source": "git://github.com/PolymerElements/paper-item.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-item"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-item/.travis.yml
deleted file mode 100644
index c4d7b1805f6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: NCk3KK+wbaXMzp8XAY6FeL+TSdI0AlPI3/tl0OpsUIaU2EiCjQuzf/UpyzCW5XZMEVFF4q/eDjrPkqJodHfpngj36mpkfmfqj9DrgDmYsV9BDvsTd8KmLsA6H8D6p7Qer+r1JMMB8PvX44vdhQ6GhZD1HFNYK1Ekpt0TkYwWKNw=
- - secure: TGgUEQe6FJS+GuYk94d//8YQmDLUu0ekMvPSIs8TQ2QkdBK4SL+2bSXZt44BbDEOwc9P4NCPSUx/RMiCAqsc5OGRJImzb/zqPNIDTeKG6q72HPBBBD3Sk0CrEpTQbOK/Flaa/B7RYR0U1kuljSmRS7lPG19nnY8gOHnIAgwIyk0=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-item/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-item/README.md
deleted file mode 100644
index 18deb629f49..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/README.md
+++ /dev/null
@@ -1,163 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-icon-item.html paper-item-behavior.html paper-item-body.html paper-item.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-item.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-item)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-item)_
-
-
-##&lt;paper-item&gt;
-
-Material design: [Lists](https://www.google.com/design/spec/components/lists.html)
-
-`<paper-item>` is an interactive list item. By default, it is a horizontal flexbox.
-
-```html
-<paper-item>Item</paper-item>
-```
-
-Use this element with `<paper-item-body>` to make Material Design styled two-line and three-line
-items.
-
-```html
-<paper-item>
- <paper-item-body two-line>
- <div>Show your status</div>
- <div secondary>Your status is visible to everyone</div>
- </paper-item-body>
- <iron-icon icon="warning"></iron-icon>
-</paper-item>
-```
-
-To use `paper-item` as a link, wrap it in an anchor tag. Since `paper-item` will
-already receive focus, you may want to prevent the anchor tag from receiving
-focus as well by setting its tabindex to -1.
-
-```html
-<a href="https://www.polymer-project.org/" tabindex="-1">
- <paper-item raised>Polymer Project</paper-item>
-</a>
-```
-
-If you are concerned about performance and want to use `paper-item` in a `paper-listbox`
-with many items, you can just use a native `button` with the `paper-item` class
-applied (provided you have correctly included the shared styles):
-
-```html
-<style is="custom-style" include="paper-item-shared-styles"></style>
-
-<paper-listbox>
- <button class="paper-item" role="option">Inbox</button>
- <button class="paper-item" role="option">Starred</button>
- <button class="paper-item" role="option">Sent mail</button>
-</paper-listbox>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-item-min-height` | Minimum height of the item | `48px` |
-| `--paper-item` | Mixin applied to the item | `{}` |
-| `--paper-item-selected-weight` | The font weight of a selected item | `bold` |
-| `--paper-item-selected` | Mixin applied to selected paper-items | `{}` |
-| `--paper-item-disabled-color` | The color for disabled paper-items | `--disabled-text-color` |
-| `--paper-item-disabled` | Mixin applied to disabled paper-items | `{}` |
-| `--paper-item-focused` | Mixin applied to focused paper-items | `{}` |
-| `--paper-item-focused-before` | Mixin applied to :before focused paper-items | `{}` |
-
-### Accessibility
-
-This element has `role="listitem"` by default. Depending on usage, it may be more appropriate to set
-`role="menuitem"`, `role="menuitemcheckbox"` or `role="menuitemradio"`.
-
-```html
-<paper-item role="menuitemcheckbox">
- <paper-item-body>
- Show your status
- </paper-item-body>
- <paper-checkbox></paper-checkbox>
-</paper-item>
-```
-
-
-
-##&lt;paper-icon-item&gt;
-
-`<paper-icon-item>` is a convenience element to make an item with icon. It is an interactive list
-item with a fixed-width icon area, according to Material Design. This is useful if the icons are of
-varying widths, but you want the item bodies to line up. Use this like a `<paper-item>`. The child
-node with the attribute `item-icon` is placed in the icon area.
-
-```html
-<paper-icon-item>
- <iron-icon icon="favorite" item-icon></iron-icon>
- Favorite
-</paper-icon-item>
-<paper-icon-item>
- <div class="avatar" item-icon></div>
- Avatar
-</paper-icon-item>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-item-icon-width` | Width of the icon area | `56px` |
-| `--paper-item-icon` | Mixin applied to the icon area | `{}` |
-| `--paper-icon-item` | Mixin applied to the item | `{}` |
-| `--paper-item-selected-weight` | The font weight of a selected item | `bold` |
-| `--paper-item-selected` | Mixin applied to selected paper-items | `{}` |
-| `--paper-item-disabled-color` | The color for disabled paper-items | `--disabled-text-color` |
-| `--paper-item-disabled` | Mixin applied to disabled paper-items | `{}` |
-| `--paper-item-focused` | Mixin applied to focused paper-items | `{}` |
-| `--paper-item-focused-before` | Mixin applied to :before focused paper-items | `{}` |
-
-
-
-##&lt;paper-item-body&gt;
-
-Use `<paper-item-body>` in a `<paper-item>` or `<paper-icon-item>` to make two- or
-three- line items. It is a flex item that is a vertical flexbox.
-
-```html
-<paper-item>
- <paper-item-body two-line>
- <div>Show your status</div>
- <div secondary>Your status is visible to everyone</div>
- </paper-item-body>
-</paper-item>
-```
-
-The child elements with the `secondary` attribute is given secondary text styling.
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-item-body-two-line-min-height` | Minimum height of a two-line item | `72px` |
-| `--paper-item-body-three-line-min-height` | Minimum height of a three-line item | `88px` |
-| `--paper-item-body-secondary-color` | Foreground color for the `secondary` area | `--secondary-text-color` |
-| `--paper-item-body-secondary` | Mixin applied to the `secondary` area | `{}` |
-
-
-
-<!-- No docs for Polymer.PaperItemBehavior found. -->
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/all-imports.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/all-imports.html
deleted file mode 100644
index 4b1583fe410..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/all-imports.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="paper-item.html">
-<link rel="import" href="paper-item-body.html">
-<link rel="import" href="paper-icon-item.html">
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-item/bower.json
deleted file mode 100644
index 9028ed7fd58..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/bower.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "paper-item",
- "version": "1.2.1",
- "description": "A material-design styled list item",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "item"
- ],
- "main": [
- "paper-item.html",
- "paper-icon-item.html",
- "paper-item-body.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-item"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-item",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/demo/index.html
deleted file mode 100644
index bc95e7f9c0b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/demo/index.html
+++ /dev/null
@@ -1,191 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-item demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-icon/iron-icon.html">
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../iron-icons/communication-icons.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
- <link rel="import" href="../paper-icon-item.html">
- <link rel="import" href="../paper-item.html">
- <link rel="import" href="../paper-item-body.html">
- <link rel="import" href="../../paper-styles/color.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- div[role="listbox"] {
- border: 1px solid #e5e5e5;
- }
- .avatar {
- display: inline-block;
- box-sizing: border-box;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background: var(--paper-amber-500);
- }
-
- .blue {
- background-color: var(--paper-light-blue-300);
- }
- </style>
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h3>Paper-items are simple list elements, ideally used in a paper-listbox or
- an element with <i>role="listbox"</i></h3>
- <demo-snippet>
- <template>
- <div role="listbox">
- <paper-item>Inbox</paper-item>
- <paper-item>Starred</paper-item>
- <paper-item>Sent mail</paper-item>
- </div>
- </template>
- </demo-snippet>
-
- <h3>They can be styled using custom properties</h3>
- <demo-snippet>
- <template>
- <style is="custom-style">
- paper-item.fancy {
- --paper-item-focused: {
- background: var(--paper-amber-500);
- font-weight: bold;
- };
- --paper-item-focused-before: {
- opacity: 0;
- };
- }
- </style>
- <div role="listbox">
- <paper-item class="fancy">Inbox</paper-item>
- <paper-item class="fancy">Starred</paper-item>
- <paper-item class="fancy">Sent mail</paper-item>
- </div>
- </template>
- </demo-snippet>
-
- <h3>To add a leading element, use a paper-icon-item with an <i>item-icon</i> attribute. This
- leading image can be an iron-icon, or any other regular element.</h3>
- <demo-snippet>
- <template>
- <div role="listbox">
- <paper-icon-item>
- <iron-icon icon="inbox" item-icon></iron-icon>
- Inbox
- </paper-icon-item>
- <paper-icon-item>
- <iron-icon icon="star" item-icon></iron-icon>
- Starred
- </paper-icon-item>
- <paper-icon-item>
- <div class="avatar blue" item-icon></div>
- Alphonso Engelking
- </paper-icon-item>
- <paper-icon-item>
- <div class="avatar" item-icon></div>
- Angela Decker
- </paper-icon-item>
- </div>
- </template>
- </demo-snippet>
-
- <h3>For two-line items, use a paper-icon-body inside a paper-item or paper-icon-item</h3>
- <demo-snippet>
- <template>
- <div role="listbox">
- <paper-item>
- <paper-item-body two-line>
- <div>Profile Photo</div>
- <div secondary>Change your Google+ profile photo</div>
- </paper-item-body>
- </paper-item>
- <paper-icon-item>
- <iron-icon icon="communication:phone" item-icon>
- </iron-icon>
- <paper-item-body two-line>
- <div>(650) 555-1234</div>
- <div secondary>Mobile</div>
- </paper-item-body>
- </paper-icon-item>
- <paper-icon-item>
- <div class="avatar blue" item-icon></div>
- <paper-item-body two-line>
- <div>Alphonso Engelking</div>
- <div secondary>Change photo</div>
- </paper-item-body>
- </paper-icon-item>
- </div>
- </template>
- </demo-snippet>
-
- <h3>Complex layouts are usually a combination of all these elements</h3>
- <demo-snippet>
- <template>
- <div role="listbox">
- <paper-icon-item>
- <div class="avatar blue" item-icon></div>
- <paper-item-body two-line>
- <div>Photos</div>
- <div secondary>Jan 9, 2014</div>
- </paper-item-body>
- <paper-icon-button icon="star" alt="favourite this!">
- </paper-icon-button>
- </paper-icon-item>
- <paper-icon-item>
- <div class="avatar" item-icon></div>
- <paper-item-body two-line>
- <div>Recipes</div>
- <div secondary>Jan 17, 2014</div>
- </paper-item-body>
- <paper-icon-button icon="star" alt="favourite this!">
- </paper-icon-button>
- </paper-icon-item>
- </div>
- </template>
- </demo-snippet>
-
- <h3>Paper-items can be used as links</h3>
- <demo-snippet>
- <template>
- <style is="custom-style">
- .paper-item-link {
- color: inherit;
- text-decoration: none;
- }
- </style>
- <div role="listbox">
- <a class="paper-item-link" href="#inbox" tabindex="-1">
- <paper-item>Inbox</paper-item>
- </a>
- <a class="paper-item-link" href="#starred" tabindex="-1">
- <paper-item>Starred</paper-item>
- </a>
- <a class="paper-item-link" href="#sent" tabindex="-1">
- <paper-item>Sent mail</paper-item>
- </a>
- </div>
- </template>
- </demo-snippet>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/index.html
deleted file mode 100644
index b409ed121cd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!doctype html>
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-item</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page src="all-imports.html"></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-icon-item.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-icon-item.html
deleted file mode 100644
index e8f6d0795ed..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-icon-item.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/typography.html">
-<link rel="import" href="paper-item-behavior.html">
-<link rel="import" href="paper-item-shared-styles.html">
-
-<!--
-`<paper-icon-item>` is a convenience element to make an item with icon. It is an interactive list
-item with a fixed-width icon area, according to Material Design. This is useful if the icons are of
-varying widths, but you want the item bodies to line up. Use this like a `<paper-item>`. The child
-node with the attribute `item-icon` is placed in the icon area.
-
- <paper-icon-item>
- <iron-icon icon="favorite" item-icon></iron-icon>
- Favorite
- </paper-icon-item>
- <paper-icon-item>
- <div class="avatar" item-icon></div>
- Avatar
- </paper-icon-item>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-------------------------------|------------------------------------------------|----------
-`--paper-item-icon-width` | Width of the icon area | `56px`
-`--paper-item-icon` | Mixin applied to the icon area | `{}`
-`--paper-icon-item` | Mixin applied to the item | `{}`
-`--paper-item-selected-weight`| The font weight of a selected item | `bold`
-`--paper-item-selected` | Mixin applied to selected paper-items | `{}`
-`--paper-item-disabled-color` | The color for disabled paper-items | `--disabled-text-color`
-`--paper-item-disabled` | Mixin applied to disabled paper-items | `{}`
-`--paper-item-focused` | Mixin applied to focused paper-items | `{}`
-`--paper-item-focused-before` | Mixin applied to :before focused paper-items | `{}`
--->
-
-<dom-module id="paper-icon-item">
- <template>
- <style include="paper-item-shared-styles"></style>
- <style>
- :host {
- @apply(--layout-horizontal);
- @apply(--layout-center);
- @apply(--paper-font-subhead);
-
- @apply(--paper-item);
- @apply(--paper-icon-item);
- }
-
- .content-icon {
- @apply(--layout-horizontal);
- @apply(--layout-center);
-
- width: var(--paper-item-icon-width, 56px);
- @apply(--paper-item-icon);
- }
- </style>
-
- <div id="contentIcon" class="content-icon">
- <content select="[item-icon]"></content>
- </div>
- <content></content>
- </template>
-
- <script>
- Polymer({
- is: 'paper-icon-item',
-
- behaviors: [
- Polymer.PaperItemBehavior
- ]
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-behavior.html
deleted file mode 100644
index f97b262b737..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-behavior.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-behaviors/iron-button-state.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-
-<!--
-`PaperItemBehavior` is a convenience behavior shared by <paper-item> and
-<paper-icon-item> that manages the shared control states and attributes of
-the items.
--->
-
-<script>
- /** @polymerBehavior Polymer.PaperItemBehavior */
- Polymer.PaperItemBehaviorImpl = {
- hostAttributes: {
- role: 'option',
- tabindex: '0'
- }
- };
-
- /** @polymerBehavior */
- Polymer.PaperItemBehavior = [
- Polymer.IronButtonState,
- Polymer.IronControlState,
- Polymer.PaperItemBehaviorImpl
- ];
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-body.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-body.html
deleted file mode 100644
index 5c46cd891c7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-body.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-
-<!--
-Use `<paper-item-body>` in a `<paper-item>` or `<paper-icon-item>` to make two- or
-three- line items. It is a flex item that is a vertical flexbox.
-
- <paper-item>
- <paper-item-body two-line>
- <div>Show your status</div>
- <div secondary>Your status is visible to everyone</div>
- </paper-item-body>
- </paper-item>
-
-The child elements with the `secondary` attribute is given secondary text styling.
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-item-body-two-line-min-height` | Minimum height of a two-line item | `72px`
-`--paper-item-body-three-line-min-height` | Minimum height of a three-line item | `88px`
-`--paper-item-body-secondary-color` | Foreground color for the `secondary` area | `--secondary-text-color`
-`--paper-item-body-secondary` | Mixin applied to the `secondary` area | `{}`
-
--->
-
-<dom-module id="paper-item-body">
- <template>
- <style>
- :host {
- overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
- @apply(--layout-vertical);
- @apply(--layout-center-justified);
- @apply(--layout-flex);
- }
-
- :host([two-line]) {
- min-height: var(--paper-item-body-two-line-min-height, 72px);
- }
-
- :host([three-line]) {
- min-height: var(--paper-item-body-three-line-min-height, 88px);
- }
-
- :host > ::content > * {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- :host > ::content [secondary] {
- @apply(--paper-font-body1);
-
- color: var(--paper-item-body-secondary-color, --secondary-text-color);
-
- @apply(--paper-item-body-secondary);
- }
- </style>
-
- <content></content>
- </template>
-
- <script>
- Polymer({
- is: 'paper-item-body'
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-shared-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-shared-styles.html
deleted file mode 100644
index 868d415350a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item-shared-styles.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/color.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-
-<dom-module id="paper-item-shared-styles">
- <template>
- <style>
- :host, .paper-item {
- display: block;
- position: relative;
- min-height: var(--paper-item-min-height, 48px);
- padding: 0px 16px;
- }
-
- .paper-item {
- @apply(--paper-font-subhead);
- border:none;
- outline: none;
- background: white;
- width: 100%;
- text-align: left;
- }
-
- :host([hidden]), .paper-item[hidden] {
- display: none !important;
- }
-
- :host(.iron-selected), .paper-item.iron-selected {
- font-weight: var(--paper-item-selected-weight, bold);
-
- @apply(--paper-item-selected);
- }
-
- :host([disabled]), .paper-item[disabled] {
- color: var(--paper-item-disabled-color, --disabled-text-color);
-
- @apply(--paper-item-disabled);
- }
-
- :host(:focus), .paper-item:focus {
- position: relative;
- outline: 0;
-
- @apply(--paper-item-focused);
- }
-
- :host(:focus):before, .paper-item:focus:before {
- @apply(--layout-fit);
-
- background: currentColor;
- content: '';
- opacity: var(--dark-divider-opacity);
- pointer-events: none;
-
- @apply(--paper-item-focused-before);
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item.html b/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item.html
deleted file mode 100644
index 60b4692d7cb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-item/paper-item.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="paper-item-behavior.html">
-<link rel="import" href="paper-item-shared-styles.html">
-
-<!--
-Material design: [Lists](https://www.google.com/design/spec/components/lists.html)
-
-`<paper-item>` is an interactive list item. By default, it is a horizontal flexbox.
-
- <paper-item>Item</paper-item>
-
-Use this element with `<paper-item-body>` to make Material Design styled two-line and three-line
-items.
-
- <paper-item>
- <paper-item-body two-line>
- <div>Show your status</div>
- <div secondary>Your status is visible to everyone</div>
- </paper-item-body>
- <iron-icon icon="warning"></iron-icon>
- </paper-item>
-
-To use `paper-item` as a link, wrap it in an anchor tag. Since `paper-item` will
-already receive focus, you may want to prevent the anchor tag from receiving
-focus as well by setting its tabindex to -1.
-
- <a href="https://www.polymer-project.org/" tabindex="-1">
- <paper-item raised>Polymer Project</paper-item>
- </a>
-
-If you are concerned about performance and want to use `paper-item` in a `paper-listbox`
-with many items, you can just use a native `button` with the `paper-item` class
-applied (provided you have correctly included the shared styles):
-
- <style is="custom-style" include="paper-item-shared-styles"></style>
-
- <paper-listbox>
- <button class="paper-item" role="option">Inbox</button>
- <button class="paper-item" role="option">Starred</button>
- <button class="paper-item" role="option">Sent mail</button>
- </paper-listbox>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-------------------------------|----------------------------------------------|----------
-`--paper-item-min-height` | Minimum height of the item | `48px`
-`--paper-item` | Mixin applied to the item | `{}`
-`--paper-item-selected-weight`| The font weight of a selected item | `bold`
-`--paper-item-selected` | Mixin applied to selected paper-items | `{}`
-`--paper-item-disabled-color` | The color for disabled paper-items | `--disabled-text-color`
-`--paper-item-disabled` | Mixin applied to disabled paper-items | `{}`
-`--paper-item-focused` | Mixin applied to focused paper-items | `{}`
-`--paper-item-focused-before` | Mixin applied to :before focused paper-items | `{}`
-
-### Accessibility
-
-This element has `role="listitem"` by default. Depending on usage, it may be more appropriate to set
-`role="menuitem"`, `role="menuitemcheckbox"` or `role="menuitemradio"`.
-
- <paper-item role="menuitemcheckbox">
- <paper-item-body>
- Show your status
- </paper-item-body>
- <paper-checkbox></paper-checkbox>
- </paper-item>
-
-@group Paper Elements
-@element paper-item
-@demo demo/index.html
--->
-
-<dom-module id="paper-item">
- <template>
- <style include="paper-item-shared-styles"></style>
- <style>
- :host {
- @apply(--layout-horizontal);
- @apply(--layout-center);
- @apply(--paper-font-subhead);
-
- @apply(--paper-item);
- }
- </style>
-
- <content></content>
- </template>
-
- <script>
- Polymer({
- is: 'paper-item',
-
- behaviors: [
- Polymer.PaperItemBehavior
- ]
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/README.md
deleted file mode 100644
index 95f0106e558..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# paper-listbox
-
-![Build status](https://api.travis-ci.org/PolymerElements/paper-listbox.svg?branch=master)
-
-`<paper-listbox>` implements an accessible listbox control with Material Design styling.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/bower.json
deleted file mode 100644
index 66a09108b19..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/bower.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "paper-listbox",
- "version": "1.1.2",
- "description": "Implements an accessible material design listbox",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "listbox"
- ],
- "main": [
- "paper-listbox.html",
- "paper-sublistbox.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-listbox"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-listbox",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
- "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "Polymer/web-component-tester#^3.4.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/demo/index.html
deleted file mode 100644
index c79e63e775e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/demo/index.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-listbox demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-item/paper-item.html">
- <link rel="import" href="../../iron-collapse/iron-collapse.html">
- <link rel="import" href="../paper-listbox.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
-
- <style is="custom-style">
- .horizontal-section {
- padding: 0 !important;
- }
-
- .avatar {
- display: inline-block;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- overflow: hidden;
- background: #ccc;
- }
-
- paper-item {
- --paper-item: {
- cursor: pointer;
- };
- }
-
- .sublist {
- padding-left: 20px;
- padding-right: 20px;
-
- }
- </style>
-</head>
-<body unresolved>
- <div class="horizontal-section-container">
- <div>
- <h4>Standard</h4>
- <div class="horizontal-section">
- <paper-listbox>
- <paper-item>Inbox</paper-item>
- <paper-item>Starred</paper-item>
- <paper-item>Sent mail</paper-item>
- <paper-item>Drafts</paper-item>
- </paper-listbox>
- </div>
- </div>
-
- <div>
- <h4>Pre-selected</h4>
- <div class="horizontal-section">
- <paper-listbox selected="0">
- <paper-item>Inbox</paper-item>
- <paper-item disabled>Starred</paper-item>
- <paper-item>Sent mail</paper-item>
- <paper-item>Drafts</paper-item>
- </paper-listbox>
- </div>
- </div>
-
- <div>
- <h4>Multi-select</h4>
- <div class="horizontal-section">
- <paper-listbox multi>
- <paper-item>Bold</paper-item>
- <paper-item>Italic</paper-item>
- <paper-item>Underline</paper-item>
- <paper-item>Strikethrough</paper-item>
- </paper-listbox>
- </div>
- </div>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/hero.svg
deleted file mode 100755
index 91af1f60ea1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/hero.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <g>
- <circle cx="86.5" cy="39" r="4"/>
- <path d="M138,44c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
- c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,37.3,100,36,98,36v-2
- c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
- c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V44z"/>
- <circle cx="86.5" cy="63" r="4"/>
- <path d="M138,68c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
- c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,61.3,100,60,98,60v-2
- c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
- c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V68z"/>
- <circle cx="86.5" cy="88" r="4"/>
- <path d="M138,93c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
- c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,86.3,100,85,98,85v-2
- c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
- c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V93z"/>
- <path d="M151,102H73V24h78V102z M75,100h74V26H75V100z"/>
- </g>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/index.html
deleted file mode 100644
index b9dad4bd9d3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-listbox</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/paper-listbox.html b/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/paper-listbox.html
deleted file mode 100644
index 15d6cf0ea9d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-listbox/paper-listbox.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-
-<!--
-Material design: [Menus](https://www.google.com/design/spec/components/menus.html)
-
-`<paper-listbox>` implements an accessible listbox control with Material Design styling. The focused item
-is highlighted, and the selected item has bolded text.
-
- <paper-listbox>
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
- </paper-listbox>
-
-An initial selection can be specified with the `selected` attribute.
-
- <paper-listbox selected="0">
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
- </paper-listbox>
-
-Make a multi-select listbox with the `multi` attribute. Items in a multi-select listbox can be deselected,
-and multiple item can be selected.
-
- <paper-listbox multi>
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
- </paper-listbox>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-listbox-background-color` | Menu background color | `--primary-background-color`
-`--paper-listbox-color` | Menu foreground color | `--primary-text-color`
-`--paper-listbox` | Mixin applied to the listbox | `{}`
-
-### Accessibility
-
-`<paper-listbox>` has `role="listbox"` by default. A multi-select listbox will also have
-`aria-multiselectable` set. It implements key bindings to navigate through the listbox with the up and
-down arrow keys, esc to exit the listbox, and enter to activate a listbox item. Typing the first letter
-of a listbox item will also focus it.
-
-@group Paper Elements
-@element paper-listbox
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-listbox">
- <template>
- <style>
- :host {
- display: block;
- padding: 8px 0;
-
- background: var(--paper-listbox-background-color, --primary-background-color);
- color: var(--paper-listbox-color, --primary-text-color);
-
- @apply(--paper-listbox);
- }
- </style>
-
- <content></content>
- </template>
-
- <script>
- (function() {
- Polymer({
- is: 'paper-listbox',
-
- behaviors: [
- Polymer.IronMenuBehavior
- ],
-
- hostAttributes: {
- role: 'listbox'
- }
- });
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-material/.bower.json
deleted file mode 100644
index 76995ae72fa..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/.bower.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "paper-material",
- "version": "1.0.6",
- "description": "A material design container that looks like a lifted sheet of paper",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "paper",
- "container"
- ],
- "main": "paper-material.html",
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-material"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-material",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "web-component-tester": "^4.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0"
- },
- "_release": "1.0.6",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.6",
- "commit": "6aef0896fcbc25f9f5bd1dd55f7679e6ab7f92ad"
- },
- "_source": "git://github.com/PolymerElements/paper-material.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-material"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-material/.travis.yml
deleted file mode 100644
index 1834edcaecc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: PEaqY+YpV0ZhnQbJlNQbmfIFLqy7UvvCtii0sPoGKT5/P7ulMqMOPQV9l/zLAtYi14HEz63FKLqDrpnGaVe7Cz7jtt2WRWrWqTBdarqwSHs73Z2XqztD1+2wW6vgz/lfK00B8UplAk28B7d5dbWzwUF6Kg02zOfQMsawMpulFjo=
- - secure: f/3XYrYjM8aXLe9kqM/MjHQ6IEsDRuoxDqM+l2JiR3v2Nw7lP6ZyXSNvKm8bN+VNU7ubSzAmRbUGnRU7e61BhnGzuLXjOqxYeJLWZaqoSm9TDz3re3rd7wB2ddAhRokeSSPO2KeAgr6C02P9M3Au1DiO1G66fuWVH62WtzW4+qY=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-material/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-material/README.md
deleted file mode 100644
index 6a74b5e1e0e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-material.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/paper-material.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-material)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/paper-material)_
-
-
-##&lt;paper-material&gt;
-
-Material design: [Cards](https://www.google.com/design/spec/components/cards.html)
-
-`paper-material` is a container that renders two shadows on top of each other to
-create the effect of a lifted piece of paper.
-
-Example:
-
-```html
-<paper-material elevation="1">
- ... content ...
-</paper-material>
-```
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-material/bower.json
deleted file mode 100644
index 40895d2d4c6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/bower.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "paper-material",
- "version": "1.0.6",
- "description": "A material design container that looks like a lifted sheet of paper",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "paper",
- "container"
- ],
- "main": "paper-material.html",
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-material"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-material",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "web-component-tester": "^4.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-material/demo/index.html
deleted file mode 100644
index c0b6d394154..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/demo/index.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
- <title>paper-material demo</title>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../paper-material.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- paper-material {
- display: inline-block;
- background: white;
- box-sizing: border-box;
- margin: 8px;
- padding: 16px;
- border-radius: 2px;
- }
- </style>
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h3>Paper-materials can have different elevations</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-material elevation="0">0</paper-material>
- <paper-material elevation="1">1</paper-material>
- <paper-material elevation="2">2</paper-material>
- <paper-material elevation="3">3</paper-material>
- <paper-material elevation="4">4</paper-material>
- <paper-material elevation="5">5</paper-material>
- </template>
- </demo-snippet>
-
- <h3>Changes in elevation can be animated</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style>
- #a1, #a2 { cursor: pointer; }
- </style>
- Tap each of these boxes!
- <div>
- <paper-material elevation="0" animated id="a1">animated</paper-material>
- <paper-material elevation="3" id="a2">not animated</paper-material>
- </div>
- <script>
- document.addEventListener('WebComponentsReady', function() {
- a1.addEventListener('click', _onTap);
- a2.addEventListener('click', _onTap);
- });
- function _onTap(e) {
- var target = e.target;
- if (!target.down) {
- target.elevation += 1;
- if (target.elevation === 5) {
- target.down = true;
- }
- } else {
- target.elevation -= 1;
- if (target.elevation === 0) {
- target.down = false;
- }
- }
- };
- </script>
- </template>
- </demo-snippet>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-material/index.html
deleted file mode 100644
index 7209e6d0952..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-material</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material-shared-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material-shared-styles.html
deleted file mode 100644
index b795f4f47fb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material-shared-styles.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../paper-styles/shadow.html">
-
-<dom-module id="paper-material-shared-styles">
- <template>
- <style>
- :host {
- display: block;
- position: relative;
- }
-
- :host([elevation="1"]) {
- @apply(--shadow-elevation-2dp);
- }
-
- :host([elevation="2"]) {
- @apply(--shadow-elevation-4dp);
- }
-
- :host([elevation="3"]) {
- @apply(--shadow-elevation-6dp);
- }
-
- :host([elevation="4"]) {
- @apply(--shadow-elevation-8dp);
- }
-
- :host([elevation="5"]) {
- @apply(--shadow-elevation-16dp);
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material.html b/chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material.html
deleted file mode 100644
index e754d4ea336..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-material/paper-material.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../paper-styles/shadow.html">
-<link rel="import" href="paper-material-shared-styles.html">
-
-<!--
-Material design: [Cards](https://www.google.com/design/spec/components/cards.html)
-
-`paper-material` is a container that renders two shadows on top of each other to
-create the effect of a lifted piece of paper.
-
-Example:
-
- <paper-material elevation="1">
- ... content ...
- </paper-material>
-
-@group Paper Elements
-@demo demo/index.html
--->
-
-<dom-module id="paper-material">
- <template>
- <style include="paper-material-shared-styles"></style>
- <style>
- :host([animated]) {
- @apply(--shadow-transition);
- }
- </style>
-
- <content></content>
- </template>
-</dom-module>
-<script>
- Polymer({
- is: 'paper-material',
-
- properties: {
- /**
- * The z-depth of this element, from 0-5. Setting to 0 will remove the
- * shadow, and each increasing number greater than 0 will be "deeper"
- * than the last.
- *
- * @attribute elevation
- * @type number
- * @default 1
- */
- elevation: {
- type: Number,
- reflectToAttribute: true,
- value: 1
- },
-
- /**
- * Set this to true to animate the shadow when setting a new
- * `elevation` value.
- *
- * @attribute animated
- * @type boolean
- * @default false
- */
- animated: {
- type: Boolean,
- reflectToAttribute: true,
- value: false
- }
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.bower.json
deleted file mode 100644
index e6142fff525..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.bower.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "name": "paper-menu-button",
- "version": "1.1.1",
- "description": "A material design element that composes a trigger and a dropdown menu",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "menu",
- "button"
- ],
- "main": "paper-menu-button.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-menu-button.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-menu-button",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-dropdown": "PolymerElements/iron-dropdown#^1.0.0",
- "neon-animation": "PolymerElements/neon-animation#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "iron-image": "PolymerElements/iron-image#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-menu": "PolymerElements/paper-menu#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "_release": "1.1.1",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.1",
- "commit": "2d4d1cbdcfe260878e972e42d73ca5a3b7248cb9"
- },
- "_source": "git://github.com/PolymerElements/paper-menu-button.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-menu-button"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.travis.yml
deleted file mode 100644
index 2b43e04fc85..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: KylA/s+GkWGDpW9vcaBDrcr9M4xsE7HVyH36I5p7UBvQUiqPMFR/+GbFx7UoYR1OPNMf2hgHD4nd5G8hfnKjFuRl8NKe63Dnwt+83tKO9MKWrOAPq1/fMG/ZS1vRNP8Jqkp3iOsRUdatWsrs9LA5Pa6tM2OefQXs5ZF0F8s+de8Wv3+QwoGSjfJmTTC8j9tvrzEI6eOX66PAFGWUnySwV66tph+LRT/B/Y2HDcA0KbQucbyxCMnKU100xGJwK3+ZuPTEnqEqPv7R/9Z1Ggh+wXO/MduN+7OO6ZbF9//jrQNSY4QMKcz5zziYa0ugXH7F7HZijq3qxuLST0edPknozGi4xR7Vn00Zu8yHkIKYqswHrXM97qwoZZkBkwD8LEoZTkEIvk/uts68WVTiFaXV2FufBjl48E1BpjvMX1fW0hKTyFKXURXiJBphwNepyHFHpxSF29TKW1FBXy9ITiSMmKrdmqnnPliunDU44NK23tiuY90ZLKPLcOHBzLU7yzqVu67flbWxoWCCkP8gEkT6qRWHzRiZOiw0eHvXkmE1Gs+z1q/JuDg8Aaa40lm9oKC+dY8AfmQDhfXgfd89RbsF+AsJk7kp6wOVGCgmanrAeFSQcdU3qHB0ZQspS5kD1Y6mxl/R9a0iQnhtcHyLTadG8bfvc3EzP+2nYrP326Kir60=
- - secure: HBHAEcnTe6APHH/ZHmN4fd1sid/RCsgUsn7abA3hRxU6PM4Jo0C4nZhet60Q8joQyxiA415FSETvJVhdY7zHUcmxd0KklEAZjKX08v5vroAGJt0OUmxpZ/scoAcC09JfnZeVFO8Df/kx1WWP+q2LydrZhasPP8ifM+BBdD2wE/ShM6Jz7E5yQHgQ+pUf5yShfOzoYy0+tYtBpm9bxxj1i9qjPEfUiOxAWmSpefJ94dcIh2mCFpakBhPRh/l6FQip0+NPT00YEpk5/fDh+I2Apg8whWm02WiqGsXUpZZZaiGn8oAO5XckrKJGm0xuGYrI3cM1zRvsieaA424WwXNCSkXt6M8s0zQTqj+wlFQMOpEoIgD8dKW0gkIEt09ChKgmhs82FKE3OuI+Nz5z9DRRrtfoOckPi0bjVsOmXNDX0x569dpNOoJB21opfj6Nyl3Ln7/9q1J4LStt/VeuHzUUhBI33GTSlqW6qg0E0difa/bOc8dhSuXQ3Y8uunAXPk1Do7sWUhszF7k/wOjZ/oMsvvl8CiNZCJn0dbvrANOACNW8qBLoAlw2eHwA0wGTuN3VCZohYnHkeioYfkAFzPZX6QR4+NdpOorGBhxuOm0R7rR2q3SIrd+6Wd+T6A4+NLL8e+A57pc2lHKhtSwOOE7DdQpzrVyfN5NOaixlScqcbAw=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/README.md
deleted file mode 100644
index 4e45429b62b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-menu-button-animations.html paper-menu-button.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-menu-button.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-menu-button)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-menu-button)_
-
-
-##&lt;paper-menu-button&gt;
-
-Material design: [Dropdown buttons](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
-
-`paper-menu-button` allows one to compose a designated "trigger" element with
-another element that represents "content", to create a dropdown menu that
-displays the "content" when the "trigger" is clicked.
-
-The child element with the class `dropdown-trigger` will be used as the
-"trigger" element. The child element with the class `dropdown-content` will be
-used as the "content" element.
-
-The `paper-menu-button` is sensitive to its content's `iron-select` events. If
-the "content" element triggers an `iron-select` event, the `paper-menu-button`
-will close automatically.
-
-Example:
-
-```html
-<paper-menu-button>
- <paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
- <paper-menu class="dropdown-content">
- <paper-item>Share</paper-item>
- <paper-item>Settings</paper-item>
- <paper-item>Help</paper-item>
- </paper-menu>
-</paper-menu-button>
-```
-
-### Styling
-
-The following custom properties and mixins are also available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-menu-button-dropdown-background` | Background color of the paper-menu-button dropdown | `--primary-background-color` |
-| `--paper-menu-button` | Mixin applied to the paper-menu-button | `{}` |
-| `--paper-menu-button-disabled` | Mixin applied to the paper-menu-button when disabled | `{}` |
-| `--paper-menu-button-dropdown` | Mixin applied to the paper-menu-button dropdown | `{}` |
-| `--paper-menu-button-content` | Mixin applied to the paper-menu-button content | `{}` |
-
-
-
-<!-- No docs for <paper-menu-grow-height-animation> found. -->
-
-<!-- No docs for <paper-menu-grow-width-animation> found. -->
-
-<!-- No docs for <paper-menu-shrink-height-animation> found. -->
-
-<!-- No docs for <paper-menu-shrink-width-animation> found. -->
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/bower.json
deleted file mode 100644
index 58a0a5c734e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/bower.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "paper-menu-button",
- "version": "1.1.1",
- "description": "A material design element that composes a trigger and a dropdown menu",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "web-component",
- "polymer",
- "menu",
- "button"
- ],
- "main": "paper-menu-button.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-menu-button.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-menu-button",
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-dropdown": "PolymerElements/iron-dropdown#^1.0.0",
- "neon-animation": "PolymerElements/neon-animation#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "iron-image": "PolymerElements/iron-image#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "paper-menu": "PolymerElements/paper-menu#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/demo/index.html
deleted file mode 100644
index e439951450b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/demo/index.html
+++ /dev/null
@@ -1,203 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-menu-button</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../iron-icon/iron-icon.html">
- <link rel="import" href="../../iron-image/iron-image.html">
- <link rel="import" href="../../paper-menu/paper-menu.html">
- <link rel="import" href="../../paper-item/paper-item.html">
- <link rel="import" href="../../paper-button/paper-button.html">
- <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
-
- <link rel="import" href="../paper-menu-button.html">
-
- <style is="custom-style">
- paper-button {
- display: block;
- background: #4285f4;
- color: #fff;
- }
-
- paper-menu {
- display: block;
- }
-
- paper-menu-button {
- margin: auto;
- }
-
- iron-image {
- padding: 1em;
- }
-
- .item {
- max-width: 300px;
- }
-
- .horizontal-section {
- text-align: center;
- }
- </style>
-
-</head>
-<body unresolved>
-
-
- <template id="Demo" is="dom-bind">
-
- <div class="horizontal-section-container">
- <div>
- <h4>Paper Icon Button + Paper Menu</h4>
- <div class="horizontal-section">
- <paper-menu-button>
- <paper-icon-button icon="menu" class="dropdown-trigger" alt="menu"></paper-icon-button>
- <paper-menu class="dropdown-content">
- <template is="dom-repeat" items="[[letters]]" as="letter">
- <paper-item>[[letter]]</paper-item>
- </template>
- </paper-menu>
- </paper-menu-button>
- </div>
- </div>
- </div>
-
- <div class="horizontal-section-container">
- <div>
- <h4>Paper Menu with multi selection</h4>
- <div class="horizontal-section">
- <paper-menu-button ignore-select>
- <paper-icon-button icon="menu" class="dropdown-trigger" alt="multi select"></paper-icon-button>
- <paper-menu class="dropdown-content" multi>
- <template is="dom-repeat" items="[[letters]]" as="letter">
- <paper-item>[[letter]]</paper-item>
- </template>
- </paper-menu>
- </paper-menu-button>
- </div>
- </div>
- </div>
-
- <div class="horizontal-section-container">
- <div>
- <h4>Disabled</h4>
- <div class="horizontal-section">
- <paper-menu-button disabled>
- <paper-icon-button icon="menu" class="dropdown-trigger" alt="menu"></paper-icon-button>
- <paper-menu class="dropdown-content">
- <template is="dom-repeat" items="[[letters]]" as="letter">
- <paper-item>[[letter]]</paper-item>
- </template>
- </paper-menu>
- </paper-menu-button>
- </div>
- </div>
- </div>
-
- <div class="horizontal-section-container">
- <div>
- <h4>Alternate Alignment</h4>
- <div class="horizontal-section">
- <paper-menu-button vertical-align="bottom" horizontal-align="right">
- <paper-icon-button icon="menu" class="dropdown-trigger" alt="bottom align"></paper-icon-button>
- <paper-menu class="dropdown-content">
- <template is="dom-repeat" items="[[letters]]" as="letter">
- <paper-item>[[letter]]</paper-item>
- </template>
- </paper-menu>
- </paper-menu-button>
- </div>
- </div>
- </div>
-
- <div class="horizontal-section-container">
- <div>
- <h4>Alternate Button</h4>
- <div class="horizontal-section">
- <paper-menu-button>
- <paper-button class="dropdown-trigger" raised>
- <iron-icon icon="check"></iron-icon>
- <span>Dinosaurs</span>
- </paper-button>
- <paper-menu class="dropdown-content">
- <template is="dom-repeat" items="[[dinosaurs]]" as="dinosaur">
- <paper-item>[[dinosaur]]</paper-item>
- </template>
- </paper-menu>
- </paper-menu-button>
- </div>
- </div>
- </div>
-
- <div class="horizontal-section-container">
- <div>
- <h4>Alternate Content</h4>
- <div class="horizontal-section">
- <paper-menu-button vertical-align="bottom">
- <paper-icon-button class="dropdown-trigger" icon="polymer" alt="polymer"></paper-icon-button>
- <iron-image class="dropdown-content" src="../../iron-image/demo/polymer.svg"></iron-image>
- </paper-menu-button>
- </div>
- </div>
- </div>
- </template>
-
- <script>
- Demo.letters = [
- 'alpha',
- 'beta',
- 'gamma',
- 'delta',
- 'epsilon'
- ];
- Demo.dinosaurs = [
- 'allosaurus',
- 'brontosaurus',
- 'carcharodontosaurus',
- 'diplodocus',
- 'ekrixinatosaurus',
- 'fukuiraptor',
- 'gallimimus',
- 'hadrosaurus',
- 'iguanodon',
- 'jainosaurus',
- 'kritosaurus',
- 'liaoceratops',
- 'megalosaurus',
- 'nemegtosaurus',
- 'ornithomimus',
- 'protoceratops',
- 'quetecsaurus',
- 'rajasaurus',
- 'stegosaurus',
- 'triceratops',
- 'utahraptor',
- 'vulcanodon',
- 'wannanosaurus',
- 'xenoceratops',
- 'yandusaurus',
- 'zephyrosaurus'
- ];
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/hero.svg
deleted file mode 100755
index 31c411c969c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/hero.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <circle cx="109" cy="45" r="4"/>
- <path d="M165,50c-2.8,0-4.1-2.4-5.3-4.5c-1.2-2.2-2-3.5-3.5-3.5c-1.5,0-2.3,1.3-3.5,3.5c-1.2,2.1-2.5,4.5-5.3,4.5
- c-2.8,0-4.1-2.4-5.3-4.5c-1.2-2.2-2-3.5-3.5-3.5c-1.5,0-2.3,1.3-3.5,3.5c-1.2,2.1-2.5,4.5-5.3,4.5c-2.8,0-4.1-2.4-5.3-4.5
- c-1.2-2.2-2-3.5-3.5-3.5v-2c2.8,0,4.1,2.4,5.3,4.5c1.2,2.2,2,3.5,3.5,3.5c1.5,0,2.3-1.3,3.5-3.5c1.2-2.1,2.5-4.5,5.3-4.5
- c2.8,0,4.1,2.4,5.3,4.5c1.2,2.2,2,3.5,3.5,3.5c1.5,0,2.3-1.3,3.5-3.5c1.2-2.1,2.5-4.5,5.3-4.5s4.1,2.4,5.3,4.5
- c1.2,2.2,2,3.5,3.5,3.5V50z"/>
- <circle cx="109" cy="63" r="4"/>
- <path d="M165,68c-2.8,0-4.1-2.4-5.3-4.5c-1.2-2.2-2-3.5-3.5-3.5c-1.5,0-2.3,1.3-3.5,3.5c-1.2,2.1-2.5,4.5-5.3,4.5
- c-2.8,0-4.1-2.4-5.3-4.5c-1.2-2.2-2-3.5-3.5-3.5c-1.5,0-2.3,1.3-3.5,3.5c-1.2,2.1-2.5,4.5-5.3,4.5c-2.8,0-4.1-2.4-5.3-4.5
- c-1.2-2.2-2-3.5-3.5-3.5v-2c2.8,0,4.1,2.4,5.3,4.5c1.2,2.2,2,3.5,3.5,3.5c1.5,0,2.3-1.3,3.5-3.5c1.2-2.1,2.5-4.5,5.3-4.5
- c2.8,0,4.1,2.4,5.3,4.5c1.2,2.2,2,3.5,3.5,3.5c1.5,0,2.3-1.3,3.5-3.5c1.2-2.1,2.5-4.5,5.3-4.5s4.1,2.4,5.3,4.5
- c1.2,2.2,2,3.5,3.5,3.5V68z"/>
- <circle cx="109" cy="81" r="4"/>
- <path d="M165,86c-2.8,0-4.1-2.4-5.3-4.5c-1.2-2.2-2-3.5-3.5-3.5c-1.5,0-2.3,1.3-3.5,3.5c-1.2,2.1-2.5,4.5-5.3,4.5
- c-2.8,0-4.1-2.4-5.3-4.5c-1.2-2.2-2-3.5-3.5-3.5c-1.5,0-2.3,1.3-3.5,3.5c-1.2,2.1-2.5,4.5-5.3,4.5c-2.8,0-4.1-2.4-5.3-4.5
- c-1.2-2.2-2-3.5-3.5-3.5v-2c2.8,0,4.1,2.4,5.3,4.5c1.2,2.2,2,3.5,3.5,3.5c1.5,0,2.3-1.3,3.5-3.5c1.2-2.1,2.5-4.5,5.3-4.5
- c2.8,0,4.1,2.4,5.3,4.5c1.2,2.2,2,3.5,3.5,3.5c1.5,0,2.3-1.3,3.5-3.5c1.2-2.1,2.5-4.5,5.3-4.5s4.1,2.4,5.3,4.5
- c1.2,2.2,2,3.5,3.5,3.5V86z"/>
- <path d="M176,98H94V28h82V98z M96,96h78V30H96V96z"/>
- <circle cx="65" cy="61" r="8"/>
- <path d="M82,78H48V44h34V78z M50,76h30V46H50V76z"/>
- <rect x="81" y="58" width="14" height="2"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/index.html
deleted file mode 100644
index 040b19528b3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
-The complete set of authors may be found at http://polymer.github.io/AUTHORS
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
--->
-<html>
-<head>
-
- <title>paper-menu-button</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button-animations.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button-animations.html
deleted file mode 100644
index b1339f29307..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button-animations.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../neon-animation/web-animations.html">
-<link rel="import" href="../neon-animation/neon-animation-behavior.html">
-<script>
- Polymer({
- is: 'paper-menu-grow-height-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- var rect = node.getBoundingClientRect();
- var height = rect.height;
-
- this._effect = new KeyframeEffect(node, [{
- height: (height / 2) + 'px'
- }, {
- height: height + 'px'
- }], this.timingFromConfig(config));
-
- return this._effect;
- }
- });
-
- Polymer({
- is: 'paper-menu-grow-width-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- var rect = node.getBoundingClientRect();
- var width = rect.width;
-
- this._effect = new KeyframeEffect(node, [{
- width: (width / 2) + 'px'
- }, {
- width: width + 'px'
- }], this.timingFromConfig(config));
-
- return this._effect;
- }
- });
-
- Polymer({
- is: 'paper-menu-shrink-width-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- var rect = node.getBoundingClientRect();
- var width = rect.width;
-
- this._effect = new KeyframeEffect(node, [{
- width: width + 'px'
- }, {
- width: width - (width / 20) + 'px'
- }], this.timingFromConfig(config));
-
- return this._effect;
- }
- });
-
- Polymer({
- is: 'paper-menu-shrink-height-animation',
-
- behaviors: [
- Polymer.NeonAnimationBehavior
- ],
-
- configure: function(config) {
- var node = config.node;
- var rect = node.getBoundingClientRect();
- var height = rect.height;
- var top = rect.top;
-
- this.setPrefixedProperty(node, 'transformOrigin', '0 0');
-
- this._effect = new KeyframeEffect(node, [{
- height: height + 'px',
- transform: 'translateY(0)'
- }, {
- height: height / 2 + 'px',
- transform: 'translateY(-20px)'
- }], this.timingFromConfig(config));
-
- return this._effect;
- }
- });
-</script>
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button.html
deleted file mode 100644
index 77e29c6fb29..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu-button/paper-menu-button.html
+++ /dev/null
@@ -1,407 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-dropdown/iron-dropdown.html">
-<link rel="import" href="../neon-animation/animations/fade-in-animation.html">
-<link rel="import" href="../neon-animation/animations/fade-out-animation.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/shadow.html">
-<link rel="import" href="paper-menu-button-animations.html">
-
-<!--
-Material design: [Dropdown buttons](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
-
-`paper-menu-button` allows one to compose a designated "trigger" element with
-another element that represents "content", to create a dropdown menu that
-displays the "content" when the "trigger" is clicked.
-
-The child element with the class `dropdown-trigger` will be used as the
-"trigger" element. The child element with the class `dropdown-content` will be
-used as the "content" element.
-
-The `paper-menu-button` is sensitive to its content's `iron-select` events. If
-the "content" element triggers an `iron-select` event, the `paper-menu-button`
-will close automatically.
-
-Example:
-
- <paper-menu-button>
- <paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
- <paper-menu class="dropdown-content">
- <paper-item>Share</paper-item>
- <paper-item>Settings</paper-item>
- <paper-item>Help</paper-item>
- </paper-menu>
- </paper-menu-button>
-
-### Styling
-
-The following custom properties and mixins are also available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-menu-button-dropdown-background` | Background color of the paper-menu-button dropdown | `--primary-background-color`
-`--paper-menu-button` | Mixin applied to the paper-menu-button | `{}`
-`--paper-menu-button-disabled` | Mixin applied to the paper-menu-button when disabled | `{}`
-`--paper-menu-button-dropdown` | Mixin applied to the paper-menu-button dropdown | `{}`
-`--paper-menu-button-content` | Mixin applied to the paper-menu-button content | `{}`
-
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-menu-button">
- <template>
- <style>
- :host {
- display: inline-block;
- position: relative;
- padding: 8px;
- outline: none;
-
- @apply(--paper-menu-button);
- }
-
- :host([disabled]) {
- cursor: auto;
- color: var(--disabled-text-color);
-
- @apply(--paper-menu-button-disabled);
- }
-
- iron-dropdown {
- @apply(--paper-menu-button-dropdown);
- }
-
- .dropdown-content {
- @apply(--shadow-elevation-2dp);
-
- position: relative;
- border-radius: 2px;
- background-color: var(--paper-menu-button-dropdown-background, --primary-background-color);
-
- @apply(--paper-menu-button-content);
- }
-
- :host([vertical-align="top"]) .dropdown-content {
- margin-bottom: 20px;
- margin-top: -10px;
- top: 10px;
- }
-
- :host([vertical-align="bottom"]) .dropdown-content {
- bottom: 10px;
- margin-bottom: -10px;
- margin-top: 20px;
- }
- </style>
-
- <div id="trigger" on-tap="toggle">
- <content select=".dropdown-trigger"></content>
- </div>
-
- <iron-dropdown
- id="dropdown"
- opened="{{opened}}"
- horizontal-align="[[horizontalAlign]]"
- vertical-align="[[verticalAlign]]"
- horizontal-offset="[[horizontalOffset]]"
- vertical-offset="[[verticalOffset]]"
- open-animation-config="[[openAnimationConfig]]"
- close-animation-config="[[closeAnimationConfig]]"
- no-animations="[[noAnimations]]"
- focus-target="[[_dropdownContent]]"
- restore-focus-on-close
- on-iron-overlay-canceled="__onIronOverlayCanceled">
- <div class="dropdown-content">
- <content id="content" select=".dropdown-content"></content>
- </div>
- </iron-dropdown>
- </template>
-
- <script>
- (function() {
- 'use strict';
-
- var PaperMenuButton = Polymer({
- is: 'paper-menu-button',
-
- /**
- * Fired when the dropdown opens.
- *
- * @event paper-dropdown-open
- */
-
- /**
- * Fired when the dropdown closes.
- *
- * @event paper-dropdown-close
- */
-
- behaviors: [
- Polymer.IronA11yKeysBehavior,
- Polymer.IronControlState
- ],
-
- properties: {
- /**
- * True if the content is currently displayed.
- */
- opened: {
- type: Boolean,
- value: false,
- notify: true,
- observer: '_openedChanged'
- },
-
- /**
- * The orientation against which to align the menu dropdown
- * horizontally relative to the dropdown trigger.
- */
- horizontalAlign: {
- type: String,
- value: 'left',
- reflectToAttribute: true
- },
-
- /**
- * The orientation against which to align the menu dropdown
- * vertically relative to the dropdown trigger.
- */
- verticalAlign: {
- type: String,
- value: 'top',
- reflectToAttribute: true
- },
-
- /**
- * A pixel value that will be added to the position calculated for the
- * given `horizontalAlign`. Use a negative value to offset to the
- * left, or a positive value to offset to the right.
- */
- horizontalOffset: {
- type: Number,
- value: 0,
- notify: true
- },
-
- /**
- * A pixel value that will be added to the position calculated for the
- * given `verticalAlign`. Use a negative value to offset towards the
- * top, or a positive value to offset towards the bottom.
- */
- verticalOffset: {
- type: Number,
- value: 0,
- notify: true
- },
-
- /**
- * Set to true to disable animations when opening and closing the
- * dropdown.
- */
- noAnimations: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to disable automatically closing the dropdown after
- * a selection has been made.
- */
- ignoreSelect: {
- type: Boolean,
- value: false
- },
-
- /**
- * An animation config. If provided, this will be used to animate the
- * opening of the dropdown.
- */
- openAnimationConfig: {
- type: Object,
- value: function() {
- return [{
- name: 'fade-in-animation',
- timing: {
- delay: 100,
- duration: 200
- }
- }, {
- name: 'paper-menu-grow-width-animation',
- timing: {
- delay: 100,
- duration: 150,
- easing: PaperMenuButton.ANIMATION_CUBIC_BEZIER
- }
- }, {
- name: 'paper-menu-grow-height-animation',
- timing: {
- delay: 100,
- duration: 275,
- easing: PaperMenuButton.ANIMATION_CUBIC_BEZIER
- }
- }];
- }
- },
-
- /**
- * An animation config. If provided, this will be used to animate the
- * closing of the dropdown.
- */
- closeAnimationConfig: {
- type: Object,
- value: function() {
- return [{
- name: 'fade-out-animation',
- timing: {
- duration: 150
- }
- }, {
- name: 'paper-menu-shrink-width-animation',
- timing: {
- delay: 100,
- duration: 50,
- easing: PaperMenuButton.ANIMATION_CUBIC_BEZIER
- }
- }, {
- name: 'paper-menu-shrink-height-animation',
- timing: {
- duration: 200,
- easing: 'ease-in'
- }
- }];
- }
- },
-
- /**
- * This is the element intended to be bound as the focus target
- * for the `iron-dropdown` contained by `paper-menu-button`.
- */
- _dropdownContent: {
- type: Object
- }
- },
-
- hostAttributes: {
- role: 'group',
- 'aria-haspopup': 'true'
- },
-
- listeners: {
- 'iron-select': '_onIronSelect'
- },
-
- /**
- * The content element that is contained by the menu button, if any.
- */
- get contentElement() {
- return Polymer.dom(this.$.content).getDistributedNodes()[0];
- },
-
- /**
- * Toggles the drowpdown content between opened and closed.
- */
- toggle: function() {
- if (this.opened) {
- this.close();
- } else {
- this.open();
- }
- },
-
- /**
- * Make the dropdown content appear as an overlay positioned relative
- * to the dropdown trigger.
- */
- open: function() {
- if (this.disabled) {
- return;
- }
-
- this.$.dropdown.open();
- },
-
- /**
- * Hide the dropdown content.
- */
- close: function() {
- this.$.dropdown.close();
- },
-
- /**
- * When an `iron-select` event is received, the dropdown should
- * automatically close on the assumption that a value has been chosen.
- *
- * @param {CustomEvent} event A CustomEvent instance with type
- * set to `"iron-select"`.
- */
- _onIronSelect: function(event) {
- if (!this.ignoreSelect) {
- this.close();
- }
- },
-
- /**
- * When the dropdown opens, the `paper-menu-button` fires `paper-open`.
- * When the dropdown closes, the `paper-menu-button` fires `paper-close`.
- *
- * @param {boolean} opened True if the dropdown is opened, otherwise false.
- * @param {boolean} oldOpened The previous value of `opened`.
- */
- _openedChanged: function(opened, oldOpened) {
- if (opened) {
- // TODO(cdata): Update this when we can measure changes in distributed
- // children in an idiomatic way.
- // We poke this property in case the element has changed. This will
- // cause the focus target for the `iron-dropdown` to be updated as
- // necessary:
- this._dropdownContent = this.contentElement;
- this.fire('paper-dropdown-open');
- } else if (oldOpened != null) {
- this.fire('paper-dropdown-close');
- }
- },
-
- /**
- * If the dropdown is open when disabled becomes true, close the
- * dropdown.
- *
- * @param {boolean} disabled True if disabled, otherwise false.
- */
- _disabledChanged: function(disabled) {
- Polymer.IronControlState._disabledChanged.apply(this, arguments);
- if (disabled && this.opened) {
- this.close();
- }
- },
-
- __onIronOverlayCanceled: function(event) {
- var uiEvent = event.detail;
- var target = Polymer.dom(uiEvent).rootTarget;
- var trigger = this.$.trigger;
- var path = Polymer.dom(uiEvent).path;
-
- if (path.indexOf(trigger) > -1) {
- event.preventDefault();
- }
- }
- });
-
- PaperMenuButton.ANIMATION_CUBIC_BEZIER = 'cubic-bezier(.3,.95,.5,1)';
- PaperMenuButton.MAX_ANIMATION_TIME_MS = 400;
-
- Polymer.PaperMenuButton = PaperMenuButton;
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/.bower.json
deleted file mode 100644
index 2feb07eddb1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/.bower.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "paper-menu",
- "version": "1.2.2",
- "description": "Implements an accessible material design menu",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "menu"
- ],
- "main": [
- "paper-menu.html",
- "paper-submenu.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-menu"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-menu",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
- "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "_release": "1.2.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.2",
- "commit": "f31a1dbc5b594a84c8c01eca0f23f9bcb8f6ba76"
- },
- "_source": "git://github.com/PolymerElements/paper-menu.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-menu"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/.travis.yml
deleted file mode 100644
index 429eafc46bf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: Mh0qP0wSbfQ00LpaW8ObBU6CBLqgUgIM/Qvuog7dw7atnZ3a2I7UqLXCJHkH0a66r0bF2PyuS6a8qz/croSr1rQQ0G+1HgNczm7nuQO8cw2ZLXZglpaldYfUzKBw9ip+XGA1zgFQ1+O3uWisy+4pQrsGhRsB1RSmXBcKJsSUjZw=
- - secure: QhEW2jW0Uj3dp4xJOYVfP/MUV2UeZW48811cDZRSwWQ/43vrZU/4VCSTFJdODZ4A9nXAhOeKtT+S1BWoH4VslGLCfmrF1dbTxHZEdg2WAt8OkV9XpMNMBYtGomlUs9asnU/Q1294DWolAGG8wwnReibg0r6H3VQCmD4vIE6oEmQ=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/CONTRIBUTING.md
deleted file mode 100644
index 7b101415652..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/CONTRIBUTING.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/README.md
deleted file mode 100644
index 9dbd2b2c125..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/README.md
+++ /dev/null
@@ -1,113 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-menu.html paper-submenu.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build Status](https://travis-ci.org/PolymerElements/paper-menu.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-menu)
-
-_[Demo and API Docs](https://elements.polymer-project.org/elements/paper-menu)_
-
-
-##&lt;paper-menu&gt;
-
-Material design: [Menus](https://www.google.com/design/spec/components/menus.html)
-
-`<paper-menu>` implements an accessible menu control with Material Design styling. The focused item
-is highlighted, and the selected item has bolded text.
-
-```html
-<paper-menu>
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
-</paper-menu>
-```
-
-An initial selection can be specified with the `selected` attribute.
-
-```html
-<paper-menu selected="0">
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
-</paper-menu>
-```
-
-Make a multi-select menu with the `multi` attribute. Items in a multi-select menu can be deselected,
-and multiple items can be selected.
-
-```html
-<paper-menu multi>
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
-</paper-menu>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-menu-background-color` | Menu background color | `--primary-background-color` |
-| `--paper-menu-color` | Menu foreground color | `--primary-text-color` |
-| `--paper-menu-disabled-color` | Foreground color for a disabled item | `--disabled-text-color` |
-| `--paper-menu` | Mixin applied to the menu | `{}` |
-| `--paper-menu-selected-item` | Mixin applied to the selected item | `{}` |
-| `--paper-menu-focused-item` | Mixin applied to the focused item | `{}` |
-| `--paper-menu-focused-item-after` | Mixin applied to the ::after pseudo-element for the focused item | `{}` |
-
-### Accessibility
-
-`<paper-menu>` has `role="menu"` by default. A multi-select menu will also have
-`aria-multiselectable` set. It implements key bindings to navigate through the menu with the up and
-down arrow keys, esc to exit the menu, and enter to activate a menu item. Typing the first letter
-of a menu item will also focus it.
-
-
-
-##&lt;paper-submenu&gt;
-
-`<paper-submenu>` is a nested menu inside of a parent `<paper-menu>`. It
-consists of a trigger that expands or collapses another `<paper-menu>`:
-
-```html
-<paper-menu>
- <paper-submenu>
- <paper-item class="menu-trigger">Topics</paper-item>
- <paper-menu class="menu-content">
- <paper-item>Topic 1</paper-item>
- <paper-item>Topic 2</paper-item>
- <paper-item>Topic 3</paper-item>
- </paper-menu>
- </paper-submenu>
- <paper-submenu>
- <paper-item class="menu-trigger">Faves</paper-item>
- <paper-menu class="menu-content">
- <paper-item>Fave 1</paper-item>
- <paper-item>Fave 2</paper-item>
- </paper-menu>
- </paper-submenu>
- <paper-submenu disabled>
- <paper-item class="menu-trigger">Unavailable</paper-item>
- <paper-menu class="menu-content">
- <paper-item>Disabled 1</paper-item>
- <paper-item>Disabled 2</paper-item>
- </paper-menu>
- </paper-submenu>
-</paper-menu>
-```
-
-Just like in `<paper-menu>`, the focused item is highlighted, and the selected
-item has bolded text. Please see the `<paper-menu>` docs for which attributes
-(such as `multi` and `selected`), and styling options are available for the
-`menu-content` menu.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/bower.json
deleted file mode 100644
index 661403112ff..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "paper-menu",
- "version": "1.2.2",
- "description": "Implements an accessible material design menu",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "menu"
- ],
- "main": [
- "paper-menu.html",
- "paper-submenu.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-menu"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-menu",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
- "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-item": "PolymerElements/paper-item#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/demo/index.html
deleted file mode 100644
index a7cd2c945fb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/demo/index.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <title>paper-menu demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../paper-item/paper-item.html">
- <link rel="import" href="../../iron-collapse/iron-collapse.html">
- <link rel="import" href="../paper-menu.html">
- <link rel="import" href="../paper-submenu.html">
- <link rel="import" href="../../paper-styles/demo-pages.html">
-
- <style is="custom-style">
- .horizontal-section {
- padding: 0 !important;
- }
-
- .avatar {
- display: inline-block;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- overflow: hidden;
- background: #ccc;
- }
-
- paper-item {
- --paper-item: {
- cursor: pointer;
- };
- }
-
- .sublist paper-item {
- padding-left: 30px;
- }
-
- .sublist2 paper-item {
- padding-left: 50px;
- }
- </style>
-</head>
-<body unresolved>
- <div class="horizontal-section-container">
- <div>
- <h4>Standard</h4>
- <div class="horizontal-section">
- <paper-menu>
- <paper-item>Inbox</paper-item>
- <paper-item>Starred</paper-item>
- <paper-item>Sent mail</paper-item>
- <paper-item>Drafts</paper-item>
- </paper-menu>
- </div>
- </div>
-
- <div>
- <h4>Pre-selected</h4>
- <div class="horizontal-section">
- <paper-menu selected="0">
- <paper-item>Inbox</paper-item>
- <paper-item disabled>Starred</paper-item>
- <paper-item>Sent mail</paper-item>
- <paper-item>Drafts</paper-item>
- </paper-menu>
- </div>
- </div>
-
- <div>
- <h4>Multi-select</h4>
- <div class="horizontal-section">
- <paper-menu multi>
- <paper-item>Bold</paper-item>
- <paper-item>Italic</paper-item>
- <paper-item>Underline</paper-item>
- <paper-item>Strikethrough</paper-item>
- </paper-menu>
- </div>
- </div>
-
- <div>
- <h4>Sub-menu</h4>
- <div class="horizontal-section">
- <paper-menu attr-for-item-title="label" multi>
- <paper-submenu label="paper-menu">
- <paper-item class="menu-trigger">paper-menu</paper-item>
- <paper-menu class="menu-content sublist" multi>
- <paper-submenu label="Properties">
- <paper-item class="menu-trigger">Properties</paper-item>
- <paper-menu class="menu-content sublist2">
- <paper-item>focusedItem</paper-item>
- <paper-item>attrForItemTitle</paper-item>
- </paper-menu>
- </paper-submenu>
- <paper-submenu label="Methods">
- <paper-item class="menu-trigger">Methods</paper-item>
- <paper-menu class="menu-content sublist2">
- <paper-item>select(value)</paper-item>
- </paper-menu>
- </paper-submenu>
- </paper-menu>
- </paper-submenu>
-
- <paper-submenu label="paper-submenu">
- <paper-item class="menu-trigger">paper-submenu</paper-item>
- <paper-menu class="menu-content sublist">
- <paper-submenu label="Properties">
- <paper-item class="menu-trigger">Properties</paper-item>
- <paper-menu class="menu-content sublist2">
- <paper-item>opened</paper-item>
- </paper-menu>
- </paper-submenu>
- <paper-submenu label="Methods">
- <paper-item class="menu-trigger">Methods</paper-item>
- <paper-menu class="menu-content sublist2">
- <paper-item>open()</paper-item>
- <paper-item>close()</paper-item>
- <paper-item>toggle()</paper-item>
- </paper-menu>
- </paper-submenu>
- </paper-menu>
- </paper-submenu>
-
- <paper-submenu label="Unavailable" disabled>
- <paper-item class="menu-trigger">Unavailable</paper-item>
- <paper-menu class="menu-content sublist">
- <paper-item>Unavailable 1</paper-item>
- <paper-item>Unavailable 2</paper-item>
- </paper-menu>
- </paper-submenu>
- </paper-menu>
- </div>
- </div>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/hero.svg
deleted file mode 100755
index 91af1f60ea1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/hero.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <g>
- <circle cx="86.5" cy="39" r="4"/>
- <path d="M138,44c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
- c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,37.3,100,36,98,36v-2
- c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
- c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V44z"/>
- <circle cx="86.5" cy="63" r="4"/>
- <path d="M138,68c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
- c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,61.3,100,60,98,60v-2
- c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
- c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V68z"/>
- <circle cx="86.5" cy="88" r="4"/>
- <path d="M138,93c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
- c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,86.3,100,85,98,85v-2
- c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
- c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V93z"/>
- <path d="M151,102H73V24h78V102z M75,100h74V26H75V100z"/>
- </g>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/index.html
deleted file mode 100644
index fc8841148b2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-menu</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu-shared-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu-shared-styles.html
deleted file mode 100644
index 840bc7382ae..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu-shared-styles.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<dom-module id="paper-menu-shared-styles">
- <template>
- <style>
- /* need a wrapper element to make this higher specificity than the :host rule in paper-item */
- .selectable-content > ::content > .iron-selected {
- font-weight: bold;
-
- @apply(--paper-menu-selected-item);
- }
-
- .selectable-content > ::content > [disabled] {
- color: var(--paper-menu-disabled-color, --disabled-text-color);
- }
-
- .selectable-content > ::content > *:focus {
- position: relative;
- outline: 0;
-
- @apply(--paper-menu-focused-item);
- }
-
- .selectable-content > ::content > *:focus:after {
- @apply(--layout-fit);
- background: currentColor;
- opacity: var(--dark-divider-opacity);
- content: '';
- pointer-events: none;
-
- @apply(--paper-menu-focused-item-after);
- }
-
- .selectable-content > ::content > *[colored]:focus:after {
- opacity: 0.26;
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu.html
deleted file mode 100644
index 10e562b4085..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-menu.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/color.html">
-<link rel="import" href="paper-menu-shared-styles.html">
-
-<!--
-Material design: [Menus](https://www.google.com/design/spec/components/menus.html)
-
-`<paper-menu>` implements an accessible menu control with Material Design styling. The focused item
-is highlighted, and the selected item has bolded text.
-
- <paper-menu>
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
- </paper-menu>
-
-An initial selection can be specified with the `selected` attribute.
-
- <paper-menu selected="0">
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
- </paper-menu>
-
-Make a multi-select menu with the `multi` attribute. Items in a multi-select menu can be deselected,
-and multiple items can be selected.
-
- <paper-menu multi>
- <paper-item>Item 1</paper-item>
- <paper-item>Item 2</paper-item>
- </paper-menu>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-menu-background-color` | Menu background color | `--primary-background-color`
-`--paper-menu-color` | Menu foreground color | `--primary-text-color`
-`--paper-menu-disabled-color` | Foreground color for a disabled item | `--disabled-text-color`
-`--paper-menu` | Mixin applied to the menu | `{}`
-`--paper-menu-selected-item` | Mixin applied to the selected item | `{}`
-`--paper-menu-focused-item` | Mixin applied to the focused item | `{}`
-`--paper-menu-focused-item-after` | Mixin applied to the ::after pseudo-element for the focused item | `{}`
-
-### Accessibility
-
-`<paper-menu>` has `role="menu"` by default. A multi-select menu will also have
-`aria-multiselectable` set. It implements key bindings to navigate through the menu with the up and
-down arrow keys, esc to exit the menu, and enter to activate a menu item. Typing the first letter
-of a menu item will also focus it.
-
-@group Paper Elements
-@element paper-menu
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-menu">
- <template>
- <style include="paper-menu-shared-styles"></style>
- <style>
- :host {
- display: block;
- padding: 8px 0;
-
- background: var(--paper-menu-background-color, --primary-background-color);
- color: var(--paper-menu-color, --primary-text-color);
-
- @apply(--paper-menu);
- }
- </style>
-
- <div class="selectable-content">
- <content></content>
- </div>
- </template>
-
- <script>
- (function() {
- Polymer({
- is: 'paper-menu',
-
- behaviors: [
- Polymer.IronMenuBehavior
- ]
- });
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-submenu.html b/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-submenu.html
deleted file mode 100644
index e1c1d111cdb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-menu/paper-submenu.html
+++ /dev/null
@@ -1,231 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html">
-<link rel="import" href="../iron-behaviors/iron-control-state.html">
-<link rel="import" href="../iron-collapse/iron-collapse.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/color.html">
-<link rel="import" href="paper-menu-shared-styles.html">
-
-<!--
-`<paper-submenu>` is a nested menu inside of a parent `<paper-menu>`. It
-consists of a trigger that expands or collapses another `<paper-menu>`:
-
- <paper-menu>
- <paper-submenu>
- <paper-item class="menu-trigger">Topics</paper-item>
- <paper-menu class="menu-content">
- <paper-item>Topic 1</paper-item>
- <paper-item>Topic 2</paper-item>
- <paper-item>Topic 3</paper-item>
- </paper-menu>
- </paper-submenu>
- <paper-submenu>
- <paper-item class="menu-trigger">Faves</paper-item>
- <paper-menu class="menu-content">
- <paper-item>Fave 1</paper-item>
- <paper-item>Fave 2</paper-item>
- </paper-menu>
- </paper-submenu>
- <paper-submenu disabled>
- <paper-item class="menu-trigger">Unavailable</paper-item>
- <paper-menu class="menu-content">
- <paper-item>Disabled 1</paper-item>
- <paper-item>Disabled 2</paper-item>
- </paper-menu>
- </paper-submenu>
- </paper-menu>
-
-Just like in `<paper-menu>`, the focused item is highlighted, and the selected
-item has bolded text. Please see the `<paper-menu>` docs for which attributes
-(such as `multi` and `selected`), and styling options are available for the
-`menu-content` menu.
-
-@group Paper Elements
-@element paper-submenu
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-submenu">
- <template>
- <style include="paper-menu-shared-styles"></style>
-
- <div class="selectable-content" on-tap="_onTap">
- <content id="trigger" select=".menu-trigger"></content>
- </div>
- <iron-collapse id="collapse" opened="{{opened}}">
- <content id="content" select=".menu-content"></content>
- </iron-collapse>
- </template>
-
- <script>
-
- (function() {
-
- Polymer({
-
- is: 'paper-submenu',
-
- properties: {
- /**
- * Fired when the submenu is opened.
- *
- * @event paper-submenu-open
- */
-
- /**
- * Fired when the submenu is closed.
- *
- * @event paper-submenu-close
- */
-
- /**
- * Set opened to true to show the collapse element and to false to hide it.
- *
- * @attribute opened
- */
- opened: {
- type: Boolean,
- value: false,
- notify: true,
- observer: '_openedChanged'
- }
- },
-
- behaviors: [
- Polymer.IronControlState
- ],
-
- listeners: {
- 'focus': '_onFocus'
- },
-
- get __parent() {
- return Polymer.dom(this).parentNode;
- },
-
- get __trigger() {
- return Polymer.dom(this.$.trigger).getDistributedNodes()[0];
- },
-
- get __content() {
- return Polymer.dom(this.$.content).getDistributedNodes()[0];
- },
-
- attached: function() {
- this.listen(this.__parent, 'iron-activate', '_onParentIronActivate');
- },
-
- dettached: function() {
- this.unlisten(this.__parent, 'iron-activate', '_onParentIronActivate');
- },
-
- /**
- * Expand the submenu content.
- */
- open: function() {
- if (!this.disabled && !this._active) {
- this.$.collapse.show();
- this._active = true;
- this.__trigger && this.__trigger.classList.add('iron-selected');
- this.__content && this.__content.focus();
- }
- },
-
- /**
- * Collapse the submenu content.
- */
- close: function() {
- if (this._active) {
- this.$.collapse.hide();
- this._active = false;
- this.__trigger && this.__trigger.classList.remove('iron-selected');
- }
- },
-
- /**
- * Toggle the submenu.
- */
- toggle: function() {
- if (this._active) {
- this.close();
- } else {
- this.open();
- }
- },
-
- /**
- * A handler that is called when the trigger is tapped.
- */
- _onTap: function(e) {
- if (!this.disabled) {
- this.toggle();
- }
- },
-
- /**
- * Toggles the submenu content when the trigger is tapped.
- */
- _openedChanged: function(opened, oldOpened) {
- if (opened) {
- this.fire('paper-submenu-open');
- } else if (oldOpened != null) {
- this.fire('paper-submenu-close');
- }
- },
-
- /**
- * A handler that is called when `iron-activate` is fired.
- *
- * @param {CustomEvent} event An `iron-activate` event.
- */
- _onParentIronActivate: function(event) {
- var parent = this.__parent;
- if (Polymer.dom(event).localTarget === parent) {
- // The activated item can either be this submenu, in which case it
- // should be expanded, or any of the other sibling submenus, in which
- // case this submenu should be collapsed.
- if (event.detail.item !== this && !parent.multi) {
- this.close();
- }
- }
- },
-
- /**
- * If the dropdown is open when disabled becomes true, close the
- * dropdown.
- *
- * @param {boolean} disabled True if disabled, otherwise false.
- */
- _disabledChanged: function(disabled) {
- Polymer.IronControlState._disabledChanged.apply(this, arguments);
- if (disabled && this._active) {
- this.close();
- }
- },
-
- /**
- * Handler that is called when the menu receives focus.
- *
- * @param {FocusEvent} event A focus event.
- */
- _onFocus: function(event) {
- this.__trigger && this.__trigger.focus();
- }
-
- });
-
- })();
-</script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/.bower.json
deleted file mode 100644
index d76d4cd97d3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/.bower.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "paper-progress",
- "version": "1.0.9",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "A material design progress bar",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "progress"
- ],
- "main": "paper-progress.html",
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-progress.git"
- },
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-range-behavior": "PolymerElements/iron-range-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/paper-progress",
- "_release": "1.0.9",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.9",
- "commit": "389e717d2e600bb44c6cb1537ee12b203b55fca1"
- },
- "_source": "git://github.com/PolymerElements/paper-progress.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-progress"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/.travis.yml
deleted file mode 100644
index cfc1bd93516..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: fmp2kJysxTcVsouaQfEkPCJYPzbsuGCeq5RqvttDaYdue92n5912OR/WI476PPGpX2owvxq97saVX9CqXweVtgrmdhONsrGy31eULpW0vUonuhbjkKU87E0aAmHu478uuJnc4hU7oN7wuNEtqWmpFG+oqMqHKwUyAWLk+V4XY0nseuFYQLX52qfglD+CqipQsoe84nIM0JxQxpDw1njYZbKQzZVttyLQVv13Ahh+5v75EqqwggoD2mgU1xQIH1GarbnZpmE9BL4ETbaJwJ7Fon/Pxsrs1Zs9hEStJCwo5aTiyPJibRQBCk9Cj+PJY3TkqfE3zIwhbW1/aSCIuUg5egsh6Of6clqrDE2wWPyIURUBFcE3UXsqBEXh56K9WQh+KNIgJYoQ/tzhD2VlgQhM89geTKZc6ysSTWcukv9tw9h9gaG2gD1e+uRQ/rMyt6vlh2DNI/J8oAv1WifZwuUKRkwm7SUBP55sukFryJIQEXEMqjT0WVbjTWP+2VNiHFPo7wGdVZ8X7y4bwA7lmnlC4AnNd8L6BE0tStZUBAKv3LhzRvd+DrRvaiSPdFhGBbAiMzytKGgxfD7nhMntV7GREjfQCB/hch5anePK7Cuw58kF8PiZX9aVk8Se3VP0+rdUkzVgWTW5THhdpw2nnuIyK5QDtL4/L3l/oJhl9Jbmak4=
- - secure: WzzECDnm17AwL4VDbMJD0E1cdi11p2YLahJRPi/+GZ9BFNIV3I2WZFc5l0WEiGDMB4igx5DdXHzDFk7HF2z2qRpf2skhWDTd/Ie5+exZlY9/D/tED8dJepGtV40UTuWr+vHsDJeNkXteYNpNU7ZHfNbXl14/x25ccaLYSX5yRNLBRMn9KToRNBhXA0YH/Q9AnWNKGFWb0YBfjSRywSvVuVRQr/tL43JUCTEEwjdGHVTUlvWPE5XHDs6yqjJlTI70GVvQb5WPZdQJugiolG9Z66ZRWEEuawJgzTCdlaKwBQX0UAXLdfUsQKwrcxvLnDibMHVG6hNOBw4Un73YL0klD7nKoPlhCiDHtPWoNUCvpNGxPWozw2KC50YX4MZSFKAWCkIA4/oiIhMvSUOWcrOpfHZNpJNNBCFHvv6JS5PwEiNlqM2BjqfS4Vy/03Fy0h6CyNX8o5wDAjZvJKCyZQHGy4tFWNPpyZ6SbwsnzH+bjqXSDURI6hCUNiujlIRzUT95H8rIega1mWT8sffvb4qK72iXAqf7hoQbi1Ldhjq/b0iO0PRdpjX5vusLN797KxPNrxDZc9LoaIgVMAFD5AJmwF/DilvwsW6sI4o5cpAw58/g1wpB7iX0YFWXNzXv/hZh2o4gW81Y2afM//gIgCFSitRO10bOqw+pEcGCnLrz/BQ=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/README.md
deleted file mode 100644
index 2f452a94f95..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/README.md
+++ /dev/null
@@ -1,94 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-progress.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-progress.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-progress)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-progress)_
-
-
-##&lt;paper-progress&gt;
-
-Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
-
-The progress bars are for situations where the percentage completed can be
-determined. They give users a quick sense of how much longer an operation
-will take.
-
-Example:
-
-```html
-<paper-progress value="10"></paper-progress>
-```
-
-There is also a secondary progress which is useful for displaying intermediate
-progress, such as the buffer level during a streaming playback progress bar.
-
-Example:
-
-```html
-<paper-progress value="10" secondary-progress="30"></paper-progress>
-```
-
-### Styling progress bar:
-
-To change the active progress bar color:
-
-```css
-paper-progress {
- --paper-progress-active-color: #e91e63;
-}
-```
-
-To change the secondary progress bar color:
-
-```css
-paper-progress {
- --paper-progress-secondary-color: #f8bbd0;
-}
-```
-
-To change the progress bar background color:
-
-```css
-paper-progress {
- --paper-progress-container-color: #64ffda;
-}
-```
-
-Add the class `transiting` to a paper-progress to animate the progress bar when
-the value changed. You can also customize the transition:
-
-```css
-paper-progress {
- --paper-progress-transition-duration: 0.08s;
- --paper-progress-transition-timing-function: ease;
- --paper-progress-transition-transition-delay: 0s;
-}
-```
-
-The following mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-progress-container-color` | Mixin applied to container | `--google-grey-300` |
-| `--paper-progress-transition-duration` | Duration of the transition | `0.008s` |
-| `--paper-progress-transition-timing-function` | The timing function for the transition | `ease` |
-| `--paper-progress-transition-delay` | delay for the transition | `0s` |
-| `--paper-progress-active-color` | The color of the active bar | `--google-green-500` |
-| `--paper-progress-secondary-color` | The color of the secondary bar | `--google-green-100` |
-| `--paper-progress-disabled-active-color` | The color of the active bar if disabled | `--google-grey-500` |
-| `--paper-progress-disabled-secondary-color` | The color of the secondary bar if disabled | `--google-grey-300` |
-| `--paper-progress-height` | The height of the progress bar | `4px` |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/bower.json
deleted file mode 100644
index 69a5c5ef224..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/bower.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "paper-progress",
- "version": "1.0.9",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "A material design progress bar",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "progress"
- ],
- "main": "paper-progress.html",
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-progress.git"
- },
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-range-behavior": "PolymerElements/iron-range-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/demo/index.html
deleted file mode 100644
index 88f4b76897b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/demo/index.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!doctype html>
-<html>
-<head>
- <title>paper-progress demo</title>
-
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../paper-progress.html">
- <link rel="import" href="../../paper-button/paper-button.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- paper-progress {
- display: block;
- width: 100%;
- margin: 20px 0;
- }
- paper-button {
- display: inline-block;
- padding: 5px;
- }
- </style>
-
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h3>paper-progress can be imperatively controlled</h3>
- <demo-snippet class="centered-demo">
- <template>
- <p>Once started, loops 5 times before stopping.
- <!-- View the source code to see the contents of startProgress() -->
- <paper-button raised onclick="startProgress();" id="start">Start</paper-button>
- </p>
- <paper-progress id="progress"></paper-progress>
- </template>
- </demo-snippet>
-
- <h3>paper-progress can be indeterminate</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-progress indeterminate></paper-progress>
- <paper-progress indeterminate value="800" min="100" max="1000"></paper-progress>
- </template>
- </demo-snippet>
-
- <h3>It can be styled using custom properties</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- paper-progress.blue {
- --paper-progress-active-color: var(--paper-light-blue-500);
- --paper-progress-secondary-color: var(--paper-light-blue-100);
- }
-
- paper-progress.red {
- --paper-progress-active-color: var(--paper-red-500);
- --paper-progress-secondary-color: var(--paper-red-100);
- }
-
- paper-progress.green {
- --paper-progress-active-color: var(--paper-light-green-500);
- --paper-progress-secondary-color: var(--paper-light-green-100);
- }
- </style>
- <paper-progress value="800" min="100" max="1000" class="red"></paper-progress>
- <paper-progress value="60" class="green"></paper-progress>
- <paper-progress value="40" secondary-progress="80" class="blue"></paper-progress>
- </template>
- </demo-snippet>
- </div>
-
- <script>
- var progress, button, animationFrame;
- var repeat, maxRepeat = 5, animating = false;
-
- function nextProgress() {
- animating = true;
- if (progress.value < progress.max) {
- progress.value += (progress.step || 1);
- } else {
- if (++repeat >= maxRepeat) {
- animating = false;
- button.disabled = false;
- return;
- }
- progress.value = progress.min;
- }
- var animationFrame = requestAnimationFrame(nextProgress);
- }
-
- function startProgress() {
- repeat = 0;
- progress.value = progress.min;
- button.disabled = true;
- if (!animating) {
- nextProgress();
- }
- }
-
- window.addEventListener('WebComponentsReady', function() {
- progress = document.querySelector('paper-progress');
- button = document.querySelector('paper-button');
- });
-
- </script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/hero.svg
deleted file mode 100755
index dc422a4912a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/hero.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <rect x="57" y="59" width="20" height="2"/>
- <rect x="38" y="59" width="11" height="2"/>
- <rect x="84" y="59" width="40" height="2"/>
- <rect x="133" y="59" width="54" height="2"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/index.html
deleted file mode 100644
index 225e3dd93df..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>paper-progress</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/paper-progress.html b/chromium/third_party/catapult/third_party/polymer/components/paper-progress/paper-progress.html
deleted file mode 100644
index 77b1eecd016..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-progress/paper-progress.html
+++ /dev/null
@@ -1,341 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../iron-range-behavior/iron-range-behavior.html">
-<link rel="import" href="../paper-styles/color.html">
-
-<!--
-Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
-
-The progress bars are for situations where the percentage completed can be
-determined. They give users a quick sense of how much longer an operation
-will take.
-
-Example:
-
- <paper-progress value="10"></paper-progress>
-
-There is also a secondary progress which is useful for displaying intermediate
-progress, such as the buffer level during a streaming playback progress bar.
-
-Example:
-
- <paper-progress value="10" secondary-progress="30"></paper-progress>
-
-### Styling progress bar:
-
-To change the active progress bar color:
-
- paper-progress {
- --paper-progress-active-color: #e91e63;
- }
-
-To change the secondary progress bar color:
-
- paper-progress {
- --paper-progress-secondary-color: #f8bbd0;
- }
-
-To change the progress bar background color:
-
- paper-progress {
- --paper-progress-container-color: #64ffda;
- }
-
-Add the class `transiting` to a paper-progress to animate the progress bar when
-the value changed. You can also customize the transition:
-
- paper-progress {
- --paper-progress-transition-duration: 0.08s;
- --paper-progress-transition-timing-function: ease;
- --paper-progress-transition-transition-delay: 0s;
- }
-
-The following mixins are available for styling:
-
-Custom property | Description | Default
-----------------------------------------------|---------------------------------------------|--------------
-`--paper-progress-container-color` | Mixin applied to container | `--google-grey-300`
-`--paper-progress-transition-duration` | Duration of the transition | `0.008s`
-`--paper-progress-transition-timing-function` | The timing function for the transition | `ease`
-`--paper-progress-transition-delay` | delay for the transition | `0s`
-`--paper-progress-active-color` | The color of the active bar | `--google-green-500`
-`--paper-progress-secondary-color` | The color of the secondary bar | `--google-green-100`
-`--paper-progress-disabled-active-color` | The color of the active bar if disabled | `--google-grey-500`
-`--paper-progress-disabled-secondary-color` | The color of the secondary bar if disabled | `--google-grey-300`
-`--paper-progress-height` | The height of the progress bar | `4px`
-
-@group Paper Elements
-@element paper-progress
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-progress">
- <template>
- <style>
- :host {
- display: block;
- width: 200px;
- position: relative;
- overflow: hidden;
- }
-
- #progressContainer {
- position: relative;
- }
-
- #progressContainer,
- /* the stripe for the indeterminate animation*/
- .indeterminate::after {
- height: var(--paper-progress-height, 4px);
- }
-
- #primaryProgress,
- #secondaryProgress,
- .indeterminate::after {
- @apply(--layout-fit);
- }
-
- #progressContainer,
- .indeterminate::after {
- background: var(--paper-progress-container-color, --google-grey-300);
- }
-
- :host(.transiting) #primaryProgress,
- :host(.transiting) #secondaryProgress {
- -webkit-transition-property: -webkit-transform;
- transition-property: transform;
-
- /* Duration */
- -webkit-transition-duration: var(--paper-progress-transition-duration, 0.08s);
- transition-duration: var(--paper-progress-transition-duration, 0.08s);
-
- /* Timing function */
- -webkit-transition-timing-function: var(--paper-progress-transition-timing-function, ease);
- transition-timing-function: var(--paper-progress-transition-timing-function, ease);
-
- /* Delay */
- -webkit-transition-delay: var(--paper-progress-transition-delay, 0s);
- transition-delay: var(--paper-progress-transition-delay, 0s);
- }
-
- #primaryProgress,
- #secondaryProgress {
- @apply(--layout-fit);
- -webkit-transform-origin: left center;
- transform-origin: left center;
- -webkit-transform: scaleX(0);
- transform: scaleX(0);
- will-change: transform;
- }
-
- #primaryProgress {
- background: var(--paper-progress-active-color, --google-green-500);
- }
-
- #secondaryProgress {
- background: var(--paper-progress-secondary-color, --google-green-100);
- }
-
- :host([disabled]) #primaryProgress {
- background: var(--paper-progress-disabled-active-color, --google-grey-500);
- }
-
- :host([disabled]) #secondaryProgress {
- background: var(--paper-progress-disabled-secondary-color, --google-grey-300);
- }
-
- :host(:not([disabled])) #primaryProgress.indeterminate {
- -webkit-transform-origin: right center;
- transform-origin: right center;
- -webkit-animation: indeterminate-bar 2s linear infinite;
- animation: indeterminate-bar 2s linear infinite;
- }
-
- :host(:not([disabled])) #primaryProgress.indeterminate::after {
- content: "";
- -webkit-transform-origin: center center;
- transform-origin: center center;
-
- -webkit-animation: indeterminate-splitter 2s linear infinite;
- animation: indeterminate-splitter 2s linear infinite;
- }
-
- @-webkit-keyframes indeterminate-bar {
- 0% {
- -webkit-transform: scaleX(1) translateX(-100%);
- }
- 50% {
- -webkit-transform: scaleX(1) translateX(0%);
- }
- 75% {
- -webkit-transform: scaleX(1) translateX(0%);
- -webkit-animation-timing-function: cubic-bezier(.28,.62,.37,.91);
- }
- 100% {
- -webkit-transform: scaleX(0) translateX(0%);
- }
- }
-
- @-webkit-keyframes indeterminate-splitter {
- 0% {
- -webkit-transform: scaleX(.75) translateX(-125%);
- }
- 30% {
- -webkit-transform: scaleX(.75) translateX(-125%);
- -webkit-animation-timing-function: cubic-bezier(.42,0,.6,.8);
- }
- 90% {
- -webkit-transform: scaleX(.75) translateX(125%);
- }
- 100% {
- -webkit-transform: scaleX(.75) translateX(125%);
- }
- }
-
- @keyframes indeterminate-bar {
- 0% {
- transform: scaleX(1) translateX(-100%);
- }
- 50% {
- transform: scaleX(1) translateX(0%);
- }
- 75% {
- transform: scaleX(1) translateX(0%);
- animation-timing-function: cubic-bezier(.28,.62,.37,.91);
- }
- 100% {
- transform: scaleX(0) translateX(0%);
- }
- }
-
- @keyframes indeterminate-splitter {
- 0% {
- transform: scaleX(.75) translateX(-125%);
- }
- 30% {
- transform: scaleX(.75) translateX(-125%);
- animation-timing-function: cubic-bezier(.42,0,.6,.8);
- }
- 90% {
- transform: scaleX(.75) translateX(125%);
- }
- 100% {
- transform: scaleX(.75) translateX(125%);
- }
- }
- </style>
-
- <div id="progressContainer">
- <div id="secondaryProgress" hidden$="[[_hideSecondaryProgress(secondaryRatio)]]"></div>
- <div id="primaryProgress"></div>
- </div>
- </template>
-</dom-module>
-
-<script>
- Polymer({
- is: 'paper-progress',
-
- behaviors: [
- Polymer.IronRangeBehavior
- ],
-
- properties: {
- /**
- * The number that represents the current secondary progress.
- */
- secondaryProgress: {
- type: Number,
- value: 0
- },
-
- /**
- * The secondary ratio
- */
- secondaryRatio: {
- type: Number,
- value: 0,
- readOnly: true
- },
-
- /**
- * Use an indeterminate progress indicator.
- */
- indeterminate: {
- type: Boolean,
- value: false,
- observer: '_toggleIndeterminate'
- },
-
- /**
- * True if the progress is disabled.
- */
- disabled: {
- type: Boolean,
- value: false,
- reflectToAttribute: true,
- observer: '_disabledChanged'
- }
- },
-
- observers: [
- '_progressChanged(secondaryProgress, value, min, max)'
- ],
-
- hostAttributes: {
- role: 'progressbar'
- },
-
- _toggleIndeterminate: function(indeterminate) {
- // If we use attribute/class binding, the animation sometimes doesn't translate properly
- // on Safari 7.1. So instead, we toggle the class here in the update method.
- this.toggleClass('indeterminate', indeterminate, this.$.primaryProgress);
- },
-
- _transformProgress: function(progress, ratio) {
- var transform = 'scaleX(' + (ratio / 100) + ')';
- progress.style.transform = progress.style.webkitTransform = transform;
- },
-
- _mainRatioChanged: function(ratio) {
- this._transformProgress(this.$.primaryProgress, ratio);
- },
-
- _progressChanged: function(secondaryProgress, value, min, max) {
- secondaryProgress = this._clampValue(secondaryProgress);
- value = this._clampValue(value);
-
- var secondaryRatio = this._calcRatio(secondaryProgress) * 100;
- var mainRatio = this._calcRatio(value) * 100;
-
- this._setSecondaryRatio(secondaryRatio);
- this._transformProgress(this.$.secondaryProgress, secondaryRatio);
- this._transformProgress(this.$.primaryProgress, mainRatio);
-
- this.secondaryProgress = secondaryProgress;
-
- this.setAttribute('aria-valuenow', value);
- this.setAttribute('aria-valuemin', min);
- this.setAttribute('aria-valuemax', max);
- },
-
- _disabledChanged: function(disabled) {
- this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
- },
-
- _hideSecondaryProgress: function(secondaryRatio) {
- return secondaryRatio === 0;
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.bower.json
deleted file mode 100644
index fc0feff6497..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.bower.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "paper-ripple",
- "version": "1.0.8",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Adds a material design ripple to any container",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "ripple"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-ripple.git"
- },
- "main": "paper-ripple.html",
- "dependencies": {
- "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.1.5",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-icon": "polymerelements/iron-icon#^1.0.0",
- "iron-icons": "polymerelements/iron-icons#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/paper-ripple",
- "_release": "1.0.8",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.8",
- "commit": "eb1c01cac162b7ce7e78760d5c0df61c9a5c2974"
- },
- "_source": "git://github.com/PolymerElements/paper-ripple.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-ripple"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.travis.yml
deleted file mode 100644
index c4c91b4e018..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: YrC5bTrJwlszZQWfnRwDbLaZNLf+KnWXTAfzvul7eij21W3/v+E0wp9pFTLQj/G3bZWgOEZSsoXxASNcNu1JUmJRyLXpJgTps25IlS/VJTRHoK7jUjt5pJG1CbcgTixQblyOVtPqT6j0V23V0d3mhQ3H2xFBbcl87iYO1w+6nmQ=
- - secure: NZv74uwtibMbmarEOWRUNkEwjz/2akWEIe2JDxglag2JUECWrcAKJIQUqYsO0KNUIg09xJEqWLWED4fN73p3z27Jl/z99ssVMvPQt8duoxwZ6UwcjVWUQNjgXKN6JDZCf+3hJsmU51Lp6mpzj0Y5m8nCjhh7/bBnJahH+VRm7bA=
-node_js: stable
-addons:
- firefox: '46.0'
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/README.md
deleted file mode 100644
index 359b131959a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-ripple.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-ripple.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-ripple)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-ripple)_
-
-
-##&lt;paper-ripple&gt;
-
-Material design: [Surface reaction](https://www.google.com/design/spec/animation/responsive-interaction.html#responsive-interaction-surface-reaction)
-
-`paper-ripple` provides a visual effect that other paper elements can
-use to simulate a rippling effect emanating from the point of contact. The
-effect can be visualized as a concentric circle with motion.
-
-Example:
-
-```html
-<div style="position:relative">
- <paper-ripple></paper-ripple>
-</div>
-```
-
-Note, it's important that the parent container of the ripple be relative position, otherwise
-the ripple will emanate outside of the desired container.
-
-`paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
-effect when touches on it. You can also defeat the default behavior and
-manually route the down and up actions to the ripple element. Note that it is
-important if you call `downAction()` you will have to make sure to call
-`upAction()` so that `paper-ripple` would end the animation loop.
-
-Example:
-
-```html
-<paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
-...
-downAction: function(e) {
- this.$.ripple.downAction({detail: {x: e.x, y: e.y}});
-},
-upAction: function(e) {
- this.$.ripple.upAction();
-}
-```
-
-Styling ripple effect:
-
- Use CSS color property to style the ripple:
-
-```css
-paper-ripple {
- color: #4285f4;
-}
-```
-
- Note that CSS color property is inherited so it is not required to set it on
- the `paper-ripple` element directly.
-
-By default, the ripple is centered on the point of contact. Apply the `recenters`
-attribute to have the ripple grow toward the center of its container.
-
-```html
-<paper-ripple recenters></paper-ripple>
-```
-
-You can also center the ripple inside its container from the start.
-
-```html
-<paper-ripple center></paper-ripple>
-```
-
-Apply `circle` class to make the rippling effect within a circle.
-
-```html
-<paper-ripple class="circle"></paper-ripple>
-```
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/bower.json
deleted file mode 100644
index 1fce5584770..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/bower.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "paper-ripple",
- "version": "1.0.8",
- "license": "http://polymer.github.io/LICENSE.txt",
- "description": "Adds a material design ripple to any container",
- "private": true,
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "ripple"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-ripple.git"
- },
- "main": "paper-ripple.html",
- "dependencies": {
- "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.1.5",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-icon": "polymerelements/iron-icon#^1.0.0",
- "iron-icons": "polymerelements/iron-icons#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0",
- "test-fixture": "polymerelements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/demo/index.html
deleted file mode 100644
index e12cde5c080..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/demo/index.html
+++ /dev/null
@@ -1,415 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!doctype html>
-<html>
-<head>
- <title>paper-ripple demo</title>
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../paper-ripple.html">
- <link rel="import" href="../../paper-styles/typography.html">
- <link rel="import" href="../../iron-icon/iron-icon.html">
-
- <style>
-
- body {
- background-color: #f9f9f9;
- font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- -webkit-touch-callout: none;
- }
-
- section {
- padding: 30px 25px;
- }
-
- section > * {
- margin: 10px
- }
-
- /* Button */
- .button {
- display: inline-block;
- position: relative;
- width: 120px;
- height: 32px;
- line-height: 32px;
- border-radius: 2px;
- font-size: 0.9em;
- background-color: #fff;
- color: #646464;
- }
-
- .button > paper-ripple {
- border-radius: 2px;
- overflow: hidden;
- }
-
- .button.narrow {
- width: 60px;
- }
-
- .button.grey {
- background-color: #eee;
- }
-
- .button.blue {
- background-color: #4285f4;
- color: #fff;
- }
-
- .button.green {
- background-color: #0f9d58;
- color: #fff;
- }
-
- .button.raised {
- transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
- transition-delay: 0.2s;
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
- }
-
- .button.raised:active {
- box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
- transition-delay: 0s;
- }
-
- /* Icon Button */
- .icon-button {
- position: relative;
- display: inline-block;
- width: 56px;
- height: 56px;
- }
-
- .icon-button > iron-icon {
- margin: 16px;
- transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
- transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
- }
-
- .icon-button:hover > iron-icon {
- -webkit-transform: scale(1.2);
- transform: scale(1.2);
- }
-
- .icon-button > paper-ripple {
- overflow: hidden;
- color: #646464;
- }
-
- .icon-button.red > iron-icon::shadow path {
- fill: #db4437;
- }
-
- .icon-button.red > paper-ripple {
- color: #db4437;
- }
-
- .icon-button.blue > iron-icon::shadow path {
- fill: #4285f4;
- }
-
- .icon-button.blue > paper-ripple {
- color: #4285f4;
- }
-
- /* FAB */
- .fab {
- position: relative;
- display: inline-block;
- width: 56px;
- height: 56px;
- border-radius: 50%;
- color: #fff;
- overflow: hidden;
- transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
- transition-delay: 0.2s;
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
- }
-
- .fab.red {
- background-color: #d23f31;
- }
-
- .fab.blue {
- background-color: #4285f4;
- }
-
- .fab.green {
- background-color: #0f9d58;
- }
-
- .fab:active {
- box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
- transition-delay: 0s;
- }
-
- .fab > iron-icon {
- margin: 16px;
- }
-
- .fab > iron-icon::shadow path {
- fill: #fff;
- }
-
- /* Menu */
- .menu {
- display: inline-block;
- width: 180px;
- background-color: #fff;
- box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
- }
-
- .item {
- position: relative;
- height: 48px;
- line-height: 48px;
- color: #646464;
- font-size: 0.9em;
- }
-
- .menu.blue > .item {
- color: #4285f4;
- }
-
- /* Card, Dialog */
- .card, .dialog {
- position: relative;
- display: inline-block;
- width: 300px;
- height: 240px;
- vertical-align: top;
- background-color: #fff;
- box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
- }
-
- .dialog {
- box-sizing: border-box;
- padding: 16px;
- }
-
- .dialog > .content {
- height: 170px;
- font-size: 0.9em;
- }
-
- .dialog > .content > .title {
- font-size: 1.3em;
- }
-
- .dialog > .button {
- width: 90px;
- float: right;
- }
-
- .card.image {
- background: url(http://lorempixel.com/300/240/nature/);
- color: #fff;
- }
-
- /* Misc */
- .center {
- text-align: center;
- }
-
- .label {
- padding: 0 16px;
- }
-
- .label-blue {
- color: #4285f4;
- }
-
- .label-red {
- color: #d23f31;
- }
-
- </style>
-
-</head>
-<body>
-
- <section>
-
- <div class="button raised">
- <div class="center" fit tabindex="1">SUBMIT</div>
- <paper-ripple></paper-ripple>
- </div>
-
- <div class="button raised" noink>
- <div class="center" fit tabindex="1">NO INK</div>
- <paper-ripple noink></paper-ripple>
- </div>
-
- <div class="button raised grey">
- <div class="center" fit tabindex="1">CANCEL</div>
- <paper-ripple></paper-ripple>
- </div>
-
- <div class="button raised blue">
- <div class="center" fit tabindex="1">COMPOSE</div>
- <paper-ripple></paper-ripple>
- </div>
-
- <div class="button raised green">
- <div class="center" fit tabindex="1">OK</div>
- <paper-ripple></paper-ripple>
- </div>
-
- </section>
-
- <section>
-
- <div class="button raised grey narrow">
- <div class="center" fit tabindex="1">+1</div>
- <paper-ripple></paper-ripple>
- </div>
-
- <div class="button raised grey narrow label-blue">
- <div class="center" fit tabindex="1">+1</div>
- <paper-ripple></paper-ripple>
- </div>
-
- <div class="button raised grey narrow label-red">
- <div class="center" fit tabindex="1">+1</div>
- <paper-ripple></paper-ripple>
- </div>
-
- </section>
-
- <section>
-
- <div class="icon-button">
- <iron-icon icon="menu" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- <div class="icon-button">
- <iron-icon icon="more-vert" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- <div class="icon-button red">
- <iron-icon icon="delete" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- <div class="icon-button blue">
- <iron-icon icon="account-box" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- </section>
-
- <section>
-
- <div class="fab red">
- <iron-icon icon="add" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- <div class="fab blue">
- <iron-icon icon="mail" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- <div class="fab green">
- <iron-icon icon="create" tabindex="1"></iron-icon>
- <paper-ripple class="circle" recenters></paper-ripple>
- </div>
-
- </section>
-
- <section>
-
- <div class="menu">
-
- <div class="item">
- <div class="label" fit tabindex="1">Mark as unread</div>
- <paper-ripple></paper-ripple>
- </div>
- <div class="item">
- <div class="label" fit tabindex="1">Mark as important</div>
- <paper-ripple></paper-ripple>
- </div>
- <div class="item">
- <div class="label" fit tabindex="1">Add to Tasks</div>
- <paper-ripple></paper-ripple>
- </div>
- <div class="item">
- <div class="label" fit tabindex="1">Create event</div>
- <paper-ripple></paper-ripple>
- </div>
-
- </div>
-
- <div class="menu blue">
-
- <div class="item">
- <div class="label" fit tabindex="1">Import</div>
- <paper-ripple></paper-ripple>
- </div>
- <div class="item">
- <div class="label" fit tabindex="1">Export</div>
- <paper-ripple></paper-ripple>
- </div>
- <div class="item">
- <div class="label" fit tabindex="1">Print</div>
- <paper-ripple></paper-ripple>
- </div>
- <div class="item">
- <div class="label" fit tabindex="1">Restore contacts</div>
- <paper-ripple></paper-ripple>
- </div>
-
- </div>
-
- </section>
-
- <section>
-
- <div class="dialog">
-
- <div class="content">
- <div class="title">Permission</div><br>
- <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</div>
- </div>
-
- <div class="button label-blue">
- <div class="center" fit tabindex="1">ACCEPT</div>
- <paper-ripple></paper-ripple>
- </div>
-
- <div class="button">
- <div class="center" fit tabindex="1">DECLINE</div>
- <paper-ripple></paper-ripple>
- </div>
-
- </div>
-
- <div class="card" tabindex="1">
- <paper-ripple recenters></paper-ripple>
- </div>
-
- <div class="card image" tabindex="1">
- <paper-ripple recenters></paper-ripple>
- </div>
-
- </section>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/hero.svg
deleted file mode 100755
index f8a872f1e63..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/hero.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <path d="M175,81H49V45h126V81z M51,79h122V47H51V79z"/>
- <g>
- <defs>
- <rect id="SVGID_5_" x="50" y="46" width="124" height="34"/>
- </defs>
- <clipPath id="SVGID_2_">
- <use xlink:href="#SVGID_5_" overflow="visible"/>
- </clipPath>
- <circle opacity="0.5" clip-path="url(#SVGID_2_)" cx="84.4" cy="62.7" r="41.9"/>
- <circle opacity="0.6" clip-path="url(#SVGID_2_)" cx="84.4" cy="62.7" r="26.3"/>
- <circle opacity="0.6" clip-path="url(#SVGID_2_)" cx="66.4" cy="62.7" r="26.3"/>
- </g>
- <circle cx="50" cy="80" r="4"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/index.html
deleted file mode 100644
index e552b0bb955..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>paper-ripple</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/paper-ripple.html b/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/paper-ripple.html
deleted file mode 100644
index c0d74e6e916..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-ripple/paper-ripple.html
+++ /dev/null
@@ -1,758 +0,0 @@
-<!--
-@license
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
-
-<!--
-Material design: [Surface reaction](https://www.google.com/design/spec/animation/responsive-interaction.html#responsive-interaction-surface-reaction)
-
-`paper-ripple` provides a visual effect that other paper elements can
-use to simulate a rippling effect emanating from the point of contact. The
-effect can be visualized as a concentric circle with motion.
-
-Example:
-
- <div style="position:relative">
- <paper-ripple></paper-ripple>
- </div>
-
-Note, it's important that the parent container of the ripple be relative position, otherwise
-the ripple will emanate outside of the desired container.
-
-`paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
-effect when touches on it. You can also defeat the default behavior and
-manually route the down and up actions to the ripple element. Note that it is
-important if you call `downAction()` you will have to make sure to call
-`upAction()` so that `paper-ripple` would end the animation loop.
-
-Example:
-
- <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
- ...
- downAction: function(e) {
- this.$.ripple.downAction({detail: {x: e.x, y: e.y}});
- },
- upAction: function(e) {
- this.$.ripple.upAction();
- }
-
-Styling ripple effect:
-
- Use CSS color property to style the ripple:
-
- paper-ripple {
- color: #4285f4;
- }
-
- Note that CSS color property is inherited so it is not required to set it on
- the `paper-ripple` element directly.
-
-By default, the ripple is centered on the point of contact. Apply the `recenters`
-attribute to have the ripple grow toward the center of its container.
-
- <paper-ripple recenters></paper-ripple>
-
-You can also center the ripple inside its container from the start.
-
- <paper-ripple center></paper-ripple>
-
-Apply `circle` class to make the rippling effect within a circle.
-
- <paper-ripple class="circle"></paper-ripple>
-
-@group Paper Elements
-@element paper-ripple
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-ripple">
-
- <template>
- <style>
- :host {
- display: block;
- position: absolute;
- border-radius: inherit;
- overflow: hidden;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
-
- /* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,
- * creating a node (with a position:absolute) in the middle of an event
- * handler "interrupts" that event handler (which happens when the
- * ripple is created on demand) */
- pointer-events: none;
- }
-
- :host([animating]) {
- /* This resolves a rendering issue in Chrome (as of 40) where the
- ripple is not properly clipped by its parent (which may have
- rounded corners). See: http://jsbin.com/temexa/4
-
- Note: We only apply this style conditionally. Otherwise, the browser
- will create a new compositing layer for every ripple element on the
- page, and that would be bad. */
- -webkit-transform: translate(0, 0);
- transform: translate3d(0, 0, 0);
- }
-
- #background,
- #waves,
- .wave-container,
- .wave {
- pointer-events: none;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
-
- #background,
- .wave {
- opacity: 0;
- }
-
- #waves,
- .wave {
- overflow: hidden;
- }
-
- .wave-container,
- .wave {
- border-radius: 50%;
- }
-
- :host(.circle) #background,
- :host(.circle) #waves {
- border-radius: 50%;
- }
-
- :host(.circle) .wave-container {
- overflow: hidden;
- }
- </style>
-
- <div id="background"></div>
- <div id="waves"></div>
- </template>
-</dom-module>
-<script>
- (function() {
- var Utility = {
- distance: function(x1, y1, x2, y2) {
- var xDelta = (x1 - x2);
- var yDelta = (y1 - y2);
-
- return Math.sqrt(xDelta * xDelta + yDelta * yDelta);
- },
-
- now: window.performance && window.performance.now ?
- window.performance.now.bind(window.performance) : Date.now
- };
-
- /**
- * @param {HTMLElement} element
- * @constructor
- */
- function ElementMetrics(element) {
- this.element = element;
- this.width = this.boundingRect.width;
- this.height = this.boundingRect.height;
-
- this.size = Math.max(this.width, this.height);
- }
-
- ElementMetrics.prototype = {
- get boundingRect () {
- return this.element.getBoundingClientRect();
- },
-
- furthestCornerDistanceFrom: function(x, y) {
- var topLeft = Utility.distance(x, y, 0, 0);
- var topRight = Utility.distance(x, y, this.width, 0);
- var bottomLeft = Utility.distance(x, y, 0, this.height);
- var bottomRight = Utility.distance(x, y, this.width, this.height);
-
- return Math.max(topLeft, topRight, bottomLeft, bottomRight);
- }
- };
-
- /**
- * @param {HTMLElement} element
- * @constructor
- */
- function Ripple(element) {
- this.element = element;
- this.color = window.getComputedStyle(element).color;
-
- this.wave = document.createElement('div');
- this.waveContainer = document.createElement('div');
- this.wave.style.backgroundColor = this.color;
- this.wave.classList.add('wave');
- this.waveContainer.classList.add('wave-container');
- Polymer.dom(this.waveContainer).appendChild(this.wave);
-
- this.resetInteractionState();
- }
-
- Ripple.MAX_RADIUS = 300;
-
- Ripple.prototype = {
- get recenters() {
- return this.element.recenters;
- },
-
- get center() {
- return this.element.center;
- },
-
- get mouseDownElapsed() {
- var elapsed;
-
- if (!this.mouseDownStart) {
- return 0;
- }
-
- elapsed = Utility.now() - this.mouseDownStart;
-
- if (this.mouseUpStart) {
- elapsed -= this.mouseUpElapsed;
- }
-
- return elapsed;
- },
-
- get mouseUpElapsed() {
- return this.mouseUpStart ?
- Utility.now () - this.mouseUpStart : 0;
- },
-
- get mouseDownElapsedSeconds() {
- return this.mouseDownElapsed / 1000;
- },
-
- get mouseUpElapsedSeconds() {
- return this.mouseUpElapsed / 1000;
- },
-
- get mouseInteractionSeconds() {
- return this.mouseDownElapsedSeconds + this.mouseUpElapsedSeconds;
- },
-
- get initialOpacity() {
- return this.element.initialOpacity;
- },
-
- get opacityDecayVelocity() {
- return this.element.opacityDecayVelocity;
- },
-
- get radius() {
- var width2 = this.containerMetrics.width * this.containerMetrics.width;
- var height2 = this.containerMetrics.height * this.containerMetrics.height;
- var waveRadius = Math.min(
- Math.sqrt(width2 + height2),
- Ripple.MAX_RADIUS
- ) * 1.1 + 5;
-
- var duration = 1.1 - 0.2 * (waveRadius / Ripple.MAX_RADIUS);
- var timeNow = this.mouseInteractionSeconds / duration;
- var size = waveRadius * (1 - Math.pow(80, -timeNow));
-
- return Math.abs(size);
- },
-
- get opacity() {
- if (!this.mouseUpStart) {
- return this.initialOpacity;
- }
-
- return Math.max(
- 0,
- this.initialOpacity - this.mouseUpElapsedSeconds * this.opacityDecayVelocity
- );
- },
-
- get outerOpacity() {
- // Linear increase in background opacity, capped at the opacity
- // of the wavefront (waveOpacity).
- var outerOpacity = this.mouseUpElapsedSeconds * 0.3;
- var waveOpacity = this.opacity;
-
- return Math.max(
- 0,
- Math.min(outerOpacity, waveOpacity)
- );
- },
-
- get isOpacityFullyDecayed() {
- return this.opacity < 0.01 &&
- this.radius >= Math.min(this.maxRadius, Ripple.MAX_RADIUS);
- },
-
- get isRestingAtMaxRadius() {
- return this.opacity >= this.initialOpacity &&
- this.radius >= Math.min(this.maxRadius, Ripple.MAX_RADIUS);
- },
-
- get isAnimationComplete() {
- return this.mouseUpStart ?
- this.isOpacityFullyDecayed : this.isRestingAtMaxRadius;
- },
-
- get translationFraction() {
- return Math.min(
- 1,
- this.radius / this.containerMetrics.size * 2 / Math.sqrt(2)
- );
- },
-
- get xNow() {
- if (this.xEnd) {
- return this.xStart + this.translationFraction * (this.xEnd - this.xStart);
- }
-
- return this.xStart;
- },
-
- get yNow() {
- if (this.yEnd) {
- return this.yStart + this.translationFraction * (this.yEnd - this.yStart);
- }
-
- return this.yStart;
- },
-
- get isMouseDown() {
- return this.mouseDownStart && !this.mouseUpStart;
- },
-
- resetInteractionState: function() {
- this.maxRadius = 0;
- this.mouseDownStart = 0;
- this.mouseUpStart = 0;
-
- this.xStart = 0;
- this.yStart = 0;
- this.xEnd = 0;
- this.yEnd = 0;
- this.slideDistance = 0;
-
- this.containerMetrics = new ElementMetrics(this.element);
- },
-
- draw: function() {
- var scale;
- var translateString;
- var dx;
- var dy;
-
- this.wave.style.opacity = this.opacity;
-
- scale = this.radius / (this.containerMetrics.size / 2);
- dx = this.xNow - (this.containerMetrics.width / 2);
- dy = this.yNow - (this.containerMetrics.height / 2);
-
-
- // 2d transform for safari because of border-radius and overflow:hidden clipping bug.
- // https://bugs.webkit.org/show_bug.cgi?id=98538
- this.waveContainer.style.webkitTransform = 'translate(' + dx + 'px, ' + dy + 'px)';
- this.waveContainer.style.transform = 'translate3d(' + dx + 'px, ' + dy + 'px, 0)';
- this.wave.style.webkitTransform = 'scale(' + scale + ',' + scale + ')';
- this.wave.style.transform = 'scale3d(' + scale + ',' + scale + ',1)';
- },
-
- /** @param {Event=} event */
- downAction: function(event) {
- var xCenter = this.containerMetrics.width / 2;
- var yCenter = this.containerMetrics.height / 2;
-
- this.resetInteractionState();
- this.mouseDownStart = Utility.now();
-
- if (this.center) {
- this.xStart = xCenter;
- this.yStart = yCenter;
- this.slideDistance = Utility.distance(
- this.xStart, this.yStart, this.xEnd, this.yEnd
- );
- } else {
- this.xStart = event ?
- event.detail.x - this.containerMetrics.boundingRect.left :
- this.containerMetrics.width / 2;
- this.yStart = event ?
- event.detail.y - this.containerMetrics.boundingRect.top :
- this.containerMetrics.height / 2;
- }
-
- if (this.recenters) {
- this.xEnd = xCenter;
- this.yEnd = yCenter;
- this.slideDistance = Utility.distance(
- this.xStart, this.yStart, this.xEnd, this.yEnd
- );
- }
-
- this.maxRadius = this.containerMetrics.furthestCornerDistanceFrom(
- this.xStart,
- this.yStart
- );
-
- this.waveContainer.style.top =
- (this.containerMetrics.height - this.containerMetrics.size) / 2 + 'px';
- this.waveContainer.style.left =
- (this.containerMetrics.width - this.containerMetrics.size) / 2 + 'px';
-
- this.waveContainer.style.width = this.containerMetrics.size + 'px';
- this.waveContainer.style.height = this.containerMetrics.size + 'px';
- },
-
- /** @param {Event=} event */
- upAction: function(event) {
- if (!this.isMouseDown) {
- return;
- }
-
- this.mouseUpStart = Utility.now();
- },
-
- remove: function() {
- Polymer.dom(this.waveContainer.parentNode).removeChild(
- this.waveContainer
- );
- }
- };
-
- Polymer({
- is: 'paper-ripple',
-
- behaviors: [
- Polymer.IronA11yKeysBehavior
- ],
-
- properties: {
- /**
- * The initial opacity set on the wave.
- *
- * @attribute initialOpacity
- * @type number
- * @default 0.25
- */
- initialOpacity: {
- type: Number,
- value: 0.25
- },
-
- /**
- * How fast (opacity per second) the wave fades out.
- *
- * @attribute opacityDecayVelocity
- * @type number
- * @default 0.8
- */
- opacityDecayVelocity: {
- type: Number,
- value: 0.8
- },
-
- /**
- * If true, ripples will exhibit a gravitational pull towards
- * the center of their container as they fade away.
- *
- * @attribute recenters
- * @type boolean
- * @default false
- */
- recenters: {
- type: Boolean,
- value: false
- },
-
- /**
- * If true, ripples will center inside its container
- *
- * @attribute recenters
- * @type boolean
- * @default false
- */
- center: {
- type: Boolean,
- value: false
- },
-
- /**
- * A list of the visual ripples.
- *
- * @attribute ripples
- * @type Array
- * @default []
- */
- ripples: {
- type: Array,
- value: function() {
- return [];
- }
- },
-
- /**
- * True when there are visible ripples animating within the
- * element.
- */
- animating: {
- type: Boolean,
- readOnly: true,
- reflectToAttribute: true,
- value: false
- },
-
- /**
- * If true, the ripple will remain in the "down" state until `holdDown`
- * is set to false again.
- */
- holdDown: {
- type: Boolean,
- value: false,
- observer: '_holdDownChanged'
- },
-
- /**
- * If true, the ripple will not generate a ripple effect
- * via pointer interaction.
- * Calling ripple's imperative api like `simulatedRipple` will
- * still generate the ripple effect.
- */
- noink: {
- type: Boolean,
- value: false
- },
-
- _animating: {
- type: Boolean
- },
-
- _boundAnimate: {
- type: Function,
- value: function() {
- return this.animate.bind(this);
- }
- }
- },
-
- get target () {
- return this.keyEventTarget;
- },
-
- keyBindings: {
- 'enter:keydown': '_onEnterKeydown',
- 'space:keydown': '_onSpaceKeydown',
- 'space:keyup': '_onSpaceKeyup'
- },
-
- attached: function() {
- // Set up a11yKeysBehavior to listen to key events on the target,
- // so that space and enter activate the ripple even if the target doesn't
- // handle key events. The key handlers deal with `noink` themselves.
- if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
- this.keyEventTarget = Polymer.dom(this).getOwnerRoot().host;
- } else {
- this.keyEventTarget = this.parentNode;
- }
- var keyEventTarget = /** @type {!EventTarget} */ (this.keyEventTarget);
- this.listen(keyEventTarget, 'up', 'uiUpAction');
- this.listen(keyEventTarget, 'down', 'uiDownAction');
- },
-
- detached: function() {
- this.unlisten(this.keyEventTarget, 'up', 'uiUpAction');
- this.unlisten(this.keyEventTarget, 'down', 'uiDownAction');
- this.keyEventTarget = null;
- },
-
- get shouldKeepAnimating () {
- for (var index = 0; index < this.ripples.length; ++index) {
- if (!this.ripples[index].isAnimationComplete) {
- return true;
- }
- }
-
- return false;
- },
-
- simulatedRipple: function() {
- this.downAction(null);
-
- // Please see polymer/polymer#1305
- this.async(function() {
- this.upAction();
- }, 1);
- },
-
- /**
- * Provokes a ripple down effect via a UI event,
- * respecting the `noink` property.
- * @param {Event=} event
- */
- uiDownAction: function(event) {
- if (!this.noink) {
- this.downAction(event);
- }
- },
-
- /**
- * Provokes a ripple down effect via a UI event,
- * *not* respecting the `noink` property.
- * @param {Event=} event
- */
- downAction: function(event) {
- if (this.holdDown && this.ripples.length > 0) {
- return;
- }
-
- var ripple = this.addRipple();
-
- ripple.downAction(event);
-
- if (!this._animating) {
- this._animating = true;
- this.animate();
- }
- },
-
- /**
- * Provokes a ripple up effect via a UI event,
- * respecting the `noink` property.
- * @param {Event=} event
- */
- uiUpAction: function(event) {
- if (!this.noink) {
- this.upAction(event);
- }
- },
-
- /**
- * Provokes a ripple up effect via a UI event,
- * *not* respecting the `noink` property.
- * @param {Event=} event
- */
- upAction: function(event) {
- if (this.holdDown) {
- return;
- }
-
- this.ripples.forEach(function(ripple) {
- ripple.upAction(event);
- });
-
- this._animating = true;
- this.animate();
- },
-
- onAnimationComplete: function() {
- this._animating = false;
- this.$.background.style.backgroundColor = null;
- this.fire('transitionend');
- },
-
- addRipple: function() {
- var ripple = new Ripple(this);
-
- Polymer.dom(this.$.waves).appendChild(ripple.waveContainer);
- this.$.background.style.backgroundColor = ripple.color;
- this.ripples.push(ripple);
-
- this._setAnimating(true);
-
- return ripple;
- },
-
- removeRipple: function(ripple) {
- var rippleIndex = this.ripples.indexOf(ripple);
-
- if (rippleIndex < 0) {
- return;
- }
-
- this.ripples.splice(rippleIndex, 1);
-
- ripple.remove();
-
- if (!this.ripples.length) {
- this._setAnimating(false);
- }
- },
-
- animate: function() {
- if (!this._animating) {
- return;
- }
- var index;
- var ripple;
-
- for (index = 0; index < this.ripples.length; ++index) {
- ripple = this.ripples[index];
-
- ripple.draw();
-
- this.$.background.style.opacity = ripple.outerOpacity;
-
- if (ripple.isOpacityFullyDecayed && !ripple.isRestingAtMaxRadius) {
- this.removeRipple(ripple);
- }
- }
-
- if (!this.shouldKeepAnimating && this.ripples.length === 0) {
- this.onAnimationComplete();
- } else {
- window.requestAnimationFrame(this._boundAnimate);
- }
- },
-
- _onEnterKeydown: function() {
- this.uiDownAction();
- this.async(this.uiUpAction, 1);
- },
-
- _onSpaceKeydown: function() {
- this.uiDownAction();
- },
-
- _onSpaceKeyup: function() {
- this.uiUpAction();
- },
-
- // note: holdDown does not respect noink since it can be a focus based
- // effect.
- _holdDownChanged: function(newVal, oldVal) {
- if (oldVal === undefined) {
- return;
- }
- if (newVal) {
- this.downAction();
- } else {
- this.upAction();
- }
- }
-
- /**
- Fired when the animation finishes.
- This is useful if you want to wait until
- the ripple animation finishes to perform some action.
-
- @event transitionend
- @param {{node: Object}} detail Contains the animated node.
- */
- });
- })();
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.bower.json
deleted file mode 100644
index 38dad0d72a4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.bower.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "name": "paper-spinner",
- "version": "1.2.0",
- "description": "A material design spinner",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "spinner",
- "loading"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-spinner"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-spinner",
- "ignore": [],
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": [
- "paper-spinner.html",
- "paper-spinner-lite.html"
- ],
- "_release": "1.2.0",
- "_resolution": {
- "type": "version",
- "tag": "v1.2.0",
- "commit": "66dc50a940aa9a3a067137defe1712aa85de6f35"
- },
- "_source": "git://github.com/PolymerElements/paper-spinner.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-spinner"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.travis.yml
deleted file mode 100644
index 2f5e400e2b3..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-language: node_js
-sudo: required
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: dpHtK5BMl68o/D6cQO9VsQWBPVuTrFPC56NT6kBLbiQtmxG2E2FD8dN4cHuEWafZopwYSsLLmEIIK77FMaonTSmzos5EixIQyqGxWTyNTpthg0Jenzc+6vZEs3h+3LDodFjdZSu8FgKyxU8SFLLGjAsSy8aegUNBszy7/SY8FAM=
- - secure: EASvFsWb/njjh3DOLD5Oz3nw4QPl4aIhDAIhU2qelb2UCp8Q/KGniU7VjNoQ7OSN05jh2ooz8Pu3cAhLmrWumJn2atXEXvRPKtT/+1Ciy3xFcvgmqM0RHB+7qSSOUwgvPW9bwdzVxxMjAW7Oqb7w3nVn9/mEv2sMPNSv7iEbiUI=
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- packages:
- - google-chrome-stable
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
-dist: trusty
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/README.md
deleted file mode 100644
index ad57a2fca3d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-spinner-behavior.html paper-spinner-lite.html paper-spinner.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-spinner.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-spinner)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-spinner)_
-
-
-##&lt;paper-spinner&gt;
-
-Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
-
-Element providing a multiple color material design circular spinner.
-
-```html
-<paper-spinner active></paper-spinner>
-```
-
-The default spinner cycles between four layers of colors; by default they are
-blue, red, yellow and green. It can be customized to cycle between four different
-colors. Use <paper-spinner-lite> for single color spinners.
-
-### Accessibility
-
-Alt attribute should be set to provide adequate context for accessibility. If not provided,
-it defaults to 'loading'.
-Empty alt can be provided to mark the element as decorative if alternative content is provided
-in another form (e.g. a text block following the spinner).
-
-```html
-<paper-spinner alt="Loading contacts list" active></paper-spinner>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-spinner-layer-1-color` | Color of the first spinner rotation | `--google-blue-500` |
-| `--paper-spinner-layer-2-color` | Color of the second spinner rotation | `--google-red-500` |
-| `--paper-spinner-layer-3-color` | Color of the third spinner rotation | `--google-yellow-500` |
-| `--paper-spinner-layer-4-color` | Color of the fourth spinner rotation | `--google-green-500` |
-| `--paper-spinner-stroke-width` | The width of the spinner stroke | 3px |
-
-
-
-##&lt;paper-spinner-lite&gt;
-
-Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
-
-Element providing a single color material design circular spinner.
-
-```html
-<paper-spinner-lite active></paper-spinner-lite>
-```
-
-The default spinner is blue. It can be customized to be a different color.
-
-### Accessibility
-
-Alt attribute should be set to provide adequate context for accessibility. If not provided,
-it defaults to 'loading'.
-Empty alt can be provided to mark the element as decorative if alternative content is provided
-in another form (e.g. a text block following the spinner).
-
-```html
-<paper-spinner-lite alt="Loading contacts list" active></paper-spinner-lite>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-spinner-color` | Color of the spinner | `--google-blue-500` |
-| `--paper-spinner-stroke-width` | The width of the spinner stroke | 3px |
-
-
-
-<!-- No docs for Polymer.PaperSpinnerBehavior found. -->
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/bower.json
deleted file mode 100644
index 7f8f09a9d6f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/bower.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "paper-spinner",
- "version": "1.2.0",
- "description": "A material design spinner",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "spinner",
- "loading"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-spinner"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-spinner",
- "ignore": [],
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "polymer": "Polymer/polymer#^1.1.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "main": [
- "paper-spinner.html",
- "paper-spinner-lite.html"
- ]
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/demo/index.html
deleted file mode 100644
index d4c56f945e0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/demo/index.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html lang="en">
- <head>
- <title>paper-spinner demo</title>
-
- <meta charset="UTF-8">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../paper-spinner-lite.html">
- <link rel="import" href="../paper-spinner.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- .vertical-section-container {
- max-width: 550px;
- }
-
- paper-spinner, paper-spinner-lite {
- margin-right: 24px;
- }
- </style>
- </head>
- <body unresolved>
- <div class="vertical-section-container centered">
- <h3>Spinners can be deactivated or activated</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-spinner></paper-spinner>
- <paper-spinner active></paper-spinner>
-
- <paper-spinner-lite></paper-spinner-lite>
- <paper-spinner-lite active></paper-spinner-lite>
-
- <button onclick="toggle(event)">Toggle</button>
- </template>
- </demo-snippet>
-
- <h3>Spinners can be styled using custom properties</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- paper-spinner.multi {
- --paper-spinner-layer-1-color: var(--paper-purple-500);
- --paper-spinner-layer-2-color: var(--paper-cyan-500);
- --paper-spinner-layer-3-color: var(--paper-blue-grey-500);
- --paper-spinner-layer-4-color: var(--paper-amber-500);
- }
- paper-spinner-lite.orange {
- --paper-spinner-color: var(--google-yellow-500);
- }
- paper-spinner-lite.green {
- --paper-spinner-color: var(--google-green-500);
- }
- paper-spinner-lite.thin {
- --paper-spinner-stroke-width: 1px;
- }
- paper-spinner-lite.thick {
- --paper-spinner-stroke-width: 6px;
- }
- </style>
-
- <paper-spinner class="multi" active></paper-spinner>
-
- <paper-spinner-lite class="orange" active></paper-spinner-lite>
- <paper-spinner-lite class="green" active></paper-spinner-lite>
-
- <paper-spinner-lite class="thin" active></paper-spinner-lite>
- <paper-spinner-lite class="thick" active></paper-spinner-lite>
- </template>
- </demo-snippet>
- </div>
-
- <script>
- function toggle(event) {
- var spinners = event.target.parentElement.querySelectorAll('paper-spinner, paper-spinner-lite');
- Array.prototype.forEach.call(spinners, function(spinner) {
- spinner.active = !spinner.active;
- });
- };
- </script>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/hero.svg
deleted file mode 100755
index 034b1f11add..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/hero.svg
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <g>
- <path d="M112.1,92.3c-13.4,0-25.1-9.1-28.4-22l1.9-0.5c3.1,12.1,13.9,20.5,26.4,20.5c15,0,27.3-12.2,27.3-27.3
- s-12.2-27.3-27.3-27.3c-8.1,0-15.8,3.6-21,9.8l-1.5-1.3c5.6-6.7,13.8-10.6,22.5-10.6c16.1,0,29.3,13.1,29.3,29.3
- S128.2,92.3,112.1,92.3z"/>
- <path d="M112.7,87.3c-6.6,0-12.7-2.5-17.3-7.2c-4.6-4.6-7.2-10.8-7.2-17.3c0-6.6,2.5-12.7,7.2-17.3c7.9-7.9,20.2-9.5,29.8-3.8
- l-1,1.7c-8.8-5.3-20.1-3.8-27.4,3.5c-4.2,4.2-6.6,9.9-6.6,15.9s2.3,11.7,6.6,15.9s9.9,6.6,15.9,6.6c6,0,11.7-2.3,15.9-6.6
- c4.7-4.7,7.1-11.3,6.5-18l2-0.2c0.7,7.3-1.9,14.4-7.1,19.6C125.4,84.7,119.2,87.3,112.7,87.3z"/>
- <path d="M112.5,43.5C101.8,43.5,93,52.3,93,63s8.7,19.5,19.5,19.5S132,73.7,132,63S123.2,43.5,112.5,43.5z M119,64h-6v6h-2v-6h-6
- v-2h6v-6h2v6h6V64z"/>
- </g>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/index.html
deleted file mode 100644
index 9874334610e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-spinner</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../polymer/polymer.html">
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
- </head>
- <body>
-
- <iron-component-page></iron-component-page>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-behavior.html b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-behavior.html
deleted file mode 100644
index ce3594b0200..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-behavior.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<script>
-
- /** @polymerBehavior */
- Polymer.PaperSpinnerBehavior = {
-
- listeners: {
- 'animationend': '__reset',
- 'webkitAnimationEnd': '__reset'
- },
-
- properties: {
- /**
- * Displays the spinner.
- */
- active: {
- type: Boolean,
- value: false,
- reflectToAttribute: true,
- observer: '__activeChanged'
- },
-
- /**
- * Alternative text content for accessibility support.
- * If alt is present, it will add an aria-label whose content matches alt when active.
- * If alt is not present, it will default to 'loading' as the alt value.
- */
- alt: {
- type: String,
- value: 'loading',
- observer: '__altChanged'
- },
-
- __coolingDown: {
- type: Boolean,
- value: false
- }
- },
-
- __computeContainerClasses: function(active, coolingDown) {
- return [
- active || coolingDown ? 'active' : '',
- coolingDown ? 'cooldown' : ''
- ].join(' ');
- },
-
- __activeChanged: function(active, old) {
- this.__setAriaHidden(!active);
- this.__coolingDown = !active && old;
- },
-
- __altChanged: function(alt) {
- // user-provided `aria-label` takes precedence over prototype default
- if (alt === this.getPropertyInfo('alt').value) {
- this.alt = this.getAttribute('aria-label') || alt;
- } else {
- this.__setAriaHidden(alt==='');
- this.setAttribute('aria-label', alt);
- }
- },
-
- __setAriaHidden: function(hidden) {
- var attr = 'aria-hidden';
- if (hidden) {
- this.setAttribute(attr, 'true');
- } else {
- this.removeAttribute(attr);
- }
- },
-
- __reset: function() {
- this.active = false;
- this.__coolingDown = false;
- }
- };
-</script>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-lite.html b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-lite.html
deleted file mode 100644
index 5d123a756e0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-lite.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/color.html">
-<link rel="import" href="paper-spinner-behavior.html">
-<link rel="import" href="paper-spinner-styles.html">
-
-<!--
-Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
-
-Element providing a single color material design circular spinner.
-
- <paper-spinner-lite active></paper-spinner-lite>
-
-The default spinner is blue. It can be customized to be a different color.
-
-### Accessibility
-
-Alt attribute should be set to provide adequate context for accessibility. If not provided,
-it defaults to 'loading'.
-Empty alt can be provided to mark the element as decorative if alternative content is provided
-in another form (e.g. a text block following the spinner).
-
- <paper-spinner-lite alt="Loading contacts list" active></paper-spinner-lite>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-spinner-color` | Color of the spinner | `--google-blue-500`
-`--paper-spinner-stroke-width` | The width of the spinner stroke | 3px
-
-@group Paper Elements
-@element paper-spinner-lite
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-spinner-lite">
- <template strip-whitespace>
- <style include="paper-spinner-styles"></style>
-
- <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]">
- <div class="spinner-layer">
- <div class="circle-clipper left"></div>
- <div class="circle-clipper right"></div>
- </div>
- </div>
- </template>
-
- <script>
- Polymer({
- is: 'paper-spinner-lite',
-
- behaviors: [
- Polymer.PaperSpinnerBehavior
- ]
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-styles.html
deleted file mode 100644
index 08329293755..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner-styles.html
+++ /dev/null
@@ -1,341 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<dom-module id="paper-spinner-styles">
- <template>
- <style>
- /*
- /**************************/
- /* STYLES FOR THE SPINNER */
- /**************************/
-
- /*
- * Constants:
- * ARCSIZE = 270 degrees (amount of circle the arc takes up)
- * ARCTIME = 1333ms (time it takes to expand and contract arc)
- * ARCSTARTROT = 216 degrees (how much the start location of the arc
- * should rotate each time, 216 gives us a
- * 5 pointed star shape (it's 360/5 * 3).
- * For a 7 pointed star, we might do
- * 360/7 * 3 = 154.286)
- * SHRINK_TIME = 400ms
- */
-
- :host {
- display: inline-block;
- position: relative;
- width: 28px;
- height: 28px;
-
- /* 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
- --paper-spinner-container-rotation-duration: 1568ms;
-
- /* ARCTIME */
- --paper-spinner-expand-contract-duration: 1333ms;
-
- /* 4 * ARCTIME */
- --paper-spinner-full-cycle-duration: 5332ms;
-
- /* SHRINK_TIME */
- --paper-spinner-cooldown-duration: 400ms;
- }
-
- #spinnerContainer {
- width: 100%;
- height: 100%;
-
- /* The spinner does not have any contents that would have to be
- * flipped if the direction changes. Always use ltr so that the
- * style works out correctly in both cases. */
- direction: ltr;
- }
-
- #spinnerContainer.active {
- -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;
- animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;
- }
-
- @-webkit-keyframes container-rotate {
- to { -webkit-transform: rotate(360deg) }
- }
-
- @keyframes container-rotate {
- to { transform: rotate(360deg) }
- }
-
- .spinner-layer {
- position: absolute;
- width: 100%;
- height: 100%;
- opacity: 0;
- white-space: nowrap;
- border-color: var(--paper-spinner-color, --google-blue-500);
- }
-
- .layer-1 {
- border-color: var(--paper-spinner-layer-1-color, --google-blue-500);
- }
-
- .layer-2 {
- border-color: var(--paper-spinner-layer-2-color, --google-red-500);
- }
-
- .layer-3 {
- border-color: var(--paper-spinner-layer-3-color, --google-yellow-500);
- }
-
- .layer-4 {
- border-color: var(--paper-spinner-layer-4-color, --google-green-500);
- }
-
- /**
- * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
- *
- * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
- * guarantee that the animation will start _exactly_ after that value. So we avoid using
- * animation-delay and instead set custom keyframes for each color (as layer-2undant as it
- * seems).
- */
- .active .spinner-layer {
- -webkit-animation-name: fill-unfill-rotate;
- -webkit-animation-duration: var(--paper-spinner-full-cycle-duration);
- -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
- -webkit-animation-iteration-count: infinite;
- animation-name: fill-unfill-rotate;
- animation-duration: var(--paper-spinner-full-cycle-duration);
- animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
- animation-iteration-count: infinite;
- opacity: 1;
- }
-
- .active .spinner-layer.layer-1 {
- -webkit-animation-name: fill-unfill-rotate, layer-1-fade-in-out;
- animation-name: fill-unfill-rotate, layer-1-fade-in-out;
- }
-
- .active .spinner-layer.layer-2 {
- -webkit-animation-name: fill-unfill-rotate, layer-2-fade-in-out;
- animation-name: fill-unfill-rotate, layer-2-fade-in-out;
- }
-
- .active .spinner-layer.layer-3 {
- -webkit-animation-name: fill-unfill-rotate, layer-3-fade-in-out;
- animation-name: fill-unfill-rotate, layer-3-fade-in-out;
- }
-
- .active .spinner-layer.layer-4 {
- -webkit-animation-name: fill-unfill-rotate, layer-4-fade-in-out;
- animation-name: fill-unfill-rotate, layer-4-fade-in-out;
- }
-
- @-webkit-keyframes fill-unfill-rotate {
- 12.5% { -webkit-transform: rotate(135deg) } /* 0.5 * ARCSIZE */
- 25% { -webkit-transform: rotate(270deg) } /* 1 * ARCSIZE */
- 37.5% { -webkit-transform: rotate(405deg) } /* 1.5 * ARCSIZE */
- 50% { -webkit-transform: rotate(540deg) } /* 2 * ARCSIZE */
- 62.5% { -webkit-transform: rotate(675deg) } /* 2.5 * ARCSIZE */
- 75% { -webkit-transform: rotate(810deg) } /* 3 * ARCSIZE */
- 87.5% { -webkit-transform: rotate(945deg) } /* 3.5 * ARCSIZE */
- to { -webkit-transform: rotate(1080deg) } /* 4 * ARCSIZE */
- }
-
- @keyframes fill-unfill-rotate {
- 12.5% { transform: rotate(135deg) } /* 0.5 * ARCSIZE */
- 25% { transform: rotate(270deg) } /* 1 * ARCSIZE */
- 37.5% { transform: rotate(405deg) } /* 1.5 * ARCSIZE */
- 50% { transform: rotate(540deg) } /* 2 * ARCSIZE */
- 62.5% { transform: rotate(675deg) } /* 2.5 * ARCSIZE */
- 75% { transform: rotate(810deg) } /* 3 * ARCSIZE */
- 87.5% { transform: rotate(945deg) } /* 3.5 * ARCSIZE */
- to { transform: rotate(1080deg) } /* 4 * ARCSIZE */
- }
-
- @-webkit-keyframes layer-1-fade-in-out {
- 0% { opacity: 1 }
- 25% { opacity: 1 }
- 26% { opacity: 0 }
- 89% { opacity: 0 }
- 90% { opacity: 1 }
- to { opacity: 1 }
- }
-
- @keyframes layer-1-fade-in-out {
- 0% { opacity: 1 }
- 25% { opacity: 1 }
- 26% { opacity: 0 }
- 89% { opacity: 0 }
- 90% { opacity: 1 }
- to { opacity: 1 }
- }
-
- @-webkit-keyframes layer-2-fade-in-out {
- 0% { opacity: 0 }
- 15% { opacity: 0 }
- 25% { opacity: 1 }
- 50% { opacity: 1 }
- 51% { opacity: 0 }
- to { opacity: 0 }
- }
-
- @keyframes layer-2-fade-in-out {
- 0% { opacity: 0 }
- 15% { opacity: 0 }
- 25% { opacity: 1 }
- 50% { opacity: 1 }
- 51% { opacity: 0 }
- to { opacity: 0 }
- }
-
- @-webkit-keyframes layer-3-fade-in-out {
- 0% { opacity: 0 }
- 40% { opacity: 0 }
- 50% { opacity: 1 }
- 75% { opacity: 1 }
- 76% { opacity: 0 }
- to { opacity: 0 }
- }
-
- @keyframes layer-3-fade-in-out {
- 0% { opacity: 0 }
- 40% { opacity: 0 }
- 50% { opacity: 1 }
- 75% { opacity: 1 }
- 76% { opacity: 0 }
- to { opacity: 0 }
- }
-
- @-webkit-keyframes layer-4-fade-in-out {
- 0% { opacity: 0 }
- 65% { opacity: 0 }
- 75% { opacity: 1 }
- 90% { opacity: 1 }
- to { opacity: 0 }
- }
-
- @keyframes layer-4-fade-in-out {
- 0% { opacity: 0 }
- 65% { opacity: 0 }
- 75% { opacity: 1 }
- 90% { opacity: 1 }
- to { opacity: 0 }
- }
-
- .circle-clipper {
- display: inline-block;
- position: relative;
- width: 50%;
- height: 100%;
- overflow: hidden;
- border-color: inherit;
- }
-
- /**
- * Patch the gap that appear between the two adjacent div.circle-clipper while the
- * spinner is rotating (appears on Chrome 50, Safari 9.1.1, and Edge).
- */
- .spinner-layer::after {
- left: 45%;
- width: 10%;
- border-top-style: solid;
- }
-
- .spinner-layer::after,
- .circle-clipper::after {
- content: '';
- box-sizing: border-box;
- position: absolute;
- top: 0;
- border-width: var(--paper-spinner-stroke-width, 3px);
- border-color: inherit;
- border-radius: 50%;
- }
-
- .circle-clipper::after {
- bottom: 0;
- width: 200%;
- border-style: solid;
- border-bottom-color: transparent !important;
- }
-
- .circle-clipper.left::after {
- left: 0;
- border-right-color: transparent !important;
- -webkit-transform: rotate(129deg);
- transform: rotate(129deg);
- }
-
- .circle-clipper.right::after {
- left: -100%;
- border-left-color: transparent !important;
- -webkit-transform: rotate(-129deg);
- transform: rotate(-129deg);
- }
-
- .active .gap-patch::after,
- .active .circle-clipper::after {
- -webkit-animation-duration: var(--paper-spinner-expand-contract-duration);
- -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
- -webkit-animation-iteration-count: infinite;
- animation-duration: var(--paper-spinner-expand-contract-duration);
- animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
- animation-iteration-count: infinite;
- }
-
- .active .circle-clipper.left::after {
- -webkit-animation-name: left-spin;
- animation-name: left-spin;
- }
-
- .active .circle-clipper.right::after {
- -webkit-animation-name: right-spin;
- animation-name: right-spin;
- }
-
- @-webkit-keyframes left-spin {
- 0% { -webkit-transform: rotate(130deg) }
- 50% { -webkit-transform: rotate(-5deg) }
- to { -webkit-transform: rotate(130deg) }
- }
-
- @keyframes left-spin {
- 0% { transform: rotate(130deg) }
- 50% { transform: rotate(-5deg) }
- to { transform: rotate(130deg) }
- }
-
- @-webkit-keyframes right-spin {
- 0% { -webkit-transform: rotate(-130deg) }
- 50% { -webkit-transform: rotate(5deg) }
- to { -webkit-transform: rotate(-130deg) }
- }
-
- @keyframes right-spin {
- 0% { transform: rotate(-130deg) }
- 50% { transform: rotate(5deg) }
- to { transform: rotate(-130deg) }
- }
-
- #spinnerContainer.cooldown {
- -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);
- animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);
- }
-
- @-webkit-keyframes fade-out {
- 0% { opacity: 1 }
- to { opacity: 0 }
- }
-
- @keyframes fade-out {
- 0% { opacity: 1 }
- to { opacity: 0 }
- }
- </style>
- </template>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner.html b/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner.html
deleted file mode 100644
index 54ff8bc09c7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-spinner/paper-spinner.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/color.html">
-<link rel="import" href="paper-spinner-behavior.html">
-<link rel="import" href="paper-spinner-styles.html">
-
-<!--
-Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
-
-Element providing a multiple color material design circular spinner.
-
- <paper-spinner active></paper-spinner>
-
-The default spinner cycles between four layers of colors; by default they are
-blue, red, yellow and green. It can be customized to cycle between four different
-colors. Use <paper-spinner-lite> for single color spinners.
-
-### Accessibility
-
-Alt attribute should be set to provide adequate context for accessibility. If not provided,
-it defaults to 'loading'.
-Empty alt can be provided to mark the element as decorative if alternative content is provided
-in another form (e.g. a text block following the spinner).
-
- <paper-spinner alt="Loading contacts list" active></paper-spinner>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-spinner-layer-1-color` | Color of the first spinner rotation | `--google-blue-500`
-`--paper-spinner-layer-2-color` | Color of the second spinner rotation | `--google-red-500`
-`--paper-spinner-layer-3-color` | Color of the third spinner rotation | `--google-yellow-500`
-`--paper-spinner-layer-4-color` | Color of the fourth spinner rotation | `--google-green-500`
-`--paper-spinner-stroke-width` | The width of the spinner stroke | 3px
-
-@group Paper Elements
-@element paper-spinner
-@hero hero.svg
-@demo demo/index.html
--->
-
-<dom-module id="paper-spinner">
- <template strip-whitespace>
- <style include="paper-spinner-styles"></style>
-
- <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]">
- <div class="spinner-layer layer-1">
- <div class="circle-clipper left"></div>
- <div class="circle-clipper right"></div>
- </div>
-
- <div class="spinner-layer layer-2">
- <div class="circle-clipper left"></div>
- <div class="circle-clipper right"></div>
- </div>
-
- <div class="spinner-layer layer-3">
- <div class="circle-clipper left"></div>
- <div class="circle-clipper right"></div>
- </div>
-
- <div class="spinner-layer layer-4">
- <div class="circle-clipper left"></div>
- <div class="circle-clipper right"></div>
- </div>
- </div>
- </template>
-
- <script>
- Polymer({
- is: 'paper-spinner',
-
- behaviors: [
- Polymer.PaperSpinnerBehavior
- ]
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/.bower.json
deleted file mode 100644
index ae677ef3e72..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/.bower.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "paper-styles",
- "version": "1.1.4",
- "description": "Common (global) styles for Material Design elements.",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-component",
- "polymer",
- "style"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-styles.git"
- },
- "main": "paper-styles.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/polymerelements/paper-styles/",
- "ignore": [
- "/.*"
- ],
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "font-roboto": "PolymerElements/font-roboto#^1.0.1",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "web-component-tester": "^4.0.0"
- },
- "_release": "1.1.4",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.4",
- "commit": "885bbd74db88dab4fb5dc229cdf994c55fb2b31b"
- },
- "_source": "git://github.com/PolymerElements/paper-styles.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-styles"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/README.md
deleted file mode 100644
index ca555bdb32d..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-styles.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-styles.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-styles)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-styles)_
-
-
-##&lt;paper-styles&gt;
-
-The `<paper-styles>` component provides simple ways to use Material Design CSS styles
-in your application. The following imports are available:
-
-1. [color.html](https://github.com/PolymerElements/paper-styles/blob/master/color.html):
-a complete list of the colors defined in the Material Design [palette](https://www.google.com/design/spec/style/color.html)
-
-
-1. [default-theme.html](https://github.com/PolymerElements/paper-styles/blob/master/default-theme.html): text,
-background and accent colors that match the default Material Design theme
-
-
-1. [shadow.html](https://github.com/PolymerElements/paper-styles/blob/master/shadow.html): Material Design
-[elevation](https://www.google.com/design/spec/what-is-material/elevation-shadows.html) and shadow styles
-
-
-1. [typography.html](https://github.com/PolymerElements/paper-styles/blob/master/typography.html):
-Material Design [font](http://www.google.com/design/spec/style/typography.html#typography-styles) styles and sizes
-
-
-1. [demo-pages.html](https://github.com/PolymerElements/paper-styles/blob/master/demo-pages.html): generic styles
-used in the PolymerElements demo pages
-
-
-
-We recommend importing each of these individual files, and using the style mixins
-available in each ones, rather than the aggregated `paper-styles.html` as a whole.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/bower.json
deleted file mode 100644
index f3330c3ca33..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "paper-styles",
- "version": "1.1.4",
- "description": "Common (global) styles for Material Design elements.",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-component",
- "polymer",
- "style"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-styles.git"
- },
- "main": "paper-styles.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/polymerelements/paper-styles/",
- "ignore": [
- "/.*"
- ],
- "dependencies": {
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "font-roboto": "PolymerElements/font-roboto#^1.0.1",
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "web-component-tester": "^4.0.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/global.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/global.html
deleted file mode 100644
index 6f0d5ddee1e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/global.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../paper-styles-classes.html">
-
-<!--
-A set of base styles that are applied to the document and standard elements that
-match the Material Design spec.
--->
-<style>
-/*
-Note that there is a lot of style duplication here. The hope is that the Polymer
-0.8 styling solution will allow for inheritance of properties so that we can
-eventually avoid it.
-*/
-
-/* Mixins */
-
-/* [paper-font] */
-body {
- font-family: 'Roboto', 'Noto', sans-serif;
- -webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
-}
-
-/* [paper-font=display2] */
-h1 {
- font-size: 45px;
- font-weight: 400;
- letter-spacing: -.018em;
- line-height: 48px;
-}
-
-/* [paper-font=display1] */
-h2 {
- font-size: 34px;
- font-weight: 400;
- letter-spacing: -.01em;
- line-height: 40px;
-}
-
-/* [paper-font=headline] */
-h3 {
- font-size: 24px;
- font-weight: 400;
- letter-spacing: -.012em;
- line-height: 32px;
-}
-
-/* [paper-font=subhead] */
-h4 {
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
-}
-
-/* [paper-font=body2] */
-h5, h6 {
- font-size: 14px;
- font-weight: 500;
- line-height: 24px;
-}
-
-/* [paper-font=button] */
-a {
- font-size: 14px;
- font-weight: 500;
- letter-spacing: 0.018em;
- line-height: 24px;
- text-transform: uppercase;
-}
-
-/* Overrides */
-
-body, a {
- color: #212121;
-}
-
-h1, h2, h3, h4, h5, h6, p {
- margin: 0 0 20px 0;
-}
-
-h1, h2, h3, h4, h5, h6, a {
- text-rendering: optimizeLegibility;
-}
-
-a {
- text-decoration: none;
-}
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow-layout.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow-layout.html
deleted file mode 100644
index fe55ec80a2b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow-layout.html
+++ /dev/null
@@ -1,302 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<style>
-
- /*******************************
- Flex Layout
- *******************************/
-
- html /deep/ .layout.horizontal,
- html /deep/ .layout.horizontal-reverse,
- html /deep/ .layout.vertical,
- html /deep/ .layout.vertical-reverse {
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- }
-
- html /deep/ .layout.inline {
- display: -ms-inline-flexbox;
- display: -webkit-inline-flex;
- display: inline-flex;
- }
-
- html /deep/ .layout.horizontal {
- -ms-flex-direction: row;
- -webkit-flex-direction: row;
- flex-direction: row;
- }
-
- html /deep/ .layout.horizontal-reverse {
- -ms-flex-direction: row-reverse;
- -webkit-flex-direction: row-reverse;
- flex-direction: row-reverse;
- }
-
- html /deep/ .layout.vertical {
- -ms-flex-direction: column;
- -webkit-flex-direction: column;
- flex-direction: column;
- }
-
- html /deep/ .layout.vertical-reverse {
- -ms-flex-direction: column-reverse;
- -webkit-flex-direction: column-reverse;
- flex-direction: column-reverse;
- }
-
- html /deep/ .layout.wrap {
- -ms-flex-wrap: wrap;
- -webkit-flex-wrap: wrap;
- flex-wrap: wrap;
- }
-
- html /deep/ .layout.wrap-reverse {
- -ms-flex-wrap: wrap-reverse;
- -webkit-flex-wrap: wrap-reverse;
- flex-wrap: wrap-reverse;
- }
-
- html /deep/ .flex-auto {
- -ms-flex: 1 1 auto;
- -webkit-flex: 1 1 auto;
- flex: 1 1 auto;
- }
-
- html /deep/ .flex-none {
- -ms-flex: none;
- -webkit-flex: none;
- flex: none;
- }
-
- html /deep/ .flex,
- html /deep/ .flex-1 {
- -ms-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- }
-
- html /deep/ .flex-2 {
- -ms-flex: 2;
- -webkit-flex: 2;
- flex: 2;
- }
-
- html /deep/ .flex-3 {
- -ms-flex: 3;
- -webkit-flex: 3;
- flex: 3;
- }
-
- html /deep/ .flex-4 {
- -ms-flex: 4;
- -webkit-flex: 4;
- flex: 4;
- }
-
- html /deep/ .flex-5 {
- -ms-flex: 5;
- -webkit-flex: 5;
- flex: 5;
- }
-
- html /deep/ .flex-6 {
- -ms-flex: 6;
- -webkit-flex: 6;
- flex: 6;
- }
-
- html /deep/ .flex-7 {
- -ms-flex: 7;
- -webkit-flex: 7;
- flex: 7;
- }
-
- html /deep/ .flex-8 {
- -ms-flex: 8;
- -webkit-flex: 8;
- flex: 8;
- }
-
- html /deep/ .flex-9 {
- -ms-flex: 9;
- -webkit-flex: 9;
- flex: 9;
- }
-
- html /deep/ .flex-10 {
- -ms-flex: 10;
- -webkit-flex: 10;
- flex: 10;
- }
-
- html /deep/ .flex-11 {
- -ms-flex: 11;
- -webkit-flex: 11;
- flex: 11;
- }
-
- html /deep/ .flex-12 {
- -ms-flex: 12;
- -webkit-flex: 12;
- flex: 12;
- }
-
- /* alignment in cross axis */
-
- html /deep/ .layout.start {
- -ms-flex-align: start;
- -webkit-align-items: flex-start;
- align-items: flex-start;
- }
-
- html /deep/ .layout.center,
- html /deep/ .layout.center-center {
- -ms-flex-align: center;
- -webkit-align-items: center;
- align-items: center;
- }
-
- html /deep/ .layout.end {
- -ms-flex-align: end;
- -webkit-align-items: flex-end;
- align-items: flex-end;
- }
-
- /* alignment in main axis */
-
- html /deep/ .layout.start-justified {
- -ms-flex-pack: start;
- -webkit-justify-content: flex-start;
- justify-content: flex-start;
- }
-
- html /deep/ .layout.center-justified,
- html /deep/ .layout.center-center {
- -ms-flex-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- }
-
- html /deep/ .layout.end-justified {
- -ms-flex-pack: end;
- -webkit-justify-content: flex-end;
- justify-content: flex-end;
- }
-
- html /deep/ .layout.around-justified {
- -ms-flex-pack: around;
- -webkit-justify-content: space-around;
- justify-content: space-around;
- }
-
- html /deep/ .layout.justified {
- -ms-flex-pack: justify;
- -webkit-justify-content: space-between;
- justify-content: space-between;
- }
-
- /* self alignment */
-
- html /deep/ .self-start {
- -ms-align-self: flex-start;
- -webkit-align-self: flex-start;
- align-self: flex-start;
- }
-
- html /deep/ .self-center {
- -ms-align-self: center;
- -webkit-align-self: center;
- align-self: center;
- }
-
- html /deep/ .self-end {
- -ms-align-self: flex-end;
- -webkit-align-self: flex-end;
- align-self: flex-end;
- }
-
- html /deep/ .self-stretch {
- -ms-align-self: stretch;
- -webkit-align-self: stretch;
- align-self: stretch;
- }
-
- /*******************************
- Other Layout
- *******************************/
-
- html /deep/ .block {
- display: block;
- }
-
- /* IE 10 support for HTML5 hidden attr */
- html /deep/ [hidden] {
- display: none !important;
- }
-
- html /deep/ .invisible {
- visibility: hidden !important;
- }
-
- html /deep/ .relative {
- position: relative;
- }
-
- html /deep/ .fit {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- body.fullbleed {
- margin: 0;
- height: 100vh;
- }
-
- html /deep/ .scroll {
- -webkit-overflow-scrolling: touch;
- overflow: auto;
- }
-
- .fixed-bottom,
- .fixed-left,
- .fixed-right,
- .fixed-top {
- position: fixed;
- }
-
- html /deep/ .fixed-top {
- top: 0;
- left: 0;
- right: 0;
- }
-
- html /deep/ .fixed-right {
- top: 0;
- right: 0;
- bottom: 0;
- }
-
- html /deep/ .fixed-bottom {
- right: 0;
- bottom: 0;
- left: 0;
- }
-
- html /deep/ .fixed-left {
- top: 0;
- bottom: 0;
- left: 0;
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow.html
deleted file mode 100644
index 4c40a147a5b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/shadow.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<style>
-.shadow-transition {
- transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
-}
-
-.shadow-elevation-2dp {
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
- 0 1px 5px 0 rgba(0, 0, 0, 0.12),
- 0 3px 1px -2px rgba(0, 0, 0, 0.2);
-}
-
-.shadow-elevation-3dp {
- box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
- 0 1px 8px 0 rgba(0, 0, 0, 0.12),
- 0 3px 3px -2px rgba(0, 0, 0, 0.4);
-}
-
-.shadow-elevation-4dp {
- box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
- 0 1px 10px 0 rgba(0, 0, 0, 0.12),
- 0 2px 4px -1px rgba(0, 0, 0, 0.4);
-}
-
-.shadow-elevation-6dp {
- box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
- 0 1px 18px 0 rgba(0, 0, 0, 0.12),
- 0 3px 5px -1px rgba(0, 0, 0, 0.4);
-}
-
-.shadow-elevation-8dp {
- box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
- 0 3px 14px 2px rgba(0, 0, 0, 0.12),
- 0 5px 5px -3px rgba(0, 0, 0, 0.4);
-}
-
-.shadow-elevation-16dp {
- box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
- 0 6px 30px 5px rgba(0, 0, 0, 0.12),
- 0 8px 10px -5px rgba(0, 0, 0, 0.4);
-}
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/typography.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/typography.html
deleted file mode 100644
index e6163a8176a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/classes/typography.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../../font-roboto/roboto.html">
-
-<!--
-Typographic styles are provided matching the Material Design standard styles:
-http://www.google.com/design/spec/style/typography.html#typography-standard-styles
-
-To make use of them, apply a `paper-font-<style>` class to elements, matching
-the font style you wish it to inherit.
-
- <header class="paper-font-display2">Hey there!</header>
-
-Note that these are English/Latin centric styles. You may need to further adjust
-line heights and weights for CJK typesetting. See the notes in the Material
-Design typography section.
--->
-<style>
-
-.paper-font-display4,
-.paper-font-display3,
-.paper-font-display2,
-.paper-font-display1,
-.paper-font-headline,
-.paper-font-title,
-.paper-font-subhead,
-.paper-font-body2,
-.paper-font-body1,
-.paper-font-caption,
-.paper-font-menu,
-.paper-font-button {
- font-family: 'Roboto', 'Noto', sans-serif;
- -webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
-}
-
-.paper-font-code2,
-.paper-font-code1 {
- font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
- -webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
-}
-
-/* Opt for better kerning for headers & other short labels. */
-.paper-font-display4,
-.paper-font-display3,
-.paper-font-display2,
-.paper-font-display1,
-.paper-font-headline,
-.paper-font-title,
-.paper-font-subhead,
-.paper-font-menu,
-.paper-font-button {
- text-rendering: optimizeLegibility;
-}
-
-/*
-"Line wrapping only applies to Body, Subhead, Headline, and the smaller Display
-styles. All other styles should exist as single lines."
-*/
-.paper-font-display4,
-.paper-font-display3,
-.paper-font-title,
-.paper-font-caption,
-.paper-font-menu,
-.paper-font-button {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.paper-font-display4 {
- font-size: 112px;
- font-weight: 300;
- letter-spacing: -.044em;
- line-height: 120px;
-}
-
-.paper-font-display3 {
- font-size: 56px;
- font-weight: 400;
- letter-spacing: -.026em;
- line-height: 60px;
-}
-
-.paper-font-display2 {
- font-size: 45px;
- font-weight: 400;
- letter-spacing: -.018em;
- line-height: 48px;
-}
-
-.paper-font-display1 {
- font-size: 34px;
- font-weight: 400;
- letter-spacing: -.01em;
- line-height: 40px;
-}
-
-.paper-font-headline {
- font-size: 24px;
- font-weight: 400;
- letter-spacing: -.012em;
- line-height: 32px;
-}
-
-.paper-font-title {
- font-size: 20px;
- font-weight: 500;
- line-height: 28px;
-}
-
-.paper-font-subhead {
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
-}
-
-.paper-font-body2 {
- font-size: 14px;
- font-weight: 500;
- line-height: 24px;
-}
-
-.paper-font-body1 {
- font-size: 14px;
- font-weight: 400;
- line-height: 20px;
-}
-
-.paper-font-caption {
- font-size: 12px;
- font-weight: 400;
- letter-spacing: 0.011em;
- line-height: 20px;
-}
-
-.paper-font-menu {
- font-size: 13px;
- font-weight: 500;
- line-height: 24px;
-}
-
-.paper-font-button {
- font-size: 14px;
- font-weight: 500;
- letter-spacing: 0.018em;
- line-height: 24px;
- text-transform: uppercase;
-}
-
-.paper-font-code2 {
- font-size: 14px;
- font-weight: 700;
- line-height: 20px;
-}
-
-.paper-font-code1 {
- font-size: 14px;
- font-weight: 500;
- line-height: 20px;
-}
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/color.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/color.html
deleted file mode 100644
index 51887901356..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/color.html
+++ /dev/null
@@ -1,333 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<style is="custom-style">
-
- :root {
-
- /* Material Design color palette for Google products */
-
- --google-red-100: #f4c7c3;
- --google-red-300: #e67c73;
- --google-red-500: #db4437;
- --google-red-700: #c53929;
-
- --google-blue-100: #c6dafc;
- --google-blue-300: #7baaf7;
- --google-blue-500: #4285f4;
- --google-blue-700: #3367d6;
-
- --google-green-100: #b7e1cd;
- --google-green-300: #57bb8a;
- --google-green-500: #0f9d58;
- --google-green-700: #0b8043;
-
- --google-yellow-100: #fce8b2;
- --google-yellow-300: #f7cb4d;
- --google-yellow-500: #f4b400;
- --google-yellow-700: #f09300;
-
- --google-grey-100: #f5f5f5;
- --google-grey-300: #e0e0e0;
- --google-grey-500: #9e9e9e;
- --google-grey-700: #616161;
-
- /* Material Design color palette from online spec document */
-
- --paper-red-50: #ffebee;
- --paper-red-100: #ffcdd2;
- --paper-red-200: #ef9a9a;
- --paper-red-300: #e57373;
- --paper-red-400: #ef5350;
- --paper-red-500: #f44336;
- --paper-red-600: #e53935;
- --paper-red-700: #d32f2f;
- --paper-red-800: #c62828;
- --paper-red-900: #b71c1c;
- --paper-red-a100: #ff8a80;
- --paper-red-a200: #ff5252;
- --paper-red-a400: #ff1744;
- --paper-red-a700: #d50000;
-
- --paper-pink-50: #fce4ec;
- --paper-pink-100: #f8bbd0;
- --paper-pink-200: #f48fb1;
- --paper-pink-300: #f06292;
- --paper-pink-400: #ec407a;
- --paper-pink-500: #e91e63;
- --paper-pink-600: #d81b60;
- --paper-pink-700: #c2185b;
- --paper-pink-800: #ad1457;
- --paper-pink-900: #880e4f;
- --paper-pink-a100: #ff80ab;
- --paper-pink-a200: #ff4081;
- --paper-pink-a400: #f50057;
- --paper-pink-a700: #c51162;
-
- --paper-purple-50: #f3e5f5;
- --paper-purple-100: #e1bee7;
- --paper-purple-200: #ce93d8;
- --paper-purple-300: #ba68c8;
- --paper-purple-400: #ab47bc;
- --paper-purple-500: #9c27b0;
- --paper-purple-600: #8e24aa;
- --paper-purple-700: #7b1fa2;
- --paper-purple-800: #6a1b9a;
- --paper-purple-900: #4a148c;
- --paper-purple-a100: #ea80fc;
- --paper-purple-a200: #e040fb;
- --paper-purple-a400: #d500f9;
- --paper-purple-a700: #aa00ff;
-
- --paper-deep-purple-50: #ede7f6;
- --paper-deep-purple-100: #d1c4e9;
- --paper-deep-purple-200: #b39ddb;
- --paper-deep-purple-300: #9575cd;
- --paper-deep-purple-400: #7e57c2;
- --paper-deep-purple-500: #673ab7;
- --paper-deep-purple-600: #5e35b1;
- --paper-deep-purple-700: #512da8;
- --paper-deep-purple-800: #4527a0;
- --paper-deep-purple-900: #311b92;
- --paper-deep-purple-a100: #b388ff;
- --paper-deep-purple-a200: #7c4dff;
- --paper-deep-purple-a400: #651fff;
- --paper-deep-purple-a700: #6200ea;
-
- --paper-indigo-50: #e8eaf6;
- --paper-indigo-100: #c5cae9;
- --paper-indigo-200: #9fa8da;
- --paper-indigo-300: #7986cb;
- --paper-indigo-400: #5c6bc0;
- --paper-indigo-500: #3f51b5;
- --paper-indigo-600: #3949ab;
- --paper-indigo-700: #303f9f;
- --paper-indigo-800: #283593;
- --paper-indigo-900: #1a237e;
- --paper-indigo-a100: #8c9eff;
- --paper-indigo-a200: #536dfe;
- --paper-indigo-a400: #3d5afe;
- --paper-indigo-a700: #304ffe;
-
- --paper-blue-50: #e3f2fd;
- --paper-blue-100: #bbdefb;
- --paper-blue-200: #90caf9;
- --paper-blue-300: #64b5f6;
- --paper-blue-400: #42a5f5;
- --paper-blue-500: #2196f3;
- --paper-blue-600: #1e88e5;
- --paper-blue-700: #1976d2;
- --paper-blue-800: #1565c0;
- --paper-blue-900: #0d47a1;
- --paper-blue-a100: #82b1ff;
- --paper-blue-a200: #448aff;
- --paper-blue-a400: #2979ff;
- --paper-blue-a700: #2962ff;
-
- --paper-light-blue-50: #e1f5fe;
- --paper-light-blue-100: #b3e5fc;
- --paper-light-blue-200: #81d4fa;
- --paper-light-blue-300: #4fc3f7;
- --paper-light-blue-400: #29b6f6;
- --paper-light-blue-500: #03a9f4;
- --paper-light-blue-600: #039be5;
- --paper-light-blue-700: #0288d1;
- --paper-light-blue-800: #0277bd;
- --paper-light-blue-900: #01579b;
- --paper-light-blue-a100: #80d8ff;
- --paper-light-blue-a200: #40c4ff;
- --paper-light-blue-a400: #00b0ff;
- --paper-light-blue-a700: #0091ea;
-
- --paper-cyan-50: #e0f7fa;
- --paper-cyan-100: #b2ebf2;
- --paper-cyan-200: #80deea;
- --paper-cyan-300: #4dd0e1;
- --paper-cyan-400: #26c6da;
- --paper-cyan-500: #00bcd4;
- --paper-cyan-600: #00acc1;
- --paper-cyan-700: #0097a7;
- --paper-cyan-800: #00838f;
- --paper-cyan-900: #006064;
- --paper-cyan-a100: #84ffff;
- --paper-cyan-a200: #18ffff;
- --paper-cyan-a400: #00e5ff;
- --paper-cyan-a700: #00b8d4;
-
- --paper-teal-50: #e0f2f1;
- --paper-teal-100: #b2dfdb;
- --paper-teal-200: #80cbc4;
- --paper-teal-300: #4db6ac;
- --paper-teal-400: #26a69a;
- --paper-teal-500: #009688;
- --paper-teal-600: #00897b;
- --paper-teal-700: #00796b;
- --paper-teal-800: #00695c;
- --paper-teal-900: #004d40;
- --paper-teal-a100: #a7ffeb;
- --paper-teal-a200: #64ffda;
- --paper-teal-a400: #1de9b6;
- --paper-teal-a700: #00bfa5;
-
- --paper-green-50: #e8f5e9;
- --paper-green-100: #c8e6c9;
- --paper-green-200: #a5d6a7;
- --paper-green-300: #81c784;
- --paper-green-400: #66bb6a;
- --paper-green-500: #4caf50;
- --paper-green-600: #43a047;
- --paper-green-700: #388e3c;
- --paper-green-800: #2e7d32;
- --paper-green-900: #1b5e20;
- --paper-green-a100: #b9f6ca;
- --paper-green-a200: #69f0ae;
- --paper-green-a400: #00e676;
- --paper-green-a700: #00c853;
-
- --paper-light-green-50: #f1f8e9;
- --paper-light-green-100: #dcedc8;
- --paper-light-green-200: #c5e1a5;
- --paper-light-green-300: #aed581;
- --paper-light-green-400: #9ccc65;
- --paper-light-green-500: #8bc34a;
- --paper-light-green-600: #7cb342;
- --paper-light-green-700: #689f38;
- --paper-light-green-800: #558b2f;
- --paper-light-green-900: #33691e;
- --paper-light-green-a100: #ccff90;
- --paper-light-green-a200: #b2ff59;
- --paper-light-green-a400: #76ff03;
- --paper-light-green-a700: #64dd17;
-
- --paper-lime-50: #f9fbe7;
- --paper-lime-100: #f0f4c3;
- --paper-lime-200: #e6ee9c;
- --paper-lime-300: #dce775;
- --paper-lime-400: #d4e157;
- --paper-lime-500: #cddc39;
- --paper-lime-600: #c0ca33;
- --paper-lime-700: #afb42b;
- --paper-lime-800: #9e9d24;
- --paper-lime-900: #827717;
- --paper-lime-a100: #f4ff81;
- --paper-lime-a200: #eeff41;
- --paper-lime-a400: #c6ff00;
- --paper-lime-a700: #aeea00;
-
- --paper-yellow-50: #fffde7;
- --paper-yellow-100: #fff9c4;
- --paper-yellow-200: #fff59d;
- --paper-yellow-300: #fff176;
- --paper-yellow-400: #ffee58;
- --paper-yellow-500: #ffeb3b;
- --paper-yellow-600: #fdd835;
- --paper-yellow-700: #fbc02d;
- --paper-yellow-800: #f9a825;
- --paper-yellow-900: #f57f17;
- --paper-yellow-a100: #ffff8d;
- --paper-yellow-a200: #ffff00;
- --paper-yellow-a400: #ffea00;
- --paper-yellow-a700: #ffd600;
-
- --paper-amber-50: #fff8e1;
- --paper-amber-100: #ffecb3;
- --paper-amber-200: #ffe082;
- --paper-amber-300: #ffd54f;
- --paper-amber-400: #ffca28;
- --paper-amber-500: #ffc107;
- --paper-amber-600: #ffb300;
- --paper-amber-700: #ffa000;
- --paper-amber-800: #ff8f00;
- --paper-amber-900: #ff6f00;
- --paper-amber-a100: #ffe57f;
- --paper-amber-a200: #ffd740;
- --paper-amber-a400: #ffc400;
- --paper-amber-a700: #ffab00;
-
- --paper-orange-50: #fff3e0;
- --paper-orange-100: #ffe0b2;
- --paper-orange-200: #ffcc80;
- --paper-orange-300: #ffb74d;
- --paper-orange-400: #ffa726;
- --paper-orange-500: #ff9800;
- --paper-orange-600: #fb8c00;
- --paper-orange-700: #f57c00;
- --paper-orange-800: #ef6c00;
- --paper-orange-900: #e65100;
- --paper-orange-a100: #ffd180;
- --paper-orange-a200: #ffab40;
- --paper-orange-a400: #ff9100;
- --paper-orange-a700: #ff6500;
-
- --paper-deep-orange-50: #fbe9e7;
- --paper-deep-orange-100: #ffccbc;
- --paper-deep-orange-200: #ffab91;
- --paper-deep-orange-300: #ff8a65;
- --paper-deep-orange-400: #ff7043;
- --paper-deep-orange-500: #ff5722;
- --paper-deep-orange-600: #f4511e;
- --paper-deep-orange-700: #e64a19;
- --paper-deep-orange-800: #d84315;
- --paper-deep-orange-900: #bf360c;
- --paper-deep-orange-a100: #ff9e80;
- --paper-deep-orange-a200: #ff6e40;
- --paper-deep-orange-a400: #ff3d00;
- --paper-deep-orange-a700: #dd2c00;
-
- --paper-brown-50: #efebe9;
- --paper-brown-100: #d7ccc8;
- --paper-brown-200: #bcaaa4;
- --paper-brown-300: #a1887f;
- --paper-brown-400: #8d6e63;
- --paper-brown-500: #795548;
- --paper-brown-600: #6d4c41;
- --paper-brown-700: #5d4037;
- --paper-brown-800: #4e342e;
- --paper-brown-900: #3e2723;
-
- --paper-grey-50: #fafafa;
- --paper-grey-100: #f5f5f5;
- --paper-grey-200: #eeeeee;
- --paper-grey-300: #e0e0e0;
- --paper-grey-400: #bdbdbd;
- --paper-grey-500: #9e9e9e;
- --paper-grey-600: #757575;
- --paper-grey-700: #616161;
- --paper-grey-800: #424242;
- --paper-grey-900: #212121;
-
- --paper-blue-grey-50: #eceff1;
- --paper-blue-grey-100: #cfd8dc;
- --paper-blue-grey-200: #b0bec5;
- --paper-blue-grey-300: #90a4ae;
- --paper-blue-grey-400: #78909c;
- --paper-blue-grey-500: #607d8b;
- --paper-blue-grey-600: #546e7a;
- --paper-blue-grey-700: #455a64;
- --paper-blue-grey-800: #37474f;
- --paper-blue-grey-900: #263238;
-
- /* opacity for dark text on a light background */
- --dark-divider-opacity: 0.12;
- --dark-disabled-opacity: 0.38; /* or hint text or icon */
- --dark-secondary-opacity: 0.54;
- --dark-primary-opacity: 0.87;
-
- /* opacity for light text on a dark background */
- --light-divider-opacity: 0.12;
- --light-disabled-opacity: 0.3; /* or hint text or icon */
- --light-secondary-opacity: 0.7;
- --light-primary-opacity: 1.0;
-
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/default-theme.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/default-theme.html
deleted file mode 100644
index cc6972812cf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/default-theme.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="color.html">
-
-<!-- Taken from https://www.google.com/design/spec/style/color.html#color-ui-color-application -->
-
-<style is="custom-style">
-
- :root {
- /*
- * You can use these generic variables in your elements for easy theming.
- * For example, if all your elements use `--primary-text-color` as its main
- * color, then switching from a light to a dark theme is just a matter of
- * changing the value of `--primary-text-color` in your application.
- */
- --primary-text-color: var(--light-theme-text-color);
- --primary-background-color: var(--light-theme-background-color);
- --secondary-text-color: var(--light-theme-secondary-color);
- --disabled-text-color: var(--light-theme-disabled-color);
- --divider-color: var(--light-theme-divider-color);
- --error-color: var(--paper-deep-orange-a700);
-
- /*
- * Primary and accent colors. Also see color.html for more colors.
- */
- --primary-color: var(--paper-indigo-500);
- --light-primary-color: var(--paper-indigo-100);
- --dark-primary-color: var(--paper-indigo-700);
-
- --accent-color: var(--paper-pink-a200);
- --light-accent-color: var(--paper-pink-a100);
- --dark-accent-color: var(--paper-pink-a400);
-
-
- /*
- * Material Design Light background theme
- */
- --light-theme-background-color: #ffffff;
- --light-theme-base-color: #000000;
- --light-theme-text-color: var(--paper-grey-900);
- --light-theme-secondary-color: #737373; /* for secondary text and icons */
- --light-theme-disabled-color: #9b9b9b; /* disabled/hint text */
- --light-theme-divider-color: #dbdbdb;
-
- /*
- * Material Design Dark background theme
- */
- --dark-theme-background-color: var(--paper-grey-900);
- --dark-theme-base-color: #ffffff;
- --dark-theme-text-color: #ffffff;
- --dark-theme-secondary-color: #bcbcbc; /* for secondary text and icons */
- --dark-theme-disabled-color: #646464; /* disabled/hint text */
- --dark-theme-divider-color: #3c3c3c;
-
- /*
- * Deprecated values because of their confusing names.
- */
- --text-primary-color: var(--dark-theme-text-color);
- --default-primary-color: var(--primary-color);
-
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo-pages.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo-pages.html
deleted file mode 100644
index 6e900ad163f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo-pages.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-
-<link rel="import" href="color.html">
-<link rel="import" href="typography.html">
-<link rel="import" href="shadow.html">
-
-<style is="custom-style">
-
- body {
- @apply(--paper-font-common-base);
- font-size: 14px;
- margin: 0;
- padding: 24px;
- background-color: var(--paper-grey-50);
- }
-
- .horizontal-section-container {
- @apply(--layout-horizontal);
- @apply(--layout-center-justified);
- @apply(--layout-wrap);
- }
-
- .vertical-section-container {
- @apply(--layout-vertical);
- @apply(--center-justified);
- }
-
- .horizontal-section {
- background-color: white;
- padding: 24px;
- margin-right: 24px;
- min-width: 200px;
-
- @apply(--shadow-elevation-2dp);
- }
-
- .vertical-section {
- background-color: white;
- padding: 24px;
- margin: 0 24px 24px 24px;
-
- @apply(--shadow-elevation-2dp);
- }
-
- .centered {
- max-width: 400px;
- margin-left: auto;
- margin-right: auto;
- }
-
- code {
- color: var(--google-grey-700);
- }
-
- /* TODO: remove this hack and use horizontal-section-container instead */
- body > div.layout.horizontal.center-justified {
- @apply(--layout-wrap);
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo.css b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo.css
deleted file mode 100644
index efd8b471b50..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo.css
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-
-*/
-body {
- font-family: 'Roboto', 'Noto', sans-serif;
- font-size: 14px;
- margin: 0;
- padding: 24px;
-}
-
-section {
- padding: 20px 0;
-}
-
-section > div {
- padding: 14px;
- font-size: 16px;
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo/index.html
deleted file mode 100644
index 1080cc66ddc..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/demo/index.html
+++ /dev/null
@@ -1,339 +0,0 @@
-<!doctype html>
-
-<!--
- @license
- Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<html>
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <title>paper-styles demo</title>
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../color.html">
- <link rel="import" href="../typography.html">
- <link rel="import" href="../default-theme.html">
- <link rel="import" href="../demo-pages.html">
- </head>
-
- <style>
- .redlines {
- background: linear-gradient(0deg, transparent, transparent 3.5px, rgba(255,0,0,0.2) 3.5px, rgba(255,0,0,0.2) 4px);
- background-size: 100% 4px;
- }
-
- .paragraph {
- margin-bottom: 20px;
- }
- </style>
- <style is="custom-style">
- .paper-font-display4 {
- @apply(--paper-font-display4);
- }
-
- .paper-font-display3 {
- @apply(--paper-font-display3);
- }
-
- .paper-font-display2 {
- @apply(--paper-font-display2);
- }
-
- .paper-font-display1 {
- @apply(--paper-font-display1);
- }
-
- .paper-font-headline {
- @apply(--paper-font-headline);
- }
-
- .paper-font-title {
- @apply(--paper-font-title);
- }
-
- .paper-font-subhead {
- @apply(--paper-font-subhead);
- }
-
- .paper-font-body2 {
- @apply(--paper-font-body2);
- }
-
- .paper-font-body1 {
- @apply(--paper-font-body1);
- }
-
- .paper-font-caption {
- @apply(--paper-font-caption);
- }
-
- .paper-font-menu {
- @apply(--paper-font-menu);
- }
-
- .paper-font-button {
- @apply(--paper-font-button);
- }
-
- .mobile-app {
- max-width: 320px;
- }
-
- .toolbar {
- height: 144px;
- padding: 16px;
-
- background: var(--default-primary-color);
- color: var(--text-primary-color);
- @apply(--paper-font-display1);
- }
-
- .item, .disabled-item {
- position: relative;
- padding: 8px;
- border: 1px solid;
- border-color: var(--divider-color);
- border-top: 0;
- }
-
- .item .primary {
- color: var(--primary-text-color);
-
- @apply(--paper-font-body2);
- }
-
- .item .secondary {
- color: var(--secondary-text-color);
-
- @apply(--paper-font-body1);
- }
-
- .disabled-item {
- color: var(--disabled-text-color);
-
- @apply(--paper-font-body2);
- }
-
- .fab {
- position: absolute;
- box-sizing: border-box;
- padding: 8px;
- width: 56px;
- height: 56px;
- right: 16px;
- top: -28px;
- border-radius: 50%;
- text-align: center;
-
- background: var(--accent-color);
- color: var(--text-primary-color);
- @apply(--paper-font-display1);
- }
-
- .shadow {
- display: inline-block;
- padding: 8px;
- margin: 16px;
- height: 50px;
- width: 50px;
- }
-
- .shadow-2dp {
- @apply(--shadow-elevation-2dp);
- }
-
- .shadow-3dp {
- @apply(--shadow-elevation-3dp);
- }
-
- .shadow-4dp {
- @apply(--shadow-elevation-4dp);
- }
-
- .shadow-6dp {
- @apply(--shadow-elevation-6dp);
- }
-
- .shadow-8dp {
- @apply(--shadow-elevation-8dp);
- }
-
- .shadow-12dp {
- @apply(--shadow-elevation-12dp);
- }
-
- .shadow-16dp {
- @apply(--shadow-elevation-16dp);
- }
- </style>
-
- <body unresolved>
- <h1>paper-styles</h1>
-
- <section id="default-theme">
- <h2>default-theme.html</h2>
-
- <section class="mobile-app">
- <div class="toolbar">
- Title
- </div>
- <div class="item">
- <div class="fab">+</div>
- <div class="primary">Primary text</div>
- <div class="secondary">Secondary text</div>
- </div>
- <div class="disabled-item">
- Disabled
- </div>
- </section>
- </section>
-
- <section id="typography">
- <h2>typography.html</h2>
- <p>
- Grumpy wizards make toxic brew for the evil Queen and Jack.
- </p>
- <section class="redlines paragraph">
- <div class="paper-font-display4">Display 4</div>
- <div class="paper-font-display3">Display 3</div>
- <div class="paper-font-display2">Display 2</div>
- <div class="paper-font-display1">Display 1</div>
- <div class="paper-font-headline">Headline</div>
- <div class="paper-font-title">Title</div>
- <div class="paper-font-subhead">Subhead</div>
- <div class="paper-font-body2">Body 2</div>
- <div class="paper-font-body1">Body 1</div>
- <div class="paper-font-caption">Caption</div>
- <div class="paper-font-menu">Menu</div>
- <div class="paper-font-button">Button</div>
- </section>
-
- <h3>Paragraphs</h3>
-
- <h4>body2</h4>
- <section class="paper-font-body2 redlines">
- <p>
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
- tincidunt dui sit amet mi auctor, ac gravida magna aliquam. Fusce quis
- purus elementum, tempus nisi vel, volutpat nulla. Vestibulum mollis
- dictum tellus, vulputate porttitor arcu. Curabitur imperdiet risus id
- egestas accumsan. Donec lectus felis, dignissim id iaculis sit amet,
- faucibus in leo.
- </p>
- <p>
- Mauris id urna ac ante ultrices commodo a imperdiet elit. Vivamus
- interdum neque magna, eget dapibus est auctor et. Donec accumsan
- libero nec augue scelerisque, ac egestas ante tincidunt. Proin
- sollicitudin, mi eget sagittis mollis, arcu orci scelerisque turpis, a
- sollicitudin tellus quam non sapien.
- </p>
- </section>
-
- <h4>body1</h4>
- <section class="paper-font-body1 redlines">
- <p>
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
- tincidunt dui sit amet mi auctor, ac gravida magna aliquam. Fusce quis
- purus elementum, tempus nisi vel, volutpat nulla. Vestibulum mollis
- dictum tellus, vulputate porttitor arcu. Curabitur imperdiet risus id
- egestas accumsan. Donec lectus felis, dignissim id iaculis sit amet,
- faucibus in leo.
- </p>
- <p>
- Mauris id urna ac ante ultrices commodo a imperdiet elit. Vivamus
- interdum neque magna, eget dapibus est auctor et. Donec accumsan
- libero nec augue scelerisque, ac egestas ante tincidunt. Proin
- sollicitudin, mi eget sagittis mollis, arcu orci scelerisque turpis, a
- sollicitudin tellus quam non sapien.
- </p>
- </section>
- </section>
-
- <section id="shadow">
- <h2>shadow.html</h2>
- <div class="shadow shadow-2dp">2dp</div>
- <div class="shadow shadow-3dp">3dp</div>
- <div class="shadow shadow-4dp">4dp</div>
- <div class="shadow shadow-6dp">6dp</div>
- <div class="shadow shadow-8dp">8dp</div>
- <div class="shadow shadow-12dp">12dp</div>
- <div class="shadow shadow-16dp">16dp</div>
- </section>
-
- <section id="demo-page">
- <h2>demo-pages.html</h2>
-
- <h3>Horizontal sections</h3>
- <div class="horizontal-section-container">
- <div>
- <h4>Column 1</h4>
- <div class="horizontal-section">
- <div>Oxygen</div>
- <div>Carbon</div>
- <div>Hydrogen</div>
- <div>Nitrogen</div>
- <div>Calcium</div>
- </div>
- </div>
-
- <div>
- <h4>Column 2</h4>
- <div class="horizontal-section">
- <div>Oxygen</div>
- <div>Carbon</div>
- <div>Hydrogen</div>
- <div>Nitrogen</div>
- <div>Calcium</div>
- </div>
- </div>
-
- <div>
- <h4>Column 3</h4>
- <div class="horizontal-section">
- <div>Oxygen</div>
- <div>Carbon</div>
- <div>Hydrogen</div>
- <div>Nitrogen</div>
- <div>Calcium</div>
- </div>
- </div>
- </div>
-
- <h3>Vertical sections</h3>
- <div class="vertical-section-container">
- <div>
- <h4>Section 1</h4>
- <div class="vertical-section">
- <div>Oxygen</div>
- <div>Carbon</div>
- <div>Hydrogen</div>
- <div>Nitrogen</div>
- <div>Calcium</div>
- </div>
- </div>
- </div>
-
- <div class="vertical-section-container centered">
- <h4>Section 2 (centered)</h4>
- <div class="vertical-section">
- <div>Oxygen</div>
- <div>Carbon</div>
- <div>Hydrogen</div>
- <div>Nitrogen</div>
- <div>Calcium</div>
- </div>
- </div>
- </section>
-
- </body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/index.html
deleted file mode 100644
index 8e96ebe00c0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <title>paper-styles</title>
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles-classes.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles-classes.html
deleted file mode 100644
index ae315a57f82..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles-classes.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
-
-<link rel="import" href="classes/typography.html">
-<link rel="import" href="classes/shadow.html">
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles.html
deleted file mode 100644
index 9eca03a7735..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/paper-styles.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
-
-<!--
-The `<paper-styles>` component provides simple ways to use Material Design CSS styles
-in your application. The following imports are available:
-
-1. [color.html](https://github.com/PolymerElements/paper-styles/blob/master/color.html):
-a complete list of the colors defined in the Material Design [palette](https://www.google.com/design/spec/style/color.html)
-
-2. [default-theme.html](https://github.com/PolymerElements/paper-styles/blob/master/default-theme.html): text,
-background and accent colors that match the default Material Design theme
-
-3. [shadow.html](https://github.com/PolymerElements/paper-styles/blob/master/shadow.html): Material Design
-[elevation](https://www.google.com/design/spec/what-is-material/elevation-shadows.html) and shadow styles
-
-4. [typography.html](https://github.com/PolymerElements/paper-styles/blob/master/typography.html):
-Material Design [font](http://www.google.com/design/spec/style/typography.html#typography-styles) styles and sizes
-
-5. [demo-pages.html](https://github.com/PolymerElements/paper-styles/blob/master/demo-pages.html): generic styles
-used in the PolymerElements demo pages
-
-We recommend importing each of these individual files, and using the style mixins
-available in each ones, rather than the aggregated `paper-styles.html` as a whole.
-
-@group Paper Elements
-@pseudoElement paper-styles
-@demo demo/index.html
--->
-
-<link rel="import" href="color.html">
-<link rel="import" href="default-theme.html">
-<link rel="import" href="shadow.html">
-<link rel="import" href="typography.html">
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/shadow.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/shadow.html
deleted file mode 100644
index c511e696f24..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/shadow.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-
-<style is="custom-style">
-
- :root {
-
- --shadow-transition: {
- transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
- };
-
- --shadow-none: {
- box-shadow: none;
- };
-
- /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
-
- --shadow-elevation-2dp: {
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
- 0 1px 5px 0 rgba(0, 0, 0, 0.12),
- 0 3px 1px -2px rgba(0, 0, 0, 0.2);
- };
-
- --shadow-elevation-3dp: {
- box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
- 0 1px 8px 0 rgba(0, 0, 0, 0.12),
- 0 3px 3px -2px rgba(0, 0, 0, 0.4);
- };
-
- --shadow-elevation-4dp: {
- box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
- 0 1px 10px 0 rgba(0, 0, 0, 0.12),
- 0 2px 4px -1px rgba(0, 0, 0, 0.4);
- };
-
- --shadow-elevation-6dp: {
- box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
- 0 1px 18px 0 rgba(0, 0, 0, 0.12),
- 0 3px 5px -1px rgba(0, 0, 0, 0.4);
- };
-
- --shadow-elevation-8dp: {
- box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
- 0 3px 14px 2px rgba(0, 0, 0, 0.12),
- 0 5px 5px -3px rgba(0, 0, 0, 0.4);
- };
-
- --shadow-elevation-12dp: {
- box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
- 0 4px 22px 3px rgba(0, 0, 0, 0.12),
- 0 6px 7px -4px rgba(0, 0, 0, 0.4);
- };
-
- --shadow-elevation-16dp: {
- box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
- 0 6px 30px 5px rgba(0, 0, 0, 0.12),
- 0 8px 10px -5px rgba(0, 0, 0, 0.4);
- };
-
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/typography.html b/chromium/third_party/catapult/third_party/polymer/components/paper-styles/typography.html
deleted file mode 100644
index 055b5f99ce6..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-styles/typography.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../font-roboto/roboto.html">
-
-<style is="custom-style">
-
- :root {
-
- /* Shared Styles */
- --paper-font-common-base: {
- font-family: 'Roboto', 'Noto', sans-serif;
- -webkit-font-smoothing: antialiased;
- };
-
- --paper-font-common-code: {
- font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
- -webkit-font-smoothing: antialiased;
- };
-
- --paper-font-common-expensive-kerning: {
- text-rendering: optimizeLegibility;
- };
-
- --paper-font-common-nowrap: {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- };
-
- /* Material Font Styles */
-
- --paper-font-display4: {
- @apply(--paper-font-common-base);
- @apply(--paper-font-common-nowrap);
-
- font-size: 112px;
- font-weight: 300;
- letter-spacing: -.044em;
- line-height: 120px;
- };
-
- --paper-font-display3: {
- @apply(--paper-font-common-base);
- @apply(--paper-font-common-nowrap);
-
- font-size: 56px;
- font-weight: 400;
- letter-spacing: -.026em;
- line-height: 60px;
- };
-
- --paper-font-display2: {
- @apply(--paper-font-common-base);
-
- font-size: 45px;
- font-weight: 400;
- letter-spacing: -.018em;
- line-height: 48px;
- };
-
- --paper-font-display1: {
- @apply(--paper-font-common-base);
-
- font-size: 34px;
- font-weight: 400;
- letter-spacing: -.01em;
- line-height: 40px;
- };
-
- --paper-font-headline: {
- @apply(--paper-font-common-base);
-
- font-size: 24px;
- font-weight: 400;
- letter-spacing: -.012em;
- line-height: 32px;
- };
-
- --paper-font-title: {
- @apply(--paper-font-common-base);
- @apply(--paper-font-common-nowrap);
-
- font-size: 20px;
- font-weight: 500;
- line-height: 28px;
- };
-
- --paper-font-subhead: {
- @apply(--paper-font-common-base);
-
- font-size: 16px;
- font-weight: 400;
- line-height: 24px;
- };
-
- --paper-font-body2: {
- @apply(--paper-font-common-base);
-
- font-size: 14px;
- font-weight: 500;
- line-height: 24px;
- };
-
- --paper-font-body1: {
- @apply(--paper-font-common-base);
-
- font-size: 14px;
- font-weight: 400;
- line-height: 20px;
- };
-
- --paper-font-caption: {
- @apply(--paper-font-common-base);
- @apply(--paper-font-common-nowrap);
-
- font-size: 12px;
- font-weight: 400;
- letter-spacing: 0.011em;
- line-height: 20px;
- };
-
- --paper-font-menu: {
- @apply(--paper-font-common-base);
- @apply(--paper-font-common-nowrap);
-
- font-size: 13px;
- font-weight: 500;
- line-height: 24px;
- };
-
- --paper-font-button: {
- @apply(--paper-font-common-base);
- @apply(--paper-font-common-nowrap);
-
- font-size: 14px;
- font-weight: 500;
- letter-spacing: 0.018em;
- line-height: 24px;
- text-transform: uppercase;
- };
-
- --paper-font-code2: {
- @apply(--paper-font-common-code);
-
- font-size: 14px;
- font-weight: 700;
- line-height: 20px;
- };
-
- --paper-font-code1: {
- @apply(--paper-font-common-code);
-
- font-size: 14px;
- font-weight: 500;
- line-height: 20px;
- };
-
- }
-
-</style>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/.bower.json
deleted file mode 100644
index b635aa1d2b2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/.bower.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "paper-toast",
- "version": "1.3.0",
- "description": "A material design notification toast",
- "private": true,
- "license": "http://polymer.github.io/LICENSE.txt",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "toast",
- "notification"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-toast.git"
- },
- "main": "paper-toast.html",
- "dependencies": {
- "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0",
- "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.9",
- "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.1.0",
- "polymer": "Polymer/polymer#^1.5.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": [],
- "homepage": "https://github.com/PolymerElements/paper-toast",
- "_release": "1.3.0",
- "_resolution": {
- "type": "version",
- "tag": "v1.3.0",
- "commit": "f20ce41a3b4a81a9d277d1ed33f1621cf3e42ec0"
- },
- "_source": "git://github.com/PolymerElements/paper-toast.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-toast"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/CONTRIBUTING.md
deleted file mode 100644
index 093090d4354..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/README.md
deleted file mode 100644
index 1a639d19744..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-toast.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-toast.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-toast)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-toast)_
-
-
-##&lt;paper-toast&gt;
-
-Material design: [Snackbards & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html)
-
-`paper-toast` provides a subtle notification toast. Only one `paper-toast` will
-be visible on screen.
-
-Use `opened` to show the toast:
-
-Example:
-
-```html
-<paper-toast text="Hello world!" opened></paper-toast>
-```
-
-Also `open()` or `show()` can be used to show the toast:
-
-Example:
-
-```html
-<paper-button on-click="openToast">Open Toast</paper-button>
-<paper-toast id="toast" text="Hello world!"></paper-toast>
-
-...
-
-openToast: function() {
- this.$.toast.open();
-}
-```
-
-Set `duration` to 0, a negative number or Infinity to persist the toast on screen:
-
-Example:
-
-```html
-<paper-toast text="Terms and conditions" opened duration="0">
- <a href="#">Show more</a>
-</paper-toast>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-toast-background-color` | The paper-toast background-color | `#323232` |
-| `--paper-toast-color` | The paper-toast color | `#f1f1f1` |
-
-This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`.
-In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`.
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/bower.json
deleted file mode 100644
index ee2edaac574..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/bower.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "paper-toast",
- "version": "1.3.0",
- "description": "A material design notification toast",
- "private": true,
- "license": "http://polymer.github.io/LICENSE.txt",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "toast",
- "notification"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-toast.git"
- },
- "main": "paper-toast.html",
- "dependencies": {
- "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0",
- "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.9",
- "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.1.0",
- "polymer": "Polymer/polymer#^1.5.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "paper-button": "PolymerElements/paper-button#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo.html b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo.html
deleted file mode 100644
index c2098931248..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
- @license
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<!doctype html>
-<html>
-<head>
- <title>paper-toast</title>
-
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <script src="../webcomponentsjs/webcomponents.js"></script>
-
- <link rel="import" href="paper-toast.html">
- <link rel="import" href="../font-roboto/roboto.html" >
- <link rel="import" href="../paper-button/paper-button.html" >
-
- <style>
-
- html, body {
- height: 100%;
- }
-
- body {
- overflow: hidden;
- margin: 0;
- font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
- -webkit-tap-highlight-color: rgba(0,0,0,0);
- -webkit-touch-callout: none;
- }
-
- paper-button {
- margin: 20px;
- }
-
- </style>
-
-</head>
-<body unresolved>
-
- <paper-button raised onclick="document.querySelector('#toast1').show()">Discard Draft</paper-button>
-
- <paper-button raised onclick="document.querySelector('#toast2').show()">Get Messages</paper-button>
-
- <paper-button raised onclick="document.querySelector('#toast3').show()">Send Message</paper-button>
-
- <paper-toast id="toast1" text="Your draft has been discarded."></paper-toast>
-
- <paper-toast id="toast2" role="alert" text="Connection timed out. Showing limited messages.">
- <div style="color: #eeff41;" onclick="console.log('RETRY')">Retry</div>
- </paper-toast>
-
- <paper-toast id="toast3" class="capsule" text="Message sent" style="padding-right: 60px;"></paper-toast>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo/index.html
deleted file mode 100644
index 126388349b5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/demo/index.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-
-<head>
- <title>paper-toast</title>
-
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-capable" content="yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
-
- <link rel="import" href="../paper-toast.html">
- <link rel="import" href="../../paper-button/paper-button.html">
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
-
- <style is="custom-style" include="demo-pages-shared-styles"></style>
-
-</head>
-
-<body unresolved class="centered">
- <h3>Toast auto-closes after 3 seconds. Only one toast per time will be visible</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-button raised onclick="toast0.open()">Default toast</paper-button>
- <paper-toast id="toast0" text="This toast auto-closes after 3 seconds"></paper-toast>
- </template>
- </demo-snippet>
-
- <h3>Toast does not auto-close when <code>duration</code> is negative, <code>0</code>, or <code>Infinity</code></h3>
- <demo-snippet class="centered-demo">
- <template>
- <style>
- .yellow-button {
- text-transform: none;
- color: #eeff41;
- }
- </style>
-
- <paper-button raised onclick="toast1.open()">Persistent toast</paper-button>
-
- <paper-toast id="toast1" duration="0" text="This toast will stay opened until you close it, or open another toast.">
- <paper-button onclick="toast1.toggle()" class="yellow-button">Close now!</paper-button>
- </paper-toast>
- </template>
- </demo-snippet>
-
- <h3>Toast can be styled</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- #toast2 {
- --paper-toast-background-color: red;
- --paper-toast-color: white;
- }
- </style>
-
- <paper-button raised onclick="toast2.open()">Styled toast</paper-button>
-
- <paper-toast id="toast2" class="fit-bottom" text="This toast is red and fits bottom!"></paper-toast>
- </template>
- </demo-snippet>
-
- <h3>Toast can fit into any element</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style>
- #container {
- padding: 100px;
- border: 1px solid gray;
- }
- </style>
- <div id="container">
- <paper-button raised onclick="toast3.open()">Open toast</paper-button>
- </div>
- <paper-toast id="toast3" class="fit-bottom" text="This toast fits into the container."></paper-toast>
-
- <script>
- toast3.fitInto = container;
- </script>
-
- </template>
- </demo-snippet>
-</body>
-
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/hero.svg b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/hero.svg
deleted file mode 100755
index bfdc1808bdd..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/hero.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
-<g id="background" display="none">
- <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
-</g>
-<g id="label">
-</g>
-<g id="art">
- <path d="M164,114H13V88h151V114z M15,112h147V90H15V112z"/>
- <rect x="26" y="100" width="79" height="2"/>
- <rect x="135" y="100" width="16" height="2"/>
- <g id="ic_x5F_add_x0D_">
- </g>
-</g>
-<g id="Guides">
-</g>
-</svg>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/index.html
deleted file mode 100644
index 487bb5c38a5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/metadata.html b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/metadata.html
deleted file mode 100644
index 6c9c211e286..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/metadata.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
- @license
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- Code distributed by Google as part of the polymer project is also
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<x-meta id="paper-toast" label="Toast" group="Paper" isContainer>
-
- <template>
- <paper-toast text="Toast!"></paper-toast>
- </template>
-
- <template id="imports">
- <link rel="import" href="paper-toast.html">
- </template>
-
-</x-meta>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.css b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.css
deleted file mode 100644
index a677104648a..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.css
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-*/
-
-:host {
- display: inline-block;
- background: #323232;
- color: #f1f1f1;
- min-height: 48px;
- min-width: 288px;
- padding: 16px 24px 12px;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
- border-radius: 2px;
- bottom: 12px;
- left: 12px;
- font-size: 14px;
- cursor: default;
-}
-
-:host(.capsule) {
- border-radius: 24px;
-}
-
-:host(.fit-bottom) {
- bottom: 0;
- left: 0;
- width: 100%;
- min-width: 0;
- border-radius: 0;
-}
-
-:host(.core-transition.dragging) {
- transition: none;
-}
-
-:host(.core-transition.fade-out-down),
-:host(.core-transition.fade-out-up),
-:host(.core-transition.fade-out-right),
-:host(.core-transition.fade-out-left) {
- opacity: 0;
- transition: -webkit-transform 0.08s ease-in-out, opacity 0.08s ease-in-out;
- transition: transform 0.08s ease-in-out, opacity 0.08s ease-in-out;
-}
-
-:host(.core-transition.fade-out-down) {
- -webkit-transform: translate(0, 100%);
- transform: translate(0, 100%);
-}
-
-:host(.core-transition.fade-out-up) {
- -webkit-transform: translate(0, -100%);
- transform: translate(0, -100%);
-}
-
-:host(.core-transition.fade-out-right) {
- -webkit-transform: translate(100%, 0);
- transform: translate(100%, 0);
-}
-
-:host(.core-transition.fade-out-left) {
- -webkit-transform: translate(-100%, 0);
- transform: translate(-100%, 0);
-}
-
-.toast-container {
- overflow: hidden;
-}
-
-.toast-action {
- padding-left: 24px;
- cursor: pointer;
- text-transform: uppercase;
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.html b/chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.html
deleted file mode 100644
index 46260dab497..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-toast/paper-toast.html
+++ /dev/null
@@ -1,323 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-announcer/iron-a11y-announcer.html">
-<link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html">
-
-<!--
-Material design: [Snackbards & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html)
-
-`paper-toast` provides a subtle notification toast. Only one `paper-toast` will
-be visible on screen.
-
-Use `opened` to show the toast:
-
-Example:
-
- <paper-toast text="Hello world!" opened></paper-toast>
-
-Also `open()` or `show()` can be used to show the toast:
-
-Example:
-
- <paper-button on-click="openToast">Open Toast</paper-button>
- <paper-toast id="toast" text="Hello world!"></paper-toast>
-
- ...
-
- openToast: function() {
- this.$.toast.open();
- }
-
-Set `duration` to 0, a negative number or Infinity to persist the toast on screen:
-
-Example:
-
- <paper-toast text="Terms and conditions" opened duration="0">
- <a href="#">Show more</a>
- </paper-toast>
-
-
-### Styling
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-toast-background-color` | The paper-toast background-color | `#323232`
-`--paper-toast-color` | The paper-toast color | `#f1f1f1`
-
-This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`.
-In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`.
-
-@group Paper Elements
-@element paper-toast
-@demo demo/index.html
-@hero hero.svg
--->
-
-<dom-module id="paper-toast">
- <template>
- <style>
- :host {
- display: block;
- position: fixed;
- background-color: var(--paper-toast-background-color, #323232);
- color: var(--paper-toast-color, #f1f1f1);
- min-height: 48px;
- min-width: 288px;
- padding: 16px 24px;
- box-sizing: border-box;
- box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
- border-radius: 2px;
- margin: 12px;
- font-size: 14px;
- cursor: default;
- -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
- transition: transform 0.3s, opacity 0.3s;
- opacity: 0;
- -webkit-transform: translateY(100px);
- transform: translateY(100px);
- @apply(--paper-font-common-base);
- }
-
- :host(.capsule) {
- border-radius: 24px;
- }
-
- :host(.fit-bottom) {
- width: 100%;
- min-width: 0;
- border-radius: 0;
- margin: 0;
- }
-
- :host(.paper-toast-open) {
- opacity: 1;
- -webkit-transform: translateY(0px);
- transform: translateY(0px);
- }
- </style>
-
- <span id="label">{{text}}</span>
- <content></content>
- </template>
-
- <script>
- (function() {
- // Keeps track of the toast currently opened.
- var currentToast = null;
-
- Polymer({
- is: 'paper-toast',
-
- behaviors: [
- Polymer.IronOverlayBehavior
- ],
-
- properties: {
- /**
- * The element to fit `this` into.
- * Overridden from `Polymer.IronFitBehavior`.
- */
- fitInto: {
- type: Object,
- value: window,
- observer: '_onFitIntoChanged'
- },
-
- /**
- * The orientation against which to align the dropdown content
- * horizontally relative to `positionTarget`.
- * Overridden from `Polymer.IronFitBehavior`.
- */
- horizontalAlign: {
- type: String,
- value: 'left'
- },
-
- /**
- * The orientation against which to align the dropdown content
- * vertically relative to `positionTarget`.
- * Overridden from `Polymer.IronFitBehavior`.
- */
- verticalAlign: {
- type: String,
- value: 'bottom'
- },
-
- /**
- * The duration in milliseconds to show the toast.
- * Set to `0`, a negative number, or `Infinity`, to disable the
- * toast auto-closing.
- */
- duration: {
- type: Number,
- value: 3000
- },
-
- /**
- * The text to display in the toast.
- */
- text: {
- type: String,
- value: ''
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- * Set to false to enable closing of the toast by clicking outside it.
- */
- noCancelOnOutsideClick: {
- type: Boolean,
- value: true
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- * Set to true to disable auto-focusing the toast or child nodes with
- * the `autofocus` attribute` when the overlay is opened.
- */
- noAutoFocus: {
- type: Boolean,
- value: true
- }
- },
-
- listeners: {
- 'transitionend': '__onTransitionEnd'
- },
-
- /**
- * Read-only. Deprecated. Use `opened` from `IronOverlayBehavior`.
- * @property visible
- * @deprecated
- */
- get visible() {
- Polymer.Base._warn('`visible` is deprecated, use `opened` instead');
- return this.opened;
- },
-
- /**
- * Read-only. Can auto-close if duration is a positive finite number.
- * @property _canAutoClose
- */
- get _canAutoClose() {
- return this.duration > 0 && this.duration !== Infinity;
- },
-
- created: function() {
- this._autoClose = null;
- Polymer.IronA11yAnnouncer.requestAvailability();
- },
-
- /**
- * Show the toast. Without arguments, this is the same as `open()` from `IronOverlayBehavior`.
- * @param {(Object|string)=} properties Properties to be set before opening the toast.
- * e.g. `toast.show('hello')` or `toast.show({text: 'hello', duration: 3000})`
- */
- show: function(properties) {
- if (typeof properties == 'string') {
- properties = { text: properties };
- }
- for (var property in properties) {
- if (property.indexOf('_') === 0) {
- Polymer.Base._warn('The property "' + property + '" is private and was not set.');
- } else if (property in this) {
- this[property] = properties[property];
- } else {
- Polymer.Base._warn('The property "' + property + '" is not valid.');
- }
- }
- this.open();
- },
-
- /**
- * Hide the toast. Same as `close()` from `IronOverlayBehavior`.
- */
- hide: function() {
- this.close();
- },
-
- /**
- * Called on transitions of the toast, indicating a finished animation
- * @private
- */
- __onTransitionEnd: function(e) {
- // there are different transitions that are happening when opening and
- // closing the toast. The last one so far is for `opacity`.
- // This marks the end of the transition, so we check for this to determine if this
- // is the correct event.
- if (e && e.target === this && e.propertyName === 'opacity') {
- if (this.opened) {
- this._finishRenderOpened();
- } else {
- this._finishRenderClosed();
- }
- }
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- * Called when the value of `opened` changes.
- */
- _openedChanged: function() {
- if (this._autoClose !== null) {
- this.cancelAsync(this._autoClose);
- this._autoClose = null;
- }
- if (this.opened) {
- if (currentToast && currentToast !== this) {
- currentToast.close();
- }
- currentToast = this;
- this.fire('iron-announce', {
- text: this.text
- });
- if (this._canAutoClose) {
- this._autoClose = this.async(this.close, this.duration);
- }
- } else if (currentToast === this) {
- currentToast = null;
- }
- Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this, arguments);
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- */
- _renderOpened: function() {
- this.classList.add('paper-toast-open');
- },
-
- /**
- * Overridden from `IronOverlayBehavior`.
- */
- _renderClosed: function() {
- this.classList.remove('paper-toast-open');
- },
-
- /**
- * @private
- */
- _onFitIntoChanged: function(fitInto) {
- this.positionTarget = fitInto;
- }
-
- /**
- * Fired when `paper-toast` is opened.
- *
- * @event 'iron-announce'
- * @param {{text: string}} detail Contains text that will be announced.
- */
- });
- })();
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.bower.json
deleted file mode 100644
index 3df87bd84c7..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.bower.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "paper-tooltip",
- "version": "1.1.2",
- "description": "Material design tooltip popup for content",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "tooltip"
- ],
- "main": "paper-tooltip.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-tooltip.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-tooltip",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "neon-animation": "PolymerElements/neon-animation#^1.0.0"
- },
- "devDependencies": {
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"
- },
- "_release": "1.1.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.1.2",
- "commit": "6be894127678900f6e506b56fc9622ab768c03aa"
- },
- "_source": "git://github.com/PolymerElements/paper-tooltip.git",
- "_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-tooltip"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.travis.yml b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.travis.yml
deleted file mode 100644
index 0eacffa20f9..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: node_js
-sudo: false
-before_script:
- - npm install -g bower polylint web-component-tester
- - bower install
- - polylint
-env:
- global:
- - secure: NudIyPu1Tu0dPOHLbeKEc9GZk3tQt5s285nWES8LJWhhuiRMn7xYqLlU/PDXc89ClURC8YkPt1fQct+inxVNmT/YvFyRh+ZVDRmVYZHZFDl4M3mNfTVCG985pTB7IyYTBQBojoXab01DHbKzR79wRNIb6KypoJxaO1DIvXIOfgFCbam+xyibkayCUuu7S+GVkMuka26SEfllOQ9aHF2tCFuAHKcdLuwmjn/j5ffS/cP73JIulkf2IA1NOolvRd8kXWT8OQ4Hdw1r6DRipDSzlcsCmqur0LdFYfNAm5sZ+xHeuwdocGvKyZSReWMJcUwBuA3F+gXngKqZiTfGFAf0Ygd0rfaJ4WztjW1LkFR/3S8hhUtN2WC5wZYYaY7aQlepA3uecGxbbaVsBp7z1bBtMvllRUf7zs2YAw5mBgA5bD9dYgNb2N0u+IWWvlxBjvwIDfWIVJUJ7QMYM+6rWy4VCR7lfeeQBIXTyzLScLmjskMkbeY3WlvcEaHkAyZd7Y4rRL0eytOqE4jaG8kwpDQgjpKCbdwhl2HHzzktutfjD+JCn2nX8XF1ONw/LimDC/pUlv8zpyf4IByx3B1ObWZ86qO/t52FjLcuv8EtoAT0SFQWxoKZMGI8kNTjCje/jhGWTtT4FMkcksfnJYU68XXfduglLQADbTUQKO58CgICs9Y=
- - secure: Bkrv2j17+bp9z+nQvDAQSFTMtk5SgXWHP71vnPsrO6BISUUzq5/3XOgiG8VN17JliNGkkD9d6oZ5izSvmi2ywVtg75+AkEa+4BLrCUQec6XT6I2xE8Sq0R28cAHBScxdm3M53BYekAPgMHJqJCrIVKUKkCbxIbsMJbCCTlXI8YmUP9bM1LNOsDYI1SOsW9YwcTarK4I3WD+G2sHOqQr9Sj4OrtAENUOTdDZlrEfYXi6z4unJKho7cwh4gJDJwEbvdhFLPfih6osqo70lv/Jx0QBwpFEsyOxIbWV7pVFOYzsHPxNgve4YyrfctlXeXYfef2tCD1AAgON+6xL4a9AK05cG9RwC0UN2apoIn5BFrz/XghBJ0arb9lwEePrb7lHLMB33vHn1+oZE3y+EewwQbAXoA3OAKrR0L00vP6TZVqpBeIDS27BMj9fp/l+GOwDwEK7jYGCxO7XUJlClZGMxLTRGNpxP057i2dYcWK5cTZ4e6UQS6hr6NqyvWctSs+BUZoDOHwFuFtCTF3G4ffOZ7VuPurViIRuOLEMLuc3titYd7FOqI+Q5XOGpE7dd1qzLJSh8FK8XUBV4/oyIYwFd/98sh0PwzrYorlxKlOygfXhV7D1FRZqJdPTvv9Qh1OjLIn182PYoctUZKzepfsqO3OdesxBxBYm35Bg9ph573Do=
- - CXX=g++-4.8
-node_js: stable
-addons:
- firefox: latest
- apt:
- sources:
- - google-chrome
- - ubuntu-toolchain-r-test
- packages:
- - google-chrome-stable
- - g++-4.8
- sauce_connect: true
-script:
- - xvfb-run wct
- - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/CONTRIBUTING.md b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/CONTRIBUTING.md
deleted file mode 100644
index f147978a3e1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<!--
-This file is autogenerated based on
-https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
-
-If you edit that file, it will get updated everywhere else.
-If you edit this file, your changes will get overridden :)
-
-You can however override the jsbin link with one that's customized to this
-specific element:
-
-jsbin=https://jsbin.com/cagaye/edit?html,output
--->
-# Polymer Elements
-## Guide for Contributors
-
-Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
-
-### Filing Issues
-
-**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
-
- 1. **Who will use the feature?** _“As someone filling out a form…”_
- 2. **When will they use the feature?** _“When I enter an invalid value…”_
- 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
-
-**If you are filing an issue to report a bug**, please provide:
-
- 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
-
- ```markdown
- The `paper-foo` element causes the page to turn pink when clicked.
-
- ## Expected outcome
-
- The page stays the same color.
-
- ## Actual outcome
-
- The page turns pink.
-
- ## Steps to reproduce
-
- 1. Put a `paper-foo` element in the page.
- 2. Open the page in a web browser.
- 3. Click the `paper-foo` element.
- ```
-
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
-
- 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
-
-### Submitting Pull Requests
-
-**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
-
-When submitting pull requests, please provide:
-
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
-
- ```markdown
- (For a single issue)
- Fixes #20
-
- (For multiple issues)
- Fixes #32, fixes #40
- ```
-
- 2. **A succinct description of the design** used to fix any related issues. For example:
-
- ```markdown
- This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
- ```
-
- 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
-
-If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/README.md b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/README.md
deleted file mode 100644
index b20a34b52a0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-
-<!---
-
-This README is automatically generated from the comments in these files:
-paper-tooltip.html
-
-Edit those files, and our readme bot will duplicate them over here!
-Edit this file, and the bot will squash your changes :)
-
-The bot does some handling of markdown. Please file a bug if it does the wrong
-thing! https://github.com/PolymerLabs/tedium/issues
-
--->
-
-[![Build status](https://travis-ci.org/PolymerElements/paper-tooltip.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-tooltip)
-
-_[Demo and API docs](https://elements.polymer-project.org/elements/paper-tooltip)_
-
-
-##&lt;paper-tooltip&gt;
-
-Material design: [Tooltips](https://www.google.com/design/spec/components/tooltips.html)
-
-`<paper-tooltip>` is a label that appears on hover and focus when the user
-hovers over an element with the cursor or with the keyboard. It will be centered
-to an anchor element specified in the `for` attribute, or, if that doesn't exist,
-centered to the parent node containing it.
-
-Example:
-
-```html
-<div style="display:inline-block">
- <button>Click me!</button>
- <paper-tooltip>Tooltip text</paper-tooltip>
-</div>
-
-<div>
- <button id="btn">Click me!</button>
- <paper-tooltip for="btn">Tooltip text</paper-tooltip>
-</div>
-```
-
-The tooltip can be positioned on the top|bottom|left|right of the anchor using
-the `position` attribute. The default position is bottom.
-
-```html
-<paper-tooltip for="btn" position="left">Tooltip text</paper-tooltip>
-<paper-tooltip for="btn" position="top">Tooltip text</paper-tooltip>
-```
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-| Custom property | Description | Default |
-| --- | --- | --- |
-| `--paper-tooltip-background` | The background color of the tooltip | `#616161` |
-| `--paper-tooltip-opacity` | The opacity of the tooltip | `0.9` |
-| `--paper-tooltip-text-color` | The text color of the tooltip | `white` |
-| `--paper-tooltip` | Mixin applied to the tooltip | `{}` |
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/bower.json b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/bower.json
deleted file mode 100644
index 423c88f3530..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/bower.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "paper-tooltip",
- "version": "1.1.2",
- "description": "Material design tooltip popup for content",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "tooltip"
- ],
- "main": "paper-tooltip.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-tooltip.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-tooltip",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.1.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.0",
- "neon-animation": "PolymerElements/neon-animation#^1.0.0"
- },
- "devDependencies": {
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/index.html
deleted file mode 100644
index 7d7cab86553..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/index.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html lang="en">
-<head>
- <title>paper-tooltip demo</title>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
- <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
- <link rel="import" href="../../iron-icons/iron-icons.html">
- <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
- <link rel="import" href="../../paper-styles/color.html">
- <link rel="import" href="../paper-tooltip.html">
- <link rel="import" href="test-button.html">
-
- <style is="custom-style" include="demo-pages-shared-styles">
- paper-icon-button, input, .avatar {
- margin: 0 10px;
- }
-
- .avatar {
- box-sizing: border-box;
- width: 40px;
- height: 40px;
- padding: 8px;
- border-radius: 50%;
- cursor: pointer;
- }
-
- .blue {
- background-color: var(--paper-light-blue-300);
- }
- .orange {
- background-color: var(--paper-amber-500);
- }
- .green {
- background-color: var(--paper-green-500);
- }
- .red {
- background-color: var(--paper-pink-500);
- }
- </style>
-</head>
-<body unresolved>
- <div class="vertical-section-container centered">
- <h3>Tooltips can be anchored to elements using their ID</h3>
- <demo-snippet class="centered-demo">
- <template>
- <paper-icon-button id="id_1" icon="favorite" alt="heart"></paper-icon-button>
- <paper-icon-button id="id_2" icon="alarm-on" alt="go back"></paper-icon-button>
- <div id="id_3" class="avatar blue" tabindex="0"></div>
- <div id="id_4" class="avatar orange" tabindex="0"></div>
-
- <!-- paper-icon-buttons have an inherent padding that will push the tooltip down. offset undoes it -->
- <paper-tooltip for="id_1" offset="0">&lt;3 &lt;3 &lt;3 </paper-tooltip>
- <paper-tooltip for="id_2" offset="0">wake up!</paper-tooltip>
- <paper-tooltip for="id_3" offset="0">halp I am trapped in a tooltip</paper-tooltip>
- <paper-tooltip for="id_4" offset="0">meow!</paper-tooltip>
- </template>
- </demo-snippet>
-
- <h3>Tooltips can be anchored to elements relative to their parent</h3>
- <demo-snippet class="centered-demo">
- <template>
- <!-- Adding a tabindex so that we can show the tooltip when the whole box is tabbed to -->
- <div tabindex="0">
- <input type="checkbox">allosaurus
- <paper-tooltip>the name means "different lizard"</paper-tooltip>
- </div>
- <div tabindex="0">
- <input type="checkbox">brontosaurus
- <paper-tooltip>the name means "thunder lizard"</paper-tooltip>
- </div>
- <div tabindex="0">
- <input type="checkbox">megalosaurus
- <paper-tooltip>the name means "roof lizard"</paper-tooltip>
- </div>
- </div>
- </template>
- </demo-snippet>
-
- <h3>Tooltips can open in different directions</h3>
- <demo-snippet class="centered-demo">
- <template>
- <div id="dir_1" class="avatar red" tabindex="0"></div>
- <div id="dir_2" class="avatar blue" tabindex="0"></div>
- <div id="dir_3" class="avatar green" tabindex="0"></div>
- <div id="dir_4" class="avatar orange" tabindex="0"></div>
-
- <paper-tooltip for="dir_1" position="left" animation-delay="0">👈</paper-tooltip>
- <paper-tooltip for="dir_2" position="right" animation-delay="0">👉</paper-tooltip>
- <paper-tooltip for="dir_3" position="top" animation-delay="0">👍</paper-tooltip>
- <paper-tooltip for="dir_4" position="bottom" animation-delay="0">👎</paper-tooltip>
- </template>
- </demo-snippet>
-
- <h3>Tooltips can contain rich text (though against the Material Design spec)</h3>
- <demo-snippet class="centered-demo">
- <template>
- <style is="custom-style">
- paper-tooltip.custom img {
- width: 40px;
- padding-right: 10px;
- padding-bottom: 10px;
- float: left;
- }
- .custom {
- --paper-tooltip-background: black;
- --paper-tooltip-text-color: var(--paper-pink-100);
- width: 160px;
- }
- </style>
- <paper-icon-button id="demo4_icon1" icon="favorite" alt="heart"></paper-icon-button>
- <paper-tooltip for="demo4_icon1" class="custom" animation-delay="0">
- <img src="http://i.imgur.com/OuUe8Da.jpg">
- Rich-text tooltips are doable but against the Material Design spec.
- </paper-tooltip>
- </template>
- </demo-snippet>
- </div>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/test-button.html b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/test-button.html
deleted file mode 100644
index 0942f58cb76..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/demo/test-button.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="../../polymer/polymer.html">
-<link rel="import" href="../../paper-icon-button/paper-icon-button.html">
-<link rel="import" href="../../iron-icons/iron-icons.html">
-<link rel="import" href="../paper-tooltip.html">
-
-<dom-module id="test-button">
- <template>
- <style>
- :host {
- display: inline-block;
- }
-
- paper-icon-button {
- padding: 0;
- }
- </style>
-
- <paper-icon-button id="m" icon="menu" alt="menu"></paper-icon-button>
- <paper-tooltip for="m" offset="8">hot dogs</paper-tooltip>
- </template>
-
- <script>
- Polymer({
- is: 'test-button'
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/index.html b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/index.html
deleted file mode 100644
index 848f0426571..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>paper-tooltip</title>
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
-
-<iron-component-page></iron-component-page>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/paper-tooltip.html b/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/paper-tooltip.html
deleted file mode 100644
index d3d5982e530..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/paper-tooltip/paper-tooltip.html
+++ /dev/null
@@ -1,372 +0,0 @@
-<!--
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-
-<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../neon-animation/neon-animation-runner-behavior.html">
-<link rel="import" href="../neon-animation/animations/fade-in-animation.html">
-<link rel="import" href="../neon-animation/animations/fade-out-animation.html">
-
-<!--
-Material design: [Tooltips](https://www.google.com/design/spec/components/tooltips.html)
-
-`<paper-tooltip>` is a label that appears on hover and focus when the user
-hovers over an element with the cursor or with the keyboard. It will be centered
-to an anchor element specified in the `for` attribute, or, if that doesn't exist,
-centered to the parent node containing it.
-
-Example:
-
- <div style="display:inline-block">
- <button>Click me!</button>
- <paper-tooltip>Tooltip text</paper-tooltip>
- </div>
-
- <div>
- <button id="btn">Click me!</button>
- <paper-tooltip for="btn">Tooltip text</paper-tooltip>
- </div>
-
-The tooltip can be positioned on the top|bottom|left|right of the anchor using
-the `position` attribute. The default position is bottom.
-
- <paper-tooltip for="btn" position="left">Tooltip text</paper-tooltip>
- <paper-tooltip for="btn" position="top">Tooltip text</paper-tooltip>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-tooltip-background` | The background color of the tooltip | `#616161`
-`--paper-tooltip-opacity` | The opacity of the tooltip | `0.9`
-`--paper-tooltip-text-color` | The text color of the tooltip | `white`
-`--paper-tooltip` | Mixin applied to the tooltip | `{}`
-
-@group Paper Elements
-@element paper-tooltip
-@demo demo/index.html
--->
-
-<dom-module id="paper-tooltip">
- <template>
- <style>
- :host {
- display: block;
- position: absolute;
- outline: none;
- z-index: 1002;
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- cursor: default;
- }
-
- #tooltip {
- display: block;
- outline: none;
- @apply(--paper-font-common-base);
- font-size: 10px;
- line-height: 1;
-
- background-color: var(--paper-tooltip-background, #616161);
- opacity: var(--paper-tooltip-opacity, 0.9);
- color: var(--paper-tooltip-text-color, white);
-
- padding: 8px;
- border-radius: 2px;
-
- @apply(--paper-tooltip);
- }
-
- /* Thanks IE 10. */
- .hidden {
- display: none !important;
- }
- </style>
-
- <div id="tooltip" class="hidden">
- <content></content>
- </div>
- </template>
-
- <script>
- Polymer({
- is: 'paper-tooltip',
-
- hostAttributes: {
- role: 'tooltip',
- tabindex: -1
- },
-
- behaviors: [
- Polymer.NeonAnimationRunnerBehavior
- ],
-
- properties: {
- /**
- * The id of the element that the tooltip is anchored to. This element
- * must be a sibling of the tooltip.
- */
- for: {
- type: String,
- observer: '_forChanged'
- },
-
- /**
- * Set this to true if you want to manually control when the tooltip
- * is shown or hidden.
- */
- manualMode: {
- type: Boolean,
- value: false
- },
-
- /**
- * Positions the tooltip to the top, right, bottom, left of its content.
- */
- position: {
- type: String,
- value: 'bottom'
- },
-
- /**
- * If true, no parts of the tooltip will ever be shown offscreen.
- */
- fitToVisibleBounds: {
- type: Boolean,
- value: false
- },
-
- /**
- * The spacing between the top of the tooltip and the element it is
- * anchored to.
- */
- offset: {
- type: Number,
- value: 14
- },
-
- /**
- * This property is deprecated, but left over so that it doesn't
- * break exiting code. Please use `offset` instead. If both `offset` and
- * `marginTop` are provided, `marginTop` will be ignored.
- * @deprecated since version 1.0.3
- */
- marginTop: {
- type: Number,
- value: 14
- },
-
- /**
- * The delay that will be applied before the `entry` animation is
- * played when showing the tooltip.
- */
- animationDelay: {
- type: Number,
- value: 500
- },
-
- /**
- * The entry and exit animations that will be played when showing and
- * hiding the tooltip. If you want to override this, you must ensure
- * that your animationConfig has the exact format below.
- */
- animationConfig: {
- type: Object,
- value: function() {
- return {
- 'entry': [{
- name: 'fade-in-animation',
- node: this,
- timing: {delay: 0}
- }],
- 'exit': [{
- name: 'fade-out-animation',
- node: this
- }]
- }
- }
- },
-
- _showing: {
- type: Boolean,
- value: false
- }
- },
-
- listeners: {
- 'neon-animation-finish': '_onAnimationFinish',
- 'mouseenter': 'hide'
- },
-
- /**
- * Returns the target element that this tooltip is anchored to. It is
- * either the element given by the `for` attribute, or the immediate parent
- * of the tooltip.
- */
- get target () {
- var parentNode = Polymer.dom(this).parentNode;
- // If the parentNode is a document fragment, then we need to use the host.
- var ownerRoot = Polymer.dom(this).getOwnerRoot();
-
- var target;
- if (this.for) {
- target = Polymer.dom(ownerRoot).querySelector('#' + this.for);
- } else {
- target = parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE ?
- ownerRoot.host : parentNode;
- }
-
- return target;
- },
-
- attached: function() {
- this._target = this.target;
-
- if (this.manualMode)
- return;
-
- this.listen(this._target, 'mouseenter', 'show');
- this.listen(this._target, 'focus', 'show');
- this.listen(this._target, 'mouseleave', 'hide');
- this.listen(this._target, 'blur', 'hide');
- this.listen(this._target, 'tap', 'hide');
- },
-
- detached: function() {
- if (this._target && !this.manualMode) {
- this.unlisten(this._target, 'mouseenter', 'show');
- this.unlisten(this._target, 'focus', 'show');
- this.unlisten(this._target, 'mouseleave', 'hide');
- this.unlisten(this._target, 'blur', 'hide');
- this.unlisten(this._target, 'tap', 'hide');
- }
- },
-
- show: function() {
- // If the tooltip is already showing, there's nothing to do.
- if (this._showing)
- return;
-
- if (Polymer.dom(this).textContent.trim() === '')
- return;
-
-
- this.cancelAnimation();
- this._showing = true;
- this.toggleClass('hidden', false, this.$.tooltip);
- this.updatePosition();
-
- this.animationConfig.entry[0].timing.delay = this.animationDelay;
- this._animationPlaying = true;
- this.playAnimation('entry');
- },
-
- hide: function() {
- // If the tooltip is already hidden, there's nothing to do.
- if (!this._showing) {
- return;
- }
-
- // If the entry animation is still playing, don't try to play the exit
- // animation since this will reset the opacity to 1. Just end the animation.
- if (this._animationPlaying) {
- this.cancelAnimation();
- this._showing = false;
- this._onAnimationFinish();
- return;
- }
-
- this._showing = false;
- this._animationPlaying = true;
- this.playAnimation('exit');
- },
-
- _forChanged: function() {
- this._target = this.target;
- },
-
- updatePosition: function() {
- if (!this._target || !this.offsetParent)
- return;
-
- var offset = this.offset;
- // If a marginTop has been provided by the user (pre 1.0.3), use it.
- if (this.marginTop != 14 && this.offset == 14)
- offset = this.marginTop;
-
- var parentRect = this.offsetParent.getBoundingClientRect();
- var targetRect = this._target.getBoundingClientRect();
- var thisRect = this.getBoundingClientRect();
-
- var horizontalCenterOffset = (targetRect.width - thisRect.width) / 2;
- var verticalCenterOffset = (targetRect.height - thisRect.height) / 2;
-
- var targetLeft = targetRect.left - parentRect.left;
- var targetTop = targetRect.top - parentRect.top;
-
- var tooltipLeft, tooltipTop;
-
- switch (this.position) {
- case 'top':
- tooltipLeft = targetLeft + horizontalCenterOffset;
- tooltipTop = targetTop - thisRect.height - offset;
- break;
- case 'bottom':
- tooltipLeft = targetLeft + horizontalCenterOffset;
- tooltipTop = targetTop + targetRect.height + offset;
- break;
- case 'left':
- tooltipLeft = targetLeft - thisRect.width - offset;
- tooltipTop = targetTop + verticalCenterOffset;
- break;
- case 'right':
- tooltipLeft = targetLeft + targetRect.width + offset;
- tooltipTop = targetTop + verticalCenterOffset;
- break;
- }
-
- // TODO(noms): This should use IronFitBehavior if possible.
- if (this.fitToVisibleBounds) {
- // Clip the left/right side.
- if (tooltipLeft + thisRect.width > window.innerWidth) {
- this.style.right = '0px';
- this.style.left = 'auto';
- } else {
- this.style.left = Math.max(0, tooltipLeft) + 'px';
- this.style.right = 'auto';
- }
-
- // Clip the top/bottom side.
- if (tooltipTop + thisRect.height > window.innerHeight) {
- this.style.bottom = '0px';
- this.style.top = 'auto';
- } else {
- this.style.top = Math.max(0, tooltipTop) + 'px';
- this.style.bottom = 'auto';
- }
- } else {
- this.style.left = tooltipLeft + 'px';
- this.style.top = tooltipTop + 'px';
- }
-
- },
-
- _onAnimationFinish: function() {
- this._animationPlaying = false;
- if (!this._showing) {
- this.toggleClass('hidden', true, this.$.tooltip);
- }
- },
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/polymer/.bower.json
deleted file mode 100644
index 36ef2ed8724..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/.bower.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "polymer",
- "version": "1.6.0",
- "main": [
- "polymer.html",
- "polymer-mini.html",
- "polymer-micro.html"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "ignore": [
- "/.*",
- "/test/",
- "/util/",
- "/explainer/",
- "gulpfile.js",
- "PRIMER.md",
- "CONTRIBUTING.md",
- "CHANGELOG.md"
- ],
- "authors": [
- "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/Polymer/polymer.git"
- },
- "dependencies": {
- "webcomponentsjs": "^0.7.20"
- },
- "devDependencies": {
- "web-component-tester": "*"
- },
- "private": true,
- "homepage": "https://github.com/Polymer/polymer",
- "_release": "1.6.0",
- "_resolution": {
- "type": "version",
- "tag": "v1.6.0",
- "commit": "8715c83bf04a228de00ec662ed43eb6141e61b91"
- },
- "_source": "git://github.com/Polymer/polymer.git",
- "_target": "^1.0.0",
- "_originalSource": "Polymer/polymer"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/LICENSE.txt b/chromium/third_party/catapult/third_party/polymer/components/polymer/LICENSE.txt
deleted file mode 100644
index 95987bac868..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/LICENSE.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2014 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/bower.json b/chromium/third_party/catapult/third_party/polymer/components/polymer/bower.json
deleted file mode 100644
index 52783a4398c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/bower.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "polymer",
- "version": "1.6.0",
- "main": [
- "polymer.html",
- "polymer-mini.html",
- "polymer-micro.html"
- ],
- "license": "http://polymer.github.io/LICENSE.txt",
- "ignore": [
- "/.*",
- "/test/",
- "/util/",
- "/explainer/",
- "gulpfile.js",
- "PRIMER.md",
- "CONTRIBUTING.md",
- "CHANGELOG.md"
- ],
- "authors": [
- "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/Polymer/polymer.git"
- },
- "dependencies": {
- "webcomponentsjs": "^0.7.20"
- },
- "devDependencies": {
- "web-component-tester": "*"
- },
- "private": true
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/build.log b/chromium/third_party/catapult/third_party/polymer/components/polymer/build.log
deleted file mode 100644
index e4f8ba662e8..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/build.log
+++ /dev/null
@@ -1,473 +0,0 @@
-BUILD LOG
----------
-Build Time: 2016-06-29T11:29:07-0700
-
-NODEJS INFORMATION
-==================
-nodejs: v6.0.0
-acorn-jsx: 3.0.1
-ansi-escapes: 1.4.0
-caller-path: 0.1.0
-callsites: 0.2.0
-camelcase: 2.1.1
-camelcase-keys: 2.1.0
-cli-width: 2.1.0
-clone-stats: 0.0.1
-argparse: 1.0.7
-currently-unhandled: 0.4.1
-decamelize: 1.2.0
-del: 2.2.0
-dom5: 1.3.1
-doctrine: 1.2.2
-dom-serializer: 0.1.0
-duplexer: 0.1.1
-es6-map: 0.1.4
-escope: 3.6.0
-escape-regexp-component: 1.0.2
-esrecurse: 4.1.0
-estraverse: 4.2.0
-espree: 3.1.4
-fancy-log: 1.2.0
-fast-levenshtein: 1.1.3
-figures: 1.7.0
-find-up: 1.1.2
-globals: 9.8.0
-globby: 4.1.0
-gulp-eslint: 2.0.0
-gulp-rename: 1.2.2
-gulp-vulcanize: 6.0.1
-hosted-git-info: 2.1.5
-imurmurhash: 0.1.4
-ignore: 3.1.2
-inquirer: 0.12.0
-json-schema: 0.2.2
-lazypipe: 1.0.1
-levn: 0.3.0
-keep-alive-agent: 0.0.1
-lodash._root: 3.0.1
-lodash.isarguments: 3.0.8
-loud-rejection: 1.4.1
-match-stream: 0.0.2
-object-component: 0.0.3
-optionator: 0.8.1
-parse5: 1.5.1
-parsejson: 0.0.1
-parseqs: 0.0.2
-parseuri: 0.0.4
-polyclean: 1.2.0
-pluralize: 1.2.1
-require-uncached: 1.0.2
-resolve-from: 1.0.1
-slice-ansi: 0.0.4
-spdx-license-ids: 1.2.1
-stream-combiner: 0.2.2
-streamsearch: 0.1.2
-table: 3.7.8
-test-fixture: 1.1.0
-time-stamp: 1.0.1
-text-table: 0.2.0
-to-array: 0.1.4
-tv4: 1.2.7
-wordwrap: 1.0.0
-xregexp: 3.1.1
-acorn: 3.2.0
-eslint: 2.12.0
-esprima: 2.7.2
-jade: 0.26.3
-js-yaml: 3.6.1
-shelljs: 0.6.0
-ansi-styles: 2.1.0
-accepts: 1.2.13
-ansi-regex: 2.0.0
-accessibility-developer-tools: 2.10.0
-array-union: 1.0.1
-append-field: 0.1.0
-array-differ: 1.0.0
-arrify: 1.0.1
-array-find-index: 1.0.1
-after: 0.8.1
-array-uniq: 1.0.2
-asn1: 0.1.11
-archiver: 0.14.4
-array-flatten: 1.1.1
-arraybuffer.slice: 0.0.6
-adm-zip: 0.4.7
-assert-plus: 0.1.5
-assertion-error: 1.0.1
-async: 1.5.2
-backoff: 2.4.1
-balanced-match: 0.3.0
-backo2: 1.0.2
-aws4: 1.2.1
-base64-arraybuffer: 0.1.2
-better-assert: 1.0.2
-beeper: 1.1.0
-benchmark: 1.0.0
-base64id: 0.1.0
-base64-js: 0.0.8
-binary: 0.3.0
-bluebird: 2.10.2
-bl: 0.9.5
-brace-expansion: 1.1.2
-body-parser: 1.14.2
-blob: 0.0.4
-bufferstreams: 1.1.0
-boom: 0.4.2
-browserstack: 1.3.1
-buffers: 0.1.1
-buffer-crc32: 0.2.5
-builtin-modules: 1.1.1
-bytes: 2.2.0
-capture-stack-trace: 1.0.0
-callsite: 1.0.0
-busboy: 0.2.12
-chalk: 1.1.1
-chainsaw: 0.1.0
-caseless: 0.8.0
-clone: 1.0.2
-combined-stream: 0.0.7
-cleankill: 1.0.2
-chai: 3.5.0
-cli-cursor: 1.0.2
-commander: 2.3.0
-component-bind: 1.0.0
-code-point-at: 1.0.0
-aws-sign2: 0.5.0
-component-inherit: 0.0.3
-concat-map: 0.0.1
-compress-commons: 0.2.9
-component-emitter: 1.1.2
-configstore: 1.4.0
-content-type: 1.0.1
-content-disposition: 0.5.1
-concat-stream: 1.5.1
-crc32-stream: 0.3.4
-core-util-is: 1.0.2
-cookie-signature: 1.0.6
-cookie: 0.1.5
-crc: 3.2.1
-create-error-class: 2.0.1
-cryptiles: 0.2.2
-csv-generate: 0.0.6
-csv-parse: 1.0.1
-ctype: 0.5.3
-csv-stringify: 0.0.8
-csv: 0.4.6
-d: 0.1.1
-debug: 2.2.0
-deep-eql: 0.1.3
-delayed-stream: 0.0.5
-dashdash: 1.12.2
-deep-extend: 0.4.1
-depd: 1.1.0
-diff: 1.4.0
-deep-is: 0.1.3
-destroy: 1.0.4
-dicer: 0.2.5
-domutils: 1.5.1
-domhandler: 2.3.0
-duplexer2: 0.0.2
-domelementtype: 1.3.0
-ecc-jsbn: 0.1.1
-end-of-stream: 1.1.0
-dtrace-provider: 0.6.0
-ee-first: 1.1.1
-engine.io-parser: 1.2.4
-entities: 1.1.1
-engine.io-client: 1.6.8
-engine.io: 1.6.8
-es6-set: 0.1.4
-es6-iterator: 2.0.0
-es5-ext: 0.10.11
-error-ex: 1.3.0
-es6-weak-map: 2.0.1
-es6-symbol: 3.0.2
-escape-string-regexp: 1.0.4
-escape-html: 1.0.3
-esutils: 2.0.2
-eslint-plugin-html: 1.3.0
-event-emitter: 0.3.4
-exit-hook: 1.1.1
-file-entry-cache: 1.2.4
-etag: 1.7.0
-extsprintf: 1.2.0
-extend: 3.0.0
-express: 4.13.4
-forever-agent: 0.5.2
-findup-sync: 0.2.1
-finalhandler: 0.4.1
-freeport: 1.0.5
-formatio: 1.1.1
-flat-cache: 1.0.10
-form-data: 0.2.0
-generate-function: 2.0.0
-formidable: 1.0.17
-generate-object-property: 1.2.0
-forwarded: 0.1.0
-fresh: 0.3.0
-get-stdin: 4.0.1
-glob: 5.0.15
-fstream: 0.1.31
-graceful-fs: 4.1.3
-got: 5.4.1
-glogg: 1.0.0
-gulp-audit: 1.0.0
-gulp-replace: 0.5.4
-graceful-readlink: 1.0.1
-gulp-util: 3.0.7
-growl: 1.8.1
-has-ansi: 2.0.0
-gulplog: 1.0.0
-has-color: 0.1.7
-has-gulplog: 0.1.0
-has-binary: 0.1.7
-hawk: 1.1.1
-has-cors: 1.1.0
-hoek: 0.9.1
-http-signature: 0.11.0
-http-errors: 1.3.1
-inflight: 1.0.4
-htmlparser2: 3.9.0
-inherits: 2.0.1
-is-absolute: 0.1.7
-indent-string: 2.1.0
-iconv-lite: 0.4.13
-is-finite: 1.0.1
-is-path-cwd: 1.0.0
-is-my-json-valid: 2.12.4
-is-builtin-module: 1.0.0
-is-path-in-cwd: 1.0.0
-is-arrayish: 0.2.1
-is-npm: 1.0.0
-is-fullwidth-code-point: 1.0.0
-is-redirect: 1.0.0
-is-path-inside: 1.0.0
-is-plain-obj: 1.1.0
-is-property: 1.0.2
-is-resolvable: 1.0.0
-isarray: 0.0.1
-is-typedarray: 1.0.0
-is-retry-allowed: 1.0.0
-is-utf8: 0.2.1
-isexe: 1.1.1
-isstream: 0.1.2
-is-stream: 1.0.1
-jodid25519: 1.0.2
-json-stable-stringify: 1.0.1
-ipaddr.js: 1.0.5
-jsbn: 0.1.0
-json-stringify-safe: 5.0.1
-jsonify: 0.0.0
-jsonpointer: 2.0.0
-jsprim: 1.2.2
-lazystream: 0.1.0
-latest-version: 2.0.0
-launchpad: 0.5.1
-lodash._basecopy: 3.0.1
-lodash._basevalues: 3.0.0
-lodash._basetostring: 3.0.1
-lodash._getnative: 3.9.1
-lodash: 3.10.1
-lodash._isiterateecall: 3.0.9
-lodash._reinterpolate: 3.0.0
-lodash._reevaluate: 3.0.0
-lodash._reescape: 3.0.0
-lodash.escape: 3.2.0
-json3: 3.2.6
-lodash.restparam: 3.6.1
-lodash.isarray: 3.0.4
-load-json-file: 1.1.0
-lodash.templatesettings: 3.1.1
-lru-cache: 2.7.3
-lodash.keys: 3.1.2
-lowercase-keys: 1.0.0
-map-obj: 1.0.1
-meow: 3.7.0
-lolex: 1.3.2
-mime-db: 1.21.0
-minimatch: 3.0.0
-media-typer: 0.3.0
-merge-descriptors: 1.0.1
-methods: 1.1.2
-minimist: 0.0.8
-ms: 0.7.1
-mime-types: 2.1.9
-multipipe: 0.1.2
-nan: 2.2.0
-mv: 2.1.1
-multer: 1.1.0
-node-int64: 0.3.3
-mute-stream: 0.0.5
-negotiator: 0.5.3
-object-assign: 4.0.1
-normalize-package-data: 2.3.5
-node-status-codes: 1.0.0
-lodash.template: 3.6.2
-number-is-nan: 1.0.0
-nomnom: 1.8.1
-onetime: 1.1.0
-on-finished: 2.3.0
-once: 1.3.3
-oauth-sign: 0.5.0
-os-homedir: 1.0.1
-options: 0.0.6
-os-tmpdir: 1.0.1
-osenv: 0.1.3
-parse-json: 2.2.0
-over: 0.0.5
-package-json: 2.3.0
-path-is-inside: 1.0.1
-path-is-absolute: 1.0.0
-path-exists: 2.1.0
-pify: 2.3.0
-parseurl: 1.3.1
-pinkie-promise: 2.0.0
-pinkie: 2.0.4
-path-to-regexp: 0.1.7
-path-type: 1.1.0
-prelude-ls: 1.1.2
-process-nextick-args: 1.0.6
-prepend-http: 1.0.3
-plist: 1.2.0
-precond: 0.2.3
-progress: 1.1.8
-proxy-addr: 1.0.10
-qs: 5.2.0
-pullstream: 0.4.1
-q: 1.4.1
-range-parser: 1.0.3
-read-all-stream: 3.1.0
-raw-body: 2.1.5
-readable-stream: 2.0.5
-redent: 1.0.0
-read-pkg-up: 1.0.1
-read-json-sync: 1.1.1
-read-pkg: 1.1.0
-registry-url: 3.0.3
-readline2: 1.0.1
-replace-ext: 0.0.1
-repeating: 2.0.0
-is-relative: 0.1.3
-resolve: 1.1.7
-request: 2.51.0
-run-sequence: 1.1.2
-run-async: 0.1.0
-rx-lite: 3.1.2
-safe-json-stringify: 1.0.3
-sauce-connect-launcher: 0.14.0
-samsam: 1.1.2
-restore-cursor: 1.0.1
-send: 0.11.1
-semver-diff: 2.1.0
-server-destroy: 1.0.1
-serve-waterfall: 1.1.1
-serve-static: 1.10.2
-setimmediate: 1.0.4
-sinon: 1.17.3
-signal-exit: 2.1.2
-sigmund: 1.0.1
-slide: 1.1.6
-sntp: 0.2.4
-sinon-chai: 2.8.0
-slice-stream: 1.0.0
-spdx-correct: 1.0.2
-sparkles: 1.0.0
-socket.io: 1.4.5
-socket.io-client: 1.4.5
-socket.io-parser: 2.2.6
-socket.io-adapter: 0.4.0
-spdx-expression-parse: 1.0.2
-spdx-exceptions: 1.0.4
-spdy: 1.32.5
-statuses: 1.2.1
-sprintf-js: 1.0.3
-stacky: 1.3.1
-string-length: 1.0.1
-stream-transform: 0.1.1
-string_decoder: 0.10.31
-stringstream: 0.0.5
-supports-color: 2.0.0
-string-width: 1.0.1
-strip-ansi: 3.0.0
-strip-bom: 2.0.0
-tar-stream: 1.1.5
-through: 2.3.8
-timed-out: 2.0.0
-tryit: 1.0.2
-through2: 2.0.1
-trim-newlines: 1.0.0
-traverse: 0.3.9
-tunnel-agent: 0.4.2
-type-check: 0.3.2
-tough-cookie: 2.2.1
-typedarray: 0.0.6
-tweetnacl: 0.13.3
-temp: 0.8.3
-type-detect: 1.0.0
-type-is: 1.6.11
-unzip: 0.1.11
-unpipe: 1.0.0
-url-parse-lax: 1.0.0
-underscore: 1.6.0
-user-home: 2.0.0
-update-notifier: 0.6.0
-unzip-response: 1.0.0
-underscore.string: 3.0.3
-util-deprecate: 1.0.2
-uuid: 2.0.1
-utf8: 2.1.0
-urijs: 1.16.1
-ultron: 1.0.2
-vargs: 0.1.0
-utils-merge: 1.0.0
-util: 0.10.3
-vasync: 1.6.3
-wct-local: 2.0.1
-vary: 1.0.1
-validate-npm-package-license: 3.0.1
-verror: 1.6.1
-vinyl: 0.5.3
-wct-sauce: 1.8.3
-write-file-atomic: 1.1.4
-wrappy: 1.0.1
-ws: 1.0.1
-indexof: 0.0.1
-write: 0.2.1
-xdg-basedir: 2.0.0
-xmlhttprequest-ssl: 1.5.1
-bunyan: 1.5.1
-xmldom: 0.1.22
-ini: 1.3.4
-dateformat: 1.0.12
-xmlbuilder: 4.0.0
-gulp: 3.9.0
-har-validator: 2.0.6
-xtend: 4.0.1
-mime: 1.3.4
-mkdirp: 0.5.1
-mocha: 2.4.5
-ncp: 2.0.0
-rc: 1.1.6
-rimraf: 2.5.1
-restify: 4.0.3
-selenium-standalone: 4.9.0
-semver: 5.1.0
-node-uuid: 1.4.7
-sshpk: 1.7.3
-yeast: 0.1.2
-strip-json-comments: 1.0.4
-strip-indent: 1.0.1
-zip-stream: 0.5.2
-web-component-tester: 4.2.0
-wd: 0.3.12
-which: 1.2.4
-
-REPO REVISIONS
-==============
-polymer: 9b44ac25b66e88a57172b33a4621cbdb5454c635
-
-BUILD HASHES
-============
-polymer-mini.html: 8f052eaa5290a7fb6fbffc109a3020e06ac42401
-polymer-micro.html: e7d1b0ee189eeb5276a5cdc37a1608aefef2fd25
-polymer.html: 8bec5d873aa2570fb7a332ee8f0356f8c81ff9cf \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-micro.html b/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-micro.html
deleted file mode 100644
index 2445d3fb904..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-micro.html
+++ /dev/null
@@ -1,715 +0,0 @@
-<!--
-@license
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
---><script>(function () {
-function resolve() {
-document.body.removeAttribute('unresolved');
-}
-if (window.WebComponents) {
-addEventListener('WebComponentsReady', resolve);
-} else {
-if (document.readyState === 'interactive' || document.readyState === 'complete') {
-resolve();
-} else {
-addEventListener('DOMContentLoaded', resolve);
-}
-}
-}());window.Polymer = {
-Settings: function () {
-var settings = window.Polymer || {};
-var parts = location.search.slice(1).split('&');
-for (var i = 0, o; i < parts.length && (o = parts[i]); i++) {
-o = o.split('=');
-o[0] && (settings[o[0]] = o[1] || true);
-}
-settings.wantShadow = settings.dom === 'shadow';
-settings.hasShadow = Boolean(Element.prototype.createShadowRoot);
-settings.nativeShadow = settings.hasShadow && !window.ShadowDOMPolyfill;
-settings.useShadow = settings.wantShadow && settings.hasShadow;
-settings.hasNativeImports = Boolean('import' in document.createElement('link'));
-settings.useNativeImports = settings.hasNativeImports;
-settings.useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
-settings.useNativeShadow = settings.useShadow && settings.nativeShadow;
-settings.usePolyfillProto = !settings.useNativeCustomElements && !Object.__proto__;
-settings.hasNativeCSSProperties = !navigator.userAgent.match('AppleWebKit/601') && window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)');
-settings.useNativeCSSProperties = settings.hasNativeCSSProperties && settings.lazyRegister && settings.useNativeCSSProperties;
-return settings;
-}()
-};(function () {
-var userPolymer = window.Polymer;
-window.Polymer = function (prototype) {
-if (typeof prototype === 'function') {
-prototype = prototype.prototype;
-}
-if (!prototype) {
-prototype = {};
-}
-var factory = desugar(prototype);
-prototype = factory.prototype;
-var options = { prototype: prototype };
-if (prototype.extends) {
-options.extends = prototype.extends;
-}
-Polymer.telemetry._registrate(prototype);
-document.registerElement(prototype.is, options);
-return factory;
-};
-var desugar = function (prototype) {
-var base = Polymer.Base;
-if (prototype.extends) {
-base = Polymer.Base._getExtendedPrototype(prototype.extends);
-}
-prototype = Polymer.Base.chainObject(prototype, base);
-prototype.registerCallback();
-return prototype.constructor;
-};
-if (userPolymer) {
-for (var i in userPolymer) {
-Polymer[i] = userPolymer[i];
-}
-}
-Polymer.Class = desugar;
-}());
-Polymer.telemetry = {
-registrations: [],
-_regLog: function (prototype) {
-console.log('[' + prototype.is + ']: registered');
-},
-_registrate: function (prototype) {
-this.registrations.push(prototype);
-Polymer.log && this._regLog(prototype);
-},
-dumpRegistrations: function () {
-this.registrations.forEach(this._regLog);
-}
-};Object.defineProperty(window, 'currentImport', {
-enumerable: true,
-configurable: true,
-get: function () {
-return (document._currentScript || document.currentScript).ownerDocument;
-}
-});Polymer.RenderStatus = {
-_ready: false,
-_callbacks: [],
-whenReady: function (cb) {
-if (this._ready) {
-cb();
-} else {
-this._callbacks.push(cb);
-}
-},
-_makeReady: function () {
-this._ready = true;
-for (var i = 0; i < this._callbacks.length; i++) {
-this._callbacks[i]();
-}
-this._callbacks = [];
-},
-_catchFirstRender: function () {
-requestAnimationFrame(function () {
-Polymer.RenderStatus._makeReady();
-});
-},
-_afterNextRenderQueue: [],
-_waitingNextRender: false,
-afterNextRender: function (element, fn, args) {
-this._watchNextRender();
-this._afterNextRenderQueue.push([
-element,
-fn,
-args
-]);
-},
-hasRendered: function () {
-return this._ready;
-},
-_watchNextRender: function () {
-if (!this._waitingNextRender) {
-this._waitingNextRender = true;
-var fn = function () {
-Polymer.RenderStatus._flushNextRender();
-};
-if (!this._ready) {
-this.whenReady(fn);
-} else {
-requestAnimationFrame(fn);
-}
-}
-},
-_flushNextRender: function () {
-var self = this;
-setTimeout(function () {
-self._flushRenderCallbacks(self._afterNextRenderQueue);
-self._afterNextRenderQueue = [];
-self._waitingNextRender = false;
-});
-},
-_flushRenderCallbacks: function (callbacks) {
-for (var i = 0, h; i < callbacks.length; i++) {
-h = callbacks[i];
-h[1].apply(h[0], h[2] || Polymer.nar);
-}
-}
-};
-if (window.HTMLImports) {
-HTMLImports.whenReady(function () {
-Polymer.RenderStatus._catchFirstRender();
-});
-} else {
-Polymer.RenderStatus._catchFirstRender();
-}
-Polymer.ImportStatus = Polymer.RenderStatus;
-Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;(function () {
-'use strict';
-var settings = Polymer.Settings;
-Polymer.Base = {
-__isPolymerInstance__: true,
-_addFeature: function (feature) {
-this.extend(this, feature);
-},
-registerCallback: function () {
-this._desugarBehaviors();
-this._doBehavior('beforeRegister');
-this._registerFeatures();
-if (!settings.lazyRegister) {
-this.ensureRegisterFinished();
-}
-},
-createdCallback: function () {
-if (!this.__hasRegisterFinished) {
-this._ensureRegisterFinished(this.__proto__);
-}
-Polymer.telemetry.instanceCount++;
-this.root = this;
-this._doBehavior('created');
-this._initFeatures();
-},
-ensureRegisterFinished: function () {
-this._ensureRegisterFinished(this);
-},
-_ensureRegisterFinished: function (proto) {
-if (proto.__hasRegisterFinished !== proto.is) {
-proto.__hasRegisterFinished = proto.is;
-if (proto._finishRegisterFeatures) {
-proto._finishRegisterFeatures();
-}
-proto._doBehavior('registered');
-if (settings.usePolyfillProto && proto !== this) {
-proto.extend(this, proto);
-}
-}
-},
-attachedCallback: function () {
-var self = this;
-Polymer.RenderStatus.whenReady(function () {
-self.isAttached = true;
-self._doBehavior('attached');
-});
-},
-detachedCallback: function () {
-var self = this;
-Polymer.RenderStatus.whenReady(function () {
-self.isAttached = false;
-self._doBehavior('detached');
-});
-},
-attributeChangedCallback: function (name, oldValue, newValue) {
-this._attributeChangedImpl(name);
-this._doBehavior('attributeChanged', [
-name,
-oldValue,
-newValue
-]);
-},
-_attributeChangedImpl: function (name) {
-this._setAttributeToProperty(this, name);
-},
-extend: function (prototype, api) {
-if (prototype && api) {
-var n$ = Object.getOwnPropertyNames(api);
-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
-this.copyOwnProperty(n, api, prototype);
-}
-}
-return prototype || api;
-},
-mixin: function (target, source) {
-for (var i in source) {
-target[i] = source[i];
-}
-return target;
-},
-copyOwnProperty: function (name, source, target) {
-var pd = Object.getOwnPropertyDescriptor(source, name);
-if (pd) {
-Object.defineProperty(target, name, pd);
-}
-},
-_logger: function (level, args) {
-if (args.length === 1 && Array.isArray(args[0])) {
-args = args[0];
-}
-switch (level) {
-case 'log':
-case 'warn':
-case 'error':
-console[level].apply(console, args);
-break;
-}
-},
-_log: function () {
-var args = Array.prototype.slice.call(arguments, 0);
-this._logger('log', args);
-},
-_warn: function () {
-var args = Array.prototype.slice.call(arguments, 0);
-this._logger('warn', args);
-},
-_error: function () {
-var args = Array.prototype.slice.call(arguments, 0);
-this._logger('error', args);
-},
-_logf: function () {
-return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments, 0));
-}
-};
-Polymer.Base._logPrefix = function () {
-var color = window.chrome && !/edge/i.test(navigator.userAgent) || /firefox/i.test(navigator.userAgent);
-return color ? [
-'%c[%s::%s]:',
-'font-weight: bold; background-color:#EEEE00;'
-] : ['[%s::%s]:'];
-}();
-Polymer.Base.chainObject = function (object, inherited) {
-if (object && inherited && object !== inherited) {
-if (!Object.__proto__) {
-object = Polymer.Base.extend(Object.create(inherited), object);
-}
-object.__proto__ = inherited;
-}
-return object;
-};
-Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
-if (window.CustomElements) {
-Polymer.instanceof = CustomElements.instanceof;
-} else {
-Polymer.instanceof = function (obj, ctor) {
-return obj instanceof ctor;
-};
-}
-Polymer.isInstance = function (obj) {
-return Boolean(obj && obj.__isPolymerInstance__);
-};
-Polymer.telemetry.instanceCount = 0;
-}());(function () {
-var modules = {};
-var lcModules = {};
-var findModule = function (id) {
-return modules[id] || lcModules[id.toLowerCase()];
-};
-var DomModule = function () {
-return document.createElement('dom-module');
-};
-DomModule.prototype = Object.create(HTMLElement.prototype);
-Polymer.Base.extend(DomModule.prototype, {
-constructor: DomModule,
-createdCallback: function () {
-this.register();
-},
-register: function (id) {
-id = id || this.id || this.getAttribute('name') || this.getAttribute('is');
-if (id) {
-this.id = id;
-modules[id] = this;
-lcModules[id.toLowerCase()] = this;
-}
-},
-import: function (id, selector) {
-if (id) {
-var m = findModule(id);
-if (!m) {
-forceDomModulesUpgrade();
-m = findModule(id);
-}
-if (m && selector) {
-m = m.querySelector(selector);
-}
-return m;
-}
-}
-});
-var cePolyfill = window.CustomElements && !CustomElements.useNative;
-document.registerElement('dom-module', DomModule);
-function forceDomModulesUpgrade() {
-if (cePolyfill) {
-var script = document._currentScript || document.currentScript;
-var doc = script && script.ownerDocument || document;
-var modules = doc.querySelectorAll('dom-module');
-for (var i = modules.length - 1, m; i >= 0 && (m = modules[i]); i--) {
-if (m.__upgraded__) {
-return;
-} else {
-CustomElements.upgrade(m);
-}
-}
-}
-}
-}());Polymer.Base._addFeature({
-_prepIs: function () {
-if (!this.is) {
-var module = (document._currentScript || document.currentScript).parentNode;
-if (module.localName === 'dom-module') {
-var id = module.id || module.getAttribute('name') || module.getAttribute('is');
-this.is = id;
-}
-}
-if (this.is) {
-this.is = this.is.toLowerCase();
-}
-}
-});Polymer.Base._addFeature({
-behaviors: [],
-_desugarBehaviors: function () {
-if (this.behaviors.length) {
-this.behaviors = this._desugarSomeBehaviors(this.behaviors);
-}
-},
-_desugarSomeBehaviors: function (behaviors) {
-var behaviorSet = [];
-behaviors = this._flattenBehaviorsList(behaviors);
-for (var i = behaviors.length - 1; i >= 0; i--) {
-var b = behaviors[i];
-if (behaviorSet.indexOf(b) === -1) {
-this._mixinBehavior(b);
-behaviorSet.unshift(b);
-}
-}
-return behaviorSet;
-},
-_flattenBehaviorsList: function (behaviors) {
-var flat = [];
-for (var i = 0; i < behaviors.length; i++) {
-var b = behaviors[i];
-if (b instanceof Array) {
-flat = flat.concat(this._flattenBehaviorsList(b));
-} else if (b) {
-flat.push(b);
-} else {
-this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));
-}
-}
-return flat;
-},
-_mixinBehavior: function (b) {
-var n$ = Object.getOwnPropertyNames(b);
-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
-if (!Polymer.Base._behaviorProperties[n] && !this.hasOwnProperty(n)) {
-this.copyOwnProperty(n, b, this);
-}
-}
-},
-_prepBehaviors: function () {
-this._prepFlattenedBehaviors(this.behaviors);
-},
-_prepFlattenedBehaviors: function (behaviors) {
-for (var i = 0, l = behaviors.length; i < l; i++) {
-this._prepBehavior(behaviors[i]);
-}
-this._prepBehavior(this);
-},
-_doBehavior: function (name, args) {
-for (var i = 0; i < this.behaviors.length; i++) {
-this._invokeBehavior(this.behaviors[i], name, args);
-}
-this._invokeBehavior(this, name, args);
-},
-_invokeBehavior: function (b, name, args) {
-var fn = b[name];
-if (fn) {
-fn.apply(this, args || Polymer.nar);
-}
-},
-_marshalBehaviors: function () {
-for (var i = 0; i < this.behaviors.length; i++) {
-this._marshalBehavior(this.behaviors[i]);
-}
-this._marshalBehavior(this);
-}
-});
-Polymer.Base._behaviorProperties = {
-hostAttributes: true,
-beforeRegister: true,
-registered: true,
-properties: true,
-observers: true,
-listeners: true,
-created: true,
-attached: true,
-detached: true,
-attributeChanged: true,
-ready: true
-};Polymer.Base._addFeature({
-_getExtendedPrototype: function (tag) {
-return this._getExtendedNativePrototype(tag);
-},
-_nativePrototypes: {},
-_getExtendedNativePrototype: function (tag) {
-var p = this._nativePrototypes[tag];
-if (!p) {
-var np = this.getNativePrototype(tag);
-p = this.extend(Object.create(np), Polymer.Base);
-this._nativePrototypes[tag] = p;
-}
-return p;
-},
-getNativePrototype: function (tag) {
-return Object.getPrototypeOf(document.createElement(tag));
-}
-});Polymer.Base._addFeature({
-_prepConstructor: function () {
-this._factoryArgs = this.extends ? [
-this.extends,
-this.is
-] : [this.is];
-var ctor = function () {
-return this._factory(arguments);
-};
-if (this.hasOwnProperty('extends')) {
-ctor.extends = this.extends;
-}
-Object.defineProperty(this, 'constructor', {
-value: ctor,
-writable: true,
-configurable: true
-});
-ctor.prototype = this;
-},
-_factory: function (args) {
-var elt = document.createElement.apply(document, this._factoryArgs);
-if (this.factoryImpl) {
-this.factoryImpl.apply(elt, args);
-}
-return elt;
-}
-});Polymer.nob = Object.create(null);
-Polymer.Base._addFeature({
-properties: {},
-getPropertyInfo: function (property) {
-var info = this._getPropertyInfo(property, this.properties);
-if (!info) {
-for (var i = 0; i < this.behaviors.length; i++) {
-info = this._getPropertyInfo(property, this.behaviors[i].properties);
-if (info) {
-return info;
-}
-}
-}
-return info || Polymer.nob;
-},
-_getPropertyInfo: function (property, properties) {
-var p = properties && properties[property];
-if (typeof p === 'function') {
-p = properties[property] = { type: p };
-}
-if (p) {
-p.defined = true;
-}
-return p;
-},
-_prepPropertyInfo: function () {
-this._propertyInfo = {};
-for (var i = 0; i < this.behaviors.length; i++) {
-this._addPropertyInfo(this._propertyInfo, this.behaviors[i].properties);
-}
-this._addPropertyInfo(this._propertyInfo, this.properties);
-this._addPropertyInfo(this._propertyInfo, this._propertyEffects);
-},
-_addPropertyInfo: function (target, source) {
-if (source) {
-var t, s;
-for (var i in source) {
-t = target[i];
-s = source[i];
-if (i[0] === '_' && !s.readOnly) {
-continue;
-}
-if (!target[i]) {
-target[i] = {
-type: typeof s === 'function' ? s : s.type,
-readOnly: s.readOnly,
-attribute: Polymer.CaseMap.camelToDashCase(i)
-};
-} else {
-if (!t.type) {
-t.type = s.type;
-}
-if (!t.readOnly) {
-t.readOnly = s.readOnly;
-}
-}
-}
-}
-}
-});Polymer.CaseMap = {
-_caseMap: {},
-_rx: {
-dashToCamel: /-[a-z]/g,
-camelToDash: /([A-Z])/g
-},
-dashToCamelCase: function (dash) {
-return this._caseMap[dash] || (this._caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(this._rx.dashToCamel, function (m) {
-return m[1].toUpperCase();
-}));
-},
-camelToDashCase: function (camel) {
-return this._caseMap[camel] || (this._caseMap[camel] = camel.replace(this._rx.camelToDash, '-$1').toLowerCase());
-}
-};Polymer.Base._addFeature({
-_addHostAttributes: function (attributes) {
-if (!this._aggregatedAttributes) {
-this._aggregatedAttributes = {};
-}
-if (attributes) {
-this.mixin(this._aggregatedAttributes, attributes);
-}
-},
-_marshalHostAttributes: function () {
-if (this._aggregatedAttributes) {
-this._applyAttributes(this, this._aggregatedAttributes);
-}
-},
-_applyAttributes: function (node, attr$) {
-for (var n in attr$) {
-if (!this.hasAttribute(n) && n !== 'class') {
-var v = attr$[n];
-this.serializeValueToAttribute(v, n, this);
-}
-}
-},
-_marshalAttributes: function () {
-this._takeAttributesToModel(this);
-},
-_takeAttributesToModel: function (model) {
-if (this.hasAttributes()) {
-for (var i in this._propertyInfo) {
-var info = this._propertyInfo[i];
-if (this.hasAttribute(info.attribute)) {
-this._setAttributeToProperty(model, info.attribute, i, info);
-}
-}
-}
-},
-_setAttributeToProperty: function (model, attribute, property, info) {
-if (!this._serializing) {
-property = property || Polymer.CaseMap.dashToCamelCase(attribute);
-info = info || this._propertyInfo && this._propertyInfo[property];
-if (info && !info.readOnly) {
-var v = this.getAttribute(attribute);
-model[property] = this.deserialize(v, info.type);
-}
-}
-},
-_serializing: false,
-reflectPropertyToAttribute: function (property, attribute, value) {
-this._serializing = true;
-value = value === undefined ? this[property] : value;
-this.serializeValueToAttribute(value, attribute || Polymer.CaseMap.camelToDashCase(property));
-this._serializing = false;
-},
-serializeValueToAttribute: function (value, attribute, node) {
-var str = this.serialize(value);
-node = node || this;
-if (str === undefined) {
-node.removeAttribute(attribute);
-} else {
-node.setAttribute(attribute, str);
-}
-},
-deserialize: function (value, type) {
-switch (type) {
-case Number:
-value = Number(value);
-break;
-case Boolean:
-value = value != null;
-break;
-case Object:
-try {
-value = JSON.parse(value);
-} catch (x) {
-}
-break;
-case Array:
-try {
-value = JSON.parse(value);
-} catch (x) {
-value = null;
-console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
-}
-break;
-case Date:
-value = new Date(value);
-break;
-case String:
-default:
-break;
-}
-return value;
-},
-serialize: function (value) {
-switch (typeof value) {
-case 'boolean':
-return value ? '' : undefined;
-case 'object':
-if (value instanceof Date) {
-return value.toString();
-} else if (value) {
-try {
-return JSON.stringify(value);
-} catch (x) {
-return '';
-}
-}
-default:
-return value != null ? value : undefined;
-}
-}
-});Polymer.version = '1.6.0';Polymer.Base._addFeature({
-_registerFeatures: function () {
-this._prepIs();
-this._prepBehaviors();
-this._prepConstructor();
-this._prepPropertyInfo();
-},
-_prepBehavior: function (b) {
-this._addHostAttributes(b.hostAttributes);
-},
-_marshalBehavior: function (b) {
-},
-_initFeatures: function () {
-this._marshalHostAttributes();
-this._marshalBehaviors();
-}
-});</script>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-mini.html b/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-mini.html
deleted file mode 100644
index f6dd537e812..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer-mini.html
+++ /dev/null
@@ -1,2164 +0,0 @@
-<!--
-@license
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
---><link rel="import" href="polymer-micro.html">
-
-<script>Polymer.Base._addFeature({
-_prepTemplate: function () {
-if (this._template === undefined) {
-this._template = Polymer.DomModule.import(this.is, 'template');
-}
-if (this._template && this._template.hasAttribute('is')) {
-this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.'));
-}
-if (this._template && !this._template.content && window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
-HTMLTemplateElement.decorate(this._template);
-}
-},
-_stampTemplate: function () {
-if (this._template) {
-this.root = this.instanceTemplate(this._template);
-}
-},
-instanceTemplate: function (template) {
-var dom = document.importNode(template._content || template.content, true);
-return dom;
-}
-});(function () {
-var baseAttachedCallback = Polymer.Base.attachedCallback;
-Polymer.Base._addFeature({
-_hostStack: [],
-ready: function () {
-},
-_registerHost: function (host) {
-this.dataHost = host = host || Polymer.Base._hostStack[Polymer.Base._hostStack.length - 1];
-if (host && host._clients) {
-host._clients.push(this);
-}
-this._clients = null;
-this._clientsReadied = false;
-},
-_beginHosting: function () {
-Polymer.Base._hostStack.push(this);
-if (!this._clients) {
-this._clients = [];
-}
-},
-_endHosting: function () {
-Polymer.Base._hostStack.pop();
-},
-_tryReady: function () {
-this._readied = false;
-if (this._canReady()) {
-this._ready();
-}
-},
-_canReady: function () {
-return !this.dataHost || this.dataHost._clientsReadied;
-},
-_ready: function () {
-this._beforeClientsReady();
-if (this._template) {
-this._setupRoot();
-this._readyClients();
-}
-this._clientsReadied = true;
-this._clients = null;
-this._afterClientsReady();
-this._readySelf();
-},
-_readyClients: function () {
-this._beginDistribute();
-var c$ = this._clients;
-if (c$) {
-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
-c._ready();
-}
-}
-this._finishDistribute();
-},
-_readySelf: function () {
-this._doBehavior('ready');
-this._readied = true;
-if (this._attachedPending) {
-this._attachedPending = false;
-this.attachedCallback();
-}
-},
-_beforeClientsReady: function () {
-},
-_afterClientsReady: function () {
-},
-_beforeAttached: function () {
-},
-attachedCallback: function () {
-if (this._readied) {
-this._beforeAttached();
-baseAttachedCallback.call(this);
-} else {
-this._attachedPending = true;
-}
-}
-});
-}());Polymer.ArraySplice = function () {
-function newSplice(index, removed, addedCount) {
-return {
-index: index,
-removed: removed,
-addedCount: addedCount
-};
-}
-var EDIT_LEAVE = 0;
-var EDIT_UPDATE = 1;
-var EDIT_ADD = 2;
-var EDIT_DELETE = 3;
-function ArraySplice() {
-}
-ArraySplice.prototype = {
-calcEditDistances: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {
-var rowCount = oldEnd - oldStart + 1;
-var columnCount = currentEnd - currentStart + 1;
-var distances = new Array(rowCount);
-for (var i = 0; i < rowCount; i++) {
-distances[i] = new Array(columnCount);
-distances[i][0] = i;
-}
-for (var j = 0; j < columnCount; j++)
-distances[0][j] = j;
-for (i = 1; i < rowCount; i++) {
-for (j = 1; j < columnCount; j++) {
-if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))
-distances[i][j] = distances[i - 1][j - 1];
-else {
-var north = distances[i - 1][j] + 1;
-var west = distances[i][j - 1] + 1;
-distances[i][j] = north < west ? north : west;
-}
-}
-}
-return distances;
-},
-spliceOperationsFromEditDistances: function (distances) {
-var i = distances.length - 1;
-var j = distances[0].length - 1;
-var current = distances[i][j];
-var edits = [];
-while (i > 0 || j > 0) {
-if (i == 0) {
-edits.push(EDIT_ADD);
-j--;
-continue;
-}
-if (j == 0) {
-edits.push(EDIT_DELETE);
-i--;
-continue;
-}
-var northWest = distances[i - 1][j - 1];
-var west = distances[i - 1][j];
-var north = distances[i][j - 1];
-var min;
-if (west < north)
-min = west < northWest ? west : northWest;
-else
-min = north < northWest ? north : northWest;
-if (min == northWest) {
-if (northWest == current) {
-edits.push(EDIT_LEAVE);
-} else {
-edits.push(EDIT_UPDATE);
-current = northWest;
-}
-i--;
-j--;
-} else if (min == west) {
-edits.push(EDIT_DELETE);
-i--;
-current = west;
-} else {
-edits.push(EDIT_ADD);
-j--;
-current = north;
-}
-}
-edits.reverse();
-return edits;
-},
-calcSplices: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {
-var prefixCount = 0;
-var suffixCount = 0;
-var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
-if (currentStart == 0 && oldStart == 0)
-prefixCount = this.sharedPrefix(current, old, minLength);
-if (currentEnd == current.length && oldEnd == old.length)
-suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
-currentStart += prefixCount;
-oldStart += prefixCount;
-currentEnd -= suffixCount;
-oldEnd -= suffixCount;
-if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)
-return [];
-if (currentStart == currentEnd) {
-var splice = newSplice(currentStart, [], 0);
-while (oldStart < oldEnd)
-splice.removed.push(old[oldStart++]);
-return [splice];
-} else if (oldStart == oldEnd)
-return [newSplice(currentStart, [], currentEnd - currentStart)];
-var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
-splice = undefined;
-var splices = [];
-var index = currentStart;
-var oldIndex = oldStart;
-for (var i = 0; i < ops.length; i++) {
-switch (ops[i]) {
-case EDIT_LEAVE:
-if (splice) {
-splices.push(splice);
-splice = undefined;
-}
-index++;
-oldIndex++;
-break;
-case EDIT_UPDATE:
-if (!splice)
-splice = newSplice(index, [], 0);
-splice.addedCount++;
-index++;
-splice.removed.push(old[oldIndex]);
-oldIndex++;
-break;
-case EDIT_ADD:
-if (!splice)
-splice = newSplice(index, [], 0);
-splice.addedCount++;
-index++;
-break;
-case EDIT_DELETE:
-if (!splice)
-splice = newSplice(index, [], 0);
-splice.removed.push(old[oldIndex]);
-oldIndex++;
-break;
-}
-}
-if (splice) {
-splices.push(splice);
-}
-return splices;
-},
-sharedPrefix: function (current, old, searchLength) {
-for (var i = 0; i < searchLength; i++)
-if (!this.equals(current[i], old[i]))
-return i;
-return searchLength;
-},
-sharedSuffix: function (current, old, searchLength) {
-var index1 = current.length;
-var index2 = old.length;
-var count = 0;
-while (count < searchLength && this.equals(current[--index1], old[--index2]))
-count++;
-return count;
-},
-calculateSplices: function (current, previous) {
-return this.calcSplices(current, 0, current.length, previous, 0, previous.length);
-},
-equals: function (currentValue, previousValue) {
-return currentValue === previousValue;
-}
-};
-return new ArraySplice();
-}();Polymer.domInnerHTML = function () {
-var escapeAttrRegExp = /[&\u00A0"]/g;
-var escapeDataRegExp = /[&\u00A0<>]/g;
-function escapeReplace(c) {
-switch (c) {
-case '&':
-return '&amp;';
-case '<':
-return '&lt;';
-case '>':
-return '&gt;';
-case '"':
-return '&quot;';
-case '\xA0':
-return '&nbsp;';
-}
-}
-function escapeAttr(s) {
-return s.replace(escapeAttrRegExp, escapeReplace);
-}
-function escapeData(s) {
-return s.replace(escapeDataRegExp, escapeReplace);
-}
-function makeSet(arr) {
-var set = {};
-for (var i = 0; i < arr.length; i++) {
-set[arr[i]] = true;
-}
-return set;
-}
-var voidElements = makeSet([
-'area',
-'base',
-'br',
-'col',
-'command',
-'embed',
-'hr',
-'img',
-'input',
-'keygen',
-'link',
-'meta',
-'param',
-'source',
-'track',
-'wbr'
-]);
-var plaintextParents = makeSet([
-'style',
-'script',
-'xmp',
-'iframe',
-'noembed',
-'noframes',
-'plaintext',
-'noscript'
-]);
-function getOuterHTML(node, parentNode, composed) {
-switch (node.nodeType) {
-case Node.ELEMENT_NODE:
-var tagName = node.localName;
-var s = '<' + tagName;
-var attrs = node.attributes;
-for (var i = 0, attr; attr = attrs[i]; i++) {
-s += ' ' + attr.name + '="' + escapeAttr(attr.value) + '"';
-}
-s += '>';
-if (voidElements[tagName]) {
-return s;
-}
-return s + getInnerHTML(node, composed) + '</' + tagName + '>';
-case Node.TEXT_NODE:
-var data = node.data;
-if (parentNode && plaintextParents[parentNode.localName]) {
-return data;
-}
-return escapeData(data);
-case Node.COMMENT_NODE:
-return '<!--' + node.data + '-->';
-default:
-console.error(node);
-throw new Error('not implemented');
-}
-}
-function getInnerHTML(node, composed) {
-if (node instanceof HTMLTemplateElement)
-node = node.content;
-var s = '';
-var c$ = Polymer.dom(node).childNodes;
-for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {
-s += getOuterHTML(child, node, composed);
-}
-return s;
-}
-return { getInnerHTML: getInnerHTML };
-}();(function () {
-'use strict';
-var nativeInsertBefore = Element.prototype.insertBefore;
-var nativeAppendChild = Element.prototype.appendChild;
-var nativeRemoveChild = Element.prototype.removeChild;
-Polymer.TreeApi = {
-arrayCopyChildNodes: function (parent) {
-var copy = [], i = 0;
-for (var n = parent.firstChild; n; n = n.nextSibling) {
-copy[i++] = n;
-}
-return copy;
-},
-arrayCopyChildren: function (parent) {
-var copy = [], i = 0;
-for (var n = parent.firstElementChild; n; n = n.nextElementSibling) {
-copy[i++] = n;
-}
-return copy;
-},
-arrayCopy: function (a$) {
-var l = a$.length;
-var copy = new Array(l);
-for (var i = 0; i < l; i++) {
-copy[i] = a$[i];
-}
-return copy;
-}
-};
-Polymer.TreeApi.Logical = {
-hasParentNode: function (node) {
-return Boolean(node.__dom && node.__dom.parentNode);
-},
-hasChildNodes: function (node) {
-return Boolean(node.__dom && node.__dom.childNodes !== undefined);
-},
-getChildNodes: function (node) {
-return this.hasChildNodes(node) ? this._getChildNodes(node) : node.childNodes;
-},
-_getChildNodes: function (node) {
-if (!node.__dom.childNodes) {
-node.__dom.childNodes = [];
-for (var n = node.__dom.firstChild; n; n = n.__dom.nextSibling) {
-node.__dom.childNodes.push(n);
-}
-}
-return node.__dom.childNodes;
-},
-getParentNode: function (node) {
-return node.__dom && node.__dom.parentNode !== undefined ? node.__dom.parentNode : node.parentNode;
-},
-getFirstChild: function (node) {
-return node.__dom && node.__dom.firstChild !== undefined ? node.__dom.firstChild : node.firstChild;
-},
-getLastChild: function (node) {
-return node.__dom && node.__dom.lastChild !== undefined ? node.__dom.lastChild : node.lastChild;
-},
-getNextSibling: function (node) {
-return node.__dom && node.__dom.nextSibling !== undefined ? node.__dom.nextSibling : node.nextSibling;
-},
-getPreviousSibling: function (node) {
-return node.__dom && node.__dom.previousSibling !== undefined ? node.__dom.previousSibling : node.previousSibling;
-},
-getFirstElementChild: function (node) {
-return node.__dom && node.__dom.firstChild !== undefined ? this._getFirstElementChild(node) : node.firstElementChild;
-},
-_getFirstElementChild: function (node) {
-var n = node.__dom.firstChild;
-while (n && n.nodeType !== Node.ELEMENT_NODE) {
-n = n.__dom.nextSibling;
-}
-return n;
-},
-getLastElementChild: function (node) {
-return node.__dom && node.__dom.lastChild !== undefined ? this._getLastElementChild(node) : node.lastElementChild;
-},
-_getLastElementChild: function (node) {
-var n = node.__dom.lastChild;
-while (n && n.nodeType !== Node.ELEMENT_NODE) {
-n = n.__dom.previousSibling;
-}
-return n;
-},
-getNextElementSibling: function (node) {
-return node.__dom && node.__dom.nextSibling !== undefined ? this._getNextElementSibling(node) : node.nextElementSibling;
-},
-_getNextElementSibling: function (node) {
-var n = node.__dom.nextSibling;
-while (n && n.nodeType !== Node.ELEMENT_NODE) {
-n = n.__dom.nextSibling;
-}
-return n;
-},
-getPreviousElementSibling: function (node) {
-return node.__dom && node.__dom.previousSibling !== undefined ? this._getPreviousElementSibling(node) : node.previousElementSibling;
-},
-_getPreviousElementSibling: function (node) {
-var n = node.__dom.previousSibling;
-while (n && n.nodeType !== Node.ELEMENT_NODE) {
-n = n.__dom.previousSibling;
-}
-return n;
-},
-saveChildNodes: function (node) {
-if (!this.hasChildNodes(node)) {
-node.__dom = node.__dom || {};
-node.__dom.firstChild = node.firstChild;
-node.__dom.lastChild = node.lastChild;
-node.__dom.childNodes = [];
-for (var n = node.firstChild; n; n = n.nextSibling) {
-n.__dom = n.__dom || {};
-n.__dom.parentNode = node;
-node.__dom.childNodes.push(n);
-n.__dom.nextSibling = n.nextSibling;
-n.__dom.previousSibling = n.previousSibling;
-}
-}
-},
-recordInsertBefore: function (node, container, ref_node) {
-container.__dom.childNodes = null;
-if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
-for (var n = node.firstChild; n; n = n.nextSibling) {
-this._linkNode(n, container, ref_node);
-}
-} else {
-this._linkNode(node, container, ref_node);
-}
-},
-_linkNode: function (node, container, ref_node) {
-node.__dom = node.__dom || {};
-container.__dom = container.__dom || {};
-if (ref_node) {
-ref_node.__dom = ref_node.__dom || {};
-}
-node.__dom.previousSibling = ref_node ? ref_node.__dom.previousSibling : container.__dom.lastChild;
-if (node.__dom.previousSibling) {
-node.__dom.previousSibling.__dom.nextSibling = node;
-}
-node.__dom.nextSibling = ref_node || null;
-if (node.__dom.nextSibling) {
-node.__dom.nextSibling.__dom.previousSibling = node;
-}
-node.__dom.parentNode = container;
-if (ref_node) {
-if (ref_node === container.__dom.firstChild) {
-container.__dom.firstChild = node;
-}
-} else {
-container.__dom.lastChild = node;
-if (!container.__dom.firstChild) {
-container.__dom.firstChild = node;
-}
-}
-container.__dom.childNodes = null;
-},
-recordRemoveChild: function (node, container) {
-node.__dom = node.__dom || {};
-container.__dom = container.__dom || {};
-if (node === container.__dom.firstChild) {
-container.__dom.firstChild = node.__dom.nextSibling;
-}
-if (node === container.__dom.lastChild) {
-container.__dom.lastChild = node.__dom.previousSibling;
-}
-var p = node.__dom.previousSibling;
-var n = node.__dom.nextSibling;
-if (p) {
-p.__dom.nextSibling = n;
-}
-if (n) {
-n.__dom.previousSibling = p;
-}
-node.__dom.parentNode = node.__dom.previousSibling = node.__dom.nextSibling = undefined;
-container.__dom.childNodes = null;
-}
-};
-Polymer.TreeApi.Composed = {
-getChildNodes: function (node) {
-return Polymer.TreeApi.arrayCopyChildNodes(node);
-},
-getParentNode: function (node) {
-return node.parentNode;
-},
-clearChildNodes: function (node) {
-node.textContent = '';
-},
-insertBefore: function (parentNode, newChild, refChild) {
-return nativeInsertBefore.call(parentNode, newChild, refChild || null);
-},
-appendChild: function (parentNode, newChild) {
-return nativeAppendChild.call(parentNode, newChild);
-},
-removeChild: function (parentNode, node) {
-return nativeRemoveChild.call(parentNode, node);
-}
-};
-}());Polymer.DomApi = function () {
-'use strict';
-var Settings = Polymer.Settings;
-var TreeApi = Polymer.TreeApi;
-var DomApi = function (node) {
-this.node = needsToWrap ? DomApi.wrap(node) : node;
-};
-var needsToWrap = Settings.hasShadow && !Settings.nativeShadow;
-DomApi.wrap = window.wrap ? window.wrap : function (node) {
-return node;
-};
-DomApi.prototype = {
-flush: function () {
-Polymer.dom.flush();
-},
-deepContains: function (node) {
-if (this.node.contains(node)) {
-return true;
-}
-var n = node;
-var doc = node.ownerDocument;
-while (n && n !== doc && n !== this.node) {
-n = Polymer.dom(n).parentNode || n.host;
-}
-return n === this.node;
-},
-queryDistributedElements: function (selector) {
-var c$ = this.getEffectiveChildNodes();
-var list = [];
-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
-if (c.nodeType === Node.ELEMENT_NODE && DomApi.matchesSelector.call(c, selector)) {
-list.push(c);
-}
-}
-return list;
-},
-getEffectiveChildNodes: function () {
-var list = [];
-var c$ = this.childNodes;
-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
-if (c.localName === CONTENT) {
-var d$ = dom(c).getDistributedNodes();
-for (var j = 0; j < d$.length; j++) {
-list.push(d$[j]);
-}
-} else {
-list.push(c);
-}
-}
-return list;
-},
-observeNodes: function (callback) {
-if (callback) {
-if (!this.observer) {
-this.observer = this.node.localName === CONTENT ? new DomApi.DistributedNodesObserver(this) : new DomApi.EffectiveNodesObserver(this);
-}
-return this.observer.addListener(callback);
-}
-},
-unobserveNodes: function (handle) {
-if (this.observer) {
-this.observer.removeListener(handle);
-}
-},
-notifyObserver: function () {
-if (this.observer) {
-this.observer.notify();
-}
-},
-_query: function (matcher, node, halter) {
-node = node || this.node;
-var list = [];
-this._queryElements(TreeApi.Logical.getChildNodes(node), matcher, halter, list);
-return list;
-},
-_queryElements: function (elements, matcher, halter, list) {
-for (var i = 0, l = elements.length, c; i < l && (c = elements[i]); i++) {
-if (c.nodeType === Node.ELEMENT_NODE) {
-if (this._queryElement(c, matcher, halter, list)) {
-return true;
-}
-}
-}
-},
-_queryElement: function (node, matcher, halter, list) {
-var result = matcher(node);
-if (result) {
-list.push(node);
-}
-if (halter && halter(result)) {
-return result;
-}
-this._queryElements(TreeApi.Logical.getChildNodes(node), matcher, halter, list);
-}
-};
-var CONTENT = DomApi.CONTENT = 'content';
-var dom = DomApi.factory = function (node) {
-node = node || document;
-if (!node.__domApi) {
-node.__domApi = new DomApi.ctor(node);
-}
-return node.__domApi;
-};
-DomApi.hasApi = function (node) {
-return Boolean(node.__domApi);
-};
-DomApi.ctor = DomApi;
-Polymer.dom = function (obj, patch) {
-if (obj instanceof Event) {
-return Polymer.EventApi.factory(obj);
-} else {
-return DomApi.factory(obj, patch);
-}
-};
-var p = Element.prototype;
-DomApi.matchesSelector = p.matches || p.matchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector || p.webkitMatchesSelector;
-return DomApi;
-}();(function () {
-'use strict';
-var Settings = Polymer.Settings;
-var DomApi = Polymer.DomApi;
-var dom = DomApi.factory;
-var TreeApi = Polymer.TreeApi;
-var getInnerHTML = Polymer.domInnerHTML.getInnerHTML;
-var CONTENT = DomApi.CONTENT;
-if (Settings.useShadow) {
-return;
-}
-var nativeCloneNode = Element.prototype.cloneNode;
-var nativeImportNode = Document.prototype.importNode;
-Polymer.Base.extend(DomApi.prototype, {
-_lazyDistribute: function (host) {
-if (host.shadyRoot && host.shadyRoot._distributionClean) {
-host.shadyRoot._distributionClean = false;
-Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
-}
-},
-appendChild: function (node) {
-return this.insertBefore(node);
-},
-insertBefore: function (node, ref_node) {
-if (ref_node && TreeApi.Logical.getParentNode(ref_node) !== this.node) {
-throw Error('The ref_node to be inserted before is not a child ' + 'of this node');
-}
-if (node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {
-var parent = TreeApi.Logical.getParentNode(node);
-if (parent) {
-if (DomApi.hasApi(parent)) {
-dom(parent).notifyObserver();
-}
-this._removeNode(node);
-} else {
-this._removeOwnerShadyRoot(node);
-}
-}
-if (!this._addNode(node, ref_node)) {
-if (ref_node) {
-ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
-}
-var container = this.node._isShadyRoot ? this.node.host : this.node;
-if (ref_node) {
-TreeApi.Composed.insertBefore(container, node, ref_node);
-} else {
-TreeApi.Composed.appendChild(container, node);
-}
-}
-this.notifyObserver();
-return node;
-},
-_addNode: function (node, ref_node) {
-var root = this.getOwnerRoot();
-if (root) {
-var ipAdded = this._maybeAddInsertionPoint(node, this.node);
-if (!root._invalidInsertionPoints) {
-root._invalidInsertionPoints = ipAdded;
-}
-this._addNodeToHost(root.host, node);
-}
-if (TreeApi.Logical.hasChildNodes(this.node)) {
-TreeApi.Logical.recordInsertBefore(node, this.node, ref_node);
-}
-var handled = this._maybeDistribute(node) || this.node.shadyRoot;
-if (handled) {
-if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
-while (node.firstChild) {
-TreeApi.Composed.removeChild(node, node.firstChild);
-}
-} else {
-var parent = TreeApi.Composed.getParentNode(node);
-if (parent) {
-TreeApi.Composed.removeChild(parent, node);
-}
-}
-}
-return handled;
-},
-removeChild: function (node) {
-if (TreeApi.Logical.getParentNode(node) !== this.node) {
-throw Error('The node to be removed is not a child of this node: ' + node);
-}
-if (!this._removeNode(node)) {
-var container = this.node._isShadyRoot ? this.node.host : this.node;
-var parent = TreeApi.Composed.getParentNode(node);
-if (container === parent) {
-TreeApi.Composed.removeChild(container, node);
-}
-}
-this.notifyObserver();
-return node;
-},
-_removeNode: function (node) {
-var logicalParent = TreeApi.Logical.hasParentNode(node) && TreeApi.Logical.getParentNode(node);
-var distributed;
-var root = this._ownerShadyRootForNode(node);
-if (logicalParent) {
-distributed = dom(node)._maybeDistributeParent();
-TreeApi.Logical.recordRemoveChild(node, logicalParent);
-if (root && this._removeDistributedChildren(root, node)) {
-root._invalidInsertionPoints = true;
-this._lazyDistribute(root.host);
-}
-}
-this._removeOwnerShadyRoot(node);
-if (root) {
-this._removeNodeFromHost(root.host, node);
-}
-return distributed;
-},
-replaceChild: function (node, ref_node) {
-this.insertBefore(node, ref_node);
-this.removeChild(ref_node);
-return node;
-},
-_hasCachedOwnerRoot: function (node) {
-return Boolean(node._ownerShadyRoot !== undefined);
-},
-getOwnerRoot: function () {
-return this._ownerShadyRootForNode(this.node);
-},
-_ownerShadyRootForNode: function (node) {
-if (!node) {
-return;
-}
-var root = node._ownerShadyRoot;
-if (root === undefined) {
-if (node._isShadyRoot) {
-root = node;
-} else {
-var parent = TreeApi.Logical.getParentNode(node);
-if (parent) {
-root = parent._isShadyRoot ? parent : this._ownerShadyRootForNode(parent);
-} else {
-root = null;
-}
-}
-if (root || document.documentElement.contains(node)) {
-node._ownerShadyRoot = root;
-}
-}
-return root;
-},
-_maybeDistribute: function (node) {
-var fragContent = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent && dom(node).querySelector(CONTENT);
-var wrappedContent = fragContent && TreeApi.Logical.getParentNode(fragContent).nodeType !== Node.DOCUMENT_FRAGMENT_NODE;
-var hasContent = fragContent || node.localName === CONTENT;
-if (hasContent) {
-var root = this.getOwnerRoot();
-if (root) {
-this._lazyDistribute(root.host);
-}
-}
-var needsDist = this._nodeNeedsDistribution(this.node);
-if (needsDist) {
-this._lazyDistribute(this.node);
-}
-return needsDist || hasContent && !wrappedContent;
-},
-_maybeAddInsertionPoint: function (node, parent) {
-var added;
-if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent) {
-var c$ = dom(node).querySelectorAll(CONTENT);
-for (var i = 0, n, np, na; i < c$.length && (n = c$[i]); i++) {
-np = TreeApi.Logical.getParentNode(n);
-if (np === node) {
-np = parent;
-}
-na = this._maybeAddInsertionPoint(n, np);
-added = added || na;
-}
-} else if (node.localName === CONTENT) {
-TreeApi.Logical.saveChildNodes(parent);
-TreeApi.Logical.saveChildNodes(node);
-added = true;
-}
-return added;
-},
-_updateInsertionPoints: function (host) {
-var i$ = host.shadyRoot._insertionPoints = dom(host.shadyRoot).querySelectorAll(CONTENT);
-for (var i = 0, c; i < i$.length; i++) {
-c = i$[i];
-TreeApi.Logical.saveChildNodes(c);
-TreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c));
-}
-},
-_nodeNeedsDistribution: function (node) {
-return node && node.shadyRoot && DomApi.hasInsertionPoint(node.shadyRoot);
-},
-_addNodeToHost: function (host, node) {
-if (host._elementAdd) {
-host._elementAdd(node);
-}
-},
-_removeNodeFromHost: function (host, node) {
-if (host._elementRemove) {
-host._elementRemove(node);
-}
-},
-_removeDistributedChildren: function (root, container) {
-var hostNeedsDist;
-var ip$ = root._insertionPoints;
-for (var i = 0; i < ip$.length; i++) {
-var content = ip$[i];
-if (this._contains(container, content)) {
-var dc$ = dom(content).getDistributedNodes();
-for (var j = 0; j < dc$.length; j++) {
-hostNeedsDist = true;
-var node = dc$[j];
-var parent = TreeApi.Composed.getParentNode(node);
-if (parent) {
-TreeApi.Composed.removeChild(parent, node);
-}
-}
-}
-}
-return hostNeedsDist;
-},
-_contains: function (container, node) {
-while (node) {
-if (node == container) {
-return true;
-}
-node = TreeApi.Logical.getParentNode(node);
-}
-},
-_removeOwnerShadyRoot: function (node) {
-if (this._hasCachedOwnerRoot(node)) {
-var c$ = TreeApi.Logical.getChildNodes(node);
-for (var i = 0, l = c$.length, n; i < l && (n = c$[i]); i++) {
-this._removeOwnerShadyRoot(n);
-}
-}
-node._ownerShadyRoot = undefined;
-},
-_firstComposedNode: function (content) {
-var n$ = dom(content).getDistributedNodes();
-for (var i = 0, l = n$.length, n, p$; i < l && (n = n$[i]); i++) {
-p$ = dom(n).getDestinationInsertionPoints();
-if (p$[p$.length - 1] === content) {
-return n;
-}
-}
-},
-querySelector: function (selector) {
-var result = this._query(function (n) {
-return DomApi.matchesSelector.call(n, selector);
-}, this.node, function (n) {
-return Boolean(n);
-})[0];
-return result || null;
-},
-querySelectorAll: function (selector) {
-return this._query(function (n) {
-return DomApi.matchesSelector.call(n, selector);
-}, this.node);
-},
-getDestinationInsertionPoints: function () {
-return this.node._destinationInsertionPoints || [];
-},
-getDistributedNodes: function () {
-return this.node._distributedNodes || [];
-},
-_clear: function () {
-while (this.childNodes.length) {
-this.removeChild(this.childNodes[0]);
-}
-},
-setAttribute: function (name, value) {
-this.node.setAttribute(name, value);
-this._maybeDistributeParent();
-},
-removeAttribute: function (name) {
-this.node.removeAttribute(name);
-this._maybeDistributeParent();
-},
-_maybeDistributeParent: function () {
-if (this._nodeNeedsDistribution(this.parentNode)) {
-this._lazyDistribute(this.parentNode);
-return true;
-}
-},
-cloneNode: function (deep) {
-var n = nativeCloneNode.call(this.node, false);
-if (deep) {
-var c$ = this.childNodes;
-var d = dom(n);
-for (var i = 0, nc; i < c$.length; i++) {
-nc = dom(c$[i]).cloneNode(true);
-d.appendChild(nc);
-}
-}
-return n;
-},
-importNode: function (externalNode, deep) {
-var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;
-var n = nativeImportNode.call(doc, externalNode, false);
-if (deep) {
-var c$ = TreeApi.Logical.getChildNodes(externalNode);
-var d = dom(n);
-for (var i = 0, nc; i < c$.length; i++) {
-nc = dom(doc).importNode(c$[i], true);
-d.appendChild(nc);
-}
-}
-return n;
-},
-_getComposedInnerHTML: function () {
-return getInnerHTML(this.node, true);
-}
-});
-Object.defineProperties(DomApi.prototype, {
-activeElement: {
-get: function () {
-var active = document.activeElement;
-if (!active) {
-return null;
-}
-var isShadyRoot = !!this.node._isShadyRoot;
-if (this.node !== document) {
-if (!isShadyRoot) {
-return null;
-}
-if (this.node.host === active || !this.node.host.contains(active)) {
-return null;
-}
-}
-var activeRoot = dom(active).getOwnerRoot();
-while (activeRoot && activeRoot !== this.node) {
-active = activeRoot.host;
-activeRoot = dom(active).getOwnerRoot();
-}
-if (this.node === document) {
-return activeRoot ? null : active;
-} else {
-return activeRoot === this.node ? active : null;
-}
-},
-configurable: true
-},
-childNodes: {
-get: function () {
-var c$ = TreeApi.Logical.getChildNodes(this.node);
-return Array.isArray(c$) ? c$ : TreeApi.arrayCopyChildNodes(this.node);
-},
-configurable: true
-},
-children: {
-get: function () {
-if (TreeApi.Logical.hasChildNodes(this.node)) {
-return Array.prototype.filter.call(this.childNodes, function (n) {
-return n.nodeType === Node.ELEMENT_NODE;
-});
-} else {
-return TreeApi.arrayCopyChildren(this.node);
-}
-},
-configurable: true
-},
-parentNode: {
-get: function () {
-return TreeApi.Logical.getParentNode(this.node);
-},
-configurable: true
-},
-firstChild: {
-get: function () {
-return TreeApi.Logical.getFirstChild(this.node);
-},
-configurable: true
-},
-lastChild: {
-get: function () {
-return TreeApi.Logical.getLastChild(this.node);
-},
-configurable: true
-},
-nextSibling: {
-get: function () {
-return TreeApi.Logical.getNextSibling(this.node);
-},
-configurable: true
-},
-previousSibling: {
-get: function () {
-return TreeApi.Logical.getPreviousSibling(this.node);
-},
-configurable: true
-},
-firstElementChild: {
-get: function () {
-return TreeApi.Logical.getFirstElementChild(this.node);
-},
-configurable: true
-},
-lastElementChild: {
-get: function () {
-return TreeApi.Logical.getLastElementChild(this.node);
-},
-configurable: true
-},
-nextElementSibling: {
-get: function () {
-return TreeApi.Logical.getNextElementSibling(this.node);
-},
-configurable: true
-},
-previousElementSibling: {
-get: function () {
-return TreeApi.Logical.getPreviousElementSibling(this.node);
-},
-configurable: true
-},
-textContent: {
-get: function () {
-var nt = this.node.nodeType;
-if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
-return this.node.textContent;
-} else {
-var tc = [];
-for (var i = 0, cn = this.childNodes, c; c = cn[i]; i++) {
-if (c.nodeType !== Node.COMMENT_NODE) {
-tc.push(c.textContent);
-}
-}
-return tc.join('');
-}
-},
-set: function (text) {
-var nt = this.node.nodeType;
-if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
-this.node.textContent = text;
-} else {
-this._clear();
-if (text) {
-this.appendChild(document.createTextNode(text));
-}
-}
-},
-configurable: true
-},
-innerHTML: {
-get: function () {
-var nt = this.node.nodeType;
-if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
-return null;
-} else {
-return getInnerHTML(this.node);
-}
-},
-set: function (text) {
-var nt = this.node.nodeType;
-if (nt !== Node.TEXT_NODE || nt !== Node.COMMENT_NODE) {
-this._clear();
-var d = document.createElement('div');
-d.innerHTML = text;
-var c$ = TreeApi.arrayCopyChildNodes(d);
-for (var i = 0; i < c$.length; i++) {
-this.appendChild(c$[i]);
-}
-}
-},
-configurable: true
-}
-});
-DomApi.hasInsertionPoint = function (root) {
-return Boolean(root && root._insertionPoints.length);
-};
-}());(function () {
-'use strict';
-var Settings = Polymer.Settings;
-var TreeApi = Polymer.TreeApi;
-var DomApi = Polymer.DomApi;
-if (!Settings.useShadow) {
-return;
-}
-Polymer.Base.extend(DomApi.prototype, {
-querySelectorAll: function (selector) {
-return TreeApi.arrayCopy(this.node.querySelectorAll(selector));
-},
-getOwnerRoot: function () {
-var n = this.node;
-while (n) {
-if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.host) {
-return n;
-}
-n = n.parentNode;
-}
-},
-importNode: function (externalNode, deep) {
-var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;
-return doc.importNode(externalNode, deep);
-},
-getDestinationInsertionPoints: function () {
-var n$ = this.node.getDestinationInsertionPoints && this.node.getDestinationInsertionPoints();
-return n$ ? TreeApi.arrayCopy(n$) : [];
-},
-getDistributedNodes: function () {
-var n$ = this.node.getDistributedNodes && this.node.getDistributedNodes();
-return n$ ? TreeApi.arrayCopy(n$) : [];
-}
-});
-Object.defineProperties(DomApi.prototype, {
-activeElement: {
-get: function () {
-var node = DomApi.wrap(this.node);
-var activeElement = node.activeElement;
-return node.contains(activeElement) ? activeElement : null;
-},
-configurable: true
-},
-childNodes: {
-get: function () {
-return TreeApi.arrayCopyChildNodes(this.node);
-},
-configurable: true
-},
-children: {
-get: function () {
-return TreeApi.arrayCopyChildren(this.node);
-},
-configurable: true
-},
-textContent: {
-get: function () {
-return this.node.textContent;
-},
-set: function (value) {
-return this.node.textContent = value;
-},
-configurable: true
-},
-innerHTML: {
-get: function () {
-return this.node.innerHTML;
-},
-set: function (value) {
-return this.node.innerHTML = value;
-},
-configurable: true
-}
-});
-var forwardMethods = function (m$) {
-for (var i = 0; i < m$.length; i++) {
-forwardMethod(m$[i]);
-}
-};
-var forwardMethod = function (method) {
-DomApi.prototype[method] = function () {
-return this.node[method].apply(this.node, arguments);
-};
-};
-forwardMethods([
-'cloneNode',
-'appendChild',
-'insertBefore',
-'removeChild',
-'replaceChild',
-'setAttribute',
-'removeAttribute',
-'querySelector'
-]);
-var forwardProperties = function (f$) {
-for (var i = 0; i < f$.length; i++) {
-forwardProperty(f$[i]);
-}
-};
-var forwardProperty = function (name) {
-Object.defineProperty(DomApi.prototype, name, {
-get: function () {
-return this.node[name];
-},
-configurable: true
-});
-};
-forwardProperties([
-'parentNode',
-'firstChild',
-'lastChild',
-'nextSibling',
-'previousSibling',
-'firstElementChild',
-'lastElementChild',
-'nextElementSibling',
-'previousElementSibling'
-]);
-}());Polymer.Base.extend(Polymer.dom, {
-_flushGuard: 0,
-_FLUSH_MAX: 100,
-_needsTakeRecords: !Polymer.Settings.useNativeCustomElements,
-_debouncers: [],
-_staticFlushList: [],
-_finishDebouncer: null,
-flush: function () {
-this._flushGuard = 0;
-this._prepareFlush();
-while (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) {
-while (this._debouncers.length) {
-this._debouncers.shift().complete();
-}
-if (this._finishDebouncer) {
-this._finishDebouncer.complete();
-}
-this._prepareFlush();
-this._flushGuard++;
-}
-if (this._flushGuard >= this._FLUSH_MAX) {
-console.warn('Polymer.dom.flush aborted. Flush may not be complete.');
-}
-},
-_prepareFlush: function () {
-if (this._needsTakeRecords) {
-CustomElements.takeRecords();
-}
-for (var i = 0; i < this._staticFlushList.length; i++) {
-this._staticFlushList[i]();
-}
-},
-addStaticFlush: function (fn) {
-this._staticFlushList.push(fn);
-},
-removeStaticFlush: function (fn) {
-var i = this._staticFlushList.indexOf(fn);
-if (i >= 0) {
-this._staticFlushList.splice(i, 1);
-}
-},
-addDebouncer: function (debouncer) {
-this._debouncers.push(debouncer);
-this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush);
-},
-_finishFlush: function () {
-Polymer.dom._debouncers = [];
-}
-});Polymer.EventApi = function () {
-'use strict';
-var DomApi = Polymer.DomApi.ctor;
-var Settings = Polymer.Settings;
-DomApi.Event = function (event) {
-this.event = event;
-};
-if (Settings.useShadow) {
-DomApi.Event.prototype = {
-get rootTarget() {
-return this.event.path[0];
-},
-get localTarget() {
-return this.event.target;
-},
-get path() {
-var path = this.event.path;
-if (!Array.isArray(path)) {
-path = Array.prototype.slice.call(path);
-}
-return path;
-}
-};
-} else {
-DomApi.Event.prototype = {
-get rootTarget() {
-return this.event.target;
-},
-get localTarget() {
-var current = this.event.currentTarget;
-var currentRoot = current && Polymer.dom(current).getOwnerRoot();
-var p$ = this.path;
-for (var i = 0; i < p$.length; i++) {
-if (Polymer.dom(p$[i]).getOwnerRoot() === currentRoot) {
-return p$[i];
-}
-}
-},
-get path() {
-if (!this.event._path) {
-var path = [];
-var current = this.rootTarget;
-while (current) {
-path.push(current);
-var insertionPoints = Polymer.dom(current).getDestinationInsertionPoints();
-if (insertionPoints.length) {
-for (var i = 0; i < insertionPoints.length - 1; i++) {
-path.push(insertionPoints[i]);
-}
-current = insertionPoints[insertionPoints.length - 1];
-} else {
-current = Polymer.dom(current).parentNode || current.host;
-}
-}
-path.push(window);
-this.event._path = path;
-}
-return this.event._path;
-}
-};
-}
-var factory = function (event) {
-if (!event.__eventApi) {
-event.__eventApi = new DomApi.Event(event);
-}
-return event.__eventApi;
-};
-return { factory: factory };
-}();(function () {
-'use strict';
-var DomApi = Polymer.DomApi.ctor;
-var useShadow = Polymer.Settings.useShadow;
-Object.defineProperty(DomApi.prototype, 'classList', {
-get: function () {
-if (!this._classList) {
-this._classList = new DomApi.ClassList(this);
-}
-return this._classList;
-},
-configurable: true
-});
-DomApi.ClassList = function (host) {
-this.domApi = host;
-this.node = host.node;
-};
-DomApi.ClassList.prototype = {
-add: function () {
-this.node.classList.add.apply(this.node.classList, arguments);
-this._distributeParent();
-},
-remove: function () {
-this.node.classList.remove.apply(this.node.classList, arguments);
-this._distributeParent();
-},
-toggle: function () {
-this.node.classList.toggle.apply(this.node.classList, arguments);
-this._distributeParent();
-},
-_distributeParent: function () {
-if (!useShadow) {
-this.domApi._maybeDistributeParent();
-}
-},
-contains: function () {
-return this.node.classList.contains.apply(this.node.classList, arguments);
-}
-};
-}());(function () {
-'use strict';
-var DomApi = Polymer.DomApi.ctor;
-var Settings = Polymer.Settings;
-DomApi.EffectiveNodesObserver = function (domApi) {
-this.domApi = domApi;
-this.node = this.domApi.node;
-this._listeners = [];
-};
-DomApi.EffectiveNodesObserver.prototype = {
-addListener: function (callback) {
-if (!this._isSetup) {
-this._setup();
-this._isSetup = true;
-}
-var listener = {
-fn: callback,
-_nodes: []
-};
-this._listeners.push(listener);
-this._scheduleNotify();
-return listener;
-},
-removeListener: function (handle) {
-var i = this._listeners.indexOf(handle);
-if (i >= 0) {
-this._listeners.splice(i, 1);
-handle._nodes = [];
-}
-if (!this._hasListeners()) {
-this._cleanup();
-this._isSetup = false;
-}
-},
-_setup: function () {
-this._observeContentElements(this.domApi.childNodes);
-},
-_cleanup: function () {
-this._unobserveContentElements(this.domApi.childNodes);
-},
-_hasListeners: function () {
-return Boolean(this._listeners.length);
-},
-_scheduleNotify: function () {
-if (this._debouncer) {
-this._debouncer.stop();
-}
-this._debouncer = Polymer.Debounce(this._debouncer, this._notify);
-this._debouncer.context = this;
-Polymer.dom.addDebouncer(this._debouncer);
-},
-notify: function () {
-if (this._hasListeners()) {
-this._scheduleNotify();
-}
-},
-_notify: function () {
-this._beforeCallListeners();
-this._callListeners();
-},
-_beforeCallListeners: function () {
-this._updateContentElements();
-},
-_updateContentElements: function () {
-this._observeContentElements(this.domApi.childNodes);
-},
-_observeContentElements: function (elements) {
-for (var i = 0, n; i < elements.length && (n = elements[i]); i++) {
-if (this._isContent(n)) {
-n.__observeNodesMap = n.__observeNodesMap || new WeakMap();
-if (!n.__observeNodesMap.has(this)) {
-n.__observeNodesMap.set(this, this._observeContent(n));
-}
-}
-}
-},
-_observeContent: function (content) {
-var self = this;
-var h = Polymer.dom(content).observeNodes(function () {
-self._scheduleNotify();
-});
-h._avoidChangeCalculation = true;
-return h;
-},
-_unobserveContentElements: function (elements) {
-for (var i = 0, n, h; i < elements.length && (n = elements[i]); i++) {
-if (this._isContent(n)) {
-h = n.__observeNodesMap.get(this);
-if (h) {
-Polymer.dom(n).unobserveNodes(h);
-n.__observeNodesMap.delete(this);
-}
-}
-}
-},
-_isContent: function (node) {
-return node.localName === 'content';
-},
-_callListeners: function () {
-var o$ = this._listeners;
-var nodes = this._getEffectiveNodes();
-for (var i = 0, o; i < o$.length && (o = o$[i]); i++) {
-var info = this._generateListenerInfo(o, nodes);
-if (info || o._alwaysNotify) {
-this._callListener(o, info);
-}
-}
-},
-_getEffectiveNodes: function () {
-return this.domApi.getEffectiveChildNodes();
-},
-_generateListenerInfo: function (listener, newNodes) {
-if (listener._avoidChangeCalculation) {
-return true;
-}
-var oldNodes = listener._nodes;
-var info = {
-target: this.node,
-addedNodes: [],
-removedNodes: []
-};
-var splices = Polymer.ArraySplice.calculateSplices(newNodes, oldNodes);
-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
-for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {
-info.removedNodes.push(n);
-}
-}
-for (i = 0, s; i < splices.length && (s = splices[i]); i++) {
-for (j = s.index; j < s.index + s.addedCount; j++) {
-info.addedNodes.push(newNodes[j]);
-}
-}
-listener._nodes = newNodes;
-if (info.addedNodes.length || info.removedNodes.length) {
-return info;
-}
-},
-_callListener: function (listener, info) {
-return listener.fn.call(this.node, info);
-},
-enableShadowAttributeTracking: function () {
-}
-};
-if (Settings.useShadow) {
-var baseSetup = DomApi.EffectiveNodesObserver.prototype._setup;
-var baseCleanup = DomApi.EffectiveNodesObserver.prototype._cleanup;
-Polymer.Base.extend(DomApi.EffectiveNodesObserver.prototype, {
-_setup: function () {
-if (!this._observer) {
-var self = this;
-this._mutationHandler = function (mxns) {
-if (mxns && mxns.length) {
-self._scheduleNotify();
-}
-};
-this._observer = new MutationObserver(this._mutationHandler);
-this._boundFlush = function () {
-self._flush();
-};
-Polymer.dom.addStaticFlush(this._boundFlush);
-this._observer.observe(this.node, { childList: true });
-}
-baseSetup.call(this);
-},
-_cleanup: function () {
-this._observer.disconnect();
-this._observer = null;
-this._mutationHandler = null;
-Polymer.dom.removeStaticFlush(this._boundFlush);
-baseCleanup.call(this);
-},
-_flush: function () {
-if (this._observer) {
-this._mutationHandler(this._observer.takeRecords());
-}
-},
-enableShadowAttributeTracking: function () {
-if (this._observer) {
-this._makeContentListenersAlwaysNotify();
-this._observer.disconnect();
-this._observer.observe(this.node, {
-childList: true,
-attributes: true,
-subtree: true
-});
-var root = this.domApi.getOwnerRoot();
-var host = root && root.host;
-if (host && Polymer.dom(host).observer) {
-Polymer.dom(host).observer.enableShadowAttributeTracking();
-}
-}
-},
-_makeContentListenersAlwaysNotify: function () {
-for (var i = 0, h; i < this._listeners.length; i++) {
-h = this._listeners[i];
-h._alwaysNotify = h._isContentListener;
-}
-}
-});
-}
-}());(function () {
-'use strict';
-var DomApi = Polymer.DomApi.ctor;
-var Settings = Polymer.Settings;
-DomApi.DistributedNodesObserver = function (domApi) {
-DomApi.EffectiveNodesObserver.call(this, domApi);
-};
-DomApi.DistributedNodesObserver.prototype = Object.create(DomApi.EffectiveNodesObserver.prototype);
-Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype, {
-_setup: function () {
-},
-_cleanup: function () {
-},
-_beforeCallListeners: function () {
-},
-_getEffectiveNodes: function () {
-return this.domApi.getDistributedNodes();
-}
-});
-if (Settings.useShadow) {
-Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype, {
-_setup: function () {
-if (!this._observer) {
-var root = this.domApi.getOwnerRoot();
-var host = root && root.host;
-if (host) {
-var self = this;
-this._observer = Polymer.dom(host).observeNodes(function () {
-self._scheduleNotify();
-});
-this._observer._isContentListener = true;
-if (this._hasAttrSelect()) {
-Polymer.dom(host).observer.enableShadowAttributeTracking();
-}
-}
-}
-},
-_hasAttrSelect: function () {
-var select = this.node.getAttribute('select');
-return select && select.match(/[[.]+/);
-},
-_cleanup: function () {
-var root = this.domApi.getOwnerRoot();
-var host = root && root.host;
-if (host) {
-Polymer.dom(host).unobserveNodes(this._observer);
-}
-this._observer = null;
-}
-});
-}
-}());(function () {
-var DomApi = Polymer.DomApi;
-var TreeApi = Polymer.TreeApi;
-Polymer.Base._addFeature({
-_prepShady: function () {
-this._useContent = this._useContent || Boolean(this._template);
-},
-_setupShady: function () {
-this.shadyRoot = null;
-if (!this.__domApi) {
-this.__domApi = null;
-}
-if (!this.__dom) {
-this.__dom = null;
-}
-if (!this._ownerShadyRoot) {
-this._ownerShadyRoot = undefined;
-}
-},
-_poolContent: function () {
-if (this._useContent) {
-TreeApi.Logical.saveChildNodes(this);
-}
-},
-_setupRoot: function () {
-if (this._useContent) {
-this._createLocalRoot();
-if (!this.dataHost) {
-upgradeLogicalChildren(TreeApi.Logical.getChildNodes(this));
-}
-}
-},
-_createLocalRoot: function () {
-this.shadyRoot = this.root;
-this.shadyRoot._distributionClean = false;
-this.shadyRoot._hasDistributed = false;
-this.shadyRoot._isShadyRoot = true;
-this.shadyRoot._dirtyRoots = [];
-var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
-TreeApi.Logical.saveChildNodes(this.shadyRoot);
-for (var i = 0, c; i < i$.length; i++) {
-c = i$[i];
-TreeApi.Logical.saveChildNodes(c);
-TreeApi.Logical.saveChildNodes(c.parentNode);
-}
-this.shadyRoot.host = this;
-},
-get domHost() {
-var root = Polymer.dom(this).getOwnerRoot();
-return root && root.host;
-},
-distributeContent: function (updateInsertionPoints) {
-if (this.shadyRoot) {
-this.shadyRoot._invalidInsertionPoints = this.shadyRoot._invalidInsertionPoints || updateInsertionPoints;
-var host = getTopDistributingHost(this);
-Polymer.dom(this)._lazyDistribute(host);
-}
-},
-_distributeContent: function () {
-if (this._useContent && !this.shadyRoot._distributionClean) {
-if (this.shadyRoot._invalidInsertionPoints) {
-Polymer.dom(this)._updateInsertionPoints(this);
-this.shadyRoot._invalidInsertionPoints = false;
-}
-this._beginDistribute();
-this._distributeDirtyRoots();
-this._finishDistribute();
-}
-},
-_beginDistribute: function () {
-if (this._useContent && DomApi.hasInsertionPoint(this.shadyRoot)) {
-this._resetDistribution();
-this._distributePool(this.shadyRoot, this._collectPool());
-}
-},
-_distributeDirtyRoots: function () {
-var c$ = this.shadyRoot._dirtyRoots;
-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
-c._distributeContent();
-}
-this.shadyRoot._dirtyRoots = [];
-},
-_finishDistribute: function () {
-if (this._useContent) {
-this.shadyRoot._distributionClean = true;
-if (DomApi.hasInsertionPoint(this.shadyRoot)) {
-this._composeTree();
-notifyContentObservers(this.shadyRoot);
-} else {
-if (!this.shadyRoot._hasDistributed) {
-TreeApi.Composed.clearChildNodes(this);
-this.appendChild(this.shadyRoot);
-} else {
-var children = this._composeNode(this);
-this._updateChildNodes(this, children);
-}
-}
-if (!this.shadyRoot._hasDistributed) {
-notifyInitialDistribution(this);
-}
-this.shadyRoot._hasDistributed = true;
-}
-},
-elementMatches: function (selector, node) {
-node = node || this;
-return DomApi.matchesSelector.call(node, selector);
-},
-_resetDistribution: function () {
-var children = TreeApi.Logical.getChildNodes(this);
-for (var i = 0; i < children.length; i++) {
-var child = children[i];
-if (child._destinationInsertionPoints) {
-child._destinationInsertionPoints = undefined;
-}
-if (isInsertionPoint(child)) {
-clearDistributedDestinationInsertionPoints(child);
-}
-}
-var root = this.shadyRoot;
-var p$ = root._insertionPoints;
-for (var j = 0; j < p$.length; j++) {
-p$[j]._distributedNodes = [];
-}
-},
-_collectPool: function () {
-var pool = [];
-var children = TreeApi.Logical.getChildNodes(this);
-for (var i = 0; i < children.length; i++) {
-var child = children[i];
-if (isInsertionPoint(child)) {
-pool.push.apply(pool, child._distributedNodes);
-} else {
-pool.push(child);
-}
-}
-return pool;
-},
-_distributePool: function (node, pool) {
-var p$ = node._insertionPoints;
-for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {
-this._distributeInsertionPoint(p, pool);
-maybeRedistributeParent(p, this);
-}
-},
-_distributeInsertionPoint: function (content, pool) {
-var anyDistributed = false;
-for (var i = 0, l = pool.length, node; i < l; i++) {
-node = pool[i];
-if (!node) {
-continue;
-}
-if (this._matchesContentSelect(node, content)) {
-distributeNodeInto(node, content);
-pool[i] = undefined;
-anyDistributed = true;
-}
-}
-if (!anyDistributed) {
-var children = TreeApi.Logical.getChildNodes(content);
-for (var j = 0; j < children.length; j++) {
-distributeNodeInto(children[j], content);
-}
-}
-},
-_composeTree: function () {
-this._updateChildNodes(this, this._composeNode(this));
-var p$ = this.shadyRoot._insertionPoints;
-for (var i = 0, l = p$.length, p, parent; i < l && (p = p$[i]); i++) {
-parent = TreeApi.Logical.getParentNode(p);
-if (!parent._useContent && parent !== this && parent !== this.shadyRoot) {
-this._updateChildNodes(parent, this._composeNode(parent));
-}
-}
-},
-_composeNode: function (node) {
-var children = [];
-var c$ = TreeApi.Logical.getChildNodes(node.shadyRoot || node);
-for (var i = 0; i < c$.length; i++) {
-var child = c$[i];
-if (isInsertionPoint(child)) {
-var distributedNodes = child._distributedNodes;
-for (var j = 0; j < distributedNodes.length; j++) {
-var distributedNode = distributedNodes[j];
-if (isFinalDestination(child, distributedNode)) {
-children.push(distributedNode);
-}
-}
-} else {
-children.push(child);
-}
-}
-return children;
-},
-_updateChildNodes: function (container, children) {
-var composed = TreeApi.Composed.getChildNodes(container);
-var splices = Polymer.ArraySplice.calculateSplices(children, composed);
-for (var i = 0, d = 0, s; i < splices.length && (s = splices[i]); i++) {
-for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {
-if (TreeApi.Composed.getParentNode(n) === container) {
-TreeApi.Composed.removeChild(container, n);
-}
-composed.splice(s.index + d, 1);
-}
-d -= s.addedCount;
-}
-for (var i = 0, s, next; i < splices.length && (s = splices[i]); i++) {
-next = composed[s.index];
-for (j = s.index, n; j < s.index + s.addedCount; j++) {
-n = children[j];
-TreeApi.Composed.insertBefore(container, n, next);
-composed.splice(j, 0, n);
-}
-}
-},
-_matchesContentSelect: function (node, contentElement) {
-var select = contentElement.getAttribute('select');
-if (!select) {
-return true;
-}
-select = select.trim();
-if (!select) {
-return true;
-}
-if (!(node instanceof Element)) {
-return false;
-}
-var validSelectors = /^(:not\()?[*.#[a-zA-Z_|]/;
-if (!validSelectors.test(select)) {
-return false;
-}
-return this.elementMatches(select, node);
-},
-_elementAdd: function () {
-},
-_elementRemove: function () {
-}
-});
-function distributeNodeInto(child, insertionPoint) {
-insertionPoint._distributedNodes.push(child);
-var points = child._destinationInsertionPoints;
-if (!points) {
-child._destinationInsertionPoints = [insertionPoint];
-} else {
-points.push(insertionPoint);
-}
-}
-function clearDistributedDestinationInsertionPoints(content) {
-var e$ = content._distributedNodes;
-if (e$) {
-for (var i = 0; i < e$.length; i++) {
-var d = e$[i]._destinationInsertionPoints;
-if (d) {
-d.splice(d.indexOf(content) + 1, d.length);
-}
-}
-}
-}
-function maybeRedistributeParent(content, host) {
-var parent = TreeApi.Logical.getParentNode(content);
-if (parent && parent.shadyRoot && DomApi.hasInsertionPoint(parent.shadyRoot) && parent.shadyRoot._distributionClean) {
-parent.shadyRoot._distributionClean = false;
-host.shadyRoot._dirtyRoots.push(parent);
-}
-}
-function isFinalDestination(insertionPoint, node) {
-var points = node._destinationInsertionPoints;
-return points && points[points.length - 1] === insertionPoint;
-}
-function isInsertionPoint(node) {
-return node.localName == 'content';
-}
-function getTopDistributingHost(host) {
-while (host && hostNeedsRedistribution(host)) {
-host = host.domHost;
-}
-return host;
-}
-function hostNeedsRedistribution(host) {
-var c$ = TreeApi.Logical.getChildNodes(host);
-for (var i = 0, c; i < c$.length; i++) {
-c = c$[i];
-if (c.localName && c.localName === 'content') {
-return host.domHost;
-}
-}
-}
-function notifyContentObservers(root) {
-for (var i = 0, c; i < root._insertionPoints.length; i++) {
-c = root._insertionPoints[i];
-if (DomApi.hasApi(c)) {
-Polymer.dom(c).notifyObserver();
-}
-}
-}
-function notifyInitialDistribution(host) {
-if (DomApi.hasApi(host)) {
-Polymer.dom(host).notifyObserver();
-}
-}
-var needsUpgrade = window.CustomElements && !CustomElements.useNative;
-function upgradeLogicalChildren(children) {
-if (needsUpgrade && children) {
-for (var i = 0; i < children.length; i++) {
-CustomElements.upgrade(children[i]);
-}
-}
-}
-}());if (Polymer.Settings.useShadow) {
-Polymer.Base._addFeature({
-_poolContent: function () {
-},
-_beginDistribute: function () {
-},
-distributeContent: function () {
-},
-_distributeContent: function () {
-},
-_finishDistribute: function () {
-},
-_createLocalRoot: function () {
-this.createShadowRoot();
-this.shadowRoot.appendChild(this.root);
-this.root = this.shadowRoot;
-}
-});
-}Polymer.Async = {
-_currVal: 0,
-_lastVal: 0,
-_callbacks: [],
-_twiddleContent: 0,
-_twiddle: document.createTextNode(''),
-run: function (callback, waitTime) {
-if (waitTime > 0) {
-return ~setTimeout(callback, waitTime);
-} else {
-this._twiddle.textContent = this._twiddleContent++;
-this._callbacks.push(callback);
-return this._currVal++;
-}
-},
-cancel: function (handle) {
-if (handle < 0) {
-clearTimeout(~handle);
-} else {
-var idx = handle - this._lastVal;
-if (idx >= 0) {
-if (!this._callbacks[idx]) {
-throw 'invalid async handle: ' + handle;
-}
-this._callbacks[idx] = null;
-}
-}
-},
-_atEndOfMicrotask: function () {
-var len = this._callbacks.length;
-for (var i = 0; i < len; i++) {
-var cb = this._callbacks[i];
-if (cb) {
-try {
-cb();
-} catch (e) {
-i++;
-this._callbacks.splice(0, i);
-this._lastVal += i;
-this._twiddle.textContent = this._twiddleContent++;
-throw e;
-}
-}
-}
-this._callbacks.splice(0, len);
-this._lastVal += len;
-}
-};
-new window.MutationObserver(function () {
-Polymer.Async._atEndOfMicrotask();
-}).observe(Polymer.Async._twiddle, { characterData: true });Polymer.Debounce = function () {
-var Async = Polymer.Async;
-var Debouncer = function (context) {
-this.context = context;
-var self = this;
-this.boundComplete = function () {
-self.complete();
-};
-};
-Debouncer.prototype = {
-go: function (callback, wait) {
-var h;
-this.finish = function () {
-Async.cancel(h);
-};
-h = Async.run(this.boundComplete, wait);
-this.callback = callback;
-},
-stop: function () {
-if (this.finish) {
-this.finish();
-this.finish = null;
-this.callback = null;
-}
-},
-complete: function () {
-if (this.finish) {
-var callback = this.callback;
-this.stop();
-callback.call(this.context);
-}
-}
-};
-function debounce(debouncer, callback, wait) {
-if (debouncer) {
-debouncer.stop();
-} else {
-debouncer = new Debouncer(this);
-}
-debouncer.go(callback, wait);
-return debouncer;
-}
-return debounce;
-}();Polymer.Base._addFeature({
-_setupDebouncers: function () {
-this._debouncers = {};
-},
-debounce: function (jobName, callback, wait) {
-return this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
-},
-isDebouncerActive: function (jobName) {
-var debouncer = this._debouncers[jobName];
-return !!(debouncer && debouncer.finish);
-},
-flushDebouncer: function (jobName) {
-var debouncer = this._debouncers[jobName];
-if (debouncer) {
-debouncer.complete();
-}
-},
-cancelDebouncer: function (jobName) {
-var debouncer = this._debouncers[jobName];
-if (debouncer) {
-debouncer.stop();
-}
-}
-});Polymer.DomModule = document.createElement('dom-module');
-Polymer.Base._addFeature({
-_registerFeatures: function () {
-this._prepIs();
-this._prepBehaviors();
-this._prepConstructor();
-this._prepTemplate();
-this._prepShady();
-this._prepPropertyInfo();
-},
-_prepBehavior: function (b) {
-this._addHostAttributes(b.hostAttributes);
-},
-_initFeatures: function () {
-this._registerHost();
-if (this._template) {
-this._poolContent();
-this._beginHosting();
-this._stampTemplate();
-this._endHosting();
-}
-this._marshalHostAttributes();
-this._setupDebouncers();
-this._marshalBehaviors();
-this._tryReady();
-},
-_marshalBehavior: function (b) {
-}
-});</script>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer.html b/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer.html
deleted file mode 100644
index 3e158701bbb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/polymer/polymer.html
+++ /dev/null
@@ -1,5226 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
---><!--
-@license
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
---><link rel="import" href="polymer-mini.html">
-
-<script>Polymer.nar = [];
-Polymer.Annotations = {
-parseAnnotations: function (template) {
-var list = [];
-var content = template._content || template.content;
-this._parseNodeAnnotations(content, list, template.hasAttribute('strip-whitespace'));
-return list;
-},
-_parseNodeAnnotations: function (node, list, stripWhiteSpace) {
-return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list, stripWhiteSpace);
-},
-_bindingRegex: function () {
-var IDENT = '(?:' + '[a-zA-Z_$][\\w.:$\\-*]*' + ')';
-var NUMBER = '(?:' + '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?' + ')';
-var SQUOTE_STRING = '(?:' + '\'(?:[^\'\\\\]|\\\\.)*\'' + ')';
-var DQUOTE_STRING = '(?:' + '"(?:[^"\\\\]|\\\\.)*"' + ')';
-var STRING = '(?:' + SQUOTE_STRING + '|' + DQUOTE_STRING + ')';
-var ARGUMENT = '(?:' + IDENT + '|' + NUMBER + '|' + STRING + '\\s*' + ')';
-var ARGUMENTS = '(?:' + ARGUMENT + '(?:,\\s*' + ARGUMENT + ')*' + ')';
-var ARGUMENT_LIST = '(?:' + '\\(\\s*' + '(?:' + ARGUMENTS + '?' + ')' + '\\)\\s*' + ')';
-var BINDING = '(' + IDENT + '\\s*' + ARGUMENT_LIST + '?' + ')';
-var OPEN_BRACKET = '(\\[\\[|{{)' + '\\s*';
-var CLOSE_BRACKET = '(?:]]|}})';
-var NEGATE = '(?:(!)\\s*)?';
-var EXPRESSION = OPEN_BRACKET + NEGATE + BINDING + CLOSE_BRACKET;
-return new RegExp(EXPRESSION, 'g');
-}(),
-_parseBindings: function (text) {
-var re = this._bindingRegex;
-var parts = [];
-var lastIndex = 0;
-var m;
-while ((m = re.exec(text)) !== null) {
-if (m.index > lastIndex) {
-parts.push({ literal: text.slice(lastIndex, m.index) });
-}
-var mode = m[1][0];
-var negate = Boolean(m[2]);
-var value = m[3].trim();
-var customEvent, notifyEvent, colon;
-if (mode == '{' && (colon = value.indexOf('::')) > 0) {
-notifyEvent = value.substring(colon + 2);
-value = value.substring(0, colon);
-customEvent = true;
-}
-parts.push({
-compoundIndex: parts.length,
-value: value,
-mode: mode,
-negate: negate,
-event: notifyEvent,
-customEvent: customEvent
-});
-lastIndex = re.lastIndex;
-}
-if (lastIndex && lastIndex < text.length) {
-var literal = text.substring(lastIndex);
-if (literal) {
-parts.push({ literal: literal });
-}
-}
-if (parts.length) {
-return parts;
-}
-},
-_literalFromParts: function (parts) {
-var s = '';
-for (var i = 0; i < parts.length; i++) {
-var literal = parts[i].literal;
-s += literal || '';
-}
-return s;
-},
-_parseTextNodeAnnotation: function (node, list) {
-var parts = this._parseBindings(node.textContent);
-if (parts) {
-node.textContent = this._literalFromParts(parts) || ' ';
-var annote = {
-bindings: [{
-kind: 'text',
-name: 'textContent',
-parts: parts,
-isCompound: parts.length !== 1
-}]
-};
-list.push(annote);
-return annote;
-}
-},
-_parseElementAnnotations: function (element, list, stripWhiteSpace) {
-var annote = {
-bindings: [],
-events: []
-};
-if (element.localName === 'content') {
-list._hasContent = true;
-}
-this._parseChildNodesAnnotations(element, annote, list, stripWhiteSpace);
-if (element.attributes) {
-this._parseNodeAttributeAnnotations(element, annote, list);
-if (this.prepElement) {
-this.prepElement(element);
-}
-}
-if (annote.bindings.length || annote.events.length || annote.id) {
-list.push(annote);
-}
-return annote;
-},
-_parseChildNodesAnnotations: function (root, annote, list, stripWhiteSpace) {
-if (root.firstChild) {
-var node = root.firstChild;
-var i = 0;
-while (node) {
-var next = node.nextSibling;
-if (node.localName === 'template' && !node.hasAttribute('preserve-content')) {
-this._parseTemplate(node, i, list, annote);
-}
-if (node.nodeType === Node.TEXT_NODE) {
-var n = next;
-while (n && n.nodeType === Node.TEXT_NODE) {
-node.textContent += n.textContent;
-next = n.nextSibling;
-root.removeChild(n);
-n = next;
-}
-if (stripWhiteSpace && !node.textContent.trim()) {
-root.removeChild(node);
-i--;
-}
-}
-if (node.parentNode) {
-var childAnnotation = this._parseNodeAnnotations(node, list, stripWhiteSpace);
-if (childAnnotation) {
-childAnnotation.parent = annote;
-childAnnotation.index = i;
-}
-}
-node = next;
-i++;
-}
-}
-},
-_parseTemplate: function (node, index, list, parent) {
-var content = document.createDocumentFragment();
-content._notes = this.parseAnnotations(node);
-content.appendChild(node.content);
-list.push({
-bindings: Polymer.nar,
-events: Polymer.nar,
-templateContent: content,
-parent: parent,
-index: index
-});
-},
-_parseNodeAttributeAnnotations: function (node, annotation) {
-var attrs = Array.prototype.slice.call(node.attributes);
-for (var i = attrs.length - 1, a; a = attrs[i]; i--) {
-var n = a.name;
-var v = a.value;
-var b;
-if (n.slice(0, 3) === 'on-') {
-node.removeAttribute(n);
-annotation.events.push({
-name: n.slice(3),
-value: v
-});
-} else if (b = this._parseNodeAttributeAnnotation(node, n, v)) {
-annotation.bindings.push(b);
-} else if (n === 'id') {
-annotation.id = v;
-}
-}
-},
-_parseNodeAttributeAnnotation: function (node, name, value) {
-var parts = this._parseBindings(value);
-if (parts) {
-var origName = name;
-var kind = 'property';
-if (name[name.length - 1] == '$') {
-name = name.slice(0, -1);
-kind = 'attribute';
-}
-var literal = this._literalFromParts(parts);
-if (literal && kind == 'attribute') {
-node.setAttribute(name, literal);
-}
-if (node.localName === 'input' && origName === 'value') {
-node.setAttribute(origName, '');
-}
-node.removeAttribute(origName);
-var propertyName = Polymer.CaseMap.dashToCamelCase(name);
-if (kind === 'property') {
-name = propertyName;
-}
-return {
-kind: kind,
-name: name,
-propertyName: propertyName,
-parts: parts,
-literal: literal,
-isCompound: parts.length !== 1
-};
-}
-},
-findAnnotatedNode: function (root, annote) {
-var parent = annote.parent && Polymer.Annotations.findAnnotatedNode(root, annote.parent);
-if (parent) {
-for (var n = parent.firstChild, i = 0; n; n = n.nextSibling) {
-if (annote.index === i++) {
-return n;
-}
-}
-} else {
-return root;
-}
-}
-};(function () {
-function resolveCss(cssText, ownerDocument) {
-return cssText.replace(CSS_URL_RX, function (m, pre, url, post) {
-return pre + '\'' + resolve(url.replace(/["']/g, ''), ownerDocument) + '\'' + post;
-});
-}
-function resolveAttrs(element, ownerDocument) {
-for (var name in URL_ATTRS) {
-var a$ = URL_ATTRS[name];
-for (var i = 0, l = a$.length, a, at, v; i < l && (a = a$[i]); i++) {
-if (name === '*' || element.localName === name) {
-at = element.attributes[a];
-v = at && at.value;
-if (v && v.search(BINDING_RX) < 0) {
-at.value = a === 'style' ? resolveCss(v, ownerDocument) : resolve(v, ownerDocument);
-}
-}
-}
-}
-}
-function resolve(url, ownerDocument) {
-if (url && url[0] === '#') {
-return url;
-}
-var resolver = getUrlResolver(ownerDocument);
-resolver.href = url;
-return resolver.href || url;
-}
-var tempDoc;
-var tempDocBase;
-function resolveUrl(url, baseUri) {
-if (!tempDoc) {
-tempDoc = document.implementation.createHTMLDocument('temp');
-tempDocBase = tempDoc.createElement('base');
-tempDoc.head.appendChild(tempDocBase);
-}
-tempDocBase.href = baseUri;
-return resolve(url, tempDoc);
-}
-function getUrlResolver(ownerDocument) {
-return ownerDocument.__urlResolver || (ownerDocument.__urlResolver = ownerDocument.createElement('a'));
-}
-var CSS_URL_RX = /(url\()([^)]*)(\))/g;
-var URL_ATTRS = {
-'*': [
-'href',
-'src',
-'style',
-'url'
-],
-form: ['action']
-};
-var BINDING_RX = /\{\{|\[\[/;
-Polymer.ResolveUrl = {
-resolveCss: resolveCss,
-resolveAttrs: resolveAttrs,
-resolveUrl: resolveUrl
-};
-}());Polymer.Base._addFeature({
-_prepAnnotations: function () {
-if (!this._template) {
-this._notes = [];
-} else {
-var self = this;
-Polymer.Annotations.prepElement = function (element) {
-self._prepElement(element);
-};
-if (this._template._content && this._template._content._notes) {
-this._notes = this._template._content._notes;
-} else {
-this._notes = Polymer.Annotations.parseAnnotations(this._template);
-this._processAnnotations(this._notes);
-}
-Polymer.Annotations.prepElement = null;
-}
-},
-_processAnnotations: function (notes) {
-for (var i = 0; i < notes.length; i++) {
-var note = notes[i];
-for (var j = 0; j < note.bindings.length; j++) {
-var b = note.bindings[j];
-for (var k = 0; k < b.parts.length; k++) {
-var p = b.parts[k];
-if (!p.literal) {
-var signature = this._parseMethod(p.value);
-if (signature) {
-p.signature = signature;
-} else {
-p.model = this._modelForPath(p.value);
-}
-}
-}
-}
-if (note.templateContent) {
-this._processAnnotations(note.templateContent._notes);
-var pp = note.templateContent._parentProps = this._discoverTemplateParentProps(note.templateContent._notes);
-var bindings = [];
-for (var prop in pp) {
-var name = '_parent_' + prop;
-bindings.push({
-index: note.index,
-kind: 'property',
-name: name,
-propertyName: name,
-parts: [{
-mode: '{',
-model: prop,
-value: prop
-}]
-});
-}
-note.bindings = note.bindings.concat(bindings);
-}
-}
-},
-_discoverTemplateParentProps: function (notes) {
-var pp = {};
-for (var i = 0, n; i < notes.length && (n = notes[i]); i++) {
-for (var j = 0, b$ = n.bindings, b; j < b$.length && (b = b$[j]); j++) {
-for (var k = 0, p$ = b.parts, p; k < p$.length && (p = p$[k]); k++) {
-if (p.signature) {
-var args = p.signature.args;
-for (var kk = 0; kk < args.length; kk++) {
-var model = args[kk].model;
-if (model) {
-pp[model] = true;
-}
-}
-if (p.signature.dynamicFn) {
-pp[p.signature.method] = true;
-}
-} else {
-if (p.model) {
-pp[p.model] = true;
-}
-}
-}
-}
-if (n.templateContent) {
-var tpp = n.templateContent._parentProps;
-Polymer.Base.mixin(pp, tpp);
-}
-}
-return pp;
-},
-_prepElement: function (element) {
-Polymer.ResolveUrl.resolveAttrs(element, this._template.ownerDocument);
-},
-_findAnnotatedNode: Polymer.Annotations.findAnnotatedNode,
-_marshalAnnotationReferences: function () {
-if (this._template) {
-this._marshalIdNodes();
-this._marshalAnnotatedNodes();
-this._marshalAnnotatedListeners();
-}
-},
-_configureAnnotationReferences: function () {
-var notes = this._notes;
-var nodes = this._nodes;
-for (var i = 0; i < notes.length; i++) {
-var note = notes[i];
-var node = nodes[i];
-this._configureTemplateContent(note, node);
-this._configureCompoundBindings(note, node);
-}
-},
-_configureTemplateContent: function (note, node) {
-if (note.templateContent) {
-node._content = note.templateContent;
-}
-},
-_configureCompoundBindings: function (note, node) {
-var bindings = note.bindings;
-for (var i = 0; i < bindings.length; i++) {
-var binding = bindings[i];
-if (binding.isCompound) {
-var storage = node.__compoundStorage__ || (node.__compoundStorage__ = {});
-var parts = binding.parts;
-var literals = new Array(parts.length);
-for (var j = 0; j < parts.length; j++) {
-literals[j] = parts[j].literal;
-}
-var name = binding.name;
-storage[name] = literals;
-if (binding.literal && binding.kind == 'property') {
-if (node._configValue) {
-node._configValue(name, binding.literal);
-} else {
-node[name] = binding.literal;
-}
-}
-}
-}
-},
-_marshalIdNodes: function () {
-this.$ = {};
-for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) {
-if (a.id) {
-this.$[a.id] = this._findAnnotatedNode(this.root, a);
-}
-}
-},
-_marshalAnnotatedNodes: function () {
-if (this._notes && this._notes.length) {
-var r = new Array(this._notes.length);
-for (var i = 0; i < this._notes.length; i++) {
-r[i] = this._findAnnotatedNode(this.root, this._notes[i]);
-}
-this._nodes = r;
-}
-},
-_marshalAnnotatedListeners: function () {
-for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) {
-if (a.events && a.events.length) {
-var node = this._findAnnotatedNode(this.root, a);
-for (var j = 0, e$ = a.events, e; j < e$.length && (e = e$[j]); j++) {
-this.listen(node, e.name, e.value);
-}
-}
-}
-}
-});Polymer.Base._addFeature({
-listeners: {},
-_listenListeners: function (listeners) {
-var node, name, eventName;
-for (eventName in listeners) {
-if (eventName.indexOf('.') < 0) {
-node = this;
-name = eventName;
-} else {
-name = eventName.split('.');
-node = this.$[name[0]];
-name = name[1];
-}
-this.listen(node, name, listeners[eventName]);
-}
-},
-listen: function (node, eventName, methodName) {
-var handler = this._recallEventHandler(this, eventName, node, methodName);
-if (!handler) {
-handler = this._createEventHandler(node, eventName, methodName);
-}
-if (handler._listening) {
-return;
-}
-this._listen(node, eventName, handler);
-handler._listening = true;
-},
-_boundListenerKey: function (eventName, methodName) {
-return eventName + ':' + methodName;
-},
-_recordEventHandler: function (host, eventName, target, methodName, handler) {
-var hbl = host.__boundListeners;
-if (!hbl) {
-hbl = host.__boundListeners = new WeakMap();
-}
-var bl = hbl.get(target);
-if (!bl) {
-bl = {};
-hbl.set(target, bl);
-}
-var key = this._boundListenerKey(eventName, methodName);
-bl[key] = handler;
-},
-_recallEventHandler: function (host, eventName, target, methodName) {
-var hbl = host.__boundListeners;
-if (!hbl) {
-return;
-}
-var bl = hbl.get(target);
-if (!bl) {
-return;
-}
-var key = this._boundListenerKey(eventName, methodName);
-return bl[key];
-},
-_createEventHandler: function (node, eventName, methodName) {
-var host = this;
-var handler = function (e) {
-if (host[methodName]) {
-host[methodName](e, e.detail);
-} else {
-host._warn(host._logf('_createEventHandler', 'listener method `' + methodName + '` not defined'));
-}
-};
-handler._listening = false;
-this._recordEventHandler(host, eventName, node, methodName, handler);
-return handler;
-},
-unlisten: function (node, eventName, methodName) {
-var handler = this._recallEventHandler(this, eventName, node, methodName);
-if (handler) {
-this._unlisten(node, eventName, handler);
-handler._listening = false;
-}
-},
-_listen: function (node, eventName, handler) {
-node.addEventListener(eventName, handler);
-},
-_unlisten: function (node, eventName, handler) {
-node.removeEventListener(eventName, handler);
-}
-});(function () {
-'use strict';
-var wrap = Polymer.DomApi.wrap;
-var HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';
-var GESTURE_KEY = '__polymerGestures';
-var HANDLED_OBJ = '__polymerGesturesHandled';
-var TOUCH_ACTION = '__polymerGesturesTouchAction';
-var TAP_DISTANCE = 25;
-var TRACK_DISTANCE = 5;
-var TRACK_LENGTH = 2;
-var MOUSE_TIMEOUT = 2500;
-var MOUSE_EVENTS = [
-'mousedown',
-'mousemove',
-'mouseup',
-'click'
-];
-var MOUSE_WHICH_TO_BUTTONS = [
-0,
-1,
-4,
-2
-];
-var MOUSE_HAS_BUTTONS = function () {
-try {
-return new MouseEvent('test', { buttons: 1 }).buttons === 1;
-} catch (e) {
-return false;
-}
-}();
-var IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);
-var mouseCanceller = function (mouseEvent) {
-mouseEvent[HANDLED_OBJ] = { skip: true };
-if (mouseEvent.type === 'click') {
-var path = Polymer.dom(mouseEvent).path;
-for (var i = 0; i < path.length; i++) {
-if (path[i] === POINTERSTATE.mouse.target) {
-return;
-}
-}
-mouseEvent.preventDefault();
-mouseEvent.stopPropagation();
-}
-};
-function setupTeardownMouseCanceller(setup) {
-for (var i = 0, en; i < MOUSE_EVENTS.length; i++) {
-en = MOUSE_EVENTS[i];
-if (setup) {
-document.addEventListener(en, mouseCanceller, true);
-} else {
-document.removeEventListener(en, mouseCanceller, true);
-}
-}
-}
-function ignoreMouse() {
-if (IS_TOUCH_ONLY) {
-return;
-}
-if (!POINTERSTATE.mouse.mouseIgnoreJob) {
-setupTeardownMouseCanceller(true);
-}
-var unset = function () {
-setupTeardownMouseCanceller();
-POINTERSTATE.mouse.target = null;
-POINTERSTATE.mouse.mouseIgnoreJob = null;
-};
-POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT);
-}
-function hasLeftMouseButton(ev) {
-var type = ev.type;
-if (MOUSE_EVENTS.indexOf(type) === -1) {
-return false;
-}
-if (type === 'mousemove') {
-var buttons = ev.buttons === undefined ? 1 : ev.buttons;
-if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {
-buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;
-}
-return Boolean(buttons & 1);
-} else {
-var button = ev.button === undefined ? 0 : ev.button;
-return button === 0;
-}
-}
-function isSyntheticClick(ev) {
-if (ev.type === 'click') {
-if (ev.detail === 0) {
-return true;
-}
-var t = Gestures.findOriginalTarget(ev);
-var bcr = t.getBoundingClientRect();
-var x = ev.pageX, y = ev.pageY;
-return !(x >= bcr.left && x <= bcr.right && (y >= bcr.top && y <= bcr.bottom));
-}
-return false;
-}
-var POINTERSTATE = {
-mouse: {
-target: null,
-mouseIgnoreJob: null
-},
-touch: {
-x: 0,
-y: 0,
-id: -1,
-scrollDecided: false
-}
-};
-function firstTouchAction(ev) {
-var path = Polymer.dom(ev).path;
-var ta = 'auto';
-for (var i = 0, n; i < path.length; i++) {
-n = path[i];
-if (n[TOUCH_ACTION]) {
-ta = n[TOUCH_ACTION];
-break;
-}
-}
-return ta;
-}
-function trackDocument(stateObj, movefn, upfn) {
-stateObj.movefn = movefn;
-stateObj.upfn = upfn;
-document.addEventListener('mousemove', movefn);
-document.addEventListener('mouseup', upfn);
-}
-function untrackDocument(stateObj) {
-document.removeEventListener('mousemove', stateObj.movefn);
-document.removeEventListener('mouseup', stateObj.upfn);
-stateObj.movefn = null;
-stateObj.upfn = null;
-}
-var Gestures = {
-gestures: {},
-recognizers: [],
-deepTargetFind: function (x, y) {
-var node = document.elementFromPoint(x, y);
-var next = node;
-while (next && next.shadowRoot) {
-next = next.shadowRoot.elementFromPoint(x, y);
-if (next) {
-node = next;
-}
-}
-return node;
-},
-findOriginalTarget: function (ev) {
-if (ev.path) {
-return ev.path[0];
-}
-return ev.target;
-},
-handleNative: function (ev) {
-var handled;
-var type = ev.type;
-var node = wrap(ev.currentTarget);
-var gobj = node[GESTURE_KEY];
-if (!gobj) {
-return;
-}
-var gs = gobj[type];
-if (!gs) {
-return;
-}
-if (!ev[HANDLED_OBJ]) {
-ev[HANDLED_OBJ] = {};
-if (type.slice(0, 5) === 'touch') {
-var t = ev.changedTouches[0];
-if (type === 'touchstart') {
-if (ev.touches.length === 1) {
-POINTERSTATE.touch.id = t.identifier;
-}
-}
-if (POINTERSTATE.touch.id !== t.identifier) {
-return;
-}
-if (!HAS_NATIVE_TA) {
-if (type === 'touchstart' || type === 'touchmove') {
-Gestures.handleTouchAction(ev);
-}
-}
-if (type === 'touchend') {
-POINTERSTATE.mouse.target = Polymer.dom(ev).rootTarget;
-ignoreMouse();
-}
-}
-}
-handled = ev[HANDLED_OBJ];
-if (handled.skip) {
-return;
-}
-var recognizers = Gestures.recognizers;
-for (var i = 0, r; i < recognizers.length; i++) {
-r = recognizers[i];
-if (gs[r.name] && !handled[r.name]) {
-if (r.flow && r.flow.start.indexOf(ev.type) > -1 && r.reset) {
-r.reset();
-}
-}
-}
-for (i = 0, r; i < recognizers.length; i++) {
-r = recognizers[i];
-if (gs[r.name] && !handled[r.name]) {
-handled[r.name] = true;
-r[type](ev);
-}
-}
-},
-handleTouchAction: function (ev) {
-var t = ev.changedTouches[0];
-var type = ev.type;
-if (type === 'touchstart') {
-POINTERSTATE.touch.x = t.clientX;
-POINTERSTATE.touch.y = t.clientY;
-POINTERSTATE.touch.scrollDecided = false;
-} else if (type === 'touchmove') {
-if (POINTERSTATE.touch.scrollDecided) {
-return;
-}
-POINTERSTATE.touch.scrollDecided = true;
-var ta = firstTouchAction(ev);
-var prevent = false;
-var dx = Math.abs(POINTERSTATE.touch.x - t.clientX);
-var dy = Math.abs(POINTERSTATE.touch.y - t.clientY);
-if (!ev.cancelable) {
-} else if (ta === 'none') {
-prevent = true;
-} else if (ta === 'pan-x') {
-prevent = dy > dx;
-} else if (ta === 'pan-y') {
-prevent = dx > dy;
-}
-if (prevent) {
-ev.preventDefault();
-} else {
-Gestures.prevent('track');
-}
-}
-},
-add: function (node, evType, handler) {
-node = wrap(node);
-var recognizer = this.gestures[evType];
-var deps = recognizer.deps;
-var name = recognizer.name;
-var gobj = node[GESTURE_KEY];
-if (!gobj) {
-node[GESTURE_KEY] = gobj = {};
-}
-for (var i = 0, dep, gd; i < deps.length; i++) {
-dep = deps[i];
-if (IS_TOUCH_ONLY && MOUSE_EVENTS.indexOf(dep) > -1) {
-continue;
-}
-gd = gobj[dep];
-if (!gd) {
-gobj[dep] = gd = { _count: 0 };
-}
-if (gd._count === 0) {
-node.addEventListener(dep, this.handleNative);
-}
-gd[name] = (gd[name] || 0) + 1;
-gd._count = (gd._count || 0) + 1;
-}
-node.addEventListener(evType, handler);
-if (recognizer.touchAction) {
-this.setTouchAction(node, recognizer.touchAction);
-}
-},
-remove: function (node, evType, handler) {
-node = wrap(node);
-var recognizer = this.gestures[evType];
-var deps = recognizer.deps;
-var name = recognizer.name;
-var gobj = node[GESTURE_KEY];
-if (gobj) {
-for (var i = 0, dep, gd; i < deps.length; i++) {
-dep = deps[i];
-gd = gobj[dep];
-if (gd && gd[name]) {
-gd[name] = (gd[name] || 1) - 1;
-gd._count = (gd._count || 1) - 1;
-if (gd._count === 0) {
-node.removeEventListener(dep, this.handleNative);
-}
-}
-}
-}
-node.removeEventListener(evType, handler);
-},
-register: function (recog) {
-this.recognizers.push(recog);
-for (var i = 0; i < recog.emits.length; i++) {
-this.gestures[recog.emits[i]] = recog;
-}
-},
-findRecognizerByEvent: function (evName) {
-for (var i = 0, r; i < this.recognizers.length; i++) {
-r = this.recognizers[i];
-for (var j = 0, n; j < r.emits.length; j++) {
-n = r.emits[j];
-if (n === evName) {
-return r;
-}
-}
-}
-return null;
-},
-setTouchAction: function (node, value) {
-if (HAS_NATIVE_TA) {
-node.style.touchAction = value;
-}
-node[TOUCH_ACTION] = value;
-},
-fire: function (target, type, detail) {
-var ev = Polymer.Base.fire(type, detail, {
-node: target,
-bubbles: true,
-cancelable: true
-});
-if (ev.defaultPrevented) {
-var preventer = detail.preventer || detail.sourceEvent;
-if (preventer && preventer.preventDefault) {
-preventer.preventDefault();
-}
-}
-},
-prevent: function (evName) {
-var recognizer = this.findRecognizerByEvent(evName);
-if (recognizer.info) {
-recognizer.info.prevent = true;
-}
-},
-resetMouseCanceller: function () {
-if (POINTERSTATE.mouse.mouseIgnoreJob) {
-POINTERSTATE.mouse.mouseIgnoreJob.complete();
-}
-}
-};
-Gestures.register({
-name: 'downup',
-deps: [
-'mousedown',
-'touchstart',
-'touchend'
-],
-flow: {
-start: [
-'mousedown',
-'touchstart'
-],
-end: [
-'mouseup',
-'touchend'
-]
-},
-emits: [
-'down',
-'up'
-],
-info: {
-movefn: null,
-upfn: null
-},
-reset: function () {
-untrackDocument(this.info);
-},
-mousedown: function (e) {
-if (!hasLeftMouseButton(e)) {
-return;
-}
-var t = Gestures.findOriginalTarget(e);
-var self = this;
-var movefn = function movefn(e) {
-if (!hasLeftMouseButton(e)) {
-self.fire('up', t, e);
-untrackDocument(self.info);
-}
-};
-var upfn = function upfn(e) {
-if (hasLeftMouseButton(e)) {
-self.fire('up', t, e);
-}
-untrackDocument(self.info);
-};
-trackDocument(this.info, movefn, upfn);
-this.fire('down', t, e);
-},
-touchstart: function (e) {
-this.fire('down', Gestures.findOriginalTarget(e), e.changedTouches[0], e);
-},
-touchend: function (e) {
-this.fire('up', Gestures.findOriginalTarget(e), e.changedTouches[0], e);
-},
-fire: function (type, target, event, preventer) {
-Gestures.fire(target, type, {
-x: event.clientX,
-y: event.clientY,
-sourceEvent: event,
-preventer: preventer,
-prevent: function (e) {
-return Gestures.prevent(e);
-}
-});
-}
-});
-Gestures.register({
-name: 'track',
-touchAction: 'none',
-deps: [
-'mousedown',
-'touchstart',
-'touchmove',
-'touchend'
-],
-flow: {
-start: [
-'mousedown',
-'touchstart'
-],
-end: [
-'mouseup',
-'touchend'
-]
-},
-emits: ['track'],
-info: {
-x: 0,
-y: 0,
-state: 'start',
-started: false,
-moves: [],
-addMove: function (move) {
-if (this.moves.length > TRACK_LENGTH) {
-this.moves.shift();
-}
-this.moves.push(move);
-},
-movefn: null,
-upfn: null,
-prevent: false
-},
-reset: function () {
-this.info.state = 'start';
-this.info.started = false;
-this.info.moves = [];
-this.info.x = 0;
-this.info.y = 0;
-this.info.prevent = false;
-untrackDocument(this.info);
-},
-hasMovedEnough: function (x, y) {
-if (this.info.prevent) {
-return false;
-}
-if (this.info.started) {
-return true;
-}
-var dx = Math.abs(this.info.x - x);
-var dy = Math.abs(this.info.y - y);
-return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;
-},
-mousedown: function (e) {
-if (!hasLeftMouseButton(e)) {
-return;
-}
-var t = Gestures.findOriginalTarget(e);
-var self = this;
-var movefn = function movefn(e) {
-var x = e.clientX, y = e.clientY;
-if (self.hasMovedEnough(x, y)) {
-self.info.state = self.info.started ? e.type === 'mouseup' ? 'end' : 'track' : 'start';
-if (self.info.state === 'start') {
-Gestures.prevent('tap');
-}
-self.info.addMove({
-x: x,
-y: y
-});
-if (!hasLeftMouseButton(e)) {
-self.info.state = 'end';
-untrackDocument(self.info);
-}
-self.fire(t, e);
-self.info.started = true;
-}
-};
-var upfn = function upfn(e) {
-if (self.info.started) {
-movefn(e);
-}
-untrackDocument(self.info);
-};
-trackDocument(this.info, movefn, upfn);
-this.info.x = e.clientX;
-this.info.y = e.clientY;
-},
-touchstart: function (e) {
-var ct = e.changedTouches[0];
-this.info.x = ct.clientX;
-this.info.y = ct.clientY;
-},
-touchmove: function (e) {
-var t = Gestures.findOriginalTarget(e);
-var ct = e.changedTouches[0];
-var x = ct.clientX, y = ct.clientY;
-if (this.hasMovedEnough(x, y)) {
-if (this.info.state === 'start') {
-Gestures.prevent('tap');
-}
-this.info.addMove({
-x: x,
-y: y
-});
-this.fire(t, ct);
-this.info.state = 'track';
-this.info.started = true;
-}
-},
-touchend: function (e) {
-var t = Gestures.findOriginalTarget(e);
-var ct = e.changedTouches[0];
-if (this.info.started) {
-this.info.state = 'end';
-this.info.addMove({
-x: ct.clientX,
-y: ct.clientY
-});
-this.fire(t, ct, e);
-}
-},
-fire: function (target, touch, preventer) {
-var secondlast = this.info.moves[this.info.moves.length - 2];
-var lastmove = this.info.moves[this.info.moves.length - 1];
-var dx = lastmove.x - this.info.x;
-var dy = lastmove.y - this.info.y;
-var ddx, ddy = 0;
-if (secondlast) {
-ddx = lastmove.x - secondlast.x;
-ddy = lastmove.y - secondlast.y;
-}
-return Gestures.fire(target, 'track', {
-state: this.info.state,
-x: touch.clientX,
-y: touch.clientY,
-dx: dx,
-dy: dy,
-ddx: ddx,
-ddy: ddy,
-sourceEvent: touch,
-preventer: preventer,
-hover: function () {
-return Gestures.deepTargetFind(touch.clientX, touch.clientY);
-}
-});
-}
-});
-Gestures.register({
-name: 'tap',
-deps: [
-'mousedown',
-'click',
-'touchstart',
-'touchend'
-],
-flow: {
-start: [
-'mousedown',
-'touchstart'
-],
-end: [
-'click',
-'touchend'
-]
-},
-emits: ['tap'],
-info: {
-x: NaN,
-y: NaN,
-prevent: false
-},
-reset: function () {
-this.info.x = NaN;
-this.info.y = NaN;
-this.info.prevent = false;
-},
-save: function (e) {
-this.info.x = e.clientX;
-this.info.y = e.clientY;
-},
-mousedown: function (e) {
-if (hasLeftMouseButton(e)) {
-this.save(e);
-}
-},
-click: function (e) {
-if (hasLeftMouseButton(e)) {
-this.forward(e);
-}
-},
-touchstart: function (e) {
-this.save(e.changedTouches[0], e);
-},
-touchend: function (e) {
-this.forward(e.changedTouches[0], e);
-},
-forward: function (e, preventer) {
-var dx = Math.abs(e.clientX - this.info.x);
-var dy = Math.abs(e.clientY - this.info.y);
-var t = Gestures.findOriginalTarget(e);
-if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE && dy <= TAP_DISTANCE || isSyntheticClick(e)) {
-if (!this.info.prevent) {
-Gestures.fire(t, 'tap', {
-x: e.clientX,
-y: e.clientY,
-sourceEvent: e,
-preventer: preventer
-});
-}
-}
-}
-});
-var DIRECTION_MAP = {
-x: 'pan-x',
-y: 'pan-y',
-none: 'none',
-all: 'auto'
-};
-Polymer.Base._addFeature({
-_setupGestures: function () {
-this.__polymerGestures = null;
-},
-_listen: function (node, eventName, handler) {
-if (Gestures.gestures[eventName]) {
-Gestures.add(node, eventName, handler);
-} else {
-node.addEventListener(eventName, handler);
-}
-},
-_unlisten: function (node, eventName, handler) {
-if (Gestures.gestures[eventName]) {
-Gestures.remove(node, eventName, handler);
-} else {
-node.removeEventListener(eventName, handler);
-}
-},
-setScrollDirection: function (direction, node) {
-node = node || this;
-Gestures.setTouchAction(node, DIRECTION_MAP[direction] || 'auto');
-}
-});
-Polymer.Gestures = Gestures;
-}());(function () {
-'use strict';
-Polymer.Base._addFeature({
-$$: function (slctr) {
-return Polymer.dom(this.root).querySelector(slctr);
-},
-toggleClass: function (name, bool, node) {
-node = node || this;
-if (arguments.length == 1) {
-bool = !node.classList.contains(name);
-}
-if (bool) {
-Polymer.dom(node).classList.add(name);
-} else {
-Polymer.dom(node).classList.remove(name);
-}
-},
-toggleAttribute: function (name, bool, node) {
-node = node || this;
-if (arguments.length == 1) {
-bool = !node.hasAttribute(name);
-}
-if (bool) {
-Polymer.dom(node).setAttribute(name, '');
-} else {
-Polymer.dom(node).removeAttribute(name);
-}
-},
-classFollows: function (name, toElement, fromElement) {
-if (fromElement) {
-Polymer.dom(fromElement).classList.remove(name);
-}
-if (toElement) {
-Polymer.dom(toElement).classList.add(name);
-}
-},
-attributeFollows: function (name, toElement, fromElement) {
-if (fromElement) {
-Polymer.dom(fromElement).removeAttribute(name);
-}
-if (toElement) {
-Polymer.dom(toElement).setAttribute(name, '');
-}
-},
-getEffectiveChildNodes: function () {
-return Polymer.dom(this).getEffectiveChildNodes();
-},
-getEffectiveChildren: function () {
-var list = Polymer.dom(this).getEffectiveChildNodes();
-return list.filter(function (n) {
-return n.nodeType === Node.ELEMENT_NODE;
-});
-},
-getEffectiveTextContent: function () {
-var cn = this.getEffectiveChildNodes();
-var tc = [];
-for (var i = 0, c; c = cn[i]; i++) {
-if (c.nodeType !== Node.COMMENT_NODE) {
-tc.push(Polymer.dom(c).textContent);
-}
-}
-return tc.join('');
-},
-queryEffectiveChildren: function (slctr) {
-var e$ = Polymer.dom(this).queryDistributedElements(slctr);
-return e$ && e$[0];
-},
-queryAllEffectiveChildren: function (slctr) {
-return Polymer.dom(this).queryDistributedElements(slctr);
-},
-getContentChildNodes: function (slctr) {
-var content = Polymer.dom(this.root).querySelector(slctr || 'content');
-return content ? Polymer.dom(content).getDistributedNodes() : [];
-},
-getContentChildren: function (slctr) {
-return this.getContentChildNodes(slctr).filter(function (n) {
-return n.nodeType === Node.ELEMENT_NODE;
-});
-},
-fire: function (type, detail, options) {
-options = options || Polymer.nob;
-var node = options.node || this;
-detail = detail === null || detail === undefined ? {} : detail;
-var bubbles = options.bubbles === undefined ? true : options.bubbles;
-var cancelable = Boolean(options.cancelable);
-var useCache = options._useCache;
-var event = this._getEvent(type, bubbles, cancelable, useCache);
-event.detail = detail;
-if (useCache) {
-this.__eventCache[type] = null;
-}
-node.dispatchEvent(event);
-if (useCache) {
-this.__eventCache[type] = event;
-}
-return event;
-},
-__eventCache: {},
-_getEvent: function (type, bubbles, cancelable, useCache) {
-var event = useCache && this.__eventCache[type];
-if (!event || (event.bubbles != bubbles || event.cancelable != cancelable)) {
-event = new Event(type, {
-bubbles: Boolean(bubbles),
-cancelable: cancelable
-});
-}
-return event;
-},
-async: function (callback, waitTime) {
-var self = this;
-return Polymer.Async.run(function () {
-callback.call(self);
-}, waitTime);
-},
-cancelAsync: function (handle) {
-Polymer.Async.cancel(handle);
-},
-arrayDelete: function (path, item) {
-var index;
-if (Array.isArray(path)) {
-index = path.indexOf(item);
-if (index >= 0) {
-return path.splice(index, 1);
-}
-} else {
-var arr = this._get(path);
-index = arr.indexOf(item);
-if (index >= 0) {
-return this.splice(path, index, 1);
-}
-}
-},
-transform: function (transform, node) {
-node = node || this;
-node.style.webkitTransform = transform;
-node.style.transform = transform;
-},
-translate3d: function (x, y, z, node) {
-node = node || this;
-this.transform('translate3d(' + x + ',' + y + ',' + z + ')', node);
-},
-importHref: function (href, onload, onerror, optAsync) {
-var link = document.createElement('link');
-link.rel = 'import';
-link.href = href;
-var list = Polymer.Base.importHref.imported = Polymer.Base.importHref.imported || {};
-var cached = list[link.href];
-var imprt = cached || link;
-var self = this;
-if (onload) {
-var loadListener = function (e) {
-e.target.__firedLoad = true;
-e.target.removeEventListener('load', loadListener);
-return onload.call(self, e);
-};
-imprt.addEventListener('load', loadListener);
-}
-if (onerror) {
-var errorListener = function (e) {
-e.target.__firedError = true;
-e.target.removeEventListener('error', errorListener);
-return onerror.call(self, e);
-};
-imprt.addEventListener('error', errorListener);
-}
-if (cached) {
-if (cached.__firedLoad) {
-cached.dispatchEvent(new Event('load'));
-}
-if (cached.__firedError) {
-cached.dispatchEvent(new Event('error'));
-}
-} else {
-list[link.href] = link;
-optAsync = Boolean(optAsync);
-if (optAsync) {
-link.setAttribute('async', '');
-}
-document.head.appendChild(link);
-}
-return imprt;
-},
-create: function (tag, props) {
-var elt = document.createElement(tag);
-if (props) {
-for (var n in props) {
-elt[n] = props[n];
-}
-}
-return elt;
-},
-isLightDescendant: function (node) {
-return this !== node && this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot();
-},
-isLocalDescendant: function (node) {
-return this.root === Polymer.dom(node).getOwnerRoot();
-}
-});
-if (!Polymer.Settings.useNativeCustomElements) {
-var importHref = Polymer.Base.importHref;
-Polymer.Base.importHref = function (href, onload, onerror, optAsync) {
-CustomElements.ready = false;
-var loadFn = function (e) {
-CustomElements.upgradeDocumentTree(document);
-CustomElements.ready = true;
-if (onload) {
-return onload.call(this, e);
-}
-};
-return importHref.call(this, href, loadFn, onerror, optAsync);
-};
-}
-}());Polymer.Bind = {
-prepareModel: function (model) {
-Polymer.Base.mixin(model, this._modelApi);
-},
-_modelApi: {
-_notifyChange: function (source, event, value) {
-value = value === undefined ? this[source] : value;
-event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed';
-this.fire(event, { value: value }, {
-bubbles: false,
-cancelable: false,
-_useCache: true
-});
-},
-_propertySetter: function (property, value, effects, fromAbove) {
-var old = this.__data__[property];
-if (old !== value && (old === old || value === value)) {
-this.__data__[property] = value;
-if (typeof value == 'object') {
-this._clearPath(property);
-}
-if (this._propertyChanged) {
-this._propertyChanged(property, value, old);
-}
-if (effects) {
-this._effectEffects(property, value, effects, old, fromAbove);
-}
-}
-return old;
-},
-__setProperty: function (property, value, quiet, node) {
-node = node || this;
-var effects = node._propertyEffects && node._propertyEffects[property];
-if (effects) {
-node._propertySetter(property, value, effects, quiet);
-} else {
-node[property] = value;
-}
-},
-_effectEffects: function (property, value, effects, old, fromAbove) {
-for (var i = 0, l = effects.length, fx; i < l && (fx = effects[i]); i++) {
-fx.fn.call(this, property, this[property], fx.effect, old, fromAbove);
-}
-},
-_clearPath: function (path) {
-for (var prop in this.__data__) {
-if (prop.indexOf(path + '.') === 0) {
-this.__data__[prop] = undefined;
-}
-}
-}
-},
-ensurePropertyEffects: function (model, property) {
-if (!model._propertyEffects) {
-model._propertyEffects = {};
-}
-var fx = model._propertyEffects[property];
-if (!fx) {
-fx = model._propertyEffects[property] = [];
-}
-return fx;
-},
-addPropertyEffect: function (model, property, kind, effect) {
-var fx = this.ensurePropertyEffects(model, property);
-var propEffect = {
-kind: kind,
-effect: effect,
-fn: Polymer.Bind['_' + kind + 'Effect']
-};
-fx.push(propEffect);
-return propEffect;
-},
-createBindings: function (model) {
-var fx$ = model._propertyEffects;
-if (fx$) {
-for (var n in fx$) {
-var fx = fx$[n];
-fx.sort(this._sortPropertyEffects);
-this._createAccessors(model, n, fx);
-}
-}
-},
-_sortPropertyEffects: function () {
-var EFFECT_ORDER = {
-'compute': 0,
-'annotation': 1,
-'annotatedComputation': 2,
-'reflect': 3,
-'notify': 4,
-'observer': 5,
-'complexObserver': 6,
-'function': 7
-};
-return function (a, b) {
-return EFFECT_ORDER[a.kind] - EFFECT_ORDER[b.kind];
-};
-}(),
-_createAccessors: function (model, property, effects) {
-var defun = {
-get: function () {
-return this.__data__[property];
-}
-};
-var setter = function (value) {
-this._propertySetter(property, value, effects);
-};
-var info = model.getPropertyInfo && model.getPropertyInfo(property);
-if (info && info.readOnly) {
-if (!info.computed) {
-model['_set' + this.upper(property)] = setter;
-}
-} else {
-defun.set = setter;
-}
-Object.defineProperty(model, property, defun);
-},
-upper: function (name) {
-return name[0].toUpperCase() + name.substring(1);
-},
-_addAnnotatedListener: function (model, index, property, path, event, negated) {
-if (!model._bindListeners) {
-model._bindListeners = [];
-}
-var fn = this._notedListenerFactory(property, path, this._isStructured(path), negated);
-var eventName = event || Polymer.CaseMap.camelToDashCase(property) + '-changed';
-model._bindListeners.push({
-index: index,
-property: property,
-path: path,
-changedFn: fn,
-event: eventName
-});
-},
-_isStructured: function (path) {
-return path.indexOf('.') > 0;
-},
-_isEventBogus: function (e, target) {
-return e.path && e.path[0] !== target;
-},
-_notedListenerFactory: function (property, path, isStructured, negated) {
-return function (target, value, targetPath) {
-if (targetPath) {
-this._notifyPath(this._fixPath(path, property, targetPath), value);
-} else {
-value = target[property];
-if (negated) {
-value = !value;
-}
-if (!isStructured) {
-this[path] = value;
-} else {
-if (this.__data__[path] != value) {
-this.set(path, value);
-}
-}
-}
-};
-},
-prepareInstance: function (inst) {
-inst.__data__ = Object.create(null);
-},
-setupBindListeners: function (inst) {
-var b$ = inst._bindListeners;
-for (var i = 0, l = b$.length, info; i < l && (info = b$[i]); i++) {
-var node = inst._nodes[info.index];
-this._addNotifyListener(node, inst, info.event, info.changedFn);
-}
-},
-_addNotifyListener: function (element, context, event, changedFn) {
-element.addEventListener(event, function (e) {
-return context._notifyListener(changedFn, e);
-});
-}
-};Polymer.Base.extend(Polymer.Bind, {
-_shouldAddListener: function (effect) {
-return effect.name && effect.kind != 'attribute' && effect.kind != 'text' && !effect.isCompound && effect.parts[0].mode === '{';
-},
-_annotationEffect: function (source, value, effect) {
-if (source != effect.value) {
-value = this._get(effect.value);
-this.__data__[effect.value] = value;
-}
-this._applyEffectValue(effect, value);
-},
-_reflectEffect: function (source, value, effect) {
-this.reflectPropertyToAttribute(source, effect.attribute, value);
-},
-_notifyEffect: function (source, value, effect, old, fromAbove) {
-if (!fromAbove) {
-this._notifyChange(source, effect.event, value);
-}
-},
-_functionEffect: function (source, value, fn, old, fromAbove) {
-fn.call(this, source, value, old, fromAbove);
-},
-_observerEffect: function (source, value, effect, old) {
-var fn = this[effect.method];
-if (fn) {
-fn.call(this, value, old);
-} else {
-this._warn(this._logf('_observerEffect', 'observer method `' + effect.method + '` not defined'));
-}
-},
-_complexObserverEffect: function (source, value, effect) {
-var fn = this[effect.method];
-if (fn) {
-var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
-if (args) {
-fn.apply(this, args);
-}
-} else if (effect.dynamicFn) {
-} else {
-this._warn(this._logf('_complexObserverEffect', 'observer method `' + effect.method + '` not defined'));
-}
-},
-_computeEffect: function (source, value, effect) {
-var fn = this[effect.method];
-if (fn) {
-var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
-if (args) {
-var computedvalue = fn.apply(this, args);
-this.__setProperty(effect.name, computedvalue);
-}
-} else if (effect.dynamicFn) {
-} else {
-this._warn(this._logf('_computeEffect', 'compute method `' + effect.method + '` not defined'));
-}
-},
-_annotatedComputationEffect: function (source, value, effect) {
-var computedHost = this._rootDataHost || this;
-var fn = computedHost[effect.method];
-if (fn) {
-var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
-if (args) {
-var computedvalue = fn.apply(computedHost, args);
-this._applyEffectValue(effect, computedvalue);
-}
-} else if (effect.dynamicFn) {
-} else {
-computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined'));
-}
-},
-_marshalArgs: function (model, effect, path, value) {
-var values = [];
-var args = effect.args;
-var bailoutEarly = args.length > 1 || effect.dynamicFn;
-for (var i = 0, l = args.length; i < l; i++) {
-var arg = args[i];
-var name = arg.name;
-var v;
-if (arg.literal) {
-v = arg.value;
-} else if (path === name) {
-v = value;
-} else {
-v = model[name];
-if (v === undefined && arg.structured) {
-v = Polymer.Base._get(name, model);
-}
-}
-if (bailoutEarly && v === undefined) {
-return;
-}
-if (arg.wildcard) {
-var matches = path.indexOf(name + '.') === 0;
-values[i] = {
-path: matches ? path : name,
-value: matches ? value : v,
-base: v
-};
-} else {
-values[i] = v;
-}
-}
-return values;
-}
-});Polymer.Base._addFeature({
-_addPropertyEffect: function (property, kind, effect) {
-var prop = Polymer.Bind.addPropertyEffect(this, property, kind, effect);
-prop.pathFn = this['_' + prop.kind + 'PathEffect'];
-},
-_prepEffects: function () {
-Polymer.Bind.prepareModel(this);
-this._addAnnotationEffects(this._notes);
-},
-_prepBindings: function () {
-Polymer.Bind.createBindings(this);
-},
-_addPropertyEffects: function (properties) {
-if (properties) {
-for (var p in properties) {
-var prop = properties[p];
-if (prop.observer) {
-this._addObserverEffect(p, prop.observer);
-}
-if (prop.computed) {
-prop.readOnly = true;
-this._addComputedEffect(p, prop.computed);
-}
-if (prop.notify) {
-this._addPropertyEffect(p, 'notify', { event: Polymer.CaseMap.camelToDashCase(p) + '-changed' });
-}
-if (prop.reflectToAttribute) {
-var attr = Polymer.CaseMap.camelToDashCase(p);
-if (attr[0] === '-') {
-this._warn(this._logf('_addPropertyEffects', 'Property ' + p + ' cannot be reflected to attribute ' + attr + ' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'));
-} else {
-this._addPropertyEffect(p, 'reflect', { attribute: attr });
-}
-}
-if (prop.readOnly) {
-Polymer.Bind.ensurePropertyEffects(this, p);
-}
-}
-}
-},
-_addComputedEffect: function (name, expression) {
-var sig = this._parseMethod(expression);
-var dynamicFn = sig.dynamicFn;
-for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {
-this._addPropertyEffect(arg.model, 'compute', {
-method: sig.method,
-args: sig.args,
-trigger: arg,
-name: name,
-dynamicFn: dynamicFn
-});
-}
-if (dynamicFn) {
-this._addPropertyEffect(sig.method, 'compute', {
-method: sig.method,
-args: sig.args,
-trigger: null,
-name: name,
-dynamicFn: dynamicFn
-});
-}
-},
-_addObserverEffect: function (property, observer) {
-this._addPropertyEffect(property, 'observer', {
-method: observer,
-property: property
-});
-},
-_addComplexObserverEffects: function (observers) {
-if (observers) {
-for (var i = 0, o; i < observers.length && (o = observers[i]); i++) {
-this._addComplexObserverEffect(o);
-}
-}
-},
-_addComplexObserverEffect: function (observer) {
-var sig = this._parseMethod(observer);
-if (!sig) {
-throw new Error('Malformed observer expression \'' + observer + '\'');
-}
-var dynamicFn = sig.dynamicFn;
-for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {
-this._addPropertyEffect(arg.model, 'complexObserver', {
-method: sig.method,
-args: sig.args,
-trigger: arg,
-dynamicFn: dynamicFn
-});
-}
-if (dynamicFn) {
-this._addPropertyEffect(sig.method, 'complexObserver', {
-method: sig.method,
-args: sig.args,
-trigger: null,
-dynamicFn: dynamicFn
-});
-}
-},
-_addAnnotationEffects: function (notes) {
-for (var i = 0, note; i < notes.length && (note = notes[i]); i++) {
-var b$ = note.bindings;
-for (var j = 0, binding; j < b$.length && (binding = b$[j]); j++) {
-this._addAnnotationEffect(binding, i);
-}
-}
-},
-_addAnnotationEffect: function (note, index) {
-if (Polymer.Bind._shouldAddListener(note)) {
-Polymer.Bind._addAnnotatedListener(this, index, note.name, note.parts[0].value, note.parts[0].event, note.parts[0].negate);
-}
-for (var i = 0; i < note.parts.length; i++) {
-var part = note.parts[i];
-if (part.signature) {
-this._addAnnotatedComputationEffect(note, part, index);
-} else if (!part.literal) {
-if (note.kind === 'attribute' && note.name[0] === '-') {
-this._warn(this._logf('_addAnnotationEffect', 'Cannot set attribute ' + note.name + ' because "-" is not a valid attribute starting character'));
-} else {
-this._addPropertyEffect(part.model, 'annotation', {
-kind: note.kind,
-index: index,
-name: note.name,
-propertyName: note.propertyName,
-value: part.value,
-isCompound: note.isCompound,
-compoundIndex: part.compoundIndex,
-event: part.event,
-customEvent: part.customEvent,
-negate: part.negate
-});
-}
-}
-}
-},
-_addAnnotatedComputationEffect: function (note, part, index) {
-var sig = part.signature;
-if (sig.static) {
-this.__addAnnotatedComputationEffect('__static__', index, note, part, null);
-} else {
-for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {
-if (!arg.literal) {
-this.__addAnnotatedComputationEffect(arg.model, index, note, part, arg);
-}
-}
-if (sig.dynamicFn) {
-this.__addAnnotatedComputationEffect(sig.method, index, note, part, null);
-}
-}
-},
-__addAnnotatedComputationEffect: function (property, index, note, part, trigger) {
-this._addPropertyEffect(property, 'annotatedComputation', {
-index: index,
-isCompound: note.isCompound,
-compoundIndex: part.compoundIndex,
-kind: note.kind,
-name: note.name,
-negate: part.negate,
-method: part.signature.method,
-args: part.signature.args,
-trigger: trigger,
-dynamicFn: part.signature.dynamicFn
-});
-},
-_parseMethod: function (expression) {
-var m = expression.match(/([^\s]+?)\(([\s\S]*)\)/);
-if (m) {
-var sig = {
-method: m[1],
-static: true
-};
-if (this.getPropertyInfo(sig.method) !== Polymer.nob) {
-sig.static = false;
-sig.dynamicFn = true;
-}
-if (m[2].trim()) {
-var args = m[2].replace(/\\,/g, '&comma;').split(',');
-return this._parseArgs(args, sig);
-} else {
-sig.args = Polymer.nar;
-return sig;
-}
-}
-},
-_parseArgs: function (argList, sig) {
-sig.args = argList.map(function (rawArg) {
-var arg = this._parseArg(rawArg);
-if (!arg.literal) {
-sig.static = false;
-}
-return arg;
-}, this);
-return sig;
-},
-_parseArg: function (rawArg) {
-var arg = rawArg.trim().replace(/&comma;/g, ',').replace(/\\(.)/g, '$1');
-var a = { name: arg };
-var fc = arg[0];
-if (fc === '-') {
-fc = arg[1];
-}
-if (fc >= '0' && fc <= '9') {
-fc = '#';
-}
-switch (fc) {
-case '\'':
-case '"':
-a.value = arg.slice(1, -1);
-a.literal = true;
-break;
-case '#':
-a.value = Number(arg);
-a.literal = true;
-break;
-}
-if (!a.literal) {
-a.model = this._modelForPath(arg);
-a.structured = arg.indexOf('.') > 0;
-if (a.structured) {
-a.wildcard = arg.slice(-2) == '.*';
-if (a.wildcard) {
-a.name = arg.slice(0, -2);
-}
-}
-}
-return a;
-},
-_marshalInstanceEffects: function () {
-Polymer.Bind.prepareInstance(this);
-if (this._bindListeners) {
-Polymer.Bind.setupBindListeners(this);
-}
-},
-_applyEffectValue: function (info, value) {
-var node = this._nodes[info.index];
-var property = info.name;
-value = this._computeFinalAnnotationValue(node, property, value, info);
-if (info.customEvent && node[property] === value) {
-return;
-}
-if (info.kind == 'attribute') {
-this.serializeValueToAttribute(value, property, node);
-} else {
-var pinfo = node._propertyInfo && node._propertyInfo[property];
-if (pinfo && pinfo.readOnly) {
-return;
-}
-this.__setProperty(property, value, false, node);
-}
-},
-_computeFinalAnnotationValue: function (node, property, value, info) {
-if (info.negate) {
-value = !value;
-}
-if (info.isCompound) {
-var storage = node.__compoundStorage__[property];
-storage[info.compoundIndex] = value;
-value = storage.join('');
-}
-if (info.kind !== 'attribute') {
-if (property === 'className') {
-value = this._scopeElementClass(node, value);
-}
-if (property === 'textContent' || node.localName == 'input' && property == 'value') {
-value = value == undefined ? '' : value;
-}
-}
-return value;
-},
-_executeStaticEffects: function () {
-if (this._propertyEffects && this._propertyEffects.__static__) {
-this._effectEffects('__static__', null, this._propertyEffects.__static__);
-}
-}
-});(function () {
-var usePolyfillProto = Polymer.Settings.usePolyfillProto;
-Polymer.Base._addFeature({
-_setupConfigure: function (initialConfig) {
-this._config = {};
-this._handlers = [];
-this._aboveConfig = null;
-if (initialConfig) {
-for (var i in initialConfig) {
-if (initialConfig[i] !== undefined) {
-this._config[i] = initialConfig[i];
-}
-}
-}
-},
-_marshalAttributes: function () {
-this._takeAttributesToModel(this._config);
-},
-_attributeChangedImpl: function (name) {
-var model = this._clientsReadied ? this : this._config;
-this._setAttributeToProperty(model, name);
-},
-_configValue: function (name, value) {
-var info = this._propertyInfo[name];
-if (!info || !info.readOnly) {
-this._config[name] = value;
-}
-},
-_beforeClientsReady: function () {
-this._configure();
-},
-_configure: function () {
-this._configureAnnotationReferences();
-this._aboveConfig = this.mixin({}, this._config);
-var config = {};
-for (var i = 0; i < this.behaviors.length; i++) {
-this._configureProperties(this.behaviors[i].properties, config);
-}
-this._configureProperties(this.properties, config);
-this.mixin(config, this._aboveConfig);
-this._config = config;
-if (this._clients && this._clients.length) {
-this._distributeConfig(this._config);
-}
-},
-_configureProperties: function (properties, config) {
-for (var i in properties) {
-var c = properties[i];
-if (!usePolyfillProto && this.hasOwnProperty(i) && this._propertyEffects && this._propertyEffects[i]) {
-config[i] = this[i];
-delete this[i];
-} else if (c.value !== undefined) {
-var value = c.value;
-if (typeof value == 'function') {
-value = value.call(this, this._config);
-}
-config[i] = value;
-}
-}
-},
-_distributeConfig: function (config) {
-var fx$ = this._propertyEffects;
-if (fx$) {
-for (var p in config) {
-var fx = fx$[p];
-if (fx) {
-for (var i = 0, l = fx.length, x; i < l && (x = fx[i]); i++) {
-if (x.kind === 'annotation') {
-var node = this._nodes[x.effect.index];
-var name = x.effect.propertyName;
-var isAttr = x.effect.kind == 'attribute';
-var hasEffect = node._propertyEffects && node._propertyEffects[name];
-if (node._configValue && (hasEffect || !isAttr)) {
-var value = p === x.effect.value ? config[p] : this._get(x.effect.value, config);
-value = this._computeFinalAnnotationValue(node, name, value, x.effect);
-if (isAttr) {
-value = node.deserialize(this.serialize(value), node._propertyInfo[name].type);
-}
-node._configValue(name, value);
-}
-}
-}
-}
-}
-}
-},
-_afterClientsReady: function () {
-this._executeStaticEffects();
-this._applyConfig(this._config, this._aboveConfig);
-this._flushHandlers();
-},
-_applyConfig: function (config, aboveConfig) {
-for (var n in config) {
-if (this[n] === undefined) {
-this.__setProperty(n, config[n], n in aboveConfig);
-}
-}
-},
-_notifyListener: function (fn, e) {
-if (!Polymer.Bind._isEventBogus(e, e.target)) {
-var value, path;
-if (e.detail) {
-value = e.detail.value;
-path = e.detail.path;
-}
-if (!this._clientsReadied) {
-this._queueHandler([
-fn,
-e.target,
-value,
-path
-]);
-} else {
-return fn.call(this, e.target, value, path);
-}
-}
-},
-_queueHandler: function (args) {
-this._handlers.push(args);
-},
-_flushHandlers: function () {
-var h$ = this._handlers;
-for (var i = 0, l = h$.length, h; i < l && (h = h$[i]); i++) {
-h[0].call(this, h[1], h[2], h[3]);
-}
-this._handlers = [];
-}
-});
-}());(function () {
-'use strict';
-Polymer.Base._addFeature({
-notifyPath: function (path, value, fromAbove) {
-var info = {};
-var v = this._get(path, this, info);
-if (arguments.length === 1) {
-value = v;
-}
-if (info.path) {
-this._notifyPath(info.path, value, fromAbove);
-}
-},
-_notifyPath: function (path, value, fromAbove) {
-var old = this._propertySetter(path, value);
-if (old !== value && (old === old || value === value)) {
-this._pathEffector(path, value);
-if (!fromAbove) {
-this._notifyPathUp(path, value);
-}
-return true;
-}
-},
-_getPathParts: function (path) {
-if (Array.isArray(path)) {
-var parts = [];
-for (var i = 0; i < path.length; i++) {
-var args = path[i].toString().split('.');
-for (var j = 0; j < args.length; j++) {
-parts.push(args[j]);
-}
-}
-return parts;
-} else {
-return path.toString().split('.');
-}
-},
-set: function (path, value, root) {
-var prop = root || this;
-var parts = this._getPathParts(path);
-var array;
-var last = parts[parts.length - 1];
-if (parts.length > 1) {
-for (var i = 0; i < parts.length - 1; i++) {
-var part = parts[i];
-if (array && part[0] == '#') {
-prop = Polymer.Collection.get(array).getItem(part);
-} else {
-prop = prop[part];
-if (array && parseInt(part, 10) == part) {
-parts[i] = Polymer.Collection.get(array).getKey(prop);
-}
-}
-if (!prop) {
-return;
-}
-array = Array.isArray(prop) ? prop : null;
-}
-if (array) {
-var coll = Polymer.Collection.get(array);
-var old, key;
-if (last[0] == '#') {
-key = last;
-old = coll.getItem(key);
-last = array.indexOf(old);
-coll.setItem(key, value);
-} else if (parseInt(last, 10) == last) {
-old = prop[last];
-key = coll.getKey(old);
-parts[i] = key;
-coll.setItem(key, value);
-}
-}
-prop[last] = value;
-if (!root) {
-this._notifyPath(parts.join('.'), value);
-}
-} else {
-prop[path] = value;
-}
-},
-get: function (path, root) {
-return this._get(path, root);
-},
-_get: function (path, root, info) {
-var prop = root || this;
-var parts = this._getPathParts(path);
-var array;
-for (var i = 0; i < parts.length; i++) {
-if (!prop) {
-return;
-}
-var part = parts[i];
-if (array && part[0] == '#') {
-prop = Polymer.Collection.get(array).getItem(part);
-} else {
-prop = prop[part];
-if (info && array && parseInt(part, 10) == part) {
-parts[i] = Polymer.Collection.get(array).getKey(prop);
-}
-}
-array = Array.isArray(prop) ? prop : null;
-}
-if (info) {
-info.path = parts.join('.');
-}
-return prop;
-},
-_pathEffector: function (path, value) {
-var model = this._modelForPath(path);
-var fx$ = this._propertyEffects && this._propertyEffects[model];
-if (fx$) {
-for (var i = 0, fx; i < fx$.length && (fx = fx$[i]); i++) {
-var fxFn = fx.pathFn;
-if (fxFn) {
-fxFn.call(this, path, value, fx.effect);
-}
-}
-}
-if (this._boundPaths) {
-this._notifyBoundPaths(path, value);
-}
-},
-_annotationPathEffect: function (path, value, effect) {
-if (effect.value === path || effect.value.indexOf(path + '.') === 0) {
-Polymer.Bind._annotationEffect.call(this, path, value, effect);
-} else if (path.indexOf(effect.value + '.') === 0 && !effect.negate) {
-var node = this._nodes[effect.index];
-if (node && node._notifyPath) {
-var p = this._fixPath(effect.name, effect.value, path);
-node._notifyPath(p, value, true);
-}
-}
-},
-_complexObserverPathEffect: function (path, value, effect) {
-if (this._pathMatchesEffect(path, effect)) {
-Polymer.Bind._complexObserverEffect.call(this, path, value, effect);
-}
-},
-_computePathEffect: function (path, value, effect) {
-if (this._pathMatchesEffect(path, effect)) {
-Polymer.Bind._computeEffect.call(this, path, value, effect);
-}
-},
-_annotatedComputationPathEffect: function (path, value, effect) {
-if (this._pathMatchesEffect(path, effect)) {
-Polymer.Bind._annotatedComputationEffect.call(this, path, value, effect);
-}
-},
-_pathMatchesEffect: function (path, effect) {
-var effectArg = effect.trigger.name;
-return effectArg == path || effectArg.indexOf(path + '.') === 0 || effect.trigger.wildcard && path.indexOf(effectArg + '.') === 0;
-},
-linkPaths: function (to, from) {
-this._boundPaths = this._boundPaths || {};
-if (from) {
-this._boundPaths[to] = from;
-} else {
-this.unlinkPaths(to);
-}
-},
-unlinkPaths: function (path) {
-if (this._boundPaths) {
-delete this._boundPaths[path];
-}
-},
-_notifyBoundPaths: function (path, value) {
-for (var a in this._boundPaths) {
-var b = this._boundPaths[a];
-if (path.indexOf(a + '.') == 0) {
-this._notifyPath(this._fixPath(b, a, path), value);
-} else if (path.indexOf(b + '.') == 0) {
-this._notifyPath(this._fixPath(a, b, path), value);
-}
-}
-},
-_fixPath: function (property, root, path) {
-return property + path.slice(root.length);
-},
-_notifyPathUp: function (path, value) {
-var rootName = this._modelForPath(path);
-var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName);
-var eventName = dashCaseName + this._EVENT_CHANGED;
-this.fire(eventName, {
-path: path,
-value: value
-}, {
-bubbles: false,
-_useCache: true
-});
-},
-_modelForPath: function (path) {
-var dot = path.indexOf('.');
-return dot < 0 ? path : path.slice(0, dot);
-},
-_EVENT_CHANGED: '-changed',
-notifySplices: function (path, splices) {
-var info = {};
-var array = this._get(path, this, info);
-this._notifySplices(array, info.path, splices);
-},
-_notifySplices: function (array, path, splices) {
-var change = {
-keySplices: Polymer.Collection.applySplices(array, splices),
-indexSplices: splices
-};
-var splicesPath = path + '.splices';
-this._notifyPath(splicesPath, change);
-this._notifyPath(path + '.length', array.length);
-this.__data__[splicesPath] = {
-keySplices: null,
-indexSplices: null
-};
-},
-_notifySplice: function (array, path, index, added, removed) {
-this._notifySplices(array, path, [{
-index: index,
-addedCount: added,
-removed: removed,
-object: array,
-type: 'splice'
-}]);
-},
-push: function (path) {
-var info = {};
-var array = this._get(path, this, info);
-var args = Array.prototype.slice.call(arguments, 1);
-var len = array.length;
-var ret = array.push.apply(array, args);
-if (args.length) {
-this._notifySplice(array, info.path, len, args.length, []);
-}
-return ret;
-},
-pop: function (path) {
-var info = {};
-var array = this._get(path, this, info);
-var hadLength = Boolean(array.length);
-var args = Array.prototype.slice.call(arguments, 1);
-var ret = array.pop.apply(array, args);
-if (hadLength) {
-this._notifySplice(array, info.path, array.length, 0, [ret]);
-}
-return ret;
-},
-splice: function (path, start) {
-var info = {};
-var array = this._get(path, this, info);
-if (start < 0) {
-start = array.length - Math.floor(-start);
-} else {
-start = Math.floor(start);
-}
-if (!start) {
-start = 0;
-}
-var args = Array.prototype.slice.call(arguments, 1);
-var ret = array.splice.apply(array, args);
-var addedCount = Math.max(args.length - 2, 0);
-if (addedCount || ret.length) {
-this._notifySplice(array, info.path, start, addedCount, ret);
-}
-return ret;
-},
-shift: function (path) {
-var info = {};
-var array = this._get(path, this, info);
-var hadLength = Boolean(array.length);
-var args = Array.prototype.slice.call(arguments, 1);
-var ret = array.shift.apply(array, args);
-if (hadLength) {
-this._notifySplice(array, info.path, 0, 0, [ret]);
-}
-return ret;
-},
-unshift: function (path) {
-var info = {};
-var array = this._get(path, this, info);
-var args = Array.prototype.slice.call(arguments, 1);
-var ret = array.unshift.apply(array, args);
-if (args.length) {
-this._notifySplice(array, info.path, 0, args.length, []);
-}
-return ret;
-},
-prepareModelNotifyPath: function (model) {
-this.mixin(model, {
-fire: Polymer.Base.fire,
-_getEvent: Polymer.Base._getEvent,
-__eventCache: Polymer.Base.__eventCache,
-notifyPath: Polymer.Base.notifyPath,
-_get: Polymer.Base._get,
-_EVENT_CHANGED: Polymer.Base._EVENT_CHANGED,
-_notifyPath: Polymer.Base._notifyPath,
-_notifyPathUp: Polymer.Base._notifyPathUp,
-_pathEffector: Polymer.Base._pathEffector,
-_annotationPathEffect: Polymer.Base._annotationPathEffect,
-_complexObserverPathEffect: Polymer.Base._complexObserverPathEffect,
-_annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect,
-_computePathEffect: Polymer.Base._computePathEffect,
-_modelForPath: Polymer.Base._modelForPath,
-_pathMatchesEffect: Polymer.Base._pathMatchesEffect,
-_notifyBoundPaths: Polymer.Base._notifyBoundPaths,
-_getPathParts: Polymer.Base._getPathParts
-});
-}
-});
-}());Polymer.Base._addFeature({
-resolveUrl: function (url) {
-var module = Polymer.DomModule.import(this.is);
-var root = '';
-if (module) {
-var assetPath = module.getAttribute('assetpath') || '';
-root = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI);
-}
-return Polymer.ResolveUrl.resolveUrl(url, root);
-}
-});Polymer.CssParse = function () {
-return {
-parse: function (text) {
-text = this._clean(text);
-return this._parseCss(this._lex(text), text);
-},
-_clean: function (cssText) {
-return cssText.replace(this._rx.comments, '').replace(this._rx.port, '');
-},
-_lex: function (text) {
-var root = {
-start: 0,
-end: text.length
-};
-var n = root;
-for (var i = 0, l = text.length; i < l; i++) {
-switch (text[i]) {
-case this.OPEN_BRACE:
-if (!n.rules) {
-n.rules = [];
-}
-var p = n;
-var previous = p.rules[p.rules.length - 1];
-n = {
-start: i + 1,
-parent: p,
-previous: previous
-};
-p.rules.push(n);
-break;
-case this.CLOSE_BRACE:
-n.end = i + 1;
-n = n.parent || root;
-break;
-}
-}
-return root;
-},
-_parseCss: function (node, text) {
-var t = text.substring(node.start, node.end - 1);
-node.parsedCssText = node.cssText = t.trim();
-if (node.parent) {
-var ss = node.previous ? node.previous.end : node.parent.start;
-t = text.substring(ss, node.start - 1);
-t = this._expandUnicodeEscapes(t);
-t = t.replace(this._rx.multipleSpaces, ' ');
-t = t.substring(t.lastIndexOf(';') + 1);
-var s = node.parsedSelector = node.selector = t.trim();
-node.atRule = s.indexOf(this.AT_START) === 0;
-if (node.atRule) {
-if (s.indexOf(this.MEDIA_START) === 0) {
-node.type = this.types.MEDIA_RULE;
-} else if (s.match(this._rx.keyframesRule)) {
-node.type = this.types.KEYFRAMES_RULE;
-node.keyframesName = node.selector.split(this._rx.multipleSpaces).pop();
-}
-} else {
-if (s.indexOf(this.VAR_START) === 0) {
-node.type = this.types.MIXIN_RULE;
-} else {
-node.type = this.types.STYLE_RULE;
-}
-}
-}
-var r$ = node.rules;
-if (r$) {
-for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {
-this._parseCss(r, text);
-}
-}
-return node;
-},
-_expandUnicodeEscapes: function (s) {
-return s.replace(/\\([0-9a-f]{1,6})\s/gi, function () {
-var code = arguments[1], repeat = 6 - code.length;
-while (repeat--) {
-code = '0' + code;
-}
-return '\\' + code;
-});
-},
-stringify: function (node, preserveProperties, text) {
-text = text || '';
-var cssText = '';
-if (node.cssText || node.rules) {
-var r$ = node.rules;
-if (r$ && !this._hasMixinRules(r$)) {
-for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {
-cssText = this.stringify(r, preserveProperties, cssText);
-}
-} else {
-cssText = preserveProperties ? node.cssText : this.removeCustomProps(node.cssText);
-cssText = cssText.trim();
-if (cssText) {
-cssText = ' ' + cssText + '\n';
-}
-}
-}
-if (cssText) {
-if (node.selector) {
-text += node.selector + ' ' + this.OPEN_BRACE + '\n';
-}
-text += cssText;
-if (node.selector) {
-text += this.CLOSE_BRACE + '\n\n';
-}
-}
-return text;
-},
-_hasMixinRules: function (rules) {
-return rules[0].selector.indexOf(this.VAR_START) === 0;
-},
-removeCustomProps: function (cssText) {
-cssText = this.removeCustomPropAssignment(cssText);
-return this.removeCustomPropApply(cssText);
-},
-removeCustomPropAssignment: function (cssText) {
-return cssText.replace(this._rx.customProp, '').replace(this._rx.mixinProp, '');
-},
-removeCustomPropApply: function (cssText) {
-return cssText.replace(this._rx.mixinApply, '').replace(this._rx.varApply, '');
-},
-types: {
-STYLE_RULE: 1,
-KEYFRAMES_RULE: 7,
-MEDIA_RULE: 4,
-MIXIN_RULE: 1000
-},
-OPEN_BRACE: '{',
-CLOSE_BRACE: '}',
-_rx: {
-comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
-port: /@import[^;]*;/gim,
-customProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,
-mixinProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,
-mixinApply: /@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,
-varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,
-keyframesRule: /^@[^\s]*keyframes/,
-multipleSpaces: /\s+/g
-},
-VAR_START: '--',
-MEDIA_START: '@media',
-AT_START: '@'
-};
-}();Polymer.StyleUtil = function () {
-var settings = Polymer.Settings;
-return {
-NATIVE_VARIABLES: Polymer.Settings.useNativeCSSProperties,
-MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',
-INCLUDE_ATTR: 'include',
-toCssText: function (rules, callback) {
-if (typeof rules === 'string') {
-rules = this.parser.parse(rules);
-}
-if (callback) {
-this.forEachRule(rules, callback);
-}
-return this.parser.stringify(rules, this.NATIVE_VARIABLES);
-},
-forRulesInStyles: function (styles, styleRuleCallback, keyframesRuleCallback) {
-if (styles) {
-for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
-this.forEachRuleInStyle(s, styleRuleCallback, keyframesRuleCallback);
-}
-}
-},
-forActiveRulesInStyles: function (styles, styleRuleCallback, keyframesRuleCallback) {
-if (styles) {
-for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
-this.forEachRuleInStyle(s, styleRuleCallback, keyframesRuleCallback, true);
-}
-}
-},
-rulesForStyle: function (style) {
-if (!style.__cssRules && style.textContent) {
-style.__cssRules = this.parser.parse(style.textContent);
-}
-return style.__cssRules;
-},
-isKeyframesSelector: function (rule) {
-return rule.parent && rule.parent.type === this.ruleTypes.KEYFRAMES_RULE;
-},
-forEachRuleInStyle: function (style, styleRuleCallback, keyframesRuleCallback, onlyActiveRules) {
-var rules = this.rulesForStyle(style);
-var styleCallback, keyframeCallback;
-if (styleRuleCallback) {
-styleCallback = function (rule) {
-styleRuleCallback(rule, style);
-};
-}
-if (keyframesRuleCallback) {
-keyframeCallback = function (rule) {
-keyframesRuleCallback(rule, style);
-};
-}
-this.forEachRule(rules, styleCallback, keyframeCallback, onlyActiveRules);
-},
-forEachRule: function (node, styleRuleCallback, keyframesRuleCallback, onlyActiveRules) {
-if (!node) {
-return;
-}
-var skipRules = false;
-if (onlyActiveRules) {
-if (node.type === this.ruleTypes.MEDIA_RULE) {
-var matchMedia = node.selector.match(this.rx.MEDIA_MATCH);
-if (matchMedia) {
-if (!window.matchMedia(matchMedia[1]).matches) {
-skipRules = true;
-}
-}
-}
-}
-if (node.type === this.ruleTypes.STYLE_RULE) {
-styleRuleCallback(node);
-} else if (keyframesRuleCallback && node.type === this.ruleTypes.KEYFRAMES_RULE) {
-keyframesRuleCallback(node);
-} else if (node.type === this.ruleTypes.MIXIN_RULE) {
-skipRules = true;
-}
-var r$ = node.rules;
-if (r$ && !skipRules) {
-for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {
-this.forEachRule(r, styleRuleCallback, keyframesRuleCallback, onlyActiveRules);
-}
-}
-},
-applyCss: function (cssText, moniker, target, contextNode) {
-var style = this.createScopeStyle(cssText, moniker);
-return this.applyStyle(style, target, contextNode);
-},
-applyStyle: function (style, target, contextNode) {
-target = target || document.head;
-var after = contextNode && contextNode.nextSibling || target.firstChild;
-this.__lastHeadApplyNode = style;
-return target.insertBefore(style, after);
-},
-createScopeStyle: function (cssText, moniker) {
-var style = document.createElement('style');
-if (moniker) {
-style.setAttribute('scope', moniker);
-}
-style.textContent = cssText;
-return style;
-},
-__lastHeadApplyNode: null,
-applyStylePlaceHolder: function (moniker) {
-var placeHolder = document.createComment(' Shady DOM styles for ' + moniker + ' ');
-var after = this.__lastHeadApplyNode ? this.__lastHeadApplyNode.nextSibling : null;
-var scope = document.head;
-scope.insertBefore(placeHolder, after || scope.firstChild);
-this.__lastHeadApplyNode = placeHolder;
-return placeHolder;
-},
-cssFromModules: function (moduleIds, warnIfNotFound) {
-var modules = moduleIds.trim().split(' ');
-var cssText = '';
-for (var i = 0; i < modules.length; i++) {
-cssText += this.cssFromModule(modules[i], warnIfNotFound);
-}
-return cssText;
-},
-cssFromModule: function (moduleId, warnIfNotFound) {
-var m = Polymer.DomModule.import(moduleId);
-if (m && !m._cssText) {
-m._cssText = this.cssFromElement(m);
-}
-if (!m && warnIfNotFound) {
-console.warn('Could not find style data in module named', moduleId);
-}
-return m && m._cssText || '';
-},
-cssFromElement: function (element) {
-var cssText = '';
-var content = element.content || element;
-var e$ = Polymer.TreeApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));
-for (var i = 0, e; i < e$.length; i++) {
-e = e$[i];
-if (e.localName === 'template') {
-cssText += this.cssFromElement(e);
-} else {
-if (e.localName === 'style') {
-var include = e.getAttribute(this.INCLUDE_ATTR);
-if (include) {
-cssText += this.cssFromModules(include, true);
-}
-e = e.__appliedElement || e;
-e.parentNode.removeChild(e);
-cssText += this.resolveCss(e.textContent, element.ownerDocument);
-} else if (e.import && e.import.body) {
-cssText += this.resolveCss(e.import.body.textContent, e.import);
-}
-}
-}
-return cssText;
-},
-isTargetedBuild: function (buildType) {
-return settings.useNativeShadow ? buildType === 'shadow' : buildType === 'shady';
-},
-cssBuildTypeForModule: function (module) {
-var dm = Polymer.DomModule.import(module);
-if (dm) {
-return this.getCssBuildType(dm);
-}
-},
-getCssBuildType: function (element) {
-return element.getAttribute('css-build');
-},
-rx: {
-VAR_ASSIGN: /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,
-MIXIN_MATCH: /(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,
-VAR_MATCH: /(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,()]*)|(?:[^;()]*\([^;)]*\)+))[\s]*?\)/gi,
-VAR_CONSUMED: /(--[\w-]+)\s*([:,;)]|$)/gi,
-ANIMATION_MATCH: /(animation\s*:)|(animation-name\s*:)/,
-MEDIA_MATCH: /@media[^(]*(\([^)]*\))/,
-IS_VAR: /^--/,
-BRACKETED: /\{[^}]*\}/g,
-HOST_PREFIX: '(?:^|[^.#[:])',
-HOST_SUFFIX: '($|[.:[\\s>+~])'
-},
-resolveCss: Polymer.ResolveUrl.resolveCss,
-parser: Polymer.CssParse,
-ruleTypes: Polymer.CssParse.types
-};
-}();Polymer.StyleTransformer = function () {
-var styleUtil = Polymer.StyleUtil;
-var settings = Polymer.Settings;
-var api = {
-dom: function (node, scope, useAttr, shouldRemoveScope) {
-this._transformDom(node, scope || '', useAttr, shouldRemoveScope);
-},
-_transformDom: function (node, selector, useAttr, shouldRemoveScope) {
-if (node.setAttribute) {
-this.element(node, selector, useAttr, shouldRemoveScope);
-}
-var c$ = Polymer.dom(node).childNodes;
-for (var i = 0; i < c$.length; i++) {
-this._transformDom(c$[i], selector, useAttr, shouldRemoveScope);
-}
-},
-element: function (element, scope, useAttr, shouldRemoveScope) {
-if (useAttr) {
-if (shouldRemoveScope) {
-element.removeAttribute(SCOPE_NAME);
-} else {
-element.setAttribute(SCOPE_NAME, scope);
-}
-} else {
-if (scope) {
-if (element.classList) {
-if (shouldRemoveScope) {
-element.classList.remove(SCOPE_NAME);
-element.classList.remove(scope);
-} else {
-element.classList.add(SCOPE_NAME);
-element.classList.add(scope);
-}
-} else if (element.getAttribute) {
-var c = element.getAttribute(CLASS);
-if (shouldRemoveScope) {
-if (c) {
-element.setAttribute(CLASS, c.replace(SCOPE_NAME, '').replace(scope, ''));
-}
-} else {
-element.setAttribute(CLASS, (c ? c + ' ' : '') + SCOPE_NAME + ' ' + scope);
-}
-}
-}
-}
-},
-elementStyles: function (element, callback) {
-var styles = element._styles;
-var cssText = '';
-var cssBuildType = element.__cssBuild;
-for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
-var rules = styleUtil.rulesForStyle(s);
-cssText += settings.useNativeShadow || cssBuildType === 'shady' ? styleUtil.toCssText(rules, callback) : this.css(rules, element.is, element.extends, callback, element._scopeCssViaAttr) + '\n\n';
-}
-return cssText.trim();
-},
-css: function (rules, scope, ext, callback, useAttr) {
-var hostScope = this._calcHostScope(scope, ext);
-scope = this._calcElementScope(scope, useAttr);
-var self = this;
-return styleUtil.toCssText(rules, function (rule) {
-if (!rule.isScoped) {
-self.rule(rule, scope, hostScope);
-rule.isScoped = true;
-}
-if (callback) {
-callback(rule, scope, hostScope);
-}
-});
-},
-_calcElementScope: function (scope, useAttr) {
-if (scope) {
-return useAttr ? CSS_ATTR_PREFIX + scope + CSS_ATTR_SUFFIX : CSS_CLASS_PREFIX + scope;
-} else {
-return '';
-}
-},
-_calcHostScope: function (scope, ext) {
-return ext ? '[is=' + scope + ']' : scope;
-},
-rule: function (rule, scope, hostScope) {
-this._transformRule(rule, this._transformComplexSelector, scope, hostScope);
-},
-_transformRule: function (rule, transformer, scope, hostScope) {
-rule.selector = rule.transformedSelector = this._transformRuleCss(rule, transformer, scope, hostScope);
-},
-_transformRuleCss: function (rule, transformer, scope, hostScope) {
-var p$ = rule.selector.split(COMPLEX_SELECTOR_SEP);
-if (!styleUtil.isKeyframesSelector(rule)) {
-for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {
-p$[i] = transformer.call(this, p, scope, hostScope);
-}
-}
-return p$.join(COMPLEX_SELECTOR_SEP);
-},
-_transformComplexSelector: function (selector, scope, hostScope) {
-var stop = false;
-var hostContext = false;
-var self = this;
-selector = selector.trim();
-selector = selector.replace(CONTENT_START, HOST + ' $1');
-selector = selector.replace(SIMPLE_SELECTOR_SEP, function (m, c, s) {
-if (!stop) {
-var info = self._transformCompoundSelector(s, c, scope, hostScope);
-stop = stop || info.stop;
-hostContext = hostContext || info.hostContext;
-c = info.combinator;
-s = info.value;
-} else {
-s = s.replace(SCOPE_JUMP, ' ');
-}
-return c + s;
-});
-if (hostContext) {
-selector = selector.replace(HOST_CONTEXT_PAREN, function (m, pre, paren, post) {
-return pre + paren + ' ' + hostScope + post + COMPLEX_SELECTOR_SEP + ' ' + pre + hostScope + paren + post;
-});
-}
-return selector;
-},
-_transformCompoundSelector: function (selector, combinator, scope, hostScope) {
-var jumpIndex = selector.search(SCOPE_JUMP);
-var hostContext = false;
-if (selector.indexOf(HOST_CONTEXT) >= 0) {
-hostContext = true;
-} else if (selector.indexOf(HOST) >= 0) {
-selector = this._transformHostSelector(selector, hostScope);
-} else if (jumpIndex !== 0) {
-selector = scope ? this._transformSimpleSelector(selector, scope) : selector;
-}
-if (selector.indexOf(CONTENT) >= 0) {
-combinator = '';
-}
-var stop;
-if (jumpIndex >= 0) {
-selector = selector.replace(SCOPE_JUMP, ' ');
-stop = true;
-}
-return {
-value: selector,
-combinator: combinator,
-stop: stop,
-hostContext: hostContext
-};
-},
-_transformSimpleSelector: function (selector, scope) {
-var p$ = selector.split(PSEUDO_PREFIX);
-p$[0] += scope;
-return p$.join(PSEUDO_PREFIX);
-},
-_transformHostSelector: function (selector, hostScope) {
-var m = selector.match(HOST_PAREN);
-var paren = m && m[2].trim() || '';
-if (paren) {
-if (!paren[0].match(SIMPLE_SELECTOR_PREFIX)) {
-var typeSelector = paren.split(SIMPLE_SELECTOR_PREFIX)[0];
-if (typeSelector === hostScope) {
-return paren;
-} else {
-return SELECTOR_NO_MATCH;
-}
-} else {
-return selector.replace(HOST_PAREN, function (m, host, paren) {
-return hostScope + paren;
-});
-}
-} else {
-return selector.replace(HOST, hostScope);
-}
-},
-documentRule: function (rule) {
-rule.selector = rule.parsedSelector;
-this.normalizeRootSelector(rule);
-if (!settings.useNativeShadow) {
-this._transformRule(rule, this._transformDocumentSelector);
-}
-},
-normalizeRootSelector: function (rule) {
-if (rule.selector === ROOT) {
-rule.selector = 'html';
-}
-},
-_transformDocumentSelector: function (selector) {
-return selector.match(SCOPE_JUMP) ? this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR) : this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR);
-},
-SCOPE_NAME: 'style-scope'
-};
-var SCOPE_NAME = api.SCOPE_NAME;
-var SCOPE_DOC_SELECTOR = ':not([' + SCOPE_NAME + '])' + ':not(.' + SCOPE_NAME + ')';
-var COMPLEX_SELECTOR_SEP = ',';
-var SIMPLE_SELECTOR_SEP = /(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g;
-var SIMPLE_SELECTOR_PREFIX = /[[.:#*]/;
-var HOST = ':host';
-var ROOT = ':root';
-var HOST_PAREN = /(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/;
-var HOST_CONTEXT = ':host-context';
-var HOST_CONTEXT_PAREN = /(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/;
-var CONTENT = '::content';
-var SCOPE_JUMP = /::content|::shadow|\/deep\//;
-var CSS_CLASS_PREFIX = '.';
-var CSS_ATTR_PREFIX = '[' + SCOPE_NAME + '~=';
-var CSS_ATTR_SUFFIX = ']';
-var PSEUDO_PREFIX = ':';
-var CLASS = 'class';
-var CONTENT_START = new RegExp('^(' + CONTENT + ')');
-var SELECTOR_NO_MATCH = 'should_not_match';
-return api;
-}();Polymer.StyleExtends = function () {
-var styleUtil = Polymer.StyleUtil;
-return {
-hasExtends: function (cssText) {
-return Boolean(cssText.match(this.rx.EXTEND));
-},
-transform: function (style) {
-var rules = styleUtil.rulesForStyle(style);
-var self = this;
-styleUtil.forEachRule(rules, function (rule) {
-self._mapRuleOntoParent(rule);
-if (rule.parent) {
-var m;
-while (m = self.rx.EXTEND.exec(rule.cssText)) {
-var extend = m[1];
-var extendor = self._findExtendor(extend, rule);
-if (extendor) {
-self._extendRule(rule, extendor);
-}
-}
-}
-rule.cssText = rule.cssText.replace(self.rx.EXTEND, '');
-});
-return styleUtil.toCssText(rules, function (rule) {
-if (rule.selector.match(self.rx.STRIP)) {
-rule.cssText = '';
-}
-}, true);
-},
-_mapRuleOntoParent: function (rule) {
-if (rule.parent) {
-var map = rule.parent.map || (rule.parent.map = {});
-var parts = rule.selector.split(',');
-for (var i = 0, p; i < parts.length; i++) {
-p = parts[i];
-map[p.trim()] = rule;
-}
-return map;
-}
-},
-_findExtendor: function (extend, rule) {
-return rule.parent && rule.parent.map && rule.parent.map[extend] || this._findExtendor(extend, rule.parent);
-},
-_extendRule: function (target, source) {
-if (target.parent !== source.parent) {
-this._cloneAndAddRuleToParent(source, target.parent);
-}
-target.extends = target.extends || [];
-target.extends.push(source);
-source.selector = source.selector.replace(this.rx.STRIP, '');
-source.selector = (source.selector && source.selector + ',\n') + target.selector;
-if (source.extends) {
-source.extends.forEach(function (e) {
-this._extendRule(target, e);
-}, this);
-}
-},
-_cloneAndAddRuleToParent: function (rule, parent) {
-rule = Object.create(rule);
-rule.parent = parent;
-if (rule.extends) {
-rule.extends = rule.extends.slice();
-}
-parent.rules.push(rule);
-},
-rx: {
-EXTEND: /@extends\(([^)]*)\)\s*?;/gim,
-STRIP: /%[^,]*$/
-}
-};
-}();Polymer.ApplyShim = function () {
-'use strict';
-var styleUtil = Polymer.StyleUtil;
-var MIXIN_MATCH = styleUtil.rx.MIXIN_MATCH;
-var VAR_ASSIGN = styleUtil.rx.VAR_ASSIGN;
-var VAR_MATCH = styleUtil.rx.VAR_MATCH;
-var APPLY_NAME_CLEAN = /;\s*/m;
-var MIXIN_VAR_SEP = '_-_';
-var mixinMap = {};
-function mapSet(name, prop) {
-name = name.trim();
-mixinMap[name] = prop;
-}
-function mapGet(name) {
-name = name.trim();
-return mixinMap[name];
-}
-function cssTextToMap(text) {
-var props = text.split(';');
-var out = {};
-for (var i = 0, p, sp; i < props.length; i++) {
-p = props[i];
-if (p) {
-sp = p.split(':');
-if (sp.length > 1) {
-out[sp[0].trim()] = sp.slice(1).join(':');
-}
-}
-}
-return out;
-}
-function produceCssProperties(matchText, propertyName, valueProperty, valueMixin) {
-if (valueProperty) {
-VAR_MATCH.lastIndex = 0;
-var m = VAR_MATCH.exec(valueProperty);
-if (m) {
-var value = m[2];
-if (mapGet(value)) {
-valueMixin = '@apply ' + value + ';';
-}
-}
-}
-if (!valueMixin) {
-return matchText;
-}
-var mixinAsProperties = consumeCssProperties(valueMixin);
-var prefix = matchText.slice(0, matchText.indexOf('--'));
-var mixinValues = cssTextToMap(mixinAsProperties);
-var oldProperties = mapGet(propertyName);
-var combinedProps = mixinValues;
-if (oldProperties) {
-combinedProps = Polymer.Base.mixin(oldProperties, mixinValues);
-} else {
-mapSet(propertyName, combinedProps);
-}
-var out = [];
-var p, v;
-for (p in combinedProps) {
-v = mixinValues[p];
-if (v === undefined) {
-v = 'initial';
-}
-out.push(propertyName + MIXIN_VAR_SEP + p + ': ' + v);
-}
-return prefix + out.join('; ') + ';';
-}
-function fixVars(matchText, prefix, value, fallback) {
-if (!fallback || fallback.indexOf('--') !== 0) {
-return matchText;
-}
-return [
-prefix,
-'var(',
-value,
-', var(',
-fallback,
-'));'
-].join('');
-}
-function atApplyToCssProperties(mixinName, fallbacks) {
-mixinName = mixinName.replace(APPLY_NAME_CLEAN, '');
-var vars = [];
-var mixinProperties = mapGet(mixinName);
-if (mixinProperties) {
-var p, parts, f;
-for (p in mixinProperties) {
-f = fallbacks && fallbacks[p];
-parts = [
-p,
-': var(',
-mixinName,
-MIXIN_VAR_SEP,
-p
-];
-if (f) {
-parts.push(',', f);
-}
-parts.push(')');
-vars.push(parts.join(''));
-}
-}
-return vars.join('; ');
-}
-function consumeCssProperties(text) {
-var m;
-while (m = MIXIN_MATCH.exec(text)) {
-var matchText = m[0];
-var mixinName = m[1];
-var idx = m.index;
-var applyPos = idx + matchText.indexOf('@apply');
-var afterApplyPos = idx + matchText.length;
-var textBeforeApply = text.slice(0, applyPos);
-var textAfterApply = text.slice(afterApplyPos);
-var defaults = cssTextToMap(textBeforeApply);
-var replacement = atApplyToCssProperties(mixinName, defaults);
-text = [
-textBeforeApply,
-replacement,
-textAfterApply
-].join('');
-MIXIN_MATCH.lastIndex = idx + replacement.length;
-}
-return text;
-}
-var ApplyShim = {
-_map: mixinMap,
-_separator: MIXIN_VAR_SEP,
-transform: function (styles) {
-styleUtil.forRulesInStyles(styles, this._boundTransformRule);
-},
-transformRule: function (rule) {
-rule.cssText = this.transformCssText(rule.parsedCssText);
-if (rule.selector === ':root') {
-rule.selector = ':host > *';
-}
-},
-transformCssText: function (cssText) {
-cssText = cssText.replace(VAR_MATCH, fixVars);
-cssText = cssText.replace(VAR_ASSIGN, produceCssProperties);
-return consumeCssProperties(cssText);
-}
-};
-ApplyShim._boundTransformRule = ApplyShim.transformRule.bind(ApplyShim);
-return ApplyShim;
-}();(function () {
-var prepElement = Polymer.Base._prepElement;
-var nativeShadow = Polymer.Settings.useNativeShadow;
-var styleUtil = Polymer.StyleUtil;
-var styleTransformer = Polymer.StyleTransformer;
-var styleExtends = Polymer.StyleExtends;
-var applyShim = Polymer.ApplyShim;
-var settings = Polymer.Settings;
-Polymer.Base._addFeature({
-_prepElement: function (element) {
-if (this._encapsulateStyle && this.__cssBuild !== 'shady') {
-styleTransformer.element(element, this.is, this._scopeCssViaAttr);
-}
-prepElement.call(this, element);
-},
-_prepStyles: function () {
-if (this._encapsulateStyle === undefined) {
-this._encapsulateStyle = !nativeShadow;
-}
-if (!nativeShadow) {
-this._scopeStyle = styleUtil.applyStylePlaceHolder(this.is);
-}
-this.__cssBuild = styleUtil.cssBuildTypeForModule(this.is);
-},
-_prepShimStyles: function () {
-if (this._template) {
-var hasTargetedCssBuild = styleUtil.isTargetedBuild(this.__cssBuild);
-if (settings.useNativeCSSProperties && this.__cssBuild === 'shadow' && hasTargetedCssBuild) {
-return;
-}
-this._styles = this._styles || this._collectStyles();
-if (settings.useNativeCSSProperties && !this.__cssBuild) {
-applyShim.transform(this._styles);
-}
-var cssText = settings.useNativeCSSProperties && hasTargetedCssBuild ? this._styles.length && this._styles[0].textContent.trim() : styleTransformer.elementStyles(this);
-this._prepStyleProperties();
-if (!this._needsStyleProperties() && cssText) {
-styleUtil.applyCss(cssText, this.is, nativeShadow ? this._template.content : null, this._scopeStyle);
-}
-} else {
-this._styles = [];
-}
-},
-_collectStyles: function () {
-var styles = [];
-var cssText = '', m$ = this.styleModules;
-if (m$) {
-for (var i = 0, l = m$.length, m; i < l && (m = m$[i]); i++) {
-cssText += styleUtil.cssFromModule(m);
-}
-}
-cssText += styleUtil.cssFromModule(this.is);
-var p = this._template && this._template.parentNode;
-if (this._template && (!p || p.id.toLowerCase() !== this.is)) {
-cssText += styleUtil.cssFromElement(this._template);
-}
-if (cssText) {
-var style = document.createElement('style');
-style.textContent = cssText;
-if (styleExtends.hasExtends(style.textContent)) {
-cssText = styleExtends.transform(style);
-}
-styles.push(style);
-}
-return styles;
-},
-_elementAdd: function (node) {
-if (this._encapsulateStyle) {
-if (node.__styleScoped) {
-node.__styleScoped = false;
-} else {
-styleTransformer.dom(node, this.is, this._scopeCssViaAttr);
-}
-}
-},
-_elementRemove: function (node) {
-if (this._encapsulateStyle) {
-styleTransformer.dom(node, this.is, this._scopeCssViaAttr, true);
-}
-},
-scopeSubtree: function (container, shouldObserve) {
-if (nativeShadow) {
-return;
-}
-var self = this;
-var scopify = function (node) {
-if (node.nodeType === Node.ELEMENT_NODE) {
-var className = node.getAttribute('class');
-node.setAttribute('class', self._scopeElementClass(node, className));
-var n$ = node.querySelectorAll('*');
-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
-className = n.getAttribute('class');
-n.setAttribute('class', self._scopeElementClass(n, className));
-}
-}
-};
-scopify(container);
-if (shouldObserve) {
-var mo = new MutationObserver(function (mxns) {
-for (var i = 0, m; i < mxns.length && (m = mxns[i]); i++) {
-if (m.addedNodes) {
-for (var j = 0; j < m.addedNodes.length; j++) {
-scopify(m.addedNodes[j]);
-}
-}
-}
-});
-mo.observe(container, {
-childList: true,
-subtree: true
-});
-return mo;
-}
-}
-});
-}());Polymer.StyleProperties = function () {
-'use strict';
-var matchesSelector = Polymer.DomApi.matchesSelector;
-var styleUtil = Polymer.StyleUtil;
-var styleTransformer = Polymer.StyleTransformer;
-var settings = Polymer.Settings;
-return {
-decorateStyles: function (styles, scope) {
-var self = this, props = {}, keyframes = [], ruleIndex = 0;
-var scopeSelector = styleTransformer._calcHostScope(scope.is, scope.extends);
-styleUtil.forRulesInStyles(styles, function (rule, style) {
-self.decorateRule(rule);
-rule.index = ruleIndex++;
-self.whenHostOrRootRule(scope, rule, style, function (info) {
-if (rule.parent.type === styleUtil.ruleTypes.MEDIA_RULE) {
-scope.__notStyleScopeCacheable = true;
-}
-if (info.isHost) {
-var hostContextOrFunction = info.selector.split(' ').some(function (s) {
-return s.indexOf(scopeSelector) === 0 && s.length !== scopeSelector.length;
-});
-scope.__notStyleScopeCacheable = scope.__notStyleScopeCacheable || hostContextOrFunction;
-}
-});
-self.collectPropertiesInCssText(rule.propertyInfo.cssText, props);
-}, function onKeyframesRule(rule) {
-keyframes.push(rule);
-});
-styles._keyframes = keyframes;
-var names = [];
-for (var i in props) {
-names.push(i);
-}
-return names;
-},
-decorateRule: function (rule) {
-if (rule.propertyInfo) {
-return rule.propertyInfo;
-}
-var info = {}, properties = {};
-var hasProperties = this.collectProperties(rule, properties);
-if (hasProperties) {
-info.properties = properties;
-rule.rules = null;
-}
-info.cssText = this.collectCssText(rule);
-rule.propertyInfo = info;
-return info;
-},
-collectProperties: function (rule, properties) {
-var info = rule.propertyInfo;
-if (info) {
-if (info.properties) {
-Polymer.Base.mixin(properties, info.properties);
-return true;
-}
-} else {
-var m, rx = this.rx.VAR_ASSIGN;
-var cssText = rule.parsedCssText;
-var any;
-while (m = rx.exec(cssText)) {
-properties[m[1].trim()] = (m[2] || m[3]).trim();
-any = true;
-}
-return any;
-}
-},
-collectCssText: function (rule) {
-return this.collectConsumingCssText(rule.parsedCssText);
-},
-collectConsumingCssText: function (cssText) {
-return cssText.replace(this.rx.BRACKETED, '').replace(this.rx.VAR_ASSIGN, '');
-},
-collectPropertiesInCssText: function (cssText, props) {
-var m;
-while (m = this.rx.VAR_CONSUMED.exec(cssText)) {
-var name = m[1];
-if (m[2] !== ':') {
-props[name] = true;
-}
-}
-},
-reify: function (props) {
-var names = Object.getOwnPropertyNames(props);
-for (var i = 0, n; i < names.length; i++) {
-n = names[i];
-props[n] = this.valueForProperty(props[n], props);
-}
-},
-valueForProperty: function (property, props) {
-if (property) {
-if (property.indexOf(';') >= 0) {
-property = this.valueForProperties(property, props);
-} else {
-var self = this;
-var fn = function (all, prefix, value, fallback) {
-var propertyValue = self.valueForProperty(props[value], props) || self.valueForProperty(props[fallback] || fallback, props) || fallback;
-return prefix + (propertyValue || '');
-};
-property = property.replace(this.rx.VAR_MATCH, fn);
-}
-}
-return property && property.trim() || '';
-},
-valueForProperties: function (property, props) {
-var parts = property.split(';');
-for (var i = 0, p, m; i < parts.length; i++) {
-if (p = parts[i]) {
-this.rx.MIXIN_MATCH.lastIndex = 0;
-m = this.rx.MIXIN_MATCH.exec(p);
-if (m) {
-p = this.valueForProperty(props[m[1]], props);
-} else {
-var colon = p.indexOf(':');
-if (colon !== -1) {
-var pp = p.substring(colon);
-pp = pp.trim();
-pp = this.valueForProperty(pp, props) || pp;
-p = p.substring(0, colon) + pp;
-}
-}
-parts[i] = p && p.lastIndexOf(';') === p.length - 1 ? p.slice(0, -1) : p || '';
-}
-}
-return parts.join(';');
-},
-applyProperties: function (rule, props) {
-var output = '';
-if (!rule.propertyInfo) {
-this.decorateRule(rule);
-}
-if (rule.propertyInfo.cssText) {
-output = this.valueForProperties(rule.propertyInfo.cssText, props);
-}
-rule.cssText = output;
-},
-applyKeyframeTransforms: function (rule, keyframeTransforms) {
-var input = rule.cssText;
-var output = rule.cssText;
-if (rule.hasAnimations == null) {
-rule.hasAnimations = this.rx.ANIMATION_MATCH.test(input);
-}
-if (rule.hasAnimations) {
-var transform;
-if (rule.keyframeNamesToTransform == null) {
-rule.keyframeNamesToTransform = [];
-for (var keyframe in keyframeTransforms) {
-transform = keyframeTransforms[keyframe];
-output = transform(input);
-if (input !== output) {
-input = output;
-rule.keyframeNamesToTransform.push(keyframe);
-}
-}
-} else {
-for (var i = 0; i < rule.keyframeNamesToTransform.length; ++i) {
-transform = keyframeTransforms[rule.keyframeNamesToTransform[i]];
-input = transform(input);
-}
-output = input;
-}
-}
-rule.cssText = output;
-},
-propertyDataFromStyles: function (styles, element) {
-var props = {}, self = this;
-var o = [];
-styleUtil.forActiveRulesInStyles(styles, function (rule) {
-if (!rule.propertyInfo) {
-self.decorateRule(rule);
-}
-var selectorToMatch = rule.transformedSelector || rule.parsedSelector;
-if (element && rule.propertyInfo.properties && selectorToMatch) {
-if (matchesSelector.call(element, selectorToMatch)) {
-self.collectProperties(rule, props);
-addToBitMask(rule.index, o);
-}
-}
-});
-return {
-properties: props,
-key: o
-};
-},
-whenHostOrRootRule: function (scope, rule, style, callback) {
-if (!rule.propertyInfo) {
-self.decorateRule(rule);
-}
-if (!rule.propertyInfo.properties) {
-return;
-}
-var hostScope = scope.is ? styleTransformer._calcHostScope(scope.is, scope.extends) : 'html';
-var parsedSelector = rule.parsedSelector;
-var isRoot = parsedSelector === ':root';
-var isHost = parsedSelector.indexOf(':host') === 0;
-var cssBuild = scope.__cssBuild || style.__cssBuild;
-if (cssBuild === 'shady') {
-isRoot = parsedSelector === hostScope + '> *.' + hostScope || parsedSelector.indexOf('html') !== -1;
-isHost = !isRoot && parsedSelector.indexOf(hostScope) === 0;
-}
-if (cssBuild === 'shadow') {
-isRoot = parsedSelector === ':host > *' || parsedSelector === 'html';
-isHost = isHost && !isRoot;
-}
-if (!isRoot && !isHost) {
-return;
-}
-var selectorToMatch = hostScope;
-if (isHost) {
-if (settings.useNativeShadow && !rule.transformedSelector) {
-rule.transformedSelector = styleTransformer._transformRuleCss(rule, styleTransformer._transformComplexSelector, scope.is, hostScope);
-}
-selectorToMatch = rule.transformedSelector || hostScope;
-}
-callback({
-selector: selectorToMatch,
-isHost: isHost,
-isRoot: isRoot
-});
-},
-hostAndRootPropertiesForScope: function (scope) {
-var hostProps = {}, rootProps = {}, self = this;
-styleUtil.forActiveRulesInStyles(scope._styles, function (rule, style) {
-self.whenHostOrRootRule(scope, rule, style, function (info) {
-var element = scope._element || scope;
-if (matchesSelector.call(element, info.selector)) {
-if (info.isHost) {
-self.collectProperties(rule, hostProps);
-} else {
-self.collectProperties(rule, rootProps);
-}
-}
-});
-});
-return {
-rootProps: rootProps,
-hostProps: hostProps
-};
-},
-transformStyles: function (element, properties, scopeSelector) {
-var self = this;
-var hostSelector = styleTransformer._calcHostScope(element.is, element.extends);
-var rxHostSelector = element.extends ? '\\' + hostSelector.slice(0, -1) + '\\]' : hostSelector;
-var hostRx = new RegExp(this.rx.HOST_PREFIX + rxHostSelector + this.rx.HOST_SUFFIX);
-var keyframeTransforms = this._elementKeyframeTransforms(element, scopeSelector);
-return styleTransformer.elementStyles(element, function (rule) {
-self.applyProperties(rule, properties);
-if (!settings.useNativeShadow && !Polymer.StyleUtil.isKeyframesSelector(rule) && rule.cssText) {
-self.applyKeyframeTransforms(rule, keyframeTransforms);
-self._scopeSelector(rule, hostRx, hostSelector, element._scopeCssViaAttr, scopeSelector);
-}
-});
-},
-_elementKeyframeTransforms: function (element, scopeSelector) {
-var keyframesRules = element._styles._keyframes;
-var keyframeTransforms = {};
-if (!settings.useNativeShadow && keyframesRules) {
-for (var i = 0, keyframesRule = keyframesRules[i]; i < keyframesRules.length; keyframesRule = keyframesRules[++i]) {
-this._scopeKeyframes(keyframesRule, scopeSelector);
-keyframeTransforms[keyframesRule.keyframesName] = this._keyframesRuleTransformer(keyframesRule);
-}
-}
-return keyframeTransforms;
-},
-_keyframesRuleTransformer: function (keyframesRule) {
-return function (cssText) {
-return cssText.replace(keyframesRule.keyframesNameRx, keyframesRule.transformedKeyframesName);
-};
-},
-_scopeKeyframes: function (rule, scopeId) {
-rule.keyframesNameRx = new RegExp(rule.keyframesName, 'g');
-rule.transformedKeyframesName = rule.keyframesName + '-' + scopeId;
-rule.transformedSelector = rule.transformedSelector || rule.selector;
-rule.selector = rule.transformedSelector.replace(rule.keyframesName, rule.transformedKeyframesName);
-},
-_scopeSelector: function (rule, hostRx, hostSelector, viaAttr, scopeId) {
-rule.transformedSelector = rule.transformedSelector || rule.selector;
-var selector = rule.transformedSelector;
-var scope = viaAttr ? '[' + styleTransformer.SCOPE_NAME + '~=' + scopeId + ']' : '.' + scopeId;
-var parts = selector.split(',');
-for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) {
-parts[i] = p.match(hostRx) ? p.replace(hostSelector, scope) : scope + ' ' + p;
-}
-rule.selector = parts.join(',');
-},
-applyElementScopeSelector: function (element, selector, old, viaAttr) {
-var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) : element.getAttribute('class') || '';
-var v = old ? c.replace(old, selector) : (c ? c + ' ' : '') + this.XSCOPE_NAME + ' ' + selector;
-if (c !== v) {
-if (viaAttr) {
-element.setAttribute(styleTransformer.SCOPE_NAME, v);
-} else {
-element.setAttribute('class', v);
-}
-}
-},
-applyElementStyle: function (element, properties, selector, style) {
-var cssText = style ? style.textContent || '' : this.transformStyles(element, properties, selector);
-var s = element._customStyle;
-if (s && !settings.useNativeShadow && s !== style) {
-s._useCount--;
-if (s._useCount <= 0 && s.parentNode) {
-s.parentNode.removeChild(s);
-}
-}
-if (settings.useNativeShadow) {
-if (element._customStyle) {
-element._customStyle.textContent = cssText;
-style = element._customStyle;
-} else if (cssText) {
-style = styleUtil.applyCss(cssText, selector, element.root, element._scopeStyle);
-}
-} else {
-if (!style) {
-if (cssText) {
-style = styleUtil.applyCss(cssText, selector, null, element._scopeStyle);
-}
-} else if (!style.parentNode) {
-styleUtil.applyStyle(style, null, element._scopeStyle);
-}
-}
-if (style) {
-style._useCount = style._useCount || 0;
-if (element._customStyle != style) {
-style._useCount++;
-}
-element._customStyle = style;
-}
-return style;
-},
-mixinCustomStyle: function (props, customStyle) {
-var v;
-for (var i in customStyle) {
-v = customStyle[i];
-if (v || v === 0) {
-props[i] = v;
-}
-}
-},
-updateNativeStyleProperties: function (element, properties) {
-for (var i = 0; i < element.style.length; i++) {
-element.style.removeProperty(element.style[i]);
-}
-for (var p in properties) {
-if (properties[p] !== null) {
-element.style.setProperty(p, properties[p]);
-}
-}
-},
-rx: styleUtil.rx,
-XSCOPE_NAME: 'x-scope'
-};
-function addToBitMask(n, bits) {
-var o = parseInt(n / 32);
-var v = 1 << n % 32;
-bits[o] = (bits[o] || 0) | v;
-}
-}();(function () {
-Polymer.StyleCache = function () {
-this.cache = {};
-};
-Polymer.StyleCache.prototype = {
-MAX: 100,
-store: function (is, data, keyValues, keyStyles) {
-data.keyValues = keyValues;
-data.styles = keyStyles;
-var s$ = this.cache[is] = this.cache[is] || [];
-s$.push(data);
-if (s$.length > this.MAX) {
-s$.shift();
-}
-},
-retrieve: function (is, keyValues, keyStyles) {
-var cache = this.cache[is];
-if (cache) {
-for (var i = cache.length - 1, data; i >= 0; i--) {
-data = cache[i];
-if (keyStyles === data.styles && this._objectsEqual(keyValues, data.keyValues)) {
-return data;
-}
-}
-}
-},
-clear: function () {
-this.cache = {};
-},
-_objectsEqual: function (target, source) {
-var t, s;
-for (var i in target) {
-t = target[i], s = source[i];
-if (!(typeof t === 'object' && t ? this._objectsStrictlyEqual(t, s) : t === s)) {
-return false;
-}
-}
-if (Array.isArray(target)) {
-return target.length === source.length;
-}
-return true;
-},
-_objectsStrictlyEqual: function (target, source) {
-return this._objectsEqual(target, source) && this._objectsEqual(source, target);
-}
-};
-}());Polymer.StyleDefaults = function () {
-var styleProperties = Polymer.StyleProperties;
-var StyleCache = Polymer.StyleCache;
-var nativeVariables = Polymer.Settings.useNativeCSSProperties;
-var api = {
-_styles: [],
-_properties: null,
-customStyle: {},
-_styleCache: new StyleCache(),
-_element: Polymer.DomApi.wrap(document.documentElement),
-addStyle: function (style) {
-this._styles.push(style);
-this._properties = null;
-},
-get _styleProperties() {
-if (!this._properties) {
-styleProperties.decorateStyles(this._styles, this);
-this._styles._scopeStyleProperties = null;
-this._properties = styleProperties.hostAndRootPropertiesForScope(this).rootProps;
-styleProperties.mixinCustomStyle(this._properties, this.customStyle);
-styleProperties.reify(this._properties);
-}
-return this._properties;
-},
-hasStyleProperties: function () {
-return Boolean(this._properties);
-},
-_needsStyleProperties: function () {
-},
-_computeStyleProperties: function () {
-return this._styleProperties;
-},
-updateStyles: function (properties) {
-this._properties = null;
-if (properties) {
-Polymer.Base.mixin(this.customStyle, properties);
-}
-this._styleCache.clear();
-for (var i = 0, s; i < this._styles.length; i++) {
-s = this._styles[i];
-s = s.__importElement || s;
-s._apply();
-}
-if (nativeVariables) {
-styleProperties.updateNativeStyleProperties(document.documentElement, this.customStyle);
-}
-}
-};
-return api;
-}();(function () {
-'use strict';
-var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute;
-var propertyUtils = Polymer.StyleProperties;
-var styleTransformer = Polymer.StyleTransformer;
-var styleDefaults = Polymer.StyleDefaults;
-var nativeShadow = Polymer.Settings.useNativeShadow;
-var nativeVariables = Polymer.Settings.useNativeCSSProperties;
-Polymer.Base._addFeature({
-_prepStyleProperties: function () {
-if (!nativeVariables) {
-this._ownStylePropertyNames = this._styles && this._styles.length ? propertyUtils.decorateStyles(this._styles, this) : null;
-}
-},
-customStyle: null,
-getComputedStyleValue: function (property) {
-return !nativeVariables && this._styleProperties && this._styleProperties[property] || getComputedStyle(this).getPropertyValue(property);
-},
-_setupStyleProperties: function () {
-this.customStyle = {};
-this._styleCache = null;
-this._styleProperties = null;
-this._scopeSelector = null;
-this._ownStyleProperties = null;
-this._customStyle = null;
-},
-_needsStyleProperties: function () {
-return Boolean(!nativeVariables && this._ownStylePropertyNames && this._ownStylePropertyNames.length);
-},
-_beforeAttached: function () {
-if ((!this._scopeSelector || this.__stylePropertiesInvalid) && this._needsStyleProperties()) {
-this.__stylePropertiesInvalid = false;
-this._updateStyleProperties();
-}
-},
-_findStyleHost: function () {
-var e = this, root;
-while (root = Polymer.dom(e).getOwnerRoot()) {
-if (Polymer.isInstance(root.host)) {
-return root.host;
-}
-e = root.host;
-}
-return styleDefaults;
-},
-_updateStyleProperties: function () {
-var info, scope = this._findStyleHost();
-if (!scope._styleCache) {
-scope._styleCache = new Polymer.StyleCache();
-}
-var scopeData = propertyUtils.propertyDataFromStyles(scope._styles, this);
-var scopeCacheable = !this.__notStyleScopeCacheable;
-if (scopeCacheable) {
-scopeData.key.customStyle = this.customStyle;
-info = scope._styleCache.retrieve(this.is, scopeData.key, this._styles);
-}
-var scopeCached = Boolean(info);
-if (scopeCached) {
-this._styleProperties = info._styleProperties;
-} else {
-this._computeStyleProperties(scopeData.properties);
-}
-this._computeOwnStyleProperties();
-if (!scopeCached) {
-info = styleCache.retrieve(this.is, this._ownStyleProperties, this._styles);
-}
-var globalCached = Boolean(info) && !scopeCached;
-var style = this._applyStyleProperties(info);
-if (!scopeCached) {
-style = style && nativeShadow ? style.cloneNode(true) : style;
-info = {
-style: style,
-_scopeSelector: this._scopeSelector,
-_styleProperties: this._styleProperties
-};
-if (scopeCacheable) {
-scopeData.key.customStyle = {};
-this.mixin(scopeData.key.customStyle, this.customStyle);
-scope._styleCache.store(this.is, info, scopeData.key, this._styles);
-}
-if (!globalCached) {
-styleCache.store(this.is, Object.create(info), this._ownStyleProperties, this._styles);
-}
-}
-},
-_computeStyleProperties: function (scopeProps) {
-var scope = this._findStyleHost();
-if (!scope._styleProperties) {
-scope._computeStyleProperties();
-}
-var props = Object.create(scope._styleProperties);
-var hostAndRootProps = propertyUtils.hostAndRootPropertiesForScope(this);
-this.mixin(props, hostAndRootProps.hostProps);
-scopeProps = scopeProps || propertyUtils.propertyDataFromStyles(scope._styles, this).properties;
-this.mixin(props, scopeProps);
-this.mixin(props, hostAndRootProps.rootProps);
-propertyUtils.mixinCustomStyle(props, this.customStyle);
-propertyUtils.reify(props);
-this._styleProperties = props;
-},
-_computeOwnStyleProperties: function () {
-var props = {};
-for (var i = 0, n; i < this._ownStylePropertyNames.length; i++) {
-n = this._ownStylePropertyNames[i];
-props[n] = this._styleProperties[n];
-}
-this._ownStyleProperties = props;
-},
-_scopeCount: 0,
-_applyStyleProperties: function (info) {
-var oldScopeSelector = this._scopeSelector;
-this._scopeSelector = info ? info._scopeSelector : this.is + '-' + this.__proto__._scopeCount++;
-var style = propertyUtils.applyElementStyle(this, this._styleProperties, this._scopeSelector, info && info.style);
-if (!nativeShadow) {
-propertyUtils.applyElementScopeSelector(this, this._scopeSelector, oldScopeSelector, this._scopeCssViaAttr);
-}
-return style;
-},
-serializeValueToAttribute: function (value, attribute, node) {
-node = node || this;
-if (attribute === 'class' && !nativeShadow) {
-var host = node === this ? this.domHost || this.dataHost : this;
-if (host) {
-value = host._scopeElementClass(node, value);
-}
-}
-node = this.shadyRoot && this.shadyRoot._hasDistributed ? Polymer.dom(node) : node;
-serializeValueToAttribute.call(this, value, attribute, node);
-},
-_scopeElementClass: function (element, selector) {
-if (!nativeShadow && !this._scopeCssViaAttr) {
-selector = (selector ? selector + ' ' : '') + SCOPE_NAME + ' ' + this.is + (element._scopeSelector ? ' ' + XSCOPE_NAME + ' ' + element._scopeSelector : '');
-}
-return selector;
-},
-updateStyles: function (properties) {
-if (properties) {
-this.mixin(this.customStyle, properties);
-}
-if (nativeVariables) {
-propertyUtils.updateNativeStyleProperties(this, this.customStyle);
-} else {
-if (this.isAttached) {
-if (this._needsStyleProperties()) {
-this._updateStyleProperties();
-} else {
-this._styleProperties = null;
-}
-} else {
-this.__stylePropertiesInvalid = true;
-}
-if (this._styleCache) {
-this._styleCache.clear();
-}
-this._updateRootStyles();
-}
-},
-_updateRootStyles: function (root) {
-root = root || this.root;
-var c$ = Polymer.dom(root)._query(function (e) {
-return e.shadyRoot || e.shadowRoot;
-});
-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
-if (c.updateStyles) {
-c.updateStyles();
-}
-}
-}
-});
-Polymer.updateStyles = function (properties) {
-styleDefaults.updateStyles(properties);
-Polymer.Base._updateRootStyles(document);
-};
-var styleCache = new Polymer.StyleCache();
-Polymer.customStyleCache = styleCache;
-var SCOPE_NAME = styleTransformer.SCOPE_NAME;
-var XSCOPE_NAME = propertyUtils.XSCOPE_NAME;
-}());Polymer.Base._addFeature({
-_registerFeatures: function () {
-this._prepIs();
-this._prepConstructor();
-this._prepStyles();
-},
-_finishRegisterFeatures: function () {
-this._prepTemplate();
-this._prepShimStyles();
-this._prepAnnotations();
-this._prepEffects();
-this._prepBehaviors();
-this._prepPropertyInfo();
-this._prepBindings();
-this._prepShady();
-},
-_prepBehavior: function (b) {
-this._addPropertyEffects(b.properties);
-this._addComplexObserverEffects(b.observers);
-this._addHostAttributes(b.hostAttributes);
-},
-_initFeatures: function () {
-this._setupGestures();
-this._setupConfigure();
-this._setupStyleProperties();
-this._setupDebouncers();
-this._setupShady();
-this._registerHost();
-if (this._template) {
-this._poolContent();
-this._beginHosting();
-this._stampTemplate();
-this._endHosting();
-this._marshalAnnotationReferences();
-}
-this._marshalInstanceEffects();
-this._marshalBehaviors();
-this._marshalHostAttributes();
-this._marshalAttributes();
-this._tryReady();
-},
-_marshalBehavior: function (b) {
-if (b.listeners) {
-this._listenListeners(b.listeners);
-}
-}
-});(function () {
-var propertyUtils = Polymer.StyleProperties;
-var styleUtil = Polymer.StyleUtil;
-var cssParse = Polymer.CssParse;
-var styleDefaults = Polymer.StyleDefaults;
-var styleTransformer = Polymer.StyleTransformer;
-var applyShim = Polymer.ApplyShim;
-var debounce = Polymer.Debounce;
-var settings = Polymer.Settings;
-var updateDebouncer;
-Polymer({
-is: 'custom-style',
-extends: 'style',
-_template: null,
-properties: { include: String },
-ready: function () {
-this.__appliedElement = this.__appliedElement || this;
-this.__cssBuild = styleUtil.getCssBuildType(this);
-if (this.__appliedElement !== this) {
-this.__appliedElement.__cssBuild = this.__cssBuild;
-}
-this._tryApply();
-},
-attached: function () {
-this._tryApply();
-},
-_tryApply: function () {
-if (!this._appliesToDocument) {
-if (this.parentNode && this.parentNode.localName !== 'dom-module') {
-this._appliesToDocument = true;
-var e = this.__appliedElement;
-if (!settings.useNativeCSSProperties) {
-this.__needsUpdateStyles = styleDefaults.hasStyleProperties();
-styleDefaults.addStyle(e);
-}
-if (e.textContent || this.include) {
-this._apply(true);
-} else {
-var self = this;
-var observer = new MutationObserver(function () {
-observer.disconnect();
-self._apply(true);
-});
-observer.observe(e, { childList: true });
-}
-}
-}
-},
-_updateStyles: function () {
-Polymer.updateStyles();
-},
-_apply: function (initialApply) {
-var e = this.__appliedElement;
-if (this.include) {
-e.textContent = styleUtil.cssFromModules(this.include, true) + e.textContent;
-}
-if (!e.textContent) {
-return;
-}
-var buildType = this.__cssBuild;
-var targetedBuild = styleUtil.isTargetedBuild(buildType);
-if (settings.useNativeCSSProperties && targetedBuild) {
-return;
-}
-var styleRules = styleUtil.rulesForStyle(e);
-if (!targetedBuild) {
-styleUtil.forEachRule(styleRules, function (rule) {
-styleTransformer.documentRule(rule);
-if (settings.useNativeCSSProperties && !buildType) {
-applyShim.transformRule(rule);
-}
-});
-}
-if (settings.useNativeCSSProperties) {
-e.textContent = styleUtil.toCssText(styleRules);
-} else {
-var self = this;
-var fn = function fn() {
-self._flushCustomProperties();
-};
-if (initialApply) {
-Polymer.RenderStatus.whenReady(fn);
-} else {
-fn();
-}
-}
-},
-_flushCustomProperties: function () {
-if (this.__needsUpdateStyles) {
-this.__needsUpdateStyles = false;
-updateDebouncer = debounce(updateDebouncer, this._updateStyles);
-} else {
-this._applyCustomProperties();
-}
-},
-_applyCustomProperties: function () {
-var element = this.__appliedElement;
-this._computeStyleProperties();
-var props = this._styleProperties;
-var rules = styleUtil.rulesForStyle(element);
-if (!rules) {
-return;
-}
-element.textContent = styleUtil.toCssText(rules, function (rule) {
-var css = rule.cssText = rule.parsedCssText;
-if (rule.propertyInfo && rule.propertyInfo.cssText) {
-css = cssParse.removeCustomPropAssignment(css);
-rule.cssText = propertyUtils.valueForProperties(css, props);
-}
-});
-}
-});
-}());Polymer.Templatizer = {
-properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } },
-_instanceProps: Polymer.nob,
-_parentPropPrefix: '_parent_',
-templatize: function (template) {
-this._templatized = template;
-if (!template._content) {
-template._content = template.content;
-}
-if (template._content._ctor) {
-this.ctor = template._content._ctor;
-this._prepParentProperties(this.ctor.prototype, template);
-return;
-}
-var archetype = Object.create(Polymer.Base);
-this._customPrepAnnotations(archetype, template);
-this._prepParentProperties(archetype, template);
-archetype._prepEffects();
-this._customPrepEffects(archetype);
-archetype._prepBehaviors();
-archetype._prepPropertyInfo();
-archetype._prepBindings();
-archetype._notifyPathUp = this._notifyPathUpImpl;
-archetype._scopeElementClass = this._scopeElementClassImpl;
-archetype.listen = this._listenImpl;
-archetype._showHideChildren = this._showHideChildrenImpl;
-archetype.__setPropertyOrig = this.__setProperty;
-archetype.__setProperty = this.__setPropertyImpl;
-var _constructor = this._constructorImpl;
-var ctor = function TemplateInstance(model, host) {
-_constructor.call(this, model, host);
-};
-ctor.prototype = archetype;
-archetype.constructor = ctor;
-template._content._ctor = ctor;
-this.ctor = ctor;
-},
-_getRootDataHost: function () {
-return this.dataHost && this.dataHost._rootDataHost || this.dataHost;
-},
-_showHideChildrenImpl: function (hide) {
-var c = this._children;
-for (var i = 0; i < c.length; i++) {
-var n = c[i];
-if (Boolean(hide) != Boolean(n.__hideTemplateChildren__)) {
-if (n.nodeType === Node.TEXT_NODE) {
-if (hide) {
-n.__polymerTextContent__ = n.textContent;
-n.textContent = '';
-} else {
-n.textContent = n.__polymerTextContent__;
-}
-} else if (n.style) {
-if (hide) {
-n.__polymerDisplay__ = n.style.display;
-n.style.display = 'none';
-} else {
-n.style.display = n.__polymerDisplay__;
-}
-}
-}
-n.__hideTemplateChildren__ = hide;
-}
-},
-__setPropertyImpl: function (property, value, fromAbove, node) {
-if (node && node.__hideTemplateChildren__ && property == 'textContent') {
-property = '__polymerTextContent__';
-}
-this.__setPropertyOrig(property, value, fromAbove, node);
-},
-_debounceTemplate: function (fn) {
-Polymer.dom.addDebouncer(this.debounce('_debounceTemplate', fn));
-},
-_flushTemplates: function () {
-Polymer.dom.flush();
-},
-_customPrepEffects: function (archetype) {
-var parentProps = archetype._parentProps;
-for (var prop in parentProps) {
-archetype._addPropertyEffect(prop, 'function', this._createHostPropEffector(prop));
-}
-for (prop in this._instanceProps) {
-archetype._addPropertyEffect(prop, 'function', this._createInstancePropEffector(prop));
-}
-},
-_customPrepAnnotations: function (archetype, template) {
-archetype._template = template;
-var c = template._content;
-if (!c._notes) {
-var rootDataHost = archetype._rootDataHost;
-if (rootDataHost) {
-Polymer.Annotations.prepElement = function () {
-rootDataHost._prepElement();
-};
-}
-c._notes = Polymer.Annotations.parseAnnotations(template);
-Polymer.Annotations.prepElement = null;
-this._processAnnotations(c._notes);
-}
-archetype._notes = c._notes;
-archetype._parentProps = c._parentProps;
-},
-_prepParentProperties: function (archetype, template) {
-var parentProps = this._parentProps = archetype._parentProps;
-if (this._forwardParentProp && parentProps) {
-var proto = archetype._parentPropProto;
-var prop;
-if (!proto) {
-for (prop in this._instanceProps) {
-delete parentProps[prop];
-}
-proto = archetype._parentPropProto = Object.create(null);
-if (template != this) {
-Polymer.Bind.prepareModel(proto);
-Polymer.Base.prepareModelNotifyPath(proto);
-}
-for (prop in parentProps) {
-var parentProp = this._parentPropPrefix + prop;
-var effects = [
-{
-kind: 'function',
-effect: this._createForwardPropEffector(prop),
-fn: Polymer.Bind._functionEffect
-},
-{
-kind: 'notify',
-fn: Polymer.Bind._notifyEffect,
-effect: { event: Polymer.CaseMap.camelToDashCase(parentProp) + '-changed' }
-}
-];
-Polymer.Bind._createAccessors(proto, parentProp, effects);
-}
-}
-var self = this;
-if (template != this) {
-Polymer.Bind.prepareInstance(template);
-template._forwardParentProp = function (source, value) {
-self._forwardParentProp(source, value);
-};
-}
-this._extendTemplate(template, proto);
-template._pathEffector = function (path, value, fromAbove) {
-return self._pathEffectorImpl(path, value, fromAbove);
-};
-}
-},
-_createForwardPropEffector: function (prop) {
-return function (source, value) {
-this._forwardParentProp(prop, value);
-};
-},
-_createHostPropEffector: function (prop) {
-var prefix = this._parentPropPrefix;
-return function (source, value) {
-this.dataHost._templatized[prefix + prop] = value;
-};
-},
-_createInstancePropEffector: function (prop) {
-return function (source, value, old, fromAbove) {
-if (!fromAbove) {
-this.dataHost._forwardInstanceProp(this, prop, value);
-}
-};
-},
-_extendTemplate: function (template, proto) {
-var n$ = Object.getOwnPropertyNames(proto);
-if (proto._propertySetter) {
-template._propertySetter = proto._propertySetter;
-}
-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {
-var val = template[n];
-var pd = Object.getOwnPropertyDescriptor(proto, n);
-Object.defineProperty(template, n, pd);
-if (val !== undefined) {
-template._propertySetter(n, val);
-}
-}
-},
-_showHideChildren: function (hidden) {
-},
-_forwardInstancePath: function (inst, path, value) {
-},
-_forwardInstanceProp: function (inst, prop, value) {
-},
-_notifyPathUpImpl: function (path, value) {
-var dataHost = this.dataHost;
-var dot = path.indexOf('.');
-var root = dot < 0 ? path : path.slice(0, dot);
-dataHost._forwardInstancePath.call(dataHost, this, path, value);
-if (root in dataHost._parentProps) {
-dataHost._templatized._notifyPath(dataHost._parentPropPrefix + path, value);
-}
-},
-_pathEffectorImpl: function (path, value, fromAbove) {
-if (this._forwardParentPath) {
-if (path.indexOf(this._parentPropPrefix) === 0) {
-var subPath = path.substring(this._parentPropPrefix.length);
-var model = this._modelForPath(subPath);
-if (model in this._parentProps) {
-this._forwardParentPath(subPath, value);
-}
-}
-}
-Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove);
-},
-_constructorImpl: function (model, host) {
-this._rootDataHost = host._getRootDataHost();
-this._setupConfigure(model);
-this._registerHost(host);
-this._beginHosting();
-this.root = this.instanceTemplate(this._template);
-this.root.__noContent = !this._notes._hasContent;
-this.root.__styleScoped = true;
-this._endHosting();
-this._marshalAnnotatedNodes();
-this._marshalInstanceEffects();
-this._marshalAnnotatedListeners();
-var children = [];
-for (var n = this.root.firstChild; n; n = n.nextSibling) {
-children.push(n);
-n._templateInstance = this;
-}
-this._children = children;
-if (host.__hideTemplateChildren__) {
-this._showHideChildren(true);
-}
-this._tryReady();
-},
-_listenImpl: function (node, eventName, methodName) {
-var model = this;
-var host = this._rootDataHost;
-var handler = host._createEventHandler(node, eventName, methodName);
-var decorated = function (e) {
-e.model = model;
-handler(e);
-};
-host._listen(node, eventName, decorated);
-},
-_scopeElementClassImpl: function (node, value) {
-var host = this._rootDataHost;
-if (host) {
-return host._scopeElementClass(node, value);
-}
-return value;
-},
-stamp: function (model) {
-model = model || {};
-if (this._parentProps) {
-var templatized = this._templatized;
-for (var prop in this._parentProps) {
-if (model[prop] === undefined) {
-model[prop] = templatized[this._parentPropPrefix + prop];
-}
-}
-}
-return new this.ctor(model, this);
-},
-modelForElement: function (el) {
-var model;
-while (el) {
-if (model = el._templateInstance) {
-if (model.dataHost != this) {
-el = model.dataHost;
-} else {
-return model;
-}
-} else {
-el = el.parentNode;
-}
-}
-}
-};Polymer({
-is: 'dom-template',
-extends: 'template',
-_template: null,
-behaviors: [Polymer.Templatizer],
-ready: function () {
-this.templatize(this);
-}
-});Polymer._collections = new WeakMap();
-Polymer.Collection = function (userArray) {
-Polymer._collections.set(userArray, this);
-this.userArray = userArray;
-this.store = userArray.slice();
-this.initMap();
-};
-Polymer.Collection.prototype = {
-constructor: Polymer.Collection,
-initMap: function () {
-var omap = this.omap = new WeakMap();
-var pmap = this.pmap = {};
-var s = this.store;
-for (var i = 0; i < s.length; i++) {
-var item = s[i];
-if (item && typeof item == 'object') {
-omap.set(item, i);
-} else {
-pmap[item] = i;
-}
-}
-},
-add: function (item) {
-var key = this.store.push(item) - 1;
-if (item && typeof item == 'object') {
-this.omap.set(item, key);
-} else {
-this.pmap[item] = key;
-}
-return '#' + key;
-},
-removeKey: function (key) {
-if (key = this._parseKey(key)) {
-this._removeFromMap(this.store[key]);
-delete this.store[key];
-}
-},
-_removeFromMap: function (item) {
-if (item && typeof item == 'object') {
-this.omap.delete(item);
-} else {
-delete this.pmap[item];
-}
-},
-remove: function (item) {
-var key = this.getKey(item);
-this.removeKey(key);
-return key;
-},
-getKey: function (item) {
-var key;
-if (item && typeof item == 'object') {
-key = this.omap.get(item);
-} else {
-key = this.pmap[item];
-}
-if (key != undefined) {
-return '#' + key;
-}
-},
-getKeys: function () {
-return Object.keys(this.store).map(function (key) {
-return '#' + key;
-});
-},
-_parseKey: function (key) {
-if (key && key[0] == '#') {
-return key.slice(1);
-}
-},
-setItem: function (key, item) {
-if (key = this._parseKey(key)) {
-var old = this.store[key];
-if (old) {
-this._removeFromMap(old);
-}
-if (item && typeof item == 'object') {
-this.omap.set(item, key);
-} else {
-this.pmap[item] = key;
-}
-this.store[key] = item;
-}
-},
-getItem: function (key) {
-if (key = this._parseKey(key)) {
-return this.store[key];
-}
-},
-getItems: function () {
-var items = [], store = this.store;
-for (var key in store) {
-items.push(store[key]);
-}
-return items;
-},
-_applySplices: function (splices) {
-var keyMap = {}, key;
-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
-s.addedKeys = [];
-for (var j = 0; j < s.removed.length; j++) {
-key = this.getKey(s.removed[j]);
-keyMap[key] = keyMap[key] ? null : -1;
-}
-for (j = 0; j < s.addedCount; j++) {
-var item = this.userArray[s.index + j];
-key = this.getKey(item);
-key = key === undefined ? this.add(item) : key;
-keyMap[key] = keyMap[key] ? null : 1;
-s.addedKeys.push(key);
-}
-}
-var removed = [];
-var added = [];
-for (key in keyMap) {
-if (keyMap[key] < 0) {
-this.removeKey(key);
-removed.push(key);
-}
-if (keyMap[key] > 0) {
-added.push(key);
-}
-}
-return [{
-removed: removed,
-added: added
-}];
-}
-};
-Polymer.Collection.get = function (userArray) {
-return Polymer._collections.get(userArray) || new Polymer.Collection(userArray);
-};
-Polymer.Collection.applySplices = function (userArray, splices) {
-var coll = Polymer._collections.get(userArray);
-return coll ? coll._applySplices(splices) : null;
-};Polymer({
-is: 'dom-repeat',
-extends: 'template',
-_template: null,
-properties: {
-items: { type: Array },
-as: {
-type: String,
-value: 'item'
-},
-indexAs: {
-type: String,
-value: 'index'
-},
-sort: {
-type: Function,
-observer: '_sortChanged'
-},
-filter: {
-type: Function,
-observer: '_filterChanged'
-},
-observe: {
-type: String,
-observer: '_observeChanged'
-},
-delay: Number,
-renderedItemCount: {
-type: Number,
-notify: true,
-readOnly: true
-},
-initialCount: {
-type: Number,
-observer: '_initializeChunking'
-},
-targetFramerate: {
-type: Number,
-value: 20
-},
-_targetFrameTime: {
-type: Number,
-computed: '_computeFrameTime(targetFramerate)'
-}
-},
-behaviors: [Polymer.Templatizer],
-observers: ['_itemsChanged(items.*)'],
-created: function () {
-this._instances = [];
-this._pool = [];
-this._limit = Infinity;
-var self = this;
-this._boundRenderChunk = function () {
-self._renderChunk();
-};
-},
-detached: function () {
-this.__isDetached = true;
-for (var i = 0; i < this._instances.length; i++) {
-this._detachInstance(i);
-}
-},
-attached: function () {
-if (this.__isDetached) {
-this.__isDetached = false;
-var parent = Polymer.dom(Polymer.dom(this).parentNode);
-for (var i = 0; i < this._instances.length; i++) {
-this._attachInstance(i, parent);
-}
-}
-},
-ready: function () {
-this._instanceProps = { __key__: true };
-this._instanceProps[this.as] = true;
-this._instanceProps[this.indexAs] = true;
-if (!this.ctor) {
-this.templatize(this);
-}
-},
-_sortChanged: function (sort) {
-var dataHost = this._getRootDataHost();
-this._sortFn = sort && (typeof sort == 'function' ? sort : function () {
-return dataHost[sort].apply(dataHost, arguments);
-});
-this._needFullRefresh = true;
-if (this.items) {
-this._debounceTemplate(this._render);
-}
-},
-_filterChanged: function (filter) {
-var dataHost = this._getRootDataHost();
-this._filterFn = filter && (typeof filter == 'function' ? filter : function () {
-return dataHost[filter].apply(dataHost, arguments);
-});
-this._needFullRefresh = true;
-if (this.items) {
-this._debounceTemplate(this._render);
-}
-},
-_computeFrameTime: function (rate) {
-return Math.ceil(1000 / rate);
-},
-_initializeChunking: function () {
-if (this.initialCount) {
-this._limit = this.initialCount;
-this._chunkCount = this.initialCount;
-this._lastChunkTime = performance.now();
-}
-},
-_tryRenderChunk: function () {
-if (this.items && this._limit < this.items.length) {
-this.debounce('renderChunk', this._requestRenderChunk);
-}
-},
-_requestRenderChunk: function () {
-requestAnimationFrame(this._boundRenderChunk);
-},
-_renderChunk: function () {
-var currChunkTime = performance.now();
-var ratio = this._targetFrameTime / (currChunkTime - this._lastChunkTime);
-this._chunkCount = Math.round(this._chunkCount * ratio) || 1;
-this._limit += this._chunkCount;
-this._lastChunkTime = currChunkTime;
-this._debounceTemplate(this._render);
-},
-_observeChanged: function () {
-this._observePaths = this.observe && this.observe.replace('.*', '.').split(' ');
-},
-_itemsChanged: function (change) {
-if (change.path == 'items') {
-if (Array.isArray(this.items)) {
-this.collection = Polymer.Collection.get(this.items);
-} else if (!this.items) {
-this.collection = null;
-} else {
-this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));
-}
-this._keySplices = [];
-this._indexSplices = [];
-this._needFullRefresh = true;
-this._initializeChunking();
-this._debounceTemplate(this._render);
-} else if (change.path == 'items.splices') {
-this._keySplices = this._keySplices.concat(change.value.keySplices);
-this._indexSplices = this._indexSplices.concat(change.value.indexSplices);
-this._debounceTemplate(this._render);
-} else {
-var subpath = change.path.slice(6);
-this._forwardItemPath(subpath, change.value);
-this._checkObservedPaths(subpath);
-}
-},
-_checkObservedPaths: function (path) {
-if (this._observePaths) {
-path = path.substring(path.indexOf('.') + 1);
-var paths = this._observePaths;
-for (var i = 0; i < paths.length; i++) {
-if (path.indexOf(paths[i]) === 0) {
-this._needFullRefresh = true;
-if (this.delay) {
-this.debounce('render', this._render, this.delay);
-} else {
-this._debounceTemplate(this._render);
-}
-return;
-}
-}
-}
-},
-render: function () {
-this._needFullRefresh = true;
-this._debounceTemplate(this._render);
-this._flushTemplates();
-},
-_render: function () {
-if (this._needFullRefresh) {
-this._applyFullRefresh();
-this._needFullRefresh = false;
-} else if (this._keySplices.length) {
-if (this._sortFn) {
-this._applySplicesUserSort(this._keySplices);
-} else {
-if (this._filterFn) {
-this._applyFullRefresh();
-} else {
-this._applySplicesArrayOrder(this._indexSplices);
-}
-}
-} else {
-}
-this._keySplices = [];
-this._indexSplices = [];
-var keyToIdx = this._keyToInstIdx = {};
-for (var i = this._instances.length - 1; i >= 0; i--) {
-var inst = this._instances[i];
-if (inst.isPlaceholder && i < this._limit) {
-inst = this._insertInstance(i, inst.__key__);
-} else if (!inst.isPlaceholder && i >= this._limit) {
-inst = this._downgradeInstance(i, inst.__key__);
-}
-keyToIdx[inst.__key__] = i;
-if (!inst.isPlaceholder) {
-inst.__setProperty(this.indexAs, i, true);
-}
-}
-this._pool.length = 0;
-this._setRenderedItemCount(this._instances.length);
-this.fire('dom-change');
-this._tryRenderChunk();
-},
-_applyFullRefresh: function () {
-var c = this.collection;
-var keys;
-if (this._sortFn) {
-keys = c ? c.getKeys() : [];
-} else {
-keys = [];
-var items = this.items;
-if (items) {
-for (var i = 0; i < items.length; i++) {
-keys.push(c.getKey(items[i]));
-}
-}
-}
-var self = this;
-if (this._filterFn) {
-keys = keys.filter(function (a) {
-return self._filterFn(c.getItem(a));
-});
-}
-if (this._sortFn) {
-keys.sort(function (a, b) {
-return self._sortFn(c.getItem(a), c.getItem(b));
-});
-}
-for (i = 0; i < keys.length; i++) {
-var key = keys[i];
-var inst = this._instances[i];
-if (inst) {
-inst.__key__ = key;
-if (!inst.isPlaceholder && i < this._limit) {
-inst.__setProperty(this.as, c.getItem(key), true);
-}
-} else if (i < this._limit) {
-this._insertInstance(i, key);
-} else {
-this._insertPlaceholder(i, key);
-}
-}
-for (var j = this._instances.length - 1; j >= i; j--) {
-this._detachAndRemoveInstance(j);
-}
-},
-_numericSort: function (a, b) {
-return a - b;
-},
-_applySplicesUserSort: function (splices) {
-var c = this.collection;
-var keyMap = {};
-var key;
-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
-for (var j = 0; j < s.removed.length; j++) {
-key = s.removed[j];
-keyMap[key] = keyMap[key] ? null : -1;
-}
-for (j = 0; j < s.added.length; j++) {
-key = s.added[j];
-keyMap[key] = keyMap[key] ? null : 1;
-}
-}
-var removedIdxs = [];
-var addedKeys = [];
-for (key in keyMap) {
-if (keyMap[key] === -1) {
-removedIdxs.push(this._keyToInstIdx[key]);
-}
-if (keyMap[key] === 1) {
-addedKeys.push(key);
-}
-}
-if (removedIdxs.length) {
-removedIdxs.sort(this._numericSort);
-for (i = removedIdxs.length - 1; i >= 0; i--) {
-var idx = removedIdxs[i];
-if (idx !== undefined) {
-this._detachAndRemoveInstance(idx);
-}
-}
-}
-var self = this;
-if (addedKeys.length) {
-if (this._filterFn) {
-addedKeys = addedKeys.filter(function (a) {
-return self._filterFn(c.getItem(a));
-});
-}
-addedKeys.sort(function (a, b) {
-return self._sortFn(c.getItem(a), c.getItem(b));
-});
-var start = 0;
-for (i = 0; i < addedKeys.length; i++) {
-start = this._insertRowUserSort(start, addedKeys[i]);
-}
-}
-},
-_insertRowUserSort: function (start, key) {
-var c = this.collection;
-var item = c.getItem(key);
-var end = this._instances.length - 1;
-var idx = -1;
-while (start <= end) {
-var mid = start + end >> 1;
-var midKey = this._instances[mid].__key__;
-var cmp = this._sortFn(c.getItem(midKey), item);
-if (cmp < 0) {
-start = mid + 1;
-} else if (cmp > 0) {
-end = mid - 1;
-} else {
-idx = mid;
-break;
-}
-}
-if (idx < 0) {
-idx = end + 1;
-}
-this._insertPlaceholder(idx, key);
-return idx;
-},
-_applySplicesArrayOrder: function (splices) {
-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {
-for (var j = 0; j < s.removed.length; j++) {
-this._detachAndRemoveInstance(s.index);
-}
-for (j = 0; j < s.addedKeys.length; j++) {
-this._insertPlaceholder(s.index + j, s.addedKeys[j]);
-}
-}
-},
-_detachInstance: function (idx) {
-var inst = this._instances[idx];
-if (!inst.isPlaceholder) {
-for (var i = 0; i < inst._children.length; i++) {
-var el = inst._children[i];
-Polymer.dom(inst.root).appendChild(el);
-}
-return inst;
-}
-},
-_attachInstance: function (idx, parent) {
-var inst = this._instances[idx];
-if (!inst.isPlaceholder) {
-parent.insertBefore(inst.root, this);
-}
-},
-_detachAndRemoveInstance: function (idx) {
-var inst = this._detachInstance(idx);
-if (inst) {
-this._pool.push(inst);
-}
-this._instances.splice(idx, 1);
-},
-_insertPlaceholder: function (idx, key) {
-this._instances.splice(idx, 0, {
-isPlaceholder: true,
-__key__: key
-});
-},
-_stampInstance: function (idx, key) {
-var model = { __key__: key };
-model[this.as] = this.collection.getItem(key);
-model[this.indexAs] = idx;
-return this.stamp(model);
-},
-_insertInstance: function (idx, key) {
-var inst = this._pool.pop();
-if (inst) {
-inst.__setProperty(this.as, this.collection.getItem(key), true);
-inst.__setProperty('__key__', key, true);
-} else {
-inst = this._stampInstance(idx, key);
-}
-var beforeRow = this._instances[idx + 1];
-var beforeNode = beforeRow && !beforeRow.isPlaceholder ? beforeRow._children[0] : this;
-var parentNode = Polymer.dom(this).parentNode;
-Polymer.dom(parentNode).insertBefore(inst.root, beforeNode);
-this._instances[idx] = inst;
-return inst;
-},
-_downgradeInstance: function (idx, key) {
-var inst = this._detachInstance(idx);
-if (inst) {
-this._pool.push(inst);
-}
-inst = {
-isPlaceholder: true,
-__key__: key
-};
-this._instances[idx] = inst;
-return inst;
-},
-_showHideChildren: function (hidden) {
-for (var i = 0; i < this._instances.length; i++) {
-this._instances[i]._showHideChildren(hidden);
-}
-},
-_forwardInstanceProp: function (inst, prop, value) {
-if (prop == this.as) {
-var idx;
-if (this._sortFn || this._filterFn) {
-idx = this.items.indexOf(this.collection.getItem(inst.__key__));
-} else {
-idx = inst[this.indexAs];
-}
-this.set('items.' + idx, value);
-}
-},
-_forwardInstancePath: function (inst, path, value) {
-if (path.indexOf(this.as + '.') === 0) {
-this._notifyPath('items.' + inst.__key__ + '.' + path.slice(this.as.length + 1), value);
-}
-},
-_forwardParentProp: function (prop, value) {
-var i$ = this._instances;
-for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) {
-if (!inst.isPlaceholder) {
-inst.__setProperty(prop, value, true);
-}
-}
-},
-_forwardParentPath: function (path, value) {
-var i$ = this._instances;
-for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) {
-if (!inst.isPlaceholder) {
-inst._notifyPath(path, value, true);
-}
-}
-},
-_forwardItemPath: function (path, value) {
-if (this._keyToInstIdx) {
-var dot = path.indexOf('.');
-var key = path.substring(0, dot < 0 ? path.length : dot);
-var idx = this._keyToInstIdx[key];
-var inst = this._instances[idx];
-if (inst && !inst.isPlaceholder) {
-if (dot >= 0) {
-path = this.as + '.' + path.substring(dot + 1);
-inst._notifyPath(path, value, true);
-} else {
-inst.__setProperty(this.as, value, true);
-}
-}
-}
-},
-itemForElement: function (el) {
-var instance = this.modelForElement(el);
-return instance && instance[this.as];
-},
-keyForElement: function (el) {
-var instance = this.modelForElement(el);
-return instance && instance.__key__;
-},
-indexForElement: function (el) {
-var instance = this.modelForElement(el);
-return instance && instance[this.indexAs];
-}
-});Polymer({
-is: 'array-selector',
-_template: null,
-properties: {
-items: {
-type: Array,
-observer: 'clearSelection'
-},
-multi: {
-type: Boolean,
-value: false,
-observer: 'clearSelection'
-},
-selected: {
-type: Object,
-notify: true
-},
-selectedItem: {
-type: Object,
-notify: true
-},
-toggle: {
-type: Boolean,
-value: false
-}
-},
-clearSelection: function () {
-if (Array.isArray(this.selected)) {
-for (var i = 0; i < this.selected.length; i++) {
-this.unlinkPaths('selected.' + i);
-}
-} else {
-this.unlinkPaths('selected');
-this.unlinkPaths('selectedItem');
-}
-if (this.multi) {
-if (!this.selected || this.selected.length) {
-this.selected = [];
-this._selectedColl = Polymer.Collection.get(this.selected);
-}
-} else {
-this.selected = null;
-this._selectedColl = null;
-}
-this.selectedItem = null;
-},
-isSelected: function (item) {
-if (this.multi) {
-return this._selectedColl.getKey(item) !== undefined;
-} else {
-return this.selected == item;
-}
-},
-deselect: function (item) {
-if (this.multi) {
-if (this.isSelected(item)) {
-var skey = this._selectedColl.getKey(item);
-this.arrayDelete('selected', item);
-this.unlinkPaths('selected.' + skey);
-}
-} else {
-this.selected = null;
-this.selectedItem = null;
-this.unlinkPaths('selected');
-this.unlinkPaths('selectedItem');
-}
-},
-select: function (item) {
-var icol = Polymer.Collection.get(this.items);
-var key = icol.getKey(item);
-if (this.multi) {
-if (this.isSelected(item)) {
-if (this.toggle) {
-this.deselect(item);
-}
-} else {
-this.push('selected', item);
-var skey = this._selectedColl.getKey(item);
-this.linkPaths('selected.' + skey, 'items.' + key);
-}
-} else {
-if (this.toggle && item == this.selected) {
-this.deselect();
-} else {
-this.selected = item;
-this.selectedItem = item;
-this.linkPaths('selected', 'items.' + key);
-this.linkPaths('selectedItem', 'items.' + key);
-}
-}
-}
-});Polymer({
-is: 'dom-if',
-extends: 'template',
-_template: null,
-properties: {
-'if': {
-type: Boolean,
-value: false,
-observer: '_queueRender'
-},
-restamp: {
-type: Boolean,
-value: false,
-observer: '_queueRender'
-}
-},
-behaviors: [Polymer.Templatizer],
-_queueRender: function () {
-this._debounceTemplate(this._render);
-},
-detached: function () {
-if (!this.parentNode || this.parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (!Polymer.Settings.hasShadow || !(this.parentNode instanceof ShadowRoot))) {
-this._teardownInstance();
-}
-},
-attached: function () {
-if (this.if && this.ctor) {
-this.async(this._ensureInstance);
-}
-},
-render: function () {
-this._flushTemplates();
-},
-_render: function () {
-if (this.if) {
-if (!this.ctor) {
-this.templatize(this);
-}
-this._ensureInstance();
-this._showHideChildren();
-} else if (this.restamp) {
-this._teardownInstance();
-}
-if (!this.restamp && this._instance) {
-this._showHideChildren();
-}
-if (this.if != this._lastIf) {
-this.fire('dom-change');
-this._lastIf = this.if;
-}
-},
-_ensureInstance: function () {
-var parentNode = Polymer.dom(this).parentNode;
-if (parentNode) {
-var parent = Polymer.dom(parentNode);
-if (!this._instance) {
-this._instance = this.stamp();
-var root = this._instance.root;
-parent.insertBefore(root, this);
-} else {
-var c$ = this._instance._children;
-if (c$ && c$.length) {
-var lastChild = Polymer.dom(this).previousSibling;
-if (lastChild !== c$[c$.length - 1]) {
-for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
-parent.insertBefore(n, this);
-}
-}
-}
-}
-}
-},
-_teardownInstance: function () {
-if (this._instance) {
-var c$ = this._instance._children;
-if (c$ && c$.length) {
-var parent = Polymer.dom(Polymer.dom(c$[0]).parentNode);
-for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
-parent.removeChild(n);
-}
-}
-this._instance = null;
-}
-},
-_showHideChildren: function () {
-var hidden = this.__hideTemplateChildren__ || !this.if;
-if (this._instance) {
-this._instance._showHideChildren(hidden);
-}
-},
-_forwardParentProp: function (prop, value) {
-if (this._instance) {
-this._instance[prop] = value;
-}
-},
-_forwardParentPath: function (path, value) {
-if (this._instance) {
-this._instance._notifyPath(path, value, true);
-}
-}
-});Polymer({
-is: 'dom-bind',
-extends: 'template',
-_template: null,
-created: function () {
-var self = this;
-Polymer.RenderStatus.whenReady(function () {
-if (document.readyState == 'loading') {
-document.addEventListener('DOMContentLoaded', function () {
-self._markImportsReady();
-});
-} else {
-self._markImportsReady();
-}
-});
-},
-_ensureReady: function () {
-if (!this._readied) {
-this._readySelf();
-}
-},
-_markImportsReady: function () {
-this._importsReady = true;
-this._ensureReady();
-},
-_registerFeatures: function () {
-this._prepConstructor();
-},
-_insertChildren: function () {
-var parentDom = Polymer.dom(Polymer.dom(this).parentNode);
-parentDom.insertBefore(this.root, this);
-},
-_removeChildren: function () {
-if (this._children) {
-for (var i = 0; i < this._children.length; i++) {
-this.root.appendChild(this._children[i]);
-}
-}
-},
-_initFeatures: function () {
-},
-_scopeElementClass: function (element, selector) {
-if (this.dataHost) {
-return this.dataHost._scopeElementClass(element, selector);
-} else {
-return selector;
-}
-},
-_prepConfigure: function () {
-var config = {};
-for (var prop in this._propertyEffects) {
-config[prop] = this[prop];
-}
-var setupConfigure = this._setupConfigure;
-this._setupConfigure = function () {
-setupConfigure.call(this, config);
-};
-},
-attached: function () {
-if (this._importsReady) {
-this.render();
-}
-},
-detached: function () {
-this._removeChildren();
-},
-render: function () {
-this._ensureReady();
-if (!this._children) {
-this._template = this;
-this._prepAnnotations();
-this._prepEffects();
-this._prepBehaviors();
-this._prepConfigure();
-this._prepBindings();
-this._prepPropertyInfo();
-Polymer.Base._initFeatures.call(this);
-this._children = Polymer.TreeApi.arrayCopyChildNodes(this.root);
-}
-this._insertChildren();
-this.fire('dom-change');
-}
-});</script>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/.bower.json
deleted file mode 100644
index dd39e422aef..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/.bower.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "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.1",
- "_release": "2.2.1",
- "_resolution": {
- "type": "version",
- "tag": "2.2.1",
- "commit": "45d8e40300e82ff02ccfbbc78c89500de0f5616f"
- },
- "_source": "git://github.com/web-animations/web-animations-js.git",
- "_target": "^2.2.0",
- "_originalSource": "web-animations/web-animations-js"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/COPYING b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/COPYING
deleted file mode 100644
index d6456956733..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/COPYING
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/History.md b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/History.md
deleted file mode 100644
index 9f2d5e9f4b5..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/History.md
+++ /dev/null
@@ -1,203 +0,0 @@
-### 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.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/README.md b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/README.md
deleted file mode 100644
index c61df59836b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/README.md
+++ /dev/null
@@ -1,172 +0,0 @@
-
-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) | 12.5kb | 14kb | 10.5kb |
-|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).
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/bower.json b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/bower.json
deleted file mode 100644
index 22f26b5e5c2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "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"
- ]
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js
deleted file mode 100644
index c7b56bdac3e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.
-
-!function(a,b){var c={},d={},e={},f=null;!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=w}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==u.indexOf(b[c]))return;if("direction"==c&&-1==v.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return 0>a||a>1||0>c||c>1?w:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<1e-4)return f(b,d,i);e>j?g=i:h=i}}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function k(a){B||(B=document.createElement("div").style),B.animationTimingFunction="",B.animationTimingFunction=a;var b=B.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");var c=D.exec(b);if(c)return i.apply(this,c.slice(1).map(Number));var d=E.exec(b);if(d)return j(Number(d[1]),{start:x,middle:y,end:z}[d[2]]);var f=A[b];return f?f:w}function l(a){return Math.abs(m(a)/a.playbackRate)}function m(a){return a.duration*a.iterations}function n(a,b,c){return null==b?F:b<c.delay?G:b>=c.delay+a?H:I}function o(a,b,c,d,e){switch(d){case G:return"backwards"==b||"both"==b?0:null;case I:return c-e;case H:return"forwards"==b||"both"==b?a:null;case F:return null}}function p(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function q(a,b,c,d,e){return c===1/0||c===-(1/0)||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function r(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function s(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d._easingFunction(h)}function t(a,b,c){var d=n(a,b,c),e=o(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===G?0:1;var f=c.iterationStart*c.duration,g=p(a,e,f,c),h=q(c.duration,m(c),g,f,c),i=r(c.duration,h,g,c);return s(i,c.duration,h,c)/c.duration}var u="backwards|forwards|both|none".split("|"),v="reverse|alternate|alternate-reverse".split("|"),w=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||0>a)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||0>a)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=k(a),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||0>a)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var x=1,y=.5,z=0,A={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,x),"step-middle":j(1,y),"step-end":j(1,z)},B=null,C="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",D=new RegExp("cubic-bezier\\("+C+","+C+","+C+","+C+"\\)"),E=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,F=0,G=1,H=2,I=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=l,a.calculateTimeFraction=t,a.calculatePhase=n,a.toTimingFunction=k}(c,f),function(a,b){function c(a,b){return a in j?j[a][b]||b:b}function d(a,b,d){var e=g[a];if(e){h.style[a]=b;for(var f in e){var i=e[f],j=h.style[i];d[i]=c(i,j)}}else d[a]=c(a,b)}function e(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;f>g;g++)e={},"offset"in a?e.offset=a.offset:1==f?e.offset=1:e.offset=g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function f(a){function b(){var a=c.length;null==c[a-1].offset&&(c[a-1].offset=1),a>1&&null==c[0].offset&&(c[0].offset=0);for(var b=0,d=c[0].offset,e=1;a>e;e++){var f=c[e].offset;if(null!=f){for(var g=1;e-b>g;g++)c[b+g].offset=d+(f-d)*g/(e-b);b=e,d=f}}}if(null==a)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&a[Symbol.iterator]&&(a=Array.from(a)),Array.isArray(a)||(a=e(a));for(var c=a.map(function(a){var b={};for(var c in a){var e=a[c];if("offset"==c){if(null!=e&&(e=Number(e),!isFinite(e)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==c)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};e=""+e}d(c,e,b)}return void 0==b.offset&&(b.offset=null),b}),f=!0,g=-(1/0),h=0;h<c.length;h++){var i=c[h].offset;if(null!=i){if(g>i)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return c=c.filter(function(a){return a.offset>=0&&a.offset<=1}),f||b(),c}var g={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},h=document.createElementNS("http://www.w3.org/1999/xhtml","div"),i={thin:"1px",medium:"3px",thick:"5px"},j={borderBottomWidth:i,borderLeftWidth:i,borderRightWidth:i,borderTopWidth:i,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:i,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=e,a.normalizeKeyframes=f}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=f[g].offset,i=f[g+1].offset,j=f[g].value,k=f[g+1].value,l=f[g].easing;h==i&&(1==i?j=k:k=j),d.push({startTime:h,endTime:i,easing:a.toTimingFunction(l?l:"linear"),property:e,interpolation:b.propertyInterpolation(e,j,k)})}return d.sort(function(a,b){return a.startTime-b.startTime}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return 0>=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){var g=c[f];e(a,b,d(g))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(c,d,f),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateTimeFraction(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d._isCurrent=function(d){var e=a.calculatePhase(c,d,b);return e===PhaseActive||e===PhaseBefore},d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return h=i(a),null!==h},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._isCurrent=i._isCurrent,k._totalDuration=i._totalDuration,k._id=g,k},b.NullEffect=function(a){var b=function(){a&&(a(),a=null)};return b._update=function(){return null},b._totalDuration=0,b._isCurrent=function(){return!1},b._hasSameTarget=function(){return!1},b}}(c,d,f),function(a,b){a.apply=function(b,c,d){b.style[a.propertyName(c)]=d},a.clear=function(b,c){b.style[a.propertyName(c)]=""}}(d,f),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(d),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return.5>d?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(d,f),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.invalidateEffects()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.invalidateEffects())},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._finishedFlag=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag}}}(c,d,f),function(a,b,c){function d(a){var b=j;j=[],a<p.currentTime&&(a=p.currentTime),h(a,!0),b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c){n=!1;var d=b.timeline;d.currentTime=a,d._animations.sort(e),m=!1;var f=d._animations;d._animations=[];var g=[],h=[];f=f.filter(function(b){b._tick(a,c),b._inEffect?h.push(b._effect):g.push(b._effect),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;return b._inTimeline=d,d}),o.push.apply(o,g),o.push.apply(o,h),d._animations.push.apply(d._animations,f),m&&requestAnimationFrame(function(){})}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.invalidateEffects(),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.invalidateEffects=function(){h(b.timeline.currentTime,!1),g()};var o=[],p=new f;b.timeline=p}(c,d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,0>=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}return""==c?d:void 0}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;j>k;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(d),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);if(c)return d.inset=!0,c;var c=a.consumeLengthOrPercent(b);if(c)return d.lengths.push(c[0]),c;var c=a.consumeColor(b);return c?(d.color=c[0],c):void 0}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);return e&&e[0].length?[d,e[1]]:void 0}function c(c){var d=a.consumeRepeated(b,/^,/,c);return d&&""==d[1]?d[0]:void 0}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(d),function(a,b){function c(a){return a.toFixed(3).replace(".000","")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){return/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a)?Number(a):void 0}function f(a,b){return[a,b,c]}function g(a,b){return 0!=a?i(0,1/0)(a,b):void 0}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,j,["z-index"]),a.parseNumber=e,a.mergeNumbers=f,a.numberToString=c}(d,f),function(a,b){function c(a,b){return"visible"==a||"visible"==b?[0,1,function(c){return 0>=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,c,["visibility"])}(d),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(new RegExp("U"+h,"g"),"").replace(new RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(a,b){return e(a,b,!0)}function e(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);return d&&4==d[0].length?d[0]:void 0}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(d,f),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r],void 0===p)return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]),g=a.composeMatrix(b[0],b[1],b[2],c,b[4]),h=g.map(f).join(",");return h}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"])}(d,f),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b)})}var d={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a}}(d,f)}(),!function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(g){}finally{c&&c.cancel()}if(!d){var h=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),h.call(this,b,c)}}}(c),!function(a,b,c){function d(a){var b=window.document.timeline;b.currentTime=a,b._discardAnimations(),0==b._animations.length?f=!1:requestAnimationFrame(d);
-}var e=window.requestAnimationFrame;window.requestAnimationFrame=function(a){return e(function(b){window.document.timeline._updateAnimationsPromises(),a(b),window.document.timeline._updateAnimationsPromises()})},b.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},b.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){b.animationsWithPromises=b.animationsWithPromises.filter(function(a){return a._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(a){return"finished"!=a.playState&&"idle"!=a.playState})},_play:function(a){var c=new b.Animation(a,this);return this._animations.push(c),b.restartWebAnimationsNextTick(),c._updatePromises(),c._animation.play(),c._updatePromises(),c},play:function(a){return a&&a.remove(),this._play(a)}};var f=!1;b.restartWebAnimationsNextTick=function(){f||(f=!0,requestAnimationFrame(d))};var g=new b.AnimationTimeline;b.timeline=g;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return g}})}catch(h){}try{window.document.timeline=g}catch(h){}}(c,e,f),function(a,b,c){b.animationsWithPromises=[],b.Animation=function(b,c){if(this.id="",b&&b._id&&(this.id=b._id),this.effect=b,b&&(b._animation=this),!c)throw new Error("Animation with null timeline is not supported");this._timeline=c,this._sequenceNumber=a.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},b.Animation.prototype={_updatePromises:function(){var a=this._oldPlayState,b=this.playState;return this._readyPromise&&b!==a&&("idle"==b?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==a?this._resolveReadyPromise():"pending"==b&&(this._readyPromise=void 0)),this._finishedPromise&&b!==a&&("idle"==b?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==b?this._resolveFinishedPromise():"finished"==a&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var a,c,d,e,f=!!this._animation;f&&(a=this.playbackRate,c=this._paused,d=this.startTime,e=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=b.newUnderlyingAnimationForKeyframeEffect(this.effect),b.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=b.newUnderlyingAnimationForGroup(this.effect),b.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&b.bindAnimationForCustomEffect(this),f&&(1!=a&&(this.playbackRate=a),null!==d?this.startTime=d:null!==e?this.currentTime=e:null!==this._holdTime&&(this.currentTime=this._holdTime),c&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var a=this.effect._timing.delay;this._childAnimations.forEach(function(c){this._arrangeChildren(c,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c.effect))}.bind(this))}},_setExternalAnimation:function(a){if(this.effect&&this._isGroup)for(var b=0;b<this.effect.children.length;b++)this.effect.children[b]._animation=a,this._childAnimations[b]._setExternalAnimation(a)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var a=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(c){var d=window.document.timeline._play(c);this._childAnimations.push(d),d.playbackRate=this.playbackRate,this._paused&&d.pause(),c._animation=this.effect._animation,this._arrangeChildren(d,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c))}.bind(this))}},_arrangeChildren:function(a,b){null===this.startTime?a.currentTime=this.currentTime-b/this.playbackRate:a.startTime!==this.startTime+b/this.playbackRate&&(a.startTime=this.startTime+b/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(a,b){this._resolveFinishedPromise=function(){a(this)},this._rejectFinishedPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._readyPromise=new Promise(function(a,b){this._resolveReadyPromise=function(){a(this)},this._rejectReadyPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(a){"function"==typeof a?this._animation.onfinish=function(b){b.target=this,a.call(this,b)}.bind(this):this._animation.onfinish=a},get oncancel(){return this._animation.oncancel},set oncancel(a){"function"==typeof a?this._animation.oncancel=function(b){b.target=this,a.call(this,b)}.bind(this):this._animation.oncancel=a},get currentTime(){this._updatePromises();var a=this._animation.currentTime;return this._updatePromises(),a},set currentTime(a){this._updatePromises(),this._animation.currentTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.currentTime=a-c}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(a){this._updatePromises(),this._animation.startTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.startTime=a+c}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(a){this._updatePromises();var b=this.currentTime;this._animation.playbackRate=a,this._forEachChild(function(b){b.playbackRate=a}),"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!==b&&(this.currentTime=b),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&this._timeline._animations.push(this),this._register(),b.awaitStartTime(this),this._forEachChild(function(a){var b=a.currentTime;a.play(),a.currentTime=b}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(a){a.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var a=this.currentTime;this._animation.reverse(),this._forEachChild(function(a){a.reverse()}),null!==a&&(this.currentTime=a),this._updatePromises()},addEventListener:function(a,b){var c=b;"function"==typeof b&&(c=function(a){a.target=this,b.call(this,a)}.bind(this),b._wrapper=c),this._animation.addEventListener(a,c)},removeEventListener:function(a,b){this._animation.removeEventListener(a,b&&b._wrapper||b)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(b){var c=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(a){b.call(this,a,c),this.effect instanceof window.SequenceEffect&&(c+=a.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var d=this.effect._timing,e=this.currentTime;null!==e&&(e=a.calculateTimeFraction(a.calculateActiveDuration(d),e,d)),(null==e||isNaN(e))&&this._removeChildAnimations()}}},window.Animation=b.Animation}(c,e,f),function(a,b,c){function d(b){this._frames=a.normalizeKeyframes(b)}function e(){for(var a=!1;i.length;){var b=i.shift();b._updateChildren(),a=!0}return a}var f=function(a){if(a._animation=void 0,a instanceof window.SequenceEffect||a instanceof window.GroupEffect)for(var b=0;b<a.children.length;b++)f(a.children[b])};b.removeMulti=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];d._parent?(-1==b.indexOf(d._parent)&&b.push(d._parent),d._parent.children.splice(d._parent.children.indexOf(d),1),d._parent=null,f(d)):d._animation&&d._animation.effect==d&&(d._animation.cancel(),d._animation.effect=new KeyframeEffect(null,[]),d._animation._callback&&(d._animation._callback._animation=null),d._animation._rebuildUnderlyingAnimation(),f(d))}for(c=0;c<b.length;c++)b[c]._rebuild()},b.KeyframeEffect=function(b,c,e,f){return this.target=b,this._parent=null,e=a.numericTimingToObject(e),this._timingInput=a.cloneTimingInput(e),this._timing=a.normalizeTimingInput(e),this.timing=a.makeTiming(e,!1,this),this.timing._effect=this,"function"==typeof c?(a.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=c):this._normalizedKeyframes=new d(c),this._keyframes=c,this.activeDuration=a.calculateActiveDuration(this._timing),this._id=f,this},b.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(a){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=a,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var b=new KeyframeEffect(this.target,[],a.cloneTimingInput(this._timingInput),this._id);return b._normalizedKeyframes=this._normalizedKeyframes,b._keyframes=this._keyframes,b},remove:function(){b.removeMulti([this])}};var g=Element.prototype.animate;Element.prototype.animate=function(a,c){var d="";return c&&c.id&&(d=c.id),b.timeline._play(new b.KeyframeEffect(this,a,c,d))};var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");b.newUnderlyingAnimationForKeyframeEffect=function(a){if(a){var b=a.target||h,c=a._keyframes;"function"==typeof c&&(c=[]);var d=a._timingInput;d.id=a._id}else var b=h,c=[],d=0;return g.apply(b,[c,d])},b.bindAnimationForKeyframeEffect=function(a){a.effect&&"function"==typeof a.effect._normalizedKeyframes&&b.bindAnimationForCustomEffect(a)};var i=[];b.awaitStartTime=function(a){null===a.startTime&&a._isGroup&&(0==i.length&&requestAnimationFrame(e),i.push(a))};var j=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){window.document.timeline._updateAnimationsPromises();var a=j.apply(this,arguments);return e()&&(a=j.apply(this,arguments)),window.document.timeline._updateAnimationsPromises(),a}}),window.KeyframeEffect=b.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(a){return null!==a.effect&&a.effect.target==this}.bind(this))}}(c,e,f),function(a,b,c){function d(a){a._registered||(a._registered=!0,g.push(a),h||(h=!0,requestAnimationFrame(e)))}function e(a){var b=g;g=[],b.sort(function(a,b){return a._sequenceNumber-b._sequenceNumber}),b=b.filter(function(a){a();var b=a._animation?a._animation.playState:"idle";return"running"!=b&&"pending"!=b&&(a._registered=!1),a._registered}),g.push.apply(g,b),g.length?(h=!0,requestAnimationFrame(e)):h=!1}var f=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);b.bindAnimationForCustomEffect=function(b){var c,e=b.effect.target,g="function"==typeof b.effect.getFrames();c=g?b.effect.getFrames():b.effect._onsample;var h=b.effect.timing,i=null;h=a.normalizeTimingInput(h);var j=function(){var d=j._animation?j._animation.currentTime:null;null!==d&&(d=a.calculateTimeFraction(a.calculateActiveDuration(h),d,h),isNaN(d)&&(d=null)),d!==i&&(g?c(d,e,b.effect):c(d,b.effect,b.effect._animation)),i=d};j._animation=b,j._registered=!1,j._sequenceNumber=f++,b._callback=j,d(j)};var g=[],h=!1;b.Animation.prototype._register=function(){this._callback&&d(this._callback)}}(c,e,f),function(a,b,c){function d(a){return a._timing.delay+a.activeDuration+a._timing.endDelay}function e(b,c,d){this._id=d,this._parent=null,this.children=b||[],this._reparent(this.children),c=a.numericTimingToObject(c),this._timingInput=a.cloneTimingInput(c),this._timing=a.normalizeTimingInput(c,!0),this.timing=a.makeTiming(c,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){e.apply(this,arguments)},window.GroupEffect=function(){e.apply(this,arguments)},e.prototype={_isAncestor:function(a){for(var b=this;null!==b;){if(b==a)return!0;b=b._parent}return!1},_rebuild:function(){for(var a=this;a;)"auto"===a.timing.duration&&(a._timing.duration=a.activeDuration),a=a._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(a){b.removeMulti(a);for(var c=0;c<a.length;c++)a[c]._parent=this},_putChild:function(a,b){for(var c=b?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",d=0;d<a.length;d++)if(this._isAncestor(a[d]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:c};for(var d=0;d<a.length;d++)b?this.children.push(a[d]):this.children.unshift(a[d]);this._reparent(a),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var b=a.cloneTimingInput(this._timingInput),c=[],d=0;d<this.children.length;d++)c.push(this.children[d].clone());return this instanceof GroupEffect?new GroupEffect(c,b):new SequenceEffect(c,b)},remove:function(){b.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a+=d(b)}),Math.max(a,0)}}),window.GroupEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a=Math.max(a,d(b))}),a}}),b.newUnderlyingAnimationForGroup=function(c){var d,e=null,f=function(b){var c=d._wrapper;return c&&"pending"!=c.playState&&c.effect?null==b?void c._removeChildAnimations():0==b&&c.playbackRate<0&&(e||(e=a.normalizeTimingInput(c.effect.timing)),b=a.calculateTimeFraction(a.calculateActiveDuration(e),-1,e),isNaN(b)||null==b)?(c._forEachChild(function(a){a.currentTime=-1}),void c._removeChildAnimations()):void 0:void 0},g=new KeyframeEffect(null,[],c._timing,c._id);return g.onsample=f,d=b.timeline._play(g)},b.bindAnimationForGroup=function(a){a._animation._wrapper=a,a._isGroup=!0,b.awaitStartTime(a),a._constructChildAnimations(),a._setExternalAnimation(a)},b.groupChildDuration=d}(c,e,f),b["true"]=a}({},function(){return this}());
-//# sourceMappingURL=web-animations-next-lite.min.js.map \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js.map b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js.map
deleted file mode 100644
index 0352ea275cb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next-lite.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["src/scope.js","src/timing-utilities.js","src/normalize-keyframes.js","src/deprecation.js","src/keyframe-interpolations.js","src/web-animations-bonus-cancel-events.js","src/web-animations-bonus-object-form-keyframes.js","src/timeline.js","src/web-animations-next-animation.js","src/keyframe-effect-constructor.js","src/effect-callback.js","src/group-constructors.js"],"names":["webAnimationsShared","webAnimations1","webAnimationsNext","webAnimationsTesting","shared","testing","cloneTimingInput","timingInput","clone","m","AnimationEffectTiming","this","_delay","_endDelay","_fill","_iterationStart","_iterations","_duration","_playbackRate","_direction","_easing","_easingFunction","linear","isInvalidTimingDeprecated","isDeprecated","makeTiming","forGroup","effect","timing","fill","duration","isNaN","undefined","Object","getOwnPropertyNames","forEach","property","fills","indexOf","directions","numericTimingToObject","normalizeTimingInput","cubic","a","b","c","d","x","f","start","end","mid","xEst","Math","abs","step","count","pos","stepSize","toTimingFunction","easing","styleForCleaning","document","createElement","style","animationTimingFunction","validatedEasing","TypeError","cubicData","cubicBezierRe","exec","apply","slice","map","Number","stepData","stepRe","Start","middle","Middle","End","preset","presets","calculateActiveDuration","repeatedDuration","playbackRate","iterations","calculatePhase","activeDuration","localTime","PhaseNone","delay","PhaseBefore","PhaseAfter","PhaseActive","calculateActiveTime","fillMode","phase","calculateScaledActiveTime","activeTime","startOffset","calculateIterationTime","iterationDuration","scaledActiveTime","Infinity","iterationStart","calculateCurrentIteration","iterationTime","floor","calculateTransformedTime","currentIteration","currentIterationIsOdd","currentDirectionIsForwards","direction","directedTime","timeFraction","calculateTimeFraction","split","prototype","_setMember","member","value","_effect","_timingInput","_timing","_animation","_rebuildUnderlyingAnimation","endDelay","ease","ease-in","ease-out","ease-in-out","step-start","step-middle","step-end","numberString","RegExp","antiAlias","aliases","expandShorthandAndAntiAlias","result","longProperties","shorthandToLonghand","shorthandExpanderElem","i","longProperty","longhandValue","convertToArrayForm","effectInput","normalizedEffectInput","values","Array","isArray","keyframe","numKeyframes","length","offset","composite","push","sort","normalizeKeyframes","spaceKeyframes","keyframes","previousIndex","previousOffset","j","window","Symbol","iterator","from","originalKeyframe","memberValue","isFinite","type","DOMException","NOT_SUPPORTED_ERR","name","message","everyFrameHasOffset","code","INVALID_MODIFICATION_ERR","filter","background","border","borderBottom","borderColor","borderLeft","borderRadius","borderRight","borderTop","borderWidth","flex","font","margin","outline","padding","createElementNS","borderWidthAliases","thin","medium","thick","borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","fontSize","xx-small","x-small","small","large","x-large","xx-large","fontWeight","normal","bold","outlineWidth","textShadow","none","boxShadow","silenced","feature","date","advice","plural","auxVerb","today","Date","expiry","setMonth","getMonth","console","warn","toDateString","deprecated","Error","rotate","makePropertySpecificKeyframeGroups","rotate3d","propertySpecificKeyframeGroups","scaley","_","scalez","propertySpecificKeyframe","cast","groupName","group","scope","concat","candidate","makeInterpolations","interpolations","alias","startTime","endTime","startValue","animate","oncancel","now","performance","AnimationCancelEvent","target","currentTime","timelineTime","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","Event","AT_TARGET","timeStamp","originalElementAnimate","Element","options","animation","call","_cancelHandlers","originalCancel","cancel","event","handlers","setTimeout","handler","originalAddEventListener","addEventListener","originalRemoveEventListener","removeEventListener","index","splice","element","documentElement","animated","originalOpacity","getComputedStyle","getPropertyValue","testOpacity","opacity","error","webAnimationsNextTick","t","timeline","_discardAnimations","_animations","ticking","requestAnimationFrame","originalRequestAnimationFrame","_updateAnimationsPromises","AnimationTimeline","getAnimations","animationsWithPromises","_updatePromises","playState","_play","Animation","restartWebAnimationsNextTick","play","remove","defineProperty","configurable","get","e","id","_id","_timeline","_sequenceNumber","sequenceNumber","_holdTime","_paused","_isGroup","_childAnimations","_callback","_oldPlayState","oldPlayState","newPlayState","_readyPromise","_rejectReadyPromise","_resolveReadyPromise","_finishedPromise","_rejectFinishedPromise","_resolveFinishedPromise","oldPlaybackRate","oldPaused","oldStartTime","oldCurrentTime","hadUnderlying","_wrapper","KeyframeEffect","newUnderlyingAnimationForKeyframeEffect","bindAnimationForKeyframeEffect","SequenceEffect","GroupEffect","newUnderlyingAnimationForGroup","bindAnimationForGroup","_onsample","bindAnimationForCustomEffect","pause","_updateChildren","childAnimation","_arrangeChildren","groupChildDuration","bind","_setExternalAnimation","children","_constructChildAnimations","_removeChildAnimations","child","finished","Promise","resolve","reject","ABORT_ERR","ready","onfinish","v","sign","MAX_VALUE","_register","_forEachChild","awaitStartTime","time","finish","reverse","wrapped","pop","KeyframeList","_frames","updatePendingGroups","updated","pendingGroups","shift","disassociate","removeMulti","effects","oldParents","_parent","_rebuild","_normalizedKeyframes","_keyframes","getFrames","onsample","callback","parent","nullTarget","keyframeEffect","groupAnimation","originalGetComputedStyle","enumerable","arguments","register","_registered","callbacks","tick","updating","left","right","effectFunction","isKeyframeEffect","last","node","constructor","_reparent","_isAncestor","newChildren","_putChild","args","isAppend","HIERARCHY_REQUEST_ERR","unshift","append","prepend","firstChild","lastChild","clonedTiming","clonedChildren","create","total","max","underlyingAnimation","ticker","tf","underlyingEffect","exports"],"mappings":";;;;;;;;;;;;;;CAcA,SAAIA,EAAAA,GAAJ,GAAIA,MACAC,KACAC,KAGEC,EAAuB,MCL7B,SAAUC,EAAQC,GAMhB,QAASC,GAAiBC,GACxB,GAA0B,gBAAfA,GACT,MAAOA,EAET,IAAIC,KACJ,KAAK,GAAIC,KAAKF,GACZC,EAAMC,GAAKF,EAAYE,EAEzB,OAAOD,GAGT,QAASE,KACPC,KAAKC,OAAS,EACdD,KAAKE,UAAY,EACjBF,KAAKG,MAAQ,OACbH,KAAKI,gBAAkB,EACvBJ,KAAKK,YAAc,EACnBL,KAAKM,UAAY,EACjBN,KAAKO,cAAgB,EACrBP,KAAKQ,WAAa,SAClBR,KAAKS,QAAU,SACfT,KAAKU,gBAAkBC,EAGzB,QAASC,KACP,MAAOnB,GAAOoB,aAAa,wBAAyB,aAAc,gDAAA,GA8EpE,QAASC,GAAWlB,EAAamB,EAAUC,GACzC,GAAIC,GAAS,GAAIlB,EA4BjB,OA3BIgB,KACFE,EAAOC,KAAO,OACdD,EAAOE,SAAW,QAEM,gBAAfvB,IAA4BwB,MAAMxB,GAElByB,SAAhBzB,GACT0B,OAAOC,oBAAoB3B,GAAa4B,QAAQ,SAASC,GACvD,GAA6B,QAAzB7B,EAAY6B,GAAqB,CACnC,IAA+B,gBAApBR,GAAOQ,IAAqC,YAAZA,KACL,gBAAzB7B,GAAY6B,IAAyBL,MAAMxB,EAAY6B,KAChE,MAGJ,IAAiB,QAAZA,GAAgE,IAAxCC,EAAMC,QAAQ/B,EAAY6B,IACrD,MAEF,IAAiB,aAAZA,GAA0E,IAA7CG,EAAWD,QAAQ/B,EAAY6B,IAC/D,MAEF,IAAgB,gBAAZA,GAAwD,IAA1B7B,EAAY6B,IAAmBhC,EAAOoB,aAAa,qCAAsC,aAAc,uCACvI,MAEFI,GAAOQ,GAAY7B,EAAY6B,MAlBnCR,EAAOE,SAAWvB,EAsBbqB,EAGT,QAASY,GAAsBjC,GAQ7B,MAP0B,gBAAfA,KAEPA,EADEwB,MAAMxB,IACQuB,SAAU,IAEVA,SAAUvB,IAGvBA,EAGT,QAASkC,GAAqBlC,EAAamB,GAEzC,MADAnB,GAAcH,EAAOoC,sBAAsBjC,GACpCkB,EAAWlB,EAAamB,GAGjC,QAASgB,GAAMC,EAAGC,EAAGC,EAAGC,GACtB,MAAQ,GAAJH,GAASA,EAAI,GAAS,EAAJE,GAASA,EAAI,EAC1BvB,EAEF,SAASyB,GAOZ,QAASC,GAAEL,EAAGC,EAAGnC,GAAK,MAAO,GAAIkC,GAAK,EAAIlC,IAAM,EAAIA,GAAKA,EAAI,EAAImC,GAAK,EAAInC,GAAKA,EAAIA,EAAIA,EAAIA,EAAIA,EANjG,GAAS,GAALsC,GAAe,GAALA,EACZ,MAAOA,EAGT,KADA,GAAIE,GAAQ,EAAGC,EAAM,IACX,CACR,GAAIC,IAAOF,EAAQC,GAAO,EAEtBE,EAAOJ,EAAEL,EAAGE,EAAGM,EACnB,IAAIE,KAAKC,IAAIP,EAAIK,GAAQ,KACvB,MAAOJ,GAAEJ,EAAGE,EAAGK,EAENJ,GAAPK,EACFH,EAAQE,EAERD,EAAMC,IAUd,QAASI,GAAKC,EAAOC,GACnB,MAAO,UAASV,GACd,GAAIA,GAAK,EACP,MAAO,EAET,IAAIW,GAAW,EAAIF,CAEnB,OADAT,IAAKU,EAAMC,EACJX,EAAIA,EAAIW,GAmBnB,QAASC,GAAiBC,GACnBC,IACHA,EAAmBC,SAASC,cAAc,OAAOC,OAEnDH,EAAiBI,wBAA0B,GAC3CJ,EAAiBI,wBAA0BL,CAC3C,IAAIM,GAAkBL,EAAiBI,uBAEvC,IAAuB,IAAnBC,GAAyB3C,IAC3B,KAAM,IAAI4C,WAAUP,EAAS,mCAG/B,IAAIQ,GAAYC,EAAcC,KAAKJ,EACnC,IAAIE,EACF,MAAO1B,GAAM6B,MAAM5D,KAAMyD,EAAUI,MAAM,GAAGC,IAAIC,QAElD,IAAIC,GAAWC,EAAON,KAAKJ,EAC3B,IAAIS,EACF,MAAOpB,GAAKmB,OAAOC,EAAS,KAAM1B,MAAS4B,EAAOC,OAAUC,EAAQ7B,IAAO8B,GAAKL,EAAS,IAE3F,IAAIM,GAASC,EAAQhB,EACrB,OAAIe,GACKA,EAEF3D,EAGT,QAAS6D,GAAwBvD,GAC/B,MAAOyB,MAAKC,IAAI8B,EAAiBxD,GAAUA,EAAOyD,cAGpD,QAASD,GAAiBxD,GACxB,MAAOA,GAAOE,SAAWF,EAAO0D,WAQlC,QAASC,GAAeC,EAAgBC,EAAW7D,GACjD,MAAiB,OAAb6D,EACKC,EAELD,EAAY7D,EAAO+D,MACdC,EAELH,GAAa7D,EAAO+D,MAAQH,EACvBK,EAEFC,EAGT,QAASC,GAAoBP,EAAgBQ,EAAUP,EAAWQ,EAAON,GACvE,OAAQM,GACN,IAAKL,GACH,MAAgB,aAAZI,GAAuC,QAAZA,EACtB,EACF,IACT,KAAKF,GACH,MAAOL,GAAYE,CACrB,KAAKE,GACH,MAAgB,YAAZG,GAAsC,QAAZA,EACrBR,EACF,IACT,KAAKE,GACH,MAAO,OAIb,QAASQ,GAA0BV,EAAgBW,EAAYC,EAAaxE,GAC1E,OAAQA,EAAOyD,aAAe,EAAIc,EAAaX,EAAiBW,GAAcvE,EAAOyD,aAAee,EAGtG,QAASC,GAAuBC,EAAmBlB,EAAkBmB,EAAkBH,EAAaxE,GAClG,MAAI2E,KAAqBC,EAAAA,GAAYD,MAAsBC,EAAAA,IAAaD,EAAmBH,GAAehB,GAAoBxD,EAAO0D,aAAgB1D,EAAO0D,WAAa1D,EAAO6E,gBAAkB,GAAK,EAC9LH,EAGFC,EAAmBD,EAG5B,QAASI,GAA0BJ,EAAmBK,EAAeJ,EAAkB3E,GACrF,MAAyB,KAArB2E,EACK,EAELI,GAAiBL,EACZ1E,EAAO6E,eAAiB7E,EAAO0D,WAAa,EAE9CjC,KAAKuD,MAAML,EAAmBD,GAGvC,QAASO,GAAyBC,EAAkBR,EAAmBK,EAAe/E,GACpF,GAAImF,GAAwBD,EAAmB,GAAK,EAChDE,EAAiD,UAApBpF,EAAOqF,WAAyBrF,EAAOqF,YAAcF,EAAwB,oBAAsB,aAChIG,EAAeF,EAA6BL,EAAgBL,EAAoBK,EAChFQ,EAAeD,EAAeZ,CAClC,OAAOA,GAAoB1E,EAAOP,gBAAgB8F,GAGpD,QAASC,GAAsB5B,EAAgBC,EAAW7D,GACxD,GAAIqE,GAAQV,EAAeC,EAAgBC,EAAW7D,GAClDuE,EAAaJ,EAAoBP,EAAgB5D,EAAOC,KAAM4D,EAAWQ,EAAOrE,EAAO+D,MAC3F,IAAmB,OAAfQ,EACF,MAAO,KACT,IAAuB,IAAnBX,EACF,MAAOS,KAAUL,EAAc,EAAI,CACrC,IAAIQ,GAAcxE,EAAO6E,eAAiB7E,EAAOE,SAC7CyE,EAAmBL,EAA0BV,EAAgBW,EAAYC,EAAaxE,GACtF+E,EAAgBN,EAAuBzE,EAAOE,SAAUsD,EAAiBxD,GAAS2E,EAAkBH,EAAaxE,GACjHkF,EAAmBJ,EAA0B9E,EAAOE,SAAU6E,EAAeJ,EAAkB3E,EACnG,OAAOiF,GAAyBC,EAAkBlF,EAAOE,SAAU6E,EAAe/E,GAAUA,EAAOE,SAjUrG,GAAIO,GAAQ,+BAA+BgF,MAAM,KAC7C9E,EAAa,sCAAsC8E,MAAM,KACzD/F,EAAS,SAASyB,GAAK,MAAOA,GA8BlCrC,GAAsB4G,WACpBC,WAAY,SAASC,EAAQC,GAC3B9G,KAAK,IAAM6G,GAAUC,EACjB9G,KAAK+G,UACP/G,KAAK+G,QAAQC,aAAaH,GAAUC,EACpC9G,KAAK+G,QAAQE,QAAUxH,EAAOqC,qBAAqB9B,KAAK+G,QAAQC,cAChEhH,KAAK+G,QAAQlC,eAAiBpF,EAAO+E,wBAAwBxE,KAAK+G,QAAQE,SACtEjH,KAAK+G,QAAQG,YACflH,KAAK+G,QAAQG,WAAWC,gCAI9BzC,GAAIA,gBACF,MAAO1E,MAAKO,eAEdyE,GAAIA,OAAM8B,GACR9G,KAAK4G,WAAW,QAASE,IAE3B9B,GAAIA,SACF,MAAOhF,MAAKC,QAEdmH,GAAIA,UAASN,GACX9G,KAAK4G,WAAW,WAAYE,IAE9BM,GAAIA,YACF,MAAOpH,MAAKE,WAEdgB,GAAIA,MAAK4F,GACP9G,KAAK4G,WAAW,OAAQE,IAE1B5F,GAAIA,QACF,MAAOlB,MAAKG,OAEd2F,GAAIA,gBAAegB,GACjB,IAAK1F,MAAM0F,IAAkB,EAARA,IAAclG,IACjC,KAAM,IAAI4C,WAAU,2DAA6DvC,OAAO6E,eAE1F9F,MAAK4G,WAAW,iBAAkBE,IAEpChB,GAAIA,kBACF,MAAO9F,MAAKI,iBAEde,GAAIA,UAAS2F,GACX,GAAa,QAATA,IAAoB1F,MAAM0F,IAAkB,EAARA,IAAclG,IACpD,KAAM,IAAI4C,WAAU,oDAAsDsD,EAE5E9G,MAAK4G,WAAW,WAAYE,IAE9B3F,GAAIA,YACF,MAAOnB,MAAKM,WAEdgG,GAAIA,WAAUQ,GACZ9G,KAAK4G,WAAW,YAAaE,IAE/BR,GAAIA,aACF,MAAOtG,MAAKQ,YAEdyC,GAAIA,QAAO6D,GACT9G,KAAKU,gBAAkBsC,EAAiB8D,GACxC9G,KAAK4G,WAAW,SAAUE,IAE5B7D,GAAIA,UACF,MAAOjD,MAAKS,SAEdkE,GAAIA,YAAWmC,GACb,IAAK1F,MAAM0F,IAAkB,EAARA,IAAclG,IACjC,KAAM,IAAI4C,WAAU,8CAAgDsD,EAEtE9G,MAAK4G,WAAW,aAAcE,IAEhCnC,GAAIA,cACF,MAAO3E,MAAKK,aA6EhB,IAAI6D,GAAQ,EACRE,EAAS,GACTC,EAAM,EAaNE,GACF8C,KAAQtF,EAAM,IAAM,GAAK,IAAM,GAC/BuF,UAAWvF,EAAM,IAAM,EAAG,EAAG,GAC7BwF,WAAYxF,EAAM,EAAG,EAAG,IAAM,GAC9ByF,cAAezF,EAAM,IAAM,EAAG,IAAM,GACpC0F,aAAc7E,EAAK,EAAGsB,GACtBwD,cAAe9E,EAAK,EAAGwB,GACvBuD,WAAY/E,EAAK,EAAGyB,IAGlBnB,EAAmB,KACnB0E,EAAe,qCACflE,EAAgB,GAAImE,QAAO,kBAAoBD,EAAe,IAAMA,EAAe,IAAMA,EAAe,IAAMA,EAAe,OAC7H3D,EAAS,gDAqCTc,EAAY,EACZE,EAAc,EACdC,EAAa,EACbC,EAAc,CA4ElB1F,GAAOE,iBAAmBA,EAC1BF,EAAOqB,WAAaA,EACpBrB,EAAOoC,sBAAwBA,EAC/BpC,EAAOqC,qBAAuBA,EAC9BrC,EAAO+E,wBAA0BA,EACjC/E,EAAOgH,sBAAwBA,EAC/BhH,EAAOmF,eAAiBA,EACxBnF,EAAOuD,iBAAmBA,GAkBzB3D,EAAqBG,GC/VxB,SAAUC,EAAQC,GAmIhB,QAASoI,GAAUrG,EAAUqF,GAC3B,MAAIrF,KAAYsG,GACPA,EAAQtG,GAAUqF,IAAUA,EAE9BA,EAIT,QAASkB,GAA4BvG,EAAUqF,EAAOmB,GACpD,GAAIC,GAAiBC,EAAoB1G,EACzC,IAAIyG,EAAgB,CAClBE,EAAsB/E,MAAM5B,GAAYqF,CACxC,KAAK,GAAIuB,KAAKH,GAAgB,CAC5B,GAAII,GAAeJ,EAAeG,GAC9BE,EAAgBH,EAAsB/E,MAAMiF,EAChDL,GAAOK,GAAgBR,EAAUQ,EAAcC,QAGjDN,GAAOxG,GAAYqG,EAAUrG,EAAUqF,GAI3C,QAAS0B,GAAmBC,GAC1B,GAAIC,KAEJ,KAAK,GAAIjH,KAAYgH,GACnB,KAAIhH,KAAa,SAAU,SAAU,cAArC,CAIA,GAAIkH,GAASF,EAAYhH,EACpBmH,OAAMC,QAAQF,KACjBA,GAAUA,GAKZ,KAAK,GAFDG,GACAC,EAAeJ,EAAOK,OACjBX,EAAI,EAAOU,EAAJV,EAAkBA,IAChCS,KAEI,UAAYL,GACdK,EAASG,OAASR,EAAYQ,OACL,GAAhBF,EACTD,EAASG,OAAS,EAElBH,EAASG,OAASZ,GAAKU,EAAe,GAGpC,UAAYN,KACdK,EAAS7F,OAASwF,EAAYxF,QAG5B,aAAewF,KACjBK,EAASI,UAAYT,EAAYS,WAGnCJ,EAASrH,GAAYkH,EAAON,GAE5BK,EAAsBS,KAAKL,GAK/B,MADAJ,GAAsBU,KAAK,SAASpH,EAAGC,GAAK,MAAOD,GAAEiH,OAAShH,EAAEgH,SACzDP,EAGT,QAASW,GAAmBZ,GA+D1B,QAASa,KACP,GAAIN,GAASO,EAAUP,MACa,OAAhCO,EAAUP,EAAS,GAAGC,SACxBM,EAAUP,EAAS,GAAGC,OAAS,GAC7BD,EAAS,GAA4B,MAAvBO,EAAU,GAAGN,SAC7BM,EAAU,GAAGN,OAAS,EAIxB,KAAK,GAFDO,GAAgB,EAChBC,EAAiBF,EAAU,GAAGN,OACzBZ,EAAI,EAAOW,EAAJX,EAAYA,IAAK,CAC/B,GAAIY,GAASM,EAAUlB,GAAGY,MAC1B,IAAc,MAAVA,EAAgB,CAClB,IAAK,GAAIS,GAAI,EAAOrB,EAAImB,EAARE,EAAuBA,IACrCH,EAAUC,EAAgBE,GAAGT,OAASQ,GAAkBR,EAASQ,GAAkBC,GAAKrB,EAAImB,EAC9FA,GAAgBnB,EAChBoB,EAAiBR,IA7EvB,GAAmB,MAAfR,EACF,QAGEkB,QAAOC,QAAUA,OAAOC,UAAYjB,MAAMjC,UAAUmD,MAAQrB,EAAYmB,OAAOC,YAEjFpB,EAAcG,MAAMkB,KAAKrB,IAGtBG,MAAMC,QAAQJ,KACjBA,EAAcD,EAAmBC,GAgCnC,KAAK,GA7BDc,GAAYd,EAAY3E,IAAI,SAASiG,GACvC,GAAIjB,KACJ,KAAK,GAAIjC,KAAUkD,GAAkB,CACnC,GAAIC,GAAcD,EAAiBlD,EACnC,IAAc,UAAVA,GACF,GAAmB,MAAfmD,IACFA,EAAcjG,OAAOiG,IAChBC,SAASD,IACZ,KAAM,IAAIxG,WAAU,yCAEnB,CAAA,GAAc,aAAVqD,EACT,MACEqD,KAAMC,aAAaC,kBACnBC,KAAM,oBACNC,QAAS,mCAGXN,GAAc,GAAKA,EAErBhC,EAA4BnB,EAAQmD,EAAalB,GAInD,MAFuBzH,SAAnByH,EAASG,SACXH,EAASG,OAAS,MACbH,IAGLyB,GAAAA,EAEAd,IAAkB5D,EAAAA,GACbwC,EAAI,EAAGA,EAAIkB,EAAUP,OAAQX,IAAK,CACzC,GAAIY,GAASM,EAAUlB,GAAGY,MAC1B,IAAc,MAAVA,EAAgB,CAClB,GAAaQ,EAATR,EACF,MACEuB,KAAML,aAAaM,yBACnBJ,KAAM,2BACNC,QAAS,uEAGbb,GAAiBR,MAEjBsB,IAAAA,EA8BJ,MA1BAhB,GAAYA,EAAUmB,OAAO,SAAS5B,GACpC,MAAOA,GAASG,QAAU,GAAKH,EAASG,QAAU,IAsB/CsB,GACHjB,IAEKC,EAzRT,GAAIpB,IACFwC,YACE,kBACA,qBACA,iBACA,mBACA,uBACA,mBACA,iBACA,mBAEFC,QACE,iBACA,iBACA,iBACA,mBACA,mBACA,mBACA,oBACA,oBACA,oBACA,kBACA,kBACA,mBAEFC,cACE,oBACA,oBACA,qBAEFC,aACE,iBACA,mBACA,oBACA,mBAEFC,YACE,kBACA,kBACA,mBAEFC,cACE,sBACA,uBACA,0BACA,0BAEFC,aACE,mBACA,mBACA,oBAEFC,WACE,iBACA,iBACA,kBAEFC,aACE,iBACA,mBACA,oBACA,mBAEFC,MACE,WACA,aACA,aAEFC,MACE,aACA,WACA,YACA,cACA,aACA,cAEFC,QACE,YACA,cACA,eACA,cAEFC,SACE,eACA,eACA,gBAEFC,SACE,aACA,eACA,gBACA,gBAIApD,EAAwBjF,SAASsI,gBAAgB,+BAAgC,OAEjFC,GACFC,KAAM,MACNC,OAAQ,MACRC,MAAO,OAGL9D,GACF+D,kBAAmBJ,EACnBK,gBAAiBL,EACjBM,iBAAkBN,EAClBO,eAAgBP,EAChBQ,UACEC,WAAY,MACZC,UAAW,MACXC,MAAS,MACTT,OAAU,OACVU,MAAS,OACTC,UAAW,OACXC,WAAY,QAEdC,YACEC,OAAQ,MACRC,KAAM,OAERC,aAAclB,EACdmB,YACEC,KAAM,2BAERC,WACED,KAAM,+BA8JVrN,GAAO+I,mBAAqBA,EAC5B/I,EAAO4J,mBAAqBA,GAM3BhK,EAAqBG,GCpSxB,SAAUC,GAER,GAAIuN,KAEJvN,GAAOoB,aAAe,SAASoM,EAASC,EAAMC,EAAQC,GAKpD,GAAIC,GAAUD,EAAS,MAAQ,KAC3BE,EAAQ,GAAIC,MACZC,EAAS,GAAID,MAAKL,EAGtB,OAFAM,GAAOC,SAASD,EAAOE,WAAa,GAExBF,EAARF,GACIL,IAAWD,IACfW,QAAQC,KAAK,mBAAqBX,EAAU,IAAMI,EAAU,wCAA0CG,EAAOK,eAAiB,KAAOV,GAEvIH,EAASC,IAAAA,GAAW,IACb,GAMXxN,EAAOqO,WAAa,SAASb,EAASC,EAAMC,EAAQC,GAClD,GAAIC,GAAUD,EAAS,MAAQ,IAC/B,IAAI3N,EAAOoB,aAAaoM,EAASC,EAAMC,EAAQC,GAC7C,KAAM,IAAIW,OAAMd,EAAU,IAAMI,EAAU,yBAA2BF,KAIxE9N,6noBChCOI,mBAAeC,GA2BvBsO,QAASC,KAAAA,SAAAA,KAAAA,SAAAA,KAAAA,SAAmC1E,KAG1C2E,UAFIC,QAAAA,aAAAA,KAAAA,OAES,KAAO5E,GAAAA,EAAAA,EAAUP,IAAAA,GAAQX,QAC/B,IAAIxB,GAAAA,EAAU0C,EAAAA,IAAAA,GAAUlB,EAC3B,KAAc+F,QAAVvH,IAAAA,GAAgC,EAAAwH,EAAA,IAAVxH,GAAAA,EAAgCwH,KAAAC,QAAVzH,IAAAA,GAC1C0H,EAAAA,EAAAA,KAAAA,SAAAA,MAAAA,GACFtF,MAAQM,KAAAA,KAAUlB,GAAGY,OACrBhG,IAAAA,KAAQsG,GAAAA,EAAUlB,KAAGpF,OACdsG,IAAAA,KAAAA,GAAa1C,EAAAA,KAEtBsH,WAAAA,KAAAA,GAAAA,EAAAA,EAAAA,IAA+BtH,GAAUsH,YAAAA,IAAAA,GAAAA,EAAAA,EAAAA,IAA+BtH,GAAAA,EAAAA,KACxEsH,YAAAA,IAAAA,GAAAA,EAA+BtH,EAAAA,IAAQsC,GAAKoF,EAAAA,KAAAA,YAAAA,IAKlDC,GAASC,EAAAA,EAAAA,KAAaN,aAAAA,MAAAA,GAAAA,GAAAA,qBACRA,EAAAA,GAA+BM,eACjCnP,EAAkBoP,GAAwBzF,SAClD0F,EACEzE,GAAMC,QAAaC,GAAAA,EAAAA,GACbrC,EAAA6G,QAAAvE,IACNC,QAAS,SAAAuE,GAAAA,IAAA1L,UAIRgL,gBAAAA,QAAAA,EAIT9D,GAAAwE,KAASC,GAAAA,KAAmBX,GAAAA,aAAAA,kBACtBY,gBACCC,EAAIP,mBAAaN,0BAEfa,EADDzF,eAAY4E,sBAAAA,EAA+BM,qBAC3BlF,4BACd0F,EAAY1F,aAAaN,SACzBiG,GAAU3F,MAAiBN,GAC3BkG,IAAa5F,IAAazC,EACfyC,OClEvB,WAEE,GAA2DlI,SAAvD8B,SAASC,cAAc,OAAOgM,YAAYC,SAA9C,CAKE,GAAIC,EACC,IAAI3F,OAAO4F,aAAeA,YAAYD,IAC3C,GAAIA,GAAM,WAAa,MAAOC,aAAYD,WAE1C,IAAIA,GAAM,WAAa,MAAO/B,MAAK+B,MAGrC,IAAIE,GAAuB,SAASC,EAAQC,EAAaC,GACvD3P,KAAKyP,OAASA,EACdzP,KAAK0P,YAAcA,EACnB1P,KAAK2P,aAAeA,EAEpB3P,KAAKkK,KAAO,SACZlK,KAAK4P,SAAAA,EACL5P,KAAK6P,YAAAA,EACL7P,KAAK8P,cAAgBL,EACrBzP,KAAK+P,kBAAAA,EACL/P,KAAKgQ,WAAaC,MAAMC,UACxBlQ,KAAKmQ,UAAY5C,KAAK+B,OAGpBc,EAAyBzG,OAAO0G,QAAQ1J,UAAUyI,OACtDzF,QAAO0G,QAAQ1J,UAAUyI,QAAU,SAAS3G,EAAa6H,GACvD,GAAIC,GAAYH,EAAuBI,KAAKxQ,KAAMyI,EAAa6H,EAE/DC,GAAUE,mBACVF,EAAUlB,SAAW,IAErB,IAAIqB,GAAiBH,EAAUI,MAC/BJ,GAAUI,OAAS,WACjBD,EAAeF,KAAKxQ,KACpB,IAAI4Q,GAAQ,GAAIpB,GAAqBxP,KAAM,KAAMsP,KAC7CuB,EAAW7Q,KAAKyQ,gBAAgB7B,OAAO5O,KAAKqP,UAAYrP,KAAKqP,aACjEyB,YAAW,WACTD,EAASrP,QAAQ,SAASuP,GACxBA,EAAQP,KAAKI,EAAMnB,OAAQmB,MAE5B,GAGL,IAAII,GAA2BT,EAAUU,gBACzCV,GAAUU,iBAAmB,SAAS/G,EAAM6G,GACpB,kBAAXA,IAAiC,UAAR7G,EAClClK,KAAKyQ,gBAAgBtH,KAAK4H,GAE1BC,EAAyBR,KAAKxQ,KAAMkK,EAAM6G,GAG9C,IAAIG,GAA8BX,EAAUY,mBAW5C,OAVAZ,GAAUY,oBAAsB,SAASjH,EAAM6G,GAC7C,GAAY,UAAR7G,EAAkB,CACpB,GAAIkH,GAAQpR,KAAKyQ,gBAAgB9O,QAAQoP,EACrCK,IAAS,GACXpR,KAAKyQ,gBAAgBY,OAAOD,EAAO,OAErCF,GAA4BV,KAAKxQ,KAAMkK,EAAM6G,IAI1CR,OClEX,SAAU9Q,GAgBR,GAAI6R,GAAUnO,SAASoO,gBACnBhB,EAAY,KACZiB,GAAAA,CACJ,KACE,GAAIC,GAAkBC,iBAAiBJ,GAASK,iBAAiB,WAC7DC,EAAiC,KAAnBH,EAAyB,IAAM,GACjDlB,GAAYe,EAAQlC,SAASyC,SAAYD,EAAaA,KACjDzQ,SAAU,IACfoP,EAAUb,YAAc,EACxB8B,EAAWE,iBAAiBJ,GAASK,iBAAiB,YAAcC,EACpE,MAAOE,IACP,QACIvB,GACFA,EAAUI,SAEd,IAAIa,EAAJ,CAIA,GAAIpB,GAAyBzG,OAAO0G,QAAQ1J,UAAUyI,OACtDzF,QAAO0G,QAAQ1J,UAAUyI,QAAU,SAAS3G,EAAa6H,GAUvD,MATI3G,QAAOC,QAAUA,OAAOC,UAAYjB,MAAMjC,UAAUmD,MAAQrB,EAAYmB,OAAOC,YAEjFpB,EAAcG,MAAMkB,KAAKrB,IAGtBG,MAAMC,QAAQJ,IAAgC,OAAhBA,IACjCA,EAAchJ,EAAO+I,mBAAmBC,IAGnC2H,EAAuBI,KAAKxQ,KAAMyI,EAAa6H,MAEvDjR,IC/CH,SAAUI,EAAQkP,EAAOjP,GA8DvB,QAASqS,GAAsBC,GAC7B,GAAIC,GAAWtI,OAAOxG,SAAS8O,QAC/BA,GAASvC,YAAcsC,EACvBC,EAASC,qBAC0B,GAA/BD,EAASE,YAAYnJ,OACvBoJ,GAAAA,EAEAC,sBAAsBN;CApE1B,GAAIO,GAAgC3I,OAAO0I,qBAC3C1I,QAAO0I,sBAAwB,SAAShQ,GACtC,MAAOiQ,GAA8B,SAASlQ,GAC5CuH,OAAOxG,SAAS8O,SAASM,4BACzBlQ,EAAED,GACFuH,OAAOxG,SAAS8O,SAASM,+BAI7B5D,EAAM6D,kBAAoB,WACxBxS,KAAKmS,eACLnS,KAAK0P,YAAcrO,QAGrBsN,EAAM6D,kBAAkB7L,WACtB8L,cAAe,WAEb,MADAzS,MAAKkS,qBACElS,KAAKmS,YAAYtO,SAE1B0O,0BAA2B,WACzB5D,EAAM+D,uBAAyB/D,EAAM+D,uBAAuBhI,OAAO,SAAS6F,GAC1E,MAAOA,GAAUoC,qBAGrBT,mBAAoB,WAClBlS,KAAKuS,4BACLvS,KAAKmS,YAAcnS,KAAKmS,YAAYzH,OAAO,SAAS6F,GAClD,MAA8B,YAAvBA,EAAUqC,WAAkD,QAAvBrC,EAAUqC,aAG1DC,MAAO,SAAS7R,GACd,GAAIuP,GAAY,GAAI5B,GAAMmE,UAAU9R,EAAQhB,KAW5C,OAVAA,MAAKmS,YAAYhJ,KAAKoH,GACtB5B,EAAMoE,+BAMNxC,EAAUoC,kBACVpC,EAAUrJ,WAAW8L,OACrBzC,EAAUoC,kBACHpC,GAETyC,KAAM,SAAShS,GAIb,MAHIA,IACFA,EAAOiS,SAEFjT,KAAK6S,MAAM7R,IAItB,IAAIoR,IAAAA,CAEJzD,GAAMoE,6BAA+B,WAC9BX,IACHA,GAAAA,EACAC,sBAAsBN,IAc1B,IAAIE,GAAW,GAAItD,GAAM6D,iBACzB7D,GAAMsD,SAAWA,CAEjB,KACE3Q,OAAO4R,eAAevJ,OAAOxG,SAAU,YACrCgQ,cAAAA,EACAC,IAAK,WAAa,MAAOnB,MAE3B,MAAOoB,IACT,IACE1J,OAAOxG,SAAS8O,SAAWA,EAC3B,MAAOoB,MAERhU,EAAqBE,EAAmBC,GCtF3C,SAAUC,EAAQkP,EAAOjP,GACvBiP,EAAM+D,0BAEN/D,EAAMmE,UAAY,SAAS9R,EAAQiR,GASjC,GARAjS,KAAKsT,GAAK,GACNtS,GAAUA,EAAOuS,MACnBvT,KAAKsT,GAAKtS,EAAOuS,KAEnBvT,KAAKgB,OAASA,EACVA,IACFA,EAAOkG,WAAalH,OAEjBiS,EACH,KAAM,IAAIlE,OAAM,gDAElB/N,MAAKwT,UAAYvB,EACjBjS,KAAKyT,gBAAkBhU,EAAOiU,iBAC9B1T,KAAK2T,UAAY,EACjB3T,KAAK4T,SAAAA,EACL5T,KAAK6T,UAAAA,EACL7T,KAAKkH,WAAa,KAClBlH,KAAK8T,oBACL9T,KAAK+T,UAAY,KACjB/T,KAAKgU,cAAgB,OACrBhU,KAAKmH,8BAELnH,KAAKkH,WAAWyJ,SAChB3Q,KAAK2S,mBAGPhE,EAAMmE,UAAUnM,WACdgM,gBAAiB,WACf,GAAIsB,GAAejU,KAAKgU,cACpBE,EAAelU,KAAK4S,SAsBxB,OArBI5S,MAAKmU,eAAiBD,IAAiBD,IACrB,QAAhBC,GACFlU,KAAKoU,sBACLpU,KAAKmU,cAAgB9S,QACI,WAAhB4S,EACTjU,KAAKqU,uBACoB,WAAhBH,IACTlU,KAAKmU,cAAgB9S,SAGrBrB,KAAKsU,kBAAoBJ,IAAiBD,IACxB,QAAhBC,GACFlU,KAAKuU,yBACLvU,KAAKsU,iBAAmBjT,QACC,YAAhB6S,EACTlU,KAAKwU,0BACoB,YAAhBP,IACTjU,KAAKsU,iBAAmBjT,SAG5BrB,KAAKgU,cAAgBhU,KAAK4S,UAClB5S,KAAKmU,eAAiBnU,KAAKsU,kBAErCnN,4BAA6B,WAC3BnH,KAAK2S,iBACL,IAAI8B,GACAC,EACAC,EACAC,EACAC,IAAgB7U,KAAKkH,UACrB2N,KACFJ,EAAkBzU,KAAK0E,aACvBgQ,EAAY1U,KAAK4T,QACjBe,EAAe3U,KAAKiP,UACpB2F,EAAiB5U,KAAK0P,YACtB1P,KAAKkH,WAAWyJ,SAChB3Q,KAAKkH,WAAW4N,SAAW,KAC3B9U,KAAKkH,WAAa,QAGflH,KAAKgB,QAAUhB,KAAKgB,iBAAkB2I,QAAOoL,kBAChD/U,KAAKkH,WAAayH,EAAMqG,wCAAwChV,KAAKgB,QACrE2N,EAAMsG,+BAA+BjV,QAEnCA,KAAKgB,iBAAkB2I,QAAOuL,gBAAkBlV,KAAKgB,iBAAkB2I,QAAOwL,eAChFnV,KAAKkH,WAAayH,EAAMyG,+BAA+BpV,KAAKgB,QAC5D2N,EAAM0G,sBAAsBrV,OAE1BA,KAAKgB,QAAUhB,KAAKgB,OAAOsU,WAC7B3G,EAAM4G,6BAA6BvV,MAEjC6U,IACqB,GAAnBJ,IACFzU,KAAK0E,aAAe+P,GAED,OAAjBE,EACF3U,KAAKiP,UAAY0F,EACW,OAAnBC,EACT5U,KAAK0P,YAAckF,EACS,OAAnB5U,KAAK2T,YACd3T,KAAK0P,YAAc1P,KAAK2T,WAEtBe,GACF1U,KAAKwV,SAGTxV,KAAK2S,mBAEP8C,gBAAiB,WACf,GAAKzV,KAAKgB,QAA4B,QAAlBhB,KAAK4S,UAAzB,CAGA,GAAI3J,GAASjJ,KAAKgB,OAAOiG,QAAQjC,KACjChF,MAAK8T,iBAAiBtS,QAAQ,SAASkU,GACrC1V,KAAK2V,iBAAiBD,EAAgBzM,GAClCjJ,KAAKgB,iBAAkB2I,QAAOuL,iBAChCjM,GAAU0F,EAAMiH,mBAAmBF,EAAe1U,UACpD6U,KAAK7V,SAET8V,sBAAuB,SAASvF,GAC9B,GAAKvQ,KAAKgB,QAAWhB,KAAK6T,SAE1B,IAAK,GAAIxL,GAAI,EAAGA,EAAIrI,KAAKgB,OAAO+U,SAAS/M,OAAQX,IAC/CrI,KAAKgB,OAAO+U,SAAS1N,GAAGnB,WAAaqJ,EACrCvQ,KAAK8T,iBAAiBzL,GAAGyN,sBAAsBvF,IAGnDyF,0BAA2B,WACzB,GAAKhW,KAAKgB,QAAWhB,KAAK6T,SAA1B,CAEA,GAAI5K,GAASjJ,KAAKgB,OAAOiG,QAAQjC,KACjChF,MAAKiW,yBACLjW,KAAKgB,OAAO+U,SAASvU,QAAQ,SAAS0U,GACpC,GAAIR,GAAiB/L,OAAOxG,SAAS8O,SAASY,MAAMqD,EACpDlW,MAAK8T,iBAAiB3K,KAAKuM,GAC3BA,EAAehR,aAAe1E,KAAK0E,aAC/B1E,KAAK4T,SACP8B,EAAeF,QACjBU,EAAMhP,WAAalH,KAAKgB,OAAOkG,WAE/BlH,KAAK2V,iBAAiBD,EAAgBzM,GAElCjJ,KAAKgB,iBAAkB2I,QAAOuL,iBAChCjM,GAAU0F,EAAMiH,mBAAmBM,KACrCL,KAAK7V,SAET2V,iBAAkB,SAASD,EAAgBzM,GAClB,OAAnBjJ,KAAKiP,UACPyG,EAAehG,YAAc1P,KAAK0P,YAAczG,EAASjJ,KAAK0E,aACrDgR,EAAezG,YAAcjP,KAAKiP,UAAYhG,EAASjJ,KAAK0E,eACrEgR,EAAezG,UAAYjP,KAAKiP,UAAYhG,EAASjJ,KAAK0E,eAG9DuN,GAAIA,YACF,MAAOjS,MAAKwT,WAEdZ,GAAIA,aACF,MAAO5S,MAAKkH,WAAalH,KAAKkH,WAAW0L,UAAY,QAEvDuD,GAAIA,YACF,MAAKxM,QAAOyM,SAIPpW,KAAKsU,mBAC0C,IAA9C3F,EAAM+D,uBAAuB/Q,QAAQ3B,OACvC2O,EAAM+D,uBAAuBvJ,KAAKnJ,MAEpCA,KAAKsU,iBAAmB,GAAI8B,SACxB,SAASC,EAASC,GAChBtW,KAAKwU,wBAA0B,WAC7B6B,EAAQrW,OAEVA,KAAKuU,uBAAyB,WAC5B+B,GAAQpM,KAAMC,aAAaoM,UAAWlM,KAAM,iBAE9CwL,KAAK7V,OACW,YAAlBA,KAAK4S,WACP5S,KAAKwU,2BAGFxU,KAAKsU,mBApBV3G,QAAQC,KAAK,6DACN,OAqBX4I,GAAIA,SACF,MAAK7M,QAAOyM,SAIPpW,KAAKmU,gBAC0C,IAA9CxF,EAAM+D,uBAAuB/Q,QAAQ3B,OACvC2O,EAAM+D,uBAAuBvJ,KAAKnJ,MAEpCA,KAAKmU,cAAgB,GAAIiC,SACrB,SAASC,EAASC,GAChBtW,KAAKqU,qBAAuB,WAC1BgC,EAAQrW,OAEVA,KAAKoU,oBAAsB,WACzBkC,GAAQpM,KAAMC,aAAaoM,UAAWlM,KAAM,iBAE9CwL,KAAK7V,OACY,YAAnBA,KAAK4S,WACP5S,KAAKqU,wBAGFrU,KAAKmU,gBApBVxG,QAAQC,KAAK,6DACN,OAqBX6I,GAAIA,YACF,MAAOzW,MAAKkH,WAAWuP,UAEzBA,GAAIA,UAASC,GACK,kBAALA,GACT1W,KAAKkH,WAAWuP,SAAW,SAAUpD,GACnCA,EAAE5D,OAASzP,KACX0W,EAAElG,KAAKxQ,KAAMqT,IACZwC,KAAK7V,MAERA,KAAKkH,WAAWuP,SAAWC,GAG/BrH,GAAIA,YACF,MAAOrP,MAAKkH,WAAWmI,UAEzBA,GAAIA,UAASqH,GACK,kBAALA,GACT1W,KAAKkH,WAAWmI,SAAW,SAAUgE,GACnCA,EAAE5D,OAASzP,KACX0W,EAAElG,KAAKxQ,KAAMqT,IACZwC,KAAK7V,MAERA,KAAKkH,WAAWmI,SAAWqH,GAG/BhH,GAAIA,eACF1P,KAAK2S,iBACL,IAAIjD,GAAc1P,KAAKkH,WAAWwI,WAElC,OADA1P,MAAK2S,kBACEjD,GAETA,GAAIA,aAAYgH,GACd1W,KAAK2S,kBACL3S,KAAKkH,WAAWwI,YAAczF,SAASyM,GAAKA,EAAIhU,KAAKiU,KAAKD,GAAK3S,OAAO6S,UACtE5W,KAAK6W,YACL7W,KAAK8W,cAAc,SAASZ,EAAOjN,GACjCiN,EAAMxG,YAAcgH,EAAIzN,IAE1BjJ,KAAK2S,mBAEP1D,GAAIA,aACF,MAAOjP,MAAKkH,WAAW+H,WAEzBA,GAAIA,WAAUyH,GACZ1W,KAAK2S,kBACL3S,KAAKkH,WAAW+H,UAAYhF,SAASyM,GAAKA,EAAIhU,KAAKiU,KAAKD,GAAK3S,OAAO6S,UACpE5W,KAAK6W,YACL7W,KAAK8W,cAAc,SAASZ,EAAOjN,GACjCiN,EAAMjH,UAAYyH,EAAIzN,IAExBjJ,KAAK2S,mBAEPjO,GAAIA,gBACF,MAAO1E,MAAKkH,WAAWxC,cAEzBA,GAAIA,cAAaoC,GACf9G,KAAK2S,iBACL,IAAIiC,GAAiB5U,KAAK0P,WAC1B1P,MAAKkH,WAAWxC,aAAeoC,EAC/B9G,KAAK8W,cAAc,SAASpB,GAC1BA,EAAehR,aAAeoC,IAEV,UAAlB9G,KAAK4S,WAA2C,QAAlB5S,KAAK4S,WACrC5S,KAAKgT,OAEgB,OAAnB4B,IACF5U,KAAK0P,YAAckF,GAErB5U,KAAK2S,mBAEPK,KAAM,WACJhT,KAAK2S,kBACL3S,KAAK4T,SAAAA,EACL5T,KAAKkH,WAAW8L,OACgC,IAA5ChT,KAAKwT,UAAUrB,YAAYxQ,QAAQ3B,OACrCA,KAAKwT,UAAUrB,YAAYhJ,KAAKnJ,MAElCA,KAAK6W,YACLlI,EAAMoI,eAAe/W,MACrBA,KAAK8W,cAAc,SAASZ,GAC1B,GAAIc,GAAOd,EAAMxG,WACjBwG,GAAMlD,OACNkD,EAAMxG,YAAcsH,IAEtBhX,KAAK2S,mBAEP6C,MAAO,WACLxV,KAAK2S,kBACD3S,KAAK0P,cACP1P,KAAK2T,UAAY3T,KAAK0P,aAExB1P,KAAKkH,WAAWsO,QAChBxV,KAAK6W,YACL7W,KAAK8W,cAAc,SAASZ,GAC1BA,EAAMV,UAERxV,KAAK4T,SAAAA,EACL5T,KAAK2S,mBAEPsE,OAAQ,WACNjX,KAAK2S,kBACL3S,KAAKkH,WAAW+P,SAChBjX,KAAK6W,YACL7W,KAAK2S,mBAEPhC,OAAQ,WACN3Q,KAAK2S,kBACL3S,KAAKkH,WAAWyJ,SAChB3Q,KAAK6W,YACL7W,KAAKiW,yBACLjW,KAAK2S,mBAEPuE,QAAS,WACPlX,KAAK2S,iBACL,IAAIiC,GAAiB5U,KAAK0P,WAC1B1P,MAAKkH,WAAWgQ,UAChBlX,KAAK8W,cAAc,SAASpB,GAC1BA,EAAewB,YAEM,OAAnBtC,IACF5U,KAAK0P,YAAckF,GAErB5U,KAAK2S,mBAEP1B,iBAAkB,SAAS/G,EAAM6G,GAC/B,GAAIoG,GAAUpG,CACQ,mBAAXA,KACToG,EAAU,SAAU9D,GAClBA,EAAE5D,OAASzP,KACX+Q,EAAQP,KAAKxQ,KAAMqT,IAClBwC,KAAK7V,MACR+Q,EAAQ+D,SAAWqC,GAErBnX,KAAKkH,WAAW+J,iBAAiB/G,EAAMiN,IAEzChG,oBAAqB,SAASjH,EAAM6G,GAClC/Q,KAAKkH,WAAWiK,oBAAoBjH,EAAO6G,GAAWA,EAAQ+D,UAAa/D,IAE7EkF,uBAAwB,WACtB,KAAOjW,KAAK8T,iBAAiB9K,QAC3BhJ,KAAK8T,iBAAiBsD,MAAMzG,UAEhCmG,cAAe,SAASzU,GACtB,GAAI4G,GAAS,CASb,IARIjJ,KAAKgB,OAAO+U,UAAY/V,KAAK8T,iBAAiB9K,OAAShJ,KAAKgB,OAAO+U,SAAS/M,QAC9EhJ,KAAKgW,4BACPhW,KAAK8T,iBAAiBtS,QAAQ,SAAS0U,GACrC7T,EAAEmO,KAAKxQ,KAAMkW,EAAOjN,GAChBjJ,KAAKgB,iBAAkB2I,QAAOuL,iBAChCjM,GAAUiN,EAAMlV,OAAO6D,iBACzBgR,KAAK7V,OAEe,WAAlBA,KAAK4S,UAAT,CAEA,GAAI3R,GAASjB,KAAKgB,OAAOiG,QACrB+K,EAAIhS,KAAK0P,WACH,QAANsC,IACFA,EAAIvS,EAAOgH,sBAAsBhH,EAAO+E,wBAAwBvD,GAAS+Q,EAAG/Q,KACrE,MAAL+Q,GAAa5Q,MAAM4Q,KACrBhS,KAAKiW,4BAIXtM,OAAOmJ,UAAYnE,EAAMmE,WAMxBzT,EAAqBE,EAAmBC,GCnX1C,SAASC,EAAQkP,EAAOjP,GAqCvB,QAAS2X,GAAa5O,GACpBzI,KAAKsX,QAAU7X,EAAO4J,mBAAmBZ,GAoG3C,QAAS8O,KAEP,IADA,GAAIC,IAAAA,EACGC,EAAczO,QAAQ,CAC3B,GAAI0F,GAAQ+I,EAAcC,OAC1BhJ,GAAM+G,kBACN+B,GAAAA,EAEF,MAAOA,GA/IT,GAAIG,GAAe,SAAS3W,GAE1B,GADAA,EAAOkG,WAAa7F,OAChBL,YAAkB2I,QAAOuL,gBAAkBlU,YAAkB2I,QAAOwL,YACtE,IAAK,GAAI9M,GAAI,EAAGA,EAAIrH,EAAO+U,SAAS/M,OAAQX,IAC1CsP,EAAa3W,EAAO+U,SAAS1N,IAKnCsG,GAAMiJ,YAAc,SAASC,GAE3B,IAAK,GADDC,MACKzP,EAAI,EAAGA,EAAIwP,EAAQ7O,OAAQX,IAAK,CACvC,GAAIrH,GAAS6W,EAAQxP,EACjBrH,GAAO+W,SACiC,IAAtCD,EAAWnW,QAAQX,EAAO+W,UAC5BD,EAAW3O,KAAKnI,EAAO+W,SAEzB/W,EAAO+W,QAAQhC,SAAS1E,OAAOrQ,EAAO+W,QAAQhC,SAASpU,QAAQX,GAAS,GACxEA,EAAO+W,QAAU,KACjBJ,EAAa3W,IACJA,EAAOkG,YAAelG,EAAOkG,WAAWlG,QAAUA,IAC3DA,EAAOkG,WAAWyJ,SAClB3P,EAAOkG,WAAWlG,OAAS,GAAI+T,gBAAe,SAC1C/T,EAAOkG,WAAW6M,YACpB/S,EAAOkG,WAAW6M,UAAU7M,WAAa,MAE3ClG,EAAOkG,WAAWC,8BAClBwQ,EAAa3W,IAGjB,IAAKqH,EAAI,EAAGA,EAAIyP,EAAW9O,OAAQX,IACjCyP,EAAWzP,GAAG2P,YAQlBrJ,EAAMoG,eAAiB,SAAStF,EAAQhH,EAAa7I,EAAa0T,GAmBhE,MAlBAtT,MAAKyP,OAASA,EACdzP,KAAK+X,QAAU,KAEfnY,EAAcH,EAAOoC,sBAAsBjC,GAC3CI,KAAKgH,aAAevH,EAAOE,iBAAiBC,GAC5CI,KAAKiH,QAAUxH,EAAOqC,qBAAqBlC,GAE3CI,KAAKiB,OAASxB,EAAOqB,WAAWlB,GAAAA,EAAoBI,MACpDA,KAAKiB,OAAO8F,QAAU/G,KACI,kBAAfyI,IACThJ,EAAOqO,WAAW,wBAAyB,aAAc,wCACzD9N,KAAKiY,qBAAuBxP,GAE5BzI,KAAKiY,qBAAuB,GAAIZ,GAAa5O,GAE/CzI,KAAKkY,WAAazP,EAClBzI,KAAK6E,eAAiBpF,EAAO+E,wBAAwBxE,KAAKiH,SAC1DjH,KAAKuT,IAAMD,EACJtT,MAGT2O,EAAMoG,eAAepO,WACnBwR,UAAW,WACT,MAAwC,kBAA7BnY,MAAKiY,qBACPjY,KAAKiY,qBACPjY,KAAKiY,qBAAqBX,SAEnCc,GAAIA,UAASC,GACX,GAA+B,kBAApBrY,MAAKmY,YACd,KAAM,IAAIpK,OAAM,qEAElB/N,MAAKsV,UAAY+C,EACbrY,KAAKkH,YACPlH,KAAKkH,WAAWC,+BAGpBmR,GAAIA,UACF,MAAOtY,MAAK+X,SAEdlY,MAAO,WACL,GAA+B,kBAApBG,MAAKmY,YACd,KAAM,IAAIpK,OAAM,2CAElB,IAAIlO,GAAQ,GAAIkV,gBAAe/U,KAAKyP,UAAYhQ,EAAOE,iBAAiBK,KAAKgH,cAAehH,KAAKuT,IAGjG,OAFA1T,GAAMoY,qBAAuBjY,KAAKiY,qBAClCpY,EAAMqY,WAAalY,KAAKkY,WACjBrY,GAEToT,OAAQ,WACNtE,EAAMiJ,aAAa5X,QAIvB,IAAIoQ,GAAyBC,QAAQ1J,UAAUyI,OAC/CiB,SAAQ1J,UAAUyI,QAAU,SAAS3G,EAAa6H,GAChD,GAAIgD,GAAK,EAIT,OAHIhD,IAAWA,EAAQgD,KACrBA,EAAKhD,EAAQgD,IAER3E,EAAMsD,SAASY,MAAM,GAAIlE,GAAMoG,eAAe/U,KAAMyI,EAAa6H,EAASgD,IAGnF,IAAIiF,GAAapV,SAASsI,gBAAgB,+BAAgC,MAC1EkD,GAAMqG,wCAA0C,SAASwD,GACvD,GAAIA,EAAgB,CAClB,GAAI/I,GAAS+I,EAAe/I,QAAU8I,EAClChP,EAAYiP,EAAeN,UACP,mBAAb3O,KACTA,KAEF,IAAI+G,GAAUkI,EAAexR,YAC7BsJ,GAAQgD,GAAKkF,EAAejF,QAE5B,IAAI9D,GAAS8I,EACThP,KACA+G,EAAU,CAEhB,OAAOF,GAAuBxM,MAAM6L,GAASlG,EAAW+G,KAI1D3B,EAAMsG,+BAAiC,SAAS1E,GAC1CA,EAAUvP,QAA0D,kBAAzCuP,GAAUvP,OAAOiX,sBAC9CtJ,EAAM4G,6BAA6BhF,GAIvC,IAAIkH,KACJ9I,GAAMoI,eAAiB,SAAS0B,GACG,OAA7BA,EAAexJ,WAAuBwJ,EAAe5E,WAE7B,GAAxB4D,EAAczO,QAChBqJ,sBAAsBkF,GAExBE,EAActO,KAAKsP,IAWrB,IAAIC,GAA2B/O,OAAO+H,gBACtCpQ,QAAO4R,eAAevJ,OAAQ,oBAC5BwJ,cAAAA,EACAwF,YAAAA,EACA7R,MAAO,WACL6C,OAAOxG,SAAS8O,SAASM,2BACzB,IAAItK,GAASyQ,EAAyB9U,MAAM5D,KAAM4Y,UAIlD,OAHIrB,OACFtP,EAASyQ,EAAyB9U,MAAM5D,KAAM4Y,YAChDjP,OAAOxG,SAAS8O,SAASM,4BAClBtK,KAIX0B,OAAOoL,eAAiBpG,EAAMoG,eAC9BpL,OAAO0G,QAAQ1J,UAAU8L,cAAgB,WACvC,MAAOtP,UAAS8O,SAASQ,gBAAgB/H,OAAO,SAAS6F,GACvD,MAA4B,QAArBA,EAAUvP,QAAmBuP,EAAUvP,OAAOyO,QAAUzP,MAC/D6V,KAAK7V,SAGTX,EAAqBE,EAAmBC,GCzK1C,SAAUC,EAAQkP,EAAOjP,GA6CvB,QAASmZ,GAASR,GACZA,EAASS,cAEbT,EAASS,aAAAA,EACTC,EAAU5P,KAAKkP,GACVjG,IACHA,GAAAA,EACAC,sBAAsB2G,KAI1B,QAASA,GAAKhH,GACZ,GAAIiH,GAAWF,CACfA,MACAE,EAAS7P,KAAK,SAAS8P,EAAMC,GAC3B,MAAOD,GAAKzF,gBAAkB0F,EAAM1F,kBAEtCwF,EAAWA,EAASvO,OAAO,SAAS2N,GAClCA,GACA,IAAIzF,GAAYyF,EAASnR,WAAamR,EAASnR,WAAW0L,UAAY,MAGtE,OAFiB,WAAbA,GAAuC,WAAbA,IAC5ByF,EAASS,aAAAA,GACJT,EAASS,cAElBC,EAAU5P,KAAKvF,MAAMmV,EAAWE,GAE5BF,EAAU/P,QACZoJ,GAAAA,EACAC,sBAAsB2G,IAEtB5G,GAAAA,EAzEJ,GAEIsB,IAFavQ,SAASsI,gBAAgB,+BAAgC,OAErD,EACrBkD,GAAM4G,6BAA+B,SAAShF,GAC5C,GACI6I,GADA3J,EAASc,EAAUvP,OAAOyO,OAE1B4J,EAA0D,kBAAhC9I,GAAUvP,OAAOmX,WAE7CiB,GADEC,EACe9I,EAAUvP,OAAOmX,YAEjB5H,EAAUvP,OAAOsU,SAEpC,IAAIrU,GAASsP,EAAUvP,OAAOC,OAC1BqY,EAAO,IACXrY,GAASxB,EAAOqC,qBAAqBb,EACrC,IAAIoX,GAAW,WACb,GAAIrG,GAAIqG,EAASnR,WAAamR,EAASnR,WAAWwI,YAAc,IACtD,QAANsC,IACFA,EAAIvS,EAAOgH,sBAAsBhH,EAAO+E,wBAAwBvD,GAAS+Q,EAAG/Q,GACxEG,MAAM4Q,KACRA,EAAI,OAIJA,IAAMsH,IACJD,EACFD,EAAepH,EAAGvC,EAAQc,EAAUvP,QAEpCoY,EAAepH,EAAGzB,EAAUvP,OAAQuP,EAAUvP,OAAOkG,aAGzDoS,EAAOtH,EAGTqG,GAASnR,WAAaqJ,EACtB8H,EAASS,aAAAA,EACTT,EAAS5E,gBAAkBC,IAC3BnD,EAAUwD,UAAYsE,EACtBQ,EAASR,GAGX,IAAIU,MACA3G,GAAAA,CAmCJzD,GAAMmE,UAAUnM,UAAUkQ,UAAY,WAChC7W,KAAK+T,WACP8E,EAAS7Y,KAAK+T,aAGjB1U,EAAqBE,EAAmBC,GCnF3C,SAAUC,EAAQkP,EAAOjP,GAEvB,QAASkW,GAAmB2D,GAC1B,MAAOA,GAAKtS,QAAQjC,MAAQuU,EAAK1U,eAAiB0U,EAAKtS,QAAQG,SAGjE,QAASoS,GAAYzD,EAAUnW,EAAa0T,GAC1CtT,KAAKuT,IAAMD,EACXtT,KAAK+X,QAAU,KACf/X,KAAK+V,SAAWA,MAChB/V,KAAKyZ,UAAUzZ,KAAK+V,UACpBnW,EAAcH,EAAOoC,sBAAsBjC,GAC3CI,KAAKgH,aAAevH,EAAOE,iBAAiBC,GAC5CI,KAAKiH,QAAUxH,EAAOqC,qBAAqBlC,GAAAA,GAC3CI,KAAKiB,OAASxB,EAAOqB,WAAWlB,GAAAA,EAAmBI,MACnDA,KAAKiB,OAAO8F,QAAU/G,KAEQ,SAA1BA,KAAKiH,QAAQ9F,WACfnB,KAAKiH,QAAQ9F,SAAWnB,KAAK6E,gBAIjC8E,OAAOuL,eAAiB,WACtBsE,EAAY5V,MAAM5D,KAAM4Y,YAG1BjP,OAAOwL,YAAc,WACnBqE,EAAY5V,MAAM5D,KAAM4Y,YAG1BY,EAAY7S,WACV+S,YAAa,SAAS1Y,GAEpB,IADA,GAAIgB,GAAIhC,KACK,OAANgC,GAAY,CACjB,GAAIA,GAAKhB,EACP,OAAA,CACFgB,GAAIA,EAAE+V,QAER,OAAA,GAEFC,SAAU,WAGR,IADA,GAAIuB,GAAOvZ,KACJuZ,GACwB,SAAzBA,EAAKtY,OAAOE,WACdoY,EAAKtS,QAAQ9F,SAAWoY,EAAK1U,gBAE/B0U,EAAOA,EAAKxB,OAEV/X,MAAKkH,YACPlH,KAAKkH,WAAWC,+BAGpBsS,UAAW,SAASE,GAClBhL,EAAMiJ,YAAY+B,EAClB,KAAK,GAAItR,GAAI,EAAGA,EAAIsR,EAAY3Q,OAAQX,IACtCsR,EAAYtR,GAAG0P,QAAU/X,MAG7B4Z,UAAW,SAASC,EAAMC,GAExB,IAAK,GADDxP,GAAUwP,EAAW,oCAAsC,qCACtDzR,EAAI,EAAGA,EAAIwR,EAAK7Q,OAAQX,IAC/B,GAAIrI,KAAK0Z,YAAYG,EAAKxR,IACxB,MACE6B,KAAMC,aAAa4P,sBACnB1P,KAAM,wBACNC,QAASA,EAKf,KAAK,GAAIjC,GAAI,EAAGA,EAAIwR,EAAK7Q,OAAQX,IAC/ByR,EAAW9Z,KAAK+V,SAAS5M,KAAK0Q,EAAKxR,IAAMrI,KAAK+V,SAASiE,QAAQH,EAAKxR,GAEtErI,MAAKyZ,UAAUI,GACf7Z,KAAKgY,YAEPiC,OAAQ,WACNja,KAAK4Z,UAAUhB,WAAAA,IAEjBsB,QAAS,WACPla,KAAK4Z,UAAUhB,WAAAA,IAEjBN,GAAIA,UACF,MAAOtY,MAAK+X,SAEdoC,GAAIA,cACF,MAAOna,MAAK+V,SAAS/M,OAAShJ,KAAK+V,SAAS,GAAK,MAEnDqE,GAAIA,aACF,MAAOpa,MAAK+V,SAAS/M,OAAShJ,KAAK+V,SAAS/V,KAAK+V,SAAS/M,OAAS,GAAK,MAE1EnJ,MAAO,WAGL,IAAK,GAFDwa,GAAe5a,EAAOE,iBAAiBK,KAAKgH,cAC5CsT,KACKjS,EAAI,EAAGA,EAAIrI,KAAK+V,SAAS/M,OAAQX,IACxCiS,EAAenR,KAAKnJ,KAAK+V,SAAS1N,GAAGxI,QAEvC,OAAQG,gBAAgBmV,aACpB,GAAIA,aAAYmF,EAAgBD,GAChC,GAAInF,gBAAeoF,EAAgBD,IAEzCpH,OAAQ,WACNtE,EAAMiJ,aAAa5X,SAIvB2J,OAAOuL,eAAevO,UAAYrF,OAAOiZ,OAAOf,EAAY7S,WAC5DrF,OAAO4R,eACHvJ,OAAOuL,eAAevO,UACtB,kBAEEyM,IAAK,WACH,GAAIoH,GAAQ,CAIZ,OAHAxa,MAAK+V,SAASvU,QAAQ,SAAS0U,GAC7BsE,GAAS5E,EAAmBM,KAEvBxT,KAAK+X,IAAID,EAAO,MAI/B7Q,OAAOwL,YAAYxO,UAAYrF,OAAOiZ,OAAOf,EAAY7S,WACzDrF,OAAO4R,eACHvJ,OAAOwL,YAAYxO,UACnB,kBAEEyM,IAAK,WACH,GAAIqH,GAAM,CAIV,OAHAza,MAAK+V,SAASvU,QAAQ,SAAS0U,GAC7BuE,EAAM/X,KAAK+X,IAAIA,EAAK7E,EAAmBM,MAElCuE,KAIf9L,EAAMyG,+BAAiC,SAAS1G,GAC9C,GAAIgM,GACAzZ,EAAS,KACT0Z,EAAS,SAASC,GACpB,GAAIrK,GAAYmK,EAAoB5F,QACpC,OAAKvE,IAGsB,WAAvBA,EAAUqC,WAGTrC,EAAUvP,OAGL,MAAN4Z,MACFrK,GAAU0F,yBAQF,GAAN2E,GAAWrK,EAAU7L,aAAe,IACjCzD,IACHA,EAASxB,EAAOqC,qBAAqByO,EAAUvP,OAAOC,SAExD2Z,EAAKnb,EAAOgH,sBAAsBhH,EAAO+E,wBAAwBvD,GAAS,GAAIA,GAC1EG,MAAMwZ,IAAa,MAANA,IACfrK,EAAUuG,cAAc,SAASZ,GAC/BA,EAAMxG,YAAc,SAEtBa,GAAU0F,0BATd,OAlBA,QAiCE4E,EAAmB,GAAI9F,gBAAe,QAAUrG,EAAMzH,QAASyH,EAAM6E,IAGzE,OAFAsH,GAAiBzC,SAAWuC,EAC5BD,EAAsB/L,EAAMsD,SAASY,MAAMgI,IAI7ClM,EAAM0G,sBAAwB,SAAS9E,GACrCA,EAAUrJ,WAAW4N,SAAWvE,EAChCA,EAAUsD,UAAAA,EACVlF,EAAMoI,eAAexG,GACrBA,EAAUyF,4BACVzF,EAAUuF,sBAAsBvF,IAGlC5B,EAAMiH,mBAAqBA,GAE1BvW,EAAqBE,EAAmBC,GX3LvCD,EAAAA,QAEJub,MACMtb,WAAAA,MAAuBQ","file":"web-animations-next-lite.min.js"} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js
deleted file mode 100644
index e61b746f53f..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.
-
-!function(a,b){var c={},d={},e={},f=null;!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=w}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==u.indexOf(b[c]))return;if("direction"==c&&-1==v.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return 0>a||a>1||0>c||c>1?w:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<1e-4)return f(b,d,i);e>j?g=i:h=i}}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function k(a){B||(B=document.createElement("div").style),B.animationTimingFunction="",B.animationTimingFunction=a;var b=B.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");var c=D.exec(b);if(c)return i.apply(this,c.slice(1).map(Number));var d=E.exec(b);if(d)return j(Number(d[1]),{start:x,middle:y,end:z}[d[2]]);var f=A[b];return f?f:w}function l(a){return Math.abs(m(a)/a.playbackRate)}function m(a){return a.duration*a.iterations}function n(a,b,c){return null==b?F:b<c.delay?G:b>=c.delay+a?H:I}function o(a,b,c,d,e){switch(d){case G:return"backwards"==b||"both"==b?0:null;case I:return c-e;case H:return"forwards"==b||"both"==b?a:null;case F:return null}}function p(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function q(a,b,c,d,e){return c===1/0||c===-(1/0)||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function r(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function s(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d._easingFunction(h)}function t(a,b,c){var d=n(a,b,c),e=o(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===G?0:1;var f=c.iterationStart*c.duration,g=p(a,e,f,c),h=q(c.duration,m(c),g,f,c),i=r(c.duration,h,g,c);return s(i,c.duration,h,c)/c.duration}var u="backwards|forwards|both|none".split("|"),v="reverse|alternate|alternate-reverse".split("|"),w=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||0>a)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||0>a)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=k(a),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||0>a)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var x=1,y=.5,z=0,A={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,x),"step-middle":j(1,y),"step-end":j(1,z)},B=null,C="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",D=new RegExp("cubic-bezier\\("+C+","+C+","+C+","+C+"\\)"),E=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,F=0,G=1,H=2,I=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=l,a.calculateTimeFraction=t,a.calculatePhase=n,a.toTimingFunction=k}(c,f),function(a,b){function c(a,b){return a in j?j[a][b]||b:b}function d(a,b,d){var e=g[a];if(e){h.style[a]=b;for(var f in e){var i=e[f],j=h.style[i];d[i]=c(i,j)}}else d[a]=c(a,b)}function e(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;f>g;g++)e={},"offset"in a?e.offset=a.offset:1==f?e.offset=1:e.offset=g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function f(a){function b(){var a=c.length;null==c[a-1].offset&&(c[a-1].offset=1),a>1&&null==c[0].offset&&(c[0].offset=0);for(var b=0,d=c[0].offset,e=1;a>e;e++){var f=c[e].offset;if(null!=f){for(var g=1;e-b>g;g++)c[b+g].offset=d+(f-d)*g/(e-b);b=e,d=f}}}if(null==a)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&a[Symbol.iterator]&&(a=Array.from(a)),Array.isArray(a)||(a=e(a));for(var c=a.map(function(a){var b={};for(var c in a){var e=a[c];if("offset"==c){if(null!=e&&(e=Number(e),!isFinite(e)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==c)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};e=""+e}d(c,e,b)}return void 0==b.offset&&(b.offset=null),b}),f=!0,g=-(1/0),h=0;h<c.length;h++){var i=c[h].offset;if(null!=i){if(g>i)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return c=c.filter(function(a){return a.offset>=0&&a.offset<=1}),f||b(),c}var g={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},h=document.createElementNS("http://www.w3.org/1999/xhtml","div"),i={thin:"1px",medium:"3px",thick:"5px"},j={borderBottomWidth:i,borderLeftWidth:i,borderRightWidth:i,borderTopWidth:i,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:i,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=e,a.normalizeKeyframes=f}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=f[g].offset,i=f[g+1].offset,j=f[g].value,k=f[g+1].value,l=f[g].easing;h==i&&(1==i?j=k:k=j),d.push({startTime:h,endTime:i,easing:a.toTimingFunction(l?l:"linear"),property:e,interpolation:b.propertyInterpolation(e,j,k)})}return d.sort(function(a,b){return a.startTime-b.startTime}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return 0>=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){var g=c[f];e(a,b,d(g))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(c,d,f),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateTimeFraction(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d._isCurrent=function(d){var e=a.calculatePhase(c,d,b);return e===PhaseActive||e===PhaseBefore},d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return h=i(a),null!==h},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._isCurrent=i._isCurrent,k._totalDuration=i._totalDuration,k._id=g,k},b.NullEffect=function(a){var b=function(){a&&(a(),a=null)};return b._update=function(){return null},b._totalDuration=0,b._isCurrent=function(){return!1},b._hasSameTarget=function(){return!1},b}}(c,d,f),function(a,b){function c(a,b,c){c.enumerable=!0,c.configurable=!0,Object.defineProperty(a,b,c)}function d(a){this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=a.style,this._length=0,this._isAnimatedProperty={};for(var b=0;b<this._style.length;b++){var c=this._style[b];this._surrogateStyle[c]=this._style[c]}this._updateIndices()}function e(a){if(!a._webAnimationsPatchedStyle){var b=new d(a);try{c(a,"style",{get:function(){return b}})}catch(e){a.style._set=function(b,c){a.style[b]=c},a.style._clear=function(b){a.style[b]=""}}a._webAnimationsPatchedStyle=a.style}}var f={cssText:1,length:1,parentRule:1},g={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},h={removeProperty:1,setProperty:1};d.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(a){for(var b={},c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;this._surrogateStyle.cssText=a,this._updateIndices();for(var c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;for(var d in b)this._isAnimatedProperty[d]||this._style.setProperty(d,this._surrogateStyle.getPropertyValue(d))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(a){return function(){return this._surrogateStyle[a]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(a,b){this._style[a]=b,this._isAnimatedProperty[a]=!0},_clear:function(a){this._style[a]=this._surrogateStyle[a],delete this._isAnimatedProperty[a]}};for(var i in g)d.prototype[i]=function(a,b){return function(){var c=this._surrogateStyle[a].apply(this._surrogateStyle,arguments);return b&&(this._isAnimatedProperty[arguments[0]]||this._style[a].apply(this._style,arguments),this._updateIndices()),c}}(i,i in h);for(var j in document.documentElement.style)j in f||j in g||!function(a){c(d.prototype,a,{get:function(){return this._surrogateStyle[a]},set:function(b){this._surrogateStyle[a]=b,this._updateIndices(),this._isAnimatedProperty[a]||(this._style[a]=b)}})}(j);a.apply=function(b,c,d){e(b),b.style._set(a.propertyName(c),d)},a.clear=function(b,c){b._webAnimationsPatchedStyle&&b.style._clear(a.propertyName(c))}}(d,f),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(d),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return.5>d?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(d,f),function(a,b){function c(a,b,c){return Math.max(Math.min(a,c),b)}function d(b,d,e){var f=a.dot(b,d);f=c(f,-1,1);var g=[];if(1===f)g=b;else for(var h=Math.acos(f),i=1*Math.sin(e*h)/Math.sqrt(1-f*f),j=0;4>j;j++)g.push(b[j]*(Math.cos(e*h)-f*i)+d[j]*i);return g}var e=function(){function a(a,b){for(var c=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],d=0;4>d;d++)for(var e=0;4>e;e++)for(var f=0;4>f;f++)c[d][e]+=b[d][f]*a[f][e];return c}function b(a){return 0==a[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]}function c(c,d,e,f,g){for(var h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i=0;4>i;i++)h[i][3]=g[i];for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[3][i]+=c[j]*h[j][i];var k=f[0],l=f[1],m=f[2],n=f[3],o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];o[0][0]=1-2*(l*l+m*m),o[0][1]=2*(k*l-m*n),o[0][2]=2*(k*m+l*n),o[1][0]=2*(k*l+m*n),o[1][1]=1-2*(k*k+m*m),o[1][2]=2*(l*m-k*n),o[2][0]=2*(k*m-l*n),o[2][1]=2*(l*m+k*n),o[2][2]=1-2*(k*k+l*l),h=a(h,o);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];e[2]&&(p[2][1]=e[2],h=a(h,p)),e[1]&&(p[2][1]=0,p[2][0]=e[0],h=a(h,p)),e[0]&&(p[2][0]=0,p[1][0]=e[0],h=a(h,p));for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[i][j]*=d[i];return b(h)?[h[0][0],h[0][1],h[1][0],h[1][1],h[3][0],h[3][1]]:h[0].concat(h[1],h[2],h[3])}return c}();a.composeMatrix=e,a.quat=d}(d,f),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.invalidateEffects()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.invalidateEffects())},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._finishedFlag=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag}}}(c,d,f),function(a,b,c){function d(a){var b=j;j=[],a<p.currentTime&&(a=p.currentTime),h(a,!0),b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c){n=!1;var d=b.timeline;d.currentTime=a,d._animations.sort(e),m=!1;var f=d._animations;d._animations=[];var g=[],h=[];f=f.filter(function(b){b._tick(a,c),b._inEffect?h.push(b._effect):g.push(b._effect),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;return b._inTimeline=d,d}),o.push.apply(o,g),o.push.apply(o,h),d._animations.push.apply(d._animations,f),m&&requestAnimationFrame(function(){})}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.invalidateEffects(),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.invalidateEffects=function(){h(b.timeline.currentTime,!1),g()};var o=[],p=new f;b.timeline=p}(c,d,f),function(a,b){function c(a,b){for(var c=0,d=0;d<a.length;d++)c+=a[d]*b[d];return c}function d(a,b){return[a[0]*b[0]+a[4]*b[1]+a[8]*b[2]+a[12]*b[3],a[1]*b[0]+a[5]*b[1]+a[9]*b[2]+a[13]*b[3],a[2]*b[0]+a[6]*b[1]+a[10]*b[2]+a[14]*b[3],a[3]*b[0]+a[7]*b[1]+a[11]*b[2]+a[15]*b[3],a[0]*b[4]+a[4]*b[5]+a[8]*b[6]+a[12]*b[7],a[1]*b[4]+a[5]*b[5]+a[9]*b[6]+a[13]*b[7],a[2]*b[4]+a[6]*b[5]+a[10]*b[6]+a[14]*b[7],a[3]*b[4]+a[7]*b[5]+a[11]*b[6]+a[15]*b[7],a[0]*b[8]+a[4]*b[9]+a[8]*b[10]+a[12]*b[11],a[1]*b[8]+a[5]*b[9]+a[9]*b[10]+a[13]*b[11],a[2]*b[8]+a[6]*b[9]+a[10]*b[10]+a[14]*b[11],a[3]*b[8]+a[7]*b[9]+a[11]*b[10]+a[15]*b[11],a[0]*b[12]+a[4]*b[13]+a[8]*b[14]+a[12]*b[15],a[1]*b[12]+a[5]*b[13]+a[9]*b[14]+a[13]*b[15],a[2]*b[12]+a[6]*b[13]+a[10]*b[14]+a[14]*b[15],a[3]*b[12]+a[7]*b[13]+a[11]*b[14]+a[15]*b[15]]}function e(a){var b=a.rad||0,c=a.deg||0,d=a.grad||0,e=a.turn||0,f=(c/360+d/400+e)*(2*Math.PI)+b;return f}function f(a){switch(a.t){case"rotatex":var b=e(a.d[0]);return[1,0,0,0,0,Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1];case"rotatey":var b=e(a.d[0]);return[Math.cos(b),0,-Math.sin(b),0,0,1,0,0,Math.sin(b),0,Math.cos(b),0,0,0,0,1];case"rotate":case"rotatez":var b=e(a.d[0]);return[Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var c=a.d[0],d=a.d[1],f=a.d[2],b=e(a.d[3]),g=c*c+d*d+f*f;if(0===g)c=1,d=0,f=0;else if(1!==g){var h=Math.sqrt(g);c/=h,d/=h,f/=h}var i=Math.sin(b/2),j=i*Math.cos(b/2),k=i*i;return[1-2*(d*d+f*f)*k,2*(c*d*k+f*j),2*(c*f*k-d*j),0,2*(c*d*k-f*j),1-2*(c*c+f*f)*k,2*(d*f*k+c*j),0,2*(c*f*k+d*j),2*(d*f*k-c*j),1-2*(c*c+d*d)*k,0,0,0,0,1];case"scale":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[a.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,a.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,a.d[0],0,0,0,0,1];case"scale3d":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,a.d[2],0,0,0,0,1];case"skew":var l=e(a.d[0]),m=e(a.d[1]);return[1,Math.tan(m),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":var b=e(a.d[0]);return[1,0,0,0,Math.tan(b),1,0,0,0,0,1,0,0,0,0,1];case"skewy":var b=e(a.d[0]);return[1,Math.tan(b),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":var c=a.d[0].px||0,d=a.d[1].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,0,1];case"translatex":var c=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,0,0,1];case"translatey":var d=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,d,0,1];case"translatez":var f=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,f,1];case"translate3d":var c=a.d[0].px||0,d=a.d[1].px||0,f=a.d[2].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,f,1];case"perspective":var n=a.d[0].px?-1/a.d[0].px:0;return[1,0,0,0,0,1,0,0,0,0,1,n,0,0,0,1];case"matrix":return[a.d[0],a.d[1],0,0,a.d[2],a.d[3],0,0,0,0,1,0,a.d[4],a.d[5],0,1];case"matrix3d":return a.d}}function g(a){return 0===a.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:a.map(f).reduce(d)}function h(a){return[i(g(a))]}var i=function(){function a(a){return a[0][0]*a[1][1]*a[2][2]+a[1][0]*a[2][1]*a[0][2]+a[2][0]*a[0][1]*a[1][2]-a[0][2]*a[1][1]*a[2][0]-a[1][2]*a[2][1]*a[0][0]-a[2][2]*a[0][1]*a[1][0]}function b(b){for(var c=1/a(b),d=b[0][0],e=b[0][1],f=b[0][2],g=b[1][0],h=b[1][1],i=b[1][2],j=b[2][0],k=b[2][1],l=b[2][2],m=[[(h*l-i*k)*c,(f*k-e*l)*c,(e*i-f*h)*c,0],[(i*j-g*l)*c,(d*l-f*j)*c,(f*g-d*i)*c,0],[(g*k-h*j)*c,(j*e-d*k)*c,(d*h-e*g)*c,0]],n=[],o=0;3>o;o++){for(var p=0,q=0;3>q;q++)p+=b[3][q]*m[q][o];n.push(p)}return n.push(1),m.push(n),m}function d(a){return[[a[0][0],a[1][0],a[2][0],a[3][0]],[a[0][1],a[1][1],a[2][1],a[3][1]],[a[0][2],a[1][2],a[2][2],a[3][2]],[a[0][3],a[1][3],a[2][3],a[3][3]]]}function e(a,b){for(var c=[],d=0;4>d;d++){for(var e=0,f=0;4>f;f++)e+=a[f]*b[f][d];c.push(e)}return c}function f(a){var b=g(a);return[a[0]/b,a[1]/b,a[2]/b]}function g(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function h(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function i(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function j(j){var k=[j.slice(0,4),j.slice(4,8),j.slice(8,12),j.slice(12,16)];if(1!==k[3][3])return null;for(var l=[],m=0;4>m;m++)l.push(k[m].slice());for(var m=0;3>m;m++)l[m][3]=0;if(0===a(l))return!1;var n,o=[];if(k[0][3]||k[1][3]||k[2][3]){o.push(k[0][3]),o.push(k[1][3]),o.push(k[2][3]),o.push(k[3][3]);var p=b(l),q=d(p);n=e(o,q)}else n=[0,0,0,1];var r=k[3].slice(0,3),s=[];s.push(k[0].slice(0,3));var t=[];t.push(g(s[0])),s[0]=f(s[0]);var u=[];s.push(k[1].slice(0,3)),u.push(c(s[0],s[1])),s[1]=h(s[1],s[0],1,-u[0]),t.push(g(s[1])),s[1]=f(s[1]),u[0]/=t[1],s.push(k[2].slice(0,3)),u.push(c(s[0],s[2])),s[2]=h(s[2],s[0],1,-u[1]),u.push(c(s[1],s[2])),s[2]=h(s[2],s[1],1,-u[2]),t.push(g(s[2])),s[2]=f(s[2]),u[1]/=t[2],u[2]/=t[2];var v=i(s[1],s[2]);if(c(s[0],v)<0)for(var m=0;3>m;m++)t[m]*=-1,s[m][0]*=-1,s[m][1]*=-1,s[m][2]*=-1;var w,x,y=s[0][0]+s[1][1]+s[2][2]+1;return y>1e-4?(w=.5/Math.sqrt(y),x=[(s[2][1]-s[1][2])*w,(s[0][2]-s[2][0])*w,(s[1][0]-s[0][1])*w,.25/w]):s[0][0]>s[1][1]&&s[0][0]>s[2][2]?(w=2*Math.sqrt(1+s[0][0]-s[1][1]-s[2][2]),x=[.25*w,(s[0][1]+s[1][0])/w,(s[0][2]+s[2][0])/w,(s[2][1]-s[1][2])/w]):s[1][1]>s[2][2]?(w=2*Math.sqrt(1+s[1][1]-s[0][0]-s[2][2]),x=[(s[0][1]+s[1][0])/w,.25*w,(s[1][2]+s[2][1])/w,(s[0][2]-s[2][0])/w]):(w=2*Math.sqrt(1+s[2][2]-s[0][0]-s[1][1]),x=[(s[0][2]+s[2][0])/w,(s[1][2]+s[2][1])/w,.25*w,(s[1][0]-s[0][1])/w]),[r,t,u,x,n]}return j}();a.dot=c,a.makeMatrixDecomposition=h}(d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,0>=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}return""==c?d:void 0}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;j>k;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(d),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);if(c)return d.inset=!0,c;var c=a.consumeLengthOrPercent(b);if(c)return d.lengths.push(c[0]),c;var c=a.consumeColor(b);return c?(d.color=c[0],c):void 0}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);return e&&e[0].length?[d,e[1]]:void 0}function c(c){var d=a.consumeRepeated(b,/^,/,c);return d&&""==d[1]?d[0]:void 0}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(d),function(a,b){function c(a){return a.toFixed(3).replace(".000","")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){return/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a)?Number(a):void 0}function f(a,b){return[a,b,c]}function g(a,b){return 0!=a?i(0,1/0)(a,b):void 0}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,j,["z-index"]),a.parseNumber=e,a.mergeNumbers=f,a.numberToString=c}(d,f),function(a,b){function c(a,b){return"visible"==a||"visible"==b?[0,1,function(c){return 0>=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,c,["visibility"])}(d),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",
-f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(new RegExp("U"+h,"g"),"").replace(new RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(a,b){return e(a,b,!0)}function e(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);return d&&4==d[0].length?d[0]:void 0}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(d,f),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r],void 0===p)return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]),g=a.composeMatrix(b[0],b[1],b[2],c,b[4]),h=g.map(f).join(",");return h}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"])}(d,f),function(a){function b(a){var b=Number(a);return isNaN(b)||100>b||b>900||b%100!==0?void 0:b}function c(b){return b=100*Math.round(b/100),b=a.clamp(100,900,b),400===b?"normal":700===b?"bold":String(b)}function d(a,b){return[a,b,c]}a.addPropertiesHandler(b,d,["font-weight"])}(d),function(a){function b(a){var b={};for(var c in a)b[c]=-a[c];return b}function c(b){return a.consumeToken(/^(left|center|right|top|bottom)\b/i,b)||a.consumeLengthOrPercent(b)}function d(b,d){var e=a.consumeRepeated(c,/^/,d);if(e&&""==e[1]){var f=e[0];if(f[0]=f[0]||"center",f[1]=f[1]||"center",3==b&&(f[2]=f[2]||{px:0}),f.length==b){if(/top|bottom/.test(f[0])||/left|right/.test(f[1])){var h=f[0];f[0]=f[1],f[1]=h}if(/left|right|center|Object/.test(f[0])&&/top|bottom|center|Object/.test(f[1]))return f.map(function(a){return"object"==typeof a?a:g[a]})}}}function e(d){var e=a.consumeRepeated(c,/^/,d);if(e){for(var f=e[0],h=[{"%":50},{"%":50}],i=0,j=!1,k=0;k<f.length;k++){var l=f[k];"string"==typeof l?(j=/bottom|right/.test(l),i={left:0,right:0,center:i,top:1,bottom:1}[l],h[i]=g[l],"center"==l&&i++):(j&&(l=b(l),l["%"]=(l["%"]||0)+100),h[i]=l,i++,j=!1)}return[h,e[1]]}}function f(b){var c=a.consumeRepeated(e,/^,/,b);return c&&""==c[1]?c[0]:void 0}var g={left:{"%":0},center:{"%":50},right:{"%":100},top:{"%":0},bottom:{"%":100}},h=a.mergeNestedRepeated.bind(null,a.mergeDimensions," ");a.addPropertiesHandler(d.bind(null,3),h,["transform-origin"]),a.addPropertiesHandler(d.bind(null,2),h,["perspective-origin"]),a.consumePosition=e,a.mergeOffsetList=h;var i=a.mergeNestedRepeated.bind(null,h,", ");a.addPropertiesHandler(f,i,["background-position","object-position"])}(d),function(a){function b(b){var c=a.consumeToken(/^circle/,b);if(c&&c[0])return["circle"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),d,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\)/))],c[1]));var f=a.consumeToken(/^ellipse/,b);if(f&&f[0])return["ellipse"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),e,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\)/))],f[1]));var g=a.consumeToken(/^polygon/,b);return g&&g[0]?["polygon"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),a.optional(a.consumeToken.bind(void 0,/^nonzero\s*,|^evenodd\s*,/),"nonzero,"),a.consumeSizePairList,a.ignore(a.consumeToken.bind(void 0,/^\)/))],g[1])):void 0}function c(b,c){return b[0]===c[0]?"circle"==b[0]?a.mergeList(b.slice(1),c.slice(1),["circle(",a.mergeDimensions," at ",a.mergeOffsetList,")"]):"ellipse"==b[0]?a.mergeList(b.slice(1),c.slice(1),["ellipse(",a.mergeNonNegativeSizePair," at ",a.mergeOffsetList,")"]):"polygon"==b[0]&&b[1]==c[1]?a.mergeList(b.slice(2),c.slice(2),["polygon(",b[1],g,")"]):void 0:void 0}var d=a.consumeParenthesised.bind(null,a.parseLengthOrPercent),e=a.consumeRepeated.bind(void 0,d,/^/),f=a.mergeNestedRepeated.bind(void 0,a.mergeDimensions," "),g=a.mergeNestedRepeated.bind(void 0,f,",");a.addPropertiesHandler(b,c,["shape-outside"])}(d),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b)})}var d={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a}}(d,f)}(),!function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(g){}finally{c&&c.cancel()}if(!d){var h=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),h.call(this,b,c)}}}(c),!function(a,b,c){function d(a){var b=window.document.timeline;b.currentTime=a,b._discardAnimations(),0==b._animations.length?f=!1:requestAnimationFrame(d)}var e=window.requestAnimationFrame;window.requestAnimationFrame=function(a){return e(function(b){window.document.timeline._updateAnimationsPromises(),a(b),window.document.timeline._updateAnimationsPromises()})},b.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},b.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){b.animationsWithPromises=b.animationsWithPromises.filter(function(a){return a._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(a){return"finished"!=a.playState&&"idle"!=a.playState})},_play:function(a){var c=new b.Animation(a,this);return this._animations.push(c),b.restartWebAnimationsNextTick(),c._updatePromises(),c._animation.play(),c._updatePromises(),c},play:function(a){return a&&a.remove(),this._play(a)}};var f=!1;b.restartWebAnimationsNextTick=function(){f||(f=!0,requestAnimationFrame(d))};var g=new b.AnimationTimeline;b.timeline=g;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return g}})}catch(h){}try{window.document.timeline=g}catch(h){}}(c,e,f),function(a,b,c){b.animationsWithPromises=[],b.Animation=function(b,c){if(this.id="",b&&b._id&&(this.id=b._id),this.effect=b,b&&(b._animation=this),!c)throw new Error("Animation with null timeline is not supported");this._timeline=c,this._sequenceNumber=a.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},b.Animation.prototype={_updatePromises:function(){var a=this._oldPlayState,b=this.playState;return this._readyPromise&&b!==a&&("idle"==b?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==a?this._resolveReadyPromise():"pending"==b&&(this._readyPromise=void 0)),this._finishedPromise&&b!==a&&("idle"==b?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==b?this._resolveFinishedPromise():"finished"==a&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var a,c,d,e,f=!!this._animation;f&&(a=this.playbackRate,c=this._paused,d=this.startTime,e=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=b.newUnderlyingAnimationForKeyframeEffect(this.effect),b.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=b.newUnderlyingAnimationForGroup(this.effect),b.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&b.bindAnimationForCustomEffect(this),f&&(1!=a&&(this.playbackRate=a),null!==d?this.startTime=d:null!==e?this.currentTime=e:null!==this._holdTime&&(this.currentTime=this._holdTime),c&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var a=this.effect._timing.delay;this._childAnimations.forEach(function(c){this._arrangeChildren(c,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c.effect))}.bind(this))}},_setExternalAnimation:function(a){if(this.effect&&this._isGroup)for(var b=0;b<this.effect.children.length;b++)this.effect.children[b]._animation=a,this._childAnimations[b]._setExternalAnimation(a)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var a=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(c){var d=window.document.timeline._play(c);this._childAnimations.push(d),d.playbackRate=this.playbackRate,this._paused&&d.pause(),c._animation=this.effect._animation,this._arrangeChildren(d,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c))}.bind(this))}},_arrangeChildren:function(a,b){null===this.startTime?a.currentTime=this.currentTime-b/this.playbackRate:a.startTime!==this.startTime+b/this.playbackRate&&(a.startTime=this.startTime+b/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(a,b){this._resolveFinishedPromise=function(){a(this)},this._rejectFinishedPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._readyPromise=new Promise(function(a,b){this._resolveReadyPromise=function(){a(this)},this._rejectReadyPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(a){"function"==typeof a?this._animation.onfinish=function(b){b.target=this,a.call(this,b)}.bind(this):this._animation.onfinish=a},get oncancel(){return this._animation.oncancel},set oncancel(a){"function"==typeof a?this._animation.oncancel=function(b){b.target=this,a.call(this,b)}.bind(this):this._animation.oncancel=a},get currentTime(){this._updatePromises();var a=this._animation.currentTime;return this._updatePromises(),a},set currentTime(a){this._updatePromises(),this._animation.currentTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.currentTime=a-c}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(a){this._updatePromises(),this._animation.startTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.startTime=a+c}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(a){this._updatePromises();var b=this.currentTime;this._animation.playbackRate=a,this._forEachChild(function(b){b.playbackRate=a}),"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!==b&&(this.currentTime=b),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&this._timeline._animations.push(this),this._register(),b.awaitStartTime(this),this._forEachChild(function(a){var b=a.currentTime;a.play(),a.currentTime=b}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(a){a.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var a=this.currentTime;this._animation.reverse(),this._forEachChild(function(a){a.reverse()}),null!==a&&(this.currentTime=a),this._updatePromises()},addEventListener:function(a,b){var c=b;"function"==typeof b&&(c=function(a){a.target=this,b.call(this,a)}.bind(this),b._wrapper=c),this._animation.addEventListener(a,c)},removeEventListener:function(a,b){this._animation.removeEventListener(a,b&&b._wrapper||b)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(b){var c=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(a){b.call(this,a,c),this.effect instanceof window.SequenceEffect&&(c+=a.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var d=this.effect._timing,e=this.currentTime;null!==e&&(e=a.calculateTimeFraction(a.calculateActiveDuration(d),e,d)),(null==e||isNaN(e))&&this._removeChildAnimations()}}},window.Animation=b.Animation}(c,e,f),function(a,b,c){function d(b){this._frames=a.normalizeKeyframes(b)}function e(){for(var a=!1;i.length;){var b=i.shift();b._updateChildren(),a=!0}return a}var f=function(a){if(a._animation=void 0,a instanceof window.SequenceEffect||a instanceof window.GroupEffect)for(var b=0;b<a.children.length;b++)f(a.children[b])};b.removeMulti=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];d._parent?(-1==b.indexOf(d._parent)&&b.push(d._parent),d._parent.children.splice(d._parent.children.indexOf(d),1),d._parent=null,f(d)):d._animation&&d._animation.effect==d&&(d._animation.cancel(),d._animation.effect=new KeyframeEffect(null,[]),d._animation._callback&&(d._animation._callback._animation=null),d._animation._rebuildUnderlyingAnimation(),f(d))}for(c=0;c<b.length;c++)b[c]._rebuild()},b.KeyframeEffect=function(b,c,e,f){return this.target=b,this._parent=null,e=a.numericTimingToObject(e),this._timingInput=a.cloneTimingInput(e),this._timing=a.normalizeTimingInput(e),this.timing=a.makeTiming(e,!1,this),this.timing._effect=this,"function"==typeof c?(a.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=c):this._normalizedKeyframes=new d(c),this._keyframes=c,this.activeDuration=a.calculateActiveDuration(this._timing),this._id=f,this},b.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(a){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=a,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var b=new KeyframeEffect(this.target,[],a.cloneTimingInput(this._timingInput),this._id);return b._normalizedKeyframes=this._normalizedKeyframes,b._keyframes=this._keyframes,b},remove:function(){b.removeMulti([this])}};var g=Element.prototype.animate;Element.prototype.animate=function(a,c){var d="";return c&&c.id&&(d=c.id),b.timeline._play(new b.KeyframeEffect(this,a,c,d))};var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");b.newUnderlyingAnimationForKeyframeEffect=function(a){if(a){var b=a.target||h,c=a._keyframes;"function"==typeof c&&(c=[]);var d=a._timingInput;d.id=a._id}else var b=h,c=[],d=0;return g.apply(b,[c,d])},b.bindAnimationForKeyframeEffect=function(a){a.effect&&"function"==typeof a.effect._normalizedKeyframes&&b.bindAnimationForCustomEffect(a)};var i=[];b.awaitStartTime=function(a){null===a.startTime&&a._isGroup&&(0==i.length&&requestAnimationFrame(e),i.push(a))};var j=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){window.document.timeline._updateAnimationsPromises();var a=j.apply(this,arguments);return e()&&(a=j.apply(this,arguments)),window.document.timeline._updateAnimationsPromises(),a}}),window.KeyframeEffect=b.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(a){return null!==a.effect&&a.effect.target==this}.bind(this))}}(c,e,f),function(a,b,c){function d(a){a._registered||(a._registered=!0,g.push(a),h||(h=!0,requestAnimationFrame(e)))}function e(a){var b=g;g=[],b.sort(function(a,b){return a._sequenceNumber-b._sequenceNumber}),b=b.filter(function(a){a();var b=a._animation?a._animation.playState:"idle";return"running"!=b&&"pending"!=b&&(a._registered=!1),a._registered}),g.push.apply(g,b),g.length?(h=!0,requestAnimationFrame(e)):h=!1}var f=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);b.bindAnimationForCustomEffect=function(b){var c,e=b.effect.target,g="function"==typeof b.effect.getFrames();c=g?b.effect.getFrames():b.effect._onsample;var h=b.effect.timing,i=null;h=a.normalizeTimingInput(h);var j=function(){var d=j._animation?j._animation.currentTime:null;null!==d&&(d=a.calculateTimeFraction(a.calculateActiveDuration(h),d,h),isNaN(d)&&(d=null)),d!==i&&(g?c(d,e,b.effect):c(d,b.effect,b.effect._animation)),i=d};j._animation=b,j._registered=!1,j._sequenceNumber=f++,b._callback=j,d(j)};var g=[],h=!1;b.Animation.prototype._register=function(){this._callback&&d(this._callback)}}(c,e,f),function(a,b,c){function d(a){return a._timing.delay+a.activeDuration+a._timing.endDelay}function e(b,c,d){this._id=d,this._parent=null,this.children=b||[],this._reparent(this.children),c=a.numericTimingToObject(c),this._timingInput=a.cloneTimingInput(c),this._timing=a.normalizeTimingInput(c,!0),this.timing=a.makeTiming(c,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){e.apply(this,arguments)},window.GroupEffect=function(){e.apply(this,arguments)},e.prototype={_isAncestor:function(a){for(var b=this;null!==b;){if(b==a)return!0;b=b._parent}return!1},_rebuild:function(){for(var a=this;a;)"auto"===a.timing.duration&&(a._timing.duration=a.activeDuration),a=a._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(a){b.removeMulti(a);for(var c=0;c<a.length;c++)a[c]._parent=this},_putChild:function(a,b){for(var c=b?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",d=0;d<a.length;d++)if(this._isAncestor(a[d]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:c};for(var d=0;d<a.length;d++)b?this.children.push(a[d]):this.children.unshift(a[d]);this._reparent(a),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var b=a.cloneTimingInput(this._timingInput),c=[],d=0;d<this.children.length;d++)c.push(this.children[d].clone());return this instanceof GroupEffect?new GroupEffect(c,b):new SequenceEffect(c,b)},remove:function(){b.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a+=d(b)}),Math.max(a,0)}}),window.GroupEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a=Math.max(a,d(b))}),a}}),b.newUnderlyingAnimationForGroup=function(c){var d,e=null,f=function(b){var c=d._wrapper;return c&&"pending"!=c.playState&&c.effect?null==b?void c._removeChildAnimations():0==b&&c.playbackRate<0&&(e||(e=a.normalizeTimingInput(c.effect.timing)),b=a.calculateTimeFraction(a.calculateActiveDuration(e),-1,e),isNaN(b)||null==b)?(c._forEachChild(function(a){a.currentTime=-1}),void c._removeChildAnimations()):void 0:void 0},g=new KeyframeEffect(null,[],c._timing,c._id);return g.onsample=f,d=b.timeline._play(g)},b.bindAnimationForGroup=function(a){a._animation._wrapper=a,a._isGroup=!0,b.awaitStartTime(a),a._constructChildAnimations(),a._setExternalAnimation(a)},b.groupChildDuration=d}(c,e,f),b["true"]=a}({},function(){return this}());
-//# sourceMappingURL=web-animations-next.min.js.map \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js.map b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js.map
deleted file mode 100644
index c478544dce2..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations-next.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["src/scope.js","src/timing-utilities.js","src/normalize-keyframes.js","src/deprecation.js","src/keyframe-interpolations.js","src/property-interpolation.js","src/keyframe-effect.js","src/apply-preserving-inline-style.js","src/element-animatable.js","src/interpolation.js","src/matrix-interpolation.js","src/animation.js","src/tick.js","src/web-animations-bonus-cancel-events.js","src/web-animations-bonus-object-form-keyframes.js","src/timeline.js","src/web-animations-next-animation.js","src/keyframe-effect-constructor.js","src/effect-callback.js","src/group-constructors.js"],"names":["webAnimationsShared","webAnimations1","webAnimationsNext","webAnimationsTesting","shared","testing","cloneTimingInput","timingInput","clone","m","AnimationEffectTiming","this","_delay","_endDelay","_fill","_iterationStart","_iterations","_duration","_playbackRate","_direction","_easing","_easingFunction","linear","isInvalidTimingDeprecated","isDeprecated","makeTiming","forGroup","effect","timing","fill","duration","isNaN","undefined","Object","getOwnPropertyNames","forEach","property","fills","indexOf","directions","numericTimingToObject","normalizeTimingInput","cubic","a","b","c","d","x","f","start","end","mid","xEst","Math","abs","step","count","pos","stepSize","toTimingFunction","easing","styleForCleaning","document","createElement","style","animationTimingFunction","validatedEasing","TypeError","cubicData","cubicBezierRe","exec","apply","slice","map","Number","stepData","stepRe","Start","middle","Middle","End","preset","presets","calculateActiveDuration","repeatedDuration","playbackRate","iterations","calculatePhase","activeDuration","localTime","PhaseNone","delay","PhaseBefore","PhaseAfter","PhaseActive","calculateActiveTime","fillMode","phase","calculateScaledActiveTime","activeTime","startOffset","calculateIterationTime","iterationDuration","scaledActiveTime","Infinity","iterationStart","calculateCurrentIteration","iterationTime","floor","calculateTransformedTime","currentIteration","currentIterationIsOdd","currentDirectionIsForwards","direction","directedTime","timeFraction","calculateTimeFraction","split","prototype","_setMember","member","value","_effect","_timingInput","_timing","_animation","_rebuildUnderlyingAnimation","endDelay","ease","ease-in","ease-out","ease-in-out","step-start","step-middle","step-end","numberString","RegExp","antiAlias","aliases","expandShorthandAndAntiAlias","result","longProperties","shorthandToLonghand","shorthandExpanderElem","i","longProperty","longhandValue","convertToArrayForm","effectInput","normalizedEffectInput","values","Array","isArray","keyframe","numKeyframes","length","offset","composite","push","sort","normalizeKeyframes","spaceKeyframes","keyframes","previousIndex","previousOffset","j","window","Symbol","iterator","from","originalKeyframe","memberValue","isFinite","type","DOMException","NOT_SUPPORTED_ERR","name","message","everyFrameHasOffset","code","INVALID_MODIFICATION_ERR","filter","background","border","borderBottom","borderColor","borderLeft","borderRadius","borderRight","borderTop","borderWidth","flex","font","margin","outline","padding","createElementNS","borderWidthAliases","thin","medium","thick","borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","fontSize","xx-small","x-small","small","large","x-large","xx-large","fontWeight","normal","bold","outlineWidth","textShadow","none","boxShadow","silenced","feature","date","advice","plural","auxVerb","today","Date","expiry","setMonth","getMonth","console","warn","toDateString","deprecated","Error","scope","r","makePropertySpecificKeyframeGroups","leftCopy","propertySpecificKeyframeGroups","bind","addPropertiesHandler","parseShadowList","mergeShadowList","propertySpecificKeyframe","groupName","group","mergeFlex","left","right","round","makeInterpolations","interpolations","startTime","endTime","startValue","endValue","propertyInterpolation","leftInterpolation","rightInterpolation","convertEffectInput","trim","context","target","fraction","interpolation","fillStyle","offsetFraction","localDuration","scaledLocalTime","clamp","join","canvas","toCamelCase","parseColor","toUpperCase","addPropertyHandler","merger","propertyHandlers","parser","properties","ucProperty","test","matchedUnits","string","replace","unitRegExp","initialValues","handlers","parsedRight","parsedLeft","interpolationArgs","interp","Interpolation","t","taggedUnitRegExp","unit","bool","backgroundColor","nonNegative","backgroundPosition","units","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderLeftColor","borderRightColor","borderSpacing","borderTopColor","borderTopLeftRadius","borderTopRightRadius","numberToString","clip","color","height","marginBottom","marginLeft","marginRight","lengthUnits","marginTop","parseLengthOrPercent","maxWidth","minHeight","minWidth","opacity","parseAngle","outlineColor","outlineOffset","paddingBottom","paddingLeft","transform","verticalAlign","visibility","width","wordSpacing","consumeLength","zIndex","consumeParenthesised","consumeSizePairList","EffectTime","effectTime","_totalDuration","_isCurrent","KeyframeEffect","keyframeEffect","_update","_clear","_hasSameTarget","id","NullEffect","clear","nullEffect","configureProperty","object","descriptor","enumerable","configurable","defineProperty","AnimatedCSSStyleDeclaration","element","_surrogateStyle","ignore","consumeToken","_style","_length","_isAnimatedProperty","_updateIndices","ensureStyleIsPatched","_webAnimationsPatchedStyle","merged","animatedStyle","mergeDimensions","get","mergeWrappedNestedRepeated","_","styleAttributes","cssText","parentRule","styleMethods","getPropertyCSSValue","getPropertyPriority","getPropertyValue","item","removeProperty","setProperty","styleMutatingMethods","text","transformRegExp","isAffectedProperty","functionName","argTypes","s","T","parsedArgs","index","method","modifiesStyle","list","arguments","documentElement","matrixModulesLoaded","set","_set","propertyName","Element","animate","options","mergeMatrices","timeline","interpolate","leftArgs","to","transformFunctions","leftType","leftResult","convertToString","typeTo2D","max","rightArgs","quat","product","dot","fromQ","theta","sqrt","cos","toQ","w","composeMatrix","leftFunctionData","multiply","leftArgsCopy","k","mergeNumbers","merge","rightArgsCopy","translate","skew","perspective","matrix","types","stringConversions","tmp","rightResult","rotMatrix","stringifiedArgs","args","arg","y","z","deg","temp","rotate","rotatez","scale","cast","scaley","scale3d","is2D","concat","translatey","sequenceNumber","AnimationEvent","currentTime","timelineTime","out","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","Event","AT_TARGET","timeStamp","now","Animation","_id","_sequenceNumber","_currentTime","dimension","_paused","_inTimeline","_finishedFlag","onfinish","consumeOffset","_finishHandlers","_idle","consumeLengthOrPercent","_currentTimePending","_ensureAlive","_inEffect","_animations","_tickCurrentTime","newTime","ignoreLimit","_isFinished","position","restart","_startTime","_timeline","bottomOrRight","invalidateEffects","token","center","oldCurrentTime","mergeNestedRepeated","playState","play","parseOrigin","consumePosition","mergeOffsetList","circle","consumeList","pause","finish","ellipse","cancel","reverse","polygon","addEventListener","handler","_fireEvents","baseTime","event","setTimeout","mergeNonNegativeSizePair","call","_tick","isAnimationFrame","_needsTick","running","mergeSizePair","processRafCallbacks","processing","rafCallbacks","candidate","entry","applyPendingEffects","compareAnimations","rightAnimation","leftAnimation","InternalTimeline","performance","oncancel","AnimationCancelEvent","originalElementAnimate","animation","_cancelHandlers","originalCancel","originalAddEventListener","originalRemoveEventListener","removeEventListener","splice","animated","originalOpacity","getComputedStyle","testOpacity","error","webAnimationsNextTick","_discardAnimations","ticking","requestAnimationFrame","originalRequestAnimationFrame","_updateAnimationsPromises","AnimationTimeline","getAnimations","animationsWithPromises","_updatePromises","_play","restartWebAnimationsNextTick","remove","e","_holdTime","_isGroup","_childAnimations","_callback","_oldPlayState","oldPlayState","newPlayState","_readyPromise","_rejectReadyPromise","_resolveReadyPromise","_finishedPromise","_rejectFinishedPromise","_resolveFinishedPromise","oldPlaybackRate","oldPaused","oldStartTime","hadUnderlying","_wrapper","newUnderlyingAnimationForKeyframeEffect","bindAnimationForKeyframeEffect","SequenceEffect","GroupEffect","newUnderlyingAnimationForGroup","bindAnimationForGroup","_onsample","bindAnimationForCustomEffect","_updateChildren","childAnimation","_arrangeChildren","groupChildDuration","_setExternalAnimation","children","_constructChildAnimations","_removeChildAnimations","child","finished","Promise","resolve","reject","ABORT_ERR","ready","v","sign","MAX_VALUE","_register","_forEachChild","awaitStartTime","time","wrapped","pop","KeyframeList","_frames","updatePendingGroups","updated","pendingGroups","shift","disassociate","removeMulti","effects","oldParents","_parent","_rebuild","_normalizedKeyframes","_keyframes","getFrames","onsample","callback","parent","nullTarget","groupAnimation","originalGetComputedStyle","register","_registered","callbacks","tick","updating","effectFunction","isKeyframeEffect","last","node","constructor","_reparent","_isAncestor","newChildren","_putChild","isAppend","HIERARCHY_REQUEST_ERR","unshift","append","prepend","firstChild","lastChild","clonedTiming","clonedChildren","create","total","underlyingAnimation","ticker","tf","underlyingEffect","exports"],"mappings":";;;;;;;;;;;;;;CAcA,SAAIA,EAAAA,GAAJ,GAAIA,MACAC,KACAC,KAGEC,EAAuB,MCL7B,SAAUC,EAAQC,GAMhB,QAASC,GAAiBC,GACxB,GAA0B,gBAAfA,GACT,MAAOA,EAET,IAAIC,KACJ,KAAK,GAAIC,KAAKF,GACZC,EAAMC,GAAKF,EAAYE,EAEzB,OAAOD,GAGT,QAASE,KACPC,KAAKC,OAAS,EACdD,KAAKE,UAAY,EACjBF,KAAKG,MAAQ,OACbH,KAAKI,gBAAkB,EACvBJ,KAAKK,YAAc,EACnBL,KAAKM,UAAY,EACjBN,KAAKO,cAAgB,EACrBP,KAAKQ,WAAa,SAClBR,KAAKS,QAAU,SACfT,KAAKU,gBAAkBC,EAGzB,QAASC,KACP,MAAOnB,GAAOoB,aAAa,wBAAyB,aAAc,gDAAA,GA8EpE,QAASC,GAAWlB,EAAamB,EAAUC,GACzC,GAAIC,GAAS,GAAIlB,EA4BjB,OA3BIgB,KACFE,EAAOC,KAAO,OACdD,EAAOE,SAAW,QAEM,gBAAfvB,IAA4BwB,MAAMxB,GAElByB,SAAhBzB,GACT0B,OAAOC,oBAAoB3B,GAAa4B,QAAQ,SAASC,GACvD,GAA6B,QAAzB7B,EAAY6B,GAAqB,CACnC,IAA+B,gBAApBR,GAAOQ,IAAqC,YAAZA,KACL,gBAAzB7B,GAAY6B,IAAyBL,MAAMxB,EAAY6B,KAChE,MAGJ,IAAiB,QAAZA,GAAgE,IAAxCC,EAAMC,QAAQ/B,EAAY6B,IACrD,MAEF,IAAiB,aAAZA,GAA0E,IAA7CG,EAAWD,QAAQ/B,EAAY6B,IAC/D,MAEF,IAAgB,gBAAZA,GAAwD,IAA1B7B,EAAY6B,IAAmBhC,EAAOoB,aAAa,qCAAsC,aAAc,uCACvI,MAEFI,GAAOQ,GAAY7B,EAAY6B,MAlBnCR,EAAOE,SAAWvB,EAsBbqB,EAGT,QAASY,GAAsBjC,GAQ7B,MAP0B,gBAAfA,KAEPA,EADEwB,MAAMxB,IACQuB,SAAU,IAEVA,SAAUvB,IAGvBA,EAGT,QAASkC,GAAqBlC,EAAamB,GAEzC,MADAnB,GAAcH,EAAOoC,sBAAsBjC,GACpCkB,EAAWlB,EAAamB,GAGjC,QAASgB,GAAMC,EAAGC,EAAGC,EAAGC,GACtB,MAAQ,GAAJH,GAASA,EAAI,GAAS,EAAJE,GAASA,EAAI,EAC1BvB,EAEF,SAASyB,GAOZ,QAASC,GAAEL,EAAGC,EAAGnC,GAAK,MAAO,GAAIkC,GAAK,EAAIlC,IAAM,EAAIA,GAAKA,EAAI,EAAImC,GAAK,EAAInC,GAAKA,EAAIA,EAAIA,EAAIA,EAAIA,EANjG,GAAS,GAALsC,GAAe,GAALA,EACZ,MAAOA,EAGT,KADA,GAAIE,GAAQ,EAAGC,EAAM,IACX,CACR,GAAIC,IAAOF,EAAQC,GAAO,EAEtBE,EAAOJ,EAAEL,EAAGE,EAAGM,EACnB,IAAIE,KAAKC,IAAIP,EAAIK,GAAQ,KACvB,MAAOJ,GAAEJ,EAAGE,EAAGK,EAENJ,GAAPK,EACFH,EAAQE,EAERD,EAAMC,IAUd,QAASI,GAAKC,EAAOC,GACnB,MAAO,UAASV,GACd,GAAIA,GAAK,EACP,MAAO,EAET,IAAIW,GAAW,EAAIF,CAEnB,OADAT,IAAKU,EAAMC,EACJX,EAAIA,EAAIW,GAmBnB,QAASC,GAAiBC,GACnBC,IACHA,EAAmBC,SAASC,cAAc,OAAOC,OAEnDH,EAAiBI,wBAA0B,GAC3CJ,EAAiBI,wBAA0BL,CAC3C,IAAIM,GAAkBL,EAAiBI,uBAEvC,IAAuB,IAAnBC,GAAyB3C,IAC3B,KAAM,IAAI4C,WAAUP,EAAS,mCAG/B,IAAIQ,GAAYC,EAAcC,KAAKJ,EACnC,IAAIE,EACF,MAAO1B,GAAM6B,MAAM5D,KAAMyD,EAAUI,MAAM,GAAGC,IAAIC,QAElD,IAAIC,GAAWC,EAAON,KAAKJ,EAC3B,IAAIS,EACF,MAAOpB,GAAKmB,OAAOC,EAAS,KAAM1B,MAAS4B,EAAOC,OAAUC,EAAQ7B,IAAO8B,GAAKL,EAAS,IAE3F,IAAIM,GAASC,EAAQhB,EACrB,OAAIe,GACKA,EAEF3D,EAGT,QAAS6D,GAAwBvD,GAC/B,MAAOyB,MAAKC,IAAI8B,EAAiBxD,GAAUA,EAAOyD,cAGpD,QAASD,GAAiBxD,GACxB,MAAOA,GAAOE,SAAWF,EAAO0D,WAQlC,QAASC,GAAeC,EAAgBC,EAAW7D,GACjD,MAAiB,OAAb6D,EACKC,EAELD,EAAY7D,EAAO+D,MACdC,EAELH,GAAa7D,EAAO+D,MAAQH,EACvBK,EAEFC,EAGT,QAASC,GAAoBP,EAAgBQ,EAAUP,EAAWQ,EAAON,GACvE,OAAQM,GACN,IAAKL,GACH,MAAgB,aAAZI,GAAuC,QAAZA,EACtB,EACF,IACT,KAAKF,GACH,MAAOL,GAAYE,CACrB,KAAKE,GACH,MAAgB,YAAZG,GAAsC,QAAZA,EACrBR,EACF,IACT,KAAKE,GACH,MAAO,OAIb,QAASQ,GAA0BV,EAAgBW,EAAYC,EAAaxE,GAC1E,OAAQA,EAAOyD,aAAe,EAAIc,EAAaX,EAAiBW,GAAcvE,EAAOyD,aAAee,EAGtG,QAASC,GAAuBC,EAAmBlB,EAAkBmB,EAAkBH,EAAaxE,GAClG,MAAI2E,KAAqBC,EAAAA,GAAYD,MAAsBC,EAAAA,IAAaD,EAAmBH,GAAehB,GAAoBxD,EAAO0D,aAAgB1D,EAAO0D,WAAa1D,EAAO6E,gBAAkB,GAAK,EAC9LH,EAGFC,EAAmBD,EAG5B,QAASI,GAA0BJ,EAAmBK,EAAeJ,EAAkB3E,GACrF,MAAyB,KAArB2E,EACK,EAELI,GAAiBL,EACZ1E,EAAO6E,eAAiB7E,EAAO0D,WAAa,EAE9CjC,KAAKuD,MAAML,EAAmBD,GAGvC,QAASO,GAAyBC,EAAkBR,EAAmBK,EAAe/E,GACpF,GAAImF,GAAwBD,EAAmB,GAAK,EAChDE,EAAiD,UAApBpF,EAAOqF,WAAyBrF,EAAOqF,YAAcF,EAAwB,oBAAsB,aAChIG,EAAeF,EAA6BL,EAAgBL,EAAoBK,EAChFQ,EAAeD,EAAeZ,CAClC,OAAOA,GAAoB1E,EAAOP,gBAAgB8F,GAGpD,QAASC,GAAsB5B,EAAgBC,EAAW7D,GACxD,GAAIqE,GAAQV,EAAeC,EAAgBC,EAAW7D,GAClDuE,EAAaJ,EAAoBP,EAAgB5D,EAAOC,KAAM4D,EAAWQ,EAAOrE,EAAO+D,MAC3F,IAAmB,OAAfQ,EACF,MAAO,KACT,IAAuB,IAAnBX,EACF,MAAOS,KAAUL,EAAc,EAAI,CACrC,IAAIQ,GAAcxE,EAAO6E,eAAiB7E,EAAOE,SAC7CyE,EAAmBL,EAA0BV,EAAgBW,EAAYC,EAAaxE,GACtF+E,EAAgBN,EAAuBzE,EAAOE,SAAUsD,EAAiBxD,GAAS2E,EAAkBH,EAAaxE,GACjHkF,EAAmBJ,EAA0B9E,EAAOE,SAAU6E,EAAeJ,EAAkB3E,EACnG,OAAOiF,GAAyBC,EAAkBlF,EAAOE,SAAU6E,EAAe/E,GAAUA,EAAOE,SAjUrG,GAAIO,GAAQ,+BAA+BgF,MAAM,KAC7C9E,EAAa,sCAAsC8E,MAAM,KACzD/F,EAAS,SAASyB,GAAK,MAAOA,GA8BlCrC,GAAsB4G,WACpBC,WAAY,SAASC,EAAQC,GAC3B9G,KAAK,IAAM6G,GAAUC,EACjB9G,KAAK+G,UACP/G,KAAK+G,QAAQC,aAAaH,GAAUC,EACpC9G,KAAK+G,QAAQE,QAAUxH,EAAOqC,qBAAqB9B,KAAK+G,QAAQC,cAChEhH,KAAK+G,QAAQlC,eAAiBpF,EAAO+E,wBAAwBxE,KAAK+G,QAAQE,SACtEjH,KAAK+G,QAAQG,YACflH,KAAK+G,QAAQG,WAAWC,gCAI9BzC,GAAIA,gBACF,MAAO1E,MAAKO,eAEdyE,GAAIA,OAAM8B,GACR9G,KAAK4G,WAAW,QAASE,IAE3B9B,GAAIA,SACF,MAAOhF,MAAKC,QAEdmH,GAAIA,UAASN,GACX9G,KAAK4G,WAAW,WAAYE,IAE9BM,GAAIA,YACF,MAAOpH,MAAKE,WAEdgB,GAAIA,MAAK4F,GACP9G,KAAK4G,WAAW,OAAQE,IAE1B5F,GAAIA,QACF,MAAOlB,MAAKG,OAEd2F,GAAIA,gBAAegB,GACjB,IAAK1F,MAAM0F,IAAkB,EAARA,IAAclG,IACjC,KAAM,IAAI4C,WAAU,2DAA6DvC,OAAO6E,eAE1F9F,MAAK4G,WAAW,iBAAkBE,IAEpChB,GAAIA,kBACF,MAAO9F,MAAKI,iBAEde,GAAIA,UAAS2F,GACX,GAAa,QAATA,IAAoB1F,MAAM0F,IAAkB,EAARA,IAAclG,IACpD,KAAM,IAAI4C,WAAU,oDAAsDsD,EAE5E9G,MAAK4G,WAAW,WAAYE,IAE9B3F,GAAIA,YACF,MAAOnB,MAAKM,WAEdgG,GAAIA,WAAUQ,GACZ9G,KAAK4G,WAAW,YAAaE,IAE/BR,GAAIA,aACF,MAAOtG,MAAKQ,YAEdyC,GAAIA,QAAO6D,GACT9G,KAAKU,gBAAkBsC,EAAiB8D,GACxC9G,KAAK4G,WAAW,SAAUE,IAE5B7D,GAAIA,UACF,MAAOjD,MAAKS,SAEdkE,GAAIA,YAAWmC,GACb,IAAK1F,MAAM0F,IAAkB,EAARA,IAAclG,IACjC,KAAM,IAAI4C,WAAU,8CAAgDsD,EAEtE9G,MAAK4G,WAAW,aAAcE,IAEhCnC,GAAIA,cACF,MAAO3E,MAAKK,aA6EhB,IAAI6D,GAAQ,EACRE,EAAS,GACTC,EAAM,EAaNE,GACF8C,KAAQtF,EAAM,IAAM,GAAK,IAAM,GAC/BuF,UAAWvF,EAAM,IAAM,EAAG,EAAG,GAC7BwF,WAAYxF,EAAM,EAAG,EAAG,IAAM,GAC9ByF,cAAezF,EAAM,IAAM,EAAG,IAAM,GACpC0F,aAAc7E,EAAK,EAAGsB,GACtBwD,cAAe9E,EAAK,EAAGwB,GACvBuD,WAAY/E,EAAK,EAAGyB,IAGlBnB,EAAmB,KACnB0E,EAAe,qCACflE,EAAgB,GAAImE,QAAO,kBAAoBD,EAAe,IAAMA,EAAe,IAAMA,EAAe,IAAMA,EAAe,OAC7H3D,EAAS,gDAqCTc,EAAY,EACZE,EAAc,EACdC,EAAa,EACbC,EAAc,CA4ElB1F,GAAOE,iBAAmBA,EAC1BF,EAAOqB,WAAaA,EACpBrB,EAAOoC,sBAAwBA,EAC/BpC,EAAOqC,qBAAuBA,EAC9BrC,EAAO+E,wBAA0BA,EACjC/E,EAAOgH,sBAAwBA,EAC/BhH,EAAOmF,eAAiBA,EACxBnF,EAAOuD,iBAAmBA,GAkBzB3D,EAAqBG,GC/VxB,SAAUC,EAAQC,GAmIhB,QAASoI,GAAUrG,EAAUqF,GAC3B,MAAIrF,KAAYsG,GACPA,EAAQtG,GAAUqF,IAAUA,EAE9BA,EAIT,QAASkB,GAA4BvG,EAAUqF,EAAOmB,GACpD,GAAIC,GAAiBC,EAAoB1G,EACzC,IAAIyG,EAAgB,CAClBE,EAAsB/E,MAAM5B,GAAYqF,CACxC,KAAK,GAAIuB,KAAKH,GAAgB,CAC5B,GAAII,GAAeJ,EAAeG,GAC9BE,EAAgBH,EAAsB/E,MAAMiF,EAChDL,GAAOK,GAAgBR,EAAUQ,EAAcC,QAGjDN,GAAOxG,GAAYqG,EAAUrG,EAAUqF,GAI3C,QAAS0B,GAAmBC,GAC1B,GAAIC,KAEJ,KAAK,GAAIjH,KAAYgH,GACnB,KAAIhH,KAAa,SAAU,SAAU,cAArC,CAIA,GAAIkH,GAASF,EAAYhH,EACpBmH,OAAMC,QAAQF,KACjBA,GAAUA,GAKZ,KAAK,GAFDG,GACAC,EAAeJ,EAAOK,OACjBX,EAAI,EAAOU,EAAJV,EAAkBA,IAChCS,KAEI,UAAYL,GACdK,EAASG,OAASR,EAAYQ,OACL,GAAhBF,EACTD,EAASG,OAAS,EAElBH,EAASG,OAASZ,GAAKU,EAAe,GAGpC,UAAYN,KACdK,EAAS7F,OAASwF,EAAYxF,QAG5B,aAAewF,KACjBK,EAASI,UAAYT,EAAYS,WAGnCJ,EAASrH,GAAYkH,EAAON,GAE5BK,EAAsBS,KAAKL,GAK/B,MADAJ,GAAsBU,KAAK,SAASpH,EAAGC,GAAK,MAAOD,GAAEiH,OAAShH,EAAEgH,SACzDP,EAGT,QAASW,GAAmBZ,GA+D1B,QAASa,KACP,GAAIN,GAASO,EAAUP,MACa,OAAhCO,EAAUP,EAAS,GAAGC,SACxBM,EAAUP,EAAS,GAAGC,OAAS,GAC7BD,EAAS,GAA4B,MAAvBO,EAAU,GAAGN,SAC7BM,EAAU,GAAGN,OAAS,EAIxB,KAAK,GAFDO,GAAgB,EAChBC,EAAiBF,EAAU,GAAGN,OACzBZ,EAAI,EAAOW,EAAJX,EAAYA,IAAK,CAC/B,GAAIY,GAASM,EAAUlB,GAAGY,MAC1B,IAAc,MAAVA,EAAgB,CAClB,IAAK,GAAIS,GAAI,EAAOrB,EAAImB,EAARE,EAAuBA,IACrCH,EAAUC,EAAgBE,GAAGT,OAASQ,GAAkBR,EAASQ,GAAkBC,GAAKrB,EAAImB,EAC9FA,GAAgBnB,EAChBoB,EAAiBR,IA7EvB,GAAmB,MAAfR,EACF,QAGEkB,QAAOC,QAAUA,OAAOC,UAAYjB,MAAMjC,UAAUmD,MAAQrB,EAAYmB,OAAOC,YAEjFpB,EAAcG,MAAMkB,KAAKrB,IAGtBG,MAAMC,QAAQJ,KACjBA,EAAcD,EAAmBC,GAgCnC,KAAK,GA7BDc,GAAYd,EAAY3E,IAAI,SAASiG,GACvC,GAAIjB,KACJ,KAAK,GAAIjC,KAAUkD,GAAkB,CACnC,GAAIC,GAAcD,EAAiBlD,EACnC,IAAc,UAAVA,GACF,GAAmB,MAAfmD,IACFA,EAAcjG,OAAOiG,IAChBC,SAASD,IACZ,KAAM,IAAIxG,WAAU,yCAEnB,CAAA,GAAc,aAAVqD,EACT,MACEqD,KAAMC,aAAaC,kBACnBC,KAAM,oBACNC,QAAS,mCAGXN,GAAc,GAAKA,EAErBhC,EAA4BnB,EAAQmD,EAAalB,GAInD,MAFuBzH,SAAnByH,EAASG,SACXH,EAASG,OAAS,MACbH,IAGLyB,GAAAA,EAEAd,IAAkB5D,EAAAA,GACbwC,EAAI,EAAGA,EAAIkB,EAAUP,OAAQX,IAAK,CACzC,GAAIY,GAASM,EAAUlB,GAAGY,MAC1B,IAAc,MAAVA,EAAgB,CAClB,GAAaQ,EAATR,EACF,MACEuB,KAAML,aAAaM,yBACnBJ,KAAM,2BACNC,QAAS,uEAGbb,GAAiBR,MAEjBsB,IAAAA,EA8BJ,MA1BAhB,GAAYA,EAAUmB,OAAO,SAAS5B,GACpC,MAAOA,GAASG,QAAU,GAAKH,EAASG,QAAU,IAsB/CsB,GACHjB,IAEKC,EAzRT,GAAIpB,IACFwC,YACE,kBACA,qBACA,iBACA,mBACA,uBACA,mBACA,iBACA,mBAEFC,QACE,iBACA,iBACA,iBACA,mBACA,mBACA,mBACA,oBACA,oBACA,oBACA,kBACA,kBACA,mBAEFC,cACE,oBACA,oBACA,qBAEFC,aACE,iBACA,mBACA,oBACA,mBAEFC,YACE,kBACA,kBACA,mBAEFC,cACE,sBACA,uBACA,0BACA,0BAEFC,aACE,mBACA,mBACA,oBAEFC,WACE,iBACA,iBACA,kBAEFC,aACE,iBACA,mBACA,oBACA,mBAEFC,MACE,WACA,aACA,aAEFC,MACE,aACA,WACA,YACA,cACA,aACA,cAEFC,QACE,YACA,cACA,eACA,cAEFC,SACE,eACA,eACA,gBAEFC,SACE,aACA,eACA,gBACA,gBAIApD,EAAwBjF,SAASsI,gBAAgB,+BAAgC,OAEjFC,GACFC,KAAM,MACNC,OAAQ,MACRC,MAAO,OAGL9D,GACF+D,kBAAmBJ,EACnBK,gBAAiBL,EACjBM,iBAAkBN,EAClBO,eAAgBP,EAChBQ,UACEC,WAAY,MACZC,UAAW,MACXC,MAAS,MACTT,OAAU,OACVU,MAAS,OACTC,UAAW,OACXC,WAAY,QAEdC,YACEC,OAAQ,MACRC,KAAM,OAERC,aAAclB,EACdmB,YACEC,KAAM,2BAERC,WACED,KAAM,+BA8JVrN,GAAO+I,mBAAqBA,EAC5B/I,EAAO4J,mBAAqBA,GAM3BhK,EAAqBG,GCpSxB,SAAUC,GAER,GAAIuN,KAEJvN,GAAOoB,aAAe,SAASoM,EAASC,EAAMC,EAAQC,GAKpD,GAAIC,GAAUD,EAAS,MAAQ,KAC3BE,EAAQ,GAAIC,MACZC,EAAS,GAAID,MAAKL,EAGtB,OAFAM,GAAOC,SAASD,EAAOE,WAAa,GAExBF,EAARF,GACIL,IAAWD,IACfW,QAAQC,KAAK,mBAAqBX,EAAU,IAAMI,EAAU,wCAA0CG,EAAOK,eAAiB,KAAOV,GAEvIH,EAASC,IAAAA,GAAW,IACb,GAMXxN,EAAOqO,WAAa,SAASb,EAASC,EAAMC,EAAQC,GAClD,GAAIC,GAAUD,EAAS,MAAQ,IAC/B,IAAI3N,EAAOoB,aAAaoM,EAASC,EAAMC,EAAQC,GAC7C,KAAM,IAAIW,OAAMd,EAAU,IAAMI,EAAU,yBAA2BF,KAIxE9N,wmrBChCH8J,KAAU1J,GAAQuO,EAAOtO,KA2BvBuO,GAAA,MAASC,GAAAA,oBAAAA,EAAmC3E,EAG1C4E,EAFIC,GAAAA,GAAAA,GAEK/F,EACPgG,KAAK,KAAIxH,EAAU0C,KAAUlB,GACbiG,qBAAsBC,EAAsBC,GAAV3H,aAC1C4H,iBAAAA,GACMlF,SAAaN,EACrBhG,GAAQsG,QAAUlB,GACXkB,GAAAA,MAAUlB,GAAGxB,QAEtBuH,GAAAA,QAAAA,OAAAA,IAAAA,QAAAA,GAA+BvH,EAAUuH,EAAAA,GAAAA,MAAAA,MAAAA,IAAAA,EAAAA,KAA+BvH,IAAAA,EAAAA,IACxEuH,QAAAA,GAAAA,GAA+BvH,MAAAA,2BAAa4H,KAAAA,GAKzCC,OAAAA,GAAaN,OAAAA,QAAAA,GAAAA,EAChBO,GAAQP,OAAAA,EAAAA,EAAAA,GAA+BM,QAC3CE,GAAID,EAAS1F,GAAiD,MAAlC0F,IAAMA,EAAM3F,EACtC,EAAA,EACEkB,GAAAA,EAAMC,GAAAA,OAAaC,QAAAA,GACbyE,EAAAC,GACNxE,OAASuE,EAAAC,EAAA,SAAA1M,GAAA,MAAAM,MAIfqM,MAAOX,EAAAA,EAAAA,EAAAA,EAAAA,MAAAA,QAAAA,GAIAY,EAAAA,GAAAA,MAAmBZ,UAAAA,EAAAA,GAAAA,OAAAA,EACtBa,EAAAA,SAAAA,GACJ,MAASP,GAAaN,EAAAA,EAAAA,EAAAA,OAAAA,QAEpBW,GAAKF,EADDtF,GAAY6E,OAAAA,EAAAA,EAAAA,KAAAA,OAAAA,EAA+BM,MACtCrG,EAAWkB,EAAAA,qBACd2F,EAAY3F,EACZ4F,EAAAA,EAAAA,IAAU5F,qBACV6F,gBAAa7F,EAAUlB,qBACZkB,EAAiBzC,EACnByC,EAAUlB,IAAGpF,UACtBiM,0BACEC,EACFC,qBAEAC,EAAWD,GAGfH,YAAe9F,gBACF+F,EACXC,qBACAlM,EAAeD,GAA0BC,UAAS,WAClDxB,EAAUiN,qBACKV,EAAMsB,GAAAA,YAAsBZ,EAAAA,YAAuBW,EAOxErB,EAHAiB,aAAAA,EAAoBjB,EAASuB,eAAAA,GAAmBC,EACvCD,GAAkBL,SAAYM,EAAAA,GAAmBN,QAAAA,GAEnDD,EAAAA,GArFTjB,MAAMyB,WAAAA,GAAqB,WAAShH,GAAAA,EAAAA,EAClC,SAAIc,GAAAA,MAAY9J,IAAO4J,EAAAA,EAAAA,GAAAA,EAAAA,EAAmBZ,YAAAA,OACtC2F,EAAAA,qBAAiCF,OAAAA,GAAAA,gBAAAA,GACjCe,SAAAA,EAAiBD,GAAAA,QAAmBZ,GAAAA,GAAAA,EAAAA,EACxCsB,OAAOC,EAASC,UAAQC;AACtBF,EAAIE,UACFZ,CAAAA,IAAAA,GAA+Ba,EAC7BC,SAAQF,IAAAA,EAA4CE,UAA3BD,OAAcZ,EAAAA,UAC/BW,EAAiBC,GACjBD,EAAYC,UAAAA,CAAcZ,EAAAA,SAAaW,EAAAA,EAAYC,EAAAA,EAAAA,IAAAA,GAAcX,EACxE3N,aAAiBsO,EAAAA,EAAAA,EAAAA,GAAAA,IAAAA,GACdE,UAAAA,EAAiBH,EAAAA,EAAAA,EAAAA,IAAWC,GAAAA,EAAcZ,GAAAA,GAC1Ce,QAAAA,EAAgBH,GAAAA,EAAcX,EAAUW,GAAAA,EAAAA,EACxCI,GAAAA,EAAAA,IAAmC,QAAjBD,GAAyBH,EAAAA,GAAc7M,OAAO+M,EAAAA,EAAAA,SAAiBC,GAAAA,QACrFjC,GAAMpK,GAAMgM,MAAQE,MAAAA,IAAAA,EAAAA,KAAcrO,IAAAA,IAAUqO,IAAAA,GAAAA,EAAAA,GAAAA,IAAcA,GAAAA,GAAAA,EAAAA,EAAAA,EAAcI,IAAAA,EAAAA,GAAAA,KAAAA,MAAAA,EAG1E9N,EAAKiG,GAAI5G,EAAAA,IAAAA,OAAY2M,GAAAA,GAAAA,EAAAA,eAAAA,EACH+B,MAAA,EAAZ1O,EAAAA,EAAAA,KAAAA,QAAoCW,EAAAgO,KAAZ3O,KAAAA,MAAoC,GAAA4O,GAAZ5O,SAClDuM,gBAAY4B,+BA2ErBvQ,SAAqBC,GAAAA,MAAgBE,EAAAA,OAAAA,CAAAA,IChGxCmQ,GAAUlQ,EAAQuO,WAAOtO,KAIvBsO,GAASsC,qBACPC,EAAO9O,GAAiB,mBAAqBS,sBAClCsO,oBAIJC,qBAA2BC,mBAClCC,QAAAA,gBAAiBlP,0BAA6BA,EAC9CkP,aAAAA,EAAiBlP,qBAAwBiP,KAAAA,KAE3CH,GAASjC,EAAAA,YAAqBsC,GAAgBC,EAC5CrR,GAA+BwJ,SAAQX,EACjC5G,GAAAA,QAAWoP,GAEfJ,EAAmBG,GAAQF,GAAAA,EAAQJ,EAAY7O,OAAAA,cA2D1C6N,KAAAA,GAAAA,KAAAA,OAAsB7N,IAAgBqN,EAAAA,OACzCgC,GAAAA,EAAAA,IAAAA,gBACIC,KAAKtP,GAAAA,CAAAA,EAAchC,EAAOoB,QAAa,UAAA,IAAA,IAAAmQ,KAA6BC,GAAcA,EAAAC,QAAAC,EAA0B,SAClHL,GAAaR,MAAAA,GAAY7O,GAEf,KAAA,IAARoN,GAA8B,KAAA,GAATC,GACnBD,KAAAA,EACKuC,OAAAA,IAAcN,EAAAA,EACVI,QAATpC,oBACMsC,KAAAA,QAAcN,GAAAA,QAGrB,IADDO,EAAmBvC,KAAAA,KAAa6B,QAAAA,YAAiBG,KAAAA,QACrCO,MAAAA,IAAgBA,GAASrI,UACvC,eAAiBqI,YAAY,cACzBC,EAAAA,EAAAA,EAAcD,EAAYrI,QAAG8F,EACdzN,GAAfkQ,KAAAA,IAA4ClQ,EAAhBiQ,EAC1BE,QAAAA,EAAoBH,GAAAA,MAAShJ,EAAAA,GAAGA,GAAGkJ,IAAAA,KAAYD,EAAAA,CAAAA,IACnD,GAAIE,KAAAA,GACEC,CAAAA,GAAAA,GAAeC,KAAAA,EAAAA,QAAoB,GAAA7J,QAAM2J,IAAAA,EAAAA,KAC7C,IAAAN,QAAO,GAASS,QACdC,EACmB9C,KAAAA,MACZ2C,KAAOE,SAKf3D,GAAM0D,MAAAA,GAA2BG,GAAA5J,EAAS6J,MACxCA,KAAejD,QAvGtB8B,GAmBErC,EAAAA,GAAAA,MAAuBA,GAAAA,EAE7BQ,GAAIsC,GAAAA,QACFW,GAAiBlD,EAAAC,EAAAkD,GACjBC,GAAAA,GAAoBC,IACpBC,KAAAA,IAAAA,GAAmBD,EAAA/I,KAAA0I,EACnBO,KAAAA,IAAAA,GAAAA,EAAwBzQ,QACxB0Q,GAAAA,GAAAA,EAAAA,KAAyBR,EACzB/F,OAAAA,GAAAA,EAAmBhI,IAAA,SACnBwO,GAAAA,MAAiBzD,GAAAgD,IACjB9F,IAAAA,EAAAA,EAAiBjI,IACjByO,SAAAA,GAAAA,MAAkBzD,GAAA+C,IAClB7F,KAAAA,EAAAA,EAAkB,SAElBwG,GAAAA,GAAevK,GACfwK,EAAAA,IAAgB,SAAA3L,EAChB4L,GAAAA,MAAAA,IAAAA,EAAqB1J,QACrB2J,IAAAA,EAAsBjQ,KACtBuJ,IAAAA,EAAAA,IAAAA,EAAgB2G,eAEhBC,GAAMX,EAAA7J,KAAA+H,KAAA,MAAA,OACN0C,GAAO9J,OACPkD,EAAAA,QAAUjE,EACVwE,IAAAA,IACAsG,GAAAA,GACAlE,iDAGAmE,EAAAA,EACAC,KAAY,KACZC,GAAAA,QAAaC,EACbC,MAAWC,EAEXC,EAAUjF,KACVkF,KAAAA,GAAW1L,QACX2L,EACAC,KAAAA,MAASC,EACTC,EACAC,KAAAA,KAAAA,qBACc5F,GACd6F,YAAAA,EACAC,EAAAA,qBACcT,EACFrF,EACZc,uBACYd,EACZnB,qBAAYwB,KAAA,KAAAgF,GAEZU,EACAC,WAAAA,EACAC,EAAAA,gBACAC,CACAC,IAAaC,GACbC,EAAQC,qBAkCJhF,KAAAA,KAAAA,GAAwBA,EAE7BjQ,EAAAA,gBAAqBC,KAAAA,OAAgBE,EAAAA,KC9GxC+U,EAAkBvG,EAAOtO,gBAEd8U,KAAAA,OAAWvT,EAEd4D,KAAAA,GAAiBpF,oBAAO+E,CACxBiQ,IAAAA,GAAsB3P,SACjBrF,GAAAA,GAAOgH,GAAAA,EAAsB5B,EAAgBC,OAAAA,IAAW7D,IAOjEgH,EALAwM,GAAAA,EAAAA,GAAWC,QAAAA,EAAgC7P,EAAAA,oBAC3C4P,KAAAA,OAAWE,EAAsB7P,KAC3BQ,EAA8BT,EAAAA,oBAA2B5D,KAC7D,OAAOqE,EAAyBA,IAAUL,GAAAA,yBAKxC2P,EAA0BhF,EAAQnH,qBAAa7I,EAG/C4G,GAFwB/G,oBAAOqC,EAAqBlC,qBACpDqP,EAAuBQ,GAEvBoF,sBAEF5F,qBAAeW,oBAgBjB,qBAbekF,mBAAmBhQ,aAChC0B,YAAAA,SAAeiO,cACS,aAAjBjO,YAETqO,gBAAeE,UAAS/G,EACtBiB,qBAAuBoE,EAEV2B,GAAiB,4BACvBpF,6BAETiF,yBAA4BJ,0BAC5BI,SAAeH,OAAAA,iBAA4BA,gBAC3CG,cAAqBI,eACdJ,aAGHK,aAAa,YACjB,iBAAiB,iBAEbC,eACQ,gBAGZC,cAAWN,cACT,QAAO,eAEEJ,cAAiB,MAC5BU,iBAAWT,kBACTrV,EAES0V,GAAiB,SAC1BhH,EAEKoH,GAAAA,QAQR/V,GAAqBC,GAAgBE,MAAAA,GAAAA,uBClEvBE,IAsBfsO,EAASqH,aAAAA,QAAkBC,GAAQ7T,QAAU8T,GAC3CA,GAAWC,GAAAA,GAAAA,EACXD,aAAWE,EAAAA,OACXnU,EAAOoU,aAAAA,KAAeJ,KAAQ7T,UAAU8T,EAAAA,OAG1CvH,EAAS2H,aAAAA,KAAAA,KAAAA,QAA4BC,EAOnC5V,gBAAK6V,KAAkB1S,KAAAA,EAAyB,MAAA6K,EAAA8H,OAAA9H,EAAgC+H,aAChF/V,KAAKgW,KAASJ,SAAQvS,EACtBrD,OAAKiW,IACLjW,GAAKkW,EAAAA,GAAAA,OAAAA,EAGL,GAAK,OAAW7N,QAAS2N,GAAe3N,EAClC5G,GAAAA,MAAWzB,QAAKgW,GACpBhW,QAAK6V,IAAAA,GAAAA,EAAgBpU,SAAYzB,GAAAA,GAAKgW,GAAOvU,EAAAA,EAE/CzB,CAAKmW,IAAAA,QAAAA,EA+FP,MAASC,MAAAA,IAAAA,GAAAA,EAAqBR,gBACxBA,EAAQS,EAAAA,OAAAA,GAAAA,GAGZC,EAAIC,MAAAA,EAAgBC,gBAAIb,EAAAA,GAAAA,QAA4BC,GACpD3N,GACEoN,MAAAA,QAAkBO,EAAS,IAAA,GAAWa,GAAKzI,EAAa0I,2BACjDC,KAGPf,KAAAA,EAAQvS,EAAa,KAAS5B,GAAUqF,SACtC8O,EAAQvS,EAAM5B,WAAYqF,EAEpBzD,EAAM0R,qBAAkBtT,EAC9BmU,GAAcnU,UAKlBmU,EAAQS,GAA6BT,SAAQvS,EA7J/C3D,GAAIkX,QAAAA,GACFC,GACA7N,MACA8N,UAAAA,GAGEC,GAAAA,GAAAA,CACFC,OAAAA,GAAAA,IAAAA,SACAC,GAAAA,MAAAA,KAAqBN,EACrBO,EAAAA,KAAAA,KACAC,QACAC,GAAAA,GAAAA,MAAgBhV,GAChBiV,QAAAA,GAGEC,GAAAA,GAAAA,EACFF,EAAAA,cACAC,OA6BF1B,QAAAA,EAAAA,QAAAA,KAA4BhP,GAAAA,GAC1BkQ,EACE,uBAAYhB,KAAgBgB,EAElBU,EAAAA,EAEVC,EADIC,KAAAA,IACS,CAAA,GAAOzX,EAAK6V,OAAAA,EAAgB7M,MACvCyO,GAAAA,EAAmBzX,MAAK6V,EAAAA,GAAAA,MAAgBxN,IAE1CrI,GAAK6V,EAAAA,GAAgBgB,EACrB7W,EACA0X,EAAgBrP,KAAIrI,EAAK6V,MAAgB7M,IAAAA,GACvCyO,EAAAA,GAAAA,MAAAA,KAAmBzX,EAAK6V,EAAgBxN,EAAM,IAEhDsP,EAASlW,OAAAA,EAAYgW,OAAAA,MAAAA,KACdzX,GAAKkW,MAAAA,EAAAA,EAAAA,EAAoBzU,EAAAA,OACvBuU,IAAAA,CAAAA,GAAOqB,GAAY5V,EAAAA,EAAUzB,GAAAA,EAAK6V,EAAAA,EAAAA,IAAgBqB,EAAAA,GAAiBzV,EAAAA,SAAAA,GAI9EuH,MAAIA,KACF4O,EAAAlI,OAAO1P,EAAK6V,EAAAA,WAAgB7M,IAAAA,EAE9B8N,EAAIA,YACFe,EAAA7J,EAAOhO,qBAGTmW,EAAAA,EAAAA,aAAgBjM,EACdsG,eAAYyF,IAAUjW,EAAK6V,EAAAA,EAAAA,EAAgB7M,GAAAA,EAAAA,GACzC1H,GAAOoU,SAAAA,EAAqB1V,MAAKiW,GAC/BR,KAAAA,GACAD,GAAAA,EACAiB,MAAK9E,EAAA+F,EACHvV,EAAA2V,IAAoBN,EAAY3B,WAAAA,EAAgBkC,OAC/C/X,MAAKiW,IAEVjW,QAAKiW,GAEKA,GAAUjW,MAAK6V,GAAAA,QAAAA,GAAgB7M,QACzChJ,UAAKiW,IAAAA,QACEP,GAAe1V,EAAMA,GAAKiW,GAAAA,EAC/BR,oBACAD,EAAAA,CAAY3G,EACZ/H,kBAIAgI,CAAA,IAASrN,GAAUqF,EACvB9G,wBAAwB8G,GACxB9G,GAAKkW,EAAAA,oBAAoBzU,EAAY,CAAAqN,EAEvCiG,kBAAiBtT,CACfzB,IAAKgW,GAAOvU,EAAAA,wBAAiCA,GAAAA,MACtCzB,OAAKkW,EAAAA,IAAAA,MAAAA,EAAoBzU,MAKpC,KAASuW,GAAAA,SAAUjB,GAAAA,MAAAA,GACjBpB,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,KAAAA,EAA4BhP,GAAAA,KAAUqR,GAAAA,EAAoBA,GAAAA,KAAQC,IAAAA,EAAAA,EACzD,SACLC,GAAIjQ,GAAAA,GAASjI,EAAK6V,KAAAA,EAAgBmC,GAAAA,GAAQpU,EAAWiS,GAAAA,GAAAA,EAAAA,IAAAA,EAAiBsC,EAAAA,cAClEF,EAAAA,GAAAA,EACGjY,GAAKkW,EAAAA,GAAAA,EAAAA,EAAAA,IAAoBiC,EAC5BnY,EAAKgW,IAAAA,GAA0BA,KAAAA,IAAQmC,OAAAA,MACpChC,QAEAlO,GAER+P,GAAQA,MAAUV,GAAAA,QAAAA,OAAAA,IAIvB,QAAS7V,GAAY0B,GAAAA,MAASiV,GAAAA,QAAgB/U,eACxC5B,MAAYmV,QAAAA,GAA+BG,EAAAA,GAAAA,GAG/CsB,GACEhD,EAAAA,0BAAkBM,EAAAA,GAA4BhP,CAAAA,KAAAA,EAAWlF,SACvDgV,EAAKzN,OACH,CAAA6F,EAAO7O,SAAK6V,GAAgBpU,EAAAA,EAAAA,EAE9B6W,KAAcxR,KAAAA,GACZ9G,GAAAA,EAAK6V,EAAAA,EAAAA,OAAAA,IAAgBpU,CAAAA,GAAAA,GAAYqF,EACjC9G,GAAAA,EAAKmW,EAAAA,EAAAA,GAAAA,EAAAA,EACKD,SAAAA,EAAoBzU,OAAAA,EAAAA,GAC5BzB,EAAAA,CAAKgW,GAAAA,MAAOvU,EAAAA,EAAYqF,EAAAA,EAAAA,IAG7BrF,SAyBLuM,GAAMpK,GAAAA,gBAAiBgS,GAASnU,MAAAA,EAC9B2U,IAAAA,KAAAA,KAAqBR,GAAAA,KACrBA,GAAQvS,EAAMkV,GAAKvK,CAAMwK,OAAa/W,QAAWqF,GAGnDkH,GAAuB4H,SAASnU,EAAAA,GAC1BmU,MAAAA,eAAQS,GAAAA,eACVT,IAAQvS,UAAM0R,GAAO/G,YAAMwK,KAAa/W,UAAAA,GAO3CnC,YAAgBE,IAAAA,KAAAA,KChLTwO,IACRrE,IAAO8O,EAAAA,QAAQ9R,EAAU+R,OAAU,CAAA,IAAAL,EAAsBM,MACnD1D,IAAKqB,GAITsC,EAHeD,EAAAA,EACb1D,IAAaA,EAERjH,IAAM6K,GAAe7K,EAAM4G,IAAAA,IAAAA,UAAqBnM,EAAAA,UAAsBwM,KAAAA,GAE9E3V,GAAAA,EAAAA,EAAAA,EAAAA,OCRH+I,IAAU2F,CAAAA,GAAAA,GAAOtO,EAEfmP,EAASiK,GAAAA,EAAAA,EAAYhP,EAAUzH,GAC7BsP,EAAoBoH,EAAAlK,EAAAxG,GAARyB,EAAAA,EAAmCgF,EAAAzG,GAAAlG,EAAN6W,EACxBC,EAEGC,GAARpP,EAAoCmP,EACvC5W,EAOT,IAAIyH,EAA0BoP,EACxBjL,GACgBnE,CAAAA,IAAKd,EAChB8P,MAAAA,IAAYhP,GAASkP,GAE9BnK,EAEFxG,KAAMyG,EAAAzG,IAAA8Q,GAAAhQ,KAAAmN,EAAA,IAAwCxM,EAGhDkE,KAAM0D,EAAAA,IAAAA,EAAgBvI,MAASW,UAAUsP,EAAAA,UACvC,CAAA,GAAOF,GAAS7W,EACP+W,EAAAA,MAAgBN,IAAAA,EAAsBzW,IAQhD/C,EAAgBE,IAAAA,EAAAA,IClCnB6Z,EAAUrL,GAyFR9D,EAAAmP,EAAejX,GAAQkX,EACd5W,EAAkBN,GAAGkX,GAG9BC,EAASC,EACP,GAAIC,OAAgBC,CAAAA,IAAIC,EACdxJ,KAAMsJ,EAEZD,IAAAA,EACYN,IACdM,EAAOG,GAKF,CAAA,IAHDC,EAAkBH,MACd/W,IAAAA,GAAakX,EAAkBC,EAASJ,EAAAA,IAEnCnD,EAAUjO,IACrBmR,GAAUG,EAAYjX,IAAKoX,IAAQF,UAASH,EAClCM,KAASC,OAGvB9P,EAAOsP,EA5GLS,GAAAA,EAAgBC,EACTC,GAAAA,GAEPZ,EADItR,EAA4B,GAAMsR,GAAc,IAAK,GAAMa,MACxC/R,KACEqB,KACE2Q,EAAAA,EACrBpS,EAAAA,EAAUyB,OAAW2Q,IAAKrY,CAAEqY,GAAG3Q,GAIrC,gBAGFqP,GAAcjZ,GACZkO,EACesM,aACAtM,EAANwI,gBAEMF,EAATiE,EACSxB,EAANrP,GACM6P,EAAN7P,GACL5J,GACAA,GAAEwW,EACS,GAATkE,EACA9Q,GAAG4M,EAGX,GAAS2D,EAAcQ,KAAAA,EAAkBC,IAAAA,EAAYC,KAAAA,GAC/CC,EAAoBzR,KAAKqR,GAAuBK,EAAQ1R,MAAMe,EAErD4Q,KACD,GAAKH,EAGjB,CAAA,GAAKI,GAAI1S,CAAcA,GACR2S,EACXJ,EAAgBH,EAAAA,OAAU/Q,EAAYA,EAIlC8P,SAAaA,GAAK,MAAQA,GAASQ,IAAIR,SAE3CyB,EAAAA,GAAc,GAAMC,GAAsBC,EAAMrX,IAAG,SAAcsX,EAErEH,GAAAA,MAAUJ,GAAYxS,GAAKgT,GAAIA,GAAQC,KACvCL,KAAAA,IAAa,OAAU7Y,UACvB6Y,EAAAA,GAAU,IAAG,IAAU7Y,EACvB6Y,MAAa,KAAKjS,SAAiBgR,EACnCiB,GAAAA,GAAU,YAAqB7Y,EAAQkZ,GACvCL,GAAAA,IAAAA,EAAmCjB,MACnCiB,KAAAA,OAAa,GAAU7Y,GAAIkZ,KAAQtB,GACnCiB,GAAAA,GAAAA,GAAaM,IAAUF,GAAIC,GACdV,QAAcxY,UAE3BwY,EAAAA,EAAAA,EAAST,EAAAA,EAAAA,EAAAA,EAASS,EAAAA,EAAAA,EAAAA,EAAQK,EAAAA,EAAAA,EAAAA,EAAAA,GAE1BhG,GAAIuG,UAAe,mBAAyBvG,GAAMwG,QAAW,KACzDf,SAAK,KACPc,SAAad,KAAKgB,SACTvB,KAAAA,UAAiBqB,QAGxBd,aACFc,KAAQG,OACRH,KAAQI,GAAKlB,EAAK/D,EAAA,IAClBiE,GAAST,QAAAA,IAASS,GAAQY,EAAAA,EAAAA,IAGxBd,GAAK/D,EACP6E,KAAKK,QACLL,IAAKI,GAAQlB,EAAAA,EAAAA,IACbE,GAAAA,EAAST,KAAAA,QAASS,IAAQY,GAG5B,EAAA,EAAK7E,KAAQmF,SAAUzT,MAChB4M,GAAIvL,MAAOA,KACdkR,KAAAA,GAAOvS,OAASsT,IAAMtT,KAI1BuT,GAAIG,EAAAA,KAAKnB,OACCA,IAAO,KAAOA,GAAAA,EAAUjE,KAAIiE,WAAcA,KAAAA,GAAUjE,EAAIiE,EAAAA,IAAO3F,GAAO2F,YAAU,IAEnFA,GAAOjE,EAAGqF,EAAAA,IAAOpB,GAAOjE,EAAIiE,KAAOqB,YAAW,IAEvDL,GAAO3B,EAAAA,EAAAA,IAAAA,GA0BTjM,EAAMiM,KAAAA,YAAgBA,IAAAA,GACtBjM,EAAAA,EAAMwL,KAAOA,aAEZla,MAAgBE,GAAAA,GAAAA,qBCnHTC,EAAeC,GAEhBwc,eAEP5c,EAAI6c,GAAkCC,SAAaC,GAAAA,QACjDrc,GAAK4P,GAASA,GACd5P,GAAKoc,OAAAA,EAAcA,OAAAA,OACnBpc,IAAKqc,IAAAA,GAAeA,EAAAA,KAAAA,EAEpBrc,MAAKkK,EAHckS,OAGPE,EACZtc,QAAKuc,GACLvc,GAAKwc,MAAAA,GACLxc,IAAKyc,KAAAA,MAAAA,EAAgB7M,KACrB5P,EAAK0c,EAAAA,MAAAA,IAAmB,IACxB1c,GAAK2c,MAAAA,EAAaC,SAAMC,MACxB7c,EAAK8c,OAAYvP,OAAKwP,GAGxB/O,QAAMgP,GAAYnO,EAAAC,GAAS9N,OACpBiU,EAAKnG,EACN9N,GAAUA,EAAOic,qBACFA,EAEnBjd,GAAKkd,iBAAyBhB,GAAAA,SACzBiB,GAAAA,QACLnd,GAAkBod,GACbC,GAAUpV,KACV1H,KAAAA,GAAAA,KACLP,GAAKsd,EAAAA,IACLtd,EAAKud,EAAAA,OAAgBtV,GAChBuV,QAAWC,GACXC,GAAAA,MACL1d,GAAK+G,aACL/G,qCAAsCiR,IACjC0M,EAAQC,uBACRC,GAGP7P,QAAMgP,GAAUrW,EACdmX,GAAAA,GAAc7V,GAAA+F,EAIRhO,gBAAoByd,EAAUrB,IAAAA,EAChCpc,IAAK+d,GAAAA,IAAY/d,EAAK+G,GAAAA,CAAQ+N,GAAAA,GAAQ7M,EAEjC8V,EAAAA,IAAAA,EAAY/d,GAAK+G,EAAQ+N,IAAAA,SAAasH,EAAAA,GAAAA,EAEnCkB,IAAAA,SAAAA,GAAgBtd,IAAK+d,EAAc/d,GAAAA,EAAKud,KAAAA,GAAAA,IAChDvd,EAAKsd,QAAAA,EACLtP,CAAAA,GAAM6K,aAASmF,KAAAA,EAAiBhe,KAAAA,aAGpCie,KAAAA,EAAkB,IAASC,CAAAA,GAAAA,GAASC,EAAAA,EAAAA,GAC9BD,GAAAA,EAAgBf,GAAAA,EAAAA,GAAAA,EAClBnd,GAAKmd,2BACIiB,KAAAA,EAAgBD,KAAAA,2BACHne,KAAKO,EAAAA,IAAAA,MAAoBP,GAAK0U,IAAAA,SAAiB2J,GAChEP,MAAAA,gBAGL1B,GACFiC,EAAIre,EAAcA,OAAK6d,QAAAA,GAEXV,GAAAA,GAEVf,GAAAA,EAAY8B,gBACdA,EACI9c,IAAM8c,EAAAA,IAEVlQ,EAAMsQ,CAAAA,IAAAA,GACDte,GAAKqd,EAA8B,GAAAf,IAAdiC,IAAAA,KAAAA,IACxBve,KAAKue,EAAAA,EAAAA,GAAkBC,EAAAA,EAAAA,EAAUpC,EAAAA,EAAAA,OAAc8B,IAAUle,CAAAA,GAAKO,GAAAA,EAAAA,EAEhEP,iBAAK6d,IAAsBY,EAClBtB,eAAgBe,KAEzBle,GAAKie,GAAAA,KAAAA,EAAiBC,MAAAA,EAAAA,OACtBlQ,EAAM0Q,IAAAA,EAAAA,OAAAA,GAAAA,GAERxP,EAAIA,GAAAA,EACFyP,GAAO3e,UAAKue,GAEVrP,MAAAA,IACFgP,EAAWA,EACDA,GAENle,EAAKqd,MAAAA,EAAgBM,MAAAA,GAEzB3d,KAAKue,EAAAA,GAAAA,EAAaL,IAClBle,GAAKie,GAAAA,OAAuBO,EAAAA,EAAUpC,KAAAA,QAAcpc,GAAmBA,GAAK0E,GAAAA,GAC5EsJ,EAAM0Q,gBAAAA,EAEJha,KACFuM,EAAOjR,OAAKO,IAAAA,IAEdmE,EAAIA,GAAAA,EAAaoC,GAAAA,OACXA,GAAAA,IAAcvG,MAAAA,IAAAA,GAGlBqe,QAAIC,IAAAA,IAAAA,OAAsBzC,IAAAA,KAAAA,KAC1Bpc,IAAKO,GAAAA,QAAAA,IAAgBuG,MACrB9G,EAAkBgO,EACI8Q,oBAAbC,KAA2C,KAAA/Q,EAAb+Q,gBAChCC,IAAAA,GAEe1Q,qBACpBtO,EAAKoc,KAAcyC,KAAAA,GAAAA,GAGnBT,qBACWT,EAAAA,qBAA+BsB,EAAU9B,KAAAA,KAAgBnd,GAAAA,GAAK0U,uBAC7C1U,EAAKmd,gBAAgB+B,EAEjDxK,EAAmByK,gBAAYpY,CAAQ2N,IAC3CqK,GACE/Q,EAAIhO,oBAEoBqO,KAAnBrO,KAAKue,EAA4BlB,KAAAA,GAAWrd,qBAA2BA,EAAK6d,GAE7E7d,sBAEAA,qBACKV,GAGX0f,SAAMhR,GACJhO,QAAKqd,GACIe,GAAAA,GAAAA,GAAoBT,EAAAA,aACtBR,UAAend,EAAKO,IAAAA,GAAgB6e,EAAQpf,GAAK0U,OAAAA,UACtD1U,OAAKue,EAAac,aAEf9B,EAAAA,OAAgBvP,EAChB2P,aACL3d,KAAK8d,OAAAA,QACL9P,EAEFsR,EAAOxJ,OAAA9H,EACAhO,aAAKoe,KAAgBpe,OAAKqd,QAAYrd,EAAK2d,gBACzCE,EAAAA,OAAAA,EAEP7d,aAAKue,KAAa,OACblB,SAAU+B,EAEjBG,IAAQ,IAAAC,GACFxf,EAAK2d,aAEJvB,WAAcpc,EAAKO,IAAAA,GAAoBP,EAAK0U,GAAAA,OAAiB,WAC7D6J,OAAave,EAAK0U,aAAAA,EAAsB0H,OAAAA,EAC7Cpc,aAAK6d,KAAAA,OAAsB,QACrBa,EAERe,EAAQ3J,OACD9V,EAAK+d,aAEV/d,KAAK+d,OAAAA,QACL/d,EAAK2d,gBACAJ,EAAAA,OACLvd,EAAKoc,aACLpc,KAAKue,OAAAA,SACLve,EAAK+G,IAAQ+N,IAAAA,GAGb9G,EAAM0Q,aAAAA,WAERgB,EAAS,OAAAC,IACFjb,EAAAA,IAAgB,WAChBsa,OAEPY,EAAAA,aAAkB5R,EAAS9D,OAAM2V,EACT9J,aAAA1H,KAAXwR,OAAAA,QAAiC7R,EAAR9D,SAClClK,EAAK0d,aAAgBvU,KAAK0W,OAAAA,6BAET,YAAeA,EACtBtL,oBAERwD,EAAQ/X,OAAK0d,EAAAA,aAAgB/b,KAAQke,OACrC9H,SAAS4H,EACNjC,KAAAA,OAAAA,QAAuB3F,GAEhC+H,EAAAA,GAAa,MAAAjR,GAASkR,KAAAA,EAChB/f,GAAKoe,UAAAA,EACP,GAAKpe,EAAKud,UAAAA,EACR1Z,MAAImc,GAAQlR,EAAIqN,MAAAA,IAAAA,UAAqBnc,EAAKmd,gBAAc4C,OACpD1O,EAAWrR,gBAAK0d,MAAgB1B,WAAYwB,EAAAA,GAAAA,EAAiBA,UAAAA,EACjEyC,MAAAA,GAAAA,EAAWpc,MACTwN,IAAAA,WAAS7P,EAAQ0e,yBACPC,OAAKH,EAAMpQ,gBAGvB5P,MAAKud,WAAAA,EAAgB,IAGvBvd,EAAAA,IAAKud,EAAAA,GAAAA,EAGT6C,UAAOvR,EAASwN,MAAAA,GAAAA,EAAcgE,MAAAA,IAAAA,WAClB1C,EAAAA,GAAU3d,EACK,MAAnBA,OAAKue,OACH8B,GAAAA,GACGnR,EAAYmN,qBAAoBc,KAAAA,KAAend,EAAK0E,sBAE5C0Z,EACVH,EAAkB5B,gBAAoBkC,KAAAA,OAAcve,EAIzDqgB,KAAAA,EACFrgB,EAAK6d,oBACL7d,KAAK8f,OAAAA,EAAYzD,gBAGrBiE,KAAIA,EACMtgB,EAAK+e,oBAAyB1Q,KAAGkS,OAAWC,EAAajD,IAAAA,GAQpEle,qBAAqBC,EAAAA,GAAgBE,mBC5NxCF,GAAyBI,SAqBvBsO,EAASyS,GAAAA,QAAAA,GACPpW,EAAIqW,GAAAA,EAAaC,QACjBA,IAAAA,QACIhP,SAAIkH,GAASuD,IACXvD,UAASuD,gBACP/Y,QACRqd,EAAWlf,GAAQof,KAASC,GAASA,KACrCC,GAAAA,aAAAA,kBAIF,gBAASC,EAAAA,mBAAiCC,0BACjCC,EAAAA,eAAc/D,sBAAiCA,EAAAA,qBAG/CgE,4BACFlD,EAELhe,aAAKoc,SAAczS,GAAOwX,MAAeA,GAAAA,IAAkBA,IAAYpE,EA8ChE+D,OCtFX,WAEE,GAA2Dzf,SAAvD8B,SAASC,cAAc,OAAOsV,YAAY0I,SAA9C,CAKE,GAAIrE,EACC,IAAIpT,OAAOwX,aAAeA,YAAYpE,IAC3C,GAAIA,GAAM,WAAa,MAAOoE,aAAYpE,WAE1C,IAAIA,GAAM,WAAa,MAAOxP,MAAKwP,MAGrC,IAAIsE,GAAuB,SAASzR,EAAQwM,EAAaC,GACvDrc,KAAK4P,OAASA,EACd5P,KAAKoc,YAAcA,EACnBpc,KAAKqc,aAAeA,EAEpBrc,KAAKkK,KAAO,SACZlK,KAAKuc,SAAAA,EACLvc,KAAKwc,YAAAA,EACLxc,KAAKyc,cAAgB7M,EACrB5P,KAAK0c,kBAAAA,EACL1c,KAAK2c,WAAaC,MAAMC,UACxB7c,KAAK8c,UAAYvP,KAAKwP,OAGpBuE,EAAyB3X,OAAO8O,QAAQ9R,UAAU+R,OACtD/O,QAAO8O,QAAQ9R,UAAU+R,QAAU,SAASjQ,EAAakQ,GACvD,GAAI4I,GAAYD,EAAuBnB,KAAKngB,KAAMyI,EAAakQ,EAE/D4I,GAAUC,mBACVD,EAAUH,SAAW,IAErB,IAAIK,GAAiBF,EAAU9B,MAC/B8B,GAAU9B,OAAS,WACjBgC,EAAetB,KAAKngB,KACpB,IAAIggB,GAAQ,GAAIqB,GAAqBrhB,KAAM,KAAM+c,KAC7C1L,EAAWrR,KAAKwhB,gBAAgBxF,OAAOhc,KAAKohB,UAAYphB,KAAKohB,aACjEnB,YAAW,WACT5O,EAAS7P,QAAQ,SAASqe,GACxBA,EAAQM,KAAKH,EAAMpQ,OAAQoQ,MAE5B,GAGL,IAAI0B,GAA2BH,EAAU3B,gBACzC2B,GAAU3B,iBAAmB,SAAS1V,EAAM2V,GACpB,kBAAXA,IAAiC,UAAR3V,EAClClK,KAAKwhB,gBAAgBrY,KAAK0W,GAE1B6B,EAAyBvB,KAAKngB,KAAMkK,EAAM2V,GAG9C,IAAI8B,GAA8BJ,EAAUK,mBAW5C,OAVAL,GAAUK,oBAAsB,SAAS1X,EAAM2V,GAC7C,GAAY,UAAR3V,EAAkB,CACpB,GAAI6N,GAAQ/X,KAAKwhB,gBAAgB7f,QAAQke,EACrC9H,IAAS,GACX/X,KAAKwhB,gBAAgBK,OAAO9J,EAAO,OAErC4J,GAA4BxB,KAAKngB,KAAMkK,EAAM2V,IAI1C0B,OClEX,SAAU9hB,GAgBR,GAAImW,GAAUzS,SAASiV,gBACnBmJ,EAAY,KACZO,GAAAA,CACJ,KACE,GAAIC,GAAkBC,iBAAiBpM,GAASsB,iBAAiB,WAC7D+K,EAAiC,KAAnBF,EAAyB,IAAM,GACjDR,GAAY3L,EAAQ8C,SAASjF,SAAYwO,EAAaA,KACjD9gB,SAAU,IACfogB,EAAUnF,YAAc,EACxB0F,EAAWE,iBAAiBpM,GAASsB,iBAAiB,YAAc+K,EACpE,MAAOC,IACP,QACIX,GACFA,EAAU9B,SAEd,IAAIqC,EAAJ,CAIA,GAAIR,GAAyB3X,OAAO8O,QAAQ9R,UAAU+R,OACtD/O,QAAO8O,QAAQ9R,UAAU+R,QAAU,SAASjQ,EAAakQ,GAUvD,MATIhP,QAAOC,QAAUA,OAAOC,UAAYjB,MAAMjC,UAAUmD,MAAQrB,EAAYmB,OAAOC,YAEjFpB,EAAcG,MAAMkB,KAAKrB,IAGtBG,MAAMC,QAAQJ,IAAgC,OAAhBA,IACjCA,EAAchJ,EAAO+I,mBAAmBC,IAGnC6Y,EAAuBnB,KAAKngB,KAAMyI,EAAakQ,MAEvDtZ,IC/CH,SAAUI,EAAQuO,EAAOtO,GA8DvB,QAASyiB,GAAsBxQ,GAC7B,GAAIkH,GAAWlP,OAAOxG,SAAS0V,QAC/BA,GAASuD,YAAczK,EACvBkH,EAASuJ,qBAC0B,GAA/BvJ,EAASmF,YAAYhV,OACvBqZ,GAAAA,EAEAC,sBAAsBH,GApE1B,GAAII,GAAgC5Y,OAAO2Y,qBAC3C3Y,QAAO2Y,sBAAwB,SAASjgB,GACtC,MAAOkgB,GAA8B,SAASngB,GAC5CuH,OAAOxG,SAAS0V,SAAS2J,4BACzBngB,EAAED,GACFuH,OAAOxG,SAAS0V,SAAS2J,+BAI7BxU,EAAMyU,kBAAoB,WACxBziB,KAAKge,eACLhe,KAAKoc,YAAc/a,QAGrB2M,EAAMyU,kBAAkB9b,WACtB+b,cAAe,WAEb,MADA1iB,MAAKoiB,qBACEpiB,KAAKge,YAAYna,SAE1B2e,0BAA2B,WACzBxU,EAAM2U,uBAAyB3U,EAAM2U,uBAAuBjY,OAAO,SAAS6W,GAC1E,MAAOA,GAAUqB,qBAGrBR,mBAAoB,WAClBpiB,KAAKwiB,4BACLxiB,KAAKge,YAAche,KAAKge,YAAYtT,OAAO,SAAS6W,GAClD,MAA8B,YAAvBA,EAAUxC,WAAkD,QAAvBwC,EAAUxC,aAG1D8D,MAAO,SAAS7hB,GACd,GAAIugB,GAAY,GAAIvT,GAAMgP,UAAUhc,EAAQhB,KAW5C,OAVAA,MAAKge,YAAY7U,KAAKoY,GACtBvT,EAAM8U,+BAMNvB,EAAUqB,kBACVrB,EAAUra,WAAW8X,OACrBuC,EAAUqB,kBACHrB,GAETvC,KAAM,SAAShe,GAIb,MAHIA,IACFA,EAAO+hB,SAEF/iB,KAAK6iB,MAAM7hB,IAItB,IAAIqhB,IAAAA,CAEJrU,GAAM8U,6BAA+B,WAC9BT,IACHA,GAAAA,EACAC,sBAAsBH,IAc1B,IAAItJ,GAAW,GAAI7K,GAAMyU,iBACzBzU,GAAM6K,SAAWA,CAEjB,KACEvX,OAAOoU,eAAe/L,OAAOxG,SAAU,YACrCsS,cAAAA,EACAgB,IAAK,WAAa,MAAOoC,MAE3B,MAAOmK,IACT,IACErZ,OAAOxG,SAAS0V,SAAWA,EAC3B,MAAOmK,MAER3jB,EAAqBE,EAAmBC,GCtF3C,SAAUC,EAAQuO,EAAOtO,GACvBsO,EAAM2U,0BAEN3U,EAAMgP,UAAY,SAAShc,EAAQ6X,GASjC,GARA7Y,KAAKiV,GAAK,GACNjU,GAAUA,EAAOic,MACnBjd,KAAKiV,GAAKjU,EAAOic,KAEnBjd,KAAKgB,OAASA,EACVA,IACFA,EAAOkG,WAAalH,OAEjB6Y,EACH,KAAM,IAAI9K,OAAM,gDAElB/N,MAAKwe,UAAY3F,EACjB7Y,KAAKkd,gBAAkBzd,EAAOyc,iBAC9Blc,KAAKijB,UAAY,EACjBjjB,KAAKqd,SAAAA,EACLrd,KAAKkjB,UAAAA,EACLljB,KAAKkH,WAAa,KAClBlH,KAAKmjB,oBACLnjB,KAAKojB,UAAY,KACjBpjB,KAAKqjB,cAAgB,OACrBrjB,KAAKmH,8BAELnH,KAAKkH,WAAWuY,SAChBzf,KAAK4iB,mBAGP5U,EAAMgP,UAAUrW,WACdic,gBAAiB,WACf,GAAIU,GAAetjB,KAAKqjB,cACpBE,EAAevjB,KAAK+e,SAsBxB,OArBI/e,MAAKwjB,eAAiBD,IAAiBD,IACrB,QAAhBC,GACFvjB,KAAKyjB,sBACLzjB,KAAKwjB,cAAgBniB,QACI,WAAhBiiB,EACTtjB,KAAK0jB,uBACoB,WAAhBH,IACTvjB,KAAKwjB,cAAgBniB,SAGrBrB,KAAK2jB,kBAAoBJ,IAAiBD,IACxB,QAAhBC,GACFvjB,KAAK4jB,yBACL5jB,KAAK2jB,iBAAmBtiB,QACC,YAAhBkiB,EACTvjB,KAAK6jB,0BACoB,YAAhBP,IACTtjB,KAAK2jB,iBAAmBtiB,SAG5BrB,KAAKqjB,cAAgBrjB,KAAK+e,UAClB/e,KAAKwjB,eAAiBxjB,KAAK2jB,kBAErCxc,4BAA6B,WAC3BnH,KAAK4iB,iBACL,IAAIkB,GACAC,EACAC,EACAnF,EACAoF,IAAgBjkB,KAAKkH,UACrB+c,KACFH,EAAkB9jB,KAAK0E,aACvBqf,EAAY/jB,KAAKqd,QACjB2G,EAAehkB,KAAKkP,UACpB2P,EAAiB7e,KAAKoc,YACtBpc,KAAKkH,WAAWuY,SAChBzf,KAAKkH,WAAWgd,SAAW,KAC3BlkB,KAAKkH,WAAa,QAGflH,KAAKgB,QAAUhB,KAAKgB,iBAAkB2I,QAAOiL,kBAChD5U,KAAKkH,WAAa8G,EAAMmW,wCAAwCnkB,KAAKgB,QACrEgN,EAAMoW,+BAA+BpkB,QAEnCA,KAAKgB,iBAAkB2I,QAAO0a,gBAAkBrkB,KAAKgB,iBAAkB2I,QAAO2a,eAChFtkB,KAAKkH,WAAa8G,EAAMuW,+BAA+BvkB,KAAKgB,QAC5DgN,EAAMwW,sBAAsBxkB,OAE1BA,KAAKgB,QAAUhB,KAAKgB,OAAOyjB,WAC7BzW,EAAM0W,6BAA6B1kB,MAEjCikB,IACqB,GAAnBH,IACF9jB,KAAK0E,aAAeof,GAED,OAAjBE,EACFhkB,KAAKkP,UAAY8U,EACW,OAAnBnF,EACT7e,KAAKoc,YAAcyC,EACS,OAAnB7e,KAAKijB,YACdjjB,KAAKoc,YAAcpc,KAAKijB,WAEtBc,GACF/jB,KAAKsf,SAGTtf,KAAK4iB,mBAEP+B,gBAAiB,WACf,GAAK3kB,KAAKgB,QAA4B,QAAlBhB,KAAK+e,UAAzB,CAGA,GAAI9V,GAASjJ,KAAKgB,OAAOiG,QAAQjC,KACjChF,MAAKmjB,iBAAiB3hB,QAAQ,SAASojB,GACrC5kB,KAAK6kB,iBAAiBD,EAAgB3b,GAClCjJ,KAAKgB,iBAAkB2I,QAAO0a,iBAChCpb,GAAU+E,EAAM8W,mBAAmBF,EAAe5jB,UACpDqN,KAAKrO,SAET+kB,sBAAuB,SAASxD,GAC9B,GAAKvhB,KAAKgB,QAAWhB,KAAKkjB,SAE1B,IAAK,GAAI7a,GAAI,EAAGA,EAAIrI,KAAKgB,OAAOgkB,SAAShc,OAAQX,IAC/CrI,KAAKgB,OAAOgkB,SAAS3c,GAAGnB,WAAaqa,EACrCvhB,KAAKmjB,iBAAiB9a,GAAG0c,sBAAsBxD,IAGnD0D,0BAA2B,WACzB,GAAKjlB,KAAKgB,QAAWhB,KAAKkjB,SAA1B,CAEA,GAAIja,GAASjJ,KAAKgB,OAAOiG,QAAQjC,KACjChF,MAAKklB,yBACLllB,KAAKgB,OAAOgkB,SAASxjB,QAAQ,SAAS2jB,GACpC,GAAIP,GAAiBjb,OAAOxG,SAAS0V,SAASgK,MAAMsC,EACpDnlB,MAAKmjB,iBAAiBha,KAAKyb,GAC3BA,EAAelgB,aAAe1E,KAAK0E,aAC/B1E,KAAKqd,SACPuH,EAAetF,QACjB6F,EAAMje,WAAalH,KAAKgB,OAAOkG,WAE/BlH,KAAK6kB,iBAAiBD,EAAgB3b,GAElCjJ,KAAKgB,iBAAkB2I,QAAO0a,iBAChCpb,GAAU+E,EAAM8W,mBAAmBK,KACrC9W,KAAKrO,SAET6kB,iBAAkB,SAASD,EAAgB3b,GAClB,OAAnBjJ,KAAKkP,UACP0V,EAAexI,YAAcpc,KAAKoc,YAAcnT,EAASjJ,KAAK0E,aACrDkgB,EAAe1V,YAAclP,KAAKkP,UAAYjG,EAASjJ,KAAK0E,eACrEkgB,EAAe1V,UAAYlP,KAAKkP,UAAYjG,EAASjJ,KAAK0E,eAG9DmU,GAAIA,YACF,MAAO7Y,MAAKwe,WAEdO,GAAIA,aACF,MAAO/e,MAAKkH,WAAalH,KAAKkH,WAAW6X,UAAY,QAEvDqG,GAAIA,YACF,MAAKzb,QAAO0b,SAIPrlB,KAAK2jB,mBAC0C,IAA9C3V,EAAM2U,uBAAuBhhB,QAAQ3B,OACvCgO,EAAM2U,uBAAuBxZ,KAAKnJ,MAEpCA,KAAK2jB,iBAAmB,GAAI0B,SACxB,SAASC,EAASC,GAChBvlB,KAAK6jB,wBAA0B,WAC7ByB,EAAQtlB,OAEVA,KAAK4jB,uBAAyB,WAC5B2B,GAAQrb,KAAMC,aAAaqb,UAAWnb,KAAM,iBAE9CgE,KAAKrO,OACW,YAAlBA,KAAK+e,WACP/e,KAAK6jB,2BAGF7jB,KAAK2jB,mBApBVhW,QAAQC,KAAK,6DACN,OAqBX6X,GAAIA,SACF,MAAK9b,QAAO0b,SAIPrlB,KAAKwjB,gBAC0C,IAA9CxV,EAAM2U,uBAAuBhhB,QAAQ3B,OACvCgO,EAAM2U,uBAAuBxZ,KAAKnJ,MAEpCA,KAAKwjB,cAAgB,GAAI6B,SACrB,SAASC,EAASC,GAChBvlB,KAAK0jB,qBAAuB,WAC1B4B,EAAQtlB,OAEVA,KAAKyjB,oBAAsB,WACzB8B,GAAQrb,KAAMC,aAAaqb,UAAWnb,KAAM,iBAE9CgE,KAAKrO,OACY,YAAnBA,KAAK+e,WACP/e,KAAK0jB,wBAGF1jB,KAAKwjB,gBApBV7V,QAAQC,KAAK,6DACN,OAqBX4P,GAAIA,YACF,MAAOxd,MAAKkH,WAAWsW,UAEzBA,GAAIA,UAASkI,GACK,kBAALA,GACT1lB,KAAKkH,WAAWsW,SAAW,SAAUwF,GACnCA,EAAEpT,OAAS5P,KACX0lB,EAAEvF,KAAKngB,KAAMgjB,IACZ3U,KAAKrO,MAERA,KAAKkH,WAAWsW,SAAWkI,GAG/BtE,GAAIA,YACF,MAAOphB,MAAKkH,WAAWka,UAEzBA,GAAIA,UAASsE,GACK,kBAALA,GACT1lB,KAAKkH,WAAWka,SAAW,SAAU4B,GACnCA,EAAEpT,OAAS5P,KACX0lB,EAAEvF,KAAKngB,KAAMgjB,IACZ3U,KAAKrO,MAERA,KAAKkH,WAAWka,SAAWsE,GAG/BtJ,GAAIA,eACFpc,KAAK4iB,iBACL,IAAIxG,GAAcpc,KAAKkH,WAAWkV,WAElC,OADApc,MAAK4iB,kBACExG,GAETA,GAAIA,aAAYsJ,GACd1lB,KAAK4iB,kBACL5iB,KAAKkH,WAAWkV,YAAcnS,SAASyb,GAAKA,EAAIhjB,KAAKijB,KAAKD,GAAK3hB,OAAO6hB,UACtE5lB,KAAK6lB,YACL7lB,KAAK8lB,cAAc,SAASX,EAAOlc,GACjCkc,EAAM/I,YAAcsJ,EAAIzc,IAE1BjJ,KAAK4iB,mBAEP1T,GAAIA,aACF,MAAOlP,MAAKkH,WAAWgI,WAEzBA,GAAIA,WAAUwW,GACZ1lB,KAAK4iB,kBACL5iB,KAAKkH,WAAWgI,UAAYjF,SAASyb,GAAKA,EAAIhjB,KAAKijB,KAAKD,GAAK3hB,OAAO6hB,UACpE5lB,KAAK6lB,YACL7lB,KAAK8lB,cAAc,SAASX,EAAOlc,GACjCkc,EAAMjW,UAAYwW,EAAIzc,IAExBjJ,KAAK4iB,mBAEPle,GAAIA,gBACF,MAAO1E,MAAKkH,WAAWxC,cAEzBA,GAAIA,cAAaoC,GACf9G,KAAK4iB,iBACL,IAAI/D,GAAiB7e,KAAKoc,WAC1Bpc,MAAKkH,WAAWxC,aAAeoC,EAC/B9G,KAAK8lB,cAAc,SAASlB,GAC1BA,EAAelgB,aAAeoC,IAEV,UAAlB9G,KAAK+e,WAA2C,QAAlB/e,KAAK+e,WACrC/e,KAAKgf,OAEgB,OAAnBH,IACF7e,KAAKoc,YAAcyC,GAErB7e,KAAK4iB,mBAEP5D,KAAM,WACJhf,KAAK4iB,kBACL5iB,KAAKqd,SAAAA,EACLrd,KAAKkH,WAAW8X,OACgC,IAA5Chf,KAAKwe,UAAUR,YAAYrc,QAAQ3B,OACrCA,KAAKwe,UAAUR,YAAY7U,KAAKnJ,MAElCA,KAAK6lB,YACL7X,EAAM+X,eAAe/lB,MACrBA,KAAK8lB,cAAc,SAASX,GAC1B,GAAIa,GAAOb,EAAM/I,WACjB+I,GAAMnG,OACNmG,EAAM/I,YAAc4J,IAEtBhmB,KAAK4iB,mBAEPtD,MAAO,WACLtf,KAAK4iB,kBACD5iB,KAAKoc,cACPpc,KAAKijB,UAAYjjB,KAAKoc,aAExBpc,KAAKkH,WAAWoY,QAChBtf,KAAK6lB,YACL7lB,KAAK8lB,cAAc,SAASX,GAC1BA,EAAM7F,UAERtf,KAAKqd,SAAAA,EACLrd,KAAK4iB,mBAEPrD,OAAQ,WACNvf,KAAK4iB,kBACL5iB,KAAKkH,WAAWqY,SAChBvf,KAAK6lB,YACL7lB,KAAK4iB,mBAEPnD,OAAQ,WACNzf,KAAK4iB,kBACL5iB,KAAKkH,WAAWuY,SAChBzf,KAAK6lB,YACL7lB,KAAKklB,yBACLllB,KAAK4iB,mBAEPlD,QAAS,WACP1f,KAAK4iB,iBACL,IAAI/D,GAAiB7e,KAAKoc,WAC1Bpc,MAAKkH,WAAWwY,UAChB1f,KAAK8lB,cAAc,SAASlB,GAC1BA,EAAelF,YAEM,OAAnBb,IACF7e,KAAKoc,YAAcyC,GAErB7e,KAAK4iB,mBAEPhD,iBAAkB,SAAS1V,EAAM2V,GAC/B,GAAIoG,GAAUpG,CACQ,mBAAXA,KACToG,EAAU,SAAUjD,GAClBA,EAAEpT,OAAS5P,KACX6f,EAAQM,KAAKngB,KAAMgjB,IAClB3U,KAAKrO,MACR6f,EAAQqE,SAAW+B,GAErBjmB,KAAKkH,WAAW0Y,iBAAiB1V,EAAM+b,IAEzCrE,oBAAqB,SAAS1X,EAAM2V,GAClC7f,KAAKkH,WAAW0a,oBAAoB1X,EAAO2V,GAAWA,EAAQqE,UAAarE,IAE7EqF,uBAAwB,WACtB,KAAOllB,KAAKmjB,iBAAiBna,QAC3BhJ,KAAKmjB,iBAAiB+C,MAAMzG,UAEhCqG,cAAe,SAASzjB,GACtB,GAAI4G,GAAS,CASb,IARIjJ,KAAKgB,OAAOgkB,UAAYhlB,KAAKmjB,iBAAiBna,OAAShJ,KAAKgB,OAAOgkB,SAAShc,QAC9EhJ,KAAKilB,4BACPjlB,KAAKmjB,iBAAiB3hB,QAAQ,SAAS2jB,GACrC9iB,EAAE8d,KAAKngB,KAAMmlB,EAAOlc,GAChBjJ,KAAKgB,iBAAkB2I,QAAO0a,iBAChCpb,GAAUkc,EAAMnkB,OAAO6D,iBACzBwJ,KAAKrO,OAEe,WAAlBA,KAAK+e,UAAT,CAEA,GAAI9d,GAASjB,KAAKgB,OAAOiG,QACrB0K,EAAI3R,KAAKoc,WACH,QAANzK,IACFA,EAAIlS,EAAOgH,sBAAsBhH,EAAO+E,wBAAwBvD,GAAS0Q,EAAG1Q,KACrE,MAAL0Q,GAAavQ,MAAMuQ,KACrB3R,KAAKklB,4BAIXvb,OAAOqT,UAAYhP,EAAMgP,WAMxB3d,EAAqBE,EAAmBC,GCnX1C,SAASC,EAAQuO,EAAOtO,GAqCvB,QAASymB,GAAa1d,GACpBzI,KAAKomB,QAAU3mB,EAAO4J,mBAAmBZ,GAoG3C,QAAS4d,KAEP,IADA,GAAIC,IAAAA,EACGC,EAAcvd,QAAQ,CAC3B,GAAI2F,GAAQ4X,EAAcC,OAC1B7X,GAAMgW,kBACN2B,GAAAA,EAEF,MAAOA,GA/IT,GAAIG,GAAe,SAASzlB,GAE1B,GADAA,EAAOkG,WAAa7F,OAChBL,YAAkB2I,QAAO0a,gBAAkBrjB,YAAkB2I,QAAO2a,YACtE,IAAK,GAAIjc,GAAI,EAAGA,EAAIrH,EAAOgkB,SAAShc,OAAQX,IAC1Coe,EAAazlB,EAAOgkB,SAAS3c,IAKnC2F,GAAM0Y,YAAc,SAASC,GAE3B,IAAK,GADDC,MACKve,EAAI,EAAGA,EAAIse,EAAQ3d,OAAQX,IAAK,CACvC,GAAIrH,GAAS2lB,EAAQte,EACjBrH,GAAO6lB,SACiC,IAAtCD,EAAWjlB,QAAQX,EAAO6lB,UAC5BD,EAAWzd,KAAKnI,EAAO6lB,SAEzB7lB,EAAO6lB,QAAQ7B,SAASnD,OAAO7gB,EAAO6lB,QAAQ7B,SAASrjB,QAAQX,GAAS,GACxEA,EAAO6lB,QAAU,KACjBJ,EAAazlB,IACJA,EAAOkG,YAAelG,EAAOkG,WAAWlG,QAAUA,IAC3DA,EAAOkG,WAAWuY,SAClBze,EAAOkG,WAAWlG,OAAS,GAAI4T,gBAAe,SAC1C5T,EAAOkG,WAAWkc,YACpBpiB,EAAOkG,WAAWkc,UAAUlc,WAAa,MAE3ClG,EAAOkG,WAAWC,8BAClBsf,EAAazlB,IAGjB,IAAKqH,EAAI,EAAGA,EAAIue,EAAW5d,OAAQX,IACjCue,EAAWve,GAAGye,YAQlB9Y,EAAM4G,eAAiB,SAAShF,EAAQnH,EAAa7I,EAAaqV,GAmBhE,MAlBAjV,MAAK4P,OAASA,EACd5P,KAAK6mB,QAAU,KAEfjnB,EAAcH,EAAOoC,sBAAsBjC,GAC3CI,KAAKgH,aAAevH,EAAOE,iBAAiBC,GAC5CI,KAAKiH,QAAUxH,EAAOqC,qBAAqBlC,GAE3CI,KAAKiB,OAASxB,EAAOqB,WAAWlB,GAAAA,EAAoBI,MACpDA,KAAKiB,OAAO8F,QAAU/G,KACI,kBAAfyI,IACThJ,EAAOqO,WAAW,wBAAyB,aAAc,wCACzD9N,KAAK+mB,qBAAuBte,GAE5BzI,KAAK+mB,qBAAuB,GAAIZ,GAAa1d,GAE/CzI,KAAKgnB,WAAave,EAClBzI,KAAK6E,eAAiBpF,EAAO+E,wBAAwBxE,KAAKiH,SAC1DjH,KAAKid,IAAMhI,EACJjV,MAGTgO,EAAM4G,eAAejO,WACnBsgB,UAAW,WACT,MAAwC,kBAA7BjnB,MAAK+mB,qBACP/mB,KAAK+mB,qBACP/mB,KAAK+mB,qBAAqBX,SAEnCc,GAAIA,UAASC,GACX,GAA+B,kBAApBnnB,MAAKinB,YACd,KAAM,IAAIlZ,OAAM,qEAElB/N,MAAKykB,UAAY0C,EACbnnB,KAAKkH,YACPlH,KAAKkH,WAAWC,+BAGpBigB,GAAIA,UACF,MAAOpnB,MAAK6mB,SAEdhnB,MAAO,WACL,GAA+B,kBAApBG,MAAKinB,YACd,KAAM,IAAIlZ,OAAM,2CAElB,IAAIlO,GAAQ,GAAI+U,gBAAe5U,KAAK4P,UAAYnQ,EAAOE,iBAAiBK,KAAKgH,cAAehH,KAAKid,IAGjG,OAFApd,GAAMknB,qBAAuB/mB,KAAK+mB,qBAClClnB,EAAMmnB,WAAahnB,KAAKgnB,WACjBnnB,GAETkjB,OAAQ,WACN/U,EAAM0Y,aAAa1mB,QAIvB,IAAIshB,GAAyB7I,QAAQ9R,UAAU+R,OAC/CD,SAAQ9R,UAAU+R,QAAU,SAASjQ,EAAakQ,GAChD,GAAI1D,GAAK,EAIT,OAHI0D,IAAWA,EAAQ1D,KACrBA,EAAK0D,EAAQ1D,IAERjH,EAAM6K,SAASgK,MAAM,GAAI7U,GAAM4G,eAAe5U,KAAMyI,EAAakQ,EAAS1D,IAGnF,IAAIoS,GAAalkB,SAASsI,gBAAgB,+BAAgC,MAC1EuC,GAAMmW,wCAA0C,SAAStP,GACvD,GAAIA,EAAgB,CAClB,GAAIjF,GAASiF,EAAejF,QAAUyX,EAClC9d,EAAYsL,EAAemS,UACP,mBAAbzd,KACTA,KAEF,IAAIoP,GAAU9D,EAAe7N,YAC7B2R,GAAQ1D,GAAKJ,EAAeoI,QAE5B,IAAIrN,GAASyX,EACT9d,KACAoP,EAAU,CAEhB,OAAO2I,GAAuB1d,MAAMgM,GAASrG,EAAWoP,KAI1D3K,EAAMoW,+BAAiC,SAAS7C,GAC1CA,EAAUvgB,QAA0D,kBAAzCugB,GAAUvgB,OAAO+lB,sBAC9C/Y,EAAM0W,6BAA6BnD,GAIvC,IAAIgF,KACJvY,GAAM+X,eAAiB,SAASuB,GACG,OAA7BA,EAAepY,WAAuBoY,EAAepE,WAE7B,GAAxBqD,EAAcvd,QAChBsZ,sBAAsB+D,GAExBE,EAAcpd,KAAKme,IAWrB,IAAIC,GAA2B5d,OAAOqY,gBACtC1gB,QAAOoU,eAAe/L,OAAQ,oBAC5B8L,cAAAA,EACAD,YAAAA,EACA1O,MAAO,WACL6C,OAAOxG,SAAS0V,SAAS2J,2BACzB,IAAIva,GAASsf,EAAyB3jB,MAAM5D,KAAMmY,UAIlD,OAHIkO,OACFpe,EAASsf,EAAyB3jB,MAAM5D,KAAMmY,YAChDxO,OAAOxG,SAAS0V,SAAS2J,4BAClBva,KAIX0B,OAAOiL,eAAiB5G,EAAM4G,eAC9BjL,OAAO8O,QAAQ9R,UAAU+b,cAAgB,WACvC,MAAOvf,UAAS0V,SAAS6J,gBAAgBhY,OAAO,SAAS6W,GACvD,MAA4B,QAArBA,EAAUvgB,QAAmBugB,EAAUvgB,OAAO4O,QAAU5P,MAC/DqO,KAAKrO,SAGTX,EAAqBE,EAAmBC,GCzK1C,SAAUC,EAAQuO,EAAOtO,GA6CvB,QAAS8nB,GAASL,GACZA,EAASM,cAEbN,EAASM,aAAAA,EACTC,EAAUve,KAAKge,GACV9E,IACHA,GAAAA,EACAC,sBAAsBqF,KAI1B,QAASA,GAAKhW,GACZ,GAAIiW,GAAWF,CACfA,MACAE,EAASxe,KAAK,SAASyF,EAAMC,GAC3B,MAAOD,GAAKqO,gBAAkBpO,EAAMoO,kBAEtC0K,EAAWA,EAASld,OAAO,SAASyc,GAClCA,GACA,IAAIpI,GAAYoI,EAASjgB,WAAaigB,EAASjgB,WAAW6X,UAAY,MAGtE,OAFiB,WAAbA,GAAuC,WAAbA,IAC5BoI,EAASM,aAAAA,GACJN,EAASM,cAElBC,EAAUve,KAAKvF,MAAM8jB,EAAWE,GAE5BF,EAAU1e,QACZqZ,GAAAA,EACAC,sBAAsBqF,IAEtBtF,GAAAA,EAzEJ,GAEInG,IAFa/Y,SAASsI,gBAAgB,+BAAgC,OAErD,EACrBuC,GAAM0W,6BAA+B,SAASnD,GAC5C,GACIsG,GADAjY,EAAS2R,EAAUvgB,OAAO4O,OAE1BkY,EAA0D,kBAAhCvG,GAAUvgB,OAAOimB,WAE7CY,GADEC,EACevG,EAAUvgB,OAAOimB,YAEjB1F,EAAUvgB,OAAOyjB,SAEpC,IAAIxjB,GAASsgB,EAAUvgB,OAAOC,OAC1B8mB,EAAO,IACX9mB,GAASxB,EAAOqC,qBAAqBb,EACrC,IAAIkmB,GAAW,WACb,GAAIxV,GAAIwV,EAASjgB,WAAaigB,EAASjgB,WAAWkV,YAAc,IACtD,QAANzK,IACFA,EAAIlS,EAAOgH,sBAAsBhH,EAAO+E,wBAAwBvD,GAAS0Q,EAAG1Q,GACxEG,MAAMuQ,KACRA,EAAI,OAIJA,IAAMoW,IACJD,EACFD,EAAelW,EAAG/B,EAAQ2R,EAAUvgB,QAEpC6mB,EAAelW,EAAG4P,EAAUvgB,OAAQugB,EAAUvgB,OAAOkG,aAGzD6gB,EAAOpW,EAGTwV,GAASjgB,WAAaqa,EACtB4F,EAASM,aAAAA,EACTN,EAASjK,gBAAkBhB,IAC3BqF,EAAU6B,UAAY+D,EACtBK,EAASL,GAGX,IAAIO,MACArF,GAAAA,CAmCJrU,GAAMgP,UAAUrW,UAAUkf,UAAY,WAChC7lB,KAAKojB,WACPoE,EAASxnB,KAAKojB,aAGjB/jB,EAAqBE,EAAmBC,GCnF3C,SAAUC,EAAQuO,EAAOtO,GAEvB,QAASolB,GAAmBkD,GAC1B,MAAOA,GAAK/gB,QAAQjC,MAAQgjB,EAAKnjB,eAAiBmjB,EAAK/gB,QAAQG,SAGjE,QAAS6gB,GAAYjD,EAAUplB,EAAaqV,GAC1CjV,KAAKid,IAAMhI,EACXjV,KAAK6mB,QAAU,KACf7mB,KAAKglB,SAAWA,MAChBhlB,KAAKkoB,UAAUloB,KAAKglB,UACpBplB,EAAcH,EAAOoC,sBAAsBjC,GAC3CI,KAAKgH,aAAevH,EAAOE,iBAAiBC,GAC5CI,KAAKiH,QAAUxH,EAAOqC,qBAAqBlC,GAAAA,GAC3CI,KAAKiB,OAASxB,EAAOqB,WAAWlB,GAAAA,EAAmBI,MACnDA,KAAKiB,OAAO8F,QAAU/G,KAEQ,SAA1BA,KAAKiH,QAAQ9F,WACfnB,KAAKiH,QAAQ9F,SAAWnB,KAAK6E,gBAIjC8E,OAAO0a,eAAiB,WACtB4D,EAAYrkB,MAAM5D,KAAMmY,YAG1BxO,OAAO2a,YAAc,WACnB2D,EAAYrkB,MAAM5D,KAAMmY,YAG1B8P,EAAYthB,WACVwhB,YAAa,SAASnnB,GAEpB,IADA,GAAIgB,GAAIhC,KACK,OAANgC,GAAY,CACjB,GAAIA,GAAKhB,EACP,OAAA,CACFgB,GAAIA,EAAE6kB,QAER,OAAA,GAEFC,SAAU,WAGR,IADA,GAAIkB,GAAOhoB,KACJgoB,GACwB,SAAzBA,EAAK/mB,OAAOE,WACd6mB,EAAK/gB,QAAQ9F,SAAW6mB,EAAKnjB,gBAE/BmjB,EAAOA,EAAKnB,OAEV7mB,MAAKkH,YACPlH,KAAKkH,WAAWC,+BAGpB+gB,UAAW,SAASE,GAClBpa,EAAM0Y,YAAY0B,EAClB,KAAK,GAAI/f,GAAI,EAAGA,EAAI+f,EAAYpf,OAAQX,IACtC+f,EAAY/f,GAAGwe,QAAU7mB,MAG7BqoB,UAAW,SAASlN,EAAMmN,GAExB,IAAK,GADDhe,GAAUge,EAAW,oCAAsC,qCACtDjgB,EAAI,EAAGA,EAAI8S,EAAKnS,OAAQX,IAC/B,GAAIrI,KAAKmoB,YAAYhN,EAAK9S,IACxB,MACE6B,KAAMC,aAAaoe,sBACnBle,KAAM,wBACNC,QAASA,EAKf,KAAK,GAAIjC,GAAI,EAAGA,EAAI8S,EAAKnS,OAAQX,IAC/BigB,EAAWtoB,KAAKglB,SAAS7b,KAAKgS,EAAK9S,IAAMrI,KAAKglB,SAASwD,QAAQrN,EAAK9S,GAEtErI,MAAKkoB,UAAU/M,GACfnb,KAAK8mB,YAEP2B,OAAQ,WACNzoB,KAAKqoB,UAAUlQ,WAAAA,IAEjBuQ,QAAS,WACP1oB,KAAKqoB,UAAUlQ,WAAAA,IAEjBiP,GAAIA,UACF,MAAOpnB,MAAK6mB,SAEd8B,GAAIA,cACF,MAAO3oB,MAAKglB,SAAShc,OAAShJ,KAAKglB,SAAS,GAAK,MAEnD4D,GAAIA,aACF,MAAO5oB,MAAKglB,SAAShc,OAAShJ,KAAKglB,SAAShlB,KAAKglB,SAAShc,OAAS,GAAK,MAE1EnJ,MAAO,WAGL,IAAK,GAFDgpB,GAAeppB,EAAOE,iBAAiBK,KAAKgH,cAC5C8hB,KACKzgB,EAAI,EAAGA,EAAIrI,KAAKglB,SAAShc,OAAQX,IACxCygB,EAAe3f,KAAKnJ,KAAKglB,SAAS3c,GAAGxI,QAEvC,OAAQG,gBAAgBskB,aACpB,GAAIA,aAAYwE,EAAgBD,GAChC,GAAIxE,gBAAeyE,EAAgBD,IAEzC9F,OAAQ,WACN/U,EAAM0Y,aAAa1mB,SAIvB2J,OAAO0a,eAAe1d,UAAYrF,OAAOynB,OAAOd,EAAYthB,WAC5DrF,OAAOoU,eACH/L,OAAO0a,eAAe1d,UACtB,kBAEE8P,IAAK,WACH,GAAIuS,GAAQ,CAIZ,OAHAhpB,MAAKglB,SAASxjB,QAAQ,SAAS2jB,GAC7B6D,GAASlE,EAAmBK,KAEvBziB,KAAK4W,IAAI0P,EAAO,MAI/Brf,OAAO2a,YAAY3d,UAAYrF,OAAOynB,OAAOd,EAAYthB,WACzDrF,OAAOoU,eACH/L,OAAO2a,YAAY3d,UACnB,kBAEE8P,IAAK,WACH,GAAI6C,GAAM,CAIV,OAHAtZ,MAAKglB,SAASxjB,QAAQ,SAAS2jB,GAC7B7L,EAAM5W,KAAK4W,IAAIA,EAAKwL,EAAmBK,MAElC7L,KAIftL,EAAMuW,+BAAiC,SAAS5V,GAC9C,GAAIsa,GACAhoB,EAAS,KACTioB,EAAS,SAASC,GACpB,GAAI5H,GAAY0H,EAAoB/E,QACpC,OAAK3C,IAGsB,WAAvBA,EAAUxC,WAGTwC,EAAUvgB,OAGL,MAANmoB,MACF5H,GAAU2D,yBAQF,GAANiE,GAAW5H,EAAU7c,aAAe,IACjCzD,IACHA,EAASxB,EAAOqC,qBAAqByf,EAAUvgB,OAAOC,SAExDkoB,EAAK1pB,EAAOgH,sBAAsBhH,EAAO+E,wBAAwBvD,GAAS,GAAIA,GAC1EG,MAAM+nB,IAAa,MAANA,IACf5H,EAAUuE,cAAc,SAASX,GAC/BA,EAAM/I,YAAc,SAEtBmF,GAAU2D,0BATd,OAlBA,QAiCEkE,EAAmB,GAAIxU,gBAAe,QAAUjG,EAAM1H,QAAS0H,EAAMsO,IAGzE,OAFAmM,GAAiBlC,SAAWgC,EAC5BD,EAAsBjb,EAAM6K,SAASgK,MAAMuG,IAI7Cpb,EAAMwW,sBAAwB,SAASjD,GACrCA,EAAUra,WAAWgd,SAAW3C,EAChCA,EAAU2B,UAAAA,EACVlV,EAAM+X,eAAexE,GACrBA,EAAU0D,4BACV1D,EAAUwD,sBAAsBxD,IAGlCvT,EAAM8W,mBAAqBA,GAE1BzlB,EAAqBE,EAAmBC,GnB3LvCD,EAAAA,QAEJ8pB,MACM7pB,WAAAA,MAAuBQ","file":"web-animations-next.min.js"} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.html b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.html
deleted file mode 100644
index b5de36c855e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
- 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>
-
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js
deleted file mode 100644
index 796b50dbcc0..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.
-
-!function(a,b){var c={},d={},e={},f=null;!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=w}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==u.indexOf(b[c]))return;if("direction"==c&&-1==v.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return 0>a||a>1||0>c||c>1?w:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<1e-4)return f(b,d,i);e>j?g=i:h=i}}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function k(a){B||(B=document.createElement("div").style),B.animationTimingFunction="",B.animationTimingFunction=a;var b=B.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");var c=D.exec(b);if(c)return i.apply(this,c.slice(1).map(Number));var d=E.exec(b);if(d)return j(Number(d[1]),{start:x,middle:y,end:z}[d[2]]);var f=A[b];return f?f:w}function l(a){return Math.abs(m(a)/a.playbackRate)}function m(a){return a.duration*a.iterations}function n(a,b,c){return null==b?F:b<c.delay?G:b>=c.delay+a?H:I}function o(a,b,c,d,e){switch(d){case G:return"backwards"==b||"both"==b?0:null;case I:return c-e;case H:return"forwards"==b||"both"==b?a:null;case F:return null}}function p(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function q(a,b,c,d,e){return c===1/0||c===-(1/0)||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function r(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function s(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d._easingFunction(h)}function t(a,b,c){var d=n(a,b,c),e=o(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===G?0:1;var f=c.iterationStart*c.duration,g=p(a,e,f,c),h=q(c.duration,m(c),g,f,c),i=r(c.duration,h,g,c);return s(i,c.duration,h,c)/c.duration}var u="backwards|forwards|both|none".split("|"),v="reverse|alternate|alternate-reverse".split("|"),w=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||0>a)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||0>a)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=k(a),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||0>a)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var x=1,y=.5,z=0,A={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,x),"step-middle":j(1,y),"step-end":j(1,z)},B=null,C="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",D=new RegExp("cubic-bezier\\("+C+","+C+","+C+","+C+"\\)"),E=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,F=0,G=1,H=2,I=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=l,a.calculateTimeFraction=t,a.calculatePhase=n,a.toTimingFunction=k}(c,f),function(a,b){function c(a,b){return a in j?j[a][b]||b:b}function d(a,b,d){var e=g[a];if(e){h.style[a]=b;for(var f in e){var i=e[f],j=h.style[i];d[i]=c(i,j)}}else d[a]=c(a,b)}function e(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;f>g;g++)e={},"offset"in a?e.offset=a.offset:1==f?e.offset=1:e.offset=g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function f(a){function b(){var a=c.length;null==c[a-1].offset&&(c[a-1].offset=1),a>1&&null==c[0].offset&&(c[0].offset=0);for(var b=0,d=c[0].offset,e=1;a>e;e++){var f=c[e].offset;if(null!=f){for(var g=1;e-b>g;g++)c[b+g].offset=d+(f-d)*g/(e-b);b=e,d=f}}}if(null==a)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&a[Symbol.iterator]&&(a=Array.from(a)),Array.isArray(a)||(a=e(a));for(var c=a.map(function(a){var b={};for(var c in a){var e=a[c];if("offset"==c){if(null!=e&&(e=Number(e),!isFinite(e)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==c)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};e=""+e}d(c,e,b)}return void 0==b.offset&&(b.offset=null),b}),f=!0,g=-(1/0),h=0;h<c.length;h++){var i=c[h].offset;if(null!=i){if(g>i)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return c=c.filter(function(a){return a.offset>=0&&a.offset<=1}),f||b(),c}var g={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},h=document.createElementNS("http://www.w3.org/1999/xhtml","div"),i={thin:"1px",medium:"3px",thick:"5px"},j={borderBottomWidth:i,borderLeftWidth:i,borderRightWidth:i,borderTopWidth:i,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:i,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=e,a.normalizeKeyframes=f}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=f[g].offset,i=f[g+1].offset,j=f[g].value,k=f[g+1].value,l=f[g].easing;h==i&&(1==i?j=k:k=j),d.push({startTime:h,endTime:i,easing:a.toTimingFunction(l?l:"linear"),property:e,interpolation:b.propertyInterpolation(e,j,k)})}return d.sort(function(a,b){return a.startTime-b.startTime}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return 0>=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){var g=c[f];e(a,b,d(g))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(c,d,f),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateTimeFraction(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d._isCurrent=function(d){var e=a.calculatePhase(c,d,b);return e===PhaseActive||e===PhaseBefore},d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return h=i(a),null!==h},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._isCurrent=i._isCurrent,k._totalDuration=i._totalDuration,k._id=g,k},b.NullEffect=function(a){var b=function(){a&&(a(),a=null)};return b._update=function(){return null},b._totalDuration=0,b._isCurrent=function(){return!1},b._hasSameTarget=function(){return!1},b}}(c,d,f),function(a,b){function c(a,b,c){c.enumerable=!0,c.configurable=!0,Object.defineProperty(a,b,c)}function d(a){this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=a.style,this._length=0,this._isAnimatedProperty={};for(var b=0;b<this._style.length;b++){var c=this._style[b];this._surrogateStyle[c]=this._style[c]}this._updateIndices()}function e(a){if(!a._webAnimationsPatchedStyle){var b=new d(a);try{c(a,"style",{get:function(){return b}})}catch(e){a.style._set=function(b,c){a.style[b]=c},a.style._clear=function(b){a.style[b]=""}}a._webAnimationsPatchedStyle=a.style}}var f={cssText:1,length:1,parentRule:1},g={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},h={removeProperty:1,setProperty:1};d.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(a){for(var b={},c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;this._surrogateStyle.cssText=a,this._updateIndices();for(var c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;for(var d in b)this._isAnimatedProperty[d]||this._style.setProperty(d,this._surrogateStyle.getPropertyValue(d))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(a){return function(){return this._surrogateStyle[a]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(a,b){this._style[a]=b,this._isAnimatedProperty[a]=!0},_clear:function(a){this._style[a]=this._surrogateStyle[a],delete this._isAnimatedProperty[a]}};for(var i in g)d.prototype[i]=function(a,b){return function(){var c=this._surrogateStyle[a].apply(this._surrogateStyle,arguments);return b&&(this._isAnimatedProperty[arguments[0]]||this._style[a].apply(this._style,arguments),this._updateIndices()),c}}(i,i in h);for(var j in document.documentElement.style)j in f||j in g||!function(a){c(d.prototype,a,{get:function(){return this._surrogateStyle[a]},set:function(b){this._surrogateStyle[a]=b,this._updateIndices(),this._isAnimatedProperty[a]||(this._style[a]=b)}})}(j);a.apply=function(b,c,d){e(b),b.style._set(a.propertyName(c),d)},a.clear=function(b,c){b._webAnimationsPatchedStyle&&b.style._clear(a.propertyName(c))}}(d,f),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(d),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return.5>d?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(d,f),function(a,b){function c(a,b,c){return Math.max(Math.min(a,c),b)}function d(b,d,e){var f=a.dot(b,d);f=c(f,-1,1);var g=[];if(1===f)g=b;else for(var h=Math.acos(f),i=1*Math.sin(e*h)/Math.sqrt(1-f*f),j=0;4>j;j++)g.push(b[j]*(Math.cos(e*h)-f*i)+d[j]*i);return g}var e=function(){function a(a,b){for(var c=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],d=0;4>d;d++)for(var e=0;4>e;e++)for(var f=0;4>f;f++)c[d][e]+=b[d][f]*a[f][e];return c}function b(a){return 0==a[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]}function c(c,d,e,f,g){for(var h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i=0;4>i;i++)h[i][3]=g[i];for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[3][i]+=c[j]*h[j][i];var k=f[0],l=f[1],m=f[2],n=f[3],o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];o[0][0]=1-2*(l*l+m*m),o[0][1]=2*(k*l-m*n),o[0][2]=2*(k*m+l*n),o[1][0]=2*(k*l+m*n),o[1][1]=1-2*(k*k+m*m),o[1][2]=2*(l*m-k*n),o[2][0]=2*(k*m-l*n),o[2][1]=2*(l*m+k*n),o[2][2]=1-2*(k*k+l*l),h=a(h,o);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];e[2]&&(p[2][1]=e[2],h=a(h,p)),e[1]&&(p[2][1]=0,p[2][0]=e[0],h=a(h,p)),e[0]&&(p[2][0]=0,p[1][0]=e[0],h=a(h,p));for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[i][j]*=d[i];return b(h)?[h[0][0],h[0][1],h[1][0],h[1][1],h[3][0],h[3][1]]:h[0].concat(h[1],h[2],h[3])}return c}();a.composeMatrix=e,a.quat=d}(d,f),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.invalidateEffects()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.invalidateEffects())},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._finishedFlag=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag}}}(c,d,f),function(a,b,c){function d(a){var b=j;j=[],a<p.currentTime&&(a=p.currentTime),h(a,!0),b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c){n=!1;var d=b.timeline;d.currentTime=a,d._animations.sort(e),m=!1;var f=d._animations;d._animations=[];var g=[],h=[];f=f.filter(function(b){b._tick(a,c),b._inEffect?h.push(b._effect):g.push(b._effect),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;return b._inTimeline=d,d}),o.push.apply(o,g),o.push.apply(o,h),d._animations.push.apply(d._animations,f),m&&requestAnimationFrame(function(){})}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.invalidateEffects(),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.invalidateEffects=function(){h(b.timeline.currentTime,!1),g()};var o=[],p=new f;b.timeline=p}(c,d,f),function(a,b){function c(a,b){for(var c=0,d=0;d<a.length;d++)c+=a[d]*b[d];return c}function d(a,b){return[a[0]*b[0]+a[4]*b[1]+a[8]*b[2]+a[12]*b[3],a[1]*b[0]+a[5]*b[1]+a[9]*b[2]+a[13]*b[3],a[2]*b[0]+a[6]*b[1]+a[10]*b[2]+a[14]*b[3],a[3]*b[0]+a[7]*b[1]+a[11]*b[2]+a[15]*b[3],a[0]*b[4]+a[4]*b[5]+a[8]*b[6]+a[12]*b[7],a[1]*b[4]+a[5]*b[5]+a[9]*b[6]+a[13]*b[7],a[2]*b[4]+a[6]*b[5]+a[10]*b[6]+a[14]*b[7],a[3]*b[4]+a[7]*b[5]+a[11]*b[6]+a[15]*b[7],a[0]*b[8]+a[4]*b[9]+a[8]*b[10]+a[12]*b[11],a[1]*b[8]+a[5]*b[9]+a[9]*b[10]+a[13]*b[11],a[2]*b[8]+a[6]*b[9]+a[10]*b[10]+a[14]*b[11],a[3]*b[8]+a[7]*b[9]+a[11]*b[10]+a[15]*b[11],a[0]*b[12]+a[4]*b[13]+a[8]*b[14]+a[12]*b[15],a[1]*b[12]+a[5]*b[13]+a[9]*b[14]+a[13]*b[15],a[2]*b[12]+a[6]*b[13]+a[10]*b[14]+a[14]*b[15],a[3]*b[12]+a[7]*b[13]+a[11]*b[14]+a[15]*b[15]]}function e(a){var b=a.rad||0,c=a.deg||0,d=a.grad||0,e=a.turn||0,f=(c/360+d/400+e)*(2*Math.PI)+b;return f}function f(a){switch(a.t){case"rotatex":var b=e(a.d[0]);return[1,0,0,0,0,Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1];case"rotatey":var b=e(a.d[0]);return[Math.cos(b),0,-Math.sin(b),0,0,1,0,0,Math.sin(b),0,Math.cos(b),0,0,0,0,1];case"rotate":case"rotatez":var b=e(a.d[0]);return[Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var c=a.d[0],d=a.d[1],f=a.d[2],b=e(a.d[3]),g=c*c+d*d+f*f;if(0===g)c=1,d=0,f=0;else if(1!==g){var h=Math.sqrt(g);c/=h,d/=h,f/=h}var i=Math.sin(b/2),j=i*Math.cos(b/2),k=i*i;return[1-2*(d*d+f*f)*k,2*(c*d*k+f*j),2*(c*f*k-d*j),0,2*(c*d*k-f*j),1-2*(c*c+f*f)*k,2*(d*f*k+c*j),0,2*(c*f*k+d*j),2*(d*f*k-c*j),1-2*(c*c+d*d)*k,0,0,0,0,1];case"scale":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[a.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,a.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,a.d[0],0,0,0,0,1];case"scale3d":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,a.d[2],0,0,0,0,1];case"skew":var l=e(a.d[0]),m=e(a.d[1]);return[1,Math.tan(m),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":var b=e(a.d[0]);return[1,0,0,0,Math.tan(b),1,0,0,0,0,1,0,0,0,0,1];case"skewy":var b=e(a.d[0]);return[1,Math.tan(b),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":var c=a.d[0].px||0,d=a.d[1].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,0,1];case"translatex":var c=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,0,0,1];case"translatey":var d=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,d,0,1];case"translatez":var f=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,f,1];case"translate3d":var c=a.d[0].px||0,d=a.d[1].px||0,f=a.d[2].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,f,1];case"perspective":var n=a.d[0].px?-1/a.d[0].px:0;return[1,0,0,0,0,1,0,0,0,0,1,n,0,0,0,1];case"matrix":return[a.d[0],a.d[1],0,0,a.d[2],a.d[3],0,0,0,0,1,0,a.d[4],a.d[5],0,1];case"matrix3d":return a.d}}function g(a){return 0===a.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:a.map(f).reduce(d)}function h(a){return[i(g(a))]}var i=function(){function a(a){return a[0][0]*a[1][1]*a[2][2]+a[1][0]*a[2][1]*a[0][2]+a[2][0]*a[0][1]*a[1][2]-a[0][2]*a[1][1]*a[2][0]-a[1][2]*a[2][1]*a[0][0]-a[2][2]*a[0][1]*a[1][0]}function b(b){for(var c=1/a(b),d=b[0][0],e=b[0][1],f=b[0][2],g=b[1][0],h=b[1][1],i=b[1][2],j=b[2][0],k=b[2][1],l=b[2][2],m=[[(h*l-i*k)*c,(f*k-e*l)*c,(e*i-f*h)*c,0],[(i*j-g*l)*c,(d*l-f*j)*c,(f*g-d*i)*c,0],[(g*k-h*j)*c,(j*e-d*k)*c,(d*h-e*g)*c,0]],n=[],o=0;3>o;o++){for(var p=0,q=0;3>q;q++)p+=b[3][q]*m[q][o];n.push(p)}return n.push(1),m.push(n),m}function d(a){return[[a[0][0],a[1][0],a[2][0],a[3][0]],[a[0][1],a[1][1],a[2][1],a[3][1]],[a[0][2],a[1][2],a[2][2],a[3][2]],[a[0][3],a[1][3],a[2][3],a[3][3]]]}function e(a,b){for(var c=[],d=0;4>d;d++){for(var e=0,f=0;4>f;f++)e+=a[f]*b[f][d];c.push(e)}return c}function f(a){var b=g(a);return[a[0]/b,a[1]/b,a[2]/b]}function g(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function h(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function i(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function j(j){var k=[j.slice(0,4),j.slice(4,8),j.slice(8,12),j.slice(12,16)];if(1!==k[3][3])return null;for(var l=[],m=0;4>m;m++)l.push(k[m].slice());for(var m=0;3>m;m++)l[m][3]=0;if(0===a(l))return!1;var n,o=[];if(k[0][3]||k[1][3]||k[2][3]){o.push(k[0][3]),o.push(k[1][3]),o.push(k[2][3]),o.push(k[3][3]);var p=b(l),q=d(p);n=e(o,q)}else n=[0,0,0,1];var r=k[3].slice(0,3),s=[];s.push(k[0].slice(0,3));var t=[];t.push(g(s[0])),s[0]=f(s[0]);var u=[];s.push(k[1].slice(0,3)),u.push(c(s[0],s[1])),s[1]=h(s[1],s[0],1,-u[0]),t.push(g(s[1])),s[1]=f(s[1]),u[0]/=t[1],s.push(k[2].slice(0,3)),u.push(c(s[0],s[2])),s[2]=h(s[2],s[0],1,-u[1]),u.push(c(s[1],s[2])),s[2]=h(s[2],s[1],1,-u[2]),t.push(g(s[2])),s[2]=f(s[2]),u[1]/=t[2],u[2]/=t[2];var v=i(s[1],s[2]);if(c(s[0],v)<0)for(var m=0;3>m;m++)t[m]*=-1,s[m][0]*=-1,s[m][1]*=-1,s[m][2]*=-1;var w,x,y=s[0][0]+s[1][1]+s[2][2]+1;return y>1e-4?(w=.5/Math.sqrt(y),x=[(s[2][1]-s[1][2])*w,(s[0][2]-s[2][0])*w,(s[1][0]-s[0][1])*w,.25/w]):s[0][0]>s[1][1]&&s[0][0]>s[2][2]?(w=2*Math.sqrt(1+s[0][0]-s[1][1]-s[2][2]),x=[.25*w,(s[0][1]+s[1][0])/w,(s[0][2]+s[2][0])/w,(s[2][1]-s[1][2])/w]):s[1][1]>s[2][2]?(w=2*Math.sqrt(1+s[1][1]-s[0][0]-s[2][2]),x=[(s[0][1]+s[1][0])/w,.25*w,(s[1][2]+s[2][1])/w,(s[0][2]-s[2][0])/w]):(w=2*Math.sqrt(1+s[2][2]-s[0][0]-s[1][1]),x=[(s[0][2]+s[2][0])/w,(s[1][2]+s[2][1])/w,.25*w,(s[1][0]-s[0][1])/w]),[r,t,u,x,n]}return j}();a.dot=c,a.makeMatrixDecomposition=h}(d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,0>=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}return""==c?d:void 0}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;j>k;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(d),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);if(c)return d.inset=!0,c;var c=a.consumeLengthOrPercent(b);if(c)return d.lengths.push(c[0]),c;var c=a.consumeColor(b);return c?(d.color=c[0],c):void 0}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);return e&&e[0].length?[d,e[1]]:void 0}function c(c){var d=a.consumeRepeated(b,/^,/,c);return d&&""==d[1]?d[0]:void 0}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(d),function(a,b){function c(a){return a.toFixed(3).replace(".000","")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){return/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a)?Number(a):void 0}function f(a,b){return[a,b,c]}function g(a,b){return 0!=a?i(0,1/0)(a,b):void 0}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,j,["z-index"]),a.parseNumber=e,a.mergeNumbers=f,a.numberToString=c}(d,f),function(a,b){function c(a,b){return"visible"==a||"visible"==b?[0,1,function(c){return 0>=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,c,["visibility"])}(d),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",
-f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(new RegExp("U"+h,"g"),"").replace(new RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(a,b){return e(a,b,!0)}function e(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);return d&&4==d[0].length?d[0]:void 0}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(d,f),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r],void 0===p)return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]),g=a.composeMatrix(b[0],b[1],b[2],c,b[4]),h=g.map(f).join(",");return h}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"])}(d,f),function(a){function b(a){var b=Number(a);return isNaN(b)||100>b||b>900||b%100!==0?void 0:b}function c(b){return b=100*Math.round(b/100),b=a.clamp(100,900,b),400===b?"normal":700===b?"bold":String(b)}function d(a,b){return[a,b,c]}a.addPropertiesHandler(b,d,["font-weight"])}(d),function(a){function b(a){var b={};for(var c in a)b[c]=-a[c];return b}function c(b){return a.consumeToken(/^(left|center|right|top|bottom)\b/i,b)||a.consumeLengthOrPercent(b)}function d(b,d){var e=a.consumeRepeated(c,/^/,d);if(e&&""==e[1]){var f=e[0];if(f[0]=f[0]||"center",f[1]=f[1]||"center",3==b&&(f[2]=f[2]||{px:0}),f.length==b){if(/top|bottom/.test(f[0])||/left|right/.test(f[1])){var h=f[0];f[0]=f[1],f[1]=h}if(/left|right|center|Object/.test(f[0])&&/top|bottom|center|Object/.test(f[1]))return f.map(function(a){return"object"==typeof a?a:g[a]})}}}function e(d){var e=a.consumeRepeated(c,/^/,d);if(e){for(var f=e[0],h=[{"%":50},{"%":50}],i=0,j=!1,k=0;k<f.length;k++){var l=f[k];"string"==typeof l?(j=/bottom|right/.test(l),i={left:0,right:0,center:i,top:1,bottom:1}[l],h[i]=g[l],"center"==l&&i++):(j&&(l=b(l),l["%"]=(l["%"]||0)+100),h[i]=l,i++,j=!1)}return[h,e[1]]}}function f(b){var c=a.consumeRepeated(e,/^,/,b);return c&&""==c[1]?c[0]:void 0}var g={left:{"%":0},center:{"%":50},right:{"%":100},top:{"%":0},bottom:{"%":100}},h=a.mergeNestedRepeated.bind(null,a.mergeDimensions," ");a.addPropertiesHandler(d.bind(null,3),h,["transform-origin"]),a.addPropertiesHandler(d.bind(null,2),h,["perspective-origin"]),a.consumePosition=e,a.mergeOffsetList=h;var i=a.mergeNestedRepeated.bind(null,h,", ");a.addPropertiesHandler(f,i,["background-position","object-position"])}(d),function(a){function b(b){var c=a.consumeToken(/^circle/,b);if(c&&c[0])return["circle"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),d,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\)/))],c[1]));var f=a.consumeToken(/^ellipse/,b);if(f&&f[0])return["ellipse"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),e,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\)/))],f[1]));var g=a.consumeToken(/^polygon/,b);return g&&g[0]?["polygon"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\(/)),a.optional(a.consumeToken.bind(void 0,/^nonzero\s*,|^evenodd\s*,/),"nonzero,"),a.consumeSizePairList,a.ignore(a.consumeToken.bind(void 0,/^\)/))],g[1])):void 0}function c(b,c){return b[0]===c[0]?"circle"==b[0]?a.mergeList(b.slice(1),c.slice(1),["circle(",a.mergeDimensions," at ",a.mergeOffsetList,")"]):"ellipse"==b[0]?a.mergeList(b.slice(1),c.slice(1),["ellipse(",a.mergeNonNegativeSizePair," at ",a.mergeOffsetList,")"]):"polygon"==b[0]&&b[1]==c[1]?a.mergeList(b.slice(2),c.slice(2),["polygon(",b[1],g,")"]):void 0:void 0}var d=a.consumeParenthesised.bind(null,a.parseLengthOrPercent),e=a.consumeRepeated.bind(void 0,d,/^/),f=a.mergeNestedRepeated.bind(void 0,a.mergeDimensions," "),g=a.mergeNestedRepeated.bind(void 0,f,",");a.addPropertiesHandler(b,c,["shape-outside"])}(d),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b)})}var d={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a}}(d,f)}(),!function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(g){}finally{c&&c.cancel()}if(!d){var h=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),h.call(this,b,c)}}}(c),b["true"]=a}({},function(){return this}());
-//# sourceMappingURL=web-animations.min.js.map \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js.map b/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js.map
deleted file mode 100644
index 8c6d3075feb..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/web-animations-js/web-animations.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["src/scope.js","src/timing-utilities.js","src/normalize-keyframes.js","src/deprecation.js","src/keyframe-interpolations.js","src/property-interpolation.js","src/keyframe-effect.js","src/apply-preserving-inline-style.js","src/element-animatable.js","src/interpolation.js","src/matrix-interpolation.js","src/animation.js","src/tick.js","src/web-animations-bonus-cancel-events.js","src/web-animations-bonus-object-form-keyframes.js"],"names":["webAnimationsShared","webAnimations1","webAnimationsNext","webAnimationsTesting","shared","testing","cloneTimingInput","timingInput","clone","m","AnimationEffectTiming","this","_delay","_endDelay","_fill","_iterationStart","_iterations","_duration","_playbackRate","_direction","_easing","_easingFunction","linear","isInvalidTimingDeprecated","isDeprecated","makeTiming","forGroup","effect","timing","fill","duration","isNaN","undefined","Object","getOwnPropertyNames","forEach","property","fills","indexOf","directions","numericTimingToObject","normalizeTimingInput","cubic","a","b","c","d","x","f","start","end","mid","xEst","Math","abs","step","count","pos","stepSize","toTimingFunction","easing","styleForCleaning","document","createElement","style","animationTimingFunction","validatedEasing","TypeError","cubicData","cubicBezierRe","exec","apply","slice","map","Number","stepData","stepRe","Start","middle","Middle","End","preset","presets","calculateActiveDuration","repeatedDuration","playbackRate","iterations","calculatePhase","activeDuration","localTime","PhaseNone","delay","PhaseBefore","PhaseAfter","PhaseActive","calculateActiveTime","fillMode","phase","calculateScaledActiveTime","activeTime","startOffset","calculateIterationTime","iterationDuration","scaledActiveTime","Infinity","iterationStart","calculateCurrentIteration","iterationTime","floor","calculateTransformedTime","currentIteration","currentIterationIsOdd","currentDirectionIsForwards","direction","directedTime","timeFraction","calculateTimeFraction","split","prototype","_setMember","member","value","_effect","_timingInput","_timing","_animation","_rebuildUnderlyingAnimation","endDelay","ease","ease-in","ease-out","ease-in-out","step-start","step-middle","step-end","numberString","RegExp","antiAlias","aliases","expandShorthandAndAntiAlias","result","longProperties","shorthandToLonghand","shorthandExpanderElem","i","longProperty","longhandValue","convertToArrayForm","effectInput","normalizedEffectInput","values","Array","isArray","keyframe","numKeyframes","length","offset","composite","push","sort","normalizeKeyframes","spaceKeyframes","keyframes","previousIndex","previousOffset","j","window","Symbol","iterator","from","originalKeyframe","memberValue","isFinite","type","DOMException","NOT_SUPPORTED_ERR","name","message","everyFrameHasOffset","code","INVALID_MODIFICATION_ERR","filter","background","border","borderBottom","borderColor","borderLeft","borderRadius","borderRight","borderTop","borderWidth","flex","font","margin","outline","padding","createElementNS","borderWidthAliases","thin","medium","thick","borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","fontSize","xx-small","x-small","small","large","x-large","xx-large","fontWeight","normal","bold","outlineWidth","textShadow","none","boxShadow","silenced","feature","date","advice","plural","auxVerb","today","Date","expiry","setMonth","getMonth","console","warn","toDateString","deprecated","Error","scope","r","makePropertySpecificKeyframeGroups","leftCopy","propertySpecificKeyframeGroups","bind","addPropertiesHandler","parseShadowList","mergeShadowList","propertySpecificKeyframe","groupName","group","mergeFlex","left","right","round","makeInterpolations","interpolations","startTime","endTime","startValue","endValue","propertyInterpolation","leftInterpolation","rightInterpolation","convertEffectInput","trim","context","target","fraction","interpolation","fillStyle","offsetFraction","localDuration","scaledLocalTime","clamp","join","canvas","toCamelCase","parseColor","toUpperCase","addPropertyHandler","merger","propertyHandlers","parser","properties","ucProperty","test","matchedUnits","string","replace","unitRegExp","initialValues","handlers","parsedRight","parsedLeft","interpolationArgs","interp","Interpolation","t","taggedUnitRegExp","unit","bool","backgroundColor","nonNegative","backgroundPosition","units","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderLeftColor","borderRightColor","borderSpacing","borderTopColor","borderTopLeftRadius","borderTopRightRadius","numberToString","clip","color","height","marginBottom","marginLeft","marginRight","lengthUnits","marginTop","parseLengthOrPercent","maxWidth","minHeight","minWidth","opacity","parseAngle","outlineColor","outlineOffset","paddingBottom","paddingLeft","transform","verticalAlign","visibility","width","wordSpacing","consumeLength","zIndex","consumeParenthesised","consumeSizePairList","EffectTime","effectTime","_totalDuration","_isCurrent","KeyframeEffect","keyframeEffect","_update","_clear","_hasSameTarget","id","NullEffect","clear","nullEffect","configureProperty","object","descriptor","enumerable","configurable","defineProperty","AnimatedCSSStyleDeclaration","element","_surrogateStyle","ignore","consumeToken","_style","_length","_isAnimatedProperty","_updateIndices","ensureStyleIsPatched","_webAnimationsPatchedStyle","merged","animatedStyle","mergeDimensions","get","mergeWrappedNestedRepeated","_","styleAttributes","cssText","parentRule","styleMethods","getPropertyCSSValue","getPropertyPriority","getPropertyValue","item","removeProperty","setProperty","styleMutatingMethods","text","transformRegExp","isAffectedProperty","functionName","argTypes","s","T","parsedArgs","index","method","modifiesStyle","list","arguments","documentElement","matrixModulesLoaded","set","_set","propertyName","Element","animate","options","mergeMatrices","timeline","interpolate","leftArgs","to","transformFunctions","leftType","leftResult","convertToString","typeTo2D","max","rightArgs","quat","product","dot","fromQ","theta","sqrt","cos","toQ","w","composeMatrix","leftFunctionData","multiply","leftArgsCopy","k","mergeNumbers","merge","rightArgsCopy","translate","skew","perspective","matrix","types","stringConversions","tmp","rightResult","rotMatrix","stringifiedArgs","args","arg","y","z","deg","temp","rotate","rotatez","scale","cast","scaley","scale3d","is2D","concat","translatey","sequenceNumber","AnimationEvent","currentTime","timelineTime","out","bubbles","cancelable","currentTarget","defaultPrevented","eventPhase","Event","AT_TARGET","timeStamp","now","Animation","_id","_sequenceNumber","_currentTime","dimension","_paused","_inTimeline","_finishedFlag","onfinish","consumeOffset","_finishHandlers","_idle","consumeLengthOrPercent","_currentTimePending","_ensureAlive","_inEffect","_animations","_tickCurrentTime","newTime","ignoreLimit","_isFinished","position","restart","_startTime","_timeline","bottomOrRight","invalidateEffects","token","center","oldCurrentTime","mergeNestedRepeated","playState","play","parseOrigin","consumePosition","mergeOffsetList","circle","consumeList","pause","finish","ellipse","cancel","reverse","polygon","addEventListener","handler","_fireEvents","baseTime","event","setTimeout","mergeNonNegativeSizePair","call","_tick","isAnimationFrame","_needsTick","running","mergeSizePair","processRafCallbacks","processing","rafCallbacks","candidate","entry","applyPendingEffects","compareAnimations","rightAnimation","leftAnimation","InternalTimeline","performance","oncancel","AnimationCancelEvent","originalElementAnimate","animation","_cancelHandlers","originalCancel","originalAddEventListener","originalRemoveEventListener","removeEventListener","splice","animated","originalOpacity","getComputedStyle","testOpacity","error","exports"],"mappings":";;;;;;;;;;;;;;CAcA,SAAIA,EAAAA,GAAJ,GAAIA,MACAC,KACAC,KAGEC,EAAuB,MCL7B,SAAUC,EAAQC,GAMhB,QAASC,GAAiBC,GACxB,GAA0B,gBAAfA,GACT,MAAOA,EAET,IAAIC,KACJ,KAAK,GAAIC,KAAKF,GACZC,EAAMC,GAAKF,EAAYE,EAEzB,OAAOD,GAGT,QAASE,KACPC,KAAKC,OAAS,EACdD,KAAKE,UAAY,EACjBF,KAAKG,MAAQ,OACbH,KAAKI,gBAAkB,EACvBJ,KAAKK,YAAc,EACnBL,KAAKM,UAAY,EACjBN,KAAKO,cAAgB,EACrBP,KAAKQ,WAAa,SAClBR,KAAKS,QAAU,SACfT,KAAKU,gBAAkBC,EAGzB,QAASC,KACP,MAAOnB,GAAOoB,aAAa,wBAAyB,aAAc,gDAAA,GA8EpE,QAASC,GAAWlB,EAAamB,EAAUC,GACzC,GAAIC,GAAS,GAAIlB,EA4BjB,OA3BIgB,KACFE,EAAOC,KAAO,OACdD,EAAOE,SAAW,QAEM,gBAAfvB,IAA4BwB,MAAMxB,GAElByB,SAAhBzB,GACT0B,OAAOC,oBAAoB3B,GAAa4B,QAAQ,SAASC,GACvD,GAA6B,QAAzB7B,EAAY6B,GAAqB,CACnC,IAA+B,gBAApBR,GAAOQ,IAAqC,YAAZA,KACL,gBAAzB7B,GAAY6B,IAAyBL,MAAMxB,EAAY6B,KAChE,MAGJ,IAAiB,QAAZA,GAAgE,IAAxCC,EAAMC,QAAQ/B,EAAY6B,IACrD,MAEF,IAAiB,aAAZA,GAA0E,IAA7CG,EAAWD,QAAQ/B,EAAY6B,IAC/D,MAEF,IAAgB,gBAAZA,GAAwD,IAA1B7B,EAAY6B,IAAmBhC,EAAOoB,aAAa,qCAAsC,aAAc,uCACvI,MAEFI,GAAOQ,GAAY7B,EAAY6B,MAlBnCR,EAAOE,SAAWvB,EAsBbqB,EAGT,QAASY,GAAsBjC,GAQ7B,MAP0B,gBAAfA,KAEPA,EADEwB,MAAMxB,IACQuB,SAAU,IAEVA,SAAUvB,IAGvBA,EAGT,QAASkC,GAAqBlC,EAAamB,GAEzC,MADAnB,GAAcH,EAAOoC,sBAAsBjC,GACpCkB,EAAWlB,EAAamB,GAGjC,QAASgB,GAAMC,EAAGC,EAAGC,EAAGC,GACtB,MAAQ,GAAJH,GAASA,EAAI,GAAS,EAAJE,GAASA,EAAI,EAC1BvB,EAEF,SAASyB,GAOZ,QAASC,GAAEL,EAAGC,EAAGnC,GAAK,MAAO,GAAIkC,GAAK,EAAIlC,IAAM,EAAIA,GAAKA,EAAI,EAAImC,GAAK,EAAInC,GAAKA,EAAIA,EAAIA,EAAIA,EAAIA,EANjG,GAAS,GAALsC,GAAe,GAALA,EACZ,MAAOA,EAGT,KADA,GAAIE,GAAQ,EAAGC,EAAM,IACX,CACR,GAAIC,IAAOF,EAAQC,GAAO,EAEtBE,EAAOJ,EAAEL,EAAGE,EAAGM,EACnB,IAAIE,KAAKC,IAAIP,EAAIK,GAAQ,KACvB,MAAOJ,GAAEJ,EAAGE,EAAGK,EAENJ,GAAPK,EACFH,EAAQE,EAERD,EAAMC,IAUd,QAASI,GAAKC,EAAOC,GACnB,MAAO,UAASV,GACd,GAAIA,GAAK,EACP,MAAO,EAET,IAAIW,GAAW,EAAIF,CAEnB,OADAT,IAAKU,EAAMC,EACJX,EAAIA,EAAIW,GAmBnB,QAASC,GAAiBC,GACnBC,IACHA,EAAmBC,SAASC,cAAc,OAAOC,OAEnDH,EAAiBI,wBAA0B,GAC3CJ,EAAiBI,wBAA0BL,CAC3C,IAAIM,GAAkBL,EAAiBI,uBAEvC,IAAuB,IAAnBC,GAAyB3C,IAC3B,KAAM,IAAI4C,WAAUP,EAAS,mCAG/B,IAAIQ,GAAYC,EAAcC,KAAKJ,EACnC,IAAIE,EACF,MAAO1B,GAAM6B,MAAM5D,KAAMyD,EAAUI,MAAM,GAAGC,IAAIC,QAElD,IAAIC,GAAWC,EAAON,KAAKJ,EAC3B,IAAIS,EACF,MAAOpB,GAAKmB,OAAOC,EAAS,KAAM1B,MAAS4B,EAAOC,OAAUC,EAAQ7B,IAAO8B,GAAKL,EAAS,IAE3F,IAAIM,GAASC,EAAQhB,EACrB,OAAIe,GACKA,EAEF3D,EAGT,QAAS6D,GAAwBvD,GAC/B,MAAOyB,MAAKC,IAAI8B,EAAiBxD,GAAUA,EAAOyD,cAGpD,QAASD,GAAiBxD,GACxB,MAAOA,GAAOE,SAAWF,EAAO0D,WAQlC,QAASC,GAAeC,EAAgBC,EAAW7D,GACjD,MAAiB,OAAb6D,EACKC,EAELD,EAAY7D,EAAO+D,MACdC,EAELH,GAAa7D,EAAO+D,MAAQH,EACvBK,EAEFC,EAGT,QAASC,GAAoBP,EAAgBQ,EAAUP,EAAWQ,EAAON,GACvE,OAAQM,GACN,IAAKL,GACH,MAAgB,aAAZI,GAAuC,QAAZA,EACtB,EACF,IACT,KAAKF,GACH,MAAOL,GAAYE,CACrB,KAAKE,GACH,MAAgB,YAAZG,GAAsC,QAAZA,EACrBR,EACF,IACT,KAAKE,GACH,MAAO,OAIb,QAASQ,GAA0BV,EAAgBW,EAAYC,EAAaxE,GAC1E,OAAQA,EAAOyD,aAAe,EAAIc,EAAaX,EAAiBW,GAAcvE,EAAOyD,aAAee,EAGtG,QAASC,GAAuBC,EAAmBlB,EAAkBmB,EAAkBH,EAAaxE,GAClG,MAAI2E,KAAqBC,EAAAA,GAAYD,MAAsBC,EAAAA,IAAaD,EAAmBH,GAAehB,GAAoBxD,EAAO0D,aAAgB1D,EAAO0D,WAAa1D,EAAO6E,gBAAkB,GAAK,EAC9LH,EAGFC,EAAmBD,EAG5B,QAASI,GAA0BJ,EAAmBK,EAAeJ,EAAkB3E,GACrF,MAAyB,KAArB2E,EACK,EAELI,GAAiBL,EACZ1E,EAAO6E,eAAiB7E,EAAO0D,WAAa,EAE9CjC,KAAKuD,MAAML,EAAmBD,GAGvC,QAASO,GAAyBC,EAAkBR,EAAmBK,EAAe/E,GACpF,GAAImF,GAAwBD,EAAmB,GAAK,EAChDE,EAAiD,UAApBpF,EAAOqF,WAAyBrF,EAAOqF,YAAcF,EAAwB,oBAAsB,aAChIG,EAAeF,EAA6BL,EAAgBL,EAAoBK,EAChFQ,EAAeD,EAAeZ,CAClC,OAAOA,GAAoB1E,EAAOP,gBAAgB8F,GAGpD,QAASC,GAAsB5B,EAAgBC,EAAW7D,GACxD,GAAIqE,GAAQV,EAAeC,EAAgBC,EAAW7D,GAClDuE,EAAaJ,EAAoBP,EAAgB5D,EAAOC,KAAM4D,EAAWQ,EAAOrE,EAAO+D,MAC3F,IAAmB,OAAfQ,EACF,MAAO,KACT,IAAuB,IAAnBX,EACF,MAAOS,KAAUL,EAAc,EAAI,CACrC,IAAIQ,GAAcxE,EAAO6E,eAAiB7E,EAAOE,SAC7CyE,EAAmBL,EAA0BV,EAAgBW,EAAYC,EAAaxE,GACtF+E,EAAgBN,EAAuBzE,EAAOE,SAAUsD,EAAiBxD,GAAS2E,EAAkBH,EAAaxE,GACjHkF,EAAmBJ,EAA0B9E,EAAOE,SAAU6E,EAAeJ,EAAkB3E,EACnG,OAAOiF,GAAyBC,EAAkBlF,EAAOE,SAAU6E,EAAe/E,GAAUA,EAAOE,SAjUrG,GAAIO,GAAQ,+BAA+BgF,MAAM,KAC7C9E,EAAa,sCAAsC8E,MAAM,KACzD/F,EAAS,SAASyB,GAAK,MAAOA,GA8BlCrC,GAAsB4G,WACpBC,WAAY,SAASC,EAAQC,GAC3B9G,KAAK,IAAM6G,GAAUC,EACjB9G,KAAK+G,UACP/G,KAAK+G,QAAQC,aAAaH,GAAUC,EACpC9G,KAAK+G,QAAQE,QAAUxH,EAAOqC,qBAAqB9B,KAAK+G,QAAQC,cAChEhH,KAAK+G,QAAQlC,eAAiBpF,EAAO+E,wBAAwBxE,KAAK+G,QAAQE,SACtEjH,KAAK+G,QAAQG,YACflH,KAAK+G,QAAQG,WAAWC,gCAI9BzC,GAAIA,gBACF,MAAO1E,MAAKO,eAEdyE,GAAIA,OAAM8B,GACR9G,KAAK4G,WAAW,QAASE,IAE3B9B,GAAIA,SACF,MAAOhF,MAAKC,QAEdmH,GAAIA,UAASN,GACX9G,KAAK4G,WAAW,WAAYE,IAE9BM,GAAIA,YACF,MAAOpH,MAAKE,WAEdgB,GAAIA,MAAK4F,GACP9G,KAAK4G,WAAW,OAAQE,IAE1B5F,GAAIA,QACF,MAAOlB,MAAKG,OAEd2F,GAAIA,gBAAegB,GACjB,IAAK1F,MAAM0F,IAAkB,EAARA,IAAclG,IACjC,KAAM,IAAI4C,WAAU,2DAA6DvC,OAAO6E,eAE1F9F,MAAK4G,WAAW,iBAAkBE,IAEpChB,GAAIA,kBACF,MAAO9F,MAAKI,iBAEde,GAAIA,UAAS2F,GACX,GAAa,QAATA,IAAoB1F,MAAM0F,IAAkB,EAARA,IAAclG,IACpD,KAAM,IAAI4C,WAAU,oDAAsDsD,EAE5E9G,MAAK4G,WAAW,WAAYE,IAE9B3F,GAAIA,YACF,MAAOnB,MAAKM,WAEdgG,GAAIA,WAAUQ,GACZ9G,KAAK4G,WAAW,YAAaE,IAE/BR,GAAIA,aACF,MAAOtG,MAAKQ,YAEdyC,GAAIA,QAAO6D,GACT9G,KAAKU,gBAAkBsC,EAAiB8D,GACxC9G,KAAK4G,WAAW,SAAUE,IAE5B7D,GAAIA,UACF,MAAOjD,MAAKS,SAEdkE,GAAIA,YAAWmC,GACb,IAAK1F,MAAM0F,IAAkB,EAARA,IAAclG,IACjC,KAAM,IAAI4C,WAAU,8CAAgDsD,EAEtE9G,MAAK4G,WAAW,aAAcE,IAEhCnC,GAAIA,cACF,MAAO3E,MAAKK,aA6EhB,IAAI6D,GAAQ,EACRE,EAAS,GACTC,EAAM,EAaNE,GACF8C,KAAQtF,EAAM,IAAM,GAAK,IAAM,GAC/BuF,UAAWvF,EAAM,IAAM,EAAG,EAAG,GAC7BwF,WAAYxF,EAAM,EAAG,EAAG,IAAM,GAC9ByF,cAAezF,EAAM,IAAM,EAAG,IAAM,GACpC0F,aAAc7E,EAAK,EAAGsB,GACtBwD,cAAe9E,EAAK,EAAGwB,GACvBuD,WAAY/E,EAAK,EAAGyB,IAGlBnB,EAAmB,KACnB0E,EAAe,qCACflE,EAAgB,GAAImE,QAAO,kBAAoBD,EAAe,IAAMA,EAAe,IAAMA,EAAe,IAAMA,EAAe,OAC7H3D,EAAS,gDAqCTc,EAAY,EACZE,EAAc,EACdC,EAAa,EACbC,EAAc,CA4ElB1F,GAAOE,iBAAmBA,EAC1BF,EAAOqB,WAAaA,EACpBrB,EAAOoC,sBAAwBA,EAC/BpC,EAAOqC,qBAAuBA,EAC9BrC,EAAO+E,wBAA0BA,EACjC/E,EAAOgH,sBAAwBA,EAC/BhH,EAAOmF,eAAiBA,EACxBnF,EAAOuD,iBAAmBA,GAkBzB3D,EAAqBG,GC/VxB,SAAUC,EAAQC,GAmIhB,QAASoI,GAAUrG,EAAUqF,GAC3B,MAAIrF,KAAYsG,GACPA,EAAQtG,GAAUqF,IAAUA,EAE9BA,EAIT,QAASkB,GAA4BvG,EAAUqF,EAAOmB,GACpD,GAAIC,GAAiBC,EAAoB1G,EACzC,IAAIyG,EAAgB,CAClBE,EAAsB/E,MAAM5B,GAAYqF,CACxC,KAAK,GAAIuB,KAAKH,GAAgB,CAC5B,GAAII,GAAeJ,EAAeG,GAC9BE,EAAgBH,EAAsB/E,MAAMiF,EAChDL,GAAOK,GAAgBR,EAAUQ,EAAcC,QAGjDN,GAAOxG,GAAYqG,EAAUrG,EAAUqF,GAI3C,QAAS0B,GAAmBC,GAC1B,GAAIC,KAEJ,KAAK,GAAIjH,KAAYgH,GACnB,KAAIhH,KAAa,SAAU,SAAU,cAArC,CAIA,GAAIkH,GAASF,EAAYhH,EACpBmH,OAAMC,QAAQF,KACjBA,GAAUA,GAKZ,KAAK,GAFDG,GACAC,EAAeJ,EAAOK,OACjBX,EAAI,EAAOU,EAAJV,EAAkBA,IAChCS,KAEI,UAAYL,GACdK,EAASG,OAASR,EAAYQ,OACL,GAAhBF,EACTD,EAASG,OAAS,EAElBH,EAASG,OAASZ,GAAKU,EAAe,GAGpC,UAAYN,KACdK,EAAS7F,OAASwF,EAAYxF,QAG5B,aAAewF,KACjBK,EAASI,UAAYT,EAAYS,WAGnCJ,EAASrH,GAAYkH,EAAON,GAE5BK,EAAsBS,KAAKL,GAK/B,MADAJ,GAAsBU,KAAK,SAASpH,EAAGC,GAAK,MAAOD,GAAEiH,OAAShH,EAAEgH,SACzDP,EAGT,QAASW,GAAmBZ,GA+D1B,QAASa,KACP,GAAIN,GAASO,EAAUP,MACa,OAAhCO,EAAUP,EAAS,GAAGC,SACxBM,EAAUP,EAAS,GAAGC,OAAS,GAC7BD,EAAS,GAA4B,MAAvBO,EAAU,GAAGN,SAC7BM,EAAU,GAAGN,OAAS,EAIxB,KAAK,GAFDO,GAAgB,EAChBC,EAAiBF,EAAU,GAAGN,OACzBZ,EAAI,EAAOW,EAAJX,EAAYA,IAAK,CAC/B,GAAIY,GAASM,EAAUlB,GAAGY,MAC1B,IAAc,MAAVA,EAAgB,CAClB,IAAK,GAAIS,GAAI,EAAOrB,EAAImB,EAARE,EAAuBA,IACrCH,EAAUC,EAAgBE,GAAGT,OAASQ,GAAkBR,EAASQ,GAAkBC,GAAKrB,EAAImB,EAC9FA,GAAgBnB,EAChBoB,EAAiBR,IA7EvB,GAAmB,MAAfR,EACF,QAGEkB,QAAOC,QAAUA,OAAOC,UAAYjB,MAAMjC,UAAUmD,MAAQrB,EAAYmB,OAAOC,YAEjFpB,EAAcG,MAAMkB,KAAKrB,IAGtBG,MAAMC,QAAQJ,KACjBA,EAAcD,EAAmBC,GAgCnC,KAAK,GA7BDc,GAAYd,EAAY3E,IAAI,SAASiG,GACvC,GAAIjB,KACJ,KAAK,GAAIjC,KAAUkD,GAAkB,CACnC,GAAIC,GAAcD,EAAiBlD,EACnC,IAAc,UAAVA,GACF,GAAmB,MAAfmD,IACFA,EAAcjG,OAAOiG,IAChBC,SAASD,IACZ,KAAM,IAAIxG,WAAU,yCAEnB,CAAA,GAAc,aAAVqD,EACT,MACEqD,KAAMC,aAAaC,kBACnBC,KAAM,oBACNC,QAAS,mCAGXN,GAAc,GAAKA,EAErBhC,EAA4BnB,EAAQmD,EAAalB,GAInD,MAFuBzH,SAAnByH,EAASG,SACXH,EAASG,OAAS,MACbH,IAGLyB,GAAAA,EAEAd,IAAkB5D,EAAAA,GACbwC,EAAI,EAAGA,EAAIkB,EAAUP,OAAQX,IAAK,CACzC,GAAIY,GAASM,EAAUlB,GAAGY,MAC1B,IAAc,MAAVA,EAAgB,CAClB,GAAaQ,EAATR,EACF,MACEuB,KAAML,aAAaM,yBACnBJ,KAAM,2BACNC,QAAS,uEAGbb,GAAiBR,MAEjBsB,IAAAA,EA8BJ,MA1BAhB,GAAYA,EAAUmB,OAAO,SAAS5B,GACpC,MAAOA,GAASG,QAAU,GAAKH,EAASG,QAAU,IAsB/CsB,GACHjB,IAEKC,EAzRT,GAAIpB,IACFwC,YACE,kBACA,qBACA,iBACA,mBACA,uBACA,mBACA,iBACA,mBAEFC,QACE,iBACA,iBACA,iBACA,mBACA,mBACA,mBACA,oBACA,oBACA,oBACA,kBACA,kBACA,mBAEFC,cACE,oBACA,oBACA,qBAEFC,aACE,iBACA,mBACA,oBACA,mBAEFC,YACE,kBACA,kBACA,mBAEFC,cACE,sBACA,uBACA,0BACA,0BAEFC,aACE,mBACA,mBACA,oBAEFC,WACE,iBACA,iBACA,kBAEFC,aACE,iBACA,mBACA,oBACA,mBAEFC,MACE,WACA,aACA,aAEFC,MACE,aACA,WACA,YACA,cACA,aACA,cAEFC,QACE,YACA,cACA,eACA,cAEFC,SACE,eACA,eACA,gBAEFC,SACE,aACA,eACA,gBACA,gBAIApD,EAAwBjF,SAASsI,gBAAgB,+BAAgC,OAEjFC,GACFC,KAAM,MACNC,OAAQ,MACRC,MAAO,OAGL9D,GACF+D,kBAAmBJ,EACnBK,gBAAiBL,EACjBM,iBAAkBN,EAClBO,eAAgBP,EAChBQ,UACEC,WAAY,MACZC,UAAW,MACXC,MAAS,MACTT,OAAU,OACVU,MAAS,OACTC,UAAW,OACXC,WAAY,QAEdC,YACEC,OAAQ,MACRC,KAAM,OAERC,aAAclB,EACdmB,YACEC,KAAM,2BAERC,WACED,KAAM,+BA8JVrN,GAAO+I,mBAAqBA,EAC5B/I,EAAO4J,mBAAqBA,GAM3BhK,EAAqBG,GCpSxB,SAAUC,GAER,GAAIuN,KAEJvN,GAAOoB,aAAe,SAASoM,EAASC,EAAMC,EAAQC,GAKpD,GAAIC,GAAUD,EAAS,MAAQ,KAC3BE,EAAQ,GAAIC,MACZC,EAAS,GAAID,MAAKL,EAGtB,OAFAM,GAAOC,SAASD,EAAOE,WAAa,GAExBF,EAARF,GACIL,IAAWD,IACfW,QAAQC,KAAK,mBAAqBX,EAAU,IAAMI,EAAU,wCAA0CG,EAAOK,eAAiB,KAAOV,GAEvIH,EAASC,IAAAA,GAAW,IACb,GAMXxN,EAAOqO,WAAa,SAASb,EAASC,EAAMC,EAAQC,GAClD,GAAIC,GAAUD,EAAS,MAAQ,IAC/B,IAAI3N,EAAOoB,aAAaoM,EAASC,EAAMC,EAAQC,GAC7C,KAAM,IAAIW,OAAMd,EAAU,IAAMI,EAAU,yBAA2BF,KAIxE9N,wmrBChCH8J,KAAU1J,GAAQuO,EAAOtO,KA2BvBuO,GAAA,MAASC,GAAAA,oBAAAA,EAAmC3E,EAG1C4E,EAFIC,GAAAA,GAAAA,GAEK/F,EACPgG,KAAK,KAAIxH,EAAU0C,KAAUlB,GACbiG,qBAAsBC,EAAsBC,GAAV3H,aAC1C4H,iBAAAA,GACMlF,SAAaN,EACrBhG,GAAQsG,QAAUlB,GACXkB,GAAAA,MAAUlB,GAAGxB,QAEtBuH,GAAAA,QAAAA,OAAAA,IAAAA,QAAAA,GAA+BvH,EAAUuH,EAAAA,GAAAA,MAAAA,MAAAA,IAAAA,EAAAA,KAA+BvH,IAAAA,EAAAA,IACxEuH,QAAAA,GAAAA,GAA+BvH,MAAAA,2BAAa4H,KAAAA,GAKzCC,OAAAA,GAAaN,OAAAA,QAAAA,GAAAA,EAChBO,GAAQP,OAAAA,EAAAA,EAAAA,GAA+BM,QAC3CE,GAAID,EAAS1F,GAAiD,MAAlC0F,IAAMA,EAAM3F,EACtC,EAAA,EACEkB,GAAAA,EAAMC,GAAAA,OAAaC,QAAAA,GACbyE,EAAAC,GACNxE,OAASuE,EAAAC,EAAA,SAAA1M,GAAA,MAAAM,MAIfqM,MAAOX,EAAAA,EAAAA,EAAAA,EAAAA,MAAAA,QAAAA,GAIAY,EAAAA,GAAAA,MAAmBZ,UAAAA,EAAAA,GAAAA,OAAAA,EACtBa,EAAAA,SAAAA,GACJ,MAASP,GAAaN,EAAAA,EAAAA,EAAAA,OAAAA,QAEpBW,GAAKF,EADDtF,GAAY6E,OAAAA,EAAAA,EAAAA,KAAAA,OAAAA,EAA+BM,MACtCrG,EAAWkB,EAAAA,qBACd2F,EAAY3F,EACZ4F,EAAAA,EAAAA,IAAU5F,qBACV6F,gBAAa7F,EAAUlB,qBACZkB,EAAiBzC,EACnByC,EAAUlB,IAAGpF,UACtBiM,0BACEC,EACFC,qBAEAC,EAAWD,GAGfH,YAAe9F,gBACF+F,EACXC,qBACAlM,EAAeD,GAA0BC,UAAS,WAClDxB,EAAUiN,qBACKV,EAAMsB,GAAAA,YAAsBZ,EAAAA,YAAuBW,EAOxErB,EAHAiB,aAAAA,EAAoBjB,EAASuB,eAAAA,GAAmBC,EACvCD,GAAkBL,SAAYM,EAAAA,GAAmBN,QAAAA,GAEnDD,EAAAA,GArFTjB,MAAMyB,WAAAA,GAAqB,WAAShH,GAAAA,EAAAA,EAClC,SAAIc,GAAAA,MAAY9J,IAAO4J,EAAAA,EAAAA,GAAAA,EAAAA,EAAmBZ,YAAAA,OACtC2F,EAAAA,qBAAiCF,OAAAA,GAAAA,gBAAAA,GACjCe,SAAAA,EAAiBD,GAAAA,QAAmBZ,GAAAA,GAAAA,EAAAA,EACxCsB,OAAOC,EAASC,UAAQC;AACtBF,EAAIE,UACFZ,CAAAA,IAAAA,GAA+Ba,EAC7BC,SAAQF,IAAAA,EAA4CE,UAA3BD,OAAcZ,EAAAA,UAC/BW,EAAiBC,GACjBD,EAAYC,UAAAA,CAAcZ,EAAAA,SAAaW,EAAAA,EAAYC,EAAAA,EAAAA,IAAAA,GAAcX,EACxE3N,aAAiBsO,EAAAA,EAAAA,EAAAA,GAAAA,IAAAA,GACdE,UAAAA,EAAiBH,EAAAA,EAAAA,EAAAA,IAAWC,GAAAA,EAAcZ,GAAAA,GAC1Ce,QAAAA,EAAgBH,GAAAA,EAAcX,EAAUW,GAAAA,EAAAA,EACxCI,GAAAA,EAAAA,IAAmC,QAAjBD,GAAyBH,EAAAA,GAAc7M,OAAO+M,EAAAA,EAAAA,SAAiBC,GAAAA,QACrFjC,GAAMpK,GAAMgM,MAAQE,MAAAA,IAAAA,EAAAA,KAAcrO,IAAAA,IAAUqO,IAAAA,GAAAA,EAAAA,GAAAA,IAAcA,GAAAA,GAAAA,EAAAA,EAAAA,EAAcI,IAAAA,EAAAA,GAAAA,KAAAA,MAAAA,EAG1E9N,EAAKiG,GAAI5G,EAAAA,IAAAA,OAAY2M,GAAAA,GAAAA,EAAAA,eAAAA,EACH+B,MAAA,EAAZ1O,EAAAA,EAAAA,KAAAA,QAAoCW,EAAAgO,KAAZ3O,KAAAA,MAAoC,GAAA4O,GAAZ5O,SAClDuM,gBAAY4B,+BA2ErBvQ,SAAqBC,GAAAA,MAAgBE,EAAAA,OAAAA,CAAAA,IChGxCmQ,GAAUlQ,EAAQuO,WAAOtO,KAIvBsO,GAASsC,qBACPC,EAAO9O,GAAiB,mBAAqBS,sBAClCsO,oBAIJC,qBAA2BC,mBAClCC,QAAAA,gBAAiBlP,0BAA6BA,EAC9CkP,aAAAA,EAAiBlP,qBAAwBiP,KAAAA,KAE3CH,GAASjC,EAAAA,YAAqBsC,GAAgBC,EAC5CrR,GAA+BwJ,SAAQX,EACjC5G,GAAAA,QAAWoP,GAEfJ,EAAmBG,GAAQF,GAAAA,EAAQJ,EAAY7O,OAAAA,cA2D1C6N,KAAAA,GAAAA,KAAAA,OAAsB7N,IAAgBqN,EAAAA,OACzCgC,GAAAA,EAAAA,IAAAA,gBACIC,KAAKtP,GAAAA,CAAAA,EAAchC,EAAOoB,QAAa,UAAA,IAAA,IAAAmQ,KAA6BC,GAAcA,EAAAC,QAAAC,EAA0B,SAClHL,GAAaR,MAAAA,GAAY7O,GAEf,KAAA,IAARoN,GAA8B,KAAA,GAATC,GACnBD,KAAAA,EACKuC,OAAAA,IAAcN,EAAAA,EACVI,QAATpC,oBACMsC,KAAAA,QAAcN,GAAAA,QAGrB,IADDO,EAAmBvC,KAAAA,KAAa6B,QAAAA,YAAiBG,KAAAA,QACrCO,MAAAA,IAAgBA,GAASrI,UACvC,eAAiBqI,YAAY,cACzBC,EAAAA,EAAAA,EAAcD,EAAYrI,QAAG8F,EACdzN,GAAfkQ,KAAAA,IAA4ClQ,EAAhBiQ,EAC1BE,QAAAA,EAAoBH,GAAAA,MAAShJ,EAAAA,GAAGA,GAAGkJ,IAAAA,KAAYD,EAAAA,CAAAA,IACnD,GAAIE,KAAAA,GACEC,CAAAA,GAAAA,GAAeC,KAAAA,EAAAA,QAAoB,GAAA7J,QAAM2J,IAAAA,EAAAA,KAC7C,IAAAN,QAAO,GAASS,QACdC,EACmB9C,KAAAA,MACZ2C,KAAOE,SAKf3D,GAAM0D,MAAAA,GAA2BG,GAAA5J,EAAS6J,MACxCA,KAAejD,QAvGtB8B,GAmBErC,EAAAA,GAAAA,MAAuBA,GAAAA,EAE7BQ,GAAIsC,GAAAA,QACFW,GAAiBlD,EAAAC,EAAAkD,GACjBC,GAAAA,GAAoBC,IACpBC,KAAAA,IAAAA,GAAmBD,EAAA/I,KAAA0I,EACnBO,KAAAA,IAAAA,GAAAA,EAAwBzQ,QACxB0Q,GAAAA,GAAAA,EAAAA,KAAyBR,EACzB/F,OAAAA,GAAAA,EAAmBhI,IAAA,SACnBwO,GAAAA,MAAiBzD,GAAAgD,IACjB9F,IAAAA,EAAAA,EAAiBjI,IACjByO,SAAAA,GAAAA,MAAkBzD,GAAA+C,IAClB7F,KAAAA,EAAAA,EAAkB,SAElBwG,GAAAA,GAAevK,GACfwK,EAAAA,IAAgB,SAAA3L,EAChB4L,GAAAA,MAAAA,IAAAA,EAAqB1J,QACrB2J,IAAAA,EAAsBjQ,KACtBuJ,IAAAA,EAAAA,IAAAA,EAAgB2G,eAEhBC,GAAMX,EAAA7J,KAAA+H,KAAA,MAAA,OACN0C,GAAO9J,OACPkD,EAAAA,QAAUjE,EACVwE,IAAAA,IACAsG,GAAAA,GACAlE,iDAGAmE,EAAAA,EACAC,KAAY,KACZC,GAAAA,QAAaC,EACbC,MAAWC,EAEXC,EAAUjF,KACVkF,KAAAA,GAAW1L,QACX2L,EACAC,KAAAA,MAASC,EACTC,EACAC,KAAAA,KAAAA,qBACc5F,GACd6F,YAAAA,EACAC,EAAAA,qBACcT,EACFrF,EACZc,uBACYd,EACZnB,qBAAYwB,KAAA,KAAAgF,GAEZU,EACAC,WAAAA,EACAC,EAAAA,gBACAC,CACAC,IAAaC,GACbC,EAAQC,qBAkCJhF,KAAAA,KAAAA,GAAwBA,EAE7BjQ,EAAAA,gBAAqBC,KAAAA,OAAgBE,EAAAA,KC9GxC+U,EAAkBvG,EAAOtO,gBAEd8U,KAAAA,OAAWvT,EAEd4D,KAAAA,GAAiBpF,oBAAO+E,CACxBiQ,IAAAA,GAAsB3P,SACjBrF,GAAAA,GAAOgH,GAAAA,EAAsB5B,EAAgBC,OAAAA,IAAW7D,IAOjEgH,EALAwM,GAAAA,EAAAA,GAAWC,QAAAA,EAAgC7P,EAAAA,oBAC3C4P,KAAAA,OAAWE,EAAsB7P,KAC3BQ,EAA8BT,EAAAA,oBAA2B5D,KAC7D,OAAOqE,EAAyBA,IAAUL,GAAAA,yBAKxC2P,EAA0BhF,EAAQnH,qBAAa7I,EAG/C4G,GAFwB/G,oBAAOqC,EAAqBlC,qBACpDqP,EAAuBQ,GAEvBoF,sBAEF5F,qBAAeW,oBAgBjB,qBAbekF,mBAAmBhQ,aAChC0B,YAAAA,SAAeiO,cACS,aAAjBjO,YAETqO,gBAAeE,UAAS/G,EACtBiB,qBAAuBoE,EAEV2B,GAAiB,4BACvBpF,6BAETiF,yBAA4BJ,0BAC5BI,SAAeH,OAAAA,iBAA4BA,gBAC3CG,cAAqBI,eACdJ,aAGHK,aAAa,YACjB,iBAAiB,iBAEbC,eACQ,gBAGZC,cAAWN,cACT,QAAO,eAEEJ,cAAiB,MAC5BU,iBAAWT,kBACTrV,EAES0V,GAAiB,SAC1BhH,EAEKoH,GAAAA,QAQR/V,GAAqBC,GAAgBE,MAAAA,GAAAA,uBClEvBE,IAsBfsO,EAASqH,aAAAA,QAAkBC,GAAQ7T,QAAU8T,GAC3CA,GAAWC,GAAAA,GAAAA,EACXD,aAAWE,EAAAA,OACXnU,EAAOoU,aAAAA,KAAeJ,KAAQ7T,UAAU8T,EAAAA,OAG1CvH,EAAS2H,aAAAA,KAAAA,KAAAA,QAA4BC,EAOnC5V,gBAAK6V,KAAkB1S,KAAAA,EAAyB,MAAA6K,EAAA8H,OAAA9H,EAAgC+H,aAChF/V,KAAKgW,KAASJ,SAAQvS,EACtBrD,OAAKiW,IACLjW,GAAKkW,EAAAA,GAAAA,OAAAA,EAGL,GAAK,OAAW7N,QAAS2N,GAAe3N,EAClC5G,GAAAA,MAAWzB,QAAKgW,GACpBhW,QAAK6V,IAAAA,GAAAA,EAAgBpU,SAAYzB,GAAAA,GAAKgW,GAAOvU,EAAAA,EAE/CzB,CAAKmW,IAAAA,QAAAA,EA+FP,MAASC,MAAAA,IAAAA,GAAAA,EAAqBR,gBACxBA,EAAQS,EAAAA,OAAAA,GAAAA,GAGZC,EAAIC,MAAAA,EAAgBC,gBAAIb,EAAAA,GAAAA,QAA4BC,GACpD3N,GACEoN,MAAAA,QAAkBO,EAAS,IAAA,GAAWa,GAAKzI,EAAa0I,2BACjDC,KAGPf,KAAAA,EAAQvS,EAAa,KAAS5B,GAAUqF,SACtC8O,EAAQvS,EAAM5B,WAAYqF,EAEpBzD,EAAM0R,qBAAkBtT,EAC9BmU,GAAcnU,UAKlBmU,EAAQS,GAA6BT,SAAQvS,EA7J/C3D,GAAIkX,QAAAA,GACFC,GACA7N,MACA8N,UAAAA,GAGEC,GAAAA,GAAAA,CACFC,OAAAA,GAAAA,IAAAA,SACAC,GAAAA,MAAAA,KAAqBN,EACrBO,EAAAA,KAAAA,KACAC,QACAC,GAAAA,GAAAA,MAAgBhV,GAChBiV,QAAAA,GAGEC,GAAAA,GAAAA,EACFF,EAAAA,cACAC,OA6BF1B,QAAAA,EAAAA,QAAAA,KAA4BhP,GAAAA,GAC1BkQ,EACE,uBAAYhB,KAAgBgB,EAElBU,EAAAA,EAEVC,EADIC,KAAAA,IACS,CAAA,GAAOzX,EAAK6V,OAAAA,EAAgB7M,MACvCyO,GAAAA,EAAmBzX,MAAK6V,EAAAA,GAAAA,MAAgBxN,IAE1CrI,GAAK6V,EAAAA,GAAgBgB,EACrB7W,EACA0X,EAAgBrP,KAAIrI,EAAK6V,MAAgB7M,IAAAA,GACvCyO,EAAAA,GAAAA,MAAAA,KAAmBzX,EAAK6V,EAAgBxN,EAAM,IAEhDsP,EAASlW,OAAAA,EAAYgW,OAAAA,MAAAA,KACdzX,GAAKkW,MAAAA,EAAAA,EAAAA,EAAoBzU,EAAAA,OACvBuU,IAAAA,CAAAA,GAAOqB,GAAY5V,EAAAA,EAAUzB,GAAAA,EAAK6V,EAAAA,EAAAA,IAAgBqB,EAAAA,GAAiBzV,EAAAA,SAAAA,GAI9EuH,MAAIA,KACF4O,EAAAlI,OAAO1P,EAAK6V,EAAAA,WAAgB7M,IAAAA,EAE9B8N,EAAIA,YACFe,EAAA7J,EAAOhO,qBAGTmW,EAAAA,EAAAA,aAAgBjM,EACdsG,eAAYyF,IAAUjW,EAAK6V,EAAAA,EAAAA,EAAgB7M,GAAAA,EAAAA,GACzC1H,GAAOoU,SAAAA,EAAqB1V,MAAKiW,GAC/BR,KAAAA,GACAD,GAAAA,EACAiB,MAAK9E,EAAA+F,EACHvV,EAAA2V,IAAoBN,EAAY3B,WAAAA,EAAgBkC,OAC/C/X,MAAKiW,IAEVjW,QAAKiW,GAEKA,GAAUjW,MAAK6V,GAAAA,QAAAA,GAAgB7M,QACzChJ,UAAKiW,IAAAA,QACEP,GAAe1V,EAAMA,GAAKiW,GAAAA,EAC/BR,oBACAD,EAAAA,CAAY3G,EACZ/H,kBAIAgI,CAAA,IAASrN,GAAUqF,EACvB9G,wBAAwB8G,GACxB9G,GAAKkW,EAAAA,oBAAoBzU,EAAY,CAAAqN,EAEvCiG,kBAAiBtT,CACfzB,IAAKgW,GAAOvU,EAAAA,wBAAiCA,GAAAA,MACtCzB,OAAKkW,EAAAA,IAAAA,MAAAA,EAAoBzU,MAKpC,KAASuW,GAAAA,SAAUjB,GAAAA,MAAAA,GACjBpB,EAAAA,GAAAA,EAAAA,EAAAA,GAAAA,KAAAA,EAA4BhP,GAAAA,KAAUqR,GAAAA,EAAoBA,GAAAA,KAAQC,IAAAA,EAAAA,EACzD,SACLC,GAAIjQ,GAAAA,GAASjI,EAAK6V,KAAAA,EAAgBmC,GAAAA,GAAQpU,EAAWiS,GAAAA,GAAAA,EAAAA,IAAAA,EAAiBsC,EAAAA,cAClEF,EAAAA,GAAAA,EACGjY,GAAKkW,EAAAA,GAAAA,EAAAA,EAAAA,IAAoBiC,EAC5BnY,EAAKgW,IAAAA,GAA0BA,KAAAA,IAAQmC,OAAAA,MACpChC,QAEAlO,GAER+P,GAAQA,MAAUV,GAAAA,QAAAA,OAAAA,IAIvB,QAAS7V,GAAY0B,GAAAA,MAASiV,GAAAA,QAAgB/U,eACxC5B,MAAYmV,QAAAA,GAA+BG,EAAAA,GAAAA,GAG/CsB,GACEhD,EAAAA,0BAAkBM,EAAAA,GAA4BhP,CAAAA,KAAAA,EAAWlF,SACvDgV,EAAKzN,OACH,CAAA6F,EAAO7O,SAAK6V,GAAgBpU,EAAAA,EAAAA,EAE9B6W,KAAcxR,KAAAA,GACZ9G,GAAAA,EAAK6V,EAAAA,EAAAA,OAAAA,IAAgBpU,CAAAA,GAAAA,GAAYqF,EACjC9G,GAAAA,EAAKmW,EAAAA,EAAAA,GAAAA,EAAAA,EACKD,SAAAA,EAAoBzU,OAAAA,EAAAA,GAC5BzB,EAAAA,CAAKgW,GAAAA,MAAOvU,EAAAA,EAAYqF,EAAAA,EAAAA,IAG7BrF,SAyBLuM,GAAMpK,GAAAA,gBAAiBgS,GAASnU,MAAAA,EAC9B2U,IAAAA,KAAAA,KAAqBR,GAAAA,KACrBA,GAAQvS,EAAMkV,GAAKvK,CAAMwK,OAAa/W,QAAWqF,GAGnDkH,GAAuB4H,SAASnU,EAAAA,GAC1BmU,MAAAA,eAAQS,GAAAA,eACVT,IAAQvS,UAAM0R,GAAO/G,YAAMwK,KAAa/W,UAAAA,GAO3CnC,YAAgBE,IAAAA,KAAAA,KChLTwO,IACRrE,IAAO8O,EAAAA,QAAQ9R,EAAU+R,OAAU,CAAA,IAAAL,EAAsBM,MACnD1D,IAAKqB,GAITsC,EAHeD,EAAAA,EACb1D,IAAaA,EAERjH,IAAM6K,GAAe7K,EAAM4G,IAAAA,IAAAA,UAAqBnM,EAAAA,UAAsBwM,KAAAA,GAE9E3V,GAAAA,EAAAA,EAAAA,EAAAA,OCRH+I,IAAU2F,CAAAA,GAAAA,GAAOtO,EAEfmP,EAASiK,GAAAA,EAAAA,EAAYhP,EAAUzH,GAC7BsP,EAAoBoH,EAAAlK,EAAAxG,GAARyB,EAAAA,EAAmCgF,EAAAzG,GAAAlG,EAAN6W,EACxBC,EAEGC,GAARpP,EAAoCmP,EACvC5W,EAOT,IAAIyH,EAA0BoP,EACxBjL,GACgBnE,CAAAA,IAAKd,EAChB8P,MAAAA,IAAYhP,GAASkP,GAE9BnK,EAEFxG,KAAMyG,EAAAzG,IAAA8Q,GAAAhQ,KAAAmN,EAAA,IAAwCxM,EAGhDkE,KAAM0D,EAAAA,IAAAA,EAAgBvI,MAASW,UAAUsP,EAAAA,UACvC,CAAA,GAAOF,GAAS7W,EACP+W,EAAAA,MAAgBN,IAAAA,EAAsBzW,IAQhD/C,EAAgBE,IAAAA,EAAAA,IClCnB6Z,EAAUrL,GAyFR9D,EAAAmP,EAAejX,GAAQkX,EACd5W,EAAkBN,GAAGkX,GAG9BC,EAASC,EACP,GAAIC,OAAgBC,CAAAA,IAAIC,EACdxJ,KAAMsJ,EAEZD,IAAAA,EACYN,IACdM,EAAOG,GAKF,CAAA,IAHDC,EAAkBH,MACd/W,IAAAA,GAAakX,EAAkBC,EAASJ,EAAAA,IAEnCnD,EAAUjO,IACrBmR,GAAUG,EAAYjX,IAAKoX,IAAQF,UAASH,EAClCM,KAASC,OAGvB9P,EAAOsP,EA5GLS,GAAAA,EAAgBC,EACTC,GAAAA,GAEPZ,EADItR,EAA4B,GAAMsR,GAAc,IAAK,GAAMa,MACxC/R,KACEqB,KACE2Q,EAAAA,EACrBpS,EAAAA,EAAUyB,OAAW2Q,IAAKrY,CAAEqY,GAAG3Q,GAIrC,gBAGFqP,GAAcjZ,GACZkO,EACesM,aACAtM,EAANwI,gBAEMF,EAATiE,EACSxB,EAANrP,GACM6P,EAAN7P,GACL5J,GACAA,GAAEwW,EACS,GAATkE,EACA9Q,GAAG4M,EAGX,GAAS2D,EAAcQ,KAAAA,EAAkBC,IAAAA,EAAYC,KAAAA,GAC/CC,EAAoBzR,KAAKqR,GAAuBK,EAAQ1R,MAAMe,EAErD4Q,KACD,GAAKH,EAGjB,CAAA,GAAKI,GAAI1S,CAAcA,GACR2S,EACXJ,EAAgBH,EAAAA,OAAU/Q,EAAYA,EAIlC8P,SAAaA,GAAK,MAAQA,GAASQ,IAAIR,SAE3CyB,EAAAA,GAAc,GAAMC,GAAsBC,EAAMrX,IAAG,SAAcsX,EAErEH,GAAAA,MAAUJ,GAAYxS,GAAKgT,GAAIA,GAAQC,KACvCL,KAAAA,IAAa,OAAU7Y,UACvB6Y,EAAAA,GAAU,IAAG,IAAU7Y,EACvB6Y,MAAa,KAAKjS,SAAiBgR,EACnCiB,GAAAA,GAAU,YAAqB7Y,EAAQkZ,GACvCL,GAAAA,IAAAA,EAAmCjB,MACnCiB,KAAAA,OAAa,GAAU7Y,GAAIkZ,KAAQtB,GACnCiB,GAAAA,GAAAA,GAAaM,IAAUF,GAAIC,GACdV,QAAcxY,UAE3BwY,EAAAA,EAAAA,EAAST,EAAAA,EAAAA,EAAAA,EAASS,EAAAA,EAAAA,EAAAA,EAAQK,EAAAA,EAAAA,EAAAA,EAAAA,GAE1BhG,GAAIuG,UAAe,mBAAyBvG,GAAMwG,QAAW,KACzDf,SAAK,KACPc,SAAad,KAAKgB,SACTvB,KAAAA,UAAiBqB,QAGxBd,aACFc,KAAQG,OACRH,KAAQI,GAAKlB,EAAK/D,EAAA,IAClBiE,GAAST,QAAAA,IAASS,GAAQY,EAAAA,EAAAA,IAGxBd,GAAK/D,EACP6E,KAAKK,QACLL,IAAKI,GAAQlB,EAAAA,EAAAA,IACbE,GAAAA,EAAST,KAAAA,QAASS,IAAQY,GAG5B,EAAA,EAAK7E,KAAQmF,SAAUzT,MAChB4M,GAAIvL,MAAOA,KACdkR,KAAAA,GAAOvS,OAASsT,IAAMtT,KAI1BuT,GAAIG,EAAAA,KAAKnB,OACCA,IAAO,KAAOA,GAAAA,EAAUjE,KAAIiE,WAAcA,KAAAA,GAAUjE,EAAIiE,EAAAA,IAAO3F,GAAO2F,YAAU,IAEnFA,GAAOjE,EAAGqF,EAAAA,IAAOpB,GAAOjE,EAAIiE,KAAOqB,YAAW,IAEvDL,GAAO3B,EAAAA,EAAAA,IAAAA,GA0BTjM,EAAMiM,KAAAA,YAAgBA,IAAAA,GACtBjM,EAAAA,EAAMwL,KAAOA,aAEZla,MAAgBE,GAAAA,GAAAA,qBCnHTC,EAAeC,GAEhBwc,eAEP5c,EAAI6c,GAAkCC,SAAaC,GAAAA,QACjDrc,GAAK4P,GAASA,GACd5P,GAAKoc,OAAAA,EAAcA,OAAAA,OACnBpc,IAAKqc,IAAAA,GAAeA,EAAAA,KAAAA,EAEpBrc,MAAKkK,EAHckS,OAGPE,EACZtc,QAAKuc,GACLvc,GAAKwc,MAAAA,GACLxc,IAAKyc,KAAAA,MAAAA,EAAgB7M,KACrB5P,EAAK0c,EAAAA,MAAAA,IAAmB,IACxB1c,GAAK2c,MAAAA,EAAaC,SAAMC,MACxB7c,EAAK8c,OAAYvP,OAAKwP,GAGxB/O,QAAMgP,GAAYnO,EAAAC,GAAS9N,OACpBiU,EAAKnG,EACN9N,GAAUA,EAAOic,qBACFA,EAEnBjd,GAAKkd,iBAAyBhB,GAAAA,SACzBiB,GAAAA,QACLnd,GAAkBod,GACbC,GAAUpV,KACV1H,KAAAA,GAAAA,KACLP,GAAKsd,EAAAA,IACLtd,EAAKud,EAAAA,OAAgBtV,GAChBuV,QAAWC,GACXC,GAAAA,MACL1d,GAAK+G,aACL/G,qCAAsCiR,IACjC0M,EAAQC,uBACRC,GAGP7P,QAAMgP,GAAUrW,EACdmX,GAAAA,GAAc7V,GAAA+F,EAIRhO,gBAAoByd,EAAUrB,IAAAA,EAChCpc,IAAK+d,GAAAA,IAAY/d,EAAK+G,GAAAA,CAAQ+N,GAAAA,GAAQ7M,EAEjC8V,EAAAA,IAAAA,EAAY/d,GAAK+G,EAAQ+N,IAAAA,SAAasH,EAAAA,GAAAA,EAEnCkB,IAAAA,SAAAA,GAAgBtd,IAAK+d,EAAc/d,GAAAA,EAAKud,KAAAA,GAAAA,IAChDvd,EAAKsd,QAAAA,EACLtP,CAAAA,GAAM6K,aAASmF,KAAAA,EAAiBhe,KAAAA,aAGpCie,KAAAA,EAAkB,IAASC,CAAAA,GAAAA,GAASC,EAAAA,EAAAA,GAC9BD,GAAAA,EAAgBf,GAAAA,EAAAA,GAAAA,EAClBnd,GAAKmd,2BACIiB,KAAAA,EAAgBD,KAAAA,2BACHne,KAAKO,EAAAA,IAAAA,MAAoBP,GAAK0U,IAAAA,SAAiB2J,GAChEP,MAAAA,gBAGL1B,GACFiC,EAAIre,EAAcA,OAAK6d,QAAAA,GAEXV,GAAAA,GAEVf,GAAAA,EAAY8B,gBACdA,EACI9c,IAAM8c,EAAAA,IAEVlQ,EAAMsQ,CAAAA,IAAAA,GACDte,GAAKqd,EAA8B,GAAAf,IAAdiC,IAAAA,KAAAA,IACxBve,KAAKue,EAAAA,EAAAA,GAAkBC,EAAAA,EAAAA,EAAUpC,EAAAA,EAAAA,OAAc8B,IAAUle,CAAAA,GAAKO,GAAAA,EAAAA,EAEhEP,iBAAK6d,IAAsBY,EAClBtB,eAAgBe,KAEzBle,GAAKie,GAAAA,KAAAA,EAAiBC,MAAAA,EAAAA,OACtBlQ,EAAM0Q,IAAAA,EAAAA,OAAAA,GAAAA,GAERxP,EAAIA,GAAAA,EACFyP,GAAO3e,UAAKue,GAEVrP,MAAAA,IACFgP,EAAWA,EACDA,GAENle,EAAKqd,MAAAA,EAAgBM,MAAAA,GAEzB3d,KAAKue,EAAAA,GAAAA,EAAaL,IAClBle,GAAKie,GAAAA,OAAuBO,EAAAA,EAAUpC,KAAAA,QAAcpc,GAAmBA,GAAK0E,GAAAA,GAC5EsJ,EAAM0Q,gBAAAA,EAEJha,KACFuM,EAAOjR,OAAKO,IAAAA,IAEdmE,EAAIA,GAAAA,EAAaoC,GAAAA,OACXA,GAAAA,IAAcvG,MAAAA,IAAAA,GAGlBqe,QAAIC,IAAAA,IAAAA,OAAsBzC,IAAAA,KAAAA,KAC1Bpc,IAAKO,GAAAA,QAAAA,IAAgBuG,MACrB9G,EAAkBgO,EACI8Q,oBAAbC,KAA2C,KAAA/Q,EAAb+Q,gBAChCC,IAAAA,GAEe1Q,qBACpBtO,EAAKoc,KAAcyC,KAAAA,GAAAA,GAGnBT,qBACWT,EAAAA,qBAA+BsB,EAAU9B,KAAAA,KAAgBnd,GAAAA,GAAK0U,uBAC7C1U,EAAKmd,gBAAgB+B,EAEjDxK,EAAmByK,gBAAYpY,CAAQ2N,IAC3CqK,GACE/Q,EAAIhO,oBAEoBqO,KAAnBrO,KAAKue,EAA4BlB,KAAAA,GAAWrd,qBAA2BA,EAAK6d,GAE7E7d,sBAEAA,qBACKV,GAGX0f,SAAMhR,GACJhO,QAAKqd,GACIe,GAAAA,GAAAA,GAAoBT,EAAAA,aACtBR,UAAend,EAAKO,IAAAA,GAAgB6e,EAAQpf,GAAK0U,OAAAA,UACtD1U,OAAKue,EAAac,aAEf9B,EAAAA,OAAgBvP,EAChB2P,aACL3d,KAAK8d,OAAAA,QACL9P,EAEFsR,EAAOxJ,OAAA9H,EACAhO,aAAKoe,KAAgBpe,OAAKqd,QAAYrd,EAAK2d,gBACzCE,EAAAA,OAAAA,EAEP7d,aAAKue,KAAa,OACblB,SAAU+B,EAEjBG,IAAQ,IAAAC,GACFxf,EAAK2d,aAEJvB,WAAcpc,EAAKO,IAAAA,GAAoBP,EAAK0U,GAAAA,OAAiB,WAC7D6J,OAAave,EAAK0U,aAAAA,EAAsB0H,OAAAA,EAC7Cpc,aAAK6d,KAAAA,OAAsB,QACrBa,EAERe,EAAQ3J,OACD9V,EAAK+d,aAEV/d,KAAK+d,OAAAA,QACL/d,EAAK2d,gBACAJ,EAAAA,OACLvd,EAAKoc,aACLpc,KAAKue,OAAAA,SACLve,EAAK+G,IAAQ+N,IAAAA,GAGb9G,EAAM0Q,aAAAA,WAERgB,EAAS,OAAAC,IACFjb,EAAAA,IAAgB,WAChBsa,OAEPY,EAAAA,aAAkB5R,EAAS9D,OAAM2V,EACT9J,aAAA1H,KAAXwR,OAAAA,QAAiC7R,EAAR9D,SAClClK,EAAK0d,aAAgBvU,KAAK0W,OAAAA,6BAET,YAAeA,EACtBtL,oBAERwD,EAAQ/X,OAAK0d,EAAAA,aAAgB/b,KAAQke,OACrC9H,SAAS4H,EACNjC,KAAAA,OAAAA,QAAuB3F,GAEhC+H,EAAAA,GAAa,MAAAjR,GAASkR,KAAAA,EAChB/f,GAAKoe,UAAAA,EACP,GAAKpe,EAAKud,UAAAA,EACR1Z,MAAImc,GAAQlR,EAAIqN,MAAAA,IAAAA,UAAqBnc,EAAKmd,gBAAc4C,OACpD1O,EAAWrR,gBAAK0d,MAAgB1B,WAAYwB,EAAAA,GAAAA,EAAiBA,UAAAA,EACjEyC,MAAAA,GAAAA,EAAWpc,MACTwN,IAAAA,WAAS7P,EAAQ0e,yBACPC,OAAKH,EAAMpQ,gBAGvB5P,MAAKud,WAAAA,EAAgB,IAGvBvd,EAAAA,IAAKud,EAAAA,GAAAA,EAGT6C,UAAOvR,EAASwN,MAAAA,GAAAA,EAAcgE,MAAAA,IAAAA,WAClB1C,EAAAA,GAAU3d,EACK,MAAnBA,OAAKue,OACH8B,GAAAA,GACGnR,EAAYmN,qBAAoBc,KAAAA,KAAend,EAAK0E,sBAE5C0Z,EACVH,EAAkB5B,gBAAoBkC,KAAAA,OAAcve,EAIzDqgB,KAAAA,EACFrgB,EAAK6d,oBACL7d,KAAK8f,OAAAA,EAAYzD,gBAGrBiE,KAAIA,EACMtgB,EAAK+e,oBAAyB1Q,KAAGkS,OAAWC,EAAajD,IAAAA,GAQpEle,qBAAqBC,EAAAA,GAAgBE,mBC5NxCF,GAAyBI,SAqBvBsO,EAASyS,GAAAA,QAAAA,GACPpW,EAAIqW,GAAAA,EAAaC,QACjBA,IAAAA,QACIhP,SAAIkH,GAASuD,IACXvD,UAASuD,gBACP/Y,QACRqd,EAAWlf,GAAQof,KAASC,GAASA,KACrCC,GAAAA,aAAAA,kBAIF,gBAASC,EAAAA,mBAAiCC,0BACjCC,EAAAA,eAAc/D,sBAAiCA,EAAAA,qBAG/CgE,4BACFlD,EAELhe,aAAKoc,SAAczS,GAAOwX,MAAeA,GAAAA,IAAkBA,IAAYpE,EA8ChE+D,OCtFX,WAEE,GAA2Dzf,SAAvD8B,SAASC,cAAc,OAAOsV,YAAY0I,SAA9C,CAKE,GAAIrE,EACC,IAAIpT,OAAOwX,aAAeA,YAAYpE,IAC3C,GAAIA,GAAM,WAAa,MAAOoE,aAAYpE,WAE1C,IAAIA,GAAM,WAAa,MAAOxP,MAAKwP,MAGrC,IAAIsE,GAAuB,SAASzR,EAAQwM,EAAaC,GACvDrc,KAAK4P,OAASA,EACd5P,KAAKoc,YAAcA,EACnBpc,KAAKqc,aAAeA,EAEpBrc,KAAKkK,KAAO,SACZlK,KAAKuc,SAAAA,EACLvc,KAAKwc,YAAAA,EACLxc,KAAKyc,cAAgB7M,EACrB5P,KAAK0c,kBAAAA,EACL1c,KAAK2c,WAAaC,MAAMC,UACxB7c,KAAK8c,UAAYvP,KAAKwP,OAGpBuE,EAAyB3X,OAAO8O,QAAQ9R,UAAU+R,OACtD/O,QAAO8O,QAAQ9R,UAAU+R,QAAU,SAASjQ,EAAakQ,GACvD,GAAI4I,GAAYD,EAAuBnB,KAAKngB,KAAMyI,EAAakQ,EAE/D4I,GAAUC,mBACVD,EAAUH,SAAW,IAErB,IAAIK,GAAiBF,EAAU9B,MAC/B8B,GAAU9B,OAAS,WACjBgC,EAAetB,KAAKngB,KACpB,IAAIggB,GAAQ,GAAIqB,GAAqBrhB,KAAM,KAAM+c,KAC7C1L,EAAWrR,KAAKwhB,gBAAgBxF,OAAOhc,KAAKohB,UAAYphB,KAAKohB,aACjEnB,YAAW,WACT5O,EAAS7P,QAAQ,SAASqe,GACxBA,EAAQM,KAAKH,EAAMpQ,OAAQoQ,MAE5B,GAGL,IAAI0B,GAA2BH,EAAU3B,gBACzC2B,GAAU3B,iBAAmB,SAAS1V,EAAM2V,GACpB,kBAAXA,IAAiC,UAAR3V,EAClClK,KAAKwhB,gBAAgBrY,KAAK0W,GAE1B6B,EAAyBvB,KAAKngB,KAAMkK,EAAM2V,GAG9C,IAAI8B,GAA8BJ,EAAUK,mBAW5C,OAVAL,GAAUK,oBAAsB,SAAS1X,EAAM2V,GAC7C,GAAY,UAAR3V,EAAkB,CACpB,GAAI6N,GAAQ/X,KAAKwhB,gBAAgB7f,QAAQke,EACrC9H,IAAS,GACX/X,KAAKwhB,gBAAgBK,OAAO9J,EAAO,OAErC4J,GAA4BxB,KAAKngB,KAAMkK,EAAM2V,IAI1C0B,OClEX,SAAU9hB,GAgBR,GAAImW,GAAUzS,SAASiV,gBACnBmJ,EAAY,KACZO,GAAAA,CACJ,KACE,GAAIC,GAAkBC,iBAAiBpM,GAASsB,iBAAiB,WAC7D+K,EAAiC,KAAnBF,EAAyB,IAAM,GACjDR,GAAY3L,EAAQ8C,SAASjF,SAAYwO,EAAaA,KACjD9gB,SAAU,IACfogB,EAAUnF,YAAc,EACxB0F,EAAWE,iBAAiBpM,GAASsB,iBAAiB,YAAc+K,EACpE,MAAOC,IACP,QACIX,GACFA,EAAU9B,SAEd,IAAIqC,EAAJ,CAIA,GAAIR,GAAyB3X,OAAO8O,QAAQ9R,UAAU+R,OACtD/O,QAAO8O,QAAQ9R,UAAU+R,QAAU,SAASjQ,EAAakQ,GAUvD,MATIhP,QAAOC,QAAUA,OAAOC,UAAYjB,MAAMjC,UAAUmD,MAAQrB,EAAYmB,OAAOC,YAEjFpB,EAAcG,MAAMkB,KAAKrB,IAGtBG,MAAMC,QAAQJ,IAAgC,OAAhBA,IACjCA,EAAchJ,EAAO+I,mBAAmBC,IAGnC6Y,EAAuBnB,KAAKngB,KAAMyI,EAAakQ,MAEvDtZ,Gd9CCE,EAAAA,QAEJ4iB,MACM3iB,WAAAA,MAAuBQ","file":"web-animations.min.js"} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/.bower.json b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/.bower.json
deleted file mode 100644
index 42cf72a37ef..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/.bower.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "webcomponentsjs",
- "main": "webcomponents.js",
- "version": "0.6.3",
- "homepage": "http://webcomponents.org",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "webcomponents"
- ],
- "license": "BSD",
- "ignore": [],
- "_release": "0.6.3",
- "_resolution": {
- "type": "version",
- "tag": "v0.6.3",
- "commit": "2a1003f895dc55510015898809deefc419899011"
- },
- "_source": "https://github.com/Polymer/webcomponentsjs.git",
- "_target": "^0.6.0",
- "_originalSource": "webcomponentsjs"
-} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.js
deleted file mode 100644
index 71731bdbb94..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.js
+++ /dev/null
@@ -1,950 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-if (typeof WeakMap === "undefined") {
- (function() {
- var defineProperty = Object.defineProperty;
- var counter = Date.now() % 1e9;
- var WeakMap = function() {
- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
- };
- WeakMap.prototype = {
- set: function(key, value) {
- var entry = key[this.name];
- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
- value: [ key, value ],
- writable: true
- });
- return this;
- },
- get: function(key) {
- var entry;
- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
- },
- "delete": function(key) {
- var entry = key[this.name];
- if (!entry || entry[0] !== key) return false;
- entry[0] = entry[1] = undefined;
- return true;
- },
- has: function(key) {
- var entry = key[this.name];
- if (!entry) return false;
- return entry[0] === key;
- }
- };
- window.WeakMap = WeakMap;
- })();
-}
-
-(function(global) {
- var registrationsTable = new WeakMap();
- var setImmediate;
- if (/Trident|Edge/.test(navigator.userAgent)) {
- setImmediate = setTimeout;
- } else if (window.setImmediate) {
- setImmediate = window.setImmediate;
- } else {
- var setImmediateQueue = [];
- var sentinel = String(Math.random());
- window.addEventListener("message", function(e) {
- if (e.data === sentinel) {
- var queue = setImmediateQueue;
- setImmediateQueue = [];
- queue.forEach(function(func) {
- func();
- });
- }
- });
- setImmediate = function(func) {
- setImmediateQueue.push(func);
- window.postMessage(sentinel, "*");
- };
- }
- var isScheduled = false;
- var scheduledObservers = [];
- function scheduleCallback(observer) {
- scheduledObservers.push(observer);
- if (!isScheduled) {
- isScheduled = true;
- setImmediate(dispatchCallbacks);
- }
- }
- function wrapIfNeeded(node) {
- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
- }
- function dispatchCallbacks() {
- isScheduled = false;
- var observers = scheduledObservers;
- scheduledObservers = [];
- observers.sort(function(o1, o2) {
- return o1.uid_ - o2.uid_;
- });
- var anyNonEmpty = false;
- observers.forEach(function(observer) {
- var queue = observer.takeRecords();
- removeTransientObserversFor(observer);
- if (queue.length) {
- observer.callback_(queue, observer);
- anyNonEmpty = true;
- }
- });
- if (anyNonEmpty) dispatchCallbacks();
- }
- function removeTransientObserversFor(observer) {
- observer.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- if (!registrations) return;
- registrations.forEach(function(registration) {
- if (registration.observer === observer) registration.removeTransientObservers();
- });
- });
- }
- function forEachAncestorAndObserverEnqueueRecord(target, callback) {
- for (var node = target; node; node = node.parentNode) {
- var registrations = registrationsTable.get(node);
- if (registrations) {
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- var options = registration.options;
- if (node !== target && !options.subtree) continue;
- var record = callback(options);
- if (record) registration.enqueue(record);
- }
- }
- }
- }
- var uidCounter = 0;
- function JsMutationObserver(callback) {
- this.callback_ = callback;
- this.nodes_ = [];
- this.records_ = [];
- this.uid_ = ++uidCounter;
- }
- JsMutationObserver.prototype = {
- observe: function(target, options) {
- target = wrapIfNeeded(target);
- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
- throw new SyntaxError();
- }
- var registrations = registrationsTable.get(target);
- if (!registrations) registrationsTable.set(target, registrations = []);
- var registration;
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i].observer === this) {
- registration = registrations[i];
- registration.removeListeners();
- registration.options = options;
- break;
- }
- }
- if (!registration) {
- registration = new Registration(this, target, options);
- registrations.push(registration);
- this.nodes_.push(target);
- }
- registration.addListeners();
- },
- disconnect: function() {
- this.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.observer === this) {
- registration.removeListeners();
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- this.records_ = [];
- },
- takeRecords: function() {
- var copyOfRecords = this.records_;
- this.records_ = [];
- return copyOfRecords;
- }
- };
- function MutationRecord(type, target) {
- this.type = type;
- this.target = target;
- this.addedNodes = [];
- this.removedNodes = [];
- this.previousSibling = null;
- this.nextSibling = null;
- this.attributeName = null;
- this.attributeNamespace = null;
- this.oldValue = null;
- }
- function copyMutationRecord(original) {
- var record = new MutationRecord(original.type, original.target);
- record.addedNodes = original.addedNodes.slice();
- record.removedNodes = original.removedNodes.slice();
- record.previousSibling = original.previousSibling;
- record.nextSibling = original.nextSibling;
- record.attributeName = original.attributeName;
- record.attributeNamespace = original.attributeNamespace;
- record.oldValue = original.oldValue;
- return record;
- }
- var currentRecord, recordWithOldValue;
- function getRecord(type, target) {
- return currentRecord = new MutationRecord(type, target);
- }
- function getRecordWithOldValue(oldValue) {
- if (recordWithOldValue) return recordWithOldValue;
- recordWithOldValue = copyMutationRecord(currentRecord);
- recordWithOldValue.oldValue = oldValue;
- return recordWithOldValue;
- }
- function clearRecords() {
- currentRecord = recordWithOldValue = undefined;
- }
- function recordRepresentsCurrentMutation(record) {
- return record === recordWithOldValue || record === currentRecord;
- }
- function selectRecord(lastRecord, newRecord) {
- if (lastRecord === newRecord) return lastRecord;
- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
- return null;
- }
- function Registration(observer, target, options) {
- this.observer = observer;
- this.target = target;
- this.options = options;
- this.transientObservedNodes = [];
- }
- Registration.prototype = {
- enqueue: function(record) {
- var records = this.observer.records_;
- var length = records.length;
- if (records.length > 0) {
- var lastRecord = records[length - 1];
- var recordToReplaceLast = selectRecord(lastRecord, record);
- if (recordToReplaceLast) {
- records[length - 1] = recordToReplaceLast;
- return;
- }
- } else {
- scheduleCallback(this.observer);
- }
- records[length] = record;
- },
- addListeners: function() {
- this.addListeners_(this.target);
- },
- addListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
- },
- removeListeners: function() {
- this.removeListeners_(this.target);
- },
- removeListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
- },
- addTransientObserver: function(node) {
- if (node === this.target) return;
- this.addListeners_(node);
- this.transientObservedNodes.push(node);
- var registrations = registrationsTable.get(node);
- if (!registrations) registrationsTable.set(node, registrations = []);
- registrations.push(this);
- },
- removeTransientObservers: function() {
- var transientObservedNodes = this.transientObservedNodes;
- this.transientObservedNodes = [];
- transientObservedNodes.forEach(function(node) {
- this.removeListeners_(node);
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i] === this) {
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- },
- handleEvent: function(e) {
- e.stopImmediatePropagation();
- switch (e.type) {
- case "DOMAttrModified":
- var name = e.attrName;
- var namespace = e.relatedNode.namespaceURI;
- var target = e.target;
- var record = new getRecord("attributes", target);
- record.attributeName = name;
- record.attributeNamespace = namespace;
- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.attributes) return;
- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
- return;
- }
- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMCharacterDataModified":
- var target = e.target;
- var record = getRecord("characterData", target);
- var oldValue = e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.characterData) return;
- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMNodeRemoved":
- this.addTransientObserver(e.target);
-
- case "DOMNodeInserted":
- var changedNode = e.target;
- var addedNodes, removedNodes;
- if (e.type === "DOMNodeInserted") {
- addedNodes = [ changedNode ];
- removedNodes = [];
- } else {
- addedNodes = [];
- removedNodes = [ changedNode ];
- }
- var previousSibling = changedNode.previousSibling;
- var nextSibling = changedNode.nextSibling;
- var record = getRecord("childList", e.target.parentNode);
- record.addedNodes = addedNodes;
- record.removedNodes = removedNodes;
- record.previousSibling = previousSibling;
- record.nextSibling = nextSibling;
- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
- if (!options.childList) return;
- return record;
- });
- }
- clearRecords();
- }
- };
- global.JsMutationObserver = JsMutationObserver;
- if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
-})(this);
-
-window.CustomElements = window.CustomElements || {
- flags: {}
-};
-
-(function(scope) {
- var flags = scope.flags;
- var modules = [];
- var addModule = function(module) {
- modules.push(module);
- };
- var initializeModules = function() {
- modules.forEach(function(module) {
- module(scope);
- });
- };
- scope.addModule = addModule;
- scope.initializeModules = initializeModules;
- scope.hasNative = Boolean(document.registerElement);
- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
-})(CustomElements);
-
-CustomElements.addModule(function(scope) {
- var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
- function forSubtree(node, cb) {
- findAllElements(node, function(e) {
- if (cb(e)) {
- return true;
- }
- forRoots(e, cb);
- });
- forRoots(node, cb);
- }
- function findAllElements(node, find, data) {
- var e = node.firstElementChild;
- if (!e) {
- e = node.firstChild;
- while (e && e.nodeType !== Node.ELEMENT_NODE) {
- e = e.nextSibling;
- }
- }
- while (e) {
- if (find(e, data) !== true) {
- findAllElements(e, find, data);
- }
- e = e.nextElementSibling;
- }
- return null;
- }
- function forRoots(node, cb) {
- var root = node.shadowRoot;
- while (root) {
- forSubtree(root, cb);
- root = root.olderShadowRoot;
- }
- }
- function forDocumentTree(doc, cb) {
- _forDocumentTree(doc, cb, []);
- }
- function _forDocumentTree(doc, cb, processingDocuments) {
- doc = wrap(doc);
- if (processingDocuments.indexOf(doc) >= 0) {
- return;
- }
- processingDocuments.push(doc);
- var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
- for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
- if (n.import) {
- _forDocumentTree(n.import, cb, processingDocuments);
- }
- }
- cb(doc);
- }
- scope.forDocumentTree = forDocumentTree;
- scope.forSubtree = forSubtree;
-});
-
-CustomElements.addModule(function(scope) {
- var flags = scope.flags;
- var forSubtree = scope.forSubtree;
- var forDocumentTree = scope.forDocumentTree;
- function addedNode(node) {
- return added(node) || addedSubtree(node);
- }
- function added(node) {
- if (scope.upgrade(node)) {
- return true;
- }
- attached(node);
- }
- function addedSubtree(node) {
- forSubtree(node, function(e) {
- if (added(e)) {
- return true;
- }
- });
- }
- function attachedNode(node) {
- attached(node);
- if (inDocument(node)) {
- forSubtree(node, function(e) {
- attached(e);
- });
- }
- }
- var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
- scope.hasPolyfillMutations = hasPolyfillMutations;
- var isPendingMutations = false;
- var pendingMutations = [];
- function deferMutation(fn) {
- pendingMutations.push(fn);
- if (!isPendingMutations) {
- isPendingMutations = true;
- setTimeout(takeMutations);
- }
- }
- function takeMutations() {
- isPendingMutations = false;
- var $p = pendingMutations;
- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
- p();
- }
- pendingMutations = [];
- }
- function attached(element) {
- if (hasPolyfillMutations) {
- deferMutation(function() {
- _attached(element);
- });
- } else {
- _attached(element);
- }
- }
- function _attached(element) {
- if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
- if (!element.__attached && inDocument(element)) {
- element.__attached = true;
- if (element.attachedCallback) {
- element.attachedCallback();
- }
- }
- }
- }
- function detachedNode(node) {
- detached(node);
- forSubtree(node, function(e) {
- detached(e);
- });
- }
- function detached(element) {
- if (hasPolyfillMutations) {
- deferMutation(function() {
- _detached(element);
- });
- } else {
- _detached(element);
- }
- }
- function _detached(element) {
- if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
- if (element.__attached && !inDocument(element)) {
- element.__attached = false;
- if (element.detachedCallback) {
- element.detachedCallback();
- }
- }
- }
- }
- function inDocument(element) {
- var p = element;
- var doc = wrap(document);
- while (p) {
- if (p == doc) {
- return true;
- }
- p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
- }
- }
- function watchShadow(node) {
- if (node.shadowRoot && !node.shadowRoot.__watched) {
- flags.dom && console.log("watching shadow-root for: ", node.localName);
- var root = node.shadowRoot;
- while (root) {
- observe(root);
- root = root.olderShadowRoot;
- }
- }
- }
- function handler(mutations) {
- if (flags.dom) {
- var mx = mutations[0];
- if (mx && mx.type === "childList" && mx.addedNodes) {
- if (mx.addedNodes) {
- var d = mx.addedNodes[0];
- while (d && d !== document && !d.host) {
- d = d.parentNode;
- }
- var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
- u = u.split("/?").shift().split("/").pop();
- }
- }
- console.group("mutations (%d) [%s]", mutations.length, u || "");
- }
- mutations.forEach(function(mx) {
- if (mx.type === "childList") {
- forEach(mx.addedNodes, function(n) {
- if (!n.localName) {
- return;
- }
- addedNode(n);
- });
- forEach(mx.removedNodes, function(n) {
- if (!n.localName) {
- return;
- }
- detachedNode(n);
- });
- }
- });
- flags.dom && console.groupEnd();
- }
- function takeRecords(node) {
- node = wrap(node);
- if (!node) {
- node = wrap(document);
- }
- while (node.parentNode) {
- node = node.parentNode;
- }
- var observer = node.__observer;
- if (observer) {
- handler(observer.takeRecords());
- takeMutations();
- }
- }
- var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
- function observe(inRoot) {
- if (inRoot.__observer) {
- return;
- }
- var observer = new MutationObserver(handler);
- observer.observe(inRoot, {
- childList: true,
- subtree: true
- });
- inRoot.__observer = observer;
- }
- function upgradeDocument(doc) {
- doc = wrap(doc);
- flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
- addedNode(doc);
- observe(doc);
- flags.dom && console.groupEnd();
- }
- function upgradeDocumentTree(doc) {
- forDocumentTree(doc, upgradeDocument);
- }
- var originalCreateShadowRoot = Element.prototype.createShadowRoot;
- if (originalCreateShadowRoot) {
- Element.prototype.createShadowRoot = function() {
- var root = originalCreateShadowRoot.call(this);
- CustomElements.watchShadow(this);
- return root;
- };
- }
- scope.watchShadow = watchShadow;
- scope.upgradeDocumentTree = upgradeDocumentTree;
- scope.upgradeSubtree = addedSubtree;
- scope.upgradeAll = addedNode;
- scope.attachedNode = attachedNode;
- scope.takeRecords = takeRecords;
-});
-
-CustomElements.addModule(function(scope) {
- var flags = scope.flags;
- function upgrade(node) {
- if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
- var is = node.getAttribute("is");
- var definition = scope.getRegisteredDefinition(is || node.localName);
- if (definition) {
- if (is && definition.tag == node.localName) {
- return upgradeWithDefinition(node, definition);
- } else if (!is && !definition.extends) {
- return upgradeWithDefinition(node, definition);
- }
- }
- }
- }
- function upgradeWithDefinition(element, definition) {
- flags.upgrade && console.group("upgrade:", element.localName);
- if (definition.is) {
- element.setAttribute("is", definition.is);
- }
- implementPrototype(element, definition);
- element.__upgraded__ = true;
- created(element);
- scope.attachedNode(element);
- scope.upgradeSubtree(element);
- flags.upgrade && console.groupEnd();
- return element;
- }
- function implementPrototype(element, definition) {
- if (Object.__proto__) {
- element.__proto__ = definition.prototype;
- } else {
- customMixin(element, definition.prototype, definition.native);
- element.__proto__ = definition.prototype;
- }
- }
- function customMixin(inTarget, inSrc, inNative) {
- var used = {};
- var p = inSrc;
- while (p !== inNative && p !== HTMLElement.prototype) {
- var keys = Object.getOwnPropertyNames(p);
- for (var i = 0, k; k = keys[i]; i++) {
- if (!used[k]) {
- Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
- used[k] = 1;
- }
- }
- p = Object.getPrototypeOf(p);
- }
- }
- function created(element) {
- if (element.createdCallback) {
- element.createdCallback();
- }
- }
- scope.upgrade = upgrade;
- scope.upgradeWithDefinition = upgradeWithDefinition;
- scope.implementPrototype = implementPrototype;
-});
-
-CustomElements.addModule(function(scope) {
- var isIE11OrOlder = scope.isIE11OrOlder;
- var upgradeDocumentTree = scope.upgradeDocumentTree;
- var upgradeAll = scope.upgradeAll;
- var upgradeWithDefinition = scope.upgradeWithDefinition;
- var implementPrototype = scope.implementPrototype;
- var useNative = scope.useNative;
- function register(name, options) {
- var definition = options || {};
- if (!name) {
- throw new Error("document.registerElement: first argument `name` must not be empty");
- }
- if (name.indexOf("-") < 0) {
- throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
- }
- if (isReservedTag(name)) {
- throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
- }
- if (getRegisteredDefinition(name)) {
- throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
- }
- if (!definition.prototype) {
- definition.prototype = Object.create(HTMLElement.prototype);
- }
- definition.__name = name.toLowerCase();
- definition.lifecycle = definition.lifecycle || {};
- definition.ancestry = ancestry(definition.extends);
- resolveTagName(definition);
- resolvePrototypeChain(definition);
- overrideAttributeApi(definition.prototype);
- registerDefinition(definition.__name, definition);
- definition.ctor = generateConstructor(definition);
- definition.ctor.prototype = definition.prototype;
- definition.prototype.constructor = definition.ctor;
- if (scope.ready) {
- upgradeDocumentTree(document);
- }
- return definition.ctor;
- }
- function overrideAttributeApi(prototype) {
- if (prototype.setAttribute._polyfilled) {
- return;
- }
- var setAttribute = prototype.setAttribute;
- prototype.setAttribute = function(name, value) {
- changeAttribute.call(this, name, value, setAttribute);
- };
- var removeAttribute = prototype.removeAttribute;
- prototype.removeAttribute = function(name) {
- changeAttribute.call(this, name, null, removeAttribute);
- };
- prototype.setAttribute._polyfilled = true;
- }
- function changeAttribute(name, value, operation) {
- name = name.toLowerCase();
- var oldValue = this.getAttribute(name);
- operation.apply(this, arguments);
- var newValue = this.getAttribute(name);
- if (this.attributeChangedCallback && newValue !== oldValue) {
- this.attributeChangedCallback(name, oldValue, newValue);
- }
- }
- function isReservedTag(name) {
- for (var i = 0; i < reservedTagList.length; i++) {
- if (name === reservedTagList[i]) {
- return true;
- }
- }
- }
- var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
- function ancestry(extnds) {
- var extendee = getRegisteredDefinition(extnds);
- if (extendee) {
- return ancestry(extendee.extends).concat([ extendee ]);
- }
- return [];
- }
- function resolveTagName(definition) {
- var baseTag = definition.extends;
- for (var i = 0, a; a = definition.ancestry[i]; i++) {
- baseTag = a.is && a.tag;
- }
- definition.tag = baseTag || definition.__name;
- if (baseTag) {
- definition.is = definition.__name;
- }
- }
- function resolvePrototypeChain(definition) {
- if (!Object.__proto__) {
- var nativePrototype = HTMLElement.prototype;
- if (definition.is) {
- var inst = document.createElement(definition.tag);
- var expectedPrototype = Object.getPrototypeOf(inst);
- if (expectedPrototype === definition.prototype) {
- nativePrototype = expectedPrototype;
- }
- }
- var proto = definition.prototype, ancestor;
- while (proto && proto !== nativePrototype) {
- ancestor = Object.getPrototypeOf(proto);
- proto.__proto__ = ancestor;
- proto = ancestor;
- }
- definition.native = nativePrototype;
- }
- }
- function instantiate(definition) {
- return upgradeWithDefinition(domCreateElement(definition.tag), definition);
- }
- var registry = {};
- function getRegisteredDefinition(name) {
- if (name) {
- return registry[name.toLowerCase()];
- }
- }
- function registerDefinition(name, definition) {
- registry[name] = definition;
- }
- function generateConstructor(definition) {
- return function() {
- return instantiate(definition);
- };
- }
- var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
- function createElementNS(namespace, tag, typeExtension) {
- if (namespace === HTML_NAMESPACE) {
- return createElement(tag, typeExtension);
- } else {
- return domCreateElementNS(namespace, tag);
- }
- }
- function createElement(tag, typeExtension) {
- var definition = getRegisteredDefinition(typeExtension || tag);
- if (definition) {
- if (tag == definition.tag && typeExtension == definition.is) {
- return new definition.ctor();
- }
- if (!typeExtension && !definition.is) {
- return new definition.ctor();
- }
- }
- var element;
- if (typeExtension) {
- element = createElement(tag);
- element.setAttribute("is", typeExtension);
- return element;
- }
- element = domCreateElement(tag);
- if (tag.indexOf("-") >= 0) {
- implementPrototype(element, HTMLElement);
- }
- return element;
- }
- var domCreateElement = document.createElement.bind(document);
- var domCreateElementNS = document.createElementNS.bind(document);
- var isInstance;
- if (!Object.__proto__ && !useNative) {
- isInstance = function(obj, ctor) {
- var p = obj;
- while (p) {
- if (p === ctor.prototype) {
- return true;
- }
- p = p.__proto__;
- }
- return false;
- };
- } else {
- isInstance = function(obj, base) {
- return obj instanceof base;
- };
- }
- function wrapDomMethodToForceUpgrade(obj, methodName) {
- var orig = obj[methodName];
- obj[methodName] = function() {
- var n = orig.apply(this, arguments);
- upgradeAll(n);
- return n;
- };
- }
- wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
- wrapDomMethodToForceUpgrade(document, "importNode");
- if (isIE11OrOlder) {
- (function() {
- var importNode = document.importNode;
- document.importNode = function() {
- var n = importNode.apply(document, arguments);
- if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
- var f = document.createDocumentFragment();
- f.appendChild(n);
- return f;
- } else {
- return n;
- }
- };
- })();
- }
- document.registerElement = register;
- document.createElement = createElement;
- document.createElementNS = createElementNS;
- scope.registry = registry;
- scope.instanceof = isInstance;
- scope.reservedTagList = reservedTagList;
- scope.getRegisteredDefinition = getRegisteredDefinition;
- document.register = document.registerElement;
-});
-
-(function(scope) {
- var useNative = scope.useNative;
- var initializeModules = scope.initializeModules;
- var isIE11OrOlder = /Trident/.test(navigator.userAgent);
- if (useNative) {
- var nop = function() {};
- scope.watchShadow = nop;
- scope.upgrade = nop;
- scope.upgradeAll = nop;
- scope.upgradeDocumentTree = nop;
- scope.upgradeSubtree = nop;
- scope.takeRecords = nop;
- scope.instanceof = function(obj, base) {
- return obj instanceof base;
- };
- } else {
- initializeModules();
- }
- var upgradeDocumentTree = scope.upgradeDocumentTree;
- if (!window.wrap) {
- if (window.ShadowDOMPolyfill) {
- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
- } else {
- window.wrap = window.unwrap = function(node) {
- return node;
- };
- }
- }
- function bootstrap() {
- upgradeDocumentTree(wrap(document));
- if (window.HTMLImports) {
- HTMLImports.__importsParsingHook = function(elt) {
- upgradeDocumentTree(wrap(elt.import));
- };
- }
- CustomElements.ready = true;
- setTimeout(function() {
- CustomElements.readyTime = Date.now();
- if (window.HTMLImports) {
- CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
- }
- document.dispatchEvent(new CustomEvent("WebComponentsReady", {
- bubbles: true
- }));
- });
- }
- if (isIE11OrOlder && typeof window.CustomEvent !== "function") {
- window.CustomEvent = function(inType, params) {
- params = params || {};
- var e = document.createEvent("CustomEvent");
- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
- return e;
- };
- window.CustomEvent.prototype = window.Event.prototype;
- }
- if (document.readyState === "complete" || scope.flags.eager) {
- bootstrap();
- } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
- bootstrap();
- } else {
- var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
- window.addEventListener(loadEvent, bootstrap);
- }
- scope.isIE11OrOlder = isIE11OrOlder;
-})(window.CustomElements); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.min.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.min.js
deleted file mode 100644
index 5b1b5387baa..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/CustomElements.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var n=t[this.name];return n&&n[0]===t?n[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){_.push(e),b||(b=!0,h(n))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function n(){b=!1;var e=_;_=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();o(e),r.length&&(e.callback_(r,e),t=!0)}),t&&n()}function o(e){e.nodes_.forEach(function(t){var r=v.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var r=e;r;r=r.parentNode){var n=v.get(r);if(n)for(var o=0;o<n.length;o++){var i=n[o],a=i.options;if(r===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++E}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function u(e,t){return y=new s(e,t)}function c(e){return N?N:(N=d(y),N.oldValue=e,N)}function l(){y=N=void 0}function f(e){return e===N||e===y}function p(e,t){return e===t?e:N&&f(e)?N:null}function m(e,t,r){this.observer=e,this.target=t,this.options=r,this.transientObservedNodes=[]}var h,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))h=setTimeout;else if(window.setImmediate)h=window.setImmediate;else{var w=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=w;w=[],t.forEach(function(e){e()})}}),h=function(e){w.push(e),window.postMessage(g,"*")}}var b=!1,_=[],E=0;a.prototype={observe:function(e,t){if(e=r(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n=v.get(e);n||v.set(e,n=[]);for(var o,i=0;i<n.length;i++)if(n[i].observer===this){o=n[i],o.removeListeners(),o.options=t;break}o||(o=new m(this,e,t),n.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),r=0;r<t.length;r++){var n=t[r];if(n.observer===this){n.removeListeners(),t.splice(r,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,N;m.prototype={enqueue:function(e){var r=this.observer.records_,n=r.length;if(r.length>0){var o=r[n-1],i=p(o,e);if(i)return void(r[n-1]=i)}else t(this.observer);r[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),r=0;r<t.length;r++)if(t[r]===this){t.splice(r,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,r=e.relatedNode.namespaceURI,n=e.target,o=new u("attributes",n);o.attributeName=t,o.attributeNamespace=r;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(n,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(r)?void 0:e.attributeOldValue?c(a):o});break;case"DOMCharacterDataModified":var n=e.target,o=u("characterData",n),a=e.prevValue;i(n,function(e){return e.characterData?e.characterDataOldValue?c(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,d,f=e.target;"DOMNodeInserted"===e.type?(s=[f],d=[]):(s=[],d=[f]);var p=f.previousSibling,m=f.nextSibling,o=u("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=d,o.previousSibling=p,o.nextSibling=m,i(e.relatedNode,function(e){return e.childList?o:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,r=[],n=function(e){r.push(e)},o=function(){r.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){r(e,function(e){return t(e)?!0:void n(e,t)}),n(e,t)}function r(e,t,n){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,n)!==!0&&r(o,t,n),o=o.nextElementSibling;return null}function n(e,r){for(var n=e.shadowRoot;n;)t(n,r),n=n.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,r){if(e=wrap(e),!(r.indexOf(e)>=0)){r.push(e);for(var n,o=e.querySelectorAll("link[rel="+a+"]"),s=0,d=o.length;d>s&&(n=o[s]);s++)n["import"]&&i(n["import"],t,r);t(e)}}var a=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),CustomElements.addModule(function(e){function t(e){return r(e)||n(e)}function r(t){return e.upgrade(t)?!0:void s(t)}function n(e){_(e,function(e){return r(e)?!0:void 0})}function o(e){s(e),f(e)&&_(e,function(e){s(e)})}function i(e){M.push(e),N||(N=!0,setTimeout(a))}function a(){N=!1;for(var e,t=M,r=0,n=t.length;n>r&&(e=t[r]);r++)e();M=[]}function s(e){y?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&f(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function u(e){c(e),_(e,function(e){c(e)})}function c(e){y?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!f(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function f(e){for(var t=e,r=wrap(document);t;){if(t==r)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function m(e){if(b.dom){var r=e[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var n=r.addedNodes[0];n&&n!==document&&!n.host;)n=n.parentNode;var o=n&&(n.URL||n._URL||n.host&&n.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(O(e.addedNodes,function(e){e.localName&&t(e)}),O(e.removedNodes,function(e){e.localName&&u(e)}))}),b.dom&&console.groupEnd()}function h(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(m);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function w(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function g(e){E(e,w)}var b=e.flags,_=e.forSubtree,E=e.forDocumentTree,y=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=y;var N=!1,M=[],O=Array.prototype.forEach.call.bind(Array.prototype.forEach),L=Element.prototype.createShadowRoot;L&&(Element.prototype.createShadowRoot=function(){var e=L.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=g,e.upgradeSubtree=n,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=h}),CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var n=t.getAttribute("is"),o=e.getRegisteredDefinition(n||t.localName);if(o){if(n&&o.tag==t.localName)return r(t,o);if(!n&&!o["extends"])return r(t,o)}}}function r(t,r){return a.upgrade&&console.group("upgrade:",t.localName),r.is&&t.setAttribute("is",r.is),n(t,r),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function n(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,r){for(var n={},o=t;o!==r&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)n[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),n[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=r,e.implementPrototype=n}),CustomElements.addModule(function(e){function t(t,n){var d=n||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(u(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return d.prototype||(d.prototype=Object.create(HTMLElement.prototype)),d.__name=t.toLowerCase(),d.lifecycle=d.lifecycle||{},d.ancestry=i(d["extends"]),a(d),s(d),r(d.prototype),c(d.__name,d),d.ctor=l(d),d.ctor.prototype=d.prototype,d.prototype.constructor=d.ctor,e.ready&&w(document),d.ctor}function r(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,r){n.call(this,e,r,t)};var r=e.removeAttribute;e.removeAttribute=function(e){n.call(this,e,null,r)},e.setAttribute._polyfilled=!0}}function n(e,t,r){e=e.toLowerCase();var n=this.getAttribute(e);r.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==n&&this.attributeChangedCallback(e,n,o)}function o(e){for(var t=0;t<y.length;t++)if(e===y[t])return!0}function i(e){var t=u(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,r=e["extends"],n=0;t=e.ancestry[n];n++)r=t.is&&t.tag;e.tag=r||e.__name,r&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var r=document.createElement(e.tag),n=Object.getPrototypeOf(r);n===e.prototype&&(t=n)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e["native"]=t}}function d(e){return b(O(e.tag),e)}function u(e){return e?N[e.toLowerCase()]:void 0}function c(e,t){N[e]=t}function l(e){return function(){return d(e)}}function f(e,t,r){return e===M?p(t,r):L(e,t)}function p(e,t){var r=u(t||e);if(r){if(e==r.tag&&t==r.is)return new r.ctor;if(!t&&!r.is)return new r.ctor}var n;return t?(n=p(e),n.setAttribute("is",t),n):(n=O(e),e.indexOf("-")>=0&&_(n,HTMLElement),n)}function m(e,t){var r=e[t];e[t]=function(){var e=r.apply(this,arguments);return g(e),e}}var h,v=e.isIE11OrOlder,w=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,_=e.implementPrototype,E=e.useNative,y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],N={},M="http://www.w3.org/1999/xhtml",O=document.createElement.bind(document),L=document.createElementNS.bind(document);h=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var r=e;r;){if(r===t.prototype)return!0;r=r.__proto__}return!1},m(Node.prototype,"cloneNode"),m(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var r=document.createDocumentFragment();return r.appendChild(t),r}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=f,e.registry=N,e["instanceof"]=h,e.reservedTagList=y,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var r=e.useNative,n=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(r){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else n();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),r},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.js
deleted file mode 100644
index 90613da7d2c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.js
+++ /dev/null
@@ -1,1076 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-if (typeof WeakMap === "undefined") {
- (function() {
- var defineProperty = Object.defineProperty;
- var counter = Date.now() % 1e9;
- var WeakMap = function() {
- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
- };
- WeakMap.prototype = {
- set: function(key, value) {
- var entry = key[this.name];
- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
- value: [ key, value ],
- writable: true
- });
- return this;
- },
- get: function(key) {
- var entry;
- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
- },
- "delete": function(key) {
- var entry = key[this.name];
- if (!entry || entry[0] !== key) return false;
- entry[0] = entry[1] = undefined;
- return true;
- },
- has: function(key) {
- var entry = key[this.name];
- if (!entry) return false;
- return entry[0] === key;
- }
- };
- window.WeakMap = WeakMap;
- })();
-}
-
-(function(global) {
- var registrationsTable = new WeakMap();
- var setImmediate;
- if (/Trident|Edge/.test(navigator.userAgent)) {
- setImmediate = setTimeout;
- } else if (window.setImmediate) {
- setImmediate = window.setImmediate;
- } else {
- var setImmediateQueue = [];
- var sentinel = String(Math.random());
- window.addEventListener("message", function(e) {
- if (e.data === sentinel) {
- var queue = setImmediateQueue;
- setImmediateQueue = [];
- queue.forEach(function(func) {
- func();
- });
- }
- });
- setImmediate = function(func) {
- setImmediateQueue.push(func);
- window.postMessage(sentinel, "*");
- };
- }
- var isScheduled = false;
- var scheduledObservers = [];
- function scheduleCallback(observer) {
- scheduledObservers.push(observer);
- if (!isScheduled) {
- isScheduled = true;
- setImmediate(dispatchCallbacks);
- }
- }
- function wrapIfNeeded(node) {
- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
- }
- function dispatchCallbacks() {
- isScheduled = false;
- var observers = scheduledObservers;
- scheduledObservers = [];
- observers.sort(function(o1, o2) {
- return o1.uid_ - o2.uid_;
- });
- var anyNonEmpty = false;
- observers.forEach(function(observer) {
- var queue = observer.takeRecords();
- removeTransientObserversFor(observer);
- if (queue.length) {
- observer.callback_(queue, observer);
- anyNonEmpty = true;
- }
- });
- if (anyNonEmpty) dispatchCallbacks();
- }
- function removeTransientObserversFor(observer) {
- observer.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- if (!registrations) return;
- registrations.forEach(function(registration) {
- if (registration.observer === observer) registration.removeTransientObservers();
- });
- });
- }
- function forEachAncestorAndObserverEnqueueRecord(target, callback) {
- for (var node = target; node; node = node.parentNode) {
- var registrations = registrationsTable.get(node);
- if (registrations) {
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- var options = registration.options;
- if (node !== target && !options.subtree) continue;
- var record = callback(options);
- if (record) registration.enqueue(record);
- }
- }
- }
- }
- var uidCounter = 0;
- function JsMutationObserver(callback) {
- this.callback_ = callback;
- this.nodes_ = [];
- this.records_ = [];
- this.uid_ = ++uidCounter;
- }
- JsMutationObserver.prototype = {
- observe: function(target, options) {
- target = wrapIfNeeded(target);
- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
- throw new SyntaxError();
- }
- var registrations = registrationsTable.get(target);
- if (!registrations) registrationsTable.set(target, registrations = []);
- var registration;
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i].observer === this) {
- registration = registrations[i];
- registration.removeListeners();
- registration.options = options;
- break;
- }
- }
- if (!registration) {
- registration = new Registration(this, target, options);
- registrations.push(registration);
- this.nodes_.push(target);
- }
- registration.addListeners();
- },
- disconnect: function() {
- this.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.observer === this) {
- registration.removeListeners();
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- this.records_ = [];
- },
- takeRecords: function() {
- var copyOfRecords = this.records_;
- this.records_ = [];
- return copyOfRecords;
- }
- };
- function MutationRecord(type, target) {
- this.type = type;
- this.target = target;
- this.addedNodes = [];
- this.removedNodes = [];
- this.previousSibling = null;
- this.nextSibling = null;
- this.attributeName = null;
- this.attributeNamespace = null;
- this.oldValue = null;
- }
- function copyMutationRecord(original) {
- var record = new MutationRecord(original.type, original.target);
- record.addedNodes = original.addedNodes.slice();
- record.removedNodes = original.removedNodes.slice();
- record.previousSibling = original.previousSibling;
- record.nextSibling = original.nextSibling;
- record.attributeName = original.attributeName;
- record.attributeNamespace = original.attributeNamespace;
- record.oldValue = original.oldValue;
- return record;
- }
- var currentRecord, recordWithOldValue;
- function getRecord(type, target) {
- return currentRecord = new MutationRecord(type, target);
- }
- function getRecordWithOldValue(oldValue) {
- if (recordWithOldValue) return recordWithOldValue;
- recordWithOldValue = copyMutationRecord(currentRecord);
- recordWithOldValue.oldValue = oldValue;
- return recordWithOldValue;
- }
- function clearRecords() {
- currentRecord = recordWithOldValue = undefined;
- }
- function recordRepresentsCurrentMutation(record) {
- return record === recordWithOldValue || record === currentRecord;
- }
- function selectRecord(lastRecord, newRecord) {
- if (lastRecord === newRecord) return lastRecord;
- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
- return null;
- }
- function Registration(observer, target, options) {
- this.observer = observer;
- this.target = target;
- this.options = options;
- this.transientObservedNodes = [];
- }
- Registration.prototype = {
- enqueue: function(record) {
- var records = this.observer.records_;
- var length = records.length;
- if (records.length > 0) {
- var lastRecord = records[length - 1];
- var recordToReplaceLast = selectRecord(lastRecord, record);
- if (recordToReplaceLast) {
- records[length - 1] = recordToReplaceLast;
- return;
- }
- } else {
- scheduleCallback(this.observer);
- }
- records[length] = record;
- },
- addListeners: function() {
- this.addListeners_(this.target);
- },
- addListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
- },
- removeListeners: function() {
- this.removeListeners_(this.target);
- },
- removeListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
- },
- addTransientObserver: function(node) {
- if (node === this.target) return;
- this.addListeners_(node);
- this.transientObservedNodes.push(node);
- var registrations = registrationsTable.get(node);
- if (!registrations) registrationsTable.set(node, registrations = []);
- registrations.push(this);
- },
- removeTransientObservers: function() {
- var transientObservedNodes = this.transientObservedNodes;
- this.transientObservedNodes = [];
- transientObservedNodes.forEach(function(node) {
- this.removeListeners_(node);
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i] === this) {
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- },
- handleEvent: function(e) {
- e.stopImmediatePropagation();
- switch (e.type) {
- case "DOMAttrModified":
- var name = e.attrName;
- var namespace = e.relatedNode.namespaceURI;
- var target = e.target;
- var record = new getRecord("attributes", target);
- record.attributeName = name;
- record.attributeNamespace = namespace;
- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.attributes) return;
- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
- return;
- }
- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMCharacterDataModified":
- var target = e.target;
- var record = getRecord("characterData", target);
- var oldValue = e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.characterData) return;
- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMNodeRemoved":
- this.addTransientObserver(e.target);
-
- case "DOMNodeInserted":
- var changedNode = e.target;
- var addedNodes, removedNodes;
- if (e.type === "DOMNodeInserted") {
- addedNodes = [ changedNode ];
- removedNodes = [];
- } else {
- addedNodes = [];
- removedNodes = [ changedNode ];
- }
- var previousSibling = changedNode.previousSibling;
- var nextSibling = changedNode.nextSibling;
- var record = getRecord("childList", e.target.parentNode);
- record.addedNodes = addedNodes;
- record.removedNodes = removedNodes;
- record.previousSibling = previousSibling;
- record.nextSibling = nextSibling;
- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
- if (!options.childList) return;
- return record;
- });
- }
- clearRecords();
- }
- };
- global.JsMutationObserver = JsMutationObserver;
- if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
-})(this);
-
-window.HTMLImports = window.HTMLImports || {
- flags: {}
-};
-
-(function(scope) {
- var IMPORT_LINK_TYPE = "import";
- var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
- var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
- var wrap = function(node) {
- return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
- };
- var rootDocument = wrap(document);
- var currentScriptDescriptor = {
- get: function() {
- var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
- return wrap(script);
- },
- configurable: true
- };
- Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
- Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
- var isIE = /Trident|Edge/.test(navigator.userAgent);
- function whenReady(callback, doc) {
- doc = doc || rootDocument;
- whenDocumentReady(function() {
- watchImportsLoad(callback, doc);
- }, doc);
- }
- var requiredReadyState = isIE ? "complete" : "interactive";
- var READY_EVENT = "readystatechange";
- function isDocumentReady(doc) {
- return doc.readyState === "complete" || doc.readyState === requiredReadyState;
- }
- function whenDocumentReady(callback, doc) {
- if (!isDocumentReady(doc)) {
- var checkReady = function() {
- if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {
- doc.removeEventListener(READY_EVENT, checkReady);
- whenDocumentReady(callback, doc);
- }
- };
- doc.addEventListener(READY_EVENT, checkReady);
- } else if (callback) {
- callback();
- }
- }
- function markTargetLoaded(event) {
- event.target.__loaded = true;
- }
- function watchImportsLoad(callback, doc) {
- var imports = doc.querySelectorAll("link[rel=import]");
- var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
- function checkDone() {
- if (parsedCount == importCount && callback) {
- callback({
- allImports: imports,
- loadedImports: newImports,
- errorImports: errorImports
- });
- }
- }
- function loadedImport(e) {
- markTargetLoaded(e);
- newImports.push(this);
- parsedCount++;
- checkDone();
- }
- function errorLoadingImport(e) {
- errorImports.push(this);
- parsedCount++;
- checkDone();
- }
- if (importCount) {
- for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
- if (isImportLoaded(imp)) {
- parsedCount++;
- checkDone();
- } else {
- imp.addEventListener("load", loadedImport);
- imp.addEventListener("error", errorLoadingImport);
- }
- }
- } else {
- checkDone();
- }
- }
- function isImportLoaded(link) {
- return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;
- }
- if (useNative) {
- new MutationObserver(function(mxns) {
- for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {
- if (m.addedNodes) {
- handleImports(m.addedNodes);
- }
- }
- }).observe(document.head, {
- childList: true
- });
- function handleImports(nodes) {
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- if (isImport(n)) {
- handleImport(n);
- }
- }
- }
- function isImport(element) {
- return element.localName === "link" && element.rel === "import";
- }
- function handleImport(element) {
- var loaded = element.import;
- if (loaded) {
- markTargetLoaded({
- target: element
- });
- } else {
- element.addEventListener("load", markTargetLoaded);
- element.addEventListener("error", markTargetLoaded);
- }
- }
- (function() {
- if (document.readyState === "loading") {
- var imports = document.querySelectorAll("link[rel=import]");
- for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {
- handleImport(imp);
- }
- }
- })();
- }
- whenReady(function(detail) {
- HTMLImports.ready = true;
- HTMLImports.readyTime = new Date().getTime();
- var evt = rootDocument.createEvent("CustomEvent");
- evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
- rootDocument.dispatchEvent(evt);
- });
- scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
- scope.useNative = useNative;
- scope.rootDocument = rootDocument;
- scope.whenReady = whenReady;
- scope.isIE = isIE;
-})(HTMLImports);
-
-(function(scope) {
- var modules = [];
- var addModule = function(module) {
- modules.push(module);
- };
- var initializeModules = function() {
- modules.forEach(function(module) {
- module(scope);
- });
- };
- scope.addModule = addModule;
- scope.initializeModules = initializeModules;
-})(HTMLImports);
-
-HTMLImports.addModule(function(scope) {
- var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
- var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
- var path = {
- resolveUrlsInStyle: function(style, linkUrl) {
- var doc = style.ownerDocument;
- var resolver = doc.createElement("a");
- style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
- return style;
- },
- resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
- var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
- r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
- return r;
- },
- replaceUrls: function(text, urlObj, linkUrl, regexp) {
- return text.replace(regexp, function(m, pre, url, post) {
- var urlPath = url.replace(/["']/g, "");
- if (linkUrl) {
- urlPath = new URL(urlPath, linkUrl).href;
- }
- urlObj.href = urlPath;
- urlPath = urlObj.href;
- return pre + "'" + urlPath + "'" + post;
- });
- }
- };
- scope.path = path;
-});
-
-HTMLImports.addModule(function(scope) {
- var xhr = {
- async: true,
- ok: function(request) {
- return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
- },
- load: function(url, next, nextContext) {
- var request = new XMLHttpRequest();
- if (scope.flags.debug || scope.flags.bust) {
- url += "?" + Math.random();
- }
- request.open("GET", url, xhr.async);
- request.addEventListener("readystatechange", function(e) {
- if (request.readyState === 4) {
- var locationHeader = request.getResponseHeader("Location");
- var redirectedUrl = null;
- if (locationHeader) {
- var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
- }
- next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
- }
- });
- request.send();
- return request;
- },
- loadDocument: function(url, next, nextContext) {
- this.load(url, next, nextContext).responseType = "document";
- }
- };
- scope.xhr = xhr;
-});
-
-HTMLImports.addModule(function(scope) {
- var xhr = scope.xhr;
- var flags = scope.flags;
- var Loader = function(onLoad, onComplete) {
- this.cache = {};
- this.onload = onLoad;
- this.oncomplete = onComplete;
- this.inflight = 0;
- this.pending = {};
- };
- Loader.prototype = {
- addNodes: function(nodes) {
- this.inflight += nodes.length;
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- this.require(n);
- }
- this.checkDone();
- },
- addNode: function(node) {
- this.inflight++;
- this.require(node);
- this.checkDone();
- },
- require: function(elt) {
- var url = elt.src || elt.href;
- elt.__nodeUrl = url;
- if (!this.dedupe(url, elt)) {
- this.fetch(url, elt);
- }
- },
- dedupe: function(url, elt) {
- if (this.pending[url]) {
- this.pending[url].push(elt);
- return true;
- }
- var resource;
- if (this.cache[url]) {
- this.onload(url, elt, this.cache[url]);
- this.tail();
- return true;
- }
- this.pending[url] = [ elt ];
- return false;
- },
- fetch: function(url, elt) {
- flags.load && console.log("fetch", url, elt);
- if (!url) {
- setTimeout(function() {
- this.receive(url, elt, {
- error: "href must be specified"
- }, null);
- }.bind(this), 0);
- } else if (url.match(/^data:/)) {
- var pieces = url.split(",");
- var header = pieces[0];
- var body = pieces[1];
- if (header.indexOf(";base64") > -1) {
- body = atob(body);
- } else {
- body = decodeURIComponent(body);
- }
- setTimeout(function() {
- this.receive(url, elt, null, body);
- }.bind(this), 0);
- } else {
- var receiveXhr = function(err, resource, redirectedUrl) {
- this.receive(url, elt, err, resource, redirectedUrl);
- }.bind(this);
- xhr.load(url, receiveXhr);
- }
- },
- receive: function(url, elt, err, resource, redirectedUrl) {
- this.cache[url] = resource;
- var $p = this.pending[url];
- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
- this.onload(url, p, resource, err, redirectedUrl);
- this.tail();
- }
- this.pending[url] = null;
- },
- tail: function() {
- --this.inflight;
- this.checkDone();
- },
- checkDone: function() {
- if (!this.inflight) {
- this.oncomplete();
- }
- }
- };
- scope.Loader = Loader;
-});
-
-HTMLImports.addModule(function(scope) {
- var Observer = function(addCallback) {
- this.addCallback = addCallback;
- this.mo = new MutationObserver(this.handler.bind(this));
- };
- Observer.prototype = {
- handler: function(mutations) {
- for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {
- if (m.type === "childList" && m.addedNodes.length) {
- this.addedNodes(m.addedNodes);
- }
- }
- },
- addedNodes: function(nodes) {
- if (this.addCallback) {
- this.addCallback(nodes);
- }
- for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {
- if (n.children && n.children.length) {
- this.addedNodes(n.children);
- }
- }
- },
- observe: function(root) {
- this.mo.observe(root, {
- childList: true,
- subtree: true
- });
- }
- };
- scope.Observer = Observer;
-});
-
-HTMLImports.addModule(function(scope) {
- var path = scope.path;
- var rootDocument = scope.rootDocument;
- var flags = scope.flags;
- var isIE = scope.isIE;
- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
- var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
- var importParser = {
- documentSelectors: IMPORT_SELECTOR,
- importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="text/javascript"]' ].join(","),
- map: {
- link: "parseLink",
- script: "parseScript",
- style: "parseStyle"
- },
- dynamicElements: [],
- parseNext: function() {
- var next = this.nextToParse();
- if (next) {
- this.parse(next);
- }
- },
- parse: function(elt) {
- if (this.isParsed(elt)) {
- flags.parse && console.log("[%s] is already parsed", elt.localName);
- return;
- }
- var fn = this[this.map[elt.localName]];
- if (fn) {
- this.markParsing(elt);
- fn.call(this, elt);
- }
- },
- parseDynamic: function(elt, quiet) {
- this.dynamicElements.push(elt);
- if (!quiet) {
- this.parseNext();
- }
- },
- markParsing: function(elt) {
- flags.parse && console.log("parsing", elt);
- this.parsingElement = elt;
- },
- markParsingComplete: function(elt) {
- elt.__importParsed = true;
- this.markDynamicParsingComplete(elt);
- if (elt.__importElement) {
- elt.__importElement.__importParsed = true;
- this.markDynamicParsingComplete(elt.__importElement);
- }
- this.parsingElement = null;
- flags.parse && console.log("completed", elt);
- },
- markDynamicParsingComplete: function(elt) {
- var i = this.dynamicElements.indexOf(elt);
- if (i >= 0) {
- this.dynamicElements.splice(i, 1);
- }
- },
- parseImport: function(elt) {
- if (HTMLImports.__importsParsingHook) {
- HTMLImports.__importsParsingHook(elt);
- }
- if (elt.import) {
- elt.import.__importParsed = true;
- }
- this.markParsingComplete(elt);
- if (elt.__resource && !elt.__error) {
- elt.dispatchEvent(new CustomEvent("load", {
- bubbles: false
- }));
- } else {
- elt.dispatchEvent(new CustomEvent("error", {
- bubbles: false
- }));
- }
- if (elt.__pending) {
- var fn;
- while (elt.__pending.length) {
- fn = elt.__pending.shift();
- if (fn) {
- fn({
- target: elt
- });
- }
- }
- }
- this.parseNext();
- },
- parseLink: function(linkElt) {
- if (nodeIsImport(linkElt)) {
- this.parseImport(linkElt);
- } else {
- linkElt.href = linkElt.href;
- this.parseGeneric(linkElt);
- }
- },
- parseStyle: function(elt) {
- var src = elt;
- elt = cloneStyle(elt);
- src.__appliedElement = elt;
- elt.__importElement = src;
- this.parseGeneric(elt);
- },
- parseGeneric: function(elt) {
- this.trackElement(elt);
- this.addElementToDocument(elt);
- },
- rootImportForElement: function(elt) {
- var n = elt;
- while (n.ownerDocument.__importLink) {
- n = n.ownerDocument.__importLink;
- }
- return n;
- },
- addElementToDocument: function(elt) {
- var port = this.rootImportForElement(elt.__importElement || elt);
- port.parentNode.insertBefore(elt, port);
- },
- trackElement: function(elt, callback) {
- var self = this;
- var done = function(e) {
- if (callback) {
- callback(e);
- }
- self.markParsingComplete(elt);
- self.parseNext();
- };
- elt.addEventListener("load", done);
- elt.addEventListener("error", done);
- if (isIE && elt.localName === "style") {
- var fakeLoad = false;
- if (elt.textContent.indexOf("@import") == -1) {
- fakeLoad = true;
- } else if (elt.sheet) {
- fakeLoad = true;
- var csr = elt.sheet.cssRules;
- var len = csr ? csr.length : 0;
- for (var i = 0, r; i < len && (r = csr[i]); i++) {
- if (r.type === CSSRule.IMPORT_RULE) {
- fakeLoad = fakeLoad && Boolean(r.styleSheet);
- }
- }
- }
- if (fakeLoad) {
- elt.dispatchEvent(new CustomEvent("load", {
- bubbles: false
- }));
- }
- }
- },
- parseScript: function(scriptElt) {
- var script = document.createElement("script");
- script.__importElement = scriptElt;
- script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
- scope.currentScript = scriptElt;
- this.trackElement(script, function(e) {
- script.parentNode.removeChild(script);
- scope.currentScript = null;
- });
- this.addElementToDocument(script);
- },
- nextToParse: function() {
- this._mayParse = [];
- return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());
- },
- nextToParseInDoc: function(doc, link) {
- if (doc && this._mayParse.indexOf(doc) < 0) {
- this._mayParse.push(doc);
- var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
- for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
- if (!this.isParsed(n)) {
- if (this.hasResource(n)) {
- return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
- } else {
- return;
- }
- }
- }
- }
- return link;
- },
- nextToParseDynamic: function() {
- return this.dynamicElements[0];
- },
- parseSelectorsForNode: function(node) {
- var doc = node.ownerDocument || node;
- return doc === rootDocument ? this.documentSelectors : this.importsSelectors;
- },
- isParsed: function(node) {
- return node.__importParsed;
- },
- needsDynamicParsing: function(elt) {
- return this.dynamicElements.indexOf(elt) >= 0;
- },
- hasResource: function(node) {
- if (nodeIsImport(node) && node.import === undefined) {
- return false;
- }
- return true;
- }
- };
- function nodeIsImport(elt) {
- return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;
- }
- function generateScriptDataUrl(script) {
- var scriptContent = generateScriptContent(script);
- return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);
- }
- function generateScriptContent(script) {
- return script.textContent + generateSourceMapHint(script);
- }
- function generateSourceMapHint(script) {
- var owner = script.ownerDocument;
- owner.__importedScripts = owner.__importedScripts || 0;
- var moniker = script.ownerDocument.baseURI;
- var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";
- owner.__importedScripts++;
- return "\n//# sourceURL=" + moniker + num + ".js\n";
- }
- function cloneStyle(style) {
- var clone = style.ownerDocument.createElement("style");
- clone.textContent = style.textContent;
- path.resolveUrlsInStyle(clone);
- return clone;
- }
- scope.parser = importParser;
- scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
-});
-
-HTMLImports.addModule(function(scope) {
- var flags = scope.flags;
- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
- var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
- var rootDocument = scope.rootDocument;
- var Loader = scope.Loader;
- var Observer = scope.Observer;
- var parser = scope.parser;
- var importer = {
- documents: {},
- documentPreloadSelectors: IMPORT_SELECTOR,
- importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),
- loadNode: function(node) {
- importLoader.addNode(node);
- },
- loadSubtree: function(parent) {
- var nodes = this.marshalNodes(parent);
- importLoader.addNodes(nodes);
- },
- marshalNodes: function(parent) {
- return parent.querySelectorAll(this.loadSelectorsForNode(parent));
- },
- loadSelectorsForNode: function(node) {
- var doc = node.ownerDocument || node;
- return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;
- },
- loaded: function(url, elt, resource, err, redirectedUrl) {
- flags.load && console.log("loaded", url, elt);
- elt.__resource = resource;
- elt.__error = err;
- if (isImportLink(elt)) {
- var doc = this.documents[url];
- if (doc === undefined) {
- doc = err ? null : makeDocument(resource, redirectedUrl || url);
- if (doc) {
- doc.__importLink = elt;
- this.bootDocument(doc);
- }
- this.documents[url] = doc;
- }
- elt.import = doc;
- }
- parser.parseNext();
- },
- bootDocument: function(doc) {
- this.loadSubtree(doc);
- this.observer.observe(doc);
- parser.parseNext();
- },
- loadedAll: function() {
- parser.parseNext();
- }
- };
- var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));
- importer.observer = new Observer();
- function isImportLink(elt) {
- return isLinkRel(elt, IMPORT_LINK_TYPE);
- }
- function isLinkRel(elt, rel) {
- return elt.localName === "link" && elt.getAttribute("rel") === rel;
- }
- function hasBaseURIAccessor(doc) {
- return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
- }
- function makeDocument(resource, url) {
- var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
- doc._URL = url;
- var base = doc.createElement("base");
- base.setAttribute("href", url);
- if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
- Object.defineProperty(doc, "baseURI", {
- value: url
- });
- }
- var meta = doc.createElement("meta");
- meta.setAttribute("charset", "utf-8");
- doc.head.appendChild(meta);
- doc.head.appendChild(base);
- doc.body.innerHTML = resource;
- if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
- HTMLTemplateElement.bootstrap(doc);
- }
- return doc;
- }
- if (!document.baseURI) {
- var baseURIDescriptor = {
- get: function() {
- var base = document.querySelector("base");
- return base ? base.href : window.location.href;
- },
- configurable: true
- };
- Object.defineProperty(document, "baseURI", baseURIDescriptor);
- Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);
- }
- scope.importer = importer;
- scope.importLoader = importLoader;
-});
-
-HTMLImports.addModule(function(scope) {
- var parser = scope.parser;
- var importer = scope.importer;
- var dynamic = {
- added: function(nodes) {
- var owner, parsed, loading;
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- if (!owner) {
- owner = n.ownerDocument;
- parsed = parser.isParsed(owner);
- }
- loading = this.shouldLoadNode(n);
- if (loading) {
- importer.loadNode(n);
- }
- if (this.shouldParseNode(n) && parsed) {
- parser.parseDynamic(n, loading);
- }
- }
- },
- shouldLoadNode: function(node) {
- return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));
- },
- shouldParseNode: function(node) {
- return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));
- }
- };
- importer.observer.addCallback = dynamic.added.bind(dynamic);
- var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;
-});
-
-(function(scope) {
- var initializeModules = scope.initializeModules;
- var isIE = scope.isIE;
- if (scope.useNative) {
- return;
- }
- if (isIE && typeof window.CustomEvent !== "function") {
- window.CustomEvent = function(inType, params) {
- params = params || {};
- var e = document.createEvent("CustomEvent");
- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
- return e;
- };
- window.CustomEvent.prototype = window.Event.prototype;
- }
- initializeModules();
- var rootDocument = scope.rootDocument;
- function bootstrap() {
- HTMLImports.importer.bootDocument(rootDocument);
- }
- if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
- bootstrap();
- } else {
- document.addEventListener("DOMContentLoaded", bootstrap);
- }
-})(HTMLImports); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.min.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.min.js
deleted file mode 100644
index b30d76b3a29..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/HTMLImports.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var n=t[this.name];return n&&n[0]===t?n[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){E.push(e),_||(_=!0,f(n))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function n(){_=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();o(e),r.length&&(e.callback_(r,e),t=!0)}),t&&n()}function o(e){e.nodes_.forEach(function(t){var r=v.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var r=e;r;r=r.parentNode){var n=v.get(r);if(n)for(var o=0;o<n.length;o++){var i=n[o],a=i.options;if(r===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++L}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function c(e,t){return y=new s(e,t)}function u(e){return M?M:(M=d(y),M.oldValue=e,M)}function l(){y=M=void 0}function h(e){return e===M||e===y}function m(e,t){return e===t?e:M&&h(e)?M:null}function p(e,t,r){this.observer=e,this.target=t,this.options=r,this.transientObservedNodes=[]}var f,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))f=setTimeout;else if(window.setImmediate)f=window.setImmediate;else{var b=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=b;b=[],t.forEach(function(e){e()})}}),f=function(e){b.push(e),window.postMessage(g,"*")}}var _=!1,E=[],L=0;a.prototype={observe:function(e,t){if(e=r(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var n=v.get(e);n||v.set(e,n=[]);for(var o,i=0;i<n.length;i++)if(n[i].observer===this){o=n[i],o.removeListeners(),o.options=t;break}o||(o=new p(this,e,t),n.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),r=0;r<t.length;r++){var n=t[r];if(n.observer===this){n.removeListeners(),t.splice(r,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,M;p.prototype={enqueue:function(e){var r=this.observer.records_,n=r.length;if(r.length>0){var o=r[n-1],i=m(o,e);if(i)return void(r[n-1]=i)}else t(this.observer);r[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),r=0;r<t.length;r++)if(t[r]===this){t.splice(r,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,r=e.relatedNode.namespaceURI,n=e.target,o=new c("attributes",n);o.attributeName=t,o.attributeNamespace=r;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(n,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(r)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var n=e.target,o=c("characterData",n),a=e.prevValue;i(n,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,d,h=e.target;"DOMNodeInserted"===e.type?(s=[h],d=[]):(s=[],d=[h]);var m=h.previousSibling,p=h.nextSibling,o=c("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=d,o.previousSibling=m,o.nextSibling=p,i(e.relatedNode,function(e){return e.childList?o:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,n(function(){i(e,t)},t)}function r(e){return"complete"===e.readyState||e.readyState===b}function n(e,t){if(r(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===b)&&(t.removeEventListener(g,o),n(e,t))};t.addEventListener(g,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function r(){d==c&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function n(e){o(e),u.push(this),d++,r()}function i(e){l.push(this),d++,r()}var s=t.querySelectorAll("link[rel=import]"),d=0,c=s.length,u=[],l=[];if(c)for(var h,m=0;c>m&&(h=s[m]);m++)a(h)?(d++,r()):(h.addEventListener("load",n),h.addEventListener("error",i));else r()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}function c(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),m=function(e){return h?ShadowDOMPolyfill.wrapIfNeeded(e):e},p=m(document),f={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return m(e)},configurable:!0};Object.defineProperty(document,"_currentScript",f),Object.defineProperty(p,"_currentScript",f);var v=/Trident|Edge/.test(navigator.userAgent),b=v?"complete":"interactive",g="readystatechange";l&&(new MutationObserver(function(e){for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),r=0,n=t.length;n>r&&(e=t[r]);r++)c(e)}()),t(function(e){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(HTMLImports),function(e){var t=[],r=function(e){t.push(e)},n=function(){t.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=n}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,r=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(e,t){var r=e.ownerDocument,n=r.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,n),e},resolveUrlsInCssText:function(e,n,o){var i=this.replaceUrls(e,o,n,t);return i=this.replaceUrls(i,o,n,r)},replaceUrls:function(e,t,r,n){return e.replace(n,function(e,n,o,i){var a=o.replace(/["']/g,"");return r&&(a=new URL(a,r).href),t.href=a,a=t.href,n+"'"+a+"'"+i})}};e.path=n}),HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(r,n,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(r+="?"+Math.random()),i.open("GET",r,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var r=i.getResponseHeader("Location"),a=null;if(r)var a="/"===r.substr(0,1)?location.origin+r:r;n.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,r){this.load(e,t,r).responseType="document"}};e.xhr=t}),HTMLImports.addModule(function(e){var t=e.xhr,r=e.flags,n=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};n.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,n){if(r.load&&console.log("fetch",e,n),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,n,null,a)}.bind(this),0)}else{var s=function(t,r,o){this.receive(e,n,t,r,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,n,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,r,n,o){this.cache[e]=n;for(var i,a=this.pending[e],s=0,d=a.length;d>s&&(i=a[s]);s++)this.onload(e,i,n,r,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=n}),HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function r(e){var t=n(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function n(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var r=e.ownerDocument.baseURI,n=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+r+n+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var r=this,n=function(n){t&&t(n),r.markParsingComplete(e),r.parseNext()};if(e.addEventListener("load",n),e.addEventListener("error",n),c&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(i=a[d]);d++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(t){var n=document.createElement("script");n.__importElement=t,n.src=t.src?t.src:r(t),e.currentScript=t,this.trackElement(n,function(t){n.parentNode.removeChild(n),e.currentScript=null}),this.addElementToDocument(n)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,r){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var n,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(n=o[i]);i++)if(!this.isParsed(n))return this.hasResource(n)?t(n)?this.nextToParseInDoc(n["import"],n):n:void 0}return r},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),HTMLImports.addModule(function(e){function t(e){return r(e,a)}function r(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function n(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var r=document.implementation.createHTMLDocument(a);r._URL=t;var o=r.createElement("base");o.setAttribute("href",t),r.baseURI||n(r)||Object.defineProperty(r,"baseURI",{value:t});var i=r.createElement("meta");return i.setAttribute("charset","utf-8"),r.head.appendChild(i),r.head.appendChild(o),r.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(r),r}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,d=e.rootDocument,c=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){m.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===d?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,r,n,a,s){if(i.load&&console.log("loaded",e,r),r.__resource=n,r.__error=a,t(r)){var d=this.documents[e];void 0===d&&(d=a?null:o(n,s||e),d&&(d.__importLink=r,this.bootDocument(d)),this.documents[e]=d),r["import"]=d}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},m=new c(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(d,"baseURI",p)}e.importer=h,e.importLoader=m}),HTMLImports.addModule(function(e){var t=e.parser,r=e.importer,n={added:function(e){for(var n,o,i,a,s=0,d=e.length;d>s&&(a=e[s]);s++)n||(n=a.ownerDocument,o=t.isParsed(n)),i=this.shouldLoadNode(a),i&&r.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,r.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};r.observer.addCallback=n.added.bind(n);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var r=e.initializeModules,n=e.isIE;if(!e.useNative){n&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),r},window.CustomEvent.prototype=window.Event.prototype),r();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(HTMLImports); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/README.md b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/README.md
deleted file mode 100644
index 442af182e5c..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/README.md
+++ /dev/null
@@ -1,108 +0,0 @@
-webcomponents.js
-================
-
-[![Join the chat at https://gitter.im/webcomponents/webcomponentsjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webcomponents/webcomponentsjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
-
-**Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)).
-
-**HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)).
-
-**Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)).
-
-This also folds in polyfills for `MutationObserver` and `WeakMap`.
-
-
-## Releases
-
-Pre-built (concatenated & minified) versions of the polyfills are maintained in the [tagged versions](https://github.com/webcomponents/webcomponentsjs/releases) of this repo. There are two variants:
-
-`webcomponents.js` includes all of the polyfills.
-
-`webcomponents-lite.js` includes all polyfills except for shadow DOM.
-
-
-## Browser Support
-
-Our polyfills are intended to work in the latest versions of evergreen browsers. See below
-for our complete browser support matrix:
-
-| Polyfill | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* |
-| ---------- |:----:|:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|
-| Custom Elements | ~ | ✓ | ✓ | ✓ | ✓ | ✓| ✓ |
-| HTML Imports | ~ | ✓ | ✓ | ✓ | ✓| ✓| ✓ |
-| Shadow DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
-| Templates | ✓ | ✓ | ✓ | ✓| ✓ | ✓ | ✓ |
-
-
-*Indicates the current version of the browser
-
-~Indicates support may be flaky. If using Custom Elements or HTML Imports with Shadow DOM,
-you will get the non-flaky Mutation Observer polyfill that Shadow DOM includes.
-
-The polyfills may work in older browsers, however require additional polyfills (such as classList)
-to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
-
-
-### Manually Building
-
-If you wish to build the polyfills yourself, you'll need `node` and `gulp` on your system:
-
- * install [node.js](http://nodejs.org/) using the instructions on their website
- * use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
-
-Now you are ready to build the polyfills with:
-
- # install dependencies
- npm install
- # build
- gulp build
-
-The builds will be placed into the `dist/` directory.
-
-## Contribute
-
-See the [contributing guide](CONTRIBUTING.md)
-
-## License
-
-Everything in this repository is BSD style license unless otherwise specified.
-
-Copyright (c) 2015 The Polymer Authors. All rights reserved.
-
-## Known Issues
-
- * [Custom element's constructor property is unreliable](#constructor)
- * [Contenteditable elements do not trigger MutationObserver](#contentedit)
- * [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext)
- * [execCommand isn't supported under Shadow DOM](#execcommand)
-
-### Custom element's constructor property is unreliable <a id="constructor"></a>
-See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
-
-In Safari and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.
-
-It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)
-
-### Contenteditable elements do not trigger MutationObserver <a id="contentedit"></a>
-Using the MutationObserver polyfill, it isn't possible to monitor mutations of an element marked `contenteditable`.
-See [the mailing list](https://groups.google.com/forum/#!msg/polymer-dev/LHdtRVXXVsA/v1sGoiTYWUkJ)
-
-### ShadowCSS: :host-context(...):host(...) doesn't work <a id="hostcontext"></a>
-See [#16](https://github.com/webcomponents/webcomponentsjs/issues/16) for background.
-
-Under the shadow DOM polyfill, rules like:
-```
-:host-context(.foo):host(.bar) {...}
-```
-don't work, despite working under native Shadow DOM. The solution is to use `polyfill-next-selector` like:
-
-```
-polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; }
-```
-
-### execCommand and contenteditable isn't supported under Shadow DOM <a id="execcommand"></a>
-See [#212](https://github.com/webcomponents/webcomponentsjs/issues/212)
-
-`execCommand`, and `contenteditable` aren't supported under the ShadowDOM polyfill, with commands that insert or remove nodes being especially prone to failure.
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.js
deleted file mode 100644
index 96647356a00..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.js
+++ /dev/null
@@ -1,4387 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-if (typeof WeakMap === "undefined") {
- (function() {
- var defineProperty = Object.defineProperty;
- var counter = Date.now() % 1e9;
- var WeakMap = function() {
- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
- };
- WeakMap.prototype = {
- set: function(key, value) {
- var entry = key[this.name];
- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
- value: [ key, value ],
- writable: true
- });
- return this;
- },
- get: function(key) {
- var entry;
- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
- },
- "delete": function(key) {
- var entry = key[this.name];
- if (!entry || entry[0] !== key) return false;
- entry[0] = entry[1] = undefined;
- return true;
- },
- has: function(key) {
- var entry = key[this.name];
- if (!entry) return false;
- return entry[0] === key;
- }
- };
- window.WeakMap = WeakMap;
- })();
-}
-
-window.ShadowDOMPolyfill = {};
-
-(function(scope) {
- "use strict";
- var constructorTable = new WeakMap();
- var nativePrototypeTable = new WeakMap();
- var wrappers = Object.create(null);
- function detectEval() {
- if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) {
- return false;
- }
- if (navigator.getDeviceStorage) {
- return false;
- }
- try {
- var f = new Function("return true;");
- return f();
- } catch (ex) {
- return false;
- }
- }
- var hasEval = detectEval();
- function assert(b) {
- if (!b) throw new Error("Assertion failed");
- }
- var defineProperty = Object.defineProperty;
- var getOwnPropertyNames = Object.getOwnPropertyNames;
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- function mixin(to, from) {
- var names = getOwnPropertyNames(from);
- for (var i = 0; i < names.length; i++) {
- var name = names[i];
- defineProperty(to, name, getOwnPropertyDescriptor(from, name));
- }
- return to;
- }
- function mixinStatics(to, from) {
- var names = getOwnPropertyNames(from);
- for (var i = 0; i < names.length; i++) {
- var name = names[i];
- switch (name) {
- case "arguments":
- case "caller":
- case "length":
- case "name":
- case "prototype":
- case "toString":
- continue;
- }
- defineProperty(to, name, getOwnPropertyDescriptor(from, name));
- }
- return to;
- }
- function oneOf(object, propertyNames) {
- for (var i = 0; i < propertyNames.length; i++) {
- if (propertyNames[i] in object) return propertyNames[i];
- }
- }
- var nonEnumerableDataDescriptor = {
- value: undefined,
- configurable: true,
- enumerable: false,
- writable: true
- };
- function defineNonEnumerableDataProperty(object, name, value) {
- nonEnumerableDataDescriptor.value = value;
- defineProperty(object, name, nonEnumerableDataDescriptor);
- }
- getOwnPropertyNames(window);
- function getWrapperConstructor(node) {
- var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
- if (isFirefox) {
- try {
- getOwnPropertyNames(nativePrototype);
- } catch (error) {
- nativePrototype = nativePrototype.__proto__;
- }
- }
- var wrapperConstructor = constructorTable.get(nativePrototype);
- if (wrapperConstructor) return wrapperConstructor;
- var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
- var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
- registerInternal(nativePrototype, GeneratedWrapper, node);
- return GeneratedWrapper;
- }
- function addForwardingProperties(nativePrototype, wrapperPrototype) {
- installProperty(nativePrototype, wrapperPrototype, true);
- }
- function registerInstanceProperties(wrapperPrototype, instanceObject) {
- installProperty(instanceObject, wrapperPrototype, false);
- }
- var isFirefox = /Firefox/.test(navigator.userAgent);
- var dummyDescriptor = {
- get: function() {},
- set: function(v) {},
- configurable: true,
- enumerable: true
- };
- function isEventHandlerName(name) {
- return /^on[a-z]+$/.test(name);
- }
- function isIdentifierName(name) {
- return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);
- }
- function getGetter(name) {
- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {
- return this.__impl4cf1e782hg__[name];
- };
- }
- function getSetter(name) {
- return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) {
- this.__impl4cf1e782hg__[name] = v;
- };
- }
- function getMethod(name) {
- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() {
- return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments);
- };
- }
- function getDescriptor(source, name) {
- try {
- return Object.getOwnPropertyDescriptor(source, name);
- } catch (ex) {
- return dummyDescriptor;
- }
- }
- var isBrokenSafari = function() {
- var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType");
- return descr && !descr.get && !descr.set;
- }();
- function installProperty(source, target, allowMethod, opt_blacklist) {
- var names = getOwnPropertyNames(source);
- for (var i = 0; i < names.length; i++) {
- var name = names[i];
- if (name === "polymerBlackList_") continue;
- if (name in target) continue;
- if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue;
- if (isFirefox) {
- source.__lookupGetter__(name);
- }
- var descriptor = getDescriptor(source, name);
- var getter, setter;
- if (allowMethod && typeof descriptor.value === "function") {
- target[name] = getMethod(name);
- continue;
- }
- var isEvent = isEventHandlerName(name);
- if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name);
- if (descriptor.writable || descriptor.set || isBrokenSafari) {
- if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name);
- }
- var configurable = isBrokenSafari || descriptor.configurable;
- defineProperty(target, name, {
- get: getter,
- set: setter,
- configurable: configurable,
- enumerable: descriptor.enumerable
- });
- }
- }
- function register(nativeConstructor, wrapperConstructor, opt_instance) {
- var nativePrototype = nativeConstructor.prototype;
- registerInternal(nativePrototype, wrapperConstructor, opt_instance);
- mixinStatics(wrapperConstructor, nativeConstructor);
- }
- function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {
- var wrapperPrototype = wrapperConstructor.prototype;
- assert(constructorTable.get(nativePrototype) === undefined);
- constructorTable.set(nativePrototype, wrapperConstructor);
- nativePrototypeTable.set(wrapperPrototype, nativePrototype);
- addForwardingProperties(nativePrototype, wrapperPrototype);
- if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance);
- defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor);
- wrapperConstructor.prototype = wrapperPrototype;
- }
- function isWrapperFor(wrapperConstructor, nativeConstructor) {
- return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor;
- }
- function registerObject(object) {
- var nativePrototype = Object.getPrototypeOf(object);
- var superWrapperConstructor = getWrapperConstructor(nativePrototype);
- var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);
- registerInternal(nativePrototype, GeneratedWrapper, object);
- return GeneratedWrapper;
- }
- function createWrapperConstructor(superWrapperConstructor) {
- function GeneratedWrapper(node) {
- superWrapperConstructor.call(this, node);
- }
- var p = Object.create(superWrapperConstructor.prototype);
- p.constructor = GeneratedWrapper;
- GeneratedWrapper.prototype = p;
- return GeneratedWrapper;
- }
- function isWrapper(object) {
- return object && object.__impl4cf1e782hg__;
- }
- function isNative(object) {
- return !isWrapper(object);
- }
- function wrap(impl) {
- if (impl === null) return null;
- assert(isNative(impl));
- return impl.__wrapper8e3dd93a60__ || (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));
- }
- function unwrap(wrapper) {
- if (wrapper === null) return null;
- assert(isWrapper(wrapper));
- return wrapper.__impl4cf1e782hg__;
- }
- function unsafeUnwrap(wrapper) {
- return wrapper.__impl4cf1e782hg__;
- }
- function setWrapper(impl, wrapper) {
- wrapper.__impl4cf1e782hg__ = impl;
- impl.__wrapper8e3dd93a60__ = wrapper;
- }
- function unwrapIfNeeded(object) {
- return object && isWrapper(object) ? unwrap(object) : object;
- }
- function wrapIfNeeded(object) {
- return object && !isWrapper(object) ? wrap(object) : object;
- }
- function rewrap(node, wrapper) {
- if (wrapper === null) return;
- assert(isNative(node));
- assert(wrapper === undefined || isWrapper(wrapper));
- node.__wrapper8e3dd93a60__ = wrapper;
- }
- var getterDescriptor = {
- get: undefined,
- configurable: true,
- enumerable: true
- };
- function defineGetter(constructor, name, getter) {
- getterDescriptor.get = getter;
- defineProperty(constructor.prototype, name, getterDescriptor);
- }
- function defineWrapGetter(constructor, name) {
- defineGetter(constructor, name, function() {
- return wrap(this.__impl4cf1e782hg__[name]);
- });
- }
- function forwardMethodsToWrapper(constructors, names) {
- constructors.forEach(function(constructor) {
- names.forEach(function(name) {
- constructor.prototype[name] = function() {
- var w = wrapIfNeeded(this);
- return w[name].apply(w, arguments);
- };
- });
- });
- }
- scope.assert = assert;
- scope.constructorTable = constructorTable;
- scope.defineGetter = defineGetter;
- scope.defineWrapGetter = defineWrapGetter;
- scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
- scope.isIdentifierName = isIdentifierName;
- scope.isWrapper = isWrapper;
- scope.isWrapperFor = isWrapperFor;
- scope.mixin = mixin;
- scope.nativePrototypeTable = nativePrototypeTable;
- scope.oneOf = oneOf;
- scope.registerObject = registerObject;
- scope.registerWrapper = register;
- scope.rewrap = rewrap;
- scope.setWrapper = setWrapper;
- scope.unsafeUnwrap = unsafeUnwrap;
- scope.unwrap = unwrap;
- scope.unwrapIfNeeded = unwrapIfNeeded;
- scope.wrap = wrap;
- scope.wrapIfNeeded = wrapIfNeeded;
- scope.wrappers = wrappers;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- function newSplice(index, removed, addedCount) {
- return {
- index: index,
- removed: removed,
- addedCount: addedCount
- };
- }
- var EDIT_LEAVE = 0;
- var EDIT_UPDATE = 1;
- var EDIT_ADD = 2;
- var EDIT_DELETE = 3;
- function ArraySplice() {}
- ArraySplice.prototype = {
- calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {
- var rowCount = oldEnd - oldStart + 1;
- var columnCount = currentEnd - currentStart + 1;
- var distances = new Array(rowCount);
- for (var i = 0; i < rowCount; i++) {
- distances[i] = new Array(columnCount);
- distances[i][0] = i;
- }
- for (var j = 0; j < columnCount; j++) distances[0][j] = j;
- for (var i = 1; i < rowCount; i++) {
- for (var j = 1; j < columnCount; j++) {
- if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else {
- var north = distances[i - 1][j] + 1;
- var west = distances[i][j - 1] + 1;
- distances[i][j] = north < west ? north : west;
- }
- }
- }
- return distances;
- },
- spliceOperationsFromEditDistances: function(distances) {
- var i = distances.length - 1;
- var j = distances[0].length - 1;
- var current = distances[i][j];
- var edits = [];
- while (i > 0 || j > 0) {
- if (i == 0) {
- edits.push(EDIT_ADD);
- j--;
- continue;
- }
- if (j == 0) {
- edits.push(EDIT_DELETE);
- i--;
- continue;
- }
- var northWest = distances[i - 1][j - 1];
- var west = distances[i - 1][j];
- var north = distances[i][j - 1];
- var min;
- if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest;
- if (min == northWest) {
- if (northWest == current) {
- edits.push(EDIT_LEAVE);
- } else {
- edits.push(EDIT_UPDATE);
- current = northWest;
- }
- i--;
- j--;
- } else if (min == west) {
- edits.push(EDIT_DELETE);
- i--;
- current = west;
- } else {
- edits.push(EDIT_ADD);
- j--;
- current = north;
- }
- }
- edits.reverse();
- return edits;
- },
- calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {
- var prefixCount = 0;
- var suffixCount = 0;
- var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
- if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength);
- if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
- currentStart += prefixCount;
- oldStart += prefixCount;
- currentEnd -= suffixCount;
- oldEnd -= suffixCount;
- if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return [];
- if (currentStart == currentEnd) {
- var splice = newSplice(currentStart, [], 0);
- while (oldStart < oldEnd) splice.removed.push(old[oldStart++]);
- return [ splice ];
- } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ];
- var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
- var splice = undefined;
- var splices = [];
- var index = currentStart;
- var oldIndex = oldStart;
- for (var i = 0; i < ops.length; i++) {
- switch (ops[i]) {
- case EDIT_LEAVE:
- if (splice) {
- splices.push(splice);
- splice = undefined;
- }
- index++;
- oldIndex++;
- break;
-
- case EDIT_UPDATE:
- if (!splice) splice = newSplice(index, [], 0);
- splice.addedCount++;
- index++;
- splice.removed.push(old[oldIndex]);
- oldIndex++;
- break;
-
- case EDIT_ADD:
- if (!splice) splice = newSplice(index, [], 0);
- splice.addedCount++;
- index++;
- break;
-
- case EDIT_DELETE:
- if (!splice) splice = newSplice(index, [], 0);
- splice.removed.push(old[oldIndex]);
- oldIndex++;
- break;
- }
- }
- if (splice) {
- splices.push(splice);
- }
- return splices;
- },
- sharedPrefix: function(current, old, searchLength) {
- for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i;
- return searchLength;
- },
- sharedSuffix: function(current, old, searchLength) {
- var index1 = current.length;
- var index2 = old.length;
- var count = 0;
- while (count < searchLength && this.equals(current[--index1], old[--index2])) count++;
- return count;
- },
- calculateSplices: function(current, previous) {
- return this.calcSplices(current, 0, current.length, previous, 0, previous.length);
- },
- equals: function(currentValue, previousValue) {
- return currentValue === previousValue;
- }
- };
- scope.ArraySplice = ArraySplice;
-})(window.ShadowDOMPolyfill);
-
-(function(context) {
- "use strict";
- var OriginalMutationObserver = window.MutationObserver;
- var callbacks = [];
- var pending = false;
- var timerFunc;
- function handle() {
- pending = false;
- var copies = callbacks.slice(0);
- callbacks = [];
- for (var i = 0; i < copies.length; i++) {
- (0, copies[i])();
- }
- }
- if (OriginalMutationObserver) {
- var counter = 1;
- var observer = new OriginalMutationObserver(handle);
- var textNode = document.createTextNode(counter);
- observer.observe(textNode, {
- characterData: true
- });
- timerFunc = function() {
- counter = (counter + 1) % 2;
- textNode.data = counter;
- };
- } else {
- timerFunc = window.setTimeout;
- }
- function setEndOfMicrotask(func) {
- callbacks.push(func);
- if (pending) return;
- pending = true;
- timerFunc(handle, 0);
- }
- context.setEndOfMicrotask = setEndOfMicrotask;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var setEndOfMicrotask = scope.setEndOfMicrotask;
- var wrapIfNeeded = scope.wrapIfNeeded;
- var wrappers = scope.wrappers;
- var registrationsTable = new WeakMap();
- var globalMutationObservers = [];
- var isScheduled = false;
- function scheduleCallback(observer) {
- if (observer.scheduled_) return;
- observer.scheduled_ = true;
- globalMutationObservers.push(observer);
- if (isScheduled) return;
- setEndOfMicrotask(notifyObservers);
- isScheduled = true;
- }
- function notifyObservers() {
- isScheduled = false;
- while (globalMutationObservers.length) {
- var notifyList = globalMutationObservers;
- globalMutationObservers = [];
- notifyList.sort(function(x, y) {
- return x.uid_ - y.uid_;
- });
- for (var i = 0; i < notifyList.length; i++) {
- var mo = notifyList[i];
- mo.scheduled_ = false;
- var queue = mo.takeRecords();
- removeTransientObserversFor(mo);
- if (queue.length) {
- mo.callback_(queue, mo);
- }
- }
- }
- }
- function MutationRecord(type, target) {
- this.type = type;
- this.target = target;
- this.addedNodes = new wrappers.NodeList();
- this.removedNodes = new wrappers.NodeList();
- this.previousSibling = null;
- this.nextSibling = null;
- this.attributeName = null;
- this.attributeNamespace = null;
- this.oldValue = null;
- }
- function registerTransientObservers(ancestor, node) {
- for (;ancestor; ancestor = ancestor.parentNode) {
- var registrations = registrationsTable.get(ancestor);
- if (!registrations) continue;
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.options.subtree) registration.addTransientObserver(node);
- }
- }
- }
- function removeTransientObserversFor(observer) {
- for (var i = 0; i < observer.nodes_.length; i++) {
- var node = observer.nodes_[i];
- var registrations = registrationsTable.get(node);
- if (!registrations) return;
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- if (registration.observer === observer) registration.removeTransientObservers();
- }
- }
- }
- function enqueueMutation(target, type, data) {
- var interestedObservers = Object.create(null);
- var associatedStrings = Object.create(null);
- for (var node = target; node; node = node.parentNode) {
- var registrations = registrationsTable.get(node);
- if (!registrations) continue;
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- var options = registration.options;
- if (node !== target && !options.subtree) continue;
- if (type === "attributes" && !options.attributes) continue;
- if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) {
- continue;
- }
- if (type === "characterData" && !options.characterData) continue;
- if (type === "childList" && !options.childList) continue;
- var observer = registration.observer;
- interestedObservers[observer.uid_] = observer;
- if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) {
- associatedStrings[observer.uid_] = data.oldValue;
- }
- }
- }
- for (var uid in interestedObservers) {
- var observer = interestedObservers[uid];
- var record = new MutationRecord(type, target);
- if ("name" in data && "namespace" in data) {
- record.attributeName = data.name;
- record.attributeNamespace = data.namespace;
- }
- if (data.addedNodes) record.addedNodes = data.addedNodes;
- if (data.removedNodes) record.removedNodes = data.removedNodes;
- if (data.previousSibling) record.previousSibling = data.previousSibling;
- if (data.nextSibling) record.nextSibling = data.nextSibling;
- if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid];
- scheduleCallback(observer);
- observer.records_.push(record);
- }
- }
- var slice = Array.prototype.slice;
- function MutationObserverOptions(options) {
- this.childList = !!options.childList;
- this.subtree = !!options.subtree;
- if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) {
- this.attributes = true;
- } else {
- this.attributes = !!options.attributes;
- }
- if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData;
- if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) {
- throw new TypeError();
- }
- this.characterData = !!options.characterData;
- this.attributeOldValue = !!options.attributeOldValue;
- this.characterDataOldValue = !!options.characterDataOldValue;
- if ("attributeFilter" in options) {
- if (options.attributeFilter == null || typeof options.attributeFilter !== "object") {
- throw new TypeError();
- }
- this.attributeFilter = slice.call(options.attributeFilter);
- } else {
- this.attributeFilter = null;
- }
- }
- var uidCounter = 0;
- function MutationObserver(callback) {
- this.callback_ = callback;
- this.nodes_ = [];
- this.records_ = [];
- this.uid_ = ++uidCounter;
- this.scheduled_ = false;
- }
- MutationObserver.prototype = {
- constructor: MutationObserver,
- observe: function(target, options) {
- target = wrapIfNeeded(target);
- var newOptions = new MutationObserverOptions(options);
- var registration;
- var registrations = registrationsTable.get(target);
- if (!registrations) registrationsTable.set(target, registrations = []);
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i].observer === this) {
- registration = registrations[i];
- registration.removeTransientObservers();
- registration.options = newOptions;
- }
- }
- if (!registration) {
- registration = new Registration(this, target, newOptions);
- registrations.push(registration);
- this.nodes_.push(target);
- }
- },
- disconnect: function() {
- this.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.observer === this) {
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- this.records_ = [];
- },
- takeRecords: function() {
- var copyOfRecords = this.records_;
- this.records_ = [];
- return copyOfRecords;
- }
- };
- function Registration(observer, target, options) {
- this.observer = observer;
- this.target = target;
- this.options = options;
- this.transientObservedNodes = [];
- }
- Registration.prototype = {
- addTransientObserver: function(node) {
- if (node === this.target) return;
- scheduleCallback(this.observer);
- this.transientObservedNodes.push(node);
- var registrations = registrationsTable.get(node);
- if (!registrations) registrationsTable.set(node, registrations = []);
- registrations.push(this);
- },
- removeTransientObservers: function() {
- var transientObservedNodes = this.transientObservedNodes;
- this.transientObservedNodes = [];
- for (var i = 0; i < transientObservedNodes.length; i++) {
- var node = transientObservedNodes[i];
- var registrations = registrationsTable.get(node);
- for (var j = 0; j < registrations.length; j++) {
- if (registrations[j] === this) {
- registrations.splice(j, 1);
- break;
- }
- }
- }
- }
- };
- scope.enqueueMutation = enqueueMutation;
- scope.registerTransientObservers = registerTransientObservers;
- scope.wrappers.MutationObserver = MutationObserver;
- scope.wrappers.MutationRecord = MutationRecord;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- function TreeScope(root, parent) {
- this.root = root;
- this.parent = parent;
- }
- TreeScope.prototype = {
- get renderer() {
- if (this.root instanceof scope.wrappers.ShadowRoot) {
- return scope.getRendererForHost(this.root.host);
- }
- return null;
- },
- contains: function(treeScope) {
- for (;treeScope; treeScope = treeScope.parent) {
- if (treeScope === this) return true;
- }
- return false;
- }
- };
- function setTreeScope(node, treeScope) {
- if (node.treeScope_ !== treeScope) {
- node.treeScope_ = treeScope;
- for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {
- sr.treeScope_.parent = treeScope;
- }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- setTreeScope(child, treeScope);
- }
- }
- }
- function getTreeScope(node) {
- if (node instanceof scope.wrappers.Window) {
- debugger;
- }
- if (node.treeScope_) return node.treeScope_;
- var parent = node.parentNode;
- var treeScope;
- if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null);
- return node.treeScope_ = treeScope;
- }
- scope.TreeScope = TreeScope;
- scope.getTreeScope = getTreeScope;
- scope.setTreeScope = setTreeScope;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
- var getTreeScope = scope.getTreeScope;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrappers = scope.wrappers;
- var wrappedFuns = new WeakMap();
- var listenersTable = new WeakMap();
- var handledEventsTable = new WeakMap();
- var currentlyDispatchingEvents = new WeakMap();
- var targetTable = new WeakMap();
- var currentTargetTable = new WeakMap();
- var relatedTargetTable = new WeakMap();
- var eventPhaseTable = new WeakMap();
- var stopPropagationTable = new WeakMap();
- var stopImmediatePropagationTable = new WeakMap();
- var eventHandlersTable = new WeakMap();
- var eventPathTable = new WeakMap();
- function isShadowRoot(node) {
- return node instanceof wrappers.ShadowRoot;
- }
- function rootOfNode(node) {
- return getTreeScope(node).root;
- }
- function getEventPath(node, event) {
- var path = [];
- var current = node;
- path.push(current);
- while (current) {
- var destinationInsertionPoints = getDestinationInsertionPoints(current);
- if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {
- for (var i = 0; i < destinationInsertionPoints.length; i++) {
- var insertionPoint = destinationInsertionPoints[i];
- if (isShadowInsertionPoint(insertionPoint)) {
- var shadowRoot = rootOfNode(insertionPoint);
- var olderShadowRoot = shadowRoot.olderShadowRoot;
- if (olderShadowRoot) path.push(olderShadowRoot);
- }
- path.push(insertionPoint);
- }
- current = destinationInsertionPoints[destinationInsertionPoints.length - 1];
- } else {
- if (isShadowRoot(current)) {
- if (inSameTree(node, current) && eventMustBeStopped(event)) {
- break;
- }
- current = current.host;
- path.push(current);
- } else {
- current = current.parentNode;
- if (current) path.push(current);
- }
- }
- }
- return path;
- }
- function eventMustBeStopped(event) {
- if (!event) return false;
- switch (event.type) {
- case "abort":
- case "error":
- case "select":
- case "change":
- case "load":
- case "reset":
- case "resize":
- case "scroll":
- case "selectstart":
- return true;
- }
- return false;
- }
- function isShadowInsertionPoint(node) {
- return node instanceof HTMLShadowElement;
- }
- function getDestinationInsertionPoints(node) {
- return scope.getDestinationInsertionPoints(node);
- }
- function eventRetargetting(path, currentTarget) {
- if (path.length === 0) return currentTarget;
- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;
- var currentTargetTree = getTreeScope(currentTarget);
- var originalTarget = path[0];
- var originalTargetTree = getTreeScope(originalTarget);
- var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);
- for (var i = 0; i < path.length; i++) {
- var node = path[i];
- if (getTreeScope(node) === relativeTargetTree) return node;
- }
- return path[path.length - 1];
- }
- function getTreeScopeAncestors(treeScope) {
- var ancestors = [];
- for (;treeScope; treeScope = treeScope.parent) {
- ancestors.push(treeScope);
- }
- return ancestors;
- }
- function lowestCommonInclusiveAncestor(tsA, tsB) {
- var ancestorsA = getTreeScopeAncestors(tsA);
- var ancestorsB = getTreeScopeAncestors(tsB);
- var result = null;
- while (ancestorsA.length > 0 && ancestorsB.length > 0) {
- var a = ancestorsA.pop();
- var b = ancestorsB.pop();
- if (a === b) result = a; else break;
- }
- return result;
- }
- function getTreeScopeRoot(ts) {
- if (!ts.parent) return ts;
- return getTreeScopeRoot(ts.parent);
- }
- function relatedTargetResolution(event, currentTarget, relatedTarget) {
- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;
- var currentTargetTree = getTreeScope(currentTarget);
- var relatedTargetTree = getTreeScope(relatedTarget);
- var relatedTargetEventPath = getEventPath(relatedTarget, event);
- var lowestCommonAncestorTree;
- var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);
- if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root;
- for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) {
- var adjustedRelatedTarget;
- for (var i = 0; i < relatedTargetEventPath.length; i++) {
- var node = relatedTargetEventPath[i];
- if (getTreeScope(node) === commonAncestorTree) return node;
- }
- }
- return null;
- }
- function inSameTree(a, b) {
- return getTreeScope(a) === getTreeScope(b);
- }
- var NONE = 0;
- var CAPTURING_PHASE = 1;
- var AT_TARGET = 2;
- var BUBBLING_PHASE = 3;
- var pendingError;
- function dispatchOriginalEvent(originalEvent) {
- if (handledEventsTable.get(originalEvent)) return;
- handledEventsTable.set(originalEvent, true);
- dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));
- if (pendingError) {
- var err = pendingError;
- pendingError = null;
- throw err;
- }
- }
- function isLoadLikeEvent(event) {
- switch (event.type) {
- case "load":
- case "beforeunload":
- case "unload":
- return true;
- }
- return false;
- }
- function dispatchEvent(event, originalWrapperTarget) {
- if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError");
- currentlyDispatchingEvents.set(event, true);
- scope.renderAllPending();
- var eventPath;
- var overrideTarget;
- var win;
- if (isLoadLikeEvent(event) && !event.bubbles) {
- var doc = originalWrapperTarget;
- if (doc instanceof wrappers.Document && (win = doc.defaultView)) {
- overrideTarget = doc;
- eventPath = [];
- }
- }
- if (!eventPath) {
- if (originalWrapperTarget instanceof wrappers.Window) {
- win = originalWrapperTarget;
- eventPath = [];
- } else {
- eventPath = getEventPath(originalWrapperTarget, event);
- if (!isLoadLikeEvent(event)) {
- var doc = eventPath[eventPath.length - 1];
- if (doc instanceof wrappers.Document) win = doc.defaultView;
- }
- }
- }
- eventPathTable.set(event, eventPath);
- if (dispatchCapturing(event, eventPath, win, overrideTarget)) {
- if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {
- dispatchBubbling(event, eventPath, win, overrideTarget);
- }
- }
- eventPhaseTable.set(event, NONE);
- currentTargetTable.delete(event, null);
- currentlyDispatchingEvents.delete(event);
- return event.defaultPrevented;
- }
- function dispatchCapturing(event, eventPath, win, overrideTarget) {
- var phase = CAPTURING_PHASE;
- if (win) {
- if (!invoke(win, event, phase, eventPath, overrideTarget)) return false;
- }
- for (var i = eventPath.length - 1; i > 0; i--) {
- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false;
- }
- return true;
- }
- function dispatchAtTarget(event, eventPath, win, overrideTarget) {
- var phase = AT_TARGET;
- var currentTarget = eventPath[0] || win;
- return invoke(currentTarget, event, phase, eventPath, overrideTarget);
- }
- function dispatchBubbling(event, eventPath, win, overrideTarget) {
- var phase = BUBBLING_PHASE;
- for (var i = 1; i < eventPath.length; i++) {
- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return;
- }
- if (win && eventPath.length > 0) {
- invoke(win, event, phase, eventPath, overrideTarget);
- }
- }
- function invoke(currentTarget, event, phase, eventPath, overrideTarget) {
- var listeners = listenersTable.get(currentTarget);
- if (!listeners) return true;
- var target = overrideTarget || eventRetargetting(eventPath, currentTarget);
- if (target === currentTarget) {
- if (phase === CAPTURING_PHASE) return true;
- if (phase === BUBBLING_PHASE) phase = AT_TARGET;
- } else if (phase === BUBBLING_PHASE && !event.bubbles) {
- return true;
- }
- if ("relatedTarget" in event) {
- var originalEvent = unwrap(event);
- var unwrappedRelatedTarget = originalEvent.relatedTarget;
- if (unwrappedRelatedTarget) {
- if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) {
- var relatedTarget = wrap(unwrappedRelatedTarget);
- var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget);
- if (adjusted === target) return true;
- } else {
- adjusted = null;
- }
- relatedTargetTable.set(event, adjusted);
- }
- }
- eventPhaseTable.set(event, phase);
- var type = event.type;
- var anyRemoved = false;
- targetTable.set(event, target);
- currentTargetTable.set(event, currentTarget);
- listeners.depth++;
- for (var i = 0, len = listeners.length; i < len; i++) {
- var listener = listeners[i];
- if (listener.removed) {
- anyRemoved = true;
- continue;
- }
- if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) {
- continue;
- }
- try {
- if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event);
- if (stopImmediatePropagationTable.get(event)) return false;
- } catch (ex) {
- if (!pendingError) pendingError = ex;
- }
- }
- listeners.depth--;
- if (anyRemoved && listeners.depth === 0) {
- var copy = listeners.slice();
- listeners.length = 0;
- for (var i = 0; i < copy.length; i++) {
- if (!copy[i].removed) listeners.push(copy[i]);
- }
- }
- return !stopPropagationTable.get(event);
- }
- function Listener(type, handler, capture) {
- this.type = type;
- this.handler = handler;
- this.capture = Boolean(capture);
- }
- Listener.prototype = {
- equals: function(that) {
- return this.handler === that.handler && this.type === that.type && this.capture === that.capture;
- },
- get removed() {
- return this.handler === null;
- },
- remove: function() {
- this.handler = null;
- }
- };
- var OriginalEvent = window.Event;
- OriginalEvent.prototype.polymerBlackList_ = {
- returnValue: true,
- keyLocation: true
- };
- function Event(type, options) {
- if (type instanceof OriginalEvent) {
- var impl = type;
- if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) {
- return new BeforeUnloadEvent(impl);
- }
- setWrapper(impl, this);
- } else {
- return wrap(constructEvent(OriginalEvent, "Event", type, options));
- }
- }
- Event.prototype = {
- get target() {
- return targetTable.get(this);
- },
- get currentTarget() {
- return currentTargetTable.get(this);
- },
- get eventPhase() {
- return eventPhaseTable.get(this);
- },
- get path() {
- var eventPath = eventPathTable.get(this);
- if (!eventPath) return [];
- return eventPath.slice();
- },
- stopPropagation: function() {
- stopPropagationTable.set(this, true);
- },
- stopImmediatePropagation: function() {
- stopPropagationTable.set(this, true);
- stopImmediatePropagationTable.set(this, true);
- }
- };
- registerWrapper(OriginalEvent, Event, document.createEvent("Event"));
- function unwrapOptions(options) {
- if (!options || !options.relatedTarget) return options;
- return Object.create(options, {
- relatedTarget: {
- value: unwrap(options.relatedTarget)
- }
- });
- }
- function registerGenericEvent(name, SuperEvent, prototype) {
- var OriginalEvent = window[name];
- var GenericEvent = function(type, options) {
- if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options));
- };
- GenericEvent.prototype = Object.create(SuperEvent.prototype);
- if (prototype) mixin(GenericEvent.prototype, prototype);
- if (OriginalEvent) {
- try {
- registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp"));
- } catch (ex) {
- registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name));
- }
- }
- return GenericEvent;
- }
- var UIEvent = registerGenericEvent("UIEvent", Event);
- var CustomEvent = registerGenericEvent("CustomEvent", Event);
- var relatedTargetProto = {
- get relatedTarget() {
- var relatedTarget = relatedTargetTable.get(this);
- if (relatedTarget !== undefined) return relatedTarget;
- return wrap(unwrap(this).relatedTarget);
- }
- };
- function getInitFunction(name, relatedTargetIndex) {
- return function() {
- arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);
- var impl = unwrap(this);
- impl[name].apply(impl, arguments);
- };
- }
- var mouseEventProto = mixin({
- initMouseEvent: getInitFunction("initMouseEvent", 14)
- }, relatedTargetProto);
- var focusEventProto = mixin({
- initFocusEvent: getInitFunction("initFocusEvent", 5)
- }, relatedTargetProto);
- var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto);
- var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto);
- var defaultInitDicts = Object.create(null);
- var supportsEventConstructors = function() {
- try {
- new window.FocusEvent("focus");
- } catch (ex) {
- return false;
- }
- return true;
- }();
- function constructEvent(OriginalEvent, name, type, options) {
- if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options));
- var event = unwrap(document.createEvent(name));
- var defaultDict = defaultInitDicts[name];
- var args = [ type ];
- Object.keys(defaultDict).forEach(function(key) {
- var v = options != null && key in options ? options[key] : defaultDict[key];
- if (key === "relatedTarget") v = unwrap(v);
- args.push(v);
- });
- event["init" + name].apply(event, args);
- return event;
- }
- if (!supportsEventConstructors) {
- var configureEventConstructor = function(name, initDict, superName) {
- if (superName) {
- var superDict = defaultInitDicts[superName];
- initDict = mixin(mixin({}, superDict), initDict);
- }
- defaultInitDicts[name] = initDict;
- };
- configureEventConstructor("Event", {
- bubbles: false,
- cancelable: false
- });
- configureEventConstructor("CustomEvent", {
- detail: null
- }, "Event");
- configureEventConstructor("UIEvent", {
- view: null,
- detail: 0
- }, "Event");
- configureEventConstructor("MouseEvent", {
- screenX: 0,
- screenY: 0,
- clientX: 0,
- clientY: 0,
- ctrlKey: false,
- altKey: false,
- shiftKey: false,
- metaKey: false,
- button: 0,
- relatedTarget: null
- }, "UIEvent");
- configureEventConstructor("FocusEvent", {
- relatedTarget: null
- }, "UIEvent");
- }
- var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;
- function BeforeUnloadEvent(impl) {
- Event.call(this, impl);
- }
- BeforeUnloadEvent.prototype = Object.create(Event.prototype);
- mixin(BeforeUnloadEvent.prototype, {
- get returnValue() {
- return unsafeUnwrap(this).returnValue;
- },
- set returnValue(v) {
- unsafeUnwrap(this).returnValue = v;
- }
- });
- if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);
- function isValidListener(fun) {
- if (typeof fun === "function") return true;
- return fun && fun.handleEvent;
- }
- function isMutationEvent(type) {
- switch (type) {
- case "DOMAttrModified":
- case "DOMAttributeNameChanged":
- case "DOMCharacterDataModified":
- case "DOMElementNameChanged":
- case "DOMNodeInserted":
- case "DOMNodeInsertedIntoDocument":
- case "DOMNodeRemoved":
- case "DOMNodeRemovedFromDocument":
- case "DOMSubtreeModified":
- return true;
- }
- return false;
- }
- var OriginalEventTarget = window.EventTarget;
- function EventTarget(impl) {
- setWrapper(impl, this);
- }
- var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ];
- [ Node, Window ].forEach(function(constructor) {
- var p = constructor.prototype;
- methodNames.forEach(function(name) {
- Object.defineProperty(p, name + "_", {
- value: p[name]
- });
- });
- });
- function getTargetToListenAt(wrapper) {
- if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host;
- return unwrap(wrapper);
- }
- EventTarget.prototype = {
- addEventListener: function(type, fun, capture) {
- if (!isValidListener(fun) || isMutationEvent(type)) return;
- var listener = new Listener(type, fun, capture);
- var listeners = listenersTable.get(this);
- if (!listeners) {
- listeners = [];
- listeners.depth = 0;
- listenersTable.set(this, listeners);
- } else {
- for (var i = 0; i < listeners.length; i++) {
- if (listener.equals(listeners[i])) return;
- }
- }
- listeners.push(listener);
- var target = getTargetToListenAt(this);
- target.addEventListener_(type, dispatchOriginalEvent, true);
- },
- removeEventListener: function(type, fun, capture) {
- capture = Boolean(capture);
- var listeners = listenersTable.get(this);
- if (!listeners) return;
- var count = 0, found = false;
- for (var i = 0; i < listeners.length; i++) {
- if (listeners[i].type === type && listeners[i].capture === capture) {
- count++;
- if (listeners[i].handler === fun) {
- found = true;
- listeners[i].remove();
- }
- }
- }
- if (found && count === 1) {
- var target = getTargetToListenAt(this);
- target.removeEventListener_(type, dispatchOriginalEvent, true);
- }
- },
- dispatchEvent: function(event) {
- var nativeEvent = unwrap(event);
- var eventType = nativeEvent.type;
- handledEventsTable.set(nativeEvent, false);
- scope.renderAllPending();
- var tempListener;
- if (!hasListenerInAncestors(this, eventType)) {
- tempListener = function() {};
- this.addEventListener(eventType, tempListener, true);
- }
- try {
- return unwrap(this).dispatchEvent_(nativeEvent);
- } finally {
- if (tempListener) this.removeEventListener(eventType, tempListener, true);
- }
- }
- };
- function hasListener(node, type) {
- var listeners = listenersTable.get(node);
- if (listeners) {
- for (var i = 0; i < listeners.length; i++) {
- if (!listeners[i].removed && listeners[i].type === type) return true;
- }
- }
- return false;
- }
- function hasListenerInAncestors(target, type) {
- for (var node = unwrap(target); node; node = node.parentNode) {
- if (hasListener(wrap(node), type)) return true;
- }
- return false;
- }
- if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget);
- function wrapEventTargetMethods(constructors) {
- forwardMethodsToWrapper(constructors, methodNames);
- }
- var originalElementFromPoint = document.elementFromPoint;
- function elementFromPoint(self, document, x, y) {
- scope.renderAllPending();
- var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y));
- if (!element) return null;
- var path = getEventPath(element, null);
- var idx = path.lastIndexOf(self);
- if (idx == -1) return null; else path = path.slice(0, idx);
- return eventRetargetting(path, self);
- }
- function getEventHandlerGetter(name) {
- return function() {
- var inlineEventHandlers = eventHandlersTable.get(this);
- return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null;
- };
- }
- function getEventHandlerSetter(name) {
- var eventType = name.slice(2);
- return function(value) {
- var inlineEventHandlers = eventHandlersTable.get(this);
- if (!inlineEventHandlers) {
- inlineEventHandlers = Object.create(null);
- eventHandlersTable.set(this, inlineEventHandlers);
- }
- var old = inlineEventHandlers[name];
- if (old) this.removeEventListener(eventType, old.wrapped, false);
- if (typeof value === "function") {
- var wrapped = function(e) {
- var rv = value.call(this, e);
- if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv;
- };
- this.addEventListener(eventType, wrapped, false);
- inlineEventHandlers[name] = {
- value: value,
- wrapped: wrapped
- };
- }
- };
- }
- scope.elementFromPoint = elementFromPoint;
- scope.getEventHandlerGetter = getEventHandlerGetter;
- scope.getEventHandlerSetter = getEventHandlerSetter;
- scope.wrapEventTargetMethods = wrapEventTargetMethods;
- scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;
- scope.wrappers.CustomEvent = CustomEvent;
- scope.wrappers.Event = Event;
- scope.wrappers.EventTarget = EventTarget;
- scope.wrappers.FocusEvent = FocusEvent;
- scope.wrappers.MouseEvent = MouseEvent;
- scope.wrappers.UIEvent = UIEvent;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var UIEvent = scope.wrappers.UIEvent;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var OriginalTouchEvent = window.TouchEvent;
- if (!OriginalTouchEvent) return;
- var nativeEvent;
- try {
- nativeEvent = document.createEvent("TouchEvent");
- } catch (ex) {
- return;
- }
- var nonEnumDescriptor = {
- enumerable: false
- };
- function nonEnum(obj, prop) {
- Object.defineProperty(obj, prop, nonEnumDescriptor);
- }
- function Touch(impl) {
- setWrapper(impl, this);
- }
- Touch.prototype = {
- get target() {
- return wrap(unsafeUnwrap(this).target);
- }
- };
- var descr = {
- configurable: true,
- enumerable: true,
- get: null
- };
- [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) {
- descr.get = function() {
- return unsafeUnwrap(this)[name];
- };
- Object.defineProperty(Touch.prototype, name, descr);
- });
- function TouchList() {
- this.length = 0;
- nonEnum(this, "length");
- }
- TouchList.prototype = {
- item: function(index) {
- return this[index];
- }
- };
- function wrapTouchList(nativeTouchList) {
- var list = new TouchList();
- for (var i = 0; i < nativeTouchList.length; i++) {
- list[i] = new Touch(nativeTouchList[i]);
- }
- list.length = i;
- return list;
- }
- function TouchEvent(impl) {
- UIEvent.call(this, impl);
- }
- TouchEvent.prototype = Object.create(UIEvent.prototype);
- mixin(TouchEvent.prototype, {
- get touches() {
- return wrapTouchList(unsafeUnwrap(this).touches);
- },
- get targetTouches() {
- return wrapTouchList(unsafeUnwrap(this).targetTouches);
- },
- get changedTouches() {
- return wrapTouchList(unsafeUnwrap(this).changedTouches);
- },
- initTouchEvent: function() {
- throw new Error("Not implemented");
- }
- });
- registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);
- scope.wrappers.Touch = Touch;
- scope.wrappers.TouchEvent = TouchEvent;
- scope.wrappers.TouchList = TouchList;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var nonEnumDescriptor = {
- enumerable: false
- };
- function nonEnum(obj, prop) {
- Object.defineProperty(obj, prop, nonEnumDescriptor);
- }
- function NodeList() {
- this.length = 0;
- nonEnum(this, "length");
- }
- NodeList.prototype = {
- item: function(index) {
- return this[index];
- }
- };
- nonEnum(NodeList.prototype, "item");
- function wrapNodeList(list) {
- if (list == null) return list;
- var wrapperList = new NodeList();
- for (var i = 0, length = list.length; i < length; i++) {
- wrapperList[i] = wrap(list[i]);
- }
- wrapperList.length = length;
- return wrapperList;
- }
- function addWrapNodeListMethod(wrapperConstructor, name) {
- wrapperConstructor.prototype[name] = function() {
- return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments));
- };
- }
- scope.wrappers.NodeList = NodeList;
- scope.addWrapNodeListMethod = addWrapNodeListMethod;
- scope.wrapNodeList = wrapNodeList;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- scope.wrapHTMLCollection = scope.wrapNodeList;
- scope.wrappers.HTMLCollection = scope.wrappers.NodeList;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var EventTarget = scope.wrappers.EventTarget;
- var NodeList = scope.wrappers.NodeList;
- var TreeScope = scope.TreeScope;
- var assert = scope.assert;
- var defineWrapGetter = scope.defineWrapGetter;
- var enqueueMutation = scope.enqueueMutation;
- var getTreeScope = scope.getTreeScope;
- var isWrapper = scope.isWrapper;
- var mixin = scope.mixin;
- var registerTransientObservers = scope.registerTransientObservers;
- var registerWrapper = scope.registerWrapper;
- var setTreeScope = scope.setTreeScope;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var wrapIfNeeded = scope.wrapIfNeeded;
- var wrappers = scope.wrappers;
- function assertIsNodeWrapper(node) {
- assert(node instanceof Node);
- }
- function createOneElementNodeList(node) {
- var nodes = new NodeList();
- nodes[0] = node;
- nodes.length = 1;
- return nodes;
- }
- var surpressMutations = false;
- function enqueueRemovalForInsertedNodes(node, parent, nodes) {
- enqueueMutation(parent, "childList", {
- removedNodes: nodes,
- previousSibling: node.previousSibling,
- nextSibling: node.nextSibling
- });
- }
- function enqueueRemovalForInsertedDocumentFragment(df, nodes) {
- enqueueMutation(df, "childList", {
- removedNodes: nodes
- });
- }
- function collectNodes(node, parentNode, previousNode, nextNode) {
- if (node instanceof DocumentFragment) {
- var nodes = collectNodesForDocumentFragment(node);
- surpressMutations = true;
- for (var i = nodes.length - 1; i >= 0; i--) {
- node.removeChild(nodes[i]);
- nodes[i].parentNode_ = parentNode;
- }
- surpressMutations = false;
- for (var i = 0; i < nodes.length; i++) {
- nodes[i].previousSibling_ = nodes[i - 1] || previousNode;
- nodes[i].nextSibling_ = nodes[i + 1] || nextNode;
- }
- if (previousNode) previousNode.nextSibling_ = nodes[0];
- if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1];
- return nodes;
- }
- var nodes = createOneElementNodeList(node);
- var oldParent = node.parentNode;
- if (oldParent) {
- oldParent.removeChild(node);
- }
- node.parentNode_ = parentNode;
- node.previousSibling_ = previousNode;
- node.nextSibling_ = nextNode;
- if (previousNode) previousNode.nextSibling_ = node;
- if (nextNode) nextNode.previousSibling_ = node;
- return nodes;
- }
- function collectNodesNative(node) {
- if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node);
- var nodes = createOneElementNodeList(node);
- var oldParent = node.parentNode;
- if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes);
- return nodes;
- }
- function collectNodesForDocumentFragment(node) {
- var nodes = new NodeList();
- var i = 0;
- for (var child = node.firstChild; child; child = child.nextSibling) {
- nodes[i++] = child;
- }
- nodes.length = i;
- enqueueRemovalForInsertedDocumentFragment(node, nodes);
- return nodes;
- }
- function snapshotNodeList(nodeList) {
- return nodeList;
- }
- function nodeWasAdded(node, treeScope) {
- setTreeScope(node, treeScope);
- node.nodeIsInserted_();
- }
- function nodesWereAdded(nodes, parent) {
- var treeScope = getTreeScope(parent);
- for (var i = 0; i < nodes.length; i++) {
- nodeWasAdded(nodes[i], treeScope);
- }
- }
- function nodeWasRemoved(node) {
- setTreeScope(node, new TreeScope(node, null));
- }
- function nodesWereRemoved(nodes) {
- for (var i = 0; i < nodes.length; i++) {
- nodeWasRemoved(nodes[i]);
- }
- }
- function ensureSameOwnerDocument(parent, child) {
- var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument;
- if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child);
- }
- function adoptNodesIfNeeded(owner, nodes) {
- if (!nodes.length) return;
- var ownerDoc = owner.ownerDocument;
- if (ownerDoc === nodes[0].ownerDocument) return;
- for (var i = 0; i < nodes.length; i++) {
- scope.adoptNodeNoRemove(nodes[i], ownerDoc);
- }
- }
- function unwrapNodesForInsertion(owner, nodes) {
- adoptNodesIfNeeded(owner, nodes);
- var length = nodes.length;
- if (length === 1) return unwrap(nodes[0]);
- var df = unwrap(owner.ownerDocument.createDocumentFragment());
- for (var i = 0; i < length; i++) {
- df.appendChild(unwrap(nodes[i]));
- }
- return df;
- }
- function clearChildNodes(wrapper) {
- if (wrapper.firstChild_ !== undefined) {
- var child = wrapper.firstChild_;
- while (child) {
- var tmp = child;
- child = child.nextSibling_;
- tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;
- }
- }
- wrapper.firstChild_ = wrapper.lastChild_ = undefined;
- }
- function removeAllChildNodes(wrapper) {
- if (wrapper.invalidateShadowRenderer()) {
- var childWrapper = wrapper.firstChild;
- while (childWrapper) {
- assert(childWrapper.parentNode === wrapper);
- var nextSibling = childWrapper.nextSibling;
- var childNode = unwrap(childWrapper);
- var parentNode = childNode.parentNode;
- if (parentNode) originalRemoveChild.call(parentNode, childNode);
- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;
- childWrapper = nextSibling;
- }
- wrapper.firstChild_ = wrapper.lastChild_ = null;
- } else {
- var node = unwrap(wrapper);
- var child = node.firstChild;
- var nextSibling;
- while (child) {
- nextSibling = child.nextSibling;
- originalRemoveChild.call(node, child);
- child = nextSibling;
- }
- }
- }
- function invalidateParent(node) {
- var p = node.parentNode;
- return p && p.invalidateShadowRenderer();
- }
- function cleanupNodes(nodes) {
- for (var i = 0, n; i < nodes.length; i++) {
- n = nodes[i];
- n.parentNode.removeChild(n);
- }
- }
- var originalImportNode = document.importNode;
- var originalCloneNode = window.Node.prototype.cloneNode;
- function cloneNode(node, deep, opt_doc) {
- var clone;
- if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false));
- if (deep) {
- for (var child = node.firstChild; child; child = child.nextSibling) {
- clone.appendChild(cloneNode(child, true, opt_doc));
- }
- if (node instanceof wrappers.HTMLTemplateElement) {
- var cloneContent = clone.content;
- for (var child = node.content.firstChild; child; child = child.nextSibling) {
- cloneContent.appendChild(cloneNode(child, true, opt_doc));
- }
- }
- }
- return clone;
- }
- function contains(self, child) {
- if (!child || getTreeScope(self) !== getTreeScope(child)) return false;
- for (var node = child; node; node = node.parentNode) {
- if (node === self) return true;
- }
- return false;
- }
- var OriginalNode = window.Node;
- function Node(original) {
- assert(original instanceof OriginalNode);
- EventTarget.call(this, original);
- this.parentNode_ = undefined;
- this.firstChild_ = undefined;
- this.lastChild_ = undefined;
- this.nextSibling_ = undefined;
- this.previousSibling_ = undefined;
- this.treeScope_ = undefined;
- }
- var OriginalDocumentFragment = window.DocumentFragment;
- var originalAppendChild = OriginalNode.prototype.appendChild;
- var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;
- var originalIsEqualNode = OriginalNode.prototype.isEqualNode;
- var originalInsertBefore = OriginalNode.prototype.insertBefore;
- var originalRemoveChild = OriginalNode.prototype.removeChild;
- var originalReplaceChild = OriginalNode.prototype.replaceChild;
- var isIe = /Trident|Edge/.test(navigator.userAgent);
- var removeChildOriginalHelper = isIe ? function(parent, child) {
- try {
- originalRemoveChild.call(parent, child);
- } catch (ex) {
- if (!(parent instanceof OriginalDocumentFragment)) throw ex;
- }
- } : function(parent, child) {
- originalRemoveChild.call(parent, child);
- };
- Node.prototype = Object.create(EventTarget.prototype);
- mixin(Node.prototype, {
- appendChild: function(childWrapper) {
- return this.insertBefore(childWrapper, null);
- },
- insertBefore: function(childWrapper, refWrapper) {
- assertIsNodeWrapper(childWrapper);
- var refNode;
- if (refWrapper) {
- if (isWrapper(refWrapper)) {
- refNode = unwrap(refWrapper);
- } else {
- refNode = refWrapper;
- refWrapper = wrap(refNode);
- }
- } else {
- refWrapper = null;
- refNode = null;
- }
- refWrapper && assert(refWrapper.parentNode === this);
- var nodes;
- var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild;
- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper);
- if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper);
- if (useNative) {
- ensureSameOwnerDocument(this, childWrapper);
- clearChildNodes(this);
- originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode);
- } else {
- if (!previousNode) this.firstChild_ = nodes[0];
- if (!refWrapper) {
- this.lastChild_ = nodes[nodes.length - 1];
- if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild;
- }
- var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this);
- if (parentNode) {
- originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode);
- } else {
- adoptNodesIfNeeded(this, nodes);
- }
- }
- enqueueMutation(this, "childList", {
- addedNodes: nodes,
- nextSibling: refWrapper,
- previousSibling: previousNode
- });
- nodesWereAdded(nodes, this);
- return childWrapper;
- },
- removeChild: function(childWrapper) {
- assertIsNodeWrapper(childWrapper);
- if (childWrapper.parentNode !== this) {
- var found = false;
- var childNodes = this.childNodes;
- for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) {
- if (ieChild === childWrapper) {
- found = true;
- break;
- }
- }
- if (!found) {
- throw new Error("NotFoundError");
- }
- }
- var childNode = unwrap(childWrapper);
- var childWrapperNextSibling = childWrapper.nextSibling;
- var childWrapperPreviousSibling = childWrapper.previousSibling;
- if (this.invalidateShadowRenderer()) {
- var thisFirstChild = this.firstChild;
- var thisLastChild = this.lastChild;
- var parentNode = childNode.parentNode;
- if (parentNode) removeChildOriginalHelper(parentNode, childNode);
- if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling;
- if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling;
- if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;
- if (childWrapperNextSibling) {
- childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling;
- }
- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined;
- } else {
- clearChildNodes(this);
- removeChildOriginalHelper(unsafeUnwrap(this), childNode);
- }
- if (!surpressMutations) {
- enqueueMutation(this, "childList", {
- removedNodes: createOneElementNodeList(childWrapper),
- nextSibling: childWrapperNextSibling,
- previousSibling: childWrapperPreviousSibling
- });
- }
- registerTransientObservers(this, childWrapper);
- return childWrapper;
- },
- replaceChild: function(newChildWrapper, oldChildWrapper) {
- assertIsNodeWrapper(newChildWrapper);
- var oldChildNode;
- if (isWrapper(oldChildWrapper)) {
- oldChildNode = unwrap(oldChildWrapper);
- } else {
- oldChildNode = oldChildWrapper;
- oldChildWrapper = wrap(oldChildNode);
- }
- if (oldChildWrapper.parentNode !== this) {
- throw new Error("NotFoundError");
- }
- var nextNode = oldChildWrapper.nextSibling;
- var previousNode = oldChildWrapper.previousSibling;
- var nodes;
- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper);
- if (useNative) {
- nodes = collectNodesNative(newChildWrapper);
- } else {
- if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling;
- nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);
- }
- if (!useNative) {
- if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0];
- if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1];
- oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined;
- if (oldChildNode.parentNode) {
- originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode);
- }
- } else {
- ensureSameOwnerDocument(this, newChildWrapper);
- clearChildNodes(this);
- originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode);
- }
- enqueueMutation(this, "childList", {
- addedNodes: nodes,
- removedNodes: createOneElementNodeList(oldChildWrapper),
- nextSibling: nextNode,
- previousSibling: previousNode
- });
- nodeWasRemoved(oldChildWrapper);
- nodesWereAdded(nodes, this);
- return oldChildWrapper;
- },
- nodeIsInserted_: function() {
- for (var child = this.firstChild; child; child = child.nextSibling) {
- child.nodeIsInserted_();
- }
- },
- hasChildNodes: function() {
- return this.firstChild !== null;
- },
- get parentNode() {
- return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode);
- },
- get firstChild() {
- return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild);
- },
- get lastChild() {
- return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild);
- },
- get nextSibling() {
- return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling);
- },
- get previousSibling() {
- return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling);
- },
- get parentElement() {
- var p = this.parentNode;
- while (p && p.nodeType !== Node.ELEMENT_NODE) {
- p = p.parentNode;
- }
- return p;
- },
- get textContent() {
- var s = "";
- for (var child = this.firstChild; child; child = child.nextSibling) {
- if (child.nodeType != Node.COMMENT_NODE) {
- s += child.textContent;
- }
- }
- return s;
- },
- set textContent(textContent) {
- if (textContent == null) textContent = "";
- var removedNodes = snapshotNodeList(this.childNodes);
- if (this.invalidateShadowRenderer()) {
- removeAllChildNodes(this);
- if (textContent !== "") {
- var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent);
- this.appendChild(textNode);
- }
- } else {
- clearChildNodes(this);
- unsafeUnwrap(this).textContent = textContent;
- }
- var addedNodes = snapshotNodeList(this.childNodes);
- enqueueMutation(this, "childList", {
- addedNodes: addedNodes,
- removedNodes: removedNodes
- });
- nodesWereRemoved(removedNodes);
- nodesWereAdded(addedNodes, this);
- },
- get childNodes() {
- var wrapperList = new NodeList();
- var i = 0;
- for (var child = this.firstChild; child; child = child.nextSibling) {
- wrapperList[i++] = child;
- }
- wrapperList.length = i;
- return wrapperList;
- },
- cloneNode: function(deep) {
- return cloneNode(this, deep);
- },
- contains: function(child) {
- return contains(this, wrapIfNeeded(child));
- },
- compareDocumentPosition: function(otherNode) {
- return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
- },
- isEqualNode: function(otherNode) {
- return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
- },
- normalize: function() {
- var nodes = snapshotNodeList(this.childNodes);
- var remNodes = [];
- var s = "";
- var modNode;
- for (var i = 0, n; i < nodes.length; i++) {
- n = nodes[i];
- if (n.nodeType === Node.TEXT_NODE) {
- if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else {
- s += n.data;
- remNodes.push(n);
- }
- } else {
- if (modNode && remNodes.length) {
- modNode.data += s;
- cleanupNodes(remNodes);
- }
- remNodes = [];
- s = "";
- modNode = null;
- if (n.childNodes.length) n.normalize();
- }
- }
- if (modNode && remNodes.length) {
- modNode.data += s;
- cleanupNodes(remNodes);
- }
- }
- });
- defineWrapGetter(Node, "ownerDocument");
- registerWrapper(OriginalNode, Node, document.createDocumentFragment());
- delete Node.prototype.querySelector;
- delete Node.prototype.querySelectorAll;
- Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);
- scope.cloneNode = cloneNode;
- scope.nodeWasAdded = nodeWasAdded;
- scope.nodeWasRemoved = nodeWasRemoved;
- scope.nodesWereAdded = nodesWereAdded;
- scope.nodesWereRemoved = nodesWereRemoved;
- scope.originalInsertBefore = originalInsertBefore;
- scope.originalRemoveChild = originalRemoveChild;
- scope.snapshotNodeList = snapshotNodeList;
- scope.wrappers.Node = Node;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLCollection = scope.wrappers.HTMLCollection;
- var NodeList = scope.wrappers.NodeList;
- var getTreeScope = scope.getTreeScope;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var originalDocumentQuerySelector = document.querySelector;
- var originalElementQuerySelector = document.documentElement.querySelector;
- var originalDocumentQuerySelectorAll = document.querySelectorAll;
- var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;
- var originalDocumentGetElementsByTagName = document.getElementsByTagName;
- var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;
- var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;
- var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;
- var OriginalElement = window.Element;
- var OriginalDocument = window.HTMLDocument || window.Document;
- function filterNodeList(list, index, result, deep) {
- var wrappedItem = null;
- var root = null;
- for (var i = 0, length = list.length; i < length; i++) {
- wrappedItem = wrap(list[i]);
- if (!deep && (root = getTreeScope(wrappedItem).root)) {
- if (root instanceof scope.wrappers.ShadowRoot) {
- continue;
- }
- }
- result[index++] = wrappedItem;
- }
- return index;
- }
- function shimSelector(selector) {
- return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");
- }
- function shimMatchesSelector(selector) {
- return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");
- }
- function findOne(node, selector) {
- var m, el = node.firstElementChild;
- while (el) {
- if (el.matches(selector)) return el;
- m = findOne(el, selector);
- if (m) return m;
- el = el.nextElementSibling;
- }
- return null;
- }
- function matchesSelector(el, selector) {
- return el.matches(selector);
- }
- var XHTML_NS = "http://www.w3.org/1999/xhtml";
- function matchesTagName(el, localName, localNameLowerCase) {
- var ln = el.localName;
- return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS;
- }
- function matchesEveryThing() {
- return true;
- }
- function matchesLocalNameOnly(el, ns, localName) {
- return el.localName === localName;
- }
- function matchesNameSpace(el, ns) {
- return el.namespaceURI === ns;
- }
- function matchesLocalNameNS(el, ns, localName) {
- return el.namespaceURI === ns && el.localName === localName;
- }
- function findElements(node, index, result, p, arg0, arg1) {
- var el = node.firstElementChild;
- while (el) {
- if (p(el, arg0, arg1)) result[index++] = el;
- index = findElements(el, index, result, p, arg0, arg1);
- el = el.nextElementSibling;
- }
- return index;
- }
- function querySelectorAllFiltered(p, index, result, selector, deep) {
- var target = unsafeUnwrap(this);
- var list;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findElements(this, index, result, p, selector, null);
- } else if (target instanceof OriginalElement) {
- list = originalElementQuerySelectorAll.call(target, selector);
- } else if (target instanceof OriginalDocument) {
- list = originalDocumentQuerySelectorAll.call(target, selector);
- } else {
- return findElements(this, index, result, p, selector, null);
- }
- return filterNodeList(list, index, result, deep);
- }
- var SelectorsInterface = {
- querySelector: function(selector) {
- var shimmed = shimSelector(selector);
- var deep = shimmed !== selector;
- selector = shimmed;
- var target = unsafeUnwrap(this);
- var wrappedItem;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findOne(this, selector);
- } else if (target instanceof OriginalElement) {
- wrappedItem = wrap(originalElementQuerySelector.call(target, selector));
- } else if (target instanceof OriginalDocument) {
- wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));
- } else {
- return findOne(this, selector);
- }
- if (!wrappedItem) {
- return wrappedItem;
- } else if (!deep && (root = getTreeScope(wrappedItem).root)) {
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findOne(this, selector);
- }
- }
- return wrappedItem;
- },
- querySelectorAll: function(selector) {
- var shimmed = shimSelector(selector);
- var deep = shimmed !== selector;
- selector = shimmed;
- var result = new NodeList();
- result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep);
- return result;
- }
- };
- var MatchesInterface = {
- matches: function(selector) {
- selector = shimMatchesSelector(selector);
- return scope.originalMatches.call(unsafeUnwrap(this), selector);
- }
- };
- function getElementsByTagNameFiltered(p, index, result, localName, lowercase) {
- var target = unsafeUnwrap(this);
- var list;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findElements(this, index, result, p, localName, lowercase);
- } else if (target instanceof OriginalElement) {
- list = originalElementGetElementsByTagName.call(target, localName, lowercase);
- } else if (target instanceof OriginalDocument) {
- list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);
- } else {
- return findElements(this, index, result, p, localName, lowercase);
- }
- return filterNodeList(list, index, result, false);
- }
- function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {
- var target = unsafeUnwrap(this);
- var list;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findElements(this, index, result, p, ns, localName);
- } else if (target instanceof OriginalElement) {
- list = originalElementGetElementsByTagNameNS.call(target, ns, localName);
- } else if (target instanceof OriginalDocument) {
- list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);
- } else {
- return findElements(this, index, result, p, ns, localName);
- }
- return filterNodeList(list, index, result, false);
- }
- var GetElementsByInterface = {
- getElementsByTagName: function(localName) {
- var result = new HTMLCollection();
- var match = localName === "*" ? matchesEveryThing : matchesTagName;
- result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase());
- return result;
- },
- getElementsByClassName: function(className) {
- return this.querySelectorAll("." + className);
- },
- getElementsByTagNameNS: function(ns, localName) {
- var result = new HTMLCollection();
- var match = null;
- if (ns === "*") {
- match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly;
- } else {
- match = localName === "*" ? matchesNameSpace : matchesLocalNameNS;
- }
- result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName);
- return result;
- }
- };
- scope.GetElementsByInterface = GetElementsByInterface;
- scope.SelectorsInterface = SelectorsInterface;
- scope.MatchesInterface = MatchesInterface;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var NodeList = scope.wrappers.NodeList;
- function forwardElement(node) {
- while (node && node.nodeType !== Node.ELEMENT_NODE) {
- node = node.nextSibling;
- }
- return node;
- }
- function backwardsElement(node) {
- while (node && node.nodeType !== Node.ELEMENT_NODE) {
- node = node.previousSibling;
- }
- return node;
- }
- var ParentNodeInterface = {
- get firstElementChild() {
- return forwardElement(this.firstChild);
- },
- get lastElementChild() {
- return backwardsElement(this.lastChild);
- },
- get childElementCount() {
- var count = 0;
- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {
- count++;
- }
- return count;
- },
- get children() {
- var wrapperList = new NodeList();
- var i = 0;
- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {
- wrapperList[i++] = child;
- }
- wrapperList.length = i;
- return wrapperList;
- },
- remove: function() {
- var p = this.parentNode;
- if (p) p.removeChild(this);
- }
- };
- var ChildNodeInterface = {
- get nextElementSibling() {
- return forwardElement(this.nextSibling);
- },
- get previousElementSibling() {
- return backwardsElement(this.previousSibling);
- }
- };
- scope.ChildNodeInterface = ChildNodeInterface;
- scope.ParentNodeInterface = ParentNodeInterface;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var ChildNodeInterface = scope.ChildNodeInterface;
- var Node = scope.wrappers.Node;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var OriginalCharacterData = window.CharacterData;
- function CharacterData(node) {
- Node.call(this, node);
- }
- CharacterData.prototype = Object.create(Node.prototype);
- mixin(CharacterData.prototype, {
- get nodeValue() {
- return this.data;
- },
- set nodeValue(data) {
- this.data = data;
- },
- get textContent() {
- return this.data;
- },
- set textContent(value) {
- this.data = value;
- },
- get data() {
- return unsafeUnwrap(this).data;
- },
- set data(value) {
- var oldValue = unsafeUnwrap(this).data;
- enqueueMutation(this, "characterData", {
- oldValue: oldValue
- });
- unsafeUnwrap(this).data = value;
- }
- });
- mixin(CharacterData.prototype, ChildNodeInterface);
- registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode(""));
- scope.wrappers.CharacterData = CharacterData;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var CharacterData = scope.wrappers.CharacterData;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- function toUInt32(x) {
- return x >>> 0;
- }
- var OriginalText = window.Text;
- function Text(node) {
- CharacterData.call(this, node);
- }
- Text.prototype = Object.create(CharacterData.prototype);
- mixin(Text.prototype, {
- splitText: function(offset) {
- offset = toUInt32(offset);
- var s = this.data;
- if (offset > s.length) throw new Error("IndexSizeError");
- var head = s.slice(0, offset);
- var tail = s.slice(offset);
- this.data = head;
- var newTextNode = this.ownerDocument.createTextNode(tail);
- if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling);
- return newTextNode;
- }
- });
- registerWrapper(OriginalText, Text, document.createTextNode(""));
- scope.wrappers.Text = Text;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- if (!window.DOMTokenList) {
- console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH.");
- return;
- }
- var unsafeUnwrap = scope.unsafeUnwrap;
- var enqueueMutation = scope.enqueueMutation;
- function getClass(el) {
- return unsafeUnwrap(el).getAttribute("class");
- }
- function enqueueClassAttributeChange(el, oldValue) {
- enqueueMutation(el, "attributes", {
- name: "class",
- namespace: null,
- oldValue: oldValue
- });
- }
- function invalidateClass(el) {
- scope.invalidateRendererBasedOnAttribute(el, "class");
- }
- function changeClass(tokenList, method, args) {
- var ownerElement = tokenList.ownerElement_;
- if (ownerElement == null) {
- return method.apply(tokenList, args);
- }
- var oldValue = getClass(ownerElement);
- var retv = method.apply(tokenList, args);
- if (getClass(ownerElement) !== oldValue) {
- enqueueClassAttributeChange(ownerElement, oldValue);
- invalidateClass(ownerElement);
- }
- return retv;
- }
- var oldAdd = DOMTokenList.prototype.add;
- DOMTokenList.prototype.add = function() {
- changeClass(this, oldAdd, arguments);
- };
- var oldRemove = DOMTokenList.prototype.remove;
- DOMTokenList.prototype.remove = function() {
- changeClass(this, oldRemove, arguments);
- };
- var oldToggle = DOMTokenList.prototype.toggle;
- DOMTokenList.prototype.toggle = function() {
- return changeClass(this, oldToggle, arguments);
- };
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var ChildNodeInterface = scope.ChildNodeInterface;
- var GetElementsByInterface = scope.GetElementsByInterface;
- var Node = scope.wrappers.Node;
- var ParentNodeInterface = scope.ParentNodeInterface;
- var SelectorsInterface = scope.SelectorsInterface;
- var MatchesInterface = scope.MatchesInterface;
- var addWrapNodeListMethod = scope.addWrapNodeListMethod;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var oneOf = scope.oneOf;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrappers = scope.wrappers;
- var OriginalElement = window.Element;
- var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) {
- return OriginalElement.prototype[name];
- });
- var matchesName = matchesNames[0];
- var originalMatches = OriginalElement.prototype[matchesName];
- function invalidateRendererBasedOnAttribute(element, name) {
- var p = element.parentNode;
- if (!p || !p.shadowRoot) return;
- var renderer = scope.getRendererForHost(p);
- if (renderer.dependsOnAttribute(name)) renderer.invalidate();
- }
- function enqueAttributeChange(element, name, oldValue) {
- enqueueMutation(element, "attributes", {
- name: name,
- namespace: null,
- oldValue: oldValue
- });
- }
- var classListTable = new WeakMap();
- function Element(node) {
- Node.call(this, node);
- }
- Element.prototype = Object.create(Node.prototype);
- mixin(Element.prototype, {
- createShadowRoot: function() {
- var newShadowRoot = new wrappers.ShadowRoot(this);
- unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot;
- var renderer = scope.getRendererForHost(this);
- renderer.invalidate();
- return newShadowRoot;
- },
- get shadowRoot() {
- return unsafeUnwrap(this).polymerShadowRoot_ || null;
- },
- setAttribute: function(name, value) {
- var oldValue = unsafeUnwrap(this).getAttribute(name);
- unsafeUnwrap(this).setAttribute(name, value);
- enqueAttributeChange(this, name, oldValue);
- invalidateRendererBasedOnAttribute(this, name);
- },
- removeAttribute: function(name) {
- var oldValue = unsafeUnwrap(this).getAttribute(name);
- unsafeUnwrap(this).removeAttribute(name);
- enqueAttributeChange(this, name, oldValue);
- invalidateRendererBasedOnAttribute(this, name);
- },
- get classList() {
- var list = classListTable.get(this);
- if (!list) {
- list = unsafeUnwrap(this).classList;
- if (!list) return;
- list.ownerElement_ = this;
- classListTable.set(this, list);
- }
- return list;
- },
- get className() {
- return unsafeUnwrap(this).className;
- },
- set className(v) {
- this.setAttribute("class", v);
- },
- get id() {
- return unsafeUnwrap(this).id;
- },
- set id(v) {
- this.setAttribute("id", v);
- }
- });
- matchesNames.forEach(function(name) {
- if (name !== "matches") {
- Element.prototype[name] = function(selector) {
- return this.matches(selector);
- };
- }
- });
- if (OriginalElement.prototype.webkitCreateShadowRoot) {
- Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;
- }
- mixin(Element.prototype, ChildNodeInterface);
- mixin(Element.prototype, GetElementsByInterface);
- mixin(Element.prototype, ParentNodeInterface);
- mixin(Element.prototype, SelectorsInterface);
- mixin(Element.prototype, MatchesInterface);
- registerWrapper(OriginalElement, Element, document.createElementNS(null, "x"));
- scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;
- scope.matchesNames = matchesNames;
- scope.originalMatches = originalMatches;
- scope.wrappers.Element = Element;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var Element = scope.wrappers.Element;
- var defineGetter = scope.defineGetter;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var nodesWereAdded = scope.nodesWereAdded;
- var nodesWereRemoved = scope.nodesWereRemoved;
- var registerWrapper = scope.registerWrapper;
- var snapshotNodeList = scope.snapshotNodeList;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrappers = scope.wrappers;
- var escapeAttrRegExp = /[&\u00A0"]/g;
- var escapeDataRegExp = /[&\u00A0<>]/g;
- function escapeReplace(c) {
- switch (c) {
- case "&":
- return "&amp;";
-
- case "<":
- return "&lt;";
-
- case ">":
- return "&gt;";
-
- case '"':
- return "&quot;";
-
- case " ":
- return "&nbsp;";
- }
- }
- function escapeAttr(s) {
- return s.replace(escapeAttrRegExp, escapeReplace);
- }
- function escapeData(s) {
- return s.replace(escapeDataRegExp, escapeReplace);
- }
- function makeSet(arr) {
- var set = {};
- for (var i = 0; i < arr.length; i++) {
- set[arr[i]] = true;
- }
- return set;
- }
- var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);
- var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);
- function getOuterHTML(node, parentNode) {
- switch (node.nodeType) {
- case Node.ELEMENT_NODE:
- var tagName = node.tagName.toLowerCase();
- var s = "<" + tagName;
- var attrs = node.attributes;
- for (var i = 0, attr; attr = attrs[i]; i++) {
- s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';
- }
- s += ">";
- if (voidElements[tagName]) return s;
- return s + getInnerHTML(node) + "</" + tagName + ">";
-
- case Node.TEXT_NODE:
- var data = node.data;
- if (parentNode && plaintextParents[parentNode.localName]) return data;
- return escapeData(data);
-
- case Node.COMMENT_NODE:
- return "<!--" + node.data + "-->";
-
- default:
- console.error(node);
- throw new Error("not implemented");
- }
- }
- function getInnerHTML(node) {
- if (node instanceof wrappers.HTMLTemplateElement) node = node.content;
- var s = "";
- for (var child = node.firstChild; child; child = child.nextSibling) {
- s += getOuterHTML(child, node);
- }
- return s;
- }
- function setInnerHTML(node, value, opt_tagName) {
- var tagName = opt_tagName || "div";
- node.textContent = "";
- var tempElement = unwrap(node.ownerDocument.createElement(tagName));
- tempElement.innerHTML = value;
- var firstChild;
- while (firstChild = tempElement.firstChild) {
- node.appendChild(wrap(firstChild));
- }
- }
- var oldIe = /MSIE/.test(navigator.userAgent);
- var OriginalHTMLElement = window.HTMLElement;
- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
- function HTMLElement(node) {
- Element.call(this, node);
- }
- HTMLElement.prototype = Object.create(Element.prototype);
- mixin(HTMLElement.prototype, {
- get innerHTML() {
- return getInnerHTML(this);
- },
- set innerHTML(value) {
- if (oldIe && plaintextParents[this.localName]) {
- this.textContent = value;
- return;
- }
- var removedNodes = snapshotNodeList(this.childNodes);
- if (this.invalidateShadowRenderer()) {
- if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName);
- } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) {
- setInnerHTML(this.content, value);
- } else {
- unsafeUnwrap(this).innerHTML = value;
- }
- var addedNodes = snapshotNodeList(this.childNodes);
- enqueueMutation(this, "childList", {
- addedNodes: addedNodes,
- removedNodes: removedNodes
- });
- nodesWereRemoved(removedNodes);
- nodesWereAdded(addedNodes, this);
- },
- get outerHTML() {
- return getOuterHTML(this, this.parentNode);
- },
- set outerHTML(value) {
- var p = this.parentNode;
- if (p) {
- p.invalidateShadowRenderer();
- var df = frag(p, value);
- p.replaceChild(df, this);
- }
- },
- insertAdjacentHTML: function(position, text) {
- var contextElement, refNode;
- switch (String(position).toLowerCase()) {
- case "beforebegin":
- contextElement = this.parentNode;
- refNode = this;
- break;
-
- case "afterend":
- contextElement = this.parentNode;
- refNode = this.nextSibling;
- break;
-
- case "afterbegin":
- contextElement = this;
- refNode = this.firstChild;
- break;
-
- case "beforeend":
- contextElement = this;
- refNode = null;
- break;
-
- default:
- return;
- }
- var df = frag(contextElement, text);
- contextElement.insertBefore(df, refNode);
- },
- get hidden() {
- return this.hasAttribute("hidden");
- },
- set hidden(v) {
- if (v) {
- this.setAttribute("hidden", "");
- } else {
- this.removeAttribute("hidden");
- }
- }
- });
- function frag(contextElement, html) {
- var p = unwrap(contextElement.cloneNode(false));
- p.innerHTML = html;
- var df = unwrap(document.createDocumentFragment());
- var c;
- while (c = p.firstChild) {
- df.appendChild(c);
- }
- return wrap(df);
- }
- function getter(name) {
- return function() {
- scope.renderAllPending();
- return unsafeUnwrap(this)[name];
- };
- }
- function getterRequiresRendering(name) {
- defineGetter(HTMLElement, name, getter(name));
- }
- [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering);
- function getterAndSetterRequiresRendering(name) {
- Object.defineProperty(HTMLElement.prototype, name, {
- get: getter(name),
- set: function(v) {
- scope.renderAllPending();
- unsafeUnwrap(this)[name] = v;
- },
- configurable: true,
- enumerable: true
- });
- }
- [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering);
- function methodRequiresRendering(name) {
- Object.defineProperty(HTMLElement.prototype, name, {
- value: function() {
- scope.renderAllPending();
- return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments);
- },
- configurable: true,
- enumerable: true
- });
- }
- [ "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
- registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));
- scope.wrappers.HTMLElement = HTMLElement;
- scope.getInnerHTML = getInnerHTML;
- scope.setInnerHTML = setInnerHTML;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var OriginalHTMLCanvasElement = window.HTMLCanvasElement;
- function HTMLCanvasElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLCanvasElement.prototype, {
- getContext: function() {
- var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments);
- return context && wrap(context);
- }
- });
- registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas"));
- scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLContentElement = window.HTMLContentElement;
- function HTMLContentElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLContentElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLContentElement.prototype, {
- constructor: HTMLContentElement,
- get select() {
- return this.getAttribute("select");
- },
- set select(value) {
- this.setAttribute("select", value);
- },
- setAttribute: function(n, v) {
- HTMLElement.prototype.setAttribute.call(this, n, v);
- if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true);
- }
- });
- if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement);
- scope.wrappers.HTMLContentElement = HTMLContentElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var unwrap = scope.unwrap;
- var OriginalHTMLFormElement = window.HTMLFormElement;
- function HTMLFormElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLFormElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLFormElement.prototype, {
- get elements() {
- return wrapHTMLCollection(unwrap(this).elements);
- }
- });
- registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form"));
- scope.wrappers.HTMLFormElement = HTMLFormElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var rewrap = scope.rewrap;
- var OriginalHTMLImageElement = window.HTMLImageElement;
- function HTMLImageElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLImageElement.prototype = Object.create(HTMLElement.prototype);
- registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img"));
- function Image(width, height) {
- if (!(this instanceof Image)) {
- throw new TypeError("DOM object constructor cannot be called as a function.");
- }
- var node = unwrap(document.createElement("img"));
- HTMLElement.call(this, node);
- rewrap(node, this);
- if (width !== undefined) node.width = width;
- if (height !== undefined) node.height = height;
- }
- Image.prototype = HTMLImageElement.prototype;
- scope.wrappers.HTMLImageElement = HTMLImageElement;
- scope.wrappers.Image = Image;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var NodeList = scope.wrappers.NodeList;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLShadowElement = window.HTMLShadowElement;
- function HTMLShadowElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);
- HTMLShadowElement.prototype.constructor = HTMLShadowElement;
- if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);
- scope.wrappers.HTMLShadowElement = HTMLShadowElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var contentTable = new WeakMap();
- var templateContentsOwnerTable = new WeakMap();
- function getTemplateContentsOwner(doc) {
- if (!doc.defaultView) return doc;
- var d = templateContentsOwnerTable.get(doc);
- if (!d) {
- d = doc.implementation.createHTMLDocument("");
- while (d.lastChild) {
- d.removeChild(d.lastChild);
- }
- templateContentsOwnerTable.set(doc, d);
- }
- return d;
- }
- function extractContent(templateElement) {
- var doc = getTemplateContentsOwner(templateElement.ownerDocument);
- var df = unwrap(doc.createDocumentFragment());
- var child;
- while (child = templateElement.firstChild) {
- df.appendChild(child);
- }
- return df;
- }
- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
- function HTMLTemplateElement(node) {
- HTMLElement.call(this, node);
- if (!OriginalHTMLTemplateElement) {
- var content = extractContent(node);
- contentTable.set(this, wrap(content));
- }
- }
- HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTemplateElement.prototype, {
- constructor: HTMLTemplateElement,
- get content() {
- if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content);
- return contentTable.get(this);
- }
- });
- if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);
- scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLMediaElement = window.HTMLMediaElement;
- if (!OriginalHTMLMediaElement) return;
- function HTMLMediaElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);
- registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio"));
- scope.wrappers.HTMLMediaElement = HTMLMediaElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLMediaElement = scope.wrappers.HTMLMediaElement;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var rewrap = scope.rewrap;
- var OriginalHTMLAudioElement = window.HTMLAudioElement;
- if (!OriginalHTMLAudioElement) return;
- function HTMLAudioElement(node) {
- HTMLMediaElement.call(this, node);
- }
- HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);
- registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio"));
- function Audio(src) {
- if (!(this instanceof Audio)) {
- throw new TypeError("DOM object constructor cannot be called as a function.");
- }
- var node = unwrap(document.createElement("audio"));
- HTMLMediaElement.call(this, node);
- rewrap(node, this);
- node.setAttribute("preload", "auto");
- if (src !== undefined) node.setAttribute("src", src);
- }
- Audio.prototype = HTMLAudioElement.prototype;
- scope.wrappers.HTMLAudioElement = HTMLAudioElement;
- scope.wrappers.Audio = Audio;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var rewrap = scope.rewrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLOptionElement = window.HTMLOptionElement;
- function trimText(s) {
- return s.replace(/\s+/g, " ").trim();
- }
- function HTMLOptionElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLOptionElement.prototype, {
- get text() {
- return trimText(this.textContent);
- },
- set text(value) {
- this.textContent = trimText(String(value));
- },
- get form() {
- return wrap(unwrap(this).form);
- }
- });
- registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option"));
- function Option(text, value, defaultSelected, selected) {
- if (!(this instanceof Option)) {
- throw new TypeError("DOM object constructor cannot be called as a function.");
- }
- var node = unwrap(document.createElement("option"));
- HTMLElement.call(this, node);
- rewrap(node, this);
- if (text !== undefined) node.text = text;
- if (value !== undefined) node.setAttribute("value", value);
- if (defaultSelected === true) node.setAttribute("selected", "");
- node.selected = selected === true;
- }
- Option.prototype = HTMLOptionElement.prototype;
- scope.wrappers.HTMLOptionElement = HTMLOptionElement;
- scope.wrappers.Option = Option;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLSelectElement = window.HTMLSelectElement;
- function HTMLSelectElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLSelectElement.prototype, {
- add: function(element, before) {
- if (typeof before === "object") before = unwrap(before);
- unwrap(this).add(unwrap(element), before);
- },
- remove: function(indexOrNode) {
- if (indexOrNode === undefined) {
- HTMLElement.prototype.remove.call(this);
- return;
- }
- if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode);
- unwrap(this).remove(indexOrNode);
- },
- get form() {
- return wrap(unwrap(this).form);
- }
- });
- registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select"));
- scope.wrappers.HTMLSelectElement = HTMLSelectElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var OriginalHTMLTableElement = window.HTMLTableElement;
- function HTMLTableElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLTableElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTableElement.prototype, {
- get caption() {
- return wrap(unwrap(this).caption);
- },
- createCaption: function() {
- return wrap(unwrap(this).createCaption());
- },
- get tHead() {
- return wrap(unwrap(this).tHead);
- },
- createTHead: function() {
- return wrap(unwrap(this).createTHead());
- },
- createTFoot: function() {
- return wrap(unwrap(this).createTFoot());
- },
- get tFoot() {
- return wrap(unwrap(this).tFoot);
- },
- get tBodies() {
- return wrapHTMLCollection(unwrap(this).tBodies);
- },
- createTBody: function() {
- return wrap(unwrap(this).createTBody());
- },
- get rows() {
- return wrapHTMLCollection(unwrap(this).rows);
- },
- insertRow: function(index) {
- return wrap(unwrap(this).insertRow(index));
- }
- });
- registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table"));
- scope.wrappers.HTMLTableElement = HTMLTableElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;
- function HTMLTableSectionElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTableSectionElement.prototype, {
- constructor: HTMLTableSectionElement,
- get rows() {
- return wrapHTMLCollection(unwrap(this).rows);
- },
- insertRow: function(index) {
- return wrap(unwrap(this).insertRow(index));
- }
- });
- registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead"));
- scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLTableRowElement = window.HTMLTableRowElement;
- function HTMLTableRowElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTableRowElement.prototype, {
- get cells() {
- return wrapHTMLCollection(unwrap(this).cells);
- },
- insertCell: function(index) {
- return wrap(unwrap(this).insertCell(index));
- }
- });
- registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr"));
- scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLContentElement = scope.wrappers.HTMLContentElement;
- var HTMLElement = scope.wrappers.HTMLElement;
- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
- var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLUnknownElement = window.HTMLUnknownElement;
- function HTMLUnknownElement(node) {
- switch (node.localName) {
- case "content":
- return new HTMLContentElement(node);
-
- case "shadow":
- return new HTMLShadowElement(node);
-
- case "template":
- return new HTMLTemplateElement(node);
- }
- HTMLElement.call(this, node);
- }
- HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);
- registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);
- scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var Element = scope.wrappers.Element;
- var HTMLElement = scope.wrappers.HTMLElement;
- var registerObject = scope.registerObject;
- var defineWrapGetter = scope.defineWrapGetter;
- var SVG_NS = "http://www.w3.org/2000/svg";
- var svgTitleElement = document.createElementNS(SVG_NS, "title");
- var SVGTitleElement = registerObject(svgTitleElement);
- var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
- if (!("classList" in svgTitleElement)) {
- var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
- Object.defineProperty(HTMLElement.prototype, "classList", descr);
- delete Element.prototype.classList;
- }
- defineWrapGetter(SVGElement, "ownerSVGElement");
- scope.wrappers.SVGElement = SVGElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalSVGUseElement = window.SVGUseElement;
- var SVG_NS = "http://www.w3.org/2000/svg";
- var gWrapper = wrap(document.createElementNS(SVG_NS, "g"));
- var useElement = document.createElementNS(SVG_NS, "use");
- var SVGGElement = gWrapper.constructor;
- var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);
- var parentInterface = parentInterfacePrototype.constructor;
- function SVGUseElement(impl) {
- parentInterface.call(this, impl);
- }
- SVGUseElement.prototype = Object.create(parentInterfacePrototype);
- if ("instanceRoot" in useElement) {
- mixin(SVGUseElement.prototype, {
- get instanceRoot() {
- return wrap(unwrap(this).instanceRoot);
- },
- get animatedInstanceRoot() {
- return wrap(unwrap(this).animatedInstanceRoot);
- }
- });
- }
- registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);
- scope.wrappers.SVGUseElement = SVGUseElement;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var EventTarget = scope.wrappers.EventTarget;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var OriginalSVGElementInstance = window.SVGElementInstance;
- if (!OriginalSVGElementInstance) return;
- function SVGElementInstance(impl) {
- EventTarget.call(this, impl);
- }
- SVGElementInstance.prototype = Object.create(EventTarget.prototype);
- mixin(SVGElementInstance.prototype, {
- get correspondingElement() {
- return wrap(unsafeUnwrap(this).correspondingElement);
- },
- get correspondingUseElement() {
- return wrap(unsafeUnwrap(this).correspondingUseElement);
- },
- get parentNode() {
- return wrap(unsafeUnwrap(this).parentNode);
- },
- get childNodes() {
- throw new Error("Not implemented");
- },
- get firstChild() {
- return wrap(unsafeUnwrap(this).firstChild);
- },
- get lastChild() {
- return wrap(unsafeUnwrap(this).lastChild);
- },
- get previousSibling() {
- return wrap(unsafeUnwrap(this).previousSibling);
- },
- get nextSibling() {
- return wrap(unsafeUnwrap(this).nextSibling);
- }
- });
- registerWrapper(OriginalSVGElementInstance, SVGElementInstance);
- scope.wrappers.SVGElementInstance = SVGElementInstance;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;
- function CanvasRenderingContext2D(impl) {
- setWrapper(impl, this);
- }
- mixin(CanvasRenderingContext2D.prototype, {
- get canvas() {
- return wrap(unsafeUnwrap(this).canvas);
- },
- drawImage: function() {
- arguments[0] = unwrapIfNeeded(arguments[0]);
- unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments);
- },
- createPattern: function() {
- arguments[0] = unwrap(arguments[0]);
- return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments);
- }
- });
- registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d"));
- scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalWebGLRenderingContext = window.WebGLRenderingContext;
- if (!OriginalWebGLRenderingContext) return;
- function WebGLRenderingContext(impl) {
- setWrapper(impl, this);
- }
- mixin(WebGLRenderingContext.prototype, {
- get canvas() {
- return wrap(unsafeUnwrap(this).canvas);
- },
- texImage2D: function() {
- arguments[5] = unwrapIfNeeded(arguments[5]);
- unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);
- },
- texSubImage2D: function() {
- arguments[6] = unwrapIfNeeded(arguments[6]);
- unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);
- }
- });
- var instanceProperties = /WebKit/.test(navigator.userAgent) ? {
- drawingBufferHeight: null,
- drawingBufferWidth: null
- } : {};
- registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);
- scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var GetElementsByInterface = scope.GetElementsByInterface;
- var ParentNodeInterface = scope.ParentNodeInterface;
- var SelectorsInterface = scope.SelectorsInterface;
- var mixin = scope.mixin;
- var registerObject = scope.registerObject;
- var DocumentFragment = registerObject(document.createDocumentFragment());
- mixin(DocumentFragment.prototype, ParentNodeInterface);
- mixin(DocumentFragment.prototype, SelectorsInterface);
- mixin(DocumentFragment.prototype, GetElementsByInterface);
- var Comment = registerObject(document.createComment(""));
- scope.wrappers.Comment = Comment;
- scope.wrappers.DocumentFragment = DocumentFragment;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var DocumentFragment = scope.wrappers.DocumentFragment;
- var TreeScope = scope.TreeScope;
- var elementFromPoint = scope.elementFromPoint;
- var getInnerHTML = scope.getInnerHTML;
- var getTreeScope = scope.getTreeScope;
- var mixin = scope.mixin;
- var rewrap = scope.rewrap;
- var setInnerHTML = scope.setInnerHTML;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var shadowHostTable = new WeakMap();
- var nextOlderShadowTreeTable = new WeakMap();
- var spaceCharRe = /[ \t\n\r\f]/;
- function ShadowRoot(hostWrapper) {
- var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
- DocumentFragment.call(this, node);
- rewrap(node, this);
- var oldShadowRoot = hostWrapper.shadowRoot;
- nextOlderShadowTreeTable.set(this, oldShadowRoot);
- this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
- shadowHostTable.set(this, hostWrapper);
- }
- ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
- mixin(ShadowRoot.prototype, {
- constructor: ShadowRoot,
- get innerHTML() {
- return getInnerHTML(this);
- },
- set innerHTML(value) {
- setInnerHTML(this, value);
- this.invalidateShadowRenderer();
- },
- get olderShadowRoot() {
- return nextOlderShadowTreeTable.get(this) || null;
- },
- get host() {
- return shadowHostTable.get(this) || null;
- },
- invalidateShadowRenderer: function() {
- return shadowHostTable.get(this).invalidateShadowRenderer();
- },
- elementFromPoint: function(x, y) {
- return elementFromPoint(this, this.ownerDocument, x, y);
- },
- getElementById: function(id) {
- if (spaceCharRe.test(id)) return null;
- return this.querySelector('[id="' + id + '"]');
- }
- });
- scope.wrappers.ShadowRoot = ShadowRoot;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var getTreeScope = scope.getTreeScope;
- var OriginalRange = window.Range;
- var ShadowRoot = scope.wrappers.ShadowRoot;
- function getHost(node) {
- var root = getTreeScope(node).root;
- if (root instanceof ShadowRoot) {
- return root.host;
- }
- return null;
- }
- function hostNodeToShadowNode(refNode, offset) {
- if (refNode.shadowRoot) {
- offset = Math.min(refNode.childNodes.length - 1, offset);
- var child = refNode.childNodes[offset];
- if (child) {
- var insertionPoint = scope.getDestinationInsertionPoints(child);
- if (insertionPoint.length > 0) {
- var parentNode = insertionPoint[0].parentNode;
- if (parentNode.nodeType == Node.ELEMENT_NODE) {
- refNode = parentNode;
- }
- }
- }
- }
- return refNode;
- }
- function shadowNodeToHostNode(node) {
- node = wrap(node);
- return getHost(node) || node;
- }
- function Range(impl) {
- setWrapper(impl, this);
- }
- Range.prototype = {
- get startContainer() {
- return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);
- },
- get endContainer() {
- return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);
- },
- get commonAncestorContainer() {
- return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);
- },
- setStart: function(refNode, offset) {
- refNode = hostNodeToShadowNode(refNode, offset);
- unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);
- },
- setEnd: function(refNode, offset) {
- refNode = hostNodeToShadowNode(refNode, offset);
- unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);
- },
- setStartBefore: function(refNode) {
- unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));
- },
- setStartAfter: function(refNode) {
- unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode));
- },
- setEndBefore: function(refNode) {
- unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));
- },
- setEndAfter: function(refNode) {
- unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode));
- },
- selectNode: function(refNode) {
- unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode));
- },
- selectNodeContents: function(refNode) {
- unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode));
- },
- compareBoundaryPoints: function(how, sourceRange) {
- return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));
- },
- extractContents: function() {
- return wrap(unsafeUnwrap(this).extractContents());
- },
- cloneContents: function() {
- return wrap(unsafeUnwrap(this).cloneContents());
- },
- insertNode: function(node) {
- unsafeUnwrap(this).insertNode(unwrapIfNeeded(node));
- },
- surroundContents: function(newParent) {
- unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent));
- },
- cloneRange: function() {
- return wrap(unsafeUnwrap(this).cloneRange());
- },
- isPointInRange: function(node, offset) {
- return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);
- },
- comparePoint: function(node, offset) {
- return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset);
- },
- intersectsNode: function(node) {
- return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node));
- },
- toString: function() {
- return unsafeUnwrap(this).toString();
- }
- };
- if (OriginalRange.prototype.createContextualFragment) {
- Range.prototype.createContextualFragment = function(html) {
- return wrap(unsafeUnwrap(this).createContextualFragment(html));
- };
- }
- registerWrapper(window.Range, Range, document.createRange());
- scope.wrappers.Range = Range;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var Element = scope.wrappers.Element;
- var HTMLContentElement = scope.wrappers.HTMLContentElement;
- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
- var Node = scope.wrappers.Node;
- var ShadowRoot = scope.wrappers.ShadowRoot;
- var assert = scope.assert;
- var getTreeScope = scope.getTreeScope;
- var mixin = scope.mixin;
- var oneOf = scope.oneOf;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var ArraySplice = scope.ArraySplice;
- function updateWrapperUpAndSideways(wrapper) {
- wrapper.previousSibling_ = wrapper.previousSibling;
- wrapper.nextSibling_ = wrapper.nextSibling;
- wrapper.parentNode_ = wrapper.parentNode;
- }
- function updateWrapperDown(wrapper) {
- wrapper.firstChild_ = wrapper.firstChild;
- wrapper.lastChild_ = wrapper.lastChild;
- }
- function updateAllChildNodes(parentNodeWrapper) {
- assert(parentNodeWrapper instanceof Node);
- for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) {
- updateWrapperUpAndSideways(childWrapper);
- }
- updateWrapperDown(parentNodeWrapper);
- }
- function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {
- var parentNode = unwrap(parentNodeWrapper);
- var newChild = unwrap(newChildWrapper);
- var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;
- remove(newChildWrapper);
- updateWrapperUpAndSideways(newChildWrapper);
- if (!refChildWrapper) {
- parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;
- if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;
- var lastChildWrapper = wrap(parentNode.lastChild);
- if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;
- } else {
- if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper;
- refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;
- }
- scope.originalInsertBefore.call(parentNode, newChild, refChild);
- }
- function remove(nodeWrapper) {
- var node = unwrap(nodeWrapper);
- var parentNode = node.parentNode;
- if (!parentNode) return;
- var parentNodeWrapper = wrap(parentNode);
- updateWrapperUpAndSideways(nodeWrapper);
- if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;
- if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;
- if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper;
- if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper;
- scope.originalRemoveChild.call(parentNode, node);
- }
- var distributedNodesTable = new WeakMap();
- var destinationInsertionPointsTable = new WeakMap();
- var rendererForHostTable = new WeakMap();
- function resetDistributedNodes(insertionPoint) {
- distributedNodesTable.set(insertionPoint, []);
- }
- function getDistributedNodes(insertionPoint) {
- var rv = distributedNodesTable.get(insertionPoint);
- if (!rv) distributedNodesTable.set(insertionPoint, rv = []);
- return rv;
- }
- function getChildNodesSnapshot(node) {
- var result = [], i = 0;
- for (var child = node.firstChild; child; child = child.nextSibling) {
- result[i++] = child;
- }
- return result;
- }
- var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]);
- var pendingDirtyRenderers = [];
- var renderTimer;
- function renderAllPending() {
- for (var i = 0; i < pendingDirtyRenderers.length; i++) {
- var renderer = pendingDirtyRenderers[i];
- var parentRenderer = renderer.parentRenderer;
- if (parentRenderer && parentRenderer.dirty) continue;
- renderer.render();
- }
- pendingDirtyRenderers = [];
- }
- function handleRequestAnimationFrame() {
- renderTimer = null;
- renderAllPending();
- }
- function getRendererForHost(host) {
- var renderer = rendererForHostTable.get(host);
- if (!renderer) {
- renderer = new ShadowRenderer(host);
- rendererForHostTable.set(host, renderer);
- }
- return renderer;
- }
- function getShadowRootAncestor(node) {
- var root = getTreeScope(node).root;
- if (root instanceof ShadowRoot) return root;
- return null;
- }
- function getRendererForShadowRoot(shadowRoot) {
- return getRendererForHost(shadowRoot.host);
- }
- var spliceDiff = new ArraySplice();
- spliceDiff.equals = function(renderNode, rawNode) {
- return unwrap(renderNode.node) === rawNode;
- };
- function RenderNode(node) {
- this.skip = false;
- this.node = node;
- this.childNodes = [];
- }
- RenderNode.prototype = {
- append: function(node) {
- var rv = new RenderNode(node);
- this.childNodes.push(rv);
- return rv;
- },
- sync: function(opt_added) {
- if (this.skip) return;
- var nodeWrapper = this.node;
- var newChildren = this.childNodes;
- var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));
- var added = opt_added || new WeakMap();
- var splices = spliceDiff.calculateSplices(newChildren, oldChildren);
- var newIndex = 0, oldIndex = 0;
- var lastIndex = 0;
- for (var i = 0; i < splices.length; i++) {
- var splice = splices[i];
- for (;lastIndex < splice.index; lastIndex++) {
- oldIndex++;
- newChildren[newIndex++].sync(added);
- }
- var removedCount = splice.removed.length;
- for (var j = 0; j < removedCount; j++) {
- var wrapper = wrap(oldChildren[oldIndex++]);
- if (!added.get(wrapper)) remove(wrapper);
- }
- var addedCount = splice.addedCount;
- var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);
- for (var j = 0; j < addedCount; j++) {
- var newChildRenderNode = newChildren[newIndex++];
- var newChildWrapper = newChildRenderNode.node;
- insertBefore(nodeWrapper, newChildWrapper, refNode);
- added.set(newChildWrapper, true);
- newChildRenderNode.sync(added);
- }
- lastIndex += addedCount;
- }
- for (var i = lastIndex; i < newChildren.length; i++) {
- newChildren[i].sync(added);
- }
- }
- };
- function ShadowRenderer(host) {
- this.host = host;
- this.dirty = false;
- this.invalidateAttributes();
- this.associateNode(host);
- }
- ShadowRenderer.prototype = {
- render: function(opt_renderNode) {
- if (!this.dirty) return;
- this.invalidateAttributes();
- var host = this.host;
- this.distribution(host);
- var renderNode = opt_renderNode || new RenderNode(host);
- this.buildRenderTree(renderNode, host);
- var topMostRenderer = !opt_renderNode;
- if (topMostRenderer) renderNode.sync();
- this.dirty = false;
- },
- get parentRenderer() {
- return getTreeScope(this.host).renderer;
- },
- invalidate: function() {
- if (!this.dirty) {
- this.dirty = true;
- var parentRenderer = this.parentRenderer;
- if (parentRenderer) parentRenderer.invalidate();
- pendingDirtyRenderers.push(this);
- if (renderTimer) return;
- renderTimer = window[request](handleRequestAnimationFrame, 0);
- }
- },
- distribution: function(root) {
- this.resetAllSubtrees(root);
- this.distributionResolution(root);
- },
- resetAll: function(node) {
- if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node);
- this.resetAllSubtrees(node);
- },
- resetAllSubtrees: function(node) {
- for (var child = node.firstChild; child; child = child.nextSibling) {
- this.resetAll(child);
- }
- if (node.shadowRoot) this.resetAll(node.shadowRoot);
- if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot);
- },
- distributionResolution: function(node) {
- if (isShadowHost(node)) {
- var shadowHost = node;
- var pool = poolPopulation(shadowHost);
- var shadowTrees = getShadowTrees(shadowHost);
- for (var i = 0; i < shadowTrees.length; i++) {
- this.poolDistribution(shadowTrees[i], pool);
- }
- for (var i = shadowTrees.length - 1; i >= 0; i--) {
- var shadowTree = shadowTrees[i];
- var shadow = getShadowInsertionPoint(shadowTree);
- if (shadow) {
- var olderShadowRoot = shadowTree.olderShadowRoot;
- if (olderShadowRoot) {
- pool = poolPopulation(olderShadowRoot);
- }
- for (var j = 0; j < pool.length; j++) {
- destributeNodeInto(pool[j], shadow);
- }
- }
- this.distributionResolution(shadowTree);
- }
- }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- this.distributionResolution(child);
- }
- },
- poolDistribution: function(node, pool) {
- if (node instanceof HTMLShadowElement) return;
- if (node instanceof HTMLContentElement) {
- var content = node;
- this.updateDependentAttributes(content.getAttribute("select"));
- var anyDistributed = false;
- for (var i = 0; i < pool.length; i++) {
- var node = pool[i];
- if (!node) continue;
- if (matches(node, content)) {
- destributeNodeInto(node, content);
- pool[i] = undefined;
- anyDistributed = true;
- }
- }
- if (!anyDistributed) {
- for (var child = content.firstChild; child; child = child.nextSibling) {
- destributeNodeInto(child, content);
- }
- }
- return;
- }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- this.poolDistribution(child, pool);
- }
- },
- buildRenderTree: function(renderNode, node) {
- var children = this.compose(node);
- for (var i = 0; i < children.length; i++) {
- var child = children[i];
- var childRenderNode = renderNode.append(child);
- this.buildRenderTree(childRenderNode, child);
- }
- if (isShadowHost(node)) {
- var renderer = getRendererForHost(node);
- renderer.dirty = false;
- }
- },
- compose: function(node) {
- var children = [];
- var p = node.shadowRoot || node;
- for (var child = p.firstChild; child; child = child.nextSibling) {
- if (isInsertionPoint(child)) {
- this.associateNode(p);
- var distributedNodes = getDistributedNodes(child);
- for (var j = 0; j < distributedNodes.length; j++) {
- var distributedNode = distributedNodes[j];
- if (isFinalDestination(child, distributedNode)) children.push(distributedNode);
- }
- } else {
- children.push(child);
- }
- }
- return children;
- },
- invalidateAttributes: function() {
- this.attributes = Object.create(null);
- },
- updateDependentAttributes: function(selector) {
- if (!selector) return;
- var attributes = this.attributes;
- if (/\.\w+/.test(selector)) attributes["class"] = true;
- if (/#\w+/.test(selector)) attributes["id"] = true;
- selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) {
- attributes[name] = true;
- });
- },
- dependsOnAttribute: function(name) {
- return this.attributes[name];
- },
- associateNode: function(node) {
- unsafeUnwrap(node).polymerShadowRenderer_ = this;
- }
- };
- function poolPopulation(node) {
- var pool = [];
- for (var child = node.firstChild; child; child = child.nextSibling) {
- if (isInsertionPoint(child)) {
- pool.push.apply(pool, getDistributedNodes(child));
- } else {
- pool.push(child);
- }
- }
- return pool;
- }
- function getShadowInsertionPoint(node) {
- if (node instanceof HTMLShadowElement) return node;
- if (node instanceof HTMLContentElement) return null;
- for (var child = node.firstChild; child; child = child.nextSibling) {
- var res = getShadowInsertionPoint(child);
- if (res) return res;
- }
- return null;
- }
- function destributeNodeInto(child, insertionPoint) {
- getDistributedNodes(insertionPoint).push(child);
- var points = destinationInsertionPointsTable.get(child);
- if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint);
- }
- function getDestinationInsertionPoints(node) {
- return destinationInsertionPointsTable.get(node);
- }
- function resetDestinationInsertionPoints(node) {
- destinationInsertionPointsTable.set(node, undefined);
- }
- var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/;
- function matches(node, contentElement) {
- var select = contentElement.getAttribute("select");
- if (!select) return true;
- select = select.trim();
- if (!select) return true;
- if (!(node instanceof Element)) return false;
- if (!selectorStartCharRe.test(select)) return false;
- try {
- return node.matches(select);
- } catch (ex) {
- return false;
- }
- }
- function isFinalDestination(insertionPoint, node) {
- var points = getDestinationInsertionPoints(node);
- return points && points[points.length - 1] === insertionPoint;
- }
- function isInsertionPoint(node) {
- return node instanceof HTMLContentElement || node instanceof HTMLShadowElement;
- }
- function isShadowHost(shadowHost) {
- return shadowHost.shadowRoot;
- }
- function getShadowTrees(host) {
- var trees = [];
- for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {
- trees.push(tree);
- }
- return trees;
- }
- function render(host) {
- new ShadowRenderer(host).render();
- }
- Node.prototype.invalidateShadowRenderer = function(force) {
- var renderer = unsafeUnwrap(this).polymerShadowRenderer_;
- if (renderer) {
- renderer.invalidate();
- return true;
- }
- return false;
- };
- HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() {
- renderAllPending();
- return getDistributedNodes(this);
- };
- Element.prototype.getDestinationInsertionPoints = function() {
- renderAllPending();
- return getDestinationInsertionPoints(this) || [];
- };
- HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() {
- this.invalidateShadowRenderer();
- var shadowRoot = getShadowRootAncestor(this);
- var renderer;
- if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot);
- unsafeUnwrap(this).polymerShadowRenderer_ = renderer;
- if (renderer) renderer.invalidate();
- };
- scope.getRendererForHost = getRendererForHost;
- scope.getShadowTrees = getShadowTrees;
- scope.renderAllPending = renderAllPending;
- scope.getDestinationInsertionPoints = getDestinationInsertionPoints;
- scope.visual = {
- insertBefore: insertBefore,
- remove: remove
- };
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var assert = scope.assert;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ];
- function createWrapperConstructor(name) {
- if (!window[name]) return;
- assert(!scope.wrappers[name]);
- var GeneratedWrapper = function(node) {
- HTMLElement.call(this, node);
- };
- GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);
- mixin(GeneratedWrapper.prototype, {
- get form() {
- return wrap(unwrap(this).form);
- }
- });
- registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7)));
- scope.wrappers[name] = GeneratedWrapper;
- }
- elementsWithFormProperty.forEach(createWrapperConstructor);
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalSelection = window.Selection;
- function Selection(impl) {
- setWrapper(impl, this);
- }
- Selection.prototype = {
- get anchorNode() {
- return wrap(unsafeUnwrap(this).anchorNode);
- },
- get focusNode() {
- return wrap(unsafeUnwrap(this).focusNode);
- },
- addRange: function(range) {
- unsafeUnwrap(this).addRange(unwrapIfNeeded(range));
- },
- collapse: function(node, index) {
- unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);
- },
- containsNode: function(node, allowPartial) {
- return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);
- },
- getRangeAt: function(index) {
- return wrap(unsafeUnwrap(this).getRangeAt(index));
- },
- removeRange: function(range) {
- unsafeUnwrap(this).removeRange(unwrap(range));
- },
- selectAllChildren: function(node) {
- unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));
- },
- toString: function() {
- return unsafeUnwrap(this).toString();
- }
- };
- if (OriginalSelection.prototype.extend) {
- Selection.prototype.extend = function(node, offset) {
- unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
- };
- }
- registerWrapper(window.Selection, Selection, window.getSelection());
- scope.wrappers.Selection = Selection;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalTreeWalker = window.TreeWalker;
- function TreeWalker(impl) {
- setWrapper(impl, this);
- }
- TreeWalker.prototype = {
- get root() {
- return wrap(unsafeUnwrap(this).root);
- },
- get currentNode() {
- return wrap(unsafeUnwrap(this).currentNode);
- },
- set currentNode(node) {
- unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);
- },
- get filter() {
- return unsafeUnwrap(this).filter;
- },
- parentNode: function() {
- return wrap(unsafeUnwrap(this).parentNode());
- },
- firstChild: function() {
- return wrap(unsafeUnwrap(this).firstChild());
- },
- lastChild: function() {
- return wrap(unsafeUnwrap(this).lastChild());
- },
- previousSibling: function() {
- return wrap(unsafeUnwrap(this).previousSibling());
- },
- previousNode: function() {
- return wrap(unsafeUnwrap(this).previousNode());
- },
- nextNode: function() {
- return wrap(unsafeUnwrap(this).nextNode());
- }
- };
- registerWrapper(OriginalTreeWalker, TreeWalker);
- scope.wrappers.TreeWalker = TreeWalker;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var GetElementsByInterface = scope.GetElementsByInterface;
- var Node = scope.wrappers.Node;
- var ParentNodeInterface = scope.ParentNodeInterface;
- var Selection = scope.wrappers.Selection;
- var SelectorsInterface = scope.SelectorsInterface;
- var ShadowRoot = scope.wrappers.ShadowRoot;
- var TreeScope = scope.TreeScope;
- var cloneNode = scope.cloneNode;
- var defineWrapGetter = scope.defineWrapGetter;
- var elementFromPoint = scope.elementFromPoint;
- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
- var matchesNames = scope.matchesNames;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var renderAllPending = scope.renderAllPending;
- var rewrap = scope.rewrap;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrapEventTargetMethods = scope.wrapEventTargetMethods;
- var wrapNodeList = scope.wrapNodeList;
- var implementationTable = new WeakMap();
- function Document(node) {
- Node.call(this, node);
- this.treeScope_ = new TreeScope(this, null);
- }
- Document.prototype = Object.create(Node.prototype);
- defineWrapGetter(Document, "documentElement");
- defineWrapGetter(Document, "body");
- defineWrapGetter(Document, "head");
- function wrapMethod(name) {
- var original = document[name];
- Document.prototype[name] = function() {
- return wrap(original.apply(unsafeUnwrap(this), arguments));
- };
- }
- [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "getElementById" ].forEach(wrapMethod);
- var originalAdoptNode = document.adoptNode;
- function adoptNodeNoRemove(node, doc) {
- originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));
- adoptSubtree(node, doc);
- }
- function adoptSubtree(node, doc) {
- if (node.shadowRoot) doc.adoptNode(node.shadowRoot);
- if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc);
- for (var child = node.firstChild; child; child = child.nextSibling) {
- adoptSubtree(child, doc);
- }
- }
- function adoptOlderShadowRoots(shadowRoot, doc) {
- var oldShadowRoot = shadowRoot.olderShadowRoot;
- if (oldShadowRoot) doc.adoptNode(oldShadowRoot);
- }
- var originalGetSelection = document.getSelection;
- mixin(Document.prototype, {
- adoptNode: function(node) {
- if (node.parentNode) node.parentNode.removeChild(node);
- adoptNodeNoRemove(node, this);
- return node;
- },
- elementFromPoint: function(x, y) {
- return elementFromPoint(this, this, x, y);
- },
- importNode: function(node, deep) {
- return cloneNode(node, deep, unsafeUnwrap(this));
- },
- getSelection: function() {
- renderAllPending();
- return new Selection(originalGetSelection.call(unwrap(this)));
- },
- getElementsByName: function(name) {
- return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");
- }
- });
- var originalCreateTreeWalker = document.createTreeWalker;
- var TreeWalkerWrapper = scope.wrappers.TreeWalker;
- Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {
- var newFilter = null;
- if (filter) {
- if (filter.acceptNode && typeof filter.acceptNode === "function") {
- newFilter = {
- acceptNode: function(node) {
- return filter.acceptNode(wrap(node));
- }
- };
- } else if (typeof filter === "function") {
- newFilter = function(node) {
- return filter(wrap(node));
- };
- }
- }
- return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));
- };
- if (document.registerElement) {
- var originalRegisterElement = document.registerElement;
- Document.prototype.registerElement = function(tagName, object) {
- var prototype, extendsOption;
- if (object !== undefined) {
- prototype = object.prototype;
- extendsOption = object.extends;
- }
- if (!prototype) prototype = Object.create(HTMLElement.prototype);
- if (scope.nativePrototypeTable.get(prototype)) {
- throw new Error("NotSupportedError");
- }
- var proto = Object.getPrototypeOf(prototype);
- var nativePrototype;
- var prototypes = [];
- while (proto) {
- nativePrototype = scope.nativePrototypeTable.get(proto);
- if (nativePrototype) break;
- prototypes.push(proto);
- proto = Object.getPrototypeOf(proto);
- }
- if (!nativePrototype) {
- throw new Error("NotSupportedError");
- }
- var newPrototype = Object.create(nativePrototype);
- for (var i = prototypes.length - 1; i >= 0; i--) {
- newPrototype = Object.create(newPrototype);
- }
- [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) {
- var f = prototype[name];
- if (!f) return;
- newPrototype[name] = function() {
- if (!(wrap(this) instanceof CustomElementConstructor)) {
- rewrap(this);
- }
- f.apply(wrap(this), arguments);
- };
- });
- var p = {
- prototype: newPrototype
- };
- if (extendsOption) p.extends = extendsOption;
- function CustomElementConstructor(node) {
- if (!node) {
- if (extendsOption) {
- return document.createElement(extendsOption, tagName);
- } else {
- return document.createElement(tagName);
- }
- }
- setWrapper(node, this);
- }
- CustomElementConstructor.prototype = prototype;
- CustomElementConstructor.prototype.constructor = CustomElementConstructor;
- scope.constructorTable.set(newPrototype, CustomElementConstructor);
- scope.nativePrototypeTable.set(prototype, newPrototype);
- var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p);
- return CustomElementConstructor;
- };
- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]);
- }
- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);
- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);
- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
- mixin(Document.prototype, GetElementsByInterface);
- mixin(Document.prototype, ParentNodeInterface);
- mixin(Document.prototype, SelectorsInterface);
- mixin(Document.prototype, {
- get implementation() {
- var implementation = implementationTable.get(this);
- if (implementation) return implementation;
- implementation = new DOMImplementation(unwrap(this).implementation);
- implementationTable.set(this, implementation);
- return implementation;
- },
- get defaultView() {
- return wrap(unwrap(this).defaultView);
- }
- });
- registerWrapper(window.Document, Document, document.implementation.createHTMLDocument(""));
- if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document);
- wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]);
- function DOMImplementation(impl) {
- setWrapper(impl, this);
- }
- function wrapImplMethod(constructor, name) {
- var original = document.implementation[name];
- constructor.prototype[name] = function() {
- return wrap(original.apply(unsafeUnwrap(this), arguments));
- };
- }
- function forwardImplMethod(constructor, name) {
- var original = document.implementation[name];
- constructor.prototype[name] = function() {
- return original.apply(unsafeUnwrap(this), arguments);
- };
- }
- wrapImplMethod(DOMImplementation, "createDocumentType");
- wrapImplMethod(DOMImplementation, "createDocument");
- wrapImplMethod(DOMImplementation, "createHTMLDocument");
- forwardImplMethod(DOMImplementation, "hasFeature");
- registerWrapper(window.DOMImplementation, DOMImplementation);
- forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocumentType", "createDocument", "createHTMLDocument", "hasFeature" ]);
- scope.adoptNodeNoRemove = adoptNodeNoRemove;
- scope.wrappers.DOMImplementation = DOMImplementation;
- scope.wrappers.Document = Document;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var EventTarget = scope.wrappers.EventTarget;
- var Selection = scope.wrappers.Selection;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var renderAllPending = scope.renderAllPending;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalWindow = window.Window;
- var originalGetComputedStyle = window.getComputedStyle;
- var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;
- var originalGetSelection = window.getSelection;
- function Window(impl) {
- EventTarget.call(this, impl);
- }
- Window.prototype = Object.create(EventTarget.prototype);
- OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {
- return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);
- };
- if (originalGetDefaultComputedStyle) {
- OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {
- return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo);
- };
- }
- OriginalWindow.prototype.getSelection = function() {
- return wrap(this || window).getSelection();
- };
- delete window.getComputedStyle;
- delete window.getDefaultComputedStyle;
- delete window.getSelection;
- [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) {
- OriginalWindow.prototype[name] = function() {
- var w = wrap(this || window);
- return w[name].apply(w, arguments);
- };
- delete window[name];
- });
- mixin(Window.prototype, {
- getComputedStyle: function(el, pseudo) {
- renderAllPending();
- return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);
- },
- getSelection: function() {
- renderAllPending();
- return new Selection(originalGetSelection.call(unwrap(this)));
- },
- get document() {
- return wrap(unwrap(this).document);
- }
- });
- if (originalGetDefaultComputedStyle) {
- Window.prototype.getDefaultComputedStyle = function(el, pseudo) {
- renderAllPending();
- return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);
- };
- }
- registerWrapper(OriginalWindow, Window, window);
- scope.wrappers.Window = Window;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var unwrap = scope.unwrap;
- var OriginalDataTransfer = window.DataTransfer || window.Clipboard;
- var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage;
- if (OriginalDataTransferSetDragImage) {
- OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {
- OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);
- };
- }
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unwrap = scope.unwrap;
- var OriginalFormData = window.FormData;
- if (!OriginalFormData) return;
- function FormData(formElement) {
- var impl;
- if (formElement instanceof OriginalFormData) {
- impl = formElement;
- } else {
- impl = new OriginalFormData(formElement && unwrap(formElement));
- }
- setWrapper(impl, this);
- }
- registerWrapper(OriginalFormData, FormData, new OriginalFormData());
- scope.wrappers.FormData = FormData;
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var originalSend = XMLHttpRequest.prototype.send;
- XMLHttpRequest.prototype.send = function(obj) {
- return originalSend.call(this, unwrapIfNeeded(obj));
- };
-})(window.ShadowDOMPolyfill);
-
-(function(scope) {
- "use strict";
- var isWrapperFor = scope.isWrapperFor;
- var elements = {
- a: "HTMLAnchorElement",
- area: "HTMLAreaElement",
- audio: "HTMLAudioElement",
- base: "HTMLBaseElement",
- body: "HTMLBodyElement",
- br: "HTMLBRElement",
- button: "HTMLButtonElement",
- canvas: "HTMLCanvasElement",
- caption: "HTMLTableCaptionElement",
- col: "HTMLTableColElement",
- content: "HTMLContentElement",
- data: "HTMLDataElement",
- datalist: "HTMLDataListElement",
- del: "HTMLModElement",
- dir: "HTMLDirectoryElement",
- div: "HTMLDivElement",
- dl: "HTMLDListElement",
- embed: "HTMLEmbedElement",
- fieldset: "HTMLFieldSetElement",
- font: "HTMLFontElement",
- form: "HTMLFormElement",
- frame: "HTMLFrameElement",
- frameset: "HTMLFrameSetElement",
- h1: "HTMLHeadingElement",
- head: "HTMLHeadElement",
- hr: "HTMLHRElement",
- html: "HTMLHtmlElement",
- iframe: "HTMLIFrameElement",
- img: "HTMLImageElement",
- input: "HTMLInputElement",
- keygen: "HTMLKeygenElement",
- label: "HTMLLabelElement",
- legend: "HTMLLegendElement",
- li: "HTMLLIElement",
- link: "HTMLLinkElement",
- map: "HTMLMapElement",
- marquee: "HTMLMarqueeElement",
- menu: "HTMLMenuElement",
- menuitem: "HTMLMenuItemElement",
- meta: "HTMLMetaElement",
- meter: "HTMLMeterElement",
- object: "HTMLObjectElement",
- ol: "HTMLOListElement",
- optgroup: "HTMLOptGroupElement",
- option: "HTMLOptionElement",
- output: "HTMLOutputElement",
- p: "HTMLParagraphElement",
- param: "HTMLParamElement",
- pre: "HTMLPreElement",
- progress: "HTMLProgressElement",
- q: "HTMLQuoteElement",
- script: "HTMLScriptElement",
- select: "HTMLSelectElement",
- shadow: "HTMLShadowElement",
- source: "HTMLSourceElement",
- span: "HTMLSpanElement",
- style: "HTMLStyleElement",
- table: "HTMLTableElement",
- tbody: "HTMLTableSectionElement",
- template: "HTMLTemplateElement",
- textarea: "HTMLTextAreaElement",
- thead: "HTMLTableSectionElement",
- time: "HTMLTimeElement",
- title: "HTMLTitleElement",
- tr: "HTMLTableRowElement",
- track: "HTMLTrackElement",
- ul: "HTMLUListElement",
- video: "HTMLVideoElement"
- };
- function overrideConstructor(tagName) {
- var nativeConstructorName = elements[tagName];
- var nativeConstructor = window[nativeConstructorName];
- if (!nativeConstructor) return;
- var element = document.createElement(tagName);
- var wrapperConstructor = element.constructor;
- window[nativeConstructorName] = wrapperConstructor;
- }
- Object.keys(elements).forEach(overrideConstructor);
- Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {
- window[name] = scope.wrappers[name];
- });
-})(window.ShadowDOMPolyfill); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.min.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.min.js
deleted file mode 100644
index df384534403..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/ShadowDOM.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];I(e,o,F(t,o))}return e}function o(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}I(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){B.value=n,I(e,t,B)}function s(e){var t=e.__proto__||Object.getPrototypeOf(e);if(U)try{k(t)}catch(n){t=t.__proto__}var r=R.get(t);if(r)return r;var o=s(t),i=E(o);return v(t,i,e),i}function c(e,t){m(e,t,!0)}function u(e,t){m(t,e,!1)}function l(e){return/^on[a-z]+$/.test(e)}function p(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function d(e){return A&&p(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function f(e){return A&&p(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function h(e){return A&&p(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function w(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return q}}function m(t,n,r,o){for(var i=k(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){U&&t.__lookupGetter__(s);var c,u,p=w(t,s);if(r&&"function"==typeof p.value)n[s]=h(s);else{var m=l(s);c=m?e.getEventHandlerGetter(s):d(s),(p.writable||p.set||V)&&(u=m?e.getEventHandlerSetter(s):f(s));var g=V||p.configurable;I(n,s,{get:c,set:u,configurable:g,enumerable:p.enumerable})}}}}function g(e,t,n){var r=e.prototype;v(r,t,n),o(t,e)}function v(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),P.set(o,e),c(e,o),r&&u(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return v(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function S(e){return e&&e.__impl4cf1e782hg__}function M(e){return!S(e)}function T(e){return null===e?null:(n(M(e)),e.__wrapper8e3dd93a60__||(e.__wrapper8e3dd93a60__=new(s(e))(e)))}function O(e){return null===e?null:(n(S(e)),e.__impl4cf1e782hg__)}function j(e){return e.__impl4cf1e782hg__}function N(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function L(e){return e&&S(e)?O(e):e}function _(e){return e&&!S(e)?T(e):e}function C(e,t){null!==t&&(n(M(e)),n(void 0===t||S(t)),e.__wrapper8e3dd93a60__=t)}function D(e,t,n){G.get=n,I(e.prototype,t,G)}function H(e,t){D(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=_(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,P=new WeakMap,W=Object.create(null),A=t(),I=Object.defineProperty,k=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,B={value:void 0,configurable:!0,enumerable:!1,writable:!0};k(window);var U=/Firefox/.test(navigator.userAgent),q={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.assert=n,e.constructorTable=R,e.defineGetter=D,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=p,e.isWrapper=S,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=P,e.oneOf=i,e.registerObject=y,e.registerWrapper=g,e.rewrap=C,e.setWrapper=N,e.unsafeUnwrap=j,e.unwrap=O,e.unwrapIfNeeded=L,e.wrap=T,e.wrapIfNeeded=_,e.wrappers=W}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),u=0;a>u;u++)c[u]=new Array(s),c[u][0]=u;for(var l=0;s>l;l++)c[0][l]=l;for(var u=1;a>u;u++)for(var l=1;s>l;l++)if(this.equals(e[t+l-1],r[o+u-1]))c[u][l]=c[u-1][l-1];else{var p=c[u-1][l]+1,d=c[u][l-1]+1;c[u][l]=d>p?p:d}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var u,l=e[t-1][n-1],p=e[t-1][n],d=e[t][n-1];u=d>p?l>p?p:l:l>d?d:l,u==l?(l==s?c.push(r):(c.push(o),s=l),t--,n--):u==p?(c.push(a),t--,s=p):(c.push(i),n--,s=d)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,u,l){var p=0,d=0,f=Math.min(s-n,l-u);if(0==n&&0==u&&(p=this.sharedPrefix(e,c,f)),s==e.length&&l==c.length&&(d=this.sharedSuffix(e,c,f-p)),n+=p,u+=p,s-=d,l-=d,s-n==0&&l-u==0)return[];if(n==s){for(var h=t(n,[],0);l>u;)h.removed.push(c[u++]);return[h]}if(u==l)return[t(n,[],s-n)];for(var w=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,u,l)),h=void 0,m=[],g=n,v=u,b=0;b<w.length;b++)switch(w[b]){case r:h&&(m.push(h),h=void 0),g++,v++;break;case o:h||(h=t(g,[],0)),h.addedCount++,g++,h.removed.push(c[v]),v++;break;case i:h||(h=t(g,[],0)),h.addedCount++,g++;break;case a:h||(h=t(g,[],0)),h.removed.push(c[v]),v++}return h&&m.push(h),m},sharedPrefix:function(e,t,n){for(var r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)e[t]()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),u=document.createTextNode(s);c.observe(u,{characterData:!0}),r=function(){s=(s+1)%2,u.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,h.push(e),w||(l(n),w=!0))}function n(){for(w=!1;h.length;){var e=h;h=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new d.NodeList,this.removedNodes=new d.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=f.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=f.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=f.get(s);if(c)for(var u=0;u<c.length;u++){var l=c[u],p=l.options;if((s===e||p.subtree)&&!("attributes"===n&&!p.attributes||"attributes"===n&&p.attributeFilter&&(null!==o.namespace||-1===p.attributeFilter.indexOf(o.name))||"characterData"===n&&!p.characterData||"childList"===n&&!p.childList)){var d=l.observer;i[d.uid_]=d,("attributes"===n&&p.attributeOldValue||"characterData"===n&&p.characterDataOldValue)&&(a[d.uid_]=o.oldValue)}}}for(var h in i){var d=i[h],w=new r(n,e);"name"in o&&"namespace"in o&&(w.attributeName=o.name,w.attributeNamespace=o.namespace),o.addedNodes&&(w.addedNodes=o.addedNodes),o.removedNodes&&(w.removedNodes=o.removedNodes),o.previousSibling&&(w.previousSibling=o.previousSibling),o.nextSibling&&(w.nextSibling=o.nextSibling),void 0!==a[h]&&(w.oldValue=a[h]),t(d),d.records_.push(w)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,this.attributes="attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this.characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=m.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++g,this.scheduled_=!1}function u(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var l=e.setEndOfMicrotask,p=e.wrapIfNeeded,d=e.wrappers,f=new WeakMap,h=[],w=!1,m=Array.prototype.slice,g=0;c.prototype={constructor:c,observe:function(e,t){e=p(e);var n,r=new s(t),o=f.get(e);o||f.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new u(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=f.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},u.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=f.get(e);n||f.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=f.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return I(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var u=a(c);if(u&&u.length>0){for(var l=0;l<u.length;l++){var d=u[l];if(i(d)){var f=n(d),h=f.olderShadowRoot;h&&s.push(h)}s.push(d)}c=u[u.length-1]}else if(t(c)){if(p(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=I(t),r=e[0],o=I(r),i=u(n,o),a=0;a<e.length;a++){var s=e[a];if(I(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function u(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function l(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=I(t),a=I(n),s=r(n,e),o=u(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var l=0;l<s.length;l++){var p=s[l];if(I(p)===c)return p}return null}function p(e,t){return I(e)===I(t)}function d(e){if(!X.get(e)&&(X.set(e,!0),h(V(e),V(e.target)),W)){var t=W;throw W=null,t}}function f(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function h(t,n){if(K.get(t))throw new Error("InvalidStateError");K.set(t,!0),e.renderAllPending();var o,i,a;if(f(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!f(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),w(t,o,a,i)&&m(t,o,a,i)&&g(t,o,a,i),J.set(t,re),$["delete"](t,null),K["delete"](t),t.defaultPrevented}function w(e,t,n,r){var o=oe;if(n&&!v(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!v(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=ie,i=t[0]||n;return v(i,e,o,t,r)}function g(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!v(t[i],e,o,t,r))return;n&&t.length>0&&v(n,e,o,t,r)}function v(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),u=c.relatedTarget;if(u){if(u instanceof Object&&u.addEventListener){var p=V(u),d=l(t,e,p);if(d===a)return!0}else d=null;Z.set(t,d)}}J.set(t,n);var f=t.type,h=!1;Y.set(t,a),$.set(t,e),i.depth++;for(var w=0,m=i.length;m>w;w++){var g=i[w];if(g.removed)h=!0;else if(!(g.type!==f||!g.capture&&n===oe||g.capture&&n===ae))try{if("function"==typeof g.handler?g.handler.call(e,t):g.handler.handleEvent(t),ee.get(t))return!1}catch(v){W||(W=v)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.length=0;for(var w=0;w<b.length;w++)b[w].removed||i.push(b[w])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return ve||"beforeunload"!==n.type||this instanceof O?void B(n,this):new O(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:q(e.relatedTarget)}}):e}function S(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void B(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&k(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function M(e,t){return function(){arguments[t]=q(arguments[t]);var n=q(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(me)return new e(n,E(r));var o=q(document.createEvent(t)),i=we[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=q(t)),a.push(t)}),o["init"+t].apply(o,a),o}function O(e){y.call(this,e)}function j(e){return"function"==typeof e?!0:e&&e.handleEvent}function N(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function L(e){B(e,this)}function _(e){return e instanceof G.ShadowRoot&&(e=e.host),q(e)}function C(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function D(e,t){for(var n=q(e);n;n=n.parentNode)if(C(V(n),t))return!0;return!1}function H(e){A(e,ye)}function x(t,n,o,i){e.renderAllPending();var a=V(Ee.call(U(n),o,i));if(!a)return null;var c=r(a,null),u=c.lastIndexOf(t);return-1==u?null:(c=c.slice(0,u),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function P(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var W,A=e.forwardMethodsToWrapper,I=e.getTreeScope,k=e.mixin,F=e.registerWrapper,B=e.setWrapper,U=e.unsafeUnwrap,q=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),X=new WeakMap,K=new WeakMap,Y=new WeakMap,$=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return Y.get(this)},get currentTarget(){return $.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}},F(se,y,document.createEvent("Event"));var ce=S("UIEvent",y),ue=S("CustomEvent",y),le={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},pe=k({initMouseEvent:M("initMouseEvent",14)},le),de=k({initFocusEvent:M("initFocusEvent",5)},le),fe=S("MouseEvent",ce,pe),he=S("FocusEvent",ce,de),we=Object.create(null),me=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!me){var ge=function(e,t,n){if(n){var r=we[n];t=k(k({},r),t)}we[e]=t};ge("Event",{bubbles:!1,cancelable:!1}),ge("CustomEvent",{detail:null},"Event"),ge("UIEvent",{view:null,detail:0},"Event"),ge("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ge("FocusEvent",{relatedTarget:null},"UIEvent")}var ve=window.BeforeUnloadEvent;O.prototype=Object.create(y.prototype),k(O.prototype,{get returnValue(){return U(this).returnValue},set returnValue(e){U(this).returnValue=e}}),ve&&F(ve,O);var be=window.EventTarget,ye=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;ye.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),L.prototype={addEventListener:function(e,t,n){if(j(t)&&!N(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=_(this);a.addEventListener_(e,d,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=_(this);s.removeEventListener_(e,d,!0)}}},dispatchEvent:function(t){var n=q(t),r=n.type;X.set(n,!1),e.renderAllPending();var o;D(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},be&&F(be,L);var Ee=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=O,e.wrappers.CustomEvent=ue,e.wrappers.Event=y,e.wrappers.EventTarget=L,e.wrappers.FocusEvent=he,e.wrappers.MouseEvent=fe,e.wrappers.UIEvent=ce}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,w)}function n(e){u(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,u=e.setWrapper,l=e.unsafeUnwrap,p=e.wrap,d=window.TouchEvent;if(d){var f;try{f=document.createEvent("TouchEvent")}catch(h){return}var w={enumerable:!1};n.prototype={get target(){return p(l(this).target)}};var m={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){m.get=function(){return l(this)[e]},Object.defineProperty(n.prototype,e,m)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(l(this).touches)},get targetTouches(){return o(l(this).targetTouches)},get changedTouches(){return o(l(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(d,i,f),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){j(e instanceof S)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){L(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){L(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);B=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;B=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function u(e,t){R(e,t),e.nodeIsInserted_()}function l(e,t){for(var n=_(t),r=0;r<e.length;r++)u(e[r],n)}function p(e){R(e,new O(e,null))}function d(e){for(var t=0;t<e.length;t++)p(e[t])}function f(e,t){var n=e.nodeType===S.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function h(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function w(e,t){h(e,t);var n=t.length;if(1===n)return W(t[0]);for(var r=W(e.ownerDocument.createDocumentFragment()),o=0;n>o;o++)r.appendChild(W(t[o]));return r}function m(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function g(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){j(t.parentNode===e);var n=t.nextSibling,r=W(t),o=r.parentNode;o&&Y.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=W(e),a=i.firstChild;a;)n=a.nextSibling,Y.call(i,a),a=n}function v(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=I(n?U.call(n,P(e),!1):q.call(P(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||_(e)!==_(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function S(e){j(e instanceof V),M.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var M=e.wrappers.EventTarget,T=e.wrappers.NodeList,O=e.TreeScope,j=e.assert,N=e.defineWrapGetter,L=e.enqueueMutation,_=e.getTreeScope,C=e.isWrapper,D=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,P=e.unsafeUnwrap,W=e.unwrap,A=e.unwrapIfNeeded,I=e.wrap,k=e.wrapIfNeeded,F=e.wrappers,B=!1,U=document.importNode,q=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),X=V.prototype.isEqualNode,K=V.prototype.insertBefore,Y=V.prototype.removeChild,$=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{Y.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){Y.call(e,t)};S.prototype=Object.create(M.prototype),D(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?C(n)?r=W(n):(r=n,n=I(r)):(n=null,r=null),n&&j(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!v(e);if(o=c?a(e):i(e,this,s,n),c)f(this,e),m(this),K.call(P(this),W(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var u=r?r.parentNode:P(this);u?K.call(u,w(this,o),r):h(this,o)}return L(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),l(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=W(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,u=this.lastChild,l=i.parentNode;l&&J(l,i),c===e&&(this.firstChild_=a),u===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else m(this),J(P(this),i);return B||L(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(C(r)?o=W(r):(o=r,r=I(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,u=r.previousSibling,d=!this.invalidateShadowRenderer()&&!v(e);return d?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,u,c)),d?(f(this,e),m(this),$.call(P(this),W(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&$.call(o.parentNode,w(this,s),o)),L(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:u}),p(r),l(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:I(P(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:I(P(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:I(P(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:I(P(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:I(P(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==S.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=S.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(g(this),""!==e){var n=P(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else m(this),P(this).textContent=e;var r=c(this.childNodes);L(this,"childList",{addedNodes:r,removedNodes:t}),d(t),l(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,k(e))},compareDocumentPosition:function(e){return z.call(P(this),A(e))},isEqualNode:function(e){return X.call(P(this),A(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===S.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),N(S,"ownerDocument"),x(V,S,document.createDocumentFragment()),delete S.prototype.querySelector,delete S.prototype.querySelectorAll,S.prototype=D(Object.create(M.prototype),S.prototype),e.cloneNode=y,e.nodeWasAdded=u,e.nodeWasRemoved=p,e.nodesWereAdded=l,e.nodesWereRemoved=d,e.originalInsertBefore=K,e.originalRemoveChild=Y,e.snapshotNodeList=c,e.wrappers.Node=S}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;c>s;s++)i=b(t[s]),!o&&(a=g(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===C}function s(){return!0}function c(e,t,n){return e.localName===n}function u(e,t){return e.namespaceURI===t}function l(e,t,n){return e.namespaceURI===t&&e.localName===n}function p(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=p(a,t,n,r,o,i),a=a.nextElementSibling;return t}function d(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,null);if(c instanceof L)s=M.call(c,i);else{if(!(c instanceof _))return p(this,r,o,n,i,null);s=S.call(c,i)}return t(s,r,o,a)}function f(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=O.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function h(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=N.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=j.call(c,i,a)}return t(s,r,o,!1)}var w=e.wrappers.HTMLCollection,m=e.wrappers.NodeList,g=e.getTreeScope,v=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,S=document.querySelectorAll,M=document.documentElement.querySelectorAll,T=document.getElementsByTagName,O=document.documentElement.getElementsByTagName,j=document.getElementsByTagNameNS,N=document.documentElement.getElementsByTagNameNS,L=window.Element,_=window.HTMLDocument||window.Document,C="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=v(this),c=g(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof L)a=b(E.call(s,t));else{if(!(s instanceof _))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=g(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new m;return o.length=d.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(v(this),t)}},x={getElementsByTagName:function(e){var t=new w,n="*"===e?s:a;return t.length=f.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new w,r=null;return r="*"===e?"*"===t?s:c:"*"===t?u:l,n.length=h.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e;
-
-}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}};e.ChildNodeInterface=i,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,u,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){l(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,u=e.MatchesInterface,l=(e.addWrapNodeListMethod,e.enqueueMutation),p=e.mixin,d=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wrappers,w=window.Element,m=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return w.prototype[e]}),g=m[0],v=w.prototype[g],b=new WeakMap;r.prototype=Object.create(a.prototype),p(r.prototype,{createShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this).getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=f(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return f(this).className},set className(e){this.setAttribute("class",e)},get id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),m.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),w.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),p(r.prototype,o),p(r.prototype,i),p(r.prototype,s),p(r.prototype,c),p(r.prototype,u),d(w,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=m,e.originalMatches=v,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function n(e){return e.replace(j,t)}function r(e){return e.replace(N,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,i=e.tagName.toLowerCase(),s="<"+i,c=e.attributes,u=0;o=c[u];u++)s+=" "+o.name+'="'+n(o.value)+'"';return s+=">",L[i]?s:s+a(e)+"</"+i+">";case Node.TEXT_NODE:var l=e.data;return t&&_[t.localName]?l:r(l);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function a(e){e instanceof O.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=i(n,e);return t}function s(e,t,n){var r=n||"div";e.textContent="";var o=M(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(T(i))}function c(e){h.call(this,e)}function u(e,t){var n=M(e.cloneNode(!1));n.innerHTML=t;for(var r,o=M(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return T(o)}function l(t){return function(){return e.renderAllPending(),S(this)[t]}}function p(e){w(c,e,l(e))}function d(t){Object.defineProperty(c.prototype,t,{get:l(t),set:function(n){e.renderAllPending(),S(this)[t]=n},configurable:!0,enumerable:!0})}function f(t){Object.defineProperty(c.prototype,t,{value:function(){return e.renderAllPending(),S(this)[t].apply(S(this),arguments)},configurable:!0,enumerable:!0})}var h=e.wrappers.Element,w=e.defineGetter,m=e.enqueueMutation,g=e.mixin,v=e.nodesWereAdded,b=e.nodesWereRemoved,y=e.registerWrapper,E=e.snapshotNodeList,S=e.unsafeUnwrap,M=e.unwrap,T=e.wrap,O=e.wrappers,j=/[&\u00A0"]/g,N=/[&\u00A0<>]/g,L=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),_=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),C=/MSIE/.test(navigator.userAgent),D=window.HTMLElement,H=window.HTMLTemplateElement;c.prototype=Object.create(h.prototype),g(c.prototype,{get innerHTML(){return a(this)},set innerHTML(e){if(C&&_[this.localName])return void(this.textContent=e);var t=E(this.childNodes);this.invalidateShadowRenderer()?this instanceof O.HTMLTemplateElement?s(this.content,e):s(this,e,this.tagName):!H&&this instanceof O.HTMLTemplateElement?s(this.content,e):S(this).innerHTML=e;var n=E(this.childNodes);m(this,"childList",{addedNodes:n,removedNodes:t}),b(t),v(n,this)},get outerHTML(){return i(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=u(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=u(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(p),["scrollLeft","scrollTop"].forEach(d),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(f),y(D,c,document.createElement("b")),e.wrappers.HTMLElement=c,e.getInnerHTML=a,e.setInnerHTML=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=p.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);p.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!d){var t=n(e);l.set(this,u(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.wrap,l=new WeakMap,p=new WeakMap,d=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return d?u(s(this).content):l.get(this)}}),d&&a(d,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,u=e.wrap,l=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return u(c(this).form)}}),a(l,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var u=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",u),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){d.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),u=document.createElementNS(s,"use"),l=c.constructor,p=Object.getPrototypeOf(l.prototype),d=p.constructor;t.prototype=Object.create(p),"instanceRoot"in u&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,u),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(u,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var u=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,u),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.ParentNodeInterface,r=e.SelectorsInterface,o=e.mixin,i=e.registerObject,a=i(document.createDocumentFragment());o(a.prototype,n),o(a.prototype,r),o(a.prototype,t);var s=i(document.createComment(""));e.wrappers.Comment=s,e.wrappers.DocumentFragment=a}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(l(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_=new r(this,a(o||e)),d.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,u=e.setInnerHTML,l=e.unsafeUnwrap,p=e.unwrap,d=new WeakMap,f=new WeakMap,h=/[ \t\n\r\f]/;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){u(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return f.get(this)||null},get host(){return d.get(this)||null},invalidateShadowRenderer:function(){return d.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getElementById:function(e){return h.test(e)?null:this.querySelector('[id="'+e+'"]')}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(e).root;return t instanceof f?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=l(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.unwrapIfNeeded,l=e.wrap,p=e.getTreeScope,d=window.Range,f=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(u(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(u(e),t)},setStartBefore:function(e){s(this).setStartBefore(u(e))},setStartAfter:function(e){s(this).setStartAfter(u(e))},setEndBefore:function(e){s(this).setEndBefore(u(e))},setEndAfter:function(e){s(this).setEndAfter(u(e))},selectNode:function(e){s(this).selectNode(u(e))},selectNodeContents:function(e){s(this).selectNodeContents(u(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return l(s(this).extractContents())},cloneContents:function(){return l(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(u(e))},surroundContents:function(e){s(this).surroundContents(u(e))},cloneRange:function(){return l(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(u(e),t)},comparePoint:function(e,t){return s(this).comparePoint(u(e),t)},intersectsNode:function(e){return s(this).intersectsNode(u(e))},toString:function(){return s(this).toString()}},d.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return l(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var u=R(a.lastChild);u&&(u.nextSibling_=u.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){W.set(e,[])}function i(e){var t=W.get(e);return t||W.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function u(e){var t=I.get(e);return t||(t=new f(e),I.set(e,t)),t}function l(e){var t=C(e).root;return t instanceof _?t:null}function p(e){return u(e.host)}function d(e){this.skip=!1,this.node=e,this.childNodes=[]}function f(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function h(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function w(e){if(e instanceof N)return e;if(e instanceof j)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=w(t);if(n)return n}return null}function m(e,t){i(t).push(e);var n=A.get(e);n?n.push(t):A.set(e,[t])}function g(e){return A.get(e)}function v(e){A.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof O))return!1;if(!U.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=g(t);return n&&n[n.length-1]===e}function E(e){return e instanceof j||e instanceof N}function S(e){return e.shadowRoot}function M(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,O=e.wrappers.Element,j=e.wrappers.HTMLContentElement,N=e.wrappers.HTMLShadowElement,L=e.wrappers.Node,_=e.wrappers.ShadowRoot,C=(e.assert,e.getTreeScope),D=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,P=e.ArraySplice,W=new WeakMap,A=new WeakMap,I=new WeakMap,k=D(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],B=new P;B.equals=function(e,t){return x(e.node)===t},d.prototype={append:function(e){var t=new d(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=B.calculateSplices(o,i),u=0,l=0,p=0,d=0;d<c.length;d++){for(var f=c[d];p<f.index;p++)l++,o[u++].sync(s);for(var h=f.removed.length,w=0;h>w;w++){var m=R(i[l++]);s.get(m)||r(m)}for(var g=f.addedCount,v=i[l]&&R(i[l]),w=0;g>w;w++){var b=o[u++],y=b.node;n(t,y,v),s.set(y,!0),b.sync(s)}p+=g}for(var d=p;d<o.length;d++)o[d].sync(s)}}},f.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new d(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return C(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[k](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):v(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(S(e)){for(var t=e,n=h(t),r=M(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=w(i);if(a){var s=i.olderShadowRoot;s&&(n=h(s));for(var c=0;c<n.length;c++)m(n[c],a)}this.distributionResolution(i)}}for(var u=e.firstChild;u;u=u.nextSibling)this.distributionResolution(u)},poolDistribution:function(e,t){if(!(e instanceof N))if(e instanceof j){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(m(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)m(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(S(t)){var a=u(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var U=/^(:not\()?[*.#[a-zA-Z_|]/;L.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return t?(t.invalidate(),!0):!1},j.prototype.getDistributedNodes=N.prototype.getDistributedNodes=function(){return s(),i(this)},O.prototype.getDestinationInsertionPoints=function(){return s(),g(this)||[]},j.prototype.nodeIsInserted_=N.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=l(this);t&&(e=p(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=u,e.getShadowTrees=M,e.renderAllPending=s,e.getDestinationInsertionPoints=g,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){l.call(this,e),this.treeScope_=new w(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return L(n.apply(j(this),arguments))}}function r(e,t){D.call(j(t),N(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof h&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){O(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return L(n.apply(j(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(j(this),arguments)}}var u=e.GetElementsByInterface,l=e.wrappers.Node,p=e.ParentNodeInterface,d=e.wrappers.Selection,f=e.SelectorsInterface,h=e.wrappers.ShadowRoot,w=e.TreeScope,m=e.cloneNode,g=e.defineWrapGetter,v=e.elementFromPoint,b=e.forwardMethodsToWrapper,y=e.matchesNames,E=e.mixin,S=e.registerWrapper,M=e.renderAllPending,T=e.rewrap,O=e.setWrapper,j=e.unsafeUnwrap,N=e.unwrap,L=e.wrap,_=e.wrapEventTargetMethods,C=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(l.prototype),g(t,"documentElement"),g(t,"body"),g(t,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(n);var D=document.adoptNode,H=document.getSelection;E(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return v(this,this,e,t)},importNode:function(e,t){return m(e,t,j(this))},getSelection:function(){return M(),new d(H.call(N(this)))},getElementsByName:function(e){return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var x=document.createTreeWalker,R=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(L(e))}}:"function"==typeof n&&(o=function(e){return n(L(e))})),new R(x.call(N(this),N(e),t,o,r))},document.registerElement){var P=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void O(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),
-s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var u=Object.create(a),l=c.length-1;l>=0;l--)u=Object.create(u);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(u[e]=function(){L(this)instanceof r||T(this),t.apply(L(this),arguments)})});var p={prototype:u};i&&(p["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(u,r),e.nativePrototypeTable.set(o,u);P.call(N(this),t,p);return r},b([window.HTMLDocument||window.Document],["registerElement"])}b([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),b([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],y),b([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),E(t.prototype,u),E(t.prototype,p),E(t.prototype,f),E(t.prototype,{get implementation(){var e=C.get(this);return e?e:(e=new a(N(this).implementation),C.set(this,e),e)},get defaultView(){return L(N(this).defaultView)}}),S(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&S(window.HTMLDocument,t),_([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),s(a,"createDocumentType"),s(a,"createDocument"),s(a,"createHTMLDocument"),c(a,"hasFeature"),S(window.DOMImplementation,a),b([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,u=e.wrap,l=window.Window,p=window.getComputedStyle,d=window.getDefaultComputedStyle,f=window.getSelection;t.prototype=Object.create(n.prototype),l.prototype.getComputedStyle=function(e,t){return u(this||window).getComputedStyle(c(e),t)},d&&(l.prototype.getDefaultComputedStyle=function(e,t){return u(this||window).getDefaultComputedStyle(c(e),t)}),l.prototype.getSelection=function(){return u(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){l.prototype[e]=function(){var t=u(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),p.call(s(this),c(e),t)},getSelection:function(){return a(),new r(f.call(s(this)))},get document(){return u(s(this).document)}}),d&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),d.call(s(this),c(e),t)}),i(l,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/bower.json b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/bower.json
deleted file mode 100644
index 36d2b0e5c59..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/bower.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "webcomponentsjs",
- "main": "webcomponents.js",
- "version": "0.6.1",
- "homepage": "http://webcomponents.org",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "webcomponents"
- ],
- "license": "BSD",
- "ignore": []
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/build.log b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/build.log
deleted file mode 100644
index 9f85a5bf023..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/build.log
+++ /dev/null
@@ -1,31 +0,0 @@
-BUILD LOG
----------
-Build Time: 2015-04-13T13:57:39-0700
-
-NODEJS INFORMATION
-==================
-nodejs: v0.12.0
-gulp: 3.8.11
-gulp-audit: 1.0.0
-gulp-concat: 2.5.2
-gulp-header: 1.2.2
-gulp-uglify: 1.2.0
-run-sequence: 1.0.2
-web-component-tester: 2.2.6
-
-REPO REVISIONS
-==============
-webcomponentsjs: ef29f20f1678f1b121ea5acce84cf36c599f7627
-
-BUILD HASHES
-============
-CustomElements.js: 2292abfeeb0ca0e03314f35edc50867c89b2dc93
-CustomElements.min.js: 131750c5b4297103b7702bb9123498bd5d4113a3
-HTMLImports.js: 5488833312a155d45744190715c0a702ba4d1340
-HTMLImports.min.js: 3d3cc90f2ff3fd718cb80253b4dc18ac54157411
-ShadowDOM.js: bf6aa1c79006401b100f0b60caa8b4f60333c209
-ShadowDOM.min.js: bf7028b266a9567556e3e99946dee55b451db0a8
-webcomponents-lite.js: 22a5d4a7b77eff8bca4dff1d0ed8c0cf11bd43e1
-webcomponents-lite.min.js: 45223241dc94cf226d7626e6f85af2370e186134
-webcomponents.js: eb64d78f556c672f905a703e10dba21bfe97694b
-webcomponents.min.js: 65d1bdca02300557e2055f91b236c20624ca0317 \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/package.json b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/package.json
deleted file mode 100644
index 65b003e8a6b..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "webcomponents.js",
- "version": "0.6.1",
- "description": "webcomponents.js",
- "main": "webcomponents.js",
- "directories": {
- "test": "tests"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/webcomponents/webcomponentsjs.git"
- },
- "author": "The Polymer Authors",
- "license": {
- "type": "BSD-3-Clause",
- "url": "http://polymer.github.io/LICENSE.txt"
- },
- "bugs": {
- "url": "https://github.com/webcomponents/webcomponentsjs/issues"
- },
- "homepage": "http://webcomponents.org",
- "devDependencies": {
- "gulp": "^3.8.8",
- "gulp-audit": "^1.0.0",
- "gulp-concat": "^2.4.1",
- "gulp-header": "^1.1.1",
- "gulp-uglify": "^1.0.1",
- "run-sequence": "^1.0.1",
- "web-component-tester": "*"
- }
-}
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.js
deleted file mode 100644
index 19285253dd1..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.js
+++ /dev/null
@@ -1,2270 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-window.WebComponents = window.WebComponents || {};
-
-(function(scope) {
- var flags = scope.flags || {};
- var file = "webcomponents.js";
- var script = document.querySelector('script[src*="' + file + '"]');
- if (!flags.noOpts) {
- location.search.slice(1).split("&").forEach(function(o) {
- o = o.split("=");
- o[0] && (flags[o[0]] = o[1] || true);
- });
- if (script) {
- for (var i = 0, a; a = script.attributes[i]; i++) {
- if (a.name !== "src") {
- flags[a.name] = a.value || true;
- }
- }
- }
- if (flags.log && flags.log.split) {
- var parts = flags.log.split(",");
- flags.log = {};
- parts.forEach(function(f) {
- flags.log[f] = true;
- });
- } else {
- flags.log = {};
- }
- }
- flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;
- if (flags.shadow === "native") {
- flags.shadow = false;
- } else {
- flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;
- }
- if (flags.register) {
- window.CustomElements = window.CustomElements || {
- flags: {}
- };
- window.CustomElements.flags.register = flags.register;
- }
- scope.flags = flags;
-})(WebComponents);
-
-(function(scope) {
- "use strict";
- var hasWorkingUrl = false;
- if (!scope.forceJURL) {
- try {
- var u = new URL("b", "http://a");
- u.pathname = "c%20d";
- hasWorkingUrl = u.href === "http://a/c%20d";
- } catch (e) {}
- }
- if (hasWorkingUrl) return;
- var relative = Object.create(null);
- relative["ftp"] = 21;
- relative["file"] = 0;
- relative["gopher"] = 70;
- relative["http"] = 80;
- relative["https"] = 443;
- relative["ws"] = 80;
- relative["wss"] = 443;
- var relativePathDotMapping = Object.create(null);
- relativePathDotMapping["%2e"] = ".";
- relativePathDotMapping[".%2e"] = "..";
- relativePathDotMapping["%2e."] = "..";
- relativePathDotMapping["%2e%2e"] = "..";
- function isRelativeScheme(scheme) {
- return relative[scheme] !== undefined;
- }
- function invalid() {
- clear.call(this);
- this._isInvalid = true;
- }
- function IDNAToASCII(h) {
- if ("" == h) {
- invalid.call(this);
- }
- return h.toLowerCase();
- }
- function percentEscape(c) {
- var unicode = c.charCodeAt(0);
- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {
- return c;
- }
- return encodeURIComponent(c);
- }
- function percentEscapeQuery(c) {
- var unicode = c.charCodeAt(0);
- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {
- return c;
- }
- return encodeURIComponent(c);
- }
- var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
- function parse(input, stateOverride, base) {
- function err(message) {
- errors.push(message);
- }
- var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];
- loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
- var c = input[cursor];
- switch (state) {
- case "scheme start":
- if (c && ALPHA.test(c)) {
- buffer += c.toLowerCase();
- state = "scheme";
- } else if (!stateOverride) {
- buffer = "";
- state = "no scheme";
- continue;
- } else {
- err("Invalid scheme.");
- break loop;
- }
- break;
-
- case "scheme":
- if (c && ALPHANUMERIC.test(c)) {
- buffer += c.toLowerCase();
- } else if (":" == c) {
- this._scheme = buffer;
- buffer = "";
- if (stateOverride) {
- break loop;
- }
- if (isRelativeScheme(this._scheme)) {
- this._isRelative = true;
- }
- if ("file" == this._scheme) {
- state = "relative";
- } else if (this._isRelative && base && base._scheme == this._scheme) {
- state = "relative or authority";
- } else if (this._isRelative) {
- state = "authority first slash";
- } else {
- state = "scheme data";
- }
- } else if (!stateOverride) {
- buffer = "";
- cursor = 0;
- state = "no scheme";
- continue;
- } else if (EOF == c) {
- break loop;
- } else {
- err("Code point not allowed in scheme: " + c);
- break loop;
- }
- break;
-
- case "scheme data":
- if ("?" == c) {
- query = "?";
- state = "query";
- } else if ("#" == c) {
- this._fragment = "#";
- state = "fragment";
- } else {
- if (EOF != c && " " != c && "\n" != c && "\r" != c) {
- this._schemeData += percentEscape(c);
- }
- }
- break;
-
- case "no scheme":
- if (!base || !isRelativeScheme(base._scheme)) {
- err("Missing scheme.");
- invalid.call(this);
- } else {
- state = "relative";
- continue;
- }
- break;
-
- case "relative or authority":
- if ("/" == c && "/" == input[cursor + 1]) {
- state = "authority ignore slashes";
- } else {
- err("Expected /, got: " + c);
- state = "relative";
- continue;
- }
- break;
-
- case "relative":
- this._isRelative = true;
- if ("file" != this._scheme) this._scheme = base._scheme;
- if (EOF == c) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._query = base._query;
- break loop;
- } else if ("/" == c || "\\" == c) {
- if ("\\" == c) err("\\ is an invalid code point.");
- state = "relative slash";
- } else if ("?" == c) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._query = "?";
- state = "query";
- } else if ("#" == c) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._query = base._query;
- this._fragment = "#";
- state = "fragment";
- } else {
- var nextC = input[cursor + 1];
- var nextNextC = input[cursor + 2];
- if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._path.pop();
- }
- state = "relative path";
- continue;
- }
- break;
-
- case "relative slash":
- if ("/" == c || "\\" == c) {
- if ("\\" == c) {
- err("\\ is an invalid code point.");
- }
- if ("file" == this._scheme) {
- state = "file host";
- } else {
- state = "authority ignore slashes";
- }
- } else {
- if ("file" != this._scheme) {
- this._host = base._host;
- this._port = base._port;
- }
- state = "relative path";
- continue;
- }
- break;
-
- case "authority first slash":
- if ("/" == c) {
- state = "authority second slash";
- } else {
- err("Expected '/', got: " + c);
- state = "authority ignore slashes";
- continue;
- }
- break;
-
- case "authority second slash":
- state = "authority ignore slashes";
- if ("/" != c) {
- err("Expected '/', got: " + c);
- continue;
- }
- break;
-
- case "authority ignore slashes":
- if ("/" != c && "\\" != c) {
- state = "authority";
- continue;
- } else {
- err("Expected authority, got: " + c);
- }
- break;
-
- case "authority":
- if ("@" == c) {
- if (seenAt) {
- err("@ already seen.");
- buffer += "%40";
- }
- seenAt = true;
- for (var i = 0; i < buffer.length; i++) {
- var cp = buffer[i];
- if (" " == cp || "\n" == cp || "\r" == cp) {
- err("Invalid whitespace in authority.");
- continue;
- }
- if (":" == cp && null === this._password) {
- this._password = "";
- continue;
- }
- var tempC = percentEscape(cp);
- null !== this._password ? this._password += tempC : this._username += tempC;
- }
- buffer = "";
- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
- cursor -= buffer.length;
- buffer = "";
- state = "host";
- continue;
- } else {
- buffer += c;
- }
- break;
-
- case "file host":
- if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
- if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {
- state = "relative path";
- } else if (buffer.length == 0) {
- state = "relative path start";
- } else {
- this._host = IDNAToASCII.call(this, buffer);
- buffer = "";
- state = "relative path start";
- }
- continue;
- } else if (" " == c || "\n" == c || "\r" == c) {
- err("Invalid whitespace in file host.");
- } else {
- buffer += c;
- }
- break;
-
- case "host":
- case "hostname":
- if (":" == c && !seenBracket) {
- this._host = IDNAToASCII.call(this, buffer);
- buffer = "";
- state = "port";
- if ("hostname" == stateOverride) {
- break loop;
- }
- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
- this._host = IDNAToASCII.call(this, buffer);
- buffer = "";
- state = "relative path start";
- if (stateOverride) {
- break loop;
- }
- continue;
- } else if (" " != c && "\n" != c && "\r" != c) {
- if ("[" == c) {
- seenBracket = true;
- } else if ("]" == c) {
- seenBracket = false;
- }
- buffer += c;
- } else {
- err("Invalid code point in host/hostname: " + c);
- }
- break;
-
- case "port":
- if (/[0-9]/.test(c)) {
- buffer += c;
- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {
- if ("" != buffer) {
- var temp = parseInt(buffer, 10);
- if (temp != relative[this._scheme]) {
- this._port = temp + "";
- }
- buffer = "";
- }
- if (stateOverride) {
- break loop;
- }
- state = "relative path start";
- continue;
- } else if (" " == c || "\n" == c || "\r" == c) {
- err("Invalid code point in port: " + c);
- } else {
- invalid.call(this);
- }
- break;
-
- case "relative path start":
- if ("\\" == c) err("'\\' not allowed in path.");
- state = "relative path";
- if ("/" != c && "\\" != c) {
- continue;
- }
- break;
-
- case "relative path":
- if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {
- if ("\\" == c) {
- err("\\ not allowed in relative path.");
- }
- var tmp;
- if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
- buffer = tmp;
- }
- if (".." == buffer) {
- this._path.pop();
- if ("/" != c && "\\" != c) {
- this._path.push("");
- }
- } else if ("." == buffer && "/" != c && "\\" != c) {
- this._path.push("");
- } else if ("." != buffer) {
- if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {
- buffer = buffer[0] + ":";
- }
- this._path.push(buffer);
- }
- buffer = "";
- if ("?" == c) {
- this._query = "?";
- state = "query";
- } else if ("#" == c) {
- this._fragment = "#";
- state = "fragment";
- }
- } else if (" " != c && "\n" != c && "\r" != c) {
- buffer += percentEscape(c);
- }
- break;
-
- case "query":
- if (!stateOverride && "#" == c) {
- this._fragment = "#";
- state = "fragment";
- } else if (EOF != c && " " != c && "\n" != c && "\r" != c) {
- this._query += percentEscapeQuery(c);
- }
- break;
-
- case "fragment":
- if (EOF != c && " " != c && "\n" != c && "\r" != c) {
- this._fragment += c;
- }
- break;
- }
- cursor++;
- }
- }
- function clear() {
- this._scheme = "";
- this._schemeData = "";
- this._username = "";
- this._password = null;
- this._host = "";
- this._port = "";
- this._path = [];
- this._query = "";
- this._fragment = "";
- this._isInvalid = false;
- this._isRelative = false;
- }
- function jURL(url, base) {
- if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
- this._url = url;
- clear.call(this);
- var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");
- parse.call(this, input, null, base);
- }
- jURL.prototype = {
- toString: function() {
- return this.href;
- },
- get href() {
- if (this._isInvalid) return this._url;
- var authority = "";
- if ("" != this._username || null != this._password) {
- authority = this._username + (null != this._password ? ":" + this._password : "") + "@";
- }
- return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;
- },
- set href(href) {
- clear.call(this);
- parse.call(this, href);
- },
- get protocol() {
- return this._scheme + ":";
- },
- set protocol(protocol) {
- if (this._isInvalid) return;
- parse.call(this, protocol + ":", "scheme start");
- },
- get host() {
- return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;
- },
- set host(host) {
- if (this._isInvalid || !this._isRelative) return;
- parse.call(this, host, "host");
- },
- get hostname() {
- return this._host;
- },
- set hostname(hostname) {
- if (this._isInvalid || !this._isRelative) return;
- parse.call(this, hostname, "hostname");
- },
- get port() {
- return this._port;
- },
- set port(port) {
- if (this._isInvalid || !this._isRelative) return;
- parse.call(this, port, "port");
- },
- get pathname() {
- return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;
- },
- set pathname(pathname) {
- if (this._isInvalid || !this._isRelative) return;
- this._path = [];
- parse.call(this, pathname, "relative path start");
- },
- get search() {
- return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;
- },
- set search(search) {
- if (this._isInvalid || !this._isRelative) return;
- this._query = "?";
- if ("?" == search[0]) search = search.slice(1);
- parse.call(this, search, "query");
- },
- get hash() {
- return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;
- },
- set hash(hash) {
- if (this._isInvalid) return;
- this._fragment = "#";
- if ("#" == hash[0]) hash = hash.slice(1);
- parse.call(this, hash, "fragment");
- },
- get origin() {
- var host;
- if (this._isInvalid || !this._scheme) {
- return "";
- }
- switch (this._scheme) {
- case "data":
- case "file":
- case "javascript":
- case "mailto":
- return "null";
- }
- host = this.host;
- if (!host) {
- return "";
- }
- return this._scheme + "://" + host;
- }
- };
- var OriginalURL = scope.URL;
- if (OriginalURL) {
- jURL.createObjectURL = function(blob) {
- return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
- };
- jURL.revokeObjectURL = function(url) {
- OriginalURL.revokeObjectURL(url);
- };
- }
- scope.URL = jURL;
-})(this);
-
-if (typeof WeakMap === "undefined") {
- (function() {
- var defineProperty = Object.defineProperty;
- var counter = Date.now() % 1e9;
- var WeakMap = function() {
- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
- };
- WeakMap.prototype = {
- set: function(key, value) {
- var entry = key[this.name];
- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
- value: [ key, value ],
- writable: true
- });
- return this;
- },
- get: function(key) {
- var entry;
- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
- },
- "delete": function(key) {
- var entry = key[this.name];
- if (!entry || entry[0] !== key) return false;
- entry[0] = entry[1] = undefined;
- return true;
- },
- has: function(key) {
- var entry = key[this.name];
- if (!entry) return false;
- return entry[0] === key;
- }
- };
- window.WeakMap = WeakMap;
- })();
-}
-
-(function(global) {
- var registrationsTable = new WeakMap();
- var setImmediate;
- if (/Trident|Edge/.test(navigator.userAgent)) {
- setImmediate = setTimeout;
- } else if (window.setImmediate) {
- setImmediate = window.setImmediate;
- } else {
- var setImmediateQueue = [];
- var sentinel = String(Math.random());
- window.addEventListener("message", function(e) {
- if (e.data === sentinel) {
- var queue = setImmediateQueue;
- setImmediateQueue = [];
- queue.forEach(function(func) {
- func();
- });
- }
- });
- setImmediate = function(func) {
- setImmediateQueue.push(func);
- window.postMessage(sentinel, "*");
- };
- }
- var isScheduled = false;
- var scheduledObservers = [];
- function scheduleCallback(observer) {
- scheduledObservers.push(observer);
- if (!isScheduled) {
- isScheduled = true;
- setImmediate(dispatchCallbacks);
- }
- }
- function wrapIfNeeded(node) {
- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
- }
- function dispatchCallbacks() {
- isScheduled = false;
- var observers = scheduledObservers;
- scheduledObservers = [];
- observers.sort(function(o1, o2) {
- return o1.uid_ - o2.uid_;
- });
- var anyNonEmpty = false;
- observers.forEach(function(observer) {
- var queue = observer.takeRecords();
- removeTransientObserversFor(observer);
- if (queue.length) {
- observer.callback_(queue, observer);
- anyNonEmpty = true;
- }
- });
- if (anyNonEmpty) dispatchCallbacks();
- }
- function removeTransientObserversFor(observer) {
- observer.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- if (!registrations) return;
- registrations.forEach(function(registration) {
- if (registration.observer === observer) registration.removeTransientObservers();
- });
- });
- }
- function forEachAncestorAndObserverEnqueueRecord(target, callback) {
- for (var node = target; node; node = node.parentNode) {
- var registrations = registrationsTable.get(node);
- if (registrations) {
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- var options = registration.options;
- if (node !== target && !options.subtree) continue;
- var record = callback(options);
- if (record) registration.enqueue(record);
- }
- }
- }
- }
- var uidCounter = 0;
- function JsMutationObserver(callback) {
- this.callback_ = callback;
- this.nodes_ = [];
- this.records_ = [];
- this.uid_ = ++uidCounter;
- }
- JsMutationObserver.prototype = {
- observe: function(target, options) {
- target = wrapIfNeeded(target);
- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
- throw new SyntaxError();
- }
- var registrations = registrationsTable.get(target);
- if (!registrations) registrationsTable.set(target, registrations = []);
- var registration;
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i].observer === this) {
- registration = registrations[i];
- registration.removeListeners();
- registration.options = options;
- break;
- }
- }
- if (!registration) {
- registration = new Registration(this, target, options);
- registrations.push(registration);
- this.nodes_.push(target);
- }
- registration.addListeners();
- },
- disconnect: function() {
- this.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.observer === this) {
- registration.removeListeners();
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- this.records_ = [];
- },
- takeRecords: function() {
- var copyOfRecords = this.records_;
- this.records_ = [];
- return copyOfRecords;
- }
- };
- function MutationRecord(type, target) {
- this.type = type;
- this.target = target;
- this.addedNodes = [];
- this.removedNodes = [];
- this.previousSibling = null;
- this.nextSibling = null;
- this.attributeName = null;
- this.attributeNamespace = null;
- this.oldValue = null;
- }
- function copyMutationRecord(original) {
- var record = new MutationRecord(original.type, original.target);
- record.addedNodes = original.addedNodes.slice();
- record.removedNodes = original.removedNodes.slice();
- record.previousSibling = original.previousSibling;
- record.nextSibling = original.nextSibling;
- record.attributeName = original.attributeName;
- record.attributeNamespace = original.attributeNamespace;
- record.oldValue = original.oldValue;
- return record;
- }
- var currentRecord, recordWithOldValue;
- function getRecord(type, target) {
- return currentRecord = new MutationRecord(type, target);
- }
- function getRecordWithOldValue(oldValue) {
- if (recordWithOldValue) return recordWithOldValue;
- recordWithOldValue = copyMutationRecord(currentRecord);
- recordWithOldValue.oldValue = oldValue;
- return recordWithOldValue;
- }
- function clearRecords() {
- currentRecord = recordWithOldValue = undefined;
- }
- function recordRepresentsCurrentMutation(record) {
- return record === recordWithOldValue || record === currentRecord;
- }
- function selectRecord(lastRecord, newRecord) {
- if (lastRecord === newRecord) return lastRecord;
- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
- return null;
- }
- function Registration(observer, target, options) {
- this.observer = observer;
- this.target = target;
- this.options = options;
- this.transientObservedNodes = [];
- }
- Registration.prototype = {
- enqueue: function(record) {
- var records = this.observer.records_;
- var length = records.length;
- if (records.length > 0) {
- var lastRecord = records[length - 1];
- var recordToReplaceLast = selectRecord(lastRecord, record);
- if (recordToReplaceLast) {
- records[length - 1] = recordToReplaceLast;
- return;
- }
- } else {
- scheduleCallback(this.observer);
- }
- records[length] = record;
- },
- addListeners: function() {
- this.addListeners_(this.target);
- },
- addListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
- },
- removeListeners: function() {
- this.removeListeners_(this.target);
- },
- removeListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
- },
- addTransientObserver: function(node) {
- if (node === this.target) return;
- this.addListeners_(node);
- this.transientObservedNodes.push(node);
- var registrations = registrationsTable.get(node);
- if (!registrations) registrationsTable.set(node, registrations = []);
- registrations.push(this);
- },
- removeTransientObservers: function() {
- var transientObservedNodes = this.transientObservedNodes;
- this.transientObservedNodes = [];
- transientObservedNodes.forEach(function(node) {
- this.removeListeners_(node);
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i] === this) {
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- },
- handleEvent: function(e) {
- e.stopImmediatePropagation();
- switch (e.type) {
- case "DOMAttrModified":
- var name = e.attrName;
- var namespace = e.relatedNode.namespaceURI;
- var target = e.target;
- var record = new getRecord("attributes", target);
- record.attributeName = name;
- record.attributeNamespace = namespace;
- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.attributes) return;
- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
- return;
- }
- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMCharacterDataModified":
- var target = e.target;
- var record = getRecord("characterData", target);
- var oldValue = e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.characterData) return;
- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMNodeRemoved":
- this.addTransientObserver(e.target);
-
- case "DOMNodeInserted":
- var changedNode = e.target;
- var addedNodes, removedNodes;
- if (e.type === "DOMNodeInserted") {
- addedNodes = [ changedNode ];
- removedNodes = [];
- } else {
- addedNodes = [];
- removedNodes = [ changedNode ];
- }
- var previousSibling = changedNode.previousSibling;
- var nextSibling = changedNode.nextSibling;
- var record = getRecord("childList", e.target.parentNode);
- record.addedNodes = addedNodes;
- record.removedNodes = removedNodes;
- record.previousSibling = previousSibling;
- record.nextSibling = nextSibling;
- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
- if (!options.childList) return;
- return record;
- });
- }
- clearRecords();
- }
- };
- global.JsMutationObserver = JsMutationObserver;
- if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
-})(this);
-
-window.HTMLImports = window.HTMLImports || {
- flags: {}
-};
-
-(function(scope) {
- var IMPORT_LINK_TYPE = "import";
- var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
- var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
- var wrap = function(node) {
- return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
- };
- var rootDocument = wrap(document);
- var currentScriptDescriptor = {
- get: function() {
- var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
- return wrap(script);
- },
- configurable: true
- };
- Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
- Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
- var isIE = /Trident|Edge/.test(navigator.userAgent);
- function whenReady(callback, doc) {
- doc = doc || rootDocument;
- whenDocumentReady(function() {
- watchImportsLoad(callback, doc);
- }, doc);
- }
- var requiredReadyState = isIE ? "complete" : "interactive";
- var READY_EVENT = "readystatechange";
- function isDocumentReady(doc) {
- return doc.readyState === "complete" || doc.readyState === requiredReadyState;
- }
- function whenDocumentReady(callback, doc) {
- if (!isDocumentReady(doc)) {
- var checkReady = function() {
- if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {
- doc.removeEventListener(READY_EVENT, checkReady);
- whenDocumentReady(callback, doc);
- }
- };
- doc.addEventListener(READY_EVENT, checkReady);
- } else if (callback) {
- callback();
- }
- }
- function markTargetLoaded(event) {
- event.target.__loaded = true;
- }
- function watchImportsLoad(callback, doc) {
- var imports = doc.querySelectorAll("link[rel=import]");
- var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
- function checkDone() {
- if (parsedCount == importCount && callback) {
- callback({
- allImports: imports,
- loadedImports: newImports,
- errorImports: errorImports
- });
- }
- }
- function loadedImport(e) {
- markTargetLoaded(e);
- newImports.push(this);
- parsedCount++;
- checkDone();
- }
- function errorLoadingImport(e) {
- errorImports.push(this);
- parsedCount++;
- checkDone();
- }
- if (importCount) {
- for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
- if (isImportLoaded(imp)) {
- parsedCount++;
- checkDone();
- } else {
- imp.addEventListener("load", loadedImport);
- imp.addEventListener("error", errorLoadingImport);
- }
- }
- } else {
- checkDone();
- }
- }
- function isImportLoaded(link) {
- return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;
- }
- if (useNative) {
- new MutationObserver(function(mxns) {
- for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {
- if (m.addedNodes) {
- handleImports(m.addedNodes);
- }
- }
- }).observe(document.head, {
- childList: true
- });
- function handleImports(nodes) {
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- if (isImport(n)) {
- handleImport(n);
- }
- }
- }
- function isImport(element) {
- return element.localName === "link" && element.rel === "import";
- }
- function handleImport(element) {
- var loaded = element.import;
- if (loaded) {
- markTargetLoaded({
- target: element
- });
- } else {
- element.addEventListener("load", markTargetLoaded);
- element.addEventListener("error", markTargetLoaded);
- }
- }
- (function() {
- if (document.readyState === "loading") {
- var imports = document.querySelectorAll("link[rel=import]");
- for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {
- handleImport(imp);
- }
- }
- })();
- }
- whenReady(function(detail) {
- HTMLImports.ready = true;
- HTMLImports.readyTime = new Date().getTime();
- var evt = rootDocument.createEvent("CustomEvent");
- evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
- rootDocument.dispatchEvent(evt);
- });
- scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
- scope.useNative = useNative;
- scope.rootDocument = rootDocument;
- scope.whenReady = whenReady;
- scope.isIE = isIE;
-})(HTMLImports);
-
-(function(scope) {
- var modules = [];
- var addModule = function(module) {
- modules.push(module);
- };
- var initializeModules = function() {
- modules.forEach(function(module) {
- module(scope);
- });
- };
- scope.addModule = addModule;
- scope.initializeModules = initializeModules;
-})(HTMLImports);
-
-HTMLImports.addModule(function(scope) {
- var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
- var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
- var path = {
- resolveUrlsInStyle: function(style, linkUrl) {
- var doc = style.ownerDocument;
- var resolver = doc.createElement("a");
- style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
- return style;
- },
- resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
- var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
- r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
- return r;
- },
- replaceUrls: function(text, urlObj, linkUrl, regexp) {
- return text.replace(regexp, function(m, pre, url, post) {
- var urlPath = url.replace(/["']/g, "");
- if (linkUrl) {
- urlPath = new URL(urlPath, linkUrl).href;
- }
- urlObj.href = urlPath;
- urlPath = urlObj.href;
- return pre + "'" + urlPath + "'" + post;
- });
- }
- };
- scope.path = path;
-});
-
-HTMLImports.addModule(function(scope) {
- var xhr = {
- async: true,
- ok: function(request) {
- return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
- },
- load: function(url, next, nextContext) {
- var request = new XMLHttpRequest();
- if (scope.flags.debug || scope.flags.bust) {
- url += "?" + Math.random();
- }
- request.open("GET", url, xhr.async);
- request.addEventListener("readystatechange", function(e) {
- if (request.readyState === 4) {
- var locationHeader = request.getResponseHeader("Location");
- var redirectedUrl = null;
- if (locationHeader) {
- var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
- }
- next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
- }
- });
- request.send();
- return request;
- },
- loadDocument: function(url, next, nextContext) {
- this.load(url, next, nextContext).responseType = "document";
- }
- };
- scope.xhr = xhr;
-});
-
-HTMLImports.addModule(function(scope) {
- var xhr = scope.xhr;
- var flags = scope.flags;
- var Loader = function(onLoad, onComplete) {
- this.cache = {};
- this.onload = onLoad;
- this.oncomplete = onComplete;
- this.inflight = 0;
- this.pending = {};
- };
- Loader.prototype = {
- addNodes: function(nodes) {
- this.inflight += nodes.length;
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- this.require(n);
- }
- this.checkDone();
- },
- addNode: function(node) {
- this.inflight++;
- this.require(node);
- this.checkDone();
- },
- require: function(elt) {
- var url = elt.src || elt.href;
- elt.__nodeUrl = url;
- if (!this.dedupe(url, elt)) {
- this.fetch(url, elt);
- }
- },
- dedupe: function(url, elt) {
- if (this.pending[url]) {
- this.pending[url].push(elt);
- return true;
- }
- var resource;
- if (this.cache[url]) {
- this.onload(url, elt, this.cache[url]);
- this.tail();
- return true;
- }
- this.pending[url] = [ elt ];
- return false;
- },
- fetch: function(url, elt) {
- flags.load && console.log("fetch", url, elt);
- if (!url) {
- setTimeout(function() {
- this.receive(url, elt, {
- error: "href must be specified"
- }, null);
- }.bind(this), 0);
- } else if (url.match(/^data:/)) {
- var pieces = url.split(",");
- var header = pieces[0];
- var body = pieces[1];
- if (header.indexOf(";base64") > -1) {
- body = atob(body);
- } else {
- body = decodeURIComponent(body);
- }
- setTimeout(function() {
- this.receive(url, elt, null, body);
- }.bind(this), 0);
- } else {
- var receiveXhr = function(err, resource, redirectedUrl) {
- this.receive(url, elt, err, resource, redirectedUrl);
- }.bind(this);
- xhr.load(url, receiveXhr);
- }
- },
- receive: function(url, elt, err, resource, redirectedUrl) {
- this.cache[url] = resource;
- var $p = this.pending[url];
- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
- this.onload(url, p, resource, err, redirectedUrl);
- this.tail();
- }
- this.pending[url] = null;
- },
- tail: function() {
- --this.inflight;
- this.checkDone();
- },
- checkDone: function() {
- if (!this.inflight) {
- this.oncomplete();
- }
- }
- };
- scope.Loader = Loader;
-});
-
-HTMLImports.addModule(function(scope) {
- var Observer = function(addCallback) {
- this.addCallback = addCallback;
- this.mo = new MutationObserver(this.handler.bind(this));
- };
- Observer.prototype = {
- handler: function(mutations) {
- for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {
- if (m.type === "childList" && m.addedNodes.length) {
- this.addedNodes(m.addedNodes);
- }
- }
- },
- addedNodes: function(nodes) {
- if (this.addCallback) {
- this.addCallback(nodes);
- }
- for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {
- if (n.children && n.children.length) {
- this.addedNodes(n.children);
- }
- }
- },
- observe: function(root) {
- this.mo.observe(root, {
- childList: true,
- subtree: true
- });
- }
- };
- scope.Observer = Observer;
-});
-
-HTMLImports.addModule(function(scope) {
- var path = scope.path;
- var rootDocument = scope.rootDocument;
- var flags = scope.flags;
- var isIE = scope.isIE;
- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
- var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
- var importParser = {
- documentSelectors: IMPORT_SELECTOR,
- importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="text/javascript"]' ].join(","),
- map: {
- link: "parseLink",
- script: "parseScript",
- style: "parseStyle"
- },
- dynamicElements: [],
- parseNext: function() {
- var next = this.nextToParse();
- if (next) {
- this.parse(next);
- }
- },
- parse: function(elt) {
- if (this.isParsed(elt)) {
- flags.parse && console.log("[%s] is already parsed", elt.localName);
- return;
- }
- var fn = this[this.map[elt.localName]];
- if (fn) {
- this.markParsing(elt);
- fn.call(this, elt);
- }
- },
- parseDynamic: function(elt, quiet) {
- this.dynamicElements.push(elt);
- if (!quiet) {
- this.parseNext();
- }
- },
- markParsing: function(elt) {
- flags.parse && console.log("parsing", elt);
- this.parsingElement = elt;
- },
- markParsingComplete: function(elt) {
- elt.__importParsed = true;
- this.markDynamicParsingComplete(elt);
- if (elt.__importElement) {
- elt.__importElement.__importParsed = true;
- this.markDynamicParsingComplete(elt.__importElement);
- }
- this.parsingElement = null;
- flags.parse && console.log("completed", elt);
- },
- markDynamicParsingComplete: function(elt) {
- var i = this.dynamicElements.indexOf(elt);
- if (i >= 0) {
- this.dynamicElements.splice(i, 1);
- }
- },
- parseImport: function(elt) {
- if (HTMLImports.__importsParsingHook) {
- HTMLImports.__importsParsingHook(elt);
- }
- if (elt.import) {
- elt.import.__importParsed = true;
- }
- this.markParsingComplete(elt);
- if (elt.__resource && !elt.__error) {
- elt.dispatchEvent(new CustomEvent("load", {
- bubbles: false
- }));
- } else {
- elt.dispatchEvent(new CustomEvent("error", {
- bubbles: false
- }));
- }
- if (elt.__pending) {
- var fn;
- while (elt.__pending.length) {
- fn = elt.__pending.shift();
- if (fn) {
- fn({
- target: elt
- });
- }
- }
- }
- this.parseNext();
- },
- parseLink: function(linkElt) {
- if (nodeIsImport(linkElt)) {
- this.parseImport(linkElt);
- } else {
- linkElt.href = linkElt.href;
- this.parseGeneric(linkElt);
- }
- },
- parseStyle: function(elt) {
- var src = elt;
- elt = cloneStyle(elt);
- src.__appliedElement = elt;
- elt.__importElement = src;
- this.parseGeneric(elt);
- },
- parseGeneric: function(elt) {
- this.trackElement(elt);
- this.addElementToDocument(elt);
- },
- rootImportForElement: function(elt) {
- var n = elt;
- while (n.ownerDocument.__importLink) {
- n = n.ownerDocument.__importLink;
- }
- return n;
- },
- addElementToDocument: function(elt) {
- var port = this.rootImportForElement(elt.__importElement || elt);
- port.parentNode.insertBefore(elt, port);
- },
- trackElement: function(elt, callback) {
- var self = this;
- var done = function(e) {
- if (callback) {
- callback(e);
- }
- self.markParsingComplete(elt);
- self.parseNext();
- };
- elt.addEventListener("load", done);
- elt.addEventListener("error", done);
- if (isIE && elt.localName === "style") {
- var fakeLoad = false;
- if (elt.textContent.indexOf("@import") == -1) {
- fakeLoad = true;
- } else if (elt.sheet) {
- fakeLoad = true;
- var csr = elt.sheet.cssRules;
- var len = csr ? csr.length : 0;
- for (var i = 0, r; i < len && (r = csr[i]); i++) {
- if (r.type === CSSRule.IMPORT_RULE) {
- fakeLoad = fakeLoad && Boolean(r.styleSheet);
- }
- }
- }
- if (fakeLoad) {
- elt.dispatchEvent(new CustomEvent("load", {
- bubbles: false
- }));
- }
- }
- },
- parseScript: function(scriptElt) {
- var script = document.createElement("script");
- script.__importElement = scriptElt;
- script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
- scope.currentScript = scriptElt;
- this.trackElement(script, function(e) {
- script.parentNode.removeChild(script);
- scope.currentScript = null;
- });
- this.addElementToDocument(script);
- },
- nextToParse: function() {
- this._mayParse = [];
- return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());
- },
- nextToParseInDoc: function(doc, link) {
- if (doc && this._mayParse.indexOf(doc) < 0) {
- this._mayParse.push(doc);
- var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
- for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
- if (!this.isParsed(n)) {
- if (this.hasResource(n)) {
- return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
- } else {
- return;
- }
- }
- }
- }
- return link;
- },
- nextToParseDynamic: function() {
- return this.dynamicElements[0];
- },
- parseSelectorsForNode: function(node) {
- var doc = node.ownerDocument || node;
- return doc === rootDocument ? this.documentSelectors : this.importsSelectors;
- },
- isParsed: function(node) {
- return node.__importParsed;
- },
- needsDynamicParsing: function(elt) {
- return this.dynamicElements.indexOf(elt) >= 0;
- },
- hasResource: function(node) {
- if (nodeIsImport(node) && node.import === undefined) {
- return false;
- }
- return true;
- }
- };
- function nodeIsImport(elt) {
- return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;
- }
- function generateScriptDataUrl(script) {
- var scriptContent = generateScriptContent(script);
- return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);
- }
- function generateScriptContent(script) {
- return script.textContent + generateSourceMapHint(script);
- }
- function generateSourceMapHint(script) {
- var owner = script.ownerDocument;
- owner.__importedScripts = owner.__importedScripts || 0;
- var moniker = script.ownerDocument.baseURI;
- var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";
- owner.__importedScripts++;
- return "\n//# sourceURL=" + moniker + num + ".js\n";
- }
- function cloneStyle(style) {
- var clone = style.ownerDocument.createElement("style");
- clone.textContent = style.textContent;
- path.resolveUrlsInStyle(clone);
- return clone;
- }
- scope.parser = importParser;
- scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
-});
-
-HTMLImports.addModule(function(scope) {
- var flags = scope.flags;
- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
- var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
- var rootDocument = scope.rootDocument;
- var Loader = scope.Loader;
- var Observer = scope.Observer;
- var parser = scope.parser;
- var importer = {
- documents: {},
- documentPreloadSelectors: IMPORT_SELECTOR,
- importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),
- loadNode: function(node) {
- importLoader.addNode(node);
- },
- loadSubtree: function(parent) {
- var nodes = this.marshalNodes(parent);
- importLoader.addNodes(nodes);
- },
- marshalNodes: function(parent) {
- return parent.querySelectorAll(this.loadSelectorsForNode(parent));
- },
- loadSelectorsForNode: function(node) {
- var doc = node.ownerDocument || node;
- return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;
- },
- loaded: function(url, elt, resource, err, redirectedUrl) {
- flags.load && console.log("loaded", url, elt);
- elt.__resource = resource;
- elt.__error = err;
- if (isImportLink(elt)) {
- var doc = this.documents[url];
- if (doc === undefined) {
- doc = err ? null : makeDocument(resource, redirectedUrl || url);
- if (doc) {
- doc.__importLink = elt;
- this.bootDocument(doc);
- }
- this.documents[url] = doc;
- }
- elt.import = doc;
- }
- parser.parseNext();
- },
- bootDocument: function(doc) {
- this.loadSubtree(doc);
- this.observer.observe(doc);
- parser.parseNext();
- },
- loadedAll: function() {
- parser.parseNext();
- }
- };
- var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));
- importer.observer = new Observer();
- function isImportLink(elt) {
- return isLinkRel(elt, IMPORT_LINK_TYPE);
- }
- function isLinkRel(elt, rel) {
- return elt.localName === "link" && elt.getAttribute("rel") === rel;
- }
- function hasBaseURIAccessor(doc) {
- return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
- }
- function makeDocument(resource, url) {
- var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
- doc._URL = url;
- var base = doc.createElement("base");
- base.setAttribute("href", url);
- if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
- Object.defineProperty(doc, "baseURI", {
- value: url
- });
- }
- var meta = doc.createElement("meta");
- meta.setAttribute("charset", "utf-8");
- doc.head.appendChild(meta);
- doc.head.appendChild(base);
- doc.body.innerHTML = resource;
- if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
- HTMLTemplateElement.bootstrap(doc);
- }
- return doc;
- }
- if (!document.baseURI) {
- var baseURIDescriptor = {
- get: function() {
- var base = document.querySelector("base");
- return base ? base.href : window.location.href;
- },
- configurable: true
- };
- Object.defineProperty(document, "baseURI", baseURIDescriptor);
- Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);
- }
- scope.importer = importer;
- scope.importLoader = importLoader;
-});
-
-HTMLImports.addModule(function(scope) {
- var parser = scope.parser;
- var importer = scope.importer;
- var dynamic = {
- added: function(nodes) {
- var owner, parsed, loading;
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- if (!owner) {
- owner = n.ownerDocument;
- parsed = parser.isParsed(owner);
- }
- loading = this.shouldLoadNode(n);
- if (loading) {
- importer.loadNode(n);
- }
- if (this.shouldParseNode(n) && parsed) {
- parser.parseDynamic(n, loading);
- }
- }
- },
- shouldLoadNode: function(node) {
- return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));
- },
- shouldParseNode: function(node) {
- return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));
- }
- };
- importer.observer.addCallback = dynamic.added.bind(dynamic);
- var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;
-});
-
-(function(scope) {
- var initializeModules = scope.initializeModules;
- var isIE = scope.isIE;
- if (scope.useNative) {
- return;
- }
- if (isIE && typeof window.CustomEvent !== "function") {
- window.CustomEvent = function(inType, params) {
- params = params || {};
- var e = document.createEvent("CustomEvent");
- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
- return e;
- };
- window.CustomEvent.prototype = window.Event.prototype;
- }
- initializeModules();
- var rootDocument = scope.rootDocument;
- function bootstrap() {
- HTMLImports.importer.bootDocument(rootDocument);
- }
- if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
- bootstrap();
- } else {
- document.addEventListener("DOMContentLoaded", bootstrap);
- }
-})(HTMLImports);
-
-window.CustomElements = window.CustomElements || {
- flags: {}
-};
-
-(function(scope) {
- var flags = scope.flags;
- var modules = [];
- var addModule = function(module) {
- modules.push(module);
- };
- var initializeModules = function() {
- modules.forEach(function(module) {
- module(scope);
- });
- };
- scope.addModule = addModule;
- scope.initializeModules = initializeModules;
- scope.hasNative = Boolean(document.registerElement);
- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
-})(CustomElements);
-
-CustomElements.addModule(function(scope) {
- var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
- function forSubtree(node, cb) {
- findAllElements(node, function(e) {
- if (cb(e)) {
- return true;
- }
- forRoots(e, cb);
- });
- forRoots(node, cb);
- }
- function findAllElements(node, find, data) {
- var e = node.firstElementChild;
- if (!e) {
- e = node.firstChild;
- while (e && e.nodeType !== Node.ELEMENT_NODE) {
- e = e.nextSibling;
- }
- }
- while (e) {
- if (find(e, data) !== true) {
- findAllElements(e, find, data);
- }
- e = e.nextElementSibling;
- }
- return null;
- }
- function forRoots(node, cb) {
- var root = node.shadowRoot;
- while (root) {
- forSubtree(root, cb);
- root = root.olderShadowRoot;
- }
- }
- function forDocumentTree(doc, cb) {
- _forDocumentTree(doc, cb, []);
- }
- function _forDocumentTree(doc, cb, processingDocuments) {
- doc = wrap(doc);
- if (processingDocuments.indexOf(doc) >= 0) {
- return;
- }
- processingDocuments.push(doc);
- var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
- for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
- if (n.import) {
- _forDocumentTree(n.import, cb, processingDocuments);
- }
- }
- cb(doc);
- }
- scope.forDocumentTree = forDocumentTree;
- scope.forSubtree = forSubtree;
-});
-
-CustomElements.addModule(function(scope) {
- var flags = scope.flags;
- var forSubtree = scope.forSubtree;
- var forDocumentTree = scope.forDocumentTree;
- function addedNode(node) {
- return added(node) || addedSubtree(node);
- }
- function added(node) {
- if (scope.upgrade(node)) {
- return true;
- }
- attached(node);
- }
- function addedSubtree(node) {
- forSubtree(node, function(e) {
- if (added(e)) {
- return true;
- }
- });
- }
- function attachedNode(node) {
- attached(node);
- if (inDocument(node)) {
- forSubtree(node, function(e) {
- attached(e);
- });
- }
- }
- var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
- scope.hasPolyfillMutations = hasPolyfillMutations;
- var isPendingMutations = false;
- var pendingMutations = [];
- function deferMutation(fn) {
- pendingMutations.push(fn);
- if (!isPendingMutations) {
- isPendingMutations = true;
- setTimeout(takeMutations);
- }
- }
- function takeMutations() {
- isPendingMutations = false;
- var $p = pendingMutations;
- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
- p();
- }
- pendingMutations = [];
- }
- function attached(element) {
- if (hasPolyfillMutations) {
- deferMutation(function() {
- _attached(element);
- });
- } else {
- _attached(element);
- }
- }
- function _attached(element) {
- if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
- if (!element.__attached && inDocument(element)) {
- element.__attached = true;
- if (element.attachedCallback) {
- element.attachedCallback();
- }
- }
- }
- }
- function detachedNode(node) {
- detached(node);
- forSubtree(node, function(e) {
- detached(e);
- });
- }
- function detached(element) {
- if (hasPolyfillMutations) {
- deferMutation(function() {
- _detached(element);
- });
- } else {
- _detached(element);
- }
- }
- function _detached(element) {
- if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
- if (element.__attached && !inDocument(element)) {
- element.__attached = false;
- if (element.detachedCallback) {
- element.detachedCallback();
- }
- }
- }
- }
- function inDocument(element) {
- var p = element;
- var doc = wrap(document);
- while (p) {
- if (p == doc) {
- return true;
- }
- p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
- }
- }
- function watchShadow(node) {
- if (node.shadowRoot && !node.shadowRoot.__watched) {
- flags.dom && console.log("watching shadow-root for: ", node.localName);
- var root = node.shadowRoot;
- while (root) {
- observe(root);
- root = root.olderShadowRoot;
- }
- }
- }
- function handler(mutations) {
- if (flags.dom) {
- var mx = mutations[0];
- if (mx && mx.type === "childList" && mx.addedNodes) {
- if (mx.addedNodes) {
- var d = mx.addedNodes[0];
- while (d && d !== document && !d.host) {
- d = d.parentNode;
- }
- var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
- u = u.split("/?").shift().split("/").pop();
- }
- }
- console.group("mutations (%d) [%s]", mutations.length, u || "");
- }
- mutations.forEach(function(mx) {
- if (mx.type === "childList") {
- forEach(mx.addedNodes, function(n) {
- if (!n.localName) {
- return;
- }
- addedNode(n);
- });
- forEach(mx.removedNodes, function(n) {
- if (!n.localName) {
- return;
- }
- detachedNode(n);
- });
- }
- });
- flags.dom && console.groupEnd();
- }
- function takeRecords(node) {
- node = wrap(node);
- if (!node) {
- node = wrap(document);
- }
- while (node.parentNode) {
- node = node.parentNode;
- }
- var observer = node.__observer;
- if (observer) {
- handler(observer.takeRecords());
- takeMutations();
- }
- }
- var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
- function observe(inRoot) {
- if (inRoot.__observer) {
- return;
- }
- var observer = new MutationObserver(handler);
- observer.observe(inRoot, {
- childList: true,
- subtree: true
- });
- inRoot.__observer = observer;
- }
- function upgradeDocument(doc) {
- doc = wrap(doc);
- flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
- addedNode(doc);
- observe(doc);
- flags.dom && console.groupEnd();
- }
- function upgradeDocumentTree(doc) {
- forDocumentTree(doc, upgradeDocument);
- }
- var originalCreateShadowRoot = Element.prototype.createShadowRoot;
- if (originalCreateShadowRoot) {
- Element.prototype.createShadowRoot = function() {
- var root = originalCreateShadowRoot.call(this);
- CustomElements.watchShadow(this);
- return root;
- };
- }
- scope.watchShadow = watchShadow;
- scope.upgradeDocumentTree = upgradeDocumentTree;
- scope.upgradeSubtree = addedSubtree;
- scope.upgradeAll = addedNode;
- scope.attachedNode = attachedNode;
- scope.takeRecords = takeRecords;
-});
-
-CustomElements.addModule(function(scope) {
- var flags = scope.flags;
- function upgrade(node) {
- if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
- var is = node.getAttribute("is");
- var definition = scope.getRegisteredDefinition(is || node.localName);
- if (definition) {
- if (is && definition.tag == node.localName) {
- return upgradeWithDefinition(node, definition);
- } else if (!is && !definition.extends) {
- return upgradeWithDefinition(node, definition);
- }
- }
- }
- }
- function upgradeWithDefinition(element, definition) {
- flags.upgrade && console.group("upgrade:", element.localName);
- if (definition.is) {
- element.setAttribute("is", definition.is);
- }
- implementPrototype(element, definition);
- element.__upgraded__ = true;
- created(element);
- scope.attachedNode(element);
- scope.upgradeSubtree(element);
- flags.upgrade && console.groupEnd();
- return element;
- }
- function implementPrototype(element, definition) {
- if (Object.__proto__) {
- element.__proto__ = definition.prototype;
- } else {
- customMixin(element, definition.prototype, definition.native);
- element.__proto__ = definition.prototype;
- }
- }
- function customMixin(inTarget, inSrc, inNative) {
- var used = {};
- var p = inSrc;
- while (p !== inNative && p !== HTMLElement.prototype) {
- var keys = Object.getOwnPropertyNames(p);
- for (var i = 0, k; k = keys[i]; i++) {
- if (!used[k]) {
- Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
- used[k] = 1;
- }
- }
- p = Object.getPrototypeOf(p);
- }
- }
- function created(element) {
- if (element.createdCallback) {
- element.createdCallback();
- }
- }
- scope.upgrade = upgrade;
- scope.upgradeWithDefinition = upgradeWithDefinition;
- scope.implementPrototype = implementPrototype;
-});
-
-CustomElements.addModule(function(scope) {
- var isIE11OrOlder = scope.isIE11OrOlder;
- var upgradeDocumentTree = scope.upgradeDocumentTree;
- var upgradeAll = scope.upgradeAll;
- var upgradeWithDefinition = scope.upgradeWithDefinition;
- var implementPrototype = scope.implementPrototype;
- var useNative = scope.useNative;
- function register(name, options) {
- var definition = options || {};
- if (!name) {
- throw new Error("document.registerElement: first argument `name` must not be empty");
- }
- if (name.indexOf("-") < 0) {
- throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
- }
- if (isReservedTag(name)) {
- throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
- }
- if (getRegisteredDefinition(name)) {
- throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
- }
- if (!definition.prototype) {
- definition.prototype = Object.create(HTMLElement.prototype);
- }
- definition.__name = name.toLowerCase();
- definition.lifecycle = definition.lifecycle || {};
- definition.ancestry = ancestry(definition.extends);
- resolveTagName(definition);
- resolvePrototypeChain(definition);
- overrideAttributeApi(definition.prototype);
- registerDefinition(definition.__name, definition);
- definition.ctor = generateConstructor(definition);
- definition.ctor.prototype = definition.prototype;
- definition.prototype.constructor = definition.ctor;
- if (scope.ready) {
- upgradeDocumentTree(document);
- }
- return definition.ctor;
- }
- function overrideAttributeApi(prototype) {
- if (prototype.setAttribute._polyfilled) {
- return;
- }
- var setAttribute = prototype.setAttribute;
- prototype.setAttribute = function(name, value) {
- changeAttribute.call(this, name, value, setAttribute);
- };
- var removeAttribute = prototype.removeAttribute;
- prototype.removeAttribute = function(name) {
- changeAttribute.call(this, name, null, removeAttribute);
- };
- prototype.setAttribute._polyfilled = true;
- }
- function changeAttribute(name, value, operation) {
- name = name.toLowerCase();
- var oldValue = this.getAttribute(name);
- operation.apply(this, arguments);
- var newValue = this.getAttribute(name);
- if (this.attributeChangedCallback && newValue !== oldValue) {
- this.attributeChangedCallback(name, oldValue, newValue);
- }
- }
- function isReservedTag(name) {
- for (var i = 0; i < reservedTagList.length; i++) {
- if (name === reservedTagList[i]) {
- return true;
- }
- }
- }
- var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
- function ancestry(extnds) {
- var extendee = getRegisteredDefinition(extnds);
- if (extendee) {
- return ancestry(extendee.extends).concat([ extendee ]);
- }
- return [];
- }
- function resolveTagName(definition) {
- var baseTag = definition.extends;
- for (var i = 0, a; a = definition.ancestry[i]; i++) {
- baseTag = a.is && a.tag;
- }
- definition.tag = baseTag || definition.__name;
- if (baseTag) {
- definition.is = definition.__name;
- }
- }
- function resolvePrototypeChain(definition) {
- if (!Object.__proto__) {
- var nativePrototype = HTMLElement.prototype;
- if (definition.is) {
- var inst = document.createElement(definition.tag);
- var expectedPrototype = Object.getPrototypeOf(inst);
- if (expectedPrototype === definition.prototype) {
- nativePrototype = expectedPrototype;
- }
- }
- var proto = definition.prototype, ancestor;
- while (proto && proto !== nativePrototype) {
- ancestor = Object.getPrototypeOf(proto);
- proto.__proto__ = ancestor;
- proto = ancestor;
- }
- definition.native = nativePrototype;
- }
- }
- function instantiate(definition) {
- return upgradeWithDefinition(domCreateElement(definition.tag), definition);
- }
- var registry = {};
- function getRegisteredDefinition(name) {
- if (name) {
- return registry[name.toLowerCase()];
- }
- }
- function registerDefinition(name, definition) {
- registry[name] = definition;
- }
- function generateConstructor(definition) {
- return function() {
- return instantiate(definition);
- };
- }
- var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
- function createElementNS(namespace, tag, typeExtension) {
- if (namespace === HTML_NAMESPACE) {
- return createElement(tag, typeExtension);
- } else {
- return domCreateElementNS(namespace, tag);
- }
- }
- function createElement(tag, typeExtension) {
- var definition = getRegisteredDefinition(typeExtension || tag);
- if (definition) {
- if (tag == definition.tag && typeExtension == definition.is) {
- return new definition.ctor();
- }
- if (!typeExtension && !definition.is) {
- return new definition.ctor();
- }
- }
- var element;
- if (typeExtension) {
- element = createElement(tag);
- element.setAttribute("is", typeExtension);
- return element;
- }
- element = domCreateElement(tag);
- if (tag.indexOf("-") >= 0) {
- implementPrototype(element, HTMLElement);
- }
- return element;
- }
- var domCreateElement = document.createElement.bind(document);
- var domCreateElementNS = document.createElementNS.bind(document);
- var isInstance;
- if (!Object.__proto__ && !useNative) {
- isInstance = function(obj, ctor) {
- var p = obj;
- while (p) {
- if (p === ctor.prototype) {
- return true;
- }
- p = p.__proto__;
- }
- return false;
- };
- } else {
- isInstance = function(obj, base) {
- return obj instanceof base;
- };
- }
- function wrapDomMethodToForceUpgrade(obj, methodName) {
- var orig = obj[methodName];
- obj[methodName] = function() {
- var n = orig.apply(this, arguments);
- upgradeAll(n);
- return n;
- };
- }
- wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
- wrapDomMethodToForceUpgrade(document, "importNode");
- if (isIE11OrOlder) {
- (function() {
- var importNode = document.importNode;
- document.importNode = function() {
- var n = importNode.apply(document, arguments);
- if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
- var f = document.createDocumentFragment();
- f.appendChild(n);
- return f;
- } else {
- return n;
- }
- };
- })();
- }
- document.registerElement = register;
- document.createElement = createElement;
- document.createElementNS = createElementNS;
- scope.registry = registry;
- scope.instanceof = isInstance;
- scope.reservedTagList = reservedTagList;
- scope.getRegisteredDefinition = getRegisteredDefinition;
- document.register = document.registerElement;
-});
-
-(function(scope) {
- var useNative = scope.useNative;
- var initializeModules = scope.initializeModules;
- var isIE11OrOlder = /Trident/.test(navigator.userAgent);
- if (useNative) {
- var nop = function() {};
- scope.watchShadow = nop;
- scope.upgrade = nop;
- scope.upgradeAll = nop;
- scope.upgradeDocumentTree = nop;
- scope.upgradeSubtree = nop;
- scope.takeRecords = nop;
- scope.instanceof = function(obj, base) {
- return obj instanceof base;
- };
- } else {
- initializeModules();
- }
- var upgradeDocumentTree = scope.upgradeDocumentTree;
- if (!window.wrap) {
- if (window.ShadowDOMPolyfill) {
- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
- } else {
- window.wrap = window.unwrap = function(node) {
- return node;
- };
- }
- }
- function bootstrap() {
- upgradeDocumentTree(wrap(document));
- if (window.HTMLImports) {
- HTMLImports.__importsParsingHook = function(elt) {
- upgradeDocumentTree(wrap(elt.import));
- };
- }
- CustomElements.ready = true;
- setTimeout(function() {
- CustomElements.readyTime = Date.now();
- if (window.HTMLImports) {
- CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
- }
- document.dispatchEvent(new CustomEvent("WebComponentsReady", {
- bubbles: true
- }));
- });
- }
- if (isIE11OrOlder && typeof window.CustomEvent !== "function") {
- window.CustomEvent = function(inType, params) {
- params = params || {};
- var e = document.createEvent("CustomEvent");
- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
- return e;
- };
- window.CustomEvent.prototype = window.Event.prototype;
- }
- if (document.readyState === "complete" || scope.flags.eager) {
- bootstrap();
- } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
- bootstrap();
- } else {
- var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
- window.addEventListener(loadEvent, bootstrap);
- }
- scope.isIE11OrOlder = isIE11OrOlder;
-})(window.CustomElements);
-
-if (typeof HTMLTemplateElement === "undefined") {
- (function() {
- var TEMPLATE_TAG = "template";
- HTMLTemplateElement = function() {};
- HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
- HTMLTemplateElement.decorate = function(template) {
- if (!template.content) {
- template.content = template.ownerDocument.createDocumentFragment();
- var child;
- while (child = template.firstChild) {
- template.content.appendChild(child);
- }
- }
- };
- HTMLTemplateElement.bootstrap = function(doc) {
- var templates = doc.querySelectorAll(TEMPLATE_TAG);
- for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {
- HTMLTemplateElement.decorate(t);
- }
- };
- addEventListener("DOMContentLoaded", function() {
- HTMLTemplateElement.bootstrap(document);
- });
- })();
-}
-
-(function(scope) {
- var style = document.createElement("style");
- style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
- var head = document.querySelector("head");
- head.insertBefore(style, head.firstChild);
-})(window.WebComponents); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.min.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.min.js
deleted file mode 100644
index 8fbb97239cf..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents-lite.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log&&t.log.split){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(WebComponents),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var d=a||"scheme start",l=0,u="",_=!1,g=!1,b=[];e:for(;(e[l-1]!=p||0==l)&&!this._isInvalid;){var w=e[l];switch(d){case"scheme start":if(!w||!m.test(w)){if(a){c("Invalid scheme.");break e}u="",d="no scheme";continue}u+=w.toLowerCase(),d="scheme";break;case"scheme":if(w&&v.test(w))u+=w.toLowerCase();else{if(":"!=w){if(a){if(p==w)break e;c("Code point not allowed in scheme: "+w);break e}u="",l=0,d="no scheme";continue}if(this._scheme=u,u="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==w?(query="?",d="query"):"#"==w?(this._fragment="#",d="fragment"):p!=w&&" "!=w&&"\n"!=w&&"\r"!=w&&(this._schemeData+=o(w));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=w||"/"!=e[l+1]){c("Expected /, got: "+w),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),p==w){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query;break e}if("/"==w||"\\"==w)"\\"==w&&c("\\ is an invalid code point."),d="relative slash";else if("?"==w)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",d="query";else{if("#"!=w){var y=e[l+1],E=e[l+2];("file"!=this._scheme||!m.test(w)||":"!=y&&"|"!=y||p!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",d="fragment"}break;case"relative slash":if("/"!=w&&"\\"!=w){"file"!=this._scheme&&(this._host=s._host,this._port=s._port),d="relative path";continue}"\\"==w&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=w){c("Expected '/', got: "+w),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=w){c("Expected '/', got: "+w);continue}break;case"authority ignore slashes":if("/"!=w&&"\\"!=w){d="authority";continue}c("Expected authority, got: "+w);break;case"authority":if("@"==w){_&&(c("@ already seen."),u+="%40"),_=!0;for(var L=0;L<u.length;L++){var M=u[L];if(" "!=M&&"\n"!=M&&"\r"!=M)if(":"!=M||null!==this._password){var T=o(M);null!==this._password?this._password+=T:this._username+=T}else this._password="";else c("Invalid whitespace in authority.")}u=""}else{if(p==w||"/"==w||"\\"==w||"?"==w||"#"==w){l-=u.length,u="",d="host";continue}u+=w}break;case"file host":if(p==w||"/"==w||"\\"==w||"?"==w||"#"==w){2!=u.length||!m.test(u[0])||":"!=u[1]&&"|"!=u[1]?0==u.length?d="relative path start":(this._host=r.call(this,u),u="",d="relative path start"):d="relative path";continue}" "==w||"\n"==w||"\r"==w?c("Invalid whitespace in file host."):u+=w;break;case"host":case"hostname":if(":"!=w||g){if(p==w||"/"==w||"\\"==w||"?"==w||"#"==w){if(this._host=r.call(this,u),u="",d="relative path start",a)break e;continue}" "!=w&&"\n"!=w&&"\r"!=w?("["==w?g=!0:"]"==w&&(g=!1),u+=w):c("Invalid code point in host/hostname: "+w)}else if(this._host=r.call(this,u),u="",d="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(w))u+=w;else{if(p==w||"/"==w||"\\"==w||"?"==w||"#"==w||a){if(""!=u){var N=parseInt(u,10);N!=h[this._scheme]&&(this._port=N+""),u=""}if(a)break e;d="relative path start";continue}" "==w||"\n"==w||"\r"==w?c("Invalid code point in port: "+w):n.call(this)}break;case"relative path start":if("\\"==w&&c("'\\' not allowed in path."),d="relative path","/"!=w&&"\\"!=w)continue;break;case"relative path":if(p!=w&&"/"!=w&&"\\"!=w&&(a||"?"!=w&&"#"!=w))" "!=w&&"\n"!=w&&"\r"!=w&&(u+=o(w));else{"\\"==w&&c("\\ not allowed in relative path.");var O;(O=f[u.toLowerCase()])&&(u=O),".."==u?(this._path.pop(),"/"!=w&&"\\"!=w&&this._path.push("")):"."==u&&"/"!=w&&"\\"!=w?this._path.push(""):"."!=u&&("file"==this._scheme&&0==this._path.length&&2==u.length&&m.test(u[0])&&"|"==u[1]&&(u=u[0]+":"),this._path.push(u)),u="","?"==w?(this._query="?",d="query"):"#"==w&&(this._fragment="#",d="fragment")}break;case"query":a||"#"!=w?p!=w&&" "!=w&&"\n"!=w&&"\r"!=w&&(this._query+=i(w)):(this._fragment="#",d="fragment");break;case"fragment":p!=w&&" "!=w&&"\n"!=w&&"\r"!=w&&(this._fragment+=w)}l++}}function s(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function c(e,t){void 0===t||t instanceof c||(t=new c(String(t))),this._url=e,s.call(this);var n=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");a.call(this,n,null,t)}var d=!1;if(!e.forceJURL)try{var l=new URL("b","http://a");l.pathname="c%20d",d="http://a/c%20d"===l.href}catch(u){}if(!d){var h=Object.create(null);h.ftp=21,h.file=0,h.gopher=70,h.http=80,h.https=443,h.ws=80,h.wss=443;var f=Object.create(null);f["%2e"]=".",f[".%2e"]="..",f["%2e."]="..",f["%2e%2e"]="..";var p=void 0,m=/[a-zA-Z]/,v=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return(""!=this._username||null!=this._password)&&(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){s.call(this),a.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||a.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],a.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),a.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),a.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return e=this.host,e?this._scheme+"://"+e:""}};var _=e.URL;_&&(c.createObjectURL=function(e){return _.createObjectURL.apply(_,arguments)},c.revokeObjectURL=function(e){_.revokeObjectURL(e)}),e.URL=c}}(this),"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){w.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=w;w=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++y}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function d(e,t){return E=new s(e,t)}function l(e){return L?L:(L=c(E),L.oldValue=e,L)}function u(){E=L=void 0}function h(e){return e===L||e===E}function f(e,t){return e===t?e:L&&h(e)?L:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var m,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var _=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=_;_=[],t.forEach(function(e){e()})}}),m=function(e){_.push(e),window.postMessage(g,"*")}}var b=!1,w=[],y=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=v.get(e);r||v.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new p(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var E,L;p.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=f(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new d("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?l(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=d("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?l(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,h=e.target;"DOMNodeInserted"===e.type?(s=[h],c=[]):(s=[],c=[h]);var f=h.previousSibling,p=h.nextSibling,o=d("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=c,o.previousSibling=f,o.nextSibling=p,i(e.relatedNode,function(e){return e.childList?o:void 0})}u()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===_}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===_)&&(t.removeEventListener(g,o),r(e,t))};t.addEventListener(g,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==d&&e&&e({allImports:s,loadedImports:l,errorImports:u})}function r(e){o(e),l.push(this),c++,n()}function i(e){u.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,d=s.length,l=[],u=[];if(d)for(var h,f=0;d>f&&(h=s[f]);f++)a(h)?(c++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return u?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var l="import",u=Boolean(l in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),f=function(e){return h?ShadowDOMPolyfill.wrapIfNeeded(e):e},p=f(document),m={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return f(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(p,"_currentScript",m);var v=/Trident|Edge/.test(navigator.userAgent),_=v?"complete":"interactive",g="readystatechange";u&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)d(e)}()),t(function(e){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=l,e.useNative=u,e.rootDocument=p,e.whenReady=t,e.isIE=v}(HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===l}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,l=e.IMPORT_LINK_TYPE,u="link[rel="+l+"]",h={documentSelectors:u,importsSelectors:[u,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=u}),HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,l=e.Observer,u=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){f.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);f.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}u.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),u.parseNext()},loadedAll:function(){u.parseNext()}},f=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new l,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(c,"baseURI",p)}e.importer=h,e.importLoader=f}),HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){w(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),h(e)&&w(e,function(e){s(e)})}function i(e){M.push(e),L||(L=!0,setTimeout(a))}function a(){L=!1;for(var e,t=M,n=0,r=t.length;r>n&&(e=t[n]);n++)e();M=[]}function s(e){E?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&h(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function d(e){l(e),w(e,function(e){l(e)})}function l(e){E?i(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!h(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function h(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function p(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e)}),T(e.removedNodes,function(e){e.localName&&d(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(p(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(p);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function _(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function g(e){y(e,_)}var b=e.flags,w=e.forSubtree,y=e.forDocumentTree,E=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=E;var L=!1,M=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),N=Element.prototype.createShadowRoot;N&&(Element.prototype.createShadowRoot=function(){var e=N.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=f,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),l(c.__name,c),c.ctor=u(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&_(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<E.length;t++)if(e===E[t])return!0}function i(e){var t=d(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),
-i.__proto__=o,i=o;e["native"]=t}}function c(e){return b(T(e.tag),e)}function d(e){return e?L[e.toLowerCase()]:void 0}function l(e,t){L[e]=t}function u(e){return function(){return c(e)}}function h(e,t,n){return e===M?f(t,n):N(e,t)}function f(e,t){var n=d(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=f(e),r.setAttribute("is",t),r):(r=T(e),e.indexOf("-")>=0&&w(r,HTMLElement),r)}function p(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,v=e.isIE11OrOlder,_=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,w=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],L={},M="http://www.w3.org/1999/xhtml",T=document.createElement.bind(document),N=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},p(Node.prototype,"cloneNode"),p(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=f,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements),"undefined"==typeof HTMLTemplateElement&&!function(){var e="template";HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){e.content=e.ownerDocument.createDocumentFragment();for(var t;t=e.firstChild;)e.content.appendChild(t)}},HTMLTemplateElement.bootstrap=function(t){for(var n,r=t.querySelectorAll(e),o=0,i=r.length;i>o&&(n=r[o]);o++)HTMLTemplateElement.decorate(n)},addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)})}(),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.js
deleted file mode 100644
index b11ce5cafb4..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.js
+++ /dev/null
@@ -1,7064 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-window.WebComponents = window.WebComponents || {};
-
-(function(scope) {
- var flags = scope.flags || {};
- var file = "webcomponents.js";
- var script = document.querySelector('script[src*="' + file + '"]');
- if (!flags.noOpts) {
- location.search.slice(1).split("&").forEach(function(o) {
- o = o.split("=");
- o[0] && (flags[o[0]] = o[1] || true);
- });
- if (script) {
- for (var i = 0, a; a = script.attributes[i]; i++) {
- if (a.name !== "src") {
- flags[a.name] = a.value || true;
- }
- }
- }
- if (flags.log && flags.log.split) {
- var parts = flags.log.split(",");
- flags.log = {};
- parts.forEach(function(f) {
- flags.log[f] = true;
- });
- } else {
- flags.log = {};
- }
- }
- flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;
- if (flags.shadow === "native") {
- flags.shadow = false;
- } else {
- flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;
- }
- if (flags.register) {
- window.CustomElements = window.CustomElements || {
- flags: {}
- };
- window.CustomElements.flags.register = flags.register;
- }
- scope.flags = flags;
-})(WebComponents);
-
-if (WebComponents.flags.shadow) {
- if (typeof WeakMap === "undefined") {
- (function() {
- var defineProperty = Object.defineProperty;
- var counter = Date.now() % 1e9;
- var WeakMap = function() {
- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
- };
- WeakMap.prototype = {
- set: function(key, value) {
- var entry = key[this.name];
- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
- value: [ key, value ],
- writable: true
- });
- return this;
- },
- get: function(key) {
- var entry;
- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
- },
- "delete": function(key) {
- var entry = key[this.name];
- if (!entry || entry[0] !== key) return false;
- entry[0] = entry[1] = undefined;
- return true;
- },
- has: function(key) {
- var entry = key[this.name];
- if (!entry) return false;
- return entry[0] === key;
- }
- };
- window.WeakMap = WeakMap;
- })();
- }
- window.ShadowDOMPolyfill = {};
- (function(scope) {
- "use strict";
- var constructorTable = new WeakMap();
- var nativePrototypeTable = new WeakMap();
- var wrappers = Object.create(null);
- function detectEval() {
- if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) {
- return false;
- }
- if (navigator.getDeviceStorage) {
- return false;
- }
- try {
- var f = new Function("return true;");
- return f();
- } catch (ex) {
- return false;
- }
- }
- var hasEval = detectEval();
- function assert(b) {
- if (!b) throw new Error("Assertion failed");
- }
- var defineProperty = Object.defineProperty;
- var getOwnPropertyNames = Object.getOwnPropertyNames;
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- function mixin(to, from) {
- var names = getOwnPropertyNames(from);
- for (var i = 0; i < names.length; i++) {
- var name = names[i];
- defineProperty(to, name, getOwnPropertyDescriptor(from, name));
- }
- return to;
- }
- function mixinStatics(to, from) {
- var names = getOwnPropertyNames(from);
- for (var i = 0; i < names.length; i++) {
- var name = names[i];
- switch (name) {
- case "arguments":
- case "caller":
- case "length":
- case "name":
- case "prototype":
- case "toString":
- continue;
- }
- defineProperty(to, name, getOwnPropertyDescriptor(from, name));
- }
- return to;
- }
- function oneOf(object, propertyNames) {
- for (var i = 0; i < propertyNames.length; i++) {
- if (propertyNames[i] in object) return propertyNames[i];
- }
- }
- var nonEnumerableDataDescriptor = {
- value: undefined,
- configurable: true,
- enumerable: false,
- writable: true
- };
- function defineNonEnumerableDataProperty(object, name, value) {
- nonEnumerableDataDescriptor.value = value;
- defineProperty(object, name, nonEnumerableDataDescriptor);
- }
- getOwnPropertyNames(window);
- function getWrapperConstructor(node) {
- var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
- if (isFirefox) {
- try {
- getOwnPropertyNames(nativePrototype);
- } catch (error) {
- nativePrototype = nativePrototype.__proto__;
- }
- }
- var wrapperConstructor = constructorTable.get(nativePrototype);
- if (wrapperConstructor) return wrapperConstructor;
- var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
- var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
- registerInternal(nativePrototype, GeneratedWrapper, node);
- return GeneratedWrapper;
- }
- function addForwardingProperties(nativePrototype, wrapperPrototype) {
- installProperty(nativePrototype, wrapperPrototype, true);
- }
- function registerInstanceProperties(wrapperPrototype, instanceObject) {
- installProperty(instanceObject, wrapperPrototype, false);
- }
- var isFirefox = /Firefox/.test(navigator.userAgent);
- var dummyDescriptor = {
- get: function() {},
- set: function(v) {},
- configurable: true,
- enumerable: true
- };
- function isEventHandlerName(name) {
- return /^on[a-z]+$/.test(name);
- }
- function isIdentifierName(name) {
- return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);
- }
- function getGetter(name) {
- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {
- return this.__impl4cf1e782hg__[name];
- };
- }
- function getSetter(name) {
- return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) {
- this.__impl4cf1e782hg__[name] = v;
- };
- }
- function getMethod(name) {
- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() {
- return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments);
- };
- }
- function getDescriptor(source, name) {
- try {
- return Object.getOwnPropertyDescriptor(source, name);
- } catch (ex) {
- return dummyDescriptor;
- }
- }
- var isBrokenSafari = function() {
- var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType");
- return descr && !descr.get && !descr.set;
- }();
- function installProperty(source, target, allowMethod, opt_blacklist) {
- var names = getOwnPropertyNames(source);
- for (var i = 0; i < names.length; i++) {
- var name = names[i];
- if (name === "polymerBlackList_") continue;
- if (name in target) continue;
- if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue;
- if (isFirefox) {
- source.__lookupGetter__(name);
- }
- var descriptor = getDescriptor(source, name);
- var getter, setter;
- if (allowMethod && typeof descriptor.value === "function") {
- target[name] = getMethod(name);
- continue;
- }
- var isEvent = isEventHandlerName(name);
- if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name);
- if (descriptor.writable || descriptor.set || isBrokenSafari) {
- if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name);
- }
- var configurable = isBrokenSafari || descriptor.configurable;
- defineProperty(target, name, {
- get: getter,
- set: setter,
- configurable: configurable,
- enumerable: descriptor.enumerable
- });
- }
- }
- function register(nativeConstructor, wrapperConstructor, opt_instance) {
- var nativePrototype = nativeConstructor.prototype;
- registerInternal(nativePrototype, wrapperConstructor, opt_instance);
- mixinStatics(wrapperConstructor, nativeConstructor);
- }
- function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {
- var wrapperPrototype = wrapperConstructor.prototype;
- assert(constructorTable.get(nativePrototype) === undefined);
- constructorTable.set(nativePrototype, wrapperConstructor);
- nativePrototypeTable.set(wrapperPrototype, nativePrototype);
- addForwardingProperties(nativePrototype, wrapperPrototype);
- if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance);
- defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor);
- wrapperConstructor.prototype = wrapperPrototype;
- }
- function isWrapperFor(wrapperConstructor, nativeConstructor) {
- return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor;
- }
- function registerObject(object) {
- var nativePrototype = Object.getPrototypeOf(object);
- var superWrapperConstructor = getWrapperConstructor(nativePrototype);
- var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);
- registerInternal(nativePrototype, GeneratedWrapper, object);
- return GeneratedWrapper;
- }
- function createWrapperConstructor(superWrapperConstructor) {
- function GeneratedWrapper(node) {
- superWrapperConstructor.call(this, node);
- }
- var p = Object.create(superWrapperConstructor.prototype);
- p.constructor = GeneratedWrapper;
- GeneratedWrapper.prototype = p;
- return GeneratedWrapper;
- }
- function isWrapper(object) {
- return object && object.__impl4cf1e782hg__;
- }
- function isNative(object) {
- return !isWrapper(object);
- }
- function wrap(impl) {
- if (impl === null) return null;
- assert(isNative(impl));
- return impl.__wrapper8e3dd93a60__ || (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));
- }
- function unwrap(wrapper) {
- if (wrapper === null) return null;
- assert(isWrapper(wrapper));
- return wrapper.__impl4cf1e782hg__;
- }
- function unsafeUnwrap(wrapper) {
- return wrapper.__impl4cf1e782hg__;
- }
- function setWrapper(impl, wrapper) {
- wrapper.__impl4cf1e782hg__ = impl;
- impl.__wrapper8e3dd93a60__ = wrapper;
- }
- function unwrapIfNeeded(object) {
- return object && isWrapper(object) ? unwrap(object) : object;
- }
- function wrapIfNeeded(object) {
- return object && !isWrapper(object) ? wrap(object) : object;
- }
- function rewrap(node, wrapper) {
- if (wrapper === null) return;
- assert(isNative(node));
- assert(wrapper === undefined || isWrapper(wrapper));
- node.__wrapper8e3dd93a60__ = wrapper;
- }
- var getterDescriptor = {
- get: undefined,
- configurable: true,
- enumerable: true
- };
- function defineGetter(constructor, name, getter) {
- getterDescriptor.get = getter;
- defineProperty(constructor.prototype, name, getterDescriptor);
- }
- function defineWrapGetter(constructor, name) {
- defineGetter(constructor, name, function() {
- return wrap(this.__impl4cf1e782hg__[name]);
- });
- }
- function forwardMethodsToWrapper(constructors, names) {
- constructors.forEach(function(constructor) {
- names.forEach(function(name) {
- constructor.prototype[name] = function() {
- var w = wrapIfNeeded(this);
- return w[name].apply(w, arguments);
- };
- });
- });
- }
- scope.assert = assert;
- scope.constructorTable = constructorTable;
- scope.defineGetter = defineGetter;
- scope.defineWrapGetter = defineWrapGetter;
- scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
- scope.isIdentifierName = isIdentifierName;
- scope.isWrapper = isWrapper;
- scope.isWrapperFor = isWrapperFor;
- scope.mixin = mixin;
- scope.nativePrototypeTable = nativePrototypeTable;
- scope.oneOf = oneOf;
- scope.registerObject = registerObject;
- scope.registerWrapper = register;
- scope.rewrap = rewrap;
- scope.setWrapper = setWrapper;
- scope.unsafeUnwrap = unsafeUnwrap;
- scope.unwrap = unwrap;
- scope.unwrapIfNeeded = unwrapIfNeeded;
- scope.wrap = wrap;
- scope.wrapIfNeeded = wrapIfNeeded;
- scope.wrappers = wrappers;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- function newSplice(index, removed, addedCount) {
- return {
- index: index,
- removed: removed,
- addedCount: addedCount
- };
- }
- var EDIT_LEAVE = 0;
- var EDIT_UPDATE = 1;
- var EDIT_ADD = 2;
- var EDIT_DELETE = 3;
- function ArraySplice() {}
- ArraySplice.prototype = {
- calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {
- var rowCount = oldEnd - oldStart + 1;
- var columnCount = currentEnd - currentStart + 1;
- var distances = new Array(rowCount);
- for (var i = 0; i < rowCount; i++) {
- distances[i] = new Array(columnCount);
- distances[i][0] = i;
- }
- for (var j = 0; j < columnCount; j++) distances[0][j] = j;
- for (var i = 1; i < rowCount; i++) {
- for (var j = 1; j < columnCount; j++) {
- if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else {
- var north = distances[i - 1][j] + 1;
- var west = distances[i][j - 1] + 1;
- distances[i][j] = north < west ? north : west;
- }
- }
- }
- return distances;
- },
- spliceOperationsFromEditDistances: function(distances) {
- var i = distances.length - 1;
- var j = distances[0].length - 1;
- var current = distances[i][j];
- var edits = [];
- while (i > 0 || j > 0) {
- if (i == 0) {
- edits.push(EDIT_ADD);
- j--;
- continue;
- }
- if (j == 0) {
- edits.push(EDIT_DELETE);
- i--;
- continue;
- }
- var northWest = distances[i - 1][j - 1];
- var west = distances[i - 1][j];
- var north = distances[i][j - 1];
- var min;
- if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest;
- if (min == northWest) {
- if (northWest == current) {
- edits.push(EDIT_LEAVE);
- } else {
- edits.push(EDIT_UPDATE);
- current = northWest;
- }
- i--;
- j--;
- } else if (min == west) {
- edits.push(EDIT_DELETE);
- i--;
- current = west;
- } else {
- edits.push(EDIT_ADD);
- j--;
- current = north;
- }
- }
- edits.reverse();
- return edits;
- },
- calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {
- var prefixCount = 0;
- var suffixCount = 0;
- var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
- if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength);
- if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
- currentStart += prefixCount;
- oldStart += prefixCount;
- currentEnd -= suffixCount;
- oldEnd -= suffixCount;
- if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return [];
- if (currentStart == currentEnd) {
- var splice = newSplice(currentStart, [], 0);
- while (oldStart < oldEnd) splice.removed.push(old[oldStart++]);
- return [ splice ];
- } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ];
- var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
- var splice = undefined;
- var splices = [];
- var index = currentStart;
- var oldIndex = oldStart;
- for (var i = 0; i < ops.length; i++) {
- switch (ops[i]) {
- case EDIT_LEAVE:
- if (splice) {
- splices.push(splice);
- splice = undefined;
- }
- index++;
- oldIndex++;
- break;
-
- case EDIT_UPDATE:
- if (!splice) splice = newSplice(index, [], 0);
- splice.addedCount++;
- index++;
- splice.removed.push(old[oldIndex]);
- oldIndex++;
- break;
-
- case EDIT_ADD:
- if (!splice) splice = newSplice(index, [], 0);
- splice.addedCount++;
- index++;
- break;
-
- case EDIT_DELETE:
- if (!splice) splice = newSplice(index, [], 0);
- splice.removed.push(old[oldIndex]);
- oldIndex++;
- break;
- }
- }
- if (splice) {
- splices.push(splice);
- }
- return splices;
- },
- sharedPrefix: function(current, old, searchLength) {
- for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i;
- return searchLength;
- },
- sharedSuffix: function(current, old, searchLength) {
- var index1 = current.length;
- var index2 = old.length;
- var count = 0;
- while (count < searchLength && this.equals(current[--index1], old[--index2])) count++;
- return count;
- },
- calculateSplices: function(current, previous) {
- return this.calcSplices(current, 0, current.length, previous, 0, previous.length);
- },
- equals: function(currentValue, previousValue) {
- return currentValue === previousValue;
- }
- };
- scope.ArraySplice = ArraySplice;
- })(window.ShadowDOMPolyfill);
- (function(context) {
- "use strict";
- var OriginalMutationObserver = window.MutationObserver;
- var callbacks = [];
- var pending = false;
- var timerFunc;
- function handle() {
- pending = false;
- var copies = callbacks.slice(0);
- callbacks = [];
- for (var i = 0; i < copies.length; i++) {
- (0, copies[i])();
- }
- }
- if (OriginalMutationObserver) {
- var counter = 1;
- var observer = new OriginalMutationObserver(handle);
- var textNode = document.createTextNode(counter);
- observer.observe(textNode, {
- characterData: true
- });
- timerFunc = function() {
- counter = (counter + 1) % 2;
- textNode.data = counter;
- };
- } else {
- timerFunc = window.setTimeout;
- }
- function setEndOfMicrotask(func) {
- callbacks.push(func);
- if (pending) return;
- pending = true;
- timerFunc(handle, 0);
- }
- context.setEndOfMicrotask = setEndOfMicrotask;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var setEndOfMicrotask = scope.setEndOfMicrotask;
- var wrapIfNeeded = scope.wrapIfNeeded;
- var wrappers = scope.wrappers;
- var registrationsTable = new WeakMap();
- var globalMutationObservers = [];
- var isScheduled = false;
- function scheduleCallback(observer) {
- if (observer.scheduled_) return;
- observer.scheduled_ = true;
- globalMutationObservers.push(observer);
- if (isScheduled) return;
- setEndOfMicrotask(notifyObservers);
- isScheduled = true;
- }
- function notifyObservers() {
- isScheduled = false;
- while (globalMutationObservers.length) {
- var notifyList = globalMutationObservers;
- globalMutationObservers = [];
- notifyList.sort(function(x, y) {
- return x.uid_ - y.uid_;
- });
- for (var i = 0; i < notifyList.length; i++) {
- var mo = notifyList[i];
- mo.scheduled_ = false;
- var queue = mo.takeRecords();
- removeTransientObserversFor(mo);
- if (queue.length) {
- mo.callback_(queue, mo);
- }
- }
- }
- }
- function MutationRecord(type, target) {
- this.type = type;
- this.target = target;
- this.addedNodes = new wrappers.NodeList();
- this.removedNodes = new wrappers.NodeList();
- this.previousSibling = null;
- this.nextSibling = null;
- this.attributeName = null;
- this.attributeNamespace = null;
- this.oldValue = null;
- }
- function registerTransientObservers(ancestor, node) {
- for (;ancestor; ancestor = ancestor.parentNode) {
- var registrations = registrationsTable.get(ancestor);
- if (!registrations) continue;
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.options.subtree) registration.addTransientObserver(node);
- }
- }
- }
- function removeTransientObserversFor(observer) {
- for (var i = 0; i < observer.nodes_.length; i++) {
- var node = observer.nodes_[i];
- var registrations = registrationsTable.get(node);
- if (!registrations) return;
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- if (registration.observer === observer) registration.removeTransientObservers();
- }
- }
- }
- function enqueueMutation(target, type, data) {
- var interestedObservers = Object.create(null);
- var associatedStrings = Object.create(null);
- for (var node = target; node; node = node.parentNode) {
- var registrations = registrationsTable.get(node);
- if (!registrations) continue;
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- var options = registration.options;
- if (node !== target && !options.subtree) continue;
- if (type === "attributes" && !options.attributes) continue;
- if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) {
- continue;
- }
- if (type === "characterData" && !options.characterData) continue;
- if (type === "childList" && !options.childList) continue;
- var observer = registration.observer;
- interestedObservers[observer.uid_] = observer;
- if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) {
- associatedStrings[observer.uid_] = data.oldValue;
- }
- }
- }
- for (var uid in interestedObservers) {
- var observer = interestedObservers[uid];
- var record = new MutationRecord(type, target);
- if ("name" in data && "namespace" in data) {
- record.attributeName = data.name;
- record.attributeNamespace = data.namespace;
- }
- if (data.addedNodes) record.addedNodes = data.addedNodes;
- if (data.removedNodes) record.removedNodes = data.removedNodes;
- if (data.previousSibling) record.previousSibling = data.previousSibling;
- if (data.nextSibling) record.nextSibling = data.nextSibling;
- if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid];
- scheduleCallback(observer);
- observer.records_.push(record);
- }
- }
- var slice = Array.prototype.slice;
- function MutationObserverOptions(options) {
- this.childList = !!options.childList;
- this.subtree = !!options.subtree;
- if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) {
- this.attributes = true;
- } else {
- this.attributes = !!options.attributes;
- }
- if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData;
- if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) {
- throw new TypeError();
- }
- this.characterData = !!options.characterData;
- this.attributeOldValue = !!options.attributeOldValue;
- this.characterDataOldValue = !!options.characterDataOldValue;
- if ("attributeFilter" in options) {
- if (options.attributeFilter == null || typeof options.attributeFilter !== "object") {
- throw new TypeError();
- }
- this.attributeFilter = slice.call(options.attributeFilter);
- } else {
- this.attributeFilter = null;
- }
- }
- var uidCounter = 0;
- function MutationObserver(callback) {
- this.callback_ = callback;
- this.nodes_ = [];
- this.records_ = [];
- this.uid_ = ++uidCounter;
- this.scheduled_ = false;
- }
- MutationObserver.prototype = {
- constructor: MutationObserver,
- observe: function(target, options) {
- target = wrapIfNeeded(target);
- var newOptions = new MutationObserverOptions(options);
- var registration;
- var registrations = registrationsTable.get(target);
- if (!registrations) registrationsTable.set(target, registrations = []);
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i].observer === this) {
- registration = registrations[i];
- registration.removeTransientObservers();
- registration.options = newOptions;
- }
- }
- if (!registration) {
- registration = new Registration(this, target, newOptions);
- registrations.push(registration);
- this.nodes_.push(target);
- }
- },
- disconnect: function() {
- this.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.observer === this) {
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- this.records_ = [];
- },
- takeRecords: function() {
- var copyOfRecords = this.records_;
- this.records_ = [];
- return copyOfRecords;
- }
- };
- function Registration(observer, target, options) {
- this.observer = observer;
- this.target = target;
- this.options = options;
- this.transientObservedNodes = [];
- }
- Registration.prototype = {
- addTransientObserver: function(node) {
- if (node === this.target) return;
- scheduleCallback(this.observer);
- this.transientObservedNodes.push(node);
- var registrations = registrationsTable.get(node);
- if (!registrations) registrationsTable.set(node, registrations = []);
- registrations.push(this);
- },
- removeTransientObservers: function() {
- var transientObservedNodes = this.transientObservedNodes;
- this.transientObservedNodes = [];
- for (var i = 0; i < transientObservedNodes.length; i++) {
- var node = transientObservedNodes[i];
- var registrations = registrationsTable.get(node);
- for (var j = 0; j < registrations.length; j++) {
- if (registrations[j] === this) {
- registrations.splice(j, 1);
- break;
- }
- }
- }
- }
- };
- scope.enqueueMutation = enqueueMutation;
- scope.registerTransientObservers = registerTransientObservers;
- scope.wrappers.MutationObserver = MutationObserver;
- scope.wrappers.MutationRecord = MutationRecord;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- function TreeScope(root, parent) {
- this.root = root;
- this.parent = parent;
- }
- TreeScope.prototype = {
- get renderer() {
- if (this.root instanceof scope.wrappers.ShadowRoot) {
- return scope.getRendererForHost(this.root.host);
- }
- return null;
- },
- contains: function(treeScope) {
- for (;treeScope; treeScope = treeScope.parent) {
- if (treeScope === this) return true;
- }
- return false;
- }
- };
- function setTreeScope(node, treeScope) {
- if (node.treeScope_ !== treeScope) {
- node.treeScope_ = treeScope;
- for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {
- sr.treeScope_.parent = treeScope;
- }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- setTreeScope(child, treeScope);
- }
- }
- }
- function getTreeScope(node) {
- if (node instanceof scope.wrappers.Window) {
- debugger;
- }
- if (node.treeScope_) return node.treeScope_;
- var parent = node.parentNode;
- var treeScope;
- if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null);
- return node.treeScope_ = treeScope;
- }
- scope.TreeScope = TreeScope;
- scope.getTreeScope = getTreeScope;
- scope.setTreeScope = setTreeScope;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
- var getTreeScope = scope.getTreeScope;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrappers = scope.wrappers;
- var wrappedFuns = new WeakMap();
- var listenersTable = new WeakMap();
- var handledEventsTable = new WeakMap();
- var currentlyDispatchingEvents = new WeakMap();
- var targetTable = new WeakMap();
- var currentTargetTable = new WeakMap();
- var relatedTargetTable = new WeakMap();
- var eventPhaseTable = new WeakMap();
- var stopPropagationTable = new WeakMap();
- var stopImmediatePropagationTable = new WeakMap();
- var eventHandlersTable = new WeakMap();
- var eventPathTable = new WeakMap();
- function isShadowRoot(node) {
- return node instanceof wrappers.ShadowRoot;
- }
- function rootOfNode(node) {
- return getTreeScope(node).root;
- }
- function getEventPath(node, event) {
- var path = [];
- var current = node;
- path.push(current);
- while (current) {
- var destinationInsertionPoints = getDestinationInsertionPoints(current);
- if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {
- for (var i = 0; i < destinationInsertionPoints.length; i++) {
- var insertionPoint = destinationInsertionPoints[i];
- if (isShadowInsertionPoint(insertionPoint)) {
- var shadowRoot = rootOfNode(insertionPoint);
- var olderShadowRoot = shadowRoot.olderShadowRoot;
- if (olderShadowRoot) path.push(olderShadowRoot);
- }
- path.push(insertionPoint);
- }
- current = destinationInsertionPoints[destinationInsertionPoints.length - 1];
- } else {
- if (isShadowRoot(current)) {
- if (inSameTree(node, current) && eventMustBeStopped(event)) {
- break;
- }
- current = current.host;
- path.push(current);
- } else {
- current = current.parentNode;
- if (current) path.push(current);
- }
- }
- }
- return path;
- }
- function eventMustBeStopped(event) {
- if (!event) return false;
- switch (event.type) {
- case "abort":
- case "error":
- case "select":
- case "change":
- case "load":
- case "reset":
- case "resize":
- case "scroll":
- case "selectstart":
- return true;
- }
- return false;
- }
- function isShadowInsertionPoint(node) {
- return node instanceof HTMLShadowElement;
- }
- function getDestinationInsertionPoints(node) {
- return scope.getDestinationInsertionPoints(node);
- }
- function eventRetargetting(path, currentTarget) {
- if (path.length === 0) return currentTarget;
- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;
- var currentTargetTree = getTreeScope(currentTarget);
- var originalTarget = path[0];
- var originalTargetTree = getTreeScope(originalTarget);
- var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);
- for (var i = 0; i < path.length; i++) {
- var node = path[i];
- if (getTreeScope(node) === relativeTargetTree) return node;
- }
- return path[path.length - 1];
- }
- function getTreeScopeAncestors(treeScope) {
- var ancestors = [];
- for (;treeScope; treeScope = treeScope.parent) {
- ancestors.push(treeScope);
- }
- return ancestors;
- }
- function lowestCommonInclusiveAncestor(tsA, tsB) {
- var ancestorsA = getTreeScopeAncestors(tsA);
- var ancestorsB = getTreeScopeAncestors(tsB);
- var result = null;
- while (ancestorsA.length > 0 && ancestorsB.length > 0) {
- var a = ancestorsA.pop();
- var b = ancestorsB.pop();
- if (a === b) result = a; else break;
- }
- return result;
- }
- function getTreeScopeRoot(ts) {
- if (!ts.parent) return ts;
- return getTreeScopeRoot(ts.parent);
- }
- function relatedTargetResolution(event, currentTarget, relatedTarget) {
- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;
- var currentTargetTree = getTreeScope(currentTarget);
- var relatedTargetTree = getTreeScope(relatedTarget);
- var relatedTargetEventPath = getEventPath(relatedTarget, event);
- var lowestCommonAncestorTree;
- var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);
- if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root;
- for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) {
- var adjustedRelatedTarget;
- for (var i = 0; i < relatedTargetEventPath.length; i++) {
- var node = relatedTargetEventPath[i];
- if (getTreeScope(node) === commonAncestorTree) return node;
- }
- }
- return null;
- }
- function inSameTree(a, b) {
- return getTreeScope(a) === getTreeScope(b);
- }
- var NONE = 0;
- var CAPTURING_PHASE = 1;
- var AT_TARGET = 2;
- var BUBBLING_PHASE = 3;
- var pendingError;
- function dispatchOriginalEvent(originalEvent) {
- if (handledEventsTable.get(originalEvent)) return;
- handledEventsTable.set(originalEvent, true);
- dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));
- if (pendingError) {
- var err = pendingError;
- pendingError = null;
- throw err;
- }
- }
- function isLoadLikeEvent(event) {
- switch (event.type) {
- case "load":
- case "beforeunload":
- case "unload":
- return true;
- }
- return false;
- }
- function dispatchEvent(event, originalWrapperTarget) {
- if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError");
- currentlyDispatchingEvents.set(event, true);
- scope.renderAllPending();
- var eventPath;
- var overrideTarget;
- var win;
- if (isLoadLikeEvent(event) && !event.bubbles) {
- var doc = originalWrapperTarget;
- if (doc instanceof wrappers.Document && (win = doc.defaultView)) {
- overrideTarget = doc;
- eventPath = [];
- }
- }
- if (!eventPath) {
- if (originalWrapperTarget instanceof wrappers.Window) {
- win = originalWrapperTarget;
- eventPath = [];
- } else {
- eventPath = getEventPath(originalWrapperTarget, event);
- if (!isLoadLikeEvent(event)) {
- var doc = eventPath[eventPath.length - 1];
- if (doc instanceof wrappers.Document) win = doc.defaultView;
- }
- }
- }
- eventPathTable.set(event, eventPath);
- if (dispatchCapturing(event, eventPath, win, overrideTarget)) {
- if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {
- dispatchBubbling(event, eventPath, win, overrideTarget);
- }
- }
- eventPhaseTable.set(event, NONE);
- currentTargetTable.delete(event, null);
- currentlyDispatchingEvents.delete(event);
- return event.defaultPrevented;
- }
- function dispatchCapturing(event, eventPath, win, overrideTarget) {
- var phase = CAPTURING_PHASE;
- if (win) {
- if (!invoke(win, event, phase, eventPath, overrideTarget)) return false;
- }
- for (var i = eventPath.length - 1; i > 0; i--) {
- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false;
- }
- return true;
- }
- function dispatchAtTarget(event, eventPath, win, overrideTarget) {
- var phase = AT_TARGET;
- var currentTarget = eventPath[0] || win;
- return invoke(currentTarget, event, phase, eventPath, overrideTarget);
- }
- function dispatchBubbling(event, eventPath, win, overrideTarget) {
- var phase = BUBBLING_PHASE;
- for (var i = 1; i < eventPath.length; i++) {
- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return;
- }
- if (win && eventPath.length > 0) {
- invoke(win, event, phase, eventPath, overrideTarget);
- }
- }
- function invoke(currentTarget, event, phase, eventPath, overrideTarget) {
- var listeners = listenersTable.get(currentTarget);
- if (!listeners) return true;
- var target = overrideTarget || eventRetargetting(eventPath, currentTarget);
- if (target === currentTarget) {
- if (phase === CAPTURING_PHASE) return true;
- if (phase === BUBBLING_PHASE) phase = AT_TARGET;
- } else if (phase === BUBBLING_PHASE && !event.bubbles) {
- return true;
- }
- if ("relatedTarget" in event) {
- var originalEvent = unwrap(event);
- var unwrappedRelatedTarget = originalEvent.relatedTarget;
- if (unwrappedRelatedTarget) {
- if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) {
- var relatedTarget = wrap(unwrappedRelatedTarget);
- var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget);
- if (adjusted === target) return true;
- } else {
- adjusted = null;
- }
- relatedTargetTable.set(event, adjusted);
- }
- }
- eventPhaseTable.set(event, phase);
- var type = event.type;
- var anyRemoved = false;
- targetTable.set(event, target);
- currentTargetTable.set(event, currentTarget);
- listeners.depth++;
- for (var i = 0, len = listeners.length; i < len; i++) {
- var listener = listeners[i];
- if (listener.removed) {
- anyRemoved = true;
- continue;
- }
- if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) {
- continue;
- }
- try {
- if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event);
- if (stopImmediatePropagationTable.get(event)) return false;
- } catch (ex) {
- if (!pendingError) pendingError = ex;
- }
- }
- listeners.depth--;
- if (anyRemoved && listeners.depth === 0) {
- var copy = listeners.slice();
- listeners.length = 0;
- for (var i = 0; i < copy.length; i++) {
- if (!copy[i].removed) listeners.push(copy[i]);
- }
- }
- return !stopPropagationTable.get(event);
- }
- function Listener(type, handler, capture) {
- this.type = type;
- this.handler = handler;
- this.capture = Boolean(capture);
- }
- Listener.prototype = {
- equals: function(that) {
- return this.handler === that.handler && this.type === that.type && this.capture === that.capture;
- },
- get removed() {
- return this.handler === null;
- },
- remove: function() {
- this.handler = null;
- }
- };
- var OriginalEvent = window.Event;
- OriginalEvent.prototype.polymerBlackList_ = {
- returnValue: true,
- keyLocation: true
- };
- function Event(type, options) {
- if (type instanceof OriginalEvent) {
- var impl = type;
- if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) {
- return new BeforeUnloadEvent(impl);
- }
- setWrapper(impl, this);
- } else {
- return wrap(constructEvent(OriginalEvent, "Event", type, options));
- }
- }
- Event.prototype = {
- get target() {
- return targetTable.get(this);
- },
- get currentTarget() {
- return currentTargetTable.get(this);
- },
- get eventPhase() {
- return eventPhaseTable.get(this);
- },
- get path() {
- var eventPath = eventPathTable.get(this);
- if (!eventPath) return [];
- return eventPath.slice();
- },
- stopPropagation: function() {
- stopPropagationTable.set(this, true);
- },
- stopImmediatePropagation: function() {
- stopPropagationTable.set(this, true);
- stopImmediatePropagationTable.set(this, true);
- }
- };
- registerWrapper(OriginalEvent, Event, document.createEvent("Event"));
- function unwrapOptions(options) {
- if (!options || !options.relatedTarget) return options;
- return Object.create(options, {
- relatedTarget: {
- value: unwrap(options.relatedTarget)
- }
- });
- }
- function registerGenericEvent(name, SuperEvent, prototype) {
- var OriginalEvent = window[name];
- var GenericEvent = function(type, options) {
- if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options));
- };
- GenericEvent.prototype = Object.create(SuperEvent.prototype);
- if (prototype) mixin(GenericEvent.prototype, prototype);
- if (OriginalEvent) {
- try {
- registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp"));
- } catch (ex) {
- registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name));
- }
- }
- return GenericEvent;
- }
- var UIEvent = registerGenericEvent("UIEvent", Event);
- var CustomEvent = registerGenericEvent("CustomEvent", Event);
- var relatedTargetProto = {
- get relatedTarget() {
- var relatedTarget = relatedTargetTable.get(this);
- if (relatedTarget !== undefined) return relatedTarget;
- return wrap(unwrap(this).relatedTarget);
- }
- };
- function getInitFunction(name, relatedTargetIndex) {
- return function() {
- arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);
- var impl = unwrap(this);
- impl[name].apply(impl, arguments);
- };
- }
- var mouseEventProto = mixin({
- initMouseEvent: getInitFunction("initMouseEvent", 14)
- }, relatedTargetProto);
- var focusEventProto = mixin({
- initFocusEvent: getInitFunction("initFocusEvent", 5)
- }, relatedTargetProto);
- var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto);
- var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto);
- var defaultInitDicts = Object.create(null);
- var supportsEventConstructors = function() {
- try {
- new window.FocusEvent("focus");
- } catch (ex) {
- return false;
- }
- return true;
- }();
- function constructEvent(OriginalEvent, name, type, options) {
- if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options));
- var event = unwrap(document.createEvent(name));
- var defaultDict = defaultInitDicts[name];
- var args = [ type ];
- Object.keys(defaultDict).forEach(function(key) {
- var v = options != null && key in options ? options[key] : defaultDict[key];
- if (key === "relatedTarget") v = unwrap(v);
- args.push(v);
- });
- event["init" + name].apply(event, args);
- return event;
- }
- if (!supportsEventConstructors) {
- var configureEventConstructor = function(name, initDict, superName) {
- if (superName) {
- var superDict = defaultInitDicts[superName];
- initDict = mixin(mixin({}, superDict), initDict);
- }
- defaultInitDicts[name] = initDict;
- };
- configureEventConstructor("Event", {
- bubbles: false,
- cancelable: false
- });
- configureEventConstructor("CustomEvent", {
- detail: null
- }, "Event");
- configureEventConstructor("UIEvent", {
- view: null,
- detail: 0
- }, "Event");
- configureEventConstructor("MouseEvent", {
- screenX: 0,
- screenY: 0,
- clientX: 0,
- clientY: 0,
- ctrlKey: false,
- altKey: false,
- shiftKey: false,
- metaKey: false,
- button: 0,
- relatedTarget: null
- }, "UIEvent");
- configureEventConstructor("FocusEvent", {
- relatedTarget: null
- }, "UIEvent");
- }
- var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;
- function BeforeUnloadEvent(impl) {
- Event.call(this, impl);
- }
- BeforeUnloadEvent.prototype = Object.create(Event.prototype);
- mixin(BeforeUnloadEvent.prototype, {
- get returnValue() {
- return unsafeUnwrap(this).returnValue;
- },
- set returnValue(v) {
- unsafeUnwrap(this).returnValue = v;
- }
- });
- if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);
- function isValidListener(fun) {
- if (typeof fun === "function") return true;
- return fun && fun.handleEvent;
- }
- function isMutationEvent(type) {
- switch (type) {
- case "DOMAttrModified":
- case "DOMAttributeNameChanged":
- case "DOMCharacterDataModified":
- case "DOMElementNameChanged":
- case "DOMNodeInserted":
- case "DOMNodeInsertedIntoDocument":
- case "DOMNodeRemoved":
- case "DOMNodeRemovedFromDocument":
- case "DOMSubtreeModified":
- return true;
- }
- return false;
- }
- var OriginalEventTarget = window.EventTarget;
- function EventTarget(impl) {
- setWrapper(impl, this);
- }
- var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ];
- [ Node, Window ].forEach(function(constructor) {
- var p = constructor.prototype;
- methodNames.forEach(function(name) {
- Object.defineProperty(p, name + "_", {
- value: p[name]
- });
- });
- });
- function getTargetToListenAt(wrapper) {
- if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host;
- return unwrap(wrapper);
- }
- EventTarget.prototype = {
- addEventListener: function(type, fun, capture) {
- if (!isValidListener(fun) || isMutationEvent(type)) return;
- var listener = new Listener(type, fun, capture);
- var listeners = listenersTable.get(this);
- if (!listeners) {
- listeners = [];
- listeners.depth = 0;
- listenersTable.set(this, listeners);
- } else {
- for (var i = 0; i < listeners.length; i++) {
- if (listener.equals(listeners[i])) return;
- }
- }
- listeners.push(listener);
- var target = getTargetToListenAt(this);
- target.addEventListener_(type, dispatchOriginalEvent, true);
- },
- removeEventListener: function(type, fun, capture) {
- capture = Boolean(capture);
- var listeners = listenersTable.get(this);
- if (!listeners) return;
- var count = 0, found = false;
- for (var i = 0; i < listeners.length; i++) {
- if (listeners[i].type === type && listeners[i].capture === capture) {
- count++;
- if (listeners[i].handler === fun) {
- found = true;
- listeners[i].remove();
- }
- }
- }
- if (found && count === 1) {
- var target = getTargetToListenAt(this);
- target.removeEventListener_(type, dispatchOriginalEvent, true);
- }
- },
- dispatchEvent: function(event) {
- var nativeEvent = unwrap(event);
- var eventType = nativeEvent.type;
- handledEventsTable.set(nativeEvent, false);
- scope.renderAllPending();
- var tempListener;
- if (!hasListenerInAncestors(this, eventType)) {
- tempListener = function() {};
- this.addEventListener(eventType, tempListener, true);
- }
- try {
- return unwrap(this).dispatchEvent_(nativeEvent);
- } finally {
- if (tempListener) this.removeEventListener(eventType, tempListener, true);
- }
- }
- };
- function hasListener(node, type) {
- var listeners = listenersTable.get(node);
- if (listeners) {
- for (var i = 0; i < listeners.length; i++) {
- if (!listeners[i].removed && listeners[i].type === type) return true;
- }
- }
- return false;
- }
- function hasListenerInAncestors(target, type) {
- for (var node = unwrap(target); node; node = node.parentNode) {
- if (hasListener(wrap(node), type)) return true;
- }
- return false;
- }
- if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget);
- function wrapEventTargetMethods(constructors) {
- forwardMethodsToWrapper(constructors, methodNames);
- }
- var originalElementFromPoint = document.elementFromPoint;
- function elementFromPoint(self, document, x, y) {
- scope.renderAllPending();
- var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y));
- if (!element) return null;
- var path = getEventPath(element, null);
- var idx = path.lastIndexOf(self);
- if (idx == -1) return null; else path = path.slice(0, idx);
- return eventRetargetting(path, self);
- }
- function getEventHandlerGetter(name) {
- return function() {
- var inlineEventHandlers = eventHandlersTable.get(this);
- return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null;
- };
- }
- function getEventHandlerSetter(name) {
- var eventType = name.slice(2);
- return function(value) {
- var inlineEventHandlers = eventHandlersTable.get(this);
- if (!inlineEventHandlers) {
- inlineEventHandlers = Object.create(null);
- eventHandlersTable.set(this, inlineEventHandlers);
- }
- var old = inlineEventHandlers[name];
- if (old) this.removeEventListener(eventType, old.wrapped, false);
- if (typeof value === "function") {
- var wrapped = function(e) {
- var rv = value.call(this, e);
- if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv;
- };
- this.addEventListener(eventType, wrapped, false);
- inlineEventHandlers[name] = {
- value: value,
- wrapped: wrapped
- };
- }
- };
- }
- scope.elementFromPoint = elementFromPoint;
- scope.getEventHandlerGetter = getEventHandlerGetter;
- scope.getEventHandlerSetter = getEventHandlerSetter;
- scope.wrapEventTargetMethods = wrapEventTargetMethods;
- scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;
- scope.wrappers.CustomEvent = CustomEvent;
- scope.wrappers.Event = Event;
- scope.wrappers.EventTarget = EventTarget;
- scope.wrappers.FocusEvent = FocusEvent;
- scope.wrappers.MouseEvent = MouseEvent;
- scope.wrappers.UIEvent = UIEvent;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var UIEvent = scope.wrappers.UIEvent;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var OriginalTouchEvent = window.TouchEvent;
- if (!OriginalTouchEvent) return;
- var nativeEvent;
- try {
- nativeEvent = document.createEvent("TouchEvent");
- } catch (ex) {
- return;
- }
- var nonEnumDescriptor = {
- enumerable: false
- };
- function nonEnum(obj, prop) {
- Object.defineProperty(obj, prop, nonEnumDescriptor);
- }
- function Touch(impl) {
- setWrapper(impl, this);
- }
- Touch.prototype = {
- get target() {
- return wrap(unsafeUnwrap(this).target);
- }
- };
- var descr = {
- configurable: true,
- enumerable: true,
- get: null
- };
- [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) {
- descr.get = function() {
- return unsafeUnwrap(this)[name];
- };
- Object.defineProperty(Touch.prototype, name, descr);
- });
- function TouchList() {
- this.length = 0;
- nonEnum(this, "length");
- }
- TouchList.prototype = {
- item: function(index) {
- return this[index];
- }
- };
- function wrapTouchList(nativeTouchList) {
- var list = new TouchList();
- for (var i = 0; i < nativeTouchList.length; i++) {
- list[i] = new Touch(nativeTouchList[i]);
- }
- list.length = i;
- return list;
- }
- function TouchEvent(impl) {
- UIEvent.call(this, impl);
- }
- TouchEvent.prototype = Object.create(UIEvent.prototype);
- mixin(TouchEvent.prototype, {
- get touches() {
- return wrapTouchList(unsafeUnwrap(this).touches);
- },
- get targetTouches() {
- return wrapTouchList(unsafeUnwrap(this).targetTouches);
- },
- get changedTouches() {
- return wrapTouchList(unsafeUnwrap(this).changedTouches);
- },
- initTouchEvent: function() {
- throw new Error("Not implemented");
- }
- });
- registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);
- scope.wrappers.Touch = Touch;
- scope.wrappers.TouchEvent = TouchEvent;
- scope.wrappers.TouchList = TouchList;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var nonEnumDescriptor = {
- enumerable: false
- };
- function nonEnum(obj, prop) {
- Object.defineProperty(obj, prop, nonEnumDescriptor);
- }
- function NodeList() {
- this.length = 0;
- nonEnum(this, "length");
- }
- NodeList.prototype = {
- item: function(index) {
- return this[index];
- }
- };
- nonEnum(NodeList.prototype, "item");
- function wrapNodeList(list) {
- if (list == null) return list;
- var wrapperList = new NodeList();
- for (var i = 0, length = list.length; i < length; i++) {
- wrapperList[i] = wrap(list[i]);
- }
- wrapperList.length = length;
- return wrapperList;
- }
- function addWrapNodeListMethod(wrapperConstructor, name) {
- wrapperConstructor.prototype[name] = function() {
- return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments));
- };
- }
- scope.wrappers.NodeList = NodeList;
- scope.addWrapNodeListMethod = addWrapNodeListMethod;
- scope.wrapNodeList = wrapNodeList;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- scope.wrapHTMLCollection = scope.wrapNodeList;
- scope.wrappers.HTMLCollection = scope.wrappers.NodeList;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var EventTarget = scope.wrappers.EventTarget;
- var NodeList = scope.wrappers.NodeList;
- var TreeScope = scope.TreeScope;
- var assert = scope.assert;
- var defineWrapGetter = scope.defineWrapGetter;
- var enqueueMutation = scope.enqueueMutation;
- var getTreeScope = scope.getTreeScope;
- var isWrapper = scope.isWrapper;
- var mixin = scope.mixin;
- var registerTransientObservers = scope.registerTransientObservers;
- var registerWrapper = scope.registerWrapper;
- var setTreeScope = scope.setTreeScope;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var wrapIfNeeded = scope.wrapIfNeeded;
- var wrappers = scope.wrappers;
- function assertIsNodeWrapper(node) {
- assert(node instanceof Node);
- }
- function createOneElementNodeList(node) {
- var nodes = new NodeList();
- nodes[0] = node;
- nodes.length = 1;
- return nodes;
- }
- var surpressMutations = false;
- function enqueueRemovalForInsertedNodes(node, parent, nodes) {
- enqueueMutation(parent, "childList", {
- removedNodes: nodes,
- previousSibling: node.previousSibling,
- nextSibling: node.nextSibling
- });
- }
- function enqueueRemovalForInsertedDocumentFragment(df, nodes) {
- enqueueMutation(df, "childList", {
- removedNodes: nodes
- });
- }
- function collectNodes(node, parentNode, previousNode, nextNode) {
- if (node instanceof DocumentFragment) {
- var nodes = collectNodesForDocumentFragment(node);
- surpressMutations = true;
- for (var i = nodes.length - 1; i >= 0; i--) {
- node.removeChild(nodes[i]);
- nodes[i].parentNode_ = parentNode;
- }
- surpressMutations = false;
- for (var i = 0; i < nodes.length; i++) {
- nodes[i].previousSibling_ = nodes[i - 1] || previousNode;
- nodes[i].nextSibling_ = nodes[i + 1] || nextNode;
- }
- if (previousNode) previousNode.nextSibling_ = nodes[0];
- if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1];
- return nodes;
- }
- var nodes = createOneElementNodeList(node);
- var oldParent = node.parentNode;
- if (oldParent) {
- oldParent.removeChild(node);
- }
- node.parentNode_ = parentNode;
- node.previousSibling_ = previousNode;
- node.nextSibling_ = nextNode;
- if (previousNode) previousNode.nextSibling_ = node;
- if (nextNode) nextNode.previousSibling_ = node;
- return nodes;
- }
- function collectNodesNative(node) {
- if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node);
- var nodes = createOneElementNodeList(node);
- var oldParent = node.parentNode;
- if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes);
- return nodes;
- }
- function collectNodesForDocumentFragment(node) {
- var nodes = new NodeList();
- var i = 0;
- for (var child = node.firstChild; child; child = child.nextSibling) {
- nodes[i++] = child;
- }
- nodes.length = i;
- enqueueRemovalForInsertedDocumentFragment(node, nodes);
- return nodes;
- }
- function snapshotNodeList(nodeList) {
- return nodeList;
- }
- function nodeWasAdded(node, treeScope) {
- setTreeScope(node, treeScope);
- node.nodeIsInserted_();
- }
- function nodesWereAdded(nodes, parent) {
- var treeScope = getTreeScope(parent);
- for (var i = 0; i < nodes.length; i++) {
- nodeWasAdded(nodes[i], treeScope);
- }
- }
- function nodeWasRemoved(node) {
- setTreeScope(node, new TreeScope(node, null));
- }
- function nodesWereRemoved(nodes) {
- for (var i = 0; i < nodes.length; i++) {
- nodeWasRemoved(nodes[i]);
- }
- }
- function ensureSameOwnerDocument(parent, child) {
- var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument;
- if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child);
- }
- function adoptNodesIfNeeded(owner, nodes) {
- if (!nodes.length) return;
- var ownerDoc = owner.ownerDocument;
- if (ownerDoc === nodes[0].ownerDocument) return;
- for (var i = 0; i < nodes.length; i++) {
- scope.adoptNodeNoRemove(nodes[i], ownerDoc);
- }
- }
- function unwrapNodesForInsertion(owner, nodes) {
- adoptNodesIfNeeded(owner, nodes);
- var length = nodes.length;
- if (length === 1) return unwrap(nodes[0]);
- var df = unwrap(owner.ownerDocument.createDocumentFragment());
- for (var i = 0; i < length; i++) {
- df.appendChild(unwrap(nodes[i]));
- }
- return df;
- }
- function clearChildNodes(wrapper) {
- if (wrapper.firstChild_ !== undefined) {
- var child = wrapper.firstChild_;
- while (child) {
- var tmp = child;
- child = child.nextSibling_;
- tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;
- }
- }
- wrapper.firstChild_ = wrapper.lastChild_ = undefined;
- }
- function removeAllChildNodes(wrapper) {
- if (wrapper.invalidateShadowRenderer()) {
- var childWrapper = wrapper.firstChild;
- while (childWrapper) {
- assert(childWrapper.parentNode === wrapper);
- var nextSibling = childWrapper.nextSibling;
- var childNode = unwrap(childWrapper);
- var parentNode = childNode.parentNode;
- if (parentNode) originalRemoveChild.call(parentNode, childNode);
- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;
- childWrapper = nextSibling;
- }
- wrapper.firstChild_ = wrapper.lastChild_ = null;
- } else {
- var node = unwrap(wrapper);
- var child = node.firstChild;
- var nextSibling;
- while (child) {
- nextSibling = child.nextSibling;
- originalRemoveChild.call(node, child);
- child = nextSibling;
- }
- }
- }
- function invalidateParent(node) {
- var p = node.parentNode;
- return p && p.invalidateShadowRenderer();
- }
- function cleanupNodes(nodes) {
- for (var i = 0, n; i < nodes.length; i++) {
- n = nodes[i];
- n.parentNode.removeChild(n);
- }
- }
- var originalImportNode = document.importNode;
- var originalCloneNode = window.Node.prototype.cloneNode;
- function cloneNode(node, deep, opt_doc) {
- var clone;
- if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false));
- if (deep) {
- for (var child = node.firstChild; child; child = child.nextSibling) {
- clone.appendChild(cloneNode(child, true, opt_doc));
- }
- if (node instanceof wrappers.HTMLTemplateElement) {
- var cloneContent = clone.content;
- for (var child = node.content.firstChild; child; child = child.nextSibling) {
- cloneContent.appendChild(cloneNode(child, true, opt_doc));
- }
- }
- }
- return clone;
- }
- function contains(self, child) {
- if (!child || getTreeScope(self) !== getTreeScope(child)) return false;
- for (var node = child; node; node = node.parentNode) {
- if (node === self) return true;
- }
- return false;
- }
- var OriginalNode = window.Node;
- function Node(original) {
- assert(original instanceof OriginalNode);
- EventTarget.call(this, original);
- this.parentNode_ = undefined;
- this.firstChild_ = undefined;
- this.lastChild_ = undefined;
- this.nextSibling_ = undefined;
- this.previousSibling_ = undefined;
- this.treeScope_ = undefined;
- }
- var OriginalDocumentFragment = window.DocumentFragment;
- var originalAppendChild = OriginalNode.prototype.appendChild;
- var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;
- var originalIsEqualNode = OriginalNode.prototype.isEqualNode;
- var originalInsertBefore = OriginalNode.prototype.insertBefore;
- var originalRemoveChild = OriginalNode.prototype.removeChild;
- var originalReplaceChild = OriginalNode.prototype.replaceChild;
- var isIe = /Trident|Edge/.test(navigator.userAgent);
- var removeChildOriginalHelper = isIe ? function(parent, child) {
- try {
- originalRemoveChild.call(parent, child);
- } catch (ex) {
- if (!(parent instanceof OriginalDocumentFragment)) throw ex;
- }
- } : function(parent, child) {
- originalRemoveChild.call(parent, child);
- };
- Node.prototype = Object.create(EventTarget.prototype);
- mixin(Node.prototype, {
- appendChild: function(childWrapper) {
- return this.insertBefore(childWrapper, null);
- },
- insertBefore: function(childWrapper, refWrapper) {
- assertIsNodeWrapper(childWrapper);
- var refNode;
- if (refWrapper) {
- if (isWrapper(refWrapper)) {
- refNode = unwrap(refWrapper);
- } else {
- refNode = refWrapper;
- refWrapper = wrap(refNode);
- }
- } else {
- refWrapper = null;
- refNode = null;
- }
- refWrapper && assert(refWrapper.parentNode === this);
- var nodes;
- var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild;
- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper);
- if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper);
- if (useNative) {
- ensureSameOwnerDocument(this, childWrapper);
- clearChildNodes(this);
- originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode);
- } else {
- if (!previousNode) this.firstChild_ = nodes[0];
- if (!refWrapper) {
- this.lastChild_ = nodes[nodes.length - 1];
- if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild;
- }
- var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this);
- if (parentNode) {
- originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode);
- } else {
- adoptNodesIfNeeded(this, nodes);
- }
- }
- enqueueMutation(this, "childList", {
- addedNodes: nodes,
- nextSibling: refWrapper,
- previousSibling: previousNode
- });
- nodesWereAdded(nodes, this);
- return childWrapper;
- },
- removeChild: function(childWrapper) {
- assertIsNodeWrapper(childWrapper);
- if (childWrapper.parentNode !== this) {
- var found = false;
- var childNodes = this.childNodes;
- for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) {
- if (ieChild === childWrapper) {
- found = true;
- break;
- }
- }
- if (!found) {
- throw new Error("NotFoundError");
- }
- }
- var childNode = unwrap(childWrapper);
- var childWrapperNextSibling = childWrapper.nextSibling;
- var childWrapperPreviousSibling = childWrapper.previousSibling;
- if (this.invalidateShadowRenderer()) {
- var thisFirstChild = this.firstChild;
- var thisLastChild = this.lastChild;
- var parentNode = childNode.parentNode;
- if (parentNode) removeChildOriginalHelper(parentNode, childNode);
- if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling;
- if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling;
- if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;
- if (childWrapperNextSibling) {
- childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling;
- }
- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined;
- } else {
- clearChildNodes(this);
- removeChildOriginalHelper(unsafeUnwrap(this), childNode);
- }
- if (!surpressMutations) {
- enqueueMutation(this, "childList", {
- removedNodes: createOneElementNodeList(childWrapper),
- nextSibling: childWrapperNextSibling,
- previousSibling: childWrapperPreviousSibling
- });
- }
- registerTransientObservers(this, childWrapper);
- return childWrapper;
- },
- replaceChild: function(newChildWrapper, oldChildWrapper) {
- assertIsNodeWrapper(newChildWrapper);
- var oldChildNode;
- if (isWrapper(oldChildWrapper)) {
- oldChildNode = unwrap(oldChildWrapper);
- } else {
- oldChildNode = oldChildWrapper;
- oldChildWrapper = wrap(oldChildNode);
- }
- if (oldChildWrapper.parentNode !== this) {
- throw new Error("NotFoundError");
- }
- var nextNode = oldChildWrapper.nextSibling;
- var previousNode = oldChildWrapper.previousSibling;
- var nodes;
- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper);
- if (useNative) {
- nodes = collectNodesNative(newChildWrapper);
- } else {
- if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling;
- nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);
- }
- if (!useNative) {
- if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0];
- if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1];
- oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined;
- if (oldChildNode.parentNode) {
- originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode);
- }
- } else {
- ensureSameOwnerDocument(this, newChildWrapper);
- clearChildNodes(this);
- originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode);
- }
- enqueueMutation(this, "childList", {
- addedNodes: nodes,
- removedNodes: createOneElementNodeList(oldChildWrapper),
- nextSibling: nextNode,
- previousSibling: previousNode
- });
- nodeWasRemoved(oldChildWrapper);
- nodesWereAdded(nodes, this);
- return oldChildWrapper;
- },
- nodeIsInserted_: function() {
- for (var child = this.firstChild; child; child = child.nextSibling) {
- child.nodeIsInserted_();
- }
- },
- hasChildNodes: function() {
- return this.firstChild !== null;
- },
- get parentNode() {
- return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode);
- },
- get firstChild() {
- return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild);
- },
- get lastChild() {
- return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild);
- },
- get nextSibling() {
- return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling);
- },
- get previousSibling() {
- return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling);
- },
- get parentElement() {
- var p = this.parentNode;
- while (p && p.nodeType !== Node.ELEMENT_NODE) {
- p = p.parentNode;
- }
- return p;
- },
- get textContent() {
- var s = "";
- for (var child = this.firstChild; child; child = child.nextSibling) {
- if (child.nodeType != Node.COMMENT_NODE) {
- s += child.textContent;
- }
- }
- return s;
- },
- set textContent(textContent) {
- if (textContent == null) textContent = "";
- var removedNodes = snapshotNodeList(this.childNodes);
- if (this.invalidateShadowRenderer()) {
- removeAllChildNodes(this);
- if (textContent !== "") {
- var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent);
- this.appendChild(textNode);
- }
- } else {
- clearChildNodes(this);
- unsafeUnwrap(this).textContent = textContent;
- }
- var addedNodes = snapshotNodeList(this.childNodes);
- enqueueMutation(this, "childList", {
- addedNodes: addedNodes,
- removedNodes: removedNodes
- });
- nodesWereRemoved(removedNodes);
- nodesWereAdded(addedNodes, this);
- },
- get childNodes() {
- var wrapperList = new NodeList();
- var i = 0;
- for (var child = this.firstChild; child; child = child.nextSibling) {
- wrapperList[i++] = child;
- }
- wrapperList.length = i;
- return wrapperList;
- },
- cloneNode: function(deep) {
- return cloneNode(this, deep);
- },
- contains: function(child) {
- return contains(this, wrapIfNeeded(child));
- },
- compareDocumentPosition: function(otherNode) {
- return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
- },
- isEqualNode: function(otherNode) {
- return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
- },
- normalize: function() {
- var nodes = snapshotNodeList(this.childNodes);
- var remNodes = [];
- var s = "";
- var modNode;
- for (var i = 0, n; i < nodes.length; i++) {
- n = nodes[i];
- if (n.nodeType === Node.TEXT_NODE) {
- if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else {
- s += n.data;
- remNodes.push(n);
- }
- } else {
- if (modNode && remNodes.length) {
- modNode.data += s;
- cleanupNodes(remNodes);
- }
- remNodes = [];
- s = "";
- modNode = null;
- if (n.childNodes.length) n.normalize();
- }
- }
- if (modNode && remNodes.length) {
- modNode.data += s;
- cleanupNodes(remNodes);
- }
- }
- });
- defineWrapGetter(Node, "ownerDocument");
- registerWrapper(OriginalNode, Node, document.createDocumentFragment());
- delete Node.prototype.querySelector;
- delete Node.prototype.querySelectorAll;
- Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);
- scope.cloneNode = cloneNode;
- scope.nodeWasAdded = nodeWasAdded;
- scope.nodeWasRemoved = nodeWasRemoved;
- scope.nodesWereAdded = nodesWereAdded;
- scope.nodesWereRemoved = nodesWereRemoved;
- scope.originalInsertBefore = originalInsertBefore;
- scope.originalRemoveChild = originalRemoveChild;
- scope.snapshotNodeList = snapshotNodeList;
- scope.wrappers.Node = Node;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLCollection = scope.wrappers.HTMLCollection;
- var NodeList = scope.wrappers.NodeList;
- var getTreeScope = scope.getTreeScope;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var originalDocumentQuerySelector = document.querySelector;
- var originalElementQuerySelector = document.documentElement.querySelector;
- var originalDocumentQuerySelectorAll = document.querySelectorAll;
- var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;
- var originalDocumentGetElementsByTagName = document.getElementsByTagName;
- var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;
- var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;
- var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;
- var OriginalElement = window.Element;
- var OriginalDocument = window.HTMLDocument || window.Document;
- function filterNodeList(list, index, result, deep) {
- var wrappedItem = null;
- var root = null;
- for (var i = 0, length = list.length; i < length; i++) {
- wrappedItem = wrap(list[i]);
- if (!deep && (root = getTreeScope(wrappedItem).root)) {
- if (root instanceof scope.wrappers.ShadowRoot) {
- continue;
- }
- }
- result[index++] = wrappedItem;
- }
- return index;
- }
- function shimSelector(selector) {
- return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");
- }
- function shimMatchesSelector(selector) {
- return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");
- }
- function findOne(node, selector) {
- var m, el = node.firstElementChild;
- while (el) {
- if (el.matches(selector)) return el;
- m = findOne(el, selector);
- if (m) return m;
- el = el.nextElementSibling;
- }
- return null;
- }
- function matchesSelector(el, selector) {
- return el.matches(selector);
- }
- var XHTML_NS = "http://www.w3.org/1999/xhtml";
- function matchesTagName(el, localName, localNameLowerCase) {
- var ln = el.localName;
- return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS;
- }
- function matchesEveryThing() {
- return true;
- }
- function matchesLocalNameOnly(el, ns, localName) {
- return el.localName === localName;
- }
- function matchesNameSpace(el, ns) {
- return el.namespaceURI === ns;
- }
- function matchesLocalNameNS(el, ns, localName) {
- return el.namespaceURI === ns && el.localName === localName;
- }
- function findElements(node, index, result, p, arg0, arg1) {
- var el = node.firstElementChild;
- while (el) {
- if (p(el, arg0, arg1)) result[index++] = el;
- index = findElements(el, index, result, p, arg0, arg1);
- el = el.nextElementSibling;
- }
- return index;
- }
- function querySelectorAllFiltered(p, index, result, selector, deep) {
- var target = unsafeUnwrap(this);
- var list;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findElements(this, index, result, p, selector, null);
- } else if (target instanceof OriginalElement) {
- list = originalElementQuerySelectorAll.call(target, selector);
- } else if (target instanceof OriginalDocument) {
- list = originalDocumentQuerySelectorAll.call(target, selector);
- } else {
- return findElements(this, index, result, p, selector, null);
- }
- return filterNodeList(list, index, result, deep);
- }
- var SelectorsInterface = {
- querySelector: function(selector) {
- var shimmed = shimSelector(selector);
- var deep = shimmed !== selector;
- selector = shimmed;
- var target = unsafeUnwrap(this);
- var wrappedItem;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findOne(this, selector);
- } else if (target instanceof OriginalElement) {
- wrappedItem = wrap(originalElementQuerySelector.call(target, selector));
- } else if (target instanceof OriginalDocument) {
- wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));
- } else {
- return findOne(this, selector);
- }
- if (!wrappedItem) {
- return wrappedItem;
- } else if (!deep && (root = getTreeScope(wrappedItem).root)) {
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findOne(this, selector);
- }
- }
- return wrappedItem;
- },
- querySelectorAll: function(selector) {
- var shimmed = shimSelector(selector);
- var deep = shimmed !== selector;
- selector = shimmed;
- var result = new NodeList();
- result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep);
- return result;
- }
- };
- var MatchesInterface = {
- matches: function(selector) {
- selector = shimMatchesSelector(selector);
- return scope.originalMatches.call(unsafeUnwrap(this), selector);
- }
- };
- function getElementsByTagNameFiltered(p, index, result, localName, lowercase) {
- var target = unsafeUnwrap(this);
- var list;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findElements(this, index, result, p, localName, lowercase);
- } else if (target instanceof OriginalElement) {
- list = originalElementGetElementsByTagName.call(target, localName, lowercase);
- } else if (target instanceof OriginalDocument) {
- list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);
- } else {
- return findElements(this, index, result, p, localName, lowercase);
- }
- return filterNodeList(list, index, result, false);
- }
- function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {
- var target = unsafeUnwrap(this);
- var list;
- var root = getTreeScope(this).root;
- if (root instanceof scope.wrappers.ShadowRoot) {
- return findElements(this, index, result, p, ns, localName);
- } else if (target instanceof OriginalElement) {
- list = originalElementGetElementsByTagNameNS.call(target, ns, localName);
- } else if (target instanceof OriginalDocument) {
- list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);
- } else {
- return findElements(this, index, result, p, ns, localName);
- }
- return filterNodeList(list, index, result, false);
- }
- var GetElementsByInterface = {
- getElementsByTagName: function(localName) {
- var result = new HTMLCollection();
- var match = localName === "*" ? matchesEveryThing : matchesTagName;
- result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase());
- return result;
- },
- getElementsByClassName: function(className) {
- return this.querySelectorAll("." + className);
- },
- getElementsByTagNameNS: function(ns, localName) {
- var result = new HTMLCollection();
- var match = null;
- if (ns === "*") {
- match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly;
- } else {
- match = localName === "*" ? matchesNameSpace : matchesLocalNameNS;
- }
- result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName);
- return result;
- }
- };
- scope.GetElementsByInterface = GetElementsByInterface;
- scope.SelectorsInterface = SelectorsInterface;
- scope.MatchesInterface = MatchesInterface;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var NodeList = scope.wrappers.NodeList;
- function forwardElement(node) {
- while (node && node.nodeType !== Node.ELEMENT_NODE) {
- node = node.nextSibling;
- }
- return node;
- }
- function backwardsElement(node) {
- while (node && node.nodeType !== Node.ELEMENT_NODE) {
- node = node.previousSibling;
- }
- return node;
- }
- var ParentNodeInterface = {
- get firstElementChild() {
- return forwardElement(this.firstChild);
- },
- get lastElementChild() {
- return backwardsElement(this.lastChild);
- },
- get childElementCount() {
- var count = 0;
- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {
- count++;
- }
- return count;
- },
- get children() {
- var wrapperList = new NodeList();
- var i = 0;
- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {
- wrapperList[i++] = child;
- }
- wrapperList.length = i;
- return wrapperList;
- },
- remove: function() {
- var p = this.parentNode;
- if (p) p.removeChild(this);
- }
- };
- var ChildNodeInterface = {
- get nextElementSibling() {
- return forwardElement(this.nextSibling);
- },
- get previousElementSibling() {
- return backwardsElement(this.previousSibling);
- }
- };
- scope.ChildNodeInterface = ChildNodeInterface;
- scope.ParentNodeInterface = ParentNodeInterface;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var ChildNodeInterface = scope.ChildNodeInterface;
- var Node = scope.wrappers.Node;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var OriginalCharacterData = window.CharacterData;
- function CharacterData(node) {
- Node.call(this, node);
- }
- CharacterData.prototype = Object.create(Node.prototype);
- mixin(CharacterData.prototype, {
- get nodeValue() {
- return this.data;
- },
- set nodeValue(data) {
- this.data = data;
- },
- get textContent() {
- return this.data;
- },
- set textContent(value) {
- this.data = value;
- },
- get data() {
- return unsafeUnwrap(this).data;
- },
- set data(value) {
- var oldValue = unsafeUnwrap(this).data;
- enqueueMutation(this, "characterData", {
- oldValue: oldValue
- });
- unsafeUnwrap(this).data = value;
- }
- });
- mixin(CharacterData.prototype, ChildNodeInterface);
- registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode(""));
- scope.wrappers.CharacterData = CharacterData;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var CharacterData = scope.wrappers.CharacterData;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- function toUInt32(x) {
- return x >>> 0;
- }
- var OriginalText = window.Text;
- function Text(node) {
- CharacterData.call(this, node);
- }
- Text.prototype = Object.create(CharacterData.prototype);
- mixin(Text.prototype, {
- splitText: function(offset) {
- offset = toUInt32(offset);
- var s = this.data;
- if (offset > s.length) throw new Error("IndexSizeError");
- var head = s.slice(0, offset);
- var tail = s.slice(offset);
- this.data = head;
- var newTextNode = this.ownerDocument.createTextNode(tail);
- if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling);
- return newTextNode;
- }
- });
- registerWrapper(OriginalText, Text, document.createTextNode(""));
- scope.wrappers.Text = Text;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- if (!window.DOMTokenList) {
- console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH.");
- return;
- }
- var unsafeUnwrap = scope.unsafeUnwrap;
- var enqueueMutation = scope.enqueueMutation;
- function getClass(el) {
- return unsafeUnwrap(el).getAttribute("class");
- }
- function enqueueClassAttributeChange(el, oldValue) {
- enqueueMutation(el, "attributes", {
- name: "class",
- namespace: null,
- oldValue: oldValue
- });
- }
- function invalidateClass(el) {
- scope.invalidateRendererBasedOnAttribute(el, "class");
- }
- function changeClass(tokenList, method, args) {
- var ownerElement = tokenList.ownerElement_;
- if (ownerElement == null) {
- return method.apply(tokenList, args);
- }
- var oldValue = getClass(ownerElement);
- var retv = method.apply(tokenList, args);
- if (getClass(ownerElement) !== oldValue) {
- enqueueClassAttributeChange(ownerElement, oldValue);
- invalidateClass(ownerElement);
- }
- return retv;
- }
- var oldAdd = DOMTokenList.prototype.add;
- DOMTokenList.prototype.add = function() {
- changeClass(this, oldAdd, arguments);
- };
- var oldRemove = DOMTokenList.prototype.remove;
- DOMTokenList.prototype.remove = function() {
- changeClass(this, oldRemove, arguments);
- };
- var oldToggle = DOMTokenList.prototype.toggle;
- DOMTokenList.prototype.toggle = function() {
- return changeClass(this, oldToggle, arguments);
- };
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var ChildNodeInterface = scope.ChildNodeInterface;
- var GetElementsByInterface = scope.GetElementsByInterface;
- var Node = scope.wrappers.Node;
- var ParentNodeInterface = scope.ParentNodeInterface;
- var SelectorsInterface = scope.SelectorsInterface;
- var MatchesInterface = scope.MatchesInterface;
- var addWrapNodeListMethod = scope.addWrapNodeListMethod;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var oneOf = scope.oneOf;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrappers = scope.wrappers;
- var OriginalElement = window.Element;
- var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) {
- return OriginalElement.prototype[name];
- });
- var matchesName = matchesNames[0];
- var originalMatches = OriginalElement.prototype[matchesName];
- function invalidateRendererBasedOnAttribute(element, name) {
- var p = element.parentNode;
- if (!p || !p.shadowRoot) return;
- var renderer = scope.getRendererForHost(p);
- if (renderer.dependsOnAttribute(name)) renderer.invalidate();
- }
- function enqueAttributeChange(element, name, oldValue) {
- enqueueMutation(element, "attributes", {
- name: name,
- namespace: null,
- oldValue: oldValue
- });
- }
- var classListTable = new WeakMap();
- function Element(node) {
- Node.call(this, node);
- }
- Element.prototype = Object.create(Node.prototype);
- mixin(Element.prototype, {
- createShadowRoot: function() {
- var newShadowRoot = new wrappers.ShadowRoot(this);
- unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot;
- var renderer = scope.getRendererForHost(this);
- renderer.invalidate();
- return newShadowRoot;
- },
- get shadowRoot() {
- return unsafeUnwrap(this).polymerShadowRoot_ || null;
- },
- setAttribute: function(name, value) {
- var oldValue = unsafeUnwrap(this).getAttribute(name);
- unsafeUnwrap(this).setAttribute(name, value);
- enqueAttributeChange(this, name, oldValue);
- invalidateRendererBasedOnAttribute(this, name);
- },
- removeAttribute: function(name) {
- var oldValue = unsafeUnwrap(this).getAttribute(name);
- unsafeUnwrap(this).removeAttribute(name);
- enqueAttributeChange(this, name, oldValue);
- invalidateRendererBasedOnAttribute(this, name);
- },
- get classList() {
- var list = classListTable.get(this);
- if (!list) {
- list = unsafeUnwrap(this).classList;
- if (!list) return;
- list.ownerElement_ = this;
- classListTable.set(this, list);
- }
- return list;
- },
- get className() {
- return unsafeUnwrap(this).className;
- },
- set className(v) {
- this.setAttribute("class", v);
- },
- get id() {
- return unsafeUnwrap(this).id;
- },
- set id(v) {
- this.setAttribute("id", v);
- }
- });
- matchesNames.forEach(function(name) {
- if (name !== "matches") {
- Element.prototype[name] = function(selector) {
- return this.matches(selector);
- };
- }
- });
- if (OriginalElement.prototype.webkitCreateShadowRoot) {
- Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;
- }
- mixin(Element.prototype, ChildNodeInterface);
- mixin(Element.prototype, GetElementsByInterface);
- mixin(Element.prototype, ParentNodeInterface);
- mixin(Element.prototype, SelectorsInterface);
- mixin(Element.prototype, MatchesInterface);
- registerWrapper(OriginalElement, Element, document.createElementNS(null, "x"));
- scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;
- scope.matchesNames = matchesNames;
- scope.originalMatches = originalMatches;
- scope.wrappers.Element = Element;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var Element = scope.wrappers.Element;
- var defineGetter = scope.defineGetter;
- var enqueueMutation = scope.enqueueMutation;
- var mixin = scope.mixin;
- var nodesWereAdded = scope.nodesWereAdded;
- var nodesWereRemoved = scope.nodesWereRemoved;
- var registerWrapper = scope.registerWrapper;
- var snapshotNodeList = scope.snapshotNodeList;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrappers = scope.wrappers;
- var escapeAttrRegExp = /[&\u00A0"]/g;
- var escapeDataRegExp = /[&\u00A0<>]/g;
- function escapeReplace(c) {
- switch (c) {
- case "&":
- return "&amp;";
-
- case "<":
- return "&lt;";
-
- case ">":
- return "&gt;";
-
- case '"':
- return "&quot;";
-
- case " ":
- return "&nbsp;";
- }
- }
- function escapeAttr(s) {
- return s.replace(escapeAttrRegExp, escapeReplace);
- }
- function escapeData(s) {
- return s.replace(escapeDataRegExp, escapeReplace);
- }
- function makeSet(arr) {
- var set = {};
- for (var i = 0; i < arr.length; i++) {
- set[arr[i]] = true;
- }
- return set;
- }
- var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);
- var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);
- function getOuterHTML(node, parentNode) {
- switch (node.nodeType) {
- case Node.ELEMENT_NODE:
- var tagName = node.tagName.toLowerCase();
- var s = "<" + tagName;
- var attrs = node.attributes;
- for (var i = 0, attr; attr = attrs[i]; i++) {
- s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';
- }
- s += ">";
- if (voidElements[tagName]) return s;
- return s + getInnerHTML(node) + "</" + tagName + ">";
-
- case Node.TEXT_NODE:
- var data = node.data;
- if (parentNode && plaintextParents[parentNode.localName]) return data;
- return escapeData(data);
-
- case Node.COMMENT_NODE:
- return "<!--" + node.data + "-->";
-
- default:
- console.error(node);
- throw new Error("not implemented");
- }
- }
- function getInnerHTML(node) {
- if (node instanceof wrappers.HTMLTemplateElement) node = node.content;
- var s = "";
- for (var child = node.firstChild; child; child = child.nextSibling) {
- s += getOuterHTML(child, node);
- }
- return s;
- }
- function setInnerHTML(node, value, opt_tagName) {
- var tagName = opt_tagName || "div";
- node.textContent = "";
- var tempElement = unwrap(node.ownerDocument.createElement(tagName));
- tempElement.innerHTML = value;
- var firstChild;
- while (firstChild = tempElement.firstChild) {
- node.appendChild(wrap(firstChild));
- }
- }
- var oldIe = /MSIE/.test(navigator.userAgent);
- var OriginalHTMLElement = window.HTMLElement;
- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
- function HTMLElement(node) {
- Element.call(this, node);
- }
- HTMLElement.prototype = Object.create(Element.prototype);
- mixin(HTMLElement.prototype, {
- get innerHTML() {
- return getInnerHTML(this);
- },
- set innerHTML(value) {
- if (oldIe && plaintextParents[this.localName]) {
- this.textContent = value;
- return;
- }
- var removedNodes = snapshotNodeList(this.childNodes);
- if (this.invalidateShadowRenderer()) {
- if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName);
- } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) {
- setInnerHTML(this.content, value);
- } else {
- unsafeUnwrap(this).innerHTML = value;
- }
- var addedNodes = snapshotNodeList(this.childNodes);
- enqueueMutation(this, "childList", {
- addedNodes: addedNodes,
- removedNodes: removedNodes
- });
- nodesWereRemoved(removedNodes);
- nodesWereAdded(addedNodes, this);
- },
- get outerHTML() {
- return getOuterHTML(this, this.parentNode);
- },
- set outerHTML(value) {
- var p = this.parentNode;
- if (p) {
- p.invalidateShadowRenderer();
- var df = frag(p, value);
- p.replaceChild(df, this);
- }
- },
- insertAdjacentHTML: function(position, text) {
- var contextElement, refNode;
- switch (String(position).toLowerCase()) {
- case "beforebegin":
- contextElement = this.parentNode;
- refNode = this;
- break;
-
- case "afterend":
- contextElement = this.parentNode;
- refNode = this.nextSibling;
- break;
-
- case "afterbegin":
- contextElement = this;
- refNode = this.firstChild;
- break;
-
- case "beforeend":
- contextElement = this;
- refNode = null;
- break;
-
- default:
- return;
- }
- var df = frag(contextElement, text);
- contextElement.insertBefore(df, refNode);
- },
- get hidden() {
- return this.hasAttribute("hidden");
- },
- set hidden(v) {
- if (v) {
- this.setAttribute("hidden", "");
- } else {
- this.removeAttribute("hidden");
- }
- }
- });
- function frag(contextElement, html) {
- var p = unwrap(contextElement.cloneNode(false));
- p.innerHTML = html;
- var df = unwrap(document.createDocumentFragment());
- var c;
- while (c = p.firstChild) {
- df.appendChild(c);
- }
- return wrap(df);
- }
- function getter(name) {
- return function() {
- scope.renderAllPending();
- return unsafeUnwrap(this)[name];
- };
- }
- function getterRequiresRendering(name) {
- defineGetter(HTMLElement, name, getter(name));
- }
- [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering);
- function getterAndSetterRequiresRendering(name) {
- Object.defineProperty(HTMLElement.prototype, name, {
- get: getter(name),
- set: function(v) {
- scope.renderAllPending();
- unsafeUnwrap(this)[name] = v;
- },
- configurable: true,
- enumerable: true
- });
- }
- [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering);
- function methodRequiresRendering(name) {
- Object.defineProperty(HTMLElement.prototype, name, {
- value: function() {
- scope.renderAllPending();
- return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments);
- },
- configurable: true,
- enumerable: true
- });
- }
- [ "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
- registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));
- scope.wrappers.HTMLElement = HTMLElement;
- scope.getInnerHTML = getInnerHTML;
- scope.setInnerHTML = setInnerHTML;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var OriginalHTMLCanvasElement = window.HTMLCanvasElement;
- function HTMLCanvasElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLCanvasElement.prototype, {
- getContext: function() {
- var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments);
- return context && wrap(context);
- }
- });
- registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas"));
- scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLContentElement = window.HTMLContentElement;
- function HTMLContentElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLContentElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLContentElement.prototype, {
- constructor: HTMLContentElement,
- get select() {
- return this.getAttribute("select");
- },
- set select(value) {
- this.setAttribute("select", value);
- },
- setAttribute: function(n, v) {
- HTMLElement.prototype.setAttribute.call(this, n, v);
- if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true);
- }
- });
- if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement);
- scope.wrappers.HTMLContentElement = HTMLContentElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var unwrap = scope.unwrap;
- var OriginalHTMLFormElement = window.HTMLFormElement;
- function HTMLFormElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLFormElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLFormElement.prototype, {
- get elements() {
- return wrapHTMLCollection(unwrap(this).elements);
- }
- });
- registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form"));
- scope.wrappers.HTMLFormElement = HTMLFormElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var rewrap = scope.rewrap;
- var OriginalHTMLImageElement = window.HTMLImageElement;
- function HTMLImageElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLImageElement.prototype = Object.create(HTMLElement.prototype);
- registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img"));
- function Image(width, height) {
- if (!(this instanceof Image)) {
- throw new TypeError("DOM object constructor cannot be called as a function.");
- }
- var node = unwrap(document.createElement("img"));
- HTMLElement.call(this, node);
- rewrap(node, this);
- if (width !== undefined) node.width = width;
- if (height !== undefined) node.height = height;
- }
- Image.prototype = HTMLImageElement.prototype;
- scope.wrappers.HTMLImageElement = HTMLImageElement;
- scope.wrappers.Image = Image;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var NodeList = scope.wrappers.NodeList;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLShadowElement = window.HTMLShadowElement;
- function HTMLShadowElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);
- HTMLShadowElement.prototype.constructor = HTMLShadowElement;
- if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);
- scope.wrappers.HTMLShadowElement = HTMLShadowElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var contentTable = new WeakMap();
- var templateContentsOwnerTable = new WeakMap();
- function getTemplateContentsOwner(doc) {
- if (!doc.defaultView) return doc;
- var d = templateContentsOwnerTable.get(doc);
- if (!d) {
- d = doc.implementation.createHTMLDocument("");
- while (d.lastChild) {
- d.removeChild(d.lastChild);
- }
- templateContentsOwnerTable.set(doc, d);
- }
- return d;
- }
- function extractContent(templateElement) {
- var doc = getTemplateContentsOwner(templateElement.ownerDocument);
- var df = unwrap(doc.createDocumentFragment());
- var child;
- while (child = templateElement.firstChild) {
- df.appendChild(child);
- }
- return df;
- }
- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
- function HTMLTemplateElement(node) {
- HTMLElement.call(this, node);
- if (!OriginalHTMLTemplateElement) {
- var content = extractContent(node);
- contentTable.set(this, wrap(content));
- }
- }
- HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTemplateElement.prototype, {
- constructor: HTMLTemplateElement,
- get content() {
- if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content);
- return contentTable.get(this);
- }
- });
- if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);
- scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLMediaElement = window.HTMLMediaElement;
- if (!OriginalHTMLMediaElement) return;
- function HTMLMediaElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);
- registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio"));
- scope.wrappers.HTMLMediaElement = HTMLMediaElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLMediaElement = scope.wrappers.HTMLMediaElement;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var rewrap = scope.rewrap;
- var OriginalHTMLAudioElement = window.HTMLAudioElement;
- if (!OriginalHTMLAudioElement) return;
- function HTMLAudioElement(node) {
- HTMLMediaElement.call(this, node);
- }
- HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);
- registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio"));
- function Audio(src) {
- if (!(this instanceof Audio)) {
- throw new TypeError("DOM object constructor cannot be called as a function.");
- }
- var node = unwrap(document.createElement("audio"));
- HTMLMediaElement.call(this, node);
- rewrap(node, this);
- node.setAttribute("preload", "auto");
- if (src !== undefined) node.setAttribute("src", src);
- }
- Audio.prototype = HTMLAudioElement.prototype;
- scope.wrappers.HTMLAudioElement = HTMLAudioElement;
- scope.wrappers.Audio = Audio;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var rewrap = scope.rewrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLOptionElement = window.HTMLOptionElement;
- function trimText(s) {
- return s.replace(/\s+/g, " ").trim();
- }
- function HTMLOptionElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLOptionElement.prototype, {
- get text() {
- return trimText(this.textContent);
- },
- set text(value) {
- this.textContent = trimText(String(value));
- },
- get form() {
- return wrap(unwrap(this).form);
- }
- });
- registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option"));
- function Option(text, value, defaultSelected, selected) {
- if (!(this instanceof Option)) {
- throw new TypeError("DOM object constructor cannot be called as a function.");
- }
- var node = unwrap(document.createElement("option"));
- HTMLElement.call(this, node);
- rewrap(node, this);
- if (text !== undefined) node.text = text;
- if (value !== undefined) node.setAttribute("value", value);
- if (defaultSelected === true) node.setAttribute("selected", "");
- node.selected = selected === true;
- }
- Option.prototype = HTMLOptionElement.prototype;
- scope.wrappers.HTMLOptionElement = HTMLOptionElement;
- scope.wrappers.Option = Option;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLSelectElement = window.HTMLSelectElement;
- function HTMLSelectElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLSelectElement.prototype, {
- add: function(element, before) {
- if (typeof before === "object") before = unwrap(before);
- unwrap(this).add(unwrap(element), before);
- },
- remove: function(indexOrNode) {
- if (indexOrNode === undefined) {
- HTMLElement.prototype.remove.call(this);
- return;
- }
- if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode);
- unwrap(this).remove(indexOrNode);
- },
- get form() {
- return wrap(unwrap(this).form);
- }
- });
- registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select"));
- scope.wrappers.HTMLSelectElement = HTMLSelectElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var OriginalHTMLTableElement = window.HTMLTableElement;
- function HTMLTableElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLTableElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTableElement.prototype, {
- get caption() {
- return wrap(unwrap(this).caption);
- },
- createCaption: function() {
- return wrap(unwrap(this).createCaption());
- },
- get tHead() {
- return wrap(unwrap(this).tHead);
- },
- createTHead: function() {
- return wrap(unwrap(this).createTHead());
- },
- createTFoot: function() {
- return wrap(unwrap(this).createTFoot());
- },
- get tFoot() {
- return wrap(unwrap(this).tFoot);
- },
- get tBodies() {
- return wrapHTMLCollection(unwrap(this).tBodies);
- },
- createTBody: function() {
- return wrap(unwrap(this).createTBody());
- },
- get rows() {
- return wrapHTMLCollection(unwrap(this).rows);
- },
- insertRow: function(index) {
- return wrap(unwrap(this).insertRow(index));
- }
- });
- registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table"));
- scope.wrappers.HTMLTableElement = HTMLTableElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;
- function HTMLTableSectionElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTableSectionElement.prototype, {
- constructor: HTMLTableSectionElement,
- get rows() {
- return wrapHTMLCollection(unwrap(this).rows);
- },
- insertRow: function(index) {
- return wrap(unwrap(this).insertRow(index));
- }
- });
- registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead"));
- scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var wrapHTMLCollection = scope.wrapHTMLCollection;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalHTMLTableRowElement = window.HTMLTableRowElement;
- function HTMLTableRowElement(node) {
- HTMLElement.call(this, node);
- }
- HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);
- mixin(HTMLTableRowElement.prototype, {
- get cells() {
- return wrapHTMLCollection(unwrap(this).cells);
- },
- insertCell: function(index) {
- return wrap(unwrap(this).insertCell(index));
- }
- });
- registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr"));
- scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLContentElement = scope.wrappers.HTMLContentElement;
- var HTMLElement = scope.wrappers.HTMLElement;
- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
- var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var OriginalHTMLUnknownElement = window.HTMLUnknownElement;
- function HTMLUnknownElement(node) {
- switch (node.localName) {
- case "content":
- return new HTMLContentElement(node);
-
- case "shadow":
- return new HTMLShadowElement(node);
-
- case "template":
- return new HTMLTemplateElement(node);
- }
- HTMLElement.call(this, node);
- }
- HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);
- registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);
- scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var Element = scope.wrappers.Element;
- var HTMLElement = scope.wrappers.HTMLElement;
- var registerObject = scope.registerObject;
- var defineWrapGetter = scope.defineWrapGetter;
- var SVG_NS = "http://www.w3.org/2000/svg";
- var svgTitleElement = document.createElementNS(SVG_NS, "title");
- var SVGTitleElement = registerObject(svgTitleElement);
- var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
- if (!("classList" in svgTitleElement)) {
- var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
- Object.defineProperty(HTMLElement.prototype, "classList", descr);
- delete Element.prototype.classList;
- }
- defineWrapGetter(SVGElement, "ownerSVGElement");
- scope.wrappers.SVGElement = SVGElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var OriginalSVGUseElement = window.SVGUseElement;
- var SVG_NS = "http://www.w3.org/2000/svg";
- var gWrapper = wrap(document.createElementNS(SVG_NS, "g"));
- var useElement = document.createElementNS(SVG_NS, "use");
- var SVGGElement = gWrapper.constructor;
- var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);
- var parentInterface = parentInterfacePrototype.constructor;
- function SVGUseElement(impl) {
- parentInterface.call(this, impl);
- }
- SVGUseElement.prototype = Object.create(parentInterfacePrototype);
- if ("instanceRoot" in useElement) {
- mixin(SVGUseElement.prototype, {
- get instanceRoot() {
- return wrap(unwrap(this).instanceRoot);
- },
- get animatedInstanceRoot() {
- return wrap(unwrap(this).animatedInstanceRoot);
- }
- });
- }
- registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);
- scope.wrappers.SVGUseElement = SVGUseElement;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var EventTarget = scope.wrappers.EventTarget;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var wrap = scope.wrap;
- var OriginalSVGElementInstance = window.SVGElementInstance;
- if (!OriginalSVGElementInstance) return;
- function SVGElementInstance(impl) {
- EventTarget.call(this, impl);
- }
- SVGElementInstance.prototype = Object.create(EventTarget.prototype);
- mixin(SVGElementInstance.prototype, {
- get correspondingElement() {
- return wrap(unsafeUnwrap(this).correspondingElement);
- },
- get correspondingUseElement() {
- return wrap(unsafeUnwrap(this).correspondingUseElement);
- },
- get parentNode() {
- return wrap(unsafeUnwrap(this).parentNode);
- },
- get childNodes() {
- throw new Error("Not implemented");
- },
- get firstChild() {
- return wrap(unsafeUnwrap(this).firstChild);
- },
- get lastChild() {
- return wrap(unsafeUnwrap(this).lastChild);
- },
- get previousSibling() {
- return wrap(unsafeUnwrap(this).previousSibling);
- },
- get nextSibling() {
- return wrap(unsafeUnwrap(this).nextSibling);
- }
- });
- registerWrapper(OriginalSVGElementInstance, SVGElementInstance);
- scope.wrappers.SVGElementInstance = SVGElementInstance;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;
- function CanvasRenderingContext2D(impl) {
- setWrapper(impl, this);
- }
- mixin(CanvasRenderingContext2D.prototype, {
- get canvas() {
- return wrap(unsafeUnwrap(this).canvas);
- },
- drawImage: function() {
- arguments[0] = unwrapIfNeeded(arguments[0]);
- unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments);
- },
- createPattern: function() {
- arguments[0] = unwrap(arguments[0]);
- return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments);
- }
- });
- registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d"));
- scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalWebGLRenderingContext = window.WebGLRenderingContext;
- if (!OriginalWebGLRenderingContext) return;
- function WebGLRenderingContext(impl) {
- setWrapper(impl, this);
- }
- mixin(WebGLRenderingContext.prototype, {
- get canvas() {
- return wrap(unsafeUnwrap(this).canvas);
- },
- texImage2D: function() {
- arguments[5] = unwrapIfNeeded(arguments[5]);
- unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);
- },
- texSubImage2D: function() {
- arguments[6] = unwrapIfNeeded(arguments[6]);
- unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);
- }
- });
- var instanceProperties = /WebKit/.test(navigator.userAgent) ? {
- drawingBufferHeight: null,
- drawingBufferWidth: null
- } : {};
- registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);
- scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var GetElementsByInterface = scope.GetElementsByInterface;
- var ParentNodeInterface = scope.ParentNodeInterface;
- var SelectorsInterface = scope.SelectorsInterface;
- var mixin = scope.mixin;
- var registerObject = scope.registerObject;
- var DocumentFragment = registerObject(document.createDocumentFragment());
- mixin(DocumentFragment.prototype, ParentNodeInterface);
- mixin(DocumentFragment.prototype, SelectorsInterface);
- mixin(DocumentFragment.prototype, GetElementsByInterface);
- var Comment = registerObject(document.createComment(""));
- scope.wrappers.Comment = Comment;
- scope.wrappers.DocumentFragment = DocumentFragment;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var DocumentFragment = scope.wrappers.DocumentFragment;
- var TreeScope = scope.TreeScope;
- var elementFromPoint = scope.elementFromPoint;
- var getInnerHTML = scope.getInnerHTML;
- var getTreeScope = scope.getTreeScope;
- var mixin = scope.mixin;
- var rewrap = scope.rewrap;
- var setInnerHTML = scope.setInnerHTML;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var shadowHostTable = new WeakMap();
- var nextOlderShadowTreeTable = new WeakMap();
- var spaceCharRe = /[ \t\n\r\f]/;
- function ShadowRoot(hostWrapper) {
- var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
- DocumentFragment.call(this, node);
- rewrap(node, this);
- var oldShadowRoot = hostWrapper.shadowRoot;
- nextOlderShadowTreeTable.set(this, oldShadowRoot);
- this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
- shadowHostTable.set(this, hostWrapper);
- }
- ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
- mixin(ShadowRoot.prototype, {
- constructor: ShadowRoot,
- get innerHTML() {
- return getInnerHTML(this);
- },
- set innerHTML(value) {
- setInnerHTML(this, value);
- this.invalidateShadowRenderer();
- },
- get olderShadowRoot() {
- return nextOlderShadowTreeTable.get(this) || null;
- },
- get host() {
- return shadowHostTable.get(this) || null;
- },
- invalidateShadowRenderer: function() {
- return shadowHostTable.get(this).invalidateShadowRenderer();
- },
- elementFromPoint: function(x, y) {
- return elementFromPoint(this, this.ownerDocument, x, y);
- },
- getElementById: function(id) {
- if (spaceCharRe.test(id)) return null;
- return this.querySelector('[id="' + id + '"]');
- }
- });
- scope.wrappers.ShadowRoot = ShadowRoot;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var getTreeScope = scope.getTreeScope;
- var OriginalRange = window.Range;
- var ShadowRoot = scope.wrappers.ShadowRoot;
- function getHost(node) {
- var root = getTreeScope(node).root;
- if (root instanceof ShadowRoot) {
- return root.host;
- }
- return null;
- }
- function hostNodeToShadowNode(refNode, offset) {
- if (refNode.shadowRoot) {
- offset = Math.min(refNode.childNodes.length - 1, offset);
- var child = refNode.childNodes[offset];
- if (child) {
- var insertionPoint = scope.getDestinationInsertionPoints(child);
- if (insertionPoint.length > 0) {
- var parentNode = insertionPoint[0].parentNode;
- if (parentNode.nodeType == Node.ELEMENT_NODE) {
- refNode = parentNode;
- }
- }
- }
- }
- return refNode;
- }
- function shadowNodeToHostNode(node) {
- node = wrap(node);
- return getHost(node) || node;
- }
- function Range(impl) {
- setWrapper(impl, this);
- }
- Range.prototype = {
- get startContainer() {
- return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);
- },
- get endContainer() {
- return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);
- },
- get commonAncestorContainer() {
- return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);
- },
- setStart: function(refNode, offset) {
- refNode = hostNodeToShadowNode(refNode, offset);
- unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);
- },
- setEnd: function(refNode, offset) {
- refNode = hostNodeToShadowNode(refNode, offset);
- unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);
- },
- setStartBefore: function(refNode) {
- unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));
- },
- setStartAfter: function(refNode) {
- unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode));
- },
- setEndBefore: function(refNode) {
- unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));
- },
- setEndAfter: function(refNode) {
- unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode));
- },
- selectNode: function(refNode) {
- unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode));
- },
- selectNodeContents: function(refNode) {
- unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode));
- },
- compareBoundaryPoints: function(how, sourceRange) {
- return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));
- },
- extractContents: function() {
- return wrap(unsafeUnwrap(this).extractContents());
- },
- cloneContents: function() {
- return wrap(unsafeUnwrap(this).cloneContents());
- },
- insertNode: function(node) {
- unsafeUnwrap(this).insertNode(unwrapIfNeeded(node));
- },
- surroundContents: function(newParent) {
- unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent));
- },
- cloneRange: function() {
- return wrap(unsafeUnwrap(this).cloneRange());
- },
- isPointInRange: function(node, offset) {
- return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);
- },
- comparePoint: function(node, offset) {
- return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset);
- },
- intersectsNode: function(node) {
- return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node));
- },
- toString: function() {
- return unsafeUnwrap(this).toString();
- }
- };
- if (OriginalRange.prototype.createContextualFragment) {
- Range.prototype.createContextualFragment = function(html) {
- return wrap(unsafeUnwrap(this).createContextualFragment(html));
- };
- }
- registerWrapper(window.Range, Range, document.createRange());
- scope.wrappers.Range = Range;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var Element = scope.wrappers.Element;
- var HTMLContentElement = scope.wrappers.HTMLContentElement;
- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
- var Node = scope.wrappers.Node;
- var ShadowRoot = scope.wrappers.ShadowRoot;
- var assert = scope.assert;
- var getTreeScope = scope.getTreeScope;
- var mixin = scope.mixin;
- var oneOf = scope.oneOf;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var ArraySplice = scope.ArraySplice;
- function updateWrapperUpAndSideways(wrapper) {
- wrapper.previousSibling_ = wrapper.previousSibling;
- wrapper.nextSibling_ = wrapper.nextSibling;
- wrapper.parentNode_ = wrapper.parentNode;
- }
- function updateWrapperDown(wrapper) {
- wrapper.firstChild_ = wrapper.firstChild;
- wrapper.lastChild_ = wrapper.lastChild;
- }
- function updateAllChildNodes(parentNodeWrapper) {
- assert(parentNodeWrapper instanceof Node);
- for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) {
- updateWrapperUpAndSideways(childWrapper);
- }
- updateWrapperDown(parentNodeWrapper);
- }
- function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {
- var parentNode = unwrap(parentNodeWrapper);
- var newChild = unwrap(newChildWrapper);
- var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;
- remove(newChildWrapper);
- updateWrapperUpAndSideways(newChildWrapper);
- if (!refChildWrapper) {
- parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;
- if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;
- var lastChildWrapper = wrap(parentNode.lastChild);
- if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;
- } else {
- if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper;
- refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;
- }
- scope.originalInsertBefore.call(parentNode, newChild, refChild);
- }
- function remove(nodeWrapper) {
- var node = unwrap(nodeWrapper);
- var parentNode = node.parentNode;
- if (!parentNode) return;
- var parentNodeWrapper = wrap(parentNode);
- updateWrapperUpAndSideways(nodeWrapper);
- if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;
- if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;
- if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper;
- if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper;
- scope.originalRemoveChild.call(parentNode, node);
- }
- var distributedNodesTable = new WeakMap();
- var destinationInsertionPointsTable = new WeakMap();
- var rendererForHostTable = new WeakMap();
- function resetDistributedNodes(insertionPoint) {
- distributedNodesTable.set(insertionPoint, []);
- }
- function getDistributedNodes(insertionPoint) {
- var rv = distributedNodesTable.get(insertionPoint);
- if (!rv) distributedNodesTable.set(insertionPoint, rv = []);
- return rv;
- }
- function getChildNodesSnapshot(node) {
- var result = [], i = 0;
- for (var child = node.firstChild; child; child = child.nextSibling) {
- result[i++] = child;
- }
- return result;
- }
- var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]);
- var pendingDirtyRenderers = [];
- var renderTimer;
- function renderAllPending() {
- for (var i = 0; i < pendingDirtyRenderers.length; i++) {
- var renderer = pendingDirtyRenderers[i];
- var parentRenderer = renderer.parentRenderer;
- if (parentRenderer && parentRenderer.dirty) continue;
- renderer.render();
- }
- pendingDirtyRenderers = [];
- }
- function handleRequestAnimationFrame() {
- renderTimer = null;
- renderAllPending();
- }
- function getRendererForHost(host) {
- var renderer = rendererForHostTable.get(host);
- if (!renderer) {
- renderer = new ShadowRenderer(host);
- rendererForHostTable.set(host, renderer);
- }
- return renderer;
- }
- function getShadowRootAncestor(node) {
- var root = getTreeScope(node).root;
- if (root instanceof ShadowRoot) return root;
- return null;
- }
- function getRendererForShadowRoot(shadowRoot) {
- return getRendererForHost(shadowRoot.host);
- }
- var spliceDiff = new ArraySplice();
- spliceDiff.equals = function(renderNode, rawNode) {
- return unwrap(renderNode.node) === rawNode;
- };
- function RenderNode(node) {
- this.skip = false;
- this.node = node;
- this.childNodes = [];
- }
- RenderNode.prototype = {
- append: function(node) {
- var rv = new RenderNode(node);
- this.childNodes.push(rv);
- return rv;
- },
- sync: function(opt_added) {
- if (this.skip) return;
- var nodeWrapper = this.node;
- var newChildren = this.childNodes;
- var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));
- var added = opt_added || new WeakMap();
- var splices = spliceDiff.calculateSplices(newChildren, oldChildren);
- var newIndex = 0, oldIndex = 0;
- var lastIndex = 0;
- for (var i = 0; i < splices.length; i++) {
- var splice = splices[i];
- for (;lastIndex < splice.index; lastIndex++) {
- oldIndex++;
- newChildren[newIndex++].sync(added);
- }
- var removedCount = splice.removed.length;
- for (var j = 0; j < removedCount; j++) {
- var wrapper = wrap(oldChildren[oldIndex++]);
- if (!added.get(wrapper)) remove(wrapper);
- }
- var addedCount = splice.addedCount;
- var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);
- for (var j = 0; j < addedCount; j++) {
- var newChildRenderNode = newChildren[newIndex++];
- var newChildWrapper = newChildRenderNode.node;
- insertBefore(nodeWrapper, newChildWrapper, refNode);
- added.set(newChildWrapper, true);
- newChildRenderNode.sync(added);
- }
- lastIndex += addedCount;
- }
- for (var i = lastIndex; i < newChildren.length; i++) {
- newChildren[i].sync(added);
- }
- }
- };
- function ShadowRenderer(host) {
- this.host = host;
- this.dirty = false;
- this.invalidateAttributes();
- this.associateNode(host);
- }
- ShadowRenderer.prototype = {
- render: function(opt_renderNode) {
- if (!this.dirty) return;
- this.invalidateAttributes();
- var host = this.host;
- this.distribution(host);
- var renderNode = opt_renderNode || new RenderNode(host);
- this.buildRenderTree(renderNode, host);
- var topMostRenderer = !opt_renderNode;
- if (topMostRenderer) renderNode.sync();
- this.dirty = false;
- },
- get parentRenderer() {
- return getTreeScope(this.host).renderer;
- },
- invalidate: function() {
- if (!this.dirty) {
- this.dirty = true;
- var parentRenderer = this.parentRenderer;
- if (parentRenderer) parentRenderer.invalidate();
- pendingDirtyRenderers.push(this);
- if (renderTimer) return;
- renderTimer = window[request](handleRequestAnimationFrame, 0);
- }
- },
- distribution: function(root) {
- this.resetAllSubtrees(root);
- this.distributionResolution(root);
- },
- resetAll: function(node) {
- if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node);
- this.resetAllSubtrees(node);
- },
- resetAllSubtrees: function(node) {
- for (var child = node.firstChild; child; child = child.nextSibling) {
- this.resetAll(child);
- }
- if (node.shadowRoot) this.resetAll(node.shadowRoot);
- if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot);
- },
- distributionResolution: function(node) {
- if (isShadowHost(node)) {
- var shadowHost = node;
- var pool = poolPopulation(shadowHost);
- var shadowTrees = getShadowTrees(shadowHost);
- for (var i = 0; i < shadowTrees.length; i++) {
- this.poolDistribution(shadowTrees[i], pool);
- }
- for (var i = shadowTrees.length - 1; i >= 0; i--) {
- var shadowTree = shadowTrees[i];
- var shadow = getShadowInsertionPoint(shadowTree);
- if (shadow) {
- var olderShadowRoot = shadowTree.olderShadowRoot;
- if (olderShadowRoot) {
- pool = poolPopulation(olderShadowRoot);
- }
- for (var j = 0; j < pool.length; j++) {
- destributeNodeInto(pool[j], shadow);
- }
- }
- this.distributionResolution(shadowTree);
- }
- }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- this.distributionResolution(child);
- }
- },
- poolDistribution: function(node, pool) {
- if (node instanceof HTMLShadowElement) return;
- if (node instanceof HTMLContentElement) {
- var content = node;
- this.updateDependentAttributes(content.getAttribute("select"));
- var anyDistributed = false;
- for (var i = 0; i < pool.length; i++) {
- var node = pool[i];
- if (!node) continue;
- if (matches(node, content)) {
- destributeNodeInto(node, content);
- pool[i] = undefined;
- anyDistributed = true;
- }
- }
- if (!anyDistributed) {
- for (var child = content.firstChild; child; child = child.nextSibling) {
- destributeNodeInto(child, content);
- }
- }
- return;
- }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- this.poolDistribution(child, pool);
- }
- },
- buildRenderTree: function(renderNode, node) {
- var children = this.compose(node);
- for (var i = 0; i < children.length; i++) {
- var child = children[i];
- var childRenderNode = renderNode.append(child);
- this.buildRenderTree(childRenderNode, child);
- }
- if (isShadowHost(node)) {
- var renderer = getRendererForHost(node);
- renderer.dirty = false;
- }
- },
- compose: function(node) {
- var children = [];
- var p = node.shadowRoot || node;
- for (var child = p.firstChild; child; child = child.nextSibling) {
- if (isInsertionPoint(child)) {
- this.associateNode(p);
- var distributedNodes = getDistributedNodes(child);
- for (var j = 0; j < distributedNodes.length; j++) {
- var distributedNode = distributedNodes[j];
- if (isFinalDestination(child, distributedNode)) children.push(distributedNode);
- }
- } else {
- children.push(child);
- }
- }
- return children;
- },
- invalidateAttributes: function() {
- this.attributes = Object.create(null);
- },
- updateDependentAttributes: function(selector) {
- if (!selector) return;
- var attributes = this.attributes;
- if (/\.\w+/.test(selector)) attributes["class"] = true;
- if (/#\w+/.test(selector)) attributes["id"] = true;
- selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) {
- attributes[name] = true;
- });
- },
- dependsOnAttribute: function(name) {
- return this.attributes[name];
- },
- associateNode: function(node) {
- unsafeUnwrap(node).polymerShadowRenderer_ = this;
- }
- };
- function poolPopulation(node) {
- var pool = [];
- for (var child = node.firstChild; child; child = child.nextSibling) {
- if (isInsertionPoint(child)) {
- pool.push.apply(pool, getDistributedNodes(child));
- } else {
- pool.push(child);
- }
- }
- return pool;
- }
- function getShadowInsertionPoint(node) {
- if (node instanceof HTMLShadowElement) return node;
- if (node instanceof HTMLContentElement) return null;
- for (var child = node.firstChild; child; child = child.nextSibling) {
- var res = getShadowInsertionPoint(child);
- if (res) return res;
- }
- return null;
- }
- function destributeNodeInto(child, insertionPoint) {
- getDistributedNodes(insertionPoint).push(child);
- var points = destinationInsertionPointsTable.get(child);
- if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint);
- }
- function getDestinationInsertionPoints(node) {
- return destinationInsertionPointsTable.get(node);
- }
- function resetDestinationInsertionPoints(node) {
- destinationInsertionPointsTable.set(node, undefined);
- }
- var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/;
- function matches(node, contentElement) {
- var select = contentElement.getAttribute("select");
- if (!select) return true;
- select = select.trim();
- if (!select) return true;
- if (!(node instanceof Element)) return false;
- if (!selectorStartCharRe.test(select)) return false;
- try {
- return node.matches(select);
- } catch (ex) {
- return false;
- }
- }
- function isFinalDestination(insertionPoint, node) {
- var points = getDestinationInsertionPoints(node);
- return points && points[points.length - 1] === insertionPoint;
- }
- function isInsertionPoint(node) {
- return node instanceof HTMLContentElement || node instanceof HTMLShadowElement;
- }
- function isShadowHost(shadowHost) {
- return shadowHost.shadowRoot;
- }
- function getShadowTrees(host) {
- var trees = [];
- for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {
- trees.push(tree);
- }
- return trees;
- }
- function render(host) {
- new ShadowRenderer(host).render();
- }
- Node.prototype.invalidateShadowRenderer = function(force) {
- var renderer = unsafeUnwrap(this).polymerShadowRenderer_;
- if (renderer) {
- renderer.invalidate();
- return true;
- }
- return false;
- };
- HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() {
- renderAllPending();
- return getDistributedNodes(this);
- };
- Element.prototype.getDestinationInsertionPoints = function() {
- renderAllPending();
- return getDestinationInsertionPoints(this) || [];
- };
- HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() {
- this.invalidateShadowRenderer();
- var shadowRoot = getShadowRootAncestor(this);
- var renderer;
- if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot);
- unsafeUnwrap(this).polymerShadowRenderer_ = renderer;
- if (renderer) renderer.invalidate();
- };
- scope.getRendererForHost = getRendererForHost;
- scope.getShadowTrees = getShadowTrees;
- scope.renderAllPending = renderAllPending;
- scope.getDestinationInsertionPoints = getDestinationInsertionPoints;
- scope.visual = {
- insertBefore: insertBefore,
- remove: remove
- };
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var HTMLElement = scope.wrappers.HTMLElement;
- var assert = scope.assert;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ];
- function createWrapperConstructor(name) {
- if (!window[name]) return;
- assert(!scope.wrappers[name]);
- var GeneratedWrapper = function(node) {
- HTMLElement.call(this, node);
- };
- GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);
- mixin(GeneratedWrapper.prototype, {
- get form() {
- return wrap(unwrap(this).form);
- }
- });
- registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7)));
- scope.wrappers[name] = GeneratedWrapper;
- }
- elementsWithFormProperty.forEach(createWrapperConstructor);
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalSelection = window.Selection;
- function Selection(impl) {
- setWrapper(impl, this);
- }
- Selection.prototype = {
- get anchorNode() {
- return wrap(unsafeUnwrap(this).anchorNode);
- },
- get focusNode() {
- return wrap(unsafeUnwrap(this).focusNode);
- },
- addRange: function(range) {
- unsafeUnwrap(this).addRange(unwrapIfNeeded(range));
- },
- collapse: function(node, index) {
- unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);
- },
- containsNode: function(node, allowPartial) {
- return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);
- },
- getRangeAt: function(index) {
- return wrap(unsafeUnwrap(this).getRangeAt(index));
- },
- removeRange: function(range) {
- unsafeUnwrap(this).removeRange(unwrap(range));
- },
- selectAllChildren: function(node) {
- unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));
- },
- toString: function() {
- return unsafeUnwrap(this).toString();
- }
- };
- if (OriginalSelection.prototype.extend) {
- Selection.prototype.extend = function(node, offset) {
- unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
- };
- }
- registerWrapper(window.Selection, Selection, window.getSelection());
- scope.wrappers.Selection = Selection;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalTreeWalker = window.TreeWalker;
- function TreeWalker(impl) {
- setWrapper(impl, this);
- }
- TreeWalker.prototype = {
- get root() {
- return wrap(unsafeUnwrap(this).root);
- },
- get currentNode() {
- return wrap(unsafeUnwrap(this).currentNode);
- },
- set currentNode(node) {
- unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);
- },
- get filter() {
- return unsafeUnwrap(this).filter;
- },
- parentNode: function() {
- return wrap(unsafeUnwrap(this).parentNode());
- },
- firstChild: function() {
- return wrap(unsafeUnwrap(this).firstChild());
- },
- lastChild: function() {
- return wrap(unsafeUnwrap(this).lastChild());
- },
- previousSibling: function() {
- return wrap(unsafeUnwrap(this).previousSibling());
- },
- previousNode: function() {
- return wrap(unsafeUnwrap(this).previousNode());
- },
- nextNode: function() {
- return wrap(unsafeUnwrap(this).nextNode());
- }
- };
- registerWrapper(OriginalTreeWalker, TreeWalker);
- scope.wrappers.TreeWalker = TreeWalker;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var GetElementsByInterface = scope.GetElementsByInterface;
- var Node = scope.wrappers.Node;
- var ParentNodeInterface = scope.ParentNodeInterface;
- var Selection = scope.wrappers.Selection;
- var SelectorsInterface = scope.SelectorsInterface;
- var ShadowRoot = scope.wrappers.ShadowRoot;
- var TreeScope = scope.TreeScope;
- var cloneNode = scope.cloneNode;
- var defineWrapGetter = scope.defineWrapGetter;
- var elementFromPoint = scope.elementFromPoint;
- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
- var matchesNames = scope.matchesNames;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var renderAllPending = scope.renderAllPending;
- var rewrap = scope.rewrap;
- var setWrapper = scope.setWrapper;
- var unsafeUnwrap = scope.unsafeUnwrap;
- var unwrap = scope.unwrap;
- var wrap = scope.wrap;
- var wrapEventTargetMethods = scope.wrapEventTargetMethods;
- var wrapNodeList = scope.wrapNodeList;
- var implementationTable = new WeakMap();
- function Document(node) {
- Node.call(this, node);
- this.treeScope_ = new TreeScope(this, null);
- }
- Document.prototype = Object.create(Node.prototype);
- defineWrapGetter(Document, "documentElement");
- defineWrapGetter(Document, "body");
- defineWrapGetter(Document, "head");
- function wrapMethod(name) {
- var original = document[name];
- Document.prototype[name] = function() {
- return wrap(original.apply(unsafeUnwrap(this), arguments));
- };
- }
- [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "getElementById" ].forEach(wrapMethod);
- var originalAdoptNode = document.adoptNode;
- function adoptNodeNoRemove(node, doc) {
- originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));
- adoptSubtree(node, doc);
- }
- function adoptSubtree(node, doc) {
- if (node.shadowRoot) doc.adoptNode(node.shadowRoot);
- if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc);
- for (var child = node.firstChild; child; child = child.nextSibling) {
- adoptSubtree(child, doc);
- }
- }
- function adoptOlderShadowRoots(shadowRoot, doc) {
- var oldShadowRoot = shadowRoot.olderShadowRoot;
- if (oldShadowRoot) doc.adoptNode(oldShadowRoot);
- }
- var originalGetSelection = document.getSelection;
- mixin(Document.prototype, {
- adoptNode: function(node) {
- if (node.parentNode) node.parentNode.removeChild(node);
- adoptNodeNoRemove(node, this);
- return node;
- },
- elementFromPoint: function(x, y) {
- return elementFromPoint(this, this, x, y);
- },
- importNode: function(node, deep) {
- return cloneNode(node, deep, unsafeUnwrap(this));
- },
- getSelection: function() {
- renderAllPending();
- return new Selection(originalGetSelection.call(unwrap(this)));
- },
- getElementsByName: function(name) {
- return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");
- }
- });
- var originalCreateTreeWalker = document.createTreeWalker;
- var TreeWalkerWrapper = scope.wrappers.TreeWalker;
- Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {
- var newFilter = null;
- if (filter) {
- if (filter.acceptNode && typeof filter.acceptNode === "function") {
- newFilter = {
- acceptNode: function(node) {
- return filter.acceptNode(wrap(node));
- }
- };
- } else if (typeof filter === "function") {
- newFilter = function(node) {
- return filter(wrap(node));
- };
- }
- }
- return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));
- };
- if (document.registerElement) {
- var originalRegisterElement = document.registerElement;
- Document.prototype.registerElement = function(tagName, object) {
- var prototype, extendsOption;
- if (object !== undefined) {
- prototype = object.prototype;
- extendsOption = object.extends;
- }
- if (!prototype) prototype = Object.create(HTMLElement.prototype);
- if (scope.nativePrototypeTable.get(prototype)) {
- throw new Error("NotSupportedError");
- }
- var proto = Object.getPrototypeOf(prototype);
- var nativePrototype;
- var prototypes = [];
- while (proto) {
- nativePrototype = scope.nativePrototypeTable.get(proto);
- if (nativePrototype) break;
- prototypes.push(proto);
- proto = Object.getPrototypeOf(proto);
- }
- if (!nativePrototype) {
- throw new Error("NotSupportedError");
- }
- var newPrototype = Object.create(nativePrototype);
- for (var i = prototypes.length - 1; i >= 0; i--) {
- newPrototype = Object.create(newPrototype);
- }
- [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) {
- var f = prototype[name];
- if (!f) return;
- newPrototype[name] = function() {
- if (!(wrap(this) instanceof CustomElementConstructor)) {
- rewrap(this);
- }
- f.apply(wrap(this), arguments);
- };
- });
- var p = {
- prototype: newPrototype
- };
- if (extendsOption) p.extends = extendsOption;
- function CustomElementConstructor(node) {
- if (!node) {
- if (extendsOption) {
- return document.createElement(extendsOption, tagName);
- } else {
- return document.createElement(tagName);
- }
- }
- setWrapper(node, this);
- }
- CustomElementConstructor.prototype = prototype;
- CustomElementConstructor.prototype.constructor = CustomElementConstructor;
- scope.constructorTable.set(newPrototype, CustomElementConstructor);
- scope.nativePrototypeTable.set(prototype, newPrototype);
- var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p);
- return CustomElementConstructor;
- };
- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]);
- }
- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);
- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);
- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
- mixin(Document.prototype, GetElementsByInterface);
- mixin(Document.prototype, ParentNodeInterface);
- mixin(Document.prototype, SelectorsInterface);
- mixin(Document.prototype, {
- get implementation() {
- var implementation = implementationTable.get(this);
- if (implementation) return implementation;
- implementation = new DOMImplementation(unwrap(this).implementation);
- implementationTable.set(this, implementation);
- return implementation;
- },
- get defaultView() {
- return wrap(unwrap(this).defaultView);
- }
- });
- registerWrapper(window.Document, Document, document.implementation.createHTMLDocument(""));
- if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document);
- wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]);
- function DOMImplementation(impl) {
- setWrapper(impl, this);
- }
- function wrapImplMethod(constructor, name) {
- var original = document.implementation[name];
- constructor.prototype[name] = function() {
- return wrap(original.apply(unsafeUnwrap(this), arguments));
- };
- }
- function forwardImplMethod(constructor, name) {
- var original = document.implementation[name];
- constructor.prototype[name] = function() {
- return original.apply(unsafeUnwrap(this), arguments);
- };
- }
- wrapImplMethod(DOMImplementation, "createDocumentType");
- wrapImplMethod(DOMImplementation, "createDocument");
- wrapImplMethod(DOMImplementation, "createHTMLDocument");
- forwardImplMethod(DOMImplementation, "hasFeature");
- registerWrapper(window.DOMImplementation, DOMImplementation);
- forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocumentType", "createDocument", "createHTMLDocument", "hasFeature" ]);
- scope.adoptNodeNoRemove = adoptNodeNoRemove;
- scope.wrappers.DOMImplementation = DOMImplementation;
- scope.wrappers.Document = Document;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var EventTarget = scope.wrappers.EventTarget;
- var Selection = scope.wrappers.Selection;
- var mixin = scope.mixin;
- var registerWrapper = scope.registerWrapper;
- var renderAllPending = scope.renderAllPending;
- var unwrap = scope.unwrap;
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var wrap = scope.wrap;
- var OriginalWindow = window.Window;
- var originalGetComputedStyle = window.getComputedStyle;
- var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;
- var originalGetSelection = window.getSelection;
- function Window(impl) {
- EventTarget.call(this, impl);
- }
- Window.prototype = Object.create(EventTarget.prototype);
- OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {
- return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);
- };
- if (originalGetDefaultComputedStyle) {
- OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {
- return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo);
- };
- }
- OriginalWindow.prototype.getSelection = function() {
- return wrap(this || window).getSelection();
- };
- delete window.getComputedStyle;
- delete window.getDefaultComputedStyle;
- delete window.getSelection;
- [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) {
- OriginalWindow.prototype[name] = function() {
- var w = wrap(this || window);
- return w[name].apply(w, arguments);
- };
- delete window[name];
- });
- mixin(Window.prototype, {
- getComputedStyle: function(el, pseudo) {
- renderAllPending();
- return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);
- },
- getSelection: function() {
- renderAllPending();
- return new Selection(originalGetSelection.call(unwrap(this)));
- },
- get document() {
- return wrap(unwrap(this).document);
- }
- });
- if (originalGetDefaultComputedStyle) {
- Window.prototype.getDefaultComputedStyle = function(el, pseudo) {
- renderAllPending();
- return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);
- };
- }
- registerWrapper(OriginalWindow, Window, window);
- scope.wrappers.Window = Window;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var unwrap = scope.unwrap;
- var OriginalDataTransfer = window.DataTransfer || window.Clipboard;
- var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage;
- if (OriginalDataTransferSetDragImage) {
- OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {
- OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);
- };
- }
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var registerWrapper = scope.registerWrapper;
- var setWrapper = scope.setWrapper;
- var unwrap = scope.unwrap;
- var OriginalFormData = window.FormData;
- if (!OriginalFormData) return;
- function FormData(formElement) {
- var impl;
- if (formElement instanceof OriginalFormData) {
- impl = formElement;
- } else {
- impl = new OriginalFormData(formElement && unwrap(formElement));
- }
- setWrapper(impl, this);
- }
- registerWrapper(OriginalFormData, FormData, new OriginalFormData());
- scope.wrappers.FormData = FormData;
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var unwrapIfNeeded = scope.unwrapIfNeeded;
- var originalSend = XMLHttpRequest.prototype.send;
- XMLHttpRequest.prototype.send = function(obj) {
- return originalSend.call(this, unwrapIfNeeded(obj));
- };
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- "use strict";
- var isWrapperFor = scope.isWrapperFor;
- var elements = {
- a: "HTMLAnchorElement",
- area: "HTMLAreaElement",
- audio: "HTMLAudioElement",
- base: "HTMLBaseElement",
- body: "HTMLBodyElement",
- br: "HTMLBRElement",
- button: "HTMLButtonElement",
- canvas: "HTMLCanvasElement",
- caption: "HTMLTableCaptionElement",
- col: "HTMLTableColElement",
- content: "HTMLContentElement",
- data: "HTMLDataElement",
- datalist: "HTMLDataListElement",
- del: "HTMLModElement",
- dir: "HTMLDirectoryElement",
- div: "HTMLDivElement",
- dl: "HTMLDListElement",
- embed: "HTMLEmbedElement",
- fieldset: "HTMLFieldSetElement",
- font: "HTMLFontElement",
- form: "HTMLFormElement",
- frame: "HTMLFrameElement",
- frameset: "HTMLFrameSetElement",
- h1: "HTMLHeadingElement",
- head: "HTMLHeadElement",
- hr: "HTMLHRElement",
- html: "HTMLHtmlElement",
- iframe: "HTMLIFrameElement",
- img: "HTMLImageElement",
- input: "HTMLInputElement",
- keygen: "HTMLKeygenElement",
- label: "HTMLLabelElement",
- legend: "HTMLLegendElement",
- li: "HTMLLIElement",
- link: "HTMLLinkElement",
- map: "HTMLMapElement",
- marquee: "HTMLMarqueeElement",
- menu: "HTMLMenuElement",
- menuitem: "HTMLMenuItemElement",
- meta: "HTMLMetaElement",
- meter: "HTMLMeterElement",
- object: "HTMLObjectElement",
- ol: "HTMLOListElement",
- optgroup: "HTMLOptGroupElement",
- option: "HTMLOptionElement",
- output: "HTMLOutputElement",
- p: "HTMLParagraphElement",
- param: "HTMLParamElement",
- pre: "HTMLPreElement",
- progress: "HTMLProgressElement",
- q: "HTMLQuoteElement",
- script: "HTMLScriptElement",
- select: "HTMLSelectElement",
- shadow: "HTMLShadowElement",
- source: "HTMLSourceElement",
- span: "HTMLSpanElement",
- style: "HTMLStyleElement",
- table: "HTMLTableElement",
- tbody: "HTMLTableSectionElement",
- template: "HTMLTemplateElement",
- textarea: "HTMLTextAreaElement",
- thead: "HTMLTableSectionElement",
- time: "HTMLTimeElement",
- title: "HTMLTitleElement",
- tr: "HTMLTableRowElement",
- track: "HTMLTrackElement",
- ul: "HTMLUListElement",
- video: "HTMLVideoElement"
- };
- function overrideConstructor(tagName) {
- var nativeConstructorName = elements[tagName];
- var nativeConstructor = window[nativeConstructorName];
- if (!nativeConstructor) return;
- var element = document.createElement(tagName);
- var wrapperConstructor = element.constructor;
- window[nativeConstructorName] = wrapperConstructor;
- }
- Object.keys(elements).forEach(overrideConstructor);
- Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {
- window[name] = scope.wrappers[name];
- });
- })(window.ShadowDOMPolyfill);
- (function(scope) {
- var ShadowCSS = {
- strictStyling: false,
- registry: {},
- shimStyling: function(root, name, extendsName) {
- var scopeStyles = this.prepareRoot(root, name, extendsName);
- var typeExtension = this.isTypeExtension(extendsName);
- var scopeSelector = this.makeScopeSelector(name, typeExtension);
- var cssText = stylesToCssText(scopeStyles, true);
- cssText = this.scopeCssText(cssText, scopeSelector);
- if (root) {
- root.shimmedStyle = cssText;
- }
- this.addCssToDocument(cssText, name);
- },
- shimStyle: function(style, selector) {
- return this.shimCssText(style.textContent, selector);
- },
- shimCssText: function(cssText, selector) {
- cssText = this.insertDirectives(cssText);
- return this.scopeCssText(cssText, selector);
- },
- makeScopeSelector: function(name, typeExtension) {
- if (name) {
- return typeExtension ? "[is=" + name + "]" : name;
- }
- return "";
- },
- isTypeExtension: function(extendsName) {
- return extendsName && extendsName.indexOf("-") < 0;
- },
- prepareRoot: function(root, name, extendsName) {
- var def = this.registerRoot(root, name, extendsName);
- this.replaceTextInStyles(def.rootStyles, this.insertDirectives);
- this.removeStyles(root, def.rootStyles);
- if (this.strictStyling) {
- this.applyScopeToContent(root, name);
- }
- return def.scopeStyles;
- },
- removeStyles: function(root, styles) {
- for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
- s.parentNode.removeChild(s);
- }
- },
- registerRoot: function(root, name, extendsName) {
- var def = this.registry[name] = {
- root: root,
- name: name,
- extendsName: extendsName
- };
- var styles = this.findStyles(root);
- def.rootStyles = styles;
- def.scopeStyles = def.rootStyles;
- var extendee = this.registry[def.extendsName];
- if (extendee) {
- def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);
- }
- return def;
- },
- findStyles: function(root) {
- if (!root) {
- return [];
- }
- var styles = root.querySelectorAll("style");
- return Array.prototype.filter.call(styles, function(s) {
- return !s.hasAttribute(NO_SHIM_ATTRIBUTE);
- });
- },
- applyScopeToContent: function(root, name) {
- if (root) {
- Array.prototype.forEach.call(root.querySelectorAll("*"), function(node) {
- node.setAttribute(name, "");
- });
- Array.prototype.forEach.call(root.querySelectorAll("template"), function(template) {
- this.applyScopeToContent(template.content, name);
- }, this);
- }
- },
- insertDirectives: function(cssText) {
- cssText = this.insertPolyfillDirectivesInCssText(cssText);
- return this.insertPolyfillRulesInCssText(cssText);
- },
- insertPolyfillDirectivesInCssText: function(cssText) {
- cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) {
- return p1.slice(0, -2) + "{";
- });
- return cssText.replace(cssContentNextSelectorRe, function(match, p1) {
- return p1 + " {";
- });
- },
- insertPolyfillRulesInCssText: function(cssText) {
- cssText = cssText.replace(cssCommentRuleRe, function(match, p1) {
- return p1.slice(0, -1);
- });
- return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) {
- var rule = match.replace(p1, "").replace(p2, "");
- return p3 + rule;
- });
- },
- scopeCssText: function(cssText, scopeSelector) {
- var unscoped = this.extractUnscopedRulesFromCssText(cssText);
- cssText = this.insertPolyfillHostInCssText(cssText);
- cssText = this.convertColonHost(cssText);
- cssText = this.convertColonHostContext(cssText);
- cssText = this.convertShadowDOMSelectors(cssText);
- if (scopeSelector) {
- var self = this, cssText;
- withCssRules(cssText, function(rules) {
- cssText = self.scopeRules(rules, scopeSelector);
- });
- }
- cssText = cssText + "\n" + unscoped;
- return cssText.trim();
- },
- extractUnscopedRulesFromCssText: function(cssText) {
- var r = "", m;
- while (m = cssCommentUnscopedRuleRe.exec(cssText)) {
- r += m[1].slice(0, -1) + "\n\n";
- }
- while (m = cssContentUnscopedRuleRe.exec(cssText)) {
- r += m[0].replace(m[2], "").replace(m[1], m[3]) + "\n\n";
- }
- return r;
- },
- convertColonHost: function(cssText) {
- return this.convertColonRule(cssText, cssColonHostRe, this.colonHostPartReplacer);
- },
- convertColonHostContext: function(cssText) {
- return this.convertColonRule(cssText, cssColonHostContextRe, this.colonHostContextPartReplacer);
- },
- convertColonRule: function(cssText, regExp, partReplacer) {
- return cssText.replace(regExp, function(m, p1, p2, p3) {
- p1 = polyfillHostNoCombinator;
- if (p2) {
- var parts = p2.split(","), r = [];
- for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) {
- p = p.trim();
- r.push(partReplacer(p1, p, p3));
- }
- return r.join(",");
- } else {
- return p1 + p3;
- }
- });
- },
- colonHostContextPartReplacer: function(host, part, suffix) {
- if (part.match(polyfillHost)) {
- return this.colonHostPartReplacer(host, part, suffix);
- } else {
- return host + part + suffix + ", " + part + " " + host + suffix;
- }
- },
- colonHostPartReplacer: function(host, part, suffix) {
- return host + part.replace(polyfillHost, "") + suffix;
- },
- convertShadowDOMSelectors: function(cssText) {
- for (var i = 0; i < shadowDOMSelectorsRe.length; i++) {
- cssText = cssText.replace(shadowDOMSelectorsRe[i], " ");
- }
- return cssText;
- },
- scopeRules: function(cssRules, scopeSelector) {
- var cssText = "";
- if (cssRules) {
- Array.prototype.forEach.call(cssRules, function(rule) {
- if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) {
- cssText += this.scopeSelector(rule.selectorText, scopeSelector, this.strictStyling) + " {\n ";
- cssText += this.propertiesFromRule(rule) + "\n}\n\n";
- } else if (rule.type === CSSRule.MEDIA_RULE) {
- cssText += "@media " + rule.media.mediaText + " {\n";
- cssText += this.scopeRules(rule.cssRules, scopeSelector);
- cssText += "\n}\n\n";
- } else {
- try {
- if (rule.cssText) {
- cssText += rule.cssText + "\n\n";
- }
- } catch (x) {
- if (rule.type === CSSRule.KEYFRAMES_RULE && rule.cssRules) {
- cssText += this.ieSafeCssTextFromKeyFrameRule(rule);
- }
- }
- }
- }, this);
- }
- return cssText;
- },
- ieSafeCssTextFromKeyFrameRule: function(rule) {
- var cssText = "@keyframes " + rule.name + " {";
- Array.prototype.forEach.call(rule.cssRules, function(rule) {
- cssText += " " + rule.keyText + " {" + rule.style.cssText + "}";
- });
- cssText += " }";
- return cssText;
- },
- scopeSelector: function(selector, scopeSelector, strict) {
- var r = [], parts = selector.split(",");
- parts.forEach(function(p) {
- p = p.trim();
- if (this.selectorNeedsScoping(p, scopeSelector)) {
- p = strict && !p.match(polyfillHostNoCombinator) ? this.applyStrictSelectorScope(p, scopeSelector) : this.applySelectorScope(p, scopeSelector);
- }
- r.push(p);
- }, this);
- return r.join(", ");
- },
- selectorNeedsScoping: function(selector, scopeSelector) {
- if (Array.isArray(scopeSelector)) {
- return true;
- }
- var re = this.makeScopeMatcher(scopeSelector);
- return !selector.match(re);
- },
- makeScopeMatcher: function(scopeSelector) {
- scopeSelector = scopeSelector.replace(/\[/g, "\\[").replace(/\]/g, "\\]");
- return new RegExp("^(" + scopeSelector + ")" + selectorReSuffix, "m");
- },
- applySelectorScope: function(selector, selectorScope) {
- return Array.isArray(selectorScope) ? this.applySelectorScopeList(selector, selectorScope) : this.applySimpleSelectorScope(selector, selectorScope);
- },
- applySelectorScopeList: function(selector, scopeSelectorList) {
- var r = [];
- for (var i = 0, s; s = scopeSelectorList[i]; i++) {
- r.push(this.applySimpleSelectorScope(selector, s));
- }
- return r.join(", ");
- },
- applySimpleSelectorScope: function(selector, scopeSelector) {
- if (selector.match(polyfillHostRe)) {
- selector = selector.replace(polyfillHostNoCombinator, scopeSelector);
- return selector.replace(polyfillHostRe, scopeSelector + " ");
- } else {
- return scopeSelector + " " + selector;
- }
- },
- applyStrictSelectorScope: function(selector, scopeSelector) {
- scopeSelector = scopeSelector.replace(/\[is=([^\]]*)\]/g, "$1");
- var splits = [ " ", ">", "+", "~" ], scoped = selector, attrName = "[" + scopeSelector + "]";
- splits.forEach(function(sep) {
- var parts = scoped.split(sep);
- scoped = parts.map(function(p) {
- var t = p.trim().replace(polyfillHostRe, "");
- if (t && splits.indexOf(t) < 0 && t.indexOf(attrName) < 0) {
- p = t.replace(/([^:]*)(:*)(.*)/, "$1" + attrName + "$2$3");
- }
- return p;
- }).join(sep);
- });
- return scoped;
- },
- insertPolyfillHostInCssText: function(selector) {
- return selector.replace(colonHostContextRe, polyfillHostContext).replace(colonHostRe, polyfillHost);
- },
- propertiesFromRule: function(rule) {
- var cssText = rule.style.cssText;
- if (rule.style.content && !rule.style.content.match(/['"]+|attr/)) {
- cssText = cssText.replace(/content:[^;]*;/g, "content: '" + rule.style.content + "';");
- }
- var style = rule.style;
- for (var i in style) {
- if (style[i] === "initial") {
- cssText += i + ": initial; ";
- }
- }
- return cssText;
- },
- replaceTextInStyles: function(styles, action) {
- if (styles && action) {
- if (!(styles instanceof Array)) {
- styles = [ styles ];
- }
- Array.prototype.forEach.call(styles, function(s) {
- s.textContent = action.call(this, s.textContent);
- }, this);
- }
- },
- addCssToDocument: function(cssText, name) {
- if (cssText.match("@import")) {
- addOwnSheet(cssText, name);
- } else {
- addCssToDocument(cssText);
- }
- }
- };
- var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
- var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
- function stylesToCssText(styles, preserveComments) {
- var cssText = "";
- Array.prototype.forEach.call(styles, function(s) {
- cssText += s.textContent + "\n\n";
- });
- if (!preserveComments) {
- cssText = cssText.replace(cssCommentRe, "");
- }
- return cssText;
- }
- function cssTextToStyle(cssText) {
- var style = document.createElement("style");
- style.textContent = cssText;
- return style;
- }
- function cssToRules(cssText) {
- var style = cssTextToStyle(cssText);
- document.head.appendChild(style);
- var rules = [];
- if (style.sheet) {
- try {
- rules = style.sheet.cssRules;
- } catch (e) {}
- } else {
- console.warn("sheet not found", style);
- }
- style.parentNode.removeChild(style);
- return rules;
- }
- var frame = document.createElement("iframe");
- frame.style.display = "none";
- function initFrame() {
- frame.initialized = true;
- document.body.appendChild(frame);
- var doc = frame.contentDocument;
- var base = doc.createElement("base");
- base.href = document.baseURI;
- doc.head.appendChild(base);
- }
- function inFrame(fn) {
- if (!frame.initialized) {
- initFrame();
- }
- document.body.appendChild(frame);
- fn(frame.contentDocument);
- document.body.removeChild(frame);
- }
- var isChrome = navigator.userAgent.match("Chrome");
- function withCssRules(cssText, callback) {
- if (!callback) {
- return;
- }
- var rules;
- if (cssText.match("@import") && isChrome) {
- var style = cssTextToStyle(cssText);
- inFrame(function(doc) {
- doc.head.appendChild(style.impl);
- rules = Array.prototype.slice.call(style.sheet.cssRules, 0);
- callback(rules);
- });
- } else {
- rules = cssToRules(cssText);
- callback(rules);
- }
- }
- function rulesToCss(cssRules) {
- for (var i = 0, css = []; i < cssRules.length; i++) {
- css.push(cssRules[i].cssText);
- }
- return css.join("\n\n");
- }
- function addCssToDocument(cssText) {
- if (cssText) {
- getSheet().appendChild(document.createTextNode(cssText));
- }
- }
- function addOwnSheet(cssText, name) {
- var style = cssTextToStyle(cssText);
- style.setAttribute(name, "");
- style.setAttribute(SHIMMED_ATTRIBUTE, "");
- document.head.appendChild(style);
- }
- var SHIM_ATTRIBUTE = "shim-shadowdom";
- var SHIMMED_ATTRIBUTE = "shim-shadowdom-css";
- var NO_SHIM_ATTRIBUTE = "no-shim";
- var sheet;
- function getSheet() {
- if (!sheet) {
- sheet = document.createElement("style");
- sheet.setAttribute(SHIMMED_ATTRIBUTE, "");
- sheet[SHIMMED_ATTRIBUTE] = true;
- }
- return sheet;
- }
- if (window.ShadowDOMPolyfill) {
- addCssToDocument("style { display: none !important; }\n");
- var doc = ShadowDOMPolyfill.wrap(document);
- var head = doc.querySelector("head");
- head.insertBefore(getSheet(), head.childNodes[0]);
- document.addEventListener("DOMContentLoaded", function() {
- var urlResolver = scope.urlResolver;
- if (window.HTMLImports && !HTMLImports.useNative) {
- var SHIM_SHEET_SELECTOR = "link[rel=stylesheet]" + "[" + SHIM_ATTRIBUTE + "]";
- var SHIM_STYLE_SELECTOR = "style[" + SHIM_ATTRIBUTE + "]";
- HTMLImports.importer.documentPreloadSelectors += "," + SHIM_SHEET_SELECTOR;
- HTMLImports.importer.importsPreloadSelectors += "," + SHIM_SHEET_SELECTOR;
- HTMLImports.parser.documentSelectors = [ HTMLImports.parser.documentSelectors, SHIM_SHEET_SELECTOR, SHIM_STYLE_SELECTOR ].join(",");
- var originalParseGeneric = HTMLImports.parser.parseGeneric;
- HTMLImports.parser.parseGeneric = function(elt) {
- if (elt[SHIMMED_ATTRIBUTE]) {
- return;
- }
- var style = elt.__importElement || elt;
- if (!style.hasAttribute(SHIM_ATTRIBUTE)) {
- originalParseGeneric.call(this, elt);
- return;
- }
- if (elt.__resource) {
- style = elt.ownerDocument.createElement("style");
- style.textContent = elt.__resource;
- }
- HTMLImports.path.resolveUrlsInStyle(style, elt.href);
- style.textContent = ShadowCSS.shimStyle(style);
- style.removeAttribute(SHIM_ATTRIBUTE, "");
- style.setAttribute(SHIMMED_ATTRIBUTE, "");
- style[SHIMMED_ATTRIBUTE] = true;
- if (style.parentNode !== head) {
- if (elt.parentNode === head) {
- head.replaceChild(style, elt);
- } else {
- this.addElementToDocument(style);
- }
- }
- style.__importParsed = true;
- this.markParsingComplete(elt);
- this.parseNext();
- };
- var hasResource = HTMLImports.parser.hasResource;
- HTMLImports.parser.hasResource = function(node) {
- if (node.localName === "link" && node.rel === "stylesheet" && node.hasAttribute(SHIM_ATTRIBUTE)) {
- return node.__resource;
- } else {
- return hasResource.call(this, node);
- }
- };
- }
- });
- }
- scope.ShadowCSS = ShadowCSS;
- })(window.WebComponents);
-}
-
-(function(scope) {
- if (window.ShadowDOMPolyfill) {
- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
- } else {
- window.wrap = window.unwrap = function(n) {
- return n;
- };
- }
-})(window.WebComponents);
-
-(function(scope) {
- "use strict";
- var hasWorkingUrl = false;
- if (!scope.forceJURL) {
- try {
- var u = new URL("b", "http://a");
- u.pathname = "c%20d";
- hasWorkingUrl = u.href === "http://a/c%20d";
- } catch (e) {}
- }
- if (hasWorkingUrl) return;
- var relative = Object.create(null);
- relative["ftp"] = 21;
- relative["file"] = 0;
- relative["gopher"] = 70;
- relative["http"] = 80;
- relative["https"] = 443;
- relative["ws"] = 80;
- relative["wss"] = 443;
- var relativePathDotMapping = Object.create(null);
- relativePathDotMapping["%2e"] = ".";
- relativePathDotMapping[".%2e"] = "..";
- relativePathDotMapping["%2e."] = "..";
- relativePathDotMapping["%2e%2e"] = "..";
- function isRelativeScheme(scheme) {
- return relative[scheme] !== undefined;
- }
- function invalid() {
- clear.call(this);
- this._isInvalid = true;
- }
- function IDNAToASCII(h) {
- if ("" == h) {
- invalid.call(this);
- }
- return h.toLowerCase();
- }
- function percentEscape(c) {
- var unicode = c.charCodeAt(0);
- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {
- return c;
- }
- return encodeURIComponent(c);
- }
- function percentEscapeQuery(c) {
- var unicode = c.charCodeAt(0);
- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {
- return c;
- }
- return encodeURIComponent(c);
- }
- var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
- function parse(input, stateOverride, base) {
- function err(message) {
- errors.push(message);
- }
- var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];
- loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
- var c = input[cursor];
- switch (state) {
- case "scheme start":
- if (c && ALPHA.test(c)) {
- buffer += c.toLowerCase();
- state = "scheme";
- } else if (!stateOverride) {
- buffer = "";
- state = "no scheme";
- continue;
- } else {
- err("Invalid scheme.");
- break loop;
- }
- break;
-
- case "scheme":
- if (c && ALPHANUMERIC.test(c)) {
- buffer += c.toLowerCase();
- } else if (":" == c) {
- this._scheme = buffer;
- buffer = "";
- if (stateOverride) {
- break loop;
- }
- if (isRelativeScheme(this._scheme)) {
- this._isRelative = true;
- }
- if ("file" == this._scheme) {
- state = "relative";
- } else if (this._isRelative && base && base._scheme == this._scheme) {
- state = "relative or authority";
- } else if (this._isRelative) {
- state = "authority first slash";
- } else {
- state = "scheme data";
- }
- } else if (!stateOverride) {
- buffer = "";
- cursor = 0;
- state = "no scheme";
- continue;
- } else if (EOF == c) {
- break loop;
- } else {
- err("Code point not allowed in scheme: " + c);
- break loop;
- }
- break;
-
- case "scheme data":
- if ("?" == c) {
- query = "?";
- state = "query";
- } else if ("#" == c) {
- this._fragment = "#";
- state = "fragment";
- } else {
- if (EOF != c && " " != c && "\n" != c && "\r" != c) {
- this._schemeData += percentEscape(c);
- }
- }
- break;
-
- case "no scheme":
- if (!base || !isRelativeScheme(base._scheme)) {
- err("Missing scheme.");
- invalid.call(this);
- } else {
- state = "relative";
- continue;
- }
- break;
-
- case "relative or authority":
- if ("/" == c && "/" == input[cursor + 1]) {
- state = "authority ignore slashes";
- } else {
- err("Expected /, got: " + c);
- state = "relative";
- continue;
- }
- break;
-
- case "relative":
- this._isRelative = true;
- if ("file" != this._scheme) this._scheme = base._scheme;
- if (EOF == c) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._query = base._query;
- break loop;
- } else if ("/" == c || "\\" == c) {
- if ("\\" == c) err("\\ is an invalid code point.");
- state = "relative slash";
- } else if ("?" == c) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._query = "?";
- state = "query";
- } else if ("#" == c) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._query = base._query;
- this._fragment = "#";
- state = "fragment";
- } else {
- var nextC = input[cursor + 1];
- var nextNextC = input[cursor + 2];
- if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {
- this._host = base._host;
- this._port = base._port;
- this._path = base._path.slice();
- this._path.pop();
- }
- state = "relative path";
- continue;
- }
- break;
-
- case "relative slash":
- if ("/" == c || "\\" == c) {
- if ("\\" == c) {
- err("\\ is an invalid code point.");
- }
- if ("file" == this._scheme) {
- state = "file host";
- } else {
- state = "authority ignore slashes";
- }
- } else {
- if ("file" != this._scheme) {
- this._host = base._host;
- this._port = base._port;
- }
- state = "relative path";
- continue;
- }
- break;
-
- case "authority first slash":
- if ("/" == c) {
- state = "authority second slash";
- } else {
- err("Expected '/', got: " + c);
- state = "authority ignore slashes";
- continue;
- }
- break;
-
- case "authority second slash":
- state = "authority ignore slashes";
- if ("/" != c) {
- err("Expected '/', got: " + c);
- continue;
- }
- break;
-
- case "authority ignore slashes":
- if ("/" != c && "\\" != c) {
- state = "authority";
- continue;
- } else {
- err("Expected authority, got: " + c);
- }
- break;
-
- case "authority":
- if ("@" == c) {
- if (seenAt) {
- err("@ already seen.");
- buffer += "%40";
- }
- seenAt = true;
- for (var i = 0; i < buffer.length; i++) {
- var cp = buffer[i];
- if (" " == cp || "\n" == cp || "\r" == cp) {
- err("Invalid whitespace in authority.");
- continue;
- }
- if (":" == cp && null === this._password) {
- this._password = "";
- continue;
- }
- var tempC = percentEscape(cp);
- null !== this._password ? this._password += tempC : this._username += tempC;
- }
- buffer = "";
- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
- cursor -= buffer.length;
- buffer = "";
- state = "host";
- continue;
- } else {
- buffer += c;
- }
- break;
-
- case "file host":
- if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
- if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {
- state = "relative path";
- } else if (buffer.length == 0) {
- state = "relative path start";
- } else {
- this._host = IDNAToASCII.call(this, buffer);
- buffer = "";
- state = "relative path start";
- }
- continue;
- } else if (" " == c || "\n" == c || "\r" == c) {
- err("Invalid whitespace in file host.");
- } else {
- buffer += c;
- }
- break;
-
- case "host":
- case "hostname":
- if (":" == c && !seenBracket) {
- this._host = IDNAToASCII.call(this, buffer);
- buffer = "";
- state = "port";
- if ("hostname" == stateOverride) {
- break loop;
- }
- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
- this._host = IDNAToASCII.call(this, buffer);
- buffer = "";
- state = "relative path start";
- if (stateOverride) {
- break loop;
- }
- continue;
- } else if (" " != c && "\n" != c && "\r" != c) {
- if ("[" == c) {
- seenBracket = true;
- } else if ("]" == c) {
- seenBracket = false;
- }
- buffer += c;
- } else {
- err("Invalid code point in host/hostname: " + c);
- }
- break;
-
- case "port":
- if (/[0-9]/.test(c)) {
- buffer += c;
- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {
- if ("" != buffer) {
- var temp = parseInt(buffer, 10);
- if (temp != relative[this._scheme]) {
- this._port = temp + "";
- }
- buffer = "";
- }
- if (stateOverride) {
- break loop;
- }
- state = "relative path start";
- continue;
- } else if (" " == c || "\n" == c || "\r" == c) {
- err("Invalid code point in port: " + c);
- } else {
- invalid.call(this);
- }
- break;
-
- case "relative path start":
- if ("\\" == c) err("'\\' not allowed in path.");
- state = "relative path";
- if ("/" != c && "\\" != c) {
- continue;
- }
- break;
-
- case "relative path":
- if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {
- if ("\\" == c) {
- err("\\ not allowed in relative path.");
- }
- var tmp;
- if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
- buffer = tmp;
- }
- if (".." == buffer) {
- this._path.pop();
- if ("/" != c && "\\" != c) {
- this._path.push("");
- }
- } else if ("." == buffer && "/" != c && "\\" != c) {
- this._path.push("");
- } else if ("." != buffer) {
- if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {
- buffer = buffer[0] + ":";
- }
- this._path.push(buffer);
- }
- buffer = "";
- if ("?" == c) {
- this._query = "?";
- state = "query";
- } else if ("#" == c) {
- this._fragment = "#";
- state = "fragment";
- }
- } else if (" " != c && "\n" != c && "\r" != c) {
- buffer += percentEscape(c);
- }
- break;
-
- case "query":
- if (!stateOverride && "#" == c) {
- this._fragment = "#";
- state = "fragment";
- } else if (EOF != c && " " != c && "\n" != c && "\r" != c) {
- this._query += percentEscapeQuery(c);
- }
- break;
-
- case "fragment":
- if (EOF != c && " " != c && "\n" != c && "\r" != c) {
- this._fragment += c;
- }
- break;
- }
- cursor++;
- }
- }
- function clear() {
- this._scheme = "";
- this._schemeData = "";
- this._username = "";
- this._password = null;
- this._host = "";
- this._port = "";
- this._path = [];
- this._query = "";
- this._fragment = "";
- this._isInvalid = false;
- this._isRelative = false;
- }
- function jURL(url, base) {
- if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
- this._url = url;
- clear.call(this);
- var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");
- parse.call(this, input, null, base);
- }
- jURL.prototype = {
- toString: function() {
- return this.href;
- },
- get href() {
- if (this._isInvalid) return this._url;
- var authority = "";
- if ("" != this._username || null != this._password) {
- authority = this._username + (null != this._password ? ":" + this._password : "") + "@";
- }
- return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;
- },
- set href(href) {
- clear.call(this);
- parse.call(this, href);
- },
- get protocol() {
- return this._scheme + ":";
- },
- set protocol(protocol) {
- if (this._isInvalid) return;
- parse.call(this, protocol + ":", "scheme start");
- },
- get host() {
- return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;
- },
- set host(host) {
- if (this._isInvalid || !this._isRelative) return;
- parse.call(this, host, "host");
- },
- get hostname() {
- return this._host;
- },
- set hostname(hostname) {
- if (this._isInvalid || !this._isRelative) return;
- parse.call(this, hostname, "hostname");
- },
- get port() {
- return this._port;
- },
- set port(port) {
- if (this._isInvalid || !this._isRelative) return;
- parse.call(this, port, "port");
- },
- get pathname() {
- return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;
- },
- set pathname(pathname) {
- if (this._isInvalid || !this._isRelative) return;
- this._path = [];
- parse.call(this, pathname, "relative path start");
- },
- get search() {
- return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;
- },
- set search(search) {
- if (this._isInvalid || !this._isRelative) return;
- this._query = "?";
- if ("?" == search[0]) search = search.slice(1);
- parse.call(this, search, "query");
- },
- get hash() {
- return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;
- },
- set hash(hash) {
- if (this._isInvalid) return;
- this._fragment = "#";
- if ("#" == hash[0]) hash = hash.slice(1);
- parse.call(this, hash, "fragment");
- },
- get origin() {
- var host;
- if (this._isInvalid || !this._scheme) {
- return "";
- }
- switch (this._scheme) {
- case "data":
- case "file":
- case "javascript":
- case "mailto":
- return "null";
- }
- host = this.host;
- if (!host) {
- return "";
- }
- return this._scheme + "://" + host;
- }
- };
- var OriginalURL = scope.URL;
- if (OriginalURL) {
- jURL.createObjectURL = function(blob) {
- return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
- };
- jURL.revokeObjectURL = function(url) {
- OriginalURL.revokeObjectURL(url);
- };
- }
- scope.URL = jURL;
-})(this);
-
-(function(global) {
- var registrationsTable = new WeakMap();
- var setImmediate;
- if (/Trident|Edge/.test(navigator.userAgent)) {
- setImmediate = setTimeout;
- } else if (window.setImmediate) {
- setImmediate = window.setImmediate;
- } else {
- var setImmediateQueue = [];
- var sentinel = String(Math.random());
- window.addEventListener("message", function(e) {
- if (e.data === sentinel) {
- var queue = setImmediateQueue;
- setImmediateQueue = [];
- queue.forEach(function(func) {
- func();
- });
- }
- });
- setImmediate = function(func) {
- setImmediateQueue.push(func);
- window.postMessage(sentinel, "*");
- };
- }
- var isScheduled = false;
- var scheduledObservers = [];
- function scheduleCallback(observer) {
- scheduledObservers.push(observer);
- if (!isScheduled) {
- isScheduled = true;
- setImmediate(dispatchCallbacks);
- }
- }
- function wrapIfNeeded(node) {
- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
- }
- function dispatchCallbacks() {
- isScheduled = false;
- var observers = scheduledObservers;
- scheduledObservers = [];
- observers.sort(function(o1, o2) {
- return o1.uid_ - o2.uid_;
- });
- var anyNonEmpty = false;
- observers.forEach(function(observer) {
- var queue = observer.takeRecords();
- removeTransientObserversFor(observer);
- if (queue.length) {
- observer.callback_(queue, observer);
- anyNonEmpty = true;
- }
- });
- if (anyNonEmpty) dispatchCallbacks();
- }
- function removeTransientObserversFor(observer) {
- observer.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- if (!registrations) return;
- registrations.forEach(function(registration) {
- if (registration.observer === observer) registration.removeTransientObservers();
- });
- });
- }
- function forEachAncestorAndObserverEnqueueRecord(target, callback) {
- for (var node = target; node; node = node.parentNode) {
- var registrations = registrationsTable.get(node);
- if (registrations) {
- for (var j = 0; j < registrations.length; j++) {
- var registration = registrations[j];
- var options = registration.options;
- if (node !== target && !options.subtree) continue;
- var record = callback(options);
- if (record) registration.enqueue(record);
- }
- }
- }
- }
- var uidCounter = 0;
- function JsMutationObserver(callback) {
- this.callback_ = callback;
- this.nodes_ = [];
- this.records_ = [];
- this.uid_ = ++uidCounter;
- }
- JsMutationObserver.prototype = {
- observe: function(target, options) {
- target = wrapIfNeeded(target);
- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
- throw new SyntaxError();
- }
- var registrations = registrationsTable.get(target);
- if (!registrations) registrationsTable.set(target, registrations = []);
- var registration;
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i].observer === this) {
- registration = registrations[i];
- registration.removeListeners();
- registration.options = options;
- break;
- }
- }
- if (!registration) {
- registration = new Registration(this, target, options);
- registrations.push(registration);
- this.nodes_.push(target);
- }
- registration.addListeners();
- },
- disconnect: function() {
- this.nodes_.forEach(function(node) {
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- var registration = registrations[i];
- if (registration.observer === this) {
- registration.removeListeners();
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- this.records_ = [];
- },
- takeRecords: function() {
- var copyOfRecords = this.records_;
- this.records_ = [];
- return copyOfRecords;
- }
- };
- function MutationRecord(type, target) {
- this.type = type;
- this.target = target;
- this.addedNodes = [];
- this.removedNodes = [];
- this.previousSibling = null;
- this.nextSibling = null;
- this.attributeName = null;
- this.attributeNamespace = null;
- this.oldValue = null;
- }
- function copyMutationRecord(original) {
- var record = new MutationRecord(original.type, original.target);
- record.addedNodes = original.addedNodes.slice();
- record.removedNodes = original.removedNodes.slice();
- record.previousSibling = original.previousSibling;
- record.nextSibling = original.nextSibling;
- record.attributeName = original.attributeName;
- record.attributeNamespace = original.attributeNamespace;
- record.oldValue = original.oldValue;
- return record;
- }
- var currentRecord, recordWithOldValue;
- function getRecord(type, target) {
- return currentRecord = new MutationRecord(type, target);
- }
- function getRecordWithOldValue(oldValue) {
- if (recordWithOldValue) return recordWithOldValue;
- recordWithOldValue = copyMutationRecord(currentRecord);
- recordWithOldValue.oldValue = oldValue;
- return recordWithOldValue;
- }
- function clearRecords() {
- currentRecord = recordWithOldValue = undefined;
- }
- function recordRepresentsCurrentMutation(record) {
- return record === recordWithOldValue || record === currentRecord;
- }
- function selectRecord(lastRecord, newRecord) {
- if (lastRecord === newRecord) return lastRecord;
- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
- return null;
- }
- function Registration(observer, target, options) {
- this.observer = observer;
- this.target = target;
- this.options = options;
- this.transientObservedNodes = [];
- }
- Registration.prototype = {
- enqueue: function(record) {
- var records = this.observer.records_;
- var length = records.length;
- if (records.length > 0) {
- var lastRecord = records[length - 1];
- var recordToReplaceLast = selectRecord(lastRecord, record);
- if (recordToReplaceLast) {
- records[length - 1] = recordToReplaceLast;
- return;
- }
- } else {
- scheduleCallback(this.observer);
- }
- records[length] = record;
- },
- addListeners: function() {
- this.addListeners_(this.target);
- },
- addListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
- },
- removeListeners: function() {
- this.removeListeners_(this.target);
- },
- removeListeners_: function(node) {
- var options = this.options;
- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
- },
- addTransientObserver: function(node) {
- if (node === this.target) return;
- this.addListeners_(node);
- this.transientObservedNodes.push(node);
- var registrations = registrationsTable.get(node);
- if (!registrations) registrationsTable.set(node, registrations = []);
- registrations.push(this);
- },
- removeTransientObservers: function() {
- var transientObservedNodes = this.transientObservedNodes;
- this.transientObservedNodes = [];
- transientObservedNodes.forEach(function(node) {
- this.removeListeners_(node);
- var registrations = registrationsTable.get(node);
- for (var i = 0; i < registrations.length; i++) {
- if (registrations[i] === this) {
- registrations.splice(i, 1);
- break;
- }
- }
- }, this);
- },
- handleEvent: function(e) {
- e.stopImmediatePropagation();
- switch (e.type) {
- case "DOMAttrModified":
- var name = e.attrName;
- var namespace = e.relatedNode.namespaceURI;
- var target = e.target;
- var record = new getRecord("attributes", target);
- record.attributeName = name;
- record.attributeNamespace = namespace;
- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.attributes) return;
- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
- return;
- }
- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMCharacterDataModified":
- var target = e.target;
- var record = getRecord("characterData", target);
- var oldValue = e.prevValue;
- forEachAncestorAndObserverEnqueueRecord(target, function(options) {
- if (!options.characterData) return;
- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
- return record;
- });
- break;
-
- case "DOMNodeRemoved":
- this.addTransientObserver(e.target);
-
- case "DOMNodeInserted":
- var changedNode = e.target;
- var addedNodes, removedNodes;
- if (e.type === "DOMNodeInserted") {
- addedNodes = [ changedNode ];
- removedNodes = [];
- } else {
- addedNodes = [];
- removedNodes = [ changedNode ];
- }
- var previousSibling = changedNode.previousSibling;
- var nextSibling = changedNode.nextSibling;
- var record = getRecord("childList", e.target.parentNode);
- record.addedNodes = addedNodes;
- record.removedNodes = removedNodes;
- record.previousSibling = previousSibling;
- record.nextSibling = nextSibling;
- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
- if (!options.childList) return;
- return record;
- });
- }
- clearRecords();
- }
- };
- global.JsMutationObserver = JsMutationObserver;
- if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
-})(this);
-
-window.HTMLImports = window.HTMLImports || {
- flags: {}
-};
-
-(function(scope) {
- var IMPORT_LINK_TYPE = "import";
- var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
- var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
- var wrap = function(node) {
- return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
- };
- var rootDocument = wrap(document);
- var currentScriptDescriptor = {
- get: function() {
- var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
- return wrap(script);
- },
- configurable: true
- };
- Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
- Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
- var isIE = /Trident|Edge/.test(navigator.userAgent);
- function whenReady(callback, doc) {
- doc = doc || rootDocument;
- whenDocumentReady(function() {
- watchImportsLoad(callback, doc);
- }, doc);
- }
- var requiredReadyState = isIE ? "complete" : "interactive";
- var READY_EVENT = "readystatechange";
- function isDocumentReady(doc) {
- return doc.readyState === "complete" || doc.readyState === requiredReadyState;
- }
- function whenDocumentReady(callback, doc) {
- if (!isDocumentReady(doc)) {
- var checkReady = function() {
- if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {
- doc.removeEventListener(READY_EVENT, checkReady);
- whenDocumentReady(callback, doc);
- }
- };
- doc.addEventListener(READY_EVENT, checkReady);
- } else if (callback) {
- callback();
- }
- }
- function markTargetLoaded(event) {
- event.target.__loaded = true;
- }
- function watchImportsLoad(callback, doc) {
- var imports = doc.querySelectorAll("link[rel=import]");
- var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
- function checkDone() {
- if (parsedCount == importCount && callback) {
- callback({
- allImports: imports,
- loadedImports: newImports,
- errorImports: errorImports
- });
- }
- }
- function loadedImport(e) {
- markTargetLoaded(e);
- newImports.push(this);
- parsedCount++;
- checkDone();
- }
- function errorLoadingImport(e) {
- errorImports.push(this);
- parsedCount++;
- checkDone();
- }
- if (importCount) {
- for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
- if (isImportLoaded(imp)) {
- parsedCount++;
- checkDone();
- } else {
- imp.addEventListener("load", loadedImport);
- imp.addEventListener("error", errorLoadingImport);
- }
- }
- } else {
- checkDone();
- }
- }
- function isImportLoaded(link) {
- return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;
- }
- if (useNative) {
- new MutationObserver(function(mxns) {
- for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {
- if (m.addedNodes) {
- handleImports(m.addedNodes);
- }
- }
- }).observe(document.head, {
- childList: true
- });
- function handleImports(nodes) {
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- if (isImport(n)) {
- handleImport(n);
- }
- }
- }
- function isImport(element) {
- return element.localName === "link" && element.rel === "import";
- }
- function handleImport(element) {
- var loaded = element.import;
- if (loaded) {
- markTargetLoaded({
- target: element
- });
- } else {
- element.addEventListener("load", markTargetLoaded);
- element.addEventListener("error", markTargetLoaded);
- }
- }
- (function() {
- if (document.readyState === "loading") {
- var imports = document.querySelectorAll("link[rel=import]");
- for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {
- handleImport(imp);
- }
- }
- })();
- }
- whenReady(function(detail) {
- HTMLImports.ready = true;
- HTMLImports.readyTime = new Date().getTime();
- var evt = rootDocument.createEvent("CustomEvent");
- evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
- rootDocument.dispatchEvent(evt);
- });
- scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
- scope.useNative = useNative;
- scope.rootDocument = rootDocument;
- scope.whenReady = whenReady;
- scope.isIE = isIE;
-})(HTMLImports);
-
-(function(scope) {
- var modules = [];
- var addModule = function(module) {
- modules.push(module);
- };
- var initializeModules = function() {
- modules.forEach(function(module) {
- module(scope);
- });
- };
- scope.addModule = addModule;
- scope.initializeModules = initializeModules;
-})(HTMLImports);
-
-HTMLImports.addModule(function(scope) {
- var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
- var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
- var path = {
- resolveUrlsInStyle: function(style, linkUrl) {
- var doc = style.ownerDocument;
- var resolver = doc.createElement("a");
- style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
- return style;
- },
- resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
- var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
- r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
- return r;
- },
- replaceUrls: function(text, urlObj, linkUrl, regexp) {
- return text.replace(regexp, function(m, pre, url, post) {
- var urlPath = url.replace(/["']/g, "");
- if (linkUrl) {
- urlPath = new URL(urlPath, linkUrl).href;
- }
- urlObj.href = urlPath;
- urlPath = urlObj.href;
- return pre + "'" + urlPath + "'" + post;
- });
- }
- };
- scope.path = path;
-});
-
-HTMLImports.addModule(function(scope) {
- var xhr = {
- async: true,
- ok: function(request) {
- return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
- },
- load: function(url, next, nextContext) {
- var request = new XMLHttpRequest();
- if (scope.flags.debug || scope.flags.bust) {
- url += "?" + Math.random();
- }
- request.open("GET", url, xhr.async);
- request.addEventListener("readystatechange", function(e) {
- if (request.readyState === 4) {
- var locationHeader = request.getResponseHeader("Location");
- var redirectedUrl = null;
- if (locationHeader) {
- var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
- }
- next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
- }
- });
- request.send();
- return request;
- },
- loadDocument: function(url, next, nextContext) {
- this.load(url, next, nextContext).responseType = "document";
- }
- };
- scope.xhr = xhr;
-});
-
-HTMLImports.addModule(function(scope) {
- var xhr = scope.xhr;
- var flags = scope.flags;
- var Loader = function(onLoad, onComplete) {
- this.cache = {};
- this.onload = onLoad;
- this.oncomplete = onComplete;
- this.inflight = 0;
- this.pending = {};
- };
- Loader.prototype = {
- addNodes: function(nodes) {
- this.inflight += nodes.length;
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- this.require(n);
- }
- this.checkDone();
- },
- addNode: function(node) {
- this.inflight++;
- this.require(node);
- this.checkDone();
- },
- require: function(elt) {
- var url = elt.src || elt.href;
- elt.__nodeUrl = url;
- if (!this.dedupe(url, elt)) {
- this.fetch(url, elt);
- }
- },
- dedupe: function(url, elt) {
- if (this.pending[url]) {
- this.pending[url].push(elt);
- return true;
- }
- var resource;
- if (this.cache[url]) {
- this.onload(url, elt, this.cache[url]);
- this.tail();
- return true;
- }
- this.pending[url] = [ elt ];
- return false;
- },
- fetch: function(url, elt) {
- flags.load && console.log("fetch", url, elt);
- if (!url) {
- setTimeout(function() {
- this.receive(url, elt, {
- error: "href must be specified"
- }, null);
- }.bind(this), 0);
- } else if (url.match(/^data:/)) {
- var pieces = url.split(",");
- var header = pieces[0];
- var body = pieces[1];
- if (header.indexOf(";base64") > -1) {
- body = atob(body);
- } else {
- body = decodeURIComponent(body);
- }
- setTimeout(function() {
- this.receive(url, elt, null, body);
- }.bind(this), 0);
- } else {
- var receiveXhr = function(err, resource, redirectedUrl) {
- this.receive(url, elt, err, resource, redirectedUrl);
- }.bind(this);
- xhr.load(url, receiveXhr);
- }
- },
- receive: function(url, elt, err, resource, redirectedUrl) {
- this.cache[url] = resource;
- var $p = this.pending[url];
- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
- this.onload(url, p, resource, err, redirectedUrl);
- this.tail();
- }
- this.pending[url] = null;
- },
- tail: function() {
- --this.inflight;
- this.checkDone();
- },
- checkDone: function() {
- if (!this.inflight) {
- this.oncomplete();
- }
- }
- };
- scope.Loader = Loader;
-});
-
-HTMLImports.addModule(function(scope) {
- var Observer = function(addCallback) {
- this.addCallback = addCallback;
- this.mo = new MutationObserver(this.handler.bind(this));
- };
- Observer.prototype = {
- handler: function(mutations) {
- for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {
- if (m.type === "childList" && m.addedNodes.length) {
- this.addedNodes(m.addedNodes);
- }
- }
- },
- addedNodes: function(nodes) {
- if (this.addCallback) {
- this.addCallback(nodes);
- }
- for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {
- if (n.children && n.children.length) {
- this.addedNodes(n.children);
- }
- }
- },
- observe: function(root) {
- this.mo.observe(root, {
- childList: true,
- subtree: true
- });
- }
- };
- scope.Observer = Observer;
-});
-
-HTMLImports.addModule(function(scope) {
- var path = scope.path;
- var rootDocument = scope.rootDocument;
- var flags = scope.flags;
- var isIE = scope.isIE;
- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
- var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
- var importParser = {
- documentSelectors: IMPORT_SELECTOR,
- importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="text/javascript"]' ].join(","),
- map: {
- link: "parseLink",
- script: "parseScript",
- style: "parseStyle"
- },
- dynamicElements: [],
- parseNext: function() {
- var next = this.nextToParse();
- if (next) {
- this.parse(next);
- }
- },
- parse: function(elt) {
- if (this.isParsed(elt)) {
- flags.parse && console.log("[%s] is already parsed", elt.localName);
- return;
- }
- var fn = this[this.map[elt.localName]];
- if (fn) {
- this.markParsing(elt);
- fn.call(this, elt);
- }
- },
- parseDynamic: function(elt, quiet) {
- this.dynamicElements.push(elt);
- if (!quiet) {
- this.parseNext();
- }
- },
- markParsing: function(elt) {
- flags.parse && console.log("parsing", elt);
- this.parsingElement = elt;
- },
- markParsingComplete: function(elt) {
- elt.__importParsed = true;
- this.markDynamicParsingComplete(elt);
- if (elt.__importElement) {
- elt.__importElement.__importParsed = true;
- this.markDynamicParsingComplete(elt.__importElement);
- }
- this.parsingElement = null;
- flags.parse && console.log("completed", elt);
- },
- markDynamicParsingComplete: function(elt) {
- var i = this.dynamicElements.indexOf(elt);
- if (i >= 0) {
- this.dynamicElements.splice(i, 1);
- }
- },
- parseImport: function(elt) {
- if (HTMLImports.__importsParsingHook) {
- HTMLImports.__importsParsingHook(elt);
- }
- if (elt.import) {
- elt.import.__importParsed = true;
- }
- this.markParsingComplete(elt);
- if (elt.__resource && !elt.__error) {
- elt.dispatchEvent(new CustomEvent("load", {
- bubbles: false
- }));
- } else {
- elt.dispatchEvent(new CustomEvent("error", {
- bubbles: false
- }));
- }
- if (elt.__pending) {
- var fn;
- while (elt.__pending.length) {
- fn = elt.__pending.shift();
- if (fn) {
- fn({
- target: elt
- });
- }
- }
- }
- this.parseNext();
- },
- parseLink: function(linkElt) {
- if (nodeIsImport(linkElt)) {
- this.parseImport(linkElt);
- } else {
- linkElt.href = linkElt.href;
- this.parseGeneric(linkElt);
- }
- },
- parseStyle: function(elt) {
- var src = elt;
- elt = cloneStyle(elt);
- src.__appliedElement = elt;
- elt.__importElement = src;
- this.parseGeneric(elt);
- },
- parseGeneric: function(elt) {
- this.trackElement(elt);
- this.addElementToDocument(elt);
- },
- rootImportForElement: function(elt) {
- var n = elt;
- while (n.ownerDocument.__importLink) {
- n = n.ownerDocument.__importLink;
- }
- return n;
- },
- addElementToDocument: function(elt) {
- var port = this.rootImportForElement(elt.__importElement || elt);
- port.parentNode.insertBefore(elt, port);
- },
- trackElement: function(elt, callback) {
- var self = this;
- var done = function(e) {
- if (callback) {
- callback(e);
- }
- self.markParsingComplete(elt);
- self.parseNext();
- };
- elt.addEventListener("load", done);
- elt.addEventListener("error", done);
- if (isIE && elt.localName === "style") {
- var fakeLoad = false;
- if (elt.textContent.indexOf("@import") == -1) {
- fakeLoad = true;
- } else if (elt.sheet) {
- fakeLoad = true;
- var csr = elt.sheet.cssRules;
- var len = csr ? csr.length : 0;
- for (var i = 0, r; i < len && (r = csr[i]); i++) {
- if (r.type === CSSRule.IMPORT_RULE) {
- fakeLoad = fakeLoad && Boolean(r.styleSheet);
- }
- }
- }
- if (fakeLoad) {
- elt.dispatchEvent(new CustomEvent("load", {
- bubbles: false
- }));
- }
- }
- },
- parseScript: function(scriptElt) {
- var script = document.createElement("script");
- script.__importElement = scriptElt;
- script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
- scope.currentScript = scriptElt;
- this.trackElement(script, function(e) {
- script.parentNode.removeChild(script);
- scope.currentScript = null;
- });
- this.addElementToDocument(script);
- },
- nextToParse: function() {
- this._mayParse = [];
- return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());
- },
- nextToParseInDoc: function(doc, link) {
- if (doc && this._mayParse.indexOf(doc) < 0) {
- this._mayParse.push(doc);
- var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
- for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
- if (!this.isParsed(n)) {
- if (this.hasResource(n)) {
- return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
- } else {
- return;
- }
- }
- }
- }
- return link;
- },
- nextToParseDynamic: function() {
- return this.dynamicElements[0];
- },
- parseSelectorsForNode: function(node) {
- var doc = node.ownerDocument || node;
- return doc === rootDocument ? this.documentSelectors : this.importsSelectors;
- },
- isParsed: function(node) {
- return node.__importParsed;
- },
- needsDynamicParsing: function(elt) {
- return this.dynamicElements.indexOf(elt) >= 0;
- },
- hasResource: function(node) {
- if (nodeIsImport(node) && node.import === undefined) {
- return false;
- }
- return true;
- }
- };
- function nodeIsImport(elt) {
- return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;
- }
- function generateScriptDataUrl(script) {
- var scriptContent = generateScriptContent(script);
- return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);
- }
- function generateScriptContent(script) {
- return script.textContent + generateSourceMapHint(script);
- }
- function generateSourceMapHint(script) {
- var owner = script.ownerDocument;
- owner.__importedScripts = owner.__importedScripts || 0;
- var moniker = script.ownerDocument.baseURI;
- var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";
- owner.__importedScripts++;
- return "\n//# sourceURL=" + moniker + num + ".js\n";
- }
- function cloneStyle(style) {
- var clone = style.ownerDocument.createElement("style");
- clone.textContent = style.textContent;
- path.resolveUrlsInStyle(clone);
- return clone;
- }
- scope.parser = importParser;
- scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
-});
-
-HTMLImports.addModule(function(scope) {
- var flags = scope.flags;
- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
- var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
- var rootDocument = scope.rootDocument;
- var Loader = scope.Loader;
- var Observer = scope.Observer;
- var parser = scope.parser;
- var importer = {
- documents: {},
- documentPreloadSelectors: IMPORT_SELECTOR,
- importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),
- loadNode: function(node) {
- importLoader.addNode(node);
- },
- loadSubtree: function(parent) {
- var nodes = this.marshalNodes(parent);
- importLoader.addNodes(nodes);
- },
- marshalNodes: function(parent) {
- return parent.querySelectorAll(this.loadSelectorsForNode(parent));
- },
- loadSelectorsForNode: function(node) {
- var doc = node.ownerDocument || node;
- return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;
- },
- loaded: function(url, elt, resource, err, redirectedUrl) {
- flags.load && console.log("loaded", url, elt);
- elt.__resource = resource;
- elt.__error = err;
- if (isImportLink(elt)) {
- var doc = this.documents[url];
- if (doc === undefined) {
- doc = err ? null : makeDocument(resource, redirectedUrl || url);
- if (doc) {
- doc.__importLink = elt;
- this.bootDocument(doc);
- }
- this.documents[url] = doc;
- }
- elt.import = doc;
- }
- parser.parseNext();
- },
- bootDocument: function(doc) {
- this.loadSubtree(doc);
- this.observer.observe(doc);
- parser.parseNext();
- },
- loadedAll: function() {
- parser.parseNext();
- }
- };
- var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));
- importer.observer = new Observer();
- function isImportLink(elt) {
- return isLinkRel(elt, IMPORT_LINK_TYPE);
- }
- function isLinkRel(elt, rel) {
- return elt.localName === "link" && elt.getAttribute("rel") === rel;
- }
- function hasBaseURIAccessor(doc) {
- return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
- }
- function makeDocument(resource, url) {
- var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
- doc._URL = url;
- var base = doc.createElement("base");
- base.setAttribute("href", url);
- if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
- Object.defineProperty(doc, "baseURI", {
- value: url
- });
- }
- var meta = doc.createElement("meta");
- meta.setAttribute("charset", "utf-8");
- doc.head.appendChild(meta);
- doc.head.appendChild(base);
- doc.body.innerHTML = resource;
- if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
- HTMLTemplateElement.bootstrap(doc);
- }
- return doc;
- }
- if (!document.baseURI) {
- var baseURIDescriptor = {
- get: function() {
- var base = document.querySelector("base");
- return base ? base.href : window.location.href;
- },
- configurable: true
- };
- Object.defineProperty(document, "baseURI", baseURIDescriptor);
- Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);
- }
- scope.importer = importer;
- scope.importLoader = importLoader;
-});
-
-HTMLImports.addModule(function(scope) {
- var parser = scope.parser;
- var importer = scope.importer;
- var dynamic = {
- added: function(nodes) {
- var owner, parsed, loading;
- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
- if (!owner) {
- owner = n.ownerDocument;
- parsed = parser.isParsed(owner);
- }
- loading = this.shouldLoadNode(n);
- if (loading) {
- importer.loadNode(n);
- }
- if (this.shouldParseNode(n) && parsed) {
- parser.parseDynamic(n, loading);
- }
- }
- },
- shouldLoadNode: function(node) {
- return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));
- },
- shouldParseNode: function(node) {
- return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));
- }
- };
- importer.observer.addCallback = dynamic.added.bind(dynamic);
- var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;
-});
-
-(function(scope) {
- var initializeModules = scope.initializeModules;
- var isIE = scope.isIE;
- if (scope.useNative) {
- return;
- }
- if (isIE && typeof window.CustomEvent !== "function") {
- window.CustomEvent = function(inType, params) {
- params = params || {};
- var e = document.createEvent("CustomEvent");
- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
- return e;
- };
- window.CustomEvent.prototype = window.Event.prototype;
- }
- initializeModules();
- var rootDocument = scope.rootDocument;
- function bootstrap() {
- HTMLImports.importer.bootDocument(rootDocument);
- }
- if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
- bootstrap();
- } else {
- document.addEventListener("DOMContentLoaded", bootstrap);
- }
-})(HTMLImports);
-
-window.CustomElements = window.CustomElements || {
- flags: {}
-};
-
-(function(scope) {
- var flags = scope.flags;
- var modules = [];
- var addModule = function(module) {
- modules.push(module);
- };
- var initializeModules = function() {
- modules.forEach(function(module) {
- module(scope);
- });
- };
- scope.addModule = addModule;
- scope.initializeModules = initializeModules;
- scope.hasNative = Boolean(document.registerElement);
- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
-})(CustomElements);
-
-CustomElements.addModule(function(scope) {
- var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
- function forSubtree(node, cb) {
- findAllElements(node, function(e) {
- if (cb(e)) {
- return true;
- }
- forRoots(e, cb);
- });
- forRoots(node, cb);
- }
- function findAllElements(node, find, data) {
- var e = node.firstElementChild;
- if (!e) {
- e = node.firstChild;
- while (e && e.nodeType !== Node.ELEMENT_NODE) {
- e = e.nextSibling;
- }
- }
- while (e) {
- if (find(e, data) !== true) {
- findAllElements(e, find, data);
- }
- e = e.nextElementSibling;
- }
- return null;
- }
- function forRoots(node, cb) {
- var root = node.shadowRoot;
- while (root) {
- forSubtree(root, cb);
- root = root.olderShadowRoot;
- }
- }
- function forDocumentTree(doc, cb) {
- _forDocumentTree(doc, cb, []);
- }
- function _forDocumentTree(doc, cb, processingDocuments) {
- doc = wrap(doc);
- if (processingDocuments.indexOf(doc) >= 0) {
- return;
- }
- processingDocuments.push(doc);
- var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
- for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
- if (n.import) {
- _forDocumentTree(n.import, cb, processingDocuments);
- }
- }
- cb(doc);
- }
- scope.forDocumentTree = forDocumentTree;
- scope.forSubtree = forSubtree;
-});
-
-CustomElements.addModule(function(scope) {
- var flags = scope.flags;
- var forSubtree = scope.forSubtree;
- var forDocumentTree = scope.forDocumentTree;
- function addedNode(node) {
- return added(node) || addedSubtree(node);
- }
- function added(node) {
- if (scope.upgrade(node)) {
- return true;
- }
- attached(node);
- }
- function addedSubtree(node) {
- forSubtree(node, function(e) {
- if (added(e)) {
- return true;
- }
- });
- }
- function attachedNode(node) {
- attached(node);
- if (inDocument(node)) {
- forSubtree(node, function(e) {
- attached(e);
- });
- }
- }
- var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
- scope.hasPolyfillMutations = hasPolyfillMutations;
- var isPendingMutations = false;
- var pendingMutations = [];
- function deferMutation(fn) {
- pendingMutations.push(fn);
- if (!isPendingMutations) {
- isPendingMutations = true;
- setTimeout(takeMutations);
- }
- }
- function takeMutations() {
- isPendingMutations = false;
- var $p = pendingMutations;
- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
- p();
- }
- pendingMutations = [];
- }
- function attached(element) {
- if (hasPolyfillMutations) {
- deferMutation(function() {
- _attached(element);
- });
- } else {
- _attached(element);
- }
- }
- function _attached(element) {
- if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
- if (!element.__attached && inDocument(element)) {
- element.__attached = true;
- if (element.attachedCallback) {
- element.attachedCallback();
- }
- }
- }
- }
- function detachedNode(node) {
- detached(node);
- forSubtree(node, function(e) {
- detached(e);
- });
- }
- function detached(element) {
- if (hasPolyfillMutations) {
- deferMutation(function() {
- _detached(element);
- });
- } else {
- _detached(element);
- }
- }
- function _detached(element) {
- if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
- if (element.__attached && !inDocument(element)) {
- element.__attached = false;
- if (element.detachedCallback) {
- element.detachedCallback();
- }
- }
- }
- }
- function inDocument(element) {
- var p = element;
- var doc = wrap(document);
- while (p) {
- if (p == doc) {
- return true;
- }
- p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
- }
- }
- function watchShadow(node) {
- if (node.shadowRoot && !node.shadowRoot.__watched) {
- flags.dom && console.log("watching shadow-root for: ", node.localName);
- var root = node.shadowRoot;
- while (root) {
- observe(root);
- root = root.olderShadowRoot;
- }
- }
- }
- function handler(mutations) {
- if (flags.dom) {
- var mx = mutations[0];
- if (mx && mx.type === "childList" && mx.addedNodes) {
- if (mx.addedNodes) {
- var d = mx.addedNodes[0];
- while (d && d !== document && !d.host) {
- d = d.parentNode;
- }
- var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
- u = u.split("/?").shift().split("/").pop();
- }
- }
- console.group("mutations (%d) [%s]", mutations.length, u || "");
- }
- mutations.forEach(function(mx) {
- if (mx.type === "childList") {
- forEach(mx.addedNodes, function(n) {
- if (!n.localName) {
- return;
- }
- addedNode(n);
- });
- forEach(mx.removedNodes, function(n) {
- if (!n.localName) {
- return;
- }
- detachedNode(n);
- });
- }
- });
- flags.dom && console.groupEnd();
- }
- function takeRecords(node) {
- node = wrap(node);
- if (!node) {
- node = wrap(document);
- }
- while (node.parentNode) {
- node = node.parentNode;
- }
- var observer = node.__observer;
- if (observer) {
- handler(observer.takeRecords());
- takeMutations();
- }
- }
- var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
- function observe(inRoot) {
- if (inRoot.__observer) {
- return;
- }
- var observer = new MutationObserver(handler);
- observer.observe(inRoot, {
- childList: true,
- subtree: true
- });
- inRoot.__observer = observer;
- }
- function upgradeDocument(doc) {
- doc = wrap(doc);
- flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
- addedNode(doc);
- observe(doc);
- flags.dom && console.groupEnd();
- }
- function upgradeDocumentTree(doc) {
- forDocumentTree(doc, upgradeDocument);
- }
- var originalCreateShadowRoot = Element.prototype.createShadowRoot;
- if (originalCreateShadowRoot) {
- Element.prototype.createShadowRoot = function() {
- var root = originalCreateShadowRoot.call(this);
- CustomElements.watchShadow(this);
- return root;
- };
- }
- scope.watchShadow = watchShadow;
- scope.upgradeDocumentTree = upgradeDocumentTree;
- scope.upgradeSubtree = addedSubtree;
- scope.upgradeAll = addedNode;
- scope.attachedNode = attachedNode;
- scope.takeRecords = takeRecords;
-});
-
-CustomElements.addModule(function(scope) {
- var flags = scope.flags;
- function upgrade(node) {
- if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
- var is = node.getAttribute("is");
- var definition = scope.getRegisteredDefinition(is || node.localName);
- if (definition) {
- if (is && definition.tag == node.localName) {
- return upgradeWithDefinition(node, definition);
- } else if (!is && !definition.extends) {
- return upgradeWithDefinition(node, definition);
- }
- }
- }
- }
- function upgradeWithDefinition(element, definition) {
- flags.upgrade && console.group("upgrade:", element.localName);
- if (definition.is) {
- element.setAttribute("is", definition.is);
- }
- implementPrototype(element, definition);
- element.__upgraded__ = true;
- created(element);
- scope.attachedNode(element);
- scope.upgradeSubtree(element);
- flags.upgrade && console.groupEnd();
- return element;
- }
- function implementPrototype(element, definition) {
- if (Object.__proto__) {
- element.__proto__ = definition.prototype;
- } else {
- customMixin(element, definition.prototype, definition.native);
- element.__proto__ = definition.prototype;
- }
- }
- function customMixin(inTarget, inSrc, inNative) {
- var used = {};
- var p = inSrc;
- while (p !== inNative && p !== HTMLElement.prototype) {
- var keys = Object.getOwnPropertyNames(p);
- for (var i = 0, k; k = keys[i]; i++) {
- if (!used[k]) {
- Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
- used[k] = 1;
- }
- }
- p = Object.getPrototypeOf(p);
- }
- }
- function created(element) {
- if (element.createdCallback) {
- element.createdCallback();
- }
- }
- scope.upgrade = upgrade;
- scope.upgradeWithDefinition = upgradeWithDefinition;
- scope.implementPrototype = implementPrototype;
-});
-
-CustomElements.addModule(function(scope) {
- var isIE11OrOlder = scope.isIE11OrOlder;
- var upgradeDocumentTree = scope.upgradeDocumentTree;
- var upgradeAll = scope.upgradeAll;
- var upgradeWithDefinition = scope.upgradeWithDefinition;
- var implementPrototype = scope.implementPrototype;
- var useNative = scope.useNative;
- function register(name, options) {
- var definition = options || {};
- if (!name) {
- throw new Error("document.registerElement: first argument `name` must not be empty");
- }
- if (name.indexOf("-") < 0) {
- throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
- }
- if (isReservedTag(name)) {
- throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
- }
- if (getRegisteredDefinition(name)) {
- throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
- }
- if (!definition.prototype) {
- definition.prototype = Object.create(HTMLElement.prototype);
- }
- definition.__name = name.toLowerCase();
- definition.lifecycle = definition.lifecycle || {};
- definition.ancestry = ancestry(definition.extends);
- resolveTagName(definition);
- resolvePrototypeChain(definition);
- overrideAttributeApi(definition.prototype);
- registerDefinition(definition.__name, definition);
- definition.ctor = generateConstructor(definition);
- definition.ctor.prototype = definition.prototype;
- definition.prototype.constructor = definition.ctor;
- if (scope.ready) {
- upgradeDocumentTree(document);
- }
- return definition.ctor;
- }
- function overrideAttributeApi(prototype) {
- if (prototype.setAttribute._polyfilled) {
- return;
- }
- var setAttribute = prototype.setAttribute;
- prototype.setAttribute = function(name, value) {
- changeAttribute.call(this, name, value, setAttribute);
- };
- var removeAttribute = prototype.removeAttribute;
- prototype.removeAttribute = function(name) {
- changeAttribute.call(this, name, null, removeAttribute);
- };
- prototype.setAttribute._polyfilled = true;
- }
- function changeAttribute(name, value, operation) {
- name = name.toLowerCase();
- var oldValue = this.getAttribute(name);
- operation.apply(this, arguments);
- var newValue = this.getAttribute(name);
- if (this.attributeChangedCallback && newValue !== oldValue) {
- this.attributeChangedCallback(name, oldValue, newValue);
- }
- }
- function isReservedTag(name) {
- for (var i = 0; i < reservedTagList.length; i++) {
- if (name === reservedTagList[i]) {
- return true;
- }
- }
- }
- var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
- function ancestry(extnds) {
- var extendee = getRegisteredDefinition(extnds);
- if (extendee) {
- return ancestry(extendee.extends).concat([ extendee ]);
- }
- return [];
- }
- function resolveTagName(definition) {
- var baseTag = definition.extends;
- for (var i = 0, a; a = definition.ancestry[i]; i++) {
- baseTag = a.is && a.tag;
- }
- definition.tag = baseTag || definition.__name;
- if (baseTag) {
- definition.is = definition.__name;
- }
- }
- function resolvePrototypeChain(definition) {
- if (!Object.__proto__) {
- var nativePrototype = HTMLElement.prototype;
- if (definition.is) {
- var inst = document.createElement(definition.tag);
- var expectedPrototype = Object.getPrototypeOf(inst);
- if (expectedPrototype === definition.prototype) {
- nativePrototype = expectedPrototype;
- }
- }
- var proto = definition.prototype, ancestor;
- while (proto && proto !== nativePrototype) {
- ancestor = Object.getPrototypeOf(proto);
- proto.__proto__ = ancestor;
- proto = ancestor;
- }
- definition.native = nativePrototype;
- }
- }
- function instantiate(definition) {
- return upgradeWithDefinition(domCreateElement(definition.tag), definition);
- }
- var registry = {};
- function getRegisteredDefinition(name) {
- if (name) {
- return registry[name.toLowerCase()];
- }
- }
- function registerDefinition(name, definition) {
- registry[name] = definition;
- }
- function generateConstructor(definition) {
- return function() {
- return instantiate(definition);
- };
- }
- var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
- function createElementNS(namespace, tag, typeExtension) {
- if (namespace === HTML_NAMESPACE) {
- return createElement(tag, typeExtension);
- } else {
- return domCreateElementNS(namespace, tag);
- }
- }
- function createElement(tag, typeExtension) {
- var definition = getRegisteredDefinition(typeExtension || tag);
- if (definition) {
- if (tag == definition.tag && typeExtension == definition.is) {
- return new definition.ctor();
- }
- if (!typeExtension && !definition.is) {
- return new definition.ctor();
- }
- }
- var element;
- if (typeExtension) {
- element = createElement(tag);
- element.setAttribute("is", typeExtension);
- return element;
- }
- element = domCreateElement(tag);
- if (tag.indexOf("-") >= 0) {
- implementPrototype(element, HTMLElement);
- }
- return element;
- }
- var domCreateElement = document.createElement.bind(document);
- var domCreateElementNS = document.createElementNS.bind(document);
- var isInstance;
- if (!Object.__proto__ && !useNative) {
- isInstance = function(obj, ctor) {
- var p = obj;
- while (p) {
- if (p === ctor.prototype) {
- return true;
- }
- p = p.__proto__;
- }
- return false;
- };
- } else {
- isInstance = function(obj, base) {
- return obj instanceof base;
- };
- }
- function wrapDomMethodToForceUpgrade(obj, methodName) {
- var orig = obj[methodName];
- obj[methodName] = function() {
- var n = orig.apply(this, arguments);
- upgradeAll(n);
- return n;
- };
- }
- wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
- wrapDomMethodToForceUpgrade(document, "importNode");
- if (isIE11OrOlder) {
- (function() {
- var importNode = document.importNode;
- document.importNode = function() {
- var n = importNode.apply(document, arguments);
- if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
- var f = document.createDocumentFragment();
- f.appendChild(n);
- return f;
- } else {
- return n;
- }
- };
- })();
- }
- document.registerElement = register;
- document.createElement = createElement;
- document.createElementNS = createElementNS;
- scope.registry = registry;
- scope.instanceof = isInstance;
- scope.reservedTagList = reservedTagList;
- scope.getRegisteredDefinition = getRegisteredDefinition;
- document.register = document.registerElement;
-});
-
-(function(scope) {
- var useNative = scope.useNative;
- var initializeModules = scope.initializeModules;
- var isIE11OrOlder = /Trident/.test(navigator.userAgent);
- if (useNative) {
- var nop = function() {};
- scope.watchShadow = nop;
- scope.upgrade = nop;
- scope.upgradeAll = nop;
- scope.upgradeDocumentTree = nop;
- scope.upgradeSubtree = nop;
- scope.takeRecords = nop;
- scope.instanceof = function(obj, base) {
- return obj instanceof base;
- };
- } else {
- initializeModules();
- }
- var upgradeDocumentTree = scope.upgradeDocumentTree;
- if (!window.wrap) {
- if (window.ShadowDOMPolyfill) {
- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
- } else {
- window.wrap = window.unwrap = function(node) {
- return node;
- };
- }
- }
- function bootstrap() {
- upgradeDocumentTree(wrap(document));
- if (window.HTMLImports) {
- HTMLImports.__importsParsingHook = function(elt) {
- upgradeDocumentTree(wrap(elt.import));
- };
- }
- CustomElements.ready = true;
- setTimeout(function() {
- CustomElements.readyTime = Date.now();
- if (window.HTMLImports) {
- CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
- }
- document.dispatchEvent(new CustomEvent("WebComponentsReady", {
- bubbles: true
- }));
- });
- }
- if (isIE11OrOlder && typeof window.CustomEvent !== "function") {
- window.CustomEvent = function(inType, params) {
- params = params || {};
- var e = document.createEvent("CustomEvent");
- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
- return e;
- };
- window.CustomEvent.prototype = window.Event.prototype;
- }
- if (document.readyState === "complete" || scope.flags.eager) {
- bootstrap();
- } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
- bootstrap();
- } else {
- var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
- window.addEventListener(loadEvent, bootstrap);
- }
- scope.isIE11OrOlder = isIE11OrOlder;
-})(window.CustomElements);
-
-(function(scope) {
- if (!Function.prototype.bind) {
- Function.prototype.bind = function(scope) {
- var self = this;
- var args = Array.prototype.slice.call(arguments, 1);
- return function() {
- var args2 = args.slice();
- args2.push.apply(args2, arguments);
- return self.apply(scope, args2);
- };
- };
- }
-})(window.WebComponents);
-
-(function(scope) {
- "use strict";
- if (!window.performance) {
- var start = Date.now();
- window.performance = {
- now: function() {
- return Date.now() - start;
- }
- };
- }
- if (!window.requestAnimationFrame) {
- window.requestAnimationFrame = function() {
- var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
- return nativeRaf ? function(callback) {
- return nativeRaf(function() {
- callback(performance.now());
- });
- } : function(callback) {
- return window.setTimeout(callback, 1e3 / 60);
- };
- }();
- }
- if (!window.cancelAnimationFrame) {
- window.cancelAnimationFrame = function() {
- return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
- clearTimeout(id);
- };
- }();
- }
- var elementDeclarations = [];
- var polymerStub = function(name, dictionary) {
- if (typeof name !== "string" && arguments.length === 1) {
- Array.prototype.push.call(arguments, document._currentScript);
- }
- elementDeclarations.push(arguments);
- };
- window.Polymer = polymerStub;
- scope.consumeDeclarations = function(callback) {
- scope.consumeDeclarations = function() {
- throw "Possible attempt to load Polymer twice";
- };
- if (callback) {
- callback(elementDeclarations);
- }
- elementDeclarations = null;
- };
- function installPolymerWarning() {
- if (window.Polymer === polymerStub) {
- window.Polymer = function() {
- throw new Error("You tried to use polymer without loading it first. To " + 'load polymer, <link rel="import" href="' + 'components/polymer/polymer.html">');
- };
- }
- }
- if (HTMLImports.useNative) {
- installPolymerWarning();
- } else {
- addEventListener("DOMContentLoaded", installPolymerWarning);
- }
-})(window.WebComponents);
-
-(function(scope) {
- var style = document.createElement("style");
- style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
- var head = document.querySelector("head");
- head.insertBefore(style, head.firstChild);
-})(window.WebComponents);
-
-(function(scope) {
- window.Platform = scope;
-})(window.WebComponents); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.min.js b/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.min.js
deleted file mode 100644
index 0fa8b57549e..00000000000
--- a/chromium/third_party/catapult/third_party/polymer/components/webcomponentsjs/webcomponents.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.6.1
-window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log&&t.log.split){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(WebComponents),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];A(e,o,F(t,o))}return e}function o(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}A(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){U.value=n,A(e,t,U)}function s(e){var t=e.__proto__||Object.getPrototypeOf(e);if(q)try{W(t)}catch(n){t=t.__proto__}var r=R.get(t);if(r)return r;var o=s(t),i=E(o);return g(t,i,e),i}function c(e,t){w(e,t,!0)}function l(e,t){w(t,e,!1)}function u(e){return/^on[a-z]+$/.test(e)}function d(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function p(e){return k&&d(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function h(e){return k&&d(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function f(e){return k&&d(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function m(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return B}}function w(t,n,r,o){for(var i=W(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){q&&t.__lookupGetter__(s);var c,l,d=m(t,s);if(r&&"function"==typeof d.value)n[s]=f(s);else{var w=u(s);c=w?e.getEventHandlerGetter(s):p(s),(d.writable||d.set||V)&&(l=w?e.getEventHandlerSetter(s):h(s));var v=V||d.configurable;A(n,s,{get:c,set:l,configurable:v,enumerable:d.enumerable})}}}}function v(e,t,n){var r=e.prototype;g(r,t,n),o(t,e)}function g(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),I.set(o,e),c(e,o),r&&l(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return g(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function _(e){return e&&e.__impl4cf1e782hg__}function S(e){return!_(e)}function T(e){return null===e?null:(n(S(e)),e.__wrapper8e3dd93a60__||(e.__wrapper8e3dd93a60__=new(s(e))(e)))}function M(e){return null===e?null:(n(_(e)),e.__impl4cf1e782hg__)}function O(e){return e.__impl4cf1e782hg__}function L(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function N(e){return e&&_(e)?M(e):e}function C(e){return e&&!_(e)?T(e):e}function j(e,t){null!==t&&(n(S(e)),n(void 0===t||_(t)),e.__wrapper8e3dd93a60__=t)}function D(e,t,n){G.get=n,A(e.prototype,t,G)}function H(e,t){D(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=C(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,I=new WeakMap,P=Object.create(null),k=t(),A=Object.defineProperty,W=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,U={value:void 0,configurable:!0,enumerable:!1,writable:!0};W(window);var q=/Firefox/.test(navigator.userAgent),B={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.assert=n,e.constructorTable=R,e.defineGetter=D,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=d,e.isWrapper=_,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=I,e.oneOf=i,e.registerObject=y,e.registerWrapper=v,e.rewrap=j,e.setWrapper=L,e.unsafeUnwrap=O,e.unwrap=M,e.unwrapIfNeeded=N,e.wrap=T,e.wrapIfNeeded=C,e.wrappers=P}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),l=0;a>l;l++)c[l]=new Array(s),c[l][0]=l;for(var u=0;s>u;u++)c[0][u]=u;for(var l=1;a>l;l++)for(var u=1;s>u;u++)if(this.equals(e[t+u-1],r[o+l-1]))c[l][u]=c[l-1][u-1];else{var d=c[l-1][u]+1,p=c[l][u-1]+1;c[l][u]=p>d?d:p}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var l,u=e[t-1][n-1],d=e[t-1][n],p=e[t][n-1];l=p>d?u>d?d:u:u>p?p:u,l==u?(u==s?c.push(r):(c.push(o),s=u),t--,n--):l==d?(c.push(a),t--,s=d):(c.push(i),n--,s=p)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,l,u){var d=0,p=0,h=Math.min(s-n,u-l);if(0==n&&0==l&&(d=this.sharedPrefix(e,c,h)),s==e.length&&u==c.length&&(p=this.sharedSuffix(e,c,h-d)),n+=d,l+=d,s-=p,u-=p,s-n==0&&u-l==0)return[];if(n==s){for(var f=t(n,[],0);u>l;)f.removed.push(c[l++]);return[f]}if(l==u)return[t(n,[],s-n)];for(var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,l,u)),f=void 0,w=[],v=n,g=l,b=0;b<m.length;b++)switch(m[b]){case r:f&&(w.push(f),f=void 0),v++,g++;break;case o:f||(f=t(v,[],0)),f.addedCount++,v++,f.removed.push(c[g]),g++;break;case i:f||(f=t(v,[],0)),f.addedCount++,v++;break;case a:f||(f=t(v,[],0)),f.removed.push(c[g]),g++}return f&&w.push(f),w},sharedPrefix:function(e,t,n){for(var r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)e[t]()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),l=document.createTextNode(s);c.observe(l,{characterData:!0}),r=function(){s=(s+1)%2,l.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,f.push(e),m||(u(n),m=!0))}function n(){for(m=!1;f.length;){var e=f;f=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new p.NodeList,this.removedNodes=new p.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=h.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=h.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=h.get(s);if(c)for(var l=0;l<c.length;l++){var u=c[l],d=u.options;if((s===e||d.subtree)&&!("attributes"===n&&!d.attributes||"attributes"===n&&d.attributeFilter&&(null!==o.namespace||-1===d.attributeFilter.indexOf(o.name))||"characterData"===n&&!d.characterData||"childList"===n&&!d.childList)){var p=u.observer;i[p.uid_]=p,("attributes"===n&&d.attributeOldValue||"characterData"===n&&d.characterDataOldValue)&&(a[p.uid_]=o.oldValue)}}}for(var f in i){var p=i[f],m=new r(n,e);"name"in o&&"namespace"in o&&(m.attributeName=o.name,m.attributeNamespace=o.namespace),o.addedNodes&&(m.addedNodes=o.addedNodes),o.removedNodes&&(m.removedNodes=o.removedNodes),o.previousSibling&&(m.previousSibling=o.previousSibling),o.nextSibling&&(m.nextSibling=o.nextSibling),void 0!==a[f]&&(m.oldValue=a[f]),t(p),p.records_.push(m)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,this.attributes="attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this.characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=w.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++v,this.scheduled_=!1}function l(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var u=e.setEndOfMicrotask,d=e.wrapIfNeeded,p=e.wrappers,h=new WeakMap,f=[],m=!1,w=Array.prototype.slice,v=0;c.prototype={constructor:c,observe:function(e,t){e=d(e);var n,r=new s(t),o=h.get(e);o||h.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new l(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=h.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},l.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=h.get(e);n||h.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=h.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return A(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var l=a(c);if(l&&l.length>0){for(var u=0;u<l.length;u++){var p=l[u];if(i(p)){var h=n(p),f=h.olderShadowRoot;f&&s.push(f)}s.push(p)}c=l[l.length-1]}else if(t(c)){if(d(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=A(t),r=e[0],o=A(r),i=l(n,o),a=0;a<e.length;a++){var s=e[a];if(A(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function l(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function u(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=l(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var u=0;u<s.length;u++){var d=s[u];if(A(d)===c)return d}return null}function d(e,t){return A(e)===A(t)}function p(e){if(!K.get(e)&&(K.set(e,!0),f(V(e),V(e.target)),P)){var t=P;throw P=null,t}}function h(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function f(t,n){if(Y.get(t))throw new Error("InvalidStateError");Y.set(t,!0),e.renderAllPending();var o,i,a;if(h(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!h(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),m(t,o,a,i)&&w(t,o,a,i)&&v(t,o,a,i),J.set(t,re),X["delete"](t,null),Y["delete"](t),t.defaultPrevented}function m(e,t,n,r){var o=oe;if(n&&!g(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!g(t[i],e,o,t,r))return!1;return!0}function w(e,t,n,r){var o=ie,i=t[0]||n;return g(i,e,o,t,r)}function v(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!g(t[i],e,o,t,r))return;n&&t.length>0&&g(n,e,o,t,r)}function g(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=B(t),l=c.relatedTarget;if(l){if(l instanceof Object&&l.addEventListener){var d=V(l),p=u(t,e,d);if(p===a)return!0}else p=null;Z.set(t,p)}}J.set(t,n);var h=t.type,f=!1;$.set(t,a),X.set(t,e),i.depth++;for(var m=0,w=i.length;w>m;m++){var v=i[m];if(v.removed)f=!0;else if(!(v.type!==h||!v.capture&&n===oe||v.capture&&n===ae))try{if("function"==typeof v.handler?v.handler.call(e,t):v.handler.handleEvent(t),ee.get(t))return!1}catch(g){P||(P=g)}}if(i.depth--,f&&0===i.depth){var b=i.slice();i.length=0;for(var m=0;m<b.length;m++)b[m].removed||i.push(b[m])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return ge||"beforeunload"!==n.type||this instanceof M?void U(n,this):new M(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:B(e.relatedTarget)}}):e}function _(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void U(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&W(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function S(e,t){return function(){arguments[t]=B(arguments[t]);var n=B(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(we)return new e(n,E(r));var o=B(document.createEvent(t)),i=me[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=B(t)),a.push(t)}),o["init"+t].apply(o,a),o}function M(e){y.call(this,e)}function O(e){return"function"==typeof e?!0:e&&e.handleEvent}function L(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function N(e){U(e,this)}function C(e){return e instanceof G.ShadowRoot&&(e=e.host),B(e)}function j(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function D(e,t){for(var n=B(e);n;n=n.parentNode)if(j(V(n),t))return!0;return!1}function H(e){k(e,ye)}function x(t,n,o,i){e.renderAllPending();var a=V(Ee.call(q(n),o,i));if(!a)return null;var c=r(a,null),l=c.lastIndexOf(t);return-1==l?null:(c=c.slice(0,l),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function I(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var P,k=e.forwardMethodsToWrapper,A=e.getTreeScope,W=e.mixin,F=e.registerWrapper,U=e.setWrapper,q=e.unsafeUnwrap,B=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),K=new WeakMap,Y=new WeakMap,$=new WeakMap,X=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return $.get(this)},get currentTarget(){return X.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}},F(se,y,document.createEvent("Event"));var ce=_("UIEvent",y),le=_("CustomEvent",y),ue={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(B(this).relatedTarget)}},de=W({initMouseEvent:S("initMouseEvent",14)},ue),pe=W({initFocusEvent:S("initFocusEvent",5)},ue),he=_("MouseEvent",ce,de),fe=_("FocusEvent",ce,pe),me=Object.create(null),we=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!we){var ve=function(e,t,n){if(n){var r=me[n];t=W(W({},r),t)}me[e]=t};ve("Event",{bubbles:!1,cancelable:!1}),ve("CustomEvent",{detail:null},"Event"),ve("UIEvent",{view:null,detail:0},"Event"),ve("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ve("FocusEvent",{relatedTarget:null},"UIEvent")}var ge=window.BeforeUnloadEvent;M.prototype=Object.create(y.prototype),W(M.prototype,{get returnValue(){return q(this).returnValue},set returnValue(e){q(this).returnValue=e}}),ge&&F(ge,M);var be=window.EventTarget,ye=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;ye.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),N.prototype={addEventListener:function(e,t,n){if(O(t)&&!L(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=C(this);a.addEventListener_(e,p,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=C(this);s.removeEventListener_(e,p,!0)}}},dispatchEvent:function(t){var n=B(t),r=n.type;K.set(n,!1),e.renderAllPending();var o;D(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return B(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},be&&F(be,N);var Ee=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=I,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=M,e.wrappers.CustomEvent=le,e.wrappers.Event=y,e.wrappers.EventTarget=N,e.wrappers.FocusEvent=fe,e.wrappers.MouseEvent=he,e.wrappers.UIEvent=ce}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,m)}function n(e){l(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,l=e.setWrapper,u=e.unsafeUnwrap,d=e.wrap,p=window.TouchEvent;if(p){var h;try{h=document.createEvent("TouchEvent")}catch(f){return}var m={enumerable:!1};n.prototype={get target(){return d(u(this).target)}};var w={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){w.get=function(){return u(this)[e]},Object.defineProperty(n.prototype,e,w)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(u(this).touches)},get targetTouches(){return o(u(this).targetTouches)},get changedTouches(){return o(u(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(p,i,h),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){O(e instanceof _)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){N(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){N(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);U=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;U=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function l(e,t){R(e,t),e.nodeIsInserted_()}function u(e,t){for(var n=C(t),r=0;r<e.length;r++)l(e[r],n)}function d(e){R(e,new M(e,null))}function p(e){for(var t=0;t<e.length;t++)d(e[t])}function h(e,t){var n=e.nodeType===_.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function f(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function m(e,t){f(e,t);var n=t.length;if(1===n)return P(t[0]);for(var r=P(e.ownerDocument.createDocumentFragment()),o=0;n>o;o++)r.appendChild(P(t[o]));return r}function w(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function v(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){O(t.parentNode===e);var n=t.nextSibling,r=P(t),o=r.parentNode;o&&$.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=P(e),a=i.firstChild;a;)n=a.nextSibling,$.call(i,a),a=n}function g(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=A(n?q.call(n,I(e),!1):B.call(I(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||C(e)!==C(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function _(e){O(e instanceof V),S.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var S=e.wrappers.EventTarget,T=e.wrappers.NodeList,M=e.TreeScope,O=e.assert,L=e.defineWrapGetter,N=e.enqueueMutation,C=e.getTreeScope,j=e.isWrapper,D=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,I=e.unsafeUnwrap,P=e.unwrap,k=e.unwrapIfNeeded,A=e.wrap,W=e.wrapIfNeeded,F=e.wrappers,U=!1,q=document.importNode,B=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),K=V.prototype.isEqualNode,Y=V.prototype.insertBefore,$=V.prototype.removeChild,X=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{$.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){$.call(e,t)};_.prototype=Object.create(S.prototype),D(_.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?j(n)?r=P(n):(r=n,n=A(r)):(n=null,r=null),n&&O(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!g(e);if(o=c?a(e):i(e,this,s,n),c)h(this,e),w(this),Y.call(I(this),P(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var l=r?r.parentNode:I(this);l?Y.call(l,m(this,o),r):f(this,o)}return N(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),u(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=P(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,l=this.lastChild,u=i.parentNode;u&&J(u,i),c===e&&(this.firstChild_=a),l===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else w(this),J(I(this),i);return U||N(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(j(r)?o=P(r):(o=r,r=A(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,l=r.previousSibling,p=!this.invalidateShadowRenderer()&&!g(e);return p?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,l,c)),p?(h(this,e),w(this),X.call(I(this),P(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&X.call(o.parentNode,m(this,s),o)),N(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:l}),d(r),u(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:A(I(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:A(I(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:A(I(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:A(I(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:A(I(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==_.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=_.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(v(this),""!==e){var n=I(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else w(this),I(this).textContent=e;var r=c(this.childNodes);N(this,"childList",{addedNodes:r,removedNodes:t}),p(t),u(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,W(e))},compareDocumentPosition:function(e){return z.call(I(this),k(e))},isEqualNode:function(e){return K.call(I(this),k(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===_.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),L(_,"ownerDocument"),x(V,_,document.createDocumentFragment()),delete _.prototype.querySelector,delete _.prototype.querySelectorAll,_.prototype=D(Object.create(S.prototype),_.prototype),e.cloneNode=y,e.nodeWasAdded=l,e.nodeWasRemoved=d,e.nodesWereAdded=u,e.nodesWereRemoved=p,e.originalInsertBefore=Y,e.originalRemoveChild=$,e.snapshotNodeList=c,e.wrappers.Node=_}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;c>s;s++)i=b(t[s]),!o&&(a=v(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===j}function s(){return!0}function c(e,t,n){return e.localName===n}function l(e,t){return e.namespaceURI===t}function u(e,t,n){return e.namespaceURI===t&&e.localName===n}function d(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=d(a,t,n,r,o,i),a=a.nextElementSibling;return t}function p(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,null);if(c instanceof N)s=S.call(c,i);else{if(!(c instanceof C))return d(this,r,o,n,i,null);s=_.call(c,i)}return t(s,r,o,a)}function h(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=M.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function f(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=L.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=O.call(c,i,a)}return t(s,r,o,!1)}var m=e.wrappers.HTMLCollection,w=e.wrappers.NodeList,v=e.getTreeScope,g=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,_=document.querySelectorAll,S=document.documentElement.querySelectorAll,T=document.getElementsByTagName,M=document.documentElement.getElementsByTagName,O=document.getElementsByTagNameNS,L=document.documentElement.getElementsByTagNameNS,N=window.Element,C=window.HTMLDocument||window.Document,j="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=g(this),c=v(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof N)a=b(E.call(s,t));else{if(!(s instanceof C))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=v(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a;
-
-},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new w;return o.length=p.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(g(this),t)}},x={getElementsByTagName:function(e){var t=new m,n="*"===e?s:a;return t.length=h.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new m,r=null;return r="*"===e?"*"===t?s:c:"*"===t?l:u,n.length=f.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}};e.ChildNodeInterface=i,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,l,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){u(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,l=e.MatchesInterface,u=(e.addWrapNodeListMethod,e.enqueueMutation),d=e.mixin,p=(e.oneOf,e.registerWrapper),h=e.unsafeUnwrap,f=e.wrappers,m=window.Element,w=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return m.prototype[e]}),v=w[0],g=m.prototype[v],b=new WeakMap;r.prototype=Object.create(a.prototype),d(r.prototype,{createShadowRoot:function(){var t=new f.ShadowRoot(this);h(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return h(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=h(this).getAttribute(e);h(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=h(this).getAttribute(e);h(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=h(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return h(this).className},set className(e){this.setAttribute("class",e)},get id(){return h(this).id},set id(e){this.setAttribute("id",e)}}),w.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),m.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),d(r.prototype,o),d(r.prototype,i),d(r.prototype,s),d(r.prototype,c),d(r.prototype,l),p(m,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=w,e.originalMatches=g,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function n(e){return e.replace(O,t)}function r(e){return e.replace(L,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,i=e.tagName.toLowerCase(),s="<"+i,c=e.attributes,l=0;o=c[l];l++)s+=" "+o.name+'="'+n(o.value)+'"';return s+=">",N[i]?s:s+a(e)+"</"+i+">";case Node.TEXT_NODE:var u=e.data;return t&&C[t.localName]?u:r(u);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function a(e){e instanceof M.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=i(n,e);return t}function s(e,t,n){var r=n||"div";e.textContent="";var o=S(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(T(i))}function c(e){f.call(this,e)}function l(e,t){var n=S(e.cloneNode(!1));n.innerHTML=t;for(var r,o=S(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return T(o)}function u(t){return function(){return e.renderAllPending(),_(this)[t]}}function d(e){m(c,e,u(e))}function p(t){Object.defineProperty(c.prototype,t,{get:u(t),set:function(n){e.renderAllPending(),_(this)[t]=n},configurable:!0,enumerable:!0})}function h(t){Object.defineProperty(c.prototype,t,{value:function(){return e.renderAllPending(),_(this)[t].apply(_(this),arguments)},configurable:!0,enumerable:!0})}var f=e.wrappers.Element,m=e.defineGetter,w=e.enqueueMutation,v=e.mixin,g=e.nodesWereAdded,b=e.nodesWereRemoved,y=e.registerWrapper,E=e.snapshotNodeList,_=e.unsafeUnwrap,S=e.unwrap,T=e.wrap,M=e.wrappers,O=/[&\u00A0"]/g,L=/[&\u00A0<>]/g,N=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),j=/MSIE/.test(navigator.userAgent),D=window.HTMLElement,H=window.HTMLTemplateElement;c.prototype=Object.create(f.prototype),v(c.prototype,{get innerHTML(){return a(this)},set innerHTML(e){if(j&&C[this.localName])return void(this.textContent=e);var t=E(this.childNodes);this.invalidateShadowRenderer()?this instanceof M.HTMLTemplateElement?s(this.content,e):s(this,e,this.tagName):!H&&this instanceof M.HTMLTemplateElement?s(this.content,e):_(this).innerHTML=e;var n=E(this.childNodes);w(this,"childList",{addedNodes:n,removedNodes:t}),b(t),g(n,this)},get outerHTML(){return i(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=l(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=l(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(d),["scrollLeft","scrollTop"].forEach(p),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(h),y(D,c,document.createElement("b")),e.wrappers.HTMLElement=c,e.getInnerHTML=a,e.setInnerHTML=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=d.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);d.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!p){var t=n(e);u.set(this,l(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.wrap,u=new WeakMap,d=new WeakMap,p=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return p?l(s(this).content):u.get(this)}}),p&&a(p,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,l=e.wrap,u=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return l(c(this).form)}}),a(u,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var l=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",l),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){p.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),l=document.createElementNS(s,"use"),u=c.constructor,d=Object.getPrototypeOf(u.prototype),p=d.constructor;t.prototype=Object.create(d),"instanceRoot"in l&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,l),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(l,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var l=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,l),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.ParentNodeInterface,r=e.SelectorsInterface,o=e.mixin,i=e.registerObject,a=i(document.createDocumentFragment());o(a.prototype,n),o(a.prototype,r),o(a.prototype,t);var s=i(document.createComment(""));e.wrappers.Comment=s,e.wrappers.DocumentFragment=a}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(u(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;h.set(this,o),this.treeScope_=new r(this,a(o||e)),p.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,l=e.setInnerHTML,u=e.unsafeUnwrap,d=e.unwrap,p=new WeakMap,h=new WeakMap,f=/[ \t\n\r\f]/;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){l(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return h.get(this)||null},get host(){return p.get(this)||null},invalidateShadowRenderer:function(){return p.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getElementById:function(e){return f.test(e)?null:this.querySelector('[id="'+e+'"]')}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(e).root;return t instanceof h?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=u(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.unwrapIfNeeded,u=e.wrap,d=e.getTreeScope,p=window.Range,h=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(l(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(l(e),t)},setStartBefore:function(e){s(this).setStartBefore(l(e))},setStartAfter:function(e){s(this).setStartAfter(l(e))},setEndBefore:function(e){s(this).setEndBefore(l(e))},setEndAfter:function(e){s(this).setEndAfter(l(e))},selectNode:function(e){s(this).selectNode(l(e))},selectNodeContents:function(e){s(this).selectNodeContents(l(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return u(s(this).extractContents())},cloneContents:function(){return u(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(l(e))},surroundContents:function(e){s(this).surroundContents(l(e))},cloneRange:function(){return u(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(l(e),t)},comparePoint:function(e,t){return s(this).comparePoint(l(e),t)},intersectsNode:function(e){return s(this).intersectsNode(l(e))},toString:function(){return s(this).toString()}},p.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return u(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var l=R(a.lastChild);l&&(l.nextSibling_=l.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){P.set(e,[])}function i(e){var t=P.get(e);return t||P.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function l(e){var t=A.get(e);return t||(t=new h(e),A.set(e,t)),t}function u(e){var t=j(e).root;return t instanceof C?t:null}function d(e){return l(e.host)}function p(e){this.skip=!1,this.node=e,this.childNodes=[]}function h(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function f(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function m(e){if(e instanceof L)return e;if(e instanceof O)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=m(t);if(n)return n}return null}function w(e,t){i(t).push(e);var n=k.get(e);n?n.push(t):k.set(e,[t])}function v(e){return k.get(e)}function g(e){k.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof M))return!1;if(!q.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=v(t);return n&&n[n.length-1]===e}function E(e){return e instanceof O||e instanceof L}function _(e){return e.shadowRoot}function S(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,M=e.wrappers.Element,O=e.wrappers.HTMLContentElement,L=e.wrappers.HTMLShadowElement,N=e.wrappers.Node,C=e.wrappers.ShadowRoot,j=(e.assert,e.getTreeScope),D=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,I=e.ArraySplice,P=new WeakMap,k=new WeakMap,A=new WeakMap,W=D(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],U=new I;U.equals=function(e,t){return x(e.node)===t},p.prototype={append:function(e){var t=new p(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=U.calculateSplices(o,i),l=0,u=0,d=0,p=0;p<c.length;p++){for(var h=c[p];d<h.index;d++)u++,o[l++].sync(s);for(var f=h.removed.length,m=0;f>m;m++){var w=R(i[u++]);s.get(w)||r(w)}for(var v=h.addedCount,g=i[u]&&R(i[u]),m=0;v>m;m++){var b=o[l++],y=b.node;n(t,y,g),s.set(y,!0),b.sync(s)}d+=v}for(var p=d;p<o.length;p++)o[p].sync(s)}}},h.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new p(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return j(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[W](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):g(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(_(e)){for(var t=e,n=f(t),r=S(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=m(i);if(a){var s=i.olderShadowRoot;s&&(n=f(s));for(var c=0;c<n.length;c++)w(n[c],a)}this.distributionResolution(i)}}for(var l=e.firstChild;l;l=l.nextSibling)this.distributionResolution(l)},poolDistribution:function(e,t){if(!(e instanceof L))if(e instanceof O){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(w(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)w(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(_(t)){var a=l(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var q=/^(:not\()?[*.#[a-zA-Z_|]/;N.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return t?(t.invalidate(),!0):!1},O.prototype.getDistributedNodes=L.prototype.getDistributedNodes=function(){return s(),i(this)},M.prototype.getDestinationInsertionPoints=function(){return s(),v(this)||[]},O.prototype.nodeIsInserted_=L.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=u(this);t&&(e=d(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=l,e.getShadowTrees=S,e.renderAllPending=s,e.getDestinationInsertionPoints=v,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){u.call(this,e),this.treeScope_=new m(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return N(n.apply(O(this),arguments))}}function r(e,t){D.call(O(t),L(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof f&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){M(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return N(n.apply(O(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(O(this),arguments)}}var l=e.GetElementsByInterface,u=e.wrappers.Node,d=e.ParentNodeInterface,p=e.wrappers.Selection,h=e.SelectorsInterface,f=e.wrappers.ShadowRoot,m=e.TreeScope,w=e.cloneNode,v=e.defineWrapGetter,g=e.elementFromPoint,b=e.forwardMethodsToWrapper,y=e.matchesNames,E=e.mixin,_=e.registerWrapper,S=e.renderAllPending,T=e.rewrap,M=e.setWrapper,O=e.unsafeUnwrap,L=e.unwrap,N=e.wrap,C=e.wrapEventTargetMethods,j=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(u.prototype),v(t,"documentElement"),v(t,"body"),v(t,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(n);var D=document.adoptNode,H=document.getSelection;E(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return g(this,this,e,t)},importNode:function(e,t){return w(e,t,O(this))},getSelection:function(){return S(),new p(H.call(L(this)))},getElementsByName:function(e){return h.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]");
-
-}});var x=document.createTreeWalker,R=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(N(e))}}:"function"==typeof n&&(o=function(e){return n(N(e))})),new R(x.call(L(this),L(e),t,o,r))},document.registerElement){var I=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void M(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var l=Object.create(a),u=c.length-1;u>=0;u--)l=Object.create(l);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(l[e]=function(){N(this)instanceof r||T(this),t.apply(N(this),arguments)})});var d={prototype:l};i&&(d["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(l,r),e.nativePrototypeTable.set(o,l);I.call(L(this),t,d);return r},b([window.HTMLDocument||window.Document],["registerElement"])}b([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),b([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],y),b([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),E(t.prototype,l),E(t.prototype,d),E(t.prototype,h),E(t.prototype,{get implementation(){var e=j.get(this);return e?e:(e=new a(L(this).implementation),j.set(this,e),e)},get defaultView(){return N(L(this).defaultView)}}),_(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&_(window.HTMLDocument,t),C([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),s(a,"createDocumentType"),s(a,"createDocument"),s(a,"createHTMLDocument"),c(a,"hasFeature"),_(window.DOMImplementation,a),b([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,l=e.wrap,u=window.Window,d=window.getComputedStyle,p=window.getDefaultComputedStyle,h=window.getSelection;t.prototype=Object.create(n.prototype),u.prototype.getComputedStyle=function(e,t){return l(this||window).getComputedStyle(c(e),t)},p&&(u.prototype.getDefaultComputedStyle=function(e,t){return l(this||window).getDefaultComputedStyle(c(e),t)}),u.prototype.getSelection=function(){return l(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){u.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),d.call(s(this),c(e),t)},getSelection:function(){return a(),new r(h.call(s(this)))},get document(){return l(s(this).document)}}),p&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),p.call(s(this),c(e),t)}),i(u,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill),function(e){function t(e,t){var n="";return Array.prototype.forEach.call(e,function(e){n+=e.textContent+"\n\n"}),t||(n=n.replace(d,"")),n}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){var t=n(e);document.head.appendChild(t);var r=[];if(t.sheet)try{r=t.sheet.cssRules}catch(o){}else console.warn("sheet not found",t);return t.parentNode.removeChild(t),r}function o(){C.initialized=!0,document.body.appendChild(C);var e=C.contentDocument,t=e.createElement("base");t.href=document.baseURI,e.head.appendChild(t)}function i(e){C.initialized||o(),document.body.appendChild(C),e(C.contentDocument),document.body.removeChild(C)}function a(e,t){if(t){var o;if(e.match("@import")&&D){var a=n(e);i(function(e){e.head.appendChild(a.impl),o=Array.prototype.slice.call(a.sheet.cssRules,0),t(o)})}else o=r(e),t(o)}}function s(e){e&&l().appendChild(document.createTextNode(e))}function c(e,t){var r=n(e);r.setAttribute(t,""),r.setAttribute(x,""),document.head.appendChild(r)}function l(){return j||(j=document.createElement("style"),j.setAttribute(x,""),j[x]=!0),j}var u={strictStyling:!1,registry:{},shimStyling:function(e,n,r){var o=this.prepareRoot(e,n,r),i=this.isTypeExtension(r),a=this.makeScopeSelector(n,i),s=t(o,!0);s=this.scopeCssText(s,a),e&&(e.shimmedStyle=s),this.addCssToDocument(s,n)},shimStyle:function(e,t){return this.shimCssText(e.textContent,t)},shimCssText:function(e,t){return e=this.insertDirectives(e),this.scopeCssText(e,t)},makeScopeSelector:function(e,t){return e?t?"[is="+e+"]":e:""},isTypeExtension:function(e){return e&&e.indexOf("-")<0},prepareRoot:function(e,t,n){var r=this.registerRoot(e,t,n);return this.replaceTextInStyles(r.rootStyles,this.insertDirectives),this.removeStyles(e,r.rootStyles),this.strictStyling&&this.applyScopeToContent(e,t),r.scopeStyles},removeStyles:function(e,t){for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)n.parentNode.removeChild(n)},registerRoot:function(e,t,n){var r=this.registry[t]={root:e,name:t,extendsName:n},o=this.findStyles(e);r.rootStyles=o,r.scopeStyles=r.rootStyles;var i=this.registry[r.extendsName];return i&&(r.scopeStyles=i.scopeStyles.concat(r.scopeStyles)),r},findStyles:function(e){if(!e)return[];var t=e.querySelectorAll("style");return Array.prototype.filter.call(t,function(e){return!e.hasAttribute(R)})},applyScopeToContent:function(e,t){e&&(Array.prototype.forEach.call(e.querySelectorAll("*"),function(e){e.setAttribute(t,"")}),Array.prototype.forEach.call(e.querySelectorAll("template"),function(e){this.applyScopeToContent(e.content,t)},this))},insertDirectives:function(e){return e=this.insertPolyfillDirectivesInCssText(e),this.insertPolyfillRulesInCssText(e)},insertPolyfillDirectivesInCssText:function(e){return e=e.replace(p,function(e,t){return t.slice(0,-2)+"{"}),e.replace(h,function(e,t){return t+" {"})},insertPolyfillRulesInCssText:function(e){return e=e.replace(f,function(e,t){return t.slice(0,-1)}),e.replace(m,function(e,t,n,r){var o=e.replace(t,"").replace(n,"");return r+o})},scopeCssText:function(e,t){var n=this.extractUnscopedRulesFromCssText(e);if(e=this.insertPolyfillHostInCssText(e),e=this.convertColonHost(e),e=this.convertColonHostContext(e),e=this.convertShadowDOMSelectors(e),t){var e,r=this;a(e,function(n){e=r.scopeRules(n,t)})}return e=e+"\n"+n,e.trim()},extractUnscopedRulesFromCssText:function(e){for(var t,n="";t=w.exec(e);)n+=t[1].slice(0,-1)+"\n\n";for(;t=v.exec(e);)n+=t[0].replace(t[2],"").replace(t[1],t[3])+"\n\n";return n},convertColonHost:function(e){return this.convertColonRule(e,E,this.colonHostPartReplacer)},convertColonHostContext:function(e){return this.convertColonRule(e,_,this.colonHostContextPartReplacer)},convertColonRule:function(e,t,n){return e.replace(t,function(e,t,r,o){if(t=O,r){for(var i,a=r.split(","),s=[],c=0,l=a.length;l>c&&(i=a[c]);c++)i=i.trim(),s.push(n(t,i,o));return s.join(",")}return t+o})},colonHostContextPartReplacer:function(e,t,n){return t.match(g)?this.colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},colonHostPartReplacer:function(e,t,n){return e+t.replace(g,"")+n},convertShadowDOMSelectors:function(e){for(var t=0;t<N.length;t++)e=e.replace(N[t]," ");return e},scopeRules:function(e,t){var n="";return e&&Array.prototype.forEach.call(e,function(e){if(e.selectorText&&e.style&&void 0!==e.style.cssText)n+=this.scopeSelector(e.selectorText,t,this.strictStyling)+" {\n ",n+=this.propertiesFromRule(e)+"\n}\n\n";else if(e.type===CSSRule.MEDIA_RULE)n+="@media "+e.media.mediaText+" {\n",n+=this.scopeRules(e.cssRules,t),n+="\n}\n\n";else try{e.cssText&&(n+=e.cssText+"\n\n")}catch(r){e.type===CSSRule.KEYFRAMES_RULE&&e.cssRules&&(n+=this.ieSafeCssTextFromKeyFrameRule(e))}},this),n},ieSafeCssTextFromKeyFrameRule:function(e){var t="@keyframes "+e.name+" {";return Array.prototype.forEach.call(e.cssRules,function(e){t+=" "+e.keyText+" {"+e.style.cssText+"}"}),t+=" }"},scopeSelector:function(e,t,n){var r=[],o=e.split(",");return o.forEach(function(e){e=e.trim(),this.selectorNeedsScoping(e,t)&&(e=n&&!e.match(O)?this.applyStrictSelectorScope(e,t):this.applySelectorScope(e,t)),r.push(e)},this),r.join(", ")},selectorNeedsScoping:function(e,t){if(Array.isArray(t))return!0;var n=this.makeScopeMatcher(t);return!e.match(n)},makeScopeMatcher:function(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+S,"m")},applySelectorScope:function(e,t){return Array.isArray(t)?this.applySelectorScopeList(e,t):this.applySimpleSelectorScope(e,t)},applySelectorScopeList:function(e,t){for(var n,r=[],o=0;n=t[o];o++)r.push(this.applySimpleSelectorScope(e,n));return r.join(", ")},applySimpleSelectorScope:function(e,t){return e.match(L)?(e=e.replace(O,t),e.replace(L,t+" ")):t+" "+e},applyStrictSelectorScope:function(e,t){t=t.replace(/\[is=([^\]]*)\]/g,"$1");var n=[" ",">","+","~"],r=e,o="["+t+"]";return n.forEach(function(e){var t=r.split(e);r=t.map(function(e){var t=e.trim().replace(L,"");return t&&n.indexOf(t)<0&&t.indexOf(o)<0&&(e=t.replace(/([^:]*)(:*)(.*)/,"$1"+o+"$2$3")),e}).join(e)}),r},insertPolyfillHostInCssText:function(e){return e.replace(M,b).replace(T,g)},propertiesFromRule:function(e){var t=e.style.cssText;e.style.content&&!e.style.content.match(/['"]+|attr/)&&(t=t.replace(/content:[^;]*;/g,"content: '"+e.style.content+"';"));var n=e.style;for(var r in n)"initial"===n[r]&&(t+=r+": initial; ");return t},replaceTextInStyles:function(e,t){e&&t&&(e instanceof Array||(e=[e]),Array.prototype.forEach.call(e,function(e){e.textContent=t.call(this,e.textContent)},this))},addCssToDocument:function(e,t){e.match("@import")?c(e,t):s(e)}},d=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,p=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,h=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,f=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,m=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,w=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,v=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,g="-shadowcsshost",b="-shadowcsscontext",y=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",E=new RegExp("("+g+y,"gim"),_=new RegExp("("+b+y,"gim"),S="([>\\s~+[.,{:][\\s\\S]*)?$",T=/\:host/gim,M=/\:host-context/gim,O=g+"-no-combinator",L=new RegExp(g,"gim"),N=(new RegExp(b,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^/g]),C=document.createElement("iframe");C.style.display="none";var j,D=navigator.userAgent.match("Chrome"),H="shim-shadowdom",x="shim-shadowdom-css",R="no-shim";if(window.ShadowDOMPolyfill){s("style { display: none !important; }\n");var I=ShadowDOMPolyfill.wrap(document),P=I.querySelector("head");P.insertBefore(l(),P.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var t="link[rel=stylesheet]["+H+"]",n="style["+H+"]";HTMLImports.importer.documentPreloadSelectors+=","+t,HTMLImports.importer.importsPreloadSelectors+=","+t,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,t,n].join(",");var r=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[x]){var t=e.__importElement||e;if(!t.hasAttribute(H))return void r.call(this,e);e.__resource&&(t=e.ownerDocument.createElement("style"),t.textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(t,e.href),t.textContent=u.shimStyle(t),t.removeAttribute(H,""),t.setAttribute(x,""),t[x]=!0,t.parentNode!==P&&(e.parentNode===P?P.replaceChild(t,e):this.addElementToDocument(t)),t.__importParsed=!0,this.markParsingComplete(e),this.parseNext()}};var o=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute(H)?e.__resource:o.call(this,e)}}})}e.ShadowCSS=u}(window.WebComponents)),function(e){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==p[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var l=a||"scheme start",u=0,d="",v=!1,g=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var y=e[u];switch(l){case"scheme start":if(!y||!m.test(y)){if(a){c("Invalid scheme.");break e}d="",l="no scheme";continue}d+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&w.test(y))d+=y.toLowerCase();else{if(":"!=y){if(a){if(f==y)break e;c("Code point not allowed in scheme: "+y);break e}d="",u=0,l="no scheme";continue}if(this._scheme=d,d="",a)break e;t(this._scheme)&&(this._isRelative=!0),l="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(query="?",l="query"):"#"==y?(this._fragment="#",l="fragment"):f!=y&&" "!=y&&"\n"!=y&&"\r"!=y&&(this._schemeData+=o(y));break;case"no scheme":if(s&&t(s._scheme)){l="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=y||"/"!=e[u+1]){c("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==y){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query;break e}if("/"==y||"\\"==y)"\\"==y&&c("\\ is an invalid code point."),l="relative slash";else if("?"==y)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",l="query";else{if("#"!=y){var E=e[u+1],_=e[u+2];("file"!=this._scheme||!m.test(y)||":"!=E&&"|"!=E||f!=_&&"/"!=_&&"\\"!=_&&"?"!=_&&"#"!=_)&&(this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._path.pop()),l="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this._scheme&&(this._host=s._host,this._port=s._port),l="relative path";continue}"\\"==y&&c("\\ is an invalid code point."),l="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){c("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){c("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}c("Expected authority, got: "+y);break;case"authority":if("@"==y){v&&(c("@ already seen."),d+="%40"),v=!0;for(var S=0;S<d.length;S++){var T=d[S];if(" "!=T&&"\n"!=T&&"\r"!=T)if(":"!=T||null!==this._password){var M=o(T);null!==this._password?this._password+=M:this._username+=M}else this._password="";else c("Invalid whitespace in authority.")}d=""}else{if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){u-=d.length,d="",l="host";continue}d+=y}break;case"file host":if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){2!=d.length||!m.test(d[0])||":"!=d[1]&&"|"!=d[1]?0==d.length?l="relative path start":(this._host=r.call(this,d),d="",l="relative path start"):l="relative path";continue}" "==y||"\n"==y||"\r"==y?c("Invalid whitespace in file host."):d+=y;break;case"host":case"hostname":if(":"!=y||g){if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){if(this._host=r.call(this,d),d="",l="relative path start",a)break e;continue}" "!=y&&"\n"!=y&&"\r"!=y?("["==y?g=!0:"]"==y&&(g=!1),d+=y):c("Invalid code point in host/hostname: "+y)}else if(this._host=r.call(this,d),d="",l="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(y))d+=y;else{if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y||a){if(""!=d){var O=parseInt(d,10);O!=p[this._scheme]&&(this._port=O+""),d=""}if(a)break e;l="relative path start";continue}" "==y||"\n"==y||"\r"==y?c("Invalid code point in port: "+y):n.call(this)}break;case"relative path start":if("\\"==y&&c("'\\' not allowed in path."),l="relative path","/"!=y&&"\\"!=y)continue;break;case"relative path":if(f!=y&&"/"!=y&&"\\"!=y&&(a||"?"!=y&&"#"!=y))" "!=y&&"\n"!=y&&"\r"!=y&&(d+=o(y));else{"\\"==y&&c("\\ not allowed in relative path.");var L;(L=h[d.toLowerCase()])&&(d=L),".."==d?(this._path.pop(),"/"!=y&&"\\"!=y&&this._path.push("")):"."==d&&"/"!=y&&"\\"!=y?this._path.push(""):"."!=d&&("file"==this._scheme&&0==this._path.length&&2==d.length&&m.test(d[0])&&"|"==d[1]&&(d=d[0]+":"),this._path.push(d)),d="","?"==y?(this._query="?",l="query"):"#"==y&&(this._fragment="#",l="fragment")}break;case"query":a||"#"!=y?f!=y&&" "!=y&&"\n"!=y&&"\r"!=y&&(this._query+=i(y)):(this._fragment="#",l="fragment");break;case"fragment":f!=y&&" "!=y&&"\n"!=y&&"\r"!=y&&(this._fragment+=y)}u++}}function s(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function c(e,t){void 0===t||t instanceof c||(t=new c(String(t))),this._url=e,s.call(this);var n=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");a.call(this,n,null,t)}var l=!1;if(!e.forceJURL)try{var u=new URL("b","http://a");u.pathname="c%20d",l="http://a/c%20d"===u.href}catch(d){}if(!l){var p=Object.create(null);p.ftp=21,p.file=0,p.gopher=70,p.http=80,p.https=443,p.ws=80,p.wss=443;var h=Object.create(null);h["%2e"]=".",h[".%2e"]="..",h["%2e."]="..",h["%2e%2e"]="..";var f=void 0,m=/[a-zA-Z]/,w=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return(""!=this._username||null!=this._password)&&(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){s.call(this),a.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||a.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],a.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),a.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),a.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return e=this.host,e?this._scheme+"://"+e:""}};var v=e.URL;v&&(c.createObjectURL=function(e){return v.createObjectURL.apply(v,arguments)},c.revokeObjectURL=function(e){v.revokeObjectURL(e)}),e.URL=c}}(this),function(e){function t(e){y.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=y;y=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=w.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=w.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++E}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function l(e,t){return _=new s(e,t)}function u(e){return S?S:(S=c(_),S.oldValue=e,S)}function d(){_=S=void 0}function p(e){return e===S||e===_}function h(e,t){return e===t?e:S&&p(e)?S:null}function f(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var m,w=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var v=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=v;v=[],t.forEach(function(e){e()})}}),m=function(e){v.push(e),window.postMessage(g,"*")}}var b=!1,y=[],E=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=w.get(e);r||w.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new f(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=w.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var _,S;f.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=h(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=w.get(e);t||w.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=w.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new l("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=l("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,p=e.target;"DOMNodeInserted"===e.type?(s=[p],c=[]):(s=[],c=[p]);var h=p.previousSibling,f=p.nextSibling,o=l("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=c,o.previousSibling=h,o.nextSibling=f,i(e.relatedNode,function(e){return e.childList?o:void 0})}d()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||f,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===v}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===v)&&(t.removeEventListener(g,o),r(e,t))};t.addEventListener(g,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==l&&e&&e({allImports:s,loadedImports:u,errorImports:d})}function r(e){o(e),u.push(this),c++,n()}function i(e){d.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,l=s.length,u=[],d=[];if(l)for(var p,h=0;l>h&&(p=s[h]);h++)a(p)?(c++,n()):(p.addEventListener("load",r),p.addEventListener("error",i));else n()}function a(e){return d?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&l(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function l(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",d=Boolean(u in document.createElement("link")),p=Boolean(window.ShadowDOMPolyfill),h=function(e){return p?ShadowDOMPolyfill.wrapIfNeeded(e):e},f=h(document),m={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return h(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var w=/Trident|Edge/.test(navigator.userAgent),v=w?"complete":"interactive",g="readystatechange";d&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)l(e)}()),t(function(e){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=d,e.rootDocument=f,e.whenReady=t,e.isIE=w}(HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),
-this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,l=e.isIE,u=e.IMPORT_LINK_TYPE,d="link[rel="+u+"]",p={documentSelectors:d,importsSelectors:[d,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=p,e.IMPORT_SELECTOR=d}),HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,l=e.Loader,u=e.Observer,d=e.parser,p={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){h.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);h.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}d.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),d.parseNext()},loadedAll:function(){d.parseNext()}},h=new l(p.loaded.bind(p),p.loadedAll.bind(p));if(p.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=p,e.importLoader=h}),HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){y(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),p(e)&&y(e,function(e){s(e)})}function i(e){T.push(e),S||(S=!0,setTimeout(a))}function a(){S=!1;for(var e,t=T,n=0,r=t.length;r>n&&(e=t[n]);n++)e();T=[]}function s(e){_?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&p(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function l(e){u(e),y(e,function(e){u(e)})}function u(e){_?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!p(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function p(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)w(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e)}),M(e.removedNodes,function(e){e.localName&&l(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function w(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),w(e),b.dom&&console.groupEnd()}function g(e){E(e,v)}var b=e.flags,y=e.forSubtree,E=e.forDocumentTree,_=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=_;var S=!1,T=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;O&&(Element.prototype.createShadowRoot=function(){var e=O.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(l(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=d(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&v(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}function i(e){var t=l(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e["native"]=t}}function c(e){return b(M(e.tag),e)}function l(e){return e?S[e.toLowerCase()]:void 0}function u(e,t){S[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===T?h(t,n):O(e,t)}function h(e,t){var n=l(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=h(e),r.setAttribute("is",t),r):(r=M(e),e.indexOf("-")>=0&&y(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,w=e.isIE11OrOlder,v=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,y=e.implementPrototype,E=e.useNative,_=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],S={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),O=document.createElementNS.bind(document);m=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),w&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=h,document.createElementNS=p,e.registry=S,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements),function(e){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(e,r)}})}(window.WebComponents),function(e){"use strict";function t(){window.Polymer===o&&(window.Polymer=function(){throw new Error('You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components/polymer/polymer.html">')})}if(!window.performance){var n=Date.now();window.performance={now:function(){return Date.now()-n}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var r=[],o=function(e,t){"string"!=typeof e&&1===arguments.length&&Array.prototype.push.call(arguments,document._currentScript),r.push(arguments)};window.Polymer=o,e.consumeDeclarations=function(t){e.consumeDeclarations=function(){throw"Possible attempt to load Polymer twice"},t&&t(r),r=null},HTMLImports.useNative?t():addEventListener("DOMContentLoaded",t)}(window.WebComponents),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents),function(e){window.Platform=e}(window.WebComponents); \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/README.chromium b/chromium/third_party/catapult/third_party/py_vulcanize/README.chromium
deleted file mode 100644
index 0b32761b781..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/README.chromium
+++ /dev/null
@@ -1,8 +0,0 @@
-Name: py_vulcanize
-URL: N/A
-Version: N/A
-
-Description:
-Py-vulcanize, formerly known as TVCM (trace-viewer component model).
-This code doesn't actually live anywhere else currently, but it may
-be split out into a separate repository in the future.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/bin/run_py_tests b/chromium/third_party/catapult/third_party/py_vulcanize/bin/run_py_tests
deleted file mode 100755
index 2584fcda0da..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/bin/run_py_tests
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-_CATAPULT = os.path.abspath(os.path.join(
- os.path.dirname(__file__), os.path.pardir, os.path.pardir, os.path.pardir))
-
-
-def _AddToPathIfNeeded(path):
- if path not in sys.path:
- sys.path.insert(0, path)
-
-
-if __name__ == '__main__':
- _AddToPathIfNeeded(_CATAPULT)
-
- from hooks import install
- if '--no-install-hooks' in sys.argv:
- sys.argv.remove('--no-install-hooks')
- else:
- install.InstallHooks()
-
- from catapult_build import run_with_typ
- sys.exit(run_with_typ.Run(
- os.path.join(_CATAPULT, 'third_party', 'py_vulcanize')))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/__init__.py
deleted file mode 100644
index f3a4bd1bb15..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/__init__.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Trace-viewer component model.
-
-This module implements trace-viewer's component model.
-"""
-
-from py_vulcanize.generate import * # pylint: disable=wildcard-import
-from py_vulcanize.project import Project
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs.py
deleted file mode 100644
index dfcb5e60bf4..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import codecs
-import os
-import sys
-import collections
-import StringIO
-
-
-class WithableStringIO(StringIO.StringIO):
-
- def __enter__(self, *args):
- return self
-
- def __exit__(self, *args):
- pass
-
-
-class FakeFS(object):
-
- def __init__(self, initial_filenames_and_contents=None):
- self._file_contents = {}
- if initial_filenames_and_contents:
- for k, v in initial_filenames_and_contents.iteritems():
- self._file_contents[k] = v
-
- self._bound = False
- self._real_codecs_open = codecs.open
- self._real_open = sys.modules['__builtin__'].open
- self._real_abspath = os.path.abspath
- self._real_exists = os.path.exists
- self._real_walk = os.walk
- self._real_listdir = os.listdir
-
- def __enter__(self):
- self.Bind()
- return self
-
- def __exit__(self, *args):
- self.Unbind()
-
- def Bind(self):
- assert not self._bound
- codecs.open = self._FakeCodecsOpen
- sys.modules['__builtin__'].open = self._FakeOpen
- os.path.abspath = self._FakeAbspath
- os.path.exists = self._FakeExists
- os.walk = self._FakeWalk
- os.listdir = self._FakeListDir
- self._bound = True
-
- def Unbind(self):
- assert self._bound
- codecs.open = self._real_codecs_open
- sys.modules['__builtin__'].open = self._real_open
- os.path.abspath = self._real_abspath
- os.path.exists = self._real_exists
- os.walk = self._real_walk
- os.listdir = self._real_listdir
- self._bound = False
-
- def AddFile(self, path, contents):
- assert path not in self._file_contents
- path = os.path.normpath(path)
- self._file_contents[path] = contents
-
- def _FakeOpen(self, path, mode=None):
- if mode is None:
- mode = 'r'
- if mode == 'r' or mode == 'rU' or mode == 'rb':
- if path not in self._file_contents:
- return self._real_open(path, mode)
- return WithableStringIO(self._file_contents[path])
-
- raise NotImplementedError()
-
- def _FakeCodecsOpen(self, path, mode=None,
- encoding=None): # pylint: disable=unused-argument
- if mode is None:
- mode = 'r'
- if mode == 'r' or mode == 'rU' or mode == 'rb':
- if path not in self._file_contents:
- return self._real_open(path, mode)
- return WithableStringIO(self._file_contents[path])
-
- raise NotImplementedError()
-
- def _FakeAbspath(self, path):
- """Normalize the path and ensure it starts with os.path.sep.
-
- The tests all assume paths start with things like '/my/project',
- and this abspath implementaion makes that assumption work correctly
- on Windows.
- """
- normpath = os.path.normpath(path)
- if not normpath.startswith(os.path.sep):
- normpath = os.path.sep + normpath
- return normpath
-
- def _FakeExists(self, path):
- if path in self._file_contents:
- return True
- return self._real_exists(path)
-
- def _FakeWalk(self, top):
- assert os.path.isabs(top)
- all_filenames = self._file_contents.keys()
- pending_prefixes = collections.deque()
- pending_prefixes.append(top)
- visited_prefixes = set()
- while len(pending_prefixes):
- prefix = pending_prefixes.popleft()
- if prefix in visited_prefixes:
- continue
- visited_prefixes.add(prefix)
- if prefix.endswith(os.path.sep):
- prefix_with_trailing_sep = prefix
- else:
- prefix_with_trailing_sep = prefix + os.path.sep
-
- dirs = set()
- files = []
- for filename in all_filenames:
- if not filename.startswith(prefix_with_trailing_sep):
- continue
- relative_to_prefix = os.path.relpath(filename, prefix)
-
- dirpart = os.path.dirname(relative_to_prefix)
- if len(dirpart) == 0:
- files.append(relative_to_prefix)
- continue
- parts = dirpart.split(os.sep)
- if len(parts) == 0:
- dirs.add(dirpart)
- else:
- pending = os.path.join(prefix, parts[0])
- dirs.add(parts[0])
- pending_prefixes.appendleft(pending)
-
- dirs = sorted(dirs)
- yield prefix, dirs, files
-
- def _FakeListDir(self, dirname):
- raise NotImplementedError()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs_unittest.py
deleted file mode 100644
index 08250138a5e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/fake_fs_unittest.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-
-from py_vulcanize import fake_fs
-
-
-class FakeFSUnittest(unittest.TestCase):
-
- def testBasic(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/blah/x', 'foobar')
- with fs:
- assert os.path.exists(os.path.normpath('/blah/x'))
- self.assertEquals(
- 'foobar',
- open(os.path.normpath('/blah/x'), 'r').read())
-
- def testWithableOpen(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/blah/x', 'foobar')
- with fs:
- with open(os.path.normpath('/blah/x'), 'r') as f:
- self.assertEquals('foobar', f.read())
-
- def testWalk(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/x/w2/w3/z3.txt', '')
- fs.AddFile('/x/w/z.txt', '')
- fs.AddFile('/x/y.txt', '')
- fs.AddFile('/a.txt', 'foobar')
- with fs:
- gen = os.walk(os.path.normpath('/'))
- r = gen.next()
- self.assertEquals((os.path.normpath('/'), ['x'], ['a.txt']), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x'), ['w', 'w2'], ['y.txt']), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x/w'), [], ['z.txt']), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x/w2'), ['w3'], []), r)
-
- r = gen.next()
- self.assertEquals((os.path.normpath('/x/w2/w3'), [], ['z3.txt']), r)
-
- self.assertRaises(StopIteration, gen.next)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate.py
deleted file mode 100644
index 636838006ca..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate.py
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-import subprocess
-import tempfile
-import StringIO
-
-from py_vulcanize import html_generation_controller
-
-
-html_warning_message = """
-
-
-<!--
-WARNING: This file is auto generated.
-
- Do not edit directly.
--->
-"""
-
-js_warning_message = """
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/* WARNING: This file is auto generated.
- *
- * Do not edit directly.
- */
-"""
-
-css_warning_message = """
-/* Copyright 2015 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-/* WARNING: This file is auto-generated.
- *
- * Do not edit directly.
- */
-"""
-
-
-def _AssertIsUTF8(f):
- if isinstance(f, StringIO.StringIO):
- return
- assert f.encoding == 'utf-8'
-
-
-def _MinifyJS(input_js):
- py_vulcanize_path = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '..'))
- rjsmin_path = os.path.abspath(
- os.path.join(py_vulcanize_path, 'third_party', 'rjsmin', 'rjsmin.py'))
-
- with tempfile.NamedTemporaryFile() as _:
- args = [
- 'python',
- rjsmin_path
- ]
- p = subprocess.Popen(args,
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- res = p.communicate(input=input_js)
- errorcode = p.wait()
- if errorcode != 0:
- sys.stderr.write('rJSmin exited with error code %d' % errorcode)
- sys.stderr.write(res[1])
- raise Exception('Failed to minify, omgah')
- return res[0]
-
-
-def GenerateJS(load_sequence,
- use_include_tags_for_scripts=False,
- dir_for_include_tag_root=None,
- minify=False,
- report_sizes=False):
- f = StringIO.StringIO()
- GenerateJSToFile(f,
- load_sequence,
- use_include_tags_for_scripts,
- dir_for_include_tag_root,
- minify=minify,
- report_sizes=report_sizes)
-
- return f.getvalue()
-
-
-def GenerateJSToFile(f,
- load_sequence,
- use_include_tags_for_scripts=False,
- dir_for_include_tag_root=None,
- minify=False,
- report_sizes=False):
- _AssertIsUTF8(f)
- if use_include_tags_for_scripts and dir_for_include_tag_root is None:
- raise Exception('Must provide dir_for_include_tag_root')
-
- f.write(js_warning_message)
- f.write('\n')
-
- if not minify:
- flatten_to_file = f
- else:
- flatten_to_file = StringIO.StringIO()
-
- for module in load_sequence:
- module.AppendJSContentsToFile(flatten_to_file,
- use_include_tags_for_scripts,
- dir_for_include_tag_root)
- if minify:
- js = flatten_to_file.getvalue()
- minified_js = _MinifyJS(js)
- f.write(minified_js)
- f.write('\n')
-
- if report_sizes:
- for module in load_sequence:
- s = StringIO.StringIO()
- module.AppendJSContentsToFile(s,
- use_include_tags_for_scripts,
- dir_for_include_tag_root)
-
- # Add minified size info.
- js = s.getvalue()
- min_js_size = str(len(_MinifyJS(js)))
-
- # Print names for this module. Some domain-specific simplifications
- # are included to make pivoting more obvious.
- parts = module.name.split('.')
- if parts[:2] == ['base', 'ui']:
- parts = ['base_ui'] + parts[2:]
- if parts[:2] == ['tracing', 'importer']:
- parts = ['importer'] + parts[2:]
- tln = parts[0]
- sln = '.'.join(parts[:2])
-
- # Output
- print '%i\t%s\t%s\t%s\t%s' % (len(js), min_js_size, module.name, tln, sln)
- sys.stdout.flush()
-
-
-class ExtraScript(object):
-
- def __init__(self, script_id=None, text_content=None, content_type=None):
- if script_id is not None:
- assert script_id[0] != '#'
- self.script_id = script_id
- self.text_content = text_content
- self.content_type = content_type
-
- def WriteToFile(self, output_file):
- _AssertIsUTF8(output_file)
- attrs = []
- if self.script_id:
- attrs.append('id="%s"' % self.script_id)
- if self.content_type:
- attrs.append('content-type="%s"' % self.content_type)
-
- if len(attrs) > 0:
- output_file.write('<script %s>\n' % ' '.join(attrs))
- else:
- output_file.write('<script>\n')
- if self.text_content:
- output_file.write(self.text_content)
- output_file.write('</script>\n')
-
-
-def _MinifyCSS(css_text):
- py_vulcanize_path = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '..'))
- rcssmin_path = os.path.abspath(
- os.path.join(py_vulcanize_path, 'third_party', 'rcssmin', 'rcssmin.py'))
-
- with tempfile.NamedTemporaryFile() as _:
- rcssmin_args = ['python', rcssmin_path]
- p = subprocess.Popen(rcssmin_args,
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- res = p.communicate(input=css_text)
- errorcode = p.wait()
- if errorcode != 0:
- sys.stderr.write('rCSSmin exited with error code %d' % errorcode)
- sys.stderr.write(res[1])
- raise Exception('Failed to generate css for %s.' % css_text)
- return res[0]
-
-
-def GenerateStandaloneHTMLAsString(*args, **kwargs):
- f = StringIO.StringIO()
- GenerateStandaloneHTMLToFile(f, *args, **kwargs)
- return f.getvalue()
-
-
-def GenerateStandaloneHTMLToFile(output_file,
- load_sequence,
- title=None,
- flattened_js_url=None,
- extra_scripts=None,
- minify=False,
- report_sizes=False,
- output_html_head_and_body=True):
- """Writes a HTML file with the content of all modules in a load sequence.
-
- The load_sequence is a list of (HTML or JS) Module objects; the order that
- they're inserted into the file depends on their type and position in the load
- sequence.
- """
- _AssertIsUTF8(output_file)
- extra_scripts = extra_scripts or []
-
- if output_html_head_and_body:
- output_file.write(
- '<!DOCTYPE html>\n'
- '<html>\n'
- ' <head i18n-values="dir:textdirection;">\n'
- ' <meta http-equiv="Content-Type" content="text/html;'
- 'charset=utf-8">\n')
- if title:
- output_file.write(' <title>%s</title>\n ' % title)
- else:
- assert title is None
-
- loader = load_sequence[0].loader
-
- written_style_sheets = set()
-
- class HTMLGenerationController(
- html_generation_controller.HTMLGenerationController):
-
- def __init__(self, module):
- self.module = module
-
- def GetHTMLForStylesheetHRef(self, href):
- resource = self.module.HRefToResource(
- href, '<link rel="stylesheet" href="%s">' % href)
- style_sheet = loader.LoadStyleSheet(resource.name)
-
- if style_sheet in written_style_sheets:
- return None
- written_style_sheets.add(style_sheet)
-
- text = style_sheet.contents_with_inlined_images
- if minify:
- text = _MinifyCSS(text)
- return '<style>\n%s\n</style>' % text
-
- for module in load_sequence:
- controller = HTMLGenerationController(module)
- module.AppendHTMLContentsToFile(output_file, controller, minify=minify)
-
- if flattened_js_url:
- output_file.write('<script src="%s"></script>\n' % flattened_js_url)
- else:
- output_file.write('<script>\n')
- js = GenerateJS(load_sequence, minify=minify, report_sizes=report_sizes)
- output_file.write(js)
- output_file.write('</script>\n')
-
- for extra_script in extra_scripts:
- extra_script.WriteToFile(output_file)
-
- if output_html_head_and_body:
- output_file.write('</head>\n <body>\n </body>\n</html>\n')
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate_unittest.py
deleted file mode 100644
index c79441a1e34..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/generate_unittest.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-
-from py_vulcanize import generate
-from py_vulcanize import fake_fs
-from py_vulcanize import project as project_module
-
-
-class GenerateTests(unittest.TestCase):
-
- def setUp(self):
- self.fs = fake_fs.FakeFS()
- self.fs.AddFile(
- '/x/foo/my_module.html',
- ('<!DOCTYPE html>\n'
- '<link rel="import" href="/foo/other_module.html">\n'))
- self.fs.AddFile(
- '/x/foo/other_module.html',
- ('<!DOCTYPE html>\n'
- '<script src="/foo/raw/raw_script.js"></script>\n'
- '<script>\n'
- ' \'use strict\';\n'
- ' HelloWorld();\n'
- '</script>\n'))
- self.fs.AddFile('/x/foo/raw/raw_script.js', '\n/* raw script */\n')
- self.fs.AddFile('/x/components/polymer/polymer.min.js', '\n')
-
- self.project = project_module.Project([os.path.normpath('/x')])
-
- def testJSGeneration(self):
- with self.fs:
- load_sequence = self.project.CalcLoadSequenceForModuleNames(
- [os.path.normpath('foo.my_module')])
- generate.GenerateJS(load_sequence)
-
- def testHTMLGeneration(self):
- with self.fs:
- load_sequence = self.project.CalcLoadSequenceForModuleNames(
- [os.path.normpath('foo.my_module')])
- result = generate.GenerateStandaloneHTMLAsString(load_sequence)
- self.assertIn('HelloWorld();', result)
-
- def testExtraScriptWithWriteContentsFunc(self):
- with self.fs:
- load_sequence = self.project.CalcLoadSequenceForModuleNames(
- [os.path.normpath('foo.my_module')])
-
- class ExtraScript(generate.ExtraScript):
-
- def WriteToFile(self, f):
- f.write('<script>ExtraScript!</script>')
-
- result = generate.GenerateStandaloneHTMLAsString(
- load_sequence, title='Title', extra_scripts=[ExtraScript()])
- self.assertIn('ExtraScript', result)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_generation_controller.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_generation_controller.py
deleted file mode 100644
index c804fe8ca3e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_generation_controller.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import re
-from py_vulcanize import style_sheet
-
-
-class HTMLGenerationController(object):
-
- def __init__(self):
- self.current_module = None
-
- def GetHTMLForStylesheetHRef(self, href): # pylint: disable=unused-argument
- return None
-
- def GetHTMLForInlineStylesheet(self, contents):
- if self.current_module is None:
- if re.search('url\(.+\)', contents):
- raise Exception(
- 'Default HTMLGenerationController cannot handle inline style urls')
- return contents
-
- module_dirname = os.path.dirname(self.current_module.resource.absolute_path)
- ss = style_sheet.ParsedStyleSheet(
- self.current_module.loader, module_dirname, contents)
- return ss.contents_with_inlined_images
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module.py
deleted file mode 100644
index 97855cae838..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import re
-
-from py_vulcanize import js_utils
-from py_vulcanize import module
-from py_vulcanize import parse_html_deps
-from py_vulcanize import style_sheet
-
-
-def IsHTMLResourceTheModuleGivenConflictingResourceNames(
- js_resource, html_resource): # pylint: disable=unused-argument
- return 'polymer-element' in html_resource.contents
-
-
-class HTMLModule(module.Module):
-
- @property
- def _module_dir_name(self):
- return os.path.dirname(self.resource.absolute_path)
-
- def Parse(self):
- try:
- parser_results = parse_html_deps.HTMLModuleParser().Parse(self.contents)
- except Exception as ex:
- raise Exception('While parsing %s: %s' % (self.name, str(ex)))
-
- self.dependency_metadata = Parse(self.loader,
- self.name,
- self._module_dir_name,
- self.IsThirdPartyComponent(),
- parser_results)
- self._parser_results = parser_results
-
- def Load(self):
- super(HTMLModule, self).Load()
-
- reachable_names = set([m.name
- for m in self.all_dependent_modules_recursive])
- if 'tr.exportTo' in self.contents:
- if 'tracing.base.base' not in reachable_names:
- raise Exception('%s: Does not have a dependency on base' %
- os.path.relpath(self.resource.absolute_path))
-
- def GetTVCMDepsModuleType(self):
- return 'py_vulcanize.HTML_MODULE_TYPE'
-
- def AppendJSContentsToFile(self,
- f,
- use_include_tags_for_scripts,
- dir_for_include_tag_root):
- super(HTMLModule, self).AppendJSContentsToFile(f,
- use_include_tags_for_scripts,
- dir_for_include_tag_root)
- for inline_script in self._parser_results.inline_scripts:
- js = inline_script.contents
-
- js = js_utils.EscapeJSIfNeeded(js)
-
- f.write(js)
- f.write('\n')
-
- def AppendHTMLContentsToFile(self, f, ctl, minify=False):
- super(HTMLModule, self).AppendHTMLContentsToFile(f, ctl)
-
- ctl.current_module = self
- try:
- for piece in self._parser_results.YieldHTMLInPieces(ctl, minify=minify):
- f.write(piece)
- finally:
- ctl.current_module = None
-
- def HRefToResource(self, href, tag_for_err_msg):
- return _HRefToResource(self.loader, self.name, self._module_dir_name,
- href, tag_for_err_msg)
-
- def AppendDirectlyDependentFilenamesTo(
- self, dependent_filenames, include_raw_scripts=True):
- super(HTMLModule, self).AppendDirectlyDependentFilenamesTo(
- dependent_filenames, include_raw_scripts)
- for contents in self._parser_results.inline_stylesheets:
- module_dirname = os.path.dirname(self.resource.absolute_path)
- ss = style_sheet.ParsedStyleSheet(
- self.loader, module_dirname, contents)
- ss.AppendDirectlyDependentFilenamesTo(dependent_filenames)
-
-
-def _HRefToResource(
- loader, module_name, module_dir_name, href, tag_for_err_msg):
- if href[0] == '/':
- resource = loader.FindResourceGivenRelativePath(
- os.path.normpath(href[1:]))
- else:
- abspath = os.path.normpath(os.path.join(module_dir_name,
- os.path.normpath(href)))
- resource = loader.FindResourceGivenAbsolutePath(abspath)
-
- if not resource:
- raise module.DepsException(
- 'In %s, the %s cannot be loaded because '
- 'it is not in the search path' % (module_name, tag_for_err_msg))
- try:
- resource.contents
- except:
- raise module.DepsException('In %s, %s points at a nonexistent file ' % (
- module_name, tag_for_err_msg))
- return resource
-
-
-def Parse(loader, module_name, module_dir_name, is_component, parser_results):
- res = module.ModuleDependencyMetadata()
- if is_component:
- return res
-
- # External script references.
- for href in parser_results.scripts_external:
- resource = _HRefToResource(loader, module_name, module_dir_name,
- href,
- tag_for_err_msg='<script src="%s">' % href)
- res.dependent_raw_script_relative_paths.append(
- resource.unix_style_relative_path)
-
- # External imports. Mostly the same as <script>, but we know its a module.
- for href in parser_results.imports:
- if not href.endswith('.html'):
- raise Exception(
- 'In %s, the <link rel="import" href="%s"> must point at a '
- 'file with an html suffix' % (module_name, href))
-
- resource = _HRefToResource(
- loader, module_name, module_dir_name, href,
- tag_for_err_msg='<link rel="import" href="%s">' % href)
- res.dependent_module_names.append(resource.name)
-
- # Style sheets.
- for href in parser_results.stylesheets:
- resource = _HRefToResource(
- loader, module_name, module_dir_name, href,
- tag_for_err_msg='<link rel="stylesheet" href="%s">' % href)
- res.style_sheet_names.append(resource.name)
-
- return res
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module_unittest.py
deleted file mode 100644
index 828d29b0409..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module_unittest.py
+++ /dev/null
@@ -1,318 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-import StringIO
-
-from py_vulcanize import fake_fs
-from py_vulcanize import generate
-from py_vulcanize import html_generation_controller
-from py_vulcanize import html_module
-from py_vulcanize import parse_html_deps
-from py_vulcanize import project as project_module
-from py_vulcanize import resource
-from py_vulcanize import resource_loader as resource_loader
-
-
-class ResourceWithFakeContents(resource.Resource):
-
- def __init__(self, toplevel_dir, absolute_path, fake_contents):
- """A resource with explicitly provided contents.
-
- If the resource does not exist, then pass fake_contents=None. This will
- cause accessing the resource contents to raise an exception mimicking the
- behavior of regular resources."""
- super(ResourceWithFakeContents, self).__init__(toplevel_dir, absolute_path)
- self._fake_contents = fake_contents
-
- @property
- def contents(self):
- if self._fake_contents is None:
- raise Exception('File not found')
- return self._fake_contents
-
-
-class FakeLoader(object):
-
- def __init__(self, source_paths, initial_filenames_and_contents=None):
- self._source_paths = source_paths
- self._file_contents = {}
- if initial_filenames_and_contents:
- for k, v in initial_filenames_and_contents.iteritems():
- self._file_contents[k] = v
-
- def FindResourceGivenAbsolutePath(self, absolute_path):
- candidate_paths = []
- for source_path in self._source_paths:
- if absolute_path.startswith(source_path):
- candidate_paths.append(source_path)
- if len(candidate_paths) == 0:
- return None
-
- # Sort by length. Longest match wins.
- candidate_paths.sort(lambda x, y: len(x) - len(y))
- longest_candidate = candidate_paths[-1]
-
- return ResourceWithFakeContents(
- longest_candidate, absolute_path,
- self._file_contents.get(absolute_path, None))
-
- def FindResourceGivenRelativePath(self, relative_path):
- absolute_path = None
- for script_path in self._source_paths:
- absolute_path = os.path.join(script_path, relative_path)
- if absolute_path in self._file_contents:
- return ResourceWithFakeContents(script_path, absolute_path,
- self._file_contents[absolute_path])
- return None
-
-
-class ParseTests(unittest.TestCase):
-
- def testValidExternalScriptReferenceToRawScript(self):
- parse_results = parse_html_deps.HTMLModuleParserResults("""<!DOCTYPE html>
- <script src="../foo.js">
- """)
-
- file_contents = {}
- file_contents[os.path.normpath('/tmp/a/foo.js')] = """
-'i am just some raw script';
-"""
-
- metadata = html_module.Parse(
- FakeLoader([os.path.normpath('/tmp')], file_contents),
- 'a.b.start',
- '/tmp/a/b/',
- is_component=False,
- parser_results=parse_results)
- self.assertEquals([], metadata.dependent_module_names)
- self.assertEquals(
- ['a/foo.js'], metadata.dependent_raw_script_relative_paths)
-
- def testExternalScriptReferenceToModuleOutsideScriptPath(self):
- parse_results = parse_html_deps.HTMLModuleParserResults("""<!DOCTYPE html>
- <script src="/foo.js">
- """)
-
- file_contents = {}
- file_contents[os.path.normpath('/foo.js')] = ''
-
- def DoIt():
- html_module.Parse(FakeLoader([os.path.normpath('/tmp')], file_contents),
- 'a.b.start',
- '/tmp/a/b/',
- is_component=False,
- parser_results=parse_results)
- self.assertRaises(Exception, DoIt)
-
- def testExternalScriptReferenceToFileThatDoesntExist(self):
- parse_results = parse_html_deps.HTMLModuleParserResults("""<!DOCTYPE html>
- <script src="/foo.js">
- """)
-
- file_contents = {}
-
- def DoIt():
- html_module.Parse(FakeLoader([os.path.normpath('/tmp')], file_contents),
- 'a.b.start',
- '/tmp/a/b/',
- is_component=False,
- parser_results=parse_results)
- self.assertRaises(Exception, DoIt)
-
- def testValidImportOfModule(self):
- parse_results = parse_html_deps.HTMLModuleParserResults("""<!DOCTYPE html>
- <link rel="import" href="../foo.html">
- """)
-
- file_contents = {}
- file_contents[os.path.normpath('/tmp/a/foo.html')] = """
-"""
-
- metadata = html_module.Parse(
- FakeLoader([os.path.normpath('/tmp')], file_contents),
- 'a.b.start',
- '/tmp/a/b/',
- is_component=False,
- parser_results=parse_results)
- self.assertEquals(['a.foo'], metadata.dependent_module_names)
-
- def testStyleSheetImport(self):
- parse_results = parse_html_deps.HTMLModuleParserResults("""<!DOCTYPE html>
- <link rel="stylesheet" href="../foo.css">
- """)
-
- file_contents = {}
- file_contents[os.path.normpath('/tmp/a/foo.css')] = """
-"""
- metadata = html_module.Parse(
- FakeLoader([os.path.normpath('/tmp')], file_contents),
- 'a.b.start',
- '/tmp/a/b/',
- is_component=False,
- parser_results=parse_results)
- self.assertEquals([], metadata.dependent_module_names)
- self.assertEquals(['a.foo'], metadata.style_sheet_names)
-
- def testUsingAbsoluteHref(self):
- parse_results = parse_html_deps.HTMLModuleParserResults("""<!DOCTYPE html>
- <script src="/foo.js">
- """)
-
- file_contents = {}
- file_contents[os.path.normpath('/src/foo.js')] = ''
-
- metadata = html_module.Parse(
- FakeLoader([os.path.normpath("/tmp"), os.path.normpath("/src")],
- file_contents),
- "a.b.start",
- "/tmp/a/b/",
- is_component=False,
- parser_results=parse_results)
- self.assertEquals(['foo.js'], metadata.dependent_raw_script_relative_paths)
-
-
-class HTMLModuleTests(unittest.TestCase):
-
- def testBasicModuleGeneration(self):
- file_contents = {}
- file_contents[os.path.normpath('/tmp/a/b/start.html')] = """
-<!DOCTYPE html>
-<link rel="import" href="/widget.html">
-<link rel="stylesheet" href="../common.css">
-<script src="/raw_script.js"></script>
-<dom-module id="start">
- <template>
- </template>
- <script>
- 'use strict';
- console.log('inline script for start.html got written');
- </script>
-</dom-module>
-"""
- file_contents[os.path.normpath('/py_vulcanize/py_vulcanize.html')] = """<!DOCTYPE html>
-"""
- file_contents[os.path.normpath('/components/widget.html')] = """
-<!DOCTYPE html>
-<link rel="import" href="/py_vulcanize.html">
-<widget name="widget.html"></widget>
-<script>
-'use strict';
-console.log('inline script for widget.html');
-</script>
-"""
- file_contents[os.path.normpath('/tmp/a/common.css')] = """
-/* /tmp/a/common.css was written */
-"""
- file_contents[os.path.normpath('/raw/raw_script.js')] = """
-console.log('/raw/raw_script.js was written');
-"""
- file_contents[os.path.normpath(
- '/raw/components/polymer/polymer.min.js')] = """
-"""
-
- with fake_fs.FakeFS(file_contents):
- project = project_module.Project(
- [os.path.normpath('/py_vulcanize/'),
- os.path.normpath('/tmp/'),
- os.path.normpath('/components/'),
- os.path.normpath('/raw/')])
- loader = resource_loader.ResourceLoader(project)
- a_b_start_module = loader.LoadModule(module_name='a.b.start')
- load_sequence = project.CalcLoadSequenceForModules([a_b_start_module])
-
- # Check load sequence names.
- load_sequence_names = [x.name for x in load_sequence]
- self.assertEquals(['py_vulcanize',
- 'widget',
- 'a.b.start'], load_sequence_names)
-
- # Check module_deps on a_b_start_module
- def HasDependentModule(module, name):
- return [x for x in module.dependent_modules
- if x.name == name]
- assert HasDependentModule(a_b_start_module, 'widget')
-
- # Check JS generation.
- js = generate.GenerateJS(load_sequence)
- assert 'inline script for start.html' in js
- assert 'inline script for widget.html' in js
- assert '/raw/raw_script.js' in js
-
- # Check HTML generation.
- html = generate.GenerateStandaloneHTMLAsString(
- load_sequence, title='', flattened_js_url='/blah.js')
- assert '<dom-module id="start">' in html
- assert 'inline script for widget.html' not in html
- assert 'common.css' in html
-
- def testPolymerConversion(self):
- file_contents = {}
- file_contents[os.path.normpath('/tmp/a/b/my_component.html')] = """
-<!DOCTYPE html>
-<dom-module id="my-component">
- <template>
- </template>
- <script>
- 'use strict';
- Polymer ( {
- is: "my-component"
- });
- </script>
-</dom-module>
-"""
- with fake_fs.FakeFS(file_contents):
- project = project_module.Project([
- os.path.normpath('/py_vulcanize/'), os.path.normpath('/tmp/')])
- loader = resource_loader.ResourceLoader(project)
- my_component = loader.LoadModule(module_name='a.b.my_component')
-
- f = StringIO.StringIO()
- my_component.AppendJSContentsToFile(
- f,
- use_include_tags_for_scripts=False,
- dir_for_include_tag_root=None)
- js = f.getvalue().rstrip()
- expected_js = """
- 'use strict';
- Polymer ( {
- is: "my-component"
- });
-""".rstrip()
- self.assertEquals(expected_js, js)
-
- def testInlineStylesheetURLs(self):
- file_contents = {}
- file_contents[os.path.normpath('/tmp/a/b/my_component.html')] = """
-<!DOCTYPE html>
-<style>
-.some-rule {
- background-image: url('../something.jpg');
-}
-</style>
-"""
- file_contents[os.path.normpath('/tmp/a/something.jpg')] = 'jpgdata'
- with fake_fs.FakeFS(file_contents):
- project = project_module.Project([
- os.path.normpath('/py_vulcanize/'), os.path.normpath('/tmp/')])
- loader = resource_loader.ResourceLoader(project)
- my_component = loader.LoadModule(module_name='a.b.my_component')
-
- computed_deps = []
- my_component.AppendDirectlyDependentFilenamesTo(computed_deps)
- self.assertEquals(set(computed_deps),
- set([os.path.normpath('/tmp/a/b/my_component.html'),
- os.path.normpath('/tmp/a/something.jpg')]))
-
- f = StringIO.StringIO()
- ctl = html_generation_controller.HTMLGenerationController()
- my_component.AppendHTMLContentsToFile(f, ctl)
- html = f.getvalue().rstrip()
- # FIXME: This is apparently not used.
- expected_html = """
-.some-rule {
- background-image: url(data:image/jpg;base64,anBnZGF0YQ==);
-}
-""".rstrip()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils.py
deleted file mode 100644
index 6e6ca9db674..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-def EscapeJSIfNeeded(js):
- return js.replace('</script>', '<\/script>')
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils_unittest.py
deleted file mode 100644
index cb8025c97db..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/js_utils_unittest.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from py_vulcanize import js_utils
-
-
-class ValidateStrictModeTests(unittest.TestCase):
-
- def testEscapeJSIfNeeded(self):
- self.assertEqual(
- '<script>var foo;<\/script>',
- js_utils.EscapeJSIfNeeded('<script>var foo;</script>'))
- self.assertEqual(
- '<script>var foo;<\/script>',
- js_utils.EscapeJSIfNeeded('<script>var foo;<\/script>'))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module.py
deleted file mode 100644
index 295d224a33a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module.py
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""This module contains the Module class and other classes for resources.
-
-The Module class represents a module in the trace viewer system. A module has
-a name, and may require a variety of other resources, such as stylesheets,
-template objects, raw JavaScript, or other modules.
-
-Other resources include HTML templates, raw JavaScript files, and stylesheets.
-"""
-
-import os
-import inspect
-import codecs
-
-from py_vulcanize import js_utils
-
-
-class DepsException(Exception):
- """Exceptions related to module dependency resolution."""
-
- def __init__(self, fmt, *args):
- from py_vulcanize import style_sheet as style_sheet_module
- context = []
- frame = inspect.currentframe()
- while frame:
- frame_locals = frame.f_locals
-
- module_name = None
- if 'self' in frame_locals:
- s = frame_locals['self']
- if isinstance(s, Module):
- module_name = s.name
- if isinstance(s, style_sheet_module.StyleSheet):
- module_name = s.name + '.css'
- if not module_name:
- if 'module' in frame_locals:
- module = frame_locals['module']
- if isinstance(s, Module):
- module_name = module.name
- elif 'm' in frame_locals:
- module = frame_locals['m']
- if isinstance(s, Module):
- module_name = module.name
-
- if module_name:
- if len(context):
- if context[-1] != module_name:
- context.append(module_name)
- else:
- context.append(module_name)
-
- frame = frame.f_back
-
- context.reverse()
- self.context = context
- context_str = '\n'.join(' %s' % x for x in context)
- Exception.__init__(
- self, 'While loading:\n%s\nGot: %s' % (context_str, (fmt % args)))
-
-
-class ModuleDependencyMetadata(object):
-
- def __init__(self):
- self.dependent_module_names = []
- self.dependent_raw_script_relative_paths = []
- self.style_sheet_names = []
-
- def AppendMetdata(self, other):
- self.dependent_module_names += other.dependent_module_names
- self.dependent_raw_script_relative_paths += \
- other.dependent_raw_script_relative_paths
- self.style_sheet_names += other.style_sheet_names
-
-
-_next_module_id = 1
-
-
-class Module(object):
- """Represents a JavaScript module.
-
- Interesting properties include:
- name: Module name, may include a namespace, e.g. 'py_vulcanize.foo'.
- filename: The filename of the actual module.
- contents: The text contents of the module.
- dependent_modules: Other modules that this module depends on.
-
- In addition to these properties, a Module also contains lists of other
- resources that it depends on.
- """
-
- def __init__(self, loader, name, resource, load_resource=True):
- assert isinstance(name, basestring), 'Got %s instead' % repr(name)
-
- global _next_module_id
- self._id = _next_module_id
- _next_module_id += 1
-
- self.loader = loader
- self.name = name
- self.resource = resource
-
- if load_resource:
- f = codecs.open(self.filename, mode='r', encoding='utf-8')
- self.contents = f.read()
- f.close()
- else:
- self.contents = None
-
- # Dependency metadata, set up during Parse().
- self.dependency_metadata = None
-
- # Actual dependencies, set up during load().
- self.dependent_modules = []
- self.dependent_raw_scripts = []
- self.style_sheets = []
-
- # Caches.
- self._all_dependent_modules_recursive = None
-
- def __repr__(self):
- return '%s(%s)' % (self.__class__.__name__, self.name)
-
- @property
- def id(self):
- return self._id
-
- @property
- def filename(self):
- return self.resource.absolute_path
-
- def IsThirdPartyComponent(self):
- """Checks whether this module is a third-party Polymer component."""
- if os.path.join('third_party', 'components') in self.filename:
- return True
- if os.path.join('third_party', 'polymer', 'components') in self.filename:
- return True
- return False
-
- def Parse(self):
- """Parses self.contents and fills in the module's dependency metadata."""
- raise NotImplementedError()
-
- def GetTVCMDepsModuleType(self):
- """Returns the py_vulcanize.setModuleInfo type for this module"""
- raise NotImplementedError()
-
- def AppendJSContentsToFile(self,
- f,
- use_include_tags_for_scripts,
- dir_for_include_tag_root):
- """Appends the js for this module to the provided file."""
- for dependent_raw_script in self.dependent_raw_scripts:
- if use_include_tags_for_scripts:
- rel_filename = os.path.relpath(dependent_raw_script.filename,
- dir_for_include_tag_root)
- f.write("""<include src="%s">\n""" % rel_filename)
- else:
- f.write(js_utils.EscapeJSIfNeeded(dependent_raw_script.contents))
- f.write('\n')
-
- def AppendHTMLContentsToFile(self, f, ctl, minify=False):
- """Appends the HTML for this module [without links] to the provided file."""
- pass
-
- def Load(self):
- """Loads the sub-resources that this module depends on from its dependency
- metadata.
-
- Raises:
- DepsException: There was a problem finding one of the dependencies.
- Exception: There was a problem parsing a module that this one depends on.
- """
- assert self.name, 'Module name must be set before dep resolution.'
- assert self.filename, 'Module filename must be set before dep resolution.'
- assert self.name in self.loader.loaded_modules, (
- 'Module must be registered in resource loader before loading.')
-
- metadata = self.dependency_metadata
- for name in metadata.dependent_module_names:
- module = self.loader.LoadModule(module_name=name)
- self.dependent_modules.append(module)
-
- for path in metadata.dependent_raw_script_relative_paths:
- raw_script = self.loader.LoadRawScript(path)
- self.dependent_raw_scripts.append(raw_script)
-
- for name in metadata.style_sheet_names:
- style_sheet = self.loader.LoadStyleSheet(name)
- self.style_sheets.append(style_sheet)
-
- @property
- def all_dependent_modules_recursive(self):
- if self._all_dependent_modules_recursive:
- return self._all_dependent_modules_recursive
-
- self._all_dependent_modules_recursive = set(self.dependent_modules)
- for dependent_module in self.dependent_modules:
- self._all_dependent_modules_recursive.update(
- dependent_module.all_dependent_modules_recursive)
- return self._all_dependent_modules_recursive
-
- def ComputeLoadSequenceRecursive(self, load_sequence, already_loaded_set,
- depth=0):
- """Recursively builds up a load sequence list.
-
- Args:
- load_sequence: A list which will be incrementally built up.
- already_loaded_set: A set of modules that has already been added to the
- load sequence list.
- depth: The depth of recursion. If it too deep, that indicates a loop.
- """
- if depth > 32:
- raise Exception('Include loop detected on %s', self.name)
- for dependent_module in self.dependent_modules:
- if dependent_module.name in already_loaded_set:
- continue
- dependent_module.ComputeLoadSequenceRecursive(
- load_sequence, already_loaded_set, depth + 1)
- if self.name not in already_loaded_set:
- already_loaded_set.add(self.name)
- load_sequence.append(self)
-
- def GetAllDependentFilenamesRecursive(self, include_raw_scripts=True):
- dependent_filenames = []
-
- visited_modules = set()
-
- def Get(module):
- module.AppendDirectlyDependentFilenamesTo(
- dependent_filenames, include_raw_scripts)
- visited_modules.add(module)
- for m in module.dependent_modules:
- if m in visited_modules:
- continue
- Get(m)
-
- Get(self)
- return dependent_filenames
-
- def AppendDirectlyDependentFilenamesTo(
- self, dependent_filenames, include_raw_scripts=True):
- dependent_filenames.append(self.resource.absolute_path)
- if include_raw_scripts:
- for raw_script in self.dependent_raw_scripts:
- dependent_filenames.append(raw_script.resource.absolute_path)
- for style_sheet in self.style_sheets:
- style_sheet.AppendDirectlyDependentFilenamesTo(dependent_filenames)
-
-
-class RawScript(object):
- """Represents a raw script resource referenced by a module via the
- py_vulcanize.requireRawScript(xxx) directive."""
-
- def __init__(self, resource):
- self.resource = resource
-
- @property
- def filename(self):
- return self.resource.absolute_path
-
- @property
- def contents(self):
- return self.resource.contents
-
- def __repr__(self):
- return 'RawScript(%s)' % self.filename
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module_unittest.py
deleted file mode 100644
index ed92db35362..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module_unittest.py
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Tests for the module module, which contains Module and related classes."""
-
-import os
-import unittest
-
-from py_vulcanize import fake_fs
-from py_vulcanize import module
-from py_vulcanize import resource_loader
-from py_vulcanize import project as project_module
-
-
-class ModuleIntegrationTests(unittest.TestCase):
-
- def test_module(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/src/x.html', """
-<!DOCTYPE html>
-<link rel="import" href="/y.html">
-<link rel="import" href="/z.html">
-<script>
-'use strict';
-</script>
-""")
- fs.AddFile('/src/y.html', """
-<!DOCTYPE html>
-<link rel="import" href="/z.html">
-""")
- fs.AddFile('/src/z.html', """
-<!DOCTYPE html>
-""")
- fs.AddFile('/src/py_vulcanize.html', '<!DOCTYPE html>')
- with fs:
- project = project_module.Project([os.path.normpath('/src/')])
- loader = resource_loader.ResourceLoader(project)
- x_module = loader.LoadModule('x')
-
- self.assertEquals([loader.loaded_modules['y'],
- loader.loaded_modules['z']],
- x_module.dependent_modules)
-
- already_loaded_set = set()
- load_sequence = []
- x_module.ComputeLoadSequenceRecursive(load_sequence, already_loaded_set)
-
- self.assertEquals([loader.loaded_modules['z'],
- loader.loaded_modules['y'],
- x_module],
- load_sequence)
-
- def testBasic(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/x/src/my_module.html', """
-<!DOCTYPE html>
-<link rel="import" href="/py_vulcanize/foo.html">
-});
-""")
- fs.AddFile('/x/py_vulcanize/foo.html', """
-<!DOCTYPE html>
-});
-""")
- project = project_module.Project([os.path.normpath('/x')])
- loader = resource_loader.ResourceLoader(project)
- with fs:
- my_module = loader.LoadModule(module_name='src.my_module')
- dep_names = [x.name for x in my_module.dependent_modules]
- self.assertEquals(['py_vulcanize.foo'], dep_names)
-
- def testDepsExceptionContext(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/x/src/my_module.html', """
-<!DOCTYPE html>
-<link rel="import" href="/py_vulcanize/foo.html">
-""")
- fs.AddFile('/x/py_vulcanize/foo.html', """
-<!DOCTYPE html>
-<link rel="import" href="missing.html">
-""")
- project = project_module.Project([os.path.normpath('/x')])
- loader = resource_loader.ResourceLoader(project)
- with fs:
- exc = None
- try:
- loader.LoadModule(module_name='src.my_module')
- assert False, 'Expected an exception'
- except module.DepsException as e:
- exc = e
- self.assertEquals(
- ['src.my_module', 'py_vulcanize.foo'],
- exc.context)
-
- def testGetAllDependentFilenamesRecursive(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/x/y/z/foo.html', """
-<!DOCTYPE html>
-<link rel="import" href="/z/foo2.html">
-<link rel="stylesheet" href="/z/foo.css">
-<script src="/bar.js"></script>
-""")
- fs.AddFile('/x/y/z/foo.css', """
-.x .y {
- background-image: url(foo.jpeg);
-}
-""")
- fs.AddFile('/x/y/z/foo.jpeg', '')
- fs.AddFile('/x/y/z/foo2.html', """
-<!DOCTYPE html>
-""")
- fs.AddFile('/x/raw/bar.js', 'hello')
- project = project_module.Project([
- os.path.normpath('/x/y'), os.path.normpath('/x/raw/')])
- loader = resource_loader.ResourceLoader(project)
- with fs:
- my_module = loader.LoadModule(module_name='z.foo')
- self.assertEquals(1, len(my_module.dependent_raw_scripts))
-
- dependent_filenames = my_module.GetAllDependentFilenamesRecursive()
- self.assertEquals(
- [
- os.path.normpath('/x/y/z/foo.html'),
- os.path.normpath('/x/raw/bar.js'),
- os.path.normpath('/x/y/z/foo.css'),
- os.path.normpath('/x/y/z/foo.jpeg'),
- os.path.normpath('/x/y/z/foo2.html'),
- ],
- dependent_filenames)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py
deleted file mode 100644
index 6fbe31daac4..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py
+++ /dev/null
@@ -1,216 +0,0 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-from py_vulcanize import module
-from py_vulcanize import strip_js_comments
-from py_vulcanize import html_generation_controller
-
-
-def _AddToPathIfNeeded(path):
- if path not in sys.path:
- sys.path.insert(0, path)
-
-
-def _InitBeautifulSoup():
- catapult_path = os.path.abspath(
- os.path.join(os.path.dirname(__file__),
- os.path.pardir, os.path.pardir, os.path.pardir))
- bs_path = os.path.join(catapult_path, 'third_party', 'beautifulsoup4')
- _AddToPathIfNeeded(bs_path)
-
- html5lib_path = os.path.join(catapult_path, 'third_party', 'html5lib-python')
- _AddToPathIfNeeded(html5lib_path)
-
- six_path = os.path.join(catapult_path, 'third_party', 'six')
- _AddToPathIfNeeded(six_path)
-
-
-_InitBeautifulSoup()
-import bs4
-
-
-class InlineScript(object):
-
- def __init__(self, soup):
- if not soup:
- raise module.DepsException('InlineScript created without soup')
- self._soup = soup
- self._stripped_contents = None
- self._open_tags = None
-
- @property
- def contents(self):
- return unicode(self._soup.string)
-
- @property
- def stripped_contents(self):
- if not self._stripped_contents:
- self._stripped_contents = strip_js_comments.StripJSComments(
- self.contents)
- return self._stripped_contents
-
- @property
- def open_tags(self):
- if self._open_tags:
- return self._open_tags
- open_tags = []
- cur = self._soup.parent
- while cur:
- if isinstance(cur, bs4.BeautifulSoup):
- break
-
- open_tags.append(_Tag(cur.name, cur.attrs))
- cur = cur.parent
-
- open_tags.reverse()
- assert open_tags[-1].tag == 'script'
- del open_tags[-1]
-
- self._open_tags = open_tags
- return self._open_tags
-
-
-def _CreateSoupWithoutHeadOrBody(html):
- soupCopy = bs4.BeautifulSoup(html, 'html5lib')
- soup = bs4.BeautifulSoup()
- soup.reset()
- if soupCopy.head:
- for n in soupCopy.head.contents:
- n.extract()
- soup.append(n)
- if soupCopy.body:
- for n in soupCopy.body.contents:
- n.extract()
- soup.append(n)
- return soup
-
-
-class HTMLModuleParserResults(object):
-
- def __init__(self, html):
- self._soup = bs4.BeautifulSoup(html, 'html5lib')
- self._inline_scripts = None
-
- @property
- def scripts_external(self):
- tags = self._soup.findAll('script', src=True)
- return [t['src'] for t in tags]
-
- @property
- def inline_scripts(self):
- if not self._inline_scripts:
- tags = self._soup.findAll('script', src=None)
- self._inline_scripts = [InlineScript(t.string) for t in tags]
- return self._inline_scripts
-
- @property
- def imports(self):
- tags = self._soup.findAll('link', rel='import')
- return [t['href'] for t in tags]
-
- @property
- def stylesheets(self):
- tags = self._soup.findAll('link', rel='stylesheet')
- return [t['href'] for t in tags]
-
- @property
- def inline_stylesheets(self):
- tags = self._soup.findAll('style')
- return [unicode(t.string) for t in tags]
-
- def YieldHTMLInPieces(self, controller, minify=False):
- yield self.GenerateHTML(controller, minify)
-
- def GenerateHTML(self, controller, minify=False, prettify=False):
- soup = _CreateSoupWithoutHeadOrBody(unicode(self._soup))
-
- # Remove declaration.
- for x in soup.contents:
- if isinstance(x, bs4.Doctype):
- x.extract()
-
- # Remove declaration.
- for x in soup.contents:
- if isinstance(x, bs4.Declaration):
- x.extract()
-
- # Remove all imports.
- imports = soup.findAll('link', rel='import')
- for imp in imports:
- imp.extract()
-
- # Remove all script links.
- scripts_external = soup.findAll('script', src=True)
- for script in scripts_external:
- script.extract()
-
- # Remove all in-line scripts.
- scripts_external = soup.findAll('script', src=None)
- for script in scripts_external:
- script.extract()
-
- # Process all in-line styles.
- inline_styles = soup.findAll('style')
- for style in inline_styles:
- html = controller.GetHTMLForInlineStylesheet(unicode(style.string))
- if html:
- ns = soup.new_tag('style')
- ns.append(bs4.NavigableString(html))
- style.replaceWith(ns)
- else:
- style.extract()
-
- # Rewrite all external stylesheet hrefs or remove, as needed.
- stylesheet_links = soup.findAll('link', rel='stylesheet')
- for stylesheet_link in stylesheet_links:
- html = controller.GetHTMLForStylesheetHRef(stylesheet_link['href'])
- if html:
- tmp = bs4.BeautifulSoup(html, 'html5lib').findAll('style')
- assert len(tmp) == 1
- stylesheet_link.replaceWith(tmp[0])
- else:
- stylesheet_link.extract()
-
- # Remove comments if minifying.
- if minify:
- comments = soup.findAll(
- text=lambda text: isinstance(text, bs4.Comment))
- for comment in comments:
- comment.extract()
- if prettify:
- return soup.prettify('utf-8').strip()
-
- # We are done.
- return unicode(soup).strip()
-
- @property
- def html_contents_without_links_and_script(self):
- return self.GenerateHTML(
- html_generation_controller.HTMLGenerationController())
-
-
-class _Tag(object):
-
- def __init__(self, tag, attrs):
- self.tag = tag
- self.attrs = attrs
-
- def __repr__(self):
- attr_string = ' '.join('%s="%s"' % (x[0], x[1]) for x in self.attrs)
- return '<%s %s>' % (self.tag, attr_string)
-
-
-class HTMLModuleParser():
-
- def Parse(self, html):
- if html is None:
- html = ''
- else:
- if html.find('< /script>') != -1:
- raise Exception('Escape script tags with <\/script>')
-
- return HTMLModuleParserResults(html)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps_unittest.py
deleted file mode 100755
index 2e479aeb498..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps_unittest.py
+++ /dev/null
@@ -1,274 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import re
-import unittest
-
-from py_vulcanize import parse_html_deps
-from py_vulcanize import html_generation_controller
-
-
-class ParseTests(unittest.TestCase):
-
- def test_parse_empty(self):
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse('')
- self.assertEquals([], module.scripts_external)
- self.assertEquals([], module.inline_scripts)
- self.assertEquals([], module.stylesheets)
- self.assertEquals([], module.imports)
-
- def test_parse_none(self):
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(None)
- self.assertEquals([], module.scripts_external)
- self.assertEquals([], module.inline_scripts)
- self.assertEquals([], module.stylesheets)
- self.assertEquals([], module.imports)
-
- def test_parse_script_src_basic(self):
- html = """<!DOCTYPE html>
- <html>
- <head>
- <script src="polymer.min.js"></script>
- <script src="foo.js"></script>
- </head>
- <body>
- </body>
- </html>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals(['polymer.min.js', 'foo.js'], module.scripts_external)
- self.assertEquals([], module.inline_scripts)
- self.assertEquals([], module.stylesheets)
- self.assertEquals([], module.imports)
- self.assertNotIn(
- 'DOCTYPE html',
- module.html_contents_without_links_and_script)
-
- def test_parse_link_rel_import(self):
- html = """<!DOCTYPE html>
- <html>
- <head>
- <link rel="import" href="x-foo.html">
- </head>
- <body>
- </body>
- </html>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals([], module.scripts_external)
- self.assertEquals([], module.inline_scripts)
- self.assertEquals([], module.stylesheets)
- self.assertEquals(['x-foo.html'], module.imports)
-
- def test_parse_script_inline(self):
- html = """<polymer-element name="tk-element-proto">
- <template>
- </template>
- <script>
- py_vulcanize.require("foo");
- py_vulcanize.require('bar');
- </script>
- </polymer-element>"""
-
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals([], module.scripts_external)
- self.assertEquals(1, len(module.inline_scripts))
- self.assertEquals([], module.stylesheets)
- self.assertEquals([], module.imports)
-
- script0 = module.inline_scripts[0]
- val = re.sub(r'\s+', '', script0.contents)
- inner_script = """py_vulcanize.require("foo");py_vulcanize.require('bar');"""
- self.assertEquals(inner_script, val)
-
- self.assertEquals(3, len(script0.open_tags))
- self.assertEquals('polymer-element', script0.open_tags[2].tag)
-
- self.assertNotIn(
- 'py_vulcanize.require("foo");',
- module.html_contents_without_links_and_script)
-
- def test_parse_script_src_sripping(self):
- html = """
-<script src="blah.js"></script>
-"""
- module = parse_html_deps.HTMLModuleParser().Parse(html)
- self.assertEquals('',
- module.html_contents_without_links_and_script)
-
- def test_parse_link_rel_stylesheet(self):
- html = """<polymer-element name="hi">
- <template>
- <link rel="stylesheet" href="frameworkstyles.css">
- </template>
- </polymer-element>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals([], module.scripts_external)
- self.assertEquals([], module.inline_scripts)
- self.assertEquals(['frameworkstyles.css'], module.stylesheets)
- self.assertEquals([], module.imports)
-
- class Ctl(html_generation_controller.HTMLGenerationController):
-
- def GetHTMLForStylesheetHRef(self, href):
- if href == 'frameworkstyles.css':
- return '<style>FRAMEWORK</style>'
- return None
-
- gen_html = module.GenerateHTML(Ctl())
- ghtm = """<polymer-element name="hi">
- <template>
- <style>FRAMEWORK</style>
- </template>
- </polymer-element>"""
- self.assertEquals(ghtm, gen_html)
-
- def test_parse_inline_style(self):
- html = """<style>
- hello
-</style>"""
- module = parse_html_deps.HTMLModuleParser().Parse(html)
- self.assertEquals(html, module.html_contents_without_links_and_script)
-
- class Ctl(html_generation_controller.HTMLGenerationController):
-
- def GetHTMLForInlineStylesheet(self, contents):
- if contents == '\n hello\n':
- return '\n HELLO\n'
- return None
-
- gen_html = module.GenerateHTML(Ctl())
- ghtm = """<style>
- HELLO
-</style>"""
- self.assertEquals(ghtm, gen_html)
-
- def test_parse_style_import(self):
- html = """<polymer-element name="x-blink">
- <template>
- <style>
- @import url(awesome.css);
- </style>
- </template>
- </polymer-element>"""
- parser = parse_html_deps.HTMLModuleParser()
- self.assertRaises(lambda: parser.Parse(html))
-
- def test_nested_templates(self):
- orig_html = """<template>
- <template>
- <div id="foo"></div>
- </template>
- </template>"""
- parser = parse_html_deps.HTMLModuleParser()
- res = parser.Parse(orig_html)
- html = res.html_contents_without_links_and_script
- self.assertEquals(html, orig_html)
-
- def test_html_contents_basic(self):
- html = """<a b="c">d</a>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals(html, module.html_contents_without_links_and_script)
-
- def test_html_contents_with_entity(self):
- html = """<a>&rarr;</a>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals(u'<a>\u2192</a>',
- module.html_contents_without_links_and_script)
-
- def test_html_content_with_charref(self):
- html = """<a>&#62;</a>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals('<a>&gt;</a>',
- module.html_contents_without_links_and_script)
-
- def test_html_content_start_end_br(self):
- html = """<a><br /></a>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals('<a><br/></a>',
- module.html_contents_without_links_and_script)
-
- def test_html_content_start_end_img(self):
- html = """<a><img src="foo.png" id="bar" /></a>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals('<a><img id="bar" src="foo.png"/></a>',
- module.html_contents_without_links_and_script)
-
- def test_html_contents_with_link_stripping(self):
- html = """<a b="c">d</a>
- <link rel="import" href="x-foo.html">"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals("""<a b="c">d</a>""",
- module.html_contents_without_links_and_script.strip())
-
- def test_html_contents_with_style_link_stripping(self):
- html = """<a b="c">d</a>
- <link rel="stylesheet" href="frameworkstyles.css">"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals("""<a b="c">d</a>""",
- module.html_contents_without_links_and_script.strip())
-
- def test_br_does_not_raise(self):
- html = """<div><br/></div>"""
- parser = parse_html_deps.HTMLModuleParser()
- parser.Parse(html)
-
- def test_p_does_not_raises(self):
- html = """<div></p></div>"""
- parser = parse_html_deps.HTMLModuleParser()
- parser.Parse(html)
-
- def test_link_endlink_does_not_raise(self):
- html = """<link rel="stylesheet" href="foo.css"></link>"""
- parser = parse_html_deps.HTMLModuleParser()
- parser.Parse(html)
-
- def test_link_script_does_not_raise(self):
- html = """<link rel="stylesheet" href="foo.css">
- <script>
- </script>"""
- parser = parse_html_deps.HTMLModuleParser()
- parser.Parse(html)
-
- def test_script_with_script_inside_as_js(self):
- html = """<script>
- var html_lines = [
- '<script>',
- '<\/script>',
- ];
- </script>"""
- parser = parse_html_deps.HTMLModuleParser()
- parser.Parse(html)
-
- def test_invalid_script_escaping_raises(self):
- html = """<script>
- var html_lines = [
- '<script>',
- '< /script>',
- ];
- </script>"""
- parser = parse_html_deps.HTMLModuleParser()
-
- def DoIt():
- parser.Parse(html)
- self.assertRaises(Exception, DoIt)
-
- def test_script_with_cdata(self):
- html = """<script></h2></script>"""
- parser = parse_html_deps.HTMLModuleParser()
- module = parser.Parse(html)
- self.assertEquals(1, len(module.inline_scripts))
- self.assertEquals('</h2>', module.inline_scripts[0].contents)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/project.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/project.py
deleted file mode 100644
index 034796462c8..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/project.py
+++ /dev/null
@@ -1,229 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import collections
-import os
-import cStringIO
-
-from py_vulcanize import resource_loader
-
-
-def _FindAllFilesRecursive(source_paths):
- all_filenames = set()
- for source_path in source_paths:
- for dirpath, _, filenames in os.walk(source_path):
- for f in filenames:
- if f.startswith('.'):
- continue
- x = os.path.abspath(os.path.join(dirpath, f))
- all_filenames.add(x)
- return all_filenames
-
-
-class AbsFilenameList(object):
-
- def __init__(self, willDirtyCallback):
- self._willDirtyCallback = willDirtyCallback
- self._filenames = []
- self._filenames_set = set()
-
- def _WillBecomeDirty(self):
- if self._willDirtyCallback:
- self._willDirtyCallback()
-
- def append(self, filename):
- assert os.path.isabs(filename)
- self._WillBecomeDirty()
- self._filenames.append(filename)
- self._filenames_set.add(filename)
-
- def extend(self, iterable):
- self._WillBecomeDirty()
- for filename in iterable:
- assert os.path.isabs(filename)
- self._filenames.append(filename)
- self._filenames_set.add(filename)
-
- def appendRel(self, basedir, filename):
- assert os.path.isabs(basedir)
- self._WillBecomeDirty()
- n = os.path.abspath(os.path.join(basedir, filename))
- self._filenames.append(n)
- self._filenames_set.add(n)
-
- def extendRel(self, basedir, iterable):
- self._WillBecomeDirty()
- assert os.path.isabs(basedir)
- for filename in iterable:
- n = os.path.abspath(os.path.join(basedir, filename))
- self._filenames.append(n)
- self._filenames_set.add(n)
-
- def __contains__(self, x):
- return x in self._filenames_set
-
- def __len__(self):
- return self._filenames.__len__()
-
- def __iter__(self):
- return iter(self._filenames)
-
- def __repr__(self):
- return repr(self._filenames)
-
- def __str__(self):
- return str(self._filenames)
-
-
-class Project(object):
-
- py_vulcanize_path = os.path.abspath(os.path.join(
- os.path.dirname(__file__), '..'))
-
- def __init__(self, source_paths=None):
- """
- source_paths: A list of top-level directories in which modules and raw
- scripts can be found. Module paths are relative to these directories.
- """
- self._loader = None
- self._frozen = False
- self.source_paths = AbsFilenameList(self._WillPartOfPathChange)
-
- if source_paths is not None:
- self.source_paths.extend(source_paths)
-
- def Freeze(self):
- self._frozen = True
-
- def _WillPartOfPathChange(self):
- if self._frozen:
- raise Exception('The project is frozen. You cannot edit it now')
- self._loader = None
-
- @staticmethod
- def FromDict(d):
- return Project(d['source_paths'])
-
- def AsDict(self):
- return {
- 'source_paths': list(self.source_paths)
- }
-
- def __repr__(self):
- return "Project(%s)" % repr(self.source_paths)
-
- def AddSourcePath(self, path):
- self.source_paths.append(path)
-
- @property
- def loader(self):
- if self._loader is None:
- self._loader = resource_loader.ResourceLoader(self)
- return self._loader
-
- def ResetLoader(self):
- self._loader = None
-
- def _Load(self, filenames):
- return [self.loader.LoadModule(module_filename=filename) for
- filename in filenames]
-
- def LoadModule(self, module_name=None, module_filename=None):
- return self.loader.LoadModule(module_name=module_name,
- module_filename=module_filename)
-
- def CalcLoadSequenceForModuleNames(self, module_names):
- modules = [self.loader.LoadModule(module_name=name) for
- name in module_names]
- return self.CalcLoadSequenceForModules(modules)
-
- def CalcLoadSequenceForModules(self, modules):
- already_loaded_set = set()
- load_sequence = []
- for m in modules:
- m.ComputeLoadSequenceRecursive(load_sequence, already_loaded_set)
- return load_sequence
-
- def GetDepsGraphFromModuleNames(self, module_names):
- modules = [self.loader.LoadModule(module_name=name) for
- name in module_names]
- return self.GetDepsGraphFromModules(modules)
-
- def GetDepsGraphFromModules(self, modules):
- load_sequence = self.CalcLoadSequenceForModules(modules)
- g = _Graph()
- for m in load_sequence:
- g.AddModule(m)
-
- for dep in m.dependent_modules:
- g.AddEdge(m, dep.id)
-
- # FIXME: _GetGraph is not defined. Maybe `return g` is intended?
- return _GetGraph(load_sequence)
-
- def GetDominatorGraphForModulesNamed(self, module_names, load_sequence):
- modules = [self.loader.LoadModule(module_name=name)
- for name in module_names]
- return self.GetDominatorGraphForModules(modules, load_sequence)
-
- def GetDominatorGraphForModules(self, start_modules, load_sequence):
- modules_by_id = {}
- for m in load_sequence:
- modules_by_id[m.id] = m
-
- module_referrers = collections.defaultdict(list)
- for m in load_sequence:
- for dep in m.dependent_modules:
- module_referrers[dep].append(m)
-
- # Now start at the top module and reverse.
- visited = set()
- g = _Graph()
-
- pending = collections.deque()
- pending.extend(start_modules)
- while len(pending):
- cur = pending.pop()
-
- g.AddModule(cur)
- visited.add(cur)
-
- for out_dep in module_referrers[cur]:
- if out_dep in visited:
- continue
- g.AddEdge(out_dep, cur)
- visited.add(out_dep)
- pending.append(out_dep)
-
- # Visited -> Dot
- return g.GetDot()
-
-
-class _Graph(object):
-
- def __init__(self):
- self.nodes = []
- self.edges = []
-
- def AddModule(self, m):
- f = cStringIO.StringIO()
- m.AppendJSContentsToFile(f, False, None)
-
- attrs = {
- 'label': '%s (%i)' % (m.name, f.tell())
- }
-
- f.close()
-
- attr_items = ['%s="%s"' % (x, y) for x, y in attrs.iteritems()]
- node = 'M%i [%s];' % (m.id, ','.join(attr_items))
- self.nodes.append(node)
-
- def AddEdge(self, mFrom, mTo):
- edge = 'M%i -> M%i;' % (mFrom.id, mTo.id)
- self.edges.append(edge)
-
- def GetDot(self):
- return 'digraph deps {\n\n%s\n\n%s\n}\n' % (
- '\n'.join(self.nodes), '\n'.join(self.edges))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource.py
deleted file mode 100644
index 853dff94437..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""A Resource is a file and its various associated canonical names."""
-
-import codecs
-import os
-
-
-class Resource(object):
- """Represents a file found via a path search."""
-
- def __init__(self, toplevel_dir, absolute_path, binary=False):
- self.toplevel_dir = toplevel_dir
- self.absolute_path = absolute_path
- self._contents = None
- self._binary = binary
-
- @property
- def relative_path(self):
- """The path to the file from the top-level directory"""
- return os.path.relpath(self.absolute_path, self.toplevel_dir)
-
- @property
- def unix_style_relative_path(self):
- return self.relative_path.replace(os.sep, '/')
-
- @property
- def name(self):
- """The dotted name for this resource based on its relative path."""
- return self.name_from_relative_path(self.relative_path)
-
- @staticmethod
- def name_from_relative_path(relative_path):
- dirname = os.path.dirname(relative_path)
- basename = os.path.basename(relative_path)
- modname = os.path.splitext(basename)[0]
- if len(dirname):
- name = dirname.replace(os.path.sep, '.') + '.' + modname
- else:
- name = modname
- return name
-
- @property
- def contents(self):
- if self._contents:
- return self._contents
- if not os.path.exists(self.absolute_path):
- raise Exception('%s not found.' % self.absolute_path)
- if self._binary:
- f = open(self.absolute_path, mode='rb')
- else:
- f = codecs.open(self.absolute_path, mode='r', encoding='utf-8')
- self._contents = f.read()
- f.close()
- return self._contents
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py
deleted file mode 100644
index 7b5edac8f9f..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""ResourceFinder is a helper class for finding resources given their name."""
-
-import codecs
-import os
-
-from py_vulcanize import module
-from py_vulcanize import style_sheet as style_sheet_module
-from py_vulcanize import resource as resource_module
-from py_vulcanize import html_module
-from py_vulcanize import strip_js_comments
-
-
-class ResourceLoader(object):
- """Manges loading modules and their dependencies from files.
-
- Modules handle parsing and the construction of their individual dependency
- pointers. The loader deals with bookkeeping of what has been loaded, and
- mapping names to file resources.
- """
-
- def __init__(self, project):
- self.project = project
- self.stripped_js_by_filename = {}
- self.loaded_modules = {}
- self.loaded_raw_scripts = {}
- self.loaded_style_sheets = {}
- self.loaded_images = {}
-
- @property
- def source_paths(self):
- """A list of base directories to search for modules under."""
- return self.project.source_paths
-
- def FindResource(self, some_path, binary=False):
- """Finds a Resource for the given path.
-
- Args:
- some_path: A relative or absolute path to a file.
-
- Returns:
- A Resource or None.
- """
- if os.path.isabs(some_path):
- return self.FindResourceGivenAbsolutePath(some_path, binary)
- else:
- return self.FindResourceGivenRelativePath(some_path, binary)
-
- def FindResourceGivenAbsolutePath(self, absolute_path, binary=False):
- """Returns a Resource for the given absolute path."""
- candidate_paths = []
- for source_path in self.source_paths:
- if absolute_path.startswith(source_path):
- candidate_paths.append(source_path)
- if len(candidate_paths) == 0:
- return None
-
- # Sort by length. Longest match wins.
- candidate_paths.sort(lambda x, y: len(x) - len(y))
- longest_candidate = candidate_paths[-1]
- return resource_module.Resource(longest_candidate, absolute_path, binary)
-
- def FindResourceGivenRelativePath(self, relative_path, binary=False):
- """Returns a Resource for the given relative path."""
- absolute_path = None
- for script_path in self.source_paths:
- absolute_path = os.path.join(script_path, relative_path)
- if os.path.exists(absolute_path):
- return resource_module.Resource(script_path, absolute_path, binary)
- return None
-
- def _FindResourceGivenNameAndSuffix(
- self, requested_name, extension, return_resource=False):
- """Searches for a file and reads its contents.
-
- Args:
- requested_name: The name of the resource that was requested.
- extension: The extension for this requested resource.
-
- Returns:
- A (path, contents) pair.
- """
- pathy_name = requested_name.replace('.', os.sep)
- filename = pathy_name + extension
-
- resource = self.FindResourceGivenRelativePath(filename)
- if return_resource:
- return resource
- if not resource:
- return None, None
- return _read_file(resource.absolute_path)
-
- def FindModuleResource(self, requested_module_name):
- """Finds a module javascript file and returns a Resource, or none."""
- js_resource = self._FindResourceGivenNameAndSuffix(
- requested_module_name, '.js', return_resource=True)
- html_resource = self._FindResourceGivenNameAndSuffix(
- requested_module_name, '.html', return_resource=True)
- if js_resource and html_resource:
- if html_module.IsHTMLResourceTheModuleGivenConflictingResourceNames(
- js_resource, html_resource):
- return html_resource
- return js_resource
- elif js_resource:
- return js_resource
- return html_resource
-
- def LoadModule(self, module_name=None, module_filename=None):
- assert bool(module_name) ^ bool(module_filename), (
- 'Must provide either module_name or module_filename.')
- if module_filename:
- resource = self.FindResource(module_filename)
- if not resource:
- raise Exception('Could not find %s in %s' % (
- module_filename, repr(self.source_paths)))
- module_name = resource.name
- else:
- resource = None # Will be set if we end up needing to load.
-
- if module_name in self.loaded_modules:
- assert self.loaded_modules[module_name].contents
- return self.loaded_modules[module_name]
-
- if not resource: # happens when module_name was given
- resource = self.FindModuleResource(module_name)
- if not resource:
- raise module.DepsException('No resource for module "%s"' % module_name)
-
- m = html_module.HTMLModule(self, module_name, resource)
- self.loaded_modules[module_name] = m
-
- # Fake it, this is probably either polymer.min.js or platform.js which are
- # actually .js files....
- if resource.absolute_path.endswith('.js'):
- return m
-
- m.Parse()
- m.Load()
- return m
-
- def LoadRawScript(self, relative_raw_script_path):
- resource = None
- for source_path in self.source_paths:
- possible_absolute_path = os.path.join(
- source_path, os.path.normpath(relative_raw_script_path))
- if os.path.exists(possible_absolute_path):
- resource = resource_module.Resource(
- source_path, possible_absolute_path)
- break
- if not resource:
- raise module.DepsException(
- 'Could not find a file for raw script %s in %s' %
- (relative_raw_script_path, self.source_paths))
- assert relative_raw_script_path == resource.unix_style_relative_path, (
- 'Expected %s == %s' % (relative_raw_script_path,
- resource.unix_style_relative_path))
-
- if resource.absolute_path in self.loaded_raw_scripts:
- return self.loaded_raw_scripts[resource.absolute_path]
-
- raw_script = module.RawScript(resource)
- self.loaded_raw_scripts[resource.absolute_path] = raw_script
- return raw_script
-
- def LoadStyleSheet(self, name):
- if name in self.loaded_style_sheets:
- return self.loaded_style_sheets[name]
-
- resource = self._FindResourceGivenNameAndSuffix(
- name, '.css', return_resource=True)
- if not resource:
- raise module.DepsException(
- 'Could not find a file for stylesheet %s' % name)
-
- style_sheet = style_sheet_module.StyleSheet(self, name, resource)
- style_sheet.load()
- self.loaded_style_sheets[name] = style_sheet
- return style_sheet
-
- def LoadImage(self, abs_path):
- if abs_path in self.loaded_images:
- return self.loaded_images[abs_path]
-
- if not os.path.exists(abs_path):
- raise module.DepsException("url('%s') did not exist" % abs_path)
-
- res = self.FindResourceGivenAbsolutePath(abs_path, binary=True)
- if res is None:
- raise module.DepsException("url('%s') was not in search path" % abs_path)
-
- image = style_sheet_module.Image(res)
- self.loaded_images[abs_path] = image
- return image
-
- def GetStrippedJSForFilename(self, filename, early_out_if_no_py_vulcanize):
- if filename in self.stripped_js_by_filename:
- return self.stripped_js_by_filename[filename]
-
- with open(filename, 'r') as f:
- contents = f.read(4096)
- if early_out_if_no_py_vulcanize and ('py_vulcanize' not in contents):
- return None
-
- s = strip_js_comments.StripJSComments(contents)
- self.stripped_js_by_filename[filename] = s
- return s
-
-
-def _read_file(absolute_path):
- """Reads a file and returns a (path, contents) pair.
-
- Args:
- absolute_path: Absolute path to a file.
-
- Raises:
- Exception: The given file doesn't exist.
- IOError: There was a problem opening or reading the file.
- """
- if not os.path.exists(absolute_path):
- raise Exception('%s not found.' % absolute_path)
- f = codecs.open(absolute_path, mode='r', encoding='utf-8')
- contents = f.read()
- f.close()
- return absolute_path, contents
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_unittest.py
deleted file mode 100644
index 4da23556f24..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_unittest.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import unittest
-
-from py_vulcanize import resource
-
-
-class ResourceUnittest(unittest.TestCase):
-
- def testBasic(self):
- r = resource.Resource('/a', '/a/b/c.js')
- self.assertEquals('b.c', r.name)
- self.assertEquals(os.path.join('b', 'c.js'), r.relative_path)
- self.assertEquals('b/c.js', r.unix_style_relative_path)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments.py
deleted file mode 100644
index d63c667531a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Utility function for stripping comments out of JavaScript source code."""
-
-import re
-
-
-def _TokenizeJS(text):
- """Splits source code text into segments in preparation for comment stripping.
-
- Note that this doesn't tokenize for parsing. There is no notion of statements,
- variables, etc. The only tokens of interest are comment-related tokens.
-
- Args:
- text: The contents of a JavaScript file.
-
- Yields:
- A succession of strings in the file, including all comment-related symbols.
- """
- rest = text
- tokens = ['//', '/*', '*/', '\n']
- next_tok = re.compile('|'.join(re.escape(x) for x in tokens))
- while len(rest):
- m = next_tok.search(rest)
- if not m:
- # end of string
- yield rest
- return
- min_index = m.start()
- end_index = m.end()
-
- if min_index > 0:
- yield rest[:min_index]
-
- yield rest[min_index:end_index]
- rest = rest[end_index:]
-
-
-def StripJSComments(text):
- """Strips comments out of JavaScript source code.
-
- Args:
- text: JavaScript source text.
-
- Returns:
- JavaScript source text with comments stripped out.
- """
- result_tokens = []
- token_stream = _TokenizeJS(text).__iter__()
- while True:
- try:
- t = token_stream.next()
- except StopIteration:
- break
-
- if t == '//':
- while True:
- try:
- t2 = token_stream.next()
- if t2 == '\n':
- break
- except StopIteration:
- break
- elif t == '/*':
- nesting = 1
- while True:
- try:
- t2 = token_stream.next()
- if t2 == '/*':
- nesting += 1
- elif t2 == '*/':
- nesting -= 1
- if nesting == 0:
- break
- except StopIteration:
- break
- else:
- result_tokens.append(t)
- return ''.join(result_tokens)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments_unittest.py
deleted file mode 100644
index 685cb824a24..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/strip_js_comments_unittest.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Tests for strip_js_comments module."""
-
-import unittest
-
-from py_vulcanize import strip_js_comments
-
-
-# This test case tests a protected method.
-# pylint: disable=W0212
-class JavaScriptStripCommentTests(unittest.TestCase):
- """Test case for _strip_js_comments and _TokenizeJS."""
-
- def test_strip_comments(self):
- self.assertEquals(
- 'A ', strip_js_comments.StripJSComments('A // foo'))
- self.assertEquals(
- 'A bar', strip_js_comments.StripJSComments('A // foo\nbar'))
- self.assertEquals(
- 'A b', strip_js_comments.StripJSComments('A /* foo */ b'))
- self.assertEquals(
- 'A b', strip_js_comments.StripJSComments('A /* foo\n */ b'))
-
- def test_tokenize_empty(self):
- tokens = list(strip_js_comments._TokenizeJS(''))
- self.assertEquals([], tokens)
-
- def test_tokenize_nl(self):
- tokens = list(strip_js_comments._TokenizeJS('\n'))
- self.assertEquals(['\n'], tokens)
-
- def test_tokenize_slashslash_comment(self):
- tokens = list(strip_js_comments._TokenizeJS('A // foo'))
- self.assertEquals(['A ', '//', ' foo'], tokens)
-
- def test_tokenize_slashslash_comment_then_newline(self):
- tokens = list(strip_js_comments._TokenizeJS('A // foo\nbar'))
- self.assertEquals(['A ', '//', ' foo', '\n', 'bar'], tokens)
-
- def test_tokenize_cstyle_comment_one_line(self):
- tokens = list(strip_js_comments._TokenizeJS('A /* foo */'))
- self.assertEquals(['A ', '/*', ' foo ', '*/'], tokens)
-
- def test_tokenize_cstyle_comment_multi_line(self):
- tokens = list(strip_js_comments._TokenizeJS('A /* foo\n*bar\n*/'))
- self.assertEquals(['A ', '/*', ' foo', '\n', '*bar', '\n', '*/'], tokens)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet.py
deleted file mode 100644
index 5338762588e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import base64
-import os
-import re
-
-
-class Image(object):
-
- def __init__(self, resource):
- self.resource = resource
- self.aliases = []
-
- @property
- def relative_path(self):
- return self.resource.relative_path
-
- @property
- def absolute_path(self):
- return self.resource.absolute_path
-
- @property
- def contents(self):
- return self.resource.contents
-
-
-class ParsedStyleSheet(object):
-
- def __init__(self, loader, containing_dirname, contents):
- self.loader = loader
- self.contents = contents
- self._images = None
- self._Load(containing_dirname)
-
- @property
- def images(self):
- return self._images
-
- def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
- for i in self.images:
- dependent_filenames.append(i.resource.absolute_path)
-
- @property
- def contents_with_inlined_images(self):
- images_by_url = {}
- for i in self.images:
- for a in i.aliases:
- images_by_url[a] = i
-
- def InlineUrl(m):
- url = m.group('url')
- image = images_by_url[url]
-
- ext = os.path.splitext(image.absolute_path)[1]
- data = base64.standard_b64encode(image.contents)
-
- return 'url(data:image/%s;base64,%s)' % (ext[1:], data)
-
- # I'm assuming we only have url()'s associated with images
- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
- InlineUrl, self.contents)
-
- def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
- for i in self.images:
- dependent_filenames.append(i.resource.absolute_path)
-
- def _Load(self, containing_dirname):
- if self.contents.find('@import') != -1:
- raise Exception('@imports are not supported')
-
- matches = re.findall(
- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
- self.contents)
-
- def resolve_url(url):
- if os.path.isabs(url):
- # FIXME: module is used here, but py_vulcanize.module is never imported.
- # However, py_vulcanize.module cannot be imported since py_vulcanize.module may import
- # style_sheet, leading to an import loop.
- raise module.DepsException('URL references must be relative')
- # URLS are relative to this module's directory
- abs_path = os.path.abspath(os.path.join(containing_dirname, url))
- image = self.loader.LoadImage(abs_path)
- image.aliases.append(url)
- return image
-
- self._images = [resolve_url(x) for x in matches]
-
-
-class StyleSheet(object):
- """Represents a stylesheet resource referenced by a module via the
- base.requireStylesheet(xxx) directive."""
-
- def __init__(self, loader, name, resource):
- self.loader = loader
- self.name = name
- self.resource = resource
- self._parsed_style_sheet = None
-
- @property
- def filename(self):
- return self.resource.absolute_path
-
- @property
- def contents(self):
- return self.resource.contents
-
- def __repr__(self):
- return 'StyleSheet(%s)' % self.name
-
- @property
- def images(self):
- self._InitParsedStyleSheetIfNeeded()
- return self._parsed_style_sheet.images
-
- def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
- self._InitParsedStyleSheetIfNeeded()
-
- dependent_filenames.append(self.resource.absolute_path)
- self._parsed_style_sheet.AppendDirectlyDependentFilenamesTo(
- dependent_filenames)
-
- @property
- def contents_with_inlined_images(self):
- self._InitParsedStyleSheetIfNeeded()
- return self._parsed_style_sheet.contents_with_inlined_images
-
- def load(self):
- self._InitParsedStyleSheetIfNeeded()
-
- def _InitParsedStyleSheetIfNeeded(self):
- if self._parsed_style_sheet:
- return
- module_dirname = os.path.dirname(self.resource.absolute_path)
- self._parsed_style_sheet = ParsedStyleSheet(
- self.loader, module_dirname, self.contents)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet_unittest.py b/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet_unittest.py
deleted file mode 100644
index 4ebc71d5651..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/py_vulcanize/style_sheet_unittest.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import base64
-import os
-import unittest
-
-from py_vulcanize import project as project_module
-from py_vulcanize import resource_loader
-from py_vulcanize import fake_fs
-from py_vulcanize import module
-
-
-class StyleSheetUnittest(unittest.TestCase):
-
- def testImages(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/src/foo/x.css', """
-.x .y {
- background-image: url(../images/bar.jpeg);
-}
-""")
- fs.AddFile('/src/images/bar.jpeg', 'hello world')
- with fs:
- project = project_module.Project([os.path.normpath('/src/')])
- loader = resource_loader.ResourceLoader(project)
-
- foo_x = loader.LoadStyleSheet('foo.x')
- self.assertEquals(1, len(foo_x.images))
-
- r0 = foo_x.images[0]
- self.assertEquals(os.path.normpath('/src/images/bar.jpeg'),
- r0.absolute_path)
-
- inlined = foo_x.contents_with_inlined_images
- self.assertEquals("""
-.x .y {
- background-image: url(data:image/jpeg;base64,%s);
-}
-""" % base64.standard_b64encode('hello world'), inlined)
-
- def testURLResolveFails(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/src/foo/x.css', """
-.x .y {
- background-image: url(../images/missing.jpeg);
-}
-""")
- with fs:
- project = project_module.Project([os.path.normpath('/src')])
- loader = resource_loader.ResourceLoader(project)
-
- self.assertRaises(module.DepsException,
- lambda: loader.LoadStyleSheet('foo.x'))
-
- def testImportsCauseFailure(self):
- fs = fake_fs.FakeFS()
- fs.AddFile('/src/foo/x.css', """
-@import url(awesome.css);
-""")
- with fs:
- project = project_module.Project([os.path.normpath('/src')])
- loader = resource_loader.ResourceLoader(project)
-
- self.assertRaises(Exception,
- lambda: loader.LoadStyleSheet('foo.x'))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/LICENSE b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/LICENSE
deleted file mode 100644
index 261eeb9e9f8..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/MANIFEST b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/MANIFEST
deleted file mode 100644
index a0384d9c1b4..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/MANIFEST
+++ /dev/null
@@ -1,354 +0,0 @@
-LICENSE
-MANIFEST
-PKG-INFO
-README.rst
-_setup/__init__.py
-_setup/include/cext.h
-_setup/py2/__init__.py
-_setup/py2/commands.py
-_setup/py2/data.py
-_setup/py2/dist.py
-_setup/py2/ext.py
-_setup/py2/setup.py
-_setup/py2/shell.py
-_setup/py2/term/__init__.py
-_setup/py2/term/_term.py
-_setup/py2/util.py
-_setup/py3/__init__.py
-_setup/py3/commands.py
-_setup/py3/data.py
-_setup/py3/dist.py
-_setup/py3/ext.py
-_setup/py3/setup.py
-_setup/py3/shell.py
-_setup/py3/term/__init__.py
-_setup/py3/term/_term.py
-_setup/py3/util.py
-bench
-bench.sh
-bench/LICENSE.cssmin
-bench/__init__.py
-bench/cssmin.py
-bench/main.py
-bench/wikipedia.css
-bench/wikipedia.min.css
-bench/write.py
-docs/BENCHMARKS
-docs/CHANGES
-docs/CLASSIFIERS
-docs/DESCRIPTION
-docs/PROVIDES
-docs/SUMMARY
-docs/apidoc/api-objects.txt
-docs/apidoc/crarr.png
-docs/apidoc/epydoc.css
-docs/apidoc/epydoc.js
-docs/apidoc/help.html
-docs/apidoc/identifier-index.html
-docs/apidoc/index.html
-docs/apidoc/module-tree.html
-docs/apidoc/rcssmin-module.html
-docs/apidoc/rcssmin-pysrc.html
-docs/apidoc/redirect.html
-package.cfg
-rcssmin.c
-rcssmin.py
-run_tests.py
-setup.py
-tests
-tests/main/atgroup_00.css
-tests/main/atgroup_01.css
-tests/main/atgroup_02.css
-tests/main/atgroup_03.css
-tests/main/atgroup_04.css
-tests/main/atgroup_05.css
-tests/main/atgroup_06.css
-tests/main/atgroup_07.css
-tests/main/atgroup_08.css
-tests/main/atgroup_09.css
-tests/main/atgroup_10.css
-tests/main/atgroup_11.css
-tests/main/comment_00.css
-tests/main/comment_01.css
-tests/main/comment_02.css
-tests/main/comment_03.css
-tests/main/comment_04.css
-tests/main/escape_00.css
-tests/main/escape_01.css
-tests/main/escape_02.css
-tests/main/escape_03.css
-tests/main/escape_04.css
-tests/main/escape_05.css
-tests/main/escape_06.css
-tests/main/first_00.css
-tests/main/first_01.css
-tests/main/first_02.css
-tests/main/out/atgroup_00.out
-tests/main/out/atgroup_00.out.b
-tests/main/out/atgroup_01.out
-tests/main/out/atgroup_01.out.b
-tests/main/out/atgroup_02.out
-tests/main/out/atgroup_02.out.b
-tests/main/out/atgroup_03.out
-tests/main/out/atgroup_03.out.b
-tests/main/out/atgroup_04.out
-tests/main/out/atgroup_04.out.b
-tests/main/out/atgroup_05.out
-tests/main/out/atgroup_05.out.b
-tests/main/out/atgroup_06.out
-tests/main/out/atgroup_06.out.b
-tests/main/out/atgroup_07.out
-tests/main/out/atgroup_07.out.b
-tests/main/out/atgroup_08.out
-tests/main/out/atgroup_08.out.b
-tests/main/out/atgroup_09.out
-tests/main/out/atgroup_09.out.b
-tests/main/out/atgroup_10.out
-tests/main/out/atgroup_10.out.b
-tests/main/out/atgroup_11.out
-tests/main/out/atgroup_11.out.b
-tests/main/out/comment_00.out
-tests/main/out/comment_00.out.b
-tests/main/out/comment_01.out
-tests/main/out/comment_01.out.b
-tests/main/out/comment_02.out
-tests/main/out/comment_02.out.b
-tests/main/out/comment_03.out
-tests/main/out/comment_03.out.b
-tests/main/out/comment_04.out
-tests/main/out/comment_04.out.b
-tests/main/out/escape_00.out
-tests/main/out/escape_00.out.b
-tests/main/out/escape_01.out
-tests/main/out/escape_01.out.b
-tests/main/out/escape_02.out
-tests/main/out/escape_02.out.b
-tests/main/out/escape_03.out
-tests/main/out/escape_03.out.b
-tests/main/out/escape_04.out
-tests/main/out/escape_04.out.b
-tests/main/out/escape_05.out
-tests/main/out/escape_05.out.b
-tests/main/out/escape_06.out
-tests/main/out/escape_06.out.b
-tests/main/out/first_00.out
-tests/main/out/first_00.out.b
-tests/main/out/first_01.out
-tests/main/out/first_01.out.b
-tests/main/out/first_02.out
-tests/main/out/first_02.out.b
-tests/main/out/url_00.out
-tests/main/out/url_00.out.b
-tests/main/out/url_01.out
-tests/main/out/url_01.out.b
-tests/main/out/url_02.out
-tests/main/out/url_02.out.b
-tests/main/out/url_03.out
-tests/main/out/url_03.out.b
-tests/main/out/url_04.out
-tests/main/out/url_04.out.b
-tests/main/out/url_05.out
-tests/main/out/url_05.out.b
-tests/main/out/url_06.out
-tests/main/out/url_06.out.b
-tests/main/out/url_07.out
-tests/main/out/url_07.out.b
-tests/main/out/url_08.out
-tests/main/out/url_08.out.b
-tests/main/out/url_09.out
-tests/main/out/url_09.out.b
-tests/main/url_00.css
-tests/main/url_01.css
-tests/main/url_02.css
-tests/main/url_03.css
-tests/main/url_04.css
-tests/main/url_05.css
-tests/main/url_06.css
-tests/main/url_07.css
-tests/main/url_08.css
-tests/main/url_09.css
-tests/yui/README
-tests/yui/background-position.css
-tests/yui/background-position.css.min
-tests/yui/border-none.css
-tests/yui/border-none.css.min
-tests/yui/box-model-hack.css
-tests/yui/box-model-hack.css.min
-tests/yui/bug2527974.css
-tests/yui/bug2527974.css.min
-tests/yui/bug2527991.css
-tests/yui/bug2527991.css.min
-tests/yui/bug2527998.css
-tests/yui/bug2527998.css.min
-tests/yui/bug2528034.css
-tests/yui/bug2528034.css.min
-tests/yui/charset-media.css
-tests/yui/charset-media.css.min
-tests/yui/color-simple.css
-tests/yui/color-simple.css.min
-tests/yui/color.css
-tests/yui/color.css.min
-tests/yui/comment.css
-tests/yui/comment.css.min
-tests/yui/concat-charset.css
-tests/yui/concat-charset.css.min
-tests/yui/dataurl-base64-doublequotes.css
-tests/yui/dataurl-base64-doublequotes.css.min
-tests/yui/dataurl-base64-eof.css
-tests/yui/dataurl-base64-eof.css.min
-tests/yui/dataurl-base64-linebreakindata.css
-tests/yui/dataurl-base64-linebreakindata.css.min
-tests/yui/dataurl-base64-noquotes.css
-tests/yui/dataurl-base64-noquotes.css.min
-tests/yui/dataurl-base64-singlequotes.css
-tests/yui/dataurl-base64-singlequotes.css.min
-tests/yui/dataurl-base64-twourls.css
-tests/yui/dataurl-base64-twourls.css.min
-tests/yui/dataurl-dbquote-font.css
-tests/yui/dataurl-dbquote-font.css.min
-tests/yui/dataurl-nonbase64-doublequotes.css
-tests/yui/dataurl-nonbase64-doublequotes.css.min
-tests/yui/dataurl-nonbase64-noquotes.css
-tests/yui/dataurl-nonbase64-noquotes.css.min
-tests/yui/dataurl-nonbase64-singlequotes.css
-tests/yui/dataurl-nonbase64-singlequotes.css.min
-tests/yui/dataurl-noquote-multiline-font.css
-tests/yui/dataurl-noquote-multiline-font.css.min
-tests/yui/dataurl-realdata-doublequotes.css
-tests/yui/dataurl-realdata-doublequotes.css.min
-tests/yui/dataurl-realdata-noquotes.css
-tests/yui/dataurl-realdata-noquotes.css.min
-tests/yui/dataurl-realdata-singlequotes.css
-tests/yui/dataurl-realdata-singlequotes.css.min
-tests/yui/dataurl-realdata-yuiapp.css
-tests/yui/dataurl-realdata-yuiapp.css.min
-tests/yui/dataurl-singlequote-font.css
-tests/yui/dataurl-singlequote-font.css.min
-tests/yui/decimals.css
-tests/yui/decimals.css.min
-tests/yui/dollar-header.css
-tests/yui/dollar-header.css.min
-tests/yui/font-face.css
-tests/yui/font-face.css.min
-tests/yui/ie5mac.css
-tests/yui/ie5mac.css.min
-tests/yui/media-empty-class.css
-tests/yui/media-empty-class.css.min
-tests/yui/media-multi.css
-tests/yui/media-multi.css.min
-tests/yui/media-test.css
-tests/yui/media-test.css.min
-tests/yui/opacity-filter.css
-tests/yui/opacity-filter.css.min
-tests/yui/out/background-position.out
-tests/yui/out/background-position.out.b
-tests/yui/out/border-none.out
-tests/yui/out/border-none.out.b
-tests/yui/out/box-model-hack.out
-tests/yui/out/box-model-hack.out.b
-tests/yui/out/bug2527974.out
-tests/yui/out/bug2527974.out.b
-tests/yui/out/bug2527991.out
-tests/yui/out/bug2527991.out.b
-tests/yui/out/bug2527998.out
-tests/yui/out/bug2527998.out.b
-tests/yui/out/bug2528034.out
-tests/yui/out/bug2528034.out.b
-tests/yui/out/charset-media.out
-tests/yui/out/charset-media.out.b
-tests/yui/out/color-simple.out
-tests/yui/out/color-simple.out.b
-tests/yui/out/color.out
-tests/yui/out/color.out.b
-tests/yui/out/comment.out
-tests/yui/out/comment.out.b
-tests/yui/out/concat-charset.out
-tests/yui/out/concat-charset.out.b
-tests/yui/out/dataurl-base64-doublequotes.out
-tests/yui/out/dataurl-base64-doublequotes.out.b
-tests/yui/out/dataurl-base64-eof.out
-tests/yui/out/dataurl-base64-eof.out.b
-tests/yui/out/dataurl-base64-linebreakindata.out
-tests/yui/out/dataurl-base64-linebreakindata.out.b
-tests/yui/out/dataurl-base64-noquotes.out
-tests/yui/out/dataurl-base64-noquotes.out.b
-tests/yui/out/dataurl-base64-singlequotes.out
-tests/yui/out/dataurl-base64-singlequotes.out.b
-tests/yui/out/dataurl-base64-twourls.out
-tests/yui/out/dataurl-base64-twourls.out.b
-tests/yui/out/dataurl-dbquote-font.out
-tests/yui/out/dataurl-dbquote-font.out.b
-tests/yui/out/dataurl-nonbase64-doublequotes.out
-tests/yui/out/dataurl-nonbase64-doublequotes.out.b
-tests/yui/out/dataurl-nonbase64-noquotes.out
-tests/yui/out/dataurl-nonbase64-noquotes.out.b
-tests/yui/out/dataurl-nonbase64-singlequotes.out
-tests/yui/out/dataurl-nonbase64-singlequotes.out.b
-tests/yui/out/dataurl-noquote-multiline-font.out
-tests/yui/out/dataurl-noquote-multiline-font.out.b
-tests/yui/out/dataurl-realdata-doublequotes.out
-tests/yui/out/dataurl-realdata-doublequotes.out.b
-tests/yui/out/dataurl-realdata-noquotes.out
-tests/yui/out/dataurl-realdata-noquotes.out.b
-tests/yui/out/dataurl-realdata-singlequotes.out
-tests/yui/out/dataurl-realdata-singlequotes.out.b
-tests/yui/out/dataurl-realdata-yuiapp.out
-tests/yui/out/dataurl-realdata-yuiapp.out.b
-tests/yui/out/dataurl-singlequote-font.out
-tests/yui/out/dataurl-singlequote-font.out.b
-tests/yui/out/decimals.out
-tests/yui/out/decimals.out.b
-tests/yui/out/dollar-header.out
-tests/yui/out/dollar-header.out.b
-tests/yui/out/font-face.out
-tests/yui/out/font-face.out.b
-tests/yui/out/ie5mac.out
-tests/yui/out/ie5mac.out.b
-tests/yui/out/media-empty-class.out
-tests/yui/out/media-empty-class.out.b
-tests/yui/out/media-multi.out
-tests/yui/out/media-multi.out.b
-tests/yui/out/media-test.out
-tests/yui/out/media-test.out.b
-tests/yui/out/opacity-filter.out
-tests/yui/out/opacity-filter.out.b
-tests/yui/out/preserve-case.out
-tests/yui/out/preserve-case.out.b
-tests/yui/out/preserve-new-line.out
-tests/yui/out/preserve-new-line.out.b
-tests/yui/out/preserve-strings.out
-tests/yui/out/preserve-strings.out.b
-tests/yui/out/pseudo-first.out
-tests/yui/out/pseudo-first.out.b
-tests/yui/out/pseudo.out
-tests/yui/out/pseudo.out.b
-tests/yui/out/special-comments.out
-tests/yui/out/special-comments.out.b
-tests/yui/out/star-underscore-hacks.out
-tests/yui/out/star-underscore-hacks.out.b
-tests/yui/out/string-in-comment.out
-tests/yui/out/string-in-comment.out.b
-tests/yui/out/webkit-transform.out
-tests/yui/out/webkit-transform.out.b
-tests/yui/out/zeros.out
-tests/yui/out/zeros.out.b
-tests/yui/preserve-case.css
-tests/yui/preserve-case.css.min
-tests/yui/preserve-new-line.css
-tests/yui/preserve-new-line.css.min
-tests/yui/preserve-strings.css
-tests/yui/preserve-strings.css.min
-tests/yui/pseudo-first.css
-tests/yui/pseudo-first.css.min
-tests/yui/pseudo.css
-tests/yui/pseudo.css.min
-tests/yui/special-comments.css
-tests/yui/special-comments.css.min
-tests/yui/star-underscore-hacks.css
-tests/yui/star-underscore-hacks.css.min
-tests/yui/string-in-comment.css
-tests/yui/string-in-comment.css.min
-tests/yui/webkit-transform.css
-tests/yui/webkit-transform.css.min
-tests/yui/zeros.css
-tests/yui/zeros.css.min
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/PKG-INFO b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/PKG-INFO
deleted file mode 100644
index d4ee866c986..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/PKG-INFO
+++ /dev/null
@@ -1,316 +0,0 @@
-Metadata-Version: 1.1
-Name: rcssmin
-Version: 1.0.5
-Summary: CSS Minifier
-Home-page: http://opensource.perlig.de/rcssmin/
-Author: André Malo
-Author-email: nd@perlig.de
-License: Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-Download-URL: http://storage.perlig.de/rcssmin/
-Description: ==============
- CSS Minifier
- ==============
-
- RCSSmin is a CSS minifier.
-
- The minifier is based on the semantics of the `YUI compressor`_\, which itself
- is based on `the rule list by Isaac Schlueter`_\.
-
- This module is a re-implementation aiming for speed instead of maximum
- compression, so it can be used at runtime (rather than during a preprocessing
- step). RCSSmin does syntactical compression only (removing spaces, comments
- and possibly semicolons). It does not provide semantic compression (like
- removing empty blocks, collapsing redundant properties etc). It does, however,
- support various CSS hacks (by keeping them working as intended).
-
- Here's a feature list:
-
- - Strings are kept, except that escaped newlines are stripped
- - Space/Comments before the very end or before various characters are
- stripped: ``:{});=>+],!`` (The colon (``:``) is a special case, a single
- space is kept if it's outside a ruleset.)
- - Space/Comments at the very beginning or after various characters are
- stripped: ``{}(=:>+[,!``
- - Optional space after unicode escapes is kept, resp. replaced by a simple
- space
- - whitespaces inside ``url()`` definitions are stripped
- - Comments starting with an exclamation mark (``!``) can be kept optionally.
- - All other comments and/or whitespace characters are replaced by a single
- space.
- - Multiple consecutive semicolons are reduced to one
- - The last semicolon within a ruleset is stripped
- - CSS Hacks supported:
-
- - IE7 hack (``>/**/``)
- - Mac-IE5 hack (``/*\*/.../**/``)
- - The boxmodelhack is supported naturally because it relies on valid CSS2
- strings
- - Between ``:first-line`` and the following comma or curly brace a space is
- inserted. (apparently it's needed for IE6)
- - Same for ``:first-letter``
-
- rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
- factor 100 or so (depending on the input). docs/BENCHMARKS in the source
- distribution contains the details.
-
- Both python 2 (>= 2.4) and python 3 are supported.
-
- .. _YUI compressor: https://github.com/yui/yuicompressor/
-
- .. _the rule list by Isaac Schlueter: https://github.com/isaacs/cssmin/
-
-
- Copyright and License
- ~~~~~~~~~~~~~~~~~~~~~
-
- Copyright 2011 - 2014
- André Malo or his licensors, as applicable.
-
- The whole package (except for the files in the bench/ directory) is
- distributed under the Apache License Version 2.0. You'll find a copy in the
- root directory of the distribution or online at:
- <http://www.apache.org/licenses/LICENSE-2.0>.
-
-
- Bugs
- ~~~~
-
- No bugs, of course. ;-)
- But if you've found one or have an idea how to improve rcssmin, feel free
- to send a pull request on `github <https://github.com/ndparker/rcssmin>`_
- or send a mail to <rcssmin-bugs@perlig.de>.
-
-
- Author Information
- ~~~~~~~~~~~~~~~~~~
-
- André "nd" Malo <nd perlig.de>
- GPG: 0x8103A37E
-
-
- If God intended people to be naked, they would be born that way.
- -- Oscar Wilde
-
- .. vim:tw=72 syntax=rest
-Keywords: CSS,Minimization
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Environment :: Web Environment
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved
-Classifier: License :: OSI Approved :: Apache License, Version 2.0
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: C
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: Jython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
-Classifier: Topic :: Software Development :: Libraries
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Text Processing
-Classifier: Topic :: Text Processing :: Filters
-Classifier: Topic :: Utilities
-Provides: rcssmin (1.0)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.chromium b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.chromium
deleted file mode 100644
index b1350fc9fa4..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.chromium
+++ /dev/null
@@ -1,16 +0,0 @@
-Name: rCSSmin
-Short Name: rcssmin
-URL: http://opensource.perlig.de/rcssmin/
-Version: 1.0.5
-License: Apache 2.0
-License File: NOT_SHIPPED
-Security Critical: no
-
-Description:
-rCSSmin is a CSS minifier written in python.
-The minifier is based on the semantics of the YUI compressor, which itself is
-based on the rule list by Isaac Schlueter.
-
-Modifications made:
- - Removed the bench.sh since the file doesn't have the licensing info and
- caused license checker to fail.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.rst b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.rst
deleted file mode 100644
index 95fb3083a89..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/README.rst
+++ /dev/null
@@ -1,153 +0,0 @@
-.. -*- coding: utf-8 -*-
-
-=====================================
- rCSSmin - A CSS Minifier For Python
-=====================================
-
-TABLE OF CONTENTS
------------------
-
-1. Introduction
-2. Copyright and License
-3. System Requirements
-4. Installation
-5. Documentation
-6. Bugs
-7. Author Information
-
-
-INTRODUCTION
-------------
-
-RCSSmin is a CSS minifier written in python.
-
-The minifier is based on the semantics of the `YUI compressor`_\, which itself
-is based on `the rule list by Isaac Schlueter`_\.
-
-This module is a re-implementation aiming for speed instead of maximum
-compression, so it can be used at runtime (rather than during a preprocessing
-step). RCSSmin does syntactical compression only (removing spaces, comments
-and possibly semicolons). It does not provide semantic compression (like
-removing empty blocks, collapsing redundant properties etc). It does, however,
-support various CSS hacks (by keeping them working as intended).
-
-Here's a feature list:
-
-- Strings are kept, except that escaped newlines are stripped
-- Space/Comments before the very end or before various characters are
- stripped: ``:{});=>+],!`` (The colon (``:``) is a special case, a single
- space is kept if it's outside a ruleset.)
-- Space/Comments at the very beginning or after various characters are
- stripped: ``{}(=:>+[,!``
-- Optional space after unicode escapes is kept, resp. replaced by a simple
- space
-- whitespaces inside ``url()`` definitions are stripped
-- Comments starting with an exclamation mark (``!``) can be kept optionally.
-- All other comments and/or whitespace characters are replaced by a single
- space.
-- Multiple consecutive semicolons are reduced to one
-- The last semicolon within a ruleset is stripped
-- CSS Hacks supported:
-
- - IE7 hack (``>/**/``)
- - Mac-IE5 hack (``/*\*/.../**/``)
- - The boxmodelhack is supported naturally because it relies on valid CSS2
- strings
- - Between ``:first-line`` and the following comma or curly brace a space is
- inserted. (apparently it's needed for IE6)
- - Same for ``:first-letter``
-
-rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
-factor 100 or so (depending on the input). docs/BENCHMARKS in the source
-distribution contains the details.
-
-.. _YUI compressor: https://github.com/yui/yuicompressor/
-
-.. _the rule list by Isaac Schlueter: https://github.com/isaacs/cssmin/
-
-
-COPYRIGHT AND LICENSE
----------------------
-
-Copyright 2011 - 2014
-André Malo or his licensors, as applicable.
-
-The whole package (except for the files in the bench/ directory)
-is distributed under the Apache License Version 2.0. You'll find a copy in the
-root directory of the distribution or online at:
-<http://www.apache.org/licenses/LICENSE-2.0>.
-
-
-SYSTEM REQUIREMENTS
--------------------
-
-Both python 2 (>=2.4) and python 3 are supported.
-
-
-INSTALLATION
-------------
-
-Using pip
-~~~~~~~~~
-
-$ pip install rcssmin
-
-
-Using distutils
-~~~~~~~~~~~~~~~
-
-$ python setup.py install
-
-The following extra options to the install command may be of interest:
-
- --without-c-extensions Don't install C extensions
- --without-docs Do not install documentation files
-
-
-Drop-in
-~~~~~~~
-
-rCSSmin effectively consists of two files: rcssmin.py and rcssmin.c, the
-latter being entirely optional. So, for simple integration you can just
-copy rcssmin.py into your project and use it.
-
-
-DOCUMENTATION
--------------
-
-A generated API documentation is available in the docs/apidoc/ directory.
-But you can just look into the module. It provides a simple function,
-called cssmin which takes the CSS as a string and returns the minified
-CSS as a string.
-
-The module additionally provides a "streamy" interface:
-
-$ python -mrcssmin <css >minified
-
-It takes two options:
-
- -b Keep bang-comments (Comments starting with an exclamation mark)
- -p Force using the python implementation (not the C implementation)
-
-The latest documentation is also available online at
-<http://opensource.perlig.de/rcssmin/>.
-
-
-BUGS
-----
-
-No bugs, of course. ;-)
-But if you've found one or have an idea how to improve rcssmin, feel free to
-send a pull request on `github <https://github.com/ndparker/rcssmin>`_ or
-send a mail to <rcssmin-bugs@perlig.de>.
-
-
-AUTHOR INFORMATION
-------------------
-
-André "nd" Malo <nd@perlig.de>
-GPG: 0x8103A37E
-
-
- If God intended people to be naked, they would be born that way.
- -- Oscar Wilde
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/__init__.py
deleted file mode 100644
index 77dc23c8412..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/__init__.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- Package _setup
-================
-
-This package provides tools for main package setup.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import os as _os
-import sys as _sys
-
-if _sys.version_info[0] == 2:
- __path__ = [_os.path.join(__path__[0], 'py2')]
- __author__ = __author__.decode('latin-1')
-elif _sys.version_info[0] == 3:
- __path__ = [_os.path.join(__path__[0], 'py3')]
-else:
- raise RuntimeError("Unsupported python version")
-del _os, _sys
-
-from _setup.setup import run # pylint: disable = W0611
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/include/cext.h b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/include/cext.h
deleted file mode 100644
index 47b6f5b9c11..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/include/cext.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright 2006 - 2014
- * Andr\xe9 Malo or his licensors, as applicable
- *
- * 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.
- */
-
-/*
- * central naming stuff
- */
-
-#ifndef SETUP_CEXT_H
-#define SETUP_CEXT_H
-
-#ifndef EXT_MODULE
-#error EXT_MODULE must be defined outside of this file (-DEXT_MODULE=...)
-#endif
-
-/*
- * include core header files
- */
-#define PY_SSIZE_T_CLEAN
-
-#include "Python.h"
-#include "structmember.h"
-
-/*
- * define our helper macros depending on the stuff above
- */
-#define STRINGIFY(n) STRINGIFY_HELPER(n)
-#define STRINGIFY_HELPER(n) #n
-#define CONCATENATE(first, second) CONCATENATE_HELPER(first, second)
-#define CONCATENATE_HELPER(first, second) first##second
-
-#define EXT_MODULE_NAME STRINGIFY(EXT_MODULE)
-#ifdef EXT_PACKAGE
-#define EXT_PACKAGE_NAME STRINGIFY(EXT_PACKAGE)
-#define EXT_MODULE_PATH EXT_PACKAGE_NAME "." EXT_MODULE_NAME
-#else
-#define EXT_PACKAGE_NAME ""
-#define EXT_MODULE_PATH EXT_MODULE_NAME
-#endif
-
-#define EXT_DOCS_VAR CONCATENATE(var, CONCATENATE(EXT_MODULE, __doc__))
-#define EXT_METHODS_VAR CONCATENATE(var, CONCATENATE(EXT_MODULE, _methods))
-#define EXT_METHODS static PyMethodDef EXT_METHODS_VAR[]
-
-#define EXT_DEFINE_VAR CONCATENATE(var, CONCATENATE(EXT_MODULE, _module))
-
-/* Py3K Support */
-#if PY_MAJOR_VERSION >= 3
-
-#define EXT3
-
-#ifndef PyMODINIT_FUNC
-#define EXT_INIT_FUNC PyObject *CONCATENATE(PyInit_, EXT_MODULE)(void)
-#else
-#define EXT_INIT_FUNC PyMODINIT_FUNC CONCATENATE(PyInit_, EXT_MODULE)(void)
-#endif
-
-#define EXT_DEFINE(name, methods, doc) \
-static struct PyModuleDef EXT_DEFINE_VAR = { \
- PyModuleDef_HEAD_INIT, \
- name, \
- doc, \
- -1, \
- methods, \
- NULL, \
- NULL, \
- NULL, \
- NULL \
-}
-
-#define EXT_CREATE(def) (PyModule_Create(def))
-#define EXT_INIT_ERROR(module) do {Py_XDECREF(module); return NULL;} while(0)
-#define EXT_INIT_RETURN(module) return module
-
-#else /* end py3k */
-
-#define EXT2
-
-#ifndef PyMODINIT_FUNC
-#define EXT_INIT_FUNC void CONCATENATE(init, EXT_MODULE)(void)
-#else
-#define EXT_INIT_FUNC PyMODINIT_FUNC CONCATENATE(init, EXT_MODULE)(void)
-#endif
-
-#define EXT_DEFINE__STRUCT \
- CONCATENATE(struct, CONCATENATE(EXT_MODULE, _module))
-
-struct EXT_DEFINE__STRUCT {
- char *m_name;
- char *m_doc;
- PyMethodDef *m_methods;
-};
-#define EXT_DEFINE(name, methods, doc) \
-static struct EXT_DEFINE__STRUCT EXT_DEFINE_VAR = { \
- name, \
- doc, \
- methods \
-}
-
-#define EXT_CREATE(def) ((def)->m_doc \
- ? Py_InitModule3((def)->m_name, (def)->m_methods, (def)->m_doc) \
- : Py_InitModule((def)->m_name, (def)->m_methods) \
-)
-#define EXT_INIT_ERROR(module) return
-#define EXT_INIT_RETURN(module) return
-
-#endif /* end py2K */
-
-#define EXT_INIT_TYPE(module, type) do { \
- if (PyType_Ready(type) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_TYPE(module, name, type) do { \
- Py_INCREF(type); \
- if (PyModule_AddObject(module, name, (PyObject *)(type)) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_UNICODE(module, name, string, encoding) do { \
- if (PyModule_AddObject( \
- module, \
- name, \
- PyUnicode_Decode( \
- string, \
- sizeof(string) - 1, \
- encoding, \
- "strict" \
- )) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_STRING(module, name, string) do { \
- if (PyModule_AddStringConstant(module, name, string) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_INT(module, name, number) do { \
- if (PyModule_AddIntConstant(module, name, number) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-
-/* PEP 353 support, implemented as of python 2.5 */
-#if PY_VERSION_HEX < 0x02050000
-typedef int Py_ssize_t;
-#define PyInt_FromSsize_t(arg) PyInt_FromLong((long)arg)
-#define PyInt_AsSsize_t(arg) (int)PyInt_AsLong(arg)
-#define PY_SSIZE_T_MAX ((Py_ssize_t)INT_MAX)
-#endif
-
-/*
- * some helper macros (Python 2.4)
- */
-#ifndef Py_VISIT
-#define Py_VISIT(op) do { \
- if (op) { \
- int vret = visit((op), arg); \
- if (vret) return vret; \
- } \
-} while (0)
-#endif
-
-#ifdef Py_CLEAR
-#undef Py_CLEAR
-#endif
-#define Py_CLEAR(op) do { \
- if (op) { \
- PyObject *tmp__ = (PyObject *)(op); \
- (op) = NULL; \
- Py_DECREF(tmp__); \
- } \
-} while (0)
-
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
-#ifndef Py_RETURN_FALSE
-#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
-#endif
-
-#ifndef Py_RETURN_TRUE
-#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
-#endif
-
-/* Macros for inline documentation. (Python 2.3) */
-#ifndef PyDoc_VAR
-#define PyDoc_VAR(name) static char name[]
-#endif
-
-#ifndef PyDoc_STRVAR
-#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
-#endif
-
-#ifndef PyDoc_STR
-#ifdef WITH_DOC_STRINGS
-#define PyDoc_STR(str) str
-#else
-#define PyDoc_STR(str) ""
-#endif
-#endif
-
-/* Basestring check (basestring introduced in Python 2.3) */
-#if PY_VERSION_HEX < 0x02030000
-#define BaseString_Check(type) ( \
- PyObject_TypeCheck((type), &PyString_Type) \
- || PyObject_TypeCheck((type), &PyUnicode_Type) \
-)
-#else
-#define BaseString_Check(type) PyObject_TypeCheck((type), &PyBaseString_Type)
-#endif
-
-#define GENERIC_ALLOC(type) \
- ((void *)((PyTypeObject *)type)->tp_alloc(type, (Py_ssize_t)0))
-
-/* PyPy doesn't define it */
-#ifndef PyType_IS_GC
-#define PyType_IS_GC(t) PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
-#endif
-
-#define DEFINE_GENERIC_DEALLOC(prefix) \
-static void prefix##_dealloc(void *self) \
-{ \
- if (PyType_IS_GC(((PyObject *)self)->ob_type)) \
- PyObject_GC_UnTrack(self); \
- (void)prefix##_clear(self); \
- ((PyObject *)self)->ob_type->tp_free((PyObject *)self); \
-}
-
-#endif /* SETUP_CEXT_H */
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/__init__.py
deleted file mode 100644
index 9582ecc1087..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- Package _setup
-================
-
-This package provides tools for main package setup.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from _setup.setup import run # pylint: disable = W0611
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/commands.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/commands.py
deleted file mode 100644
index a41b166e0a5..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/commands.py
+++ /dev/null
@@ -1,267 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Command extenders
-===================
-
-Command extenders.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import fancy_getopt as _fancy_getopt
-from distutils.command import build as _build
-from distutils.command import build_ext as _build_ext
-from distutils.command import install as _install
-from distutils.command import install_data as _install_data
-from distutils.command import install_lib as _install_lib
-import os as _os
-
-from _setup.util import log
-
-_option_defaults = {}
-_option_inherits = {}
-_option_finalizers = {}
-_command_mapping = {
- 'install': 'Install',
- 'install_data': 'InstallData',
- 'install_lib': 'InstallLib',
- 'build': 'Build',
- 'build_ext': 'BuildExt',
-}
-
-
-def add_option(command, long_name, help_text, short_name=None, default=None,
- inherit=None):
- """ Add an option """
- try:
- command_class = globals()[_command_mapping[command]]
- except KeyError:
- raise ValueError("Unknown command %r" % (command,))
- for opt in command_class.user_options:
- if opt[0] == long_name:
- break
- else:
- opt = (long_name, short_name, help_text)
- command_class.user_options.append(opt)
- if not long_name.endswith('='):
- command_class.boolean_options.append(long_name)
- attr_name = _fancy_getopt.translate_longopt(long_name)
- else:
- attr_name = _fancy_getopt.translate_longopt(long_name[:-1])
- if not _option_defaults.has_key(command):
- _option_defaults[command] = []
- if inherit is not None:
- if isinstance(inherit, (str, unicode)):
- inherit = [inherit]
- for i_inherit in inherit:
- add_option(
- i_inherit, long_name, help_text, short_name, default
- )
- default = None
- if not _option_inherits.has_key(command):
- _option_inherits[command] = []
- for i_inherit in inherit:
- for i_command, opt_name in _option_inherits[command]:
- if i_command == i_inherit and opt_name == attr_name:
- break
- else:
- _option_inherits[command].append((i_inherit, attr_name))
- _option_defaults[command].append((attr_name, default))
-
-
-def add_finalizer(command, key, func):
- """ Add finalizer """
- if not _option_finalizers.has_key(command):
- _option_finalizers[command] = {}
- if not _option_finalizers[command].has_key(key):
- _option_finalizers[command][key] = func
-
-
-class Install(_install.install):
- """ Extended installer to reflect the additional data options """
- user_options = _install.install.user_options + [
- ('single-version-externally-managed', None,
- "Compat option. Does not a thing."),
- ]
- boolean_options = _install.install.boolean_options + [
- 'single-version-externally-managed'
- ]
-
- def initialize_options(self):
- """ Prepare for new options """
- _install.install.initialize_options(self)
- self.single_version_externally_managed = None
- if _option_defaults.has_key('install'):
- for opt_name, default in _option_defaults['install']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install.install.finalize_options(self)
- if _option_inherits.has_key('install'):
- for parent, opt_name in _option_inherits['install']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('install'):
- for func in _option_finalizers['install'].values():
- func(self)
-
-
-class InstallData(_install_data.install_data):
- """ Extended data installer """
- user_options = _install_data.install_data.user_options + []
- boolean_options = _install_data.install_data.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_data.install_data.initialize_options(self)
- if _option_defaults.has_key('install_data'):
- for opt_name, default in _option_defaults['install_data']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_data.install_data.finalize_options(self)
- if _option_inherits.has_key('install_data'):
- for parent, opt_name in _option_inherits['install_data']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('install_data'):
- for func in _option_finalizers['install_data'].values():
- func(self)
-
-
-class InstallLib(_install_lib.install_lib):
- """ Extended lib installer """
- user_options = _install_lib.install_lib.user_options + []
- boolean_options = _install_lib.install_lib.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_lib.install_lib.initialize_options(self)
- if _option_defaults.has_key('install_lib'):
- for opt_name, default in _option_defaults['install_lib']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_lib.install_lib.finalize_options(self)
- if _option_inherits.has_key('install_lib'):
- for parent, opt_name in _option_inherits['install_lib']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('install_lib'):
- for func in _option_finalizers['install_lib'].values():
- func(self)
-
-
-class BuildExt(_build_ext.build_ext):
- """
- Extended extension builder class
-
- This class allows extensions to provide a ``check_prerequisites`` method
- which is called before actually building it. The method takes the
- `BuildExt` instance and returns whether the extension should be skipped or
- not.
- """
-
- def initialize_options(self):
- """ Prepare for new options """
- _build_ext.build_ext.initialize_options(self)
- if _option_defaults.has_key('build_ext'):
- for opt_name, default in _option_defaults['build_ext']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build_ext.build_ext.finalize_options(self)
- if _option_inherits.has_key('build_ext'):
- for parent, opt_name in _option_inherits['build_ext']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('build_ext'):
- for func in _option_finalizers['build_ext'].values():
- func(self)
-
- def build_extension(self, ext):
- """
- Build C extension - with extended functionality
-
- The following features are added here:
-
- - ``ext.check_prerequisites`` is called before the extension is being
- built. See `Extension` for details. If the method does not exist,
- simply no check will be run.
- - The macros ``EXT_PACKAGE`` and ``EXT_MODULE`` will be filled (or
- unset) depending on the extensions name, but only if they are not
- already defined.
-
- :Parameters:
- `ext` : `Extension`
- The extension to build. If it's a pure
- ``distutils.core.Extension``, simply no prequisites check is
- applied.
-
- :Return: whatever ``distutils.command.build_ext.build_ext`` returns
- :Rtype: any
- """
- # handle name macros
- macros = dict(ext.define_macros or ())
- tup = ext.name.split('.')
- if len(tup) == 1:
- pkg, mod = None, tup[0]
- else:
- pkg, mod = '.'.join(tup[:-1]), tup[-1]
- if pkg is not None and 'EXT_PACKAGE' not in macros:
- ext.define_macros.append(('EXT_PACKAGE', pkg))
- if 'EXT_MODULE' not in macros:
- ext.define_macros.append(('EXT_MODULE', mod))
- if pkg is None:
- macros = dict(ext.undef_macros or ())
- if 'EXT_PACKAGE' not in macros:
- ext.undef_macros.append('EXT_PACKAGE')
-
- # handle prereq checks
- try:
- checker = ext.check_prerequisites
- except AttributeError:
- pass
- else:
- if checker(self):
- log.info("Skipping %s extension" % ext.name)
- return
-
- return _build_ext.build_ext.build_extension(self, ext)
-
-
-class Build(_build.build):
-
- def initialize_options(self):
- """ Prepare for new options """
- _build.build.initialize_options(self)
- if _option_defaults.has_key('build'):
- for opt_name, default in _option_defaults['build']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build.build.finalize_options(self)
- if _option_inherits.has_key('build'):
- for parent, opt_name in _option_inherits['build']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('build'):
- for func in _option_finalizers['build'].values():
- func(self)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/data.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/data.py
deleted file mode 100644
index 9cf04e104c2..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/data.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Data distribution
-===================
-
-This module provides tools to simplify data distribution.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from distutils import filelist as _filelist
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-
-
-def splitpath(path):
- """ Split a path """
- drive, path = '', _os.path.normpath(path)
- try:
- splitunc = _os.path.splitunc
- except AttributeError:
- pass
- else:
- drive, path = splitunc(path)
- if not drive:
- drive, path = _os.path.splitdrive(path)
- elems = []
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- while 1:
- prefix, path = _os.path.split(path)
- elems.append(path)
- if prefix in ('', sep):
- drive = _os.path.join(drive, prefix)
- break
- path = prefix
- elems.reverse()
- return drive, elems
-
-
-def finalizer(installer):
- """ Finalize install_data """
- data_files = []
- for item in installer.data_files:
- if not isinstance(item, Data):
- data_files.append(item)
- continue
- data_files.extend(item.flatten(installer))
- installer.data_files = data_files
-
-
-class Data(object):
- """ File list container """
-
- def __init__(self, files, target=None, preserve=0, strip=0,
- prefix=None):
- """ Initialization """
- self._files = files
- self._target = target
- self._preserve = preserve
- self._strip = strip
- self._prefix = prefix
- self.fixup_commands()
-
- def fixup_commands(self):
- pass
-
- def from_templates(cls, *templates, **kwargs):
- """ Initialize from template """
- files = _filelist.FileList()
- for tpl in templates:
- for line in tpl.split(';'):
- files.process_template_line(line.strip())
- files.sort()
- files.remove_duplicates()
- result = []
- for filename in files.files:
- _, elems = splitpath(filename)
- if '.svn' in elems or '.git' in elems:
- continue
- result.append(filename)
- return cls(result, **kwargs)
- from_templates = classmethod(from_templates)
-
- def flatten(self, installer):
- """ Flatten the file list to (target, file) tuples """
- # pylint: disable = W0613
- if self._prefix:
- _, prefix = splitpath(self._prefix)
- telems = prefix
- else:
- telems = []
-
- tmap = {}
- for fname in self._files:
- (_, name), target = splitpath(fname), telems
- if self._preserve:
- if self._strip:
- name = name[max(0, min(self._strip, len(name) - 1)):]
- if len(name) > 1:
- target = telems + name[:-1]
- tmap.setdefault(_posixpath.join(*target), []).append(fname)
- return tmap.items()
-
-
-class Documentation(Data):
- """ Documentation container """
-
- def fixup_commands(self):
- _commands.add_option('install_data', 'without-docs',
- help_text='Do not install documentation files',
- inherit='install',
- )
- _commands.add_finalizer('install_data', 'documentation', finalizer)
-
- def flatten(self, installer):
- """ Check if docs should be installed at all """
- if installer.without_docs:
- return []
- return Data.flatten(self, installer)
-
-
-class Manpages(Documentation):
- """ Manpages container """
-
- def dispatch(cls, files):
- """ Automatically dispatch manpages to their target directories """
- mpmap = {}
- for manpage in files:
- normalized = _os.path.normpath(manpage)
- _, ext = _os.path.splitext(normalized)
- if ext.startswith(_os.path.extsep):
- ext = ext[len(_os.path.extsep):]
- mpmap.setdefault(ext, []).append(manpage)
- return [cls(manpages, prefix=_posixpath.join(
- 'share', 'man', 'man%s' % section,
- )) for section, manpages in mpmap.items()]
- dispatch = classmethod(dispatch)
-
- def flatten(self, installer):
- """ Check if manpages are suitable """
- if _sys.platform == 'win32':
- return []
- return Documentation.flatten(self, installer)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/dist.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/dist.py
deleted file mode 100644
index 21a65415185..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/dist.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- dist utilities
-================
-
-dist utilities.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import sys as _sys
-
-from _setup import shell as _shell
-
-
-def run_setup(*args, **kwargs):
- """ Run setup """
- if 'setup' in kwargs:
- script = kwargs.get('setup') or 'setup.py'
- del kwargs['setup']
- else:
- script = 'setup.py'
- if 'fakeroot' in kwargs:
- fakeroot = kwargs['fakeroot']
- del kwargs['fakeroot']
- else:
- fakeroot = None
- if kwargs:
- raise TypeError("Unrecognized keyword parameters")
-
- script = _shell.native(script)
- argv = [_sys.executable, script] + list(args)
- if fakeroot:
- argv.insert(0, fakeroot)
- return not _shell.spawn(*argv)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/ext.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/ext.py
deleted file mode 100644
index bcc0209a53a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/ext.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- C extension tools
-===================
-
-C extension tools.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import core as _core
-from distutils import errors as _distutils_errors
-import os as _os
-import posixpath as _posixpath
-import shutil as _shutil
-import tempfile as _tempfile
-
-from _setup import commands as _commands
-from _setup.util import log
-
-
-def _install_finalizer(installer):
- if installer.without_c_extensions:
- installer.distribution.ext_modules = []
-
-def _build_finalizer(builder):
- if builder.without_c_extensions:
- builder.extensions = []
-
-
-class Extension(_core.Extension):
- """
- Extension with prerequisite check interface
-
- If your check is cacheable (during the setup run), override
- `cached_check_prerequisites`, `check_prerequisites` otherwise.
-
- :IVariables:
- `cached_check` : ``bool``
- The cached check result
- """
- cached_check = None
-
- def __init__(self, *args, **kwargs):
- """ Initialization """
- if kwargs.has_key('depends'):
- self.depends = kwargs['depends'] or []
- else:
- self.depends = []
- _core.Extension.__init__(self, *args, **kwargs)
-
- # add include path
- included = _posixpath.join('_setup', 'include')
- if included not in self.include_dirs:
- self.include_dirs.append(included)
-
- # add cext.h to the dependencies
- cext_h = _posixpath.join(included, 'cext.h')
- if cext_h not in self.depends:
- self.depends.append(cext_h)
-
- _commands.add_option('install_lib', 'without-c-extensions',
- help_text='Don\'t install C extensions',
- inherit='install',
- )
- _commands.add_finalizer('install_lib', 'c-extensions',
- _install_finalizer
- )
- _commands.add_option('build_ext', 'without-c-extensions',
- help_text='Don\'t build C extensions',
- inherit=('build', 'install_lib'),
- )
- _commands.add_finalizer('build_ext', 'c-extensions', _build_finalizer)
-
- def check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is cacheable (during the setup run), override
- `cached_check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- if self.cached_check is None:
- log.debug("PREREQ check for %s" % self.name)
- self.cached_check = self.cached_check_prerequisites(build)
- else:
- log.debug("PREREQ check for %s (cached)" % self.name)
- return self.cached_check
-
- def cached_check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is *not* cacheable (during the setup run),
- override `check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- # pylint: disable = W0613
- log.debug("Nothing to check for %s!" % self.name)
- return False
-
-
-class ConfTest(object):
- """
- Single conftest abstraction
-
- :IVariables:
- `_tempdir` : ``str``
- The tempdir created for this test
-
- `src` : ``str``
- Name of the source file
-
- `target` : ``str``
- Target filename
-
- `compiler` : ``CCompiler``
- compiler instance
-
- `obj` : ``list``
- List of object filenames (``[str, ...]``)
- """
- _tempdir = None
-
- def __init__(self, build, source):
- """
- Initialization
-
- :Parameters:
- `build` : ``distuils.command.build_ext.build_ext``
- builder instance
-
- `source` : ``str``
- Source of the file to compile
- """
- self._tempdir = tempdir = _tempfile.mkdtemp()
- src = _os.path.join(tempdir, 'conftest.c')
- fp = open(src, 'w')
- try:
- fp.write(source)
- finally:
- fp.close()
- self.src = src
- self.compiler = compiler = build.compiler
- self.target = _os.path.join(tempdir, 'conftest')
- self.obj = compiler.object_filenames([src], output_dir=tempdir)
-
- def __del__(self):
- """ Destruction """
- self.destroy()
-
- def destroy(self):
- """ Destroy the conftest leftovers on disk """
- tempdir, self._tempdir = self._tempdir, None
- if tempdir is not None:
- _shutil.rmtree(tempdir)
-
- def compile(self, **kwargs):
- """
- Compile the conftest
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the compiler call
-
- :Return: Was the compilation successful?
- :Rtype: ``bool``
- """
- kwargs['output_dir'] = self._tempdir
- try:
- self.compiler.compile([self.src], **kwargs)
- except _distutils_errors.CompileError:
- return False
- return True
-
- def link(self, **kwargs):
- r"""
- Link the conftest
-
- Before you can link the conftest objects they need to be `compile`\d.
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the linker call
-
- :Return: Was the linking successful?
- :Rtype: ``bool``
- """
- try:
- self.compiler.link_executable(self.obj, self.target, **kwargs)
- except _distutils_errors.LinkError:
- return False
- return True
-
- def pipe(self, mode="r"):
- r"""
- Execute the conftest binary and connect to it using a pipe
-
- Before you can pipe to or from the conftest binary it needs to
- be `link`\ed.
-
- :Parameters:
- `mode` : ``str``
- Pipe mode - r/w
-
- :Return: The open pipe
- :Rtype: ``file``
- """
- return _os.popen(self.compiler.executable_filename(self.target), mode)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/setup.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/setup.py
deleted file mode 100644
index fd86f62f9bc..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/setup.py
+++ /dev/null
@@ -1,419 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Main setup runner
-===================
-
-This module provides a wrapper around the distutils core setup.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import ConfigParser as _config_parser
-from distutils import core as _core
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-from _setup import data as _data
-from _setup import ext as _ext
-from _setup import util as _util
-from _setup import shell as _shell
-
-
-def check_python_version(impl, version_min, version_max):
- """ Check python version """
- if impl == 'python':
- version_info = _sys.version_info
- elif impl == 'pypy':
- version_info = getattr(_sys, 'pypy_version_info', None)
- if not version_info:
- return
- elif impl == 'jython':
- if not 'java' in _sys.platform.lower():
- return
- version_info = _sys.version_info
- else:
- raise AssertionError("impl not in ('python', 'pypy', 'jython')")
-
- pyversion = map(int, version_info[:3])
- if version_min:
- min_required = \
- map(int, '.'.join((version_min, '0.0.0')).split('.')[:3])
- if pyversion < min_required:
- raise EnvironmentError("Need at least %s %s (vs. %s)" % (
- impl, version_min, '.'.join(map(str, pyversion))
- ))
- if version_max:
- max_required = map(int, version_max.split('.'))
- max_required[-1] += 1
- if pyversion >= max_required:
- raise EnvironmentError("Need at max %s %s (vs. %s)" % (
- impl,
- version_max,
- '.'.join(map(str, pyversion))
- ))
-
-
-def find_description(docs):
- """
- Determine the package description from DESCRIPTION
-
- :Parameters:
- `docs` : ``dict``
- Docs config section
-
- :Return: Tuple of summary, description and license
- (``('summary', 'description', 'license')``)
- (all may be ``None``)
- :Rtype: ``tuple``
- """
- summary = None
- filename = docs.get('meta.summary', 'SUMMARY').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- try:
- summary = fp.read().strip().splitlines()[0].rstrip()
- except IndexError:
- summary = ''
- finally:
- fp.close()
-
- description = None
- filename = docs.get('meta.description', 'DESCRIPTION').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- description = fp.read().rstrip()
- finally:
- fp.close()
-
- if summary is None and description:
- from docutils import core
- summary = core.publish_parts(
- source=description,
- source_path=filename,
- writer_name='html',
- )['title'].encode('utf-8')
-
- return summary, description
-
-
-def find_classifiers(docs):
- """
- Determine classifiers from CLASSIFIERS
-
- :return: List of classifiers (``['classifier', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_provides(docs):
- """
- Determine provides from PROVIDES
-
- :return: List of provides (``['provides', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.provides', 'PROVIDES').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_license(docs):
- """
- Determine license from LICENSE
-
- :return: License text
- :rtype: ``str``
- """
- filename = docs.get('meta.license', 'LICENSE').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- return fp.read().rstrip()
- finally:
- fp.close()
- return None
-
-
-def find_packages(manifest):
- """ Determine packages and subpackages """
- packages = {}
- collect = manifest.get('packages.collect', '').split()
- lib = manifest.get('packages.lib', '.')
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- for root in collect:
- for dirpath, _, filenames in _shell.walk(_os.path.join(lib, root)):
- if dirpath.find('.svn') >= 0 or dirpath.find('.git') >= 0:
- continue
- if '__init__.py' in filenames:
- packages[
- _os.path.normpath(dirpath).replace(sep, '.')
- ] = None
- packages = packages.keys()
- packages.sort()
- return packages
-
-
-def find_data(name, docs):
- """ Determine data files """
- result = []
- if docs.get('extra', '').strip():
- result.append(_data.Documentation(docs['extra'].split(),
- prefix='share/doc/%s' % name,
- ))
- if docs.get('examples.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['examples.dir']]
- if docs.get('examples.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['examples.ignore'].split()
- ])
- strip = int(docs.get('examples.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('userdoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['userdoc.dir']]
- if docs.get('userdoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['userdoc.ignore'].split()
- ])
- strip = int(docs.get('userdoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('apidoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['apidoc.dir']]
- if docs.get('apidoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['apidoc.ignore'].split()
- ])
- strip = int(docs.get('apidoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('man', '').strip():
- result.extend(_data.Manpages.dispatch(docs['man'].split()))
- return result
-
-
-def make_manifest(manifest, config, docs, kwargs):
- """ Create file list to pack up """
- # pylint: disable = R0912
- kwargs = kwargs.copy()
- kwargs['script_args'] = ['install']
- kwargs['packages'] = list(kwargs.get('packages') or ()) + [
- '_setup', '_setup.py2', '_setup.py3',
- ] + list(manifest.get('packages.extra', '').split() or ())
- _core._setup_stop_after = "commandline"
- try:
- dist = _core.setup(**kwargs)
- finally:
- _core._setup_stop_after = None
-
- result = ['MANIFEST', 'PKG-INFO', 'setup.py'] + list(config)
- # TODO: work with default values:
- for key in ('classifiers', 'description', 'summary', 'provides',
- 'license'):
- filename = docs.get('meta.' + key, '').strip()
- if filename and _os.path.isfile(filename):
- result.append(filename)
-
- cmd = dist.get_command_obj("build_py")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_py", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("build_ext")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_ext", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for ext in cmd.extensions:
- if ext.depends:
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in ext.depends])
-
- cmd = dist.get_command_obj("build_clib")
- cmd.ensure_finalized()
- if cmd.libraries:
- #import pprint; pprint.pprint(("build_clib", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for lib in cmd.libraries:
- if lib[1].get('depends'):
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in lib[1]['depends']])
-
- cmd = dist.get_command_obj("build_scripts")
- cmd.ensure_finalized()
- #import pprint; pprint.pprint(("build_scripts", cmd.get_source_files()))
- if cmd.get_source_files():
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("install_data")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("install_data", cmd.get_inputs()))
- try:
- strings = basestring
- except NameError:
- strings = (str, unicode)
-
- for item in cmd.get_inputs():
- if isinstance(item, strings):
- result.append(item)
- else:
- result.extend(item[1])
-
- for item in manifest.get('dist', '').split():
- result.append(item)
- if _os.path.isdir(item):
- for filename in _shell.files(item):
- result.append(filename)
-
- result = dict([(item, None) for item in result]).keys()
- result.sort()
- return result
-
-
-def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
- """ Main runner """
- if ext is None:
- ext = []
-
- cfg = _util.SafeConfigParser()
- cfg.read(config)
- pkg = dict(cfg.items('package'))
- python_min = pkg.get('python.min') or None
- python_max = pkg.get('python.max') or None
- check_python_version('python', python_min, python_max)
- pypy_min = pkg.get('pypy.min') or None
- pypy_max = pkg.get('pypy.max') or None
- check_python_version('pypy', pypy_min, pypy_max)
- jython_min = pkg.get('jython.min') or None
- jython_max = pkg.get('jython.max') or None
- check_python_version('jython', jython_min, jython_max)
-
- manifest = dict(cfg.items('manifest'))
- try:
- docs = dict(cfg.items('docs'))
- except _config_parser.NoSectionError:
- docs = {}
-
- summary, description = find_description(docs)
- scripts = manifest.get('scripts', '').strip() or None
- if scripts:
- scripts = scripts.split()
- modules = manifest.get('modules', '').strip() or None
- if modules:
- modules = modules.split()
- keywords = docs.get('meta.keywords', '').strip() or None
- if keywords:
- keywords = keywords.split()
- revision = pkg.get('version.revision', '').strip()
- if revision:
- revision = "-r%s" % (revision,)
-
- kwargs = {
- 'name': pkg['name'],
- 'version': "%s%s" % (
- pkg['version.number'],
- ["", "-dev%s" % (revision,)][_util.humanbool(
- 'version.dev', pkg.get('version.dev', 'false')
- )],
- ),
- 'provides': find_provides(docs),
- 'description': summary,
- 'long_description': description,
- 'classifiers': find_classifiers(docs),
- 'keywords': keywords,
- 'author': pkg['author.name'],
- 'author_email': pkg['author.email'],
- 'maintainer': pkg.get('maintainer.name'),
- 'maintainer_email': pkg.get('maintainer.email'),
- 'url': pkg.get('url.homepage'),
- 'download_url': pkg.get('url.download'),
- 'license': find_license(docs),
- 'package_dir': {'': manifest.get('packages.lib', '.')},
- 'packages': find_packages(manifest),
- 'py_modules': modules,
- 'ext_modules': ext,
- 'scripts': scripts,
- 'script_args': script_args,
- 'data_files': find_data(pkg['name'], docs),
- 'cmdclass': {
- 'build' : _commands.Build,
- 'build_ext' : _commands.BuildExt,
- 'install' : _commands.Install,
- 'install_data': _commands.InstallData,
- 'install_lib' : _commands.InstallLib,
- }
- }
- for key in ('provides',):
- if key not in _core.setup_keywords:
- del kwargs[key]
-
- if manifest_only:
- return make_manifest(manifest, config, docs, kwargs)
-
- # monkey-patch crappy manifest writer away.
- from distutils.command import sdist
- sdist.sdist.get_file_list = sdist.sdist.read_manifest
-
- return _core.setup(**kwargs)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/shell.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/shell.py
deleted file mode 100644
index 4eafb9c8647..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/shell.py
+++ /dev/null
@@ -1,478 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Shell utilities
-=================
-
-Shell utilities.
-"""
-from __future__ import generators
-
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import errno as _errno
-import fnmatch as _fnmatch
-import os as _os
-import shutil as _shutil
-import sys as _sys
-import tempfile as _tempfile
-
-cwd = _os.path.dirname(_os.path.abspath(_sys.argv[0]))
-
-class ExitError(RuntimeError):
- """ Exit error """
- def __init__(self, code):
- RuntimeError.__init__(self, code)
- self.code = code
- self.signal = None
-
-
-class SignalError(ExitError):
- """ Signal error """
- def __init__(self, code, signal):
- ExitError.__init__(self, code)
- import signal as _signal
- self.signal = signal
- for key, val in vars(_signal).iteritems():
- if key.startswith('SIG') and not key.startswith('SIG_'):
- if val == signal:
- self.signalstr = key[3:]
- break
- else:
- self.signalstr = '%04d' % signal
-
-
-def native(path):
- """ Convert slash path to native """
- path = _os.path.sep.join(path.split('/'))
- return _os.path.normpath(_os.path.join(cwd, path))
-
-
-def cp(src, dest):
- """ Copy src to dest """
- _shutil.copy2(native(src), native(dest))
-
-
-def cp_r(src, dest):
- """ Copy -r src to dest """
- _shutil.copytree(native(src), native(dest))
-
-
-def rm(dest):
- """ Remove a file """
- try:
- _os.unlink(native(dest))
- except OSError, e:
- if _errno.ENOENT != e.errno:
- raise
-
-def rm_rf(dest):
- """ Remove a tree """
- dest = native(dest)
- if _os.path.exists(dest):
- for path in files(dest, '*'):
- _os.chmod(native(path), 0644)
- _shutil.rmtree(dest)
-
-
-try:
- mkstemp = _tempfile.mkstemp
-except AttributeError:
- # helpers stolen from 2.4 tempfile module
- try:
- import fcntl as _fcntl
- except ImportError:
- def _set_cloexec(fd):
- """ Set close-on-exec (not implemented, but not an error) """
- # pylint: disable = W0613
- pass
- else:
- def _set_cloexec(fd):
- """ Set close-on-exec """
- try:
- flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
- except IOError:
- pass
- else:
- # flags read successfully, modify
- flags |= _fcntl.FD_CLOEXEC
- _fcntl.fcntl(fd, _fcntl.F_SETFD, flags)
-
- _text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL
- _text_openflags |= getattr(_os, 'O_NOINHERIT', 0)
- _text_openflags |= getattr(_os, 'O_NOFOLLOW', 0)
-
- _bin_openflags = _text_openflags
- _bin_openflags |= getattr(_os, 'O_BINARY', 0)
-
- def mkstemp(suffix="", prefix=_tempfile.gettempprefix(), dir=None,
- text=False):
- """ Create secure temp file """
- # pylint: disable = W0622
- if dir is None:
- dir = _tempfile.gettempdir()
- if text:
- flags = _text_openflags
- else:
- flags = _bin_openflags
- count = 100
- while count > 0:
- j = _tempfile._counter.get_next() # pylint: disable = E1101, W0212
- fname = _os.path.join(dir, prefix + str(j) + suffix)
- try:
- fd = _os.open(fname, flags, 0600)
- except OSError, e:
- if e.errno == _errno.EEXIST:
- count -= 1
- continue
- raise
- _set_cloexec(fd)
- return fd, _os.path.abspath(fname)
- raise IOError, (_errno.EEXIST, "No usable temporary file name found")
-
-
-def _pipespawn(argv, env):
- """ Pipe spawn """
- # pylint: disable = R0912
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, (r"""
-import os
-import pickle
-try:
- import subprocess
-except ImportError:
- subprocess = None
-import sys
-
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
-if subprocess is None:
- pid = os.spawnve(os.P_NOWAIT, argv[0], argv, env)
- result = os.waitpid(pid, 0)[1]
-else:
- p = subprocess.Popen(argv, env=env)
- result = p.wait()
- if result < 0:
- print "\n%%d 1" %% (-result)
- sys.exit(2)
-
-if result == 0:
- sys.exit(0)
-signalled = getattr(os, 'WIFSIGNALED', None)
-if signalled is not None:
- if signalled(result):
- print "\n%%d %%d" %% (os.WTERMSIG(result), result & 7)
- sys.exit(2)
-print "\n%%d" %% (result & 7,)
-sys.exit(3)
- """.strip() + "\n") % {
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(env)),
- })
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- shell = True
- close_fds = False
- else:
- argv = [_sys.executable, name]
- shell = False
- close_fds = True
-
- res = 0
- try:
- import subprocess
- except ImportError:
- import popen2 as _popen2
- proc = _popen2.Popen3(argv, False)
- try:
- proc.tochild.close()
- result = proc.fromchild.read()
- finally:
- res = proc.wait()
- else:
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- proc = subprocess.Popen(argv,
- shell=shell,
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- close_fds=close_fds,
- env=env,
- )
- try:
- proc.stdin.close()
- result = proc.stdout.read()
- finally:
- res = proc.wait()
- if res != 0:
- if res == 2:
- signal, code = map(int, result.splitlines()[-1].split())
- raise SignalError(code, signal)
- elif res == 3:
- code = int(result.splitlines()[-1].strip())
- raise ExitError(code)
- raise ExitError(res)
-
- return result
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def _filepipespawn(infile, outfile, argv, env):
- """ File Pipe spawn """
- try:
- import subprocess
- except ImportError:
- subprocess = None
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, ("""
-import os
-import pickle
-import sys
-
-infile = pickle.loads(%(infile)s)
-outfile = pickle.loads(%(outfile)s)
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-
-if infile is not None:
- infile = open(infile, 'rb')
- os.dup2(infile.fileno(), 0)
- infile.close()
-if outfile is not None:
- outfile = open(outfile, 'wb')
- os.dup2(outfile.fileno(), 1)
- outfile.close()
-
-pid = os.spawnve(os.P_NOWAIT, argv[0], argv, env)
-result = os.waitpid(pid, 0)[1]
-sys.exit(result & 7)
- """.strip() + "\n") % {
- 'infile': repr(_pickle.dumps(_os.path.abspath(infile))),
- 'outfile': repr(_pickle.dumps(_os.path.abspath(outfile))),
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(env)),
- })
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- close_fds = False
- shell = True
- else:
- argv = [_sys.executable, name]
- close_fds = True
- shell = False
-
- if subprocess is None:
- pid = _os.spawnve(_os.P_NOWAIT, argv[0], argv, env)
- return _os.waitpid(pid, 0)[1]
- else:
- p = subprocess.Popen(
- argv, env=env, shell=shell, close_fds=close_fds
- )
- return p.wait()
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def spawn(*argv, **kwargs):
- """ Spawn a process """
- try:
- import subprocess
- except ImportError:
- subprocess = None
-
- if _sys.platform == 'win32':
- newargv = []
- for arg in argv:
- if not arg or ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- newargv.append(arg)
- argv = newargv
- close_fds = False
- shell = True
- else:
- close_fds = True
- shell = False
-
- env = kwargs.get('env')
- if env is None:
- env = dict(_os.environ)
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- echo = kwargs.get('echo')
- if echo:
- print ' '.join(argv)
- filepipe = kwargs.get('filepipe')
- if filepipe:
- return _filepipespawn(
- kwargs.get('stdin'), kwargs.get('stdout'), argv, env
- )
- pipe = kwargs.get('stdout')
- if pipe:
- return _pipespawn(argv, env)
-
- if subprocess is None:
- pid = _os.spawnve(_os.P_NOWAIT, argv[0], argv, env)
- return _os.waitpid(pid, 0)[1]
- else:
- p = subprocess.Popen(argv, env=env, shell=shell, close_fds=close_fds)
- return p.wait()
-
-
-try:
- walk = _os.walk
-except AttributeError:
- # copy from python 2.4 sources (modulo docs and comments)
- def walk(top, topdown=True, onerror=None):
- """ directory tree walker """
- # pylint: disable = C0103
- join, isdir, islink = _os.path.join, _os.path.isdir, _os.path.islink
- listdir, error = _os.listdir, _os.error
-
- try:
- names = listdir(top)
- except error, err:
- if onerror is not None:
- onerror(err)
- return
-
- dirs, nondirs = [], []
- for name in names:
- if isdir(join(top, name)):
- dirs.append(name)
- else:
- nondirs.append(name)
-
- if topdown:
- yield top, dirs, nondirs
- for name in dirs:
- path = join(top, name)
- if not islink(path):
- for x in walk(path, topdown, onerror):
- yield x
- if not topdown:
- yield top, dirs, nondirs
-
-
-def files(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- filenames.sort()
- for name in _fnmatch.filter(filenames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
- dirnames.sort()
-
-
-def dirs(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- dirnames.sort()
- for name in _fnmatch.filter(dirnames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
-
-
-def frompath(executable):
- """ Find executable in PATH """
- # Based on distutils.spawn.find_executable.
- path = _os.environ.get('PATH', '')
- paths = [
- _os.path.expanduser(item)
- for item in path.split(_os.pathsep)
- ]
- ext = _os.path.splitext(executable)[1]
- exts = ['']
- if _sys.platform == 'win32' or _os.name == 'os2':
- eext = ['.exe', '.bat', '.py']
- if ext not in eext:
- exts.extend(eext)
-
- for ext in exts:
- if not _os.path.isfile(executable + ext):
- for path in paths:
- fname = _os.path.join(path, executable + ext)
- if _os.path.isfile(fname):
- # the file exists, we have a shot at spawn working
- return fname
- else:
- return executable + ext
-
- return None
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/__init__.py
deleted file mode 100644
index 4e50ec37493..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=====================
- Package _setup.term
-=====================
-
-Terminal tools, not distributed.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-# pylint: disable = W0611
-from _setup.term._term import terminfo, write, green, red, yellow, announce
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/_term.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/_term.py
deleted file mode 100644
index 72b727c1a95..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/term/_term.py
+++ /dev/null
@@ -1,115 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Terminal writer
-=================
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import sys as _sys
-
-
-class _INFO(dict):
- """ Terminal info dict """
-
- def __init__(self):
- """ Initialization """
- dict.__init__(self, {
- 'NORMAL': '',
- 'BOLD': '',
- 'ERASE': '\n',
- 'RED': '',
- 'YELLOW': '',
- 'GREEN': '',
- })
- try:
- import curses as _curses
- except ImportError:
- # fixup if a submodule of curses failed.
- if 'curses' in _sys.modules:
- del _sys.modules['curses']
- else:
- try:
- _curses.setupterm()
- except (TypeError, _curses.error):
- pass
- else:
- def make_color(color):
- """ Make color control string """
- seq = _curses.tigetstr('setaf')
- if seq is not None:
- # XXX may fail - need better logic
- seq = seq.replace("%p1", "") % color
- return seq
-
- self['NORMAL'] = _curses.tigetstr('sgr0')
- self['BOLD'] = _curses.tigetstr('bold')
-
- erase = _curses.tigetstr('el1')
- if erase is not None:
- self['ERASE'] = erase + _curses.tigetstr('cr')
-
- self['RED'] = make_color(_curses.COLOR_RED)
- self['YELLOW'] = make_color(_curses.COLOR_YELLOW)
- self['GREEN'] = make_color(_curses.COLOR_GREEN)
-
- def __getitem__(self, key):
- """ Deliver always """
- dict.get(self, key) or ""
-
-
-def terminfo():
- """ Get info singleton """
- # pylint: disable = E1101, W0612
- if terminfo.info is None:
- terminfo.info = _INFO()
- return terminfo.info
-terminfo.info = None
-
-
-def write(fmt, **kwargs):
- """ Write stuff on the terminal """
- parm = dict(terminfo())
- parm.update(kwargs)
- _sys.stdout.write(fmt % parm)
- _sys.stdout.flush()
-
-
-def green(bmt, **kwargs):
- """ Write something in green on screen """
- announce("%%(GREEN)s%s%%(NORMAL)s" % bmt, **kwargs)
-
-
-def red(bmt, **kwargs):
- """ Write something in red on the screen """
- announce("%%(BOLD)s%%(RED)s%s%%(NORMAL)s" % bmt, **kwargs)
-
-
-def yellow(fmt, **kwargs):
- """ Write something in yellow on the screen """
- announce("%%(BOLD)s%%(YELLOW)s%s%%(NORMAL)s" % fmt, **kwargs)
-
-
-def announce(fmt, **kwargs):
- """ Announce something """
- write(fmt, **kwargs)
- _sys.stdout.write("\n")
- _sys.stdout.flush()
-
-
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/util.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/util.py
deleted file mode 100644
index 5c05fac6e4c..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py2/util.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Setup utilities
-=================
-
-Setup utilities.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-try:
- from distutils import log
-except ImportError:
- class log(object):
- def info(self, value):
- print value
- def debug(self, value):
- pass
- log = log()
-
-from distutils import util as _util
-try:
- from ConfigParser import SafeConfigParser
-except ImportError:
- import ConfigParser as _config_parser
- class SafeConfigParser(_config_parser.ConfigParser):
- """ Safe config parser """
- def _interpolate(self, section, option, rawval, vars):
- return rawval
-
- def items(self, section):
- return [(key, self.get(section, key))
- for key in self.options(section)
- ]
-
-
-def humanbool(name, value):
- """
- Determine human boolean value
-
- :Parameters:
- `name` : ``str``
- The config key (used for error message)
-
- `value` : ``str``
- The config value
-
- :Return: The boolean value
- :Rtype: ``bool``
-
- :Exceptions:
- - `ValueError` : The value could not be recognized
- """
- try:
- return _util.strtobool(str(value).strip().lower() or 'no')
- except ValueError:
- raise ValueError("Unrecognized config value: %s = %s" % (name, value))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/__init__.py
deleted file mode 100644
index 6139d510a10..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- Package _setup
-================
-
-This package provides tools for main package setup.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from _setup.setup import run # pylint: disable = W0611
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/commands.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/commands.py
deleted file mode 100644
index 7bfacbc86ef..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/commands.py
+++ /dev/null
@@ -1,266 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Command extenders
-===================
-
-Command extenders.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import fancy_getopt as _fancy_getopt
-from distutils import log
-from distutils.command import build as _build
-from distutils.command import build_ext as _build_ext
-from distutils.command import install as _install
-from distutils.command import install_data as _install_data
-from distutils.command import install_lib as _install_lib
-import os as _os
-
-_option_defaults = {}
-_option_inherits = {}
-_option_finalizers = {}
-_command_mapping = {
- 'install': 'Install',
- 'install_data': 'InstallData',
- 'install_lib': 'InstallLib',
- 'build': 'Build',
- 'build_ext': 'BuildExt',
-}
-
-
-def add_option(command, long_name, help_text, short_name=None, default=None,
- inherit=None):
- """ Add an option """
- try:
- command_class = globals()[_command_mapping[command]]
- except KeyError:
- raise ValueError("Unknown command %r" % (command,))
- for opt in command_class.user_options:
- if opt[0] == long_name:
- break
- else:
- opt = (long_name, short_name, help_text)
- command_class.user_options.append(opt)
- if not long_name.endswith('='):
- command_class.boolean_options.append(long_name)
- attr_name = _fancy_getopt.translate_longopt(long_name)
- else:
- attr_name = _fancy_getopt.translate_longopt(long_name[:-1])
- if command not in _option_defaults:
- _option_defaults[command] = []
- if inherit is not None:
- if isinstance(inherit, str):
- inherit = [inherit]
- for i_inherit in inherit:
- add_option(
- i_inherit, long_name, help_text, short_name, default
- )
- default = None
- if command not in _option_inherits:
- _option_inherits[command] = []
- for i_inherit in inherit:
- for i_command, opt_name in _option_inherits[command]:
- if i_command == i_inherit and opt_name == attr_name:
- break
- else:
- _option_inherits[command].append((i_inherit, attr_name))
- _option_defaults[command].append((attr_name, default))
-
-
-def add_finalizer(command, key, func):
- """ Add finalizer """
- if command not in _option_finalizers:
- _option_finalizers[command] = {}
- if key not in _option_finalizers[command]:
- _option_finalizers[command][key] = func
-
-
-class Install(_install.install):
- """ Extended installer to reflect the additional data options """
- user_options = _install.install.user_options + [
- ('single-version-externally-managed', None,
- "Compat option. Does not a thing."),
- ]
- boolean_options = _install.install.boolean_options + [
- 'single-version-externally-managed'
- ]
-
- def initialize_options(self):
- """ Prepare for new options """
- _install.install.initialize_options(self)
- self.single_version_externally_managed = None
- if 'install' in _option_defaults:
- for opt_name, default in _option_defaults['install']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install.install.finalize_options(self)
- if 'install' in _option_inherits:
- for parent, opt_name in _option_inherits['install']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'install' in _option_finalizers:
- for func in list(_option_finalizers['install'].values()):
- func(self)
-
-
-class InstallData(_install_data.install_data):
- """ Extended data installer """
- user_options = _install_data.install_data.user_options + []
- boolean_options = _install_data.install_data.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_data.install_data.initialize_options(self)
- if 'install_data' in _option_defaults:
- for opt_name, default in _option_defaults['install_data']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_data.install_data.finalize_options(self)
- if 'install_data' in _option_inherits:
- for parent, opt_name in _option_inherits['install_data']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'install_data' in _option_finalizers:
- for func in list(_option_finalizers['install_data'].values()):
- func(self)
-
-
-class InstallLib(_install_lib.install_lib):
- """ Extended lib installer """
- user_options = _install_lib.install_lib.user_options + []
- boolean_options = _install_lib.install_lib.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_lib.install_lib.initialize_options(self)
- if 'install_lib' in _option_defaults:
- for opt_name, default in _option_defaults['install_lib']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_lib.install_lib.finalize_options(self)
- if 'install_lib' in _option_inherits:
- for parent, opt_name in _option_inherits['install_lib']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'install_lib' in _option_finalizers:
- for func in list(_option_finalizers['install_lib'].values()):
- func(self)
-
-
-class BuildExt(_build_ext.build_ext):
- """
- Extended extension builder class
-
- This class allows extensions to provide a ``check_prerequisites`` method
- which is called before actually building it. The method takes the
- `BuildExt` instance and returns whether the extension should be skipped or
- not.
- """
-
- def initialize_options(self):
- """ Prepare for new options """
- _build_ext.build_ext.initialize_options(self)
- if 'build_ext' in _option_defaults:
- for opt_name, default in _option_defaults['build_ext']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build_ext.build_ext.finalize_options(self)
- if 'build_ext' in _option_inherits:
- for parent, opt_name in _option_inherits['build_ext']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'build_ext' in _option_finalizers:
- for func in list(_option_finalizers['build_ext'].values()):
- func(self)
-
- def build_extension(self, ext):
- """
- Build C extension - with extended functionality
-
- The following features are added here:
-
- - ``ext.check_prerequisites`` is called before the extension is being
- built. See `Extension` for details. If the method does not exist,
- simply no check will be run.
- - The macros ``EXT_PACKAGE`` and ``EXT_MODULE`` will be filled (or
- unset) depending on the extensions name, but only if they are not
- already defined.
-
- :Parameters:
- `ext` : `Extension`
- The extension to build. If it's a pure
- ``distutils.core.Extension``, simply no prequisites check is
- applied.
-
- :Return: whatever ``distutils.command.build_ext.build_ext`` returns
- :Rtype: any
- """
- # handle name macros
- macros = dict(ext.define_macros or ())
- tup = ext.name.split('.')
- if len(tup) == 1:
- pkg, mod = None, tup[0]
- else:
- pkg, mod = '.'.join(tup[:-1]), tup[-1]
- if pkg is not None and 'EXT_PACKAGE' not in macros:
- ext.define_macros.append(('EXT_PACKAGE', pkg))
- if 'EXT_MODULE' not in macros:
- ext.define_macros.append(('EXT_MODULE', mod))
- if pkg is None:
- macros = dict(ext.undef_macros or ())
- if 'EXT_PACKAGE' not in macros:
- ext.undef_macros.append('EXT_PACKAGE')
-
- # handle prereq checks
- try:
- checker = ext.check_prerequisites
- except AttributeError:
- pass
- else:
- if checker(self):
- log.info("Skipping %s extension" % ext.name)
- return
-
- return _build_ext.build_ext.build_extension(self, ext)
-
-
-class Build(_build.build):
-
- def initialize_options(self):
- """ Prepare for new options """
- _build.build.initialize_options(self)
- if 'build' in _option_defaults:
- for opt_name, default in _option_defaults['build']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build.build.finalize_options(self)
- if 'build' in _option_inherits:
- for parent, opt_name in _option_inherits['build']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'build' in _option_finalizers:
- for func in list(_option_finalizers['build'].values()):
- func(self)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/data.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/data.py
deleted file mode 100644
index d4221735768..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/data.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Data distribution
-===================
-
-This module provides tools to simplify data distribution.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from distutils import filelist as _filelist
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-
-
-def splitpath(path):
- """ Split a path """
- drive, path = '', _os.path.normpath(path)
- try:
- splitunc = _os.path.splitunc
- except AttributeError:
- pass
- else:
- drive, path = splitunc(path)
- if not drive:
- drive, path = _os.path.splitdrive(path)
- elems = []
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- while 1:
- prefix, path = _os.path.split(path)
- elems.append(path)
- if prefix in ('', sep):
- drive = _os.path.join(drive, prefix)
- break
- path = prefix
- elems.reverse()
- return drive, elems
-
-
-def finalizer(installer):
- """ Finalize install_data """
- data_files = []
- for item in installer.data_files:
- if not isinstance(item, Data):
- data_files.append(item)
- continue
- data_files.extend(item.flatten(installer))
- installer.data_files = data_files
-
-
-class Data(object):
- """ File list container """
-
- def __init__(self, files, target=None, preserve=0, strip=0,
- prefix=None):
- """ Initialization """
- self._files = files
- self._target = target
- self._preserve = preserve
- self._strip = strip
- self._prefix = prefix
- self.fixup_commands()
-
- def fixup_commands(self):
- pass
-
- def from_templates(cls, *templates, **kwargs):
- """ Initialize from template """
- files = _filelist.FileList()
- for tpl in templates:
- for line in tpl.split(';'):
- files.process_template_line(line.strip())
- files.sort()
- files.remove_duplicates()
- result = []
- for filename in files.files:
- _, elems = splitpath(filename)
- if '.svn' in elems or '.git' in elems:
- continue
- result.append(filename)
- return cls(result, **kwargs)
- from_templates = classmethod(from_templates)
-
- def flatten(self, installer):
- """ Flatten the file list to (target, file) tuples """
- # pylint: disable = W0613
- if self._prefix:
- _, prefix = splitpath(self._prefix)
- telems = prefix
- else:
- telems = []
-
- tmap = {}
- for fname in self._files:
- (_, name), target = splitpath(fname), telems
- if self._preserve:
- if self._strip:
- name = name[max(0, min(self._strip, len(name) - 1)):]
- if len(name) > 1:
- target = telems + name[:-1]
- tmap.setdefault(_posixpath.join(*target), []).append(fname)
- return list(tmap.items())
-
-
-class Documentation(Data):
- """ Documentation container """
-
- def fixup_commands(self):
- _commands.add_option('install_data', 'without-docs',
- help_text='Do not install documentation files',
- inherit='install',
- )
- _commands.add_finalizer('install_data', 'documentation', finalizer)
-
- def flatten(self, installer):
- """ Check if docs should be installed at all """
- if installer.without_docs:
- return []
- return Data.flatten(self, installer)
-
-
-class Manpages(Documentation):
- """ Manpages container """
-
- def dispatch(cls, files):
- """ Automatically dispatch manpages to their target directories """
- mpmap = {}
- for manpage in files:
- normalized = _os.path.normpath(manpage)
- _, ext = _os.path.splitext(normalized)
- if ext.startswith(_os.path.extsep):
- ext = ext[len(_os.path.extsep):]
- mpmap.setdefault(ext, []).append(manpage)
- return [cls(manpages, prefix=_posixpath.join(
- 'share', 'man', 'man%s' % section,
- )) for section, manpages in list(mpmap.items())]
- dispatch = classmethod(dispatch)
-
- def flatten(self, installer):
- """ Check if manpages are suitable """
- if _sys.platform == 'win32':
- return []
- return Documentation.flatten(self, installer)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/dist.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/dist.py
deleted file mode 100644
index cce21e57a63..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/dist.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- dist utilities
-================
-
-dist utilities.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import sys as _sys
-
-from _setup import shell as _shell
-
-
-def run_setup(*args, **kwargs):
- """ Run setup """
- if 'setup' in kwargs:
- script = kwargs.get('setup') or 'setup.py'
- del kwargs['setup']
- else:
- script = 'setup.py'
- if 'fakeroot' in kwargs:
- fakeroot = kwargs['fakeroot']
- del kwargs['fakeroot']
- else:
- fakeroot = None
- if kwargs:
- raise TypeError("Unrecognized keyword parameters")
-
- script = _shell.native(script)
- argv = [_sys.executable, script] + list(args)
- if fakeroot:
- argv.insert(0, fakeroot)
- return not _shell.spawn(*argv)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/ext.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/ext.py
deleted file mode 100644
index 852c466547e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/ext.py
+++ /dev/null
@@ -1,253 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- C extension tools
-===================
-
-C extension tools.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import core as _core
-from distutils import errors as _distutils_errors
-from distutils import log
-import os as _os
-import posixpath as _posixpath
-import shutil as _shutil
-import tempfile as _tempfile
-
-from _setup import commands as _commands
-
-def _install_finalizer(installer):
- if installer.without_c_extensions:
- installer.distribution.ext_modules = []
-
-def _build_finalizer(builder):
- if builder.without_c_extensions:
- builder.extensions = []
-
-
-class Extension(_core.Extension):
- """
- Extension with prerequisite check interface
-
- If your check is cacheable (during the setup run), override
- `cached_check_prerequisites`, `check_prerequisites` otherwise.
-
- :IVariables:
- `cached_check` : ``bool``
- The cached check result
- """
- cached_check = None
-
- def __init__(self, *args, **kwargs):
- """ Initialization """
- if 'depends' in kwargs:
- self.depends = kwargs['depends'] or []
- else:
- self.depends = []
- _core.Extension.__init__(self, *args, **kwargs)
-
- # add include path
- included = _posixpath.join('_setup', 'include')
- if included not in self.include_dirs:
- self.include_dirs.append(included)
-
- # add cext.h to the dependencies
- cext_h = _posixpath.join(included, 'cext.h')
- if cext_h not in self.depends:
- self.depends.append(cext_h)
-
- _commands.add_option('install_lib', 'without-c-extensions',
- help_text='Don\'t install C extensions',
- inherit='install',
- )
- _commands.add_finalizer('install_lib', 'c-extensions',
- _install_finalizer
- )
- _commands.add_option('build_ext', 'without-c-extensions',
- help_text='Don\'t build C extensions',
- inherit=('build', 'install_lib'),
- )
- _commands.add_finalizer('build_ext', 'c-extensions', _build_finalizer)
-
- def check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is cacheable (during the setup run), override
- `cached_check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- if self.cached_check is None:
- log.debug("PREREQ check for %s" % self.name)
- self.cached_check = self.cached_check_prerequisites(build)
- else:
- log.debug("PREREQ check for %s (cached)" % self.name)
- return self.cached_check
-
- def cached_check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is *not* cacheable (during the setup run),
- override `check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- # pylint: disable = W0613
- log.debug("Nothing to check for %s!" % self.name)
- return False
-
-
-class ConfTest(object):
- """
- Single conftest abstraction
-
- :IVariables:
- `_tempdir` : ``str``
- The tempdir created for this test
-
- `src` : ``str``
- Name of the source file
-
- `target` : ``str``
- Target filename
-
- `compiler` : ``CCompiler``
- compiler instance
-
- `obj` : ``list``
- List of object filenames (``[str, ...]``)
- """
- _tempdir = None
-
- def __init__(self, build, source):
- """
- Initialization
-
- :Parameters:
- `build` : ``distuils.command.build_ext.build_ext``
- builder instance
-
- `source` : ``str``
- Source of the file to compile
- """
- self._tempdir = tempdir = _tempfile.mkdtemp()
- src = _os.path.join(tempdir, 'conftest.c')
- fp = open(src, 'w', encoding='utf-8')
- try:
- fp.write(source)
- finally:
- fp.close()
- self.src = src
- self.compiler = compiler = build.compiler
- self.target = _os.path.join(tempdir, 'conftest')
- self.obj = compiler.object_filenames([src], output_dir=tempdir)
-
- def __del__(self):
- """ Destruction """
- self.destroy()
-
- def destroy(self):
- """ Destroy the conftest leftovers on disk """
- tempdir, self._tempdir = self._tempdir, None
- if tempdir is not None:
- _shutil.rmtree(tempdir)
-
- def compile(self, **kwargs):
- """
- Compile the conftest
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the compiler call
-
- :Return: Was the compilation successful?
- :Rtype: ``bool``
- """
- kwargs['output_dir'] = self._tempdir
- try:
- self.compiler.compile([self.src], **kwargs)
- except _distutils_errors.CompileError:
- return False
- return True
-
- def link(self, **kwargs):
- r"""
- Link the conftest
-
- Before you can link the conftest objects they need to be `compile`\d.
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the linker call
-
- :Return: Was the linking successful?
- :Rtype: ``bool``
- """
- try:
- self.compiler.link_executable(self.obj, self.target, **kwargs)
- except _distutils_errors.LinkError:
- return False
- return True
-
- def pipe(self, mode="r"):
- r"""
- Execute the conftest binary and connect to it using a pipe
-
- Before you can pipe to or from the conftest binary it needs to
- be `link`\ed.
-
- :Parameters:
- `mode` : ``str``
- Pipe mode - r/w
-
- :Return: The open pipe
- :Rtype: ``file``
- """
- return _os.popen(self.compiler.executable_filename(self.target), mode)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/setup.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/setup.py
deleted file mode 100644
index 83f1c21d544..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/setup.py
+++ /dev/null
@@ -1,420 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Main setup runner
-===================
-
-This module provides a wrapper around the distutils core setup.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import configparser as _config_parser
-from distutils import core as _core
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-from _setup import data as _data
-from _setup import ext as _ext
-from _setup import util as _util
-from _setup import shell as _shell
-
-
-def check_python_version(impl, version_min, version_max):
- """ Check python version """
- if impl == 'python':
- version_info = _sys.version_info
- elif impl == 'pypy':
- version_info = getattr(_sys, 'pypy_version_info', None)
- if not version_info:
- return
- elif impl == 'jython':
- if not 'java' in _sys.platform.lower():
- return
- version_info = _sys.version_info
- else:
- raise AssertionError("impl not in ('python', 'pypy', 'jython')")
-
- pyversion = list(map(int, version_info[:3]))
- if version_min:
- min_required = list(
- map(int, '.'.join((version_min, '0.0.0')).split('.')[:3])
- )
- if pyversion < min_required:
- raise EnvironmentError("Need at least %s %s (vs. %s)" % (
- impl, version_min, '.'.join(map(str, pyversion))
- ))
- if version_max:
- max_required = list(map(int, version_max.split('.')))
- max_required[-1] += 1
- if pyversion >= max_required:
- raise EnvironmentError("Need at max %s %s (vs. %s)" % (
- impl,
- version_max,
- '.'.join(map(str, pyversion))
- ))
-
-
-def find_description(docs):
- """
- Determine the package description from DESCRIPTION
-
- :Parameters:
- `docs` : ``dict``
- Docs config section
-
- :Return: Tuple of summary, description and license
- (``('summary', 'description', 'license')``)
- (all may be ``None``)
- :Rtype: ``tuple``
- """
- summary = None
- filename = docs.get('meta.summary', 'SUMMARY').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- try:
- summary = fp.read().strip().splitlines()[0].rstrip()
- except IndexError:
- summary = ''
- finally:
- fp.close()
-
- description = None
- filename = docs.get('meta.description', 'DESCRIPTION').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- description = fp.read().rstrip()
- finally:
- fp.close()
-
- if summary is None and description:
- from docutils import core
- summary = core.publish_parts(
- source=description,
- source_path=filename,
- writer_name='html',
- )['title'].encode('utf-8')
-
- return summary, description
-
-
-def find_classifiers(docs):
- """
- Determine classifiers from CLASSIFIERS
-
- :return: List of classifiers (``['classifier', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_provides(docs):
- """
- Determine provides from PROVIDES
-
- :return: List of provides (``['provides', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.provides', 'PROVIDES').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_license(docs):
- """
- Determine license from LICENSE
-
- :return: License text
- :rtype: ``str``
- """
- filename = docs.get('meta.license', 'LICENSE').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- return fp.read().rstrip()
- finally:
- fp.close()
- return None
-
-
-def find_packages(manifest):
- """ Determine packages and subpackages """
- packages = {}
- collect = manifest.get('packages.collect', '').split()
- lib = manifest.get('packages.lib', '.')
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- for root in collect:
- for dirpath, _, filenames in _shell.walk(_os.path.join(lib, root)):
- if dirpath.find('.svn') >= 0 or dirpath.find('.git') >= 0:
- continue
- if '__init__.py' in filenames:
- packages[
- _os.path.normpath(dirpath).replace(sep, '.')
- ] = None
- packages = list(packages.keys())
- packages.sort()
- return packages
-
-
-def find_data(name, docs):
- """ Determine data files """
- result = []
- if docs.get('extra', '').strip():
- result.append(_data.Documentation(docs['extra'].split(),
- prefix='share/doc/%s' % name,
- ))
- if docs.get('examples.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['examples.dir']]
- if docs.get('examples.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['examples.ignore'].split()
- ])
- strip = int(docs.get('examples.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('userdoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['userdoc.dir']]
- if docs.get('userdoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['userdoc.ignore'].split()
- ])
- strip = int(docs.get('userdoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('apidoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['apidoc.dir']]
- if docs.get('apidoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['apidoc.ignore'].split()
- ])
- strip = int(docs.get('apidoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('man', '').strip():
- result.extend(_data.Manpages.dispatch(docs['man'].split()))
- return result
-
-
-def make_manifest(manifest, config, docs, kwargs):
- """ Create file list to pack up """
- # pylint: disable = R0912
- kwargs = kwargs.copy()
- kwargs['script_args'] = ['install']
- kwargs['packages'] = list(kwargs.get('packages') or ()) + [
- '_setup', '_setup.py2', '_setup.py3',
- ] + list(manifest.get('packages.extra', '').split() or ())
- _core._setup_stop_after = "commandline"
- try:
- dist = _core.setup(**kwargs)
- finally:
- _core._setup_stop_after = None
-
- result = ['MANIFEST', 'PKG-INFO', 'setup.py'] + list(config)
- # TODO: work with default values:
- for key in ('classifiers', 'description', 'summary', 'provides',
- 'license'):
- filename = docs.get('meta.' + key, '').strip()
- if filename and _os.path.isfile(filename):
- result.append(filename)
-
- cmd = dist.get_command_obj("build_py")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_py", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("build_ext")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_ext", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for ext in cmd.extensions:
- if ext.depends:
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in ext.depends])
-
- cmd = dist.get_command_obj("build_clib")
- cmd.ensure_finalized()
- if cmd.libraries:
- #import pprint; pprint.pprint(("build_clib", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for lib in cmd.libraries:
- if lib[1].get('depends'):
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in lib[1]['depends']])
-
- cmd = dist.get_command_obj("build_scripts")
- cmd.ensure_finalized()
- #import pprint; pprint.pprint(("build_scripts", cmd.get_source_files()))
- if cmd.get_source_files():
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("install_data")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("install_data", cmd.get_inputs()))
- try:
- strings = str
- except NameError:
- strings = (str, str)
-
- for item in cmd.get_inputs():
- if isinstance(item, strings):
- result.append(item)
- else:
- result.extend(item[1])
-
- for item in manifest.get('dist', '').split():
- result.append(item)
- if _os.path.isdir(item):
- for filename in _shell.files(item):
- result.append(filename)
-
- result = list(dict([(item, None) for item in result]).keys())
- result.sort()
- return result
-
-
-def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
- """ Main runner """
- if ext is None:
- ext = []
-
- cfg = _util.SafeConfigParser()
- cfg.read(config, encoding='utf-8')
- pkg = dict(cfg.items('package'))
- python_min = pkg.get('python.min') or None
- python_max = pkg.get('python.max') or None
- check_python_version('python', python_min, python_max)
- pypy_min = pkg.get('pypy.min') or None
- pypy_max = pkg.get('pypy.max') or None
- check_python_version('pypy', pypy_min, pypy_max)
- jython_min = pkg.get('jython.min') or None
- jython_max = pkg.get('jython.max') or None
- check_python_version('jython', jython_min, jython_max)
-
- manifest = dict(cfg.items('manifest'))
- try:
- docs = dict(cfg.items('docs'))
- except _config_parser.NoSectionError:
- docs = {}
-
- summary, description = find_description(docs)
- scripts = manifest.get('scripts', '').strip() or None
- if scripts:
- scripts = scripts.split()
- modules = manifest.get('modules', '').strip() or None
- if modules:
- modules = modules.split()
- keywords = docs.get('meta.keywords', '').strip() or None
- if keywords:
- keywords = keywords.split()
- revision = pkg.get('version.revision', '').strip()
- if revision:
- revision = "-r%s" % (revision,)
-
- kwargs = {
- 'name': pkg['name'],
- 'version': "%s%s" % (
- pkg['version.number'],
- ["", "-dev%s" % (revision,)][_util.humanbool(
- 'version.dev', pkg.get('version.dev', 'false')
- )],
- ),
- 'provides': find_provides(docs),
- 'description': summary,
- 'long_description': description,
- 'classifiers': find_classifiers(docs),
- 'keywords': keywords,
- 'author': pkg['author.name'],
- 'author_email': pkg['author.email'],
- 'maintainer': pkg.get('maintainer.name'),
- 'maintainer_email': pkg.get('maintainer.email'),
- 'url': pkg.get('url.homepage'),
- 'download_url': pkg.get('url.download'),
- 'license': find_license(docs),
- 'package_dir': {'': manifest.get('packages.lib', '.')},
- 'packages': find_packages(manifest),
- 'py_modules': modules,
- 'ext_modules': ext,
- 'scripts': scripts,
- 'script_args': script_args,
- 'data_files': find_data(pkg['name'], docs),
- 'cmdclass': {
- 'build' : _commands.Build,
- 'build_ext' : _commands.BuildExt,
- 'install' : _commands.Install,
- 'install_data': _commands.InstallData,
- 'install_lib' : _commands.InstallLib,
- }
- }
- for key in ('provides',):
- if key not in _core.setup_keywords:
- del kwargs[key]
-
- if manifest_only:
- return make_manifest(manifest, config, docs, kwargs)
-
- # monkey-patch crappy manifest writer away.
- from distutils.command import sdist
- sdist.sdist.get_file_list = sdist.sdist.read_manifest
-
- return _core.setup(**kwargs)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/shell.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/shell.py
deleted file mode 100644
index 91f2ebc5b40..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/shell.py
+++ /dev/null
@@ -1,351 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Shell utilities
-=================
-
-Shell utilities.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import errno as _errno
-import fnmatch as _fnmatch
-import os as _os
-import shutil as _shutil
-import subprocess as _subprocess
-import sys as _sys
-import tempfile as _tempfile
-
-cwd = _os.path.dirname(_os.path.abspath(_sys.argv[0]))
-
-class ExitError(RuntimeError):
- """ Exit error """
- def __init__(self, code):
- RuntimeError.__init__(self, code)
- self.code = code
- self.signal = None
-
-
-class SignalError(ExitError):
- """ Signal error """
- def __init__(self, code, signal):
- ExitError.__init__(self, code)
- import signal as _signal
- self.signal = signal
- for key, val in vars(_signal).items():
- if key.startswith('SIG') and not key.startswith('SIG_'):
- if val == signal:
- self.signalstr = key[3:]
- break
- else:
- self.signalstr = '%04d' % signal
-
-
-def native(path):
- """ Convert slash path to native """
- path = _os.path.sep.join(path.split('/'))
- return _os.path.normpath(_os.path.join(cwd, path))
-
-
-def cp(src, dest):
- """ Copy src to dest """
- _shutil.copy2(native(src), native(dest))
-
-
-def cp_r(src, dest):
- """ Copy -r src to dest """
- _shutil.copytree(native(src), native(dest))
-
-
-def rm(dest):
- """ Remove a file """
- try:
- _os.unlink(native(dest))
- except OSError as e:
- if _errno.ENOENT != e.errno:
- raise
-
-def rm_rf(dest):
- """ Remove a tree """
- dest = native(dest)
- if _os.path.exists(dest):
- for path in files(dest, '*'):
- _os.chmod(native(path), 0o644)
- _shutil.rmtree(dest)
-
-
-mkstemp = _tempfile.mkstemp
-
-
-def _pipespawn(argv, env):
- """ Pipe spawn """
- # pylint: disable = R0912
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, ((r"""
-import os
-import pickle
-import subprocess
-import sys
-
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
-p = subprocess.Popen(argv, env=env)
-result = p.wait()
-if result < 0:
- print("\n%%d 1" %% (-result))
- sys.exit(2)
-if result == 0:
- sys.exit(0)
-print("\n%%d" %% (result & 7,))
-sys.exit(3)
- """.strip() + "\n") % {
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(dict(env))),
- }).encode('utf-8'))
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- shell = True
- close_fds = False
- else:
- argv = [_sys.executable, name]
- shell = False
- close_fds = True
-
- res = 0
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- proc = _subprocess.Popen(argv,
- shell=shell,
- stdin=_subprocess.PIPE,
- stdout=_subprocess.PIPE,
- close_fds=close_fds,
- env=env,
- )
- try:
- proc.stdin.close()
- result = proc.stdout.read()
- finally:
- res = proc.wait()
- if res != 0:
- if res == 2:
- signal, code = list(map(int, result.splitlines()[-1].split()))
- raise SignalError(code, signal)
- elif res == 3:
- code = int(result.splitlines()[-1].strip())
- raise ExitError(code)
- raise ExitError(res)
-
- return result.decode('latin-1')
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def _filepipespawn(infile, outfile, argv, env):
- """ File Pipe spawn """
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, (("""
-import os
-import pickle
-import sys
-
-infile = pickle.loads(%(infile)s)
-outfile = pickle.loads(%(outfile)s)
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-
-if infile is not None:
- infile = open(infile, 'rb')
- os.dup2(infile.fileno(), 0)
- infile.close()
-if outfile is not None:
- outfile = open(outfile, 'wb')
- os.dup2(outfile.fileno(), 1)
- outfile.close()
-
-pid = os.spawnve(os.P_NOWAIT, argv[0], argv, env)
-result = os.waitpid(pid, 0)[1]
-sys.exit(result & 7)
- """.strip() + "\n") % {
- 'infile': repr(_pickle.dumps(_os.path.abspath(infile))),
- 'outfile': repr(_pickle.dumps(_os.path.abspath(outfile))),
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(env)),
- }).encode('utf-8'))
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- close_fds = False
- shell = True
- else:
- argv = [_sys.executable, name]
- close_fds = True
- shell = False
-
- p = _subprocess.Popen(
- argv, env=env, shell=shell, close_fds=close_fds
- )
- return p.wait()
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def spawn(*argv, **kwargs):
- """ Spawn a process """
- if _sys.platform == 'win32':
- newargv = []
- for arg in argv:
- if not arg or ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- newargv.append(arg)
- argv = newargv
- close_fds = False
- shell = True
- else:
- close_fds = True
- shell = False
-
- env = kwargs.get('env')
- if env is None:
- env = dict(_os.environ)
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- echo = kwargs.get('echo')
- if echo:
- print(' '.join(argv))
- filepipe = kwargs.get('filepipe')
- if filepipe:
- return _filepipespawn(
- kwargs.get('stdin'), kwargs.get('stdout'), argv, env
- )
- pipe = kwargs.get('stdout')
- if pipe:
- return _pipespawn(argv, env)
-
- p = _subprocess.Popen(argv, env=env, shell=shell, close_fds=close_fds)
- return p.wait()
-
-
-walk = _os.walk
-
-
-def files(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- filenames.sort()
- for name in _fnmatch.filter(filenames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
- dirnames.sort()
-
-
-def dirs(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- dirnames.sort()
- for name in _fnmatch.filter(dirnames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
-
-
-def frompath(executable):
- """ Find executable in PATH """
- # Based on distutils.spawn.find_executable.
- path = _os.environ.get('PATH', '')
- paths = [
- _os.path.expanduser(item)
- for item in path.split(_os.pathsep)
- ]
- ext = _os.path.splitext(executable)[1]
- exts = ['']
- if _sys.platform == 'win32' or _os.name == 'os2':
- eext = ['.exe', '.bat', '.py']
- if ext not in eext:
- exts.extend(eext)
-
- for ext in exts:
- if not _os.path.isfile(executable + ext):
- for path in paths:
- fname = _os.path.join(path, executable + ext)
- if _os.path.isfile(fname):
- # the file exists, we have a shot at spawn working
- return fname
- else:
- return executable + ext
-
- return None
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/__init__.py
deleted file mode 100644
index 5459454514b..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=====================
- Package _setup.term
-=====================
-
-Terminal tools, not distributed.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-# pylint: disable = W0611
-from _setup.term._term import terminfo, write, green, red, yellow, announce
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/_term.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/_term.py
deleted file mode 100644
index b94f58e27f1..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/term/_term.py
+++ /dev/null
@@ -1,116 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Terminal writer
-=================
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import sys as _sys
-
-
-class _INFO(dict):
- """ Terminal info dict """
-
- def __init__(self):
- """ Initialization """
- dict.__init__(self, {
- 'NORMAL': '',
- 'BOLD': '',
- 'ERASE': '\n',
- 'RED': '',
- 'YELLOW': '',
- 'GREEN': '',
- })
- try:
- import curses as _curses
- except ImportError:
- # fixup if a submodule of curses failed.
- if 'curses' in _sys.modules:
- del _sys.modules['curses']
- else:
- try:
- _curses.setupterm()
- except (TypeError, _curses.error):
- pass
- else:
- def make_color(color):
- """ Make color control string """
- seq = _curses.tigetstr('setaf').decode('ascii')
- if seq is not None:
- # XXX may fail - need better logic
- seq = seq.replace("%p1", "") % color
- return seq
-
- self['NORMAL'] = _curses.tigetstr('sgr0').decode('ascii')
- self['BOLD'] = _curses.tigetstr('bold').decode('ascii')
-
- erase = _curses.tigetstr('el1').decode('ascii')
- if erase is not None:
- self['ERASE'] = erase + \
- _curses.tigetstr('cr').decode('ascii')
-
- self['RED'] = make_color(_curses.COLOR_RED)
- self['YELLOW'] = make_color(_curses.COLOR_YELLOW)
- self['GREEN'] = make_color(_curses.COLOR_GREEN)
-
- def __getitem__(self, key):
- """ Deliver always """
- dict.get(self, key) or ""
-
-
-def terminfo():
- """ Get info singleton """
- # pylint: disable = E1101, W0612
- if terminfo.info is None:
- terminfo.info = _INFO()
- return terminfo.info
-terminfo.info = None
-
-
-def write(fmt, **kwargs):
- """ Write stuff on the terminal """
- parm = dict(terminfo())
- parm.update(kwargs)
- _sys.stdout.write(fmt % parm)
- _sys.stdout.flush()
-
-
-def green(bmt, **kwargs):
- """ Write something in green on screen """
- announce("%%(GREEN)s%s%%(NORMAL)s" % bmt, **kwargs)
-
-
-def red(bmt, **kwargs):
- """ Write something in red on the screen """
- announce("%%(BOLD)s%%(RED)s%s%%(NORMAL)s" % bmt, **kwargs)
-
-
-def yellow(fmt, **kwargs):
- """ Write something in yellow on the screen """
- announce("%%(BOLD)s%%(YELLOW)s%s%%(NORMAL)s" % fmt, **kwargs)
-
-
-def announce(fmt, **kwargs):
- """ Announce something """
- write(fmt, **kwargs)
- _sys.stdout.write("\n")
- _sys.stdout.flush()
-
-
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/util.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/util.py
deleted file mode 100644
index a07daa812fe..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/_setup/py3/util.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Setup utilities
-=================
-
-Setup utilities.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from distutils import util as _util
-try:
- from configparser import SafeConfigParser
-except ImportError:
- import configparser as _config_parser
- class SafeConfigParser(_config_parser.ConfigParser):
- """ Safe config parser """
- def _interpolate(self, section, option, rawval, vars):
- return rawval
-
- def items(self, section):
- return [(key, self.get(section, key))
- for key in self.options(section)
- ]
-
-
-def humanbool(name, value):
- """
- Determine human boolean value
-
- :Parameters:
- `name` : ``str``
- The config key (used for error message)
-
- `value` : ``str``
- The config value
-
- :Return: The boolean value
- :Rtype: ``bool``
-
- :Exceptions:
- - `ValueError` : The value could not be recognized
- """
- try:
- return _util.strtobool(str(value).strip().lower() or 'no')
- except ValueError:
- raise ValueError("Unrecognized config value: %s = %s" % (name, value))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/LICENSE.cssmin b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/LICENSE.cssmin
deleted file mode 100644
index c10ccb05c7a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/LICENSE.cssmin
+++ /dev/null
@@ -1,64 +0,0 @@
-`cssmin.py` - A Python port of the YUI CSS compressor.
-
-Copyright (c) 2010 Zachary Voase
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
--------------------------------------------------------------------------------
-
-This software contains portions of the YUI CSS Compressor, notably some regular
-expressions for reducing the size of CSS. The YUI Compressor source code can be
-found at <http://github.com/yui/yuicompressor>, and is licensed as follows:
-
-> YUI Compressor Copyright License Agreement (BSD License)
->
-> Copyright (c) 2009, Yahoo! Inc.
-> All rights reserved.
->
-> Redistribution and use of this software in source and binary forms,
-> with or without modification, are permitted provided that the following
-> conditions are met:
->
-> * Redistributions of source code must retain the above
-> copyright notice, this list of conditions and the
-> following disclaimer.
->
-> * Redistributions in binary form must reproduce the above
-> copyright notice, this list of conditions and the
-> following disclaimer in the documentation and/or other
-> materials provided with the distribution.
->
-> * Neither the name of Yahoo! Inc. nor the names of its
-> contributors may be used to endorse or promote products
-> derived from this software without specific prior
-> written permission of Yahoo! Inc.
->
-> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-> DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-> FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/__init__.py
deleted file mode 100644
index 705dd0ccd1b..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: ascii -*-
-r"""
-=================================
- Benchmark cssmin implementations
-=================================
-
-Benchmark cssmin implementations.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-"""
-if __doc__:
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/cssmin.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/cssmin.py
deleted file mode 100644
index cbfbf8d4966..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/cssmin.py
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""`cssmin` - A Python port of the YUI CSS compressor.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-"""
-
-try:
- from StringIO import StringIO # The pure-Python StringIO supports unicode.
-except ImportError:
- from io import StringIO
-import re
-
-
-__version__ = '0.2.0'
-
-
-def remove_comments(css):
- """Remove all CSS comment blocks."""
-
- iemac = False
- preserve = False
- comment_start = css.find("/*")
- while comment_start >= 0:
- # Preserve comments that look like `/*!...*/`.
- # Slicing is used to make sure we don"t get an IndexError.
- preserve = css[comment_start + 2:comment_start + 3] == "!"
-
- comment_end = css.find("*/", comment_start + 2)
- if comment_end < 0:
- if not preserve:
- css = css[:comment_start]
- break
- elif comment_end >= (comment_start + 2):
- if css[comment_end - 1] == "\\":
- # This is an IE Mac-specific comment; leave this one and the
- # following one alone.
- comment_start = comment_end + 2
- iemac = True
- elif iemac:
- comment_start = comment_end + 2
- iemac = False
- elif not preserve:
- css = css[:comment_start] + css[comment_end + 2:]
- else:
- comment_start = comment_end + 2
- comment_start = css.find("/*", comment_start)
-
- return css
-
-
-def remove_unnecessary_whitespace(css):
- """Remove unnecessary whitespace characters."""
-
- def pseudoclasscolon(css):
-
- """
- Prevents 'p :link' from becoming 'p:link'.
-
- Translates 'p :link' into 'p ___PSEUDOCLASSCOLON___link'; this is
- translated back again later.
- """
-
- regex = re.compile(r"(^|\})(([^\{\:])+\:)+([^\{]*\{)")
- match = regex.search(css)
- while match:
- css = ''.join([
- css[:match.start()],
- match.group().replace(":", "___PSEUDOCLASSCOLON___"),
- css[match.end():]])
- match = regex.search(css)
- return css
-
- css = pseudoclasscolon(css)
- # Remove spaces from before things.
- css = re.sub(r"\s+([!{};:>+\(\)\],])", r"\1", css)
-
- # If there is a `@charset`, then only allow one, and move to the beginning.
- css = re.sub(r"^(.*)(@charset \"[^\"]*\";)", r"\2\1", css)
- css = re.sub(r"^(\s*@charset [^;]+;\s*)+", r"\1", css)
-
- # Put the space back in for a few cases, such as `@media screen` and
- # `(-webkit-min-device-pixel-ratio:0)`.
- css = re.sub(r"\band\(", "and (", css)
-
- # Put the colons back.
- css = css.replace('___PSEUDOCLASSCOLON___', ':')
-
- # Remove spaces from after things.
- css = re.sub(r"([!{}:;>+\(\[,])\s+", r"\1", css)
-
- return css
-
-
-def remove_unnecessary_semicolons(css):
- """Remove unnecessary semicolons."""
-
- return re.sub(r";+\}", "}", css)
-
-
-def remove_empty_rules(css):
- """Remove empty rules."""
-
- return re.sub(r"[^\}\{]+\{\}", "", css)
-
-
-def normalize_rgb_colors_to_hex(css):
- """Convert `rgb(51,102,153)` to `#336699`."""
-
- regex = re.compile(r"rgb\s*\(\s*([0-9,\s]+)\s*\)")
- match = regex.search(css)
- while match:
- colors = map(lambda s: s.strip(), match.group(1).split(","))
- hexcolor = '#%.2x%.2x%.2x' % tuple(map(int, colors))
- css = css.replace(match.group(), hexcolor)
- match = regex.search(css)
- return css
-
-
-def condense_zero_units(css):
- """Replace `0(px, em, %, etc)` with `0`."""
-
- return re.sub(r"([\s:])(0)(px|em|%|in|cm|mm|pc|pt|ex)", r"\1\2", css)
-
-
-def condense_multidimensional_zeros(css):
- """Replace `:0 0 0 0;`, `:0 0 0;` etc. with `:0;`."""
-
- css = css.replace(":0 0 0 0;", ":0;")
- css = css.replace(":0 0 0;", ":0;")
- css = css.replace(":0 0;", ":0;")
-
- # Revert `background-position:0;` to the valid `background-position:0 0;`.
- css = css.replace("background-position:0;", "background-position:0 0;")
-
- return css
-
-
-def condense_floating_points(css):
- """Replace `0.6` with `.6` where possible."""
-
- return re.sub(r"(:|\s)0+\.(\d+)", r"\1.\2", css)
-
-
-def condense_hex_colors(css):
- """Shorten colors from #AABBCC to #ABC where possible."""
-
- regex = re.compile(r"([^\"'=\s])(\s*)#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])")
- match = regex.search(css)
- while match:
- first = match.group(3) + match.group(5) + match.group(7)
- second = match.group(4) + match.group(6) + match.group(8)
- if first.lower() == second.lower():
- css = css.replace(match.group(), match.group(1) + match.group(2) + '#' + first)
- match = regex.search(css, match.end() - 3)
- else:
- match = regex.search(css, match.end())
- return css
-
-
-def condense_whitespace(css):
- """Condense multiple adjacent whitespace characters into one."""
-
- return re.sub(r"\s+", " ", css)
-
-
-def condense_semicolons(css):
- """Condense multiple adjacent semicolon characters into one."""
-
- return re.sub(r";;+", ";", css)
-
-
-def wrap_css_lines(css, line_length):
- """Wrap the lines of the given CSS to an approximate length."""
-
- lines = []
- line_start = 0
- for i, char in enumerate(css):
- # It's safe to break after `}` characters.
- if char == '}' and (i - line_start >= line_length):
- lines.append(css[line_start:i + 1])
- line_start = i + 1
-
- if line_start < len(css):
- lines.append(css[line_start:])
- return '\n'.join(lines)
-
-
-def cssmin(css, wrap=None):
- css = remove_comments(css)
- css = condense_whitespace(css)
- # A pseudo class for the Box Model Hack
- # (see http://tantek.com/CSS/Examples/boxmodelhack.html)
- css = css.replace('"\\"}\\""', "___PSEUDOCLASSBMH___")
- css = remove_unnecessary_whitespace(css)
- css = remove_unnecessary_semicolons(css)
- css = condense_zero_units(css)
- css = condense_multidimensional_zeros(css)
- css = condense_floating_points(css)
- css = normalize_rgb_colors_to_hex(css)
- css = condense_hex_colors(css)
- if wrap is not None:
- css = wrap_css_lines(css, wrap)
- css = css.replace("___PSEUDOCLASSBMH___", '"\\"}\\""')
- css = condense_semicolons(css)
- return css.strip()
-
-
-def main():
- import optparse
- import sys
-
- p = optparse.OptionParser(
- prog="cssmin", version=__version__,
- usage="%prog [--wrap N]",
- description="""Reads raw CSS from stdin, and writes compressed CSS to stdout.""")
-
- p.add_option(
- '-w', '--wrap', type='int', default=None, metavar='N',
- help="Wrap output to approximately N chars per line.")
-
- options, args = p.parse_args()
- sys.stdout.write(cssmin(sys.stdin.read(), wrap=options.wrap))
-
-
-if __name__ == '__main__':
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/main.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/main.py
deleted file mode 100644
index 078150629f2..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/main.py
+++ /dev/null
@@ -1,236 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-r"""
-==================================
- Benchmark cssmin implementations
-==================================
-
-Benchmark cssmin implementations.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-Usage::
-
- python -mbench.main [-c COUNT] [-p file] cssfile ...
-
- -c COUNT number of runs per cssfile and minifier. Defaults to 10.
- -p file File to write the benchmark results in (pickled)
-
-"""
-if __doc__:
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
-__docformat__ = "restructuredtext en"
-__license__ = "Apache License, Version 2.0"
-__version__ = "1.0.0"
-
-import sys as _sys
-import time as _time
-
-import_notes = []
-class _p_02__rcssmin(object):
- def __init__(self):
- import rcssmin
- cssmin = rcssmin._make_cssmin(python_only=True)
- self.cssmin = lambda x: cssmin(x, keep_bang_comments=True)
-
-class _p_03__rcssmin(object):
- def __init__(self):
- import _rcssmin
- cssmin = _rcssmin.cssmin
- self.cssmin = lambda x: cssmin(x, keep_bang_comments=True)
-
-class cssmins(object):
- from bench import cssmin as p_01_cssmin
- p_02_rcssmin = _p_02__rcssmin()
- try:
- p_03__rcssmin = _p_03__rcssmin()
- except ImportError:
- import_notes.append("_rcssmin (C-Port) not available")
- print(import_notes[-1])
-
-print("Python Release: %s" % ".".join(map(str, _sys.version_info[:3])))
-print("")
-
-
-def slurp(filename):
- """ Load a file """
- fp = open(filename)
- try:
- return fp.read()
- finally:
- fp.close()
-
-
-def print_(*value, **kwargs):
- """ Print stuff """
- (kwargs.get('file') or _sys.stdout).write(
- ''.join(value) + kwargs.get('end', '\n')
- )
-
-
-def bench(filenames, count):
- """
- Benchmark the minifiers with given css samples
-
- :Parameters:
- `filenames` : sequence
- List of filenames
-
- `count` : ``int``
- Number of runs per css file and minifier
-
- :Exceptions:
- - `RuntimeError` : empty filenames sequence
- """
- if not filenames:
- raise RuntimeError("Missing files to benchmark")
- try:
- xrange
- except NameError:
- xrange = range
- try:
- cmp
- except NameError:
- cmp = lambda a, b: (a > b) - (a < b)
-
- ports = [item for item in dir(cssmins) if item.startswith('p_')]
- ports.sort()
- space = max(map(len, ports)) - 4
- ports = [(item[5:], getattr(cssmins, item).cssmin) for item in ports]
- flush = _sys.stdout.flush
-
- struct = []
- inputs = [(filename, slurp(filename)) for filename in filenames]
- for filename, style in inputs:
- print_("Benchmarking %r..." % filename, end=" ")
- flush()
- outputs = []
- for _, cssmin in ports:
- try:
- outputs.append(cssmin(style))
- except (SystemExit, KeyboardInterrupt):
- raise
- except:
- outputs.append(None)
- struct.append(dict(
- filename=filename,
- sizes=[
- (item is not None and len(item) or None) for item in outputs
- ],
- size=len(style),
- messages=[],
- times=[],
- ))
- print_("(%.1f KiB)" % (struct[-1]['size'] / 1024.0,))
- flush()
- times = []
- for idx, (name, cssmin) in enumerate(ports):
- if outputs[idx] is None:
- print_(" FAILED %s" % (name,))
- struct[-1]['times'].append((name, None))
- else:
- print_(" Timing %s%s... (%5.1f KiB %s)" % (
- name,
- " " * (space - len(name)),
- len(outputs[idx]) / 1024.0,
- idx == 0 and '*' or ['=', '>', '<'][
- cmp(len(outputs[idx]), len(outputs[0]))
- ],
- ), end=" ")
- flush()
-
- xcount = count
- while True:
- counted = [None for _ in xrange(xcount)]
- start = _time.time()
- for _ in counted:
- cssmin(style)
- end = _time.time()
- result = (end - start) * 1000
- if result < 10: # avoid measuring within the error range
- xcount *= 10
- continue
- times.append(result / xcount)
- break
-
- print_("%8.2f ms" % times[-1], end=" ")
- flush()
- if len(times) <= 1:
- print_()
- else:
- print_("(factor: %s)" % (', '.join([
- '%.2f' % (timed / times[-1]) for timed in times[:-1]
- ])))
- struct[-1]['times'].append((name, times[-1]))
-
- flush()
- print_()
-
- return struct
-
-
-def main(argv=None):
- """ Main """
- import getopt as _getopt
- import os as _os
- import pickle as _pickle
-
- if argv is None:
- argv = _sys.argv[1:]
- try:
- opts, args = _getopt.getopt(argv, "hc:p:", ["help"])
- except getopt.GetoptError:
- e = _sys.exc_info()[0](_sys.exc_info()[1])
- print >> _sys.stderr, "%s\nTry %s -mbench.main --help" % (
- e,
- _os.path.basename(_sys.executable),
- )
- _sys.exit(2)
-
- count, pickle = 10, None
- for key, value in opts:
- if key in ("-h", "--help"):
- print >> _sys.stderr, (
- "%s -mbench.main [-c count] [-p file] cssfile ..." % (
- _os.path.basename(_sys.executable),
- )
- )
- _sys.exit(0)
- elif key == '-c':
- count = int(value)
- elif key == '-p':
- pickle = str(value)
-
- struct = bench(args, count)
- if pickle:
- fp = open(pickle, 'wb')
- try:
- fp.write(_pickle.dumps((
- ".".join(map(str, _sys.version_info[:3])),
- import_notes,
- struct,
- ), 0))
- finally:
- fp.close()
-
-
-if __name__ == '__main__':
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.css b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.css
deleted file mode 100644
index 03079e35a6f..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.css
+++ /dev/null
@@ -1,3861 +0,0 @@
-/*
- * This CSS is taken from wikipedia / mediawiki, it's the combined files of
- * the vector skin described at:
- *
- * http://en.wikipedia.org/wiki/Wikipedia:Catalogue_of_CSS_classes
- */
-
-/*
- * Any rules which should not be flipped automatically in right-to-left situations should be
- * prepended with @noflip in a comment block. Images that should be embedded as base64 data-URLs
- * should be prepended with @embed in a comment block.
- *
- * This style-sheet employs a few CSS trick to accomplish compatibility with a wide range of web
- * browsers. The most common trick is to use some styles in IE6 only. This is accomplished by using
- * a rule that makes things work in IE6, and then following it with a rule that begins with
- * "html > body" or use a child selector ">", which is ignored by IE6 because it does not support
- * the child selector. You can spot this by looking for the "OVERRIDDEN BY COMPLIANT BROWSERS" and
- * "IGNORED BY IE6" comments.
- */
-
-/* Framework */
-html,
-body {
- height: 100%;
- margin: 0;
- padding: 0;
- font-family: sans-serif;
- font-size: 1em;
-}
-body {
- background-color: #f3f3f3;
- /* @embed */
- background-image: url(images/page-base.png);
-}
-/* Content */
-div#content {
- margin-left: 10em;
- padding: 1em;
- /* @embed */
- background-image: url(images/border.png);
- background-position: top left;
- background-repeat: repeat-y;
- background-color: white;
- color: black;
- direction: ltr;
-}
-/* Head */
-#mw-page-base {
- height: 5em;
- background-color: white;
- /* @embed */
- background-image: url(images/page-fade.png);
- background-position: bottom left;
- background-repeat: repeat-x;
-}
-#mw-head-base {
- margin-top: -5em;
- margin-left: 10em;
- height: 5em;
- /* @embed */
- background-image: url(images/border.png);
- background-position: bottom left;
- background-repeat: repeat-x;
-}
-div#mw-head {
- position: absolute;
- top: 0;
- right: 0;
- width: 100%;
-}
-div#mw-head h5 {
- margin: 0;
- padding: 0;
-}
-/* Hide empty portlets */
-div.emptyPortlet {
- display: none;
-}
-/* Personal */
-#p-personal {
- position: absolute;
- top: 0;
- right: 0.75em;
-}
-#p-personal h5 {
- display: none;
-}
-#p-personal ul {
- list-style: none;
- margin: 0;
- padding-left: 10em; /* Keep from overlapping logo */
-}
-/* @noflip */
-#p-personal li {
- line-height: 1.125em;
- float: left;
-}
-/* This one flips! */
-#p-personal li {
- margin-left: 0.75em;
- margin-top: 0.5em;
- font-size: 0.75em;
- white-space: nowrap;
-}
-/* Navigation Containers */
-#left-navigation {
- position: absolute;
- left: 10em;
- top: 2.5em;
-}
-#right-navigation {
- float: right;
- margin-top: 2.5em;
-}
-/* Navigation Labels */
-div.vectorTabs h5,
-div.vectorMenu h5 span {
- display: none;
-}
-/* Namespaces and Views */
-/* @noflip */
-div.vectorTabs {
- float: left;
- height: 2.5em;
-}
-div.vectorTabs {
- /* @embed */
- background-image: url(images/tab-break.png);
- background-position: bottom left;
- background-repeat: no-repeat;
- padding-left: 1px;
-}
-/* @noflip */
-div.vectorTabs ul {
- float: left;
-}
-div.vectorTabs ul {
- height: 100%;
- list-style: none;
- margin: 0;
- padding: 0;
-}
-/* @noflip */
-div.vectorTabs ul li {
- float: left;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-div.vectorTabs ul li {
- line-height: 1.125em;
- display: inline-block;
- height: 100%;
- margin: 0;
- padding: 0;
- background-color: #f3f3f3;
- /* @embed */
- background-image: url(images/tab-normal-fade.png);
- background-position: bottom left;
- background-repeat: repeat-x;
- white-space:nowrap;
-}
-/* IGNORED BY IE6 */
-div.vectorTabs ul > li {
- display: block;
-}
-div.vectorTabs li.selected {
- /* @embed */
- background-image: url(images/tab-current-fade.png);
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-div.vectorTabs li a {
- display: inline-block;
- height: 1.9em;
- padding-left: 0.5em;
- padding-right: 0.5em;
- color: #0645ad;
- cursor: pointer;
- font-size: 0.8em;
-}
-/* IGNORED BY IE6 */
-div.vectorTabs li > a {
- display: block;
-}
-div.vectorTabs li.icon a {
- background-position: bottom right;
- background-repeat: no-repeat;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-div.vectorTabs span a {
- display: inline-block;
- padding-top: 1.25em;
-}
-/* IGNORED BY IE6 */
-/* @noflip */
-div.vectorTabs span > a {
- float: left;
- display: block;
-}
-div.vectorTabs span {
- display: inline-block;
- /* @embed */
- background-image: url(images/tab-break.png);
- background-position: bottom right;
- background-repeat: no-repeat;
-}
-div.vectorTabs li.selected a,
-div.vectorTabs li.selected a:visited{
- color: #333333;
- text-decoration: none;
-}
-div.vectorTabs li.new a,
-div.vectorTabs li.new a:visited{
- color: #a55858;
-}
-/* Variants and Actions */
-/* @noflip */
-div.vectorMenu {
- direction: ltr;
- float: left;
- /* @embed */
- background-image: url(images/arrow-down-icon.png);
- background-position: 100% 60%;
- background-repeat: no-repeat;
- cursor: pointer;
-}
-div.vectorMenuFocus {
- /* @embed */
- background-image: url(images/arrow-down-focus-icon.png);
- background-position: 100% 60%;
-}
-/* @noflip */
-body.rtl div.vectorMenu {
- direction: rtl;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-/* @noflip */
-div#mw-head div.vectorMenu h5 {
- float: left;
- /* @embed */
- background-image: url(images/tab-break.png);
- background-repeat: no-repeat;
-}
-/* This will be flipped - unlike the one above it */
-div#mw-head div.vectorMenu h5 {
- background-position: bottom left;
- margin-left: -1px;
-}
-/* IGNORED BY IE6 */
-div#mw-head div.vectorMenu > h5 {
- background-image: none;
-}
-div#mw-head div.vectorMenu h4 {
- display: inline-block;
- float: left;
- font-size: 0.8em;
- padding-left: 0.5em;
- padding-top: 1.375em;
- font-weight: normal;
- border: none;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-/* @noflip */
-div.vectorMenu h5 a {
- display: inline-block;
- width: 24px;
- height: 2.5em;
- text-decoration: none;
- /* @embed */
- background-image: url(images/tab-break.png);
- background-repeat: no-repeat;
-}
-/* This will be flipped - unlike the one above it */
-div.vectorMenu h5 a {
- background-position: bottom right;
-}
-/* IGNORED BY IE6 */
-div.vectorMenu h5 > a {
- display: block;
-}
-div.vectorMenu div.menu {
- position: relative;
- display: none;
- clear: both;
- text-align: left;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-/* @noflip */
-body.rtl div.vectorMenu div.menu {
- margin-left: 24px;
-}
-/* IGNORED BY IE6 */
-/* @noflip */
-body.rtl div.vectorMenu > div.menu {
- margin-left: auto;
-}
-/* IGNORED BY IE6 */
-/* Also fixes old versions of FireFox */
-/* @noflip */
-body.rtl div.vectorMenu > div.menu,
-x:-moz-any-link {
- margin-left: 23px;
-}
-/* Enable forcing showing of the menu for accessibility */
-div.vectorMenu:hover div.menu,
-div.vectorMenu div.menuForceShow {
- display: block;
-}
-div.vectorMenu ul {
- position: absolute;
- background-color: white;
- border: solid 1px silver;
- border-top-width: 0;
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
- margin-left: -1px;
- text-align: left;
-}
-/* Fixes old versions of FireFox */
-div.vectorMenu ul,
-x:-moz-any-link {
- min-width: 5em;
-}
-/* Returns things back to normal in modern versions of FireFox */
-div.vectorMenu ul,
-x:-moz-any-link,
-x:default {
- min-width: 0;
-}
-div.vectorMenu li {
- padding: 0;
- margin: 0;
- text-align: left;
- line-height: 1em;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-div.vectorMenu li a {
- display: inline-block;
- padding: 0.5em;
- white-space: nowrap;
- color: #0645ad;
- cursor: pointer;
- font-size: 0.8em;
-}
-/* IGNORED BY IE6 */
-div.vectorMenu li > a {
- display: block;
-}
-div.vectorMenu li.selected a,
-div.vectorMenu li.selected a:visited {
- color: #333333;
- text-decoration: none;
-}
-/* Search */
-#p-search h5 {
- display: none;
-}
-/* @noflip */
-#p-search {
- float: left;
-}
-#p-search {
- margin-right: 0.5em;
- margin-left: 0.5em;
-}
-#p-search form,
-#p-search input {
- margin: 0;
- margin-top: 0.4em;
-}
-div#simpleSearch {
- display: block;
- width: 14em;
- height: 1.4em;
- margin-top: 0.65em;
- position: relative;
- min-height: 1px; /* Gotta trigger hasLayout for IE7 */
- border: solid 1px #AAAAAA;
- color: black;
- background-color: white;
- /* @embed */
- background-image: url(images/search-fade.png);
- background-position: top left;
- background-repeat: repeat-x;
-}
-div#simpleSearch label {
- /*
- * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent
- * this from ever being shown anyways.
- */
- font-size: 13px;
- top: 0.25em;
- direction: ltr;
-}
-div#simpleSearch input {
- color: black;
- direction: ltr;
-}
-div#simpleSearch input:focus {
- outline: none;
-}
-div#simpleSearch input.placeholder {
- color: #999999;
-}
-div#simpleSearch input::-webkit-input-placeholder {
- color: #999999;
-}
-div#simpleSearch input#searchInput {
- position: absolute;
- top: 0;
- left: 0;
- width: 90%;
- margin: 0;
- padding: 0;
- padding-left: 0.2em;
- padding-top: 0.2em;
- padding-bottom: 0.2em;
- outline: none;
- border: none;
- /*
- * DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent
- * this from ever being shown anyways.
- */
- font-size: 13px;
- background-color: transparent;
- direction: ltr;
-}
-div#simpleSearch button#searchButton {
- position: absolute;
- width: 10%;
- right: 0;
- top: 0;
- padding: 0;
- padding-top: 0.3em;
- padding-bottom: 0.2em;
- padding-right: 0.4em;
- margin: 0;
- border: none;
- cursor: pointer;
- background-color: transparent;
- background-image: none;
-}
-/* OVERRIDDEN BY COMPLIANT BROWSERS */
-div#simpleSearch button#searchButton img {
- border: none;
- margin: 0;
- margin-top: -3px;
- padding: 0;
-}
-/* IGNORED BY IE6 */
-div#simpleSearch button#searchButton > img {
- margin: 0;
-}
-/* Panel */
-div#mw-panel {
- position: absolute;
- top: 160px;
- padding-top: 1em;
- width: 10em;
- left: 0;
-}
-div#mw-panel div.portal {
- padding-bottom: 1.5em;
- direction: ltr;
-}
-div#mw-panel div.portal h5 {
- font-weight: normal;
- color: #444444;
- padding: 0.25em;
- padding-top: 0;
- padding-left: 1.75em;
- cursor: default;
- border: none;
- font-size: 0.75em;
-}
-div#mw-panel div.portal div.body {
- margin: 0;
- padding-top: 0.5em;
- margin-left: 1.25em;
- /* @embed */
- background-image: url(images/portal-break.png);
- background-repeat: no-repeat;
- background-position: top left;
-}
-div#mw-panel div.portal div.body ul {
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- padding: 0;
- margin: 0;
-}
-div#mw-panel div.portal div.body ul li {
- line-height: 1.125em;
- padding: 0;
- padding-bottom: 0.5em;
- margin: 0;
- overflow: hidden;
- font-size: 0.75em;
-}
-div#mw-panel div.portal div.body ul li a {
- color: #0645ad;
-}
-div#mw-panel div.portal div.body ul li a:visited {
- color: #0b0080;
-}
-/* Footer */
-div#footer {
- margin-left: 10em;
- margin-top: 0;
- padding: 0.75em;
- /* @embed */
- background-image: url(images/border.png);
- background-position: top left;
- background-repeat: repeat-x;
- direction: ltr;
-}
-div#footer ul {
- list-style: none;
- list-style-image: none;
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-div#footer ul li {
- margin: 0;
- padding: 0;
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- color: #333333;
- font-size: 0.7em;
-}
-div#footer #footer-icons {
- float: right;
-}
-/* @noflip */
-body.ltr div#footer #footer-places {
- float: left;
-}
-div#footer #footer-info li {
- line-height: 1.4em;
-}
-div#footer #footer-icons li {
- float: left;
- margin-left: 0.5em;
- line-height: 2em;
- text-align: right;
-}
-div#footer #footer-places li {
- float: left;
- margin-right: 1em;
- line-height: 2em;
-}
-/* Logo */
-#p-logo {
- position: absolute;
- top: -160px;
- left: 0;
- width: 10em;
- height: 160px;
-}
-#p-logo a {
- display: block;
- width: 10em;
- height: 160px;
- background-repeat: no-repeat;
- background-position: center center;
- text-decoration: none;
-}
-
-/*
- *
- * The following code is highly modified from monobook. It would be nice if the
- * preftoc id was more human readable like preferences-toc for instance,
- * howerver this would require backporting the other skins.
- */
-
-/* Preferences */
-#preftoc {
- /* Tabs */
- width: 100%;
- float: left;
- clear: both;
- margin: 0 !important;
- padding: 0 !important;
- /* @embed */
- background-image: url(images/preferences-break.png);
- background-position: bottom left;
- background-repeat: no-repeat;
-}
- #preftoc li {
- /* Tab */
- float: left;
- margin: 0;
- padding: 0;
- padding-right: 1px;
- height: 2.25em;
- white-space: nowrap;
- list-style-type: none;
- list-style-image: none;
- /* @embed */
- background-image: url(images/preferences-break.png);
- background-position: bottom right;
- background-repeat: no-repeat;
- }
- /* Sadly, IE6 won't understand this */
- #preftoc li:first-child {
- margin-left: 1px;
- }
- #preftoc a,
- #preftoc a:active {
- display: inline-block;
- position: relative;
- color: #0645ad;
- padding: 0.5em;
- text-decoration: none;
- background-image: none;
- font-size: 0.9em;
- }
- #preftoc a:hover,
- #preftoc a:focus {
- text-decoration: underline;
- }
- #preftoc li.selected a {
- /* @embed */
- background-image: url(images/preferences-fade.png);
- background-position: bottom;
- background-repeat: repeat-x;
- color: #333333;
- text-decoration: none;
- }
-#preferences {
- float: left;
- width: 100%;
- margin: 0;
- margin-top: -2px;
- clear: both;
- border: solid 1px #cccccc;
- background-color: #f9f9f9;
- /* @embed */
- background-image: url(images/preferences-base.png);
-}
-#preferences fieldset {
- border: none;
- border-top: solid 1px #cccccc;
-}
-#preferences fieldset.prefsection {
- border: none;
- padding: 0;
- margin: 1em;
-}
-#preferences legend {
- color: #666666;
-}
-#preferences fieldset.prefsection legend.mainLegend {
- display: none;
-}
-#preferences td {
- padding-left: 0.5em;
- padding-right: 0.5em;
-}
-#preferences td.htmlform-tip {
- font-size: x-small;
- padding: .2em 2em;
- color: #666666;
-}
-#preferences div.mw-prefs-buttons {
- padding: 1em;
-}
-#preferences div.mw-prefs-buttons input {
- margin-right: 0.25em;
-}
-
-/**
- * The following code is slightly modified from monobook
- */
-div#content {
- line-height: 1.5em;
-}
-#bodyContent {
- font-size: 0.8em;
-}
-
-.editsection {
- float: right;
-}
-
-ul {
- /* @embed */
- list-style-image: url(images/bullet-icon.png);
-}
-
-pre {
- line-height: 1.3em;
-}
-
-/* Site Notice (includes notices from CentralNotice extension) */
-#siteNotice {
- font-size: 0.8em;
-}
-#firstHeading {
- padding-top: 0;
- margin-top: 0;
- padding-top: 0;
- font-size: 1.6em;
-}
-div#content a.external,
-div#content a.external[href ^="gopher://"] {
- /* @embed */
- background: url(images/external-link-ltr-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="https://"],
-.link-https {
- /* @embed */
- background: url(images/lock-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="mailto:"],
-.link-mailto {
- /* @embed */
- background: url(images/mail-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="news:"] {
- /* @embed */
- background: url(images/news-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="ftp://"],
-.link-ftp {
- /* @embed */
- background: url(images/file-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href ^="irc://"],
-div#content a.external[href ^="ircs://"],
-.link-irc {
- /* @embed */
- background: url(images/talk-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href $=".ogg"], div#content a.external[href $=".OGG"],
-div#content a.external[href $=".mid"], div#content a.external[href $=".MID"],
-div#content a.external[href $=".midi"], div#content a.external[href $=".MIDI"],
-div#content a.external[href $=".mp3"], div#content a.external[href $=".MP3"],
-div#content a.external[href $=".wav"], div#content a.external[href $=".WAV"],
-div#content a.external[href $=".wma"], div#content a.external[href $=".WMA"],
-.link-audio {
- /* @embed */
- background: url(images/audio-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href $=".ogm"], div#content a.external[href $=".OGM"],
-div#content a.external[href $=".avi"], div#content a.external[href $=".AVI"],
-div#content a.external[href $=".mpeg"], div#content a.external[href $=".MPEG"],
-div#content a.external[href $=".mpg"], div#content a.external[href $=".MPG"],
-.link-video {
- /* @embed */
- background: url(images/video-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-div#content a.external[href $=".pdf"], div#content a.external[href $=".PDF"],
-div#content a.external[href *=".pdf#"], div#content a.external[href *=".PDF#"],
-div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"],
-.link-document {
- /* @embed */
- background: url(images/document-icon.png) center right no-repeat;
- padding-right: 13px;
-}
-
-/* Icon for Usernames */
-#pt-userpage,
-#pt-anonuserpage,
-#pt-login {
- /* @embed */
- background: url(images/user-icon.png) left top no-repeat;
- padding-left: 15px !important;
- text-transform: none;
-}
-
-.redirectText {
- font-size: 140%;
-}
-
-.redirectMsg img {
- vertical-align: text-bottom;
-}
-
-#bodyContent {
- position: relative;
- width: 100%;
-}
-#mw-js-message {
- font-size: 0.8em;
-}
-div#bodyContent {
- line-height: 1.5em;
-}
-
-/* Watch/Unwatch Icon Styling */
-#ca-unwatch.icon a,
-#ca-watch.icon a {
- margin: 0;
- padding: 0;
- outline: none;
- display: block;
- width: 26px;
- /* This hides the text but shows the background image */
- padding-top: 3.1em;
- margin-top: 0;
- /* Only applied in IE6 */
- margin-top: -0.8em !ie;
- height: 0;
- overflow: hidden;
- /* @embed */
- background-image: url(images/watch-icons.png);
-}
-#ca-unwatch.icon a {
- background-position: -43px 60%;
-}
-#ca-watch.icon a {
- background-position: 5px 60%;
-}
-#ca-unwatch.icon a:hover,
-#ca-unwatch.icon a:focus {
- background-position: -67px 60%;
-}
-#ca-watch.icon a:hover,
-#ca-watch.icon a:focus {
- background-position: -19px 60%;
-}
-#ca-unwatch.icon a.loading,
-#ca-watch.icon a.loading {
- /* @embed */
- background-image: url(images/watch-icon-loading.gif);
- background-position: 5px 60%;
-}
-#ca-unwatch.icon a span,
-#ca-watch.icon a span {
- display: none;
-}
-div.vectorTabs ul {
- /* @embed */
- background-image:url(images/tab-break.png);
- background-position:right bottom;
- background-repeat:no-repeat;
-}
-
-/* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */
-.tipsy {
- font-size: 0.8em;
-}
-/**
- * CSS in this file is used by *all* skins (that have any CSS at all). Be
- * careful what you put in here, since what looks good in one skin may not in
- * another, but don't ignore the poor pre-Monobook users either.
- */
-
-/* GENERAL CLASSES FOR DIRECTIONALITY SUPPORT */
-
-/**
- * These classes should be used for text depending on the content direction.
- * Content stuff like editsection, ul/ol and TOC depend on this.
- */
-.mw-content-ltr {
- /* @noflip */
- direction: ltr;
-}
-.mw-content-rtl {
- /* @noflip */
- direction: rtl;
-}
-
-/* Most input fields should be in site direction */
-.sitedir-ltr textarea,
-.sitedir-ltr input {
- /* @noflip */
- direction: ltr;
-}
-.sitedir-rtl textarea,
-.sitedir-rtl input {
- /* @noflip */
- direction: rtl;
-}
-
-/* Input types that should follow user direction, like buttons */
-/* TODO: What about buttons in wikipage content ? */
-input[type="submit"],
-input[type="button"],
-input[type="reset"],
-input[type="file"] {
- direction: ltr;
-}
-
-/* Override default values */
-textarea[dir="ltr"],
-input[dir="ltr"] {
- /* @noflip */
- direction: ltr;
-}
-textarea[dir="rtl"],
-input[dir="rtl"] {
- /* @noflip */
- direction: rtl;
-}
-
-/* Default style for semantic tags */
-abbr,
-acronym,
-.explain {
- border-bottom: 1px dotted;
- cursor: help;
-}
-
-/* Colored watchlist and recent changes numbers */
-.mw-plusminus-pos {
- color: #006400; /* dark green */
-}
-.mw-plusminus-neg {
- color: #8b0000; /* dark red */
-}
-.mw-plusminus-null {
- color: #aaa; /* gray */
-}
-
-/**
- * Links to redirects appear italicized on [[Special:AllPages]], [[Special:PrefixIndex]],
- * [[Special:Watchlist/edit]] and in category listings.
- */
-.allpagesredirect,
-.redirect-in-category,
-.watchlistredir {
- font-style: italic;
-}
-
-/* Comment and username portions of RC entries */
-span.comment {
- font-style: italic;
-}
-
-span.changedby {
- font-size: 95%;
-}
-
-/* Math */
-.texvc {
- direction: ltr;
- unicode-bidi: embed;
-}
-img.tex {
- vertical-align: middle;
-}
-span.texhtml {
- font-family: serif;
-}
-
-/**
- * Add a bit of margin space between the preview and the toolbar.
- * This replaces the ugly <p><br /></p> we used to insert into the page source
- */
-#wikiPreview.ontop {
- margin-bottom: 1em;
-}
-
-/* Stop floats from intruding into edit area in previews */
-#editform,
-#toolbar,
-#wpTextbox1 {
- clear: both;
-}
-#toolbar img {
- cursor: pointer;
-}
-div#mw-js-message {
- margin: 1em 5%;
- padding: 0.5em 2.5%;
- border: solid 1px #ddd;
- background-color: #fcfcfc;
-}
-
-/* Edit section links */
-.editsection {
- float: right;
- margin-left: 5px;
-}
-/* Correct directionality when page dir is different from site/user dir */
-.mw-content-ltr .editsection,
-.mw-content-rtl .mw-content-ltr .editsection {
- /* @noflip */
- float: right;
-}
-.mw-content-rtl .editsection,
-.mw-content-ltr .mw-content-rtl .editsection {
- /* @noflip */
- float: left;
-}
-
-/**
- * File description page
- */
-
-div.mw-filepage-resolutioninfo {
- font-size: smaller;
-}
-
-/**
- * File histories
- */
-h2#filehistory {
- clear: both;
-}
-
-table.filehistory th,
-table.filehistory td {
- vertical-align: top;
-}
-table.filehistory th {
- text-align: left;
-}
-table.filehistory td.mw-imagepage-filesize,
-table.filehistory th.mw-imagepage-filesize {
- white-space: nowrap;
-}
-
-table.filehistory td.filehistory-selected {
- font-weight: bold;
-}
-
-/**
- * Add a checkered background image on hover for file
- * description pages. (bug 26470)
- */
-.filehistory a img,
-#file img:hover {
- /* @embed */
- background: white url(images/Checker-16x16.png) repeat;
-}
-
-/**
- * rev_deleted stuff
- */
-li span.deleted,
-span.history-deleted {
- text-decoration: line-through;
- color: #888;
- font-style: italic;
-}
-
-/**
- * Patrol stuff
- */
-.not-patrolled {
- background-color: #ffa;
-}
-
-.unpatrolled {
- font-weight: bold;
- color: red;
-}
-
-div.patrollink {
- font-size: 75%;
- text-align: right;
-}
-
-/**
- * Forms
- */
-td.mw-label {
- text-align: right;
-}
-td.mw-input {
- text-align: left;
-}
-td.mw-submit {
- text-align: left;
-}
-
-td.mw-label {
- vertical-align: top;
-}
-.prefsection td.mw-label {
- width: 20%;
-}
-.prefsection table {
- width: 100%;
-}
-td.mw-submit {
- white-space: nowrap;
-}
-
-table.mw-htmlform-nolabel td.mw-label {
- width: 1px;
-}
-
-tr.mw-htmlform-vertical-label td.mw-label {
- text-align: left !important;
-}
-
-.mw-htmlform-invalid-input td.mw-input input {
- border-color: red;
-}
-
-.mw-htmlform-flatlist div.mw-htmlform-flatlist-item {
- display: inline;
- margin-right: 1em;
- white-space: nowrap;
-}
-
-input#wpSummary {
- width: 80%;
-}
-
-/**
- * Image captions
- */
-.thumbcaption {
- text-align: left;
-}
-.magnify {
- float: right;
-}
-
-/**
- * Categories
- */
-#catlinks {
- /**
- * Overrides text justification (user preference)
- * See bug 31990
- */
- text-align: left;
-}
-.catlinks ul {
- display: inline;
- margin: 0;
- padding: 0;
- list-style: none;
- list-style-type: none;
- list-style-image: none;
- vertical-align: middle !ie;
-}
-
-.catlinks li {
- display: inline-block;
- line-height: 1.25em;
- border-left: 1px solid #AAA;
- margin: 0.125em 0;
- padding: 0 0.5em;
- zoom: 1;
- display: inline !ie;
-}
-
-.catlinks li:first-child {
- padding-left: 0.25em;
- border-left: none;
-}
-/**
- * Hidden categories
- */
-.mw-hidden-cats-hidden {
- display: none;
-}
-.catlinks-allhidden {
- display: none;
-}
-
-/* Convenience links to edit block, delete and protect reasons */
-p.mw-ipb-conveniencelinks,
-p.mw-protect-editreasons,
-p.mw-filedelete-editreasons,
-p.mw-delete-editreasons,
-p.mw-revdel-editreasons {
- font-size: 90%;
- text-align: right;
-}
-
-/**
- * OpenSearch ajax suggestions
- */
-.os-suggest {
- overflow: auto;
- overflow-x: hidden;
- position: absolute;
- top: 0;
- left: 0;
- width: 0;
- background-color: white;
- border-style: solid;
- border-color: #AAAAAA;
- border-width: 1px;
- z-index:99;
- font-size:95%;
-}
-
-table.os-suggest-results {
- font-size: 95%;
- cursor: pointer;
- border: 0;
- border-collapse: collapse;
- width: 100%;
-}
-
-.os-suggest-result,
-.os-suggest-result-hl {
- white-space: nowrap;
- background-color: white;
- color: black;
- padding: 2px;
-}
-.os-suggest-result-hl,
-.os-suggest-result-hl-webkit {
- background-color: #4C59A6;
- color: white;
-}
-
-.os-suggest-toggle {
- position: relative;
- left: 1ex;
- font-size: 65%;
-}
-.os-suggest-toggle-def {
- position: absolute;
- top: 0;
- left: 0;
- font-size: 65%;
- visibility: hidden;
-}
-
-/* Page history styling */
-
-/* The auto-generated edit comments */
-.autocomment {
- color: gray;
-}
-#pagehistory .history-user {
- margin-left: 0.4em;
- margin-right: 0.2em;
-}
-#pagehistory span.minor {
- font-weight: bold;
-}
-#pagehistory li {
- border: 1px solid white;
-}
-#pagehistory li.selected {
- background-color: #f9f9f9;
- border: 1px dashed #aaa;
-}
-
-.mw-history-revisiondelete-button, #mw-fileduplicatesearch-icon {
- float: right;
-}
-
-/** Generic minor/bot/newpage styling (recent changes) */
-.newpage,
-.minoredit,
-.botedit {
- font-weight: bold;
-}
-
-#shared-image-dup,
-#shared-image-conflict {
- font-style: italic;
-}
-
-/**
- * Recreating deleted page warning
- * Reupload file warning
- * Page protection warning
- * incl. log entries for these warnings
- */
-div.mw-warning-with-logexcerpt {
- padding: 3px;
- margin-bottom: 3px;
- border: 2px solid #2F6FAB;
- clear: both;
-}
-div.mw-warning-with-logexcerpt ul li {
- font-size: 90%;
-}
-
-/* (show/hide) revision deletion links */
-span.mw-revdelundel-link,
-strong.mw-revdelundel-link {
- font-size: 90%;
-}
-span.mw-revdelundel-hidden,
-input.mw-revdelundel-hidden {
- visibility: hidden;
-}
-
-td.mw-revdel-checkbox,
-th.mw-revdel-checkbox {
- padding-right: 10px;
- text-align: center;
-}
-
-/* feed links */
-a.feedlink {
- /* @embed */
- background: url(images/feed-icon.png) center left no-repeat;
- padding-left: 16px;
-}
-
-/* Plainlinks - this can be used to switch
- * off special external link styling */
-.plainlinks a {
- background: none !important;
- padding: 0 !important;
-}
-/* External URLs should always be treated as LTR (bug 4330) */
-/* @noflip */ .rtl a.external.free,
-.rtl a.external.autonumber {
- direction: ltr;
- unicode-bidi: embed;
-}
-
-/**
- * wikitable class for skinning normal tables
- * keep in sync with commonPrint.css
- */
-table.wikitable {
- margin: 1em 1em 1em 0;
- background-color: #f9f9f9;
- border: 1px #aaa solid;
- border-collapse: collapse;
- color: black;
-}
-table.wikitable > tr > th,
-table.wikitable > tr > td,
-table.wikitable > * > tr > th,
-table.wikitable > * > tr > td {
- border: 1px #aaa solid;
- padding: 0.2em;
-}
-table.wikitable > tr > th,
-table.wikitable > * > tr > th {
- background-color: #f2f2f2;
- text-align: center;
-}
-table.wikitable > caption {
- font-weight: bold;
-}
-
-/* hide initially collapsed collapsable tables */
-table.collapsed tr.collapsable {
- display: none;
-}
-
-/* success and error messages */
-.success {
- color: green;
- font-size: larger;
-}
-.warning {
- color: #FFA500; /* orange */
- font-size: larger;
-}
-.error {
- color: red;
- font-size: larger;
-}
-.errorbox,
-.warningbox,
-.successbox {
- font-size: larger;
- border: 2px solid;
- padding: .5em 1em;
- float: left;
- margin-bottom: 2em;
- color: #000;
-}
-.errorbox {
- border-color: red;
- background-color: #fff2f2;
-}
-.warningbox {
- border-color: #FF8C00; /* darkorange */
- background-color: #FFFFC0;
-}
-.successbox {
- border-color: green;
- background-color: #dfd;
-}
-.errorbox h2,
-.warningbox h2,
-.successbox h2 {
- font-size: 1em;
- font-weight: bold;
- display: inline;
- margin: 0 .5em 0 0;
- border: none;
-}
-
-/* general info/warning box for SP */
-.mw-infobox {
- border: 2px solid #ff7f00;
- margin: 0.5em;
- clear: left;
- overflow: hidden;
-}
-
-.mw-infobox-left {
- margin: 7px;
- float: left;
- width: 35px;
-}
-
-.mw-infobox-right {
- margin: 0.5em 0.5em 0.5em 49px;
-}
-
-/* Note on preview page */
-.previewnote {
- color: #c00;
- margin-bottom: 1em;
-}
-
-.previewnote p {
- text-indent: 3em;
- margin: 0.8em 0;
-}
-
-.visualClear {
- clear: both;
-}
-
-#mw_trackbacks {
- border: solid 1px #bbbbff;
- background-color: #eeeeff;
- padding: 0.2em;
-}
-
-/**
- * Data table style
- *
- * Transparent table with suddle borders
- * and blue row-highlighting.
- */
-.mw-datatable {
- border-collapse: collapse;
-}
-.mw-datatable,
-.mw-datatable td,
-.mw-datatable th {
- border: 1px solid #aaaaaa;
- padding: 0 0.15em 0 0.15em;
-}
-.mw-datatable th {
- background-color: #ddddff;
-}
-.mw-datatable td {
- background-color: #ffffff;
-}
-.mw-datatable tr:hover td {
- background-color: #eeeeff;
-}
-
-
-/**
- * TablePager tables generated by the TablePager PHP class
- * in MediaWiki (e.g. Special:ListFiles).
- */
-.TablePager {
- min-width: 80%;
-}
-.TablePager_nav {
- margin: 0 auto;
-}
-.TablePager_nav td {
- padding: 3px;
- text-align: center;
-}
-.TablePager_nav a {
- text-decoration: none;
-}
-
-.imagelist td,
-.imagelist th {
- white-space: nowrap;
-}
-.imagelist .TablePager_col_links {
- background-color: #eeeeff;
-}
-.imagelist .TablePager_col_img_description {
- white-space: normal;
-}
-.imagelist th.TablePager_sort {
- background-color: #ccccff;
-}
-
-/* filetoc */
-ul#filetoc {
- text-align: center;
- border: 1px solid #aaaaaa;
- background-color: #f9f9f9;
- padding: 5px;
- font-size: 95%;
- margin-bottom: 0.5em;
- margin-left: 0;
- margin-right: 0;
-}
-
-#filetoc li {
- display: inline;
- list-style-type: none;
- padding-right: 2em;
-}
-
-/* Classes for EXIF data display */
-table.mw_metadata {
- font-size: 0.8em;
- margin-left: 0.5em;
- margin-bottom: 0.5em;
- width: 400px;
-}
-
-table.mw_metadata caption {
- font-weight: bold;
-}
-
-table.mw_metadata th {
- font-weight: normal;
-}
-
-table.mw_metadata td {
- padding: 0.1em;
-}
-
-table.mw_metadata {
- border: none;
- border-collapse: collapse;
-}
-
-table.mw_metadata td,
-table.mw_metadata th {
- text-align: center;
- border: 1px solid #aaaaaa;
- padding-left: 5px;
- padding-right: 5px;
-}
-
-table.mw_metadata th {
- background-color: #f9f9f9;
-}
-
-table.mw_metadata td {
- background-color: #fcfcfc;
-}
-
-table.mw_metadata ul.metadata-langlist {
- list-style-type: none;
- list-style-image: none;
- padding-right: 5px;
- padding-left: 5px;
- margin: 0;
-}
-
-/* Correct directionality when page dir is different from site/user dir */
-.mw-content-ltr ul,
-.mw-content-rtl .mw-content-ltr ul {
- /* @noflip */
- margin: 0.3em 0 0 1.6em;
- padding: 0;
-}
-.mw-content-rtl ul,
-.mw-content-ltr .mw-content-rtl ul {
- /* @noflip */
- margin: 0.3em 1.6em 0 0;
- padding: 0;
-}
-.mw-content-ltr ol,
-.mw-content-rtl .mw-content-ltr ol {
- /* @noflip */
- margin: 0.3em 0 0 3.2em;
- padding: 0;
-}
-.mw-content-rtl ol,
-.mw-content-ltr .mw-content-rtl ol {
- /* @noflip */
- margin: 0.3em 3.2em 0 0;
- padding: 0;
-}
-/* @noflip */
-.mw-content-ltr dd,
-.mw-content-rtl .mw-content-ltr dd {
- margin-left: 1.6em;
- margin-right: 0;
-}
-/* @noflip */
-.mw-content-rtl dd,
-.mw-content-ltr .mw-content-rtl dd {
- margin-right: 1.6em;
- margin-left: 0;
-}
-
-/* Galleries */
-/* These display attributes look nonsensical, but are needed to support IE and FF2 */
-/* Don't forget to update commonPrint.css */
-li.gallerybox {
- vertical-align: top;
- border: solid 2px white;
- display: -moz-inline-box;
- display: inline-block;
-}
-
-ul.gallery,
-li.gallerybox {
- zoom: 1;
- *display: inline;
-}
-
-ul.gallery {
- margin: 2px;
- padding: 2px;
- display: block;
-}
-
-li.gallerycaption {
- font-weight: bold;
- text-align: center;
- display: block;
- word-wrap: break-word;
-}
-
-li.gallerybox div.thumb {
- text-align: center;
- border: 1px solid #ccc;
- background-color: #f9f9f9;
- margin: 2px;
-}
-
-li.gallerybox div.thumb img {
- display: block;
- margin: 0 auto;
-}
-
-div.gallerytext {
- overflow: hidden;
- font-size: 94%;
- padding: 2px 4px;
- word-wrap: break-word;
-}
-
-.mw-ajax-loader {
- /* @embed */
- background-image: url(images/ajax-loader.gif);
- background-position: center center;
- background-repeat: no-repeat;
- padding: 16px;
- position: relative;
- top: -16px;
-}
-
-.mw-small-spinner {
- padding: 10px !important;
- margin-right: 0.6em;
- /* @embed */
- background-image: url(images/spinner.gif);
- background-position: center center;
- background-repeat: no-repeat;
-}
-
-/* Language specific height correction for titles. Ref Bug 29405 and Bug 30809 */
-/* Languages like hi or ml require slightly more vertical space to show diacritics properly */
-h1:lang(as),
-h1:lang(bh), /* Macrolanguage, used on bh.wikipedia.org, should be removed one day */
-h1:lang(bho),
-h1:lang(bn),
-h1:lang(gu),
-h1:lang(hi),
-h1:lang(kn),
-h1:lang(ml),
-h1:lang(mr),
-h1:lang(or),
-h1:lang(pa),
-h1:lang(sa),
-h1:lang(ta),
-h1:lang(te) {
- line-height: 1.5em !important;
-}
-h2:lang(as), h3:lang(as), h4:lang(as), h5:lang(as), h6:lang(as),
-h2:lang(bho), h3:lang(bho), h4:lang(bho), h5:lang(bho), h6:lang(bho),
-h2:lang(bh), h3:lang(bh), h4:lang(bh), h5:lang(bh), h6:lang(bh),
-h2:lang(bn), h3:lang(bn), h4:lang(bn), h5:lang(bn), h6:lang(bn),
-h2:lang(gu), h3:lang(gu), h4:lang(gu), h5:lang(gu), h6:lang(gu),
-h2:lang(hi), h3:lang(hi), h4:lang(hi), h5:lang(hi), h6:lang(hi),
-h2:lang(kn), h3:lang(kn), h4:lang(kn), h5:lang(kn), h6:lang(kn),
-h2:lang(ml), h3:lang(ml), h4:lang(ml), h5:lang(ml), h6:lang(ml),
-h2:lang(mr), h3:lang(mr), h4:lang(mr), h5:lang(mr), h6:lang(mr),
-h2:lang(or), h3:lang(or), h4:lang(or), h5:lang(or), h6:lang(or),
-h2:lang(pa), h3:lang(pa), h4:lang(pa), h5:lang(pa), h6:lang(pa),
-h2:lang(sa), h3:lang(sa), h4:lang(sa), h5:lang(sa), h6:lang(sa),
-h2:lang(ta), h3:lang(ta), h4:lang(ta), h5:lang(ta), h6:lang(ta),
-h2:lang(te), h3:lang(te), h4:lang(te), h5:lang(te), h6:lang(te) {
- line-height: 1.2em;
-}
-
-/* Localised ordered list numbering for some languages */
-ol:lang(bcc) li,
-ol:lang(bqi) li,
-ol:lang(fa) li,
-ol:lang(glk) li,
-ol:lang(kk-arab) li,
-ol:lang(mzn) li {
- list-style-type: -moz-persian;
- list-style-type: persian;
-}
-
-ol:lang(ckb) li {
- list-style-type: -moz-arabic-indic;
- list-style-type: arabic-indic;
-}
-
-ol:lang(hi) li,
-ol:lang(mr) li {
- list-style-type: -moz-devanagari;
- list-style-type: devanagari;
-}
-
-ol:lang(as) li,
-ol:lang(bn) li {
- list-style-type: -moz-bengali;
- list-style-type: bengali;
-}
-
-ol:lang(or) li {
- list-style-type: -moz-oriya;
- list-style-type: oriya;
-}
-
-#toc ul, .toc ul {
- margin: .3em 0;
-}
-
-/* Correct directionality when page dir is different from site/user dir */
-/* @noflip */ .mw-content-ltr .toc ul,
-.mw-content-ltr #toc ul,
-.mw-content-rtl .mw-content-ltr .toc ul,
-.mw-content-rtl .mw-content-ltr #toc ul {
- text-align: left;
-}
-/* @noflip */ .mw-content-rtl .toc ul,
-.mw-content-rtl #toc ul,
-.mw-content-ltr .mw-content-rtl .toc ul,
-.mw-content-ltr .mw-content-rtl #toc ul {
- text-align: right;
-}
-/* @noflip */ .mw-content-ltr .toc ul ul,
-.mw-content-ltr #toc ul ul,
-.mw-content-rtl .mw-content-ltr .toc ul ul,
-.mw-content-rtl .mw-content-ltr #toc ul ul {
- margin: 0 0 0 2em;
-}
-/* @noflip */ .mw-content-rtl .toc ul ul,
-.mw-content-rtl #toc ul ul,
-.mw-content-ltr .mw-content-rtl .toc ul ul,
-.mw-content-ltr .mw-content-rtl #toc ul ul {
- margin: 0 2em 0 0;
-}
-
-#toc #toctitle,
-.toc #toctitle,
-#toc .toctitle,
-.toc .toctitle {
- direction: ltr;
-}
-
-/* tooltip styles */
-.mw-help-field-hint {
- display: none;
- margin-left: 2px;
- margin-bottom: -8px;
- padding: 0 0 0 15px;
- /* @embed */
- background-image: url('images/help-question.gif');
- background-position: left center;
- background-repeat: no-repeat;
- cursor: pointer;
- font-size: .8em;
- text-decoration: underline;
- color: #0645ad;
-}
-.mw-help-field-hint:hover {
- /* @embed */
- background-image: url('images/help-question-hover.gif');
-}
-.mw-help-field-data {
- display: block;
- background-color: #d6f3ff;
- padding:5px 8px 4px 8px;
- border: 1px solid #5dc9f4;
- margin-left: 20px;
-}
-.tipsy {
- padding: 5px 5px 10px;
- font-size: 12px;
- position: absolute;
- z-index: 100000;
- overflow: visible;
-}
-.tipsy-inner {
- padding: 5px 8px 4px 8px;
- background-color: #d6f3ff;
- color: black;
- border: 1px solid #5dc9f4;
- max-width: 300px;
- text-align: left;
-}
-.tipsy-arrow {
- position: absolute;
- /* @embed */
- background: url(images/tipsy-arrow.gif) no-repeat top left;
- width: 13px;
- height: 13px;
-}
-.tipsy-se .tipsy-arrow {
- bottom: -2px;
- right: 10px;
- background-position: 0% 100%;
-}
-
-#mw-clearyourcache,
-#mw-sitecsspreview,
-#mw-sitejspreview,
-#mw-usercsspreview,
-#mw-userjspreview {
- direction: ltr;
- unicode-bidi: embed;
-}
-
-/* Correct user & content directionality when viewing a diff */
-.diff-currentversion-title,
-.diff {
- direction: ltr;
- unicode-bidi: embed;
-}
-/* @noflip */ .diff-contentalign-right td {
- direction: rtl;
- unicode-bidi: embed;
-}
-/* @noflip */ .diff-contentalign-left td {
- direction: ltr;
- unicode-bidi: embed;
-}
-.diff-otitle,
-.diff-ntitle,
-.diff-lineno {
- direction: ltr !important;
- unicode-bidi: embed;
-}
-
-#mw-revision-info,
-#mw-revision-info-current,
-#mw-revision-nav {
- direction: ltr;
- display: inline;
-}
-
-/* Images */
-
-/* @noflip */ div.tright,
-div.floatright,
-table.floatright {
- clear: right;
- float: right;
-}
-/* @noflip */ div.tleft,
-div.floatleft,
-table.floatleft {
- float: left;
- clear: left;
-}
-div.floatright,
-table.floatright,
-div.floatleft,
-table.floatleft {
- position: relative;
-}
-
-/* bug 12205 */
-#mw-credits a {
- unicode-bidi: embed;
-}
-
-/* Accessibility */
-.mw-jump,
-#jump-to-nav {
- overflow: hidden;
- height: 0;
- zoom: 1; /* http://webaim.org/techniques/skipnav/#iequirk */
-}
-
-/* Print footer should be hidden by default in screen. */
-.printfooter {
- display: none;
-}
-
-/* For developpers */
-.xdebug-error {
- position: absolute;
- z-index: 99;
-}
-
-.editsection, .toctoggle {
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-/**
- * MediaWiki Print style sheet for CSS2-capable browsers.
- * Copyright Gabriel Wicke, http://www.aulinx.de/
- *
- * Derived from the plone (http://plone.org/) styles
- * Copyright Alexander Limi
- */
-
-/* Thanks to A List Apart (http://alistapart.com/) for useful extras */
-a.stub,
-a.new {
- color: #ba0000;
- text-decoration: none;
-}
-
-#toc {
- border: 1px solid #aaaaaa;
- background-color: #f9f9f9;
- padding: 5px;
-}
-
-/* images */
-div.floatright {
- float: right;
- clear: right;
- position: relative;
- margin: 0.5em 0 0.8em 1.4em;
-}
-div.floatright p {
- font-style: italic;
-}
-div.floatleft {
- float: left;
- clear: left;
- position: relative;
- margin: 0.5em 1.4em 0.8em 0;
-}
-div.floatleft p {
- font-style: italic;
-}
-div.center {
- text-align: center;
-}
-
-/* thumbnails */
-div.thumb {
- border: none;
- width: auto;
- margin-top: 0.5em;
- margin-bottom: 0.8em;
- background-color: transparent;
-}
-div.thumbinner {
- border:1px solid #cccccc;
- padding: 3px !important;
- background-color: White;
- font-size: 94%;
- text-align: center;
- overflow: hidden;
-}
-html .thumbimage {
- border: 1px solid #cccccc;
-}
-html .thumbcaption {
- border: none;
- text-align: left;
- line-height: 1.4em;
- padding: 3px !important;
- font-size: 94%;
-}
-
-div.magnify {
- display: none;
-}
-/* @noflip */
-div.tright {
- float: right;
- clear: right;
- margin: 0.5em 0 0.8em 1.4em;
-}
-/* @noflip */
-div.tleft {
- float: left;
- clear: left;
- margin: 0.5em 1.4em 0.8em 0;
-}
-img.thumbborder {
- border: 1px solid #dddddd;
-}
-
-/* table standards */
-table.rimage {
- float: right;
- width: 1pt;
- position: relative;
- margin-left: 1em;
- margin-bottom: 1em;
- text-align: center;
-}
-
-body {
- background: white;
- color: black;
- margin: 0;
- padding: 0;
-}
-
-.noprint,
-div#jump-to-nav,
-.mw-jump,
-div.top,
-div#column-one,
-#colophon,
-.editsection,
-.toctoggle,
-.tochidden,
-div#f-poweredbyico,
-div#f-copyrightico,
-li#viewcount,
-li#about,
-li#disclaimer,
-li#mobileview,
-li#privacy,
-#footer-places,
-.mw-hidden-catlinks,
-tr.mw-metadata-show-hide-extended,
-span.mw-filepage-other-resolutions,
-#filetoc {
- /* Hides all the elements irrelevant for printing */
- display: none;
-}
-
-ul {
- list-style-type: square;
-}
-
-#content {
- background: none;
- border: none !important;
- padding: 0 !important;
- margin: 0 !important;
- direction: ltr;
-}
-#footer {
- background : white;
- color : black;
- margin-top: 1em;
- border-top: 1px solid #AAA;
- direction: ltr;
-}
-
-h1, h2, h3, h4, h5, h6 {
- font-weight: bold;
-}
-
-p {
- margin: 1em 0;
- line-height: 1.2em;
-}
-
-pre {
- border: 1pt dashed black;
- white-space: pre;
- font-size: 8pt;
- overflow: auto;
- padding: 1em 0;
- background: white;
- color: black;
-}
-
-table.listing,
-table.listing td {
- border: 1pt solid black;
- border-collapse: collapse;
-}
-
-a {
- color: black !important;
- background: none !important;
- padding: 0 !important;
-}
-
-a:link, a:visited {
- color: #520;
- background: transparent;
- text-decoration: underline;
-}
-
-#content a.external.text:after,
-#content a.external.autonumber:after {
- /* Expand URLs for printing */
- content: " (" attr(href) ") ";
-}
-
-#globalWrapper {
- width: 100% !important;
- min-width: 0 !important;
-}
-
-#content {
- background: white;
- color: black;
-}
-
-#column-content {
- margin: 0 !important;
-}
-
-#column-content #content {
- padding: 1em;
- margin: 0 !important;
-}
-
-/* MSIE/Win doesn't understand 'inherit' */
-a,
-a.external,
-a.new,
-a.stub {
- color: black !important;
- text-decoration: none !important;
-}
-
-/* Continue ... */
-a,
-a.external,
-a.new,
-a.stub {
- color: inherit !important;
- text-decoration: inherit !important;
-}
-
-img {
- border: none;
- vertical-align: middle;
-}
-
-/* math */
-span.texhtml {
- font-family: serif;
-}
-
-#siteNotice {
- display: none;
-}
-
-/* Galleries (see shared.css for more info) */
-li.gallerybox {
- vertical-align: top;
- border: solid 2px white;
- display: -moz-inline-box;
- display: inline-block;
-}
-
-ul.gallery, li.gallerybox {
- zoom: 1;
- *display: inline;
-}
-
-ul.gallery {
- margin: 2px;
- padding: 2px;
- display: block;
-}
-
-li.gallerycaption {
- font-weight: bold;
- text-align: center;
- display: block;
- word-wrap: break-word;
-}
-
-li.gallerybox div.thumb {
- text-align: center;
- border: 1px solid #ccc;
- margin: 2px;
-}
-
-div.gallerytext {
- overflow: hidden;
- font-size: 94%;
- padding: 2px 4px;
- word-wrap: break-word;
-}
-
-/**
- * Diff rendering
- */
-table.diff {
- background: white;
-}
-td.diff-otitle {
- background: #ffffff;
-}
-td.diff-ntitle {
- background: #ffffff;
-}
-td.diff-addedline {
- background: #ccffcc;
- font-size: smaller;
- border: solid 2px black;
-}
-td.diff-deletedline {
- background: #ffffaa;
- font-size: smaller;
- border: dotted 2px black;
-}
-td.diff-context {
- background: #eeeeee;
- font-size: smaller;
-}
-.diffchange {
- color: silver;
- font-weight: bold;
- text-decoration: underline;
-}
-
-/**
- * Table rendering
- * As on shared.css but with white background.
- */
-table.wikitable,
-table.mw_metadata {
- margin: 1em 1em 1em 0;
- border: 1px #aaa solid;
- background: white;
- border-collapse: collapse;
-}
-table.wikitable > tr > th, table.wikitable > tr > td,
-table.wikitable > * > tr > th, table.wikitable > * > tr > td,
-.mw_metadata th, .mw_metadata td {
- border: 1px #aaa solid;
- padding: 0.2em;
-}
-table.wikitable > tr > th,
-table.wikitable > * > tr > th,
-.mw_metadata th {
- text-align: center;
- background: white;
- font-weight: bold;
-}
-table.wikitable > caption,
-.mw_metadata caption {
- font-weight: bold;
-}
-
-a.sortheader {
- margin: 0 0.3em;
-}
-
-/* Some pagination options */
-.wikitable, .thumb, img {
- page-break-inside: avoid;
-}
-h2, h3, h4, h5, h6, h7 {
- page-break-after: avoid;
-}
-p {
- widows: 3;
- orphans: 3;
-}
-
-/**
- * Categories
- */
-.catlinks ul {
- display: inline;
- margin: 0;
- padding: 0;
- list-style: none;
- list-style-type: none;
- list-style-image: none;
- vertical-align: middle !ie;
-}
-
-.catlinks li {
- display: inline-block;
- line-height: 1.15em;
- padding: 0 .4em;
- border-left: 1px solid #AAA;
- margin: 0.1em 0;
- zoom: 1;
- display: inline !ie;
-}
-
-.catlinks li:first-child {
- padding-left: .2em;
- border-left: none;
-}
-/* Default styling for HTML elements */
-dfn {
- font-style: inherit; /* Reset default styling for <dfn> */
-}
-sup, sub {
- line-height: 1em; /* Reduce line-height for <sup> and <sub> */
-}
-
-/* Main page fixes */
-#interwiki-completelist {
- font-weight: bold;
-}
-body.page-Main_Page #ca-delete {
- display: none !important;
-}
-body.page-Main_Page #mp-topbanner {
- clear: both;
-}
-
-/* Edit window toolbar */
-#toolbar {
- height: 22px;
- margin-bottom: 6px;
-}
-
-/* Highlight data points in the info action if specified in the URL */
-body.action-info :target {
- background: #DEF;
-}
-
-/* Make the list of references smaller */
-ol.references,
-div.reflist,
-div.refbegin {
- font-size: 90%; /* Default font-size */
- margin-bottom: 0.5em;
-}
-div.refbegin-100 {
- font-size: 100%; /* Option for normal fontsize in {{refbegin}} */
-}
-div.reflist ol.references {
- font-size: 100%; /* Reset font-size when nested in div.reflist */
- list-style-type: inherit; /* Enable custom list style types */
-}
-
-/* Reset top margin for lists embedded in columns */
-div.columns {
- margin-top: 0.3em;
-}
-div.columns dl,
-div.columns ol,
-div.columns ul {
- margin-top: 0;
-}
-
-/* Avoid list items from breaking between columns */
-div.columns li,
-div.columns dd dd {
- -webkit-column-break-inside: avoid;
- page-break-inside: avoid;
- break-inside: avoid-column;
-}
-
-/* Highlight clicked reference in blue to help navigation */
-ol.references li:target,
-sup.reference:target,
-span.citation:target {
- background-color: #DEF;
-}
-
-/* Ensure refs in table headers and the like aren't bold or italic */
-sup.reference {
- font-weight: normal;
- font-style: normal;
-}
-
-/* Allow hidden ref errors to be shown by user CSS */
-span.brokenref {
- display: none;
-}
-
-/* Styling for citations (CSS3). Breaks long urls, etc., rather than overflowing box */
-.citation {
- word-wrap: break-word;
-}
-
-/* For linked citation numbers and document IDs, where
- the number need not be shown on a screen or a handheld,
- but should be included in the printed version */
-@media screen, handheld {
- .citation *.printonly {
- display: none;
- }
-}
-
-/* Style for [[Template:Flowlist]] that Lets lists flow around floating objecs */
-.flowlist ul {
- overflow-x: hidden;
- margin-left: 0em;
- padding-left: 1.6em;
-}
-.flowlist ol {
- overflow-x: hidden;
- margin-left: 0em;
- padding-left: 3.2em;
-}
-.flowlist dl {
- overflow-x: hidden;
-}
-
-/* Style for horizontal lists (separator following item).
- IE8-specific classes are assigned in [[MediaWiki:Common.js/IEFixes.js]].
- @source mediawiki.org/wiki/Snippets/Horizontal_lists
- @revision 4.3 (2014-01-06)
- @author [[User:Edokter]]
- */
-.hlist dl,
-.hlist ol,
-.hlist ul {
- margin: 0;
- padding: 0;
-}
-/* Display list items inline */
-.hlist dd,
-.hlist dt,
-.hlist li {
- margin: 0;
- display: inline;
-}
-/* Display nested lists inline */
-.hlist dl dl, .hlist dl ol, .hlist dl ul,
-.hlist ol dl, .hlist ol ol, .hlist ol ul,
-.hlist ul dl, .hlist ul ol, .hlist ul ul {
- display: inline;
-}
-/* Generate interpuncts */
-.hlist dt:after {
- content: ": ";
-}
-.hlist dd:after,
-.hlist li:after {
- content: " · ";
- font-weight: bold;
-}
-.hlist dd:last-child:after,
-.hlist dt:last-child:after,
-.hlist li:last-child:after {
- content: none;
-}
-/* For IE8 */
-.hlist dd.hlist-last-child:after,
-.hlist dt.hlist-last-child:after,
-.hlist li.hlist-last-child:after {
- content: none;
-}
-/* Add parentheses around nested lists */
-.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
-.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
-.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
- content: " (";
- font-weight: normal;
-}
-.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
-.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
-.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
- content: ") ";
- font-weight: normal;
-}
-/* For IE8 */
-.hlist dd dd.hlist-last-child:after, .hlist dd dt.hlist-last-child:after, .hlist dd li.hlist-last-child:after,
-.hlist dt dd.hlist-last-child:after, .hlist dt dt.hlist-last-child:after, .hlist dt li.hlist-last-child:after,
-.hlist li dd.hlist-last-child:after, .hlist li dt.hlist-last-child:after, .hlist li li.hlist-last-child:after {
- content: ") ";
- font-weight: normal;
-}
-/* Put ordinals in front of ordered list items */
-.hlist ol {
- counter-reset: listitem;
-}
-.hlist ol > li {
- counter-increment: listitem;
-}
-.hlist ol > li:before {
- content: " " counter(listitem) " ";
-}
-.hlist dd ol > li:first-child:before,
-.hlist dt ol > li:first-child:before,
-.hlist li ol > li:first-child:before {
- content: " (" counter(listitem) " ";
-}
-
-/* Unbulleted lists */
-.plainlist ul {
- line-height: inherit;
- list-style: none none;
- margin: 0;
-}
-.plainlist ul li {
- margin-bottom: 0;
-}
-
-/* Default style for navigation boxes */
-.navbox { /* Navbox container style */
- border: 1px solid #aaa;
- width: 100%;
- margin: auto;
- clear: both;
- font-size: 88%;
- text-align: center;
- padding: 1px;
-}
-.navbox-inner,
-.navbox-subgroup {
- width: 100%;
-}
-.navbox-group,
-.navbox-title,
-.navbox-abovebelow {
- padding: 0.25em 1em; /* Title, group and above/below styles */
- line-height: 1.5em;
- text-align: center;
-}
-th.navbox-group { /* Group style */
- white-space: nowrap;
- /* @noflip */
- text-align: right;
-}
-.navbox,
-.navbox-subgroup {
- background: #fdfdfd; /* Background color */
-}
-.navbox-list {
- line-height: 1.8em;
- border-color: #fdfdfd; /* Must match background color */
-}
-.navbox th,
-.navbox-title {
- background: #ccccff; /* Level 1 color */
-}
-.navbox-abovebelow,
-th.navbox-group,
-.navbox-subgroup .navbox-title {
- background: #ddddff; /* Level 2 color */
-}
-.navbox-subgroup .navbox-group,
-.navbox-subgroup .navbox-abovebelow {
- background: #e6e6ff; /* Level 3 color */
-}
-.navbox-even {
- background: #f7f7f7; /* Even row striping */
-}
-.navbox-odd {
- background: transparent; /* Odd row striping */
-}
-table.navbox + table.navbox { /* Single pixel border between adjacent navboxes */
- margin-top: -1px; /* (doesn't work for IE6, but that's okay) */
-}
-.navbox .hlist td dl,
-.navbox .hlist td ol,
-.navbox .hlist td ul,
-.navbox td.hlist dl,
-.navbox td.hlist ol,
-.navbox td.hlist ul {
- padding: 0.125em 0; /* Adjust hlist padding in navboxes */
-}
-ol + table.navbox,
-ul + table.navbox {
- margin-top: 0.5em; /* Prevent lists from clinging to navboxes */
-}
-
-/* Default styling for Navbar template */
-.navbar {
- display: inline;
- font-size: 88%;
- font-weight: normal;
-}
-.navbar ul {
- display: inline;
- white-space: nowrap;
-}
-.navbar li {
- word-spacing: -0.125em;
-}
-.navbar.mini li span {
- font-variant: small-caps;
-}
-/* Navbar styling when nested in infobox and navbox */
-.infobox .navbar {
- font-size: 100%;
-}
-.navbox .navbar {
- display: block;
- font-size: 100%;
-}
-.navbox-title .navbar {
- /* @noflip */
- float: left;
- /* @noflip */
- text-align: left;
- /* @noflip */
- margin-right: 0.5em;
- width: 6em;
-}
-
-/* 'show'/'hide' buttons created dynamically by the CollapsibleTables javascript
- in [[MediaWiki:Common.js]] are styled here so they can be customised. */
-.collapseButton {
- /* @noflip */
- float: right;
- font-weight: normal;
- /* @noflip */
- margin-left: 0.5em;
- /* @noflip */
- text-align: right;
- width: auto;
-}
-/* In navboxes, the show/hide button balances the v·d·e links
- from [[Template:Navbar]], so they need to be the same width. */
-.navbox .collapseButton {
- width: 6em;
-}
-
-/* Styling for JQuery makeCollapsible, matching that of collapseButton */
-.mw-collapsible-toggle {
- font-weight: normal;
- /* @noflip */
- text-align: right;
-}
-.navbox .mw-collapsible-toggle {
- width: 6em;
-}
-
-/* Infobox template style */
-.infobox {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- color: black;
- /* @noflip */
- margin: 0.5em 0 0.5em 1em;
- padding: 0.2em;
- /* @noflip */
- float: right;
- /* @noflip */
- clear: right;
- /* @noflip */
- text-align: left;
- font-size: 88%;
- line-height: 1.5em;
-}
-.infobox caption {
- font-size: 125%;
- font-weight: bold;
-}
-.infobox td,
-.infobox th {
- vertical-align: top;
-}
-.infobox.bordered {
- border-collapse: collapse;
-}
-.infobox.bordered td,
-.infobox.bordered th {
- border: 1px solid #aaa;
-}
-.infobox.bordered .borderless td,
-.infobox.bordered .borderless th {
- border: 0;
-}
-
-.infobox.sisterproject {
- width: 20em;
- font-size: 90%;
-}
-
-.infobox.standard-talk {
- border: 1px solid #c0c090;
- background-color: #f8eaba;
-}
-.infobox.standard-talk.bordered td,
-.infobox.standard-talk.bordered th {
- border: 1px solid #c0c090;
-}
-
-/* styles for bordered infobox with merged rows */
-.infobox.bordered .mergedtoprow td,
-.infobox.bordered .mergedtoprow th {
- border: 0;
- border-top: 1px solid #aaa;
- /* @noflip */
- border-right: 1px solid #aaa;
-}
-
-.infobox.bordered .mergedrow td,
-.infobox.bordered .mergedrow th {
- border: 0;
- /* @noflip */
- border-right: 1px solid #aaa;
-}
-
-/* Styles for geography infoboxes, eg countries,
- country subdivisions, cities, etc. */
-.infobox.geography {
- border-collapse: collapse;
- line-height: 1.2em;
- font-size: 90%;
-}
-
-.infobox.geography td,
-.infobox.geography th {
- border-top: 1px solid #aaa;
- padding: 0.4em 0.6em 0.4em 0.6em;
-}
-.infobox.geography .mergedtoprow td,
-.infobox.geography .mergedtoprow th {
- border-top: 1px solid #aaa;
- padding: 0.4em 0.6em 0.2em 0.6em;
-}
-
-.infobox.geography .mergedrow td,
-.infobox.geography .mergedrow th {
- border: 0;
- padding: 0 0.6em 0.2em 0.6em;
-}
-
-.infobox.geography .mergedbottomrow td,
-.infobox.geography .mergedbottomrow th {
- border-top: 0;
- border-bottom: 1px solid #aaa;
- padding: 0 0.6em 0.4em 0.6em;
-}
-
-.infobox.geography .maptable td,
-.infobox.geography .maptable th {
- border: 0;
- padding: 0;
-}
-
-/* Normal font styling for table row headers with scope="row" tag */
-.wikitable.plainrowheaders th[scope=row] {
- font-weight: normal;
- /* @noflip */
- text-align: left;
-}
-
-/* Lists in data cells are always left-aligned */
-.wikitable td ul,
-.wikitable td ol,
-.wikitable td dl {
- /* @noflip */
- text-align: left;
-}
-/* ...unless they also use the hlist class */
-.wikitable.hlist td ul,
-.wikitable.hlist td ol,
-.wikitable.hlist td dl {
- text-align: inherit;
-}
-
-/* Icons for medialist templates [[Template:Listen]],
- [[Template:Multi-listen_start]], [[Template:Video]],
- [[Template:Multi-video_start]] */
-div.listenlist {
- background: url("//upload.wikimedia.org/wikipedia/commons/4/47/Sound-icon.svg") no-repeat scroll 0% 0% transparent;
- background-size: 30px;
- padding-left: 40px;
-}
-
-/* Fix for hieroglyphs specificality issue in infoboxes ([[Bugzilla:41869]]) */
-table.mw-hiero-table td {
- vertical-align: middle;
-}
-
-/* Style rules for media list templates */
-div.medialist {
- min-height: 50px;
- margin: 1em;
- /* @noflip */
- background-position: top left;
- background-repeat: no-repeat;
-}
-div.medialist ul {
- list-style-type: none;
- list-style-image: none;
- margin: 0;
-}
-div.medialist ul li {
- padding-bottom: 0.5em;
-}
-div.medialist ul li li {
- font-size: 91%;
- padding-bottom: 0;
-}
-
-/* Change the external link icon to an Adobe icon for all PDF files
- in browsers that support these CSS selectors, like Mozilla and Opera */
-div#content a[href$=".pdf"].external,
-div#content a[href*=".pdf?"].external,
-div#content a[href*=".pdf#"].external,
-div#content a[href$=".PDF"].external,
-div#content a[href*=".PDF?"].external,
-div#content a[href*=".PDF#"].external,
-div#mw_content a[href$=".pdf"].external,
-div#mw_content a[href*=".pdf?"].external,
-div#mw_content a[href*=".pdf#"].external,
-div#mw_content a[href$=".PDF"].external,
-div#mw_content a[href*=".PDF?"].external,
-div#mw_content a[href*=".PDF#"].external {
- background: url("//upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") no-repeat right;
- /* @noflip */
- padding-right: 18px;
-}
-
-/* Change the external link icon to an Adobe icon anywhere the PDFlink class
- is used (notably Template:PDFlink). This works in IE, unlike the above. */
-div#content span.PDFlink a,
-div#mw_content span.PDFlink a {
- background: url("//upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") no-repeat right;
- /* @noflip */
- padding-right: 18px;
-}
-
-/* Content in columns with CSS instead of tables ([[Template:Columns]]) */
-div.columns-2 div.column {
- /* @noflip */
- float: left;
- width: 50%;
- min-width: 300px;
-}
-div.columns-3 div.column {
- /* @noflip */
- float: left;
- width: 33.3%;
- min-width: 200px;
-}
-div.columns-4 div.column {
- /* @noflip */
- float: left;
- width: 25%;
- min-width: 150px;
-}
-div.columns-5 div.column {
- /* @noflip */
- float: left;
- width: 20%;
- min-width: 120px;
-}
-
-/* Messagebox templates */
-.messagebox {
- border: 1px solid #aaa;
- background-color: #f9f9f9;
- width: 80%;
- margin: 0 auto 1em auto;
- padding: .2em;
-}
-.messagebox.merge {
- border: 1px solid #c0b8cc;
- background-color: #f0e5ff;
- text-align: center;
-}
-.messagebox.cleanup {
- border: 1px solid #9f9fff;
- background-color: #efefff;
- text-align: center;
-}
-.messagebox.standard-talk {
- border: 1px solid #c0c090;
- background-color: #f8eaba;
- margin: 4px auto;
-}
-/* For old WikiProject banners inside banner shells. */
-.mbox-inside .standard-talk,
-.messagebox.nested-talk {
- border: 1px solid #c0c090;
- background-color: #f8eaba;
- width: 100%;
- margin: 2px 0;
- padding: 2px;
-}
-.messagebox.small {
- width: 238px;
- font-size: 85%;
- /* @noflip */
- float: right;
- clear: both;
- /* @noflip */
- margin: 0 0 1em 1em;
- line-height: 1.25em;
-}
-.messagebox.small-talk {
- width: 238px;
- font-size: 85%;
- /* @noflip */
- float: right;
- clear: both;
- /* @noflip */
- margin: 0 0 1em 1em;
- line-height: 1.25em;
- background: #F8EABA;
-}
-
-/* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes */
-th.mbox-text, td.mbox-text { /* The message body cell(s) */
- border: none;
- /* @noflip */
- padding: 0.25em 0.9em; /* 0.9em left/right */
- width: 100%; /* Make all mboxes the same width regardless of text length */
-}
-td.mbox-image { /* The left image cell */
- border: none;
- /* @noflip */
- padding: 2px 0 2px 0.9em; /* 0.9em left, 0px right */
- text-align: center;
-}
-td.mbox-imageright { /* The right image cell */
- border: none;
- /* @noflip */
- padding: 2px 0.9em 2px 0; /* 0px left, 0.9em right */
- text-align: center;
-}
-td.mbox-empty-cell { /* An empty narrow cell */
- border: none;
- padding: 0px;
- width: 1px;
-}
-
-/* Article message box styles */
-table.ambox {
- margin: 0px 10%; /* 10% = Will not overlap with other elements */
- border: 1px solid #aaa;
- /* @noflip */
- border-left: 10px solid #1e90ff; /* Default "notice" blue */
- background: #fbfbfb;
-}
-table.ambox + table.ambox { /* Single border between stacked boxes. */
- margin-top: -1px;
-}
-.ambox th.mbox-text,
-.ambox td.mbox-text { /* The message body cell(s) */
- padding: 0.25em 0.5em; /* 0.5em left/right */
-}
-.ambox td.mbox-image { /* The left image cell */
- /* @noflip */
- padding: 2px 0 2px 0.5em; /* 0.5em left, 0px right */
-}
-.ambox td.mbox-imageright { /* The right image cell */
- /* @noflip */
- padding: 2px 0.5em 2px 0; /* 0px left, 0.5em right */
-}
-
-table.ambox-notice {
- /* @noflip */
- border-left: 10px solid #1e90ff; /* Blue */
-}
-table.ambox-speedy {
- /* @noflip */
- border-left: 10px solid #b22222; /* Red */
- background: #fee; /* Pink */
-}
-table.ambox-delete {
- /* @noflip */
- border-left: 10px solid #b22222; /* Red */
-}
-table.ambox-content {
- /* @noflip */
- border-left: 10px solid #f28500; /* Orange */
-}
-table.ambox-style {
- /* @noflip */
- border-left: 10px solid #f4c430; /* Yellow */
-}
-table.ambox-move {
- /* @noflip */
- border-left: 10px solid #9932cc; /* Purple */
-}
-table.ambox-protection {
- /* @noflip */
- border-left: 10px solid #bba; /* Gray-gold */
-}
-
-/* Image message box styles */
-table.imbox {
- margin: 4px 10%;
- border-collapse: collapse;
- border: 3px solid #1e90ff; /* Default "notice" blue */
- background: #fbfbfb;
-}
-.imbox .mbox-text .imbox { /* For imboxes inside imbox-text cells. */
- margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */
- display: block; /* Fix for webkit to force 100% width. */
-}
-.mbox-inside .imbox { /* For imboxes inside other templates. */
- margin: 4px;
-}
-
-table.imbox-notice {
- border: 3px solid #1e90ff; /* Blue */
-}
-table.imbox-speedy {
- border: 3px solid #b22222; /* Red */
- background: #fee; /* Pink */
-}
-table.imbox-delete {
- border: 3px solid #b22222; /* Red */
-}
-table.imbox-content {
- border: 3px solid #f28500; /* Orange */
-}
-table.imbox-style {
- border: 3px solid #f4c430; /* Yellow */
-}
-table.imbox-move {
- border: 3px solid #9932cc; /* Purple */
-}
-table.imbox-protection {
- border: 3px solid #bba; /* Gray-gold */
-}
-table.imbox-license {
- border: 3px solid #88a; /* Dark gray */
- background: #f7f8ff; /* Light gray */
-}
-table.imbox-featured {
- border: 3px solid #cba135; /* Brown-gold */
-}
-
-/* Category message box styles */
-table.cmbox {
- margin: 3px 10%;
- border-collapse: collapse;
- border: 1px solid #aaa;
- background: #DFE8FF; /* Default "notice" blue */
-}
-
-table.cmbox-notice {
- background: #D8E8FF; /* Blue */
-}
-table.cmbox-speedy {
- margin-top: 4px;
- margin-bottom: 4px;
- border: 4px solid #b22222; /* Red */
- background: #FFDBDB; /* Pink */
-}
-table.cmbox-delete {
- background: #FFDBDB; /* Red */
-}
-table.cmbox-content {
- background: #FFE7CE; /* Orange */
-}
-table.cmbox-style {
- background: #FFF9DB; /* Yellow */
-}
-table.cmbox-move {
- background: #E4D8FF; /* Purple */
-}
-table.cmbox-protection {
- background: #EFEFE1; /* Gray-gold */
-}
-
-/* Other pages message box styles */
-table.ombox {
- margin: 4px 10%;
- border-collapse: collapse;
- border: 1px solid #aaa; /* Default "notice" gray */
- background: #f9f9f9;
-}
-
-table.ombox-notice {
- border: 1px solid #aaa; /* Gray */
-}
-table.ombox-speedy {
- border: 2px solid #b22222; /* Red */
- background: #fee; /* Pink */
-}
-table.ombox-delete {
- border: 2px solid #b22222; /* Red */
-}
-table.ombox-content {
- border: 1px solid #f28500; /* Orange */
-}
-table.ombox-style {
- border: 1px solid #f4c430; /* Yellow */
-}
-table.ombox-move {
- border: 1px solid #9932cc; /* Purple */
-}
-table.ombox-protection {
- border: 2px solid #bba; /* Gray-gold */
-}
-
-/* Talk page message box styles */
-table.tmbox {
- margin: 4px 10%;
- border-collapse: collapse;
- border: 1px solid #c0c090; /* Default "notice" gray-brown */
- background: #f8eaba;
-}
-.mediawiki .mbox-inside .tmbox { /* For tmboxes inside other templates. The "mediawiki" class ensures that */
- margin: 2px 0; /* this declaration overrides other styles (including mbox-small above) */
- width: 100%; /* For Safari and Opera */
-}
-.mbox-inside .tmbox.mbox-small { /* "small" tmboxes should not be small when */
- line-height: 1.5em; /* also "nested", so reset styles that are */
- font-size: 100%; /* set in "mbox-small" above. */
-}
-
-table.tmbox-speedy {
- border: 2px solid #b22222; /* Red */
- background: #fee; /* Pink */
-}
-table.tmbox-delete {
- border: 2px solid #b22222; /* Red */
-}
-table.tmbox-content {
- border: 2px solid #f28500; /* Orange */
-}
-table.tmbox-style {
- border: 2px solid #f4c430; /* Yellow */
-}
-table.tmbox-move {
- border: 2px solid #9932cc; /* Purple */
-}
-table.tmbox-protection,
-table.tmbox-notice {
- border: 1px solid #c0c090; /* Gray-brown */
-}
-
-/* Disambig and set index box styles */
-table.dmbox {
- clear: both;
- margin: 0.9em 1em;
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
- background: transparent;
-}
-
-/* Footer and header message box styles */
-table.fmbox {
- clear: both;
- margin: 0.2em 0;
- width: 100%;
- border: 1px solid #aaa;
- background: #f9f9f9; /* Default "system" gray */
-}
-table.fmbox-system {
- background: #f9f9f9;
-}
-table.fmbox-warning {
- border: 1px solid #bb7070; /* Dark pink */
- background: #ffdbdb; /* Pink */
-}
-table.fmbox-editnotice {
- background: transparent;
-}
-/* Div based "warning" style fmbox messages. */
-div.mw-warning-with-logexcerpt,
-div.mw-lag-warn-high,
-div.mw-cascadeprotectedwarning,
-div#mw-protect-cascadeon {
- clear: both;
- margin: 0.2em 0;
- border: 1px solid #bb7070;
- background: #ffdbdb;
- padding: 0.25em 0.9em;
-}
-/* Div based "system" style fmbox messages.
- Used in [[MediaWiki:Readonly lag]]. */
-div.mw-lag-warn-normal,
-div.fmbox-system {
- clear: both;
- margin: 0.2em 0;
- border: 1px solid #aaa;
- background: #f9f9f9;
- padding: 0.25em 0.9em;
-}
-
-/* These mbox-small classes must be placed after all other
- ambox/tmbox/ombox etc classes. "body.mediawiki" is so
- they override "table.ambox + table.ambox" above. */
-body.mediawiki table.mbox-small { /* For the "small=yes" option. */
- /* @noflip */
- clear: right;
- /* @noflip */
- float: right;
- /* @noflip */
- margin: 4px 0 4px 1em;
- width: 238px;
- font-size: 88%;
- line-height: 1.25em;
-}
-body.mediawiki table.mbox-small-left { /* For the "small=left" option. */
- /* @noflip */
- margin: 4px 1em 4px 0;
- width: 238px;
- border-collapse: collapse;
- font-size: 88%;
- line-height: 1.25em;
-}
-
-/* Style for compact ambox */
-/* Hide the images */
-.compact-ambox table .mbox-image,
-.compact-ambox table .mbox-imageright,
-.compact-ambox table .mbox-empty-cell {
- display: none;
-}
-/* Remove borders, backgrounds, padding, etc. */
-.compact-ambox table.ambox {
- border: none;
- border-collapse: collapse;
- background: transparent;
- margin: 0 0 0 1.6em !important;
- padding: 0 !important;
- width: auto;
- display: block;
-}
-body.mediawiki .compact-ambox table.mbox-small-left {
- font-size: 100%;
- width: auto;
- margin: 0;
-}
-/* Style the text cell as a list item and remove its padding */
-.compact-ambox table .mbox-text {
- padding: 0 !important;
- margin: 0 !important;
-}
-.compact-ambox table .mbox-text-span {
- display: list-item;
- line-height: 1.5em;
- list-style-type: square;
- list-style-image: url(//bits.wikimedia.org/skins/common/images/bullet.gif);
-}
-.skin-vector .compact-ambox table .mbox-text-span {
- list-style-type: circle;
- list-style-image: url(//bits.wikimedia.org/skins/vector/images/bullet-icon.png)
-}
-/* Allow for hiding text in compact form */
-.compact-ambox .hide-when-compact {
- display: none;
-}
-
-/* Remove default styles for [[MediaWiki:Noarticletext]]. */
-div.noarticletext {
- border: none;
- background: transparent;
- padding: 0;
-}
-
-/* Hide (formatting) elements from screen, but not from screenreaders */
-.visualhide {
- position: absolute;
- left: -10000px;
- top: auto;
- width: 1px;
- height: 1px;
- overflow: hidden;
-}
-
-/* Bold save button */
-#wpSave {
- font-weight: bold;
-}
-
-/* class hiddenStructure is defunct. See [[Wikipedia:hiddenStructure]] */
-.hiddenStructure {
- display: inline !important;
- color: #f00;
- background-color: #0f0;
-}
-
-/* suppress missing interwiki image links where #ifexist cannot
- be used due to high number of requests see .hidden-redlink on
- [[m:MediaWiki:Common.css]] */
-.check-icon a.new {
- display: none;
- speak: none;
-}
-
-/* Removes underlines from certain links */
-.nounderlines a,
-.IPA a:link, .IPA a:visited {
- text-decoration: none !important;
-}
-
-/* Standard Navigationsleisten, aka box hiding thingy
- from .de. Documentation at [[Wikipedia:NavFrame]]. */
-div.NavFrame {
- margin: 0;
- padding: 4px;
- border: 1px solid #aaa;
- text-align: center;
- border-collapse: collapse;
- font-size: 95%;
-}
-div.NavFrame + div.NavFrame {
- border-top-style: none;
- border-top-style: hidden;
-}
-div.NavPic {
- background-color: #fff;
- margin: 0;
- padding: 2px;
- /* @noflip */
- float: left;
-}
-div.NavFrame div.NavHead {
- height: 1.6em;
- font-weight: bold;
- background-color: #ccf;
- position: relative;
-}
-div.NavFrame p,
-div.NavFrame div.NavContent,
-div.NavFrame div.NavContent p {
- font-size: 100%;
-}
-div.NavEnd {
- margin: 0;
- padding: 0;
- line-height: 1px;
- clear: both;
-}
-a.NavToggle {
- position: absolute;
- top: 0;
- /* @noflip */
- right: 3px;
- font-weight: normal;
- font-size: 90%;
-}
-
-/* Hatnotes and disambiguation notices */
-.rellink,
-.dablink {
- font-style: italic;
- /* @noflip */
- padding-left: 1.6em;
- margin-bottom: 0.5em;
-}
-.rellink i,
-.dablink i {
- font-style: normal;
-}
-
-/* Allow transcluded pages to display in lists rather than a table.
- Compatible in Firefox; incompatible in IE6. */
-.listify td { display: list-item; }
-.listify tr { display: block; }
-.listify table { display: block; }
-
-/* Geographical coordinates defaults. See [[Template:Coord/link]]
- for how these are used. The classes "geo", "longitude", and
- "latitude" are used by the [[Geo microformat]]. */
-.geo-default, .geo-dms, .geo-dec { display: inline; }
-.geo-nondefault, .geo-multi-punct { display: none; }
-.longitude, .latitude { white-space: nowrap; }
-
-/* When <div class="nonumtoc"> is used on the table of contents,
- the ToC will display without numbers */
-.nonumtoc .tocnumber { display: none; }
-.nonumtoc #toc ul,
-.nonumtoc .toc ul {
- line-height: 1.5em;
- list-style: none none;
- margin: .3em 0 0;
- padding: 0;
-}
-.nonumtoc #toc ul ul,
-.nonumtoc .toc ul ul {
- /* @noflip */
- margin: 0 0 0 2em;
-}
-
-/* Allow limiting of which header levels are shown in a TOC;
- <div class="toclimit-3">, for instance, will limit to
- showing ==headings== and ===headings=== but no further
- (as long as there are no =headings= on the page, which
- there shouldn't be according to the MoS). */
-.toclimit-2 .toclevel-1 ul,
-.toclimit-3 .toclevel-2 ul,
-.toclimit-4 .toclevel-3 ul,
-.toclimit-5 .toclevel-4 ul,
-.toclimit-6 .toclevel-5 ul,
-.toclimit-7 .toclevel-6 ul {
- display: none;
-}
-
-/* Styling for Template:Quote */
-blockquote.templatequote {
- margin-top: 0;
-}
-blockquote.templatequote div.templatequotecite {
- line-height: 1em;
- /* @noflip */
- text-align: left;
- /* @noflip */
- padding-left: 2em;
- margin-top: 0;
-}
-blockquote.templatequote div.templatequotecite cite {
- font-size: 85%;
-}
-
-/* User block messages */
-div.user-block {
- padding: 5px;
- margin-bottom: 0.5em;
- border: 1px solid #A9A9A9;
- background-color: #FFEFD5;
-}
-
-/* Prevent line breaks in silly places:
- 1) Where desired
- 2) Links when we don't want them to
- 3) Bold "links" to the page itself
- 4) Ref tags with group names <ref group="Note"> --> "[Note 1]" */
-.nowrap,
-.nowraplinks a,
-.nowraplinks .selflink,
-sup.reference a {
- white-space: nowrap;
-}
-/* But allow wrapping where desired: */
-.wrap,
-.wraplinks a {
- white-space: normal;
-}
-
-/* For template documentation */
-.template-documentation {
- clear: both;
- margin: 1em 0 0 0;
- border: 1px solid #aaa;
- background-color: #ecfcf4;
- padding: 1em;
-}
-
-/* Inline divs in ImageMaps (code borrowed from de.wiki) */
-.imagemap-inline div {
- display: inline;
-}
-
-/* Increase the height of the image upload box */
-#wpUploadDescription {
- height: 13em;
-}
-
-/* Minimum thumb width */
-.thumbinner {
- min-width: 100px;
-}
-
-/* Makes the background of a framed image white instead of gray.
- Only visible with transparent images. */
-div.thumb .thumbimage {
- background-color: #fff;
-}
-
-/* The backgrounds for galleries. */
-div#content .gallerybox div.thumb {
- /* Light gray padding */
- background-color: #F9F9F9;
-}
-/* Put a chequered background behind images, only visible if they have transparency.
- '.filehistory a img' and '#file img:hover' are handled by MediaWiki core (as of 1.19) */
-.gallerybox .thumb img {
- background: #fff url(//bits.wikimedia.org/skins/common/images/Checker-16x16.png) repeat;
-}
-/* But not on articles, user pages, portals or with opt-out. */
-.ns-0 .gallerybox .thumb img,
-.ns-2 .gallerybox .thumb img,
-.ns-100 .gallerybox .thumb img,
-.nochecker .gallerybox .thumb img {
- background: #fff;
-}
-
-/* Prevent floating boxes from overlapping any category listings,
- file histories, edit previews, and edit [Show changes] views. */
-#mw-subcategories, #mw-pages, #mw-category-media,
-#filehistory, #wikiPreview, #wikiDiff {
- clear: both;
-}
-
-body.rtl #mw-articlefeedbackv5, body.rtl #mw-articlefeedback {
- display: block; /* Override inline block mode */
- margin-bottom: 1em;
- /* @noflip */
- clear: right; /* Clear any info boxes that stick out */
- /* @noflip */
- float: right; /* Prevents margin collapsing */
-}
-
-/* Selectively hide headers in WikiProject banners */
-.wpb .wpb-header { display: none; }
-.wpbs-inner .wpb .wpb-header { display: block; } /* for IE */
-.wpbs-inner .wpb .wpb-header { display: table-row; } /* for real browsers */
-.wpbs-inner .wpb-outside { display: none; } /* hide things that should only display outside shells */
-
-/* Styling for Abuse Filter tags */
-.mw-tag-markers {
- font-family:sans-serif;
- font-style:italic;
- font-size:90%;
-}
-
-/* Hide stuff meant for accounts with special permissions. Made visible again in
- [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-accountcreator.css]],
- [[MediaWiki:Group-templateeditor.css]] and [[Mediawiki:Group-autoconfirmed.css]]. */
-.sysop-show,
-.accountcreator-show,
-.templateeditor-show,
-.autoconfirmed-show {
- display: none;
-}
-
-/**
- * Hide the redlink generated by {{Editnotice}},
- * this overrides the ".sysop-show { display: none; }" above that applies
- * to the same link as well.
- */
-.ve-init-mw-viewPageTarget-toolbar-editNotices-notice .editnotice-redlink {
- display: none !important;
-}
-
-/* Remove bullets when there are multiple edit page warnings */
-ul.permissions-errors > li {
- list-style: none none;
-}
-ul.permissions-errors {
- margin: 0;
-}
-
-/* No linewrap on the labels of the login/signup page */
-body.page-Special_UserLogin .mw-label label,
-body.page-Special_UserLogin_signup .mw-label label {
- white-space: nowrap;
-}
-
-/* Pie chart test: Transparent borders */
-.transborder {
- border: solid transparent;
-}
-* html .transborder { /* IE6 */
- border: solid #000001;
- filter: chroma(color=#000001);
-}
-
-/* Styling for updated markers on watchlist, history and recent/related changes.
- Bullets are handled in skin-specific stylesheets. */
-.updatedmarker {
- background-color: transparent;
- color: #006400;
-}
-li.mw-changeslist-line-watched .mw-title,
-table.mw-changeslist-line-watched .mw-title,
-table.mw-enhanced-watch .mw-enhanced-rctime {
- font-weight: normal;
-}
-
-/* Adjust font for inline HTML generated formulae */
-span.texhtml {
- font-family: "Times New Roman", "Nimbus Roman No9 L", Times, serif;
- font-size: 118%;
- white-space: nowrap;
-}
-span.texhtml span.texhtml {
- font-size: 100%;
-}
-
-/* Fix so <syntaxhighlight> tags and .css and .js pages get normal text size.
- [[Bugzilla:26204]]. See also [[Wikipedia:Typography#The monospace 'bug']] */
-div.mw-geshi div,
-div.mw-geshi div pre,
-span.mw-geshi,
-pre.source-css,
-pre.source-javascript,
-pre.source-lua {
- font-family: monospace, Courier !important;
-}
-
-/* Fix styling of transcluded prefindex tables */
-table#mw-prefixindex-list-table,
-table#mw-prefixindex-nav-table {
- width: 98%;
-}
-
-/* For portals, added 2011-12-07 -bv
- On wide screens, show these as two columns
- On narrow and mobile screens, let them collapse into a single column */
-.portal-column-left {
- float: left;
- width: 50%;
-}
-.portal-column-right {
- float: right;
- width: 49%;
-}
-.portal-column-left-wide {
- float: left;
- width: 60%;
-}
-.portal-column-right-narrow {
- float: right;
- width: 39%;
-}
-.portal-column-left-extra-wide {
- float: left;
- width: 70%;
-}
-.portal-column-right-extra-narrow {
- float: right;
- width: 29%;
-}
-@media only screen and (max-width: 800px) {
- /* Decouple the columns on narrow screens */
- .portal-column-left,
- .portal-column-right,
- .portal-column-left-wide,
- .portal-column-right-narrow,
- .portal-column-left-extra-wide,
- .portal-column-right-extra-narrow {
- float: inherit;
- width: inherit;
- }
-}
-
-/* For announcements */
-#bodyContent .letterhead {
- background-image:url('//upload.wikimedia.org/wikipedia/commons/e/e0/Tan-page-corner.png');
- background-repeat:no-repeat;
- padding: 2em;
- background-color: #faf9f2;
-}
-
-/* Tree style lists */
-.treeview ul {
- padding: 0;
- margin: 0;
-}
-.treeview li {
- padding: 0;
- margin: 0;
- list-style-type: none;
- list-style-image: none;
- zoom: 1; /* BE KIND TO IE6 */;
-}
-.treeview li li {
- background: url("//upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px;
- /* @noflip */
- padding-left: 20px;
- text-indent: 0.3em;
-}
-.treeview li li.lastline {
- background-position: 0 -5971px
-}
-.treeview li.emptyline > ul {
- /* @noflip */
- margin-left: -1px;
-}
-.treeview li.emptyline > ul > li:first-child {
- background-position: 0 9px
-}
-
-/* hidden sortkey for tablesorter */
-td .sortkey,
-th .sortkey {
- display: none;
- speak: none;
-}
-
-/* Make it possible to hide checkboxes in <inputbox> */
-.inputbox-hidecheckboxes form .inputbox-element {
- display: none !important;
-}
-
-/* Hide charinsert base for those not using the gadget */
-#editpage-specialchars {
- display: none;
-}
-
-/* work-around for [[bugzilla:23965]] (Kaltura advertisement) */
-.k-player .k-attribution {
- visibility: hidden;
-}
-
-/* [[MediaZilla:35337]] */
-@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx), (min-resolution: 144dpi) {
- #p-logo a {
- background-image: url("//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Wikipedia-logo-v2-en.svg/204px-Wikipedia-logo-v2-en.svg.png") !important;
- background-size: 136px auto;
- }
-}
-@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi) {
- #p-logo a {
- background-image: url("//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Wikipedia-logo-v2-en.svg/270px-Wikipedia-logo-v2-en.svg.png") !important;
- background-size: 135px auto;
- }
-}
-/* Do not print:
- 1: When in mainspace: Article message boxes,
- navboxes, sister project boxes, disambig links,
- and items marked as metadata.
- 2: section edit links.
- 3: navbar links.
- 4: Show/hide toggles for collapsible items.
-*/
-.ns-0 .ambox,
-.ns-0 .navbox,
-.ns-0 .vertical-navbox,
-.ns-0 .infobox.sisterproject,
-.ns-0 .dablink,
-.ns-0 .metadata,
-.editlink,
-.navbar,
-a.NavToggle, span.collapseButton, span.mw-collapsible-toggle,
-th .sortkey, td .sortkey {
- display: none !important;
-}
-
-/* Add formatting to make sure that "external references" from templates
- like [[Template:Ref]] do not get URL expansion, not even when printed.
- The anchor itself has class "external autonumber" and the url expansion
- is inserted when printing (see the common printing style sheet at
- http://en.wikipedia.org/skins-1.5/common/commonPrint.css) using the
- ":after" pseudo-element of CSS. Also hide in <cite> elements.
-*/
-#content cite a.external.text:after,
-.nourlexpansion a.external.text:after,
-.nourlexpansion a.external.autonumber:after {
- display: none !important;
-}
-
-/* Uncollapse collapsible tables/divs.
- The proper way to do this for tables is to use display:table-row,
- but this is not supported by all browsers, so use display:block as fallback.
-*/
-table.collapsible tr, div.NavPic, div.NavContent {
- display: block !important;
-}
-table.collapsible tr {
- display: table-row !important;
-}
-
-/* On websites with siteSub visible, the margin on the firstHeading is not needed. */
-#firstHeading {
- margin: 0px;
-}
-
-/* We don't want very long URLs (that are added to the content in print) to widen the canvas */
-#content a.external.text:after,
-#content a.external.autonumber:after {
- word-wrap: break-word;
-}
-/* Don't display some stuff on the main page */
-body.page-Main_Page #deleteconfirm,
-body.page-Main_Page #t-cite,
-body.page-Main_Page #footer-info-lastmod,
-body.action-view.page-Main_Page #siteSub,
-body.action-view.page-Main_Page #contentSub,
-body.action-view.page-Main_Page h1.firstHeading {
- display: none !important;
-}
-
-/* Position Main Page top banner */
-body.page-Main_Page #mp-topbanner {
- margin-top: 0 !important;
-}
-
-/* Position coordinates */
-#coordinates {
- position: absolute;
- top: 0em;
- right: 0em;
- float: right;
- margin: 0em;
- padding: 0em;
- line-height: 1.5em;
- text-align: right;
- text-indent: 0;
- font-size: 85%;
- text-transform: none;
- white-space: nowrap;
-}
-
-/* For positioning icons at top-right, used in Templates
- "Spoken Article" and "Featured Article" */
-div.topicon {
- position: absolute;
- top: -2em;
- margin-right: -10px;
- display: block !important;
-}
-
-/* FR topicon position */
-div.flaggedrevs_short {
- position: absolute;
- top: -3em;
- right: 80px;
- z-index: 1;
- margin-left: 0;
- /* Because this is not yet a topicon, we emulate it's behavior,
- this ensure compatibility with edit lead section gadget. */
- margin-right: -10px;
-}
-
-/* On rtl interfaces, we need to override the defaults.
- It is content included (so ltr), but positioned in part of the rtl interface. */
-body.rtl #protected-icon {
- /* @noflip */
- left: 55px;
-}
-body.rtl #spoken-icon,
-body.rtl #commons-icon {
- /* @noflip */
- left: 30px;
-}
-body.rtl #featured-star {
- /* @noflip */
- left: 10px;
-}
-
-/* Menu over FR box */
-div.vectorMenu div {
- z-index: 2;
-}
-
-/* Display "From Wikipedia, the free encyclopedia" */
-#siteSub {
- display: inline;
- font-size: 92%;
-}
-
-/* Bullets for Good and Featured interwiki links */
-li.GA {
- list-style-image: url(//upload.wikimedia.org/wikipedia/commons/4/42/Monobook-bullet-ga.png);
-}
-li.FA {
- list-style-image: url(//upload.wikimedia.org/wikipedia/commons/d/d4/Monobook-bullet-star.png);
-}
-
-/* Styling for updated markers on watchlist, history and recent/related changes */
-li.mw-changeslist-line-watched,
-li.mw-history-line-updated {
- list-style-image: url(//upload.wikimedia.org/wikipedia/commons/c/c2/ChangedBulletVector.png);
-}
-
-/* Blue instead of yellow padlock for secure links. */
-#bodyContent a.external[href ^="https://"],
-.link-https {
- background: url(//upload.wikimedia.org/wikipedia/en/0/00/Lock_icon_blue.gif) center right no-repeat;
- /* @noflip */
- padding-right: 16px;
-}
-
-/* (Soft) redirect styling (bug:26544) */
-div.redirectMsg img {
- vertical-align: text-bottom;
-}
-.redirectText {
- font-size: 150%;
- margin: 5px;
-}
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.min.css b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.min.css
deleted file mode 100644
index eecfc919430..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/wikipedia.min.css
+++ /dev/null
@@ -1 +0,0 @@
-html,body{height:100%;margin:0;padding:0;font-family:sans-serif;font-size:1em}body{background-color:#f3f3f3;background-image:url(images/page-base.png)}div#content{margin-left:10em;padding:1em;background-image:url(images/border.png);background-position:top left;background-repeat:repeat-y;background-color:white;color:black;direction:ltr}#mw-page-base{height:5em;background-color:white;background-image:url(images/page-fade.png);background-position:bottom left;background-repeat:repeat-x}#mw-head-base{margin-top:-5em;margin-left:10em;height:5em;background-image:url(images/border.png);background-position:bottom left;background-repeat:repeat-x}div#mw-head{position:absolute;top:0;right:0;width:100%}div#mw-head h5{margin:0;padding:0}div.emptyPortlet{display:none}#p-personal{position:absolute;top:0;right:.75em}#p-personal h5{display:none}#p-personal ul{list-style:none;margin:0;padding-left:10em}#p-personal li{line-height:1.125em;float:left}#p-personal li{margin-left:.75em;margin-top:.5em;font-size:.75em;white-space:nowrap}#left-navigation{position:absolute;left:10em;top:2.5em}#right-navigation{float:right;margin-top:2.5em}div.vectorTabs h5,div.vectorMenu h5 span{display:none}div.vectorTabs{float:left;height:2.5em}div.vectorTabs{background-image:url(images/tab-break.png);background-position:bottom left;background-repeat:no-repeat;padding-left:1px}div.vectorTabs ul{float:left}div.vectorTabs ul{height:100%;list-style:none;margin:0;padding:0}div.vectorTabs ul li{float:left}div.vectorTabs ul li{line-height:1.125em;display:inline-block;height:100%;margin:0;padding:0;background-color:#f3f3f3;background-image:url(images/tab-normal-fade.png);background-position:bottom left;background-repeat:repeat-x;white-space:nowrap}div.vectorTabs ul>li{display:block}div.vectorTabs li.selected{background-image:url(images/tab-current-fade.png)}div.vectorTabs li a{display:inline-block;height:1.9em;padding-left:.5em;padding-right:.5em;color:#0645ad;cursor:pointer;font-size:.8em}div.vectorTabs li>a{display:block}div.vectorTabs li.icon a{background-position:bottom right;background-repeat:no-repeat}div.vectorTabs span a{display:inline-block;padding-top:1.25em}div.vectorTabs span>a{float:left;display:block}div.vectorTabs span{display:inline-block;background-image:url(images/tab-break.png);background-position:bottom right;background-repeat:no-repeat}div.vectorTabs li.selected a,div.vectorTabs li.selected a:visited{color:#333;text-decoration:none}div.vectorTabs li.new a,div.vectorTabs li.new a:visited{color:#a55858}div.vectorMenu{direction:ltr;float:left;background-image:url(images/arrow-down-icon.png);background-position:100% 60%;background-repeat:no-repeat;cursor:pointer}div.vectorMenuFocus{background-image:url(images/arrow-down-focus-icon.png);background-position:100% 60%}body.rtl div.vectorMenu{direction:rtl}div#mw-head div.vectorMenu h5{float:left;background-image:url(images/tab-break.png);background-repeat:no-repeat}div#mw-head div.vectorMenu h5{background-position:bottom left;margin-left:-1px}div#mw-head div.vectorMenu>h5{background-image:none}div#mw-head div.vectorMenu h4{display:inline-block;float:left;font-size:.8em;padding-left:.5em;padding-top:1.375em;font-weight:normal;border:none}div.vectorMenu h5 a{display:inline-block;width:24px;height:2.5em;text-decoration:none;background-image:url(images/tab-break.png);background-repeat:no-repeat}div.vectorMenu h5 a{background-position:bottom right}div.vectorMenu h5>a{display:block}div.vectorMenu div.menu{position:relative;display:none;clear:both;text-align:left}body.rtl div.vectorMenu div.menu{margin-left:24px}body.rtl div.vectorMenu>div.menu{margin-left:auto}body.rtl div.vectorMenu>div.menu,x:-moz-any-link{margin-left:23px}div.vectorMenu:hover div.menu,div.vectorMenu div.menuForceShow{display:block}div.vectorMenu ul{position:absolute;background-color:white;border:solid 1px silver;border-top-width:0;list-style:none;list-style-image:none;list-style-type:none;padding:0;margin:0;margin-left:-1px;text-align:left}div.vectorMenu ul,x:-moz-any-link{min-width:5em}div.vectorMenu ul,x:-moz-any-link,x:default{min-width:0}div.vectorMenu li{padding:0;margin:0;text-align:left;line-height:1em}div.vectorMenu li a{display:inline-block;padding:.5em;white-space:nowrap;color:#0645ad;cursor:pointer;font-size:.8em}div.vectorMenu li>a{display:block}div.vectorMenu li.selected a,div.vectorMenu li.selected a:visited{color:#333;text-decoration:none}#p-search h5{display:none}#p-search{float:left}#p-search{margin-right:.5em;margin-left:.5em}#p-search form,#p-search input{margin:0;margin-top:.4em}div#simpleSearch{display:block;width:14em;height:1.4em;margin-top:.65em;position:relative;min-height:1px;border:solid 1px #AAA;color:black;background-color:white;background-image:url(images/search-fade.png);background-position:top left;background-repeat:repeat-x}div#simpleSearch label{font-size:13px;top:.25em;direction:ltr}div#simpleSearch input{color:black;direction:ltr}div#simpleSearch input:focus{outline:none}div#simpleSearch input.placeholder{color:#999}div#simpleSearch input::-webkit-input-placeholder{color:#999}div#simpleSearch input#searchInput{position:absolute;top:0;left:0;width:90%;margin:0;padding:0;padding-left:.2em;padding-top:.2em;padding-bottom:.2em;outline:none;border:none;font-size:13px;background-color:transparent;direction:ltr}div#simpleSearch button#searchButton{position:absolute;width:10%;right:0;top:0;padding:0;padding-top:.3em;padding-bottom:.2em;padding-right:.4em;margin:0;border:none;cursor:pointer;background-color:transparent;background-image:none}div#simpleSearch button#searchButton img{border:none;margin:0;margin-top:-3px;padding:0}div#simpleSearch button#searchButton>img{margin:0}div#mw-panel{position:absolute;top:160px;padding-top:1em;width:10em;left:0}div#mw-panel div.portal{padding-bottom:1.5em;direction:ltr}div#mw-panel div.portal h5{font-weight:normal;color:#444;padding:.25em;padding-top:0;padding-left:1.75em;cursor:default;border:none;font-size:.75em}div#mw-panel div.portal div.body{margin:0;padding-top:.5em;margin-left:1.25em;background-image:url(images/portal-break.png);background-repeat:no-repeat;background-position:top left}div#mw-panel div.portal div.body ul{list-style:none;list-style-image:none;list-style-type:none;padding:0;margin:0}div#mw-panel div.portal div.body ul li{line-height:1.125em;padding:0;padding-bottom:.5em;margin:0;overflow:hidden;font-size:.75em}div#mw-panel div.portal div.body ul li a{color:#0645ad}div#mw-panel div.portal div.body ul li a:visited{color:#0b0080}div#footer{margin-left:10em;margin-top:0;padding:.75em;background-image:url(images/border.png);background-position:top left;background-repeat:repeat-x;direction:ltr}div#footer ul{list-style:none;list-style-image:none;list-style-type:none;margin:0;padding:0}div#footer ul li{margin:0;padding:0;padding-top:.5em;padding-bottom:.5em;color:#333;font-size:.7em}div#footer #footer-icons{float:right}body.ltr div#footer #footer-places{float:left}div#footer #footer-info li{line-height:1.4em}div#footer #footer-icons li{float:left;margin-left:.5em;line-height:2em;text-align:right}div#footer #footer-places li{float:left;margin-right:1em;line-height:2em}#p-logo{position:absolute;top:-160px;left:0;width:10em;height:160px}#p-logo a{display:block;width:10em;height:160px;background-repeat:no-repeat;background-position:center center;text-decoration:none}#preftoc{width:100%;float:left;clear:both;margin:0!important;padding:0!important;background-image:url(images/preferences-break.png);background-position:bottom left;background-repeat:no-repeat}#preftoc li{float:left;margin:0;padding:0;padding-right:1px;height:2.25em;white-space:nowrap;list-style-type:none;list-style-image:none;background-image:url(images/preferences-break.png);background-position:bottom right;background-repeat:no-repeat}#preftoc li:first-child{margin-left:1px}#preftoc a,#preftoc a:active{display:inline-block;position:relative;color:#0645ad;padding:.5em;text-decoration:none;background-image:none;font-size:.9em}#preftoc a:hover,#preftoc a:focus{text-decoration:underline}#preftoc li.selected a{background-image:url(images/preferences-fade.png);background-position:bottom;background-repeat:repeat-x;color:#333;text-decoration:none}#preferences{float:left;width:100%;margin:0;margin-top:-2px;clear:both;border:solid 1px #ccc;background-color:#f9f9f9;background-image:url(images/preferences-base.png)}#preferences fieldset{border:none;border-top:solid 1px #ccc}#preferences fieldset.prefsection{border:none;padding:0;margin:1em}#preferences legend{color:#666}#preferences fieldset.prefsection legend.mainLegend{display:none}#preferences td{padding-left:.5em;padding-right:.5em}#preferences td.htmlform-tip{font-size:x-small;padding:.2em 2em;color:#666}#preferences div.mw-prefs-buttons{padding:1em}#preferences div.mw-prefs-buttons input{margin-right:.25em}div#content{line-height:1.5em}#bodyContent{font-size:.8em}.editsection{float:right}ul{list-style-image:url(images/bullet-icon.png)}pre{line-height:1.3em}#siteNotice{font-size:.8em}#firstHeading{padding-top:0;margin-top:0;padding-top:0;font-size:1.6em}div#content a.external,div#content a.external[href ^="gopher://"]{background:url(images/external-link-ltr-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href ^="https://"],.link-https{background:url(images/lock-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href ^="mailto:"],.link-mailto{background:url(images/mail-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href ^="news:"]{background:url(images/news-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href ^="ftp://"],.link-ftp{background:url(images/file-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href ^="irc://"],div#content a.external[href ^="ircs://"],.link-irc{background:url(images/talk-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href $=".ogg"],div#content a.external[href $=".OGG"],div#content a.external[href $=".mid"],div#content a.external[href $=".MID"],div#content a.external[href $=".midi"],div#content a.external[href $=".MIDI"],div#content a.external[href $=".mp3"],div#content a.external[href $=".MP3"],div#content a.external[href $=".wav"],div#content a.external[href $=".WAV"],div#content a.external[href $=".wma"],div#content a.external[href $=".WMA"],.link-audio{background:url(images/audio-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href $=".ogm"],div#content a.external[href $=".OGM"],div#content a.external[href $=".avi"],div#content a.external[href $=".AVI"],div#content a.external[href $=".mpeg"],div#content a.external[href $=".MPEG"],div#content a.external[href $=".mpg"],div#content a.external[href $=".MPG"],.link-video{background:url(images/video-icon.png) center right no-repeat;padding-right:13px}div#content a.external[href $=".pdf"],div#content a.external[href $=".PDF"],div#content a.external[href *=".pdf#"],div#content a.external[href *=".PDF#"],div#content a.external[href *=".pdf?"],div#content a.external[href *=".PDF?"],.link-document{background:url(images/document-icon.png) center right no-repeat;padding-right:13px}#pt-userpage,#pt-anonuserpage,#pt-login{background:url(images/user-icon.png) left top no-repeat;padding-left:15px!important;text-transform:none}.redirectText{font-size:140%}.redirectMsg img{vertical-align:text-bottom}#bodyContent{position:relative;width:100%}#mw-js-message{font-size:.8em}div#bodyContent{line-height:1.5em}#ca-unwatch.icon a,#ca-watch.icon a{margin:0;padding:0;outline:none;display:block;width:26px;padding-top:3.1em;margin-top:0;margin-top:-0.8em!ie;height:0;overflow:hidden;background-image:url(images/watch-icons.png)}#ca-unwatch.icon a{background-position:-43px 60%}#ca-watch.icon a{background-position:5px 60%}#ca-unwatch.icon a:hover,#ca-unwatch.icon a:focus{background-position:-67px 60%}#ca-watch.icon a:hover,#ca-watch.icon a:focus{background-position:-19px 60%}#ca-unwatch.icon a.loading,#ca-watch.icon a.loading{background-image:url(images/watch-icon-loading.gif);background-position:5px 60%}#ca-unwatch.icon a span,#ca-watch.icon a span{display:none}div.vectorTabs ul{background-image:url(images/tab-break.png);background-position:right bottom;background-repeat:no-repeat}.tipsy{font-size:.8em}.mw-content-ltr{direction:ltr}.mw-content-rtl{direction:rtl}.sitedir-ltr textarea,.sitedir-ltr input{direction:ltr}.sitedir-rtl textarea,.sitedir-rtl input{direction:rtl}input[type="submit"],input[type="button"],input[type="reset"],input[type="file"]{direction:ltr}textarea[dir="ltr"],input[dir="ltr"]{direction:ltr}textarea[dir="rtl"],input[dir="rtl"]{direction:rtl}abbr,acronym,.explain{border-bottom:1px dotted;cursor:help}.mw-plusminus-pos{color:#006400}.mw-plusminus-neg{color:#8b0000}.mw-plusminus-null{color:#aaa}.allpagesredirect,.redirect-in-category,.watchlistredir{font-style:italic}span.comment{font-style:italic}span.changedby{font-size:95%}.texvc{direction:ltr;unicode-bidi:embed}img.tex{vertical-align:middle}span.texhtml{font-family:serif}#wikiPreview.ontop{margin-bottom:1em}#editform,#toolbar,#wpTextbox1{clear:both}#toolbar img{cursor:pointer}div#mw-js-message{margin:1em 5%;padding:.5em 2.5%;border:solid 1px #ddd;background-color:#fcfcfc}.editsection{float:right;margin-left:5px}.mw-content-ltr .editsection,.mw-content-rtl .mw-content-ltr .editsection{float:right}.mw-content-rtl .editsection,.mw-content-ltr .mw-content-rtl .editsection{float:left}div.mw-filepage-resolutioninfo{font-size:smaller}h2#filehistory{clear:both}table.filehistory th,table.filehistory td{vertical-align:top}table.filehistory th{text-align:left}table.filehistory td.mw-imagepage-filesize,table.filehistory th.mw-imagepage-filesize{white-space:nowrap}table.filehistory td.filehistory-selected{font-weight:bold}.filehistory a img,#file img:hover{background:white url(images/Checker-16x16.png) repeat}li span.deleted,span.history-deleted{text-decoration:line-through;color:#888;font-style:italic}.not-patrolled{background-color:#ffa}.unpatrolled{font-weight:bold;color:red}div.patrollink{font-size:75%;text-align:right}td.mw-label{text-align:right}td.mw-input{text-align:left}td.mw-submit{text-align:left}td.mw-label{vertical-align:top}.prefsection td.mw-label{width:20%}.prefsection table{width:100%}td.mw-submit{white-space:nowrap}table.mw-htmlform-nolabel td.mw-label{width:1px}tr.mw-htmlform-vertical-label td.mw-label{text-align:left!important}.mw-htmlform-invalid-input td.mw-input input{border-color:red}.mw-htmlform-flatlist div.mw-htmlform-flatlist-item{display:inline;margin-right:1em;white-space:nowrap}input#wpSummary{width:80%}.thumbcaption{text-align:left}.magnify{float:right}#catlinks{text-align:left}.catlinks ul{display:inline;margin:0;padding:0;list-style:none;list-style-type:none;list-style-image:none;vertical-align:middle!ie}.catlinks li{display:inline-block;line-height:1.25em;border-left:1px solid #AAA;margin:.125em 0;padding:0 .5em;zoom:1;display:inline!ie}.catlinks li:first-child{padding-left:.25em;border-left:none}.mw-hidden-cats-hidden{display:none}.catlinks-allhidden{display:none}p.mw-ipb-conveniencelinks,p.mw-protect-editreasons,p.mw-filedelete-editreasons,p.mw-delete-editreasons,p.mw-revdel-editreasons{font-size:90%;text-align:right}.os-suggest{overflow:auto;overflow-x:hidden;position:absolute;top:0;left:0;width:0;background-color:white;border-style:solid;border-color:#AAA;border-width:1px;z-index:99;font-size:95%}table.os-suggest-results{font-size:95%;cursor:pointer;border:0;border-collapse:collapse;width:100%}.os-suggest-result,.os-suggest-result-hl{white-space:nowrap;background-color:white;color:black;padding:2px}.os-suggest-result-hl,.os-suggest-result-hl-webkit{background-color:#4C59A6;color:white}.os-suggest-toggle{position:relative;left:1ex;font-size:65%}.os-suggest-toggle-def{position:absolute;top:0;left:0;font-size:65%;visibility:hidden}.autocomment{color:gray}#pagehistory .history-user{margin-left:.4em;margin-right:.2em}#pagehistory span.minor{font-weight:bold}#pagehistory li{border:1px solid white}#pagehistory li.selected{background-color:#f9f9f9;border:1px dashed #aaa}.mw-history-revisiondelete-button,#mw-fileduplicatesearch-icon{float:right}.newpage,.minoredit,.botedit{font-weight:bold}#shared-image-dup,#shared-image-conflict{font-style:italic}div.mw-warning-with-logexcerpt{padding:3px;margin-bottom:3px;border:2px solid #2F6FAB;clear:both}div.mw-warning-with-logexcerpt ul li{font-size:90%}span.mw-revdelundel-link,strong.mw-revdelundel-link{font-size:90%}span.mw-revdelundel-hidden,input.mw-revdelundel-hidden{visibility:hidden}td.mw-revdel-checkbox,th.mw-revdel-checkbox{padding-right:10px;text-align:center}a.feedlink{background:url(images/feed-icon.png) center left no-repeat;padding-left:16px}.plainlinks a{background:none!important;padding:0!important}.rtl a.external.free,.rtl a.external.autonumber{direction:ltr;unicode-bidi:embed}table.wikitable{margin:1em 1em 1em 0;background-color:#f9f9f9;border:1px #aaa solid;border-collapse:collapse;color:black}table.wikitable>tr>th,table.wikitable>tr>td,table.wikitable>*>tr>th,table.wikitable>*>tr>td{border:1px #aaa solid;padding:.2em}table.wikitable>tr>th,table.wikitable>*>tr>th{background-color:#f2f2f2;text-align:center}table.wikitable>caption{font-weight:bold}table.collapsed tr.collapsable{display:none}.success{color:green;font-size:larger}.warning{color:#FFA500;font-size:larger}.error{color:red;font-size:larger}.errorbox,.warningbox,.successbox{font-size:larger;border:2px solid;padding:.5em 1em;float:left;margin-bottom:2em;color:#000}.errorbox{border-color:red;background-color:#fff2f2}.warningbox{border-color:#FF8C00;background-color:#FFFFC0}.successbox{border-color:green;background-color:#dfd}.errorbox h2,.warningbox h2,.successbox h2{font-size:1em;font-weight:bold;display:inline;margin:0 .5em 0 0;border:none}.mw-infobox{border:2px solid #ff7f00;margin:.5em;clear:left;overflow:hidden}.mw-infobox-left{margin:7px;float:left;width:35px}.mw-infobox-right{margin:.5em .5em .5em 49px}.previewnote{color:#c00;margin-bottom:1em}.previewnote p{text-indent:3em;margin:.8em 0}.visualClear{clear:both}#mw_trackbacks{border:solid 1px #bbf;background-color:#eef;padding:.2em}.mw-datatable{border-collapse:collapse}.mw-datatable,.mw-datatable td,.mw-datatable th{border:1px solid #aaa;padding:0 .15em 0 .15em}.mw-datatable th{background-color:#ddf}.mw-datatable td{background-color:#fff}.mw-datatable tr:hover td{background-color:#eef}.TablePager{min-width:80%}.TablePager_nav{margin:0 auto}.TablePager_nav td{padding:3px;text-align:center}.TablePager_nav a{text-decoration:none}.imagelist td,.imagelist th{white-space:nowrap}.imagelist .TablePager_col_links{background-color:#eef}.imagelist .TablePager_col_img_description{white-space:normal}.imagelist th.TablePager_sort{background-color:#ccf}ul#filetoc{text-align:center;border:1px solid #aaa;background-color:#f9f9f9;padding:5px;font-size:95%;margin-bottom:.5em;margin-left:0;margin-right:0}#filetoc li{display:inline;list-style-type:none;padding-right:2em}table.mw_metadata{font-size:.8em;margin-left:.5em;margin-bottom:.5em;width:400px}table.mw_metadata caption{font-weight:bold}table.mw_metadata th{font-weight:normal}table.mw_metadata td{padding:.1em}table.mw_metadata{border:none;border-collapse:collapse}table.mw_metadata td,table.mw_metadata th{text-align:center;border:1px solid #aaa;padding-left:5px;padding-right:5px}table.mw_metadata th{background-color:#f9f9f9}table.mw_metadata td{background-color:#fcfcfc}table.mw_metadata ul.metadata-langlist{list-style-type:none;list-style-image:none;padding-right:5px;padding-left:5px;margin:0}.mw-content-ltr ul,.mw-content-rtl .mw-content-ltr ul{margin:.3em 0 0 1.6em;padding:0}.mw-content-rtl ul,.mw-content-ltr .mw-content-rtl ul{margin:.3em 1.6em 0 0;padding:0}.mw-content-ltr ol,.mw-content-rtl .mw-content-ltr ol{margin:.3em 0 0 3.2em;padding:0}.mw-content-rtl ol,.mw-content-ltr .mw-content-rtl ol{margin:.3em 3.2em 0 0;padding:0}.mw-content-ltr dd,.mw-content-rtl .mw-content-ltr dd{margin-left:1.6em;margin-right:0}.mw-content-rtl dd,.mw-content-ltr .mw-content-rtl dd{margin-right:1.6em;margin-left:0}li.gallerybox{vertical-align:top;border:solid 2px white;display:-moz-inline-box;display:inline-block}ul.gallery,li.gallerybox{zoom:1;*display:inline}ul.gallery{margin:2px;padding:2px;display:block}li.gallerycaption{font-weight:bold;text-align:center;display:block;word-wrap:break-word}li.gallerybox div.thumb{text-align:center;border:1px solid #ccc;background-color:#f9f9f9;margin:2px}li.gallerybox div.thumb img{display:block;margin:0 auto}div.gallerytext{overflow:hidden;font-size:94%;padding:2px 4px;word-wrap:break-word}.mw-ajax-loader{background-image:url(images/ajax-loader.gif);background-position:center center;background-repeat:no-repeat;padding:16px;position:relative;top:-16px}.mw-small-spinner{padding:10px!important;margin-right:.6em;background-image:url(images/spinner.gif);background-position:center center;background-repeat:no-repeat}h1:lang(as),h1:lang(bh),h1:lang(bho),h1:lang(bn),h1:lang(gu),h1:lang(hi),h1:lang(kn),h1:lang(ml),h1:lang(mr),h1:lang(or),h1:lang(pa),h1:lang(sa),h1:lang(ta),h1:lang(te){line-height:1.5em!important}h2:lang(as),h3:lang(as),h4:lang(as),h5:lang(as),h6:lang(as),h2:lang(bho),h3:lang(bho),h4:lang(bho),h5:lang(bho),h6:lang(bho),h2:lang(bh),h3:lang(bh),h4:lang(bh),h5:lang(bh),h6:lang(bh),h2:lang(bn),h3:lang(bn),h4:lang(bn),h5:lang(bn),h6:lang(bn),h2:lang(gu),h3:lang(gu),h4:lang(gu),h5:lang(gu),h6:lang(gu),h2:lang(hi),h3:lang(hi),h4:lang(hi),h5:lang(hi),h6:lang(hi),h2:lang(kn),h3:lang(kn),h4:lang(kn),h5:lang(kn),h6:lang(kn),h2:lang(ml),h3:lang(ml),h4:lang(ml),h5:lang(ml),h6:lang(ml),h2:lang(mr),h3:lang(mr),h4:lang(mr),h5:lang(mr),h6:lang(mr),h2:lang(or),h3:lang(or),h4:lang(or),h5:lang(or),h6:lang(or),h2:lang(pa),h3:lang(pa),h4:lang(pa),h5:lang(pa),h6:lang(pa),h2:lang(sa),h3:lang(sa),h4:lang(sa),h5:lang(sa),h6:lang(sa),h2:lang(ta),h3:lang(ta),h4:lang(ta),h5:lang(ta),h6:lang(ta),h2:lang(te),h3:lang(te),h4:lang(te),h5:lang(te),h6:lang(te){line-height:1.2em}ol:lang(bcc) li,ol:lang(bqi) li,ol:lang(fa) li,ol:lang(glk) li,ol:lang(kk-arab) li,ol:lang(mzn) li{list-style-type:-moz-persian;list-style-type:persian}ol:lang(ckb) li{list-style-type:-moz-arabic-indic;list-style-type:arabic-indic}ol:lang(hi) li,ol:lang(mr) li{list-style-type:-moz-devanagari;list-style-type:devanagari}ol:lang(as) li,ol:lang(bn) li{list-style-type:-moz-bengali;list-style-type:bengali}ol:lang(or) li{list-style-type:-moz-oriya;list-style-type:oriya}#toc ul,.toc ul{margin:.3em 0}.mw-content-ltr .toc ul,.mw-content-ltr #toc ul,.mw-content-rtl .mw-content-ltr .toc ul,.mw-content-rtl .mw-content-ltr #toc ul{text-align:left}.mw-content-rtl .toc ul,.mw-content-rtl #toc ul,.mw-content-ltr .mw-content-rtl .toc ul,.mw-content-ltr .mw-content-rtl #toc ul{text-align:right}.mw-content-ltr .toc ul ul,.mw-content-ltr #toc ul ul,.mw-content-rtl .mw-content-ltr .toc ul ul,.mw-content-rtl .mw-content-ltr #toc ul ul{margin:0 0 0 2em}.mw-content-rtl .toc ul ul,.mw-content-rtl #toc ul ul,.mw-content-ltr .mw-content-rtl .toc ul ul,.mw-content-ltr .mw-content-rtl #toc ul ul{margin:0 2em 0 0}#toc #toctitle,.toc #toctitle,#toc .toctitle,.toc .toctitle{direction:ltr}.mw-help-field-hint{display:none;margin-left:2px;margin-bottom:-8px;padding:0 0 0 15px;background-image:url('images/help-question.gif');background-position:left center;background-repeat:no-repeat;cursor:pointer;font-size:.8em;text-decoration:underline;color:#0645ad}.mw-help-field-hint:hover{background-image:url('images/help-question-hover.gif')}.mw-help-field-data{display:block;background-color:#d6f3ff;padding:5px 8px 4px 8px;border:1px solid #5dc9f4;margin-left:20px}.tipsy{padding:5px 5px 10px;font-size:12px;position:absolute;z-index:100000;overflow:visible}.tipsy-inner{padding:5px 8px 4px 8px;background-color:#d6f3ff;color:black;border:1px solid #5dc9f4;max-width:300px;text-align:left}.tipsy-arrow{position:absolute;background:url(images/tipsy-arrow.gif) no-repeat top left;width:13px;height:13px}.tipsy-se .tipsy-arrow{bottom:-2px;right:10px;background-position:0 100%}#mw-clearyourcache,#mw-sitecsspreview,#mw-sitejspreview,#mw-usercsspreview,#mw-userjspreview{direction:ltr;unicode-bidi:embed}.diff-currentversion-title,.diff{direction:ltr;unicode-bidi:embed}.diff-contentalign-right td{direction:rtl;unicode-bidi:embed}.diff-contentalign-left td{direction:ltr;unicode-bidi:embed}.diff-otitle,.diff-ntitle,.diff-lineno{direction:ltr!important;unicode-bidi:embed}#mw-revision-info,#mw-revision-info-current,#mw-revision-nav{direction:ltr;display:inline}div.tright,div.floatright,table.floatright{clear:right;float:right}div.tleft,div.floatleft,table.floatleft{float:left;clear:left}div.floatright,table.floatright,div.floatleft,table.floatleft{position:relative}#mw-credits a{unicode-bidi:embed}.mw-jump,#jump-to-nav{overflow:hidden;height:0;zoom:1}.printfooter{display:none}.xdebug-error{position:absolute;z-index:99}.editsection,.toctoggle{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}a.stub,a.new{color:#ba0000;text-decoration:none}#toc{border:1px solid #aaa;background-color:#f9f9f9;padding:5px}div.floatright{float:right;clear:right;position:relative;margin:.5em 0 .8em 1.4em}div.floatright p{font-style:italic}div.floatleft{float:left;clear:left;position:relative;margin:.5em 1.4em .8em 0}div.floatleft p{font-style:italic}div.center{text-align:center}div.thumb{border:none;width:auto;margin-top:.5em;margin-bottom:.8em;background-color:transparent}div.thumbinner{border:1px solid #ccc;padding:3px!important;background-color:White;font-size:94%;text-align:center;overflow:hidden}html .thumbimage{border:1px solid #ccc}html .thumbcaption{border:none;text-align:left;line-height:1.4em;padding:3px!important;font-size:94%}div.magnify{display:none}div.tright{float:right;clear:right;margin:.5em 0 .8em 1.4em}div.tleft{float:left;clear:left;margin:.5em 1.4em .8em 0}img.thumbborder{border:1px solid #ddd}table.rimage{float:right;width:1pt;position:relative;margin-left:1em;margin-bottom:1em;text-align:center}body{background:white;color:black;margin:0;padding:0}.noprint,div#jump-to-nav,.mw-jump,div.top,div#column-one,#colophon,.editsection,.toctoggle,.tochidden,div#f-poweredbyico,div#f-copyrightico,li#viewcount,li#about,li#disclaimer,li#mobileview,li#privacy,#footer-places,.mw-hidden-catlinks,tr.mw-metadata-show-hide-extended,span.mw-filepage-other-resolutions,#filetoc{display:none}ul{list-style-type:square}#content{background:none;border:none!important;padding:0!important;margin:0!important;direction:ltr}#footer{background:white;color:black;margin-top:1em;border-top:1px solid #AAA;direction:ltr}h1,h2,h3,h4,h5,h6{font-weight:bold}p{margin:1em 0;line-height:1.2em}pre{border:1pt dashed black;white-space:pre;font-size:8pt;overflow:auto;padding:1em 0;background:white;color:black}table.listing,table.listing td{border:1pt solid black;border-collapse:collapse}a{color:black!important;background:none!important;padding:0!important}a:link,a:visited{color:#520;background:transparent;text-decoration:underline}#content a.external.text:after,#content a.external.autonumber:after{content:"(" attr(href) ") "}#globalWrapper{width:100%!important;min-width:0!important}#content{background:white;color:black}#column-content{margin:0!important}#column-content #content{padding:1em;margin:0!important}a,a.external,a.new,a.stub{color:black!important;text-decoration:none!important}a,a.external,a.new,a.stub{color:inherit!important;text-decoration:inherit!important}img{border:none;vertical-align:middle}span.texhtml{font-family:serif}#siteNotice{display:none}li.gallerybox{vertical-align:top;border:solid 2px white;display:-moz-inline-box;display:inline-block}ul.gallery,li.gallerybox{zoom:1;*display:inline}ul.gallery{margin:2px;padding:2px;display:block}li.gallerycaption{font-weight:bold;text-align:center;display:block;word-wrap:break-word}li.gallerybox div.thumb{text-align:center;border:1px solid #ccc;margin:2px}div.gallerytext{overflow:hidden;font-size:94%;padding:2px 4px;word-wrap:break-word}table.diff{background:white}td.diff-otitle{background:#fff}td.diff-ntitle{background:#fff}td.diff-addedline{background:#cfc;font-size:smaller;border:solid 2px black}td.diff-deletedline{background:#ffa;font-size:smaller;border:dotted 2px black}td.diff-context{background:#eee;font-size:smaller}.diffchange{color:silver;font-weight:bold;text-decoration:underline}table.wikitable,table.mw_metadata{margin:1em 1em 1em 0;border:1px #aaa solid;background:white;border-collapse:collapse}table.wikitable>tr>th,table.wikitable>tr>td,table.wikitable>*>tr>th,table.wikitable>*>tr>td,.mw_metadata th,.mw_metadata td{border:1px #aaa solid;padding:.2em}table.wikitable>tr>th,table.wikitable>*>tr>th,.mw_metadata th{text-align:center;background:white;font-weight:bold}table.wikitable>caption,.mw_metadata caption{font-weight:bold}a.sortheader{margin:0 .3em}.wikitable,.thumb,img{page-break-inside:avoid}h2,h3,h4,h5,h6,h7{page-break-after:avoid}p{widows:3;orphans:3}.catlinks ul{display:inline;margin:0;padding:0;list-style:none;list-style-type:none;list-style-image:none;vertical-align:middle!ie}.catlinks li{display:inline-block;line-height:1.15em;padding:0 .4em;border-left:1px solid #AAA;margin:.1em 0;zoom:1;display:inline!ie}.catlinks li:first-child{padding-left:.2em;border-left:none}dfn{font-style:inherit}sup,sub{line-height:1em}#interwiki-completelist{font-weight:bold}body.page-Main_Page #ca-delete{display:none!important}body.page-Main_Page #mp-topbanner{clear:both}#toolbar{height:22px;margin-bottom:6px}body.action-info :target{background:#DEF}ol.references,div.reflist,div.refbegin{font-size:90%;margin-bottom:.5em}div.refbegin-100{font-size:100%}div.reflist ol.references{font-size:100%;list-style-type:inherit}div.columns{margin-top:.3em}div.columns dl,div.columns ol,div.columns ul{margin-top:0}div.columns li,div.columns dd dd{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid-column}ol.references li:target,sup.reference:target,span.citation:target{background-color:#DEF}sup.reference{font-weight:normal;font-style:normal}span.brokenref{display:none}.citation{word-wrap:break-word}@media screen,handheld{.citation *.printonly{display:none}}.flowlist ul{overflow-x:hidden;margin-left:0;padding-left:1.6em}.flowlist ol{overflow-x:hidden;margin-left:0;padding-left:3.2em}.flowlist dl{overflow-x:hidden}.hlist dl,.hlist ol,.hlist ul{margin:0;padding:0}.hlist dd,.hlist dt,.hlist li{margin:0;display:inline}.hlist dl dl,.hlist dl ol,.hlist dl ul,.hlist ol dl,.hlist ol ol,.hlist ol ul,.hlist ul dl,.hlist ul ol,.hlist ul ul{display:inline}.hlist dt:after{content:":"}.hlist dd:after,.hlist li:after{content:" · ";font-weight:bold}.hlist dd:last-child:after,.hlist dt:last-child:after,.hlist li:last-child:after{content:none}.hlist dd.hlist-last-child:after,.hlist dt.hlist-last-child:after,.hlist li.hlist-last-child:after{content:none}.hlist dd dd:first-child:before,.hlist dd dt:first-child:before,.hlist dd li:first-child:before,.hlist dt dd:first-child:before,.hlist dt dt:first-child:before,.hlist dt li:first-child:before,.hlist li dd:first-child:before,.hlist li dt:first-child:before,.hlist li li:first-child:before{content:"(";font-weight:normal}.hlist dd dd:last-child:after,.hlist dd dt:last-child:after,.hlist dd li:last-child:after,.hlist dt dd:last-child:after,.hlist dt dt:last-child:after,.hlist dt li:last-child:after,.hlist li dd:last-child:after,.hlist li dt:last-child:after,.hlist li li:last-child:after{content:") ";font-weight:normal}.hlist dd dd.hlist-last-child:after,.hlist dd dt.hlist-last-child:after,.hlist dd li.hlist-last-child:after,.hlist dt dd.hlist-last-child:after,.hlist dt dt.hlist-last-child:after,.hlist dt li.hlist-last-child:after,.hlist li dd.hlist-last-child:after,.hlist li dt.hlist-last-child:after,.hlist li li.hlist-last-child:after{content:") ";font-weight:normal}.hlist ol{counter-reset:listitem}.hlist ol>li{counter-increment:listitem}.hlist ol>li:before{content:" " counter(listitem) " "}.hlist dd ol>li:first-child:before,.hlist dt ol>li:first-child:before,.hlist li ol>li:first-child:before{content:"(" counter(listitem) " "}.plainlist ul{line-height:inherit;list-style:none none;margin:0}.plainlist ul li{margin-bottom:0}.navbox{border:1px solid #aaa;width:100%;margin:auto;clear:both;font-size:88%;text-align:center;padding:1px}.navbox-inner,.navbox-subgroup{width:100%}.navbox-group,.navbox-title,.navbox-abovebelow{padding:.25em 1em;line-height:1.5em;text-align:center}th.navbox-group{white-space:nowrap;text-align:right}.navbox,.navbox-subgroup{background:#fdfdfd}.navbox-list{line-height:1.8em;border-color:#fdfdfd}.navbox th,.navbox-title{background:#ccf}.navbox-abovebelow,th.navbox-group,.navbox-subgroup .navbox-title{background:#ddf}.navbox-subgroup .navbox-group,.navbox-subgroup .navbox-abovebelow{background:#e6e6ff}.navbox-even{background:#f7f7f7}.navbox-odd{background:transparent}table.navbox+table.navbox{margin-top:-1px}.navbox .hlist td dl,.navbox .hlist td ol,.navbox .hlist td ul,.navbox td.hlist dl,.navbox td.hlist ol,.navbox td.hlist ul{padding:.125em 0}ol+table.navbox,ul+table.navbox{margin-top:.5em}.navbar{display:inline;font-size:88%;font-weight:normal}.navbar ul{display:inline;white-space:nowrap}.navbar li{word-spacing:-0.125em}.navbar.mini li span{font-variant:small-caps}.infobox .navbar{font-size:100%}.navbox .navbar{display:block;font-size:100%}.navbox-title .navbar{float:left;text-align:left;margin-right:.5em;width:6em}.collapseButton{float:right;font-weight:normal;margin-left:.5em;text-align:right;width:auto}.navbox .collapseButton{width:6em}.mw-collapsible-toggle{font-weight:normal;text-align:right}.navbox .mw-collapsible-toggle{width:6em}.infobox{border:1px solid #aaa;background-color:#f9f9f9;color:black;margin:.5em 0 .5em 1em;padding:.2em;float:right;clear:right;text-align:left;font-size:88%;line-height:1.5em}.infobox caption{font-size:125%;font-weight:bold}.infobox td,.infobox th{vertical-align:top}.infobox.bordered{border-collapse:collapse}.infobox.bordered td,.infobox.bordered th{border:1px solid #aaa}.infobox.bordered .borderless td,.infobox.bordered .borderless th{border:0}.infobox.sisterproject{width:20em;font-size:90%}.infobox.standard-talk{border:1px solid #c0c090;background-color:#f8eaba}.infobox.standard-talk.bordered td,.infobox.standard-talk.bordered th{border:1px solid #c0c090}.infobox.bordered .mergedtoprow td,.infobox.bordered .mergedtoprow th{border:0;border-top:1px solid #aaa;border-right:1px solid #aaa}.infobox.bordered .mergedrow td,.infobox.bordered .mergedrow th{border:0;border-right:1px solid #aaa}.infobox.geography{border-collapse:collapse;line-height:1.2em;font-size:90%}.infobox.geography td,.infobox.geography th{border-top:1px solid #aaa;padding:.4em .6em .4em .6em}.infobox.geography .mergedtoprow td,.infobox.geography .mergedtoprow th{border-top:1px solid #aaa;padding:.4em .6em .2em .6em}.infobox.geography .mergedrow td,.infobox.geography .mergedrow th{border:0;padding:0 .6em .2em .6em}.infobox.geography .mergedbottomrow td,.infobox.geography .mergedbottomrow th{border-top:0;border-bottom:1px solid #aaa;padding:0 .6em .4em .6em}.infobox.geography .maptable td,.infobox.geography .maptable th{border:0;padding:0}.wikitable.plainrowheaders th[scope=row]{font-weight:normal;text-align:left}.wikitable td ul,.wikitable td ol,.wikitable td dl{text-align:left}.wikitable.hlist td ul,.wikitable.hlist td ol,.wikitable.hlist td dl{text-align:inherit}div.listenlist{background:url("//upload.wikimedia.org/wikipedia/commons/4/47/Sound-icon.svg") no-repeat scroll 0 0 transparent;background-size:30px;padding-left:40px}table.mw-hiero-table td{vertical-align:middle}div.medialist{min-height:50px;margin:1em;background-position:top left;background-repeat:no-repeat}div.medialist ul{list-style-type:none;list-style-image:none;margin:0}div.medialist ul li{padding-bottom:.5em}div.medialist ul li li{font-size:91%;padding-bottom:0}div#content a[href$=".pdf"].external,div#content a[href*=".pdf?"].external,div#content a[href*=".pdf#"].external,div#content a[href$=".PDF"].external,div#content a[href*=".PDF?"].external,div#content a[href*=".PDF#"].external,div#mw_content a[href$=".pdf"].external,div#mw_content a[href*=".pdf?"].external,div#mw_content a[href*=".pdf#"].external,div#mw_content a[href$=".PDF"].external,div#mw_content a[href*=".PDF?"].external,div#mw_content a[href*=".PDF#"].external{background:url("//upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") no-repeat right;padding-right:18px}div#content span.PDFlink a,div#mw_content span.PDFlink a{background:url("//upload.wikimedia.org/wikipedia/commons/2/23/Icons-mini-file_acrobat.gif") no-repeat right;padding-right:18px}div.columns-2 div.column{float:left;width:50%;min-width:300px}div.columns-3 div.column{float:left;width:33.3%;min-width:200px}div.columns-4 div.column{float:left;width:25%;min-width:150px}div.columns-5 div.column{float:left;width:20%;min-width:120px}.messagebox{border:1px solid #aaa;background-color:#f9f9f9;width:80%;margin:0 auto 1em auto;padding:.2em}.messagebox.merge{border:1px solid #c0b8cc;background-color:#f0e5ff;text-align:center}.messagebox.cleanup{border:1px solid #9f9fff;background-color:#efefff;text-align:center}.messagebox.standard-talk{border:1px solid #c0c090;background-color:#f8eaba;margin:4px auto}.mbox-inside .standard-talk,.messagebox.nested-talk{border:1px solid #c0c090;background-color:#f8eaba;width:100%;margin:2px 0;padding:2px}.messagebox.small{width:238px;font-size:85%;float:right;clear:both;margin:0 0 1em 1em;line-height:1.25em}.messagebox.small-talk{width:238px;font-size:85%;float:right;clear:both;margin:0 0 1em 1em;line-height:1.25em;background:#F8EABA}th.mbox-text,td.mbox-text{border:none;padding:.25em .9em;width:100%}td.mbox-image{border:none;padding:2px 0 2px .9em;text-align:center}td.mbox-imageright{border:none;padding:2px .9em 2px 0;text-align:center}td.mbox-empty-cell{border:none;padding:0;width:1px}table.ambox{margin:0 10%;border:1px solid #aaa;border-left:10px solid #1e90ff;background:#fbfbfb}table.ambox+table.ambox{margin-top:-1px}.ambox th.mbox-text,.ambox td.mbox-text{padding:.25em .5em}.ambox td.mbox-image{padding:2px 0 2px .5em}.ambox td.mbox-imageright{padding:2px .5em 2px 0}table.ambox-notice{border-left:10px solid #1e90ff}table.ambox-speedy{border-left:10px solid #b22222;background:#fee}table.ambox-delete{border-left:10px solid #b22222}table.ambox-content{border-left:10px solid #f28500}table.ambox-style{border-left:10px solid #f4c430}table.ambox-move{border-left:10px solid #9932cc}table.ambox-protection{border-left:10px solid #bba}table.imbox{margin:4px 10%;border-collapse:collapse;border:3px solid #1e90ff;background:#fbfbfb}.imbox .mbox-text .imbox{margin:0 -0.5em;display:block}.mbox-inside .imbox{margin:4px}table.imbox-notice{border:3px solid #1e90ff}table.imbox-speedy{border:3px solid #b22222;background:#fee}table.imbox-delete{border:3px solid #b22222}table.imbox-content{border:3px solid #f28500}table.imbox-style{border:3px solid #f4c430}table.imbox-move{border:3px solid #9932cc}table.imbox-protection{border:3px solid #bba}table.imbox-license{border:3px solid #88a;background:#f7f8ff}table.imbox-featured{border:3px solid #cba135}table.cmbox{margin:3px 10%;border-collapse:collapse;border:1px solid #aaa;background:#DFE8FF}table.cmbox-notice{background:#D8E8FF}table.cmbox-speedy{margin-top:4px;margin-bottom:4px;border:4px solid #b22222;background:#FFDBDB}table.cmbox-delete{background:#FFDBDB}table.cmbox-content{background:#FFE7CE}table.cmbox-style{background:#FFF9DB}table.cmbox-move{background:#E4D8FF}table.cmbox-protection{background:#EFEFE1}table.ombox{margin:4px 10%;border-collapse:collapse;border:1px solid #aaa;background:#f9f9f9}table.ombox-notice{border:1px solid #aaa}table.ombox-speedy{border:2px solid #b22222;background:#fee}table.ombox-delete{border:2px solid #b22222}table.ombox-content{border:1px solid #f28500}table.ombox-style{border:1px solid #f4c430}table.ombox-move{border:1px solid #9932cc}table.ombox-protection{border:2px solid #bba}table.tmbox{margin:4px 10%;border-collapse:collapse;border:1px solid #c0c090;background:#f8eaba}.mediawiki .mbox-inside .tmbox{margin:2px 0;width:100%}.mbox-inside .tmbox.mbox-small{line-height:1.5em;font-size:100%}table.tmbox-speedy{border:2px solid #b22222;background:#fee}table.tmbox-delete{border:2px solid #b22222}table.tmbox-content{border:2px solid #f28500}table.tmbox-style{border:2px solid #f4c430}table.tmbox-move{border:2px solid #9932cc}table.tmbox-protection,table.tmbox-notice{border:1px solid #c0c090}table.dmbox{clear:both;margin:.9em 1em;border-top:1px solid #ccc;border-bottom:1px solid #ccc;background:transparent}table.fmbox{clear:both;margin:.2em 0;width:100%;border:1px solid #aaa;background:#f9f9f9}table.fmbox-system{background:#f9f9f9}table.fmbox-warning{border:1px solid #bb7070;background:#ffdbdb}table.fmbox-editnotice{background:transparent}div.mw-warning-with-logexcerpt,div.mw-lag-warn-high,div.mw-cascadeprotectedwarning,div#mw-protect-cascadeon{clear:both;margin:.2em 0;border:1px solid #bb7070;background:#ffdbdb;padding:.25em .9em}div.mw-lag-warn-normal,div.fmbox-system{clear:both;margin:.2em 0;border:1px solid #aaa;background:#f9f9f9;padding:.25em .9em}body.mediawiki table.mbox-small{clear:right;float:right;margin:4px 0 4px 1em;width:238px;font-size:88%;line-height:1.25em}body.mediawiki table.mbox-small-left{margin:4px 1em 4px 0;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.compact-ambox table .mbox-image,.compact-ambox table .mbox-imageright,.compact-ambox table .mbox-empty-cell{display:none}.compact-ambox table.ambox{border:none;border-collapse:collapse;background:transparent;margin:0 0 0 1.6em!important;padding:0!important;width:auto;display:block}body.mediawiki .compact-ambox table.mbox-small-left{font-size:100%;width:auto;margin:0}.compact-ambox table .mbox-text{padding:0!important;margin:0!important}.compact-ambox table .mbox-text-span{display:list-item;line-height:1.5em;list-style-type:square;list-style-image:url(//bits.wikimedia.org/skins/common/images/bullet.gif)}.skin-vector .compact-ambox table .mbox-text-span{list-style-type:circle;list-style-image:url(//bits.wikimedia.org/skins/vector/images/bullet-icon.png)}.compact-ambox .hide-when-compact{display:none}div.noarticletext{border:none;background:transparent;padding:0}.visualhide{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}#wpSave{font-weight:bold}.hiddenStructure{display:inline!important;color:#f00;background-color:#0f0}.check-icon a.new{display:none;speak:none}.nounderlines a,.IPA a:link,.IPA a:visited{text-decoration:none!important}div.NavFrame{margin:0;padding:4px;border:1px solid #aaa;text-align:center;border-collapse:collapse;font-size:95%}div.NavFrame+div.NavFrame{border-top-style:none;border-top-style:hidden}div.NavPic{background-color:#fff;margin:0;padding:2px;float:left}div.NavFrame div.NavHead{height:1.6em;font-weight:bold;background-color:#ccf;position:relative}div.NavFrame p,div.NavFrame div.NavContent,div.NavFrame div.NavContent p{font-size:100%}div.NavEnd{margin:0;padding:0;line-height:1px;clear:both}a.NavToggle{position:absolute;top:0;right:3px;font-weight:normal;font-size:90%}.rellink,.dablink{font-style:italic;padding-left:1.6em;margin-bottom:.5em}.rellink i,.dablink i{font-style:normal}.listify td{display:list-item}.listify tr{display:block}.listify table{display:block}.geo-default,.geo-dms,.geo-dec{display:inline}.geo-nondefault,.geo-multi-punct{display:none}.longitude,.latitude{white-space:nowrap}.nonumtoc .tocnumber{display:none}.nonumtoc #toc ul,.nonumtoc .toc ul{line-height:1.5em;list-style:none none;margin:.3em 0 0;padding:0}.nonumtoc #toc ul ul,.nonumtoc .toc ul ul{margin:0 0 0 2em}.toclimit-2 .toclevel-1 ul,.toclimit-3 .toclevel-2 ul,.toclimit-4 .toclevel-3 ul,.toclimit-5 .toclevel-4 ul,.toclimit-6 .toclevel-5 ul,.toclimit-7 .toclevel-6 ul{display:none}blockquote.templatequote{margin-top:0}blockquote.templatequote div.templatequotecite{line-height:1em;text-align:left;padding-left:2em;margin-top:0}blockquote.templatequote div.templatequotecite cite{font-size:85%}div.user-block{padding:5px;margin-bottom:.5em;border:1px solid #A9A9A9;background-color:#FFEFD5}.nowrap,.nowraplinks a,.nowraplinks .selflink,sup.reference a{white-space:nowrap}.wrap,.wraplinks a{white-space:normal}.template-documentation{clear:both;margin:1em 0 0 0;border:1px solid #aaa;background-color:#ecfcf4;padding:1em}.imagemap-inline div{display:inline}#wpUploadDescription{height:13em}.thumbinner{min-width:100px}div.thumb .thumbimage{background-color:#fff}div#content .gallerybox div.thumb{background-color:#F9F9F9}.gallerybox .thumb img{background:#fff url(//bits.wikimedia.org/skins/common/images/Checker-16x16.png) repeat}.ns-0 .gallerybox .thumb img,.ns-2 .gallerybox .thumb img,.ns-100 .gallerybox .thumb img,.nochecker .gallerybox .thumb img{background:#fff}#mw-subcategories,#mw-pages,#mw-category-media,#filehistory,#wikiPreview,#wikiDiff{clear:both}body.rtl #mw-articlefeedbackv5,body.rtl #mw-articlefeedback{display:block;margin-bottom:1em;clear:right;float:right}.wpb .wpb-header{display:none}.wpbs-inner .wpb .wpb-header{display:block}.wpbs-inner .wpb .wpb-header{display:table-row}.wpbs-inner .wpb-outside{display:none}.mw-tag-markers{font-family:sans-serif;font-style:italic;font-size:90%}.sysop-show,.accountcreator-show,.templateeditor-show,.autoconfirmed-show{display:none}.ve-init-mw-viewPageTarget-toolbar-editNotices-notice .editnotice-redlink{display:none!important}ul.permissions-errors>li{list-style:none none}ul.permissions-errors{margin:0}body.page-Special_UserLogin .mw-label label,body.page-Special_UserLogin_signup .mw-label label{white-space:nowrap}.transborder{border:solid transparent}* html .transborder{border:solid #000001;filter:chroma(color=#000001)}.updatedmarker{background-color:transparent;color:#006400}li.mw-changeslist-line-watched .mw-title,table.mw-changeslist-line-watched .mw-title,table.mw-enhanced-watch .mw-enhanced-rctime{font-weight:normal}span.texhtml{font-family:"Times New Roman","Nimbus Roman No9 L",Times,serif;font-size:118%;white-space:nowrap}span.texhtml span.texhtml{font-size:100%}div.mw-geshi div,div.mw-geshi div pre,span.mw-geshi,pre.source-css,pre.source-javascript,pre.source-lua{font-family:monospace,Courier!important}table#mw-prefixindex-list-table,table#mw-prefixindex-nav-table{width:98%}.portal-column-left{float:left;width:50%}.portal-column-right{float:right;width:49%}.portal-column-left-wide{float:left;width:60%}.portal-column-right-narrow{float:right;width:39%}.portal-column-left-extra-wide{float:left;width:70%}.portal-column-right-extra-narrow{float:right;width:29%}@media only screen and (max-width:800px){.portal-column-left,.portal-column-right,.portal-column-left-wide,.portal-column-right-narrow,.portal-column-left-extra-wide,.portal-column-right-extra-narrow{float:inherit;width:inherit}}#bodyContent .letterhead{background-image:url('//upload.wikimedia.org/wikipedia/commons/e/e0/Tan-page-corner.png');background-repeat:no-repeat;padding:2em;background-color:#faf9f2}.treeview ul{padding:0;margin:0}.treeview li{padding:0;margin:0;list-style-type:none;list-style-image:none;zoom:1}.treeview li li{background:url("//upload.wikimedia.org/wikipedia/commons/f/f2/Treeview-grey-line.png") no-repeat 0 -2981px;padding-left:20px;text-indent:.3em}.treeview li li.lastline{background-position:0 -5971px}.treeview li.emptyline>ul{margin-left:-1px}.treeview li.emptyline>ul>li:first-child{background-position:0 9px}td .sortkey,th .sortkey{display:none;speak:none}.inputbox-hidecheckboxes form .inputbox-element{display:none!important}#editpage-specialchars{display:none}.k-player .k-attribution{visibility:hidden}@media(-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(min-resolution:1.5dppx),(min-resolution:144dpi){#p-logo a{background-image:url("//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Wikipedia-logo-v2-en.svg/204px-Wikipedia-logo-v2-en.svg.png")!important;background-size:136px auto}}@media(-webkit-min-device-pixel-ratio:2),(min--moz-device-pixel-ratio:2),(min-resolution:2dppx),(min-resolution:192dpi){#p-logo a{background-image:url("//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Wikipedia-logo-v2-en.svg/270px-Wikipedia-logo-v2-en.svg.png")!important;background-size:135px auto}}.ns-0 .ambox,.ns-0 .navbox,.ns-0 .vertical-navbox,.ns-0 .infobox.sisterproject,.ns-0 .dablink,.ns-0 .metadata,.editlink,.navbar,a.NavToggle,span.collapseButton,span.mw-collapsible-toggle,th .sortkey,td .sortkey{display:none!important}#content cite a.external.text:after,.nourlexpansion a.external.text:after,.nourlexpansion a.external.autonumber:after{display:none!important}table.collapsible tr,div.NavPic,div.NavContent{display:block!important}table.collapsible tr{display:table-row!important}#firstHeading{margin:0}#content a.external.text:after,#content a.external.autonumber:after{word-wrap:break-word}body.page-Main_Page #deleteconfirm,body.page-Main_Page #t-cite,body.page-Main_Page #footer-info-lastmod,body.action-view.page-Main_Page #siteSub,body.action-view.page-Main_Page #contentSub,body.action-view.page-Main_Page h1.firstHeading{display:none!important}body.page-Main_Page #mp-topbanner{margin-top:0!important}#coordinates{position:absolute;top:0;right:0;float:right;margin:0;padding:0;line-height:1.5em;text-align:right;text-indent:0;font-size:85%;text-transform:none;white-space:nowrap}div.topicon{position:absolute;top:-2em;margin-right:-10px;display:block!important}div.flaggedrevs_short{position:absolute;top:-3em;right:80px;z-index:1;margin-left:0;margin-right:-10px}body.rtl #protected-icon{left:55px}body.rtl #spoken-icon,body.rtl #commons-icon{left:30px}body.rtl #featured-star{left:10px}div.vectorMenu div{z-index:2}#siteSub{display:inline;font-size:92%}li.GA{list-style-image:url(//upload.wikimedia.org/wikipedia/commons/4/42/Monobook-bullet-ga.png)}li.FA{list-style-image:url(//upload.wikimedia.org/wikipedia/commons/d/d4/Monobook-bullet-star.png)}li.mw-changeslist-line-watched,li.mw-history-line-updated{list-style-image:url(//upload.wikimedia.org/wikipedia/commons/c/c2/ChangedBulletVector.png)}#bodyContent a.external[href ^="https://"],.link-https{background:url(//upload.wikimedia.org/wikipedia/en/0/00/Lock_icon_blue.gif) center right no-repeat;padding-right:16px}div.redirectMsg img{vertical-align:text-bottom}.redirectText{font-size:150%;margin:5px} \ No newline at end of file
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/write.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/write.py
deleted file mode 100644
index 939e11d5910..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/bench/write.py
+++ /dev/null
@@ -1,344 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-r"""
-=========================
- Write benchmark results
-=========================
-
-Write benchmark results.
-
-:Copyright:
-
- Copyright 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-Usage::
-
- python -mbench.write [-p plain] [-t table] <pickled
-
- -p plain Plain file to write to (like docs/BENCHMARKS).
- -t table Table file to write to (like docs/_userdoc/benchmark.txt).
-
-"""
-if __doc__:
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
-__docformat__ = "restructuredtext en"
-__license__ = "Apache License, Version 2.0"
-__version__ = "1.0.0"
-
-import os as _os
-import re as _re
-import sys as _sys
-
-
-try:
- unicode
-except NameError:
- def uni(v):
- if hasattr(v, 'decode'):
- return v.decode('latin-1')
- return str(v)
-else:
- def uni(v):
- if isinstance(v, unicode):
- return v.encode('utf-8')
- return str(v)
-
-
-def write_table(filename, results):
- """
- Output tabled benchmark results
-
- :Parameters:
- `filename` : ``str``
- Filename to write to
-
- `results` : ``list``
- Results
- """
- try:
- next
- except NameError:
- next = lambda i: (getattr(i, 'next', None) or i.__next__)()
- try:
- cmp
- except NameError:
- cmp = lambda a, b: (a > b) - (a < b)
-
- names = [
- ('cssmin', 'YUI Port'),
- ('rcssmin', '|rcssmin|'),
- ('_rcssmin', r'_\ |rcssmin|'),
- ]
- benched_per_table = 2
-
- results = sorted(results, reverse=True)
-
- # First we transform our data into a table (list of lists)
- pythons, widths = [], [0] * (benched_per_table + 1)
- last_version = None
- for version, _, result in results:
- version = uni(version)
- if not(last_version is None or version.startswith('2.')):
- continue
- last_version = version
-
- namesub = _re.compile(r'(?:-\d+(?:\.\d+)*)?\.css$').sub
- result = iter(result)
- tables = []
-
- # given our data it's easier to create the table transposed...
- for benched in result:
- rows = [['Name'] + [desc for _, desc in names]]
- for _ in range(benched_per_table):
- if _:
- try:
- benched = next(result)
- except StopIteration:
- rows.append([''] + ['' for _ in names])
- continue
-
- times = dict((
- uni(port), (time, benched['sizes'][idx])
- ) for idx, (port, time) in enumerate(benched['times']))
- columns = ['%s (%.1f)' % (
- namesub('', _os.path.basename(uni(benched['filename']))),
- benched['size'] / 1024.0,
- )]
- for idx, (port, _) in enumerate(names):
- if port not in times:
- columns.append('n/a')
- continue
- time, size = times[port]
- if time is None:
- columns.append('(failed)')
- continue
- columns.append('%s%.2f ms (%.1f %s)' % (
- idx == 0 and ' ' or '',
- time,
- size / 1024.0,
- idx == 0 and '\\*' or ['=', '>', '<'][
- cmp(size, benched['sizes'][0])
- ],
- ))
- rows.append(columns)
-
- # calculate column widths (global for all tables)
- for idx, row in enumerate(rows):
- widths[idx] = max(widths[idx], max(map(len, row)))
-
- # ... and transpose it back.
- tables.append(zip(*rows))
- pythons.append((version, tables))
-
- if last_version.startswith('2.'):
- break
-
- # Second we create a rest table from it
- lines = []
- separator = lambda c='-': '+'.join([''] + [
- c * (width + 2) for width in widths
- ] + [''])
-
- for idx, (version, tables) in enumerate(pythons):
- if idx:
- lines.append('')
- lines.append('')
-
- line = 'Python %s' % (version,)
- lines.append(line)
- lines.append('~' * len(line))
-
- for table in tables:
- lines.append('')
- lines.append('.. rst-class:: benchmark')
- lines.append('')
-
- for idx, row in enumerate(table):
- if idx == 0:
- # header
- lines.append(separator())
- lines.append('|'.join([''] + [
- ' %s%*s ' % (col, len(col) - width, '')
- for width, col in zip(widths, row)
- ] + ['']))
- lines.append(separator('='))
- else: # data
- lines.append('|'.join([''] + [
- j == 0 and (
- ' %s%*s ' % (col, len(col) - widths[j], '')
- ) or (
- ['%*s ', ' %*s '][idx == 1] % (widths[j], col)
- )
- for j, col in enumerate(row)
- ] + ['']))
- lines.append(separator())
-
- fplines = []
- fp = open(filename)
- try:
- fpiter = iter(fp)
- for line in fpiter:
- line = line.rstrip()
- if line == '.. begin tables':
- buf = []
- for line in fpiter:
- line = line.rstrip()
- if line == '.. end tables':
- fplines.append('.. begin tables')
- fplines.append('')
- fplines.extend(lines)
- fplines.append('')
- fplines.append('.. end tables')
- buf = []
- break
- else:
- buf.append(line)
- else:
- fplines.extend(buf)
- _sys.stderr.write("Placeholder container not found!\n")
- else:
- fplines.append(line)
- finally:
- fp.close()
-
- fp = open(filename, 'w')
- try:
- fp.write('\n'.join(fplines) + '\n')
- finally:
- fp.close()
-
-
-def write_plain(filename, results):
- """
- Output plain benchmark results
-
- :Parameters:
- `filename` : ``str``
- Filename to write to
-
- `results` : ``list``
- Results
- """
- lines = []
- results = sorted(results, reverse=True)
- for idx, (version, import_notes, result) in enumerate(results):
- if idx:
- lines.append('')
- lines.append('')
-
- lines.append('$ python%s -OO bench/main.py bench/*.css' % (
- '.'.join(version.split('.')[:2])
- ))
- lines.append('~' * 72)
- for note in import_notes:
- lines.append(uni(note))
- lines.append('Python Release: %s' % (version,))
-
- for single in result:
- lines.append('')
- lines.append('Benchmarking %r... (%.1f KiB)' % (
- uni(single['filename']), single['size'] / 1024.0
- ))
- for msg in single['messages']:
- lines.append(msg)
- times = []
- space = max([len(uni(port)) for port, _ in single['times']])
- for idx, (port, time) in enumerate(single['times']):
- port = uni(port)
- if time is None:
- lines.append(" FAILED %s" % (port,))
- else:
- times.append(time)
- lines.append(
- " Timing %s%s ... (%5.1f KiB %s) %8.2f ms" % (
- port,
- " " * (space - len(port)),
- single['sizes'][idx] / 1024.0,
- idx == 0 and '*' or ['=', '>', '<'][
- cmp(single['sizes'][idx], single['sizes'][0])
- ],
- time
- )
- )
- if len(times) > 1:
- lines[-1] += " (factor: %s)" % (', '.join([
- '%.2f' % (timed / time) for timed in times[:-1]
- ]))
-
- lines.append('')
- lines.append('')
- lines.append('# vim: nowrap')
- fp = open(filename, 'w')
- try:
- fp.write('\n'.join(lines) + '\n')
- finally:
- fp.close()
-
-
-def main(argv=None):
- """ Main """
- import getopt as _getopt
- import pickle as _pickle
-
- if argv is None:
- argv = _sys.argv[1:]
- try:
- opts, args = _getopt.getopt(argv, "hp:t:", ["help"])
- except getopt.GetoptError:
- e = _sys.exc_info()[0](_sys.exc_info()[1])
- print >> _sys.stderr, "%s\nTry %s -mbench.write --help" % (
- e,
- _os.path.basename(_sys.executable),
- )
- _sys.exit(2)
-
- plain, table = None, None
- for key, value in opts:
- if key in ("-h", "--help"):
- print >> _sys.stderr, (
- "%s -mbench.write [-p plain] [-t table] <pickled" % (
- _os.path.basename(_sys.executable),
- )
- )
- _sys.exit(0)
- elif key == '-p':
- plain = str(value)
- elif key == '-t':
- table = str(value)
-
- struct = []
- _sys.stdin = getattr(_sys.stdin, 'detach', lambda: _sys.stdin)()
- try:
- while True:
- version, import_notes, result = _pickle.load(_sys.stdin)
- if hasattr(version, 'decode'):
- version = version.decode('latin-1')
- struct.append((version, import_notes, result))
- except EOFError:
- pass
-
- if plain:
- write_plain(plain, struct)
-
- if table:
- write_table(table, struct)
-
-
-if __name__ == '__main__':
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/BENCHMARKS b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/BENCHMARKS
deleted file mode 100644
index 9a49e9b51bf..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/BENCHMARKS
+++ /dev/null
@@ -1,61 +0,0 @@
-$ python3.4 -OO bench/main.py bench/*.css
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.4.2
-
-Benchmarking 'bench/wikipedia.css'... (81.0 KiB)
- Timing cssmin ... ( 49.4 KiB *) 163.11 ms
- Timing rcssmin ... ( 49.6 KiB >) 45.48 ms (factor: 3.59)
- Timing _rcssmin ... ( 49.6 KiB >) 0.43 ms (factor: 378.93, 105.66)
-
-Benchmarking 'bench/wikipedia.min.css'... (49.4 KiB)
- Timing cssmin ... ( 49.4 KiB *) 119.00 ms
- Timing rcssmin ... ( 49.4 KiB =) 20.94 ms (factor: 5.68)
- Timing _rcssmin ... ( 49.4 KiB =) 0.26 ms (factor: 454.45, 79.98)
-
-
-$ python3.3 -OO bench/main.py bench/*.css
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.3.5
-
-Benchmarking 'bench/wikipedia.css'... (81.0 KiB)
- Timing cssmin ... ( 49.4 KiB *) 185.01 ms
- Timing rcssmin ... ( 49.6 KiB >) 59.30 ms (factor: 3.12)
- Timing _rcssmin ... ( 49.6 KiB >) 0.52 ms (factor: 356.38, 114.23)
-
-Benchmarking 'bench/wikipedia.min.css'... (49.4 KiB)
- Timing cssmin ... ( 49.4 KiB *) 136.26 ms
- Timing rcssmin ... ( 49.4 KiB =) 25.51 ms (factor: 5.34)
- Timing _rcssmin ... ( 49.4 KiB =) 0.26 ms (factor: 515.24, 96.47)
-
-
-$ python3.2 -OO bench/main.py bench/*.css
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.2.5
-
-Benchmarking 'bench/wikipedia.css'... (81.0 KiB)
- Timing cssmin ... ( 49.4 KiB *) 225.32 ms
- Timing rcssmin ... ( 49.6 KiB >) 57.51 ms (factor: 3.92)
- Timing _rcssmin ... ( 49.6 KiB >) 0.43 ms (factor: 527.98, 134.77)
-
-Benchmarking 'bench/wikipedia.min.css'... (49.4 KiB)
- Timing cssmin ... ( 49.4 KiB *) 129.43 ms
- Timing rcssmin ... ( 49.4 KiB =) 24.45 ms (factor: 5.29)
- Timing _rcssmin ... ( 49.4 KiB =) 0.25 ms (factor: 526.94, 99.55)
-
-
-$ python2.7 -OO bench/main.py bench/*.css
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 2.7.7
-
-Benchmarking 'bench/wikipedia.css'... (81.0 KiB)
- Timing cssmin ... ( 49.4 KiB *) 175.98 ms
- Timing rcssmin ... ( 49.6 KiB >) 46.22 ms (factor: 3.81)
- Timing _rcssmin ... ( 49.6 KiB >) 0.45 ms (factor: 390.95, 102.68)
-
-Benchmarking 'bench/wikipedia.min.css'... (49.4 KiB)
- Timing cssmin ... ( 49.4 KiB *) 126.19 ms
- Timing rcssmin ... ( 49.4 KiB =) 19.92 ms (factor: 6.33)
- Timing _rcssmin ... ( 49.4 KiB =) 0.27 ms (factor: 469.78, 74.17)
-
-
-# vim: nowrap
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CHANGES b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CHANGES
deleted file mode 100644
index e179dce99dd..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CHANGES
+++ /dev/null
@@ -1,42 +0,0 @@
-Changes with version 1.0.5
-
- *) Added support for pypy 2.2
-
- *) Updated benchmarks
-
- *) Relint with newer pylint
-
- *) Fix locale problem with the setup script on python3.
- Submitted by https://github.com/svenstaro
-
-
-Changes with version 1.0.4
-
- *) Documentation and benchmark updates
-
-
-Changes with version 1.0.3
-
- *) Added support for the following grouping @-rules:
- @supports, @document, @keyframes
-
- *) Added support for Python 3.4 and Jython 2.7
-
-
-Changes with version 1.0.2
-
- *) Added compat option to setup.py supporting the pip installer
-
- *) Added support for pypy (1.9, 2.0)
-
- *) Added support for jython (2.5)
-
-
-Changes with version 1.0.1
-
- *) Added support for Python 3.3
-
-
-Changes with version 1.0.0
-
- *) First stable release.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CLASSIFIERS b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CLASSIFIERS
deleted file mode 100644
index 10d59650380..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/CLASSIFIERS
+++ /dev/null
@@ -1,19 +0,0 @@
-Development Status :: 5 - Production/Stable
-Environment :: Web Environment
-Intended Audience :: Developers
-License :: OSI Approved
-License :: OSI Approved :: Apache License, Version 2.0
-Operating System :: OS Independent
-Programming Language :: C
-Programming Language :: Python
-Programming Language :: Python :: 2
-Programming Language :: Python :: 3
-Programming Language :: Python :: Implementation :: CPython
-Programming Language :: Python :: Implementation :: Jython
-Programming Language :: Python :: Implementation :: PyPy
-Topic :: Internet :: WWW/HTTP :: Dynamic Content
-Topic :: Software Development :: Libraries
-Topic :: Software Development :: Libraries :: Python Modules
-Topic :: Text Processing
-Topic :: Text Processing :: Filters
-Topic :: Utilities
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/DESCRIPTION b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/DESCRIPTION
deleted file mode 100644
index b51a7fdb837..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/DESCRIPTION
+++ /dev/null
@@ -1,85 +0,0 @@
-==============
- CSS Minifier
-==============
-
-RCSSmin is a CSS minifier.
-
-The minifier is based on the semantics of the `YUI compressor`_\, which itself
-is based on `the rule list by Isaac Schlueter`_\.
-
-This module is a re-implementation aiming for speed instead of maximum
-compression, so it can be used at runtime (rather than during a preprocessing
-step). RCSSmin does syntactical compression only (removing spaces, comments
-and possibly semicolons). It does not provide semantic compression (like
-removing empty blocks, collapsing redundant properties etc). It does, however,
-support various CSS hacks (by keeping them working as intended).
-
-Here's a feature list:
-
-- Strings are kept, except that escaped newlines are stripped
-- Space/Comments before the very end or before various characters are
- stripped: ``:{});=>+],!`` (The colon (``:``) is a special case, a single
- space is kept if it's outside a ruleset.)
-- Space/Comments at the very beginning or after various characters are
- stripped: ``{}(=:>+[,!``
-- Optional space after unicode escapes is kept, resp. replaced by a simple
- space
-- whitespaces inside ``url()`` definitions are stripped
-- Comments starting with an exclamation mark (``!``) can be kept optionally.
-- All other comments and/or whitespace characters are replaced by a single
- space.
-- Multiple consecutive semicolons are reduced to one
-- The last semicolon within a ruleset is stripped
-- CSS Hacks supported:
-
- - IE7 hack (``>/**/``)
- - Mac-IE5 hack (``/*\*/.../**/``)
- - The boxmodelhack is supported naturally because it relies on valid CSS2
- strings
- - Between ``:first-line`` and the following comma or curly brace a space is
- inserted. (apparently it's needed for IE6)
- - Same for ``:first-letter``
-
-rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
-factor 100 or so (depending on the input). docs/BENCHMARKS in the source
-distribution contains the details.
-
-Both python 2 (>= 2.4) and python 3 are supported.
-
-.. _YUI compressor: https://github.com/yui/yuicompressor/
-
-.. _the rule list by Isaac Schlueter: https://github.com/isaacs/cssmin/
-
-
-Copyright and License
-~~~~~~~~~~~~~~~~~~~~~
-
-Copyright 2011 - 2014
-André Malo or his licensors, as applicable.
-
-The whole package (except for the files in the bench/ directory) is
-distributed under the Apache License Version 2.0. You'll find a copy in the
-root directory of the distribution or online at:
-<http://www.apache.org/licenses/LICENSE-2.0>.
-
-
-Bugs
-~~~~
-
-No bugs, of course. ;-)
-But if you've found one or have an idea how to improve rcssmin, feel free
-to send a pull request on `github <https://github.com/ndparker/rcssmin>`_
-or send a mail to <rcssmin-bugs@perlig.de>.
-
-
-Author Information
-~~~~~~~~~~~~~~~~~~
-
-André "nd" Malo <nd perlig.de>
-GPG: 0x8103A37E
-
-
- If God intended people to be naked, they would be born that way.
- -- Oscar Wilde
-
-.. vim:tw=72 syntax=rest
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/PROVIDES b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/PROVIDES
deleted file mode 100644
index d6d4e9ebe93..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/PROVIDES
+++ /dev/null
@@ -1 +0,0 @@
-rcssmin (1.0)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/SUMMARY b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/SUMMARY
deleted file mode 100644
index 490e5373442..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/SUMMARY
+++ /dev/null
@@ -1 +0,0 @@
-CSS Minifier
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/api-objects.txt b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/api-objects.txt
deleted file mode 100644
index f4ed223ee65..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/api-objects.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-rcssmin rcssmin-module.html
-rcssmin.__license__ rcssmin-module.html#__license__
-rcssmin._make_cssmin rcssmin-module.html#_make_cssmin
-rcssmin.__doc__ rcssmin-module.html#__doc__
-rcssmin.__package__ rcssmin-module.html#__package__
-rcssmin.cssmin rcssmin-module.html#cssmin
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/crarr.png b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/crarr.png
deleted file mode 100644
index 26b43c52433..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/crarr.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.css b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.css
deleted file mode 100644
index 86d41706824..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.css
+++ /dev/null
@@ -1,322 +0,0 @@
-
-
-/* Epydoc CSS Stylesheet
- *
- * This stylesheet can be used to customize the appearance of epydoc's
- * HTML output.
- *
- */
-
-/* Default Colors & Styles
- * - Set the default foreground & background color with 'body'; and
- * link colors with 'a:link' and 'a:visited'.
- * - Use bold for decision list terms.
- * - The heading styles defined here are used for headings *within*
- * docstring descriptions. All headings used by epydoc itself use
- * either class='epydoc' or class='toc' (CSS styles for both
- * defined below).
- */
-body { background: #ffffff; color: #000000; }
-p { margin-top: 0.5em; margin-bottom: 0.5em; }
-a:link { color: #0000ff; }
-a:visited { color: #204080; }
-dt { font-weight: bold; }
-h1 { font-size: +140%; font-style: italic;
- font-weight: bold; }
-h2 { font-size: +125%; font-style: italic;
- font-weight: bold; }
-h3 { font-size: +110%; font-style: italic;
- font-weight: normal; }
-code { font-size: 100%; }
-/* N.B.: class, not pseudoclass */
-a.link { font-family: monospace; }
-
-/* Page Header & Footer
- * - The standard page header consists of a navigation bar (with
- * pointers to standard pages such as 'home' and 'trees'); a
- * breadcrumbs list, which can be used to navigate to containing
- * classes or modules; options links, to show/hide private
- * variables and to show/hide frames; and a page title (using
- * <h1>). The page title may be followed by a link to the
- * corresponding source code (using 'span.codelink').
- * - The footer consists of a navigation bar, a timestamp, and a
- * pointer to epydoc's homepage.
- */
-h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
-h2.epydoc { font-size: +130%; font-weight: bold; }
-h3.epydoc { font-size: +115%; font-weight: bold;
- margin-top: 0.2em; }
-td h3.epydoc { font-size: +115%; font-weight: bold;
- margin-bottom: 0; }
-table.navbar { background: #a0c0ff; color: #000000;
- border: 2px groove #c0d0d0; }
-table.navbar table { color: #000000; }
-th.navbar-select { background: #70b0ff;
- color: #000000; }
-table.navbar a { text-decoration: none; }
-table.navbar a:link { color: #0000ff; }
-table.navbar a:visited { color: #204080; }
-span.breadcrumbs { font-size: 85%; font-weight: bold; }
-span.options { font-size: 70%; }
-span.codelink { font-size: 85%; }
-td.footer { font-size: 85%; }
-
-/* Table Headers
- * - Each summary table and details section begins with a 'header'
- * row. This row contains a section title (marked by
- * 'span.table-header') as well as a show/hide private link
- * (marked by 'span.options', defined above).
- * - Summary tables that contain user-defined groups mark those
- * groups using 'group header' rows.
- */
-td.table-header { background: #70b0ff; color: #000000;
- border: 1px solid #608090; }
-td.table-header table { color: #000000; }
-td.table-header table a:link { color: #0000ff; }
-td.table-header table a:visited { color: #204080; }
-span.table-header { font-size: 120%; font-weight: bold; }
-th.group-header { background: #c0e0f8; color: #000000;
- text-align: left; font-style: italic;
- font-size: 115%;
- border: 1px solid #608090; }
-
-/* Summary Tables (functions, variables, etc)
- * - Each object is described by a single row of the table with
- * two cells. The left cell gives the object's type, and is
- * marked with 'code.summary-type'. The right cell gives the
- * object's name and a summary description.
- * - CSS styles for the table's header and group headers are
- * defined above, under 'Table Headers'
- */
-table.summary { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090;
- margin-bottom: 0.5em; }
-td.summary { border: 1px solid #608090; }
-code.summary-type { font-size: 85%; }
-table.summary a:link { color: #0000ff; }
-table.summary a:visited { color: #204080; }
-
-
-/* Details Tables (functions, variables, etc)
- * - Each object is described in its own div.
- * - A single-row summary table w/ table-header is used as
- * a header for each details section (CSS style for table-header
- * is defined above, under 'Table Headers').
- */
-table.details { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090;
- margin: .2em 0 0 0; }
-table.details table { color: #000000; }
-table.details a:link { color: #0000ff; }
-table.details a:visited { color: #204080; }
-
-/* Fields */
-dl.fields { margin-left: 2em; margin-top: 1em;
- margin-bottom: 1em; }
-dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
-dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
-div.fields { margin-left: 2em; }
-div.fields p { margin-bottom: 0.5em; }
-
-/* Index tables (identifier index, term index, etc)
- * - link-index is used for indices containing lists of links
- * (namely, the identifier index & term index).
- * - index-where is used in link indices for the text indicating
- * the container/source for each link.
- * - metadata-index is used for indices containing metadata
- * extracted from fields (namely, the bug index & todo index).
- */
-table.link-index { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090; }
-td.link-index { border-width: 0px; }
-table.link-index a:link { color: #0000ff; }
-table.link-index a:visited { color: #204080; }
-span.index-where { font-size: 70%; }
-table.metadata-index { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090;
- margin: .2em 0 0 0; }
-td.metadata-index { border-width: 1px; border-style: solid; }
-table.metadata-index a:link { color: #0000ff; }
-table.metadata-index a:visited { color: #204080; }
-
-/* Function signatures
- * - sig* is used for the signature in the details section.
- * - .summary-sig* is used for the signature in the summary
- * table, and when listing property accessor functions.
- * */
-.sig-name { color: #006080; }
-.sig-arg { color: #008060; }
-.sig-default { color: #602000; }
-.summary-sig { font-family: monospace; }
-.summary-sig-name { color: #006080; font-weight: bold; }
-table.summary a.summary-sig-name:link
- { color: #006080; font-weight: bold; }
-table.summary a.summary-sig-name:visited
- { color: #006080; font-weight: bold; }
-.summary-sig-arg { color: #006040; }
-.summary-sig-default { color: #501800; }
-
-/* Subclass list
- */
-ul.subclass-list { display: inline; }
-ul.subclass-list li { display: inline; }
-
-/* To render variables, classes etc. like functions */
-table.summary .summary-name { color: #006080; font-weight: bold;
- font-family: monospace; }
-table.summary
- a.summary-name:link { color: #006080; font-weight: bold;
- font-family: monospace; }
-table.summary
- a.summary-name:visited { color: #006080; font-weight: bold;
- font-family: monospace; }
-
-/* Variable values
- * - In the 'variable details' sections, each varaible's value is
- * listed in a 'pre.variable' box. The width of this box is
- * restricted to 80 chars; if the value's repr is longer than
- * this it will be wrapped, using a backslash marked with
- * class 'variable-linewrap'. If the value's repr is longer
- * than 3 lines, the rest will be ellided; and an ellipsis
- * marker ('...' marked with 'variable-ellipsis') will be used.
- * - If the value is a string, its quote marks will be marked
- * with 'variable-quote'.
- * - If the variable is a regexp, it is syntax-highlighted using
- * the re* CSS classes.
- */
-pre.variable { padding: .5em; margin: 0;
- background: #dce4ec; color: #000000;
- border: 1px solid #708890; }
-.variable-linewrap { color: #604000; font-weight: bold; }
-.variable-ellipsis { color: #604000; font-weight: bold; }
-.variable-quote { color: #604000; font-weight: bold; }
-.variable-group { color: #008000; font-weight: bold; }
-.variable-op { color: #604000; font-weight: bold; }
-.variable-string { color: #006030; }
-.variable-unknown { color: #a00000; font-weight: bold; }
-.re { color: #000000; }
-.re-char { color: #006030; }
-.re-op { color: #600000; }
-.re-group { color: #003060; }
-.re-ref { color: #404040; }
-
-/* Base tree
- * - Used by class pages to display the base class hierarchy.
- */
-pre.base-tree { font-size: 80%; margin: 0; }
-
-/* Frames-based table of contents headers
- * - Consists of two frames: one for selecting modules; and
- * the other listing the contents of the selected module.
- * - h1.toc is used for each frame's heading
- * - h2.toc is used for subheadings within each frame.
- */
-h1.toc { text-align: center; font-size: 105%;
- margin: 0; font-weight: bold;
- padding: 0; }
-h2.toc { font-size: 100%; font-weight: bold;
- margin: 0.5em 0 0 -0.3em; }
-
-/* Syntax Highlighting for Source Code
- * - doctest examples are displayed in a 'pre.py-doctest' block.
- * If the example is in a details table entry, then it will use
- * the colors specified by the 'table pre.py-doctest' line.
- * - Source code listings are displayed in a 'pre.py-src' block.
- * Each line is marked with 'span.py-line' (used to draw a line
- * down the left margin, separating the code from the line
- * numbers). Line numbers are displayed with 'span.py-lineno'.
- * The expand/collapse block toggle button is displayed with
- * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
- * modify the font size of the text.)
- * - If a source code page is opened with an anchor, then the
- * corresponding code block will be highlighted. The code
- * block's header is highlighted with 'py-highlight-hdr'; and
- * the code block's body is highlighted with 'py-highlight'.
- * - The remaining py-* classes are used to perform syntax
- * highlighting (py-string for string literals, py-name for names,
- * etc.)
- */
-pre.py-doctest { padding: .5em; margin: 1em;
- background: #e8f0f8; color: #000000;
- border: 1px solid #708890; }
-table pre.py-doctest { background: #dce4ec;
- color: #000000; }
-pre.py-src { border: 2px solid #000000;
- background: #f0f0f0; color: #000000; }
-.py-line { border-left: 2px solid #000000;
- margin-left: .2em; padding-left: .4em; }
-.py-lineno { font-style: italic; font-size: 90%;
- padding-left: .5em; }
-a.py-toggle { text-decoration: none; }
-div.py-highlight-hdr { border-top: 2px solid #000000;
- border-bottom: 2px solid #000000;
- background: #d8e8e8; }
-div.py-highlight { border-bottom: 2px solid #000000;
- background: #d0e0e0; }
-.py-prompt { color: #005050; font-weight: bold;}
-.py-more { color: #005050; font-weight: bold;}
-.py-string { color: #006030; }
-.py-comment { color: #003060; }
-.py-keyword { color: #600000; }
-.py-output { color: #404040; }
-.py-name { color: #000050; }
-.py-name:link { color: #000050 !important; }
-.py-name:visited { color: #000050 !important; }
-.py-number { color: #005000; }
-.py-defname { color: #000060; font-weight: bold; }
-.py-def-name { color: #000060; font-weight: bold; }
-.py-base-class { color: #000060; }
-.py-param { color: #000060; }
-.py-docstring { color: #006030; }
-.py-decorator { color: #804020; }
-/* Use this if you don't want links to names underlined: */
-/*a.py-name { text-decoration: none; }*/
-
-/* Graphs & Diagrams
- * - These CSS styles are used for graphs & diagrams generated using
- * Graphviz dot. 'img.graph-without-title' is used for bare
- * diagrams (to remove the border created by making the image
- * clickable).
- */
-img.graph-without-title { border: none; }
-img.graph-with-title { border: 1px solid #000000; }
-span.graph-title { font-weight: bold; }
-span.graph-caption { }
-
-/* General-purpose classes
- * - 'p.indent-wrapped-lines' defines a paragraph whose first line
- * is not indented, but whose subsequent lines are.
- * - The 'nomargin-top' class is used to remove the top margin (e.g.
- * from lists). The 'nomargin' class is used to remove both the
- * top and bottom margin (but not the left or right margin --
- * for lists, that would cause the bullets to disappear.)
- */
-p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
- margin: 0; }
-.nomargin-top { margin-top: 0; }
-.nomargin { margin-top: 0; margin-bottom: 0; }
-
-/* HTML Log */
-div.log-block { padding: 0; margin: .5em 0 .5em 0;
- background: #e8f0f8; color: #000000;
- border: 1px solid #000000; }
-div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
- background: #ffb0b0; color: #000000;
- border: 1px solid #000000; }
-div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
- background: #ffffb0; color: #000000;
- border: 1px solid #000000; }
-div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
- background: #b0ffb0; color: #000000;
- border: 1px solid #000000; }
-h2.log-hdr { background: #70b0ff; color: #000000;
- margin: 0; padding: 0em 0.5em 0em 0.5em;
- border-bottom: 1px solid #000000; font-size: 110%; }
-p.log { font-weight: bold; margin: .5em 0 .5em 0; }
-tr.opt-changed { color: #000000; font-weight: bold; }
-tr.opt-default { color: #606060; }
-pre.log { margin: 0; padding: 0; padding-left: 1em; }
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.js
deleted file mode 100644
index e787dbcf471..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/epydoc.js
+++ /dev/null
@@ -1,293 +0,0 @@
-function toggle_private() {
- // Search for any private/public links on this page. Store
- // their old text in "cmd," so we will know what action to
- // take; and change their text to the opposite action.
- var cmd = "?";
- var elts = document.getElementsByTagName("a");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "privatelink") {
- cmd = elts[i].innerHTML;
- elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
- "hide&nbsp;private":"show&nbsp;private");
- }
- }
- // Update all DIVs containing private objects.
- var elts = document.getElementsByTagName("div");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
- }
- else if (elts[i].className == "public") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
- }
- }
- // Update all table rows containing private objects. Note, we
- // use "" instead of "block" becaue IE & firefox disagree on what
- // this should be (block vs table-row), and "" just gives the
- // default for both browsers.
- var elts = document.getElementsByTagName("tr");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
- }
- }
- // Update all list items containing private objects.
- var elts = document.getElementsByTagName("li");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
- "none":"");
- }
- }
- // Update all list items containing private objects.
- var elts = document.getElementsByTagName("ul");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
- }
- }
- // Set a cookie to remember the current option.
- document.cookie = "EpydocPrivate="+cmd;
- }
-function show_private() {
- var elts = document.getElementsByTagName("a");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "privatelink") {
- cmd = elts[i].innerHTML;
- if (cmd && cmd.substr(0,4)=="show")
- toggle_private();
- }
- }
- }
-function getCookie(name) {
- var dc = document.cookie;
- var prefix = name + "=";
- var begin = dc.indexOf("; " + prefix);
- if (begin == -1) {
- begin = dc.indexOf(prefix);
- if (begin != 0) return null;
- } else
- { begin += 2; }
- var end = document.cookie.indexOf(";", begin);
- if (end == -1)
- { end = dc.length; }
- return unescape(dc.substring(begin + prefix.length, end));
- }
-function setFrame(url1, url2) {
- parent.frames[1].location.href = url1;
- parent.frames[2].location.href = url2;
- }
-function checkCookie() {
- var cmd=getCookie("EpydocPrivate");
- if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
- toggle_private();
- }
-function toggleCallGraph(id) {
- var elt = document.getElementById(id);
- if (elt.style.display == "none")
- elt.style.display = "block";
- else
- elt.style.display = "none";
- }
-function expand(id) {
- var elt = document.getElementById(id+"-expanded");
- if (elt) elt.style.display = "block";
- var elt = document.getElementById(id+"-expanded-linenums");
- if (elt) elt.style.display = "block";
- var elt = document.getElementById(id+"-collapsed");
- if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
- var elt = document.getElementById(id+"-collapsed-linenums");
- if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
- var elt = document.getElementById(id+"-toggle");
- if (elt) { elt.innerHTML = "-"; }
-}
-
-function collapse(id) {
- var elt = document.getElementById(id+"-expanded");
- if (elt) elt.style.display = "none";
- var elt = document.getElementById(id+"-expanded-linenums");
- if (elt) elt.style.display = "none";
- var elt = document.getElementById(id+"-collapsed-linenums");
- if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
- var elt = document.getElementById(id+"-toggle");
- if (elt) { elt.innerHTML = "+"; }
- var elt = document.getElementById(id+"-collapsed");
- if (elt) {
- elt.style.display = "block";
-
- var indent = elt.getAttribute("indent");
- var pad = elt.getAttribute("pad");
- var s = "<tt class='py-lineno'>";
- for (var i=0; i<pad.length; i++) { s += "&nbsp;" }
- s += "</tt>";
- s += "&nbsp;&nbsp;<tt class='py-line'>";
- for (var i=0; i<indent.length; i++) { s += "&nbsp;" }
- s += "<a href='#' onclick='expand(\"" + id;
- s += "\");return false'>...</a></tt><br />";
- elt.innerHTML = s;
- }
-}
-
-function toggle(id) {
- elt = document.getElementById(id+"-toggle");
- if (elt.innerHTML == "-")
- collapse(id);
- else
- expand(id);
- return false;
-}
-
-function highlight(id) {
- var elt = document.getElementById(id+"-def");
- if (elt) elt.className = "py-highlight-hdr";
- var elt = document.getElementById(id+"-expanded");
- if (elt) elt.className = "py-highlight";
- var elt = document.getElementById(id+"-collapsed");
- if (elt) elt.className = "py-highlight";
-}
-
-function num_lines(s) {
- var n = 1;
- var pos = s.indexOf("\n");
- while ( pos > 0) {
- n += 1;
- pos = s.indexOf("\n", pos+1);
- }
- return n;
-}
-
-// Collapse all blocks that mave more than `min_lines` lines.
-function collapse_all(min_lines) {
- var elts = document.getElementsByTagName("div");
- for (var i=0; i<elts.length; i++) {
- var elt = elts[i];
- var split = elt.id.indexOf("-");
- if (split > 0)
- if (elt.id.substring(split, elt.id.length) == "-expanded")
- if (num_lines(elt.innerHTML) > min_lines)
- collapse(elt.id.substring(0, split));
- }
-}
-
-function expandto(href) {
- var start = href.indexOf("#")+1;
- if (start != 0 && start != href.length) {
- if (href.substring(start, href.length) != "-") {
- collapse_all(4);
- pos = href.indexOf(".", start);
- while (pos != -1) {
- var id = href.substring(start, pos);
- expand(id);
- pos = href.indexOf(".", pos+1);
- }
- var id = href.substring(start, href.length);
- expand(id);
- highlight(id);
- }
- }
-}
-
-function kill_doclink(id) {
- var parent = document.getElementById(id);
- parent.removeChild(parent.childNodes.item(0));
-}
-function auto_kill_doclink(ev) {
- if (!ev) var ev = window.event;
- if (!this.contains(ev.toElement)) {
- var parent = document.getElementById(this.parentID);
- parent.removeChild(parent.childNodes.item(0));
- }
-}
-
-function doclink(id, name, targets_id) {
- var elt = document.getElementById(id);
-
- // If we already opened the box, then destroy it.
- // (This case should never occur, but leave it in just in case.)
- if (elt.childNodes.length > 1) {
- elt.removeChild(elt.childNodes.item(0));
- }
- else {
- // The outer box: relative + inline positioning.
- var box1 = document.createElement("div");
- box1.style.position = "relative";
- box1.style.display = "inline";
- box1.style.top = 0;
- box1.style.left = 0;
-
- // A shadow for fun
- var shadow = document.createElement("div");
- shadow.style.position = "absolute";
- shadow.style.left = "-1.3em";
- shadow.style.top = "-1.3em";
- shadow.style.background = "#404040";
-
- // The inner box: absolute positioning.
- var box2 = document.createElement("div");
- box2.style.position = "relative";
- box2.style.border = "1px solid #a0a0a0";
- box2.style.left = "-.2em";
- box2.style.top = "-.2em";
- box2.style.background = "white";
- box2.style.padding = ".3em .4em .3em .4em";
- box2.style.fontStyle = "normal";
- box2.onmouseout=auto_kill_doclink;
- box2.parentID = id;
-
- // Get the targets
- var targets_elt = document.getElementById(targets_id);
- var targets = targets_elt.getAttribute("targets");
- var links = "";
- target_list = targets.split(",");
- for (var i=0; i<target_list.length; i++) {
- var target = target_list[i].split("=");
- links += "<li><a href='" + target[1] +
- "' style='text-decoration:none'>" +
- target[0] + "</a></li>";
- }
-
- // Put it all together.
- elt.insertBefore(box1, elt.childNodes.item(0));
- //box1.appendChild(box2);
- box1.appendChild(shadow);
- shadow.appendChild(box2);
- box2.innerHTML =
- "Which <b>"+name+"</b> do you want to see documentation for?" +
- "<ul style='margin-bottom: 0;'>" +
- links +
- "<li><a href='#' style='text-decoration:none' " +
- "onclick='kill_doclink(\""+id+"\");return false;'>"+
- "<i>None of the above</i></a></li></ul>";
- }
- return false;
-}
-
-function get_anchor() {
- var href = location.href;
- var start = href.indexOf("#")+1;
- if ((start != 0) && (start != href.length))
- return href.substring(start, href.length);
- }
-function redirect_url(dottedName) {
- // Scan through each element of the "pages" list, and check
- // if "name" matches with any of them.
- for (var i=0; i<pages.length; i++) {
-
- // Each page has the form "<pagename>-m" or "<pagename>-c";
- // extract the <pagename> portion & compare it to dottedName.
- var pagename = pages[i].substring(0, pages[i].length-2);
- if (pagename == dottedName.substring(0,pagename.length)) {
-
- // We've found a page that matches `dottedName`;
- // construct its URL, using leftover `dottedName`
- // content to form an anchor.
- var pagetype = pages[i].charAt(pages[i].length-1);
- var url = pagename + ((pagetype=="m")?"-module.html":
- "-class.html");
- if (dottedName.length > pagename.length)
- url += "#" + dottedName.substring(pagename.length+1,
- dottedName.length);
- return url;
- }
- }
- }
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/help.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/help.html
deleted file mode 100644
index d1bf1c8766d..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/help.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Help</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rcssmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">&nbsp;</td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-
-<h1 class="epydoc"> API Documentation </h1>
-
-<p> This document contains the API (Application Programming Interface)
-documentation for this project. Documentation for the Python
-objects defined by the project is divided into separate pages for each
-package, module, and class. The API documentation also includes two
-pages containing information about the project as a whole: a trees
-page, and an index page. </p>
-
-<h2> Object Documentation </h2>
-
- <p>Each <strong>Package Documentation</strong> page contains: </p>
- <ul>
- <li> A description of the package. </li>
- <li> A list of the modules and sub-packages contained by the
- package. </li>
- <li> A summary of the classes defined by the package. </li>
- <li> A summary of the functions defined by the package. </li>
- <li> A summary of the variables defined by the package. </li>
- <li> A detailed description of each function defined by the
- package. </li>
- <li> A detailed description of each variable defined by the
- package. </li>
- </ul>
-
- <p>Each <strong>Module Documentation</strong> page contains:</p>
- <ul>
- <li> A description of the module. </li>
- <li> A summary of the classes defined by the module. </li>
- <li> A summary of the functions defined by the module. </li>
- <li> A summary of the variables defined by the module. </li>
- <li> A detailed description of each function defined by the
- module. </li>
- <li> A detailed description of each variable defined by the
- module. </li>
- </ul>
-
- <p>Each <strong>Class Documentation</strong> page contains: </p>
- <ul>
- <li> A class inheritance diagram. </li>
- <li> A list of known subclasses. </li>
- <li> A description of the class. </li>
- <li> A summary of the methods defined by the class. </li>
- <li> A summary of the instance variables defined by the class. </li>
- <li> A summary of the class (static) variables defined by the
- class. </li>
- <li> A detailed description of each method defined by the
- class. </li>
- <li> A detailed description of each instance variable defined by the
- class. </li>
- <li> A detailed description of each class (static) variable defined
- by the class. </li>
- </ul>
-
-<h2> Project Documentation </h2>
-
- <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
- <ul>
- <li> The <em>module hierarchy</em> lists every package and module, with
- modules grouped into packages. At the top level, and within each
- package, modules and sub-packages are listed alphabetically. </li>
- <li> The <em>class hierarchy</em> lists every class, grouped by base
- class. If a class has more than one base class, then it will be
- listed under each base class. At the top level, and under each base
- class, classes are listed alphabetically. </li>
- </ul>
-
- <p> The <strong>Index</strong> page contains indices of terms and
- identifiers: </p>
- <ul>
- <li> The <em>term index</em> lists every term indexed by any object's
- documentation. For each term, the index provides links to each
- place where the term is indexed. </li>
- <li> The <em>identifier index</em> lists the (short) name of every package,
- module, class, method, function, variable, and parameter. For each
- identifier, the index provides a short description, and a link to
- its documentation. </li>
- </ul>
-
-<h2> The Table of Contents </h2>
-
-<p> The table of contents occupies the two frames on the left side of
-the window. The upper-left frame displays the <em>project
-contents</em>, and the lower-left frame displays the <em>module
-contents</em>: </p>
-
-<table class="help summary" border="1" cellspacing="0" cellpadding="3">
- <tr style="height: 30%">
- <td align="center" style="font-size: small">
- Project<br />Contents<hr />...</td>
- <td align="center" style="font-size: small" rowspan="2" width="70%">
- API<br />Documentation<br />Frame<br /><br /><br />
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size: small">
- Module<br />Contents<hr />&nbsp;<br />...<br />&nbsp;
- </td>
- </tr>
-</table><br />
-
-<p> The <strong>project contents frame</strong> contains a list of all packages
-and modules that are defined by the project. Clicking on an entry
-will display its contents in the module contents frame. Clicking on a
-special entry, labeled "Everything," will display the contents of
-the entire project. </p>
-
-<p> The <strong>module contents frame</strong> contains a list of every
-submodule, class, type, exception, function, and variable defined by a
-module or package. Clicking on an entry will display its
-documentation in the API documentation frame. Clicking on the name of
-the module, at the top of the frame, will display the documentation
-for the module itself. </p>
-
-<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
-navigation bar can be used to control whether the table of contents is
-displayed or not. </p>
-
-<h2> The Navigation Bar </h2>
-
-<p> A navigation bar is located at the top and bottom of every page.
-It indicates what type of page you are currently viewing, and allows
-you to go to related pages. The following table describes the labels
-on the navigation bar. Note that not some labels (such as
-[Parent]) are not displayed on all pages. </p>
-
-<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
-<tr class="summary">
- <th>Label</th>
- <th>Highlighted when...</th>
- <th>Links to...</th>
-</tr>
- <tr><td valign="top"><strong>[Parent]</strong></td>
- <td valign="top"><em>(never highlighted)</em></td>
- <td valign="top"> the parent of the current package </td></tr>
- <tr><td valign="top"><strong>[Package]</strong></td>
- <td valign="top">viewing a package</td>
- <td valign="top">the package containing the current object
- </td></tr>
- <tr><td valign="top"><strong>[Module]</strong></td>
- <td valign="top">viewing a module</td>
- <td valign="top">the module containing the current object
- </td></tr>
- <tr><td valign="top"><strong>[Class]</strong></td>
- <td valign="top">viewing a class </td>
- <td valign="top">the class containing the current object</td></tr>
- <tr><td valign="top"><strong>[Trees]</strong></td>
- <td valign="top">viewing the trees page</td>
- <td valign="top"> the trees page </td></tr>
- <tr><td valign="top"><strong>[Index]</strong></td>
- <td valign="top">viewing the index page</td>
- <td valign="top"> the index page </td></tr>
- <tr><td valign="top"><strong>[Help]</strong></td>
- <td valign="top">viewing the help page</td>
- <td valign="top"> the help page </td></tr>
-</table>
-
-<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
-the top navigation bar can be used to control whether documentation
-for private objects is displayed. Private objects are usually defined
-as objects whose (short) names begin with a single underscore, but do
-not end with an underscore. For example, "<code>_x</code>",
-"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
-are private objects; but "<code>re.sub</code>",
-"<code>__init__</code>", and "<code>type_</code>" are not. However,
-if a module defines the "<code>__all__</code>" variable, then its
-contents are used to decide which objects are private. </p>
-
-<p> A timestamp below the bottom navigation bar indicates when each
-page was last updated. </p>
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rcssmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/identifier-index.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/identifier-index.html
deleted file mode 100644
index 82acafdbb7c..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/identifier-index.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Identifier Index</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rcssmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">&nbsp;</td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<table border="0" width="100%">
-<tr valign="bottom"><td>
-<h1 class="epydoc">Identifier Index</h1>
-</td><td>
-[
- A
- B
- <a href="#C">C</a>
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- <a href="#R">R</a>
- S
- T
- U
- V
- W
- X
- Y
- Z
- <a href="#_">_</a>
-]
-</td></table>
-<table border="0" width="100%">
-<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="rcssmin-module.html#cssmin">cssmin()</a><br />
-<span class="index-where">(in&nbsp;<a href="rcssmin-module.html">rcssmin</a>)</span></td>
-<td width="33%" class="link-index">&nbsp;</td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="rcssmin-module.html">rcssmin</a></td>
-<td width="33%" class="link-index">&nbsp;</td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="rcssmin-module.html#__doc__">__doc__</a><br />
-<span class="index-where">(in&nbsp;<a href="rcssmin-module.html">rcssmin</a>)</span></td>
-<td width="33%" class="link-index"><a href="rcssmin-module.html#__license__">__license__</a><br />
-<span class="index-where">(in&nbsp;<a href="rcssmin-module.html">rcssmin</a>)</span></td>
-<td width="33%" class="link-index"><a href="rcssmin-module.html#__package__">__package__</a><br />
-<span class="index-where">(in&nbsp;<a href="rcssmin-module.html">rcssmin</a>)</span></td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-</table>
-<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rcssmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/index.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/index.html
deleted file mode 100644
index 84ffddda734..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/index.html
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>rcssmin</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- Module&nbsp;rcssmin
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module rcssmin</h1><p class="nomargin-top"><span class="codelink"><a href="rcssmin-pysrc.html">source&nbsp;code</a></span></p>
-<p>CSS Minifier.</p>
-<p>The minifier is based on the semantics of the <a class="rst-reference external" href="https://github.com/yui/yuicompressor/" target="_top">YUI compressor</a>, which
-itself is based on <a class="rst-reference external" href="https://github.com/isaacs/cssmin/" target="_top">the rule list by Isaac Schlueter</a>.</p>
-<p>This module is a re-implementation aiming for speed instead of maximum
-compression, so it can be used at runtime (rather than during a preprocessing
-step). RCSSmin does syntactical compression only (removing spaces, comments
-and possibly semicolons). It does not provide semantic compression (like
-removing empty blocks, collapsing redundant properties etc). It does, however,
-support various CSS hacks (by keeping them working as intended).</p>
-<p>Here's a feature list:</p>
-<ul class="rst-simple">
-<li>Strings are kept, except that escaped newlines are stripped</li>
-<li>Space/Comments before the very end or before various characters are
-stripped: <tt class="rst-docutils literal"><span class="pre">:{});=&gt;+],!</span></tt> (The colon (<tt class="rst-docutils literal">:</tt>) is a special case, a single
-space is kept if it's outside a ruleset.)</li>
-<li>Space/Comments at the very beginning or after various characters are
-stripped: <tt class="rst-docutils literal"><span class="pre">{}(=:&gt;+[,!</span></tt></li>
-<li>Optional space after unicode escapes is kept, resp. replaced by a simple
-space</li>
-<li>whitespaces inside <tt class="rst-docutils literal">url()</tt> definitions are stripped</li>
-<li>Comments starting with an exclamation mark (<tt class="rst-docutils literal">!</tt>) can be kept optionally.</li>
-<li>All other comments and/or whitespace characters are replaced by a single
-space.</li>
-<li>Multiple consecutive semicolons are reduced to one</li>
-<li>The last semicolon within a ruleset is stripped</li>
-<li>CSS Hacks supported:<ul>
-<li>IE7 hack (<tt class="rst-docutils literal"><span class="pre">&gt;/**/</span></tt>)</li>
-<li>Mac-IE5 hack (<tt class="rst-docutils literal"><span class="pre">/*\*/.../**/</span></tt>)</li>
-<li>The boxmodelhack is supported naturally because it relies on valid CSS2
-strings</li>
-<li>Between <tt class="rst-docutils literal"><span class="pre">:first-line</span></tt> and the following comma or curly brace a space is
-inserted. (apparently it's needed for IE6)</li>
-<li>Same for <tt class="rst-docutils literal"><span class="pre">:first-letter</span></tt></li>
-</ul>
-</li>
-</ul>
-<p>rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
-factor 100 or so (depending on the input). docs/BENCHMARKS in the source
-distribution contains the details.</p>
-<p>Both python 2 (&gt;= 2.4) and python 3 are supported.</p>
-
-<hr />
-<div class="fields"> <p><strong>Copyright:</strong>
- Copyright 2011 - 2014
-Andr&#233; Malo or his licensors, as applicable
- </p>
- <p><strong>License:</strong>
- <p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at</p>
-<blockquote>
-<a class="rst-reference external" href="http://www.apache.org/licenses/LICENSE-2.0" target="_top">http://www.apache.org/licenses/LICENSE-2.0</a></blockquote>
-<p>Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an &quot;AS IS&quot; 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.</p>
- </p>
- <p><strong>Version:</strong>
- 1.0.5
- </p>
- <p><strong>Author:</strong>
- Andr&#233; Malo
- </p>
-</div><!-- ==================== FUNCTIONS ==================== -->
-<a name="section-Functions"></a>
-<table class="summary" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Functions</span></td>
-</tr>
-<tr>
- <td width="15%" align="right" valign="top" class="summary">
- <span class="summary-type"><tt class="rst-docutils literal">str</tt></span>
- </td><td class="summary">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td><span class="summary-sig"><a href="rcssmin-module.html#cssmin" class="summary-sig-name">cssmin</a>(<span class="summary-sig-arg">style</span>,
- <span class="summary-sig-arg">keep_bang_comments</span>=<span class="summary-sig-default">False</span>)</span><br />
- Minify CSS.</td>
- <td align="right" valign="top">
- <span class="codelink"><a href="rcssmin-pysrc.html#cssmin">source&nbsp;code</a></span>
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table>
-<!-- ==================== FUNCTION DETAILS ==================== -->
-<a name="section-FunctionDetails"></a>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Function Details</span></td>
-</tr>
-</table>
-<a name="cssmin"></a>
-<div>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr valign="top"><td>
- <h3 class="epydoc"><span class="sig"><span class="sig-name">cssmin</span>(<span class="sig-arg">style</span>,
- <span class="sig-arg">keep_bang_comments</span>=<span class="sig-default">False</span>)</span>
- </h3>
- </td><td align="right" valign="top"
- ><span class="codelink"><a href="rcssmin-pysrc.html#cssmin">source&nbsp;code</a></span>&nbsp;
- </td>
- </tr></table>
-
- Minify CSS.
- <dl class="fields">
- <dt>Parameters:</dt>
- <dd><ul class="nomargin-top">
- <li><strong class="pname"><code>style</code></strong> (<tt class="rst-docutils literal">str</tt>) - CSS to minify</li>
- <li><strong class="pname"><code>keep_bang_comments</code></strong> (<tt class="rst-docutils literal">bool</tt>) - Keep comments starting with an exclamation mark? (<tt class="rst-docutils literal"><span class="pre">/*!...*/</span></tt>)</li>
- </ul></dd>
- <dt>Returns: <tt class="rst-docutils literal">str</tt></dt>
- <dd>Minified style</dd>
- </dl>
-</td></tr></table>
-</div>
-<br />
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/module-tree.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/module-tree.html
deleted file mode 100644
index e522dd1721b..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/module-tree.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Module Hierarchy</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rcssmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">&nbsp;</td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<h1 class="epydoc">Module Hierarchy</h1>
-<ul class="nomargin-top">
- <li> <strong class="uidlink"><a href="rcssmin-module.html">rcssmin</a></strong>: <em class="summary">CSS Minifier.</em> </li>
-</ul>
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rcssmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-module.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-module.html
deleted file mode 100644
index 84ffddda734..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-module.html
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>rcssmin</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- Module&nbsp;rcssmin
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module rcssmin</h1><p class="nomargin-top"><span class="codelink"><a href="rcssmin-pysrc.html">source&nbsp;code</a></span></p>
-<p>CSS Minifier.</p>
-<p>The minifier is based on the semantics of the <a class="rst-reference external" href="https://github.com/yui/yuicompressor/" target="_top">YUI compressor</a>, which
-itself is based on <a class="rst-reference external" href="https://github.com/isaacs/cssmin/" target="_top">the rule list by Isaac Schlueter</a>.</p>
-<p>This module is a re-implementation aiming for speed instead of maximum
-compression, so it can be used at runtime (rather than during a preprocessing
-step). RCSSmin does syntactical compression only (removing spaces, comments
-and possibly semicolons). It does not provide semantic compression (like
-removing empty blocks, collapsing redundant properties etc). It does, however,
-support various CSS hacks (by keeping them working as intended).</p>
-<p>Here's a feature list:</p>
-<ul class="rst-simple">
-<li>Strings are kept, except that escaped newlines are stripped</li>
-<li>Space/Comments before the very end or before various characters are
-stripped: <tt class="rst-docutils literal"><span class="pre">:{});=&gt;+],!</span></tt> (The colon (<tt class="rst-docutils literal">:</tt>) is a special case, a single
-space is kept if it's outside a ruleset.)</li>
-<li>Space/Comments at the very beginning or after various characters are
-stripped: <tt class="rst-docutils literal"><span class="pre">{}(=:&gt;+[,!</span></tt></li>
-<li>Optional space after unicode escapes is kept, resp. replaced by a simple
-space</li>
-<li>whitespaces inside <tt class="rst-docutils literal">url()</tt> definitions are stripped</li>
-<li>Comments starting with an exclamation mark (<tt class="rst-docutils literal">!</tt>) can be kept optionally.</li>
-<li>All other comments and/or whitespace characters are replaced by a single
-space.</li>
-<li>Multiple consecutive semicolons are reduced to one</li>
-<li>The last semicolon within a ruleset is stripped</li>
-<li>CSS Hacks supported:<ul>
-<li>IE7 hack (<tt class="rst-docutils literal"><span class="pre">&gt;/**/</span></tt>)</li>
-<li>Mac-IE5 hack (<tt class="rst-docutils literal"><span class="pre">/*\*/.../**/</span></tt>)</li>
-<li>The boxmodelhack is supported naturally because it relies on valid CSS2
-strings</li>
-<li>Between <tt class="rst-docutils literal"><span class="pre">:first-line</span></tt> and the following comma or curly brace a space is
-inserted. (apparently it's needed for IE6)</li>
-<li>Same for <tt class="rst-docutils literal"><span class="pre">:first-letter</span></tt></li>
-</ul>
-</li>
-</ul>
-<p>rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
-factor 100 or so (depending on the input). docs/BENCHMARKS in the source
-distribution contains the details.</p>
-<p>Both python 2 (&gt;= 2.4) and python 3 are supported.</p>
-
-<hr />
-<div class="fields"> <p><strong>Copyright:</strong>
- Copyright 2011 - 2014
-Andr&#233; Malo or his licensors, as applicable
- </p>
- <p><strong>License:</strong>
- <p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at</p>
-<blockquote>
-<a class="rst-reference external" href="http://www.apache.org/licenses/LICENSE-2.0" target="_top">http://www.apache.org/licenses/LICENSE-2.0</a></blockquote>
-<p>Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an &quot;AS IS&quot; 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.</p>
- </p>
- <p><strong>Version:</strong>
- 1.0.5
- </p>
- <p><strong>Author:</strong>
- Andr&#233; Malo
- </p>
-</div><!-- ==================== FUNCTIONS ==================== -->
-<a name="section-Functions"></a>
-<table class="summary" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Functions</span></td>
-</tr>
-<tr>
- <td width="15%" align="right" valign="top" class="summary">
- <span class="summary-type"><tt class="rst-docutils literal">str</tt></span>
- </td><td class="summary">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td><span class="summary-sig"><a href="rcssmin-module.html#cssmin" class="summary-sig-name">cssmin</a>(<span class="summary-sig-arg">style</span>,
- <span class="summary-sig-arg">keep_bang_comments</span>=<span class="summary-sig-default">False</span>)</span><br />
- Minify CSS.</td>
- <td align="right" valign="top">
- <span class="codelink"><a href="rcssmin-pysrc.html#cssmin">source&nbsp;code</a></span>
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table>
-<!-- ==================== FUNCTION DETAILS ==================== -->
-<a name="section-FunctionDetails"></a>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Function Details</span></td>
-</tr>
-</table>
-<a name="cssmin"></a>
-<div>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr valign="top"><td>
- <h3 class="epydoc"><span class="sig"><span class="sig-name">cssmin</span>(<span class="sig-arg">style</span>,
- <span class="sig-arg">keep_bang_comments</span>=<span class="sig-default">False</span>)</span>
- </h3>
- </td><td align="right" valign="top"
- ><span class="codelink"><a href="rcssmin-pysrc.html#cssmin">source&nbsp;code</a></span>&nbsp;
- </td>
- </tr></table>
-
- Minify CSS.
- <dl class="fields">
- <dt>Parameters:</dt>
- <dd><ul class="nomargin-top">
- <li><strong class="pname"><code>style</code></strong> (<tt class="rst-docutils literal">str</tt>) - CSS to minify</li>
- <li><strong class="pname"><code>keep_bang_comments</code></strong> (<tt class="rst-docutils literal">bool</tt>) - Keep comments starting with an exclamation mark? (<tt class="rst-docutils literal"><span class="pre">/*!...*/</span></tt>)</li>
- </ul></dd>
- <dt>Returns: <tt class="rst-docutils literal">str</tt></dt>
- <dd>Minified style</dd>
- </dl>
-</td></tr></table>
-</div>
-<br />
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-pysrc.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-pysrc.html
deleted file mode 100644
index 6856baca0e6..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/rcssmin-pysrc.html
+++ /dev/null
@@ -1,477 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>rcssmin</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- Module&nbsp;rcssmin
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<h1 class="epydoc">Source Code for <a href="rcssmin-module.html">Module rcssmin</a></h1>
-<pre class="py-src">
-<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
-<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"># -*- coding: ascii -*-</tt> </tt>
-<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring">r"""</tt> </tt>
-<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring">==============</tt> </tt>
-<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> CSS Minifier</tt> </tt>
-<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring">==============</tt> </tt>
-<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring">CSS Minifier.</tt> </tt>
-<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-docstring">The minifier is based on the semantics of the `YUI compressor`_\\, which</tt> </tt>
-<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-docstring">itself is based on `the rule list by Isaac Schlueter`_\\.</tt> </tt>
-<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring">:Copyright:</tt> </tt>
-<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-docstring"> Copyright 2011 - 2014</tt> </tt>
-<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"> Andr\xe9 Malo or his licensors, as applicable</tt> </tt>
-<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-docstring">:License:</tt> </tt>
-<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring"> Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
-<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring"> you may not use this file except in compliance with the License.</tt> </tt>
-<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-docstring"> You may obtain a copy of the License at</tt> </tt>
-<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring"> http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
-<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring"> Unless required by applicable law or agreed to in writing, software</tt> </tt>
-<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-docstring"> distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
-<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-docstring"> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
-<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-docstring"> See the License for the specific language governing permissions and</tt> </tt>
-<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-docstring"> limitations under the License.</tt> </tt>
-<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-docstring">This module is a re-implementation aiming for speed instead of maximum</tt> </tt>
-<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-docstring">compression, so it can be used at runtime (rather than during a preprocessing</tt> </tt>
-<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-docstring">step). RCSSmin does syntactical compression only (removing spaces, comments</tt> </tt>
-<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-docstring">and possibly semicolons). It does not provide semantic compression (like</tt> </tt>
-<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-docstring">removing empty blocks, collapsing redundant properties etc). It does, however,</tt> </tt>
-<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-docstring">support various CSS hacks (by keeping them working as intended).</tt> </tt>
-<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-docstring">Here's a feature list:</tt> </tt>
-<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"><tt class="py-docstring">- Strings are kept, except that escaped newlines are stripped</tt> </tt>
-<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-docstring">- Space/Comments before the very end or before various characters are</tt> </tt>
-<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-docstring"> stripped: ``:{});=&gt;+],!`` (The colon (``:``) is a special case, a single</tt> </tt>
-<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-docstring"> space is kept if it's outside a ruleset.)</tt> </tt>
-<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-docstring">- Space/Comments at the very beginning or after various characters are</tt> </tt>
-<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring"> stripped: ``{}(=:&gt;+[,!``</tt> </tt>
-<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"><tt class="py-docstring">- Optional space after unicode escapes is kept, resp. replaced by a simple</tt> </tt>
-<a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"><tt class="py-docstring"> space</tt> </tt>
-<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"><tt class="py-docstring">- whitespaces inside ``url()`` definitions are stripped</tt> </tt>
-<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-docstring">- Comments starting with an exclamation mark (``!``) can be kept optionally.</tt> </tt>
-<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"><tt class="py-docstring">- All other comments and/or whitespace characters are replaced by a single</tt> </tt>
-<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"><tt class="py-docstring"> space.</tt> </tt>
-<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"><tt class="py-docstring">- Multiple consecutive semicolons are reduced to one</tt> </tt>
-<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-docstring">- The last semicolon within a ruleset is stripped</tt> </tt>
-<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-docstring">- CSS Hacks supported:</tt> </tt>
-<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-docstring"> - IE7 hack (``&gt;/**/``)</tt> </tt>
-<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"><tt class="py-docstring"> - Mac-IE5 hack (``/*\\*/.../**/``)</tt> </tt>
-<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-docstring"> - The boxmodelhack is supported naturally because it relies on valid CSS2</tt> </tt>
-<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-docstring"> strings</tt> </tt>
-<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-docstring"> - Between ``:first-line`` and the following comma or curly brace a space is</tt> </tt>
-<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-docstring"> inserted. (apparently it's needed for IE6)</tt> </tt>
-<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-docstring"> - Same for ``:first-letter``</tt> </tt>
-<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"><tt class="py-docstring">rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to</tt> </tt>
-<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"><tt class="py-docstring">factor 100 or so (depending on the input). docs/BENCHMARKS in the source</tt> </tt>
-<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-docstring">distribution contains the details.</tt> </tt>
-<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"><tt class="py-docstring">Both python 2 (&gt;= 2.4) and python 3 are supported.</tt> </tt>
-<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"><tt class="py-docstring">.. _YUI compressor: https://github.com/yui/yuicompressor/</tt> </tt>
-<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"><tt class="py-docstring">.. _the rule list by Isaac Schlueter: https://github.com/isaacs/cssmin/</tt> </tt>
-<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
-<a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-0" class="py-name" targets="Variable rcssmin.__doc__=rcssmin-module.html#__doc__"><a title="rcssmin.__doc__" class="py-name" href="#" onclick="return doclink('link-0', '__doc__', 'link-0');">__doc__</a></tt><tt class="py-op">:</tt> </tt>
-<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-comment"># pylint: disable = W0622</tt> </tt>
-<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"> <tt id="link-1" class="py-name"><a title="rcssmin.__doc__" class="py-name" href="#" onclick="return doclink('link-1', '__doc__', 'link-0');">__doc__</a></tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name"><a title="rcssmin.__doc__" class="py-name" href="#" onclick="return doclink('link-2', '__doc__', 'link-0');">__doc__</a></tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'ascii'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">decode</tt><tt class="py-op">(</tt><tt class="py-string">'unicode_escape'</tt><tt class="py-op">)</tt> </tt>
-<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">r"Andr\xe9 Malo"</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'ascii'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">decode</tt><tt class="py-op">(</tt><tt class="py-string">'unicode_escape'</tt><tt class="py-op">)</tt> </tt>
-<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt class="py-name">__docformat__</tt> <tt class="py-op">=</tt> <tt class="py-string">"restructuredtext en"</tt> </tt>
-<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable rcssmin.__license__=rcssmin-module.html#__license__"><a title="rcssmin.__license__" class="py-name" href="#" onclick="return doclink('link-3', '__license__', 'link-3');">__license__</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Apache License, Version 2.0"</tt> </tt>
-<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">'1.0.5'</tt> </tt>
-<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'cssmin'</tt><tt class="py-op">]</tt> </tt>
-<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> </tt>
-<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> <tt class="py-keyword">as</tt> <tt class="py-name">_re</tt> </tt>
-<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"> </tt>
-<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"> </tt>
-<a name="_make_cssmin"></a><div id="_make_cssmin-def"><a name="L87"></a><tt class="py-lineno"> 87</tt> <a class="py-toggle" href="#" id="_make_cssmin-toggle" onclick="return toggle('_make_cssmin');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="rcssmin-module.html#_make_cssmin">_make_cssmin</a><tt class="py-op">(</tt><tt class="py-param">python_only</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_make_cssmin-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_make_cssmin-expanded"><a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
-<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"><tt class="py-docstring"> Generate CSS minifier.</tt> </tt>
-<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"><tt class="py-docstring"> :Parameters:</tt> </tt>
-<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"><tt class="py-docstring"> `python_only` : ``bool``</tt> </tt>
-<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"><tt class="py-docstring"> Use only the python variant. If true, the c extension is not even</tt> </tt>
-<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"><tt class="py-docstring"> tried to be loaded.</tt> </tt>
-<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"><tt class="py-docstring"> :Return: Minifier</tt> </tt>
-<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"><tt class="py-docstring"> :Rtype: ``callable``</tt> </tt>
-<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-comment"># pylint: disable = R0912, R0914, W0612</tt> </tt>
-<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> </tt>
-<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">python_only</tt><tt class="py-op">:</tt> </tt>
-<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">_rcssmin</tt> </tt>
-<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
-<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
-<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">_rcssmin</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Function rcssmin.cssmin()=rcssmin-module.html#cssmin"><a title="rcssmin.cssmin" class="py-name" href="#" onclick="return doclink('link-4', 'cssmin', 'link-4');">cssmin</a></tt> </tt>
-<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> </tt>
-<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-name">nl</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:[\n\f]|\r\n?)'</tt> <tt class="py-comment"># pylint: disable = C0103</tt> </tt>
-<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-name">spacechar</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[\r\n\f\040\t]'</tt> </tt>
-<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> </tt>
-<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-name">unicoded</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[0-9a-fA-F]{1,6}(?:[\040\n\t\f]|\r\n?)?'</tt> </tt>
-<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-name">escaped</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[^\n\r\f0-9a-fA-F]'</tt> </tt>
-<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-name">escape</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:\\(?:%(unicoded)s|%(escaped)s))'</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> </tt>
-<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-name">nmchar</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[^\000-\054\056\057\072-\100\133-\136\140\173-\177]'</tt> </tt>
-<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-comment">#nmstart = r'[^\000-\100\133-\136\140\173-\177]'</tt> </tt>
-<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-comment">#ident = (r'(?:'</tt> </tt>
-<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-comment"># r'-?(?:%(nmstart)s|%(escape)s)%(nmchar)s*(?:%(escape)s%(nmchar)s*)*'</tt> </tt>
-<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-comment">#r')') % locals()</tt> </tt>
-<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> </tt>
-<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-name">comment</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)'</tt> </tt>
-<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> </tt>
-<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> <tt class="py-comment"># only for specific purposes. The bang is grouped:</tt> </tt>
-<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-name">_bang_comment</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:/\*(!?)[^*]*\*+(?:[^/*][^*]*\*+)*/)'</tt> </tt>
-<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> </tt>
-<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> <tt class="py-name">string1</tt> <tt class="py-op">=</tt> \ </tt>
-<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-string">r'(?:\047[^\047\\\r\n\f]*(?:\\[^\r\n\f][^\047\\\r\n\f]*)*\047)'</tt> </tt>
-<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-name">string2</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:"[^"\\\r\n\f]*(?:\\[^\r\n\f][^"\\\r\n\f]*)*")'</tt> </tt>
-<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-name">strings</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s|%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">string1</tt><tt class="py-op">,</tt> <tt class="py-name">string2</tt><tt class="py-op">)</tt> </tt>
-<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> </tt>
-<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> <tt class="py-name">nl_string1</tt> <tt class="py-op">=</tt> \ </tt>
-<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-string">r'(?:\047[^\047\\\r\n\f]*(?:\\(?:[^\r]|\r\n?)[^\047\\\r\n\f]*)*\047)'</tt> </tt>
-<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-name">nl_string2</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:"[^"\\\r\n\f]*(?:\\(?:[^\r]|\r\n?)[^"\\\r\n\f]*)*")'</tt> </tt>
-<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-name">nl_strings</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s|%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">nl_string1</tt><tt class="py-op">,</tt> <tt class="py-name">nl_string2</tt><tt class="py-op">)</tt> </tt>
-<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> </tt>
-<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-name">uri_nl_string1</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:\047[^\047\\]*(?:\\(?:[^\r]|\r\n?)[^\047\\]*)*\047)'</tt> </tt>
-<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-name">uri_nl_string2</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:"[^"\\]*(?:\\(?:[^\r]|\r\n?)[^"\\]*)*")'</tt> </tt>
-<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-name">uri_nl_strings</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s|%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">uri_nl_string1</tt><tt class="py-op">,</tt> <tt class="py-name">uri_nl_string2</tt><tt class="py-op">)</tt> </tt>
-<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> </tt>
-<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-name">nl_escaped</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:\\%(nl)s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> </tt>
-<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-name">space</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%(spacechar)s|%(comment)s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> </tt>
-<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-name">ie7hack</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:&gt;/\*\*/)'</tt> </tt>
-<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> </tt>
-<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-string">r'(?:'</tt> </tt>
-<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-comment"># noqa pylint: disable = C0330</tt> </tt>
-<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-string">r'(?:[^\000-\040"\047()\\\177]*'</tt> </tt>
-<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-string">r'(?:%(escape)s[^\000-\040"\047()\\\177]*)*)'</tt> </tt>
-<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-string">r'(?:'</tt> </tt>
-<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-string">r'(?:%(spacechar)s+|%(nl_escaped)s+)'</tt> </tt>
-<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-string">r'(?:'</tt> </tt>
-<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-string">r'(?:[^\000-\040"\047()\\\177]|%(escape)s|%(nl_escaped)s)'</tt> </tt>
-<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-string">r'[^\000-\040"\047()\\\177]*'</tt> </tt>
-<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-string">r'(?:%(escape)s[^\000-\040"\047()\\\177]*)*'</tt> </tt>
-<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-string">r')+'</tt> </tt>
-<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-string">r')*'</tt> </tt>
-<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-string">r')'</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> </tt>
-<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-name">nl_unesc_sub</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">nl_escaped</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> </tt>
-<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> <tt class="py-name">uri_space_sub</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
-<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-string">r'(%(escape)s+)|%(spacechar)s+|%(nl_escaped)s+'</tt> </tt>
-<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-name">uri_space_subber</tt> <tt class="py-op">=</tt> <tt class="py-keyword">lambda</tt> <tt class="py-name">m</tt><tt class="py-op">:</tt> <tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
-<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> </tt>
-<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">space_sub_simple</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
-<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-string">r'[\r\n\f\040\t;]+|(%(comment)s+)'</tt> </tt>
-<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> <tt class="py-name">space_sub_banged</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
-<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-string">r'[\r\n\f\040\t;]+|(%(_bang_comment)s+)'</tt> </tt>
-<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> </tt>
-<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-name">post_esc_sub</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-string">r'[\r\n\f\t]+'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> </tt>
-<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-name">main_sub</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
-<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-comment"># noqa pylint: disable = C0330</tt> </tt>
-<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-string">r'([^\\"\047u&gt;@\r\n\f\040\t/;:{}]+)'</tt> </tt>
-<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=[{}(=:&gt;+[,!])(%(space)s+)'</tt> </tt>
-<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-string">r'|^(%(space)s+)'</tt> </tt>
-<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-string">r'|(%(space)s+)(?=(([:{});=&gt;+\],!])|$)?)'</tt> </tt>
-<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-string">r'|;(%(space)s*(?:;%(space)s*)*)(?=(\})?)'</tt> </tt>
-<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> <tt class="py-string">r'|(\{)'</tt> </tt>
-<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-string">r'|(\})'</tt> </tt>
-<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-string">r'|(%(strings)s)'</tt> </tt>
-<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;!%(nmchar)s)url\(%(spacechar)s*('</tt> </tt>
-<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt class="py-string">r'%(uri_nl_strings)s'</tt> </tt>
-<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-string">r'|%(uri)s'</tt> </tt>
-<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt class="py-string">r')%(spacechar)s*\)'</tt> </tt>
-<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> <tt class="py-string">r'|(@(?:'</tt> </tt>
-<a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"> <tt class="py-string">r'[mM][eE][dD][iI][aA]'</tt> </tt>
-<a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"> <tt class="py-string">r'|[sS][uU][pP][pP][oO][rR][tT][sS]'</tt> </tt>
-<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-string">r'|[dD][oO][cC][uU][mM][eE][nN][tT]'</tt> </tt>
-<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"> <tt class="py-string">r'|(?:-(?:'</tt> </tt>
-<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-string">r'[wW][eE][bB][kK][iI][tT]|[mM][oO][zZ]|[oO]|[mM][sS]'</tt> </tt>
-<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-string">r')-)?'</tt> </tt>
-<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt class="py-string">r'[kK][eE][yY][fF][rR][aA][mM][eE][sS]'</tt> </tt>
-<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"> <tt class="py-string">r'))(?!%(nmchar)s)'</tt> </tt>
-<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-string">r'|(%(ie7hack)s)(%(space)s*)'</tt> </tt>
-<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-string">r'|(:[fF][iI][rR][sS][tT]-[lL]'</tt> </tt>
-<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> <tt class="py-string">r'(?:[iI][nN][eE]|[eE][tT][tT][eE][rR]))'</tt> </tt>
-<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt class="py-string">r'(%(space)s*)(?=[{,])'</tt> </tt>
-<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"> <tt class="py-string">r'|(%(nl_strings)s)'</tt> </tt>
-<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-string">r'|(%(escape)s[^\\"\047u&gt;@\r\n\f\040\t/;:{}]*)'</tt> </tt>
-<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> </tt>
-<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> <tt class="py-comment">#print main_sub.__self__.pattern</tt> </tt>
-<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> </tt>
-<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">main_subber</tt><tt class="py-op">(</tt><tt class="py-param">keep_bang_comments</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"> <tt class="py-docstring">""" Make main subber """</tt> </tt>
-<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">,</tt> <tt class="py-name">in_rule</tt><tt class="py-op">,</tt> <tt class="py-name">at_group</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
-<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> </tt>
-<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">keep_bang_comments</tt><tt class="py-op">:</tt> </tt>
-<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> <tt class="py-name">space_sub</tt> <tt class="py-op">=</tt> <tt class="py-name">space_sub_banged</tt> </tt>
-<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> </tt>
-<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">space_subber</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-docstring">""" Space|Comment subber """</tt> </tt>
-<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">lastindex</tt><tt class="py-op">:</tt> </tt>
-<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> <tt class="py-name">group1</tt><tt class="py-op">,</tt> <tt class="py-name">group2</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
-<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">group2</tt><tt class="py-op">:</tt> </tt>
-<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">group1</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">r'\*/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
-<a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">group1</tt> </tt>
-<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">group1</tt><tt class="py-op">:</tt> </tt>
-<a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">group1</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">r'\*/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
-<a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
-<a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">r'/*\*/'</tt> </tt>
-<a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'/**/'</tt> </tt>
-<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
-</div><a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"> <tt class="py-name">space_sub</tt> <tt class="py-op">=</tt> <tt class="py-name">space_sub_simple</tt> </tt>
-<a name="L239"></a><tt class="py-lineno">239</tt> <tt class="py-line"> </tt>
-<a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">space_subber</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"> <tt class="py-docstring">""" Space|Comment subber """</tt> </tt>
-<a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">lastindex</tt><tt class="py-op">:</tt> </tt>
-<a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">r'\*/'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
-<a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
-<a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">r'/*\*/'</tt> </tt>
-<a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L249"></a><tt class="py-lineno">249</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'/**/'</tt> </tt>
-<a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
-</div><a name="L252"></a><tt class="py-lineno">252</tt> <tt class="py-line"> </tt>
-<a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_space_post</tt><tt class="py-op">(</tt><tt class="py-param">group</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L254"></a><tt class="py-lineno">254</tt> <tt class="py-line"> <tt class="py-docstring">""" space with token after """</tt> </tt>
-<a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt> </tt>
-<a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">6</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">in_rule</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">at_group</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">' '</tt> <tt class="py-op">+</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L258"></a><tt class="py-lineno">258</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"> </tt>
-<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_semicolon</tt><tt class="py-op">(</tt><tt class="py-param">group</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt class="py-docstring">""" ; handler """</tt> </tt>
-<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">';'</tt> <tt class="py-op">+</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">7</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> </tt>
-<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_semicolon2</tt><tt class="py-op">(</tt><tt class="py-param">group</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L265"></a><tt class="py-lineno">265</tt> <tt class="py-line"> <tt class="py-docstring">""" ; handler """</tt> </tt>
-<a name="L266"></a><tt class="py-lineno">266</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">in_rule</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">7</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">';'</tt> <tt class="py-op">+</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">7</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"> </tt>
-<a name="L270"></a><tt class="py-lineno">270</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_open</tt><tt class="py-op">(</tt><tt class="py-param">_</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L271"></a><tt class="py-lineno">271</tt> <tt class="py-line"> <tt class="py-docstring">""" { handler """</tt> </tt>
-<a name="L272"></a><tt class="py-lineno">272</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">at_group</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L273"></a><tt class="py-lineno">273</tt> <tt class="py-line"> <tt class="py-name">at_group</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">-=</tt> <tt class="py-number">1</tt> </tt>
-<a name="L274"></a><tt class="py-lineno">274</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L275"></a><tt class="py-lineno">275</tt> <tt class="py-line"> <tt class="py-name">in_rule</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt>
-<a name="L276"></a><tt class="py-lineno">276</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'{'</tt> </tt>
-</div><a name="L277"></a><tt class="py-lineno">277</tt> <tt class="py-line"> </tt>
-<a name="L278"></a><tt class="py-lineno">278</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_close</tt><tt class="py-op">(</tt><tt class="py-param">_</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L279"></a><tt class="py-lineno">279</tt> <tt class="py-line"> <tt class="py-docstring">""" } handler """</tt> </tt>
-<a name="L280"></a><tt class="py-lineno">280</tt> <tt class="py-line"> <tt class="py-name">in_rule</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L281"></a><tt class="py-lineno">281</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'}'</tt> </tt>
-</div><a name="L282"></a><tt class="py-lineno">282</tt> <tt class="py-line"> </tt>
-<a name="L283"></a><tt class="py-lineno">283</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_at_group</tt><tt class="py-op">(</tt><tt class="py-param">group</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L284"></a><tt class="py-lineno">284</tt> <tt class="py-line"> <tt class="py-docstring">""" @xxx group handler """</tt> </tt>
-<a name="L285"></a><tt class="py-lineno">285</tt> <tt class="py-line"> <tt class="py-name">at_group</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
-<a name="L286"></a><tt class="py-lineno">286</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">13</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L287"></a><tt class="py-lineno">287</tt> <tt class="py-line"> </tt>
-<a name="L288"></a><tt class="py-lineno">288</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fn_ie7hack</tt><tt class="py-op">(</tt><tt class="py-param">group</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L289"></a><tt class="py-lineno">289</tt> <tt class="py-line"> <tt class="py-docstring">""" IE7 Hack handler """</tt> </tt>
-<a name="L290"></a><tt class="py-lineno">290</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">in_rule</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">at_group</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L291"></a><tt class="py-lineno">291</tt> <tt class="py-line"> <tt class="py-name">in_macie5</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L292"></a><tt class="py-lineno">292</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">14</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">15</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L293"></a><tt class="py-lineno">293</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'&gt;'</tt> <tt class="py-op">+</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">15</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L294"></a><tt class="py-lineno">294</tt> <tt class="py-line"> </tt>
-<a name="L295"></a><tt class="py-lineno">295</tt> <tt class="py-line"> <tt class="py-name">table</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt> </tt>
-<a name="L296"></a><tt class="py-lineno">296</tt> <tt class="py-line"> <tt class="py-comment"># noqa pylint: disable = C0330</tt> </tt>
-<a name="L297"></a><tt class="py-lineno">297</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
-<a name="L298"></a><tt class="py-lineno">298</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
-<a name="L299"></a><tt class="py-lineno">299</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
-<a name="L300"></a><tt class="py-lineno">300</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
-<a name="L301"></a><tt class="py-lineno">301</tt> <tt class="py-line"> <tt class="py-name">fn_space_post</tt><tt class="py-op">,</tt> <tt class="py-comment"># space with token after</tt> </tt>
-<a name="L302"></a><tt class="py-lineno">302</tt> <tt class="py-line"> <tt class="py-name">fn_space_post</tt><tt class="py-op">,</tt> <tt class="py-comment"># space with token after</tt> </tt>
-<a name="L303"></a><tt class="py-lineno">303</tt> <tt class="py-line"> <tt class="py-name">fn_space_post</tt><tt class="py-op">,</tt> <tt class="py-comment"># space with token after</tt> </tt>
-<a name="L304"></a><tt class="py-lineno">304</tt> <tt class="py-line"> <tt class="py-name">fn_semicolon</tt><tt class="py-op">,</tt> <tt class="py-comment"># semicolon</tt> </tt>
-<a name="L305"></a><tt class="py-lineno">305</tt> <tt class="py-line"> <tt class="py-name">fn_semicolon2</tt><tt class="py-op">,</tt> <tt class="py-comment"># semicolon</tt> </tt>
-<a name="L306"></a><tt class="py-lineno">306</tt> <tt class="py-line"> <tt class="py-name">fn_open</tt><tt class="py-op">,</tt> <tt class="py-comment"># {</tt> </tt>
-<a name="L307"></a><tt class="py-lineno">307</tt> <tt class="py-line"> <tt class="py-name">fn_close</tt><tt class="py-op">,</tt> <tt class="py-comment"># }</tt> </tt>
-<a name="L308"></a><tt class="py-lineno">308</tt> <tt class="py-line"> <tt class="py-keyword">lambda</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> <tt class="py-name">g</tt><tt class="py-op">(</tt><tt class="py-number">11</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-comment"># string</tt> </tt>
-<a name="L309"></a><tt class="py-lineno">309</tt> <tt class="py-line"> <tt class="py-keyword">lambda</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> <tt class="py-string">'url(%s)'</tt> <tt class="py-op">%</tt> <tt class="py-name">uri_space_sub</tt><tt class="py-op">(</tt><tt class="py-name">uri_space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">g</tt><tt class="py-op">(</tt><tt class="py-number">12</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
-<a name="L310"></a><tt class="py-lineno">310</tt> <tt class="py-line"> <tt class="py-comment"># url(...)</tt> </tt>
-<a name="L311"></a><tt class="py-lineno">311</tt> <tt class="py-line"> <tt class="py-name">fn_at_group</tt><tt class="py-op">,</tt> <tt class="py-comment"># @xxx expecting {...}</tt> </tt>
-<a name="L312"></a><tt class="py-lineno">312</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
-<a name="L313"></a><tt class="py-lineno">313</tt> <tt class="py-line"> <tt class="py-name">fn_ie7hack</tt><tt class="py-op">,</tt> <tt class="py-comment"># ie7hack</tt> </tt>
-<a name="L314"></a><tt class="py-lineno">314</tt> <tt class="py-line"> <tt class="py-name">None</tt><tt class="py-op">,</tt> </tt>
-<a name="L315"></a><tt class="py-lineno">315</tt> <tt class="py-line"> <tt class="py-keyword">lambda</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> <tt class="py-name">g</tt><tt class="py-op">(</tt><tt class="py-number">16</tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">' '</tt> <tt class="py-op">+</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">g</tt><tt class="py-op">(</tt><tt class="py-number">17</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
-<a name="L316"></a><tt class="py-lineno">316</tt> <tt class="py-line"> <tt class="py-comment"># :first-line|letter followed</tt> </tt>
-<a name="L317"></a><tt class="py-lineno">317</tt> <tt class="py-line"> <tt class="py-comment"># by [{,] (apparently space</tt> </tt>
-<a name="L318"></a><tt class="py-lineno">318</tt> <tt class="py-line"> <tt class="py-comment"># needed for IE6)</tt> </tt>
-<a name="L319"></a><tt class="py-lineno">319</tt> <tt class="py-line"> <tt class="py-keyword">lambda</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> <tt class="py-name">nl_unesc_sub</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">g</tt><tt class="py-op">(</tt><tt class="py-number">18</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-comment"># nl_string</tt> </tt>
-<a name="L320"></a><tt class="py-lineno">320</tt> <tt class="py-line"> <tt class="py-keyword">lambda</tt> <tt class="py-name">g</tt><tt class="py-op">:</tt> <tt class="py-name">post_esc_sub</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt> <tt class="py-name">g</tt><tt class="py-op">(</tt><tt class="py-number">19</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-comment"># escape</tt> </tt>
-<a name="L321"></a><tt class="py-lineno">321</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L322"></a><tt class="py-lineno">322</tt> <tt class="py-line"> </tt>
-<a name="L323"></a><tt class="py-lineno">323</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">func</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L324"></a><tt class="py-lineno">324</tt> <tt class="py-line"> <tt class="py-docstring">""" Main subber """</tt> </tt>
-<a name="L325"></a><tt class="py-lineno">325</tt> <tt class="py-line"> <tt class="py-name">idx</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">lastindex</tt><tt class="py-op">,</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">group</tt> </tt>
-<a name="L326"></a><tt class="py-lineno">326</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">idx</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">3</tt><tt class="py-op">:</tt> </tt>
-<a name="L327"></a><tt class="py-lineno">327</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">table</tt><tt class="py-op">[</tt><tt class="py-name">idx</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-name">group</tt><tt class="py-op">)</tt> </tt>
-<a name="L328"></a><tt class="py-lineno">328</tt> <tt class="py-line"> </tt>
-<a name="L329"></a><tt class="py-lineno">329</tt> <tt class="py-line"> <tt class="py-comment"># shortcuts for frequent operations below:</tt> </tt>
-<a name="L330"></a><tt class="py-lineno">330</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">idx</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> <tt class="py-comment"># not interesting</tt> </tt>
-<a name="L331"></a><tt class="py-lineno">331</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
-<a name="L332"></a><tt class="py-lineno">332</tt> <tt class="py-line"> <tt class="py-comment">#else: # space with token before or at the beginning</tt> </tt>
-<a name="L333"></a><tt class="py-lineno">333</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">space_sub</tt><tt class="py-op">(</tt><tt class="py-name">space_subber</tt><tt class="py-op">,</tt> <tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-name">idx</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L334"></a><tt class="py-lineno">334</tt> <tt class="py-line"> </tt>
-<a name="L335"></a><tt class="py-lineno">335</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">func</tt> </tt>
-</div><a name="L336"></a><tt class="py-lineno">336</tt> <tt class="py-line"> </tt>
-<a name="L337"></a><tt class="py-lineno">337</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">cssmin</tt><tt class="py-op">(</tt><tt class="py-param">style</tt><tt class="py-op">,</tt> <tt class="py-param">keep_bang_comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># pylint: disable = W0621</tt> </tt>
-<a name="L338"></a><tt class="py-lineno">338</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
-<a name="L339"></a><tt class="py-lineno">339</tt> <tt class="py-line"><tt class="py-docstring"> Minify CSS.</tt> </tt>
-<a name="L340"></a><tt class="py-lineno">340</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L341"></a><tt class="py-lineno">341</tt> <tt class="py-line"><tt class="py-docstring"> :Parameters:</tt> </tt>
-<a name="L342"></a><tt class="py-lineno">342</tt> <tt class="py-line"><tt class="py-docstring"> `style` : ``str``</tt> </tt>
-<a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"><tt class="py-docstring"> CSS to minify</tt> </tt>
-<a name="L344"></a><tt class="py-lineno">344</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"><tt class="py-docstring"> `keep_bang_comments` : ``bool``</tt> </tt>
-<a name="L346"></a><tt class="py-lineno">346</tt> <tt class="py-line"><tt class="py-docstring"> Keep comments starting with an exclamation mark? (``/*!...*/``)</tt> </tt>
-<a name="L347"></a><tt class="py-lineno">347</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L348"></a><tt class="py-lineno">348</tt> <tt class="py-line"><tt class="py-docstring"> :Return: Minified style</tt> </tt>
-<a name="L349"></a><tt class="py-lineno">349</tt> <tt class="py-line"><tt class="py-docstring"> :Rtype: ``str``</tt> </tt>
-<a name="L350"></a><tt class="py-lineno">350</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L351"></a><tt class="py-lineno">351</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">main_sub</tt><tt class="py-op">(</tt><tt class="py-name">main_subber</tt><tt class="py-op">(</tt><tt class="py-name">keep_bang_comments</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">style</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L352"></a><tt class="py-lineno">352</tt> <tt class="py-line"> </tt>
-<a name="L353"></a><tt class="py-lineno">353</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-5" class="py-name"><a title="rcssmin.cssmin" class="py-name" href="#" onclick="return doclink('link-5', 'cssmin', 'link-4');">cssmin</a></tt> </tt>
-</div><a name="L354"></a><tt class="py-lineno">354</tt> <tt class="py-line"> </tt>
-<a name="L355"></a><tt class="py-lineno">355</tt> <tt class="py-line"><tt id="link-6" class="py-name"><a title="rcssmin.cssmin" class="py-name" href="#" onclick="return doclink('link-6', 'cssmin', 'link-4');">cssmin</a></tt> <tt class="py-op">=</tt> <tt class="py-name">_make_cssmin</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L356"></a><tt class="py-lineno">356</tt> <tt class="py-line"> </tt>
-<a name="L357"></a><tt class="py-lineno">357</tt> <tt class="py-line"> </tt>
-<a name="L358"></a><tt class="py-lineno">358</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
-<a name="main"></a><div id="main-def"><a name="L359"></a><tt class="py-lineno">359</tt> <a class="py-toggle" href="#" id="main-toggle" onclick="return toggle('main');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="rcssmin-module.html#main">main</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="main-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="main-expanded"><a name="L360"></a><tt class="py-lineno">360</tt> <tt class="py-line"> <tt class="py-docstring">""" Main """</tt> </tt>
-<a name="L361"></a><tt class="py-lineno">361</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> <tt class="py-keyword">as</tt> <tt class="py-name">_sys</tt> </tt>
-<a name="L362"></a><tt class="py-lineno">362</tt> <tt class="py-line"> <tt class="py-name">keep_bang_comments</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt> </tt>
-<a name="L363"></a><tt class="py-lineno">363</tt> <tt class="py-line"> <tt class="py-string">'-b'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
-<a name="L364"></a><tt class="py-lineno">364</tt> <tt class="py-line"> <tt class="py-keyword">or</tt> <tt class="py-string">'-bp'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
-<a name="L365"></a><tt class="py-lineno">365</tt> <tt class="py-line"> <tt class="py-keyword">or</tt> <tt class="py-string">'-pb'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
-<a name="L366"></a><tt class="py-lineno">366</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L367"></a><tt class="py-lineno">367</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'-p'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'-bp'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> \ </tt>
-<a name="L368"></a><tt class="py-lineno">368</tt> <tt class="py-line"> <tt class="py-keyword">or</tt> <tt class="py-string">'-pb'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L369"></a><tt class="py-lineno">369</tt> <tt class="py-line"> <tt class="py-keyword">global</tt> <tt id="link-7" class="py-name"><a title="rcssmin.cssmin" class="py-name" href="#" onclick="return doclink('link-7', 'cssmin', 'link-4');">cssmin</a></tt> <tt class="py-comment"># pylint: disable = W0603</tt> </tt>
-<a name="L370"></a><tt class="py-lineno">370</tt> <tt class="py-line"> <tt id="link-8" class="py-name"><a title="rcssmin.cssmin" class="py-name" href="#" onclick="return doclink('link-8', 'cssmin', 'link-4');">cssmin</a></tt> <tt class="py-op">=</tt> <tt class="py-name">_make_cssmin</tt><tt class="py-op">(</tt><tt class="py-name">python_only</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
-<a name="L371"></a><tt class="py-lineno">371</tt> <tt class="py-line"> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt id="link-9" class="py-name"><a title="rcssmin.cssmin" class="py-name" href="#" onclick="return doclink('link-9', 'cssmin', 'link-4');">cssmin</a></tt><tt class="py-op">(</tt> </tt>
-<a name="L372"></a><tt class="py-lineno">372</tt> <tt class="py-line"> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">stdin</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">keep_bang_comments</tt><tt class="py-op">=</tt><tt class="py-name">keep_bang_comments</tt> </tt>
-<a name="L373"></a><tt class="py-lineno">373</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L374"></a><tt class="py-lineno">374</tt> <tt class="py-line"> <tt class="py-name">main</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L375"></a><tt class="py-lineno">375</tt> <tt class="py-line"> </tt><script type="text/javascript">
-<!--
-expandto(location.href);
-// -->
-</script>
-</pre>
-<br />
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rcssmin/" target="_top">Visit rcssmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/redirect.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/redirect.html
deleted file mode 100644
index 95728fdf177..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/docs/apidoc/redirect.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<html><head><title>Epydoc Redirect Page</title>
-<meta http-equiv="cache-control" content="no-cache" />
-<meta http-equiv="expires" content="0" />
-<meta http-equiv="pragma" content="no-cache" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-<body>
-<script type="text/javascript">
-<!--
-var pages = ["rcssmin-m"];
-var dottedName = get_anchor();
-if (dottedName) {
- var target = redirect_url(dottedName);
- if (target) window.location.replace(target);
-}
-// -->
-</script>
-
-<h3>Epydoc Auto-redirect page</h3>
-
-<p>When javascript is enabled, this page will redirect URLs of
-the form <tt>redirect.html#<i>dotted.name</i></tt> to the
-documentation for the object with the given fully-qualified
-dotted name.</p>
-<p><a id="message"> &nbsp; </a></p>
-
-<script type="text/javascript">
-<!--
-if (dottedName) {
- var msg = document.getElementById("message");
- msg.innerHTML = "No documentation found for <tt>"+
- dottedName+"</tt>";
-}
-// -->
-</script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/package.cfg b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/package.cfg
deleted file mode 100644
index c09bbd0365b..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/package.cfg
+++ /dev/null
@@ -1,84 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2009 - 2014
-# André Malo or his licensors, as applicable
-#
-# 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.
-
-[package]
-name = rcssmin
-
-python.min = 2.3
-python.max = 3.4
-pypy.min = 1.9
-pypy.max = 2.2
-jython.min = 2.5
-jython.max = 2.7
-
-version.number = 1.0.5
-
-author.name = André Malo
-author.email = nd@perlig.de
-#maintainer.name =
-#maintainer.email =
-url.homepage = http://opensource.perlig.de/rcssmin/
-url.download = http://storage.perlig.de/rcssmin/
-
-
-[docs]
-meta.classifiers = docs/CLASSIFIERS
-meta.description = docs/DESCRIPTION
-meta.summary = docs/SUMMARY
-meta.provides = docs/PROVIDES
-meta.license = LICENSE
-meta.keywords =
- CSS
- Minimization
-
-apidoc.dir = docs/apidoc
-apidoc.strip = 1
-#apidoc.ignore =
-
-#userdoc.dir = docs/userdoc
-#userdoc.strip = 1
-#userdoc.ignore =
-# .buildinfo
-
-#examples.dir = docs/examples
-#examples.strip = 1
-#examples.ignore =
-
-#man =
-
-extra =
- README.rst
- docs/CHANGES
- docs/BENCHMARKS
-
-
-[manifest]
-#packages.lib = .
-#packages.collect =
-modules = rcssmin
-
-packages.extra =
- _setup.py2.term
- _setup.py3.term
-
-#scripts =
-
-dist =
- tests
- run_tests.py
- bench
- bench.sh
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.c b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.c
deleted file mode 100644
index a722fc276a9..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.c
+++ /dev/null
@@ -1,1163 +0,0 @@
-/*
- * Copyright 2011 - 2014
- * Andr\xe9 Malo or his licensors, as applicable
- *
- * 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.
- */
-
-#include "cext.h"
-EXT_INIT_FUNC;
-
-#ifdef EXT3
-typedef Py_UNICODE rchar;
-#else
-typedef unsigned char rchar;
-#endif
-#define U(c) ((rchar)(c))
-
-typedef struct {
- const rchar *start;
- const rchar *sentinel;
- const rchar *tsentinel;
- Py_ssize_t at_group;
- int in_macie5;
- int in_rule;
- int keep_bang_comments;
-} rcssmin_ctx_t;
-
-typedef enum {
- NEED_SPACE_MAYBE = 0,
- NEED_SPACE_NEVER
-} need_space_flag;
-
-
-#define RCSSMIN_DULL_BIT (1 << 0)
-#define RCSSMIN_HEX_BIT (1 << 1)
-#define RCSSMIN_ESC_BIT (1 << 2)
-#define RCSSMIN_SPACE_BIT (1 << 3)
-#define RCSSMIN_STRING_DULL_BIT (1 << 4)
-#define RCSSMIN_NMCHAR_BIT (1 << 5)
-#define RCSSMIN_URI_DULL_BIT (1 << 6)
-#define RCSSMIN_PRE_CHAR_BIT (1 << 7)
-#define RCSSMIN_POST_CHAR_BIT (1 << 8)
-
-static const unsigned short rcssmin_charmask[128] = {
- 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 28, 8, 21, 8, 8, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21,
- 28, 469, 4, 85, 85, 85, 85, 4,
- 149, 277, 85, 469, 469, 117, 85, 84,
- 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 468, 340, 85, 469, 468, 85,
- 84, 115, 115, 115, 115, 115, 115, 117,
- 117, 117, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 213, 4, 341, 85, 117,
- 85, 115, 115, 115, 115, 115, 115, 117,
- 117, 117, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 117, 116, 117, 117,
- 117, 117, 117, 468, 85, 468, 85, 21
-};
-
-#define RCSSMIN_IS_DULL(c) ((U(c) > 127) || \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_DULL_BIT))
-
-#define RCSSMIN_IS_HEX(c) ((U(c) <= 127) && \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_HEX_BIT))
-
-#define RCSSMIN_IS_ESC(c) ((U(c) > 127) || \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_ESC_BIT))
-
-#define RCSSMIN_IS_SPACE(c) ((U(c) <= 127) && \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_SPACE_BIT))
-
-#define RCSSMIN_IS_STRING_DULL(c) ((U(c) > 127) || \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_STRING_DULL_BIT))
-
-#define RCSSMIN_IS_NMCHAR(c) ((U(c) > 127) || \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_NMCHAR_BIT))
-
-#define RCSSMIN_IS_URI_DULL(c) ((U(c) > 127) || \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_URI_DULL_BIT))
-
-#define RCSSMIN_IS_PRE_CHAR(c) ((U(c) <= 127) && \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_PRE_CHAR_BIT))
-
-#define RCSSMIN_IS_POST_CHAR(c) ((U(c) <= 127) && \
- (rcssmin_charmask[U(c) & 0x7F] & RCSSMIN_POST_CHAR_BIT))
-
-
-static const rchar pattern_url[] = {
- /*U('u'),*/ U('r'), U('l'), U('(')
-};
-
-static const rchar pattern_ie7[] = {
- /*U('>'),*/ U('/'), U('*'), U('*'), U('/')
-};
-
-static const rchar pattern_media[] = {
- U('m'), U('e'), U('d'), U('i'), U('a'),
- U('M'), U('E'), U('D'), U('I'), U('A')
-};
-
-static const rchar pattern_document[] = {
- U('d'), U('o'), U('c'), U('u'), U('m'), U('e'), U('n'), U('t'),
- U('D'), U('O'), U('C'), U('U'), U('M'), U('E'), U('N'), U('T')
-};
-
-static const rchar pattern_supports[] = {
- U('s'), U('u'), U('p'), U('p'), U('o'), U('r'), U('t'), U('s'),
- U('S'), U('U'), U('P'), U('P'), U('O'), U('R'), U('T'), U('S')
-};
-
-static const rchar pattern_keyframes[] = {
- U('k'), U('e'), U('y'), U('f'), U('r'), U('a'), U('m'), U('e'), U('s'),
- U('K'), U('E'), U('Y'), U('F'), U('R'), U('A'), U('M'), U('E'), U('S')
-};
-
-static const rchar pattern_vendor_o[] = {
- U('-'), U('o'), U('-'),
- U('-'), U('O'), U('-')
-};
-
-static const rchar pattern_vendor_moz[] = {
- U('-'), U('m'), U('o'), U('z'), U('-'),
- U('-'), U('M'), U('O'), U('Z'), U('-')
-};
-
-static const rchar pattern_vendor_webkit[] = {
- U('-'), U('w'), U('e'), U('b'), U('k'), U('i'), U('t'), U('-'),
- U('-'), U('W'), U('E'), U('B'), U('K'), U('I'), U('T'), U('-')
-};
-
-static const rchar pattern_vendor_ms[] = {
- U('-'), U('m'), U('s'), U('-'),
- U('-'), U('M'), U('S'), U('-')
-};
-
-static const rchar pattern_first[] = {
- U('f'), U('i'), U('r'), U('s'), U('t'), U('-'), U('l'),
- U('F'), U('I'), U('R'), U('S'), U('T'), U('-'), U('L')
-};
-
-static const rchar pattern_line[] = {
- U('i'), U('n'), U('e'),
- U('I'), U('N'), U('E'),
-};
-
-static const rchar pattern_letter[] = {
- U('e'), U('t'), U('t'), U('e'), U('r'),
- U('E'), U('T'), U('T'), U('E'), U('R')
-};
-
-static const rchar pattern_macie5_init[] = {
- U('/'), U('*'), U('\\'), U('*'), U('/')
-};
-
-static const rchar pattern_macie5_exit[] = {
- U('/'), U('*'), U('*'), U('/')
-};
-
-/*
- * Match a pattern (and copy immediately to target)
- */
-#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wstrict-overflow"
-#endif
-static int
-copy_match(const rchar *pattern, const rchar *psentinel,
- const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
- rchar c;
-
- while (pattern < psentinel
- && source < ctx->sentinel && target < ctx->tsentinel
- && ((c = *source++) == *pattern++))
- *target++ = c;
-
- *source_ = source;
- *target_ = target;
-
- return (pattern == psentinel);
-}
-#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic pop
-#endif
-
-#define MATCH(PAT, source, target, ctx) ( \
- copy_match(pattern_##PAT, \
- pattern_##PAT + sizeof(pattern_##PAT) / sizeof(rchar), \
- source, target, ctx) \
-)
-
-
-/*
- * Match a pattern (and copy immediately to target) - CI version
- */
-static int
-copy_imatch(const rchar *pattern, const rchar *psentinel,
- const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_, *pstart = pattern;
- rchar *target = *target_;
- rchar c;
-
- while (pattern < psentinel
- && source < ctx->sentinel && target < ctx->tsentinel
- && ((c = *source++) == *pattern
- || c == pstart[(pattern - pstart) + (psentinel - pstart)])) {
- ++pattern;
- *target++ = c;
- }
-
- *source_ = source;
- *target_ = target;
-
- return (pattern == psentinel);
-}
-
-#define IMATCH(PAT, source, target, ctx) ( \
- copy_imatch(pattern_##PAT, \
- pattern_##PAT + sizeof(pattern_##PAT) / sizeof(rchar) / 2, \
- source, target, ctx) \
-)
-
-
-/*
- * Copy characters
- */
-#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wstrict-overflow"
-#endif
-static int
-copy(const rchar *source, const rchar *sentinel, rchar **target_,
- rcssmin_ctx_t *ctx)
-{
- rchar *target = *target_;
-
- while (source < sentinel && target < ctx->tsentinel)
- *target++ = *source++;
-
- *target_ = target;
-
- return (source == sentinel);
-}
-#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-#pragma GCC diagnostic pop
-#endif
-
-#define COPY_PAT(PAT, target, ctx) ( \
- copy(pattern_##PAT, \
- pattern_##PAT + sizeof(pattern_##PAT) / sizeof(rchar), \
- target, ctx) \
-)
-
-
-/*
- * The ABORT macros work with known local variables!
- */
-#define ABORT_(RET) do { \
- if (source < ctx->sentinel && !(target < ctx->tsentinel)) { \
- *source_ = source; \
- *target_ = target; \
- } \
- return RET; \
-} while(0)
-
-
-#define CRAPPY_C90_COMPATIBLE_EMPTY
-#define ABORT ABORT_(CRAPPY_C90_COMPATIBLE_EMPTY)
-#define RABORT(RET) ABORT_((RET))
-
-
-/*
- * Copy escape
- */
-static void
-copy_escape(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_, *hsentinel;
- rchar *target = *target_;
- rchar c;
-
- *target++ = U('\\');
- *target_ = target;
-
- if (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source++;
- if (RCSSMIN_IS_ESC(c)) {
- *target++ = c;
- }
- else if (RCSSMIN_IS_HEX(c)) {
- *target++ = c;
-
- /* 6 hex chars max, one we got already */
- if (ctx->sentinel - source > 5)
- hsentinel = source + 5;
- else
- hsentinel = ctx->sentinel;
-
- while (source < hsentinel && target < ctx->tsentinel
- && (c = *source, RCSSMIN_IS_HEX(c))) {
- ++source;
- *target++ = c;
- }
-
- /* One optional space after */
- if (source < ctx->sentinel && target < ctx->tsentinel) {
- if (source == hsentinel)
- c = *source;
- if (RCSSMIN_IS_SPACE(c)) {
- ++source;
- *target++ = U(' ');
- if (c == U('\r') && source < ctx->sentinel
- && *source == U('\n'))
- ++source;
- }
- }
- }
- }
-
- *target_ = target;
- *source_ = source;
-}
-
-
-/*
- * Copy string
- */
-static void
-copy_string(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
- rchar c, quote = source[-1];
-
- *target++ = quote;
- *target_ = target;
-
- while (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *target++ = *source++;
- if (RCSSMIN_IS_STRING_DULL(c))
- continue;
-
- switch (c) {
- case U('\''): case U('"'):
- if (c == quote) {
- *target_ = target;
- *source_ = source;
- return;
- }
- continue;
-
- case U('\\'):
- if (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source++;
- switch (c) {
- case U('\r'):
- if (source < ctx->sentinel && *source == U('\n'))
- ++source;
- /* fall through */
-
- case U('\n'): case U('\f'):
- --target;
- break;
-
- default:
- *target++ = c;
- }
- }
- continue;
- }
- break; /* forbidden characters */
- }
-
- ABORT;
-}
-
-
-/*
- * Copy URI string
- */
-static int
-copy_uri_string(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
- rchar c, quote = source[-1];
-
- *target++ = quote;
- *target_ = target;
-
- while (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source++;
- if (RCSSMIN_IS_SPACE(c))
- continue;
- *target++ = c;
- if (RCSSMIN_IS_STRING_DULL(c))
- continue;
-
- switch (c) {
- case U('\''): case U('"'):
- if (c == quote) {
- *target_ = target;
- *source_ = source;
- return 0;
- }
- continue;
-
- case U('\\'):
- if (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source;
- switch (c) {
- case U('\r'):
- if ((source + 1) < ctx->sentinel && source[1] == U('\n'))
- ++source;
- /* fall through */
-
- case U('\n'): case U('\f'):
- --target;
- ++source;
- break;
-
- default:
- --target;
- copy_escape(&source, &target, ctx);
- }
- }
- continue;
- }
-
- break; /* forbidden characters */
- }
-
- RABORT(-1);
-}
-
-
-/*
- * Copy URI (unquoted)
- */
-static int
-copy_uri_unquoted(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
- rchar c;
-
- *target++ = source[-1];
- *target_ = target;
-
- while (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source++;
- if (RCSSMIN_IS_SPACE(c))
- continue;
- *target++ = c;
- if (RCSSMIN_IS_URI_DULL(c))
- continue;
-
- switch (c) {
-
- case U(')'):
- *target_ = target - 1;
- *source_ = source - 1;
- return 0;
-
- case U('\\'):
- if (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source;
- switch (c) {
- case U('\r'):
- if ((source + 1) < ctx->sentinel && source[1] == U('\n'))
- ++source;
- /* fall through */
-
- case U('\n'): case U('\f'):
- --target;
- ++source;
- break;
-
- default:
- --target;
- copy_escape(&source, &target, ctx);
- }
- }
- continue;
- }
-
- break; /* forbidden characters */
- }
-
- RABORT(-1);
-}
-
-
-/*
- * Copy url
- */
-static void
-copy_url(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
- rchar c;
-
- *target++ = U('u');
- *target_ = target;
-
- /* Must not be inside an identifier */
- if ((source != ctx->start + 1) && RCSSMIN_IS_NMCHAR(source[-2]))
- return;
-
- if (!MATCH(url, &source, &target, ctx)
- || !(source < ctx->sentinel && target < ctx->tsentinel))
- ABORT;
-
- while (source < ctx->sentinel && RCSSMIN_IS_SPACE(*source))
- ++source;
-
- if (!(source < ctx->sentinel))
- ABORT;
-
- c = *source++;
- switch (c) {
- case U('"'): case U('\''):
- if (copy_uri_string(&source, &target, ctx) == -1)
- ABORT;
-
- while (source < ctx->sentinel && RCSSMIN_IS_SPACE(*source))
- ++source;
- break;
-
- default:
- if (copy_uri_unquoted(&source, &target, ctx) == -1)
- ABORT;
- }
-
- if (!(source < ctx->sentinel && target < ctx->tsentinel))
- ABORT;
-
- if ((*target++ = *source++) != U(')'))
- ABORT;
-
- *target_ = target;
- *source_ = source;
-}
-
-
-/*
- * Copy @-group
- */
-static void
-copy_at_group(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
-
- *target++ = U('@');
- *target_ = target;
-
-#define REMATCH(what) ( \
- source = *source_, \
- target = *target_, \
- IMATCH(what, &source, &target, ctx) \
-)
-#define CMATCH(what) IMATCH(what, &source, &target, ctx)
-
- if (( !CMATCH(media)
- && !REMATCH(supports)
- && !REMATCH(document)
- && !REMATCH(keyframes)
- && !(REMATCH(vendor_webkit) && CMATCH(keyframes))
- && !(REMATCH(vendor_moz) && CMATCH(keyframes))
- && !(REMATCH(vendor_o) && CMATCH(keyframes))
- && !(REMATCH(vendor_ms) && CMATCH(keyframes)))
- || !(source < ctx->sentinel && target < ctx->tsentinel)
- || RCSSMIN_IS_NMCHAR(*source))
- ABORT;
-
-#undef CMATCH
-#undef REMATCH
-
- ++ctx->at_group;
-
- *target_ = target;
- *source_ = source;
-}
-
-
-/*
- * Skip space
- */
-static const rchar *
-skip_space(const rchar *source, rcssmin_ctx_t *ctx)
-{
- const rchar *begin = source;
- int res;
- rchar c;
-
- while (source < ctx->sentinel) {
- c = *source;
- if (RCSSMIN_IS_SPACE(c)) {
- ++source;
- continue;
- }
- else if (c == U('/')) {
- ++source;
- if (!(source < ctx->sentinel && *source == U('*'))) {
- --source;
- break;
- }
- ++source;
- res = 0;
- while (source < ctx->sentinel) {
- c = *source++;
- if (c != U('*'))
- continue;
- if (!(source < ctx->sentinel))
- return begin;
- if (*source != U('/'))
- continue;
-
- /* Comment complete */
- ++source;
- res = 1;
- break;
- }
- if (!res)
- return begin;
-
- continue;
- }
-
- break;
- }
-
- return source;
-}
-
-
-/*
- * Copy space
- */
-static void
-copy_space(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx,
- need_space_flag need_space)
-{
- const rchar *source = *source_, *end, *comment;
- rchar *target = *target_;
- int res;
- rchar c;
-
- --source;
- if (need_space == NEED_SPACE_MAYBE
- && source > ctx->start
- && !RCSSMIN_IS_PRE_CHAR(source[-1])
- && (end = skip_space(source, ctx)) < ctx->sentinel
- && (!RCSSMIN_IS_POST_CHAR(*end)
- || (*end == U(':') && !ctx->in_rule && !ctx->at_group))) {
-
- if (!(target < ctx->tsentinel))
- ABORT;
- *target++ = U(' ');
- }
-
- while (source < ctx->sentinel) {
- switch (c = *source) {
-
- /* comment */
- case U('/'):
- comment = source++;
- if (!((source < ctx->sentinel && *source == U('*')))) {
- --source;
- break;
- }
- ++source;
- res = 0;
- while (source < ctx->sentinel) {
- c = *source++;
- if (c != U('*'))
- continue;
- if (!(source < ctx->sentinel))
- ABORT;
- if (*source != U('/'))
- continue;
-
- /* Comment complete */
- ++source;
- res = 1;
-
- if (ctx->keep_bang_comments && comment[2] == U('!')) {
- ctx->in_macie5 = (source[-3] == U('\\'));
- if (!copy(comment, source, &target, ctx))
- ABORT;
- }
- else if (source[-3] == U('\\')) {
- if (!ctx->in_macie5) {
- if (!COPY_PAT(macie5_init, &target, ctx))
- ABORT;
- }
- ctx->in_macie5 = 1;
- }
- else if (ctx->in_macie5) {
- if (!COPY_PAT(macie5_exit, &target, ctx))
- ABORT;
- ctx->in_macie5 = 0;
- }
- /* else don't copy anything */
- break;
- }
- if (!res)
- ABORT;
- continue;
-
- /* space */
- case U(' '): case U('\t'): case U('\r'): case U('\n'): case U('\f'):
- ++source;
- continue;
- }
-
- break;
- }
-
- *source_ = source;
- *target_ = target;
-}
-
-
-/*
- * Copy space if comment
- */
-static int
-copy_space_comment(const rchar **source_, rchar **target_,
- rcssmin_ctx_t *ctx, need_space_flag need_space)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
-
- if (source < ctx->sentinel && *source == U('*')) {
- copy_space(source_, target_, ctx, need_space);
- if (*source_ > source)
- return 0;
- }
- if (!(target < ctx->tsentinel))
- RABORT(-1);
-
- *target++ = source[-1];
-
- /* *source_ = source; <-- unchanged */
- *target_ = target;
-
- return -1;
-}
-
-
-/*
- * Copy space if exists
- */
-static int
-copy_space_optional(const rchar **source_, rchar **target_,
- rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
-
- if (!(source < ctx->sentinel))
- return -1;
-
- if (*source == U('/')) {
- *source_ = source + 1;
- return copy_space_comment(source_, target_, ctx, NEED_SPACE_NEVER);
- }
- else if (RCSSMIN_IS_SPACE(*source)) {
- *source_ = source + 1;
- copy_space(source_, target_, ctx, NEED_SPACE_NEVER);
- return 0;
- }
-
- return -1;
-}
-
-
-/*
- * Copy :first-line|letter
- */
-static void
-copy_first(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_, *next, *source_fork;
- rchar *target = *target_, *target_fork;
-
- *target++ = U(':');
- *target_ = target;
-
- if (!IMATCH(first, &source, &target, ctx)
- || !(source < ctx->sentinel && target < ctx->tsentinel))
- ABORT;
-
- source_fork = source;
- target_fork = target;
-
- if (!IMATCH(line, &source, &target, ctx)) {
- source = source_fork;
- target = target_fork;
-
- if (!IMATCH(letter, &source, &target, ctx)
- || !(source < ctx->sentinel && target < ctx->tsentinel))
- ABORT;
- }
-
- next = skip_space(source, ctx);
- if (!(next < ctx->sentinel && target < ctx->tsentinel
- && (*next == U('{') || *next == U(','))))
- ABORT;
-
- *target++ = U(' ');
- *target_ = target;
- *source_ = source;
- (void)copy_space_optional(source_, target_, ctx);
-}
-
-
-/*
- * Copy IE7 hack
- */
-static void
-copy_ie7hack(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_;
- rchar *target = *target_;
-
- *target++ = U('>');
- *target_ = target;
-
- if (ctx->in_rule || ctx->at_group)
- return; /* abort */
-
- if (!MATCH(ie7, &source, &target, ctx))
- ABORT;
-
- ctx->in_macie5 = 0;
-
- *target_ = target;
- *source_ = source;
-
- (void)copy_space_optional(source_, target_, ctx);
-}
-
-
-/*
- * Copy semicolon; miss out duplicates or even this one (before '}')
- */
-static void
-copy_semicolon(const rchar **source_, rchar **target_, rcssmin_ctx_t *ctx)
-{
- const rchar *source = *source_, *begin, *end;
- rchar *target = *target_;
-
- begin = source;
- while (source < ctx->sentinel) {
- end = skip_space(source, ctx);
- if (!(end < ctx->sentinel)) {
- if (!(target < ctx->tsentinel))
- ABORT;
- *target++ = U(';');
- break;
- }
- switch (*end) {
- case U(';'):
- source = end + 1;
- continue;
-
- case U('}'):
- if (ctx->in_rule)
- break;
-
- /* fall through */
- default:
- if (!(target < ctx->tsentinel))
- ABORT;
- *target++ = U(';');
- break;
- }
-
- break;
- }
-
- source = begin;
- *target_ = target;
- while (source < ctx->sentinel) {
- if (*source == U(';')) {
- ++source;
- continue;
- }
-
- if (copy_space_optional(&source, target_, ctx) == 0)
- continue;
-
- break;
- }
-
- *source_ = source;
-}
-
-
-/*
- * Main function
- *
- * The return value determines the result length (kept in the target buffer).
- * However, if the target buffer is too small, the return value is greater
- * than tlength. The difference to tlength is the number of unconsumed source
- * characters at the time the buffer was full. In this case you should resize
- * the target buffer to the return value and call rcssmin again. Repeat as
- * often as needed.
- */
-static Py_ssize_t
-rcssmin(const rchar *source, rchar *target, Py_ssize_t slength,
- Py_ssize_t tlength, int keep_bang_comments)
-{
- rcssmin_ctx_t ctx_, *ctx = &ctx_;
- const rchar *tstart = target;
- rchar c;
-
- ctx->start = source;
- ctx->sentinel = source + slength;
- ctx->tsentinel = target + tlength;
- ctx->at_group = 0;
- ctx->in_macie5 = 0;
- ctx->in_rule = 0;
- ctx->keep_bang_comments = keep_bang_comments;
-
- while (source < ctx->sentinel && target < ctx->tsentinel) {
- c = *source++;
- if (RCSSMIN_IS_DULL(c)) {
- *target++ = c;
- continue;
- }
- else if (RCSSMIN_IS_SPACE(c)) {
- copy_space(&source, &target, ctx, NEED_SPACE_MAYBE);
- continue;
- }
-
- switch (c) {
-
- /* Escape */
- case U('\\'):
- copy_escape(&source, &target, ctx);
- continue;
-
- /* String */
- case U('"'): case U('\''):
- copy_string(&source, &target, ctx);
- continue;
-
- /* URL */
- case U('u'):
- copy_url(&source, &target, ctx);
- continue;
-
- /* IE7hack */
- case U('>'):
- copy_ie7hack(&source, &target, ctx);
- continue;
-
- /* @-group */
- case U('@'):
- copy_at_group(&source, &target, ctx);
- continue;
-
- /* ; */
- case U(';'):
- copy_semicolon(&source, &target, ctx);
- continue;
-
- /* :first-line|letter followed by [{,] */
- /* (apparently needed for IE6) */
- case U(':'):
- copy_first(&source, &target, ctx);
- continue;
-
- /* { */
- case U('{'):
- if (ctx->at_group)
- --ctx->at_group;
- else
- ++ctx->in_rule;
- *target++ = c;
- continue;
-
- /* } */
- case U('}'):
- if (ctx->in_rule)
- --ctx->in_rule;
- *target++ = c;
- continue;
-
- /* space starting with comment */
- case U('/'):
- (void)copy_space_comment(&source, &target, ctx, NEED_SPACE_MAYBE);
- continue;
-
- /* Fallback: copy character. Better safe than sorry. Should not be
- * reached, though */
- default:
- *target++ = c;
- continue;
- }
- }
-
- return
- (Py_ssize_t)(target - tstart) + (Py_ssize_t)(ctx->sentinel - source);
-}
-
-
-PyDoc_STRVAR(rcssmin_cssmin__doc__,
-"cssmin(style, keep_bang_comments=False)\n\
-\n\
-Minify CSS.\n\
-\n\
-:Note: This is a hand crafted C implementation built on the regex\n\
- semantics.\n\
-\n\
-:Parameters:\n\
- `style` : ``str``\n\
- CSS to minify\n\
-\n\
-:Return: Minified style\n\
-:Rtype: ``str``");
-
-static PyObject *
-rcssmin_cssmin(PyObject *self, PyObject *args, PyObject *kwds)
-{
- PyObject *style, *keep_bang_comments_ = NULL, *result;
- static char *kwlist[] = {"style", "keep_bang_comments", NULL};
- Py_ssize_t rlength, slength, length;
- int keep_bang_comments;
-#ifdef EXT2
- int uni;
-#define UOBJ "O"
-#endif
-#ifdef EXT3
-#define UOBJ "U"
-#endif
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, UOBJ "|O", kwlist,
- &style, &keep_bang_comments_))
- return NULL;
-
- if (!keep_bang_comments_)
- keep_bang_comments = 0;
- else {
- keep_bang_comments = PyObject_IsTrue(keep_bang_comments_);
- if (keep_bang_comments == -1)
- return NULL;
- }
-
-#ifdef EXT2
- if (PyUnicode_Check(style)) {
- if (!(style = PyUnicode_AsUTF8String(style)))
- return NULL;
- uni = 1;
- }
- else {
- if (!(style = PyObject_Str(style)))
- return NULL;
- uni = 0;
- }
-#endif
-
-#ifdef EXT3
- Py_INCREF(style);
-#define PyString_GET_SIZE PyUnicode_GET_SIZE
-#define PyString_AS_STRING PyUnicode_AS_UNICODE
-#define _PyString_Resize PyUnicode_Resize
-#define PyString_FromStringAndSize PyUnicode_FromUnicode
-#endif
-
- rlength = slength = PyString_GET_SIZE(style);
-
-again:
- if (!(result = PyString_FromStringAndSize(NULL, rlength))) {
- Py_DECREF(style);
- return NULL;
- }
- Py_BEGIN_ALLOW_THREADS
- length = rcssmin((rchar *)PyString_AS_STRING(style),
- (rchar *)PyString_AS_STRING(result),
- slength, rlength, keep_bang_comments);
- Py_END_ALLOW_THREADS
-
- if (length > rlength) {
- Py_DECREF(result);
- rlength = length;
- goto again;
- }
-
- Py_DECREF(style);
- if (length < 0) {
- Py_DECREF(result);
- return NULL;
- }
- if (length != rlength && _PyString_Resize(&result, length) == -1)
- return NULL;
-
-#ifdef EXT2
- if (uni) {
- style = PyUnicode_DecodeUTF8(PyString_AS_STRING(result),
- PyString_GET_SIZE(result), "strict");
- Py_DECREF(result);
- if (!style)
- return NULL;
- result = style;
- }
-#endif
- return result;
-}
-
-/* ------------------------ BEGIN MODULE DEFINITION ------------------------ */
-
-EXT_METHODS = {
- {"cssmin",
- (PyCFunction)rcssmin_cssmin, METH_VARARGS | METH_KEYWORDS,
- rcssmin_cssmin__doc__},
-
- {NULL} /* Sentinel */
-};
-
-PyDoc_STRVAR(EXT_DOCS_VAR,
-"C implementation of rcssmin\n\
-===========================\n\
-\n\
-C implementation of rcssmin.");
-
-
-EXT_DEFINE(EXT_MODULE_NAME, EXT_METHODS_VAR, EXT_DOCS_VAR);
-
-EXT_INIT_FUNC {
- PyObject *m;
-
- /* Create the module and populate stuff */
- if (!(m = EXT_CREATE(&EXT_DEFINE_VAR)))
- EXT_INIT_ERROR(NULL);
-
- EXT_ADD_UNICODE(m, "__author__", "Andr\xe9 Malo", "latin-1");
- EXT_ADD_STRING(m, "__docformat__", "restructuredtext en");
-
- EXT_INIT_RETURN(m);
-}
-
-/* ------------------------- END MODULE DEFINITION ------------------------- */
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.py
deleted file mode 100644
index ae1cefc3396..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/rcssmin.py
+++ /dev/null
@@ -1,374 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-r"""
-==============
- CSS Minifier
-==============
-
-CSS Minifier.
-
-The minifier is based on the semantics of the `YUI compressor`_\\, which
-itself is based on `the rule list by Isaac Schlueter`_\\.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-This module is a re-implementation aiming for speed instead of maximum
-compression, so it can be used at runtime (rather than during a preprocessing
-step). RCSSmin does syntactical compression only (removing spaces, comments
-and possibly semicolons). It does not provide semantic compression (like
-removing empty blocks, collapsing redundant properties etc). It does, however,
-support various CSS hacks (by keeping them working as intended).
-
-Here's a feature list:
-
-- Strings are kept, except that escaped newlines are stripped
-- Space/Comments before the very end or before various characters are
- stripped: ``:{});=>+],!`` (The colon (``:``) is a special case, a single
- space is kept if it's outside a ruleset.)
-- Space/Comments at the very beginning or after various characters are
- stripped: ``{}(=:>+[,!``
-- Optional space after unicode escapes is kept, resp. replaced by a simple
- space
-- whitespaces inside ``url()`` definitions are stripped
-- Comments starting with an exclamation mark (``!``) can be kept optionally.
-- All other comments and/or whitespace characters are replaced by a single
- space.
-- Multiple consecutive semicolons are reduced to one
-- The last semicolon within a ruleset is stripped
-- CSS Hacks supported:
-
- - IE7 hack (``>/**/``)
- - Mac-IE5 hack (``/*\\*/.../**/``)
- - The boxmodelhack is supported naturally because it relies on valid CSS2
- strings
- - Between ``:first-line`` and the following comma or curly brace a space is
- inserted. (apparently it's needed for IE6)
- - Same for ``:first-letter``
-
-rcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
-factor 100 or so (depending on the input). docs/BENCHMARKS in the source
-distribution contains the details.
-
-Both python 2 (>= 2.4) and python 3 are supported.
-
-.. _YUI compressor: https://github.com/yui/yuicompressor/
-
-.. _the rule list by Isaac Schlueter: https://github.com/isaacs/cssmin/
-"""
-if __doc__:
- # pylint: disable = W0622
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
-__docformat__ = "restructuredtext en"
-__license__ = "Apache License, Version 2.0"
-__version__ = '1.0.5'
-__all__ = ['cssmin']
-
-import re as _re
-
-
-def _make_cssmin(python_only=False):
- """
- Generate CSS minifier.
-
- :Parameters:
- `python_only` : ``bool``
- Use only the python variant. If true, the c extension is not even
- tried to be loaded.
-
- :Return: Minifier
- :Rtype: ``callable``
- """
- # pylint: disable = R0912, R0914, W0612
-
- if not python_only:
- try:
- import _rcssmin
- except ImportError:
- pass
- else:
- return _rcssmin.cssmin
-
- nl = r'(?:[\n\f]|\r\n?)' # pylint: disable = C0103
- spacechar = r'[\r\n\f\040\t]'
-
- unicoded = r'[0-9a-fA-F]{1,6}(?:[\040\n\t\f]|\r\n?)?'
- escaped = r'[^\n\r\f0-9a-fA-F]'
- escape = r'(?:\\(?:%(unicoded)s|%(escaped)s))' % locals()
-
- nmchar = r'[^\000-\054\056\057\072-\100\133-\136\140\173-\177]'
- #nmstart = r'[^\000-\100\133-\136\140\173-\177]'
- #ident = (r'(?:'
- # r'-?(?:%(nmstart)s|%(escape)s)%(nmchar)s*(?:%(escape)s%(nmchar)s*)*'
- #r')') % locals()
-
- comment = r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)'
-
- # only for specific purposes. The bang is grouped:
- _bang_comment = r'(?:/\*(!?)[^*]*\*+(?:[^/*][^*]*\*+)*/)'
-
- string1 = \
- r'(?:\047[^\047\\\r\n\f]*(?:\\[^\r\n\f][^\047\\\r\n\f]*)*\047)'
- string2 = r'(?:"[^"\\\r\n\f]*(?:\\[^\r\n\f][^"\\\r\n\f]*)*")'
- strings = r'(?:%s|%s)' % (string1, string2)
-
- nl_string1 = \
- r'(?:\047[^\047\\\r\n\f]*(?:\\(?:[^\r]|\r\n?)[^\047\\\r\n\f]*)*\047)'
- nl_string2 = r'(?:"[^"\\\r\n\f]*(?:\\(?:[^\r]|\r\n?)[^"\\\r\n\f]*)*")'
- nl_strings = r'(?:%s|%s)' % (nl_string1, nl_string2)
-
- uri_nl_string1 = r'(?:\047[^\047\\]*(?:\\(?:[^\r]|\r\n?)[^\047\\]*)*\047)'
- uri_nl_string2 = r'(?:"[^"\\]*(?:\\(?:[^\r]|\r\n?)[^"\\]*)*")'
- uri_nl_strings = r'(?:%s|%s)' % (uri_nl_string1, uri_nl_string2)
-
- nl_escaped = r'(?:\\%(nl)s)' % locals()
-
- space = r'(?:%(spacechar)s|%(comment)s)' % locals()
-
- ie7hack = r'(?:>/\*\*/)'
-
- uri = (r'(?:'
- # noqa pylint: disable = C0330
- r'(?:[^\000-\040"\047()\\\177]*'
- r'(?:%(escape)s[^\000-\040"\047()\\\177]*)*)'
- r'(?:'
- r'(?:%(spacechar)s+|%(nl_escaped)s+)'
- r'(?:'
- r'(?:[^\000-\040"\047()\\\177]|%(escape)s|%(nl_escaped)s)'
- r'[^\000-\040"\047()\\\177]*'
- r'(?:%(escape)s[^\000-\040"\047()\\\177]*)*'
- r')+'
- r')*'
- r')') % locals()
-
- nl_unesc_sub = _re.compile(nl_escaped).sub
-
- uri_space_sub = _re.compile((
- r'(%(escape)s+)|%(spacechar)s+|%(nl_escaped)s+'
- ) % locals()).sub
- uri_space_subber = lambda m: m.groups()[0] or ''
-
- space_sub_simple = _re.compile((
- r'[\r\n\f\040\t;]+|(%(comment)s+)'
- ) % locals()).sub
- space_sub_banged = _re.compile((
- r'[\r\n\f\040\t;]+|(%(_bang_comment)s+)'
- ) % locals()).sub
-
- post_esc_sub = _re.compile(r'[\r\n\f\t]+').sub
-
- main_sub = _re.compile((
- # noqa pylint: disable = C0330
- r'([^\\"\047u>@\r\n\f\040\t/;:{}]+)'
- r'|(?<=[{}(=:>+[,!])(%(space)s+)'
- r'|^(%(space)s+)'
- r'|(%(space)s+)(?=(([:{});=>+\],!])|$)?)'
- r'|;(%(space)s*(?:;%(space)s*)*)(?=(\})?)'
- r'|(\{)'
- r'|(\})'
- r'|(%(strings)s)'
- r'|(?<!%(nmchar)s)url\(%(spacechar)s*('
- r'%(uri_nl_strings)s'
- r'|%(uri)s'
- r')%(spacechar)s*\)'
- r'|(@(?:'
- r'[mM][eE][dD][iI][aA]'
- r'|[sS][uU][pP][pP][oO][rR][tT][sS]'
- r'|[dD][oO][cC][uU][mM][eE][nN][tT]'
- r'|(?:-(?:'
- r'[wW][eE][bB][kK][iI][tT]|[mM][oO][zZ]|[oO]|[mM][sS]'
- r')-)?'
- r'[kK][eE][yY][fF][rR][aA][mM][eE][sS]'
- r'))(?!%(nmchar)s)'
- r'|(%(ie7hack)s)(%(space)s*)'
- r'|(:[fF][iI][rR][sS][tT]-[lL]'
- r'(?:[iI][nN][eE]|[eE][tT][tT][eE][rR]))'
- r'(%(space)s*)(?=[{,])'
- r'|(%(nl_strings)s)'
- r'|(%(escape)s[^\\"\047u>@\r\n\f\040\t/;:{}]*)'
- ) % locals()).sub
-
- #print main_sub.__self__.pattern
-
- def main_subber(keep_bang_comments):
- """ Make main subber """
- in_macie5, in_rule, at_group = [0], [0], [0]
-
- if keep_bang_comments:
- space_sub = space_sub_banged
-
- def space_subber(match):
- """ Space|Comment subber """
- if match.lastindex:
- group1, group2 = match.group(1, 2)
- if group2:
- if group1.endswith(r'\*/'):
- in_macie5[0] = 1
- else:
- in_macie5[0] = 0
- return group1
- elif group1:
- if group1.endswith(r'\*/'):
- if in_macie5[0]:
- return ''
- in_macie5[0] = 1
- return r'/*\*/'
- elif in_macie5[0]:
- in_macie5[0] = 0
- return '/**/'
- return ''
- else:
- space_sub = space_sub_simple
-
- def space_subber(match):
- """ Space|Comment subber """
- if match.lastindex:
- if match.group(1).endswith(r'\*/'):
- if in_macie5[0]:
- return ''
- in_macie5[0] = 1
- return r'/*\*/'
- elif in_macie5[0]:
- in_macie5[0] = 0
- return '/**/'
- return ''
-
- def fn_space_post(group):
- """ space with token after """
- if group(5) is None or (
- group(6) == ':' and not in_rule[0] and not at_group[0]):
- return ' ' + space_sub(space_subber, group(4))
- return space_sub(space_subber, group(4))
-
- def fn_semicolon(group):
- """ ; handler """
- return ';' + space_sub(space_subber, group(7))
-
- def fn_semicolon2(group):
- """ ; handler """
- if in_rule[0]:
- return space_sub(space_subber, group(7))
- return ';' + space_sub(space_subber, group(7))
-
- def fn_open(_):
- """ { handler """
- if at_group[0]:
- at_group[0] -= 1
- else:
- in_rule[0] = 1
- return '{'
-
- def fn_close(_):
- """ } handler """
- in_rule[0] = 0
- return '}'
-
- def fn_at_group(group):
- """ @xxx group handler """
- at_group[0] += 1
- return group(13)
-
- def fn_ie7hack(group):
- """ IE7 Hack handler """
- if not in_rule[0] and not at_group[0]:
- in_macie5[0] = 0
- return group(14) + space_sub(space_subber, group(15))
- return '>' + space_sub(space_subber, group(15))
-
- table = (
- # noqa pylint: disable = C0330
- None,
- None,
- None,
- None,
- fn_space_post, # space with token after
- fn_space_post, # space with token after
- fn_space_post, # space with token after
- fn_semicolon, # semicolon
- fn_semicolon2, # semicolon
- fn_open, # {
- fn_close, # }
- lambda g: g(11), # string
- lambda g: 'url(%s)' % uri_space_sub(uri_space_subber, g(12)),
- # url(...)
- fn_at_group, # @xxx expecting {...}
- None,
- fn_ie7hack, # ie7hack
- None,
- lambda g: g(16) + ' ' + space_sub(space_subber, g(17)),
- # :first-line|letter followed
- # by [{,] (apparently space
- # needed for IE6)
- lambda g: nl_unesc_sub('', g(18)), # nl_string
- lambda g: post_esc_sub(' ', g(19)), # escape
- )
-
- def func(match):
- """ Main subber """
- idx, group = match.lastindex, match.group
- if idx > 3:
- return table[idx](group)
-
- # shortcuts for frequent operations below:
- elif idx == 1: # not interesting
- return group(1)
- #else: # space with token before or at the beginning
- return space_sub(space_subber, group(idx))
-
- return func
-
- def cssmin(style, keep_bang_comments=False): # pylint: disable = W0621
- """
- Minify CSS.
-
- :Parameters:
- `style` : ``str``
- CSS to minify
-
- `keep_bang_comments` : ``bool``
- Keep comments starting with an exclamation mark? (``/*!...*/``)
-
- :Return: Minified style
- :Rtype: ``str``
- """
- return main_sub(main_subber(keep_bang_comments), style)
-
- return cssmin
-
-cssmin = _make_cssmin()
-
-
-if __name__ == '__main__':
- def main():
- """ Main """
- import sys as _sys
- keep_bang_comments = (
- '-b' in _sys.argv[1:]
- or '-bp' in _sys.argv[1:]
- or '-pb' in _sys.argv[1:]
- )
- if '-p' in _sys.argv[1:] or '-bp' in _sys.argv[1:] \
- or '-pb' in _sys.argv[1:]:
- global cssmin # pylint: disable = W0603
- cssmin = _make_cssmin(python_only=True)
- _sys.stdout.write(cssmin(
- _sys.stdin.read(), keep_bang_comments=keep_bang_comments
- ))
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/run_tests.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/run_tests.py
deleted file mode 100755
index 9128d743586..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/run_tests.py
+++ /dev/null
@@ -1,166 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-#
-# Copyright 2014
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===========
- Run tests
-===========
-
-Run tests.
-"""
-__author__ = "Andr\xe9 Malo"
-__author__ = getattr(__author__, 'decode', lambda x: __author__)('latin-1')
-__docformat__ = "restructuredtext en"
-
-import os as _os
-import re as _re
-import sys as _sys
-
-from _setup import shell
-from _setup import term
-
-
-def run_tests(basedir, libdir):
- """ Run output based tests """
- import rcssmin as _rcssmin
- py_cssmin = _rcssmin._make_cssmin(python_only=True)
- c_cssmin = _rcssmin._make_cssmin(python_only=False)
-
- def run_test(example, output_file):
- """ Run it """
- try:
- fp = open(example, 'r')
- except IOError:
- return
- else:
- try:
- input = fp.read()
- finally:
- fp.close()
-
- def load_output(filename):
- try:
- fp = open(filename, 'r')
- except IOError:
- return None
- else:
- try:
- output = fp.read()
- finally:
- fp.close()
- output = output.strip()
- if _re.search(r'(?<!\\)(?:\\\\)*\\[0-9a-zA-Z]{1,6}$', output):
- output += ' '
- return output
-
- output = load_output(output_file)
- output_b = load_output(output_file + '.b')
-
- def do_test(cssmin, output, **options):
- try:
- genout = cssmin(input, **options)
- except (KeyboardInterrupt, SystemExit):
- raise
- except:
- return 1, "%(RED)s exc%(NORMAL)s "
- else:
- if output is None:
- return 1, "%(RED)smiss%(NORMAL)s "
- elif genout == output or genout == output.rstrip():
- return 0, "%(GREEN)sOK%(NORMAL)s "
- else:
- return 1, "%(RED)sfail%(NORMAL)s "
-
- erred, out = do_test(py_cssmin, output)
- erred, c_out = do_test(c_cssmin, output)
- erred, out_b = do_test(py_cssmin, output_b, keep_bang_comments=True)
- erred, c_out_b = do_test(c_cssmin, output_b, keep_bang_comments=True)
-
- term.write(
- "%(out)s %(out_b)s | %(c_out)s %(c_out_b)s - %%(example)s\n"
- % locals(),
- example=_os.path.basename(example),
- )
- return erred
-
- # end
- # begin main test code
-
- erred = 0
- basedir = shell.native(basedir)
- strip = len(basedir) - len(_os.path.basename(basedir))
- for dirname, dirs, files in shell.walk(basedir):
- dirs[:] = [
- item for item in dirs if item not in ('.svn', '.git', 'out')
- ]
- dirs.sort()
- files = [item for item in files if item.endswith('.css')]
- if not files:
- continue
- if not _os.path.isdir(_os.path.join(basedir, dirname, 'out')):
- continue
- term.yellow("---> %s" % (dirname[strip:],))
- files.sort()
- for filename in files:
- if run_test(
- _os.path.join(dirname, filename),
- _os.path.join(dirname, 'out', filename[:-4] + '.out'),
- ): erred = 1
- term.yellow("<--- %s" % (dirname[strip:],))
- return erred
-
-
-def main():
- """ Main """
- basedir, libdir = None, None
- accept_opts = True
- args = []
- for arg in _sys.argv[1:]:
- if accept_opts:
- if arg == '--':
- accept_opts = False
- continue
- elif arg == '-q':
- term.write = term.green = term.red = term.yellow = \
- term.announce = \
- lambda fmt, **kwargs: None
- continue
- elif arg == '-p':
- info = {}
- for key in term.terminfo():
- info[key] = ''
- info['ERASE'] = '\n'
- term.terminfo.info = info
- continue
- elif arg.startswith('-'):
- _sys.stderr.write("Unrecognized option %r\n" % (arg,))
- return 2
- args.append(arg)
- if len(args) > 2:
- _sys.stderr.write("Too many arguments\n")
- return 2
- elif len(args) < 1:
- _sys.stderr.write("Missing arguments\n")
- return 2
- basedir = args[0]
- if len(args) > 1:
- libdir = args[1]
- return run_tests(basedir, libdir)
-
-
-if __name__ == '__main__':
- _sys.exit(main())
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/setup.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/setup.py
deleted file mode 100644
index d4ca570bf29..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rcssmin/setup.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-#
-# Copyright 2006 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-
-import sys as _sys
-from _setup import run
-
-
-def setup(args=None, _manifest=0):
- """ Main setup function """
- from _setup.ext import Extension
-
- if 'java' in _sys.platform.lower():
- # no c extension for jython
- ext = None
- else:
- ext=[Extension('_rcssmin', sources=['rcssmin.c'])]
-
- return run(script_args=args, ext=ext, manifest_only=_manifest)
-
-
-def manifest():
- """ Create List of packaged files """
- return setup((), _manifest=1)
-
-
-if __name__ == '__main__':
- setup()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/LICENSE b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/LICENSE
deleted file mode 100644
index 261eeb9e9f8..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/MANIFEST b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/MANIFEST
deleted file mode 100644
index 82ae367f7dd..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/MANIFEST
+++ /dev/null
@@ -1,56 +0,0 @@
-LICENSE
-MANIFEST
-PKG-INFO
-README.rst
-_setup/__init__.py
-_setup/include/cext.h
-_setup/py2/__init__.py
-_setup/py2/commands.py
-_setup/py2/data.py
-_setup/py2/dist.py
-_setup/py2/ext.py
-_setup/py2/setup.py
-_setup/py2/shell.py
-_setup/py2/util.py
-_setup/py3/__init__.py
-_setup/py3/commands.py
-_setup/py3/data.py
-_setup/py3/dist.py
-_setup/py3/ext.py
-_setup/py3/setup.py
-_setup/py3/shell.py
-_setup/py3/util.py
-bench
-bench.sh
-bench/__init__.py
-bench/apiviewer.js
-bench/bootstrap.js
-bench/jquery-1.7.1.js
-bench/jsmin.c
-bench/jsmin.py
-bench/jsmin_2_0_9.py
-bench/knockout-2.0.0.js
-bench/main.py
-bench/markermanager.js
-bench/write.py
-docs/BENCHMARKS
-docs/CHANGES
-docs/CLASSIFIERS
-docs/DESCRIPTION
-docs/PROVIDES
-docs/SUMMARY
-docs/apidoc/api-objects.txt
-docs/apidoc/crarr.png
-docs/apidoc/epydoc.css
-docs/apidoc/epydoc.js
-docs/apidoc/help.html
-docs/apidoc/identifier-index.html
-docs/apidoc/index.html
-docs/apidoc/module-tree.html
-docs/apidoc/redirect.html
-docs/apidoc/rjsmin-module.html
-docs/apidoc/rjsmin-pysrc.html
-package.cfg
-rjsmin.c
-rjsmin.py
-setup.py
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/PKG-INFO b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/PKG-INFO
deleted file mode 100644
index 1814f484649..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/PKG-INFO
+++ /dev/null
@@ -1,303 +0,0 @@
-Metadata-Version: 1.1
-Name: rjsmin
-Version: 1.0.10
-Summary: Javascript Minifier
-Home-page: http://opensource.perlig.de/rjsmin/
-Author: André Malo
-Author-email: nd@perlig.de
-License: Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
-Download-URL: http://storage.perlig.de/rjsmin/
-Description: =====================
- Javascript Minifier
- =====================
-
- rJSmin is a javascript minifier written in python.
-
- The minifier is based on the semantics of `jsmin.c by Douglas Crockford`_\.
-
- The module is a re-implementation aiming for speed, so it can be used at
- runtime (rather than during a preprocessing step). Usually it produces the
- same results as the original ``jsmin.c``. It differs in the following ways:
-
- - there is no error detection: unterminated string, regex and comment
- literals are treated as regular javascript code and minified as such.
- - Control characters inside string and regex literals are left untouched; they
- are not converted to spaces (nor to \n)
- - Newline characters are not allowed inside string and regex literals, except
- for line continuations in string literals (ECMA-5).
- - "return /regex/" is recognized correctly.
- - "+ +" and "- -" sequences are not collapsed to '++' or '--'
- - Newlines before ! operators are removed more sensibly
- - Comments starting with an exclamation mark (``!``) can be kept optionally
- - rJSmin does not handle streams, but only complete strings. (However, the
- module provides a "streamy" interface).
-
- Since most parts of the logic are handled by the regex engine it's way faster
- than the original python port of ``jsmin.c`` by Baruch Even. The speed factor
- varies between about 6 and 55 depending on input and python version (it gets
- faster the more compressed the input already is). Compared to the
- speed-refactored python port by Dave St.Germain the performance gain is less
- dramatic but still between 3 and 50 (for huge inputs)). See the
- docs/BENCHMARKS file for details.
-
- rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.
-
- Both python 2 (>=2.4) and python 3 are supported.
-
- .. _jsmin.c by Douglas Crockford: http://www.crockford.com/javascript/jsmin.c
-
-
- Copyright and License
- ~~~~~~~~~~~~~~~~~~~~~
-
- Copyright 2011 - 2014
- André Malo or his licensors, as applicable.
-
- The whole package (except for the files in the bench/ directory) is
- distributed under the Apache License Version 2.0. You'll find a copy in the
- root directory of the distribution or online at:
- <http://www.apache.org/licenses/LICENSE-2.0>.
-
-
- Bugs
- ~~~~
-
- No bugs, of course. ;-)
- But if you've found one or have an idea how to improve rjsmin, feel free
- to send a pull request on `github <https://github.com/ndparker/rjsmin>`_
- or send a mail to <rjsmin-bugs@perlig.de>.
-
-
- Author Information
- ~~~~~~~~~~~~~~~~~~
-
- André "nd" Malo <nd perlig.de>
- GPG: 0x8103A37E
-
-
- If God intended people to be naked, they would be born that way.
- -- Oscar Wilde
-
- .. vim:tw=72 syntax=rest
-Keywords: Javascript,Minimization
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Environment :: Web Environment
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved
-Classifier: License :: OSI Approved :: Apache License, Version 2.0
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: C
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: Jython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
-Classifier: Topic :: Software Development :: Libraries
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Text Processing
-Classifier: Topic :: Text Processing :: Filters
-Classifier: Topic :: Utilities
-Provides: rjsmin (1.0)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.chromium b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.chromium
deleted file mode 100644
index 022e86b94f2..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.chromium
+++ /dev/null
@@ -1,15 +0,0 @@
-Short Name: rJSmin
-URL: http://opensource.perlig.de/rjsmin/
-Version: 1.0.10
-License: Apache 2.0
-License File: NOT_SHIPPED
-Security Critical: no
-
-Description:
-rJSmin is a javascript minifier written in python.
-The minifier is based on the semantics of jsmin.c by Douglas Crockford.
-The module is a re-implementation aiming for speed, so it can be used at runtime (rather than during a preprocessing step). Usually it produces the same results as the original jsmin.c.
-
-Modifications made:
- - Removed the bench.sh since the file doesn't have the licensing info and
- caused license checker to fail.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.rst b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.rst
deleted file mode 100644
index efcc28e9ea8..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/README.rst
+++ /dev/null
@@ -1,141 +0,0 @@
-.. -*- coding: utf-8 -*-
-
-===========================================
- rJSmin - A Javascript Minifier For Python
-===========================================
-
-TABLE OF CONTENTS
------------------
-
-1. Introduction
-2. Copyright and License
-3. System Requirements
-4. Installation
-5. Documentation
-6. Bugs
-7. Author Information
-
-
-INTRODUCTION
-------------
-
-rJSmin is a javascript minifier written in python.
-
-The minifier is based on the semantics of `jsmin.c by Douglas Crockford`_\.
-
-The module is a re-implementation aiming for speed, so it can be used at
-runtime (rather than during a preprocessing step). Usually it produces the
-same results as the original ``jsmin.c``. It differs in the following ways:
-
-- there is no error detection: unterminated string, regex and comment
- literals are treated as regular javascript code and minified as such.
-- Control characters inside string and regex literals are left untouched; they
- are not converted to spaces (nor to \\n)
-- Newline characters are not allowed inside string and regex literals, except
- for line continuations in string literals (ECMA-5).
-- "return /regex/" is recognized correctly.
-- "+ +" and "- -" sequences are not collapsed to '++' or '--'
-- Newlines before ! operators are removed more sensibly
-- Comments starting with an exclamation mark (``!``) can be kept optionally
-- rJSmin does not handle streams, but only complete strings. (However, the
- module provides a "streamy" interface).
-
-Since most parts of the logic are handled by the regex engine it's way faster
-than the original python port of ``jsmin.c`` by Baruch Even. The speed factor
-varies between about 6 and 55 depending on input and python version (it gets
-faster the more compressed the input already is). Compared to the
-speed-refactored python port by Dave St.Germain the performance gain is less
-dramatic but still between 3 and 50 (for huge inputs). See the docs/BENCHMARKS
-file for details.
-
-rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.
-
-.. _jsmin.c by Douglas Crockford: http://www.crockford.com/javascript/jsmin.c
-
-
-COPYRIGHT AND LICENSE
----------------------
-
-Copyright 2011 - 2014
-André Malo or his licensors, as applicable.
-
-The whole package (except for the files in the bench/ directory)
-is distributed under the Apache License Version 2.0. You'll find a copy in the
-root directory of the distribution or online at:
-<http://www.apache.org/licenses/LICENSE-2.0>.
-
-
-SYSTEM REQUIREMENTS
--------------------
-
-Both python 2 (>=2.4) and python 3 are supported.
-
-
-INSTALLATION
-------------
-
-Using pip
-~~~~~~~~~
-
-$ pip install rjsmin
-
-
-Using distutils
-~~~~~~~~~~~~~~~
-
-$ python setup.py install
-
-The following extra options to the install command may be of interest:
-
- --without-c-extensions Don't install C extensions
- --without-docs Do not install documentation files
-
-
-Drop-in
-~~~~~~~
-
-rJSmin effectively consists of two files: rjsmin.py and rjsmin.c, the
-latter being entirely optional. So, for simple integration you can just
-copy rjsmin.py into your project and use it.
-
-
-DOCUMENTATION
--------------
-
-A generated API documentation is available in the docs/apidoc/ directory.
-But you can just look into the module. It provides a simple function,
-called jsmin which takes the script as a string and returns the minified
-script as a string.
-
-The module additionally provides a "streamy" interface similar to the one
-jsmin.c provides:
-
-$ python -mrjsmin <script >minified
-
-It takes two options:
-
- -b Keep bang-comments (Comments starting with an exclamation mark)
- -p Force using the python implementation (not the C implementation)
-
-The latest documentation is also available online at
-<http://opensource.perlig.de/rjsmin/>.
-
-
-BUGS
-----
-
-No bugs, of course. ;-)
-But if you've found one or have an idea how to improve rjsmin, feel free
-to send a pull request on `github <https://github.com/ndparker/rjsmin>`_
-or send a mail to <rjsmin-bugs@perlig.de>.
-
-
-AUTHOR INFORMATION
-------------------
-
-André "nd" Malo <nd@perlig.de>
-GPG: 0x8103A37E
-
-
- If God intended people to be naked, they would be born that way.
- -- Oscar Wilde
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/__init__.py
deleted file mode 100644
index 77dc23c8412..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/__init__.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- Package _setup
-================
-
-This package provides tools for main package setup.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import os as _os
-import sys as _sys
-
-if _sys.version_info[0] == 2:
- __path__ = [_os.path.join(__path__[0], 'py2')]
- __author__ = __author__.decode('latin-1')
-elif _sys.version_info[0] == 3:
- __path__ = [_os.path.join(__path__[0], 'py3')]
-else:
- raise RuntimeError("Unsupported python version")
-del _os, _sys
-
-from _setup.setup import run # pylint: disable = W0611
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/include/cext.h b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/include/cext.h
deleted file mode 100644
index 47b6f5b9c11..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/include/cext.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright 2006 - 2014
- * Andr\xe9 Malo or his licensors, as applicable
- *
- * 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.
- */
-
-/*
- * central naming stuff
- */
-
-#ifndef SETUP_CEXT_H
-#define SETUP_CEXT_H
-
-#ifndef EXT_MODULE
-#error EXT_MODULE must be defined outside of this file (-DEXT_MODULE=...)
-#endif
-
-/*
- * include core header files
- */
-#define PY_SSIZE_T_CLEAN
-
-#include "Python.h"
-#include "structmember.h"
-
-/*
- * define our helper macros depending on the stuff above
- */
-#define STRINGIFY(n) STRINGIFY_HELPER(n)
-#define STRINGIFY_HELPER(n) #n
-#define CONCATENATE(first, second) CONCATENATE_HELPER(first, second)
-#define CONCATENATE_HELPER(first, second) first##second
-
-#define EXT_MODULE_NAME STRINGIFY(EXT_MODULE)
-#ifdef EXT_PACKAGE
-#define EXT_PACKAGE_NAME STRINGIFY(EXT_PACKAGE)
-#define EXT_MODULE_PATH EXT_PACKAGE_NAME "." EXT_MODULE_NAME
-#else
-#define EXT_PACKAGE_NAME ""
-#define EXT_MODULE_PATH EXT_MODULE_NAME
-#endif
-
-#define EXT_DOCS_VAR CONCATENATE(var, CONCATENATE(EXT_MODULE, __doc__))
-#define EXT_METHODS_VAR CONCATENATE(var, CONCATENATE(EXT_MODULE, _methods))
-#define EXT_METHODS static PyMethodDef EXT_METHODS_VAR[]
-
-#define EXT_DEFINE_VAR CONCATENATE(var, CONCATENATE(EXT_MODULE, _module))
-
-/* Py3K Support */
-#if PY_MAJOR_VERSION >= 3
-
-#define EXT3
-
-#ifndef PyMODINIT_FUNC
-#define EXT_INIT_FUNC PyObject *CONCATENATE(PyInit_, EXT_MODULE)(void)
-#else
-#define EXT_INIT_FUNC PyMODINIT_FUNC CONCATENATE(PyInit_, EXT_MODULE)(void)
-#endif
-
-#define EXT_DEFINE(name, methods, doc) \
-static struct PyModuleDef EXT_DEFINE_VAR = { \
- PyModuleDef_HEAD_INIT, \
- name, \
- doc, \
- -1, \
- methods, \
- NULL, \
- NULL, \
- NULL, \
- NULL \
-}
-
-#define EXT_CREATE(def) (PyModule_Create(def))
-#define EXT_INIT_ERROR(module) do {Py_XDECREF(module); return NULL;} while(0)
-#define EXT_INIT_RETURN(module) return module
-
-#else /* end py3k */
-
-#define EXT2
-
-#ifndef PyMODINIT_FUNC
-#define EXT_INIT_FUNC void CONCATENATE(init, EXT_MODULE)(void)
-#else
-#define EXT_INIT_FUNC PyMODINIT_FUNC CONCATENATE(init, EXT_MODULE)(void)
-#endif
-
-#define EXT_DEFINE__STRUCT \
- CONCATENATE(struct, CONCATENATE(EXT_MODULE, _module))
-
-struct EXT_DEFINE__STRUCT {
- char *m_name;
- char *m_doc;
- PyMethodDef *m_methods;
-};
-#define EXT_DEFINE(name, methods, doc) \
-static struct EXT_DEFINE__STRUCT EXT_DEFINE_VAR = { \
- name, \
- doc, \
- methods \
-}
-
-#define EXT_CREATE(def) ((def)->m_doc \
- ? Py_InitModule3((def)->m_name, (def)->m_methods, (def)->m_doc) \
- : Py_InitModule((def)->m_name, (def)->m_methods) \
-)
-#define EXT_INIT_ERROR(module) return
-#define EXT_INIT_RETURN(module) return
-
-#endif /* end py2K */
-
-#define EXT_INIT_TYPE(module, type) do { \
- if (PyType_Ready(type) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_TYPE(module, name, type) do { \
- Py_INCREF(type); \
- if (PyModule_AddObject(module, name, (PyObject *)(type)) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_UNICODE(module, name, string, encoding) do { \
- if (PyModule_AddObject( \
- module, \
- name, \
- PyUnicode_Decode( \
- string, \
- sizeof(string) - 1, \
- encoding, \
- "strict" \
- )) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_STRING(module, name, string) do { \
- if (PyModule_AddStringConstant(module, name, string) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-#define EXT_ADD_INT(module, name, number) do { \
- if (PyModule_AddIntConstant(module, name, number) < 0) \
- EXT_INIT_ERROR(module); \
-} while (0)
-
-
-/* PEP 353 support, implemented as of python 2.5 */
-#if PY_VERSION_HEX < 0x02050000
-typedef int Py_ssize_t;
-#define PyInt_FromSsize_t(arg) PyInt_FromLong((long)arg)
-#define PyInt_AsSsize_t(arg) (int)PyInt_AsLong(arg)
-#define PY_SSIZE_T_MAX ((Py_ssize_t)INT_MAX)
-#endif
-
-/*
- * some helper macros (Python 2.4)
- */
-#ifndef Py_VISIT
-#define Py_VISIT(op) do { \
- if (op) { \
- int vret = visit((op), arg); \
- if (vret) return vret; \
- } \
-} while (0)
-#endif
-
-#ifdef Py_CLEAR
-#undef Py_CLEAR
-#endif
-#define Py_CLEAR(op) do { \
- if (op) { \
- PyObject *tmp__ = (PyObject *)(op); \
- (op) = NULL; \
- Py_DECREF(tmp__); \
- } \
-} while (0)
-
-#ifndef Py_RETURN_NONE
-#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
-#endif
-
-#ifndef Py_RETURN_FALSE
-#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
-#endif
-
-#ifndef Py_RETURN_TRUE
-#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
-#endif
-
-/* Macros for inline documentation. (Python 2.3) */
-#ifndef PyDoc_VAR
-#define PyDoc_VAR(name) static char name[]
-#endif
-
-#ifndef PyDoc_STRVAR
-#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
-#endif
-
-#ifndef PyDoc_STR
-#ifdef WITH_DOC_STRINGS
-#define PyDoc_STR(str) str
-#else
-#define PyDoc_STR(str) ""
-#endif
-#endif
-
-/* Basestring check (basestring introduced in Python 2.3) */
-#if PY_VERSION_HEX < 0x02030000
-#define BaseString_Check(type) ( \
- PyObject_TypeCheck((type), &PyString_Type) \
- || PyObject_TypeCheck((type), &PyUnicode_Type) \
-)
-#else
-#define BaseString_Check(type) PyObject_TypeCheck((type), &PyBaseString_Type)
-#endif
-
-#define GENERIC_ALLOC(type) \
- ((void *)((PyTypeObject *)type)->tp_alloc(type, (Py_ssize_t)0))
-
-/* PyPy doesn't define it */
-#ifndef PyType_IS_GC
-#define PyType_IS_GC(t) PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
-#endif
-
-#define DEFINE_GENERIC_DEALLOC(prefix) \
-static void prefix##_dealloc(void *self) \
-{ \
- if (PyType_IS_GC(((PyObject *)self)->ob_type)) \
- PyObject_GC_UnTrack(self); \
- (void)prefix##_clear(self); \
- ((PyObject *)self)->ob_type->tp_free((PyObject *)self); \
-}
-
-#endif /* SETUP_CEXT_H */
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/__init__.py
deleted file mode 100644
index 9582ecc1087..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- Package _setup
-================
-
-This package provides tools for main package setup.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from _setup.setup import run # pylint: disable = W0611
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/commands.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/commands.py
deleted file mode 100644
index a41b166e0a5..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/commands.py
+++ /dev/null
@@ -1,267 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Command extenders
-===================
-
-Command extenders.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import fancy_getopt as _fancy_getopt
-from distutils.command import build as _build
-from distutils.command import build_ext as _build_ext
-from distutils.command import install as _install
-from distutils.command import install_data as _install_data
-from distutils.command import install_lib as _install_lib
-import os as _os
-
-from _setup.util import log
-
-_option_defaults = {}
-_option_inherits = {}
-_option_finalizers = {}
-_command_mapping = {
- 'install': 'Install',
- 'install_data': 'InstallData',
- 'install_lib': 'InstallLib',
- 'build': 'Build',
- 'build_ext': 'BuildExt',
-}
-
-
-def add_option(command, long_name, help_text, short_name=None, default=None,
- inherit=None):
- """ Add an option """
- try:
- command_class = globals()[_command_mapping[command]]
- except KeyError:
- raise ValueError("Unknown command %r" % (command,))
- for opt in command_class.user_options:
- if opt[0] == long_name:
- break
- else:
- opt = (long_name, short_name, help_text)
- command_class.user_options.append(opt)
- if not long_name.endswith('='):
- command_class.boolean_options.append(long_name)
- attr_name = _fancy_getopt.translate_longopt(long_name)
- else:
- attr_name = _fancy_getopt.translate_longopt(long_name[:-1])
- if not _option_defaults.has_key(command):
- _option_defaults[command] = []
- if inherit is not None:
- if isinstance(inherit, (str, unicode)):
- inherit = [inherit]
- for i_inherit in inherit:
- add_option(
- i_inherit, long_name, help_text, short_name, default
- )
- default = None
- if not _option_inherits.has_key(command):
- _option_inherits[command] = []
- for i_inherit in inherit:
- for i_command, opt_name in _option_inherits[command]:
- if i_command == i_inherit and opt_name == attr_name:
- break
- else:
- _option_inherits[command].append((i_inherit, attr_name))
- _option_defaults[command].append((attr_name, default))
-
-
-def add_finalizer(command, key, func):
- """ Add finalizer """
- if not _option_finalizers.has_key(command):
- _option_finalizers[command] = {}
- if not _option_finalizers[command].has_key(key):
- _option_finalizers[command][key] = func
-
-
-class Install(_install.install):
- """ Extended installer to reflect the additional data options """
- user_options = _install.install.user_options + [
- ('single-version-externally-managed', None,
- "Compat option. Does not a thing."),
- ]
- boolean_options = _install.install.boolean_options + [
- 'single-version-externally-managed'
- ]
-
- def initialize_options(self):
- """ Prepare for new options """
- _install.install.initialize_options(self)
- self.single_version_externally_managed = None
- if _option_defaults.has_key('install'):
- for opt_name, default in _option_defaults['install']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install.install.finalize_options(self)
- if _option_inherits.has_key('install'):
- for parent, opt_name in _option_inherits['install']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('install'):
- for func in _option_finalizers['install'].values():
- func(self)
-
-
-class InstallData(_install_data.install_data):
- """ Extended data installer """
- user_options = _install_data.install_data.user_options + []
- boolean_options = _install_data.install_data.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_data.install_data.initialize_options(self)
- if _option_defaults.has_key('install_data'):
- for opt_name, default in _option_defaults['install_data']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_data.install_data.finalize_options(self)
- if _option_inherits.has_key('install_data'):
- for parent, opt_name in _option_inherits['install_data']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('install_data'):
- for func in _option_finalizers['install_data'].values():
- func(self)
-
-
-class InstallLib(_install_lib.install_lib):
- """ Extended lib installer """
- user_options = _install_lib.install_lib.user_options + []
- boolean_options = _install_lib.install_lib.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_lib.install_lib.initialize_options(self)
- if _option_defaults.has_key('install_lib'):
- for opt_name, default in _option_defaults['install_lib']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_lib.install_lib.finalize_options(self)
- if _option_inherits.has_key('install_lib'):
- for parent, opt_name in _option_inherits['install_lib']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('install_lib'):
- for func in _option_finalizers['install_lib'].values():
- func(self)
-
-
-class BuildExt(_build_ext.build_ext):
- """
- Extended extension builder class
-
- This class allows extensions to provide a ``check_prerequisites`` method
- which is called before actually building it. The method takes the
- `BuildExt` instance and returns whether the extension should be skipped or
- not.
- """
-
- def initialize_options(self):
- """ Prepare for new options """
- _build_ext.build_ext.initialize_options(self)
- if _option_defaults.has_key('build_ext'):
- for opt_name, default in _option_defaults['build_ext']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build_ext.build_ext.finalize_options(self)
- if _option_inherits.has_key('build_ext'):
- for parent, opt_name in _option_inherits['build_ext']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('build_ext'):
- for func in _option_finalizers['build_ext'].values():
- func(self)
-
- def build_extension(self, ext):
- """
- Build C extension - with extended functionality
-
- The following features are added here:
-
- - ``ext.check_prerequisites`` is called before the extension is being
- built. See `Extension` for details. If the method does not exist,
- simply no check will be run.
- - The macros ``EXT_PACKAGE`` and ``EXT_MODULE`` will be filled (or
- unset) depending on the extensions name, but only if they are not
- already defined.
-
- :Parameters:
- `ext` : `Extension`
- The extension to build. If it's a pure
- ``distutils.core.Extension``, simply no prequisites check is
- applied.
-
- :Return: whatever ``distutils.command.build_ext.build_ext`` returns
- :Rtype: any
- """
- # handle name macros
- macros = dict(ext.define_macros or ())
- tup = ext.name.split('.')
- if len(tup) == 1:
- pkg, mod = None, tup[0]
- else:
- pkg, mod = '.'.join(tup[:-1]), tup[-1]
- if pkg is not None and 'EXT_PACKAGE' not in macros:
- ext.define_macros.append(('EXT_PACKAGE', pkg))
- if 'EXT_MODULE' not in macros:
- ext.define_macros.append(('EXT_MODULE', mod))
- if pkg is None:
- macros = dict(ext.undef_macros or ())
- if 'EXT_PACKAGE' not in macros:
- ext.undef_macros.append('EXT_PACKAGE')
-
- # handle prereq checks
- try:
- checker = ext.check_prerequisites
- except AttributeError:
- pass
- else:
- if checker(self):
- log.info("Skipping %s extension" % ext.name)
- return
-
- return _build_ext.build_ext.build_extension(self, ext)
-
-
-class Build(_build.build):
-
- def initialize_options(self):
- """ Prepare for new options """
- _build.build.initialize_options(self)
- if _option_defaults.has_key('build'):
- for opt_name, default in _option_defaults['build']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build.build.finalize_options(self)
- if _option_inherits.has_key('build'):
- for parent, opt_name in _option_inherits['build']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if _option_finalizers.has_key('build'):
- for func in _option_finalizers['build'].values():
- func(self)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/data.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/data.py
deleted file mode 100644
index 9cf04e104c2..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/data.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Data distribution
-===================
-
-This module provides tools to simplify data distribution.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from distutils import filelist as _filelist
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-
-
-def splitpath(path):
- """ Split a path """
- drive, path = '', _os.path.normpath(path)
- try:
- splitunc = _os.path.splitunc
- except AttributeError:
- pass
- else:
- drive, path = splitunc(path)
- if not drive:
- drive, path = _os.path.splitdrive(path)
- elems = []
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- while 1:
- prefix, path = _os.path.split(path)
- elems.append(path)
- if prefix in ('', sep):
- drive = _os.path.join(drive, prefix)
- break
- path = prefix
- elems.reverse()
- return drive, elems
-
-
-def finalizer(installer):
- """ Finalize install_data """
- data_files = []
- for item in installer.data_files:
- if not isinstance(item, Data):
- data_files.append(item)
- continue
- data_files.extend(item.flatten(installer))
- installer.data_files = data_files
-
-
-class Data(object):
- """ File list container """
-
- def __init__(self, files, target=None, preserve=0, strip=0,
- prefix=None):
- """ Initialization """
- self._files = files
- self._target = target
- self._preserve = preserve
- self._strip = strip
- self._prefix = prefix
- self.fixup_commands()
-
- def fixup_commands(self):
- pass
-
- def from_templates(cls, *templates, **kwargs):
- """ Initialize from template """
- files = _filelist.FileList()
- for tpl in templates:
- for line in tpl.split(';'):
- files.process_template_line(line.strip())
- files.sort()
- files.remove_duplicates()
- result = []
- for filename in files.files:
- _, elems = splitpath(filename)
- if '.svn' in elems or '.git' in elems:
- continue
- result.append(filename)
- return cls(result, **kwargs)
- from_templates = classmethod(from_templates)
-
- def flatten(self, installer):
- """ Flatten the file list to (target, file) tuples """
- # pylint: disable = W0613
- if self._prefix:
- _, prefix = splitpath(self._prefix)
- telems = prefix
- else:
- telems = []
-
- tmap = {}
- for fname in self._files:
- (_, name), target = splitpath(fname), telems
- if self._preserve:
- if self._strip:
- name = name[max(0, min(self._strip, len(name) - 1)):]
- if len(name) > 1:
- target = telems + name[:-1]
- tmap.setdefault(_posixpath.join(*target), []).append(fname)
- return tmap.items()
-
-
-class Documentation(Data):
- """ Documentation container """
-
- def fixup_commands(self):
- _commands.add_option('install_data', 'without-docs',
- help_text='Do not install documentation files',
- inherit='install',
- )
- _commands.add_finalizer('install_data', 'documentation', finalizer)
-
- def flatten(self, installer):
- """ Check if docs should be installed at all """
- if installer.without_docs:
- return []
- return Data.flatten(self, installer)
-
-
-class Manpages(Documentation):
- """ Manpages container """
-
- def dispatch(cls, files):
- """ Automatically dispatch manpages to their target directories """
- mpmap = {}
- for manpage in files:
- normalized = _os.path.normpath(manpage)
- _, ext = _os.path.splitext(normalized)
- if ext.startswith(_os.path.extsep):
- ext = ext[len(_os.path.extsep):]
- mpmap.setdefault(ext, []).append(manpage)
- return [cls(manpages, prefix=_posixpath.join(
- 'share', 'man', 'man%s' % section,
- )) for section, manpages in mpmap.items()]
- dispatch = classmethod(dispatch)
-
- def flatten(self, installer):
- """ Check if manpages are suitable """
- if _sys.platform == 'win32':
- return []
- return Documentation.flatten(self, installer)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/dist.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/dist.py
deleted file mode 100644
index 21a65415185..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/dist.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- dist utilities
-================
-
-dist utilities.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import sys as _sys
-
-from _setup import shell as _shell
-
-
-def run_setup(*args, **kwargs):
- """ Run setup """
- if 'setup' in kwargs:
- script = kwargs.get('setup') or 'setup.py'
- del kwargs['setup']
- else:
- script = 'setup.py'
- if 'fakeroot' in kwargs:
- fakeroot = kwargs['fakeroot']
- del kwargs['fakeroot']
- else:
- fakeroot = None
- if kwargs:
- raise TypeError("Unrecognized keyword parameters")
-
- script = _shell.native(script)
- argv = [_sys.executable, script] + list(args)
- if fakeroot:
- argv.insert(0, fakeroot)
- return not _shell.spawn(*argv)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/ext.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/ext.py
deleted file mode 100644
index bcc0209a53a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/ext.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- C extension tools
-===================
-
-C extension tools.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import core as _core
-from distutils import errors as _distutils_errors
-import os as _os
-import posixpath as _posixpath
-import shutil as _shutil
-import tempfile as _tempfile
-
-from _setup import commands as _commands
-from _setup.util import log
-
-
-def _install_finalizer(installer):
- if installer.without_c_extensions:
- installer.distribution.ext_modules = []
-
-def _build_finalizer(builder):
- if builder.without_c_extensions:
- builder.extensions = []
-
-
-class Extension(_core.Extension):
- """
- Extension with prerequisite check interface
-
- If your check is cacheable (during the setup run), override
- `cached_check_prerequisites`, `check_prerequisites` otherwise.
-
- :IVariables:
- `cached_check` : ``bool``
- The cached check result
- """
- cached_check = None
-
- def __init__(self, *args, **kwargs):
- """ Initialization """
- if kwargs.has_key('depends'):
- self.depends = kwargs['depends'] or []
- else:
- self.depends = []
- _core.Extension.__init__(self, *args, **kwargs)
-
- # add include path
- included = _posixpath.join('_setup', 'include')
- if included not in self.include_dirs:
- self.include_dirs.append(included)
-
- # add cext.h to the dependencies
- cext_h = _posixpath.join(included, 'cext.h')
- if cext_h not in self.depends:
- self.depends.append(cext_h)
-
- _commands.add_option('install_lib', 'without-c-extensions',
- help_text='Don\'t install C extensions',
- inherit='install',
- )
- _commands.add_finalizer('install_lib', 'c-extensions',
- _install_finalizer
- )
- _commands.add_option('build_ext', 'without-c-extensions',
- help_text='Don\'t build C extensions',
- inherit=('build', 'install_lib'),
- )
- _commands.add_finalizer('build_ext', 'c-extensions', _build_finalizer)
-
- def check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is cacheable (during the setup run), override
- `cached_check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- if self.cached_check is None:
- log.debug("PREREQ check for %s" % self.name)
- self.cached_check = self.cached_check_prerequisites(build)
- else:
- log.debug("PREREQ check for %s (cached)" % self.name)
- return self.cached_check
-
- def cached_check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is *not* cacheable (during the setup run),
- override `check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- # pylint: disable = W0613
- log.debug("Nothing to check for %s!" % self.name)
- return False
-
-
-class ConfTest(object):
- """
- Single conftest abstraction
-
- :IVariables:
- `_tempdir` : ``str``
- The tempdir created for this test
-
- `src` : ``str``
- Name of the source file
-
- `target` : ``str``
- Target filename
-
- `compiler` : ``CCompiler``
- compiler instance
-
- `obj` : ``list``
- List of object filenames (``[str, ...]``)
- """
- _tempdir = None
-
- def __init__(self, build, source):
- """
- Initialization
-
- :Parameters:
- `build` : ``distuils.command.build_ext.build_ext``
- builder instance
-
- `source` : ``str``
- Source of the file to compile
- """
- self._tempdir = tempdir = _tempfile.mkdtemp()
- src = _os.path.join(tempdir, 'conftest.c')
- fp = open(src, 'w')
- try:
- fp.write(source)
- finally:
- fp.close()
- self.src = src
- self.compiler = compiler = build.compiler
- self.target = _os.path.join(tempdir, 'conftest')
- self.obj = compiler.object_filenames([src], output_dir=tempdir)
-
- def __del__(self):
- """ Destruction """
- self.destroy()
-
- def destroy(self):
- """ Destroy the conftest leftovers on disk """
- tempdir, self._tempdir = self._tempdir, None
- if tempdir is not None:
- _shutil.rmtree(tempdir)
-
- def compile(self, **kwargs):
- """
- Compile the conftest
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the compiler call
-
- :Return: Was the compilation successful?
- :Rtype: ``bool``
- """
- kwargs['output_dir'] = self._tempdir
- try:
- self.compiler.compile([self.src], **kwargs)
- except _distutils_errors.CompileError:
- return False
- return True
-
- def link(self, **kwargs):
- r"""
- Link the conftest
-
- Before you can link the conftest objects they need to be `compile`\d.
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the linker call
-
- :Return: Was the linking successful?
- :Rtype: ``bool``
- """
- try:
- self.compiler.link_executable(self.obj, self.target, **kwargs)
- except _distutils_errors.LinkError:
- return False
- return True
-
- def pipe(self, mode="r"):
- r"""
- Execute the conftest binary and connect to it using a pipe
-
- Before you can pipe to or from the conftest binary it needs to
- be `link`\ed.
-
- :Parameters:
- `mode` : ``str``
- Pipe mode - r/w
-
- :Return: The open pipe
- :Rtype: ``file``
- """
- return _os.popen(self.compiler.executable_filename(self.target), mode)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/setup.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/setup.py
deleted file mode 100644
index fd86f62f9bc..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/setup.py
+++ /dev/null
@@ -1,419 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Main setup runner
-===================
-
-This module provides a wrapper around the distutils core setup.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import ConfigParser as _config_parser
-from distutils import core as _core
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-from _setup import data as _data
-from _setup import ext as _ext
-from _setup import util as _util
-from _setup import shell as _shell
-
-
-def check_python_version(impl, version_min, version_max):
- """ Check python version """
- if impl == 'python':
- version_info = _sys.version_info
- elif impl == 'pypy':
- version_info = getattr(_sys, 'pypy_version_info', None)
- if not version_info:
- return
- elif impl == 'jython':
- if not 'java' in _sys.platform.lower():
- return
- version_info = _sys.version_info
- else:
- raise AssertionError("impl not in ('python', 'pypy', 'jython')")
-
- pyversion = map(int, version_info[:3])
- if version_min:
- min_required = \
- map(int, '.'.join((version_min, '0.0.0')).split('.')[:3])
- if pyversion < min_required:
- raise EnvironmentError("Need at least %s %s (vs. %s)" % (
- impl, version_min, '.'.join(map(str, pyversion))
- ))
- if version_max:
- max_required = map(int, version_max.split('.'))
- max_required[-1] += 1
- if pyversion >= max_required:
- raise EnvironmentError("Need at max %s %s (vs. %s)" % (
- impl,
- version_max,
- '.'.join(map(str, pyversion))
- ))
-
-
-def find_description(docs):
- """
- Determine the package description from DESCRIPTION
-
- :Parameters:
- `docs` : ``dict``
- Docs config section
-
- :Return: Tuple of summary, description and license
- (``('summary', 'description', 'license')``)
- (all may be ``None``)
- :Rtype: ``tuple``
- """
- summary = None
- filename = docs.get('meta.summary', 'SUMMARY').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- try:
- summary = fp.read().strip().splitlines()[0].rstrip()
- except IndexError:
- summary = ''
- finally:
- fp.close()
-
- description = None
- filename = docs.get('meta.description', 'DESCRIPTION').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- description = fp.read().rstrip()
- finally:
- fp.close()
-
- if summary is None and description:
- from docutils import core
- summary = core.publish_parts(
- source=description,
- source_path=filename,
- writer_name='html',
- )['title'].encode('utf-8')
-
- return summary, description
-
-
-def find_classifiers(docs):
- """
- Determine classifiers from CLASSIFIERS
-
- :return: List of classifiers (``['classifier', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_provides(docs):
- """
- Determine provides from PROVIDES
-
- :return: List of provides (``['provides', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.provides', 'PROVIDES').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_license(docs):
- """
- Determine license from LICENSE
-
- :return: License text
- :rtype: ``str``
- """
- filename = docs.get('meta.license', 'LICENSE').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename)
- try:
- return fp.read().rstrip()
- finally:
- fp.close()
- return None
-
-
-def find_packages(manifest):
- """ Determine packages and subpackages """
- packages = {}
- collect = manifest.get('packages.collect', '').split()
- lib = manifest.get('packages.lib', '.')
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- for root in collect:
- for dirpath, _, filenames in _shell.walk(_os.path.join(lib, root)):
- if dirpath.find('.svn') >= 0 or dirpath.find('.git') >= 0:
- continue
- if '__init__.py' in filenames:
- packages[
- _os.path.normpath(dirpath).replace(sep, '.')
- ] = None
- packages = packages.keys()
- packages.sort()
- return packages
-
-
-def find_data(name, docs):
- """ Determine data files """
- result = []
- if docs.get('extra', '').strip():
- result.append(_data.Documentation(docs['extra'].split(),
- prefix='share/doc/%s' % name,
- ))
- if docs.get('examples.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['examples.dir']]
- if docs.get('examples.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['examples.ignore'].split()
- ])
- strip = int(docs.get('examples.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('userdoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['userdoc.dir']]
- if docs.get('userdoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['userdoc.ignore'].split()
- ])
- strip = int(docs.get('userdoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('apidoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['apidoc.dir']]
- if docs.get('apidoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['apidoc.ignore'].split()
- ])
- strip = int(docs.get('apidoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('man', '').strip():
- result.extend(_data.Manpages.dispatch(docs['man'].split()))
- return result
-
-
-def make_manifest(manifest, config, docs, kwargs):
- """ Create file list to pack up """
- # pylint: disable = R0912
- kwargs = kwargs.copy()
- kwargs['script_args'] = ['install']
- kwargs['packages'] = list(kwargs.get('packages') or ()) + [
- '_setup', '_setup.py2', '_setup.py3',
- ] + list(manifest.get('packages.extra', '').split() or ())
- _core._setup_stop_after = "commandline"
- try:
- dist = _core.setup(**kwargs)
- finally:
- _core._setup_stop_after = None
-
- result = ['MANIFEST', 'PKG-INFO', 'setup.py'] + list(config)
- # TODO: work with default values:
- for key in ('classifiers', 'description', 'summary', 'provides',
- 'license'):
- filename = docs.get('meta.' + key, '').strip()
- if filename and _os.path.isfile(filename):
- result.append(filename)
-
- cmd = dist.get_command_obj("build_py")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_py", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("build_ext")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_ext", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for ext in cmd.extensions:
- if ext.depends:
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in ext.depends])
-
- cmd = dist.get_command_obj("build_clib")
- cmd.ensure_finalized()
- if cmd.libraries:
- #import pprint; pprint.pprint(("build_clib", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for lib in cmd.libraries:
- if lib[1].get('depends'):
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in lib[1]['depends']])
-
- cmd = dist.get_command_obj("build_scripts")
- cmd.ensure_finalized()
- #import pprint; pprint.pprint(("build_scripts", cmd.get_source_files()))
- if cmd.get_source_files():
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("install_data")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("install_data", cmd.get_inputs()))
- try:
- strings = basestring
- except NameError:
- strings = (str, unicode)
-
- for item in cmd.get_inputs():
- if isinstance(item, strings):
- result.append(item)
- else:
- result.extend(item[1])
-
- for item in manifest.get('dist', '').split():
- result.append(item)
- if _os.path.isdir(item):
- for filename in _shell.files(item):
- result.append(filename)
-
- result = dict([(item, None) for item in result]).keys()
- result.sort()
- return result
-
-
-def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
- """ Main runner """
- if ext is None:
- ext = []
-
- cfg = _util.SafeConfigParser()
- cfg.read(config)
- pkg = dict(cfg.items('package'))
- python_min = pkg.get('python.min') or None
- python_max = pkg.get('python.max') or None
- check_python_version('python', python_min, python_max)
- pypy_min = pkg.get('pypy.min') or None
- pypy_max = pkg.get('pypy.max') or None
- check_python_version('pypy', pypy_min, pypy_max)
- jython_min = pkg.get('jython.min') or None
- jython_max = pkg.get('jython.max') or None
- check_python_version('jython', jython_min, jython_max)
-
- manifest = dict(cfg.items('manifest'))
- try:
- docs = dict(cfg.items('docs'))
- except _config_parser.NoSectionError:
- docs = {}
-
- summary, description = find_description(docs)
- scripts = manifest.get('scripts', '').strip() or None
- if scripts:
- scripts = scripts.split()
- modules = manifest.get('modules', '').strip() or None
- if modules:
- modules = modules.split()
- keywords = docs.get('meta.keywords', '').strip() or None
- if keywords:
- keywords = keywords.split()
- revision = pkg.get('version.revision', '').strip()
- if revision:
- revision = "-r%s" % (revision,)
-
- kwargs = {
- 'name': pkg['name'],
- 'version': "%s%s" % (
- pkg['version.number'],
- ["", "-dev%s" % (revision,)][_util.humanbool(
- 'version.dev', pkg.get('version.dev', 'false')
- )],
- ),
- 'provides': find_provides(docs),
- 'description': summary,
- 'long_description': description,
- 'classifiers': find_classifiers(docs),
- 'keywords': keywords,
- 'author': pkg['author.name'],
- 'author_email': pkg['author.email'],
- 'maintainer': pkg.get('maintainer.name'),
- 'maintainer_email': pkg.get('maintainer.email'),
- 'url': pkg.get('url.homepage'),
- 'download_url': pkg.get('url.download'),
- 'license': find_license(docs),
- 'package_dir': {'': manifest.get('packages.lib', '.')},
- 'packages': find_packages(manifest),
- 'py_modules': modules,
- 'ext_modules': ext,
- 'scripts': scripts,
- 'script_args': script_args,
- 'data_files': find_data(pkg['name'], docs),
- 'cmdclass': {
- 'build' : _commands.Build,
- 'build_ext' : _commands.BuildExt,
- 'install' : _commands.Install,
- 'install_data': _commands.InstallData,
- 'install_lib' : _commands.InstallLib,
- }
- }
- for key in ('provides',):
- if key not in _core.setup_keywords:
- del kwargs[key]
-
- if manifest_only:
- return make_manifest(manifest, config, docs, kwargs)
-
- # monkey-patch crappy manifest writer away.
- from distutils.command import sdist
- sdist.sdist.get_file_list = sdist.sdist.read_manifest
-
- return _core.setup(**kwargs)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/shell.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/shell.py
deleted file mode 100644
index 4eafb9c8647..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/shell.py
+++ /dev/null
@@ -1,478 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Shell utilities
-=================
-
-Shell utilities.
-"""
-from __future__ import generators
-
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import errno as _errno
-import fnmatch as _fnmatch
-import os as _os
-import shutil as _shutil
-import sys as _sys
-import tempfile as _tempfile
-
-cwd = _os.path.dirname(_os.path.abspath(_sys.argv[0]))
-
-class ExitError(RuntimeError):
- """ Exit error """
- def __init__(self, code):
- RuntimeError.__init__(self, code)
- self.code = code
- self.signal = None
-
-
-class SignalError(ExitError):
- """ Signal error """
- def __init__(self, code, signal):
- ExitError.__init__(self, code)
- import signal as _signal
- self.signal = signal
- for key, val in vars(_signal).iteritems():
- if key.startswith('SIG') and not key.startswith('SIG_'):
- if val == signal:
- self.signalstr = key[3:]
- break
- else:
- self.signalstr = '%04d' % signal
-
-
-def native(path):
- """ Convert slash path to native """
- path = _os.path.sep.join(path.split('/'))
- return _os.path.normpath(_os.path.join(cwd, path))
-
-
-def cp(src, dest):
- """ Copy src to dest """
- _shutil.copy2(native(src), native(dest))
-
-
-def cp_r(src, dest):
- """ Copy -r src to dest """
- _shutil.copytree(native(src), native(dest))
-
-
-def rm(dest):
- """ Remove a file """
- try:
- _os.unlink(native(dest))
- except OSError, e:
- if _errno.ENOENT != e.errno:
- raise
-
-def rm_rf(dest):
- """ Remove a tree """
- dest = native(dest)
- if _os.path.exists(dest):
- for path in files(dest, '*'):
- _os.chmod(native(path), 0644)
- _shutil.rmtree(dest)
-
-
-try:
- mkstemp = _tempfile.mkstemp
-except AttributeError:
- # helpers stolen from 2.4 tempfile module
- try:
- import fcntl as _fcntl
- except ImportError:
- def _set_cloexec(fd):
- """ Set close-on-exec (not implemented, but not an error) """
- # pylint: disable = W0613
- pass
- else:
- def _set_cloexec(fd):
- """ Set close-on-exec """
- try:
- flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
- except IOError:
- pass
- else:
- # flags read successfully, modify
- flags |= _fcntl.FD_CLOEXEC
- _fcntl.fcntl(fd, _fcntl.F_SETFD, flags)
-
- _text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL
- _text_openflags |= getattr(_os, 'O_NOINHERIT', 0)
- _text_openflags |= getattr(_os, 'O_NOFOLLOW', 0)
-
- _bin_openflags = _text_openflags
- _bin_openflags |= getattr(_os, 'O_BINARY', 0)
-
- def mkstemp(suffix="", prefix=_tempfile.gettempprefix(), dir=None,
- text=False):
- """ Create secure temp file """
- # pylint: disable = W0622
- if dir is None:
- dir = _tempfile.gettempdir()
- if text:
- flags = _text_openflags
- else:
- flags = _bin_openflags
- count = 100
- while count > 0:
- j = _tempfile._counter.get_next() # pylint: disable = E1101, W0212
- fname = _os.path.join(dir, prefix + str(j) + suffix)
- try:
- fd = _os.open(fname, flags, 0600)
- except OSError, e:
- if e.errno == _errno.EEXIST:
- count -= 1
- continue
- raise
- _set_cloexec(fd)
- return fd, _os.path.abspath(fname)
- raise IOError, (_errno.EEXIST, "No usable temporary file name found")
-
-
-def _pipespawn(argv, env):
- """ Pipe spawn """
- # pylint: disable = R0912
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, (r"""
-import os
-import pickle
-try:
- import subprocess
-except ImportError:
- subprocess = None
-import sys
-
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
-if subprocess is None:
- pid = os.spawnve(os.P_NOWAIT, argv[0], argv, env)
- result = os.waitpid(pid, 0)[1]
-else:
- p = subprocess.Popen(argv, env=env)
- result = p.wait()
- if result < 0:
- print "\n%%d 1" %% (-result)
- sys.exit(2)
-
-if result == 0:
- sys.exit(0)
-signalled = getattr(os, 'WIFSIGNALED', None)
-if signalled is not None:
- if signalled(result):
- print "\n%%d %%d" %% (os.WTERMSIG(result), result & 7)
- sys.exit(2)
-print "\n%%d" %% (result & 7,)
-sys.exit(3)
- """.strip() + "\n") % {
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(env)),
- })
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- shell = True
- close_fds = False
- else:
- argv = [_sys.executable, name]
- shell = False
- close_fds = True
-
- res = 0
- try:
- import subprocess
- except ImportError:
- import popen2 as _popen2
- proc = _popen2.Popen3(argv, False)
- try:
- proc.tochild.close()
- result = proc.fromchild.read()
- finally:
- res = proc.wait()
- else:
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- proc = subprocess.Popen(argv,
- shell=shell,
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- close_fds=close_fds,
- env=env,
- )
- try:
- proc.stdin.close()
- result = proc.stdout.read()
- finally:
- res = proc.wait()
- if res != 0:
- if res == 2:
- signal, code = map(int, result.splitlines()[-1].split())
- raise SignalError(code, signal)
- elif res == 3:
- code = int(result.splitlines()[-1].strip())
- raise ExitError(code)
- raise ExitError(res)
-
- return result
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def _filepipespawn(infile, outfile, argv, env):
- """ File Pipe spawn """
- try:
- import subprocess
- except ImportError:
- subprocess = None
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, ("""
-import os
-import pickle
-import sys
-
-infile = pickle.loads(%(infile)s)
-outfile = pickle.loads(%(outfile)s)
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-
-if infile is not None:
- infile = open(infile, 'rb')
- os.dup2(infile.fileno(), 0)
- infile.close()
-if outfile is not None:
- outfile = open(outfile, 'wb')
- os.dup2(outfile.fileno(), 1)
- outfile.close()
-
-pid = os.spawnve(os.P_NOWAIT, argv[0], argv, env)
-result = os.waitpid(pid, 0)[1]
-sys.exit(result & 7)
- """.strip() + "\n") % {
- 'infile': repr(_pickle.dumps(_os.path.abspath(infile))),
- 'outfile': repr(_pickle.dumps(_os.path.abspath(outfile))),
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(env)),
- })
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- close_fds = False
- shell = True
- else:
- argv = [_sys.executable, name]
- close_fds = True
- shell = False
-
- if subprocess is None:
- pid = _os.spawnve(_os.P_NOWAIT, argv[0], argv, env)
- return _os.waitpid(pid, 0)[1]
- else:
- p = subprocess.Popen(
- argv, env=env, shell=shell, close_fds=close_fds
- )
- return p.wait()
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def spawn(*argv, **kwargs):
- """ Spawn a process """
- try:
- import subprocess
- except ImportError:
- subprocess = None
-
- if _sys.platform == 'win32':
- newargv = []
- for arg in argv:
- if not arg or ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- newargv.append(arg)
- argv = newargv
- close_fds = False
- shell = True
- else:
- close_fds = True
- shell = False
-
- env = kwargs.get('env')
- if env is None:
- env = dict(_os.environ)
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- echo = kwargs.get('echo')
- if echo:
- print ' '.join(argv)
- filepipe = kwargs.get('filepipe')
- if filepipe:
- return _filepipespawn(
- kwargs.get('stdin'), kwargs.get('stdout'), argv, env
- )
- pipe = kwargs.get('stdout')
- if pipe:
- return _pipespawn(argv, env)
-
- if subprocess is None:
- pid = _os.spawnve(_os.P_NOWAIT, argv[0], argv, env)
- return _os.waitpid(pid, 0)[1]
- else:
- p = subprocess.Popen(argv, env=env, shell=shell, close_fds=close_fds)
- return p.wait()
-
-
-try:
- walk = _os.walk
-except AttributeError:
- # copy from python 2.4 sources (modulo docs and comments)
- def walk(top, topdown=True, onerror=None):
- """ directory tree walker """
- # pylint: disable = C0103
- join, isdir, islink = _os.path.join, _os.path.isdir, _os.path.islink
- listdir, error = _os.listdir, _os.error
-
- try:
- names = listdir(top)
- except error, err:
- if onerror is not None:
- onerror(err)
- return
-
- dirs, nondirs = [], []
- for name in names:
- if isdir(join(top, name)):
- dirs.append(name)
- else:
- nondirs.append(name)
-
- if topdown:
- yield top, dirs, nondirs
- for name in dirs:
- path = join(top, name)
- if not islink(path):
- for x in walk(path, topdown, onerror):
- yield x
- if not topdown:
- yield top, dirs, nondirs
-
-
-def files(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- filenames.sort()
- for name in _fnmatch.filter(filenames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
- dirnames.sort()
-
-
-def dirs(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- dirnames.sort()
- for name in _fnmatch.filter(dirnames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
-
-
-def frompath(executable):
- """ Find executable in PATH """
- # Based on distutils.spawn.find_executable.
- path = _os.environ.get('PATH', '')
- paths = [
- _os.path.expanduser(item)
- for item in path.split(_os.pathsep)
- ]
- ext = _os.path.splitext(executable)[1]
- exts = ['']
- if _sys.platform == 'win32' or _os.name == 'os2':
- eext = ['.exe', '.bat', '.py']
- if ext not in eext:
- exts.extend(eext)
-
- for ext in exts:
- if not _os.path.isfile(executable + ext):
- for path in paths:
- fname = _os.path.join(path, executable + ext)
- if _os.path.isfile(fname):
- # the file exists, we have a shot at spawn working
- return fname
- else:
- return executable + ext
-
- return None
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/util.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/util.py
deleted file mode 100644
index 5c05fac6e4c..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py2/util.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Setup utilities
-=================
-
-Setup utilities.
-"""
-__author__ = u"Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-try:
- from distutils import log
-except ImportError:
- class log(object):
- def info(self, value):
- print value
- def debug(self, value):
- pass
- log = log()
-
-from distutils import util as _util
-try:
- from ConfigParser import SafeConfigParser
-except ImportError:
- import ConfigParser as _config_parser
- class SafeConfigParser(_config_parser.ConfigParser):
- """ Safe config parser """
- def _interpolate(self, section, option, rawval, vars):
- return rawval
-
- def items(self, section):
- return [(key, self.get(section, key))
- for key in self.options(section)
- ]
-
-
-def humanbool(name, value):
- """
- Determine human boolean value
-
- :Parameters:
- `name` : ``str``
- The config key (used for error message)
-
- `value` : ``str``
- The config value
-
- :Return: The boolean value
- :Rtype: ``bool``
-
- :Exceptions:
- - `ValueError` : The value could not be recognized
- """
- try:
- return _util.strtobool(str(value).strip().lower() or 'no')
- except ValueError:
- raise ValueError("Unrecognized config value: %s = %s" % (name, value))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/__init__.py
deleted file mode 100644
index 6139d510a10..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- Package _setup
-================
-
-This package provides tools for main package setup.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from _setup.setup import run # pylint: disable = W0611
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/commands.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/commands.py
deleted file mode 100644
index 7bfacbc86ef..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/commands.py
+++ /dev/null
@@ -1,266 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Command extenders
-===================
-
-Command extenders.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import fancy_getopt as _fancy_getopt
-from distutils import log
-from distutils.command import build as _build
-from distutils.command import build_ext as _build_ext
-from distutils.command import install as _install
-from distutils.command import install_data as _install_data
-from distutils.command import install_lib as _install_lib
-import os as _os
-
-_option_defaults = {}
-_option_inherits = {}
-_option_finalizers = {}
-_command_mapping = {
- 'install': 'Install',
- 'install_data': 'InstallData',
- 'install_lib': 'InstallLib',
- 'build': 'Build',
- 'build_ext': 'BuildExt',
-}
-
-
-def add_option(command, long_name, help_text, short_name=None, default=None,
- inherit=None):
- """ Add an option """
- try:
- command_class = globals()[_command_mapping[command]]
- except KeyError:
- raise ValueError("Unknown command %r" % (command,))
- for opt in command_class.user_options:
- if opt[0] == long_name:
- break
- else:
- opt = (long_name, short_name, help_text)
- command_class.user_options.append(opt)
- if not long_name.endswith('='):
- command_class.boolean_options.append(long_name)
- attr_name = _fancy_getopt.translate_longopt(long_name)
- else:
- attr_name = _fancy_getopt.translate_longopt(long_name[:-1])
- if command not in _option_defaults:
- _option_defaults[command] = []
- if inherit is not None:
- if isinstance(inherit, str):
- inherit = [inherit]
- for i_inherit in inherit:
- add_option(
- i_inherit, long_name, help_text, short_name, default
- )
- default = None
- if command not in _option_inherits:
- _option_inherits[command] = []
- for i_inherit in inherit:
- for i_command, opt_name in _option_inherits[command]:
- if i_command == i_inherit and opt_name == attr_name:
- break
- else:
- _option_inherits[command].append((i_inherit, attr_name))
- _option_defaults[command].append((attr_name, default))
-
-
-def add_finalizer(command, key, func):
- """ Add finalizer """
- if command not in _option_finalizers:
- _option_finalizers[command] = {}
- if key not in _option_finalizers[command]:
- _option_finalizers[command][key] = func
-
-
-class Install(_install.install):
- """ Extended installer to reflect the additional data options """
- user_options = _install.install.user_options + [
- ('single-version-externally-managed', None,
- "Compat option. Does not a thing."),
- ]
- boolean_options = _install.install.boolean_options + [
- 'single-version-externally-managed'
- ]
-
- def initialize_options(self):
- """ Prepare for new options """
- _install.install.initialize_options(self)
- self.single_version_externally_managed = None
- if 'install' in _option_defaults:
- for opt_name, default in _option_defaults['install']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install.install.finalize_options(self)
- if 'install' in _option_inherits:
- for parent, opt_name in _option_inherits['install']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'install' in _option_finalizers:
- for func in list(_option_finalizers['install'].values()):
- func(self)
-
-
-class InstallData(_install_data.install_data):
- """ Extended data installer """
- user_options = _install_data.install_data.user_options + []
- boolean_options = _install_data.install_data.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_data.install_data.initialize_options(self)
- if 'install_data' in _option_defaults:
- for opt_name, default in _option_defaults['install_data']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_data.install_data.finalize_options(self)
- if 'install_data' in _option_inherits:
- for parent, opt_name in _option_inherits['install_data']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'install_data' in _option_finalizers:
- for func in list(_option_finalizers['install_data'].values()):
- func(self)
-
-
-class InstallLib(_install_lib.install_lib):
- """ Extended lib installer """
- user_options = _install_lib.install_lib.user_options + []
- boolean_options = _install_lib.install_lib.boolean_options + []
-
- def initialize_options(self):
- """ Prepare for new options """
- _install_lib.install_lib.initialize_options(self)
- if 'install_lib' in _option_defaults:
- for opt_name, default in _option_defaults['install_lib']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _install_lib.install_lib.finalize_options(self)
- if 'install_lib' in _option_inherits:
- for parent, opt_name in _option_inherits['install_lib']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'install_lib' in _option_finalizers:
- for func in list(_option_finalizers['install_lib'].values()):
- func(self)
-
-
-class BuildExt(_build_ext.build_ext):
- """
- Extended extension builder class
-
- This class allows extensions to provide a ``check_prerequisites`` method
- which is called before actually building it. The method takes the
- `BuildExt` instance and returns whether the extension should be skipped or
- not.
- """
-
- def initialize_options(self):
- """ Prepare for new options """
- _build_ext.build_ext.initialize_options(self)
- if 'build_ext' in _option_defaults:
- for opt_name, default in _option_defaults['build_ext']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build_ext.build_ext.finalize_options(self)
- if 'build_ext' in _option_inherits:
- for parent, opt_name in _option_inherits['build_ext']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'build_ext' in _option_finalizers:
- for func in list(_option_finalizers['build_ext'].values()):
- func(self)
-
- def build_extension(self, ext):
- """
- Build C extension - with extended functionality
-
- The following features are added here:
-
- - ``ext.check_prerequisites`` is called before the extension is being
- built. See `Extension` for details. If the method does not exist,
- simply no check will be run.
- - The macros ``EXT_PACKAGE`` and ``EXT_MODULE`` will be filled (or
- unset) depending on the extensions name, but only if they are not
- already defined.
-
- :Parameters:
- `ext` : `Extension`
- The extension to build. If it's a pure
- ``distutils.core.Extension``, simply no prequisites check is
- applied.
-
- :Return: whatever ``distutils.command.build_ext.build_ext`` returns
- :Rtype: any
- """
- # handle name macros
- macros = dict(ext.define_macros or ())
- tup = ext.name.split('.')
- if len(tup) == 1:
- pkg, mod = None, tup[0]
- else:
- pkg, mod = '.'.join(tup[:-1]), tup[-1]
- if pkg is not None and 'EXT_PACKAGE' not in macros:
- ext.define_macros.append(('EXT_PACKAGE', pkg))
- if 'EXT_MODULE' not in macros:
- ext.define_macros.append(('EXT_MODULE', mod))
- if pkg is None:
- macros = dict(ext.undef_macros or ())
- if 'EXT_PACKAGE' not in macros:
- ext.undef_macros.append('EXT_PACKAGE')
-
- # handle prereq checks
- try:
- checker = ext.check_prerequisites
- except AttributeError:
- pass
- else:
- if checker(self):
- log.info("Skipping %s extension" % ext.name)
- return
-
- return _build_ext.build_ext.build_extension(self, ext)
-
-
-class Build(_build.build):
-
- def initialize_options(self):
- """ Prepare for new options """
- _build.build.initialize_options(self)
- if 'build' in _option_defaults:
- for opt_name, default in _option_defaults['build']:
- setattr(self, opt_name, default)
-
- def finalize_options(self):
- """ Finalize options """
- _build.build.finalize_options(self)
- if 'build' in _option_inherits:
- for parent, opt_name in _option_inherits['build']:
- self.set_undefined_options(parent, (opt_name, opt_name))
- if 'build' in _option_finalizers:
- for func in list(_option_finalizers['build'].values()):
- func(self)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/data.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/data.py
deleted file mode 100644
index d4221735768..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/data.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Data distribution
-===================
-
-This module provides tools to simplify data distribution.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from distutils import filelist as _filelist
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-
-
-def splitpath(path):
- """ Split a path """
- drive, path = '', _os.path.normpath(path)
- try:
- splitunc = _os.path.splitunc
- except AttributeError:
- pass
- else:
- drive, path = splitunc(path)
- if not drive:
- drive, path = _os.path.splitdrive(path)
- elems = []
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- while 1:
- prefix, path = _os.path.split(path)
- elems.append(path)
- if prefix in ('', sep):
- drive = _os.path.join(drive, prefix)
- break
- path = prefix
- elems.reverse()
- return drive, elems
-
-
-def finalizer(installer):
- """ Finalize install_data """
- data_files = []
- for item in installer.data_files:
- if not isinstance(item, Data):
- data_files.append(item)
- continue
- data_files.extend(item.flatten(installer))
- installer.data_files = data_files
-
-
-class Data(object):
- """ File list container """
-
- def __init__(self, files, target=None, preserve=0, strip=0,
- prefix=None):
- """ Initialization """
- self._files = files
- self._target = target
- self._preserve = preserve
- self._strip = strip
- self._prefix = prefix
- self.fixup_commands()
-
- def fixup_commands(self):
- pass
-
- def from_templates(cls, *templates, **kwargs):
- """ Initialize from template """
- files = _filelist.FileList()
- for tpl in templates:
- for line in tpl.split(';'):
- files.process_template_line(line.strip())
- files.sort()
- files.remove_duplicates()
- result = []
- for filename in files.files:
- _, elems = splitpath(filename)
- if '.svn' in elems or '.git' in elems:
- continue
- result.append(filename)
- return cls(result, **kwargs)
- from_templates = classmethod(from_templates)
-
- def flatten(self, installer):
- """ Flatten the file list to (target, file) tuples """
- # pylint: disable = W0613
- if self._prefix:
- _, prefix = splitpath(self._prefix)
- telems = prefix
- else:
- telems = []
-
- tmap = {}
- for fname in self._files:
- (_, name), target = splitpath(fname), telems
- if self._preserve:
- if self._strip:
- name = name[max(0, min(self._strip, len(name) - 1)):]
- if len(name) > 1:
- target = telems + name[:-1]
- tmap.setdefault(_posixpath.join(*target), []).append(fname)
- return list(tmap.items())
-
-
-class Documentation(Data):
- """ Documentation container """
-
- def fixup_commands(self):
- _commands.add_option('install_data', 'without-docs',
- help_text='Do not install documentation files',
- inherit='install',
- )
- _commands.add_finalizer('install_data', 'documentation', finalizer)
-
- def flatten(self, installer):
- """ Check if docs should be installed at all """
- if installer.without_docs:
- return []
- return Data.flatten(self, installer)
-
-
-class Manpages(Documentation):
- """ Manpages container """
-
- def dispatch(cls, files):
- """ Automatically dispatch manpages to their target directories """
- mpmap = {}
- for manpage in files:
- normalized = _os.path.normpath(manpage)
- _, ext = _os.path.splitext(normalized)
- if ext.startswith(_os.path.extsep):
- ext = ext[len(_os.path.extsep):]
- mpmap.setdefault(ext, []).append(manpage)
- return [cls(manpages, prefix=_posixpath.join(
- 'share', 'man', 'man%s' % section,
- )) for section, manpages in list(mpmap.items())]
- dispatch = classmethod(dispatch)
-
- def flatten(self, installer):
- """ Check if manpages are suitable """
- if _sys.platform == 'win32':
- return []
- return Documentation.flatten(self, installer)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/dist.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/dist.py
deleted file mode 100644
index cce21e57a63..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/dist.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-================
- dist utilities
-================
-
-dist utilities.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import sys as _sys
-
-from _setup import shell as _shell
-
-
-def run_setup(*args, **kwargs):
- """ Run setup """
- if 'setup' in kwargs:
- script = kwargs.get('setup') or 'setup.py'
- del kwargs['setup']
- else:
- script = 'setup.py'
- if 'fakeroot' in kwargs:
- fakeroot = kwargs['fakeroot']
- del kwargs['fakeroot']
- else:
- fakeroot = None
- if kwargs:
- raise TypeError("Unrecognized keyword parameters")
-
- script = _shell.native(script)
- argv = [_sys.executable, script] + list(args)
- if fakeroot:
- argv.insert(0, fakeroot)
- return not _shell.spawn(*argv)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/ext.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/ext.py
deleted file mode 100644
index 852c466547e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/ext.py
+++ /dev/null
@@ -1,253 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- C extension tools
-===================
-
-C extension tools.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-__test__ = False
-
-from distutils import core as _core
-from distutils import errors as _distutils_errors
-from distutils import log
-import os as _os
-import posixpath as _posixpath
-import shutil as _shutil
-import tempfile as _tempfile
-
-from _setup import commands as _commands
-
-def _install_finalizer(installer):
- if installer.without_c_extensions:
- installer.distribution.ext_modules = []
-
-def _build_finalizer(builder):
- if builder.without_c_extensions:
- builder.extensions = []
-
-
-class Extension(_core.Extension):
- """
- Extension with prerequisite check interface
-
- If your check is cacheable (during the setup run), override
- `cached_check_prerequisites`, `check_prerequisites` otherwise.
-
- :IVariables:
- `cached_check` : ``bool``
- The cached check result
- """
- cached_check = None
-
- def __init__(self, *args, **kwargs):
- """ Initialization """
- if 'depends' in kwargs:
- self.depends = kwargs['depends'] or []
- else:
- self.depends = []
- _core.Extension.__init__(self, *args, **kwargs)
-
- # add include path
- included = _posixpath.join('_setup', 'include')
- if included not in self.include_dirs:
- self.include_dirs.append(included)
-
- # add cext.h to the dependencies
- cext_h = _posixpath.join(included, 'cext.h')
- if cext_h not in self.depends:
- self.depends.append(cext_h)
-
- _commands.add_option('install_lib', 'without-c-extensions',
- help_text='Don\'t install C extensions',
- inherit='install',
- )
- _commands.add_finalizer('install_lib', 'c-extensions',
- _install_finalizer
- )
- _commands.add_option('build_ext', 'without-c-extensions',
- help_text='Don\'t build C extensions',
- inherit=('build', 'install_lib'),
- )
- _commands.add_finalizer('build_ext', 'c-extensions', _build_finalizer)
-
- def check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is cacheable (during the setup run), override
- `cached_check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- if self.cached_check is None:
- log.debug("PREREQ check for %s" % self.name)
- self.cached_check = self.cached_check_prerequisites(build)
- else:
- log.debug("PREREQ check for %s (cached)" % self.name)
- return self.cached_check
-
- def cached_check_prerequisites(self, build):
- """
- Check prerequisites
-
- The check should cover all dependencies needed for the extension to
- be built and run. The method can do the following:
-
- - return a false value: the extension will be built
- - return a true value: the extension will be skipped. This is useful
- for optional extensions
- - raise an exception. This is useful for mandatory extensions
-
- If the check result is *not* cacheable (during the setup run),
- override `check_prerequisites` instead.
-
- :Parameters:
- `build` : `BuildExt`
- The extension builder
-
- :Return: Skip the extension?
- :Rtype: ``bool``
- """
- # pylint: disable = W0613
- log.debug("Nothing to check for %s!" % self.name)
- return False
-
-
-class ConfTest(object):
- """
- Single conftest abstraction
-
- :IVariables:
- `_tempdir` : ``str``
- The tempdir created for this test
-
- `src` : ``str``
- Name of the source file
-
- `target` : ``str``
- Target filename
-
- `compiler` : ``CCompiler``
- compiler instance
-
- `obj` : ``list``
- List of object filenames (``[str, ...]``)
- """
- _tempdir = None
-
- def __init__(self, build, source):
- """
- Initialization
-
- :Parameters:
- `build` : ``distuils.command.build_ext.build_ext``
- builder instance
-
- `source` : ``str``
- Source of the file to compile
- """
- self._tempdir = tempdir = _tempfile.mkdtemp()
- src = _os.path.join(tempdir, 'conftest.c')
- fp = open(src, 'w', encoding='utf-8')
- try:
- fp.write(source)
- finally:
- fp.close()
- self.src = src
- self.compiler = compiler = build.compiler
- self.target = _os.path.join(tempdir, 'conftest')
- self.obj = compiler.object_filenames([src], output_dir=tempdir)
-
- def __del__(self):
- """ Destruction """
- self.destroy()
-
- def destroy(self):
- """ Destroy the conftest leftovers on disk """
- tempdir, self._tempdir = self._tempdir, None
- if tempdir is not None:
- _shutil.rmtree(tempdir)
-
- def compile(self, **kwargs):
- """
- Compile the conftest
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the compiler call
-
- :Return: Was the compilation successful?
- :Rtype: ``bool``
- """
- kwargs['output_dir'] = self._tempdir
- try:
- self.compiler.compile([self.src], **kwargs)
- except _distutils_errors.CompileError:
- return False
- return True
-
- def link(self, **kwargs):
- r"""
- Link the conftest
-
- Before you can link the conftest objects they need to be `compile`\d.
-
- :Parameters:
- `kwargs` : ``dict``
- Optional keyword parameters for the linker call
-
- :Return: Was the linking successful?
- :Rtype: ``bool``
- """
- try:
- self.compiler.link_executable(self.obj, self.target, **kwargs)
- except _distutils_errors.LinkError:
- return False
- return True
-
- def pipe(self, mode="r"):
- r"""
- Execute the conftest binary and connect to it using a pipe
-
- Before you can pipe to or from the conftest binary it needs to
- be `link`\ed.
-
- :Parameters:
- `mode` : ``str``
- Pipe mode - r/w
-
- :Return: The open pipe
- :Rtype: ``file``
- """
- return _os.popen(self.compiler.executable_filename(self.target), mode)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/setup.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/setup.py
deleted file mode 100644
index 83f1c21d544..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/setup.py
+++ /dev/null
@@ -1,420 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-===================
- Main setup runner
-===================
-
-This module provides a wrapper around the distutils core setup.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import configparser as _config_parser
-from distutils import core as _core
-import os as _os
-import posixpath as _posixpath
-import sys as _sys
-
-from _setup import commands as _commands
-from _setup import data as _data
-from _setup import ext as _ext
-from _setup import util as _util
-from _setup import shell as _shell
-
-
-def check_python_version(impl, version_min, version_max):
- """ Check python version """
- if impl == 'python':
- version_info = _sys.version_info
- elif impl == 'pypy':
- version_info = getattr(_sys, 'pypy_version_info', None)
- if not version_info:
- return
- elif impl == 'jython':
- if not 'java' in _sys.platform.lower():
- return
- version_info = _sys.version_info
- else:
- raise AssertionError("impl not in ('python', 'pypy', 'jython')")
-
- pyversion = list(map(int, version_info[:3]))
- if version_min:
- min_required = list(
- map(int, '.'.join((version_min, '0.0.0')).split('.')[:3])
- )
- if pyversion < min_required:
- raise EnvironmentError("Need at least %s %s (vs. %s)" % (
- impl, version_min, '.'.join(map(str, pyversion))
- ))
- if version_max:
- max_required = list(map(int, version_max.split('.')))
- max_required[-1] += 1
- if pyversion >= max_required:
- raise EnvironmentError("Need at max %s %s (vs. %s)" % (
- impl,
- version_max,
- '.'.join(map(str, pyversion))
- ))
-
-
-def find_description(docs):
- """
- Determine the package description from DESCRIPTION
-
- :Parameters:
- `docs` : ``dict``
- Docs config section
-
- :Return: Tuple of summary, description and license
- (``('summary', 'description', 'license')``)
- (all may be ``None``)
- :Rtype: ``tuple``
- """
- summary = None
- filename = docs.get('meta.summary', 'SUMMARY').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- try:
- summary = fp.read().strip().splitlines()[0].rstrip()
- except IndexError:
- summary = ''
- finally:
- fp.close()
-
- description = None
- filename = docs.get('meta.description', 'DESCRIPTION').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- description = fp.read().rstrip()
- finally:
- fp.close()
-
- if summary is None and description:
- from docutils import core
- summary = core.publish_parts(
- source=description,
- source_path=filename,
- writer_name='html',
- )['title'].encode('utf-8')
-
- return summary, description
-
-
-def find_classifiers(docs):
- """
- Determine classifiers from CLASSIFIERS
-
- :return: List of classifiers (``['classifier', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_provides(docs):
- """
- Determine provides from PROVIDES
-
- :return: List of provides (``['provides', ...]``)
- :rtype: ``list``
- """
- filename = docs.get('meta.provides', 'PROVIDES').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- content = fp.read()
- finally:
- fp.close()
- content = [item.strip() for item in content.splitlines()]
- return [item for item in content if item and not item.startswith('#')]
- return []
-
-
-def find_license(docs):
- """
- Determine license from LICENSE
-
- :return: License text
- :rtype: ``str``
- """
- filename = docs.get('meta.license', 'LICENSE').strip()
- if filename and _os.path.isfile(filename):
- fp = open(filename, encoding='utf-8')
- try:
- return fp.read().rstrip()
- finally:
- fp.close()
- return None
-
-
-def find_packages(manifest):
- """ Determine packages and subpackages """
- packages = {}
- collect = manifest.get('packages.collect', '').split()
- lib = manifest.get('packages.lib', '.')
- try:
- sep = _os.path.sep
- except AttributeError:
- sep = _os.path.join('1', '2')[1:-1]
- for root in collect:
- for dirpath, _, filenames in _shell.walk(_os.path.join(lib, root)):
- if dirpath.find('.svn') >= 0 or dirpath.find('.git') >= 0:
- continue
- if '__init__.py' in filenames:
- packages[
- _os.path.normpath(dirpath).replace(sep, '.')
- ] = None
- packages = list(packages.keys())
- packages.sort()
- return packages
-
-
-def find_data(name, docs):
- """ Determine data files """
- result = []
- if docs.get('extra', '').strip():
- result.append(_data.Documentation(docs['extra'].split(),
- prefix='share/doc/%s' % name,
- ))
- if docs.get('examples.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['examples.dir']]
- if docs.get('examples.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['examples.ignore'].split()
- ])
- strip = int(docs.get('examples.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('userdoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['userdoc.dir']]
- if docs.get('userdoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['userdoc.ignore'].split()
- ])
- strip = int(docs.get('userdoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('apidoc.dir', '').strip():
- tpl = ['recursive-include %s *' % docs['apidoc.dir']]
- if docs.get('apidoc.ignore', '').strip():
- tpl.extend(["global-exclude %s" % item
- for item in docs['apidoc.ignore'].split()
- ])
- strip = int(docs.get('apidoc.strip', '') or 0)
- result.append(_data.Documentation.from_templates(*tpl, **{
- 'strip': strip,
- 'prefix': 'share/doc/%s' % name,
- 'preserve': 1,
- }))
- if docs.get('man', '').strip():
- result.extend(_data.Manpages.dispatch(docs['man'].split()))
- return result
-
-
-def make_manifest(manifest, config, docs, kwargs):
- """ Create file list to pack up """
- # pylint: disable = R0912
- kwargs = kwargs.copy()
- kwargs['script_args'] = ['install']
- kwargs['packages'] = list(kwargs.get('packages') or ()) + [
- '_setup', '_setup.py2', '_setup.py3',
- ] + list(manifest.get('packages.extra', '').split() or ())
- _core._setup_stop_after = "commandline"
- try:
- dist = _core.setup(**kwargs)
- finally:
- _core._setup_stop_after = None
-
- result = ['MANIFEST', 'PKG-INFO', 'setup.py'] + list(config)
- # TODO: work with default values:
- for key in ('classifiers', 'description', 'summary', 'provides',
- 'license'):
- filename = docs.get('meta.' + key, '').strip()
- if filename and _os.path.isfile(filename):
- result.append(filename)
-
- cmd = dist.get_command_obj("build_py")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_py", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("build_ext")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("build_ext", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for ext in cmd.extensions:
- if ext.depends:
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in ext.depends])
-
- cmd = dist.get_command_obj("build_clib")
- cmd.ensure_finalized()
- if cmd.libraries:
- #import pprint; pprint.pprint(("build_clib", cmd.get_source_files()))
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
- for lib in cmd.libraries:
- if lib[1].get('depends'):
- result.extend([_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ) for item in lib[1]['depends']])
-
- cmd = dist.get_command_obj("build_scripts")
- cmd.ensure_finalized()
- #import pprint; pprint.pprint(("build_scripts", cmd.get_source_files()))
- if cmd.get_source_files():
- for item in cmd.get_source_files():
- result.append(_posixpath.sep.join(
- _os.path.normpath(item).split(_os.path.sep)
- ))
-
- cmd = dist.get_command_obj("install_data")
- cmd.ensure_finalized()
- #from pprint import pprint; pprint(("install_data", cmd.get_inputs()))
- try:
- strings = str
- except NameError:
- strings = (str, str)
-
- for item in cmd.get_inputs():
- if isinstance(item, strings):
- result.append(item)
- else:
- result.extend(item[1])
-
- for item in manifest.get('dist', '').split():
- result.append(item)
- if _os.path.isdir(item):
- for filename in _shell.files(item):
- result.append(filename)
-
- result = list(dict([(item, None) for item in result]).keys())
- result.sort()
- return result
-
-
-def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
- """ Main runner """
- if ext is None:
- ext = []
-
- cfg = _util.SafeConfigParser()
- cfg.read(config, encoding='utf-8')
- pkg = dict(cfg.items('package'))
- python_min = pkg.get('python.min') or None
- python_max = pkg.get('python.max') or None
- check_python_version('python', python_min, python_max)
- pypy_min = pkg.get('pypy.min') or None
- pypy_max = pkg.get('pypy.max') or None
- check_python_version('pypy', pypy_min, pypy_max)
- jython_min = pkg.get('jython.min') or None
- jython_max = pkg.get('jython.max') or None
- check_python_version('jython', jython_min, jython_max)
-
- manifest = dict(cfg.items('manifest'))
- try:
- docs = dict(cfg.items('docs'))
- except _config_parser.NoSectionError:
- docs = {}
-
- summary, description = find_description(docs)
- scripts = manifest.get('scripts', '').strip() or None
- if scripts:
- scripts = scripts.split()
- modules = manifest.get('modules', '').strip() or None
- if modules:
- modules = modules.split()
- keywords = docs.get('meta.keywords', '').strip() or None
- if keywords:
- keywords = keywords.split()
- revision = pkg.get('version.revision', '').strip()
- if revision:
- revision = "-r%s" % (revision,)
-
- kwargs = {
- 'name': pkg['name'],
- 'version': "%s%s" % (
- pkg['version.number'],
- ["", "-dev%s" % (revision,)][_util.humanbool(
- 'version.dev', pkg.get('version.dev', 'false')
- )],
- ),
- 'provides': find_provides(docs),
- 'description': summary,
- 'long_description': description,
- 'classifiers': find_classifiers(docs),
- 'keywords': keywords,
- 'author': pkg['author.name'],
- 'author_email': pkg['author.email'],
- 'maintainer': pkg.get('maintainer.name'),
- 'maintainer_email': pkg.get('maintainer.email'),
- 'url': pkg.get('url.homepage'),
- 'download_url': pkg.get('url.download'),
- 'license': find_license(docs),
- 'package_dir': {'': manifest.get('packages.lib', '.')},
- 'packages': find_packages(manifest),
- 'py_modules': modules,
- 'ext_modules': ext,
- 'scripts': scripts,
- 'script_args': script_args,
- 'data_files': find_data(pkg['name'], docs),
- 'cmdclass': {
- 'build' : _commands.Build,
- 'build_ext' : _commands.BuildExt,
- 'install' : _commands.Install,
- 'install_data': _commands.InstallData,
- 'install_lib' : _commands.InstallLib,
- }
- }
- for key in ('provides',):
- if key not in _core.setup_keywords:
- del kwargs[key]
-
- if manifest_only:
- return make_manifest(manifest, config, docs, kwargs)
-
- # monkey-patch crappy manifest writer away.
- from distutils.command import sdist
- sdist.sdist.get_file_list = sdist.sdist.read_manifest
-
- return _core.setup(**kwargs)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/shell.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/shell.py
deleted file mode 100644
index 91f2ebc5b40..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/shell.py
+++ /dev/null
@@ -1,351 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Shell utilities
-=================
-
-Shell utilities.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-import errno as _errno
-import fnmatch as _fnmatch
-import os as _os
-import shutil as _shutil
-import subprocess as _subprocess
-import sys as _sys
-import tempfile as _tempfile
-
-cwd = _os.path.dirname(_os.path.abspath(_sys.argv[0]))
-
-class ExitError(RuntimeError):
- """ Exit error """
- def __init__(self, code):
- RuntimeError.__init__(self, code)
- self.code = code
- self.signal = None
-
-
-class SignalError(ExitError):
- """ Signal error """
- def __init__(self, code, signal):
- ExitError.__init__(self, code)
- import signal as _signal
- self.signal = signal
- for key, val in vars(_signal).items():
- if key.startswith('SIG') and not key.startswith('SIG_'):
- if val == signal:
- self.signalstr = key[3:]
- break
- else:
- self.signalstr = '%04d' % signal
-
-
-def native(path):
- """ Convert slash path to native """
- path = _os.path.sep.join(path.split('/'))
- return _os.path.normpath(_os.path.join(cwd, path))
-
-
-def cp(src, dest):
- """ Copy src to dest """
- _shutil.copy2(native(src), native(dest))
-
-
-def cp_r(src, dest):
- """ Copy -r src to dest """
- _shutil.copytree(native(src), native(dest))
-
-
-def rm(dest):
- """ Remove a file """
- try:
- _os.unlink(native(dest))
- except OSError as e:
- if _errno.ENOENT != e.errno:
- raise
-
-def rm_rf(dest):
- """ Remove a tree """
- dest = native(dest)
- if _os.path.exists(dest):
- for path in files(dest, '*'):
- _os.chmod(native(path), 0o644)
- _shutil.rmtree(dest)
-
-
-mkstemp = _tempfile.mkstemp
-
-
-def _pipespawn(argv, env):
- """ Pipe spawn """
- # pylint: disable = R0912
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, ((r"""
-import os
-import pickle
-import subprocess
-import sys
-
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
-p = subprocess.Popen(argv, env=env)
-result = p.wait()
-if result < 0:
- print("\n%%d 1" %% (-result))
- sys.exit(2)
-if result == 0:
- sys.exit(0)
-print("\n%%d" %% (result & 7,))
-sys.exit(3)
- """.strip() + "\n") % {
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(dict(env))),
- }).encode('utf-8'))
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- shell = True
- close_fds = False
- else:
- argv = [_sys.executable, name]
- shell = False
- close_fds = True
-
- res = 0
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- proc = _subprocess.Popen(argv,
- shell=shell,
- stdin=_subprocess.PIPE,
- stdout=_subprocess.PIPE,
- close_fds=close_fds,
- env=env,
- )
- try:
- proc.stdin.close()
- result = proc.stdout.read()
- finally:
- res = proc.wait()
- if res != 0:
- if res == 2:
- signal, code = list(map(int, result.splitlines()[-1].split()))
- raise SignalError(code, signal)
- elif res == 3:
- code = int(result.splitlines()[-1].strip())
- raise ExitError(code)
- raise ExitError(res)
-
- return result.decode('latin-1')
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def _filepipespawn(infile, outfile, argv, env):
- """ File Pipe spawn """
- import pickle as _pickle
- fd, name = mkstemp('.py')
- try:
- _os.write(fd, (("""
-import os
-import pickle
-import sys
-
-infile = pickle.loads(%(infile)s)
-outfile = pickle.loads(%(outfile)s)
-argv = pickle.loads(%(argv)s)
-env = pickle.loads(%(env)s)
-
-if infile is not None:
- infile = open(infile, 'rb')
- os.dup2(infile.fileno(), 0)
- infile.close()
-if outfile is not None:
- outfile = open(outfile, 'wb')
- os.dup2(outfile.fileno(), 1)
- outfile.close()
-
-pid = os.spawnve(os.P_NOWAIT, argv[0], argv, env)
-result = os.waitpid(pid, 0)[1]
-sys.exit(result & 7)
- """.strip() + "\n") % {
- 'infile': repr(_pickle.dumps(_os.path.abspath(infile))),
- 'outfile': repr(_pickle.dumps(_os.path.abspath(outfile))),
- 'argv': repr(_pickle.dumps(argv)),
- 'env': repr(_pickle.dumps(env)),
- }).encode('utf-8'))
- fd, _ = None, _os.close(fd)
- if _sys.platform == 'win32':
- argv = []
- for arg in [_sys.executable, name]:
- if ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- argv.append(arg)
- argv = ' '.join(argv)
- close_fds = False
- shell = True
- else:
- argv = [_sys.executable, name]
- close_fds = True
- shell = False
-
- p = _subprocess.Popen(
- argv, env=env, shell=shell, close_fds=close_fds
- )
- return p.wait()
- finally:
- try:
- if fd is not None:
- _os.close(fd)
- finally:
- _os.unlink(name)
-
-
-def spawn(*argv, **kwargs):
- """ Spawn a process """
- if _sys.platform == 'win32':
- newargv = []
- for arg in argv:
- if not arg or ' ' in arg or arg.startswith('"'):
- arg = '"%s"' % arg.replace('"', '\\"')
- newargv.append(arg)
- argv = newargv
- close_fds = False
- shell = True
- else:
- close_fds = True
- shell = False
-
- env = kwargs.get('env')
- if env is None:
- env = dict(_os.environ)
- if 'X_JYTHON_WA_PATH' in env:
- env['PATH'] = env['X_JYTHON_WA_PATH']
-
- echo = kwargs.get('echo')
- if echo:
- print(' '.join(argv))
- filepipe = kwargs.get('filepipe')
- if filepipe:
- return _filepipespawn(
- kwargs.get('stdin'), kwargs.get('stdout'), argv, env
- )
- pipe = kwargs.get('stdout')
- if pipe:
- return _pipespawn(argv, env)
-
- p = _subprocess.Popen(argv, env=env, shell=shell, close_fds=close_fds)
- return p.wait()
-
-
-walk = _os.walk
-
-
-def files(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- filenames.sort()
- for name in _fnmatch.filter(filenames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
- dirnames.sort()
-
-
-def dirs(base, wildcard='[!.]*', recursive=1, prune=('.git', '.svn', 'CVS')):
- """ Determine a filelist """
- for dirpath, dirnames, filenames in walk(native(base)):
- for item in prune:
- if item in dirnames:
- dirnames.remove(item)
-
- dirnames.sort()
- for name in _fnmatch.filter(dirnames, wildcard):
- dest = _os.path.join(dirpath, name)
- if dest.startswith(cwd):
- dest = dest.replace(cwd, '', 1)
- aslist = []
- head, tail = _os.path.split(dest)
- while tail:
- aslist.append(tail)
- head, tail = _os.path.split(head)
- aslist.reverse()
- dest = '/'.join(aslist)
- yield dest
-
- if not recursive:
- break
-
-
-def frompath(executable):
- """ Find executable in PATH """
- # Based on distutils.spawn.find_executable.
- path = _os.environ.get('PATH', '')
- paths = [
- _os.path.expanduser(item)
- for item in path.split(_os.pathsep)
- ]
- ext = _os.path.splitext(executable)[1]
- exts = ['']
- if _sys.platform == 'win32' or _os.name == 'os2':
- eext = ['.exe', '.bat', '.py']
- if ext not in eext:
- exts.extend(eext)
-
- for ext in exts:
- if not _os.path.isfile(executable + ext):
- for path in paths:
- fname = _os.path.join(path, executable + ext)
- if _os.path.isfile(fname):
- # the file exists, we have a shot at spawn working
- return fname
- else:
- return executable + ext
-
- return None
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/util.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/util.py
deleted file mode 100644
index a07daa812fe..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/_setup/py3/util.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- coding: ascii -*-
-#
-# Copyright 2007, 2008, 2009, 2010, 2011
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-"""
-=================
- Setup utilities
-=================
-
-Setup utilities.
-"""
-__author__ = "Andr\xe9 Malo"
-__docformat__ = "restructuredtext en"
-
-from distutils import util as _util
-try:
- from configparser import SafeConfigParser
-except ImportError:
- import configparser as _config_parser
- class SafeConfigParser(_config_parser.ConfigParser):
- """ Safe config parser """
- def _interpolate(self, section, option, rawval, vars):
- return rawval
-
- def items(self, section):
- return [(key, self.get(section, key))
- for key in self.options(section)
- ]
-
-
-def humanbool(name, value):
- """
- Determine human boolean value
-
- :Parameters:
- `name` : ``str``
- The config key (used for error message)
-
- `value` : ``str``
- The config value
-
- :Return: The boolean value
- :Rtype: ``bool``
-
- :Exceptions:
- - `ValueError` : The value could not be recognized
- """
- try:
- return _util.strtobool(str(value).strip().lower() or 'no')
- except ValueError:
- raise ValueError("Unrecognized config value: %s = %s" % (name, value))
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/__init__.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/__init__.py
deleted file mode 100644
index 4465690a015..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: ascii -*-
-r"""
-=================================
- Benchmark jsmin implementations
-=================================
-
-Benchmark jsmin implementations.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-"""
-if __doc__:
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/apiviewer.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/apiviewer.js
deleted file mode 100644
index e70ebf87e9d..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/apiviewer.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
-This file is part of the qooxdoo framework.
-
-qooxdoo is dual-licensed under the GNU Lesser General Public License (LGPL) and the Eclipse Public License (EPL). As a recipient of qooxdoo, you may choose which license to receive the code under.
-*/
-
-(function(){
-
-if (!window.qx) window.qx = {};
-
-qx.$$start = new Date();
-
-if (!window.qxsettings) qxsettings = {};
-var settings = {"qx.application":"apiviewer.Application","qx.nativeScrollBars":true,"qx.theme":"apiviewer.Theme","qx.version":"1.3"};
-for (var k in settings) qxsettings[k] = settings[k];
-
-if (!window.qxvariants) qxvariants = {};
-var variants = {"qx.aspects":"off","qx.debug":"off"};
-for (var k in variants) qxvariants[k] = variants[k];
-
-if (!qx.$$libraries) qx.$$libraries = {};
-var libinfo = {"__out__":{"sourceUri":"script"},"apiviewer":{"resourceUri":"resource","sourceUri":"script","version":"trunk"},"qx":{"resourceUri":"resource","sourceUri":"script","version":"1.3"}};
-for (var k in libinfo) qx.$$libraries[k] = libinfo[k];
-
-qx.$$resources = {};
-qx.$$translations = {};
-qx.$$locales = {};
-qx.$$packageData = {};
-
-qx.$$loader = {
- parts : {"boot":[0]},
- uris : [["__out__:apiviewer.js"]],
- urisBefore : [],
- packageHashes : {"0":"9b3309ed13dc"},
- boot : "boot",
- closureParts : {},
- bootIsInline : true,
- addNoCacheParam : true,
-
- decodeUris : function(compressedUris)
- {
- var libs = qx.$$libraries;
- var uris = [];
- for (var i=0; i<compressedUris.length; i++)
- {
- var uri = compressedUris[i].split(":");
- var euri;
- if (uri.length==2 && uri[0] in libs) {
- var prefix = libs[uri[0]].sourceUri;
- euri = prefix + "/" + uri[1];
- } else {
- euri = compressedUris[i];
- }
- if (qx.$$loader.addNoCacheParam) {
- euri += "?nocache=" + Math.random();
- }
-
- uris.push(euri);
- }
- return uris;
- }
-};
-
-function loadScript(uri, callback) {
- var elem = document.createElement("script");
- elem.charset = "utf-8";
- elem.src = uri;
- elem.onreadystatechange = elem.onload = function()
- {
- if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")
- {
- elem.onreadystatechange = elem.onload = null;
- callback();
- }
- };
- var head = document.getElementsByTagName("head")[0];
- head.appendChild(elem);
-}
-
-var isWebkit = /AppleWebKit\/([^ ]+)/.test(navigator.userAgent);
-
-function loadScriptList(list, callback) {
- if (list.length == 0) {
- callback();
- return;
- }
- loadScript(list.shift(), function() {
- if (isWebkit) {
- // force asynchronous load
- // Safari fails with an "maximum recursion depth exceeded" error if it is
- // called sync.
- window.setTimeout(function() {
- loadScriptList(list, callback);
- }, 0);
- } else {
- loadScriptList(list, callback);
- }
- });
-}
-
-var fireContentLoadedEvent = function() {
- qx.$$domReady = true;
- document.removeEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
-};
-if (document.addEventListener) {
- document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
-}
-
-qx.$$loader.importPackageData = function (dataMap) {
- if (dataMap["resources"]){
- var resMap = dataMap["resources"];
- for (var k in resMap) qx.$$resources[k] = resMap[k];
- }
- if (dataMap["locales"]){
- var locMap = dataMap["locales"];
- var qxlocs = qx.$$locales;
- for (var lang in locMap){
- if (!qxlocs[lang]) qxlocs[lang] = locMap[lang];
- else
- for (var k in locMap[lang]) qxlocs[lang][k] = locMap[lang][k];
- }
- }
- if (dataMap["translations"]){
- var trMap = dataMap["translations"];
- var qxtrans = qx.$$translations;
- for (var lang in trMap){
- if (!qxtrans[lang]) qxtrans[lang] = trMap[lang];
- else
- for (var k in trMap[lang]) qxtrans[lang][k] = trMap[lang][k];
- }
- }
-}
-
-qx.$$loader.signalStartup = function ()
-{
- qx.$$loader.scriptLoaded = true;
- if (window.qx && qx.event && qx.event.handler && qx.event.handler.Application) {
- qx.event.handler.Application.onScriptLoaded();
- qx.$$loader.applicationHandlerReady = true;
- } else {
- qx.$$loader.applicationHandlerReady = false;
- }
-}
-
-qx.$$loader.init = function(){
- var l=qx.$$loader;
- if (l.urisBefore.length>0){
- loadScriptList(l.urisBefore, function(){
- l.initUris();
- });
- } else {
- l.initUris();
- }
-}
-
-qx.$$loader.initUris = function(){
- var l=qx.$$loader;
- var bootPackageHash=l.packageHashes[l.parts[l.boot][0]];
- if (l.bootIsInline){
- l.importPackageData(qx.$$packageData[bootPackageHash]);
- l.signalStartup();
- } else {
- loadScriptList(l.decodeUris(l.uris[l.parts[l.boot]]), function(){
- // Opera needs this extra time to parse the scripts
- window.setTimeout(function(){
- l.importPackageData(qx.$$packageData[bootPackageHash] || {});
- l.signalStartup();
- }, 0);
- });
- }
-}
-})();
-
-qx.$$packageData['9b3309ed13dc']={"locales":{"C":{"alternateQuotationEnd":"’","alternateQuotationStart":"‘","cldr_am":"AM","cldr_date_format_full":"EEEE, MMMM d, y","cldr_date_format_long":"MMMM d, y","cldr_date_format_medium":"MMM d, y","cldr_date_format_short":"M/d/yy","cldr_date_time_format_EEEd":"d EEE","cldr_date_time_format_Hm":"H:mm","cldr_date_time_format_Hms":"H:mm:ss","cldr_date_time_format_M":"L","cldr_date_time_format_MEd":"E, M/d","cldr_date_time_format_MMM":"LLL","cldr_date_time_format_MMMEd":"E, MMM d","cldr_date_time_format_MMMMEd":"E, MMMM d","cldr_date_time_format_MMMMd":"MMMM d","cldr_date_time_format_MMMd":"MMM d","cldr_date_time_format_Md":"M/d","cldr_date_time_format_d":"d","cldr_date_time_format_hm":"h:mm a","cldr_date_time_format_ms":"mm:ss","cldr_date_time_format_y":"y","cldr_date_time_format_yM":"M/yyyy","cldr_date_time_format_yMEd":"EEE, M/d/yyyy","cldr_date_time_format_yMMM":"MMM y","cldr_date_time_format_yMMMEd":"EEE, MMM d, y","cldr_date_time_format_yMMMM":"MMMM y","cldr_date_time_format_yQ":"Q yyyy","cldr_date_time_format_yQQQ":"QQQ y","cldr_day_format_abbreviated_fri":"Fri","cldr_day_format_abbreviated_mon":"Mon","cldr_day_format_abbreviated_sat":"Sat","cldr_day_format_abbreviated_sun":"Sun","cldr_day_format_abbreviated_thu":"Thu","cldr_day_format_abbreviated_tue":"Tue","cldr_day_format_abbreviated_wed":"Wed","cldr_day_format_narrow_fri":"F","cldr_day_format_narrow_mon":"M","cldr_day_format_narrow_sat":"S","cldr_day_format_narrow_sun":"S","cldr_day_format_narrow_thu":"T","cldr_day_format_narrow_tue":"T","cldr_day_format_narrow_wed":"W","cldr_day_format_wide_fri":"Friday","cldr_day_format_wide_mon":"Monday","cldr_day_format_wide_sat":"Saturday","cldr_day_format_wide_sun":"Sunday","cldr_day_format_wide_thu":"Thursday","cldr_day_format_wide_tue":"Tuesday","cldr_day_format_wide_wed":"Wednesday","cldr_day_stand-alone_abbreviated_fri":"Fri","cldr_day_stand-alone_abbreviated_mon":"Mon","cldr_day_stand-alone_abbreviated_sat":"Sat","cldr_day_stand-alone_abbreviated_sun":"Sun","cldr_day_stand-alone_abbreviated_thu":"Thu","cldr_day_stand-alone_abbreviated_tue":"Tue","cldr_day_stand-alone_abbreviated_wed":"Wed","cldr_day_stand-alone_narrow_fri":"F","cldr_day_stand-alone_narrow_mon":"M","cldr_day_stand-alone_narrow_sat":"S","cldr_day_stand-alone_narrow_sun":"S","cldr_day_stand-alone_narrow_thu":"T","cldr_day_stand-alone_narrow_tue":"T","cldr_day_stand-alone_narrow_wed":"W","cldr_day_stand-alone_wide_fri":"Friday","cldr_day_stand-alone_wide_mon":"Monday","cldr_day_stand-alone_wide_sat":"Saturday","cldr_day_stand-alone_wide_sun":"Sunday","cldr_day_stand-alone_wide_thu":"Thursday","cldr_day_stand-alone_wide_tue":"Tuesday","cldr_day_stand-alone_wide_wed":"Wednesday","cldr_month_format_abbreviated_1":"Jan","cldr_month_format_abbreviated_10":"Oct","cldr_month_format_abbreviated_11":"Nov","cldr_month_format_abbreviated_12":"Dec","cldr_month_format_abbreviated_2":"Feb","cldr_month_format_abbreviated_3":"Mar","cldr_month_format_abbreviated_4":"Apr","cldr_month_format_abbreviated_5":"May","cldr_month_format_abbreviated_6":"Jun","cldr_month_format_abbreviated_7":"Jul","cldr_month_format_abbreviated_8":"Aug","cldr_month_format_abbreviated_9":"Sep","cldr_month_format_wide_1":"January","cldr_month_format_wide_10":"October","cldr_month_format_wide_11":"November","cldr_month_format_wide_12":"December","cldr_month_format_wide_2":"February","cldr_month_format_wide_3":"March","cldr_month_format_wide_4":"April","cldr_month_format_wide_5":"May","cldr_month_format_wide_6":"June","cldr_month_format_wide_7":"July","cldr_month_format_wide_8":"August","cldr_month_format_wide_9":"September","cldr_month_stand-alone_narrow_1":"J","cldr_month_stand-alone_narrow_10":"O","cldr_month_stand-alone_narrow_11":"N","cldr_month_stand-alone_narrow_12":"D","cldr_month_stand-alone_narrow_2":"F","cldr_month_stand-alone_narrow_3":"M","cldr_month_stand-alone_narrow_4":"A","cldr_month_stand-alone_narrow_5":"M","cldr_month_stand-alone_narrow_6":"J","cldr_month_stand-alone_narrow_7":"J","cldr_month_stand-alone_narrow_8":"A","cldr_month_stand-alone_narrow_9":"S","cldr_number_decimal_separator":".","cldr_number_group_separator":",","cldr_number_percent_format":"#,##0%","cldr_pm":"PM","cldr_time_format_full":"h:mm:ss a zzzz","cldr_time_format_long":"h:mm:ss a z","cldr_time_format_medium":"h:mm:ss a","cldr_time_format_short":"h:mm a","quotationEnd":"”","quotationStart":"“"}},"resources":{"apiviewer/css/apiviewer.css":"apiviewer","apiviewer/image/blank.gif":[1,1,"gif","apiviewer"],"apiviewer/image/childcontrol18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-540],"apiviewer/image/class18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-324],"apiviewer/image/class_abstract18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-486],"apiviewer/image/class_abstract_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-306],"apiviewer/image/class_singleton18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-612],"apiviewer/image/class_singleton_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-252],"apiviewer/image/class_static18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-234],"apiviewer/image/class_static_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-144],"apiviewer/image/class_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-342],"apiviewer/image/close.gif":[17,13,"gif","apiviewer"],"apiviewer/image/colorstrip.gif":[192,10,"gif","apiviewer"],"apiviewer/image/constant18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-504],"apiviewer/image/constructor18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-558],"apiviewer/image/cross.gif":[18,18,"gif","apiviewer"],"apiviewer/image/event18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-198],"apiviewer/image/information18.png":[18,18,"png","apiviewer"],"apiviewer/image/interface18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-432],"apiviewer/image/interface_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-450],"apiviewer/image/method_private18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-270],"apiviewer/image/method_protected18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-216],"apiviewer/image/method_public18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-126],"apiviewer/image/method_public_inherited18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-18],"apiviewer/image/mixin18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-162],"apiviewer/image/mixin_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-108],"apiviewer/image/nextlevel.gif":[18,18,"gif","apiviewer"],"apiviewer/image/open.gif":[17,13,"gif","apiviewer"],"apiviewer/image/overlay_abstract18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,0],"apiviewer/image/overlay_constructor18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-36],"apiviewer/image/overlay_error18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-414],"apiviewer/image/overlay_inherited18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-576],"apiviewer/image/overlay_mixin18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-180],"apiviewer/image/overlay_overridden18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-288],"apiviewer/image/overlay_static18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-378],"apiviewer/image/overlay_themeable18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-360],"apiviewer/image/overlay_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-594],"apiviewer/image/package18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-54],"apiviewer/image/package_warning18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-90],"apiviewer/image/property18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-522],"apiviewer/image/property_private18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-72],"apiviewer/image/property_protected18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-468],"apiviewer/image/property_themeable18.gif":[18,18,"gif","apiviewer","apiviewer/imagesCombined/symbols.gif",0,-396],"apiviewer/image/search18.png":[18,18,"png","apiviewer"],"apiviewer/image/vline.gif":[18,18,"gif","apiviewer"],"apiviewer/imagesCombined/symbols.gif":[18,630,"gif","apiviewer"],"qx/decoration/Modern/app-header.png":[110,20,"png","qx"],"qx/decoration/Modern/arrows-combined.png":[87,8,"png","qx"],"qx/decoration/Modern/arrows/down-invert.png":[8,5,"png","qx","qx/decoration/Modern/arrows-combined.png",-74,0],"qx/decoration/Modern/arrows/down-small-invert.png":[5,3,"png","qx","qx/decoration/Modern/arrows-combined.png",-69,0],"qx/decoration/Modern/arrows/down-small.png":[5,3,"png","qx","qx/decoration/Modern/arrows-combined.png",-49,0],"qx/decoration/Modern/arrows/down.png":[8,5,"png","qx","qx/decoration/Modern/arrows-combined.png",-20,0],"qx/decoration/Modern/arrows/forward.png":[10,8,"png","qx","qx/decoration/Modern/arrows-combined.png",-59,0],"qx/decoration/Modern/arrows/left-invert.png":[5,8,"png","qx","qx/decoration/Modern/arrows-combined.png",0,0],"qx/decoration/Modern/arrows/left.png":[5,8,"png","qx","qx/decoration/Modern/arrows-combined.png",-44,0],"qx/decoration/Modern/arrows/rewind.png":[10,8,"png","qx","qx/decoration/Modern/arrows-combined.png",-10,0],"qx/decoration/Modern/arrows/right-invert.png":[5,8,"png","qx","qx/decoration/Modern/arrows-combined.png",-5,0],"qx/decoration/Modern/arrows/right.png":[5,8,"png","qx","qx/decoration/Modern/arrows-combined.png",-54,0],"qx/decoration/Modern/arrows/up-invert.png":[8,5,"png","qx","qx/decoration/Modern/arrows-combined.png",-28,0],"qx/decoration/Modern/arrows/up-small.png":[5,3,"png","qx","qx/decoration/Modern/arrows-combined.png",-82,0],"qx/decoration/Modern/arrows/up.png":[8,5,"png","qx","qx/decoration/Modern/arrows-combined.png",-36,0],"qx/decoration/Modern/button-lr-combined.png":[72,52,"png","qx"],"qx/decoration/Modern/button-tb-combined.png":[4,216,"png","qx"],"qx/decoration/Modern/checkradio-combined.png":[504,14,"png","qx"],"qx/decoration/Modern/colorselector-combined.gif":[46,11,"gif","qx"],"qx/decoration/Modern/colorselector/brightness-field.png":[19,256,"png","qx"],"qx/decoration/Modern/colorselector/brightness-handle.gif":[35,11,"gif","qx","qx/decoration/Modern/colorselector-combined.gif",0,0],"qx/decoration/Modern/colorselector/huesaturation-field.jpg":[256,256,"jpeg","qx"],"qx/decoration/Modern/colorselector/huesaturation-handle.gif":[11,11,"gif","qx","qx/decoration/Modern/colorselector-combined.gif",-35,0],"qx/decoration/Modern/cursors-combined.gif":[71,20,"gif","qx"],"qx/decoration/Modern/cursors/alias.gif":[19,15,"gif","qx","qx/decoration/Modern/cursors-combined.gif",-52,0],"qx/decoration/Modern/cursors/copy.gif":[19,15,"gif","qx","qx/decoration/Modern/cursors-combined.gif",-33,0],"qx/decoration/Modern/cursors/move.gif":[13,9,"gif","qx","qx/decoration/Modern/cursors-combined.gif",-20,0],"qx/decoration/Modern/cursors/nodrop.gif":[20,20,"gif","qx","qx/decoration/Modern/cursors-combined.gif",0,0],"qx/decoration/Modern/form/button-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-72],"qx/decoration/Modern/form/button-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-204],"qx/decoration/Modern/form/button-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-188],"qx/decoration/Modern/form/button-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-checked-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-36],"qx/decoration/Modern/form/button-checked-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-84],"qx/decoration/Modern/form/button-checked-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-184],"qx/decoration/Modern/form/button-checked-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-checked-focused-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-156],"qx/decoration/Modern/form/button-checked-focused-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-208],"qx/decoration/Modern/form/button-checked-focused-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-160],"qx/decoration/Modern/form/button-checked-focused-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-checked-focused-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-40,0],"qx/decoration/Modern/form/button-checked-focused-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-32,0],"qx/decoration/Modern/form/button-checked-focused-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-28],"qx/decoration/Modern/form/button-checked-focused-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-24],"qx/decoration/Modern/form/button-checked-focused-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-48],"qx/decoration/Modern/form/button-checked-focused.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-checked-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-16,0],"qx/decoration/Modern/form/button-checked-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-60,0],"qx/decoration/Modern/form/button-checked-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-140],"qx/decoration/Modern/form/button-checked-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-56],"qx/decoration/Modern/form/button-checked-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-112],"qx/decoration/Modern/form/button-checked.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-disabled-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-40],"qx/decoration/Modern/form/button-disabled-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-136],"qx/decoration/Modern/form/button-disabled-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-16],"qx/decoration/Modern/form/button-disabled-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-disabled-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-68,0],"qx/decoration/Modern/form/button-disabled-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-4,0],"qx/decoration/Modern/form/button-disabled-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-116],"qx/decoration/Modern/form/button-disabled-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-168],"qx/decoration/Modern/form/button-disabled-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-60],"qx/decoration/Modern/form/button-disabled.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-focused-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-68],"qx/decoration/Modern/form/button-focused-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-144],"qx/decoration/Modern/form/button-focused-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-8],"qx/decoration/Modern/form/button-focused-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-focused-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-24,0],"qx/decoration/Modern/form/button-focused-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-44,0],"qx/decoration/Modern/form/button-focused-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-192],"qx/decoration/Modern/form/button-focused-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-148],"qx/decoration/Modern/form/button-focused-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-104],"qx/decoration/Modern/form/button-focused.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-hovered-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-108],"qx/decoration/Modern/form/button-hovered-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-32],"qx/decoration/Modern/form/button-hovered-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-128],"qx/decoration/Modern/form/button-hovered-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-hovered-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-20,0],"qx/decoration/Modern/form/button-hovered-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-48,0],"qx/decoration/Modern/form/button-hovered-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-44],"qx/decoration/Modern/form/button-hovered-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-76],"qx/decoration/Modern/form/button-hovered-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-88],"qx/decoration/Modern/form/button-hovered.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-56,0],"qx/decoration/Modern/form/button-preselected-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-124],"qx/decoration/Modern/form/button-preselected-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-176],"qx/decoration/Modern/form/button-preselected-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-200],"qx/decoration/Modern/form/button-preselected-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-preselected-focused-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,0],"qx/decoration/Modern/form/button-preselected-focused-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-4],"qx/decoration/Modern/form/button-preselected-focused-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-152],"qx/decoration/Modern/form/button-preselected-focused-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-preselected-focused-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-28,0],"qx/decoration/Modern/form/button-preselected-focused-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-36,0],"qx/decoration/Modern/form/button-preselected-focused-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-196],"qx/decoration/Modern/form/button-preselected-focused-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-164],"qx/decoration/Modern/form/button-preselected-focused-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-212],"qx/decoration/Modern/form/button-preselected-focused.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-preselected-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-8,0],"qx/decoration/Modern/form/button-preselected-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-64,0],"qx/decoration/Modern/form/button-preselected-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-96],"qx/decoration/Modern/form/button-preselected-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-80],"qx/decoration/Modern/form/button-preselected-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-132],"qx/decoration/Modern/form/button-preselected.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-pressed-b.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-12],"qx/decoration/Modern/form/button-pressed-bl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-52],"qx/decoration/Modern/form/button-pressed-br.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-20],"qx/decoration/Modern/form/button-pressed-c.png":[40,52,"png","qx"],"qx/decoration/Modern/form/button-pressed-l.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-52,0],"qx/decoration/Modern/form/button-pressed-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",-12,0],"qx/decoration/Modern/form/button-pressed-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-100],"qx/decoration/Modern/form/button-pressed-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-172],"qx/decoration/Modern/form/button-pressed-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-64],"qx/decoration/Modern/form/button-pressed.png":[80,60,"png","qx"],"qx/decoration/Modern/form/button-r.png":[4,52,"png","qx","qx/decoration/Modern/button-lr-combined.png",0,0],"qx/decoration/Modern/form/button-t.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-92],"qx/decoration/Modern/form/button-tl.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-120],"qx/decoration/Modern/form/button-tr.png":[4,4,"png","qx","qx/decoration/Modern/button-tb-combined.png",0,-180],"qx/decoration/Modern/form/button.png":[80,60,"png","qx"],"qx/decoration/Modern/form/checkbox-checked-disabled.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-126,0],"qx/decoration/Modern/form/checkbox-checked-focused-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-322,0],"qx/decoration/Modern/form/checkbox-checked-focused.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-294,0],"qx/decoration/Modern/form/checkbox-checked-hovered-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-364,0],"qx/decoration/Modern/form/checkbox-checked-hovered.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-490,0],"qx/decoration/Modern/form/checkbox-checked-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-224,0],"qx/decoration/Modern/form/checkbox-checked-pressed-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-378,0],"qx/decoration/Modern/form/checkbox-checked-pressed.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-84,0],"qx/decoration/Modern/form/checkbox-checked.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-182,0],"qx/decoration/Modern/form/checkbox-disabled.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-42,0],"qx/decoration/Modern/form/checkbox-focused-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-392,0],"qx/decoration/Modern/form/checkbox-focused.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-210,0],"qx/decoration/Modern/form/checkbox-hovered-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-14,0],"qx/decoration/Modern/form/checkbox-hovered.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-238,0],"qx/decoration/Modern/form/checkbox-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-462,0],"qx/decoration/Modern/form/checkbox-pressed-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-112,0],"qx/decoration/Modern/form/checkbox-pressed.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-448,0],"qx/decoration/Modern/form/checkbox-undetermined-disabled.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox-undetermined-focused-invalid.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox-undetermined-focused.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox-undetermined-hovered-invalid.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox-undetermined-hovered.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox-undetermined-invalid.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox-undetermined.png":[14,14,"png","qx"],"qx/decoration/Modern/form/checkbox.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-140,0],"qx/decoration/Modern/form/input-focused.png":[40,12,"png","qx"],"qx/decoration/Modern/form/input.png":[84,12,"png","qx"],"qx/decoration/Modern/form/radiobutton-checked-disabled.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-196,0],"qx/decoration/Modern/form/radiobutton-checked-focused-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-168,0],"qx/decoration/Modern/form/radiobutton-checked-focused.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-98,0],"qx/decoration/Modern/form/radiobutton-checked-hovered-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-308,0],"qx/decoration/Modern/form/radiobutton-checked-hovered.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-406,0],"qx/decoration/Modern/form/radiobutton-checked-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-28,0],"qx/decoration/Modern/form/radiobutton-checked-pressed-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-350,0],"qx/decoration/Modern/form/radiobutton-checked-pressed.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-266,0],"qx/decoration/Modern/form/radiobutton-checked.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-252,0],"qx/decoration/Modern/form/radiobutton-disabled.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-336,0],"qx/decoration/Modern/form/radiobutton-focused-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-476,0],"qx/decoration/Modern/form/radiobutton-focused.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-420,0],"qx/decoration/Modern/form/radiobutton-hovered-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-56,0],"qx/decoration/Modern/form/radiobutton-hovered.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",0,0],"qx/decoration/Modern/form/radiobutton-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-154,0],"qx/decoration/Modern/form/radiobutton-pressed-invalid.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-434,0],"qx/decoration/Modern/form/radiobutton-pressed.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-280,0],"qx/decoration/Modern/form/radiobutton.png":[14,14,"png","qx","qx/decoration/Modern/checkradio-combined.png",-70,0],"qx/decoration/Modern/form/tooltip-error-arrow.png":[11,14,"png","qx"],"qx/decoration/Modern/form/tooltip-error-b.png":[6,6,"png","qx","qx/decoration/Modern/tooltip-error-tb-combined.png",0,-30],"qx/decoration/Modern/form/tooltip-error-bl.png":[6,6,"png","qx","qx/decoration/Modern/tooltip-error-tb-combined.png",0,-24],"qx/decoration/Modern/form/tooltip-error-br.png":[6,6,"png","qx","qx/decoration/Modern/tooltip-error-tb-combined.png",0,0],"qx/decoration/Modern/form/tooltip-error-c.png":[40,18,"png","qx"],"qx/decoration/Modern/form/tooltip-error-l.png":[6,18,"png","qx","qx/decoration/Modern/tooltip-error-lr-combined.png",-6,0],"qx/decoration/Modern/form/tooltip-error-r.png":[6,18,"png","qx","qx/decoration/Modern/tooltip-error-lr-combined.png",0,0],"qx/decoration/Modern/form/tooltip-error-t.png":[6,6,"png","qx","qx/decoration/Modern/tooltip-error-tb-combined.png",0,-6],"qx/decoration/Modern/form/tooltip-error-tl.png":[6,6,"png","qx","qx/decoration/Modern/tooltip-error-tb-combined.png",0,-18],"qx/decoration/Modern/form/tooltip-error-tr.png":[6,6,"png","qx","qx/decoration/Modern/tooltip-error-tb-combined.png",0,-12],"qx/decoration/Modern/form/tooltip-error.png":[127,30,"png","qx"],"qx/decoration/Modern/group-item.png":[110,20,"png","qx"],"qx/decoration/Modern/groupbox-lr-combined.png":[8,51,"png","qx"],"qx/decoration/Modern/groupbox-tb-combined.png":[4,24,"png","qx"],"qx/decoration/Modern/groupbox/groupbox-b.png":[4,4,"png","qx","qx/decoration/Modern/groupbox-tb-combined.png",0,-12],"qx/decoration/Modern/groupbox/groupbox-bl.png":[4,4,"png","qx","qx/decoration/Modern/groupbox-tb-combined.png",0,-16],"qx/decoration/Modern/groupbox/groupbox-br.png":[4,4,"png","qx","qx/decoration/Modern/groupbox-tb-combined.png",0,-8],"qx/decoration/Modern/groupbox/groupbox-c.png":[40,51,"png","qx"],"qx/decoration/Modern/groupbox/groupbox-l.png":[4,51,"png","qx","qx/decoration/Modern/groupbox-lr-combined.png",-4,0],"qx/decoration/Modern/groupbox/groupbox-r.png":[4,51,"png","qx","qx/decoration/Modern/groupbox-lr-combined.png",0,0],"qx/decoration/Modern/groupbox/groupbox-t.png":[4,4,"png","qx","qx/decoration/Modern/groupbox-tb-combined.png",0,-4],"qx/decoration/Modern/groupbox/groupbox-tl.png":[4,4,"png","qx","qx/decoration/Modern/groupbox-tb-combined.png",0,0],"qx/decoration/Modern/groupbox/groupbox-tr.png":[4,4,"png","qx","qx/decoration/Modern/groupbox-tb-combined.png",0,-20],"qx/decoration/Modern/groupbox/groupbox.png":[255,59,"png","qx"],"qx/decoration/Modern/menu-background-combined.png":[80,49,"png","qx"],"qx/decoration/Modern/menu-checkradio-combined.gif":[64,7,"gif","qx"],"qx/decoration/Modern/menu/background.png":[40,49,"png","qx","qx/decoration/Modern/menu-background-combined.png",-40,0],"qx/decoration/Modern/menu/bar-background.png":[40,20,"png","qx","qx/decoration/Modern/menu-background-combined.png",0,0],"qx/decoration/Modern/menu/checkbox-invert.gif":[16,7,"gif","qx","qx/decoration/Modern/menu-checkradio-combined.gif",-16,0],"qx/decoration/Modern/menu/checkbox.gif":[16,7,"gif","qx","qx/decoration/Modern/menu-checkradio-combined.gif",-48,0],"qx/decoration/Modern/menu/radiobutton-invert.gif":[16,5,"gif","qx","qx/decoration/Modern/menu-checkradio-combined.gif",-32,0],"qx/decoration/Modern/menu/radiobutton.gif":[16,5,"gif","qx","qx/decoration/Modern/menu-checkradio-combined.gif",0,0],"qx/decoration/Modern/pane-lr-combined.png":[12,238,"png","qx"],"qx/decoration/Modern/pane-tb-combined.png":[6,36,"png","qx"],"qx/decoration/Modern/pane/pane-b.png":[6,6,"png","qx","qx/decoration/Modern/pane-tb-combined.png",0,-30],"qx/decoration/Modern/pane/pane-bl.png":[6,6,"png","qx","qx/decoration/Modern/pane-tb-combined.png",0,-18],"qx/decoration/Modern/pane/pane-br.png":[6,6,"png","qx","qx/decoration/Modern/pane-tb-combined.png",0,-12],"qx/decoration/Modern/pane/pane-c.png":[40,238,"png","qx"],"qx/decoration/Modern/pane/pane-l.png":[6,238,"png","qx","qx/decoration/Modern/pane-lr-combined.png",0,0],"qx/decoration/Modern/pane/pane-r.png":[6,238,"png","qx","qx/decoration/Modern/pane-lr-combined.png",-6,0],"qx/decoration/Modern/pane/pane-t.png":[6,6,"png","qx","qx/decoration/Modern/pane-tb-combined.png",0,0],"qx/decoration/Modern/pane/pane-tl.png":[6,6,"png","qx","qx/decoration/Modern/pane-tb-combined.png",0,-24],"qx/decoration/Modern/pane/pane-tr.png":[6,6,"png","qx","qx/decoration/Modern/pane-tb-combined.png",0,-6],"qx/decoration/Modern/pane/pane.png":[185,250,"png","qx"],"qx/decoration/Modern/scrollbar-combined.png":[54,12,"png","qx"],"qx/decoration/Modern/scrollbar/scrollbar-bg-horizontal.png":[76,15,"png","qx"],"qx/decoration/Modern/scrollbar/scrollbar-bg-pressed-horizontal.png":[19,10,"png","qx"],"qx/decoration/Modern/scrollbar/scrollbar-bg-pressed-vertical.png":[10,19,"png","qx"],"qx/decoration/Modern/scrollbar/scrollbar-bg-vertical.png":[15,76,"png","qx"],"qx/decoration/Modern/scrollbar/scrollbar-button-bg-horizontal.png":[12,10,"png","qx","qx/decoration/Modern/scrollbar-combined.png",-34,0],"qx/decoration/Modern/scrollbar/scrollbar-button-bg-vertical.png":[10,12,"png","qx","qx/decoration/Modern/scrollbar-combined.png",-6,0],"qx/decoration/Modern/scrollbar/scrollbar-down.png":[6,4,"png","qx","qx/decoration/Modern/scrollbar-combined.png",-28,0],"qx/decoration/Modern/scrollbar/scrollbar-left.png":[4,6,"png","qx","qx/decoration/Modern/scrollbar-combined.png",-50,0],"qx/decoration/Modern/scrollbar/scrollbar-right.png":[4,6,"png","qx","qx/decoration/Modern/scrollbar-combined.png",-46,0],"qx/decoration/Modern/scrollbar/scrollbar-up.png":[6,4,"png","qx","qx/decoration/Modern/scrollbar-combined.png",0,0],"qx/decoration/Modern/scrollbar/slider-knob-background.png":[12,10,"png","qx","qx/decoration/Modern/scrollbar-combined.png",-16,0],"qx/decoration/Modern/selection.png":[110,20,"png","qx"],"qx/decoration/Modern/shadow-lr-combined.png":[30,382,"png","qx"],"qx/decoration/Modern/shadow-small-lr-combined.png":[10,136,"png","qx"],"qx/decoration/Modern/shadow-small-tb-combined.png":[5,30,"png","qx"],"qx/decoration/Modern/shadow-tb-combined.png":[15,90,"png","qx"],"qx/decoration/Modern/shadow/shadow-b.png":[15,15,"png","qx","qx/decoration/Modern/shadow-tb-combined.png",0,-30],"qx/decoration/Modern/shadow/shadow-bl.png":[15,15,"png","qx","qx/decoration/Modern/shadow-tb-combined.png",0,-15],"qx/decoration/Modern/shadow/shadow-br.png":[15,15,"png","qx","qx/decoration/Modern/shadow-tb-combined.png",0,-45],"qx/decoration/Modern/shadow/shadow-c.png":[40,382,"png","qx"],"qx/decoration/Modern/shadow/shadow-l.png":[15,382,"png","qx","qx/decoration/Modern/shadow-lr-combined.png",0,0],"qx/decoration/Modern/shadow/shadow-r.png":[15,382,"png","qx","qx/decoration/Modern/shadow-lr-combined.png",-15,0],"qx/decoration/Modern/shadow/shadow-small-b.png":[5,5,"png","qx","qx/decoration/Modern/shadow-small-tb-combined.png",0,-20],"qx/decoration/Modern/shadow/shadow-small-bl.png":[5,5,"png","qx","qx/decoration/Modern/shadow-small-tb-combined.png",0,-15],"qx/decoration/Modern/shadow/shadow-small-br.png":[5,5,"png","qx","qx/decoration/Modern/shadow-small-tb-combined.png",0,-10],"qx/decoration/Modern/shadow/shadow-small-c.png":[40,136,"png","qx"],"qx/decoration/Modern/shadow/shadow-small-l.png":[5,136,"png","qx","qx/decoration/Modern/shadow-small-lr-combined.png",0,0],"qx/decoration/Modern/shadow/shadow-small-r.png":[5,136,"png","qx","qx/decoration/Modern/shadow-small-lr-combined.png",-5,0],"qx/decoration/Modern/shadow/shadow-small-t.png":[5,5,"png","qx","qx/decoration/Modern/shadow-small-tb-combined.png",0,-5],"qx/decoration/Modern/shadow/shadow-small-tl.png":[5,5,"png","qx","qx/decoration/Modern/shadow-small-tb-combined.png",0,0],"qx/decoration/Modern/shadow/shadow-small-tr.png":[5,5,"png","qx","qx/decoration/Modern/shadow-small-tb-combined.png",0,-25],"qx/decoration/Modern/shadow/shadow-small.png":[114,146,"png","qx"],"qx/decoration/Modern/shadow/shadow-t.png":[15,15,"png","qx","qx/decoration/Modern/shadow-tb-combined.png",0,-60],"qx/decoration/Modern/shadow/shadow-tl.png":[15,15,"png","qx","qx/decoration/Modern/shadow-tb-combined.png",0,-75],"qx/decoration/Modern/shadow/shadow-tr.png":[15,15,"png","qx","qx/decoration/Modern/shadow-tb-combined.png",0,0],"qx/decoration/Modern/shadow/shadow.png":[381,412,"png","qx"],"qx/decoration/Modern/splitpane-knobs-combined.png":[8,9,"png","qx"],"qx/decoration/Modern/splitpane/knob-horizontal.png":[1,8,"png","qx","qx/decoration/Modern/splitpane-knobs-combined.png",0,-1],"qx/decoration/Modern/splitpane/knob-vertical.png":[8,1,"png","qx","qx/decoration/Modern/splitpane-knobs-combined.png",0,0],"qx/decoration/Modern/table-combined.png":[94,18,"png","qx"],"qx/decoration/Modern/table/ascending.png":[8,5,"png","qx","qx/decoration/Modern/table-combined.png",0,0],"qx/decoration/Modern/table/boolean-false.png":[14,14,"png","qx","qx/decoration/Modern/table-combined.png",-80,0],"qx/decoration/Modern/table/boolean-true.png":[14,14,"png","qx","qx/decoration/Modern/table-combined.png",-26,0],"qx/decoration/Modern/table/descending.png":[8,5,"png","qx","qx/decoration/Modern/table-combined.png",-18,0],"qx/decoration/Modern/table/header-cell.png":[40,18,"png","qx","qx/decoration/Modern/table-combined.png",-40,0],"qx/decoration/Modern/table/select-column-order.png":[10,9,"png","qx","qx/decoration/Modern/table-combined.png",-8,0],"qx/decoration/Modern/tabview-button-bottom-active-lr-combined.png":[10,14,"png","qx"],"qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png":[5,30,"png","qx"],"qx/decoration/Modern/tabview-button-bottom-inactive-b-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-bottom-inactive-lr-combined.png":[6,15,"png","qx"],"qx/decoration/Modern/tabview-button-bottom-inactive-t-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-left-active-lr-combined.png":[10,37,"png","qx"],"qx/decoration/Modern/tabview-button-left-active-tb-combined.png":[5,30,"png","qx"],"qx/decoration/Modern/tabview-button-left-inactive-b-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-left-inactive-lr-combined.png":[6,39,"png","qx"],"qx/decoration/Modern/tabview-button-left-inactive-t-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-right-active-lr-combined.png":[10,37,"png","qx"],"qx/decoration/Modern/tabview-button-right-active-tb-combined.png":[5,30,"png","qx"],"qx/decoration/Modern/tabview-button-right-inactive-b-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-right-inactive-lr-combined.png":[6,39,"png","qx"],"qx/decoration/Modern/tabview-button-right-inactive-t-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-top-active-lr-combined.png":[10,12,"png","qx"],"qx/decoration/Modern/tabview-button-top-active-tb-combined.png":[5,30,"png","qx"],"qx/decoration/Modern/tabview-button-top-inactive-b-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-button-top-inactive-lr-combined.png":[6,15,"png","qx"],"qx/decoration/Modern/tabview-button-top-inactive-t-combined.png":[3,9,"png","qx"],"qx/decoration/Modern/tabview-pane-lr-combined.png":[60,2,"png","qx"],"qx/decoration/Modern/tabview-pane-tb-combined.png":[30,180,"png","qx"],"qx/decoration/Modern/tabview/tab-button-bottom-active-b.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png",0,-10],"qx/decoration/Modern/tabview/tab-button-bottom-active-bl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png",0,-15],"qx/decoration/Modern/tabview/tab-button-bottom-active-br.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png",0,-5],"qx/decoration/Modern/tabview/tab-button-bottom-active-c.png":[40,14,"png","qx"],"qx/decoration/Modern/tabview/tab-button-bottom-active-l.png":[5,14,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-bottom-active-r.png":[5,14,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-lr-combined.png",-5,0],"qx/decoration/Modern/tabview/tab-button-bottom-active-t.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png",0,-20],"qx/decoration/Modern/tabview/tab-button-bottom-active-tl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png",0,-25],"qx/decoration/Modern/tabview/tab-button-bottom-active-tr.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-bottom-active-tb-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-bottom-active.png":[49,24,"png","qx"],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-b.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-b-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-bl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-b-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-br.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-b-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-c.png":[40,15,"png","qx"],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-l.png":[3,15,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-lr-combined.png",-3,0],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-r.png":[3,15,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-t.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-t-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-tl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-t-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-bottom-inactive-tr.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-bottom-inactive-t-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-bottom-inactive.png":[45,21,"png","qx"],"qx/decoration/Modern/tabview/tab-button-left-active-b.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-left-active-tb-combined.png",0,-5],"qx/decoration/Modern/tabview/tab-button-left-active-bl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-left-active-tb-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-left-active-br.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-left-active-tb-combined.png",0,-25],"qx/decoration/Modern/tabview/tab-button-left-active-c.png":[40,37,"png","qx"],"qx/decoration/Modern/tabview/tab-button-left-active-l.png":[5,37,"png","qx","qx/decoration/Modern/tabview-button-left-active-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-left-active-r.png":[5,37,"png","qx","qx/decoration/Modern/tabview-button-left-active-lr-combined.png",-5,0],"qx/decoration/Modern/tabview/tab-button-left-active-t.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-left-active-tb-combined.png",0,-15],"qx/decoration/Modern/tabview/tab-button-left-active-tl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-left-active-tb-combined.png",0,-10],"qx/decoration/Modern/tabview/tab-button-left-active-tr.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-left-active-tb-combined.png",0,-20],"qx/decoration/Modern/tabview/tab-button-left-active.png":[22,47,"png","qx"],"qx/decoration/Modern/tabview/tab-button-left-inactive-b.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-b-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-left-inactive-bl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-b-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-left-inactive-br.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-b-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-left-inactive-c.png":[40,39,"png","qx"],"qx/decoration/Modern/tabview/tab-button-left-inactive-l.png":[3,39,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-lr-combined.png",-3,0],"qx/decoration/Modern/tabview/tab-button-left-inactive-r.png":[3,39,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-left-inactive-t.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-t-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-left-inactive-tl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-t-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-left-inactive-tr.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-left-inactive-t-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-left-inactive.png":[20,45,"png","qx"],"qx/decoration/Modern/tabview/tab-button-right-active-b.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-right-active-tb-combined.png",0,-25],"qx/decoration/Modern/tabview/tab-button-right-active-bl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-right-active-tb-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-right-active-br.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-right-active-tb-combined.png",0,-20],"qx/decoration/Modern/tabview/tab-button-right-active-c.png":[40,37,"png","qx"],"qx/decoration/Modern/tabview/tab-button-right-active-l.png":[5,37,"png","qx","qx/decoration/Modern/tabview-button-right-active-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-right-active-r.png":[5,37,"png","qx","qx/decoration/Modern/tabview-button-right-active-lr-combined.png",-5,0],"qx/decoration/Modern/tabview/tab-button-right-active-t.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-right-active-tb-combined.png",0,-5],"qx/decoration/Modern/tabview/tab-button-right-active-tl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-right-active-tb-combined.png",0,-15],"qx/decoration/Modern/tabview/tab-button-right-active-tr.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-right-active-tb-combined.png",0,-10],"qx/decoration/Modern/tabview/tab-button-right-active.png":[22,47,"png","qx"],"qx/decoration/Modern/tabview/tab-button-right-inactive-b.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-b-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-right-inactive-bl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-b-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-right-inactive-br.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-b-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-right-inactive-c.png":[40,39,"png","qx"],"qx/decoration/Modern/tabview/tab-button-right-inactive-l.png":[3,39,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-right-inactive-r.png":[3,39,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-lr-combined.png",-3,0],"qx/decoration/Modern/tabview/tab-button-right-inactive-t.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-t-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-right-inactive-tl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-t-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-right-inactive-tr.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-right-inactive-t-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-right-inactive.png":[20,45,"png","qx"],"qx/decoration/Modern/tabview/tab-button-top-active-b.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-top-active-tb-combined.png",0,-20],"qx/decoration/Modern/tabview/tab-button-top-active-bl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-top-active-tb-combined.png",0,-15],"qx/decoration/Modern/tabview/tab-button-top-active-br.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-top-active-tb-combined.png",0,-10],"qx/decoration/Modern/tabview/tab-button-top-active-c.png":[40,14,"png","qx"],"qx/decoration/Modern/tabview/tab-button-top-active-l.png":[5,12,"png","qx","qx/decoration/Modern/tabview-button-top-active-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-top-active-r.png":[5,12,"png","qx","qx/decoration/Modern/tabview-button-top-active-lr-combined.png",-5,0],"qx/decoration/Modern/tabview/tab-button-top-active-t.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-top-active-tb-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-top-active-tl.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-top-active-tb-combined.png",0,-25],"qx/decoration/Modern/tabview/tab-button-top-active-tr.png":[5,5,"png","qx","qx/decoration/Modern/tabview-button-top-active-tb-combined.png",0,-5],"qx/decoration/Modern/tabview/tab-button-top-active.png":[48,22,"png","qx"],"qx/decoration/Modern/tabview/tab-button-top-inactive-b.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-b-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-top-inactive-bl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-b-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-top-inactive-br.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-b-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-top-inactive-c.png":[40,15,"png","qx"],"qx/decoration/Modern/tabview/tab-button-top-inactive-l.png":[3,15,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-top-inactive-r.png":[3,15,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-lr-combined.png",-3,0],"qx/decoration/Modern/tabview/tab-button-top-inactive-t.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-t-combined.png",0,-3],"qx/decoration/Modern/tabview/tab-button-top-inactive-tl.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-t-combined.png",0,0],"qx/decoration/Modern/tabview/tab-button-top-inactive-tr.png":[3,3,"png","qx","qx/decoration/Modern/tabview-button-top-inactive-t-combined.png",0,-6],"qx/decoration/Modern/tabview/tab-button-top-inactive.png":[45,21,"png","qx"],"qx/decoration/Modern/tabview/tabview-pane-b.png":[30,30,"png","qx","qx/decoration/Modern/tabview-pane-tb-combined.png",0,-60],"qx/decoration/Modern/tabview/tabview-pane-bl.png":[30,30,"png","qx","qx/decoration/Modern/tabview-pane-tb-combined.png",0,0],"qx/decoration/Modern/tabview/tabview-pane-br.png":[30,30,"png","qx","qx/decoration/Modern/tabview-pane-tb-combined.png",0,-120],"qx/decoration/Modern/tabview/tabview-pane-c.png":[40,120,"png","qx"],"qx/decoration/Modern/tabview/tabview-pane-l.png":[30,2,"png","qx","qx/decoration/Modern/tabview-pane-lr-combined.png",0,0],"qx/decoration/Modern/tabview/tabview-pane-r.png":[30,2,"png","qx","qx/decoration/Modern/tabview-pane-lr-combined.png",-30,0],"qx/decoration/Modern/tabview/tabview-pane-t.png":[30,30,"png","qx","qx/decoration/Modern/tabview-pane-tb-combined.png",0,-150],"qx/decoration/Modern/tabview/tabview-pane-tl.png":[30,30,"png","qx","qx/decoration/Modern/tabview-pane-tb-combined.png",0,-30],"qx/decoration/Modern/tabview/tabview-pane-tr.png":[30,30,"png","qx","qx/decoration/Modern/tabview-pane-tb-combined.png",0,-90],"qx/decoration/Modern/tabview/tabview-pane.png":[185,250,"png","qx"],"qx/decoration/Modern/toolbar-combined.png":[80,130,"png","qx"],"qx/decoration/Modern/toolbar/toolbar-gradient-blue.png":[40,130,"png","qx","qx/decoration/Modern/toolbar-combined.png",-40,0],"qx/decoration/Modern/toolbar/toolbar-gradient.png":[40,130,"png","qx","qx/decoration/Modern/toolbar-combined.png",0,0],"qx/decoration/Modern/toolbar/toolbar-handle-knob.gif":[1,8,"gif","qx"],"qx/decoration/Modern/toolbar/toolbar-part.gif":[7,1,"gif","qx"],"qx/decoration/Modern/tooltip-error-lr-combined.png":[12,18,"png","qx"],"qx/decoration/Modern/tooltip-error-tb-combined.png":[6,36,"png","qx"],"qx/decoration/Modern/tree-combined.png":[32,8,"png","qx"],"qx/decoration/Modern/tree/closed-selected.png":[8,8,"png","qx","qx/decoration/Modern/tree-combined.png",-24,0],"qx/decoration/Modern/tree/closed.png":[8,8,"png","qx","qx/decoration/Modern/tree-combined.png",-16,0],"qx/decoration/Modern/tree/open-selected.png":[8,8,"png","qx","qx/decoration/Modern/tree-combined.png",-8,0],"qx/decoration/Modern/tree/open.png":[8,8,"png","qx","qx/decoration/Modern/tree-combined.png",0,0],"qx/decoration/Modern/window-captionbar-buttons-combined.png":[108,9,"png","qx"],"qx/decoration/Modern/window-captionbar-lr-active-combined.png":[12,9,"png","qx"],"qx/decoration/Modern/window-captionbar-lr-inactive-combined.png":[12,9,"png","qx"],"qx/decoration/Modern/window-captionbar-tb-active-combined.png":[6,36,"png","qx"],"qx/decoration/Modern/window-captionbar-tb-inactive-combined.png":[6,36,"png","qx"],"qx/decoration/Modern/window-statusbar-lr-combined.png":[8,7,"png","qx"],"qx/decoration/Modern/window-statusbar-tb-combined.png":[4,24,"png","qx"],"qx/decoration/Modern/window/captionbar-active-b.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-active-combined.png",0,-18],"qx/decoration/Modern/window/captionbar-active-bl.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-active-combined.png",0,-24],"qx/decoration/Modern/window/captionbar-active-br.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-active-combined.png",0,-12],"qx/decoration/Modern/window/captionbar-active-c.png":[40,9,"png","qx"],"qx/decoration/Modern/window/captionbar-active-l.png":[6,9,"png","qx","qx/decoration/Modern/window-captionbar-lr-active-combined.png",-6,0],"qx/decoration/Modern/window/captionbar-active-r.png":[6,9,"png","qx","qx/decoration/Modern/window-captionbar-lr-active-combined.png",0,0],"qx/decoration/Modern/window/captionbar-active-t.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-active-combined.png",0,-6],"qx/decoration/Modern/window/captionbar-active-tl.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-active-combined.png",0,0],"qx/decoration/Modern/window/captionbar-active-tr.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-active-combined.png",0,-30],"qx/decoration/Modern/window/captionbar-active.png":[69,21,"png","qx"],"qx/decoration/Modern/window/captionbar-inactive-b.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-inactive-combined.png",0,-24],"qx/decoration/Modern/window/captionbar-inactive-bl.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-inactive-combined.png",0,-6],"qx/decoration/Modern/window/captionbar-inactive-br.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-inactive-combined.png",0,-30],"qx/decoration/Modern/window/captionbar-inactive-c.png":[40,9,"png","qx"],"qx/decoration/Modern/window/captionbar-inactive-l.png":[6,9,"png","qx","qx/decoration/Modern/window-captionbar-lr-inactive-combined.png",0,0],"qx/decoration/Modern/window/captionbar-inactive-r.png":[6,9,"png","qx","qx/decoration/Modern/window-captionbar-lr-inactive-combined.png",-6,0],"qx/decoration/Modern/window/captionbar-inactive-t.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-inactive-combined.png",0,0],"qx/decoration/Modern/window/captionbar-inactive-tl.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-inactive-combined.png",0,-12],"qx/decoration/Modern/window/captionbar-inactive-tr.png":[6,6,"png","qx","qx/decoration/Modern/window-captionbar-tb-inactive-combined.png",0,-18],"qx/decoration/Modern/window/captionbar-inactive.png":[69,21,"png","qx"],"qx/decoration/Modern/window/close-active-hovered.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-27,0],"qx/decoration/Modern/window/close-active.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-9,0],"qx/decoration/Modern/window/close-inactive.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-90,0],"qx/decoration/Modern/window/maximize-active-hovered.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-18,0],"qx/decoration/Modern/window/maximize-active.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-81,0],"qx/decoration/Modern/window/maximize-inactive.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-54,0],"qx/decoration/Modern/window/minimize-active-hovered.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-63,0],"qx/decoration/Modern/window/minimize-active.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-72,0],"qx/decoration/Modern/window/minimize-inactive.png":[9,9,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-36,0],"qx/decoration/Modern/window/restore-active-hovered.png":[9,8,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",0,0],"qx/decoration/Modern/window/restore-active.png":[9,8,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-99,0],"qx/decoration/Modern/window/restore-inactive.png":[9,8,"png","qx","qx/decoration/Modern/window-captionbar-buttons-combined.png",-45,0],"qx/decoration/Modern/window/statusbar-b.png":[4,4,"png","qx","qx/decoration/Modern/window-statusbar-tb-combined.png",0,-16],"qx/decoration/Modern/window/statusbar-bl.png":[4,4,"png","qx","qx/decoration/Modern/window-statusbar-tb-combined.png",0,-20],"qx/decoration/Modern/window/statusbar-br.png":[4,4,"png","qx","qx/decoration/Modern/window-statusbar-tb-combined.png",0,-4],"qx/decoration/Modern/window/statusbar-c.png":[40,7,"png","qx"],"qx/decoration/Modern/window/statusbar-l.png":[4,7,"png","qx","qx/decoration/Modern/window-statusbar-lr-combined.png",-4,0],"qx/decoration/Modern/window/statusbar-r.png":[4,7,"png","qx","qx/decoration/Modern/window-statusbar-lr-combined.png",0,0],"qx/decoration/Modern/window/statusbar-t.png":[4,4,"png","qx","qx/decoration/Modern/window-statusbar-tb-combined.png",0,0],"qx/decoration/Modern/window/statusbar-tl.png":[4,4,"png","qx","qx/decoration/Modern/window-statusbar-tb-combined.png",0,-8],"qx/decoration/Modern/window/statusbar-tr.png":[4,4,"png","qx","qx/decoration/Modern/window-statusbar-tb-combined.png",0,-12],"qx/decoration/Modern/window/statusbar.png":[369,15,"png","qx"],"qx/icon/Tango/16/actions/dialog-cancel.png":[16,16,"png","qx"],"qx/icon/Tango/16/actions/dialog-ok.png":[16,16,"png","qx"],"qx/icon/Tango/16/actions/view-refresh.png":[16,16,"png","qx"],"qx/icon/Tango/16/actions/window-close.png":[16,16,"png","qx"],"qx/icon/Tango/16/apps/office-calendar.png":[16,16,"png","qx"],"qx/icon/Tango/16/apps/utilities-color-chooser.png":[16,16,"png","qx"],"qx/icon/Tango/16/mimetypes/office-document.png":[16,16,"png","qx"],"qx/icon/Tango/16/places/folder-open.png":[16,16,"png","qx"],"qx/icon/Tango/16/places/folder.png":[16,16,"png","qx"],"qx/icon/Tango/22/actions/edit-find.png":[22,22,"png","qx"],"qx/icon/Tango/22/actions/media-seek-forward.png":[22,22,"png","qx"],"qx/icon/Tango/22/apps/utilities-dictionary.png":[22,22,"png","qx"],"qx/icon/Tango/22/apps/utilities-graphics-viewer.png":[22,22,"png","qx"],"qx/icon/Tango/22/apps/utilities-help.png":[22,22,"png","qx"],"qx/icon/Tango/22/mimetypes/office-document.png":[22,22,"png","qx"],"qx/icon/Tango/22/places/folder-open.png":[22,22,"png","qx"],"qx/icon/Tango/22/places/folder.png":[22,22,"png","qx"],"qx/icon/Tango/32/mimetypes/office-document.png":[32,32,"png","qx"],"qx/icon/Tango/32/places/folder-open.png":[32,32,"png","qx"],"qx/icon/Tango/32/places/folder.png":[32,32,"png","qx"],"qx/static/blank.gif":[1,1,"gif","qx"],"qx/static/blank.html":"qx"},"translations":{"C":{}}};
-(function(){var m="toString",k=".",j="default",h="Object",g='"',f="Array",e="()",d="String",c="Function",b=".prototype",L="function",K="Boolean",J="Error",I="constructor",H="warn",G="hasOwnProperty",F="string",E="toLocaleString",D="RegExp",C='\", "',t="info",u="BROKEN_IE",r="isPrototypeOf",s="Date",p="",q="qx.Bootstrap",n="]",o="Class",v="error",w="[Class ",y="valueOf",x="Number",A="count",z="debug",B="ES5";if(!window.qx){window.qx={};}qx.Bootstrap={genericToString:function(){return w+this.classname+n;},createNamespace:function(name,M){var O=name.split(k);var parent=window;var N=O[0];for(var i=0,P=O.length-1;i<P;i++,N=O[i]){if(!parent[N]){parent=parent[N]={};}else{parent=parent[N];}}parent[N]=M;return N;},setDisplayName:function(Q,R,name){Q.displayName=R+k+name+e;},setDisplayNames:function(S,T){for(var name in S){var U=S[name];if(U instanceof Function){U.displayName=T+k+name+e;}}},define:function(name,V){if(!V){var V={statics:{}};}var bb;var Y=null;qx.Bootstrap.setDisplayNames(V.statics,name);if(V.members||V.extend){qx.Bootstrap.setDisplayNames(V.members,name+b);bb=V.construct||new Function;if(V.extend){this.extendClass(bb,bb,V.extend,name,ba);}var W=V.statics||{};for(var i=0,bc=qx.Bootstrap.getKeys(W),l=bc.length;i<l;i++){var bd=bc[i];bb[bd]=W[bd];}Y=bb.prototype;var X=V.members||{};for(var i=0,bc=qx.Bootstrap.getKeys(X),l=bc.length;i<l;i++){var bd=bc[i];Y[bd]=X[bd];}}else{bb=V.statics||{};}var ba=this.createNamespace(name,bb);bb.name=bb.classname=name;bb.basename=ba;bb.$$type=o;if(!bb.hasOwnProperty(m)){bb.toString=this.genericToString;}if(V.defer){V.defer(bb,Y);}qx.Bootstrap.$$registry[name]=V.statics;return bb;}};qx.Bootstrap.define(q,{statics:{LOADSTART:qx.$$start||new Date(),createNamespace:qx.Bootstrap.createNamespace,define:qx.Bootstrap.define,setDisplayName:qx.Bootstrap.setDisplayName,setDisplayNames:qx.Bootstrap.setDisplayNames,genericToString:qx.Bootstrap.genericToString,extendClass:function(be,bf,bg,name,bh){var bk=bg.prototype;var bj=new Function;bj.prototype=bk;var bi=new bj;be.prototype=bi;bi.name=bi.classname=name;bi.basename=bh;bf.base=be.superclass=bg;bf.self=be.constructor=bi.constructor=be;},getByName:function(name){return qx.Bootstrap.$$registry[name];},$$registry:{},objectGetLength:({"count":function(bl){return bl.__count__;},"default":function(bm){var length=0;for(var bn in bm){length++;}return length;}})[(({}).__count__==0)?A:j],objectMergeWith:function(bo,bp,bq){if(bq===undefined){bq=true;}for(var br in bp){if(bq||bo[br]===undefined){bo[br]=bp[br];}}return bo;},__id:[r,G,E,m,y,I],getKeys:({"ES5":Object.keys,"BROKEN_IE":function(bs){var bt=[];var bv=Object.prototype.hasOwnProperty;for(var bw in bs){if(bv.call(bs,bw)){bt.push(bw);}}var bu=qx.Bootstrap.__id;for(var i=0,a=bu,l=a.length;i<l;i++){if(bv.call(bs,a[i])){bt.push(a[i]);}}return bt;},"default":function(bx){var by=[];var bz=Object.prototype.hasOwnProperty;for(var bA in bx){if(bz.call(bx,bA)){by.push(bA);}}return by;}})[typeof (Object.keys)==L?B:(function(){for(var bB in {toString:1}){return bB;}})()!==m?u:j],getKeysAsString:function(bC){var bD=qx.Bootstrap.getKeys(bC);if(bD.length==0){return p;}return g+bD.join(C)+g;},__ie:{"[object String]":d,"[object Array]":f,"[object Object]":h,"[object RegExp]":D,"[object Number]":x,"[object Boolean]":K,"[object Date]":s,"[object Function]":c,"[object Error]":J},bind:function(bE,self,bF){var bG=Array.prototype.slice.call(arguments,2,arguments.length);return function(){var bH=Array.prototype.slice.call(arguments,0,arguments.length);return bE.apply(self,bG.concat(bH));};},firstUp:function(bI){return bI.charAt(0).toUpperCase()+bI.substr(1);},firstLow:function(bJ){return bJ.charAt(0).toLowerCase()+bJ.substr(1);},getClass:function(bK){var bL=Object.prototype.toString.call(bK);return (qx.Bootstrap.__ie[bL]||bL.slice(8,-1));},isString:function(bM){return (bM!==null&&(typeof bM===F||qx.Bootstrap.getClass(bM)==d||bM instanceof String||(!!bM&&!!bM.$$isString)));},isArray:function(bN){return (bN!==null&&(bN instanceof Array||(bN&&qx.data&&qx.data.IListData&&qx.Bootstrap.hasInterface(bN.constructor,qx.data.IListData))||qx.Bootstrap.getClass(bN)==f||(!!bN&&!!bN.$$isArray)));},isObject:function(bO){return (bO!==undefined&&bO!==null&&qx.Bootstrap.getClass(bO)==h);},isFunction:function(bP){return qx.Bootstrap.getClass(bP)==c;},classIsDefined:function(name){return qx.Bootstrap.getByName(name)!==undefined;},getPropertyDefinition:function(bQ,name){while(bQ){if(bQ.$$properties&&bQ.$$properties[name]){return bQ.$$properties[name];}bQ=bQ.superclass;}return null;},hasProperty:function(bR,name){return !!qx.Bootstrap.getPropertyDefinition(bR,name);},getEventType:function(bS,name){var bS=bS.constructor;while(bS.superclass){if(bS.$$events&&bS.$$events[name]!==undefined){return bS.$$events[name];}bS=bS.superclass;}return null;},supportsEvent:function(bT,name){return !!qx.Bootstrap.getEventType(bT,name);},getByInterface:function(bU,bV){var bW,i,l;while(bU){if(bU.$$implements){bW=bU.$$flatImplements;for(i=0,l=bW.length;i<l;i++){if(bW[i]===bV){return bU;}}}bU=bU.superclass;}return null;},hasInterface:function(bX,bY){return !!qx.Bootstrap.getByInterface(bX,bY);},getMixins:function(ca){var cb=[];while(ca){if(ca.$$includes){cb.push.apply(cb,ca.$$flatIncludes);}ca=ca.superclass;}return cb;},$$logs:[],debug:function(cc,cd){qx.Bootstrap.$$logs.push([z,arguments]);},info:function(ce,cf){qx.Bootstrap.$$logs.push([t,arguments]);},warn:function(cg,ch){qx.Bootstrap.$$logs.push([H,arguments]);},error:function(ci,cj){qx.Bootstrap.$$logs.push([v,arguments]);},trace:function(ck){}}});})();(function(){var g="qx.Mixin",f=".prototype",e="constructor",d="[Mixin ",c="]",b="destruct",a="Mixin";qx.Bootstrap.define(g,{statics:{define:function(name,h){if(h){if(h.include&&!(h.include instanceof Array)){h.include=[h.include];}{};var k=h.statics?h.statics:{};qx.Bootstrap.setDisplayNames(k,name);for(var j in k){if(k[j] instanceof Function){k[j].$$mixin=k;}}if(h.construct){k.$$constructor=h.construct;qx.Bootstrap.setDisplayName(h.construct,name,e);}if(h.include){k.$$includes=h.include;}if(h.properties){k.$$properties=h.properties;}if(h.members){k.$$members=h.members;qx.Bootstrap.setDisplayNames(h.members,name+f);}for(var j in k.$$members){if(k.$$members[j] instanceof Function){k.$$members[j].$$mixin=k;}}if(h.events){k.$$events=h.events;}if(h.destruct){k.$$destructor=h.destruct;qx.Bootstrap.setDisplayName(h.destruct,name,b);}}else{var k={};}k.$$type=a;k.name=name;k.toString=this.genericToString;k.basename=qx.Bootstrap.createNamespace(name,k);this.$$registry[name]=k;return k;},checkCompatibility:function(m){var p=this.flatten(m);var q=p.length;if(q<2){return true;}var t={};var s={};var r={};var o;for(var i=0;i<q;i++){o=p[i];for(var n in o.events){if(r[n]){throw new Error('Conflict between mixin "'+o.name+'" and "'+r[n]+'" in member "'+n+'"!');}r[n]=o.name;}for(var n in o.properties){if(t[n]){throw new Error('Conflict between mixin "'+o.name+'" and "'+t[n]+'" in property "'+n+'"!');}t[n]=o.name;}for(var n in o.members){if(s[n]){throw new Error('Conflict between mixin "'+o.name+'" and "'+s[n]+'" in member "'+n+'"!');}s[n]=o.name;}}return true;},isCompatible:function(u,v){var w=qx.Bootstrap.getMixins(v);w.push(u);return qx.Mixin.checkCompatibility(w);},getByName:function(name){return this.$$registry[name];},isDefined:function(name){return this.getByName(name)!==undefined;},getTotalNumber:function(){return qx.Bootstrap.objectGetLength(this.$$registry);},flatten:function(x){if(!x){return [];}var y=x.concat();for(var i=0,l=x.length;i<l;i++){if(x[i].$$includes){y.push.apply(y,this.flatten(x[i].$$includes));}}return y;},genericToString:function(){return d+this.name+c;},$$registry:{},__er:null,__es:function(){}}});})();(function(){var h="qx.allowUrlSettings",g="&",f="qx.core.Setting",e="qx.allowUrlVariants",d="qx.propertyDebugLevel",c="qxsetting",b=":",a=".";qx.Bootstrap.define(f,{statics:{__eu:{},define:function(j,k){if(k===undefined){throw new Error('Default value of setting "'+j+'" must be defined!');}if(!this.__eu[j]){this.__eu[j]={};}else if(this.__eu[j].defaultValue!==undefined){throw new Error('Setting "'+j+'" is already defined!');}this.__eu[j].defaultValue=k;},get:function(l){var m=this.__eu[l];if(m===undefined){throw new Error('Setting "'+l+'" is not defined.');}if(m.value!==undefined){return m.value;}return m.defaultValue;},set:function(n,o){if((n.split(a)).length<2){throw new Error('Malformed settings key "'+n+'". Must be following the schema "namespace.key".');}if(!this.__eu[n]){this.__eu[n]={};}this.__eu[n].value=o;},__ev:function(){if(window.qxsettings){for(var p in window.qxsettings){this.set(p,window.qxsettings[p]);}window.qxsettings=undefined;try{delete window.qxsettings;}catch(q){}this.__ew();}},__ew:function(){if(this.get(h)!=true){return;}var s=document.location.search.slice(1).split(g);for(var i=0;i<s.length;i++){var r=s[i].split(b);if(r.length!=3||r[0]!=c){continue;}this.set(r[1],decodeURIComponent(r[2]));}}},defer:function(t){t.define(h,false);t.define(e,false);t.define(d,0);t.__ev();}});})();(function(){var h="function",g="Boolean",f="qx.Interface",e="]",d="toggle",c="Interface",b="is",a="[Interface ";qx.Bootstrap.define(f,{statics:{define:function(name,j){if(j){if(j.extend&&!(j.extend instanceof Array)){j.extend=[j.extend];}{};var k=j.statics?j.statics:{};if(j.extend){k.$$extends=j.extend;}if(j.properties){k.$$properties=j.properties;}if(j.members){k.$$members=j.members;}if(j.events){k.$$events=j.events;}}else{var k={};}k.$$type=c;k.name=name;k.toString=this.genericToString;k.basename=qx.Bootstrap.createNamespace(name,k);qx.Interface.$$registry[name]=k;return k;},getByName:function(name){return this.$$registry[name];},isDefined:function(name){return this.getByName(name)!==undefined;},getTotalNumber:function(){return qx.Bootstrap.objectGetLength(this.$$registry);},flatten:function(m){if(!m){return [];}var n=m.concat();for(var i=0,l=m.length;i<l;i++){if(m[i].$$extends){n.push.apply(n,this.flatten(m[i].$$extends));}}return n;},__fI:function(o,p,q,r){var v=q.$$members;if(v){for(var u in v){if(qx.Bootstrap.isFunction(v[u])){var t=this.__fJ(p,u);var s=t||qx.Bootstrap.isFunction(o[u]);if(!s){throw new Error('Implementation of method "'+u+'" is missing in class "'+p.classname+'" required by interface "'+q.name+'"');}var w=r===true&&!t&&!qx.Bootstrap.hasInterface(p,q);if(w){o[u]=this.__fM(q,o[u],u,v[u]);}}else{if(typeof o[u]===undefined){if(typeof o[u]!==h){throw new Error('Implementation of member "'+u+'" is missing in class "'+p.classname+'" required by interface "'+q.name+'"');}}}}}},__fJ:function(x,y){var C=y.match(/^(is|toggle|get|set|reset)(.*)$/);if(!C){return false;}var z=qx.Bootstrap.firstLow(C[2]);var A=qx.Bootstrap.getPropertyDefinition(x,z);if(!A){return false;}var B=C[0]==b||C[0]==d;if(B){return qx.Bootstrap.getPropertyDefinition(x,z).check==g;}return true;},__fK:function(D,E){if(E.$$properties){for(var F in E.$$properties){if(!qx.Bootstrap.getPropertyDefinition(D,F)){throw new Error('The property "'+F+'" is not supported by Class "'+D.classname+'"!');}}}},__fL:function(G,H){if(H.$$events){for(var I in H.$$events){if(!qx.Bootstrap.supportsEvent(G,I)){throw new Error('The event "'+I+'" is not supported by Class "'+G.classname+'"!');}}}},assertObject:function(J,K){var M=J.constructor;this.__fI(J,M,K,false);this.__fK(M,K);this.__fL(M,K);var L=K.$$extends;if(L){for(var i=0,l=L.length;i<l;i++){this.assertObject(J,L[i]);}}},assert:function(N,O,P){this.__fI(N.prototype,N,O,P);this.__fK(N,O);this.__fL(N,O);var Q=O.$$extends;if(Q){for(var i=0,l=Q.length;i<l;i++){this.assert(N,Q[i],P);}}},genericToString:function(){return a+this.name+e;},$$registry:{},__fM:function(){},__fN:null,__fO:function(){}}});})();(function(){var g="emulated",f="native",e='"',d="qx.lang.Core",c="\\\\",b="\\\"",a="[object Error]";qx.Bootstrap.define(d,{statics:{errorToString:{"native":Error.prototype.toString,"emulated":function(){return this.message;}}[(!Error.prototype.toString||Error.prototype.toString()==a)?g:f],arrayIndexOf:{"native":Array.prototype.indexOf,"emulated":function(h,j){if(j==null){j=0;}else if(j<0){j=Math.max(0,this.length+j);}for(var i=j;i<this.length;i++){if(this[i]===h){return i;}}return -1;}}[Array.prototype.indexOf?f:g],arrayLastIndexOf:{"native":Array.prototype.lastIndexOf,"emulated":function(k,m){if(m==null){m=this.length-1;}else if(m<0){m=Math.max(0,this.length+m);}for(var i=m;i>=0;i--){if(this[i]===k){return i;}}return -1;}}[Array.prototype.lastIndexOf?f:g],arrayForEach:{"native":Array.prototype.forEach,"emulated":function(n,o){var l=this.length;for(var i=0;i<l;i++){var p=this[i];if(p!==undefined){n.call(o||window,p,i,this);}}}}[Array.prototype.forEach?f:g],arrayFilter:{"native":Array.prototype.filter,"emulated":function(q,r){var s=[];var l=this.length;for(var i=0;i<l;i++){var t=this[i];if(t!==undefined){if(q.call(r||window,t,i,this)){s.push(this[i]);}}}return s;}}[Array.prototype.filter?f:g],arrayMap:{"native":Array.prototype.map,"emulated":function(u,v){var w=[];var l=this.length;for(var i=0;i<l;i++){var x=this[i];if(x!==undefined){w[i]=u.call(v||window,x,i,this);}}return w;}}[Array.prototype.map?f:g],arraySome:{"native":Array.prototype.some,"emulated":function(y,z){var l=this.length;for(var i=0;i<l;i++){var A=this[i];if(A!==undefined){if(y.call(z||window,A,i,this)){return true;}}}return false;}}[Array.prototype.some?f:g],arrayEvery:{"native":Array.prototype.every,"emulated":function(B,C){var l=this.length;for(var i=0;i<l;i++){var D=this[i];if(D!==undefined){if(!B.call(C||window,D,i,this)){return false;}}}return true;}}[Array.prototype.every?f:g],stringQuote:{"native":String.prototype.quote,"emulated":function(){return e+this.replace(/\\/g,c).replace(/\"/g,b)+e;}}[String.prototype.quote?f:g]}});Error.prototype.toString=qx.lang.Core.errorToString;Array.prototype.indexOf=qx.lang.Core.arrayIndexOf;Array.prototype.lastIndexOf=qx.lang.Core.arrayLastIndexOf;Array.prototype.forEach=qx.lang.Core.arrayForEach;Array.prototype.filter=qx.lang.Core.arrayFilter;Array.prototype.map=qx.lang.Core.arrayMap;Array.prototype.some=qx.lang.Core.arraySome;Array.prototype.every=qx.lang.Core.arrayEvery;String.prototype.quote=qx.lang.Core.stringQuote;})();(function(){var cv=';',cu='computed=this.',ct='=value;',cs='this.',cr="set",cq="setThemed",cp="setRuntime",co="init",cn='if(this.',cm='delete this.',bw='!==undefined)',bv='}',bu="resetThemed",bt='else if(this.',bs="string",br='return this.',bq="reset",bp="boolean",bo="resetRuntime",bn='!==undefined){',cC="",cD="refresh",cA='=true;',cB="this.",cy=";",cz='old=this.',cw="();",cx='else ',cE='if(old===undefined)old=this.',cF='old=computed=this.',bU="return this.",bT="get",bW='(value);',bV="(a[",bY='if(old===computed)return value;',bX='if(old===undefined)old=null;',cb=' of an instance of ',ca=' is not (yet) ready!");',bS="]);",bR='!==inherit){',c='qx.lang.Type.isString(value) && qx.util.ColorUtil.isValidPropertyValue(value)',d='value !== null && qx.theme.manager.Font.getInstance().isDynamic(value)',e='value !== null && value.nodeType === 9 && value.documentElement',f='===value)return value;',g='value !== null && value.$$type === "Mixin"',h='return init;',j='var init=this.',k='value !== null && value.nodeType === 1 && value.attributes',m="var parent = this.getLayoutParent();",n="Error in property ",cT='var a=this._getChildren();if(a)for(var i=0,l=a.length;i<l;i++){',cS='.validate.call(this, value);',cR='qx.core.Assert.assertInstance(value, Date, msg) || true',cQ='else{',cX="if (!parent) return;",cW=" in method ",cV='qx.core.Assert.assertInstance(value, Error, msg) || true',cU='=computed;',da='Undefined value is not allowed!',cY='(backup);',M="MSIE 6.0",N='if(computed===inherit){',K="inherit",L='Is invalid!',Q='if(value===undefined)prop.error(this,2,"',R='var computed, old=this.',O='else if(computed===undefined)',P="': ",I=" of class ",J='value !== null && value.nodeType !== undefined',v='===undefined)return;',u='value !== null && qx.theme.manager.Decoration.getInstance().isValidPropertyValue(value)',x="')){",w='qx.core.Assert.assertPositiveInteger(value, msg) || true',r='else this.',q='value=this.',t='","',s='if(init==qx.core.Property.$$inherit)init=null;',p='value !== null && value.$$type === "Interface"',o='var inherit=prop.$$inherit;',W="', qx.event.type.Data, [computed, old]",X="var value = parent.",Y="$$useinit_",ba='computed=undefined;delete this.',S="(value);",T='Requires exactly one argument!',U='",value);',V='computed=value;',bb="$$runtime_",bc=';}',F="$$user_",E='){',D='qx.core.Assert.assertArray(value, msg) || true',C='if(computed===undefined||computed===inherit){',B='qx.core.Assert.assertPositiveNumber(value, msg) || true',A=".prototype",z="Boolean",y=")}",H='(computed, old, "',G='return value;',bd='if(init==qx.core.Property.$$inherit)throw new Error("Inheritable property ',be="if(reg.hasListener(this, '",bf='Does not allow any arguments!',bg=')a[i].',bh="()",bi="var a=arguments[0] instanceof Array?arguments[0]:arguments;",bj='.$$properties.',bk='value !== null && value.$$type === "Theme"',bl="var reg=qx.event.Registration;",bm="())",bA='return null;',bz='qx.core.Assert.assertObject(value, msg) || true',by='");',bx='qx.core.Assert.assertString(value, msg) || true',bE='var pa=this.getLayoutParent();if(pa)computed=pa.',bD="if (value===undefined) value = parent.",bC='value !== null && value.$$type === "Class"',bB='qx.core.Assert.assertFunction(value, msg) || true',bG='!==undefined&&',bF='var computed, old;',bN='var backup=computed;',bO='}else{',bL="object",bM="$$init_",bJ="$$theme_",bK='if(computed===undefined)computed=null;',bH='qx.core.Assert.assertMap(value, msg) || true',bI='qx.core.Assert.assertNumber(value, msg) || true',bP='if((computed===undefined||computed===inherit)&&',bQ="reg.fireEvent(this, '",cf='Null value is not allowed!',ce='qx.core.Assert.assertInteger(value, msg) || true',ch="value",cg="rv:1.8.1",cj="shorthand",ci='qx.core.Assert.assertInstance(value, RegExp, msg) || true',cl='value !== null && value.type !== undefined',ck='value !== null && value.document',cd='throw new Error("Property ',cc="(!this.",cM='qx.core.Assert.assertBoolean(value, msg) || true',cN='if(a[i].',cO="toggle",cP="$$inherit_",cI='var prop=qx.core.Property;',cJ=" with incoming value '",cK="a=qx.lang.Array.fromShortHand(qx.lang.Array.fromArguments(a));",cL='if(computed===undefined||computed==inherit)computed=null;',cG="qx.core.Property",cH="is",b='Could not change or apply init value after constructing phase!';qx.Bootstrap.define(cG,{statics:{__lF:{"Boolean":cM,"String":bx,"Number":bI,"Integer":ce,"PositiveNumber":B,"PositiveInteger":w,"Error":cV,"RegExp":ci,"Object":bz,"Array":D,"Map":bH,"Function":bB,"Date":cR,"Node":J,"Element":k,"Document":e,"Window":ck,"Event":cl,"Class":bC,"Mixin":g,"Interface":p,"Theme":bk,"Color":c,"Decorator":u,"Font":d},__lG:{"Node":true,"Element":true,"Document":true,"Window":true,"Event":true},$$inherit:K,$$store:{runtime:{},user:{},theme:{},inherit:{},init:{},useinit:{}},$$method:{get:{},set:{},reset:{},init:{},refresh:{},setRuntime:{},resetRuntime:{},setThemed:{},resetThemed:{}},$$allowedKeys:{name:bs,dereference:bp,inheritable:bp,nullable:bp,themeable:bp,refine:bp,init:null,apply:bs,event:bs,check:null,transform:bs,deferredInit:bp,validate:null},$$allowedGroupKeys:{name:bs,group:bL,mode:bs,themeable:bp},$$inheritable:{},__lH:function(db){var dc=this.__lI(db);if(!dc.length){var dd=qx.lang.Function.empty;}else{dd=this.__lJ(dc);}db.prototype.$$refreshInheritables=dd;},__lI:function(de){var dg=[];while(de){var df=de.$$properties;if(df){for(var name in this.$$inheritable){if(df[name]&&df[name].inheritable){dg.push(name);}}}de=de.superclass;}return dg;},__lJ:function(dh){var dl=this.$$store.inherit;var dk=this.$$store.init;var dj=this.$$method.refresh;var di=[m,cX];for(var i=0,l=dh.length;i<l;i++){var name=dh[i];di.push(X,dl[name],cy,bD,dk[name],cy,cB,dj[name],S);}return new Function(di.join(cC));},attachRefreshInheritables:function(dm){dm.prototype.$$refreshInheritables=function(){qx.core.Property.__lH(dm);return this.$$refreshInheritables();};},attachMethods:function(dn,name,dp){dp.group?this.__lK(dn,dp,name):this.__lL(dn,dp,name);},__lK:function(dq,dr,name){var dy=qx.Bootstrap.firstUp(name);var dx=dq.prototype;var dz=dr.themeable===true;{};var dA=[];var du=[];if(dz){var ds=[];var dw=[];}var dv=bi;dA.push(dv);if(dz){ds.push(dv);}if(dr.mode==cj){var dt=cK;dA.push(dt);if(dz){ds.push(dt);}}for(var i=0,a=dr.group,l=a.length;i<l;i++){{};dA.push(cB,this.$$method.set[a[i]],bV,i,bS);du.push(cB,this.$$method.reset[a[i]],cw);if(dz){{};ds.push(cB,this.$$method.setThemed[a[i]],bV,i,bS);dw.push(cB,this.$$method.resetThemed[a[i]],cw);}}this.$$method.set[name]=cr+dy;dx[this.$$method.set[name]]=new Function(dA.join(cC));this.$$method.reset[name]=bq+dy;dx[this.$$method.reset[name]]=new Function(du.join(cC));if(dz){this.$$method.setThemed[name]=cq+dy;dx[this.$$method.setThemed[name]]=new Function(ds.join(cC));this.$$method.resetThemed[name]=bu+dy;dx[this.$$method.resetThemed[name]]=new Function(dw.join(cC));}},__lL:function(dB,dC,name){var dE=qx.Bootstrap.firstUp(name);var dG=dB.prototype;{};if(dC.dereference===undefined&&typeof dC.check===bs){dC.dereference=this.__lM(dC.check);}var dF=this.$$method;var dD=this.$$store;dD.runtime[name]=bb+name;dD.user[name]=F+name;dD.theme[name]=bJ+name;dD.init[name]=bM+name;dD.inherit[name]=cP+name;dD.useinit[name]=Y+name;dF.get[name]=bT+dE;dG[dF.get[name]]=function(){return qx.core.Property.executeOptimizedGetter(this,dB,name,bT);};dF.set[name]=cr+dE;dG[dF.set[name]]=function(dH){return qx.core.Property.executeOptimizedSetter(this,dB,name,cr,arguments);};dF.reset[name]=bq+dE;dG[dF.reset[name]]=function(){return qx.core.Property.executeOptimizedSetter(this,dB,name,bq);};if(dC.inheritable||dC.apply||dC.event||dC.deferredInit){dF.init[name]=co+dE;dG[dF.init[name]]=function(dI){return qx.core.Property.executeOptimizedSetter(this,dB,name,co,arguments);};}if(dC.inheritable){dF.refresh[name]=cD+dE;dG[dF.refresh[name]]=function(dJ){return qx.core.Property.executeOptimizedSetter(this,dB,name,cD,arguments);};}dF.setRuntime[name]=cp+dE;dG[dF.setRuntime[name]]=function(dK){return qx.core.Property.executeOptimizedSetter(this,dB,name,cp,arguments);};dF.resetRuntime[name]=bo+dE;dG[dF.resetRuntime[name]]=function(){return qx.core.Property.executeOptimizedSetter(this,dB,name,bo);};if(dC.themeable){dF.setThemed[name]=cq+dE;dG[dF.setThemed[name]]=function(dL){return qx.core.Property.executeOptimizedSetter(this,dB,name,cq,arguments);};dF.resetThemed[name]=bu+dE;dG[dF.resetThemed[name]]=function(){return qx.core.Property.executeOptimizedSetter(this,dB,name,bu);};}if(dC.check===z){dG[cO+dE]=new Function(bU+dF.set[name]+cc+dF.get[name]+bm);dG[cH+dE]=new Function(bU+dF.get[name]+bh);}},__lM:function(dM){return !!this.__lG[dM];},__lN:function(dN){return this.__lG[dN]||qx.Bootstrap.classIsDefined(dN)||(qx.Interface&&qx.Interface.isDefined(dN));},__lO:{0:b,1:T,2:da,3:bf,4:cf,5:L},error:function(dO,dP,dQ,dR,dS){var dT=dO.constructor.classname;var dU=n+dQ+I+dT+cW+this.$$method[dR][dQ]+cJ+dS+P;throw new Error(dU+(this.__lO[dP]||"Unknown reason: "+dP));},__lP:function(dV,dW,name,dX,dY,ea){var eb=this.$$method[dX][name];{dW[eb]=new Function(ch,dY.join(cC));};{};qx.Bootstrap.setDisplayName(dW[eb],dV.classname+A,eb);if(ea===undefined){return dV[eb]();}else{return dV[eb](ea[0]);}},executeOptimizedGetter:function(ec,ed,name,ee){var eg=ed.$$properties[name];var ei=ed.prototype;var ef=[];var eh=this.$$store;ef.push(cn,eh.runtime[name],bw);ef.push(br,eh.runtime[name],cv);if(eg.inheritable){ef.push(bt,eh.inherit[name],bw);ef.push(br,eh.inherit[name],cv);ef.push(cx);}ef.push(cn,eh.user[name],bw);ef.push(br,eh.user[name],cv);if(eg.themeable){ef.push(bt,eh.theme[name],bw);ef.push(br,eh.theme[name],cv);}if(eg.deferredInit&&eg.init===undefined){ef.push(bt,eh.init[name],bw);ef.push(br,eh.init[name],cv);}ef.push(cx);if(eg.init!==undefined){if(eg.inheritable){ef.push(j,eh.init[name],cv);if(eg.nullable){ef.push(s);}else if(eg.init!==undefined){ef.push(br,eh.init[name],cv);}else{ef.push(bd,name,cb,ed.classname,ca);}ef.push(h);}else{ef.push(br,eh.init[name],cv);}}else if(eg.inheritable||eg.nullable){ef.push(bA);}else{ef.push(cd,name,cb,ed.classname,ca);}return this.__lP(ec,ei,name,ee,ef);},executeOptimizedSetter:function(ej,ek,name,el,em){var er=ek.$$properties[name];var eq=ek.prototype;var eo=[];var en=el===cr||el===cq||el===cp||(el===co&&er.init===undefined);var ep=er.apply||er.event||er.inheritable;var es=this.__lQ(el,name);this.__lR(eo,er,name,el,en);if(en){this.__lS(eo,ek,er,name);}if(ep){this.__lT(eo,en,es,el);}if(er.inheritable){eo.push(o);}{};if(!ep){this.__lV(eo,name,el,en);}else{this.__lW(eo,er,name,el,en);}if(er.inheritable){this.__lX(eo,er,name,el);}else if(ep){this.__lY(eo,er,name,el);}if(ep){this.__ma(eo,er,name);if(er.inheritable&&eq._getChildren){this.__mb(eo,name);}}if(en){eo.push(G);}return this.__lP(ej,eq,name,el,eo,em);},__lQ:function(et,name){if(et===cp||et===bo){var eu=this.$$store.runtime[name];}else if(et===cq||et===bu){eu=this.$$store.theme[name];}else if(et===co){eu=this.$$store.init[name];}else{eu=this.$$store.user[name];}return eu;},__lR:function(ev,ew,name,ex,ey){{if(!ew.nullable||ew.check||ew.inheritable){ev.push(cI);}if(ex===cr){ev.push(Q,name,t,ex,U);}};},__lS:function(ez,eA,eB,name){if(eB.transform){ez.push(q,eB.transform,bW);}if(eB.validate){if(typeof eB.validate===bs){ez.push(cs,eB.validate,bW);}else if(eB.validate instanceof Function){ez.push(eA.classname,bj,name);ez.push(cS);}}},__lT:function(eC,eD,eE,eF){var eG=(eF===bq||eF===bu||eF===bo);if(eD){eC.push(cn,eE,f);}else if(eG){eC.push(cn,eE,v);}},__lU:undefined,__lV:function(eH,name,eI,eJ){if(eI===cp){eH.push(cs,this.$$store.runtime[name],ct);}else if(eI===bo){eH.push(cn,this.$$store.runtime[name],bw);eH.push(cm,this.$$store.runtime[name],cv);}else if(eI===cr){eH.push(cs,this.$$store.user[name],ct);}else if(eI===bq){eH.push(cn,this.$$store.user[name],bw);eH.push(cm,this.$$store.user[name],cv);}else if(eI===cq){eH.push(cs,this.$$store.theme[name],ct);}else if(eI===bu){eH.push(cn,this.$$store.theme[name],bw);eH.push(cm,this.$$store.theme[name],cv);}else if(eI===co&&eJ){eH.push(cs,this.$$store.init[name],ct);}},__lW:function(eK,eL,name,eM,eN){if(eL.inheritable){eK.push(R,this.$$store.inherit[name],cv);}else{eK.push(bF);}eK.push(cn,this.$$store.runtime[name],bn);if(eM===cp){eK.push(cu,this.$$store.runtime[name],ct);}else if(eM===bo){eK.push(cm,this.$$store.runtime[name],cv);eK.push(cn,this.$$store.user[name],bw);eK.push(cu,this.$$store.user[name],cv);eK.push(bt,this.$$store.theme[name],bw);eK.push(cu,this.$$store.theme[name],cv);eK.push(bt,this.$$store.init[name],bn);eK.push(cu,this.$$store.init[name],cv);eK.push(cs,this.$$store.useinit[name],cA);eK.push(bv);}else{eK.push(cF,this.$$store.runtime[name],cv);if(eM===cr){eK.push(cs,this.$$store.user[name],ct);}else if(eM===bq){eK.push(cm,this.$$store.user[name],cv);}else if(eM===cq){eK.push(cs,this.$$store.theme[name],ct);}else if(eM===bu){eK.push(cm,this.$$store.theme[name],cv);}else if(eM===co&&eN){eK.push(cs,this.$$store.init[name],ct);}}eK.push(bv);eK.push(bt,this.$$store.user[name],bn);if(eM===cr){if(!eL.inheritable){eK.push(cz,this.$$store.user[name],cv);}eK.push(cu,this.$$store.user[name],ct);}else if(eM===bq){if(!eL.inheritable){eK.push(cz,this.$$store.user[name],cv);}eK.push(cm,this.$$store.user[name],cv);eK.push(cn,this.$$store.runtime[name],bw);eK.push(cu,this.$$store.runtime[name],cv);eK.push(cn,this.$$store.theme[name],bw);eK.push(cu,this.$$store.theme[name],cv);eK.push(bt,this.$$store.init[name],bn);eK.push(cu,this.$$store.init[name],cv);eK.push(cs,this.$$store.useinit[name],cA);eK.push(bv);}else{if(eM===cp){eK.push(cu,this.$$store.runtime[name],ct);}else if(eL.inheritable){eK.push(cu,this.$$store.user[name],cv);}else{eK.push(cF,this.$$store.user[name],cv);}if(eM===cq){eK.push(cs,this.$$store.theme[name],ct);}else if(eM===bu){eK.push(cm,this.$$store.theme[name],cv);}else if(eM===co&&eN){eK.push(cs,this.$$store.init[name],ct);}}eK.push(bv);if(eL.themeable){eK.push(bt,this.$$store.theme[name],bn);if(!eL.inheritable){eK.push(cz,this.$$store.theme[name],cv);}if(eM===cp){eK.push(cu,this.$$store.runtime[name],ct);}else if(eM===cr){eK.push(cu,this.$$store.user[name],ct);}else if(eM===cq){eK.push(cu,this.$$store.theme[name],ct);}else if(eM===bu){eK.push(cm,this.$$store.theme[name],cv);eK.push(cn,this.$$store.init[name],bn);eK.push(cu,this.$$store.init[name],cv);eK.push(cs,this.$$store.useinit[name],cA);eK.push(bv);}else if(eM===co){if(eN){eK.push(cs,this.$$store.init[name],ct);}eK.push(cu,this.$$store.theme[name],cv);}else if(eM===cD){eK.push(cu,this.$$store.theme[name],cv);}eK.push(bv);}eK.push(bt,this.$$store.useinit[name],E);if(!eL.inheritable){eK.push(cz,this.$$store.init[name],cv);}if(eM===co){if(eN){eK.push(cu,this.$$store.init[name],ct);}else{eK.push(cu,this.$$store.init[name],cv);}}else if(eM===cr||eM===cp||eM===cq||eM===cD){eK.push(cm,this.$$store.useinit[name],cv);if(eM===cp){eK.push(cu,this.$$store.runtime[name],ct);}else if(eM===cr){eK.push(cu,this.$$store.user[name],ct);}else if(eM===cq){eK.push(cu,this.$$store.theme[name],ct);}else if(eM===cD){eK.push(cu,this.$$store.init[name],cv);}}eK.push(bv);if(eM===cr||eM===cp||eM===cq||eM===co){eK.push(cQ);if(eM===cp){eK.push(cu,this.$$store.runtime[name],ct);}else if(eM===cr){eK.push(cu,this.$$store.user[name],ct);}else if(eM===cq){eK.push(cu,this.$$store.theme[name],ct);}else if(eM===co){if(eN){eK.push(cu,this.$$store.init[name],ct);}else{eK.push(cu,this.$$store.init[name],cv);}eK.push(cs,this.$$store.useinit[name],cA);}eK.push(bv);}},__lX:function(eO,eP,name,eQ){eO.push(C);if(eQ===cD){eO.push(V);}else{eO.push(bE,this.$$store.inherit[name],cv);}eO.push(bP);eO.push(cs,this.$$store.init[name],bG);eO.push(cs,this.$$store.init[name],bR);eO.push(cu,this.$$store.init[name],cv);eO.push(cs,this.$$store.useinit[name],cA);eO.push(bO);eO.push(cm,this.$$store.useinit[name],bc);eO.push(bv);eO.push(bY);eO.push(N);eO.push(ba,this.$$store.inherit[name],cv);eO.push(bv);eO.push(O);eO.push(cm,this.$$store.inherit[name],cv);eO.push(r,this.$$store.inherit[name],cU);eO.push(bN);if(eP.init!==undefined&&eQ!==co){eO.push(cE,this.$$store.init[name],cy);}else{eO.push(bX);}eO.push(cL);},__lY:function(eR,eS,name,eT){if(eT!==cr&&eT!==cp&&eT!==cq){eR.push(bK);}eR.push(bY);if(eS.init!==undefined&&eT!==co){eR.push(cE,this.$$store.init[name],cy);}else{eR.push(bX);}},__ma:function(eU,eV,name){if(eV.apply){eU.push(cs,eV.apply,H,name,by);}if(eV.event){eU.push(bl,be,eV.event,x,bQ,eV.event,W,y);}},__mb:function(eW,name){eW.push(cT);eW.push(cN,this.$$method.refresh[name],bg,this.$$method.refresh[name],cY);eW.push(bv);}},defer:function(eX){var fa=navigator.userAgent.indexOf(M)!=-1;var eY=navigator.userAgent.indexOf(cg)!=-1;if(fa||eY){eX.__lM=eX.__lN;}}});})();(function(){var q="[Class ",p="]",o="$$init_",n="toString",m="constructor",k="singleton",j=".prototype",h="extend",g="Class",f="destruct",c="qx.Class",e=".",d="static",b="qx.event.type.Data";qx.Bootstrap.define(c,{statics:{define:function(name,r){if(!r){var r={};}if(r.include&&!(r.include instanceof Array)){r.include=[r.include];}if(r.implement&&!(r.implement instanceof Array)){r.implement=[r.implement];}var s=false;if(!r.hasOwnProperty(h)&&!r.type){r.type=d;s=true;}{};var t=this.__bX(name,r.type,r.extend,r.statics,r.construct,r.destruct,r.include);if(r.extend){if(r.properties){this.__ca(t,r.properties,true);}if(r.members){this.__cc(t,r.members,true,true,false);}if(r.events){this.__bY(t,r.events,true);}if(r.include){for(var i=0,l=r.include.length;i<l;i++){this.__cg(t,r.include[i],false);}}}if(r.settings){for(var u in r.settings){qx.core.Setting.define(u,r.settings[u]);}}if(r.variants){for(var u in r.variants){qx.core.Variant.define(u,r.variants[u].allowedValues,r.variants[u].defaultValue);}}if(r.implement){for(var i=0,l=r.implement.length;i<l;i++){this.__ce(t,r.implement[i]);}}{};if(r.defer){r.defer.self=t;r.defer(t,t.prototype,{add:function(name,v){var w={};w[name]=v;qx.Class.__ca(t,w,true);}});}return t;},undefine:function(name){delete this.$$registry[name];var x=name.split(e);var z=[window];for(var i=0;i<x.length;i++){z.push(z[i][x[i]]);}for(var i=z.length-1;i>=1;i--){var y=z[i];var parent=z[i-1];if(qx.Bootstrap.isFunction(y)||qx.Bootstrap.objectGetLength(y)===0){delete parent[x[i-1]];}else{break;}}},isDefined:qx.Bootstrap.classIsDefined,getTotalNumber:function(){return qx.Bootstrap.objectGetLength(this.$$registry);},getByName:qx.Bootstrap.getByName,include:function(A,B){{};qx.Class.__cg(A,B,false);},patch:function(C,D){{};qx.Class.__cg(C,D,true);},isSubClassOf:function(E,F){if(!E){return false;}if(E==F){return true;}if(E.prototype instanceof F){return true;}return false;},getPropertyDefinition:qx.Bootstrap.getPropertyDefinition,getProperties:function(G){var H=[];while(G){if(G.$$properties){H.push.apply(H,qx.Bootstrap.getKeys(G.$$properties));}G=G.superclass;}return H;},getByProperty:function(I,name){while(I){if(I.$$properties&&I.$$properties[name]){return I;}I=I.superclass;}return null;},hasProperty:qx.Bootstrap.hasProperty,getEventType:qx.Bootstrap.getEventType,supportsEvent:qx.Bootstrap.supportsEvent,hasOwnMixin:function(J,K){return J.$$includes&&J.$$includes.indexOf(K)!==-1;},getByMixin:function(L,M){var N,i,l;while(L){if(L.$$includes){N=L.$$flatIncludes;for(i=0,l=N.length;i<l;i++){if(N[i]===M){return L;}}}L=L.superclass;}return null;},getMixins:qx.Bootstrap.getMixins,hasMixin:function(O,P){return !!this.getByMixin(O,P);},hasOwnInterface:function(Q,R){return Q.$$implements&&Q.$$implements.indexOf(R)!==-1;},getByInterface:qx.Bootstrap.getByInterface,getInterfaces:function(S){var T=[];while(S){if(S.$$implements){T.push.apply(T,S.$$flatImplements);}S=S.superclass;}return T;},hasInterface:qx.Bootstrap.hasInterface,implementsInterface:function(U,V){var W=U.constructor;if(this.hasInterface(W,V)){return true;}try{qx.Interface.assertObject(U,V);return true;}catch(X){}try{qx.Interface.assert(W,V,false);return true;}catch(Y){}return false;},getInstance:function(){if(!this.$$instance){this.$$allowconstruct=true;this.$$instance=new this;delete this.$$allowconstruct;}return this.$$instance;},genericToString:function(){return q+this.classname+p;},$$registry:qx.Bootstrap.$$registry,__bT:null,__bU:null,__bV:function(){},__bW:function(){},__bX:function(name,ba,bb,bc,bd,be,bf){var bi;if(!bb&&true){bi=bc||{};qx.Bootstrap.setDisplayNames(bi,name);}else{var bi={};if(bb){if(!bd){bd=this.__ch();}if(this.__cj(bb,bf)){bi=this.__ck(bd,name,ba);}else{bi=bd;}if(ba===k){bi.getInstance=this.getInstance;}qx.Bootstrap.setDisplayName(bd,name,m);}if(bc){qx.Bootstrap.setDisplayNames(bc,name);var bj;for(var i=0,a=qx.Bootstrap.getKeys(bc),l=a.length;i<l;i++){bj=a[i];var bg=bc[bj];{bi[bj]=bg;};}}}var bh=qx.Bootstrap.createNamespace(name,bi);bi.name=bi.classname=name;bi.basename=bh;bi.$$type=g;if(ba){bi.$$classtype=ba;}if(!bi.hasOwnProperty(n)){bi.toString=this.genericToString;}if(bb){qx.Bootstrap.extendClass(bi,bd,bb,name,bh);if(be){{};bi.$$destructor=be;qx.Bootstrap.setDisplayName(be,name,f);}}this.$$registry[name]=bi;return bi;},__bY:function(bk,bl,bm){var bn,bn;{};if(bk.$$events){for(var bn in bl){bk.$$events[bn]=bl[bn];}}else{bk.$$events=bl;}},__ca:function(bo,bp,bq){var br;if(bq===undefined){bq=false;}var bs=bo.prototype;for(var name in bp){br=bp[name];{};br.name=name;if(!br.refine){if(bo.$$properties===undefined){bo.$$properties={};}bo.$$properties[name]=br;}if(br.init!==undefined){bo.prototype[o+name]=br.init;}if(br.event!==undefined){var event={};event[br.event]=b;this.__bY(bo,event,bq);}if(br.inheritable){qx.core.Property.$$inheritable[name]=true;if(!bs.$$refreshInheritables){qx.core.Property.attachRefreshInheritables(bo);}}if(!br.refine){qx.core.Property.attachMethods(bo,name,br);}}},__cb:null,__cc:function(bt,bu,bv,bw,bx){var by=bt.prototype;var bA,bz;qx.Bootstrap.setDisplayNames(bu,bt.classname+j);for(var i=0,a=qx.Bootstrap.getKeys(bu),l=a.length;i<l;i++){bA=a[i];bz=bu[bA];{};if(bw!==false&&bz instanceof Function&&bz.$$type==null){if(bx==true){bz=this.__cd(bz,by[bA]);}else{if(by[bA]){bz.base=by[bA];}bz.self=bt;}{};}by[bA]=bz;}},__cd:function(bB,bC){if(bC){return function(){var bE=bB.base;bB.base=bC;var bD=bB.apply(this,arguments);bB.base=bE;return bD;};}else{return bB;}},__ce:function(bF,bG){{};var bH=qx.Interface.flatten([bG]);if(bF.$$implements){bF.$$implements.push(bG);bF.$$flatImplements.push.apply(bF.$$flatImplements,bH);}else{bF.$$implements=[bG];bF.$$flatImplements=bH;}},__cf:function(bI){var name=bI.classname;var bJ=this.__ck(bI,name,bI.$$classtype);for(var i=0,a=qx.Bootstrap.getKeys(bI),l=a.length;i<l;i++){bK=a[i];bJ[bK]=bI[bK];}bJ.prototype=bI.prototype;var bM=bI.prototype;for(var i=0,a=qx.Bootstrap.getKeys(bM),l=a.length;i<l;i++){bK=a[i];var bN=bM[bK];if(bN&&bN.self==bI){bN.self=bJ;}}for(var bK in this.$$registry){var bL=this.$$registry[bK];if(!bL){continue;}if(bL.base==bI){bL.base=bJ;}if(bL.superclass==bI){bL.superclass=bJ;}if(bL.$$original){if(bL.$$original.base==bI){bL.$$original.base=bJ;}if(bL.$$original.superclass==bI){bL.$$original.superclass=bJ;}}}qx.Bootstrap.createNamespace(name,bJ);this.$$registry[name]=bJ;return bJ;},__cg:function(bO,bP,bQ){{};if(this.hasMixin(bO,bP)){return;}var bT=bO.$$original;if(bP.$$constructor&&!bT){bO=this.__cf(bO);}var bS=qx.Mixin.flatten([bP]);var bR;for(var i=0,l=bS.length;i<l;i++){bR=bS[i];if(bR.$$events){this.__bY(bO,bR.$$events,bQ);}if(bR.$$properties){this.__ca(bO,bR.$$properties,bQ);}if(bR.$$members){this.__cc(bO,bR.$$members,bQ,bQ,bQ);}}if(bO.$$includes){bO.$$includes.push(bP);bO.$$flatIncludes.push.apply(bO.$$flatIncludes,bS);}else{bO.$$includes=[bP];bO.$$flatIncludes=bS;}},__ch:function(){function bU(){bU.base.apply(this,arguments);}return bU;},__ci:function(){return function(){};},__cj:function(bV,bW){{};if(bV&&bV.$$includes){var bX=bV.$$flatIncludes;for(var i=0,l=bX.length;i<l;i++){if(bX[i].$$constructor){return true;}}}if(bW){var bY=qx.Mixin.flatten(bW);for(var i=0,l=bY.length;i<l;i++){if(bY[i].$$constructor){return true;}}}return false;},__ck:function(ca,name,cb){var cc;var cd=function(){var cg=cd;{};var cf=cg.$$original.apply(this,arguments);if(cg.$$includes){var ce=cg.$$flatIncludes;for(var i=0,l=ce.length;i<l;i++){if(ce[i].$$constructor){ce[i].$$constructor.apply(this,arguments);}}}{};return cf;};{};cd.$$original=ca;ca.wrapper=cd;return cd;}},defer:function(){var ch,ci,cj;{};}});})();(function(){var s="gecko",r="1.9.0.0",q=".",p="[object Opera]",o="function",n="[^\\.0-9]",m="525.26",l="",k="mshtml",j="AppleWebKit/",d="unknown",i="9.6.0",g="4.0",c="Gecko",b="opera",f="webkit",e="0.0.0",h="8.0",a="qx.bom.client.Engine";qx.Bootstrap.define(a,{statics:{NAME:"",FULLVERSION:"0.0.0",VERSION:0.0,OPERA:false,WEBKIT:false,GECKO:false,MSHTML:false,UNKNOWN_ENGINE:false,UNKNOWN_VERSION:false,DOCUMENT_MODE:null,__et:function(){var t=d;var x=e;var w=window.navigator.userAgent;var z=false;var v=false;if(window.opera&&Object.prototype.toString.call(window.opera)==p){t=b;this.OPERA=true;if(/Opera[\s\/]([0-9]+)\.([0-9])([0-9]*)/.test(w)){x=RegExp.$1+q+RegExp.$2;if(RegExp.$3!=l){x+=q+RegExp.$3;}}else{v=true;x=i;}}else if(window.navigator.userAgent.indexOf(j)!=-1){t=f;this.WEBKIT=true;if(/AppleWebKit\/([^ ]+)/.test(w)){x=RegExp.$1;var y=RegExp(n).exec(x);if(y){x=x.slice(0,y.index);}}else{v=true;x=m;}}else if(window.controllers&&window.navigator.product===c){t=s;this.GECKO=true;if(/rv\:([^\);]+)(\)|;)/.test(w)){x=RegExp.$1;}else{v=true;x=r;}}else if(window.navigator.cpuClass&&/MSIE\s+([^\);]+)(\)|;)/.test(w)){t=k;x=RegExp.$1;if(document.documentMode){this.DOCUMENT_MODE=document.documentMode;}if(x<8&&/Trident\/([^\);]+)(\)|;)/.test(w)){if(RegExp.$1===g){x=h;}}this.MSHTML=true;}else{var u=window.qxFail;if(u&&typeof u===o){var t=u();if(t.NAME&&t.FULLVERSION){t=t.NAME;this[t.toUpperCase()]=true;x=t.FULLVERSION;}}else{z=true;v=true;x=r;t=s;this.GECKO=true;qx.Bootstrap.warn("Unsupported client: "+w+"! Assumed gecko version 1.9.0.0 (Firefox 3.0).");}}this.UNKNOWN_ENGINE=z;this.UNKNOWN_VERSION=v;this.NAME=t;this.FULLVERSION=x;this.VERSION=parseFloat(x);}},defer:function(A){A.__et();}});})();(function(){var x="off",w="on",u="|",t="default",s="object",r="&",q="qx.aspects",p="qx.mobile.nativescroll",o="qx.mobile.emulatetouch",n="$",e="qx.allowUrlVariants",m="qx.debug",h="qx.client",c="qx.dynlocale",b="webkit",g="qxvariant",f="opera",j=":",a="qx.core.Variant",k="mshtml",d="gecko";qx.Bootstrap.define(a,{statics:{__kX:{},__kY:{},compilerIsSet:function(){return true;},define:function(y,z,A){{};if(!this.__kX[y]){this.__kX[y]={};}else{}this.__kX[y].allowedValues=z;this.__kX[y].defaultValue=A;},get:function(B){var C=this.__kX[B];{};if(C.value!==undefined){return C.value;}return C.defaultValue;},__la:function(){if(window.qxvariants){for(var D in qxvariants){{};if(!this.__kX[D]){this.__kX[D]={};}this.__kX[D].value=qxvariants[D];}window.qxvariants=undefined;try{delete window.qxvariants;}catch(E){}this.__lb(this.__kX);}},__lb:function(){if(qx.core.Setting.get(e)!=true){return;}var F=document.location.search.slice(1).split(r);for(var i=0;i<F.length;i++){var G=F[i].split(j);if(G.length!=3||G[0]!=g){continue;}var H=G[1];if(!this.__kX[H]){this.__kX[H]={};}this.__kX[H].value=decodeURIComponent(G[2]);}},select:function(I,J){{};for(var K in J){if(this.isSet(I,K)){return J[K];}}if(J[t]!==undefined){return J[t];}{};},isSet:function(L,M){var N=L+n+M;if(this.__kY[N]!==undefined){return this.__kY[N];}var P=false;if(M.indexOf(u)<0){P=this.get(L)===M;}else{var O=M.split(u);for(var i=0,l=O.length;i<l;i++){if(this.get(L)===O[i]){P=true;break;}}}this.__kY[N]=P;return P;},__lc:function(v){return typeof v===s&&v!==null&&v instanceof Array;},__ld:function(v){return typeof v===s&&v!==null&&!(v instanceof Array);},__le:function(Q,R){for(var i=0,l=Q.length;i<l;i++){if(Q[i]==R){return true;}}return false;}},defer:function(S){S.define(h,[d,k,f,b],qx.bom.client.Engine.NAME);S.define(m,[w,x],w);S.define(q,[w,x],x);S.define(c,[w,x],w);S.define(o,[w,x],x);S.define(p,[w,x],x);S.__la();}});})();(function(){var d="qx.dom.Node",c="qx.client",b="";qx.Class.define(d,{statics:{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12,getDocument:function(e){return e.nodeType===this.DOCUMENT?e:e.ownerDocument||e.document;},getWindow:qx.core.Variant.select(c,{"mshtml":function(f){if(f.nodeType==null){return f;}if(f.nodeType!==this.DOCUMENT){f=f.ownerDocument;}return f.parentWindow;},"default":function(g){if(g.nodeType==null){return g;}if(g.nodeType!==this.DOCUMENT){g=g.ownerDocument;}return g.defaultView;}}),getDocumentElement:function(h){return this.getDocument(h).documentElement;},getBodyElement:function(j){return this.getDocument(j).body;},isNode:function(k){return !!(k&&k.nodeType!=null);},isElement:function(l){return !!(l&&l.nodeType===this.ELEMENT);},isDocument:function(m){return !!(m&&m.nodeType===this.DOCUMENT);},isText:function(n){return !!(n&&n.nodeType===this.TEXT);},isWindow:function(o){return !!(o&&o.history&&o.location&&o.document);},isNodeName:function(p,q){if(!q||!p||!p.nodeName){return false;}return q.toLowerCase()==qx.dom.Node.getName(p);},getName:function(r){if(!r||!r.nodeName){return null;}return r.nodeName.toLowerCase();},getText:function(s){if(!s||!s.nodeType){return null;}switch(s.nodeType){case 1:var i,a=[],t=s.childNodes,length=t.length;for(i=0;i<length;i++){a[i]=this.getText(t[i]);}return a.join(b);case 2:return s.nodeValue;break;case 3:return s.nodeValue;break;}return null;},isBlockNode:function(u){if(!qx.dom.Node.isElement(u)){return false;}u=qx.dom.Node.getName(u);return /^(body|form|textarea|fieldset|ul|ol|dl|dt|dd|li|div|hr|p|h[1-6]|quote|pre|table|thead|tbody|tfoot|tr|td|th|iframe|address|blockquote)$/.test(u);}}});})();(function(){var j="on",i="qx.client",h="gecko",g="function",f="HTMLEvents",d="mousedown",c="qx.bom.Event",b="return;",a="mouseover";qx.Class.define(c,{statics:{addNativeListener:function(k,l,m,n){if(k.addEventListener){k.addEventListener(l,m,!!n);}else if(k.attachEvent){k.attachEvent(j+l,m);}},removeNativeListener:function(o,p,q,r){if(o.removeEventListener){o.removeEventListener(p,q,!!r);}else if(o.detachEvent){try{o.detachEvent(j+p,q);}catch(e){if(e.number!==-2146828218){throw e;}}}},getTarget:function(e){return e.target||e.srcElement;},getRelatedTarget:function(e){if(e.relatedTarget!==undefined){if(qx.core.Variant.isSet(i,h)){try{e.relatedTarget&&e.relatedTarget.nodeType;}catch(e){return null;}}return e.relatedTarget;}else if(e.fromElement!==undefined&&e.type===a){return e.fromElement;}else if(e.toElement!==undefined){return e.toElement;}else{return null;}},preventDefault:function(e){if(e.preventDefault){if(qx.core.Variant.isSet(i,h)&&qx.bom.client.Engine.VERSION>=1.9&&e.type==d&&e.button==2){return;}e.preventDefault();if(qx.core.Variant.isSet(i,h)&&qx.bom.client.Engine.VERSION<1.9){try{e.keyCode=0;}catch(s){}}}else{try{e.keyCode=0;}catch(t){}e.returnValue=false;}},stopPropagation:function(e){if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true;}},fire:function(u,v){if(document.createEvent){var w=document.createEvent(f);w.initEvent(v,true,true);return !u.dispatchEvent(w);}else{var w=document.createEventObject();return u.fireEvent(j+v,w);}},supportsEvent:qx.core.Variant.select(i,{"webkit":function(x,y){return x.hasOwnProperty(j+y);},"default":function(z,A){var B=j+A;var C=(B in z);if(!C){C=typeof z[B]==g;if(!C&&z.setAttribute){z.setAttribute(B,b);C=typeof z[B]==g;z.removeAttribute(B);}}return C;}})}});})();(function(){var r="|bubble",q="|capture",p="|",o="",n="_",m="unload",k="UNKNOWN_",j="__fs",h="c",g="DOM_",c="__ft",f="WIN_",e="QX_",b="qx.event.Manager",a="capture",d="DOCUMENT_";qx.Class.define(b,{extend:Object,construct:function(s,t){this.__fo=s;this.__fp=qx.core.ObjectRegistry.toHashCode(s);this.__fq=t;if(s.qx!==qx){var self=this;qx.bom.Event.addNativeListener(s,m,qx.event.GlobalError.observeMethod(function(){qx.bom.Event.removeNativeListener(s,m,arguments.callee);self.dispose();}));}this.__fr={};this.__fs={};this.__ft={};this.__fu={};},statics:{__fv:0,getNextUniqueId:function(){return (this.__fv++)+o;}},members:{__fq:null,__fr:null,__ft:null,__fw:null,__fs:null,__fu:null,__fo:null,__fp:null,getWindow:function(){return this.__fo;},getWindowId:function(){return this.__fp;},getHandler:function(u){var v=this.__fs[u.classname];if(v){return v;}return this.__fs[u.classname]=new u(this);},getDispatcher:function(w){var x=this.__ft[w.classname];if(x){return x;}return this.__ft[w.classname]=new w(this,this.__fq);},getListeners:function(y,z,A){var B=y.$$hash||qx.core.ObjectRegistry.toHashCode(y);var D=this.__fr[B];if(!D){return null;}var E=z+(A?q:r);var C=D[E];return C?C.concat():null;},serializeListeners:function(F){var M=F.$$hash||qx.core.ObjectRegistry.toHashCode(F);var O=this.__fr[M];var K=[];if(O){var I,N,G,J,L;for(var H in O){I=H.indexOf(p);N=H.substring(0,I);G=H.charAt(I+1)==h;J=O[H];for(var i=0,l=J.length;i<l;i++){L=J[i];K.push({self:L.context,handler:L.handler,type:N,capture:G});}}}return K;},toggleAttachedEvents:function(P,Q){var V=P.$$hash||qx.core.ObjectRegistry.toHashCode(P);var X=this.__fr[V];if(X){var S,W,R,T;for(var U in X){S=U.indexOf(p);W=U.substring(0,S);R=U.charCodeAt(S+1)===99;T=X[U];if(Q){this.__fx(P,W,R);}else{this.__fy(P,W,R);}}}},hasListener:function(Y,ba,bb){{};var bc=Y.$$hash||qx.core.ObjectRegistry.toHashCode(Y);var be=this.__fr[bc];if(!be){return false;}var bf=ba+(bb?q:r);var bd=be[bf];return bd&&bd.length>0;},importListeners:function(bg,bh){{};var bn=bg.$$hash||qx.core.ObjectRegistry.toHashCode(bg);var bo=this.__fr[bn]={};var bk=qx.event.Manager;for(var bi in bh){var bl=bh[bi];var bm=bl.type+(bl.capture?q:r);var bj=bo[bm];if(!bj){bj=bo[bm]=[];this.__fx(bg,bl.type,bl.capture);}bj.push({handler:bl.listener,context:bl.self,unique:bl.unique||(bk.__fv++)+o});}},addListener:function(bp,bq,br,self,bs){var bw;{};var bx=bp.$$hash||qx.core.ObjectRegistry.toHashCode(bp);var bz=this.__fr[bx];if(!bz){bz=this.__fr[bx]={};}var bv=bq+(bs?q:r);var bu=bz[bv];if(!bu){bu=bz[bv]=[];}if(bu.length===0){this.__fx(bp,bq,bs);}var by=(qx.event.Manager.__fv++)+o;var bt={handler:br,context:self,unique:by};bu.push(bt);return bv+p+by;},findHandler:function(bA,bB){var bN=false,bF=false,bO=false,bC=false;var bL;if(bA.nodeType===1){bN=true;bL=g+bA.tagName.toLowerCase()+n+bB;}else if(bA.nodeType===9){bC=true;bL=d+bB;}else if(bA==this.__fo){bF=true;bL=f+bB;}else if(bA.classname){bO=true;bL=e+bA.classname+n+bB;}else{bL=k+bA+n+bB;}var bH=this.__fu;if(bH[bL]){return bH[bL];}var bK=this.__fq.getHandlers();var bG=qx.event.IEventHandler;var bI,bJ,bE,bD;for(var i=0,l=bK.length;i<l;i++){bI=bK[i];bE=bI.SUPPORTED_TYPES;if(bE&&!bE[bB]){continue;}bD=bI.TARGET_CHECK;if(bD){var bM=false;if(bN&&((bD&bG.TARGET_DOMNODE)!=0)){bM=true;}else if(bF&&((bD&bG.TARGET_WINDOW)!=0)){bM=true;}else if(bO&&((bD&bG.TARGET_OBJECT)!=0)){bM=true;}else if(bC&&((bD&bG.TARGET_DOCUMENT)!=0)){bM=true;}if(!bM){continue;}}bJ=this.getHandler(bK[i]);if(bI.IGNORE_CAN_HANDLE||bJ.canHandleEvent(bA,bB)){bH[bL]=bJ;return bJ;}}return null;},__fx:function(bP,bQ,bR){var bS=this.findHandler(bP,bQ);if(bS){bS.registerEvent(bP,bQ,bR);return;}{};},removeListener:function(bT,bU,bV,self,bW){var cb;{};var cc=bT.$$hash||qx.core.ObjectRegistry.toHashCode(bT);var cd=this.__fr[cc];if(!cd){return false;}var bX=bU+(bW?q:r);var bY=cd[bX];if(!bY){return false;}var ca;for(var i=0,l=bY.length;i<l;i++){ca=bY[i];if(ca.handler===bV&&ca.context===self){qx.lang.Array.removeAt(bY,i);if(bY.length==0){this.__fy(bT,bU,bW);}return true;}}return false;},removeListenerById:function(ce,cf){var cl;{};var cj=cf.split(p);var co=cj[0];var cg=cj[1].charCodeAt(0)==99;var cn=cj[2];var cm=ce.$$hash||qx.core.ObjectRegistry.toHashCode(ce);var cp=this.__fr[cm];if(!cp){return false;}var ck=co+(cg?q:r);var ci=cp[ck];if(!ci){return false;}var ch;for(var i=0,l=ci.length;i<l;i++){ch=ci[i];if(ch.unique===cn){qx.lang.Array.removeAt(ci,i);if(ci.length==0){this.__fy(ce,co,cg);}return true;}}return false;},removeAllListeners:function(cq){var cu=cq.$$hash||qx.core.ObjectRegistry.toHashCode(cq);var cw=this.__fr[cu];if(!cw){return false;}var cs,cv,cr;for(var ct in cw){if(cw[ct].length>0){cs=ct.split(p);cv=cs[0];cr=cs[1]===a;this.__fy(cq,cv,cr);}}delete this.__fr[cu];return true;},deleteAllListeners:function(cx){delete this.__fr[cx];},__fy:function(cy,cz,cA){var cB=this.findHandler(cy,cz);if(cB){cB.unregisterEvent(cy,cz,cA);return;}{};},dispatchEvent:function(cC,event){var cH;{};var cI=event.getType();if(!event.getBubbles()&&!this.hasListener(cC,cI)){qx.event.Pool.getInstance().poolObject(event);return true;}if(!event.getTarget()){event.setTarget(cC);}var cG=this.__fq.getDispatchers();var cF;var cE=false;for(var i=0,l=cG.length;i<l;i++){cF=this.getDispatcher(cG[i]);if(cF.canDispatchEvent(cC,event,cI)){cF.dispatchEvent(cC,event,cI);cE=true;break;}}if(!cE){{};return true;}var cD=event.getDefaultPrevented();qx.event.Pool.getInstance().poolObject(event);return !cD;},dispose:function(){this.__fq.removeManager(this);qx.util.DisposeUtil.disposeMap(this,j);qx.util.DisposeUtil.disposeMap(this,c);this.__fr=this.__fo=this.__fw=null;this.__fq=this.__fu=null;}}});})();(function(){var g="mshtml",f="qx.client",e="[object Array]",d="qx.lang.Array",c="qx",b="number",a="string";qx.Class.define(d,{statics:{toArray:function(h,j){return this.cast(h,Array,j);},cast:function(k,m,n){if(k.constructor===m){return k;}if(qx.Class.hasInterface(k,qx.data.IListData)){var k=k.toArray();}var o=new m;if(qx.core.Variant.isSet(f,g)){if(k.item){for(var i=n||0,l=k.length;i<l;i++){o.push(k[i]);}return o;}}if(Object.prototype.toString.call(k)===e&&n==null){o.push.apply(o,k);}else{o.push.apply(o,Array.prototype.slice.call(k,n||0));}return o;},fromArguments:function(p,q){return Array.prototype.slice.call(p,q||0);},fromCollection:function(r){if(qx.core.Variant.isSet(f,g)){if(r.item){var s=[];for(var i=0,l=r.length;i<l;i++){s[i]=r[i];}return s;}}return Array.prototype.slice.call(r,0);},fromShortHand:function(t){var v=t.length;var u=qx.lang.Array.clone(t);switch(v){case 1:u[1]=u[2]=u[3]=u[0];break;case 2:u[2]=u[0];case 3:u[3]=u[1];}return u;},clone:function(w){return w.concat();},insertAt:function(x,y,i){x.splice(i,0,y);return x;},insertBefore:function(z,A,B){var i=z.indexOf(B);if(i==-1){z.push(A);}else{z.splice(i,0,A);}return z;},insertAfter:function(C,D,E){var i=C.indexOf(E);if(i==-1||i==(C.length-1)){C.push(D);}else{C.splice(i+1,0,D);}return C;},removeAt:function(F,i){return F.splice(i,1)[0];},removeAll:function(G){G.length=0;return this;},append:function(H,I){{};Array.prototype.push.apply(H,I);return H;},exclude:function(J,K){{};for(var i=0,M=K.length,L;i<M;i++){L=J.indexOf(K[i]);if(L!=-1){J.splice(L,1);}}return J;},remove:function(N,O){var i=N.indexOf(O);if(i!=-1){N.splice(i,1);return O;}},contains:function(P,Q){return P.indexOf(Q)!==-1;},equals:function(R,S){var length=R.length;if(length!==S.length){return false;}for(var i=0;i<length;i++){if(R[i]!==S[i]){return false;}}return true;},sum:function(T){var U=0;for(var i=0,l=T.length;i<l;i++){U+=T[i];}return U;},max:function(V){{};var i,X=V.length,W=V[0];for(i=1;i<X;i++){if(V[i]>W){W=V[i];}}return W===undefined?null:W;},min:function(Y){{};var i,bb=Y.length,ba=Y[0];for(i=1;i<bb;i++){if(Y[i]<ba){ba=Y[i];}}return ba===undefined?null:ba;},unique:function(bc){var bm=[],be={},bh={},bj={};var bi,bd=0;var bn=c+qx.lang.Date.now();var bf=false,bl=false,bo=false;for(var i=0,bk=bc.length;i<bk;i++){bi=bc[i];if(bi===null){if(!bf){bf=true;bm.push(bi);}}else if(bi===undefined){}else if(bi===false){if(!bl){bl=true;bm.push(bi);}}else if(bi===true){if(!bo){bo=true;bm.push(bi);}}else if(typeof bi===a){if(!be[bi]){be[bi]=1;bm.push(bi);}}else if(typeof bi===b){if(!bh[bi]){bh[bi]=1;bm.push(bi);}}else{bg=bi[bn];if(bg==null){bg=bi[bn]=bd++;}if(!bj[bg]){bj[bg]=bi;bm.push(bi);}}}for(var bg in bj){try{delete bj[bg][bn];}catch(bp){try{bj[bg][bn]=null;}catch(bq){throw new Error("Cannot clean-up map entry doneObjects["+bg+"]["+bn+"]");}}}return bm;}}});})();(function(){var f="()",e=".",d=".prototype.",c='anonymous()',b="qx.lang.Function",a=".constructor()";qx.Class.define(b,{statics:{getCaller:function(g){return g.caller?g.caller.callee:g.callee.caller;},getName:function(h){if(h.displayName){return h.displayName;}if(h.$$original||h.wrapper||h.classname){return h.classname+a;}if(h.$$mixin){for(var j in h.$$mixin.$$members){if(h.$$mixin.$$members[j]==h){return h.$$mixin.name+d+j+f;}}for(var j in h.$$mixin){if(h.$$mixin[j]==h){return h.$$mixin.name+e+j+f;}}}if(h.self){var k=h.self.constructor;if(k){for(var j in k.prototype){if(k.prototype[j]==h){return k.classname+d+j+f;}}for(var j in k){if(k[j]==h){return k.classname+e+j+f;}}}}var i=h.toString().match(/function\s*(\w*)\s*\(.*/);if(i&&i.length>=1&&i[1]){return i[1]+f;}return c;},globalEval:function(l){if(window.execScript){return window.execScript(l);}else{return eval.call(window,l);}},empty:function(){},returnTrue:function(){return true;},returnFalse:function(){return false;},returnNull:function(){return null;},returnThis:function(){return this;},returnZero:function(){return 0;},create:function(m,n){{};if(!n){return m;}if(!(n.self||n.args||n.delay!=null||n.periodical!=null||n.attempt)){return m;}return function(event){{};var p=qx.lang.Array.fromArguments(arguments);if(n.args){p=n.args.concat(p);}if(n.delay||n.periodical){var o=qx.event.GlobalError.observeMethod(function(){return m.apply(n.self||this,p);});if(n.delay){return window.setTimeout(o,n.delay);}if(n.periodical){return window.setInterval(o,n.periodical);}}else if(n.attempt){var q=false;try{q=m.apply(n.self||this,p);}catch(r){}return q;}else{return m.apply(n.self||this,p);}};},bind:function(s,self,t){return this.create(s,{self:self,args:arguments.length>2?qx.lang.Array.fromArguments(arguments,2):null});},curry:function(u,v){return this.create(u,{args:arguments.length>1?qx.lang.Array.fromArguments(arguments,1):null});},listener:function(w,self,x){if(arguments.length<3){return function(event){return w.call(self||this,event||window.event);};}else{var y=qx.lang.Array.fromArguments(arguments,2);return function(event){var z=[event||window.event];z.push.apply(z,y);w.apply(self||this,z);};}},attempt:function(A,self,B){return this.create(A,{self:self,attempt:true,args:arguments.length>2?qx.lang.Array.fromArguments(arguments,2):null})();},delay:function(C,D,self,E){return this.create(C,{delay:D,self:self,args:arguments.length>3?qx.lang.Array.fromArguments(arguments,3):null})();},periodical:function(F,G,self,H){return this.create(F,{periodical:G,self:self,args:arguments.length>3?qx.lang.Array.fromArguments(arguments,3):null})();}}});})();(function(){var c="qx.event.Registration";qx.Class.define(c,{statics:{__fc:{},getManager:function(d){if(d==null){{};d=window;}else if(d.nodeType){d=qx.dom.Node.getWindow(d);}else if(!qx.dom.Node.isWindow(d)){d=window;}var f=d.$$hash||qx.core.ObjectRegistry.toHashCode(d);var e=this.__fc[f];if(!e){e=new qx.event.Manager(d,this);this.__fc[f]=e;}return e;},removeManager:function(g){var h=g.getWindowId();delete this.__fc[h];},addListener:function(i,j,k,self,l){return this.getManager(i).addListener(i,j,k,self,l);},removeListener:function(m,n,o,self,p){return this.getManager(m).removeListener(m,n,o,self,p);},removeListenerById:function(q,r){return this.getManager(q).removeListenerById(q,r);},removeAllListeners:function(s){return this.getManager(s).removeAllListeners(s);},deleteAllListeners:function(t){var u=t.$$hash;if(u){this.getManager(t).deleteAllListeners(u);}},hasListener:function(v,w,x){return this.getManager(v).hasListener(v,w,x);},serializeListeners:function(y){return this.getManager(y).serializeListeners(y);},createEvent:function(z,A,B){{};if(A==null){A=qx.event.type.Event;}var C=qx.event.Pool.getInstance().getObject(A);B?C.init.apply(C,B):C.init();if(z){C.setType(z);}return C;},dispatchEvent:function(D,event){return this.getManager(D).dispatchEvent(D,event);},fireEvent:function(E,F,G,H){var I;{};var J=this.createEvent(F,G||null,H);return this.getManager(E).dispatchEvent(E,J);},fireNonBubblingEvent:function(K,L,M,N){{};var O=this.getManager(K);if(!O.hasListener(K,L,false)){return true;}var P=this.createEvent(L,M||null,N);return O.dispatchEvent(K,P);},PRIORITY_FIRST:-32000,PRIORITY_NORMAL:0,PRIORITY_LAST:32000,__fd:[],addHandler:function(Q){{};this.__fd.push(Q);this.__fd.sort(function(a,b){return a.PRIORITY-b.PRIORITY;});},getHandlers:function(){return this.__fd;},__fe:[],addDispatcher:function(R,S){{};this.__fe.push(R);this.__fe.sort(function(a,b){return a.PRIORITY-b.PRIORITY;});},getDispatchers:function(){return this.__fe;}}});})();(function(){var e="$$hash",d="",c="qx.core.ObjectRegistry";qx.Class.define(c,{statics:{inShutDown:false,__cM:{},__cN:0,__cO:[],register:function(f){var j=this.__cM;if(!j){return;}var h=f.$$hash;if(h==null){var g=this.__cO;if(g.length>0){h=g.pop();}else{h=(this.__cN++)+d;}f.$$hash=h;}{};j[h]=f;},unregister:function(k){var m=k.$$hash;if(m==null){return;}var n=this.__cM;if(n&&n[m]){delete n[m];this.__cO.push(m);}try{delete k.$$hash;}catch(o){if(k.removeAttribute){k.removeAttribute(e);}}},toHashCode:function(p){{};var r=p.$$hash;if(r!=null){return r;}var q=this.__cO;if(q.length>0){r=q.pop();}else{r=(this.__cN++)+d;}return p.$$hash=r;},clearHashCode:function(s){{};var t=s.$$hash;if(t!=null){this.__cO.push(t);try{delete s.$$hash;}catch(u){if(s.removeAttribute){s.removeAttribute(e);}}}},fromHashCode:function(v){return this.__cM[v]||null;},shutdown:function(){this.inShutDown=true;var x=this.__cM;var z=[];for(var y in x){z.push(y);}z.sort(function(a,b){return parseInt(b,10)-parseInt(a,10);});var w,i=0,l=z.length;while(true){try{for(;i<l;i++){y=z[i];w=x[y];if(w&&w.dispose){w.dispose();}}}catch(A){qx.Bootstrap.error(this,"Could not dispose object "+w.toString()+": "+A);if(i!==l){i++;continue;}}break;}qx.Bootstrap.debug(this,"Disposed "+l+" objects");delete this.__cM;},getRegistry:function(){return this.__cM;}}});})();(function(){var a="qx.data.MBinding";qx.Mixin.define(a,{members:{bind:function(b,c,d,e){return qx.data.SingleValueBinding.bind(this,b,c,d,e);},removeBinding:function(f){qx.data.SingleValueBinding.removeBindingFromObject(this,f);},removeAllBindings:function(){qx.data.SingleValueBinding.removeAllBindingsForObject(this);},getBindings:function(){return qx.data.SingleValueBinding.getAllBindingsForObject(this);}}});})();(function(){var a="qx.lang.RingBuffer";qx.Class.define(a,{extend:Object,construct:function(b){this.setMaxEntries(b||50);},members:{__iq:0,__ir:0,__is:false,__it:0,__iu:null,__iv:null,setMaxEntries:function(c){this.__iv=c;this.clear();},getMaxEntries:function(){return this.__iv;},addEntry:function(d){this.__iu[this.__iq]=d;this.__iq=this.__iw(this.__iq,1);var e=this.getMaxEntries();if(this.__ir<e){this.__ir++;}if(this.__is&&(this.__it<e)){this.__it++;}},mark:function(){this.__is=true;this.__it=0;},clearMark:function(){this.__is=false;},getAllEntries:function(){return this.getEntries(this.getMaxEntries(),false);},getEntries:function(f,g){if(f>this.__ir){f=this.__ir;}if(g&&this.__is&&(f>this.__it)){f=this.__it;}if(f>0){var i=this.__iw(this.__iq,-1);var h=this.__iw(i,-f+1);var j;if(h<=i){j=this.__iu.slice(h,i+1);}else{j=this.__iu.slice(h,this.__ir).concat(this.__iu.slice(0,i+1));}}else{j=[];}return j;},clear:function(){this.__iu=new Array(this.getMaxEntries());this.__ir=0;this.__it=0;this.__iq=0;},__iw:function(k,l){var m=this.getMaxEntries();var n=(k+l)%m;if(n<0){n+=m;}return n;}}});})();(function(){var a="qx.log.appender.RingBuffer";qx.Class.define(a,{extend:qx.lang.RingBuffer,construct:function(b){this.setMaxMessages(b||50);},members:{setMaxMessages:function(c){this.setMaxEntries(c);},getMaxMessages:function(){return this.getMaxEntries();},process:function(d){this.addEntry(d);},getAllLogEvents:function(){return this.getAllEntries();},retrieveLogEvents:function(e,f){return this.getEntries(e,f);},clearHistory:function(){this.clear();}}});})();(function(){var j=":",h="qx.client",g="anonymous",f="...",e="qx.dev.StackTrace",d="",c="\n",b="/source/class/",a=".";qx.Class.define(e,{statics:{getStackTrace:qx.core.Variant.select(h,{"gecko":function(){try{throw new Error();}catch(x){var r=this.getStackTraceFromError(x);qx.lang.Array.removeAt(r,0);var p=this.getStackTraceFromCaller(arguments);var n=p.length>r.length?p:r;for(var i=0;i<Math.min(p.length,r.length);i++){var o=p[i];if(o.indexOf(g)>=0){continue;}var v=o.split(j);if(v.length!=2){continue;}var t=v[0];var m=v[1];var l=r[i];var w=l.split(j);var s=w[0];var k=w[1];if(qx.Class.getByName(s)){var q=s;}else{q=t;}var u=q+j;if(m){u+=m+j;}u+=k;n[i]=u;}return n;}},"mshtml|webkit":function(){return this.getStackTraceFromCaller(arguments);},"opera":function(){var y;try{y.bar();}catch(A){var z=this.getStackTraceFromError(A);qx.lang.Array.removeAt(z,0);return z;}return [];}}),getStackTraceFromCaller:qx.core.Variant.select(h,{"opera":function(B){return [];},"default":function(C){var H=[];var G=qx.lang.Function.getCaller(C);var D={};while(G){var E=qx.lang.Function.getName(G);H.push(E);try{G=G.caller;}catch(I){break;}if(!G){break;}var F=qx.core.ObjectRegistry.toHashCode(G);if(D[F]){H.push(f);break;}D[F]=G;}return H;}}),getStackTraceFromError:qx.core.Variant.select(h,{"gecko":function(J){if(!J.stack){return [];}var P=/@(.+):(\d+)$/gm;var K;var L=[];while((K=P.exec(J.stack))!=null){var M=K[1];var O=K[2];var N=this.__kR(M);L.push(N+j+O);}return L;},"webkit":function(Q){if(Q.sourceURL&&Q.line){return [this.__kR(Q.sourceURL)+j+Q.line];}else{return [];}},"opera":function(R){if(R.message.indexOf("Backtrace:")<0){return [];}var T=[];var U=qx.lang.String.trim(R.message.split("Backtrace:")[1]);var V=U.split(c);for(var i=0;i<V.length;i++){var S=V[i].match(/\s*Line ([0-9]+) of.* (\S.*)/);if(S&&S.length>=2){var X=S[1];var W=this.__kR(S[2]);T.push(W+j+X);}}return T;},"default":function(){return [];}}),__kR:function(Y){var bc=b;var ba=Y.indexOf(bc);var bb=(ba==-1)?Y:Y.substring(ba+bc.length).replace(/\//g,a).replace(/\.js$/,d);return bb;}}});})();(function(){var k="",j="g",h="0",g='\\$1',f="%",e='-',d="qx.lang.String",c=' ',b='\n',a="undefined";qx.Class.define(d,{statics:{camelCase:function(l){return l.replace(/\-([a-z])/g,function(m,n){return n.toUpperCase();});},hyphenate:function(o){return o.replace(/[A-Z]/g,function(p){return (e+p.charAt(0).toLowerCase());});},capitalize:function(q){return q.replace(/\b[a-z]/g,function(r){return r.toUpperCase();});},clean:function(s){return this.trim(s.replace(/\s+/g,c));},trimLeft:function(t){return t.replace(/^\s+/,k);},trimRight:function(u){return u.replace(/\s+$/,k);},trim:function(v){return v.replace(/^\s+|\s+$/g,k);},startsWith:function(w,x){return w.indexOf(x)===0;},endsWith:function(y,z){return y.substring(y.length-z.length,y.length)===z;},repeat:function(A,B){return A.length>0?new Array(B+1).join(A):k;},pad:function(C,length,D){var E=length-C.length;if(E>0){if(typeof D===a){D=h;}return this.repeat(D,E)+C;}else{return C;}},firstUp:qx.Bootstrap.firstUp,firstLow:qx.Bootstrap.firstLow,contains:function(F,G){return F.indexOf(G)!=-1;},format:function(H,I){var J=H;for(var i=0;i<I.length;i++){J=J.replace(new RegExp(f+(i+1),j),I[i]+k);}return J;},escapeRegexpChars:function(K){return K.replace(/([.*+?^${}()|[\]\/\\])/g,g);},toArray:function(L){return L.split(/\B|\b/g);},stripTags:function(M){return M.replace(/<\/?[^>]+>/gi,k);},stripScripts:function(N,O){var Q=k;var P=N.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){Q+=arguments[1]+b;return k;});if(O===true){qx.lang.Function.globalEval(Q);}return P;}}});})();(function(){var k="node",j="error",h="...(+",g="array",f=")",e="info",d="instance",c="string",b="null",a="class",H="number",G="stringify",F="]",E="date",D="unknown",C="function",B="boolean",A="debug",z="map",y="undefined",s="qx.log.Logger",t="[",q="#",r="warn",o="document",p="{...(",m="text[",n="[...(",u="\n",v=")}",x=")]",w="object";qx.Class.define(s,{statics:{__ff:A,setLevel:function(I){this.__ff=I;},getLevel:function(){return this.__ff;},setTreshold:function(J){this.__fi.setMaxMessages(J);},getTreshold:function(){return this.__fi.getMaxMessages();},__fg:{},__fh:0,register:function(K){if(K.$$id){return;}var M=this.__fh++;this.__fg[M]=K;K.$$id=M;var L=this.__fj;var N=this.__fi.getAllLogEvents();for(var i=0,l=N.length;i<l;i++){if(L[N[i].level]>=L[this.__ff]){K.process(N[i]);}}},unregister:function(O){var P=O.$$id;if(P==null){return;}delete this.__fg[P];delete O.$$id;},debug:function(Q,R){qx.log.Logger.__fk(A,arguments);},info:function(S,T){qx.log.Logger.__fk(e,arguments);},warn:function(U,V){qx.log.Logger.__fk(r,arguments);},error:function(W,X){qx.log.Logger.__fk(j,arguments);},trace:function(Y){qx.log.Logger.__fk(e,[Y,qx.dev.StackTrace.getStackTrace().join(u)]);},deprecatedMethodWarning:function(ba,bb){var bc;{};},deprecatedClassWarning:function(bd,be){var bf;{};},deprecatedEventWarning:function(bg,event,bh){var bi;{};},deprecatedMixinWarning:function(bj,bk){var bl;{};},deprecatedConstantWarning:function(bm,bn,bo){var self,bp;{};},deprecateMethodOverriding:function(bq,br,bs,bt){var bu;{};},clear:function(){this.__fi.clearHistory();},__fi:new qx.log.appender.RingBuffer(50),__fj:{debug:0,info:1,warn:2,error:3},__fk:function(bv,bw){var bB=this.__fj;if(bB[bv]<bB[this.__ff]){return;}var by=bw.length<2?null:bw[0];var bA=by?1:0;var bx=[];for(var i=bA,l=bw.length;i<l;i++){bx.push(this.__fm(bw[i],true));}var bC=new Date;var bD={time:bC,offset:bC-qx.Bootstrap.LOADSTART,level:bv,items:bx,win:window};if(by){if(by.$$hash!==undefined){bD.object=by.$$hash;}else if(by.$$type){bD.clazz=by;}}this.__fi.process(bD);var bE=this.__fg;for(var bz in bE){bE[bz].process(bD);}},__fl:function(bF){if(bF===undefined){return y;}else if(bF===null){return b;}if(bF.$$type){return a;}var bG=typeof bF;if(bG===C||bG==c||bG===H||bG===B){return bG;}else if(bG===w){if(bF.nodeType){return k;}else if(bF.classname){return d;}else if(bF instanceof Array){return g;}else if(bF instanceof Error){return j;}else if(bF instanceof Date){return E;}else{return z;}}if(bF.toString){return G;}return D;},__fm:function(bH,bI){var bP=this.__fl(bH);var bL=D;var bK=[];switch(bP){case b:case y:bL=bP;break;case c:case H:case B:case E:bL=bH;break;case k:if(bH.nodeType===9){bL=o;}else if(bH.nodeType===3){bL=m+bH.nodeValue+F;}else if(bH.nodeType===1){bL=bH.nodeName.toLowerCase();if(bH.id){bL+=q+bH.id;}}else{bL=k;}break;case C:bL=qx.lang.Function.getName(bH)||bP;break;case d:bL=bH.basename+t+bH.$$hash+F;break;case a:case G:bL=bH.toString();break;case j:bK=qx.dev.StackTrace.getStackTraceFromError(bH);bL=bH.toString();break;case g:if(bI){bL=[];for(var i=0,l=bH.length;i<l;i++){if(bL.length>20){bL.push(h+(l-i)+f);break;}bL.push(this.__fm(bH[i],false));}}else{bL=n+bH.length+x;}break;case z:if(bI){var bJ;var bO=[];for(var bN in bH){bO.push(bN);}bO.sort();bL=[];for(var i=0,l=bO.length;i<l;i++){if(bL.length>20){bL.push(h+(l-i)+f);break;}bN=bO[i];bJ=this.__fm(bH[bN],false);bJ.key=bN;bL.push(bJ);}}else{var bM=0;for(var bN in bH){bM++;}bL=p+bM+v;}break;}return {type:bP,text:bL,trace:bK};}},defer:function(bQ){var bR=qx.Bootstrap.$$logs;for(var i=0;i<bR.length;i++){bQ.__fk(bR[i][0],bR[i][1]);}qx.Bootstrap.debug=bQ.debug;qx.Bootstrap.info=bQ.info;qx.Bootstrap.warn=bQ.warn;qx.Bootstrap.error=bQ.error;qx.Bootstrap.trace=bQ.trace;}});})();(function(){var q="set",p="get",o="reset",n="MSIE 6.0",m="info",k="qx.core.Object",j="error",h="warn",g="]",f="debug",b="[",d="$$user_",c="rv:1.8.1",a="Object";qx.Class.define(k,{extend:Object,include:[qx.data.MBinding],construct:function(){qx.core.ObjectRegistry.register(this);},statics:{$$type:a},members:{toHashCode:function(){return this.$$hash;},toString:function(){return this.classname+b+this.$$hash+g;},base:function(r,s){{};if(arguments.length===1){return r.callee.base.call(this);}else{return r.callee.base.apply(this,Array.prototype.slice.call(arguments,1));}},self:function(t){return t.callee.self;},clone:function(){var v=this.constructor;var u=new v;var x=qx.Class.getProperties(v);var w=qx.core.Property.$$store.user;var y=qx.core.Property.$$method.set;var name;for(var i=0,l=x.length;i<l;i++){name=x[i];if(this.hasOwnProperty(w[name])){u[y[name]](this[w[name]]);}}return u;},set:function(z,A){var C=qx.core.Property.$$method.set;if(qx.Bootstrap.isString(z)){if(!this[C[z]]){if(this[q+qx.Bootstrap.firstUp(z)]!=undefined){this[q+qx.Bootstrap.firstUp(z)](A);return this;}{};}return this[C[z]](A);}else{for(var B in z){if(!this[C[B]]){if(this[q+qx.Bootstrap.firstUp(B)]!=undefined){this[q+qx.Bootstrap.firstUp(B)](z[B]);continue;}{};}this[C[B]](z[B]);}return this;}},get:function(D){var E=qx.core.Property.$$method.get;if(!this[E[D]]){if(this[p+qx.Bootstrap.firstUp(D)]!=undefined){return this[p+qx.Bootstrap.firstUp(D)]();}{};}return this[E[D]]();},reset:function(F){var G=qx.core.Property.$$method.reset;if(!this[G[F]]){if(this[o+qx.Bootstrap.firstUp(F)]!=undefined){this[o+qx.Bootstrap.firstUp(F)]();return;}{};}this[G[F]]();},__lw:qx.event.Registration,addListener:function(H,I,self,J){if(!this.$$disposed){return this.__lw.addListener(this,H,I,self,J);}return null;},addListenerOnce:function(K,L,self,M){var N=function(e){this.removeListener(K,N,this,M);L.call(self||this,e);};return this.addListener(K,N,this,M);},removeListener:function(O,P,self,Q){if(!this.$$disposed){return this.__lw.removeListener(this,O,P,self,Q);}return false;},removeListenerById:function(R){if(!this.$$disposed){return this.__lw.removeListenerById(this,R);}return false;},hasListener:function(S,T){return this.__lw.hasListener(this,S,T);},dispatchEvent:function(U){if(!this.$$disposed){return this.__lw.dispatchEvent(this,U);}return true;},fireEvent:function(V,W,X){if(!this.$$disposed){return this.__lw.fireEvent(this,V,W,X);}return true;},fireNonBubblingEvent:function(Y,ba,bb){if(!this.$$disposed){return this.__lw.fireNonBubblingEvent(this,Y,ba,bb);}return true;},fireDataEvent:function(bc,bd,be,bf){if(!this.$$disposed){if(be===undefined){be=null;}return this.__lw.fireNonBubblingEvent(this,bc,qx.event.type.Data,[bd,be,!!bf]);}return true;},__lx:null,setUserData:function(bg,bh){if(!this.__lx){this.__lx={};}this.__lx[bg]=bh;},getUserData:function(bi){if(!this.__lx){return null;}var bj=this.__lx[bi];return bj===undefined?null:bj;},__ly:qx.log.Logger,debug:function(bk){this.__lz(f,arguments);},info:function(bl){this.__lz(m,arguments);},warn:function(bm){this.__lz(h,arguments);},error:function(bn){this.__lz(j,arguments);},trace:function(){this.__ly.trace(this);},__lz:function(bo,bp){var bq=qx.lang.Array.fromArguments(bp);bq.unshift(this);this.__ly[bo].apply(this.__ly,bq);},isDisposed:function(){return this.$$disposed||false;},dispose:function(){var bv,bt,bs,bw;if(this.$$disposed){return;}this.$$disposed=true;this.$$instance=null;this.$$allowconstruct=null;{};var bu=this.constructor;var br;while(bu.superclass){if(bu.$$destructor){bu.$$destructor.call(this);}if(bu.$$includes){br=bu.$$flatIncludes;for(var i=0,l=br.length;i<l;i++){if(br[i].$$destructor){br[i].$$destructor.call(this);}}}bu=bu.superclass;}if(this.__lA){this.__lA();}{};},__lA:null,__lB:function(){var bx=qx.Class.getProperties(this.constructor);for(var i=0,l=bx.length;i<l;i++){delete this[d+bx[i]];}},_disposeObjects:function(by){qx.util.DisposeUtil.disposeObjects(this,arguments);},_disposeSingletonObjects:function(bz){qx.util.DisposeUtil.disposeObjects(this,arguments,true);},_disposeArray:function(bA){qx.util.DisposeUtil.disposeArray(this,bA);},_disposeMap:function(bB){qx.util.DisposeUtil.disposeMap(this,bB);}},settings:{"qx.disposerDebugLevel":0},defer:function(bC,bD){{};var bF=navigator.userAgent.indexOf(n)!=-1;var bE=navigator.userAgent.indexOf(c)!=-1;if(bF||bE){bD.__lA=bD.__lB;}},destruct:function(){if(!qx.core.ObjectRegistry.inShutDown){qx.event.Registration.removeAllListeners(this);}else{qx.event.Registration.deleteAllListeners(this);}qx.core.ObjectRegistry.unregister(this);this.__lx=null;var bI=this.constructor;var bM;var bN=qx.core.Property.$$store;var bK=bN.user;var bL=bN.theme;var bG=bN.inherit;var bJ=bN.useinit;var bH=bN.init;while(bI){bM=bI.$$properties;if(bM){for(var name in bM){if(bM[name].dereference){this[bK[name]]=this[bL[name]]=this[bG[name]]=this[bJ[name]]=this[bH[name]]=undefined;}}}bI=bI.superclass;}}});})();(function(){var f="changeSelection",e="qx.event.type.Data",d="tabView",c="apiviewer.TabViewController",b="classLinkClicked",a="itemName";qx.Class.define(c,{extend:qx.core.Object,construct:function(g){qx.core.Object.call(this);apiviewer.TabViewController.instance=this;this._tabView=g.getWidgetById(d);this._tabView.addListener(f,this.__Sm,this);},events:{"classLinkClicked":e,"changeSelection":e},members:{showTabView:function(){this._tabView.show();},onSelectItem:function(h){this.fireDataEvent(b,h);},showItem:function(i){qx.ui.core.queue.Manager.flush();var j=this._tabView.getSelection()[0];j.setUserData(a,i);return j.getChildren()[0].showItem(i);},openPackage:function(k,l){this.__Sj(k,apiviewer.ui.tabview.PackagePage,l);},openClass:function(m,n){this.__Sj(m,apiviewer.ui.tabview.ClassPage,n);},__Sj:function(o,p,q){var r=this._tabView.getSelection()[0];if(q==true||r==null){this.__Sk(p,o);}else{if(r instanceof p){r.setClassNode(o);}else{this.__Sk(p,o);this.__Sl(r);}}},__Sk:function(s,t){var u=new s(t);this._tabView.add(u);this._tabView.setSelection([u]);},__Sl:function(v){this._tabView.remove(v);v.destroy();},__Sm:function(event){var w=event.getOldData();var x=event.getData();this.fireDataEvent(f,x,w);},__Sn:function(y,z){var A=new qx.event.type.Mouse();A.init(y,z,null,true,true);A.stop();return A;}},destruct:function(){this._tabView.destroy();this._tabView=null;}});})();(function(){var a="qx.event.type.Event";qx.Class.define(a,{extend:qx.core.Object,statics:{CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3},members:{init:function(b,c){{};this._type=null;this._target=null;this._currentTarget=null;this._relatedTarget=null;this._originalTarget=null;this._stopPropagation=false;this._preventDefault=false;this._bubbles=!!b;this._cancelable=!!c;this._timeStamp=(new Date()).getTime();this._eventPhase=null;return this;},clone:function(d){if(d){var e=d;}else{var e=qx.event.Pool.getInstance().getObject(this.constructor);}e._type=this._type;e._target=this._target;e._currentTarget=this._currentTarget;e._relatedTarget=this._relatedTarget;e._originalTarget=this._originalTarget;e._stopPropagation=this._stopPropagation;e._bubbles=this._bubbles;e._preventDefault=this._preventDefault;e._cancelable=this._cancelable;return e;},stop:function(){if(this._bubbles){this.stopPropagation();}if(this._cancelable){this.preventDefault();}},stopPropagation:function(){{};this._stopPropagation=true;},getPropagationStopped:function(){return !!this._stopPropagation;},preventDefault:function(){{};this._preventDefault=true;},getDefaultPrevented:function(){return !!this._preventDefault;},getType:function(){return this._type;},setType:function(f){this._type=f;},getEventPhase:function(){return this._eventPhase;},setEventPhase:function(g){this._eventPhase=g;},getTimeStamp:function(){return this._timeStamp;},getTarget:function(){return this._target;},setTarget:function(h){this._target=h;},getCurrentTarget:function(){return this._currentTarget||this._target;},setCurrentTarget:function(i){this._currentTarget=i;},getRelatedTarget:function(){return this._relatedTarget;},setRelatedTarget:function(j){this._relatedTarget=j;},getOriginalTarget:function(){return this._originalTarget;},setOriginalTarget:function(k){this._originalTarget=k;},getBubbles:function(){return this._bubbles;},setBubbles:function(l){this._bubbles=l;},isCancelable:function(){return this._cancelable;},setCancelable:function(m){this._cancelable=m;}},destruct:function(){this._target=this._currentTarget=this._relatedTarget=this._originalTarget=null;}});})();(function(){var a="qx.event.type.Data";qx.Class.define(a,{extend:qx.event.type.Event,members:{__jO:null,__jP:null,init:function(b,c,d){qx.event.type.Event.prototype.init.call(this,false,d);this.__jO=b;this.__jP=c;return this;},clone:function(e){var f=qx.event.type.Event.prototype.clone.call(this,e);f.__jO=this.__jO;f.__jP=this.__jP;return f;},getData:function(){return this.__jO;},getOldData:function(){return this.__jP;}},destruct:function(){this.__jO=this.__jP=null;}});})();(function(){var c="qx.globalErrorHandling",b="on",a="qx.event.GlobalError";qx.Bootstrap.define(a,{statics:{setErrorHandler:function(d,f){this.__kx=d||null;this.__ky=f||window;if(qx.core.Setting.get(c)===b){if(d&&window.onerror){var g=qx.Bootstrap.bind(this.__kA,this);if(this.__kz==null){this.__kz=window.onerror;}var self=this;window.onerror=function(e){self.__kz(e);g(e);};}if(d&&!window.onerror){window.onerror=qx.Bootstrap.bind(this.__kA,this);}if(this.__kx==null){if(this.__kz!=null){window.onerror=this.__kz;this.__kz=null;}else{window.onerror=null;}}}},__kA:function(h,i,j){if(this.__kx){this.handleError(new qx.core.WindowError(h,i,j));return true;}},observeMethod:function(k){if(qx.core.Setting.get(c)===b){var self=this;return function(){if(!self.__kx){return k.apply(this,arguments);}try{return k.apply(this,arguments);}catch(l){self.handleError(new qx.core.GlobalError(l,arguments));}};}else{return k;}},handleError:function(m){if(this.__kx){this.__kx.call(this.__ky,m);}}},defer:function(n){qx.core.Setting.define(c,b);n.setErrorHandler(null,null);}});})();(function(){var b="",a="qx.core.WindowError";qx.Bootstrap.define(a,{extend:Error,construct:function(c,d,e){Error.call(this,c);this.__cW=c;this.__cX=d||b;this.__cY=e===undefined?-1:e;},members:{__cW:null,__cX:null,__cY:null,toString:function(){return this.__cW;},getUri:function(){return this.__cX;},getLineNumber:function(){return this.__cY;}}});})();(function(){var b="GlobalError: ",a="qx.core.GlobalError";qx.Bootstrap.define(a,{extend:Error,construct:function(c,d){{};this.__kS=b+(c&&c.message?c.message:c);Error.call(this,this.__kS);this.__kT=d;this.__kU=c;},members:{__kU:null,__kT:null,__kS:null,toString:function(){return this.__kS;},getArguments:function(){return this.__kT;},getSourceException:function(){return this.__kU;}},destruct:function(){this.__kU=null;this.__kT=null;this.__kS=null;}});})();(function(){var a="qx.event.IEventHandler";qx.Interface.define(a,{statics:{TARGET_DOMNODE:1,TARGET_WINDOW:2,TARGET_OBJECT:4,TARGET_DOCUMENT:8},members:{canHandleEvent:function(b,c){},registerEvent:function(d,e,f){},unregisterEvent:function(g,h,i){}}});})();(function(){var c="qx.event.type.Data",b="qx.event.type.Event",a="qx.data.IListData";qx.Interface.define(a,{events:{"change":c,"changeLength":b},members:{getItem:function(d){},setItem:function(e,f){},splice:function(g,h,i){},contains:function(j){},getLength:function(){},toArray:function(){}}});})();(function(){var a="qx.lang.Date";qx.Class.define(a,{statics:{now:function(){return +new Date;}}});})();(function(){var b="qx.util.ObjectPool",a="Integer";qx.Class.define(b,{extend:qx.core.Object,construct:function(c){qx.core.Object.call(this);this.__fH={};if(c!=null){this.setSize(c);}},properties:{size:{check:a,init:Infinity}},members:{__fH:null,getObject:function(d){if(this.$$disposed){return new d;}if(!d){throw new Error("Class needs to be defined!");}var e=null;var f=this.__fH[d.classname];if(f){e=f.pop();}if(e){e.$$pooled=false;}else{e=new d;}return e;},poolObject:function(g){if(!this.__fH){return;}var h=g.classname;var j=this.__fH[h];if(g.$$pooled){throw new Error("Object is already pooled: "+g);}if(!j){this.__fH[h]=j=[];}if(j.length>this.getSize()){if(g.destroy){g.destroy();}else{g.dispose();}return;}g.$$pooled=true;j.push(g);}},destruct:function(){var n=this.__fH;var k,m,i,l;for(k in n){m=n[k];for(i=0,l=m.length;i<l;i++){m[i].dispose();}}delete this.__fH;}});})();(function(){var b="singleton",a="qx.event.Pool";qx.Class.define(a,{extend:qx.util.ObjectPool,type:b,construct:function(){qx.util.ObjectPool.call(this,30);}});})();(function(){var a="qx.util.DisposeUtil";qx.Class.define(a,{statics:{disposeObjects:function(b,c,d){var name;for(var i=0,l=c.length;i<l;i++){name=c[i];if(b[name]==null||!b.hasOwnProperty(name)){continue;}if(!qx.core.ObjectRegistry.inShutDown){if(b[name].dispose){if(!d&&b[name].constructor.$$instance){throw new Error("The object stored in key "+name+" is a singleton! Please use disposeSingleton instead.");}else{b[name].dispose();}}else{throw new Error("Has no disposable object under key: "+name+"!");}}b[name]=null;}},disposeArray:function(e,f){var h=e[f];if(!h){return;}if(qx.core.ObjectRegistry.inShutDown){e[f]=null;return;}try{var g;for(var i=h.length-1;i>=0;i--){g=h[i];if(g){g.dispose();}}}catch(j){throw new Error("The array field: "+f+" of object: "+e+" has non disposable entries: "+j);}h.length=0;e[f]=null;},disposeMap:function(k,m){var o=k[m];if(!o){return;}if(qx.core.ObjectRegistry.inShutDown){k[m]=null;return;}try{var n;for(var p in o){n=o[p];if(o.hasOwnProperty(p)&&n){n.dispose();}}}catch(q){throw new Error("The map field: "+m+" of object: "+k+" has non disposable entries: "+q);}k[m]=null;},disposeTriggeredBy:function(r,s){var t=s.dispose;s.dispose=function(){t.call(s);r.dispose();};}}});})();(function(){var m="get",l="",k="[",h="last",g="change",f="]",d=".",c="Number",b="String",a="set",D="deepBinding",C="item",B="reset",A="' (",z="Boolean",y=") to the object '",x="Integer",w=" of object ",v="qx.data.SingleValueBinding",u="Binding property ",s="Binding from '",t="PositiveNumber",q="PositiveInteger",r="Binding does not exist!",o=").",p="Date",n=" not possible: No event available. ";qx.Class.define(v,{statics:{DEBUG_ON:false,__gl:{},bind:function(E,F,G,H,I){var S=this.__gn(E,F,G,H,I);var N=F.split(d);var K=this.__gt(N);var R=[];var O=[];var P=[];var L=[];var M=E;for(var i=0;i<N.length;i++){if(K[i]!==l){L.push(g);}else{L.push(this.__go(M,N[i]));}R[i]=M;if(i==N.length-1){if(K[i]!==l){var V=K[i]===h?M.length-1:K[i];var J=M.getItem(V);this.__gs(J,G,H,I,E);P[i]=this.__gu(M,L[i],G,H,I,K[i]);}else{if(N[i]!=null&&M[m+qx.lang.String.firstUp(N[i])]!=null){var J=M[m+qx.lang.String.firstUp(N[i])]();this.__gs(J,G,H,I,E);}P[i]=this.__gu(M,L[i],G,H,I);}}else{var T={index:i,propertyNames:N,sources:R,listenerIds:P,arrayIndexValues:K,targetObject:G,targetPropertyChain:H,options:I,listeners:O};var Q=qx.lang.Function.bind(this.__gm,this,T);O.push(Q);P[i]=M.addListener(L[i],Q);}if(M[m+qx.lang.String.firstUp(N[i])]==null){M=null;}else if(K[i]!==l){M=M[m+qx.lang.String.firstUp(N[i])](K[i]);}else{M=M[m+qx.lang.String.firstUp(N[i])]();}if(!M){break;}}var U={type:D,listenerIds:P,sources:R,targetListenerIds:S.listenerIds,targets:S.targets};this.__gv(U,E,F,G,H);return U;},__gm:function(W){if(W.options&&W.options.onUpdate){W.options.onUpdate(W.sources[W.index],W.targetObject);}for(var j=W.index+1;j<W.propertyNames.length;j++){var bb=W.sources[j];W.sources[j]=null;if(!bb){continue;}bb.removeListenerById(W.listenerIds[j]);}var bb=W.sources[W.index];for(var j=W.index+1;j<W.propertyNames.length;j++){if(W.arrayIndexValues[j-1]!==l){bb=bb[m+qx.lang.String.firstUp(W.propertyNames[j-1])](W.arrayIndexValues[j-1]);}else{bb=bb[m+qx.lang.String.firstUp(W.propertyNames[j-1])]();}W.sources[j]=bb;if(!bb){this.__gp(W.targetObject,W.targetPropertyChain);break;}if(j==W.propertyNames.length-1){if(qx.Class.implementsInterface(bb,qx.data.IListData)){var bc=W.arrayIndexValues[j]===h?bb.length-1:W.arrayIndexValues[j];var Y=bb.getItem(bc);this.__gs(Y,W.targetObject,W.targetPropertyChain,W.options,W.sources[W.index]);W.listenerIds[j]=this.__gu(bb,g,W.targetObject,W.targetPropertyChain,W.options,W.arrayIndexValues[j]);}else{if(W.propertyNames[j]!=null&&bb[m+qx.lang.String.firstUp(W.propertyNames[j])]!=null){var Y=bb[m+qx.lang.String.firstUp(W.propertyNames[j])]();this.__gs(Y,W.targetObject,W.targetPropertyChain,W.options,W.sources[W.index]);}var ba=this.__go(bb,W.propertyNames[j]);W.listenerIds[j]=this.__gu(bb,ba,W.targetObject,W.targetPropertyChain,W.options);}}else{if(W.listeners[j]==null){var X=qx.lang.Function.bind(this.__gm,this,W);W.listeners.push(X);}if(qx.Class.implementsInterface(bb,qx.data.IListData)){var ba=g;}else{var ba=this.__go(bb,W.propertyNames[j]);}W.listenerIds[j]=bb.addListener(ba,W.listeners[j]);}}},__gn:function(bd,be,bf,bg,bh){var bl=bg.split(d);var bj=this.__gt(bl);var bq=[];var bp=[];var bn=[];var bm=[];var bk=bf;for(var i=0;i<bl.length-1;i++){if(bj[i]!==l){bm.push(g);}else{try{bm.push(this.__go(bk,bl[i]));}catch(e){break;}}bq[i]=bk;var bo=function(){for(var j=i+1;j<bl.length-1;j++){var bt=bq[j];bq[j]=null;if(!bt){continue;}bt.removeListenerById(bn[j]);}var bt=bq[i];for(var j=i+1;j<bl.length-1;j++){var br=qx.lang.String.firstUp(bl[j-1]);if(bj[j-1]!==l){var bu=bj[j-1]===h?bt.getLength()-1:bj[j-1];bt=bt[m+br](bu);}else{bt=bt[m+br]();}bq[j]=bt;if(bp[j]==null){bp.push(bo);}if(qx.Class.implementsInterface(bt,qx.data.IListData)){var bs=g;}else{try{var bs=qx.data.SingleValueBinding.__go(bt,bl[j]);}catch(e){break;}}bn[j]=bt.addListener(bs,bp[j]);}qx.data.SingleValueBinding.updateTarget(bd,be,bf,bg,bh);};bp.push(bo);bn[i]=bk.addListener(bm[i],bo);var bi=qx.lang.String.firstUp(bl[i]);if(bk[m+bi]==null){bk=null;}else if(bj[i]!==l){bk=bk[m+bi](bj[i]);}else{bk=bk[m+bi]();}if(!bk){break;}}return {listenerIds:bn,targets:bq};},updateTarget:function(bv,bw,bx,by,bz){var bD=this.__gr(bv,bw);if(bD!=null){var bF=bw.substring(bw.lastIndexOf(d)+1,bw.length);if(bF.charAt(bF.length-1)==f){var bA=bF.substring(bF.lastIndexOf(k)+1,bF.length-1);var bC=bF.substring(0,bF.lastIndexOf(k));var bE=bD[m+qx.lang.String.firstUp(bC)]();if(bA==h){bA=bE.length-1;}if(bE!=null){var bB=bE.getItem(bA);}}else{var bB=bD[m+qx.lang.String.firstUp(bF)]();}}bB=qx.data.SingleValueBinding.__gw(bB,bx,by,bz);this.__gq(bx,by,bB);},__go:function(bG,bH){var bI=this.__gx(bG,bH);if(bI==null){if(qx.Class.supportsEvent(bG.constructor,bH)){bI=bH;}else if(qx.Class.supportsEvent(bG.constructor,g+qx.lang.String.firstUp(bH))){bI=g+qx.lang.String.firstUp(bH);}else{throw new qx.core.AssertionError(u+bH+w+bG+n);}}return bI;},__gp:function(bJ,bK){var bL=this.__gr(bJ,bK);if(bL!=null){var bM=bK.substring(bK.lastIndexOf(d)+1,bK.length);if(bM.charAt(bM.length-1)==f){this.__gq(bJ,bK,null);return;}if(bL[B+qx.lang.String.firstUp(bM)]!=undefined){bL[B+qx.lang.String.firstUp(bM)]();}else{bL[a+qx.lang.String.firstUp(bM)](null);}}},__gq:function(bN,bO,bP){var bT=this.__gr(bN,bO);if(bT!=null){var bU=bO.substring(bO.lastIndexOf(d)+1,bO.length);if(bU.charAt(bU.length-1)==f){var bQ=bU.substring(bU.lastIndexOf(k)+1,bU.length-1);var bS=bU.substring(0,bU.lastIndexOf(k));var bR=bT[m+qx.lang.String.firstUp(bS)]();if(bQ==h){bQ=bR.length-1;}if(bR!=null){bR.setItem(bQ,bP);}}else{bT[a+qx.lang.String.firstUp(bU)](bP);}}},__gr:function(bV,bW){var ca=bW.split(d);var cb=bV;for(var i=0;i<ca.length-1;i++){try{var bY=ca[i];if(bY.indexOf(f)==bY.length-1){var bX=bY.substring(bY.indexOf(k)+1,bY.length-1);bY=bY.substring(0,bY.indexOf(k));}cb=cb[m+qx.lang.String.firstUp(bY)]();if(bX!=null){if(bX==h){bX=cb.length-1;}cb=cb.getItem(bX);bX=null;}}catch(cc){return null;}}return cb;},__gs:function(cd,ce,cf,cg,ch){cd=this.__gw(cd,ce,cf,cg);if(cd===undefined){this.__gp(ce,cf);}if(cd!==undefined){try{this.__gq(ce,cf,cd);if(cg&&cg.onUpdate){cg.onUpdate(ch,ce,cd);}}catch(e){if(!(e instanceof qx.core.ValidationError)){throw e;}if(cg&&cg.onSetFail){cg.onSetFail(e);}else{qx.log.Logger.warn("Failed so set value "+cd+" on "+ce+". Error message: "+e);}}}},__gt:function(ci){var cj=[];for(var i=0;i<ci.length;i++){var name=ci[i];if(qx.lang.String.endsWith(name,f)){var ck=name.substring(name.indexOf(k)+1,name.indexOf(f));if(name.indexOf(f)!=name.length-1){throw new Error("Please use only one array at a time: "+name+" does not work.");}if(ck!==h){if(ck==l||isNaN(parseInt(ck,10))){throw new Error("No number or 'last' value hast been given"+" in a array binding: "+name+" does not work.");}}if(name.indexOf(k)!=0){ci[i]=name.substring(0,name.indexOf(k));cj[i]=l;cj[i+1]=ck;ci.splice(i+1,0,C);i++;}else{cj[i]=ck;ci.splice(i,1,C);}}else{cj[i]=l;}}return cj;},__gu:function(cl,cm,cn,co,cp,cq){var cr;{};var ct=function(cu,e){if(cu!==l){if(cu===h){cu=cl.length-1;}var cx=cl.getItem(cu);if(cx===undefined){qx.data.SingleValueBinding.__gp(cn,co);}var cv=e.getData().start;var cw=e.getData().end;if(cu<cv||cu>cw){return;}}else{var cx=e.getData();}if(qx.data.SingleValueBinding.DEBUG_ON){qx.log.Logger.debug("Binding executed from "+cl+" by "+cm+" to "+cn+" ("+co+")");qx.log.Logger.debug("Data before conversion: "+cx);}cx=qx.data.SingleValueBinding.__gw(cx,cn,co,cp);if(qx.data.SingleValueBinding.DEBUG_ON){qx.log.Logger.debug("Data after conversion: "+cx);}try{if(cx!==undefined){qx.data.SingleValueBinding.__gq(cn,co,cx);}else{qx.data.SingleValueBinding.__gp(cn,co);}if(cp&&cp.onUpdate){cp.onUpdate(cl,cn,cx);}}catch(e){if(!(e instanceof qx.core.ValidationError)){throw e;}if(cp&&cp.onSetFail){cp.onSetFail(e);}else{qx.log.Logger.warn("Failed so set value "+cx+" on "+cn+". Error message: "+e);}}};if(!cq){cq=l;}ct=qx.lang.Function.bind(ct,cl,cq);var cs=cl.addListener(cm,ct);return cs;},__gv:function(cy,cz,cA,cB,cC){if(this.__gl[cz.toHashCode()]===undefined){this.__gl[cz.toHashCode()]=[];}this.__gl[cz.toHashCode()].push([cy,cz,cA,cB,cC]);},__gw:function(cD,cE,cF,cG){if(cG&&cG.converter){var cI;if(cE.getModel){cI=cE.getModel();}return cG.converter(cD,cI);}else{var cK=this.__gr(cE,cF);var cL=cF.substring(cF.lastIndexOf(d)+1,cF.length);if(cK==null){return cD;}var cJ=qx.Class.getPropertyDefinition(cK.constructor,cL);var cH=cJ==null?l:cJ.check;return this.__gy(cD,cH);}},__gx:function(cM,cN){var cO=qx.Class.getPropertyDefinition(cM.constructor,cN);if(cO==null){return null;}return cO.event;},__gy:function(cP,cQ){var cR=qx.lang.Type.getClass(cP);if((cR==c||cR==b)&&(cQ==x||cQ==q)){cP=parseInt(cP,10);}if((cR==z||cR==c||cR==p)&&cQ==b){cP=cP+l;}if((cR==c||cR==b)&&(cQ==c||cQ==t)){cP=parseFloat(cP);}return cP;},removeBindingFromObject:function(cS,cT){if(cT.type==D){for(var i=0;i<cT.sources.length;i++){if(cT.sources[i]){cT.sources[i].removeListenerById(cT.listenerIds[i]);}}for(var i=0;i<cT.targets.length;i++){if(cT.targets[i]){cT.targets[i].removeListenerById(cT.targetListenerIds[i]);}}}else{cS.removeListenerById(cT);}var cU=this.__gl[cS.toHashCode()];if(cU!=undefined){for(var i=0;i<cU.length;i++){if(cU[i][0]==cT){qx.lang.Array.remove(cU,cU[i]);return;}}}throw new Error("Binding could not be found!");},removeAllBindingsForObject:function(cV){{};var cW=this.__gl[cV.toHashCode()];if(cW!=undefined){for(var i=cW.length-1;i>=0;i--){this.removeBindingFromObject(cV,cW[i][0]);}}},getAllBindingsForObject:function(cX){if(this.__gl[cX.toHashCode()]===undefined){this.__gl[cX.toHashCode()]=[];}return this.__gl[cX.toHashCode()];},removeAllBindings:function(){for(var da in this.__gl){var cY=qx.core.ObjectRegistry.fromHashCode(da);if(cY==null){delete this.__gl[da];continue;}this.removeAllBindingsForObject(cY);}this.__gl={};},getAllBindings:function(){return this.__gl;},showBindingInLog:function(db,dc){var de;for(var i=0;i<this.__gl[db.toHashCode()].length;i++){if(this.__gl[db.toHashCode()][i][0]==dc){de=this.__gl[db.toHashCode()][i];break;}}if(de===undefined){var dd=r;}else{var dd=s+de[1]+A+de[2]+y+de[3]+A+de[4]+o;}qx.log.Logger.debug(dd);},showAllBindingsInLog:function(){for(var dg in this.__gl){var df=qx.core.ObjectRegistry.fromHashCode(dg);for(var i=0;i<this.__gl[dg].length;i++){this.showBindingInLog(df,this.__gl[dg][i][0]);}}}}});})();(function(){var c=": ",b="qx.type.BaseError",a="";qx.Class.define(b,{extend:Error,construct:function(d,e){Error.call(this,e);this.__cL=d||a;this.message=e||qx.type.BaseError.DEFAULTMESSAGE;},statics:{DEFAULTMESSAGE:"error"},members:{__cL:null,message:null,getComment:function(){return this.__cL;},toString:function(){return this.__cL+c+this.message;}}});})();(function(){var a="qx.core.AssertionError";qx.Class.define(a,{extend:qx.type.BaseError,construct:function(b,c){qx.type.BaseError.call(this,b,c);this.__lC=qx.dev.StackTrace.getStackTrace();},members:{__lC:null,getStackTrace:function(){return this.__lC;}}});})();(function(){var a="qx.core.ValidationError";qx.Class.define(a,{extend:qx.type.BaseError});})();(function(){var f="qx.lang.Type",e="Error",d="RegExp",c="Date",b="Number",a="Boolean";qx.Class.define(f,{statics:{getClass:qx.Bootstrap.getClass,isString:qx.Bootstrap.isString,isArray:qx.Bootstrap.isArray,isObject:qx.Bootstrap.isObject,isFunction:qx.Bootstrap.isFunction,isRegExp:function(g){return this.getClass(g)==d;},isNumber:function(h){return (h!==null&&(this.getClass(h)==b||h instanceof Number));},isBoolean:function(i){return (i!==null&&(this.getClass(i)==a||i instanceof Boolean));},isDate:function(j){return (j!==null&&(this.getClass(j)==c||j instanceof Date));},isError:function(k){return (k!==null&&(this.getClass(k)==e||k instanceof Error));}}});})();(function(){var a="qx.event.IEventDispatcher";qx.Interface.define(a,{members:{canDispatchEvent:function(b,event,c){this.assertInstance(event,qx.event.type.Event);this.assertString(c);},dispatchEvent:function(d,event,e){this.assertInstance(event,qx.event.type.Event);this.assertString(e);}}});})();(function(){var a="qx.event.dispatch.Direct";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventDispatcher,construct:function(b){this._manager=b;},statics:{PRIORITY:qx.event.Registration.PRIORITY_LAST},members:{canDispatchEvent:function(c,event,d){return !event.getBubbles();},dispatchEvent:function(e,event,f){var j,g;{};event.setEventPhase(qx.event.type.Event.AT_TARGET);var k=this._manager.getListeners(e,f,false);if(k){for(var i=0,l=k.length;i<l;i++){var h=k[i].context||e;k[i].handler.call(h,event);}}}},defer:function(m){qx.event.Registration.addDispatcher(m);}});})();(function(){var a="qx.event.handler.Object";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,statics:{PRIORITY:qx.event.Registration.PRIORITY_LAST,SUPPORTED_TYPES:null,TARGET_CHECK:qx.event.IEventHandler.TARGET_OBJECT,IGNORE_CAN_HANDLE:false},members:{canHandleEvent:function(b,c){return qx.Class.supportsEvent(b.constructor,c);},registerEvent:function(d,e,f){},unregisterEvent:function(g,h,i){}},defer:function(j){qx.event.Registration.addHandler(j);}});})();(function(){var k="indexOf",j="lastIndexOf",h="slice",g="concat",f="join",e="toLocaleUpperCase",d="shift",c="substr",b="filter",a="unshift",I="match",H="quote",G="qx.lang.Generics",F="localeCompare",E="sort",D="some",C="charAt",B="split",A="substring",z="pop",t="toUpperCase",u="replace",q="push",r="charCodeAt",o="every",p="reverse",m="search",n="forEach",v="map",w="toLowerCase",y="splice",x="toLocaleLowerCase";qx.Class.define(G,{statics:{__eY:{"Array":[f,p,E,q,z,d,a,y,g,h,k,j,n,v,b,D,o],"String":[H,A,w,t,C,r,k,j,x,e,F,I,m,u,B,c,g,h]},__fa:function(J,K){return function(s){return J.prototype[K].apply(s,Array.prototype.slice.call(arguments,1));};},__fb:function(){var L=qx.lang.Generics.__eY;for(var P in L){var N=window[P];var M=L[P];for(var i=0,l=M.length;i<l;i++){var O=M[i];if(!N[O]){N[O]=qx.lang.Generics.__fa(N,O);}}}}},defer:function(Q){Q.__fb();}});})();(function(){var b="qx.util.DeferredCallManager",a="singleton";qx.Class.define(b,{extend:qx.core.Object,type:a,construct:function(){this.__gf={};this.__gg=qx.lang.Function.bind(this.__gk,this);this.__gh=false;},members:{__gi:null,__gj:null,__gf:null,__gh:null,__gg:null,schedule:function(c){if(this.__gi==null){this.__gi=window.setTimeout(this.__gg,0);}var d=c.toHashCode();if(this.__gj&&this.__gj[d]){return;}this.__gf[d]=c;this.__gh=true;},cancel:function(e){var f=e.toHashCode();if(this.__gj&&this.__gj[f]){this.__gj[f]=null;return;}delete this.__gf[f];if(qx.lang.Object.isEmpty(this.__gf)&&this.__gi!=null){window.clearTimeout(this.__gi);this.__gi=null;}},__gk:qx.event.GlobalError.observeMethod(function(){this.__gi=null;while(this.__gh){this.__gj=qx.lang.Object.clone(this.__gf);this.__gf={};this.__gh=false;for(var h in this.__gj){var g=this.__gj[h];if(g){this.__gj[h]=null;g.call();}}}this.__gj=null;})},destruct:function(){if(this.__gi!=null){window.clearTimeout(this.__gi);}this.__gg=this.__gf=null;}});})();(function(){var a="qx.util.DeferredCall";qx.Class.define(a,{extend:qx.core.Object,construct:function(b,c){qx.core.Object.call(this);this.__ia=b;this.__ib=c||null;this.__ic=qx.util.DeferredCallManager.getInstance();},members:{__ia:null,__ib:null,__ic:null,cancel:function(){this.__ic.cancel(this);},schedule:function(){this.__ic.schedule(this);},call:function(){this.__ib?this.__ia.apply(this.__ib):this.__ia();}},destruct:function(d,e){this.cancel();this.__ib=this.__ia=this.__ic=null;}});})();(function(){var m="element",k="qx.client",j="qxSelectable",h="off",g="on",f="text",d="div",c="",b="mshtml",a="none",F="scroll",E="qx.html.Element",D="|capture|",C="activate",B="__dz",A="blur",z="deactivate",w="capture",v="userSelect",u="-moz-none",s="visible",t="releaseCapture",q="|bubble|",r="tabIndex",o="focus",p="MozUserSelect",n="hidden";qx.Class.define(E,{extend:qx.core.Object,construct:function(G,H,I){qx.core.Object.call(this);this.__dd=G||d;this.__de=H||null;this.__df=I||null;},statics:{DEBUG:false,_modified:{},_visibility:{},_scroll:{},_actions:[],__dg:{},_scheduleFlush:function(J){qx.html.Element.__dK.schedule();},flush:function(){var U;{};var M=this.__dh();var L=M.getFocus();if(L&&this.__dl(L)){M.blur(L);}var bc=M.getActive();if(bc&&this.__dl(bc)){qx.bom.Element.deactivate(bc);}var P=this.__dj();if(P&&this.__dl(P)){qx.bom.Element.releaseCapture(P);}var V=[];var W=this._modified;for(var T in W){U=W[T];if(U.__dD()){if(U.__dm&&qx.dom.Hierarchy.isRendered(U.__dm)){V.push(U);}else{{};U.__dC();}delete W[T];}}for(var i=0,l=V.length;i<l;i++){U=V[i];{};U.__dC();}var R=this._visibility;for(var T in R){U=R[T];var X=U.__dm;if(!X){delete R[T];continue;}{};if(!U.$$disposed){X.style.display=U.__dp?c:a;if(qx.core.Variant.isSet(k,b)){if(!(document.documentMode>=8)){X.style.visibility=U.__dp?s:n;}}}delete R[T];}var scroll=this._scroll;for(var T in scroll){U=scroll[T];var bd=U.__dm;if(bd&&bd.offsetWidth){var O=true;if(U.__ds!=null){U.__dm.scrollLeft=U.__ds;delete U.__ds;}if(U.__dt!=null){U.__dm.scrollTop=U.__dt;delete U.__dt;}var Y=U.__dq;if(Y!=null){var S=Y.element.getDomElement();if(S&&S.offsetWidth){qx.bom.element.Scroll.intoViewX(S,bd,Y.align);delete U.__dq;}else{O=false;}}var ba=U.__dr;if(ba!=null){var S=ba.element.getDomElement();if(S&&S.offsetWidth){qx.bom.element.Scroll.intoViewY(S,bd,ba.align);delete U.__dr;}else{O=false;}}if(O){delete scroll[T];}}}var N={"releaseCapture":1,"blur":1,"deactivate":1};for(var i=0;i<this._actions.length;i++){var bb=this._actions[i];var X=bb.element.__dm;if(!X||!N[bb.type]&&!bb.element.__dD()){continue;}var Q=bb.args;Q.unshift(X);qx.bom.Element[bb.type].apply(qx.bom.Element,Q);}this._actions=[];for(var T in this.__dg){var K=this.__dg[T];var bd=K.element.__dm;if(bd){qx.bom.Selection.set(bd,K.start,K.end);delete this.__dg[T];}}qx.event.handler.Appear.refresh();},__dh:function(){if(!this.__di){var be=qx.event.Registration.getManager(window);this.__di=be.getHandler(qx.event.handler.Focus);}return this.__di;},__dj:function(){if(!this.__dk){var bf=qx.event.Registration.getManager(window);this.__dk=bf.getDispatcher(qx.event.dispatch.MouseCapture);}return this.__dk.getCaptureElement();},__dl:function(bg){var bh=qx.core.ObjectRegistry.fromHashCode(bg.$$element);return bh&&!bh.__dD();}},members:{__dd:null,__dm:null,__dn:false,__do:true,__dp:true,__dq:null,__dr:null,__ds:null,__dt:null,__du:null,__dv:null,__dw:null,__de:null,__df:null,__dx:null,__dy:null,__dz:null,__dA:null,__dB:null,_scheduleChildrenUpdate:function(){if(this.__dA){return;}this.__dA=true;qx.html.Element._modified[this.$$hash]=this;qx.html.Element._scheduleFlush(m);},_createDomElement:function(){return qx.bom.Element.create(this.__dd);},__dC:function(){{};var length;var bi=this.__dz;if(bi){length=bi.length;var bj;for(var i=0;i<length;i++){bj=bi[i];if(bj.__dp&&bj.__do&&!bj.__dm){bj.__dC();}}}if(!this.__dm){this.__dm=this._createDomElement();this.__dm.$$element=this.$$hash;this._copyData(false);if(bi&&length>0){this._insertChildren();}}else{this._syncData();if(this.__dA){this._syncChildren();}}delete this.__dA;},_insertChildren:function(){var bk=this.__dz;var length=bk.length;var bm;if(length>2){var bl=document.createDocumentFragment();for(var i=0;i<length;i++){bm=bk[i];if(bm.__dm&&bm.__do){bl.appendChild(bm.__dm);}}this.__dm.appendChild(bl);}else{var bl=this.__dm;for(var i=0;i<length;i++){bm=bk[i];if(bm.__dm&&bm.__do){bl.appendChild(bm.__dm);}}}},_syncChildren:function(){var br;var bw=qx.core.ObjectRegistry;var bn=this.__dz;var bu=bn.length;var bo;var bs;var bq=this.__dm;var bt=bq.childNodes;var bp=0;var bv;{};for(var i=bt.length-1;i>=0;i--){bv=bt[i];bs=bw.fromHashCode(bv.$$element);if(!bs||!bs.__do||bs.__dB!==this){bq.removeChild(bv);{};}}for(var i=0;i<bu;i++){bo=bn[i];if(bo.__do){bs=bo.__dm;bv=bt[bp];if(!bs){continue;}if(bs!=bv){if(bv){bq.insertBefore(bs,bv);}else{bq.appendChild(bs);}{};}bp++;}}{};},_copyData:function(bx){var bB=this.__dm;var bA=this.__df;if(bA){var by=qx.bom.element.Attribute;for(var bC in bA){by.set(bB,bC,bA[bC]);}}var bA=this.__de;if(bA){var bz=qx.bom.element.Style;if(bx){bz.setStyles(bB,bA);}else{bz.setCss(bB,bz.compile(bA));}}var bA=this.__dx;if(bA){for(var bC in bA){this._applyProperty(bC,bA[bC]);}}var bA=this.__dy;if(bA){qx.event.Registration.getManager(bB).importListeners(bB,bA);delete this.__dy;}},_syncData:function(){var bH=this.__dm;var bG=qx.bom.element.Attribute;var bE=qx.bom.element.Style;var bF=this.__dv;if(bF){var bK=this.__df;if(bK){var bI;for(var bJ in bF){bI=bK[bJ];if(bI!==undefined){bG.set(bH,bJ,bI);}else{bG.reset(bH,bJ);}}}this.__dv=null;}var bF=this.__du;if(bF){var bK=this.__de;if(bK){var bD={};for(var bJ in bF){bD[bJ]=bK[bJ];}bE.setStyles(bH,bD);}this.__du=null;}var bF=this.__dw;if(bF){var bK=this.__dx;if(bK){var bI;for(var bJ in bF){this._applyProperty(bJ,bK[bJ]);}}this.__dw=null;}},__dD:function(){var bL=this;while(bL){if(bL.__dn){return true;}if(!bL.__do||!bL.__dp){return false;}bL=bL.__dB;}return false;},__dE:function(bM){if(bM.__dB===this){throw new Error("Child is already in: "+bM);}if(bM.__dn){throw new Error("Root elements could not be inserted into other ones.");}if(bM.__dB){bM.__dB.remove(bM);}bM.__dB=this;if(!this.__dz){this.__dz=[];}if(this.__dm){this._scheduleChildrenUpdate();}},__dF:function(bN){if(bN.__dB!==this){throw new Error("Has no child: "+bN);}if(this.__dm){this._scheduleChildrenUpdate();}delete bN.__dB;},__dG:function(bO){if(bO.__dB!==this){throw new Error("Has no child: "+bO);}if(this.__dm){this._scheduleChildrenUpdate();}},getChildren:function(){return this.__dz||null;},getChild:function(bP){var bQ=this.__dz;return bQ&&bQ[bP]||null;},hasChildren:function(){var bR=this.__dz;return bR&&bR[0]!==undefined;},indexOf:function(bS){var bT=this.__dz;return bT?bT.indexOf(bS):-1;},hasChild:function(bU){var bV=this.__dz;return bV&&bV.indexOf(bU)!==-1;},add:function(bW){if(arguments[1]){for(var i=0,l=arguments.length;i<l;i++){this.__dE(arguments[i]);}this.__dz.push.apply(this.__dz,arguments);}else{this.__dE(bW);this.__dz.push(bW);}return this;},addAt:function(bX,bY){this.__dE(bX);qx.lang.Array.insertAt(this.__dz,bX,bY);return this;},remove:function(ca){var cb=this.__dz;if(!cb){return;}if(arguments[1]){var cc;for(var i=0,l=arguments.length;i<l;i++){cc=arguments[i];this.__dF(cc);qx.lang.Array.remove(cb,cc);}}else{this.__dF(ca);qx.lang.Array.remove(cb,ca);}return this;},removeAt:function(cd){var ce=this.__dz;if(!ce){throw new Error("Has no children!");}var cf=ce[cd];if(!cf){throw new Error("Has no child at this position!");}this.__dF(cf);qx.lang.Array.removeAt(this.__dz,cd);return this;},removeAll:function(){var cg=this.__dz;if(cg){for(var i=0,l=cg.length;i<l;i++){this.__dF(cg[i]);}cg.length=0;}return this;},getParent:function(){return this.__dB||null;},insertInto:function(parent,ch){parent.__dE(this);if(ch==null){parent.__dz.push(this);}else{qx.lang.Array.insertAt(this.__dz,this,ch);}return this;},insertBefore:function(ci){var parent=ci.__dB;parent.__dE(this);qx.lang.Array.insertBefore(parent.__dz,this,ci);return this;},insertAfter:function(cj){var parent=cj.__dB;parent.__dE(this);qx.lang.Array.insertAfter(parent.__dz,this,cj);return this;},moveTo:function(ck){var parent=this.__dB;parent.__dG(this);var cl=parent.__dz.indexOf(this);if(cl===ck){throw new Error("Could not move to same index!");}else if(cl<ck){ck--;}qx.lang.Array.removeAt(parent.__dz,cl);qx.lang.Array.insertAt(parent.__dz,this,ck);return this;},moveBefore:function(cm){var parent=this.__dB;return this.moveTo(parent.__dz.indexOf(cm));},moveAfter:function(cn){var parent=this.__dB;return this.moveTo(parent.__dz.indexOf(cn)+1);},free:function(){var parent=this.__dB;if(!parent){throw new Error("Has no parent to remove from.");}if(!parent.__dz){return;}parent.__dF(this);qx.lang.Array.remove(parent.__dz,this);return this;},getDomElement:function(){return this.__dm||null;},getNodeName:function(){return this.__dd;},setNodeName:function(name){this.__dd=name;},setRoot:function(co){this.__dn=co;},useMarkup:function(cp){if(this.__dm){throw new Error("Could not overwrite existing element!");}if(qx.core.Variant.isSet(k,b)){var cq=document.createElement(d);}else{var cq=qx.bom.Element.getHelperElement();}cq.innerHTML=cp;this.useElement(cq.firstChild);return this.__dm;},useElement:function(cr){if(this.__dm){throw new Error("Could not overwrite existing element!");}this.__dm=cr;this.__dm.$$element=this.$$hash;this._copyData(true);},isFocusable:function(){var ct=this.getAttribute(r);if(ct>=1){return true;}var cs=qx.event.handler.Focus.FOCUSABLE_ELEMENTS;if(ct>=0&&cs[this.__dd]){return true;}return false;},setSelectable:qx.core.Variant.select(k,{"webkit":function(cu){this.setAttribute(j,cu?g:h);this.setStyle(v,cu?f:a);},"gecko":function(cv){this.setAttribute(j,cv?g:h);this.setStyle(p,cv?f:u);},"default":function(cw){this.setAttribute(j,cw?g:h);}}),isNativelyFocusable:function(){return !!qx.event.handler.Focus.FOCUSABLE_ELEMENTS[this.__dd];},include:function(){if(this.__do){return;}delete this.__do;if(this.__dB){this.__dB._scheduleChildrenUpdate();}return this;},exclude:function(){if(!this.__do){return;}this.__do=false;if(this.__dB){this.__dB._scheduleChildrenUpdate();}return this;},isIncluded:function(){return this.__do===true;},show:function(){if(this.__dp){return;}if(this.__dm){qx.html.Element._visibility[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}if(this.__dB){this.__dB._scheduleChildrenUpdate();}delete this.__dp;},hide:function(){if(!this.__dp){return;}if(this.__dm){qx.html.Element._visibility[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}this.__dp=false;},isVisible:function(){return this.__dp===true;},scrollChildIntoViewX:function(cx,cy,cz){var cA=this.__dm;var cB=cx.getDomElement();if(cz!==false&&cA&&cA.offsetWidth&&cB&&cB.offsetWidth){qx.bom.element.Scroll.intoViewX(cB,cA,cy);}else{this.__dq={element:cx,align:cy};qx.html.Element._scroll[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}delete this.__ds;},scrollChildIntoViewY:function(cC,cD,cE){var cF=this.__dm;var cG=cC.getDomElement();if(cE!==false&&cF&&cF.offsetWidth&&cG&&cG.offsetWidth){qx.bom.element.Scroll.intoViewY(cG,cF,cD);}else{this.__dr={element:cC,align:cD};qx.html.Element._scroll[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}delete this.__dt;},scrollToX:function(x,cH){var cI=this.__dm;if(cH!==true&&cI&&cI.offsetWidth){cI.scrollLeft=x;}else{this.__ds=x;qx.html.Element._scroll[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}delete this.__dq;},getScrollX:function(){var cJ=this.__dm;if(cJ){return cJ.scrollLeft;}return this.__ds||0;},scrollToY:function(y,cK){var cL=this.__dm;if(cK!==true&&cL&&cL.offsetWidth){cL.scrollTop=y;}else{this.__dt=y;qx.html.Element._scroll[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}delete this.__dr;},getScrollY:function(){var cM=this.__dm;if(cM){return cM.scrollTop;}return this.__dt||0;},disableScrolling:function(){this.enableScrolling();this.scrollToX(0);this.scrollToY(0);this.addListener(F,this.__dI,this);},enableScrolling:function(){this.removeListener(F,this.__dI,this);},__dH:null,__dI:function(e){if(!this.__dH){this.__dH=true;this.__dm.scrollTop=0;this.__dm.scrollLeft=0;delete this.__dH;}},getTextSelection:function(){var cN=this.__dm;if(cN){return qx.bom.Selection.get(cN);}return null;},getTextSelectionLength:function(){var cO=this.__dm;if(cO){return qx.bom.Selection.getLength(cO);}return null;},getTextSelectionStart:function(){var cP=this.__dm;if(cP){return qx.bom.Selection.getStart(cP);}return null;},getTextSelectionEnd:function(){var cQ=this.__dm;if(cQ){return qx.bom.Selection.getEnd(cQ);}return null;},setTextSelection:function(cR,cS){var cT=this.__dm;if(cT){qx.bom.Selection.set(cT,cR,cS);return;}qx.html.Element.__dg[this.toHashCode()]={element:this,start:cR,end:cS};qx.html.Element._scheduleFlush(m);},clearTextSelection:function(){var cU=this.__dm;if(cU){qx.bom.Selection.clear(cU);}delete qx.html.Element.__dg[this.toHashCode()];},__dJ:function(cV,cW){var cX=qx.html.Element._actions;cX.push({type:cV,element:this,args:cW||[]});qx.html.Element._scheduleFlush(m);},focus:function(){this.__dJ(o);},blur:function(){this.__dJ(A);},activate:function(){this.__dJ(C);},deactivate:function(){this.__dJ(z);},capture:function(cY){this.__dJ(w,[cY!==false]);},releaseCapture:function(){this.__dJ(t);},setStyle:function(da,dc,dd){if(!this.__de){this.__de={};}if(this.__de[da]==dc){return;}if(dc==null){delete this.__de[da];}else{this.__de[da]=dc;}if(this.__dm){if(dd){qx.bom.element.Style.set(this.__dm,da,dc);return this;}if(!this.__du){this.__du={};}this.__du[da]=true;qx.html.Element._modified[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}return this;},setStyles:function(de,df){var dg=qx.bom.element.Style;if(!this.__de){this.__de={};}if(this.__dm){if(!this.__du){this.__du={};}for(var di in de){var dh=de[di];if(this.__de[di]==dh){continue;}if(dh==null){delete this.__de[di];}else{this.__de[di]=dh;}if(df){dg.set(this.__dm,di,dh);continue;}this.__du[di]=true;}qx.html.Element._modified[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}else{for(var di in de){var dh=de[di];if(this.__de[di]==dh){continue;}if(dh==null){delete this.__de[di];}else{this.__de[di]=dh;}}}return this;},removeStyle:function(dj,dk){this.setStyle(dj,null,dk);},getStyle:function(dl){return this.__de?this.__de[dl]:null;},getAllStyles:function(){return this.__de||null;},setAttribute:function(dm,dn,dp){if(!this.__df){this.__df={};}if(this.__df[dm]==dn){return;}if(dn==null){delete this.__df[dm];}else{this.__df[dm]=dn;}if(this.__dm){if(dp){qx.bom.element.Attribute.set(this.__dm,dm,dn);return this;}if(!this.__dv){this.__dv={};}this.__dv[dm]=true;qx.html.Element._modified[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}return this;},setAttributes:function(dq,dr){for(var ds in dq){this.setAttribute(ds,dq[ds],dr);}return this;},removeAttribute:function(dt,du){this.setAttribute(dt,null,du);},getAttribute:function(dv){return this.__df?this.__df[dv]:null;},_applyProperty:function(name,dw){},_setProperty:function(dx,dy,dz){if(!this.__dx){this.__dx={};}if(this.__dx[dx]==dy){return;}if(dy==null){delete this.__dx[dx];}else{this.__dx[dx]=dy;}if(this.__dm){if(dz){this._applyProperty(dx,dy);return this;}if(!this.__dw){this.__dw={};}this.__dw[dx]=true;qx.html.Element._modified[this.$$hash]=this;qx.html.Element._scheduleFlush(m);}return this;},_removeProperty:function(dA,dB){this._setProperty(dA,null,dB);},_getProperty:function(dC){var dD=this.__dx;if(!dD){return null;}var dE=dD[dC];return dE==null?null:dE;},addListener:function(dF,dG,self,dH){var dI;if(this.$$disposed){return null;}{};if(this.__dm){return qx.event.Registration.addListener(this.__dm,dF,dG,self,dH);}if(!this.__dy){this.__dy={};}if(dH==null){dH=false;}var dJ=qx.event.Manager.getNextUniqueId();var dK=dF+(dH?D:q)+dJ;this.__dy[dK]={type:dF,listener:dG,self:self,capture:dH,unique:dJ};return dK;},removeListener:function(dL,dM,self,dN){var dO;if(this.$$disposed){return null;}{};if(this.__dm){qx.event.Registration.removeListener(this.__dm,dL,dM,self,dN);}else{var dQ=this.__dy;var dP;if(dN==null){dN=false;}for(var dR in dQ){dP=dQ[dR];if(dP.listener===dM&&dP.self===self&&dP.capture===dN&&dP.type===dL){delete dQ[dR];break;}}}return this;},removeListenerById:function(dS){if(this.$$disposed){return null;}if(this.__dm){qx.event.Registration.removeListenerById(this.__dm,dS);}else{delete this.__dy[dS];}return this;},hasListener:function(dT,dU){if(this.$$disposed){return false;}if(this.__dm){return qx.event.Registration.hasListener(this.__dm,dT,dU);}var dW=this.__dy;var dV;if(dU==null){dU=false;}for(var dX in dW){dV=dW[dX];if(dV.capture===dU&&dV.type===dT){return true;}}return false;}},defer:function(dY){dY.__dK=new qx.util.DeferredCall(dY.flush,dY);},destruct:function(){var ea=this.__dm;if(ea){qx.event.Registration.getManager(ea).removeAllListeners(ea);ea.$$element=c;}if(!qx.core.ObjectRegistry.inShutDown){var parent=this.__dB;if(parent&&!parent.$$disposed){parent.remove(this);}}this._disposeArray(B);this.__df=this.__de=this.__dy=this.__dx=this.__dv=this.__du=this.__dw=this.__dm=this.__dB=this.__dq=this.__dr=null;}});})();(function(){var g="qx.bom.client.Feature",f="CSS1Compat",d="label",c="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",b="input",a="pointerEvents";qx.Bootstrap.define(g,{statics:{STANDARD_MODE:false,QUIRKS_MODE:false,CONTENT_BOX:false,BORDER_BOX:false,SVG:false,CANVAS:!!window.CanvasRenderingContext2D,VML:false,XPATH:!!document.evaluate,AIR:navigator.userAgent.indexOf("adobeair")!==-1,GEARS:!!(window.google&&window.google.gears),SSL:window.location.protocol==="https:",ECMA_OBJECT_COUNT:(({}).__count__==0),CSS_POINTER_EVENTS:false,XUL:false,CSS_TEXT_OVERFLOW:("textOverflow" in document.documentElement.style||"OTextOverflow" in document.documentElement.style),HTML5_CLASSLIST:!!(document.documentElement.classList&&qx.Bootstrap.getClass(document.documentElement.classList)==="DOMTokenList"),TOUCH:("ontouchstart" in window),PLACEHOLDER:false,__gG:function(){this.QUIRKS_MODE=this.__gH();this.STANDARD_MODE=!this.QUIRKS_MODE;this.CONTENT_BOX=!qx.bom.client.Engine.MSHTML||this.STANDARD_MODE;this.BORDER_BOX=!this.CONTENT_BOX;this.SVG=document.implementation&&document.implementation.hasFeature&&(document.implementation.hasFeature("org.w3c.dom.svg","1.0")||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"));this.VML=qx.bom.client.Engine.MSHTML;try{document.createElementNS(c,d);this.XUL=true;}catch(e){this.XUL=false;}var i=document.createElement(b);this.PLACEHOLDER="placeholder" in i;if(a in document.documentElement.style){if(qx.bom.client.Engine.OPERA){this.CSS_POINTER_EVENTS=false;}else{this.CSS_POINTER_EVENTS=true;}}},__gH:function(){if(qx.bom.client.Engine.MSHTML&&qx.bom.client.Engine.VERSION>=8){return qx.bom.client.Engine.DOCUMENT_MODE===5;}else{return document.compatMode!==f;}}},defer:function(h){h.__gG();}});})();(function(){var a="qx.event.handler.UserAction";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(b){qx.core.Object.call(this);this.__kB=b;this.__kC=b.getWindow();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{useraction:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_WINDOW,IGNORE_CAN_HANDLE:true},members:{__kB:null,__kC:null,canHandleEvent:function(c,d){},registerEvent:function(e,f,g){},unregisterEvent:function(h,i,j){}},destruct:function(){this.__kB=this.__kC=null;},defer:function(k){qx.event.Registration.addHandler(k);}});})();(function(){var d='ie',c="qx.ui.core.queue.Manager",b="useraction",a="touchend";qx.Class.define(c,{statics:{__lg:false,__lh:{},__li:0,MAX_RETRIES:10,scheduleFlush:function(f){var self=qx.ui.core.queue.Manager;self.__lh[f]=true;if(!self.__lg){self.__ln.schedule();self.__lg=true;}},flush:function(){if(qx.ui.core.queue.Manager.PAUSE){return;}var self=qx.ui.core.queue.Manager;if(self.__lj){return;}self.__lj=true;self.__ln.cancel();var g=self.__lh;self.__lk(function(){while(g.visibility||g.widget||g.appearance||g.layout||g.element){if(g.widget){delete g.widget;qx.ui.core.queue.Widget.flush();}if(g.visibility){delete g.visibility;qx.ui.core.queue.Visibility.flush();}if(g.appearance){delete g.appearance;qx.ui.core.queue.Appearance.flush();}if(g.widget||g.visibility||g.appearance){continue;}if(g.layout){delete g.layout;qx.ui.core.queue.Layout.flush();}if(g.widget||g.visibility||g.appearance||g.layout){continue;}if(g.element){delete g.element;qx.html.Element.flush();}}},function(){self.__lg=false;});self.__lk(function(){if(g.dispose){delete g.dispose;qx.ui.core.queue.Dispose.flush();}},function(){self.__lj=false;});self.__li=0;},__lk:function(h,i){var self=qx.ui.core.queue.Manager;try{h();}catch(e){{};self.__lg=false;self.__lj=false;self.__li+=1;if(qx.bom.client.Browser.NAME==d&&qx.bom.client.Browser.VERSION<=7){i();}if(self.__li<=self.MAX_RETRIES){self.scheduleFlush();}else{throw new Error("Fatal Error: Flush terminated "+(self.__li-1)+" times in a row"+" due to exceptions in user code. The application has to be reloaded!");}throw e;}finally{i();}},__ll:function(e){var j=qx.ui.core.queue.Manager;if(e.getData()==a){j.PAUSE=true;if(j.__lm){window.clearTimeout(j.__lm);}j.__lm=window.setTimeout(function(){j.PAUSE=false;j.__lm=null;j.flush();},500);}else{j.flush();}}},defer:function(k){k.__ln=new qx.util.DeferredCall(k.flush);qx.html.Element._scheduleFlush=k.scheduleFlush;qx.event.Registration.addListener(window,b,qx.bom.client.Feature.TOUCH?k.__ll:k.flush);}});})();(function(){var a="qx.lang.Object";qx.Class.define(a,{statics:{empty:function(b){{};for(var c in b){if(b.hasOwnProperty(c)){delete b[c];}}},isEmpty:(qx.bom.client.Feature.ECMA_OBJECT_COUNT)?function(d){{};return d.__count__===0;}:function(e){{};for(var f in e){return false;}return true;},hasMinLength:(qx.bom.client.Feature.ECMA_OBJECT_COUNT)?function(g,h){{};return g.__count__>=h;}:function(j,k){{};if(k<=0){return true;}var length=0;for(var m in j){if((++length)>=k){return true;}}return false;},getLength:qx.Bootstrap.objectGetLength,getKeys:qx.Bootstrap.getKeys,getKeysAsString:qx.Bootstrap.getKeysAsString,getValues:function(n){{};var p=[];var o=this.getKeys(n);for(var i=0,l=o.length;i<l;i++){p.push(n[o[i]]);}return p;},mergeWith:qx.Bootstrap.objectMergeWith,carefullyMergeWith:function(q,r){{};return qx.lang.Object.mergeWith(q,r,false);},merge:function(s,t){{};var u=arguments.length;for(var i=1;i<u;i++){qx.lang.Object.mergeWith(s,arguments[i]);}return s;},clone:function(v){{};var w={};for(var x in v){w[x]=v[x];}return w;},invert:function(y){{};var z={};for(var A in y){z[y[A].toString()]=A;}return z;},getKeyFromValue:function(B,C){{};for(var D in B){if(B.hasOwnProperty(D)&&B[D]===C){return D;}}return null;},contains:function(E,F){{};return this.getKeyFromValue(E,F)!==null;},select:function(G,H){{};return H[G];},fromArray:function(I){{};var J={};for(var i=0,l=I.length;i<l;i++){{};J[I[i].toString()]=true;}return J;}}});})();(function(){var b="-",a="qx.event.handler.Element";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(c){qx.core.Object.call(this);this._manager=c;this._registeredEvents={};},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{abort:true,scroll:true,select:true,reset:true,submit:true},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:true},members:{canHandleEvent:function(d,e){},registerEvent:function(f,g,h){var k=qx.core.ObjectRegistry.toHashCode(f);var i=k+b+g;var j=qx.lang.Function.listener(this._onNative,this,i);qx.bom.Event.addNativeListener(f,g,j);this._registeredEvents[i]={element:f,type:g,listener:j};},unregisterEvent:function(l,m,n){var q=this._registeredEvents;if(!q){return;}var r=qx.core.ObjectRegistry.toHashCode(l);var o=r+b+m;var p=this._registeredEvents[o];if(p){qx.bom.Event.removeNativeListener(l,m,p.listener);}delete this._registeredEvents[o];},_onNative:qx.event.GlobalError.observeMethod(function(s,t){var v=this._registeredEvents;if(!v){return;}var u=v[t];qx.event.Registration.fireNonBubblingEvent(u.element,u.type,qx.event.type.Native,[s]);})},destruct:function(){var w;var x=this._registeredEvents;for(var y in x){w=x[y];qx.bom.Event.removeNativeListener(w.element,w.type,w.listener);}this._manager=this._registeredEvents=null;},defer:function(z){qx.event.Registration.addHandler(z);}});})();(function(){var e="orientationchange",d="resize",c="landscape",b="portrait",a="qx.event.handler.Orientation";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(f){qx.core.Object.call(this);this.__hU=f;this.__hV=f.getWindow();this._initObserver();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{orientationchange:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_WINDOW,IGNORE_CAN_HANDLE:true},members:{__hU:null,__hV:null,__hW:null,__hX:null,__hY:null,canHandleEvent:function(g,h){},registerEvent:function(i,j,k){},unregisterEvent:function(l,m,n){},_initObserver:function(){this.__hY=qx.lang.Function.listener(this._onNative,this);this.__hW=qx.bom.Event.supportsEvent(this.__hV,e)?e:d;var Event=qx.bom.Event;Event.addNativeListener(this.__hV,this.__hW,this.__hY);},_stopObserver:function(){var Event=qx.bom.Event;Event.removeNativeListener(this.__hV,this.__hW,this.__hY);},_onNative:qx.event.GlobalError.observeMethod(function(o){var q=qx.bom.Viewport;var p=q.getOrientation();if(this.__hX!=p){this.__hX=p;var r=q.isLandscape()?c:b;qx.event.Registration.fireEvent(this.__hV,e,qx.event.type.Orientation,[p,r]);}})},destruct:function(){this._stopObserver();this.__hU=this.__hV=null;},defer:function(s){qx.event.Registration.addHandler(s);}});})();(function(){var t="qx.mobile.emulatetouch",s="touchend",r="touchstart",q="touchmove",p="mousemove",o="touchcancel",n="mouseup",m="mousedown",l="qx.client",k="mshtml",d="qx.event.handler.Touch",j="useraction",h="swipe",c="qx.mobile.nativescroll",b="webkit",g="off",f="tap",i="x",a="y";qx.Class.define(d,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(u){qx.core.Object.call(this);this.__hc=u;this.__hd=u.getWindow();this.__he=this.__hd.document;this._initTouchObserver();this._initMouseObserver();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{touchstart:1,touchmove:1,touchend:1,touchcancel:1,tap:1,swipe:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE+qx.event.IEventHandler.TARGET_DOCUMENT,IGNORE_CAN_HANDLE:true,MOUSE_TO_TOUCH_MAPPING:{"mousedown":"touchstart","mousemove":"touchmove","mouseup":"touchend"},SWIPE_DIRECTION:{x:["left","right"],y:["up","down"]},TAP_MAX_DISTANCE:10,SWIPE_MIN_DISTANCE:11,SWIPE_MIN_VELOCITY:0},members:{__hf:null,__hg:null,__hc:null,__hd:null,__he:null,__hh:null,__hi:null,__hj:null,__hk:null,__hl:false,__hm:null,canHandleEvent:function(v,w){},registerEvent:function(x,y,z){},unregisterEvent:function(A,B,C){},__hn:function(D){var E=qx.bom.Event.getTarget(D);if(qx.core.Variant.isSet(l,b)){if(E&&E.nodeType==3){E=E.parentNode;}}return E;},__ho:function(F,G,H,I){if(!H){H=this.__hn(F);}var G=G||F.type;if(H&&H.nodeType){qx.event.Registration.fireEvent(H,G,I||qx.event.type.Touch,[F,H,null,true,true]);}qx.event.Registration.fireEvent(this.__hd,j,qx.event.type.Data,[G]);},__hp:function(J,K,L){if(!L){L=this.__hn(J);}var K=K||J.type;if(K==r){this.__hq(J,L);}else if(K==q){this.__hr(J,L);}else if(K==s){this.__hs(J,L);}},__hq:function(M,N){var O=M.changedTouches[0];this.__hh=O.screenX;this.__hi=O.screenY;this.__hj=new Date().getTime();this.__hk=M.changedTouches.length===1;},__hr:function(P,Q){if(this.__hk&&P.changedTouches.length>1){this.__hk=false;}},__hs:function(R,S){if(this.__hk){var T=R.changedTouches[0];var V={x:T.screenX-this.__hh,y:T.screenY-this.__hi};var W=qx.event.handler.Touch;if(this.__hm==S&&Math.abs(V.x)<=W.TAP_MAX_DISTANCE&&Math.abs(V.y)<=W.TAP_MAX_DISTANCE){this.__ho(R,f,S,qx.event.type.Tap);}else{var U=this.__ht(R,S,V);if(U){R.swipe=U;this.__ho(R,h,S,qx.event.type.Swipe);}}}},__ht:function(X,Y,ba){var be=qx.event.handler.Touch;var bf=new Date().getTime()-this.__hj;var bh=(Math.abs(ba.x)>=Math.abs(ba.y))?i:a;var bb=ba[bh];var bc=be.SWIPE_DIRECTION[bh][bb<0?0:1];var bg=(bf!==0)?bb/bf:0;var bd=null;if(Math.abs(bg)>=be.SWIPE_MIN_VELOCITY&&Math.abs(bb)>=be.SWIPE_MIN_DISTANCE){bd={startTime:this.__hj,duration:bf,axis:bh,direction:bc,distance:bb,velocity:bg};}return bd;},__hu:qx.core.Variant.select(t,{"on":function(bi){var bj=bi.type;var bl=qx.event.handler.Touch.MOUSE_TO_TOUCH_MAPPING;if(bl[bj]){bj=bl[bj];if(bj==r&&this.__hv(bi)){this.__hl=true;}else if(bj==s){this.__hl=false;}var bm=this.__hw(bi);var bk=(bj==s?[]:[bm]);bi.touches=bk;bi.targetTouches=bk;bi.changedTouches=[bm];}return bj;},"default":qx.lang.Function.empty}),__hv:qx.core.Variant.select(t,{"on":function(bn){if(qx.core.Variant.isSet(l,k)){var bo=1;}else{var bo=0;}return bn.button==bo;},"default":qx.lang.Function.empty}),__hw:qx.core.Variant.select(t,{"on":function(bp){var bq=this.__hn(bp);return {clientX:bp.clientX,clientY:bp.clientY,screenX:bp.screenX,screenY:bp.screenY,pageX:bp.pageX,pageY:bp.pageY,identifier:1,target:bq};},"default":qx.lang.Function.empty}),_initTouchObserver:function(){this.__hf=qx.lang.Function.listener(this._onTouchEvent,this);var Event=qx.bom.Event;Event.addNativeListener(this.__he,r,this.__hf);Event.addNativeListener(this.__he,q,this.__hf);Event.addNativeListener(this.__he,s,this.__hf);Event.addNativeListener(this.__he,o,this.__hf);},_initMouseObserver:qx.core.Variant.select(t,{"on":function(){if(!qx.bom.client.Feature.TOUCH){this.__hg=qx.lang.Function.listener(this._onMouseEvent,this);var Event=qx.bom.Event;Event.addNativeListener(this.__he,m,this.__hg);Event.addNativeListener(this.__he,p,this.__hg);Event.addNativeListener(this.__he,n,this.__hg);}},"default":qx.lang.Function.empty}),_stopTouchObserver:function(){var Event=qx.bom.Event;Event.removeNativeListener(this.__he,r,this.__hf);Event.removeNativeListener(this.__he,q,this.__hf);Event.removeNativeListener(this.__he,s,this.__hf);Event.removeNativeListener(this.__he,o,this.__hf);},_stopMouseObserver:qx.core.Variant.select(t,{"on":function(){if(!qx.bom.client.Feature.TOUCH){var Event=qx.bom.Event;Event.removeNativeListener(this.__he,m,this.__hg);Event.removeNativeListener(this.__he,p,this.__hg);Event.removeNativeListener(this.__he,n,this.__hg);}},"default":qx.lang.Function.empty}),_onTouchEvent:qx.event.GlobalError.observeMethod(function(br){this._commonTouchEventHandler(br);}),_onMouseEvent:qx.core.Variant.select(t,{"on":qx.event.GlobalError.observeMethod(function(bs){if(!qx.bom.client.Feature.TOUCH){if(bs.type==p&&!this.__hl){return;}var bt=this.__hu(bs);this._commonTouchEventHandler(bs,bt);}}),"default":qx.lang.Function.empty}),_commonTouchEventHandler:function(bu,bv){var bv=bv||bu.type;if(bv==r){this.__hm=this.__hn(bu);}this.__ho(bu,bv);this.__hp(bu,bv);}},destruct:function(){this._stopTouchObserver();this._stopMouseObserver();this.__hc=this.__hd=this.__he=this.__hm=null;},defer:function(bw){qx.event.Registration.addHandler(bw);if(qx.bom.client.Feature.TOUCH){if(qx.core.Variant.isSet(c,g)){document.addEventListener(q,function(e){e.preventDefault();});}qx.event.Registration.getManager(document).getHandler(bw);}}});})();(function(){var n="iPod",m="Win32",l="",k="Win64",j="Linux",i="BSD",h="Macintosh",g="iPhone",f="Windows",e="qx.bom.client.Platform",b="iPad",d="X11",c="MacIntel",a="MacPPC";qx.Class.define(e,{statics:{NAME:"",WIN:false,MAC:false,UNIX:false,UNKNOWN_PLATFORM:false,__kH:function(){var o=navigator.platform;if(o==null||o===l){o=navigator.userAgent;}if(o.indexOf(f)!=-1||o.indexOf(m)!=-1||o.indexOf(k)!=-1){this.WIN=true;this.NAME="win";}else if(o.indexOf(h)!=-1||o.indexOf(a)!=-1||o.indexOf(c)!=-1||o.indexOf(n)!=-1||o.indexOf(g)!=-1||o.indexOf(b)!=-1){this.MAC=true;this.NAME="mac";}else if(o.indexOf(d)!=-1||o.indexOf(j)!=-1||o.indexOf(i)!=-1){this.UNIX=true;this.NAME="unix";}else{this.UNKNOWN_PLATFORM=true;this.WIN=true;this.NAME="win";}}},defer:function(p){p.__kH();}});})();(function(){var j="win98",i="osx2",h="osx0",g="osx4",f="win95",e="win2000",d="osx1",c="osx5",b="osx3",a="Windows NT 5.01",I=")",H="winxp",G="freebsd",F="sunos",E="SV1",D="|",C="nintendods",B="winnt4",A="wince",z="winme",q="os9",r="\.",o="osx",p="linux",m="netbsd",n="winvista",k="openbsd",l="(",s="win2003",t="iPad",v="symbian",u="win7",x="g",w="qx.bom.client.System",y=" Mobile/";qx.Bootstrap.define(w,{statics:{NAME:"",SP1:false,SP2:false,WIN95:false,WIN98:false,WINME:false,WINNT4:false,WIN2000:false,WINXP:false,WIN2003:false,WINVISTA:false,WIN7:false,WINCE:false,LINUX:false,SUNOS:false,FREEBSD:false,NETBSD:false,OPENBSD:false,OSX:false,OS9:false,SYMBIAN:false,NINTENDODS:false,PSP:false,IPHONE:false,IPAD:false,UNKNOWN_SYSTEM:false,__lu:{"Windows NT 6.1":u,"Windows NT 6.0":n,"Windows NT 5.2":s,"Windows NT 5.1":H,"Windows NT 5.0":e,"Windows 2000":e,"Windows NT 4.0":B,"Win 9x 4.90":z,"Windows CE":A,"Windows 98":j,"Win98":j,"Windows 95":f,"Win95":f,"Linux":p,"FreeBSD":G,"NetBSD":m,"OpenBSD":k,"SunOS":F,"Symbian System":v,"Nitro":C,"PSP":"sonypsp","Mac OS X 10_5":c,"Mac OS X 10.5":c,"Mac OS X 10_4":g,"Mac OS X 10.4":g,"Mac OS X 10_3":b,"Mac OS X 10.3":b,"Mac OS X 10_2":i,"Mac OS X 10.2":i,"Mac OS X 10_1":d,"Mac OS X 10.1":d,"Mac OS X 10_0":h,"Mac OS X 10.0":h,"Mac OS X":o,"Mac OS 9":q},__lv:function(){var L=navigator.userAgent;var K=[];for(var J in this.__lu){K.push(J);}var M=new RegExp(l+K.join(D).replace(/\./g,r)+I,x);if(!M.test(L)){this.UNKNOWN_SYSTEM=true;if(!qx.bom.client.Platform.UNKNOWN_PLATFORM){if(qx.bom.client.Platform.UNIX){this.NAME="linux";this.LINUX=true;}else if(qx.bom.client.Platform.MAC){this.NAME="osx5";this.OSX=true;}else{this.NAME="winxp";this.WINXP=true;}}else{this.NAME="winxp";this.WINXP=true;}return;}if(qx.bom.client.Engine.WEBKIT&&RegExp(y).test(navigator.userAgent)){if(RegExp(t).test(navigator.userAgent)){this.IPAD=true;this.NAME="ipad";}else{this.IPHONE=true;this.NAME="iphone";}}else{this.NAME=this.__lu[RegExp.$1];this[this.NAME.toUpperCase()]=true;if(qx.bom.client.Platform.WIN){if(L.indexOf(a)!==-1){this.SP1=true;}else if(qx.bom.client.Engine.MSHTML&&L.indexOf(E)!==-1){this.SP2=true;}}}}},defer:function(N){N.__lv();}});})();(function(){var p="mouseup",o="click",n="qx.client",m="mousedown",l="contextmenu",k="mousewheel",j="dblclick",h="mouseover",g="mouseout",f="mousemove",c="on",e="useraction",d="DOMMouseScroll",b="gecko|webkit",a="qx.event.handler.Mouse";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(q){qx.core.Object.call(this);this.__eD=q;this.__eE=q.getWindow();this.__eF=this.__eE.document;this._initButtonObserver();this._initMoveObserver();this._initWheelObserver();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{mousemove:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,click:1,dblclick:1,contextmenu:1,mousewheel:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:true},members:{__eG:null,__eH:null,__eI:null,__eJ:null,__eK:null,__eD:null,__eE:null,__eF:null,canHandleEvent:function(r,s){},registerEvent:qx.bom.client.System.IPHONE?function(t,u,v){t[c+u]=qx.lang.Function.returnNull;}:qx.lang.Function.returnNull,unregisterEvent:qx.bom.client.System.IPHONE?function(w,x,y){w[c+x]=undefined;}:qx.lang.Function.returnNull,__eL:function(z,A,B){if(!B){B=qx.bom.Event.getTarget(z);}if(B&&B.nodeType){qx.event.Registration.fireEvent(B,A||z.type,A==k?qx.event.type.MouseWheel:qx.event.type.Mouse,[z,B,null,true,true]);}qx.event.Registration.fireEvent(this.__eE,e,qx.event.type.Data,[A||z.type]);},__eM:function(){var D=[this.__eE,this.__eF,this.__eF.body];var E=this.__eE;var C=d;for(var i=0;i<D.length;i++){if(qx.bom.Event.supportsEvent(D[i],k)){C=k;E=D[i];break;}}return {type:C,target:E};},_initButtonObserver:function(){this.__eG=qx.lang.Function.listener(this._onButtonEvent,this);var Event=qx.bom.Event;Event.addNativeListener(this.__eF,m,this.__eG);Event.addNativeListener(this.__eF,p,this.__eG);Event.addNativeListener(this.__eF,o,this.__eG);Event.addNativeListener(this.__eF,j,this.__eG);Event.addNativeListener(this.__eF,l,this.__eG);},_initMoveObserver:function(){this.__eH=qx.lang.Function.listener(this._onMoveEvent,this);var Event=qx.bom.Event;Event.addNativeListener(this.__eF,f,this.__eH);Event.addNativeListener(this.__eF,h,this.__eH);Event.addNativeListener(this.__eF,g,this.__eH);},_initWheelObserver:function(){this.__eI=qx.lang.Function.listener(this._onWheelEvent,this);var F=this.__eM();qx.bom.Event.addNativeListener(F.target,F.type,this.__eI);},_stopButtonObserver:function(){var Event=qx.bom.Event;Event.removeNativeListener(this.__eF,m,this.__eG);Event.removeNativeListener(this.__eF,p,this.__eG);Event.removeNativeListener(this.__eF,o,this.__eG);Event.removeNativeListener(this.__eF,j,this.__eG);Event.removeNativeListener(this.__eF,l,this.__eG);},_stopMoveObserver:function(){var Event=qx.bom.Event;Event.removeNativeListener(this.__eF,f,this.__eH);Event.removeNativeListener(this.__eF,h,this.__eH);Event.removeNativeListener(this.__eF,g,this.__eH);},_stopWheelObserver:function(){var G=this.__eM();qx.bom.Event.removeNativeListener(G.target,G.type,this.__eI);},_onMoveEvent:qx.event.GlobalError.observeMethod(function(H){this.__eL(H);}),_onButtonEvent:qx.event.GlobalError.observeMethod(function(I){var J=I.type;var K=qx.bom.Event.getTarget(I);if(qx.core.Variant.isSet(n,b)){if(K&&K.nodeType==3){K=K.parentNode;}}if(this.__eN){this.__eN(I,J,K);}if(this.__eP){this.__eP(I,J,K);}this.__eL(I,J,K);if(this.__eO){this.__eO(I,J,K);}if(this.__eQ){this.__eQ(I,J,K);}this.__eJ=J;}),_onWheelEvent:qx.event.GlobalError.observeMethod(function(L){this.__eL(L,k);}),__eN:qx.core.Variant.select(n,{"webkit":function(M,N,O){if(qx.bom.client.Engine.VERSION<530){if(N==l){this.__eL(M,p,O);}}},"default":null}),__eO:qx.core.Variant.select(n,{"opera":function(P,Q,R){if(Q==p&&P.button==2){this.__eL(P,l,R);}},"default":null}),__eP:qx.core.Variant.select(n,{"mshtml":function(S,T,U){if(S.target!==undefined){return;}if(T==p&&this.__eJ==o){this.__eL(S,m,U);}else if(T==j){this.__eL(S,o,U);}},"default":null}),__eQ:qx.core.Variant.select(n,{"mshtml":null,"default":function(V,W,X){switch(W){case m:this.__eK=X;break;case p:if(X!==this.__eK){var Y=qx.dom.Hierarchy.getCommonParent(X,this.__eK);this.__eL(V,o,Y);}}}})},destruct:function(){this._stopButtonObserver();this._stopMoveObserver();this._stopWheelObserver();this.__eD=this.__eE=this.__eF=this.__eK=null;},defer:function(ba){qx.event.Registration.addHandler(ba);}});})();(function(){var m="keydown",l="qx.client",k="keypress",j="NumLock",i="keyup",h="Enter",g="0",f="9",e="-",d="PageUp",bu="+",bt="PrintScreen",bs="gecko",br="A",bq="Z",bp="Left",bo="F5",bn="Down",bm="Up",bl="F11",t="F6",u="useraction",r="F3",s="keyinput",p="Insert",q="F8",n="End",o="/",B="Delete",C="*",O="cmd",K="F1",W="F4",R="Home",bh="F2",bc="F12",G="PageDown",bk="F7",bj="Win",bi="F9",F="F10",I="Right",J="text",M="Escape",P="webkit",S="5",Y="3",be="Meta",v="7",w="CapsLock",H="input",V="Control",U="Space",T="Tab",bb="Shift",ba="Pause",Q="Unidentified",X="qx.event.handler.Keyboard",a="mshtml|webkit",bd="6",x="off",y="Apps",L="4",b="Alt",c="mshtml",E="2",z="Scroll",A="1",D="8",N="autoComplete",bg=",",bf="Backspace";qx.Class.define(X,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(bv){qx.core.Object.call(this);this.__gO=bv;this.__gP=bv.getWindow();if(qx.core.Variant.isSet(l,bs)){this.__gQ=this.__gP;}else{this.__gQ=this.__gP.document.documentElement;}this.__gR={};this._initKeyObserver();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{keyup:1,keydown:1,keypress:1,keyinput:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:true,isValidKeyIdentifier:function(bw){if(this._identifierToKeyCodeMap[bw]){return true;}if(bw.length!=1){return false;}if(bw>=g&&bw<=f){return true;}if(bw>=br&&bw<=bq){return true;}switch(bw){case bu:case e:case C:case o:return true;default:return false;}}},members:{__gS:null,__gO:null,__gP:null,__gQ:null,__gR:null,__gT:null,__gU:null,__gV:null,canHandleEvent:function(bx,by){},registerEvent:function(bz,bA,bB){},unregisterEvent:function(bC,bD,bE){},_fireInputEvent:function(bF,bG){var bH=this.__gW();if(bH&&bH.offsetWidth!=0){var event=qx.event.Registration.createEvent(s,qx.event.type.KeyInput,[bF,bH,bG]);this.__gO.dispatchEvent(bH,event);}if(this.__gP){qx.event.Registration.fireEvent(this.__gP,u,qx.event.type.Data,[s]);}},_fireSequenceEvent:function(bI,bJ,bK){var bL=this.__gW();var bM=bI.keyCode;var event=qx.event.Registration.createEvent(bJ,qx.event.type.KeySequence,[bI,bL,bK]);this.__gO.dispatchEvent(bL,event);if(qx.core.Variant.isSet(l,a)){if(bJ==m&&event.getDefaultPrevented()){if(!this._isNonPrintableKeyCode(bM)&&!this._emulateKeyPress[bM]){this._fireSequenceEvent(bI,k,bK);}}}if(this.__gP){qx.event.Registration.fireEvent(this.__gP,u,qx.event.type.Data,[bJ]);}},__gW:function(){var bN=this.__gO.getHandler(qx.event.handler.Focus);var bO=bN.getActive();if(!bO||bO.offsetWidth==0){bO=bN.getFocus();}if(!bO||bO.offsetWidth==0){bO=this.__gO.getWindow().document.body;}return bO;},_initKeyObserver:function(){this.__gS=qx.lang.Function.listener(this.__gX,this);this.__gV=qx.lang.Function.listener(this.__ha,this);var Event=qx.bom.Event;Event.addNativeListener(this.__gQ,i,this.__gS);Event.addNativeListener(this.__gQ,m,this.__gS);Event.addNativeListener(this.__gQ,k,this.__gV);},_stopKeyObserver:function(){var Event=qx.bom.Event;Event.removeNativeListener(this.__gQ,i,this.__gS);Event.removeNativeListener(this.__gQ,m,this.__gS);Event.removeNativeListener(this.__gQ,k,this.__gV);for(var bQ in (this.__gU||{})){var bP=this.__gU[bQ];Event.removeNativeListener(bP.target,k,bP.callback);}delete (this.__gU);},__gX:qx.event.GlobalError.observeMethod(qx.core.Variant.select(l,{"mshtml":function(bR){bR=window.event||bR;var bU=bR.keyCode;var bS=0;var bT=bR.type;if(!(this.__gR[bU]==m&&bT==m)){this._idealKeyHandler(bU,bS,bT,bR);}if(bT==m){if(this._isNonPrintableKeyCode(bU)||this._emulateKeyPress[bU]){this._idealKeyHandler(bU,bS,k,bR);}}this.__gR[bU]=bT;},"gecko":function(bV){var ca=this._keyCodeFix[bV.keyCode]||bV.keyCode;var bX=0;var bY=bV.type;if(qx.bom.client.Platform.WIN){var bW=ca?this._keyCodeToIdentifier(ca):this._charCodeToIdentifier(bX);if(!(this.__gR[bW]==m&&bY==m)){this._idealKeyHandler(ca,bX,bY,bV);}this.__gR[bW]=bY;}else{this._idealKeyHandler(ca,bX,bY,bV);}this.__gY(bV.target,bY,ca);},"webkit":function(cb){var ce=0;var cc=0;var cd=cb.type;if(qx.bom.client.Engine.VERSION<525.13){if(cd==i||cd==m){ce=this._charCode2KeyCode[cb.charCode]||cb.keyCode;}else{if(this._charCode2KeyCode[cb.charCode]){ce=this._charCode2KeyCode[cb.charCode];}else{cc=cb.charCode;}}this._idealKeyHandler(ce,cc,cd,cb);}else{ce=cb.keyCode;this._idealKeyHandler(ce,cc,cd,cb);if(cd==m){if(this._isNonPrintableKeyCode(ce)||this._emulateKeyPress[ce]){this._idealKeyHandler(ce,cc,k,cb);}}this.__gR[ce]=cd;}},"opera":function(cf){this.__gT=cf.keyCode;this._idealKeyHandler(cf.keyCode,0,cf.type,cf);}})),__gY:qx.core.Variant.select(l,{"gecko":function(cg,ch,ci){if(ch===m&&(ci==33||ci==34||ci==38||ci==40)&&cg.type==J&&cg.tagName.toLowerCase()===H&&cg.getAttribute(N)!==x){if(!this.__gU){this.__gU={};}var ck=qx.core.ObjectRegistry.toHashCode(cg);if(this.__gU[ck]){return;}var self=this;this.__gU[ck]={target:cg,callback:function(cl){qx.bom.Event.stopPropagation(cl);self.__ha(cl);}};var cj=qx.event.GlobalError.observeMethod(this.__gU[ck].callback);qx.bom.Event.addNativeListener(cg,k,cj);}},"default":null}),__ha:qx.event.GlobalError.observeMethod(qx.core.Variant.select(l,{"mshtml":function(cm){cm=window.event||cm;if(this._charCode2KeyCode[cm.keyCode]){this._idealKeyHandler(this._charCode2KeyCode[cm.keyCode],0,cm.type,cm);}else{this._idealKeyHandler(0,cm.keyCode,cm.type,cm);}},"gecko":function(cn){var cq=this._keyCodeFix[cn.keyCode]||cn.keyCode;var co=cn.charCode;var cp=cn.type;this._idealKeyHandler(cq,co,cp,cn);},"webkit":function(cr){if(qx.bom.client.Engine.VERSION<525.13){var cu=0;var cs=0;var ct=cr.type;if(ct==i||ct==m){cu=this._charCode2KeyCode[cr.charCode]||cr.keyCode;}else{if(this._charCode2KeyCode[cr.charCode]){cu=this._charCode2KeyCode[cr.charCode];}else{cs=cr.charCode;}}this._idealKeyHandler(cu,cs,ct,cr);}else{if(this._charCode2KeyCode[cr.keyCode]){this._idealKeyHandler(this._charCode2KeyCode[cr.keyCode],0,cr.type,cr);}else{this._idealKeyHandler(0,cr.keyCode,cr.type,cr);}}},"opera":function(cv){var cx=cv.keyCode;var cw=cv.type;if(cx!=this.__gT){this._idealKeyHandler(0,this.__gT,cw,cv);}else{if(this._keyCodeToIdentifierMap[cv.keyCode]){this._idealKeyHandler(cv.keyCode,0,cv.type,cv);}else{this._idealKeyHandler(0,cv.keyCode,cv.type,cv);}}}})),_idealKeyHandler:function(cy,cz,cA,cB){var cC;if(cy||(!cy&&!cz)){cC=this._keyCodeToIdentifier(cy);this._fireSequenceEvent(cB,cA,cC);}else{cC=this._charCodeToIdentifier(cz);this._fireSequenceEvent(cB,k,cC);this._fireInputEvent(cB,cz);}},_specialCharCodeMap:{8:bf,9:T,13:h,27:M,32:U},_emulateKeyPress:qx.core.Variant.select(l,{"mshtml":{8:true,9:true},"webkit":{8:true,9:true,27:true},"default":{}}),_keyCodeToIdentifierMap:{16:bb,17:V,18:b,20:w,224:be,37:bp,38:bm,39:I,40:bn,33:d,34:G,35:n,36:R,45:p,46:B,112:K,113:bh,114:r,115:W,116:bo,117:t,118:bk,119:q,120:bi,121:F,122:bl,123:bc,144:j,44:bt,145:z,19:ba,91:qx.bom.client.Platform.MAC?O:bj,92:bj,93:qx.bom.client.Platform.MAC?O:y},_numpadToCharCode:{96:g.charCodeAt(0),97:A.charCodeAt(0),98:E.charCodeAt(0),99:Y.charCodeAt(0),100:L.charCodeAt(0),101:S.charCodeAt(0),102:bd.charCodeAt(0),103:v.charCodeAt(0),104:D.charCodeAt(0),105:f.charCodeAt(0),106:C.charCodeAt(0),107:bu.charCodeAt(0),109:e.charCodeAt(0),110:bg.charCodeAt(0),111:o.charCodeAt(0)},_charCodeA:br.charCodeAt(0),_charCodeZ:bq.charCodeAt(0),_charCode0:g.charCodeAt(0),_charCode9:f.charCodeAt(0),_isNonPrintableKeyCode:function(cD){return this._keyCodeToIdentifierMap[cD]?true:false;},_isIdentifiableKeyCode:function(cE){if(cE>=this._charCodeA&&cE<=this._charCodeZ){return true;}if(cE>=this._charCode0&&cE<=this._charCode9){return true;}if(this._specialCharCodeMap[cE]){return true;}if(this._numpadToCharCode[cE]){return true;}if(this._isNonPrintableKeyCode(cE)){return true;}return false;},_keyCodeToIdentifier:function(cF){if(this._isIdentifiableKeyCode(cF)){var cG=this._numpadToCharCode[cF];if(cG){return String.fromCharCode(cG);}return (this._keyCodeToIdentifierMap[cF]||this._specialCharCodeMap[cF]||String.fromCharCode(cF));}else{return Q;}},_charCodeToIdentifier:function(cH){return this._specialCharCodeMap[cH]||String.fromCharCode(cH).toUpperCase();},_identifierToKeyCode:function(cI){return qx.event.handler.Keyboard._identifierToKeyCodeMap[cI]||cI.charCodeAt(0);}},destruct:function(){this._stopKeyObserver();this.__gT=this.__gO=this.__gP=this.__gQ=this.__gR=null;},defer:function(cJ,cK){qx.event.Registration.addHandler(cJ);if(!cJ._identifierToKeyCodeMap){cJ._identifierToKeyCodeMap={};for(var cL in cK._keyCodeToIdentifierMap){cJ._identifierToKeyCodeMap[cK._keyCodeToIdentifierMap[cL]]=parseInt(cL,10);}for(var cL in cK._specialCharCodeMap){cJ._identifierToKeyCodeMap[cK._specialCharCodeMap[cL]]=parseInt(cL,10);}}if(qx.core.Variant.isSet(l,c)){cK._charCode2KeyCode={13:13,27:27};}else if(qx.core.Variant.isSet(l,bs)){cK._keyCodeFix={12:cK._identifierToKeyCode(j)};}else if(qx.core.Variant.isSet(l,P)){if(qx.bom.client.Engine.VERSION<525.13){cK._charCode2KeyCode={63289:cK._identifierToKeyCode(j),63276:cK._identifierToKeyCode(d),63277:cK._identifierToKeyCode(G),63275:cK._identifierToKeyCode(n),63273:cK._identifierToKeyCode(R),63234:cK._identifierToKeyCode(bp),63232:cK._identifierToKeyCode(bm),63235:cK._identifierToKeyCode(I),63233:cK._identifierToKeyCode(bn),63272:cK._identifierToKeyCode(B),63302:cK._identifierToKeyCode(p),63236:cK._identifierToKeyCode(K),63237:cK._identifierToKeyCode(bh),63238:cK._identifierToKeyCode(r),63239:cK._identifierToKeyCode(W),63240:cK._identifierToKeyCode(bo),63241:cK._identifierToKeyCode(t),63242:cK._identifierToKeyCode(bk),63243:cK._identifierToKeyCode(q),63244:cK._identifierToKeyCode(bi),63245:cK._identifierToKeyCode(F),63246:cK._identifierToKeyCode(bl),63247:cK._identifierToKeyCode(bc),63248:cK._identifierToKeyCode(bt),3:cK._identifierToKeyCode(h),12:cK._identifierToKeyCode(j),13:cK._identifierToKeyCode(h)};}else{cK._charCode2KeyCode={13:13,27:27};}}}});})();(function(){var a="qx.event.handler.Capture";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{capture:true,losecapture:true},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:true},members:{canHandleEvent:function(b,c){},registerEvent:function(d,e,f){},unregisterEvent:function(g,h,i){}},defer:function(j){qx.event.Registration.addHandler(j);}});})();(function(){var k="alias",j="copy",i="blur",h="mouseout",g="keydown",f="Ctrl",d="Shift",c="mousemove",b="move",a="mouseover",A="Alt",z="keyup",y="mouseup",x="dragend",w="on",v="mousedown",u="qxDraggable",t="drag",s="drop",r="qxDroppable",p="qx.event.handler.DragDrop",q="droprequest",n="dragstart",o="dragchange",l="dragleave",m="dragover";qx.Class.define(p,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(B){qx.core.Object.call(this);this.__jt=B;this.__ju=B.getWindow().document.documentElement;this.__jt.addListener(this.__ju,v,this._onMouseDown,this);this.__jG();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{dragstart:1,dragend:1,dragover:1,dragleave:1,drop:1,drag:1,dragchange:1,droprequest:1},IGNORE_CAN_HANDLE:true},members:{__jt:null,__ju:null,__jv:null,__jw:null,__jx:null,__jy:null,__jz:null,__jA:null,__jB:null,__jC:null,__jD:false,__jE:0,__jF:0,canHandleEvent:function(C,D){},registerEvent:function(E,F,G){},unregisterEvent:function(H,I,J){},addType:function(K){this.__jx[K]=true;},addAction:function(L){this.__jy[L]=true;},supportsType:function(M){return !!this.__jx[M];},supportsAction:function(N){return !!this.__jy[N];},getData:function(O){if(!this.__jN||!this.__jv){throw new Error("This method must not be used outside the drop event listener!");}if(!this.__jx[O]){throw new Error("Unsupported data type: "+O+"!");}if(!this.__jA[O]){this.__jB=O;this.__jI(q,this.__jw,this.__jv,false);}if(!this.__jA[O]){throw new Error("Please use a droprequest listener to the drag source to fill the manager with data!");}return this.__jA[O]||null;},getCurrentAction:function(){return this.__jC;},addData:function(P,Q){this.__jA[P]=Q;},getCurrentType:function(){return this.__jB;},isSessionActive:function(){return this.__jD;},__jG:function(){this.__jx={};this.__jy={};this.__jz={};this.__jA={};},__jH:function(){if(this.__jw==null){return;}var T=this.__jy;var R=this.__jz;var S=null;if(this.__jN){if(R.Shift&&R.Ctrl&&T.alias){S=k;}else if(R.Shift&&R.Alt&&T.copy){S=j;}else if(R.Shift&&T.move){S=b;}else if(R.Alt&&T.alias){S=k;}else if(R.Ctrl&&T.copy){S=j;}else if(T.move){S=b;}else if(T.copy){S=j;}else if(T.alias){S=k;}}if(S!=this.__jC){this.__jC=S;this.__jI(o,this.__jw,this.__jv,false);}},__jI:function(U,V,W,X,Y){var bb=qx.event.Registration;var ba=bb.createEvent(U,qx.event.type.Drag,[X,Y]);if(V!==W){ba.setRelatedTarget(W);}return bb.dispatchEvent(V,ba);},__jJ:function(bc){while(bc&&bc.nodeType==1){if(bc.getAttribute(u)==w){return bc;}bc=bc.parentNode;}return null;},__jK:function(bd){while(bd&&bd.nodeType==1){if(bd.getAttribute(r)==w){return bd;}bd=bd.parentNode;}return null;},__jL:function(){this.__jw=null;this.__jt.removeListener(this.__ju,c,this._onMouseMove,this,true);this.__jt.removeListener(this.__ju,y,this._onMouseUp,this,true);qx.event.Registration.removeListener(window,i,this._onWindowBlur,this);this.__jG();},__jM:function(){if(this.__jD){this.__jt.removeListener(this.__ju,a,this._onMouseOver,this,true);this.__jt.removeListener(this.__ju,h,this._onMouseOut,this,true);this.__jt.removeListener(this.__ju,g,this._onKeyDown,this,true);this.__jt.removeListener(this.__ju,z,this._onKeyUp,this,true);this.__jI(x,this.__jw,this.__jv,false);this.__jD=false;}this.__jN=false;this.__jv=null;this.__jL();},__jN:false,_onWindowBlur:function(e){this.__jM();},_onKeyDown:function(e){var be=e.getKeyIdentifier();switch(be){case A:case f:case d:if(!this.__jz[be]){this.__jz[be]=true;this.__jH();}}},_onKeyUp:function(e){var bf=e.getKeyIdentifier();switch(bf){case A:case f:case d:if(this.__jz[bf]){this.__jz[bf]=false;this.__jH();}}},_onMouseDown:function(e){if(this.__jD){return;}var bg=this.__jJ(e.getTarget());if(bg){this.__jE=e.getDocumentLeft();this.__jF=e.getDocumentTop();this.__jw=bg;this.__jt.addListener(this.__ju,c,this._onMouseMove,this,true);this.__jt.addListener(this.__ju,y,this._onMouseUp,this,true);qx.event.Registration.addListener(window,i,this._onWindowBlur,this);}},_onMouseUp:function(e){if(this.__jN){this.__jI(s,this.__jv,this.__jw,false,e);}if(this.__jD){e.stopPropagation();}this.__jM();},_onMouseMove:function(e){if(this.__jD){if(!this.__jI(t,this.__jw,this.__jv,true,e)){this.__jM();}}else{if(Math.abs(e.getDocumentLeft()-this.__jE)>3||Math.abs(e.getDocumentTop()-this.__jF)>3){if(this.__jI(n,this.__jw,this.__jv,true,e)){this.__jD=true;this.__jt.addListener(this.__ju,a,this._onMouseOver,this,true);this.__jt.addListener(this.__ju,h,this._onMouseOut,this,true);this.__jt.addListener(this.__ju,g,this._onKeyDown,this,true);this.__jt.addListener(this.__ju,z,this._onKeyUp,this,true);var bh=this.__jz;bh.Ctrl=e.isCtrlPressed();bh.Shift=e.isShiftPressed();bh.Alt=e.isAltPressed();this.__jH();}else{this.__jI(x,this.__jw,this.__jv,false);this.__jL();}}}},_onMouseOver:function(e){var bi=e.getTarget();var bj=this.__jK(bi);if(bj&&bj!=this.__jv){this.__jN=this.__jI(m,bj,this.__jw,true,e);this.__jv=bj;this.__jH();}},_onMouseOut:function(e){var bl=this.__jK(e.getTarget());var bk=this.__jK(e.getRelatedTarget());if(bl&&bl!==bk&&bl==this.__jv){this.__jI(l,this.__jv,bk,false,e);this.__jv=null;this.__jN=false;qx.event.Timer.once(this.__jH,this,0);}}},destruct:function(){this.__jw=this.__jv=this.__jt=this.__ju=this.__jx=this.__jy=this.__jz=this.__jA=null;},defer:function(bm){qx.event.Registration.addHandler(bm);}});})();(function(){var c="qx.event.handler.Appear",b="disappear",a="appear";qx.Class.define(c,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(d){qx.core.Object.call(this);this.__cl=d;this.__cm={};qx.event.handler.Appear.__cn[this.$$hash]=this;},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{appear:true,disappear:true},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:true,__cn:{},refresh:function(){var e=this.__cn;for(var f in e){e[f].refresh();}}},members:{__cl:null,__cm:null,canHandleEvent:function(g,h){},registerEvent:function(i,j,k){var l=qx.core.ObjectRegistry.toHashCode(i)+j;var m=this.__cm;if(m&&!m[l]){m[l]=i;i.$$displayed=i.offsetWidth>0;}},unregisterEvent:function(n,o,p){var q=qx.core.ObjectRegistry.toHashCode(n)+o;var r=this.__cm;if(!r){return;}if(r[q]){delete r[q];}},refresh:function(){var v=this.__cm;var w;for(var u in v){w=v[u];var s=w.offsetWidth>0;if((!!w.$$displayed)!==s){w.$$displayed=s;var t=qx.event.Registration.createEvent(s?a:b);this.__cl.dispatchEvent(w,t);}}}},destruct:function(){this.__cl=this.__cm=null;delete qx.event.handler.Appear.__cn[this.$$hash];},defer:function(x){qx.event.Registration.addHandler(x);}});})();(function(){var b="abstract",a="qx.event.dispatch.AbstractBubbling";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventDispatcher,type:b,construct:function(c){this._manager=c;},members:{_getParent:function(d){throw new Error("Missing implementation");},canDispatchEvent:function(e,event,f){return event.getBubbles();},dispatchEvent:function(g,event,h){var parent=g;var s=this._manager;var p,w;var n;var r,u;var t;var v=[];p=s.getListeners(g,h,true);w=s.getListeners(g,h,false);if(p){v.push(p);}if(w){v.push(w);}var parent=this._getParent(g);var l=[];var k=[];var m=[];var q=[];while(parent!=null){p=s.getListeners(parent,h,true);if(p){m.push(p);q.push(parent);}w=s.getListeners(parent,h,false);if(w){l.push(w);k.push(parent);}parent=this._getParent(parent);}event.setEventPhase(qx.event.type.Event.CAPTURING_PHASE);for(var i=m.length-1;i>=0;i--){t=q[i];event.setCurrentTarget(t);n=m[i];for(var j=0,o=n.length;j<o;j++){r=n[j];u=r.context||t;r.handler.call(u,event);}if(event.getPropagationStopped()){return;}}event.setEventPhase(qx.event.type.Event.AT_TARGET);event.setCurrentTarget(g);for(var i=0,x=v.length;i<x;i++){n=v[i];for(var j=0,o=n.length;j<o;j++){r=n[j];u=r.context||g;r.handler.call(u,event);}if(event.getPropagationStopped()){return;}}event.setEventPhase(qx.event.type.Event.BUBBLING_PHASE);for(var i=0,x=l.length;i<x;i++){t=k[i];event.setCurrentTarget(t);n=l[i];for(var j=0,o=n.length;j<o;j++){r=n[j];u=r.context||t;r.handler.call(u,event);}if(event.getPropagationStopped()){return;}}}}});})();(function(){var a="qx.event.dispatch.DomBubbling";qx.Class.define(a,{extend:qx.event.dispatch.AbstractBubbling,statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL},members:{_getParent:function(b){return b.parentNode;},canDispatchEvent:function(c,event,d){return c.nodeType!==undefined&&event.getBubbles();}},defer:function(e){qx.event.Registration.addDispatcher(e);}});})();(function(){var q="mshtml",p="",o="qx.client",n=" ",m=">",k="<",h="='",g="none",f="<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='Second Choice'>",d="qx.bom.Element",a="' ",c="div",b="></";qx.Class.define(d,{statics:{__kI:{"onload":true,"onpropertychange":true,"oninput":true,"onchange":true,"name":true,"type":true,"checked":true,"disabled":true},__kJ:{},__kK:{},allowCreationWithMarkup:function(r){if(!r){r=window;}var s=r.location.href;if(qx.bom.Element.__kK[s]==undefined){try{r.document.createElement(f);qx.bom.Element.__kK[s]=true;}catch(e){qx.bom.Element.__kK[s]=false;}}return qx.bom.Element.__kK[s];},getHelperElement:function(t){if(!t){t=window;}var v=t.location.href;if(!qx.bom.Element.__kJ[v]){var u=qx.bom.Element.__kJ[v]=t.document.createElement(c);if(qx.bom.client.Engine.WEBKIT){u.style.display=g;t.document.body.appendChild(u);}}return qx.bom.Element.__kJ[v];},create:function(name,w,x){if(!x){x=window;}if(!name){throw new Error("The tag name is missing!");}var z=this.__kI;var y=p;for(var B in w){if(z[B]){y+=B+h+w[B]+a;}}var C;if(y!=p){if(qx.bom.Element.allowCreationWithMarkup(x)){C=x.document.createElement(k+name+n+y+m);}else{var A=qx.bom.Element.getHelperElement(x);A.innerHTML=k+name+n+y+b+name+m;C=A.firstChild;}}else{C=x.document.createElement(name);}for(var B in w){if(!z[B]){qx.bom.element.Attribute.set(C,B,w[B]);}}return C;},empty:function(D){return D.innerHTML=p;},addListener:function(E,F,G,self,H){return qx.event.Registration.addListener(E,F,G,self,H);},removeListener:function(I,J,K,self,L){return qx.event.Registration.removeListener(I,J,K,self,L);},removeListenerById:function(M,N){return qx.event.Registration.removeListenerById(M,N);},hasListener:function(O,P,Q){return qx.event.Registration.hasListener(O,P,Q);},focus:function(R){qx.event.Registration.getManager(R).getHandler(qx.event.handler.Focus).focus(R);},blur:function(S){qx.event.Registration.getManager(S).getHandler(qx.event.handler.Focus).blur(S);},activate:function(T){qx.event.Registration.getManager(T).getHandler(qx.event.handler.Focus).activate(T);},deactivate:function(U){qx.event.Registration.getManager(U).getHandler(qx.event.handler.Focus).deactivate(U);},capture:function(V,W){qx.event.Registration.getManager(V).getDispatcher(qx.event.dispatch.MouseCapture).activateCapture(V,W);},releaseCapture:function(X){qx.event.Registration.getManager(X).getDispatcher(qx.event.dispatch.MouseCapture).releaseCapture(X);},matchesSelector:function(Y,ba){if(ba){return qx.bom.Selector.query(ba,Y.parentNode).length>0;}else{return false;}},clone:function(bb,bc){var bf;if(bc||(qx.core.Variant.isSet(o,q)&&!qx.xml.Document.isXmlDocument(bb))){var bj=qx.event.Registration.getManager(bb);var bd=qx.dom.Hierarchy.getDescendants(bb);bd.push(bb);}if(qx.core.Variant.isSet(o,q)){for(var i=0,l=bd.length;i<l;i++){bj.toggleAttachedEvents(bd[i],false);}}var bf=bb.cloneNode(true);if(qx.core.Variant.isSet(o,q)){for(var i=0,l=bd.length;i<l;i++){bj.toggleAttachedEvents(bd[i],true);}}if(bc===true){var bm=qx.dom.Hierarchy.getDescendants(bf);bm.push(bf);var be,bh,bl,bg;for(var i=0,bk=bd.length;i<bk;i++){bl=bd[i];be=bj.serializeListeners(bl);if(be.length>0){bh=bm[i];for(var j=0,bi=be.length;j<bi;j++){bg=be[j];bj.addListener(bh,bg.type,bg.handler,bg.self,bg.capture);}}}}return bf;}}});})();(function(){var a="qx.event.type.Native";qx.Class.define(a,{extend:qx.event.type.Event,members:{init:function(b,c,d,e,f){qx.event.type.Event.prototype.init.call(this,e,f);this._target=c||qx.bom.Event.getTarget(b);this._relatedTarget=d||qx.bom.Event.getRelatedTarget(b);if(b.timeStamp){this._timeStamp=b.timeStamp;}this._native=b;this._returnValue=null;return this;},clone:function(g){var h=qx.event.type.Event.prototype.clone.call(this,g);var i={};h._native=this._cloneNativeEvent(this._native,i);h._returnValue=this._returnValue;return h;},_cloneNativeEvent:function(j,k){k.preventDefault=qx.lang.Function.empty;return k;},preventDefault:function(){qx.event.type.Event.prototype.preventDefault.call(this);qx.bom.Event.preventDefault(this._native);},getNativeEvent:function(){return this._native;},setReturnValue:function(l){this._returnValue=l;},getReturnValue:function(){return this._returnValue;}},destruct:function(){this._native=this._returnValue=null;}});})();(function(){var b="qx.client",a="qx.bom.Viewport";qx.Class.define(a,{statics:{getWidth:qx.core.Variant.select(b,{"opera":function(c){if(qx.bom.client.Engine.VERSION<9.5){return (c||window).document.body.clientWidth;}else{var d=(c||window).document;return qx.bom.Document.isStandardMode(c)?d.documentElement.clientWidth:d.body.clientWidth;}},"webkit":function(e){if(qx.bom.client.Engine.VERSION<523.15){return (e||window).innerWidth;}else{var f=(e||window).document;return qx.bom.Document.isStandardMode(e)?f.documentElement.clientWidth:f.body.clientWidth;}},"default":function(g){var h=(g||window).document;return qx.bom.Document.isStandardMode(g)?h.documentElement.clientWidth:h.body.clientWidth;}}),getHeight:qx.core.Variant.select(b,{"opera":function(i){if(qx.bom.client.Engine.VERSION<9.5){return (i||window).document.body.clientHeight;}else{var j=(i||window).document;return qx.bom.Document.isStandardMode(i)?j.documentElement.clientHeight:j.body.clientHeight;}},"webkit":function(k){if(qx.bom.client.Engine.VERSION<523.15){return (k||window).innerHeight;}else{var l=(k||window).document;return qx.bom.Document.isStandardMode(k)?l.documentElement.clientHeight:l.body.clientHeight;}},"default":function(m){var n=(m||window).document;return qx.bom.Document.isStandardMode(m)?n.documentElement.clientHeight:n.body.clientHeight;}}),getScrollLeft:qx.core.Variant.select(b,{"mshtml":function(o){var p=(o||window).document;return p.documentElement.scrollLeft||p.body.scrollLeft;},"default":function(q){return (q||window).pageXOffset;}}),getScrollTop:qx.core.Variant.select(b,{"mshtml":function(r){var s=(r||window).document;return s.documentElement.scrollTop||s.body.scrollTop;},"default":function(t){return (t||window).pageYOffset;}}),getOrientation:function(u){var v=(u||window).orientation;if(v==null){v=this.getWidth(u)>this.getHeight(u)?90:0;}return v;},isLandscape:function(w){return Math.abs(this.getOrientation(w))==90;},isPortrait:function(x){var y=this.getOrientation(x);return (y==0||y==180);}}});})();(function(){var f="CSS1Compat",e="position:absolute;width:0;height:0;width:1",d="qx.bom.Document",c="1px",b="qx.client",a="div";qx.Class.define(d,{statics:{isQuirksMode:qx.core.Variant.select(b,{"mshtml":function(g){if(qx.bom.client.Engine.VERSION>=8){return (g||window).document.documentMode===5;}else{return (g||window).document.compatMode!==f;}},"webkit":function(h){if(document.compatMode===undefined){var i=(h||window).document.createElement(a);i.style.cssText=e;return i.style.width===c?true:false;}else{return (h||window).document.compatMode!==f;}},"default":function(j){return (j||window).document.compatMode!==f;}}),isStandardMode:function(k){return !this.isQuirksMode(k);},getWidth:function(l){var m=(l||window).document;var n=qx.bom.Viewport.getWidth(l);var scroll=this.isStandardMode(l)?m.documentElement.scrollWidth:m.body.scrollWidth;return Math.max(scroll,n);},getHeight:function(o){var p=(o||window).document;var q=qx.bom.Viewport.getHeight(o);var scroll=this.isStandardMode(o)?p.documentElement.scrollHeight:p.body.scrollHeight;return Math.max(scroll,q);}}});})();(function(){var c="landscape",b="qx.event.type.Orientation",a="portrait";qx.Class.define(b,{extend:qx.event.type.Event,members:{__eB:null,__eC:null,init:function(d,e){qx.event.type.Event.prototype.init.call(this,false,false);this.__eB=d;this.__eC=e;return this;},clone:function(f){var g=qx.event.type.Event.prototype.clone.call(this,f);g.__eB=this.__eB;g.__eC=this.__eC;return g;},getOrientation:function(){return this.__eB;},isLandscape:function(){return this.__eC==c;},isPortrait:function(){return this.__eC==a;}}});})();(function(){var a="qx.event.type.Dom";qx.Class.define(a,{extend:qx.event.type.Native,statics:{SHIFT_MASK:1,CTRL_MASK:2,ALT_MASK:4,META_MASK:8},members:{_cloneNativeEvent:function(b,c){var c=qx.event.type.Native.prototype._cloneNativeEvent.call(this,b,c);c.shiftKey=b.shiftKey;c.ctrlKey=b.ctrlKey;c.altKey=b.altKey;c.metaKey=b.metaKey;return c;},getModifiers:function(){var e=0;var d=this._native;if(d.shiftKey){e|=qx.event.type.Dom.SHIFT_MASK;}if(d.ctrlKey){e|=qx.event.type.Dom.CTRL_MASK;}if(d.altKey){e|=qx.event.type.Dom.ALT_MASK;}if(d.metaKey){e|=qx.event.type.Dom.META_MASK;}return e;},isCtrlPressed:function(){return this._native.ctrlKey;},isShiftPressed:function(){return this._native.shiftKey;},isAltPressed:function(){return this._native.altKey;},isMetaPressed:function(){return this._native.metaKey;},isCtrlOrCommandPressed:function(){if(qx.bom.client.Platform.MAC){return this._native.metaKey;}else{return this._native.ctrlKey;}}}});})();(function(){var c="touchcancel",b="qx.event.type.Touch",a="touchend";qx.Class.define(b,{extend:qx.event.type.Dom,members:{_cloneNativeEvent:function(d,e){var e=qx.event.type.Dom.prototype._cloneNativeEvent.call(this,d,e);e.pageX=d.pageX;e.pageY=d.pageY;e.layerX=d.layerX;e.layerY=d.layerY;e.scale=d.scale;e.rotation=d.rotation;e.srcElement=d.srcElement;e.targetTouches=[];for(var i=0;i<d.targetTouches.length;i++){e.targetTouches[i]=d.targetTouches[i];}e.changedTouches=[];for(var i=0;i<d.changedTouches.length;i++){e.changedTouches[i]=d.changedTouches[i];}e.touches=[];for(var i=0;i<d.touches.length;i++){e.touches[i]=d.touches[i];}return e;},stop:function(){this.stopPropagation();},getAllTouches:function(){return this._native.touches;},getTargetTouches:function(){return this._native.targetTouches;},getChangedTargetTouches:function(){return this._native.changedTouches;},isMultiTouch:function(){return this.__cG().length>1;},getScale:function(){return this._native.scale;},getRotation:function(){return this._native.rotation;},getDocumentLeft:function(f){return this.__cF(f).pageX;},getDocumentTop:function(g){return this.__cF(g).pageY;},getScreenLeft:function(h){return this.__cF(h).screenX;},getScreenTop:function(j){return this.__cF(j).screenY;},getViewportLeft:function(k){return this.__cF(k).clientX;},getViewportTop:function(l){return this.__cF(l).clientY;},getIdentifier:function(m){return this.__cF(m).identifier;},__cF:function(n){n=n==null?0:n;return this.__cG()[n];},__cG:function(){var o=(this._isTouchEnd()?this.getChangedTargetTouches():this.getTargetTouches());return o;},_isTouchEnd:function(){return (this.getType()==a||this.getType()==c);}}});})();(function(){var a="qx.event.type.Tap";qx.Class.define(a,{extend:qx.event.type.Touch,members:{_isTouchEnd:function(){return true;}}});})();(function(){var a="qx.event.type.Swipe";qx.Class.define(a,{extend:qx.event.type.Touch,members:{_cloneNativeEvent:function(b,c){var c=qx.event.type.Touch.prototype._cloneNativeEvent.call(this,b,c);c.swipe=b.swipe;return c;},_isTouchEnd:function(){return true;},getStartTime:function(){return this._native.swipe.startTime;},getDuration:function(){return this._native.swipe.duration;},getAxis:function(){return this._native.swipe.axis;},getDirection:function(){return this._native.swipe.direction;},getVelocity:function(){return this._native.swipe.velocity;},getDistance:function(){return this._native.swipe.distance;}}});})();(function(){var h="left",g="right",f="middle",e="none",d="click",c="contextmenu",b="qx.event.type.Mouse",a="qx.client";qx.Class.define(b,{extend:qx.event.type.Dom,members:{_cloneNativeEvent:function(i,j){var j=qx.event.type.Dom.prototype._cloneNativeEvent.call(this,i,j);j.button=i.button;j.clientX=i.clientX;j.clientY=i.clientY;j.pageX=i.pageX;j.pageY=i.pageY;j.screenX=i.screenX;j.screenY=i.screenY;j.wheelDelta=i.wheelDelta;j.detail=i.detail;j.srcElement=i.srcElement;j.target=i.target;return j;},__kD:{0:h,2:g,1:f},__kE:{1:h,2:g,4:f},stop:function(){this.stopPropagation();},getButton:function(){switch(this._type){case c:return g;case d:if(this.__kF){return this.__kF();}default:if(this._native.target!==undefined){return this.__kD[this._native.button]||e;}else{return this.__kE[this._native.button]||e;}}},__kF:qx.core.Variant.select(a,{"mshtml":function(){return h;},"default":null}),isLeftPressed:function(){return this.getButton()===h;},isMiddlePressed:function(){return this.getButton()===f;},isRightPressed:function(){return this.getButton()===g;},getRelatedTarget:function(){return this._relatedTarget;},getViewportLeft:function(){return this._native.clientX;},getViewportTop:function(){return this._native.clientY;},getDocumentLeft:function(){if(this._native.pageX!==undefined){return this._native.pageX;}else{var k=qx.dom.Node.getWindow(this._native.srcElement);return this._native.clientX+qx.bom.Viewport.getScrollLeft(k);}},getDocumentTop:function(){if(this._native.pageY!==undefined){return this._native.pageY;}else{var l=qx.dom.Node.getWindow(this._native.srcElement);return this._native.clientY+qx.bom.Viewport.getScrollTop(l);}},getScreenLeft:function(){return this._native.screenX;},getScreenTop:function(){return this._native.screenY;}}});})();(function(){var c="qx.client",b="chrome",a="qx.event.type.MouseWheel";qx.Class.define(a,{extend:qx.event.type.Mouse,members:{stop:function(){this.stopPropagation();this.preventDefault();},getWheelDelta:qx.core.Variant.select(c,{"default":function(){return -(this._native.wheelDelta/40);},"gecko":function(){return this._native.detail;},"webkit":function(){if(qx.bom.client.Browser.NAME==b){if(qx.bom.client.Platform.MAC){return -(this._native.wheelDelta/1200);}else{return -(this._native.wheelDelta/120);}}else{if(qx.bom.client.Platform.WIN){var d=120;if(qx.bom.client.Engine.VERSION==533.16){d=1200;}}else{d=40;if(qx.bom.client.Engine.VERSION==533.16||qx.bom.client.Engine.VERSION==533.17||qx.bom.client.Engine.VERSION==533.18){d=1200;}}return -(this._native.wheelDelta/d);}}})}});})();(function(){var j="qx.client",i="ie",h="msie",g="android",f="operamini",e="mobile chrome",d=")(/| )([0-9]+\.[0-9])",c="iemobile",b="opera mobi",a="Mobile Safari",x="operamobile",w="mobile safari",v="IEMobile|Maxthon|MSIE",u="qx.bom.client.Browser",t="opera mini",s="(",r="opera",q="mshtml",p="Opera Mini|Opera Mobi|Opera",o="AdobeAIR|Titanium|Fluid|Chrome|Android|Epiphany|Konqueror|iCab|OmniWeb|Maxthon|Pre|Mobile Safari|Safari",m="webkit",n="5.0",k="prism|Fennec|Camino|Kmeleon|Galeon|Netscape|SeaMonkey|Firefox",l="Mobile/";qx.Bootstrap.define(u,{statics:{UNKNOWN:true,NAME:"unknown",TITLE:"unknown 0.0",VERSION:0.0,FULLVERSION:"0.0.0",__lE:function(y){var z=navigator.userAgent;var B=new RegExp(s+y+d);var C=z.match(B);if(!C){return;}var name=C[1].toLowerCase();var A=C[3];if(z.match(/Version(\/| )([0-9]+\.[0-9])/)){A=RegExp.$2;}if(qx.core.Variant.isSet(j,m)){if(name===g){name=e;}else if(z.indexOf(a)!==-1||z.indexOf(l)!==-1){name=w;}}else if(qx.core.Variant.isSet(j,q)){if(name===h){name=i;if(qx.bom.client.System.WINCE&&name===i){name=c;A=n;}}}else if(qx.core.Variant.isSet(j,r)){if(name===b){name=x;}else if(name===t){name=f;}}this.NAME=name;this.FULLVERSION=A;this.VERSION=parseFloat(A,10);this.TITLE=name+" "+this.VERSION;this.UNKNOWN=false;}},defer:qx.core.Variant.select(j,{"webkit":function(D){D.__lE(o);},"gecko":function(E){E.__lE(k);},"mshtml":function(F){F.__lE(v);},"opera":function(G){G.__lE(p);}})});})();(function(){var f="qx.client",e="qx.dom.Hierarchy",d="previousSibling",c="*",b="nextSibling",a="parentNode";qx.Class.define(e,{statics:{getNodeIndex:function(g){var h=0;while(g&&(g=g.previousSibling)){h++;}return h;},getElementIndex:function(i){var j=0;var k=qx.dom.Node.ELEMENT;while(i&&(i=i.previousSibling)){if(i.nodeType==k){j++;}}return j;},getNextElementSibling:function(l){while(l&&(l=l.nextSibling)&&!qx.dom.Node.isElement(l)){continue;}return l||null;},getPreviousElementSibling:function(m){while(m&&(m=m.previousSibling)&&!qx.dom.Node.isElement(m)){continue;}return m||null;},contains:qx.core.Variant.select(f,{"webkit|mshtml|opera":function(n,o){if(qx.dom.Node.isDocument(n)){var p=qx.dom.Node.getDocument(o);return n&&p==n;}else if(qx.dom.Node.isDocument(o)){return false;}else{return n.contains(o);}},"gecko":function(q,r){return !!(q.compareDocumentPosition(r)&16);},"default":function(s,t){while(t){if(s==t){return true;}t=t.parentNode;}return false;}}),isRendered:qx.core.Variant.select(f,{"mshtml":function(u){if(!u.parentNode||!u.offsetParent){return false;}var v=u.ownerDocument||u.document;return v.body.contains(u);},"gecko":function(w){var x=w.ownerDocument||w.document;return !!(x.compareDocumentPosition(w)&16);},"default":function(y){if(!y.parentNode||!y.offsetParent){return false;}var z=y.ownerDocument||y.document;return z.body.contains(y);}}),isDescendantOf:function(A,B){return this.contains(B,A);},getCommonParent:qx.core.Variant.select(f,{"mshtml|opera":function(C,D){if(C===D){return C;}while(C&&qx.dom.Node.isElement(C)){if(C.contains(D)){return C;}C=C.parentNode;}return null;},"default":function(E,F){if(E===F){return E;}var G={};var J=qx.core.ObjectRegistry;var I,H;while(E||F){if(E){I=J.toHashCode(E);if(G[I]){return G[I];}G[I]=E;E=E.parentNode;}if(F){H=J.toHashCode(F);if(G[H]){return G[H];}G[H]=F;F=F.parentNode;}}return null;}}),getAncestors:function(K){return this._recursivelyCollect(K,a);},getChildElements:function(L){L=L.firstChild;if(!L){return [];}var M=this.getNextSiblings(L);if(L.nodeType===1){M.unshift(L);}return M;},getDescendants:function(N){return qx.lang.Array.fromCollection(N.getElementsByTagName(c));},getFirstDescendant:function(O){O=O.firstChild;while(O&&O.nodeType!=1){O=O.nextSibling;}return O;},getLastDescendant:function(P){P=P.lastChild;while(P&&P.nodeType!=1){P=P.previousSibling;}return P;},getPreviousSiblings:function(Q){return this._recursivelyCollect(Q,d);},getNextSiblings:function(R){return this._recursivelyCollect(R,b);},_recursivelyCollect:function(S,T){var U=[];while(S=S[T]){if(S.nodeType==1){U.push(S);}}return U;},getSiblings:function(V){return this.getPreviousSiblings(V).reverse().concat(this.getNextSiblings(V));},isEmpty:function(W){W=W.firstChild;while(W){if(W.nodeType===qx.dom.Node.ELEMENT||W.nodeType===qx.dom.Node.TEXT){return false;}W=W.nextSibling;}return true;},cleanWhitespace:function(X){var Y=X.firstChild;while(Y){var ba=Y.nextSibling;if(Y.nodeType==3&&!/\S/.test(Y.nodeValue)){X.removeChild(Y);}Y=ba;}}}});})();(function(){var a="qx.event.type.KeyInput";qx.Class.define(a,{extend:qx.event.type.Dom,members:{init:function(b,c,d){qx.event.type.Dom.prototype.init.call(this,b,c,null,true,true);this._charCode=d;return this;},clone:function(e){var f=qx.event.type.Dom.prototype.clone.call(this,e);f._charCode=this._charCode;return f;},getCharCode:function(){return this._charCode;},getChar:function(){return String.fromCharCode(this._charCode);}}});})();(function(){var a="qx.event.type.KeySequence";qx.Class.define(a,{extend:qx.event.type.Dom,members:{init:function(b,c,d){qx.event.type.Dom.prototype.init.call(this,b,c,null,true,true);this._keyCode=b.keyCode;this._identifier=d;return this;},clone:function(e){var f=qx.event.type.Dom.prototype.clone.call(this,e);f._keyCode=this._keyCode;f._identifier=this._identifier;return f;},getKeyIdentifier:function(){return this._identifier;},getKeyCode:function(){return this._keyCode;}}});})();(function(){var j="qx.client",i="mousedown",h="mouseup",g="blur",f="focus",e="on",d="selectstart",c="DOMFocusOut",b="focusin",a="focusout",z="DOMFocusIn",y="draggesture",x="qx.event.handler.Focus",w="_applyFocus",v="deactivate",u="textarea",t="_applyActive",s='character',r="input",q="qxSelectable",o="tabIndex",p="off",m="activate",n="mshtml",k="qxKeepFocus",l="qxKeepActive";qx.Class.define(x,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(A){qx.core.Object.call(this);this._manager=A;this._window=A.getWindow();this._document=this._window.document;this._root=this._document.documentElement;this._body=this._document.body;this._initObserver();},properties:{active:{apply:t,nullable:true},focus:{apply:w,nullable:true}},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{focus:1,blur:1,focusin:1,focusout:1,activate:1,deactivate:1},IGNORE_CAN_HANDLE:true,FOCUSABLE_ELEMENTS:qx.core.Variant.select("qx.client",{"mshtml|gecko":{a:1,body:1,button:1,frame:1,iframe:1,img:1,input:1,object:1,select:1,textarea:1},"opera|webkit":{button:1,input:1,select:1,textarea:1}})},members:{__jQ:null,__jR:null,__jS:null,__jT:null,__jU:null,__jV:null,__jW:null,__jX:null,__jY:null,__ka:null,canHandleEvent:function(B,C){},registerEvent:function(D,E,F){},unregisterEvent:function(G,H,I){},focus:function(J){if(qx.core.Variant.isSet(j,n)){window.setTimeout(function(){try{J.focus();var K=qx.bom.Selection.get(J);if(K.length==0){var L=J.createTextRange();L.moveStart(s,J.value.length);L.collapse();L.select();}}catch(M){}},0);}else{try{J.focus();}catch(N){}}this.setFocus(J);this.setActive(J);},activate:function(O){this.setActive(O);},blur:function(P){try{P.blur();}catch(Q){}if(this.getActive()===P){this.resetActive();}if(this.getFocus()===P){this.resetFocus();}},deactivate:function(R){if(this.getActive()===R){this.resetActive();}},tryActivate:function(S){var T=this.__kp(S);if(T){this.setActive(T);}},__kb:function(U,V,W,X){var ba=qx.event.Registration;var Y=ba.createEvent(W,qx.event.type.Focus,[U,V,X]);ba.dispatchEvent(U,Y);},_windowFocused:true,__kc:function(){if(this._windowFocused){this._windowFocused=false;this.__kb(this._window,null,g,false);}},__kd:function(){if(!this._windowFocused){this._windowFocused=true;this.__kb(this._window,null,f,false);}},_initObserver:qx.core.Variant.select(j,{"gecko":function(){this.__jQ=qx.lang.Function.listener(this.__kj,this);this.__jR=qx.lang.Function.listener(this.__kk,this);this.__jS=qx.lang.Function.listener(this.__ki,this);this.__jT=qx.lang.Function.listener(this.__kh,this);this.__jU=qx.lang.Function.listener(this.__ke,this);qx.bom.Event.addNativeListener(this._document,i,this.__jQ,true);qx.bom.Event.addNativeListener(this._document,h,this.__jR,true);qx.bom.Event.addNativeListener(this._window,f,this.__jS,true);qx.bom.Event.addNativeListener(this._window,g,this.__jT,true);qx.bom.Event.addNativeListener(this._window,y,this.__jU,true);},"mshtml":function(){this.__jQ=qx.lang.Function.listener(this.__kj,this);this.__jR=qx.lang.Function.listener(this.__kk,this);this.__jW=qx.lang.Function.listener(this.__kf,this);this.__jX=qx.lang.Function.listener(this.__kg,this);this.__jV=qx.lang.Function.listener(this.__km,this);qx.bom.Event.addNativeListener(this._document,i,this.__jQ);qx.bom.Event.addNativeListener(this._document,h,this.__jR);qx.bom.Event.addNativeListener(this._document,b,this.__jW);qx.bom.Event.addNativeListener(this._document,a,this.__jX);qx.bom.Event.addNativeListener(this._document,d,this.__jV);},"webkit":function(){this.__jQ=qx.lang.Function.listener(this.__kj,this);this.__jR=qx.lang.Function.listener(this.__kk,this);this.__jX=qx.lang.Function.listener(this.__kg,this);this.__jS=qx.lang.Function.listener(this.__ki,this);this.__jT=qx.lang.Function.listener(this.__kh,this);this.__jV=qx.lang.Function.listener(this.__km,this);qx.bom.Event.addNativeListener(this._document,i,this.__jQ,true);qx.bom.Event.addNativeListener(this._document,h,this.__jR,true);qx.bom.Event.addNativeListener(this._document,d,this.__jV,false);qx.bom.Event.addNativeListener(this._window,c,this.__jX,true);qx.bom.Event.addNativeListener(this._window,f,this.__jS,true);qx.bom.Event.addNativeListener(this._window,g,this.__jT,true);},"opera":function(){this.__jQ=qx.lang.Function.listener(this.__kj,this);this.__jR=qx.lang.Function.listener(this.__kk,this);this.__jW=qx.lang.Function.listener(this.__kf,this);this.__jX=qx.lang.Function.listener(this.__kg,this);qx.bom.Event.addNativeListener(this._document,i,this.__jQ,true);qx.bom.Event.addNativeListener(this._document,h,this.__jR,true);qx.bom.Event.addNativeListener(this._window,z,this.__jW,true);qx.bom.Event.addNativeListener(this._window,c,this.__jX,true);}}),_stopObserver:qx.core.Variant.select(j,{"gecko":function(){qx.bom.Event.removeNativeListener(this._document,i,this.__jQ,true);qx.bom.Event.removeNativeListener(this._document,h,this.__jR,true);qx.bom.Event.removeNativeListener(this._window,f,this.__jS,true);qx.bom.Event.removeNativeListener(this._window,g,this.__jT,true);qx.bom.Event.removeNativeListener(this._window,y,this.__jU,true);},"mshtml":function(){qx.bom.Event.removeNativeListener(this._document,i,this.__jQ);qx.bom.Event.removeNativeListener(this._document,h,this.__jR);qx.bom.Event.removeNativeListener(this._document,b,this.__jW);qx.bom.Event.removeNativeListener(this._document,a,this.__jX);qx.bom.Event.removeNativeListener(this._document,d,this.__jV);},"webkit":function(){qx.bom.Event.removeNativeListener(this._document,i,this.__jQ,true);qx.bom.Event.removeNativeListener(this._document,h,this.__jR,true);qx.bom.Event.removeNativeListener(this._document,d,this.__jV,false);qx.bom.Event.removeNativeListener(this._window,c,this.__jX,true);qx.bom.Event.removeNativeListener(this._window,f,this.__jS,true);qx.bom.Event.removeNativeListener(this._window,g,this.__jT,true);},"opera":function(){qx.bom.Event.removeNativeListener(this._document,i,this.__jQ,true);qx.bom.Event.removeNativeListener(this._document,h,this.__jR,true);qx.bom.Event.removeNativeListener(this._window,z,this.__jW,true);qx.bom.Event.removeNativeListener(this._window,c,this.__jX,true);}}),__ke:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"gecko":function(bb){var bc=qx.bom.Event.getTarget(bb);if(!this.__kq(bc)){qx.bom.Event.preventDefault(bb);}},"default":null})),__kf:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"mshtml":function(bd){this.__kd();var bf=qx.bom.Event.getTarget(bd);var be=this.__ko(bf);if(be){this.setFocus(be);}this.tryActivate(bf);},"opera":function(bg){var bh=qx.bom.Event.getTarget(bg);if(bh==this._document||bh==this._window){this.__kd();if(this.__jY){this.setFocus(this.__jY);delete this.__jY;}if(this.__ka){this.setActive(this.__ka);delete this.__ka;}}else{this.setFocus(bh);this.tryActivate(bh);if(!this.__kq(bh)){bh.selectionStart=0;bh.selectionEnd=0;}}},"default":null})),__kg:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"mshtml":function(bi){if(!bi.toElement){this.__kc();this.resetFocus();this.resetActive();}},"webkit":function(bj){var bk=qx.bom.Event.getTarget(bj);if(bk===this.getFocus()){this.resetFocus();}if(bk===this.getActive()){this.resetActive();}},"opera":function(bl){var bm=qx.bom.Event.getTarget(bl);if(bm==this._document){this.__kc();this.__jY=this.getFocus();this.__ka=this.getActive();this.resetFocus();this.resetActive();}else{if(bm===this.getFocus()){this.resetFocus();}if(bm===this.getActive()){this.resetActive();}}},"default":null})),__kh:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"gecko":function(bn){var bo=qx.bom.Event.getTarget(bn);if(bo===this._window||bo===this._document){this.__kc();this.resetActive();this.resetFocus();}},"webkit":function(bp){var bq=qx.bom.Event.getTarget(bp);if(bq===this._window||bq===this._document){this.__kc();this.__jY=this.getFocus();this.__ka=this.getActive();this.resetActive();this.resetFocus();}},"default":null})),__ki:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"gecko":function(br){var bs=qx.bom.Event.getTarget(br);if(bs===this._window||bs===this._document){this.__kd();bs=this._body;}this.setFocus(bs);this.tryActivate(bs);},"webkit":function(bt){var bu=qx.bom.Event.getTarget(bt);if(bu===this._window||bu===this._document){this.__kd();if(this.__jY){this.setFocus(this.__jY);delete this.__jY;}if(this.__ka){this.setActive(this.__ka);delete this.__ka;}}else{this.setFocus(bu);this.tryActivate(bu);}},"default":null})),__kj:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"gecko":function(bv){var bx=qx.bom.Event.getTarget(bv);var bw=this.__ko(bx);if(!bw){qx.bom.Event.preventDefault(bv);}else if(bw===this._body){this.setFocus(bw);}},"mshtml":function(by){var bA=qx.bom.Event.getTarget(by);var bz=this.__ko(bA);if(bz){if(!this.__kq(bA)){bA.unselectable=e;try{document.selection.empty();}catch(bB){}try{bz.focus();}catch(bC){}}}else{qx.bom.Event.preventDefault(by);if(!this.__kq(bA)){bA.unselectable=e;}}},"webkit":function(bD){var bF=qx.bom.Event.getTarget(bD);var bE=this.__ko(bF);if(bE){this.setFocus(bE);}else{qx.bom.Event.preventDefault(bD);}},"opera":function(bG){var bJ=qx.bom.Event.getTarget(bG);var bH=this.__ko(bJ);if(!this.__kq(bJ)){qx.bom.Event.preventDefault(bG);if(bH){var bI=this.getFocus();if(bI&&bI.selectionEnd){bI.selectionStart=0;bI.selectionEnd=0;bI.blur();}if(bH){this.setFocus(bH);}}}else if(bH){this.setFocus(bH);}},"default":null})),__kk:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"mshtml":function(bK){var bL=qx.bom.Event.getTarget(bK);if(bL.unselectable){bL.unselectable=p;}this.tryActivate(this.__kl(bL));},"gecko":function(bM){var bN=qx.bom.Event.getTarget(bM);while(bN&&bN.offsetWidth===undefined){bN=bN.parentNode;}if(bN){this.tryActivate(bN);}},"webkit|opera":function(bO){var bP=qx.bom.Event.getTarget(bO);this.tryActivate(this.__kl(bP));},"default":null})),__kl:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"mshtml|webkit":function(bQ){var bR=this.getFocus();if(bR&&bQ!=bR&&(bR.nodeName.toLowerCase()===r||bR.nodeName.toLowerCase()===u)){bQ=bR;}return bQ;},"default":function(bS){return bS;}})),__km:qx.event.GlobalError.observeMethod(qx.core.Variant.select(j,{"mshtml|webkit":function(bT){var bU=qx.bom.Event.getTarget(bT);if(!this.__kq(bU)){qx.bom.Event.preventDefault(bT);}},"default":null})),__kn:function(bV){var bW=qx.bom.element.Attribute.get(bV,o);if(bW>=1){return true;}var bX=qx.event.handler.Focus.FOCUSABLE_ELEMENTS;if(bW>=0&&bX[bV.tagName]){return true;}return false;},__ko:function(bY){while(bY&&bY.nodeType===1){if(bY.getAttribute(k)==e){return null;}if(this.__kn(bY)){return bY;}bY=bY.parentNode;}return this._body;},__kp:function(ca){var cb=ca;while(ca&&ca.nodeType===1){if(ca.getAttribute(l)==e){return null;}ca=ca.parentNode;}return cb;},__kq:function(cc){while(cc&&cc.nodeType===1){var cd=cc.getAttribute(q);if(cd!=null){return cd===e;}cc=cc.parentNode;}return true;},_applyActive:function(ce,cf){if(cf){this.__kb(cf,ce,v,true);}if(ce){this.__kb(ce,cf,m,true);}},_applyFocus:function(cg,ch){if(ch){this.__kb(ch,cg,a,true);}if(cg){this.__kb(cg,ch,b,true);}if(ch){this.__kb(ch,cg,g,false);}if(cg){this.__kb(cg,ch,f,false);}}},destruct:function(){this._stopObserver();this._manager=this._window=this._document=this._root=this._body=this.__kr=null;},defer:function(ci){qx.event.Registration.addHandler(ci);var cj=ci.FOCUSABLE_ELEMENTS;for(var ck in cj){cj[ck.toUpperCase()]=1;}}});})();(function(){var k="qx.client",j="character",i="EndToEnd",h="input",g="textarea",f="StartToStart",e='character',d="qx.bom.Selection",c="button",b="#text",a="body";qx.Class.define(d,{statics:{getSelectionObject:qx.core.Variant.select(k,{"mshtml":function(l){return l.selection;},"default":function(m){return qx.dom.Node.getWindow(m).getSelection();}}),get:qx.core.Variant.select(k,{"mshtml":function(n){var o=qx.bom.Range.get(qx.dom.Node.getDocument(n));return o.text;},"default":function(p){if(this.__lf(p)){return p.value.substring(p.selectionStart,p.selectionEnd);}else{return this.getSelectionObject(qx.dom.Node.getDocument(p)).toString();}}}),getLength:qx.core.Variant.select(k,{"mshtml":function(q){var s=this.get(q);var r=qx.util.StringSplit.split(s,/\r\n/);return s.length-(r.length-1);},"opera":function(t){var y,w,u;if(this.__lf(t)){var x=t.selectionStart;var v=t.selectionEnd;y=t.value.substring(x,v);w=v-x;}else{y=qx.bom.Selection.get(t);w=y.length;}u=qx.util.StringSplit.split(y,/\r\n/);return w-(u.length-1);},"default":function(z){if(this.__lf(z)){return z.selectionEnd-z.selectionStart;}else{return this.get(z).length;}}}),getStart:qx.core.Variant.select(k,{"mshtml":function(A){if(this.__lf(A)){var F=qx.bom.Range.get();if(!A.contains(F.parentElement())){return -1;}var G=qx.bom.Range.get(A);var E=A.value.length;G.moveToBookmark(F.getBookmark());G.moveEnd(e,E);return E-G.text.length;}else{var G=qx.bom.Range.get(A);var C=G.parentElement();var H=qx.bom.Range.get();H.moveToElementText(C);var B=qx.bom.Range.get(qx.dom.Node.getBodyElement(A));B.setEndPoint(f,G);B.setEndPoint(i,H);if(H.compareEndPoints(f,B)==0){return 0;}var D;var I=0;while(true){D=B.moveStart(j,-1);if(H.compareEndPoints(f,B)==0){break;}if(D==0){break;}else{I++;}}return ++I;}},"gecko|webkit":function(J){if(this.__lf(J)){return J.selectionStart;}else{var L=qx.dom.Node.getDocument(J);var K=this.getSelectionObject(L);if(K.anchorOffset<K.focusOffset){return K.anchorOffset;}else{return K.focusOffset;}}},"default":function(M){if(this.__lf(M)){return M.selectionStart;}else{return qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(M)).anchorOffset;}}}),getEnd:qx.core.Variant.select(k,{"mshtml":function(N){if(this.__lf(N)){var S=qx.bom.Range.get();if(!N.contains(S.parentElement())){return -1;}var T=qx.bom.Range.get(N);var R=N.value.length;T.moveToBookmark(S.getBookmark());T.moveStart(e,-R);return T.text.length;}else{var T=qx.bom.Range.get(N);var P=T.parentElement();var U=qx.bom.Range.get();U.moveToElementText(P);var R=U.text.length;var O=qx.bom.Range.get(qx.dom.Node.getBodyElement(N));O.setEndPoint(i,T);O.setEndPoint(f,U);if(U.compareEndPoints(i,O)==0){return R-1;}var Q;var V=0;while(true){Q=O.moveEnd(j,1);if(U.compareEndPoints(i,O)==0){break;}if(Q==0){break;}else{V++;}}return R-(++V);}},"gecko|webkit":function(W){if(this.__lf(W)){return W.selectionEnd;}else{var Y=qx.dom.Node.getDocument(W);var X=this.getSelectionObject(Y);if(X.focusOffset>X.anchorOffset){return X.focusOffset;}else{return X.anchorOffset;}}},"default":function(ba){if(this.__lf(ba)){return ba.selectionEnd;}else{return qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(ba)).focusOffset;}}}),__lf:function(bb){return qx.dom.Node.isElement(bb)&&(bb.nodeName.toLowerCase()==h||bb.nodeName.toLowerCase()==g);},set:qx.core.Variant.select(k,{"mshtml":function(bc,bd,be){var bf;if(qx.dom.Node.isDocument(bc)){bc=bc.body;}if(qx.dom.Node.isElement(bc)||qx.dom.Node.isText(bc)){switch(bc.nodeName.toLowerCase()){case h:case g:case c:if(be===undefined){be=bc.value.length;}if(bd>=0&&bd<=bc.value.length&&be>=0&&be<=bc.value.length){bf=qx.bom.Range.get(bc);bf.collapse(true);bf.moveStart(j,bd);bf.moveEnd(j,be-bd);bf.select();return true;}break;case b:if(be===undefined){be=bc.nodeValue.length;}if(bd>=0&&bd<=bc.nodeValue.length&&be>=0&&be<=bc.nodeValue.length){bf=qx.bom.Range.get(qx.dom.Node.getBodyElement(bc));bf.moveToElementText(bc.parentNode);bf.collapse(true);bf.moveStart(j,bd);bf.moveEnd(j,be-bd);bf.select();return true;}break;default:if(be===undefined){be=bc.childNodes.length-1;}if(bc.childNodes[bd]&&bc.childNodes[be]){bf=qx.bom.Range.get(qx.dom.Node.getBodyElement(bc));bf.moveToElementText(bc.childNodes[bd]);bf.collapse(true);var bg=qx.bom.Range.get(qx.dom.Node.getBodyElement(bc));bg.moveToElementText(bc.childNodes[be]);bf.setEndPoint(i,bg);bf.select();return true;}}}return false;},"default":function(bh,bi,bj){var bn=bh.nodeName.toLowerCase();if(qx.dom.Node.isElement(bh)&&(bn==h||bn==g)){if(bj===undefined){bj=bh.value.length;}if(bi>=0&&bi<=bh.value.length&&bj>=0&&bj<=bh.value.length){bh.focus();bh.select();bh.setSelectionRange(bi,bj);return true;}}else{var bl=false;var bm=qx.dom.Node.getWindow(bh).getSelection();var bk=qx.bom.Range.get(bh);if(qx.dom.Node.isText(bh)){if(bj===undefined){bj=bh.length;}if(bi>=0&&bi<bh.length&&bj>=0&&bj<=bh.length){bl=true;}}else if(qx.dom.Node.isElement(bh)){if(bj===undefined){bj=bh.childNodes.length-1;}if(bi>=0&&bh.childNodes[bi]&&bj>=0&&bh.childNodes[bj]){bl=true;}}else if(qx.dom.Node.isDocument(bh)){bh=bh.body;if(bj===undefined){bj=bh.childNodes.length-1;}if(bi>=0&&bh.childNodes[bi]&&bj>=0&&bh.childNodes[bj]){bl=true;}}if(bl){if(!bm.isCollapsed){bm.collapseToStart();}bk.setStart(bh,bi);if(qx.dom.Node.isText(bh)){bk.setEnd(bh,bj);}else{bk.setEndAfter(bh.childNodes[bj]);}if(bm.rangeCount>0){bm.removeAllRanges();}bm.addRange(bk);return true;}}return false;}}),setAll:function(bo){return qx.bom.Selection.set(bo,0);},clear:qx.core.Variant.select(k,{"mshtml":function(bp){var bq=qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(bp));var br=qx.bom.Range.get(bp);var parent=br.parentElement();var bs=qx.bom.Range.get(qx.dom.Node.getDocument(bp));if(parent==bs.parentElement()&&parent==bp){bq.empty();}},"default":function(bt){var bv=qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(bt));var bx=bt.nodeName.toLowerCase();if(qx.dom.Node.isElement(bt)&&(bx==h||bx==g)){bt.setSelectionRange(0,0);qx.bom.Element.blur(bt);}else if(qx.dom.Node.isDocument(bt)||bx==a){bv.collapse(bt.body?bt.body:bt,0);}else{var bw=qx.bom.Range.get(bt);if(!bw.collapsed){var by;var bu=bw.commonAncestorContainer;if(qx.dom.Node.isElement(bt)&&qx.dom.Node.isText(bu)){by=bu.parentNode;}else{by=bu;}if(by==bt){bv.collapse(bt,0);}}}}})}});})();(function(){var l="button",k="qx.bom.Range",j="text",i="password",h="file",g="submit",f="reset",e="textarea",d="input",c="hidden",a="qx.client",b="body";qx.Class.define(k,{statics:{get:qx.core.Variant.select(a,{"mshtml":function(m){if(qx.dom.Node.isElement(m)){switch(m.nodeName.toLowerCase()){case d:switch(m.type){case j:case i:case c:case l:case f:case h:case g:return m.createTextRange();break;default:return qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(m)).createRange();}break;case e:case b:case l:return m.createTextRange();break;default:return qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(m)).createRange();}}else{if(m==null){m=window;}return qx.bom.Selection.getSelectionObject(qx.dom.Node.getDocument(m)).createRange();}},"default":function(n){var o=qx.dom.Node.getDocument(n);var p=qx.bom.Selection.getSelectionObject(o);if(p.rangeCount>0){return p.getRangeAt(0);}else{return o.createRange();}}})}});})();(function(){var j="",h="m",g="g",f="^",e="qx.util.StringSplit",d="i",c="$(?!\\s)",b="[object RegExp]",a="y";qx.Class.define(e,{statics:{split:function(k,l,m){if(Object.prototype.toString.call(l)!==b){return String.prototype.split.call(k,l,m);}var t=[],n=0,r=(l.ignoreCase?d:j)+(l.multiline?h:j)+(l.sticky?a:j),l=RegExp(l.source,r+g),q,u,o,p,s=/()??/.exec(j)[1]===undefined;k=k+j;if(!s){q=RegExp(f+l.source+c,r);}if(m===undefined||+m<0){m=Infinity;}else{m=Math.floor(+m);if(!m){return [];}}while(u=l.exec(k)){o=u.index+u[0].length;if(o>n){t.push(k.slice(n,u.index));if(!s&&u.length>1){u[0].replace(q,function(){for(var i=1;i<arguments.length-2;i++){if(arguments[i]===undefined){u[i]=undefined;}}});}if(u.length>1&&u.index<k.length){Array.prototype.push.apply(t,u.slice(1));}p=u[0].length;n=o;if(t.length>=m){break;}}if(l.lastIndex===u.index){l.lastIndex++;}}if(n===k.length){if(p||!l.test(j)){t.push(j);}}else{t.push(k.slice(n));}return t.length>m?t.slice(0,m):t;}}});})();(function(){var a="qx.event.type.Focus";qx.Class.define(a,{extend:qx.event.type.Event,members:{init:function(b,c,d){qx.event.type.Event.prototype.init.call(this,d,false);this._target=b;this._relatedTarget=c;return this;}}});})();(function(){var j="",i="undefined",h="qx.client",g="readOnly",f="accessKey",e="qx.bom.element.Attribute",d="rowSpan",c="vAlign",b="className",a="textContent",y="'",x="htmlFor",w="longDesc",v="cellSpacing",u="frameBorder",t="='",s="useMap",r="innerText",q="innerHTML",p="tabIndex",n="dateTime",o="maxLength",l="mshtml",m="cellPadding",k="colSpan";qx.Class.define(e,{statics:{__hb:{names:{"class":b,"for":x,html:q,text:qx.core.Variant.isSet(h,l)?r:a,colspan:k,rowspan:d,valign:c,datetime:n,accesskey:f,tabindex:p,maxlength:o,readonly:g,longdesc:w,cellpadding:m,cellspacing:v,frameborder:u,usemap:s},runtime:{"html":1,"text":1},bools:{compact:1,nowrap:1,ismap:1,declare:1,noshade:1,checked:1,disabled:1,readOnly:1,multiple:1,selected:1,noresize:1,defer:1,allowTransparency:1},property:{$$html:1,$$widget:1,disabled:1,checked:1,readOnly:1,multiple:1,selected:1,value:1,maxLength:1,className:1,innerHTML:1,innerText:1,textContent:1,htmlFor:1,tabIndex:1},qxProperties:{$$widget:1,$$html:1},propertyDefault:{disabled:false,checked:false,readOnly:false,multiple:false,selected:false,value:j,className:j,innerHTML:j,innerText:j,textContent:j,htmlFor:j,tabIndex:0,maxLength:qx.core.Variant.select(h,{"mshtml":2147483647,"webkit":524288,"default":-1})},removeableProperties:{disabled:1,multiple:1,maxLength:1},original:{href:1,src:1,type:1}},compile:function(z){var A=[];var C=this.__hb.runtime;for(var B in z){if(!C[B]){A.push(B,t,z[B],y);}}return A.join(j);},get:qx.core.Variant.select(h,{"mshtml":function(D,name){var F=this.__hb;var E;name=F.names[name]||name;if(F.original[name]){E=D.getAttribute(name,2);}else if(F.property[name]){E=D[name];if(typeof F.propertyDefault[name]!==i&&E==F.propertyDefault[name]){if(typeof F.bools[name]===i){return null;}else{return E;}}}else{E=D.getAttribute(name);}if(F.bools[name]){return !!E;}return E;},"default":function(G,name){var I=this.__hb;var H;name=I.names[name]||name;if(I.property[name]){H=G[name];if(typeof I.propertyDefault[name]!==i&&H==I.propertyDefault[name]){if(typeof I.bools[name]===i){return null;}else{return H;}}}else{H=G.getAttribute(name);}if(I.bools[name]){return !!H;}return H;}}),set:function(J,name,K){if(typeof K===i){return;}var L=this.__hb;name=L.names[name]||name;if(L.bools[name]){K=!!K;}if(L.property[name]&&(!(J[name]===undefined)||L.qxProperties[name])){if(K==null){if(L.removeableProperties[name]){J.removeAttribute(name);return;}else if(typeof L.propertyDefault[name]!==i){K=L.propertyDefault[name];}}J[name]=K;}else{if(K===true){J.setAttribute(name,name);}else if(K===false||K===null){J.removeAttribute(name);}else{J.setAttribute(name,K);}}},reset:function(M,name){this.set(M,name,null);}}});})();(function(){var a="qx.event.type.Drag";qx.Class.define(a,{extend:qx.event.type.Event,members:{init:function(b,c){qx.event.type.Event.prototype.init.call(this,true,b);if(c){this._native=c.getNativeEvent()||null;this._originalTarget=c.getTarget()||null;}else{this._native=null;this._originalTarget=null;}return this;},clone:function(d){var e=qx.event.type.Event.prototype.clone.call(this,d);e._native=this._native;return e;},getDocumentLeft:function(){if(this._native==null){return 0;}if(this._native.pageX!==undefined){return this._native.pageX;}else{var f=qx.dom.Node.getWindow(this._native.srcElement);return this._native.clientX+qx.bom.Viewport.getScrollLeft(f);}},getDocumentTop:function(){if(this._native==null){return 0;}if(this._native.pageY!==undefined){return this._native.pageY;}else{var g=qx.dom.Node.getWindow(this._native.srcElement);return this._native.clientY+qx.bom.Viewport.getScrollTop(g);}},getManager:function(){return qx.event.Registration.getManager(this.getTarget()).getHandler(qx.event.handler.DragDrop);},addType:function(h){this.getManager().addType(h);},addAction:function(i){this.getManager().addAction(i);},supportsType:function(j){return this.getManager().supportsType(j);},supportsAction:function(k){return this.getManager().supportsAction(k);},addData:function(l,m){this.getManager().addData(l,m);},getData:function(n){return this.getManager().getData(n);},getCurrentType:function(){return this.getManager().getCurrentType();},getCurrentAction:function(){return this.getManager().getCurrentAction();}}});})();(function(){var h="interval",g="qx.event.Timer",f="_applyInterval",d="_applyEnabled",c="Boolean",b="qx.event.type.Event",a="Integer";qx.Class.define(g,{extend:qx.core.Object,construct:function(i){qx.core.Object.call(this);this.setEnabled(false);if(i!=null){this.setInterval(i);}var self=this;this.__ey=function(){self._oninterval.call(self);};},events:{"interval":b},statics:{once:function(j,k,l){var m=new qx.event.Timer(l);m.__ez=j;m.addListener(h,function(e){m.stop();j.call(k,e);m.dispose();k=null;},k);m.start();return m;}},properties:{enabled:{init:true,check:c,apply:d},interval:{check:a,init:1000,apply:f}},members:{__eA:null,__ey:null,_applyInterval:function(n,o){if(this.getEnabled()){this.restart();}},_applyEnabled:function(p,q){if(q){window.clearInterval(this.__eA);this.__eA=null;}else if(p){this.__eA=window.setInterval(this.__ey,this.getInterval());}},start:function(){this.setEnabled(true);},startWith:function(r){this.setInterval(r);this.start();},stop:function(){this.setEnabled(false);},restart:function(){this.stop();this.start();},restartWith:function(s){this.stop();this.startWith(s);},_oninterval:qx.event.GlobalError.observeMethod(function(){if(this.$$disposed){return;}if(this.getEnabled()){this.fireEvent(h);}})},destruct:function(){if(this.__eA){window.clearInterval(this.__eA);}this.__eA=this.__ey=null;}});})();(function(){var h="losecapture",g="qx.client",f="blur",e="focus",d="click",c="qx.event.dispatch.MouseCapture",b="capture",a="scroll";qx.Class.define(c,{extend:qx.event.dispatch.AbstractBubbling,construct:function(i,j){qx.event.dispatch.AbstractBubbling.call(this,i);this.__ix=i.getWindow();this.__iy=j;i.addListener(this.__ix,f,this.releaseCapture,this);i.addListener(this.__ix,e,this.releaseCapture,this);i.addListener(this.__ix,a,this.releaseCapture,this);},statics:{PRIORITY:qx.event.Registration.PRIORITY_FIRST},members:{__iy:null,__iz:null,__iA:true,__ix:null,_getParent:function(k){return k.parentNode;},canDispatchEvent:function(l,event,m){return (this.__iz&&this.__iB[m]);},dispatchEvent:function(n,event,o){if(o==d){event.stopPropagation();this.releaseCapture();return;}if(this.__iA||!qx.dom.Hierarchy.contains(this.__iz,n)){n=this.__iz;}qx.event.dispatch.AbstractBubbling.prototype.dispatchEvent.call(this,n,event,o);},__iB:{"mouseup":1,"mousedown":1,"click":1,"dblclick":1,"mousemove":1,"mouseout":1,"mouseover":1},activateCapture:function(p,q){var q=q!==false;if(this.__iz===p&&this.__iA==q){return;}if(this.__iz){this.releaseCapture();}this.nativeSetCapture(p,q);if(this.hasNativeCapture){var self=this;qx.bom.Event.addNativeListener(p,h,function(){qx.bom.Event.removeNativeListener(p,h,arguments.callee);self.releaseCapture();});}this.__iA=q;this.__iz=p;this.__iy.fireEvent(p,b,qx.event.type.Event,[true,false]);},getCaptureElement:function(){return this.__iz;},releaseCapture:function(){var r=this.__iz;if(!r){return;}this.__iz=null;this.__iy.fireEvent(r,h,qx.event.type.Event,[true,false]);this.nativeReleaseCapture(r);},hasNativeCapture:qx.bom.client.Engine.MSHTML,nativeSetCapture:qx.core.Variant.select(g,{"mshtml":function(s,t){qx.event.Timer.once(function(){s.setCapture(t!==false);},this,0);},"default":qx.lang.Function.empty}),nativeReleaseCapture:qx.core.Variant.select(g,{"mshtml":function(u){qx.event.Timer.once(function(){u.releaseCapture();},this,0);},"default":qx.lang.Function.empty})},destruct:function(){this.__iz=this.__ix=this.__iy=null;},defer:function(v){qx.event.Registration.addDispatcher(v);}});})();(function(){var a="qx.event.handler.Window";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(b){qx.core.Object.call(this);this._manager=b;this._window=b.getWindow();this._initWindowObserver();},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{error:1,load:1,beforeunload:1,unload:1,resize:1,scroll:1,beforeshutdown:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_WINDOW,IGNORE_CAN_HANDLE:true},members:{canHandleEvent:function(c,d){},registerEvent:function(f,g,h){},unregisterEvent:function(i,j,k){},_initWindowObserver:function(){this._onNativeWrapper=qx.lang.Function.listener(this._onNative,this);var m=qx.event.handler.Window.SUPPORTED_TYPES;for(var l in m){qx.bom.Event.addNativeListener(this._window,l,this._onNativeWrapper);}},_stopWindowObserver:function(){var o=qx.event.handler.Window.SUPPORTED_TYPES;for(var n in o){qx.bom.Event.removeNativeListener(this._window,n,this._onNativeWrapper);}},_onNative:qx.event.GlobalError.observeMethod(function(e){if(this.isDisposed()){return;}var q=this._window;try{var t=q.document;}catch(e){return ;}var r=t.documentElement;var p=qx.bom.Event.getTarget(e);if(p==null||p===q||p===t||p===r){var event=qx.event.Registration.createEvent(e.type,qx.event.type.Native,[e,q]);qx.event.Registration.dispatchEvent(q,event);var s=event.getReturnValue();if(s!=null){e.returnValue=s;return s;}}})},destruct:function(){this._stopWindowObserver();this._manager=this._window=null;},defer:function(u){qx.event.Registration.addHandler(u);}});})();(function(){var c="qx.bom.Selector";qx.Class.define(c,{statics:{query:null,matches:null}});(function(){var o=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,v=0,r=Object.prototype.toString,p=false,x=true;[0,0].sort(function(){x=false;return 0;});var g=function(z,A,B,C){B=B||[];A=A||document;var L=A;if(A.nodeType!==1&&A.nodeType!==9){return [];}if(!z||typeof z!=="string"){return B;}var m,F,D,H,J,G,M,i,N=true,E=g.isXML(A),I=[],K=z;do{o.exec("");m=o.exec(K);if(m){K=m[3];I.push(m[1]);if(m[2]){H=m[3];break;}}}while(m);if(I.length>1&&q.exec(z)){if(I.length===2&&k.relative[I[0]]){F=h(I[0]+I[1],A);}else{F=k.relative[I[0]]?[A]:g(I.shift(),A);while(I.length){z=I.shift();if(k.relative[z]){z+=I.shift();}F=h(z,F);}}}else{if(!C&&I.length>1&&A.nodeType===9&&!E&&k.match.ID.test(I[0])&&!k.match.ID.test(I[I.length-1])){J=g.find(I.shift(),A,E);A=J.expr?g.filter(J.expr,J.set)[0]:J.set[0];}if(A){J=C?{expr:I.pop(),set:f(C)}:g.find(I.pop(),I.length===1&&(I[0]==="~"||I[0]==="+")&&A.parentNode?A.parentNode:A,E);F=J.expr?g.filter(J.expr,J.set):J.set;if(I.length>0){D=f(F);}else{N=false;}while(I.length){G=I.pop();M=G;if(!k.relative[G]){G="";}else{M=I.pop();}if(M==null){M=A;}k.relative[G](D,M,E);}}else{D=I=[];}}if(!D){D=F;}if(!D){g.error(G||z);}if(r.call(D)==="[object Array]"){if(!N){B.push.apply(B,D);}else if(A&&A.nodeType===1){for(i=0;D[i]!=null;i++){if(D[i]&&(D[i]===true||D[i].nodeType===1&&g.contains(A,D[i]))){B.push(F[i]);}}}else{for(i=0;D[i]!=null;i++){if(D[i]&&D[i].nodeType===1){B.push(F[i]);}}}}else{f(D,B);}if(H){g(H,L,B,C);g.uniqueSort(B);}return B;};g.uniqueSort=function(O){if(s){p=x;O.sort(s);if(p){for(var i=1;i<O.length;i++){if(O[i]===O[i-1]){O.splice(i--,1);}}}}return O;};g.matches=function(P,Q){return g(P,null,null,Q);};g.matchesSelector=function(R,S){return g(S,null,null,[R]).length>0;};g.find=function(T,U,V){var W;if(!T){return [];}for(var i=0,l=k.order.length;i<l;i++){var Y,X=k.order[i];if((Y=k.leftMatch[X].exec(T))){var ba=Y[1];Y.splice(1,1);if(ba.substr(ba.length-1)!=="\\"){Y[1]=(Y[1]||"").replace(/\\/g,"");W=k.find[X](Y,U,V);if(W!=null){T=T.replace(k.match[X],"");break;}}}}if(!W){W=U.getElementsByTagName("*");}return {set:W,expr:T};};g.filter=function(bb,bc,bd,be){var br,bq,bf=bb,bk=[],bg=bc,bh=bc&&bc[0]&&g.isXML(bc[0]);while(bb&&bc.length){for(var bo in k.filter){if((br=k.leftMatch[bo].exec(bb))!=null&&br[2]){var bn,bj,bi=k.filter[bo],bs=br[1];bq=false;br.splice(1,1);if(bs.substr(bs.length-1)==="\\"){continue;}if(bg===bk){bk=[];}if(k.preFilter[bo]){br=k.preFilter[bo](br,bg,bd,bk,be,bh);if(!br){bq=bn=true;}else if(br===true){continue;}}if(br){for(var i=0;(bj=bg[i])!=null;i++){if(bj){bn=bi(bj,br,i,bg);var bm=be^!!bn;if(bd&&bn!=null){if(bm){bq=true;}else{bg[i]=false;}}else if(bm){bk.push(bj);bq=true;}}}}if(bn!==undefined){if(!bd){bg=bk;}bb=bb.replace(k.match[bo],"");if(!bq){return [];}break;}}}if(bb===bf){if(bq==null){g.error(bb);}else{break;}}bf=bb;}return bg;};g.error=function(bt){throw "Syntax error, unrecognized expression: "+bt;};var k=g.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(bu){return bu.getAttribute("href");}},relative:{"+":function(bv,bw){var bx=typeof bw==="string",bz=bx&&!/\W/.test(bw),bA=bx&&!bz;if(bz){bw=bw.toLowerCase();}for(var i=0,l=bv.length,by;i<l;i++){if((by=bv[i])){while((by=by.previousSibling)&&by.nodeType!==1){}bv[i]=bA||by&&by.nodeName.toLowerCase()===bw?by||false:by===bw;}}if(bA){g.filter(bw,bv,true);}},">":function(bB,bC){var bE,bD=typeof bC==="string",i=0,l=bB.length;if(bD&&!/\W/.test(bC)){bC=bC.toLowerCase();for(;i<l;i++){bE=bB[i];if(bE){var parent=bE.parentNode;bB[i]=parent.nodeName.toLowerCase()===bC?parent:false;}}}else{for(;i<l;i++){bE=bB[i];if(bE){bB[i]=bD?bE.parentNode:bE.parentNode===bC;}}if(bD){g.filter(bC,bB,true);}}},"":function(bF,bG,bH){var bK,bI=v++,bJ=w;if(typeof bG==="string"&&!/\W/.test(bG)){bG=bG.toLowerCase();bK=bG;bJ=y;}bJ("parentNode",bG,bI,bF,bK,bH);},"~":function(bL,bM,bN){var bQ,bO=v++,bP=w;if(typeof bM==="string"&&!/\W/.test(bM)){bM=bM.toLowerCase();bQ=bM;bP=y;}bP("previousSibling",bM,bO,bL,bQ,bN);}},find:{ID:function(bR,bS,bT){if(typeof bS.getElementById!=="undefined"&&!bT){var m=bS.getElementById(bR[1]);return m&&m.parentNode?[m]:[];}},NAME:function(bU,bV){if(typeof bV.getElementsByName!=="undefined"){var bX=[],bW=bV.getElementsByName(bU[1]);for(var i=0,l=bW.length;i<l;i++){if(bW[i].getAttribute("name")===bU[1]){bX.push(bW[i]);}}return bX.length===0?null:bX;}},TAG:function(bY,ca){return ca.getElementsByTagName(bY[1]);}},preFilter:{CLASS:function(cb,cc,cd,ce,cf,cg){cb=" "+cb[1].replace(/\\/g,"")+" ";if(cg){return cb;}for(var i=0,ch;(ch=cc[i])!=null;i++){if(ch){if(cf^(ch.className&&(" "+ch.className+" ").replace(/[\t\n]/g," ").indexOf(cb)>=0)){if(!cd){ce.push(ch);}}else if(cd){cc[i]=false;}}}return false;},ID:function(ci){return ci[1].replace(/\\/g,"");},TAG:function(cj,ck){return cj[1].toLowerCase();},CHILD:function(cl){if(cl[1]==="nth"){var cm=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(cl[2]==="even"&&"2n"||cl[2]==="odd"&&"2n+1"||!/\D/.test(cl[2])&&"0n+"+cl[2]||cl[2]);cl[2]=(cm[1]+(cm[2]||1))-0;cl[3]=cm[3]-0;}cl[0]=v++;return cl;},ATTR:function(cn,co,cp,cq,cr,cs){var name=cn[1].replace(/\\/g,"");if(!cs&&k.attrMap[name]){cn[1]=k.attrMap[name];}if(cn[2]==="~="){cn[4]=" "+cn[4]+" ";}return cn;},PSEUDO:function(ct,cu,cv,cw,cx){if(ct[1]==="not"){if((o.exec(ct[3])||"").length>1||/^\w/.test(ct[3])){ct[3]=g(ct[3],null,null,cu);}else{var cy=g.filter(ct[3],cu,cv,true^cx);if(!cv){cw.push.apply(cw,cy);}return false;}}else if(k.match.POS.test(ct[0])||k.match.CHILD.test(ct[0])){return true;}return ct;},POS:function(cz){cz.unshift(true);return cz;}},filters:{enabled:function(cA){return cA.disabled===false&&cA.type!=="hidden";},disabled:function(cB){return cB.disabled===true;},checked:function(cC){return cC.checked===true;},selected:function(cD){cD.parentNode.selectedIndex;return cD.selected===true;},parent:function(cE){return !!cE.firstChild;},empty:function(cF){return !cF.firstChild;},has:function(cG,i,cH){return !!g(cH[3],cG).length;},header:function(cI){return (/h\d/i).test(cI.nodeName);},text:function(cJ){return "text"===cJ.type;},radio:function(cK){return "radio"===cK.type;},checkbox:function(cL){return "checkbox"===cL.type;},file:function(cM){return "file"===cM.type;},password:function(cN){return "password"===cN.type;},submit:function(cO){return "submit"===cO.type;},image:function(cP){return "image"===cP.type;},reset:function(cQ){return "reset"===cQ.type;},button:function(cR){return "button"===cR.type||cR.nodeName.toLowerCase()==="button";},input:function(cS){return (/input|select|textarea|button/i).test(cS.nodeName);}},setFilters:{first:function(cT,i){return i===0;},last:function(cU,i,cV,cW){return i===cW.length-1;},even:function(cX,i){return i%2===0;},odd:function(cY,i){return i%2===1;},lt:function(da,i,db){return i<db[3]-0;},gt:function(dc,i,dd){return i>dd[3]-0;},nth:function(de,i,df){return df[3]-0===i;},eq:function(dg,i,dh){return dh[3]-0===i;}},filter:{PSEUDO:function(di,dj,i,dk){var name=dj[1],dl=k.filters[name];if(dl){return dl(di,i,dj,dk);}else if(name==="contains"){return (di.textContent||di.innerText||g.getText([di])||"").indexOf(dj[3])>=0;}else if(name==="not"){var dm=dj[3];for(var j=0,l=dm.length;j<l;j++){if(dm[j]===di){return false;}}return true;}else{g.error("Syntax error, unrecognized expression: "+name);}},CHILD:function(dn,dp){var dv=dp[1],dq=dn;switch(dv){case "only":case "first":while((dq=dq.previousSibling)){if(dq.nodeType===1){return false;}}if(dv==="first"){return true;}dq=dn;case "last":while((dq=dq.nextSibling)){if(dq.nodeType===1){return false;}}return true;case "nth":var dw=dp[2],ds=dp[3];if(dw===1&&ds===0){return true;}var du=dp[0],parent=dn.parentNode;if(parent&&(parent.sizcache!==du||!dn.nodeIndex)){var dr=0;for(dq=parent.firstChild;dq;dq=dq.nextSibling){if(dq.nodeType===1){dq.nodeIndex=++dr;}}parent.sizcache=du;}var dt=dn.nodeIndex-ds;if(dw===0){return dt===0;}else{return (dt%dw===0&&dt/dw>=0);}}},ID:function(dx,dy){return dx.nodeType===1&&dx.getAttribute("id")===dy;},TAG:function(dz,dA){return (dA==="*"&&dz.nodeType===1)||dz.nodeName.toLowerCase()===dA;},CLASS:function(dB,dC){return (" "+(dB.className||dB.getAttribute("class"))+" ").indexOf(dC)>-1;},ATTR:function(dD,dE){var name=dE[1],dI=k.attrHandle[name]?k.attrHandle[name](dD):dD[name]!=null?dD[name]:dD.getAttribute(name),dH=dI+"",dG=dE[2],dF=dE[4];return dI==null?dG==="!=":dG==="="?dH===dF:dG==="*="?dH.indexOf(dF)>=0:dG==="~="?(" "+dH+" ").indexOf(dF)>=0:!dF?dH&&dI!==false:dG==="!="?dH!==dF:dG==="^="?dH.indexOf(dF)===0:dG==="$="?dH.substr(dH.length-dF.length)===dF:dG==="|="?dH===dF||dH.substr(0,dF.length+1)===dF+"-":false;},POS:function(dJ,dK,i,dL){var name=dK[2],dM=k.setFilters[name];if(dM){return dM(dJ,i,dK,dL);}}}};var q=k.match.POS,d=function(dN,dO){return "\\"+(dO-0+1);};for(var u in k.match){k.match[u]=new RegExp(k.match[u].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[u].source.replace(/\\(\d+)/g,d));}var f=function(dP,dQ){dP=Array.prototype.slice.call(dP,0);if(dQ){dQ.push.apply(dQ,dP);return dQ;}return dP;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){f=function(dR,dS){var i=0,dT=dS||[];if(r.call(dR)==="[object Array]"){Array.prototype.push.apply(dT,dR);}else{if(typeof dR.length==="number"){for(var l=dR.length;i<l;i++){dT.push(dR[i]);}}else{for(;dR[i];i++){dT.push(dR[i]);}}}return dT;};}var s,n;if(document.documentElement.compareDocumentPosition){s=function(a,b){if(a===b){p=true;return 0;}if(!a.compareDocumentPosition||!b.compareDocumentPosition){return a.compareDocumentPosition?-1:1;}return a.compareDocumentPosition(b)&4?-1:1;};}else{s=function(a,b){var dY,dW,ea=[],eb=[],dV=a.parentNode,dX=b.parentNode,dU=dV;if(a===b){p=true;return 0;}else if(dV===dX){return n(a,b);}else if(!dV){return -1;}else if(!dX){return 1;}while(dU){ea.unshift(dU);dU=dU.parentNode;}dU=dX;while(dU){eb.unshift(dU);dU=dU.parentNode;}dY=ea.length;dW=eb.length;for(var i=0;i<dY&&i<dW;i++){if(ea[i]!==eb[i]){return n(ea[i],eb[i]);}}return i===dY?n(a,eb[i],-1):n(ea[i],b,1);};n=function(a,b,ec){if(a===b){return ec;}var ed=a.nextSibling;while(ed){if(ed===b){return -1;}ed=ed.nextSibling;}return 1;};}g.getText=function(ee){var eg="",ef;for(var i=0;ee[i];i++){ef=ee[i];if(ef.nodeType===3||ef.nodeType===4){eg+=ef.nodeValue;}else if(ef.nodeType!==8){eg+=g.getText(ef.childNodes);}}return eg;};(function(){var ej=document.createElement("div"),ei="script"+(new Date()).getTime(),eh=document.documentElement;ej.innerHTML="<a name='"+ei+"'/>";eh.insertBefore(ej,eh.firstChild);if(document.getElementById(ei)){k.find.ID=function(ek,el,em){if(typeof el.getElementById!=="undefined"&&!em){var m=el.getElementById(ek[1]);return m?m.id===ek[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===ek[1]?[m]:undefined:[];}};k.filter.ID=function(en,eo){var ep=typeof en.getAttributeNode!=="undefined"&&en.getAttributeNode("id");return en.nodeType===1&&ep&&ep.nodeValue===eo;};}eh.removeChild(ej);eh=ej=null;})();(function(){var eq=document.createElement("div");eq.appendChild(document.createComment(""));if(eq.getElementsByTagName("*").length>0){k.find.TAG=function(er,es){var eu=es.getElementsByTagName(er[1]);if(er[1]==="*"){var et=[];for(var i=0;eu[i];i++){if(eu[i].nodeType===1){et.push(eu[i]);}}eu=et;}return eu;};}eq.innerHTML="<a href='#'></a>";if(eq.firstChild&&typeof eq.firstChild.getAttribute!=="undefined"&&eq.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(ev){return ev.getAttribute("href",2);};}eq=null;})();if(document.querySelectorAll){(function(){var ex=g,ew=document.createElement("div"),ey="__sizzle__";ew.innerHTML="<p class='TEST'></p>";if(ew.querySelectorAll&&ew.querySelectorAll(".TEST").length===0){return;}g=function(eA,eB,eC,eD){eB=eB||document;eA=eA.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!eD&&!g.isXML(eB)){if(eB.nodeType===9){try{return f(eB.querySelectorAll(eA),eC);}catch(eG){}}else if(eB.nodeType===1&&eB.nodeName.toLowerCase()!=="object"){var eE=eB.getAttribute("id"),eF=eE||ey;if(!eE){eB.setAttribute("id",eF);}try{return f(eB.querySelectorAll("#"+eF+" "+eA),eC);}catch(eH){}finally{if(!eE){eB.removeAttribute("id");}}}}return ex(eA,eB,eC,eD);};for(var ez in ex){g[ez]=ex[ez];}ew=null;})();}(function(){var eK=document.documentElement,eI=eK.matchesSelector||eK.mozMatchesSelector||eK.webkitMatchesSelector||eK.msMatchesSelector,eJ=false;try{eI.call(document.documentElement,"[test!='']:sizzle");}catch(eL){eJ=true;}if(eI){g.matchesSelector=function(eM,eN){eN=eN.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!g.isXML(eM)){try{if(eJ||!k.match.PSEUDO.test(eN)&&!/!=/.test(eN)){return eI.call(eM,eN);}}catch(e){}}return g(eN,null,null,[eM]).length>0;};}})();(function(){var eO=document.createElement("div");eO.innerHTML="<div class='test e'></div><div class='test'></div>";if(!eO.getElementsByClassName||eO.getElementsByClassName("e").length===0){return;}eO.lastChild.className="e";if(eO.getElementsByClassName("e").length===1){return;}k.order.splice(1,0,"CLASS");k.find.CLASS=function(eP,eQ,eR){if(typeof eQ.getElementsByClassName!=="undefined"&&!eR){return eQ.getElementsByClassName(eP[1]);}};eO=null;})();function y(eS,eT,eU,eV,eW,eX){for(var i=0,l=eV.length;i<l;i++){var fa=eV[i];if(fa){var eY=false;fa=fa[eS];while(fa){if(fa.sizcache===eU){eY=eV[fa.sizset];break;}if(fa.nodeType===1&&!eX){fa.sizcache=eU;fa.sizset=i;}if(fa.nodeName.toLowerCase()===eT){eY=fa;break;}fa=fa[eS];}eV[i]=eY;}}}function w(fb,fc,fd,fe,ff,fg){for(var i=0,l=fe.length;i<l;i++){var fi=fe[i];if(fi){var fh=false;fi=fi[fb];while(fi){if(fi.sizcache===fd){fh=fe[fi.sizset];break;}if(fi.nodeType===1){if(!fg){fi.sizcache=fd;fi.sizset=i;}if(typeof fc!=="string"){if(fi===fc){fh=true;break;}}else if(g.filter(fc,[fi]).length>0){fh=fi;break;}}fi=fi[fb];}fe[i]=fh;}}}if(document.documentElement.contains){g.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true);};}else if(document.documentElement.compareDocumentPosition){g.contains=function(a,b){return !!(a.compareDocumentPosition(b)&16);};}else{g.contains=function(){return false;};}g.isXML=function(fj){var fk=(fj?fj.ownerDocument||fj:0).documentElement;return fk?fk.nodeName!=="HTML":false;};var h=function(fl,fm){var fq,fo=[],fn="",fp=fm.nodeType?[fm]:fm;while((fq=k.match.PSEUDO.exec(fl))){fn+=fq[0];fl=fl.replace(k.match.PSEUDO,"");}fl=k.relative[fl]?fl+"*":fl;for(var i=0,l=fp.length;i<l;i++){g(fl,fp[i],fo);}return g.filter(fn,fo);};var t=qx.bom.Selector;t.query=function(fr,fs){return g(fr,fs);};t.matches=function(ft,fu){return g(ft,null,null,fu);};})();})();(function(){var r="qx.client",q="",p="mshtml",o="'",n="SelectionLanguage",m="qx.xml.Document",k=" />",j="MSXML2.DOMDocument.3.0",h='<\?xml version="1.0" encoding="utf-8"?>\n<',g="MSXML2.XMLHTTP.3.0",c="MSXML2.XMLHTTP.6.0",f=" xmlns='",e="text/xml",b="XPath",a="MSXML2.DOMDocument.6.0",d="HTML";qx.Class.define(m,{statics:{DOMDOC:null,XMLHTTP:null,isXmlDocument:function(s){if(s.nodeType===9){return s.documentElement.nodeName!==d;}else if(s.ownerDocument){return this.isXmlDocument(s.ownerDocument);}else{return false;}},create:qx.core.Variant.select(r,{"mshtml":function(t,u){var v=new ActiveXObject(this.DOMDOC);v.setProperty(n,b);if(u){var w=h;w+=u;if(t){w+=f+t+o;}w+=k;v.loadXML(w);}return v;},"default":function(x,y){return document.implementation.createDocument(x||q,y||q,null);}}),fromString:qx.core.Variant.select(r,{"mshtml":function(z){var A=qx.xml.Document.create();A.loadXML(z);return A;},"default":function(B){var C=new DOMParser();return C.parseFromString(B,e);}})},defer:function(D){if(qx.core.Variant.isSet(r,p)){var E=[a,j];var F=[c,g];for(var i=0,l=E.length;i<l;i++){try{new ActiveXObject(E[i]);new ActiveXObject(F[i]);}catch(G){continue;}D.DOMDOC=E[i];D.XMLHTTP=F[i];break;}}}});})();(function(){var k="visible",j="scroll",i="borderBottomWidth",h="borderTopWidth",g="left",f="borderLeftWidth",e="bottom",d="top",c="right",b="qx.bom.element.Scroll",a="borderRightWidth";qx.Class.define(b,{statics:{intoViewX:function(l,stop,m){var parent=l.parentNode;var r=qx.dom.Node.getDocument(l);var n=r.body;var z,x,u;var B,s,C;var v,D,G;var E,p,y,o;var t,F,w;var q=m===g;var A=m===c;stop=stop?stop.parentNode:r;while(parent&&parent!=stop){if(parent.scrollWidth>parent.clientWidth&&(parent===n||qx.bom.element.Overflow.getY(parent)!=k)){if(parent===n){x=parent.scrollLeft;u=x+qx.bom.Viewport.getWidth();B=qx.bom.Viewport.getWidth();s=parent.clientWidth;C=parent.scrollWidth;v=0;D=0;G=0;}else{z=qx.bom.element.Location.get(parent);x=z.left;u=z.right;B=parent.offsetWidth;s=parent.clientWidth;C=parent.scrollWidth;v=parseInt(qx.bom.element.Style.get(parent,f),10)||0;D=parseInt(qx.bom.element.Style.get(parent,a),10)||0;G=B-s-v-D;}E=qx.bom.element.Location.get(l);p=E.left;y=E.right;o=l.offsetWidth;t=p-x-v;F=y-u+D;w=0;if(q){w=t;}else if(A){w=F+G;}else if(t<0||o>s){w=t;}else if(F>0){w=F+G;}parent.scrollLeft+=w;if(qx.bom.client.Engine.GECKO||qx.bom.client.Engine.OPERA){qx.event.Registration.fireNonBubblingEvent(parent,j);}}if(parent===n){break;}parent=parent.parentNode;}},intoViewY:function(H,stop,I){var parent=H.parentNode;var O=qx.dom.Node.getDocument(H);var J=O.body;var W,K,S;var Y,V,Q;var M,N,L;var bb,bc,X,R;var U,P,bd;var ba=I===d;var T=I===e;stop=stop?stop.parentNode:O;while(parent&&parent!=stop){if(parent.scrollHeight>parent.clientHeight&&(parent===J||qx.bom.element.Overflow.getY(parent)!=k)){if(parent===J){K=parent.scrollTop;S=K+qx.bom.Viewport.getHeight();Y=qx.bom.Viewport.getHeight();V=parent.clientHeight;Q=parent.scrollHeight;M=0;N=0;L=0;}else{W=qx.bom.element.Location.get(parent);K=W.top;S=W.bottom;Y=parent.offsetHeight;V=parent.clientHeight;Q=parent.scrollHeight;M=parseInt(qx.bom.element.Style.get(parent,h),10)||0;N=parseInt(qx.bom.element.Style.get(parent,i),10)||0;L=Y-V-M-N;}bb=qx.bom.element.Location.get(H);bc=bb.top;X=bb.bottom;R=H.offsetHeight;U=bc-K-M;P=X-S+N;bd=0;if(ba){bd=U;}else if(T){bd=P+L;}else if(U<0||R>V){bd=U;}else if(P>0){bd=P+L;}parent.scrollTop+=bd;if(qx.bom.client.Engine.GECKO||qx.bom.client.Engine.OPERA){qx.event.Registration.fireNonBubblingEvent(parent,j);}}if(parent===J){break;}parent=parent.parentNode;}},intoView:function(be,stop,bf,bg){this.intoViewX(be,stop,bf);this.intoViewY(be,stop,bg);}}});})();(function(){var k="",j="qx.client",i="hidden",h="-moz-scrollbars-none",g="overflow",f=";",e="overflowY",d=":",b="overflowX",a="overflow:",y="none",x="scroll",w="borderLeftStyle",v="borderRightStyle",u="div",r="borderRightWidth",q="overflow-y",p="borderLeftWidth",o="-moz-scrollbars-vertical",n="100px",l="qx.bom.element.Overflow",m="overflow-x";qx.Class.define(l,{statics:{__kL:null,getScrollbarWidth:function(){if(this.__kL!==null){return this.__kL;}var z=qx.bom.element.Style;var B=function(F,G){return parseInt(z.get(F,G),10)||0;};var C=function(H){return (z.get(H,v)==y?0:B(H,r));};var A=function(I){return (z.get(I,w)==y?0:B(I,p));};var E=qx.core.Variant.select(j,{"mshtml":function(J){if(z.get(J,e)==i||J.clientWidth==0){return C(J);}return Math.max(0,J.offsetWidth-J.clientLeft-J.clientWidth);},"default":function(K){if(K.clientWidth==0){var L=z.get(K,g);var M=(L==x||L==o?16:0);return Math.max(0,C(K)+M);}return Math.max(0,(K.offsetWidth-K.clientWidth-A(K)));}});var D=function(N){return E(N)-C(N);};var t=document.createElement(u);var s=t.style;s.height=s.width=n;s.overflow=x;document.body.appendChild(t);var c=D(t);this.__kL=c?c:16;document.body.removeChild(t);return this.__kL;},_compile:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(O,P){if(P==i){P=h;}return a+P+f;}:function(Q,R){return Q+d+R+f;},"opera":qx.bom.client.Engine.VERSION<9.5?function(S,T){return a+T+f;}:function(U,V){return U+d+V+f;},"default":function(W,X){return W+d+X+f;}}),compileX:function(Y){return this._compile(m,Y);},compileY:function(ba){return this._compile(q,ba);},getX:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(bb,bc){var bd=qx.bom.element.Style.get(bb,g,bc,false);if(bd===h){bd=i;}return bd;}:function(be,bf){return qx.bom.element.Style.get(be,b,bf,false);},"opera":qx.bom.client.Engine.VERSION<9.5?function(bg,bh){return qx.bom.element.Style.get(bg,g,bh,false);}:function(bi,bj){return qx.bom.element.Style.get(bi,b,bj,false);},"default":function(bk,bl){return qx.bom.element.Style.get(bk,b,bl,false);}}),setX:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(bm,bn){if(bn==i){bn=h;}bm.style.overflow=bn;}:function(bo,bp){bo.style.overflowX=bp;},"opera":qx.bom.client.Engine.VERSION<9.5?function(bq,br){bq.style.overflow=br;}:function(bs,bt){bs.style.overflowX=bt;},"default":function(bu,bv){bu.style.overflowX=bv;}}),resetX:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(bw){bw.style.overflow=k;}:function(bx){bx.style.overflowX=k;},"opera":qx.bom.client.Engine.VERSION<9.5?function(by,bz){by.style.overflow=k;}:function(bA,bB){bA.style.overflowX=k;},"default":function(bC){bC.style.overflowX=k;}}),getY:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(bD,bE){var bF=qx.bom.element.Style.get(bD,g,bE,false);if(bF===h){bF=i;}return bF;}:function(bG,bH){return qx.bom.element.Style.get(bG,e,bH,false);},"opera":qx.bom.client.Engine.VERSION<9.5?function(bI,bJ){return qx.bom.element.Style.get(bI,g,bJ,false);}:function(bK,bL){return qx.bom.element.Style.get(bK,e,bL,false);},"default":function(bM,bN){return qx.bom.element.Style.get(bM,e,bN,false);}}),setY:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(bO,bP){if(bP===i){bP=h;}bO.style.overflow=bP;}:function(bQ,bR){bQ.style.overflowY=bR;},"opera":qx.bom.client.Engine.VERSION<9.5?function(bS,bT){bS.style.overflow=bT;}:function(bU,bV){bU.style.overflowY=bV;},"default":function(bW,bX){bW.style.overflowY=bX;}}),resetY:qx.core.Variant.select(j,{"gecko":qx.bom.client.Engine.VERSION<1.8?function(bY){bY.style.overflow=k;}:function(ca){ca.style.overflowY=k;},"opera":qx.bom.client.Engine.VERSION<9.5?function(cb,cc){cb.style.overflow=k;}:function(cd,ce){cd.style.overflowY=k;},"default":function(cf){cf.style.overflowY=k;}})}});})();(function(){var q="qx.client",p="",o="boxSizing",n="box-sizing",m=":",k="border-box",j="qx.bom.element.BoxSizing",h="KhtmlBoxSizing",g="-moz-box-sizing",f="WebkitBoxSizing",c=";",e="-khtml-box-sizing",d="content-box",b="-webkit-box-sizing",a="MozBoxSizing";qx.Class.define(j,{statics:{__cH:qx.core.Variant.select(q,{"mshtml":null,"webkit":[o,h,f],"gecko":[a],"opera":[o]}),__cI:qx.core.Variant.select(q,{"mshtml":null,"webkit":[n,e,b],"gecko":[g],"opera":[n]}),__cJ:{tags:{button:true,select:true},types:{search:true,button:true,submit:true,reset:true,checkbox:true,radio:true}},__cK:function(r){var s=this.__cJ;return s.tags[r.tagName.toLowerCase()]||s.types[r.type];},compile:qx.core.Variant.select(q,{"mshtml":function(t){{};},"default":function(u){var w=this.__cI;var v=p;if(w){for(var i=0,l=w.length;i<l;i++){v+=w[i]+m+u+c;}}return v;}}),get:qx.core.Variant.select(q,{"mshtml":function(x){if(qx.bom.Document.isStandardMode(qx.dom.Node.getDocument(x))){if(!this.__cK(x)){return d;}}return k;},"default":function(y){var A=this.__cH;var z;if(A){for(var i=0,l=A.length;i<l;i++){z=qx.bom.element.Style.get(y,A[i],null,false);if(z!=null&&z!==p){return z;}}}return p;}}),set:qx.core.Variant.select(q,{"mshtml":function(B,C){{};},"default":function(D,E){var F=this.__cH;if(F){for(var i=0,l=F.length;i<l;i++){D.style[F[i]]=E;}}}}),reset:function(G){this.set(G,p);}}});})();(function(){var k="n-resize",j="e-resize",i="nw-resize",h="ne-resize",g="",f="cursor:",e="qx.client",d=";",c="qx.bom.element.Cursor",b="cursor",a="hand";qx.Class.define(c,{statics:{__eR:qx.core.Variant.select(e,{"mshtml":{"cursor":a,"ew-resize":j,"ns-resize":k,"nesw-resize":h,"nwse-resize":i},"opera":{"col-resize":j,"row-resize":k,"ew-resize":j,"ns-resize":k,"nesw-resize":h,"nwse-resize":i},"default":{}}),compile:function(l){return f+(this.__eR[l]||l)+d;},get:function(m,n){return qx.bom.element.Style.get(m,b,n,false);},set:function(o,p){o.style.cursor=this.__eR[p]||p;},reset:function(q){q.style.cursor=g;}}});})();(function(){var o="auto",n="px",m=",",l="clip:auto;",k="rect(",j=");",i="",h=")",g="qx.bom.element.Clip",f="string",c="clip:rect(",e=" ",d="clip",b="rect(auto,auto,auto,auto)",a="rect(auto, auto, auto, auto)";qx.Class.define(g,{statics:{compile:function(p){if(!p){return l;}var u=p.left;var top=p.top;var t=p.width;var s=p.height;var q,r;if(u==null){q=(t==null?o:t+n);u=o;}else{q=(t==null?o:u+t+n);u=u+n;}if(top==null){r=(s==null?o:s+n);top=o;}else{r=(s==null?o:top+s+n);top=top+n;}return c+top+m+q+m+r+m+u+j;},get:function(v,w){var y=qx.bom.element.Style.get(v,d,w,false);var E,top,C,B;var x,z;if(typeof y===f&&y!==o&&y!==i){y=qx.lang.String.trim(y);if(/\((.*)\)/.test(y)){var D=RegExp.$1;if(/,/.test(D)){var A=D.split(m);}else{var A=D.split(e);}top=qx.lang.String.trim(A[0]);x=qx.lang.String.trim(A[1]);z=qx.lang.String.trim(A[2]);E=qx.lang.String.trim(A[3]);if(E===o){E=null;}if(top===o){top=null;}if(x===o){x=null;}if(z===o){z=null;}if(top!=null){top=parseInt(top,10);}if(x!=null){x=parseInt(x,10);}if(z!=null){z=parseInt(z,10);}if(E!=null){E=parseInt(E,10);}if(x!=null&&E!=null){C=x-E;}else if(x!=null){C=x;}if(z!=null&&top!=null){B=z-top;}else if(z!=null){B=z;}}else{throw new Error("Could not parse clip string: "+y);}}return {left:E||null,top:top||null,width:C||null,height:B||null};},set:function(F,G){if(!G){F.style.clip=b;return;}var L=G.left;var top=G.top;var K=G.width;var J=G.height;var H,I;if(L==null){H=(K==null?o:K+n);L=o;}else{H=(K==null?o:L+K+n);L=L+n;}if(top==null){I=(J==null?o:J+n);top=o;}else{I=(J==null?o:top+J+n);top=top+n;}F.style.clip=k+top+m+H+m+I+m+L+h;},reset:function(M){M.style.clip=a;}}});})();(function(){var m="",l="qx.client",k=";",j="opacity:",i="opacity",h="filter",g="MozOpacity",f=");",e=")",d="zoom:1;filter:alpha(opacity=",a="qx.bom.element.Opacity",c="alpha(opacity=",b="-moz-opacity:";qx.Class.define(a,{statics:{SUPPORT_CSS3_OPACITY:false,compile:qx.core.Variant.select(l,{"mshtml":function(n){if(n>=1){n=1;}if(n<0.00001){n=0;}if(qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){return j+n+k;}else{return d+(n*100)+f;}},"gecko":function(o){if(o>=1){o=0.999999;}if(!qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){return b+o+k;}else{return j+o+k;}},"default":function(p){if(p>=1){return m;}return j+p+k;}}),set:qx.core.Variant.select(l,{"mshtml":function(q,r){if(qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){if(r>=1){r=m;}q.style.opacity=r;}else{var s=qx.bom.element.Style.get(q,h,qx.bom.element.Style.COMPUTED_MODE,false);if(r>=1){r=1;}if(r<0.00001){r=0;}if(!q.currentStyle||!q.currentStyle.hasLayout){q.style.zoom=1;}q.style.filter=s.replace(/alpha\([^\)]*\)/gi,m)+c+r*100+e;}},"gecko":function(t,u){if(u>=1){u=0.999999;}if(!qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){t.style.MozOpacity=u;}else{t.style.opacity=u;}},"default":function(v,w){if(w>=1){w=m;}v.style.opacity=w;}}),reset:qx.core.Variant.select(l,{"mshtml":function(x){if(qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){x.style.opacity=m;}else{var y=qx.bom.element.Style.get(x,h,qx.bom.element.Style.COMPUTED_MODE,false);x.style.filter=y.replace(/alpha\([^\)]*\)/gi,m);}},"gecko":function(z){if(!qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){z.style.MozOpacity=m;}else{z.style.opacity=m;}},"default":function(A){A.style.opacity=m;}}),get:qx.core.Variant.select(l,{"mshtml":function(B,C){if(qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY){var D=qx.bom.element.Style.get(B,i,C,false);if(D!=null){return parseFloat(D);}return 1.0;}else{var E=qx.bom.element.Style.get(B,h,C,false);if(E){var D=E.match(/alpha\(opacity=(.*)\)/);if(D&&D[1]){return parseFloat(D[1])/100;}}return 1.0;}},"gecko":function(F,G){var H=qx.bom.element.Style.get(F,!qx.bom.element.Opacity.SUPPORT_CSS3_OPACITY?g:i,G,false);if(H==0.999999){H=1.0;}if(H!=null){return parseFloat(H);}return 1.0;},"default":function(I,J){var K=qx.bom.element.Style.get(I,i,J,false);if(K!=null){return parseFloat(K);}return 1.0;}})},defer:function(L){L.SUPPORT_CSS3_OPACITY=(typeof document.documentElement.style.opacity=="string");}});})();(function(){var m="",k="qx.client",h="userSelect",g="style",f="MozUserModify",e="px",d="float",c="borderImage",b="styleFloat",a="appearance",F="pixelHeight",E='Ms',D=":",C="cssFloat",B="pixelTop",A="pixelLeft",z='O',y="qx.bom.element.Style",x='Khtml',w='string',t="pixelRight",u='Moz',r="pixelWidth",s="pixelBottom",p=";",q="textOverflow",n="userModify",o='Webkit',v="WebkitUserModify";qx.Class.define(y,{statics:{__cr:function(){var G=[a,h,q,c];var K={};var H=document.documentElement.style;var L=[u,o,x,z,E];for(var i=0,l=G.length;i<l;i++){var M=G[i];var I=M;if(H[M]){K[I]=M;continue;}M=qx.lang.String.firstUp(M);for(var j=0,N=L.length;j<N;j++){var J=L[j]+M;if(typeof H[J]==w){K[I]=J;break;}}}this.__cs=K;this.__cs[n]=qx.core.Variant.select(k,{"gecko":f,"webkit":v,"default":h});this.__ct={};for(var I in K){this.__ct[I]=this.__cx(K[I]);}this.__cs[d]=qx.core.Variant.select(k,{"mshtml":b,"default":C});},__cu:{width:r,height:F,left:A,right:t,top:B,bottom:s},__cv:{clip:qx.bom.element.Clip,cursor:qx.bom.element.Cursor,opacity:qx.bom.element.Opacity,boxSizing:qx.bom.element.BoxSizing,overflowX:{set:qx.lang.Function.bind(qx.bom.element.Overflow.setX,qx.bom.element.Overflow),get:qx.lang.Function.bind(qx.bom.element.Overflow.getX,qx.bom.element.Overflow),reset:qx.lang.Function.bind(qx.bom.element.Overflow.resetX,qx.bom.element.Overflow),compile:qx.lang.Function.bind(qx.bom.element.Overflow.compileX,qx.bom.element.Overflow)},overflowY:{set:qx.lang.Function.bind(qx.bom.element.Overflow.setY,qx.bom.element.Overflow),get:qx.lang.Function.bind(qx.bom.element.Overflow.getY,qx.bom.element.Overflow),reset:qx.lang.Function.bind(qx.bom.element.Overflow.resetY,qx.bom.element.Overflow),compile:qx.lang.Function.bind(qx.bom.element.Overflow.compileY,qx.bom.element.Overflow)}},compile:function(O){var Q=[];var S=this.__cv;var R=this.__ct;var name,P;for(name in O){P=O[name];if(P==null){continue;}name=R[name]||name;if(S[name]){Q.push(S[name].compile(P));}else{Q.push(this.__cx(name),D,P,p);}}return Q.join(m);},__cw:{},__cx:function(T){var U=this.__cw;var V=U[T];if(!V){V=U[T]=qx.lang.String.hyphenate(T);}return V;},setCss:qx.core.Variant.select(k,{"mshtml":function(W,X){W.style.cssText=X;},"default":function(Y,ba){Y.setAttribute(g,ba);}}),getCss:qx.core.Variant.select(k,{"mshtml":function(bb){return bb.style.cssText.toLowerCase();},"default":function(bc){return bc.getAttribute(g);}}),isPropertySupported:function(bd){return (this.__cv[bd]||this.__cs[bd]||bd in document.documentElement.style);},COMPUTED_MODE:1,CASCADED_MODE:2,LOCAL_MODE:3,set:function(be,name,bf,bg){{};name=this.__cs[name]||name;if(bg!==false&&this.__cv[name]){return this.__cv[name].set(be,bf);}else{be.style[name]=bf!==null?bf:m;}},setStyles:function(bh,bi,bj){{};var bm=this.__cs;var bo=this.__cv;var bk=bh.style;for(var bn in bi){var bl=bi[bn];var name=bm[bn]||bn;if(bl===undefined){if(bj!==false&&bo[name]){bo[name].reset(bh);}else{bk[name]=m;}}else{if(bj!==false&&bo[name]){bo[name].set(bh,bl);}else{bk[name]=bl!==null?bl:m;}}}},reset:function(bp,name,bq){name=this.__cs[name]||name;if(bq!==false&&this.__cv[name]){return this.__cv[name].reset(bp);}else{bp.style[name]=m;}},get:qx.core.Variant.select(k,{"mshtml":function(br,name,bs,bt){name=this.__cs[name]||name;if(bt!==false&&this.__cv[name]){return this.__cv[name].get(br,bs);}if(!br.currentStyle){return br.style[name]||m;}switch(bs){case this.LOCAL_MODE:return br.style[name]||m;case this.CASCADED_MODE:return br.currentStyle[name]||m;default:var bx=br.currentStyle[name]||m;if(/^-?[\.\d]+(px)?$/i.test(bx)){return bx;}var bw=this.__cu[name];if(bw){var bu=br.style[name];br.style[name]=bx||0;var bv=br.style[bw]+e;br.style[name]=bu;return bv;}if(/^-?[\.\d]+(em|pt|%)?$/i.test(bx)){throw new Error("Untranslated computed property value: "+name+". Only pixel values work well across different clients.");}return bx;}},"default":function(by,name,bz,bA){name=this.__cs[name]||name;if(bA!==false&&this.__cv[name]){return this.__cv[name].get(by,bz);}switch(bz){case this.LOCAL_MODE:return by.style[name]||m;case this.CASCADED_MODE:if(by.currentStyle){return by.currentStyle[name]||m;}throw new Error("Cascaded styles are not supported in this browser!");default:var bB=qx.dom.Node.getDocument(by);var bC=bB.defaultView.getComputedStyle(by,null);return bC?bC[name]:m;}}})},defer:function(bD){bD.__cr();}});})();(function(){var j="borderTopWidth",i="borderLeftWidth",h="marginTop",g="marginLeft",f="scroll",e="qx.client",d="border-box",c="borderBottomWidth",b="borderRightWidth",a="auto",y="padding",x="qx.bom.element.Location",w="paddingLeft",v="static",u="marginBottom",t="visible",s="BODY",r="paddingBottom",q="paddingTop",p="marginRight",n="position",o="margin",l="overflow",m="paddingRight",k="border";qx.Class.define(x,{statics:{__iY:function(z,A){return qx.bom.element.Style.get(z,A,qx.bom.element.Style.COMPUTED_MODE,false);},__ja:function(B,C){return parseInt(qx.bom.element.Style.get(B,C,qx.bom.element.Style.COMPUTED_MODE,false),10)||0;},__jb:function(D){var G=0,top=0;if(D.getBoundingClientRect&&!qx.bom.client.Engine.OPERA){var F=qx.dom.Node.getWindow(D);G-=qx.bom.Viewport.getScrollLeft(F);top-=qx.bom.Viewport.getScrollTop(F);}else{var E=qx.dom.Node.getDocument(D).body;D=D.parentNode;while(D&&D!=E){G+=D.scrollLeft;top+=D.scrollTop;D=D.parentNode;}}return {left:G,top:top};},__jc:qx.core.Variant.select(e,{"mshtml":function(H){var J=qx.dom.Node.getDocument(H);var I=J.body;var K=0;var top=0;K-=I.clientLeft+J.documentElement.clientLeft;top-=I.clientTop+J.documentElement.clientTop;if(qx.bom.client.Feature.STANDARD_MODE){K+=this.__ja(I,i);top+=this.__ja(I,j);}return {left:K,top:top};},"webkit":function(L){var N=qx.dom.Node.getDocument(L);var M=N.body;var O=M.offsetLeft;var top=M.offsetTop;if(qx.bom.client.Engine.VERSION<530.17){O+=this.__ja(M,i);top+=this.__ja(M,j);}return {left:O,top:top};},"gecko":function(P){var Q=qx.dom.Node.getDocument(P).body;var R=Q.offsetLeft;var top=Q.offsetTop;if(qx.bom.client.Engine.VERSION<1.9){R+=this.__ja(Q,g);top+=this.__ja(Q,h);}if(qx.bom.element.BoxSizing.get(Q)!==d){R+=this.__ja(Q,i);top+=this.__ja(Q,j);}return {left:R,top:top};},"default":function(S){var T=qx.dom.Node.getDocument(S).body;var U=T.offsetLeft;var top=T.offsetTop;return {left:U,top:top};}}),__jd:qx.core.Variant.select(e,{"mshtml|webkit":function(V){var X=qx.dom.Node.getDocument(V);if(V.getBoundingClientRect){var Y=V.getBoundingClientRect();var ba=Y.left;var top=Y.top;}else{var ba=V.offsetLeft;var top=V.offsetTop;V=V.offsetParent;var W=X.body;while(V&&V!=W){ba+=V.offsetLeft;top+=V.offsetTop;ba+=this.__ja(V,i);top+=this.__ja(V,j);V=V.offsetParent;}}return {left:ba,top:top};},"gecko":function(bb){if(bb.getBoundingClientRect){var be=bb.getBoundingClientRect();var bf=Math.round(be.left);var top=Math.round(be.top);}else{var bf=0;var top=0;var bc=qx.dom.Node.getDocument(bb).body;var bd=qx.bom.element.BoxSizing;if(bd.get(bb)!==d){bf-=this.__ja(bb,i);top-=this.__ja(bb,j);}while(bb&&bb!==bc){bf+=bb.offsetLeft;top+=bb.offsetTop;if(bd.get(bb)!==d){bf+=this.__ja(bb,i);top+=this.__ja(bb,j);}if(bb.parentNode&&this.__iY(bb.parentNode,l)!=t){bf+=this.__ja(bb.parentNode,i);top+=this.__ja(bb.parentNode,j);}bb=bb.offsetParent;}}return {left:bf,top:top};},"default":function(bg){var bi=0;var top=0;var bh=qx.dom.Node.getDocument(bg).body;while(bg&&bg!==bh){bi+=bg.offsetLeft;top+=bg.offsetTop;bg=bg.offsetParent;}return {left:bi,top:top};}}),get:function(bj,bk){if(bj.tagName==s){var location=this.__je(bj);var br=location.left;var top=location.top;}else{var bl=this.__jc(bj);var bq=this.__jd(bj);var scroll=this.__jb(bj);var br=bq.left+bl.left-scroll.left;var top=bq.top+bl.top-scroll.top;}var bm=br+bj.offsetWidth;var bn=top+bj.offsetHeight;if(bk){if(bk==y||bk==f){var bo=qx.bom.element.Overflow.getX(bj);if(bo==f||bo==a){bm+=bj.scrollWidth-bj.offsetWidth+this.__ja(bj,i)+this.__ja(bj,b);}var bp=qx.bom.element.Overflow.getY(bj);if(bp==f||bp==a){bn+=bj.scrollHeight-bj.offsetHeight+this.__ja(bj,j)+this.__ja(bj,c);}}switch(bk){case y:br+=this.__ja(bj,w);top+=this.__ja(bj,q);bm-=this.__ja(bj,m);bn-=this.__ja(bj,r);case f:br-=bj.scrollLeft;top-=bj.scrollTop;bm-=bj.scrollLeft;bn-=bj.scrollTop;case k:br+=this.__ja(bj,i);top+=this.__ja(bj,j);bm-=this.__ja(bj,b);bn-=this.__ja(bj,c);break;case o:br-=this.__ja(bj,g);top-=this.__ja(bj,h);bm+=this.__ja(bj,p);bn+=this.__ja(bj,u);break;}}return {left:br,top:top,right:bm,bottom:bn};},__je:qx.core.Variant.select(e,{"default":function(bs){var top=bs.offsetTop+this.__ja(bs,h);var bt=bs.offsetLeft+this.__ja(bs,g);return {left:bt,top:top};},"mshtml":function(bu){var top=bu.offsetTop;var bv=bu.offsetLeft;if(!((qx.bom.client.Engine.VERSION<8||qx.bom.client.Engine.DOCUMENT_MODE<8)&&!qx.bom.client.Feature.QUIRKS_MODE)){top+=this.__ja(bu,h);bv+=this.__ja(bu,g);}return {left:bv,top:top};},"gecko":function(bw){var top=bw.offsetTop+this.__ja(bw,h)+this.__ja(bw,i);var bx=bw.offsetLeft+this.__ja(bw,g)+this.__ja(bw,j);return {left:bx,top:top};}}),getLeft:function(by,bz){return this.get(by,bz).left;},getTop:function(bA,bB){return this.get(bA,bB).top;},getRight:function(bC,bD){return this.get(bC,bD).right;},getBottom:function(bE,bF){return this.get(bE,bF).bottom;},getRelative:function(bG,bH,bI,bJ){var bL=this.get(bG,bI);var bK=this.get(bH,bJ);return {left:bL.left-bK.left,top:bL.top-bK.top,right:bL.right-bK.right,bottom:bL.bottom-bK.bottom};},getPosition:function(bM){return this.getRelative(bM,this.getOffsetParent(bM));},getOffsetParent:function(bN){var bP=bN.offsetParent||document.body;var bO=qx.bom.element.Style;while(bP&&(!/^body|html$/i.test(bP.tagName)&&bO.get(bP,n)===v)){bP=bP.offsetParent;}return bP;}}});})();(function(){var b="qx.ui.core.queue.Widget",a="widget";qx.Class.define(b,{statics:{__iQ:{},remove:function(c){delete this.__iQ[c.$$hash];},add:function(d){var e=this.__iQ;if(e[d.$$hash]){return;}e[d.$$hash]=d;qx.ui.core.queue.Manager.scheduleFlush(a);},flush:function(){var f=this.__iQ;var h;for(var g in f){h=f[g];delete f[g];h.syncWidget();}for(var g in f){return;}this.__iQ={};}}});})();(function(){var b="qx.ui.core.queue.Visibility",a="visibility";qx.Class.define(b,{statics:{__iC:{},__iD:{},remove:function(c){var d=c.$$hash;delete this.__iD[d];delete this.__iC[d];},isVisible:function(e){return this.__iD[e.$$hash]||false;},__iE:function(f){var h=this.__iD;var g=f.$$hash;var i;if(f.isExcluded()){i=false;}else{var parent=f.$$parent;if(parent){i=this.__iE(parent);}else{i=f.isRootWidget();}}return h[g]=i;},add:function(j){var k=this.__iC;if(k[j.$$hash]){return;}k[j.$$hash]=j;qx.ui.core.queue.Manager.scheduleFlush(a);},flush:function(){var l=this.__iC;var p=this.__iD;for(var m in l){if(p[m]!=null){l[m].addChildrenToQueue(l);}}var o={};for(var m in l){o[m]=p[m];p[m]=null;}for(var m in l){var n=l[m];delete l[m];if(p[m]==null){this.__iE(n);}if(p[m]&&p[m]!=o[m]){n.checkAppearanceNeeds();}}this.__iC={};}}});})();(function(){var b="appearance",a="qx.ui.core.queue.Appearance";qx.Class.define(a,{statics:{__hL:{},remove:function(c){delete this.__hL[c.$$hash];},add:function(d){var e=this.__hL;if(e[d.$$hash]){return;}e[d.$$hash]=d;qx.ui.core.queue.Manager.scheduleFlush(b);},has:function(f){return !!this.__hL[f.$$hash];},flush:function(){var j=qx.ui.core.queue.Visibility;var g=this.__hL;var i;for(var h in g){i=g[h];delete g[h];if(j.isVisible(i)){i.syncAppearance();}else{i.$$stateChanges=true;}}}}});})();(function(){var b="qx.ui.core.queue.Layout",a="layout";qx.Class.define(b,{statics:{__if:{},remove:function(c){delete this.__if[c.$$hash];},add:function(d){this.__if[d.$$hash]=d;qx.ui.core.queue.Manager.scheduleFlush(a);},flush:function(){var e=this.__ii();for(var i=e.length-1;i>=0;i--){var f=e[i];if(f.hasValidLayout()){continue;}if(f.isRootWidget()&&!f.hasUserBounds()){var h=f.getSizeHint();f.renderLayout(0,0,h.width,h.height);}else{var g=f.getBounds();f.renderLayout(g.left,g.top,g.width,g.height);}}},getNestingLevel:function(j){var k=this.__ih;var m=0;var parent=j;while(true){if(k[parent.$$hash]!=null){m+=k[parent.$$hash];break;}if(!parent.$$parent){break;}parent=parent.$$parent;m+=1;}var l=m;while(j&&j!==parent){k[j.$$hash]=l--;j=j.$$parent;}return m;},__ig:function(){var s=qx.ui.core.queue.Visibility;this.__ih={};var r=[];var q=this.__if;var n,p;for(var o in q){n=q[o];if(s.isVisible(n)){p=this.getNestingLevel(n);if(!r[p]){r[p]={};}r[p][o]=n;delete q[o];}}return r;},__ii:function(){var w=[];var y=this.__ig();for(var v=y.length-1;v>=0;v--){if(!y[v]){continue;}for(var u in y[v]){var t=y[v][u];if(v==0||t.isRootWidget()||t.hasUserBounds()){w.push(t);t.invalidateLayoutCache();continue;}var A=t.getSizeHint(false);if(A){t.invalidateLayoutCache();var x=t.getSizeHint();var z=(!t.getBounds()||A.minWidth!==x.minWidth||A.width!==x.width||A.maxWidth!==x.maxWidth||A.minHeight!==x.minHeight||A.height!==x.height||A.maxHeight!==x.maxHeight);}else{z=true;}if(z){var parent=t.getLayoutParent();if(!y[v-1]){y[v-1]={};}y[v-1][parent.$$hash]=parent;}else{w.push(t);}}}return w;}}});})();(function(){var b="dispose",a="qx.ui.core.queue.Dispose";qx.Class.define(a,{statics:{__eX:{},add:function(c){var d=this.__eX;if(d[c.$$hash]){return;}d[c.$$hash]=c;qx.ui.core.queue.Manager.scheduleFlush(b);},flush:function(){var e=this.__eX;for(var g in e){var f=e[g];delete e[g];f.dispose();}for(var g in e){return;}this.__eX={};}}});})();(function(){var a="qx.ui.core.MChildrenHandling";qx.Mixin.define(a,{members:{getChildren:function(){return this._getChildren();},hasChildren:function(){return this._hasChildren();},indexOf:function(b){return this._indexOf(b);},add:function(c,d){this._add(c,d);},addAt:function(e,f,g){this._addAt(e,f,g);},addBefore:function(h,i,j){this._addBefore(h,i,j);},addAfter:function(k,l,m){this._addAfter(k,l,m);},remove:function(n){this._remove(n);},removeAt:function(o){return this._removeAt(o);},removeAll:function(){this._removeAll();}},statics:{remap:function(p){p.getChildren=p._getChildren;p.hasChildren=p._hasChildren;p.indexOf=p._indexOf;p.add=p._add;p.addAt=p._addAt;p.addBefore=p._addBefore;p.addAfter=p._addAfter;p.remove=p._remove;p.removeAt=p._removeAt;p.removeAll=p._removeAll;}}});})();(function(){var a="qx.ui.core.MLayoutHandling";qx.Mixin.define(a,{members:{setLayout:function(b){return this._setLayout(b);},getLayout:function(){return this._getLayout();}},statics:{remap:function(c){c.getLayout=c._getLayout;c.setLayout=c._setLayout;}}});})();(function(){var j="Integer",i="_applyDimension",h="Boolean",g="_applyStretching",f="_applyMargin",e="shorthand",d="_applyAlign",c="allowShrinkY",b="bottom",a="baseline",x="marginBottom",w="qx.ui.core.LayoutItem",v="center",u="marginTop",t="allowGrowX",s="middle",r="marginLeft",q="allowShrinkX",p="top",o="right",m="marginRight",n="abstract",k="allowGrowY",l="left";qx.Class.define(w,{type:n,extend:qx.core.Object,properties:{minWidth:{check:j,nullable:true,apply:i,init:null,themeable:true},width:{check:j,nullable:true,apply:i,init:null,themeable:true},maxWidth:{check:j,nullable:true,apply:i,init:null,themeable:true},minHeight:{check:j,nullable:true,apply:i,init:null,themeable:true},height:{check:j,nullable:true,apply:i,init:null,themeable:true},maxHeight:{check:j,nullable:true,apply:i,init:null,themeable:true},allowGrowX:{check:h,apply:g,init:true,themeable:true},allowShrinkX:{check:h,apply:g,init:true,themeable:true},allowGrowY:{check:h,apply:g,init:true,themeable:true},allowShrinkY:{check:h,apply:g,init:true,themeable:true},allowStretchX:{group:[t,q],mode:e,themeable:true},allowStretchY:{group:[k,c],mode:e,themeable:true},marginTop:{check:j,init:0,apply:f,themeable:true},marginRight:{check:j,init:0,apply:f,themeable:true},marginBottom:{check:j,init:0,apply:f,themeable:true},marginLeft:{check:j,init:0,apply:f,themeable:true},margin:{group:[u,m,x,r],mode:e,themeable:true},alignX:{check:[l,v,o],nullable:true,apply:d,themeable:true},alignY:{check:[p,s,b,a],nullable:true,apply:d,themeable:true}},members:{__fz:null,__fA:null,__fB:null,__fC:null,__fD:null,__fE:null,__fF:null,getBounds:function(){return this.__fE||this.__fA||null;},clearSeparators:function(){},renderSeparator:function(y,z){},renderLayout:function(A,top,B,C){var D;{};var E=null;if(this.getHeight()==null&&this._hasHeightForWidth()){var E=this._getHeightForWidth(B);}if(E!=null&&E!==this.__fz){this.__fz=E;qx.ui.core.queue.Layout.add(this);return null;}var G=this.__fA;if(!G){G=this.__fA={};}var F={};if(A!==G.left||top!==G.top){F.position=true;G.left=A;G.top=top;}if(B!==G.width||C!==G.height){F.size=true;G.width=B;G.height=C;}if(this.__fB){F.local=true;delete this.__fB;}if(this.__fD){F.margin=true;delete this.__fD;}return F;},isExcluded:function(){return false;},hasValidLayout:function(){return !this.__fB;},scheduleLayoutUpdate:function(){qx.ui.core.queue.Layout.add(this);},invalidateLayoutCache:function(){this.__fB=true;this.__fC=null;},getSizeHint:function(H){var I=this.__fC;if(I){return I;}if(H===false){return null;}I=this.__fC=this._computeSizeHint();if(this._hasHeightForWidth()&&this.__fz&&this.getHeight()==null){I.height=this.__fz;}if(I.minWidth>I.width){I.width=I.minWidth;}if(I.maxWidth<I.width){I.width=I.maxWidth;}if(!this.getAllowGrowX()){I.maxWidth=I.width;}if(!this.getAllowShrinkX()){I.minWidth=I.width;}if(I.minHeight>I.height){I.height=I.minHeight;}if(I.maxHeight<I.height){I.height=I.maxHeight;}if(!this.getAllowGrowY()){I.maxHeight=I.height;}if(!this.getAllowShrinkY()){I.minHeight=I.height;}return I;},_computeSizeHint:function(){var N=this.getMinWidth()||0;var K=this.getMinHeight()||0;var O=this.getWidth()||N;var M=this.getHeight()||K;var J=this.getMaxWidth()||Infinity;var L=this.getMaxHeight()||Infinity;return {minWidth:N,width:O,maxWidth:J,minHeight:K,height:M,maxHeight:L};},_hasHeightForWidth:function(){var P=this._getLayout();if(P){return P.hasHeightForWidth();}return false;},_getHeightForWidth:function(Q){var R=this._getLayout();if(R&&R.hasHeightForWidth()){return R.getHeightForWidth(Q);}return null;},_getLayout:function(){return null;},_applyMargin:function(){this.__fD=true;var parent=this.$$parent;if(parent){parent.updateLayoutProperties();}},_applyAlign:function(){var parent=this.$$parent;if(parent){parent.updateLayoutProperties();}},_applyDimension:function(){qx.ui.core.queue.Layout.add(this);},_applyStretching:function(){qx.ui.core.queue.Layout.add(this);},hasUserBounds:function(){return !!this.__fE;},setUserBounds:function(S,top,T,U){this.__fE={left:S,top:top,width:T,height:U};qx.ui.core.queue.Layout.add(this);},resetUserBounds:function(){delete this.__fE;qx.ui.core.queue.Layout.add(this);},__fG:{},setLayoutProperties:function(V){if(V==null){return;}var W=this.__fF;if(!W){W=this.__fF={};}var parent=this.getLayoutParent();if(parent){parent.updateLayoutProperties(V);}for(var X in V){if(V[X]==null){delete W[X];}else{W[X]=V[X];}}},getLayoutProperties:function(){return this.__fF||this.__fG;},clearLayoutProperties:function(){delete this.__fF;},updateLayoutProperties:function(Y){var ba=this._getLayout();if(ba){var bb;{};ba.invalidateChildrenCache();}qx.ui.core.queue.Layout.add(this);},getApplicationRoot:function(){return qx.core.Init.getApplication().getRoot();},getLayoutParent:function(){return this.$$parent||null;},setLayoutParent:function(parent){if(this.$$parent===parent){return;}this.$$parent=parent||null;qx.ui.core.queue.Visibility.add(this);},isRootWidget:function(){return false;},_getRoot:function(){var parent=this;while(parent){if(parent.isRootWidget()){return parent;}parent=parent.$$parent;}return null;},clone:function(){var bc=qx.core.Object.prototype.clone.call(this);var bd=this.__fF;if(bd){bc.__fF=qx.lang.Object.clone(bd);}return bc;}},destruct:function(){this.$$parent=this.$$subparent=this.__fF=this.__fA=this.__fE=this.__fC=null;}});})();(function(){var a="qx.locale.MTranslation";qx.Mixin.define(a,{members:{tr:function(b,c){var d=qx.locale.Manager;if(d){return d.tr.apply(d,arguments);}throw new Error("To enable localization please include qx.locale.Manager into your build!");},trn:function(e,f,g,h){var i=qx.locale.Manager;if(i){return i.trn.apply(i,arguments);}throw new Error("To enable localization please include qx.locale.Manager into your build!");},trc:function(j,k,l){var m=qx.locale.Manager;if(m){return m.trc.apply(m,arguments);}throw new Error("To enable localization please include qx.locale.Manager into your build!");},marktr:function(n){var o=qx.locale.Manager;if(o){return o.marktr.apply(o,arguments);}throw new Error("To enable localization please include qx.locale.Manager into your build!");}}});})();(function(){var b="qx.ui.core.DecoratorFactory",a="$$nopool$$";qx.Class.define(b,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__cU={};},statics:{MAX_SIZE:15,__cV:a},members:{__cU:null,getDecoratorElement:function(c){var h=qx.ui.core.DecoratorFactory;if(qx.lang.Type.isString(c)){var f=c;var e=qx.theme.manager.Decoration.getInstance().resolve(c);}else{var f=h.__cV;e=c;}var g=this.__cU;if(g[f]&&g[f].length>0){var d=g[f].pop();}else{var d=this._createDecoratorElement(e,f);}d.$$pooled=false;return d;},poolDecorator:function(i){if(!i||i.$$pooled||i.isDisposed()){return;}var l=qx.ui.core.DecoratorFactory;var j=i.getId();if(j==l.__cV){i.dispose();return;}var k=this.__cU;if(!k[j]){k[j]=[];}if(k[j].length>l.MAX_SIZE){i.dispose();}else{i.$$pooled=true;k[j].push(i);}},_createDecoratorElement:function(m,n){var o=new qx.html.Decorator(m,n);{};return o;},toString:function(){return qx.core.Object.prototype.toString.call(this);}},destruct:function(){if(!qx.core.ObjectRegistry.inShutDown){var q=this.__cU;for(var p in q){qx.util.DisposeUtil.disposeArray(q,p);}}this.__cU=null;}});})();(function(){var bV="px",bU="Boolean",bT="qx.event.type.Drag",bS="qx.event.type.Mouse",bR="visible",bQ="qx.event.type.Focus",bP="on",bO="Integer",bN="qx.event.type.Touch",bM="excluded",bx="qx.event.type.Data",bw="_applyPadding",bv="qx.event.type.Event",bu="hidden",bt="contextmenu",bs="String",br="tabIndex",bq="focused",bp="changeVisibility",bo="mshtml",cd="hovered",ce="qx.event.type.KeySequence",cb="qx.client",cc="absolute",bY="backgroundColor",ca="drag",bW="div",bX="disabled",cf="move",cg="dragstart",bF="qx.dynlocale",bE="dragchange",bH="dragend",bG="resize",bJ="Decorator",bI="zIndex",bL="opacity",bK="default",bD="Color",bC="changeToolTipText",c="beforeContextmenuOpen",d="_applyNativeContextMenu",f="_applyBackgroundColor",g="_applyFocusable",h="changeShadow",j="qx.event.type.KeyInput",k="createChildControl",m="__dQ",n="Font",o="_applyShadow",ck="_applyEnabled",cj="_applySelectable",ci="Number",ch="_applyKeepActive",co="__ea",cn="_applyVisibility",cm="repeat",cl="qxDraggable",cq="__dR",cp="syncAppearance",N="paddingLeft",O="_applyDroppable",L="__ec",M="#",R="qx.event.type.MouseWheel",S="_applyCursor",P="_applyDraggable",Q="changeTextColor",J="$$widget",K="changeContextMenu",w="paddingTop",v="changeSelectable",y="hideFocus",x="none",s="outline",r="_applyAppearance",u="_applyOpacity",t="url(",q=")",p="qx.ui.core.Widget",X="_applyFont",Y="cursor",ba="qxDroppable",bb="changeZIndex",T="changeEnabled",U="changeFont",V="__ee",W="__dU",bc="_applyDecorator",bd="_applyZIndex",G="_applyTextColor",F="qx.ui.menu.Menu",E="_applyToolTipText",D="true",C="widget",B="changeDecorator",A="__dV",z="_applyTabIndex",I="changeAppearance",H="shorthand",be="/",bf="",bg="_applyContextMenu",bh="paddingBottom",bi="__dW",bj="changeNativeContextMenu",bk="qx.ui.tooltip.ToolTip",bl="qxKeepActive",bm="_applyKeepFocus",bn="paddingRight",bB="changeBackgroundColor",bA="changeLocale",bz="qxKeepFocus",by="qx/static/blank.gif";qx.Class.define(p,{extend:qx.ui.core.LayoutItem,include:[qx.locale.MTranslation],construct:function(){qx.ui.core.LayoutItem.call(this);this.__dQ=this._createContainerElement();this.__dR=this.__ed();this.__dQ.add(this.__dR);this.initFocusable();this.initSelectable();this.initNativeContextMenu();},events:{appear:bv,disappear:bv,createChildControl:bx,resize:bx,move:bx,syncAppearance:bx,mousemove:bS,mouseover:bS,mouseout:bS,mousedown:bS,mouseup:bS,click:bS,dblclick:bS,contextmenu:bS,beforeContextmenuOpen:bx,mousewheel:R,touchstart:bN,touchend:bN,touchmove:bN,touchcancel:bN,tap:bN,swipe:bN,keyup:ce,keydown:ce,keypress:ce,keyinput:j,focus:bQ,blur:bQ,focusin:bQ,focusout:bQ,activate:bQ,deactivate:bQ,capture:bv,losecapture:bv,drop:bT,dragleave:bT,dragover:bT,drag:bT,dragstart:bT,dragend:bT,dragchange:bT,droprequest:bT},properties:{paddingTop:{check:bO,init:0,apply:bw,themeable:true},paddingRight:{check:bO,init:0,apply:bw,themeable:true},paddingBottom:{check:bO,init:0,apply:bw,themeable:true},paddingLeft:{check:bO,init:0,apply:bw,themeable:true},padding:{group:[w,bn,bh,N],mode:H,themeable:true},zIndex:{nullable:true,init:null,apply:bd,event:bb,check:bO,themeable:true},decorator:{nullable:true,init:null,apply:bc,event:B,check:bJ,themeable:true},shadow:{nullable:true,init:null,apply:o,event:h,check:bJ,themeable:true},backgroundColor:{nullable:true,check:bD,apply:f,event:bB,themeable:true},textColor:{nullable:true,check:bD,apply:G,event:Q,themeable:true,inheritable:true},font:{nullable:true,apply:X,check:n,event:U,themeable:true,inheritable:true,dereference:true},opacity:{check:ci,apply:u,themeable:true,nullable:true,init:null},cursor:{check:bs,apply:S,themeable:true,inheritable:true,nullable:true,init:null},toolTip:{check:bk,nullable:true},toolTipText:{check:bs,nullable:true,event:bC,apply:E},toolTipIcon:{check:bs,nullable:true,event:bC},blockToolTip:{check:bU,init:false},visibility:{check:[bR,bu,bM],init:bR,apply:cn,event:bp},enabled:{init:true,check:bU,inheritable:true,apply:ck,event:T},anonymous:{init:false,check:bU},tabIndex:{check:bO,nullable:true,apply:z},focusable:{check:bU,init:false,apply:g},keepFocus:{check:bU,init:false,apply:bm},keepActive:{check:bU,init:false,apply:ch},draggable:{check:bU,init:false,apply:P},droppable:{check:bU,init:false,apply:O},selectable:{check:bU,init:false,event:v,apply:cj},contextMenu:{check:F,apply:bg,nullable:true,event:K},nativeContextMenu:{check:bU,init:false,themeable:true,event:bj,apply:d},appearance:{check:bs,init:C,apply:r,event:I}},statics:{DEBUG:false,getWidgetByElement:function(cr,cs){while(cr){var ct=cr.$$widget;if(ct!=null){var cu=qx.core.ObjectRegistry.fromHashCode(ct);if(!cs||!cu.getAnonymous()){return cu;}}try{cr=cr.parentNode;}catch(e){return null;}}return null;},contains:function(parent,cv){while(cv){if(parent==cv){return true;}cv=cv.getLayoutParent();}return false;},__dS:new qx.ui.core.DecoratorFactory(),__dT:new qx.ui.core.DecoratorFactory()},members:{__dQ:null,__dR:null,__dU:null,__dV:null,__dW:null,__dX:null,__dY:null,__ea:null,_getLayout:function(){return this.__ea;},_setLayout:function(cw){{};if(this.__ea){this.__ea.connectToWidget(null);}if(cw){cw.connectToWidget(this);}this.__ea=cw;qx.ui.core.queue.Layout.add(this);},setLayoutParent:function(parent){if(this.$$parent===parent){return;}var cx=this.getContainerElement();if(this.$$parent&&!this.$$parent.$$disposed){this.$$parent.getContentElement().remove(cx);}this.$$parent=parent||null;if(parent&&!parent.$$disposed){this.$$parent.getContentElement().add(cx);}this.$$refreshInheritables();qx.ui.core.queue.Visibility.add(this);},_updateInsets:null,__eb:function(a,b){if(a==b){return false;}if(a==null||b==null){return true;}var cy=qx.theme.manager.Decoration.getInstance();var cA=cy.resolve(a).getInsets();var cz=cy.resolve(b).getInsets();if(cA.top!=cz.top||cA.right!=cz.right||cA.bottom!=cz.bottom||cA.left!=cz.left){return true;}return false;},renderLayout:function(cB,top,cC,cD){var cM=qx.ui.core.LayoutItem.prototype.renderLayout.call(this,cB,top,cC,cD);if(!cM){return null;}var cF=this.getContainerElement();var content=this.getContentElement();var cJ=cM.size||this._updateInsets;var cN=bV;var cK={};if(cM.position){cK.left=cB+cN;cK.top=top+cN;}if(cM.size){cK.width=cC+cN;cK.height=cD+cN;}if(cM.position||cM.size){cF.setStyles(cK);}if(cJ||cM.local||cM.margin){var cE=this.getInsets();var innerWidth=cC-cE.left-cE.right;var innerHeight=cD-cE.top-cE.bottom;innerWidth=innerWidth<0?0:innerWidth;innerHeight=innerHeight<0?0:innerHeight;}var cH={};if(this._updateInsets){cH.left=cE.left+cN;cH.top=cE.top+cN;}if(cJ){cH.width=innerWidth+cN;cH.height=innerHeight+cN;}if(cJ||this._updateInsets){content.setStyles(cH);}if(cM.size){var cL=this.__dW;if(cL){cL.setStyles({width:cC+bV,height:cD+bV});}}if(cM.size||this._updateInsets){if(this.__dU){this.__dU.resize(cC,cD);}}if(cM.size){if(this.__dV){var cE=this.__dV.getInsets();var cI=cC+cE.left+cE.right;var cG=cD+cE.top+cE.bottom;this.__dV.resize(cI,cG);}}if(cJ||cM.local||cM.margin){if(this.__ea&&this.hasLayoutChildren()){this.__ea.renderLayout(innerWidth,innerHeight);}else if(this.hasLayoutChildren()){throw new Error("At least one child in control "+this._findTopControl()+" requires a layout, but no one was defined!");}}if(cM.position&&this.hasListener(cf)){this.fireDataEvent(cf,this.getBounds());}if(cM.size&&this.hasListener(bG)){this.fireDataEvent(bG,this.getBounds());}delete this._updateInsets;return cM;},__ec:null,clearSeparators:function(){var cP=this.__ec;if(!cP){return;}var cQ=qx.ui.core.Widget.__dS;var content=this.getContentElement();var cO;for(var i=0,l=cP.length;i<l;i++){cO=cP[i];cQ.poolDecorator(cO);content.remove(cO);}cP.length=0;},renderSeparator:function(cR,cS){var cT=qx.ui.core.Widget.__dS.getDecoratorElement(cR);this.getContentElement().add(cT);cT.resize(cS.width,cS.height);cT.setStyles({left:cS.left+bV,top:cS.top+bV});if(!this.__ec){this.__ec=[cT];}else{this.__ec.push(cT);}},_computeSizeHint:function(){var db=this.getWidth();var da=this.getMinWidth();var cV=this.getMaxWidth();var cY=this.getHeight();var cW=this.getMinHeight();var cX=this.getMaxHeight();{};var dc=this._getContentHint();var cU=this.getInsets();var de=cU.left+cU.right;var dd=cU.top+cU.bottom;if(db==null){db=dc.width+de;}if(cY==null){cY=dc.height+dd;}if(da==null){da=de;if(dc.minWidth!=null){da+=dc.minWidth;}}if(cW==null){cW=dd;if(dc.minHeight!=null){cW+=dc.minHeight;}}if(cV==null){if(dc.maxWidth==null){cV=Infinity;}else{cV=dc.maxWidth+de;}}if(cX==null){if(dc.maxHeight==null){cX=Infinity;}else{cX=dc.maxHeight+dd;}}return {width:db,minWidth:da,maxWidth:cV,height:cY,minHeight:cW,maxHeight:cX};},invalidateLayoutCache:function(){qx.ui.core.LayoutItem.prototype.invalidateLayoutCache.call(this);if(this.__ea){this.__ea.invalidateLayoutCache();}},_getContentHint:function(){var dg=this.__ea;if(dg){if(this.hasLayoutChildren()){var df;var dh=dg.getSizeHint();{};return dh;}else{return {width:0,height:0};}}else{return {width:100,height:50};}},_getHeightForWidth:function(di){var dm=this.getInsets();var dq=dm.left+dm.right;var dp=dm.top+dm.bottom;var dn=di-dq;var dk=this._getLayout();if(dk&&dk.hasHeightForWidth()){var dj=dk.getHeightForWidth(di);}else{dj=this._getContentHeightForWidth(dn);}var dl=dj+dp;return dl;},_getContentHeightForWidth:function(dr){throw new Error("Abstract method call: _getContentHeightForWidth()!");},getInsets:function(){var top=this.getPaddingTop();var dt=this.getPaddingRight();var dv=this.getPaddingBottom();var du=this.getPaddingLeft();if(this.__dU){var ds=this.__dU.getInsets();{};top+=ds.top;dt+=ds.right;dv+=ds.bottom;du+=ds.left;}return {"top":top,"right":dt,"bottom":dv,"left":du};},getInnerSize:function(){var dx=this.getBounds();if(!dx){return null;}var dw=this.getInsets();return {width:dx.width-dw.left-dw.right,height:dx.height-dw.top-dw.bottom};},show:function(){this.setVisibility(bR);},hide:function(){this.setVisibility(bu);},exclude:function(){this.setVisibility(bM);},isVisible:function(){return this.getVisibility()===bR;},isHidden:function(){return this.getVisibility()!==bR;},isExcluded:function(){return this.getVisibility()===bM;},isSeeable:function(){var dz=this.getContainerElement().getDomElement();if(dz){return dz.offsetWidth>0;}var dy=this;do{if(!dy.isVisible()){return false;}if(dy.isRootWidget()){return true;}dy=dy.getLayoutParent();}while(dy);return false;},_createContainerElement:function(){var dB={"$$widget":this.toHashCode()};{};var dA={zIndex:0,position:cc};return new qx.html.Element(bW,dA,dB);},__ed:function(){var dC=this._createContentElement();{};dC.setStyles({"position":cc,"zIndex":10});return dC;},_createContentElement:function(){return new qx.html.Element(bW,{overflowX:bu,overflowY:bu});},getContainerElement:function(){return this.__dQ;},getContentElement:function(){return this.__dR;},getDecoratorElement:function(){return this.__dU||null;},getShadowElement:function(){return this.__dV||null;},__ee:null,getLayoutChildren:function(){var dE=this.__ee;if(!dE){return this.__ef;}var dF;for(var i=0,l=dE.length;i<l;i++){var dD=dE[i];if(dD.hasUserBounds()||dD.isExcluded()){if(dF==null){dF=dE.concat();}qx.lang.Array.remove(dF,dD);}}return dF||dE;},scheduleLayoutUpdate:function(){qx.ui.core.queue.Layout.add(this);},invalidateLayoutChildren:function(){var dG=this.__ea;if(dG){dG.invalidateChildrenCache();}qx.ui.core.queue.Layout.add(this);},hasLayoutChildren:function(){var dH=this.__ee;if(!dH){return false;}var dI;for(var i=0,l=dH.length;i<l;i++){dI=dH[i];if(!dI.hasUserBounds()&&!dI.isExcluded()){return true;}}return false;},getChildrenContainer:function(){return this;},__ef:[],_getChildren:function(){return this.__ee||this.__ef;},_indexOf:function(dJ){var dK=this.__ee;if(!dK){return -1;}return dK.indexOf(dJ);},_hasChildren:function(){var dL=this.__ee;return dL!=null&&(!!dL[0]);},addChildrenToQueue:function(dM){var dN=this.__ee;if(!dN){return;}var dO;for(var i=0,l=dN.length;i<l;i++){dO=dN[i];dM[dO.$$hash]=dO;dO.addChildrenToQueue(dM);}},_add:function(dP,dQ){if(dP.getLayoutParent()==this){qx.lang.Array.remove(this.__ee,dP);}if(this.__ee){this.__ee.push(dP);}else{this.__ee=[dP];}this.__eg(dP,dQ);},_addAt:function(dR,dS,dT){if(!this.__ee){this.__ee=[];}if(dR.getLayoutParent()==this){qx.lang.Array.remove(this.__ee,dR);}var dU=this.__ee[dS];if(dU===dR){dR.setLayoutProperties(dT);}if(dU){qx.lang.Array.insertBefore(this.__ee,dR,dU);}else{this.__ee.push(dR);}this.__eg(dR,dT);},_addBefore:function(dV,dW,dX){{};if(dV==dW){return;}if(!this.__ee){this.__ee=[];}if(dV.getLayoutParent()==this){qx.lang.Array.remove(this.__ee,dV);}qx.lang.Array.insertBefore(this.__ee,dV,dW);this.__eg(dV,dX);},_addAfter:function(dY,ea,eb){{};if(dY==ea){return;}if(!this.__ee){this.__ee=[];}if(dY.getLayoutParent()==this){qx.lang.Array.remove(this.__ee,dY);}qx.lang.Array.insertAfter(this.__ee,dY,ea);this.__eg(dY,eb);},_remove:function(ec){if(!this.__ee){throw new Error("This widget has no children!");}qx.lang.Array.remove(this.__ee,ec);this.__eh(ec);},_removeAt:function(ed){if(!this.__ee){throw new Error("This widget has no children!");}var ee=this.__ee[ed];qx.lang.Array.removeAt(this.__ee,ed);this.__eh(ee);return ee;},_removeAll:function(){if(!this.__ee){return;}var ef=this.__ee.concat();this.__ee.length=0;for(var i=ef.length-1;i>=0;i--){this.__eh(ef[i]);}qx.ui.core.queue.Layout.add(this);},_afterAddChild:null,_afterRemoveChild:null,__eg:function(eg,eh){{};var parent=eg.getLayoutParent();if(parent&&parent!=this){parent._remove(eg);}eg.setLayoutParent(this);if(eh){eg.setLayoutProperties(eh);}else{this.updateLayoutProperties();}if(this._afterAddChild){this._afterAddChild(eg);}},__eh:function(ei){{};if(ei.getLayoutParent()!==this){throw new Error("Remove Error: "+ei+" is not a child of this widget!");}ei.setLayoutParent(null);if(this.__ea){this.__ea.invalidateChildrenCache();}qx.ui.core.queue.Layout.add(this);if(this._afterRemoveChild){this._afterRemoveChild(ei);}},capture:function(ej){this.getContainerElement().capture(ej);},releaseCapture:function(){this.getContainerElement().releaseCapture();},_applyPadding:function(ek,em,name){this._updateInsets=true;qx.ui.core.queue.Layout.add(this);},_createProtectorElement:function(){if(this.__dW){return;}var en=this.__dW=new qx.html.Element;{};en.setStyles({position:cc,top:0,left:0,zIndex:7});var eo=this.getBounds();if(eo){this.__dW.setStyles({width:eo.width+bV,height:eo.height+bV});}if(qx.core.Variant.isSet(cb,bo)){en.setStyles({backgroundImage:t+qx.util.ResourceManager.getInstance().toUri(by)+q,backgroundRepeat:cm});}this.getContainerElement().add(en);},_applyDecorator:function(ep,eq){{};var et=qx.ui.core.Widget.__dS;var er=this.getContainerElement();if(!this.__dW&&!qx.bom.client.Feature.CSS_POINTER_EVENTS){this._createProtectorElement();}if(eq){er.remove(this.__dU);et.poolDecorator(this.__dU);}if(ep){var es=this.__dU=et.getDecoratorElement(ep);es.setStyle(bI,5);er.add(es);}else{delete this.__dU;}this._applyBackgroundColor(this.getBackgroundColor());if(this.__eb(eq,ep)){this._updateInsets=true;qx.ui.core.queue.Layout.add(this);}else if(ep){var eu=this.getBounds();if(eu){es.resize(eu.width,eu.height);this.__dW&&this.__dW.setStyles({width:eu.width+bV,height:eu.height+bV});}}},_applyShadow:function(ev,ew){var eD=qx.ui.core.Widget.__dT;var ey=this.getContainerElement();if(ew){ey.remove(this.__dV);eD.poolDecorator(this.__dV);}if(ev){var eA=this.__dV=eD.getDecoratorElement(ev);ey.add(eA);var eC=eA.getInsets();eA.setStyles({left:(-eC.left)+bV,top:(-eC.top)+bV});var eB=this.getBounds();if(eB){var ez=eB.width+eC.left+eC.right;var ex=eB.height+eC.top+eC.bottom;eA.resize(ez,ex);}eA.tint(null);}else{delete this.__dV;}},_applyToolTipText:function(eE,eF){if(qx.core.Variant.isSet(bF,bP)){if(this.__dY){return;}var eG=qx.locale.Manager.getInstance();this.__dY=eG.addListener(bA,function(){var eH=this.getToolTipText();if(eH&&eH.translate){this.setToolTipText(eH.translate());}},this);}},_applyTextColor:function(eI,eJ){},_applyZIndex:function(eK,eL){this.getContainerElement().setStyle(bI,eK==null?0:eK);},_applyVisibility:function(eM,eN){var eO=this.getContainerElement();if(eM===bR){eO.show();}else{eO.hide();}var parent=this.$$parent;if(parent&&(eN==null||eM==null||eN===bM||eM===bM)){parent.invalidateLayoutChildren();}qx.ui.core.queue.Visibility.add(this);},_applyOpacity:function(eP,eQ){this.getContainerElement().setStyle(bL,eP==1?null:eP);if(qx.core.Variant.isSet(cb,bo)&&qx.bom.element.Decoration.isAlphaImageLoaderEnabled()){if(!qx.Class.isSubClassOf(this.getContentElement().constructor,qx.html.Image)){var eR=(eP==1||eP==null)?null:0.99;this.getContentElement().setStyle(bL,eR);}}},_applyCursor:function(eS,eT){if(eS==null&&!this.isSelectable()){eS=bK;}this.getContainerElement().setStyle(Y,eS,qx.bom.client.Engine.OPERA);},_applyBackgroundColor:function(eU,eV){var eW=this.getBackgroundColor();var eY=this.getContainerElement();if(this.__dU){this.__dU.tint(eW);eY.setStyle(bY,null);}else{var eX=qx.theme.manager.Color.getInstance().resolve(eW);eY.setStyle(bY,eX);}},_applyFont:function(fa,fb){},__ei:null,$$stateChanges:null,_forwardStates:null,hasState:function(fc){var fd=this.__ei;return !!fd&&!!fd[fc];},addState:function(fe){var ff=this.__ei;if(!ff){ff=this.__ei={};}if(ff[fe]){return;}this.__ei[fe]=true;if(fe===cd){this.syncAppearance();}else if(!qx.ui.core.queue.Visibility.isVisible(this)){this.$$stateChanges=true;}else{qx.ui.core.queue.Appearance.add(this);}var forward=this._forwardStates;var fi=this.__el;if(forward&&forward[fe]&&fi){var fg;for(var fh in fi){fg=fi[fh];if(fg instanceof qx.ui.core.Widget){fi[fh].addState(fe);}}}},removeState:function(fj){var fk=this.__ei;if(!fk||!fk[fj]){return;}delete this.__ei[fj];if(fj===cd){this.syncAppearance();}else if(!qx.ui.core.queue.Visibility.isVisible(this)){this.$$stateChanges=true;}else{qx.ui.core.queue.Appearance.add(this);}var forward=this._forwardStates;var fn=this.__el;if(forward&&forward[fj]&&fn){for(var fm in fn){var fl=fn[fm];if(fl instanceof qx.ui.core.Widget){fl.removeState(fj);}}}},replaceState:function(fo,fp){var fq=this.__ei;if(!fq){fq=this.__ei={};}if(!fq[fp]){fq[fp]=true;}if(fq[fo]){delete fq[fo];}if(!qx.ui.core.queue.Visibility.isVisible(this)){this.$$stateChanges=true;}else{qx.ui.core.queue.Appearance.add(this);}var forward=this._forwardStates;var ft=this.__el;if(forward&&forward[fp]&&ft){for(var fs in ft){var fr=ft[fs];if(fr instanceof qx.ui.core.Widget){fr.replaceState(fo,fp);}}}},__ej:null,__ek:null,syncAppearance:function(){var fy=this.__ei;var fx=this.__ej;var fz=qx.theme.manager.Appearance.getInstance();var fv=qx.core.Property.$$method.setThemed;var fD=qx.core.Property.$$method.resetThemed;if(this.__ek){delete this.__ek;if(fx){var fu=fz.styleFrom(fx,fy,null,this.getAppearance());if(fu){fx=null;}}}if(!fx){var fw=this;var fC=[];do{fC.push(fw.$$subcontrol||fw.getAppearance());}while(fw=fw.$$subparent);fx=fC.reverse().join(be).replace(/#[0-9]+/g,bf);this.__ej=fx;}var fA=fz.styleFrom(fx,fy,null,this.getAppearance());if(fA){var fB;if(fu){for(var fB in fu){if(fA[fB]===undefined){this[fD[fB]]();}}}{};for(var fB in fA){fA[fB]===undefined?this[fD[fB]]():this[fv[fB]](fA[fB]);}}else if(fu){for(var fB in fu){this[fD[fB]]();}}this.fireDataEvent(cp,this.__ei);},_applyAppearance:function(fE,fF){this.updateAppearance();},checkAppearanceNeeds:function(){if(!this.__dX){qx.ui.core.queue.Appearance.add(this);this.__dX=true;}else if(this.$$stateChanges){qx.ui.core.queue.Appearance.add(this);delete this.$$stateChanges;}},updateAppearance:function(){this.__ek=true;qx.ui.core.queue.Appearance.add(this);var fI=this.__el;if(fI){var fG;for(var fH in fI){fG=fI[fH];if(fG instanceof qx.ui.core.Widget){fG.updateAppearance();}}}},syncWidget:function(){},getEventTarget:function(){var fJ=this;while(fJ.getAnonymous()){fJ=fJ.getLayoutParent();if(!fJ){return null;}}return fJ;},getFocusTarget:function(){var fK=this;if(!fK.getEnabled()){return null;}while(fK.getAnonymous()||!fK.getFocusable()){fK=fK.getLayoutParent();if(!fK||!fK.getEnabled()){return null;}}return fK;},getFocusElement:function(){return this.getContainerElement();},isTabable:function(){return (!!this.getContainerElement().getDomElement())&&this.isFocusable();},_applyFocusable:function(fL,fM){var fN=this.getFocusElement();if(fL){var fO=this.getTabIndex();if(fO==null){fO=1;}fN.setAttribute(br,fO);if(qx.core.Variant.isSet(cb,bo)){fN.setAttribute(y,D);}else{fN.setStyle(s,x);}}else{if(fN.isNativelyFocusable()){fN.setAttribute(br,-1);}else if(fM){fN.setAttribute(br,null);}}},_applyKeepFocus:function(fP){var fQ=this.getFocusElement();fQ.setAttribute(bz,fP?bP:null);},_applyKeepActive:function(fR){var fS=this.getContainerElement();fS.setAttribute(bl,fR?bP:null);},_applyTabIndex:function(fT){if(fT==null){fT=1;}else if(fT<1||fT>32000){throw new Error("TabIndex property must be between 1 and 32000");}if(this.getFocusable()&&fT!=null){this.getFocusElement().setAttribute(br,fT);}},_applySelectable:function(fU,fV){if(fV!==null){this._applyCursor(this.getCursor());}this.getContentElement().setSelectable(fU);},_applyEnabled:function(fW,fX){if(fW===false){this.addState(bX);this.removeState(cd);if(this.isFocusable()){this.removeState(bq);this._applyFocusable(false,true);}if(this.isDraggable()){this._applyDraggable(false,true);}if(this.isDroppable()){this._applyDroppable(false,true);}}else{this.removeState(bX);if(this.isFocusable()){this._applyFocusable(true,false);}if(this.isDraggable()){this._applyDraggable(true,false);}if(this.isDroppable()){this._applyDroppable(true,false);}}},_applyNativeContextMenu:function(fY,ga,name){},_applyContextMenu:function(gb,gc){if(gc){gc.removeState(bt);if(gc.getOpener()==this){gc.resetOpener();}if(!gb){this.removeListener(bt,this._onContextMenuOpen);gc.removeListener(bp,this._onBeforeContextMenuOpen,this);}}if(gb){gb.setOpener(this);gb.addState(bt);if(!gc){this.addListener(bt,this._onContextMenuOpen);gb.addListener(bp,this._onBeforeContextMenuOpen,this);}}},_onContextMenuOpen:function(e){this.getContextMenu().openAtMouse(e);e.stop();},_onBeforeContextMenuOpen:function(e){if(e.getData()==bR&&this.hasListener(c)){this.fireDataEvent(c,e);}},_onStopEvent:function(e){e.stopPropagation();},_applyDraggable:function(gd,ge){if(!this.isEnabled()&&gd===true){gd=false;}qx.ui.core.DragDropCursor.getInstance();if(gd){this.addListener(cg,this._onDragStart);this.addListener(ca,this._onDrag);this.addListener(bH,this._onDragEnd);this.addListener(bE,this._onDragChange);}else{this.removeListener(cg,this._onDragStart);this.removeListener(ca,this._onDrag);this.removeListener(bH,this._onDragEnd);this.removeListener(bE,this._onDragChange);}this.getContainerElement().setAttribute(cl,gd?bP:null);},_applyDroppable:function(gf,gg){if(!this.isEnabled()&&gf===true){gf=false;}this.getContainerElement().setAttribute(ba,gf?bP:null);},_onDragStart:function(e){qx.ui.core.DragDropCursor.getInstance().placeToMouse(e);this.getApplicationRoot().setGlobalCursor(bK);},_onDrag:function(e){qx.ui.core.DragDropCursor.getInstance().placeToMouse(e);},_onDragEnd:function(e){qx.ui.core.DragDropCursor.getInstance().moveTo(-1000,-1000);this.getApplicationRoot().resetGlobalCursor();},_onDragChange:function(e){var gh=qx.ui.core.DragDropCursor.getInstance();var gi=e.getCurrentAction();gi?gh.setAction(gi):gh.resetAction();},visualizeFocus:function(){this.addState(bq);},visualizeBlur:function(){this.removeState(bq);},scrollChildIntoView:function(gj,gk,gl,gm){this.scrollChildIntoViewX(gj,gk,gm);this.scrollChildIntoViewY(gj,gl,gm);},scrollChildIntoViewX:function(gn,go,gp){this.getContentElement().scrollChildIntoViewX(gn.getContainerElement(),go,gp);},scrollChildIntoViewY:function(gq,gr,gs){this.getContentElement().scrollChildIntoViewY(gq.getContainerElement(),gr,gs);},focus:function(){if(this.isFocusable()){this.getFocusElement().focus();}else{throw new Error("Widget is not focusable!");}},blur:function(){if(this.isFocusable()){this.getFocusElement().blur();}else{throw new Error("Widget is not focusable!");}},activate:function(){this.getContainerElement().activate();},deactivate:function(){this.getContainerElement().deactivate();},tabFocus:function(){this.getFocusElement().focus();},hasChildControl:function(gt){if(!this.__el){return false;}return !!this.__el[gt];},__el:null,_getCreatedChildControls:function(){return this.__el;},getChildControl:function(gu,gv){if(!this.__el){if(gv){return null;}this.__el={};}var gw=this.__el[gu];if(gw){return gw;}if(gv===true){return null;}return this._createChildControl(gu);},_showChildControl:function(gx){var gy=this.getChildControl(gx);gy.show();return gy;},_excludeChildControl:function(gz){var gA=this.getChildControl(gz,true);if(gA){gA.exclude();}},_isChildControlVisible:function(gB){var gC=this.getChildControl(gB,true);if(gC){return gC.isVisible();}return false;},_createChildControl:function(gD){if(!this.__el){this.__el={};}else if(this.__el[gD]){throw new Error("Child control '"+gD+"' already created!");}var gH=gD.indexOf(M);if(gH==-1){var gE=this._createChildControlImpl(gD);}else{var gE=this._createChildControlImpl(gD.substring(0,gH),gD.substring(gH+1,gD.length));}if(!gE){throw new Error("Unsupported control: "+gD);}gE.$$subcontrol=gD;gE.$$subparent=this;var gF=this.__ei;var forward=this._forwardStates;if(gF&&forward&&gE instanceof qx.ui.core.Widget){for(var gG in gF){if(forward[gG]){gE.addState(gG);}}}this.fireDataEvent(k,gE);return this.__el[gD]=gE;},_createChildControlImpl:function(gI,gJ){return null;},_disposeChildControls:function(){var gN=this.__el;if(!gN){return;}var gL=qx.ui.core.Widget;for(var gM in gN){var gK=gN[gM];if(!gL.contains(this,gK)){gK.destroy();}else{gK.dispose();}}delete this.__el;},_findTopControl:function(){var gO=this;while(gO){if(!gO.$$subparent){return gO;}gO=gO.$$subparent;}return null;},getContainerLocation:function(gP){var gQ=this.getContainerElement().getDomElement();return gQ?qx.bom.element.Location.get(gQ,gP):null;},getContentLocation:function(gR){var gS=this.getContentElement().getDomElement();return gS?qx.bom.element.Location.get(gS,gR):null;},setDomLeft:function(gT){var gU=this.getContainerElement().getDomElement();if(gU){gU.style.left=gT+bV;}else{throw new Error("DOM element is not yet created!");}},setDomTop:function(gV){var gW=this.getContainerElement().getDomElement();if(gW){gW.style.top=gV+bV;}else{throw new Error("DOM element is not yet created!");}},setDomPosition:function(gX,top){var gY=this.getContainerElement().getDomElement();if(gY){gY.style.left=gX+bV;gY.style.top=top+bV;}else{throw new Error("DOM element is not yet created!");}},destroy:function(){if(this.$$disposed){return;}var parent=this.$$parent;if(parent){parent._remove(this);}qx.ui.core.queue.Dispose.add(this);},clone:function(){var ha=qx.ui.core.LayoutItem.prototype.clone.call(this);if(this.getChildren){var hb=this.getChildren();for(var i=0,l=hb.length;i<l;i++){ha.add(hb[i].clone());}}return ha;}},destruct:function(){if(!qx.core.ObjectRegistry.inShutDown){if(qx.core.Variant.isSet(bF,bP)){if(this.__dY){qx.locale.Manager.getInstance().removeListenerById(this.__dY);}}this.getContainerElement().setAttribute(J,null,true);this._disposeChildControls();qx.ui.core.queue.Appearance.remove(this);qx.ui.core.queue.Layout.remove(this);qx.ui.core.queue.Visibility.remove(this);qx.ui.core.queue.Widget.remove(this);}if(!qx.core.ObjectRegistry.inShutDown){var hd=qx.ui.core.Widget;var hc=this.getContainerElement();if(this.__dU){hc.remove(this.__dU);hd.__dS.poolDecorator(this.__dU);}if(this.__dV){hc.remove(this.__dV);hd.__dT.poolDecorator(this.__dV);}this.clearSeparators();this.__dU=this.__dV=this.__ec=null;}else{this._disposeArray(L);this._disposeObjects(W,A);}this._disposeArray(V);this.__ei=this.__el=null;this._disposeObjects(co,m,cq,bi);}});})();(function(){var d="qx.event.type.Data",c="qx.ui.container.Composite",b="addChildWidget",a="removeChildWidget";qx.Class.define(c,{extend:qx.ui.core.Widget,include:[qx.ui.core.MChildrenHandling,qx.ui.core.MLayoutHandling],construct:function(e){qx.ui.core.Widget.call(this);if(e!=null){this._setLayout(e);}},events:{addChildWidget:d,removeChildWidget:d},members:{_afterAddChild:function(f){this.fireNonBubblingEvent(b,qx.event.type.Data,[f]);},_afterRemoveChild:function(g){this.fireNonBubblingEvent(a,qx.event.type.Data,[g]);}},defer:function(h,i){qx.ui.core.MChildrenHandling.remap(i);qx.ui.core.MLayoutHandling.remap(i);}});})();(function(){var l="button",k="",j="close",i="String",h="_applyIcon",g="page",f="qx.event.type.Event",e="_applyShowCloseButton",d="tabview-page",c="qx.ui.tabview.Page",a="_applyLabel",b="Boolean";qx.Class.define(c,{extend:qx.ui.container.Composite,construct:function(m,n){qx.ui.container.Composite.call(this);this._createChildControl(l);if(m!=null){this.setLabel(m);}if(n!=null){this.setIcon(n);}},events:{"close":f},properties:{appearance:{refine:true,init:d},label:{check:i,init:k,apply:a},icon:{check:i,init:k,apply:h},showCloseButton:{check:b,init:false,apply:e}},members:{_forwardStates:{barTop:1,barRight:1,barBottom:1,barLeft:1,firstTab:1,lastTab:1},_applyIcon:function(o,p){this.getChildControl(l).setIcon(o);},_applyLabel:function(q,r){this.getChildControl(l).setLabel(q);},_applyEnabled:function(s,t){qx.ui.container.Composite.prototype._applyEnabled.call(this,s,t);var u=this.getChildControl(l);s==null?u.resetEnabled():u.setEnabled(s);},_createChildControlImpl:function(v,w){var x;switch(v){case l:x=new qx.ui.tabview.TabButton;x.setAllowGrowX(true);x.setAllowGrowY(true);x.setUserData(g,this);x.addListener(j,this._onButtonClose,this);break;}return x||qx.ui.container.Composite.prototype._createChildControlImpl.call(this,v);},_applyShowCloseButton:function(y,z){this.getChildControl(l).setShowCloseButton(y);},_onButtonClose:function(){this.fireEvent(j);},getButton:function(){return this.getChildControl(l);}}});})();(function(){var i="showPrivate",h="expandProperties",g="showInherited",f="showProtected",d="_applyClassNode",c="apiviewer.ui.tabview.AbstractPage",b="nodeName",a="abstract";qx.Class.define(c,{extend:qx.ui.tabview.Page,type:a,construct:function(j){qx.ui.tabview.Page.call(this);this.setLayout(new qx.ui.layout.Canvas());this.setShowCloseButton(true);this._bindings=[];this._viewer=this._createViewer();this.add(this._viewer,{edge:0});this.__So(this._viewer);this.setClassNode(j);},properties:{classNode:{apply:d}},members:{_viewer:null,_bindings:null,_createViewer:function(){throw new Error("Abstract method call!");},_applyClassNode:function(k,l){this._viewer.setDocNode(k);this.setLabel(k.getFullName());this.setIcon(apiviewer.TreeUtil.getIconUrl(k));this.setUserData(b,k.getFullName());qx.event.Timer.once(function(e){this._viewer.getContentElement().scrollToY(0);},this,0);},__So:function(m){var n=apiviewer.UiModel.getInstance();var o=this._bindings;o.push(n.bind(g,m,g));o.push(n.bind(h,m,h));o.push(n.bind(f,m,f));o.push(n.bind(i,m,i));},__Sp:function(){var p=apiviewer.UiModel.getInstance();var q=this._bindings;while(q.length>0){var r=q.pop();p.removeBinding(r);}}},destruct:function(){this.__Sp();this._viewer.destroy();this._viewer=null;}});})();(function(){var a="apiviewer.ui.tabview.PackagePage";qx.Class.define(a,{extend:apiviewer.ui.tabview.AbstractPage,members:{_createViewer:function(){return new apiviewer.ui.PackageViewer();}}});})();(function(){var m="ready",l="qx.client",k="mshtml",j="load",i="unload",h="qx.event.handler.Application",g="complete",f="qx.application",d="gecko|opera|webkit",c="left",a="DOMContentLoaded",b="shutdown";qx.Class.define(h,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(n){qx.core.Object.call(this);this._window=n.getWindow();this.__ij=false;this.__ik=false;this._initObserver();qx.event.handler.Application.$$instance=this;},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{ready:1,shutdown:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_WINDOW,IGNORE_CAN_HANDLE:true,onScriptLoaded:function(){var o=qx.event.handler.Application.$$instance;if(o){o.__in();}}},members:{canHandleEvent:function(p,q){},registerEvent:function(r,s,t){},unregisterEvent:function(u,v,w){},__il:null,__ij:null,__ik:null,__im:null,__in:function(){if(!this.__il&&this.__ij&&qx.$$loader.scriptLoaded){try{var x=qx.core.Setting.get(f);if(!qx.Class.getByName(x)){return;}}catch(e){}if(qx.core.Variant.isSet(l,k)){if(qx.event.Registration.hasListener(this._window,m)){this.__il=true;qx.event.Registration.fireEvent(this._window,m);}}else{this.__il=true;qx.event.Registration.fireEvent(this._window,m);}}},isApplicationReady:function(){return this.__il;},_initObserver:function(){if(qx.$$domReady||document.readyState==g||document.readyState==m){this.__ij=true;this.__in();}else{this._onNativeLoadWrapped=qx.lang.Function.bind(this._onNativeLoad,this);if(qx.core.Variant.isSet(l,d)){qx.bom.Event.addNativeListener(this._window,a,this._onNativeLoadWrapped);}else if(qx.core.Variant.isSet(l,k)){var self=this;var y=function(){try{document.documentElement.doScroll(c);if(document.body){self._onNativeLoadWrapped();}}catch(z){window.setTimeout(y,100);}};y();}qx.bom.Event.addNativeListener(this._window,j,this._onNativeLoadWrapped);}this._onNativeUnloadWrapped=qx.lang.Function.bind(this._onNativeUnload,this);qx.bom.Event.addNativeListener(this._window,i,this._onNativeUnloadWrapped);},_stopObserver:function(){if(this._onNativeLoadWrapped){qx.bom.Event.removeNativeListener(this._window,j,this._onNativeLoadWrapped);}qx.bom.Event.removeNativeListener(this._window,i,this._onNativeUnloadWrapped);this._onNativeLoadWrapped=null;this._onNativeUnloadWrapped=null;},_onNativeLoad:qx.event.GlobalError.observeMethod(function(){this.__ij=true;this.__in();}),_onNativeUnload:qx.event.GlobalError.observeMethod(function(){if(!this.__im){this.__im=true;try{qx.event.Registration.fireEvent(this._window,b);}catch(e){throw e;}finally{qx.core.ObjectRegistry.shutdown();}}})},destruct:function(){this._stopObserver();this._window=null;},defer:function(A){qx.event.Registration.addHandler(A);}});})();(function(){var f="ready",d="qx.application",c="beforeunload",b="qx.core.Init",a="shutdown";qx.Class.define(b,{statics:{getApplication:function(){return this.__ku||null;},ready:function(){if(this.__ku){return;}if(qx.bom.client.Engine.UNKNOWN_ENGINE){qx.log.Logger.warn("Could not detect engine!");}if(qx.bom.client.Engine.UNKNOWN_VERSION){qx.log.Logger.warn("Could not detect the version of the engine!");}if(qx.bom.client.Platform.UNKNOWN_PLATFORM){qx.log.Logger.warn("Could not detect platform!");}if(qx.bom.client.System.UNKNOWN_SYSTEM){qx.log.Logger.warn("Could not detect system!");}qx.log.Logger.debug(this,"Load runtime: "+(new Date-qx.Bootstrap.LOADSTART)+"ms");var h=qx.core.Setting.get(d);var i=qx.Class.getByName(h);if(i){this.__ku=new i;var g=new Date;this.__ku.main();qx.log.Logger.debug(this,"Main runtime: "+(new Date-g)+"ms");var g=new Date;this.__ku.finalize();qx.log.Logger.debug(this,"Finalize runtime: "+(new Date-g)+"ms");}else{qx.log.Logger.warn("Missing application class: "+h);}},__kv:function(e){var j=this.__ku;if(j){e.setReturnValue(j.close());}},__kw:function(){var k=this.__ku;if(k){k.terminate();}}},defer:function(l){qx.event.Registration.addListener(window,f,l.ready,l);qx.event.Registration.addListener(window,a,l.__kw,l);qx.event.Registration.addListener(window,c,l.__kv,l);}});})();(function(){var h="object",g="__cq",f="_applyTheme",e="qx.theme.manager.Decoration",d="Theme",c="changeTheme",b="string",a="singleton";qx.Class.define(e,{type:a,extend:qx.core.Object,properties:{theme:{check:d,nullable:true,apply:f,event:c}},members:{__cq:null,resolve:function(i){if(!i){return null;}if(typeof i===h){return i;}var l=this.getTheme();if(!l){return null;}var l=this.getTheme();if(!l){return null;}var m=this.__cq;if(!m){m=this.__cq={};}var j=m[i];if(j){return j;}var k=l.decorations[i];if(!k){return null;}var n=k.decorator;if(n==null){throw new Error("Missing definition of which decorator to use in entry: "+i+"!");}return m[i]=(new n).set(k.style);},isValidPropertyValue:function(o){if(typeof o===b){return this.isDynamic(o);}else if(typeof o===h){var p=o.constructor;return qx.Class.hasInterface(p,qx.ui.decoration.IDecorator);}return false;},isDynamic:function(q){if(!q){return false;}var r=this.getTheme();if(!r){return false;}return !!r.decorations[q];},_applyTheme:function(s,t){var v=qx.util.AliasManager.getInstance();if(t){for(var u in t.aliases){v.remove(u);}}if(s){for(var u in s.aliases){v.add(u,s.aliases[u]);}}if(!s){this.__cq={};}}},destruct:function(){this._disposeMap(g);}});})();(function(){var a="qx.ui.decoration.IDecorator";qx.Interface.define(a,{members:{getMarkup:function(){},resize:function(b,c,d){},tint:function(e,f){},getInsets:function(){}}});})();(function(){var b="qx.util.ValueManager",a="abstract";qx.Class.define(b,{type:a,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this._dynamic={};},members:{_dynamic:null,resolveDynamic:function(c){return this._dynamic[c];},isDynamic:function(d){return !!this._dynamic[d];},resolve:function(e){if(e&&this._dynamic[e]){return this._dynamic[e];}return e;},_setDynamic:function(f){this._dynamic=f;},_getDynamic:function(){return this._dynamic;}},destruct:function(){this._dynamic=null;}});})();(function(){var j="/",i="0",h="qx/static",g="http://",f="https://",e="file://",d="qx.util.AliasManager",c="singleton",b=".",a="static";qx.Class.define(d,{type:c,extend:qx.util.ValueManager,construct:function(){qx.util.ValueManager.call(this);this.__gF={};this.add(a,h);},members:{__gF:null,_preprocess:function(k){var n=this._getDynamic();if(n[k]===false){return k;}else if(n[k]===undefined){if(k.charAt(0)===j||k.charAt(0)===b||k.indexOf(g)===0||k.indexOf(f)===i||k.indexOf(e)===0){n[k]=false;return k;}if(this.__gF[k]){return this.__gF[k];}var m=k.substring(0,k.indexOf(j));var l=this.__gF[m];if(l!==undefined){n[k]=l+k.substring(m.length);}}return k;},add:function(o,p){this.__gF[o]=p;var r=this._getDynamic();for(var q in r){if(q.substring(0,q.indexOf(j))===o){r[q]=p+q.substring(o.length);}}},remove:function(s){delete this.__gF[s];},resolve:function(t){var u=this._getDynamic();if(t!=null){t=this._preprocess(t);}return u[t]||t;}},destruct:function(){this.__gF=null;}});})();(function(){var c="none",b="qx.html.Decorator",a="absolute";qx.Class.define(b,{extend:qx.html.Element,construct:function(d,e){var f={position:a,top:0,left:0};if(qx.bom.client.Feature.CSS_POINTER_EVENTS){f.pointerEvents=c;}qx.html.Element.call(this,null,f);this.__ks=d;this.__kt=e||d.toHashCode();this.useMarkup(d.getMarkup());},members:{__kt:null,__ks:null,getId:function(){return this.__kt;},getDecorator:function(){return this.__ks;},resize:function(g,h){this.__ks.resize(this.getDomElement(),g,h);},tint:function(i){this.__ks.tint(this.getDomElement(),i);},getInsets:function(){return this.__ks.getInsets();}},destruct:function(){this.__ks=null;}});})();(function(){var f="blur",e="focus",d="input",c="load",b="qx.ui.core.EventHandler",a="activate";qx.Class.define(b,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(){qx.core.Object.call(this);this.__em=qx.event.Registration.getManager(window);},statics:{PRIORITY:qx.event.Registration.PRIORITY_FIRST,SUPPORTED_TYPES:{mousemove:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,click:1,dblclick:1,contextmenu:1,mousewheel:1,keyup:1,keydown:1,keypress:1,keyinput:1,capture:1,losecapture:1,focusin:1,focusout:1,focus:1,blur:1,activate:1,deactivate:1,appear:1,disappear:1,dragstart:1,dragend:1,dragover:1,dragleave:1,drop:1,drag:1,dragchange:1,droprequest:1,touchstart:1,touchend:1,touchmove:1,touchcancel:1,tap:1,swipe:1},IGNORE_CAN_HANDLE:false},members:{__em:null,__en:{focusin:1,focusout:1,focus:1,blur:1},__eo:{mouseover:1,mouseout:1,appear:1,disappear:1},canHandleEvent:function(g,h){return g instanceof qx.ui.core.Widget;},_dispatchEvent:function(j){var p=j.getTarget();var o=qx.ui.core.Widget.getWidgetByElement(p);var q=false;while(o&&o.isAnonymous()){var q=true;o=o.getLayoutParent();}if(o&&q&&j.getType()==a){o.getContainerElement().activate();}if(this.__en[j.getType()]){o=o&&o.getFocusTarget();if(!o){return;}}if(j.getRelatedTarget){var x=j.getRelatedTarget();var w=qx.ui.core.Widget.getWidgetByElement(x);while(w&&w.isAnonymous()){w=w.getLayoutParent();}if(w){if(this.__en[j.getType()]){w=w.getFocusTarget();}if(w===o){return;}}}var s=j.getCurrentTarget();var u=qx.ui.core.Widget.getWidgetByElement(s);if(!u||u.isAnonymous()){return;}if(this.__en[j.getType()]){u=u.getFocusTarget();}var v=j.getType();if(!u||!(u.isEnabled()||this.__eo[v])){return;}var k=j.getEventPhase()==qx.event.type.Event.CAPTURING_PHASE;var r=this.__em.getListeners(u,v,k);if(!r||r.length===0){return;}var m=qx.event.Pool.getInstance().getObject(j.constructor);j.clone(m);m.setTarget(o);m.setRelatedTarget(w||null);m.setCurrentTarget(u);var y=j.getOriginalTarget();if(y){var n=qx.ui.core.Widget.getWidgetByElement(y);while(n&&n.isAnonymous()){n=n.getLayoutParent();}m.setOriginalTarget(n);}else{m.setOriginalTarget(p);}for(var i=0,l=r.length;i<l;i++){var t=r[i].context||u;r[i].handler.call(t,m);}if(m.getPropagationStopped()){j.stopPropagation();}if(m.getDefaultPrevented()){j.preventDefault();}qx.event.Pool.getInstance().poolObject(m);},registerEvent:function(z,A,B){var C;if(A===e||A===f){C=z.getFocusElement();}else if(A===c||A===d){C=z.getContentElement();}else{C=z.getContainerElement();}if(C){C.addListener(A,this._dispatchEvent,this,B);}},unregisterEvent:function(D,E,F){var G;if(E===e||E===f){G=D.getFocusElement();}else if(E===c||E===d){G=D.getContentElement();}else{G=D.getContainerElement();}if(G){G.removeListener(E,this._dispatchEvent,this,F);}}},destruct:function(){this.__em=null;},defer:function(H){qx.event.Registration.addHandler(H);}});})();(function(){var i="",h="/",g="mshtml",f="qx.client",e="//",d="?",c="string",b="qx.util.ResourceManager",a="singleton";qx.Class.define(b,{extend:qx.core.Object,type:a,statics:{__co:qx.$$resources||{},__cp:{}},members:{has:function(j){return !!this.self(arguments).__co[j];},getData:function(k){return this.self(arguments).__co[k]||null;},getImageWidth:function(l){var m=this.self(arguments).__co[l];return m?m[0]:null;},getImageHeight:function(n){var o=this.self(arguments).__co[n];return o?o[1]:null;},getImageFormat:function(p){var q=this.self(arguments).__co[p];return q?q[2]:null;},isClippedImage:function(r){var s=this.self(arguments).__co[r];return s&&s.length>4;},toUri:function(t){if(t==null){return t;}var u=this.self(arguments).__co[t];if(!u){return t;}if(typeof u===c){var w=u;}else{var w=u[3];if(!w){return t;}}var v=i;if(qx.core.Variant.isSet(f,g)&&qx.bom.client.Feature.SSL){v=this.self(arguments).__cp[w];}return v+qx.$$libraries[w].resourceUri+h+t;}},defer:function(x){if(qx.core.Variant.isSet(f,g)){if(qx.bom.client.Feature.SSL){for(var B in qx.$$libraries){var z;if(qx.$$libraries[B].resourceUri){z=qx.$$libraries[B].resourceUri;}else{x.__cp[B]=i;continue;}if(z.match(/^\/\//)!=null){x.__cp[B]=window.location.protocol;}else if(z.match(/^\//)!=null){x.__cp[B]=window.location.protocol+e+window.location.host;}else if(z.match(/^\.\//)!=null){var y=document.URL;x.__cp[B]=y.substring(0,y.lastIndexOf(h)+1);}else if(z.match(/^http/)!=null){x.__cp[B]=i;}else{var C=window.location.href.indexOf(d);var A;if(C==-1){A=window.location.href;}else{A=window.location.href.substring(0,C);}x.__cp[B]=A.substring(0,A.lastIndexOf(h)+1);}}}}}});})();(function(){var c="qx.bom.client.Locale",b="-",a="";qx.Class.define(c,{statics:{LOCALE:"",VARIANT:"",__lD:function(){var d=(navigator.userLanguage||navigator.language).toLowerCase();var f=a;var e=d.indexOf(b);if(e!=-1){f=d.substr(e+1);d=d.substr(0,e);}this.LOCALE=d;this.VARIANT=f;}},defer:function(g){g.__lD();}});})();(function(){var t="",s='indexOf',r='slice',q='concat',p='toLocaleLowerCase',o="qx.type.BaseString",n='match',m='toLocaleUpperCase',k='search',j='replace',c='toLowerCase',h='charCodeAt',f='split',b='substring',a='lastIndexOf',e='substr',d='toUpperCase',g='charAt';qx.Class.define(o,{extend:Object,construct:function(u){var u=u||t;this.__mc=u;this.length=u.length;},members:{$$isString:true,length:0,__mc:null,toString:function(){return this.__mc;},charAt:null,valueOf:null,charCodeAt:null,concat:null,indexOf:null,lastIndexOf:null,match:null,replace:null,search:null,slice:null,split:null,substr:null,substring:null,toLowerCase:null,toUpperCase:null,toHashCode:function(){return qx.core.ObjectRegistry.toHashCode(this);},toLocaleLowerCase:null,toLocaleUpperCase:null,base:function(v,w){return qx.core.Object.prototype.base.apply(this,arguments);}},defer:function(x,y){{};var z=[g,h,q,s,a,n,j,k,r,f,e,b,c,d,p,m];y.valueOf=y.toString;if(new x(t).valueOf()==null){delete y.valueOf;}for(var i=0,l=z.length;i<l;i++){y[z[i]]=String.prototype[z[i]];}}});})();(function(){var a="qx.locale.LocalizedString";qx.Class.define(a,{extend:qx.type.BaseString,construct:function(b,c,d){qx.type.BaseString.call(this,b);this.__ep=c;this.__eq=d;},members:{__ep:null,__eq:null,translate:function(){return qx.locale.Manager.getInstance().translate(this.__ep,this.__eq);}}});})();(function(){var k="_",j="",h="_applyLocale",g="changeLocale",f="C",e="qx.dynlocale",d="on",c="qx.locale.Manager",b="String",a="singleton";qx.Class.define(c,{type:a,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__jf=qx.$$translations||{};this.__jg=qx.$$locales||{};var n=qx.bom.client.Locale;var l=n.LOCALE;var m=n.VARIANT;if(m!==j){l+=k+m;}this.__jh=l;this.setLocale(l||this.__ji);},statics:{tr:function(o,p){var q=qx.lang.Array.fromArguments(arguments);q.splice(0,1);return qx.locale.Manager.getInstance().translate(o,q);},trn:function(r,s,t,u){var v=qx.lang.Array.fromArguments(arguments);v.splice(0,3);if(t!=1){return qx.locale.Manager.getInstance().translate(s,v);}else{return qx.locale.Manager.getInstance().translate(r,v);}},trc:function(w,x,y){var z=qx.lang.Array.fromArguments(arguments);z.splice(0,2);return qx.locale.Manager.getInstance().translate(x,z);},marktr:function(A){return A;}},properties:{locale:{check:b,nullable:true,apply:h,event:g}},members:{__ji:f,__jj:null,__jk:null,__jf:null,__jg:null,__jh:null,getLanguage:function(){return this.__jk;},getTerritory:function(){return this.getLocale().split(k)[1]||j;},getAvailableLocales:function(){var C=[];for(var B in this.__jg){if(B!=this.__ji){C.push(B);}}return C;},__jl:function(D){var F;var E=D.indexOf(k);if(E==-1){F=D;}else{F=D.substring(0,E);}return F;},_applyLocale:function(G,H){{};this.__jj=G;this.__jk=this.__jl(G);},addTranslation:function(I,J){var K=this.__jf;if(K[I]){for(var L in J){K[I][L]=J[L];}}else{K[I]=J;}},addLocale:function(M,N){var O=this.__jg;if(O[M]){for(var P in N){O[M][P]=N[P];}}else{O[M]=N;}},translate:function(Q,R,S){var T=this.__jf;return this.__jm(T,Q,R,S);},localize:function(U,V,W){var X=this.__jg;return this.__jm(X,U,V,W);},__jm:function(Y,ba,bb,bc){var bd;if(!Y){return ba;}if(bc){var bf=this.__jl(bc);}else{bc=this.__jj;bf=this.__jk;}if(!bd&&Y[bc]){bd=Y[bc][ba];}if(!bd&&Y[bf]){bd=Y[bf][ba];}if(!bd&&Y[this.__ji]){bd=Y[this.__ji][ba];}if(!bd){bd=ba;}if(bb.length>0){var be=[];for(var i=0;i<bb.length;i++){var bg=bb[i];if(bg&&bg.translate){be[i]=bg.translate();}else{be[i]=bg;}}bd=qx.lang.String.format(bd,be);}if(qx.core.Variant.isSet(e,d)){bd=new qx.locale.LocalizedString(bd,ba,bb);}return bd;}},destruct:function(){this.__jf=this.__jg=null;}});})();(function(){var k="px",j="qx.client",i="div",h="img",g="",f="no-repeat",d="scale-x",c="mshtml",b="scale",a="scale-y",G="qx/icon",F="repeat",E=".png",D="crop",C="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='",B='<div style="',A="repeat-y",z='<img src="',y="qx.bom.element.Decoration",x="', sizingMethod='",r="png",s="')",p='"></div>',q='"/>',n='" style="',o="none",l="webkit",m=" ",t="repeat-x",u="DXImageTransform.Microsoft.AlphaImageLoader",w="qx/static/blank.gif",v="absolute";qx.Class.define(y,{statics:{DEBUG:false,__hx:{},__hy:qx.core.Variant.isSet(j,c)&&qx.bom.client.Engine.VERSION<9,__hz:qx.core.Variant.select(j,{"mshtml":{"scale-x":true,"scale-y":true,"scale":true,"no-repeat":true},"default":null}),__hA:{"scale-x":h,"scale-y":h,"scale":h,"repeat":i,"no-repeat":i,"repeat-x":i,"repeat-y":i},update:function(H,I,J,K){var M=this.getTagName(J,I);if(M!=H.tagName.toLowerCase()){throw new Error("Image modification not possible because elements could not be replaced at runtime anymore!");}var N=this.getAttributes(I,J,K);if(M===h){H.src=N.src||qx.util.ResourceManager.getInstance().toUri(w);}if(H.style.backgroundPosition!=g&&N.style.backgroundPosition===undefined){N.style.backgroundPosition=null;}if(H.style.clip!=g&&N.style.clip===undefined){N.style.clip=null;}var L=qx.bom.element.Style;L.setStyles(H,N.style);if(this.__hy){try{H.filters[u].apply();}catch(e){}}},create:function(O,P,Q){var R=this.getTagName(P,O);var T=this.getAttributes(O,P,Q);var S=qx.bom.element.Style.compile(T.style);if(R===h){return z+T.src+n+S+q;}else{return B+S+p;}},getTagName:function(U,V){if(qx.core.Variant.isSet(j,c)){if(V&&this.__hy&&this.__hz[U]&&qx.lang.String.endsWith(V,E)){return i;}}return this.__hA[U];},getAttributes:function(W,X,Y){if(!Y){Y={};}if(!Y.position){Y.position=v;}if(qx.core.Variant.isSet(j,c)){Y.fontSize=0;Y.lineHeight=0;}else if(qx.core.Variant.isSet(j,l)){Y.WebkitUserDrag=o;}var bb=qx.util.ResourceManager.getInstance().getImageFormat(W)||qx.io.ImageLoader.getFormat(W);{};var ba;if(this.__hy&&this.__hz[X]&&bb===r){ba=this.__hD(Y,X,W);}else{if(X===b){ba=this.__hE(Y,X,W);}else if(X===d||X===a){ba=this.__hF(Y,X,W);}else{ba=this.__hI(Y,X,W);}}return ba;},__hB:function(bc,bd,be){if(bc.width==null&&bd!=null){bc.width=bd+k;}if(bc.height==null&&be!=null){bc.height=be+k;}return bc;},__hC:function(bf){var bh=qx.util.ResourceManager.getInstance().getImageWidth(bf)||qx.io.ImageLoader.getWidth(bf);var bi=qx.util.ResourceManager.getInstance().getImageHeight(bf)||qx.io.ImageLoader.getHeight(bf);return {width:bh,height:bi};},__hD:function(bj,bk,bl){var bo=this.__hC(bl);bj=this.__hB(bj,bo.width,bo.height);var bn=bk==f?D:b;var bm=C+qx.util.ResourceManager.getInstance().toUri(bl)+x+bn+s;bj.filter=bm;bj.backgroundImage=bj.backgroundRepeat=g;return {style:bj};},__hE:function(bp,bq,br){var bs=qx.util.ResourceManager.getInstance().toUri(br);var bt=this.__hC(br);bp=this.__hB(bp,bt.width,bt.height);return {src:bs,style:bp};},__hF:function(bu,bv,bw){var bA=qx.util.ResourceManager.getInstance();var bz=bA.isClippedImage(bw);var bB=this.__hC(bw);if(bz){var by=bA.getData(bw);var bx=bA.toUri(by[4]);if(bv===d){bu=this.__hG(bu,by,bB.height);}else{bu=this.__hH(bu,by,bB.width);}return {src:bx,style:bu};}else{{};if(bv==d){bu.height=bB.height==null?null:bB.height+k;}else if(bv==a){bu.width=bB.width==null?null:bB.width+k;}var bx=bA.toUri(bw);return {src:bx,style:bu};}},__hG:function(bC,bD,bE){var bF=qx.util.ResourceManager.getInstance().getImageHeight(bD[4]);bC.clip={top:-bD[6],height:bE};bC.height=bF+k;if(bC.top!=null){bC.top=(parseInt(bC.top,10)+bD[6])+k;}else if(bC.bottom!=null){bC.bottom=(parseInt(bC.bottom,10)+bE-bF-bD[6])+k;}return bC;},__hH:function(bG,bH,bI){var bJ=qx.util.ResourceManager.getInstance().getImageWidth(bH[4]);bG.clip={left:-bH[5],width:bI};bG.width=bJ+k;if(bG.left!=null){bG.left=(parseInt(bG.left,10)+bH[5])+k;}else if(bG.right!=null){bG.right=(parseInt(bG.right,10)+bI-bJ-bH[5])+k;}return bG;},__hI:function(bK,bL,bM){var bR=qx.util.ResourceManager.getInstance().isClippedImage(bM);var bQ=this.__hC(bM);if(bR&&bL!==F){var bP=qx.util.ResourceManager.getInstance().getData(bM);var bO=qx.bom.element.Background.getStyles(bP[4],bL,bP[5],bP[6]);for(var bN in bO){bK[bN]=bO[bN];}if(bQ.width!=null&&bK.width==null&&(bL==A||bL===f)){bK.width=bQ.width+k;}if(bQ.height!=null&&bK.height==null&&(bL==t||bL===f)){bK.height=bQ.height+k;}return {style:bK};}else{{};bK=this.__hB(bK,bQ.width,bQ.height);bK=this.__hJ(bK,bM,bL);return {style:bK};}},__hJ:function(bS,bT,bU){var top=null;var bY=null;if(bS.backgroundPosition){var bV=bS.backgroundPosition.split(m);bY=parseInt(bV[0],10);if(isNaN(bY)){bY=bV[0];}top=parseInt(bV[1],10);if(isNaN(top)){top=bV[1];}}var bX=qx.bom.element.Background.getStyles(bT,bU,bY,top);for(var bW in bX){bS[bW]=bX[bW];}if(bS.filter){bS.filter=g;}return bS;},__hK:function(ca){if(this.DEBUG&&qx.util.ResourceManager.getInstance().has(ca)&&ca.indexOf(G)==-1){if(!this.__hx[ca]){qx.log.Logger.debug("Potential clipped image candidate: "+ca);this.__hx[ca]=true;}}},isAlphaImageLoaderEnabled:qx.core.Variant.select(j,{"mshtml":function(){return qx.bom.element.Decoration.__hy;},"default":function(){return false;}})}});})();(function(){var c="qx.client",b="load",a="qx.io.ImageLoader";qx.Bootstrap.define(a,{statics:{__lo:{},__lp:{width:null,height:null},__lq:/\.(png|gif|jpg|jpeg|bmp)\b/i,isLoaded:function(d){var e=this.__lo[d];return !!(e&&e.loaded);},isFailed:function(f){var g=this.__lo[f];return !!(g&&g.failed);},isLoading:function(h){var j=this.__lo[h];return !!(j&&j.loading);},getFormat:function(k){var m=this.__lo[k];return m?m.format:null;},getSize:function(n){var o=this.__lo[n];return o?{width:o.width,height:o.height}:this.__lp;},getWidth:function(p){var q=this.__lo[p];return q?q.width:null;},getHeight:function(r){var s=this.__lo[r];return s?s.height:null;},load:function(t,u,v){var w=this.__lo[t];if(!w){w=this.__lo[t]={};}if(u&&!v){v=window;}if(w.loaded||w.loading||w.failed){if(u){if(w.loading){w.callbacks.push(u,v);}else{u.call(v,t,w);}}}else{w.loading=true;w.callbacks=[];if(u){w.callbacks.push(u,v);}var y=new Image();var x=qx.lang.Function.listener(this.__lr,this,y,t);y.onload=x;y.onerror=x;y.src=t;w.element=y;}},abort:function(z){var A=this.__lo[z];if(A&&!A.loaded){A.aborted=true;var C=A.callbacks;var B=A.element;B.onload=B.onerror=null;delete A.callbacks;delete A.element;delete A.loading;for(var i=0,l=C.length;i<l;i+=2){C[i].call(C[i+1],z,A);}}this.__lo[z]=null;},__lr:qx.event.GlobalError.observeMethod(function(event,D,E){var F=this.__lo[E];if(event.type===b){F.loaded=true;F.width=this.__ls(D);F.height=this.__lt(D);var G=this.__lq.exec(E);if(G!=null){F.format=G[1];}}else{F.failed=true;}D.onload=D.onerror=null;var H=F.callbacks;delete F.loading;delete F.callbacks;delete F.element;for(var i=0,l=H.length;i<l;i+=2){H[i].call(H[i+1],E,F);}}),__ls:qx.core.Variant.select(c,{"gecko":function(I){return I.naturalWidth;},"default":function(J){return J.width;}}),__lt:qx.core.Variant.select(c,{"gecko":function(K){return K.naturalHeight;},"default":function(L){return L.height;}})}});})();(function(){var m="number",l="0",k="px",j=";",i="background-image:url(",h=");",g="",f=")",e="background-repeat:",d=" ",a="qx.bom.element.Background",c="url(",b="background-position:";qx.Class.define(a,{statics:{__da:[i,null,h,b,null,j,e,null,j],__db:{backgroundImage:null,backgroundPosition:null,backgroundRepeat:null},__dc:function(n,top){var o=qx.bom.client.Engine;if(o.GECKO&&o.VERSION<1.9&&n==top&&typeof n==m){top+=0.01;}if(n){var p=(typeof n==m)?n+k:n;}else{p=l;}if(top){var q=(typeof top==m)?top+k:top;}else{q=l;}return p+d+q;},compile:function(r,s,t,top){var u=this.__dc(t,top);var v=qx.util.ResourceManager.getInstance().toUri(r);var w=this.__da;w[1]=v;w[4]=u;w[7]=s;return w.join(g);},getStyles:function(x,y,z,top){if(!x){return this.__db;}var A=this.__dc(z,top);var B=qx.util.ResourceManager.getInstance().toUri(x);var C={backgroundPosition:A,backgroundImage:c+B+f};if(y!=null){C.backgroundRepeat=y;}return C;},set:function(D,E,F,G,top){var H=this.getStyles(E,F,G,top);for(var I in H){D.style[I]=H[I];}}}});})();(function(){var j="source",i="scale",h="no-repeat",g="qx.client",f="mshtml",e="webkit",d="backgroundImage",c="div",b="qx.html.Image",a="qx/static/blank.gif";qx.Class.define(b,{extend:qx.html.Element,members:{tagNameHint:null,_applyProperty:function(name,k){qx.html.Element.prototype._applyProperty.call(this,name,k);if(name===j){var o=this.getDomElement();var l=this.getAllStyles();if(this.getNodeName()==c&&this.getStyle(d)){l.backgroundPosition=null;l.backgroundRepeat=null;}var m=this._getProperty(j);var n=this._getProperty(i);var p=n?i:h;if(m!=null){qx.bom.element.Decoration.update(o,m,p,l);}}},_createDomElement:function(){var r=this._getProperty(i);var s=r?i:h;if(qx.core.Variant.isSet(g,f)){var q=this._getProperty(j);if(this.tagNameHint!=null){this.setNodeName(this.tagNameHint);}else{this.setNodeName(qx.bom.element.Decoration.getTagName(s,q));}}else{this.setNodeName(qx.bom.element.Decoration.getTagName(s));}return qx.html.Element.prototype._createDomElement.call(this);},_copyData:function(t){return qx.html.Element.prototype._copyData.call(this,true);},setSource:function(u){this._setProperty(j,u);return this;},getSource:function(){return this._getProperty(j);},resetSource:function(){if(qx.core.Variant.isSet(g,e)){this._setProperty(j,qx.util.ResourceManager.getInstance().toUri(a));}else{this._removeProperty(j,true);}return this;},setScale:function(v){this._setProperty(i,v);return this;},getScale:function(){return this._getProperty(i);}}});})();(function(){var f="_applyTheme",e="qx.theme.manager.Color",d="Theme",c="changeTheme",b="string",a="singleton";qx.Class.define(e,{type:a,extend:qx.util.ValueManager,properties:{theme:{check:d,nullable:true,apply:f,event:c}},members:{_applyTheme:function(g){var h={};if(g){var i=g.colors;var j=qx.util.ColorUtil;var k;for(var l in i){k=i[l];if(typeof k===b){if(!j.isCssString(k)){throw new Error("Could not parse color: "+k);}}else if(k instanceof Array){k=j.rgbToRgbString(k);}else{throw new Error("Could not parse color: "+k);}h[l]=k;}}this._setDynamic(h);},resolve:function(m){var p=this._dynamic;var n=p[m];if(n){return n;}var o=this.getTheme();if(o!==null&&o.colors[m]){return p[m]=o.colors[m];}return m;},isDynamic:function(q){var s=this._dynamic;if(q&&(s[q]!==undefined)){return true;}var r=this.getTheme();if(r!==null&&q&&(r.colors[q]!==undefined)){s[q]=r.colors[q];return true;}return false;}}});})();(function(){var h=",",e="rgb(",d=")",c="qx.theme.manager.Color",a="qx.util.ColorUtil";qx.Class.define(a,{statics:{REGEXP:{hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,rgb:/^rgb\(\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*\)$/,rgba:/^rgba\(\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*\)$/},SYSTEM:{activeborder:true,activecaption:true,appworkspace:true,background:true,buttonface:true,buttonhighlight:true,buttonshadow:true,buttontext:true,captiontext:true,graytext:true,highlight:true,highlighttext:true,inactiveborder:true,inactivecaption:true,inactivecaptiontext:true,infobackground:true,infotext:true,menu:true,menutext:true,scrollbar:true,threeddarkshadow:true,threedface:true,threedhighlight:true,threedlightshadow:true,threedshadow:true,window:true,windowframe:true,windowtext:true},NAMED:{black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:[-1,-1,-1],magenta:[255,0,255],orange:[255,165,0],brown:[165,42,42]},isNamedColor:function(j){return this.NAMED[j]!==undefined;},isSystemColor:function(k){return this.SYSTEM[k]!==undefined;},supportsThemes:function(){return qx.Class.isDefined(c);},isThemedColor:function(l){if(!this.supportsThemes()){return false;}return qx.theme.manager.Color.getInstance().isDynamic(l);},stringToRgb:function(m){if(this.supportsThemes()&&this.isThemedColor(m)){var m=qx.theme.manager.Color.getInstance().resolveDynamic(m);}if(this.isNamedColor(m)){return this.NAMED[m];}else if(this.isSystemColor(m)){throw new Error("Could not convert system colors to RGB: "+m);}else if(this.isRgbString(m)){return this.__gB();}else if(this.isHex3String(m)){return this.__gD();}else if(this.isHex6String(m)){return this.__gE();}throw new Error("Could not parse color: "+m);},cssStringToRgb:function(n){if(this.isNamedColor(n)){return this.NAMED[n];}else if(this.isSystemColor(n)){throw new Error("Could not convert system colors to RGB: "+n);}else if(this.isRgbString(n)){return this.__gB();}else if(this.isRgbaString(n)){return this.__gC();}else if(this.isHex3String(n)){return this.__gD();}else if(this.isHex6String(n)){return this.__gE();}throw new Error("Could not parse color: "+n);},stringToRgbString:function(o){return this.rgbToRgbString(this.stringToRgb(o));},rgbToRgbString:function(s){return e+s[0]+h+s[1]+h+s[2]+d;},rgbToHexString:function(u){return (qx.lang.String.pad(u[0].toString(16).toUpperCase(),2)+qx.lang.String.pad(u[1].toString(16).toUpperCase(),2)+qx.lang.String.pad(u[2].toString(16).toUpperCase(),2));},isValidPropertyValue:function(v){return this.isThemedColor(v)||this.isNamedColor(v)||this.isHex3String(v)||this.isHex6String(v)||this.isRgbString(v);},isCssString:function(w){return this.isSystemColor(w)||this.isNamedColor(w)||this.isHex3String(w)||this.isHex6String(w)||this.isRgbString(w);},isHex3String:function(x){return this.REGEXP.hex3.test(x);},isHex6String:function(y){return this.REGEXP.hex6.test(y);},isRgbString:function(z){return this.REGEXP.rgb.test(z);},isRgbaString:function(A){return this.REGEXP.rgba.test(A);},__gB:function(){var D=parseInt(RegExp.$1,10);var C=parseInt(RegExp.$2,10);var B=parseInt(RegExp.$3,10);return [D,C,B];},__gC:function(){var G=parseInt(RegExp.$1,10);var F=parseInt(RegExp.$2,10);var E=parseInt(RegExp.$3,10);return [G,F,E];},__gD:function(){var J=parseInt(RegExp.$1,16)*17;var I=parseInt(RegExp.$2,16)*17;var H=parseInt(RegExp.$3,16)*17;return [J,I,H];},__gE:function(){var M=(parseInt(RegExp.$1,16)*16)+parseInt(RegExp.$2,16);var L=(parseInt(RegExp.$3,16)*16)+parseInt(RegExp.$4,16);var K=(parseInt(RegExp.$5,16)*16)+parseInt(RegExp.$6,16);return [M,L,K];},hex3StringToRgb:function(N){if(this.isHex3String(N)){return this.__gD(N);}throw new Error("Invalid hex3 value: "+N);},hex6StringToRgb:function(O){if(this.isHex6String(O)){return this.__gE(O);}throw new Error("Invalid hex6 value: "+O);},hexStringToRgb:function(P){if(this.isHex3String(P)){return this.__gD(P);}if(this.isHex6String(P)){return this.__gE(P);}throw new Error("Invalid hex value: "+P);},rgbToHsb:function(Q){var S,T,V;var bc=Q[0];var Y=Q[1];var R=Q[2];var bb=(bc>Y)?bc:Y;if(R>bb){bb=R;}var U=(bc<Y)?bc:Y;if(R<U){U=R;}V=bb/255.0;if(bb!=0){T=(bb-U)/bb;}else{T=0;}if(T==0){S=0;}else{var X=(bb-bc)/(bb-U);var ba=(bb-Y)/(bb-U);var W=(bb-R)/(bb-U);if(bc==bb){S=W-ba;}else if(Y==bb){S=2.0+X-W;}else{S=4.0+ba-X;}S=S/6.0;if(S<0){S=S+1.0;}}return [Math.round(S*360),Math.round(T*100),Math.round(V*100)];},hsbToRgb:function(bd){var i,f,p,q,t;var be=bd[0]/360;var bf=bd[1]/100;var bg=bd[2]/100;if(be>=1.0){be%=1.0;}if(bf>1.0){bf=1.0;}if(bg>1.0){bg=1.0;}var bh=Math.floor(255*bg);var bi={};if(bf==0.0){bi.red=bi.green=bi.blue=bh;}else{be*=6.0;i=Math.floor(be);f=be-i;p=Math.floor(bh*(1.0-bf));q=Math.floor(bh*(1.0-(bf*f)));t=Math.floor(bh*(1.0-(bf*(1.0-f))));switch(i){case 0:bi.red=bh;bi.green=t;bi.blue=p;break;case 1:bi.red=q;bi.green=bh;bi.blue=p;break;case 2:bi.red=p;bi.green=bh;bi.blue=t;break;case 3:bi.red=p;bi.green=q;bi.blue=bh;break;case 4:bi.red=t;bi.green=p;bi.blue=bh;break;case 5:bi.red=bh;bi.green=p;bi.blue=q;break;}}return [bi.red,bi.green,bi.blue];},randomColor:function(){var r=Math.round(Math.random()*255);var g=Math.round(Math.random()*255);var b=Math.round(Math.random()*255);return this.rgbToRgbString([r,g,b]);}}});})();(function(){var h="string",g="_applyTheme",f="qx.theme.manager.Appearance",e=":",d="Theme",c="changeTheme",b="/",a="singleton";qx.Class.define(f,{type:a,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__dL={};this.__dM={};},properties:{theme:{check:d,nullable:true,event:c,apply:g}},members:{__dN:{},__dL:null,__dM:null,_applyTheme:function(j,k){this.__dM={};this.__dL={};},__dO:function(l,m,n){var s=m.appearances;var v=s[l];if(!v){var w=b;var p=[];var u=l.split(w);var t;while(!v&&u.length>0){p.unshift(u.pop());var q=u.join(w);v=s[q];if(v){t=v.alias||v;if(typeof t===h){var r=t+w+p.join(w);return this.__dO(r,m,n);}}}for(var i=0;i<p.length-1;i++){p.shift();var q=p.join(w);var o=this.__dO(q,m);if(o){return o;}}if(n!=null){return this.__dO(n,m);}return null;}else if(typeof v===h){return this.__dO(v,m,n);}else if(v.include&&!v.style){return this.__dO(v.include,m,n);}return l;},styleFrom:function(x,y,z,A){if(!z){z=this.getTheme();}var G=this.__dM;var B=G[x];if(!B){B=G[x]=this.__dO(x,z,A);}var L=z.appearances[B];if(!L){this.warn("Missing appearance: "+x);return null;}if(!L.style){return null;}var M=B;if(y){var N=L.$$bits;if(!N){N=L.$$bits={};L.$$length=0;}var E=0;for(var H in y){if(!y[H]){continue;}if(N[H]==null){N[H]=1<<L.$$length++;}E+=N[H];}if(E>0){M+=e+E;}}var F=this.__dL;if(F[M]!==undefined){return F[M];}if(!y){y=this.__dN;}var J;if(L.include||L.base){var D=L.style(y);var C;if(L.include){C=this.styleFrom(L.include,y,z,A);}J={};if(L.base){var I=this.styleFrom(B,y,L.base,A);if(L.include){for(var K in I){if(!C.hasOwnProperty(K)&&!D.hasOwnProperty(K)){J[K]=I[K];}}}else{for(var K in I){if(!D.hasOwnProperty(K)){J[K]=I[K];}}}}if(L.include){for(var K in C){if(!D.hasOwnProperty(K)){J[K]=C[K];}}}for(var K in D){J[K]=D[K];}}else{J=L.style(y);}return F[M]=J||null;}},destruct:function(){this.__dL=this.__dM=null;}});})();(function(){var j="nonScaled",i="scaled",h="alphaScaled",g=".png",f="qx.client",e="div",d="replacement",c="qx.event.type.Event",b="hidden",a="Boolean",y="px",x="scale",w="changeSource",v="__fP",u="qx.ui.basic.Image",t="loaded",s="-disabled.$1",r="loadingFailed",q="String",p="_applySource",n="img",o="image",l="mshtml",m="_applyScale",k="no-repeat";qx.Class.define(u,{extend:qx.ui.core.Widget,construct:function(z){this.__fP={};qx.ui.core.Widget.call(this);if(z){this.setSource(z);}},properties:{source:{check:q,init:null,nullable:true,event:w,apply:p,themeable:true},scale:{check:a,init:false,themeable:true,apply:m},appearance:{refine:true,init:o},allowShrinkX:{refine:true,init:false},allowShrinkY:{refine:true,init:false},allowGrowX:{refine:true,init:false},allowGrowY:{refine:true,init:false}},events:{loadingFailed:c,loaded:c},members:{__fQ:null,__fR:null,__fS:null,__fP:null,getContentElement:function(){return this.__fW();},_createContentElement:function(){return this.__fW();},_getContentHint:function(){return {width:this.__fQ||0,height:this.__fR||0};},_applyEnabled:function(A,B){qx.ui.core.Widget.prototype._applyEnabled.call(this,A,B);if(this.getSource()){this._styleSource();}},_applySource:function(C){this._styleSource();},_applyScale:function(D){this._styleSource();},__fT:function(E){this.__fS=E;},__fU:function(){if(this.__fS==null){var G=this.getSource();var F=false;if(G!=null){F=qx.lang.String.endsWith(G,g);}if(this.getScale()&&F&&qx.bom.element.Decoration.isAlphaImageLoaderEnabled()){this.__fS=h;}else if(this.getScale()){this.__fS=i;}else{this.__fS=j;}}return this.__fS;},__fV:function(H){var I;var J;if(H==h){I=true;J=e;}else if(H==j){I=false;J=e;}else{I=true;J=n;}var K=new qx.html.Image(J);K.setScale(I);K.setStyles({"overflowX":b,"overflowY":b});return K;},__fW:function(){var L=this.__fU();if(this.__fP[L]==null){this.__fP[L]=this.__fV(L);}return this.__fP[L];},_styleSource:function(){var M=qx.util.AliasManager.getInstance().resolve(this.getSource());if(!M){this.getContentElement().resetSource();return;}this.__fX(M);if(qx.core.Variant.isSet(f,l)){var N=this.getScale()?x:k;this.getContentElement().tagNameHint=qx.bom.element.Decoration.getTagName(N,M);}if(qx.util.ResourceManager.getInstance().has(M)){this.__ga(this.getContentElement(),M);}else if(qx.io.ImageLoader.isLoaded(M)){this.__gb(this.getContentElement(),M);}else{this.__gc(this.getContentElement(),M);}},__fX:qx.core.Variant.select(f,{"mshtml":function(O){var Q=qx.bom.element.Decoration.isAlphaImageLoaderEnabled();var P=qx.lang.String.endsWith(O,g);if(Q&&P){if(this.getScale()&&this.__fU()!=h){this.__fT(h);}else if(!this.getScale()&&this.__fU()!=j){this.__fT(j);}}else{if(this.getScale()&&this.__fU()!=i){this.__fT(i);}else if(!this.getScale()&&this.__fU()!=j){this.__fT(j);}}this.__fY(this.__fW());},"default":function(R){if(this.getScale()&&this.__fU()!=i){this.__fT(i);}else if(!this.getScale()&&this.__fU(j)){this.__fT(j);}this.__fY(this.__fW());}}),__fY:function(S){var V=this.getContainerElement();var W=V.getChild(0);if(W!=S){if(W!=null){var Y=y;var T={};var U=this.getInnerSize();if(U!=null){T.width=U.width+Y;T.height=U.height+Y;}var X=this.getInsets();T.left=X.left+Y;T.top=X.top+Y;T.zIndex=10;S.setStyles(T,true);S.setSelectable(this.getSelectable());}V.removeAt(0);V.addAt(S,0);}},__ga:function(ba,bb){var bd=qx.util.ResourceManager.getInstance();if(!this.getEnabled()){var bc=bb.replace(/\.([a-z]+)$/,s);if(bd.has(bc)){bb=bc;this.addState(d);}else{this.removeState(d);}}if(ba.getSource()===bb){return;}ba.setSource(bb);this.__ge(bd.getImageWidth(bb),bd.getImageHeight(bb));},__gb:function(be,bf){var bh=qx.io.ImageLoader;be.setSource(bf);var bg=bh.getWidth(bf);var bi=bh.getHeight(bf);this.__ge(bg,bi);},__gc:function(bj,bk){var self;var bl=qx.io.ImageLoader;{};if(!bl.isFailed(bk)){bl.load(bk,this.__gd,this);}else{if(bj!=null){bj.resetSource();}}},__gd:function(bm,bn){if(this.$$disposed===true){return;}if(bm!==qx.util.AliasManager.getInstance().resolve(this.getSource())){return;}if(bn.failed){this.warn("Image could not be loaded: "+bm);this.fireEvent(r);}else{this.fireEvent(t);}this._styleSource();},__ge:function(bo,bp){if(bo!==this.__fQ||bp!==this.__fR){this.__fQ=bo;this.__fR=bp;qx.ui.core.queue.Layout.add(this);}}},destruct:function(){this._disposeMap(v);}});})();(function(){var j="Integer",i="interval",h="keep-align",g="disappear",f="best-fit",e="mouse",d="bottom-left",c="direct",b="Boolean",a="bottom-right",x="widget",w="qx.ui.core.MPlacement",v="left-top",u="offsetRight",t="shorthand",s="offsetLeft",r="top-left",q="appear",p="offsetBottom",o="top-right",m="offsetTop",n="right-bottom",k="right-top",l="left-bottom";qx.Mixin.define(w,{statics:{__iR:null,setVisibleElement:function(y){this.__iR=y;},getVisibleElement:function(){return this.__iR;}},properties:{position:{check:[r,o,d,a,v,l,k,n],init:d,themeable:true},placeMethod:{check:[x,e],init:e,themeable:true},domMove:{check:b,init:false},placementModeX:{check:[c,h,f],init:h,themeable:true},placementModeY:{check:[c,h,f],init:h,themeable:true},offsetLeft:{check:j,init:0,themeable:true},offsetTop:{check:j,init:0,themeable:true},offsetRight:{check:j,init:0,themeable:true},offsetBottom:{check:j,init:0,themeable:true},offset:{group:[m,u,p,s],mode:t,themeable:true}},members:{__iS:null,__iT:null,__iU:null,getLayoutLocation:function(z){var C,B,D,top;B=z.getBounds();D=B.left;top=B.top;var E=B;z=z.getLayoutParent();while(z&&!z.isRootWidget()){B=z.getBounds();D+=B.left;top+=B.top;C=z.getInsets();D+=C.left;top+=C.top;z=z.getLayoutParent();}if(z.isRootWidget()){var A=z.getContainerLocation();if(A){D+=A.left;top+=A.top;}}return {left:D,top:top,right:D+E.width,bottom:top+E.height};},moveTo:function(F,top){var H=qx.ui.core.MPlacement.getVisibleElement();if(H){var J=this.getBounds();var G=H.getContentLocation();if(J&&G){var K=top+J.height;var I=F+J.width;if((I>G.left&&F<G.right)&&(K>G.top&&top<G.bottom)){F=Math.max(G.left-J.width,0);}}}if(this.getDomMove()){this.setDomPosition(F,top);}else{this.setLayoutProperties({left:F,top:top});}},placeToWidget:function(L,M){if(M){this.__iV();this.__iS=qx.lang.Function.bind(this.placeToWidget,this,L,false);qx.event.Idle.getInstance().addListener(i,this.__iS);this.__iU=function(){this.__iV();};this.addListener(g,this.__iU,this);}var N=L.getContainerLocation()||this.getLayoutLocation(L);this.__iX(N);},__iV:function(){if(this.__iS){qx.event.Idle.getInstance().removeListener(i,this.__iS);this.__iS=null;}if(this.__iU){this.removeListener(g,this.__iU,this);this.__iU=null;}},placeToMouse:function(event){var P=event.getDocumentLeft();var top=event.getDocumentTop();var O={left:P,top:top,right:P,bottom:top};this.__iX(O);},placeToElement:function(Q,R){var location=qx.bom.element.Location.get(Q);var S={left:location.left,top:location.top,right:location.left+Q.offsetWidth,bottom:location.top+Q.offsetHeight};if(R){this.__iS=qx.lang.Function.bind(this.placeToElement,this,Q,false);qx.event.Idle.getInstance().addListener(i,this.__iS);this.addListener(g,function(){if(this.__iS){qx.event.Idle.getInstance().removeListener(i,this.__iS);this.__iS=null;}},this);}this.__iX(S);},placeToPoint:function(T){var U={left:T.left,top:T.top,right:T.left,bottom:T.top};this.__iX(U);},_getPlacementOffsets:function(){return {left:this.getOffsetLeft(),top:this.getOffsetTop(),right:this.getOffsetRight(),bottom:this.getOffsetBottom()};},__iW:function(V){var W=null;if(this._computePlacementSize){var W=this._computePlacementSize();}else if(this.isVisible()){var W=this.getBounds();}if(W==null){this.addListenerOnce(q,function(){this.__iW(V);},this);}else{V.call(this,W);}},__iX:function(X){this.__iW(function(Y){var ba=qx.util.placement.Placement.compute(Y,this.getLayoutParent().getBounds(),X,this._getPlacementOffsets(),this.getPosition(),this.getPlacementModeX(),this.getPlacementModeY());this.moveTo(ba.left,ba.top);});}},destruct:function(){this.__iV();}});})();(function(){var g="dragdrop-cursor",f="_applyAction",e="alias",d="qx.ui.core.DragDropCursor",c="move",b="singleton",a="copy";qx.Class.define(d,{extend:qx.ui.basic.Image,include:qx.ui.core.MPlacement,type:b,construct:function(){qx.ui.basic.Image.call(this);this.setZIndex(1e8);this.setDomMove(true);var h=this.getApplicationRoot();h.add(this,{left:-1000,top:-1000});},properties:{appearance:{refine:true,init:g},action:{check:[e,a,c],apply:f,nullable:true}},members:{_applyAction:function(i,j){if(j){this.removeState(j);}if(i){this.addState(i);}}}});})();(function(){var f="interval",e="Number",d="_applyTimeoutInterval",c="qx.event.type.Event",b="qx.event.Idle",a="singleton";qx.Class.define(b,{extend:qx.core.Object,type:a,construct:function(){qx.core.Object.call(this);var g=new qx.event.Timer(this.getTimeoutInterval());g.addListener(f,this._onInterval,this);g.start();this.__kM=g;},events:{"interval":c},properties:{timeoutInterval:{check:e,init:100,apply:d}},members:{__kM:null,_applyTimeoutInterval:function(h){this.__kM.setInterval(h);},_onInterval:function(){this.fireEvent(f);}},destruct:function(){if(this.__kM){this.__kM.stop();}this.__kM=null;}});})();(function(){var o="top",n="right",m="bottom",l="left",k="align-start",j="qx.util.placement.AbstractAxis",i="edge-start",h="align-end",g="edge-end",f="-",c="best-fit",e="qx.util.placement.Placement",d="keep-align",b="direct",a='__hM';qx.Class.define(e,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__hM=new qx.util.placement.DirectAxis();},properties:{axisX:{check:j},axisY:{check:j},edge:{check:[o,n,m,l],init:o},align:{check:[o,n,m,l],init:n}},statics:{__hN:null,compute:function(p,q,r,s,t,u,v){this.__hN=this.__hN||new qx.util.placement.Placement();var y=t.split(f);var x=y[0];var w=y[1];this.__hN.set({axisX:this.__hR(u),axisY:this.__hR(v),edge:x,align:w});return this.__hN.compute(p,q,r,s);},__hO:null,__hP:null,__hQ:null,__hR:function(z){switch(z){case b:this.__hO=this.__hO||new qx.util.placement.DirectAxis();return this.__hO;case d:this.__hP=this.__hP||new qx.util.placement.KeepAlignAxis();return this.__hP;case c:this.__hQ=this.__hQ||new qx.util.placement.BestFitAxis();return this.__hQ;default:throw new Error("Invalid 'mode' argument!'");}}},members:{__hM:null,compute:function(A,B,C,D){{};var E=this.getAxisX()||this.__hM;var G=E.computeStart(A.width,{start:C.left,end:C.right},{start:D.left,end:D.right},B.width,this.__hS());var F=this.getAxisY()||this.__hM;var top=F.computeStart(A.height,{start:C.top,end:C.bottom},{start:D.top,end:D.bottom},B.height,this.__hT());return {left:G,top:top};},__hS:function(){var I=this.getEdge();var H=this.getAlign();if(I==l){return i;}else if(I==n){return g;}else if(H==l){return k;}else if(H==n){return h;}},__hT:function(){var K=this.getEdge();var J=this.getAlign();if(K==o){return i;}else if(K==m){return g;}else if(J==o){return k;}else if(J==m){return h;}}},destruct:function(){this._disposeObjects(a);}});})();(function(){var e="edge-start",d="align-start",c="align-end",b="edge-end",a="qx.util.placement.AbstractAxis";qx.Class.define(a,{extend:qx.core.Object,members:{computeStart:function(f,g,h,i,j){throw new Error("abstract method call!");},_moveToEdgeAndAlign:function(k,l,m,n){switch(n){case e:return l.start-m.end-k;case b:return l.end+m.start;case d:return l.start+m.start;case c:return l.end-m.end-k;}},_isInRange:function(o,p,q){return o>=0&&o+p<=q;}}});})();(function(){var a="qx.util.placement.DirectAxis";qx.Class.define(a,{extend:qx.util.placement.AbstractAxis,members:{computeStart:function(b,c,d,e,f){return this._moveToEdgeAndAlign(b,c,d,f);}}});})();(function(){var c="qx.util.placement.KeepAlignAxis",b="edge-start",a="edge-end";qx.Class.define(c,{extend:qx.util.placement.AbstractAxis,members:{computeStart:function(d,e,f,g,h){var i=this._moveToEdgeAndAlign(d,e,f,h);var j,k;if(this._isInRange(i,d,g)){return i;}if(h==b||h==a){j=e.start-f.end;k=e.end+f.start;}else{j=e.end-f.end;k=e.start+f.start;}if(j>g-k){i=j-d;}else{i=k;}return i;}}});})();(function(){var a="qx.util.placement.BestFitAxis";qx.Class.define(a,{extend:qx.util.placement.AbstractAxis,members:{computeStart:function(b,c,d,e,f){var g=this._moveToEdgeAndAlign(b,c,d,f);if(this._isInRange(g,b,e)){return g;}if(g<0){g=Math.min(0,e-b);}if(g+b>e){g=Math.max(0,e-b);}return g;}}});})();(function(){var b="qx.ui.form.IRadioItem",a="qx.event.type.Data";qx.Interface.define(b,{events:{"changeValue":a},members:{setValue:function(c){},getValue:function(){},setGroup:function(d){this.assertInstance(d,qx.ui.form.RadioGroup);},getGroup:function(){}}});})();(function(){var b="changeModel",a="qx.ui.form.MModelProperty";qx.Mixin.define(a,{properties:{model:{nullable:true,event:b,dereference:true}}});})();(function(){var b="qx.ui.form.IBooleanForm",a="qx.event.type.Data";qx.Interface.define(b,{events:{"changeValue":a},members:{setValue:function(c){return arguments.length==1;},resetValue:function(){},getValue:function(){}}});})();(function(){var b="qx.ui.form.IModel",a="qx.event.type.Data";qx.Interface.define(b,{events:{"changeModel":a},members:{setModel:function(c){},getModel:function(){},resetModel:function(){}}});})();(function(){var b="qx.event.type.Data",a="qx.ui.form.IForm";qx.Interface.define(a,{events:{"changeEnabled":b,"changeValid":b,"changeInvalidMessage":b,"changeRequired":b},members:{setEnabled:function(c){return arguments.length==1;},getEnabled:function(){},setRequired:function(d){return arguments.length==1;},getRequired:function(){},setValid:function(e){return arguments.length==1;},getValid:function(){},setInvalidMessage:function(f){return arguments.length==1;},getInvalidMessage:function(){},setRequiredInvalidMessage:function(g){return arguments.length==1;},getRequiredInvalidMessage:function(){}}});})();(function(){var b="qx.ui.form.IExecutable",a="qx.event.type.Data";qx.Interface.define(b,{events:{"execute":a},members:{setCommand:function(c){return arguments.length==1;},getCommand:function(){},execute:function(){}}});})();(function(){var n="execute",m="toolTipText",l="icon",k="label",j="qx.ui.core.MExecutable",h="value",g="qx.event.type.Event",f="_applyCommand",d="enabled",c="menu",a="changeCommand",b="qx.ui.core.Command";qx.Mixin.define(j,{events:{"execute":g},properties:{command:{check:b,apply:f,event:a,nullable:true}},members:{__kN:null,__kO:false,__kP:null,_bindableProperties:[d,k,l,m,h,c],execute:function(){var o=this.getCommand();if(o){if(this.__kO){this.__kO=false;}else{this.__kO=true;o.execute(this);}}this.fireEvent(n);},__kQ:function(e){if(this.__kO){this.__kO=false;return;}this.__kO=true;this.execute();},_applyCommand:function(p,q){if(q!=null){q.removeListenerById(this.__kP);}if(p!=null){this.__kP=p.addListener(n,this.__kQ,this);}var t=this.__kN;if(t==null){this.__kN=t={};}for(var i=0;i<this._bindableProperties.length;i++){var s=this._bindableProperties[i];if(q!=null&&t[s]!=null){q.removeBinding(t[s]);t[s]=null;}if(p!=null&&qx.Class.hasProperty(this.constructor,s)){var r=p.get(s);if(r==null){var u=this.get(s);}t[s]=p.bind(s,this,s);if(u){this.set(s,u);}}}}},destruct:function(){this.__kN=null;}});})();(function(){var j="label",i="icon",h="Boolean",g="both",f="String",e="left",d="changeGap",c="changeShow",b="bottom",a="_applyCenter",y="changeIcon",x="qx.ui.basic.Atom",w="changeLabel",v="Integer",u="_applyIconPosition",t="bottom-left",s="top-left",r="top",q="right",p="_applyRich",n="_applyIcon",o="_applyShow",l="_applyLabel",m="_applyGap",k="atom";qx.Class.define(x,{extend:qx.ui.core.Widget,construct:function(z,A){{};qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.Atom());if(z!=null){this.setLabel(z);}if(A!=null){this.setIcon(A);}},properties:{appearance:{refine:true,init:k},label:{apply:l,nullable:true,check:f,event:w},rich:{check:h,init:false,apply:p},icon:{check:f,apply:n,nullable:true,themeable:true,event:y},gap:{check:v,nullable:false,event:d,apply:m,themeable:true,init:4},show:{init:g,check:[g,j,i],themeable:true,inheritable:true,apply:o,event:c},iconPosition:{init:e,check:[r,q,b,e,s,t],themeable:true,apply:u},center:{init:false,check:h,themeable:true,apply:a}},members:{_createChildControlImpl:function(B,C){var D;switch(B){case j:D=new qx.ui.basic.Label(this.getLabel());D.setAnonymous(true);D.setRich(this.getRich());this._add(D);if(this.getLabel()==null||this.getShow()===i){D.exclude();}break;case i:D=new qx.ui.basic.Image(this.getIcon());D.setAnonymous(true);this._addAt(D,0);if(this.getIcon()==null||this.getShow()===j){D.exclude();}break;}return D||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,B);},_forwardStates:{focused:true,hovered:true},_handleLabel:function(){if(this.getLabel()==null||this.getShow()===i){this._excludeChildControl(j);}else{this._showChildControl(j);}},_handleIcon:function(){if(this.getIcon()==null||this.getShow()===j){this._excludeChildControl(i);}else{this._showChildControl(i);}},_applyLabel:function(E,F){var G=this.getChildControl(j,true);if(G){G.setValue(E);}this._handleLabel();},_applyRich:function(H,I){var J=this.getChildControl(j,true);if(J){J.setRich(H);}},_applyIcon:function(K,L){var M=this.getChildControl(i,true);if(M){M.setSource(K);}this._handleIcon();},_applyGap:function(N,O){this._getLayout().setGap(N);},_applyShow:function(P,Q){this._handleLabel();this._handleIcon();},_applyIconPosition:function(R,S){this._getLayout().setIconPosition(R);},_applyCenter:function(T,U){this._getLayout().setCenter(T);}}});})();(function(){var o="pressed",n="abandoned",m="hovered",l="Enter",k="Space",j="dblclick",i="qx.ui.form.Button",h="mouseup",g="mousedown",f="mouseover",b="mouseout",d="keydown",c="button",a="keyup";qx.Class.define(i,{extend:qx.ui.basic.Atom,include:[qx.ui.core.MExecutable],implement:[qx.ui.form.IExecutable],construct:function(p,q,r){qx.ui.basic.Atom.call(this,p,q);if(r!=null){this.setCommand(r);}this.addListener(f,this._onMouseOver);this.addListener(b,this._onMouseOut);this.addListener(g,this._onMouseDown);this.addListener(h,this._onMouseUp);this.addListener(d,this._onKeyDown);this.addListener(a,this._onKeyUp);this.addListener(j,this._onStopEvent);},properties:{appearance:{refine:true,init:c},focusable:{refine:true,init:true}},members:{_forwardStates:{focused:true,hovered:true,pressed:true,disabled:true},press:function(){if(this.hasState(n)){return;}this.addState(o);},release:function(){if(this.hasState(o)){this.removeState(o);}},reset:function(){this.removeState(o);this.removeState(n);this.removeState(m);},_onMouseOver:function(e){if(!this.isEnabled()||e.getTarget()!==this){return;}if(this.hasState(n)){this.removeState(n);this.addState(o);}this.addState(m);},_onMouseOut:function(e){if(!this.isEnabled()||e.getTarget()!==this){return;}this.removeState(m);if(this.hasState(o)){this.removeState(o);this.addState(n);}},_onMouseDown:function(e){if(!e.isLeftPressed()){return;}e.stopPropagation();this.capture();this.removeState(n);this.addState(o);},_onMouseUp:function(e){this.releaseCapture();var s=this.hasState(o);var t=this.hasState(n);if(s){this.removeState(o);}if(t){this.removeState(n);}else{this.addState(m);if(s){this.execute();}}e.stopPropagation();},_onKeyDown:function(e){switch(e.getKeyIdentifier()){case l:case k:this.removeState(n);this.addState(o);e.stopPropagation();}},_onKeyUp:function(e){switch(e.getKeyIdentifier()){case l:case k:if(this.hasState(o)){this.removeState(n);this.removeState(o);this.execute();e.stopPropagation();}}}}});})();(function(){var m="qx.dynlocale",l="Boolean",k="changeLocale",j="changeInvalidMessage",i="on",h="String",g="invalid",f="",d="qx.ui.form.MForm",c="_applyValid",a="changeRequired",b="changeValid";qx.Mixin.define(d,{construct:function(){if(qx.core.Variant.isSet(m,i)){qx.locale.Manager.getInstance().addListener(k,this.__fn,this);}},properties:{valid:{check:l,init:true,apply:c,event:b},required:{check:l,init:false,event:a},invalidMessage:{check:h,init:f,event:j},requiredInvalidMessage:{check:h,nullable:true,event:j}},members:{_applyValid:function(n,o){n?this.removeState(g):this.addState(g);},__fn:qx.core.Variant.select(m,{"on":function(e){var p=this.getInvalidMessage();if(p&&p.translate){this.setInvalidMessage(p.translate());}var q=this.getRequiredInvalidMessage();if(q&&q.translate){this.setRequiredInvalidMessage(q.translate());}},"off":null})},destruct:function(){if(qx.core.Variant.isSet(m,i)){qx.locale.Manager.getInstance().removeListener(k,this.__fn,this);}}});})();(function(){var o="checked",n="keypress",m="Boolean",l="Right",k="_applyValue",j="changeValue",i="qx.ui.form.RadioButton",h="radiobutton",g="Left",f="qx.ui.form.RadioGroup",b="Down",d="_applyGroup",c="Up",a="execute";qx.Class.define(i,{extend:qx.ui.form.Button,include:[qx.ui.form.MForm,qx.ui.form.MModelProperty],implement:[qx.ui.form.IRadioItem,qx.ui.form.IForm,qx.ui.form.IBooleanForm,qx.ui.form.IModel],construct:function(p){{};qx.ui.form.Button.call(this,p);this.addListener(a,this._onExecute);this.addListener(n,this._onKeyPress);},properties:{group:{check:f,nullable:true,apply:d},value:{check:m,nullable:true,event:j,apply:k,init:false},appearance:{refine:true,init:h},allowGrowX:{refine:true,init:false}},members:{_applyValue:function(q,r){q?this.addState(o):this.removeState(o);if(q&&this.getFocusable()){this.focus();}},_applyGroup:function(s,t){if(t){t.remove(this);}if(s){s.add(this);}},_onExecute:function(e){this.setValue(true);},_onKeyPress:function(e){var u=this.getGroup();if(!u){return;}switch(e.getKeyIdentifier()){case g:case c:u.selectPrevious();break;case l:case b:u.selectNext();break;}}}});})();(function(){var o="close-button",n="middle",m="left",l="icon",k="label",j="right",i="click",h="Boolean",g="bottom",f="qx.ui.tabview.TabButton",c="center",e="_applyShowCloseButton",d="top",b="close",a="qx.event.type.Data";qx.Class.define(f,{extend:qx.ui.form.RadioButton,implement:qx.ui.form.IRadioItem,construct:function(){qx.ui.form.RadioButton.call(this);var p=new qx.ui.layout.Grid(2,0);p.setRowAlign(0,m,n);p.setColumnAlign(0,j,n);this._getLayout().dispose();this._setLayout(p);this.initShowCloseButton();},events:{"close":a},properties:{showCloseButton:{check:h,init:false,apply:e}},members:{_forwardStates:{focused:true,checked:true},_applyIconPosition:function(q,r){var s={icon:this.getChildControl(l),label:this.getChildControl(k),closeButton:this.getShowCloseButton()?this.getChildControl(o):null};for(var t in s){if(s[t]){this._remove(s[t]);}}switch(q){case d:this._add(s.label,{row:3,column:2});this._add(s.icon,{row:1,column:2});if(s.closeButton){this._add(s.closeButton,{row:0,column:4});}break;case g:this._add(s.label,{row:1,column:2});this._add(s.icon,{row:3,column:2});if(s.closeButton){this._add(s.closeButton,{row:0,column:4});}break;case m:this._add(s.label,{row:0,column:2});this._add(s.icon,{row:0,column:0});if(s.closeButton){this._add(s.closeButton,{row:0,column:4});}break;case j:this._add(s.label,{row:0,column:0});this._add(s.icon,{row:0,column:2});if(s.closeButton){this._add(s.closeButton,{row:0,column:4});}break;}},_createChildControlImpl:function(u,v){var w;switch(u){case k:var w=new qx.ui.basic.Label(this.getLabel());w.setAnonymous(true);this._add(w,{row:0,column:2});this._getLayout().setColumnFlex(2,1);break;case l:w=new qx.ui.basic.Image(this.getIcon());w.setAnonymous(true);this._add(w,{row:0,column:0});break;case o:w=new qx.ui.form.Button();w.addListener(i,this._onCloseButtonClick,this);this._add(w,{row:0,column:4});if(!this.getShowCloseButton()){w.exclude();}break;}return w||qx.ui.form.RadioButton.prototype._createChildControlImpl.call(this,u);},_onCloseButtonClick:function(){this.fireDataEvent(b,this);},_applyShowCloseButton:function(x,y){if(x){this._showChildControl(o);}else{this._excludeChildControl(o);}},_applyCenter:function(z){var A=this._getLayout();if(z){A.setColumnAlign(2,c,n);}else{A.setColumnAlign(2,m,n);}}}});})();(function(){var e="change",d="__mp",c="qx.event.type.Data",b="qx.ui.form.MModelSelection",a="changeSelection";qx.Mixin.define(b,{construct:function(){this.__mp=new qx.data.Array();this.__mp.addListener(e,this.__ms,this);this.addListener(a,this.__mr,this);},events:{changeModelSelection:c},members:{__mp:null,__mq:false,__mr:function(){if(this.__mq){return;}var h=this.getSelection();var f=[];for(var i=0;i<h.length;i++){var k=h[i];var g=k.getModel?k.getModel():null;if(g!==null){f.push(g);}}if(f.length===h.length){this.setModelSelection(f);}},__ms:function(){this.__mq=true;var m=this.getSelectables(true);var o=[];var n=this.__mp.toArray();for(var i=0;i<n.length;i++){var q=n[i];for(var j=0;j<m.length;j++){var r=m[j];var l=r.getModel?r.getModel():null;if(q===l){o.push(r);break;}}}this.setSelection(o);this.__mq=false;var p=this.getSelection();if(!qx.lang.Array.equals(p,o)){this.__mr();}},getModelSelection:function(){return this.__mp;},setModelSelection:function(s){if(!s){this.__mp.removeAll();return;}{};s.unshift(this.__mp.getLength());s.unshift(0);var t=this.__mp.splice.apply(this.__mp,s);t.dispose();}},destruct:function(){this._disposeObjects(d);}});})();(function(){var a="qx.ui.form.IModelSelection";qx.Interface.define(a,{members:{setModelSelection:function(b){},getModelSelection:function(){}}});})();(function(){var b="qx.ui.core.ISingleSelection",a="qx.event.type.Data";qx.Interface.define(b,{events:{"changeSelection":a},members:{getSelection:function(){return true;},setSelection:function(c){return arguments.length==1;},resetSelection:function(){return true;},isSelected:function(d){return arguments.length==1;},isSelectionEmpty:function(){return true;},getSelectables:function(e){return arguments.length==1;}}});})();(function(){var f="qx.ui.core.MSingleSelectionHandling",d="__my",c="changeSelection",b="changeSelected",a="qx.event.type.Data";qx.Mixin.define(f,{events:{"changeSelection":a},members:{__my:null,getSelection:function(){var g=this.__mz().getSelected();if(g){return [g];}else{return [];}},setSelection:function(h){switch(h.length){case 0:this.resetSelection();break;case 1:this.__mz().setSelected(h[0]);break;default:throw new Error("Could only select one item, but the selection "+" array contains "+h.length+" items!");}},resetSelection:function(){this.__mz().resetSelected();},isSelected:function(i){return this.__mz().isSelected(i);},isSelectionEmpty:function(){return this.__mz().isSelectionEmpty();},getSelectables:function(j){return this.__mz().getSelectables(j);},_onChangeSelected:function(e){var l=e.getData();var k=e.getOldData();l==null?l=[]:l=[l];k==null?k=[]:k=[k];this.fireDataEvent(c,l,k);},__mz:function(){if(this.__my==null){var m=this;this.__my=new qx.ui.core.SingleSelectionManager({getItems:function(){return m._getItems();},isItemSelectable:function(n){if(m._isItemSelectable){return m._isItemSelectable(n);}else{return n.isVisible();}}});this.__my.addListener(b,this._onChangeSelected,this);}this.__my.setAllowEmptySelection(this._isAllowEmptySelection());return this.__my;}},destruct:function(){this._disposeObjects(d);}});})();(function(){var r="Boolean",q="changeInvalidMessage",p="changeValue",o="String",n="_applyAllowEmptySelection",m="_applyInvalidMessage",k="qx.ui.form.RadioGroup",j="_applyValid",h="",g="changeRequired",c="changeValid",f="changeEnabled",d="__a",b="changeSelection",a="_applyEnabled";qx.Class.define(k,{extend:qx.core.Object,implement:[qx.ui.core.ISingleSelection,qx.ui.form.IForm,qx.ui.form.IModelSelection],include:[qx.ui.core.MSingleSelectionHandling,qx.ui.form.MModelSelection],construct:function(s){qx.core.Object.call(this);this.__a=[];this.addListener(b,this.__b,this);if(s!=null){this.add.apply(this,arguments);}},properties:{enabled:{check:r,apply:a,event:f,init:true},wrap:{check:r,init:true},allowEmptySelection:{check:r,init:false,apply:n},valid:{check:r,init:true,apply:j,event:c},required:{check:r,init:false,event:g},invalidMessage:{check:o,init:h,event:q,apply:m},requiredInvalidMessage:{check:o,nullable:true,event:q}},members:{__a:null,getItems:function(){return this.__a;},add:function(t){var u=this.__a;var v;for(var i=0,l=arguments.length;i<l;i++){v=arguments[i];if(qx.lang.Array.contains(u,v)){continue;}v.addListener(p,this._onItemChangeChecked,this);u.push(v);v.setGroup(this);if(v.getValue()){this.setSelection([v]);}}if(!this.isAllowEmptySelection()&&u.length>0&&!this.getSelection()[0]){this.setSelection([u[0]]);}},remove:function(w){var x=this.__a;if(qx.lang.Array.contains(x,w)){qx.lang.Array.remove(x,w);if(w.getGroup()===this){w.resetGroup();}w.removeListener(p,this._onItemChangeChecked,this);if(w.getValue()){this.resetSelection();}}},getChildren:function(){return this.__a;},_onItemChangeChecked:function(e){var y=e.getTarget();if(y.getValue()){this.setSelection([y]);}else if(this.getSelection()[0]==y){this.resetSelection();}},_applyInvalidMessage:function(z,A){for(var i=0;i<this.__a.length;i++){this.__a[i].setInvalidMessage(z);}},_applyValid:function(B,C){for(var i=0;i<this.__a.length;i++){this.__a[i].setValid(B);}},_applyEnabled:function(D,E){var F=this.__a;if(D==null){for(var i=0,l=F.length;i<l;i++){F[i].resetEnabled();}}else{for(var i=0,l=F.length;i<l;i++){F[i].setEnabled(D);}}},_applyAllowEmptySelection:function(G,H){if(!G&&this.isSelectionEmpty()){this.resetSelection();}},selectNext:function(){var I=this.getSelection()[0];var K=this.__a;var J=K.indexOf(I);if(J==-1){return;}var i=0;var length=K.length;if(this.getWrap()){J=(J+1)%length;}else{J=Math.min(J+1,length-1);}while(i<length&&!K[J].getEnabled()){J=(J+1)%length;i++;}this.setSelection([K[J]]);},selectPrevious:function(){var L=this.getSelection()[0];var N=this.__a;var M=N.indexOf(L);if(M==-1){return;}var i=0;var length=N.length;if(this.getWrap()){M=(M-1+length)%length;}else{M=Math.max(M-1,0);}while(i<length&&!N[M].getEnabled()){M=(M-1+length)%length;i++;}this.setSelection([N[M]]);},_getItems:function(){return this.getItems();},_isAllowEmptySelection:function(){return this.isAllowEmptySelection();},__b:function(e){var P=e.getData()[0];var O=e.getOldData()[0];if(O){O.setValue(false);}if(P){P.setValue(true);}}},destruct:function(){this._disposeArray(d);}});})();(function(){var h="[",g="]",f=".",d="idBubble",c="changeBubble",b="qx.data.marshal.MEventBubbling",a="qx.event.type.Data";qx.Mixin.define(b,{events:{"changeBubble":a},members:{_applyEventPropagation:function(i,j,name){this.fireDataEvent(c,{value:i,name:name,old:j});this._registerEventChaining(i,j,name);},_registerEventChaining:function(k,l,name){if((k instanceof qx.core.Object)&&qx.Class.hasMixin(k.constructor,qx.data.marshal.MEventBubbling)){var m=qx.lang.Function.bind(this.__mA,this,name);var n=k.addListener(c,m,this);k.setUserData(d,n);}if(l!=null&&l.getUserData&&l.getUserData(d)!=null){l.removeListenerById(l.getUserData(d));}},__mA:function(name,e){var v=e.getData();var r=v.value;var p=v.old;if(qx.Class.hasInterface(e.getTarget().constructor,qx.data.IListData)){if(v.name.indexOf){var u=v.name.indexOf(f)!=-1?v.name.indexOf(f):v.name.length;var s=v.name.indexOf(h)!=-1?v.name.indexOf(h):v.name.length;if(u<s){var o=v.name.substring(0,u);var t=v.name.substring(u+1,v.name.length);if(t[0]!=h){t=f+t;}var q=name+h+o+g+t;}else if(s<u){var o=v.name.substring(0,s);var t=v.name.substring(s,v.name.length);var q=name+h+o+g+t;}else{var q=name+h+v.name+g;}}else{var q=name+h+v.name+g;}}else{var q=name+f+v.name;}this.fireDataEvent(c,{value:r,name:q,old:p});}}});})();(function(){var l="change",k="add",j="remove",h="order",g="qx.event.type.Data",f="",e="qx.data.Array",d="?",c="changeBubble",b="number",a="changeLength";qx.Class.define(e,{extend:qx.core.Object,include:qx.data.marshal.MEventBubbling,implement:[qx.data.IListData],construct:function(m){qx.core.Object.call(this);if(m==undefined){this.__mm=[];}else if(arguments.length>1){this.__mm=[];for(var i=0;i<arguments.length;i++){this.__mm.push(arguments[i]);}}else if(typeof m==b){this.__mm=new Array(m);}else if(m instanceof Array){this.__mm=qx.lang.Array.clone(m);}else{this.__mm=[];throw new Error("Type of the parameter not supported!");}for(var i=0;i<this.__mm.length;i++){this._applyEventPropagation(this.__mm[i],null,i);}this.__mn();},events:{"change":g,"changeLength":g},members:{__mm:null,concat:function(n){if(n){var o=this.__mm.concat(n);}else{var o=this.__mm.concat();}return new qx.data.Array(o);},join:function(p){return this.__mm.join(p);},pop:function(){var q=this.__mm.pop();this.__mn();this._applyEventPropagation(null,q,this.length-1);this.fireDataEvent(l,{start:this.length-1,end:this.length-1,type:j,items:[q]},null);return q;},push:function(r){for(var i=0;i<arguments.length;i++){this.__mm.push(arguments[i]);this.__mn();this._applyEventPropagation(arguments[i],null,this.length-1);this.fireDataEvent(l,{start:this.length-1,end:this.length-1,type:k,items:[arguments[i]]},null);}return this.length;},reverse:function(){this.__mm.reverse();this.fireDataEvent(l,{start:0,end:this.length-1,type:h,items:null},null);},shift:function(){var s=this.__mm.shift();this.__mn();this._applyEventPropagation(null,s,this.length-1);this.fireDataEvent(l,{start:0,end:this.length-1,type:j,items:[s]},null);return s;},slice:function(t,u){return new qx.data.Array(this.__mm.slice(t,u));},splice:function(v,w,x){var D=this.__mm.length;var A=this.__mm.splice.apply(this.__mm,arguments);if(this.__mm.length!=D){this.__mn();}var B=w>0;var y=arguments.length>2;var z=null;if(B||y){if(this.__mm.length>D){var C=k;}else if(this.__mm.length<D){var C=j;z=A;}else{var C=h;}this.fireDataEvent(l,{start:v,end:this.length-1,type:C,items:z},null);}for(var i=2;i<arguments.length;i++){this._registerEventChaining(arguments[i],null,v+i);}this.fireDataEvent(c,{value:this,name:d,old:A});for(var i=0;i<A.length;i++){this._applyEventPropagation(null,A[i],i);}return (new qx.data.Array(A));},sort:function(E){this.__mm.sort.apply(this.__mm,arguments);this.fireDataEvent(l,{start:0,end:this.length-1,type:h,items:null},null);},unshift:function(F){for(var i=arguments.length-1;i>=0;i--){this.__mm.unshift(arguments[i]);this.__mn();this._applyEventPropagation(arguments[i],null,0);this.fireDataEvent(l,{start:0,end:this.length-1,type:k,items:[arguments[i]]},null);}return this.length;},toArray:function(){return this.__mm;},getItem:function(G){return this.__mm[G];},setItem:function(H,I){var J=this.__mm[H];if(J===I){return;}this.__mm[H]=I;this._applyEventPropagation(I,J,H);if(this.length!=this.__mm.length){this.__mn();}this.fireDataEvent(l,{start:H,end:H,type:k,items:[I]},null);},getLength:function(){return this.length;},indexOf:function(K){return this.__mm.indexOf(K);},toString:function(){if(this.__mm!=null){return this.__mm.toString();}return f;},contains:function(L){return this.__mm.indexOf(L)!==-1;},copy:function(){return this.concat();},insertAt:function(M,N){this.splice(M,0,N);},insertBefore:function(O,P){var Q=this.indexOf(O);if(Q==-1){this.push(P);}else{this.splice(Q,0,P);}},insertAfter:function(R,S){var T=this.indexOf(R);if(T==-1||T==(this.length-1)){this.push(S);}else{this.splice(T+1,0,S);}},removeAt:function(U){return this.splice(U,1).getItem(0);},removeAll:function(){for(var i=0;i<this.__mm.length;i++){this._applyEventPropagation(null,this.__mm[i],i);}var W=this.getLength();var V=this.__mm.concat();this.__mm.length=0;this.__mn();this.fireDataEvent(l,{start:0,end:W-1,type:j,items:V},null);},append:function(X){if(X instanceof qx.data.Array){X=X.toArray();}{};for(var i=0;i<X.length;i++){this._applyEventPropagation(X[i],null,this.__mm.length+i);}Array.prototype.push.apply(this.__mm,X);var Y=this.length;this.__mn();this.fireDataEvent(l,{start:Y,end:this.length-1,type:k,items:X},null);},remove:function(ba){var bb=this.indexOf(ba);if(bb!=-1){this.splice(bb,1);return ba;}},equals:function(bc){if(this.length!==bc.length){return false;}for(var i=0;i<this.length;i++){if(this.getItem(i)!==bc.getItem(i)){return false;}}return true;},sum:function(){var bd=0;for(var i=0;i<this.length;i++){bd+=this.getItem(i);}return bd;},max:function(){var be=this.getItem(0);for(var i=1;i<this.length;i++){if(this.getItem(i)>be){be=this.getItem(i);}}return be===undefined?null:be;},min:function(){var bf=this.getItem(0);for(var i=1;i<this.length;i++){if(this.getItem(i)<bf){bf=this.getItem(i);}}return bf===undefined?null:bf;},forEach:function(bg,bh){for(var i=0;i<this.__mm.length;i++){bg.call(bh,this.__mm[i]);}},__mn:function(){var bi=this.length;this.length=this.__mm.length;this.fireDataEvent(a,this.length,bi);}},destruct:function(){for(var i=0;i<this.__mm.length;i++){this._applyEventPropagation(null,this.__mm[i],i);}this.__mm=null;}});})();(function(){var g="Boolean",f="qx.ui.core.SingleSelectionManager",e="__mv",d="__mt",c="__mu",b="changeSelected",a="qx.event.type.Data";qx.Class.define(f,{extend:qx.core.Object,construct:function(h){qx.core.Object.call(this);{};this.__mt=h;},events:{"changeSelected":a},properties:{allowEmptySelection:{check:g,init:true,apply:e}},members:{__mu:null,__mt:null,getSelected:function(){return this.__mu;},setSelected:function(j){if(!this.__mx(j)){throw new Error("Could not select "+j+", because it is not a child element!");}this.__mw(j);},resetSelected:function(){this.__mw(null);},isSelected:function(k){if(!this.__mx(k)){throw new Error("Could not check if "+k+" is selected,"+" because it is not a child element!");}return this.__mu===k;},isSelectionEmpty:function(){return this.__mu==null;},getSelectables:function(l){var m=this.__mt.getItems();var n=[];for(var i=0;i<m.length;i++){if(this.__mt.isItemSelectable(m[i])){n.push(m[i]);}}if(!l){for(var i=n.length-1;i>=0;i--){if(!n[i].getEnabled()){n.splice(i,1);}}}return n;},__mv:function(o,p){if(!o){this.__mw(this.__mu);}},__mw:function(q){var t=this.__mu;var s=q;if(s!=null&&t===s){return;}if(!this.isAllowEmptySelection()&&s==null){var r=this.getSelectables(true)[0];if(r){s=r;}}this.__mu=s;this.fireDataEvent(b,s,t);},__mx:function(u){var v=this.__mt.getItems();for(var i=0;i<v.length;i++){if(v[i]===u){return true;}}return false;}},destruct:function(){if(this.__mt.toHashCode){this._disposeObjects(d);}else{this.__mt=null;}this._disposeObjects(c);}});})();(function(){var b="abstract",a="qx.ui.layout.Abstract";qx.Class.define(a,{type:b,extend:qx.core.Object,members:{__gz:null,_invalidChildrenCache:null,__gA:null,invalidateLayoutCache:function(){this.__gz=null;},renderLayout:function(c,d){this.warn("Missing renderLayout() implementation!");},getSizeHint:function(){if(this.__gz){return this.__gz;}return this.__gz=this._computeSizeHint();},hasHeightForWidth:function(){return false;},getHeightForWidth:function(e){this.warn("Missing getHeightForWidth() implementation!");return null;},_computeSizeHint:function(){return null;},invalidateChildrenCache:function(){this._invalidChildrenCache=true;},verifyLayoutProperty:null,_clearSeparators:function(){var f=this.__gA;if(f instanceof qx.ui.core.LayoutItem){f.clearSeparators();}},_renderSeparator:function(g,h){this.__gA.renderSeparator(g,h);},connectToWidget:function(i){if(i&&this.__gA){throw new Error("It is not possible to manually set the connected widget.");}this.__gA=i;this.invalidateChildrenCache();},_getWidget:function(){return this.__gA;},_applyLayoutChange:function(){if(this.__gA){this.__gA.scheduleLayoutUpdate();}},_getLayoutChildren:function(){return this.__gA.getLayoutChildren();}},destruct:function(){this.__gA=this.__gz=null;}});})();(function(){var m="bottom",l="top",k="_applyLayoutChange",j="top-left",h="bottom-left",g="left",f="right",e="middle",d="center",c="qx.ui.layout.Atom",a="Integer",b="Boolean";qx.Class.define(c,{extend:qx.ui.layout.Abstract,properties:{gap:{check:a,init:4,apply:k},iconPosition:{check:[g,l,f,m,j,h],init:g,apply:k},center:{check:b,init:false,apply:k}},members:{verifyLayoutProperty:null,renderLayout:function(n,o){var x=qx.ui.layout.Util;var q=this.getIconPosition();var t=this._getLayoutChildren();var length=t.length;var I,top,y,r;var D,w;var B=this.getGap();var G=this.getCenter();if(q===m||q===f){var z=length-1;var u=-1;var s=-1;}else{var z=0;var u=length;var s=1;}if(q==l||q==m){if(G){var C=0;for(var i=z;i!=u;i+=s){r=t[i].getSizeHint().height;if(r>0){C+=r;if(i!=z){C+=B;}}}top=Math.round((o-C)/2);}else{top=0;}for(var i=z;i!=u;i+=s){D=t[i];w=D.getSizeHint();y=Math.min(w.maxWidth,Math.max(n,w.minWidth));r=w.height;I=x.computeHorizontalAlignOffset(d,y,n);D.renderLayout(I,top,y,r);if(r>0){top+=r+B;}}}else{var v=n;var p=null;var F=0;for(var i=z;i!=u;i+=s){D=t[i];y=D.getSizeHint().width;if(y>0){if(!p&&D instanceof qx.ui.basic.Label){p=D;}else{v-=y;}F++;}}if(F>1){var E=(F-1)*B;v-=E;}if(p){var w=p.getSizeHint();var A=Math.max(w.minWidth,Math.min(v,w.maxWidth));v-=A;}if(G&&v>0){I=Math.round(v/2);}else{I=0;}for(var i=z;i!=u;i+=s){D=t[i];w=D.getSizeHint();r=Math.min(w.maxHeight,Math.max(o,w.minHeight));if(D===p){y=A;}else{y=w.width;}var H=e;if(q==j){H=l;}else if(q==h){H=m;}top=x.computeVerticalAlignOffset(H,w.height,o);D.renderLayout(I,top,y,r);if(y>0){I+=y+B;}}}},_computeSizeHint:function(){var T=this._getLayoutChildren();var length=T.length;var L,R;if(length===1){var L=T[0].getSizeHint();R={width:L.width,height:L.height,minWidth:L.minWidth,minHeight:L.minHeight};}else{var P=0,Q=0;var M=0,O=0;var N=this.getIconPosition();var S=this.getGap();if(N===l||N===m){var J=0;for(var i=0;i<length;i++){L=T[i].getSizeHint();Q=Math.max(Q,L.width);P=Math.max(P,L.minWidth);if(L.height>0){O+=L.height;M+=L.minHeight;J++;}}if(J>1){var K=(J-1)*S;O+=K;M+=K;}}else{var J=0;for(var i=0;i<length;i++){L=T[i].getSizeHint();O=Math.max(O,L.height);M=Math.max(M,L.minHeight);if(L.width>0){Q+=L.width;P+=L.minWidth;J++;}}if(J>1){var K=(J-1)*S;Q+=K;P+=K;}}R={minWidth:P,width:Q,minHeight:M,height:O};}return R;}}});})();(function(){var g="middle",f="qx.ui.layout.Util",e="left",d="center",c="top",b="bottom",a="right";qx.Class.define(f,{statics:{PERCENT_VALUE:/[0-9]+(?:\.[0-9]+)?%/,computeFlexOffsets:function(h,j,k){var n,r,m,s;var o=j>k;var t=Math.abs(j-k);var u,p;var q={};for(r in h){n=h[r];q[r]={potential:o?n.max-n.value:n.value-n.min,flex:o?n.flex:1/n.flex,offset:0};}while(t!=0){s=Infinity;m=0;for(r in q){n=q[r];if(n.potential>0){m+=n.flex;s=Math.min(s,n.potential/n.flex);}}if(m==0){break;}s=Math.min(t,s*m)/m;u=0;for(r in q){n=q[r];if(n.potential>0){p=Math.min(t,n.potential,Math.ceil(s*n.flex));u+=p-s*n.flex;if(u>=1){u-=1;p-=1;}n.potential-=p;if(o){n.offset+=p;}else{n.offset-=p;}t-=p;}}}return q;},computeHorizontalAlignOffset:function(v,w,x,y,z){if(y==null){y=0;}if(z==null){z=0;}var A=0;switch(v){case e:A=y;break;case a:A=x-w-z;break;case d:A=Math.round((x-w)/2);if(A<y){A=y;}else if(A<z){A=Math.max(y,x-w-z);}break;}return A;},computeVerticalAlignOffset:function(B,C,D,E,F){if(E==null){E=0;}if(F==null){F=0;}var G=0;switch(B){case c:G=E;break;case b:G=D-C-F;break;case g:G=Math.round((D-C)/2);if(G<E){G=E;}else if(G<F){G=Math.max(E,D-C-F);}break;}return G;},collapseMargins:function(H){var I=0,K=0;for(var i=0,l=arguments.length;i<l;i++){var J=arguments[i];if(J<0){K=Math.min(K,J);}else if(J>0){I=Math.max(I,J);}}return I+K;},computeHorizontalGaps:function(L,M,N){if(M==null){M=0;}var O=0;if(N){O+=L[0].getMarginLeft();for(var i=1,l=L.length;i<l;i+=1){O+=this.collapseMargins(M,L[i-1].getMarginRight(),L[i].getMarginLeft());}O+=L[l-1].getMarginRight();}else{for(var i=1,l=L.length;i<l;i+=1){O+=L[i].getMarginLeft()+L[i].getMarginRight();}O+=(M*(l-1));}return O;},computeVerticalGaps:function(P,Q,R){if(Q==null){Q=0;}var S=0;if(R){S+=P[0].getMarginTop();for(var i=1,l=P.length;i<l;i+=1){S+=this.collapseMargins(Q,P[i-1].getMarginBottom(),P[i].getMarginTop());}S+=P[l-1].getMarginBottom();}else{for(var i=1,l=P.length;i<l;i+=1){S+=P[i].getMarginTop()+P[i].getMarginBottom();}S+=(Q*(l-1));}return S;},computeHorizontalSeparatorGaps:function(T,U,V){var Y=qx.theme.manager.Decoration.getInstance().resolve(V);var X=Y.getInsets();var W=X.left+X.right;var ba=0;for(var i=0,l=T.length;i<l;i++){var bb=T[i];ba+=bb.getMarginLeft()+bb.getMarginRight();}ba+=(U+W+U)*(l-1);return ba;},computeVerticalSeparatorGaps:function(bc,bd,be){var bh=qx.theme.manager.Decoration.getInstance().resolve(be);var bg=bh.getInsets();var bf=bg.top+bg.bottom;var bi=0;for(var i=0,l=bc.length;i<l;i++){var bj=bc[i];bi+=bj.getMarginTop()+bj.getMarginBottom();}bi+=(bd+bf+bd)*(l-1);return bi;},arrangeIdeals:function(bk,bl,bm,bn,bo,bp){if(bl<bk||bo<bn){if(bl<bk&&bo<bn){bl=bk;bo=bn;}else if(bl<bk){bo-=(bk-bl);bl=bk;if(bo<bn){bo=bn;}}else if(bo<bn){bl-=(bn-bo);bo=bn;if(bl<bk){bl=bk;}}}if(bl>bm||bo>bp){if(bl>bm&&bo>bp){bl=bm;bo=bp;}else if(bl>bm){bo+=(bl-bm);bl=bm;if(bo>bp){bo=bp;}}else if(bo>bp){bl+=(bo-bp);bo=bp;if(bl>bm){bl=bm;}}}return {begin:bl,end:bo};}}});})();(function(){var b="qx.event.type.Data",a="qx.ui.form.IStringForm";qx.Interface.define(a,{events:{"changeValue":b},members:{setValue:function(c){return arguments.length==1;},resetValue:function(){},getValue:function(){}}});})();(function(){var k="qx.dynlocale",j="Boolean",i="color",h="changeLocale",g="enabled",f="on",d="_applyTextAlign",c="qx.ui.core.Widget",b="nowrap",a="changeTextAlign",C="_applyWrap",B="A",A="changeContent",z="qx.ui.basic.Label",y="whiteSpace",x="_applyValue",w="center",v="_applyBuddy",u="String",t="textAlign",r="right",s="changeRich",p="normal",q="_applyRich",n="click",o="label",l="left",m="changeValue";qx.Class.define(z,{extend:qx.ui.core.Widget,implement:[qx.ui.form.IStringForm],construct:function(D){qx.ui.core.Widget.call(this);if(D!=null){this.setValue(D);}if(qx.core.Variant.isSet(k,f)){qx.locale.Manager.getInstance().addListener(h,this._onChangeLocale,this);}},properties:{rich:{check:j,init:false,event:s,apply:q},wrap:{check:j,init:true,apply:C},value:{check:u,apply:x,event:m,nullable:true},buddy:{check:c,apply:v,nullable:true,init:null,dereference:true},textAlign:{check:[l,w,r],nullable:true,themeable:true,apply:d,event:a},appearance:{refine:true,init:o},selectable:{refine:true,init:false},allowGrowX:{refine:true,init:false},allowGrowY:{refine:true,init:false},allowShrinkY:{refine:true,init:false}},members:{__gI:null,__gJ:null,__gK:null,__gL:null,_getContentHint:function(){if(this.__gJ){this.__gM=this.__gN();delete this.__gJ;}return {width:this.__gM.width,height:this.__gM.height};},_hasHeightForWidth:function(){return this.getRich()&&this.getWrap();},_applySelectable:function(E){if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){if(E&&!this.isRich()){{};return;}}qx.ui.core.Widget.prototype._applySelectable.call(this,E);},_getContentHeightForWidth:function(F){if(!this.getRich()&&!this.getWrap()){return null;}return this.__gN(F).height;},_createContentElement:function(){return new qx.html.Label;},_applyTextAlign:function(G,H){this.getContentElement().setStyle(t,G);},_applyTextColor:function(I,J){if(I){this.getContentElement().setStyle(i,qx.theme.manager.Color.getInstance().resolve(I));}else{this.getContentElement().removeStyle(i);}},__gM:{width:0,height:0},_applyFont:function(K,L){var M;if(K){this.__gI=qx.theme.manager.Font.getInstance().resolve(K);M=this.__gI.getStyles();}else{this.__gI=null;M=qx.bom.Font.getDefaultStyles();}this.getContentElement().setStyles(M);this.__gJ=true;qx.ui.core.queue.Layout.add(this);},__gN:function(N){var R=qx.bom.Label;var P=this.getFont();var O=P?this.__gI.getStyles():qx.bom.Font.getDefaultStyles();var content=this.getValue()||B;var Q=this.getRich();return Q?R.getHtmlSize(content,O,N):R.getTextSize(content,O);},_applyBuddy:function(S,T){if(T!=null){T.removeBinding(this.__gK);this.__gK=null;this.removeListenerById(this.__gL);this.__gL=null;}if(S!=null){this.__gK=S.bind(g,this,g);this.__gL=this.addListener(n,function(){if(S.isFocusable()){S.focus.apply(S);}},this);}},_applyRich:function(U){this.getContentElement().setRich(U);this.__gJ=true;qx.ui.core.queue.Layout.add(this);},_applyWrap:function(V,W){if(V&&!this.isRich()){{};}if(this.isRich()){var X=V?p:b;this.getContentElement().setStyle(y,X);}},_onChangeLocale:qx.core.Variant.select(k,{"on":function(e){var content=this.getValue();if(content&&content.translate){this.setValue(content.translate());}},"off":null}),_applyValue:function(Y,ba){this.getContentElement().setValue(Y);this.__gJ=true;qx.ui.core.queue.Layout.add(this);this.fireDataEvent(A,Y,ba);}},destruct:function(){if(qx.core.Variant.isSet(k,f)){qx.locale.Manager.getInstance().removeListener(h,this._onChangeLocale,this);}if(this.__gK!=null){var bb=this.getBuddy();if(bb!=null&&!bb.isDisposed()){bb.removeBinding(this.__gK);}}this.__gI=this.__gK=null;}});})();(function(){var b="value",a="qx.html.Label";qx.Class.define(a,{extend:qx.html.Element,members:{__dP:null,_applyProperty:function(name,c){qx.html.Element.prototype._applyProperty.call(this,name,c);if(name==b){var d=this.getDomElement();qx.bom.Label.setValue(d,c);}},_createDomElement:function(){var f=this.__dP;var e=qx.bom.Label.create(this._content,f);return e;},_copyData:function(g){return qx.html.Element.prototype._copyData.call(this,true);},setRich:function(h){var i=this.getDomElement();if(i){throw new Error("The label mode cannot be modified after initial creation");}h=!!h;if(this.__dP==h){return;}this.__dP=h;return this;},setValue:function(j){this._setProperty(b,j);return this;},getValue:function(){return this._getProperty(b);}}});})();(function(){var j="div",i="inherit",h="text",g="qx.client",f="value",e="",d="hidden",c="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",b="nowrap",a="auto",z="0",y="ellipsis",x="normal",w="label",v="px",u="crop",t="gecko",s="end",r="100%",q="visible",o="qx.bom.Label",p="opera",m="mshtml",n="block",k="-1000px",l="absolute";qx.Class.define(o,{statics:{__jn:{fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},__jo:function(){var A=this.__jq(false);document.body.insertBefore(A,document.body.firstChild);return this._textElement=A;},__jp:function(){var B=this.__jq(true);document.body.insertBefore(B,document.body.firstChild);return this._htmlElement=B;},__jq:function(C){var D=qx.bom.Element.create(j);var E=D.style;E.width=E.height=a;E.left=E.top=k;E.visibility=d;E.position=l;E.overflow=q;if(C){E.whiteSpace=x;}else{E.whiteSpace=b;if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){var F=document.createElementNS(c,w);var E=F.style;E.padding=z;for(var G in this.__jn){E[G]=i;}D.appendChild(F);}}return D;},__jr:function(H){var I={};if(H){I.whiteSpace=x;}else if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){I.display=n;}else{I.overflow=d;I.whiteSpace=b;I.textOverflow=y;if(qx.core.Variant.isSet(g,p)){I.OTextOverflow=y;}}return I;},create:function(content,J,K){if(!K){K=window;}if(J){var L=K.document.createElement(j);L.useHtml=true;}else if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){var L=K.document.createElement(j);var N=K.document.createElementNS(c,w);var M=N.style;M.cursor=i;M.color=i;M.overflow=d;M.maxWidth=r;M.padding=z;for(var O in this.__jn){N.style[O]=i;}N.setAttribute(u,s);L.appendChild(N);}else{var L=K.document.createElement(j);qx.bom.element.Style.setStyles(L,this.__jr(J));}if(content){this.setValue(L,content);}return L;},setValue:function(P,Q){Q=Q||e;if(P.useHtml){P.innerHTML=Q;}else if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){P.firstChild.setAttribute(f,Q);}else{qx.bom.element.Attribute.set(P,h,Q);}},getValue:function(R){if(R.useHtml){return R.innerHTML;}else if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){return R.firstChild.getAttribute(f)||e;}else{return qx.bom.element.Attribute.get(R,h);}},getHtmlSize:function(content,S,T){var U=this._htmlElement||this.__jp();U.style.width=T!==undefined?T+v:a;U.innerHTML=content;return this.__js(U,S);},getTextSize:function(V,W){var X=this._textElement||this.__jo();if(!qx.bom.client.Feature.CSS_TEXT_OVERFLOW&&qx.bom.client.Feature.XUL){X.firstChild.setAttribute(f,V);}else{qx.bom.element.Attribute.set(X,h,V);}return this.__js(X,W);},__js:function(Y,ba){var bb=this.__jn;if(!ba){ba={};}for(var bc in bb){Y.style[bc]=ba[bc]||e;}var bd=qx.bom.element.Dimension.getSize(Y);if(qx.core.Variant.isSet(g,t)){if(!qx.bom.client.Platform.WIN){bd.width++;}}if(qx.core.Variant.isSet(g,m)&&qx.bom.client.Engine.VERSION>=9){bd.width++;}return bd;}}});})();(function(){var i="0px",h="qx.client",g="mshtml",f="qx.bom.element.Dimension",e="paddingRight",d="paddingLeft",c="opera",b="paddingTop",a="paddingBottom";qx.Class.define(f,{statics:{getWidth:qx.core.Variant.select(h,{"gecko":function(j){if(j.getBoundingClientRect){var k=j.getBoundingClientRect();return Math.round(k.right)-Math.round(k.left);}else{return j.offsetWidth;}},"default":function(l){return l.offsetWidth;}}),getHeight:qx.core.Variant.select(h,{"gecko":function(m){if(m.getBoundingClientRect){var n=m.getBoundingClientRect();return Math.round(n.bottom)-Math.round(n.top);}else{return m.offsetHeight;}},"default":function(o){return o.offsetHeight;}}),getSize:function(p){return {width:this.getWidth(p),height:this.getHeight(p)};},__ip:{visible:true,hidden:true},getContentWidth:function(q){var s=qx.bom.element.Style;var t=qx.bom.element.Overflow.getX(q);var u=parseInt(s.get(q,d)||i,10);var x=parseInt(s.get(q,e)||i,10);if(this.__ip[t]){var w=q.clientWidth;if(qx.core.Variant.isSet(h,c)){w=w-u-x;}else{if(qx.dom.Node.isBlockNode(q)){w=w-u-x;}}return w;}else{if(q.clientWidth>=q.scrollWidth){return Math.max(q.clientWidth,q.scrollWidth)-u-x;}else{var v=q.scrollWidth-u;var r=qx.bom.client.Engine;if(r.NAME===g&&r.VERSION==6){v-=x;}return v;}}},getContentHeight:function(y){var A=qx.bom.element.Style;var C=qx.bom.element.Overflow.getY(y);var D=parseInt(A.get(y,b)||i,10);var B=parseInt(A.get(y,a)||i,10);if(this.__ip[C]){return y.clientHeight-D-B;}else{if(y.clientHeight>=y.scrollHeight){return Math.max(y.clientHeight,y.scrollHeight)-D-B;}else{var E=y.scrollHeight-D;var z=qx.bom.client.Engine;if(z.NAME===g&&z.VERSION==6){E-=B;}return E;}}},getContentSize:function(F){return {width:this.getContentWidth(F),height:this.getContentHeight(F)};}}});})();(function(){var e="qx.theme.manager.Font",d="Theme",c="changeTheme",b="_applyTheme",a="singleton";qx.Class.define(e,{type:a,extend:qx.util.ValueManager,properties:{theme:{check:d,nullable:true,apply:b,event:c}},members:{resolveDynamic:function(f){var g=this._dynamic;return f instanceof qx.bom.Font?f:g[f];},resolve:function(h){var k=this._dynamic;var i=k[h];if(i){return i;}var j=this.getTheme();if(j!==null&&j.fonts[h]){return k[h]=(new qx.bom.Font).set(j.fonts[h]);}return h;},isDynamic:function(l){var n=this._dynamic;if(l&&(l instanceof qx.bom.Font||n[l]!==undefined)){return true;}var m=this.getTheme();if(m!==null&&l&&m.fonts[l]){n[l]=(new qx.bom.Font).set(m.fonts[l]);return true;}return false;},__io:function(o,p){if(o[p].include){var q=o[o[p].include];o[p].include=null;delete o[p].include;o[p]=qx.lang.Object.mergeWith(o[p],q,false);this.__io(o,p);}},_applyTheme:function(r){var s=this._getDynamic();for(var v in s){if(s[v].themed){s[v].dispose();delete s[v];}}if(r){var t=r.fonts;var u=qx.bom.Font;for(var v in t){if(t[v].include&&t[t[v].include]){this.__io(t,v);}s[v]=(new u).set(t[v]);s[v].themed=true;}}this._setDynamic(s);}}});})();(function(){var k="",j="underline",h="Boolean",g="px",f='"',e="italic",d="normal",c="bold",b="_applyItalic",a="_applyBold",x="Integer",w="_applyFamily",v="_applyLineHeight",u="Array",t="overline",s="line-through",r="qx.bom.Font",q="Number",p="_applyDecoration",o=" ",m="_applySize",n=",";qx.Class.define(r,{extend:qx.core.Object,construct:function(y,z){qx.core.Object.call(this);if(y!==undefined){this.setSize(y);}if(z!==undefined){this.setFamily(z);}},statics:{fromString:function(A){var E=new qx.bom.Font();var C=A.split(/\s+/);var name=[];var D;for(var i=0;i<C.length;i++){switch(D=C[i]){case c:E.setBold(true);break;case e:E.setItalic(true);break;case j:E.setDecoration(j);break;default:var B=parseInt(D,10);if(B==D||qx.lang.String.contains(D,g)){E.setSize(B);}else{name.push(D);}break;}}if(name.length>0){E.setFamily(name);}return E;},fromConfig:function(F){var G=new qx.bom.Font;G.set(F);return G;},__cy:{fontFamily:k,fontSize:k,fontWeight:k,fontStyle:k,textDecoration:k,lineHeight:1.2},getDefaultStyles:function(){return this.__cy;}},properties:{size:{check:x,nullable:true,apply:m},lineHeight:{check:q,nullable:true,apply:v},family:{check:u,nullable:true,apply:w},bold:{check:h,nullable:true,apply:a},italic:{check:h,nullable:true,apply:b},decoration:{check:[j,s,t],nullable:true,apply:p}},members:{__cz:null,__cA:null,__cB:null,__cC:null,__cD:null,__cE:null,_applySize:function(H,I){this.__cz=H===null?null:H+g;},_applyLineHeight:function(J,K){this.__cE=J===null?null:J;},_applyFamily:function(L,M){var N=k;for(var i=0,l=L.length;i<l;i++){if(L[i].indexOf(o)>0){N+=f+L[i]+f;}else{N+=L[i];}if(i!==l-1){N+=n;}}this.__cA=N;},_applyBold:function(O,P){this.__cB=O===null?null:O?c:d;},_applyItalic:function(Q,R){this.__cC=Q===null?null:Q?e:d;},_applyDecoration:function(S,T){this.__cD=S===null?null:S;},getStyles:function(){return {fontFamily:this.__cA,fontSize:this.__cz,fontWeight:this.__cB,fontStyle:this.__cC,textDecoration:this.__cD,lineHeight:this.__cE};}}});})();(function(){var r="left",q="top",p="_applyLayoutChange",o="hAlign",n="flex",m="vAlign",h="Integer",g="minWidth",f="width",e="minHeight",b="qx.ui.layout.Grid",d="height",c="maxHeight",a="maxWidth";qx.Class.define(b,{extend:qx.ui.layout.Abstract,construct:function(s,t){qx.ui.layout.Abstract.call(this);this.__iF=[];this.__iG=[];if(s){this.setSpacingX(s);}if(t){this.setSpacingY(t);}},properties:{spacingX:{check:h,init:0,apply:p},spacingY:{check:h,init:0,apply:p}},members:{__iH:null,__iF:null,__iG:null,__iI:null,__iJ:null,__iK:null,__iL:null,__iM:null,__iN:null,verifyLayoutProperty:null,__iO:function(){var B=[];var A=[];var C=[];var w=-1;var v=-1;var E=this._getLayoutChildren();for(var i=0,l=E.length;i<l;i++){var z=E[i];var D=z.getLayoutProperties();var F=D.row;var u=D.column;D.colSpan=D.colSpan||1;D.rowSpan=D.rowSpan||1;if(F==null||u==null){throw new Error("The layout properties 'row' and 'column' of the child widget '"+z+"' must be defined!");}if(B[F]&&B[F][u]){throw new Error("Cannot add widget '"+z+"'!. "+"There is already a widget '"+B[F][u]+"' in this cell ("+F+", "+u+")");}for(var x=u;x<u+D.colSpan;x++){for(var y=F;y<F+D.rowSpan;y++){if(B[y]==undefined){B[y]=[];}B[y][x]=z;v=Math.max(v,x);w=Math.max(w,y);}}if(D.rowSpan>1){C.push(z);}if(D.colSpan>1){A.push(z);}}for(var y=0;y<=w;y++){if(B[y]==undefined){B[y]=[];}}this.__iH=B;this.__iI=A;this.__iJ=C;this.__iK=w;this.__iL=v;this.__iM=null;this.__iN=null;delete this._invalidChildrenCache;},_setRowData:function(G,H,I){var J=this.__iF[G];if(!J){this.__iF[G]={};this.__iF[G][H]=I;}else{J[H]=I;}},_setColumnData:function(K,L,M){var N=this.__iG[K];if(!N){this.__iG[K]={};this.__iG[K][L]=M;}else{N[L]=M;}},setSpacing:function(O){this.setSpacingY(O);this.setSpacingX(O);return this;},setColumnAlign:function(P,Q,R){{};this._setColumnData(P,o,Q);this._setColumnData(P,m,R);this._applyLayoutChange();return this;},getColumnAlign:function(S){var T=this.__iG[S]||{};return {vAlign:T.vAlign||q,hAlign:T.hAlign||r};},setRowAlign:function(U,V,W){{};this._setRowData(U,o,V);this._setRowData(U,m,W);this._applyLayoutChange();return this;},getRowAlign:function(X){var Y=this.__iF[X]||{};return {vAlign:Y.vAlign||q,hAlign:Y.hAlign||r};},getCellWidget:function(ba,bb){if(this._invalidChildrenCache){this.__iO();}var ba=this.__iH[ba]||{};return ba[bb]||null;},getRowCount:function(){if(this._invalidChildrenCache){this.__iO();}return this.__iK+1;},getColumnCount:function(){if(this._invalidChildrenCache){this.__iO();}return this.__iL+1;},getCellAlign:function(bc,bd){var bj=q;var bh=r;var bi=this.__iF[bc];var bf=this.__iG[bd];var be=this.__iH[bc][bd];if(be){var bg={vAlign:be.getAlignY(),hAlign:be.getAlignX()};}else{bg={};}if(bg.vAlign){bj=bg.vAlign;}else if(bi&&bi.vAlign){bj=bi.vAlign;}else if(bf&&bf.vAlign){bj=bf.vAlign;}if(bg.hAlign){bh=bg.hAlign;}else if(bf&&bf.hAlign){bh=bf.hAlign;}else if(bi&&bi.hAlign){bh=bi.hAlign;}return {vAlign:bj,hAlign:bh};},setColumnFlex:function(bk,bl){this._setColumnData(bk,n,bl);this._applyLayoutChange();return this;},getColumnFlex:function(bm){var bn=this.__iG[bm]||{};return bn.flex!==undefined?bn.flex:0;},setRowFlex:function(bo,bp){this._setRowData(bo,n,bp);this._applyLayoutChange();return this;},getRowFlex:function(bq){var br=this.__iF[bq]||{};var bs=br.flex!==undefined?br.flex:0;return bs;},setColumnMaxWidth:function(bt,bu){this._setColumnData(bt,a,bu);this._applyLayoutChange();return this;},getColumnMaxWidth:function(bv){var bw=this.__iG[bv]||{};return bw.maxWidth!==undefined?bw.maxWidth:Infinity;},setColumnWidth:function(bx,by){this._setColumnData(bx,f,by);this._applyLayoutChange();return this;},getColumnWidth:function(bz){var bA=this.__iG[bz]||{};return bA.width!==undefined?bA.width:null;},setColumnMinWidth:function(bB,bC){this._setColumnData(bB,g,bC);this._applyLayoutChange();return this;},getColumnMinWidth:function(bD){var bE=this.__iG[bD]||{};return bE.minWidth||0;},setRowMaxHeight:function(bF,bG){this._setRowData(bF,c,bG);this._applyLayoutChange();return this;},getRowMaxHeight:function(bH){var bI=this.__iF[bH]||{};return bI.maxHeight||Infinity;},setRowHeight:function(bJ,bK){this._setRowData(bJ,d,bK);this._applyLayoutChange();return this;},getRowHeight:function(bL){var bM=this.__iF[bL]||{};return bM.height!==undefined?bM.height:null;},setRowMinHeight:function(bN,bO){this._setRowData(bN,e,bO);this._applyLayoutChange();return this;},getRowMinHeight:function(bP){var bQ=this.__iF[bP]||{};return bQ.minHeight||0;},__iP:function(bR){var bV=bR.getSizeHint();var bU=bR.getMarginLeft()+bR.getMarginRight();var bT=bR.getMarginTop()+bR.getMarginBottom();var bS={height:bV.height+bT,width:bV.width+bU,minHeight:bV.minHeight+bT,minWidth:bV.minWidth+bU,maxHeight:bV.maxHeight+bT,maxWidth:bV.maxWidth+bU};return bS;},_fixHeightsRowSpan:function(bW){var ck=this.getSpacingY();for(var i=0,l=this.__iJ.length;i<l;i++){var ca=this.__iJ[i];var cc=this.__iP(ca);var cd=ca.getLayoutProperties();var bY=cd.row;var ci=ck*(cd.rowSpan-1);var bX=ci;var cf={};for(var j=0;j<cd.rowSpan;j++){var cm=cd.row+j;var cb=bW[cm];var cl=this.getRowFlex(cm);if(cl>0){cf[cm]={min:cb.minHeight,value:cb.height,max:cb.maxHeight,flex:cl};}ci+=cb.height;bX+=cb.minHeight;}if(ci<cc.height){if(!qx.lang.Object.isEmpty(cf)){var cj=qx.ui.layout.Util.computeFlexOffsets(cf,cc.height,ci);for(var k=0;k<cd.rowSpan;k++){var ce=cj[bY+k]?cj[bY+k].offset:0;bW[bY+k].height+=ce;}}else{var cg=ck*(cd.rowSpan-1);var ch=cc.height-cg;var cb=Math.floor(ch/cd.rowSpan);for(var k=0;k<cd.rowSpan;k++){bW[bY+k].height=cb;}}}if(bX<cc.minHeight){var cj=qx.ui.layout.Util.computeFlexOffsets(cf,cc.minHeight,bX);for(var j=0;j<cd.rowSpan;j++){var ce=cj[bY+j]?cj[bY+j].offset:0;bW[bY+j].minHeight+=ce;}}}},_fixWidthsColSpan:function(cn){var cr=this.getSpacingX();for(var i=0,l=this.__iI.length;i<l;i++){var co=this.__iI[i];var cq=this.__iP(co);var ct=co.getLayoutProperties();var cp=ct.column;var cz=cr*(ct.colSpan-1);var cs=cz;var cu={};var cw;for(var j=0;j<ct.colSpan;j++){var cA=ct.column+j;var cy=cn[cA];var cx=this.getColumnFlex(cA);if(cx>0){cu[cA]={min:cy.minWidth,value:cy.width,max:cy.maxWidth,flex:cx};}cz+=cy.width;cs+=cy.minWidth;}if(cz<cq.width){var cv=qx.ui.layout.Util.computeFlexOffsets(cu,cq.width,cz);for(var j=0;j<ct.colSpan;j++){cw=cv[cp+j]?cv[cp+j].offset:0;cn[cp+j].width+=cw;}}if(cs<cq.minWidth){var cv=qx.ui.layout.Util.computeFlexOffsets(cu,cq.minWidth,cs);for(var j=0;j<ct.colSpan;j++){cw=cv[cp+j]?cv[cp+j].offset:0;cn[cp+j].minWidth+=cw;}}}},_getRowHeights:function(){if(this.__iM!=null){return this.__iM;}var cK=[];var cD=this.__iK;var cC=this.__iL;for(var cL=0;cL<=cD;cL++){var cE=0;var cG=0;var cF=0;for(var cJ=0;cJ<=cC;cJ++){var cB=this.__iH[cL][cJ];if(!cB){continue;}var cH=cB.getLayoutProperties().rowSpan||0;if(cH>1){continue;}var cI=this.__iP(cB);if(this.getRowFlex(cL)>0){cE=Math.max(cE,cI.minHeight);}else{cE=Math.max(cE,cI.height);}cG=Math.max(cG,cI.height);}var cE=Math.max(cE,this.getRowMinHeight(cL));var cF=this.getRowMaxHeight(cL);if(this.getRowHeight(cL)!==null){var cG=this.getRowHeight(cL);}else{var cG=Math.max(cE,Math.min(cG,cF));}cK[cL]={minHeight:cE,height:cG,maxHeight:cF};}if(this.__iJ.length>0){this._fixHeightsRowSpan(cK);}this.__iM=cK;return cK;},_getColWidths:function(){if(this.__iN!=null){return this.__iN;}var cQ=[];var cN=this.__iL;var cP=this.__iK;for(var cV=0;cV<=cN;cV++){var cT=0;var cS=0;var cO=Infinity;for(var cW=0;cW<=cP;cW++){var cM=this.__iH[cW][cV];if(!cM){continue;}var cR=cM.getLayoutProperties().colSpan||0;if(cR>1){continue;}var cU=this.__iP(cM);if(this.getColumnFlex(cV)>0){cS=Math.max(cS,cU.minWidth);}else{cS=Math.max(cS,cU.width);}cT=Math.max(cT,cU.width);}var cS=Math.max(cS,this.getColumnMinWidth(cV));var cO=this.getColumnMaxWidth(cV);if(this.getColumnWidth(cV)!==null){var cT=this.getColumnWidth(cV);}else{var cT=Math.max(cS,Math.min(cT,cO));}cQ[cV]={minWidth:cS,width:cT,maxWidth:cO};}if(this.__iI.length>0){this._fixWidthsColSpan(cQ);}this.__iN=cQ;return cQ;},_getColumnFlexOffsets:function(cX){var cY=this.getSizeHint();var dd=cX-cY.width;if(dd==0){return {};}var db=this._getColWidths();var da={};for(var i=0,l=db.length;i<l;i++){var de=db[i];var dc=this.getColumnFlex(i);if((dc<=0)||(de.width==de.maxWidth&&dd>0)||(de.width==de.minWidth&&dd<0)){continue;}da[i]={min:de.minWidth,value:de.width,max:de.maxWidth,flex:dc};}return qx.ui.layout.Util.computeFlexOffsets(da,cX,cY.width);},_getRowFlexOffsets:function(df){var dg=this.getSizeHint();var dj=df-dg.height;if(dj==0){return {};}var dk=this._getRowHeights();var dh={};for(var i=0,l=dk.length;i<l;i++){var dl=dk[i];var di=this.getRowFlex(i);if((di<=0)||(dl.height==dl.maxHeight&&dj>0)||(dl.height==dl.minHeight&&dj<0)){continue;}dh[i]={min:dl.minHeight,value:dl.height,max:dl.maxHeight,flex:di};}return qx.ui.layout.Util.computeFlexOffsets(dh,df,dg.height);},renderLayout:function(dm,dn){if(this._invalidChildrenCache){this.__iO();}var dC=qx.ui.layout.Util;var dq=this.getSpacingX();var dw=this.getSpacingY();var dH=this._getColWidths();var dG=this._getColumnFlexOffsets(dm);var dr=[];var dJ=this.__iL;var dp=this.__iK;var dI;for(var dK=0;dK<=dJ;dK++){dI=dG[dK]?dG[dK].offset:0;dr[dK]=dH[dK].width+dI;}var dz=this._getRowHeights();var dB=this._getRowFlexOffsets(dn);var dQ=[];for(var dx=0;dx<=dp;dx++){dI=dB[dx]?dB[dx].offset:0;dQ[dx]=dz[dx].height+dI;}var dR=0;for(var dK=0;dK<=dJ;dK++){var top=0;for(var dx=0;dx<=dp;dx++){var dE=this.__iH[dx][dK];if(!dE){top+=dQ[dx]+dw;continue;}var ds=dE.getLayoutProperties();if(ds.row!==dx||ds.column!==dK){top+=dQ[dx]+dw;continue;}var dP=dq*(ds.colSpan-1);for(var i=0;i<ds.colSpan;i++){dP+=dr[dK+i];}var dF=dw*(ds.rowSpan-1);for(var i=0;i<ds.rowSpan;i++){dF+=dQ[dx+i];}var dt=dE.getSizeHint();var dN=dE.getMarginTop();var dD=dE.getMarginLeft();var dA=dE.getMarginBottom();var dv=dE.getMarginRight();var dy=Math.max(dt.minWidth,Math.min(dP-dD-dv,dt.maxWidth));var dO=Math.max(dt.minHeight,Math.min(dF-dN-dA,dt.maxHeight));var dL=this.getCellAlign(dx,dK);var dM=dR+dC.computeHorizontalAlignOffset(dL.hAlign,dy,dP,dD,dv);var du=top+dC.computeVerticalAlignOffset(dL.vAlign,dO,dF,dN,dA);dE.renderLayout(dM,du,dy,dO);top+=dQ[dx]+dw;}dR+=dr[dK]+dq;}},invalidateLayoutCache:function(){qx.ui.layout.Abstract.prototype.invalidateLayoutCache.call(this);this.__iN=null;this.__iM=null;},_computeSizeHint:function(){if(this._invalidChildrenCache){this.__iO();}var dW=this._getColWidths();var dY=0,ea=0;for(var i=0,l=dW.length;i<l;i++){var eb=dW[i];if(this.getColumnFlex(i)>0){dY+=eb.minWidth;}else{dY+=eb.width;}ea+=eb.width;}var ec=this._getRowHeights();var dU=0,dX=0;for(var i=0,l=ec.length;i<l;i++){var ed=ec[i];if(this.getRowFlex(i)>0){dU+=ed.minHeight;}else{dU+=ed.height;}dX+=ed.height;}var dT=this.getSpacingX()*(dW.length-1);var dS=this.getSpacingY()*(ec.length-1);var dV={minWidth:dY+dT,width:ea+dT,minHeight:dU+dS,height:dX+dS};return dV;}},destruct:function(){this.__iH=this.__iF=this.__iG=this.__iI=this.__iJ=this.__iN=this.__iM=null;}});})();(function(){var b="number",a="qx.ui.layout.Canvas";qx.Class.define(a,{extend:qx.ui.layout.Abstract,members:{verifyLayoutProperty:null,renderLayout:function(c,d){var q=this._getLayoutChildren();var g,p,n;var s,top,e,f,j,h;var o,m,r,k;for(var i=0,l=q.length;i<l;i++){g=q[i];p=g.getSizeHint();n=g.getLayoutProperties();o=g.getMarginTop();m=g.getMarginRight();r=g.getMarginBottom();k=g.getMarginLeft();s=n.left!=null?n.left:n.edge;if(qx.lang.Type.isString(s)){s=Math.round(parseFloat(s)*c/100);}e=n.right!=null?n.right:n.edge;if(qx.lang.Type.isString(e)){e=Math.round(parseFloat(e)*c/100);}top=n.top!=null?n.top:n.edge;if(qx.lang.Type.isString(top)){top=Math.round(parseFloat(top)*d/100);}f=n.bottom!=null?n.bottom:n.edge;if(qx.lang.Type.isString(f)){f=Math.round(parseFloat(f)*d/100);}if(s!=null&&e!=null){j=c-s-e-k-m;if(j<p.minWidth){j=p.minWidth;}else if(j>p.maxWidth){j=p.maxWidth;}s+=k;}else{j=n.width;if(j==null){j=p.width;}else{j=Math.round(parseFloat(j)*c/100);if(j<p.minWidth){j=p.minWidth;}else if(j>p.maxWidth){j=p.maxWidth;}}if(e!=null){s=c-j-e-m-k;}else if(s==null){s=k;}else{s+=k;}}if(top!=null&&f!=null){h=d-top-f-o-r;if(h<p.minHeight){h=p.minHeight;}else if(h>p.maxHeight){h=p.maxHeight;}top+=o;}else{h=n.height;if(h==null){h=p.height;}else{h=Math.round(parseFloat(h)*d/100);if(h<p.minHeight){h=p.minHeight;}else if(h>p.maxHeight){h=p.maxHeight;}}if(f!=null){top=d-h-f-r-o;}else if(top==null){top=o;}else{top+=o;}}g.renderLayout(s,top,j,h);}},_computeSizeHint:function(){var I=0,H=0;var F=0,D=0;var B,A;var z,x;var t=this._getLayoutChildren();var w,G,v;var J,top,u,y;for(var i=0,l=t.length;i<l;i++){w=t[i];G=w.getLayoutProperties();v=w.getSizeHint();var E=w.getMarginLeft()+w.getMarginRight();var C=w.getMarginTop()+w.getMarginBottom();B=v.width+E;A=v.minWidth+E;J=G.left!=null?G.left:G.edge;if(J&&typeof J===b){B+=J;A+=J;}u=G.right!=null?G.right:G.edge;if(u&&typeof u===b){B+=u;A+=u;}I=Math.max(I,B);H=Math.max(H,A);z=v.height+C;x=v.minHeight+C;top=G.top!=null?G.top:G.edge;if(top&&typeof top===b){z+=top;x+=top;}y=G.bottom!=null?G.bottom:G.edge;if(y&&typeof y===b){z+=y;x+=y;}F=Math.max(F,z);D=Math.max(D,x);}return {width:I,minWidth:H,height:F,minHeight:D};}}});})();(function(){var k="_",j="_PROT",h="_PUB",g="mixin",f="_PRIV",e="_ABSTRACT",d="_STATIC",c="_INHERITED",b="OVERLAY_",a="_THEMEABLE",F="ICON_CHILDCONTROL",E="_ERROR",D="_OVERRIDDEN",C="ICON_PACKAGE",B="interface",A="ICON_CTOR",z="PROT",y="ICON_CLASS",x="ICON_INTERFACE",w="apiviewer.TreeUtil",r="_MIXIN",s="PUB",p="ICON_EVENT",q="ICON_PROPERTY",n="_WARN",o="ICON_METHOD",l="ICON_MIXIN",m="ICON_APPEARANCE",t="PRIV",u="ICON_CONSTANT",v="_SINGLETON";qx.Class.define(w,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);},statics:{getChild:function(G,H){if(G!=null&&G.children!=null){for(var i=0;i<G.children.length;i++){if(G.children[i].type==H){return G.children[i];}}}return null;},getChildByAttribute:function(I,J,K){if(I.children!=null){for(var i=0;i<I.children.length;i++){var L=I.children[i];if(L.attributes&&L.attributes[J]==K){return L;}}}return null;},getIconUrl:function(M,N){var O;var P=apiviewer.dao;if(M instanceof P.Package){O=C;}else if(M instanceof P.Class){switch(M.getType()){case g:O=l;break;case B:O=x;break;default:O=y;if(M.isStatic()){O+=d;}else if(M.isAbstract()){O+=e;}else if(M.isSingleton()){O+=v;}}}else if(M instanceof P.Property){O=q;if(M.isPublic()){O+=h;}else if(M.isProtected()){O+=j;}else if(M.isPrivate()||M.isInternal()){O+=f;}if(M.isThemeable()){O+=a;}}else if(M instanceof P.Event){O=p;}else if(M instanceof P.Method){if(M.isConstructor()){var O=A;}else{O=o;if(M.isPublic()){O+=h;}else if(M.isProtected()){O+=j;}else if(M.isPrivate()||M.isInternal()){O+=f;}}if(M.isStatic()){O+=d;}else if(M.isAbstract()){O+=e;}if(M.getClass().getType()==g){O+=r;}}else if(M instanceof P.Constant){O=u;}else if(M instanceof P.Appearance){O=m;}else if(M instanceof P.ChildControl){O=F;}else{throw new Error("Unknown node type: "+M.type);}if(M instanceof P.ClassItem){if(N){O+=c;}else if(M.getOverriddenFrom&&M.getOverriddenFrom()){O+=D;}if(M.getErrors().length>0){O+=E;}}if(M.hasWarning()){O+=n;}return apiviewer.TreeUtil.iconNameToIconPath(O);},iconNameToIconPath:function(Q){var T=apiviewer.TreeUtil[Q];if(!T){var S=Q.split(k);var V=S[0]+k+S[1];if(S[2]==s||S[2]==z||S[2]==t){V+=k+S[2];var U=3;}else{U=2;}T=[apiviewer.TreeUtil[V]];if(T[0]==null){throw new Error("Unknown img constant: "+V);}for(var i=U;i<S.length;i++){var R=apiviewer.TreeUtil[b+S[i]];if(R==null){throw new Error("Unknown img constant: OVERLAY_"+S[i]);}T.push(R);}}return T;},ICON_BLANK:"apiviewer/image/blank.gif",OVERLAY_ABSTRACT:"apiviewer/image/overlay_abstract18.gif",OVERLAY_ERROR:"apiviewer/image/overlay_error18.gif",OVERLAY_INHERITED:"apiviewer/image/overlay_inherited18.gif",OVERLAY_OVERRIDDEN:"apiviewer/image/overlay_overridden18.gif",OVERLAY_THEMEABLE:"apiviewer/image/overlay_themeable18.gif",OVERLAY_STATIC:"apiviewer/image/overlay_static18.gif",OVERLAY_WARN:"apiviewer/image/overlay_warning18.gif",OVERLAY_MIXIN:"apiviewer/image/overlay_mixin18.gif",ICON_PACKAGE:"apiviewer/image/package18.gif",ICON_PACKAGE_WARN:"apiviewer/image/package_warning18.gif",ICON_CLASS:"apiviewer/image/class18.gif",ICON_CLASS_WARN:"apiviewer/image/class_warning18.gif",ICON_CLASS_ERROR:"apiviewer/image/class_warning18.gif",ICON_CLASS_STATIC:"apiviewer/image/class_static18.gif",ICON_CLASS_STATIC_WARN:"apiviewer/image/class_static_warning18.gif",ICON_CLASS_STATIC_ERROR:"apiviewer/image/class_static_warning18.gif",ICON_CLASS_ABSTRACT:"apiviewer/image/class_abstract18.gif",ICON_CLASS_ABSTRACT_WARN:"apiviewer/image/class_abstract_warning18.gif",ICON_CLASS_ABSTRACT_ERROR:"apiviewer/image/class_abstract_warning18.gif",ICON_CLASS_SINGLETON:"apiviewer/image/class_singleton18.gif",ICON_CLASS_SINGLETON_WARN:"apiviewer/image/class_singleton_warning18.gif",ICON_CLASS_SINGLETON_ERROR:"apiviewer/image/class_singleton_warning18.gif",ICON_PROPERTY_PUB:"apiviewer/image/property18.gif",ICON_PROPERTY_PROT:"apiviewer/image/property_protected18.gif",ICON_PROPERTY_PRIV:"apiviewer/image/property_private18.gif",ICON_PROPERTY_PUB_THEMEABLE:"apiviewer/image/property_themeable18.gif",ICON_EVENT:"apiviewer/image/event18.gif",ICON_INTERFACE:"apiviewer/image/interface18.gif",ICON_INTERFACE_WARN:"apiviewer/image/interface_warning18.gif",ICON_MIXIN:"apiviewer/image/mixin18.gif",ICON_MIXIN_WARN:"apiviewer/image/mixin_warning18.gif",ICON_METHOD_PUB:"apiviewer/image/method_public18.gif",ICON_METHOD_PUB_INHERITED:"apiviewer/image/method_public_inherited18.gif",ICON_CTOR:"apiviewer/image/constructor18.gif",ICON_METHOD_PROT:"apiviewer/image/method_protected18.gif",ICON_METHOD_PRIV:"apiviewer/image/method_private18.gif",ICON_CONSTANT:"apiviewer/image/constant18.gif",ICON_APPEARANCE:"apiviewer/image/constant18.gif",ICON_CHILDCONTROL:"apiviewer/image/childcontrol18.gif"},defer:function(W,X,Y){W.PRELOAD_IMAGES=[W.ICON_INFO,W.ICON_SEARCH,W.OVERLAY_ABSTRACT,W.OVERLAY_ERROR,W.OVERLAY_INHERITED,W.OVERLAY_OVERRIDDEN,W.OVERLAY_STATIC,W.OVERLAY_WARN,W.OVERLAY_MIXIN,W.OVERLAY_THEMEABLE,W.ICON_PACKAGE,W.ICON_PACKAGE_WARN,W.ICON_CLASS,W.ICON_CLASS_WARN,W.ICON_CLASS_ERROR,W.ICON_CLASS_STATIC,W.ICON_CLASS_STATIC_WARN,W.ICON_CLASS_STATIC_ERROR,W.ICON_CLASS_ABSTRACT,W.ICON_CLASS_ABSTRACT_WARN,W.ICON_CLASS_ABSTRACT_ERROR,W.ICON_CLASS_SINGLETON,W.ICON_CLASS_SINGLETON_WARN,W.ICON_CLASS_SINGLETON_ERROR,W.ICON_PROPERTY_PUB,W.ICON_PROPERTY_PROT,W.ICON_PROPERTY_PRIV,W.ICON_PROPERTY_PUB_THEMEABLE,W.ICON_EVENT,W.ICON_INTERFACE,W.ICON_INTERFACE_WARN,W.ICON_MIXIN,W.ICON_MIXIN_WARN,W.ICON_METHOD_PUB,W.ICON_METHOD_PUB_INHERITED,W.ICON_CTOR,W.ICON_METHOD_PROT,W.ICON_METHOD_PRIV,W.ICON_CONSTANT,W.ICON_CHILDCONTROL];}});})();(function(){var g="Boolean",f="changeShowInherited",e="changeShowProtected",d="changeExpandProperties",c="apiviewer.UiModel",b="changeShowPrivate",a="singleton";qx.Class.define(c,{extend:qx.core.Object,type:a,properties:{showInherited:{check:g,init:false,event:f},expandProperties:{check:g,init:false,event:d},showProtected:{check:g,init:false,event:e},showPrivate:{check:g,init:false,event:b}}});})();(function(){var i="auto",h="overflowX",g="visible",f="hidden",e="scroll",d="overflowY",c="_applyOverflowX",b="_applyOverflowY",a="qx.ui.core.MNativeOverflow";qx.Mixin.define(a,{properties:{overflowX:{check:[f,g,e,i],nullable:true,apply:c},overflowY:{check:[f,g,e,i],nullable:true,apply:b},overflow:{group:[h,d]}},members:{_applyOverflowX:function(j){this.getContentElement().setStyle(h,j);},_applyOverflowY:function(k){this.getContentElement().setStyle(d,k);}}});})();(function(){var o="none",n="text",m="",l="userSelect",k="color",j="String",i="0px",h="webkit",g="changeHtml",f="_applyCssClass",c="class",e="qx.ui.embed.Html",d="_applyHtml",b="qx.client",a="html";qx.Class.define(e,{extend:qx.ui.core.Widget,include:[qx.ui.core.MNativeOverflow],construct:function(p){qx.ui.core.Widget.call(this);if(p!=null){this.setHtml(p);}},properties:{html:{check:j,apply:d,event:g,nullable:true},cssClass:{check:j,init:m,apply:f},selectable:{refine:true,init:true},focusable:{refine:true,init:true}},members:{getFocusElement:function(){return this.getContentElement();},_applyHtml:function(q,r){var s=this.getContentElement();s.setAttribute(a,q||m);s.setStyles({"padding":i,"border":o});},_applyCssClass:function(t,u){this.getContentElement().setAttribute(c,t);},_applySelectable:function(v){qx.ui.core.Widget.prototype._applySelectable.call(this,v);if(qx.core.Variant.isSet(b,h)){this.getContainerElement().setStyle(l,v?n:o);this.getContentElement().setStyle(l,v?n:o);}},_applyFont:function(w,x){var y=w?qx.theme.manager.Font.getInstance().resolve(w).getStyles():qx.bom.Font.getDefaultStyles();this.getContentElement().setStyles(y);},_applyTextColor:function(z,A){if(z){this.getContentElement().setStyle(k,qx.theme.manager.Color.getInstance().resolve(z));}else{this.getContentElement().removeStyle(k);}}}});})();(function(){var l="Boolean",k="_updatePanels",j="auto",h='</div>',g='<div>',f='apiviewer/image/close.gif',e="javascript",d='<div style="padding:24px;">',c="_blank",b="apiviewer.dao.Node",y="string",x="http://",w="pre",v="_infoPanels",u='apiviewer/image/open.gif',t="appear",s="img",r="_applyDocNode",q="detailviewer",p='<h1></h1>',n="abstract",o="apiviewer.ui.AbstractViewer",m="a";qx.Class.define(o,{type:n,extend:qx.ui.embed.Html,construct:function(){qx.ui.embed.Html.call(this);this._infoPanelHash={};this._infoPanels=[];this.setOverflowX(j);this.setOverflowY(j);this.setAppearance(q);this._infoPanelHash={};this._infoPanels=[];apiviewer.ObjectRegistry.register(this);},properties:{docNode:{check:b,init:null,nullable:true,apply:r},showInherited:{check:l,init:false,apply:k},expandProperties:{check:l,init:false,apply:k},showProtected:{check:l,init:false,apply:k},showPrivate:{check:l,init:false,apply:k}},statics:{fixLinks:function(z){var a=z.getElementsByTagName(m);for(var i=0;i<a.length;i++){if(typeof a[i].href==y&&a[i].href.indexOf(x)==0){a[i].target=c;}}},highlightCode:function(A){var B=A.getElementsByTagName(w);for(var i=0;i<B.length;i++){var C=B[i];if(C.className!==e){continue;}C.innerHTML=qx.dev.Tokenizer.javaScriptToHtml(C.innerHTML);}}},members:{_infoPanelHash:null,_infoPanels:null,__Sq:null,_init:function(D){this.__Sr();this.setDocNode(D);this.addListenerOnce(t,function(){this._syncHtml();this._applyDocNode(this.__Sq);},this);},__Sr:function(){var F=new qx.util.StringBuilder();F.add(d);F.add(p);F.add(g,h);var E=this.getPanels();for(var i=0;i<E.length;i++){var G=E[i];F.add(G.getPanelHtml(this));}F.add(h);this.setHtml(F.get());},_getTitleHtml:function(H){throw new Error("Abstract method called!");},_getDescriptionHtml:function(I){throw new Error("Abstract method called!");},_syncHtml:function(){var M=this.getContentElement().getDomElement().firstChild;var J=M.childNodes;var K=this.getPanels();apiviewer.ui.AbstractViewer.fixLinks(M);this._titleElem=J[0];this._classDescElem=J[1];for(var i=0;i<K.length;i++){var L=K[i];L.setElement(J[i+2]);}},addInfoPanel:function(N){this._infoPanelHash[N.toHashCode()]=N;this._infoPanels.push(N);},getPanels:function(){return this._infoPanels;},getPanelFromHashCode:function(O){return this._infoPanelHash[O];},_updatePanels:function(){var P=this.getPanels();for(var i=0;i<P.length;i++){var Q=P[i];Q.update(this,this.__Sq);}},_applyDocNode:function(R){this.__Sq=R;if(!this._titleElem){return ;}this._titleElem.innerHTML=this._getTitleHtml(R);this._classDescElem.innerHTML=this._getDescriptionHtml(R);apiviewer.ui.AbstractViewer.fixLinks(this._classDescElem);apiviewer.ui.AbstractViewer.highlightCode(this._classDescElem);this._updatePanels();},togglePanelVisibility:function(S){try{S.setIsOpen(!S.getIsOpen());var T=S.getTitleElement().getElementsByTagName(s)[0];T.src=qx.util.ResourceManager.getInstance().toUri(S.getIsOpen()?f:u);S.update(this,this.getDocNode());}catch(U){this.error("Toggling info body failed",U);}}},destruct:function(){this._classDescElem=this._titleElem=this._infoPanelHash=this.__Sq=null;this._disposeArray(v,1);}});})();(function(){var n="classes",m="functions",l="",k="packages",j="class",i="interfaces",h='<div class="class-description">',g='<small>package</small>',f='</div>',e="ClassViewer",b="mixins",d="interface",c="apiviewer.ui.PackageViewer",a="mixin";qx.Class.define(c,{extend:apiviewer.ui.AbstractViewer,construct:function(){apiviewer.ui.AbstractViewer.call(this);this.addInfoPanel(new apiviewer.ui.panels.MethodPanel(m,m));this.addInfoPanel(new apiviewer.ui.panels.ClassPanel(n,n,j));this.addInfoPanel(new apiviewer.ui.panels.ClassPanel(n,i,d));this.addInfoPanel(new apiviewer.ui.panels.ClassPanel(n,b,a));this.addInfoPanel(new apiviewer.ui.panels.PackagePanel(k,k));this.getContentElement().setAttribute(j,e);this._init(new apiviewer.dao.Package({}));},members:{_getTitleHtml:function(o){var p=l;p+=g;p+=o.getFullName();return p;},_getDescriptionHtml:function(q){var r=new qx.util.StringBuilder();var s=q.getDescription();if(s!=l){r.add(h,apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(s,q),f);}return r.get();}}});})();(function(){var a="apiviewer.ObjectRegistry";qx.Class.define(a,{statics:{__Ss:{},register:function(b){var c=qx.core.ObjectRegistry.toHashCode(b);this.__Ss[c]=b;},getObjectFromHashCode:function(d){return this.__Ss[d];}}});})();(function(){var l="</span>",k="sym",j="nl",h="qxkey",g="ws",f=">",e="qqstr",d="<",c="qstr",b="linecomment",bg="ident",bf="keyword",be="regexp",bd="&",bc="|",bb="fullcomment",ba="atom",Y="\\r\\n|\\r|\\n",X="\\s*\\)*",W="\\s",s="^",t='["][^"]*["]',q="real",r="\\s*[,\\)]",o="<span class='string'>",p="[a-zA-Z_][a-zA-Z0-9_]*\\b",m="<span class='comment'>",n="[+-]?\\d+",w="\\s*\\(*\\s*",x="&nbsp;",F="qx.dev.Tokenizer",D="\\t",M="\\s*\\)*\\s*\\)",H="\\.(?:replace)\\s*\\(\\s*\\(*\\s*",S="\\)*\\.(?:test|exec)\\s*\\(\\s*",Q="<span class='regexp'>",z="int",V="'>",U="<span class='",T="(?:\\/(?!\\*)[^\\t\\n\\r\\f\\v\\/]+?\\/[mgi]*)",y=".",B="\\s*\\)*\\s*?,?",C="[\\(,]\\s*",E="<span class='ident'>",G="g",I="[+-]?\\d+(([.]\\d+)*([eE][+-]?\\d+))?",N="\\/\\*(?:.|[\\n\\r])*?\\*\\/",R="\n",u="$",v="['][^']*[']",A="tab",L="\\/\\/.*?[\\n\\r$]",K="<br>",J=" ",P="(?::|=|\\?)\\s*\\(*\\s*",O="\\.(?:match|search|split)\\s*\\(\\s*\\(*\\s*";qx.Class.define(F,{extend:qx.core.Object,statics:{tokenizeJavaScript:function(bh){var bL={"break":1,"case":1,"catch":1,"continue":1,"default":1,"delete":1,"do":1,"else":1,"finally":1,"for":1,"function":1,"if":1,"in":1,"instanceof":1,"new":1,"return":1,"switch":1,"throw":1,"try":1,"typeof":1,"var":1,"while":1,"with":1};var bB={"void":1,"null":1,"true":1,"false":1,"NaN":1,"Infinity":1,"this":1};var bx={"statics":1,"members":1,"construct":1,"destruct":1,"events":1,"properties":1,"extend":1,"implement":1};var bt=function(bM){return new RegExp(s+bM+u);};var bE=L;var bu=N;var bo=p;var bw=n;var br=I;var bz=t;var by=v;var bm=D;var bH=Y;var bJ=W;var bs=T;var bv=[O+bs+M,H+bs+B,w+bs+S,P+bs+X,C+bs+r].join(bc);var bF=bt(bE);var bp=bt(bu);var bC=bt(bo);var bl=bt(bw);var bI=bt(br);var bk=bt(bz);var bj=bt(by);var bD=bt(bm);var bq=bt(bH);var bi=bt(bJ);var bn=bt(bv);var bA=new RegExp([bE,bu,bo,bw,br,bz,by,by,bm,bH,bJ,bv,y].join(bc),G);var bG=[];var a=bh.match(bA);for(var i=0;i<a.length;i++){var bK=a[i];if(bK.match(bF)){bG.push({type:b,value:bK});}else if(bK.match(bp)){bG.push({type:bb,value:bK});}else if(bK.match(bn)){bG.push({type:be,value:bK});}else if(bK.match(bj)){bG.push({type:c,value:bK});}else if(bK.match(bk)){bG.push({type:e,value:bK});}else if(bL[bK]){bG.push({type:bf,value:bK});}else if(bB[bK]){bG.push({type:ba,value:bK});}else if(bx[bK]){bG.push({type:h,value:bK});}else if(bK.match(bC)){bG.push({type:bg,value:bK});}else if(bK.match(bI)){bG.push({type:q,value:bK});}else if(bK.match(bl)){bG.push({type:z,value:bK});}else if(bK.match(bq)){bG.push({type:j,value:bK});}else if(bK.match(bt(bi))){bG.push({type:g,value:bK});}else if(bK.match(bD)){bG.push({type:A,value:bK});}else if(bK==f){bG.push({type:k,value:f});}else if(bK==d){bG.push({type:k,value:d});}else if(bK==bd){bG.push({type:k,value:bd});}else{bG.push({type:k,value:bK});}}return bG;},javaScriptToHtml:function(bN){var bR=qx.dev.Tokenizer.tokenizeJavaScript(bN);var bQ=new qx.util.StringBuilder();for(var i=0;i<bR.length;i++){var bS=bR[i];var bP=qx.bom.String.escape(bS.value);switch(bS.type){case be:bQ.add(Q,bP,l);break;case bg:bQ.add(E,bP,l);break;case b:case bb:bQ.add(m,bP,l);break;case c:case e:bQ.add(o,bP,l);break;case bf:case ba:case h:bQ.add(U,bS.type,V,bP,l);break;case j:var bO=qx.bom.client.Engine.MSHTML?K:R;bQ.add(bO);break;case g:var bT=qx.bom.client.Engine.MSHTML?x:J;bQ.add(bT);break;default:bQ.add(bP);}}return bQ.get();}}});})();(function(){var f="mshtml",e="pop.push.reverse.shift.sort.splice.unshift.join.slice",d="number",c="qx.type.BaseArray",b="qx.client",a=".";qx.Class.define(c,{extend:Array,construct:function(g){},members:{toArray:null,valueOf:null,pop:null,push:null,reverse:null,shift:null,sort:null,splice:null,unshift:null,concat:null,join:null,slice:null,toString:null,indexOf:null,lastIndexOf:null,forEach:null,filter:null,map:null,some:null,every:null}});(function(){function k(l){if(qx.core.Variant.isSet(b,f)){j.prototype={length:0,$$isArray:true};var o=e.split(a);for(var length=o.length;length;){j.prototype[o[--length]]=Array.prototype[o[length]];}}var p=Array.prototype.slice;j.prototype.concat=function(){var r=this.slice(0);for(var i=0,length=arguments.length;i<length;i++){var q;if(arguments[i] instanceof j){q=p.call(arguments[i],0);}else if(arguments[i] instanceof Array){q=arguments[i];}else{q=[arguments[i]];}r.push.apply(r,q);}return r;};j.prototype.toString=function(){return p.call(this,0).toString();};j.prototype.toLocaleString=function(){return p.call(this,0).toLocaleString();};j.prototype.constructor=j;j.prototype.indexOf=qx.lang.Core.arrayIndexOf;j.prototype.lastIndexOf=qx.lang.Core.arrayLastIndexOf;j.prototype.forEach=qx.lang.Core.arrayForEach;j.prototype.some=qx.lang.Core.arraySome;j.prototype.every=qx.lang.Core.arrayEvery;var m=qx.lang.Core.arrayFilter;var n=qx.lang.Core.arrayMap;j.prototype.filter=function(){var s=new this.constructor;s.push.apply(s,m.apply(this,arguments));return s;};j.prototype.map=function(){var t=new this.constructor;t.push.apply(t,n.apply(this,arguments));return t;};j.prototype.slice=function(){var u=new this.constructor;u.push.apply(u,Array.prototype.slice.apply(this,arguments));return u;};j.prototype.splice=function(){var v=new this.constructor;v.push.apply(v,Array.prototype.splice.apply(this,arguments));return v;};j.prototype.toArray=function(){return Array.prototype.slice.call(this,0);};j.prototype.valueOf=function(){return this.length;};return j;}function j(length){if(arguments.length===1&&typeof length===d){this.length=-1<length&&length===length>>.5?length:this.push(length);}else if(arguments.length){this.push.apply(this,arguments);}}function h(){}h.prototype=[];j.prototype=new h;j.prototype.length=0;qx.type.BaseArray=k(j);})();})();(function(){var b="",a="qx.util.StringBuilder";qx.Class.define(a,{extend:qx.type.BaseArray,members:{clear:function(){this.length=0;},get:function(){return this.join(b);},add:null,isEmpty:function(){return this.length===0;},size:function(){return this.join(b).length;}},defer:function(c,d){d.add=d.push;d.toString=d.get;d.valueOf=d.get;}});})();(function(){var p="",o="!",n="'!",m="'",k="Expected '",j="' (rgb(",h=",",g=")), but found value '",f="Event (",d="Expected value to be the CSS color '",bw="' but found ",bv="The value '",bu=" != ",bt="qx.core.Object",bs="Expected value to be an array but found ",br=") was fired.",bq="Expected value to be an integer >= 0 but found ",bp="' to be not equal with '",bo="' to '",bn="qx.ui.core.Widget",w="Called assertTrue with '",x="Expected value to be a map but found ",u="The function did not raise an exception!",v="Expected value to be undefined but found ",s="Expected value to be a DOM element but found '",t="Expected value to be a regular expression but found ",q="' to implement the interface '",r="Expected value to be null but found ",E="Invalid argument 'type'",F="Called assert with 'false'",R="Assertion error! ",N="Expected value to be a string but found ",ba="null",U="' but found '",bj="' must must be a key of the map '",bf="The String '",J="Expected value not to be undefined but found ",bm="qx.util.ColorUtil",bl=": ",bk="The raised exception does not have the expected type! ",I=") not fired.",L="qx.core.Assert",M="Expected value to be typeof object but found ",P="' (identical) but found '",S="' must have any of the values defined in the array '",V="Expected value to be a number but found ",bc="Called assertFalse with '",bh="]",y="Expected value to be a qooxdoo object but found ",z="' arguments.",K="Expected value not to be null but found ",Y="Array[",X="' does not match the regular expression '",W="' to be not identical with '",be="' arguments but found '",bd="', which cannot be converted to a CSS color!",T="Expected object '",bb="qx.core.AssertionError",a="Expected value to be a boolean but found ",bg="))!",A="Expected value to be a qooxdoo widget but found ",B="Expected value '%1' to be in the range '%2'..'%3'!",O="Expected value to be typeof '",b="Expected value to be typeof function but found ",c="Expected value to be an integer but found ",H="Called fail().",C="The parameter 're' must be a string or a regular expression.",D="Expected value to be a number >= 0 but found ",G="Expected value to be instanceof '",Q="Wrong number of arguments given. Expected '",bi="object";qx.Class.define(L,{statics:{__tN:true,__tO:function(bx,by){var bz=p;for(var i=1,l=arguments.length;i<l;i++){bz=bz+this.__tP(arguments[i]);}var bB=R+bx+bl+bz;if(this.__tN){qx.Bootstrap.error(bB);}if(qx.Class.isDefined(bb)){var bA=new qx.core.AssertionError(bx,bz);if(this.__tN){qx.Bootstrap.error("Stack trace: \n"+bA.getStackTrace());}throw bA;}else{throw new Error(bB);}},__tP:function(bC){var bD;if(bC===null){bD=ba;}else if(qx.lang.Type.isArray(bC)&&bC.length>10){bD=Y+bC.length+bh;}else if((bC instanceof Object)&&(bC.toString==null)){bD=qx.lang.Json.stringify(bC,null,2);}else{try{bD=bC.toString();}catch(e){bD=p;}}return bD;},assert:function(bE,bF){bE==true||this.__tO(bF||p,F);},fail:function(bG){this.__tO(bG||p,H);},assertTrue:function(bH,bI){(bH===true)||this.__tO(bI||p,w,bH,m);},assertFalse:function(bJ,bK){(bJ===false)||this.__tO(bK||p,bc,bJ,m);},assertEquals:function(bL,bM,bN){bL==bM||this.__tO(bN||p,k,bL,U,bM,n);},assertNotEquals:function(bO,bP,bQ){bO!=bP||this.__tO(bQ||p,k,bO,bp,bP,n);},assertIdentical:function(bR,bS,bT){bR===bS||this.__tO(bT||p,k,bR,P,bS,n);},assertNotIdentical:function(bU,bV,bW){bU!==bV||this.__tO(bW||p,k,bU,W,bV,n);},assertNotUndefined:function(bX,bY){bX!==undefined||this.__tO(bY||p,J,bX,o);},assertUndefined:function(ca,cb){ca===undefined||this.__tO(cb||p,v,ca,o);},assertNotNull:function(cc,cd){cc!==null||this.__tO(cd||p,K,cc,o);},assertNull:function(ce,cf){ce===null||this.__tO(cf||p,r,ce,o);},assertJsonEquals:function(cg,ch,ci){this.assertEquals(qx.lang.Json.stringify(cg),qx.lang.Json.stringify(ch),ci);},assertMatch:function(cj,ck,cl){this.assertString(cj);this.assert(qx.lang.Type.isRegExp(ck)||qx.lang.Type.isString(ck),C);cj.search(ck)>=0||this.__tO(cl||p,bf,cj,X,ck.toString(),n);},assertArgumentsCount:function(cm,cn,co,cp){var cq=cm.length;(cq>=cn&&cq<=co)||this.__tO(cp||p,Q,cn,bo,co,be,arguments.length,z);},assertEventFired:function(cr,event,cs,ct,cu){var cw=false;var cv=function(e){if(ct){ct.call(cr,e);}cw=true;};var cx;try{cx=cr.addListener(event,cv,cr);cs.call();}catch(cy){throw cy;}finally{try{cr.removeListenerById(cx);}catch(cz){}}cw===true||this.__tO(cu||p,f,event,I);},assertEventNotFired:function(cA,event,cB,cC){var cE=false;var cD=function(e){cE=true;};var cF=cA.addListener(event,cD,cA);cB.call();cE===false||this.__tO(cC||p,f,event,br);cA.removeListenerById(cF);},assertException:function(cG,cH,cI,cJ){var cH=cH||Error;var cK;try{this.__tN=false;cG();}catch(cL){cK=cL;}finally{this.__tN=true;}if(cK==null){this.__tO(cJ||p,u);}cK instanceof cH||this.__tO(cJ||p,bk,cH,bu,cK);if(cI){this.assertMatch(cK.toString(),cI,cJ);}},assertInArray:function(cM,cN,cO){cN.indexOf(cM)!==-1||this.__tO(cO||p,bv,cM,S,cN,m);},assertArrayEquals:function(cP,cQ,cR){this.assertArray(cP,cR);this.assertArray(cQ,cR);this.assertEquals(cP.length,cQ.length,cR);for(var i=0;i<cP.length;i++){this.assertIdentical(cP[i],cQ[i],cR);}},assertKeyInMap:function(cS,cT,cU){cT[cS]!==undefined||this.__tO(cU||p,bv,cS,bj,cT,m);},assertFunction:function(cV,cW){qx.lang.Type.isFunction(cV)||this.__tO(cW||p,b,cV,o);},assertString:function(cX,cY){qx.lang.Type.isString(cX)||this.__tO(cY||p,N,cX,o);},assertBoolean:function(da,db){qx.lang.Type.isBoolean(da)||this.__tO(db||p,a,da,o);},assertNumber:function(dc,dd){(qx.lang.Type.isNumber(dc)&&isFinite(dc))||this.__tO(dd||p,V,dc,o);},assertPositiveNumber:function(de,df){(qx.lang.Type.isNumber(de)&&isFinite(de)&&de>=0)||this.__tO(df||p,D,de,o);},assertInteger:function(dg,dh){(qx.lang.Type.isNumber(dg)&&isFinite(dg)&&dg%1===0)||this.__tO(dh||p,c,dg,o);},assertPositiveInteger:function(di,dj){var dk=(qx.lang.Type.isNumber(di)&&isFinite(di)&&di%1===0&&di>=0);dk||this.__tO(dj||p,bq,di,o);},assertInRange:function(dl,dm,dn,dp){(dl>=dm&&dl<=dn)||this.__tO(dp||p,qx.lang.String.format(B,[dl,dm,dn]));},assertObject:function(dq,dr){var ds=dq!==null&&(qx.lang.Type.isObject(dq)||typeof dq===bi);ds||this.__tO(dr||p,M,(dq),o);},assertArray:function(dt,du){qx.lang.Type.isArray(dt)||this.__tO(du||p,bs,dt,o);},assertMap:function(dv,dw){qx.lang.Type.isObject(dv)||this.__tO(dw||p,x,dv,o);},assertRegExp:function(dx,dy){qx.lang.Type.isRegExp(dx)||this.__tO(dy||p,t,dx,o);},assertType:function(dz,dA,dB){this.assertString(dA,E);typeof (dz)===dA||this.__tO(dB||p,O,dA,bw,dz,o);},assertInstance:function(dC,dD,dE){var dF=dD.classname||dD+p;dC instanceof dD||this.__tO(dE||p,G,dF,bw,dC,o);},assertInterface:function(dG,dH,dI){qx.Class.implementsInterface(dG,dH)||this.__tO(dI||p,T,dG,q,dH,n);},assertCssColor:function(dJ,dK,dL){var dM=qx.Class.getByName(bm);if(!dM){throw new Error("qx.util.ColorUtil not available! Your code must have a dependency on 'qx.util.ColorUtil'");}var dO=dM.stringToRgb(dJ);try{var dN=dM.stringToRgb(dK);}catch(dQ){this.__tO(dL||p,d,dJ,j,dO.join(h),g,dK,bd);}var dP=dO[0]==dN[0]&&dO[1]==dN[1]&&dO[2]==dN[2];dP||this.__tO(dL||p,d,dO,j,dO.join(h),g,dK,j,dN.join(h),bg);},assertElement:function(dR,dS){!!(dR&&dR.nodeType===1)||this.__tO(dS||p,s,dR,n);},assertQxObject:function(dT,dU){this.__tQ(dT,bt)||this.__tO(dU||p,y,dT,o);},assertQxWidget:function(dV,dW){this.__tQ(dV,bn)||this.__tO(dW||p,A,dV,o);},__tQ:function(dX,dY){if(!dX){return false;}var ea=dX.constructor;while(ea){if(ea.classname===dY){return true;}ea=ea.superclass;}return false;}}});})();(function(){var p='',o='"',m=':',l=']',h='null',g=': ',f='object',e='function',d=',',b='\n',ba='\\u',Y=',\n',X='0000',W='string',V="Cannot stringify a recursive object.",U='0',T='-',S='}',R='String',Q='Boolean',x='\\\\',y='\\f',u='\\t',w='{\n',s='[]',t="qx.lang.JsonImpl",q='Z',r='\\n',z='Object',A='{}',H='@',F='.',K='(',J='Array',M='T',L='\\r',C='{',P='JSON.parse',O=' ',N='[',B='Number',D=')',E='[\n',G='\\"',I='\\b';qx.Class.define(t,{extend:Object,construct:function(){this.stringify=qx.lang.Function.bind(this.stringify,this);this.parse=qx.lang.Function.bind(this.parse,this);},members:{__tT:null,__tU:null,__tV:null,__tW:null,stringify:function(bb,bc,bd){this.__tT=p;this.__tU=p;this.__tW=[];if(qx.lang.Type.isNumber(bd)){var bd=Math.min(10,Math.floor(bd));for(var i=0;i<bd;i+=1){this.__tU+=O;}}else if(qx.lang.Type.isString(bd)){if(bd.length>10){bd=bd.slice(0,10);}this.__tU=bd;}if(bc&&(qx.lang.Type.isFunction(bc)||qx.lang.Type.isArray(bc))){this.__tV=bc;}else{this.__tV=null;}return this.__tX(p,{'':bb});},__tX:function(be,bf){var bi=this.__tT,bg,bj=bf[be];if(bj&&qx.lang.Type.isFunction(bj.toJSON)){bj=bj.toJSON(be);}else if(qx.lang.Type.isDate(bj)){bj=this.dateToJSON(bj);}if(typeof this.__tV===e){bj=this.__tV.call(bf,be,bj);}if(bj===null){return h;}if(bj===undefined){return undefined;}switch(qx.lang.Type.getClass(bj)){case R:return this.__tY(bj);case B:return isFinite(bj)?String(bj):h;case Q:return String(bj);case J:this.__tT+=this.__tU;bg=[];if(this.__tW.indexOf(bj)!==-1){throw new TypeError(V);}this.__tW.push(bj);var length=bj.length;for(var i=0;i<length;i+=1){bg[i]=this.__tX(i,bj)||h;}this.__tW.pop();if(bg.length===0){var bh=s;}else if(this.__tT){bh=E+this.__tT+bg.join(Y+this.__tT)+b+bi+l;}else{bh=N+bg.join(d)+l;}this.__tT=bi;return bh;case z:this.__tT+=this.__tU;bg=[];if(this.__tW.indexOf(bj)!==-1){throw new TypeError(V);}this.__tW.push(bj);if(this.__tV&&typeof this.__tV===f){var length=this.__tV.length;for(var i=0;i<length;i+=1){var k=this.__tV[i];if(typeof k===W){var v=this.__tX(k,bj);if(v){bg.push(this.__tY(k)+(this.__tT?g:m)+v);}}}}else{for(var k in bj){if(Object.hasOwnProperty.call(bj,k)){var v=this.__tX(k,bj);if(v){bg.push(this.__tY(k)+(this.__tT?g:m)+v);}}}}this.__tW.pop();if(bg.length===0){var bh=A;}else if(this.__tT){bh=w+this.__tT+bg.join(Y+this.__tT)+b+bi+S;}else{bh=C+bg.join(d)+S;}this.__tT=bi;return bh;}},dateToJSON:function(bk){var bl=function(n){return n<10?U+n:n;};var bm=function(n){var bn=bl(n);return n<100?U+bn:bn;};return isFinite(bk.valueOf())?bk.getUTCFullYear()+T+bl(bk.getUTCMonth()+1)+T+bl(bk.getUTCDate())+M+bl(bk.getUTCHours())+m+bl(bk.getUTCMinutes())+m+bl(bk.getUTCSeconds())+F+bm(bk.getUTCMilliseconds())+q:null;},__tY:function(bo){var bp={'\b':I,'\t':u,'\n':r,'\f':y,'\r':L,'"':G,'\\':x};var bq=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;bq.lastIndex=0;if(bq.test(bo)){return o+bo.replace(bq,function(a){var c=bp[a];return typeof c===W?c:ba+(X+a.charCodeAt(0).toString(16)).slice(-4);})+o;}else{return o+bo+o;}},parse:function(br,bs){var bt=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;bt.lastIndex=0;if(bt.test(br)){br=br.replace(bt,function(a){return ba+(X+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(br.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,H).replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,l).replace(/(?:^|:|,)(?:\s*\[)+/g,p))){var j=eval(K+br+D);return typeof bs===e?this.__ua({'':j},p,bs):j;}throw new SyntaxError(P);},__ua:function(bu,bv,bw){var bx=bu[bv];if(bx&&typeof bx===f){for(var k in bx){if(Object.hasOwnProperty.call(bx,k)){var v=this.__ua(bx,k,bw);if(v!==undefined){bx[k]=v;}else{delete bx[k];}}}}return bw.call(bu,bv,bx);}}});})();(function(){var a="qx.lang.Json";qx.Class.define(a,{statics:{JSON:(qx.lang.Type.getClass(window.JSON)=="JSON"&&JSON.parse('{"x":1}').x===1)?window.JSON:new qx.lang.JsonImpl(),stringify:null,parse:null},defer:function(b){b.stringify=b.JSON.stringify;b.parse=b.JSON.parse;}});})();(function(){var g="",f="<br",e=" &nbsp;",d="<br>",c=" ",b="\n",a="qx.bom.String";qx.Class.define(a,{statics:{TO_CHARCODE:{"quot":34,"amp":38,"lt":60,"gt":62,"nbsp":160,"iexcl":161,"cent":162,"pound":163,"curren":164,"yen":165,"brvbar":166,"sect":167,"uml":168,"copy":169,"ordf":170,"laquo":171,"not":172,"shy":173,"reg":174,"macr":175,"deg":176,"plusmn":177,"sup2":178,"sup3":179,"acute":180,"micro":181,"para":182,"middot":183,"cedil":184,"sup1":185,"ordm":186,"raquo":187,"frac14":188,"frac12":189,"frac34":190,"iquest":191,"Agrave":192,"Aacute":193,"Acirc":194,"Atilde":195,"Auml":196,"Aring":197,"AElig":198,"Ccedil":199,"Egrave":200,"Eacute":201,"Ecirc":202,"Euml":203,"Igrave":204,"Iacute":205,"Icirc":206,"Iuml":207,"ETH":208,"Ntilde":209,"Ograve":210,"Oacute":211,"Ocirc":212,"Otilde":213,"Ouml":214,"times":215,"Oslash":216,"Ugrave":217,"Uacute":218,"Ucirc":219,"Uuml":220,"Yacute":221,"THORN":222,"szlig":223,"agrave":224,"aacute":225,"acirc":226,"atilde":227,"auml":228,"aring":229,"aelig":230,"ccedil":231,"egrave":232,"eacute":233,"ecirc":234,"euml":235,"igrave":236,"iacute":237,"icirc":238,"iuml":239,"eth":240,"ntilde":241,"ograve":242,"oacute":243,"ocirc":244,"otilde":245,"ouml":246,"divide":247,"oslash":248,"ugrave":249,"uacute":250,"ucirc":251,"uuml":252,"yacute":253,"thorn":254,"yuml":255,"fnof":402,"Alpha":913,"Beta":914,"Gamma":915,"Delta":916,"Epsilon":917,"Zeta":918,"Eta":919,"Theta":920,"Iota":921,"Kappa":922,"Lambda":923,"Mu":924,"Nu":925,"Xi":926,"Omicron":927,"Pi":928,"Rho":929,"Sigma":931,"Tau":932,"Upsilon":933,"Phi":934,"Chi":935,"Psi":936,"Omega":937,"alpha":945,"beta":946,"gamma":947,"delta":948,"epsilon":949,"zeta":950,"eta":951,"theta":952,"iota":953,"kappa":954,"lambda":955,"mu":956,"nu":957,"xi":958,"omicron":959,"pi":960,"rho":961,"sigmaf":962,"sigma":963,"tau":964,"upsilon":965,"phi":966,"chi":967,"psi":968,"omega":969,"thetasym":977,"upsih":978,"piv":982,"bull":8226,"hellip":8230,"prime":8242,"Prime":8243,"oline":8254,"frasl":8260,"weierp":8472,"image":8465,"real":8476,"trade":8482,"alefsym":8501,"larr":8592,"uarr":8593,"rarr":8594,"darr":8595,"harr":8596,"crarr":8629,"lArr":8656,"uArr":8657,"rArr":8658,"dArr":8659,"hArr":8660,"forall":8704,"part":8706,"exist":8707,"empty":8709,"nabla":8711,"isin":8712,"notin":8713,"ni":8715,"prod":8719,"sum":8721,"minus":8722,"lowast":8727,"radic":8730,"prop":8733,"infin":8734,"ang":8736,"and":8743,"or":8744,"cap":8745,"cup":8746,"int":8747,"there4":8756,"sim":8764,"cong":8773,"asymp":8776,"ne":8800,"equiv":8801,"le":8804,"ge":8805,"sub":8834,"sup":8835,"sube":8838,"supe":8839,"oplus":8853,"otimes":8855,"perp":8869,"sdot":8901,"lceil":8968,"rceil":8969,"lfloor":8970,"rfloor":8971,"lang":9001,"rang":9002,"loz":9674,"spades":9824,"clubs":9827,"hearts":9829,"diams":9830,"OElig":338,"oelig":339,"Scaron":352,"scaron":353,"Yuml":376,"circ":710,"tilde":732,"ensp":8194,"emsp":8195,"thinsp":8201,"zwnj":8204,"zwj":8205,"lrm":8206,"rlm":8207,"ndash":8211,"mdash":8212,"lsquo":8216,"rsquo":8217,"sbquo":8218,"ldquo":8220,"rdquo":8221,"bdquo":8222,"dagger":8224,"Dagger":8225,"permil":8240,"lsaquo":8249,"rsaquo":8250,"euro":8364},escape:function(h){return qx.util.StringEscape.escape(h,qx.bom.String.FROM_CHARCODE);},unescape:function(i){return qx.util.StringEscape.unescape(i,qx.bom.String.TO_CHARCODE);},fromText:function(j){return qx.bom.String.escape(j).replace(/( |\n)/g,function(k){var l={" ":e,"\n":d};return l[k]||k;});},toText:function(m){return qx.bom.String.unescape(m.replace(/\s+|<([^>])+>/gi,function(n){if(n.indexOf(f)===0){return b;}else if(n.length>0&&n.replace(/^\s*/,g).replace(/\s*$/,g)==g){return c;}else{return g;}}));}},defer:function(o){o.FROM_CHARCODE=qx.lang.Object.invert(o.TO_CHARCODE);}});})();(function(){var g=";",f="&",e='X',d="",c='#',b="&#",a="qx.util.StringEscape";qx.Class.define(a,{statics:{escape:function(h,j){var m,o=d;for(var i=0,l=h.length;i<l;i++){var n=h.charAt(i);var k=n.charCodeAt(0);if(j[k]){m=f+j[k]+g;}else{if(k>0x7F){m=b+k+g;}else{m=n;}}o+=m;}return o;},unescape:function(p,q){return p.replace(/&[#\w]+;/gi,function(r){var s=r;var r=r.substring(1,r.length-1);var t=q[r];if(t){s=String.fromCharCode(t);}else{if(r.charAt(0)==c){if(r.charAt(1).toUpperCase()==e){t=r.substring(2);if(t.match(/^[0-9A-Fa-f]+$/gi)){s=String.fromCharCode(parseInt(t,16));}}else{t=r.substring(1);if(t.match(/^\d+$/gi)){s=String.fromCharCode(parseInt(t,10));}}}}return s;});}}});})();(function(){var bU="",bT='</div>',bS='<div class="item-detail-text">',bR='<div class="item-detail-headline">',bQ="#",bP='</td>',bO="'",bN="(",bM='">',bL=" ",bv=".",bu=",'",bt=")",bs=".toggleShowItemDetails('",br='"',bq="&nbsp;",bp='<div class="item-detail-error">',bo="none",bn="</p>",bm='" onclick="',cc=')">',cd="properties",ca='>',cb="events",bX="methods",bY="mixin",bV='.togglePanelVisibility(',bW='</span>',ce="apiviewer.ObjectRegistry.getObjectFromHashCode('",cf='<td class="type">',bE='<td class="toggle">',bD="apiviewer/image/open.gif",bG='<div class="info-panel"><h2>',bF="apiviewer.dao.Node",bI="Inherited from:",bH='open.gif',bK='\'); return false;"',bJ=' title="',bC='//',bB="</span>",a="'>",b="Documentation errors:",c="<span class='",d='package',e='#',f='" onmouseup="apiviewer.TabViewController.instance.onSelectItem(\'',g='" href="',h="Included from mixin:",k=' onclick="',m=", Column:",cj="; ",ci="&#160;",ch="margin-left:18px;",cg='<td class="text">',cn=" <br/>",cm="See also:",cl="Deprecated:",ck='<a style="',cp='<img src="',co=" is deprecated!",L='apiviewer/image/',M='apiviewer/image/open.gif',J="[]",K="apiviewer.ui.panels.InfoPanel",P='close.gif',Q="_itemName",N='<',O='" alt="',H="Boolean",I="Line: ",u='<h3',t="This ",w='</h2><div></div></div>',v='<span onclick="',q="item-private",p="class",s="item-internal",r="Access:",o="interface",n='title="',V='<td class="icon" ',W='" onclick="return false;"',X='</h3>',Y="')",R=" | ",S=", ",T="private",U="Element",ba='<tr class="',bb='apiviewer/image/close.gif',E='</tr>',D="item-deprecated",C="item-protected",B='<div _itemName="',A='',z='</a></span>',y="qx.client",x="Required by:",G=')"/>',F="overlay_",bc='<img class="openclose" src="',bd="String",be="Overrides:",bf="_applyElement",bg="internal",bh='<span style="white-space: nowrap;">',bi="TBODY",bj='<div class="item-desc">',bk='<table cellspacing="0" cellpadding="0" class="info" width="100%">',bl=')"/> ',bz="abstract",by="protected",bx="webkit",bw='</table>',bA="undefined";qx.Class.define(K,{type:bz,extend:qx.core.Object,construct:function(cq,cr){qx.core.Object.call(this);this.setListName(cq);this._labelText=cr;apiviewer.ObjectRegistry.register(this);},properties:{element:{check:U,init:null,nullable:true,apply:bf},listName:{check:bd},isOpen:{check:H,init:true},docNode:{check:bF,nullable:true}},statics:{ITEM_SPEC_REGEX:/^(([\w\.]+)?(#\w+(\([^\)]*\))?)?)(\s+(.*))?$/,SENTENCE_END_REGEX:/[^\.].\.(\s|<)/,resolveLinkAttributes:function(cs,ct){var cw=/\{@link([^\}]*)\}/mg;var cv=new qx.util.StringBuilder();var cu;var cx=0;while((cu=cw.exec(cs))!=null){cv.add(cs.substring(cx,cu.index)+this.createItemLinkHtml(cu[1],ct));cx=cu.index+cu[0].length;}cv.add(cs.substring(cx,cs.length));return cv.get();},createItemLinkHtml:function(cy,cz,cA,cB){if(cA==null){cA=true;}cy=qx.lang.String.trim(cy);if(cy.charAt(0)==br||cy.charAt(0)==N){return cy;}else{var cE=this.ITEM_SPEC_REGEX.exec(cy);if(cE==null){return cy;}else{var cK=cE[2];var cS=cE[3];var cJ=cE[6];var cD=bU;if(cK==null||cK.length==0){cK=cz.getFullName();}else if(cz&&cK.indexOf(bv)==-1){var name=cz.getName();if(cz instanceof apiviewer.dao.Package){var cG=cz.getFullName();}else{var cQ=cz.getFullName();var cG=cQ.substring(0,cQ.length-name.length-1);}cK=cG+bv+cK;}if(cJ==null||cJ.length==0){cJ=cE[1];}if(cA){var cO=apiviewer.dao.Class.getClassByName(cK);if(cO){var cT;if(cS){var cI=cS.substring(1);var cM=cI.indexOf(bN);if(cM!=-1){cI=qx.lang.String.trim(cI.substring(0,cM));}cT=this.__St(cI,cO);}else{cT=cO;}if(cT){if(cT.getNodeType()!==d){cK=cT.getClass().getFullName();}var cL=apiviewer.TreeUtil.getIconUrl(cT);var cC=apiviewer.ui.ClassViewer.createImageHtml(cL);if(qx.core.Variant.isSet(y,bx)){if(cC.indexOf(F)!==-1){cD=ch;}}}}}var cR=cK+(cS?cS:bU);var cP,cH,cN;if(qx.bom.client.Engine.OPERA&&qx.bom.client.Engine.VERSION>9){cP=location.protocol;cH=location.host;cN=location.pathname;}else{cP=window.location.protocol;cH=window.location.host;cN=window.location.pathname;}var cF=[bh,(typeof cC!=bA?cC:bU),ck+cD+g+cP,bC,cH,cN,e,cR,W,f,cR,bK,bJ,cR,bM,cJ,z];return cF.join(bU);}}},createSeeAlsoHtml:function(cU){var cV=cU.getSee();if(cV.length>0){var cX=new qx.util.StringBuilder();for(var i=0;i<cV.length;i++){if(cX.length!=0){cX.add(S);}cX.add(this.createItemLinkHtml(cV[i],cU.getClass()));}if(!cX.isEmpty()){var cW=new qx.util.StringBuilder();cW.add(bR,cm,bT,bS,cX,bT);return cW.get();}}return bU;},createInheritedFromHtml:function(cY,da){if(cY.getClass().getType()!=bY&&cY.getClass()!=da){var db=new qx.util.StringBuilder(bR,bI,bT,bS,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(cY.getClass().getFullName()+bQ+cY.getName()),bT);return db.get();}else{return bU;}},createOverwriddenFromHtml:function(dc){if(dc.getOverriddenFrom()){var dd=new qx.util.StringBuilder(bR,be,bT,bS,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(dc.getOverriddenFrom().getFullName()+bQ+dc.getName()),bT);return dd.get();}else{return bU;}},createIncludedFromHtml:function(de,df){if(de.getClass()!=df){if(de.getClass().getType()==bY){var dg=new qx.util.StringBuilder(bR,h,bT,bS,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(de.getClass().getFullName()+bQ+de.getName()),bT);return dg.get();}}else{return bU;}},__St:function(dh,di){var dk=di.getItem(dh);if(dk){return dk;}else{var dl=di.getClassHierarchy();for(var i=0,l=dl.length;i<l;i++){var dj=dl[i];dk=dj.getItem(dh);if(dk){break;}}return dk;}},createDescriptionHtml:function(dm,dn,dp){var dq=dm.getDescription();if(dq){if(!dp){dq=this.__Su(dq);}return bj+this.resolveLinkAttributes(dq,dn)+bT;}else{return bU;}},__Su:function(dr){var du=dr;var dt=du.indexOf(bn);if(dt!=-1){du=du.substr(0,dt+4);var ds=this.SENTENCE_END_REGEX.exec(du);if(ds!=null){du=dr.substring(0,ds.index+ds[0].length-1)+bn;}}return du;},descriptionHasDetails:function(dv){var dw=dv.getDescription();if(dw){return this.__Su(dw)!=dw;}else{return false;}},createTypeHtml:function(dx,dy,dz){if(dz==null){dz=true;}var dF=[];var dA,dB,dC;if(dx){dF=dx.getTypes();}var dD=new qx.util.StringBuilder();if(dF.length==0){dD.add(dy);}else{if(dF.length>1){dD.add(bN);}for(var j=0;j<dF.length;j++){if(j>0){dD.add(R);}dB=dF[j].type;dA=dF[j].dimensions;if(apiviewer.ui.ClassViewer.PRIMITIVES[dB]){dD.add(dB);}else{dC=dB;if(dz){var dE=dB.lastIndexOf(bv);if(dE!=-1){dC+=bL+dB.substring(dE+1);}}dD.add(apiviewer.ui.panels.InfoPanel.createItemLinkHtml(dC,dx.getClass(),false,true));}if(dA){for(var i=0;i<parseInt(dA);i++){dD.add(J);}}}if(dF.length>1){dD.add(bt);}}return dD.get();},createErrorHtml:function(dG,dH){var dI=dG.getDocNode();var dJ=dI.getErrors();if(dJ.length>0){var dK=new qx.util.StringBuilder(bp,b,bT);for(var i=0;i<dJ.length;i++){dK.add(bS,dJ[i].attributes.msg,cn);dK.add(bN);if(dG.getClass()!=dH){dK.add(dG.getClass().getFullName(),cj);}dK.add(I,dJ[i].attributes.line,m,dJ[i].attributes.column+bt,bT);}return dK.get();}else{return bU;}},createDeprecationHtml:function(dL,dM){if(!dL.isDeprecated()){return bU;}var dN=new qx.util.StringBuilder();dN.add(bp,cl,bT);dN.add(bS);var dO=dL.getDeprecationText();if(dO){dN.add(dO);}else{dN.add(t,dM,co);}dN.add(bT);return dN.get();},createAccessHtml:function(dP){if(dP.isPublic()){return bU;}var dR=new qx.util.StringBuilder();dR.add(bR,r,bT);dR.add(bS);var dQ=[];if(dP.isPrivate()){dQ.push(T);}if(dP.isInternal()){dQ.push(bg);}if(dP.isProtected()){dQ.push(by);}dR.add(dQ.join(bL));dR.add(bT);return dR.get();},createInfoRequiredByHtml:function(dS){var dU=new qx.util.StringBuilder();var dT=dS.getRequiredBy();if(dT.length>0){dU.add(bR,x,bT);for(var i=0;i<dT.length;i++){dU.add(bS,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(dT[i].getFullName()+bQ+dS.getName()),bT);}}return dU.get();},setTitleClass:function(dV,dW){var dX=[c,bU,a,dW,bB];dX[1]=this.getItemCssClasses(dV);return dX.join(bU);},getItemCssClasses:function(dY){var ea=[];if(dY.isDeprecated()){ea.push(D);}if(dY.isPrivate()){ea.push(q);}if(dY.isInternal()){ea.push(s);}if(dY.isProtected()){ea.push(C);}return ea.join(bL);}},members:{canDisplayItem:function(eb){return (eb.getListName()==this.getListName());},getItemTypeHtml:function(ec,ed){throw new Error("Abstract method called!");},getItemTitleHtml:function(ee,ef){throw new Error("Abstract method called!");},getItemTextHtml:function(eg,eh,ei){throw new Error("Abstract method called!");},getItemTooltip:function(ej,ek){return bU;},getItemHtml:function(el,em,en){if((el instanceof apiviewer.dao.Class)||el instanceof apiviewer.dao.Package){var es=el.getPackage();}else{var es=el.getClass();}var er=new qx.util.StringBuilder();var et=(es!=em)&&es.getType()==p;var eq=apiviewer.TreeUtil.getIconUrl(el,et);er.add(ba,apiviewer.ui.panels.InfoPanel.getItemCssClasses(el),bM);var eu=this.getItemTooltip(el,em);var ep=eu?n+eu+O+eu+br:A;er.add(V,ep,ca,apiviewer.ui.ClassViewer.createImageHtml(eq),bP);var eo=this.getItemTypeHtml(el,em);er.add(cf,((eo)?(eo+bq):bq),bP);er.add(bE);if(this.itemHasDetails(el,em)){er.add(cp,qx.util.ResourceManager.getInstance().toUri(bD),bm,this.__Sv(this),bs,el.getName(),bO,((es!=em)?bu+es.getFullName()+bO:bU),G);}else{er.add(ci);}er.add(bP);er.add(cg);er.add(u);if(this.itemHasDetails(el,em)){er.add(k,this.__Sv(this),bs,el.getName(),bO,((es!=em)?bu+es.getFullName()+bO:bU),cc);}else{er.add(ca);}er.add(this.getItemTitleHtml(el,em));er.add(X);er.add(B,el.getName(),bM);er.add(this.getItemTextHtml(el,em,en));er.add(bT);er.add(bP);er.add(E);return er.get();},itemHasDetails:qx.lang.Function.returnTrue,__Sv:function(ev){return ce+ev.toHashCode()+Y;},getPanelHtml:function(ew){var ey=this._labelText.charAt(0).toUpperCase()+this._labelText.substring(1);var ex=new qx.util.StringBuilder(bG);ex.add(bc,qx.util.ResourceManager.getInstance().toUri(L+(this.getIsOpen()?P:bH)),bm,this.__Sv(ew),bV+this.__Sv(this),bl,v,this.__Sv(ew),bV,this.__Sv(this),cc,ey,bW);ex.add(w);return ex.get();},_getPanelItems:function(ez,eA){if(!eA){return [];}var eB=this.getListName();var eD=[];var eG={};if(ez&&(eB==cb||eB==cd||eB==bX)){if(eA.getType()==o){var eE=eA.getInterfaceHierarchy();}else{var eE=eA.getClassHierarchy();}}else{eE=[eA];}for(var eH=0;eH<eE.length;eH++){var eF=eE[eH];var eC=eF.getItemList(eB);if(eB==cb||eB==cd||eB==bX){qx.lang.Array.append(eC,eF.getNodesOfTypeFromMixins(this.getListName()));}for(var i=0;i<eC.length;i++){var name=eC[i].getName();if(!(Object.prototype.hasOwnProperty.call(eG,name))){eG[name]=eF;eD.push(eC[i]);}}}return eD;},__Sw:function(eI,eJ,eK,eL,eM){var eO=eI.concat();for(var i=eI.length-1;i>=0;i--){var eN=eI[i];if(eN.isPropertyGenerated()&&!eJ){qx.lang.Array.removeAt(eO,i);}else if(eN.isPrivate()&&!eL){qx.lang.Array.removeAt(eO,i);}else if(eN.isProtected()&&!eK){qx.lang.Array.removeAt(eO,i);}else if(eN.isInternal()&&!eM){qx.lang.Array.removeAt(eO,i);}}return eO;},_sortItems:function(eP){eP.sort(function(eQ,eR){var eU=0;if(eQ.isInternal()){eU+=4;}if(eQ.isPrivate()){eU+=2;}if(eQ.isProtected()){eU+=1;}var eT=0;if(eR.isInternal()){eT+=4;}if(eR.isPrivate()){eT+=2;}if(eR.isProtected()){eT+=1;}if(eU==eT){var eV=eQ.getName();var eS=eR.getName();return eV.toLowerCase()<eS.toLowerCase()?-1:1;}else{return eU-eT;}});},_displayNodes:function(eW,eX){if(eW&&eW.length>0){var eY=new qx.util.StringBuilder(bk);for(var i=0;i<eW.length;i++){eY.add(this.getItemHtml(eW[i],eX,false));}eY.add(bw);this.getBodyElement().innerHTML=eY.get();apiviewer.ui.AbstractViewer.fixLinks(this.getBodyElement());apiviewer.ui.AbstractViewer.highlightCode(this.getBodyElement());this.getBodyElement().style.display=!this.getIsOpen()?bo:bU;this.getElement().style.display=bU;}else{this.getElement().style.display=bo;}},update:function(fa,fb){if(!this.getElement()){return;}this.setDocNode(fb);var ff=fa.getShowInherited();var fc=this._getPanelItems(ff,fb);if(fc&&fc.length>0){var fh=fa.getExpandProperties();var fd=fa.getShowProtected();var fg=fa.getShowPrivate();var fe=fg;fc=this.__Sw(fc,fh,fd,fg,fe);this._sortItems(fc);}this._displayNodes(fc,fb);},_applyElement:function(fi){this._titleElement=fi.firstChild;this._bodyElement=fi.lastChild;},getTitleElement:function(){return this._titleElement;},getBodyElement:function(){return this._bodyElement;},getItemElement:function(name){var fj=this.getBodyElement().getElementsByTagName(bi)[0].childNodes;for(var i=0;i<fj.length;i++){if(fj[i].childNodes[3].childNodes[1].getAttribute(Q)==name){return fj[i].childNodes[3].childNodes[1];}}},toggleShowItemDetails:function(fk,fl){try{var fn=this.getItemElement(fk);if(!fn){throw Error("Element for name '"+fk+"' not found!");}var fm=fn._showDetails?!fn._showDetails:true;fn._showDetails=fm;if(fl){var fq=apiviewer.dao.Class.getClassByName(fl);}else{fq=this.getDocNode();}var fo=fq.getItemByListAndName(this.getListName(),fk);var fp=fn.parentNode.previousSibling.firstChild;fp.src=qx.util.ResourceManager.getInstance().toUri(fm?bb:M);fn.innerHTML=this.getItemTextHtml(fo,this.getDocNode(),fm);apiviewer.ui.AbstractViewer.fixLinks(fn);apiviewer.ui.AbstractViewer.highlightCode(fn);}catch(fr){this.error("Toggling item details failed");this.error(fr);}}},destruct:function(){this._titleElement=this._bodyElement=null;}});})();(function(){var k='</div>',j='<div class="item-detail-text">',h='<div class="item-detail-headline">',g='</span>',f="var",e='<span class="parameter-type">',d=" ",c="function",b='</span> <code>',a="<code>",D="Parameters:",C="Throws:",B="Apply method of property:",A='</code>',z=") ",y="</code>",x="apiviewer.ui.panels.MethodPanel",w="void",v='<span class="method-signature"><span class="parenthesis">(</span>',u="Returns:",r=" (default: ",s="[]",p='<span class="separator">,</span> ',q='<span class="parenthesis">)</span></span>',n="Creates a new instance of ",o='<span class="item-detail-optional">',l="?",m="abstract ",t=".";qx.Class.define(x,{extend:apiviewer.ui.panels.InfoPanel,members:{getItemTitleHtml:function(E){if(E.isConstructor()){var I=E.getClass().getName();}else{I=E.getName();}var F=new qx.util.StringBuilder(apiviewer.ui.panels.InfoPanel.setTitleClass(E,I));F.add(v);var G=E.getParams();for(var i=0;i<G.length;i++){var H=G[i];if(i!=0){F.add(p);}F.add(e,apiviewer.ui.panels.InfoPanel.createTypeHtml(H,f),b,H.getName(),A);if(H.getDefaultValue()){F.add(l);}}F.add(q);return F.get();},getItemTypeHtml:function(J){var K=new qx.util.StringBuilder();if(J.isAbstract()){K.add(m);}if(!J.isConstructor()){K.add(apiviewer.ui.panels.InfoPanel.createTypeHtml(J.getDocNode().getReturn(),w));}return K.get();},getItemTextHtml:function(L,M,N){var U=L.getClass();var X=new qx.util.StringBuilder();if(L.isConstructor()&&!L.getDescription()){X.add(n,U.getName(),t);}else{X.add(apiviewer.ui.panels.InfoPanel.createDescriptionHtml(L,U,N));}if(N){var V=L.getDocNode().getParams();if(V.length>0){X.add(h,D,k);for(var i=0;i<V.length;i++){var R=V[i];var O=R.getType()?R.getType():f;var T=R.getArrayDimensions();if(T){for(var i=0;i<T;i++){O+=s;}}var Y=R.getDefaultValue();X.add(j);if(Y){X.add(o);}X.add(a,R.getName(),y);if(Y){X.add(r,Y,z,g);}var ba=R.getDescription();if(ba){X.add(d,apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(ba,U));}X.add(k);}}var P=L.getDocNode().getReturn();if(P){var ba=P.getDescription();if(ba){X.add(h,u,k,j,apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(ba,U),k);}}if(L.getApply()){X.add(h,B,k,j,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(L.getApply(),L.getClass(),true,true),k);}var S=L.getDocNode().getThrows();if(S.length>0){X.add(h,C,k);for(var i=0;i<S.length;i++){var W=S[i];var Q=W.getType()?W.getType():W.getDefaultType();X.add(j);X.add(e,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(Q),g);var ba=W.getDescription();if(ba){X.add(d,apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(ba,U));}X.add(k);}}X.add(apiviewer.ui.panels.InfoPanel.createAccessHtml(L));X.add(apiviewer.ui.panels.InfoPanel.createIncludedFromHtml(L,M));X.add(apiviewer.ui.panels.InfoPanel.createOverwriddenFromHtml(L));X.add(apiviewer.ui.panels.InfoPanel.createInheritedFromHtml(L,M));X.add(apiviewer.ui.panels.InfoPanel.createInfoRequiredByHtml(L));X.add(apiviewer.ui.panels.InfoPanel.createSeeAlsoHtml(L));X.add(apiviewer.ui.panels.InfoPanel.createErrorHtml(L,M));X.add(apiviewer.ui.panels.InfoPanel.createDeprecationHtml(L,c));}return X.get();},itemHasDetails:function(bb,bc){var bd=bb.getDocNode();var be=bd.getReturn()&&bd.getReturn().getDescription();return (bb.getClass()!=bc||bb.getOverriddenFrom()!=null||bb.getRequiredBy().length>0||bd.getParams().length>0||bd.getThrows().length>0||be||bb.getSee().length>0||bb.getErrors().length>0||bb.isDeprecated()||bb.getApply()||apiviewer.ui.panels.InfoPanel.descriptionHasDetails(bb));}}});})();(function(){var h="",g="deprecated",f="internal",e="protected",d="errors",c="apiviewer.dao.Node",b="string",a="private";qx.Class.define(c,{extend:qx.core.Object,construct:function(j){qx.core.Object.call(this);this._docNode=j;j.children=j.children||[];j.attributes=j.attributes||{};j.cls=this;this._initializeFields();for(var i=0;i<j.children.length;i++){var k=j.children[i];if(!this._addChildNode(k)){throw new Error("Unknown child type: "+k.type+" node: "+qx.util.Json.stringify(k));}}},members:{getNode:function(){return this._docNode;},getNodeType:function(){return this._docNode.type;},getErrors:function(){return this._errors;},getDeprecationText:function(){return this._deprecated||h;},isDeprecated:function(){return typeof (this._deprecated)==b?true:false;},isInternal:function(){return this._docNode.attributes.access==f;},isPrivate:function(){return this._docNode.attributes.access==a;},isProtected:function(){return this._docNode.attributes.access==e;},isPropertyGenerated:function(){return this._docNode.attributes.fromProperty!=null;},isPublic:function(){return (!this.isPrivate()&&!this.isProtected()&&!this.isInternal());},hasWarning:function(){return this._docNode.attributes.hasWarning||false;},_createNodeList:function(l,m,n,o){if(m){var p=[];for(var i=0;i<l.children.length;i++){p.push(new m(l.children[i],n,o));}return p;}else{return l.children;}},_initializeFields:function(){this._errors=[];},_addChildNode:function(q){switch(q.type){case g:this._deprecated=q.children?q.children[0].attributes.text||h:h;break;case d:this._errors=this._createNodeList(q);break;default:return false;}return true;}},destruct:function(){this._docNode=this._errors=null;}});})();(function(){var k="",h="getClasses",g="getPackages",f="functions",e="getFunctions",d="packages",c="desc",b="classes",a="apiviewer.dao.Package";qx.Class.define(a,{extend:apiviewer.dao.Node,construct:function(l,m){apiviewer.dao.Node.call(this,l);this._package=m;apiviewer.dao.Class.registerClass(this);},members:{getName:function(){return this._docNode.attributes.name;},getFullName:function(){return this._docNode.attributes.fullName||k;},getDescription:function(){return this._desc||k;},getClasses:function(){return this._classes;},getFunctions:function(){return this._functions;},getPackages:function(){return this._packages;},getPackage:function(){return this._package;},addClass:function(n){var o=n.getFullName();var p=this.getClasses();for(var i=0;i<p.length;i++){if(p[i].getFullName()==o){p[i]=n;return;}}p.push(n);},getItem:function(q){var r=[h,g];for(var i=0;i<r.length;i++){var s=this[r[i]]();for(var j=0;j<s.length;j++){if(q==s[j].getName()){return s[j];}}}},getItemList:function(t){var u={"classes":h,"packages":g,"functions":e};return this[u[t]]();},getItemByListAndName:function(v,w){var x=this.getItemList(v);for(var j=0;j<x.length;j++){if(w==x[j].getName()){return x[j];}}},_initializeFields:function(){apiviewer.dao.Node.prototype._initializeFields.call(this);this._classes=[];this._packages=[];this._functions=[];},_addChildNode:function(y){switch(y.type){case b:this._classes=this._createNodeList(y,apiviewer.dao.Class,this);break;case f:this._functions=this._createNodeList(y,apiviewer.dao.Method,this);break;case d:this._packages=this._createNodeList(y,apiviewer.dao.Package,this);break;case c:this._desc=y.attributes.text||k;break;default:return apiviewer.dao.Node.prototype._addChildNode.call(this,y);}return true;}},destruct:function(){this._package=this._classes=this._functions=this._packages=null;}});})();(function(){var n=",",m="",k="string",j="null",h='"',g=':',f="qx.jsonDebugging",e='-',d='\\u00',c="__qL",N="new Date(Date.UTC(",M='\\\\',L='\\f',K='\\"',J='Z',I="))",H="__qB",G="__qD",F="}",E='(',u='.',v="{",s='\\r',t=":",q='\\t',r="]",o="[",p="__qE",w="qx.jsonEncodeUndefined",x='T',z='\\b',y="__qC",B="qx.util.Json",A=')',D='\\n',C="__qM";qx.Class.define(B,{statics:{__qz:null,BEAUTIFYING_INDENT:" ",BEAUTIFYING_LINE_END:"\n",CONVERT_DATES:null,__qA:{"function":H,"boolean":y,"number":G,"string":p,"object":c,"undefined":C},__qB:function(O,P){return String(O);},__qC:function(Q,R){return String(Q);},__qD:function(S,T){return isFinite(S)?String(S):j;},__qE:function(U,V){var W;if(/["\\\x00-\x1f]/.test(U)){W=U.replace(/([\x00-\x1f\\"])/g,qx.util.Json.__qG);}else{W=U;}return h+W+h;},__qF:{'\b':z,'\t':q,'\n':D,'\f':L,'\r':s,'"':K,'\\':M},__qG:function(a,b){var X=qx.util.Json.__qF[b];if(X){return X;}X=b.charCodeAt();return d+Math.floor(X/16).toString(16)+(X%16).toString(16);},__qH:function(Y,ba){var bc=[],bf=true,be,bb;var bd=qx.util.Json.__qO;bc.push(o);if(bd){qx.util.Json.__qI+=qx.util.Json.BEAUTIFYING_INDENT;bc.push(qx.util.Json.__qI);}for(var i=0,l=Y.length;i<l;i++){bb=Y[i];be=this.__qA[typeof bb];if(be){bb=this[be](bb,i+m);if(typeof bb==k){if(!bf){bc.push(n);if(bd){bc.push(qx.util.Json.__qI);}}bc.push(bb);bf=false;}}}if(bd){qx.util.Json.__qI=qx.util.Json.__qI.substring(0,qx.util.Json.__qI.length-qx.util.Json.BEAUTIFYING_INDENT.length);bc.push(qx.util.Json.__qI);}bc.push(r);return bc.join(m);},__qJ:function(bg,bh){if(!qx.util.Json.CONVERT_DATES){if(bg.toJSON&&!qx.bom.client.Engine.OPERA){return bg.toJSON();}var bi=qx.util.format.NumberFormat.getInstance();bi.setMinimumIntegerDigits(2);var bk=bg.getUTCFullYear()+e+bi.format(bg.getUTCMonth()+1)+e+bi.format(bg.getUTCDate())+x+bi.format(bg.getUTCHours())+g+bi.format(bg.getUTCMinutes())+g+bi.format(bg.getUTCSeconds())+u;bi.setMinimumIntegerDigits(3);return bk+bi.format(bg.getUTCMilliseconds())+J;}else{var bj=bg.getUTCFullYear()+n+bg.getUTCMonth()+n+bg.getUTCDate()+n+bg.getUTCHours()+n+bg.getUTCMinutes()+n+bg.getUTCSeconds()+n+bg.getUTCMilliseconds();return N+bj+I;}},__qK:function(bl,bm){var bp=[],br=true,bo,bn;var bq=qx.util.Json.__qO;bp.push(v);if(bq){qx.util.Json.__qI+=qx.util.Json.BEAUTIFYING_INDENT;bp.push(qx.util.Json.__qI);}for(var bm in bl){bn=bl[bm];bo=this.__qA[typeof bn];if(bo){bn=this[bo](bn,bm);if(typeof bn==k){if(!br){bp.push(n);if(bq){bp.push(qx.util.Json.__qI);}}bp.push(this.__qE(bm),t,bn);br=false;}}}if(bq){qx.util.Json.__qI=qx.util.Json.__qI.substring(0,qx.util.Json.__qI.length-qx.util.Json.BEAUTIFYING_INDENT.length);bp.push(qx.util.Json.__qI);}bp.push(F);return bp.join(m);},__qL:function(bs,bt){if(bs){if(qx.lang.Type.isFunction(bs.toJSON)&&bs.toJSON!==this.__qz){return this.__qN(bs.toJSON(bt),bt);}else if(qx.lang.Type.isDate(bs)){return this.__qJ(bs,bt);}else if(qx.lang.Type.isArray(bs)){return this.__qH(bs,bt);}else if(qx.lang.Type.isObject(bs)){return this.__qK(bs,bt);}return m;}return j;},__qM:function(bu,bv){if(qx.core.Setting.get(w)){return j;}},__qN:function(bw,bx){return this[this.__qA[typeof bw]](bw,bx);},stringify:function(by,bz){this.__qO=bz;this.__qI=this.BEAUTIFYING_LINE_END;var bA=this.__qN(by,m);if(typeof bA!=k){bA=null;}if(qx.core.Setting.get(f)){qx.log.Logger.debug(this,"JSON request: "+bA);}return bA;},parse:function(bB,bC){if(bC===undefined){bC=true;}if(qx.core.Setting.get(f)){qx.log.Logger.debug(this,"JSON response: "+bB);}if(bC){if(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(bB.replace(/"(\\.|[^"\\])*"/g,m))){throw new Error("Could not parse JSON string!");}}try{var bD=(bB&&bB.length>0)?eval(E+bB+A):null;return bD;}catch(bE){throw new Error("Could not evaluate JSON string: "+bE.message);}}},settings:{"qx.jsonEncodeUndefined":true,"qx.jsonDebugging":false},defer:function(bF){bF.__qz=Date.prototype.toJSON;}});})();(function(){var a="qx.util.format.IFormat";qx.Interface.define(a,{members:{format:function(b){},parse:function(c){}}});})();(function(){var t="",s="Number",r="-",q="0",p="String",o="changeNumberFormat",n='(',m="g",l="Boolean",k="$",d="NaN",j='([0-9]{1,3}(?:',g='{0,1}[0-9]{3}){0,})',c='\\d+){0,1}',b="qx.util.format.NumberFormat",f="Infinity",e="^",h=".",a="-Infinity",i='([-+]){0,1}';qx.Class.define(b,{extend:qx.core.Object,implement:qx.util.format.IFormat,construct:function(u){qx.core.Object.call(this);this.__ro=u;},statics:{getIntegerInstance:function(){var v=qx.util.format.NumberFormat;if(v._integerInstance==null){v._integerInstance=new v();v._integerInstance.setMaximumFractionDigits(0);}return v._integerInstance;},getInstance:function(){if(!this._instance){this._instance=new this;}return this._instance;}},properties:{minimumIntegerDigits:{check:s,init:0},maximumIntegerDigits:{check:s,nullable:true},minimumFractionDigits:{check:s,init:0},maximumFractionDigits:{check:s,nullable:true},groupingUsed:{check:l,init:true},prefix:{check:p,init:t,event:o},postfix:{check:p,init:t,event:o}},members:{__ro:null,format:function(w){switch(w){case Infinity:return f;case -Infinity:return a;case NaN:return d;}var A=(w<0);if(A){w=-w;}if(this.getMaximumFractionDigits()!=null){var H=Math.pow(10,this.getMaximumFractionDigits());w=Math.round(w*H)/H;}var G=String(Math.floor(w)).length;var x=t+w;var D=x.substring(0,G);while(D.length<this.getMinimumIntegerDigits()){D=q+D;}if(this.getMaximumIntegerDigits()!=null&&D.length>this.getMaximumIntegerDigits()){D=D.substring(D.length-this.getMaximumIntegerDigits());}var C=x.substring(G+1);while(C.length<this.getMinimumFractionDigits()){C+=q;}if(this.getMaximumFractionDigits()!=null&&C.length>this.getMaximumFractionDigits()){C=C.substring(0,this.getMaximumFractionDigits());}if(this.getGroupingUsed()){var z=D;D=t;var F;for(F=z.length;F>3;F-=3){D=t+qx.locale.Number.getGroupSeparator(this.__ro)+z.substring(F-3,F)+D;}D=z.substring(0,F)+D;}var B=this.getPrefix()?this.getPrefix():t;var y=this.getPostfix()?this.getPostfix():t;var E=B+(A?r:t)+D;if(C.length>0){E+=t+qx.locale.Number.getDecimalSeparator(this.__ro)+C;}E+=y;return E;},parse:function(I){var N=qx.lang.String.escapeRegexpChars(qx.locale.Number.getGroupSeparator(this.__ro)+t);var L=qx.lang.String.escapeRegexpChars(qx.locale.Number.getDecimalSeparator(this.__ro)+t);var J=new RegExp(e+qx.lang.String.escapeRegexpChars(this.getPrefix())+i+j+N+g+n+L+c+qx.lang.String.escapeRegexpChars(this.getPostfix())+k);var M=J.exec(I);if(M==null){throw new Error("Number string '"+I+"' does not match the number format");}var O=(M[1]==r);var Q=M[2];var P=M[3];Q=Q.replace(new RegExp(N,m),t);var K=(O?r:t)+Q;if(P!=null&&P.length!=0){P=P.replace(new RegExp(L),t);K+=h+P;}return parseFloat(K);}}});})();(function(){var d="cldr_number_decimal_separator",c="cldr_number_percent_format",b="qx.locale.Number",a="cldr_number_group_separator";qx.Class.define(b,{statics:{getDecimalSeparator:function(e){return qx.locale.Manager.getInstance().localize(d,[],e);},getGroupSeparator:function(f){return qx.locale.Manager.getInstance().localize(a,[],f);},getPercentFormat:function(g){return qx.locale.Manager.getInstance().localize(c,[],g);}}});})();(function(){var m="",k=",",h="constructor",g="appearances",f="getAppearances",e="getStatics",d="getChildControls",c="constants",b="getProperties",a="methods",D="properties",C="getEvents",B="getMembers",A="events",z="methods-static",y="getConstants",x="apiviewer.dao.Class",w="superMixins",v="childControls",u="class",s="_constructor",t="desc",q="see",r="getConstructor",o="getSuperInterfaces",p="superInterfaces",n="getSuperMixins";qx.Class.define(x,{extend:apiviewer.dao.Node,construct:function(E,F){apiviewer.dao.Node.call(this,E);this.self(arguments).registerClass(this);this._package=F;},statics:{_class_registry:{},_top_level_classes:[],registerClass:function(G){if(!G.getFullName()){return;}this._class_registry[G.getFullName()]=G;if(!G._docNode.attributes.superClass){this._top_level_classes.push(G);}},getClassByName:function(H){return this._class_registry[H];},getAllTopLevelClasses:function(){return this._top_level_classes;}},members:{getName:function(){return this._docNode.attributes.name;},getClass:function(){return this;},getPackage:function(){return this._package;},isLoaded:function(){return this._docNode.attributes.externalRef!=true;},getFullName:function(){return this._docNode.attributes.fullName||m;},getPackageName:function(){return this._docNode.attributes.packageName||m;},getDescription:function(){return this._desc||m;},getType:function(){return this._docNode.attributes.type||u;},isAbstract:function(){return this._docNode.attributes.isAbstract||false;},isStatic:function(){return this._docNode.attributes.isStatic||false;},isSingleton:function(){return this._docNode.attributes.isSingleton||false;},getSee:function(){return this._see;},getSuperClass:function(){return this.self(arguments).getClassByName(this._docNode.attributes.superClass);},getChildClasses:function(){return this._docNode.attributes.childClasses?this._docNode.attributes.childClasses.split(k):[];},getInterfaces:function(){return this._docNode.attributes.interfaces?this._docNode.attributes.interfaces.split(k):[];},getMixins:function(){return this._docNode.attributes.mixins?this._docNode.attributes.mixins.split(k):[];},getImplementations:function(){return this._docNode.attributes.implementations?this._docNode.attributes.implementations.split(k):[];},getIncluder:function(){return this._docNode.attributes.includer?this._docNode.attributes.includer.split(k):[];},getConstructor:function(){if(this._constructor!=null){return this._constructor;}var I=apiviewer.TreeUtil.getChild(this.getNode(),h);if(I){this._constructor=new apiviewer.dao.Method(I.children[0],this,I.type);}else{this._constructor=m;var K=this.getSuperClass();while(K){var J=K.getConstructor();if(J){var I=J.getNode();this._constructor=new apiviewer.dao.Method(I,this,h);break;}K=K.getSuperClass();}}return this._constructor;},getMembers:function(){if(this._members!=null){return this._members;}else{var L=apiviewer.TreeUtil.getChild(this.getNode(),a);this._members=L?this._createNodeList(L,apiviewer.dao.Method,this,L.type):[];return this._members;}},getStatics:function(){if(this._statics!=null){return this._statics;}else{var M=apiviewer.TreeUtil.getChild(this.getNode(),z);this._statics=M?this._createNodeList(M,apiviewer.dao.Method,this,M.type):[];return this._statics;}},getEvents:function(){if(this._events!=null){return this._events;}else{var N=apiviewer.TreeUtil.getChild(this.getNode(),A);this._events=N?this._createNodeList(N,apiviewer.dao.Event,this,N.type):[];return this._events;}},getProperties:function(){if(this._properties!=null){return this._properties;}else{var O=apiviewer.TreeUtil.getChild(this.getNode(),D);this._properties=O?this._createNodeList(O,apiviewer.dao.Property,this,O.type):[];return this._properties;}},getConstants:function(){if(this._constants!=null){return this._constants;}else{var P=apiviewer.TreeUtil.getChild(this.getNode(),c);this._constants=P?this._createNodeList(P,apiviewer.dao.Constant,this,P.type):[];return this._constants;}},getAppearances:function(){if(this._appearances!=null){return this._appearances;}else{var Q=apiviewer.TreeUtil.getChild(this.getNode(),g);this._appearances=Q?this._createNodeList(Q,apiviewer.dao.Appearance,this,Q.type):[];return this._appearances;}},getSuperInterfaces:function(){return this._superInterfaces;},getSuperMixins:function(){return this._superMixins;},getChildControls:function(){return this._childControls;},getClassHierarchy:function(){var S=[];var R=this;while(R){S.push(R);R=R.getSuperClass();}return S;},getInterfaceHierarchy:function(){var W=this;var U=[W];var V=W.getSuperInterfaces();while(V&&V.length>0){for(var i=0,l=V.length;i<l;i++){var T=apiviewer.dao.Class.getClassByName(V[i].getName());U.push(T);V=T.getSuperInterfaces();}}return U;},getItem:function(X){var Y=[B,e,C,b,y,f,d];for(var i=0;i<Y.length;i++){var ba=this[Y[i]]();for(var j=0;j<ba.length;j++){if(X==ba[j].getName()){return ba[j];}}}},getItemList:function(bb){var bc={"events":C,"constructor":r,"properties":b,"methods":B,"methods-static":e,"constants":y,"appearances":f,"superInterfaces":o,"superMixins":n,"childControls":d};if(bb==h){return this.getConstructor()?[this.getConstructor()]:[];}else{return this[bc[bb]]();}},getItemByListAndName:function(bd,be){var bf=this.getItemList(bd);for(var j=0;j<bf.length;j++){if(be==bf[j].getName()){return bf[j];}}},getClassAppearance:function(){var bg=this.getAppearances();for(var i=0;i<bg.length;i++){if(bg[i].getType()==this){return bg[i];}}return null;},getAllInterfaces:function(bh){if(bh){var bk=this.getClassHierarchy();}else{bk=[this];}var bn=[];for(var bm=0;bm<bk.length;bm++){var bl=bk[bm];var bi=function(bo){var bp=apiviewer.dao.Class.getClassByName(bo);bn.push(bp);var bq=bp.getSuperInterfaces();for(var i=0;i<bq.length;i++){bi(bq[i].getName());}};var bj=bl.getInterfaces();for(var i=0;i<bj.length;i++){bi(bj[i]);}}return bn;},getNodesOfTypeFromMixins:function(br){var bu=this.getMixins();var bv=[];for(var bw=0;bw<bu.length;bw++){var bs=function(bx){var by=bx.getItemList(br);for(var i=0;i<by.length;i++){bv.push(by[i]);}var bz=bx.getSuperMixins();for(var i=0;i<bz.length;i++){bs(apiviewer.dao.Class.getClassByName(bz[i].getName()));}};var bt=apiviewer.dao.Class.getClassByName(bu[bw]);bs(bt);}return bv;},getDependendClasses:function(){return this._findClasses(this,[]);},getDocNode:function(){return this;},_findClasses:function(bA,bB){bB.push(bA);var bJ=bA.getSuperClass();if(bJ){this._findClasses(bJ,bB);}var bG=bA.getMixins();for(var i=0;i<bG.length;i++){var bK=apiviewer.dao.Class.getClassByName(bG[i]);if(bK){this._findClasses(bK,bB);}else{this.warn("Missing mixin: "+bG[i]);}}var bH=bA.getSuperMixins();for(var i=0;i<bH.length;i++){var bI=apiviewer.dao.Class.getClassByName(bH[i]);if(bI){this._findClasses(bI,bB);}else{this.warn("Missing super mixin: "+bH[i]);}}var bF=bA.getInterfaces();for(var i=0;i<bF.length;i++){var bD=apiviewer.dao.Class.getClassByName(bF[i]);if(bD){this._findClasses(bD,bB);}else{this.warn("Missing interface: "+bF[i]);}}var bE=bA.getSuperInterfaces();for(var i=0;i<bE.length;i++){var bC=apiviewer.dao.Class.getClassByName(bE[i]);if(bC){this._findClasses(bC,bB);}else{this.warn("Missing super interface: "+bE[i]);}}return bB;},_initializeFields:function(){apiviewer.dao.Node.prototype._initializeFields.call(this);this._desc=m;this._see=[];this._superInterfaces=[];this._superMixins=[];this._childControls=[];},_addChildNode:function(bL){switch(bL.type){case h:case a:case z:case A:case D:case c:case g:break;case p:this._superInterfaces=this._createNodeList(bL,apiviewer.dao.ClassItem,this,bL.type);break;case w:this._superMixins=this._createNodeList(bL,apiviewer.dao.ClassItem,this,bL.type);break;case v:this._childControls=this._createNodeList(bL,apiviewer.dao.ChildControl,this,bL.type);break;case t:this._desc=bL.attributes.text||m;break;case q:this._see.push(bL.attributes.name);break;default:return apiviewer.dao.Node.prototype._addChildNode.call(this,bL);}return true;}},destruct:function(){this._see=this._superInterfaces=this._superMixins=this._events=this._statics=this._properties=this._constants=this._appearances=this._members=this._package=null;this._disposeObjects(s);}});})();(function(){var f="",e="name",d="desc",c="see",b="types",a="apiviewer.dao.ClassItem";qx.Class.define(a,{extend:apiviewer.dao.Node,construct:function(g,h,k){this._class=h;this._listName=k;apiviewer.dao.Node.call(this,g);},members:{getClass:function(){return this._class;},getName:function(){return this._docNode.attributes.name;},getListName:function(){return this._listName;},getDescription:function(){return this.getDocNode()._desc||f;},getTypes:function(){var m=[];for(var i=0;i<this._types.length;i++){var l={};if(this._types[i].attributes.dimensions){l.dimensions=this._types[i].attributes.dimensions;}l.type=this._types[i].attributes.type;m.push(l);}return m;},getSee:function(){return this._see;},getOverriddenFrom:function(){return apiviewer.dao.Class.getClassByName(this._docNode.attributes.overriddenFrom);},getDocNode:function(){if(this._itemDocNode){return this._itemDocNode;}this._itemDocNode=this;var n=apiviewer.dao.Class.getClassByName(this._docNode.attributes.docFrom);if(n){var o=n.getItemList(this._listName);for(var i=0;i<o.length;i++){if(o[i].getName()==this.getName()){this._itemDocNode=o[i];break;}}}return this._itemDocNode;},isRequiredByInterface:function(p){var r=apiviewer.TreeUtil.getChild(p.getNode(),this._listName);if(r){var q=apiviewer.TreeUtil.getChildByAttribute(r,e,this.getName());return q?true:false;}return false;},getRequiredBy:function(){if(this._requiredBy){return this._requiredBy;}var s=[];var t=this.getClass().getAllInterfaces(true);for(var j=0;j<t.length;j++){if(this.isRequiredByInterface(t[j])){s.push(t[j]);}}this._requiredBy=s;return s;},_initializeFields:function(){apiviewer.dao.Node.prototype._initializeFields.call(this);this._see=[];this._types=[];},_addChildNode:function(u){switch(u.type){case d:this._desc=u.attributes.text||f;break;case c:this._see.push(u.attributes.name);break;case b:this._types=this._createNodeList(u);break;default:return apiviewer.dao.Node.prototype._addChildNode.call(this,u);}return true;}},destruct:function(){this._class=this._itemDocNode=this._requiredBy=this._see=this._types=null;}});})();(function(){var h="params",g="return",f="throws",e="",d="apiviewer.dao.Method",c="_return",b="construct",a="properties";qx.Class.define(d,{extend:apiviewer.dao.ClassItem,construct:function(i,j,k){apiviewer.dao.ClassItem.call(this,i,j,k);},members:{getName:function(){if(this.isConstructor()){return b;}else{return this._docNode.attributes.name;}},isStatic:function(){return this._docNode.attributes.isStatic||false;},isAbstract:function(){return this._docNode.attributes.isAbstract||false;},isConstructor:function(){return this._docNode.attributes.isCtor||false;},isFromProperty:function(){return !!this._docNode.attributes.fromProperty;},getParams:function(){if(this._params!=null){return this._params;}else{var l=apiviewer.TreeUtil.getChild(this.getDocNode().getNode(),h);this._params=l?this._createNodeList(l,apiviewer.dao.Param,this.getClass(),this):[];return this._params;}},getReturn:function(){if(this._return!=null){return this._return;}else{var m=apiviewer.TreeUtil.getChild(this.getDocNode().getNode(),g);this._return=m?new apiviewer.dao.Param(m,this.getClass(),this):e;return this._return;}},getThrows:function(){if(this._throws!=null){return this._throws;}else{var n=apiviewer.TreeUtil.getChild(this.getDocNode().getNode(),f);this._throws=n?this._createNodeList(n,apiviewer.dao.ThrowsEntry,this.getClass(),this):[];return this._throws;}},getApply:function(){return this._docNode.attributes.apply;},getFromProperty:function(){return this.getClass().getItemByListAndName(a,this._docNode.attributes.fromProperty);},_addChildNode:function(o){switch(o.type){case h:case g:case f:break;default:return apiviewer.dao.ClassItem.prototype._addChildNode.call(this,o);}return true;}},destruct:function(){this._params=this._throws=null;this._disposeObjects(c);}});})();(function(){var b="apiviewer.dao.Param",a="properties";qx.Class.define(b,{extend:apiviewer.dao.ClassItem,construct:function(c,d,e){apiviewer.dao.ClassItem.call(this,c,d);this._method=e;},members:{getTypes:function(){var i=this.getMethod().getFromProperty();if(i){if(i.isPropertyGroup()){var g=this.getClass().getItemByListAndName(a,this.getName());if(g){return g.getTypes();}}else{return i.getTypes();}}var h=apiviewer.dao.ClassItem.prototype.getTypes.call(this);var f=this._docNode.attributes;if(f.type){h.push({type:f.type,dimensions:f.dimensions});}return h;},getMethod:function(){return this._method;},getArrayDimensions:function(){return this._docNode.attributes.arrayDimensions;},getType:function(){return this._docNode.attributes.type;},getDefaultValue:function(){return this._docNode.attributes.defaultValue;}},destruct:function(){this._method=null;}});})();(function(){var b="apiviewer.dao.ThrowsEntry",a="Error";qx.Class.define(b,{extend:apiviewer.dao.ClassItem,construct:function(c,d,e){apiviewer.dao.ClassItem.call(this,c,d);},members:{getType:function(){return this._docNode.attributes.type||null;},getDefaultType:function(){return a;},getDescription:function(){return this._docNode.attributes.text;}}});})();(function(){var b="types",a="apiviewer.dao.Event";qx.Class.define(a,{extend:apiviewer.dao.ClassItem,construct:function(c,d,e){apiviewer.dao.ClassItem.call(this,c,d,e);},members:{getType:function(){return apiviewer.dao.Class.getClassByName(this._type);},getTypes:function(){if(this._type){return [{type:this._type}];}else{return null;}},_addChildNode:function(f){switch(f.type){case b:this._type=f.children[0].attributes.type;break;default:return apiviewer.dao.ClassItem.prototype._addChildNode.call(this,f);}return true;}}});})();(function(){var d=",",c="new",b="true",a="apiviewer.dao.Property";qx.Class.define(a,{extend:apiviewer.dao.ClassItem,members:{getTypes:function(){var g=apiviewer.dao.ClassItem.prototype.getTypes.call(this);var e=this.getDocNode();var f=e.getType();if(f){g.push({type:f,dimensions:e.getNode().attributes.dimensions});}return g;},getCheck:function(){var h=this.getDocNode()._docNode.attributes;if(h.check){if(!apiviewer.dao.Class.getClassByName(h.check)&&!apiviewer.ui.ClassViewer.PRIMITIVES[h.check]){return h.check;}}return null;},getClassname:function(){return this._docNode.attributes.classname;},getInstance:function(){return this._docNode.attributes.instance;},getPossibleValues:function(){var i=this._docNode.attributes.possibleValues;if(i){i=i.split(d);return i;}else{return [];}},getGroup:function(){var j=this.getDocNode()._docNode.attributes.group;if(j){return j.split(d);}return [];},isPropertyGroup:function(){return !!this.getDocNode()._docNode.attributes.group;},getType:function(){var k=this._docNode.attributes;if(k.type){return k.type;}if(k.check){if(apiviewer.dao.Class.getClassByName(k.check)||apiviewer.ui.ClassViewer.PRIMITIVES[k.check]){return k.check;}}return null;},getPropertyType:function(){return this.getDocNode()._docNode.attributes.propertyType||c;},getEvent:function(){return this.getDocNode()._docNode.attributes.event;},getApplyMethod:function(){return this.getDocNode()._docNode.attributes.apply;},isNullable:function(){return this.getDocNode()._docNode.attributes.allowNull===b;},getDefaultValue:function(){return this._docNode.attributes.defaultValue;},isInheritable:function(){return this.getDocNode()._docNode.attributes.inheritable||false;},isThemeable:function(){return this.getDocNode()._docNode.attributes.themeable||false;},isRefined:function(){return this._docNode.attributes.refine||false;}}});})();(function(){var bv="mixin",bu="",bt='</div>',bs="<h2>",br="</h2>",bq="interface",bp='',bo="constructor",bn=';',bm="events",bb='</h2>',ba="apiviewer/image/nextlevel.gif",Y='px',X='<p>',W='"',V='">',U="appearances",T='</p>',S="constants",R="This ",bC='px;height:',bD='<h2 class="warning">',bA="properties",bB=' style="',by='<div class="class-description">',bz="methods",bw="Inheritance hierarchy:",bx='</span>',bE="Implementations of this interface:",bF="childControls",bf="sub interfaces",be=";vertical-align:top",bh='" src="',bg=' title="',bj="Internal:",bi="width:18px",bl="Included mixins:",bk="margin-right:-18px;",bd="Interface",bc="apiviewer/image/cross.gif",a='/>',b=' </span>',c='<span style="display:inline-block;display:inline;padding-right:18px;position:relative;top:-2px;left:0;width:',d="superMixins",f="methods-static",g="string",h="<br />\n",k="Deprecated:",l="sub mixins",m=":",bJ='<img src="',bI='</small>',bH=" is deprecated!",bG="position:absolute;top:0px;left:0px",bN="Singleton ",bM='" class="img"',bL='"/>',bK="Direct ",bP="position:absolute;top:0px;left:0px;padding-right:18px;",bO="apiviewer/image/blank.gif",B="apiviewer/image/class18.gif",C='<span style="display:inline;position:relative;top:-2px;width:',z=" is internal!",A="px",F='<span class="type">',G="Classes including this mixin:",D='<img',E="class",x="Implemented interfaces:",y="Class",u="top",t="Object<br/>",w=", ",v="margin-left:",q="construct",p="left",s='<div>',r="child controls",o="Abstract ",n="sub classes",L="vertical-align:top",M="static methods",N="ClassViewer",O="Static ",H="apiviewer.ui.ClassViewer",I='<small>',J="Mixin",K="marked",P="apiviewer/image/vline.gif",Q="superInterfaces";qx.Class.define(H,{extend:apiviewer.ui.AbstractViewer,construct:function(){apiviewer.ui.AbstractViewer.call(this);this.addInfoPanel(new apiviewer.ui.panels.MethodPanel(bo,bo));this.addInfoPanel(new apiviewer.ui.panels.EventPanel(bm,bm,true,true));this.addInfoPanel(new apiviewer.ui.panels.PropertyPanel(bA,bA,true,true));this.addInfoPanel(new apiviewer.ui.panels.MethodPanel(bz,bz));this.addInfoPanel(new apiviewer.ui.panels.MethodPanel(f,M));this.addInfoPanel(new apiviewer.ui.panels.ConstantPanel(S,S,false,true));this.addInfoPanel(new apiviewer.ui.panels.AppearancePanel(U,U,false,true));this.addInfoPanel(new apiviewer.ui.panels.ChildControlsPanel(bF,r));this.getContentElement().setAttribute(E,N);this._init(new apiviewer.dao.Class({}));},statics:{PRIMITIVES:{"var":true,"void":true,"undefined":true,"arguments":true,"null":true,"varargs":true,"Boolean":true,"String":true,"Number":true,"Integer":true,"PositiveNumber":true,"PositiveInteger":true,"Float":true,"Double":true,"Error":true,"RegExp":true,"Object":true,"Array":true,"Map":true,"Function":true,"Date":true,"Node":true,"Element":true,"Document":true,"Window":true,"Event":true,"Class":true,"Bootstrap":true,"List":true,"Mixin":true,"Interface":true,"Theme":true,"Color":true,"Decorator":true,"Font":true},createImageHtml:function(bQ,bR,bS){if(typeof bQ==g){return bJ+qx.util.ResourceManager.getInstance().toUri(bQ)+bM+(bS?bB+bS+W:bu)+a;}else{if(bS){bS+=be;}else{bS=L;}return apiviewer.ui.ClassViewer.createOverlayImageHtml(18,18,bQ,bR,bS);}},createOverlayImageHtml:function(bT,bU,bV,bW,bX){var ca=bp;var bY;if(qx.bom.client.Engine.WEBKIT){ca=C+bT+bC+bU+Y+((bX==null)?bp:(bn+bX))+V;}else{ca=c+bT+bC+bU+Y+((bX==null)?bp:(bn+bX))+V;}if(qx.bom.client.Engine.WEBKIT){bY=bP;}else if(qx.bom.client.Engine.OPERA){bY=bk;}else{bY=bG;}for(var i=0;i<bV.length;i++){ca+=D;if(bW!=null){ca+=bg+bW+W;}ca+=bB+bY+bh+qx.util.ResourceManager.getInstance().toUri(bV[i])+bL;}ca+=bx;return ca;}},members:{_getTitleHtml:function(cb){switch(cb.getType()){case bv:var cd=J;break;case bq:var cd=bd;break;default:var cd=y;break;}var cc=new qx.util.StringBuilder();cc.add(I,cb.getPackageName(),bI);cc.add(F);if(cb.isAbstract()){cc.add(o);}else if(cb.isStatic()){cc.add(O);}else if(cb.isSingleton()){cc.add(bN);}cc.add(cd,b);cc.add(apiviewer.ui.panels.InfoPanel.setTitleClass(cb,cb.getName()));return cc.get();},_getDescriptionHtml:function(ce){switch(ce.getType()){case bv:var cf=l;break;case bq:var cf=bf;break;default:var cf=n;break;}var ch=new qx.util.StringBuilder();var ci=ce.getDescription();if(ci!=bu){ch.add(by,apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(ci,ce),bt);}if(ce.getErrors().length>0){ch.add(by,apiviewer.ui.panels.InfoPanel.createErrorHtml(ce,ce),bt);}switch(ce.getType()){case bv:case bq:ch.add(this.__Sz(ce));break;default:ch.add(this.__Sy(ce));break;}ch.add(this.__Sx(ce.getChildClasses(),bK+cf+m));ch.add(this.__Sx(ce.getInterfaces(),x));ch.add(this.__Sx(ce.getMixins(),bl));ch.add(this.__Sx(ce.getImplementations(),bE));ch.add(this.__Sx(ce.getIncluder(),G));var cg=ce.getConstructor();if(cg){ch.add(apiviewer.ui.panels.InfoPanel.createSeeAlsoHtml(cg));}if(ce.isDeprecated()){ch.add(bD,k,bb);ch.add(X);var ci=ce.getDeprecationText();if(ci){ch.add(ci);}else{ch.add(R,ce.getType(),bH);}ch.add(T);}if(ce.isInternal()){ch.add(bD,bj,bb);ch.add(X);ch.add(R,ce.getType(),z);ch.add(T);}return ch.get();},__Sx:function(cj,ck){if(cj.length>0){var cl=new qx.util.StringBuilder(bs,ck,br);for(var i=0;i<cj.length;i++){if(i!=0){cl.add(w);}cl.add(apiviewer.ui.panels.InfoPanel.createItemLinkHtml(cj[i],null,true,false));}cl=cl.get();}else{cl=bu;}return cl;},__Sy:function(cm){var co=apiviewer.ui.ClassViewer;var cp=new qx.util.StringBuilder(bs,bw,br);var cq=cm.getClassHierarchy();cp.add(co.createImageHtml(B),t);var cn=0;for(var i=cq.length-1;i>=0;i--){cp.add(s);cp.add(co.createImageHtml(ba,null,v+cn+A),co.createImageHtml(apiviewer.TreeUtil.getIconUrl(cq[i])));if(i!=0){cp.add(apiviewer.ui.panels.InfoPanel.createItemLinkHtml(cq[i].getFullName(),null,false));}else{cp.add(cq[i].getFullName());}cn+=18;cp.add(bt);}return cp.get();},__Sz:function(cr){if(cr.getType()==bv){var cs=d;}else{cs=Q;}var cu=apiviewer.ui.ClassViewer;var ct=cu.createImageHtml(bO,null,bi);var cw=function(cx,cy){var cA=[];for(var cz=0;cz<cx.length;cz++){var cD=new qx.util.StringBuilder();var cB=cx[cz];if(!cy){if(cz==cx.length-1){cD.add(cu.createImageHtml(ba));}else{cD.add(cu.createImageHtml(bc));}}else{if(!cy){cD.add(ct);}}cD.add(cu.createImageHtml(apiviewer.TreeUtil.getIconUrl(cB)));if(!cy){cD.add(apiviewer.ui.panels.InfoPanel.createItemLinkHtml(cB.getFullName(),null,false));}else{cD.add(cB.getFullName());}cA.push(cD.get());var cC=qx.lang.Array.clone(cB.getItemList(cs));for(var j=0;j<cC.length;j++){cC[j]=apiviewer.dao.Class.getClassByName(cC[j].getName());}if(cC.length>0){var cE=cw(cC);for(var i=0;i<cE.length;i++){if(cz==cx.length-1){if(cy){cA.push(cE[i]);}else{cA.push(ct+cE[i]);}}else{cA.push(cu.createImageHtml(P)+cE[i]);}}}}return cA;};var cv=new qx.util.StringBuilder();if(cr.getItemList(cs).length>0){cv.add(bs,bw,br);cv.add(cw([cr],true).join(h));}return cv.get();},showItem:function(cF){var cI;if(cF==q){cI=this.getDocNode().getConstructor();}else{cI=this.getDocNode().getItem(cF);}if(!cI){return false;}this.__SA(cI,cF);var cJ=this._getPanelForItemNode(cI);var cG=cJ.getItemElement(cI.getName());if(!cG){return false;}var cH=cG.parentNode.parentNode;if(this._markedElement){this._markedElement.className=bu;}cH.className=K;this._markedElement=cH;qx.event.Timer.once(function(e){qx.bom.element.Scroll.intoView(cH,null,p,u);},this,0);return true;},__SA:function(cK,cL){var cM=apiviewer.UiModel.getInstance();if(cK.isFromProperty&&cK.isFromProperty()){cM.setExpandProperties(true);if(cK.isProtected()){cM.setShowProtected(true);}if(cK.isPrivate()){cM.setShowPrivate(true);}}else if(cK.getListName()=="methods"){if(cL.indexOf("__")===0){cM.setShowPrivate(true);}else if(cL.indexOf("_")===0){cM.setShowProtected(true);}}},_getPanelForItemNode:function(cN){var cO=this.getPanels();for(var i=0;i<cO.length;i++){var cP=cO[i];if(cP.canDisplayItem(cN)){return cP;}}}},destruct:function(){this._titleElem=this._classDescElem=this._markedElement=null;}});})();(function(){var c="apiviewer.ui.panels.EventPanel",b="var",a="event";qx.Class.define(c,{extend:apiviewer.ui.panels.InfoPanel,members:{itemHasDetails:function(d,e){return (d.getClass()!=e||d.getSee().length>0||d.getErrors().length>0||apiviewer.ui.panels.InfoPanel.descriptionHasDetails(d));},getItemTypeHtml:function(f){return apiviewer.ui.panels.InfoPanel.createTypeHtml(f,b);},getItemTitleHtml:function(g){return apiviewer.ui.panels.InfoPanel.setTitleClass(g,g.getName());},getItemTextHtml:function(h,i,j){var k=new qx.util.StringBuilder(apiviewer.ui.panels.InfoPanel.createDescriptionHtml(h,h.getClass(),j));if(j){k.add(apiviewer.ui.panels.InfoPanel.createInheritedFromHtml(h,i));k.add(apiviewer.ui.panels.InfoPanel.createSeeAlsoHtml(h));k.add(apiviewer.ui.panels.InfoPanel.createErrorHtml(h,i));k.add(apiviewer.ui.panels.InfoPanel.createDeprecationHtml(h,a));}return k.get();}}});})();(function(){var j='</div>',i='<div class="item-detail-headline">',h='<div class="item-detail-text">',g="#",f="null",e="instances of ",d="apiviewer.ui.panels.PropertyPanel",c='<div class="javascript">',b="var",a="Apply method:",v="property",u="Check:",t="Allowed values:",s='</code>',r="</code>",q="any ",p="Init value:",o='<code>',n="<code>",m="</code>, <code>",k="Change event:",l=" or sub classes";qx.Class.define(d,{extend:apiviewer.ui.panels.InfoPanel,members:{__SB:function(w,x){if(w.isRefined()){return "";}if(w.isPrivate()){var y="__";var name=w.getName().substring(2);}else if(w.isProtected()){y="_";name=w.getName().substring(1);}else{y="";name=w.getName();}name=qx.lang.String.firstUp(name);var A=[];if(w.getPropertyType()=="fast"){A.push("{@link #"+y+"get"+name+"}</td><td> Get the property value.");}else{A.push("{@link #"+y+"set"+name+"}</td><td> Set the property value.");if(!w.isPropertyGroup()){A.push("{@link #"+y+"get"+name+"}</td><td> Get the property value.");A.push("{@link #"+y+"init"+name+"}</td><td> Call apply method with the init value.");}A.push("{@link #"+y+"reset"+name+"}</td><td> Reset the property value.");if(w.getType()=="Boolean"){A.push("{@link #"+y+"toggle"+name+"}</td><td> Toggle the property value.");A.push("{@link #"+y+"is"+name+"}</td><td> Check whether the property equals <code>true</code>.");}}var z=new qx.util.StringBuilder();z.add('<div class="item-detail-headline">',"Generated methods:",'</div>','<div class="item-detail-text">');z.add("<table><tr><td>");z.add(A.join("</td></tr><tr><td>"));z.add("</td></tr></table>");z.add('</div>');return apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(z.get(),x);},__SC:function(B){var C=[];if(B.isNullable()){C.push("This property allows 'null' values");}if(B.isInheritable()){C.push("The property value can be inherited from a parent object.");}if(B.isThemeable()){C.push("The property value can be set using appearance themes.");}if(B.isPropertyGroup()){C.push("The property is a property group.");}if(B.isRefined()){C.push("The property refines the init value of an existing property.");}if(C.length>0){var D=new qx.util.StringBuilder();D.add('<div class="item-detail-headline">',"Property attributes:",'</div>','<div class="item-detail-text">');D.add("<ul><li>");D.add(C.join("</li><li>"));D.add("</li></ul>");D.add('</div>');return D.get();}else{return "";}},__SD:function(E){if(E.isRefined()){var F=new qx.util.StringBuilder('<div class="item-detail-headline">',"Refined property:",'</div>','<div class="item-detail-text">',apiviewer.ui.panels.InfoPanel.createItemLinkHtml(E.getOverriddenFrom().getFullName()+"#"+E.getName()),'</div>');return F.get();}else{return "";}},getItemTypeHtml:function(G){return apiviewer.ui.panels.InfoPanel.createTypeHtml(G,b);},getItemTitleHtml:function(H){return apiviewer.ui.panels.InfoPanel.setTitleClass(H,H.getName());},getItemTextHtml:function(I,J,K){var L=I.getDocNode();var N=new qx.util.StringBuilder(apiviewer.ui.panels.InfoPanel.createDescriptionHtml(I,I.getClass(),K));if(K){var O=null;var M=qx.lang.Array.clone(I.getPossibleValues());if(M.length>0){if(I.isNullable()){M.push(f);}O=n+M.join(m)+r;}else if(I.getClassname()){O=e+I.getClassname();}else if(I.getInstance()){O=e+I.getInstance()+l;}else if(I.getType()){O=q+I.getType();}if(O){N.add(i,t,j,h);N.add(O,j);}if(I.getCheck()){N.add(i,u,j,c,qx.dev.Tokenizer.javaScriptToHtml(I.getCheck()),j);}if(!I.isPropertyGroup()){N.add(i,p,j,h,o,(I.getDefaultValue()?I.getDefaultValue():f),s,j);}if(I.getEvent()&&!I.isRefined()){N.add(i,k,j,h,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(g+I.getEvent(),I.getClass(),true,true),j);}if(I.getApplyMethod()&&!I.isRefined()){N.add(i,a,j,h,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(g+I.getApplyMethod(),I.getClass(),true,true),j);}N.add(this.__SC(I));N.add(this.__SB(I,J));N.add(apiviewer.ui.panels.InfoPanel.createIncludedFromHtml(I,J));N.add(this.__SD(I));N.add(apiviewer.ui.panels.InfoPanel.createInheritedFromHtml(I,J));N.add(apiviewer.ui.panels.InfoPanel.createInfoRequiredByHtml(I));N.add(apiviewer.ui.panels.InfoPanel.createSeeAlsoHtml(L));N.add(apiviewer.ui.panels.InfoPanel.createErrorHtml(I,J));N.add(apiviewer.ui.panels.InfoPanel.createDeprecationHtml(L,v));}return N.get();}}});})();(function(){var c="apiviewer.ui.panels.ConstantPanel",b="var",a="constant";qx.Class.define(c,{extend:apiviewer.ui.panels.InfoPanel,members:{itemHasDetails:function(d,e){return (d.getSee().length>0||d.getErrors().length>0||apiviewer.ui.panels.InfoPanel.descriptionHasDetails(d)||this.__SE(d));},getItemTypeHtml:function(f){return apiviewer.ui.panels.InfoPanel.createTypeHtml(f,b);},getItemTitleHtml:function(g){return apiviewer.ui.panels.InfoPanel.setTitleClass(g,g.getName());},getItemTextHtml:function(h,i,j){var k=apiviewer.ui.panels.InfoPanel.createDescriptionHtml(h,h.getClass(),j);if(j){k+=this.__SF(h);k+=apiviewer.ui.panels.InfoPanel.createSeeAlsoHtml(h);k+=apiviewer.ui.panels.InfoPanel.createErrorHtml(h,i);k+=apiviewer.ui.panels.InfoPanel.createDeprecationHtml(h,a);}return k;},__SE:function(l){return l.getValue()?true:false;},__SF:function(m){if(this.__SE(m)){var n=new qx.util.StringBuilder('<div class="item-detail-headline">',"Value: ",'</div>','<div class="item-detail-text">',qx.bom.String.escape(qx.util.Json.stringify(m.getValue())),'</div>');return n.get();}else{return "";}}}});})();(function(){var m='</div>',l=" <span class='item-detail-define'>defined by ",k=" (default appearance of the class)",j="</p></div>",h="</span>: ",g='<div class="item-desc">',f=" ",e="apiviewer.ui.panels.AppearancePanel",d='<div class="item-detail-headline">',c="</code><p>",a="<div class='item-detail-text'><code>",b="States:";qx.Class.define(e,{extend:apiviewer.ui.panels.InfoPanel,members:{__SG:function(n){var r=n.getStates();if(r.length>0){var t=qx.lang.Array.clone(r);}else{t=[];}var u=n.getType();var v=n.getClass();var s=1;if(u!=v){v=u;s=0;}var q=v.getClassHierarchy();for(var i=s;i<q.length;i++){v=q[i];var o=v.getClassAppearance();if(o){var p=o.getStates();if(p){qx.lang.Array.append(t,p);}}}return t;},_getPanelItems:function(w,x){var z=apiviewer.ui.panels.InfoPanel.prototype._getPanelItems.call(this,w,x);if(!w){return z;}var A=x.getClassHierarchy();for(var i=0;i<A.length;i++){var B=A[i];var y=B.getClassAppearance();if(y){if(y.getType()!=x){z.push(y);}return z;}}},getItemTypeHtml:function(C){var E=C.getName();if(C.getType()==C.getClass()){var D=E+k;}else{var D=E;}return D;},getItemTitleHtml:function(F){return apiviewer.ui.panels.InfoPanel.setTitleClass(F,F.getName());},getItemTextHtml:function(G,H,I){var M=new qx.util.StringBuilder();M.add(g,apiviewer.ui.panels.InfoPanel.createDescriptionHtml(G,G.getClass(),true),m);if(I){var K=this.__SG(G);if(K.length>0){M.add(d,b,m);for(var i=0;i<K.length;i++){var L=K[i];M.add(a,L.getName(),c);var J=L.getAppearance();if(J.getType()!=G.getClass()){M.add(l,apiviewer.ui.panels.InfoPanel.createItemLinkHtml(J.getType().getFullName()),h);}var N=L.getDescription();if(N){M.add(f,apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(N,L.getClass()));}M.add(j);}M.add(m);}}return M.get();},itemHasDetails:function(O,P){return this.__SG(O).length>0;}}});})();(function(){var i='</div>',h="apiviewer.ui.panels.ChildControlsPanel",g="null",f="var",e='<div class="item-detail-headline">',d='</code>',c='<code>',b="Default value:",a='<div class="item-detail-text">';qx.Class.define(h,{extend:apiviewer.ui.panels.InfoPanel,members:{getItemTypeHtml:function(j,k){return apiviewer.ui.panels.InfoPanel.createTypeHtml(j,f,true);},getItemTitleHtml:function(l,m){return apiviewer.ui.panels.InfoPanel.setTitleClass(l,l.getName());},getItemTextHtml:function(n,o,p){var q=new qx.util.StringBuilder(n.getDescription());if(p){q.add(e,b,i,a,c,(n.getDefaultValue()?n.getDefaultValue():g),d,i);}return q.get();}}});})();(function(){var a="apiviewer.dao.Constant";qx.Class.define(a,{extend:apiviewer.dao.ClassItem,construct:function(b,c,d){apiviewer.dao.ClassItem.call(this,b,c,d);},members:{getValue:function(){return this._docNode.attributes.value;}}});})();(function(){var b="states",a="apiviewer.dao.Appearance";qx.Class.define(a,{extend:apiviewer.dao.ClassItem,construct:function(c,d,e){apiviewer.dao.ClassItem.call(this,c,d,e);},members:{getType:function(){return apiviewer.dao.Class.getClassByName(this._docNode.attributes.type);},getTypes:function(){return [{type:this._docNode.attributes.type}];},getAppearance:function(){return this.getClass();},getStates:function(){return this._states||[];},_addChildNode:function(f){switch(f.type){case b:this._states=this._createNodeList(f,apiviewer.dao.State,this);break;default:return apiviewer.dao.ClassItem.prototype._addChildNode.call(this,f);}return true;}}});})();(function(){var a="apiviewer.dao.State";qx.Class.define(a,{extend:apiviewer.dao.ClassItem,construct:function(b,parent){apiviewer.dao.ClassItem.call(this,b,parent);},members:{getClass:function(){return this._class.getClass();},getAppearance:function(){return this._class;}}});})();(function(){var a="apiviewer.dao.ChildControl";qx.Class.define(a,{extend:apiviewer.dao.ClassItem,construct:function(b,c,d){apiviewer.dao.ClassItem.call(this,b,c);this._listName=d;},members:{getTypes:function(){var f=apiviewer.dao.ClassItem.prototype.getTypes.call(this);var e=this._docNode.attributes;if(e.type){f.push({type:e.type});}return f;},getType:function(){return this._docNode.attributes.type;},getDefaultValue:function(){return this._docNode.attributes.defaultValue;}}});})();(function(){var n="class",m="interface",l="mixin",k="list",j="",h="apiviewer.ui.panels.ClassPanel",g="Singleton ",f="Abstract ",e="bootstrap",d="Static ",a="Class",c="Interface",b="Mixin";qx.Class.define(h,{extend:apiviewer.ui.panels.InfoPanel,construct:function(o,p,q){apiviewer.ui.panels.InfoPanel.call(this,o,p);this.setType(q);},properties:{type:{check:[n,l,m]}},members:{getItemTypeHtml:function(r){return apiviewer.ui.panels.InfoPanel.createItemLinkHtml(r.getName(),r,false,true);},getItemTitleHtml:function(s){return s.getFullName();},getItemTextHtml:function(t,u,v){if(v){return apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(t.getDescription(),t);}else{return apiviewer.ui.panels.InfoPanel.createDescriptionHtml(t,t.getClass(),v);}},getItemTooltip:function(w,x){if(w.isAbstract()){var y=f;}else if(w.isStatic()){var y=d;}else if(w.isSingleton()){var y=g;}else{var y=j;}switch(w.getType()){case l:y+=b;break;case m:y+=c;break;default:y+=a;break;}return y;},itemHasDetails:function(z,A){return apiviewer.ui.panels.InfoPanel.descriptionHasDetails(z);},update:function(B,C){if(!this.getElement()){return;}this.setDocNode(C);var E=C.getClasses();var D=[];var F;for(var i=0;i<E.length;i++){F=E[i].getType();if(F===e||F===k){F=n;}if(F===this.getType()){D.push(E[i]);}}if(D&&D.length>0){this._sortItems(D);}this._displayNodes(D,C);}}});})();(function(){var b="Package",a="apiviewer.ui.panels.PackagePanel";qx.Class.define(a,{extend:apiviewer.ui.panels.InfoPanel,members:{getItemTypeHtml:function(c){return apiviewer.ui.panels.InfoPanel.createItemLinkHtml(c.getFullName(),null,false,true);},getItemTitleHtml:function(d){return d.getFullName();},getItemTextHtml:function(e,f,g){if(g){return apiviewer.ui.panels.InfoPanel.resolveLinkAttributes(e.getDescription(),e);}else{return apiviewer.ui.panels.InfoPanel.createDescriptionHtml(e,e.getPackage(),g);}},getItemTooltip:function(h,i){return b;},itemHasDetails:function(j,k){return apiviewer.ui.panels.InfoPanel.descriptionHasDetails(j);},update:function(l,m){if(!this.getElement()){return;}this.setDocNode(m);var n=m.getPackages();if(n&&n.length>0){this._sortItems(n);}this._displayNodes(n,m);}}});})();(function(){var a="apiviewer.ui.tabview.ClassPage";qx.Class.define(a,{extend:apiviewer.ui.tabview.AbstractPage,members:{_createViewer:function(){return new apiviewer.ui.ClassViewer();}}});})();(function(){var m="value",l="separator-vertical",k="_tabView",j="qooxdoo",h="_packageViewer",g="_searchView",f="_tree",d="_detailLoader",c="apiviewer.Viewer",b="_classViewer",a="tree";qx.Class.define(c,{extend:qx.ui.container.Composite,construct:function(){qx.ui.container.Composite.call(this);this.__SH={};var p=new qx.ui.layout.VBox;p.setSeparator(l);this.setLayout(p);this.add(this.__SQ());this.add(this.__SM());var n=new apiviewer.ui.PackageTree();n.setId(a);this._searchView=new apiviewer.ui.SearchView();var q=new apiviewer.ui.LegendView();var r=this.__SL(n,this._searchView,q);var o=this.__SN();this.add(this.__SP(r,o),{flex:1});},members:{__SI:null,__SJ:null,__SH:null,__SK:null,__SL:function(s,t,u){var v=new qx.ui.container.Stack;v.setAppearance("toggleview");v.add(s);v.add(t);v.add(u);this.__SK.addListener("changeSelection",function(e){var w=e.getData()[0];var x=w!=null?w.getUserData("value"):null;switch(x){case "packages":v.setSelection([s]);v.show();break;case "search":v.setSelection([t]);v.show();qx.lang.Function.delay(this._onShowSearch,100,this);break;case "legend":v.setSelection([u]);v.show();break;default:v.exclude();}},this);return v;},__SM:function(){var toolbar=new qx.ui.toolbar.ToolBar;var B=new qx.ui.toolbar.Part;toolbar.add(B);this.__SI=B.toHashCode();var E=new qx.ui.toolbar.RadioButton(this.tr("Content"),"icon/22/apps/utilities-dictionary.png");E.setUserData("value","packages");E.setValue(true);E.setToolTipText(this.tr("Show/hide the packages."));B.add(E);var H=new qx.ui.toolbar.RadioButton(this.tr("Search"),"icon/22/actions/edit-find.png");H.setUserData("value","search");H.setToolTipText(this.tr("Search for packages, classes and members."));B.add(H);var y=new qx.ui.toolbar.RadioButton(this.tr("Legend"),"icon/22/apps/utilities-help.png");y.setUserData("value","legend");y.setToolTipText(this.tr("Show/hide the legend."));B.add(y);var z=new qx.ui.form.RadioGroup(E,H,y);z.setAllowEmptySelection(true);this.__SK=z;toolbar.addSpacer();var B=new qx.ui.toolbar.Part;toolbar.add(B);var F=new qx.ui.toolbar.CheckBox(this.tr("Properties"),"apiviewer/image/property18.gif");F.setId("btn_expand");F.setValue(true);F.setToolTipText(this.tr("Show/hide all generated property methods."));B.add(F);var D=new qx.ui.toolbar.CheckBox(this.tr("Inherited"),"apiviewer/image/method_public_inherited18.gif");D.setId("btn_inherited");D.setToolTipText(this.tr("Show/hide inherited members of the current class."));B.add(D);var A=new qx.ui.toolbar.CheckBox(this.tr("Protected"),"apiviewer/image/method_protected18.gif");A.setId("btn_protected");A.setToolTipText(this.tr("Show/hide protected members of the current class."));B.add(A);var G=new qx.ui.toolbar.CheckBox(this.tr("Private"),"apiviewer/image/method_private18.gif");G.setId("btn_private");G.setToolTipText(this.tr("Show/hide private members of the current class."));B.add(G);toolbar.setOverflowHandling(true);var C=new qx.ui.toolbar.MenuButton(null,"icon/22/actions/media-seek-forward.png");C.setAppearance("toolbar-button");toolbar.add(C);toolbar.setOverflowIndicator(C);this.__SJ=new qx.ui.menu.Menu();C.setMenu(this.__SJ);toolbar.addListener("hideItem",function(e){var I=e.getData();var J=this._getMenuItems(I);for(var i=0;i<J.length;i++){J[i].setVisibility("visible");}},this);toolbar.addListener("showItem",function(e){var K=e.getData();var L=this._getMenuItems(K);for(var i=0;i<L.length;i++){L[i].setVisibility("excluded");}},this);return toolbar;},_getMenuItems:function(M){var O=M.getChildren();var P=[];if(M.toHashCode()===this.__SI){var N=this.__SH[M.toHashCode()];if(!N){N=new qx.ui.menu.Separator();this.__SJ.addAt(N,0);this.__SH[M.toHashCode()]=N;}P.push(N);}for(var i=O.length-1;i>=0;i--){var Q=O[i];N=this.__SH[Q.toHashCode()];if(!N){if(Q instanceof qx.ui.toolbar.RadioButton){var N=new qx.ui.menu.RadioButton(Q.getLabel());}else{N=new qx.ui.menu.CheckBox(Q.getLabel());}Q.bind(m,N,m);N.bind(m,Q,m);this.__SJ.addAt(N,0);this.__SH[Q.toHashCode()]=N;}P.push(N);}return P;},__SN:function(){var R=new qx.ui.container.Composite(new qx.ui.layout.Canvas);R.getContentElement().setAttribute("class","content");this._detailLoader=new qx.ui.embed.Html('<div style="padding:10px;"><h1><small>please wait</small>Loading data...</h1></div>');this._detailLoader.getContentElement().setAttribute("id","SplashScreen");this._detailLoader.setAppearance("detailviewer");this._detailLoader.setId("detail_loader");R.add(this._detailLoader,{edge:0});this._tabView=new qx.ui.tabview.TabView();this._tabView.setId("tabView");this._tabView.exclude();R.add(this._tabView,{edge:0});return R;},__SO:function(toolbar,S){var T=new qx.ui.container.Composite;T.setLayout(new qx.ui.layout.VBox);T.add(toolbar);T.add(S,{flex:1});return T;},__SP:function(U,V){var W=new qx.ui.splitpane.Pane("horizontal");W.add(U,0);W.add(V,1);return W;},__SQ:function(){var ba=new qx.ui.layout.HBox();var X=new qx.ui.container.Composite(ba);X.setAppearance("app-header");var bb=new qx.ui.basic.Label("API Documentation");var Y=new qx.ui.basic.Label("qooxdoo "+qx.core.Setting.get("qx.version"));X.add(bb);X.add(new qx.ui.core.Spacer,{flex:1});X.add(Y);return X;},_onShowSearch:function(){this._searchView.sinput.focus();}},settings:{"apiviewer.title":j,"apiviewer.initialTreeDepth":1},destruct:function(){this._classTreeNodeHash=this.__SK=null;this._disposeObjects(f,d,b,h,g,k);}});})();(function(){var n="_applyLayoutChange",m="top",k="left",j="middle",h="Decorator",g="center",f="_applyReversed",e="bottom",d="qx.ui.layout.VBox",c="Integer",a="right",b="Boolean";qx.Class.define(d,{extend:qx.ui.layout.Abstract,construct:function(o,p,q){qx.ui.layout.Abstract.call(this);if(o){this.setSpacing(o);}if(p){this.setAlignY(p);}if(q){this.setSeparator(q);}},properties:{alignY:{check:[m,j,e],init:m,apply:n},alignX:{check:[k,g,a],init:k,apply:n},spacing:{check:c,init:0,apply:n},separator:{check:h,nullable:true,apply:n},reversed:{check:b,init:false,apply:f}},members:{__eS:null,__eT:null,__eU:null,__eV:null,_applyReversed:function(){this._invalidChildrenCache=true;this._applyLayoutChange();},__eW:function(){var w=this._getLayoutChildren();var length=w.length;var s=false;var r=this.__eS&&this.__eS.length!=length&&this.__eT&&this.__eS;var u;var t=r?this.__eS:new Array(length);var v=r?this.__eT:new Array(length);if(this.getReversed()){w=w.concat().reverse();}for(var i=0;i<length;i++){u=w[i].getLayoutProperties();if(u.height!=null){t[i]=parseFloat(u.height)/100;}if(u.flex!=null){v[i]=u.flex;s=true;}else{v[i]=0;}}if(!r){this.__eS=t;this.__eT=v;}this.__eU=s;this.__eV=w;delete this._invalidChildrenCache;},verifyLayoutProperty:null,renderLayout:function(x,y){if(this._invalidChildrenCache){this.__eW();}var F=this.__eV;var length=F.length;var P=qx.ui.layout.Util;var O=this.getSpacing();var S=this.getSeparator();if(S){var C=P.computeVerticalSeparatorGaps(F,O,S);}else{var C=P.computeVerticalGaps(F,O,true);}var i,A,B,J;var K=[];var Q=C;for(i=0;i<length;i+=1){J=this.__eS[i];B=J!=null?Math.floor((y-C)*J):F[i].getSizeHint().height;K.push(B);Q+=B;}if(this.__eU&&Q!=y){var H={};var N,R;for(i=0;i<length;i+=1){N=this.__eT[i];if(N>0){G=F[i].getSizeHint();H[i]={min:G.minHeight,value:K[i],max:G.maxHeight,flex:N};}}var D=P.computeFlexOffsets(H,y,Q);for(i in D){R=D[i].offset;K[i]+=R;Q+=R;}}var top=F[0].getMarginTop();if(Q<y&&this.getAlignY()!=m){top=y-Q;if(this.getAlignY()===j){top=Math.round(top/2);}}var G,U,L,B,I,M,E;this._clearSeparators();if(S){var T=qx.theme.manager.Decoration.getInstance().resolve(S).getInsets();var z=T.top+T.bottom;}for(i=0;i<length;i+=1){A=F[i];B=K[i];G=A.getSizeHint();M=A.getMarginLeft();E=A.getMarginRight();L=Math.max(G.minWidth,Math.min(x-M-E,G.maxWidth));U=P.computeHorizontalAlignOffset(A.getAlignX()||this.getAlignX(),L,x,M,E);if(i>0){if(S){top+=I+O;this._renderSeparator(S,{top:top,left:0,height:z,width:x});top+=z+O+A.getMarginTop();}else{top+=P.collapseMargins(O,I,A.getMarginTop());}}A.renderLayout(U,top,L,B);top+=B;I=A.getMarginBottom();}},_computeSizeHint:function(){if(this._invalidChildrenCache){this.__eW();}var bc=qx.ui.layout.Util;var bk=this.__eV;var X=0,bb=0,ba=0;var V=0,bd=0;var bh,W,bj;for(var i=0,l=bk.length;i<l;i+=1){bh=bk[i];W=bh.getSizeHint();bb+=W.height;var bg=this.__eT[i];var Y=this.__eS[i];if(bg){X+=W.minHeight;}else if(Y){ba=Math.max(ba,Math.round(W.minHeight/Y));}else{X+=W.height;}bj=bh.getMarginLeft()+bh.getMarginRight();if((W.width+bj)>bd){bd=W.width+bj;}if((W.minWidth+bj)>V){V=W.minWidth+bj;}}X+=ba;var bf=this.getSpacing();var bi=this.getSeparator();if(bi){var be=bc.computeVerticalSeparatorGaps(bk,bf,bi);}else{var be=bc.computeVerticalGaps(bk,bf,true);}return {minHeight:X+be,height:bb+be,minWidth:V,width:bd};}},destruct:function(){this.__eS=this.__eT=this.__eV=null;}});})();(function(){var b="qx.nativeScrollBars",a="qx.ui.core.scroll.MScrollBarFactory";qx.core.Setting.define(b,false);qx.Mixin.define(a,{members:{_createScrollBar:function(c){if(qx.core.Setting.get(b)){return new qx.ui.core.scroll.NativeScrollBar(c);}else{return new qx.ui.core.scroll.ScrollBar(c);}}}});})();(function(){var k="scrollbar-y",j="scrollbar-x",i="pane",h="auto",g="corner",f="scrollbar-",d="on",c="_computeScrollbars",b="getDocument",a="changeVisibility",D="off",C="x",B="scroll",A="touchmove",z="scrollY",y="Left",x="mousewheel",w="scrollbarX",v="scrollarea",u="y",r="vertical",s="scrollX",p="touchstart",q="horizontal",n="qx.ui.core.scroll.AbstractScrollArea",o="abstract",l="update",m="scrollbarY",t="Top";qx.Class.define(n,{extend:qx.ui.core.Widget,include:qx.ui.core.scroll.MScrollBarFactory,type:o,construct:function(){qx.ui.core.Widget.call(this);var E=new qx.ui.layout.Grid();E.setColumnFlex(0,1);E.setRowFlex(0,1);this._setLayout(E);this.addListener(x,this._onMouseWheel,this);if(qx.bom.client.Feature.TOUCH){this.addListener(A,this._onTouchMove,this);this.addListener(p,function(){this.__qP={"x":0,"y":0};},this);this.__qP={};this.__qQ={};}},properties:{appearance:{refine:true,init:v},width:{refine:true,init:100},height:{refine:true,init:200},scrollbarX:{check:[h,d,D],init:h,themeable:true,apply:c},scrollbarY:{check:[h,d,D],init:h,themeable:true,apply:c},scrollbar:{group:[w,m]}},members:{__qP:null,__qQ:null,_createChildControlImpl:function(F,G){var H;switch(F){case i:H=new qx.ui.core.scroll.ScrollPane();H.addListener(l,this._computeScrollbars,this);H.addListener(s,this._onScrollPaneX,this);H.addListener(z,this._onScrollPaneY,this);this._add(H,{row:0,column:0});break;case j:H=this._createScrollBar(q);H.setMinWidth(0);H.exclude();H.addListener(B,this._onScrollBarX,this);H.addListener(a,this._onChangeScrollbarXVisibility,this);this._add(H,{row:1,column:0});break;case k:H=this._createScrollBar(r);H.setMinHeight(0);H.exclude();H.addListener(B,this._onScrollBarY,this);H.addListener(a,this._onChangeScrollbarYVisibility,this);this._add(H,{row:0,column:1});break;case g:H=new qx.ui.core.Widget();H.setWidth(0);H.setHeight(0);H.exclude();this._add(H,{row:1,column:1});break;}return H||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,F);},getPaneSize:function(){return this.getChildControl(i).getInnerSize();},getItemTop:function(I){return this.getChildControl(i).getItemTop(I);},getItemBottom:function(J){return this.getChildControl(i).getItemBottom(J);},getItemLeft:function(K){return this.getChildControl(i).getItemLeft(K);},getItemRight:function(L){return this.getChildControl(i).getItemRight(L);},scrollToX:function(M){qx.ui.core.queue.Manager.flush();this.getChildControl(j).scrollTo(M);},scrollByX:function(N){qx.ui.core.queue.Manager.flush();this.getChildControl(j).scrollBy(N);},getScrollX:function(){var O=this.getChildControl(j,true);return O?O.getPosition():0;},scrollToY:function(P){qx.ui.core.queue.Manager.flush();this.getChildControl(k).scrollTo(P);},scrollByY:function(Q){qx.ui.core.queue.Manager.flush();this.getChildControl(k).scrollBy(Q);},getScrollY:function(){var R=this.getChildControl(k,true);return R?R.getPosition():0;},_onScrollBarX:function(e){this.getChildControl(i).scrollToX(e.getData());},_onScrollBarY:function(e){this.getChildControl(i).scrollToY(e.getData());},_onScrollPaneX:function(e){this.scrollToX(e.getData());},_onScrollPaneY:function(e){this.scrollToY(e.getData());},_onMouseWheel:function(e){var T=this._isChildControlVisible(j);var U=this._isChildControlVisible(k);var S=(U)?this.getChildControl(k,true):(T?this.getChildControl(j,true):null);if(S){S.scrollBySteps(e.getWheelDelta());e.stop();}},_onTouchMove:function(e){this._onTouchMoveDirectional(C,e);this._onTouchMoveDirectional(u,e);e.stop();},_onTouchMoveDirectional:function(V,e){var W=(V==C?y:t);var Y=this.getChildControl(f+V,true);var ba=this._isChildControlVisible(f+V);if(ba&&Y){if(this.__qP[V]==0){var X=0;}else{var X=-(e[b+W]()-this.__qP[V]);}this.__qP[V]=e[b+W]();Y.scrollBy(X);if(this.__qQ[V]){clearTimeout(this.__qQ[V]);this.__qQ[V]=null;}this.__qQ[V]=setTimeout(qx.lang.Function.bind(function(bb){this.__qR(bb,V);},this,X),100);}},__qR:function(bc,bd){this.__qQ[bd]=null;var bf=this._isChildControlVisible(f+bd);if(bc==0||!bf){return;}if(bc>0){bc=Math.max(0,bc-3);}else{bc=Math.min(0,bc+3);}this.__qQ[bd]=setTimeout(qx.lang.Function.bind(function(bg,bh){this.__qR(bg,bh);},this,bc,bd),20);var be=this.getChildControl(f+bd,true);be.scrollBy(bc);},_onChangeScrollbarXVisibility:function(e){var bi=this._isChildControlVisible(j);var bj=this._isChildControlVisible(k);if(!bi){this.scrollToX(0);}bi&&bj?this._showChildControl(g):this._excludeChildControl(g);},_onChangeScrollbarYVisibility:function(e){var bk=this._isChildControlVisible(j);var bl=this._isChildControlVisible(k);if(!bl){this.scrollToY(0);}bk&&bl?this._showChildControl(g):this._excludeChildControl(g);},_computeScrollbars:function(){var bs=this.getChildControl(i);var content=bs.getChildren()[0];if(!content){this._excludeChildControl(j);this._excludeChildControl(k);return;}var bm=this.getInnerSize();var br=bs.getInnerSize();var bp=bs.getScrollSize();if(!br||!bp){return;}var bt=this.getScrollbarX();var bu=this.getScrollbarY();if(bt===h&&bu===h){var bq=bp.width>bm.width;var bv=bp.height>bm.height;if((bq||bv)&&!(bq&&bv)){if(bq){bv=bp.height>br.height;}else if(bv){bq=bp.width>br.width;}}}else{var bq=bt===d;var bv=bu===d;if(bp.width>(bq?br.width:bm.width)&&bt===h){bq=true;}if(bp.height>(bq?br.height:bm.height)&&bu===h){bv=true;}}if(bq){var bo=this.getChildControl(j);bo.show();bo.setMaximum(Math.max(0,bp.width-br.width));bo.setKnobFactor((bp.width===0)?0:br.width/bp.width);}else{this._excludeChildControl(j);}if(bv){var bn=this.getChildControl(k);bn.show();bn.setMaximum(Math.max(0,bp.height-br.height));bn.setKnobFactor((bp.height===0)?0:br.height/bp.height);}else{this._excludeChildControl(k);}}}});})();(function(){var p="Integer",o="_applyContentPadding",n="resetPaddingRight",m="setPaddingBottom",l="resetPaddingTop",k="qx.ui.core.MContentPadding",j="resetPaddingLeft",i="setPaddingTop",h="setPaddingRight",g="resetPaddingBottom",c="contentPaddingLeft",f="setPaddingLeft",e="contentPaddingTop",b="shorthand",a="contentPaddingRight",d="contentPaddingBottom";qx.Mixin.define(k,{properties:{contentPaddingTop:{check:p,init:0,apply:o,themeable:true},contentPaddingRight:{check:p,init:0,apply:o,themeable:true},contentPaddingBottom:{check:p,init:0,apply:o,themeable:true},contentPaddingLeft:{check:p,init:0,apply:o,themeable:true},contentPadding:{group:[e,a,d,c],mode:b,themeable:true}},members:{__kV:{contentPaddingTop:i,contentPaddingRight:h,contentPaddingBottom:m,contentPaddingLeft:f},__kW:{contentPaddingTop:l,contentPaddingRight:n,contentPaddingBottom:g,contentPaddingLeft:j},_applyContentPadding:function(q,r,name){var s=this._getContentPaddingTarget();if(q==null){var t=this.__kW[name];s[t]();}else{var u=this.__kV[name];s[u](q);}}}});})();(function(){var v="single",u="Boolean",t="one",s="changeSelection",r="__nt",q="mouseup",p="mousedown",o="losecapture",n="multi",m="_applyQuickSelection",d="mouseover",l="_applySelectionMode",h="_applyDragSelection",c="qx.ui.core.MMultiSelectionHandling",b="removeItem",g="keypress",f="qx.event.type.Data",j="addItem",a="additive",k="mousemove";qx.Mixin.define(c,{construct:function(){var x=this.SELECTION_MANAGER;var w=this.__nt=new x(this);this.addListener(p,w.handleMouseDown,w);this.addListener(q,w.handleMouseUp,w);this.addListener(d,w.handleMouseOver,w);this.addListener(k,w.handleMouseMove,w);this.addListener(o,w.handleLoseCapture,w);this.addListener(g,w.handleKeyPress,w);this.addListener(j,w.handleAddItem,w);this.addListener(b,w.handleRemoveItem,w);w.addListener(s,this._onSelectionChange,this);},events:{"changeSelection":f},properties:{selectionMode:{check:[v,n,a,t],init:v,apply:l},dragSelection:{check:u,init:false,apply:h},quickSelection:{check:u,init:false,apply:m}},members:{__nt:null,selectAll:function(){this.__nt.selectAll();},isSelected:function(y){if(!qx.ui.core.Widget.contains(this,y)){throw new Error("Could not test if "+y+" is selected, because it is not a child element!");}return this.__nt.isItemSelected(y);},addToSelection:function(z){if(!qx.ui.core.Widget.contains(this,z)){throw new Error("Could not add + "+z+" to selection, because it is not a child element!");}this.__nt.addItem(z);},removeFromSelection:function(A){if(!qx.ui.core.Widget.contains(this,A)){throw new Error("Could not remove "+A+" from selection, because it is not a child element!");}this.__nt.removeItem(A);},selectRange:function(B,C){this.__nt.selectItemRange(B,C);},resetSelection:function(){this.__nt.clearSelection();},setSelection:function(D){for(var i=0;i<D.length;i++){if(!qx.ui.core.Widget.contains(this,D[i])){throw new Error("Could not select "+D[i]+", because it is not a child element!");}}if(D.length===0){this.resetSelection();}else{var E=this.getSelection();if(!qx.lang.Array.equals(E,D)){this.__nt.replaceSelection(D);}}},getSelection:function(){return this.__nt.getSelection();},getSortedSelection:function(){return this.__nt.getSortedSelection();},isSelectionEmpty:function(){return this.__nt.isSelectionEmpty();},getSelectionContext:function(){return this.__nt.getSelectionContext();},_getManager:function(){return this.__nt;},getSelectables:function(F){return this.__nt.getSelectables(F);},invertSelection:function(){this.__nt.invertSelection();},_getLeadItem:function(){var G=this.__nt.getMode();if(G===v||G===t){return this.__nt.getSelectedItem();}else{return this.__nt.getLeadItem();}},_applySelectionMode:function(H,I){this.__nt.setMode(H);},_applyDragSelection:function(J,K){this.__nt.setDrag(J);},_applyQuickSelection:function(L,M){this.__nt.setQuick(L);},_onSelectionChange:function(e){this.fireDataEvent(s,e.getData());}},destruct:function(){this._disposeObjects(r);}});})();(function(){var a="qx.ui.core.IMultiSelection";qx.Interface.define(a,{extend:qx.ui.core.ISingleSelection,members:{selectAll:function(){return true;},addToSelection:function(b){return arguments.length==1;},removeFromSelection:function(c){return arguments.length==1;}}});})();(function(){var o="one",n="single",m="selected",k="additive",j="multi",h="PageUp",g="under",f="Left",d="lead",c="Down",M="Up",L="Boolean",K="PageDown",J="anchor",I="End",H="Home",G="Right",F="right",E="click",D="above",v="left",w="Escape",t="A",u="Space",r="_applyMode",s="interval",p="changeSelection",q="qx.event.type.Data",x="quick",y="__oG",A="key",z="abstract",C="drag",B="qx.ui.core.selection.Abstract";qx.Class.define(B,{type:z,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__oD={};},events:{"changeSelection":q},properties:{mode:{check:[n,j,k,o],init:n,apply:r},drag:{check:L,init:false},quick:{check:L,init:false}},members:{__oE:0,__oF:0,__oG:null,__oH:null,__oI:null,__oJ:null,__oK:null,__oL:null,__oM:null,__oN:null,__oO:null,__oP:null,__oQ:null,__oR:null,__oS:null,__oT:null,__oU:null,__oD:null,__oV:null,__oW:null,_userInteraction:false,__oX:null,getSelectionContext:function(){return this.__oT;},selectAll:function(){var N=this.getMode();if(N==n||N==o){throw new Error("Can not select all items in selection mode: "+N);}this._selectAllItems();this._fireChange();},selectItem:function(O){this._setSelectedItem(O);var P=this.getMode();if(P!==n&&P!==o){this._setLeadItem(O);this._setAnchorItem(O);}this._scrollItemIntoView(O);this._fireChange();},addItem:function(Q){var R=this.getMode();if(R===n||R===o){this._setSelectedItem(Q);}else{if(!this._getAnchorItem()){this._setAnchorItem(Q);}this._setLeadItem(Q);this._addToSelection(Q);}this._scrollItemIntoView(Q);this._fireChange();},removeItem:function(S){this._removeFromSelection(S);if(this.getMode()===o&&this.isSelectionEmpty()){var T=this._getFirstSelectable();if(T){this.addItem(T);}if(T==S){return;}}if(this.getLeadItem()==S){this._setLeadItem(null);}if(this._getAnchorItem()==S){this._setAnchorItem(null);}this._fireChange();},selectItemRange:function(U,V){var W=this.getMode();if(W==n||W==o){throw new Error("Can not select multiple items in selection mode: "+W);}this._selectItemRange(U,V);this._setAnchorItem(U);this._setLeadItem(V);this._scrollItemIntoView(V);this._fireChange();},clearSelection:function(){if(this.getMode()==o){return;}this._clearSelection();this._setLeadItem(null);this._setAnchorItem(null);this._fireChange();},replaceSelection:function(X){var Y=this.getMode();if(Y==o||Y===n){if(X.length>1){throw new Error("Could not select more than one items in mode: "+Y+"!");}if(X.length==1){this.selectItem(X[0]);}else{this.clearSelection();}return;}else{this._replaceMultiSelection(X);}},getSelectedItem:function(){var ba=this.getMode();if(ba===n||ba===o){return this._getSelectedItem()||null;}throw new Error("The method getSelectedItem() is only supported in 'single' and 'one' selection mode!");},getSelection:function(){return qx.lang.Object.getValues(this.__oD);},getSortedSelection:function(){var bc=this.getSelectables();var bb=qx.lang.Object.getValues(this.__oD);bb.sort(function(a,b){return bc.indexOf(a)-bc.indexOf(b);});return bb;},isItemSelected:function(bd){var be=this._selectableToHashCode(bd);return this.__oD[be]!==undefined;},isSelectionEmpty:function(){return qx.lang.Object.isEmpty(this.__oD);},invertSelection:function(){var bg=this.getMode();if(bg===n||bg===o){throw new Error("The method invertSelection() is only supported in 'multi' and 'additive' selection mode!");}var bf=this.getSelectables();for(var i=0;i<bf.length;i++){this._toggleInSelection(bf[i]);}this._fireChange();},_setLeadItem:function(bh){var bi=this.__oU;if(bi!==null){this._styleSelectable(bi,d,false);}if(bh!==null){this._styleSelectable(bh,d,true);}this.__oU=bh;},getLeadItem:function(){return this.__oU!==null?this.__oU:null;},_setAnchorItem:function(bj){var bk=this.__oV;if(bk){this._styleSelectable(bk,J,false);}if(bj){this._styleSelectable(bj,J,true);}this.__oV=bj;},_getAnchorItem:function(){return this.__oV!==null?this.__oV:null;},_isSelectable:function(bl){throw new Error("Abstract method call: _isSelectable()");},_getSelectableFromMouseEvent:function(event){var bm=event.getTarget();if(bm&&this._isSelectable(bm)){return bm;}return null;},_selectableToHashCode:function(bn){throw new Error("Abstract method call: _selectableToHashCode()");},_styleSelectable:function(bo,bp,bq){throw new Error("Abstract method call: _styleSelectable()");},_capture:function(){throw new Error("Abstract method call: _capture()");},_releaseCapture:function(){throw new Error("Abstract method call: _releaseCapture()");},_getLocation:function(){throw new Error("Abstract method call: _getLocation()");},_getDimension:function(){throw new Error("Abstract method call: _getDimension()");},_getSelectableLocationX:function(br){throw new Error("Abstract method call: _getSelectableLocationX()");},_getSelectableLocationY:function(bs){throw new Error("Abstract method call: _getSelectableLocationY()");},_getScroll:function(){throw new Error("Abstract method call: _getScroll()");},_scrollBy:function(bt,bu){throw new Error("Abstract method call: _scrollBy()");},_scrollItemIntoView:function(bv){throw new Error("Abstract method call: _scrollItemIntoView()");},getSelectables:function(bw){throw new Error("Abstract method call: getSelectables()");},_getSelectableRange:function(bx,by){throw new Error("Abstract method call: _getSelectableRange()");},_getFirstSelectable:function(){throw new Error("Abstract method call: _getFirstSelectable()");},_getLastSelectable:function(){throw new Error("Abstract method call: _getLastSelectable()");},_getRelatedSelectable:function(bz,bA){throw new Error("Abstract method call: _getRelatedSelectable()");},_getPage:function(bB,bC){throw new Error("Abstract method call: _getPage()");},_applyMode:function(bD,bE){this._setLeadItem(null);this._setAnchorItem(null);this._clearSelection();if(bD===o){var bF=this._getFirstSelectable();if(bF){this._setSelectedItem(bF);this._scrollItemIntoView(bF);}}this._fireChange();},handleMouseOver:function(event){if(this.__oX!=null&&this.__oX!=this._getScroll().top){this.__oX=null;return;}this._userInteraction=true;if(!this.getQuick()){this._userInteraction=false;return;}var bH=this.getMode();if(bH!==o&&bH!==n){this._userInteraction=false;return;}var bG=this._getSelectableFromMouseEvent(event);if(bG===null){this._userInteraction=false;return;}this._setSelectedItem(bG);this._fireChange(x);this._userInteraction=false;},handleMouseDown:function(event){this._userInteraction=true;var bJ=this._getSelectableFromMouseEvent(event);if(bJ===null){this._userInteraction=false;return;}var bL=event.isCtrlPressed()||(qx.bom.client.Platform.MAC&&event.isMetaPressed());var bI=event.isShiftPressed();if(this.isItemSelected(bJ)&&!bI&&!bL&&!this.getDrag()){this.__oW=bJ;this._userInteraction=false;return;}else{this.__oW=null;}this._scrollItemIntoView(bJ);switch(this.getMode()){case n:case o:this._setSelectedItem(bJ);break;case k:this._setLeadItem(bJ);this._setAnchorItem(bJ);this._toggleInSelection(bJ);break;case j:this._setLeadItem(bJ);if(bI){var bK=this._getAnchorItem();if(bK===null){bK=this._getFirstSelectable();this._setAnchorItem(bK);}this._selectItemRange(bK,bJ,bL);}else if(bL){this._setAnchorItem(bJ);this._toggleInSelection(bJ);}else{this._setAnchorItem(bJ);this._setSelectedItem(bJ);}break;}var bM=this.getMode();if(this.getDrag()&&bM!==n&&bM!==o&&!bI&&!bL){this.__oK=this._getLocation();this.__oH=this._getScroll();this.__oL=event.getDocumentLeft()+this.__oH.left;this.__oM=event.getDocumentTop()+this.__oH.top;this.__oN=true;this._capture();}this._fireChange(E);this._userInteraction=false;},handleMouseUp:function(event){this._userInteraction=true;var bQ=event.isCtrlPressed()||(qx.bom.client.Platform.MAC&&event.isMetaPressed());var bN=event.isShiftPressed();if(!bQ&&!bN&&this.__oW){var bO=this._getSelectableFromMouseEvent(event);if(bO===null||!this.isItemSelected(bO)){this._userInteraction=false;return;}var bP=this.getMode();if(bP===k){this._removeFromSelection(bO);}else{this._setSelectedItem(bO);if(this.getMode()===j){this._setLeadItem(bO);this._setAnchorItem(bO);}}this._userInteraction=false;}this._cleanup();},handleLoseCapture:function(event){this._cleanup();},handleMouseMove:function(event){if(!this.__oN){return;}this.__oO=event.getDocumentLeft();this.__oP=event.getDocumentTop();this._userInteraction=true;var bS=this.__oO+this.__oH.left;if(bS>this.__oL){this.__oQ=1;}else if(bS<this.__oL){this.__oQ=-1;}else{this.__oQ=0;}var bR=this.__oP+this.__oH.top;if(bR>this.__oM){this.__oR=1;}else if(bR<this.__oM){this.__oR=-1;}else{this.__oR=0;}var location=this.__oK;if(this.__oO<location.left){this.__oE=this.__oO-location.left;}else if(this.__oO>location.right){this.__oE=this.__oO-location.right;}else{this.__oE=0;}if(this.__oP<location.top){this.__oF=this.__oP-location.top;}else if(this.__oP>location.bottom){this.__oF=this.__oP-location.bottom;}else{this.__oF=0;}if(!this.__oG){this.__oG=new qx.event.Timer(100);this.__oG.addListener(s,this._onInterval,this);}this.__oG.start();this._autoSelect();event.stopPropagation();this._userInteraction=false;},handleAddItem:function(e){var bT=e.getData();if(this.getMode()===o&&this.isSelectionEmpty()){this.addItem(bT);}},handleRemoveItem:function(e){this.removeItem(e.getData());},_cleanup:function(){if(!this.getDrag()&&this.__oN){return;}if(this.__oS){this._fireChange(E);}delete this.__oN;delete this.__oI;delete this.__oJ;this._releaseCapture();if(this.__oG){this.__oG.stop();}},_onInterval:function(e){this._scrollBy(this.__oE,this.__oF);this.__oH=this._getScroll();this._autoSelect();},_autoSelect:function(){var cd=this._getDimension();var bV=Math.max(0,Math.min(this.__oO-this.__oK.left,cd.width))+this.__oH.left;var bU=Math.max(0,Math.min(this.__oP-this.__oK.top,cd.height))+this.__oH.top;if(this.__oI===bV&&this.__oJ===bU){return;}this.__oI=bV;this.__oJ=bU;var cf=this._getAnchorItem();var bX=cf;var cb=this.__oQ;var ce,bW;while(cb!==0){ce=cb>0?this._getRelatedSelectable(bX,F):this._getRelatedSelectable(bX,v);if(ce!==null){bW=this._getSelectableLocationX(ce);if((cb>0&&bW.left<=bV)||(cb<0&&bW.right>=bV)){bX=ce;continue;}}break;}var cc=this.__oR;var ca,bY;while(cc!==0){ca=cc>0?this._getRelatedSelectable(bX,g):this._getRelatedSelectable(bX,D);if(ca!==null){bY=this._getSelectableLocationY(ca);if((cc>0&&bY.top<=bU)||(cc<0&&bY.bottom>=bU)){bX=ca;continue;}}break;}var cg=this.getMode();if(cg===j){this._selectItemRange(cf,bX);}else if(cg===k){if(this.isItemSelected(cf)){this._selectItemRange(cf,bX,true);}else{this._deselectItemRange(cf,bX);}this._setAnchorItem(bX);}this._fireChange(C);},__oY:{Home:1,Down:1,Right:1,PageDown:1,End:1,Up:1,Left:1,PageUp:1},handleKeyPress:function(event){this._userInteraction=true;var cm,cl;var co=event.getKeyIdentifier();var cn=this.getMode();var ci=event.isCtrlPressed()||(qx.bom.client.Platform.MAC&&event.isMetaPressed());var cj=event.isShiftPressed();var ck=false;if(co===t&&ci){if(cn!==n&&cn!==o){this._selectAllItems();ck=true;}}else if(co===w){if(cn!==n&&cn!==o){this._clearSelection();ck=true;}}else if(co===u){var ch=this.getLeadItem();if(ch&&!cj){if(ci||cn===k){this._toggleInSelection(ch);}else{this._setSelectedItem(ch);}ck=true;}}else if(this.__oY[co]){ck=true;if(cn===n||cn==o){cm=this._getSelectedItem();}else{cm=this.getLeadItem();}if(cm!==null){switch(co){case H:cl=this._getFirstSelectable();break;case I:cl=this._getLastSelectable();break;case M:cl=this._getRelatedSelectable(cm,D);break;case c:cl=this._getRelatedSelectable(cm,g);break;case f:cl=this._getRelatedSelectable(cm,v);break;case G:cl=this._getRelatedSelectable(cm,F);break;case h:cl=this._getPage(cm,true);break;case K:cl=this._getPage(cm,false);break;}}else{switch(co){case H:case c:case G:case K:cl=this._getFirstSelectable();break;case I:case M:case f:case h:cl=this._getLastSelectable();break;}}if(cl!==null){switch(cn){case n:case o:this._setSelectedItem(cl);break;case k:this._setLeadItem(cl);break;case j:if(cj){var cp=this._getAnchorItem();if(cp===null){this._setAnchorItem(cp=this._getFirstSelectable());}this._setLeadItem(cl);this._selectItemRange(cp,cl,ci);}else{this._setAnchorItem(cl);this._setLeadItem(cl);if(!ci){this._setSelectedItem(cl);}}break;}this.__oX=this._getScroll().top;this._scrollItemIntoView(cl);}}if(ck){event.stop();this._fireChange(A);}this._userInteraction=false;},_selectAllItems:function(){var cq=this.getSelectables();for(var i=0,l=cq.length;i<l;i++){this._addToSelection(cq[i]);}},_clearSelection:function(){var cr=this.__oD;for(var cs in cr){this._removeFromSelection(cr[cs]);}this.__oD={};},_selectItemRange:function(ct,cu,cv){var cy=this._getSelectableRange(ct,cu);if(!cv){var cx=this.__oD;var cz=this.__pa(cy);for(var cw in cx){if(!cz[cw]){this._removeFromSelection(cx[cw]);}}}for(var i=0,l=cy.length;i<l;i++){this._addToSelection(cy[i]);}},_deselectItemRange:function(cA,cB){var cC=this._getSelectableRange(cA,cB);for(var i=0,l=cC.length;i<l;i++){this._removeFromSelection(cC[i]);}},__pa:function(cD){var cF={};var cE;for(var i=0,l=cD.length;i<l;i++){cE=cD[i];cF[this._selectableToHashCode(cE)]=cE;}return cF;},_getSelectedItem:function(){for(var cG in this.__oD){return this.__oD[cG];}return null;},_setSelectedItem:function(cH){if(this._isSelectable(cH)){var cI=this.__oD;var cJ=this._selectableToHashCode(cH);if(!cI[cJ]||qx.lang.Object.hasMinLength(cI,2)){this._clearSelection();this._addToSelection(cH);}}},_addToSelection:function(cK){var cL=this._selectableToHashCode(cK);if(!this.__oD[cL]&&this._isSelectable(cK)){this.__oD[cL]=cK;this._styleSelectable(cK,m,true);this.__oS=true;}},_toggleInSelection:function(cM){var cN=this._selectableToHashCode(cM);if(!this.__oD[cN]){this.__oD[cN]=cM;this._styleSelectable(cM,m,true);}else{delete this.__oD[cN];this._styleSelectable(cM,m,false);}this.__oS=true;},_removeFromSelection:function(cO){var cP=this._selectableToHashCode(cO);if(this.__oD[cP]!=null){delete this.__oD[cP];this._styleSelectable(cO,m,false);this.__oS=true;}},_replaceMultiSelection:function(cQ){var cT=false;var cW,cV;var cR={};for(var i=0,l=cQ.length;i<l;i++){cW=cQ[i];if(this._isSelectable(cW)){cV=this._selectableToHashCode(cW);cR[cV]=cW;}}var cX=cQ[0];var cS=cW;var cU=this.__oD;for(var cV in cU){if(cR[cV]){delete cR[cV];}else{cW=cU[cV];delete cU[cV];this._styleSelectable(cW,m,false);cT=true;}}for(var cV in cR){cW=cU[cV]=cR[cV];this._styleSelectable(cW,m,true);cT=true;}if(!cT){return false;}this._scrollItemIntoView(cS);this._setLeadItem(cX);this._setAnchorItem(cX);this.__oS=true;this._fireChange();},_fireChange:function(cY){if(this.__oS){this.__oT=cY||null;this.fireDataEvent(p,this.getSelection());delete this.__oS;}}},destruct:function(){this._disposeObjects(y);this.__oD=this.__oW=this.__oV=null;this.__oU=null;}});})();(function(){var f="vertical",e="under",d="above",c="qx.ui.core.selection.Widget",b="left",a="right";qx.Class.define(c,{extend:qx.ui.core.selection.Abstract,construct:function(g){qx.ui.core.selection.Abstract.call(this);this.__nW=g;},members:{__nW:null,_isSelectable:function(h){return this._isItemSelectable(h)&&h.getLayoutParent()===this.__nW;},_selectableToHashCode:function(j){return j.$$hash;},_styleSelectable:function(k,m,n){n?k.addState(m):k.removeState(m);},_capture:function(){this.__nW.capture();},_releaseCapture:function(){this.__nW.releaseCapture();},_isItemSelectable:function(o){if(this._userInteraction){return o.isVisible()&&o.isEnabled();}else{return o.isVisible();}},_getWidget:function(){return this.__nW;},_getLocation:function(){var p=this.__nW.getContentElement().getDomElement();return p?qx.bom.element.Location.get(p):null;},_getDimension:function(){return this.__nW.getInnerSize();},_getSelectableLocationX:function(q){var r=q.getBounds();if(r){return {left:r.left,right:r.left+r.width};}},_getSelectableLocationY:function(s){var t=s.getBounds();if(t){return {top:t.top,bottom:t.top+t.height};}},_getScroll:function(){return {left:0,top:0};},_scrollBy:function(u,v){},_scrollItemIntoView:function(w){this.__nW.scrollChildIntoView(w);},getSelectables:function(x){var y=false;if(!x){y=this._userInteraction;this._userInteraction=true;}var B=this.__nW.getChildren();var z=[];var A;for(var i=0,l=B.length;i<l;i++){A=B[i];if(this._isItemSelectable(A)){z.push(A);}}this._userInteraction=y;return z;},_getSelectableRange:function(C,D){if(C===D){return [C];}var H=this.__nW.getChildren();var E=[];var G=false;var F;for(var i=0,l=H.length;i<l;i++){F=H[i];if(F===C||F===D){if(G){E.push(F);break;}else{G=true;}}if(G&&this._isItemSelectable(F)){E.push(F);}}return E;},_getFirstSelectable:function(){var I=this.__nW.getChildren();for(var i=0,l=I.length;i<l;i++){if(this._isItemSelectable(I[i])){return I[i];}}return null;},_getLastSelectable:function(){var J=this.__nW.getChildren();for(var i=J.length-1;i>0;i--){if(this._isItemSelectable(J[i])){return J[i];}}return null;},_getRelatedSelectable:function(K,L){var O=this.__nW.getOrientation()===f;var N=this.__nW.getChildren();var M=N.indexOf(K);var P;if((O&&L===d)||(!O&&L===b)){for(var i=M-1;i>=0;i--){P=N[i];if(this._isItemSelectable(P)){return P;}}}else if((O&&L===e)||(!O&&L===a)){for(var i=M+1;i<N.length;i++){P=N[i];if(this._isItemSelectable(P)){return P;}}}return null;},_getPage:function(Q,R){if(R){return this._getFirstSelectable();}else{return this._getLastSelectable();}}},destruct:function(){this.__nW=null;}});})();(function(){var a="qx.ui.core.selection.ScrollArea";qx.Class.define(a,{extend:qx.ui.core.selection.Widget,members:{_isSelectable:function(b){return this._isItemSelectable(b)&&b.getLayoutParent()===this._getWidget().getChildrenContainer();},_getDimension:function(){return this._getWidget().getPaneSize();},_getScroll:function(){var c=this._getWidget();return {left:c.getScrollX(),top:c.getScrollY()};},_scrollBy:function(d,e){var f=this._getWidget();f.scrollByX(d);f.scrollByY(e);},_getPage:function(g,h){var m=this.getSelectables();var length=m.length;var p=m.indexOf(g);if(p===-1){throw new Error("Invalid lead item: "+g);}var j=this._getWidget();var r=j.getScrollY();var innerHeight=j.getInnerSize().height;var top,l,q;if(h){var o=r;var i=p;while(1){for(;i>=0;i--){top=j.getItemTop(m[i]);if(top<o){q=i+1;break;}}if(q==null){var s=this._getFirstSelectable();return s==g?null:s;}if(q>=p){o-=innerHeight+r-j.getItemBottom(g);q=null;continue;}return m[q];}}else{var n=innerHeight+r;var i=p;while(1){for(;i<length;i++){l=j.getItemBottom(m[i]);if(l>n){q=i-1;break;}}if(q==null){var k=this._getLastSelectable();return k==g?null:k;}if(q<=p){n+=j.getItemTop(g)-r;q=null;continue;}return m[q];}}}}});})();(function(){var e="right",d="above",c="left",b="under",a="qx.ui.tree.SelectionManager";qx.Class.define(a,{extend:qx.ui.core.selection.ScrollArea,members:{_getSelectableLocationY:function(f){var g=f.getBounds();if(g){var top=this._getWidget().getItemTop(f);return {top:top,bottom:top+g.height};}},_isSelectable:function(h){return this._isItemSelectable(h)&&h instanceof qx.ui.tree.AbstractTreeItem;},_getSelectableFromMouseEvent:function(event){return this._getWidget().getTreeItem(event.getTarget());},getSelectables:function(j){var m=false;if(!j){m=this._userInteraction;this._userInteraction=true;}var l=this._getWidget();var n=[];if(l.getRoot()!=null){var k=l.getRoot().getItems(true,!!j,l.getHideRoot());for(var i=0;i<k.length;i++){if(this._isSelectable(k[i])){n.push(k[i]);}}}this._userInteraction=m;return n;},_getSelectableRange:function(o,p){if(o===p){return [o];}var q=this.getSelectables();var r=q.indexOf(o);var s=q.indexOf(p);if(r<0||s<0){return [];}if(r<s){return q.slice(r,s+1);}else{return q.slice(s,r+1);}},_getFirstSelectable:function(){return this.getSelectables()[0]||null;},_getLastSelectable:function(){var t=this.getSelectables();if(t.length>0){return t[t.length-1];}else{return null;}},_getRelatedSelectable:function(u,v){var w=this._getWidget();var x=null;switch(v){case d:x=w.getPreviousNodeOf(u,false);break;case b:x=w.getNextNodeOf(u,false);break;case c:case e:break;}if(!x){return null;}if(this._isSelectable(x)){return x;}else{return this._getRelatedSelectable(x,v);}}}});})();(function(){var l="dblclick",k="click",j="Boolean",h="excluded",g="visible",f="qx.event.type.Data",d="_applyOpenMode",c="Space",b="Left",a="Enter",z="changeOpenMode",y="_applyRootOpenClose",x="changeSelection",w="qx.ui.tree.Tree",v="tree",u="_applyHideRoot",t="changeRoot",s="_applyRoot",r="keypress",q="none",o="pane",p="Right",m="qx.ui.tree.AbstractTreeItem",n="__sv";qx.Class.define(w,{extend:qx.ui.core.scroll.AbstractScrollArea,implement:[qx.ui.core.IMultiSelection,qx.ui.form.IModelSelection,qx.ui.form.IForm],include:[qx.ui.core.MMultiSelectionHandling,qx.ui.core.MContentPadding,qx.ui.form.MModelSelection,qx.ui.form.MForm],construct:function(){qx.ui.core.scroll.AbstractScrollArea.call(this);this.__sv=new qx.ui.container.Composite(new qx.ui.layout.VBox()).set({allowShrinkY:false,allowGrowX:true});this.getChildControl(o).add(this.__sv);this.initOpenMode();this.initRootOpenClose();this.addListener(x,this._onChangeSelection,this);this.addListener(r,this._onKeyPress,this);},events:{addItem:f,removeItem:f},properties:{openMode:{check:[k,l,q],init:l,apply:d,event:z,themeable:true},root:{check:m,init:null,nullable:true,event:t,apply:s},hideRoot:{check:j,init:false,apply:u},rootOpenClose:{check:j,init:false,apply:y},appearance:{refine:true,init:v},focusable:{refine:true,init:true}},members:{__sv:null,SELECTION_MANAGER:qx.ui.tree.SelectionManager,getChildrenContainer:function(){return this.__sv;},_applyRoot:function(A,B){var C=this.getChildrenContainer();if(B){C.remove(B);if(B.hasChildren()){C.remove(B.getChildrenContainer());}}if(A){C.add(A);if(A.hasChildren()){C.add(A.getChildrenContainer());}A.setVisibility(this.getHideRoot()?h:g);A.recursiveAddToWidgetQueue();}},_applyHideRoot:function(D,E){var F=this.getRoot();if(!F){return;}F.setVisibility(D?h:g);F.recursiveAddToWidgetQueue();},_applyRootOpenClose:function(G,H){var I=this.getRoot();if(!I){return;}I.recursiveAddToWidgetQueue();},_getContentPaddingTarget:function(){return this.__sv;},getNextNodeOf:function(J,K){if((K!==false||J.isOpen())&&J.hasChildren()){return J.getChildren()[0];}while(J){var parent=J.getParent();if(!parent){return null;}var M=parent.getChildren();var L=M.indexOf(J);if(L>-1&&L<M.length-1){return M[L+1];}J=parent;}return null;},getPreviousNodeOf:function(N,O){var parent=N.getParent();if(!parent){return null;}if(this.getHideRoot()){if(parent==this.getRoot()){if(parent.getChildren()[0]==N){return null;}}}else{if(N==this.getRoot()){return null;}}var R=parent.getChildren();var P=R.indexOf(N);if(P>0){var Q=R[P-1];while((O!==false||Q.isOpen())&&Q.hasChildren()){var S=Q.getChildren();Q=S[S.length-1];}return Q;}else{return parent;}},getNextSiblingOf:function(T){if(T==this.getRoot()){return null;}var parent=T.getParent();var U=parent.getChildren();var V=U.indexOf(T);if(V<U.length-1){return U[V+1];}return null;},getPreviousSiblingOf:function(W){if(W==this.getRoot()){return null;}var parent=W.getParent();var X=parent.getChildren();var Y=X.indexOf(W);if(Y>0){return X[Y-1];}return null;},getItems:function(ba,bb){if(this.getRoot()!=null){return this.getRoot().getItems(ba,bb,this.getHideRoot());}else{return [];}},getChildren:function(){if(this.getRoot()!=null){return [this.getRoot()];}else{return [];}},getTreeItem:function(bc){while(bc){if(bc==this){return null;}if(bc instanceof qx.ui.tree.AbstractTreeItem){return bc;}bc=bc.getLayoutParent();}return null;},_applyOpenMode:function(bd,be){if(be==k){this.removeListener(k,this._onOpen,this);}else if(be==l){this.removeListener(l,this._onOpen,this);}if(bd==k){this.addListener(k,this._onOpen,this);}else if(bd==l){this.addListener(l,this._onOpen,this);}},_onOpen:function(e){var bf=this.getTreeItem(e.getTarget());if(!bf||!bf.isOpenable()){return;}bf.setOpen(!bf.isOpen());e.stopPropagation();},_onChangeSelection:function(e){var bh=e.getData();for(var i=0;i<bh.length;i++){var bg=bh[i];while(bg.getParent()!=null){bg=bg.getParent();bg.setOpen(true);}}},_onKeyPress:function(e){var bi=this._getLeadItem();if(bi!==null){switch(e.getKeyIdentifier()){case b:if(bi.isOpenable()&&bi.isOpen()){bi.setOpen(false);}break;case p:if(bi.isOpenable()&&!bi.isOpen()){bi.setOpen(true);}break;case a:case c:if(bi.isOpenable()){bi.toggleOpen();}break;}}}},destruct:function(){this._disposeObjects(n);}});})();(function(){var d=".",c="apiviewer.ui.PackageTree",b="Documentation",a="__SR";qx.Class.define(c,{extend:qx.ui.tree.Tree,construct:function(){qx.ui.tree.Tree.call(this,b);this.setDecorator(null);this.__SR=new qx.ui.tree.TreeFolder("Packages");this.__SR.setOpen(true);this.setRoot(this.__SR);this.setSelection([this.__SR]);this._classTreeNodeHash={};},members:{__SR:null,setTreeData:function(e){this._docTree=e;this.__ST(this.__SR,e,0);if(this._wantedClassName){this.selectTreeNodeByClassName(this._wantedClassName);this._wantedClassName=null;}},selectTreeNodeByClassName:function(f){if(this._docTree==null){this._wantedClassName=f;return true;}var j=f.split(d);var h=j[0];var i=0;do{var g=this._classTreeNodeHash[h];if(!g){return false;}if(!g.loaded){g.setOpen(true);}i++;h+=d+j[i];}while(i<j.length);this.setSelection([g]);this.scrollChildIntoView(g);return true;},__SS:function(k,l,m){var self=this;return function(){if(!k.loaded){self.__ST(k,l,m+1);k.setOpenSymbolMode("always");}};},__ST:function(n,o,p){n.loaded=true;var s=apiviewer.ui.PackageTree;var q=o.getPackages();for(var i=0;i<q.length;i++){var r=q[i];var v=apiviewer.TreeUtil.getIconUrl(r);var w=new qx.ui.tree.TreeFolder(r.getName());w.setIcon(v);w.setOpenSymbolMode("always");w.setUserData("nodeName",r.getFullName());n.add(w);w.addListener("changeOpen",this.__SS(w,r,p+1),this);if(p<qx.core.Setting.get("apiviewer.initialTreeDepth")&&r.getPackages().length>0){w.setOpen(true);}this._classTreeNodeHash[r.getFullName()]=w;}var x=o.getClasses();for(var i=0;i<x.length;i++){var u=x[i];var v=apiviewer.TreeUtil.getIconUrl(u);var t=new qx.ui.tree.TreeFolder(u.getName());t.setIcon(v);t.setUserData("nodeName",u.getFullName());t.treeType=s.PACKAGE_TREE;n.add(t);this._classTreeNodeHash[u.getFullName()]=t;}}},destruct:function(){this._docTree=this._classTreeNodeHash=null;this._disposeObjects(a);}});})();(function(){var b="qx.ui.core.scroll.IScrollBar",a="qx.event.type.Data";qx.Interface.define(b,{events:{"scroll":a},properties:{orientation:{},maximum:{},position:{},knobFactor:{}},members:{scrollTo:function(c){this.assertNumber(c);},scrollBy:function(d){this.assertNumber(d);},scrollBySteps:function(e){this.assertNumber(e);}}});})();(function(){var k="horizontal",j="px",i="scroll",h="vertical",g="-1px",f="qx.client",d="0",c="hidden",b="mousedown",a="qx.ui.core.scroll.NativeScrollBar",z="PositiveNumber",y="__pT",x="Integer",w="mousemove",v="_applyMaximum",u="_applyOrientation",t="appear",s="opera",r="PositiveInteger",q="mshtml",o="mouseup",p="Number",m="_applyPosition",n="scrollbar",l="native";qx.Class.define(a,{extend:qx.ui.core.Widget,implement:qx.ui.core.scroll.IScrollBar,construct:function(A){qx.ui.core.Widget.call(this);this.addState(l);this.getContentElement().addListener(i,this._onScroll,this);this.addListener(b,this._stopPropagation,this);this.addListener(o,this._stopPropagation,this);this.addListener(w,this._stopPropagation,this);if(qx.core.Variant.isSet(f,s)){this.addListener(t,this._onAppear,this);}this.getContentElement().add(this._getScrollPaneElement());if(A!=null){this.setOrientation(A);}else{this.initOrientation();}},properties:{appearance:{refine:true,init:n},orientation:{check:[k,h],init:k,apply:u},maximum:{check:r,apply:v,init:100},position:{check:p,init:0,apply:m,event:i},singleStep:{check:x,init:20},knobFactor:{check:z,nullable:true}},members:{__pS:null,__pT:null,_getScrollPaneElement:function(){if(!this.__pT){this.__pT=new qx.html.Element();}return this.__pT;},renderLayout:function(B,top,C,D){var E=qx.ui.core.Widget.prototype.renderLayout.call(this,B,top,C,D);this._updateScrollBar();return E;},_getContentHint:function(){var F=qx.bom.element.Overflow.getScrollbarWidth();return {width:this.__pS?100:F,maxWidth:this.__pS?null:F,minWidth:this.__pS?null:F,height:this.__pS?F:100,maxHeight:this.__pS?F:null,minHeight:this.__pS?F:null};},_applyEnabled:function(G,H){qx.ui.core.Widget.prototype._applyEnabled.call(this,G,H);this._updateScrollBar();},_applyMaximum:function(I){this._updateScrollBar();},_applyPosition:function(J){var content=this.getContentElement();if(this.__pS){content.scrollToX(J);}else{content.scrollToY(J);}},_applyOrientation:function(K,L){var M=this.__pS=K===k;this.set({allowGrowX:M,allowShrinkX:M,allowGrowY:!M,allowShrinkY:!M});if(M){this.replaceState(h,k);}else{this.replaceState(k,h);}this.getContentElement().setStyles({overflowX:M?i:c,overflowY:M?c:i});qx.ui.core.queue.Layout.add(this);},_updateScrollBar:function(){var O=this.__pS;var P=this.getBounds();if(!P){return;}if(this.isEnabled()){var Q=O?P.width:P.height;var N=this.getMaximum()+Q;}else{N=0;}if(qx.core.Variant.isSet(f,q)){var P=this.getBounds();this.getContentElement().setStyles({left:O?d:g,top:O?g:d,width:(O?P.width:P.width+1)+j,height:(O?P.height+1:P.height)+j});}this._getScrollPaneElement().setStyles({left:0,top:0,width:(O?N:1)+j,height:(O?1:N)+j});this.scrollTo(this.getPosition());},scrollTo:function(R){this.setPosition(Math.max(0,Math.min(this.getMaximum(),R)));},scrollBy:function(S){this.scrollTo(this.getPosition()+S);},scrollBySteps:function(T){var U=this.getSingleStep();this.scrollBy(T*U);},_onScroll:function(e){var W=this.getContentElement();var V=this.__pS?W.getScrollX():W.getScrollY();this.setPosition(V);},_onAppear:function(e){this.scrollTo(this.getPosition());},_stopPropagation:function(e){e.stopPropagation();}},destruct:function(){this._disposeObjects(y);}});})();(function(){var k="slider",j="horizontal",i="button-begin",h="vertical",g="button-end",f="Integer",d="execute",c="right",b="left",a="down",z="up",y="PositiveNumber",x="changeValue",w="qx.lang.Type.isNumber(value)&&value>=0&&value<=this.getMaximum()",v="_applyKnobFactor",u="knob",t="qx.ui.core.scroll.ScrollBar",s="resize",r="_applyOrientation",q="_applyPageStep",o="PositiveInteger",p="scroll",m="_applyPosition",n="scrollbar",l="_applyMaximum";qx.Class.define(t,{extend:qx.ui.core.Widget,implement:qx.ui.core.scroll.IScrollBar,construct:function(A){qx.ui.core.Widget.call(this);this._createChildControl(i);this._createChildControl(k).addListener(s,this._onResizeSlider,this);this._createChildControl(g);if(A!=null){this.setOrientation(A);}else{this.initOrientation();}},properties:{appearance:{refine:true,init:n},orientation:{check:[j,h],init:j,apply:r},maximum:{check:o,apply:l,init:100},position:{check:w,init:0,apply:m,event:p},singleStep:{check:f,init:20},pageStep:{check:f,init:10,apply:q},knobFactor:{check:y,apply:v,nullable:true}},members:{__oC:2,_createChildControlImpl:function(B,C){var D;switch(B){case k:D=new qx.ui.core.scroll.ScrollSlider();D.setPageStep(100);D.setFocusable(false);D.addListener(x,this._onChangeSliderValue,this);this._add(D,{flex:1});break;case i:D=new qx.ui.form.RepeatButton();D.setFocusable(false);D.addListener(d,this._onExecuteBegin,this);this._add(D);break;case g:D=new qx.ui.form.RepeatButton();D.setFocusable(false);D.addListener(d,this._onExecuteEnd,this);this._add(D);break;}return D||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,B);},_applyMaximum:function(E){this.getChildControl(k).setMaximum(E);},_applyPosition:function(F){this.getChildControl(k).setValue(F);},_applyKnobFactor:function(G){this.getChildControl(k).setKnobFactor(G);},_applyPageStep:function(H){this.getChildControl(k).setPageStep(H);},_applyOrientation:function(I,J){var K=this._getLayout();if(K){K.dispose();}if(I===j){this._setLayout(new qx.ui.layout.HBox());this.setAllowStretchX(true);this.setAllowStretchY(false);this.replaceState(h,j);this.getChildControl(i).replaceState(z,b);this.getChildControl(g).replaceState(a,c);}else{this._setLayout(new qx.ui.layout.VBox());this.setAllowStretchX(false);this.setAllowStretchY(true);this.replaceState(j,h);this.getChildControl(i).replaceState(b,z);this.getChildControl(g).replaceState(c,a);}this.getChildControl(k).setOrientation(I);},scrollTo:function(L){this.getChildControl(k).slideTo(L);},scrollBy:function(M){this.getChildControl(k).slideBy(M);},scrollBySteps:function(N){var O=this.getSingleStep();this.getChildControl(k).slideBy(N*O);},_onExecuteBegin:function(e){this.scrollBy(-this.getSingleStep());},_onExecuteEnd:function(e){this.scrollBy(this.getSingleStep());},_onChangeSliderValue:function(e){this.setPosition(e.getData());},_onResizeSlider:function(e){var P=this.getChildControl(k).getChildControl(u);var S=P.getSizeHint();var Q=false;var R=this.getChildControl(k).getInnerSize();if(this.getOrientation()==h){if(R.height<S.minHeight+this.__oC){Q=true;}}else{if(R.width<S.minWidth+this.__oC){Q=true;}}if(Q){P.exclude();}else{P.show();}}}});})();(function(){var a="qx.ui.form.IRange";qx.Interface.define(a,{members:{setMinimum:function(b){return arguments.length==1;},getMinimum:function(){},setMaximum:function(c){return arguments.length==1;},getMaximum:function(){},setSingleStep:function(d){return arguments.length==1;},getSingleStep:function(){},setPageStep:function(e){return arguments.length==1;},getPageStep:function(){}}});})();(function(){var b="qx.ui.form.INumberForm",a="qx.event.type.Data";qx.Interface.define(b,{events:{"changeValue":a},members:{setValue:function(c){return arguments.length==1;},resetValue:function(){},getValue:function(){}}});})();(function(){var k="knob",j="horizontal",i="vertical",h="Integer",g="hovered",f="left",d="top",c="mouseup",b="pressed",a="px",V="changeValue",U="interval",T="mousemove",S="resize",R="slider",Q="mousedown",P="PageUp",O="mouseout",N='qx.event.type.Data',M="Left",r="Down",s="Up",p="dblclick",q="qx.ui.form.Slider",n="PageDown",o="mousewheel",l="_applyValue",m="_applyKnobFactor",t="End",u="height",B="Right",z="width",F="_applyOrientation",D="Home",I="mouseover",H="floor",w="_applyMinimum",L="click",K="typeof value==='number'&&value>=this.getMinimum()&&value<=this.getMaximum()",J="keypress",v="ceil",x="losecapture",y="contextmenu",A="_applyMaximum",C="Number",E="changeMaximum",G="changeMinimum";qx.Class.define(q,{extend:qx.ui.core.Widget,implement:[qx.ui.form.IForm,qx.ui.form.INumberForm,qx.ui.form.IRange],include:[qx.ui.form.MForm],construct:function(W){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.Canvas());this.addListener(J,this._onKeyPress);this.addListener(o,this._onMouseWheel);this.addListener(Q,this._onMouseDown);this.addListener(c,this._onMouseUp);this.addListener(x,this._onMouseUp);this.addListener(S,this._onUpdate);this.addListener(y,this._onStopEvent);this.addListener(L,this._onStopEvent);this.addListener(p,this._onStopEvent);if(W!=null){this.setOrientation(W);}else{this.initOrientation();}},events:{changeValue:N},properties:{appearance:{refine:true,init:R},focusable:{refine:true,init:true},orientation:{check:[j,i],init:j,apply:F},value:{check:K,init:0,apply:l,nullable:true},minimum:{check:h,init:0,apply:w,event:G},maximum:{check:h,init:100,apply:A,event:E},singleStep:{check:h,init:1},pageStep:{check:h,init:10},knobFactor:{check:C,apply:m,nullable:true}},members:{__nA:null,__nB:null,__nC:null,__nD:null,__nE:null,__nF:null,__nG:null,__nH:null,__nI:null,__nJ:null,__nK:null,__nL:null,_forwardStates:{invalid:true},_createChildControlImpl:function(X,Y){var ba;switch(X){case k:ba=new qx.ui.core.Widget();ba.addListener(S,this._onUpdate,this);ba.addListener(I,this._onMouseOver);ba.addListener(O,this._onMouseOut);this._add(ba);break;}return ba||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,X);},_onMouseOver:function(e){this.addState(g);},_onMouseOut:function(e){this.removeState(g);},_onMouseWheel:function(e){var bb=e.getWheelDelta()>0?1:-1;this.slideBy(bb*this.getSingleStep());e.stop();},_onKeyPress:function(e){var bd=this.getOrientation()===j;var bc=bd?M:s;var forward=bd?B:r;switch(e.getKeyIdentifier()){case forward:this.slideForward();break;case bc:this.slideBack();break;case n:this.slidePageForward();break;case P:this.slidePageBack();break;case D:this.slideToBegin();break;case t:this.slideToEnd();break;default:return;}e.stop();},_onMouseDown:function(e){if(this.__nD){return;}var bg=this.__nN;var be=this.getChildControl(k);var bf=bg?f:d;var bi=bg?e.getDocumentLeft():e.getDocumentTop();var bj=this.__nA=qx.bom.element.Location.get(this.getContentElement().getDomElement())[bf];var bh=this.__nB=qx.bom.element.Location.get(be.getContainerElement().getDomElement())[bf];if(e.getTarget()===be){this.__nD=true;if(!this.__nJ){this.__nJ=new qx.event.Timer(100);this.__nJ.addListener(U,this._fireValue,this);}this.__nJ.start();this.__nE=bi+bj-bh;be.addState(b);}else{this.__nF=true;this.__nG=bi<=bh?-1:1;this.__nO(e);this._onInterval();if(!this.__nI){this.__nI=new qx.event.Timer(100);this.__nI.addListener(U,this._onInterval,this);}this.__nI.start();}this.addListener(T,this._onMouseMove);this.capture();e.stopPropagation();},_onMouseUp:function(e){if(this.__nD){this.releaseCapture();delete this.__nD;this.__nJ.stop();this._fireValue();delete this.__nE;this.getChildControl(k).removeState(b);if(e.getType()===c){var bl;var bm;var bk;if(this.__nN){bl=e.getDocumentLeft()-(this._valueToPosition(this.getValue())+this.__nA);bk=qx.bom.element.Location.get(this.getContentElement().getDomElement())[d];bm=e.getDocumentTop()-(bk+this.getChildControl(k).getBounds().top);}else{bl=e.getDocumentTop()-(this._valueToPosition(this.getValue())+this.__nA);bk=qx.bom.element.Location.get(this.getContentElement().getDomElement())[f];bm=e.getDocumentLeft()-(bk+this.getChildControl(k).getBounds().left);}if(bm<0||bm>this.__nC||bl<0||bl>this.__nC){this.getChildControl(k).removeState(g);}}}else if(this.__nF){this.__nI.stop();this.releaseCapture();delete this.__nF;delete this.__nG;delete this.__nH;}this.removeListener(T,this._onMouseMove);if(e.getType()===c){e.stopPropagation();}},_onMouseMove:function(e){if(this.__nD){var bo=this.__nN?e.getDocumentLeft():e.getDocumentTop();var bn=bo-this.__nE;this.slideTo(this._positionToValue(bn));}else if(this.__nF){this.__nO(e);}e.stopPropagation();},_onInterval:function(e){var bp=this.getValue()+(this.__nG*this.getPageStep());if(bp<this.getMinimum()){bp=this.getMinimum();}else if(bp>this.getMaximum()){bp=this.getMaximum();}var bq=this.__nG==-1;if((bq&&bp<=this.__nH)||(!bq&&bp>=this.__nH)){bp=this.__nH;}this.slideTo(bp);},_onUpdate:function(e){var bs=this.getInnerSize();var bt=this.getChildControl(k).getBounds();var br=this.__nN?z:u;this._updateKnobSize();this.__nM=bs[br]-bt[br];this.__nC=bt[br];this._updateKnobPosition();},__nN:false,__nM:0,__nO:function(e){var bu=this.__nN;var bB=bu?e.getDocumentLeft():e.getDocumentTop();var bD=this.__nA;var bv=this.__nB;var bF=this.__nC;var bC=bB-bD;if(bB>=bv){bC-=bF;}var bz=this._positionToValue(bC);var bw=this.getMinimum();var bx=this.getMaximum();if(bz<bw){bz=bw;}else if(bz>bx){bz=bx;}else{var bA=this.getValue();var by=this.getPageStep();var bE=this.__nG<0?H:v;bz=bA+(Math[bE]((bz-bA)/by)*by);}if(this.__nH==null||(this.__nG==-1&&bz<=this.__nH)||(this.__nG==1&&bz>=this.__nH)){this.__nH=bz;}},_positionToValue:function(bG){var bH=this.__nM;if(bH==null||bH==0){return 0;}var bJ=bG/bH;if(bJ<0){bJ=0;}else if(bJ>1){bJ=1;}var bI=this.getMaximum()-this.getMinimum();return this.getMinimum()+Math.round(bI*bJ);},_valueToPosition:function(bK){var bL=this.__nM;if(bL==null){return 0;}var bM=this.getMaximum()-this.getMinimum();if(bM==0){return 0;}var bK=bK-this.getMinimum();var bN=bK/bM;if(bN<0){bN=0;}else if(bN>1){bN=1;}return Math.round(bL*bN);},_updateKnobPosition:function(){this._setKnobPosition(this._valueToPosition(this.getValue()));},_setKnobPosition:function(bO){var bP=this.getChildControl(k).getContainerElement();if(this.__nN){bP.setStyle(f,bO+a,true);}else{bP.setStyle(d,bO+a,true);}},_updateKnobSize:function(){var bR=this.getKnobFactor();if(bR==null){return;}var bQ=this.getInnerSize();if(bQ==null){return;}if(this.__nN){this.getChildControl(k).setWidth(Math.round(bR*bQ.width));}else{this.getChildControl(k).setHeight(Math.round(bR*bQ.height));}},slideToBegin:function(){this.slideTo(this.getMinimum());},slideToEnd:function(){this.slideTo(this.getMaximum());},slideForward:function(){this.slideBy(this.getSingleStep());},slideBack:function(){this.slideBy(-this.getSingleStep());},slidePageForward:function(){this.slideBy(this.getPageStep());},slidePageBack:function(){this.slideBy(-this.getPageStep());},slideBy:function(bS){this.slideTo(this.getValue()+bS);},slideTo:function(bT){if(bT<this.getMinimum()){bT=this.getMinimum();}else if(bT>this.getMaximum()){bT=this.getMaximum();}else{bT=this.getMinimum()+Math.round((bT-this.getMinimum())/this.getSingleStep())*this.getSingleStep();}this.setValue(bT);},_applyOrientation:function(bU,bV){var bW=this.getChildControl(k);this.__nN=bU===j;if(this.__nN){this.removeState(i);bW.removeState(i);this.addState(j);bW.addState(j);bW.setLayoutProperties({top:0,right:null,bottom:0});}else{this.removeState(j);bW.removeState(j);this.addState(i);bW.addState(i);bW.setLayoutProperties({right:0,bottom:null,left:0});}this._updateKnobPosition();},_applyKnobFactor:function(bX,bY){if(bX!=null){this._updateKnobSize();}else{if(this.__nN){this.getChildControl(k).resetWidth();}else{this.getChildControl(k).resetHeight();}}},_applyValue:function(ca,cb){if(ca!=null){this._updateKnobPosition();if(this.__nD){this.__nL=[ca,cb];}else{this.fireEvent(V,qx.event.type.Data,[ca,cb]);}}else{this.resetValue();}},_fireValue:function(){if(!this.__nL){return;}var cc=this.__nL;this.__nL=null;this.fireEvent(V,qx.event.type.Data,cc);},_applyMinimum:function(cd,ce){if(this.getValue()<cd){this.setValue(cd);}this._updateKnobPosition();},_applyMaximum:function(cf,cg){if(this.getValue()>cf){this.setValue(cf);}this._updateKnobPosition();}}});})();(function(){var d="horizontal",c="mousewheel",b="qx.ui.core.scroll.ScrollSlider",a="keypress";qx.Class.define(b,{extend:qx.ui.form.Slider,construct:function(e){qx.ui.form.Slider.call(this,e);this.removeListener(a,this._onKeyPress);this.removeListener(c,this._onMouseWheel);},members:{getSizeHint:function(f){var g=qx.ui.form.Slider.prototype.getSizeHint.call(this);if(this.getOrientation()===d){g.width=0;}else{g.height=0;}return g;}}});})();(function(){var n="pressed",m="abandoned",l="Integer",k="hovered",j="qx.event.type.Event",i="Enter",h="Space",g="press",f="qx.ui.form.RepeatButton",d="release",a="interval",c="__nS",b="execute";qx.Class.define(f,{extend:qx.ui.form.Button,construct:function(o,p){qx.ui.form.Button.call(this,o,p);this.__nS=new qx.event.AcceleratingTimer();this.__nS.addListener(a,this._onInterval,this);},events:{"execute":j,"press":j,"release":j},properties:{interval:{check:l,init:100},firstInterval:{check:l,init:500},minTimer:{check:l,init:20},timerDecrease:{check:l,init:2}},members:{__nT:null,__nS:null,press:function(){if(this.isEnabled()){if(!this.hasState(n)){this.__nU();}this.removeState(m);this.addState(n);}},release:function(q){if(!this.isEnabled()){return;}if(this.hasState(n)){if(!this.__nT){this.execute();}}this.removeState(n);this.removeState(m);this.__nV();},_applyEnabled:function(r,s){qx.ui.form.Button.prototype._applyEnabled.call(this,r,s);if(!r){this.removeState(n);this.removeState(m);this.__nV();}},_onMouseOver:function(e){if(!this.isEnabled()||e.getTarget()!==this){return;}if(this.hasState(m)){this.removeState(m);this.addState(n);this.__nS.start();}this.addState(k);},_onMouseOut:function(e){if(!this.isEnabled()||e.getTarget()!==this){return;}this.removeState(k);if(this.hasState(n)){this.removeState(n);this.addState(m);this.__nS.stop();}},_onMouseDown:function(e){if(!e.isLeftPressed()){return;}this.capture();this.__nU();e.stopPropagation();},_onMouseUp:function(e){this.releaseCapture();if(!this.hasState(m)){this.addState(k);if(this.hasState(n)&&!this.__nT){this.execute();}}this.__nV();e.stopPropagation();},_onKeyUp:function(e){switch(e.getKeyIdentifier()){case i:case h:if(this.hasState(n)){if(!this.__nT){this.execute();}this.removeState(n);this.removeState(m);e.stopPropagation();this.__nV();}}},_onKeyDown:function(e){switch(e.getKeyIdentifier()){case i:case h:this.removeState(m);this.addState(n);e.stopPropagation();this.__nU();}},_onInterval:function(e){this.__nT=true;this.fireEvent(b);},__nU:function(){this.fireEvent(g);this.__nT=false;this.__nS.set({interval:this.getInterval(),firstInterval:this.getFirstInterval(),minimum:this.getMinTimer(),decrease:this.getTimerDecrease()}).start();this.removeState(m);this.addState(n);},__nV:function(){this.fireEvent(d);this.__nS.stop();this.removeState(m);this.removeState(n);}},destruct:function(){this._disposeObjects(c);}});})();(function(){var e="Integer",d="interval",c="qx.event.type.Event",b="qx.event.AcceleratingTimer",a="__qn";qx.Class.define(b,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__qn=new qx.event.Timer(this.getInterval());this.__qn.addListener(d,this._onInterval,this);},events:{"interval":c},properties:{interval:{check:e,init:100},firstInterval:{check:e,init:500},minimum:{check:e,init:20},decrease:{check:e,init:2}},members:{__qn:null,__qo:null,start:function(){this.__qn.setInterval(this.getFirstInterval());this.__qn.start();},stop:function(){this.__qn.stop();this.__qo=null;},_onInterval:function(){this.__qn.stop();if(this.__qo==null){this.__qo=this.getInterval();}this.__qo=Math.max(this.getMinimum(),this.__qo-this.getDecrease());this.__qn.setInterval(this.__qo);this.__qn.start();this.fireEvent(d);}},destruct:function(){this._disposeObjects(a);}});})();(function(){var n="_applyLayoutChange",m="left",k="center",j="top",h="Decorator",g="middle",f="_applyReversed",e="bottom",d="Boolean",c="right",a="Integer",b="qx.ui.layout.HBox";qx.Class.define(b,{extend:qx.ui.layout.Abstract,construct:function(o,p,q){qx.ui.layout.Abstract.call(this);if(o){this.setSpacing(o);}if(p){this.setAlignX(p);}if(q){this.setSeparator(q);}},properties:{alignX:{check:[m,k,c],init:m,apply:n},alignY:{check:[j,g,e],init:j,apply:n},spacing:{check:a,init:0,apply:n},separator:{check:h,nullable:true,apply:n},reversed:{check:d,init:false,apply:f}},members:{__cP:null,__cQ:null,__cR:null,__cS:null,_applyReversed:function(){this._invalidChildrenCache=true;this._applyLayoutChange();},__cT:function(){var w=this._getLayoutChildren();var length=w.length;var t=false;var r=this.__cP&&this.__cP.length!=length&&this.__cQ&&this.__cP;var u;var s=r?this.__cP:new Array(length);var v=r?this.__cQ:new Array(length);if(this.getReversed()){w=w.concat().reverse();}for(var i=0;i<length;i++){u=w[i].getLayoutProperties();if(u.width!=null){s[i]=parseFloat(u.width)/100;}if(u.flex!=null){v[i]=u.flex;t=true;}else{v[i]=0;}}if(!r){this.__cP=s;this.__cQ=v;}this.__cR=t;this.__cS=w;delete this._invalidChildrenCache;},verifyLayoutProperty:null,renderLayout:function(x,y){if(this._invalidChildrenCache){this.__cT();}var E=this.__cS;var length=E.length;var N=qx.ui.layout.Util;var M=this.getSpacing();var Q=this.getSeparator();if(Q){var B=N.computeHorizontalSeparatorGaps(E,M,Q);}else{var B=N.computeHorizontalGaps(E,M,true);}var i,z,K,J;var P=[];var F=B;for(i=0;i<length;i+=1){J=this.__cP[i];K=J!=null?Math.floor((x-B)*J):E[i].getSizeHint().width;P.push(K);F+=K;}if(this.__cR&&F!=x){var H={};var L,O;for(i=0;i<length;i+=1){L=this.__cQ[i];if(L>0){G=E[i].getSizeHint();H[i]={min:G.minWidth,value:P[i],max:G.maxWidth,flex:L};}}var C=N.computeFlexOffsets(H,x,F);for(i in C){O=C[i].offset;P[i]+=O;F+=O;}}var U=E[0].getMarginLeft();if(F<x&&this.getAlignX()!=m){U=x-F;if(this.getAlignX()===k){U=Math.round(U/2);}}var G,top,A,K,D,S,I;var M=this.getSpacing();this._clearSeparators();if(Q){var R=qx.theme.manager.Decoration.getInstance().resolve(Q).getInsets();var T=R.left+R.right;}for(i=0;i<length;i+=1){z=E[i];K=P[i];G=z.getSizeHint();S=z.getMarginTop();I=z.getMarginBottom();A=Math.max(G.minHeight,Math.min(y-S-I,G.maxHeight));top=N.computeVerticalAlignOffset(z.getAlignY()||this.getAlignY(),A,y,S,I);if(i>0){if(Q){U+=D+M;this._renderSeparator(Q,{left:U,top:0,width:T,height:y});U+=T+M+z.getMarginLeft();}else{U+=N.collapseMargins(M,D,z.getMarginLeft());}}z.renderLayout(U,top,K,A);U+=K;D=z.getMarginRight();}},_computeSizeHint:function(){if(this._invalidChildrenCache){this.__cT();}var bc=qx.ui.layout.Util;var bk=this.__cS;var V=0,bd=0,ba=0;var Y=0,bb=0;var bh,W,bj;for(var i=0,l=bk.length;i<l;i+=1){bh=bk[i];W=bh.getSizeHint();bd+=W.width;var bg=this.__cQ[i];var X=this.__cP[i];if(bg){V+=W.minWidth;}else if(X){ba=Math.max(ba,Math.round(W.minWidth/X));}else{V+=W.width;}bj=bh.getMarginTop()+bh.getMarginBottom();if((W.height+bj)>bb){bb=W.height+bj;}if((W.minHeight+bj)>Y){Y=W.minHeight+bj;}}V+=ba;var bf=this.getSpacing();var bi=this.getSeparator();if(bi){var be=bc.computeHorizontalSeparatorGaps(bk,bf,bi);}else{var be=bc.computeHorizontalGaps(bk,bf,true);}return {minWidth:V+be,width:bd+be,minHeight:Y,height:bb};}},destruct:function(){this.__cP=this.__cQ=this.__cS=null;}});})();(function(){var m="resize",l="scrollY",k="update",j="scrollX",i="_applyScrollX",h="_applyScrollY",g="qx.lang.Type.isNumber(value)&&value>=0&&value<=this.getScrollMaxX()",f="appear",d="qx.lang.Type.isNumber(value)&&value>=0&&value<=this.getScrollMaxY()",c="qx.event.type.Event",a="qx.ui.core.scroll.ScrollPane",b="scroll";qx.Class.define(a,{extend:qx.ui.core.Widget,construct:function(){qx.ui.core.Widget.call(this);this.set({minWidth:0,minHeight:0});this._setLayout(new qx.ui.layout.Grow());this.addListener(m,this._onUpdate);var n=this.getContentElement();n.addListener(b,this._onScroll,this);n.addListener(f,this._onAppear,this);},events:{update:c},properties:{scrollX:{check:g,apply:i,event:j,init:0},scrollY:{check:d,apply:h,event:l,init:0}},members:{add:function(o){var p=this._getChildren()[0];if(p){this._remove(p);p.removeListener(m,this._onUpdate,this);}if(o){this._add(o);o.addListener(m,this._onUpdate,this);}},remove:function(q){if(q){this._remove(q);q.removeListener(m,this._onUpdate,this);}},getChildren:function(){return this._getChildren();},_onUpdate:function(e){this.fireEvent(k);},_onScroll:function(e){var r=this.getContentElement();this.setScrollX(r.getScrollX());this.setScrollY(r.getScrollY());},_onAppear:function(e){var v=this.getContentElement();var s=this.getScrollX();var t=v.getScrollX();if(s!=t){v.scrollToX(s);}var w=this.getScrollY();var u=v.getScrollY();if(w!=u){v.scrollToY(w);}},getItemTop:function(z){var top=0;do{top+=z.getBounds().top;z=z.getLayoutParent();}while(z&&z!==this);return top;},getItemBottom:function(A){return this.getItemTop(A)+A.getBounds().height;},getItemLeft:function(B){var C=0;var parent;do{C+=B.getBounds().left;parent=B.getLayoutParent();if(parent){C+=parent.getInsets().left;}B=parent;}while(B&&B!==this);return C;},getItemRight:function(D){return this.getItemLeft(D)+D.getBounds().width;},getScrollSize:function(){return this.getChildren()[0].getBounds();},getScrollMaxX:function(){var F=this.getInnerSize();var E=this.getScrollSize();if(F&&E){return Math.max(0,E.width-F.width);}return 0;},getScrollMaxY:function(){var H=this.getInnerSize();var G=this.getScrollSize();if(H&&G){return Math.max(0,G.height-H.height);}return 0;},scrollToX:function(I){var J=this.getScrollMaxX();if(I<0){I=0;}else if(I>J){I=J;}this.setScrollX(I);},scrollToY:function(K){var L=this.getScrollMaxY();if(K<0){K=0;}else if(K>L){K=L;}this.setScrollY(K);},scrollByX:function(x){this.scrollToX(this.getScrollX()+x);},scrollByY:function(y){this.scrollToY(this.getScrollY()+y);},_applyScrollX:function(M){this.getContentElement().scrollToX(M);},_applyScrollY:function(N){this.getContentElement().scrollToY(N);}}});})();(function(){var a="qx.ui.layout.Grow";qx.Class.define(a,{extend:qx.ui.layout.Abstract,members:{verifyLayoutProperty:null,renderLayout:function(b,c){var g=this._getLayoutChildren();var f,h,e,d;for(var i=0,l=g.length;i<l;i++){f=g[i];h=f.getSizeHint();e=b;if(e<h.minWidth){e=h.minWidth;}else if(e>h.maxWidth){e=h.maxWidth;}d=c;if(d<h.minHeight){d=h.minHeight;}else if(d>h.maxHeight){d=h.maxHeight;}f.renderLayout(0,0,e,d);}},_computeSizeHint:function(){var q=this._getLayoutChildren();var o,s;var r=0,p=0;var n=0,k=0;var j=Infinity,m=Infinity;for(var i=0,l=q.length;i<l;i++){o=q[i];s=o.getSizeHint();r=Math.max(r,s.width);p=Math.max(p,s.height);n=Math.max(n,s.minWidth);k=Math.max(k,s.minHeight);j=Math.min(j,s.maxWidth);m=Math.min(m,s.maxHeight);}return {width:r,height:p,minWidth:n,minHeight:k,maxWidth:j,maxHeight:m};}}});})();(function(){var m="open",k="icon",j="auto",h="middle",g="String",f="label",d="changeOpen",c="excluded",b="visible",a="opened",H="always",G="qx.ui.tree.AbstractTreeItem",F="_applyIconOpened",E="Boolean",D="__px",C="Integer",B="_applyIndent",A="changeOpenSymbolMode",z="_applyOpenSymbolMode",y="__pu",t="__pt",u="resize",r="",s="removeItem",p="addItem",q="iconOpened",n="abstract",o="never",v="_applyIcon",w="_applyOpen",x="_applyLabel";qx.Class.define(G,{extend:qx.ui.core.Widget,type:n,include:[qx.ui.form.MModelProperty],implement:[qx.ui.form.IModel],construct:function(){qx.ui.core.Widget.call(this);this.__pt=[];this._setLayout(new qx.ui.layout.HBox());this._addWidgets();this.initOpen();},properties:{open:{check:E,init:false,event:d,apply:w},openSymbolMode:{check:[H,o,j],init:j,event:A,apply:z},indent:{check:C,init:19,apply:B,themeable:true},parent:{check:G,nullable:true},icon:{check:g,apply:v,nullable:true,themeable:true},iconOpened:{check:g,apply:F,nullable:true,themeable:true},label:{check:g,apply:x,init:r}},members:{__pt:null,__pu:null,__pv:null,__pw:null,__px:null,__py:null,_addWidgets:function(){throw new Error("Abstract method call.");},_createChildControlImpl:function(I,J){var K;switch(I){case f:K=new qx.ui.basic.Label().set({alignY:h,value:this.getLabel()});break;case k:K=new qx.ui.basic.Image().set({alignY:h,source:this.getIcon()});break;case m:K=new qx.ui.tree.FolderOpenButton().set({alignY:h});K.addListener(d,this._onChangeOpen,this);K.addListener(u,this._updateIndent,this);break;}return K||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,I);},getTree:function(){var M=this;while(M.getParent()){M=M.getParent();}var L=M.getLayoutParent()?M.getLayoutParent().getLayoutParent():0;if(L&&L instanceof qx.ui.core.scroll.ScrollPane){return L.getLayoutParent();}return null;},addWidget:function(N,O){this._add(N,O);},addSpacer:function(){if(!this.__px){this.__px=new qx.ui.core.Spacer();}else{this._remove(this.__px);}this._add(this.__px);},addOpenButton:function(){this._add(this.getChildControl(m));},_onChangeOpen:function(e){if(this.isOpenable()){this.setOpen(e.getData());}},addIcon:function(){var P=this.getChildControl(k);if(this.__pw){this._remove(P);}this._add(P);this.__pw=true;},addLabel:function(Q){var R=this.getChildControl(f);if(this.__pv){this._remove(R);}if(Q){this.setLabel(Q);}else{R.setValue(this.getLabel());}this._add(R);this.__pv=true;},addState:function(S){qx.ui.core.Widget.prototype.addState.call(this,S);var U=this._getChildren();for(var i=0,l=U.length;i<l;i++){var T=U[i];if(T.addState){U[i].addState(S);}}},removeState:function(V){qx.ui.core.Widget.prototype.removeState.call(this,V);var X=this._getChildren();for(var i=0,l=X.length;i<l;i++){var W=X[i];if(W.addState){X[i].removeState(V);}}},_applyIcon:function(Y,ba){if(!this.__pA()){this.__pB(Y);}else if(!this.isOpen()){this.__pB(Y);}},_applyIconOpened:function(bb,bc){if(this.isOpen()){if(this.__pz()&&this.__pA()){this.__pB(bb);}else if(!this.__pz()&&this.__pA()){this.__pB(bb);}}},_applyLabel:function(bd,be){var bf=this.getChildControl(f,true);if(bf){bf.setValue(bd);}},_applyOpen:function(bg,bh){if(this.hasChildren()){this.getChildrenContainer().setVisibility(bg?b:c);}var open=this.getChildControl(m,true);if(open){open.setOpen(bg);}var bi;if(bg){bi=this.__pA()?this.getIconOpened():null;}else{bi=this.getIcon();}if(bi){this.__pB(bi);}bg?this.addState(a):this.removeState(a);},__pz:function(){return qx.util.PropertyUtil.getUserValue(this,k);},__pA:function(){return qx.util.PropertyUtil.getUserValue(this,q);},__pB:function(bj){var bk=this.getChildControl(k,true);if(bk){bk.setSource(bj);}},isOpenable:function(){var bl=this.getOpenSymbolMode();return (bl===H||bl===j&&this.hasChildren());},_shouldShowOpenSymbol:function(){var open=this.getChildControl(m,true);if(!open){return false;}var bm=this.getTree();if(!bm.getRootOpenClose()){if(bm.getHideRoot()){if(bm.getRoot()==this.getParent()){return false;}}else{if(bm.getRoot()==this){return false;}}}return this.isOpenable();},_applyOpenSymbolMode:function(bn,bo){this._updateIndent();},_updateIndent:function(){if(!this.getTree()){return;}var bq=0;var open=this.getChildControl(m,true);if(open){if(this._shouldShowOpenSymbol()){open.show();var bp=open.getBounds();if(bp){bq=bp.width;}else{return;}}else{open.exclude();}}if(this.__px){this.__px.setWidth((this.getLevel()+1)*this.getIndent()-bq);}},_applyIndent:function(br,bs){this._updateIndent();},getLevel:function(){var bt=this.getTree();if(!bt){return;}var bu=this;var bv=-1;while(bu){bu=bu.getParent();bv+=1;}if(bt.getHideRoot()){bv-=1;}if(!bt.getRootOpenClose()){bv-=1;}return bv;},syncWidget:function(){this._updateIndent();},getChildrenContainer:function(){if(!this.__pu){this.__pu=new qx.ui.container.Composite(new qx.ui.layout.VBox()).set({visibility:this.isOpen()?b:c});}return this.__pu;},hasChildrenContainer:function(){return this.__pu;},getParentChildrenContainer:function(){if(this.getParent()){return this.getParent().getChildrenContainer();}else if(this.getLayoutParent()){return this.getLayoutParent();}else{return null;}},getChildren:function(){return this.__pt;},hasChildren:function(){return this.__pt?this.__pt.length>0:false;},getItems:function(bw,bx,by){if(by!==false){var bz=[];}else{var bz=[this];}var bC=this.hasChildren()&&(bx!==false||this.isOpen());if(bC){var bB=this.getChildren();if(bw===false){bz=bz.concat(bB);}else{for(var i=0,bA=bB.length;i<bA;i++){bz=bz.concat(bB[i].getItems(bw,bx,false));}}}return bz;},recursiveAddToWidgetQueue:function(){var bD=this.getItems(true,true,false);for(var i=0,l=bD.length;i<l;i++){qx.ui.core.queue.Widget.add(bD[i]);}},__pC:function(){if(this.getParentChildrenContainer()){this.getParentChildrenContainer()._addAfter(this.getChildrenContainer(),this);}},add:function(bE){var bF=this.getChildrenContainer();var bI=this.getTree();for(var i=0,l=arguments.length;i<l;i++){var bJ=arguments[i];var bH=bJ.getParent();if(bH){bH.remove(bJ);}bJ.setParent(this);var bG=this.hasChildren();bF.add(bJ);if(bJ.hasChildren()){bF.add(bJ.getChildrenContainer());}this.__pt.push(bJ);if(!bG){this.__pC();}if(bI){bJ.recursiveAddToWidgetQueue();bI.fireNonBubblingEvent(p,qx.event.type.Data,[bJ]);}}if(bI){qx.ui.core.queue.Widget.add(this);}},addAt:function(bK,bL){{};if(bL==this.__pt.length){this.add(bK);return;}var bP=bK.getParent();if(bP){bP.remove(bK);}var bN=this.getChildrenContainer();bK.setParent(this);var bO=this.hasChildren();var bM=this.__pt[bL];bN.addBefore(bK,bM);if(bK.hasChildren()){bN.addAfter(bK.getChildrenContainer(),bK);}qx.lang.Array.insertAt(this.__pt,bK,bL);if(!bO){this.__pC();}if(this.getTree()){bK.recursiveAddToWidgetQueue();qx.ui.core.queue.Widget.add(this);}},addBefore:function(bQ,bR){{};var bS=bQ.getParent();if(bS){bS.remove(bQ);}this.addAt(bQ,this.__pt.indexOf(bR));},addAfter:function(bT,bU){{};var bV=bT.getParent();if(bV){bV.remove(bT);}this.addAt(bT,this.__pt.indexOf(bU)+1);},addAtBegin:function(bW){this.addAt(bW,0);},remove:function(bX){for(var i=0,l=arguments.length;i<l;i++){var cc=arguments[i];if(this.__pt.indexOf(cc)==-1){this.warn("Cannot remove treeitem '"+cc+"'. It is not a child of this tree item.");return;}var bY=this.getChildrenContainer();if(cc.hasChildrenContainer()){var cb=cc.getChildrenContainer();if(bY.getChildren().indexOf(cb)>=0){bY.remove(cb);}}qx.lang.Array.remove(this.__pt,cc);cc.setParent(null);bY.remove(cc);}var ca=this.getTree();if(ca){ca.fireNonBubblingEvent(s,qx.event.type.Data,[cc]);}qx.ui.core.queue.Widget.add(this);},removeAt:function(cd){var ce=this.__pt[cd];if(ce){this.remove(ce);}},removeAll:function(){for(var i=this.__pt.length-1;i>=0;i--){this.remove(this.__pt[i]);}}},destruct:function(){this._disposeArray(t);this._disposeObjects(D,y);}});})();(function(){var i="opened",h="click",g="changeOpen",f="Boolean",d="qx.ui.tree.FolderOpenButton",c="_applyOpen",b="mouseup",a="mousedown";qx.Class.define(d,{extend:qx.ui.basic.Image,include:qx.ui.core.MExecutable,construct:function(){qx.ui.basic.Image.call(this);this.initOpen();this.addListener(h,this._onClick);this.addListener(a,this._stopPropagation,this);this.addListener(b,this._stopPropagation,this);},properties:{open:{check:f,init:false,event:g,apply:c}},members:{_applyOpen:function(j,k){j?this.addState(i):this.removeState(i);this.execute();},_stopPropagation:function(e){e.stopPropagation();},_onClick:function(e){this.toggleOpen();e.stopPropagation();}}});})();(function(){var a="qx.ui.core.Spacer";qx.Class.define(a,{extend:qx.ui.core.LayoutItem,construct:function(b,c){qx.ui.core.LayoutItem.call(this);this.setWidth(b!=null?b:0);this.setHeight(c!=null?c:0);},members:{checkAppearanceNeeds:function(){},addChildrenToQueue:function(d){},destroy:function(){if(this.$$disposed){return;}var parent=this.$$parent;if(parent){parent._remove(this);}qx.ui.core.queue.Dispose.add(this);}}});})();(function(){var d="$$theme_",c="$$user_",b="$$init_",a="qx.util.PropertyUtil";qx.Class.define(a,{statics:{getProperties:function(e){return e.$$properties;},getAllProperties:function(f){var i={};var j=f;while(j!=qx.core.Object){var h=this.getProperties(j);for(var g in h){i[g]=h[g];}j=j.superclass;}return i;},getUserValue:function(k,l){return k[c+l];},setUserValue:function(m,n,o){m[c+n]=o;},deleteUserValue:function(p,q){delete (p[c+q]);},getInitValue:function(r,s){return r[b+s];},setInitValue:function(t,u,v){t[b+u]=v;},deleteInitValue:function(w,x){delete (w[b+x]);},getThemeValue:function(y,z){return y[d+z];},setThemeValue:function(A,B,C){A[d+B]=C;},deleteThemeValue:function(D,E){delete (D[d+E]);},setThemed:function(F,G,H){var I=qx.core.Property.$$method.setThemed;F[I[G]](H);},resetThemed:function(J,K){var L=qx.core.Property.$$method.resetThemed;J[L[K]]();}}});})();(function(){var b="tree-folder",a="qx.ui.tree.TreeFolder";qx.Class.define(a,{extend:qx.ui.tree.AbstractTreeItem,construct:function(c){qx.ui.tree.AbstractTreeItem.call(this);if(c){this.setLabel(c);}},properties:{appearance:{refine:true,init:b}},members:{_addWidgets:function(){this.addSpacer();this.addOpenButton();this.addIcon();this.addLabel();}}});})();(function(){var o="",n="/",m="i",k="ICON_",j="separator-vertical",h="sinput",g=")",f="failed",d="CLASS",c="INTERFACE",H="__SV",G="listdata",F="1*",E="#",D="PACKAGE",C="0*",B="changeSelection",A="Search...",z="Results",y="__SW",v="(",w="completed",t="./script/apiindex.json",u="keyup",r="s",s=" Result",p="apiviewer.ui.SearchView",q="appear",x="disappear";qx.Class.define(p,{extend:qx.ui.container.Composite,construct:function(){qx.ui.container.Composite.call(this);var I=new qx.ui.layout.VBox();I.setSeparator(j);this.setLayout(I);this.__SU=false;this.listdata=[];this.apiindex={};this._showSearchForm();},members:{__SV:null,__SW:null,__SU:null,__SX:null,_showSearchForm:function(){var Q=new qx.ui.layout.HBox(4);var K=new qx.ui.container.Composite(Q);K.setPadding(10);this.sinput=new qx.ui.form.TextField().set({allowGrowY:true,placeholder:A});this.__SW=new qx.ui.form.Button("Find");this.__SW.setEnabled(false);K.add(this.sinput,{flex:1});K.add(this.__SW);this.add(K);var O=[];var N=this._tableModel=new qx.ui.table.model.Simple();N.setColumns([o,z]);N.setData(O);var J={tableColumnModel:function(R){return new qx.ui.table.columnmodel.Resize(R);}};var P=new qx.ui.table.Table(N,J);P.setDecorator(null);P.setShowCellFocusIndicator(false);P.setStatusBarVisible(false);P.setColumnVisibilityButtonVisible(false);this._selectionModel=P.getSelectionManager().getSelectionModel();this._selectionModel.addListener(B,this._callDetailFrame,this);this._table=P;var M=P.getTableColumnModel();var L=M.getBehavior();L.set(0,{width:C,minWidth:42,maxWidth:100});L.set(1,{width:F});var M=P.getTableColumnModel();M.setDataCellRenderer(0,new qx.ui.table.cellrenderer.Image());this.__SU=true;this.__SX=P;P.addListener(q,this.__Ta,this);P.addListener(x,function(e){this.__SV.hide();},this);this.add(P,{flex:1});qx.event.Timer.once(this._load,this,0);this.sinput.focus();this.sinput.addListener(u,function(e){this._searchResult(this.sinput.getValue()||o);},this);},_searchResult:function(S){var S=qx.lang.String.trim(S);if(S.length>0){this.__SV.hide();}else{this.__SV.show();}if(S.length<3){if(this.__SU){this.listdata.splice(0,this.listdata.length);}this._resetElements();return;}else{var U=[];try{var T=this._validateInput(S);new RegExp(T[0]);this.__SW.setEnabled(true);}catch(V){if(this.__SU){this.listdata.splice(0,this.listdata.length);}this._resetElements();return;}U=this._searchIndex(T[0],T[1]);this._tableModel.setColumns([o,(U.length+s+((U.length!=1)?r:o))]);this._tableModel.setData(U);this._table.resetSelection();}},_validateInput:function(W){var X=[];if(/^([\w\.]*\w+)(#\w+|\.\w+\(\)|#\.[\*|\+|\?]?)?$/.test(W)){if(RegExp.$2&&RegExp.$2.length>1){X=[RegExp.$2,RegExp.$1];}else if(RegExp.$1.length>1){X=[RegExp.$1,null];}else{return null;}}else{X=[W,null];}return X;},_searchIndex:function(Y,ba){var bf=[];var bd=new RegExp(Y,(/^.*[A-Z].*$/).test(Y)?o:m);var bb=this.apiindex.__index__;var be=this.apiindex.__fullNames__;var bi=this.apiindex.__types__;for(var bg in bb){if(bd.test(bg)){if(ba){for(var i=0,l=bb[bg].length;i<l;i++){var bh=be[bb[bg][i][1]];if(new RegExp(ba,m).test(bh)){var bc=bi[bb[bg][i][0]].toUpperCase();var bj=apiviewer.TreeUtil[k+bc];bf.push([bj,bh+bg]);}}}else{for(var i=0,l=bb[bg].length;i<l;i++){bc=bi[bb[bg][i][0]].toUpperCase();bh=be[bb[bg][i][1]];if(bc==d){bj=apiviewer.TreeUtil.getIconUrl(apiviewer.dao.Class.getClassByName(bh));}else{if(bc!=D&&bc!=c){bh+=bg;}bj=apiviewer.TreeUtil[k+bc];}bf.push([bj,bh]);}}}}return bf;},_setListdata:function(bk){bk.sort(function(a,b){if(a[1]<b[1]){return -1;}if(a[1]>b[1]){return 1;}return 0;});for(var i=0,l=bk.length;i<l;i++){var bl=bk[i][0];var bm={icon:bl,html:o,iconWidth:18,iconHeight:18};this.listdata.push({icon:bm,result:{text:bk[i][1]}});}},_sortByIcons:function(a,b){var bp={"package":0,"class":1,"interface":2,"mixin":3,"method_public":4,"method_protected":5,"method_private":6,"property":7,"property_protected":8,"property_private":9,"event":10,"constructor":11,"constant":12,"childControl":13};var bn=a.substr(a.lastIndexOf(n)+1);var bo=b.substr(b.lastIndexOf(n)+1);a=bp[bn.substr(0,bn.length-6)];b=bp[bo.substr(0,bo.length-6)];return a-b;},_load:function(){var bq=t;var br=new qx.io.remote.Request(bq);br.setAsynchronous(true);br.setTimeout(30000);br.setProhibitCaching(false);br.addListener(w,function(bs){this.apiindex=eval(v+bs.getContent()+g);},this);br.addListener(f,function(bt){this.warn("Couldn't load file: "+bq);},this);br.send();},_callDetailFrame:function(){var bv=this._selectionModel.getAnchorSelectionIndex();var by=this._tableModel.getData()[bv];var bA=qx.core.Init.getApplication().controller;var bu=apiviewer.UiModel.getInstance();if(by!=undefined){var bB=by[1];var bw=by[0];var bz=bB;var bC=null;var bx=bB.indexOf(E);if(bx!=-1){bz=bB.substring(0,bx);bC=bB.substring(bx+1);}if(/protected/.test(bw)){bu.setShowProtected(true);}else if(/private/.test(bw)){bu.setShowPrivate(true);}bA._updateHistory(bB);}},_resetElements:function(){this._tableModel.setData([]);this._tableModel.setColumns([o,o]);this.__SW.setEnabled(false);},__SY:function(bD){this.__SV=new qx.ui.popup.Popup(new qx.ui.layout.Canvas).set({autoHide:false,width:170});var bE=this.tr("Hint: You can use regular expressions in the search field.");var bF=new qx.ui.basic.Label(bE);bF.setRich(true);this.__SV.add(bF,{edge:3});this.__SV.setPosition("bottom-left");this.__SV.placeToWidget(this.sinput,false);this.__SV.show();},__Ta:function(e){if(this.__SV){if(qx.lang.String.trim(this.sinput.getValue()||o).length==0){this.__SV.show();}}else{this.__SY();}}},destruct:function(){this.apiindex=this._table=this.__SX=this._tableModel=this._selectionModel=null;this._disposeObjects(h,y,H);this._disposeArray(G);}});})();(function(){var k="showingPlaceholder",j="",i="none",h="qx.dynlocale",g="Boolean",f="qx.client",d="color",c="qx.event.type.Data",b="readonly",a="placeholder",Y="input",X="focusin",W="visibility",V="focusout",U="changeLocale",T="on",S="readOnly",R="text",Q="_applyTextAlign",P="px",r="RegExp",s=")",p="syncAppearance",q="change",n="textAlign",o="focused",l="center",m="visible",v="disabled",w="url(",D="off",B="String",H="resize",F="qx.ui.form.AbstractField",L="transparent",J="spellcheck",y="false",O="right",N="PositiveInteger",M="mshtml",x="abstract",z="block",A="webkit",C="_applyReadOnly",E="_applyPlaceholder",G="hidden",I="left",K="qx/static/blank.gif",t="changeReadOnly",u="absolute";qx.Class.define(F,{extend:qx.ui.core.Widget,implement:[qx.ui.form.IStringForm,qx.ui.form.IForm],include:[qx.ui.form.MForm],type:x,construct:function(ba){qx.ui.core.Widget.call(this);this.__H=!qx.bom.client.Feature.PLACEHOLDER;if(ba!=null){this.setValue(ba);}this.getContentElement().addListener(q,this._onChangeContent,this);if(this.__H){this.addListener(p,this._syncPlaceholder,this);}if(qx.core.Variant.isSet(h,T)){qx.locale.Manager.getInstance().addListener(U,this._onChangeLocale,this);}},events:{"input":c,"changeValue":c},properties:{textAlign:{check:[I,l,O],nullable:true,themeable:true,apply:Q},readOnly:{check:g,apply:C,event:t,init:false},selectable:{refine:true,init:true},focusable:{refine:true,init:true},maxLength:{check:N,init:Infinity},liveUpdate:{check:g,init:false},placeholder:{check:B,nullable:true,apply:E},filter:{check:r,nullable:true,init:null}},members:{__I:true,__J:null,__K:null,__L:null,__H:true,getFocusElement:function(){var bb=this.getContentElement();if(bb){return bb;}},_createInputElement:function(){return new qx.html.Input(R);},renderLayout:function(bc,top,bd,be){var bf=this._updateInsets;var bj=qx.ui.core.Widget.prototype.renderLayout.call(this,bc,top,bd,be);if(!bj){return;}var bh=bj.size||bf;var bk=P;if(bh||bj.local||bj.margin){var bg=this.getInsets();var innerWidth=bd-bg.left-bg.right;var innerHeight=be-bg.top-bg.bottom;innerWidth=innerWidth<0?0:innerWidth;innerHeight=innerHeight<0?0:innerHeight;}var bi=this.getContentElement();if(bf&&this.__H){this.__O().setStyles({"left":bg.left+bk,"top":bg.top+bk});}if(bh){if(this.__H){this.__O().setStyles({"width":innerWidth+bk,"height":innerHeight+bk});}bi.setStyles({"width":innerWidth+bk,"height":innerHeight+bk});this._renderContentElement(innerHeight,bi);}},_renderContentElement:function(innerHeight,bl){},_createContentElement:function(){var bm=this._createInputElement();bm.setStyles({"border":i,"padding":0,"margin":0,"display":z,"background":L,"outline":i,"appearance":i,"position":u,"autoComplete":D});bm.setSelectable(this.getSelectable());bm.setEnabled(this.getEnabled());bm.addListener(Y,this._onHtmlInput,this);bm.setAttribute(J,y);if(qx.core.Variant.isSet(f,A)){bm.setStyle(H,i);}if(qx.core.Variant.isSet(f,M)){bm.setStyles({backgroundImage:w+qx.util.ResourceManager.getInstance().toUri(K)+s});}return bm;},_applyEnabled:function(bn,bo){qx.ui.core.Widget.prototype._applyEnabled.call(this,bn,bo);this.getContentElement().setEnabled(bn);if(this.__H){if(bn){this._showPlaceholder();}else{this._removePlaceholder();}}else{var bp=this.getContentElement();bp.setAttribute(a,bn?this.getPlaceholder():j);}},__M:{width:16,height:16},_getContentHint:function(){return {width:this.__M.width*10,height:this.__M.height||16};},_applyFont:function(bq,br){var bs;if(bq){var bt=qx.theme.manager.Font.getInstance().resolve(bq);bs=bt.getStyles();}else{bs=qx.bom.Font.getDefaultStyles();}this.getContentElement().setStyles(bs);if(this.__H){this.__O().setStyles(bs);}if(bq){this.__M=qx.bom.Label.getTextSize("A",bs);}else{delete this.__M;}qx.ui.core.queue.Layout.add(this);},_applyTextColor:function(bu,bv){if(bu){this.getContentElement().setStyle(d,qx.theme.manager.Color.getInstance().resolve(bu));}else{this.getContentElement().removeStyle(d);}},tabFocus:function(){qx.ui.core.Widget.prototype.tabFocus.call(this);this.selectAllText();},_getTextSize:function(){return this.__M;},_onHtmlInput:function(e){var bz=e.getData();var by=true;this.__I=false;if(this.getFilter()!=null){var bA=j;var bw=bz.search(this.getFilter());var bx=bz;while(bw>=0){bA=bA+(bx.charAt(bw));bx=bx.substring(bw+1,bx.length);bw=bx.search(this.getFilter());}if(bA!=bz){by=false;bz=bA;this.getContentElement().setValue(bz);}}if(bz.length>this.getMaxLength()){var by=false;this.getContentElement().setValue(bz.substr(0,this.getMaxLength()));}if(by){this.fireDataEvent(Y,bz,this.__L);this.__L=bz;if(this.getLiveUpdate()){this.__N(bz);}}},__N:function(bB){var bC=this.__K;this.__K=bB;if(bC!=bB){this.fireNonBubblingEvent("changeValue",qx.event.type.Data,[bB,bC]);}},setValue:function(bD){if(bD===null){if(this.__I){return bD;}bD=j;this.__I=true;}else{this.__I=false;if(this.__H){this._removePlaceholder();}}if(qx.lang.Type.isString(bD)){var bF=this.getContentElement();if(bD.length>this.getMaxLength()){bD=bD.substr(0,this.getMaxLength());}if(bF.getValue()!=bD){var bG=bF.getValue();bF.setValue(bD);var bE=this.__I?null:bD;this.__K=bG;this.__N(bE);}if(this.__H){this._showPlaceholder();}return bD;}throw new Error("Invalid value type: "+bD);},getValue:function(){var bH=this.getContentElement().getValue();return this.__I?null:bH;},resetValue:function(){this.setValue(null);},_onChangeContent:function(e){this.__I=e.getData()===null;this.__N(e.getData());},getTextSelection:function(){return this.getContentElement().getTextSelection();},getTextSelectionLength:function(){return this.getContentElement().getTextSelectionLength();},getTextSelectionStart:function(){return this.getContentElement().getTextSelectionStart();},getTextSelectionEnd:function(){return this.getContentElement().getTextSelectionEnd();},setTextSelection:function(bI,bJ){this.getContentElement().setTextSelection(bI,bJ);},clearTextSelection:function(){this.getContentElement().clearTextSelection();},selectAllText:function(){this.setTextSelection(0);},_showPlaceholder:function(){var bL=this.getValue()||j;var bK=this.getPlaceholder();if(bK!=null&&bL==j&&!this.hasState(o)&&!this.hasState(v)){if(this.hasState(k)){this._syncPlaceholder();}else{this.addState(k);}}},_removePlaceholder:function(){if(this.hasState(k)){this.__O().setStyle(W,G);this.removeState(k);}},_syncPlaceholder:function(){if(this.hasState(k)){this.__O().setStyle(W,m);}},__O:function(){if(this.__J==null){this.__J=new qx.html.Label();var bM=qx.theme.manager.Color.getInstance();this.__J.setStyles({"visibility":"hidden","zIndex":6,"position":"absolute","color":bM.resolve("text-placeholder")});this.getContainerElement().add(this.__J);}return this.__J;},_onChangeLocale:qx.core.Variant.select(h,{"on":function(e){var content=this.getPlaceholder();if(content&&content.translate){this.setPlaceholder(content.translate());}},"off":null}),_applyPlaceholder:function(bN,bO){if(this.__H){this.__O().setValue(bN);if(bN!=null){this.addListener(X,this._removePlaceholder,this);this.addListener(V,this._showPlaceholder,this);this._showPlaceholder();}else{this.removeListener(X,this._removePlaceholder,this);this.removeListener(V,this._showPlaceholder,this);this._removePlaceholder();}}else{if(this.getEnabled()){this.getContentElement().setAttribute(a,bN);}}},_applyTextAlign:function(bP,bQ){this.getContentElement().setStyle(n,bP);},_applyReadOnly:function(bR,bS){var bT=this.getContentElement();bT.setAttribute(S,bR);if(bR){this.addState(b);this.setFocusable(false);}else{this.removeState(b);this.setFocusable(true);}}},destruct:function(){this.__J=null;if(qx.core.Variant.isSet(h,T)){qx.locale.Manager.getInstance().removeListener(U,this._onChangeLocale,this);}}});})();(function(){var b="qx.ui.form.TextField",a="textfield";qx.Class.define(b,{extend:qx.ui.form.AbstractField,properties:{appearance:{refine:true,init:a},allowGrowY:{refine:true,init:false},allowShrinkY:{refine:true,init:false}},members:{_renderContentElement:function(innerHeight,c){}}});})();(function(){var k="wrap",j="value",i="textarea",h="none",g="qx.client",f="",e="input",d="qx.html.Input",c="select",b="disabled",a="read-only";qx.Class.define(d,{extend:qx.html.Element,construct:function(l,m,n){if(l===c||l===i){var o=l;}else{o=e;}qx.html.Element.call(this,o,m,n);this.__c=l;},members:{__c:null,__d:null,__e:null,_createDomElement:function(){return qx.bom.Input.create(this.__c);},_applyProperty:function(name,p){qx.html.Element.prototype._applyProperty.call(this,name,p);var q=this.getDomElement();if(name===j){qx.bom.Input.setValue(q,p);}else if(name===k){qx.bom.Input.setWrap(q,p);}},setEnabled:qx.core.Variant.select(g,{"webkit":function(r){this.__e=r;if(!r){this.setStyles({"userModify":a,"userSelect":h});}else{this.setStyles({"userModify":null,"userSelect":this.__d?null:h});}},"default":function(s){this.setAttribute(b,s===false);}}),setSelectable:qx.core.Variant.select(g,{"webkit":function(t){this.__d=t;qx.html.Element.prototype.setSelectable.call(this,this.__e&&t);},"default":function(u){qx.html.Element.prototype.setSelectable.call(this,u);}}),setValue:function(v){var w=this.getDomElement();if(w){if(w.value!=v){qx.bom.Input.setValue(w,v);}}else{this._setProperty(j,v);}return this;},getValue:function(){var x=this.getDomElement();if(x){return qx.bom.Input.getValue(x);}return this._getProperty(j)||f;},setWrap:function(y){if(this.__c===i){this._setProperty(k,y);}else{throw new Error("Text wrapping is only support by textareas!");}return this;},getWrap:function(){if(this.__c===i){return this._getProperty(k);}else{throw new Error("Text wrapping is only support by textareas!");}}}});})();(function(){var w="change",v="input",u="qx.client",t="text",s="password",r="checkbox",q="radio",p="textarea",n="keypress",m="opera",d="propertychange",k="blur",h="keydown",c="keyup",b="select-multiple",g="checked",f="value",j="select",a="qx.event.handler.Input";qx.Class.define(a,{extend:qx.core.Object,implement:qx.event.IEventHandler,construct:function(){qx.core.Object.call(this);this._onChangeCheckedWrapper=qx.lang.Function.listener(this._onChangeChecked,this);this._onChangeValueWrapper=qx.lang.Function.listener(this._onChangeValue,this);this._onInputWrapper=qx.lang.Function.listener(this._onInput,this);this._onPropertyWrapper=qx.lang.Function.listener(this._onProperty,this);if(qx.core.Variant.isSet(u,m)){this._onKeyDownWrapper=qx.lang.Function.listener(this._onKeyDown,this);this._onKeyUpWrapper=qx.lang.Function.listener(this._onKeyUp,this);this._onBlurWrapper=qx.lang.Function.listener(this._onBlur,this);}},statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{input:1,change:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:false},members:{__g:false,__h:null,__i:null,canHandleEvent:function(x,y){var z=x.tagName.toLowerCase();if(y===v&&(z===v||z===p)){return true;}if(y===w&&(z===v||z===p||z===j)){return true;}return false;},registerEvent:qx.core.Variant.select(u,{"mshtml":function(A,B,C){if(!A.__j){var D=A.tagName.toLowerCase();var E=A.type;if(E===t||E===s||D===p||E===r||E===q){qx.bom.Event.addNativeListener(A,d,this._onPropertyWrapper);}if(E!==r&&E!==q){qx.bom.Event.addNativeListener(A,w,this._onChangeValueWrapper);}if(E===t||E===s){this._onKeyPressWrapped=qx.lang.Function.listener(this._onKeyPress,this,A);qx.bom.Event.addNativeListener(A,n,this._onKeyPressWrapped);}A.__j=true;}},"default":function(F,G,H){if(G===v){this.__k(F);}else if(G===w){if(F.type===q||F.type===r){qx.bom.Event.addNativeListener(F,w,this._onChangeCheckedWrapper);}else{qx.bom.Event.addNativeListener(F,w,this._onChangeValueWrapper);}if(qx.core.Variant.isSet(u,m)){if(F.type===t||F.type===s){this._onKeyPressWrapped=qx.lang.Function.listener(this._onKeyPress,this,F);qx.bom.Event.addNativeListener(F,n,this._onKeyPressWrapped);}}}}}),__k:qx.core.Variant.select(u,{"mshtml":null,"webkit":function(I){var J=I.tagName.toLowerCase();if(qx.bom.client.Engine.VERSION<532&&J==p){qx.bom.Event.addNativeListener(I,n,this._onInputWrapper);}qx.bom.Event.addNativeListener(I,v,this._onInputWrapper);},"opera":function(K){qx.bom.Event.addNativeListener(K,c,this._onKeyUpWrapper);qx.bom.Event.addNativeListener(K,h,this._onKeyDownWrapper);qx.bom.Event.addNativeListener(K,k,this._onBlurWrapper);qx.bom.Event.addNativeListener(K,v,this._onInputWrapper);},"default":function(L){qx.bom.Event.addNativeListener(L,v,this._onInputWrapper);}}),unregisterEvent:qx.core.Variant.select(u,{"mshtml":function(M,N){if(M.__j){var O=M.tagName.toLowerCase();var P=M.type;if(P===t||P===s||O===p||P===r||P===q){qx.bom.Event.removeNativeListener(M,d,this._onPropertyWrapper);}if(P!==r&&P!==q){qx.bom.Event.removeNativeListener(M,w,this._onChangeValueWrapper);}if(P===t||P===s){qx.bom.Event.removeNativeListener(M,n,this._onKeyPressWrapped);}try{delete M.__j;}catch(Q){M.__j=null;}}},"default":function(R,S){if(S===v){this.__k(R);}else if(S===w){if(R.type===q||R.type===r){qx.bom.Event.removeNativeListener(R,w,this._onChangeCheckedWrapper);}else{qx.bom.Event.removeNativeListener(R,w,this._onChangeValueWrapper);}}if(qx.core.Variant.isSet(u,m)){if(R.type===t||R.type===s){qx.bom.Event.removeNativeListener(R,n,this._onKeyPressWrapped);}}}}),__l:qx.core.Variant.select(u,{"mshtml":null,"webkit":function(T){var U=T.tagName.toLowerCase();if(qx.bom.client.Engine.VERSION<532&&U==p){qx.bom.Event.removeNativeListener(T,n,this._onInputWrapper);}qx.bom.Event.removeNativeListener(T,v,this._onInputWrapper);},"opera":function(V){qx.bom.Event.removeNativeListener(V,c,this._onKeyUpWrapper);qx.bom.Event.removeNativeListener(V,h,this._onKeyDownWrapper);qx.bom.Event.removeNativeListener(V,k,this._onBlurWrapper);qx.bom.Event.removeNativeListener(V,v,this._onInputWrapper);},"default":function(W){qx.bom.Event.removeNativeListener(W,v,this._onInputWrapper);}}),_onKeyPress:qx.core.Variant.select(u,{"mshtml|opera":function(e,X){if(e.keyCode===13){if(X.value!==this.__i){this.__i=X.value;qx.event.Registration.fireEvent(X,w,qx.event.type.Data,[X.value]);}}},"default":null}),_onKeyDown:qx.core.Variant.select(u,{"opera":function(e){if(e.keyCode===13){this.__g=true;}},"default":null}),_onKeyUp:qx.core.Variant.select(u,{"opera":function(e){if(e.keyCode===13){this.__g=false;}},"default":null}),_onBlur:qx.core.Variant.select(u,{"opera":function(e){if(this.__h){window.clearTimeout(this.__h);}},"default":null}),_onInput:qx.event.GlobalError.observeMethod(function(e){var Y=qx.bom.Event.getTarget(e);if(!this.__g){if(qx.core.Variant.isSet(u,m)){this.__h=window.setTimeout(function(){qx.event.Registration.fireEvent(Y,v,qx.event.type.Data,[Y.value]);},0);}else{qx.event.Registration.fireEvent(Y,v,qx.event.type.Data,[Y.value]);}}}),_onChangeValue:qx.event.GlobalError.observeMethod(function(e){var bb=qx.bom.Event.getTarget(e);var ba=bb.value;if(bb.type===b){var ba=[];for(var i=0,o=bb.options,l=o.length;i<l;i++){if(o[i].selected){ba.push(o[i].value);}}}qx.event.Registration.fireEvent(bb,w,qx.event.type.Data,[ba]);}),_onChangeChecked:qx.event.GlobalError.observeMethod(function(e){var bc=qx.bom.Event.getTarget(e);if(bc.type===q){if(bc.checked){qx.event.Registration.fireEvent(bc,w,qx.event.type.Data,[bc.value]);}}else{qx.event.Registration.fireEvent(bc,w,qx.event.type.Data,[bc.checked]);}}),_onProperty:qx.core.Variant.select(u,{"mshtml":qx.event.GlobalError.observeMethod(function(e){var bd=qx.bom.Event.getTarget(e);var be=e.propertyName;if(be===f&&(bd.type===t||bd.type===s||bd.tagName.toLowerCase()===p)){if(!bd.$$inValueSet){qx.event.Registration.fireEvent(bd,v,qx.event.type.Data,[bd.value]);}}else if(be===g){if(bd.type===r){qx.event.Registration.fireEvent(bd,w,qx.event.type.Data,[bd.checked]);}else if(bd.checked){qx.event.Registration.fireEvent(bd,w,qx.event.type.Data,[bd.value]);}}}),"default":function(){}})},defer:function(bf){qx.event.Registration.addHandler(bf);}});})();(function(){var v="",u="select",t="soft",s="off",r="qx.client",q="textarea",p="wrap",o="text",n="mshtml",m="number",d="checkbox",k="select-one",g="input",c="option",b="value",f="radio",e="qx.bom.Input",h="nowrap",a="auto",j="normal";qx.Class.define(e,{statics:{__f:{text:1,textarea:1,select:1,checkbox:1,radio:1,password:1,hidden:1,submit:1,image:1,file:1,search:1,reset:1,button:1},create:function(w,x,y){{};var x=x?qx.lang.Object.clone(x):{};var z;if(w===q||w===u){z=w;}else{z=g;x.type=w;}return qx.bom.Element.create(z,x,y);},setValue:function(A,B){var G=A.nodeName.toLowerCase();var D=A.type;var Array=qx.lang.Array;var H=qx.lang.Type;if(typeof B===m){B+=v;}if((D===d||D===f)){if(H.isArray(B)){A.checked=Array.contains(B,A.value);}else{A.checked=A.value==B;}}else if(G===u){var C=H.isArray(B);var I=A.options;var E,F;for(var i=0,l=I.length;i<l;i++){E=I[i];F=E.getAttribute(b);if(F==null){F=E.text;}E.selected=C?Array.contains(B,F):B==F;}if(C&&B.length==0){A.selectedIndex=-1;}}else if((D===o||D===q)&&qx.core.Variant.isSet(r,n)){A.$$inValueSet=true;A.value=B;A.$$inValueSet=null;}else{A.value=B;}},getValue:function(J){var P=J.nodeName.toLowerCase();if(P===c){return (J.attributes.value||{}).specified?J.value:J.text;}if(P===u){var K=J.selectedIndex;if(K<0){return null;}var Q=[];var S=J.options;var R=J.type==k;var O=qx.bom.Input;var N;for(var i=R?K:0,M=R?K+1:S.length;i<M;i++){var L=S[i];if(L.selected){N=O.getValue(L);if(R){return N;}Q.push(N);}}return Q;}else{return (J.value||v).replace(/\r/g,v);}},setWrap:qx.core.Variant.select(r,{"mshtml":function(T,U){T.wrap=U?t:s;},"gecko|webkit":function(V,W){var Y=W?t:s;var X=W?v:a;V.setAttribute(p,Y);V.style.overflow=X;},"default":function(ba,bb){ba.style.whiteSpace=bb?j:h;}})}});})();(function(){var c="qx.event.type.Data",b="qx.event.type.Event",a="qx.ui.table.ITableModel";qx.Interface.define(a,{events:{"dataChanged":c,"metaDataChanged":b,"sorted":c},members:{getRowCount:function(){},getRowData:function(d){},getColumnCount:function(){},getColumnId:function(e){},getColumnIndexById:function(f){},getColumnName:function(g){},isColumnEditable:function(h){},isColumnSortable:function(i){},sortByColumn:function(j,k){},getSortColumnIndex:function(){},isSortAscending:function(){},prefetchRows:function(l,m){},getValue:function(n,o){},getValueById:function(p,q){},setValue:function(r,s,t){},setValueById:function(u,v,w){}}});})();(function(){var e="metaDataChanged",d="qx.event.type.Data",c="qx.event.type.Event",b="abstract",a="qx.ui.table.model.Abstract";qx.Class.define(a,{type:b,extend:qx.core.Object,implement:qx.ui.table.ITableModel,events:{"dataChanged":d,"metaDataChanged":c,"sorted":d},construct:function(){qx.core.Object.call(this);this.__vM=[];this.__vN=[];this.__vO={};},members:{__vM:null,__vN:null,__vO:null,__vP:null,init:function(f){},getRowCount:function(){throw new Error("getRowCount is abstract");},getRowData:function(g){return null;},isColumnEditable:function(h){return false;},isColumnSortable:function(j){return false;},sortByColumn:function(k,l){},getSortColumnIndex:function(){return -1;},isSortAscending:function(){return true;},prefetchRows:function(m,n){},getValue:function(o,p){throw new Error("getValue is abstract");},getValueById:function(q,r){return this.getValue(this.getColumnIndexById(q),r);},setValue:function(s,t,u){throw new Error("setValue is abstract");},setValueById:function(v,w,x){this.setValue(this.getColumnIndexById(v),w,x);},getColumnCount:function(){return this.__vM.length;},getColumnIndexById:function(y){return this.__vO[y];},getColumnId:function(z){return this.__vM[z];},getColumnName:function(A){return this.__vN[A];},setColumnIds:function(B){this.__vM=B;this.__vO={};for(var i=0;i<B.length;i++){this.__vO[B[i]]=i;}this.__vN=new Array(B.length);if(!this.__vP){this.fireEvent(e);}},setColumnNamesByIndex:function(C){if(this.__vM.length!=C.length){throw new Error("this.__columnIdArr and columnNameArr have different length: "+this.__vM.length+" != "+C.length);}this.__vN=C;this.fireEvent(e);},setColumnNamesById:function(D){this.__vN=new Array(this.__vM.length);for(var i=0;i<this.__vM.length;++i){this.__vN[i]=D[this.__vM[i]];}},setColumns:function(E,F){var G=this.__vM.length==0||F;if(F==null){if(this.__vM.length==0){F=E;}else{F=this.__vM;}}if(F.length!=E.length){throw new Error("columnIdArr and columnNameArr have different length: "+F.length+" != "+E.length);}if(G){this.__vP=true;this.setColumnIds(F);this.__vP=false;}this.setColumnNamesByIndex(E);}},destruct:function(){this.__vM=this.__vN=this.__vO=null;}});})();(function(){var e="dataChanged",d="metaDataChanged",c="qx.ui.table.model.Simple",b="Boolean",a="sorted";qx.Class.define(c,{extend:qx.ui.table.model.Abstract,construct:function(){qx.ui.table.model.Abstract.call(this);this.__xM=[];this.__xN=-1;this.__xO=[];this.__xP=null;},properties:{caseSensitiveSorting:{check:b,init:true}},statics:{_defaultSortComparatorAscending:function(f,g){var h=f[arguments.callee.columnIndex];var k=g[arguments.callee.columnIndex];if(qx.lang.Type.isNumber(h)&&qx.lang.Type.isNumber(k)){var l=isNaN(h)?isNaN(k)?0:1:isNaN(k)?-1:null;if(l!=null){return l;}}return (h>k)?1:((h==k)?0:-1);},_defaultSortComparatorInsensitiveAscending:function(m,n){var o=(m[arguments.callee.columnIndex].toLowerCase?m[arguments.callee.columnIndex].toLowerCase():m[arguments.callee.columnIndex]);var p=(n[arguments.callee.columnIndex].toLowerCase?n[arguments.callee.columnIndex].toLowerCase():n[arguments.callee.columnIndex]);if(qx.lang.Type.isNumber(o)&&qx.lang.Type.isNumber(p)){var q=isNaN(o)?isNaN(p)?0:1:isNaN(p)?-1:null;if(q!=null){return q;}}return (o>p)?1:((o==p)?0:-1);},_defaultSortComparatorDescending:function(r,s){var t=r[arguments.callee.columnIndex];var u=s[arguments.callee.columnIndex];if(qx.lang.Type.isNumber(t)&&qx.lang.Type.isNumber(u)){var v=isNaN(t)?isNaN(u)?0:1:isNaN(u)?-1:null;if(v!=null){return v;}}return (t<u)?1:((t==u)?0:-1);},_defaultSortComparatorInsensitiveDescending:function(w,x){var y=(w[arguments.callee.columnIndex].toLowerCase?w[arguments.callee.columnIndex].toLowerCase():w[arguments.callee.columnIndex]);var z=(x[arguments.callee.columnIndex].toLowerCase?x[arguments.callee.columnIndex].toLowerCase():x[arguments.callee.columnIndex]);if(qx.lang.Type.isNumber(y)&&qx.lang.Type.isNumber(z)){var A=isNaN(y)?isNaN(z)?0:1:isNaN(z)?-1:null;if(A!=null){return A;}}return (y<z)?1:((y==z)?0:-1);}},members:{__xM:null,__xP:null,__xQ:null,__xO:null,__xN:null,__xR:null,getRowData:function(B){var C=this.__xM[B];if(C==null||C.originalData==null){return C;}else{return C.originalData;}},getRowDataAsMap:function(D){var F=this.__xM[D];if(F!=null){var E={};for(var G=0;G<this.getColumnCount();G++){E[this.getColumnId(G)]=F[G];}if(F.originalData!=null){for(var H in F.originalData){if(E[H]==undefined){E[H]=F.originalData[H];}}}return E;}return (F&&F.originalData)?F.originalData:null;},getDataAsMapArray:function(){var J=this.getRowCount();var I=[];for(var i=0;i<J;i++){I.push(this.getRowDataAsMap(i));}return I;},setEditable:function(K){this.__xP=[];for(var L=0;L<this.getColumnCount();L++){this.__xP[L]=K;}this.fireEvent(d);},setColumnEditable:function(M,N){if(N!=this.isColumnEditable(M)){if(this.__xP==null){this.__xP=[];}this.__xP[M]=N;this.fireEvent(d);}},isColumnEditable:function(O){return this.__xP?(this.__xP[O]==true):false;},setColumnSortable:function(P,Q){if(Q!=this.isColumnSortable(P)){if(this.__xQ==null){this.__xQ=[];}this.__xQ[P]=Q;this.fireEvent(d);}},isColumnSortable:function(R){return (this.__xQ?(this.__xQ[R]!==false):true);},sortByColumn:function(S,T){var W;var V=this.__xO[S];if(V){W=(T?V.ascending:V.descending);}else{if(this.getCaseSensitiveSorting()){W=(T?qx.ui.table.model.Simple._defaultSortComparatorAscending:qx.ui.table.model.Simple._defaultSortComparatorDescending);}else{W=(T?qx.ui.table.model.Simple._defaultSortComparatorInsensitiveAscending:qx.ui.table.model.Simple._defaultSortComparatorInsensitiveDescending);}}W.columnIndex=S;this.__xM.sort(W);this.__xN=S;this.__xR=T;var U={columnIndex:S,ascending:T};this.fireDataEvent(a,U);this.fireEvent(d);},setSortMethods:function(X,Y){var ba;if(qx.lang.Type.isFunction(Y)){ba={ascending:Y,descending:function(bb,bc){return Y(bc,bb);}};}else{ba=Y;}this.__xO[X]=ba;},getSortMethods:function(bd){return this.__xO[bd];},clearSorting:function(){if(this.__xN!=-1){this.__xN=-1;this.__xR=true;this.fireEvent(d);}},getSortColumnIndex:function(){return this.__xN;},_setSortColumnIndex:function(be){this.__xN=be;},isSortAscending:function(){return this.__xR;},_setSortAscending:function(bf){this.__xR=bf;},getRowCount:function(){return this.__xM.length;},getValue:function(bg,bh){if(bh<0||bh>=this.__xM.length){throw new Error("this.__rowArr out of bounds: "+bh+" (0.."+this.__xM.length+")");}return this.__xM[bh][bg];},setValue:function(bi,bj,bk){if(this.__xM[bj][bi]!=bk){this.__xM[bj][bi]=bk;if(this.hasListener(e)){var bl={firstRow:bj,lastRow:bj,firstColumn:bi,lastColumn:bi};this.fireDataEvent(e,bl);}if(bi==this.__xN){this.clearSorting();}}},setData:function(bm,bn){this.__xM=bm;if(this.hasListener(e)){var bo={firstRow:0,lastRow:bm.length-1,firstColumn:0,lastColumn:this.getColumnCount()-1};this.fireDataEvent(e,bo);}if(bn!==false){this.clearSorting();}},getData:function(){return this.__xM;},setDataAsMapArray:function(bp,bq,br){this.setData(this._mapArray2RowArr(bp,bq),br);},addRows:function(bs,bt,bu){if(bt==null){bt=this.__xM.length;}bs.splice(0,0,bt,0);Array.prototype.splice.apply(this.__xM,bs);var bv={firstRow:bt,lastRow:this.__xM.length-1,firstColumn:0,lastColumn:this.getColumnCount()-1};this.fireDataEvent(e,bv);if(bu!==false){this.clearSorting();}},addRowsAsMapArray:function(bw,bx,by,bz){this.addRows(this._mapArray2RowArr(bw,by),bx,bz);},setRows:function(bA,bB,bC){if(bB==null){bB=0;}bA.splice(0,0,bB,bA.length);Array.prototype.splice.apply(this.__xM,bA);var bD={firstRow:bB,lastRow:this.__xM.length-1,firstColumn:0,lastColumn:this.getColumnCount()-1};this.fireDataEvent(e,bD);if(bC!==false){this.clearSorting();}},setRowsAsMapArray:function(bE,bF,bG,bH){this.setRows(this._mapArray2RowArr(bE,bG),bF,bH);},removeRows:function(bI,bJ,bK){this.__xM.splice(bI,bJ);var bL={firstRow:bI,lastRow:this.__xM.length-1,firstColumn:0,lastColumn:this.getColumnCount()-1,removeStart:bI,removeCount:bJ};this.fireDataEvent(e,bL);if(bK!==false){this.clearSorting();}},_mapArray2RowArr:function(bM,bN){var bR=bM.length;var bO=this.getColumnCount();var bQ=new Array(bR);var bP;for(var i=0;i<bR;++i){bP=[];if(bN){bP.originalData=bM[i];}for(var j=0;j<bO;++j){bP[j]=bM[i][this.getColumnId(j)];}bQ[i]=bP;}return bQ;}},destruct:function(){this.__xM=this.__xP=this.__xO=this.__xQ=null;}});})();(function(){var a="qx.ui.table.ICellEditorFactory";qx.Interface.define(a,{members:{createCellEditor:function(b){return true;},getCellEditorValue:function(c){return true;}}});})();(function(){var f="",e="Function",d="abstract",c="number",b="appear",a="qx.ui.table.celleditor.AbstractField";qx.Class.define(a,{extend:qx.core.Object,implement:qx.ui.table.ICellEditorFactory,type:d,properties:{validationFunction:{check:e,nullable:true,init:null}},members:{_createEditor:function(){throw new Error("Abstract method call!");},createCellEditor:function(g){var h=this._createEditor();h.originalValue=g.value;if(g.value===null||g.value===undefined){g.value=f;}h.setValue(f+g.value);h.addListener(b,function(){h.selectAllText();});return h;},getCellEditorValue:function(i){var k=i.getValue();var j=this.getValidationFunction();if(j){k=j(k,i.originalValue);}if(typeof i.originalValue==c){k=parseFloat(k);}return k;}}});})();(function(){var c="number",b="qx.ui.table.celleditor.TextField",a="table-editor-textfield";qx.Class.define(b,{extend:qx.ui.table.celleditor.AbstractField,members:{getCellEditorValue:function(d){var f=d.getValue();var e=this.getValidationFunction();if(e){f=e(f,d.originalValue);}if(typeof d.originalValue==c){if(f!=null){f=parseFloat(f);}}return f;},_createEditor:function(){var g=new qx.ui.form.TextField();g.setAppearance(a);return g;}}});})();(function(){var a="qx.ui.table.IHeaderRenderer";qx.Interface.define(a,{members:{createHeaderCell:function(b){return true;},updateHeaderCell:function(c,d){return true;}}});})();(function(){var b="qx.ui.table.headerrenderer.Default",a="String";qx.Class.define(b,{extend:qx.core.Object,implement:qx.ui.table.IHeaderRenderer,statics:{STATE_SORTED:"sorted",STATE_SORTED_ASCENDING:"sortedAscending"},properties:{toolTip:{check:a,init:null,nullable:true}},members:{createHeaderCell:function(c){var d=new qx.ui.table.headerrenderer.HeaderCell();this.updateHeaderCell(c,d);return d;},updateHeaderCell:function(e,f){var g=qx.ui.table.headerrenderer.Default;if(e.name&&e.name.translate){f.setLabel(e.name.translate());}else{f.setLabel(e.name);}var h=f.getToolTip();if(this.getToolTip()!=null){if(h==null){h=new qx.ui.tooltip.ToolTip(this.getToolTip());f.setToolTip(h);qx.util.DisposeUtil.disposeTriggeredBy(h,f);}else{h.setLabel(this.getToolTip());}}e.sorted?f.addState(g.STATE_SORTED):f.removeState(g.STATE_SORTED);e.sortedAscending?f.addState(g.STATE_SORTED_ASCENDING):f.removeState(g.STATE_SORTED_ASCENDING);}}});})();(function(){var l="qx.client",k="head",j="text/css",h="stylesheet",g="}",f='@import "',e="{",d='";',c="qx.bom.Stylesheet",b="link",a="style";qx.Class.define(c,{statics:{includeFile:function(m,n){if(!n){n=document;}var o=n.createElement(b);o.type=j;o.rel=h;o.href=qx.util.ResourceManager.getInstance().toUri(m);var p=n.getElementsByTagName(k)[0];p.appendChild(o);},createElement:qx.core.Variant.select(l,{"mshtml":function(q){var r=document.createStyleSheet();if(q){r.cssText=q;}return r;},"default":function(s){var t=document.createElement(a);t.type=j;if(s){t.appendChild(document.createTextNode(s));}document.getElementsByTagName(k)[0].appendChild(t);return t.sheet;}}),addRule:qx.core.Variant.select(l,{"mshtml":function(u,v,w){u.addRule(v,w);},"default":function(x,y,z){x.insertRule(y+e+z+g,x.cssRules.length);}}),removeRule:qx.core.Variant.select(l,{"mshtml":function(A,B){var C=A.rules;var D=C.length;for(var i=D-1;i>=0;--i){if(C[i].selectorText==B){A.removeRule(i);}}},"default":function(E,F){var G=E.cssRules;var H=G.length;for(var i=H-1;i>=0;--i){if(G[i].selectorText==F){E.deleteRule(i);}}}}),removeAllRules:qx.core.Variant.select(l,{"mshtml":function(I){var J=I.rules;var K=J.length;for(var i=K-1;i>=0;i--){I.removeRule(i);}},"default":function(L){var M=L.cssRules;var N=M.length;for(var i=N-1;i>=0;i--){L.deleteRule(i);}}}),addImport:qx.core.Variant.select(l,{"mshtml":function(O,P){O.addImport(P);},"default":function(Q,R){Q.insertRule(f+R+d,Q.cssRules.length);}}),removeImport:qx.core.Variant.select(l,{"mshtml":function(S,T){var U=S.imports;var V=U.length;for(var i=V-1;i>=0;i--){if(U[i].href==T){S.removeImport(i);}}},"default":function(W,X){var Y=W.cssRules;var ba=Y.length;for(var i=ba-1;i>=0;i--){if(Y[i].href==X){W.deleteRule(i);}}}}),removeAllImports:qx.core.Variant.select(l,{"mshtml":function(bb){var bc=bb.imports;var bd=bc.length;for(var i=bd-1;i>=0;i--){bb.removeImport(i);}},"default":function(be){var bf=be.cssRules;var bg=bf.length;for(var i=bg-1;i>=0;i--){if(bf[i].type==bf[i].IMPORT_RULE){be.deleteRule(i);}}}})}});})();(function(){var a="qx.ui.table.ICellRenderer";qx.Interface.define(a,{members:{createDataCellHtml:function(b,c){return true;}}});})();(function(){var j="",i="px;",h=".qooxdoo-table-cell {",g="qooxdoo-table-cell",f='" ',e="nowrap",d="default",c="qx.client",b="}",a="width:",H=".qooxdoo-table-cell-right { text-align:right } ",G="0px 6px",F='<div class="',E="0px",D="height:",C="1px solid ",B=".qooxdoo-table-cell-bold { font-weight:bold } ",A="table-row-line",z="String",y='>',q="mshtml",r='</div>',o="ellipsis",p="content-box",m='left:',n="qx.ui.table.cellrenderer.Abstract",k='" style="',l="abstract",s="none",t="hidden",v="} ",u='px;',x=".qooxdoo-table-cell-italic { font-style:italic} ",w="absolute";qx.Class.define(n,{type:l,implement:qx.ui.table.ICellRenderer,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);var I=qx.ui.table.cellrenderer.Abstract;if(!I.__wp){var K=qx.theme.manager.Color.getInstance();I.__wp=this.self(arguments);var J=h+qx.bom.element.Style.compile({position:w,top:E,overflow:t,whiteSpace:e,borderRight:C+K.resolve(A),padding:G,cursor:d,textOverflow:o,userSelect:s})+v+H+x+B;if(!qx.core.Variant.isSet(c,q)){J+=h+qx.bom.element.BoxSizing.compile(p)+b;}I.__wp.stylesheet=qx.bom.Stylesheet.createElement(J);}},properties:{defaultCellStyle:{init:null,check:z,nullable:true}},members:{_insetX:6+6+1,_insetY:0,_getCellClass:function(L){return g;},_getCellStyle:function(M){return M.style||j;},_getCellAttributes:function(N){return j;},_getContentHtml:function(O){return O.value||j;},_getCellSizeStyle:function(P,Q,R,S){var T=j;if(qx.bom.client.Feature.CONTENT_BOX){P-=R;Q-=S;}T+=a+Math.max(P,0)+i;T+=D+Math.max(Q,0)+i;return T;},createDataCellHtml:function(U,V){V.push(F,this._getCellClass(U),k,m,U.styleLeft,u,this._getCellSizeStyle(U.styleWidth,U.styleHeight,this._insetX,this._insetY),this._getCellStyle(U),f,this._getCellAttributes(U),y+this._getContentHtml(U),r);}}});})();(function(){var h="",g="number",f="Boolean",e="qx.ui.table.cellrenderer.Default",d=" qooxdoo-table-cell-bold",c=" qooxdoo-table-cell-right",b=" qooxdoo-table-cell-italic",a="string";qx.Class.define(e,{extend:qx.ui.table.cellrenderer.Abstract,statics:{STYLEFLAG_ALIGN_RIGHT:1,STYLEFLAG_BOLD:2,STYLEFLAG_ITALIC:4,_numberFormat:null},properties:{useAutoAlign:{check:f,init:true}},members:{_getStyleFlags:function(i){if(this.getUseAutoAlign()){if(typeof i.value==g){return qx.ui.table.cellrenderer.Default.STYLEFLAG_ALIGN_RIGHT;}}return 0;},_getCellClass:function(j){var k=qx.ui.table.cellrenderer.Abstract.prototype._getCellClass.call(this,j);if(!k){return h;}var l=this._getStyleFlags(j);if(l&qx.ui.table.cellrenderer.Default.STYLEFLAG_ALIGN_RIGHT){k+=c;}if(l&qx.ui.table.cellrenderer.Default.STYLEFLAG_BOLD){k+=d;}if(l&qx.ui.table.cellrenderer.Default.STYLEFLAG_ITALIC){k+=b;}return k;},_getContentHtml:function(m){return qx.bom.String.escape(this._formatValue(m));},_formatValue:function(n){var p=n.value;var o;if(p==null){return h;}if(typeof p==a){return p;}else if(typeof p==g){if(!qx.ui.table.cellrenderer.Default._numberFormat){qx.ui.table.cellrenderer.Default._numberFormat=new qx.util.format.NumberFormat();qx.ui.table.cellrenderer.Default._numberFormat.setMaximumFractionDigits(2);}var o=qx.ui.table.cellrenderer.Default._numberFormat.format(p);}else if(p instanceof Date){o=qx.util.format.DateFormat.getDateInstance().format(p);}else{o=p;}return o;}}});})();(function(){var k="qx.event.type.Data",j="visibilityChanged",h="orderChanged",g="visibilityChangedPre",f="__wv",e="__ww",d="widthChanged",c="qx.ui.table.columnmodel.Basic",b="__wx",a="headerCellRendererChanged";qx.Class.define(c,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__wq=[];this.__wr=[];},events:{"widthChanged":k,"visibilityChangedPre":k,"visibilityChanged":k,"orderChanged":k,"headerCellRendererChanged":k},statics:{DEFAULT_WIDTH:100,DEFAULT_HEADER_RENDERER:qx.ui.table.headerrenderer.Default,DEFAULT_DATA_RENDERER:qx.ui.table.cellrenderer.Default,DEFAULT_EDITOR_FACTORY:qx.ui.table.celleditor.TextField},members:{__ws:null,__wt:null,__wr:null,__wq:null,__wu:null,__wv:null,__ww:null,__wx:null,init:function(l,m){{};this.__wu=[];var q=qx.ui.table.columnmodel.Basic.DEFAULT_WIDTH;var r=this.__wv||(this.__wv=new qx.ui.table.columnmodel.Basic.DEFAULT_HEADER_RENDERER());var o=this.__ww||(this.__ww=new qx.ui.table.columnmodel.Basic.DEFAULT_DATA_RENDERER());var n=this.__wx||(this.__wx=new qx.ui.table.columnmodel.Basic.DEFAULT_EDITOR_FACTORY());this.__wq=[];this.__wr=[];var t;if(m){t=m.getInitiallyHiddenColumns();}t=t||[];for(var u=0;u<l;u++){this.__wu[u]={width:q,headerRenderer:r,dataRenderer:o,editorFactory:n};this.__wq[u]=u;this.__wr[u]=u;}this.__wt=null;this.__ws=true;for(var s=0;s<t.length;s++){this.setColumnVisible(t[s],false);}this.__ws=false;for(u=0;u<l;u++){var p={col:u,visible:this.isColumnVisible(u)};this.fireDataEvent(g,p);this.fireDataEvent(j,p);}},getVisibleColumns:function(){return this.__wr!=null?this.__wr:[];},setColumnWidth:function(v,w,y){{};var A=this.__wu[v].width;if(A!=w){this.__wu[v].width=w;var z={col:v,newWidth:w,oldWidth:A,isMouseAction:y||false};this.fireDataEvent(d,z);}},getColumnWidth:function(B){{};return this.__wu[B].width;},setHeaderCellRenderer:function(C,D){{};var E=this.__wu[C].headerRenderer;if(E!==this.__wv){E.dispose();}this.__wu[C].headerRenderer=D;this.fireDataEvent(a,{col:C});},getHeaderCellRenderer:function(F){{};return this.__wu[F].headerRenderer;},setDataCellRenderer:function(G,H){{};this.__wu[G].dataRenderer=H;var I=this.__wu[G].dataRenderer;if(I!==this.__ww){return I;}return null;},getDataCellRenderer:function(J){{};return this.__wu[J].dataRenderer;},setCellEditorFactory:function(K,L){{};var M=this.__wu[K].headerRenderer;if(M!==this.__wx){M.dispose();}this.__wu[K].editorFactory=L;},getCellEditorFactory:function(N){{};return this.__wu[N].editorFactory;},_getColToXPosMap:function(){if(this.__wt==null){this.__wt={};for(var Q=0;Q<this.__wq.length;Q++){var P=this.__wq[Q];this.__wt[P]={overX:Q};}for(var O=0;O<this.__wr.length;O++){var P=this.__wr[O];this.__wt[P].visX=O;}}return this.__wt;},getVisibleColumnCount:function(){return this.__wr!=null?this.__wr.length:0;},getVisibleColumnAtX:function(R){{};return this.__wr[R];},getVisibleX:function(S){{};return this._getColToXPosMap()[S].visX;},getOverallColumnCount:function(){return this.__wq.length;},getOverallColumnAtX:function(T){{};return this.__wq[T];},getOverallX:function(U){{};return this._getColToXPosMap()[U].overX;},isColumnVisible:function(V){{};return (this._getColToXPosMap()[V].visX!=null);},setColumnVisible:function(W,X){{};if(X!=this.isColumnVisible(W)){if(X){var be=this._getColToXPosMap();var bb=be[W].overX;if(bb==null){throw new Error("Showing column failed: "+W+". The column is not added to this TablePaneModel.");}var bc;for(var x=bb+1;x<this.__wq.length;x++){var bd=this.__wq[x];var Y=be[bd].visX;if(Y!=null){bc=Y;break;}}if(bc==null){bc=this.__wr.length;}this.__wr.splice(bc,0,W);}else{var ba=this.getVisibleX(W);this.__wr.splice(ba,1);}this.__wt=null;if(!this.__ws){var bf={col:W,visible:X};this.fireDataEvent(g,bf);this.fireDataEvent(j,bf);}}},moveColumn:function(bg,bh){{};this.__ws=true;var bk=this.__wq[bg];var bi=this.isColumnVisible(bk);if(bi){this.setColumnVisible(bk,false);}this.__wq.splice(bg,1);this.__wq.splice(bh,0,bk);this.__wt=null;if(bi){this.setColumnVisible(bk,true);}this.__ws=false;var bj={col:bk,fromOverXPos:bg,toOverXPos:bh};this.fireDataEvent(h,bj);},setColumnsOrder:function(bl){{};if(bl.length==this.__wq.length){this.__ws=true;var bo=new Array(bl.length);for(var bm=0;bm<this.__wq.length;bm++){var bn=this.isColumnVisible(bm);bo[bm]=bn;if(bn){this.setColumnVisible(bm,false);}}this.__wq=qx.lang.Array.clone(bl);this.__wt=null;for(var bm=0;bm<this.__wq.length;bm++){if(bo[bm]){this.setColumnVisible(bm,true);}}this.__ws=false;this.fireDataEvent(h);}else{throw new Error("setColumnsOrder: Invalid number of column positions given, expected "+this.__wq.length+", got "+bl.length);}}},destruct:function(){for(var i=0;i<this.__wu.length;i++){this.__wu[i].headerRenderer.dispose();this.__wu[i].dataRenderer.dispose();this.__wu[i].editorFactory.dispose();}this.__wq=this.__wr=this.__wu=this.__wt=null;this._disposeObjects(f,e,b);}});})();(function(){var n="appear",m="columnVisibilityMenuCreateEnd",l="tableWidthChanged",k="verticalScrollBarChanged",j="qx.ui.table.columnmodel.resizebehavior.Abstract",i="qx.ui.table.columnmodel.Resize",h="_applyBehavior",g="separator",f="visibilityChanged",e="Reset column widths",b="changeBehavior",d="user-button",c="widthChanged",a="execute";qx.Class.define(i,{extend:qx.ui.table.columnmodel.Basic,include:qx.locale.MTranslation,construct:function(){qx.ui.table.columnmodel.Basic.call(this);this.__yb=false;this.__yc=false;},properties:{behavior:{check:j,init:null,nullable:true,apply:h,event:b}},members:{__yc:null,__yb:null,__yd:null,_applyBehavior:function(p,q){if(q!=null){q.dispose();q=null;}p._setNumColumns(this.getOverallColumnCount());p.setTableColumnModel(this);},init:function(r,s){qx.ui.table.columnmodel.Basic.prototype.init.call(this,r,s);if(this.__yd==null){this.__yd=s;s.addListener(n,this._onappear,this);s.addListener(l,this._onTableWidthChanged,this);s.addListener(k,this._onverticalscrollbarchanged,this);s.addListener(m,this._addResetColumnWidthButton,this);this.addListener(c,this._oncolumnwidthchanged,this);this.addListener(f,this._onvisibilitychanged,this);}if(this.getBehavior()==null){this.setBehavior(new qx.ui.table.columnmodel.resizebehavior.Default());}this.getBehavior()._setNumColumns(r);},getTable:function(){return this.__yd;},_addResetColumnWidthButton:function(event){var v=event.getData();var u=v.columnButton;var t=v.menu;var o;o=u.factory(g);t.add(o);o=u.factory(d,{text:this.tr(e)});t.add(o);o.addListener(a,this._onappear,this);},_onappear:function(event){if(this.__yb){return ;}this.__yb=true;{};this.getBehavior().onAppear(event,event.getType()!==n);this.__yd._updateScrollerWidths();this.__yd._updateScrollBarVisibility();this.__yb=false;this.__yc=true;},_onTableWidthChanged:function(event){if(this.__yb||!this.__yc){return ;}this.__yb=true;{};this.getBehavior().onTableWidthChanged(event);this.__yb=false;},_onverticalscrollbarchanged:function(event){if(this.__yb||!this.__yc){return ;}this.__yb=true;{};this.getBehavior().onVerticalScrollBarChanged(event);qx.event.Timer.once(function(){if(this.__yd&&!this.__yd.isDisposed()){this.__yd._updateScrollerWidths();this.__yd._updateScrollBarVisibility();}},this,0);this.__yb=false;},_oncolumnwidthchanged:function(event){if(this.__yb||!this.__yc){return ;}this.__yb=true;{};this.getBehavior().onColumnWidthChanged(event);this.__yb=false;},_onvisibilitychanged:function(event){if(this.__yb||!this.__yc){return ;}this.__yb=true;{};this.getBehavior().onVisibilityChanged(event);this.__yb=false;}},destruct:function(){this.__yd=null;}});})();(function(){var i="icon",h="label",g="String",f="sort-icon",e="_applySortIcon",d="_applyIcon",c="table-header-cell",b="qx.ui.table.headerrenderer.HeaderCell",a="_applyLabel";qx.Class.define(b,{extend:qx.ui.container.Composite,construct:function(){qx.ui.container.Composite.call(this);var j=new qx.ui.layout.Grid();j.setRowFlex(0,1);j.setColumnFlex(1,1);j.setColumnFlex(2,1);this.setLayout(j);},properties:{appearance:{refine:true,init:c},label:{check:g,init:null,nullable:true,apply:a},sortIcon:{check:g,init:null,nullable:true,apply:e,themeable:true},icon:{check:g,init:null,nullable:true,apply:d}},members:{_applyLabel:function(k,l){if(k){this._showChildControl(h).setValue(k);}else{this._excludeChildControl(h);}},_applySortIcon:function(m,n){if(m){this._showChildControl(f).setSource(m);}else{this._excludeChildControl(f);}},_applyIcon:function(o,p){if(o){this._showChildControl(i).setSource(o);}else{this._excludeChildControl(i);}},_createChildControlImpl:function(q,r){var s;switch(q){case h:s=new qx.ui.basic.Label(this.getLabel()).set({anonymous:true,allowShrinkX:true});this._add(s,{row:0,column:1});break;case f:s=new qx.ui.basic.Image(this.getSortIcon());s.setAnonymous(true);this._add(s,{row:0,column:2});break;case i:s=new qx.ui.basic.Image(this.getIcon()).set({anonymous:true,allowShrinkX:true});this._add(s,{row:0,column:0});break;}return s||qx.ui.container.Composite.prototype._createChildControlImpl.call(this,q);}}});})();(function(){var e="qx.ui.popup.Popup",d="visible",c="excluded",b="popup",a="Boolean";qx.Class.define(e,{extend:qx.ui.container.Composite,include:qx.ui.core.MPlacement,construct:function(f){qx.ui.container.Composite.call(this,f);qx.core.Init.getApplication().getRoot().add(this);this.initVisibility();},properties:{appearance:{refine:true,init:b},visibility:{refine:true,init:c},autoHide:{check:a,init:true}},members:{_applyVisibility:function(g,h){qx.ui.container.Composite.prototype._applyVisibility.call(this,g,h);var i=qx.ui.popup.Manager.getInstance();g===d?i.add(this):i.remove(this);}},destruct:function(){qx.ui.popup.Manager.getInstance().remove(this);}});})();(function(){var l="atom",k="Integer",j="String",i="_applyRich",h="qx.ui.tooltip.ToolTip",g="_applyIcon",f="tooltip",d="qx.ui.core.Widget",c="mouseover",b="Boolean",a="_applyLabel";qx.Class.define(h,{extend:qx.ui.popup.Popup,construct:function(m,n){qx.ui.popup.Popup.call(this);this.setLayout(new qx.ui.layout.Grow);this._createChildControl(l);if(m!=null){this.setLabel(m);}if(n!=null){this.setIcon(n);}this.addListener(c,this._onMouseOver,this);},properties:{appearance:{refine:true,init:f},showTimeout:{check:k,init:700,themeable:true},hideTimeout:{check:k,init:4000,themeable:true},label:{check:j,nullable:true,apply:a},icon:{check:j,nullable:true,apply:g,themeable:true},rich:{check:b,init:false,apply:i},opener:{check:d,nullable:true}},members:{_createChildControlImpl:function(o,p){var q;switch(o){case l:q=new qx.ui.basic.Atom;this._add(q);break;}return q||qx.ui.popup.Popup.prototype._createChildControlImpl.call(this,o);},_onMouseOver:function(e){this.hide();},_applyIcon:function(r,s){var t=this.getChildControl(l);r==null?t.resetIcon():t.setIcon(r);},_applyLabel:function(u,v){var w=this.getChildControl(l);u==null?w.resetLabel():w.setLabel(u);},_applyRich:function(x,y){var z=this.getChildControl(l);z.setRich(x);}}});})();(function(){var f="mousedown",d="__rz",c="blur",b="singleton",a="qx.ui.popup.Manager";qx.Class.define(a,{type:b,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__rz=[];qx.event.Registration.addListener(document.documentElement,f,this.__rB,this,true);qx.bom.Element.addListener(window,c,this.hideAll,this);},members:{__rz:null,add:function(g){{};this.__rz.push(g);this.__rA();},remove:function(h){{};if(this.__rz){qx.lang.Array.remove(this.__rz,h);this.__rA();}},hideAll:function(){if(this.__rz){for(var i=0;i<this.__rz.length;i++){this.__rz[i].exclude();}}},__rA:function(){var j=1e7;for(var i=0;i<this.__rz.length;i++){this.__rz[i].setZIndex(j++);}},__rB:function(e){var l=qx.ui.core.Widget.getWidgetByElement(e.getTarget());var m=this.__rz;for(var i=0;i<m.length;i++){var k=m[i];if(!k.getAutoHide()||l==k||qx.ui.core.Widget.contains(k,l)){continue;}k.exclude();}}},destruct:function(){qx.event.Registration.removeListener(document.documentElement,f,this.__rB,this,true);this._disposeArray(d);}});})();(function(){var bD="(\\d\\d?)",bC="format",bB="",bA="abbreviated",bz="wide",by="(",bx=")",bw="|",bv="stand-alone",bu="wildcard",bj="default",bi="literal",bh="'",bg="hour",bf="(\\d\\d?\\d?)",be="ms",bd="narrow",bc="-",bb="quoted_literal",ba='a',bK="HH:mm:ss",bL="+",bI="HHmmss",bJ="long",bG='z',bH="0",bE="sec",bF="day",bM='Z',bN=" ",bn="min",bm="mm",bp="(\\d+)",bo="h",br="KK",bq='L',bt="Z",bs="(\\d\\d+)",bl="EEEE",bk="^",a=":",b='y',c="K",d="a",e="([\\+\\-]\\d\\d:?\\d\\d)",f="GMT",g="dd",h="qx.util.format.DateFormat",j="yyy",k="H",bR="YYYY",bQ="y",bP="HH",bO="EE",bV='h',bU="S",bT='s',bS='A',bX="yyyyyy",bW="kk",J="ss",K='H',H='S',I="MMMM",N='c',O="d",L="([a-zA-Z]+)",M='k',F="m",G='Y',s='D',r="yyyyy",u='K',t="hh",o="SSS",n="MM",q="yy",p="(\\d\\d\\d\\d\\d\\d+)",m="yyyy-MM-dd HH:mm:ss",l="(\\d\\d\\d\\d\\d+)",T="short",U='d',V="unkown",W='m',P="(\\d\\d\\d\\d)",Q="(\\d\\d\\d+)",R="k",S='M',X="(\\d\\d\\d\\d+)",Y="SS",C="MMM",B="s",A="M",z='w',y="EEE",x="$",w="?",v='E',E="z",D="yyyy";qx.Class.define(h,{extend:qx.core.Object,implement:qx.util.format.IFormat,construct:function(bY,ca){qx.core.Object.call(this);if(!ca){this.__wy=qx.locale.Manager.getInstance().getLocale();}else{this.__wy=ca;}if(bY!=null){this.__wz=bY.toString();}else{this.__wz=qx.locale.Date.getDateFormat(bJ,this.__wy)+bN+qx.locale.Date.getDateTimeFormat(bI,bK,this.__wy);}},statics:{getDateTimeInstance:function(){var cc=qx.util.format.DateFormat;var cb=qx.locale.Date.getDateFormat(bJ)+bN+qx.locale.Date.getDateTimeFormat(bI,bK);if(cc._dateInstance==null||cc._dateInstance.__wz!=cb){cc._dateTimeInstance=new cc();}return cc._dateTimeInstance;},getDateInstance:function(){var ce=qx.util.format.DateFormat;var cd=qx.locale.Date.getDateFormat(T)+bB;if(ce._dateInstance==null||ce._dateInstance.__wz!=cd){ce._dateInstance=new ce(cd);}return ce._dateInstance;},ASSUME_YEAR_2000_THRESHOLD:30,LOGGING_DATE_TIME__format:m,AM_MARKER:"am",PM_MARKER:"pm",MEDIUM_TIMEZONE_NAMES:["GMT"],FULL_TIMEZONE_NAMES:["Greenwich Mean Time"]},members:{__wy:null,__wz:null,__wA:null,__wB:null,__wC:null,__wD:function(cf,cg){var ch=bB+cf;while(ch.length<cg){ch=bH+ch;}return ch;},__wE:function(ci){var cj=new Date(ci.getTime());var ck=cj.getDate();while(cj.getMonth()!=0){cj.setDate(-1);ck+=cj.getDate()+1;}return ck;},__wF:function(cl){return new Date(cl.getTime()+(3-((cl.getDay()+6)%7))*86400000);},__wG:function(cm){var co=this.__wF(cm);var cp=co.getFullYear();var cn=this.__wF(new Date(cp,0,4));return Math.floor(1.5+(co.getTime()-cn.getTime())/86400000/7);},format:function(cq){if(cq==null){return null;}var cw=qx.util.format.DateFormat;var cx=this.__wy;var cH=cq.getFullYear();var cB=cq.getMonth();var cJ=cq.getDate();var cr=cq.getDay();var cC=cq.getHours();var cy=cq.getMinutes();var cD=cq.getSeconds();var cF=cq.getMilliseconds();var cI=cq.getTimezoneOffset();var cu=cI>0?1:-1;var cs=Math.floor(Math.abs(cI)/60);var cz=Math.abs(cI)%60;this.__wH();var cG=bB;for(var i=0;i<this.__wC.length;i++){var cE=this.__wC[i];if(cE.type==bi){cG+=cE.text;}else{var cv=cE.character;var cA=cE.size;var ct=w;switch(cv){case b:case G:if(cA==2){ct=this.__wD(cH%100,2);}else{ct=cH+bB;if(cA>ct.length){for(var i=ct.length;i<cA;i++){ct=bH+ct;}}}break;case s:ct=this.__wD(this.__wE(cq),cA);break;case U:ct=this.__wD(cJ,cA);break;case z:ct=this.__wD(this.__wG(cq),cA);break;case v:if(cA==2){ct=qx.locale.Date.getDayName(bd,cr,cx,bC);}else if(cA==3){ct=qx.locale.Date.getDayName(bA,cr,cx,bC);}else if(cA==4){ct=qx.locale.Date.getDayName(bz,cr,cx,bC);}break;case N:if(cA==2){ct=qx.locale.Date.getDayName(bd,cr,cx,bv);}else if(cA==3){ct=qx.locale.Date.getDayName(bA,cr,cx,bv);}else if(cA==4){ct=qx.locale.Date.getDayName(bz,cr,cx,bv);}break;case S:if(cA==1||cA==2){ct=this.__wD(cB+1,cA);}else if(cA==3){ct=qx.locale.Date.getMonthName(bA,cB,cx,bC);}else if(cA==4){ct=qx.locale.Date.getMonthName(bz,cB,cx,bC);}break;case bq:if(cA==1||cA==2){ct=this.__wD(cB+1,cA);}else if(cA==3){ct=qx.locale.Date.getMonthName(bA,cB,cx,bv);}else if(cA==4){ct=qx.locale.Date.getMonthName(bz,cB,cx,bv);}break;case ba:ct=(cC<12)?qx.locale.Date.getAmMarker(cx):qx.locale.Date.getPmMarker(cx);break;case K:ct=this.__wD(cC,cA);break;case M:ct=this.__wD((cC==0)?24:cC,cA);break;case u:ct=this.__wD(cC%12,cA);break;case bV:ct=this.__wD(((cC%12)==0)?12:(cC%12),cA);break;case W:ct=this.__wD(cy,cA);break;case bT:ct=this.__wD(cD,cA);break;case H:ct=this.__wD(cF,cA);break;case bG:if(cA==1){ct=f+((cu>0)?bc:bL)+this.__wD(Math.abs(cs))+a+this.__wD(cz,2);}else if(cA==2){ct=cw.MEDIUM_TIMEZONE_NAMES[cs];}else if(cA==3){ct=cw.FULL_TIMEZONE_NAMES[cs];}break;case bM:ct=((cu>0)?bc:bL)+this.__wD(Math.abs(cs),2)+this.__wD(cz,2);break;}cG+=ct;}}return cG;},parse:function(cK){this.__wI();var cQ=this.__wA.regex.exec(cK);if(cQ==null){throw new Error("Date string '"+cK+"' does not match the date format: "+this.__wz);}var cL={year:1970,month:0,day:1,hour:0,ispm:false,min:0,sec:0,ms:0};var cM=1;for(var i=0;i<this.__wA.usedRules.length;i++){var cO=this.__wA.usedRules[i];var cN=cQ[cM];if(cO.field!=null){cL[cO.field]=parseInt(cN,10);}else{cO.manipulator(cL,cN);}cM+=(cO.groups==null)?1:cO.groups;}var cP=new Date(cL.year,cL.month,cL.day,(cL.ispm)?(cL.hour+12):cL.hour,cL.min,cL.sec,cL.ms);if(cL.month!=cP.getMonth()||cL.year!=cP.getFullYear()){throw new Error("Error parsing date '"+cK+"': the value for day or month is too large");}return cP;},__wH:function(){if(this.__wC!=null){return;}this.__wC=[];var cV;var cT=0;var cX=bB;var cR=this.__wz;var cU=bj;var i=0;while(i<cR.length){var cW=cR.charAt(i);switch(cU){case bb:if(cW==bh){if(i+1>=cR.length){i++;break;}var cS=cR.charAt(i+1);if(cS==bh){cX+=cW;i++;}else{i++;cU=V;}}else{cX+=cW;i++;}break;case bu:if(cW==cV){cT++;i++;}else{this.__wC.push({type:bu,character:cV,size:cT});cV=null;cT=0;cU=bj;}break;default:if((cW>=ba&&cW<=bG)||(cW>=bS&&cW<=bM)){cV=cW;cU=bu;}else if(cW==bh){if(i+1>=cR.length){cX+=cW;i++;break;}var cS=cR.charAt(i+1);if(cS==bh){cX+=cW;i++;}i++;cU=bb;}else{cU=bj;}if(cU!=bj){if(cX.length>0){this.__wC.push({type:bi,text:cX});cX=bB;}}else{cX+=cW;i++;}break;}}if(cV!=null){this.__wC.push({type:bu,character:cV,size:cT});}else if(cX.length>0){this.__wC.push({type:bi,text:cX});}},__wI:function(){if(this.__wA!=null){return ;}var dc=this.__wz;this.__wJ();this.__wH();var di=[];var de=bk;for(var da=0;da<this.__wC.length;da++){var dj=this.__wC[da];if(dj.type==bi){de+=qx.lang.String.escapeRegexpChars(dj.text);}else{var db=dj.character;var df=dj.size;var dd;for(var dk=0;dk<this.__wB.length;dk++){var dg=this.__wB[dk];if(db==dg.pattern.charAt(0)&&df==dg.pattern.length){dd=dg;break;}}if(dd==null){var dh=bB;for(var i=0;i<df;i++){dh+=db;}throw new Error("Malformed date format: "+dc+". Wildcard "+dh+" is not supported");}else{di.push(dd);de+=dd.regex;}}}de+=x;var cY;try{cY=new RegExp(de);}catch(dl){throw new Error("Malformed date format: "+dc);}this.__wA={regex:cY,"usedRules":di,pattern:de};},__wJ:function(){var dw=qx.util.format.DateFormat;var dz=qx.lang.String;if(this.__wB!=null){return ;}var dx=this.__wB=[];var dn=qx.locale.Date.getAmMarker(this.__wy).toString()||dw.AM_MARKER;var dE=qx.locale.Date.getPmMarker(this.__wy).toString()||dw.PM_MARKER;var ds=function(dI,dJ){dJ=parseInt(dJ,10);if(dJ<dw.ASSUME_YEAR_2000_THRESHOLD){dJ+=2000;}else if(dJ<100){dJ+=1900;}dI.year=dJ;};var du=function(dK,dL){dK.month=parseInt(dL,10)-1;};var dq=function(dM,dN){var dO=qx.locale.Date.getPmMarker(this.__wy).toString()||dw.PM_MARKER;dM.ispm=(dN==dO);};var dG=function(dP,dQ){dP.hour=parseInt(dQ,10)%24;};var dp=function(dR,dS){dR.hour=parseInt(dS,10)%12;};var dB=function(dT,dU){return;};var dH=qx.locale.Date.getMonthNames(bA,this.__wy,bC);for(var i=0;i<dH.length;i++){dH[i]=dz.escapeRegexpChars(dH[i].toString());}var dr=function(dV,dW){dW=dz.escapeRegexpChars(dW);dV.month=dH.indexOf(dW);};var dy=qx.locale.Date.getMonthNames(bz,this.__wy,bC);for(var i=0;i<dy.length;i++){dy[i]=dz.escapeRegexpChars(dy[i].toString());}var dC=function(dX,dY){dY=dz.escapeRegexpChars(dY);dX.month=dy.indexOf(dY);};var dm=qx.locale.Date.getDayNames(bd,this.__wy,bC);for(var i=0;i<dm.length;i++){dm[i]=dz.escapeRegexpChars(dm[i].toString());}var dF=function(ea,eb){eb=dz.escapeRegexpChars(eb);ea.month=dm.indexOf(eb);};var dD=qx.locale.Date.getDayNames(bA,this.__wy,bC);for(var i=0;i<dD.length;i++){dD[i]=dz.escapeRegexpChars(dD[i].toString());}var dt=function(ec,ed){ed=dz.escapeRegexpChars(ed);ec.month=dD.indexOf(ed);};var dA=qx.locale.Date.getDayNames(bz,this.__wy,bC);for(var i=0;i<dA.length;i++){dA[i]=dz.escapeRegexpChars(dA[i].toString());}var dv=function(ee,ef){ef=dz.escapeRegexpChars(ef);ee.month=dA.indexOf(ef);};dx.push({pattern:bR,regex:P,manipulator:ds});dx.push({pattern:bQ,regex:bp,manipulator:ds});dx.push({pattern:q,regex:bs,manipulator:ds});dx.push({pattern:j,regex:Q,manipulator:ds});dx.push({pattern:D,regex:X,manipulator:ds});dx.push({pattern:r,regex:l,manipulator:ds});dx.push({pattern:bX,regex:p,manipulator:ds});dx.push({pattern:A,regex:bD,manipulator:du});dx.push({pattern:n,regex:bD,manipulator:du});dx.push({pattern:C,regex:by+dH.join(bw)+bx,manipulator:dr});dx.push({pattern:I,regex:by+dy.join(bw)+bx,manipulator:dC});dx.push({pattern:g,regex:bD,field:bF});dx.push({pattern:O,regex:bD,field:bF});dx.push({pattern:bO,regex:by+dm.join(bw)+bx,manipulator:dF});dx.push({pattern:y,regex:by+dD.join(bw)+bx,manipulator:dt});dx.push({pattern:bl,regex:by+dA.join(bw)+bx,manipulator:dv});dx.push({pattern:d,regex:by+dn+bw+dE+bx,manipulator:dq});dx.push({pattern:bP,regex:bD,field:bg});dx.push({pattern:k,regex:bD,field:bg});dx.push({pattern:bW,regex:bD,manipulator:dG});dx.push({pattern:R,regex:bD,manipulator:dG});dx.push({pattern:br,regex:bD,field:bg});dx.push({pattern:c,regex:bD,field:bg});dx.push({pattern:t,regex:bD,manipulator:dp});dx.push({pattern:bo,regex:bD,manipulator:dp});dx.push({pattern:bm,regex:bD,field:bn});dx.push({pattern:F,regex:bD,field:bn});dx.push({pattern:J,regex:bD,field:bE});dx.push({pattern:B,regex:bD,field:bE});dx.push({pattern:o,regex:bf,field:be});dx.push({pattern:Y,regex:bf,field:be});dx.push({pattern:bU,regex:bf,field:be});dx.push({pattern:bt,regex:e,manipulator:dB});dx.push({pattern:E,regex:L,manipulator:dB});}},destruct:function(){this.__wC=this.__wA=this.__wB=null;}});})();(function(){var k="_",j="format",h="thu",g="sat",f="cldr_day_",e="cldr_month_",d="wed",c="fri",b="tue",a="mon",B="sun",A="short",z="HH:mm",y="HHmmsszz",x="HHmm",w="HHmmss",v="cldr_date_format_",u="HH:mm:ss zz",t="full",s="cldr_pm",q="long",r="medium",o="cldr_am",p="qx.locale.Date",m="cldr_date_time_format_",n="cldr_time_format_",l="HH:mm:ss";qx.Class.define(p,{statics:{__wK:qx.locale.Manager.getInstance(),getAmMarker:function(C){return this.__wK.localize(o,[],C);},getPmMarker:function(D){return this.__wK.localize(s,[],D);},getDayNames:function(length,E,F){var F=F?F:j;{};var H=[B,a,b,d,h,c,g];var I=[];for(var i=0;i<H.length;i++){var G=f+F+k+length+k+H[i];I.push(this.__wK.localize(G,[],E));}return I;},getDayName:function(length,J,K,L){var L=L?L:j;{};var N=[B,a,b,d,h,c,g];var M=f+L+k+length+k+N[J];return this.__wK.localize(M,[],K);},getMonthNames:function(length,O,P){var P=P?P:j;{};var R=[];for(var i=0;i<12;i++){var Q=e+P+k+length+k+(i+1);R.push(this.__wK.localize(Q,[],O));}return R;},getMonthName:function(length,S,T,U){var U=U?U:j;{};var V=e+U+k+length+k+(S+1);return this.__wK.localize(V,[],T);},getDateFormat:function(W,X){{};var Y=v+W;return this.__wK.localize(Y,[],X);},getDateTimeFormat:function(ba,bb,bc){var be=m+ba;var bd=this.__wK.localize(be,[],bc);if(bd==be){bd=bb;}return bd;},getTimeFormat:function(bf,bg){{};var bi=n+bf;var bh=this.__wK.localize(bi,[],bg);if(bh!=bi){return bh;}switch(bf){case A:case r:return qx.locale.Date.getDateTimeFormat(x,z);case q:return qx.locale.Date.getDateTimeFormat(w,l);case t:return qx.locale.Date.getDateTimeFormat(y,u);default:throw new Error("This case should never happen.");}},getWeekStart:function(bj){var bk={"MV":5,"AE":6,"AF":6,"BH":6,"DJ":6,"DZ":6,"EG":6,"ER":6,"ET":6,"IQ":6,"IR":6,"JO":6,"KE":6,"KW":6,"LB":6,"LY":6,"MA":6,"OM":6,"QA":6,"SA":6,"SD":6,"SO":6,"TN":6,"YE":6,"AS":0,"AU":0,"AZ":0,"BW":0,"CA":0,"CN":0,"FO":0,"GE":0,"GL":0,"GU":0,"HK":0,"IE":0,"IL":0,"IS":0,"JM":0,"JP":0,"KG":0,"KR":0,"LA":0,"MH":0,"MN":0,"MO":0,"MP":0,"MT":0,"NZ":0,"PH":0,"PK":0,"SG":0,"TH":0,"TT":0,"TW":0,"UM":0,"US":0,"UZ":0,"VI":0,"ZA":0,"ZW":0,"MW":0,"NG":0,"TJ":0};var bl=qx.locale.Date._getTerritory(bj);return bk[bl]!=null?bk[bl]:1;},getWeekendStart:function(bm){var bo={"EG":5,"IL":5,"SY":5,"IN":0,"AE":4,"BH":4,"DZ":4,"IQ":4,"JO":4,"KW":4,"LB":4,"LY":4,"MA":4,"OM":4,"QA":4,"SA":4,"SD":4,"TN":4,"YE":4};var bn=qx.locale.Date._getTerritory(bm);return bo[bn]!=null?bo[bn]:6;},getWeekendEnd:function(bp){var bq={"AE":5,"BH":5,"DZ":5,"IQ":5,"JO":5,"KW":5,"LB":5,"LY":5,"MA":5,"OM":5,"QA":5,"SA":5,"SD":5,"TN":5,"YE":5,"AF":5,"IR":5,"EG":6,"IL":6,"SY":6};var br=qx.locale.Date._getTerritory(bp);return bq[br]!=null?bq[br]:0;},isWeekend:function(bs,bt){var bv=qx.locale.Date.getWeekendStart(bt);var bu=qx.locale.Date.getWeekendEnd(bt);if(bu>bv){return ((bs>=bv)&&(bs<=bu));}else{return ((bs>=bv)||(bs<=bu));}},_getTerritory:function(bw){if(bw){var bx=bw.split(k)[1]||bw;}else{bx=this.__wK.getTerritory()||this.__wK.getLanguage();}return bx.toUpperCase();}}});})();(function(){var e="auto",d="string",c="number",b="*",a="qx.ui.core.ColumnData";qx.Class.define(a,{extend:qx.ui.core.LayoutItem,construct:function(){qx.ui.core.LayoutItem.call(this);this.setColumnWidth(e);},members:{__ye:null,renderLayout:function(f,top,g,h){this.__ye=g;},getComputedWidth:function(){return this.__ye;},getFlex:function(){return this.getLayoutProperties().flex||0;},setColumnWidth:function(i,j){var j=j||0;var k=null;if(typeof i==c){this.setWidth(i);}else if(typeof i==d){if(i==e){j=1;}else{var l=i.match(/^[0-9]+(?:\.[0-9]+)?([%\*])$/);if(l){if(l[1]==b){j=parseFloat(i);}else{k=i;}}}}this.setLayoutProperties({flex:j,width:k});}},settings:{"qx.tableResizeDebug":false}});})();(function(){var b="qx.ui.table.columnmodel.resizebehavior.Abstract",a="abstract";qx.Class.define(b,{type:a,extend:qx.core.Object,members:{_setNumColumns:function(c){throw new Error("_setNumColumns is abstract");},onAppear:function(event,d){throw new Error("onAppear is abstract");},onTableWidthChanged:function(event){throw new Error("onTableWidthChanged is abstract");},onVerticalScrollBarChanged:function(event){throw new Error("onVerticalScrollBarChanged is abstract");},onColumnWidthChanged:function(event){throw new Error("onColumnWidthChanged is abstract");},onVisibilityChanged:function(event){throw new Error("onVisibilityChanged is abstract");},_getAvailableWidth:function(){var f=this.getTableColumnModel();var i=f.getTable();var e=i._getPaneScrollerArr();if(!e[0]||!e[0].getLayoutParent().getBounds()){return null;}var h=e[0].getLayoutParent().getBounds().width;var g=e[e.length-1];h-=g.getPaneInsetRight();return h;}}});})();(function(){var j="Function",h="Boolean",g="minWidth",f="width",e="__yg",d="qx.ui.table.columnmodel.Resize",c="qx.ui.table.columnmodel.resizebehavior.Default",b="__yh",a="maxWidth";qx.Class.define(c,{extend:qx.ui.table.columnmodel.resizebehavior.Abstract,construct:function(){qx.ui.table.columnmodel.resizebehavior.Abstract.call(this);this.__yf=[];this.__yg=new qx.ui.layout.HBox();this.__yg.connectToWidget(this);this.__yh=new qx.util.DeferredCall(this._computeColumnsFlexWidth,this);},properties:{newResizeBehaviorColumnData:{check:j,init:function(k){return new qx.ui.core.ColumnData();}},initializeWidthsOnEveryAppear:{check:h,init:false},tableColumnModel:{check:d}},members:{__yg:null,__yi:null,__yf:null,__yh:null,__yj:false,setWidth:function(m,n,o){if(m>=this.__yf.length){throw new Error("Column number out of range");}this.__yf[m].setColumnWidth(n,o);this.__yh.schedule();},setMinWidth:function(p,q){if(p>=this.__yf.length){throw new Error("Column number out of range");}this.__yf[p].setMinWidth(q);this.__yh.schedule();},setMaxWidth:function(r,s){if(r>=this.__yf.length){throw new Error("Column number out of range");}this.__yf[r].setMaxWidth(s);this.__yh.schedule();},set:function(t,u){for(var v in u){switch(v){case f:this.setWidth(t,u[v]);break;case g:this.setMinWidth(t,u[v]);break;case a:this.setMaxWidth(t,u[v]);break;default:throw new Error("Unknown property: "+v);}}},onAppear:function(event,w){if(w===true||!this.__yj||this.getInitializeWidthsOnEveryAppear()){this._computeColumnsFlexWidth();this.__yj=true;}},onTableWidthChanged:function(event){this._computeColumnsFlexWidth();},onVerticalScrollBarChanged:function(event){this._computeColumnsFlexWidth();},onColumnWidthChanged:function(event){this._extendNextColumn(event);},onVisibilityChanged:function(event){var x=event.getData();if(x.visible){this._computeColumnsFlexWidth();return;}this._extendLastColumn(event);},_setNumColumns:function(y){var z=this.__yf;if(y<=z.length){z.splice(y,z.length);return;}for(var i=z.length;i<y;i++){z[i]=this.getNewResizeBehaviorColumnData()();z[i].columnNumber=i;}},getLayoutChildren:function(){return this.__yi;},_computeColumnsFlexWidth:function(){this.__yh.cancel();var E=this._getAvailableWidth();if(E===null){return;}var A=this.getTableColumnModel();var C=A.getVisibleColumns();var D=C.length;var B=this.__yf;var i,l;if(D===0){return;}var G=[];for(i=0;i<D;i++){G.push(B[C[i]]);}this.__yi=G;this.__yk();this.__yg.renderLayout(E,100);for(i=0,l=G.length;i<l;i++){var F=G[i].getComputedWidth();A.setColumnWidth(C[i],F);}},__yk:function(){this.__yg.invalidateChildrenCache();var H=this.__yi;for(var i=0,l=H.length;i<l;i++){H[i].invalidateLayoutCache();}},_extendNextColumn:function(event){var M=this.getTableColumnModel();var P=event.getData();var K=M.getVisibleColumns();var J=this._getAvailableWidth();var I=K.length;if(P.newWidth>P.oldWidth){return ;}var i;var L;var O=0;for(i=0;i<I;i++){O+=M.getColumnWidth(K[i]);}if(O<J){for(i=0;i<K.length;i++){if(K[i]==P.col){L=K[i+1];break;}}if(L){var N=(J-(O-M.getColumnWidth(L)));M.setColumnWidth(L,N);}}},_extendLastColumn:function(event){var T=this.getTableColumnModel();var X=event.getData();if(X.visible){return;}var S=T.getVisibleColumns();if(S.length==0){return;}var R=this._getAvailableWidth(T);var Q=S.length;var i;var V;var W=0;for(i=0;i<Q;i++){W+=T.getColumnWidth(S[i]);}if(W<R){V=S[S.length-1];var U=(R-(W-T.getColumnWidth(V)));T.setColumnWidth(V,U);}},_getResizeColumnData:function(){return this.__yf;}},destruct:function(){this.__yf=this.__yi=null;this._disposeObjects(e,b);}});})();(function(){var p="Boolean",o="column-button",n="Function",m="qx.event.type.Data",k="statusbar",j="qx.ui.table.pane.CellEvent",h="function",g="PageUp",f="dataChanged",e='"',bF="changeLocale",bE="changeSelection",bD="qx.dynlocale",bC="__wd",bB="Enter",bA="metaDataChanged",bz="on",by="_applyStatusBarVisible",bx="columnVisibilityMenuCreateStart",bw="blur",w="qx.ui.table.Table",y="columnVisibilityMenuCreateEnd",u="changeVisible",v="_applyResetSelectionOnHeaderClick",s="_applyMetaColumnCounts",t="focus",q="changeDataRowRenderer",r="changeHeaderCellHeight",F="Escape",G="A",X="changeSelectionModel",T="Left",bg="__vS",bb="Down",bs="Integer",bm="_applyHeaderCellHeight",N="__wb",bv="visibilityChanged",bu="qx.ui.table.ITableModel",bt="orderChanged",L="_applySelectionModel",P="menu-button",R="menu",V="_applyAdditionalStatusBarText",Y="_applyFocusCellOnMouseMove",bc="table",bi="_applyColumnVisibilityButtonVisible",bo="changeTableModel",z="qx.event.type.Event",A="tableWidthChanged",O="_applyHeaderCellsVisible",bf="Object",be="_applyShowCellFocusIndicator",bd="resize",bk="verticalScrollBarChanged",bj="__wc",ba="changeScrollY",bh="_applyTableModel",a="End",bn="_applyKeepFirstVisibleRowComplete",B="widthChanged",C="one of one row",U="Home",b="_applyRowHeight",d="F2",K="appear",D="Up",E="%1 rows",I="qx.ui.table.selection.Model",W="one row",bq="PageDown",bp="%1 of %2 rows",Q="keypress",br="changeRowHeight",M="__vT",bl="Number",H="header",J="qx.ui.table.IRowRenderer",c="Right",S="Space";qx.Class.define(w,{extend:qx.ui.core.Widget,construct:function(bG,bH){qx.ui.core.Widget.call(this);if(!bH){bH={};}if(bH.initiallyHiddenColumns){this.setInitiallyHiddenColumns(bH.initiallyHiddenColumns);}if(bH.selectionManager){this.setNewSelectionManager(bH.selectionManager);}if(bH.selectionModel){this.setNewSelectionModel(bH.selectionModel);}if(bH.tableColumnModel){this.setNewTableColumnModel(bH.tableColumnModel);}if(bH.tablePane){this.setNewTablePane(bH.tablePane);}if(bH.tablePaneHeader){this.setNewTablePaneHeader(bH.tablePaneHeader);}if(bH.tablePaneScroller){this.setNewTablePaneScroller(bH.tablePaneScroller);}if(bH.tablePaneModel){this.setNewTablePaneModel(bH.tablePaneModel);}if(bH.columnMenu){this.setNewColumnMenu(bH.columnMenu);}this._setLayout(new qx.ui.layout.VBox());this.__vS=new qx.ui.container.Composite(new qx.ui.layout.HBox());this._add(this.__vS,{flex:1});this.setDataRowRenderer(new qx.ui.table.rowrenderer.Default(this));this.__vT=this.getNewSelectionManager()(this);this.setSelectionModel(this.getNewSelectionModel()(this));this.setTableModel(bG||this.getEmptyTableModel());this.setMetaColumnCounts([-1]);this.setTabIndex(1);this.addListener(Q,this._onKeyPress);this.addListener(t,this._onFocusChanged);this.addListener(bw,this._onFocusChanged);var bI=new qx.ui.core.Widget().set({height:0});this._add(bI);bI.addListener(bd,this._onResize,this);this.__vU=null;this.__vV=null;if(qx.core.Variant.isSet(bD,bz)){qx.locale.Manager.getInstance().addListener(bF,this._onChangeLocale,this);}this.initStatusBarVisible();bG=this.getTableModel();if(bG.init&&typeof (bG.init)==h){bG.init(this);}},events:{"columnVisibilityMenuCreateStart":m,"columnVisibilityMenuCreateEnd":m,"tableWidthChanged":z,"verticalScrollBarChanged":m,"cellClick":j,"cellDblclick":j,"cellContextmenu":j,"dataEdited":m},statics:{__vW:{cellClick:1,cellDblclick:1,cellContextmenu:1}},properties:{appearance:{refine:true,init:bc},focusable:{refine:true,init:true},minWidth:{refine:true,init:50},initiallyHiddenColumns:{init:null},selectable:{refine:true,init:false},selectionModel:{check:I,apply:L,event:X},tableModel:{check:bu,apply:bh,event:bo},rowHeight:{check:bl,init:20,apply:b,event:br},forceLineHeight:{check:p,init:true},headerCellsVisible:{check:p,init:true,apply:O},headerCellHeight:{check:bs,init:16,apply:bm,event:r,nullable:true},statusBarVisible:{check:p,init:true,apply:by},additionalStatusBarText:{nullable:true,init:null,apply:V},columnVisibilityButtonVisible:{check:p,init:true,apply:bi},metaColumnCounts:{check:bf,apply:s},focusCellOnMouseMove:{check:p,init:false,apply:Y},rowFocusChangeModifiesSelection:{check:p,init:true},showCellFocusIndicator:{check:p,init:true,apply:be},keepFirstVisibleRowComplete:{check:p,init:true,apply:bn},alwaysUpdateCells:{check:p,init:false},resetSelectionOnHeaderClick:{check:p,init:true,apply:v},dataRowRenderer:{check:J,init:null,nullable:true,event:q},modalCellEditorPreOpenFunction:{check:n,init:null,nullable:true},newColumnMenu:{check:n,init:function(){return new qx.ui.table.columnmenu.Button();}},newSelectionManager:{check:n,init:function(bJ){return new qx.ui.table.selection.Manager(bJ);}},newSelectionModel:{check:n,init:function(bK){return new qx.ui.table.selection.Model(bK);}},newTableColumnModel:{check:n,init:function(bL){return new qx.ui.table.columnmodel.Basic(bL);}},newTablePane:{check:n,init:function(bM){return new qx.ui.table.pane.Pane(bM);}},newTablePaneHeader:{check:n,init:function(bN){return new qx.ui.table.pane.Header(bN);}},newTablePaneScroller:{check:n,init:function(bO){return new qx.ui.table.pane.Scroller(bO);}},newTablePaneModel:{check:n,init:function(bP){return new qx.ui.table.pane.Model(bP);}}},members:{__vU:null,__vV:null,__vS:null,__vT:null,__vX:null,__vY:null,__wa:null,__wb:null,__wc:null,__wd:null,_createChildControlImpl:function(bQ,bR){var bS;switch(bQ){case k:bS=new qx.ui.basic.Label();bS.set({allowGrowX:true});this._add(bS);break;case o:bS=this.getNewColumnMenu()();bS.set({focusable:false});var bT=bS.factory(R,{table:this});bT.addListener(K,this._initColumnMenu,this);break;}return bS||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,bQ);},_applySelectionModel:function(bU,bV){this.__vT.setSelectionModel(bU);if(bV!=null){bV.removeListener(bE,this._onSelectionChanged,this);}bU.addListener(bE,this._onSelectionChanged,this);},_applyRowHeight:function(bW,bX){var bY=this._getPaneScrollerArr();for(var i=0;i<bY.length;i++){bY[i].updateVerScrollBarMaximum();}},_applyHeaderCellsVisible:function(ca,cb){var cc=this._getPaneScrollerArr();for(var i=0;i<cc.length;i++){cc[i]._excludeChildControl(H);}},_applyHeaderCellHeight:function(cd,ce){var cf=this._getPaneScrollerArr();for(var i=0;i<cf.length;i++){cf[i].getHeader().setHeight(cd);}},getEmptyTableModel:function(){if(!this.__wd){this.__wd=new qx.ui.table.model.Simple();this.__wd.setColumns([]);this.__wd.setData([]);}return this.__wd;},_applyTableModel:function(cg,ch){this.getTableColumnModel().init(cg.getColumnCount(),this);if(ch!=null){ch.removeListener(bA,this._onTableModelMetaDataChanged,this);ch.removeListener(f,this._onTableModelDataChanged,this);}cg.addListener(bA,this._onTableModelMetaDataChanged,this);cg.addListener(f,this._onTableModelDataChanged,this);this._updateStatusBar();this._updateTableData(0,cg.getRowCount(),0,cg.getColumnCount());this._onTableModelMetaDataChanged();if(ch&&cg.init&&typeof (cg.init)==h){cg.init(this);}},getTableColumnModel:function(){if(!this.__wc){var ck=this.__wc=this.getNewTableColumnModel()(this);ck.addListener(bv,this._onColVisibilityChanged,this);ck.addListener(B,this._onColWidthChanged,this);ck.addListener(bt,this._onColOrderChanged,this);var cj=this.getTableModel();ck.init(cj.getColumnCount(),this);var ci=this._getPaneScrollerArr();for(var i=0;i<ci.length;i++){var cl=ci[i];var cm=cl.getTablePaneModel();cm.setTableColumnModel(ck);}}return this.__wc;},_applyStatusBarVisible:function(cn,co){if(cn){this._showChildControl(k);}else{this._excludeChildControl(k);}if(cn){this._updateStatusBar();}},_applyAdditionalStatusBarText:function(cp,cq){this.__vX=cp;this._updateStatusBar();},_applyColumnVisibilityButtonVisible:function(cr,cs){if(cr){this._showChildControl(o);}else{this._excludeChildControl(o);}},_applyMetaColumnCounts:function(ct,cu){var cB=ct;var cv=this._getPaneScrollerArr();var cz={};if(ct>cu){var cD=qx.event.Registration.getManager(cv[0]);for(var cE in qx.ui.table.Table.__vW){cz[cE]={};cz[cE].capture=cD.getListeners(cv[0],cE,true);cz[cE].bubble=cD.getListeners(cv[0],cE,false);}}this._cleanUpMetaColumns(cB.length);var cA=0;for(var i=0;i<cv.length;i++){var cF=cv[i];var cC=cF.getTablePaneModel();cC.setFirstColumnX(cA);cC.setMaxColumnCount(cB[i]);cA+=cB[i];}if(cB.length>cv.length){var cy=this.getTableColumnModel();for(var i=cv.length;i<cB.length;i++){var cC=this.getNewTablePaneModel()(cy);cC.setFirstColumnX(cA);cC.setMaxColumnCount(cB[i]);cA+=cB[i];var cF=this.getNewTablePaneScroller()(this);cF.setTablePaneModel(cC);cF.addListener(ba,this._onScrollY,this);for(cE in qx.ui.table.Table.__vW){if(!cz[cE]){break;}if(cz[cE].capture&&cz[cE].capture.length>0){var cw=cz[cE].capture;for(var i=0;i<cw.length;i++){var cx=cw[i].context;if(!cx){cx=this;}else if(cx==cv[0]){cx=cF;}cF.addListener(cE,cw[i].handler,cx,true);}}if(cz[cE].bubble&&cz[cE].bubble.length>0){var cH=cz[cE].bubble;for(var i=0;i<cH.length;i++){var cx=cH[i].context;if(!cx){cx=this;}else if(cx==cv[0]){cx=cF;}cF.addListener(cE,cH[i].handler,cx,false);}}}var cG=(i==cB.length-1)?1:0;this.__vS.add(cF,{flex:cG});cv=this._getPaneScrollerArr();}}for(var i=0;i<cv.length;i++){var cF=cv[i];var cI=(i==(cv.length-1));cF.getHeader().setHeight(this.getHeaderCellHeight());cF.setTopRightWidget(cI?this.getChildControl(o):null);}if(!this.isColumnVisibilityButtonVisible()){this._excludeChildControl(o);}this._updateScrollerWidths();this._updateScrollBarVisibility();},_applyFocusCellOnMouseMove:function(cJ,cK){var cL=this._getPaneScrollerArr();for(var i=0;i<cL.length;i++){cL[i].setFocusCellOnMouseMove(cJ);}},_applyShowCellFocusIndicator:function(cM,cN){var cO=this._getPaneScrollerArr();for(var i=0;i<cO.length;i++){cO[i].setShowCellFocusIndicator(cM);}},_applyKeepFirstVisibleRowComplete:function(cP,cQ){var cR=this._getPaneScrollerArr();for(var i=0;i<cR.length;i++){cR[i].onKeepFirstVisibleRowCompleteChanged();}},_applyResetSelectionOnHeaderClick:function(cS,cT){var cU=this._getPaneScrollerArr();for(var i=0;i<cU.length;i++){cU[i].setResetSelectionOnHeaderClick(cS);}},getSelectionManager:function(){return this.__vT;},_getPaneScrollerArr:function(){return this.__vS.getChildren();},getPaneScroller:function(cV){return this._getPaneScrollerArr()[cV];},_cleanUpMetaColumns:function(cW){var cX=this._getPaneScrollerArr();if(cX!=null){for(var i=cX.length-1;i>=cW;i--){cX[i].destroy();}}},_onChangeLocale:function(cY){this.updateContent();this._updateStatusBar();},_onSelectionChanged:function(da){var db=this._getPaneScrollerArr();for(var i=0;i<db.length;i++){db[i].onSelectionChanged();}this._updateStatusBar();},_onTableModelMetaDataChanged:function(dc){var dd=this._getPaneScrollerArr();for(var i=0;i<dd.length;i++){dd[i].onTableModelMetaDataChanged();}this._updateStatusBar();},_onTableModelDataChanged:function(de){var df=de.getData();this._updateTableData(df.firstRow,df.lastRow,df.firstColumn,df.lastColumn,df.removeStart,df.removeCount);},_updateTableData:function(dg,dh,di,dj,dk,dl){var dm=this._getPaneScrollerArr();if(dl){this.getSelectionModel().removeSelectionInterval(dk,dk+dl);if(this.__vV>=dk&&this.__vV<(dk+dl)){this.setFocusedCell();}}for(var i=0;i<dm.length;i++){dm[i].onTableModelDataChanged(dg,dh,di,dj);}var dn=this.getTableModel().getRowCount();if(dn!=this.__vY){this.__vY=dn;this._updateScrollBarVisibility();this._updateStatusBar();}},_onScrollY:function(dp){if(!this.__wa){this.__wa=true;var dq=this._getPaneScrollerArr();for(var i=0;i<dq.length;i++){dq[i].setScrollY(dp.getData());}this.__wa=false;}},_onKeyPress:function(dr){if(!this.getEnabled()){return;}var dy=this.__vV;var dv=true;var dz=dr.getKeyIdentifier();if(this.isEditing()){if(dr.getModifiers()==0){switch(dz){case bB:this.stopEditing();var dy=this.__vV;this.moveFocusedCell(0,1);if(this.__vV!=dy){dv=this.startEditing();}break;case F:this.cancelEditing();this.focus();break;default:dv=false;break;}}}else{if(dr.isCtrlPressed()){dv=true;switch(dz){case G:var dw=this.getTableModel().getRowCount();if(dw>0){this.getSelectionModel().setSelectionInterval(0,dw-1);}break;default:dv=false;break;}}else{switch(dz){case S:this.__vT.handleSelectKeyDown(this.__vV,dr);break;case d:case bB:this.startEditing();dv=true;break;case U:this.setFocusedCell(this.__vU,0,true);break;case a:var dw=this.getTableModel().getRowCount();this.setFocusedCell(this.__vU,dw-1,true);break;case T:this.moveFocusedCell(-1,0);break;case c:this.moveFocusedCell(1,0);break;case D:this.moveFocusedCell(0,-1);break;case bb:this.moveFocusedCell(0,1);break;case g:case bq:var du=this.getPaneScroller(0);var dx=du.getTablePane();var dt=this.getRowHeight();var ds=(dz==g)?-1:1;dw=dx.getVisibleRowCount()-1;du.setScrollY(du.getScrollY()+ds*dw*dt);this.moveFocusedCell(0,ds*dw);break;default:dv=false;}}}if(dy!=this.__vV&&this.getRowFocusChangeModifiesSelection()){this.__vT.handleMoveKeyDown(this.__vV,dr);}if(dv){dr.preventDefault();dr.stopPropagation();}},_onFocusChanged:function(dA){var dB=this._getPaneScrollerArr();for(var i=0;i<dB.length;i++){dB[i].onFocusChanged();}},_onColVisibilityChanged:function(dC){var dD=this._getPaneScrollerArr();for(var i=0;i<dD.length;i++){dD[i].onColVisibilityChanged();}var dE=dC.getData();if(this.__wb!=null&&dE.col!=null&&dE.visible!=null){this.__wb[dE.col].setVisible(dE.visible);}this._updateScrollerWidths();this._updateScrollBarVisibility();},_onColWidthChanged:function(dF){var dG=this._getPaneScrollerArr();for(var i=0;i<dG.length;i++){var dH=dF.getData();dG[i].setColumnWidth(dH.col,dH.newWidth);}this._updateScrollerWidths();this._updateScrollBarVisibility();},_onColOrderChanged:function(dI){var dJ=this._getPaneScrollerArr();for(var i=0;i<dJ.length;i++){dJ[i].onColOrderChanged();}this._updateScrollerWidths();this._updateScrollBarVisibility();},getTablePaneScrollerAtPageX:function(dK){var dL=this._getMetaColumnAtPageX(dK);return (dL!=-1)?this.getPaneScroller(dL):null;},setFocusedCell:function(dM,dN,dO){if(!this.isEditing()&&(dM!=this.__vU||dN!=this.__vV)){if(dM===null){dM=0;}this.__vU=dM;this.__vV=dN;var dP=this._getPaneScrollerArr();for(var i=0;i<dP.length;i++){dP[i].setFocusedCell(dM,dN);}if(dM!==null&&dO){this.scrollCellVisible(dM,dN);}}},resetSelection:function(){this.getSelectionModel().resetSelection();},resetCellFocus:function(){this.setFocusedCell(null,null,false);},getFocusedColumn:function(){return this.__vU;},getFocusedRow:function(){return this.__vV;},highlightFocusedRow:function(dQ){this.getDataRowRenderer().setHighlightFocusRow(dQ);},clearFocusedRowHighlight:function(dR){if(dR){var dT=dR.getRelatedTarget();if(dT instanceof qx.ui.table.pane.Pane||dT instanceof qx.ui.table.pane.FocusIndicator){return;}}this.resetCellFocus();var dS=this._getPaneScrollerArr();for(var i=0;i<dS.length;i++){dS[i].onFocusChanged();}},moveFocusedCell:function(dU,dV){var ea=this.__vU;var eb=this.__vV;if(ea===null||eb===null){return;}if(dU!=0){var dY=this.getTableColumnModel();var x=dY.getVisibleX(ea);var dX=dY.getVisibleColumnCount();x=qx.lang.Number.limit(x+dU,0,dX-1);ea=dY.getVisibleColumnAtX(x);}if(dV!=0){var dW=this.getTableModel();eb=qx.lang.Number.limit(eb+dV,0,dW.getRowCount()-1);}this.setFocusedCell(ea,eb,true);},scrollCellVisible:function(ec,ed){var ee=this.getTableColumnModel();var x=ee.getVisibleX(ec);var ef=this._getMetaColumnAtColumnX(x);if(ef!=-1){this.getPaneScroller(ef).scrollCellVisible(ec,ed);}},isEditing:function(){if(this.__vU!=null){var x=this.getTableColumnModel().getVisibleX(this.__vU);var eg=this._getMetaColumnAtColumnX(x);return this.getPaneScroller(eg).isEditing();}return false;},startEditing:function(){if(this.__vU!=null){var x=this.getTableColumnModel().getVisibleX(this.__vU);var ei=this._getMetaColumnAtColumnX(x);var eh=this.getPaneScroller(ei).startEditing();return eh;}return false;},stopEditing:function(){if(this.__vU!=null){var x=this.getTableColumnModel().getVisibleX(this.__vU);var ej=this._getMetaColumnAtColumnX(x);this.getPaneScroller(ej).stopEditing();}},cancelEditing:function(){if(this.__vU!=null){var x=this.getTableColumnModel().getVisibleX(this.__vU);var ek=this._getMetaColumnAtColumnX(x);this.getPaneScroller(ek).cancelEditing();}},updateContent:function(){var el=this._getPaneScrollerArr();for(var i=0;i<el.length;i++){el[i].getTablePane().updateContent(true);}},blockHeaderElements:function(){var em=this._getPaneScrollerArr();for(var i=0;i<em.length;i++){em[i].getHeader().getBlocker().blockContent(20);}this.getChildControl(o).getBlocker().blockContent(20);},unblockHeaderElements:function(){var en=this._getPaneScrollerArr();for(var i=0;i<en.length;i++){en[i].getHeader().getBlocker().unblockContent();}this.getChildControl(o).getBlocker().unblockContent();},_getMetaColumnAtPageX:function(eo){var ep=this._getPaneScrollerArr();for(var i=0;i<ep.length;i++){var eq=ep[i].getContainerLocation();if(eo>=eq.left&&eo<=eq.right){return i;}}return -1;},_getMetaColumnAtColumnX:function(er){var et=this.getMetaColumnCounts();var eu=0;for(var i=0;i<et.length;i++){var es=et[i];eu+=es;if(es==-1||er<eu){return i;}}return -1;},_updateStatusBar:function(){var ev=this.getTableModel();if(this.getStatusBarVisible()){var ew=this.getSelectionModel().getSelectedCount();var ey=ev.getRowCount();var ex;if(ey>=0){if(ew==0){ex=this.trn(W,E,ey,ey);}else{ex=this.trn(C,bp,ey,ew,ey);}}if(this.__vX){if(ex){ex+=this.__vX;}else{ex=this.__vX;}}if(ex){this.getChildControl(k).setValue(ex);}}},_updateScrollerWidths:function(){var ez=this._getPaneScrollerArr();for(var i=0;i<ez.length;i++){var eB=(i==(ez.length-1));var eC=ez[i].getTablePaneModel().getTotalWidth();ez[i].setPaneWidth(eC);var eA=eB?1:0;ez[i].setLayoutProperties({flex:eA});}},_updateScrollBarVisibility:function(){if(!this.getBounds()){return;}var eG=qx.ui.table.pane.Scroller.HORIZONTAL_SCROLLBAR;var eJ=qx.ui.table.pane.Scroller.VERTICAL_SCROLLBAR;var eD=this._getPaneScrollerArr();var eF=false;var eI=false;for(var i=0;i<eD.length;i++){var eK=(i==(eD.length-1));var eE=eD[i].getNeededScrollBars(eF,!eK);if(eE&eG){eF=true;}if(eK&&(eE&eJ)){eI=true;}}for(var i=0;i<eD.length;i++){var eK=(i==(eD.length-1));var eH;eD[i].setHorizontalScrollBarVisible(eF);if(eK){eH=eD[i].getVerticalScrollBarVisible();}eD[i].setVerticalScrollBarVisible(eK&&eI);if(eK&&eI!=eH){this.fireDataEvent(bk,eI);}}},_initColumnMenu:function(){var eN=this.getTableModel();var eO=this.getTableColumnModel();var eP=this.getChildControl(o);eP.empty();var eM=eP.getMenu();var eQ={table:this,menu:eM,columnButton:eP};this.fireDataEvent(bx,eQ);this.__wb={};for(var eR=0,l=eN.getColumnCount();eR<l;eR++){var eL=eP.factory(P,{text:eN.getColumnName(eR),column:eR,bVisible:eO.isColumnVisible(eR)});qx.core.Assert.assertInterface(eL,qx.ui.table.IColumnMenuItem);eL.addListener(u,this._createColumnVisibilityCheckBoxHandler(eR),this);this.__wb[eR]=eL;}eQ={table:this,menu:eM,columnButton:eP};this.fireDataEvent(y,eQ);},_createColumnVisibilityCheckBoxHandler:function(eS){return function(eT){var eU=this.getTableColumnModel();eU.setColumnVisible(eS,eT.getData());};},setColumnWidth:function(eV,eW){this.getTableColumnModel().setColumnWidth(eV,eW);},_onResize:function(){this.fireEvent(A);this._updateScrollerWidths();this._updateScrollBarVisibility();},addListener:function(eX,eY,self,fa){if(this.self(arguments).__vW[eX]){var fc=[eX];for(var i=0,fb=this._getPaneScrollerArr();i<fb.length;i++){fc.push(fb[i].addListener.apply(fb[i],arguments));}return fc.join(e);}else{return qx.ui.core.Widget.prototype.addListener.call(this,eX,eY,self,fa);}},removeListener:function(fd,fe,self,ff){if(this.self(arguments).__vW[fd]){for(var i=0,fg=this._getPaneScrollerArr();i<fg.length;i++){fg[i].removeListener.apply(fg[i],arguments);}}else{qx.ui.core.Widget.prototype.removeListener.call(this,fd,fe,self,ff);}},removeListenerById:function(fh){var fl=fh.split(e);var fk=fl.shift();if(this.self(arguments).__vW[fk]){var fj=true;for(var i=0,fi=this._getPaneScrollerArr();i<fi.length;i++){fj=fi[i].removeListenerById.call(fi[i],fl[i])&&fj;}return fj;}else{return qx.ui.core.Widget.prototype.removeListenerById.call(this,fh);}},destroy:function(){this.getChildControl(o).getMenu().destroy();qx.ui.core.Widget.prototype.destroy.call(this);}},destruct:function(){if(qx.core.Variant.isSet(bD,bz)){qx.locale.Manager.getInstance().removeListener(bF,this._onChangeLocale,this);}var fn=this.getSelectionModel();if(fn){fn.dispose();}var fm=this.getDataRowRenderer();if(fm){fm.dispose();}this._cleanUpMetaColumns(0);this.getTableColumnModel().dispose();this._disposeObjects(M,bg,bC,bC,bj);this._disposeMap(N);}});})();(function(){var a="qx.ui.table.IRowRenderer";qx.Interface.define(a,{members:{updateDataRowElement:function(b,c){},getRowHeightStyle:function(d){},createRowStyle:function(e){},getRowClass:function(f){}}});})();(function(){var t="",s="table-row-background-even",r="table-row-background-selected",q="table-row",p="background-color:",o="table-row-background-focused",n=';border-bottom: 1px solid ',m=';color:',l="table-row-selected",k="table-row-background-odd",d="default",j="table-row-background-focused-selected",g="qx.ui.table.rowrenderer.Default",c="table-row-line",b="'",f="height:",e=";",h="px;",a="1px solid ",i="Boolean";qx.Class.define(g,{extend:qx.core.Object,implement:qx.ui.table.IRowRenderer,construct:function(){qx.core.Object.call(this);this.__wi=t;this.__wi={};this.__wj={};this._renderFont(qx.theme.manager.Font.getInstance().resolve(d));var u=qx.theme.manager.Color.getInstance();this.__wj.bgcolFocusedSelected=u.resolve(j);this.__wj.bgcolFocused=u.resolve(o);this.__wj.bgcolSelected=u.resolve(r);this.__wj.bgcolEven=u.resolve(s);this.__wj.bgcolOdd=u.resolve(k);this.__wj.colSelected=u.resolve(l);this.__wj.colNormal=u.resolve(q);this.__wj.horLine=u.resolve(c);},properties:{highlightFocusRow:{check:i,init:true}},members:{__wj:null,__wk:null,__wi:null,_insetY:1,_renderFont:function(v){if(v){this.__wk=v.getStyles();this.__wi=qx.bom.element.Style.compile(this.__wk);this.__wi=this.__wi.replace(/"/g,b);}else{this.__wi=t;this.__wk=qx.bom.Font.getDefaultStyles();}},updateDataRowElement:function(w,x){var z=this.__wk;var y=x.style;qx.bom.element.Style.setStyles(x,z);if(w.focusedRow&&this.getHighlightFocusRow()){y.backgroundColor=w.selected?this.__wj.bgcolFocusedSelected:this.__wj.bgcolFocused;}else{if(w.selected){y.backgroundColor=this.__wj.bgcolSelected;}else{y.backgroundColor=(w.row%2==0)?this.__wj.bgcolEven:this.__wj.bgcolOdd;}}y.color=w.selected?this.__wj.colSelected:this.__wj.colNormal;y.borderBottom=a+this.__wj.horLine;},getRowHeightStyle:function(A){if(qx.bom.client.Feature.CONTENT_BOX){A-=this._insetY;}return f+A+h;},createRowStyle:function(B){var C=[];C.push(e);C.push(this.__wi);C.push(p);if(B.focusedRow&&this.getHighlightFocusRow()){C.push(B.selected?this.__wj.bgcolFocusedSelected:this.__wj.bgcolFocused);}else{if(B.selected){C.push(this.__wj.bgcolSelected);}else{C.push((B.row%2==0)?this.__wj.bgcolEven:this.__wj.bgcolOdd);}}C.push(m);C.push(B.selected?this.__wj.colSelected:this.__wj.colNormal);C.push(n,this.__wj.horLine);return C.join(t);},getRowClass:function(D){return t;},getRowAttributes:function(E){return t;}},destruct:function(){this.__wj=this.__wk=this.__wi=null;}});})();(function(){var a="qx.ui.table.IColumnMenuButton";qx.Interface.define(a,{properties:{menu:{}},members:{factory:function(b,c){return true;},empty:function(){return true;}}});})();(function(){var l="pressed",k="hovered",j="changeVisibility",i="qx.ui.menu.Menu",h="submenu",g="Enter",f="contextmenu",d="changeMenu",c="qx.ui.form.MenuButton",b="abandoned",a="_applyMenu";qx.Class.define(c,{extend:qx.ui.form.Button,construct:function(m,n,o){qx.ui.form.Button.call(this,m,n);if(o!=null){this.setMenu(o);}},properties:{menu:{check:i,nullable:true,apply:a,event:d}},members:{_applyMenu:function(p,q){if(q){q.removeListener(j,this._onMenuChange,this);q.resetOpener();}if(p){p.addListener(j,this._onMenuChange,this);p.setOpener(this);p.removeState(h);p.removeState(f);}},open:function(r){var s=this.getMenu();if(s){qx.ui.menu.Manager.getInstance().hideAll();s.setOpener(this);s.open();if(r){var t=s.getSelectables()[0];if(t){s.setSelectedButton(t);}}}},_onMenuChange:function(e){var u=this.getMenu();if(u.isVisible()){this.addState(l);}else{this.removeState(l);}},_onMouseDown:function(e){qx.ui.form.Button.prototype._onMouseDown.call(this,e);var v=this.getMenu();if(v){if(!v.isVisible()){this.open();}else{v.exclude();}e.stopPropagation();}},_onMouseUp:function(e){qx.ui.form.Button.prototype._onMouseUp.call(this,e);e.stopPropagation();},_onMouseOver:function(e){this.addState(k);},_onMouseOut:function(e){this.removeState(k);},_onKeyDown:function(e){switch(e.getKeyIdentifier()){case g:this.removeState(b);this.addState(l);var w=this.getMenu();if(w){if(!w.isVisible()){this.open();}else{w.exclude();}}e.stopPropagation();}},_onKeyUp:function(e){}},destruct:function(){if(this.getMenu()){if(!qx.core.ObjectRegistry.inShutDown){this.getMenu().destroy();}}}});})();(function(){var f="menu-button",e="table-column-reset-button",d="separator",c="user-button",b="qx.ui.table.columnmenu.Button",a="menu";qx.Class.define(b,{extend:qx.ui.form.MenuButton,implement:qx.ui.table.IColumnMenuButton,construct:function(){qx.ui.form.MenuButton.call(this);this.__wl=new qx.ui.core.Blocker(this);},members:{__wm:null,__wl:null,factory:function(g,h){switch(g){case a:var j=new qx.ui.menu.Menu();this.setMenu(j);return j;case f:var m=new qx.ui.table.columnmenu.MenuItem(h.text);m.setVisible(h.bVisible);this.getMenu().add(m);return m;case c:var k=new qx.ui.menu.Button(h.text);k.set({appearance:e});return k;case d:return new qx.ui.menu.Separator();default:throw new Error("Unrecognized factory request: "+g);}},getBlocker:function(){return this.__wl;},empty:function(){var n=this.getMenu();var o=n.getChildren();for(var i=0,l=o.length;i<l;i++){o[0].destroy();}}},destruct:function(){this.__wl.dispose();}});})();(function(){var t="keypress",s="interval",r="keydown",q="mousedown",p="keyup",o="__on",n="blur",m="Enter",l="__oo",k="Up",c="Escape",j="qx.ui.menu.Manager",g="Left",b="__om",a="Down",f="Right",d="singleton",h="Space";qx.Class.define(j,{type:d,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__om=[];var u=document.body;var v=qx.event.Registration;v.addListener(window.document.documentElement,q,this._onMouseDown,this,true);v.addListener(u,r,this._onKeyUpDown,this,true);v.addListener(u,p,this._onKeyUpDown,this,true);v.addListener(u,t,this._onKeyPress,this,true);if(!qx.bom.client.Feature.TOUCH){qx.bom.Element.addListener(window,n,this.hideAll,this);}this.__on=new qx.event.Timer;this.__on.addListener(s,this._onOpenInterval,this);this.__oo=new qx.event.Timer;this.__oo.addListener(s,this._onCloseInterval,this);},members:{__op:null,__oq:null,__on:null,__oo:null,__om:null,_getChild:function(w,x,y,z){var A=w.getChildren();var length=A.length;var B;for(var i=x;i<length&&i>=0;i+=y){B=A[i];if(B.isEnabled()&&!B.isAnonymous()){return B;}}if(z){i=i==length?0:length-1;for(;i!=x;i+=y){B=A[i];if(B.isEnabled()&&!B.isAnonymous()){return B;}}}return null;},_isInMenu:function(C){while(C){if(C instanceof qx.ui.menu.Menu){return true;}C=C.getLayoutParent();}return false;},_getMenuButton:function(D){while(D){if(D instanceof qx.ui.menu.AbstractButton){return D;}D=D.getLayoutParent();}return null;},add:function(E){{};var F=this.__om;F.push(E);E.setZIndex(1e6+F.length);},remove:function(G){{};var H=this.__om;if(H){qx.lang.Array.remove(H,G);}},hideAll:function(){var I=this.__om;if(I){for(var i=I.length-1;i>=0;i--){I[i].exclude();}}},getActiveMenu:function(){var J=this.__om;return J.length>0?J[J.length-1]:null;},scheduleOpen:function(K){this.cancelClose(K);if(K.isVisible()){if(this.__op){this.cancelOpen(this.__op);}}else if(this.__op!=K){this.__op=K;this.__on.restartWith(K.getOpenInterval());}},scheduleClose:function(L){this.cancelOpen(L);if(!L.isVisible()){if(this.__oq){this.cancelClose(this.__oq);}}else if(this.__oq!=L){this.__oq=L;this.__oo.restartWith(L.getCloseInterval());}},cancelOpen:function(M){if(this.__op==M){this.__on.stop();this.__op=null;}},cancelClose:function(N){if(this.__oq==N){this.__oo.stop();this.__oq=null;}},_onOpenInterval:function(e){this.__on.stop();this.__op.open();this.__op=null;},_onCloseInterval:function(e){this.__oo.stop();this.__oq.exclude();this.__oq=null;},_onMouseDown:function(e){var O=e.getTarget();O=qx.ui.core.Widget.getWidgetByElement(O,true);if(O==null){this.hideAll();return;}if(O.getMenu&&O.getMenu()&&O.getMenu().isVisible()){return;}if(this.__om.length>0&&!this._isInMenu(O)){this.hideAll();}},__or:{"Enter":1,"Space":1},__os:{"Escape":1,"Up":1,"Down":1,"Left":1,"Right":1},_onKeyUpDown:function(e){var P=this.getActiveMenu();if(!P){return;}var Q=e.getKeyIdentifier();if(this.__os[Q]||(this.__or[Q]&&P.getSelectedButton())){e.stopPropagation();}},_onKeyPress:function(e){var R=this.getActiveMenu();if(!R){return;}var S=e.getKeyIdentifier();var U=this.__os[S];var T=this.__or[S];if(U){switch(S){case k:this._onKeyPressUp(R);break;case a:this._onKeyPressDown(R);break;case g:this._onKeyPressLeft(R);break;case f:this._onKeyPressRight(R);break;case c:this.hideAll();break;}e.stopPropagation();e.preventDefault();}else if(T){var V=R.getSelectedButton();if(V){switch(S){case m:this._onKeyPressEnter(R,V,e);break;case h:this._onKeyPressSpace(R,V,e);break;}e.stopPropagation();e.preventDefault();}}},_onKeyPressUp:function(W){var X=W.getSelectedButton();var Y=W.getChildren();var bb=X?W.indexOf(X)-1:Y.length-1;var ba=this._getChild(W,bb,-1,true);if(ba){W.setSelectedButton(ba);}else{W.resetSelectedButton();}},_onKeyPressDown:function(bc){var bd=bc.getSelectedButton();var bf=bd?bc.indexOf(bd)+1:0;var be=this._getChild(bc,bf,1,true);if(be){bc.setSelectedButton(be);}else{bc.resetSelectedButton();}},_onKeyPressLeft:function(bg){var bl=bg.getOpener();if(!bl){return;}if(bl instanceof qx.ui.menu.AbstractButton){var bi=bl.getLayoutParent();bi.resetOpenedButton();bi.setSelectedButton(bl);}else if(bl instanceof qx.ui.menubar.Button){var bk=bl.getMenuBar().getMenuButtons();var bh=bk.indexOf(bl);if(bh===-1){return;}var bm=null;var length=bk.length;for(var i=1;i<=length;i++){var bj=bk[(bh-i+length)%length];if(bj.isEnabled()){bm=bj;break;}}if(bm&&bm!=bl){bm.open(true);}}},_onKeyPressRight:function(bn){var bp=bn.getSelectedButton();if(bp){var bo=bp.getMenu();if(bo){bn.setOpenedButton(bp);var bv=this._getChild(bo,0,1);if(bv){bo.setSelectedButton(bv);}return;}}else if(!bn.getOpenedButton()){var bv=this._getChild(bn,0,1);if(bv){bn.setSelectedButton(bv);if(bv.getMenu()){bn.setOpenedButton(bv);}return;}}var bt=bn.getOpener();if(bt instanceof qx.ui.menu.Button&&bp){while(bt){bt=bt.getLayoutParent();if(bt instanceof qx.ui.menu.Menu){bt=bt.getOpener();if(bt instanceof qx.ui.menubar.Button){break;}}else{break;}}if(!bt){return;}}if(bt instanceof qx.ui.menubar.Button){var bs=bt.getMenuBar().getMenuButtons();var bq=bs.indexOf(bt);if(bq===-1){return;}var bu=null;var length=bs.length;for(var i=1;i<=length;i++){var br=bs[(bq+i)%length];if(br.isEnabled()){bu=br;break;}}if(bu&&bu!=bt){bu.open(true);}}},_onKeyPressEnter:function(bw,bx,e){if(bx.hasListener(t)){var by=e.clone();by.setBubbles(false);by.setTarget(bx);bx.dispatchEvent(by);}this.hideAll();},_onKeyPressSpace:function(bz,bA,e){if(bA.hasListener(t)){var bB=e.clone();bB.setBubbles(false);bB.setTarget(bA);bA.dispatchEvent(bB);}}},destruct:function(){var bD=qx.event.Registration;var bC=document.body;bD.removeListener(window.document.documentElement,q,this._onMouseDown,this,true);bD.removeListener(bC,r,this._onKeyUpDown,this,true);bD.removeListener(bC,p,this._onKeyUpDown,this,true);bD.removeListener(bC,t,this._onKeyPress,this,true);this._disposeObjects(o,l);this._disposeArray(b);}});})();(function(){var l="indexOf",k="addAfter",j="add",i="addBefore",h="_",g="addAt",f="hasChildren",e="removeAt",d="removeAll",c="getChildren",a="remove",b="qx.ui.core.MRemoteChildrenHandling";qx.Mixin.define(b,{members:{__ex:function(m,n,o,p){var q=this.getChildrenContainer();if(q===this){m=h+m;}return (q[m])(n,o,p);},getChildren:function(){return this.__ex(c);},hasChildren:function(){return this.__ex(f);},add:function(r,s){return this.__ex(j,r,s);},remove:function(t){return this.__ex(a,t);},removeAll:function(){return this.__ex(d);},indexOf:function(u){return this.__ex(l,u);},addAt:function(v,w,x){this.__ex(g,v,w,x);},addBefore:function(y,z,A){this.__ex(i,y,z,A);},addAfter:function(B,C,D){this.__ex(k,B,C,D);},removeAt:function(E){this.__ex(e,E);}}});})();(function(){var l="slidebar",k="Integer",j="resize",h="qx.ui.core.Widget",g="selected",f="visible",d="Boolean",c="mouseout",b="excluded",a="menu",A="_applySelectedButton",z="_applyOpenInterval",y="_applySpacingY",x="_blocker",w="_applyCloseInterval",v="_applyBlockerColor",u="_applyIconColumnWidth",t="mouseover",s="qx.ui.menu.Menu",r="Color",p="Number",q="_applyOpenedButton",n="_applySpacingX",o="_applyBlockerOpacity",m="_applyArrowColumnWidth";qx.Class.define(s,{extend:qx.ui.core.Widget,include:[qx.ui.core.MPlacement,qx.ui.core.MRemoteChildrenHandling],construct:function(){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.menu.Layout);var B=this.getApplicationRoot();B.add(this);this.addListener(t,this._onMouseOver);this.addListener(c,this._onMouseOut);this.addListener(j,this._onResize,this);B.addListener(j,this._onResize,this);this._blocker=new qx.ui.core.Blocker(B);this.initVisibility();this.initKeepFocus();this.initKeepActive();},properties:{appearance:{refine:true,init:a},allowGrowX:{refine:true,init:false},allowGrowY:{refine:true,init:false},visibility:{refine:true,init:b},keepFocus:{refine:true,init:true},keepActive:{refine:true,init:true},spacingX:{check:k,apply:n,init:0,themeable:true},spacingY:{check:k,apply:y,init:0,themeable:true},iconColumnWidth:{check:k,init:0,themeable:true,apply:u},arrowColumnWidth:{check:k,init:0,themeable:true,apply:m},blockerColor:{check:r,init:null,nullable:true,apply:v,themeable:true},blockerOpacity:{check:p,init:1,apply:o,themeable:true},selectedButton:{check:h,nullable:true,apply:A},openedButton:{check:h,nullable:true,apply:q},opener:{check:h,nullable:true},openInterval:{check:k,themeable:true,init:250,apply:z},closeInterval:{check:k,themeable:true,init:250,apply:w},blockBackground:{check:d,themeable:true,init:false}},members:{__qv:null,__qw:null,_blocker:null,open:function(){if(this.getOpener()!=null){this.placeToWidget(this.getOpener());this.__qy();this.show();this._placementTarget=this.getOpener();}else{this.warn("The menu instance needs a configured 'opener' widget!");}},openAtMouse:function(e){this.placeToMouse(e);this.__qy();this.show();this._placementTarget={left:e.getDocumentLeft(),top:e.getDocumentTop()};},openAtPoint:function(C){this.placeToPoint(C);this.__qy();this.show();this._placementTarget=C;},addSeparator:function(){this.add(new qx.ui.menu.Separator);},getColumnSizes:function(){return this._getMenuLayout().getColumnSizes();},getSelectables:function(){var D=[];var E=this.getChildren();for(var i=0;i<E.length;i++){if(E[i].isEnabled()){D.push(E[i]);}}return D;},_applyIconColumnWidth:function(F,G){this._getMenuLayout().setIconColumnWidth(F);},_applyArrowColumnWidth:function(H,I){this._getMenuLayout().setArrowColumnWidth(H);},_applySpacingX:function(J,K){this._getMenuLayout().setColumnSpacing(J);},_applySpacingY:function(L,M){this._getMenuLayout().setSpacing(L);},_applyVisibility:function(N,O){qx.ui.core.Widget.prototype._applyVisibility.call(this,N,O);var P=qx.ui.menu.Manager.getInstance();if(N===f){P.add(this);var Q=this.getParentMenu();if(Q){Q.setOpenedButton(this.getOpener());}}else if(O===f){P.remove(this);var Q=this.getParentMenu();if(Q&&Q.getOpenedButton()==this.getOpener()){Q.resetOpenedButton();}this.resetOpenedButton();this.resetSelectedButton();}this.__qx();},__qx:function(){if(this.isVisible()){if(this.getBlockBackground()){var R=this.getZIndex();this._blocker.blockContent(R-1);}}else{if(this._blocker.isContentBlocked()){this._blocker.unblockContent();}}},getParentMenu:function(){var S=this.getOpener();if(!S||!(S instanceof qx.ui.menu.AbstractButton)){return null;}while(S&&!(S instanceof qx.ui.menu.Menu)){S=S.getLayoutParent();}return S;},_applySelectedButton:function(T,U){if(U){U.removeState(g);}if(T){T.addState(g);}},_applyOpenedButton:function(V,W){if(W){W.getMenu().exclude();}if(V){V.getMenu().open();}},_applyBlockerColor:function(X,Y){this._blocker.setColor(X);},_applyBlockerOpacity:function(ba,bb){this._blocker.setOpacity(ba);},getChildrenContainer:function(){return this.getChildControl(l,true)||this;},_createChildControlImpl:function(bc,bd){var be;switch(bc){case l:var be=new qx.ui.menu.MenuSlideBar();var bg=this._getLayout();this._setLayout(new qx.ui.layout.Grow());var bf=be.getLayout();be.setLayout(bg);bf.dispose();var bh=qx.lang.Array.clone(this.getChildren());for(var i=0;i<bh.length;i++){be.add(bh[i]);}this.removeListener(j,this._onResize,this);be.getChildrenContainer().addListener(j,this._onResize,this);this._add(be);break;}return be||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,bc);},_getMenuLayout:function(){if(this.hasChildControl(l)){return this.getChildControl(l).getChildrenContainer().getLayout();}else{return this._getLayout();}},_getMenuBounds:function(){if(this.hasChildControl(l)){return this.getChildControl(l).getChildrenContainer().getBounds();}else{return this.getBounds();}},_computePlacementSize:function(){return this._getMenuBounds();},__qy:function(){var bj=this._getMenuBounds();if(!bj){this.addListenerOnce(j,this.__qy,this);return;}var bi=this.getLayoutParent().getBounds().height;var top=this.getLayoutProperties().top;var bk=this.getLayoutProperties().left;if(top<0){this._assertSlideBar(function(){this.setHeight(bj.height+top);this.moveTo(bk,0);});}else if(top+bj.height>bi){this._assertSlideBar(function(){this.setHeight(bi-top);});}else{this.setHeight(null);}},_assertSlideBar:function(bl){if(this.hasChildControl(l)){return bl.call(this);}this.__qw=bl;qx.ui.core.queue.Widget.add(this);},syncWidget:function(){this.getChildControl(l);if(this.__qw){this.__qw.call(this);delete this.__qw;}},_onResize:function(){if(this.isVisible()){var bm=this._placementTarget;if(!bm){return;}else if(bm instanceof qx.ui.core.Widget){this.placeToWidget(bm);}else if(bm.top!==undefined){this.placeToPoint(bm);}else{throw new Error("Unknown target: "+bm);}this.__qy();}},_onMouseOver:function(e){var bo=qx.ui.menu.Manager.getInstance();bo.cancelClose(this);var bp=e.getTarget();if(bp.isEnabled()&&bp instanceof qx.ui.menu.AbstractButton){this.setSelectedButton(bp);var bn=bp.getMenu&&bp.getMenu();if(bn){bn.setOpener(bp);bo.scheduleOpen(bn);this.__qv=bn;}else{var bq=this.getOpenedButton();if(bq){bo.scheduleClose(bq.getMenu());}if(this.__qv){bo.cancelOpen(this.__qv);this.__qv=null;}}}else if(!this.getOpenedButton()){this.resetSelectedButton();}},_onMouseOut:function(e){var br=qx.ui.menu.Manager.getInstance();if(!qx.ui.core.Widget.contains(this,e.getRelatedTarget())){var bs=this.getOpenedButton();bs?this.setSelectedButton(bs):this.resetSelectedButton();if(bs){br.cancelClose(bs.getMenu());}if(this.__qv){br.cancelOpen(this.__qv);}}}},destruct:function(){if(!qx.core.ObjectRegistry.inShutDown){qx.ui.menu.Manager.getInstance().remove(this);}this.getApplicationRoot().removeListener(j,this._onResize,this);this._placementTarget=null;this._disposeObjects(x);}});})();(function(){var c="Integer",b="_applyLayoutChange",a="qx.ui.menu.Layout";qx.Class.define(a,{extend:qx.ui.layout.VBox,properties:{columnSpacing:{check:c,init:0,apply:b},spanColumn:{check:c,init:1,nullable:true,apply:b},iconColumnWidth:{check:c,init:0,themeable:true,apply:b},arrowColumnWidth:{check:c,init:0,themeable:true,apply:b}},members:{__qm:null,_computeSizeHint:function(){var q=this._getLayoutChildren();var o,g,j;var e=this.getSpanColumn();var h=this.__qm=[0,0,0,0];var m=this.getColumnSpacing();var k=0;var f=0;for(var i=0,l=q.length;i<l;i++){o=q[i];if(o.isAnonymous()){continue;}g=o.getChildrenSizes();for(var n=0;n<g.length;n++){if(e!=null&&n==e&&g[e+1]==0){k=Math.max(k,g[n]);}else{h[n]=Math.max(h[n],g[n]);}}var d=q[i].getInsets();f=Math.max(f,d.left+d.right);}if(e!=null&&h[e]+m+h[e+1]<k){h[e]=k-h[e+1]-m;}if(k==0){j=m*2;}else{j=m*3;}if(h[0]==0){h[0]=this.getIconColumnWidth();}if(h[3]==0){h[3]=this.getArrowColumnWidth();}var p=qx.ui.layout.VBox.prototype._computeSizeHint.call(this).height;return {minHeight:p,height:p,width:qx.lang.Array.sum(h)+f+j};},getColumnSizes:function(){return this.__qm||null;}},destruct:function(){this.__qm=null;}});})();(function(){var l="zIndex",k="px",j="keydown",h="deactivate",g="resize",f="keyup",d="keypress",c="backgroundColor",b="_applyOpacity",a="Boolean",x="__sg",w="__se",v="opacity",u="interval",t="Tab",s="Color",r="qx.ui.root.Page",q="Number",p="qx.ui.core.Blocker",o="__sc",m="qx.ui.root.Application",n="_applyColor";qx.Class.define(p,{extend:qx.core.Object,construct:function(y){qx.core.Object.call(this);this._widget=y;this._isPageRoot=(qx.Class.isDefined(r)&&y instanceof qx.ui.root.Page);if(this._isPageRoot){y.addListener(g,this.__sh,this);}if(qx.Class.isDefined(m)&&y instanceof qx.ui.root.Application){this.setKeepBlockerActive(true);}this.__rY=[];this.__sa=[];this.__sb=[];},properties:{color:{check:s,init:null,nullable:true,apply:n,themeable:true},opacity:{check:q,init:1,apply:b,themeable:true},keepBlockerActive:{check:a,init:false}},members:{__sc:null,__sd:0,__se:null,__sb:null,__rY:null,__sa:null,__sf:null,__sg:null,_isPageRoot:false,_widget:null,__sh:function(e){var z=e.getData();if(this.isContentBlocked()){this.getContentBlockerElement().setStyles({width:z.width,height:z.height});}if(this.isBlocked()){this.getBlockerElement().setStyles({width:z.width,height:z.height});}},_applyColor:function(A,B){var C=qx.theme.manager.Color.getInstance().resolve(A);this.__si(c,C);},_applyOpacity:function(D,E){this.__si(v,D);},__si:function(F,G){var H=[];this.__sc&&H.push(this.__sc);this.__se&&H.push(this.__se);for(var i=0;i<H.length;i++){H[i].setStyle(F,G);}},_backupActiveWidget:function(){var I=qx.event.Registration.getManager(window).getHandler(qx.event.handler.Focus);this.__rY.push(I.getActive());this.__sa.push(I.getFocus());if(this._widget.isFocusable()){this._widget.focus();}},_restoreActiveWidget:function(){var L=this.__rY.length;if(L>0){var K=this.__rY[L-1];if(K){qx.bom.Element.activate(K);}this.__rY.pop();}var J=this.__sa.length;if(J>0){var K=this.__sa[J-1];if(K){qx.bom.Element.focus(this.__sa[J-1]);}this.__sa.pop();}},__sj:function(){return new qx.html.Blocker(this.getColor(),this.getOpacity());},getBlockerElement:function(){if(!this.__sc){this.__sc=this.__sj();this.__sc.setStyle(l,15);this._widget.getContainerElement().add(this.__sc);this.__sc.exclude();}return this.__sc;},block:function(){this.__sd++;if(this.__sd<2){this._backupActiveWidget();var M=this.getBlockerElement();M.include();M.activate();M.addListener(h,this.__so,this);M.addListener(d,this.__sn,this);M.addListener(j,this.__sn,this);M.addListener(f,this.__sn,this);}},isBlocked:function(){return this.__sd>0;},unblock:function(){if(!this.isBlocked()){return;}this.__sd--;if(this.__sd<1){this.__sk();this.__sd=0;}},forceUnblock:function(){if(!this.isBlocked()){return;}this.__sd=0;this.__sk();},__sk:function(){this._restoreActiveWidget();var N=this.getBlockerElement();N.removeListener(h,this.__so,this);N.removeListener(d,this.__sn,this);N.removeListener(j,this.__sn,this);N.removeListener(f,this.__sn,this);N.exclude();},getContentBlockerElement:function(){if(!this.__se){this.__se=this.__sj();this._widget.getContentElement().add(this.__se);this.__se.exclude();}return this.__se;},blockContent:function(O){var P=this.getContentBlockerElement();P.setStyle(l,O);this.__sb.push(O);if(this.__sb.length<2){P.include();if(this._isPageRoot){if(!this.__sg){this.__sg=new qx.event.Timer(300);this.__sg.addListener(u,this.__sm,this);}this.__sg.start();this.__sm();}}},isContentBlocked:function(){return this.__sb.length>0;},unblockContent:function(){if(!this.isContentBlocked()){return;}this.__sb.pop();var Q=this.__sb[this.__sb.length-1];var R=this.getContentBlockerElement();R.setStyle(l,Q);if(this.__sb.length<1){this.__sl();this.__sb=[];}},forceUnblockContent:function(){if(!this.isContentBlocked()){return;}this.__sb=[];var S=this.getContentBlockerElement();S.setStyle(l,null);this.__sl();},__sl:function(){this.getContentBlockerElement().exclude();if(this._isPageRoot){this.__sg.stop();}},__sm:function(){var T=this._widget.getContainerElement().getDomElement();var U=qx.dom.Node.getDocument(T);this.getContentBlockerElement().setStyles({height:U.documentElement.scrollHeight+k,width:U.documentElement.scrollWidth+k});},__sn:function(e){if(e.getKeyIdentifier()==t){e.stop();}},__so:function(){if(this.getKeepBlockerActive()){this.getBlockerElement().activate();}}},destruct:function(){if(this._isPageRoot){this._widget.removeListener(g,this.__sh,this);}this._disposeObjects(w,o,x);this.__sf=this.__rY=this.__sa=this._widget=this.__sb=null;}});})();(function(){var i="qx.ui.window.Window",h="changeModal",g="changeVisibility",f="changeActive",d="_applyActiveWindow",c="__og",b="__of",a="qx.ui.window.MDesktop";qx.Mixin.define(a,{properties:{activeWindow:{check:i,apply:d,init:null,nullable:true}},members:{__of:null,__og:null,getWindowManager:function(){if(!this.__og){this.setWindowManager(new qx.ui.window.Window.DEFAULT_MANAGER_CLASS());}return this.__og;},supportsMaximize:function(){return true;},setWindowManager:function(j){if(this.__og){this.__og.setDesktop(null);}j.setDesktop(this);this.__og=j;},_onChangeActive:function(e){if(e.getData()){this.setActiveWindow(e.getTarget());}else if(this.getActiveWindow()==e.getTarget()){this.setActiveWindow(null);}},_applyActiveWindow:function(k,l){this.getWindowManager().changeActiveWindow(k,l);this.getWindowManager().updateStack();},_onChangeModal:function(e){this.getWindowManager().updateStack();},_onChangeVisibility:function(){this.getWindowManager().updateStack();},_afterAddChild:function(m){if(qx.Class.isDefined(i)&&m instanceof qx.ui.window.Window){this._addWindow(m);}},_addWindow:function(n){if(!qx.lang.Array.contains(this.getWindows(),n)){this.getWindows().push(n);n.addListener(f,this._onChangeActive,this);n.addListener(h,this._onChangeModal,this);n.addListener(g,this._onChangeVisibility,this);}if(n.getActive()){this.setActiveWindow(n);}this.getWindowManager().updateStack();},_afterRemoveChild:function(o){if(qx.Class.isDefined(i)&&o instanceof qx.ui.window.Window){this._removeWindow(o);}},_removeWindow:function(p){qx.lang.Array.remove(this.getWindows(),p);p.removeListener(f,this._onChangeActive,this);p.removeListener(h,this._onChangeModal,this);p.removeListener(g,this._onChangeVisibility,this);this.getWindowManager().updateStack();},getWindows:function(){if(!this.__of){this.__of=[];}return this.__of;}},destruct:function(){this._disposeArray(b);this._disposeObjects(c);}});})();(function(){var f="_applyBlockerColor",e="Number",d="__rQ",c="qx.ui.core.MBlocker",b="_applyBlockerOpacity",a="Color";qx.Mixin.define(c,{construct:function(){this.__rQ=new qx.ui.core.Blocker(this);},properties:{blockerColor:{check:a,init:null,nullable:true,apply:f,themeable:true},blockerOpacity:{check:e,init:1,apply:b,themeable:true}},members:{__rQ:null,_applyBlockerColor:function(g,h){this.__rQ.setColor(g);},_applyBlockerOpacity:function(i,j){this.__rQ.setOpacity(i);},block:function(){this.__rQ.block();},isBlocked:function(){return this.__rQ.isBlocked();},unblock:function(){this.__rQ.unblock();},forceUnblock:function(){this.__rQ.forceUnblock();},blockContent:function(k){this.__rQ.blockContent(k);},isContentBlocked:function(){return this.__rQ.isContentBlocked();},unblockContent:function(){this.__rQ.unblockContent();},forceUnblockContent:function(){this.__rQ.forceUnblockContent();},getBlocker:function(){return this.__rQ;}},destruct:function(){this._disposeObjects(d);}});})();(function(){var p="contextmenu",o="help",n="qx.client",m="changeGlobalCursor",l="abstract",k="Boolean",j="root",i="",h=" !important",g="_applyGlobalCursor",c="_applyNativeHelp",f=";",d="qx.ui.root.Abstract",b="String",a="*";qx.Class.define(d,{type:l,extend:qx.ui.core.Widget,include:[qx.ui.core.MChildrenHandling,qx.ui.core.MBlocker,qx.ui.window.MDesktop],construct:function(){qx.ui.core.Widget.call(this);qx.ui.core.FocusHandler.getInstance().addRoot(this);qx.ui.core.queue.Visibility.add(this);this.initNativeHelp();},properties:{appearance:{refine:true,init:j},enabled:{refine:true,init:true},focusable:{refine:true,init:true},globalCursor:{check:b,nullable:true,themeable:true,apply:g,event:m},nativeContextMenu:{refine:true,init:false},nativeHelp:{check:k,init:false,apply:c}},members:{__mS:null,isRootWidget:function(){return true;},getLayout:function(){return this._getLayout();},_applyGlobalCursor:qx.core.Variant.select(n,{"mshtml":function(q,r){},"default":function(s,t){var u=qx.bom.Stylesheet;var v=this.__mS;if(!v){this.__mS=v=u.createElement();}u.removeAllRules(v);if(s){u.addRule(v,a,qx.bom.element.Cursor.compile(s).replace(f,i)+h);}}}),_applyNativeContextMenu:function(w,x){if(w){this.removeListener(p,this._onNativeContextMenu,this,true);}else{this.addListener(p,this._onNativeContextMenu,this,true);}},_onNativeContextMenu:function(e){if(e.getTarget().getNativeContextMenu()){return;}e.preventDefault();},_applyNativeHelp:qx.core.Variant.select(n,{"mshtml":function(y,z){if(z===false){qx.bom.Event.removeNativeListener(document,o,qx.lang.Function.returnFalse);}if(y===false){qx.bom.Event.addNativeListener(document,o,qx.lang.Function.returnFalse);}},"default":function(){}})},destruct:function(){this.__mS=null;},defer:function(A,B){qx.ui.core.MChildrenHandling.remap(B);}});})();(function(){var n="resize",m="position",l="0px",k="webkit",j="paddingLeft",i="$$widget",h="qx.ui.root.Application",g="hidden",f="qx.client",d="div",a="paddingTop",c="100%",b="absolute";qx.Class.define(h,{extend:qx.ui.root.Abstract,construct:function(o){this.__pj=qx.dom.Node.getWindow(o);this.__pk=o;qx.ui.root.Abstract.call(this);qx.event.Registration.addListener(this.__pj,n,this._onResize,this);this._setLayout(new qx.ui.layout.Canvas());qx.ui.core.queue.Layout.add(this);qx.ui.core.FocusHandler.getInstance().connectTo(this);this.getContentElement().disableScrolling();},members:{__pj:null,__pk:null,_createContainerElement:function(){var p=this.__pk;if(qx.core.Variant.isSet(f,k)){if(!p.body){alert("The application could not be started due to a missing body tag in the HTML file!");}}var t=p.documentElement.style;var q=p.body.style;t.overflow=q.overflow=g;t.padding=t.margin=q.padding=q.margin=l;t.width=t.height=q.width=q.height=c;var s=p.createElement(d);p.body.appendChild(s);var r=new qx.html.Root(s);r.setStyle(m,b);r.setAttribute(i,this.toHashCode());return r;},_onResize:function(e){qx.ui.core.queue.Layout.add(this);},_computeSizeHint:function(){var u=qx.bom.Viewport.getWidth(this.__pj);var v=qx.bom.Viewport.getHeight(this.__pj);return {minWidth:u,width:u,maxWidth:u,minHeight:v,height:v,maxHeight:v};},_applyPadding:function(w,x,name){if(w&&(name==a||name==j)){throw new Error("The root widget does not support 'left', or 'top' paddings!");}qx.ui.root.Abstract.prototype._applyPadding.call(this,w,x,name);},_applyDecorator:function(y,z){qx.ui.root.Abstract.prototype._applyDecorator.call(this,y,z);if(!y){return;}var A=this.getDecoratorElement().getInsets();if(A.left||A.top){throw new Error("The root widget does not support decorators with 'left', or 'top' insets!");}}},destruct:function(){this.__pj=this.__pk=null;}});})();(function(){var k="keypress",j="focusout",h="activate",g="Tab",f="singleton",d="__bE",c="deactivate",b="focusin",a="qx.ui.core.FocusHandler";qx.Class.define(a,{extend:qx.core.Object,type:f,construct:function(){qx.core.Object.call(this);this.__bE={};},members:{__bE:null,__bF:null,__bG:null,__bH:null,connectTo:function(m){m.addListener(k,this.__bI,this);m.addListener(b,this._onFocusIn,this,true);m.addListener(j,this._onFocusOut,this,true);m.addListener(h,this._onActivate,this,true);m.addListener(c,this._onDeactivate,this,true);},addRoot:function(n){this.__bE[n.$$hash]=n;},removeRoot:function(o){delete this.__bE[o.$$hash];},getActiveWidget:function(){return this.__bF;},isActive:function(p){return this.__bF==p;},getFocusedWidget:function(){return this.__bG;},isFocused:function(q){return this.__bG==q;},isFocusRoot:function(r){return !!this.__bE[r.$$hash];},_onActivate:function(e){var t=e.getTarget();this.__bF=t;var s=this.__bJ(t);if(s!=this.__bH){this.__bH=s;}},_onDeactivate:function(e){var u=e.getTarget();if(this.__bF==u){this.__bF=null;}},_onFocusIn:function(e){var v=e.getTarget();if(v!=this.__bG){this.__bG=v;v.visualizeFocus();}},_onFocusOut:function(e){var w=e.getTarget();if(w==this.__bG){this.__bG=null;w.visualizeBlur();}},__bI:function(e){if(e.getKeyIdentifier()!=g){return;}if(!this.__bH){return;}e.stopPropagation();e.preventDefault();var x=this.__bG;if(!e.isShiftPressed()){var y=x?this.__bN(x):this.__bL();}else{var y=x?this.__bO(x):this.__bM();}if(y){y.tabFocus();}},__bJ:function(z){var A=this.__bE;while(z){if(A[z.$$hash]){return z;}z=z.getLayoutParent();}return null;},__bK:function(B,C){if(B===C){return 0;}var E=B.getTabIndex()||0;var D=C.getTabIndex()||0;if(E!=D){return E-D;}var J=B.getContainerElement().getDomElement();var I=C.getContainerElement().getDomElement();var H=qx.bom.element.Location;var G=H.get(J);var F=H.get(I);if(G.top!=F.top){return G.top-F.top;}if(G.left!=F.left){return G.left-F.left;}var K=B.getZIndex();var L=C.getZIndex();if(K!=L){return K-L;}return 0;},__bL:function(){return this.__bR(this.__bH,null);},__bM:function(){return this.__bS(this.__bH,null);},__bN:function(M){var N=this.__bH;if(N==M){return this.__bL();}while(M&&M.getAnonymous()){M=M.getLayoutParent();}if(M==null){return [];}var O=[];this.__bP(N,M,O);O.sort(this.__bK);var P=O.length;return P>0?O[0]:this.__bL();},__bO:function(Q){var R=this.__bH;if(R==Q){return this.__bM();}while(Q&&Q.getAnonymous()){Q=Q.getLayoutParent();}if(Q==null){return [];}var S=[];this.__bQ(R,Q,S);S.sort(this.__bK);var T=S.length;return T>0?S[T-1]:this.__bM();},__bP:function(parent,U,V){var W=parent.getLayoutChildren();var X;for(var i=0,l=W.length;i<l;i++){X=W[i];if(!(X instanceof qx.ui.core.Widget)){continue;}if(!this.isFocusRoot(X)&&X.isEnabled()&&X.isVisible()){if(X.isTabable()&&this.__bK(U,X)<0){V.push(X);}this.__bP(X,U,V);}}},__bQ:function(parent,Y,ba){var bb=parent.getLayoutChildren();var bc;for(var i=0,l=bb.length;i<l;i++){bc=bb[i];if(!(bc instanceof qx.ui.core.Widget)){continue;}if(!this.isFocusRoot(bc)&&bc.isEnabled()&&bc.isVisible()){if(bc.isTabable()&&this.__bK(Y,bc)>0){ba.push(bc);}this.__bQ(bc,Y,ba);}}},__bR:function(parent,bd){var be=parent.getLayoutChildren();var bf;for(var i=0,l=be.length;i<l;i++){bf=be[i];if(!(bf instanceof qx.ui.core.Widget)){continue;}if(!this.isFocusRoot(bf)&&bf.isEnabled()&&bf.isVisible()){if(bf.isTabable()){if(bd==null||this.__bK(bf,bd)<0){bd=bf;}}bd=this.__bR(bf,bd);}}return bd;},__bS:function(parent,bg){var bh=parent.getLayoutChildren();var bi;for(var i=0,l=bh.length;i<l;i++){bi=bh[i];if(!(bi instanceof qx.ui.core.Widget)){continue;}if(!this.isFocusRoot(bi)&&bi.isEnabled()&&bi.isVisible()){if(bi.isTabable()){if(bg==null||this.__bK(bi,bg)>0){bg=bi;}}bg=this.__bS(bi,bg);}}return bg;}},destruct:function(){this._disposeMap(d);this.__bG=this.__bF=this.__bH=null;}});})();(function(){var a="qx.html.Root";qx.Class.define(a,{extend:qx.html.Element,construct:function(b){qx.html.Element.call(this);if(b!=null){this.useElement(b);}},members:{useElement:function(c){qx.html.Element.prototype.useElement.call(this,c);this.setRoot(true);qx.html.Element._modified[this.$$hash]=this;}}});})();(function(){var k="cursor",j="100%",i="repeat",h="mousedown",g="url(",f=")",d="mouseout",c="qx.client",b="div",a="dblclick",w="mousewheel",v="qx.html.Blocker",u="mousemove",t="mouseover",s="appear",r="click",q="mshtml",p="mouseup",o="contextmenu",n="disappear",l="qx/static/blank.gif",m="absolute";qx.Class.define(v,{extend:qx.html.Element,construct:function(x,y){var x=x?qx.theme.manager.Color.getInstance().resolve(x):null;var z={position:m,width:j,height:j,opacity:y||0,backgroundColor:x};if(qx.core.Variant.isSet(c,q)){z.backgroundImage=g+qx.util.ResourceManager.getInstance().toUri(l)+f;z.backgroundRepeat=i;}qx.html.Element.call(this,b,z);this.addListener(h,this._stopPropagation,this);this.addListener(p,this._stopPropagation,this);this.addListener(r,this._stopPropagation,this);this.addListener(a,this._stopPropagation,this);this.addListener(u,this._stopPropagation,this);this.addListener(t,this._stopPropagation,this);this.addListener(d,this._stopPropagation,this);this.addListener(w,this._stopPropagation,this);this.addListener(o,this._stopPropagation,this);this.addListener(s,this.__qp,this);this.addListener(n,this.__qp,this);},members:{_stopPropagation:function(e){e.stopPropagation();},__qp:function(){var A=this.getStyle(k);this.setStyle(k,null,true);this.setStyle(k,A,true);}}});})();(function(){var b="menu-separator",a="qx.ui.menu.Separator";qx.Class.define(a,{extend:qx.ui.core.Widget,properties:{appearance:{refine:true,init:b},anonymous:{refine:true,init:true}}});})();(function(){var t="icon",s="label",r="arrow",q="shortcut",p="changeLocale",o="qx.dynlocale",n="submenu",m="on",l="String",k="qx.ui.menu.Menu",d="qx.ui.menu.AbstractButton",j="keypress",h="",c="_applyIcon",b="mouseup",g="abstract",f="_applyLabel",i="_applyMenu",a="changeCommand";qx.Class.define(d,{extend:qx.ui.core.Widget,include:[qx.ui.core.MExecutable],implement:[qx.ui.form.IExecutable],type:g,construct:function(){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.menu.ButtonLayout);this.addListener(b,this._onMouseUp);this.addListener(j,this._onKeyPress);this.addListener(a,this._onChangeCommand,this);},properties:{blockToolTip:{refine:true,init:true},label:{check:l,apply:f,nullable:true},menu:{check:k,apply:i,nullable:true,dereference:true},icon:{check:l,apply:c,themeable:true,nullable:true}},members:{_createChildControlImpl:function(u,v){var w;switch(u){case t:w=new qx.ui.basic.Image;w.setAnonymous(true);this._add(w,{column:0});break;case s:w=new qx.ui.basic.Label;w.setAnonymous(true);this._add(w,{column:1});break;case q:w=new qx.ui.basic.Label;w.setAnonymous(true);this._add(w,{column:2});break;case r:w=new qx.ui.basic.Image;w.setAnonymous(true);this._add(w,{column:3});break;}return w||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,u);},_forwardStates:{selected:1},getChildrenSizes:function(){var x=0,y=0,z=0,D=0;if(this._isChildControlVisible(t)){var E=this.getChildControl(t);x=E.getMarginLeft()+E.getSizeHint().width+E.getMarginRight();}if(this._isChildControlVisible(s)){var B=this.getChildControl(s);y=B.getMarginLeft()+B.getSizeHint().width+B.getMarginRight();}if(this._isChildControlVisible(q)){var A=this.getChildControl(q);z=A.getMarginLeft()+A.getSizeHint().width+A.getMarginRight();}if(this._isChildControlVisible(r)){var C=this.getChildControl(r);D=C.getMarginLeft()+C.getSizeHint().width+C.getMarginRight();}return [x,y,z,D];},_onMouseUp:function(e){},_onKeyPress:function(e){},_onChangeCommand:function(e){var H=e.getData();if(qx.core.Variant.isSet(o,m)){var F=e.getOldData();if(!F){qx.locale.Manager.getInstance().addListener(p,this._onChangeLocale,this);}if(!H){qx.locale.Manager.getInstance().removeListener(p,this._onChangeLocale,this);}}var G=H!=null?H.toString():h;this.getChildControl(q).setValue(G);},_onChangeLocale:qx.core.Variant.select(o,{"on":function(e){var I=this.getCommand();if(I!=null){this.getChildControl(q).setValue(I.toString());}},"off":null}),_applyIcon:function(J,K){if(J){this._showChildControl(t).setSource(J);}else{this._excludeChildControl(t);}},_applyLabel:function(L,M){if(L){this._showChildControl(s).setValue(L);}else{this._excludeChildControl(s);}},_applyMenu:function(N,O){if(O){O.resetOpener();O.removeState(n);}if(N){this._showChildControl(r);N.setOpener(this);N.addState(n);}else{this._excludeChildControl(r);}}},destruct:function(){if(this.getMenu()){if(!qx.core.ObjectRegistry.inShutDown){this.getMenu().destroy();}}if(qx.core.Variant.isSet(o,m)){qx.locale.Manager.getInstance().removeListener(p,this._onChangeLocale,this);}}});})();(function(){var c="middle",b="qx.ui.menu.ButtonLayout",a="left";qx.Class.define(b,{extend:qx.ui.layout.Abstract,members:{verifyLayoutProperty:null,renderLayout:function(d,e){var q=this._getLayoutChildren();var p;var g;var h=[];for(var i=0,l=q.length;i<l;i++){p=q[i];g=p.getLayoutProperties().column;h[g]=p;}var o=this.__ob(q[0]);var r=o.getColumnSizes();var k=o.getSpacingX();var j=qx.lang.Array.sum(r)+k*(r.length-1);if(j<d){r[1]+=d-j;}var s=0,top=0;var m=qx.ui.layout.Util;for(var i=0,l=r.length;i<l;i++){p=h[i];if(p){var f=p.getSizeHint();var top=m.computeVerticalAlignOffset(p.getAlignY()||c,f.height,e,0,0);var n=m.computeHorizontalAlignOffset(p.getAlignX()||a,f.width,r[i],p.getMarginLeft(),p.getMarginRight());p.renderLayout(s+n,top,f.width,f.height);}s+=r[i]+k;}},__ob:function(t){while(!(t instanceof qx.ui.menu.Menu)){t=t.getLayoutParent();}return t;},_computeSizeHint:function(){var w=this._getLayoutChildren();var v=0;var x=0;for(var i=0,l=w.length;i<l;i++){var u=w[i].getSizeHint();x+=u.width;v=Math.max(v,u.height);}return {width:x,height:v};}}});})();(function(){var a="qx.ui.core.MRemoteLayoutHandling";qx.Mixin.define(a,{members:{setLayout:function(b){return this.getChildrenContainer().setLayout(b);},getLayout:function(){return this.getChildrenContainer().getLayout();}}});})();(function(){var q="horizontal",p="scrollpane",o="vertical",n="button-backward",m="button-forward",l="content",k="execute",j="qx.ui.container.SlideBar",i="scrollY",h="removeChildWidget",c="scrollX",g="_applyOrientation",f="mousewheel",b="Integer",a="slidebar",d="update";qx.Class.define(j,{extend:qx.ui.core.Widget,include:[qx.ui.core.MRemoteChildrenHandling,qx.ui.core.MRemoteLayoutHandling],construct:function(r){qx.ui.core.Widget.call(this);var s=this.getChildControl(p);this._add(s,{flex:1});if(r!=null){this.setOrientation(r);}else{this.initOrientation();}this.addListener(f,this._onMouseWheel,this);},properties:{appearance:{refine:true,init:a},orientation:{check:[q,o],init:q,apply:g},scrollStep:{check:b,init:15,themeable:true}},members:{getChildrenContainer:function(){return this.getChildControl(l);},_createChildControlImpl:function(t,u){var v;switch(t){case m:v=new qx.ui.form.RepeatButton;v.addListener(k,this._onExecuteForward,this);v.setFocusable(false);this._addAt(v,2);break;case n:v=new qx.ui.form.RepeatButton;v.addListener(k,this._onExecuteBackward,this);v.setFocusable(false);this._addAt(v,0);break;case l:v=new qx.ui.container.Composite();if(qx.bom.client.Engine.GECKO){v.addListener(h,this._onRemoveChild,this);}this.getChildControl(p).add(v);break;case p:v=new qx.ui.core.scroll.ScrollPane();v.addListener(d,this._onResize,this);v.addListener(c,this._onScroll,this);v.addListener(i,this._onScroll,this);break;}return v||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,t);},_forwardStates:{barLeft:true,barTop:true,barRight:true,barBottom:true},scrollBy:function(w){var x=this.getChildControl(p);if(this.getOrientation()===q){x.scrollByX(w);}else{x.scrollByY(w);}},scrollTo:function(y){var z=this.getChildControl(p);if(this.getOrientation()===q){z.scrollToX(y);}else{z.scrollToY(y);}},_applyOrientation:function(A,B){var E=[this.getLayout(),this._getLayout()];var D=this.getChildControl(m);var C=this.getChildControl(n);if(B==o){D.removeState(o);C.removeState(o);D.addState(q);C.addState(q);}else if(B==q){D.removeState(q);C.removeState(q);D.addState(o);C.addState(o);}if(A==q){this._setLayout(new qx.ui.layout.HBox());this.setLayout(new qx.ui.layout.HBox());}else{this._setLayout(new qx.ui.layout.VBox());this.setLayout(new qx.ui.layout.VBox());}if(E[0]){E[0].dispose();}if(E[1]){E[1].dispose();}},_onMouseWheel:function(e){this.scrollBy(e.getWheelDelta()*this.getScrollStep());e.stop();},_onScroll:function(){this._updateArrowsEnabled();},_onResize:function(e){var content=this.getChildControl(p).getChildren()[0];if(!content){return;}var F=this.getInnerSize();var H=content.getBounds();var G=(this.getOrientation()===q)?H.width>F.width:H.height>F.height;if(G){this._showArrows();this._updateArrowsEnabled();}else{this._hideArrows();}},_onExecuteBackward:function(){this.scrollBy(-this.getScrollStep());},_onExecuteForward:function(){this.scrollBy(this.getScrollStep());},_onRemoveChild:function(){qx.event.Timer.once(function(){this.scrollBy(this.getChildControl(p).getScrollX());},this,50);},_updateArrowsEnabled:function(){var J=this.getChildControl(p);if(this.getOrientation()===q){var I=J.getScrollX();var K=J.getScrollMaxX();}else{var I=J.getScrollY();var K=J.getScrollMaxY();}this.getChildControl(n).setEnabled(I>0);this.getChildControl(m).setEnabled(I<K);},_showArrows:function(){this._showChildControl(m);this._showChildControl(n);},_hideArrows:function(){this._excludeChildControl(m);this._excludeChildControl(n);this.scrollTo(0);}}});})();(function(){var f="execute",e="button-backward",d="vertical",c="button-forward",b="menu-slidebar",a="qx.ui.menu.MenuSlideBar";qx.Class.define(a,{extend:qx.ui.container.SlideBar,construct:function(){qx.ui.container.SlideBar.call(this,d);},properties:{appearance:{refine:true,init:b}},members:{_createChildControlImpl:function(g,h){var i;switch(g){case c:i=new qx.ui.form.HoverButton();i.addListener(f,this._onExecuteForward,this);this._addAt(i,2);break;case e:i=new qx.ui.form.HoverButton();i.addListener(f,this._onExecuteBackward,this);this._addAt(i,0);break;}return i||qx.ui.container.SlideBar.prototype._createChildControlImpl.call(this,g);}}});})();(function(){var i="Integer",h="hovered",g="hover-button",f="interval",d="mouseover",c="mouseout",b="__nk",a="qx.ui.form.HoverButton";qx.Class.define(a,{extend:qx.ui.basic.Atom,include:[qx.ui.core.MExecutable],implement:[qx.ui.form.IExecutable],construct:function(j,k){qx.ui.basic.Atom.call(this,j,k);this.addListener(d,this._onMouseOver,this);this.addListener(c,this._onMouseOut,this);this.__nk=new qx.event.AcceleratingTimer();this.__nk.addListener(f,this._onInterval,this);},properties:{appearance:{refine:true,init:g},interval:{check:i,init:80},firstInterval:{check:i,init:200},minTimer:{check:i,init:20},timerDecrease:{check:i,init:2}},members:{__nk:null,_onMouseOver:function(e){if(!this.isEnabled()||e.getTarget()!==this){return;}this.__nk.set({interval:this.getInterval(),firstInterval:this.getFirstInterval(),minimum:this.getMinTimer(),decrease:this.getTimerDecrease()}).start();this.addState(h);},_onMouseOut:function(e){this.__nk.stop();this.removeState(h);if(!this.isEnabled()||e.getTarget()!==this){return;}},_onInterval:function(){if(this.isEnabled()){this.execute();}else{this.__nk.stop();}}},destruct:function(){this._disposeObjects(b);}});})();(function(){var h="pressed",g="hovered",f="inherit",d="qx.ui.menubar.Button",c="keydown",b="menubar-button",a="keyup";qx.Class.define(d,{extend:qx.ui.form.MenuButton,construct:function(i,j,k){qx.ui.form.MenuButton.call(this,i,j,k);this.removeListener(c,this._onKeyDown);this.removeListener(a,this._onKeyUp);},properties:{appearance:{refine:true,init:b},show:{refine:true,init:f},focusable:{refine:true,init:false}},members:{getMenuBar:function(){var parent=this;while(parent){if(parent instanceof qx.ui.toolbar.ToolBar){return parent;}parent=parent.getLayoutParent();}return null;},open:function(l){qx.ui.form.MenuButton.prototype.open.call(this,l);var menubar=this.getMenuBar();menubar._setAllowMenuOpenHover(true);},_onMenuChange:function(e){var m=this.getMenu();var menubar=this.getMenuBar();if(m.isVisible()){this.addState(h);if(menubar){menubar.setOpenMenu(m);}}else{this.removeState(h);if(menubar&&menubar.getOpenMenu()==m){menubar.resetOpenMenu();menubar._setAllowMenuOpenHover(false);}}},_onMouseUp:function(e){qx.ui.form.MenuButton.prototype._onMouseUp.call(this,e);var n=this.getMenu();if(n&&n.isVisible()&&!this.hasState(h)){this.addState(h);}},_onMouseOver:function(e){this.addState(g);if(this.getMenu()){var menubar=this.getMenuBar();if(menubar._isAllowMenuOpenHover()){qx.ui.menu.Manager.getInstance().hideAll();menubar._setAllowMenuOpenHover(true);if(this.isEnabled()){this.open();}}}}}});})();(function(){var w="visible",v="excluded",u="resize",t="qx.event.type.Data",s="both",r="qx.ui.menu.Menu",q="_applySpacing",p="showItem",o="Boolean",n="icon",d="label",m="qx.ui.core.Widget",h="_applyOverflowIndicator",c="_applyOverflowHandling",b="changeShow",g="Integer",f="qx.ui.toolbar.ToolBar",j="hideItem",a="toolbar",k="changeOpenMenu";qx.Class.define(f,{extend:qx.ui.core.Widget,include:qx.ui.core.MChildrenHandling,construct:function(){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.HBox());this.__rp=[];this.__rq=[];},properties:{appearance:{refine:true,init:a},openMenu:{check:r,event:k,nullable:true},show:{init:s,check:[s,d,n],inheritable:true,event:b},spacing:{nullable:true,check:g,themeable:true,apply:q},overflowIndicator:{check:m,nullable:true,apply:h},overflowHandling:{init:false,check:o,apply:c}},events:{"hideItem":t,"showItem":t},members:{__rp:null,__rq:null,_computeSizeHint:function(){var z=qx.ui.core.Widget.prototype._computeSizeHint.call(this);if(true&&this.getOverflowHandling()){var x=0;var y=this.getOverflowIndicator();if(y){x=y.getSizeHint().width+this.getSpacing();}z.minWidth=x;}return z;},_onResize:function(e){this._recalculateOverflow(e.getData().width);},_recalculateOverflow:function(A){if(!this.getOverflowHandling()){return;}var C=this.getSizeHint().width;var B=this.getOverflowIndicator();var F=0;if(B){F=B.getSizeHint().width;}if(A<C){do{var G=this._getNextToHide();if(!G){return;}var H=G.getMarginLeft()+G.getMarginRight();var E=G.getSizeHint().width+H;this.__rs(G);C-=E;if(B&&B.getVisibility()!=w){B.setVisibility(w);C+=F;}}while(C>A);}else{do{var I=this.__rp[0];if(I){var H=I.getMarginLeft()+I.getMarginRight();var D=I.getSizeHint().width+H;if(A>C+D+this.getSpacing()||(this.__rp.length==1&&A>C+D-F+this.getSpacing())){this.__rr(I);A+=D;if(B&&this.__rp.length==0){B.setVisibility(v);}}else{return;}}}while(A>=C&&this.__rp.length>0);}},__rr:function(J){J.setVisibility(w);this.__rp.shift();this.fireDataEvent(p,J);},__rs:function(K){if(!K){return;}this.__rp.unshift(K);K.setVisibility(v);this.fireDataEvent(j,K);},_getNextToHide:function(){for(var i=this.__rq.length-1;i>=0;i--){var L=this.__rq[i];if(L&&L.getVisibility&&L.getVisibility()==w){return L;}}var M=this._getChildren();for(var i=M.length-1;i>=0;i--){var N=M[i];if(N==this.getOverflowIndicator()){continue;}if(N.getVisibility&&N.getVisibility()==w){return N;}}},setRemovePriority:function(O,P,Q){if(!Q&&this.__rq[P]!=undefined){throw new Error("Priority already in use!");}this.__rq[P]=O;},_applyOverflowHandling:function(R,S){this.invalidateLayoutCache();var parent=this.getLayoutParent();if(parent){parent.invalidateLayoutCache();}var U=this.getBounds();if(U&&U.width){this._recalculateOverflow(U.width);}if(R){this.addListener(u,this._onResize,this);}else{this.removeListener(u,this._onResize,this);var T=this.getOverflowIndicator();if(T){T.setVisibility(v);}for(var i=0;i<this.__rp.length;i++){this.__rp[i].setVisibility(w);}this.__rp=[];}},_applyOverflowIndicator:function(V,W){if(W){this._remove(W);}if(V){if(this._indexOf(V)==-1){throw new Error("Widget must be child of the toolbar.");}V.setVisibility(v);}},__rt:false,_setAllowMenuOpenHover:function(X){this.__rt=X;},_isAllowMenuOpenHover:function(){return this.__rt;},_applySpacing:function(Y,ba){var bb=this._getLayout();Y==null?bb.resetSpacing():bb.setSpacing(Y);},addSpacer:function(){var bc=new qx.ui.core.Spacer;this._add(bc,{flex:1});return bc;},addSeparator:function(){this.add(new qx.ui.toolbar.Separator);},getMenuButtons:function(){var be=this.getChildren();var bd=[];var bf;for(var i=0,l=be.length;i<l;i++){bf=be[i];if(bf instanceof qx.ui.menubar.Button){bd.push(bf);}else if(bf instanceof qx.ui.toolbar.Part){bd.push.apply(bd,bf.getMenuButtons());}}return bd;}},destruct:function(){if(this.hasListener(u)){this.removeListener(u,this._onResize,this);}}});})();(function(){var b="toolbar-separator",a="qx.ui.toolbar.Separator";qx.Class.define(a,{extend:qx.ui.core.Widget,properties:{appearance:{refine:true,init:b},anonymous:{refine:true,init:true},width:{refine:true,init:0},height:{refine:true,init:0}}});})();(function(){var m="container",k="handle",j="both",h="Integer",g="middle",f="qx.ui.toolbar.Part",e="icon",d="label",c="changeShow",b="_applySpacing",a="toolbar/part";qx.Class.define(f,{extend:qx.ui.core.Widget,include:[qx.ui.core.MRemoteChildrenHandling],construct:function(){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.HBox);this._createChildControl(k);},properties:{appearance:{refine:true,init:a},show:{init:j,check:[j,d,e],inheritable:true,event:c},spacing:{nullable:true,check:h,themeable:true,apply:b}},members:{_createChildControlImpl:function(n,o){var p;switch(n){case k:p=new qx.ui.basic.Image();p.setAlignY(g);this._add(p);break;case m:p=new qx.ui.toolbar.PartContainer;this._add(p);break;}return p||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,n);},getChildrenContainer:function(){return this.getChildControl(m);},_applySpacing:function(q,r){var s=this.getChildControl(m).getLayout();q==null?s.resetSpacing():s.setSpacing(q);},addSeparator:function(){this.add(new qx.ui.toolbar.Separator);},getMenuButtons:function(){var u=this.getChildren();var t=[];var v;for(var i=0,l=u.length;i<l;i++){v=u[i];if(v instanceof qx.ui.menubar.Button){t.push(v);}}return t;}}});})();(function(){var f="both",e="toolbar/part/container",d="icon",c="changeShow",b="qx.ui.toolbar.PartContainer",a="label";qx.Class.define(b,{extend:qx.ui.container.Composite,construct:function(){qx.ui.container.Composite.call(this);this._setLayout(new qx.ui.layout.HBox);},properties:{appearance:{refine:true,init:e},show:{init:f,check:[f,a,d],inheritable:true,event:c}}});})();(function(){var b="qx.ui.menu.Button",a="menu-button";qx.Class.define(b,{extend:qx.ui.menu.AbstractButton,construct:function(c,d,f,g){qx.ui.menu.AbstractButton.call(this);if(c!=null){this.setLabel(c);}if(d!=null){this.setIcon(d);}if(f!=null){this.setCommand(f);}if(g!=null){this.setMenu(g);}},properties:{appearance:{refine:true,init:a}},members:{_onMouseUp:function(e){if(e.isLeftPressed()){this.execute();if(this.getMenu()){return;}}qx.ui.menu.Manager.getInstance().hideAll();},_onKeyPress:function(e){this.execute();}}});})();(function(){var b="qx.ui.table.IColumnMenuItem",a="qx.event.type.Data";qx.Interface.define(b,{properties:{visible:{}},events:{changeVisible:a}});})();(function(){var h="checked",g="menu-checkbox",f="Boolean",d="_applyValue",c="changeValue",b="qx.ui.menu.CheckBox",a="execute";qx.Class.define(b,{extend:qx.ui.menu.AbstractButton,implement:[qx.ui.form.IBooleanForm],construct:function(i,j){qx.ui.menu.AbstractButton.call(this);if(i!=null){if(i.translate){this.setLabel(i.translate());}else{this.setLabel(i);}}if(j!=null){this.setMenu(j);}this.addListener(a,this._onExecute,this);},properties:{appearance:{refine:true,init:g},value:{check:f,init:false,apply:d,event:c,nullable:true}},members:{_applyValue:function(k,l){k?this.addState(h):this.removeState(h);},_onExecute:function(e){this.toggleValue();},_onMouseUp:function(e){if(e.isLeftPressed()){this.execute();}qx.ui.menu.Manager.getInstance().hideAll();},_onKeyPress:function(e){this.execute();}}});})();(function(){var f="changeVisible",d="qx.ui.table.columnmenu.MenuItem",c="_applyVisible",b="Boolean",a="changeValue";qx.Class.define(d,{extend:qx.ui.menu.CheckBox,implement:qx.ui.table.IColumnMenuItem,properties:{visible:{check:b,init:true,apply:c,event:f}},construct:function(g){qx.ui.menu.CheckBox.call(this,g);this.addListener(a,function(e){this.bInListener=true;this.setVisible(e.getData());this.bInListener=false;});},members:{__wn:false,_applyVisible:function(h,i){if(!this.bInListener){this.setValue(h);}}}});})();(function(){var b="qx.ui.table.selection.Model",a="qx.ui.table.selection.Manager";qx.Class.define(a,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);},properties:{selectionModel:{check:b}},members:{__wo:null,handleMouseDown:function(c,d){if(d.isLeftPressed()){var e=this.getSelectionModel();if(!e.isSelectedIndex(c)){this._handleSelectEvent(c,d);this.__wo=true;}else{this.__wo=false;}}else if(d.isRightPressed()&&d.getModifiers()==0){var e=this.getSelectionModel();if(!e.isSelectedIndex(c)){e.setSelectionInterval(c,c);}}},handleMouseUp:function(f,g){if(g.isLeftPressed()&&!this.__wo){this._handleSelectEvent(f,g);}},handleClick:function(h,i){},handleSelectKeyDown:function(j,k){this._handleSelectEvent(j,k);},handleMoveKeyDown:function(l,m){var o=this.getSelectionModel();switch(m.getModifiers()){case 0:o.setSelectionInterval(l,l);break;case qx.event.type.Dom.SHIFT_MASK:var n=o.getAnchorSelectionIndex();if(n==-1){o.setSelectionInterval(l,l);}else{o.setSelectionInterval(n,l);}break;}},_handleSelectEvent:function(p,q){var t=this.getSelectionModel();var r=t.getLeadSelectionIndex();var s=t.getAnchorSelectionIndex();if(q.isShiftPressed()){if(p!=r||t.isSelectionEmpty()){if(s==-1){s=p;}if(q.isCtrlOrCommandPressed()){t.addSelectionInterval(s,p);}else{t.setSelectionInterval(s,p);}}}else if(q.isCtrlOrCommandPressed()){if(t.isSelectedIndex(p)){t.removeSelectionInterval(p,p);}else{t.addSelectionInterval(p,p);}}else{t.setSelectionInterval(p,p);}}}});})();(function(){var l="]",k="..",h="changeSelection",g="_applySelectionMode",f='ie',d="qx.event.type.Event",c="Ranges:",b="qx.ui.table.selection.Model",a=" [";qx.Class.define(b,{extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__we=[];this.__wf=-1;this.__wg=-1;this.hasBatchModeRefCount=0;this.__wh=false;},events:{"changeSelection":d},statics:{NO_SELECTION:1,SINGLE_SELECTION:2,SINGLE_INTERVAL_SELECTION:3,MULTIPLE_INTERVAL_SELECTION:4,MULTIPLE_INTERVAL_SELECTION_TOGGLE:5},properties:{selectionMode:{init:2,check:[1,2,3,4,5],apply:g}},members:{__wh:null,__wf:null,__wg:null,__we:null,_applySelectionMode:function(m){this.resetSelection();},setBatchMode:function(n){if(n){this.hasBatchModeRefCount+=1;}else{if(this.hasBatchModeRefCount==0){throw new Error("Try to turn off batch mode althoug it was not turned on.");}this.hasBatchModeRefCount-=1;if(this.__wh){this.__wh=false;this._fireChangeSelection();}}return this.hasBatchMode();},hasBatchMode:function(){return this.hasBatchModeRefCount>0;},getAnchorSelectionIndex:function(){return this.__wf;},_setAnchorSelectionIndex:function(o){this.__wf=o;},getLeadSelectionIndex:function(){return this.__wg;},_setLeadSelectionIndex:function(p){this.__wg=p;},_getSelectedRangeArr:function(){return this.__we;},resetSelection:function(){if(!this.isSelectionEmpty()){this._resetSelection();this._fireChangeSelection();}},isSelectionEmpty:function(){return this.__we.length==0;},getSelectedCount:function(){var r=0;for(var i=0;i<this.__we.length;i++){var q=this.__we[i];r+=q.maxIndex-q.minIndex+1;}return r;},isSelectedIndex:function(s){for(var i=0;i<this.__we.length;i++){var t=this.__we[i];if(s>=t.minIndex&&s<=t.maxIndex){return true;}}return false;},getSelectedRanges:function(){var u=[];for(var i=0;i<this.__we.length;i++){u.push({minIndex:this.__we[i].minIndex,maxIndex:this.__we[i].maxIndex});}return u;},iterateSelection:function(v,w){for(var i=0;i<this.__we.length;i++){for(var j=this.__we[i].minIndex;j<=this.__we[i].maxIndex;j++){v.call(w,j);}}},setSelectionInterval:function(x,y){var z=this.self(arguments);switch(this.getSelectionMode()){case z.NO_SELECTION:return;case z.SINGLE_SELECTION:if(this.isSelectedIndex(y)){return;}x=y;break;case z.MULTIPLE_INTERVAL_SELECTION_TOGGLE:this.setBatchMode(true);try{for(var i=x;i<=y;i++){if(!this.isSelectedIndex(i)){this._addSelectionInterval(i,i);}else{this.removeSelectionInterval(i,i);}}}catch(e){if(qx.bom.client.Browser.NAME==f&&qx.bom.client.Browser.VERSION<=7){this.setBatchMode(false);}throw e;}finally{this.setBatchMode(false);}this._fireChangeSelection();return;}this._resetSelection();this._addSelectionInterval(x,y);this._fireChangeSelection();},addSelectionInterval:function(A,B){var C=qx.ui.table.selection.Model;switch(this.getSelectionMode()){case C.NO_SELECTION:return;case C.MULTIPLE_INTERVAL_SELECTION:case C.MULTIPLE_INTERVAL_SELECTION_TOGGLE:this._addSelectionInterval(A,B);this._fireChangeSelection();break;default:this.setSelectionInterval(A,B);break;}},removeSelectionInterval:function(D,E){this.__wf=D;this.__wg=E;var F=Math.min(D,E);var H=Math.max(D,E);for(var i=0;i<this.__we.length;i++){var J=this.__we[i];if(J.minIndex>H){break;}else if(J.maxIndex>=F){var K=(J.minIndex>=F)&&(J.minIndex<=H);var I=(J.maxIndex>=F)&&(J.maxIndex<=H);if(K&&I){this.__we.splice(i,1);i--;}else if(K){J.minIndex=H+1;}else if(I){J.maxIndex=F-1;}else{var G={minIndex:H+1,maxIndex:J.maxIndex};this.__we.splice(i+1,0,G);J.maxIndex=F-1;break;}}}this._fireChangeSelection();},_resetSelection:function(){this.__we=[];this.__wf=-1;this.__wg=-1;},_addSelectionInterval:function(L,M){this.__wf=L;this.__wg=M;var N=Math.min(L,M);var P=Math.max(L,M);var O=0;for(;O<this.__we.length;O++){var Q=this.__we[O];if(Q.minIndex>N){break;}}this.__we.splice(O,0,{minIndex:N,maxIndex:P});var R=this.__we[0];for(var i=1;i<this.__we.length;i++){var Q=this.__we[i];if(R.maxIndex+1>=Q.minIndex){R.maxIndex=Math.max(R.maxIndex,Q.maxIndex);this.__we.splice(i,1);i--;}else{R=Q;}}},_dumpRanges:function(){var S=c;for(var i=0;i<this.__we.length;i++){var T=this.__we[i];S+=a+T.minIndex+k+T.maxIndex+l;}this.debug(S);},_fireChangeSelection:function(){if(this.hasBatchMode()){this.__wh=true;}else{this.fireEvent(h);}}},destruct:function(){this.__we=null;}});})();(function(){var k="",j="Number",h='</div>',g='" ',f="paneUpdated",e='<div>',d="</div>",c="overflow: hidden;",b="qx.event.type.Data",a="paneReloadsData",E="div",D='style="',C="_applyMaxCacheLines",B="qx.ui.table.pane.Pane",A="width: 100%;",z="qx.event.type.Event",w="_applyVisibleRowCount",v='>',u="line-height: ",t="appear",r='class="',s="width:100%;",p="px;",q='<div ',n="'>",o="_applyFirstVisibleRow",l="<div style='",m=";position:relative;";qx.Class.define(B,{extend:qx.ui.core.Widget,construct:function(F){qx.ui.core.Widget.call(this);this.__wL=F;this.__wM=0;this.__wN=0;this.__wO=[];},events:{"paneReloadsData":b,"paneUpdated":z},properties:{firstVisibleRow:{check:j,init:0,apply:o},visibleRowCount:{check:j,init:0,apply:w},maxCacheLines:{check:j,init:1000,apply:C},allowShrinkX:{refine:true,init:false}},members:{__wN:null,__wM:null,__wL:null,__wP:null,__wQ:null,__wR:null,__wO:null,__wS:0,_applyFirstVisibleRow:function(G,H){this.updateContent(false,G-H);},_applyVisibleRowCount:function(I,J){this.updateContent(true);},_getContentHint:function(){return {width:this.getPaneScroller().getTablePaneModel().getTotalWidth(),height:400};},getPaneScroller:function(){return this.__wL;},getTable:function(){return this.__wL.getTable();},setFocusedCell:function(K,L,M){if(K!=this.__wR||L!=this.__wQ){var N=this.__wQ;this.__wR=K;this.__wQ=L;if(L!=N&&!M){if(N!==null){this.updateContent(false,null,N,true);}if(L!==null){this.updateContent(false,null,L,true);}}}},onSelectionChanged:function(){this.updateContent(false,null,null,true);},onFocusChanged:function(){this.updateContent(false,null,null,true);},setColumnWidth:function(O,P){this.updateContent(true);},onColOrderChanged:function(){this.updateContent(true);},onPaneModelChanged:function(){this.updateContent(true);},onTableModelDataChanged:function(Q,R,S,T){this.__wT();var V=this.getFirstVisibleRow();var U=this.getVisibleRowCount();if(R==-1||R>=V&&Q<V+U){this.updateContent();}},onTableModelMetaDataChanged:function(){this.updateContent(true);},_applyMaxCacheLines:function(W,X){if(this.__wS>=W&&W!==-1){this.__wT();}},__wT:function(){this.__wO=[];this.__wS=0;},__wU:function(Y,ba,bb){if(!ba&&!bb&&this.__wO[Y]){return this.__wO[Y];}else{return null;}},__wV:function(bc,bd,be,bf){var bg=this.getMaxCacheLines();if(!be&&!bf&&!this.__wO[bc]&&bg>0){this._applyMaxCacheLines(bg);this.__wO[bc]=bd;this.__wS+=1;}},updateContent:function(bh,bi,bj,bk){if(bh){this.__wT();}if(bi&&Math.abs(bi)<=Math.min(10,this.getVisibleRowCount())){this._scrollContent(bi);}else if(bk&&!this.getTable().getAlwaysUpdateCells()){this._updateRowStyles(bj);}else{this._updateAllRows();}},_updateRowStyles:function(bl){var bp=this.getContentElement().getDomElement();if(!bp||!bp.firstChild){this._updateAllRows();return;}var bt=this.getTable();var bn=bt.getSelectionModel();var bq=bt.getTableModel();var bu=bt.getDataRowRenderer();var bo=bp.firstChild.childNodes;var bs={table:bt};var bv=this.getFirstVisibleRow();var y=0;var bm=bo.length;if(bl!=null){var br=bl-bv;if(br>=0&&br<bm){bv=bl;y=br;bm=br+1;}else{return;}}for(;y<bm;y++,bv++){bs.row=bv;bs.selected=bn.isSelectedIndex(bv);bs.focusedRow=(this.__wQ==bv);bs.rowData=bq.getRowData(bv);bu.updateDataRowElement(bs,bo[y]);}},_getRowsHtml:function(bw,bx){var bD=this.getTable();var bG=bD.getSelectionModel();var bA=bD.getTableModel();var bB=bD.getTableColumnModel();var bV=this.getPaneScroller().getTablePaneModel();var bL=bD.getDataRowRenderer();bA.prefetchRows(bw,bw+bx-1);var bS=bD.getRowHeight();var bU=bV.getColumnCount();var bC=0;var bz=[];for(var x=0;x<bU;x++){var bY=bV.getColumnAtX(x);var bF=bB.getColumnWidth(bY);bz.push({col:bY,xPos:x,editable:bA.isColumnEditable(bY),focusedCol:this.__wR==bY,styleLeft:bC,styleWidth:bF});bC+=bF;}var bX=[];var ca=false;for(var bE=bw;bE<bw+bx;bE++){var bH=bG.isSelectedIndex(bE);var bK=(this.__wQ==bE);var bP=this.__wU(bE,bH,bK);if(bP){bX.push(bP);continue;}var by=[];var bR={table:bD};bR.styleHeight=bS;bR.row=bE;bR.selected=bH;bR.focusedRow=bK;bR.rowData=bA.getRowData(bE);if(!bR.rowData){ca=true;}by.push(q);var bO=bL.getRowAttributes(bR);if(bO){by.push(bO);}var bN=bL.getRowClass(bR);if(bN){by.push(r,bN,g);}var bM=bL.createRowStyle(bR);bM+=m+bL.getRowHeightStyle(bS)+s;if(bM){by.push(D,bM,g);}by.push(v);var bW=false;for(x=0;x<bU&&!bW;x++){var bI=bz[x];for(var bT in bI){bR[bT]=bI[bT];}var bY=bR.col;bR.value=bA.getValue(bY,bE);var bJ=bB.getDataCellRenderer(bY);bR.style=bJ.getDefaultCellStyle();bW=bJ.createDataCellHtml(bR,by)||false;}by.push(h);var bQ=by.join(k);this.__wV(bE,bQ,bH,bK);bX.push(bQ);}this.fireDataEvent(a,ca);return bX.join(k);},_scrollContent:function(cb){var cc=this.getContentElement().getDomElement();if(!(cc&&cc.firstChild)){this._updateAllRows();return;}var cl=cc.firstChild;var cd=cl.childNodes;var cj=this.getVisibleRowCount();var ci=this.getFirstVisibleRow();var cg=this.getTable().getTableModel();var cm=0;cm=cg.getRowCount();if(ci+cj>cm){this._updateAllRows();return;}var cn=cb<0?cj+cb:0;var ce=cb<0?0:cj-cb;for(i=Math.abs(cb)-1;i>=0;i--){var ch=cd[cn];try{cl.removeChild(ch);}catch(co){break;}}if(!this.__wP){this.__wP=document.createElement(E);}var ck=e;ck+=this._getRowsHtml(ci+ce,Math.abs(cb));ck+=h;this.__wP.innerHTML=ck;var cf=this.__wP.firstChild.childNodes;if(cb>0){for(var i=cf.length-1;i>=0;i--){var ch=cf[0];cl.appendChild(ch);}}else{for(var i=cf.length-1;i>=0;i--){var ch=cf[cf.length-1];cl.insertBefore(ch,cl.firstChild);}}if(this.__wQ!==null){this._updateRowStyles(this.__wQ-cb);this._updateRowStyles(this.__wQ);}this.fireEvent(f);},_updateAllRows:function(){var cs=this.getContentElement().getDomElement();if(!cs){this.addListenerOnce(t,arguments.callee,this);return;}var cy=this.getTable();var cv=cy.getTableModel();var cx=this.getPaneScroller().getTablePaneModel();var cw=cx.getColumnCount();var cp=cy.getRowHeight();var ct=this.getFirstVisibleRow();var cq=this.getVisibleRowCount();var cz=cv.getRowCount();if(ct+cq>cz){cq=Math.max(0,cz-ct);}var cr=cx.getTotalWidth();var cu;if(cq>0){cu=[l,A,(cy.getForceLineHeight()?u+cp+p:k),c,n,this._getRowsHtml(ct,cq),d];}else{cu=[];}var cA=cu.join(k);cs.innerHTML=cA;this.setWidth(cr);this.__wM=cw;this.__wN=cq;this.fireEvent(f);}},destruct:function(){this.__wP=this.__wL=this.__wO=null;}});})();(function(){var c="hovered",b="__wX",a="qx.ui.table.pane.Header";qx.Class.define(a,{extend:qx.ui.core.Widget,construct:function(d){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.HBox());this.__wW=new qx.ui.core.Blocker(this);this.__wX=d;},members:{__wX:null,__wY:null,__xa:null,__wW:null,getPaneScroller:function(){return this.__wX;},getTable:function(){return this.__wX.getTable();},getBlocker:function(){return this.__wW;},onColOrderChanged:function(){this._updateContent(true);},onPaneModelChanged:function(){this._updateContent(true);},onTableModelMetaDataChanged:function(){this._updateContent();},setColumnWidth:function(e,f,g){var h=this.getHeaderWidgetAtColumn(e);if(h!=null){h.setWidth(f);}},setMouseOverColumn:function(i){if(i!=this.__xa){if(this.__xa!=null){var j=this.getHeaderWidgetAtColumn(this.__xa);if(j!=null){j.removeState(c);}}if(i!=null){this.getHeaderWidgetAtColumn(i).addState(c);}this.__xa=i;}},getHeaderWidgetAtColumn:function(k){var l=this.getPaneScroller().getTablePaneModel().getX(k);return this._getChildren()[l];},showColumnMoveFeedback:function(m,x){var q=this.getContainerLocation();if(this.__wY==null){var v=this.getTable();var n=this.getPaneScroller().getTablePaneModel().getX(m);var p=this._getChildren()[n];var r=v.getTableModel();var t=v.getTableColumnModel();var u={xPos:n,col:m,name:r.getColumnName(m),table:v};var s=t.getHeaderCellRenderer(m);var o=s.createHeaderCell(u);var w=p.getBounds();o.setWidth(w.width);o.setHeight(w.height);o.setZIndex(1000000);o.setOpacity(0.8);o.setLayoutProperties({top:q.top});this.getApplicationRoot().add(o);this.__wY=o;}this.__wY.setLayoutProperties({left:q.left+x});this.__wY.show();},hideColumnMoveFeedback:function(){if(this.__wY!=null){this.__wY.destroy();this.__wY=null;}},isShowingColumnMoveFeedback:function(){return this.__wY!=null;},_updateContent:function(y){var I=this.getTable();var C=I.getTableModel();var F=I.getTableColumnModel();var H=this.getPaneScroller().getTablePaneModel();var K=this._getChildren();var D=H.getColumnCount();var G=C.getSortColumnIndex();if(y){this._cleanUpCells();}var z={};z.sortedAscending=C.isSortAscending();for(var x=0;x<D;x++){var B=H.getColumnAtX(x);if(B===undefined){continue;}var J=F.getColumnWidth(B);var E=F.getHeaderCellRenderer(B);z.xPos=x;z.col=B;z.name=C.getColumnName(B);z.editable=C.isColumnEditable(B);z.sorted=(B==G);z.table=I;var A=K[x];if(A==null){A=E.createHeaderCell(z);A.set({width:J});this._add(A);}else{E.updateHeaderCell(z,A);}}},_cleanUpCells:function(){var M=this._getChildren();for(var x=M.length-1;x>=0;x--){var L=M[x];L.destroy();}}},destruct:function(){this.__wW.dispose();this._disposeObjects(b);}});})();(function(){var m="Boolean",l="resize-line",k="mousedown",j="qx.event.type.Data",i="mouseup",h="qx.ui.table.pane.CellEvent",g="scroll",d="focus-indicator",c="excluded",b="scrollbar-y",bm="table-scroller-focus-indicator",bl="visible",bk="mousemove",bj="header",bi="editing",bh="click",bg="modelChanged",bf="scrollbar-x",be="cellClick",bd="pane",t="__xi",u="__xc",r="mouseout",s="__xh",p="changeHorizontalScrollBarVisible",q="bottom",n="_applyScrollTimeout",o="changeScrollX",z="_applyTablePaneModel",A="Integer",I="__xg",G="dblclick",Q="dataEdited",L="mousewheel",Y="interval",V="qx.ui.table.pane.Scroller",C="__xk",bc="_applyShowCellFocusIndicator",bb="__xe",ba="resize",B="vertical",E="changeScrollY",F="appear",H="table-scroller",J="beforeSort",M="__xd",S="cellDblclick",X="horizontal",v="losecapture",w="contextmenu",D="col-resize",P="disappear",O="_applyVerticalScrollBarVisible",N="_applyHorizontalScrollBarVisible",U="cellContextmenu",T="__xj",K="close",R="changeTablePaneModel",a="__xf",W="qx.ui.table.pane.Model",y="changeVerticalScrollBarVisible";qx.Class.define(V,{extend:qx.ui.core.Widget,include:qx.ui.core.scroll.MScrollBarFactory,construct:function(bn){qx.ui.core.Widget.call(this);this.__xb=bn;var bo=new qx.ui.layout.Grid();bo.setColumnFlex(0,1);bo.setRowFlex(1,1);this._setLayout(bo);this.__xc=this._showChildControl(bf);this.__xd=this._showChildControl(b);this.__xe=this._showChildControl(bj);this.__xf=this._showChildControl(bd);this.__xg=new qx.ui.container.Composite(new qx.ui.layout.HBox()).set({minWidth:0});this._add(this.__xg,{row:0,column:0,colSpan:2});this.__xh=new qx.ui.table.pane.Clipper();this.__xh.add(this.__xe);this.__xh.addListener(v,this._onChangeCaptureHeader,this);this.__xh.addListener(bk,this._onMousemoveHeader,this);this.__xh.addListener(k,this._onMousedownHeader,this);this.__xh.addListener(i,this._onMouseupHeader,this);this.__xh.addListener(bh,this._onClickHeader,this);this.__xg.add(this.__xh,{flex:1});this.__xi=new qx.ui.table.pane.Clipper();this.__xi.add(this.__xf);this.__xi.addListener(L,this._onMousewheel,this);this.__xi.addListener(bk,this._onMousemovePane,this);this.__xi.addListener(k,this._onMousedownPane,this);this.__xi.addListener(i,this._onMouseupPane,this);this.__xi.addListener(bh,this._onClickPane,this);this.__xi.addListener(w,this._onContextMenu,this);this.__xi.addListener(G,this._onDblclickPane,this);this.__xi.addListener(ba,this._onResizePane,this);this._add(this.__xi,{row:1,column:0});this.__xj=this.getChildControl(d);this.initShowCellFocusIndicator();this.getChildControl(l).hide();this.addListener(r,this._onMouseout,this);this.addListener(F,this._onAppear,this);this.addListener(P,this._onDisappear,this);this.__xk=new qx.event.Timer();this.__xk.addListener(Y,this._oninterval,this);this.initScrollTimeout();},statics:{MIN_COLUMN_WIDTH:10,RESIZE_REGION_RADIUS:5,CLICK_TOLERANCE:5,HORIZONTAL_SCROLLBAR:1,VERTICAL_SCROLLBAR:2},events:{"changeScrollY":j,"changeScrollX":j,"cellClick":h,"cellDblclick":h,"cellContextmenu":h,"beforeSort":j},properties:{horizontalScrollBarVisible:{check:m,init:true,apply:N,event:p},verticalScrollBarVisible:{check:m,init:true,apply:O,event:y},tablePaneModel:{check:W,apply:z,event:R},liveResize:{check:m,init:false},focusCellOnMouseMove:{check:m,init:false},selectBeforeFocus:{check:m,init:false},showCellFocusIndicator:{check:m,init:true,apply:bc},resetSelectionOnHeaderClick:{check:m,init:true},scrollTimeout:{check:A,init:100,apply:n},appearance:{refine:true,init:H}},members:{__xl:null,__xb:null,__xm:null,__xn:null,__xo:null,__xp:null,__xq:null,__xr:null,__xs:null,__xt:null,__xu:null,__xv:null,__xw:null,__xx:null,__xy:false,__xz:null,__xA:null,__xB:null,__xC:null,__xD:null,__xE:null,__xF:null,__xG:null,__xc:null,__xd:null,__xe:null,__xh:null,__xf:null,__xi:null,__xj:null,__xg:null,__xk:null,getPaneInsetRight:function(){var bq=this.getTopRightWidget();var br=bq&&bq.isVisible()&&bq.getBounds()?bq.getBounds().width:0;var bp=this.getVerticalScrollBarVisible()?this.getVerticalScrollBarWidth():0;return Math.max(br,bp);},setPaneWidth:function(bs){if(this.isVerticalScrollBarVisible()){bs+=this.getPaneInsetRight();}this.setWidth(bs);},_createChildControlImpl:function(bt,bu){var bv;switch(bt){case bj:bv=(this.getTable().getNewTablePaneHeader())(this);break;case bd:bv=(this.getTable().getNewTablePane())(this);break;case d:bv=new qx.ui.table.pane.FocusIndicator(this);bv.setUserBounds(0,0,0,0);bv.setZIndex(1000);bv.addListener(i,this._onMouseupFocusIndicator,this);this.__xi.add(bv);bv.show();bv.setDecorator(null);break;case l:bv=new qx.ui.core.Widget();bv.setUserBounds(0,0,0,0);bv.setZIndex(1000);this.__xi.add(bv);break;case bf:bv=this._createScrollBar(X).set({minWidth:0,alignY:q});bv.addListener(g,this._onScrollX,this);this._add(bv,{row:2,column:0});break;case b:bv=this._createScrollBar(B);bv.addListener(g,this._onScrollY,this);this._add(bv,{row:1,column:1});break;}return bv||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,bt);},_applyHorizontalScrollBarVisible:function(bw,bx){this.__xc.setVisibility(bw?bl:c);},_applyVerticalScrollBarVisible:function(by,bz){this.__xd.setVisibility(by?bl:c);},_applyTablePaneModel:function(bA,bB){if(bB!=null){bB.removeListener(bg,this._onPaneModelChanged,this);}bA.addListener(bg,this._onPaneModelChanged,this);},_applyShowCellFocusIndicator:function(bC,bD){if(bC){this.__xj.setDecorator(bm);this._updateFocusIndicator();}else{if(this.__xj){this.__xj.setDecorator(null);}}},getScrollY:function(){return this.__xd.getPosition();},setScrollY:function(scrollY,bE){this.__xd.scrollTo(scrollY);if(bE){this._updateContent();}},getScrollX:function(){return this.__xc.getPosition();},setScrollX:function(scrollX){this.__xc.scrollTo(scrollX);},getTable:function(){return this.__xb;},onColVisibilityChanged:function(){this.updateHorScrollBarMaximum();this._updateFocusIndicator();},setColumnWidth:function(bF,bG){this.__xe.setColumnWidth(bF,bG);this.__xf.setColumnWidth(bF,bG);var bH=this.getTablePaneModel();var x=bH.getX(bF);if(x!=-1){this.updateHorScrollBarMaximum();this._updateFocusIndicator();}},onColOrderChanged:function(){this.__xe.onColOrderChanged();this.__xf.onColOrderChanged();this.updateHorScrollBarMaximum();},onTableModelDataChanged:function(bI,bJ,bK,bL){this.__xf.onTableModelDataChanged(bI,bJ,bK,bL);var bM=this.getTable().getTableModel().getRowCount();if(bM!=this.__xl){this.updateVerScrollBarMaximum();if(this.getFocusedRow()>=bM){if(bM==0){this.setFocusedCell(null,null);}else{this.setFocusedCell(this.getFocusedColumn(),bM-1);}}this.__xl=bM;}},onSelectionChanged:function(){this.__xf.onSelectionChanged();},onFocusChanged:function(){this.__xf.onFocusChanged();},onTableModelMetaDataChanged:function(){this.__xe.onTableModelMetaDataChanged();this.__xf.onTableModelMetaDataChanged();},_onPaneModelChanged:function(){this.__xe.onPaneModelChanged();this.__xf.onPaneModelChanged();},_onResizePane:function(){this.updateHorScrollBarMaximum();this.updateVerScrollBarMaximum();this._updateContent();this.__xe._updateContent();this.__xb._updateScrollBarVisibility();},updateHorScrollBarMaximum:function(){var bQ=this.__xi.getInnerSize();if(!bQ){return ;}var bO=this.getTablePaneModel().getTotalWidth();var bP=this.__xc;if(bQ.width<bO){var bN=Math.max(0,bO-bQ.width);bP.setMaximum(bN);bP.setKnobFactor(bQ.width/bO);var bR=bP.getPosition();bP.setPosition(Math.min(bR,bN));}else{bP.setMaximum(0);bP.setKnobFactor(1);bP.setPosition(0);}},updateVerScrollBarMaximum:function(){var ca=this.__xi.getInnerSize();if(!ca){return ;}var bX=this.getTable().getTableModel();var bT=bX.getRowCount();if(this.getTable().getKeepFirstVisibleRowComplete()){bT+=1;}var bS=this.getTable().getRowHeight();var bV=bT*bS;var bY=this.__xd;if(ca.height<bV){var bU=Math.max(0,bV-ca.height);bY.setMaximum(bU);bY.setKnobFactor(ca.height/bV);var bW=bY.getPosition();bY.setPosition(Math.min(bW,bU));}else{bY.setMaximum(0);bY.setKnobFactor(1);bY.setPosition(0);}},onKeepFirstVisibleRowCompleteChanged:function(){this.updateVerScrollBarMaximum();this._updateContent();},_onAppear:function(){this._startInterval(this.getScrollTimeout());},_onDisappear:function(){this._stopInterval();},_onScrollX:function(e){var cb=e.getData();this.fireDataEvent(o,cb,e.getOldData());this.__xh.scrollToX(cb);this.__xi.scrollToX(cb);},_onScrollY:function(e){this.fireDataEvent(E,e.getData(),e.getOldData());this._postponedUpdateContent();},_onMousewheel:function(e){var cc=this.getTable();if(!cc.getEnabled()){return;}var ce=qx.bom.client.Engine.GECKO?1:3;var cd=this.__xd.getPosition()+((e.getWheelDelta()*ce)*cc.getRowHeight());this.__xd.scrollTo(cd);if(this.__xA&&this.getFocusCellOnMouseMove()){this._focusCellAtPagePos(this.__xA,this.__xB);}e.stop();},__xH:function(cf){var ck=this.getTable();var cl=this.__xe.getHeaderWidgetAtColumn(this.__xu);var cg=cl.getSizeHint().minWidth;var ci=Math.max(cg,this.__xw+cf-this.__xv);if(this.getLiveResize()){var ch=ck.getTableColumnModel();ch.setColumnWidth(this.__xu,ci,true);}else{this.__xe.setColumnWidth(this.__xu,ci,true);var cj=this.getTablePaneModel();this._showResizeLine(cj.getColumnLeft(this.__xu)+ci);}this.__xv+=ci-this.__xw;this.__xw=ci;},__xI:function(cm){var cn=qx.ui.table.pane.Scroller.CLICK_TOLERANCE;if(this.__xe.isShowingColumnMoveFeedback()||cm>this.__xt+cn||cm<this.__xt-cn){this.__xq+=cm-this.__xt;this.__xe.showColumnMoveFeedback(this.__xp,this.__xq);var co=this.__xb.getTablePaneScrollerAtPageX(cm);if(this.__xs&&this.__xs!=co){this.__xs.hideColumnMoveFeedback();}if(co!=null){this.__xr=co.showColumnMoveFeedback(cm);}else{this.__xr=null;}this.__xs=co;this.__xt=cm;}},_onMousemoveHeader:function(e){var cv=this.getTable();if(!cv.getEnabled()){return;}var cw=false;var cp=null;var ct=e.getDocumentLeft();var cu=e.getDocumentTop();this.__xA=ct;this.__xB=cu;if(this.__xu!=null){this.__xH(ct);cw=true;e.stopPropagation();}else if(this.__xp!=null){this.__xI(ct);e.stopPropagation();}else{var cq=this._getResizeColumnForPageX(ct);if(cq!=-1){cw=true;}else{var cs=cv.getTableModel();var cx=this._getColumnForPageX(ct);if(cx!=null&&cs.isColumnSortable(cx)){cp=cx;}}}var cr=cw?D:null;this.getApplicationRoot().setGlobalCursor(cr);this.setCursor(cr);this.__xe.setMouseOverColumn(cp);},_onMousemovePane:function(e){var cy=this.getTable();if(!cy.getEnabled()){return;}var cA=e.getDocumentLeft();var cB=e.getDocumentTop();this.__xA=cA;this.__xB=cB;var cz=this._getRowForPagePos(cA,cB);if(cz!=null&&this._getColumnForPageX(cA)!=null){if(this.getFocusCellOnMouseMove()){this._focusCellAtPagePos(cA,cB);}}this.__xe.setMouseOverColumn(null);},_onMousedownHeader:function(e){if(!this.getTable().getEnabled()){return;}var cD=e.getDocumentLeft();var cE=this._getResizeColumnForPageX(cD);if(cE!=-1){this._startResizeHeader(cE,cD);e.stop();}else{var cC=this._getColumnForPageX(cD);if(cC!=null){this._startMoveHeader(cC,cD);e.stop();}}},_startResizeHeader:function(cF,cG){var cH=this.getTable().getTableColumnModel();this.__xu=cF;this.__xv=cG;this.__xw=cH.getColumnWidth(this.__xu);this.__xh.capture();},_startMoveHeader:function(cI,cJ){this.__xp=cI;this.__xt=cJ;this.__xq=this.getTablePaneModel().getColumnLeft(cI);this.__xh.capture();},_onMousedownPane:function(e){var cN=this.getTable();if(!cN.getEnabled()){return;}if(cN.isEditing()){cN.stopEditing();}var cK=e.getDocumentLeft();var cM=e.getDocumentTop();var cP=this._getRowForPagePos(cK,cM);var cO=this._getColumnForPageX(cK);if(cP!==null){this.__xx={row:cP,col:cO};this.__xy=false;var cL=this.getSelectBeforeFocus();if(cL){cN.getSelectionManager().handleMouseDown(cP,e);}if(!this.getFocusCellOnMouseMove()){this._focusCellAtPagePos(cK,cM);}if(!cL){cN.getSelectionManager().handleMouseDown(cP,e);}}},_onMouseupFocusIndicator:function(e){if(this.__xx&&!this.__xy&&!this.isEditing()&&this.__xj.getRow()==this.__xx.row&&this.__xj.getColumn()==this.__xx.col){this.fireEvent(be,qx.ui.table.pane.CellEvent,[this,e,this.__xx.row,this.__xx.col],true);this.__xy=true;}else if(!this.isEditing()){this._onMousedownPane(e);}},_onChangeCaptureHeader:function(e){if(this.__xu!=null){this._stopResizeHeader();}if(this.__xp!=null){this._stopMoveHeader();}},_stopResizeHeader:function(){var cQ=this.getTable().getTableColumnModel();if(!this.getLiveResize()){this._hideResizeLine();cQ.setColumnWidth(this.__xu,this.__xw,true);}this.__xu=null;this.__xh.releaseCapture();this.getApplicationRoot().setGlobalCursor(null);this.setCursor(null);if(this.isEditing()){var cR=this.__xE.getBounds().height;this.__xE.setUserBounds(0,0,this.__xw,cR);}},_stopMoveHeader:function(){var cW=this.getTable().getTableColumnModel();var cX=this.getTablePaneModel();this.__xe.hideColumnMoveFeedback();if(this.__xs){this.__xs.hideColumnMoveFeedback();}if(this.__xr!=null){var da=cX.getFirstColumnX()+cX.getX(this.__xp);var cV=this.__xr;if(cV!=da&&cV!=da+1){var cY=cW.getVisibleColumnAtX(da);var cU=cW.getVisibleColumnAtX(cV);var cT=cW.getOverallX(cY);var cS=(cU!=null)?cW.getOverallX(cU):cW.getOverallColumnCount();if(cS>cT){cS--;}cW.moveColumn(cT,cS);this._updateFocusIndicator();}}this.__xp=null;this.__xr=null;this.__xh.releaseCapture();},_onMouseupPane:function(e){var db=this.getTable();if(!db.getEnabled()){return;}var dc=this._getRowForPagePos(e.getDocumentLeft(),e.getDocumentTop());if(dc!=-1&&dc!=null&&this._getColumnForPageX(e.getDocumentLeft())!=null){db.getSelectionManager().handleMouseUp(dc,e);}},_onMouseupHeader:function(e){var dd=this.getTable();if(!dd.getEnabled()){return;}if(this.__xu!=null){this._stopResizeHeader();this.__xz=true;e.stop();}else if(this.__xp!=null){this._stopMoveHeader();e.stop();}},_onClickHeader:function(e){if(this.__xz){this.__xz=false;return;}var di=this.getTable();if(!di.getEnabled()){return;}var dg=di.getTableModel();var dh=e.getDocumentLeft();var df=this._getResizeColumnForPageX(dh);if(df==-1){var dl=this._getColumnForPageX(dh);if(dl!=null&&dg.isColumnSortable(dl)){var de=dg.getSortColumnIndex();var dj=(dl!=de)?true:!dg.isSortAscending();var dk={column:dl,ascending:dj,clickEvent:e};if(this.fireDataEvent(J,dk,null,true)){dg.sortByColumn(dl,dj);if(this.getResetSelectionOnHeaderClick()){di.getSelectionModel().resetSelection();}}}}e.stop();},_onClickPane:function(e){var dm=this.getTable();if(!dm.getEnabled()){return;}var dq=e.getDocumentLeft();var dr=e.getDocumentTop();var dn=this._getRowForPagePos(dq,dr);var dp=this._getColumnForPageX(dq);if(dn!=null&&dp!=null){dm.getSelectionManager().handleClick(dn,e);if(this.__xj.isHidden()||(this.__xx&&!this.__xy&&!this.isEditing()&&dn==this.__xx.row&&dp==this.__xx.col)){this.fireEvent(be,qx.ui.table.pane.CellEvent,[this,e,dn,dp],true);this.__xy=true;}}},_onContextMenu:function(e){var dv=e.getDocumentLeft();var dw=e.getDocumentTop();var dt=this._getRowForPagePos(dv,dw);var du=this._getColumnForPageX(dv);if(this.__xj.isHidden()||(this.__xx&&dt==this.__xx.row&&du==this.__xx.col)){this.fireEvent(U,qx.ui.table.pane.CellEvent,[this,e,dt,du],true);var ds=this.getTable().getContextMenu();if(ds){if(ds.getChildren().length>0){ds.openAtMouse(e);}else{ds.exclude();}e.preventDefault();}}},_onContextMenuOpen:function(e){},_onDblclickPane:function(e){var dy=e.getDocumentLeft();var dz=e.getDocumentTop();this._focusCellAtPagePos(dy,dz);this.startEditing();var dx=this._getRowForPagePos(dy,dz);if(dx!=-1&&dx!=null){this.fireEvent(S,qx.ui.table.pane.CellEvent,[this,e,dx],true);}},_onMouseout:function(e){var dA=this.getTable();if(!dA.getEnabled()){return;}if(this.__xu==null){this.setCursor(null);this.getApplicationRoot().setGlobalCursor(null);}this.__xe.setMouseOverColumn(null);},_showResizeLine:function(x){var dC=this._showChildControl(l);var dB=dC.getWidth();var dD=this.__xi.getBounds();dC.setUserBounds(x-Math.round(dB/2),0,dB,dD.height);},_hideResizeLine:function(){this._excludeChildControl(l);},showColumnMoveFeedback:function(dE){var dN=this.getTablePaneModel();var dM=this.getTable().getTableColumnModel();var dH=this.__xf.getContainerLocation().left;var dL=dN.getColumnCount();var dI=0;var dG=0;var dQ=dH;for(var dF=0;dF<dL;dF++){var dJ=dN.getColumnAtX(dF);var dO=dM.getColumnWidth(dJ);if(dE<dQ+dO/2){break;}dQ+=dO;dI=dF+1;dG=dQ-dH;}var dK=this.__xi.getContainerLocation().left;var dP=this.__xi.getBounds().width;var scrollX=dK-dH;dG=qx.lang.Number.limit(dG,scrollX+2,scrollX+dP-1);this._showResizeLine(dG);return dN.getFirstColumnX()+dI;},hideColumnMoveFeedback:function(){this._hideResizeLine();},_focusCellAtPagePos:function(dR,dS){var dU=this._getRowForPagePos(dR,dS);if(dU!=-1&&dU!=null){var dT=this._getColumnForPageX(dR);this.__xb.setFocusedCell(dT,dU);}},setFocusedCell:function(dV,dW){if(!this.isEditing()){this.__xf.setFocusedCell(dV,dW,this.__xn);this.__xC=dV;this.__xD=dW;this._updateFocusIndicator();}},getFocusedColumn:function(){return this.__xC;},getFocusedRow:function(){return this.__xD;},scrollCellVisible:function(dX,dY){var ej=this.getTablePaneModel();var ea=ej.getX(dX);if(ea!=-1){var eg=this.__xi.getInnerSize();if(!eg){return;}var eh=this.getTable().getTableColumnModel();var ed=ej.getColumnLeft(dX);var ek=eh.getColumnWidth(dX);var eb=this.getTable().getRowHeight();var el=dY*eb;var scrollX=this.getScrollX();var scrollY=this.getScrollY();var ei=Math.min(ed,ed+ek-eg.width);var ef=ed;this.setScrollX(Math.max(ei,Math.min(ef,scrollX)));var ec=el+eb-eg.height;if(this.getTable().getKeepFirstVisibleRowComplete()){ec+=eb;}var ee=el;this.setScrollY(Math.max(ec,Math.min(ee,scrollY)),true);}},isEditing:function(){return this.__xE!=null;},startEditing:function(){var eq=this.getTable();var eo=eq.getTableModel();var es=this.__xC;if(!this.isEditing()&&(es!=null)&&eo.isColumnEditable(es)){var et=this.__xD;var em=this.getTablePaneModel().getX(es);var en=eo.getValue(es,et);this.__xF=eq.getTableColumnModel().getCellEditorFactory(es);var ep={col:es,row:et,xPos:em,value:en,table:eq};this.__xE=this.__xF.createCellEditor(ep);if(this.__xE===null){return false;}else if(this.__xE instanceof qx.ui.window.Window){this.__xE.setModal(true);this.__xE.setShowClose(false);this.__xE.addListener(K,this._onCellEditorModalWindowClose,this);var f=eq.getModalCellEditorPreOpenFunction();if(f!=null){f(this.__xE,ep);}this.__xE.open();}else{var er=this.__xj.getInnerSize();this.__xE.setUserBounds(0,0,er.width,er.height);this.__xj.addListener(k,function(e){this.__xx={row:this.__xD,col:this.__xC};e.stopPropagation();},this);this.__xj.add(this.__xE);this.__xj.addState(bi);this.__xj.setKeepActive(false);this.__xj.setDecorator(bm);this.__xE.focus();this.__xE.activate();}return true;}return false;},stopEditing:function(){if(!this.getShowCellFocusIndicator()){this.__xj.setDecorator(null);}this.flushEditor();this.cancelEditing();},flushEditor:function(){if(this.isEditing()){var ev=this.__xF.getCellEditorValue(this.__xE);var eu=this.getTable().getTableModel().getValue(this.__xC,this.__xD);this.getTable().getTableModel().setValue(this.__xC,this.__xD,ev);this.__xb.focus();this.__xb.fireDataEvent(Q,{row:this.__xD,col:this.__xC,oldValue:eu,value:ev});}},cancelEditing:function(){if(this.isEditing()&&!this.__xE.pendingDispose){if(this._cellEditorIsModalWindow){this.__xE.destroy();this.__xE=null;this.__xF=null;this.__xE.pendingDispose=true;}else{this.__xj.removeState(bi);this.__xj.setKeepActive(true);this.__xE.destroy();this.__xE=null;this.__xF=null;}}},_onCellEditorModalWindowClose:function(e){this.stopEditing();},_getColumnForPageX:function(ew){var ez=this.getTable().getTableColumnModel();var eA=this.getTablePaneModel();var ey=eA.getColumnCount();var eC=this.__xe.getContainerLocation().left;for(var x=0;x<ey;x++){var ex=eA.getColumnAtX(x);var eB=ez.getColumnWidth(ex);eC+=eB;if(ew<eC){return ex;}}return null;},_getResizeColumnForPageX:function(eD){var eH=this.getTable().getTableColumnModel();var eI=this.getTablePaneModel();var eG=eI.getColumnCount();var eK=this.__xe.getContainerLocation().left;var eE=qx.ui.table.pane.Scroller.RESIZE_REGION_RADIUS;for(var x=0;x<eG;x++){var eF=eI.getColumnAtX(x);var eJ=eH.getColumnWidth(eF);eK+=eJ;if(eD>=(eK-eE)&&eD<=(eK+eE)){return eF;}}return -1;},_getRowForPagePos:function(eL,eM){var eN=this.__xf.getContentLocation();if(eL<eN.left||eL>eN.right){return null;}if(eM>=eN.top&&eM<=eN.bottom){var eO=this.getTable().getRowHeight();var scrollY=this.__xd.getPosition();if(this.getTable().getKeepFirstVisibleRowComplete()){scrollY=Math.floor(scrollY/eO)*eO;}var eR=scrollY+eM-eN.top;var eT=Math.floor(eR/eO);var eS=this.getTable().getTableModel();var eP=eS.getRowCount();return (eT<eP)?eT:null;}var eQ=this.__xe.getContainerLocation();if(eM>=eQ.top&&eM<=eQ.bottom&&eL<=eQ.right){return -1;}return null;},setTopRightWidget:function(eU){var eV=this.__xG;if(eV!=null){this.__xg.remove(eV);}if(eU!=null){this.__xg.add(eU);}this.__xG=eU;},getTopRightWidget:function(){return this.__xG;},getHeader:function(){return this.__xe;},getTablePane:function(){return this.__xf;},getVerticalScrollBarWidth:function(){var eW=this.__xd;return eW.isVisible()?(eW.getSizeHint().width||0):0;},getNeededScrollBars:function(eX,eY){var ff=this.__xd.getSizeHint().width;var fg=this.__xi.getInnerSize();var fa=fg?fg.width:0;if(this.getVerticalScrollBarVisible()){fa+=ff;}var fj=fg?fg.height:0;if(this.getHorizontalScrollBarVisible()){fj+=ff;}var fd=this.getTable().getTableModel();var fh=fd.getRowCount();var fk=this.getTablePaneModel().getTotalWidth();var fi=this.getTable().getRowHeight()*fh;var fc=false;var fl=false;if(fk>fa){fc=true;if(fi>fj-ff){fl=true;}}else if(fi>fj){fl=true;if(!eY&&(fk>fa-ff)){fc=true;}}var fe=qx.ui.table.pane.Scroller.HORIZONTAL_SCROLLBAR;var fb=qx.ui.table.pane.Scroller.VERTICAL_SCROLLBAR;return ((eX||fc)?fe:0)|((eY||!fl)?0:fb);},getPaneClipper:function(){return this.__xi;},_applyScrollTimeout:function(fm,fn){this._startInterval(fm);},_startInterval:function(fo){this.__xk.setInterval(fo);this.__xk.start();},_stopInterval:function(){this.__xk.stop();},_postponedUpdateContent:function(){this._updateContent();},_oninterval:qx.event.GlobalError.observeMethod(function(){if(this.__xn&&!this.__xf._layoutPending){this.__xn=false;this._updateContent();}}),_updateContent:function(){var ft=this.__xi.getInnerSize();if(!ft){return;}var fw=ft.height;var scrollX=this.__xc.getPosition();var scrollY=this.__xd.getPosition();var fq=this.getTable().getRowHeight();var fr=Math.floor(scrollY/fq);var fv=this.__xf.getFirstVisibleRow();this.__xf.setFirstVisibleRow(fr);var fs=Math.ceil(fw/fq);var fp=0;var fu=this.getTable().getKeepFirstVisibleRowComplete();if(!fu){fs++;fp=scrollY%fq;}this.__xf.setVisibleRowCount(fs);if(fr!=fv){this._updateFocusIndicator();}this.__xi.scrollToX(scrollX);if(!fu){this.__xi.scrollToY(fp);}},_updateFocusIndicator:function(){var fx=this.getTable();if(!fx.getEnabled()){return;}this.__xj.moveToCell(this.__xC,this.__xD);}},destruct:function(){this._stopInterval();var fy=this.getTablePaneModel();if(fy){fy.dispose();}this.__xx=this.__xG=this.__xb=null;this._disposeObjects(u,M,s,t,T,bb,a,I,C);}});})();(function(){var a="qx.ui.table.pane.Clipper";qx.Class.define(a,{extend:qx.ui.container.Composite,construct:function(){qx.ui.container.Composite.call(this,new qx.ui.layout.Grow());this.setMinWidth(0);},members:{scrollToX:function(b){this.getContentElement().scrollToX(b,false);},scrollToY:function(c){this.getContentElement().scrollToY(c,true);}}});})();(function(){var g="Integer",f="Escape",d="keypress",c="Enter",b="excluded",a="qx.ui.table.pane.FocusIndicator";qx.Class.define(a,{extend:qx.ui.container.Composite,construct:function(h){qx.ui.container.Composite.call(this);this.__xJ=h;this.setKeepActive(true);this.addListener(d,this._onKeyPress,this);},properties:{visibility:{refine:true,init:b},row:{check:g,nullable:true},column:{check:g,nullable:true}},members:{__xJ:null,_onKeyPress:function(e){var i=e.getKeyIdentifier();if(i!==f&&i!==c){e.stopPropagation();}},moveToCell:function(j,k){if(!this.__xJ.getShowCellFocusIndicator()&&!this.__xJ.getTable().getTableModel().isColumnEditable(j)){this.exclude();return;}else{this.show();}if(j==null){this.hide();this.setRow(null);this.setColumn(null);}else{var l=this.__xJ.getTablePaneModel().getX(j);if(l==-1){this.hide();this.setRow(null);this.setColumn(null);}else{var q=this.__xJ.getTable();var o=q.getTableColumnModel();var p=this.__xJ.getTablePaneModel();var n=this.__xJ.getTablePane().getFirstVisibleRow();var m=q.getRowHeight();this.setUserBounds(p.getColumnLeft(j)-2,(k-n)*m-2,o.getColumnWidth(j)+3,m+3);this.show();this.setRow(k);this.setColumn(j);}}}},destruct:function(){this.__xJ=null;}});})();(function(){var b="Integer",a="qx.ui.table.pane.CellEvent";qx.Class.define(a,{extend:qx.event.type.Mouse,properties:{row:{check:b,nullable:true},column:{check:b,nullable:true}},members:{init:function(c,d,e,f){d.clone(this);this.setBubbles(false);if(e!=null){this.setRow(e);}else{this.setRow(c._getRowForPagePos(this.getDocumentLeft(),this.getDocumentTop()));}if(f!=null){this.setColumn(f);}else{this.setColumn(c._getColumnForPageX(this.getDocumentLeft()));}},clone:function(g){var h=qx.event.type.Mouse.prototype.clone.call(this,g);h.set({row:this.getRow(),column:this.getColumn()});return h;}}});})();(function(){var a="qx.lang.Number";qx.Class.define(a,{statics:{isInRange:function(b,c,d){return b>=c&&b<=d;},isBetweenRange:function(e,f,g){return e>f&&e<g;},limit:function(h,i,j){if(j!=null&&h>j){return j;}else if(i!=null&&h<i){return i;}else{return h;}}}});})();(function(){var l="move",k="Boolean",j="mouseup",i="mousedown",h="losecapture",g="qx.ui.core.MMovable",f="__Y",d="__ba",c="mousemove",b="maximized",a="move-frame";qx.Mixin.define(g,{properties:{movable:{check:k,init:true},useMoveFrame:{check:k,init:false}},members:{__Y:null,__ba:null,__bb:null,__bc:null,__bd:null,__be:null,__bf:null,__bg:false,__bh:null,__bi:0,_activateMoveHandle:function(m){if(this.__Y){throw new Error("The move handle could not be redefined!");}this.__Y=m;m.addListener(i,this._onMoveMouseDown,this);m.addListener(j,this._onMoveMouseUp,this);m.addListener(c,this._onMoveMouseMove,this);m.addListener(h,this.__bm,this);},__bj:function(){var n=this.__ba;if(!n){n=this.__ba=new qx.ui.core.Widget();n.setAppearance(a);n.exclude();qx.core.Init.getApplication().getRoot().add(n);}return n;},__bk:function(){var location=this.getContainerLocation();var p=this.getBounds();var o=this.__bj();o.setUserBounds(location.left,location.top,p.width,p.height);o.show();o.setZIndex(this.getZIndex()+1);},__bl:function(e){var r=this.__bb;var u=Math.max(r.left,Math.min(r.right,e.getDocumentLeft()));var t=Math.max(r.top,Math.min(r.bottom,e.getDocumentTop()));var q=this.__bc+u;var s=this.__bd+t;return {viewportLeft:q,viewportTop:s,parentLeft:q-this.__be,parentTop:s-this.__bf};},_onMoveMouseDown:function(e){if(!this.getMovable()||this.hasState(b)){return;}var parent=this.getLayoutParent();var w=parent.getContentLocation();var x=parent.getBounds();if(qx.Class.implementsInterface(parent,qx.ui.window.IDesktop)){if(!parent.isContentBlocked()){this.__bh=parent.getBlockerColor();this.__bi=parent.getBlockerOpacity();parent.setBlockerColor(null);parent.setBlockerOpacity(1);parent.blockContent(this.getZIndex()-1);this.__bg=true;}}this.__bb={left:w.left,top:w.top,right:w.left+x.width,bottom:w.top+x.height};var v=this.getContainerLocation();this.__be=w.left;this.__bf=w.top;this.__bc=v.left-e.getDocumentLeft();this.__bd=v.top-e.getDocumentTop();this.addState(l);this.__Y.capture();if(this.getUseMoveFrame()){this.__bk();}e.stop();},_onMoveMouseMove:function(e){if(!this.hasState(l)){return;}var y=this.__bl(e);if(this.getUseMoveFrame()){this.__bj().setDomPosition(y.viewportLeft,y.viewportTop);}else{this.setDomPosition(y.parentLeft,y.parentTop);}e.stopPropagation();},_onMoveMouseUp:function(e){if(!this.hasState(l)){return;}this.removeState(l);var parent=this.getLayoutParent();if(qx.Class.implementsInterface(parent,qx.ui.window.IDesktop)){if(this.__bg){parent.unblockContent();parent.setBlockerColor(this.__bh);parent.setBlockerOpacity(this.__bi);this.__bh=null;this.__bi=0;this.__bg=false;}}this.__Y.releaseCapture();var z=this.__bl(e);this.setLayoutProperties({left:z.parentLeft,top:z.parentTop});if(this.getUseMoveFrame()){this.__bj().exclude();}e.stopPropagation();},__bm:function(e){if(!this.hasState(l)){return;}this.removeState(l);if(this.getUseMoveFrame()){this.__bj().exclude();}}},destruct:function(){this._disposeObjects(d,f);this.__bb=null;}});})();(function(){var k="Boolean",j="resize",i="mousedown",h="w-resize",g="sw-resize",f="n-resize",d="resizableRight",c="ne-resize",b="se-resize",a="Integer",z="e-resize",y="resizableLeft",x="mousemove",w="move",v="shorthand",u="maximized",t="nw-resize",s="mouseout",r="qx.ui.core.MResizable",q="mouseup",o="losecapture",p="resize-frame",m="resizableBottom",n="s-resize",l="resizableTop";qx.Mixin.define(r,{construct:function(){this.addListener(i,this.__bz,this,true);this.addListener(q,this.__bA,this);this.addListener(x,this.__bC,this);this.addListener(s,this.__bD,this);this.addListener(o,this.__bB,this);var A=this.getContainerElement().getDomElement();if(A==null){A=window;}this.__bn=qx.event.Registration.getManager(A).getHandler(qx.event.handler.DragDrop);},properties:{resizableTop:{check:k,init:true},resizableRight:{check:k,init:true},resizableBottom:{check:k,init:true},resizableLeft:{check:k,init:true},resizable:{group:[l,d,m,y],mode:v},resizeSensitivity:{check:a,init:5},useResizeFrame:{check:k,init:true}},members:{__bn:null,__bo:null,__bp:null,__bq:null,__br:null,__bs:null,__bt:null,RESIZE_TOP:1,RESIZE_BOTTOM:2,RESIZE_LEFT:4,RESIZE_RIGHT:8,__bu:function(){var B=this.__bo;if(!B){B=this.__bo=new qx.ui.core.Widget();B.setAppearance(p);B.exclude();qx.core.Init.getApplication().getRoot().add(B);}return B;},__bv:function(){var D=this.__bs;var C=this.__bu();C.setUserBounds(D.left,D.top,D.width,D.height);C.show();C.setZIndex(this.getZIndex()+1);},__bw:function(e){var F=this.__bp;var G=this.getSizeHint();var J=this.__bt;var I=this.__bs;var E=I.width;var H=I.height;var L=I.left;var top=I.top;var K;if((F&this.RESIZE_TOP)||(F&this.RESIZE_BOTTOM)){K=Math.max(J.top,Math.min(J.bottom,e.getDocumentTop()))-this.__br;if(F&this.RESIZE_TOP){H-=K;}else{H+=K;}if(H<G.minHeight){H=G.minHeight;}else if(H>G.maxHeight){H=G.maxHeight;}if(F&this.RESIZE_TOP){top+=I.height-H;}}if((F&this.RESIZE_LEFT)||(F&this.RESIZE_RIGHT)){K=Math.max(J.left,Math.min(J.right,e.getDocumentLeft()))-this.__bq;if(F&this.RESIZE_LEFT){E-=K;}else{E+=K;}if(E<G.minWidth){E=G.minWidth;}else if(E>G.maxWidth){E=G.maxWidth;}if(F&this.RESIZE_LEFT){L+=I.width-E;}}return {viewportLeft:L,viewportTop:top,parentLeft:I.bounds.left+L-I.left,parentTop:I.bounds.top+top-I.top,width:E,height:H};},__bx:{1:f,2:n,4:h,8:z,5:t,6:g,9:c,10:b},__by:function(e){var O=this.getContentLocation();var M=this.getResizeSensitivity();var Q=e.getDocumentLeft();var P=e.getDocumentTop();var N=0;if(this.getResizableTop()&&Math.abs(O.top-P)<M){N+=this.RESIZE_TOP;}else if(this.getResizableBottom()&&Math.abs(O.bottom-P)<M){N+=this.RESIZE_BOTTOM;}if(this.getResizableLeft()&&Math.abs(O.left-Q)<M){N+=this.RESIZE_LEFT;}else if(this.getResizableRight()&&Math.abs(O.right-Q)<M){N+=this.RESIZE_RIGHT;}this.__bp=N;},__bz:function(e){if(!this.__bp){return;}this.addState(j);this.__bq=e.getDocumentLeft();this.__br=e.getDocumentTop();var location=this.getContainerLocation();var T=this.getBounds();this.__bs={top:location.top,left:location.left,width:T.width,height:T.height,bounds:qx.lang.Object.clone(T)};var parent=this.getLayoutParent();var R=parent.getContentLocation();var S=parent.getBounds();this.__bt={left:R.left,top:R.top,right:R.left+S.width,bottom:R.top+S.height};if(this.getUseResizeFrame()){this.__bv();}this.capture();e.stop();},__bA:function(e){if(!this.hasState(j)){return;}if(this.getUseResizeFrame()){this.__bu().exclude();}var U=this.__bw(e);this.setWidth(U.width);this.setHeight(U.height);if(this.getResizableLeft()||this.getResizableTop()){this.setLayoutProperties({left:U.parentLeft,top:U.parentTop});}this.__bp=0;this.removeState(j);this.resetCursor();this.getApplicationRoot().resetGlobalCursor();this.releaseCapture();e.stopPropagation();},__bB:function(e){if(!this.__bp){return;}this.resetCursor();this.getApplicationRoot().resetGlobalCursor();this.removeState(w);if(this.getUseResizeFrame()){this.__bu().exclude();}},__bC:function(e){if(this.hasState(j)){var Y=this.__bw(e);if(this.getUseResizeFrame()){var W=this.__bu();W.setUserBounds(Y.viewportLeft,Y.viewportTop,Y.width,Y.height);}else{this.setWidth(Y.width);this.setHeight(Y.height);if(this.getResizableLeft()||this.getResizableTop()){this.setLayoutProperties({left:Y.parentLeft,top:Y.parentTop});}}e.stopPropagation();}else if(!this.hasState(u)&&!this.__bn.isSessionActive()){this.__by(e);var ba=this.__bp;var X=this.getApplicationRoot();if(ba){var V=this.__bx[ba];this.setCursor(V);X.setGlobalCursor(V);}else if(this.getCursor()){this.resetCursor();X.resetGlobalCursor();}}},__bD:function(e){if(this.getCursor()&&!this.hasState(j)){this.resetCursor();this.getApplicationRoot().resetGlobalCursor();}}},destruct:function(){if(this.__bo!=null&&!qx.core.ObjectRegistry.inShutDown){this.__bo.destroy();this.__bo=null;}this.__bn=null;}});})();(function(){var a="qx.ui.window.IWindowManager";qx.Interface.define(a,{members:{setDesktop:function(b){this.assertInterface(b,qx.ui.window.IDesktop);},changeActiveWindow:function(c,d){},updateStack:function(){},bringToFront:function(e){this.assertInstance(e,qx.ui.window.Window);},sendToBack:function(f){this.assertInstance(f,qx.ui.window.Window);}}});})();(function(){var b="__X",a="qx.ui.window.Manager";qx.Class.define(a,{extend:qx.core.Object,implement:qx.ui.window.IWindowManager,members:{__X:null,setDesktop:function(c){this.__X=c;this.updateStack();},getDesktop:function(){return this.__X;},changeActiveWindow:function(d,e){if(d){this.bringToFront(d);d.setActive(true);}if(e){e.resetActive();}},_minZIndex:1e5,updateStack:function(){qx.ui.core.queue.Widget.add(this);},syncWidget:function(){this.__X.forceUnblockContent();var f=this.__X.getWindows();var h=this._minZIndex;var m=h+f.length*2;var j=h+f.length*4;var k=null;for(var i=0,l=f.length;i<l;i++){var g=f[i];if(!g.isVisible()){continue;}k=k||g;if(g.isModal()){g.setZIndex(j);this.__X.blockContent(j-1);j+=2;k=g;}else if(g.isAlwaysOnTop()){g.setZIndex(m);m+=2;}else{g.setZIndex(h);h+=2;}if(!k.isModal()&&g.isActive()||g.getZIndex()>k.getZIndex()){k=g;}}this.__X.setActiveWindow(k);},bringToFront:function(n){var o=this.__X.getWindows();var p=qx.lang.Array.remove(o,n);if(p){o.push(n);this.updateStack();}},sendToBack:function(q){var r=this.__X.getWindows();var s=qx.lang.Array.remove(r,q);if(s){r.unshift(q);this.updateStack();}}},destruct:function(){this._disposeObjects(b);}});})();(function(){var k="Boolean",j="qx.event.type.Event",i="captionbar",h="_applyCaptionBarChange",g="maximize-button",f="restore-button",d="minimize-button",c="close-button",b="maximized",a="execute",Q="pane",P="title",O="icon",N="statusbar-text",M="statusbar",L="String",K="normal",J="active",I="beforeClose",H="beforeMinimize",r="mousedown",s="changeStatus",p="changeIcon",q="excluded",n="dblclick",o="_applyActive",l="beforeRestore",m="minimize",t="changeModal",u="changeAlwaysOnTop",z="_applyShowStatusbar",y="_applyStatus",B="qx.ui.window.Window",A="changeCaption",D="focusout",C="beforeMaximize",w="maximize",G="restore",F="window",E="close",v="changeActive",x="minimized";qx.Class.define(B,{extend:qx.ui.core.Widget,include:[qx.ui.core.MRemoteChildrenHandling,qx.ui.core.MRemoteLayoutHandling,qx.ui.core.MResizable,qx.ui.core.MMovable,qx.ui.core.MContentPadding],construct:function(R,S){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.VBox());this._createChildControl(i);this._createChildControl(Q);if(S!=null){this.setIcon(S);}if(R!=null){this.setCaption(R);}this._updateCaptionBar();this.addListener(r,this._onWindowMouseDown,this,true);this.addListener(D,this._onWindowFocusOut,this);qx.core.Init.getApplication().getRoot().add(this);this.initVisibility();qx.ui.core.FocusHandler.getInstance().addRoot(this);},statics:{DEFAULT_MANAGER_CLASS:qx.ui.window.Manager},events:{"beforeClose":j,"close":j,"beforeMinimize":j,"minimize":j,"beforeMaximize":j,"maximize":j,"beforeRestore":j,"restore":j},properties:{appearance:{refine:true,init:F},visibility:{refine:true,init:q},focusable:{refine:true,init:true},active:{check:k,init:false,apply:o,event:v},alwaysOnTop:{check:k,init:false,event:u},modal:{check:k,init:false,event:t},caption:{apply:h,event:A,nullable:true},icon:{check:L,nullable:true,apply:h,event:p,themeable:true},status:{check:L,nullable:true,apply:y,event:s},showClose:{check:k,init:true,apply:h,themeable:true},showMaximize:{check:k,init:true,apply:h,themeable:true},showMinimize:{check:k,init:true,apply:h,themeable:true},allowClose:{check:k,init:true,apply:h},allowMaximize:{check:k,init:true,apply:h},allowMinimize:{check:k,init:true,apply:h},showStatusbar:{check:k,init:false,apply:z}},members:{__V:null,__W:null,getChildrenContainer:function(){return this.getChildControl(Q);},_forwardStates:{active:true,maximized:true},setLayoutParent:function(parent){{};qx.ui.core.Widget.prototype.setLayoutParent.call(this,parent);},_createChildControlImpl:function(T,U){var V;switch(T){case M:V=new qx.ui.container.Composite(new qx.ui.layout.HBox());this._add(V);V.add(this.getChildControl(N));break;case N:V=new qx.ui.basic.Label();V.setValue(this.getStatus());break;case Q:V=new qx.ui.container.Composite();this._add(V,{flex:1});break;case i:var X=new qx.ui.layout.Grid();X.setRowFlex(0,1);X.setColumnFlex(1,1);V=new qx.ui.container.Composite(X);this._add(V);V.addListener(n,this._onCaptionMouseDblClick,this);this._activateMoveHandle(V);break;case O:V=new qx.ui.basic.Image(this.getIcon());this.getChildControl(i).add(V,{row:0,column:0});break;case P:V=new qx.ui.basic.Label(this.getCaption());V.setWidth(0);V.setAllowGrowX(true);var W=this.getChildControl(i);W.add(V,{row:0,column:1});break;case d:V=new qx.ui.form.Button();V.setFocusable(false);V.addListener(a,this._onMinimizeButtonClick,this);this.getChildControl(i).add(V,{row:0,column:2});break;case f:V=new qx.ui.form.Button();V.setFocusable(false);V.addListener(a,this._onRestoreButtonClick,this);this.getChildControl(i).add(V,{row:0,column:3});break;case g:V=new qx.ui.form.Button();V.setFocusable(false);V.addListener(a,this._onMaximizeButtonClick,this);this.getChildControl(i).add(V,{row:0,column:4});break;case c:V=new qx.ui.form.Button();V.setFocusable(false);V.addListener(a,this._onCloseButtonClick,this);this.getChildControl(i).add(V,{row:0,column:6});break;}return V||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,T);},_updateCaptionBar:function(){var ba;var bb=this.getIcon();if(bb){this.getChildControl(O).setSource(bb);this._showChildControl(O);}else{this._excludeChildControl(O);}var Y=this.getCaption();if(Y){this.getChildControl(P).setValue(Y);this._showChildControl(P);}else{this._excludeChildControl(P);}if(this.getShowMinimize()){this._showChildControl(d);ba=this.getChildControl(d);this.getAllowMinimize()?ba.resetEnabled():ba.setEnabled(false);}else{this._excludeChildControl(d);}if(this.getShowMaximize()){if(this.isMaximized()){this._showChildControl(f);this._excludeChildControl(g);}else{this._showChildControl(g);this._excludeChildControl(f);}ba=this.getChildControl(g);this.getAllowMaximize()?ba.resetEnabled():ba.setEnabled(false);}else{this._excludeChildControl(g);this._excludeChildControl(f);}if(this.getShowClose()){this._showChildControl(c);ba=this.getChildControl(c);this.getAllowClose()?ba.resetEnabled():ba.setEnabled(false);}else{this._excludeChildControl(c);}},close:function(){if(!this.isVisible()){return;}if(this.fireNonBubblingEvent(I,qx.event.type.Event,[false,true])){this.hide();this.fireEvent(E);}},open:function(){this.show();this.setActive(true);this.focus();},center:function(){var parent=this.getLayoutParent();if(parent){var bd=parent.getBounds();if(bd){var be=this.getSizeHint();var bc=Math.round((bd.width-be.width)/2);var top=Math.round((bd.height-be.height)/2);if(top<0){top=0;}this.moveTo(bc,top);return;}}{};},maximize:function(){if(this.isMaximized()){return;}var parent=this.getLayoutParent();if(parent!=null&&parent.supportsMaximize()){if(this.fireNonBubblingEvent(C,qx.event.type.Event,[false,true])){if(!this.isVisible()){this.open();}var bf=this.getLayoutProperties();this.__W=bf.left===undefined?0:bf.left;this.__V=bf.top===undefined?0:bf.top;this.setLayoutProperties({left:null,top:null,edge:0});this.addState(b);this._updateCaptionBar();this.fireEvent(w);}}},minimize:function(){if(!this.isVisible()){return;}if(this.fireNonBubblingEvent(H,qx.event.type.Event,[false,true])){var bg=this.getLayoutProperties();this.__W=bg.left===undefined?0:bg.left;this.__V=bg.top===undefined?0:bg.top;this.removeState(b);this.hide();this.fireEvent(m);}},restore:function(){if(this.getMode()===K){return;}if(this.fireNonBubblingEvent(l,qx.event.type.Event,[false,true])){if(!this.isVisible()){this.open();}var bh=this.__W;var top=this.__V;this.setLayoutProperties({edge:null,left:bh,top:top});this.removeState(b);this._updateCaptionBar();this.fireEvent(G);}},moveTo:function(bi,top){if(this.isMaximized()){return;}this.setLayoutProperties({left:bi,top:top});},isMaximized:function(){return this.hasState(b);},getMode:function(){if(!this.isVisible()){return x;}else{if(this.isMaximized()){return b;}else{return K;}}},_applyActive:function(bj,bk){if(bk){this.removeState(J);}else{this.addState(J);}},_getContentPaddingTarget:function(){return this.getChildControl(Q);},_applyShowStatusbar:function(bl,bm){if(bl){this._showChildControl(M);}else{this._excludeChildControl(M);}},_applyCaptionBarChange:function(bn,bo){this._updateCaptionBar();},_applyStatus:function(bp,bq){var br=this.getChildControl(N,true);if(br){br.setValue(bp);}},_onWindowEventStop:function(e){e.stopPropagation();},_onWindowMouseDown:function(e){this.setActive(true);},_onWindowFocusOut:function(e){if(this.getModal()){return;}var bs=e.getRelatedTarget();if(bs!=null&&!qx.ui.core.Widget.contains(this,bs)){this.setActive(false);}},_onCaptionMouseDblClick:function(e){if(this.getAllowMaximize()){this.isMaximized()?this.restore():this.maximize();}},_onMinimizeButtonClick:function(e){this.minimize();this.getChildControl(d).reset();},_onRestoreButtonClick:function(e){this.restore();this.getChildControl(f).reset();},_onMaximizeButtonClick:function(e){this.maximize();this.getChildControl(g).reset();},_onCloseButtonClick:function(e){this.close();this.getChildControl(c).reset();}}});})();(function(){var a="qx.ui.window.IDesktop";qx.Interface.define(a,{members:{setWindowManager:function(b){this.assertInterface(b,qx.ui.window.IWindowManager);},getWindows:function(){},supportsMaximize:function(){},blockContent:function(c){this.assertInteger(c);},unblockContent:function(){},isContentBlocked:function(){}}});})();(function(){var h="headerCellRendererChanged",g="visibilityChangedPre",f="Number",e="qx.event.type.Event",d="_applyFirstColumnX",c="Integer",b="qx.ui.table.pane.Model",a="_applyMaxColumnCount";qx.Class.define(b,{extend:qx.core.Object,construct:function(i){qx.core.Object.call(this);this.setTableColumnModel(i);},events:{"modelChanged":e},statics:{EVENT_TYPE_MODEL_CHANGED:"modelChanged"},properties:{firstColumnX:{check:c,init:0,apply:d},maxColumnCount:{check:f,init:-1,apply:a}},members:{__xK:null,__xL:null,_applyFirstColumnX:function(j,k){this.__xK=null;this.fireEvent(qx.ui.table.pane.Model.EVENT_TYPE_MODEL_CHANGED);},_applyMaxColumnCount:function(l,m){this.__xK=null;this.fireEvent(qx.ui.table.pane.Model.EVENT_TYPE_MODEL_CHANGED);},setTableColumnModel:function(n){if(this.__xL){this.__xL.removeListener(g,this._onColVisibilityChanged,this);this.__xL.removeListener(h,this._onColVisibilityChanged,this);}this.__xL=n;this.__xL.addListener(g,this._onColVisibilityChanged,this);this.__xL.addListener(h,this._onHeaderCellRendererChanged,this);this.__xK=null;},_onColVisibilityChanged:function(o){this.__xK=null;this.fireEvent(qx.ui.table.pane.Model.EVENT_TYPE_MODEL_CHANGED);},_onHeaderCellRendererChanged:function(p){this.fireEvent(qx.ui.table.pane.Model.EVENT_TYPE_MODEL_CHANGED);},getColumnCount:function(){if(this.__xK==null){var q=this.getFirstColumnX();var s=this.getMaxColumnCount();var r=this.__xL.getVisibleColumnCount();if(s==-1||(q+s)>r){this.__xK=r-q;}else{this.__xK=s;}}return this.__xK;},getColumnAtX:function(t){var u=this.getFirstColumnX();return this.__xL.getVisibleColumnAtX(u+t);},getX:function(v){var w=this.getFirstColumnX();var y=this.getMaxColumnCount();var x=this.__xL.getVisibleX(v)-w;if(x>=0&&(y==-1||x<y)){return x;}else{return -1;}},getColumnLeft:function(z){var C=0;var B=this.getColumnCount();for(var x=0;x<B;x++){var A=this.getColumnAtX(x);if(A==z){return C;}C+=this.__xL.getColumnWidth(A);}return -1;},getTotalWidth:function(){var D=0;var E=this.getColumnCount();for(var x=0;x<E;x++){var F=this.getColumnAtX(x);D+=this.__xL.getColumnWidth(F);}return D;}},destruct:function(){if(this.__xL){this.__xL.removeListener(g,this._onColVisibilityChanged,this);this.__xL.removeListener(h,this._onColVisibilityChanged,this);}this.__xL=null;}});})();(function(){var r="px",q=".qooxdoo-table-cell-icon {",p="abstract",o="",n="qx.ui.table.cellrenderer.AbstractImage",m=" qooxdoo-table-cell-icon",l="<div></div>",k="'",j="no-repeat",i="}",c=" text-align:center;",h="inline-block",f="static",b="top",a=" padding-top:1px;",e="title='",d="string",g="-moz-inline-box";qx.Class.define(n,{extend:qx.ui.table.cellrenderer.Abstract,type:p,construct:function(){qx.ui.table.cellrenderer.Abstract.call(this);var s=this.self(arguments);if(!s.stylesheet){s.stylesheet=qx.bom.Stylesheet.createElement(q+c+a+i);}},members:{__Hw:16,__Hx:16,__Hy:null,_insetY:2,_identifyImage:function(t){throw new Error("_identifyImage is abstract");},_getImageInfos:function(u){var v=this._identifyImage(u);if(v==null||typeof v==d){v={url:v,tooltip:null};}if(!v.imageWidth||!v.imageHeight){var w=this.__Hz(v.url);v.imageWidth=w.width;v.imageHeight=w.height;}v.width=v.imageWidth;v.height=v.imageHeight;return v;},__Hz:function(x){var A=qx.util.ResourceManager.getInstance();var z=qx.io.ImageLoader;var y,B;if(A.has(x)){y=A.getImageWidth(x);B=A.getImageHeight(x);}else if(z.isLoaded(x)){y=z.getWidth(x);B=z.getHeight(x);}else{y=this.__Hw;B=this.__Hx;}return {width:y,height:B};},createDataCellHtml:function(C,D){this.__Hy=this._getImageInfos(C);return qx.ui.table.cellrenderer.Abstract.prototype.createDataCellHtml.call(this,C,D);},_getCellClass:function(E){return qx.ui.table.cellrenderer.Abstract.prototype._getCellClass.call(this)+m;},_getContentHtml:function(F){var content=l;if(this.__Hy.url){content=qx.bom.element.Decoration.create(this.__Hy.url,j,{width:this.__Hy.width+r,height:this.__Hy.height+r,display:qx.bom.client.Engine.GECKO&&qx.bom.client.Engine.VERSION<1.9?g:h,verticalAlign:b,position:f});}return content;},_getCellAttributes:function(G){var H=this.__Hy.tooltip;if(H){return e+H+k;}else{return o;}}},destruct:function(){this.__Hy=null;}});})();(function(){var b="qx.ui.table.cellrenderer.Image",a="";qx.Class.define(b,{extend:qx.ui.table.cellrenderer.AbstractImage,construct:function(c,d){qx.ui.table.cellrenderer.AbstractImage.call(this);if(c){this.__HA=c;}if(d){this.__HB=d;}this.__HC=qx.util.AliasManager.getInstance();},members:{__HC:null,__HB:16,__HA:16,_identifyImage:function(e){var f={imageWidth:this.__HA,imageHeight:this.__HB};if(e.value==a){f.url=null;}else{f.url=this.__HC.resolve(e.value);}f.tooltip=e.tooltip;return f;}},destruct:function(){this.__HC=null;}});})();(function(){var k="Boolean",j="qx.event.type.Event",i="queued",h="String",g="sending",f="receiving",d="aborted",c="failed",b="nocache",a="completed",P="qx.io.remote.Response",O="POST",N="configured",M="timeout",L="GET",K="Pragma",J="no-url-params-on-post",I="PUT",H="no-cache",G="Cache-Control",r="Content-Type",s="text/plain",p="application/xml",q="application/json",n="text/html",o="application/x-www-form-urlencoded",l="qx.io.remote.Exchange",m="Integer",t="X-Qooxdoo-Response-Type",u="HEAD",y="qx.io.remote.Request",x="_applyResponseType",A="_applyState",z="text/javascript",C="changeState",B="_applyProhibitCaching",w="",F="_applyMethod",E="DELETE",D="boolean";qx.Class.define(y,{extend:qx.core.Object,construct:function(Q,R,S){qx.core.Object.call(this);this.__sp={};this.__sq={};this.__sr={};this.__ss={};if(Q!==undefined){this.setUrl(Q);}if(R!==undefined){this.setMethod(R);}if(S!==undefined){this.setResponseType(S);}this.setProhibitCaching(true);this.__st=++qx.io.remote.Request.__st;},events:{"created":j,"configured":j,"sending":j,"receiving":j,"completed":P,"aborted":j,"failed":P,"timeout":P},statics:{__st:0,methodAllowsRequestBody:function(T){return (T==O)||(T==I);}},properties:{url:{check:h,init:w},method:{check:[L,O,I,u,E],apply:F,init:L},asynchronous:{check:k,init:true},data:{check:h,nullable:true},username:{check:h,nullable:true},password:{check:h,nullable:true},state:{check:[N,i,g,f,a,d,M,c],init:N,apply:A,event:C},responseType:{check:[s,z,q,p,n],init:s,apply:x},timeout:{check:m,nullable:true},prohibitCaching:{check:function(v){return typeof v==D||v===J;},init:true,apply:B},crossDomain:{check:k,init:false},fileUpload:{check:k,init:false},transport:{check:l,nullable:true},useBasicHttpAuth:{check:k,init:false},parseJson:{check:k,init:true}},members:{__sp:null,__sq:null,__sr:null,__ss:null,__st:null,send:function(){qx.io.remote.RequestQueue.getInstance().add(this);},abort:function(){qx.io.remote.RequestQueue.getInstance().abort(this);},reset:function(){switch(this.getState()){case g:case f:this.error("Aborting already sent request!");case i:this.abort();break;}},isConfigured:function(){return this.getState()===N;},isQueued:function(){return this.getState()===i;},isSending:function(){return this.getState()===g;},isReceiving:function(){return this.getState()===f;},isCompleted:function(){return this.getState()===a;},isAborted:function(){return this.getState()===d;},isTimeout:function(){return this.getState()===M;},isFailed:function(){return this.getState()===c;},__su:qx.event.GlobalError.observeMethod(function(e){var U=e.clone();U.setTarget(this);this.dispatchEvent(U);}),_onqueued:function(e){this.setState(i);this.__su(e);},_onsending:function(e){this.setState(g);this.__su(e);},_onreceiving:function(e){this.setState(f);this.__su(e);},_oncompleted:function(e){this.setState(a);this.__su(e);this.dispose();},_onaborted:function(e){this.setState(d);this.__su(e);this.dispose();},_ontimeout:function(e){this.setState(M);this.__su(e);this.dispose();},_onfailed:function(e){this.setState(c);this.__su(e);this.dispose();},_applyState:function(V,W){{};},_applyProhibitCaching:function(X,Y){if(!X){this.removeParameter(b);this.removeRequestHeader(K);this.removeRequestHeader(G);return;}if(X!==J||this.getMethod()!=O){this.setParameter(b,new Date().valueOf());}else{this.removeParameter(b);}this.setRequestHeader(K,H);this.setRequestHeader(G,H);},_applyMethod:function(ba,bb){if(qx.io.remote.Request.methodAllowsRequestBody(ba)){this.setRequestHeader(r,o);}else{this.removeRequestHeader(r);}var bc=this.getProhibitCaching();this._applyProhibitCaching(bc,bc);},_applyResponseType:function(bd,be){this.setRequestHeader(t,bd);},setRequestHeader:function(bf,bg){this.__sp[bf]=bg;},removeRequestHeader:function(bh){delete this.__sp[bh];},getRequestHeader:function(bi){return this.__sp[bi]||null;},getRequestHeaders:function(){return this.__sp;},setParameter:function(bj,bk,bl){if(bl){this.__sr[bj]=bk;}else{this.__sq[bj]=bk;}},removeParameter:function(bm,bn){if(bn){delete this.__sr[bm];}else{delete this.__sq[bm];}},getParameter:function(bo,bp){if(bp){return this.__sr[bo]||null;}else{return this.__sq[bo]||null;}},getParameters:function(bq){return (bq?this.__sr:this.__sq);},setFormField:function(br,bs){this.__ss[br]=bs;},removeFormField:function(bt){delete this.__ss[bt];},getFormField:function(bu){return this.__ss[bu]||null;},getFormFields:function(){return this.__ss;},getSequenceNumber:function(){return this.__st;}},destruct:function(){this.setTransport(null);this.__sp=this.__sq=this.__sr=this.__ss=null;}});})();(function(){var b=".",a="qx.bom.client.Transport";qx.Class.define(a,{statics:{getMaxConcurrentRequestCount:function(){var h;var c=qx.bom.client.Engine;var g=c.FULLVERSION.split(b);var e=0;var d=0;var f=0;if(g[0]){e=g[0];}if(g[1]){d=g[1];}if(g[2]){f=g[2];}if(window.maxConnectionsPerServer){h=window.maxConnectionsPerServer;}else if(c.OPERA){h=8;}else if(c.WEBKIT){h=4;}else if(c.GECKO&&((e>1)||((e==1)&&(d>9))||((e==1)&&(d==9)&&(f>=1)))){h=6;}else{h=2;}return h;}}});})();(function(){var s="Integer",r="aborted",q="_onaborted",p="_on",o="_applyEnabled",n="Boolean",m="sending",l="__pc",k="interval",j="__pe",c="failed",h="qx.io.remote.RequestQueue",g="timeout",b="completed",a="queued",f="receiving",d="singleton";qx.Class.define(h,{type:d,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.__pb=[];this.__pc=[];this.__pd=0;this.__pe=new qx.event.Timer(500);this.__pe.addListener(k,this._oninterval,this);},properties:{enabled:{init:true,check:n,apply:o},maxTotalRequests:{check:s,nullable:true},maxConcurrentRequests:{check:s,init:qx.bom.client.Transport.getMaxConcurrentRequestCount()},defaultTimeout:{check:s,init:5000}},members:{__pb:null,__pc:null,__pd:null,__pe:null,getRequestQueue:function(){return this.__pb;},getActiveQueue:function(){return this.__pc;},_debug:function(){var t;{};},_check:function(){this._debug();if(this.__pc.length==0&&this.__pb.length==0){this.__pe.stop();}if(!this.getEnabled()){return;}if(this.__pb.length==0||(this.__pb[0].isAsynchronous()&&this.__pc.length>=this.getMaxConcurrentRequests())){return;}if(this.getMaxTotalRequests()!=null&&this.__pd>=this.getMaxTotalRequests()){return;}var u=this.__pb.shift();var v=new qx.io.remote.Exchange(u);this.__pd++;this.__pc.push(v);this._debug();v.addListener(m,this._onsending,this);v.addListener(f,this._onreceiving,this);v.addListener(b,this._oncompleted,this);v.addListener(r,this._oncompleted,this);v.addListener(g,this._oncompleted,this);v.addListener(c,this._oncompleted,this);v._start=(new Date).valueOf();v.send();if(this.__pb.length>0){this._check();}},_remove:function(w){qx.lang.Array.remove(this.__pc,w);w.dispose();this._check();},__pf:0,_onsending:function(e){{};e.getTarget().getRequest()._onsending(e);},_onreceiving:function(e){e.getTarget().getRequest()._onreceiving(e);},_oncompleted:function(e){{};var y=e.getTarget().getRequest();var x=p+e.getType();try{if(y[x]){y[x](e);}}catch(z){this.error("Request "+y+" handler "+x+" threw an error: ",z);try{if(y[q]){var event=qx.event.Registration.createEvent(r,qx.event.type.Event);y[q](event);}}catch(A){}}finally{this._remove(e.getTarget());}},_oninterval:function(e){var H=this.__pc;if(H.length==0){this.__pe.stop();return;}var C=(new Date).valueOf();var F;var D;var G=this.getDefaultTimeout();var E;var B;for(var i=H.length-1;i>=0;i--){F=H[i];D=F.getRequest();if(D.isAsynchronous()){E=D.getTimeout();if(E==0){continue;}if(E==null){E=G;}B=C-F._start;if(B>E){this.warn("Timeout: transport "+F.toHashCode());this.warn(B+"ms > "+E+"ms");F.timeout();}}}},_applyEnabled:function(I,J){if(I){this._check();}this.__pe.setEnabled(I);},add:function(K){K.setState(a);if(K.isAsynchronous()){this.__pb.push(K);}else{this.__pb.unshift(K);}this._check();if(this.getEnabled()){this.__pe.start();}},abort:function(L){var M=L.getTransport();if(M){M.abort();}else if(qx.lang.Array.contains(this.__pb,L)){qx.lang.Array.remove(this.__pb,L);}}},destruct:function(){this._disposeArray(l);this._disposeObjects(j);this.__pb=null;}});})();(function(){var o="failed",n="sending",m="completed",k="receiving",j="aborted",h="timeout",g="qx.event.type.Event",f="Connection dropped",d="qx.io.remote.Response",c="=",bp="configured",bo="&",bn="Unknown status code. ",bm="qx.io.remote.transport.XmlHttp",bl="qx.io.remote.transport.Abstract",bk="Request-URL too large",bj="MSHTML-specific HTTP status code",bi="Not available",bh="Precondition failed",bg="Server error",v="Moved temporarily",w="qx.io.remote.Exchange",t="Possibly due to a cross-domain request?",u="Bad gateway",r="Gone",s="See other",p="Partial content",q="Server timeout",B="qx.io.remote.transport.Script",C="HTTP version not supported",L="Unauthorized",I="Possibly due to application URL using 'file:' protocol?",T="Multiple choices",O="Payment required",bc="Not implemented",Y="Proxy authentication required",E="Length required",bf="_applyState",be="changeState",bd="Not modified",D="qx.io.remote.Request",G="Connection closed by server",H="Moved permanently",K="_applyImplementation",M="",P="Method not allowed",V="Forbidden",bb="Use proxy",x="Ok",y="Conflict",F="Not found",S="Not acceptable",R="Request time-out",Q="Bad request",X="No content",W="file:",N="qx.io.remote.transport.Iframe",U="Request entity too large",a="Unknown status code",ba="Unsupported media type",z="Gateway time-out",A="created",J="Out of resources",b="undefined";qx.Class.define(w,{extend:qx.core.Object,construct:function(bq){qx.core.Object.call(this);this.setRequest(bq);bq.setTransport(this);},events:{"sending":g,"receiving":g,"completed":d,"aborted":g,"failed":d,"timeout":d},statics:{typesOrder:[bm,N,B],typesReady:false,typesAvailable:{},typesSupported:{},registerType:function(br,bs){qx.io.remote.Exchange.typesAvailable[bs]=br;},initTypes:function(){if(qx.io.remote.Exchange.typesReady){return;}for(var bu in qx.io.remote.Exchange.typesAvailable){var bt=qx.io.remote.Exchange.typesAvailable[bu];if(bt.isSupported()){qx.io.remote.Exchange.typesSupported[bu]=bt;}}qx.io.remote.Exchange.typesReady=true;if(qx.lang.Object.isEmpty(qx.io.remote.Exchange.typesSupported)){throw new Error("No supported transport types were found!");}},canHandle:function(bv,bw,bx){if(!qx.lang.Array.contains(bv.handles.responseTypes,bx)){return false;}for(var by in bw){if(!bv.handles[by]){return false;}}return true;},_nativeMap:{0:A,1:bp,2:n,3:k,4:m},wasSuccessful:function(bz,bA,bB){if(bB){switch(bz){case null:case 0:return true;case -1:return bA<4;default:return typeof bz===b;}}else{switch(bz){case -1:{};return bA<4;case 200:case 304:return true;case 201:case 202:case 203:case 204:case 205:return true;case 206:{};return bA!==4;case 300:case 301:case 302:case 303:case 305:case 400:case 401:case 402:case 403:case 404:case 405:case 406:case 407:case 408:case 409:case 410:case 411:case 412:case 413:case 414:case 415:case 500:case 501:case 502:case 503:case 504:case 505:{};return false;case 12002:case 12007:case 12029:case 12030:case 12031:case 12152:case 13030:{};return false;default:if(bz>206&&bz<300){return true;}qx.log.Logger.debug(this,"Unknown status code: "+bz+" ("+bA+")");return false;}}},statusCodeToString:function(bC){switch(bC){case -1:return bi;case 0:var bD=window.location.href;if(qx.lang.String.startsWith(bD.toLowerCase(),W)){return (bn+I);}else{return (bn+t);}break;case 200:return x;case 304:return bd;case 206:return p;case 204:return X;case 300:return T;case 301:return H;case 302:return v;case 303:return s;case 305:return bb;case 400:return Q;case 401:return L;case 402:return O;case 403:return V;case 404:return F;case 405:return P;case 406:return S;case 407:return Y;case 408:return R;case 409:return y;case 410:return r;case 411:return E;case 412:return bh;case 413:return U;case 414:return bk;case 415:return ba;case 500:return bg;case 501:return bc;case 502:return u;case 503:return J;case 504:return z;case 505:return C;case 12002:return q;case 12029:return f;case 12030:return f;case 12031:return f;case 12152:return G;case 13030:return bj;default:return a;}}},properties:{request:{check:D,nullable:true},implementation:{check:bl,nullable:true,apply:K},state:{check:[bp,n,k,m,j,h,o],init:bp,event:be,apply:bf}},members:{send:function(){var bH=this.getRequest();if(!bH){return this.error("Please attach a request object first");}qx.io.remote.Exchange.initTypes();var bF=qx.io.remote.Exchange.typesOrder;var bE=qx.io.remote.Exchange.typesSupported;var bJ=bH.getResponseType();var bK={};if(bH.getAsynchronous()){bK.asynchronous=true;}else{bK.synchronous=true;}if(bH.getCrossDomain()){bK.crossDomain=true;}if(bH.getFileUpload()){bK.fileUpload=true;}for(var bI in bH.getFormFields()){bK.programaticFormFields=true;break;}var bL,bG;for(var i=0,l=bF.length;i<l;i++){bL=bE[bF[i]];if(bL){if(!qx.io.remote.Exchange.canHandle(bL,bK,bJ)){continue;}try{{};bG=new bL;this.setImplementation(bG);bG.setUseBasicHttpAuth(bH.getUseBasicHttpAuth());bG.send();return true;}catch(bM){this.error("Request handler throws error");this.error(bM);return;}}}this.error("There is no transport implementation available to handle this request: "+bH);},abort:function(){var bN=this.getImplementation();if(bN){{};bN.abort();}else{{};this.setState(j);}},timeout:function(){var bQ=this.getImplementation();if(bQ){var bP=M;for(var bO in bQ.getParameters()){bP+=bo+bO+c+bQ.getParameters()[bO];}this.warn("Timeout: implementation "+bQ.toHashCode()+", "+bQ.getUrl()+" ["+bQ.getMethod()+"], "+bP);bQ.timeout();}else{this.warn("Timeout: forcing state to timeout");this.setState(h);}this.__rx();},__rx:function(){var bR=this.getRequest();if(bR){bR.setTimeout(0);}},_onsending:function(e){this.setState(n);},_onreceiving:function(e){this.setState(k);},_oncompleted:function(e){this.setState(m);},_onabort:function(e){this.setState(j);},_onfailed:function(e){this.setState(o);},_ontimeout:function(e){this.setState(h);},_applyImplementation:function(bS,bT){if(bT){bT.removeListener(n,this._onsending,this);bT.removeListener(k,this._onreceiving,this);bT.removeListener(m,this._oncompleted,this);bT.removeListener(j,this._onabort,this);bT.removeListener(h,this._ontimeout,this);bT.removeListener(o,this._onfailed,this);}if(bS){var bV=this.getRequest();bS.setUrl(bV.getUrl());bS.setMethod(bV.getMethod());bS.setAsynchronous(bV.getAsynchronous());bS.setUsername(bV.getUsername());bS.setPassword(bV.getPassword());bS.setParameters(bV.getParameters(false));bS.setFormFields(bV.getFormFields());bS.setRequestHeaders(bV.getRequestHeaders());if(bS instanceof qx.io.remote.transport.XmlHttp){bS.setParseJson(bV.getParseJson());}var bY=bV.getData();if(bY===null){var ca=bV.getParameters(true);var bX=[];for(var bU in ca){var bW=ca[bU];if(bW instanceof Array){for(var i=0;i<bW.length;i++){bX.push(encodeURIComponent(bU)+c+encodeURIComponent(bW[i]));}}else{bX.push(encodeURIComponent(bU)+c+encodeURIComponent(bW));}}if(bX.length>0){bS.setData(bX.join(bo));}}else{bS.setData(bY);}bS.setResponseType(bV.getResponseType());bS.addListener(n,this._onsending,this);bS.addListener(k,this._onreceiving,this);bS.addListener(m,this._oncompleted,this);bS.addListener(j,this._onabort,this);bS.addListener(h,this._ontimeout,this);bS.addListener(o,this._onfailed,this);}},_applyState:function(cb,cc){{};switch(cb){case n:this.fireEvent(n);break;case k:this.fireEvent(k);break;case m:case j:case h:case o:var ce=this.getImplementation();if(!ce){break;}this.__rx();if(this.hasListener(cb)){var cf=qx.event.Registration.createEvent(cb,qx.io.remote.Response);if(cb==m){var cd=ce.getResponseContent();cf.setContent(cd);if(cd===null){{};cb=o;}}else if(cb==o){cf.setContent(ce.getResponseContent());}cf.setStatusCode(ce.getStatusCode());cf.setResponseHeaders(ce.getResponseHeaders());this.dispatchEvent(cf);}this.setImplementation(null);ce.dispose();break;}}},settings:{"qx.ioRemoteDebug":false,"qx.ioRemoteDebugData":false},destruct:function(){var cg=this.getImplementation();if(cg){this.setImplementation(null);cg.dispose();}this.setRequest(null);}});})();(function(){var q="qx.event.type.Event",p="String",o="failed",n="timeout",m="created",l="aborted",k="sending",j="configured",i="receiving",h="completed",c="Object",g="Boolean",f="abstract",b="_applyState",a="GET",e="changeState",d="qx.io.remote.transport.Abstract";qx.Class.define(d,{type:f,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);this.setRequestHeaders({});this.setParameters({});this.setFormFields({});},events:{"created":q,"configured":q,"sending":q,"receiving":q,"completed":q,"aborted":q,"failed":q,"timeout":q},properties:{url:{check:p,nullable:true},method:{check:p,nullable:true,init:a},asynchronous:{check:g,nullable:true,init:true},data:{check:p,nullable:true},username:{check:p,nullable:true},password:{check:p,nullable:true},state:{check:[m,j,k,i,h,l,n,o],init:m,event:e,apply:b},requestHeaders:{check:c,nullable:true},parameters:{check:c,nullable:true},formFields:{check:c,nullable:true},responseType:{check:p,nullable:true},useBasicHttpAuth:{check:g,nullable:true}},members:{send:function(){throw new Error("send is abstract");},abort:function(){{};this.setState(l);},timeout:function(){{};this.setState(n);},failed:function(){{};this.setState(o);},setRequestHeader:function(r,s){throw new Error("setRequestHeader is abstract");},getResponseHeader:function(t){throw new Error("getResponseHeader is abstract");},getResponseHeaders:function(){throw new Error("getResponseHeaders is abstract");},getStatusCode:function(){throw new Error("getStatusCode is abstract");},getStatusText:function(){throw new Error("getStatusText is abstract");},getResponseText:function(){throw new Error("getResponseText is abstract");},getResponseXml:function(){throw new Error("getResponseXml is abstract");},getFetchedLength:function(){throw new Error("getFetchedLength is abstract");},_applyState:function(u,v){{};switch(u){case m:this.fireEvent(m);break;case j:this.fireEvent(j);break;case k:this.fireEvent(k);break;case i:this.fireEvent(i);break;case h:this.fireEvent(h);break;case l:this.fireEvent(l);break;case o:this.fireEvent(o);break;case n:this.fireEvent(n);break;}return true;}},destruct:function(){this.setRequestHeaders(null);this.setParameters(null);this.setFormFields(null);}});})();(function(){var l="=",k="",j="&",h="application/xml",g="application/json",f="text/html",d="qx.client",c="textarea",b="_data_",a="load",G="text/plain",F="text/javascript",E="completed",D="readystatechange",C="?",B="qx.io.remote.transport.Iframe",A="none",z="display",y="gecko",x="frame_",s="aborted",t="pre",q="javascript:void(0)",r="sending",o="form",p="failed",m="mshtml",n="form_",u="opera",v="timeout",w="qx/static/blank.gif";qx.Class.define(B,{extend:qx.io.remote.transport.Abstract,construct:function(){qx.io.remote.transport.Abstract.call(this);var H=(new Date).valueOf();var I=x+H;var J=n+H;var K;if(qx.core.Variant.isSet(d,m)){K=q;}this.__oh=qx.bom.Iframe.create({id:I,name:I,src:K});qx.bom.element.Style.set(this.__oh,z,A);this.__oi=qx.bom.Element.create(o,{id:J,name:J,target:I});qx.bom.element.Style.set(this.__oi,z,A);qx.dom.Element.insertEnd(this.__oi,qx.dom.Node.getBodyElement(document));this.__oj=qx.bom.Element.create(c,{id:b,name:b});qx.dom.Element.insertEnd(this.__oj,this.__oi);qx.dom.Element.insertEnd(this.__oh,qx.dom.Node.getBodyElement(document));qx.event.Registration.addListener(this.__oh,a,this._onload,this);this.__ok=qx.lang.Function.listener(this._onreadystatechange,this);qx.bom.Event.addNativeListener(this.__oh,D,this.__ok);},statics:{handles:{synchronous:false,asynchronous:true,crossDomain:false,fileUpload:true,programaticFormFields:true,responseTypes:[G,F,g,h,f]},isSupported:function(){return true;},_numericMap:{"uninitialized":1,"loading":2,"loaded":2,"interactive":3,"complete":4}},members:{__oj:null,__ol:0,__oi:null,__oh:null,__ok:null,send:function(){var M=this.getMethod();var O=this.getUrl();var S=this.getParameters(false);var R=[];for(var N in S){var P=S[N];if(P instanceof Array){for(var i=0;i<P.length;i++){R.push(encodeURIComponent(N)+l+encodeURIComponent(P[i]));}}else{R.push(encodeURIComponent(N)+l+encodeURIComponent(P));}}if(R.length>0){O+=(O.indexOf(C)>=0?j:C)+R.join(j);}if(this.getData()===null){var S=this.getParameters(true);var R=[];for(var N in S){var P=S[N];if(P instanceof Array){for(var i=0;i<P.length;i++){R.push(encodeURIComponent(N)+l+encodeURIComponent(P[i]));}}else{R.push(encodeURIComponent(N)+l+encodeURIComponent(P));}}if(R.length>0){this.setData(R.join(j));}}var L=this.getFormFields();for(var N in L){var Q=document.createElement(c);Q.name=N;Q.appendChild(document.createTextNode(L[N]));this.__oi.appendChild(Q);}this.__oi.action=O;this.__oi.method=M;this.__oj.appendChild(document.createTextNode(this.getData()));this.__oi.submit();this.setState(r);},_onload:qx.event.GlobalError.observeMethod(function(e){if(qx.bom.client.Engine.NAME==u&&this.getIframeHtmlContent()==k){return;}if(this.__oi.src){return;}this._switchReadyState(qx.io.remote.transport.Iframe._numericMap.complete);}),_onreadystatechange:qx.event.GlobalError.observeMethod(function(e){this._switchReadyState(qx.io.remote.transport.Iframe._numericMap[this.__oh.readyState]);}),_switchReadyState:function(T){switch(this.getState()){case E:case s:case p:case v:this.warn("Ignore Ready State Change");return;}while(this.__ol<T){this.setState(qx.io.remote.Exchange._nativeMap[++this.__ol]);}},setRequestHeader:function(U,V){},getResponseHeader:function(W){return null;},getResponseHeaders:function(){return {};},getStatusCode:function(){return 200;},getStatusText:function(){return k;},getIframeWindow:function(){return qx.bom.Iframe.getWindow(this.__oh);},getIframeDocument:function(){return qx.bom.Iframe.getDocument(this.__oh);},getIframeBody:function(){return qx.bom.Iframe.getBody(this.__oh);},getIframeTextContent:function(){var X=this.getIframeBody();if(!X){return null;}if(!X.firstChild){return k;}if(X.firstChild.tagName&&X.firstChild.tagName.toLowerCase()==t){return X.firstChild.innerHTML;}else{return X.innerHTML;}},getIframeHtmlContent:function(){var Y=this.getIframeBody();return Y?Y.innerHTML:null;},getFetchedLength:function(){return 0;},getResponseContent:function(){if(this.getState()!==E){{};return null;}{};var ba=this.getIframeTextContent();switch(this.getResponseType()){case G:{};return ba;break;case f:ba=this.getIframeHtmlContent();{};return ba;break;case g:ba=this.getIframeHtmlContent();{};try{return ba&&ba.length>0?qx.util.Json.parse(ba,false):null;}catch(bb){return this.error("Could not execute json: ("+ba+")",bb);}case F:ba=this.getIframeHtmlContent();{};try{return ba&&ba.length>0?window.eval(ba):null;}catch(bc){return this.error("Could not execute javascript: ("+ba+")",bc);}case h:ba=this.getIframeDocument();{};return ba;default:this.warn("No valid responseType specified ("+this.getResponseType()+")!");return null;}}},defer:function(){qx.io.remote.Exchange.registerType(qx.io.remote.transport.Iframe,B);},destruct:function(){if(this.__oh){qx.event.Registration.removeListener(this.__oh,a,this._onload,this);qx.bom.Event.removeNativeListener(this.__oh,D,this.__ok);if(qx.core.Variant.isSet(d,y)){this.__oh.src=qx.util.ResourceManager.getInstance().toUri(w);}qx.dom.Element.remove(this.__oh);}if(this.__oi){qx.dom.Element.remove(this.__oi);}this.__oh=this.__oi=this.__oj=null;}});})();(function(){var c="qx.event.handler.Iframe",b="load",a="iframe";qx.Class.define(c,{extend:qx.core.Object,implement:qx.event.IEventHandler,statics:{PRIORITY:qx.event.Registration.PRIORITY_NORMAL,SUPPORTED_TYPES:{load:1},TARGET_CHECK:qx.event.IEventHandler.TARGET_DOMNODE,IGNORE_CAN_HANDLE:false,onevent:qx.event.GlobalError.observeMethod(function(d){qx.event.Registration.fireEvent(d,b);})},members:{canHandleEvent:function(e,f){return e.tagName.toLowerCase()===a;},registerEvent:function(g,h,i){},unregisterEvent:function(j,k,l){}},defer:function(m){qx.event.Registration.addHandler(m);}});})();(function(){var e="qx.client",d="webkit",c="body",b="iframe",a="qx.bom.Iframe";qx.Class.define(a,{statics:{DEFAULT_ATTRIBUTES:{onload:"qx.event.handler.Iframe.onevent(this)",frameBorder:0,frameSpacing:0,marginWidth:0,marginHeight:0,hspace:0,vspace:0,border:0,allowTransparency:true},create:function(f,g){var f=f?qx.lang.Object.clone(f):{};var h=qx.bom.Iframe.DEFAULT_ATTRIBUTES;for(var i in h){if(f[i]==null){f[i]=h[i];}}return qx.bom.Element.create(b,f,g);},getWindow:qx.core.Variant.select(e,{"mshtml|gecko":function(j){try{return j.contentWindow;}catch(k){return null;}},"default":function(l){try{var m=this.getDocument(l);return m?m.defaultView:null;}catch(n){return null;}}}),getDocument:qx.core.Variant.select(e,{"mshtml":function(o){try{var p=this.getWindow(o);return p?p.document:null;}catch(q){return null;}},"default":function(r){try{return r.contentDocument;}catch(s){return null;}}}),getBody:function(t){try{var u=this.getDocument(t);return u?u.getElementsByTagName(c)[0]:null;}catch(v){return null;}},setSource:function(w,x){try{if(this.getWindow(w)&&qx.dom.Hierarchy.isRendered(w)){try{if(qx.core.Variant.isSet(e,d)&&qx.bom.client.Platform.MAC){var y=this.getContentWindow();if(y){y.stop();}}this.getWindow(w).location.replace(x);}catch(z){w.src=x;}}else{w.src=x;}}catch(A){qx.log.Logger.warn("Iframe source could not be set!");}},queryCurrentUrl:function(B){var C=this.getDocument(B);try{if(C&&C.location){return C.location.href;}}catch(D){}return null;}}});})();(function(){var a="qx.dom.Element";qx.Class.define(a,{statics:{hasChild:function(parent,b){return b.parentNode===parent;},hasChildren:function(c){return !!c.firstChild;},hasChildElements:function(d){d=d.firstChild;while(d){if(d.nodeType===1){return true;}d=d.nextSibling;}return false;},getParentElement:function(e){return e.parentNode;},isInDom:function(f,g){if(!g){g=window;}var h=g.document.getElementsByTagName(f.nodeName);for(var i=0,l=h.length;i<l;i++){if(h[i]===f){return true;}}return false;},insertAt:function(j,parent,k){var m=parent.childNodes[k];if(m){parent.insertBefore(j,m);}else{parent.appendChild(j);}return true;},insertBegin:function(n,parent){if(parent.firstChild){this.insertBefore(n,parent.firstChild);}else{parent.appendChild(n);}},insertEnd:function(o,parent){parent.appendChild(o);},insertBefore:function(p,q){q.parentNode.insertBefore(p,q);return true;},insertAfter:function(r,s){var parent=s.parentNode;if(s==parent.lastChild){parent.appendChild(r);}else{return this.insertBefore(r,s.nextSibling);}return true;},remove:function(t){if(!t.parentNode){return false;}t.parentNode.removeChild(t);return true;},removeChild:function(u,parent){if(u.parentNode!==parent){return false;}parent.removeChild(u);return true;},removeChildAt:function(v,parent){var w=parent.childNodes[v];if(!w){return false;}parent.removeChild(w);return true;},replaceChild:function(x,y){if(!y.parentNode){return false;}y.parentNode.replaceChild(x,y);return true;},replaceAt:function(z,A,parent){var B=parent.childNodes[A];if(!B){return false;}parent.replaceChild(z,B);return true;}}});})();(function(){var r="&",q="=",p="?",o="application/json",n="completed",m="text/plain",l="text/javascript",k="qx.io.remote.transport.Script",j="",h="_ScriptTransport_data",c="script",g="timeout",f="_ScriptTransport_",b="_ScriptTransport_id",a="aborted",e="utf-8",d="failed";qx.Class.define(k,{extend:qx.io.remote.transport.Abstract,construct:function(){qx.io.remote.transport.Abstract.call(this);var s=++qx.io.remote.transport.Script.__pg;if(s>=2000000000){qx.io.remote.transport.Script.__pg=s=1;}this.__ph=null;this.__pg=s;},statics:{__pg:0,_instanceRegistry:{},ScriptTransport_PREFIX:f,ScriptTransport_ID_PARAM:b,ScriptTransport_DATA_PARAM:h,handles:{synchronous:false,asynchronous:true,crossDomain:true,fileUpload:false,programaticFormFields:false,responseTypes:[m,l,o]},isSupported:function(){return true;},_numericMap:{"uninitialized":1,"loading":2,"loaded":2,"interactive":3,"complete":4},_requestFinished:qx.event.GlobalError.observeMethod(function(t,content){var u=qx.io.remote.transport.Script._instanceRegistry[t];if(u==null){{};}else{u._responseContent=content;u._switchReadyState(qx.io.remote.transport.Script._numericMap.complete);}})},members:{__pi:0,__ph:null,__pg:null,send:function(){var x=this.getUrl();x+=(x.indexOf(p)>=0?r:p)+qx.io.remote.transport.Script.ScriptTransport_ID_PARAM+q+this.__pg;var A=this.getParameters();var z=[];for(var w in A){if(w.indexOf(qx.io.remote.transport.Script.ScriptTransport_PREFIX)==0){this.error("Illegal parameter name. The following prefix is used internally by qooxdoo): "+qx.io.remote.transport.Script.ScriptTransport_PREFIX);}var y=A[w];if(y instanceof Array){for(var i=0;i<y.length;i++){z.push(encodeURIComponent(w)+q+encodeURIComponent(y[i]));}}else{z.push(encodeURIComponent(w)+q+encodeURIComponent(y));}}if(z.length>0){x+=r+z.join(r);}var v=this.getData();if(v!=null){x+=r+qx.io.remote.transport.Script.ScriptTransport_DATA_PARAM+q+encodeURIComponent(v);}qx.io.remote.transport.Script._instanceRegistry[this.__pg]=this;this.__ph=document.createElement(c);this.__ph.charset=e;this.__ph.src=x;{};document.body.appendChild(this.__ph);},_switchReadyState:function(B){switch(this.getState()){case n:case a:case d:case g:this.warn("Ignore Ready State Change");return;}while(this.__pi<B){this.setState(qx.io.remote.Exchange._nativeMap[++this.__pi]);}},setRequestHeader:function(C,D){},getResponseHeader:function(E){return null;},getResponseHeaders:function(){return {};},getStatusCode:function(){return 200;},getStatusText:function(){return j;},getFetchedLength:function(){return 0;},getResponseContent:function(){if(this.getState()!==n){{};return null;}{};switch(this.getResponseType()){case m:case o:case l:{};var F=this._responseContent;return (F===0?0:(F||null));default:this.warn("No valid responseType specified ("+this.getResponseType()+")!");return null;}}},defer:function(){qx.io.remote.Exchange.registerType(qx.io.remote.transport.Script,k);},destruct:function(){if(this.__ph){delete qx.io.remote.transport.Script._instanceRegistry[this.__pg];document.body.removeChild(this.__ph);}this.__ph=this._responseContent=null;}});})();(function(){var m="failed",k="completed",j="=",h="aborted",g="",f="sending",d="&",c="configured",b="timeout",a="application/xml",J="qx.io.remote.transport.XmlHttp",I="application/json",H="text/html",G="qx.client",F="receiving",E="text/plain",D="text/javascript",C="?",B="created",A="Boolean",u='Referer',v='Basic ',r="\n</pre>",t="string",p='Authorization',q="<pre>Could not execute json: \n",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=':',w="parseerror",x="file:",z="webkit",y="object";qx.Class.define(J,{extend:qx.io.remote.transport.Abstract,statics:{handles:{synchronous:true,asynchronous:true,crossDomain:false,fileUpload:false,programaticFormFields:false,responseTypes:[E,D,I,a,H]},requestObjects:[],requestObjectCount:0,createRequestObject:qx.core.Variant.select(G,{"default":function(){return new XMLHttpRequest;},"mshtml":function(){if(window.ActiveXObject&&qx.xml.Document.XMLHTTP){return new ActiveXObject(qx.xml.Document.XMLHTTP);}if(window.XMLHttpRequest){return new XMLHttpRequest;}}}),isSupported:function(){return !!this.createRequestObject();}},properties:{parseJson:{check:A,init:true}},members:{__nh:false,__ni:0,__nj:null,getRequest:function(){if(this.__nj===null){this.__nj=qx.io.remote.transport.XmlHttp.createRequestObject();this.__nj.onreadystatechange=qx.lang.Function.bind(this._onreadystatechange,this);}return this.__nj;},send:function(){this.__ni=0;var O=this.getRequest();var K=this.getMethod();var R=this.getAsynchronous();var Q=this.getUrl();var M=(window.location.protocol===x&&!(/^http(s){0,1}\:/.test(Q)));this.__nh=M;var U=this.getParameters(false);var S=[];for(var L in U){var P=U[L];if(P instanceof Array){for(var i=0;i<P.length;i++){S.push(encodeURIComponent(L)+j+encodeURIComponent(P[i]));}}else{S.push(encodeURIComponent(L)+j+encodeURIComponent(P));}}if(S.length>0){Q+=(Q.indexOf(C)>=0?d:C)+S.join(d);}if(this.getData()===null){var U=this.getParameters(true);var S=[];for(var L in U){var P=U[L];if(P instanceof Array){for(var i=0;i<P.length;i++){S.push(encodeURIComponent(L)+j+encodeURIComponent(P[i]));}}else{S.push(encodeURIComponent(L)+j+encodeURIComponent(P));}}if(S.length>0){this.setData(S.join(d));}}var T=function(V){var bb=n;var bf=g;var Y,X,W;var bc,bd,be,ba;var i=0;do{Y=V.charCodeAt(i++);X=V.charCodeAt(i++);W=V.charCodeAt(i++);bc=Y>>2;bd=((Y&3)<<4)|(X>>4);be=((X&15)<<2)|(W>>6);ba=W&63;if(isNaN(X)){be=ba=64;}else if(isNaN(W)){ba=64;}bf+=bb.charAt(bc)+bb.charAt(bd)+bb.charAt(be)+bb.charAt(ba);}while(i<V.length);return bf;};try{if(this.getUsername()){if(this.getUseBasicHttpAuth()){O.open(K,Q,R);O.setRequestHeader(p,v+T(this.getUsername()+o+this.getPassword()));}else{O.open(K,Q,R,this.getUsername(),this.getPassword());}}else{O.open(K,Q,R);}}catch(bg){this.error("Failed with exception: "+bg);this.failed();return;}if(!qx.core.Variant.isSet(G,z)){O.setRequestHeader(u,window.location.href);}var N=this.getRequestHeaders();for(var L in N){O.setRequestHeader(L,N[L]);}try{{};O.send(this.getData());}catch(bh){if(M){this.failedLocally();}else{this.error("Failed to send data: "+bh,"send");this.failed();}return;}if(!R){this._onreadystatechange();}},failedLocally:function(){if(this.getState()===m){return;}this.warn("Could not load from file: "+this.getUrl());this.failed();},_onreadystatechange:qx.event.GlobalError.observeMethod(function(e){switch(this.getState()){case k:case h:case m:case b:{};return;}var bi=this.getReadyState();if(bi==4){if(!qx.io.remote.Exchange.wasSuccessful(this.getStatusCode(),bi,this.__nh)){if(this.getState()===c){this.setState(f);}this.failed();return;}}while(this.__ni<bi){this.setState(qx.io.remote.Exchange._nativeMap[++this.__ni]);}}),getReadyState:function(){var bj=null;try{bj=this.getRequest().readyState;}catch(bk){}return bj;},setRequestHeader:function(bl,bm){this.getRequestHeaders()[bl]=bm;},getResponseHeader:function(bn){var bo=null;try{bo=this.getRequest().getResponseHeader(bn)||null;}catch(bp){}return bo;},getStringResponseHeaders:function(){var br=null;try{var bq=this.getRequest().getAllResponseHeaders();if(bq){br=bq;}}catch(bs){}return br;},getResponseHeaders:function(){var bv=this.getStringResponseHeaders();var bw={};if(bv){var bt=bv.split(/[\r\n]+/g);for(var i=0,l=bt.length;i<l;i++){var bu=bt[i].match(/^([^:]+)\s*:\s*(.+)$/i);if(bu){bw[bu[1]]=bu[2];}}}return bw;},getStatusCode:function(){var bx=-1;try{bx=this.getRequest().status;}catch(by){}return bx;},getStatusText:function(){var bz=g;try{bz=this.getRequest().statusText;}catch(bA){}return bz;},getResponseText:function(){var bB=null;try{bB=this.getRequest().responseText;}catch(bC){bB=null;}return bB;},getResponseXml:function(){var bF=null;var bD=this.getStatusCode();var bE=this.getReadyState();if(qx.io.remote.Exchange.wasSuccessful(bD,bE,this.__nh)){try{bF=this.getRequest().responseXML;}catch(bG){}}if(typeof bF==y&&bF!=null){if(!bF.documentElement){var s=String(this.getRequest().responseText).replace(/<\?xml[^\?]*\?>/,g);bF.loadXML(s);}if(!bF.documentElement){throw new Error("Missing Document Element!");}if(bF.documentElement.tagName==w){throw new Error("XML-File is not well-formed!");}}else{throw new Error("Response was not a valid xml document ["+this.getRequest().responseText+"]");}return bF;},getFetchedLength:function(){var bH=this.getResponseText();return typeof bH==t?bH.length:0;},getResponseContent:function(){var bI=this.getState();if(bI!==k&&bI!=m){{};return null;}{};var bK=this.getResponseText();if(bI==m){{};return bK;}switch(this.getResponseType()){case E:case H:{};return bK;case I:{};try{if(bK&&bK.length>0){var bJ;if(this.getParseJson()){bJ=qx.util.Json.parse(bK,false);bJ=(bJ===0?0:(bJ||null));}else{bJ=bK;}return bJ;}else{return null;}}catch(bL){this.error("Could not execute json: ["+bK+"]",bL);return q+bK+r;}case D:{};try{if(bK&&bK.length>0){var bJ=window.eval(bK);return (bJ===0?0:(bJ||null));}else{return null;}}catch(bM){this.error("Could not execute javascript: ["+bK+"]",bM);return null;}case a:bK=this.getResponseXml();{};return (bK===0?0:(bK||null));default:this.warn("No valid responseType specified ("+this.getResponseType()+")!");return null;}},_applyState:function(bN,bO){{};switch(bN){case B:this.fireEvent(B);break;case c:this.fireEvent(c);break;case f:this.fireEvent(f);break;case F:this.fireEvent(F);break;case k:this.fireEvent(k);break;case m:this.fireEvent(m);break;case h:this.getRequest().abort();this.fireEvent(h);break;case b:this.getRequest().abort();this.fireEvent(b);break;}}},defer:function(){qx.io.remote.Exchange.registerType(qx.io.remote.transport.XmlHttp,J);},destruct:function(){var bP=this.getRequest();if(bP){bP.onreadystatechange=qx.lang.Function.empty;switch(bP.readyState){case 1:case 2:case 3:bP.abort();}}this.__nj=null;}});})();(function(){var c="Integer",b="Object",a="qx.io.remote.Response";qx.Class.define(a,{extend:qx.event.type.Event,properties:{state:{check:c,nullable:true},statusCode:{check:c,nullable:true},content:{nullable:true},responseHeaders:{check:b,nullable:true}},members:{clone:function(d){var e=qx.event.type.Event.prototype.clone.call(this,d);e.setType(this.getType());e.setState(this.getState());e.setStatusCode(this.getStatusCode());e.setContent(this.getContent());e.setResponseHeaders(this.getResponseHeaders());return e;},getResponseHeader:function(f){var g=this.getResponseHeaders();if(g){return g[f]||null;}return null;}}});})();(function(){var b="pane",a="qx.ui.container.Scroll";qx.Class.define(a,{extend:qx.ui.core.scroll.AbstractScrollArea,include:[qx.ui.core.MContentPadding],construct:function(content){qx.ui.core.scroll.AbstractScrollArea.call(this);if(content){this.add(content);}},members:{add:function(c){this.getChildControl(b).add(c);},remove:function(d){this.getChildControl(b).remove(d);},getChildren:function(){return this.getChildControl(b).getChildren();},_getContentPaddingTarget:function(){return this.getChildControl(b);}}});})();(function(){var k="legendview-label-important",j="Package/Class/Mixin/Interface is not fully documented",h="ICON_PROPERTY_PUB",g="Themeable Property",f="Child Control",e="ICON_CLASS_SINGLETON",d="Public Property",c="Private Method",b="Public Method",a="ICON_CHILDCONTROL",bd="string",bc="ICON_INTERFACE",bb='<span style="text-decoration: line-through;color: #7193b9;">deprecated</span>',ba="center",Y="ICON_EVENT",X="apiviewer.ui.LegendView",W="Singleton Class",V="Private Property",U="OVERLAY_WARN",T="ICON_PACKAGE",r="Method/Property/Event is inherited from one of the super classes",s="legend",p="ICON_PROPERTY_PRIV",q="middle",n="ICON_BLANK",o="__Tb",l="ICON_PROPERTY_PROT",m="ICON_CLASS_ABSTRACT",v="ICON_CLASS",w="ICON_PROPERTY_PUB_THEMEABLE",E="Protected Method",C="Constant",L="Method/Property/Event is not fully documented",G="OVERLAY_OVERRIDDEN",P="Abstract Class",N="OVERLAY_MIXIN",y="Class",S="Interface",R="ICON_METHOD_PUB",Q="Event",x="Mixin",A="Package",B="Protected Property",D="OVERLAY_ERROR",F="ICON_MIXIN",H="legendview-label",M="ICON_CLASS_STATIC",O="Method/Property overrides the Method/Property of the super class",t="ICON_METHOD_PRIV",u="Static Class",z="Method/Property is included from a mixin",K="ICON_METHOD_PROT",J="OVERLAY_INHERITED",I="ICON_CONSTANT";qx.Class.define(X,{extend:qx.ui.container.Scroll,construct:function(){qx.ui.container.Scroll.call(this);this.setAppearance(s);var be=new qx.ui.layout.Grid(10,10);be.setColumnWidth(1,150);be.setColumnFlex(1,1);var content=new qx.ui.container.Composite(be);this.__Tb=[{icon:T,desc:A},{icon:v,desc:y},{icon:M,desc:u},{icon:m,desc:P},{icon:e,desc:W},{icon:bc,desc:S},{icon:F,desc:x},{icon:a,desc:f},{icon:R,desc:b},{icon:K,desc:E},{icon:t,desc:c},{icon:h,desc:d},{icon:l,desc:B},{icon:p,desc:V},{icon:w,desc:g},{icon:Y,desc:Q},{icon:I,desc:C},{icon:n,desc:bb},{icon:U,desc:j},{icon:D,desc:L},{icon:N,desc:z},{icon:J,desc:r},{icon:G,desc:O}];var length=this.__Tb.length;var bg,bf;for(var i=0;i<length;i++){bg=this.__Tb[i];bf=apiviewer.TreeUtil.iconNameToIconPath(bg.icon);if(typeof (bf)!=bd){bf=bf[0];}content.add(new qx.ui.basic.Image(bf).set({alignX:ba,alignY:q}),{row:i,column:0});content.add(new qx.ui.basic.Label(bg.desc).set({rich:true,appearance:(i<17)?k:H}),{row:i,column:1});}this.add(content);},members:{__Tb:null},destruct:function(){this._disposeMap(o);}});})();(function(){var d="_applyDynamic",c="changeSelection",b="Boolean",a="qx.ui.container.Stack";qx.Class.define(a,{extend:qx.ui.core.Widget,implement:qx.ui.core.ISingleSelection,include:qx.ui.core.MSingleSelectionHandling,construct:function(){qx.ui.core.Widget.call(this);this._setLayout(new qx.ui.layout.Grow);this.addListener(c,this.__nu,this);},properties:{dynamic:{check:b,init:false,apply:d}},members:{_applyDynamic:function(f){var h=this._getChildren();var g=this.getSelection()[0];var j;for(var i=0,l=h.length;i<l;i++){j=h[i];if(j!=g){if(f){h[i].exclude();}else{h[i].hide();}}}},_getItems:function(){return this.getChildren();},_isAllowEmptySelection:function(){return true;},_isItemSelectable:function(k){return true;},__nu:function(e){var m=e.getOldData()[0];var n=e.getData()[0];if(m){if(this.isDynamic()){m.exclude();}else{m.hide();}}if(n){n.show();}},add:function(o){this._add(o);var p=this.getSelection()[0];if(!p){this.setSelection([o]);}else if(p!==o){if(this.isDynamic()){o.exclude();}else{o.hide();}}},remove:function(q){this._remove(q);if(this.getSelection()[0]===q){var r=this._getChildren()[0];if(r){this.setSelection([r]);}else{this.resetSelection();}}},indexOf:function(s){return this._indexOf(s);},getChildren:function(){return this._getChildren();},previous:function(){var v=this.getSelection()[0];var t=this._indexOf(v)-1;var w=this._getChildren();if(t<0){t=w.length-1;}var u=w[t];this.setSelection([u]);},next:function(){var y=this.getSelection()[0];var x=this._indexOf(y)+1;var z=this._getChildren();var A=z[x]||z[0];this.setSelection([A]);}}});})();(function(){var k="pressed",j="abandoned",i="hovered",h="Boolean",g="Space",f="undetermined",d="Enter",c="checked",b="mousedown",a="_applyTriState",w="mouseout",v="changeValue",u="keydown",t="_applyGroup",s="button",r="execute",q="qx.ui.form.RadioGroup",p="_applyValue",o="qx.ui.form.ToggleButton",n="mouseover",l="keyup",m="mouseup";qx.Class.define(o,{extend:qx.ui.basic.Atom,include:[qx.ui.core.MExecutable],implement:[qx.ui.form.IBooleanForm,qx.ui.form.IExecutable,qx.ui.form.IRadioItem],construct:function(x,y){qx.ui.basic.Atom.call(this,x,y);this.addListener(n,this._onMouseOver);this.addListener(w,this._onMouseOut);this.addListener(b,this._onMouseDown);this.addListener(m,this._onMouseUp);this.addListener(u,this._onKeyDown);this.addListener(l,this._onKeyUp);this.addListener(r,this._onExecute,this);},properties:{appearance:{refine:true,init:s},focusable:{refine:true,init:true},value:{check:h,nullable:true,event:v,apply:p,init:false},group:{check:q,nullable:true,apply:t},triState:{check:h,apply:a,nullable:true,init:null}},members:{_applyGroup:function(z,A){if(A){A.remove(this);}if(z){z.add(this);}},_applyValue:function(B,C){B?this.addState(c):this.removeState(c);if(this.isTriState()){if(B===null){this.addState(f);}else if(C===null){this.removeState(f);}}},_applyTriState:function(D,E){this._applyValue(this.getValue());},_onExecute:function(e){this.toggleValue();},_onMouseOver:function(e){if(e.getTarget()!==this){return;}this.addState(i);if(this.hasState(j)){this.removeState(j);this.addState(k);}},_onMouseOut:function(e){if(e.getTarget()!==this){return;}this.removeState(i);if(this.hasState(k)){if(!this.getValue()){this.removeState(k);}this.addState(j);}},_onMouseDown:function(e){if(!e.isLeftPressed()){return;}this.capture();this.removeState(j);this.addState(k);e.stopPropagation();},_onMouseUp:function(e){this.releaseCapture();if(this.hasState(j)){this.removeState(j);}else if(this.hasState(k)){this.execute();}this.removeState(k);e.stopPropagation();},_onKeyDown:function(e){switch(e.getKeyIdentifier()){case d:case g:this.removeState(j);this.addState(k);e.stopPropagation();}},_onKeyUp:function(e){if(!this.hasState(k)){return;}switch(e.getKeyIdentifier()){case d:case g:this.removeState(j);this.execute();this.removeState(k);e.stopPropagation();}}}});})();(function(){var e="inherit",d="toolbar-button",c="qx.ui.toolbar.CheckBox",b="keydown",a="keyup";qx.Class.define(c,{extend:qx.ui.form.ToggleButton,construct:function(f,g){qx.ui.form.ToggleButton.call(this,f,g);this.removeListener(b,this._onKeyDown);this.removeListener(a,this._onKeyUp);},properties:{appearance:{refine:true,init:d},show:{refine:true,init:e},focusable:{refine:true,init:false}}});})();(function(){var a="qx.ui.toolbar.RadioButton";qx.Class.define(a,{extend:qx.ui.toolbar.CheckBox,include:[qx.ui.form.MModelProperty],implement:[qx.ui.form.IModel,qx.ui.form.IRadioItem],members:{_applyValue:function(b,c){qx.ui.toolbar.CheckBox.prototype._applyValue.call(this,b,c);if(b){var d=this.getGroup();if(d){d.setSelection([this]);}}},_onExecute:function(e){var f=this.getGroup();if(f&&f.getAllowEmptySelection()||!f){this.toggleValue();}else{this.setValue(true);}}}});})();(function(){var e="arrow",d="qx.ui.toolbar.MenuButton",c="Boolean",b="_applyShowArrow",a="toolbar-menubutton";qx.Class.define(d,{extend:qx.ui.menubar.Button,properties:{appearance:{refine:true,init:a},showArrow:{check:c,init:false,themeable:true,apply:b}},members:{_createChildControlImpl:function(f,g){var h;switch(f){case e:h=new qx.ui.basic.Image();h.setAnonymous(true);this._addAt(h,10);break;}return h||qx.ui.menubar.Button.prototype._createChildControlImpl.call(this,f);},_applyShowArrow:function(i,j){if(i){this._showChildControl(e);}else{this._excludeChildControl(e);}}}});})();(function(){var j="checked",i="qx.ui.form.RadioGroup",h="Boolean",g="menu-radiobutton",f="_applyValue",d="qx.ui.menu.RadioButton",c="changeValue",b="_applyGroup",a="execute";qx.Class.define(d,{extend:qx.ui.menu.AbstractButton,include:[qx.ui.form.MModelProperty],implement:[qx.ui.form.IRadioItem,qx.ui.form.IBooleanForm,qx.ui.form.IModel],construct:function(k,l){qx.ui.menu.AbstractButton.call(this);if(k!=null){this.setLabel(k);}if(l!=null){this.setMenu(l);}this.addListener(a,this._onExecute,this);},properties:{appearance:{refine:true,init:g},value:{check:h,nullable:true,event:c,apply:f,init:false},group:{check:i,nullable:true,apply:b}},members:{_applyValue:function(m,n){m?this.addState(j):this.removeState(j);},_applyGroup:function(o,p){if(p){p.remove(this);}if(o){o.add(this);}},_onExecute:function(e){this.setValue(true);},_onMouseUp:function(e){if(e.isLeftPressed()){this.execute();}qx.ui.menu.Manager.getInstance().hideAll();},_onKeyPress:function(e){this.execute();}}});})();(function(){var x="pane",w="lastTab",v="page",u="bar",t="firstTab",s="right",r="button",q="bottom",p="left",o="close",f="top",n="changeSelection",j="tabview",c="vertical",b="horizontal",h="_applyBarPosition",g="beforeChangeSelection",k="__DQ",a="qx.ui.tabview.TabView",m="close-button",d="qx.event.type.Data";qx.Class.define(a,{extend:qx.ui.core.Widget,implement:qx.ui.core.ISingleSelection,include:[qx.ui.core.MContentPadding],construct:function(y){qx.ui.core.Widget.call(this);this.__DP={top:"barTop",right:"barRight",bottom:"barBottom",left:"barLeft"};this._createChildControl(u);this._createChildControl(x);var z=this.__DQ=new qx.ui.form.RadioGroup;z.setWrap(false);z.addListener(n,this._onChangeSelection,this);if(y!=null){this.setBarPosition(y);}else{this.initBarPosition();}},events:{"changeSelection":d},properties:{appearance:{refine:true,init:j},barPosition:{check:[p,s,f,q],init:f,apply:h}},members:{__DQ:null,_createChildControlImpl:function(A,B){var C;switch(A){case u:C=new qx.ui.container.SlideBar();C.setZIndex(10);this._add(C);break;case x:C=new qx.ui.container.Stack;C.setZIndex(5);this._add(C,{flex:1});break;}return C||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,A);},_getContentPaddingTarget:function(){return this.getChildControl(x);},add:function(D){{};var E=D.getButton();var F=this.getChildControl(u);var H=this.getChildControl(x);D.exclude();F.add(E);H.add(D);this.__DQ.add(E);D.addState(this.__DP[this.getBarPosition()]);D.addState(w);var G=this.getChildren();if(G[0]==D){D.addState(t);}else{G[G.length-2].removeState(w);}D.addListener(o,this._onPageClose,this);},remove:function(I){var N=this.getChildControl(x);var L=this.getChildControl(u);var K=I.getButton();var M=N.getChildren();if(this.getSelection()[0]==I){var J=M.indexOf(I);if(J==0){if(M[1]){this.setSelection([M[1]]);}else{this.resetSelection();}}else{this.setSelection([M[J-1]]);}}L.remove(K);N.remove(I);this.__DQ.remove(K);I.removeState(this.__DP[this.getBarPosition()]);if(I.hasState(t)){I.removeState(t);if(M[0]){M[0].addState(t);}}if(I.hasState(w)){I.removeState(w);if(M.length>0){M[M.length-1].addState(w);}}I.removeListener(o,this._onPageClose,this);},getChildren:function(){return this.getChildControl(x).getChildren();},indexOf:function(O){return this.getChildControl(x).indexOf(O);},__DP:null,_applyBarPosition:function(P,Q){var R=this.getChildControl(u);var W=P==p||P==s;var U=P==s||P==q;var V=W?qx.ui.layout.HBox:qx.ui.layout.VBox;var Y=this._getLayout();if(Y&&Y instanceof V){}else{this._setLayout(Y=new V);}Y.setReversed(U);R.setOrientation(W?c:b);var X=this.getChildren();if(Q){var S=this.__DP[Q];R.removeState(S);for(var i=0,l=X.length;i<l;i++){X[i].removeState(S);}}if(P){var T=this.__DP[P];R.addState(T);for(var i=0,l=X.length;i<l;i++){X[i].addState(T);}}},getSelection:function(){var ba=this.__DQ.getSelection();var bb=[];for(var i=0;i<ba.length;i++){bb.push(ba[i].getUserData(v));}return bb;},setSelection:function(bc){var bd=[];for(var i=0;i<bc.length;i++){bd.push(bc[i].getChildControl(r));}this.__DQ.setSelection(bd);},resetSelection:function(){this.__DQ.resetSelection();},isSelected:function(be){var bf=be.getChildControl(r);return this.__DQ.isSelected(bf);},isSelectionEmpty:function(){return this.__DQ.isSelectionEmpty();},getSelectables:function(bg){var bh=this.__DQ.getSelectables(bg);var bi=[];for(var i=0;i<bh.length;i++){bi.push(bh[i].getUserData(v));}return bi;},_onChangeSelection:function(e){var bn=this.getChildControl(x);var bk=e.getData()[0];var bm=e.getOldData()[0];var bj=[];var bl=[];if(bk){bj=[bk.getUserData(v)];bn.setSelection(bj);bk.focus();this.scrollChildIntoView(bk,null,null,false);}else{bn.resetSelection();}if(bm){bl=[bm.getUserData(v)];}this.fireDataEvent(n,bj,bl);},_onBeforeChangeSelection:function(e){if(!this.fireNonBubblingEvent(g,qx.event.type.Event,[false,true])){e.preventDefault();}},_onRadioChangeSelection:function(e){var bo=e.getData()[0];if(bo){this.setSelection([bo.getUserData(v)]);}else{this.resetSelection();}},_onPageClose:function(e){var bq=e.getTarget();var bp=bq.getButton().getChildControl(m);bp.reset();this.remove(bq);}},destruct:function(){this._disposeObjects(k);this.__DP=null;}});})();(function(){var k="slider",j="splitter",i="horizontal",h="px",g="vertical",f="knob",d="mousedown",c="mouseout",b="Integer",a="height",D="mousemove",C="move",B="maxHeight",A="resize",z="width",w="_applyOrientation",v="_applyOffset",u="splitpane",t="qx.ui.splitpane.Pane",s="top",q="minHeight",r="mouseup",o="minWidth",p="appear",m="losecapture",n="left",l="maxWidth";qx.Class.define(t,{extend:qx.ui.core.Widget,construct:function(E){qx.ui.core.Widget.call(this);this.__mT=[];if(E){this.setOrientation(E);}else{this.initOrientation();}this.__nc.addListener(d,this._onMouseDown,this);this.__nc.addListener(r,this._onMouseUp,this);this.__nc.addListener(D,this._onMouseMove,this);this.__nc.addListener(c,this._onMouseOut,this);this.__nc.addListener(m,this._onMouseUp,this);},properties:{appearance:{refine:true,init:u},offset:{check:b,init:6,apply:v},orientation:{init:i,check:[i,g],apply:w}},members:{__mU:null,__mV:false,__mW:null,__mX:null,__mY:null,__na:null,__nb:null,__mT:null,__nc:null,_createChildControlImpl:function(F,G){var H;switch(F){case k:H=new qx.ui.splitpane.Slider(this);H.exclude();this._add(H,{type:F});break;case j:H=new qx.ui.splitpane.Splitter(this);this._add(H,{type:F});H.addListener(C,this.__nd,this);break;}return H||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,F);},__nd:function(e){this.__nf(e.getData());},__ne:function(I){this.__nc=new qx.ui.splitpane.Blocker(I);this.getContentElement().add(this.__nc);var J=this.getChildControl(j);var K=J.getWidth();if(!K){J.addListenerOnce(p,function(){this.__nf();},this);}J.addListener(A,function(e){var L=e.getData();if(L.height==0||L.width==0){this.__nc.hide();}else{this.__nc.show();}},this);},getBlocker:function(){return this.__nc;},_applyOrientation:function(M,N){var O=this.getChildControl(k);var R=this.getChildControl(j);this.__mY=M===i;if(!this.__nc){this.__ne(M);}this.__nc.setOrientation(M);var Q=this._getLayout();if(Q){Q.dispose();}var P=M===g?new qx.ui.splitpane.VLayout:new qx.ui.splitpane.HLayout;this._setLayout(P);R.removeState(N);R.addState(M);R.getChildControl(f).removeState(N);R.getChildControl(f).addState(M);O.removeState(N);O.addState(M);qx.ui.core.queue.Manager.flush();this.__nf();},_applyOffset:function(S,T){this.__nf();},__nf:function(U){var V=this.getChildControl(j);var ba=this.getOffset();var bb=V.getBounds();var Y=V.getContainerElement().getDomElement();if(!Y){return;}if(this.__mY){var X=null;if(U){X=U.width;}else if(bb){X=bb.width;}var bc=U&&U.left;if(X){if(!bc){bc=qx.bom.element.Location.getPosition(Y).left;}this.__nc.setWidth(ba,X);this.__nc.setLeft(ba,bc);}}else{var W=null;if(U){W=U.height;}else if(bb){W=bb.height;}var top=U&&U.top;if(W){if(!top){top=qx.bom.element.Location.getPosition(Y).top;}this.__nc.setHeight(ba,W);this.__nc.setTop(ba,top);}}},add:function(bd,be){if(be==null){this._add(bd);}else{this._add(bd,{flex:be});}this.__mT.push(bd);},remove:function(bf){this._remove(bf);qx.lang.Array.remove(this.__mT,bf);},getChildren:function(){return this.__mT;},_onMouseDown:function(e){if(!e.isLeftPressed()){return;}var bg=this.getChildControl(j);var bi=bg.getContainerLocation();var bh=this.getContentLocation();this.__mU=this.__mY?e.getDocumentLeft()-bi.left+bh.left:e.getDocumentTop()-bi.top+bh.top;var bk=this.getChildControl(k);var bj=bg.getBounds();bk.setUserBounds(bj.left,bj.top,bj.width,bj.height);bk.setZIndex(bg.getZIndex()+1);bk.show();this.__mV=true;this.__nc.capture();e.stop();},_onMouseMove:function(e){this._setLastMousePosition(e.getDocumentLeft(),e.getDocumentTop());if(this.__mV){this.__ng();var bl=this.getChildControl(k);var bm=this.__na;if(this.__mY){bl.setDomLeft(bm);this.__nc.setStyle(n,(bm-this.getOffset())+h);}else{bl.setDomTop(bm);this.__nc.setStyle(s,(bm-this.getOffset())+h);}e.stop();}},_onMouseOut:function(e){this._setLastMousePosition(e.getDocumentLeft(),e.getDocumentTop());},_onMouseUp:function(e){if(!this.__mV){return;}this._finalizeSizes();var bn=this.getChildControl(k);bn.exclude();this.__mV=false;this.releaseCapture();e.stop();},_finalizeSizes:function(){var br=this.__na;var bo=this.__nb;if(br==null){return;}var bt=this._getChildren();var bs=bt[2];var bp=bt[3];var bq=bs.getLayoutProperties().flex;var bu=bp.getLayoutProperties().flex;if((bq!=0)&&(bu!=0)){bs.setLayoutProperties({flex:br});bp.setLayoutProperties({flex:bo});}else{if(this.__mY){bs.setWidth(br);bp.setWidth(bo);}else{bs.setHeight(br);bp.setHeight(bo);}}},__ng:function(){if(this.__mY){var bx=o,bE=z,by=l,bC=this.__mW;}else{var bx=q,bE=a,by=B,bC=this.__mX;}var bD=this._getChildren();var bv=bD[2].getSizeHint();var bA=bD[3].getSizeHint();var bB=bD[2].getBounds()[bE]+bD[3].getBounds()[bE];var bz=bC-this.__mU;var bw=bB-bz;if(bz<bv[bx]){bw-=bv[bx]-bz;bz=bv[bx];}else if(bw<bA[bx]){bz-=bA[bx]-bw;bw=bA[bx];}if(bz>bv[by]){bw+=bz-bv[by];bz=bv[by];}else if(bw>bA[by]){bz+=bw-bA[by];bw=bA[by];}this.__na=bz;this.__nb=bw;},_isActiveDragSession:function(){return this.__mV;},_setLastMousePosition:function(x,y){this.__mW=x;this.__mX=y;}},destruct:function(){this.__mT=null;}});})();(function(){var a="qx.ui.splitpane.Slider";qx.Class.define(a,{extend:qx.ui.core.Widget,properties:{allowShrinkX:{refine:true,init:false},allowShrinkY:{refine:true,init:false}}});})();(function(){var e="center",d="knob",c="middle",b="qx.ui.splitpane.Splitter",a="vertical";qx.Class.define(b,{extend:qx.ui.core.Widget,construct:function(f){qx.ui.core.Widget.call(this);if(f.getOrientation()==a){this._setLayout(new qx.ui.layout.HBox(0,e));this._getLayout().setAlignY(c);}else{this._setLayout(new qx.ui.layout.VBox(0,c));this._getLayout().setAlignX(e);}this._createChildControl(d);},properties:{allowShrinkX:{refine:true,init:false},allowShrinkY:{refine:true,init:false}},members:{_createChildControlImpl:function(g,h){var i;switch(g){case d:i=new qx.ui.basic.Image;this._add(i);break;}return i||qx.ui.core.Widget.prototype._createChildControlImpl.call(this,g);}}});})();(function(){var o="px",n="horizontal",m="top",l="height",k="width",j="left",i="100%",h="cursor",g="vertical",f="_applyOrientation",c="qx.ui.splitpane.Blocker",e="col-resize",d="row-resize",b="div",a="absolute";qx.Class.define(c,{extend:qx.html.Element,construct:function(p){var q={position:a,zIndex:11};qx.html.Element.call(this,b,q);if(p){this.setOrientation(p);}else{this.initOrientation();}},properties:{orientation:{init:n,check:[n,g],apply:f}},members:{_applyOrientation:function(r,s){if(r==n){this.setStyle(l,i);this.setStyle(h,e);this.setStyle(m,null);}else{this.setStyle(k,i);this.setStyle(j,null);this.setStyle(h,d);}},setWidth:function(t,u){var v=u+2*t;this.setStyle(k,v+o);},setHeight:function(w,x){var y=x+2*w;this.setStyle(l,y+o);},setLeft:function(z,A){var B=A-z;this.setStyle(j,B+o);},setTop:function(C,D){var top=D-C;this.setStyle(m,top+o);}}});})();(function(){var c="slider",b="splitter",a="qx.ui.splitpane.VLayout";qx.Class.define(a,{extend:qx.ui.layout.Abstract,members:{verifyLayoutProperty:null,renderLayout:function(d,e){var v=this._getLayoutChildren();var length=v.length;var r,u;var g,f,p,h;for(var i=0;i<length;i++){r=v[i];u=r.getLayoutProperties().type;if(u===b){f=r;}else if(u===c){p=r;}else if(!g){g=r;}else{h=r;}}if(g&&h){var x=g.getLayoutProperties().flex;var k=h.getLayoutProperties().flex;if(x==null){x=1;}if(k==null){k=1;}var w=g.getSizeHint();var n=f.getSizeHint();var o=h.getSizeHint();var j=w.height;var s=n.height;var t=o.height;if(x>0&&k>0){var l=x+k;var m=e-s;var j=Math.round((m/l)*x);var t=m-j;var q=qx.ui.layout.Util.arrangeIdeals(w.minHeight,j,w.maxHeight,o.minHeight,t,o.maxHeight);j=q.begin;t=q.end;}else if(x>0){j=e-s-t;if(j<w.minHeight){j=w.minHeight;}if(j>w.maxHeight){j=w.maxHeight;}}else if(k>0){t=e-j-s;if(t<o.minHeight){t=o.minHeight;}if(t>o.maxHeight){t=o.maxHeight;}}g.renderLayout(0,0,d,j);f.renderLayout(0,j,d,s);h.renderLayout(0,j+s,d,t);}else{f.renderLayout(0,0,0,0);if(g){g.renderLayout(0,0,d,e);}else if(h){h.renderLayout(0,0,d,e);}}},_computeSizeHint:function(){var H=this._getLayoutChildren();var length=H.length;var A,z,G;var B=0,D=0,C=0;var E=0,F=0,y=0;for(var i=0;i<length;i++){A=H[i];G=A.getLayoutProperties();if(G.type===c){continue;}z=A.getSizeHint();B+=z.minHeight;D+=z.height;C+=z.maxHeight;if(z.minWidth>E){E=z.minWidth;}if(z.width>F){F=z.width;}if(z.maxWidth>y){y=z.maxWidth;}}return {minHeight:B,height:D,maxHeight:C,minWidth:E,width:F,maxWidth:y};}}});})();(function(){var c="slider",b="splitter",a="qx.ui.splitpane.HLayout";qx.Class.define(a,{extend:qx.ui.layout.Abstract,members:{verifyLayoutProperty:null,renderLayout:function(d,e){var v=this._getLayoutChildren();var length=v.length;var s,u;var g,f,p,h;for(var i=0;i<length;i++){s=v[i];u=s.getLayoutProperties().type;if(u===b){f=s;}else if(u===c){p=s;}else if(!g){g=s;}else{h=s;}}if(g&&h){var x=g.getLayoutProperties().flex;var j=h.getLayoutProperties().flex;if(x==null){x=1;}if(j==null){j=1;}var w=g.getSizeHint();var m=f.getSizeHint();var o=h.getSizeHint();var t=w.width;var r=m.width;var q=o.width;if(x>0&&j>0){var k=x+j;var l=d-r;var t=Math.round((l/k)*x);var q=l-t;var n=qx.ui.layout.Util.arrangeIdeals(w.minWidth,t,w.maxWidth,o.minWidth,q,o.maxWidth);t=n.begin;q=n.end;}else if(x>0){t=d-r-q;if(t<w.minWidth){t=w.minWidth;}if(t>w.maxWidth){t=w.maxWidth;}}else if(j>0){q=d-t-r;if(q<o.minWidth){q=o.minWidth;}if(q>o.maxWidth){q=o.maxWidth;}}g.renderLayout(0,0,t,e);f.renderLayout(t,0,r,e);h.renderLayout(t+r,0,q,e);}else{f.renderLayout(0,0,0,0);if(g){g.renderLayout(0,0,d,e);}else if(h){h.renderLayout(0,0,d,e);}}},_computeSizeHint:function(){var H=this._getLayoutChildren();var length=H.length;var A,z,G;var E=0,F=0,y=0;var B=0,D=0,C=0;for(var i=0;i<length;i++){A=H[i];G=A.getLayoutProperties();if(G.type===c){continue;}z=A.getSizeHint();E+=z.minWidth;F+=z.width;y+=z.maxWidth;if(z.minHeight>B){B=z.minHeight;}if(z.height>D){D=z.height;}if(z.maxHeight>C){C=z.maxHeight;}}return {minWidth:E,width:F,maxWidth:y,minHeight:B,height:D,maxHeight:C};}}});})();(function(){var a="apiviewer.test.LayoutItem";qx.Class.define(a,{extend:qx.core.Object,members:{renderSeparator:function(b,c){}}});})();(function(){var p="other",o="widgets",n="fonts",m="appearances",k="qx.Theme",j="]",h="[Theme ",g="colors",f="decorations",e="Theme",b="meta",d="borders",c="icons";qx.Bootstrap.define(k,{statics:{define:function(name,q){if(!q){var q={};}q.include=this.__rg(q.include);q.patch=this.__rg(q.patch);{};var r={$$type:e,name:name,title:q.title,toString:this.genericToString};if(q.extend){r.supertheme=q.extend;}r.basename=qx.Bootstrap.createNamespace(name,r);this.__rj(r,q);this.__rh(r,q);this.$$registry[name]=r;for(var i=0,a=q.include,l=a.length;i<l;i++){this.include(r,a[i]);}for(var i=0,a=q.patch,l=a.length;i<l;i++){this.patch(r,a[i]);}},__rg:function(s){if(!s){return [];}if(qx.Bootstrap.isArray(s)){return s;}else{return [s];}},__rh:function(t,u){var v=u.aliases||{};if(u.extend&&u.extend.aliases){qx.Bootstrap.objectMergeWith(v,u.extend.aliases,false);}t.aliases=v;},getAll:function(){return this.$$registry;},getByName:function(name){return this.$$registry[name];},isDefined:function(name){return this.getByName(name)!==undefined;},getTotalNumber:function(){return qx.Bootstrap.objectGetLength(this.$$registry);},genericToString:function(){return h+this.name+j;},__ri:function(w){for(var i=0,x=this.__rk,l=x.length;i<l;i++){if(w[x[i]]){return x[i];}}},__rj:function(y,z){var C=this.__ri(z);if(z.extend&&!C){C=z.extend.type;}y.type=C||p;if(!C){return;}var E=function(){};if(z.extend){E.prototype=new z.extend.$$clazz;}var D=E.prototype;var B=z[C];for(var A in B){D[A]=B[A];if(D[A].base){{};D[A].base=z.extend;}}y.$$clazz=E;y[C]=new E;},$$registry:{},__rk:[g,d,f,n,c,o,m,b],__rl:null,__rm:null,__rn:function(){},patch:function(F,G){var I=this.__ri(G);if(I!==this.__ri(F)){throw new Error("The mixins '"+F.name+"' are not compatible '"+G.name+"'!");}var H=G[I];var J=F.$$clazz.prototype;for(var K in H){J[K]=H[K];}},include:function(L,M){var O=M.type;if(O!==L.type){throw new Error("The mixins '"+L.name+"' are not compatible '"+M.name+"'!");}var N=M[O];var P=L.$$clazz.prototype;for(var Q in N){if(P[Q]!==undefined){continue;}P[Q]=N[Q];}}}});})();(function(){var dN="button-frame",dM="atom",dL="widget",dK="main",dJ="button",dI="bold",dH="text-selected",dG="image",dF="middle",dE="selected",co="background-light",cn="cell",cm="text-disabled",cl="groupbox",ck="decoration/arrows/down.png",cj="label",ci="border-invalid",ch="input",cg="white",cf="input-disabled",dU="menu-button",dV="input-focused-invalid",dS="toolbar-button",dT="spinner",dQ="input-focused",dR="popup",dO="tooltip",dP="list",dW="tree-item",dX="treevirtual-contract",dk="scrollbar",dj="datechooser/nav-button",dm="text-hovered",dl="center",dp="treevirtual-expand",dn="textfield",dr="decoration/arrows/right.png",dq="background-application",di="radiobutton",dh="invalid",k="combobox",l="right-top",m="checkbox",n="text-title",o="icon/16/places/folder-open.png",p="qx/static/blank.gif",q="scrollbar/button",r="right",s="combobox/button",t="icon/16/places/folder.png",em="text-label",el="decoration/tree/closed.png",ek="scrollbar-slider-horizontal",ej="checkbox-checked",eq="decoration/arrows/left.png",ep="button-focused",eo="text-light",en="menu-slidebar-button",es="checkbox-undetermined",er="text-input",bm="slidebar/button-forward",bn="background-splitpane",bk=".png",bl="decoration/tree/open.png",bq="default",br="decoration/arrows/down-small.png",bo="datechooser",bp="slidebar/button-backward",bi="selectbox",bj="treevirtual-folder",N="shadow-popup",M="icon/16/mimetypes/office-document.png",P="background-medium",O="icon/32/places/folder-open.png",J="icon/22/places/folder-open.png",I="table",L="decoration/arrows/up.png",K="decoration/form/",H="",G="-invalid",bx="button-checked",by="decoration/window/maximize-active-hovered.png",bz="radiobutton-hovered",bA="keyboard-focus",bt="group-item",bu="decoration/cursors/",bv="slidebar",bw="tooltip-error-arrow",bB="table-scroller-focus-indicator",bC="move-frame",bb="nodrop",ba="decoration/table/boolean-true.png",Y="table-header-cell",X="menu",W="app-header",V="row-layer",U="text-inactive",T="move",bf="radiobutton-checked-focused",be="decoration/window/restore-active-hovered.png",bD="shadow-window",bE="table-column-button",bF="right.png",bG="checkbox-undetermined-hovered",bH="tabview-page-button-bottom-inactive",bI="tooltip-error",bJ="window-statusbar",bK="button-hovered",bL="decoration/scrollbar/scrollbar-",bM="background-tip",cw="scrollbar-slider-horizontal-disabled",cv="table-scroller-header",cu="button-pressed",ct="table-pane",cA="decoration/window/close-active.png",cz="native",cy="checkbox-hovered",cx="button-invalid-shadow",cE="decoration/window/minimize-active-hovered.png",cD="menubar",dc="icon/16/actions/dialog-cancel.png",dd="tabview-page-button-top-inactive",da="tabview-page-button-left-inactive",db="menu-slidebar",cX="toolbar-button-checked",cY="decoration/tree/open-selected.png",cV="radiobutton-checked",cW="decoration/window/minimize-inactive.png",de="icon/16/apps/office-calendar.png",df="group",dv="tabview-page-button-right-inactive",du="decoration/window/minimize-active.png",dx="decoration/window/restore-inactive.png",dw="checkbox-checked-focused",dz="splitpane",dy="combobox/textfield",dB="button-preselected-focused",dA="decoration/window/close-active-hovered.png",dt="qx/icon/Tango/16/actions/window-close.png",ds="checkbox-pressed",ef="button-disabled",eg="selected-dragover",eh="border-separator",ei="decoration/window/maximize-inactive.png",eb="dragover",ec="scrollarea",ed="scrollbar-vertical",ee="decoration/menu/checkbox-invert.gif",dY="decoration/toolbar/toolbar-handle-knob.gif",ea="icon/22/mimetypes/office-document.png",j="button-preselected",i="button-checked-focused",h="up.png",g="best-fit",f="decoration/tree/closed-selected.png",e="qx.theme.modern.Appearance",d="text-active",c="toolbar-button-hovered",b="progressive-table-header",a="decoration/table/select-column-order.png",w="decoration/menu/radiobutton.gif",x="decoration/arrows/forward.png",u="decoration/table/descending.png",v="progressbar",A="window-captionbar-active",B="checkbox-checked-hovered",y="scrollbar-slider-vertical",z="toolbar",D="alias",E="decoration/window/restore-active.png",cI="decoration/table/boolean-false.png",cC="icon/32/mimetypes/office-document.png",cP="radiobutton-checked-disabled",cL="tabview-pane",cr="decoration/arrows/rewind.png",cp="checkbox-focused",R="top",cs="icon/16/actions/dialog-ok.png",bd="radiobutton-checked-hovered",bc="table-header-cell-hovered",bW="window",bX="text-gray",bY="decoration/menu/radiobutton-invert.gif",ca="text-placeholder",cb="slider",cc="keep-align",cd="down.png",ce="tabview-page-button-top-active",bT="icon/22/places/folder.png",bU="decoration/window/maximize-active.png",cq="checkbox-checked-pressed",cO="decoration/window/close-inactive.png",cN="tabview-page-button-left-active",cM="toolbar-part",cT="decoration/splitpane/knob-vertical.png",cS=".gif",cR="radiobutton-checked-pressed",cQ="table-statusbar",cK="radiobutton-pressed",cJ="window-captionbar-inactive",C="copy",bh="radiobutton-focused",bg="decoration/arrows/down-invert.png",cB="decoration/menu/checkbox.gif",bs="decoration/splitpane/knob-horizontal.png",cH="icon/32/places/folder.png",cG="toolbar-separator",cF="tabview-page-button-bottom-active",Q="decoration/arrows/up-small.png",cU="decoration/table/ascending.png",F="decoration/arrows/up-invert.png",S="small",bN="tabview-page-button-right-active",bO="-disabled",bP="scrollbar-horizontal",bQ="checkbox-undetermined-focused",bR="progressive-table-header-cell",bS="menu-separator",dg="pane",bV="decoration/arrows/right-invert.png",dD="left.png",dC="icon/16/actions/view-refresh.png";qx.Theme.define(e,{appearances:{"widget":{},"root":{style:function(et){return {backgroundColor:dq,textColor:em,font:bq};}},"label":{style:function(eu){return {textColor:eu.disabled?cm:undefined};}},"move-frame":{style:function(ev){return {decorator:dK};}},"resize-frame":bC,"dragdrop-cursor":{style:function(ew){var ex=bb;if(ew.copy){ex=C;}else if(ew.move){ex=T;}else if(ew.alias){ex=D;}return {source:bu+ex+cS,position:l,offset:[2,16,2,6]};}},"image":{style:function(ey){return {opacity:!ey.replacement&&ey.disabled?0.3:1};}},"atom":{},"atom/label":cj,"atom/icon":dG,"popup":{style:function(ez){return {decorator:dK,backgroundColor:co,shadow:N};}},"button-frame":{alias:dM,style:function(eA){var eC,eB;if(eA.checked&&eA.focused&&!eA.inner){eC=i;eB=undefined;}else if(eA.disabled){eC=ef;eB=undefined;}else if(eA.pressed){eC=cu;eB=dm;}else if(eA.checked){eC=bx;eB=undefined;}else if(eA.hovered){eC=bK;eB=dm;}else if(eA.preselected&&eA.focused&&!eA.inner){eC=dB;eB=dm;}else if(eA.preselected){eC=j;eB=dm;}else if(eA.focused&&!eA.inner){eC=ep;eB=undefined;}else{eC=dJ;eB=undefined;}return {decorator:eC,textColor:eB,shadow:eA.invalid&&!eA.disabled?cx:undefined};}},"button-frame/image":{style:function(eD){return {opacity:!eD.replacement&&eD.disabled?0.5:1};}},"button":{alias:dN,include:dN,style:function(eE){return {padding:[2,8],center:true};}},"hover-button":{alias:dM,include:dM,style:function(eF){return {decorator:eF.hovered?dE:undefined,textColor:eF.hovered?dH:undefined};}},"splitbutton":{},"splitbutton/button":dJ,"splitbutton/arrow":{alias:dJ,include:dJ,style:function(eG){return {icon:ck,padding:2,marginLeft:1};}},"checkbox":{alias:dM,style:function(eH){var eJ;if(eH.checked){if(eH.disabled){eJ=ej;}else if(eH.focused){eJ=dw;}else if(eH.pressed){eJ=cq;}else if(eH.hovered){eJ=B;}else{eJ=ej;}}else if(eH.undetermined){if(eH.disabled){eJ=es;}else if(eH.focused){eJ=bQ;}else if(eH.hovered){eJ=bG;}else{eJ=es;}}else if(!eH.disabled){if(eH.focused){eJ=cp;}else if(eH.pressed){eJ=ds;}else if(eH.hovered){eJ=cy;}}eJ=eJ||m;var eI=eH.invalid&&!eH.disabled?G:H;return {icon:K+eJ+eI+bk,gap:6};}},"radiobutton":{alias:dM,style:function(eK){var eM;if(eK.checked&&eK.focused){eM=bf;}else if(eK.checked&&eK.disabled){eM=cP;}else if(eK.checked&&eK.pressed){eM=cR;}else if(eK.checked&&eK.hovered){eM=bd;}else if(eK.checked){eM=cV;}else if(eK.focused){eM=bh;}else if(eK.pressed){eM=cK;}else if(eK.hovered){eM=bz;}else{eM=di;}var eL=eK.invalid&&!eK.disabled?G:H;return {icon:K+eM+eL+bk,gap:6};}},"textfield":{style:function(eN){var eS;var eQ=!!eN.focused;var eR=!!eN.invalid;var eO=!!eN.disabled;if(eQ&&eR&&!eO){eS=dV;}else if(eQ&&!eR&&!eO){eS=dQ;}else if(eO){eS=cf;}else if(!eQ&&eR&&!eO){eS=ci;}else{eS=ch;}var eP;if(eN.disabled){eP=cm;}else if(eN.showingPlaceholder){eP=ca;}else{eP=er;}return {decorator:eS,padding:[2,4,1],textColor:eP};}},"textarea":{include:dn,style:function(eT){return {padding:4};}},"spinner":{style:function(eU){var eY;var eW=!!eU.focused;var eX=!!eU.invalid;var eV=!!eU.disabled;if(eW&&eX&&!eV){eY=dV;}else if(eW&&!eX&&!eV){eY=dQ;}else if(eV){eY=cf;}else if(!eW&&eX&&!eV){eY=ci;}else{eY=ch;}return {decorator:eY};}},"spinner/textfield":{style:function(fa){return {marginRight:2,padding:[2,4,1],textColor:fa.disabled?cm:er};}},"spinner/upbutton":{alias:dN,include:dN,style:function(fb){return {icon:Q,padding:fb.pressed?[2,2,0,4]:[1,3,1,3],shadow:undefined};}},"spinner/downbutton":{alias:dN,include:dN,style:function(fc){return {icon:br,padding:fc.pressed?[2,2,0,4]:[1,3,1,3],shadow:undefined};}},"datefield":k,"datefield/button":{alias:s,include:s,style:function(fd){return {icon:de,padding:[0,3],decorator:undefined};}},"datefield/textfield":dy,"datefield/list":{alias:bo,include:bo,style:function(fe){return {decorator:undefined};}},"groupbox":{style:function(ff){return {legendPosition:R};}},"groupbox/legend":{alias:dM,style:function(fg){return {padding:[1,0,1,4],textColor:fg.invalid?dh:n,font:dI};}},"groupbox/frame":{style:function(fh){return {padding:12,decorator:df};}},"check-groupbox":cl,"check-groupbox/legend":{alias:m,include:m,style:function(fi){return {padding:[1,0,1,4],textColor:fi.invalid?dh:n,font:dI};}},"radio-groupbox":cl,"radio-groupbox/legend":{alias:di,include:di,style:function(fj){return {padding:[1,0,1,4],textColor:fj.invalid?dh:n,font:dI};}},"scrollarea":{style:function(fk){return {minWidth:50,minHeight:50};}},"scrollarea/corner":{style:function(fl){return {backgroundColor:dq};}},"scrollarea/pane":dL,"scrollarea/scrollbar-x":dk,"scrollarea/scrollbar-y":dk,"scrollbar":{style:function(fm){if(fm[cz]){return {};}return {width:fm.horizontal?undefined:16,height:fm.horizontal?16:undefined,decorator:fm.horizontal?bP:ed,padding:1};}},"scrollbar/slider":{alias:cb,style:function(fn){return {padding:fn.horizontal?[0,1,0,1]:[1,0,1,0]};}},"scrollbar/slider/knob":{include:dN,style:function(fo){var fp=fo.horizontal?ek:y;if(fo.disabled){fp+=bO;}return {decorator:fp,minHeight:fo.horizontal?undefined:9,minWidth:fo.horizontal?9:undefined};}},"scrollbar/button":{alias:dN,include:dN,style:function(fq){var fr=bL;if(fq.left){fr+=dD;}else if(fq.right){fr+=bF;}else if(fq.up){fr+=h;}else{fr+=cd;}if(fq.left||fq.right){return {padding:[0,0,0,fq.left?3:4],icon:fr,width:15,height:14};}else{return {padding:[0,0,0,2],icon:fr,width:14,height:15};}}},"scrollbar/button-begin":q,"scrollbar/button-end":q,"slider":{style:function(fs){var fw;var fu=!!fs.focused;var fv=!!fs.invalid;var ft=!!fs.disabled;if(fu&&fv&&!ft){fw=dV;}else if(fu&&!fv&&!ft){fw=dQ;}else if(ft){fw=cf;}else if(!fu&&fv&&!ft){fw=ci;}else{fw=ch;}return {decorator:fw};}},"slider/knob":{include:dN,style:function(fx){return {decorator:fx.disabled?cw:ek,shadow:undefined,height:14,width:14};}},"list":{alias:ec,style:function(fy){var fC;var fA=!!fy.focused;var fB=!!fy.invalid;var fz=!!fy.disabled;if(fA&&fB&&!fz){fC=dV;}else if(fA&&!fB&&!fz){fC=dQ;}else if(fz){fC=cf;}else if(!fA&&fB&&!fz){fC=ci;}else{fC=ch;}return {backgroundColor:co,decorator:fC};}},"list/pane":dL,"listitem":{alias:dM,style:function(fD){var fE;if(fD.dragover){fE=fD.selected?eg:eb;}else{fE=fD.selected?dE:undefined;}return {padding:fD.dragover?[4,4,2,4]:4,textColor:fD.selected?dH:undefined,decorator:fE};}},"slidebar":{},"slidebar/scrollpane":{},"slidebar/content":{},"slidebar/button-forward":{alias:dN,include:dN,style:function(fF){return {padding:5,center:true,icon:fF.vertical?ck:dr};}},"slidebar/button-backward":{alias:dN,include:dN,style:function(fG){return {padding:5,center:true,icon:fG.vertical?L:eq};}},"tabview":{style:function(fH){return {contentPadding:16};}},"tabview/bar":{alias:bv,style:function(fI){var fJ={marginBottom:fI.barTop?-1:0,marginTop:fI.barBottom?-4:0,marginLeft:fI.barRight?-3:0,marginRight:fI.barLeft?-1:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0};if(fI.barTop||fI.barBottom){fJ.paddingLeft=5;fJ.paddingRight=7;}else{fJ.paddingTop=5;fJ.paddingBottom=7;}return fJ;}},"tabview/bar/button-forward":{include:bm,alias:bm,style:function(fK){if(fK.barTop||fK.barBottom){return {marginTop:2,marginBottom:2};}else{return {marginLeft:2,marginRight:2};}}},"tabview/bar/button-backward":{include:bp,alias:bp,style:function(fL){if(fL.barTop||fL.barBottom){return {marginTop:2,marginBottom:2};}else{return {marginLeft:2,marginRight:2};}}},"tabview/bar/scrollpane":{},"tabview/pane":{style:function(fM){return {decorator:cL,minHeight:100,marginBottom:fM.barBottom?-1:0,marginTop:fM.barTop?-1:0,marginLeft:fM.barLeft?-1:0,marginRight:fM.barRight?-1:0};}},"tabview-page":dL,"tabview-page/button":{alias:dM,style:function(fN){var fT,fP=0;var fS=0,fO=0,fQ=0,fR=0;if(fN.checked){if(fN.barTop){fT=ce;fP=[6,14];fQ=fN.firstTab?0:-5;fR=fN.lastTab?0:-5;}else if(fN.barBottom){fT=cF;fP=[6,14];fQ=fN.firstTab?0:-5;fR=fN.lastTab?0:-5;}else if(fN.barRight){fT=bN;fP=[6,13];fS=fN.firstTab?0:-5;fO=fN.lastTab?0:-5;}else{fT=cN;fP=[6,13];fS=fN.firstTab?0:-5;fO=fN.lastTab?0:-5;}}else{if(fN.barTop){fT=dd;fP=[4,10];fS=4;fQ=fN.firstTab?5:1;fR=1;}else if(fN.barBottom){fT=bH;fP=[4,10];fO=4;fQ=fN.firstTab?5:1;fR=1;}else if(fN.barRight){fT=dv;fP=[4,10];fR=5;fS=fN.firstTab?5:1;fO=1;fQ=1;}else{fT=da;fP=[4,10];fQ=5;fS=fN.firstTab?5:1;fO=1;fR=1;}}return {zIndex:fN.checked?10:5,decorator:fT,padding:fP,marginTop:fS,marginBottom:fO,marginLeft:fQ,marginRight:fR,textColor:fN.checked?d:U};}},"tabview-page/button/label":{alias:cj,style:function(fU){return {padding:[0,1,0,1],margin:fU.focused?0:1,decorator:fU.focused?bA:undefined};}},"tabview-page/button/close-button":{alias:dM,style:function(fV){return {icon:dt};}},"toolbar":{style:function(fW){return {decorator:z,spacing:2};}},"toolbar/part":{style:function(fX){return {decorator:cM,spacing:2};}},"toolbar/part/container":{style:function(fY){return {paddingLeft:2,paddingRight:2};}},"toolbar/part/handle":{style:function(ga){return {source:dY,marginLeft:3,marginRight:3};}},"toolbar-button":{alias:dM,style:function(gb){return {marginTop:2,marginBottom:2,padding:(gb.pressed||gb.checked||gb.hovered)&&!gb.disabled||(gb.disabled&&gb.checked)?3:5,decorator:gb.pressed||(gb.checked&&!gb.hovered)||(gb.checked&&gb.disabled)?cX:gb.hovered&&!gb.disabled?c:undefined};}},"toolbar-menubutton":{alias:dS,include:dS,style:function(gc){return {showArrow:true};}},"toolbar-menubutton/arrow":{alias:dG,include:dG,style:function(gd){return {source:br};}},"toolbar-splitbutton":{style:function(ge){return {marginTop:2,marginBottom:2};}},"toolbar-splitbutton/button":{alias:dS,include:dS,style:function(gf){return {icon:ck,marginTop:undefined,marginBottom:undefined};}},"toolbar-splitbutton/arrow":{alias:dS,include:dS,style:function(gg){if(gg.pressed||gg.checked||(gg.hovered&&!gg.disabled)){var gh=1;}else{var gh=3;}return {padding:gh,icon:ck,marginTop:undefined,marginBottom:undefined};}},"toolbar-separator":{style:function(gi){return {decorator:cG,margin:7};}},"tree":dP,"tree-item":{style:function(gj){return {padding:[2,6],textColor:gj.selected?dH:undefined,decorator:gj.selected?dE:undefined};}},"tree-item/icon":{include:dG,style:function(gk){return {paddingRight:5};}},"tree-item/label":cj,"tree-item/open":{include:dG,style:function(gl){var gm;if(gl.selected&&gl.opened){gm=cY;}else if(gl.selected&&!gl.opened){gm=f;}else if(gl.opened){gm=bl;}else{gm=el;}return {padding:[0,5,0,2],source:gm};}},"tree-folder":{include:dW,alias:dW,style:function(gn){var gp,go;if(gn.small){gp=gn.opened?o:t;go=o;}else if(gn.large){gp=gn.opened?O:cH;go=O;}else{gp=gn.opened?J:bT;go=J;}return {icon:gp,iconOpened:go};}},"tree-file":{include:dW,alias:dW,style:function(gq){return {icon:gq.small?M:gq.large?cC:ea};}},"treevirtual":I,"treevirtual-folder":{style:function(gr){return {icon:gr.opened?o:t};}},"treevirtual-file":{include:bj,alias:bj,style:function(gs){return {icon:M};}},"treevirtual-line":{style:function(gt){return {icon:p};}},"treevirtual-contract":{style:function(gu){return {icon:bl,paddingLeft:5,paddingTop:2};}},"treevirtual-expand":{style:function(gv){return {icon:el,paddingLeft:5,paddingTop:2};}},"treevirtual-only-contract":dX,"treevirtual-only-expand":dp,"treevirtual-start-contract":dX,"treevirtual-start-expand":dp,"treevirtual-end-contract":dX,"treevirtual-end-expand":dp,"treevirtual-cross-contract":dX,"treevirtual-cross-expand":dp,"treevirtual-end":{style:function(gw){return {icon:p};}},"treevirtual-cross":{style:function(gx){return {icon:p};}},"tooltip":{include:dR,style:function(gy){return {backgroundColor:bM,padding:[1,3,2,3],offset:[15,5,5,5]};}},"tooltip/atom":dM,"tooltip-error":{include:dO,style:function(gz){return {textColor:dH,placeMethod:dL,offset:[0,0,0,14],marginTop:-2,position:l,showTimeout:100,hideTimeout:10000,decorator:bI,shadow:bw,font:dI};}},"tooltip-error/atom":dM,"window":{style:function(gA){return {shadow:bD,contentPadding:[10,10,10,10]};}},"window/pane":{style:function(gB){return {decorator:bW};}},"window/captionbar":{style:function(gC){return {decorator:gC.active?A:cJ,textColor:gC.active?cg:bX,minHeight:26,paddingRight:2};}},"window/icon":{style:function(gD){return {margin:[5,0,3,6]};}},"window/title":{style:function(gE){return {alignY:dF,font:dI,marginLeft:6,marginRight:12};}},"window/minimize-button":{alias:dM,style:function(gF){return {icon:gF.active?gF.hovered?cE:du:cW,margin:[4,8,2,0]};}},"window/restore-button":{alias:dM,style:function(gG){return {icon:gG.active?gG.hovered?be:E:dx,margin:[5,8,2,0]};}},"window/maximize-button":{alias:dM,style:function(gH){return {icon:gH.active?gH.hovered?by:bU:ei,margin:[4,8,2,0]};}},"window/close-button":{alias:dM,style:function(gI){return {icon:gI.active?gI.hovered?dA:cA:cO,margin:[4,8,2,0]};}},"window/statusbar":{style:function(gJ){return {padding:[2,6],decorator:bJ,minHeight:18};}},"window/statusbar-text":{style:function(gK){return {font:S};}},"iframe":{style:function(gL){return {decorator:dK};}},"resizer":{style:function(gM){return {decorator:dg};}},"splitpane":{style:function(gN){return {decorator:dz};}},"splitpane/splitter":{style:function(gO){return {width:gO.horizontal?3:undefined,height:gO.vertical?3:undefined,backgroundColor:bn};}},"splitpane/splitter/knob":{style:function(gP){return {source:gP.horizontal?bs:cT};}},"splitpane/slider":{style:function(gQ){return {width:gQ.horizontal?3:undefined,height:gQ.vertical?3:undefined,backgroundColor:bn};}},"selectbox":{alias:dN,include:dN,style:function(gR){return {padding:[2,8]};}},"selectbox/atom":dM,"selectbox/popup":dR,"selectbox/list":{alias:dP},"selectbox/arrow":{include:dG,style:function(gS){return {source:ck,paddingLeft:5};}},"datechooser":{style:function(gT){var gX;var gV=!!gT.focused;var gW=!!gT.invalid;var gU=!!gT.disabled;if(gV&&gW&&!gU){gX=dV;}else if(gV&&!gW&&!gU){gX=dQ;}else if(gU){gX=cf;}else if(!gV&&gW&&!gU){gX=ci;}else{gX=ch;}return {padding:2,decorator:gX,backgroundColor:co};}},"datechooser/navigation-bar":{},"datechooser/nav-button":{include:dN,alias:dN,style:function(gY){var ha={padding:[2,4],shadow:undefined};if(gY.lastYear){ha.icon=cr;ha.marginRight=1;}else if(gY.lastMonth){ha.icon=eq;}else if(gY.nextYear){ha.icon=x;ha.marginLeft=1;}else if(gY.nextMonth){ha.icon=dr;}return ha;}},"datechooser/last-year-button-tooltip":dO,"datechooser/last-month-button-tooltip":dO,"datechooser/next-year-button-tooltip":dO,"datechooser/next-month-button-tooltip":dO,"datechooser/last-year-button":dj,"datechooser/last-month-button":dj,"datechooser/next-month-button":dj,"datechooser/next-year-button":dj,"datechooser/month-year-label":{style:function(hb){return {font:dI,textAlign:dl,textColor:hb.disabled?cm:undefined};}},"datechooser/date-pane":{style:function(hc){return {textColor:hc.disabled?cm:undefined,marginTop:2};}},"datechooser/weekday":{style:function(hd){return {textColor:hd.disabled?cm:hd.weekend?eo:undefined,textAlign:dl,paddingTop:2,backgroundColor:P};}},"datechooser/week":{style:function(he){return {textAlign:dl,padding:[2,4],backgroundColor:P};}},"datechooser/day":{style:function(hf){return {textAlign:dl,decorator:hf.disabled?undefined:hf.selected?dE:undefined,textColor:hf.disabled?cm:hf.selected?dH:hf.otherMonth?eo:undefined,font:hf.today?dI:undefined,padding:[2,4]};}},"combobox":{style:function(hg){var hk;var hi=!!hg.focused;var hj=!!hg.invalid;var hh=!!hg.disabled;if(hi&&hj&&!hh){hk=dV;}else if(hi&&!hj&&!hh){hk=dQ;}else if(hh){hk=cf;}else if(!hi&&hj&&!hh){hk=ci;}else{hk=ch;}return {decorator:hk};}},"combobox/popup":dR,"combobox/list":{alias:dP},"combobox/button":{include:dN,alias:dN,style:function(hl){var hm={icon:ck,padding:2};if(hl.selected){hm.decorator=ep;}return hm;}},"combobox/textfield":{include:dn,style:function(hn){return {decorator:undefined};}},"menu":{style:function(ho){var hp={decorator:X,shadow:N,spacingX:6,spacingY:1,iconColumnWidth:16,arrowColumnWidth:4,placementModeY:ho.submenu||ho.contextmenu?g:cc};if(ho.submenu){hp.position=l;hp.offset=[-2,-3];}return hp;}},"menu/slidebar":db,"menu-slidebar":dL,"menu-slidebar-button":{style:function(hq){return {decorator:hq.hovered?dE:undefined,padding:7,center:true};}},"menu-slidebar/button-backward":{include:en,style:function(hr){return {icon:hr.hovered?F:L};}},"menu-slidebar/button-forward":{include:en,style:function(hs){return {icon:hs.hovered?bg:ck};}},"menu-separator":{style:function(ht){return {height:0,decorator:bS,margin:[4,2]};}},"menu-button":{alias:dM,style:function(hu){return {decorator:hu.selected?dE:undefined,textColor:hu.selected?dH:undefined,padding:[4,6]};}},"menu-button/icon":{include:dG,style:function(hv){return {alignY:dF};}},"menu-button/label":{include:cj,style:function(hw){return {alignY:dF,padding:1};}},"menu-button/shortcut":{include:cj,style:function(hx){return {alignY:dF,marginLeft:14,padding:1};}},"menu-button/arrow":{include:dG,style:function(hy){return {source:hy.selected?bV:dr,alignY:dF};}},"menu-checkbox":{alias:dU,include:dU,style:function(hz){return {icon:!hz.checked?undefined:hz.selected?ee:cB};}},"menu-radiobutton":{alias:dU,include:dU,style:function(hA){return {icon:!hA.checked?undefined:hA.selected?bY:w};}},"menubar":{style:function(hB){return {decorator:cD};}},"menubar-button":{alias:dM,style:function(hC){return {decorator:(hC.pressed||hC.hovered)&&!hC.disabled?dE:undefined,textColor:hC.pressed||hC.hovered?dH:undefined,padding:[3,8]};}},"colorselector":dL,"colorselector/control-bar":dL,"colorselector/control-pane":dL,"colorselector/visual-pane":cl,"colorselector/preset-grid":dL,"colorselector/colorbucket":{style:function(hD){return {decorator:dK,width:16,height:16};}},"colorselector/preset-field-set":cl,"colorselector/input-field-set":cl,"colorselector/preview-field-set":cl,"colorselector/hex-field-composite":dL,"colorselector/hex-field":dn,"colorselector/rgb-spinner-composite":dL,"colorselector/rgb-spinner-red":dT,"colorselector/rgb-spinner-green":dT,"colorselector/rgb-spinner-blue":dT,"colorselector/hsb-spinner-composite":dL,"colorselector/hsb-spinner-hue":dT,"colorselector/hsb-spinner-saturation":dT,"colorselector/hsb-spinner-brightness":dT,"colorselector/preview-content-old":{style:function(hE){return {decorator:dK,width:50,height:10};}},"colorselector/preview-content-new":{style:function(hF){return {decorator:dK,backgroundColor:co,width:50,height:10};}},"colorselector/hue-saturation-field":{style:function(hG){return {decorator:dK,margin:5};}},"colorselector/brightness-field":{style:function(hH){return {decorator:dK,margin:[5,7]};}},"colorselector/hue-saturation-pane":dL,"colorselector/hue-saturation-handle":dL,"colorselector/brightness-pane":dL,"colorselector/brightness-handle":dL,"colorpopup":{alias:dR,include:dR,style:function(hI){return {padding:5,backgroundColor:dq};}},"colorpopup/field":{style:function(hJ){return {decorator:dK,margin:2,width:14,height:14,backgroundColor:co};}},"colorpopup/selector-button":dJ,"colorpopup/auto-button":dJ,"colorpopup/preview-pane":cl,"colorpopup/current-preview":{style:function(hK){return {height:20,padding:4,marginLeft:4,decorator:dK,allowGrowX:true};}},"colorpopup/selected-preview":{style:function(hL){return {height:20,padding:4,marginRight:4,decorator:dK,allowGrowX:true};}},"colorpopup/colorselector-okbutton":{alias:dJ,include:dJ,style:function(hM){return {icon:cs};}},"colorpopup/colorselector-cancelbutton":{alias:dJ,include:dJ,style:function(hN){return {icon:dc};}},"table":{alias:dL,style:function(hO){return {decorator:I};}},"table-header":{},"table/statusbar":{style:function(hP){return {decorator:cQ,padding:[0,2]};}},"table/column-button":{alias:dN,style:function(hQ){return {decorator:bE,padding:3,icon:a};}},"table-column-reset-button":{include:dU,alias:dU,style:function(){return {icon:dC};}},"table-scroller":dL,"table-scroller/scrollbar-x":dk,"table-scroller/scrollbar-y":dk,"table-scroller/header":{style:function(hR){return {decorator:cv};}},"table-scroller/pane":{style:function(hS){return {backgroundColor:ct};}},"table-scroller/focus-indicator":{style:function(hT){return {decorator:bB};}},"table-scroller/resize-line":{style:function(hU){return {backgroundColor:eh,width:2};}},"table-header-cell":{alias:dM,style:function(hV){return {minWidth:13,minHeight:20,padding:hV.hovered?[3,4,2,4]:[3,4],decorator:hV.hovered?bc:Y,sortIcon:hV.sorted?(hV.sortedAscending?cU:u):undefined};}},"table-header-cell/label":{style:function(hW){return {minWidth:0,alignY:dF,paddingRight:5};}},"table-header-cell/sort-icon":{style:function(hX){return {alignY:dF,alignX:r};}},"table-header-cell/icon":{style:function(hY){return {minWidth:0,alignY:dF,paddingRight:5};}},"table-editor-textfield":{include:dn,style:function(ia){return {decorator:undefined,padding:[2,2],backgroundColor:co};}},"table-editor-selectbox":{include:bi,alias:bi,style:function(ib){return {padding:[0,2],backgroundColor:co};}},"table-editor-combobox":{include:k,alias:k,style:function(ic){return {decorator:undefined,backgroundColor:co};}},"progressive-table-header":{alias:dL,style:function(id){return {decorator:b};}},"progressive-table-header-cell":{alias:dM,style:function(ie){return {minWidth:40,minHeight:25,paddingLeft:6,decorator:bR};}},"app-header":{style:function(ig){return {font:dI,textColor:dH,padding:[8,12],decorator:W};}},"virtual-list":dP,"virtual-list/row-layer":V,"row-layer":{style:function(ih){return {colorEven:cg,colorOdd:cg};}},"group-item":{include:cj,alias:cj,style:function(ii){return {padding:4,decorator:bt,textColor:cg,font:dI};}},"column-layer":dL,"cell":{style:function(ij){return {textColor:ij.selected?dH:em,padding:[3,6],font:bq};}},"cell-string":cn,"cell-number":{include:cn,style:function(ik){return {textAlign:r};}},"cell-image":cn,"cell-boolean":{include:cn,style:function(il){return {iconTrue:ba,iconFalse:cI};}},"cell-atom":cn,"cell-date":cn,"cell-html":cn,"htmlarea":{"include":dL,style:function(im){return {backgroundColor:cg};}},"progressbar":{style:function(io){return {decorator:v,padding:[1],backgroundColor:cg};}},"progressbar/progress":{style:function(ip){return {decorator:dE};}}}});})();(function(){var g="#134275",f="scrollarea",e="main",d="Theme for API Viewer",c="apiviewer.Appearance",b="white",a="bold";qx.Theme.define(c,{title:d,extend:qx.theme.modern.Appearance,appearances:{"toggleview":{style:function(h){return {width:240,decorator:e};}},"detailviewer":{style:function(i){return {backgroundColor:b,decorator:e};}},"legend":{include:f,alias:f,style:function(j){return {contentPadding:[10,10,10,10]};}},"legendview-label-important":{style:function(k){return {textColor:g,font:a};}},"legendview-label":{style:function(l){return {textColor:g};}},"tabview":{style:function(m){return {contentPadding:0};}},"tabview/pane":{style:function(n){return {minHeight:100,marginBottom:n.barBottom?-1:0,marginTop:n.barTop?-1:0,marginLeft:n.barLeft?-1:0,marginRight:n.barRight?-1:0};}}}});})();(function(){var a="apiviewer.test.Widget";qx.Class.define(a,{extend:apiviewer.test.LayoutItem,members:{renderSeparator:function(b,c){}}});})();(function(){var a="apiviewer.test.Methods";qx.Class.define(a,{extend:Object,members:{toString:function(){},valueOf:function(){},isPrototypeOf:function(){},hasOwnProperty:function(){},toLocaleString:function(){}}});})();(function(){var h="apiviewer.ClassLoader",g="(",f=")",e=".json",d="completed",c=".",b="/",a="failed";qx.Class.define(h,{extend:qx.core.Object,construct:function(j){qx.core.Object.call(this);this._baseUri=j;},members:{load:function(k,l,m,self){var n=this._baseUri+b+k+e;var o=new qx.io.remote.Request(n);var p=null;o.setAsynchronous(l);o.setTimeout(30000);o.setProhibitCaching(false);o.addListener(d,function(q){var content=eval(g+q.getContent()+f);var r=k.substring(0,k.lastIndexOf(c));var s=apiviewer.dao.Class.getClassByName(r);p=new apiviewer.dao.Class(content,s);s.addClass(p);this.__Tc(p,m,self);},this);o.addListener(a,function(t){alert("Couldn't load file: "+n);},this);o.send();return p;},__Tc:function(u,v,self){if(v){if(self){v.call(self,u);}else{v(u);}}},__Td:function(w,x,self){var z=[];var y=0;var A,i;for(i=0;i<w.length;i++){A=w[i];if(!A.isLoaded()){z.push(A);}}for(i=0;i<z.length;i++){this.load(z[i].getFullName(),true,function(B){y+=1;if(y==z.length){this.__Tc(apiviewer.dao.Class.getClassByName(w[0].getFullName()),x,self);}},this);}if(z.length==0){this.__Tc(w[0],x,self);}},classLoadDependendClasses:function(C,D,self){var E=C.getDependendClasses();this.__Td(E,D,self);},packageLoadDependendClasses:function(F,G,self){var H=F.getClasses();this.__Td(H,G,self);}}});})();(function(){var a="qx.application.IApplication";qx.Interface.define(a,{members:{main:function(){},finalize:function(){},close:function(){},terminate:function(){}}});})();(function(){var b="abstract",a="qx.application.AbstractGui";qx.Class.define(a,{type:b,extend:qx.core.Object,implement:[qx.application.IApplication],include:qx.locale.MTranslation,members:{__nv:null,_createRootWidget:function(){throw new Error("Abstract method call");},getRoot:function(){return this.__nv;},main:function(){qx.theme.manager.Meta.getInstance().initialize();qx.ui.tooltip.Manager.getInstance();this.__nv=this._createRootWidget();},finalize:function(){this.render();},render:function(){qx.ui.core.queue.Manager.flush();},close:function(c){},terminate:function(){}},destruct:function(){this.__nv=null;}});})();(function(){var a="qx.application.Standalone";qx.Class.define(a,{extend:qx.application.AbstractGui,members:{_createRootWidget:function(){return new qx.ui.root.Application(document);}}});})();(function(){var e="controller",d="script/apidata.json",c="apiviewer/css/apiviewer.css",b="apiviewer.Application",a="viewer";qx.Class.define(b,{extend:qx.application.Standalone,construct:function(){qx.application.Standalone.call(this);qx.bom.Stylesheet.includeFile(c);},members:{main:function(){qx.application.Standalone.prototype.main.call(this);{};qx.Class.include(qx.ui.core.Widget,apiviewer.MWidgetRegistry);this.viewer=new apiviewer.Viewer();this.controller=new apiviewer.Controller();this.getRoot().add(this.viewer,{edge:0});},finalize:function(){qx.application.Standalone.prototype.finalize.call(this);this.controller.load(d);}},destruct:function(){this._disposeObjects(a,e);}});})();(function(){var f="_applyTheme",e="qx.theme",d="qx.theme.manager.Meta",c="qx.theme.Modern",b="Theme",a="singleton";qx.Class.define(d,{type:a,extend:qx.core.Object,properties:{theme:{check:b,nullable:true,apply:f}},members:{_applyTheme:function(g,h){var k=null;var n=null;var q=null;var r=null;var m=null;if(g){k=g.meta.color||null;n=g.meta.decoration||null;q=g.meta.font||null;r=g.meta.icon||null;m=g.meta.appearance||null;}var o=qx.theme.manager.Color.getInstance();var p=qx.theme.manager.Decoration.getInstance();var i=qx.theme.manager.Font.getInstance();var l=qx.theme.manager.Icon.getInstance();var j=qx.theme.manager.Appearance.getInstance();o.setTheme(k);p.setTheme(n);i.setTheme(q);l.setTheme(r);j.setTheme(m);},initialize:function(){var t=qx.core.Setting;var s,u;s=t.get(e);if(s){u=qx.Theme.getByName(s);if(!u){throw new Error("The theme to use is not available: "+s);}this.setTheme(u);}}},settings:{"qx.theme":c}});})();(function(){var e="qx.theme.manager.Icon",d="Theme",c="changeTheme",b="_applyTheme",a="singleton";qx.Class.define(e,{type:a,extend:qx.core.Object,properties:{theme:{check:d,nullable:true,apply:b,event:c}},members:{_applyTheme:function(f,g){var i=qx.util.AliasManager.getInstance();if(g){for(var h in g.aliases){i.remove(h);}}if(f){for(var h in f.aliases){i.add(h,f.aliases[h]);}}}}});})();(function(){var p="Boolean",o="focusout",n="interval",m="mouseover",l="mouseout",k="mousemove",j="widget",i="qx.ui.tooltip.ToolTip",h="_applyCurrent",g="qx.ui.tooltip.Manager",c="__qV",f="__qS",d="tooltip-error",b="__qT",a="singleton";qx.Class.define(g,{type:a,extend:qx.core.Object,construct:function(){qx.core.Object.call(this);qx.event.Registration.addListener(document.body,m,this.__rd,this,true);this.__qS=new qx.event.Timer();this.__qS.addListener(n,this.__ra,this);this.__qT=new qx.event.Timer();this.__qT.addListener(n,this.__rb,this);this.__qU={left:0,top:0};},properties:{current:{check:i,nullable:true,apply:h},showInvalidToolTips:{check:p,init:true},showToolTips:{check:p,init:true}},members:{__qU:null,__qT:null,__qS:null,__qV:null,__qW:null,__qX:function(){if(!this.__qV){this.__qV=new qx.ui.tooltip.ToolTip().set({rich:true});}return this.__qV;},__qY:function(){if(!this.__qW){this.__qW=new qx.ui.tooltip.ToolTip().set({appearance:d});this.__qW.syncAppearance();}return this.__qW;},_applyCurrent:function(q,r){if(r&&qx.ui.core.Widget.contains(r,q)){return;}if(r){if(!r.isDisposed()){r.exclude();}this.__qS.stop();this.__qT.stop();}var t=qx.event.Registration;var s=document.body;if(q){this.__qS.startWith(q.getShowTimeout());t.addListener(s,l,this.__re,this,true);t.addListener(s,o,this.__rf,this,true);t.addListener(s,k,this.__rc,this,true);}else{t.removeListener(s,l,this.__re,this,true);t.removeListener(s,o,this.__rf,this,true);t.removeListener(s,k,this.__rc,this,true);}},__ra:function(e){var u=this.getCurrent();if(u&&!u.isDisposed()){this.__qT.startWith(u.getHideTimeout());if(u.getPlaceMethod()==j){u.placeToWidget(u.getOpener());}else{u.placeToPoint(this.__qU);}u.show();}this.__qS.stop();},__rb:function(e){var v=this.getCurrent();if(v&&!v.isDisposed()){v.exclude();}this.__qT.stop();this.resetCurrent();},__rc:function(e){var w=this.__qU;w.left=e.getDocumentLeft();w.top=e.getDocumentTop();},__rd:function(e){var z=qx.ui.core.Widget.getWidgetByElement(e.getTarget());if(!z){return;}var A,B,y,x;while(z!=null){A=z.getToolTip();B=z.getToolTipText()||null;y=z.getToolTipIcon()||null;if(qx.Class.hasInterface(z.constructor,qx.ui.form.IForm)&&!z.isValid()){x=z.getInvalidMessage();}if(A||B||y||x){break;}z=z.getLayoutParent();}if(!z||!z.getEnabled()||z.isBlockToolTip()||(!x&&!this.getShowToolTips())||(x&&!this.getShowInvalidToolTips())){return;}if(x){A=this.__qY().set({label:x});}if(!A){A=this.__qX().set({label:B,icon:y});}this.setCurrent(A);A.setOpener(z);},__re:function(e){var C=qx.ui.core.Widget.getWidgetByElement(e.getTarget());if(!C){return;}var D=qx.ui.core.Widget.getWidgetByElement(e.getRelatedTarget());if(!D){return;}var E=this.getCurrent();if(E&&(D==E||qx.ui.core.Widget.contains(E,D))){return;}if(D&&C&&qx.ui.core.Widget.contains(C,D)){return;}if(E&&!D){this.setCurrent(null);}else{this.resetCurrent();}},__rf:function(e){var F=qx.ui.core.Widget.getWidgetByElement(e.getTarget());if(!F){return;}var G=this.getCurrent();if(G&&G==F.getToolTip()){this.setCurrent(null);}}},destruct:function(){qx.event.Registration.removeListener(document.body,m,this.__rd,this,true);this._disposeObjects(f,b,c);this.__qU=null;}});})();(function(){var c="_applyId",b="String",a="apiviewer.MWidgetRegistry";qx.Mixin.define(a,{properties:{id:{check:b,apply:c,nullable:true,init:null}},members:{_applyId:function(d,e){var f=apiviewer.MWidgetRegistry;if(e){f.unregister(this,e);}if(d){f.register(this,d);}},getWidgetById:function(g){return apiviewer.MWidgetRegistry.getWidgetById(g);}},statics:{__Te:{},getWidgetById:function(h){return this.__Te[h];},register:function(i,j){if(this.__Te[j]){throw new Error("An object with the id '"+j+"' already exists.");}this.__Te[j]=i;},unregister:function(k,l){if(this.__Te[l]!==k){throw new Error("The object is not registered with the id '"+l+"'.");}delete (this.__Te[l]);}}});})();(function(){var k="value",j="nodeName",i="showPrivate",h="#",g="expandProperties",f="changeSelection",d="(",c="showInherited",b="showProtected",a="request",L="mousedown",K="btn_inherited",J=")",I="application",H="_detailLoader",G="aborted",F="_classLoader",E="btn_protected",D="detail_loader",C=" - ",r="btn_expand",s="$1#$2",p="package",q="tree",n="./script",o="btn_private",l="apiviewer.Controller",m="_tabViewController",t="completed",u="failed",x="$1~$2",w="API Documentation",z="file:",y="_history",B="_tree",A="itemName",v="classLinkClicked";qx.Class.define(l,{extend:qx.core.Object,construct:function(M){qx.core.Object.call(this);this._widgetRegistry=apiviewer.MWidgetRegistry;this._titlePrefix=w;document.title=this._titlePrefix;this._classLoader=new apiviewer.ClassLoader(n);this._detailLoader=this._widgetRegistry.getWidgetById(D);this._tabViewController=new apiviewer.TabViewController(this._widgetRegistry);this.__Tg();this._tree=this._widgetRegistry.getWidgetById(q);this.__Th();this.__Ti();this._history=qx.bom.History.getInstance();this.__Tj();qx.core.Init.getApplication().getRoot().addListener(L,function(e){this.__Tf=e.isShiftPressed()||e.isCtrlOrCommandPressed();},this,true);},members:{__Tf:false,$$logCategory:I,load:function(N){var P=new qx.io.remote.Request(N);P.setTimeout(180000);P.setProhibitCaching(false);P.addListener(t,function(R){var V=new Date();{};var content=R.getContent();var S=new Date();var T=eval(d+content+J);var U=new Date();{};qx.event.Timer.once(function(){this.__Tk(T);qx.event.Timer.once(function(){var W=this._history.getState();if(W){this.__Tl(this.__Tn(W));}else{var Y=this.__To(T);var X=Y.attributes.fullName;this.__Tl(X);}},this,0);},this,0);},this);var O=function(ba){this.error("Couldn't load file: "+N);if(window.location.protocol==z){alert("Failed to load API data from the file system.\n\n"+"The security settings of your browser may prohibit AJAX "+"when using the file protocol. Please try the http protocol "+"instead.");}};P.addListener(u,O,this);P.addListener(G,O,this);var Q=new Date();P.send();},__Tg:function(){this._tabViewController.addListener(v,function(bb){this._updateHistory(bb.getData());},this);this._tabViewController.addListener(f,function(bc){var be=bc.getData()[0];if(this._ignoreTabViewSelection==true){return;}if(be&&be.getUserData(j)){var bf=be.getUserData(j);var bd=be.getUserData(A);if(bd!=null){this._updateHistory(bf+h+bd);}else{this._updateHistory(bf);}}else{this._tree.resetSelection();}},this);},__Th:function(){this._tree.addListener(f,function(bg){var bh=bg.getData()[0];if(bh&&bh.getUserData(j)&&!this._ignoreTreeSelection){var bi=bh.getUserData(j);this._updateHistory(bi);}},this);},__Ti:function(){var bk=apiviewer.UiModel.getInstance();var bm=this._widgetRegistry.getWidgetById(K);bm.bind(k,bk,c);bk.bind(c,bm,k);var bj=this._widgetRegistry.getWidgetById(r);bj.bind(k,bk,g);bk.bind(g,bj,k);var bl=this._widgetRegistry.getWidgetById(E);bl.bind(k,bk,b);bk.bind(b,bl,k);var bn=this._widgetRegistry.getWidgetById(o);bn.bind(k,bk,i);bk.bind(i,bn,k);},__Tj:function(){this._history.addListener(a,function(bo){var bp=this.__Tn(bo.getData());if(bp){this.__Tl(bp);}},this);},__Tk:function(bq){var br=new Date();var bs=new apiviewer.dao.Package(bq);var bt=new Date();{};var br=new Date();this._tree.setTreeData(bs);var bt=new Date();{};return true;},_updateHistory:function(bu){var bv=bu+C+this._titlePrefix;qx.bom.History.getInstance().addToHistory(this.__Tm(bu),bv);},_selectClass:function(bw,bx,self){this._detailLoader.exclude();this._tabViewController.showTabView();var by=bx?qx.lang.Function.bind(bx,self):function(){};if(bw instanceof apiviewer.dao.Class){this._classLoader.classLoadDependendClasses(bw,function(bz){this._tabViewController.openClass(bz,this.__Tf);by();},this);}else{this._classLoader.packageLoadDependendClasses(bw,function(){this._tabViewController.openPackage(bw,this.__Tf);by();},this);}},__Tl:function(bA){var bD=bA;var bG=null;var bC=bA.indexOf(h);if(bC!=-1){bD=bA.substring(0,bC);bG=bA.substring(bC+1);var bE=bG.indexOf(d);if(bE!=-1){bG=qx.lang.String.trim(bG.substring(0,bE));}}this._ignoreTreeSelection=true;var bF=this._tree.selectTreeNodeByClassName(bD);this._ignoreTreeSelection=false;if(!bF){this.error("Unknown class: "+bD);alert("Unknown class: "+bD);return;}var bB=this._tree.getSelection()[0].getUserData(j)||bD;this._ignoreTabViewSelection=true;this._selectClass(apiviewer.dao.Class.getClassByName(bB),function(){if(bG){if(!this._tabViewController.showItem(bG)){this.error("Unknown item of class '"+bD+"': "+bG);alert("Unknown item of class '"+bD+"': "+bG);this._updateHistory(bD);this._ignoreTabViewSelection=false;return;}}this._updateHistory(bA);this._ignoreTabViewSelection=false;},this);},__Tm:function(bH){return bH.replace(/(.*)#(.*)/g,x);},__Tn:function(bI){return bI.replace(/(.*)~(.*)/g,s);},__To:function(bJ){if(bJ.type&&bJ.type==p){return bJ;}else{return this.__To(bJ.children[0]);}}},destruct:function(){this._widgetRegistry=null;this._disposeObjects(H,F,B,y,m);}});})();(function(){var m="",l='#',k="String",j="request",i="mshtml",h="changeTitle",g="abstract",f="_applyState",e="qx.client",d="changeState",a="qx.bom.History",c="_applyTitle",b="qx.event.type.Data";qx.Class.define(a,{extend:qx.core.Object,type:g,construct:function(){qx.core.Object.call(this);this._baseUrl=window.location.href.split(l)[0]+l;this.__vx={};this._setInitialState();},events:{"request":b},statics:{SUPPORTS_HASH_CHANGE_EVENT:(qx.bom.client.Engine.MSHTML&&document.documentMode>=8)||(!qx.bom.client.Engine.MSHTML&&document.documentMode&&"onhashchange" in window),getInstance:function(){if(!this.$$instance){if(this.SUPPORTS_HASH_CHANGE_EVENT){this.$$instance=new qx.bom.NativeHistory();}else if(qx.core.Variant.isSet(e,i)){this.$$instance=new qx.bom.IframeHistory();}else{this.$$instance=new qx.bom.NativeHistory();}}return this.$$instance;}},properties:{title:{check:k,event:h,nullable:true,apply:c},state:{check:k,event:d,nullable:true,apply:f}},members:{__vx:null,_applyState:function(n,o){this._writeState(n);},_setInitialState:function(){this.setState(this._readState());},_encode:function(p){if(qx.lang.Type.isString(p)){return encodeURIComponent(p);}return m;},_decode:function(q){if(qx.lang.Type.isString(q)){return decodeURIComponent(q);}return m;},_applyTitle:function(r){if(r!=null){document.title=r||m;}},addToHistory:function(s,t){if(!qx.lang.Type.isString(s)){s=s+m;}if(qx.lang.Type.isString(t)){this.setTitle(t);this.__vx[s]=t;}if(this.getState()!==s){this._writeState(s);}},navigateBack:function(){qx.event.Timer.once(function(){history.back();},0);},navigateForward:function(){qx.event.Timer.once(function(){history.forward();},0);},_onHistoryLoad:function(u){this.setState(u);this.fireDataEvent(j,u);if(this.__vx[u]!=null){this.setTitle(this.__vx[u]);}},_readState:function(){throw new Error("Abstract method call");},_writeState:function(){throw new Error("Abstract method call");},_setHash:function(v){var w=this._baseUrl+(v||m);var x=window.location;if(w!=x.href){x.href=w;}},_getHash:function(){var y=/#(.*)$/.exec(window.location.href);return y&&y[1]?y[1]:m;}},destruct:function(){this.__vx=null;}});})();(function(){var d="hashchange",c="interval",b="qx.bom.NativeHistory",a="qx.client";qx.Class.define(b,{extend:qx.bom.History,construct:function(){qx.bom.History.call(this);this.__vz();},members:{__vy:null,__vz:function(){if(qx.bom.History.SUPPORTS_HASH_CHANGE_EVENT){this.__vy=qx.lang.Function.bind(this.__vB,this);qx.bom.Event.addNativeListener(window,d,this.__vy);}else{qx.event.Idle.getInstance().addListener(c,this.__vB,this);}},__vA:function(){if(qx.bom.History.SUPPORTS_HASH_CHANGE_EVENT){qx.bom.Event.removeNativeListener(window,d,this.__vy);}else{qx.event.Idle.getInstance().removeListener(c,this.__vB,this);}},__vB:function(){var e=this._readState();if(qx.lang.Type.isString(e)&&e!=this.getState()){this._onHistoryLoad(e);}},_readState:function(){return this._decode(this._getHash());},_writeState:qx.core.Variant.select(a,{"opera":function(f){qx.event.Timer.once(function(){this._setHash(this._encode(f));},this,0);},"default":function(g){this._setHash(this._encode(g));}})},destruct:function(){this.__vA();}});})();(function(){var n="interval",m="-1000px",l="mshtml",k="",j="qx.bom.IframeHistory",i="qx/static/blank.html",h="state",g='<html><body><div id="state">',f='</div></body></html>',d="hidden",a="qx.client",c="undefined",b="absolute";if(qx.core.Variant.isSet(a,l)){qx.Class.define(j,{extend:qx.bom.History,construct:function(){qx.bom.History.call(this);this.__vF();},members:{__vC:null,__vD:false,__vE:null,_setInitialState:function(){qx.bom.History.prototype._setInitialState.call(this);this.__vE=this._getHash();},_setHash:function(o){qx.bom.History.prototype._setHash.call(this,o);this.__vE=this._encode(o);},_readState:function(){if(!this.__vD){return this._decode(this._getHash());}var p=this.__vC.contentWindow.document;var q=p.getElementById(h);return q?this._decode(q.innerText):k;},_writeState:function(r){var r=this._encode(r);this._setHash(r);this.__vE=r;try{var s=this.__vC.contentWindow.document;s.open();s.write(g+r+f);s.close();}catch(t){}},__vF:function(){this.__vJ(function(){qx.event.Idle.getInstance().addListener(n,this.__vG,this);});},__vG:function(e){var v=null;var u=this._getHash();if(!this.__vI(u)){v=this.__vH(u);}else{v=this._readState();}if(qx.lang.Type.isString(v)&&v!=this.getState()){this._onHistoryLoad(v);}},__vH:function(w){w=this._decode(w);this._writeState(w);return w;},__vI:function(x){return qx.lang.Type.isString(x)&&x==this.__vE;},__vJ:function(y){this.__vC=this.__vK();document.body.appendChild(this.__vC);this.__vL(function(){this._writeState(this.getState());if(y){y.call(this);}},this);},__vK:function(){var z=qx.bom.Iframe.create({src:qx.util.ResourceManager.getInstance().toUri(i)});z.style.visibility=d;z.style.position=b;z.style.left=m;z.style.top=m;return z;},__vL:function(A,B,C){if(typeof C===c){C=0;}if(!this.__vC.contentWindow||!this.__vC.contentWindow.document){if(C>20){throw new Error("can't initialize iframe");}qx.event.Timer.once(function(){this.__vL(A,B,++C);},this,10);return;}this.__vD=true;A.call(B||window);}},destruct:function(){this.__vC=null;qx.event.Idle.getInstance().addListener(n,this.__vG,this);}});}})();(function(){var n="Liberation Sans",m="Arial",l="Lucida Grande",k="sans-serif",j="Tahoma",i="Candara",h="Segoe UI",g="Consolas",f="Courier New",e="Monaco",b="monospace",d="Lucida Console",c="qx.theme.modern.Font",a="DejaVu Sans Mono";qx.Theme.define(c,{fonts:{"default":{size:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?12:11,lineHeight:1.4,family:qx.bom.client.Platform.MAC?[l]:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?[h,i]:[j,n,m,k]},"bold":{size:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?12:11,lineHeight:1.4,family:qx.bom.client.Platform.MAC?[l]:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?[h,i]:[j,n,m,k],bold:true},"small":{size:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?11:10,lineHeight:1.4,family:qx.bom.client.Platform.MAC?[l]:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?[h,i]:[j,n,m,k]},"monospace":{size:11,lineHeight:1.4,family:qx.bom.client.Platform.MAC?[d,e]:(qx.bom.client.System.WINVISTA||qx.bom.client.System.WIN7)?[g]:[g,a,f,b]}}});})();(function(){var c="Tango",b="qx/icon/Tango",a="qx.theme.icon.Tango";qx.Theme.define(a,{title:c,aliases:{"icon":b},icons:{}});})();(function(){var i="Number",h="_applyInsets",g="abstract",f="insetRight",e="insetTop",d="insetBottom",c="qx.ui.decoration.Abstract",b="shorthand",a="insetLeft";qx.Class.define(c,{extend:qx.core.Object,implement:[qx.ui.decoration.IDecorator],type:g,properties:{insetLeft:{check:i,nullable:true,apply:h},insetRight:{check:i,nullable:true,apply:h},insetBottom:{check:i,nullable:true,apply:h},insetTop:{check:i,nullable:true,apply:h},insets:{group:[e,f,d,a],mode:b}},members:{__oa:null,_getDefaultInsets:function(){throw new Error("Abstract method called.");},_isInitialized:function(){throw new Error("Abstract method called.");},_resetInsets:function(){this.__oa=null;},getInsets:function(){if(this.__oa){return this.__oa;}var j=this._getDefaultInsets();return this.__oa={left:this.getInsetLeft()==null?j.left:this.getInsetLeft(),right:this.getInsetRight()==null?j.right:this.getInsetRight(),bottom:this.getInsetBottom()==null?j.bottom:this.getInsetBottom(),top:this.getInsetTop()==null?j.top:this.getInsetTop()};},_applyInsets:function(){{};this.__oa=null;}},destruct:function(){this.__oa=null;}});})();(function(){var q="_applyBackground",p="repeat",o="mshtml",n="backgroundPositionX",m="",l="backgroundPositionY",k="no-repeat",j="scale",i=" ",h="repeat-x",c="qx.client",g="repeat-y",f="hidden",b="qx.ui.decoration.MBackgroundImage",a="String",e='"></div>',d='<div style="';qx.Mixin.define(b,{properties:{backgroundImage:{check:a,nullable:true,apply:q},backgroundRepeat:{check:[p,h,g,k,j],init:p,apply:q},backgroundPositionX:{nullable:true,apply:q},backgroundPositionY:{nullable:true,apply:q},backgroundPosition:{group:[l,n]}},members:{_generateBackgroundMarkup:function(r){var v=m;var u=this.getBackgroundImage();var t=this.getBackgroundRepeat();var top=this.getBackgroundPositionY();if(top==null){top=0;}var w=this.getBackgroundPositionX();if(w==null){w=0;}r.backgroundPosition=w+i+top;if(u){var s=qx.util.AliasManager.getInstance().resolve(u);v=qx.bom.element.Decoration.create(s,t,r);}else{if(r){if(qx.core.Variant.isSet(c,o)){if(qx.bom.client.Engine.VERSION<7||qx.bom.client.Feature.QUIRKS_MODE){r.overflow=f;}}v=d+qx.bom.element.Style.compile(r)+e;}}return v;},_applyBackground:function(){{};}}});})();(function(){var j="_applyStyle",i="solid",h="Color",g="",f="double",e="px",d="px ",c="dotted",b="_applyWidth",a="dashed",E="Number",D=" ",C="shorthand",B="widthTop",A="styleRight",z="styleLeft",y="widthLeft",x="widthBottom",w="styleTop",v="colorBottom",q="styleBottom",r="widthRight",o="colorLeft",p="colorRight",m="colorTop",n="border-top",k="border-left",l="border-right",s="qx.ui.decoration.Single",t="border-bottom",u="absolute";qx.Class.define(s,{extend:qx.ui.decoration.Abstract,include:[qx.ui.decoration.MBackgroundImage],construct:function(F,G,H){qx.ui.decoration.Abstract.call(this);if(F!=null){this.setWidth(F);}if(G!=null){this.setStyle(G);}if(H!=null){this.setColor(H);}},properties:{widthTop:{check:E,init:0,apply:b},widthRight:{check:E,init:0,apply:b},widthBottom:{check:E,init:0,apply:b},widthLeft:{check:E,init:0,apply:b},styleTop:{nullable:true,check:[i,c,a,f],init:i,apply:j},styleRight:{nullable:true,check:[i,c,a,f],init:i,apply:j},styleBottom:{nullable:true,check:[i,c,a,f],init:i,apply:j},styleLeft:{nullable:true,check:[i,c,a,f],init:i,apply:j},colorTop:{nullable:true,check:h,apply:j},colorRight:{nullable:true,check:h,apply:j},colorBottom:{nullable:true,check:h,apply:j},colorLeft:{nullable:true,check:h,apply:j},backgroundColor:{check:h,nullable:true,apply:j},left:{group:[y,z,o]},right:{group:[r,A,p]},top:{group:[B,w,m]},bottom:{group:[x,q,v]},width:{group:[B,r,x,y],mode:C},style:{group:[w,A,q,z],mode:C},color:{group:[m,p,v,o],mode:C}},members:{__pl:null,_getDefaultInsets:function(){return {top:this.getWidthTop(),right:this.getWidthRight(),bottom:this.getWidthBottom(),left:this.getWidthLeft()};},_isInitialized:function(){return !!this.__pl;},getMarkup:function(I){if(this.__pl){return this.__pl;}var J=qx.theme.manager.Color.getInstance();var K={};var M=this.getWidthTop();if(M>0){K[n]=M+d+this.getStyleTop()+D+(J.resolve(this.getColorTop())||g);}var M=this.getWidthRight();if(M>0){K[l]=M+d+this.getStyleRight()+D+(J.resolve(this.getColorRight())||g);}var M=this.getWidthBottom();if(M>0){K[t]=M+d+this.getStyleBottom()+D+(J.resolve(this.getColorBottom())||g);}var M=this.getWidthLeft();if(M>0){K[k]=M+d+this.getStyleLeft()+D+(J.resolve(this.getColorLeft())||g);}{};K.position=u;K.top=0;K.left=0;var L=this._generateBackgroundMarkup(K);return this.__pl=L;},resize:function(N,O,P){var Q=this.getInsets();O-=Q.left+Q.right;P-=Q.top+Q.bottom;if(O<0){O=0;}if(P<0){P=0;}N.style.width=O+e;N.style.height=P+e;N.style.left=(parseInt(N.style.left,10)+Q.left-this.getWidthLeft())+e;N.style.top=(parseInt(N.style.top,10)+Q.top-this.getWidthTop())+e;},tint:function(R,S){var T=qx.theme.manager.Color.getInstance();if(S==null){S=this.getBackgroundColor();}R.style.backgroundColor=T.resolve(S)||g;},_applyWidth:function(){{};this._resetInsets();},_applyStyle:function(){{};}},destruct:function(){this.__pl=null;}});})();(function(){var f="px",e="qx.ui.decoration.Background",d="",c="_applyStyle",b="Color",a="absolute";qx.Class.define(e,{extend:qx.ui.decoration.Abstract,include:[qx.ui.decoration.MBackgroundImage],construct:function(g){qx.ui.decoration.Abstract.call(this);if(g!=null){this.setBackgroundColor(g);}},properties:{backgroundColor:{check:b,nullable:true,apply:c}},members:{__oe:null,_getDefaultInsets:function(){return {top:0,right:0,bottom:0,left:0};},_isInitialized:function(){return !!this.__oe;},getMarkup:function(){if(this.__oe){return this.__oe;}var h={position:a,top:0,left:0};var i=this._generateBackgroundMarkup(h);return this.__oe=i;},resize:function(j,k,l){var m=this.getInsets();j.style.width=(k-m.left-m.right)+f;j.style.height=(l-m.top-m.bottom)+f;j.style.left=-m.left+f;j.style.top=-m.top+f;},tint:function(n,o){var p=qx.theme.manager.Color.getInstance();if(o==null){o=this.getBackgroundColor();}n.style.backgroundColor=p.resolve(o)||d;},_applyStyle:function(){{};}},destruct:function(){this.__oe=null;}});})();(function(){var j="_applyStyle",i='"></div>',h="Color",g="1px",f='<div style="',e='border:',d="1px solid ",c="",b=";",a="px",v='</div>',u="qx.ui.decoration.Beveled",t='<div style="position:absolute;top:1px;left:1px;',s='border-bottom:',r='border-right:',q='border-left:',p='border-top:',o="Number",n='<div style="position:absolute;top:1px;left:0px;',m='position:absolute;top:0px;left:1px;',k='<div style="overflow:hidden;font-size:0;line-height:0;">',l="absolute";qx.Class.define(u,{extend:qx.ui.decoration.Abstract,include:[qx.ui.decoration.MBackgroundImage],construct:function(w,x,y){qx.ui.decoration.Abstract.call(this);if(w!=null){this.setOuterColor(w);}if(x!=null){this.setInnerColor(x);}if(y!=null){this.setInnerOpacity(y);}},properties:{innerColor:{check:h,nullable:true,apply:j},innerOpacity:{check:o,init:1,apply:j},outerColor:{check:h,nullable:true,apply:j},backgroundColor:{check:h,nullable:true,apply:j}},members:{__ry:null,_getDefaultInsets:function(){return {top:2,right:2,bottom:2,left:2};},_isInitialized:function(){return !!this.__ry;},_applyStyle:function(){{};},getMarkup:function(){if(this.__ry){return this.__ry;}var z=qx.theme.manager.Color.getInstance();var A=[];var D=d+z.resolve(this.getOuterColor())+b;var C=d+z.resolve(this.getInnerColor())+b;A.push(k);A.push(f);A.push(e,D);A.push(qx.bom.element.Opacity.compile(0.35));A.push(i);A.push(n);A.push(q,D);A.push(r,D);A.push(qx.bom.element.Opacity.compile(1));A.push(i);A.push(f);A.push(m);A.push(p,D);A.push(s,D);A.push(qx.bom.element.Opacity.compile(1));A.push(i);var B={position:l,top:g,left:g,opacity:1};A.push(this._generateBackgroundMarkup(B));A.push(t);A.push(e,C);A.push(qx.bom.element.Opacity.compile(this.getInnerOpacity()));A.push(i);A.push(v);return this.__ry=A.join(c);},resize:function(E,F,G){if(F<4){F=4;}if(G<4){G=4;}if(qx.bom.client.Feature.CONTENT_BOX){var outerWidth=F-2;var outerHeight=G-2;var M=outerWidth;var L=outerHeight;var innerWidth=F-4;var innerHeight=G-4;}else{var outerWidth=F;var outerHeight=G;var M=F-2;var L=G-2;var innerWidth=M;var innerHeight=L;}var O=a;var K=E.childNodes[0].style;K.width=outerWidth+O;K.height=outerHeight+O;var J=E.childNodes[1].style;J.width=outerWidth+O;J.height=L+O;var I=E.childNodes[2].style;I.width=M+O;I.height=outerHeight+O;var H=E.childNodes[3].style;H.width=M+O;H.height=L+O;var N=E.childNodes[4].style;N.width=innerWidth+O;N.height=innerHeight+O;},tint:function(P,Q){var R=qx.theme.manager.Color.getInstance();if(Q==null){Q=this.getBackgroundColor();}P.childNodes[3].style.backgroundColor=R.resolve(Q)||c;}},destruct:function(){this.__ry=null;}});})();(function(){var o="_applyStyle",n="",m="Color",l="px",k="solid",j="dotted",i="double",h="dashed",g="_applyWidth",f="qx.ui.decoration.Uniform",c="px ",e=" ",d="scale",b="PositiveInteger",a="absolute";qx.Class.define(f,{extend:qx.ui.decoration.Abstract,include:[qx.ui.decoration.MBackgroundImage],construct:function(p,q,r){qx.ui.decoration.Abstract.call(this);if(p!=null){this.setWidth(p);}if(q!=null){this.setStyle(q);}if(r!=null){this.setColor(r);}},properties:{width:{check:b,init:0,apply:g},style:{nullable:true,check:[k,j,h,i],init:k,apply:o},color:{nullable:true,check:m,apply:o},backgroundColor:{check:m,nullable:true,apply:o}},members:{__rP:null,_getDefaultInsets:function(){var s=this.getWidth();return {top:s,right:s,bottom:s,left:s};},_isInitialized:function(){return !!this.__rP;},getMarkup:function(){if(this.__rP){return this.__rP;}var t={position:a,top:0,left:0};var u=this.getWidth();{};var w=qx.theme.manager.Color.getInstance();t.border=u+c+this.getStyle()+e+(w.resolve(this.getColor())||n);var v=this._generateBackgroundMarkup(t);return this.__rP=v;},resize:function(x,y,z){var B=this.getBackgroundImage()&&this.getBackgroundRepeat()==d;if(B||qx.bom.client.Feature.CONTENT_BOX){var A=this.getWidth()*2;y-=A;z-=A;if(y<0){y=0;}if(z<0){z=0;}}x.style.width=y+l;x.style.height=z+l;},tint:function(C,D){var E=qx.theme.manager.Color.getInstance();if(D==null){D=this.getBackgroundColor();}C.style.backgroundColor=E.resolve(D)||n;},_applyWidth:function(){{};this._resetInsets();},_applyStyle:function(){{};}},destruct:function(){this.__rP=null;}});})();(function(){var m="Number",l="_applyInsets",k="-l",j="insetRight",i="insetTop",h="_applyBaseImage",g="insetBottom",f="set",e="shorthand",d="-t",a="insetLeft",c="String",b="qx.ui.decoration.Grid";qx.Class.define(b,{extend:qx.core.Object,implement:[qx.ui.decoration.IDecorator],construct:function(n,o){qx.core.Object.call(this);if(qx.ui.decoration.css3.BorderImage.IS_SUPPORTED){this.__oA=new qx.ui.decoration.css3.BorderImage();if(n){this.__oB(n);}}else{this.__oA=new qx.ui.decoration.GridDiv(n);}if(o!=null){this.__oA.setInsets(o);}},properties:{baseImage:{check:c,nullable:true,apply:h},insetLeft:{check:m,nullable:true,apply:l},insetRight:{check:m,nullable:true,apply:l},insetBottom:{check:m,nullable:true,apply:l},insetTop:{check:m,nullable:true,apply:l},insets:{group:[i,j,g,a],mode:e}},members:{__oA:null,getMarkup:function(){return this.__oA.getMarkup();},resize:function(p,q,r){this.__oA.resize(p,q,r);},tint:function(s,t){},getInsets:function(){return this.__oA.getInsets();},_applyInsets:function(u,v,name){var w=f+qx.lang.String.firstUp(name);this.__oA[w](u);},_applyBaseImage:function(x,y){if(this.__oA instanceof qx.ui.decoration.GridDiv){this.__oA.setBaseImage(x);}else{this.__oB(x);}},__oB:function(z){var B,D;this.__oA.setBorderImage(z);var F=qx.util.AliasManager.getInstance().resolve(z);var G=/(.*)(\.[a-z]+)$/.exec(F);var C=G[1];var E=G[2];var A=qx.util.ResourceManager.getInstance();var H=A.getImageHeight(C+d+E);var I=A.getImageWidth(C+k+E);{};this.__oA.setSlice([H,I]);}},destruct:function(){this.__oA=null;}});})();(function(){var m="solid",l="scale",k="border-main",j="white",i="repeat-x",h="border-separator",g="background-light",f="invalid",e="border-focused-invalid",d="border-input",bt="border-disabled",bs="decoration/table/header-cell.png",br="decoration/form/input.png",bq="#f8f8f8",bp="decoration/scrollbar/scrollbar-button-bg-horizontal.png",bo="#b6b6b6",bn="background-pane",bm="repeat-y",bl="decoration/form/input-focused.png",bk="#33508D",t="decoration/selection.png",u="decoration/scrollbar/scrollbar-button-bg-vertical.png",r="decoration/tabview/tab-button-top-active.png",s="black",p="decoration/group-item.png",q="decoration/form/button-c.png",n="decoration/scrollbar/scrollbar-bg-vertical.png",o="decoration/form/button.png",B="decoration/form/button-checked.png",C="decoration/tabview/tab-button-left-inactive.png",O="decoration/groupbox/groupbox.png",K="#FAFAFA",W="decoration/pane/pane.png",R="dotted",bg="decoration/toolbar/toolbar-part.gif",bc="decoration/tabview/tab-button-top-inactive.png",G="decoration/menu/bar-background.png",bj="center",bi="decoration/tabview/tab-button-bottom-active.png",bh="decoration/form/button-hovered.png",F="decoration/form/tooltip-error-arrow.png",I="decoration/window/captionbar-inactive.png",J="qx/decoration/Modern",M="decoration/menu/background.png",P="decoration/window/statusbar.png",S="border-focused",Y="table-focus-indicator",be="#F2F2F2",v="decoration/form/button-checked-c.png",w="decoration/scrollbar/scrollbar-bg-horizontal.png",H="qx.theme.modern.Decoration",V="#f4f4f4",U="decoration/shadow/shadow-small.png",T="decoration/app-header.png",bb="decoration/tabview/tabview-pane.png",ba="decoration/form/tooltip-error.png",Q="decoration/form/button-focused.png",X="decoration/tabview/tab-button-bottom-inactive.png",a="decoration/form/button-disabled.png",bd="decoration/tabview/tab-button-right-active.png",x="decoration/form/button-pressed.png",y="no-repeat",L="decoration/window/captionbar-active.png",b="decoration/tabview/tab-button-left-active.png",c="background-splitpane",E="decoration/form/button-checked-focused.png",z="#C5C5C5",A="decoration/toolbar/toolbar-gradient.png",D="decoration/tabview/tab-button-right-inactive.png",N="#b8b8b8",bf="decoration/shadow/shadow.png";qx.Theme.define(H,{aliases:{decoration:J},decorations:{"main":{decorator:qx.ui.decoration.Uniform,style:{width:1,color:k}},"selected":{decorator:qx.ui.decoration.Background,style:{backgroundImage:t,backgroundRepeat:l}},"selected-dragover":{decorator:qx.ui.decoration.Single,style:{backgroundImage:t,backgroundRepeat:l,bottom:[2,m,bk]}},"dragover":{decorator:qx.ui.decoration.Single,style:{bottom:[2,m,bk]}},"pane":{decorator:qx.ui.decoration.Grid,style:{baseImage:W,insets:[0,2,3,0]}},"group":{decorator:qx.ui.decoration.Grid,style:{baseImage:O}},"border-invalid":{decorator:qx.ui.decoration.Beveled,style:{outerColor:f,innerColor:j,innerOpacity:0.5,backgroundImage:br,backgroundRepeat:i,backgroundColor:g}},"keyboard-focus":{decorator:qx.ui.decoration.Single,style:{width:1,color:s,style:R}},"separator-horizontal":{decorator:qx.ui.decoration.Single,style:{widthLeft:1,colorLeft:h}},"separator-vertical":{decorator:qx.ui.decoration.Single,style:{widthTop:1,colorTop:h}},"tooltip-error":{decorator:qx.ui.decoration.Grid,style:{baseImage:ba,insets:[2,5,5,2]}},"tooltip-error-arrow":{decorator:qx.ui.decoration.Background,style:{backgroundImage:F,backgroundPositionY:bj,backgroundRepeat:y,insets:[0,0,0,10]}},"shadow-window":{decorator:qx.ui.decoration.Grid,style:{baseImage:bf,insets:[4,8,8,4]}},"shadow-popup":{decorator:qx.ui.decoration.Grid,style:{baseImage:U,insets:[0,3,3,0]}},"scrollbar-horizontal":{decorator:qx.ui.decoration.Background,style:{backgroundImage:w,backgroundRepeat:i}},"scrollbar-vertical":{decorator:qx.ui.decoration.Background,style:{backgroundImage:n,backgroundRepeat:bm}},"scrollbar-slider-horizontal":{decorator:qx.ui.decoration.Beveled,style:{backgroundImage:bp,backgroundRepeat:l,outerColor:k,innerColor:j,innerOpacity:0.5}},"scrollbar-slider-horizontal-disabled":{decorator:qx.ui.decoration.Beveled,style:{backgroundImage:bp,backgroundRepeat:l,outerColor:bt,innerColor:j,innerOpacity:0.3}},"scrollbar-slider-vertical":{decorator:qx.ui.decoration.Beveled,style:{backgroundImage:u,backgroundRepeat:l,outerColor:k,innerColor:j,innerOpacity:0.5}},"scrollbar-slider-vertical-disabled":{decorator:qx.ui.decoration.Beveled,style:{backgroundImage:u,backgroundRepeat:l,outerColor:bt,innerColor:j,innerOpacity:0.3}},"button":{decorator:qx.ui.decoration.Grid,style:{baseImage:o,insets:2}},"button-disabled":{decorator:qx.ui.decoration.Grid,style:{baseImage:a,insets:2}},"button-focused":{decorator:qx.ui.decoration.Grid,style:{baseImage:Q,insets:2}},"button-hovered":{decorator:qx.ui.decoration.Grid,style:{baseImage:bh,insets:2}},"button-pressed":{decorator:qx.ui.decoration.Grid,style:{baseImage:x,insets:2}},"button-checked":{decorator:qx.ui.decoration.Grid,style:{baseImage:B,insets:2}},"button-checked-focused":{decorator:qx.ui.decoration.Grid,style:{baseImage:E,insets:2}},"button-invalid-shadow":{decorator:qx.ui.decoration.Beveled,style:{outerColor:f,innerColor:e,insets:[1]}},"checkbox-invalid-shadow":{decorator:qx.ui.decoration.Beveled,style:{outerColor:f,innerColor:e,insets:[0]}},"input":{decorator:qx.ui.decoration.Beveled,style:{outerColor:d,innerColor:j,innerOpacity:0.5,backgroundImage:br,backgroundRepeat:i,backgroundColor:g}},"input-focused":{decorator:qx.ui.decoration.Beveled,style:{outerColor:d,innerColor:S,backgroundImage:bl,backgroundRepeat:i,backgroundColor:g}},"input-focused-invalid":{decorator:qx.ui.decoration.Beveled,style:{outerColor:f,innerColor:e,backgroundImage:bl,backgroundRepeat:i,backgroundColor:g,insets:[2]}},"input-disabled":{decorator:qx.ui.decoration.Beveled,style:{outerColor:bt,innerColor:j,innerOpacity:0.5,backgroundImage:br,backgroundRepeat:i,backgroundColor:g}},"toolbar":{decorator:qx.ui.decoration.Background,style:{backgroundImage:A,backgroundRepeat:l}},"toolbar-button-hovered":{decorator:qx.ui.decoration.Beveled,style:{outerColor:bo,innerColor:bq,backgroundImage:q,backgroundRepeat:l}},"toolbar-button-checked":{decorator:qx.ui.decoration.Beveled,style:{outerColor:bo,innerColor:bq,backgroundImage:v,backgroundRepeat:l}},"toolbar-separator":{decorator:qx.ui.decoration.Single,style:{widthLeft:1,widthRight:1,colorLeft:N,colorRight:V,styleLeft:m,styleRight:m}},"toolbar-part":{decorator:qx.ui.decoration.Background,style:{backgroundImage:bg,backgroundRepeat:bm}},"tabview-pane":{decorator:qx.ui.decoration.Grid,style:{baseImage:bb,insets:[4,6,7,4]}},"tabview-page-button-top-active":{decorator:qx.ui.decoration.Grid,style:{baseImage:r}},"tabview-page-button-top-inactive":{decorator:qx.ui.decoration.Grid,style:{baseImage:bc}},"tabview-page-button-bottom-active":{decorator:qx.ui.decoration.Grid,style:{baseImage:bi}},"tabview-page-button-bottom-inactive":{decorator:qx.ui.decoration.Grid,style:{baseImage:X}},"tabview-page-button-left-active":{decorator:qx.ui.decoration.Grid,style:{baseImage:b}},"tabview-page-button-left-inactive":{decorator:qx.ui.decoration.Grid,style:{baseImage:C}},"tabview-page-button-right-active":{decorator:qx.ui.decoration.Grid,style:{baseImage:bd}},"tabview-page-button-right-inactive":{decorator:qx.ui.decoration.Grid,style:{baseImage:D}},"splitpane":{decorator:qx.ui.decoration.Uniform,style:{backgroundColor:bn,width:3,color:c,style:m}},"window":{decorator:qx.ui.decoration.Single,style:{backgroundColor:bn,width:1,color:k,widthTop:0}},"window-captionbar-active":{decorator:qx.ui.decoration.Grid,style:{baseImage:L}},"window-captionbar-inactive":{decorator:qx.ui.decoration.Grid,style:{baseImage:I}},"window-statusbar":{decorator:qx.ui.decoration.Grid,style:{baseImage:P}},"table":{decorator:qx.ui.decoration.Single,style:{width:1,color:k,style:m}},"table-statusbar":{decorator:qx.ui.decoration.Single,style:{widthTop:1,colorTop:k,style:m}},"table-scroller-header":{decorator:qx.ui.decoration.Single,style:{backgroundImage:bs,backgroundRepeat:l,widthBottom:1,colorBottom:k,style:m}},"table-header-cell":{decorator:qx.ui.decoration.Single,style:{widthRight:1,colorRight:h,styleRight:m}},"table-header-cell-hovered":{decorator:qx.ui.decoration.Single,style:{widthRight:1,colorRight:h,styleRight:m,widthBottom:1,colorBottom:j,styleBottom:m}},"table-column-button":{decorator:qx.ui.decoration.Single,style:{backgroundImage:bs,backgroundRepeat:l,widthBottom:1,colorBottom:k,style:m}},"table-scroller-focus-indicator":{decorator:qx.ui.decoration.Single,style:{width:2,color:Y,style:m}},"progressive-table-header":{decorator:qx.ui.decoration.Single,style:{width:1,color:k,style:m}},"progressive-table-header-cell":{decorator:qx.ui.decoration.Single,style:{backgroundImage:bs,backgroundRepeat:l,widthRight:1,colorRight:be,style:m}},"menu":{decorator:qx.ui.decoration.Single,style:{backgroundImage:M,backgroundRepeat:l,width:1,color:k,style:m}},"menu-separator":{decorator:qx.ui.decoration.Single,style:{widthTop:1,colorTop:z,widthBottom:1,colorBottom:K}},"menubar":{decorator:qx.ui.decoration.Single,style:{backgroundImage:G,backgroundRepeat:l,width:1,color:h,style:m}},"app-header":{decorator:qx.ui.decoration.Background,style:{backgroundImage:T,backgroundRepeat:l}},"progressbar":{decorator:qx.ui.decoration.Single,style:{width:1,color:d}},"group-item":{decorator:qx.ui.decoration.Background,style:{backgroundImage:p,backgroundRepeat:l}}}});})();(function(){var j="#CCCCCC",i="#F3F3F3",h="#E4E4E4",g="#1a1a1a",f="#084FAB",e="gray",d="#fffefe",c="white",b="#4a4a4a",a="#EEEEEE",K="#80B4EF",J="#C72B2B",I="#ffffdd",H="#334866",G="#00204D",F="#666666",E="#CBC8CD",D="#99C3FE",C="#808080",B="#F4F4F4",q="#001533",r="#909090",o="#FCFCFC",p="#314a6e",m="#B6B6B6",n="#0880EF",k="#4d4d4d",l="#DFDFDF",s="#000000",t="#FF9999",w="#7B7A7E",v="#26364D",y="#990000",x="#AFAFAF",A="#404955",z="#AAAAAA",u="qx.theme.modern.Color";qx.Theme.define(u,{colors:{"background-application":l,"background-pane":i,"background-light":o,"background-medium":a,"background-splitpane":x,"background-tip":I,"background-tip-error":J,"background-odd":h,"text-light":r,"text-gray":b,"text-label":g,"text-title":p,"text-input":s,"text-hovered":q,"text-disabled":w,"text-selected":d,"text-active":v,"text-inactive":A,"text-placeholder":E,"border-main":k,"border-separator":C,"border-input":H,"border-disabled":m,"border-pane":G,"border-button":F,"border-column":j,"border-focused":D,"invalid":y,"border-focused-invalid":t,"table-pane":i,"table-focus-indicator":n,"table-row-background-focused-selected":f,"table-row-background-focused":K,"table-row-background-selected":f,"table-row-background-even":i,"table-row-background-odd":h,"table-row-selected":d,"table-row":g,"table-row-line":j,"table-column-line":j,"progressive-table-header":z,"progressive-table-row-background-even":B,"progressive-table-row-background-odd":h,"progressive-progressbar-background":e,"progressive-progressbar-indicator-done":j,"progressive-progressbar-indicator-undone":c,"progressive-progressbar-percent-background":e,"progressive-progressbar-percent-text":c}});})();(function(){var b="apiviewer.Theme",a="APIViewer theme";qx.Theme.define(b,{title:a,meta:{color:qx.theme.modern.Color,decoration:qx.theme.modern.Decoration,font:qx.theme.modern.Font,appearance:apiviewer.Appearance,icon:qx.theme.icon.Tango}});})();(function(){var j="_applyStyle",i="stretch",h="Integer",g="px",f=" ",e="repeat",d="round",c="shorthand",b="px ",a="sliceBottom",y=";'></div>",x="<div style='",w="sliceLeft",v="sliceRight",u="repeatX",t="String",s="qx.ui.decoration.css3.BorderImage",r="border-box",q="",p='") ',n="sliceTop",o='url("',l="hidden",m="repeatY",k="absolute";qx.Class.define(s,{extend:qx.ui.decoration.Abstract,construct:function(z,A){qx.ui.decoration.Abstract.call(this);if(z!=null){this.setBorderImage(z);}if(A!=null){this.setSlice(A);}},statics:{IS_SUPPORTED:qx.bom.element.Style.isPropertySupported("borderImage")},properties:{borderImage:{check:t,nullable:true,apply:j},sliceTop:{check:h,init:0,apply:j},sliceRight:{check:h,init:0,apply:j},sliceBottom:{check:h,init:0,apply:j},sliceLeft:{check:h,init:0,apply:j},slice:{group:[n,v,a,w],mode:c},repeatX:{check:[i,e,d],init:i,apply:j},repeatY:{check:[i,e,d],init:i,apply:j},repeat:{group:[u,m],mode:c}},members:{__nw:null,_getDefaultInsets:function(){return {top:0,right:0,bottom:0,left:0};},_isInitialized:function(){return !!this.__nw;},getMarkup:function(){if(this.__nw){return this.__nw;}var B=this._resolveImageUrl(this.getBorderImage());var C=[this.getSliceTop(),this.getSliceRight(),this.getSliceBottom(),this.getSliceLeft()];var D=[this.getRepeatX(),this.getRepeatY()].join(f);this.__nw=[x,qx.bom.element.Style.compile({"borderImage":o+B+p+C.join(f)+f+D,position:k,lineHeight:0,fontSize:0,overflow:l,boxSizing:r,borderWidth:C.join(b)+g}),y].join(q);return this.__nw;},resize:function(E,F,G){E.style.width=F+g;E.style.height=G+g;},tint:function(H,I){},_applyStyle:function(){{};},_resolveImageUrl:function(J){return qx.util.ResourceManager.getInstance().toUri(qx.util.AliasManager.getInstance().resolve(J));}},destruct:function(){this.__nw=null;}});})();(function(){var j="px",i="0px",h="-1px",g="no-repeat",f="scale-x",e="scale-y",d="-tr",c="-l",b='</div>',a="scale",x="qx.client",w="-br",v="-t",u="-tl",t="-r",s='<div style="position:absolute;top:0;left:0;overflow:hidden;font-size:0;line-height:0;">',r="_applyBaseImage",q="-b",p="String",o="",m="-bl",n="qx.ui.decoration.GridDiv",k="-c",l="mshtml";qx.Class.define(n,{extend:qx.ui.decoration.Abstract,construct:function(y,z){qx.ui.decoration.Abstract.call(this);if(y!=null){this.setBaseImage(y);}if(z!=null){this.setInsets(z);}},properties:{baseImage:{check:p,nullable:true,apply:r}},members:{__nx:null,__ny:null,__nz:null,_getDefaultInsets:function(){return {top:0,right:0,bottom:0,left:0};},_isInitialized:function(){return !!this.__nx;},getMarkup:function(){if(this.__nx){return this.__nx;}var A=qx.bom.element.Decoration;var B=this.__ny;var C=this.__nz;var D=[];D.push(s);D.push(A.create(B.tl,g,{top:0,left:0}));D.push(A.create(B.t,f,{top:0,left:C.left+j}));D.push(A.create(B.tr,g,{top:0,right:0}));D.push(A.create(B.bl,g,{bottom:0,left:0}));D.push(A.create(B.b,f,{bottom:0,left:C.left+j}));D.push(A.create(B.br,g,{bottom:0,right:0}));D.push(A.create(B.l,e,{top:C.top+j,left:0}));D.push(A.create(B.c,a,{top:C.top+j,left:C.left+j}));D.push(A.create(B.r,e,{top:C.top+j,right:0}));D.push(b);return this.__nx=D.join(o);},resize:function(E,F,G){var H=this.__nz;var innerWidth=F-H.left-H.right;var innerHeight=G-H.top-H.bottom;if(innerWidth<0){innerWidth=0;}if(innerHeight<0){innerHeight=0;}E.style.width=F+j;E.style.height=G+j;E.childNodes[1].style.width=innerWidth+j;E.childNodes[4].style.width=innerWidth+j;E.childNodes[7].style.width=innerWidth+j;E.childNodes[6].style.height=innerHeight+j;E.childNodes[7].style.height=innerHeight+j;E.childNodes[8].style.height=innerHeight+j;if(qx.core.Variant.isSet(x,l)){if(qx.bom.client.Engine.VERSION<7||(qx.bom.client.Feature.QUIRKS_MODE&&qx.bom.client.Engine.VERSION<8)){if(F%2==1){E.childNodes[2].style.marginRight=h;E.childNodes[5].style.marginRight=h;E.childNodes[8].style.marginRight=h;}else{E.childNodes[2].style.marginRight=i;E.childNodes[5].style.marginRight=i;E.childNodes[8].style.marginRight=i;}if(G%2==1){E.childNodes[3].style.marginBottom=h;E.childNodes[4].style.marginBottom=h;E.childNodes[5].style.marginBottom=h;}else{E.childNodes[3].style.marginBottom=i;E.childNodes[4].style.marginBottom=i;E.childNodes[5].style.marginBottom=i;}}}},tint:function(I,J){},_applyBaseImage:function(K,L){{};if(K){var P=this._resolveImageUrl(K);var Q=/(.*)(\.[a-z]+)$/.exec(P);var O=Q[1];var N=Q[2];var M=this.__ny={tl:O+u+N,t:O+v+N,tr:O+d+N,bl:O+m+N,b:O+q+N,br:O+w+N,l:O+c+N,c:O+k+N,r:O+t+N};this.__nz=this._computeEdgeSizes(M);}},_resolveImageUrl:function(R){return qx.util.AliasManager.getInstance().resolve(R);},_computeEdgeSizes:function(S){var T=qx.util.ResourceManager.getInstance();return {top:T.getImageHeight(S.t),bottom:T.getImageHeight(S.b),left:T.getImageWidth(S.l),right:T.getImageWidth(S.r)};}},destruct:function(){this.__nx=this.__ny=this.__nz=null;}});})();(function(){var a="apiviewer.test.StringExtend";qx.Class.define(a,{extend:String,members:{}});})();
-
-qx.$$loader.init();
-
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/bootstrap.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/bootstrap.js
deleted file mode 100644
index c7b9d89d18e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/bootstrap.js
+++ /dev/null
@@ -1,1829 +0,0 @@
-/* Modifications: replaced one ; with \n for testing purposes
- * Before the second !function -- nd */
-
-/* ===================================================
- * bootstrap-transition.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#transitions
- * ===================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ========================================================== */
-
-
-!function ($) {
-
- $(function () {
-
- "use strict"; // jshint ;_;
-
-
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
- * ======================================================= */
-
- $.support.transition = (function () {
-
- var transitionEnd = (function () {
-
- var el = document.createElement('bootstrap')
- , transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd'
- , 'msTransition' : 'MSTransitionEnd'
- , 'transition' : 'transitionend'
- }
- , name
-
- for (name in transEndEventNames){
- if (el.style[name] !== undefined) {
- return transEndEventNames[name]
- }
- }
-
- }())
-
- return transitionEnd && {
- end: transitionEnd
- }
-
- })()
-
- })
-
-}(window.jQuery)
-/* ==========================================================
- * bootstrap-alert.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#alerts
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* ALERT CLASS DEFINITION
- * ====================== */
-
- var dismiss = '[data-dismiss="alert"]'
- , Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- , selector = $this.attr('data-target')
- , $parent
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = $(selector)
-
- e && e.preventDefault()
-
- $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
-
- $parent.trigger(e = $.Event('close'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- $parent
- .trigger('closed')
- .remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent.on($.support.transition.end, removeElement) :
- removeElement()
- }
-
-
- /* ALERT PLUGIN DEFINITION
- * ======================= */
-
- $.fn.alert = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('alert')
- if (!data) $this.data('alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.alert.Constructor = Alert
-
-
- /* ALERT DATA-API
- * ============== */
-
- $(function () {
- $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
- })
-
-}(window.jQuery);/* ============================================================
- * bootstrap-button.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#buttons
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* BUTTON PUBLIC CLASS DEFINITION
- * ============================== */
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.button.defaults, options)
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- , $el = this.$element
- , data = $el.data()
- , val = $el.is('input') ? 'val' : 'html'
-
- state = state + 'Text'
- data.resetText || $el.data('resetText', $el[val]())
-
- $el[val](data[state] || this.options[state])
-
- // push to event loop to allow forms to submit
- setTimeout(function () {
- state == 'loadingText' ?
- $el.addClass(d).attr(d, d) :
- $el.removeClass(d).removeAttr(d)
- }, 0)
- }
-
- Button.prototype.toggle = function () {
- var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
-
- $parent && $parent
- .find('.active')
- .removeClass('active')
-
- this.$element.toggleClass('active')
- }
-
-
- /* BUTTON PLUGIN DEFINITION
- * ======================== */
-
- $.fn.button = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('button')
- , options = typeof option == 'object' && option
- if (!data) $this.data('button', (data = new Button(this, options)))
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- $.fn.button.defaults = {
- loadingText: 'loading...'
- }
-
- $.fn.button.Constructor = Button
-
-
- /* BUTTON DATA-API
- * =============== */
-
- $(function () {
- $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- $btn.button('toggle')
- })
- })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-carousel.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#carousel
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CAROUSEL CLASS DEFINITION
- * ========================= */
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.options = options
- this.options.slide && this.slide(this.options.slide)
- this.options.pause == 'hover' && this.$element
- .on('mouseenter', $.proxy(this.pause, this))
- .on('mouseleave', $.proxy(this.cycle, this))
- }
-
- Carousel.prototype = {
-
- cycle: function (e) {
- if (!e) this.paused = false
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
- return this
- }
-
- , to: function (pos) {
- var $active = this.$element.find('.active')
- , children = $active.parent().children()
- , activePos = children.index($active)
- , that = this
-
- if (pos > (children.length - 1) || pos < 0) return
-
- if (this.sliding) {
- return this.$element.one('slid', function () {
- that.to(pos)
- })
- }
-
- if (activePos == pos) {
- return this.pause().cycle()
- }
-
- return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
- }
-
- , pause: function (e) {
- if (!e) this.paused = true
- clearInterval(this.interval)
- this.interval = null
- return this
- }
-
- , next: function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- , prev: function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- , slide: function (type, next) {
- var $active = this.$element.find('.active')
- , $next = next || $active[type]()
- , isCycling = this.interval
- , direction = type == 'next' ? 'left' : 'right'
- , fallback = type == 'next' ? 'first' : 'last'
- , that = this
- , e = $.Event('slide')
-
- this.sliding = true
-
- isCycling && this.pause()
-
- $next = $next.length ? $next : this.$element.find('.item')[fallback]()
-
- if ($next.hasClass('active')) return
-
- if ($.support.transition && this.$element.hasClass('slide')) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- this.$element.one($.support.transition.end, function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () { that.$element.trigger('slid') }, 0)
- })
- } else {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger('slid')
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
- }
-
-
- /* CAROUSEL PLUGIN DEFINITION
- * ========================== */
-
- $.fn.carousel = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('carousel')
- , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
- if (!data) $this.data('carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (typeof option == 'string' || (option = options.slide)) data[option]()
- else if (options.interval) data.cycle()
- })
- }
-
- $.fn.carousel.defaults = {
- interval: 5000
- , pause: 'hover'
- }
-
- $.fn.carousel.Constructor = Carousel
-
-
- /* CAROUSEL DATA-API
- * ================= */
-
- $(function () {
- $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
- var $this = $(this), href
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
- $target.carousel(options)
- e.preventDefault()
- })
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-collapse.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#collapse
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* COLLAPSE PUBLIC CLASS DEFINITION
- * ================================ */
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.collapse.defaults, options)
-
- if (this.options.parent) {
- this.$parent = $(this.options.parent)
- }
-
- this.options.toggle && this.toggle()
- }
-
- Collapse.prototype = {
-
- constructor: Collapse
-
- , dimension: function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- , show: function () {
- var dimension
- , scroll
- , actives
- , hasData
-
- if (this.transitioning) return
-
- dimension = this.dimension()
- scroll = $.camelCase(['scroll', dimension].join('-'))
- actives = this.$parent && this.$parent.find('> .accordion-group > .in')
-
- if (actives && actives.length) {
- hasData = actives.data('collapse')
- if (hasData && hasData.transitioning) return
- actives.collapse('hide')
- hasData || actives.data('collapse', null)
- }
-
- this.$element[dimension](0)
- this.transition('addClass', $.Event('show'), 'shown')
- this.$element[dimension](this.$element[0][scroll])
- }
-
- , hide: function () {
- var dimension
- if (this.transitioning) return
- dimension = this.dimension()
- this.reset(this.$element[dimension]())
- this.transition('removeClass', $.Event('hide'), 'hidden')
- this.$element[dimension](0)
- }
-
- , reset: function (size) {
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- [dimension](size || 'auto')
- [0].offsetWidth
-
- this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
-
- return this
- }
-
- , transition: function (method, startEvent, completeEvent) {
- var that = this
- , complete = function () {
- if (startEvent.type == 'show') that.reset()
- that.transitioning = 0
- that.$element.trigger(completeEvent)
- }
-
- this.$element.trigger(startEvent)
-
- if (startEvent.isDefaultPrevented()) return
-
- this.transitioning = 1
-
- this.$element[method]('in')
-
- $.support.transition && this.$element.hasClass('collapse') ?
- this.$element.one($.support.transition.end, complete) :
- complete()
- }
-
- , toggle: function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- }
-
-
- /* COLLAPSIBLE PLUGIN DEFINITION
- * ============================== */
-
- $.fn.collapse = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('collapse')
- , options = typeof option == 'object' && option
- if (!data) $this.data('collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.collapse.defaults = {
- toggle: true
- }
-
- $.fn.collapse.Constructor = Collapse
-
-
- /* COLLAPSIBLE DATA-API
- * ==================== */
-
- $(function () {
- $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
- var $this = $(this), href
- , target = $this.attr('data-target')
- || e.preventDefault()
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
- , option = $(target).data('collapse') ? 'toggle' : $this.data()
- $(target).collapse(option)
- })
- })
-
-}(window.jQuery);/* ============================================================
- * bootstrap-dropdown.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#dropdowns
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ============================================================ */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* DROPDOWN CLASS DEFINITION
- * ========================= */
-
- var toggle = '[data-toggle="dropdown"]'
- , Dropdown = function (element) {
- var $el = $(element).on('click.dropdown.data-api', this.toggle)
- $('html').on('click.dropdown.data-api', function () {
- $el.parent().removeClass('open')
- })
- }
-
- Dropdown.prototype = {
-
- constructor: Dropdown
-
- , toggle: function (e) {
- var $this = $(this)
- , $parent
- , selector
- , isActive
-
- if ($this.is('.disabled, :disabled')) return
-
- selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- $parent = $(selector)
- $parent.length || ($parent = $this.parent())
-
- isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) $parent.toggleClass('open')
-
- return false
- }
-
- }
-
- function clearMenus() {
- $(toggle).parent().removeClass('open')
- }
-
-
- /* DROPDOWN PLUGIN DEFINITION
- * ========================== */
-
- $.fn.dropdown = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('dropdown')
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- $.fn.dropdown.Constructor = Dropdown
-
-
- /* APPLY TO STANDARD DROPDOWN ELEMENTS
- * =================================== */
-
- $(function () {
- $('html').on('click.dropdown.data-api', clearMenus)
- $('body')
- .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- })
-
-}(window.jQuery);/* =========================================================
- * bootstrap-modal.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#modals
- * =========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ========================================================= */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* MODAL CLASS DEFINITION
- * ====================== */
-
- var Modal = function (content, options) {
- this.options = options
- this.$element = $(content)
- .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
- }
-
- Modal.prototype = {
-
- constructor: Modal
-
- , toggle: function () {
- return this[!this.isShown ? 'show' : 'hide']()
- }
-
- , show: function () {
- var that = this
- , e = $.Event('show')
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- $('body').addClass('modal-open')
-
- this.isShown = true
-
- escape.call(this)
- backdrop.call(this, function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body) //don't move modals dom position
- }
-
- that.$element
- .show()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element.addClass('in')
-
- transition ?
- that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
- that.$element.trigger('shown')
-
- })
- }
-
- , hide: function (e) {
- e && e.preventDefault()
-
- var that = this
-
- e = $.Event('hide')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- $('body').removeClass('modal-open')
-
- escape.call(this)
-
- this.$element.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade') ?
- hideWithTransition.call(this) :
- hideModal.call(this)
- }
-
- }
-
-
- /* MODAL PRIVATE METHODS
- * ===================== */
-
- function hideWithTransition() {
- var that = this
- , timeout = setTimeout(function () {
- that.$element.off($.support.transition.end)
- hideModal.call(that)
- }, 500)
-
- this.$element.one($.support.transition.end, function () {
- clearTimeout(timeout)
- hideModal.call(that)
- })
- }
-
- function hideModal(that) {
- this.$element
- .hide()
- .trigger('hidden')
-
- backdrop.call(this)
- }
-
- function backdrop(callback) {
- var that = this
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
- .appendTo(document.body)
-
- if (this.options.backdrop != 'static') {
- this.$backdrop.click($.proxy(this.hide, this))
- }
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- doAnimate ?
- this.$backdrop.one($.support.transition.end, callback) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- $.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
- removeBackdrop.call(this)
-
- } else if (callback) {
- callback()
- }
- }
-
- function removeBackdrop() {
- this.$backdrop.remove()
- this.$backdrop = null
- }
-
- function escape() {
- var that = this
- if (this.isShown && this.options.keyboard) {
- $(document).on('keyup.dismiss.modal', function ( e ) {
- e.which == 27 && that.hide()
- })
- } else if (!this.isShown) {
- $(document).off('keyup.dismiss.modal')
- }
- }
-
-
- /* MODAL PLUGIN DEFINITION
- * ======================= */
-
- $.fn.modal = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('modal')
- , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
- if (!data) $this.data('modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option]()
- else if (options.show) data.show()
- })
- }
-
- $.fn.modal.defaults = {
- backdrop: true
- , keyboard: true
- , show: true
- }
-
- $.fn.modal.Constructor = Modal
-
-
- /* MODAL DATA-API
- * ============== */
-
- $(function () {
- $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
- var $this = $(this), href
- , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
-
- e.preventDefault()
- $target.modal(option)
- })
- })
-
-}(window.jQuery);/* ===========================================================
- * bootstrap-tooltip.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#tooltips
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TOOLTIP PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Tooltip = function (element, options) {
- this.init('tooltip', element, options)
- }
-
- Tooltip.prototype = {
-
- constructor: Tooltip
-
- , init: function (type, element, options) {
- var eventIn
- , eventOut
-
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.enabled = true
-
- if (this.options.trigger != 'manual') {
- eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
- eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
- this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- , getOptions: function (options) {
- options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay
- , hide: options.delay
- }
- }
-
- return options
- }
-
- , enter: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- clearTimeout(this.timeout)
- self.hoverState = 'in'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- , leave: function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
- if (this.timeout) clearTimeout(this.timeout)
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.hoverState = 'out'
- this.timeout = setTimeout(function() {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- , show: function () {
- var $tip
- , inside
- , pos
- , actualWidth
- , actualHeight
- , placement
- , tp
-
- if (this.hasContent() && this.enabled) {
- $tip = this.tip()
- this.setContent()
-
- if (this.options.animation) {
- $tip.addClass('fade')
- }
-
- placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- inside = /in/.test(placement)
-
- $tip
- .remove()
- .css({ top: 0, left: 0, display: 'block' })
- .appendTo(inside ? this.$element : document.body)
-
- pos = this.getPosition(inside)
-
- actualWidth = $tip[0].offsetWidth
- actualHeight = $tip[0].offsetHeight
-
- switch (inside ? placement.split(' ')[1] : placement) {
- case 'bottom':
- tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'top':
- tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
- break
- case 'left':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
- break
- case 'right':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
- break
- }
-
- $tip
- .css(tp)
- .addClass(placement)
- .addClass('in')
- }
- }
-
- , isHTML: function(text) {
- // html string detection logic adapted from jQuery
- return typeof text != 'string'
- || ( text.charAt(0) === "<"
- && text.charAt( text.length - 1 ) === ">"
- && text.length >= 3
- ) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
- }
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- , hide: function () {
- var that = this
- , $tip = this.tip()
-
- $tip.removeClass('in')
-
- function removeWithAnimation() {
- var timeout = setTimeout(function () {
- $tip.off($.support.transition.end).remove()
- }, 500)
-
- $tip.one($.support.transition.end, function () {
- clearTimeout(timeout)
- $tip.remove()
- })
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- removeWithAnimation() :
- $tip.remove()
- }
-
- , fixTitle: function () {
- var $e = this.$element
- if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
- }
- }
-
- , hasContent: function () {
- return this.getTitle()
- }
-
- , getPosition: function (inside) {
- return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
- width: this.$element[0].offsetWidth
- , height: this.$element[0].offsetHeight
- })
- }
-
- , getTitle: function () {
- var title
- , $e = this.$element
- , o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- , tip: function () {
- return this.$tip = this.$tip || $(this.options.template)
- }
-
- , validate: function () {
- if (!this.$element[0].parentNode) {
- this.hide()
- this.$element = null
- this.options = null
- }
- }
-
- , enable: function () {
- this.enabled = true
- }
-
- , disable: function () {
- this.enabled = false
- }
-
- , toggleEnabled: function () {
- this.enabled = !this.enabled
- }
-
- , toggle: function () {
- this[this.tip().hasClass('in') ? 'hide' : 'show']()
- }
-
- }
-
-
- /* TOOLTIP PLUGIN DEFINITION
- * ========================= */
-
- $.fn.tooltip = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tooltip')
- , options = typeof option == 'object' && option
- if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tooltip.Constructor = Tooltip
-
- $.fn.tooltip.defaults = {
- animation: true
- , placement: 'top'
- , selector: false
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover'
- , title: ''
- , delay: 0
- }
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-popover.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#popovers
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * =========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* POPOVER PUBLIC CLASS DEFINITION
- * =============================== */
-
- var Popover = function ( element, options ) {
- this.init('popover', element, options)
- }
-
-
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
- ========================================== */
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
-
- constructor: Popover
-
- , setContent: function () {
- var $tip = this.tip()
- , title = this.getTitle()
- , content = this.getContent()
-
- $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
- $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
-
- $tip.removeClass('fade top bottom left right in')
- }
-
- , hasContent: function () {
- return this.getTitle() || this.getContent()
- }
-
- , getContent: function () {
- var content
- , $e = this.$element
- , o = this.options
-
- content = $e.attr('data-content')
- || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
-
- return content
- }
-
- , tip: function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- }
- return this.$tip
- }
-
- })
-
-
- /* POPOVER PLUGIN DEFINITION
- * ======================= */
-
- $.fn.popover = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('popover')
- , options = typeof option == 'object' && option
- if (!data) $this.data('popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.popover.Constructor = Popover
-
- $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
- placement: 'right'
- , content: ''
- , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-scrollspy.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#scrollspy
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ============================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* SCROLLSPY CLASS DEFINITION
- * ========================== */
-
- function ScrollSpy( element, options) {
- var process = $.proxy(this.process, this)
- , $element = $(element).is('body') ? $(window) : $(element)
- , href
- this.options = $.extend({}, $.fn.scrollspy.defaults, options)
- this.$scrollElement = $element.on('scroll.scroll.data-api', process)
- this.selector = (this.options.target
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
- || '') + ' .nav li > a'
- this.$body = $('body')
- this.refresh()
- this.process()
- }
-
- ScrollSpy.prototype = {
-
- constructor: ScrollSpy
-
- , refresh: function () {
- var self = this
- , $targets
-
- this.offsets = $([])
- this.targets = $([])
-
- $targets = this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- , href = $el.data('target') || $el.attr('href')
- , $href = /^#\w/.test(href) && $(href)
- return ( $href
- && href.length
- && [[ $href.position().top, href ]] ) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- self.offsets.push(this[0])
- self.targets.push(this[1])
- })
- }
-
- , process: function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
- , maxScroll = scrollHeight - this.$scrollElement.height()
- , offsets = this.offsets
- , targets = this.targets
- , activeTarget = this.activeTarget
- , i
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets.last()[0])
- && this.activate ( i )
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate( targets[i] )
- }
- }
-
- , activate: function (target) {
- var active
- , selector
-
- this.activeTarget = target
-
- $(this.selector)
- .parent('.active')
- .removeClass('active')
-
- selector = this.selector
- + '[data-target="' + target + '"],'
- + this.selector + '[href="' + target + '"]'
-
- active = $(selector)
- .parent('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu')) {
- active = active.closest('li.dropdown').addClass('active')
- }
-
- active.trigger('activate')
- }
-
- }
-
-
- /* SCROLLSPY PLUGIN DEFINITION
- * =========================== */
-
- $.fn.scrollspy = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('scrollspy')
- , options = typeof option == 'object' && option
- if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.scrollspy.Constructor = ScrollSpy
-
- $.fn.scrollspy.defaults = {
- offset: 10
- }
-
-
- /* SCROLLSPY DATA-API
- * ================== */
-
- $(function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- $spy.scrollspy($spy.data())
- })
- })
-
-}(window.jQuery);/* ========================================================
- * bootstrap-tab.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#tabs
- * ========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ======================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* TAB CLASS DEFINITION
- * ==================== */
-
- var Tab = function ( element ) {
- this.element = $(element)
- }
-
- Tab.prototype = {
-
- constructor: Tab
-
- , show: function () {
- var $this = this.element
- , $ul = $this.closest('ul:not(.dropdown-menu)')
- , selector = $this.attr('data-target')
- , previous
- , $target
- , e
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
- }
-
- if ( $this.parent('li').hasClass('active') ) return
-
- previous = $ul.find('.active a').last()[0]
-
- e = $.Event('show', {
- relatedTarget: previous
- })
-
- $this.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $target = $(selector)
-
- this.activate($this.parent('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $this.trigger({
- type: 'shown'
- , relatedTarget: previous
- })
- })
- }
-
- , activate: function ( element, container, callback) {
- var $active = container.find('> .active')
- , transition = callback
- && $.support.transition
- && $active.hasClass('fade')
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
-
- element.addClass('active')
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if ( element.parent('.dropdown-menu') ) {
- element.closest('li.dropdown').addClass('active')
- }
-
- callback && callback()
- }
-
- transition ?
- $active.one($.support.transition.end, next) :
- next()
-
- $active.removeClass('in')
- }
- }
-
-
- /* TAB PLUGIN DEFINITION
- * ===================== */
-
- $.fn.tab = function ( option ) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('tab')
- if (!data) $this.data('tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.tab.Constructor = Tab
-
-
- /* TAB DATA-API
- * ============ */
-
- $(function () {
- $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault()
- $(this).tab('show')
- })
- })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-typeahead.js v2.0.4
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * 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.
- * ============================================================ */
-
-
-!function($){
-
- "use strict"; // jshint ;_;
-
-
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
- * ================================= */
-
- var Typeahead = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, $.fn.typeahead.defaults, options)
- this.matcher = this.options.matcher || this.matcher
- this.sorter = this.options.sorter || this.sorter
- this.highlighter = this.options.highlighter || this.highlighter
- this.updater = this.options.updater || this.updater
- this.$menu = $(this.options.menu).appendTo('body')
- this.source = this.options.source
- this.shown = false
- this.listen()
- }
-
- Typeahead.prototype = {
-
- constructor: Typeahead
-
- , select: function () {
- var val = this.$menu.find('.active').attr('data-value')
- this.$element
- .val(this.updater(val))
- .change()
- return this.hide()
- }
-
- , updater: function (item) {
- return item
- }
-
- , show: function () {
- var pos = $.extend({}, this.$element.offset(), {
- height: this.$element[0].offsetHeight
- })
-
- this.$menu.css({
- top: pos.top + pos.height
- , left: pos.left
- })
-
- this.$menu.show()
- this.shown = true
- return this
- }
-
- , hide: function () {
- this.$menu.hide()
- this.shown = false
- return this
- }
-
- , lookup: function (event) {
- var that = this
- , items
- , q
-
- this.query = this.$element.val()
-
- if (!this.query) {
- return this.shown ? this.hide() : this
- }
-
- items = $.grep(this.source, function (item) {
- return that.matcher(item)
- })
-
- items = this.sorter(items)
-
- if (!items.length) {
- return this.shown ? this.hide() : this
- }
-
- return this.render(items.slice(0, this.options.items)).show()
- }
-
- , matcher: function (item) {
- return ~item.toLowerCase().indexOf(this.query.toLowerCase())
- }
-
- , sorter: function (items) {
- var beginswith = []
- , caseSensitive = []
- , caseInsensitive = []
- , item
-
- while (item = items.shift()) {
- if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
- else if (~item.indexOf(this.query)) caseSensitive.push(item)
- else caseInsensitive.push(item)
- }
-
- return beginswith.concat(caseSensitive, caseInsensitive)
- }
-
- , highlighter: function (item) {
- var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
- return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
- return '<strong>' + match + '</strong>'
- })
- }
-
- , render: function (items) {
- var that = this
-
- items = $(items).map(function (i, item) {
- i = $(that.options.item).attr('data-value', item)
- i.find('a').html(that.highlighter(item))
- return i[0]
- })
-
- items.first().addClass('active')
- this.$menu.html(items)
- return this
- }
-
- , next: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , next = active.next()
-
- if (!next.length) {
- next = $(this.$menu.find('li')[0])
- }
-
- next.addClass('active')
- }
-
- , prev: function (event) {
- var active = this.$menu.find('.active').removeClass('active')
- , prev = active.prev()
-
- if (!prev.length) {
- prev = this.$menu.find('li').last()
- }
-
- prev.addClass('active')
- }
-
- , listen: function () {
- this.$element
- .on('blur', $.proxy(this.blur, this))
- .on('keypress', $.proxy(this.keypress, this))
- .on('keyup', $.proxy(this.keyup, this))
-
- if ($.browser.webkit || $.browser.msie) {
- this.$element.on('keydown', $.proxy(this.keypress, this))
- }
-
- this.$menu
- .on('click', $.proxy(this.click, this))
- .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
- }
-
- , keyup: function (e) {
- switch(e.keyCode) {
- case 40: // down arrow
- case 38: // up arrow
- break
-
- case 9: // tab
- case 13: // enter
- if (!this.shown) return
- this.select()
- break
-
- case 27: // escape
- if (!this.shown) return
- this.hide()
- break
-
- default:
- this.lookup()
- }
-
- e.stopPropagation()
- e.preventDefault()
- }
-
- , keypress: function (e) {
- if (!this.shown) return
-
- switch(e.keyCode) {
- case 9: // tab
- case 13: // enter
- case 27: // escape
- e.preventDefault()
- break
-
- case 38: // up arrow
- if (e.type != 'keydown') break
- e.preventDefault()
- this.prev()
- break
-
- case 40: // down arrow
- if (e.type != 'keydown') break
- e.preventDefault()
- this.next()
- break
- }
-
- e.stopPropagation()
- }
-
- , blur: function (e) {
- var that = this
- setTimeout(function () { that.hide() }, 150)
- }
-
- , click: function (e) {
- e.stopPropagation()
- e.preventDefault()
- this.select()
- }
-
- , mouseenter: function (e) {
- this.$menu.find('.active').removeClass('active')
- $(e.currentTarget).addClass('active')
- }
-
- }
-
-
- /* TYPEAHEAD PLUGIN DEFINITION
- * =========================== */
-
- $.fn.typeahead = function (option) {
- return this.each(function () {
- var $this = $(this)
- , data = $this.data('typeahead')
- , options = typeof option == 'object' && option
- if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- $.fn.typeahead.defaults = {
- source: []
- , items: 8
- , menu: '<ul class="typeahead dropdown-menu"></ul>'
- , item: '<li><a href="#"></a></li>'
- }
-
- $.fn.typeahead.Constructor = Typeahead
-
-
- /* TYPEAHEAD DATA-API
- * ================== */
-
- $(function () {
- $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
- var $this = $(this)
- if ($this.data('typeahead')) return
- e.preventDefault()
- $this.typeahead($this.data())
- })
- })
-
-}(window.jQuery);
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jquery-1.7.1.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jquery-1.7.1.js
deleted file mode 100644
index 8ccd0ea786e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jquery-1.7.1.js
+++ /dev/null
@@ -1,9266 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.7.1
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Mon Nov 21 21:11:03 2011 -0500
- */
-(function( window, undefined ) {
-
-// Use the correct document accordingly with window argument (sandbox)
-var document = window.document,
- navigator = window.navigator,
- location = window.location;
-var jQuery = (function() {
-
-// Define a local copy of jQuery
-var jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // A simple way to check for HTML strings or ID strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
-
- // Check if a string has a non-whitespace character in it
- rnotwhite = /\S/,
-
- // Used for trimming whitespace
- trimLeft = /^\s+/,
- trimRight = /\s+$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
-
- // Useragent RegExp
- rwebkit = /(webkit)[ \/]([\w.]+)/,
- ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
- rmsie = /(msie) ([\w.]+)/,
- rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
-
- // Matches dashed string for camelizing
- rdashAlpha = /-([a-z]|[0-9])/ig,
- rmsPrefix = /^-ms-/,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return ( letter + "" ).toUpperCase();
- },
-
- // Keep a UserAgent string for use with jQuery.browser
- userAgent = navigator.userAgent,
-
- // For matching the engine and version of the browser
- browserMatch,
-
- // The deferred used on DOM ready
- readyList,
-
- // The ready event handler
- DOMContentLoaded,
-
- // Save a reference to some core methods
- toString = Object.prototype.toString,
- hasOwn = Object.prototype.hasOwnProperty,
- push = Array.prototype.push,
- slice = Array.prototype.slice,
- trim = String.prototype.trim,
- indexOf = Array.prototype.indexOf,
-
- // [[Class]] -> type pairs
- class2type = {};
-
-jQuery.fn = jQuery.prototype = {
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem, ret, doc;
-
- // Handle $(""), $(null), or $(undefined)
- if ( !selector ) {
- return this;
- }
-
- // Handle $(DOMElement)
- if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
- }
-
- // The body element only exists once, optimize finding it
- if ( selector === "body" && !context && document.body ) {
- this.context = document;
- this[0] = document.body;
- this.selector = selector;
- this.length = 1;
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- // Are we dealing with HTML string or an ID?
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = quickExpr.exec( selector );
- }
-
- // Verify a match, and that no context was specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
- doc = ( context ? context.ownerDocument || context : document );
-
- // If a single string is passed in and it's a single tag
- // just do a createElement and skip the rest
- ret = rsingleTag.exec( selector );
-
- if ( ret ) {
- if ( jQuery.isPlainObject( context ) ) {
- selector = [ document.createElement( ret[1] ) ];
- jQuery.fn.attr.call( selector, context, true );
-
- } else {
- selector = [ doc.createElement( ret[1] ) ];
- }
-
- } else {
- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
- selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
- }
-
- return jQuery.merge( this, selector );
-
- // HANDLE: $("#id")
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The current version of jQuery being used
- jquery: "1.7.1",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return slice.call( this, 0 );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems, name, selector ) {
- // Build a new jQuery matched element set
- var ret = this.constructor();
-
- if ( jQuery.isArray( elems ) ) {
- push.apply( ret, elems );
-
- } else {
- jQuery.merge( ret, elems );
- }
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
-
- ret.context = this.context;
-
- if ( name === "find" ) {
- ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
- } else if ( name ) {
- ret.selector = this.selector + "." + name + "(" + selector + ")";
- }
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Attach the listeners
- jQuery.bindReady();
-
- // Add the callback
- readyList.add( fn );
-
- return this;
- },
-
- eq: function( i ) {
- i = +i;
- return i === -1 ?
- this.slice( i ) :
- this.slice( i, i + 1 );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ),
- "slice", slice.call(arguments).join(",") );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
- // Either a released hold or an DOMready/load event and not yet ready
- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.fireWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger( "ready" ).off( "ready" );
- }
- }
- },
-
- bindReady: function() {
- if ( readyList ) {
- return;
- }
-
- readyList = jQuery.Callbacks( "once memory" );
-
- // Catch cases where $(document).ready() is called after the
- // browser event has already occurred.
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- return setTimeout( jQuery.ready, 1 );
- }
-
- // Mozilla, Opera and webkit nightlies currently support this event
- if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else if ( document.attachEvent ) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var toplevel = false;
-
- try {
- toplevel = window.frameElement == null;
- } catch(e) {}
-
- if ( document.documentElement.doScroll && toplevel ) {
- doScrollCheck();
- }
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- // A crude way of determining if an object is a window
- isWindow: function( obj ) {
- return obj && typeof obj === "object" && "setInterval" in obj;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- return obj == null ?
- String( obj ) :
- class2type[ toString.call(obj) ] || "object";
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call(obj, "constructor") &&
- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- for ( var name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- parseJSON: function( data ) {
- if ( typeof data !== "string" || !data ) {
- return null;
- }
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
-
- }
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && rnotwhite.test( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
- },
-
- // args is for internal usage only
- each: function( object, callback, args ) {
- var name, i = 0,
- length = object.length,
- isObj = length === undefined || jQuery.isFunction( object );
-
- if ( args ) {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.apply( object[ name ], args ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.apply( object[ i++ ], args ) === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isObj ) {
- for ( name in object ) {
- if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
- break;
- }
- }
- } else {
- for ( ; i < length; ) {
- if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
- break;
- }
- }
- }
- }
-
- return object;
- },
-
- // Use native String.trim function wherever possible
- trim: trim ?
- function( text ) {
- return text == null ?
- "" :
- trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
- },
-
- // results is for internal usage only
- makeArray: function( array, results ) {
- var ret = results || [];
-
- if ( array != null ) {
- // The window, strings (and functions) also have 'length'
- // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
- var type = jQuery.type( array );
-
- if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
- push.call( ret, array );
- } else {
- jQuery.merge( ret, array );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, array, i ) {
- var len;
-
- if ( array ) {
- if ( indexOf ) {
- return indexOf.call( array, elem, i );
- }
-
- len = array.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in array && array[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var i = first.length,
- j = 0;
-
- if ( typeof second.length === "number" ) {
- for ( var l = second.length; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var ret = [], retVal;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value, key, ret = [],
- i = 0,
- length = elems.length,
- // jquery objects are treated as arrays
- isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( key in elems ) {
- value = callback( elems[ key ], key, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return ret.concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- if ( typeof context === "string" ) {
- var tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- var args = slice.call( arguments, 2 ),
- proxy = function() {
- return fn.apply( context, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Mutifunctional method to get and set values to a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, key, value, exec, fn, pass ) {
- var length = elems.length;
-
- // Setting many attributes
- if ( typeof key === "object" ) {
- for ( var k in key ) {
- jQuery.access( elems, k, key[k], exec, fn, value );
- }
- return elems;
- }
-
- // Setting one attribute
- if ( value !== undefined ) {
- // Optionally, function values get executed if exec is true
- exec = !pass && exec && jQuery.isFunction(value);
-
- for ( var i = 0; i < length; i++ ) {
- fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
- }
-
- return elems;
- }
-
- // Getting an attribute
- return length ? fn( elems[0], key ) : undefined;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // Use of jQuery.browser is frowned upon.
- // More details: http://docs.jquery.com/Utilities/jQuery.browser
- uaMatch: function( ua ) {
- ua = ua.toLowerCase();
-
- var match = rwebkit.exec( ua ) ||
- ropera.exec( ua ) ||
- rmsie.exec( ua ) ||
- ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
- [];
-
- return { browser: match[1] || "", version: match[2] || "0" };
- },
-
- sub: function() {
- function jQuerySub( selector, context ) {
- return new jQuerySub.fn.init( selector, context );
- }
- jQuery.extend( true, jQuerySub, this );
- jQuerySub.superclass = this;
- jQuerySub.fn = jQuerySub.prototype = this();
- jQuerySub.fn.constructor = jQuerySub;
- jQuerySub.sub = this.sub;
- jQuerySub.fn.init = function init( selector, context ) {
- if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
- context = jQuerySub( context );
- }
-
- return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
- };
- jQuerySub.fn.init.prototype = jQuerySub.fn;
- var rootjQuerySub = jQuerySub(document);
- return jQuerySub;
- },
-
- browser: {}
-});
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-browserMatch = jQuery.uaMatch( userAgent );
-if ( browserMatch.browser ) {
- jQuery.browser[ browserMatch.browser ] = true;
- jQuery.browser.version = browserMatch.version;
-}
-
-// Deprecated, use jQuery.browser.webkit instead
-if ( jQuery.browser.webkit ) {
- jQuery.browser.safari = true;
-}
-
-// IE doesn't match non-breaking spaces with \s
-if ( rnotwhite.test( "\xA0" ) ) {
- trimLeft = /^[\s\xA0]+/;
- trimRight = /[\s\xA0]+$/;
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-
-// Cleanup functions for the document ready method
-if ( document.addEventListener ) {
- DOMContentLoaded = function() {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- };
-
-} else if ( document.attachEvent ) {
- DOMContentLoaded = function() {
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( document.readyState === "complete" ) {
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-}
-
-// The DOM ready check for Internet Explorer
-function doScrollCheck() {
- if ( jQuery.isReady ) {
- return;
- }
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch(e) {
- setTimeout( doScrollCheck, 1 );
- return;
- }
-
- // and execute any waiting functions
- jQuery.ready();
-}
-
-return jQuery;
-
-})();
-
-
-// String to Object flags format cache
-var flagsCache = {};
-
-// Convert String-formatted flags into Object-formatted ones and store in cache
-function createFlags( flags ) {
- var object = flagsCache[ flags ] = {},
- i, length;
- flags = flags.split( /\s+/ );
- for ( i = 0, length = flags.length; i < length; i++ ) {
- object[ flags[i] ] = true;
- }
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * flags: an optional list of space-separated flags that will change how
- * the callback list behaves
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible flags:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( flags ) {
-
- // Convert flags from String-formatted to Object-formatted
- // (we check in cache first)
- flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
-
- var // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = [],
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Add one or several callbacks to the list
- add = function( args ) {
- var i,
- length,
- elem,
- type,
- actual;
- for ( i = 0, length = args.length; i < length; i++ ) {
- elem = args[ i ];
- type = jQuery.type( elem );
- if ( type === "array" ) {
- // Inspect recursively
- add( elem );
- } else if ( type === "function" ) {
- // Add if not in unique mode and callback is not in
- if ( !flags.unique || !self.has( elem ) ) {
- list.push( elem );
- }
- }
- }
- },
- // Fire callbacks
- fire = function( context, args ) {
- args = args || [];
- memory = !flags.memory || [ context, args ];
- firing = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
- memory = true; // Mark as halted
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( !flags.once ) {
- if ( stack && stack.length ) {
- memory = stack.shift();
- self.fireWith( memory[ 0 ], memory[ 1 ] );
- }
- } else if ( memory === true ) {
- self.disable();
- } else {
- list = [];
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- var length = list.length;
- add( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away, unless previous
- // firing was halted (stopOnFalse)
- } else if ( memory && memory !== true ) {
- firingStart = length;
- fire( memory[ 0 ], memory[ 1 ] );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- var args = arguments,
- argIndex = 0,
- argLength = args.length;
- for ( ; argIndex < argLength ; argIndex++ ) {
- for ( var i = 0; i < list.length; i++ ) {
- if ( args[ argIndex ] === list[ i ] ) {
- // Handle firingIndex and firingLength
- if ( firing ) {
- if ( i <= firingLength ) {
- firingLength--;
- if ( i <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- // Remove the element
- list.splice( i--, 1 );
- // If we have some unicity property then
- // we only need to do this once
- if ( flags.unique ) {
- break;
- }
- }
- }
- }
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- if ( list ) {
- var i = 0,
- length = list.length;
- for ( ; i < length; i++ ) {
- if ( fn === list[ i ] ) {
- return true;
- }
- }
- }
- return false;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory || memory === true ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( stack ) {
- if ( firing ) {
- if ( !flags.once ) {
- stack.push( [ context, args ] );
- }
- } else if ( !( flags.once && memory ) ) {
- fire( context, args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!memory;
- }
- };
-
- return self;
-};
-
-
-
-
-var // Static reference to slice
- sliceDeferred = [].slice;
-
-jQuery.extend({
-
- Deferred: function( func ) {
- var doneList = jQuery.Callbacks( "once memory" ),
- failList = jQuery.Callbacks( "once memory" ),
- progressList = jQuery.Callbacks( "memory" ),
- state = "pending",
- lists = {
- resolve: doneList,
- reject: failList,
- notify: progressList
- },
- promise = {
- done: doneList.add,
- fail: failList.add,
- progress: progressList.add,
-
- state: function() {
- return state;
- },
-
- // Deprecated
- isResolved: doneList.fired,
- isRejected: failList.fired,
-
- then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
- deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
- return this;
- },
- always: function() {
- deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
- return this;
- },
- pipe: function( fnDone, fnFail, fnProgress ) {
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( {
- done: [ fnDone, "resolve" ],
- fail: [ fnFail, "reject" ],
- progress: [ fnProgress, "notify" ]
- }, function( handler, data ) {
- var fn = data[ 0 ],
- action = data[ 1 ],
- returned;
- if ( jQuery.isFunction( fn ) ) {
- deferred[ handler ](function() {
- returned = fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
- }
- });
- } else {
- deferred[ handler ]( newDefer[ action ] );
- }
- });
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- if ( obj == null ) {
- obj = promise;
- } else {
- for ( var key in promise ) {
- obj[ key ] = promise[ key ];
- }
- }
- return obj;
- }
- },
- deferred = promise.promise({}),
- key;
-
- for ( key in lists ) {
- deferred[ key ] = lists[ key ].fire;
- deferred[ key + "With" ] = lists[ key ].fireWith;
- }
-
- // Handle state
- deferred.done( function() {
- state = "resolved";
- }, failList.disable, progressList.lock ).fail( function() {
- state = "rejected";
- }, doneList.disable, progressList.lock );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( firstParam ) {
- var args = sliceDeferred.call( arguments, 0 ),
- i = 0,
- length = args.length,
- pValues = new Array( length ),
- count = length,
- pCount = length,
- deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
- firstParam :
- jQuery.Deferred(),
- promise = deferred.promise();
- function resolveFunc( i ) {
- return function( value ) {
- args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- if ( !( --count ) ) {
- deferred.resolveWith( deferred, args );
- }
- };
- }
- function progressFunc( i ) {
- return function( value ) {
- pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
- deferred.notifyWith( promise, pValues );
- };
- }
- if ( length > 1 ) {
- for ( ; i < length; i++ ) {
- if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
- args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
- } else {
- --count;
- }
- }
- if ( !count ) {
- deferred.resolveWith( deferred, args );
- }
- } else if ( deferred !== firstParam ) {
- deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
- }
- return promise;
- }
-});
-
-
-
-
-jQuery.support = (function() {
-
- var support,
- all,
- a,
- select,
- opt,
- input,
- marginDiv,
- fragment,
- tds,
- events,
- eventName,
- i,
- isSupported,
- div = document.createElement( "div" ),
- documentElement = document.documentElement;
-
- // Preliminary tests
- div.setAttribute("className", "t");
- div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-
- all = div.getElementsByTagName( "*" );
- a = div.getElementsByTagName( "a" )[ 0 ];
-
- // Can't get basic test support
- if ( !all || !all.length || !a ) {
- return {};
- }
-
- // First batch of supports tests
- select = document.createElement( "select" );
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName( "input" )[ 0 ];
-
- support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: ( div.firstChild.nodeType === 3 ),
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: ( a.getAttribute("href") === "/a" ),
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.55/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Make sure that if no value is specified for a checkbox
- // that it defaults to "on".
- // (WebKit defaults to "" instead)
- checkOn: ( input.value === "on" ),
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // Tests for enctype support on a form(#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // Will be defined later
- submitBubbles: true,
- changeBubbles: true,
- focusinBubbles: false,
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Test to see if it's possible to delete an expando from an element
- // Fails in Internet Explorer
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
- div.attachEvent( "onclick", function() {
- // Cloning a node shouldn't copy over any
- // bound event handlers (IE does this)
- support.noCloneEvent = false;
- });
- div.cloneNode( true ).fireEvent( "onclick" );
- }
-
- // Check if a radio maintains its value
- // after being appended to the DOM
- input = document.createElement("input");
- input.value = "t";
- input.setAttribute("type", "radio");
- support.radioValue = input.value === "t";
-
- input.setAttribute("checked", "checked");
- div.appendChild( input );
- fragment = document.createDocumentFragment();
- fragment.appendChild( div.lastChild );
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- fragment.removeChild( input );
- fragment.appendChild( div );
-
- div.innerHTML = "";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. For more
- // info see bug #3333
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- if ( window.getComputedStyle ) {
- marginDiv = document.createElement( "div" );
- marginDiv.style.width = "0";
- marginDiv.style.marginRight = "0";
- div.style.width = "2px";
- div.appendChild( marginDiv );
- support.reliableMarginRight =
- ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
- }
-
- // Technique from Juriy Zaytsev
- // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
- // We only care about the case where non-standard event systems
- // are used, namely in IE. Short-circuiting here helps us to
- // avoid an eval call (in setAttribute) which can cause CSP
- // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
- if ( div.attachEvent ) {
- for( i in {
- submit: 1,
- change: 1,
- focusin: 1
- }) {
- eventName = "on" + i;
- isSupported = ( eventName in div );
- if ( !isSupported ) {
- div.setAttribute( eventName, "return;" );
- isSupported = ( typeof div[ eventName ] === "function" );
- }
- support[ i + "Bubbles" ] = isSupported;
- }
- }
-
- fragment.removeChild( div );
-
- // Null elements to avoid leaks in IE
- fragment = select = opt = marginDiv = div = input = null;
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, outer, inner, table, td, offsetSupport,
- conMarginTop, ptlm, vb, style, html,
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- conMarginTop = 1;
- ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
- vb = "visibility:hidden;border:0;";
- style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
- html = "<div " + style + "><div></div></div>" +
- "<table " + style + " cellpadding='0' cellspacing='0'>" +
- "<tr><td></td></tr></table>";
-
- container = document.createElement("div");
- container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
- body.insertBefore( container, body.firstChild );
-
- // Construct the test element
- div = document.createElement("div");
- container.appendChild( div );
-
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- // (only IE 8 fails this test)
- div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName( "td" );
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Check if empty table cells still have offsetWidth/Height
- // (IE <= 8 fail this test)
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Figure out if the W3C box model works as expected
- div.innerHTML = "";
- div.style.width = div.style.paddingLeft = "1px";
- jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- // (IE < 8 does this)
- div.style.display = "inline";
- div.style.zoom = 1;
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
-
- // Check if elements with layout shrink-wrap their children
- // (IE 6 does this)
- div.style.display = "";
- div.innerHTML = "<div style='width:4px;'></div>";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
- }
-
- div.style.cssText = ptlm + vb;
- div.innerHTML = html;
-
- outer = div.firstChild;
- inner = outer.firstChild;
- td = outer.nextSibling.firstChild.firstChild;
-
- offsetSupport = {
- doesNotAddBorder: ( inner.offsetTop !== 5 ),
- doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
- };
-
- inner.style.position = "fixed";
- inner.style.top = "20px";
-
- // safari subtracts parent border width here which is 5px
- offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
- inner.style.position = inner.style.top = "";
-
- outer.style.overflow = "hidden";
- outer.style.position = "relative";
-
- offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
- offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
-
- body.removeChild( container );
- div = container = null;
-
- jQuery.extend( support, offsetSupport );
- });
-
- return support;
-})();
-
-
-
-
-var rbrace = /^(?:\{.*\}|\[.*\])$/,
- rmultiDash = /([A-Z])/g;
-
-jQuery.extend({
- cache: {},
-
- // Please use with caution
- uuid: 0,
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var privateCache, thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
- isEvents = name === "events";
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = ++jQuery.uuid;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- privateCache = thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Users should not attempt to inspect the internal events object using jQuery.data,
- // it is undocumented and subject to change. But does anyone listen? No.
- if ( isEvents && !thisCache[ name ] ) {
- return privateCache.events;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
- },
-
- removeData: function( elem, name, pvt /* Internal Use Only */ ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- // Reference to internal data cache key
- internalKey = jQuery.expando,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
-
- // See jQuery.data for more information
- id = isNode ? elem[ internalKey ] : internalKey;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split( " " );
- }
- }
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject(cache[ id ]) ) {
- return;
- }
- }
-
- // Browsers that fail expando deletion also refuse to delete expandos on
- // the window, but it will allow it on all other JS objects; other browsers
- // don't care
- // Ensure that `cache` is not a window object #10080
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
- delete cache[ id ];
- } else {
- cache[ id ] = null;
- }
-
- // We destroyed the cache and need to eliminate the expando on the node to avoid
- // false lookups in the cache for entries that no longer exist
- if ( isNode ) {
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( jQuery.support.deleteExpando ) {
- delete elem[ internalKey ];
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( internalKey );
- } else {
- elem[ internalKey ] = null;
- }
- }
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return jQuery.data( elem, name, data, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- if ( elem.nodeName ) {
- var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- if ( match ) {
- return !(match === true || elem.getAttribute("classid") !== match);
- }
- }
-
- return true;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var parts, attr, name,
- data = null;
-
- if ( typeof key === "undefined" ) {
- if ( this.length ) {
- data = jQuery.data( this[0] );
-
- if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
- attr = this[0].attributes;
- for ( var i = 0, l = attr.length; i < l; i++ ) {
- name = attr[i].name;
-
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( this[0], name, data[ name ] );
- }
- }
- jQuery._data( this[0], "parsedAttrs", true );
- }
- }
-
- return data;
-
- } else if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- parts = key.split(".");
- parts[1] = parts[1] ? "." + parts[1] : "";
-
- if ( value === undefined ) {
- data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
-
- // Try to fetch any internally stored data first
- if ( data === undefined && this.length ) {
- data = jQuery.data( this[0], key );
- data = dataAttr( this[0], key, data );
- }
-
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
-
- } else {
- return this.each(function() {
- var self = jQuery( this ),
- args = [ parts[0], value ];
-
- self.triggerHandler( "setData" + parts[1] + "!", args );
- jQuery.data( this, key, value );
- self.triggerHandler( "changeData" + parts[1] + "!", args );
- });
- }
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- jQuery.isNumeric( data ) ? parseFloat( data ) :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- for ( var name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-
-
-
-
-function handleQueueMarkDefer( elem, type, src ) {
- var deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- defer = jQuery._data( elem, deferDataKey );
- if ( defer &&
- ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
- ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
- // Give room for hard-coded callbacks to fire first
- // and eventually mark/queue something else on the element
- setTimeout( function() {
- if ( !jQuery._data( elem, queueDataKey ) &&
- !jQuery._data( elem, markDataKey ) ) {
- jQuery.removeData( elem, deferDataKey, true );
- defer.fire();
- }
- }, 0 );
- }
-}
-
-jQuery.extend({
-
- _mark: function( elem, type ) {
- if ( elem ) {
- type = ( type || "fx" ) + "mark";
- jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
- }
- },
-
- _unmark: function( force, elem, type ) {
- if ( force !== true ) {
- type = elem;
- elem = force;
- force = false;
- }
- if ( elem ) {
- type = type || "fx";
- var key = type + "mark",
- count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
- if ( count ) {
- jQuery._data( elem, key, count );
- } else {
- jQuery.removeData( elem, key, true );
- handleQueueMarkDefer( elem, type, "mark" );
- }
- }
- },
-
- queue: function( elem, type, data ) {
- var q;
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- q = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !q || jQuery.isArray(data) ) {
- q = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- q.push( data );
- }
- }
- return q || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- fn = queue.shift(),
- hooks = {};
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- }
-
- if ( fn ) {
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- jQuery._data( elem, type + ".run", hooks );
- fn.call( elem, function() {
- jQuery.dequeue( elem, type );
- }, hooks );
- }
-
- if ( !queue.length ) {
- jQuery.removeData( elem, type + "queue " + type + ".run", true );
- handleQueueMarkDefer( elem, type, "queue" );
- }
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- }
-
- if ( data === undefined ) {
- return jQuery.queue( this[0], type );
- }
- return this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, object ) {
- if ( typeof type !== "string" ) {
- object = type;
- type = undefined;
- }
- type = type || "fx";
- var defer = jQuery.Deferred(),
- elements = this,
- i = elements.length,
- count = 1,
- deferDataKey = type + "defer",
- queueDataKey = type + "queue",
- markDataKey = type + "mark",
- tmp;
- function resolve() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- }
- while( i-- ) {
- if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
- ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
- jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
- jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
- count++;
- tmp.add( resolve );
- }
- }
- resolve();
- return defer.promise();
- }
-});
-
-
-
-
-var rclass = /[\n\t\r]/g,
- rspace = /\s+/,
- rreturn = /\r/g,
- rtype = /^(?:button|input)$/i,
- rfocusable = /^(?:button|input|object|select|textarea)$/i,
- rclickable = /^a(?:rea)?$/i,
- rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- nodeHook, boolHook, fixSpecified;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, name, value, true, jQuery.attr );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, name, value, true, jQuery.prop );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classNames, i, l, elem,
- setClass, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call(this, j, this.className) );
- });
- }
-
- if ( value && typeof value === "string" ) {
- classNames = value.split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 ) {
- if ( !elem.className && classNames.length === 1 ) {
- elem.className = value;
-
- } else {
- setClass = " " + elem.className + " ";
-
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
- setClass += classNames[ c ] + " ";
- }
- }
- elem.className = jQuery.trim( setClass );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classNames, i, l, elem, className, c, cl;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call(this, j, this.className) );
- });
- }
-
- if ( (value && typeof value === "string") || value === undefined ) {
- classNames = ( value || "" ).split( rspace );
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- elem = this[ i ];
-
- if ( elem.nodeType === 1 && elem.className ) {
- if ( value ) {
- className = (" " + elem.className + " ").replace( rclass, " " );
- for ( c = 0, cl = classNames.length; c < cl; c++ ) {
- className = className.replace(" " + classNames[ c ] + " ", " ");
- }
- elem.className = jQuery.trim( className );
-
- } else {
- elem.className = "";
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.split( rspace );
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space seperated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // toggle whole className
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var self = jQuery(this), val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, i, max, option,
- index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type === "select-one";
-
- // Nothing was selected
- if ( index < 0 ) {
- return null;
- }
-
- // Loop through all the selected options
- i = one ? index : 0;
- max = one ? index + 1 : options.length;
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // Don't return options that are disabled or in a disabled optgroup
- if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
- (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
- if ( one && !values.length && options.length ) {
- return jQuery( options[ index ] ).val();
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attrFn: {
- val: true,
- css: true,
- html: true,
- text: true,
- data: true,
- width: true,
- height: true,
- offset: true
- },
-
- attr: function( elem, name, value, pass ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( pass && name in jQuery.attrFn ) {
- return jQuery( elem )[ name ]( value );
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
-
- } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, "" + value );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- ret = elem.getAttribute( name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret === null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var propName, attrNames, name, l,
- i = 0;
-
- if ( value && elem.nodeType === 1 ) {
- attrNames = value.toLowerCase().split( rspace );
- l = attrNames.length;
-
- for ( ; i < l; i++ ) {
- name = attrNames[ i ];
-
- if ( name ) {
- propName = jQuery.propFix[ name ] || name;
-
- // See #9699 for explanation of this approach (setting first, then removal)
- jQuery.attr( elem, name, "" );
- elem.removeAttribute( getSetAttribute ? name : propName );
-
- // Set corresponding property to false for boolean attributes
- if ( rboolean.test( name ) && propName in elem ) {
- elem[ propName ] = false;
- }
- }
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
- jQuery.error( "type property can't be changed" );
- } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to it's default in case type is set after value
- // This is for element creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- },
- // Use the value property for back compat
- // Use the nodeHook for button elements in IE6/7 (#1954)
- value: {
- get: function( elem, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.get( elem, name );
- }
- return name in elem ?
- elem.value :
- null;
- },
- set: function( elem, value, name ) {
- if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
- return nodeHook.set( elem, value, name );
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
-jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- // Align boolean attributes with corresponding properties
- // Fall back to attribute presence where some booleans are not supported
- var attrNode,
- property = jQuery.prop( elem, name );
- return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- var propName;
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- // value is true since we know at this point it's type boolean and not false
- // Set boolean attributes to the same name and set the DOM property
- propName = jQuery.propFix[ name ] || name;
- if ( propName in elem ) {
- // Only set the IDL specifically if it already exists on the element
- elem[ propName ] = true;
- }
-
- elem.setAttribute( name, name.toLowerCase() );
- }
- return name;
- }
-};
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- fixSpecified = {
- name: true,
- id: true
- };
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret;
- ret = elem.getAttributeNode( name );
- return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
- ret.nodeValue :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- ret = document.createAttribute( name );
- elem.setAttributeNode( ret );
- }
- return ( ret.nodeValue = value + "" );
- }
- };
-
- // Apply the nodeHook to tabindex
- jQuery.attrHooks.tabindex.set = nodeHook.set;
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- if ( value === "" ) {
- value = "false";
- }
- nodeHook.set( elem, value, name );
- }
- };
-}
-
-
-// Some attributes require a special call on IE
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret === null ? undefined : ret;
- }
- });
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Normalize to lowercase since IE uppercases css property names
- return elem.style.cssText.toLowerCase() || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = "" + value );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-
-
-
-
-var rformElems = /^(?:textarea|input|select)$/i,
- rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
- rhoverHack = /\bhover(\.\S+)?\b/,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
- quickParse = function( selector ) {
- var quick = rquickIs.exec( selector );
- if ( quick ) {
- // 0 1 2 3
- // [ _, tag, id, class ]
- quick[1] = ( quick[1] || "" ).toLowerCase();
- quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
- }
- return quick;
- },
- quickIs = function( elem, m ) {
- var attrs = elem.attributes || {};
- return (
- (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
- (!m[2] || (attrs.id || {}).value === m[2]) &&
- (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
- );
- },
- hoverHack = function( events ) {
- return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
- };
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- add: function( elem, types, handler, data, selector ) {
-
- var elemData, eventHandle, events,
- t, tns, type, namespaces, handleObj,
- handleObjIn, quick, handlers, special;
-
- // Don't attach events to noData or text/comment nodes (allow plain objects tho)
- if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- events = elemData.events;
- if ( !events ) {
- elemData.events = events = {};
- }
- eventHandle = elemData.handle;
- if ( !eventHandle ) {
- elemData.handle = eventHandle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = jQuery.trim( hoverHack(types) ).split( " " );
- for ( t = 0; t < types.length; t++ ) {
-
- tns = rtypenamespace.exec( types[t] ) || [];
- type = tns[1];
- namespaces = ( tns[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: tns[1],
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- quick: quickParse( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- handlers = events[ type ];
- if ( !handlers ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- global: {},
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
- t, tns, type, origType, namespaces, origCount,
- j, events, special, handle, eventType, handleObj;
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
- for ( t = 0; t < types.length; t++ ) {
- tns = rtypenamespace.exec( types[t] ) || [];
- type = origType = tns[1];
- namespaces = tns[2];
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector? special.delegateType : special.bindType ) || type;
- eventType = events[ type ] || [];
- origCount = eventType.length;
- namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
-
- // Remove matching events
- for ( j = 0; j < eventType.length; j++ ) {
- handleObj = eventType[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- eventType.splice( j--, 1 );
-
- if ( handleObj.selector ) {
- eventType.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( eventType.length === 0 && origCount !== eventType.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- handle = elemData.handle;
- if ( handle ) {
- handle.elem = null;
- }
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery.removeData( elem, [ "events", "handle" ], true );
- }
- },
-
- // Events that are safe to short-circuit if no handlers are attached.
- // Native DOM events should not be added, they may have inline handlers.
- customEvent: {
- "getData": true,
- "setData": true,
- "changeData": true
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- // Don't do events on text and comment nodes
- if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
- return;
- }
-
- // Event object or event type
- var type = event.type || event,
- namespaces = [],
- cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "!" ) >= 0 ) {
- // Exclusive events trigger only for the exact event (no namespaces)
- type = type.slice(0, -1);
- exclusive = true;
- }
-
- if ( type.indexOf( "." ) >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
-
- if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
- // No jQuery handlers for this event type, and it can't have inline handlers
- return;
- }
-
- // Caller can pass in an Event, Object, or just an event type string
- event = typeof event === "object" ?
- // jQuery.Event object
- event[ jQuery.expando ] ? event :
- // Object literal
- new jQuery.Event( type, event ) :
- // Just the event type (string)
- new jQuery.Event( type );
-
- event.type = type;
- event.isTrigger = true;
- event.exclusive = exclusive;
- event.namespace = namespaces.join( "." );
- event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
- ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
-
- // Handle a global trigger
- if ( !elem ) {
-
- // TODO: Stop taunting the data cache; remove global events and always attach to document
- cache = jQuery.cache;
- for ( i in cache ) {
- if ( cache[ i ].events && cache[ i ].events[ type ] ) {
- jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
- }
- }
- return;
- }
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data != null ? jQuery.makeArray( data ) : [];
- data.unshift( event );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- eventPath = [[ elem, special.bindType || type ]];
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
- old = null;
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push([ cur, bubbleType ]);
- old = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( old && old === elem.ownerDocument ) {
- eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
- }
- }
-
- // Fire handlers on the event path
- for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
-
- cur = eventPath[i][0];
- event.type = eventPath[i][1];
-
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
- // Note that this is a bare JS function and not a jQuery handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- // IE<9 dies on focus/blur to hidden element (#1486)
- if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- old = elem[ ontype ];
-
- if ( old ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( old ) {
- elem[ ontype ] = old;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event || window.event );
-
- var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
- delegateCount = handlers.delegateCount,
- args = [].slice.call( arguments, 0 ),
- run_all = !event.exclusive && !event.namespace,
- handlerQueue = [],
- i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Determine handlers that should run if there are delegated events
- // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
-
- // Pregenerate a single jQuery object for reuse with .is()
- jqcur = jQuery(this);
- jqcur.context = this.ownerDocument || this;
-
- for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
- selMatch = {};
- matches = [];
- jqcur[0] = cur;
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
- sel = handleObj.selector;
-
- if ( selMatch[ sel ] === undefined ) {
- selMatch[ sel ] = (
- handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
- );
- }
- if ( selMatch[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, matches: matches });
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( handlers.length > delegateCount ) {
- handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
- }
-
- // Run delegates first; they may want to stop propagation beneath us
- for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
- matched = handlerQueue[ i ];
- event.currentTarget = matched.elem;
-
- for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
- handleObj = matched.matches[ j ];
-
- // Triggered event must either 1) be non-exclusive and have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
-
- event.data = handleObj.data;
- event.handleObj = handleObj;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- event.result = ret;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- return event.result;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
- props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = jQuery.Event( originalEvent );
-
- for ( i = copy.length; i; ) {
- prop = copy[ --i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Target should not be a text node (#504, Safari)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
- if ( event.metaKey === undefined ) {
- event.metaKey = event.ctrlKey;
- }
-
- return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- ready: {
- // Make sure the ready event is setup
- setup: jQuery.bindReady
- },
-
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
-
- focus: {
- delegateType: "focusin"
- },
- blur: {
- delegateType: "focusout"
- },
-
- beforeunload: {
- setup: function( data, namespaces, eventHandle ) {
- // We only want to do this special case on windows
- if ( jQuery.isWindow( this ) ) {
- this.onbeforeunload = eventHandle;
- }
- },
-
- teardown: function( namespaces, eventHandle ) {
- if ( this.onbeforeunload === eventHandle ) {
- this.onbeforeunload = null;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-// Some plugins are using, but it's undocumented/deprecated and will be removed.
-// The 1.7 special event interface should provide all the hooks needed now.
-jQuery.event.handle = jQuery.event.dispatch;
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- if ( elem.detachEvent ) {
- elem.detachEvent( "on" + type, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-function returnFalse() {
- return false;
-}
-function returnTrue() {
- return true;
-}
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
-
- // if preventDefault exists run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // otherwise set the returnValue property of the original event to false (IE)
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- this.isPropagationStopped = returnTrue;
-
- var e = this.originalEvent;
- if ( !e ) {
- return;
- }
- // if stopPropagation exists run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
- // otherwise set the cancelBubble property of the original event to true (IE)
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- },
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj,
- selector = handleObj.selector,
- ret;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !form._submit_attached ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- });
- form._submit_attached = true;
- }
- });
- // return undefined since we don't need an event listener
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- jQuery.event.simulate( "change", this, event, true );
- }
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- elem._change_attached = true;
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on.call( this, types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- var handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( var type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- live: function( types, data, fn ) {
- jQuery( this.context ).on( types, this.selector, data, fn );
- return this;
- },
- die: function( types, fn ) {
- jQuery( this.context ).off( types, this.selector || "**", fn );
- return this;
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- if ( this[0] ) {
- return jQuery.event.trigger( type, data, this[0], true );
- }
- },
-
- toggle: function( fn ) {
- // Save reference to arguments for access in closure
- var args = arguments,
- guid = fn.guid || jQuery.guid++,
- i = 0,
- toggler = function( event ) {
- // Figure out which function to execute
- var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
- jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
- // Make sure that clicks stop
- event.preventDefault();
-
- // and execute the function
- return args[ lastToggle ].apply( this, arguments ) || false;
- };
-
- // link all the functions, so any of them can unbind this click handler
- toggler.guid = guid;
- while ( i < args.length ) {
- args[ i++ ].guid = guid;
- }
-
- return this.click( toggler );
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- if ( fn == null ) {
- fn = data;
- data = null;
- }
-
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( jQuery.attrFn ) {
- jQuery.attrFn[ name ] = true;
- }
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-
-
-
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- * More information: http://sizzlejs.com/
- */
-(function(){
-
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
- expando = "sizcache" + (Math.random() + '').replace('.', ''),
- done = 0,
- toString = Object.prototype.toString,
- hasDuplicate = false,
- baseHasDuplicate = true,
- rBackslash = /\\/g,
- rReturn = /\r\n/g,
- rNonWord = /\W/;
-
-// Here we check if the JavaScript engine is using some sort of
-// optimization where it does not always call our comparision
-// function. If that is the case, discard the hasDuplicate value.
-// Thus far that includes Google Chrome.
-[0, 0].sort(function() {
- baseHasDuplicate = false;
- return 0;
-});
-
-var Sizzle = function( selector, context, results, seed ) {
- results = results || [];
- context = context || document;
-
- var origContext = context;
-
- if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
- return [];
- }
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- var m, set, checkSet, extra, ret, cur, pop, i,
- prune = true,
- contextXML = Sizzle.isXML( context ),
- parts = [],
- soFar = selector;
-
- // Reset the position of the chunker regexp (start from head)
- do {
- chunker.exec( "" );
- m = chunker.exec( soFar );
-
- if ( m ) {
- soFar = m[3];
-
- parts.push( m[1] );
-
- if ( m[2] ) {
- extra = m[3];
- break;
- }
- }
- } while ( m );
-
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
-
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
- set = posProcess( parts[0] + parts[1], context, seed );
-
- } else {
- set = Expr.relative[ parts[0] ] ?
- [ context ] :
- Sizzle( parts.shift(), context );
-
- while ( parts.length ) {
- selector = parts.shift();
-
- if ( Expr.relative[ selector ] ) {
- selector += parts.shift();
- }
-
- set = posProcess( selector, set, seed );
- }
- }
-
- } else {
- // Take a shortcut and set the context if the root selector is an ID
- // (but not if it'll be faster if the inner selector is an ID)
- if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
- Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
-
- ret = Sizzle.find( parts.shift(), context, contextXML );
- context = ret.expr ?
- Sizzle.filter( ret.expr, ret.set )[0] :
- ret.set[0];
- }
-
- if ( context ) {
- ret = seed ?
- { expr: parts.pop(), set: makeArray(seed) } :
- Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
-
- set = ret.expr ?
- Sizzle.filter( ret.expr, ret.set ) :
- ret.set;
-
- if ( parts.length > 0 ) {
- checkSet = makeArray( set );
-
- } else {
- prune = false;
- }
-
- while ( parts.length ) {
- cur = parts.pop();
- pop = cur;
-
- if ( !Expr.relative[ cur ] ) {
- cur = "";
- } else {
- pop = parts.pop();
- }
-
- if ( pop == null ) {
- pop = context;
- }
-
- Expr.relative[ cur ]( checkSet, pop, contextXML );
- }
-
- } else {
- checkSet = parts = [];
- }
- }
-
- if ( !checkSet ) {
- checkSet = set;
- }
-
- if ( !checkSet ) {
- Sizzle.error( cur || selector );
- }
-
- if ( toString.call(checkSet) === "[object Array]" ) {
- if ( !prune ) {
- results.push.apply( results, checkSet );
-
- } else if ( context && context.nodeType === 1 ) {
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
- results.push( set[i] );
- }
- }
-
- } else {
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
- results.push( set[i] );
- }
- }
- }
-
- } else {
- makeArray( checkSet, results );
- }
-
- if ( extra ) {
- Sizzle( extra, origContext, results, seed );
- Sizzle.uniqueSort( results );
- }
-
- return results;
-};
-
-Sizzle.uniqueSort = function( results ) {
- if ( sortOrder ) {
- hasDuplicate = baseHasDuplicate;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[ i - 1 ] ) {
- results.splice( i--, 1 );
- }
- }
- }
- }
-
- return results;
-};
-
-Sizzle.matches = function( expr, set ) {
- return Sizzle( expr, null, null, set );
-};
-
-Sizzle.matchesSelector = function( node, expr ) {
- return Sizzle( expr, null, null, [node] ).length > 0;
-};
-
-Sizzle.find = function( expr, context, isXML ) {
- var set, i, len, match, type, left;
-
- if ( !expr ) {
- return [];
- }
-
- for ( i = 0, len = Expr.order.length; i < len; i++ ) {
- type = Expr.order[i];
-
- if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
- left = match[1];
- match.splice( 1, 1 );
-
- if ( left.substr( left.length - 1 ) !== "\\" ) {
- match[1] = (match[1] || "").replace( rBackslash, "" );
- set = Expr.find[ type ]( match, context, isXML );
-
- if ( set != null ) {
- expr = expr.replace( Expr.match[ type ], "" );
- break;
- }
- }
- }
- }
-
- if ( !set ) {
- set = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( "*" ) :
- [];
- }
-
- return { set: set, expr: expr };
-};
-
-Sizzle.filter = function( expr, set, inplace, not ) {
- var match, anyFound,
- type, found, item, filter, left,
- i, pass,
- old = expr,
- result = [],
- curLoop = set,
- isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
-
- while ( expr && set.length ) {
- for ( type in Expr.filter ) {
- if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
- filter = Expr.filter[ type ];
- left = match[1];
-
- anyFound = false;
-
- match.splice(1,1);
-
- if ( left.substr( left.length - 1 ) === "\\" ) {
- continue;
- }
-
- if ( curLoop === result ) {
- result = [];
- }
-
- if ( Expr.preFilter[ type ] ) {
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
-
- if ( !match ) {
- anyFound = found = true;
-
- } else if ( match === true ) {
- continue;
- }
- }
-
- if ( match ) {
- for ( i = 0; (item = curLoop[i]) != null; i++ ) {
- if ( item ) {
- found = filter( item, match, i, curLoop );
- pass = not ^ found;
-
- if ( inplace && found != null ) {
- if ( pass ) {
- anyFound = true;
-
- } else {
- curLoop[i] = false;
- }
-
- } else if ( pass ) {
- result.push( item );
- anyFound = true;
- }
- }
- }
- }
-
- if ( found !== undefined ) {
- if ( !inplace ) {
- curLoop = result;
- }
-
- expr = expr.replace( Expr.match[ type ], "" );
-
- if ( !anyFound ) {
- return [];
- }
-
- break;
- }
- }
- }
-
- // Improper expression
- if ( expr === old ) {
- if ( anyFound == null ) {
- Sizzle.error( expr );
-
- } else {
- break;
- }
- }
-
- old = expr;
- }
-
- return curLoop;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Utility function for retreiving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-var getText = Sizzle.getText = function( elem ) {
- var i, node,
- nodeType = elem.nodeType,
- ret = "";
-
- if ( nodeType ) {
- if ( nodeType === 1 || nodeType === 9 ) {
- // Use textContent || innerText for elements
- if ( typeof elem.textContent === 'string' ) {
- return elem.textContent;
- } else if ( typeof elem.innerText === 'string' ) {
- // Replace IE's carriage returns
- return elem.innerText.replace( rReturn, '' );
- } else {
- // Traverse it's children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- } else {
-
- // If no nodeType, this is expected to be an array
- for ( i = 0; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- if ( node.nodeType !== 8 ) {
- ret += getText( node );
- }
- }
- }
- return ret;
-};
-
-var Expr = Sizzle.selectors = {
- order: [ "ID", "NAME", "TAG" ],
-
- match: {
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
- },
-
- leftMatch: {},
-
- attrMap: {
- "class": "className",
- "for": "htmlFor"
- },
-
- attrHandle: {
- href: function( elem ) {
- return elem.getAttribute( "href" );
- },
- type: function( elem ) {
- return elem.getAttribute( "type" );
- }
- },
-
- relative: {
- "+": function(checkSet, part){
- var isPartStr = typeof part === "string",
- isTag = isPartStr && !rNonWord.test( part ),
- isPartStrNotTag = isPartStr && !isTag;
-
- if ( isTag ) {
- part = part.toLowerCase();
- }
-
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
- if ( (elem = checkSet[i]) ) {
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
-
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
- elem || false :
- elem === part;
- }
- }
-
- if ( isPartStrNotTag ) {
- Sizzle.filter( part, checkSet, true );
- }
- },
-
- ">": function( checkSet, part ) {
- var elem,
- isPartStr = typeof part === "string",
- i = 0,
- l = checkSet.length;
-
- if ( isPartStr && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
-
- for ( ; i < l; i++ ) {
- elem = checkSet[i];
-
- if ( elem ) {
- var parent = elem.parentNode;
- checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
- }
- }
-
- } else {
- for ( ; i < l; i++ ) {
- elem = checkSet[i];
-
- if ( elem ) {
- checkSet[i] = isPartStr ?
- elem.parentNode :
- elem.parentNode === part;
- }
- }
-
- if ( isPartStr ) {
- Sizzle.filter( part, checkSet, true );
- }
- }
- },
-
- "": function(checkSet, part, isXML){
- var nodeCheck,
- doneName = done++,
- checkFn = dirCheck;
-
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
- nodeCheck = part;
- checkFn = dirNodeCheck;
- }
-
- checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
- },
-
- "~": function( checkSet, part, isXML ) {
- var nodeCheck,
- doneName = done++,
- checkFn = dirCheck;
-
- if ( typeof part === "string" && !rNonWord.test( part ) ) {
- part = part.toLowerCase();
- nodeCheck = part;
- checkFn = dirNodeCheck;
- }
-
- checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
- }
- },
-
- find: {
- ID: function( match, context, isXML ) {
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- },
-
- NAME: function( match, context ) {
- if ( typeof context.getElementsByName !== "undefined" ) {
- var ret = [],
- results = context.getElementsByName( match[1] );
-
- for ( var i = 0, l = results.length; i < l; i++ ) {
- if ( results[i].getAttribute("name") === match[1] ) {
- ret.push( results[i] );
- }
- }
-
- return ret.length === 0 ? null : ret;
- }
- },
-
- TAG: function( match, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( match[1] );
- }
- }
- },
- preFilter: {
- CLASS: function( match, curLoop, inplace, result, not, isXML ) {
- match = " " + match[1].replace( rBackslash, "" ) + " ";
-
- if ( isXML ) {
- return match;
- }
-
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
- if ( elem ) {
- if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
- if ( !inplace ) {
- result.push( elem );
- }
-
- } else if ( inplace ) {
- curLoop[i] = false;
- }
- }
- }
-
- return false;
- },
-
- ID: function( match ) {
- return match[1].replace( rBackslash, "" );
- },
-
- TAG: function( match, curLoop ) {
- return match[1].replace( rBackslash, "" ).toLowerCase();
- },
-
- CHILD: function( match ) {
- if ( match[1] === "nth" ) {
- if ( !match[2] ) {
- Sizzle.error( match[0] );
- }
-
- match[2] = match[2].replace(/^\+|\s*/g, '');
-
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
- var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
- match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
-
- // calculate the numbers (first)n+(last) including if they are negative
- match[2] = (test[1] + (test[2] || 1)) - 0;
- match[3] = test[3] - 0;
- }
- else if ( match[2] ) {
- Sizzle.error( match[0] );
- }
-
- // TODO: Move to normal caching system
- match[0] = done++;
-
- return match;
- },
-
- ATTR: function( match, curLoop, inplace, result, not, isXML ) {
- var name = match[1] = match[1].replace( rBackslash, "" );
-
- if ( !isXML && Expr.attrMap[name] ) {
- match[1] = Expr.attrMap[name];
- }
-
- // Handle if an un-quoted value was used
- match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
-
- if ( match[2] === "~=" ) {
- match[4] = " " + match[4] + " ";
- }
-
- return match;
- },
-
- PSEUDO: function( match, curLoop, inplace, result, not ) {
- if ( match[1] === "not" ) {
- // If we're dealing with a complex expression, or a simple one
- if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
- match[3] = Sizzle(match[3], null, null, curLoop);
-
- } else {
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
-
- if ( !inplace ) {
- result.push.apply( result, ret );
- }
-
- return false;
- }
-
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
- return true;
- }
-
- return match;
- },
-
- POS: function( match ) {
- match.unshift( true );
-
- return match;
- }
- },
-
- filters: {
- enabled: function( elem ) {
- return elem.disabled === false && elem.type !== "hidden";
- },
-
- disabled: function( elem ) {
- return elem.disabled === true;
- },
-
- checked: function( elem ) {
- return elem.checked === true;
- },
-
- selected: function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- parent: function( elem ) {
- return !!elem.firstChild;
- },
-
- empty: function( elem ) {
- return !elem.firstChild;
- },
-
- has: function( elem, i, match ) {
- return !!Sizzle( match[3], elem ).length;
- },
-
- header: function( elem ) {
- return (/h\d/i).test( elem.nodeName );
- },
-
- text: function( elem ) {
- var attr = elem.getAttribute( "type" ), type = elem.type;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
- },
-
- radio: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
- },
-
- checkbox: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
- },
-
- file: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
- },
-
- password: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
- },
-
- submit: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && "submit" === elem.type;
- },
-
- image: function( elem ) {
- return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
- },
-
- reset: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && "reset" === elem.type;
- },
-
- button: function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && "button" === elem.type || name === "button";
- },
-
- input: function( elem ) {
- return (/input|select|textarea|button/i).test( elem.nodeName );
- },
-
- focus: function( elem ) {
- return elem === elem.ownerDocument.activeElement;
- }
- },
- setFilters: {
- first: function( elem, i ) {
- return i === 0;
- },
-
- last: function( elem, i, match, array ) {
- return i === array.length - 1;
- },
-
- even: function( elem, i ) {
- return i % 2 === 0;
- },
-
- odd: function( elem, i ) {
- return i % 2 === 1;
- },
-
- lt: function( elem, i, match ) {
- return i < match[3] - 0;
- },
-
- gt: function( elem, i, match ) {
- return i > match[3] - 0;
- },
-
- nth: function( elem, i, match ) {
- return match[3] - 0 === i;
- },
-
- eq: function( elem, i, match ) {
- return match[3] - 0 === i;
- }
- },
- filter: {
- PSEUDO: function( elem, match, i, array ) {
- var name = match[1],
- filter = Expr.filters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
-
- } else if ( name === "contains" ) {
- return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
-
- } else if ( name === "not" ) {
- var not = match[3];
-
- for ( var j = 0, l = not.length; j < l; j++ ) {
- if ( not[j] === elem ) {
- return false;
- }
- }
-
- return true;
-
- } else {
- Sizzle.error( name );
- }
- },
-
- CHILD: function( elem, match ) {
- var first, last,
- doneName, parent, cache,
- count, diff,
- type = match[1],
- node = elem;
-
- switch ( type ) {
- case "only":
- case "first":
- while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- if ( type === "first" ) {
- return true;
- }
-
- node = elem;
-
- case "last":
- while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
- }
- }
-
- return true;
-
- case "nth":
- first = match[2];
- last = match[3];
-
- if ( first === 1 && last === 0 ) {
- return true;
- }
-
- doneName = match[0];
- parent = elem.parentNode;
-
- if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
- count = 0;
-
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
- if ( node.nodeType === 1 ) {
- node.nodeIndex = ++count;
- }
- }
-
- parent[ expando ] = doneName;
- }
-
- diff = elem.nodeIndex - last;
-
- if ( first === 0 ) {
- return diff === 0;
-
- } else {
- return ( diff % first === 0 && diff / first >= 0 );
- }
- }
- },
-
- ID: function( elem, match ) {
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
- },
-
- TAG: function( elem, match ) {
- return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
- },
-
- CLASS: function( elem, match ) {
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
- .indexOf( match ) > -1;
- },
-
- ATTR: function( elem, match ) {
- var name = match[1],
- result = Sizzle.attr ?
- Sizzle.attr( elem, name ) :
- Expr.attrHandle[ name ] ?
- Expr.attrHandle[ name ]( elem ) :
- elem[ name ] != null ?
- elem[ name ] :
- elem.getAttribute( name ),
- value = result + "",
- type = match[2],
- check = match[4];
-
- return result == null ?
- type === "!=" :
- !type && Sizzle.attr ?
- result != null :
- type === "=" ?
- value === check :
- type === "*=" ?
- value.indexOf(check) >= 0 :
- type === "~=" ?
- (" " + value + " ").indexOf(check) >= 0 :
- !check ?
- value && result !== false :
- type === "!=" ?
- value !== check :
- type === "^=" ?
- value.indexOf(check) === 0 :
- type === "$=" ?
- value.substr(value.length - check.length) === check :
- type === "|=" ?
- value === check || value.substr(0, check.length + 1) === check + "-" :
- false;
- },
-
- POS: function( elem, match, i, array ) {
- var name = match[2],
- filter = Expr.setFilters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
- }
- }
- }
-};
-
-var origPOS = Expr.match.POS,
- fescape = function(all, num){
- return "\\" + (num - 0 + 1);
- };
-
-for ( var type in Expr.match ) {
- Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
- Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
-}
-
-var makeArray = function( array, results ) {
- array = Array.prototype.slice.call( array, 0 );
-
- if ( results ) {
- results.push.apply( results, array );
- return results;
- }
-
- return array;
-};
-
-// Perform a simple check to determine if the browser is capable of
-// converting a NodeList to an array using builtin methods.
-// Also verifies that the returned array holds DOM nodes
-// (which is not the case in the Blackberry browser)
-try {
- Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
-
-// Provide a fallback method if it does not work
-} catch( e ) {
- makeArray = function( array, results ) {
- var i = 0,
- ret = results || [];
-
- if ( toString.call(array) === "[object Array]" ) {
- Array.prototype.push.apply( ret, array );
-
- } else {
- if ( typeof array.length === "number" ) {
- for ( var l = array.length; i < l; i++ ) {
- ret.push( array[i] );
- }
-
- } else {
- for ( ; array[i]; i++ ) {
- ret.push( array[i] );
- }
- }
- }
-
- return ret;
- };
-}
-
-var sortOrder, siblingCheck;
-
-if ( document.documentElement.compareDocumentPosition ) {
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
- return a.compareDocumentPosition ? -1 : 1;
- }
-
- return a.compareDocumentPosition(b) & 4 ? -1 : 1;
- };
-
-} else {
- sortOrder = function( a, b ) {
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return a.sourceIndex - b.sourceIndex;
- }
-
- var al, bl,
- ap = [],
- bp = [],
- aup = a.parentNode,
- bup = b.parentNode,
- cur = aup;
-
- // If the nodes are siblings (or identical) we can do a quick check
- if ( aup === bup ) {
- return siblingCheck( a, b );
-
- // If no parents were found then the nodes are disconnected
- } else if ( !aup ) {
- return -1;
-
- } else if ( !bup ) {
- return 1;
- }
-
- // Otherwise they're somewhere else in the tree so we need
- // to build up a full list of the parentNodes for comparison
- while ( cur ) {
- ap.unshift( cur );
- cur = cur.parentNode;
- }
-
- cur = bup;
-
- while ( cur ) {
- bp.unshift( cur );
- cur = cur.parentNode;
- }
-
- al = ap.length;
- bl = bp.length;
-
- // Start walking down the tree looking for a discrepancy
- for ( var i = 0; i < al && i < bl; i++ ) {
- if ( ap[i] !== bp[i] ) {
- return siblingCheck( ap[i], bp[i] );
- }
- }
-
- // We ended someplace up the tree so do a sibling check
- return i === al ?
- siblingCheck( a, bp[i], -1 ) :
- siblingCheck( ap[i], b, 1 );
- };
-
- siblingCheck = function( a, b, ret ) {
- if ( a === b ) {
- return ret;
- }
-
- var cur = a.nextSibling;
-
- while ( cur ) {
- if ( cur === b ) {
- return -1;
- }
-
- cur = cur.nextSibling;
- }
-
- return 1;
- };
-}
-
-// Check to see if the browser returns elements by name when
-// querying by getElementById (and provide a workaround)
-(function(){
- // We're going to inject a fake input element with a specified name
- var form = document.createElement("div"),
- id = "script" + (new Date()).getTime(),
- root = document.documentElement;
-
- form.innerHTML = "<a name='" + id + "'/>";
-
- // Inject it into the root element, check its status, and remove it quickly
- root.insertBefore( form, root.firstChild );
-
- // The workaround has to do additional checks after a getElementById
- // Which slows things down for other browsers (hence the branching)
- if ( document.getElementById( id ) ) {
- Expr.find.ID = function( match, context, isXML ) {
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
-
- return m ?
- m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
- [m] :
- undefined :
- [];
- }
- };
-
- Expr.filter.ID = function( elem, match ) {
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
-
- return elem.nodeType === 1 && node && node.nodeValue === match;
- };
- }
-
- root.removeChild( form );
-
- // release memory in IE
- root = form = null;
-})();
-
-(function(){
- // Check to see if the browser returns only elements
- // when doing getElementsByTagName("*")
-
- // Create a fake element
- var div = document.createElement("div");
- div.appendChild( document.createComment("") );
-
- // Make sure no comments are found
- if ( div.getElementsByTagName("*").length > 0 ) {
- Expr.find.TAG = function( match, context ) {
- var results = context.getElementsByTagName( match[1] );
-
- // Filter out possible comments
- if ( match[1] === "*" ) {
- var tmp = [];
-
- for ( var i = 0; results[i]; i++ ) {
- if ( results[i].nodeType === 1 ) {
- tmp.push( results[i] );
- }
- }
-
- results = tmp;
- }
-
- return results;
- };
- }
-
- // Check to see if an attribute returns normalized href attributes
- div.innerHTML = "<a href='#'></a>";
-
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
- div.firstChild.getAttribute("href") !== "#" ) {
-
- Expr.attrHandle.href = function( elem ) {
- return elem.getAttribute( "href", 2 );
- };
- }
-
- // release memory in IE
- div = null;
-})();
-
-if ( document.querySelectorAll ) {
- (function(){
- var oldSizzle = Sizzle,
- div = document.createElement("div"),
- id = "__sizzle__";
-
- div.innerHTML = "<p class='TEST'></p>";
-
- // Safari can't handle uppercase or unicode characters when
- // in quirks mode.
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
- return;
- }
-
- Sizzle = function( query, context, extra, seed ) {
- context = context || document;
-
- // Only use querySelectorAll on non-XML documents
- // (ID selectors don't work in non-HTML documents)
- if ( !seed && !Sizzle.isXML(context) ) {
- // See if we find a selector to speed up
- var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
-
- if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
- // Speed-up: Sizzle("TAG")
- if ( match[1] ) {
- return makeArray( context.getElementsByTagName( query ), extra );
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
- return makeArray( context.getElementsByClassName( match[2] ), extra );
- }
- }
-
- if ( context.nodeType === 9 ) {
- // Speed-up: Sizzle("body")
- // The body element only exists once, optimize finding it
- if ( query === "body" && context.body ) {
- return makeArray( [ context.body ], extra );
-
- // Speed-up: Sizzle("#ID")
- } else if ( match && match[3] ) {
- var elem = context.getElementById( match[3] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id === match[3] ) {
- return makeArray( [ elem ], extra );
- }
-
- } else {
- return makeArray( [], extra );
- }
- }
-
- try {
- return makeArray( context.querySelectorAll(query), extra );
- } catch(qsaError) {}
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- var oldContext = context,
- old = context.getAttribute( "id" ),
- nid = old || id,
- hasParent = context.parentNode,
- relativeHierarchySelector = /^\s*[+~]/.test( query );
-
- if ( !old ) {
- context.setAttribute( "id", nid );
- } else {
- nid = nid.replace( /'/g, "\\$&" );
- }
- if ( relativeHierarchySelector && hasParent ) {
- context = context.parentNode;
- }
-
- try {
- if ( !relativeHierarchySelector || hasParent ) {
- return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
- }
-
- } catch(pseudoError) {
- } finally {
- if ( !old ) {
- oldContext.removeAttribute( "id" );
- }
- }
- }
- }
-
- return oldSizzle(query, context, extra, seed);
- };
-
- for ( var prop in oldSizzle ) {
- Sizzle[ prop ] = oldSizzle[ prop ];
- }
-
- // release memory in IE
- div = null;
- })();
-}
-
-(function(){
- var html = document.documentElement,
- matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
-
- if ( matches ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9 fails this)
- var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
- pseudoWorks = false;
-
- try {
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( document.documentElement, "[test!='']:sizzle" );
-
- } catch( pseudoError ) {
- pseudoWorks = true;
- }
-
- Sizzle.matchesSelector = function( node, expr ) {
- // Make sure that attribute selectors are quoted
- expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
-
- if ( !Sizzle.isXML( node ) ) {
- try {
- if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
- var ret = matches.call( node, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || !disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9, so check for that
- node.document && node.document.nodeType !== 11 ) {
- return ret;
- }
- }
- } catch(e) {}
- }
-
- return Sizzle(expr, null, null, [node]).length > 0;
- };
- }
-})();
-
-(function(){
- var div = document.createElement("div");
-
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
-
- // Opera can't find a second classname (in 9.6)
- // Also, make sure that getElementsByClassName actually exists
- if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
- return;
- }
-
- // Safari caches class attributes, doesn't catch changes (in 3.2)
- div.lastChild.className = "e";
-
- if ( div.getElementsByClassName("e").length === 1 ) {
- return;
- }
-
- Expr.order.splice(1, 0, "CLASS");
- Expr.find.CLASS = function( match, context, isXML ) {
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
- return context.getElementsByClassName(match[1]);
- }
- };
-
- // release memory in IE
- div = null;
-})();
-
-function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
-
- if ( elem ) {
- var match = false;
-
- elem = elem[dir];
-
- while ( elem ) {
- if ( elem[ expando ] === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 && !isXML ){
- elem[ expando ] = doneName;
- elem.sizset = i;
- }
-
- if ( elem.nodeName.toLowerCase() === cur ) {
- match = elem;
- break;
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
-
- if ( elem ) {
- var match = false;
-
- elem = elem[dir];
-
- while ( elem ) {
- if ( elem[ expando ] === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 ) {
- if ( !isXML ) {
- elem[ expando ] = doneName;
- elem.sizset = i;
- }
-
- if ( typeof cur !== "string" ) {
- if ( elem === cur ) {
- match = true;
- break;
- }
-
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
- match = elem;
- break;
- }
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-if ( document.documentElement.contains ) {
- Sizzle.contains = function( a, b ) {
- return a !== b && (a.contains ? a.contains(b) : true);
- };
-
-} else if ( document.documentElement.compareDocumentPosition ) {
- Sizzle.contains = function( a, b ) {
- return !!(a.compareDocumentPosition(b) & 16);
- };
-
-} else {
- Sizzle.contains = function() {
- return false;
- };
-}
-
-Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
-
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-var posProcess = function( selector, context, seed ) {
- var match,
- tmpSet = [],
- later = "",
- root = context.nodeType ? [context] : context;
-
- // Position selectors must be done after the filter
- // And so must :not(positional) so we move all PSEUDOs to the end
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
- later += match[0];
- selector = selector.replace( Expr.match.PSEUDO, "" );
- }
-
- selector = Expr.relative[selector] ? selector + "*" : selector;
-
- for ( var i = 0, l = root.length; i < l; i++ ) {
- Sizzle( selector, root[i], tmpSet, seed );
- }
-
- return Sizzle.filter( later, tmpSet );
-};
-
-// EXPOSE
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-Sizzle.selectors.attrMap = {};
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.filters;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})();
-
-
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
- // Note: This RegExp should be improved, or likely pulled from Sizzle
- rmultiselector = /,/,
- isSimple = /^.[^:#\[\.,]*$/,
- slice = Array.prototype.slice,
- POS = jQuery.expr.match.POS,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var self = this,
- i, l;
-
- if ( typeof selector !== "string" ) {
- return jQuery( selector ).filter(function() {
- for ( i = 0, l = self.length; i < l; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- });
- }
-
- var ret = this.pushStack( "", "find", selector ),
- length, n, r;
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- length = ret.length;
- jQuery.find( selector, this[i], ret );
-
- if ( i > 0 ) {
- // Make sure that the results are unique
- for ( n = length; n < ret.length; n++ ) {
- for ( r = 0; r < length; r++ ) {
- if ( ret[r] === ret[n] ) {
- ret.splice(n--, 1);
- break;
- }
- }
- }
- }
- }
-
- return ret;
- },
-
- has: function( target ) {
- var targets = jQuery( target );
- return this.filter(function() {
- for ( var i = 0, l = targets.length; i < l; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false), "not", selector);
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true), "filter", selector );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- POS.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var ret = [], i, l, cur = this[0];
-
- // Array (deprecated as of jQuery 1.7)
- if ( jQuery.isArray( selectors ) ) {
- var level = 1;
-
- while ( cur && cur.ownerDocument && cur !== context ) {
- for ( i = 0; i < selectors.length; i++ ) {
-
- if ( jQuery( cur ).is( selectors[ i ] ) ) {
- ret.push({ selector: selectors[ i ], elem: cur, level: level });
- }
- }
-
- cur = cur.parentNode;
- level++;
- }
-
- return ret;
- }
-
- // String
- var pos = POS.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( i = 0, l = this.length; i < l; i++ ) {
- cur = this[i];
-
- while ( cur ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
-
- } else {
- cur = cur.parentNode;
- if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
- break;
- }
- }
- }
- }
-
- ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
-
- return this.pushStack( ret, "closest", selectors );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
- all :
- jQuery.unique( all ) );
- },
-
- andSelf: function() {
- return this.add( this.prevObject );
- }
-});
-
-// A painfully simple check to see if an element is disconnected
-// from a document (should be improved, where feasible).
-function isDisconnected( node ) {
- return !node || !node.parentNode || node.parentNode.nodeType === 11;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return jQuery.nth( elem, 2, "nextSibling" );
- },
- prev: function( elem ) {
- return jQuery.nth( elem, 2, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( elem.parentNode.firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.makeArray( elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret, name, slice.call( arguments ).join(",") );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- nth: function( cur, result, dir, elem ) {
- result = result || 1;
- var num = 0;
-
- for ( ; cur; cur = cur[dir] ) {
- if ( cur.nodeType === 1 && ++num === result ) {
- break;
- }
- }
-
- return cur;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem, i ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem, i ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-
-
-
-
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style)/i,
- rnocache = /<(?:script|object|embed|option|style)/i,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /\/(java|ecma)script/i,
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- area: [ 1, "<map>", "</map>" ],
- _default: [ 0, "", "" ]
- },
- safeFragment = createSafeFragment( document );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-// IE can't serialize <link> and <script> tags normally
-if ( !jQuery.support.htmlSerialize ) {
- wrapMap._default = [ 1, "div<div>", "</div>" ];
-}
-
-jQuery.fn.extend({
- text: function( text ) {
- if ( jQuery.isFunction(text) ) {
- return this.each(function(i) {
- var self = jQuery( this );
-
- self.text( text.call(this, i, self.text()) );
- });
- }
-
- if ( typeof text !== "object" && text !== undefined ) {
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
- }
-
- return jQuery.text( this );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- if ( this[0] && this[0].parentNode ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this );
- });
- } else if ( arguments.length ) {
- var set = jQuery.clean( arguments );
- set.push.apply( set, this.toArray() );
- return this.pushStack( set, "before", arguments );
- }
- },
-
- after: function() {
- if ( this[0] && this[0].parentNode ) {
- return this.domManip(arguments, false, function( elem ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- });
- } else if ( arguments.length ) {
- var set = this.pushStack( this, "after", arguments );
- set.push.apply( set, jQuery.clean(arguments) );
- return set;
- }
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- jQuery.cleanData( [ elem ] );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( elem.getElementsByTagName("*") );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- if ( value === undefined ) {
- return this[0] && this[0].nodeType === 1 ?
- this[0].innerHTML.replace(rinlinejQuery, "") :
- null;
-
- // See if we can take a shortcut and just use innerHTML
- } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
- !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
-
- value = value.replace(rxhtmlTag, "<$1></$2>");
-
- try {
- for ( var i = 0, l = this.length; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( this[i].nodeType === 1 ) {
- jQuery.cleanData( this[i].getElementsByTagName("*") );
- this[i].innerHTML = value;
- }
- }
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {
- this.empty().append( value );
- }
-
- } else if ( jQuery.isFunction( value ) ) {
- this.each(function(i){
- var self = jQuery( this );
-
- self.html( value.call(this, i, self.html()) );
- });
-
- } else {
- this.empty().append( value );
- }
-
- return this;
- },
-
- replaceWith: function( value ) {
- if ( this[0] && this[0].parentNode ) {
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( jQuery.isFunction( value ) ) {
- return this.each(function(i) {
- var self = jQuery(this), old = self.html();
- self.replaceWith( value.call( this, i, old ) );
- });
- }
-
- if ( typeof value !== "string" ) {
- value = jQuery( value ).detach();
- }
-
- return this.each(function() {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- jQuery( this ).remove();
-
- if ( next ) {
- jQuery(next).before( value );
- } else {
- jQuery(parent).append( value );
- }
- });
- } else {
- return this.length ?
- this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
- this;
- }
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
- var results, first, fragment, parent,
- value = args[0],
- scripts = [];
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
- return this.each(function() {
- jQuery(this).domManip( args, table, callback, true );
- });
- }
-
- if ( jQuery.isFunction(value) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- args[0] = value.call(this, i, table ? self.html() : undefined);
- self.domManip( args, table, callback );
- });
- }
-
- if ( this[0] ) {
- parent = value && value.parentNode;
-
- // If we're in a fragment, just use that instead of building a new one
- if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
- results = { fragment: parent };
-
- } else {
- results = jQuery.buildFragment( args, this, scripts );
- }
-
- fragment = results.fragment;
-
- if ( fragment.childNodes.length === 1 ) {
- first = fragment = fragment.firstChild;
- } else {
- first = fragment.firstChild;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
-
- for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
- callback.call(
- table ?
- root(this[i], first) :
- this[i],
- // Make sure that we do not leak memory by inadvertently discarding
- // the original fragment (which might have attached data) instead of
- // using it; in addition, use the original fragment object for the last
- // item instead of first because it can end up being emptied incorrectly
- // in certain situations (Bug #8070).
- // Fragments from the fragment cache must always be cloned and never used
- // in place.
- results.cacheable || ( l > 1 && i < lastIndex ) ?
- jQuery.clone( fragment, true, true ) :
- fragment
- );
- }
- }
-
- if ( scripts.length ) {
- jQuery.each( scripts, evalScript );
- }
- }
-
- return this;
- }
-});
-
-function root( elem, cur ) {
- return jQuery.nodeName(elem, "table") ?
- (elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
- elem;
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function cloneFixAttributes( src, dest ) {
- var nodeName;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // clearAttributes removes the attributes, which we don't want,
- // but also removes the attachEvent events, which we *do* want
- if ( dest.clearAttributes ) {
- dest.clearAttributes();
- }
-
- // mergeAttributes, in contrast, only merges back on the
- // original attributes, not the events
- if ( dest.mergeAttributes ) {
- dest.mergeAttributes( src );
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 fail to clone children inside object elements that use
- // the proprietary classid attribute value (rather than the type
- // attribute) to identify the type of content to display
- if ( nodeName === "object" ) {
- dest.outerHTML = src.outerHTML;
-
- } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
- if ( src.checked ) {
- dest.defaultChecked = dest.checked = src.checked;
- }
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-
- // Event data gets referenced instead of copied if the expando
- // gets copied too
- dest.removeAttribute( jQuery.expando );
-}
-
-jQuery.buildFragment = function( args, nodes, scripts ) {
- var fragment, cacheable, cacheresults, doc,
- first = args[ 0 ];
-
- // nodes may contain either an explicit document object,
- // a jQuery collection or context object.
- // If nodes[0] contains a valid object to assign to doc
- if ( nodes && nodes[0] ) {
- doc = nodes[0].ownerDocument || nodes[0];
- }
-
- // Ensure that an attr object doesn't incorrectly stand in as a document object
- // Chrome and Firefox seem to allow this to occur and will throw exception
- // Fixes #8950
- if ( !doc.createDocumentFragment ) {
- doc = document;
- }
-
- // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
- // Cloning options loses the selected state, so don't cache them
- // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
- // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
- // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
- if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
- first.charAt(0) === "<" && !rnocache.test( first ) &&
- (jQuery.support.checkClone || !rchecked.test( first )) &&
- (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
-
- cacheable = true;
-
- cacheresults = jQuery.fragments[ first ];
- if ( cacheresults && cacheresults !== 1 ) {
- fragment = cacheresults;
- }
- }
-
- if ( !fragment ) {
- fragment = doc.createDocumentFragment();
- jQuery.clean( args, doc, fragment, scripts );
- }
-
- if ( cacheable ) {
- jQuery.fragments[ first ] = cacheresults ? fragment : 1;
- }
-
- return { fragment: fragment, cacheable: cacheable };
-};
-
-jQuery.fragments = {};
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var ret = [],
- insert = jQuery( selector ),
- parent = this.length === 1 && this[0].parentNode;
-
- if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
- insert[ original ]( this[0] );
- return this;
-
- } else {
- for ( var i = 0, l = insert.length; i < l; i++ ) {
- var elems = ( i > 0 ? this.clone(true) : this ).get();
- jQuery( insert[i] )[ original ]( elems );
- ret = ret.concat( elems );
- }
-
- return this.pushStack( ret, name, insert.selector );
- }
- };
-});
-
-function getAll( elem ) {
- if ( typeof elem.getElementsByTagName !== "undefined" ) {
- return elem.getElementsByTagName( "*" );
-
- } else if ( typeof elem.querySelectorAll !== "undefined" ) {
- return elem.querySelectorAll( "*" );
-
- } else {
- return [];
- }
-}
-
-// Used in clean, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( elem.type === "checkbox" || elem.type === "radio" ) {
- elem.defaultChecked = elem.checked;
- }
-}
-// Finds all inputs and passes them to fixDefaultChecked
-function findInputs( elem ) {
- var nodeName = ( elem.nodeName || "" ).toLowerCase();
- if ( nodeName === "input" ) {
- fixDefaultChecked( elem );
- // Skip scripts, get other children
- } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
- jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
- }
-}
-
-// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
-function shimCloneNode( elem ) {
- var div = document.createElement( "div" );
- safeFragment.appendChild( div );
-
- div.innerHTML = elem.outerHTML;
- return div.firstChild;
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var srcElements,
- destElements,
- i,
- // IE<=8 does not properly clone detached, unknown element nodes
- clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
- elem.cloneNode( true ) :
- shimCloneNode( elem );
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
- // IE copies events bound via attachEvent when using cloneNode.
- // Calling detachEvent on the clone will also remove the events
- // from the original. In order to get around this, we use some
- // proprietary methods to clear the events. Thanks to MooTools
- // guys for this hotness.
-
- cloneFixAttributes( elem, clone );
-
- // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- // Weird iteration because IE will replace the length property
- // with an element if you are cloning the body and one of the
- // elements on the page has a name or id of "length"
- for ( i = 0; srcElements[i]; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- cloneFixAttributes( srcElements[i], destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- cloneCopyEvent( elem, clone );
-
- if ( deepDataAndEvents ) {
- srcElements = getAll( elem );
- destElements = getAll( clone );
-
- for ( i = 0; srcElements[i]; ++i ) {
- cloneCopyEvent( srcElements[i], destElements[i] );
- }
- }
- }
-
- srcElements = destElements = null;
-
- // Return the cloned set
- return clone;
- },
-
- clean: function( elems, context, fragment, scripts ) {
- var checkScriptType;
-
- context = context || document;
-
- // !context.createElement fails in IE with an error but returns typeof 'object'
- if ( typeof context.createElement === "undefined" ) {
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
- }
-
- var ret = [], j;
-
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- if ( typeof elem === "number" ) {
- elem += "";
- }
-
- if ( !elem ) {
- continue;
- }
-
- // Convert html string into DOM nodes
- if ( typeof elem === "string" ) {
- if ( !rhtml.test( elem ) ) {
- elem = context.createTextNode( elem );
- } else {
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(rxhtmlTag, "<$1></$2>");
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
- wrap = wrapMap[ tag ] || wrapMap._default,
- depth = wrap[0],
- div = context.createElement("div");
-
- // Append wrapper element to unknown element safe doc fragment
- if ( context === document ) {
- // Use the fragment we've already created for this document
- safeFragment.appendChild( div );
- } else {
- // Use a fragment created with the owner document
- createSafeFragment( context ).appendChild( div );
- }
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + elem + wrap[2];
-
- // Move to the right depth
- while ( depth-- ) {
- div = div.lastChild;
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- var hasBody = rtbody.test(elem),
- tbody = tag === "table" && !hasBody ?
- div.firstChild && div.firstChild.childNodes :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !hasBody ?
- div.childNodes :
- [];
-
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
- }
- }
- }
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
- }
-
- elem = div.childNodes;
- }
- }
-
- // Resets defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- var len;
- if ( !jQuery.support.appendChecked ) {
- if ( elem[0] && typeof (len = elem.length) === "number" ) {
- for ( j = 0; j < len; j++ ) {
- findInputs( elem[j] );
- }
- } else {
- findInputs( elem );
- }
- }
-
- if ( elem.nodeType ) {
- ret.push( elem );
- } else {
- ret = jQuery.merge( ret, elem );
- }
- }
-
- if ( fragment ) {
- checkScriptType = function( elem ) {
- return !elem.type || rscriptType.test( elem.type );
- };
- for ( i = 0; ret[i]; i++ ) {
- if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
- scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
-
- } else {
- if ( ret[i].nodeType === 1 ) {
- var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
-
- ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
- }
- fragment.appendChild( ret[i] );
- }
- }
- }
-
- return ret;
- },
-
- cleanData: function( elems ) {
- var data, id,
- cache = jQuery.cache,
- special = jQuery.event.special,
- deleteExpando = jQuery.support.deleteExpando;
-
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
- continue;
- }
-
- id = elem[ jQuery.expando ];
-
- if ( id ) {
- data = cache[ id ];
-
- if ( data && data.events ) {
- for ( var type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
-
- // Null the DOM reference to avoid IE6/7/8 leak (#7054)
- if ( data.handle ) {
- data.handle.elem = null;
- }
- }
-
- if ( deleteExpando ) {
- delete elem[ jQuery.expando ];
-
- } else if ( elem.removeAttribute ) {
- elem.removeAttribute( jQuery.expando );
- }
-
- delete cache[ id ];
- }
- }
- }
-});
-
-function evalScript( i, elem ) {
- if ( elem.src ) {
- jQuery.ajax({
- url: elem.src,
- async: false,
- dataType: "script"
- });
- } else {
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
-}
-
-
-
-
-var ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity=([^)]*)/,
- // fixed for IE9, see #8346
- rupper = /([A-Z]|^ms)/g,
- rnumpx = /^-?\d+(?:px)?$/i,
- rnum = /^-?\d/,
- rrelNum = /^([\-+])=([\-+.\de]+)/,
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssWidth = [ "Left", "Right" ],
- cssHeight = [ "Top", "Bottom" ],
- curCSS,
-
- getComputedStyle,
- currentStyle;
-
-jQuery.fn.css = function( name, value ) {
- // Setting 'undefined' is a no-op
- if ( arguments.length === 2 && value === undefined ) {
- return this;
- }
-
- return jQuery.access( this, name, value, true, function( elem, name, value ) {
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- });
-};
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity", "opacity" );
- return ret === "" ? "1" : ret;
-
- } else {
- return elem.style.opacity;
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, origName = jQuery.camelCase( name ),
- style = elem.style, hooks = jQuery.cssHooks[ origName ];
-
- name = jQuery.cssProps[ origName ] || origName;
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra ) {
- var ret, hooks;
-
- // Make sure that we're working with the right name
- name = jQuery.camelCase( name );
- hooks = jQuery.cssHooks[ name ];
- name = jQuery.cssProps[ name ] || name;
-
- // cssFloat needs a special treatment
- if ( name === "cssFloat" ) {
- name = "float";
- }
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
- return ret;
-
- // Otherwise, if a way to get the computed value exists, use that
- } else if ( curCSS ) {
- return curCSS( elem, name );
- }
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {};
-
- // Remember the old values, and insert the new ones
- for ( var name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- callback.call( elem );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
- }
-});
-
-// DEPRECATED, Use jQuery.css() instead
-jQuery.curCSS = jQuery.css;
-
-jQuery.each(["height", "width"], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- var val;
-
- if ( computed ) {
- if ( elem.offsetWidth !== 0 ) {
- return getWH( elem, name, extra );
- } else {
- jQuery.swap( elem, cssShow, function() {
- val = getWH( elem, name, extra );
- });
- }
-
- return val;
- }
- },
-
- set: function( elem, value ) {
- if ( rnumpx.test( value ) ) {
- // ignore negative width and height values #1599
- value = parseFloat( value );
-
- if ( value >= 0 ) {
- return value + "px";
- }
-
- } else {
- return value;
- }
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( parseFloat( RegExp.$1 ) / 100 ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there there is no filter style applied in a css rule, we are done
- if ( currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-jQuery(function() {
- // This hook cannot be added until DOM ready because the support test
- // for it is not run until after DOM ready
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- var ret;
- jQuery.swap( elem, { "display": "inline-block" }, function() {
- if ( computed ) {
- ret = curCSS( elem, "margin-right", "marginRight" );
- } else {
- ret = elem.style.marginRight;
- }
- });
- return ret;
- }
- };
- }
-});
-
-if ( document.defaultView && document.defaultView.getComputedStyle ) {
- getComputedStyle = function( elem, name ) {
- var ret, defaultView, computedStyle;
-
- name = name.replace( rupper, "-$1" ).toLowerCase();
-
- if ( (defaultView = elem.ownerDocument.defaultView) &&
- (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
- ret = computedStyle.getPropertyValue( name );
- if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
- ret = jQuery.style( elem, name );
- }
- }
-
- return ret;
- };
-}
-
-if ( document.documentElement.currentStyle ) {
- currentStyle = function( elem, name ) {
- var left, rsLeft, uncomputed,
- ret = elem.currentStyle && elem.currentStyle[ name ],
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret === null && style && (uncomputed = style[ name ]) ) {
- ret = uncomputed;
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
-
- // Remember the original values
- left = style.left;
- rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- elem.runtimeStyle.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ( ret || 0 );
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- elem.runtimeStyle.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-curCSS = getComputedStyle || currentStyle;
-
-function getWH( elem, name, extra ) {
-
- // Start with offset property
- var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- which = name === "width" ? cssWidth : cssHeight,
- i = 0,
- len = which.length;
-
- if ( val > 0 ) {
- if ( extra !== "border" ) {
- for ( ; i < len; i++ ) {
- if ( !extra ) {
- val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
- }
- if ( extra === "margin" ) {
- val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
- } else {
- val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
- }
- }
- }
-
- return val + "px";
- }
-
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, name );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ] || 0;
- }
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
-
- // Add padding, border, margin
- if ( extra ) {
- for ( ; i < len; i++ ) {
- val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
- if ( extra !== "padding" ) {
- val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
- }
- if ( extra === "margin" ) {
- val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
- }
- }
- }
-
- return val + "px";
-}
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- var width = elem.offsetWidth,
- height = elem.offsetHeight;
-
- return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-
-
-
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rhash = /#.*$/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rquery = /\?/,
- rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
- rselectTextarea = /^(?:select|textarea)/i,
- rspacesAjax = /\s+/,
- rts = /([?&])_=[^&]*/,
- rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Document location
- ajaxLocation,
-
- // Document location segments
- ajaxLocParts,
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = ["*/"] + ["*"];
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- if ( jQuery.isFunction( func ) ) {
- var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
- i = 0,
- length = dataTypes.length,
- dataType,
- list,
- placeBefore;
-
- // For each dataType in the dataTypeExpression
- for ( ; i < length; i++ ) {
- dataType = dataTypes[ i ];
- // We control if we're asked to add before
- // any existing element
- placeBefore = /^\+/.test( dataType );
- if ( placeBefore ) {
- dataType = dataType.substr( 1 ) || "*";
- }
- list = structure[ dataType ] = structure[ dataType ] || [];
- // then we add to the structure accordingly
- list[ placeBefore ? "unshift" : "push" ]( func );
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
- dataType /* internal */, inspected /* internal */ ) {
-
- dataType = dataType || options.dataTypes[ 0 ];
- inspected = inspected || {};
-
- inspected[ dataType ] = true;
-
- var list = structure[ dataType ],
- i = 0,
- length = list ? list.length : 0,
- executeOnly = ( structure === prefilters ),
- selection;
-
- for ( ; i < length && ( executeOnly || !selection ); i++ ) {
- selection = list[ i ]( options, originalOptions, jqXHR );
- // If we got redirected to another dataType
- // we try there if executing only and not done already
- if ( typeof selection === "string" ) {
- if ( !executeOnly || inspected[ selection ] ) {
- selection = undefined;
- } else {
- options.dataTypes.unshift( selection );
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, selection, inspected );
- }
- }
- }
- // If we're only executing or nothing was selected
- // we try the catchall dataType if not done already
- if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
- selection = inspectPrefiltersOrTransports(
- structure, options, originalOptions, jqXHR, "*", inspected );
- }
- // unnecessary when only executing (prefilters)
- // but it'll be ignored by the caller in that case
- return selection;
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-}
-
-jQuery.fn.extend({
- load: function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
-
- // Don't do a request if no elements are being requested
- } else if ( !this.length ) {
- return this;
- }
-
- var off = url.indexOf( " " );
- if ( off >= 0 ) {
- var selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // Default to a GET request
- var type = "GET";
-
- // If the second parameter was provided
- if ( params ) {
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( typeof params === "object" ) {
- params = jQuery.param( params, jQuery.ajaxSettings.traditional );
- type = "POST";
- }
- }
-
- var self = this;
-
- // Request the remote document
- jQuery.ajax({
- url: url,
- type: type,
- dataType: "html",
- data: params,
- // Complete callback (responseText is used internally)
- complete: function( jqXHR, status, responseText ) {
- // Store the response as specified by the jqXHR object
- responseText = jqXHR.responseText;
- // If successful, inject the HTML into all the matched elements
- if ( jqXHR.isResolved() ) {
- // #4825: Get the actual response in case
- // a dataFilter is present in ajaxSettings
- jqXHR.done(function( r ) {
- responseText = r;
- });
- // See if a selector was specified
- self.html( selector ?
- // Create a dummy div to hold the results
- jQuery("<div>")
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append(responseText.replace(rscript, ""))
-
- // Locate the specified elements
- .find(selector) :
-
- // If not, just inject the full result
- responseText );
- }
-
- if ( callback ) {
- self.each( callback, [ responseText, status, jqXHR ] );
- }
- }
- });
-
- return this;
- },
-
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
-
- serializeArray: function() {
- return this.map(function(){
- return this.elements ? jQuery.makeArray( this.elements ) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- ( this.checked || rselectTextarea.test( this.nodeName ) ||
- rinput.test( this.type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val, i ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
- jQuery.fn[ o ] = function( f ){
- return this.on( o, f );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- type: method,
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- };
-});
-
-jQuery.extend({
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- if ( settings ) {
- // Building a settings object
- ajaxExtend( target, jQuery.ajaxSettings );
- } else {
- // Extending ajaxSettings
- settings = target;
- target = jQuery.ajaxSettings;
- }
- ajaxExtend( target, settings );
- return target;
- },
-
- ajaxSettings: {
- url: ajaxLocation,
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- type: "GET",
- contentType: "application/x-www-form-urlencoded",
- processData: true,
- async: true,
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- xml: "application/xml, text/xml",
- html: "text/html",
- text: "text/plain",
- json: "application/json, text/javascript",
- "*": allTypes
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // List of data converters
- // 1) key format is "source_type destination_type" (a single space in-between)
- // 2) the catchall symbol "*" can be used for source_type
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- context: true,
- url: true
- }
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events
- // It's the callbackContext if one was provided in the options
- // and if it's a DOM node or a jQuery collection
- globalEventContext = callbackContext !== s &&
- ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
- jQuery( callbackContext ) : jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks( "once memory" ),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // ifModified key
- ifModifiedKey,
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // Response headers
- responseHeadersString,
- responseHeaders,
- // transport
- transport,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // The jqXHR state
- state = 0,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Fake xhr
- jqXHR = {
-
- readyState: 0,
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- if ( !state ) {
- var lname = name.toLowerCase();
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match === undefined ? null : match;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- statusText = statusText || "abort";
- if ( transport ) {
- transport.abort( statusText );
- }
- done( 0, statusText );
- return this;
- }
- };
-
- // Callback for when everything is done
- // It is defined here because jslint complains if it is declared
- // at the end of the function (which would be more logical and readable)
- function done( status, nativeStatusText, responses, headers ) {
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- var isSuccess,
- success,
- error,
- statusText = nativeStatusText,
- response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
- lastModified,
- etag;
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
-
- if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
- jQuery.lastModified[ ifModifiedKey ] = lastModified;
- }
- if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
- jQuery.etag[ ifModifiedKey ] = etag;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
-
- statusText = "notmodified";
- isSuccess = true;
-
- // If we have data
- } else {
-
- try {
- success = ajaxConvert( s, response );
- statusText = "success";
- isSuccess = true;
- } catch(e) {
- // We have a parsererror
- statusText = "parsererror";
- error = e;
- }
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( !statusText || status ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = "" + ( nativeStatusText || statusText );
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger( "ajaxStop" );
- }
- }
- }
-
- // Attach deferreds
- deferred.promise( jqXHR );
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
- jqXHR.complete = completeDeferred.add;
-
- // Status-dependent callbacks
- jqXHR.statusCode = function( map ) {
- if ( map ) {
- var tmp;
- if ( state < 2 ) {
- for ( tmp in map ) {
- statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
- }
- } else {
- tmp = map[ jqXHR.status ];
- jqXHR.then( tmp, tmp );
- }
- }
- return this;
- };
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // We also use the url parameter if available
- s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
-
- // Determine if a cross-domain request is in order
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefiler, stop there
- if ( state === 2 ) {
- return false;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger( "ajaxStart" );
- }
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Get ifModifiedKey before adding the anti-cache parameter
- ifModifiedKey = s.url;
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
-
- var ts = jQuery.now(),
- // try replacing _= if it is there
- ret = s.url.replace( rts, "$1_=" + ts );
-
- // if nothing was replaced, add timestamp to the end
- s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- ifModifiedKey = ifModifiedKey || s.url;
- if ( jQuery.lastModified[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
- }
- if ( jQuery.etag[ ifModifiedKey ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
- }
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already
- jqXHR.abort();
- return false;
-
- }
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout( function(){
- jqXHR.abort( "timeout" );
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch (e) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- return jqXHR;
- },
-
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a, traditional ) {
- var s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : value;
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( var prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
- }
-});
-
-function buildParams( prefix, obj, traditional, add ) {
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // If array item is non-scalar (array or object), encode its
- // numeric index to resolve deserialization ambiguity issues.
- // Note that rack (as of 1.0.0) can't currently deserialize
- // nested arrays properly, and attempting to do so may cause
- // a server error. Possible fixes are to modify rack's
- // deserialization algorithm or to provide an option or flag
- // to force array serialization to be shallow.
- buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && obj != null && typeof obj === "object" ) {
- // Serialize object item.
- for ( var name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-
-// This is still on the jQuery object... for now
-// Want to move this to jQuery.ajax some day
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {}
-
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields,
- ct,
- type,
- finalDataType,
- firstDataType;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- var dataTypes = s.dataTypes,
- converters = {},
- i,
- key,
- length = dataTypes.length,
- tmp,
- // Current and previous dataTypes
- current = dataTypes[ 0 ],
- prev,
- // Conversion expression
- conversion,
- // Conversion function
- conv,
- // Conversion functions (transitive conversion)
- conv1,
- conv2;
-
- // For each dataType in the chain
- for ( i = 1; i < length; i++ ) {
-
- // Create converters map
- // with lowercased keys
- if ( i === 1 ) {
- for ( key in s.converters ) {
- if ( typeof key === "string" ) {
- converters[ key.toLowerCase() ] = s.converters[ key ];
- }
- }
- }
-
- // Get the dataTypes
- prev = current;
- current = dataTypes[ i ];
-
- // If current is auto dataType, update it to prev
- if ( current === "*" ) {
- current = prev;
- // If no auto and dataTypes are actually different
- } else if ( prev !== "*" && prev !== current ) {
-
- // Get the converter
- conversion = prev + " " + current;
- conv = converters[ conversion ] || converters[ "* " + current ];
-
- // If there is no direct converter, search transitively
- if ( !conv ) {
- conv2 = undefined;
- for ( conv1 in converters ) {
- tmp = conv1.split( " " );
- if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
- conv2 = converters[ tmp[1] + " " + current ];
- if ( conv2 ) {
- conv1 = converters[ conv1 ];
- if ( conv1 === true ) {
- conv = conv2;
- } else if ( conv2 === true ) {
- conv = conv1;
- }
- break;
- }
- }
- }
- }
- // If we found no converter, dispatch an error
- if ( !( conv || conv2 ) ) {
- jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
- }
- // If found converter is not an equivalence
- if ( conv !== true ) {
- // Convert with 1 or 2 converters accordingly
- response = conv ? conv( response ) : conv2( conv1(response) );
- }
- }
- }
- return response;
-}
-
-
-
-
-var jsc = jQuery.now(),
- jsre = /(\=)\?(&|$)|\?\?/i;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- return jQuery.expando + "_" + ( jsc++ );
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
- ( typeof s.data === "string" );
-
- if ( s.dataTypes[ 0 ] === "jsonp" ||
- s.jsonp !== false && ( jsre.test( s.url ) ||
- inspectData && jsre.test( s.data ) ) ) {
-
- var responseContainer,
- jsonpCallback = s.jsonpCallback =
- jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
- previous = window[ jsonpCallback ],
- url = s.url,
- data = s.data,
- replace = "$1" + jsonpCallback + "$2";
-
- if ( s.jsonp !== false ) {
- url = url.replace( jsre, replace );
- if ( s.url === url ) {
- if ( inspectData ) {
- data = data.replace( jsre, replace );
- }
- if ( s.data === data ) {
- // Add callback manually
- url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
- }
- }
- }
-
- s.url = url;
- s.data = data;
-
- // Install callback
- window[ jsonpCallback ] = function( response ) {
- responseContainer = [ response ];
- };
-
- // Clean-up function
- jqXHR.always(function() {
- // Set callback back to previous value
- window[ jsonpCallback ] = previous;
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( previous ) ) {
- window[ jsonpCallback ]( responseContainer[ 0 ] );
- }
- });
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( jsonpCallback + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Delegate to script
- return "script";
- }
-});
-
-
-
-
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /javascript|ecmascript/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement( "script" );
-
- script.async = "async";
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( head && script.parentNode ) {
- head.removeChild( script );
- }
-
- // Dereference the script
- script = undefined;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
- // This arises when a base node is used (#2709 and #4378).
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( 0, 1 );
- }
- }
- };
- }
-});
-
-
-
-
-var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject ? function() {
- // Abort all pending requests
- for ( var key in xhrCallbacks ) {
- xhrCallbacks[ key ]( 0, 1 );
- }
- } : false,
- xhrId = 0,
- xhrCallbacks;
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject( "Microsoft.XMLHTTP" );
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-(function( xhr ) {
- jQuery.extend( jQuery.support, {
- ajax: !!xhr,
- cors: !!xhr && ( "withCredentials" in xhr )
- });
-})( jQuery.ajaxSettings.xhr() );
-
-// Create transport if the browser can provide an xhr
-if ( jQuery.support.ajax ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var xhr = s.xhr(),
- handle,
- i;
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( _ ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occured
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
- responses = {};
- xml = xhr.responseXML;
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
- responses.text = xhr.responseText;
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- // if we're in sync mode or it's in cache
- // and has been retrieved directly (IE6 & IE7)
- // we need to manually fire the callback
- if ( !s.async || xhr.readyState === 4 ) {
- callback();
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback(0,1);
- }
- }
- };
- }
- });
-}
-
-
-
-
-var elemdisplay = {},
- iframe, iframeDoc,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
- timerId,
- fxAttrs = [
- // height animations
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
- // width animations
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
- // opacity animations
- [ "opacity" ]
- ],
- fxNow;
-
-jQuery.fn.extend({
- show: function( speed, easing, callback ) {
- var elem, display;
-
- if ( speed || speed === 0 ) {
- return this.animate( genFx("show", 3), speed, easing, callback );
-
- } else {
- for ( var i = 0, j = this.length; i < j; i++ ) {
- elem = this[ i ];
-
- if ( elem.style ) {
- display = elem.style.display;
-
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
- display = elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( display === "" && jQuery.css(elem, "display") === "none" ) {
- jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( i = 0; i < j; i++ ) {
- elem = this[ i ];
-
- if ( elem.style ) {
- display = elem.style.display;
-
- if ( display === "" || display === "none" ) {
- elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
- }
- }
- }
-
- return this;
- }
- },
-
- hide: function( speed, easing, callback ) {
- if ( speed || speed === 0 ) {
- return this.animate( genFx("hide", 3), speed, easing, callback);
-
- } else {
- var elem, display,
- i = 0,
- j = this.length;
-
- for ( ; i < j; i++ ) {
- elem = this[i];
- if ( elem.style ) {
- display = jQuery.css( elem, "display" );
-
- if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
- jQuery._data( elem, "olddisplay", display );
- }
- }
- }
-
- // Set the display of the elements in a second loop
- // to avoid the constant reflow
- for ( i = 0; i < j; i++ ) {
- if ( this[i].style ) {
- this[i].style.display = "none";
- }
- }
-
- return this;
- }
- },
-
- // Save the old toggle function
- _toggle: jQuery.fn.toggle,
-
- toggle: function( fn, fn2, callback ) {
- var bool = typeof fn === "boolean";
-
- if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
- this._toggle.apply( this, arguments );
-
- } else if ( fn == null || bool ) {
- this.each(function() {
- var state = bool ? fn : jQuery(this).is(":hidden");
- jQuery(this)[ state ? "show" : "hide" ]();
- });
-
- } else {
- this.animate(genFx("toggle", 3), fn, fn2, callback);
- }
-
- return this;
- },
-
- fadeTo: function( speed, to, easing, callback ) {
- return this.filter(":hidden").css("opacity", 0).show().end()
- .animate({opacity: to}, speed, easing, callback);
- },
-
- animate: function( prop, speed, easing, callback ) {
- var optall = jQuery.speed( speed, easing, callback );
-
- if ( jQuery.isEmptyObject( prop ) ) {
- return this.each( optall.complete, [ false ] );
- }
-
- // Do not change referenced properties as per-property easing will be lost
- prop = jQuery.extend( {}, prop );
-
- function doAnimation() {
- // XXX 'this' does not always have a nodeName when running the
- // test suite
-
- if ( optall.queue === false ) {
- jQuery._mark( this );
- }
-
- var opt = jQuery.extend( {}, optall ),
- isElement = this.nodeType === 1,
- hidden = isElement && jQuery(this).is(":hidden"),
- name, val, p, e,
- parts, start, end, unit,
- method;
-
- // will store per property easing and be used to determine when an animation is complete
- opt.animatedProperties = {};
-
- for ( p in prop ) {
-
- // property name normalization
- name = jQuery.camelCase( p );
- if ( p !== name ) {
- prop[ name ] = prop[ p ];
- delete prop[ p ];
- }
-
- val = prop[ name ];
-
- // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
- if ( jQuery.isArray( val ) ) {
- opt.animatedProperties[ name ] = val[ 1 ];
- val = prop[ name ] = val[ 0 ];
- } else {
- opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
- }
-
- if ( val === "hide" && hidden || val === "show" && !hidden ) {
- return opt.complete.call( this );
- }
-
- if ( isElement && ( name === "height" || name === "width" ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( this, "display" ) === "inline" &&
- jQuery.css( this, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
- this.style.display = "inline-block";
-
- } else {
- this.style.zoom = 1;
- }
- }
- }
- }
-
- if ( opt.overflow != null ) {
- this.style.overflow = "hidden";
- }
-
- for ( p in prop ) {
- e = new jQuery.fx( this, opt, p );
- val = prop[ p ];
-
- if ( rfxtypes.test( val ) ) {
-
- // Tracks whether to show or hide based on private
- // data attached to the element
- method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
- if ( method ) {
- jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
- e[ method ]();
- } else {
- e[ val ]();
- }
-
- } else {
- parts = rfxnum.exec( val );
- start = e.cur();
-
- if ( parts ) {
- end = parseFloat( parts[2] );
- unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" ) {
- jQuery.style( this, p, (end || 1) + unit);
- start = ( (end || 1) / e.cur() ) * start;
- jQuery.style( this, p, start + unit);
- }
-
- // If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] ) {
- end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
- }
-
- e.custom( start, end, unit );
-
- } else {
- e.custom( start, val, "" );
- }
- }
- }
-
- // For JS strict compliance
- return true;
- }
-
- return optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
-
- stop: function( type, clearQueue, gotoEnd ) {
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var index,
- hadTimers = false,
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- // clear marker counters if we know they won't be
- if ( !gotoEnd ) {
- jQuery._unmark( true, this );
- }
-
- function stopQueue( elem, data, index ) {
- var hooks = data[ index ];
- jQuery.removeData( elem, index, true );
- hooks.stop( gotoEnd );
- }
-
- if ( type == null ) {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
- stopQueue( this, data, index );
- }
- }
- } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
- stopQueue( this, data, index );
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- if ( gotoEnd ) {
-
- // force the next step to be the last
- timers[ index ]( true );
- } else {
- timers[ index ].saveState();
- }
- hadTimers = true;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( !( gotoEnd && hadTimers ) ) {
- jQuery.dequeue( this, type );
- }
- });
- }
-
-});
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout( clearFxNow, 0 );
- return ( fxNow = jQuery.now() );
-}
-
-function clearFxNow() {
- fxNow = undefined;
-}
-
-// Generate parameters to create a standard animation
-function genFx( type, num ) {
- var obj = {};
-
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
- obj[ this ] = type;
- });
-
- return obj;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx( "show", 1 ),
- slideUp: genFx( "hide", 1 ),
- slideToggle: genFx( "toggle", 1 ),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.extend({
- speed: function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function( noUnmark ) {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- } else if ( noUnmark !== false ) {
- jQuery._unmark( this );
- }
- };
-
- return opt;
- },
-
- easing: {
- linear: function( p, n, firstNum, diff ) {
- return firstNum + diff * p;
- },
- swing: function( p, n, firstNum, diff ) {
- return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
- }
- },
-
- timers: [],
-
- fx: function( elem, options, prop ) {
- this.options = options;
- this.elem = elem;
- this.prop = prop;
-
- options.orig = options.orig || {};
- }
-
-});
-
-jQuery.fx.prototype = {
- // Simple function for setting a style value
- update: function() {
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
- },
-
- // Get the current size
- cur: function() {
- if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
- return this.elem[ this.prop ];
- }
-
- var parsed,
- r = jQuery.css( this.elem, this.prop );
- // Empty strings, null, undefined and "auto" are converted to 0,
- // complex values such as "rotate(1rad)" are returned as is,
- // simple values such as "10px" are parsed to Float.
- return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
- },
-
- // Start an animation from one number to another
- custom: function( from, to, unit ) {
- var self = this,
- fx = jQuery.fx;
-
- this.startTime = fxNow || createFxNow();
- this.end = to;
- this.now = this.start = from;
- this.pos = this.state = 0;
- this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
-
- function t( gotoEnd ) {
- return self.step( gotoEnd );
- }
-
- t.queue = this.options.queue;
- t.elem = this.elem;
- t.saveState = function() {
- if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
- jQuery._data( self.elem, "fxshow" + self.prop, self.start );
- }
- };
-
- if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval( fx.tick, fx.interval );
- }
- },
-
- // Simple 'show' function
- show: function() {
- var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
-
- // Remember where we started, so that we can go back to it later
- this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
- this.options.show = true;
-
- // Begin the animation
- // Make sure that we start at a small width/height to avoid any flash of content
- if ( dataShow !== undefined ) {
- // This show is picking up where a previous hide or show left off
- this.custom( this.cur(), dataShow );
- } else {
- this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
- }
-
- // Start by showing the element
- jQuery( this.elem ).show();
- },
-
- // Simple 'hide' function
- hide: function() {
- // Remember where we started, so that we can go back to it later
- this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
- this.options.hide = true;
-
- // Begin the animation
- this.custom( this.cur(), 0 );
- },
-
- // Each step of an animation
- step: function( gotoEnd ) {
- var p, n, complete,
- t = fxNow || createFxNow(),
- done = true,
- elem = this.elem,
- options = this.options;
-
- if ( gotoEnd || t >= options.duration + this.startTime ) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- options.animatedProperties[ this.prop ] = true;
-
- for ( p in options.animatedProperties ) {
- if ( options.animatedProperties[ p ] !== true ) {
- done = false;
- }
- }
-
- if ( done ) {
- // Reset the overflow
- if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
-
- jQuery.each( [ "", "X", "Y" ], function( index, value ) {
- elem.style[ "overflow" + value ] = options.overflow[ index ];
- });
- }
-
- // Hide the element if the "hide" operation was done
- if ( options.hide ) {
- jQuery( elem ).hide();
- }
-
- // Reset the properties, if the item has been hidden or shown
- if ( options.hide || options.show ) {
- for ( p in options.animatedProperties ) {
- jQuery.style( elem, p, options.orig[ p ] );
- jQuery.removeData( elem, "fxshow" + p, true );
- // Toggle data is no longer needed
- jQuery.removeData( elem, "toggle" + p, true );
- }
- }
-
- // Execute the complete function
- // in the event that the complete function throws an exception
- // we must ensure it won't be called twice. #5684
-
- complete = options.complete;
- if ( complete ) {
-
- options.complete = false;
- complete.call( elem );
- }
- }
-
- return false;
-
- } else {
- // classical easing cannot be used with an Infinity duration
- if ( options.duration == Infinity ) {
- this.now = t;
- } else {
- n = t - this.startTime;
- this.state = n / options.duration;
-
- // Perform the easing function, defaults to swing
- this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
- this.now = this.start + ( (this.end - this.start) * this.pos );
- }
- // Perform the next step of the animation
- this.update();
- }
-
- return true;
- }
-};
-
-jQuery.extend( jQuery.fx, {
- tick: function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- },
-
- interval: 13,
-
- stop: function() {
- clearInterval( timerId );
- timerId = null;
- },
-
- speeds: {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
- },
-
- step: {
- opacity: function( fx ) {
- jQuery.style( fx.elem, "opacity", fx.now );
- },
-
- _default: function( fx ) {
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
- } else {
- fx.elem[ fx.prop ] = fx.now;
- }
- }
- }
-});
-
-// Adds width/height step functions
-// Do not set anything below 0
-jQuery.each([ "width", "height" ], function( i, prop ) {
- jQuery.fx.step[ prop ] = function( fx ) {
- jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
- };
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-
-// Try to restore the default display value of an element
-function defaultDisplay( nodeName ) {
-
- if ( !elemdisplay[ nodeName ] ) {
-
- var body = document.body,
- elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
- display = elem.css( "display" );
- elem.remove();
-
- // If the simple way fails,
- // get element's real default display by attaching it to a temp iframe
- if ( display === "none" || display === "" ) {
- // No iframe to use yet, so create it
- if ( !iframe ) {
- iframe = document.createElement( "iframe" );
- iframe.frameBorder = iframe.width = iframe.height = 0;
- }
-
- body.appendChild( iframe );
-
- // Create a cacheable copy of the iframe document on first call.
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
- // document to it; WebKit & Firefox won't allow reusing the iframe document.
- if ( !iframeDoc || !iframe.createElement ) {
- iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
- iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
- iframeDoc.close();
- }
-
- elem = iframeDoc.createElement( nodeName );
-
- iframeDoc.body.appendChild( elem );
-
- display = jQuery.css( elem, "display" );
- body.removeChild( iframe );
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return elemdisplay[ nodeName ];
-}
-
-
-
-
-var rtable = /^t(?:able|d|h)$/i,
- rroot = /^(?:body|html)$/i;
-
-if ( "getBoundingClientRect" in document.documentElement ) {
- jQuery.fn.offset = function( options ) {
- var elem = this[0], box;
-
- if ( options ) {
- return this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- if ( !elem || !elem.ownerDocument ) {
- return null;
- }
-
- if ( elem === elem.ownerDocument.body ) {
- return jQuery.offset.bodyOffset( elem );
- }
-
- try {
- box = elem.getBoundingClientRect();
- } catch(e) {}
-
- var doc = elem.ownerDocument,
- docElem = doc.documentElement;
-
- // Make sure we're not dealing with a disconnected DOM node
- if ( !box || !jQuery.contains( docElem, elem ) ) {
- return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
- }
-
- var body = doc.body,
- win = getWindow(doc),
- clientTop = docElem.clientTop || body.clientTop || 0,
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
- scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
- scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
- top = box.top + scrollTop - clientTop,
- left = box.left + scrollLeft - clientLeft;
-
- return { top: top, left: left };
- };
-
-} else {
- jQuery.fn.offset = function( options ) {
- var elem = this[0];
-
- if ( options ) {
- return this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- if ( !elem || !elem.ownerDocument ) {
- return null;
- }
-
- if ( elem === elem.ownerDocument.body ) {
- return jQuery.offset.bodyOffset( elem );
- }
-
- var computedStyle,
- offsetParent = elem.offsetParent,
- prevOffsetParent = elem,
- doc = elem.ownerDocument,
- docElem = doc.documentElement,
- body = doc.body,
- defaultView = doc.defaultView,
- prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
- top = elem.offsetTop,
- left = elem.offsetLeft;
-
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
- if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
- break;
- }
-
- computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
- top -= elem.scrollTop;
- left -= elem.scrollLeft;
-
- if ( elem === offsetParent ) {
- top += elem.offsetTop;
- left += elem.offsetLeft;
-
- if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
- }
-
- prevOffsetParent = offsetParent;
- offsetParent = elem.offsetParent;
- }
-
- if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
- top += parseFloat( computedStyle.borderTopWidth ) || 0;
- left += parseFloat( computedStyle.borderLeftWidth ) || 0;
- }
-
- prevComputedStyle = computedStyle;
- }
-
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
- top += body.offsetTop;
- left += body.offsetLeft;
- }
-
- if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
- top += Math.max( docElem.scrollTop, body.scrollTop );
- left += Math.max( docElem.scrollLeft, body.scrollLeft );
- }
-
- return { top: top, left: left };
- };
-}
-
-jQuery.offset = {
-
- bodyOffset: function( body ) {
- var top = body.offsetTop,
- left = body.offsetLeft;
-
- if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
- top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
- left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
- }
-
- return { top: top, left: left };
- },
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[0] ) {
- return null;
- }
-
- var elem = this[0],
-
- // Get *real* offsetParent
- offsetParent = this.offsetParent(),
-
- // Get correct offsets
- offset = this.offset(),
- parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
-
- // Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
- offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
-
- // Add offsetParent borders
- parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
- parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
-
- // Subtract the two offsets
- return {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.body;
- while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( ["Left", "Top"], function( i, name ) {
- var method = "scroll" + name;
-
- jQuery.fn[ method ] = function( val ) {
- var elem, win;
-
- if ( val === undefined ) {
- elem = this[ 0 ];
-
- if ( !elem ) {
- return null;
- }
-
- win = getWindow( elem );
-
- // Return the scroll offset
- return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
- jQuery.support.boxModel && win.document.documentElement[ method ] ||
- win.document.body[ method ] :
- elem[ method ];
- }
-
- // Set the scroll offset
- return this.each(function() {
- win = getWindow( this );
-
- if ( win ) {
- win.scrollTo(
- !i ? val : jQuery( win ).scrollLeft(),
- i ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- this[ method ] = val;
- }
- });
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-
-
-
-
-// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each([ "Height", "Width" ], function( i, name ) {
-
- var type = name.toLowerCase();
-
- // innerHeight and innerWidth
- jQuery.fn[ "inner" + name ] = function() {
- var elem = this[0];
- return elem ?
- elem.style ?
- parseFloat( jQuery.css( elem, type, "padding" ) ) :
- this[ type ]() :
- null;
- };
-
- // outerHeight and outerWidth
- jQuery.fn[ "outer" + name ] = function( margin ) {
- var elem = this[0];
- return elem ?
- elem.style ?
- parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
- this[ type ]() :
- null;
- };
-
- jQuery.fn[ type ] = function( size ) {
- // Get window width or height
- var elem = this[0];
- if ( !elem ) {
- return size == null ? null : this;
- }
-
- if ( jQuery.isFunction( size ) ) {
- return this.each(function( i ) {
- var self = jQuery( this );
- self[ type ]( size.call( this, i, self[ type ]() ) );
- });
- }
-
- if ( jQuery.isWindow( elem ) ) {
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
- var docElemProp = elem.document.documentElement[ "client" + name ],
- body = elem.document.body;
- return elem.document.compatMode === "CSS1Compat" && docElemProp ||
- body && body[ "client" + name ] || docElemProp;
-
- // Get document width or height
- } else if ( elem.nodeType === 9 ) {
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- return Math.max(
- elem.documentElement["client" + name],
- elem.body["scroll" + name], elem.documentElement["scroll" + name],
- elem.body["offset" + name], elem.documentElement["offset" + name]
- );
-
- // Get or set width or height on the element
- } else if ( size === undefined ) {
- var orig = jQuery.css( elem, type ),
- ret = parseFloat( orig );
-
- return jQuery.isNumeric( ret ) ? ret : orig;
-
- // Set the width or height on the element (default to pixels if value is unitless)
- } else {
- return this.css( type, typeof size === "string" ? size : size + "px" );
- }
- };
-
-});
-
-
-
-
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-
-
-})( window );
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.c b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.c
deleted file mode 100644
index 03158289674..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* jsmin.c
- 2011-01-22
-
-Copyright (c) 2002 Douglas Crockford (www.crockford.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-The Software shall be used for Good, not Evil.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-
-static int theA;
-static int theB;
-static int theLookahead = EOF;
-
-
-/* isAlphanum -- return true if the character is a letter, digit, underscore,
- dollar sign, or non-ASCII character.
-*/
-
-static int
-isAlphanum(int c)
-{
- return ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') ||
- (c >= 'A' && c <= 'Z') || c == '_' || c == '$' || c == '\\' ||
- c > 126);
-}
-
-
-/* get -- return the next character from stdin. Watch out for lookahead. If
- the character is a control character, translate it to a space or
- linefeed.
-*/
-
-static int
-get()
-{
- int c = theLookahead;
- theLookahead = EOF;
- if (c == EOF) {
- c = getc(stdin);
- }
- if (c >= ' ' || c == '\n' || c == EOF) {
- return c;
- }
- if (c == '\r') {
- return '\n';
- }
- return ' ';
-}
-
-
-/* peek -- get the next character without getting it.
-*/
-
-static int
-peek()
-{
- theLookahead = get();
- return theLookahead;
-}
-
-
-/* next -- get the next character, excluding comments. peek() is used to see
- if a '/' is followed by a '/' or '*'.
-*/
-
-static int
-next()
-{
- int c = get();
- if (c == '/') {
- switch (peek()) {
- case '/':
- for (;;) {
- c = get();
- if (c <= '\n') {
- return c;
- }
- }
- case '*':
- get();
- for (;;) {
- switch (get()) {
- case '*':
- if (peek() == '/') {
- get();
- return ' ';
- }
- break;
- case EOF:
- fprintf(stderr, "Error: JSMIN Unterminated comment.\n");
- exit(1);
- }
- }
- default:
- return c;
- }
- }
- return c;
-}
-
-
-/* action -- do something! What you do is determined by the argument:
- 1 Output A. Copy B to A. Get the next B.
- 2 Copy B to A. Get the next B. (Delete A).
- 3 Get the next B. (Delete B).
- action treats a string as a single character. Wow!
- action recognizes a regular expression if it is preceded by ( or , or =.
-*/
-
-static void
-action(int d)
-{
- switch (d) {
- case 1:
- putc(theA, stdout);
- case 2:
- theA = theB;
- if (theA == '\'' || theA == '"') {
- for (;;) {
- putc(theA, stdout);
- theA = get();
- if (theA == theB) {
- break;
- }
- if (theA == '\\') {
- putc(theA, stdout);
- theA = get();
- }
- if (theA == EOF) {
- fprintf(stderr, "Error: JSMIN unterminated string literal.");
- exit(1);
- }
- }
- }
- case 3:
- theB = next();
- if (theB == '/' && (theA == '(' || theA == ',' || theA == '=' ||
- theA == ':' || theA == '[' || theA == '!' ||
- theA == '&' || theA == '|' || theA == '?' ||
- theA == '{' || theA == '}' || theA == ';' ||
- theA == '\n')) {
- putc(theA, stdout);
- putc(theB, stdout);
- for (;;) {
- theA = get();
- if (theA == '[') {
- for (;;) {
- putc(theA, stdout);
- theA = get();
- if (theA == ']') {
- break;
- }
- if (theA == '\\') {
- putc(theA, stdout);
- theA = get();
- }
- if (theA == EOF) {
- fprintf(stderr,
- "Error: JSMIN unterminated set in Regular Expression literal.\n");
- exit(1);
- }
- }
- } else if (theA == '/') {
- break;
- } else if (theA =='\\') {
- putc(theA, stdout);
- theA = get();
- }
- if (theA == EOF) {
- fprintf(stderr,
- "Error: JSMIN unterminated Regular Expression literal.\n");
- exit(1);
- }
- putc(theA, stdout);
- }
- theB = next();
- }
- }
-}
-
-
-/* jsmin -- Copy the input to the output, deleting the characters which are
- insignificant to JavaScript. Comments will be removed. Tabs will be
- replaced with spaces. Carriage returns will be replaced with linefeeds.
- Most spaces and linefeeds will be removed.
-*/
-
-static void
-jsmin()
-{
- theA = '\n';
- action(3);
- while (theA != EOF) {
- switch (theA) {
- case ' ':
- if (isAlphanum(theB)) {
- action(1);
- } else {
- action(2);
- }
- break;
- case '\n':
- switch (theB) {
- case '{':
- case '[':
- case '(':
- case '+':
- case '-':
- action(1);
- break;
- case ' ':
- action(3);
- break;
- default:
- if (isAlphanum(theB)) {
- action(1);
- } else {
- action(2);
- }
- }
- break;
- default:
- switch (theB) {
- case ' ':
- if (isAlphanum(theA)) {
- action(1);
- break;
- }
- action(3);
- break;
- case '\n':
- switch (theA) {
- case '}':
- case ']':
- case ')':
- case '+':
- case '-':
- case '"':
- case '\'':
- action(1);
- break;
- default:
- if (isAlphanum(theA)) {
- action(1);
- } else {
- action(3);
- }
- }
- break;
- default:
- action(1);
- break;
- }
- }
- }
-}
-
-
-/* main -- Output any command line arguments as comments
- and then minify the input.
-*/
-extern int
-main(int argc, char* argv[])
-{
- int i;
- for (i = 1; i < argc; i += 1) {
- fprintf(stdout, "// %s\n", argv[i]);
- }
- jsmin();
- return 0;
-}
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.py
deleted file mode 100644
index b1f7dd7e62e..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin.py
+++ /dev/null
@@ -1,226 +0,0 @@
-#!/usr/bin/env python
-
-# This code is original from jsmin by Douglas Crockford, it was translated to
-# Python by Baruch Even. The original code had the following copyright and
-# license.
-#
-# /* jsmin.c
-# 2007-05-22
-#
-# Copyright (c) 2002 Douglas Crockford (www.crockford.com)
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy of
-# this software and associated documentation files (the "Software"), to deal in
-# the Software without restriction, including without limitation the rights to
-# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is furnished to do
-# so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# The Software shall be used for Good, not Evil.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-# */
-
-# imports adjusted for speed (cStringIO) and python 3 (io) -- nd
-try:
- from cStringIO import StringIO
-except ImportError:
- try:
- from StringIO import StringIO
- except ImportError:
- from io import StringIO
-
-
-def jsmin(js):
- ins = StringIO(js)
- outs = StringIO()
- JavascriptMinify().minify(ins, outs)
- str = outs.getvalue()
- if len(str) > 0 and str[0] == '\n':
- str = str[1:]
- return str
-
-def isAlphanum(c):
- """return true if the character is a letter, digit, underscore,
- dollar sign, or non-ASCII character.
- """
- return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or
- (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or (c is not None and ord(c) > 126));
-
-class UnterminatedComment(Exception):
- pass
-
-class UnterminatedStringLiteral(Exception):
- pass
-
-class UnterminatedRegularExpression(Exception):
- pass
-
-class JavascriptMinify(object):
-
- def _outA(self):
- self.outstream.write(self.theA)
- def _outB(self):
- self.outstream.write(self.theB)
-
- def _get(self):
- """return the next character from stdin. Watch out for lookahead. If
- the character is a control character, translate it to a space or
- linefeed.
- """
- c = self.theLookahead
- self.theLookahead = None
- if c == None:
- c = self.instream.read(1)
- if c >= ' ' or c == '\n':
- return c
- if c == '': # EOF
- return '\000'
- if c == '\r':
- return '\n'
- return ' '
-
- def _peek(self):
- self.theLookahead = self._get()
- return self.theLookahead
-
- def _next(self):
- """get the next character, excluding comments. peek() is used to see
- if an unescaped '/' is followed by a '/' or '*'.
- """
- c = self._get()
- if c == '/' and self.theA != '\\':
- p = self._peek()
- if p == '/':
- c = self._get()
- while c > '\n':
- c = self._get()
- return c
- if p == '*':
- c = self._get()
- while 1:
- c = self._get()
- if c == '*':
- if self._peek() == '/':
- self._get()
- return ' '
- if c == '\000':
- raise UnterminatedComment()
-
- return c
-
- def _action(self, action):
- """do something! What you do is determined by the argument:
- 1 Output A. Copy B to A. Get the next B.
- 2 Copy B to A. Get the next B. (Delete A).
- 3 Get the next B. (Delete B).
- action treats a string as a single character. Wow!
- action recognizes a regular expression if it is preceded by ( or , or =.
- """
- if action <= 1:
- self._outA()
-
- if action <= 2:
- self.theA = self.theB
- if self.theA == "'" or self.theA == '"':
- while 1:
- self._outA()
- self.theA = self._get()
- if self.theA == self.theB:
- break
- if self.theA <= '\n':
- raise UnterminatedStringLiteral()
- if self.theA == '\\':
- self._outA()
- self.theA = self._get()
-
-
- if action <= 3:
- self.theB = self._next()
- if self.theB == '/' and (self.theA == '(' or self.theA == ',' or
- self.theA == '=' or self.theA == ':' or
- self.theA == '[' or self.theA == '?' or
- self.theA == '!' or self.theA == '&' or
- self.theA == '|' or self.theA == ';' or
- self.theA == '{' or self.theA == '}' or
- self.theA == '\n'):
- self._outA()
- self._outB()
- while 1:
- self.theA = self._get()
- if self.theA == '/':
- break
- elif self.theA == '\\':
- self._outA()
- self.theA = self._get()
- elif self.theA <= '\n':
- raise UnterminatedRegularExpression()
- self._outA()
- self.theB = self._next()
-
-
- def _jsmin(self):
- """Copy the input to the output, deleting the characters which are
- insignificant to JavaScript. Comments will be removed. Tabs will be
- replaced with spaces. Carriage returns will be replaced with linefeeds.
- Most spaces and linefeeds will be removed.
- """
- self.theA = '\n'
- self._action(3)
-
- while self.theA != '\000':
- if self.theA == ' ':
- if isAlphanum(self.theB):
- self._action(1)
- else:
- self._action(2)
- elif self.theA == '\n':
- if self.theB in ['{', '[', '(', '+', '-']:
- self._action(1)
- elif self.theB == ' ':
- self._action(3)
- else:
- if isAlphanum(self.theB):
- self._action(1)
- else:
- self._action(2)
- else:
- if self.theB == ' ':
- if isAlphanum(self.theA):
- self._action(1)
- else:
- self._action(3)
- elif self.theB == '\n':
- if self.theA in ['}', ']', ')', '+', '-', '"', '\'']:
- self._action(1)
- else:
- if isAlphanum(self.theA):
- self._action(1)
- else:
- self._action(3)
- else:
- self._action(1)
-
- def minify(self, instream, outstream):
- self.instream = instream
- self.outstream = outstream
- self.theA = '\n'
- self.theB = None
- self.theLookahead = None
-
- self._jsmin()
- self.instream.close()
-
-if __name__ == '__main__':
- import sys
- jsm = JavascriptMinify()
- jsm.minify(sys.stdin, sys.stdout)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin_2_0_9.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin_2_0_9.py
deleted file mode 100644
index 23bed6082b8..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/jsmin_2_0_9.py
+++ /dev/null
@@ -1,233 +0,0 @@
-# This code is original from jsmin by Douglas Crockford, it was translated to
-# Python by Baruch Even. It was rewritten by Dave St.Germain for speed.
-#
-# The MIT License (MIT)
-#
-# Copyright (c) 2013 Dave St.Germain
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-
-import sys
-is_3 = sys.version_info >= (3, 0)
-if is_3:
- import io
-else:
- import StringIO
- try:
- import cStringIO
- except ImportError:
- cStringIO = None
-
-
-__all__ = ['jsmin', 'JavascriptMinify']
-__version__ = '2.0.9'
-
-
-def jsmin(js):
- """
- returns a minified version of the javascript string
- """
- if not is_3:
- if cStringIO and not isinstance(js, unicode):
- # strings can use cStringIO for a 3x performance
- # improvement, but unicode (in python2) cannot
- klass = cStringIO.StringIO
- else:
- klass = StringIO.StringIO
- else:
- klass = io.StringIO
- ins = klass(js)
- outs = klass()
- JavascriptMinify(ins, outs).minify()
- return outs.getvalue()
-
-
-class JavascriptMinify(object):
- """
- Minify an input stream of javascript, writing
- to an output stream
- """
-
- def __init__(self, instream=None, outstream=None):
- self.ins = instream
- self.outs = outstream
-
- def minify(self, instream=None, outstream=None):
- if instream and outstream:
- self.ins, self.outs = instream, outstream
-
- self.is_return = False
- self.return_buf = ''
-
- def write(char):
- # all of this is to support literal regular expressions.
- # sigh
- if char in 'return':
- self.return_buf += char
- self.is_return = self.return_buf == 'return'
- self.outs.write(char)
- if self.is_return:
- self.return_buf = ''
-
- read = self.ins.read
-
- space_strings = "abcdefghijklmnopqrstuvwxyz"\
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$\\"
- starters, enders = '{[(+-', '}])+-"\''
- newlinestart_strings = starters + space_strings
- newlineend_strings = enders + space_strings
- do_newline = False
- do_space = False
- escape_slash_count = 0
- doing_single_comment = False
- previous_before_comment = ''
- doing_multi_comment = False
- in_re = False
- in_quote = ''
- quote_buf = []
-
- previous = read(1)
- if previous == '\\':
- escape_slash_count += 1
- next1 = read(1)
- if previous == '/':
- if next1 == '/':
- doing_single_comment = True
- elif next1 == '*':
- doing_multi_comment = True
- previous = next1
- next1 = read(1)
- else:
- write(previous)
- elif not previous:
- return
- elif previous >= '!':
- if previous in "'\"":
- in_quote = previous
- write(previous)
- previous_non_space = previous
- else:
- previous_non_space = ' '
- if not next1:
- return
-
- while 1:
- next2 = read(1)
- if not next2:
- last = next1.strip()
- if not (doing_single_comment or doing_multi_comment)\
- and last not in ('', '/'):
- if in_quote:
- write(''.join(quote_buf))
- write(last)
- break
- if doing_multi_comment:
- if next1 == '*' and next2 == '/':
- doing_multi_comment = False
- next2 = read(1)
- elif doing_single_comment:
- if next1 in '\r\n':
- doing_single_comment = False
- while next2 in '\r\n':
- next2 = read(1)
- if not next2:
- break
- if previous_before_comment in ')}]':
- do_newline = True
- elif previous_before_comment in space_strings:
- write('\n')
- elif in_quote:
- quote_buf.append(next1)
-
- if next1 == in_quote:
- numslashes = 0
- for c in reversed(quote_buf[:-1]):
- if c != '\\':
- break
- else:
- numslashes += 1
- if numslashes % 2 == 0:
- in_quote = ''
- write(''.join(quote_buf))
- elif next1 in '\r\n':
- if previous_non_space in newlineend_strings \
- or previous_non_space > '~':
- while 1:
- if next2 < '!':
- next2 = read(1)
- if not next2:
- break
- else:
- if next2 in newlinestart_strings \
- or next2 > '~' or next2 == '/':
- do_newline = True
- break
- elif next1 < '!' and not in_re:
- if (previous_non_space in space_strings \
- or previous_non_space > '~') \
- and (next2 in space_strings or next2 > '~'):
- do_space = True
- elif previous_non_space in '-+' and next2 == previous_non_space:
- # protect against + ++ or - -- sequences
- do_space = True
- elif self.is_return and next2 == '/':
- # returning a regex...
- write(' ')
- elif next1 == '/':
- if do_space:
- write(' ')
- if in_re:
- if previous != '\\' or (not escape_slash_count % 2) or next2 in 'gimy':
- in_re = False
- write('/')
- elif next2 == '/':
- doing_single_comment = True
- previous_before_comment = previous_non_space
- elif next2 == '*':
- doing_multi_comment = True
- previous = next1
- next1 = next2
- next2 = read(1)
- else:
- in_re = previous_non_space in '(,=:[?!&|' or self.is_return # literal regular expression
- write('/')
- else:
- if do_space:
- do_space = False
- write(' ')
- if do_newline:
- write('\n')
- do_newline = False
-
- write(next1)
- if not in_re and next1 in "'\"":
- in_quote = next1
- quote_buf = []
-
- previous = next1
- next1 = next2
-
- if previous >= '!':
- previous_non_space = previous
-
- if previous == '\\':
- escape_slash_count += 1
- else:
- escape_slash_count = 0
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/knockout-2.0.0.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/knockout-2.0.0.js
deleted file mode 100644
index e5577ebdf0d..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/knockout-2.0.0.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// Knockout JavaScript library v2.0.0
-// (c) Steven Sanderson - http://knockoutjs.com/
-// License: MIT (http://www.opensource.org/licenses/mit-license.php)
-
-(function(window,undefined){
-function c(a){throw a;}var l=void 0,m=!0,o=null,p=!1,r=window.ko={};r.b=function(a,b){for(var d=a.split("."),e=window,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=b};r.l=function(a,b,d){a[b]=d};
-r.a=new function(){function a(a,e){if("INPUT"!=a.tagName||!a.type)return p;if("click"!=e.toLowerCase())return p;var b=a.type.toLowerCase();return"checkbox"==b||"radio"==b}var b=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,d={},e={};d[/Firefox\/2/i.test(navigator.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];d.MouseEvents="click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave".split(",");for(var f in d){var h=d[f];if(h.length)for(var g=0,i=h.length;g<i;g++)e[h[g]]=
-f}var j=function(){for(var a=3,e=document.createElement("div"),b=e.getElementsByTagName("i");e.innerHTML="<\!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",b[0];);return 4<a?a:l}();return{Ba:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],n:function(a,e){for(var b=0,f=a.length;b<f;b++)e(a[b])},k:function(a,e){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,e);for(var b=0,f=a.length;b<f;b++)if(a[b]===e)return b;return-1},Wa:function(a,e,b){for(var f=0,d=
-a.length;f<d;f++)if(e.call(b,a[f]))return a[f];return o},ca:function(a,e){var b=r.a.k(a,e);0<=b&&a.splice(b,1)},ya:function(a){for(var a=a||[],e=[],b=0,f=a.length;b<f;b++)0>r.a.k(e,a[b])&&e.push(a[b]);return e},ba:function(a,e){for(var a=a||[],b=[],f=0,d=a.length;f<d;f++)b.push(e(a[f]));return b},aa:function(a,e){for(var a=a||[],b=[],f=0,d=a.length;f<d;f++)e(a[f])&&b.push(a[f]);return b},J:function(a,e){for(var b=0,f=e.length;b<f;b++)a.push(e[b]);return a},extend:function(a,e){for(var b in e)e.hasOwnProperty(b)&&
-(a[b]=e[b]);return a},U:function(a){for(;a.firstChild;)r.removeNode(a.firstChild)},oa:function(a,e){r.a.U(a);e&&r.a.n(e,function(e){a.appendChild(e)})},Ja:function(a,e){var b=a.nodeType?[a]:a;if(0<b.length){for(var f=b[0],d=f.parentNode,h=0,g=e.length;h<g;h++)d.insertBefore(e[h],f);h=0;for(g=b.length;h<g;h++)r.removeNode(b[h])}},La:function(a,e){0<=navigator.userAgent.indexOf("MSIE 6")?a.setAttribute("selected",e):a.selected=e},z:function(a){return(a||"").replace(b,"")},Db:function(a,e){for(var b=
-[],f=(a||"").split(e),d=0,h=f.length;d<h;d++){var g=r.a.z(f[d]);""!==g&&b.push(g)}return b},Cb:function(a,e){a=a||"";return e.length>a.length?p:a.substring(0,e.length)===e},hb:function(a){for(var e=Array.prototype.slice.call(arguments,1),b="return ("+a+")",f=0;f<e.length;f++)e[f]&&"object"==typeof e[f]&&(b="with(sc["+f+"]) { "+b+" } ");return(new Function("sc",b))(e)},fb:function(a,e){if(e.compareDocumentPosition)return 16==(e.compareDocumentPosition(a)&16);for(;a!=o;){if(a==e)return m;a=a.parentNode}return p},
-ga:function(a){return r.a.fb(a,document)},s:function(e,b,f){if("undefined"!=typeof jQuery){if(a(e,b))var d=f,f=function(a,e){var b=this.checked;if(e)this.checked=e.Ya!==m;d.call(this,a);this.checked=b};jQuery(e).bind(b,f)}else"function"==typeof e.addEventListener?e.addEventListener(b,f,p):"undefined"!=typeof e.attachEvent?e.attachEvent("on"+b,function(a){f.call(e,a)}):c(Error("Browser doesn't support addEventListener or attachEvent"))},sa:function(b,f){(!b||!b.nodeType)&&c(Error("element must be a DOM node when calling triggerEvent"));
-if("undefined"!=typeof jQuery){var d=[];a(b,f)&&d.push({Ya:b.checked});jQuery(b).trigger(f,d)}else if("function"==typeof document.createEvent)"function"==typeof b.dispatchEvent?(d=document.createEvent(e[f]||"HTMLEvents"),d.initEvent(f,m,m,window,0,0,0,0,0,p,p,p,p,0,b),b.dispatchEvent(d)):c(Error("The supplied element doesn't support dispatchEvent"));else if("undefined"!=typeof b.fireEvent){if("click"==f&&"INPUT"==b.tagName&&("checkbox"==b.type.toLowerCase()||"radio"==b.type.toLowerCase()))b.checked=
-b.checked!==m;b.fireEvent("on"+f)}else c(Error("Browser doesn't support triggering events"))},d:function(a){return r.V(a)?a():a},eb:function(a,e){return 0<=r.a.k((a.className||"").split(/\s+/),e)},Qa:function(a,e,b){var f=r.a.eb(a,e);if(b&&!f)a.className=(a.className||"")+" "+e;else if(f&&!b){for(var b=(a.className||"").split(/\s+/),f="",d=0;d<b.length;d++)b[d]!=e&&(f+=b[d]+" ");a.className=r.a.z(f)}},outerHTML:function(a){if(j===l){var e=a.outerHTML;if("string"==typeof e)return e}e=window.document.createElement("div");
-e.appendChild(a.cloneNode(m));return e.innerHTML},Ma:function(a,e){var b=r.a.d(e);if(b===o||b===l)b="";"innerText"in a?a.innerText=b:a.textContent=b;if(9<=j)a.innerHTML=a.innerHTML},yb:function(a,e){for(var a=r.a.d(a),e=r.a.d(e),b=[],f=a;f<=e;f++)b.push(f);return b},X:function(a){for(var e=[],b=0,f=a.length;b<f;b++)e.push(a[b]);return e},ob:6===j,pb:7===j,Ca:function(a,e){for(var b=r.a.X(a.getElementsByTagName("INPUT")).concat(r.a.X(a.getElementsByTagName("TEXTAREA"))),f="string"==typeof e?function(a){return a.name===
-e}:function(a){return e.test(a.name)},d=[],h=b.length-1;0<=h;h--)f(b[h])&&d.push(b[h]);return d},vb:function(a){return"string"==typeof a&&(a=r.a.z(a))?window.JSON&&window.JSON.parse?window.JSON.parse(a):(new Function("return "+a))():o},qa:function(a){("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&c(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));
-return JSON.stringify(r.a.d(a))},wb:function(a,e,b){var b=b||{},f=b.params||{},d=b.includeFields||this.Ba,h=a;if("object"==typeof a&&"FORM"==a.tagName)for(var h=a.action,g=d.length-1;0<=g;g--)for(var j=r.a.Ca(a,d[g]),i=j.length-1;0<=i;i--)f[j[i].name]=j[i].value;var e=r.a.d(e),u=document.createElement("FORM");u.style.display="none";u.action=h;u.method="post";for(var y in e)a=document.createElement("INPUT"),a.name=y,a.value=r.a.qa(r.a.d(e[y])),u.appendChild(a);for(y in f)a=document.createElement("INPUT"),
-a.name=y,a.value=f[y],u.appendChild(a);document.body.appendChild(u);b.submitter?b.submitter(u):u.submit();setTimeout(function(){u.parentNode.removeChild(u)},0)}}};r.b("ko.utils",r.a);
-r.a.n([["arrayForEach",r.a.n],["arrayFirst",r.a.Wa],["arrayFilter",r.a.aa],["arrayGetDistinctValues",r.a.ya],["arrayIndexOf",r.a.k],["arrayMap",r.a.ba],["arrayPushAll",r.a.J],["arrayRemoveItem",r.a.ca],["extend",r.a.extend],["fieldsIncludedWithJsonPost",r.a.Ba],["getFormFields",r.a.Ca],["postJson",r.a.wb],["parseJson",r.a.vb],["registerEventHandler",r.a.s],["stringifyJson",r.a.qa],["range",r.a.yb],["toggleDomNodeCssClass",r.a.Qa],["triggerEvent",r.a.sa],["unwrapObservable",r.a.d]],function(a){r.b("ko.utils."+
-a[0],a[1])});Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,d=Array.prototype.slice.call(arguments),a=d.shift();return function(){return b.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});
-r.a.e=new function(){var a=0,b="__ko__"+(new Date).getTime(),d={};return{get:function(a,b){var d=r.a.e.getAll(a,p);return d===l?l:d[b]},set:function(a,b,d){d===l&&r.a.e.getAll(a,p)===l||(r.a.e.getAll(a,m)[b]=d)},getAll:function(e,f){var h=e[b];if(!(h&&"null"!==h)){if(!f)return;h=e[b]="ko"+a++;d[h]={}}return d[h]},clear:function(a){var f=a[b];f&&(delete d[f],a[b]=o)}}};r.b("ko.utils.domData",r.a.e);r.b("ko.utils.domData.clear",r.a.e.clear);
-r.a.A=new function(){function a(a,b){var h=r.a.e.get(a,d);h===l&&b&&(h=[],r.a.e.set(a,d,h));return h}function b(e){var b=a(e,p);if(b)for(var b=b.slice(0),d=0;d<b.length;d++)b[d](e);r.a.e.clear(e);"function"==typeof jQuery&&"function"==typeof jQuery.cleanData&&jQuery.cleanData([e])}var d="__ko_domNodeDisposal__"+(new Date).getTime();return{va:function(e,b){"function"!=typeof b&&c(Error("Callback must be a function"));a(e,m).push(b)},Ia:function(e,b){var h=a(e,p);h&&(r.a.ca(h,b),0==h.length&&r.a.e.set(e,
-d,l))},F:function(a){if(!(1!=a.nodeType&&9!=a.nodeType)){b(a);var f=[];r.a.J(f,a.getElementsByTagName("*"));for(var a=0,d=f.length;a<d;a++)b(f[a])}},removeNode:function(a){r.F(a);a.parentNode&&a.parentNode.removeChild(a)}}};r.F=r.a.A.F;r.removeNode=r.a.A.removeNode;r.b("ko.cleanNode",r.F);r.b("ko.removeNode",r.removeNode);r.b("ko.utils.domNodeDisposal",r.a.A);r.b("ko.utils.domNodeDisposal.addDisposeCallback",r.a.A.va);r.b("ko.utils.domNodeDisposal.removeDisposeCallback",r.a.A.Ia);
-r.a.ma=function(a){var b;if("undefined"!=typeof jQuery){if((b=jQuery.clean([a]))&&b[0]){for(a=b[0];a.parentNode&&11!==a.parentNode.nodeType;)a=a.parentNode;a.parentNode&&a.parentNode.removeChild(a)}}else{var d=r.a.z(a).toLowerCase();b=document.createElement("div");d=d.match(/^<(thead|tbody|tfoot)/)&&[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];a="ignored<div>"+
-d[1]+a+d[2]+"</div>";for("function"==typeof window.innerShiv?b.appendChild(window.innerShiv(a)):b.innerHTML=a;d[0]--;)b=b.lastChild;b=r.a.X(b.lastChild.childNodes)}return b};r.a.Z=function(a,b){r.a.U(a);if(b!==o&&b!==l)if("string"!=typeof b&&(b=b.toString()),"undefined"!=typeof jQuery)jQuery(a).html(b);else for(var d=r.a.ma(b),e=0;e<d.length;e++)a.appendChild(d[e])};r.b("ko.utils.parseHtmlFragment",r.a.ma);r.b("ko.utils.setHtml",r.a.Z);
-r.r=function(){function a(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function b(a,f){if(a)if(8==a.nodeType){var d=r.r.Ga(a.nodeValue);d!=o&&f.push({cb:a,tb:d})}else if(1==a.nodeType)for(var d=0,g=a.childNodes,i=g.length;d<i;d++)b(g[d],f)}var d={};return{ka:function(b){"function"!=typeof b&&c(Error("You can only pass a function to ko.memoization.memoize()"));var f=a()+a();d[f]=b;return"<\!--[ko_memo:"+f+"]--\>"},Ra:function(a,b){var h=d[a];h===l&&c(Error("Couldn't find any memo with ID "+
-a+". Perhaps it's already been unmemoized."));try{return h.apply(o,b||[]),m}finally{delete d[a]}},Sa:function(a,f){var d=[];b(a,d);for(var g=0,i=d.length;g<i;g++){var j=d[g].cb,k=[j];f&&r.a.J(k,f);r.r.Ra(d[g].tb,k);j.nodeValue="";j.parentNode&&j.parentNode.removeChild(j)}},Ga:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:o}}}();r.b("ko.memoization",r.r);r.b("ko.memoization.memoize",r.r.ka);r.b("ko.memoization.unmemoize",r.r.Ra);r.b("ko.memoization.parseMemoText",r.r.Ga);
-r.b("ko.memoization.unmemoizeDomNodeAndDescendants",r.r.Sa);r.Aa={throttle:function(a,b){a.throttleEvaluation=b;var d=o;return r.i({read:a,write:function(e){clearTimeout(d);d=setTimeout(function(){a(e)},b)}})},notify:function(a,b){a.equalityComparer="always"==b?function(){return p}:r.w.fn.equalityComparer;return a}};r.b("ko.extenders",r.Aa);r.Oa=function(a,b){this.da=a;this.bb=b;r.l(this,"dispose",this.v)};r.Oa.prototype.v=function(){this.nb=m;this.bb()};
-r.R=function(){this.u={};r.a.extend(this,r.R.fn);r.l(this,"subscribe",this.ra);r.l(this,"extend",this.extend);r.l(this,"getSubscriptionsCount",this.kb)};
-r.R.fn={ra:function(a,b,d){var d=d||"change",a=b?a.bind(b):a,e=new r.Oa(a,function(){r.a.ca(this.u[d],e)}.bind(this));this.u[d]||(this.u[d]=[]);this.u[d].push(e);return e},notifySubscribers:function(a,b){b=b||"change";this.u[b]&&r.a.n(this.u[b].slice(0),function(b){b&&b.nb!==m&&b.da(a)})},kb:function(){var a=0,b;for(b in this.u)this.u.hasOwnProperty(b)&&(a+=this.u[b].length);return a},extend:function(a){var b=this;if(a)for(var d in a){var e=r.Aa[d];"function"==typeof e&&(b=e(b,a[d]))}return b}};
-r.Ea=function(a){return"function"==typeof a.ra&&"function"==typeof a.notifySubscribers};r.b("ko.subscribable",r.R);r.b("ko.isSubscribable",r.Ea);r.T=function(){var a=[];return{Xa:function(b){a.push({da:b,za:[]})},end:function(){a.pop()},Ha:function(b){r.Ea(b)||c("Only subscribable things can act as dependencies");if(0<a.length){var d=a[a.length-1];0<=r.a.k(d.za,b)||(d.za.push(b),d.da(b))}}}}();var B={undefined:m,"boolean":m,number:m,string:m};
-r.w=function(a){function b(){if(0<arguments.length){if(!b.equalityComparer||!b.equalityComparer(d,arguments[0]))b.H(),d=arguments[0],b.G();return this}r.T.Ha(b);return d}var d=a;r.R.call(b);b.G=function(){b.notifySubscribers(d)};b.H=function(){b.notifySubscribers(d,"beforeChange")};r.a.extend(b,r.w.fn);r.l(b,"valueHasMutated",b.G);r.l(b,"valueWillMutate",b.H);return b};r.w.fn={B:r.w,equalityComparer:function(a,b){return a===o||typeof a in B?a===b:p}};
-r.V=function(a){return a===o||a===l||a.B===l?p:a.B===r.w?m:r.V(a.B)};r.P=function(a){return"function"==typeof a&&a.B===r.w?m:"function"==typeof a&&a.B===r.i&&a.lb?m:p};r.b("ko.observable",r.w);r.b("ko.isObservable",r.V);r.b("ko.isWriteableObservable",r.P);
-r.Q=function(a){0==arguments.length&&(a=[]);a!==o&&a!==l&&!("length"in a)&&c(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));var b=new r.w(a);r.a.extend(b,r.Q.fn);r.l(b,"remove",b.remove);r.l(b,"removeAll",b.zb);r.l(b,"destroy",b.fa);r.l(b,"destroyAll",b.ab);r.l(b,"indexOf",b.indexOf);r.l(b,"replace",b.replace);return b};
-r.Q.fn={remove:function(a){for(var b=this(),d=[],e="function"==typeof a?a:function(b){return b===a},f=0;f<b.length;f++){var h=b[f];e(h)&&(0===d.length&&this.H(),d.push(h),b.splice(f,1),f--)}d.length&&this.G();return d},zb:function(a){if(a===l){var b=this(),d=b.slice(0);this.H();b.splice(0,b.length);this.G();return d}return!a?[]:this.remove(function(b){return 0<=r.a.k(a,b)})},fa:function(a){var b=this(),d="function"==typeof a?a:function(b){return b===a};this.H();for(var e=b.length-1;0<=e;e--)d(b[e])&&
-(b[e]._destroy=m);this.G()},ab:function(a){return a===l?this.fa(function(){return m}):!a?[]:this.fa(function(b){return 0<=r.a.k(a,b)})},indexOf:function(a){var b=this();return r.a.k(b,a)},replace:function(a,b){var d=this.indexOf(a);0<=d&&(this.H(),this()[d]=b,this.G())}};r.a.n("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){r.Q.fn[a]=function(){var b=this();this.H();b=b[a].apply(b,arguments);this.G();return b}});
-r.a.n(["slice"],function(a){r.Q.fn[a]=function(){var b=this();return b[a].apply(b,arguments)}});r.b("ko.observableArray",r.Q);function C(a,b){a&&"object"==typeof a?b=a:(b=b||{},b.read=a||b.read);"function"!=typeof b.read&&c("Pass a function that returns the value of the dependentObservable");return b}
-r.i=function(a,b,d){function e(){r.a.n(q,function(a){a.v()});q=[]}function f(){var a=g.throttleEvaluation;a&&0<=a?(clearTimeout(v),v=setTimeout(h,a)):h()}function h(){if(j&&"function"==typeof d.disposeWhen&&d.disposeWhen())g.v();else{try{e();r.T.Xa(function(a){q.push(a.ra(f))});var a=d.read.call(d.owner||b);g.notifySubscribers(i,"beforeChange");i=a}finally{r.T.end()}g.notifySubscribers(i);j=m}}function g(){if(0<arguments.length)"function"===typeof d.write?d.write.apply(d.owner||b,arguments):c("Cannot write a value to a dependentObservable unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");
-else return j||h(),r.T.Ha(g),i}var i,j=p,d=C(a,d),k="object"==typeof d.disposeWhenNodeIsRemoved?d.disposeWhenNodeIsRemoved:o,n=o;if(k){n=function(){g.v()};r.a.A.va(k,n);var t=d.disposeWhen;d.disposeWhen=function(){return!r.a.ga(k)||"function"==typeof t&&t()}}var q=[],v=o;g.jb=function(){return q.length};g.lb="function"===typeof d.write;g.v=function(){k&&r.a.A.Ia(k,n);e()};r.R.call(g);r.a.extend(g,r.i.fn);d.deferEvaluation!==m&&h();r.l(g,"dispose",g.v);r.l(g,"getDependenciesCount",g.jb);return g};
-r.i.fn={B:r.i};r.i.B=r.w;r.b("ko.dependentObservable",r.i);r.b("ko.computed",r.i);
-(function(){function a(e,f,h){h=h||new d;e=f(e);if(!("object"==typeof e&&e!==o&&e!==l&&!(e instanceof Date)))return e;var g=e instanceof Array?[]:{};h.save(e,g);b(e,function(b){var d=f(e[b]);switch(typeof d){case "boolean":case "number":case "string":case "function":g[b]=d;break;case "object":case "undefined":var k=h.get(d);g[b]=k!==l?k:a(d,f,h)}});return g}function b(a,b){if(a instanceof Array)for(var d=0;d<a.length;d++)b(d);else for(d in a)b(d)}function d(){var a=[],b=[];this.save=function(d,g){var i=
-r.a.k(a,d);0<=i?b[i]=g:(a.push(d),b.push(g))};this.get=function(d){d=r.a.k(a,d);return 0<=d?b[d]:l}}r.Pa=function(b){0==arguments.length&&c(Error("When calling ko.toJS, pass the object you want to convert."));return a(b,function(a){for(var b=0;r.V(a)&&10>b;b++)a=a();return a})};r.toJSON=function(a){a=r.Pa(a);return r.a.qa(a)}})();r.b("ko.toJS",r.Pa);r.b("ko.toJSON",r.toJSON);
-r.h={q:function(a){return"OPTION"==a.tagName?a.__ko__hasDomDataOptionValue__===m?r.a.e.get(a,r.c.options.la):a.getAttribute("value"):"SELECT"==a.tagName?0<=a.selectedIndex?r.h.q(a.options[a.selectedIndex]):l:a.value},S:function(a,b){if("OPTION"==a.tagName)switch(typeof b){case "string":r.a.e.set(a,r.c.options.la,l);"__ko__hasDomDataOptionValue__"in a&&delete a.__ko__hasDomDataOptionValue__;a.value=b;break;default:r.a.e.set(a,r.c.options.la,b),a.__ko__hasDomDataOptionValue__=m,a.value="number"===typeof b?
-b:""}else if("SELECT"==a.tagName)for(var d=a.options.length-1;0<=d;d--){if(r.h.q(a.options[d])==b){a.selectedIndex=d;break}}else{if(b===o||b===l)b="";a.value=b}}};r.b("ko.selectExtensions",r.h);r.b("ko.selectExtensions.readValue",r.h.q);r.b("ko.selectExtensions.writeValue",r.h.S);
-r.j=function(){function a(a,e){for(var d=o;a!=d;)d=a,a=a.replace(b,function(a,b){return e[b]});return a}var b=/\@ko_token_(\d+)\@/g,d=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,e=["true","false"];return{D:[],Y:function(b){var e=r.a.z(b);if(3>e.length)return[];"{"===e.charAt(0)&&(e=e.substring(1,e.length-1));for(var b=[],d=o,i,j=0;j<e.length;j++){var k=e.charAt(j);if(d===o)switch(k){case '"':case "'":case "/":d=j,i=k}else if(k==i&&"\\"!==e.charAt(j-1)){k=e.substring(d,j+
-1);b.push(k);var n="@ko_token_"+(b.length-1)+"@",e=e.substring(0,d)+n+e.substring(j+1),j=j-(k.length-n.length),d=o}}i=d=o;for(var t=0,q=o,j=0;j<e.length;j++){k=e.charAt(j);if(d===o)switch(k){case "{":d=j;q=k;i="}";break;case "(":d=j;q=k;i=")";break;case "[":d=j,q=k,i="]"}k===q?t++:k===i&&(t--,0===t&&(k=e.substring(d,j+1),b.push(k),n="@ko_token_"+(b.length-1)+"@",e=e.substring(0,d)+n+e.substring(j+1),j-=k.length-n.length,d=o))}i=[];e=e.split(",");d=0;for(j=e.length;d<j;d++)t=e[d],q=t.indexOf(":"),
-0<q&&q<t.length-1?(k=t.substring(q+1),i.push({key:a(t.substring(0,q),b),value:a(k,b)})):i.push({unknown:a(t,b)});return i},ia:function(a){for(var b="string"===typeof a?r.j.Y(a):a,g=[],a=[],i,j=0;i=b[j];j++)if(0<g.length&&g.push(","),i.key){var k;a:{k=i.key;var n=r.a.z(k);switch(n.length&&n.charAt(0)){case "'":case '"':break a;default:k="'"+n+"'"}}i=i.value;g.push(k);g.push(":");g.push(i);n=r.a.z(i);if(0<=r.a.k(e,r.a.z(n).toLowerCase())?0:n.match(d)!==o)0<a.length&&a.push(", "),a.push(k+" : function(__ko_value) { "+
-i+" = __ko_value; }")}else i.unknown&&g.push(i.unknown);b=g.join("");0<a.length&&(b=b+", '_ko_property_writers' : { "+a.join("")+" } ");return b},rb:function(a,b){for(var e=0;e<a.length;e++)if(r.a.z(a[e].key)==b)return m;return p}}}();r.b("ko.jsonExpressionRewriting",r.j);r.b("ko.jsonExpressionRewriting.bindingRewriteValidators",r.j.D);r.b("ko.jsonExpressionRewriting.parseObjectLiteral",r.j.Y);r.b("ko.jsonExpressionRewriting.insertPropertyAccessorsIntoJson",r.j.ia);
-(function(){function a(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(h)}function b(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(g)}function d(e,d){for(var f=e,g=1,h=[];f=f.nextSibling;){if(b(f)&&(g--,0===g))return h;h.push(f);a(f)&&g++}d||c(Error("Cannot find closing comment tag to match: "+e.nodeValue));return o}function e(a,b){var e=d(a,b);return e?0<e.length?e[e.length-1].nextSibling:a.nextSibling:o}var f="<\!--test--\>"===document.createComment("test").text,h=f?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:
-/^\s*ko\s+(.*\:.*)\s*$/,g=f?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,i={ul:m,ol:m};r.f={C:{},childNodes:function(b){return a(b)?d(b):b.childNodes},ha:function(b){if(a(b))for(var b=r.f.childNodes(b),e=0,d=b.length;e<d;e++)r.removeNode(b[e]);else r.a.U(b)},oa:function(b,e){if(a(b)){r.f.ha(b);for(var d=b.nextSibling,f=0,g=e.length;f<g;f++)d.parentNode.insertBefore(e[f],d)}else r.a.oa(b,e)},xb:function(b,e){a(b)?b.parentNode.insertBefore(e,b.nextSibling):b.firstChild?b.insertBefore(e,b.firstChild):b.appendChild(e)},
-mb:function(b,e,d){a(b)?b.parentNode.insertBefore(e,d.nextSibling):d.nextSibling?b.insertBefore(e,d.nextSibling):b.appendChild(e)},nextSibling:function(d){return a(d)?e(d).nextSibling:d.nextSibling&&b(d.nextSibling)?l:d.nextSibling},ta:function(b){return(b=a(b))?b[1]:o},ib:function(a){if(r.f.ta(a)){var b;b=r.f.childNodes(a);for(var e=[],d=0,f=b.length;d<f;d++)r.a.A.F(b[d]),e.push(r.a.outerHTML(b[d]));b=String.prototype.concat.apply("",e);r.f.ha(a);(new r.m.I(a)).text(b)}},Fa:function(d){if(i[d.tagName.toLowerCase()]){var f=
-d.firstChild;if(f){do if(1===f.nodeType){var g;g=f.firstChild;var h=o;if(g){do if(h)h.push(g);else if(a(g)){var q=e(g,m);q?g=q:h=[g]}else b(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h){h=f.nextSibling;for(q=0;q<g.length;q++)h?d.insertBefore(g[q],h):d.appendChild(g[q])}}while(f=f.nextSibling)}}}}})();r.L=function(){};
-r.a.extend(r.L.prototype,{nodeHasBindings:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind")!=o;case 8:return r.f.ta(a)!=o;default:return p}},getBindings:function(a,b){var d=this.getBindingsString(a,b);return d?this.parseBindingsString(d,b):o},getBindingsString:function(a){switch(a.nodeType){case 1:return a.getAttribute("data-bind");case 8:return r.f.ta(a);default:return o}},parseBindingsString:function(a,b){try{var d=b.$data,e=" { "+r.j.ia(a)+" } ";return r.a.hb(e,d===o?window:
-d,b)}catch(f){c(Error("Unable to parse bindings.\nMessage: "+f+";\nBindings value: "+a))}}});r.L.instance=new r.L;r.b("ko.bindingProvider",r.L);
-(function(){function a(a,d){for(var h,g=d.childNodes[0];h=g;)g=r.f.nextSibling(h),b(a,h,p)}function b(b,f,h){var g=m,i=1==f.nodeType;i&&r.f.Fa(f);if(i&&h||r.L.instance.nodeHasBindings(f))g=d(f,o,b,h).Bb;i&&g&&a(b,f)}function d(a,b,d,g){function i(a){return function(){return n[a]}}function j(){return n}var k=0;r.f.ib(a);var n,t;new r.i(function(){var q=d&&d instanceof r.K?d:new r.K(r.a.d(d)),v=q.$data;g&&r.Na(a,q);if(n=("function"==typeof b?b():b)||r.L.instance.getBindings(a,q)){if(0===k){k=1;for(var s in n){var w=
-r.c[s];w&&8===a.nodeType&&!r.f.C[s]&&c(Error("The binding '"+s+"' cannot be used with virtual elements"));if(w&&"function"==typeof w.init&&(w=(0,w.init)(a,i(s),j,v,q))&&w.controlsDescendantBindings)t!==l&&c(Error("Multiple bindings ("+t+" and "+s+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),t=s}k=2}if(2===k)for(s in n)(w=r.c[s])&&"function"==typeof w.update&&(0,w.update)(a,i(s),j,v,q)}},o,{disposeWhenNodeIsRemoved:a});
-return{Bb:t===l}}r.c={};r.K=function(a,b){this.$data=a;b?(this.$parent=b.$data,this.$parents=(b.$parents||[]).slice(0),this.$parents.unshift(this.$parent),this.$root=b.$root):(this.$parents=[],this.$root=a)};r.K.prototype.createChildContext=function(a){return new r.K(a,this)};r.Na=function(a,b){if(2==arguments.length)r.a.e.set(a,"__ko_bindingContext__",b);else return r.a.e.get(a,"__ko_bindingContext__")};r.xa=function(a,b,h){1===a.nodeType&&r.f.Fa(a);return d(a,b,h,m)};r.Ta=function(b,d){1===d.nodeType&&
-a(b,d)};r.wa=function(a,d){d&&1!==d.nodeType&&8!==d.nodeType&&c(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));d=d||window.document.body;b(a,d,m)};r.ea=function(a){switch(a.nodeType){case 1:case 8:var b=r.Na(a);if(b)return b;if(a.parentNode)return r.ea(a.parentNode)}};r.$a=function(a){return(a=r.ea(a))?a.$data:l};r.b("ko.bindingHandlers",r.c);r.b("ko.applyBindings",r.wa);r.b("ko.applyBindingsToDescendants",r.Ta);r.b("ko.applyBindingsToNode",
-r.xa);r.b("ko.contextFor",r.ea);r.b("ko.dataFor",r.$a)})();r.a.n(["click"],function(a){r.c[a]={init:function(b,d,e,f){return r.c.event.init.call(this,b,function(){var b={};b[a]=d();return b},e,f)}}});
-r.c.event={init:function(a,b,d,e){var f=b()||{},h;for(h in f)(function(){var f=h;"string"==typeof f&&r.a.s(a,f,function(a){var h,k=b()[f];if(k){var n=d();try{var t=r.a.X(arguments);t.unshift(e);h=k.apply(e,t)}finally{if(h!==m)a.preventDefault?a.preventDefault():a.returnValue=p}if(n[f+"Bubble"]===p)a.cancelBubble=m,a.stopPropagation&&a.stopPropagation()}})})()}};
-r.c.submit={init:function(a,b,d,e){"function"!=typeof b()&&c(Error("The value for a submit binding must be a function"));r.a.s(a,"submit",function(d){var h,g=b();try{h=g.call(e,a)}finally{if(h!==m)d.preventDefault?d.preventDefault():d.returnValue=p}})}};r.c.visible={update:function(a,b){var d=r.a.d(b()),e="none"!=a.style.display;if(d&&!e)a.style.display="";else if(!d&&e)a.style.display="none"}};
-r.c.enable={update:function(a,b){var d=r.a.d(b());if(d&&a.disabled)a.removeAttribute("disabled");else if(!d&&!a.disabled)a.disabled=m}};r.c.disable={update:function(a,b){r.c.enable.update(a,function(){return!r.a.d(b())})}};function D(a,b,d){d&&b!==r.h.q(a)&&r.h.S(a,b);b!==r.h.q(a)&&r.a.sa(a,"change")}
-r.c.value={init:function(a,b,d){var e=["change"],f=d().valueUpdate;f&&("string"==typeof f&&(f=[f]),r.a.J(e,f),e=r.a.ya(e));r.a.n(e,function(e){var f=p;r.a.Cb(e,"after")&&(f=m,e=e.substring(5));var i=f?function(a){setTimeout(a,0)}:function(a){a()};r.a.s(a,e,function(){i(function(){var e=b(),f=r.h.q(a);r.P(e)?e(f):(e=d(),e._ko_property_writers&&e._ko_property_writers.value&&e._ko_property_writers.value(f))})})})},update:function(a,b){var d=r.a.d(b()),e=r.h.q(a),f=d!=e;0===d&&0!==e&&"0"!==e&&(f=m);f&&
-(e=function(){r.h.S(a,d)},e(),"SELECT"==a.tagName&&setTimeout(e,0));"SELECT"==a.tagName&&0<a.length&&D(a,d,p)}};
-r.c.options={update:function(a,b,d){"SELECT"!=a.tagName&&c(Error("options binding applies only to SELECT elements"));var e=0==a.length,f=r.a.ba(r.a.aa(a.childNodes,function(a){return a.tagName&&"OPTION"==a.tagName&&a.selected}),function(a){return r.h.q(a)||a.innerText||a.textContent}),h=a.scrollTop;a.scrollTop=0;for(var g=r.a.d(b());0<a.length;)r.F(a.options[0]),a.remove(0);if(g){d=d();"number"!=typeof g.length&&(g=[g]);if(d.optionsCaption){var i=document.createElement("OPTION");r.a.Z(i,d.optionsCaption);
-r.h.S(i,l);a.appendChild(i)}for(var b=0,j=g.length;b<j;b++){var i=document.createElement("OPTION"),k="string"==typeof d.optionsValue?g[b][d.optionsValue]:g[b],k=r.a.d(k);r.h.S(i,k);var n=d.optionsText,k="function"==typeof n?n(g[b]):"string"==typeof n?g[b][n]:k;if(k===o||k===l)k="";r.a.Ma(i,k);a.appendChild(i)}g=a.getElementsByTagName("OPTION");b=i=0;for(j=g.length;b<j;b++)0<=r.a.k(f,r.h.q(g[b]))&&(r.a.La(g[b],m),i++);if(h)a.scrollTop=h;e&&"value"in d&&D(a,r.a.d(d.value),m)}}};r.c.options.la="__ko.optionValueDomData__";
-r.c.selectedOptions={Da:function(a){for(var b=[],a=a.childNodes,d=0,e=a.length;d<e;d++){var f=a[d];"OPTION"==f.tagName&&f.selected&&b.push(r.h.q(f))}return b},init:function(a,b,d){r.a.s(a,"change",function(){var a=b();r.P(a)?a(r.c.selectedOptions.Da(this)):(a=d(),a._ko_property_writers&&a._ko_property_writers.value&&a._ko_property_writers.value(r.c.selectedOptions.Da(this)))})},update:function(a,b){"SELECT"!=a.tagName&&c(Error("values binding applies only to SELECT elements"));var d=r.a.d(b());if(d&&
-"number"==typeof d.length)for(var e=a.childNodes,f=0,h=e.length;f<h;f++){var g=e[f];"OPTION"==g.tagName&&r.a.La(g,0<=r.a.k(d,r.h.q(g)))}}};r.c.text={update:function(a,b){r.a.Ma(a,b())}};r.c.html={init:function(){return{controlsDescendantBindings:m}},update:function(a,b){var d=r.a.d(b());r.a.Z(a,d)}};r.c.css={update:function(a,b){var d=r.a.d(b()||{}),e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);r.a.Qa(a,e,f)}}};
-r.c.style={update:function(a,b){var d=r.a.d(b()||{}),e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);a.style[e]=f||""}}};r.c.uniqueName={init:function(a,b){if(b())a.name="ko_unique_"+ ++r.c.uniqueName.Za,(r.a.ob||r.a.pb)&&a.mergeAttributes(document.createElement("<input name='"+a.name+"'/>"),p)}};r.c.uniqueName.Za=0;
-r.c.checked={init:function(a,b,d){r.a.s(a,"click",function(){var e;if("checkbox"==a.type)e=a.checked;else if("radio"==a.type&&a.checked)e=a.value;else return;var f=b();"checkbox"==a.type&&r.a.d(f)instanceof Array?(e=r.a.k(r.a.d(f),a.value),a.checked&&0>e?f.push(a.value):!a.checked&&0<=e&&f.splice(e,1)):r.P(f)?f()!==e&&f(e):(f=d(),f._ko_property_writers&&f._ko_property_writers.checked&&f._ko_property_writers.checked(e))});"radio"==a.type&&!a.name&&r.c.uniqueName.init(a,function(){return m})},update:function(a,
-b){var d=r.a.d(b());if("checkbox"==a.type)a.checked=d instanceof Array?0<=r.a.k(d,a.value):d;else if("radio"==a.type)a.checked=a.value==d}};r.c.attr={update:function(a,b){var d=r.a.d(b())||{},e;for(e in d)if("string"==typeof e){var f=r.a.d(d[e]);f===p||f===o||f===l?a.removeAttribute(e):a.setAttribute(e,f.toString())}}};
-r.c.hasfocus={init:function(a,b,d){function e(a){var e=b();a!=r.a.d(e)&&(r.P(e)?e(a):(e=d(),e._ko_property_writers&&e._ko_property_writers.hasfocus&&e._ko_property_writers.hasfocus(a)))}r.a.s(a,"focus",function(){e(m)});r.a.s(a,"focusin",function(){e(m)});r.a.s(a,"blur",function(){e(p)});r.a.s(a,"focusout",function(){e(p)})},update:function(a,b){var d=r.a.d(b());d?a.focus():a.blur();r.a.sa(a,d?"focusin":"focusout")}};
-r.c["with"]={o:function(a){return function(){var b=a();return{"if":b,data:b,templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c["with"].o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c["with"].o(b),d,e,f)}};r.j.D["with"]=p;r.f.C["with"]=m;r.c["if"]={o:function(a){return function(){return{"if":a(),templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c["if"].o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c["if"].o(b),d,e,f)}};
-r.j.D["if"]=p;r.f.C["if"]=m;r.c.ifnot={o:function(a){return function(){return{ifnot:a(),templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c.ifnot.o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c.ifnot.o(b),d,e,f)}};r.j.D.ifnot=p;r.f.C.ifnot=m;
-r.c.foreach={o:function(a){return function(){var b=r.a.d(a());return!b||"number"==typeof b.length?{foreach:b,templateEngine:r.p.M}:{foreach:b.data,includeDestroyed:b.includeDestroyed,afterAdd:b.afterAdd,beforeRemove:b.beforeRemove,afterRender:b.afterRender,templateEngine:r.p.M}}},init:function(a,b){return r.c.template.init(a,r.c.foreach.o(b))},update:function(a,b,d,e,f){return r.c.template.update(a,r.c.foreach.o(b),d,e,f)}};r.j.D.foreach=p;r.f.C.foreach=m;r.b("ko.allowedVirtualElementBindings",r.f.C);
-r.t=function(){};r.t.prototype.renderTemplateSource=function(){c("Override renderTemplateSource")};r.t.prototype.createJavaScriptEvaluatorBlock=function(){c("Override createJavaScriptEvaluatorBlock")};r.t.prototype.makeTemplateSource=function(a){if("string"==typeof a){var b=document.getElementById(a);b||c(Error("Cannot find template with ID "+a));return new r.m.g(b)}if(1==a.nodeType||8==a.nodeType)return new r.m.I(a);c(Error("Unknown template type: "+a))};
-r.t.prototype.renderTemplate=function(a,b,d){return this.renderTemplateSource(this.makeTemplateSource(a),b,d)};r.t.prototype.isTemplateRewritten=function(a){return this.allowTemplateRewriting===p?m:this.W&&this.W[a]?m:this.makeTemplateSource(a).data("isRewritten")};r.t.prototype.rewriteTemplate=function(a,b){var d=this.makeTemplateSource(a),e=b(d.text());d.text(e);d.data("isRewritten",m);if("string"==typeof a)this.W=this.W||{},this.W[a]=m};r.b("ko.templateEngine",r.t);
-r.$=function(){function a(a,b,d){for(var a=r.j.Y(a),g=r.j.D,i=0;i<a.length;i++){var j=a[i].key;if(g.hasOwnProperty(j)){var k=g[j];"function"===typeof k?(j=k(a[i].value))&&c(Error(j)):k||c(Error("This template engine does not support the '"+j+"' binding within its templates"))}}a="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() { return (function() { return { "+r.j.ia(a)+" } })() })";return d.createJavaScriptEvaluatorBlock(a)+b}var b=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,
-d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{gb:function(a,b){b.isTemplateRewritten(a)||b.rewriteTemplate(a,function(a){return r.$.ub(a,b)})},ub:function(e,f){return e.replace(b,function(b,e,d,j,k,n,t){return a(t,e,f)}).replace(d,function(b,e){return a(e,"<\!-- ko --\>",f)})},Ua:function(a){return r.r.ka(function(b,d){b.nextSibling&&r.xa(b.nextSibling,a,d)})}}}();r.b("ko.templateRewriting",r.$);r.b("ko.templateRewriting.applyMemoizedBindingsToNextSibling",r.$.Ua);r.m={};r.m.g=function(a){this.g=a};
-r.m.g.prototype.text=function(){if(0==arguments.length)return"script"==this.g.tagName.toLowerCase()?this.g.text:this.g.innerHTML;var a=arguments[0];"script"==this.g.tagName.toLowerCase()?this.g.text=a:r.a.Z(this.g,a)};r.m.g.prototype.data=function(a){if(1===arguments.length)return r.a.e.get(this.g,"templateSourceData_"+a);r.a.e.set(this.g,"templateSourceData_"+a,arguments[1])};r.m.I=function(a){this.g=a};r.m.I.prototype=new r.m.g;
-r.m.I.prototype.text=function(){if(0==arguments.length)return r.a.e.get(this.g,"__ko_anon_template__");r.a.e.set(this.g,"__ko_anon_template__",arguments[0])};r.b("ko.templateSources",r.m);r.b("ko.templateSources.domElement",r.m.g);r.b("ko.templateSources.anonymousTemplate",r.m.I);
-(function(){function a(a,b,d){for(var g=0;node=a[g];g++)node.parentNode===b&&(1===node.nodeType||8===node.nodeType)&&d(node)}function b(a,b,h,g,i){var i=i||{},j=i.templateEngine||d;r.$.gb(h,j);h=j.renderTemplate(h,g,i);("number"!=typeof h.length||0<h.length&&"number"!=typeof h[0].nodeType)&&c("Template engine must return an array of DOM nodes");j=p;switch(b){case "replaceChildren":r.f.oa(a,h);j=m;break;case "replaceNode":r.a.Ja(a,h);j=m;break;case "ignoreTargetNode":break;default:c(Error("Unknown renderMode: "+
-b))}j&&(r.ua(h,g),i.afterRender&&i.afterRender(h,g.$data));return h}var d;r.pa=function(a){a!=l&&!(a instanceof r.t)&&c("templateEngine must inherit from ko.templateEngine");d=a};r.ua=function(b,d){var h=r.a.J([],b),g=0<b.length?b[0].parentNode:o;a(h,g,function(a){r.wa(d,a)});a(h,g,function(a){r.r.Sa(a,[d])})};r.na=function(a,f,h,g,i){h=h||{};(h.templateEngine||d)==l&&c("Set a template engine before calling renderTemplate");i=i||"replaceChildren";if(g){var j=g.nodeType?g:0<g.length?g[0]:o;return new r.i(function(){var d=
-f&&f instanceof r.K?f:new r.K(r.a.d(f)),n="function"==typeof a?a(d.$data):a,d=b(g,i,n,d,h);"replaceNode"==i&&(g=d,j=g.nodeType?g:0<g.length?g[0]:o)},o,{disposeWhen:function(){return!j||!r.a.ga(j)},disposeWhenNodeIsRemoved:j&&"replaceNode"==i?j.parentNode:j})}return r.r.ka(function(b){r.na(a,f,h,b,"replaceNode")})};r.Ab=function(a,d,h,g,i){function j(a,b){var d=k(a);r.ua(b,d);h.afterRender&&h.afterRender(b,d.$data)}function k(a){return i.createChildContext(r.a.d(a))}return new r.i(function(){var i=
-r.a.d(d)||[];"undefined"==typeof i.length&&(i=[i]);i=r.a.aa(i,function(a){return h.includeDestroyed||a===l||a===o||!r.a.d(a._destroy)});r.a.Ka(g,i,function(d){var f="function"==typeof a?a(d):a;return b(o,"ignoreTargetNode",f,k(d),h)},h,j)},o,{disposeWhenNodeIsRemoved:g})};r.c.template={init:function(a,b){var d=r.a.d(b());"string"!=typeof d&&!d.name&&1==a.nodeType&&((new r.m.I(a)).text(a.innerHTML),r.a.U(a));return{controlsDescendantBindings:m}},update:function(a,b,d,g,i){b=r.a.d(b());g=m;"string"==
-typeof b?d=b:(d=b.name,"if"in b&&(g=g&&r.a.d(b["if"])),"ifnot"in b&&(g=g&&!r.a.d(b.ifnot)));var j=o;"object"===typeof b&&"foreach"in b?j=r.Ab(d||a,g&&b.foreach||[],b,a,i):g?(i="object"==typeof b&&"data"in b?i.createChildContext(r.a.d(b.data)):i,j=r.na(d||a,i,b,a)):r.f.ha(a);i=j;(b=r.a.e.get(a,"__ko__templateSubscriptionDomDataKey__"))&&"function"==typeof b.v&&b.v();r.a.e.set(a,"__ko__templateSubscriptionDomDataKey__",i)}};r.j.D.template=function(a){a=r.j.Y(a);return 1==a.length&&a[0].unknown?o:r.j.rb(a,
-"name")?o:"This template engine does not support anonymous templates nested within its templates"};r.f.C.template=m})();r.b("ko.setTemplateEngine",r.pa);r.b("ko.renderTemplate",r.na);
-r.a.N=function(a,b,d){if(d===l)return r.a.N(a,b,1)||r.a.N(a,b,10)||r.a.N(a,b,Number.MAX_VALUE);for(var a=a||[],b=b||[],e=a,f=b,h=[],g=0;g<=f.length;g++)h[g]=[];for(var g=0,i=Math.min(e.length,d);g<=i;g++)h[0][g]=g;g=1;for(i=Math.min(f.length,d);g<=i;g++)h[g][0]=g;for(var i=e.length,j,k=f.length,g=1;g<=i;g++){j=Math.max(1,g-d);for(var n=Math.min(k,g+d);j<=n;j++)h[j][g]=e[g-1]===f[j-1]?h[j-1][g-1]:Math.min(h[j-1][g]===l?Number.MAX_VALUE:h[j-1][g]+1,h[j][g-1]===l?Number.MAX_VALUE:h[j][g-1]+1)}d=a.length;
-e=b.length;f=[];g=h[e][d];if(g===l)h=o;else{for(;0<d||0<e;){i=h[e][d];k=0<e?h[e-1][d]:g+1;n=0<d?h[e][d-1]:g+1;j=0<e&&0<d?h[e-1][d-1]:g+1;if(k===l||k<i-1)k=g+1;if(n===l||n<i-1)n=g+1;j<i-1&&(j=g+1);k<=n&&k<j?(f.push({status:"added",value:b[e-1]}),e--):(n<k&&n<j?f.push({status:"deleted",value:a[d-1]}):(f.push({status:"retained",value:a[d-1]}),e--),d--)}h=f.reverse()}return h};r.b("ko.utils.compareArrays",r.a.N);
-(function(){function a(a){if(2<a.length){for(var b=a[0],f=a[a.length-1],h=[b];b!==f;){b=b.nextSibling;if(!b)return;h.push(b)}Array.prototype.splice.apply(a,[0,a.length].concat(h))}}function b(b,e,f,h){var g=[],b=r.i(function(){var b=e(f)||[];0<g.length&&(a(g),r.a.Ja(g,b),h&&h(f,b));g.splice(0,g.length);r.a.J(g,b)},o,{disposeWhenNodeIsRemoved:b,disposeWhen:function(){return 0==g.length||!r.a.ga(g[0])}});return{sb:g,i:b}}r.a.Ka=function(d,e,f,h,g){for(var e=e||[],h=h||{},i=r.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===
-l,j=r.a.e.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],k=r.a.ba(j,function(a){return a.Va}),n=r.a.N(k,e),e=[],t=0,q=[],k=[],v=o,s=0,w=n.length;s<w;s++)switch(n[s].status){case "retained":var x=j[t];e.push(x);0<x.O.length&&(v=x.O[x.O.length-1]);t++;break;case "deleted":j[t].i.v();a(j[t].O);r.a.n(j[t].O,function(a){q.push({element:a,index:s,value:n[s].value});v=a});t++;break;case "added":var x=n[s].value,z=b(d,f,x,g),u=z.sb;e.push({Va:n[s].value,O:u,i:z.i});for(var z=0,y=u.length;z<
-y;z++){var A=u[z];k.push({element:A,index:s,value:n[s].value});v==o?r.f.xb(d,A):r.f.mb(d,A,v);v=A}g&&g(x,u)}r.a.n(q,function(a){r.F(a.element)});f=p;if(!i){if(h.afterAdd)for(s=0;s<k.length;s++)h.afterAdd(k[s].element,k[s].index,k[s].value);if(h.beforeRemove){for(s=0;s<q.length;s++)h.beforeRemove(q[s].element,q[s].index,q[s].value);f=m}}f||r.a.n(q,function(a){r.removeNode(a.element)});r.a.e.set(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult",e)}})();
-r.b("ko.utils.setDomNodeChildrenFromArrayMapping",r.a.Ka);r.p=function(){this.allowTemplateRewriting=p};r.p.prototype=new r.t;r.p.prototype.renderTemplateSource=function(a){a=a.text();return r.a.ma(a)};r.p.M=new r.p;r.pa(r.p.M);r.b("ko.nativeTemplateEngine",r.p);
-(function(){r.ja=function(){var a=this.qb=function(){if("undefined"==typeof jQuery||!jQuery.tmpl)return 0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(d,e,f){f=f||{};2>a&&c(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var h=d.data("precompiled");h||(h=d.text()||"",h=jQuery.template(o,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),d.data("precompiled",h));
-d=[e.$data];e=jQuery.extend({koBindingContext:e},f.templateOptions);e=jQuery.tmpl(h,d,e);e.appendTo(document.createElement("div"));jQuery.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){document.write("<script type='text/html' id='"+a+"'>"+b+"<\/script>")};if(0<a)jQuery.tmpl.tag.ko_code={open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "}};r.ja.prototype=new r.t;
-var a=new r.ja;0<a.qb&&r.pa(a);r.b("ko.jqueryTmplTemplateEngine",r.ja)})();
-})(window);
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/main.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/main.py
deleted file mode 100644
index ed9af3eb50d..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/main.py
+++ /dev/null
@@ -1,249 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-r"""
-=================================
- Benchmark jsmin implementations
-=================================
-
-Benchmark jsmin implementations.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-Usage::
-
- python -mbench.main [-c COUNT] [-p file] jsfile ...
-
- -c COUNT number of runs per jsfile and minifier. Defaults to 10.
- -p file File to write the benchmark results in (pickled)
-
-"""
-if __doc__:
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
-__docformat__ = "restructuredtext en"
-__license__ = "Apache License, Version 2.0"
-__version__ = "1.0.0"
-
-import sys as _sys
-import time as _time
-
-import_notes = []
-class jsmins(object):
- from bench import jsmin as p_01_simple_port
- if _sys.version_info >= (2, 4):
- from bench import jsmin_2_0_9 as p_02_jsmin_2_0_9
- else:
- import_notes.append(
- "jsmin_2_0_9 available for python 2.4 and later..."
- )
- print(import_notes[-1])
- try:
- import slimit as _slimit_0_8_1
- except (ImportError, SyntaxError):
- import_notes.append("slimit_0_8_1 could not be imported")
- print(import_notes[-1])
- else:
- class p_03_slimit_0_8_1(object):
- pass
- p_03_slimit_0_8_1 = p_03_slimit_0_8_1()
- p_03_slimit_0_8_1.jsmin = _slimit_0_8_1.minify
- class p_04_slimit_0_8_1_mangle(object):
- pass
- p_04_slimit_0_8_1_mangle = p_04_slimit_0_8_1_mangle()
- p_04_slimit_0_8_1_mangle.jsmin = \
- lambda x, s=_slimit_0_8_1: s.minify(x, True)
-
- import rjsmin as p_05_rjsmin
- try:
- import _rjsmin as p_06__rjsmin
- except ImportError:
- import_notes.append("_rjsmin (C-Port) not available")
- print(import_notes[-1])
-jsmins.p_05_rjsmin.jsmin = jsmins.p_05_rjsmin._make_jsmin(
- python_only=True
-)
-print("Python Release: %s" % ".".join(map(str, _sys.version_info[:3])))
-print("")
-
-
-def slurp(filename):
- """ Load a file """
- fp = open(filename)
- try:
- return fp.read()
- finally:
- fp.close()
-
-
-def print_(*value, **kwargs):
- """ Print stuff """
- (kwargs.get('file') or _sys.stdout).write(
- ''.join(value) + kwargs.get('end', '\n')
- )
-
-
-def bench(filenames, count):
- """
- Benchmark the minifiers with given javascript samples
-
- :Parameters:
- `filenames` : sequence
- List of filenames
-
- `count` : ``int``
- Number of runs per js file and minifier
-
- :Exceptions:
- - `RuntimeError` : empty filenames sequence
- """
- if not filenames:
- raise RuntimeError("Missing files to benchmark")
- try:
- xrange
- except NameError:
- xrange = range
- try:
- cmp
- except NameError:
- cmp = lambda a, b: (a > b) - (a < b)
-
- ports = [item for item in dir(jsmins) if item.startswith('p_')]
- ports.sort()
- space = max(map(len, ports)) - 4
- ports = [(item[5:], getattr(jsmins, item).jsmin) for item in ports]
- flush = _sys.stdout.flush
-
- struct = []
- inputs = [(filename, slurp(filename)) for filename in filenames]
- for filename, script in inputs:
- print_("Benchmarking %r..." % filename, end=" ")
- flush()
- outputs = []
- for _, jsmin in ports:
- try:
- outputs.append(jsmin(script))
- except (SystemExit, KeyboardInterrupt):
- raise
- except:
- outputs.append(None)
- struct.append(dict(
- filename=filename,
- sizes=[
- (item is not None and len(item) or None) for item in outputs
- ],
- size=len(script),
- messages=[],
- times=[],
- ))
- print_("(%.1f KiB)" % (struct[-1]['size'] / 1024.0,))
- flush()
- times = []
- for idx, (name, jsmin) in enumerate(ports):
- if outputs[idx] is None:
- print_(" FAILED %s" % (name,))
- struct[-1]['times'].append((name, None))
- else:
- print_(" Timing %s%s... (%5.1f KiB %s)" % (
- name,
- " " * (space - len(name)),
- len(outputs[idx]) / 1024.0,
- idx == 0 and '*' or ['=', '>', '<'][
- cmp(len(outputs[idx]), len(outputs[0]))
- ],
- ), end=" ")
- flush()
-
- xcount = count
- while True:
- counted = [None for _ in xrange(xcount)]
- start = _time.time()
- for _ in counted:
- jsmin(script)
- end = _time.time()
- result = (end - start) * 1000
- if result < 10: # avoid measuring within the error range
- xcount *= 10
- continue
- times.append(result / xcount)
- break
-
- print_("%8.2f ms" % times[-1], end=" ")
- flush()
- if len(times) <= 1:
- print_()
- else:
- print_("(factor: %s)" % (', '.join([
- '%.2f' % (timed / times[-1]) for timed in times[:-1]
- ])))
- struct[-1]['times'].append((name, times[-1]))
-
- flush()
- print_()
-
- return struct
-
-
-def main(argv=None):
- """ Main """
- import getopt as _getopt
- import os as _os
- import pickle as _pickle
-
- if argv is None:
- argv = _sys.argv[1:]
- try:
- opts, args = _getopt.getopt(argv, "hc:p:", ["help"])
- except getopt.GetoptError:
- e = _sys.exc_info()[0](_sys.exc_info()[1])
- print >> _sys.stderr, "%s\nTry %s -mbench.main --help" % (
- e,
- _os.path.basename(_sys.executable),
- )
- _sys.exit(2)
-
- count, pickle = 10, None
- for key, value in opts:
- if key in ("-h", "--help"):
- print >> _sys.stderr, (
- "%s -mbench.main [-c count] [-p file] cssfile ..." % (
- _os.path.basename(_sys.executable),
- )
- )
- _sys.exit(0)
- elif key == '-c':
- count = int(value)
- elif key == '-p':
- pickle = str(value)
-
- struct = bench(args, count)
- if pickle:
- fp = open(pickle, 'wb')
- try:
- fp.write(_pickle.dumps((
- ".".join(map(str, _sys.version_info[:3])),
- import_notes,
- struct,
- ), 0))
- finally:
- fp.close()
-
-
-if __name__ == '__main__':
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/markermanager.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/markermanager.js
deleted file mode 100644
index 10066507512..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/markermanager.js
+++ /dev/null
@@ -1,976 +0,0 @@
-/**
- * @name MarkerManager v3
- * @version 1.0
- * @copyright (c) 2007 Google Inc.
- * @author Doug Ricket, Bjorn Brala (port to v3), others,
- *
- * @fileoverview Marker manager is an interface between the map and the user,
- * designed to manage adding and removing many points when the viewport changes.
- * <br /><br />
- * <b>How it Works</b>:<br/>
- * The MarkerManager places its markers onto a grid, similar to the map tiles.
- * When the user moves the viewport, it computes which grid cells have
- * entered or left the viewport, and shows or hides all the markers in those
- * cells.
- * (If the users scrolls the viewport beyond the markers that are loaded,
- * no markers will be visible until the <code>EVENT_moveend</code>
- * triggers an update.)
- * In practical consequences, this allows 10,000 markers to be distributed over
- * a large area, and as long as only 100-200 are visible in any given viewport,
- * the user will see good performance corresponding to the 100 visible markers,
- * rather than poor performance corresponding to the total 10,000 markers.
- * Note that some code is optimized for speed over space,
- * with the goal of accommodating thousands of markers.
- */
-
-/*
- * 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.
- */
-
-/**
- * @name MarkerManagerOptions
- * @class This class represents optional arguments to the {@link MarkerManager}
- * constructor.
- * @property {Number} maxZoom Sets the maximum zoom level monitored by a
- * marker manager. If not given, the manager assumes the maximum map zoom
- * level. This value is also used when markers are added to the manager
- * without the optional {@link maxZoom} parameter.
- * @property {Number} borderPadding Specifies, in pixels, the extra padding
- * outside the map's current viewport monitored by a manager. Markers that
- * fall within this padding are added to the map, even if they are not fully
- * visible.
- * @property {Boolean} trackMarkers=false Indicates whether or not a marker
- * manager should track markers' movements. If you wish to move managed
- * markers using the {@link setPoint}/{@link setLatLng} methods,
- * this option should be set to {@link true}.
- */
-
-/**
- * Creates a new MarkerManager that will show/hide markers on a map.
- *
- * Events:
- * @event changed (Parameters: shown bounds, shown markers) Notify listeners when the state of what is displayed changes.
- * @event loaded MarkerManager has succesfully been initialized.
- *
- * @constructor
- * @param {Map} map The map to manage.
- * @param {Object} opt_opts A container for optional arguments:
- * {Number} maxZoom The maximum zoom level for which to create tiles.
- * {Number} borderPadding The width in pixels beyond the map border,
- * where markers should be display.
- * {Boolean} trackMarkers Whether or not this manager should track marker
- * movements.
- */
-function MarkerManager(map, opt_opts) {
- var me = this;
- me.map_ = map;
- me.mapZoom_ = map.getZoom();
-
- me.projectionHelper_ = new ProjectionHelperOverlay(map);
- google.maps.event.addListener(me.projectionHelper_, 'ready', function () {
- me.projection_ = this.getProjection();
- me.initialize(map, opt_opts);
- });
-}
-
-
-MarkerManager.prototype.initialize = function (map, opt_opts) {
- var me = this;
-
- opt_opts = opt_opts || {};
- me.tileSize_ = MarkerManager.DEFAULT_TILE_SIZE_;
-
- var mapTypes = map.mapTypes;
-
- // Find max zoom level
- var mapMaxZoom = 1;
- for (var sType in mapTypes ) {
- if (typeof map.mapTypes.get(sType) === 'object' && typeof map.mapTypes.get(sType).maxZoom === 'number') {
- var mapTypeMaxZoom = map.mapTypes.get(sType).maxZoom;
- if (mapTypeMaxZoom > mapMaxZoom) {
- mapMaxZoom = mapTypeMaxZoom;
- }
- }
- }
-
- me.maxZoom_ = opt_opts.maxZoom || 19;
-
- me.trackMarkers_ = opt_opts.trackMarkers;
- me.show_ = opt_opts.show || true;
-
- var padding;
- if (typeof opt_opts.borderPadding === 'number') {
- padding = opt_opts.borderPadding;
- } else {
- padding = MarkerManager.DEFAULT_BORDER_PADDING_;
- }
- // The padding in pixels beyond the viewport, where we will pre-load markers.
- me.swPadding_ = new google.maps.Size(-padding, padding);
- me.nePadding_ = new google.maps.Size(padding, -padding);
- me.borderPadding_ = padding;
-
- me.gridWidth_ = {};
-
- me.grid_ = {};
- me.grid_[me.maxZoom_] = {};
- me.numMarkers_ = {};
- me.numMarkers_[me.maxZoom_] = 0;
-
-
- google.maps.event.addListener(map, 'dragend', function () {
- me.onMapMoveEnd_();
- });
- google.maps.event.addListener(map, 'zoom_changed', function () {
- me.onMapMoveEnd_();
- });
-
-
-
- /**
- * This closure provide easy access to the map.
- * They are used as callbacks, not as methods.
- * @param GMarker marker Marker to be removed from the map
- * @private
- */
- me.removeOverlay_ = function (marker) {
- marker.setMap(null);
- me.shownMarkers_--;
- };
-
- /**
- * This closure provide easy access to the map.
- * They are used as callbacks, not as methods.
- * @param GMarker marker Marker to be added to the map
- * @private
- */
- me.addOverlay_ = function (marker) {
- if (me.show_) {
- marker.setMap(me.map_);
- me.shownMarkers_++;
- }
- };
-
- me.resetManager_();
- me.shownMarkers_ = 0;
-
- me.shownBounds_ = me.getMapGridBounds_();
-
- google.maps.event.trigger(me, 'loaded');
-
-};
-
-/**
- * Default tile size used for deviding the map into a grid.
- */
-MarkerManager.DEFAULT_TILE_SIZE_ = 1024;
-
-/*
- * How much extra space to show around the map border so
- * dragging doesn't result in an empty place.
- */
-MarkerManager.DEFAULT_BORDER_PADDING_ = 100;
-
-/**
- * Default tilesize of single tile world.
- */
-MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE = 256;
-
-
-/**
- * Initializes MarkerManager arrays for all zoom levels
- * Called by constructor and by clearAllMarkers
- */
-MarkerManager.prototype.resetManager_ = function () {
- var mapWidth = MarkerManager.MERCATOR_ZOOM_LEVEL_ZERO_RANGE;
- for (var zoom = 0; zoom <= this.maxZoom_; ++zoom) {
- this.grid_[zoom] = {};
- this.numMarkers_[zoom] = 0;
- this.gridWidth_[zoom] = Math.ceil(mapWidth / this.tileSize_);
- mapWidth <<= 1;
- }
-
-};
-
-/**
- * Removes all markers in the manager, and
- * removes any visible markers from the map.
- */
-MarkerManager.prototype.clearMarkers = function () {
- this.processAll_(this.shownBounds_, this.removeOverlay_);
- this.resetManager_();
-};
-
-
-/**
- * Gets the tile coordinate for a given latlng point.
- *
- * @param {LatLng} latlng The geographical point.
- * @param {Number} zoom The zoom level.
- * @param {google.maps.Size} padding The padding used to shift the pixel coordinate.
- * Used for expanding a bounds to include an extra padding
- * of pixels surrounding the bounds.
- * @return {GPoint} The point in tile coordinates.
- *
- */
-MarkerManager.prototype.getTilePoint_ = function (latlng, zoom, padding) {
-
- var pixelPoint = this.projectionHelper_.LatLngToPixel(latlng, zoom);
-
- var point = new google.maps.Point(
- Math.floor((pixelPoint.x + padding.width) / this.tileSize_),
- Math.floor((pixelPoint.y + padding.height) / this.tileSize_)
- );
-
- return point;
-};
-
-
-/**
- * Finds the appropriate place to add the marker to the grid.
- * Optimized for speed; does not actually add the marker to the map.
- * Designed for batch-processing thousands of markers.
- *
- * @param {Marker} marker The marker to add.
- * @param {Number} minZoom The minimum zoom for displaying the marker.
- * @param {Number} maxZoom The maximum zoom for displaying the marker.
- */
-MarkerManager.prototype.addMarkerBatch_ = function (marker, minZoom, maxZoom) {
- var me = this;
-
- var mPoint = marker.getPosition();
- marker.MarkerManager_minZoom = minZoom;
-
-
- // Tracking markers is expensive, so we do this only if the
- // user explicitly requested it when creating marker manager.
- if (this.trackMarkers_) {
- google.maps.event.addListener(marker, 'changed', function (a, b, c) {
- me.onMarkerMoved_(a, b, c);
- });
- }
-
- var gridPoint = this.getTilePoint_(mPoint, maxZoom, new google.maps.Size(0, 0, 0, 0));
-
- for (var zoom = maxZoom; zoom >= minZoom; zoom--) {
- var cell = this.getGridCellCreate_(gridPoint.x, gridPoint.y, zoom);
- cell.push(marker);
-
- gridPoint.x = gridPoint.x >> 1;
- gridPoint.y = gridPoint.y >> 1;
- }
-};
-
-
-/**
- * Returns whether or not the given point is visible in the shown bounds. This
- * is a helper method that takes care of the corner case, when shownBounds have
- * negative minX value.
- *
- * @param {Point} point a point on a grid.
- * @return {Boolean} Whether or not the given point is visible in the currently
- * shown bounds.
- */
-MarkerManager.prototype.isGridPointVisible_ = function (point) {
- var vertical = this.shownBounds_.minY <= point.y &&
- point.y <= this.shownBounds_.maxY;
- var minX = this.shownBounds_.minX;
- var horizontal = minX <= point.x && point.x <= this.shownBounds_.maxX;
- if (!horizontal && minX < 0) {
- // Shifts the negative part of the rectangle. As point.x is always less
- // than grid width, only test shifted minX .. 0 part of the shown bounds.
- var width = this.gridWidth_[this.shownBounds_.z];
- horizontal = minX + width <= point.x && point.x <= width - 1;
- }
- return vertical && horizontal;
-};
-
-
-/**
- * Reacts to a notification from a marker that it has moved to a new location.
- * It scans the grid all all zoom levels and moves the marker from the old grid
- * location to a new grid location.
- *
- * @param {Marker} marker The marker that moved.
- * @param {LatLng} oldPoint The old position of the marker.
- * @param {LatLng} newPoint The new position of the marker.
- */
-MarkerManager.prototype.onMarkerMoved_ = function (marker, oldPoint, newPoint) {
- // NOTE: We do not know the minimum or maximum zoom the marker was
- // added at, so we start at the absolute maximum. Whenever we successfully
- // remove a marker at a given zoom, we add it at the new grid coordinates.
- var zoom = this.maxZoom_;
- var changed = false;
- var oldGrid = this.getTilePoint_(oldPoint, zoom, new google.maps.Size(0, 0, 0, 0));
- var newGrid = this.getTilePoint_(newPoint, zoom, new google.maps.Size(0, 0, 0, 0));
- while (zoom >= 0 && (oldGrid.x !== newGrid.x || oldGrid.y !== newGrid.y)) {
- var cell = this.getGridCellNoCreate_(oldGrid.x, oldGrid.y, zoom);
- if (cell) {
- if (this.removeFromArray_(cell, marker)) {
- this.getGridCellCreate_(newGrid.x, newGrid.y, zoom).push(marker);
- }
- }
- // For the current zoom we also need to update the map. Markers that no
- // longer are visible are removed from the map. Markers that moved into
- // the shown bounds are added to the map. This also lets us keep the count
- // of visible markers up to date.
- if (zoom === this.mapZoom_) {
- if (this.isGridPointVisible_(oldGrid)) {
- if (!this.isGridPointVisible_(newGrid)) {
- this.removeOverlay_(marker);
- changed = true;
- }
- } else {
- if (this.isGridPointVisible_(newGrid)) {
- this.addOverlay_(marker);
- changed = true;
- }
- }
- }
- oldGrid.x = oldGrid.x >> 1;
- oldGrid.y = oldGrid.y >> 1;
- newGrid.x = newGrid.x >> 1;
- newGrid.y = newGrid.y >> 1;
- --zoom;
- }
- if (changed) {
- this.notifyListeners_();
- }
-};
-
-
-/**
- * Removes marker from the manager and from the map
- * (if it's currently visible).
- * @param {GMarker} marker The marker to delete.
- */
-MarkerManager.prototype.removeMarker = function (marker) {
- var zoom = this.maxZoom_;
- var changed = false;
- var point = marker.getPosition();
- var grid = this.getTilePoint_(point, zoom, new google.maps.Size(0, 0, 0, 0));
- while (zoom >= 0) {
- var cell = this.getGridCellNoCreate_(grid.x, grid.y, zoom);
-
- if (cell) {
- this.removeFromArray_(cell, marker);
- }
- // For the current zoom we also need to update the map. Markers that no
- // longer are visible are removed from the map. This also lets us keep the count
- // of visible markers up to date.
- if (zoom === this.mapZoom_) {
- if (this.isGridPointVisible_(grid)) {
- this.removeOverlay_(marker);
- changed = true;
- }
- }
- grid.x = grid.x >> 1;
- grid.y = grid.y >> 1;
- --zoom;
- }
- if (changed) {
- this.notifyListeners_();
- }
- this.numMarkers_[marker.MarkerManager_minZoom]--;
-};
-
-
-/**
- * Add many markers at once.
- * Does not actually update the map, just the internal grid.
- *
- * @param {Array of Marker} markers The markers to add.
- * @param {Number} minZoom The minimum zoom level to display the markers.
- * @param {Number} opt_maxZoom The maximum zoom level to display the markers.
- */
-MarkerManager.prototype.addMarkers = function (markers, minZoom, opt_maxZoom) {
- var maxZoom = this.getOptMaxZoom_(opt_maxZoom);
- for (var i = markers.length - 1; i >= 0; i--) {
- this.addMarkerBatch_(markers[i], minZoom, maxZoom);
- }
-
- this.numMarkers_[minZoom] += markers.length;
-};
-
-
-/**
- * Returns the value of the optional maximum zoom. This method is defined so
- * that we have just one place where optional maximum zoom is calculated.
- *
- * @param {Number} opt_maxZoom The optinal maximum zoom.
- * @return The maximum zoom.
- */
-MarkerManager.prototype.getOptMaxZoom_ = function (opt_maxZoom) {
- return opt_maxZoom || this.maxZoom_;
-};
-
-
-/**
- * Calculates the total number of markers potentially visible at a given
- * zoom level.
- *
- * @param {Number} zoom The zoom level to check.
- */
-MarkerManager.prototype.getMarkerCount = function (zoom) {
- var total = 0;
- for (var z = 0; z <= zoom; z++) {
- total += this.numMarkers_[z];
- }
- return total;
-};
-
-/**
- * Returns a marker given latitude, longitude and zoom. If the marker does not
- * exist, the method will return a new marker. If a new marker is created,
- * it will NOT be added to the manager.
- *
- * @param {Number} lat - the latitude of a marker.
- * @param {Number} lng - the longitude of a marker.
- * @param {Number} zoom - the zoom level
- * @return {GMarker} marker - the marker found at lat and lng
- */
-MarkerManager.prototype.getMarker = function (lat, lng, zoom) {
- var mPoint = new google.maps.LatLng(lat, lng);
- var gridPoint = this.getTilePoint_(mPoint, zoom, new google.maps.Size(0, 0, 0, 0));
-
- var marker = new google.maps.Marker({position: mPoint});
-
- var cellArray = this.getGridCellNoCreate_(gridPoint.x, gridPoint.y, zoom);
- if (cellArray !== undefined) {
- for (var i = 0; i < cellArray.length; i++)
- {
- if (lat === cellArray[i].getLatLng().lat() && lng === cellArray[i].getLatLng().lng()) {
- marker = cellArray[i];
- }
- }
- }
- return marker;
-};
-
-/**
- * Add a single marker to the map.
- *
- * @param {Marker} marker The marker to add.
- * @param {Number} minZoom The minimum zoom level to display the marker.
- * @param {Number} opt_maxZoom The maximum zoom level to display the marker.
- */
-MarkerManager.prototype.addMarker = function (marker, minZoom, opt_maxZoom) {
- var maxZoom = this.getOptMaxZoom_(opt_maxZoom);
- this.addMarkerBatch_(marker, minZoom, maxZoom);
- var gridPoint = this.getTilePoint_(marker.getPosition(), this.mapZoom_, new google.maps.Size(0, 0, 0, 0));
- if (this.isGridPointVisible_(gridPoint) &&
- minZoom <= this.shownBounds_.z &&
- this.shownBounds_.z <= maxZoom) {
- this.addOverlay_(marker);
- this.notifyListeners_();
- }
- this.numMarkers_[minZoom]++;
-};
-
-
-/**
- * Helper class to create a bounds of INT ranges.
- * @param bounds Array.<Object.<string, number>> Bounds object.
- * @constructor
- */
-function GridBounds(bounds) {
- // [sw, ne]
-
- this.minX = Math.min(bounds[0].x, bounds[1].x);
- this.maxX = Math.max(bounds[0].x, bounds[1].x);
- this.minY = Math.min(bounds[0].y, bounds[1].y);
- this.maxY = Math.max(bounds[0].y, bounds[1].y);
-
-}
-
-/**
- * Returns true if this bounds equal the given bounds.
- * @param {GridBounds} gridBounds GridBounds The bounds to test.
- * @return {Boolean} This Bounds equals the given GridBounds.
- */
-GridBounds.prototype.equals = function (gridBounds) {
- if (this.maxX === gridBounds.maxX && this.maxY === gridBounds.maxY && this.minX === gridBounds.minX && this.minY === gridBounds.minY) {
- return true;
- } else {
- return false;
- }
-};
-
-/**
- * Returns true if this bounds (inclusively) contains the given point.
- * @param {Point} point The point to test.
- * @return {Boolean} This Bounds contains the given Point.
- */
-GridBounds.prototype.containsPoint = function (point) {
- var outer = this;
- return (outer.minX <= point.x && outer.maxX >= point.x && outer.minY <= point.y && outer.maxY >= point.y);
-};
-
-/**
- * Get a cell in the grid, creating it first if necessary.
- *
- * Optimization candidate
- *
- * @param {Number} x The x coordinate of the cell.
- * @param {Number} y The y coordinate of the cell.
- * @param {Number} z The z coordinate of the cell.
- * @return {Array} The cell in the array.
- */
-MarkerManager.prototype.getGridCellCreate_ = function (x, y, z) {
- var grid = this.grid_[z];
- if (x < 0) {
- x += this.gridWidth_[z];
- }
- var gridCol = grid[x];
- if (!gridCol) {
- gridCol = grid[x] = [];
- return (gridCol[y] = []);
- }
- var gridCell = gridCol[y];
- if (!gridCell) {
- return (gridCol[y] = []);
- }
- return gridCell;
-};
-
-
-/**
- * Get a cell in the grid, returning undefined if it does not exist.
- *
- * NOTE: Optimized for speed -- otherwise could combine with getGridCellCreate_.
- *
- * @param {Number} x The x coordinate of the cell.
- * @param {Number} y The y coordinate of the cell.
- * @param {Number} z The z coordinate of the cell.
- * @return {Array} The cell in the array.
- */
-MarkerManager.prototype.getGridCellNoCreate_ = function (x, y, z) {
- var grid = this.grid_[z];
-
- if (x < 0) {
- x += this.gridWidth_[z];
- }
- var gridCol = grid[x];
- return gridCol ? gridCol[y] : undefined;
-};
-
-
-/**
- * Turns at geographical bounds into a grid-space bounds.
- *
- * @param {LatLngBounds} bounds The geographical bounds.
- * @param {Number} zoom The zoom level of the bounds.
- * @param {google.maps.Size} swPadding The padding in pixels to extend beyond the
- * given bounds.
- * @param {google.maps.Size} nePadding The padding in pixels to extend beyond the
- * given bounds.
- * @return {GridBounds} The bounds in grid space.
- */
-MarkerManager.prototype.getGridBounds_ = function (bounds, zoom, swPadding, nePadding) {
- zoom = Math.min(zoom, this.maxZoom_);
-
- var bl = bounds.getSouthWest();
- var tr = bounds.getNorthEast();
- var sw = this.getTilePoint_(bl, zoom, swPadding);
-
- var ne = this.getTilePoint_(tr, zoom, nePadding);
- var gw = this.gridWidth_[zoom];
-
- // Crossing the prime meridian requires correction of bounds.
- if (tr.lng() < bl.lng() || ne.x < sw.x) {
- sw.x -= gw;
- }
- if (ne.x - sw.x + 1 >= gw) {
- // Computed grid bounds are larger than the world; truncate.
- sw.x = 0;
- ne.x = gw - 1;
- }
-
- var gridBounds = new GridBounds([sw, ne]);
- gridBounds.z = zoom;
-
- return gridBounds;
-};
-
-
-/**
- * Gets the grid-space bounds for the current map viewport.
- *
- * @return {Bounds} The bounds in grid space.
- */
-MarkerManager.prototype.getMapGridBounds_ = function () {
- return this.getGridBounds_(this.map_.getBounds(), this.mapZoom_, this.swPadding_, this.nePadding_);
-};
-
-
-/**
- * Event listener for map:movend.
- * NOTE: Use a timeout so that the user is not blocked
- * from moving the map.
- *
- * Removed this because a a lack of a scopy override/callback function on events.
- */
-MarkerManager.prototype.onMapMoveEnd_ = function () {
- this.objectSetTimeout_(this, this.updateMarkers_, 0);
-};
-
-
-/**
- * Call a function or evaluate an expression after a specified number of
- * milliseconds.
- *
- * Equivalent to the standard window.setTimeout function, but the given
- * function executes as a method of this instance. So the function passed to
- * objectSetTimeout can contain references to this.
- * objectSetTimeout(this, function () { alert(this.x) }, 1000);
- *
- * @param {Object} object The target object.
- * @param {Function} command The command to run.
- * @param {Number} milliseconds The delay.
- * @return {Boolean} Success.
- */
-MarkerManager.prototype.objectSetTimeout_ = function (object, command, milliseconds) {
- return window.setTimeout(function () {
- command.call(object);
- }, milliseconds);
-};
-
-
-/**
- * Is this layer visible?
- *
- * Returns visibility setting
- *
- * @return {Boolean} Visible
- */
-MarkerManager.prototype.visible = function () {
- return this.show_ ? true : false;
-};
-
-
-/**
- * Returns true if the manager is hidden.
- * Otherwise returns false.
- * @return {Boolean} Hidden
- */
-MarkerManager.prototype.isHidden = function () {
- return !this.show_;
-};
-
-
-/**
- * Shows the manager if it's currently hidden.
- */
-MarkerManager.prototype.show = function () {
- this.show_ = true;
- this.refresh();
-};
-
-
-/**
- * Hides the manager if it's currently visible
- */
-MarkerManager.prototype.hide = function () {
- this.show_ = false;
- this.refresh();
-};
-
-
-/**
- * Toggles the visibility of the manager.
- */
-MarkerManager.prototype.toggle = function () {
- this.show_ = !this.show_;
- this.refresh();
-};
-
-
-/**
- * Refresh forces the marker-manager into a good state.
- * <ol>
- * <li>If never before initialized, shows all the markers.</li>
- * <li>If previously initialized, removes and re-adds all markers.</li>
- * </ol>
- */
-MarkerManager.prototype.refresh = function () {
- if (this.shownMarkers_ > 0) {
- this.processAll_(this.shownBounds_, this.removeOverlay_);
- }
- // An extra check on this.show_ to increase performance (no need to processAll_)
- if (this.show_) {
- this.processAll_(this.shownBounds_, this.addOverlay_);
- }
- this.notifyListeners_();
-};
-
-
-/**
- * After the viewport may have changed, add or remove markers as needed.
- */
-MarkerManager.prototype.updateMarkers_ = function () {
- this.mapZoom_ = this.map_.getZoom();
- var newBounds = this.getMapGridBounds_();
-
- // If the move does not include new grid sections,
- // we have no work to do:
- if (newBounds.equals(this.shownBounds_) && newBounds.z === this.shownBounds_.z) {
- return;
- }
-
- if (newBounds.z !== this.shownBounds_.z) {
- this.processAll_(this.shownBounds_, this.removeOverlay_);
- if (this.show_) { // performance
- this.processAll_(newBounds, this.addOverlay_);
- }
- } else {
- // Remove markers:
- this.rectangleDiff_(this.shownBounds_, newBounds, this.removeCellMarkers_);
-
- // Add markers:
- if (this.show_) { // performance
- this.rectangleDiff_(newBounds, this.shownBounds_, this.addCellMarkers_);
- }
- }
- this.shownBounds_ = newBounds;
-
- this.notifyListeners_();
-};
-
-
-/**
- * Notify listeners when the state of what is displayed changes.
- */
-MarkerManager.prototype.notifyListeners_ = function () {
- google.maps.event.trigger(this, 'changed', this.shownBounds_, this.shownMarkers_);
-};
-
-
-/**
- * Process all markers in the bounds provided, using a callback.
- *
- * @param {Bounds} bounds The bounds in grid space.
- * @param {Function} callback The function to call for each marker.
- */
-MarkerManager.prototype.processAll_ = function (bounds, callback) {
- for (var x = bounds.minX; x <= bounds.maxX; x++) {
- for (var y = bounds.minY; y <= bounds.maxY; y++) {
- this.processCellMarkers_(x, y, bounds.z, callback);
- }
- }
-};
-
-
-/**
- * Process all markers in the grid cell, using a callback.
- *
- * @param {Number} x The x coordinate of the cell.
- * @param {Number} y The y coordinate of the cell.
- * @param {Number} z The z coordinate of the cell.
- * @param {Function} callback The function to call for each marker.
- */
-MarkerManager.prototype.processCellMarkers_ = function (x, y, z, callback) {
- var cell = this.getGridCellNoCreate_(x, y, z);
- if (cell) {
- for (var i = cell.length - 1; i >= 0; i--) {
- callback(cell[i]);
- }
- }
-};
-
-
-/**
- * Remove all markers in a grid cell.
- *
- * @param {Number} x The x coordinate of the cell.
- * @param {Number} y The y coordinate of the cell.
- * @param {Number} z The z coordinate of the cell.
- */
-MarkerManager.prototype.removeCellMarkers_ = function (x, y, z) {
- this.processCellMarkers_(x, y, z, this.removeOverlay_);
-};
-
-
-/**
- * Add all markers in a grid cell.
- *
- * @param {Number} x The x coordinate of the cell.
- * @param {Number} y The y coordinate of the cell.
- * @param {Number} z The z coordinate of the cell.
- */
-MarkerManager.prototype.addCellMarkers_ = function (x, y, z) {
- this.processCellMarkers_(x, y, z, this.addOverlay_);
-};
-
-
-/**
- * Use the rectangleDiffCoords_ function to process all grid cells
- * that are in bounds1 but not bounds2, using a callback, and using
- * the current MarkerManager object as the instance.
- *
- * Pass the z parameter to the callback in addition to x and y.
- *
- * @param {Bounds} bounds1 The bounds of all points we may process.
- * @param {Bounds} bounds2 The bounds of points to exclude.
- * @param {Function} callback The callback function to call
- * for each grid coordinate (x, y, z).
- */
-MarkerManager.prototype.rectangleDiff_ = function (bounds1, bounds2, callback) {
- var me = this;
- me.rectangleDiffCoords_(bounds1, bounds2, function (x, y) {
- callback.apply(me, [x, y, bounds1.z]);
- });
-};
-
-
-/**
- * Calls the function for all points in bounds1, not in bounds2
- *
- * @param {Bounds} bounds1 The bounds of all points we may process.
- * @param {Bounds} bounds2 The bounds of points to exclude.
- * @param {Function} callback The callback function to call
- * for each grid coordinate.
- */
-MarkerManager.prototype.rectangleDiffCoords_ = function (bounds1, bounds2, callback) {
- var minX1 = bounds1.minX;
- var minY1 = bounds1.minY;
- var maxX1 = bounds1.maxX;
- var maxY1 = bounds1.maxY;
- var minX2 = bounds2.minX;
- var minY2 = bounds2.minY;
- var maxX2 = bounds2.maxX;
- var maxY2 = bounds2.maxY;
-
- var x, y;
- for (x = minX1; x <= maxX1; x++) { // All x in R1
- // All above:
- for (y = minY1; y <= maxY1 && y < minY2; y++) { // y in R1 above R2
- callback(x, y);
- }
- // All below:
- for (y = Math.max(maxY2 + 1, minY1); // y in R1 below R2
- y <= maxY1; y++) {
- callback(x, y);
- }
- }
-
- for (y = Math.max(minY1, minY2);
- y <= Math.min(maxY1, maxY2); y++) { // All y in R2 and in R1
- // Strictly left:
- for (x = Math.min(maxX1 + 1, minX2) - 1;
- x >= minX1; x--) { // x in R1 left of R2
- callback(x, y);
- }
- // Strictly right:
- for (x = Math.max(minX1, maxX2 + 1); // x in R1 right of R2
- x <= maxX1; x++) {
- callback(x, y);
- }
- }
-};
-
-
-/**
- * Removes value from array. O(N).
- *
- * @param {Array} array The array to modify.
- * @param {any} value The value to remove.
- * @param {Boolean} opt_notype Flag to disable type checking in equality.
- * @return {Number} The number of instances of value that were removed.
- */
-MarkerManager.prototype.removeFromArray_ = function (array, value, opt_notype) {
- var shift = 0;
- for (var i = 0; i < array.length; ++i) {
- if (array[i] === value || (opt_notype && array[i] === value)) {
- array.splice(i--, 1);
- shift++;
- }
- }
- return shift;
-};
-
-
-
-
-
-
-
-/**
-* Projection overlay helper. Helps in calculating
-* that markers get into the right grid.
-* @constructor
-* @param {Map} map The map to manage.
-**/
-function ProjectionHelperOverlay(map) {
-
- this.setMap(map);
-
- var TILEFACTOR = 8;
- var TILESIDE = 1 << TILEFACTOR;
- var RADIUS = 7;
-
- this._map = map;
- this._zoom = -1;
- this._X0 =
- this._Y0 =
- this._X1 =
- this._Y1 = -1;
-
-
-}
-if (typeof(google) != 'undefined' && google.maps) { // make sure it exists -- amalo
-ProjectionHelperOverlay.prototype = new google.maps.OverlayView();
-}
-
-/**
- * Helper function to convert Lng to X
- * @private
- * @param {float} lng
- **/
-ProjectionHelperOverlay.prototype.LngToX_ = function (lng) {
- return (1 + lng / 180);
-};
-
-/**
- * Helper function to convert Lat to Y
- * @private
- * @param {float} lat
- **/
-ProjectionHelperOverlay.prototype.LatToY_ = function (lat) {
- var sinofphi = Math.sin(lat * Math.PI / 180);
- return (1 - 0.5 / Math.PI * Math.log((1 + sinofphi) / (1 - sinofphi)));
-};
-
-/**
-* Old school LatLngToPixel
-* @param {LatLng} latlng google.maps.LatLng object
-* @param {Number} zoom Zoom level
-* @return {position} {x: pixelPositionX, y: pixelPositionY}
-**/
-ProjectionHelperOverlay.prototype.LatLngToPixel = function (latlng, zoom) {
- var map = this._map;
- var div = this.getProjection().fromLatLngToDivPixel(latlng);
- var abs = {x: ~~(0.5 + this.LngToX_(latlng.lng()) * (2 << (zoom + 6))), y: ~~(0.5 + this.LatToY_(latlng.lat()) * (2 << (zoom + 6)))};
- return abs;
-};
-
-
-/**
- * Draw function only triggers a ready event for
- * MarkerManager to know projection can proceed to
- * initialize.
- */
-ProjectionHelperOverlay.prototype.draw = function () {
- if (!this.ready) {
- this.ready = true;
- google.maps.event.trigger(this, 'ready');
- }
-};
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/write.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/write.py
deleted file mode 100644
index a55f226e245..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/bench/write.py
+++ /dev/null
@@ -1,347 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-r"""
-=========================
- Write benchmark results
-=========================
-
-Write benchmark results.
-
-:Copyright:
-
- Copyright 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-Usage::
-
- python -mbench.write [-p plain] [-t table] <pickled
-
- -p plain Plain file to write to (like docs/BENCHMARKS).
- -t table Table file to write to (like docs/_userdoc/benchmark.txt).
-
-"""
-if __doc__:
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
-__docformat__ = "restructuredtext en"
-__license__ = "Apache License, Version 2.0"
-__version__ = "1.0.0"
-
-import os as _os
-import re as _re
-import sys as _sys
-
-
-try:
- unicode
-except NameError:
- def uni(v):
- if hasattr(v, 'decode'):
- return v.decode('latin-1')
- return str(v)
-else:
- def uni(v):
- if isinstance(v, unicode):
- return v.encode('utf-8')
- return str(v)
-
-
-def write_table(filename, results):
- """
- Output tabled benchmark results
-
- :Parameters:
- `filename` : ``str``
- Filename to write to
-
- `results` : ``list``
- Results
- """
- try:
- next
- except NameError:
- next = lambda i: (getattr(i, 'next', None) or i.__next__)()
- try:
- cmp
- except NameError:
- cmp = lambda a, b: (a > b) - (a < b)
-
- names = [
- ('simple_port', 'Simple Port'),
- ('jsmin_2_0_9', 'jsmin 2.0.9'),
- ('slimit_0_8_1', 'slimit 0.8.1'),
- ('slimit_0_8_1_mangle', 'slimit 0.8.1 (mangle)'),
- ('rjsmin', '|rjsmin|'),
- ('_rjsmin', r'_\ |rjsmin|'),
- ]
- benched_per_table = 2
-
- results = sorted(results, reverse=True)
-
- # First we transform our data into a table (list of lists)
- pythons, widths = [], [0] * (benched_per_table + 1)
- last_version = None
- for version, _, result in results:
- version = uni(version)
- if not(last_version is None or version.startswith('2.')):
- continue
- last_version = version
-
- namesub = _re.compile(r'(?:-\d+(?:\.\d+)*)?\.js$').sub
- result = iter(result)
- tables = []
-
- # given our data it's easier to create the table transposed...
- for benched in result:
- rows = [['Name'] + [desc for _, desc in names]]
- for _ in range(benched_per_table):
- if _:
- try:
- benched = next(result)
- except StopIteration:
- rows.append([''] + ['' for _ in names])
- continue
-
- times = dict((
- uni(port), (time, benched['sizes'][idx])
- ) for idx, (port, time) in enumerate(benched['times']))
- columns = ['%s (%.1f)' % (
- namesub('', _os.path.basename(uni(benched['filename']))),
- benched['size'] / 1024.0,
- )]
- for idx, (port, _) in enumerate(names):
- if port not in times:
- columns.append('n/a')
- continue
- time, size = times[port]
- if time is None:
- columns.append('(failed)')
- continue
- columns.append('%s%.2f ms (%.1f %s)' % (
- idx == 0 and ' ' or '',
- time,
- size / 1024.0,
- idx == 0 and '\\*' or ['=', '>', '<'][
- cmp(size, benched['sizes'][0])
- ],
- ))
- rows.append(columns)
-
- # calculate column widths (global for all tables)
- for idx, row in enumerate(rows):
- widths[idx] = max(widths[idx], max(map(len, row)))
-
- # ... and transpose it back.
- tables.append(zip(*rows))
- pythons.append((version, tables))
-
- if last_version.startswith('2.'):
- break
-
- # Second we create a rest table from it
- lines = []
- separator = lambda c='-': '+'.join([''] + [
- c * (width + 2) for width in widths
- ] + [''])
-
- for idx, (version, tables) in enumerate(pythons):
- if idx:
- lines.append('')
- lines.append('')
-
- line = 'Python %s' % (version,)
- lines.append(line)
- lines.append('~' * len(line))
-
- for table in tables:
- lines.append('')
- lines.append('.. rst-class:: benchmark')
- lines.append('')
-
- for idx, row in enumerate(table):
- if idx == 0:
- # header
- lines.append(separator())
- lines.append('|'.join([''] + [
- ' %s%*s ' % (col, len(col) - width, '')
- for width, col in zip(widths, row)
- ] + ['']))
- lines.append(separator('='))
- else: # data
- lines.append('|'.join([''] + [
- j == 0 and (
- ' %s%*s ' % (col, len(col) - widths[j], '')
- ) or (
- ['%*s ', ' %*s '][idx == 1] % (widths[j], col)
- )
- for j, col in enumerate(row)
- ] + ['']))
- lines.append(separator())
-
- fplines = []
- fp = open(filename)
- try:
- fpiter = iter(fp)
- for line in fpiter:
- line = line.rstrip()
- if line == '.. begin tables':
- buf = []
- for line in fpiter:
- line = line.rstrip()
- if line == '.. end tables':
- fplines.append('.. begin tables')
- fplines.append('')
- fplines.extend(lines)
- fplines.append('')
- fplines.append('.. end tables')
- buf = []
- break
- else:
- buf.append(line)
- else:
- fplines.extend(buf)
- _sys.stderr.write("Placeholder container not found!\n")
- else:
- fplines.append(line)
- finally:
- fp.close()
-
- fp = open(filename, 'w')
- try:
- fp.write('\n'.join(fplines) + '\n')
- finally:
- fp.close()
-
-
-def write_plain(filename, results):
- """
- Output plain benchmark results
-
- :Parameters:
- `filename` : ``str``
- Filename to write to
-
- `results` : ``list``
- Results
- """
- lines = []
- results = sorted(results, reverse=True)
- for idx, (version, import_notes, result) in enumerate(results):
- if idx:
- lines.append('')
- lines.append('')
-
- lines.append('$ python%s -OO bench/main.py bench/*.js' % (
- '.'.join(version.split('.')[:2])
- ))
- lines.append('~' * 72)
- for note in import_notes:
- lines.append(uni(note))
- lines.append('Python Release: %s' % (version,))
-
- for single in result:
- lines.append('')
- lines.append('Benchmarking %r... (%.1f KiB)' % (
- uni(single['filename']), single['size'] / 1024.0
- ))
- for msg in single['messages']:
- lines.append(msg)
- times = []
- space = max([len(uni(port)) for port, _ in single['times']])
- for idx, (port, time) in enumerate(single['times']):
- port = uni(port)
- if time is None:
- lines.append(" FAILED %s" % (port,))
- else:
- times.append(time)
- lines.append(
- " Timing %s%s ... (%5.1f KiB %s) %8.2f ms" % (
- port,
- " " * (space - len(port)),
- single['sizes'][idx] / 1024.0,
- idx == 0 and '*' or ['=', '>', '<'][
- cmp(single['sizes'][idx], single['sizes'][0])
- ],
- time
- )
- )
- if len(times) > 1:
- lines[-1] += " (factor: %s)" % (', '.join([
- '%.2f' % (timed / time) for timed in times[:-1]
- ]))
-
- lines.append('')
- lines.append('')
- lines.append('# vim: nowrap')
- fp = open(filename, 'w')
- try:
- fp.write('\n'.join(lines) + '\n')
- finally:
- fp.close()
-
-
-def main(argv=None):
- """ Main """
- import getopt as _getopt
- import pickle as _pickle
-
- if argv is None:
- argv = _sys.argv[1:]
- try:
- opts, args = _getopt.getopt(argv, "hp:t:", ["help"])
- except getopt.GetoptError:
- e = _sys.exc_info()[0](_sys.exc_info()[1])
- print >> _sys.stderr, "%s\nTry %s -mbench.write --help" % (
- e,
- _os.path.basename(_sys.executable),
- )
- _sys.exit(2)
-
- plain, table = None, None
- for key, value in opts:
- if key in ("-h", "--help"):
- print >> _sys.stderr, (
- "%s -mbench.write [-p plain] [-t table] <pickled" % (
- _os.path.basename(_sys.executable),
- )
- )
- _sys.exit(0)
- elif key == '-p':
- plain = str(value)
- elif key == '-t':
- table = str(value)
-
- struct = []
- _sys.stdin = getattr(_sys.stdin, 'detach', lambda: _sys.stdin)()
- try:
- while True:
- version, import_notes, result = _pickle.load(_sys.stdin)
- if hasattr(version, 'decode'):
- version = version.decode('latin-1')
- struct.append((version, import_notes, result))
- except EOFError:
- pass
-
- if plain:
- write_plain(plain, struct)
-
- if table:
- write_table(table, struct)
-
-
-if __name__ == '__main__':
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/BENCHMARKS b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/BENCHMARKS
deleted file mode 100644
index f6ab429e648..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/BENCHMARKS
+++ /dev/null
@@ -1,388 +0,0 @@
-$ python3.4 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.4.0
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2083.14 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 2439.38 ms (factor: 0.85)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (951.5 KiB =) 56.03 ms (factor: 37.18, 43.54)
- Timing _rjsmin ... (951.5 KiB =) 2.11 ms (factor: 987.34, 1156.19, 26.56)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 90.13 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 38.70 ms (factor: 2.33)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 26.4 KiB >) 13.78 ms (factor: 6.54, 2.81)
- Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 526.72, 226.19, 80.51)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 468.94 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 251.12 ms (factor: 1.87)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (135.9 KiB =) 95.54 ms (factor: 4.91, 2.63)
- Timing _rjsmin ... (135.9 KiB =) 1.12 ms (factor: 420.55, 225.20, 85.68)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 83.92 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 42.35 ms (factor: 1.98)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 38.6 KiB >) 2.87 ms (factor: 29.21, 14.74)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 895.82, 452.10, 30.66)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 44.58 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 19.18 ms (factor: 2.32)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 149.82 ms (factor: 0.30, 0.13)
- Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 174.04 ms (factor: 0.26, 0.11, 0.86)
- Timing rjsmin ... ( 11.6 KiB =) 5.88 ms (factor: 7.59, 3.26, 25.50, 29.62)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 565.73, 243.38, 1901.13, 2208.49, 74.56)
-
-
-$ python3.3 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.3.3
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2805.14 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 2741.73 ms (factor: 1.02)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (951.5 KiB =) 75.86 ms (factor: 36.98, 36.14)
- Timing _rjsmin ... (951.5 KiB =) 2.14 ms (factor: 1309.39, 1279.78, 35.41)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 112.96 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 48.69 ms (factor: 2.32)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 26.4 KiB >) 18.50 ms (factor: 6.11, 2.63)
- Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 629.94, 271.54, 103.15)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 596.73 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 309.95 ms (factor: 1.93)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (135.9 KiB =) 127.05 ms (factor: 4.70, 2.44)
- Timing _rjsmin ... (135.9 KiB =) 1.14 ms (factor: 524.99, 272.68, 111.77)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 110.93 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 50.83 ms (factor: 2.18)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 38.6 KiB >) 4.20 ms (factor: 26.40, 12.10)
- Timing _rjsmin ... ( 38.6 KiB >) 0.10 ms (factor: 1131.98, 518.66, 42.88)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 56.39 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 24.10 ms (factor: 2.34)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 159.78 ms (factor: 0.35, 0.15)
- Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 186.04 ms (factor: 0.30, 0.13, 0.86)
- Timing rjsmin ... ( 11.6 KiB =) 8.30 ms (factor: 6.80, 2.90, 19.26, 22.42)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 684.74, 292.67, 1940.24, 2259.20, 100.76)
-
-
-$ python3.2 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.2.5
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2372.53 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 8911.83 ms (factor: 0.27)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (951.5 KiB =) 68.91 ms (factor: 34.43, 129.32)
- Timing _rjsmin ... (951.5 KiB =) 1.96 ms (factor: 1208.26, 4538.54, 35.10)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 97.80 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 44.32 ms (factor: 2.21)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 26.4 KiB >) 17.00 ms (factor: 5.75, 2.61)
- Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 561.85, 254.60, 97.65)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 517.50 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 411.85 ms (factor: 1.26)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (135.9 KiB =) 117.36 ms (factor: 4.41, 3.51)
- Timing _rjsmin ... (135.9 KiB =) 1.11 ms (factor: 464.76, 369.88, 105.40)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 95.02 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 48.91 ms (factor: 1.94)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 38.6 KiB >) 3.85 ms (factor: 24.69, 12.71)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1088.37, 560.23, 44.08)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 48.13 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 20.64 ms (factor: 2.33)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 150.11 ms (factor: 0.32, 0.14)
- Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 177.11 ms (factor: 0.27, 0.12, 0.85)
- Timing rjsmin ... ( 11.6 KiB =) 7.37 ms (factor: 6.53, 2.80, 20.35, 24.02)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 606.20, 259.99, 1890.49, 2230.53, 92.88)
-
-
-$ python3.1 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 3.1.5
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2418.96 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 4455.01 ms (factor: 0.54)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (951.5 KiB =) 61.65 ms (factor: 39.24, 72.26)
- Timing _rjsmin ... (951.5 KiB =) 1.89 ms (factor: 1277.38, 2352.56, 32.56)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 102.87 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 50.26 ms (factor: 2.05)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 26.4 KiB >) 15.10 ms (factor: 6.81, 3.33)
- Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 583.83, 285.25, 85.68)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 540.63 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 349.77 ms (factor: 1.55)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (135.9 KiB =) 105.46 ms (factor: 5.13, 3.32)
- Timing _rjsmin ... (135.9 KiB =) 1.09 ms (factor: 494.63, 320.01, 96.49)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 96.75 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 53.25 ms (factor: 1.82)
- FAILED slimit_0_8_1
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 38.6 KiB >) 3.43 ms (factor: 28.22, 15.53)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1096.85, 603.67, 38.86)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 50.98 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 26.19 ms (factor: 1.95)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 137.84 ms (factor: 0.37, 0.19)
- Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 159.43 ms (factor: 0.32, 0.16, 0.86)
- Timing rjsmin ... ( 11.6 KiB =) 6.47 ms (factor: 7.88, 4.05, 21.29, 24.63)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 659.94, 338.97, 1784.33, 2063.88, 83.80)
-
-
-$ python3.0 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-slimit_0_8_1 not installed for python 3.0...
-Python Release: 3.0.1
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 6725.57 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 8824.69 ms (factor: 0.76)
- Timing rjsmin ... (951.5 KiB =) 60.97 ms (factor: 110.31, 144.74)
- Timing _rjsmin ... (951.5 KiB =) 1.93 ms (factor: 3489.97, 4579.23, 31.64)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 294.93 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 238.16 ms (factor: 1.24)
- Timing rjsmin ... ( 26.4 KiB >) 15.68 ms (factor: 18.81, 15.19)
- Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 1767.00, 1426.89, 93.93)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 1495.38 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 1315.18 ms (factor: 1.14)
- Timing rjsmin ... (135.9 KiB =) 108.75 ms (factor: 13.75, 12.09)
- Timing _rjsmin ... (135.9 KiB =) 1.08 ms (factor: 1381.18, 1214.74, 100.44)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 273.43 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 223.27 ms (factor: 1.22)
- Timing rjsmin ... ( 38.6 KiB >) 3.40 ms (factor: 80.39, 65.64)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 3093.63, 2526.05, 38.48)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 157.33 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 130.73 ms (factor: 1.20)
- Timing rjsmin ... ( 11.6 KiB =) 6.71 ms (factor: 23.44, 19.47)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 2046.53, 1700.44, 87.32)
-
-
-$ python2.7 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 2.7.5
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2960.91 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 3087.26 ms (factor: 0.96)
- Timing slimit_0_8_1 ... (944.3 KiB <) 13520.48 ms (factor: 0.22, 0.23)
- Timing slimit_0_8_1_mangle ... (922.9 KiB <) 16463.29 ms (factor: 0.18, 0.19, 0.82)
- Timing rjsmin ... (951.5 KiB =) 60.45 ms (factor: 48.98, 51.07, 223.66, 272.35)
- Timing _rjsmin ... (951.5 KiB =) 1.92 ms (factor: 1544.14, 1610.04, 7051.08, 8585.79, 31.53)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 118.82 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 60.82 ms (factor: 1.95)
- Timing slimit_0_8_1 ... ( 26.5 KiB >) 379.62 ms (factor: 0.31, 0.16)
- Timing slimit_0_8_1_mangle ... ( 22.2 KiB <) 404.06 ms (factor: 0.29, 0.15, 0.94)
- Timing rjsmin ... ( 26.4 KiB >) 15.94 ms (factor: 7.45, 3.81, 23.81, 25.34)
- Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 674.14, 345.09, 2153.87, 2292.52, 90.46)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 624.62 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 370.86 ms (factor: 1.68)
- Timing slimit_0_8_1 ... (134.0 KiB <) 1800.29 ms (factor: 0.35, 0.21)
- Timing slimit_0_8_1_mangle ... ( 95.0 KiB <) 2129.26 ms (factor: 0.29, 0.17, 0.85)
- Timing rjsmin ... (135.9 KiB =) 113.71 ms (factor: 5.49, 3.26, 15.83, 18.73)
- Timing _rjsmin ... (135.9 KiB =) 1.12 ms (factor: 559.59, 332.25, 1612.87, 1907.59, 101.87)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 118.56 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 67.29 ms (factor: 1.76)
- Timing slimit_0_8_1 ... ( 39.0 KiB >) 703.96 ms (factor: 0.17, 0.10)
- Timing slimit_0_8_1_mangle ... ( 38.9 KiB >) 844.49 ms (factor: 0.14, 0.08, 0.83)
- Timing rjsmin ... ( 38.6 KiB >) 3.38 ms (factor: 35.11, 19.93, 208.47, 250.09)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1288.21, 731.08, 7648.52, 9175.39, 36.69)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 59.09 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 30.78 ms (factor: 1.92)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 145.18 ms (factor: 0.41, 0.21)
- Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 164.81 ms (factor: 0.36, 0.19, 0.88)
- Timing rjsmin ... ( 11.6 KiB =) 6.94 ms (factor: 8.51, 4.43, 20.91, 23.74)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 725.97, 378.16, 1783.50, 2024.64, 85.28)
-
-
-$ python2.6 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 2.6.8
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2666.59 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 2628.62 ms (factor: 1.01)
- Timing slimit_0_8_1 ... (944.3 KiB <) 13410.38 ms (factor: 0.20, 0.20)
- Timing slimit_0_8_1_mangle ... (922.9 KiB <) 16661.34 ms (factor: 0.16, 0.16, 0.80)
- Timing rjsmin ... (951.5 KiB =) 62.67 ms (factor: 42.55, 41.94, 213.97, 265.84)
- Timing _rjsmin ... (951.5 KiB =) 1.92 ms (factor: 1387.91, 1368.15, 6979.86, 8671.93, 32.62)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 109.21 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 49.00 ms (factor: 2.23)
- Timing slimit_0_8_1 ... ( 26.5 KiB >) 380.13 ms (factor: 0.29, 0.13)
- Timing slimit_0_8_1_mangle ... ( 22.2 KiB <) 409.65 ms (factor: 0.27, 0.12, 0.93)
- Timing rjsmin ... ( 26.4 KiB >) 16.14 ms (factor: 6.77, 3.04, 23.55, 25.38)
- Timing _rjsmin ... ( 26.4 KiB >) 0.18 ms (factor: 621.09, 278.66, 2161.76, 2329.63, 91.80)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 569.29 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 303.84 ms (factor: 1.87)
- Timing slimit_0_8_1 ... (134.0 KiB <) 1775.18 ms (factor: 0.32, 0.17)
- Timing slimit_0_8_1_mangle ... ( 95.0 KiB <) 2175.70 ms (factor: 0.26, 0.14, 0.82)
- Timing rjsmin ... (135.9 KiB =) 114.20 ms (factor: 4.98, 2.66, 15.54, 19.05)
- Timing _rjsmin ... (135.9 KiB =) 1.14 ms (factor: 498.07, 265.83, 1553.12, 1903.54, 99.92)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 106.63 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 52.70 ms (factor: 2.02)
- Timing slimit_0_8_1 ... ( 39.0 KiB >) 698.62 ms (factor: 0.15, 0.08)
- Timing slimit_0_8_1_mangle ... ( 38.9 KiB >) 865.02 ms (factor: 0.12, 0.06, 0.81)
- Timing rjsmin ... ( 38.6 KiB >) 3.57 ms (factor: 29.90, 14.78, 195.88, 242.54)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1160.17, 573.35, 7601.29, 9411.79, 38.81)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 54.44 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 25.41 ms (factor: 2.14)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 137.57 ms (factor: 0.40, 0.18)
- Timing slimit_0_8_1_mangle ... ( 9.3 KiB <) 172.31 ms (factor: 0.32, 0.15, 0.80)
- Timing rjsmin ... ( 11.6 KiB =) 6.93 ms (factor: 7.86, 3.67, 19.86, 24.87)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 671.23, 313.25, 1696.29, 2124.63, 85.42)
-
-
-$ python2.5 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Python Release: 2.5.6
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2702.99 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 2716.83 ms (factor: 0.99)
- Timing slimit_0_8_1 ... (944.3 KiB <) 14369.86 ms (factor: 0.19, 0.19)
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (951.5 KiB =) 57.95 ms (factor: 46.64, 46.88, 247.96)
- Timing _rjsmin ... (951.5 KiB =) 1.87 ms (factor: 1443.98, 1451.38, 7676.63, 30.96)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 109.86 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 51.67 ms (factor: 2.13)
- Timing slimit_0_8_1 ... ( 26.5 KiB >) 364.04 ms (factor: 0.30, 0.14)
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 26.4 KiB >) 15.45 ms (factor: 7.11, 3.34, 23.57)
- Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 652.77, 306.98, 2163.04, 91.78)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 571.75 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 320.28 ms (factor: 1.79)
- Timing slimit_0_8_1 ... (134.0 KiB <) 1744.62 ms (factor: 0.33, 0.18)
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... (135.9 KiB =) 108.43 ms (factor: 5.27, 2.95, 16.09)
- Timing _rjsmin ... (135.9 KiB =) 1.11 ms (factor: 514.49, 288.20, 1569.90, 97.57)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 107.76 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 56.06 ms (factor: 1.92)
- Timing slimit_0_8_1 ... ( 39.0 KiB >) 685.51 ms (factor: 0.16, 0.08)
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 38.6 KiB >) 3.34 ms (factor: 32.24, 16.77, 205.10)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1218.61, 633.96, 7752.04, 37.80)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 54.28 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 26.70 ms (factor: 2.03)
- Timing slimit_0_8_1 ... ( 11.5 KiB <) 142.60 ms (factor: 0.38, 0.19)
- FAILED slimit_0_8_1_mangle
- Timing rjsmin ... ( 11.6 KiB =) 6.66 ms (factor: 8.15, 4.01, 21.40)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 684.64, 336.80, 1798.82, 84.04)
-
-
-$ python2.4 -OO bench/main.py bench/*.js
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-slimit_0_8_1 not installed for python 2.4...
-Python Release: 2.4.6
-
-Benchmarking 'bench/apiviewer.js'... (953.2 KiB)
- Timing simple_port ... (951.5 KiB *) 2683.16 ms
- Timing jsmin_2_0_9 ... (951.5 KiB >) 2613.60 ms (factor: 1.03)
- Timing rjsmin ... (951.5 KiB =) 59.43 ms (factor: 45.15, 43.98)
- Timing _rjsmin ... (951.5 KiB =) 1.90 ms (factor: 1413.59, 1376.94, 31.31)
-
-Benchmarking 'bench/bootstrap.js'... (49.0 KiB)
- Timing simple_port ... ( 26.4 KiB *) 111.40 ms
- Timing jsmin_2_0_9 ... ( 26.4 KiB >) 48.93 ms (factor: 2.28)
- Timing rjsmin ... ( 26.4 KiB >) 15.83 ms (factor: 7.04, 3.09)
- Timing _rjsmin ... ( 26.4 KiB >) 0.17 ms (factor: 657.59, 288.82, 93.41)
-
-Benchmarking 'bench/jquery-1.7.1.js'... (242.4 KiB)
- Timing simple_port ... (135.9 KiB *) 579.89 ms
- Timing jsmin_2_0_9 ... (136.8 KiB >) 302.57 ms (factor: 1.92)
- Timing rjsmin ... (135.9 KiB =) 108.56 ms (factor: 5.34, 2.79)
- Timing _rjsmin ... (135.9 KiB =) 1.08 ms (factor: 539.43, 281.45, 100.98)
-
-Benchmarking 'bench/knockout-2.0.0.js'... (38.9 KiB)
- Timing simple_port ... ( 38.6 KiB *) 107.04 ms
- Timing jsmin_2_0_9 ... ( 38.6 KiB >) 52.66 ms (factor: 2.03)
- Timing rjsmin ... ( 38.6 KiB >) 3.26 ms (factor: 32.88, 16.18)
- Timing _rjsmin ... ( 38.6 KiB >) 0.09 ms (factor: 1211.21, 595.89, 36.83)
-
-Benchmarking 'bench/markermanager.js'... (28.6 KiB)
- Timing simple_port ... ( 11.6 KiB *) 55.65 ms
- Timing jsmin_2_0_9 ... ( 11.6 KiB >) 25.33 ms (factor: 2.20)
- Timing rjsmin ... ( 11.6 KiB =) 6.62 ms (factor: 8.41, 3.83)
- Timing _rjsmin ... ( 11.6 KiB =) 0.08 ms (factor: 711.59, 323.87, 84.60)
-
-
-# vim: nowrap
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CHANGES b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CHANGES
deleted file mode 100644
index e40b765234a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CHANGES
+++ /dev/null
@@ -1,89 +0,0 @@
-Changes with version 1.0.10
-
- *) Added support for pypy 2.2
-
- *) Relint with newer pylint
-
- *) Fix locale problem with the setup script on python3.
- Submitted by https://github.com/svenstaro
-
-
-Changes with version 1.0.9
-
- *) Documentation and benchmark updates
-
-
-Changes with version 1.0.8
-
- *) Updated benchmarks
-
- *) Added command line option for keeping comments starting with an exclamation
- mark (-b)
-
- *) Added command line option for disabling the C implemention (-p)
-
- *) Added support for python 3.4
-
- *) Added support for keeping comments starting with an exclamation mark. This
- feature can be enabled by passing keep_bang_comments=True to the jsmin
- function.
-
-
-Changes with version 1.0.7
-
- *) Fix inconsistency between Python and C (Python implementation was buggy).
- Spotted by: Dave Smith <dave thesmithfam.org>
-
- *) Added support for jython 2.7
-
-
-Changes with version 1.0.6
-
- *) Added compat option to setup.py supporting the pip installer
-
- *) Added support for pypy (1.9, 2.0)
-
- *) Added support for jython (2.5)
-
-
-Changes with version 1.0.5
-
- *) Newline removal before ! operator was made more sensible.
-
-
-Changes with version 1.0.4
-
- *) Added support for Python 3.3
-
- *) Collapsion protection was reduced to "+ +" and "- -" sequences (which
- still includes longer sequences like "+ ++")
-
-
-Changes with version 1.0.3
-
- *) "+ ++" and "- --" sequences are no longer collapsed. They were before,
- because the original jsmin collapsed them, too.
-
- *) Updated benchmarks, added slimit and removed jsmin v8 (because it produced
- invalid results).
-
- *) Removed "classic" regex variant.
-
-
-Changes with version 1.0.2
-
- *) Although it should work, python 2.3 is no longer supported.
- (No suitable test environment)
-
- *) "return /regex/" is now recognized as regex expression. It wasn't before,
- because the original jsmin ignored that, too.
-
-
-Changes with version 1.0.1
-
- *) Add C extension reimplementing the regex from rjsmin.py
-
-
-Changes with version 1.0.0
-
- *) First stable release.
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CLASSIFIERS b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CLASSIFIERS
deleted file mode 100644
index 10d59650380..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/CLASSIFIERS
+++ /dev/null
@@ -1,19 +0,0 @@
-Development Status :: 5 - Production/Stable
-Environment :: Web Environment
-Intended Audience :: Developers
-License :: OSI Approved
-License :: OSI Approved :: Apache License, Version 2.0
-Operating System :: OS Independent
-Programming Language :: C
-Programming Language :: Python
-Programming Language :: Python :: 2
-Programming Language :: Python :: 3
-Programming Language :: Python :: Implementation :: CPython
-Programming Language :: Python :: Implementation :: Jython
-Programming Language :: Python :: Implementation :: PyPy
-Topic :: Internet :: WWW/HTTP :: Dynamic Content
-Topic :: Software Development :: Libraries
-Topic :: Software Development :: Libraries :: Python Modules
-Topic :: Text Processing
-Topic :: Text Processing :: Filters
-Topic :: Utilities
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/DESCRIPTION b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/DESCRIPTION
deleted file mode 100644
index ceef827edd1..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/DESCRIPTION
+++ /dev/null
@@ -1,72 +0,0 @@
-=====================
- Javascript Minifier
-=====================
-
-rJSmin is a javascript minifier written in python.
-
-The minifier is based on the semantics of `jsmin.c by Douglas Crockford`_\.
-
-The module is a re-implementation aiming for speed, so it can be used at
-runtime (rather than during a preprocessing step). Usually it produces the
-same results as the original ``jsmin.c``. It differs in the following ways:
-
-- there is no error detection: unterminated string, regex and comment
- literals are treated as regular javascript code and minified as such.
-- Control characters inside string and regex literals are left untouched; they
- are not converted to spaces (nor to \n)
-- Newline characters are not allowed inside string and regex literals, except
- for line continuations in string literals (ECMA-5).
-- "return /regex/" is recognized correctly.
-- "+ +" and "- -" sequences are not collapsed to '++' or '--'
-- Newlines before ! operators are removed more sensibly
-- Comments starting with an exclamation mark (``!``) can be kept optionally
-- rJSmin does not handle streams, but only complete strings. (However, the
- module provides a "streamy" interface).
-
-Since most parts of the logic are handled by the regex engine it's way faster
-than the original python port of ``jsmin.c`` by Baruch Even. The speed factor
-varies between about 6 and 55 depending on input and python version (it gets
-faster the more compressed the input already is). Compared to the
-speed-refactored python port by Dave St.Germain the performance gain is less
-dramatic but still between 3 and 50 (for huge inputs)). See the
-docs/BENCHMARKS file for details.
-
-rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.
-
-Both python 2 (>=2.4) and python 3 are supported.
-
-.. _jsmin.c by Douglas Crockford: http://www.crockford.com/javascript/jsmin.c
-
-
-Copyright and License
-~~~~~~~~~~~~~~~~~~~~~
-
-Copyright 2011 - 2014
-André Malo or his licensors, as applicable.
-
-The whole package (except for the files in the bench/ directory) is
-distributed under the Apache License Version 2.0. You'll find a copy in the
-root directory of the distribution or online at:
-<http://www.apache.org/licenses/LICENSE-2.0>.
-
-
-Bugs
-~~~~
-
-No bugs, of course. ;-)
-But if you've found one or have an idea how to improve rjsmin, feel free
-to send a pull request on `github <https://github.com/ndparker/rjsmin>`_
-or send a mail to <rjsmin-bugs@perlig.de>.
-
-
-Author Information
-~~~~~~~~~~~~~~~~~~
-
-André "nd" Malo <nd perlig.de>
-GPG: 0x8103A37E
-
-
- If God intended people to be naked, they would be born that way.
- -- Oscar Wilde
-
-.. vim:tw=72 syntax=rest
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/PROVIDES b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/PROVIDES
deleted file mode 100644
index 8e9e6633191..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/PROVIDES
+++ /dev/null
@@ -1 +0,0 @@
-rjsmin (1.0)
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/SUMMARY b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/SUMMARY
deleted file mode 100644
index 52064ce19c4..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/SUMMARY
+++ /dev/null
@@ -1 +0,0 @@
-Javascript Minifier
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/api-objects.txt b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/api-objects.txt
deleted file mode 100644
index e5f2e820866..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/api-objects.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-rjsmin rjsmin-module.html
-rjsmin.__license__ rjsmin-module.html#__license__
-rjsmin.jsmin rjsmin-module.html#jsmin
-rjsmin.__package__ rjsmin-module.html#__package__
-rjsmin._make_jsmin rjsmin-module.html#_make_jsmin
-rjsmin.jsmin_for_posers rjsmin-module.html#jsmin_for_posers
-rjsmin.__doc__ rjsmin-module.html#__doc__
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/crarr.png b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/crarr.png
deleted file mode 100644
index 26b43c52433..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/crarr.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.css b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.css
deleted file mode 100644
index 86d41706824..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.css
+++ /dev/null
@@ -1,322 +0,0 @@
-
-
-/* Epydoc CSS Stylesheet
- *
- * This stylesheet can be used to customize the appearance of epydoc's
- * HTML output.
- *
- */
-
-/* Default Colors & Styles
- * - Set the default foreground & background color with 'body'; and
- * link colors with 'a:link' and 'a:visited'.
- * - Use bold for decision list terms.
- * - The heading styles defined here are used for headings *within*
- * docstring descriptions. All headings used by epydoc itself use
- * either class='epydoc' or class='toc' (CSS styles for both
- * defined below).
- */
-body { background: #ffffff; color: #000000; }
-p { margin-top: 0.5em; margin-bottom: 0.5em; }
-a:link { color: #0000ff; }
-a:visited { color: #204080; }
-dt { font-weight: bold; }
-h1 { font-size: +140%; font-style: italic;
- font-weight: bold; }
-h2 { font-size: +125%; font-style: italic;
- font-weight: bold; }
-h3 { font-size: +110%; font-style: italic;
- font-weight: normal; }
-code { font-size: 100%; }
-/* N.B.: class, not pseudoclass */
-a.link { font-family: monospace; }
-
-/* Page Header & Footer
- * - The standard page header consists of a navigation bar (with
- * pointers to standard pages such as 'home' and 'trees'); a
- * breadcrumbs list, which can be used to navigate to containing
- * classes or modules; options links, to show/hide private
- * variables and to show/hide frames; and a page title (using
- * <h1>). The page title may be followed by a link to the
- * corresponding source code (using 'span.codelink').
- * - The footer consists of a navigation bar, a timestamp, and a
- * pointer to epydoc's homepage.
- */
-h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
-h2.epydoc { font-size: +130%; font-weight: bold; }
-h3.epydoc { font-size: +115%; font-weight: bold;
- margin-top: 0.2em; }
-td h3.epydoc { font-size: +115%; font-weight: bold;
- margin-bottom: 0; }
-table.navbar { background: #a0c0ff; color: #000000;
- border: 2px groove #c0d0d0; }
-table.navbar table { color: #000000; }
-th.navbar-select { background: #70b0ff;
- color: #000000; }
-table.navbar a { text-decoration: none; }
-table.navbar a:link { color: #0000ff; }
-table.navbar a:visited { color: #204080; }
-span.breadcrumbs { font-size: 85%; font-weight: bold; }
-span.options { font-size: 70%; }
-span.codelink { font-size: 85%; }
-td.footer { font-size: 85%; }
-
-/* Table Headers
- * - Each summary table and details section begins with a 'header'
- * row. This row contains a section title (marked by
- * 'span.table-header') as well as a show/hide private link
- * (marked by 'span.options', defined above).
- * - Summary tables that contain user-defined groups mark those
- * groups using 'group header' rows.
- */
-td.table-header { background: #70b0ff; color: #000000;
- border: 1px solid #608090; }
-td.table-header table { color: #000000; }
-td.table-header table a:link { color: #0000ff; }
-td.table-header table a:visited { color: #204080; }
-span.table-header { font-size: 120%; font-weight: bold; }
-th.group-header { background: #c0e0f8; color: #000000;
- text-align: left; font-style: italic;
- font-size: 115%;
- border: 1px solid #608090; }
-
-/* Summary Tables (functions, variables, etc)
- * - Each object is described by a single row of the table with
- * two cells. The left cell gives the object's type, and is
- * marked with 'code.summary-type'. The right cell gives the
- * object's name and a summary description.
- * - CSS styles for the table's header and group headers are
- * defined above, under 'Table Headers'
- */
-table.summary { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090;
- margin-bottom: 0.5em; }
-td.summary { border: 1px solid #608090; }
-code.summary-type { font-size: 85%; }
-table.summary a:link { color: #0000ff; }
-table.summary a:visited { color: #204080; }
-
-
-/* Details Tables (functions, variables, etc)
- * - Each object is described in its own div.
- * - A single-row summary table w/ table-header is used as
- * a header for each details section (CSS style for table-header
- * is defined above, under 'Table Headers').
- */
-table.details { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090;
- margin: .2em 0 0 0; }
-table.details table { color: #000000; }
-table.details a:link { color: #0000ff; }
-table.details a:visited { color: #204080; }
-
-/* Fields */
-dl.fields { margin-left: 2em; margin-top: 1em;
- margin-bottom: 1em; }
-dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
-dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
-div.fields { margin-left: 2em; }
-div.fields p { margin-bottom: 0.5em; }
-
-/* Index tables (identifier index, term index, etc)
- * - link-index is used for indices containing lists of links
- * (namely, the identifier index & term index).
- * - index-where is used in link indices for the text indicating
- * the container/source for each link.
- * - metadata-index is used for indices containing metadata
- * extracted from fields (namely, the bug index & todo index).
- */
-table.link-index { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090; }
-td.link-index { border-width: 0px; }
-table.link-index a:link { color: #0000ff; }
-table.link-index a:visited { color: #204080; }
-span.index-where { font-size: 70%; }
-table.metadata-index { border-collapse: collapse;
- background: #e8f0f8; color: #000000;
- border: 1px solid #608090;
- margin: .2em 0 0 0; }
-td.metadata-index { border-width: 1px; border-style: solid; }
-table.metadata-index a:link { color: #0000ff; }
-table.metadata-index a:visited { color: #204080; }
-
-/* Function signatures
- * - sig* is used for the signature in the details section.
- * - .summary-sig* is used for the signature in the summary
- * table, and when listing property accessor functions.
- * */
-.sig-name { color: #006080; }
-.sig-arg { color: #008060; }
-.sig-default { color: #602000; }
-.summary-sig { font-family: monospace; }
-.summary-sig-name { color: #006080; font-weight: bold; }
-table.summary a.summary-sig-name:link
- { color: #006080; font-weight: bold; }
-table.summary a.summary-sig-name:visited
- { color: #006080; font-weight: bold; }
-.summary-sig-arg { color: #006040; }
-.summary-sig-default { color: #501800; }
-
-/* Subclass list
- */
-ul.subclass-list { display: inline; }
-ul.subclass-list li { display: inline; }
-
-/* To render variables, classes etc. like functions */
-table.summary .summary-name { color: #006080; font-weight: bold;
- font-family: monospace; }
-table.summary
- a.summary-name:link { color: #006080; font-weight: bold;
- font-family: monospace; }
-table.summary
- a.summary-name:visited { color: #006080; font-weight: bold;
- font-family: monospace; }
-
-/* Variable values
- * - In the 'variable details' sections, each varaible's value is
- * listed in a 'pre.variable' box. The width of this box is
- * restricted to 80 chars; if the value's repr is longer than
- * this it will be wrapped, using a backslash marked with
- * class 'variable-linewrap'. If the value's repr is longer
- * than 3 lines, the rest will be ellided; and an ellipsis
- * marker ('...' marked with 'variable-ellipsis') will be used.
- * - If the value is a string, its quote marks will be marked
- * with 'variable-quote'.
- * - If the variable is a regexp, it is syntax-highlighted using
- * the re* CSS classes.
- */
-pre.variable { padding: .5em; margin: 0;
- background: #dce4ec; color: #000000;
- border: 1px solid #708890; }
-.variable-linewrap { color: #604000; font-weight: bold; }
-.variable-ellipsis { color: #604000; font-weight: bold; }
-.variable-quote { color: #604000; font-weight: bold; }
-.variable-group { color: #008000; font-weight: bold; }
-.variable-op { color: #604000; font-weight: bold; }
-.variable-string { color: #006030; }
-.variable-unknown { color: #a00000; font-weight: bold; }
-.re { color: #000000; }
-.re-char { color: #006030; }
-.re-op { color: #600000; }
-.re-group { color: #003060; }
-.re-ref { color: #404040; }
-
-/* Base tree
- * - Used by class pages to display the base class hierarchy.
- */
-pre.base-tree { font-size: 80%; margin: 0; }
-
-/* Frames-based table of contents headers
- * - Consists of two frames: one for selecting modules; and
- * the other listing the contents of the selected module.
- * - h1.toc is used for each frame's heading
- * - h2.toc is used for subheadings within each frame.
- */
-h1.toc { text-align: center; font-size: 105%;
- margin: 0; font-weight: bold;
- padding: 0; }
-h2.toc { font-size: 100%; font-weight: bold;
- margin: 0.5em 0 0 -0.3em; }
-
-/* Syntax Highlighting for Source Code
- * - doctest examples are displayed in a 'pre.py-doctest' block.
- * If the example is in a details table entry, then it will use
- * the colors specified by the 'table pre.py-doctest' line.
- * - Source code listings are displayed in a 'pre.py-src' block.
- * Each line is marked with 'span.py-line' (used to draw a line
- * down the left margin, separating the code from the line
- * numbers). Line numbers are displayed with 'span.py-lineno'.
- * The expand/collapse block toggle button is displayed with
- * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
- * modify the font size of the text.)
- * - If a source code page is opened with an anchor, then the
- * corresponding code block will be highlighted. The code
- * block's header is highlighted with 'py-highlight-hdr'; and
- * the code block's body is highlighted with 'py-highlight'.
- * - The remaining py-* classes are used to perform syntax
- * highlighting (py-string for string literals, py-name for names,
- * etc.)
- */
-pre.py-doctest { padding: .5em; margin: 1em;
- background: #e8f0f8; color: #000000;
- border: 1px solid #708890; }
-table pre.py-doctest { background: #dce4ec;
- color: #000000; }
-pre.py-src { border: 2px solid #000000;
- background: #f0f0f0; color: #000000; }
-.py-line { border-left: 2px solid #000000;
- margin-left: .2em; padding-left: .4em; }
-.py-lineno { font-style: italic; font-size: 90%;
- padding-left: .5em; }
-a.py-toggle { text-decoration: none; }
-div.py-highlight-hdr { border-top: 2px solid #000000;
- border-bottom: 2px solid #000000;
- background: #d8e8e8; }
-div.py-highlight { border-bottom: 2px solid #000000;
- background: #d0e0e0; }
-.py-prompt { color: #005050; font-weight: bold;}
-.py-more { color: #005050; font-weight: bold;}
-.py-string { color: #006030; }
-.py-comment { color: #003060; }
-.py-keyword { color: #600000; }
-.py-output { color: #404040; }
-.py-name { color: #000050; }
-.py-name:link { color: #000050 !important; }
-.py-name:visited { color: #000050 !important; }
-.py-number { color: #005000; }
-.py-defname { color: #000060; font-weight: bold; }
-.py-def-name { color: #000060; font-weight: bold; }
-.py-base-class { color: #000060; }
-.py-param { color: #000060; }
-.py-docstring { color: #006030; }
-.py-decorator { color: #804020; }
-/* Use this if you don't want links to names underlined: */
-/*a.py-name { text-decoration: none; }*/
-
-/* Graphs & Diagrams
- * - These CSS styles are used for graphs & diagrams generated using
- * Graphviz dot. 'img.graph-without-title' is used for bare
- * diagrams (to remove the border created by making the image
- * clickable).
- */
-img.graph-without-title { border: none; }
-img.graph-with-title { border: 1px solid #000000; }
-span.graph-title { font-weight: bold; }
-span.graph-caption { }
-
-/* General-purpose classes
- * - 'p.indent-wrapped-lines' defines a paragraph whose first line
- * is not indented, but whose subsequent lines are.
- * - The 'nomargin-top' class is used to remove the top margin (e.g.
- * from lists). The 'nomargin' class is used to remove both the
- * top and bottom margin (but not the left or right margin --
- * for lists, that would cause the bullets to disappear.)
- */
-p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
- margin: 0; }
-.nomargin-top { margin-top: 0; }
-.nomargin { margin-top: 0; margin-bottom: 0; }
-
-/* HTML Log */
-div.log-block { padding: 0; margin: .5em 0 .5em 0;
- background: #e8f0f8; color: #000000;
- border: 1px solid #000000; }
-div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
- background: #ffb0b0; color: #000000;
- border: 1px solid #000000; }
-div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
- background: #ffffb0; color: #000000;
- border: 1px solid #000000; }
-div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
- background: #b0ffb0; color: #000000;
- border: 1px solid #000000; }
-h2.log-hdr { background: #70b0ff; color: #000000;
- margin: 0; padding: 0em 0.5em 0em 0.5em;
- border-bottom: 1px solid #000000; font-size: 110%; }
-p.log { font-weight: bold; margin: .5em 0 .5em 0; }
-tr.opt-changed { color: #000000; font-weight: bold; }
-tr.opt-default { color: #606060; }
-pre.log { margin: 0; padding: 0; padding-left: 1em; }
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.js b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.js
deleted file mode 100644
index e787dbcf471..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/epydoc.js
+++ /dev/null
@@ -1,293 +0,0 @@
-function toggle_private() {
- // Search for any private/public links on this page. Store
- // their old text in "cmd," so we will know what action to
- // take; and change their text to the opposite action.
- var cmd = "?";
- var elts = document.getElementsByTagName("a");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "privatelink") {
- cmd = elts[i].innerHTML;
- elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
- "hide&nbsp;private":"show&nbsp;private");
- }
- }
- // Update all DIVs containing private objects.
- var elts = document.getElementsByTagName("div");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
- }
- else if (elts[i].className == "public") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
- }
- }
- // Update all table rows containing private objects. Note, we
- // use "" instead of "block" becaue IE & firefox disagree on what
- // this should be (block vs table-row), and "" just gives the
- // default for both browsers.
- var elts = document.getElementsByTagName("tr");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
- }
- }
- // Update all list items containing private objects.
- var elts = document.getElementsByTagName("li");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
- "none":"");
- }
- }
- // Update all list items containing private objects.
- var elts = document.getElementsByTagName("ul");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "private") {
- elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
- }
- }
- // Set a cookie to remember the current option.
- document.cookie = "EpydocPrivate="+cmd;
- }
-function show_private() {
- var elts = document.getElementsByTagName("a");
- for(var i=0; i<elts.length; i++) {
- if (elts[i].className == "privatelink") {
- cmd = elts[i].innerHTML;
- if (cmd && cmd.substr(0,4)=="show")
- toggle_private();
- }
- }
- }
-function getCookie(name) {
- var dc = document.cookie;
- var prefix = name + "=";
- var begin = dc.indexOf("; " + prefix);
- if (begin == -1) {
- begin = dc.indexOf(prefix);
- if (begin != 0) return null;
- } else
- { begin += 2; }
- var end = document.cookie.indexOf(";", begin);
- if (end == -1)
- { end = dc.length; }
- return unescape(dc.substring(begin + prefix.length, end));
- }
-function setFrame(url1, url2) {
- parent.frames[1].location.href = url1;
- parent.frames[2].location.href = url2;
- }
-function checkCookie() {
- var cmd=getCookie("EpydocPrivate");
- if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
- toggle_private();
- }
-function toggleCallGraph(id) {
- var elt = document.getElementById(id);
- if (elt.style.display == "none")
- elt.style.display = "block";
- else
- elt.style.display = "none";
- }
-function expand(id) {
- var elt = document.getElementById(id+"-expanded");
- if (elt) elt.style.display = "block";
- var elt = document.getElementById(id+"-expanded-linenums");
- if (elt) elt.style.display = "block";
- var elt = document.getElementById(id+"-collapsed");
- if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
- var elt = document.getElementById(id+"-collapsed-linenums");
- if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
- var elt = document.getElementById(id+"-toggle");
- if (elt) { elt.innerHTML = "-"; }
-}
-
-function collapse(id) {
- var elt = document.getElementById(id+"-expanded");
- if (elt) elt.style.display = "none";
- var elt = document.getElementById(id+"-expanded-linenums");
- if (elt) elt.style.display = "none";
- var elt = document.getElementById(id+"-collapsed-linenums");
- if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
- var elt = document.getElementById(id+"-toggle");
- if (elt) { elt.innerHTML = "+"; }
- var elt = document.getElementById(id+"-collapsed");
- if (elt) {
- elt.style.display = "block";
-
- var indent = elt.getAttribute("indent");
- var pad = elt.getAttribute("pad");
- var s = "<tt class='py-lineno'>";
- for (var i=0; i<pad.length; i++) { s += "&nbsp;" }
- s += "</tt>";
- s += "&nbsp;&nbsp;<tt class='py-line'>";
- for (var i=0; i<indent.length; i++) { s += "&nbsp;" }
- s += "<a href='#' onclick='expand(\"" + id;
- s += "\");return false'>...</a></tt><br />";
- elt.innerHTML = s;
- }
-}
-
-function toggle(id) {
- elt = document.getElementById(id+"-toggle");
- if (elt.innerHTML == "-")
- collapse(id);
- else
- expand(id);
- return false;
-}
-
-function highlight(id) {
- var elt = document.getElementById(id+"-def");
- if (elt) elt.className = "py-highlight-hdr";
- var elt = document.getElementById(id+"-expanded");
- if (elt) elt.className = "py-highlight";
- var elt = document.getElementById(id+"-collapsed");
- if (elt) elt.className = "py-highlight";
-}
-
-function num_lines(s) {
- var n = 1;
- var pos = s.indexOf("\n");
- while ( pos > 0) {
- n += 1;
- pos = s.indexOf("\n", pos+1);
- }
- return n;
-}
-
-// Collapse all blocks that mave more than `min_lines` lines.
-function collapse_all(min_lines) {
- var elts = document.getElementsByTagName("div");
- for (var i=0; i<elts.length; i++) {
- var elt = elts[i];
- var split = elt.id.indexOf("-");
- if (split > 0)
- if (elt.id.substring(split, elt.id.length) == "-expanded")
- if (num_lines(elt.innerHTML) > min_lines)
- collapse(elt.id.substring(0, split));
- }
-}
-
-function expandto(href) {
- var start = href.indexOf("#")+1;
- if (start != 0 && start != href.length) {
- if (href.substring(start, href.length) != "-") {
- collapse_all(4);
- pos = href.indexOf(".", start);
- while (pos != -1) {
- var id = href.substring(start, pos);
- expand(id);
- pos = href.indexOf(".", pos+1);
- }
- var id = href.substring(start, href.length);
- expand(id);
- highlight(id);
- }
- }
-}
-
-function kill_doclink(id) {
- var parent = document.getElementById(id);
- parent.removeChild(parent.childNodes.item(0));
-}
-function auto_kill_doclink(ev) {
- if (!ev) var ev = window.event;
- if (!this.contains(ev.toElement)) {
- var parent = document.getElementById(this.parentID);
- parent.removeChild(parent.childNodes.item(0));
- }
-}
-
-function doclink(id, name, targets_id) {
- var elt = document.getElementById(id);
-
- // If we already opened the box, then destroy it.
- // (This case should never occur, but leave it in just in case.)
- if (elt.childNodes.length > 1) {
- elt.removeChild(elt.childNodes.item(0));
- }
- else {
- // The outer box: relative + inline positioning.
- var box1 = document.createElement("div");
- box1.style.position = "relative";
- box1.style.display = "inline";
- box1.style.top = 0;
- box1.style.left = 0;
-
- // A shadow for fun
- var shadow = document.createElement("div");
- shadow.style.position = "absolute";
- shadow.style.left = "-1.3em";
- shadow.style.top = "-1.3em";
- shadow.style.background = "#404040";
-
- // The inner box: absolute positioning.
- var box2 = document.createElement("div");
- box2.style.position = "relative";
- box2.style.border = "1px solid #a0a0a0";
- box2.style.left = "-.2em";
- box2.style.top = "-.2em";
- box2.style.background = "white";
- box2.style.padding = ".3em .4em .3em .4em";
- box2.style.fontStyle = "normal";
- box2.onmouseout=auto_kill_doclink;
- box2.parentID = id;
-
- // Get the targets
- var targets_elt = document.getElementById(targets_id);
- var targets = targets_elt.getAttribute("targets");
- var links = "";
- target_list = targets.split(",");
- for (var i=0; i<target_list.length; i++) {
- var target = target_list[i].split("=");
- links += "<li><a href='" + target[1] +
- "' style='text-decoration:none'>" +
- target[0] + "</a></li>";
- }
-
- // Put it all together.
- elt.insertBefore(box1, elt.childNodes.item(0));
- //box1.appendChild(box2);
- box1.appendChild(shadow);
- shadow.appendChild(box2);
- box2.innerHTML =
- "Which <b>"+name+"</b> do you want to see documentation for?" +
- "<ul style='margin-bottom: 0;'>" +
- links +
- "<li><a href='#' style='text-decoration:none' " +
- "onclick='kill_doclink(\""+id+"\");return false;'>"+
- "<i>None of the above</i></a></li></ul>";
- }
- return false;
-}
-
-function get_anchor() {
- var href = location.href;
- var start = href.indexOf("#")+1;
- if ((start != 0) && (start != href.length))
- return href.substring(start, href.length);
- }
-function redirect_url(dottedName) {
- // Scan through each element of the "pages" list, and check
- // if "name" matches with any of them.
- for (var i=0; i<pages.length; i++) {
-
- // Each page has the form "<pagename>-m" or "<pagename>-c";
- // extract the <pagename> portion & compare it to dottedName.
- var pagename = pages[i].substring(0, pages[i].length-2);
- if (pagename == dottedName.substring(0,pagename.length)) {
-
- // We've found a page that matches `dottedName`;
- // construct its URL, using leftover `dottedName`
- // content to form an anchor.
- var pagetype = pages[i].charAt(pages[i].length-1);
- var url = pagename + ((pagetype=="m")?"-module.html":
- "-class.html");
- if (dottedName.length > pagename.length)
- url += "#" + dottedName.substring(pagename.length+1,
- dottedName.length);
- return url;
- }
- }
- }
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/help.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/help.html
deleted file mode 100644
index 729bb89a415..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/help.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Help</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rjsmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">&nbsp;</td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-
-<h1 class="epydoc"> API Documentation </h1>
-
-<p> This document contains the API (Application Programming Interface)
-documentation for this project. Documentation for the Python
-objects defined by the project is divided into separate pages for each
-package, module, and class. The API documentation also includes two
-pages containing information about the project as a whole: a trees
-page, and an index page. </p>
-
-<h2> Object Documentation </h2>
-
- <p>Each <strong>Package Documentation</strong> page contains: </p>
- <ul>
- <li> A description of the package. </li>
- <li> A list of the modules and sub-packages contained by the
- package. </li>
- <li> A summary of the classes defined by the package. </li>
- <li> A summary of the functions defined by the package. </li>
- <li> A summary of the variables defined by the package. </li>
- <li> A detailed description of each function defined by the
- package. </li>
- <li> A detailed description of each variable defined by the
- package. </li>
- </ul>
-
- <p>Each <strong>Module Documentation</strong> page contains:</p>
- <ul>
- <li> A description of the module. </li>
- <li> A summary of the classes defined by the module. </li>
- <li> A summary of the functions defined by the module. </li>
- <li> A summary of the variables defined by the module. </li>
- <li> A detailed description of each function defined by the
- module. </li>
- <li> A detailed description of each variable defined by the
- module. </li>
- </ul>
-
- <p>Each <strong>Class Documentation</strong> page contains: </p>
- <ul>
- <li> A class inheritance diagram. </li>
- <li> A list of known subclasses. </li>
- <li> A description of the class. </li>
- <li> A summary of the methods defined by the class. </li>
- <li> A summary of the instance variables defined by the class. </li>
- <li> A summary of the class (static) variables defined by the
- class. </li>
- <li> A detailed description of each method defined by the
- class. </li>
- <li> A detailed description of each instance variable defined by the
- class. </li>
- <li> A detailed description of each class (static) variable defined
- by the class. </li>
- </ul>
-
-<h2> Project Documentation </h2>
-
- <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
- <ul>
- <li> The <em>module hierarchy</em> lists every package and module, with
- modules grouped into packages. At the top level, and within each
- package, modules and sub-packages are listed alphabetically. </li>
- <li> The <em>class hierarchy</em> lists every class, grouped by base
- class. If a class has more than one base class, then it will be
- listed under each base class. At the top level, and under each base
- class, classes are listed alphabetically. </li>
- </ul>
-
- <p> The <strong>Index</strong> page contains indices of terms and
- identifiers: </p>
- <ul>
- <li> The <em>term index</em> lists every term indexed by any object's
- documentation. For each term, the index provides links to each
- place where the term is indexed. </li>
- <li> The <em>identifier index</em> lists the (short) name of every package,
- module, class, method, function, variable, and parameter. For each
- identifier, the index provides a short description, and a link to
- its documentation. </li>
- </ul>
-
-<h2> The Table of Contents </h2>
-
-<p> The table of contents occupies the two frames on the left side of
-the window. The upper-left frame displays the <em>project
-contents</em>, and the lower-left frame displays the <em>module
-contents</em>: </p>
-
-<table class="help summary" border="1" cellspacing="0" cellpadding="3">
- <tr style="height: 30%">
- <td align="center" style="font-size: small">
- Project<br />Contents<hr />...</td>
- <td align="center" style="font-size: small" rowspan="2" width="70%">
- API<br />Documentation<br />Frame<br /><br /><br />
- </td>
- </tr>
- <tr>
- <td align="center" style="font-size: small">
- Module<br />Contents<hr />&nbsp;<br />...<br />&nbsp;
- </td>
- </tr>
-</table><br />
-
-<p> The <strong>project contents frame</strong> contains a list of all packages
-and modules that are defined by the project. Clicking on an entry
-will display its contents in the module contents frame. Clicking on a
-special entry, labeled "Everything," will display the contents of
-the entire project. </p>
-
-<p> The <strong>module contents frame</strong> contains a list of every
-submodule, class, type, exception, function, and variable defined by a
-module or package. Clicking on an entry will display its
-documentation in the API documentation frame. Clicking on the name of
-the module, at the top of the frame, will display the documentation
-for the module itself. </p>
-
-<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
-navigation bar can be used to control whether the table of contents is
-displayed or not. </p>
-
-<h2> The Navigation Bar </h2>
-
-<p> A navigation bar is located at the top and bottom of every page.
-It indicates what type of page you are currently viewing, and allows
-you to go to related pages. The following table describes the labels
-on the navigation bar. Note that not some labels (such as
-[Parent]) are not displayed on all pages. </p>
-
-<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
-<tr class="summary">
- <th>Label</th>
- <th>Highlighted when...</th>
- <th>Links to...</th>
-</tr>
- <tr><td valign="top"><strong>[Parent]</strong></td>
- <td valign="top"><em>(never highlighted)</em></td>
- <td valign="top"> the parent of the current package </td></tr>
- <tr><td valign="top"><strong>[Package]</strong></td>
- <td valign="top">viewing a package</td>
- <td valign="top">the package containing the current object
- </td></tr>
- <tr><td valign="top"><strong>[Module]</strong></td>
- <td valign="top">viewing a module</td>
- <td valign="top">the module containing the current object
- </td></tr>
- <tr><td valign="top"><strong>[Class]</strong></td>
- <td valign="top">viewing a class </td>
- <td valign="top">the class containing the current object</td></tr>
- <tr><td valign="top"><strong>[Trees]</strong></td>
- <td valign="top">viewing the trees page</td>
- <td valign="top"> the trees page </td></tr>
- <tr><td valign="top"><strong>[Index]</strong></td>
- <td valign="top">viewing the index page</td>
- <td valign="top"> the index page </td></tr>
- <tr><td valign="top"><strong>[Help]</strong></td>
- <td valign="top">viewing the help page</td>
- <td valign="top"> the help page </td></tr>
-</table>
-
-<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
-the top navigation bar can be used to control whether documentation
-for private objects is displayed. Private objects are usually defined
-as objects whose (short) names begin with a single underscore, but do
-not end with an underscore. For example, "<code>_x</code>",
-"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
-are private objects; but "<code>re.sub</code>",
-"<code>__init__</code>", and "<code>type_</code>" are not. However,
-if a module defines the "<code>__all__</code>" variable, then its
-contents are used to decide which objects are private. </p>
-
-<p> A timestamp below the bottom navigation bar indicates when each
-page was last updated. </p>
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rjsmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/identifier-index.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/identifier-index.html
deleted file mode 100644
index 37b4b984d89..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/identifier-index.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Identifier Index</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rjsmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">&nbsp;</td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<table border="0" width="100%">
-<tr valign="bottom"><td>
-<h1 class="epydoc">Identifier Index</h1>
-</td><td>
-[
- A
- B
- C
- D
- E
- F
- G
- H
- I
- <a href="#J">J</a>
- K
- L
- M
- N
- O
- P
- Q
- <a href="#R">R</a>
- S
- T
- U
- V
- W
- X
- Y
- Z
- <a href="#_">_</a>
-]
-</td></table>
-<table border="0" width="100%">
-<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="J">J</a></h2></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="rjsmin-module.html#jsmin">jsmin()</a><br />
-<span class="index-where">(in&nbsp;<a href="rjsmin-module.html">rjsmin</a>)</span></td>
-<td width="33%" class="link-index">&nbsp;</td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="rjsmin-module.html">rjsmin</a></td>
-<td width="33%" class="link-index">&nbsp;</td>
-<td width="33%" class="link-index">&nbsp;</td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
-<td valign="top">
-<table class="link-index" width="100%" border="1">
-<tr>
-<td width="33%" class="link-index"><a href="rjsmin-module.html#__doc__">__doc__</a><br />
-<span class="index-where">(in&nbsp;<a href="rjsmin-module.html">rjsmin</a>)</span></td>
-<td width="33%" class="link-index"><a href="rjsmin-module.html#__license__">__license__</a><br />
-<span class="index-where">(in&nbsp;<a href="rjsmin-module.html">rjsmin</a>)</span></td>
-<td width="33%" class="link-index"><a href="rjsmin-module.html#__package__">__package__</a><br />
-<span class="index-where">(in&nbsp;<a href="rjsmin-module.html">rjsmin</a>)</span></td>
-</tr>
-<tr><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td><td class="link-index">&nbsp;</td></tr>
-</table>
-</td></tr>
-</table>
-<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rjsmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Indices&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/index.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/index.html
deleted file mode 100644
index 70f36d3efa7..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/index.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>rjsmin</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- Module&nbsp;rjsmin
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module rjsmin</h1><p class="nomargin-top"><span class="codelink"><a href="rjsmin-pysrc.html">source&nbsp;code</a></span></p>
-<p>rJSmin is a javascript minifier written in python.</p>
-<p>The minifier is based on the semantics of <a class="rst-reference external" href="http://www.crockford.com/javascript/jsmin.c" target="_top">jsmin.c by Douglas Crockford</a>.</p>
-<p>The module is a re-implementation aiming for speed, so it can be used at
-runtime (rather than during a preprocessing step). Usually it produces the
-same results as the original <tt class="rst-docutils literal">jsmin.c</tt>. It differs in the following ways:</p>
-<ul class="rst-simple">
-<li>there is no error detection: unterminated string, regex and comment
-literals are treated as regular javascript code and minified as such.</li>
-<li>Control characters inside string and regex literals are left untouched; they
-are not converted to spaces (nor to n)</li>
-<li>Newline characters are not allowed inside string and regex literals, except
-for line continuations in string literals (ECMA-5).</li>
-<li>&quot;return /regex/&quot; is recognized correctly.</li>
-<li>&quot;+ +&quot; and &quot;- -&quot; sequences are not collapsed to '++' or '--'</li>
-<li>Newlines before ! operators are removed more sensibly</li>
-<li>Comments starting with an exclamation mark (<tt class="rst-docutils literal">!</tt>) can be kept optionally</li>
-<li>rJSmin does not handle streams, but only complete strings. (However, the
-module provides a &quot;streamy&quot; interface).</li>
-</ul>
-<p>Since most parts of the logic are handled by the regex engine it's way faster
-than the original python port of <tt class="rst-docutils literal">jsmin.c</tt> by Baruch Even. The speed factor
-varies between about 6 and 55 depending on input and python version (it gets
-faster the more compressed the input already is). Compared to the
-speed-refactored python port by Dave St.Germain the performance gain is less
-dramatic but still between 3 and 50 (for huge inputs). See the docs/BENCHMARKS
-file for details.</p>
-<p>rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.</p>
-<p>Both python 2 and python 3 are supported.</p>
-
-<hr />
-<div class="fields"> <p><strong>Copyright:</strong>
- Copyright 2011 - 2014
-Andr&#233; Malo or his licensors, as applicable
- </p>
- <p><strong>License:</strong>
- <p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at</p>
-<blockquote>
-<a class="rst-reference external" href="http://www.apache.org/licenses/LICENSE-2.0" target="_top">http://www.apache.org/licenses/LICENSE-2.0</a></blockquote>
-<p>Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an &quot;AS IS&quot; 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.</p>
- </p>
- <p><strong>Version:</strong>
- 1.0.10
- </p>
- <p><strong>Author:</strong>
- Andr&#233; Malo
- </p>
-</div><!-- ==================== FUNCTIONS ==================== -->
-<a name="section-Functions"></a>
-<table class="summary" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Functions</span></td>
-</tr>
-<tr>
- <td width="15%" align="right" valign="top" class="summary">
- <span class="summary-type"><tt class="rst-docutils literal">str</tt></span>
- </td><td class="summary">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td><span class="summary-sig"><a href="rjsmin-module.html#jsmin" class="summary-sig-name">jsmin</a>(<span class="summary-sig-arg">script</span>,
- <span class="summary-sig-arg">keep_bang_comments</span>=<span class="summary-sig-default">False</span>)</span><br />
- Minify javascript based on <a class="rst-reference external" href="http://www.crockford.com/javascript/jsmin.c" target="_top">jsmin.c by Douglas Crockford</a>.</td>
- <td align="right" valign="top">
-
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table>
-<!-- ==================== FUNCTION DETAILS ==================== -->
-<a name="section-FunctionDetails"></a>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Function Details</span></td>
-</tr>
-</table>
-<a name="jsmin"></a>
-<div>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr valign="top"><td>
- <h3 class="epydoc"><span class="sig"><span class="sig-name">jsmin</span>(<span class="sig-arg">script</span>,
- <span class="sig-arg">keep_bang_comments</span>=<span class="sig-default">False</span>)</span>
- </h3>
- </td><td align="right" valign="top"
- >&nbsp;
- </td>
- </tr></table>
-
- <p>Minify javascript based on <a class="rst-reference external" href="http://www.crockford.com/javascript/jsmin.c" target="_top">jsmin.c by Douglas Crockford</a>.</p>
-<p>Instead of parsing the stream char by char, it uses a regular
-expression approach which minifies the whole script with one big
-substitution regex.</p>
- <dl class="fields">
- <dt>Parameters:</dt>
- <dd><ul class="nomargin-top">
- <li><strong class="pname"><code>script</code></strong> (<tt class="rst-docutils literal">str</tt>) - Script to minify</li>
- <li><strong class="pname"><code>keep_bang_comments</code></strong> (<tt class="rst-docutils literal">bool</tt>) - Keep comments starting with an exclamation mark? (<tt class="rst-docutils literal"><span class="pre">/*!...*/</span></tt>)</li>
- </ul></dd>
- <dt>Returns: <tt class="rst-docutils literal">str</tt></dt>
- <dd>Minified script</dd>
- </dl>
-<div class="fields"> <p><strong>Note:</strong>
- This is a hand crafted C implementation built on the regex
-semantics.
- </p>
-</div></td></tr></table>
-</div>
-<br />
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/module-tree.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/module-tree.html
deleted file mode 100644
index d89305d211c..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/module-tree.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Module Hierarchy</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rjsmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">&nbsp;</td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<h1 class="epydoc">Module Hierarchy</h1>
-<ul class="nomargin-top">
- <li> <strong class="uidlink"><a href="rjsmin-module.html">rjsmin</a></strong>: <em class="summary">rJSmin is a javascript minifier written in python.</em> </li>
-</ul>
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="rjsmin-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/redirect.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/redirect.html
deleted file mode 100644
index 50aee0e9f95..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/redirect.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<html><head><title>Epydoc Redirect Page</title>
-<meta http-equiv="cache-control" content="no-cache" />
-<meta http-equiv="expires" content="0" />
-<meta http-equiv="pragma" content="no-cache" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-<body>
-<script type="text/javascript">
-<!--
-var pages = ["rjsmin-m"];
-var dottedName = get_anchor();
-if (dottedName) {
- var target = redirect_url(dottedName);
- if (target) window.location.replace(target);
-}
-// -->
-</script>
-
-<h3>Epydoc Auto-redirect page</h3>
-
-<p>When javascript is enabled, this page will redirect URLs of
-the form <tt>redirect.html#<i>dotted.name</i></tt> to the
-documentation for the object with the given fully-qualified
-dotted name.</p>
-<p><a id="message"> &nbsp; </a></p>
-
-<script type="text/javascript">
-<!--
-if (dottedName) {
- var msg = document.getElementById("message");
- msg.innerHTML = "No documentation found for <tt>"+
- dottedName+"</tt>";
-}
-// -->
-</script>
-
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-module.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-module.html
deleted file mode 100644
index 70f36d3efa7..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-module.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>rjsmin</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- Module&nbsp;rjsmin
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<!-- ==================== MODULE DESCRIPTION ==================== -->
-<h1 class="epydoc">Module rjsmin</h1><p class="nomargin-top"><span class="codelink"><a href="rjsmin-pysrc.html">source&nbsp;code</a></span></p>
-<p>rJSmin is a javascript minifier written in python.</p>
-<p>The minifier is based on the semantics of <a class="rst-reference external" href="http://www.crockford.com/javascript/jsmin.c" target="_top">jsmin.c by Douglas Crockford</a>.</p>
-<p>The module is a re-implementation aiming for speed, so it can be used at
-runtime (rather than during a preprocessing step). Usually it produces the
-same results as the original <tt class="rst-docutils literal">jsmin.c</tt>. It differs in the following ways:</p>
-<ul class="rst-simple">
-<li>there is no error detection: unterminated string, regex and comment
-literals are treated as regular javascript code and minified as such.</li>
-<li>Control characters inside string and regex literals are left untouched; they
-are not converted to spaces (nor to n)</li>
-<li>Newline characters are not allowed inside string and regex literals, except
-for line continuations in string literals (ECMA-5).</li>
-<li>&quot;return /regex/&quot; is recognized correctly.</li>
-<li>&quot;+ +&quot; and &quot;- -&quot; sequences are not collapsed to '++' or '--'</li>
-<li>Newlines before ! operators are removed more sensibly</li>
-<li>Comments starting with an exclamation mark (<tt class="rst-docutils literal">!</tt>) can be kept optionally</li>
-<li>rJSmin does not handle streams, but only complete strings. (However, the
-module provides a &quot;streamy&quot; interface).</li>
-</ul>
-<p>Since most parts of the logic are handled by the regex engine it's way faster
-than the original python port of <tt class="rst-docutils literal">jsmin.c</tt> by Baruch Even. The speed factor
-varies between about 6 and 55 depending on input and python version (it gets
-faster the more compressed the input already is). Compared to the
-speed-refactored python port by Dave St.Germain the performance gain is less
-dramatic but still between 3 and 50 (for huge inputs). See the docs/BENCHMARKS
-file for details.</p>
-<p>rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.</p>
-<p>Both python 2 and python 3 are supported.</p>
-
-<hr />
-<div class="fields"> <p><strong>Copyright:</strong>
- Copyright 2011 - 2014
-Andr&#233; Malo or his licensors, as applicable
- </p>
- <p><strong>License:</strong>
- <p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at</p>
-<blockquote>
-<a class="rst-reference external" href="http://www.apache.org/licenses/LICENSE-2.0" target="_top">http://www.apache.org/licenses/LICENSE-2.0</a></blockquote>
-<p>Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an &quot;AS IS&quot; 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.</p>
- </p>
- <p><strong>Version:</strong>
- 1.0.10
- </p>
- <p><strong>Author:</strong>
- Andr&#233; Malo
- </p>
-</div><!-- ==================== FUNCTIONS ==================== -->
-<a name="section-Functions"></a>
-<table class="summary" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Functions</span></td>
-</tr>
-<tr>
- <td width="15%" align="right" valign="top" class="summary">
- <span class="summary-type"><tt class="rst-docutils literal">str</tt></span>
- </td><td class="summary">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td><span class="summary-sig"><a href="rjsmin-module.html#jsmin" class="summary-sig-name">jsmin</a>(<span class="summary-sig-arg">script</span>,
- <span class="summary-sig-arg">keep_bang_comments</span>=<span class="summary-sig-default">False</span>)</span><br />
- Minify javascript based on <a class="rst-reference external" href="http://www.crockford.com/javascript/jsmin.c" target="_top">jsmin.c by Douglas Crockford</a>.</td>
- <td align="right" valign="top">
-
-
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
-</table>
-<!-- ==================== FUNCTION DETAILS ==================== -->
-<a name="section-FunctionDetails"></a>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr bgcolor="#70b0f0" class="table-header">
- <td align="left" colspan="2" class="table-header">
- <span class="table-header">Function Details</span></td>
-</tr>
-</table>
-<a name="jsmin"></a>
-<div>
-<table class="details" border="1" cellpadding="3"
- cellspacing="0" width="100%" bgcolor="white">
-<tr><td>
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr valign="top"><td>
- <h3 class="epydoc"><span class="sig"><span class="sig-name">jsmin</span>(<span class="sig-arg">script</span>,
- <span class="sig-arg">keep_bang_comments</span>=<span class="sig-default">False</span>)</span>
- </h3>
- </td><td align="right" valign="top"
- >&nbsp;
- </td>
- </tr></table>
-
- <p>Minify javascript based on <a class="rst-reference external" href="http://www.crockford.com/javascript/jsmin.c" target="_top">jsmin.c by Douglas Crockford</a>.</p>
-<p>Instead of parsing the stream char by char, it uses a regular
-expression approach which minifies the whole script with one big
-substitution regex.</p>
- <dl class="fields">
- <dt>Parameters:</dt>
- <dd><ul class="nomargin-top">
- <li><strong class="pname"><code>script</code></strong> (<tt class="rst-docutils literal">str</tt>) - Script to minify</li>
- <li><strong class="pname"><code>keep_bang_comments</code></strong> (<tt class="rst-docutils literal">bool</tt>) - Keep comments starting with an exclamation mark? (<tt class="rst-docutils literal"><span class="pre">/*!...*/</span></tt>)</li>
- </ul></dd>
- <dt>Returns: <tt class="rst-docutils literal">str</tt></dt>
- <dd>Minified script</dd>
- </dl>
-<div class="fields"> <p><strong>Note:</strong>
- This is a hand crafted C implementation built on the regex
-semantics.
- </p>
-</div></td></tr></table>
-</div>
-<br />
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-pysrc.html b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-pysrc.html
deleted file mode 100644
index fe4f283d190..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/docs/apidoc/rjsmin-pysrc.html
+++ /dev/null
@@ -1,549 +0,0 @@
-<?xml version="1.0" encoding="ascii"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>rjsmin</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
-</head>
-
-<body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-<table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- Module&nbsp;rjsmin
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- </table>
- </td>
- </tr>
-</table>
-<h1 class="epydoc">Source Code for <a href="rjsmin-module.html">Module rjsmin</a></h1>
-<pre class="py-src">
-<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
-<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-comment"># -*- coding: ascii -*-</tt> </tt>
-<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring">r"""</tt> </tt>
-<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring">=====================</tt> </tt>
-<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> Javascript Minifier</tt> </tt>
-<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring">=====================</tt> </tt>
-<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring">rJSmin is a javascript minifier written in python.</tt> </tt>
-<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-docstring">The minifier is based on the semantics of `jsmin.c by Douglas Crockford`_\\.</tt> </tt>
-<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-docstring">:Copyright:</tt> </tt>
-<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-docstring"> Copyright 2011 - 2014</tt> </tt>
-<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-docstring"> Andr\xe9 Malo or his licensors, as applicable</tt> </tt>
-<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-docstring">:License:</tt> </tt>
-<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-docstring"> Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
-<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring"> you may not use this file except in compliance with the License.</tt> </tt>
-<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring"> You may obtain a copy of the License at</tt> </tt>
-<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-docstring"> http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
-<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring"> Unless required by applicable law or agreed to in writing, software</tt> </tt>
-<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring"> distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
-<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-docstring"> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
-<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-docstring"> See the License for the specific language governing permissions and</tt> </tt>
-<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"><tt class="py-docstring"> limitations under the License.</tt> </tt>
-<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-docstring">The module is a re-implementation aiming for speed, so it can be used at</tt> </tt>
-<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-docstring">runtime (rather than during a preprocessing step). Usually it produces the</tt> </tt>
-<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-docstring">same results as the original ``jsmin.c``. It differs in the following ways:</tt> </tt>
-<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-docstring">- there is no error detection: unterminated string, regex and comment</tt> </tt>
-<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-docstring"> literals are treated as regular javascript code and minified as such.</tt> </tt>
-<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-docstring">- Control characters inside string and regex literals are left untouched; they</tt> </tt>
-<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-docstring"> are not converted to spaces (nor to \\n)</tt> </tt>
-<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-docstring">- Newline characters are not allowed inside string and regex literals, except</tt> </tt>
-<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"><tt class="py-docstring"> for line continuations in string literals (ECMA-5).</tt> </tt>
-<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"><tt class="py-docstring">- "return /regex/" is recognized correctly.</tt> </tt>
-<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-docstring">- "+ +" and "- -" sequences are not collapsed to '++' or '--'</tt> </tt>
-<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-docstring">- Newlines before ! operators are removed more sensibly</tt> </tt>
-<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-docstring">- Comments starting with an exclamation mark (``!``) can be kept optionally</tt> </tt>
-<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-docstring">- rJSmin does not handle streams, but only complete strings. (However, the</tt> </tt>
-<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring"> module provides a "streamy" interface).</tt> </tt>
-<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"><tt class="py-docstring">Since most parts of the logic are handled by the regex engine it's way faster</tt> </tt>
-<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"><tt class="py-docstring">than the original python port of ``jsmin.c`` by Baruch Even. The speed factor</tt> </tt>
-<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-docstring">varies between about 6 and 55 depending on input and python version (it gets</tt> </tt>
-<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"><tt class="py-docstring">faster the more compressed the input already is). Compared to the</tt> </tt>
-<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"><tt class="py-docstring">speed-refactored python port by Dave St.Germain the performance gain is less</tt> </tt>
-<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"><tt class="py-docstring">dramatic but still between 3 and 50 (for huge inputs). See the docs/BENCHMARKS</tt> </tt>
-<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt class="py-docstring">file for details.</tt> </tt>
-<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"><tt class="py-docstring">rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.</tt> </tt>
-<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"><tt class="py-docstring">Both python 2 and python 3 are supported.</tt> </tt>
-<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"><tt class="py-docstring">.. _jsmin.c by Douglas Crockford:</tt> </tt>
-<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"><tt class="py-docstring"> http://www.crockford.com/javascript/jsmin.c</tt> </tt>
-<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
-<a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-0" class="py-name" targets="Variable rjsmin.__doc__=rjsmin-module.html#__doc__"><a title="rjsmin.__doc__" class="py-name" href="#" onclick="return doclink('link-0', '__doc__', 'link-0');">__doc__</a></tt><tt class="py-op">:</tt> </tt>
-<a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-comment"># pylint: disable = W0622</tt> </tt>
-<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt id="link-1" class="py-name"><a title="rjsmin.__doc__" class="py-name" href="#" onclick="return doclink('link-1', '__doc__', 'link-0');">__doc__</a></tt> <tt class="py-op">=</tt> <tt id="link-2" class="py-name"><a title="rjsmin.__doc__" class="py-name" href="#" onclick="return doclink('link-2', '__doc__', 'link-0');">__doc__</a></tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'ascii'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">decode</tt><tt class="py-op">(</tt><tt class="py-string">'unicode_escape'</tt><tt class="py-op">)</tt> </tt>
-<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">r"Andr\xe9 Malo"</tt><tt class="py-op">.</tt><tt class="py-name">encode</tt><tt class="py-op">(</tt><tt class="py-string">'ascii'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">decode</tt><tt class="py-op">(</tt><tt class="py-string">'unicode_escape'</tt><tt class="py-op">)</tt> </tt>
-<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"><tt class="py-name">__docformat__</tt> <tt class="py-op">=</tt> <tt class="py-string">"restructuredtext en"</tt> </tt>
-<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable rjsmin.__license__=rjsmin-module.html#__license__"><a title="rjsmin.__license__" class="py-name" href="#" onclick="return doclink('link-3', '__license__', 'link-3');">__license__</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"Apache License, Version 2.0"</tt> </tt>
-<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">'1.0.10'</tt> </tt>
-<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'jsmin'</tt><tt class="py-op">]</tt> </tt>
-<a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> </tt>
-<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">re</tt> <tt class="py-keyword">as</tt> <tt class="py-name">_re</tt> </tt>
-<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> </tt>
-<a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> </tt>
-<a name="_make_jsmin"></a><div id="_make_jsmin-def"><a name="L75"></a><tt class="py-lineno"> 75</tt> <a class="py-toggle" href="#" id="_make_jsmin-toggle" onclick="return toggle('_make_jsmin');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="rjsmin-module.html#_make_jsmin">_make_jsmin</a><tt class="py-op">(</tt><tt class="py-param">python_only</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="_make_jsmin-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_make_jsmin-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
-<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"><tt class="py-docstring"> Generate JS minifier based on `jsmin.c by Douglas Crockford`_</tt> </tt>
-<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt class="py-docstring"> .. _jsmin.c by Douglas Crockford:</tt> </tt>
-<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"><tt class="py-docstring"> http://www.crockford.com/javascript/jsmin.c</tt> </tt>
-<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-docstring"> :Parameters:</tt> </tt>
-<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"><tt class="py-docstring"> `python_only` : ``bool``</tt> </tt>
-<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-docstring"> Use only the python variant. If true, the c extension is not even</tt> </tt>
-<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"><tt class="py-docstring"> tried to be loaded.</tt> </tt>
-<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"><tt class="py-docstring"> :Return: Minifier</tt> </tt>
-<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"><tt class="py-docstring"> :Rtype: ``callable``</tt> </tt>
-<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> <tt class="py-comment"># pylint: disable = R0912, R0914, W0612</tt> </tt>
-<a name="L91"></a><tt class="py-lineno"> 91</tt> <tt class="py-line"> </tt>
-<a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">python_only</tt><tt class="py-op">:</tt> </tt>
-<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">_rjsmin</tt> <tt class="py-comment"># pylint: disable = F0401</tt> </tt>
-<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt>
-<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
-<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">_rjsmin</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Function rjsmin.jsmin()=rjsmin-module.html#jsmin"><a title="rjsmin.jsmin" class="py-name" href="#" onclick="return doclink('link-4', 'jsmin', 'link-4');">jsmin</a></tt> </tt>
-<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-name">xrange</tt> </tt>
-<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">NameError</tt><tt class="py-op">:</tt> </tt>
-<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-name">xrange</tt> <tt class="py-op">=</tt> <tt class="py-name">range</tt> <tt class="py-comment"># pylint: disable = W0622</tt> </tt>
-<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> </tt>
-<a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> <tt class="py-name">space_chars</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[\000-\011\013\014\016-\040]'</tt> </tt>
-<a name="L105"></a><tt class="py-lineno">105</tt> <tt class="py-line"> </tt>
-<a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-name">line_comment</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?://[^\r\n]*)'</tt> </tt>
-<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-name">space_comment</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)'</tt> </tt>
-<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> <tt class="py-name">space_comment_nobang</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)'</tt> </tt>
-<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-name">bang_comment</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:/\*![^*]*\*+(?:[^/*][^*]*\*+)*/)'</tt> </tt>
-<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> </tt>
-<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt class="py-name">string1</tt> <tt class="py-op">=</tt> \ </tt>
-<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-string">r'(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)'</tt> </tt>
-<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-name">string2</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^"\\\r\n]*)*")'</tt> </tt>
-<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-name">strings</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s|%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">string1</tt><tt class="py-op">,</tt> <tt class="py-name">string2</tt><tt class="py-op">)</tt> </tt>
-<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> </tt>
-<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-name">charclass</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\])'</tt> </tt>
-<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-name">nospecial</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[^/\\\[\r\n]'</tt> </tt>
-<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> <tt class="py-name">regex</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:/(?![\r\n/*])%s*(?:(?:\\[^\r\n]|%s)%s*)*/)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
-<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-name">nospecial</tt><tt class="py-op">,</tt> <tt class="py-name">charclass</tt><tt class="py-op">,</tt> <tt class="py-name">nospecial</tt> </tt>
-<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-name">space</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s|%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">space_chars</tt><tt class="py-op">,</tt> <tt class="py-name">space_comment</tt><tt class="py-op">)</tt> </tt>
-<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-name">space_nobang</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s|%s)'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">space_chars</tt><tt class="py-op">,</tt> <tt class="py-name">space_comment_nobang</tt><tt class="py-op">)</tt> </tt>
-<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> <tt class="py-name">newline</tt> <tt class="py-op">=</tt> <tt class="py-string">r'(?:%s?[\r\n])'</tt> <tt class="py-op">%</tt> <tt class="py-name">line_comment</tt> </tt>
-<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> </tt>
-<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">fix_charclass</tt><tt class="py-op">(</tt><tt class="py-param">result</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-docstring">""" Fixup string of chars to fit into a regex char class """</tt> </tt>
-<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> <tt class="py-name">pos</tt> <tt class="py-op">=</tt> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-string">'-'</tt><tt class="py-op">)</tt> </tt>
-<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">pos</tt> <tt class="py-op">&gt;=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
-<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">r'%s%s-'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">pos</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">result</tt><tt class="py-op">[</tt><tt class="py-name">pos</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> </tt>
-<a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">sequentize</tt><tt class="py-op">(</tt><tt class="py-param">string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L132"></a><tt class="py-lineno">132</tt> <tt class="py-line"> <tt class="py-docstring">"""</tt> </tt>
-<a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"><tt class="py-docstring"> Notate consecutive characters as sequence</tt> </tt>
-<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"><tt class="py-docstring"> (1-4 instead of 1234)</tt> </tt>
-<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-name">first</tt><tt class="py-op">,</tt> <tt class="py-name">last</tt><tt class="py-op">,</tt> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
-<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">char</tt> <tt class="py-keyword">in</tt> <tt class="py-name">map</tt><tt class="py-op">(</tt><tt class="py-name">ord</tt><tt class="py-op">,</tt> <tt class="py-name">string</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">last</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-name">first</tt> <tt class="py-op">=</tt> <tt class="py-name">last</tt> <tt class="py-op">=</tt> <tt class="py-name">char</tt> </tt>
-<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">last</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> <tt class="py-op">==</tt> <tt class="py-name">char</tt><tt class="py-op">:</tt> </tt>
-<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-name">last</tt> <tt class="py-op">=</tt> <tt class="py-name">char</tt> </tt>
-<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">first</tt><tt class="py-op">,</tt> <tt class="py-name">last</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-name">first</tt> <tt class="py-op">=</tt> <tt class="py-name">last</tt> <tt class="py-op">=</tt> <tt class="py-name">char</tt> </tt>
-<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">last</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
-<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-name">result</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-name">first</tt><tt class="py-op">,</tt> <tt class="py-name">last</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-string">'%s%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
-<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">first</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
-<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-name">last</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">first</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'-'</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> </tt>
-<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-name">last</tt> <tt class="py-op">!=</tt> <tt class="py-name">first</tt> <tt class="py-keyword">and</tt> <tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">last</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-string">''</tt> </tt>
-<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">first</tt><tt class="py-op">,</tt> <tt class="py-name">last</tt> <tt class="py-keyword">in</tt> <tt class="py-name">result</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> </tt>
-<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt> </tt>
-<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-string">r'([\000-\040\047])'</tt><tt class="py-op">,</tt> <tt class="py-comment"># \047 for better portability</tt> </tt>
-<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-keyword">lambda</tt> <tt class="py-name">m</tt><tt class="py-op">:</tt> <tt class="py-string">'\\%03o'</tt> <tt class="py-op">%</tt> <tt class="py-name">ord</tt><tt class="py-op">(</tt><tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">group</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt> </tt>
-<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-name">sequentize</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
-<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\\'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\\\'</tt><tt class="py-op">)</tt> </tt>
-<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> <tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'['</tt><tt class="py-op">,</tt> <tt class="py-string">'\\['</tt><tt class="py-op">)</tt> </tt>
-<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">']'</tt><tt class="py-op">,</tt> <tt class="py-string">'\\]'</tt><tt class="py-op">)</tt> </tt>
-<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-</div><a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> </tt>
-<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">id_literal_</tt><tt class="py-op">(</tt><tt class="py-param">what</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> <tt class="py-docstring">""" Make id_literal like char class """</tt> </tt>
-<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">what</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt> </tt>
-<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt> </tt>
-<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt class="py-number">127</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'[^%s]'</tt> <tt class="py-op">%</tt> <tt class="py-name">fix_charclass</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> </tt>
-<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">not_id_literal_</tt><tt class="py-op">(</tt><tt class="py-param">keep</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-docstring">""" Make negated id_literal like char class """</tt> </tt>
-<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-name">match</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">id_literal_</tt><tt class="py-op">(</tt><tt class="py-name">keep</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">match</tt> </tt>
-<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt> </tt>
-<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> <tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">c</tt> <tt class="py-keyword">in</tt> <tt class="py-name">xrange</tt><tt class="py-op">(</tt><tt class="py-number">127</tt><tt class="py-op">)</tt> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">match</tt><tt class="py-op">(</tt><tt class="py-name">chr</tt><tt class="py-op">(</tt><tt class="py-name">c</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">r'[%s]'</tt> <tt class="py-op">%</tt> <tt class="py-name">fix_charclass</tt><tt class="py-op">(</tt><tt class="py-name">result</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> </tt>
-<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-name">not_id_literal</tt> <tt class="py-op">=</tt> <tt class="py-name">not_id_literal_</tt><tt class="py-op">(</tt><tt class="py-string">r'[a-zA-Z0-9_$]'</tt><tt class="py-op">)</tt> </tt>
-<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-name">preregex1</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[(,=:\[!&amp;|?{};\r\n]'</tt> </tt>
-<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-name">preregex2</tt> <tt class="py-op">=</tt> <tt class="py-string">r'%(not_id_literal)sreturn'</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> </tt>
-<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> <tt class="py-name">id_literal</tt> <tt class="py-op">=</tt> <tt class="py-name">id_literal_</tt><tt class="py-op">(</tt><tt class="py-string">r'[a-zA-Z0-9_$]'</tt><tt class="py-op">)</tt> </tt>
-<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-name">id_literal_open</tt> <tt class="py-op">=</tt> <tt class="py-name">id_literal_</tt><tt class="py-op">(</tt><tt class="py-string">r'[a-zA-Z0-9_${\[(!+-]'</tt><tt class="py-op">)</tt> </tt>
-<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-name">id_literal_close</tt> <tt class="py-op">=</tt> <tt class="py-name">id_literal_</tt><tt class="py-op">(</tt><tt class="py-string">r'[a-zA-Z0-9_$}\])"\047+-]'</tt><tt class="py-op">)</tt> </tt>
-<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> </tt>
-<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt class="py-name">dull</tt> <tt class="py-op">=</tt> <tt class="py-string">r'[^\047"/\000-\040]'</tt> </tt>
-<a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> </tt>
-<a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line"> <tt class="py-name">space_sub_simple</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
-<a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> <tt class="py-comment"># noqa pylint: disable = C0330</tt> </tt>
-<a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"> </tt>
-<a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line"> <tt class="py-string">r'(%(dull)s+)'</tt> </tt>
-<a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-string">r'|(%(strings)s%(dull)s*)'</tt> </tt>
-<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(preregex1)s)'</tt> </tt>
-<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-string">r'%(space)s*(?:%(newline)s%(space)s*)*'</tt> </tt>
-<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-string">r'(%(regex)s%(dull)s*)'</tt> </tt>
-<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(preregex2)s)'</tt> </tt>
-<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"> <tt class="py-string">r'%(space)s*(?:%(newline)s%(space)s)*'</tt> </tt>
-<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-string">r'(%(regex)s%(dull)s*)'</tt> </tt>
-<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(id_literal_close)s)'</tt> </tt>
-<a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> <tt class="py-string">r'%(space)s*(?:(%(newline)s)%(space)s*)+'</tt> </tt>
-<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt class="py-string">r'(?=%(id_literal_open)s)'</tt> </tt>
-<a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)'</tt> </tt>
-<a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=\+)(%(space)s)+(?=\+)'</tt> </tt>
-<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=-)(%(space)s)+(?=-)'</tt> </tt>
-<a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> <tt class="py-string">r'|%(space)s+'</tt> </tt>
-<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> <tt class="py-string">r'|(?:%(newline)s%(space)s*)+'</tt> </tt>
-<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"> <tt class="py-comment">#print space_sub_simple.__self__.pattern</tt> </tt>
-<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"> </tt>
-<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">space_subber_simple</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> <tt class="py-docstring">""" Substitution callback """</tt> </tt>
-<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-comment"># pylint: disable = R0911</tt> </tt>
-<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> </tt>
-<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> <tt class="py-name">groups</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
-<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
-<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
-<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
-<a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'\n'</tt> </tt>
-<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">7</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">' '</tt> </tt>
-<a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
-</div><a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"> </tt>
-<a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line"> <tt class="py-name">space_sub_banged</tt> <tt class="py-op">=</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-op">(</tt> </tt>
-<a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> <tt class="py-comment"># noqa pylint: disable = C0330</tt> </tt>
-<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> </tt>
-<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-string">r'(%(dull)s+)'</tt> </tt>
-<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"> <tt class="py-string">r'|(%(strings)s%(dull)s*)'</tt> </tt>
-<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"> <tt class="py-string">r'|(%(bang_comment)s%(dull)s*)'</tt> </tt>
-<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(preregex1)s)'</tt> </tt>
-<a name="L239"></a><tt class="py-lineno">239</tt> <tt class="py-line"> <tt class="py-string">r'%(space)s*(?:%(newline)s%(space)s*)*'</tt> </tt>
-<a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> <tt class="py-string">r'(%(regex)s%(dull)s*)'</tt> </tt>
-<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(preregex2)s)'</tt> </tt>
-<a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"> <tt class="py-string">r'%(space)s*(?:%(newline)s%(space)s)*'</tt> </tt>
-<a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"> <tt class="py-string">r'(%(regex)s%(dull)s*)'</tt> </tt>
-<a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(id_literal_close)s)'</tt> </tt>
-<a name="L245"></a><tt class="py-lineno">245</tt> <tt class="py-line"> <tt class="py-string">r'%(space)s*(?:(%(newline)s)%(space)s*)+'</tt> </tt>
-<a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-string">r'(?=%(id_literal_open)s)'</tt> </tt>
-<a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)'</tt> </tt>
-<a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=\+)(%(space)s)+(?=\+)'</tt> </tt>
-<a name="L249"></a><tt class="py-lineno">249</tt> <tt class="py-line"> <tt class="py-string">r'|(?&lt;=-)(%(space)s)+(?=-)'</tt> </tt>
-<a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> <tt class="py-string">r'|%(space)s+'</tt> </tt>
-<a name="L251"></a><tt class="py-lineno">251</tt> <tt class="py-line"> <tt class="py-string">r'|(?:%(newline)s%(space)s*)+'</tt> </tt>
-<a name="L252"></a><tt class="py-lineno">252</tt> <tt class="py-line"> <tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-name">locals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">space</tt><tt class="py-op">=</tt><tt class="py-name">space_nobang</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt> </tt>
-<a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"> <tt class="py-comment">#print space_sub_banged.__self__.pattern</tt> </tt>
-<a name="L254"></a><tt class="py-lineno">254</tt> <tt class="py-line"> </tt>
-<a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">space_subber_banged</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"> <tt class="py-docstring">""" Substitution callback """</tt> </tt>
-<a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"> <tt class="py-comment"># pylint: disable = R0911</tt> </tt>
-<a name="L258"></a><tt class="py-lineno">258</tt> <tt class="py-line"> </tt>
-<a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"> <tt class="py-name">groups</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
-<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
-<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L265"></a><tt class="py-lineno">265</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
-<a name="L266"></a><tt class="py-lineno">266</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> </tt>
-<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> </tt>
-<a name="L270"></a><tt class="py-lineno">270</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L271"></a><tt class="py-lineno">271</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'\n'</tt> </tt>
-<a name="L272"></a><tt class="py-lineno">272</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">7</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L273"></a><tt class="py-lineno">273</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">' '</tt> </tt>
-<a name="L274"></a><tt class="py-lineno">274</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L275"></a><tt class="py-lineno">275</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">''</tt> </tt>
-</div><a name="L276"></a><tt class="py-lineno">276</tt> <tt class="py-line"> </tt>
-<a name="L277"></a><tt class="py-lineno">277</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">jsmin</tt><tt class="py-op">(</tt><tt class="py-param">script</tt><tt class="py-op">,</tt> <tt class="py-param">keep_bang_comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment"># pylint: disable = W0621</tt> </tt>
-<a name="L278"></a><tt class="py-lineno">278</tt> <tt class="py-line"> <tt class="py-docstring">r"""</tt> </tt>
-<a name="L279"></a><tt class="py-lineno">279</tt> <tt class="py-line"><tt class="py-docstring"> Minify javascript based on `jsmin.c by Douglas Crockford`_\.</tt> </tt>
-<a name="L280"></a><tt class="py-lineno">280</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L281"></a><tt class="py-lineno">281</tt> <tt class="py-line"><tt class="py-docstring"> Instead of parsing the stream char by char, it uses a regular</tt> </tt>
-<a name="L282"></a><tt class="py-lineno">282</tt> <tt class="py-line"><tt class="py-docstring"> expression approach which minifies the whole script with one big</tt> </tt>
-<a name="L283"></a><tt class="py-lineno">283</tt> <tt class="py-line"><tt class="py-docstring"> substitution regex.</tt> </tt>
-<a name="L284"></a><tt class="py-lineno">284</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L285"></a><tt class="py-lineno">285</tt> <tt class="py-line"><tt class="py-docstring"> .. _jsmin.c by Douglas Crockford:</tt> </tt>
-<a name="L286"></a><tt class="py-lineno">286</tt> <tt class="py-line"><tt class="py-docstring"> http://www.crockford.com/javascript/jsmin.c</tt> </tt>
-<a name="L287"></a><tt class="py-lineno">287</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L288"></a><tt class="py-lineno">288</tt> <tt class="py-line"><tt class="py-docstring"> :Parameters:</tt> </tt>
-<a name="L289"></a><tt class="py-lineno">289</tt> <tt class="py-line"><tt class="py-docstring"> `script` : ``str``</tt> </tt>
-<a name="L290"></a><tt class="py-lineno">290</tt> <tt class="py-line"><tt class="py-docstring"> Script to minify</tt> </tt>
-<a name="L291"></a><tt class="py-lineno">291</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L292"></a><tt class="py-lineno">292</tt> <tt class="py-line"><tt class="py-docstring"> `keep_bang_comments` : ``bool``</tt> </tt>
-<a name="L293"></a><tt class="py-lineno">293</tt> <tt class="py-line"><tt class="py-docstring"> Keep comments starting with an exclamation mark? (``/*!...*/``)</tt> </tt>
-<a name="L294"></a><tt class="py-lineno">294</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L295"></a><tt class="py-lineno">295</tt> <tt class="py-line"><tt class="py-docstring"> :Return: Minified script</tt> </tt>
-<a name="L296"></a><tt class="py-lineno">296</tt> <tt class="py-line"><tt class="py-docstring"> :Rtype: ``str``</tt> </tt>
-<a name="L297"></a><tt class="py-lineno">297</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L298"></a><tt class="py-lineno">298</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">keep_bang_comments</tt><tt class="py-op">:</tt> </tt>
-<a name="L299"></a><tt class="py-lineno">299</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">space_sub_banged</tt><tt class="py-op">(</tt> </tt>
-<a name="L300"></a><tt class="py-lineno">300</tt> <tt class="py-line"> <tt class="py-name">space_subber_banged</tt><tt class="py-op">,</tt> <tt class="py-string">'\n%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">script</tt> </tt>
-<a name="L301"></a><tt class="py-lineno">301</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L302"></a><tt class="py-lineno">302</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L303"></a><tt class="py-lineno">303</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">space_sub_simple</tt><tt class="py-op">(</tt> </tt>
-<a name="L304"></a><tt class="py-lineno">304</tt> <tt class="py-line"> <tt class="py-name">space_subber_simple</tt><tt class="py-op">,</tt> <tt class="py-string">'\n%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">script</tt> </tt>
-<a name="L305"></a><tt class="py-lineno">305</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L306"></a><tt class="py-lineno">306</tt> <tt class="py-line"> </tt>
-<a name="L307"></a><tt class="py-lineno">307</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt id="link-5" class="py-name"><a title="rjsmin.jsmin" class="py-name" href="#" onclick="return doclink('link-5', 'jsmin', 'link-4');">jsmin</a></tt> </tt>
-</div><a name="L308"></a><tt class="py-lineno">308</tt> <tt class="py-line"> </tt>
-<a name="L309"></a><tt class="py-lineno">309</tt> <tt class="py-line"><tt id="link-6" class="py-name"><a title="rjsmin.jsmin" class="py-name" href="#" onclick="return doclink('link-6', 'jsmin', 'link-4');">jsmin</a></tt> <tt class="py-op">=</tt> <tt class="py-name">_make_jsmin</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L310"></a><tt class="py-lineno">310</tt> <tt class="py-line"> </tt>
-<a name="L311"></a><tt class="py-lineno">311</tt> <tt class="py-line"> </tt>
-<a name="jsmin_for_posers"></a><div id="jsmin_for_posers-def"><a name="L312"></a><tt class="py-lineno">312</tt> <a class="py-toggle" href="#" id="jsmin_for_posers-toggle" onclick="return toggle('jsmin_for_posers');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="rjsmin-module.html#jsmin_for_posers">jsmin_for_posers</a><tt class="py-op">(</tt><tt class="py-param">script</tt><tt class="py-op">,</tt> <tt class="py-param">keep_bang_comments</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="jsmin_for_posers-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="jsmin_for_posers-expanded"><a name="L313"></a><tt class="py-lineno">313</tt> <tt class="py-line"> <tt class="py-docstring">r"""</tt> </tt>
-<a name="L314"></a><tt class="py-lineno">314</tt> <tt class="py-line"><tt class="py-docstring"> Minify javascript based on `jsmin.c by Douglas Crockford`_\.</tt> </tt>
-<a name="L315"></a><tt class="py-lineno">315</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L316"></a><tt class="py-lineno">316</tt> <tt class="py-line"><tt class="py-docstring"> Instead of parsing the stream char by char, it uses a regular</tt> </tt>
-<a name="L317"></a><tt class="py-lineno">317</tt> <tt class="py-line"><tt class="py-docstring"> expression approach which minifies the whole script with one big</tt> </tt>
-<a name="L318"></a><tt class="py-lineno">318</tt> <tt class="py-line"><tt class="py-docstring"> substitution regex.</tt> </tt>
-<a name="L319"></a><tt class="py-lineno">319</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L320"></a><tt class="py-lineno">320</tt> <tt class="py-line"><tt class="py-docstring"> .. _jsmin.c by Douglas Crockford:</tt> </tt>
-<a name="L321"></a><tt class="py-lineno">321</tt> <tt class="py-line"><tt class="py-docstring"> http://www.crockford.com/javascript/jsmin.c</tt> </tt>
-<a name="L322"></a><tt class="py-lineno">322</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L323"></a><tt class="py-lineno">323</tt> <tt class="py-line"><tt class="py-docstring"> :Warning: This function is the digest of a _make_jsmin() call. It just</tt> </tt>
-<a name="L324"></a><tt class="py-lineno">324</tt> <tt class="py-line"><tt class="py-docstring"> utilizes the resulting regexes. It's here for fun and may</tt> </tt>
-<a name="L325"></a><tt class="py-lineno">325</tt> <tt class="py-line"><tt class="py-docstring"> vanish any time. Use the `jsmin` function instead.</tt> </tt>
-<a name="L326"></a><tt class="py-lineno">326</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L327"></a><tt class="py-lineno">327</tt> <tt class="py-line"><tt class="py-docstring"> :Parameters:</tt> </tt>
-<a name="L328"></a><tt class="py-lineno">328</tt> <tt class="py-line"><tt class="py-docstring"> `script` : ``str``</tt> </tt>
-<a name="L329"></a><tt class="py-lineno">329</tt> <tt class="py-line"><tt class="py-docstring"> Script to minify</tt> </tt>
-<a name="L330"></a><tt class="py-lineno">330</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L331"></a><tt class="py-lineno">331</tt> <tt class="py-line"><tt class="py-docstring"> `keep_bang_comments` : ``bool``</tt> </tt>
-<a name="L332"></a><tt class="py-lineno">332</tt> <tt class="py-line"><tt class="py-docstring"> Keep comments starting with an exclamation mark? (``/*!...*/``)</tt> </tt>
-<a name="L333"></a><tt class="py-lineno">333</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L334"></a><tt class="py-lineno">334</tt> <tt class="py-line"><tt class="py-docstring"> :Return: Minified script</tt> </tt>
-<a name="L335"></a><tt class="py-lineno">335</tt> <tt class="py-line"><tt class="py-docstring"> :Rtype: ``str``</tt> </tt>
-<a name="L336"></a><tt class="py-lineno">336</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
-<a name="L337"></a><tt class="py-lineno">337</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">keep_bang_comments</tt><tt class="py-op">:</tt> </tt>
-<a name="L338"></a><tt class="py-lineno">338</tt> <tt class="py-line"> <tt class="py-name">rex</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt> </tt>
-<a name="L339"></a><tt class="py-lineno">339</tt> <tt class="py-line"> <tt class="py-string">r'([^\047"/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]'</tt> </tt>
-<a name="L340"></a><tt class="py-lineno">340</tt> <tt class="py-line"> <tt class="py-string">r'|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]'</tt> </tt>
-<a name="L341"></a><tt class="py-lineno">341</tt> <tt class="py-line"> <tt class="py-string">r'|\r?\n|\r)[^"\\\r\n]*)*"))[^\047"/\000-\040]*)|(?&lt;=[(,=:\[!&amp;|?'</tt> </tt>
-<a name="L342"></a><tt class="py-lineno">342</tt> <tt class="py-line"> <tt class="py-string">r'{};\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*'</tt> </tt>
-<a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"> <tt class="py-string">r'][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\0'</tt> </tt>
-<a name="L344"></a><tt class="py-lineno">344</tt> <tt class="py-line"> <tt class="py-string">r'14\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r'</tt> </tt>
-<a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"> <tt class="py-string">r'\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r'</tt> </tt>
-<a name="L346"></a><tt class="py-lineno">346</tt> <tt class="py-line"> <tt class="py-string">r'\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/)[^\047"/\000-\040]*)|(?&lt;'</tt> </tt>
-<a name="L347"></a><tt class="py-lineno">347</tt> <tt class="py-line"> <tt class="py-string">r'=[\000-#%-,./:-@\[-^`{-~-]return)(?:[\000-\011\013\014\016-\04'</tt> </tt>
-<a name="L348"></a><tt class="py-lineno">348</tt> <tt class="py-line"> <tt class="py-string">r'0]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?['</tt> </tt>
-<a name="L349"></a><tt class="py-lineno">349</tt> <tt class="py-line"> <tt class="py-string">r'\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^'</tt> </tt>
-<a name="L350"></a><tt class="py-lineno">350</tt> <tt class="py-line"> <tt class="py-string">r'*]*\*+)*/)))*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:'</tt> </tt>
-<a name="L351"></a><tt class="py-lineno">351</tt> <tt class="py-line"> <tt class="py-string">r'\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/)['</tt> </tt>
-<a name="L352"></a><tt class="py-lineno">352</tt> <tt class="py-line"> <tt class="py-string">r'^\047"/\000-\040]*)|(?&lt;=[^\000-!#%&amp;(*,./:-@\[\\^`{|~])(?:[\000'</tt> </tt>
-<a name="L353"></a><tt class="py-lineno">353</tt> <tt class="py-line"> <tt class="py-string">r'-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?'</tt> </tt>
-<a name="L354"></a><tt class="py-lineno">354</tt> <tt class="py-line"> <tt class="py-string">r':((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016-\040]|(?'</tt> </tt>
-<a name="L355"></a><tt class="py-lineno">355</tt> <tt class="py-line"> <tt class="py-string">r':/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040"#%-\047)*,.'</tt> </tt>
-<a name="L356"></a><tt class="py-lineno">356</tt> <tt class="py-line"> <tt class="py-string">r'/:-@\\-^`|-~])|(?&lt;=[^\000-#%-,./:-@\[-^`{-~-])((?:[\000-\011\0'</tt> </tt>
-<a name="L357"></a><tt class="py-lineno">357</tt> <tt class="py-line"> <tt class="py-string">r'13\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=[^\00'</tt> </tt>
-<a name="L358"></a><tt class="py-lineno">358</tt> <tt class="py-line"> <tt class="py-string">r'0-#%-,./:-@\[-^`{-~-])|(?&lt;=\+)((?:[\000-\011\013\014\016-\040]'</tt> </tt>
-<a name="L359"></a><tt class="py-lineno">359</tt> <tt class="py-line"> <tt class="py-string">r'|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=\+)|(?&lt;=-)((?:[\000-'</tt> </tt>
-<a name="L360"></a><tt class="py-lineno">360</tt> <tt class="py-line"> <tt class="py-string">r'\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?'</tt> </tt>
-<a name="L361"></a><tt class="py-lineno">361</tt> <tt class="py-line"> <tt class="py-string">r'=-)|(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]'</tt> </tt>
-<a name="L362"></a><tt class="py-lineno">362</tt> <tt class="py-line"> <tt class="py-string">r'*\*+)*/))+|(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\0'</tt> </tt>
-<a name="L363"></a><tt class="py-lineno">363</tt> <tt class="py-line"> <tt class="py-string">r'16-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+'</tt> </tt>
-<a name="L364"></a><tt class="py-lineno">364</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L365"></a><tt class="py-lineno">365</tt> <tt class="py-line"> </tt>
-<a name="L366"></a><tt class="py-lineno">366</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">subber</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L367"></a><tt class="py-lineno">367</tt> <tt class="py-line"> <tt class="py-docstring">""" Substitution callback """</tt> </tt>
-<a name="L368"></a><tt class="py-lineno">368</tt> <tt class="py-line"> <tt class="py-name">groups</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L369"></a><tt class="py-lineno">369</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-op">(</tt> </tt>
-<a name="L370"></a><tt class="py-lineno">370</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L371"></a><tt class="py-lineno">371</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L372"></a><tt class="py-lineno">372</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L373"></a><tt class="py-lineno">373</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L374"></a><tt class="py-lineno">374</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L375"></a><tt class="py-lineno">375</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L376"></a><tt class="py-lineno">376</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L377"></a><tt class="py-lineno">377</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">7</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L378"></a><tt class="py-lineno">378</tt> <tt class="py-line"> <tt class="py-string">''</tt> </tt>
-<a name="L379"></a><tt class="py-lineno">379</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-</div><a name="L380"></a><tt class="py-lineno">380</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L381"></a><tt class="py-lineno">381</tt> <tt class="py-line"> <tt class="py-name">rex</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt> </tt>
-<a name="L382"></a><tt class="py-lineno">382</tt> <tt class="py-line"> <tt class="py-string">r'([^\047"/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]'</tt> </tt>
-<a name="L383"></a><tt class="py-lineno">383</tt> <tt class="py-line"> <tt class="py-string">r'|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]'</tt> </tt>
-<a name="L384"></a><tt class="py-lineno">384</tt> <tt class="py-line"> <tt class="py-string">r'|\r?\n|\r)[^"\\\r\n]*)*"))[^\047"/\000-\040]*)|((?:/\*![^*]*\*'</tt> </tt>
-<a name="L385"></a><tt class="py-lineno">385</tt> <tt class="py-line"> <tt class="py-string">r'+(?:[^/*][^*]*\*+)*/)[^\047"/\000-\040]*)|(?&lt;=[(,=:\[!&amp;|?{};\r'</tt> </tt>
-<a name="L386"></a><tt class="py-lineno">386</tt> <tt class="py-line"> <tt class="py-string">r'\n])(?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*'</tt> </tt>
-<a name="L387"></a><tt class="py-lineno">387</tt> <tt class="py-line"> <tt class="py-string">r'][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\0'</tt> </tt>
-<a name="L388"></a><tt class="py-lineno">388</tt> <tt class="py-line"> <tt class="py-string">r'14\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/('</tt> </tt>
-<a name="L389"></a><tt class="py-lineno">389</tt> <tt class="py-line"> <tt class="py-string">r'?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:'</tt> </tt>
-<a name="L390"></a><tt class="py-lineno">390</tt> <tt class="py-line"> <tt class="py-string">r'\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/)[^\047"/\000-\040]'</tt> </tt>
-<a name="L391"></a><tt class="py-lineno">391</tt> <tt class="py-line"> <tt class="py-string">r'*)|(?&lt;=[\000-#%-,./:-@\[-^`{-~-]return)(?:[\000-\011\013\014\0'</tt> </tt>
-<a name="L392"></a><tt class="py-lineno">392</tt> <tt class="py-line"> <tt class="py-string">r'16-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://['</tt> </tt>
-<a name="L393"></a><tt class="py-lineno">393</tt> <tt class="py-line"> <tt class="py-string">r'^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*'</tt> </tt>
-<a name="L394"></a><tt class="py-lineno">394</tt> <tt class="py-line"> <tt class="py-string">r']*\*+(?:[^/*][^*]*\*+)*/)))*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:('</tt> </tt>
-<a name="L395"></a><tt class="py-lineno">395</tt> <tt class="py-line"> <tt class="py-string">r'?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/'</tt> </tt>
-<a name="L396"></a><tt class="py-lineno">396</tt> <tt class="py-line"> <tt class="py-string">r'\\\[\r\n]*)*/)[^\047"/\000-\040]*)|(?&lt;=[^\000-!#%&amp;(*,./:-@\[\\'</tt> </tt>
-<a name="L397"></a><tt class="py-lineno">397</tt> <tt class="py-line"> <tt class="py-string">r'^`{|~])(?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:['</tt> </tt>
-<a name="L398"></a><tt class="py-lineno">398</tt> <tt class="py-line"> <tt class="py-string">r'^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011'</tt> </tt>
-<a name="L399"></a><tt class="py-lineno">399</tt> <tt class="py-line"> <tt class="py-string">r'\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+'</tt> </tt>
-<a name="L400"></a><tt class="py-lineno">400</tt> <tt class="py-line"> <tt class="py-string">r'(?=[^\000-\040"#%-\047)*,./:-@\\-^`|-~])|(?&lt;=[^\000-#%-,./:-@'</tt> </tt>
-<a name="L401"></a><tt class="py-lineno">401</tt> <tt class="py-line"> <tt class="py-string">r'\[-^`{-~-])((?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*'</tt> </tt>
-<a name="L402"></a><tt class="py-lineno">402</tt> <tt class="py-line"> <tt class="py-string">r'+(?:[^/*][^*]*\*+)*/)))+(?=[^\000-#%-,./:-@\[-^`{-~-])|(?&lt;=\+)'</tt> </tt>
-<a name="L403"></a><tt class="py-lineno">403</tt> <tt class="py-line"> <tt class="py-string">r'((?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^'</tt> </tt>
-<a name="L404"></a><tt class="py-lineno">404</tt> <tt class="py-line"> <tt class="py-string">r'*]*\*+)*/)))+(?=\+)|(?&lt;=-)((?:[\000-\011\013\014\016-\040]|(?:'</tt> </tt>
-<a name="L405"></a><tt class="py-lineno">405</tt> <tt class="py-line"> <tt class="py-string">r'/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=-)|(?:[\000-\011\013'</tt> </tt>
-<a name="L406"></a><tt class="py-lineno">406</tt> <tt class="py-line"> <tt class="py-string">r'\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))+|(?:(?'</tt> </tt>
-<a name="L407"></a><tt class="py-lineno">407</tt> <tt class="py-line"> <tt class="py-string">r':(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*('</tt> </tt>
-<a name="L408"></a><tt class="py-lineno">408</tt> <tt class="py-line"> <tt class="py-string">r'?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+'</tt> </tt>
-<a name="L409"></a><tt class="py-lineno">409</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L410"></a><tt class="py-lineno">410</tt> <tt class="py-line"> </tt>
-<a name="L411"></a><tt class="py-lineno">411</tt> <tt class="py-line"> <tt class="py-keyword">def</tt> <tt class="py-def-name">subber</tt><tt class="py-op">(</tt><tt class="py-param">match</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L412"></a><tt class="py-lineno">412</tt> <tt class="py-line"> <tt class="py-docstring">""" Substitution callback """</tt> </tt>
-<a name="L413"></a><tt class="py-lineno">413</tt> <tt class="py-line"> <tt class="py-name">groups</tt> <tt class="py-op">=</tt> <tt class="py-name">match</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L414"></a><tt class="py-lineno">414</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-op">(</tt> </tt>
-<a name="L415"></a><tt class="py-lineno">415</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L416"></a><tt class="py-lineno">416</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L417"></a><tt class="py-lineno">417</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L418"></a><tt class="py-lineno">418</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L419"></a><tt class="py-lineno">419</tt> <tt class="py-line"> <tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">4</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L420"></a><tt class="py-lineno">420</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">5</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L421"></a><tt class="py-lineno">421</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">6</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L422"></a><tt class="py-lineno">422</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">7</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L423"></a><tt class="py-lineno">423</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-number">8</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-string">' '</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> </tt>
-<a name="L424"></a><tt class="py-lineno">424</tt> <tt class="py-line"> <tt class="py-string">''</tt> </tt>
-<a name="L425"></a><tt class="py-lineno">425</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-</div><a name="L426"></a><tt class="py-lineno">426</tt> <tt class="py-line"> </tt>
-<a name="L427"></a><tt class="py-lineno">427</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">_re</tt><tt class="py-op">.</tt><tt class="py-name">sub</tt><tt class="py-op">(</tt><tt class="py-name">rex</tt><tt class="py-op">,</tt> <tt class="py-name">subber</tt><tt class="py-op">,</tt> <tt class="py-string">'\n%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">script</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L428"></a><tt class="py-lineno">428</tt> <tt class="py-line"> </tt>
-<a name="L429"></a><tt class="py-lineno">429</tt> <tt class="py-line"> </tt>
-<a name="L430"></a><tt class="py-lineno">430</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt> <tt class="py-op">==</tt> <tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
-<a name="main"></a><div id="main-def"><a name="L431"></a><tt class="py-lineno">431</tt> <a class="py-toggle" href="#" id="main-toggle" onclick="return toggle('main');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="rjsmin-module.html#main">main</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="main-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="main-expanded"><a name="L432"></a><tt class="py-lineno">432</tt> <tt class="py-line"> <tt class="py-docstring">""" Main """</tt> </tt>
-<a name="L433"></a><tt class="py-lineno">433</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> <tt class="py-keyword">as</tt> <tt class="py-name">_sys</tt> </tt>
-<a name="L434"></a><tt class="py-lineno">434</tt> <tt class="py-line"> <tt class="py-name">keep_bang_comments</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt> </tt>
-<a name="L435"></a><tt class="py-lineno">435</tt> <tt class="py-line"> <tt class="py-string">'-b'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
-<a name="L436"></a><tt class="py-lineno">436</tt> <tt class="py-line"> <tt class="py-keyword">or</tt> <tt class="py-string">'-bp'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
-<a name="L437"></a><tt class="py-lineno">437</tt> <tt class="py-line"> <tt class="py-keyword">or</tt> <tt class="py-string">'-pb'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
-<a name="L438"></a><tt class="py-lineno">438</tt> <tt class="py-line"> <tt class="py-op">)</tt> </tt>
-<a name="L439"></a><tt class="py-lineno">439</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'-p'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> <tt class="py-keyword">or</tt> <tt class="py-string">'-bp'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> \ </tt>
-<a name="L440"></a><tt class="py-lineno">440</tt> <tt class="py-line"> <tt class="py-keyword">or</tt> <tt class="py-string">'-pb'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">argv</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
-<a name="L441"></a><tt class="py-lineno">441</tt> <tt class="py-line"> <tt class="py-keyword">global</tt> <tt id="link-7" class="py-name"><a title="rjsmin.jsmin" class="py-name" href="#" onclick="return doclink('link-7', 'jsmin', 'link-4');">jsmin</a></tt> <tt class="py-comment"># pylint: disable = W0603</tt> </tt>
-<a name="L442"></a><tt class="py-lineno">442</tt> <tt class="py-line"> <tt id="link-8" class="py-name"><a title="rjsmin.jsmin" class="py-name" href="#" onclick="return doclink('link-8', 'jsmin', 'link-4');">jsmin</a></tt> <tt class="py-op">=</tt> <tt class="py-name">_make_jsmin</tt><tt class="py-op">(</tt><tt class="py-name">python_only</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
-<a name="L443"></a><tt class="py-lineno">443</tt> <tt class="py-line"> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt id="link-9" class="py-name"><a title="rjsmin.jsmin" class="py-name" href="#" onclick="return doclink('link-9', 'jsmin', 'link-4');">jsmin</a></tt><tt class="py-op">(</tt> </tt>
-<a name="L444"></a><tt class="py-lineno">444</tt> <tt class="py-line"> <tt class="py-name">_sys</tt><tt class="py-op">.</tt><tt class="py-name">stdin</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">keep_bang_comments</tt><tt class="py-op">=</tt><tt class="py-name">keep_bang_comments</tt> </tt>
-<a name="L445"></a><tt class="py-lineno">445</tt> <tt class="py-line"> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L446"></a><tt class="py-lineno">446</tt> <tt class="py-line"> <tt class="py-name">main</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L447"></a><tt class="py-lineno">447</tt> <tt class="py-line"> </tt><script type="text/javascript">
-<!--
-expandto(location.href);
-// -->
-</script>
-</pre>
-<br />
-<!-- ==================== NAVIGATION BAR ==================== -->
-<table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Home link -->
- <th bgcolor="#70b0f0" class="navbar-select"
- >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Tree link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Index link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Help link -->
- <th>&nbsp;&nbsp;&nbsp;<a
- href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
-
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a href="http://opensource.perlig.de/rjsmin/" target="_top">Visit rjsmin Online</a></th>
- </tr></table></th>
- </tr>
-</table>
-
-<script type="text/javascript">
- <!--
- // Private objects are initially displayed (because if
- // javascript is turned off then we want them to be
- // visible); but by default, we want to hide them. So hide
- // them unless we have a cookie that says to show them.
- checkCookie();
- // -->
-</script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/package.cfg b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/package.cfg
deleted file mode 100644
index a09401d5ea2..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/package.cfg
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright 2009 - 2014
-# André Malo or his licensors, as applicable
-#
-# 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.
-
-[package]
-name = rjsmin
-
-python.min = 2.4
-python.max = 3.4
-pypy.min = 1.9
-pypy.max = 2.2
-jython.min = 2.5
-jython.max = 2.7
-
-version.number = 1.0.10
-
-author.name = André Malo
-author.email = nd@perlig.de
-#maintainer.name =
-#maintainer.email =
-url.homepage = http://opensource.perlig.de/rjsmin/
-url.download = http://storage.perlig.de/rjsmin/
-
-
-[docs]
-meta.classifiers = docs/CLASSIFIERS
-meta.description = docs/DESCRIPTION
-meta.summary = docs/SUMMARY
-meta.provides = docs/PROVIDES
-meta.license = LICENSE
-meta.keywords =
- Javascript
- Minimization
-
-apidoc.dir = docs/apidoc
-apidoc.strip = 1
-#apidoc.ignore =
-
-#userdoc.dir = docs/userdoc
-#userdoc.strip = 1
-#userdoc.ignore =
-# .buildinfo
-
-#examples.dir = docs/examples
-#examples.strip = 1
-#examples.ignore =
-
-#man =
-
-extra =
- README.rst
- docs/CHANGES
- docs/BENCHMARKS
-
-
-[manifest]
-#packages.lib = .
-#packages.collect =
-modules = rjsmin
-
-#scripts =
-
-dist =
- bench
- bench.sh
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.c b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.c
deleted file mode 100644
index 53900720bf8..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.c
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * Copyright 2011 - 2014
- * Andr\xe9 Malo or his licensors, as applicable
- *
- * 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.
- */
-
-#include "cext.h"
-EXT_INIT_FUNC;
-
-#define RJSMIN_DULL_BIT (1 << 0)
-#define RJSMIN_PRE_REGEX_BIT (1 << 1)
-#define RJSMIN_REGEX_DULL_BIT (1 << 2)
-#define RJSMIN_REGEX_CC_DULL_BIT (1 << 3)
-#define RJSMIN_ID_LIT_BIT (1 << 4)
-#define RJSMIN_ID_LIT_O_BIT (1 << 5)
-#define RJSMIN_ID_LIT_C_BIT (1 << 6)
-#define RJSMIN_STRING_DULL_BIT (1 << 7)
-#define RJSMIN_SPACE_BIT (1 << 8)
-
-#ifdef EXT3
-typedef Py_UNICODE rchar;
-#else
-typedef unsigned char rchar;
-#endif
-#define U(c) ((rchar)(c))
-
-#define RJSMIN_IS_DULL(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_DULL_BIT))
-
-#define RJSMIN_IS_REGEX_DULL(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_REGEX_DULL_BIT))
-
-#define RJSMIN_IS_REGEX_CC_DULL(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_REGEX_CC_DULL_BIT))
-
-#define RJSMIN_IS_STRING_DULL(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_STRING_DULL_BIT))
-
-#define RJSMIN_IS_ID_LITERAL(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_ID_LIT_BIT))
-
-#define RJSMIN_IS_ID_LITERAL_OPEN(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_ID_LIT_O_BIT))
-
-#define RJSMIN_IS_ID_LITERAL_CLOSE(c) ((U(c) > 127) || \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_ID_LIT_C_BIT))
-
-#define RJSMIN_IS_SPACE(c) ((U(c) <= 127) && \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_SPACE_BIT))
-
-#define RJSMIN_IS_PRE_REGEX_1(c) ((U(c) <= 127) && \
- (rjsmin_charmask[U(c) & 0x7F] & RJSMIN_PRE_REGEX_BIT))
-
-
-static const unsigned short rjsmin_charmask[128] = {
- 396, 396, 396, 396, 396, 396, 396, 396,
- 396, 396, 2, 396, 396, 2, 396, 396,
- 396, 396, 396, 396, 396, 396, 396, 396,
- 396, 396, 396, 396, 396, 396, 396, 396,
- 396, 175, 76, 141, 253, 141, 143, 76,
- 175, 205, 141, 237, 143, 237, 141, 136,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 143, 143, 141, 143, 141, 143,
- 141, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 171, 1, 197, 141, 253,
- 141, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 175, 143, 207, 141, 253
-};
-
-static Py_ssize_t
-rjsmin(const rchar *source, rchar *target, Py_ssize_t length,
- int keep_bang_comments)
-{
- const rchar *reset, *sentinel = source + length;
- rchar *tstart = target;
- rchar c, quote;
-
- while (source < sentinel) {
- c = *source++;
- if (RJSMIN_IS_DULL(c)) {
- *target++ = c;
- continue;
- }
- switch (c) {
-
- /* String */
- case U('\''): case U('"'):
- reset = source;
- *target++ = quote = c;
- while (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (RJSMIN_IS_STRING_DULL(c))
- continue;
- switch (c) {
- case U('\''): case U('"'):
- if (c == quote)
- goto cont;
- continue;
- case U('\\'):
- if (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (c == U('\r') && source < sentinel
- && *source == U('\n'))
- *target++ = *source++;
- }
- continue;
- }
- break;
- }
- target -= source - reset;
- source = reset;
- continue;
-
- /* Comment or Regex or something else entirely */
- case U('/'):
- if (!(source < sentinel)) {
- *target++ = c;
- }
- else {
- switch (*source) {
- /* Comment */
- case U('*'): case U('/'):
- goto skip_or_copy_ws;
-
- default:
- if ( target == tstart
- || RJSMIN_IS_PRE_REGEX_1(*(target - 1))
- || (
- (target - tstart >= 6)
- && *(target - 1) == U('n')
- && *(target - 2) == U('r')
- && *(target - 3) == U('u')
- && *(target - 4) == U('t')
- && *(target - 5) == U('e')
- && *(target - 6) == U('r')
- && (
- target - tstart == 6
- || !RJSMIN_IS_ID_LITERAL(*(target - 7))
- )
- )) {
-
- /* Regex */
- reset = source;
- *target++ = U('/');
- while (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (RJSMIN_IS_REGEX_DULL(c))
- continue;
- switch (c) {
- case U('/'):
- goto cont;
- case U('\\'):
- if (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (c == U('\r') || c == U('\n'))
- break;
- }
- continue;
- case U('['):
- while (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (RJSMIN_IS_REGEX_CC_DULL(c))
- continue;
- switch (c) {
- case U('\\'):
- if (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (c == U('\r') || c == U('\n'))
- break;
- }
- continue;
- case U(']'):
- goto cont_regex;
- }
- }
- break;
- }
- break;
- cont_regex:
- continue;
- }
- target -= source - reset;
- source = reset;
- }
- else {
- /* Just a slash */
- *target++ = c;
- }
- continue;
- }
- }
- continue;
-
- /* Whitespace */
- default:
- skip_or_copy_ws:
- quote = U(' ');
- --source;
- while (source < sentinel) {
- c = *source++;
- if (RJSMIN_IS_SPACE(c))
- continue;
- switch (c) {
- case U('\r'): case U('\n'):
- quote = U('\n');
- continue;
- case U('/'):
- if (source < sentinel) {
- switch (*source) {
- case U('*'):
- reset = source++;
- /* copy bang comment, if requested */
- if ( keep_bang_comments && source < sentinel
- && *source == U('!')) {
- *target++ = U('/');
- *target++ = U('*');
- *target++ = *source++;
- while (source < sentinel) {
- c = *source++;
- *target++ = c;
- if (c == U('*') && source < sentinel
- && *source == U('/')) {
- *target++ = *source++;
- reset = NULL;
- break;
- }
- }
- if (!reset)
- continue;
- target -= source - reset;
- source = reset;
- }
- /* strip regular comment */
- else {
- while (source < sentinel) {
- c = *source++;
- if (c == U('*') && source < sentinel
- && *source == U('/')) {
- ++source;
- reset = NULL;
- break;
- }
- }
- if (!reset)
- continue;
- source = reset;
- *target++ = U('/');
- }
- goto cont;
- case U('/'):
- ++source;
- while (source < sentinel) {
- c = *source++;
- switch (c) {
- case U('\n'):
- break;
- case U('\r'):
- if (source < sentinel
- && *source == U('\n'))
- ++source;
- break;
- default:
- continue;
- }
- break;
- }
- quote = U('\n');
- continue;
- }
- }
- }
- --source;
- break;
- }
-
- if ((tstart < target && source < sentinel)
- && ((quote == U('\n')
- && RJSMIN_IS_ID_LITERAL_CLOSE(*(target - 1))
- && RJSMIN_IS_ID_LITERAL_OPEN(*source))
- ||
- (quote == U(' ')
- && ((RJSMIN_IS_ID_LITERAL(*(target - 1))
- && RJSMIN_IS_ID_LITERAL(*source))
- || (source < sentinel
- && ((*(target - 1) == U('+')
- && *source == U('+'))
- || (*(target - 1) == U('-')
- && *source == U('-'))))))))
- *target++ = quote;
- }
- cont:
- continue;
- }
- return (Py_ssize_t)(target - tstart);
-}
-
-
-PyDoc_STRVAR(rjsmin_jsmin__doc__,
-"jsmin(script, keep_bang_comments=False)\n\
-\n\
-Minify javascript based on `jsmin.c by Douglas Crockford`_\\.\n\
-\n\
-Instead of parsing the stream char by char, it uses a regular\n\
-expression approach which minifies the whole script with one big\n\
-substitution regex.\n\
-\n\
-.. _jsmin.c by Douglas Crockford:\n\
- http://www.crockford.com/javascript/jsmin.c\n\
-\n\
-:Note: This is a hand crafted C implementation built on the regex\n\
- semantics.\n\
-\n\
-:Parameters:\n\
- `script` : ``str``\n\
- Script to minify\n\
-\n\
- `keep_bang_comments` : ``bool``\n\
- Keep comments starting with an exclamation mark? (``/*!...*/``)\n\
-\n\
-:Return: Minified script\n\
-:Rtype: ``str``");
-
-static PyObject *
-rjsmin_jsmin(PyObject *self, PyObject *args, PyObject *kwds)
-{
- PyObject *script, *keep_bang_comments_ = NULL, *result;
- static char *kwlist[] = {"script", "keep_bang_comments", NULL};
- Py_ssize_t slength, length;
- int keep_bang_comments;
-#ifdef EXT2
- int uni;
-#define UOBJ "O"
-#endif
-#ifdef EXT3
-#define UOBJ "U"
-#endif
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, UOBJ "|O", kwlist,
- &script, &keep_bang_comments_))
- return NULL;
-
- if (!keep_bang_comments_)
- keep_bang_comments = 0;
- else {
- keep_bang_comments = PyObject_IsTrue(keep_bang_comments_);
- if (keep_bang_comments == -1)
- return NULL;
- }
-
-#ifdef EXT2
- if (PyUnicode_Check(script)) {
- if (!(script = PyUnicode_AsUTF8String(script)))
- return NULL;
- uni = 1;
- }
- else {
- if (!(script = PyObject_Str(script)))
- return NULL;
- uni = 0;
- }
-#endif
-
-#ifdef EXT3
- Py_INCREF(script);
-#define PyString_GET_SIZE PyUnicode_GET_SIZE
-#define PyString_AS_STRING PyUnicode_AS_UNICODE
-#define _PyString_Resize PyUnicode_Resize
-#define PyString_FromStringAndSize PyUnicode_FromUnicode
-#endif
-
- slength = PyString_GET_SIZE(script);
- if (!(result = PyString_FromStringAndSize(NULL, slength))) {
- Py_DECREF(script);
- return NULL;
- }
- Py_BEGIN_ALLOW_THREADS
- length = rjsmin((rchar *)PyString_AS_STRING(script),
- (rchar *)PyString_AS_STRING(result),
- slength, keep_bang_comments);
- Py_END_ALLOW_THREADS
-
- Py_DECREF(script);
- if (length < 0) {
- Py_DECREF(result);
- return NULL;
- }
- if (length != slength && _PyString_Resize(&result, length) == -1)
- return NULL;
-
-#ifdef EXT2
- if (uni) {
- script = PyUnicode_DecodeUTF8(PyString_AS_STRING(result),
- PyString_GET_SIZE(result), "strict");
- Py_DECREF(result);
- if (!script)
- return NULL;
- result = script;
- }
-#endif
- return result;
-}
-
-/* ------------------------ BEGIN MODULE DEFINITION ------------------------ */
-
-EXT_METHODS = {
- {"jsmin",
- (PyCFunction)rjsmin_jsmin, METH_VARARGS | METH_KEYWORDS,
- rjsmin_jsmin__doc__},
-
- {NULL} /* Sentinel */
-};
-
-PyDoc_STRVAR(EXT_DOCS_VAR,
-"C implementation of rjsmin\n\
-==========================\n\
-\n\
-C implementation of rjsmin.");
-
-
-EXT_DEFINE(EXT_MODULE_NAME, EXT_METHODS_VAR, EXT_DOCS_VAR);
-
-EXT_INIT_FUNC {
- PyObject *m;
-
- /* Create the module and populate stuff */
- if (!(m = EXT_CREATE(&EXT_DEFINE_VAR)))
- EXT_INIT_ERROR(NULL);
-
- EXT_ADD_UNICODE(m, "__author__", "Andr\xe9 Malo", "latin-1");
- EXT_ADD_STRING(m, "__docformat__", "restructuredtext en");
-
- EXT_INIT_RETURN(m);
-}
-
-/* ------------------------- END MODULE DEFINITION ------------------------- */
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.py
deleted file mode 100755
index e7854798a3a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/rjsmin.py
+++ /dev/null
@@ -1,446 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-r"""
-=====================
- Javascript Minifier
-=====================
-
-rJSmin is a javascript minifier written in python.
-
-The minifier is based on the semantics of `jsmin.c by Douglas Crockford`_\\.
-
-:Copyright:
-
- Copyright 2011 - 2014
- Andr\xe9 Malo or his licensors, as applicable
-
-:License:
-
- 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.
-
-The module is a re-implementation aiming for speed, so it can be used at
-runtime (rather than during a preprocessing step). Usually it produces the
-same results as the original ``jsmin.c``. It differs in the following ways:
-
-- there is no error detection: unterminated string, regex and comment
- literals are treated as regular javascript code and minified as such.
-- Control characters inside string and regex literals are left untouched; they
- are not converted to spaces (nor to \\n)
-- Newline characters are not allowed inside string and regex literals, except
- for line continuations in string literals (ECMA-5).
-- "return /regex/" is recognized correctly.
-- "+ +" and "- -" sequences are not collapsed to '++' or '--'
-- Newlines before ! operators are removed more sensibly
-- Comments starting with an exclamation mark (``!``) can be kept optionally
-- rJSmin does not handle streams, but only complete strings. (However, the
- module provides a "streamy" interface).
-
-Since most parts of the logic are handled by the regex engine it's way faster
-than the original python port of ``jsmin.c`` by Baruch Even. The speed factor
-varies between about 6 and 55 depending on input and python version (it gets
-faster the more compressed the input already is). Compared to the
-speed-refactored python port by Dave St.Germain the performance gain is less
-dramatic but still between 3 and 50 (for huge inputs). See the docs/BENCHMARKS
-file for details.
-
-rjsmin.c is a reimplementation of rjsmin.py in C and speeds it up even more.
-
-Both python 2 and python 3 are supported.
-
-.. _jsmin.c by Douglas Crockford:
- http://www.crockford.com/javascript/jsmin.c
-"""
-if __doc__:
- # pylint: disable = W0622
- __doc__ = __doc__.encode('ascii').decode('unicode_escape')
-__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
-__docformat__ = "restructuredtext en"
-__license__ = "Apache License, Version 2.0"
-__version__ = '1.0.10'
-__all__ = ['jsmin']
-
-import re as _re
-
-
-def _make_jsmin(python_only=False):
- """
- Generate JS minifier based on `jsmin.c by Douglas Crockford`_
-
- .. _jsmin.c by Douglas Crockford:
- http://www.crockford.com/javascript/jsmin.c
-
- :Parameters:
- `python_only` : ``bool``
- Use only the python variant. If true, the c extension is not even
- tried to be loaded.
-
- :Return: Minifier
- :Rtype: ``callable``
- """
- # pylint: disable = R0912, R0914, W0612
-
- if not python_only:
- try:
- import _rjsmin # pylint: disable = F0401
- except ImportError:
- pass
- else:
- return _rjsmin.jsmin
- try:
- xrange
- except NameError:
- xrange = range # pylint: disable = W0622
-
- space_chars = r'[\000-\011\013\014\016-\040]'
-
- line_comment = r'(?://[^\r\n]*)'
- space_comment = r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)'
- space_comment_nobang = r'(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)'
- bang_comment = r'(?:/\*![^*]*\*+(?:[^/*][^*]*\*+)*/)'
-
- string1 = \
- r'(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^\047\\\r\n]*)*\047)'
- string2 = r'(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]|\r?\n|\r)[^"\\\r\n]*)*")'
- strings = r'(?:%s|%s)' % (string1, string2)
-
- charclass = r'(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\])'
- nospecial = r'[^/\\\[\r\n]'
- regex = r'(?:/(?![\r\n/*])%s*(?:(?:\\[^\r\n]|%s)%s*)*/)' % (
- nospecial, charclass, nospecial
- )
- space = r'(?:%s|%s)' % (space_chars, space_comment)
- space_nobang = r'(?:%s|%s)' % (space_chars, space_comment_nobang)
- newline = r'(?:%s?[\r\n])' % line_comment
-
- def fix_charclass(result):
- """ Fixup string of chars to fit into a regex char class """
- pos = result.find('-')
- if pos >= 0:
- result = r'%s%s-' % (result[:pos], result[pos + 1:])
-
- def sequentize(string):
- """
- Notate consecutive characters as sequence
-
- (1-4 instead of 1234)
- """
- first, last, result = None, None, []
- for char in map(ord, string):
- if last is None:
- first = last = char
- elif last + 1 == char:
- last = char
- else:
- result.append((first, last))
- first = last = char
- if last is not None:
- result.append((first, last))
- return ''.join(['%s%s%s' % (
- chr(first),
- last > first + 1 and '-' or '',
- last != first and chr(last) or ''
- ) for first, last in result])
-
- return _re.sub(
- r'([\000-\040\047])', # \047 for better portability
- lambda m: '\\%03o' % ord(m.group(1)), (
- sequentize(result)
- .replace('\\', '\\\\')
- .replace('[', '\\[')
- .replace(']', '\\]')
- )
- )
-
- def id_literal_(what):
- """ Make id_literal like char class """
- match = _re.compile(what).match
- result = ''.join([
- chr(c) for c in xrange(127) if not match(chr(c))
- ])
- return '[^%s]' % fix_charclass(result)
-
- def not_id_literal_(keep):
- """ Make negated id_literal like char class """
- match = _re.compile(id_literal_(keep)).match
- result = ''.join([
- chr(c) for c in xrange(127) if not match(chr(c))
- ])
- return r'[%s]' % fix_charclass(result)
-
- not_id_literal = not_id_literal_(r'[a-zA-Z0-9_$]')
- preregex1 = r'[(,=:\[!&|?{};\r\n]'
- preregex2 = r'%(not_id_literal)sreturn' % locals()
-
- id_literal = id_literal_(r'[a-zA-Z0-9_$]')
- id_literal_open = id_literal_(r'[a-zA-Z0-9_${\[(!+-]')
- id_literal_close = id_literal_(r'[a-zA-Z0-9_$}\])"\047+-]')
-
- dull = r'[^\047"/\000-\040]'
-
- space_sub_simple = _re.compile((
- # noqa pylint: disable = C0330
-
- r'(%(dull)s+)'
- r'|(%(strings)s%(dull)s*)'
- r'|(?<=%(preregex1)s)'
- r'%(space)s*(?:%(newline)s%(space)s*)*'
- r'(%(regex)s%(dull)s*)'
- r'|(?<=%(preregex2)s)'
- r'%(space)s*(?:%(newline)s%(space)s)*'
- r'(%(regex)s%(dull)s*)'
- r'|(?<=%(id_literal_close)s)'
- r'%(space)s*(?:(%(newline)s)%(space)s*)+'
- r'(?=%(id_literal_open)s)'
- r'|(?<=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)'
- r'|(?<=\+)(%(space)s)+(?=\+)'
- r'|(?<=-)(%(space)s)+(?=-)'
- r'|%(space)s+'
- r'|(?:%(newline)s%(space)s*)+'
- ) % locals()).sub
- #print space_sub_simple.__self__.pattern
-
- def space_subber_simple(match):
- """ Substitution callback """
- # pylint: disable = R0911
-
- groups = match.groups()
- if groups[0]:
- return groups[0]
- elif groups[1]:
- return groups[1]
- elif groups[2]:
- return groups[2]
- elif groups[3]:
- return groups[3]
- elif groups[4]:
- return '\n'
- elif groups[5] or groups[6] or groups[7]:
- return ' '
- else:
- return ''
-
- space_sub_banged = _re.compile((
- # noqa pylint: disable = C0330
-
- r'(%(dull)s+)'
- r'|(%(strings)s%(dull)s*)'
- r'|(%(bang_comment)s%(dull)s*)'
- r'|(?<=%(preregex1)s)'
- r'%(space)s*(?:%(newline)s%(space)s*)*'
- r'(%(regex)s%(dull)s*)'
- r'|(?<=%(preregex2)s)'
- r'%(space)s*(?:%(newline)s%(space)s)*'
- r'(%(regex)s%(dull)s*)'
- r'|(?<=%(id_literal_close)s)'
- r'%(space)s*(?:(%(newline)s)%(space)s*)+'
- r'(?=%(id_literal_open)s)'
- r'|(?<=%(id_literal)s)(%(space)s)+(?=%(id_literal)s)'
- r'|(?<=\+)(%(space)s)+(?=\+)'
- r'|(?<=-)(%(space)s)+(?=-)'
- r'|%(space)s+'
- r'|(?:%(newline)s%(space)s*)+'
- ) % dict(locals(), space=space_nobang)).sub
- #print space_sub_banged.__self__.pattern
-
- def space_subber_banged(match):
- """ Substitution callback """
- # pylint: disable = R0911
-
- groups = match.groups()
- if groups[0]:
- return groups[0]
- elif groups[1]:
- return groups[1]
- elif groups[2]:
- return groups[2]
- elif groups[3]:
- return groups[3]
- elif groups[4]:
- return groups[4]
- elif groups[5]:
- return '\n'
- elif groups[6] or groups[7] or groups[8]:
- return ' '
- else:
- return ''
-
- def jsmin(script, keep_bang_comments=False): # pylint: disable = W0621
- r"""
- Minify javascript based on `jsmin.c by Douglas Crockford`_\.
-
- Instead of parsing the stream char by char, it uses a regular
- expression approach which minifies the whole script with one big
- substitution regex.
-
- .. _jsmin.c by Douglas Crockford:
- http://www.crockford.com/javascript/jsmin.c
-
- :Parameters:
- `script` : ``str``
- Script to minify
-
- `keep_bang_comments` : ``bool``
- Keep comments starting with an exclamation mark? (``/*!...*/``)
-
- :Return: Minified script
- :Rtype: ``str``
- """
- if keep_bang_comments:
- return space_sub_banged(
- space_subber_banged, '\n%s\n' % script
- ).strip()
- else:
- return space_sub_simple(
- space_subber_simple, '\n%s\n' % script
- ).strip()
-
- return jsmin
-
-jsmin = _make_jsmin()
-
-
-def jsmin_for_posers(script, keep_bang_comments=False):
- r"""
- Minify javascript based on `jsmin.c by Douglas Crockford`_\.
-
- Instead of parsing the stream char by char, it uses a regular
- expression approach which minifies the whole script with one big
- substitution regex.
-
- .. _jsmin.c by Douglas Crockford:
- http://www.crockford.com/javascript/jsmin.c
-
- :Warning: This function is the digest of a _make_jsmin() call. It just
- utilizes the resulting regexes. It's here for fun and may
- vanish any time. Use the `jsmin` function instead.
-
- :Parameters:
- `script` : ``str``
- Script to minify
-
- `keep_bang_comments` : ``bool``
- Keep comments starting with an exclamation mark? (``/*!...*/``)
-
- :Return: Minified script
- :Rtype: ``str``
- """
- if not keep_bang_comments:
- rex = (
- r'([^\047"/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]'
- r'|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]'
- r'|\r?\n|\r)[^"\\\r\n]*)*"))[^\047"/\000-\040]*)|(?<=[(,=:\[!&|?'
- r'{};\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*'
- r'][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\0'
- r'14\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/(?![\r'
- r'\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r'
- r'\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/)[^\047"/\000-\040]*)|(?<'
- r'=[\000-#%-,./:-@\[-^`{-~-]return)(?:[\000-\011\013\014\016-\04'
- r'0]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?['
- r'\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^'
- r'*]*\*+)*/)))*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:'
- r'\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/)['
- r'^\047"/\000-\040]*)|(?<=[^\000-!#%&(*,./:-@\[\\^`{|~])(?:[\000'
- r'-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?'
- r':((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011\013\014\016-\040]|(?'
- r':/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+(?=[^\000-\040"#%-\047)*,.'
- r'/:-@\\-^`|-~])|(?<=[^\000-#%-,./:-@\[-^`{-~-])((?:[\000-\011\0'
- r'13\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=[^\00'
- r'0-#%-,./:-@\[-^`{-~-])|(?<=\+)((?:[\000-\011\013\014\016-\040]'
- r'|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=\+)|(?<=-)((?:[\000-'
- r'\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?'
- r'=-)|(?:[\000-\011\013\014\016-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]'
- r'*\*+)*/))+|(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\0'
- r'16-\040]|(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+'
- )
-
- def subber(match):
- """ Substitution callback """
- groups = match.groups()
- return (
- groups[0] or
- groups[1] or
- groups[2] or
- groups[3] or
- (groups[4] and '\n') or
- (groups[5] and ' ') or
- (groups[6] and ' ') or
- (groups[7] and ' ') or
- ''
- )
- else:
- rex = (
- r'([^\047"/\000-\040]+)|((?:(?:\047[^\047\\\r\n]*(?:\\(?:[^\r\n]'
- r'|\r?\n|\r)[^\047\\\r\n]*)*\047)|(?:"[^"\\\r\n]*(?:\\(?:[^\r\n]'
- r'|\r?\n|\r)[^"\\\r\n]*)*"))[^\047"/\000-\040]*)|((?:/\*![^*]*\*'
- r'+(?:[^/*][^*]*\*+)*/)[^\047"/\000-\040]*)|(?<=[(,=:\[!&|?{};\r'
- r'\n])(?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*'
- r'][^*]*\*+)*/))*(?:(?:(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\0'
- r'14\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*)*((?:/('
- r'?![\r\n/*])[^/\\\[\r\n]*(?:(?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:'
- r'\\[^\r\n][^\\\]\r\n]*)*\]))[^/\\\[\r\n]*)*/)[^\047"/\000-\040]'
- r'*)|(?<=[\000-#%-,./:-@\[-^`{-~-]return)(?:[\000-\011\013\014\0'
- r'16-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*(?:(?:(?://['
- r'^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*'
- r']*\*+(?:[^/*][^*]*\*+)*/)))*((?:/(?![\r\n/*])[^/\\\[\r\n]*(?:('
- r'?:\\[^\r\n]|(?:\[[^\\\]\r\n]*(?:\\[^\r\n][^\\\]\r\n]*)*\]))[^/'
- r'\\\[\r\n]*)*/)[^\047"/\000-\040]*)|(?<=[^\000-!#%&(*,./:-@\[\\'
- r'^`{|~])(?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:['
- r'^/*][^*]*\*+)*/))*(?:((?:(?://[^\r\n]*)?[\r\n]))(?:[\000-\011'
- r'\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+'
- r'(?=[^\000-\040"#%-\047)*,./:-@\\-^`|-~])|(?<=[^\000-#%-,./:-@'
- r'\[-^`{-~-])((?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*'
- r'+(?:[^/*][^*]*\*+)*/)))+(?=[^\000-#%-,./:-@\[-^`{-~-])|(?<=\+)'
- r'((?:[\000-\011\013\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^'
- r'*]*\*+)*/)))+(?=\+)|(?<=-)((?:[\000-\011\013\014\016-\040]|(?:'
- r'/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/)))+(?=-)|(?:[\000-\011\013'
- r'\014\016-\040]|(?:/\*(?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))+|(?:(?'
- r':(?://[^\r\n]*)?[\r\n])(?:[\000-\011\013\014\016-\040]|(?:/\*('
- r'?!!)[^*]*\*+(?:[^/*][^*]*\*+)*/))*)+'
- )
-
- def subber(match):
- """ Substitution callback """
- groups = match.groups()
- return (
- groups[0] or
- groups[1] or
- groups[2] or
- groups[3] or
- groups[4] or
- (groups[5] and '\n') or
- (groups[6] and ' ') or
- (groups[7] and ' ') or
- (groups[8] and ' ') or
- ''
- )
-
- return _re.sub(rex, subber, '\n%s\n' % script).strip()
-
-
-if __name__ == '__main__':
- def main():
- """ Main """
- import sys as _sys
- keep_bang_comments = (
- '-b' in _sys.argv[1:]
- or '-bp' in _sys.argv[1:]
- or '-pb' in _sys.argv[1:]
- )
- if '-p' in _sys.argv[1:] or '-bp' in _sys.argv[1:] \
- or '-pb' in _sys.argv[1:]:
- global jsmin # pylint: disable = W0603
- jsmin = _make_jsmin(python_only=True)
- _sys.stdout.write(jsmin(
- _sys.stdin.read(), keep_bang_comments=keep_bang_comments
- ))
- main()
diff --git a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/setup.py b/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/setup.py
deleted file mode 100644
index d281913400a..00000000000
--- a/chromium/third_party/catapult/third_party/py_vulcanize/third_party/rjsmin/setup.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: ascii -*-
-#
-# Copyright 2006 - 2013
-# Andr\xe9 Malo or his licensors, as applicable
-#
-# 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.
-
-import sys as _sys
-from _setup import run
-
-
-def setup(args=None, _manifest=0):
- """ Main setup function """
- from _setup.ext import Extension
-
- if 'java' in _sys.platform.lower():
- # no c extension for jython
- ext = None
- else:
- ext=[Extension('_rjsmin', sources=['rjsmin.c'])]
-
- return run(script_args=args, ext=ext, manifest_only=_manifest)
-
-
-def manifest():
- """ Create List of packaged files """
- return setup((), _manifest=1)
-
-
-if __name__ == '__main__':
- setup()
diff --git a/chromium/third_party/catapult/tracing/bin/PRESUBMIT.py b/chromium/third_party/catapult/tracing/bin/PRESUBMIT.py
deleted file mode 100644
index 799215d729d..00000000000
--- a/chromium/third_party/catapult/tracing/bin/PRESUBMIT.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import os
-
-def CheckChange(input_api, output_api):
- init_py_path = os.path.join(input_api.PresubmitLocalPath(), '__init__.py')
- res = []
- if os.path.exists(init_py_path):
- res += [output_api.PresubmitError(
- '__init__.py is not allowed to exist in bin/')]
- return res
-
-def CheckChangeOnUpload(input_api, output_api):
- return CheckChange(input_api, output_api)
-
-
-def CheckChangeOnCommit(input_api, output_api):
- return CheckChange(input_api, output_api)
diff --git a/chromium/third_party/catapult/tracing/bin/compare_samples b/chromium/third_party/catapult/tracing/bin/compare_samples
deleted file mode 100755
index ff56ccc69fa..00000000000
--- a/chromium/third_party/catapult/tracing/bin/compare_samples
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import os
-import sys
-
-tracing_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
- '..'))
-sys.path.append(tracing_path)
-from tracing.metrics import compare_samples
-
-def Main(argv):
- parser = argparse.ArgumentParser(
- description='Compare samples.')
- parser.add_argument('sample_a', type=str,
- help='comma-separated list of paths to valuesets from '
- 'sample a')
- parser.add_argument('sample_b', type=str,
- help='comma-separated list of paths to valuesets from '
- 'sample b')
- parser.add_argument('metric', type=str,
- help='name of the metric to compare')
- parser.add_argument('--chartjson', dest='format', action='store_const',
- const='chartjson',
- help='assume chartjson format for the input data')
- parser.add_argument('--buildbot', dest='format', action='store_const',
- const='buildbot',
- help='assume buildbot result line format for the data')
- parser.add_argument('--valueset', dest='format', action='store_const',
- const='valueset',
- help='assume valueset format for the input data')
- args = parser.parse_args(argv[1:])
-
- if not args.format:
- filename = os.path.basename(sample_a.split(',')[0])
- if filename == 'results-valueset.json':
- args.format = 'valueset'
- else:
- args.format = 'chartjson'
-
- vinn_result = compare_samples.CompareSamples(
- args.sample_a,
- args.sample_b,
- args.metric,
- args.format
- )
- print vinn_result.stdout
- return vinn_result.returncode
-
-if __name__ == '__main__':
- sys.exit(Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents b/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents
deleted file mode 100755
index feee8828976..00000000000
--- a/chromium/third_party/catapult/tracing/bin/generate_about_tracing_contents
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from tracing_build import generate_about_tracing_contents
- sys.exit(generate_about_tracing_contents.Main(sys.argv[1:]))
diff --git a/chromium/third_party/catapult/tracing/bin/html2trace b/chromium/third_party/catapult/tracing/bin/html2trace
deleted file mode 100755
index 82161fb1cfd..00000000000
--- a/chromium/third_party/catapult/tracing/bin/html2trace
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import codecs
-import sys
-import os
-
-tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
-sys.path.append(tracing_path)
-from tracing_build import html2trace
-
-
-def main():
- parser = argparse.ArgumentParser(description='Extract trace data from an '
- 'HTML trace.', add_help=False)
- parser.add_argument('html_path', metavar='HTML_PATH',
- help='HTML file path (input).')
- parser.add_argument('trace_path', metavar='TRACE_PATH',
- help='Trace file path (output). If the HTML file '
- 'contains more than one trace data block, the first '
- 'block will be extracted into %(metavar)s and the rest '
- 'will be extracted into separate files %(metavar)s.1, '
- '%(metavar)s.2, etc.')
- parser.add_argument('--gzipped_output', choices=['true', 'false', 'auto'],
- default='auto', help='Flag whether the output trace '
- 'file should be gzipped.')
- parser.add_argument('-q', '--quiet', action='store_true',
- help='Don\'t print the saved file name(s).')
- parser.add_argument('-h', '--help', action='help',
- help='Show this help message and exit.')
- args = parser.parse_args()
-
- if args.gzipped_output == 'true':
- gzipped_output = True
- elif args.gzipped_output == 'false':
- gzipped_output = False
- else:
- gzipped_output = args.trace_path.endswith('.gz')
-
- with codecs.open(args.html_path, mode='r', encoding='utf-8') as html_file:
- saved_paths = html2trace.CopyTraceDataFromHTMLFilePath(
- html_file, args.trace_path, gzipped_output)
-
- if not args.quiet:
- print '\n'.join(saved_paths)
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/chromium/third_party/catapult/tracing/bin/index.html b/chromium/third_party/catapult/tracing/bin/index.html
deleted file mode 100644
index d48ccc92a4a..00000000000
--- a/chromium/third_party/catapult/tracing/bin/index.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<head>
-<script>
-'use strict';
-
-function onTraceViewerImportFail() {
- document.addEventListener('DOMContentLoaded', function() {
- document.body.textContent =
- 'tracing/bin/trace_viewer_full.html is missing. ' +
- 'Run vulcanize_trace_viewer from $TRACE_VIEWER and reload.';
- });
-}
-</script>
-<link rel="import" href="trace_viewer_full.html"
- onerror="onTraceViewerImportFail(event)">
-
-<style>
- html, body {
- box-sizing: border-box;
- overflow: hidden;
- margin: 0px;
- padding: 0;
- width: 100%;
- height: 100%;
- }
- #trace-viewer {
- width: 100%;
- height: 100%;
- }
- #trace-viewer:focus {
- outline: none;
- }
-</style>
-<script>
-'use strict';
-
-(function() {
- var viewer;
- var url;
- var model;
-
- function load() {
- var req = new XMLHttpRequest();
- var is_binary = /[.]gz$/.test(url) || /[.]zip$/.test(url);
- req.overrideMimeType('text/plain; charset=x-user-defined');
- req.open('GET', url, true);
- if (is_binary)
- req.responseType = 'arraybuffer';
-
- req.onreadystatechange = function(event) {
- if (req.readyState !== 4)
- return;
-
- window.setTimeout(function() {
- if (req.status === 200)
- onResult(is_binary ? req.response : req.responseText);
- else
- onResultFail(req.status);
- }, 0);
- };
- req.send(null);
- }
-
- function onResultFail(err) {
- var overlay = new tr.ui.b.Overlay();
- overlay.textContent = err + ': ' + url + ' could not be loaded';
- overlay.title = 'Failed to fetch data';
- overlay.visible = true;
- }
-
- function onResult(result) {
- model = new tr.Model();
- var i = new tr.importer.Import(model);
- var p = i.importTracesWithProgressDialog([result]);
- p.then(onModelLoaded, onImportFail);
- }
-
- function onModelLoaded() {
- viewer.model = model;
- viewer.viewTitle = url;
- }
-
- function onImportFail() {
- var overlay = new tr.ui.b.Overlay();
- overlay.textContent = tr.b.normalizeException(err).message;
- overlay.title = 'Import error';
- overlay.visible = true;
- }
-
- document.addEventListener('DOMContentLoaded', function() {
- var container = document.createElement('track-view-container');
- container.id = 'track_view_container';
-
- viewer = document.createElement('tr-ui-timeline-view');
- viewer.track_view_container = container;
- Polymer.dom(viewer).appendChild(container);
-
- viewer.id = 'trace-viewer';
- viewer.globalMode = true;
- Polymer.dom(document.body).appendChild(viewer);
-
- url = '../test_data/big_trace.json';
- load();
- });
-}());
-</script>
-</head>
-<body>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/tracing/bin/map_traces b/chromium/third_party/catapult/tracing/bin/map_traces
deleted file mode 100755
index af58491504d..00000000000
--- a/chromium/third_party/catapult/tracing/bin/map_traces
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
- '..'))
- sys.path.append(tracing_path)
- from tracing.mre import map_traces
- sys.exit(map_traces.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/merge_traces b/chromium/third_party/catapult/tracing/bin/merge_traces
deleted file mode 100755
index 4b610dd0699..00000000000
--- a/chromium/third_party/catapult/tracing/bin/merge_traces
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from tracing_build import merge_traces
- sys.exit(merge_traces.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/run_dev_server_tests b/chromium/third_party/catapult/tracing/bin/run_dev_server_tests
deleted file mode 100755
index bd09476721e..00000000000
--- a/chromium/third_party/catapult/tracing/bin/run_dev_server_tests
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..', '..'))
- sys.path.append(tracing_path)
- from catapult_build import run_dev_server_tests
- sys.exit(run_dev_server_tests.Main(sys.argv + ['--tests=tracing']))
diff --git a/chromium/third_party/catapult/tracing/bin/run_metric b/chromium/third_party/catapult/tracing/bin/run_metric
deleted file mode 100755
index c1d913c5658..00000000000
--- a/chromium/third_party/catapult/tracing/bin/run_metric
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import codecs
-import json
-import os
-import sys
-
-sys.path.insert(1, os.path.join(os.path.dirname(__file__), '..'))
-from tracing import results_renderer
-from tracing.metrics import metric_runner
-from tracing.metrics import discover
-
-def Main(argv):
- all_metrics = discover.DiscoverMetrics(
- ['/tracing/metrics/all_metrics.html'])
-
- parser = argparse.ArgumentParser(
- description='Runs metrics on local traces')
- parser.add_argument('trace_file_or_dir',
- help='A trace file, or a dir containing trace files')
- parser.add_argument('metrics', nargs='+',
- help=('Function names of registered metrics '
- '(not filenames.) '
- 'Available metrics are: %s' %
- ', '.join(all_metrics)),
- choices=all_metrics, metavar='metricName')
- parser.add_argument('--filename', default='results2', type=str,
- help='Output file name (no extension)')
- parser.add_argument('--reset', action='store_true',
- help=('Whether to ignore existing results in HTML file '
- '(if it exists'))
- parser.add_argument('--also-output-json', action='store_true',
- help=('Also output json file containing values. Note that'
- 'this only contains the results of current run'))
-
- args = parser.parse_args(argv[1:])
- trace_file_or_dir = os.path.abspath(args.trace_file_or_dir)
-
- if os.path.isdir(trace_file_or_dir):
- trace_dir = trace_file_or_dir
- traces = [os.path.join(trace_dir, trace) for trace in os.listdir(trace_dir)]
- else:
- traces = [trace_file_or_dir]
-
- failures = []
- histograms = []
- for trace_url, mre_result in metric_runner.RunMetricOnTraces(
- traces, args.metrics).iteritems():
- failures.extend(mre_result.failures)
- histograms.extend(mre_result.pairs.get('histograms', []))
-
- if failures:
- print 'Running metric failed:'
- for failure in failures:
- print failure['stack']
-
- output_file = args.filename + '.html'
- open(output_file, 'a').close() # Create file if it doesn't exist.
- with codecs.open(output_file, mode='r+', encoding='utf-8') as output_stream:
- results_renderer.RenderHTMLView(histograms, output_stream, args.reset)
- print 'HTML result created in file://' + os.path.abspath(output_file)
-
- if args.also_output_json:
- output_file = args.filename + '.json'
- with open(output_file, 'w') as f:
- json.dump(histograms, f, indent=2, sort_keys=True, separators=(',', ': '))
- print 'JSON result created in file://' + os.path.abspath(output_file)
-
-
-if __name__ == '__main__':
- sys.exit(Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/run_node_tests b/chromium/third_party/catapult/tracing/bin/run_node_tests
deleted file mode 100755
index d044e0f1c22..00000000000
--- a/chromium/third_party/catapult/tracing/bin/run_node_tests
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env node
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-'use strict';
-
-var fs = require('fs');
-var path = require('path');
-
-var catapultPath = fs.realpathSync(path.join(__dirname, '..', '..'));
-var catapultBuildPath = path.join(catapultPath, 'catapult_build');
-
-var node_bootstrap = require(path.join(catapultBuildPath, 'node_bootstrap.js'));
-
-HTMLImportsLoader.addArrayToSourcePath(
- node_bootstrap.getSourcePathsForProject('tracing'));
-
-// Go!
-var headless_test_module_filenames =
- node_bootstrap.getHeadlessTestModuleFilenamesForProject('tracing');
-
-HTMLImportsLoader.loadHTML('/tracing/base/headless_tests.html');
-tr.b.unittest.loadAndRunTests(headless_test_module_filenames); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/bin/run_py_tests b/chromium/third_party/catapult/tracing/bin/run_py_tests
deleted file mode 100755
index 23a6ceaa31f..00000000000
--- a/chromium/third_party/catapult/tracing/bin/run_py_tests
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import platform
-import sys
-
-_CATAPULT_PATH = os.path.abspath(
- os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- os.path.pardir,
- os.path.pardir))
-_TRACING_PATH = os.path.join(_CATAPULT_PATH, 'tracing')
-
-
-def _RunTestsOrDie(top_level_dir):
- exit_code = run_with_typ.Run(top_level_dir, path=[_TRACING_PATH])
- if exit_code:
- sys.exit(exit_code)
-
-
-def _AddToPathIfNeeded(path):
- if path not in sys.path:
- sys.path.insert(0, path)
-
-
-if __name__ == '__main__':
- _AddToPathIfNeeded(_CATAPULT_PATH)
-
- from hooks import install
- if '--no-install-hooks' in sys.argv:
- sys.argv.remove('--no-install-hooks')
- else:
- install.InstallHooks()
-
- from catapult_build import run_with_typ
- _RunTestsOrDie(os.path.join(_TRACING_PATH, 'tracing'))
- _RunTestsOrDie(os.path.join(_TRACING_PATH, 'tracing_build'))
- sys.exit(0)
diff --git a/chromium/third_party/catapult/tracing/bin/run_tests b/chromium/third_party/catapult/tracing/bin/run_tests
deleted file mode 100755
index df95b1d6c4e..00000000000
--- a/chromium/third_party/catapult/tracing/bin/run_tests
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-
-_THIS_PATH = os.path.dirname(os.path.realpath(__file__))
-_TESTS = [
- {'path': os.path.join(_THIS_PATH, 'run_py_tests')},
- {'path': os.path.join(_THIS_PATH, 'run_vinn_tests'),
- 'disabled': {'win32'}},
- {'path': os.path.join(_THIS_PATH, 'run_dev_server_tests'),
- 'chrome_path_arg': True}
-]
-
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from catapult_build import test_runner
- sys.exit(test_runner.Main('tracing', _TESTS, sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/run_vinn_tests b/chromium/third_party/catapult/tracing/bin/run_vinn_tests
deleted file mode 100755
index 42ec180f119..00000000000
--- a/chromium/third_party/catapult/tracing/bin/run_vinn_tests
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from tracing_build import run_vinn_tests
- sys.exit(run_vinn_tests.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/slim_trace b/chromium/third_party/catapult/tracing/bin/slim_trace
deleted file mode 100755
index 2e170777840..00000000000
--- a/chromium/third_party/catapult/tracing/bin/slim_trace
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-import os
-
-tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
-sys.path.append(tracing_path)
-from tracing_build import slim_trace
-
-
-if __name__ == '__main__':
- sys.exit(slim_trace.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/strip_memory_infra_trace b/chromium/third_party/catapult/tracing/bin/strip_memory_infra_trace
deleted file mode 100755
index 8bdc8375d75..00000000000
--- a/chromium/third_party/catapult/tracing/bin/strip_memory_infra_trace
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
- sys.path.append(tracing_path)
- from tracing_build import strip_memory_infra_trace
- sys.exit(strip_memory_infra_trace.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/symbolize_trace b/chromium/third_party/catapult/tracing/bin/symbolize_trace
deleted file mode 100755
index ecfbb673bf0..00000000000
--- a/chromium/third_party/catapult/tracing/bin/symbolize_trace
+++ /dev/null
@@ -1,409 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import bisect
-import collections
-import gzip
-import json
-import os
-import re
-import subprocess
-import sys
-
-_SYMBOLS_PATH = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- '..',
- 'third_party',
- 'symbols'))
-sys.path.append(_SYMBOLS_PATH)
-# pylint: disable=import-error
-import symbols.elf_symbolizer as elf_symbolizer
-
-
-# Relevant trace event phases from Chromium's
-# src/base/trace_event/common/trace_event_common.h.
-TRACE_EVENT_PHASE_METADATA = 'M'
-TRACE_EVENT_PHASE_MEMORY_DUMP = 'v'
-
-
-# Matches Android library paths, supports both K (/data/app-lib/<>/lib.so)
-# as well as L+ (/data/app/<>/lib/<>/lib.so). Library name is available
-# via 'name' group.
-ANDROID_PATH_MATCHER = re.compile(
- r'^/data/(?:'
- r'app/[^/]+/lib/[^/]+/|'
- r'app-lib/[^/]+/|'
- r'data/[^/]+/incremental-install-files/lib/'
- r')(?P<name>.*\.so)')
-
-# Subpath of output path where unstripped libraries are stored.
-ANDROID_UNSTRIPPED_SUBPATH = 'lib.unstripped'
-
-
-def FindInSystemPath(binary_name):
- paths = os.environ['PATH'].split(os.pathsep)
- for path in paths:
- binary_path = os.path.join(path, binary_name)
- if os.path.isfile(binary_path):
- return binary_path
- return None
-
-
-def IsSymbolizableFile(file_path):
- result = subprocess.check_output(['file', '-0', file_path])
- type_string = result[result.find('\0') + 1:]
- return bool(re.match(r'\: (ELF|Mach-O) (32|64)-bit\b', type_string))
-
-
-class ProcessMemoryMaps(object):
- """Represents 'process_mmaps' trace file entry."""
-
- class Region(object):
- def __init__(self, start_address, size, file_path):
- self._start_address = start_address
- self._size = size
- self._file_path = file_path
-
- @property
- def start_address(self):
- return self._start_address
-
- @property
- def end_address(self):
- return self._start_address + self._size
-
- @property
- def size(self):
- return self._size
-
- @property
- def file_path(self):
- return self._file_path
-
- def __cmp__(self, other):
- if isinstance(other, type(self)):
- return long(self._start_address).__cmp__(long(other._start_address))
- elif isinstance(other, (long, int)):
- return long(self._start_address).__cmp__(long(other))
- else:
- raise Exception('Cannot compare with %s' % type(other))
-
- def __repr__(self):
- return 'Region(0x{:X} - 0x{:X}, {})'.format(
- self.start_address, self.end_address, self.file_path)
-
- def __init__(self, process_mmaps):
- """Parses 'process_mmaps' dictionary."""
-
- regions = []
- for region_value in process_mmaps['vm_regions']:
- regions.append(self.Region(
- long(region_value['sa'], 16),
- long(region_value['sz'], 16),
- region_value['mf']))
- regions.sort()
-
- # Copy regions without duplicates and check for overlaps.
- self._regions = []
- previous_region = None
- for region in regions:
- if previous_region is not None:
- if region == previous_region:
- continue
- assert region.start_address >= previous_region.end_address, \
- 'Regions {} and {} overlap.'.format(previous_region, region)
- previous_region = region
- self._regions.append(region)
-
- @property
- def regions(self):
- return self._regions
-
- def FindRegion(self, address):
- """Finds region containing |address|. Returns None if none found."""
-
- region_index = bisect.bisect_right(self._regions, address) - 1
- if region_index >= 0:
- region = self._regions[region_index]
- if address >= region.start_address and address < region.end_address:
- return region
- return None
-
-
-class StackFrames(object):
- """Represents 'stackFrames' trace file entry."""
-
- class PCFrame(object):
- def __init__(self, pc, frame):
- self._modified = False
- self._pc = pc
- self._frame = frame
-
- @property
- def modified(self):
- return self._modified
-
- @property
- def pc(self):
- return self._pc
-
- @property
- def name(self):
- return self._frame['name']
-
- @name.setter
- def name(self, value):
- self._modified = True
- self._frame['name'] = value
-
- def __init__(self, stack_frames):
- """Constructs object using 'stackFrames' dictionary."""
- self._pc_frames = []
- for frame in stack_frames.itervalues():
- pc_frame = self._ParsePCFrame(frame)
- if pc_frame:
- self._pc_frames.append(pc_frame)
-
- @property
- def pc_frames(self):
- return self._pc_frames
-
- @property
- def modified(self):
- return any(f.modified for f in self._pc_frames)
-
- _PC_TAG = 'pc:'
-
- @classmethod
- def _ParsePCFrame(self, frame):
- name = frame['name']
- if not name.startswith(self._PC_TAG):
- return None
- pc = long(name[len(self._PC_TAG):], 16)
- return self.PCFrame(pc, frame)
-
-
-class Process(object):
- """Holds various bits of information about a process in a trace file."""
-
- def __init__(self, pid):
- self.pid = pid
- self.name = None
- self.mmaps = None
- self.stack_frames = None
-
-
-def CollectProcesses(trace):
- """Parses trace dictionary and returns pid->Process map of all processes
- suitable for symbolization (which have both mmaps and stack_frames).
- """
-
- process_map = {}
-
- # Android traces produced via 'chrome://inspect/?tracing#devices' are
- # just list of events.
- events = trace if isinstance(trace, list) else trace['traceEvents']
- for event in events:
- name = event.get('name')
- if not name:
- continue
-
- pid = event['pid']
- process = process_map.get(pid)
- if process is None:
- process = Process(pid)
- process_map[pid] = process
-
- phase = event['ph']
- if phase == TRACE_EVENT_PHASE_METADATA:
- if name == 'process_name':
- process.name = event['args']['name']
- elif name == 'stackFrames':
- process.stack_frames = StackFrames(event['args']['stackFrames'])
- elif phase == TRACE_EVENT_PHASE_MEMORY_DUMP:
- process_mmaps = event['args']['dumps'].get('process_mmaps')
- if process_mmaps:
- # TODO(dskiba): this parses all process_mmaps, but retains only the
- # last one. We need to parse only once (lazy parsing?).
- process.mmaps = ProcessMemoryMaps(process_mmaps)
-
- return [p for p in process_map.itervalues() if p.mmaps and p.stack_frames]
-
-
-class SymbolizableFile(object):
- """Holds file path, addresses to symbolize and stack frames to update.
-
- This class is a link between ELFSymbolizer and a trace file: it specifies
- what to symbolize (addresses) and what to update with the symbolization
- result (frames).
- """
- def __init__(self, file_path):
- self.path = file_path
- self.symbolizable_path = file_path # path to use for symbolization
- self.frames_by_address = collections.defaultdict(list)
-
-
-def ResolveSymbolizableFiles(processes):
- """Resolves and groups PCs into list of SymbolizableFiles.
-
- As part of the grouping process, this function resolves PC from each stack
- frame to the corresponding mmap region. Stack frames that failed to resolve
- are symbolized with '<unresolved>'.
- """
- symfile_by_path = {}
- for process in processes:
- for frame in process.stack_frames.pc_frames:
- region = process.mmaps.FindRegion(frame.pc)
- if region is None:
- frame.name = '<unresolved>'
- continue
-
- symfile = symfile_by_path.get(region.file_path)
- if symfile is None:
- symfile = SymbolizableFile(region.file_path)
- symfile_by_path[symfile.path] = symfile
-
- relative_pc = frame.pc - region.start_address
- symfile.frames_by_address[relative_pc].append(frame)
- return symfile_by_path.values()
-
-
-def SymbolizeFiles(symfiles, addr2line_path):
- """Symbolizes each file in the given list of SymbolizableFiles
- and updates stack frames with symbolization results."""
- print 'Symbolizing...'
-
- def _SubPrintf(message, *args):
- print (' ' + message).format(*args)
-
- symbolized = False
- for symfile in symfiles:
- unsymbolized_name = '<{}>'.format(
- symfile.path if symfile.path else 'unnamed')
-
- problem = None
- if not os.path.isabs(symfile.symbolizable_path):
- problem = 'not a file'
- elif not os.path.isfile(symfile.symbolizable_path):
- problem = "file doesn't exist"
- elif not IsSymbolizableFile(symfile.symbolizable_path):
- problem = 'file is not symbolizable'
- if problem:
- _SubPrintf("Won't symbolize {} PCs for '{}': {}.",
- len(symfile.frames_by_address),
- symfile.symbolizable_path,
- problem)
- for frames in symfile.frames_by_address.itervalues():
- for frame in frames:
- frame.name = unsymbolized_name
- continue
-
- def _SymbolizerCallback(sym_info, frames):
- # Unwind inline chain to the top.
- while sym_info.inlined_by:
- sym_info = sym_info.inlined_by
-
- symbolized_name = sym_info.name if sym_info.name else unsymbolized_name
- for frame in frames:
- frame.name = symbolized_name
-
- symbolizer = elf_symbolizer.ELFSymbolizer(symfile.symbolizable_path,
- addr2line_path,
- _SymbolizerCallback,
- inlines=True)
-
- _SubPrintf('Symbolizing {} PCs from {}...',
- len(symfile.frames_by_address),
- symfile.path)
-
- for address, frames in symfile.frames_by_address.iteritems():
- # SymbolizeAsync() asserts that the type of address is int. We operate
- # on longs (since they are raw pointers possibly from 64-bit processes).
- # It's OK to cast here because we're passing relative PC, which should
- # always fit into int.
- symbolizer.SymbolizeAsync(int(address), frames)
-
- symbolizer.Join()
- symbolized = True
-
- return symbolized
-
-
-def HaveFilesFromAndroid(symfiles):
- return any(ANDROID_PATH_MATCHER.match(f.path) for f in symfiles)
-
-
-def RemapAndroidFiles(symfiles, output_path):
- for symfile in symfiles:
- match = ANDROID_PATH_MATCHER.match(symfile.path)
- if match:
- name = match.group('name')
- symfile.symbolizable_path = os.path.join(
- output_path, ANDROID_UNSTRIPPED_SUBPATH, name)
- else:
- # Clobber file path to trigger "not a file" problem in SymbolizeFiles().
- # Without this, files won't be symbolized with "file not found" problem,
- # which is not accurate.
- symfile.symbolizable_path = 'android://{}'.format(symfile.path)
-
-
-# Suffix used for backup files.
-BACKUP_FILE_TAG = '.BACKUP'
-
-def main():
- parser = argparse.ArgumentParser()
- parser.add_argument('file',
- help='Trace file to symbolize (.json or .json.gz)')
- parser.add_argument('--no-backup',
- dest='backup', default='true', action='store_false',
- help="Don't create {} files".format(BACKUP_FILE_TAG))
- parser.add_argument('--output-directory',
- help='The path to the build output directory, such ' +
- 'as out/Debug. Only needed for Android.')
- options = parser.parse_args()
-
- trace_file_path = options.file
- def _OpenTraceFile(mode):
- if trace_file_path.endswith('.gz'):
- return gzip.open(trace_file_path, mode + 'b')
- else:
- return open(trace_file_path, mode + 't')
-
- addr2line_path = FindInSystemPath('addr2line')
- if addr2line_path is None:
- sys.exit("Can't symbolize - no addr2line in PATH.")
-
- print 'Reading trace file...'
- with _OpenTraceFile('r') as trace_file:
- trace = json.load(trace_file)
-
- processes = CollectProcesses(trace)
- symfiles = ResolveSymbolizableFiles(processes)
-
- # Android trace files don't have any indication they are from Android.
- # So we're checking for Android-specific paths.
- if HaveFilesFromAndroid(symfiles):
- if not options.output_directory:
- parser.error('The trace file appears to be from Android. Please '
- "specify output directory (e.g. 'out/Debug') to properly "
- 'symbolize it.')
- RemapAndroidFiles(symfiles, os.path.abspath(options.output_directory))
-
- if SymbolizeFiles(symfiles, addr2line_path):
- if options.backup:
- backup_file_path = trace_file_path + BACKUP_FILE_TAG
- print 'Backing up trace file to {}...'.format(backup_file_path)
- os.rename(trace_file_path, backup_file_path)
-
- print 'Updating trace file...'
- with _OpenTraceFile('w') as trace_file:
- json.dump(trace, trace_file)
- else:
- print 'No PCs symbolized - not updating trace file.'
-
-
-if __name__ == '__main__':
- main()
diff --git a/chromium/third_party/catapult/tracing/bin/trace2html b/chromium/third_party/catapult/tracing/bin/trace2html
deleted file mode 100755
index 0457d39a66b..00000000000
--- a/chromium/third_party/catapult/tracing/bin/trace2html
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-import os
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from tracing_build import trace2html
- sys.exit(trace2html.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/update_gypi b/chromium/third_party/catapult/tracing/bin/update_gypi
deleted file mode 100755
index a4e54fdf348..00000000000
--- a/chromium/third_party/catapult/tracing/bin/update_gypi
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from tracing_build import update_gypi
- sys.exit(update_gypi.Update())
diff --git a/chromium/third_party/catapult/tracing/bin/validate_all_metrics b/chromium/third_party/catapult/tracing/bin/validate_all_metrics
deleted file mode 100755
index b4b26307bc1..00000000000
--- a/chromium/third_party/catapult/tracing/bin/validate_all_metrics
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import json
-import os
-import string
-import sys
-
-sys.path.insert(
- 1,
- os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
-from tracing.metrics import discover
-import tracing_project
-
-
-def Main():
- all_registered_metrics = set(discover.DiscoverMetrics(
- ['/tracing/metrics/all_metrics.html']))
- all_modules = list(
- '/' + rel_path for rel_path in
- tracing_project.TracingProject().FindAllMetricsModuleRelPaths())
- all_possible_metrics = set(discover.DiscoverMetrics(all_modules))
- unregistered_metrics = all_possible_metrics - all_registered_metrics
- if unregistered_metrics:
- print ('These metrics are unregistered: %s. Please import their modules in '
- 'tracing/tracing/metrics/all_metrics.html' %
- ', '.join(unregistered_metrics))
- return 1
- uppercased_metrics = []
- for m in all_possible_metrics:
- if str.isupper(m[0]):
- uppercased_metrics.append(m)
- if uppercased_metrics:
- print ('These metrics must be renamed to start with a lower-case: %s' %
- uppercased_metrics)
- return 1
- return 0
-
-if __name__ == '__main__':
- sys.exit(Main())
diff --git a/chromium/third_party/catapult/tracing/bin/vulcanize_trace_viewer b/chromium/third_party/catapult/tracing/bin/vulcanize_trace_viewer
deleted file mode 100755
index c3602d40447..00000000000
--- a/chromium/third_party/catapult/tracing/bin/vulcanize_trace_viewer
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- from tracing_build import vulcanize_trace_viewer
- sys.exit(vulcanize_trace_viewer.Main(sys.argv))
diff --git a/chromium/third_party/catapult/tracing/bin/why_imported b/chromium/third_party/catapult/tracing/bin/why_imported
deleted file mode 100755
index 9b5a59a6f49..00000000000
--- a/chromium/third_party/catapult/tracing/bin/why_imported
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Produces a dot file showing dependency relationships between modules.
-
-The dot file contains a text-based representation of a directed graph that
-explains why given module names were included in a trace_viewer config.
-
-Example usage:
-$ ./why_imported tracing.ui.analysis.analysis_view > ~/analysis_view.dot
-
-This can then be converted to a graphical representation with the dot tool:
-$ dot -Grankdir=LR -Tpng ~/analysis_view.dot -o ~/analysis_view.png
-"""
-
-import os
-import sys
-import argparse
-
-
-def Main():
- project = tracing_project.TracingProject()
-
- parser = argparse.ArgumentParser(
- usage='%(prog)s <options> moduleNames', epilog=__doc__)
- parser.add_argument('--config', choices=project.GetConfigNames())
- parser.add_argument('module_names', nargs='+')
- args = parser.parse_args()
-
- if args.config:
- names = [project.GetModuleNameForConfigName(options.config)]
- vulcanizer = project.CreateVulcanizer()
- load_sequence = vulcanizer.CalcLoadSequenceForModuleNames(names)
- else:
- parser.error('No config specified.')
- print vulcanizer.GetDominatorGraphForModulesNamed(
- args.module_names, load_sequence)
-
-
-if __name__ == '__main__':
- tracing_path = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)), '..'))
- sys.path.append(tracing_path)
- import tracing_project
- tracing_project.UpdateSysPathIfNeeded()
- sys.exit(Main())
diff --git a/chromium/third_party/catapult/tracing/third_party/chai/LICENSE b/chromium/third_party/catapult/tracing/third_party/chai/LICENSE
deleted file mode 100644
index 227b598fc61..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/chai/LICENSE
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2011-2015 Jake Luer jake@alogicalparadox.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/chromium/third_party/catapult/tracing/third_party/chai/README.chromium b/chromium/third_party/catapult/tracing/third_party/chai/README.chromium
deleted file mode 100644
index 4a1fb8e791a..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/chai/README.chromium
+++ /dev/null
@@ -1,15 +0,0 @@
-Name: chai
-Short Name: chai
-URL: https://github.com/chaijs/chai
-Version: 2.1.2
-Revision: 1abc3845e3ef96afa003d62478692a1cb9a435b0
-Date: Fri Mar 20 09:46:02 2015 +0000
-License: MIT
-License File: NOT_SHIPPED
-Security Critical: no
-
-Description:
-BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
-
-Local Modifications:
-Copied license text out of README.md. Unminified chai.js and ripped out parts pertaining to Buffer because we're not using node and don't want could-not-require exceptions to be thrown. Reminified to prevent jslint from complaining.
diff --git a/chromium/third_party/catapult/tracing/third_party/chai/chai.js b/chromium/third_party/catapult/tracing/third_party/chai/chai.js
deleted file mode 100644
index 5956853750b..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/chai/chai.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(){function require(e){var t=require.modules[e];if(t)return"exports"in t||"function"!=typeof t.definition||(t.client=t.component=!0,t.definition.call(this,t.exports={},t),delete t.definition),t.exports}require.loader="component",require.helper={},require.helper.semVerSort=function(e,t){for(var r=e.version.split("."),i=t.version.split("."),n=0;n<r.length;++n){var o=parseInt(r[n],10),s=parseInt(i[n],10);if(o!==s)return o>s?1:-1;var a=r[n].substr((""+o).length),c=i[n].substr((""+s).length);if(""===a&&""!==c)return 1;if(""!==a&&""===c)return-1;if(""!==a&&""!==c)return a>c?1:-1}return 0},require.latest=function(e,t){function r(e){throw new Error('failed to find latest module of "'+e+'"')}var i=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/,n=/(.*)~(.*)/;n.test(e)||r(e);for(var o=Object.keys(require.modules),s=[],a=[],c=0;c<o.length;c++){var u=o[c];if(new RegExp(e+"@").test(u)){var h=u.substr(e.length+1),l=i.exec(u);null!=l?s.push({version:h,name:u}):a.push({version:h,name:u})}}if(0===s.concat(a).length&&r(e),s.length>0){var f=s.sort(require.helper.semVerSort).pop().name;return t===!0?f:require(f)}var f=a.sort(function(e,t){return e.name>t.name})[0].name;return t===!0?f:require(f)},require.modules={},require.register=function(e,t){require.modules[e]={definition:t}},require.define=function(e,t){require.modules[e]={exports:t}},require.register("chaijs~assertion-error@1.0.0",function(e,t){function r(){function e(e,r){Object.keys(r).forEach(function(i){~t.indexOf(i)||(e[i]=r[i])})}var t=[].slice.call(arguments);return function(){for(var t=[].slice.call(arguments),r=0,i={};r<t.length;r++)e(i,t[r]);return i}}function i(e,t,i){var n=r("name","message","stack","constructor","toJSON"),o=n(t||{});this.message=e||"Unspecified AssertionError",this.showDiff=!1;for(var s in o)this[s]=o[s];i=i||arguments.callee,i&&Error.captureStackTrace&&Error.captureStackTrace(this,i)}t.exports=i,i.prototype=Object.create(Error.prototype),i.prototype.name="AssertionError",i.prototype.constructor=i,i.prototype.toJSON=function(e){var t=r("constructor","toJSON","stack"),i=t({name:this.name},this);return!1!==e&&this.stack&&(i.stack=this.stack),i}}),require.register("chaijs~type-detect@0.1.1",function(e,t){function r(e){var t=Object.prototype.toString.call(e);return n[t]?n[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function i(){this.tests={}}var e=t.exports=r,n={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};e.Library=i,i.prototype.of=r,i.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},i.prototype.test=function(e,t){if(t===r(e))return!0;var i=this.tests[t];if(i&&"regexp"===r(i))return i.test(e);if(i&&"function"===r(i))return i(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}}),require.register("chaijs~deep-eql@0.1.3",function(e,t){function r(e,t,r){return i(e,t)?!0:"date"===f(e)?o(e,t):"regexp"===f(e)?s(e,t):"arguments"===f(e)?a(e,t,r):n(e,t)?"object"!==f(e)&&"object"!==f(t)&&"array"!==f(e)&&"array"!==f(t)?i(e,t):l(e,t,r):!1}function i(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function n(e,t){return f(e)===f(t)}function o(e,t){return"date"!==f(t)?!1:i(e.getTime(),t.getTime())}function s(e,t){return"regexp"!==f(t)?!1:i(e.toString(),t.toString())}function a(e,t,i){return"arguments"!==f(t)?!1:(e=[].slice.call(e),t=[].slice.call(t),r(e,t,i))}function c(e){var t=[];for(var r in e)t.push(r);return t}function u(e,t){if(e.length!==t.length)return!1;for(var r=0,i=!0;r<e.length;r++)if(e[r]!==t[r]){i=!1;break}return i}function h(e){return null!==e&&void 0!==e}function l(e,t,i){if(!h(e)||!h(t))return!1;if(e.prototype!==t.prototype)return!1;var n;if(i){for(n=0;n<i.length;n++)if(i[n][0]===e&&i[n][1]===t||i[n][0]===t&&i[n][1]===e)return!0}else i=[];try{var o=c(e),s=c(t)}catch(a){return!1}if(o.sort(),s.sort(),!u(o,s))return!1;i.push([e,t]);var l;for(n=o.length-1;n>=0;n--)if(l=o[n],!r(e[l],t[l],i))return!1;return!0}var f=require("chaijs~type-detect@0.1.1");t.exports=r}),require.register("chai",function(e,t){t.exports=require("chai/lib/chai.js")}),require.register("chai/lib/chai.js",function(e,t){var r=[],e=t.exports={};e.version="2.1.0",e.AssertionError=require("chaijs~assertion-error@1.0.0");var i=require("chai/lib/chai/utils/index.js");e.use=function(e){return~r.indexOf(e)||(e(this,i),r.push(e)),this},e.util=i;var n=require("chai/lib/chai/config.js");e.config=n;var o=require("chai/lib/chai/assertion.js");e.use(o);var s=require("chai/lib/chai/core/assertions.js");e.use(s);var a=require("chai/lib/chai/interface/expect.js");e.use(a);var c=require("chai/lib/chai/interface/should.js");e.use(c);var u=require("chai/lib/chai/interface/assert.js");e.use(u)}),require.register("chai/lib/chai/assertion.js",function(e,t){var r=require("chai/lib/chai/config.js");t.exports=function(e,t){function i(e,t,r){o(this,"ssfi",r||arguments.callee),o(this,"object",e),o(this,"message",t)}var n=e.AssertionError,o=t.flag;e.Assertion=i,Object.defineProperty(i,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),r.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),r.includeStack=e}}),Object.defineProperty(i,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),r.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),r.showDiff=e}}),i.addProperty=function(e,r){t.addProperty(this.prototype,e,r)},i.addMethod=function(e,r){t.addMethod(this.prototype,e,r)},i.addChainableMethod=function(e,r,i){t.addChainableMethod(this.prototype,e,r,i)},i.overwriteProperty=function(e,r){t.overwriteProperty(this.prototype,e,r)},i.overwriteMethod=function(e,r){t.overwriteMethod(this.prototype,e,r)},i.overwriteChainableMethod=function(e,r,i){t.overwriteChainableMethod(this.prototype,e,r,i)},i.prototype.assert=function(e,i,s,a,c,u){var h=t.test(this,arguments);if(!0!==u&&(u=!1),!0!==r.showDiff&&(u=!1),!h){var i=t.getMessage(this,arguments),l=t.getActual(this,arguments);throw new n(i,{actual:l,expected:a,showDiff:u},r.includeStack?this.assert:o(this,"ssfi"))}},Object.defineProperty(i.prototype,"_obj",{get:function(){return o(this,"object")},set:function(e){o(this,"object",e)}})}}),require.register("chai/lib/chai/config.js",function(e,t){t.exports={includeStack:!1,showDiff:!0,truncateThreshold:40}}),require.register("chai/lib/chai/core/assertions.js",function(e,t){t.exports=function(e,t){function r(e,r){r&&q(this,"message",r),e=e.toLowerCase();var i=q(this,"object"),n=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";this.assert(e===t.type(i),"expected #{this} to be "+n+e,"expected #{this} not to be "+n+e)}function i(){q(this,"contains",!0)}function n(e,r){r&&q(this,"message",r);var i=q(this,"object"),n=!1;if("array"===t.type(i)&&"object"===t.type(e)){for(var o in i)if(t.eql(i[o],e)){n=!0;break}}else if("object"===t.type(e)){if(!q(this,"negate")){for(var s in e)new m(i).property(s,e[s]);return}var a={};for(var s in e)a[s]=i[s];n=t.eql(a,e)}else n=i&&~i.indexOf(e);this.assert(n,"expected #{this} to include "+t.inspect(e),"expected #{this} to not include "+t.inspect(e))}function o(){var e=q(this,"object"),t=Object.prototype.toString.call(e);this.assert("[object Arguments]"===t,"expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}function s(e,t){t&&q(this,"message",t);var r=q(this,"object");return q(this,"deep")?this.eql(e):void this.assert(e===r,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}function a(e,r){r&&q(this,"message",r),this.assert(t.eql(e,q(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}function c(e,t){t&&q(this,"message",t);var r=q(this,"object");if(q(this,"doLength")){new m(r,t).to.have.property("length");var i=r.length;this.assert(i>e,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,i)}else this.assert(r>e,"expected #{this} to be above "+e,"expected #{this} to be at most "+e)}function u(e,t){t&&q(this,"message",t);var r=q(this,"object");if(q(this,"doLength")){new m(r,t).to.have.property("length");var i=r.length;this.assert(i>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,i)}else this.assert(r>=e,"expected #{this} to be at least "+e,"expected #{this} to be below "+e)}function h(e,t){t&&q(this,"message",t);var r=q(this,"object");if(q(this,"doLength")){new m(r,t).to.have.property("length");var i=r.length;this.assert(e>i,"expected #{this} to have a length below #{exp} but got #{act}","expected #{this} to not have a length below #{exp}",e,i)}else this.assert(e>r,"expected #{this} to be below "+e,"expected #{this} to be at least "+e)}function l(e,t){t&&q(this,"message",t);var r=q(this,"object");if(q(this,"doLength")){new m(r,t).to.have.property("length");var i=r.length;this.assert(e>=i,"expected #{this} to have a length at most #{exp} but got #{act}","expected #{this} to have a length above #{exp}",e,i)}else this.assert(e>=r,"expected #{this} to be at most "+e,"expected #{this} to be above "+e)}function f(e,r){r&&q(this,"message",r);var i=t.getName(e);this.assert(q(this,"object")instanceof e,"expected #{this} to be an instance of "+i,"expected #{this} to not be an instance of "+i)}function p(e,r){r&&q(this,"message",r);var i=q(this,"object");this.assert(i.hasOwnProperty(e),"expected #{this} to have own property "+t.inspect(e),"expected #{this} to not have own property "+t.inspect(e))}function d(){q(this,"doLength",!0)}function g(e,t){t&&q(this,"message",t);var r=q(this,"object");new m(r,t).to.have.property("length");var i=r.length;this.assert(i==e,"expected #{this} to have a length of #{exp} but got #{act}","expected #{this} to not have a length of #{act}",e,i)}function b(e){var r,i=q(this,"object"),n=!0,o="keys must be given single argument of Array|Object|String, or multiple String arguments";switch(t.type(e)){case"array":if(arguments.length>1)throw new Error(o);break;case"object":if(arguments.length>1)throw new Error(o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}if(!e.length)throw new Error("keys required");var s=Object.keys(i),a=e,c=e.length,u=q(this,"any"),h=q(this,"all");if(u||h||(h=!0),u){var l=a.filter(function(e){return~s.indexOf(e)});n=l.length>0}if(h&&(n=e.every(function(e){return~s.indexOf(e)}),q(this,"negate")||q(this,"contains")||(n=n&&e.length==s.length)),c>1){e=e.map(function(e){return t.inspect(e)});var f=e.pop();h&&(r=e.join(", ")+", and "+f),u&&(r=e.join(", ")+", or "+f)}else r=t.inspect(e[0]);r=(c>1?"keys ":"key ")+r,r=(q(this,"contains")?"contain ":"have ")+r,this.assert(n,"expected #{this} to "+r,"expected #{this} to not "+r,a.slice(0).sort(),s.sort(),!0)}function v(e,r,i){i&&q(this,"message",i);var n=q(this,"object");new m(n,i).is.a("function");var o=!1,s=null,a=null,c=null;0===arguments.length?(r=null,e=null):e&&(e instanceof RegExp||"string"==typeof e)?(r=e,e=null):e&&e instanceof Error?(s=e,e=null,r=null):"function"==typeof e?(a=e.prototype.name||e.name,"Error"===a&&e!==Error&&(a=(new e).name)):e=null;try{n()}catch(u){if(s)return this.assert(u===s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}",s instanceof Error?s.toString():s,u instanceof Error?u.toString():u),q(this,"object",u),this;if(e&&(this.assert(u instanceof e,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp} but #{act} was thrown",a,u instanceof Error?u.toString():u),!r))return q(this,"object",u),this;var h="object"===t.type(u)&&"message"in u?u.message:""+u;if(null!=h&&r&&r instanceof RegExp)return this.assert(r.exec(h),"expected #{this} to throw error matching #{exp} but got #{act}","expected #{this} to throw error not matching #{exp}",r,h),q(this,"object",u),this;if(null!=h&&r&&"string"==typeof r)return this.assert(~h.indexOf(r),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",r,h),q(this,"object",u),this;o=!0,c=u}var l="",f=null!==a?a:s?"#{exp}":"an error";o&&(l=" but #{act} was thrown"),this.assert(o===!0,"expected #{this} to throw "+f+l,"expected #{this} to not throw "+f+l,s instanceof Error?s.toString():s,c instanceof Error?c.toString():c),q(this,"object",c)}function y(e,t,r){return e.every(function(e){return r?t.some(function(t){return r(e,t)}):-1!==t.indexOf(e)})}function j(e,t,r){r&&q(this,"message",r);var i=q(this,"object");new m(e,r).to.have.property(t),new m(i).is.a("function");var n=e[t];i(),this.assert(n!==e[t],"expected ."+t+" to change","expected ."+t+" to not change")}function w(e,t,r){r&&q(this,"message",r);var i=q(this,"object");new m(e,r).to.have.property(t),new m(i).is.a("function");var n=e[t];i(),this.assert(e[t]-n>0,"expected ."+t+" to increase","expected ."+t+" to not increase")}function x(e,t,r){r&&q(this,"message",r);var i=q(this,"object");new m(e,r).to.have.property(t),new m(i).is.a("function");var n=e[t];i(),this.assert(e[t]-n<0,"expected ."+t+" to decrease","expected ."+t+" to not decrease")}var m=e.Assertion,q=(Object.prototype.toString,t.flag);["to","be","been","is","and","has","have","with","that","which","at","of","same"].forEach(function(e){m.addProperty(e,function(){return this})}),m.addProperty("not",function(){q(this,"negate",!0)}),m.addProperty("deep",function(){q(this,"deep",!0)}),m.addProperty("any",function(){q(this,"any",!0),q(this,"all",!1)}),m.addProperty("all",function(){q(this,"all",!0),q(this,"any",!1)}),m.addChainableMethod("an",r),m.addChainableMethod("a",r),m.addChainableMethod("include",n,i),m.addChainableMethod("contain",n,i),m.addChainableMethod("contains",n,i),m.addChainableMethod("includes",n,i),m.addProperty("ok",function(){this.assert(q(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),m.addProperty("true",function(){this.assert(!0===q(this,"object"),"expected #{this} to be true","expected #{this} to be false",this.negate?!1:!0)}),m.addProperty("false",function(){this.assert(!1===q(this,"object"),"expected #{this} to be false","expected #{this} to be true",this.negate?!0:!1)}),m.addProperty("null",function(){this.assert(null===q(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),m.addProperty("undefined",function(){this.assert(void 0===q(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),m.addProperty("exist",function(){this.assert(null!=q(this,"object"),"expected #{this} to exist","expected #{this} to not exist")}),m.addProperty("empty",function(){var e=q(this,"object"),t=e;Array.isArray(e)||"string"==typeof object?t=e.length:"object"==typeof e&&(t=Object.keys(e).length),this.assert(!t,"expected #{this} to be empty","expected #{this} not to be empty")}),m.addProperty("arguments",o),m.addProperty("Arguments",o),m.addMethod("equal",s),m.addMethod("equals",s),m.addMethod("eq",s),m.addMethod("eql",a),m.addMethod("eqls",a),m.addMethod("above",c),m.addMethod("gt",c),m.addMethod("greaterThan",c),m.addMethod("least",u),m.addMethod("gte",u),m.addMethod("below",h),m.addMethod("lt",h),m.addMethod("lessThan",h),m.addMethod("most",l),m.addMethod("lte",l),m.addMethod("within",function(e,t,r){r&&q(this,"message",r);var i=q(this,"object"),n=e+".."+t;if(q(this,"doLength")){new m(i,r).to.have.property("length");var o=i.length;this.assert(o>=e&&t>=o,"expected #{this} to have a length within "+n,"expected #{this} to not have a length within "+n)}else this.assert(i>=e&&t>=i,"expected #{this} to be within "+n,"expected #{this} to not be within "+n)}),m.addMethod("instanceof",f),m.addMethod("instanceOf",f),m.addMethod("property",function(e,r,i){i&&q(this,"message",i);var n=!!q(this,"deep"),o=n?"deep property ":"property ",s=q(this,"negate"),a=q(this,"object"),c=n?t.getPathInfo(e,a):null,u=n?c.exists:t.hasProperty(e,a),h=n?c.value:a[e];if(s&&void 0!==r){if(void 0===h)throw i=null!=i?i+": ":"",new Error(i+t.inspect(a)+" has no "+o+t.inspect(e))}else this.assert(u,"expected #{this} to have a "+o+t.inspect(e),"expected #{this} to not have "+o+t.inspect(e));void 0!==r&&this.assert(r===h,"expected #{this} to have a "+o+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have a "+o+t.inspect(e)+" of #{act}",r,h),q(this,"object",h)}),m.addMethod("ownProperty",p),m.addMethod("haveOwnProperty",p),m.addChainableMethod("length",g,d),m.addMethod("lengthOf",g),m.addMethod("match",function(e,t){t&&q(this,"message",t);var r=q(this,"object");this.assert(e.exec(r),"expected #{this} to match "+e,"expected #{this} not to match "+e)}),m.addMethod("string",function(e,r){r&&q(this,"message",r);var i=q(this,"object");new m(i,r).is.a("string"),this.assert(~i.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),m.addMethod("keys",b),m.addMethod("key",b),m.addMethod("throw",v),m.addMethod("throws",v),m.addMethod("Throw",v),m.addMethod("respondTo",function(e,r){r&&q(this,"message",r);var i=q(this,"object"),n=q(this,"itself"),o="function"!==t.type(i)||n?i[e]:i.prototype[e];this.assert("function"==typeof o,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}),m.addProperty("itself",function(){q(this,"itself",!0)}),m.addMethod("satisfy",function(e,r){r&&q(this,"message",r);var i=q(this,"object"),n=e(i);this.assert(n,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),this.negate?!1:!0,n)}),m.addMethod("closeTo",function(e,r,i){i&&q(this,"message",i);var n=q(this,"object");if(new m(n,i).is.a("number"),"number"!==t.type(e)||"number"!==t.type(r))throw new Error("the arguments to closeTo must be numbers");this.assert(Math.abs(n-e)<=r,"expected #{this} to be close to "+e+" +/- "+r,"expected #{this} not to be close to "+e+" +/- "+r)}),m.addMethod("members",function(e,r){r&&q(this,"message",r);var i=q(this,"object");new m(i).to.be.an("array"),new m(e).to.be.an("array");var n=q(this,"deep")?t.eql:void 0;return q(this,"contains")?this.assert(y(e,i,n),"expected #{this} to be a superset of #{act}","expected #{this} to not be a superset of #{act}",i,e):void this.assert(y(i,e,n)&&y(e,i,n),"expected #{this} to have the same members as #{act}","expected #{this} to not have the same members as #{act}",i,e)}),m.addChainableMethod("change",j),m.addChainableMethod("changes",j),m.addChainableMethod("increase",w),m.addChainableMethod("increases",w),m.addChainableMethod("decrease",x),m.addChainableMethod("decreases",x)}}),require.register("chai/lib/chai/interface/assert.js",function(exports,module){module.exports=function(chai,util){var Assertion=chai.Assertion,flag=util.flag,assert=chai.assert=function(e,t){var r=new Assertion(null,null,chai.assert);r.assert(e,t,"[ negation message unavailable ]")};assert.fail=function(e,t,r,i){throw r=r||"assert.fail()",new chai.AssertionError(r,{actual:e,expected:t,operator:i},assert.fail)},assert.ok=function(e,t){new Assertion(e,t).is.ok},assert.notOk=function(e,t){new Assertion(e,t).is.not.ok},assert.equal=function(e,t,r){var i=new Assertion(e,r,assert.equal);i.assert(t==flag(i,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e)},assert.notEqual=function(e,t,r){var i=new Assertion(e,r,assert.notEqual);i.assert(t!=flag(i,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e)},assert.strictEqual=function(e,t,r){new Assertion(e,r).to.equal(t)},assert.notStrictEqual=function(e,t,r){new Assertion(e,r).to.not.equal(t)},assert.deepEqual=function(e,t,r){new Assertion(e,r).to.eql(t)},assert.notDeepEqual=function(e,t,r){new Assertion(e,r).to.not.eql(t)},assert.isAbove=function(e,t,r){new Assertion(e,r).to.be.above(t)},assert.isBelow=function(e,t,r){new Assertion(e,r).to.be.below(t)},assert.isTrue=function(e,t){new Assertion(e,t).is["true"]},assert.isFalse=function(e,t){new Assertion(e,t).is["false"]},assert.isNull=function(e,t){new Assertion(e,t).to.equal(null)},assert.isNotNull=function(e,t){new Assertion(e,t).to.not.equal(null)},assert.isUndefined=function(e,t){new Assertion(e,t).to.equal(void 0)},assert.isDefined=function(e,t){new Assertion(e,t).to.not.equal(void 0)},assert.isFunction=function(e,t){new Assertion(e,t).to.be.a("function")},assert.isNotFunction=function(e,t){new Assertion(e,t).to.not.be.a("function")},assert.isObject=function(e,t){new Assertion(e,t).to.be.a("object")},assert.isNotObject=function(e,t){new Assertion(e,t).to.not.be.a("object")},assert.isArray=function(e,t){new Assertion(e,t).to.be.an("array")},assert.isNotArray=function(e,t){new Assertion(e,t).to.not.be.an("array")},assert.isString=function(e,t){new Assertion(e,t).to.be.a("string")},assert.isNotString=function(e,t){new Assertion(e,t).to.not.be.a("string")},assert.isNumber=function(e,t){new Assertion(e,t).to.be.a("number")},assert.isNotNumber=function(e,t){new Assertion(e,t).to.not.be.a("number")},assert.isBoolean=function(e,t){new Assertion(e,t).to.be.a("boolean")},assert.isNotBoolean=function(e,t){new Assertion(e,t).to.not.be.a("boolean")},assert.typeOf=function(e,t,r){new Assertion(e,r).to.be.a(t)},assert.notTypeOf=function(e,t,r){new Assertion(e,r).to.not.be.a(t)},assert.instanceOf=function(e,t,r){new Assertion(e,r).to.be.instanceOf(t)},assert.notInstanceOf=function(e,t,r){new Assertion(e,r).to.not.be.instanceOf(t)},assert.include=function(e,t,r){new Assertion(e,r,assert.include).include(t)},assert.notInclude=function(e,t,r){new Assertion(e,r,assert.notInclude).not.include(t)},assert.match=function(e,t,r){new Assertion(e,r).to.match(t)},assert.notMatch=function(e,t,r){new Assertion(e,r).to.not.match(t)},assert.property=function(e,t,r){new Assertion(e,r).to.have.property(t)},assert.notProperty=function(e,t,r){new Assertion(e,r).to.not.have.property(t)},assert.deepProperty=function(e,t,r){new Assertion(e,r).to.have.deep.property(t)},assert.notDeepProperty=function(e,t,r){new Assertion(e,r).to.not.have.deep.property(t)},assert.propertyVal=function(e,t,r,i){new Assertion(e,i).to.have.property(t,r)},assert.propertyNotVal=function(e,t,r,i){new Assertion(e,i).to.not.have.property(t,r)},assert.deepPropertyVal=function(e,t,r,i){new Assertion(e,i).to.have.deep.property(t,r)},assert.deepPropertyNotVal=function(e,t,r,i){new Assertion(e,i).to.not.have.deep.property(t,r)},assert.lengthOf=function(e,t,r){new Assertion(e,r).to.have.length(t)},assert.Throw=function(e,t,r,i){("string"==typeof t||t instanceof RegExp)&&(r=t,t=null);var n=new Assertion(e,i).to.Throw(t,r);return flag(n,"object")},assert.doesNotThrow=function(e,t,r){"string"==typeof t&&(r=t,t=null),new Assertion(e,r).to.not.Throw(t)},assert.operator=function(val,operator,val2,msg){if(!~["==","===",">",">=","<","<=","!=","!=="].indexOf(operator))throw new Error('Invalid operator "'+operator+'"');var test=new Assertion(eval(val+operator+val2),msg);test.assert(!0===flag(test,"object"),"expected "+util.inspect(val)+" to be "+operator+" "+util.inspect(val2),"expected "+util.inspect(val)+" to not be "+operator+" "+util.inspect(val2))},assert.closeTo=function(e,t,r,i){new Assertion(e,i).to.be.closeTo(t,r)},assert.sameMembers=function(e,t,r){new Assertion(e,r).to.have.same.members(t)},assert.sameDeepMembers=function(e,t,r){new Assertion(e,r).to.have.same.deep.members(t)},assert.includeMembers=function(e,t,r){new Assertion(e,r).to.include.members(t)},assert.changes=function(e,t,r){new Assertion(e).to.change(t,r)},assert.doesNotChange=function(e,t,r){new Assertion(e).to.not.change(t,r)},assert.increases=function(e,t,r){new Assertion(e).to.increase(t,r)},assert.doesNotIncrease=function(e,t,r){new Assertion(e).to.not.increase(t,r)},assert.decreases=function(e,t,r){new Assertion(e).to.decrease(t,r)},assert.doesNotDecrease=function(e,t,r){new Assertion(e).to.not.decrease(t,r)},assert.ifError=function(e,t){new Assertion(e,t).to.not.be.ok},function e(t,r){return assert[r]=assert[t],e}("Throw","throw")("Throw","throws")}}),require.register("chai/lib/chai/interface/expect.js",function(e,t){t.exports=function(e){e.expect=function(t,r){return new e.Assertion(t,r)},e.expect.fail=function(t,r,i,n){throw i=i||"expect.fail()",new e.AssertionError(i,{actual:t,expected:r,operator:n},e.expect.fail)}}}),require.register("chai/lib/chai/interface/should.js",function(e,t){t.exports=function(e){function t(){function t(){return this instanceof String||this instanceof Number?new r(this.constructor(this),null,t):this instanceof Boolean?new r(1==this,null,t):new r(this,null,t)}function i(e){Object.defineProperty(this,"should",{value:e,enumerable:!0,configurable:!0,writable:!0})}Object.defineProperty(Object.prototype,"should",{set:i,get:t,configurable:!0});var n={};return n.fail=function(t,r,i,o){throw i=i||"should.fail()",new e.AssertionError(i,{actual:t,expected:r,operator:o},n.fail)},n.equal=function(e,t,i){new r(e,i).to.equal(t)},n.Throw=function(e,t,i,n){new r(e,n).to.Throw(t,i)},n.exist=function(e,t){new r(e,t).to.exist},n.not={},n.not.equal=function(e,t,i){new r(e,i).to.not.equal(t)},n.not.Throw=function(e,t,i,n){new r(e,n).to.not.Throw(t,i)},n.not.exist=function(e,t){new r(e,t).to.not.exist},n["throw"]=n.Throw,n.not["throw"]=n.not.Throw,n}var r=e.Assertion;e.should=t,e.Should=t}}),require.register("chai/lib/chai/utils/addChainableMethod.js",function(e,t){var r=require("chai/lib/chai/utils/transferFlags.js"),i=require("chai/lib/chai/utils/flag.js"),n=require("chai/lib/chai/config.js"),o="__proto__"in Object,s=/^(?:length|name|arguments|caller)$/,a=Function.prototype.call,c=Function.prototype.apply;t.exports=function(e,t,u,h){"function"!=typeof h&&(h=function(){});var l={method:u,chainingBehavior:h};e.__methods||(e.__methods={}),e.__methods[t]=l,Object.defineProperty(e,t,{get:function(){l.chainingBehavior.call(this);var t=function f(){var e=i(this,"ssfi");e&&n.includeStack===!1&&i(this,"ssfi",f);var t=l.method.apply(this,arguments);return void 0===t?this:t};if(o){var u=t.__proto__=Object.create(this);u.call=a,u.apply=c}else{var h=Object.getOwnPropertyNames(e);h.forEach(function(r){if(!s.test(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i)}})}return r(this,t),t},configurable:!0})}}),require.register("chai/lib/chai/utils/addMethod.js",function(e,t){var r=require("chai/lib/chai/config.js"),i=require("chai/lib/chai/utils/flag.js");t.exports=function(e,t,n){e[t]=function(){var o=i(this,"ssfi");o&&r.includeStack===!1&&i(this,"ssfi",e[t]);var s=n.apply(this,arguments);return void 0===s?this:s}}}),require.register("chai/lib/chai/utils/addProperty.js",function(e,t){t.exports=function(e,t,r){Object.defineProperty(e,t,{get:function(){var e=r.call(this);return void 0===e?this:e},configurable:!0})}}),require.register("chai/lib/chai/utils/flag.js",function(e,t){t.exports=function(e,t,r){var i=e.__flags||(e.__flags=Object.create(null));return 3!==arguments.length?i[t]:void(i[t]=r)}}),require.register("chai/lib/chai/utils/getActual.js",function(e,t){t.exports=function(e,t){return t.length>4?t[4]:e._obj}}),require.register("chai/lib/chai/utils/getEnumerableProperties.js",function(e,t){t.exports=function(e){var t=[];for(var r in e)t.push(r);return t}}),require.register("chai/lib/chai/utils/getMessage.js",function(e,t){var r=require("chai/lib/chai/utils/flag.js"),i=require("chai/lib/chai/utils/getActual.js"),n=(require("chai/lib/chai/utils/inspect.js"),require("chai/lib/chai/utils/objDisplay.js"));t.exports=function(e,t){var o=r(e,"negate"),s=r(e,"object"),a=t[3],c=i(e,t),u=o?t[2]:t[1],h=r(e,"message");return"function"==typeof u&&(u=u()),u=u||"",u=u.replace(/#{this}/g,n(s)).replace(/#{act}/g,n(c)).replace(/#{exp}/g,n(a)),h?h+": "+u:u}}),require.register("chai/lib/chai/utils/getName.js",function(e,t){t.exports=function(e){if(e.name)return e.name;var t=/^\s?function ([^(]*)\(/.exec(e);return t&&t[1]?t[1]:""}}),require.register("chai/lib/chai/utils/getPathValue.js",function(e,t){var r=require("chai/lib/chai/utils/getPathInfo.js");t.exports=function(e,t){var i=r(e,t);return i.value}}),require.register("chai/lib/chai/utils/getPathInfo.js",function(e,t){function r(e){var t=e.replace(/\[/g,".["),r=t.match(/(\\\.|[^.]+?)+/g);return r.map(function(e){var t=/\[(\d+)\]$/,r=t.exec(e);return r?{i:parseFloat(r[1])}:{p:e}})}function i(e,t,r){var i,n=t;r=void 0===r?e.length:r;for(var o=0,s=r;s>o;o++){var a=e[o];n?("undefined"!=typeof a.p?n=n[a.p]:"undefined"!=typeof a.i&&(n=n[a.i]),o==s-1&&(i=n)):i=void 0}return i}var n=require("chai/lib/chai/utils/hasProperty.js");t.exports=function(e,t){var o=r(e),s=o[o.length-1],a={parent:i(o,t,o.length-1),name:s.p||s.i,value:i(o,t)};return a.exists=n(a.name,a.parent),a}}),require.register("chai/lib/chai/utils/hasProperty.js",function(e,t){var r=require("chai/lib/chai/utils/type.js"),i={number:Number,string:String};t.exports=function(e,t){var n=r(t);return"null"===n||"undefined"===n?!1:(i[n]&&"object"!=typeof t&&(t=new i[n](t)),e in t)}}),require.register("chai/lib/chai/utils/getProperties.js",function(e,t){t.exports=function(){function e(e){-1===t.indexOf(e)&&t.push(e)}for(var t=Object.getOwnPropertyNames(subject),r=Object.getPrototypeOf(subject);null!==r;)Object.getOwnPropertyNames(r).forEach(e),r=Object.getPrototypeOf(r);return t}}),require.register("chai/lib/chai/utils/index.js",function(e,t){var e=t.exports={};e.test=require("chai/lib/chai/utils/test.js"),e.type=require("chai/lib/chai/utils/type.js"),e.getMessage=require("chai/lib/chai/utils/getMessage.js"),e.getActual=require("chai/lib/chai/utils/getActual.js"),e.inspect=require("chai/lib/chai/utils/inspect.js"),e.objDisplay=require("chai/lib/chai/utils/objDisplay.js"),e.flag=require("chai/lib/chai/utils/flag.js"),e.transferFlags=require("chai/lib/chai/utils/transferFlags.js"),e.eql=require("chaijs~deep-eql@0.1.3"),e.getPathValue=require("chai/lib/chai/utils/getPathValue.js"),e.getPathInfo=require("chai/lib/chai/utils/getPathInfo.js"),e.hasProperty=require("chai/lib/chai/utils/hasProperty.js"),e.getName=require("chai/lib/chai/utils/getName.js"),e.addProperty=require("chai/lib/chai/utils/addProperty.js"),e.addMethod=require("chai/lib/chai/utils/addMethod.js"),e.overwriteProperty=require("chai/lib/chai/utils/overwriteProperty.js"),e.overwriteMethod=require("chai/lib/chai/utils/overwriteMethod.js"),e.addChainableMethod=require("chai/lib/chai/utils/addChainableMethod.js"),e.overwriteChainableMethod=require("chai/lib/chai/utils/overwriteChainableMethod.js")}),require.register("chai/lib/chai/utils/inspect.js",function(e,t){function r(e,t,r){var n={showHidden:t,seen:[],stylize:function(e){return e}};return i(n,e,"undefined"==typeof r?2:r)}function i(t,r,p){if(r&&"function"==typeof r.inspect&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var y=r.inspect(p);return"string"!=typeof y&&(y=i(t,y,p)),y}var j=n(t,r);if(j)return j;if(v(r)){if("outerHTML"in r)return r.outerHTML;try{if(document.xmlVersion){var w=new XMLSerializer;return w.serializeToString(r)}var x="http://www.w3.org/1999/xhtml",m=document.createElementNS(x,"_");return m.appendChild(r.cloneNode(!1)),html=m.innerHTML.replace("><",">"+r.innerHTML+"<"),m.innerHTML="",html}catch(q){}}var A=b(r),O=t.showHidden?g(r):A;if(0===O.length||f(r)&&(1===O.length&&"stack"===O[0]||2===O.length&&"description"===O[0]&&"stack"===O[1])){if("function"==typeof r){var M=d(r),P=M?": "+M:"";return t.stylize("[Function"+P+"]","special")}if(h(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(l(r))return t.stylize(Date.prototype.toUTCString.call(r),"date");if(f(r))return o(r)}var S="",E=!1,_=["{","}"];if(u(r)&&(E=!0,_=["[","]"]),"function"==typeof r){var M=d(r),P=M?": "+M:"";S=" [Function"+P+"]"}if(h(r)&&(S=" "+RegExp.prototype.toString.call(r)),l(r)&&(S=" "+Date.prototype.toUTCString.call(r)),
-f(r))return o(r);if(0===O.length&&(!E||0==r.length))return _[0]+S+_[1];if(0>p)return h(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=E?s(t,r,p,A,O):O.map(function(e){return a(t,r,p,A,e,E)}),t.seen.pop(),c(k,S,_)}function n(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string");case"number":return 0===t&&1/t===-(1/0)?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}return null===t?e.stylize("null","null"):void 0}function o(e){return"["+Error.prototype.toString.call(e)+"]"}function s(e,t,r,i,n){for(var o=[],s=0,c=t.length;c>s;++s)o.push(Object.prototype.hasOwnProperty.call(t,String(s))?a(e,t,r,i,String(s),!0):"");return n.forEach(function(n){n.match(/^\d+$/)||o.push(a(e,t,r,i,n,!0))}),o}function a(e,t,r,n,o,s){var a,c;if(t.__lookupGetter__&&(t.__lookupGetter__(o)?c=t.__lookupSetter__(o)?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):t.__lookupSetter__(o)&&(c=e.stylize("[Setter]","special"))),n.indexOf(o)<0&&(a="["+o+"]"),c||(e.seen.indexOf(t[o])<0?(c=null===r?i(e,t[o],null):i(e,t[o],r-1),c.indexOf("\n")>-1&&(c=s?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n"))):c=e.stylize("[Circular]","special")),"undefined"==typeof a){if(s&&o.match(/^\d+$/))return c;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function c(e,t,r){var i=0,n=e.reduce(function(e,t){return i++,t.indexOf("\n")>=0&&i++,e+t.length+1},0);return n>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function u(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===p(e)}function h(e){return"object"==typeof e&&"[object RegExp]"===p(e)}function l(e){return"object"==typeof e&&"[object Date]"===p(e)}function f(e){return"object"==typeof e&&"[object Error]"===p(e)}function p(e){return Object.prototype.toString.call(e)}var d=require("chai/lib/chai/utils/getName.js"),g=require("chai/lib/chai/utils/getProperties.js"),b=require("chai/lib/chai/utils/getEnumerableProperties.js");t.exports=r;var v=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}}),require.register("chai/lib/chai/utils/objDisplay.js",function(e,t){var r=require("chai/lib/chai/utils/inspect.js"),i=require("chai/lib/chai/config.js");t.exports=function(e){var t=r(e),n=Object.prototype.toString.call(e);if(i.truncateThreshold&&t.length>=i.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var o=Object.keys(e),s=o.length>2?o.splice(0,2).join(", ")+", ...":o.join(", ");return"{ Object ("+s+") }"}return t}return t}}),require.register("chai/lib/chai/utils/overwriteMethod.js",function(e,t){t.exports=function(e,t,r){var i=e[t],n=function(){return this};i&&"function"==typeof i&&(n=i),e[t]=function(){var e=r(n).apply(this,arguments);return void 0===e?this:e}}}),require.register("chai/lib/chai/utils/overwriteProperty.js",function(e,t){t.exports=function(e,t,r){var i=Object.getOwnPropertyDescriptor(e,t),n=function(){};i&&"function"==typeof i.get&&(n=i.get),Object.defineProperty(e,t,{get:function(){var e=r(n).call(this);return void 0===e?this:e},configurable:!0})}}),require.register("chai/lib/chai/utils/overwriteChainableMethod.js",function(e,t){t.exports=function(e,t,r,i){var n=e.__methods[t],o=n.chainingBehavior;n.chainingBehavior=function(){var e=i(o).call(this);return void 0===e?this:e};var s=n.method;n.method=function(){var e=r(s).apply(this,arguments);return void 0===e?this:e}}}),require.register("chai/lib/chai/utils/test.js",function(e,t){var r=require("chai/lib/chai/utils/flag.js");t.exports=function(e,t){var i=r(e,"negate"),n=t[0];return i?!n:n}}),require.register("chai/lib/chai/utils/transferFlags.js",function(e,t){t.exports=function(e,t,r){var i=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),r=3===arguments.length?r:!0;for(var n in i)(r||"object"!==n&&"ssfi"!==n&&"message"!=n)&&(t.__flags[n]=i[n])}}),require.register("chai/lib/chai/utils/type.js",function(e,t){var r={"[object Arguments]":"arguments","[object Array]":"array","[object Date]":"date","[object Function]":"function","[object Number]":"number","[object RegExp]":"regexp","[object String]":"string"};t.exports=function(e){var t=Object.prototype.toString.call(e);return r[t]?r[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}}),"object"==typeof exports?module.exports=require("chai"):"function"==typeof define&&define.amd?define("chai",[],function(){return require("chai")}):(this||window).chai=require("chai")}();
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/Gruntfile.js b/chromium/third_party/catapult/tracing/third_party/css-element-queries/Gruntfile.js
deleted file mode 100644
index 265a0de0fad..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/Gruntfile.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* jshint node: true */
-module.exports = function(grunt) {
- 'use strict';
-
- grunt.loadNpmTasks('grunt-bump');
-
- grunt.initConfig({
- bump: {
- options: {
- files: ['package.json', 'bower.json'],
- commitFiles: ['package.json', 'bower.json'],
- pushTo: 'origin'
- }
- }
- });
-};
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/LICENSE b/chromium/third_party/catapult/tracing/third_party/css-element-queries/LICENSE
deleted file mode 100644
index 4de61dcef7e..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2013 Marc J. Schmidt
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/README.chromium b/chromium/third_party/catapult/tracing/third_party/css-element-queries/README.chromium
deleted file mode 100644
index 5ca52cf7cf4..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/README.chromium
+++ /dev/null
@@ -1,16 +0,0 @@
-Name: css-element-queries
-Short Name: css-element-queries
-URL: https://github.com/marcj/css-element-queries
-Version: 0.2.1
-Revision: 996d9035b1a13bb6883c181aad742ae45bd74026
-Date: Thu May 28 13:57:31 2015 +0000
-License File: LICENSE
-Security Critical: no
-
-Description:
-ResizeSensor.js calls a callback when an element is resized for any reason.
-
-Local Modifications:
-Made test/index.html conform to the expectations of py_vulcanize:
-up-cased doctype, added 'use strict', downloaded mootools from cloudflare
-and added them to test/.
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/README.md b/chromium/third_party/catapult/tracing/third_party/css-element-queries/README.md
deleted file mode 100644
index 389225eb002..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-CSS Element Queries
-===================
-
-Element Queries is a polyfill adding support for element based media-queries to all new browsers (incl. IE7+).
-It allows not only to define media-queries based on window-size but also adds 'media-queries' functionality depending on element (any selector supported)
-size while not causing performance lags due to event based implementation.
-
-It's a proof-of-concept event-based CSS element dimension query with valid CSS selector syntax.
-
-Features:
-
- - no performance issues since it listens only on size changes of elements that have element query rules defined through css. Other element query polifills only listen on `window.onresize` which causes performance issues and allows only to detect changes via window.resize event and not inside layout changes like css3 animation, :hover, DOM changes etc.
- - no interval/timeout detection. Truly event-based through integrated ResizeSensor class.
- - no CSS modifications. Valid CSS Syntax
- - all CSS selectors available. Uses regular attribute selector. No need to write rules in HTML.
- - supports and tested in webkit, gecko and IE(7/8/9/10/11).
- - `min-width`, `min-height`, `max-width` and `max-height` are supported so far
- - works with any layout modifications: HTML (innerHTML etc), inline styles, DOM mutation, CSS3 transitions, fluid layout changes (also percent changes), pseudo classes (:hover etc.), window resizes and more
- - no Javascript-Framework dependency (works with jQuery, Mootools, etc.)
-
-More demos and information: http://marcj.github.io/css-element-queries/
-
-Example
--------
-
-```css
-.widget-name {
- padding: 25px;
-}
-.widget-name[max-width="200px"] {
- padding: 0;
-}
-.widget-name[min-width="500px"] {
- padding: 55px;
-}
-
-/* responsive images */
-.responsive-image img {
- width: 100%;
-}
-
-.responsive-image[max-width^='400px'] img {
- content: url(demo/image-400px.jpg);
-}
-
-.responsive-image[max-width^='1000px'] img {
- content: url(demo/image-1000px.jpg);
-}
-
-.responsive-image[min-width='1000px'] img {
- content: url(demo/image-full.jpg);
-}
-```
-
-Include the javascript files at the bottom and you're good to go. No custom javascript calls needed.
-
-```html
-<script src="src/ResizeSensor.js"></script>
-<script src="src/ElementQueries.js"></script>
-```
-
-Issues
-------
-
- - So far does not work on `img` and other elements that can't contain other elements. Wrapping with a `div` works fine though (See demo).
- - Adds additional hidden elements into selected target element and forces target element to be relative or absolute.
-
-
-[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/marcj/css-element-queries/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
-
-
-License
--------
-MIT license. Copyright [Marc J. Schmidt](http://marcjschmidt.de/).
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/bower.json b/chromium/third_party/catapult/tracing/third_party/css-element-queries/bower.json
deleted file mode 100644
index 0295673d5d9..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/bower.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "css-element-queries",
- "version": "0.2.1",
- "main": [
- "./src/ElementQueries.js",
- "./src/ResizeSensor.js"
- ],
- "ignore": [
- "**/.*",
- "_*",
- "Gruntfile.js",
- "composer.json",
- "package.json",
- "*.html"
- ],
- "dependencies": {
- }
-}
-
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/package.json b/chromium/third_party/catapult/tracing/third_party/css-element-queries/package.json
deleted file mode 100644
index a68c90e9c71..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "css-element-queries",
- "version": "0.2.1",
- "description": "CSS-Element-Queries Polyfill. proof-of-concept for high-speed element dimension/media queries in valid css.",
- "main": "src/ElementQueries.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "git@github.com:marcj/css-element-queries.git"
- },
- "author": "Marc J. Schmidt",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/marcj/css-element-queries/issues"
- },
- "homepage": "https://github.com/marcj/css-element-queries",
- "devDependencies": {
- "grunt": "^0.4.5",
- "grunt-bump": "^0.3.1"
- }
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/src/ElementQueries.js b/chromium/third_party/catapult/tracing/third_party/css-element-queries/src/ElementQueries.js
deleted file mode 100755
index 3287b8d7a30..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/src/ElementQueries.js
+++ /dev/null
@@ -1,340 +0,0 @@
-/**
- * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
- * directory of this distribution and at
- * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
- */
-;
-(function() {
- /**
- *
- * @type {Function}
- * @constructor
- */
- var ElementQueries = this.ElementQueries = function() {
-
- this.withTracking = false;
- var elements = [];
-
- /**
- *
- * @param element
- * @returns {Number}
- */
- function getEmSize(element) {
- if (!element) {
- element = document.documentElement;
- }
- var fontSize = getComputedStyle(element, 'fontSize');
- return parseFloat(fontSize) || 16;
- }
-
- /**
- *
- * @copyright https://github.com/Mr0grog/element-query/blob/master/LICENSE
- *
- * @param {HTMLElement} element
- * @param {*} value
- * @returns {*}
- */
- function convertToPx(element, value) {
- var units = value.replace(/[0-9]*/, '');
- value = parseFloat(value);
- switch (units) {
- case "px":
- return value;
- case "em":
- return value * getEmSize(element);
- case "rem":
- return value * getEmSize();
- // Viewport units!
- // According to http://quirksmode.org/mobile/tableViewport.html
- // documentElement.clientWidth/Height gets us the most reliable info
- case "vw":
- return value * document.documentElement.clientWidth / 100;
- case "vh":
- return value * document.documentElement.clientHeight / 100;
- case "vmin":
- case "vmax":
- var vw = document.documentElement.clientWidth / 100;
- var vh = document.documentElement.clientHeight / 100;
- var chooser = Math[units === "vmin" ? "min" : "max"];
- return value * chooser(vw, vh);
- default:
- return value;
- // for now, not supporting physical units (since they are just a set number of px)
- // or ex/ch (getting accurate measurements is hard)
- }
- }
-
- /**
- *
- * @param {HTMLElement} element
- * @constructor
- */
- function SetupInformation(element) {
- this.element = element;
- this.options = {};
- var key, option, width = 0, height = 0, value, actualValue, attrValues, attrValue, attrName;
-
- /**
- * @param {Object} option {mode: 'min|max', property: 'width|height', value: '123px'}
- */
- this.addOption = function(option) {
- var idx = [option.mode, option.property, option.value].join(',');
- this.options[idx] = option;
- };
-
- var attributes = ['min-width', 'min-height', 'max-width', 'max-height'];
-
- /**
- * Extracts the computed width/height and sets to min/max- attribute.
- */
- this.call = function() {
- // extract current dimensions
- width = this.element.offsetWidth;
- height = this.element.offsetHeight;
-
- attrValues = {};
-
- for (key in this.options) {
- if (!this.options.hasOwnProperty(key)){
- continue;
- }
- option = this.options[key];
-
- value = convertToPx(this.element, option.value);
-
- actualValue = option.property == 'width' ? width : height;
- attrName = option.mode + '-' + option.property;
- attrValue = '';
-
- if (option.mode == 'min' && actualValue >= value) {
- attrValue += option.value;
- }
-
- if (option.mode == 'max' && actualValue <= value) {
- attrValue += option.value;
- }
-
- if (!attrValues[attrName]) attrValues[attrName] = '';
- if (attrValue && -1 === (' '+attrValues[attrName]+' ').indexOf(' ' + attrValue + ' ')) {
- attrValues[attrName] += ' ' + attrValue;
- }
- }
-
- for (var k in attributes) {
- if (attrValues[attributes[k]]) {
- this.element.setAttribute(attributes[k], attrValues[attributes[k]].substr(1));
- } else {
- this.element.removeAttribute(attributes[k]);
- }
- }
- };
- }
-
- /**
- * @param {HTMLElement} element
- * @param {Object} options
- */
- function setupElement(element, options) {
- if (element.elementQueriesSetupInformation) {
- element.elementQueriesSetupInformation.addOption(options);
- } else {
- element.elementQueriesSetupInformation = new SetupInformation(element);
- element.elementQueriesSetupInformation.addOption(options);
- element.elementQueriesSensor = new ResizeSensor(element, function() {
- element.elementQueriesSetupInformation.call();
- });
- }
- element.elementQueriesSetupInformation.call();
-
- if (this.withTracking) {
- elements.push(element);
- }
- }
-
- /**
- * @param {String} selector
- * @param {String} mode min|max
- * @param {String} property width|height
- * @param {String} value
- */
- function queueQuery(selector, mode, property, value) {
- var query;
- if (document.querySelectorAll) query = document.querySelectorAll.bind(document);
- if (!query && 'undefined' !== typeof $$) query = $$;
- if (!query && 'undefined' !== typeof jQuery) query = jQuery;
-
- if (!query) {
- throw 'No document.querySelectorAll, jQuery or Mootools\'s $$ found.';
- }
-
- var elements = query(selector);
- for (var i = 0, j = elements.length; i < j; i++) {
- setupElement(elements[i], {
- mode: mode,
- property: property,
- value: value
- });
- }
- }
-
- var regex = /,?([^,\n]*)\[[\s\t]*(min|max)-(width|height)[\s\t]*[~$\^]?=[\s\t]*"([^"]*)"[\s\t]*]([^\n\s\{]*)/mgi;
-
- /**
- * @param {String} css
- */
- function extractQuery(css) {
- var match;
- css = css.replace(/'/g, '"');
- while (null !== (match = regex.exec(css))) {
- if (5 < match.length) {
- queueQuery(match[1] || match[5], match[2], match[3], match[4]);
- }
- }
- }
-
- /**
- * @param {CssRule[]|String} rules
- */
- function readRules(rules) {
- var selector = '';
- if (!rules) {
- return;
- }
- if ('string' === typeof rules) {
- rules = rules.toLowerCase();
- if (-1 !== rules.indexOf('min-width') || -1 !== rules.indexOf('max-width')) {
- extractQuery(rules);
- }
- } else {
- for (var i = 0, j = rules.length; i < j; i++) {
- if (1 === rules[i].type) {
- selector = rules[i].selectorText || rules[i].cssText;
- if (-1 !== selector.indexOf('min-height') || -1 !== selector.indexOf('max-height')) {
- extractQuery(selector);
- }else if(-1 !== selector.indexOf('min-width') || -1 !== selector.indexOf('max-width')) {
- extractQuery(selector);
- }
- } else if (4 === rules[i].type) {
- readRules(rules[i].cssRules || rules[i].rules);
- }
- }
- }
- }
-
- /**
- * Searches all css rules and setups the event listener to all elements with element query rules..
- *
- * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements
- * (no garbage collection possible if you don not call .detach() first)
- */
- this.init = function(withTracking) {
- this.withTracking = withTracking;
- for (var i = 0, j = document.styleSheets.length; i < j; i++) {
- try {
- readRules(document.styleSheets[i].cssText || document.styleSheets[i].cssRules || document.styleSheets[i].rules);
- } catch(e) {
- if (e.name !== 'SecurityError') {
- throw e;
- }
- }
- }
- };
-
- /**
- *
- * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements
- * (no garbage collection possible if you don not call .detach() first)
- */
- this.update = function(withTracking) {
- this.withTracking = withTracking;
- this.init();
- };
-
- this.detach = function() {
- if (!this.withTracking) {
- throw 'withTracking is not enabled. We can not detach elements since we don not store it.' +
- 'Use ElementQueries.withTracking = true; before domready.';
- }
-
- var element;
- while (element = elements.pop()) {
- ElementQueries.detach(element);
- }
-
- elements = [];
- };
- };
-
- /**
- *
- * @param {Boolean} withTracking allows and requires you to use detach, since we store internally all used elements
- * (no garbage collection possible if you don not call .detach() first)
- */
- ElementQueries.update = function(withTracking) {
- ElementQueries.instance.update(withTracking);
- };
-
- /**
- * Removes all sensor and elementquery information from the element.
- *
- * @param {HTMLElement} element
- */
- ElementQueries.detach = function(element) {
- if (element.elementQueriesSetupInformation) {
- element.elementQueriesSensor.detach();
- delete element.elementQueriesSetupInformation;
- delete element.elementQueriesSensor;
- console.log('detached');
- } else {
- console.log('detached already', element);
- }
- };
-
- ElementQueries.withTracking = false;
-
- ElementQueries.init = function() {
- if (!ElementQueries.instance) {
- ElementQueries.instance = new ElementQueries();
- }
-
- ElementQueries.instance.init(ElementQueries.withTracking);
- };
-
- var domLoaded = function (callback) {
- /* Internet Explorer */
- /*@cc_on
- @if (@_win32 || @_win64)
- document.write('<script id="ieScriptLoad" defer src="//:"><\/script>');
- document.getElementById('ieScriptLoad').onreadystatechange = function() {
- if (this.readyState == 'complete') {
- callback();
- }
- };
- @end @*/
- /* Mozilla, Chrome, Opera */
- if (document.addEventListener) {
- document.addEventListener('DOMContentLoaded', callback, false);
- }
- /* Safari, iCab, Konqueror */
- if (/KHTML|WebKit|iCab/i.test(navigator.userAgent)) {
- var DOMLoadTimer = setInterval(function () {
- if (/loaded|complete/i.test(document.readyState)) {
- callback();
- clearInterval(DOMLoadTimer);
- }
- }, 10);
- }
- /* Other web browsers */
- window.onload = callback;
- };
-
- if (window.addEventListener) {
- window.addEventListener('load', ElementQueries.init, false);
- } else {
- window.attachEvent('onload', ElementQueries.init);
- }
- domLoaded(ElementQueries.init);
-
-})();
diff --git a/chromium/third_party/catapult/tracing/third_party/css-element-queries/src/ResizeSensor.js b/chromium/third_party/catapult/tracing/third_party/css-element-queries/src/ResizeSensor.js
deleted file mode 100755
index 687e17d8625..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/css-element-queries/src/ResizeSensor.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
- * directory of this distribution and at
- * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
- */
-;
-(function() {
-
- /**
- * Class for dimension change detection.
- *
- * @param {Element|Element[]|Elements|jQuery} element
- * @param {Function} callback
- *
- * @constructor
- */
- this.ResizeSensor = function(element, callback) {
- /**
- *
- * @constructor
- */
- function EventQueue() {
- this.q = [];
- this.add = function(ev) {
- this.q.push(ev);
- };
-
- var i, j;
- this.call = function() {
- for (i = 0, j = this.q.length; i < j; i++) {
- this.q[i].call();
- }
- };
- }
-
- /**
- * @param {HTMLElement} element
- * @param {String} prop
- * @returns {String|Number}
- */
- function getComputedStyle(element, prop) {
- if (element.currentStyle) {
- return element.currentStyle[prop];
- } else if (window.getComputedStyle) {
- return window.getComputedStyle(element, null).getPropertyValue(prop);
- } else {
- return element.style[prop];
- }
- }
-
- /**
- *
- * @param {HTMLElement} element
- * @param {Function} resized
- */
- function attachResizeEvent(element, resized) {
- if (!element.resizedAttached) {
- element.resizedAttached = new EventQueue();
- element.resizedAttached.add(resized);
- } else if (element.resizedAttached) {
- element.resizedAttached.add(resized);
- return;
- }
-
- element.resizeSensor = document.createElement('div');
- element.resizeSensor.className = 'resize-sensor';
- var style = 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: scroll; z-index: -1; visibility: hidden;';
- var styleChild = 'position: absolute; left: 0; top: 0;';
-
- element.resizeSensor.style.cssText = style;
- element.resizeSensor.innerHTML =
- '<div class="resize-sensor-expand" style="' + style + '">' +
- '<div style="' + styleChild + '"></div>' +
- '</div>' +
- '<div class="resize-sensor-shrink" style="' + style + '">' +
- '<div style="' + styleChild + ' width: 200%; height: 200%"></div>' +
- '</div>';
- element.appendChild(element.resizeSensor);
-
- if (!{fixed: 1, absolute: 1}[getComputedStyle(element, 'position')]) {
- element.style.position = 'relative';
- }
-
- var expand = element.resizeSensor.childNodes[0];
- var expandChild = expand.childNodes[0];
- var shrink = element.resizeSensor.childNodes[1];
- var shrinkChild = shrink.childNodes[0];
-
- var lastWidth, lastHeight;
-
- var reset = function() {
- expandChild.style.width = expand.offsetWidth + 10 + 'px';
- expandChild.style.height = expand.offsetHeight + 10 + 'px';
- expand.scrollLeft = expand.scrollWidth;
- expand.scrollTop = expand.scrollHeight;
- shrink.scrollLeft = shrink.scrollWidth;
- shrink.scrollTop = shrink.scrollHeight;
- lastWidth = element.offsetWidth;
- lastHeight = element.offsetHeight;
- };
-
- reset();
-
- var changed = function() {
- if (element.resizedAttached) {
- element.resizedAttached.call();
- }
- };
-
- var addEvent = function(el, name, cb) {
- if (el.attachEvent) {
- el.attachEvent('on' + name, cb);
- } else {
- el.addEventListener(name, cb);
- }
- };
-
- addEvent(expand, 'scroll', function() {
- if (element.offsetWidth > lastWidth || element.offsetHeight > lastHeight) {
- changed();
- }
- reset();
- });
-
- addEvent(shrink, 'scroll',function() {
- if (element.offsetWidth < lastWidth || element.offsetHeight < lastHeight) {
- changed();
- }
- reset();
- });
- }
-
- if ("[object Array]" === Object.prototype.toString.call(element)
- || ('undefined' !== typeof jQuery && element instanceof jQuery) //jquery
- || ('undefined' !== typeof Elements && element instanceof Elements) //mootools
- ) {
- var i = 0, j = element.length;
- for (; i < j; i++) {
- attachResizeEvent(element[i], callback);
- }
- } else {
- attachResizeEvent(element, callback);
- }
-
- this.detach = function() {
- ResizeSensor.detach(element);
- };
- };
-
- this.ResizeSensor.detach = function(element) {
- if (element.resizeSensor) {
- element.removeChild(element.resizeSensor);
- delete element.resizeSensor;
- delete element.resizedAttached;
- }
- };
-
-})(); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/d3/LICENSE b/chromium/third_party/catapult/tracing/third_party/d3/LICENSE
deleted file mode 100644
index fb7d95d70ba..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/d3/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright (c) 2014, Michael Bostock
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* The name Michael Bostock may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/chromium/third_party/catapult/tracing/third_party/d3/README.chromium b/chromium/third_party/catapult/tracing/third_party/d3/README.chromium
deleted file mode 100644
index 35362f83284..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/d3/README.chromium
+++ /dev/null
@@ -1,15 +0,0 @@
-Name: d3
-Short Name: d3
-URL: https://github.com/mbostock/d3
-Version: 0
-Revision: 0b2fe8fe9eaa529f70f6ab93bc8580b2a5328f43
-Date: Sat Mar 1 11:31:09 2014 -0800
-License: BSD
-License File: NOT_SHIPPED
-Security Critical: no
-
-Description:
-A JavaScript visualization library for HTML and SVG.
-
-Local Modifications:
-Took only the minified JS file and associated license.
diff --git a/chromium/third_party/catapult/tracing/third_party/d3/d3.min.js b/chromium/third_party/catapult/tracing/third_party/d3/d3.min.js
deleted file mode 100644
index b0178b69e86..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/d3/d3.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-!function(){function n(n){return null!=n&&!isNaN(n)}function t(n){return n.length}function e(n){for(var t=1;n*t%1;)t*=10;return t}function r(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function u(){}function i(n){return aa+n in this}function o(n){return n=aa+n,n in this&&delete this[n]}function a(){var n=[];return this.forEach(function(t){n.push(t)}),n}function c(){var n=0;for(var t in this)t.charCodeAt(0)===ca&&++n;return n}function s(){for(var n in this)if(n.charCodeAt(0)===ca)return!1;return!0}function l(){}function f(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function h(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=sa.length;r>e;++e){var u=sa[e]+t;if(u in n)return u}}function g(){}function p(){}function v(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new u;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function d(){Xo.event.preventDefault()}function m(){for(var n,t=Xo.event;n=t.sourceEvent;)t=n;return t}function y(n){for(var t=new p,e=0,r=arguments.length;++e<r;)t[arguments[e]]=v(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=Xo.event;u.target=n,Xo.event=u,t[u.type].apply(e,r)}finally{Xo.event=i}}},t}function x(n){return fa(n,da),n}function M(n){return"function"==typeof n?n:function(){return ha(n,this)}}function _(n){return"function"==typeof n?n:function(){return ga(n,this)}}function b(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=Xo.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function w(n){return n.trim().replace(/\s+/g," ")}function S(n){return new RegExp("(?:^|\\s+)"+Xo.requote(n)+"(?:\\s+|$)","g")}function k(n){return n.trim().split(/^|\s+/)}function E(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=k(n).map(A);var u=n.length;return"function"==typeof t?r:e}function A(n){var t=S(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",w(u+" "+n))):e.setAttribute("class",w(u.replace(t," ")))}}function C(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function N(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function L(n){return"function"==typeof n?n:(n=Xo.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function T(n){return{__data__:n}}function q(n){return function(){return va(this,n)}}function z(n){return arguments.length||(n=Xo.ascending),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function R(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function D(n){return fa(n,ya),n}function P(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function U(){var n=this.__transition__;n&&++n.active}function j(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,Bo(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+Xo.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=H;a>0&&(n=n.substring(0,a));var s=Ma.get(n);return s&&(n=s,c=F),a?t?u:r:t?g:i}function H(n,t){return function(e){var r=Xo.event;Xo.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Xo.event=r}}}function F(n,t){var e=H(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function O(){var n=".dragsuppress-"+ ++ba,t="click"+n,e=Xo.select(Go).on("touchmove"+n,d).on("dragstart"+n,d).on("selectstart"+n,d);if(_a){var r=Jo.style,u=r[_a];r[_a]="none"}return function(i){function o(){e.on(t,null)}e.on(n,null),_a&&(r[_a]=u),i&&(e.on(t,function(){d(),o()},!0),setTimeout(o,0))}}function Y(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>wa&&(Go.scrollX||Go.scrollY)){e=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();wa=!(u.f||u.e),e.remove()}return wa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function I(n){return n>0?1:0>n?-1:0}function Z(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function V(n){return n>1?0:-1>n?Sa:Math.acos(n)}function X(n){return n>1?Ea:-1>n?-Ea:Math.asin(n)}function $(n){return((n=Math.exp(n))-1/n)/2}function B(n){return((n=Math.exp(n))+1/n)/2}function W(n){return((n=Math.exp(2*n))-1)/(n+1)}function J(n){return(n=Math.sin(n/2))*n}function G(){}function K(n,t,e){return new Q(n,t,e)}function Q(n,t,e){this.h=n,this.s=t,this.l=e}function nt(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,gt(u(n+120),u(n),u(n-120))}function tt(n,t,e){return new et(n,t,e)}function et(n,t,e){this.h=n,this.c=t,this.l=e}function rt(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),ut(e,Math.cos(n*=Na)*t,Math.sin(n)*t)}function ut(n,t,e){return new it(n,t,e)}function it(n,t,e){this.l=n,this.a=t,this.b=e}function ot(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=ct(u)*Fa,r=ct(r)*Oa,i=ct(i)*Ya,gt(lt(3.2404542*u-1.5371385*r-.4985314*i),lt(-.969266*u+1.8760108*r+.041556*i),lt(.0556434*u-.2040259*r+1.0572252*i))}function at(n,t,e){return n>0?tt(Math.atan2(e,t)*La,Math.sqrt(t*t+e*e),n):tt(0/0,0/0,n)}function ct(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function st(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function lt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ft(n){return gt(n>>16,255&n>>8,255&n)}function ht(n){return ft(n)+""}function gt(n,t,e){return new pt(n,t,e)}function pt(n,t,e){this.r=n,this.g=t,this.b=e}function vt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function dt(n,t,e){var r,u,i,o,a=0,c=0,s=0;if(u=/([a-z]+)\((.*)\)/i.exec(n))switch(i=u[2].split(","),u[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Mt(i[0]),Mt(i[1]),Mt(i[2]))}return(o=Va.get(n))?t(o.r,o.g,o.b):(null!=n&&"#"===n.charAt(0)&&(r=parseInt(n.substring(1),16),isNaN(r)||(4===n.length?(a=(3840&r)>>4,a=a>>4|a,c=240&r,c=c>>4|c,s=15&r,s=s<<4|s):7===n.length&&(a=(16711680&r)>>16,c=(65280&r)>>8,s=255&r))),t(a,c,s))}function mt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),K(r,u,c)}function yt(n,t,e){n=xt(n),t=xt(t),e=xt(e);var r=st((.4124564*n+.3575761*t+.1804375*e)/Fa),u=st((.2126729*n+.7151522*t+.072175*e)/Oa),i=st((.0193339*n+.119192*t+.9503041*e)/Ya);return ut(116*u-16,500*(r-u),200*(u-i))}function xt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Mt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function _t(n){return"function"==typeof n?n:function(){return n}}function bt(n){return n}function wt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),St(t,e,n,r)}}function St(n,t,e,r){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Xo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Go.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Xo.event;Xo.event=n;try{o.progress.call(i,c)}finally{Xo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Bo(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},Xo.rebind(i,o,"on"),null==r?i:i.get(kt(r))}function kt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Et(){var n=At(),t=Ct()-n;t>24?(isFinite(t)&&(clearTimeout(Wa),Wa=setTimeout(Et,t)),Ba=0):(Ba=1,Ga(Et))}function At(){var n=Date.now();for(Ja=Xa;Ja;)n>=Ja.t&&(Ja.f=Ja.c(n-Ja.t)),Ja=Ja.n;return n}function Ct(){for(var n,t=Xa,e=1/0;t;)t.f?t=n?n.n=t.n:Xa=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return $a=n,e}function Nt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Lt(n,t){var e=Math.pow(10,3*oa(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Tt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r?function(n){for(var t=n.length,u=[],i=0,o=r[0];t>0&&o>0;)u.push(n.substring(t-=o,t+o)),o=r[i=(i+1)%r.length];return u.reverse().join(e)}:bt;return function(n){var e=Qa.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"",c=e[4]||"",s=e[5],l=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(s||"0"===r&&"="===o)&&(s=r="0",o="=",f&&(l-=Math.floor((l-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=nc.get(g)||qt;var y=s&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Xo.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!s&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=l>b?new Array(b=l-b+1).join(r):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+e}}}function qt(n){return n+""}function zt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Rt(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new ec(e-1)),1),e}function i(n,e){return t(n=new ec(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{ec=zt;var r=new zt;return r._=n,o(r,t,e)}finally{ec=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Dt(n);return c.floor=c,c.round=Dt(r),c.ceil=Dt(u),c.offset=Dt(i),c.range=a,n}function Dt(n){return function(t,e){try{ec=zt;var r=new zt;return r._=t,n(r,e)._}finally{ec=Date}}}function Pt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.substring(c,a)),null!=(u=uc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=C[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.substring(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&ec!==zt,o=new(i?zt:ec);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+Math.floor(r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,s=e.length;c>a;){if(r>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in uc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.substring(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){M.lastIndex=0;var r=M.exec(t.substring(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.substring(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.substring(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,C.c.toString(),t,r)}function c(n,t,r){return e(n,C.x.toString(),t,r)}function s(n,t,r){return e(n,C.X.toString(),t,r)}function l(n,t,e){var r=x.get(t.substring(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{ec=zt;var t=new ec;return t._=n,r(t)}finally{ec=Date}}var r=t(n);return e.parse=function(n){try{ec=zt;var t=r.parse(n);return t&&t._}finally{ec=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ee;var x=Xo.map(),M=jt(v),_=Ht(v),b=jt(d),w=Ht(d),S=jt(m),k=Ht(m),E=jt(y),A=Ht(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Ut(n.getDate(),t,2)},e:function(n,t){return Ut(n.getDate(),t,2)},H:function(n,t){return Ut(n.getHours(),t,2)},I:function(n,t){return Ut(n.getHours()%12||12,t,2)},j:function(n,t){return Ut(1+tc.dayOfYear(n),t,3)},L:function(n,t){return Ut(n.getMilliseconds(),t,3)},m:function(n,t){return Ut(n.getMonth()+1,t,2)},M:function(n,t){return Ut(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Ut(n.getSeconds(),t,2)},U:function(n,t){return Ut(tc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Ut(tc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Ut(n.getFullYear()%100,t,2)},Y:function(n,t){return Ut(n.getFullYear()%1e4,t,4)},Z:ne,"%":function(){return"%"}},N={a:r,A:u,b:i,B:o,c:a,d:Bt,e:Bt,H:Jt,I:Jt,j:Wt,L:Qt,m:$t,M:Gt,p:l,S:Kt,U:Ot,w:Ft,W:Yt,x:c,X:s,y:Zt,Y:It,Z:Vt,"%":te};return t}function Ut(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function jt(n){return new RegExp("^(?:"+n.map(Xo.requote).join("|")+")","i")}function Ht(n){for(var t=new u,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Ft(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Ot(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e));return r?(n.U=+r[0],e+r[0].length):-1}function Yt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e));return r?(n.W=+r[0],e+r[0].length):-1}function It(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Zt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.y=Xt(+r[0]),e+r[0].length):-1}function Vt(n,t,e){return/^[+-]\d{4}$/.test(t=t.substring(e,e+5))?(n.Z=+t,e+5):-1}function Xt(n){return n+(n>68?1900:2e3)}function $t(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Bt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Wt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Jt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Gt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function Kt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function Qt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ne(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=~~(oa(t)/60),u=oa(t)%60;return e+Ut(r,"0",2)+Ut(u,"0",2)}function te(n,t,e){oc.lastIndex=0;var r=oc.exec(t.substring(e,e+1));return r?e+r[0].length:-1}function ee(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function re(){}function ue(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function ie(n,t){n&&lc.hasOwnProperty(n.type)&&lc[n.type](n,t)}function oe(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ae(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)oe(n[e],t,1);t.polygonEnd()}function ce(){function n(n,t){n*=Na,t=t*Na/2+Sa/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),s=Math.sin(t),l=i*s,f=u*c+l*Math.cos(a),h=l*o*Math.sin(a);hc.add(Math.atan2(h,f)),r=n,u=c,i=s}var t,e,r,u,i;gc.point=function(o,a){gc.point=n,r=(t=o)*Na,u=Math.cos(a=(e=a)*Na/2+Sa/4),i=Math.sin(a)},gc.lineEnd=function(){n(t,e)}}function se(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function le(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function fe(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function he(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ge(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function pe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function ve(n){return[Math.atan2(n[1],n[0]),X(n[2])]}function de(n,t){return oa(n[0]-t[0])<Aa&&oa(n[1]-t[1])<Aa}function me(n,t){n*=Na;var e=Math.cos(t*=Na);ye(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function ye(n,t,e){++pc,dc+=(n-dc)/pc,mc+=(t-mc)/pc,yc+=(e-yc)/pc}function xe(){function n(n,u){n*=Na;var i=Math.cos(u*=Na),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),s=Math.atan2(Math.sqrt((s=e*c-r*a)*s+(s=r*o-t*c)*s+(s=t*a-e*o)*s),t*o+e*a+r*c);vc+=s,xc+=s*(t+(t=o)),Mc+=s*(e+(e=a)),_c+=s*(r+(r=c)),ye(t,e,r)}var t,e,r;kc.point=function(u,i){u*=Na;var o=Math.cos(i*=Na);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),kc.point=n,ye(t,e,r)}}function Me(){kc.point=me}function _e(){function n(n,t){n*=Na;var e=Math.cos(t*=Na),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),s=u*c-i*a,l=i*o-r*c,f=r*a-u*o,h=Math.sqrt(s*s+l*l+f*f),g=r*o+u*a+i*c,p=h&&-V(g)/h,v=Math.atan2(h,g);bc+=p*s,wc+=p*l,Sc+=p*f,vc+=v,xc+=v*(r+(r=o)),Mc+=v*(u+(u=a)),_c+=v*(i+(i=c)),ye(r,u,i)}var t,e,r,u,i;kc.point=function(o,a){t=o,e=a,kc.point=n,o*=Na;var c=Math.cos(a*=Na);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),ye(r,u,i)},kc.lineEnd=function(){n(t,e),kc.lineEnd=Me,kc.point=me}}function be(){return!0}function we(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(de(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new ke(e,n,null,!0),s=new ke(e,null,c,!1);c.o=s,i.push(c),o.push(s),c=new ke(r,n,null,!1),s=new ke(r,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Se(i),Se(o),i.length){for(var a=0,c=e,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Se(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function ke(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Ee(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function s(){y.point=o,d.lineEnd()}function l(n,t){v.push([n,t]);var e=u(n,t);M.point(e[0],e[1])}function f(){M.lineStart(),v=[]}function h(){l(v[0][0],v[0][1]),M.lineEnd();var n,t=M.clean(),e=x.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r){if(1&t){n=e[0];var u,r=n.length-1,o=-1;for(i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);return i.lineEnd(),void 0}r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Ae))}}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[],i.polygonStart()},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=Xo.merge(g);var n=Le(m,p);g.length?we(g,Ne,n,e,i):n&&(i.lineStart(),e(null,null,1,i),i.lineEnd()),i.polygonEnd(),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=Ce(),M=t(x);return y}}function Ae(n){return n.length>1}function Ce(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:g,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ne(n,t){return((n=n.x)[0]<0?n[1]-Ea-Aa:Ea-n[1])-((t=t.x)[0]<0?t[1]-Ea-Aa:Ea-t[1])}function Le(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;hc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+Sa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+Sa/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>Sa,k=p*x;if(hc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*ka:_,S^h>=e^m>=e){var E=fe(se(f),se(n));pe(E);var A=fe(u,E);pe(A);var C=(S^_>=0?-1:1)*X(A[2]);(r>C||r===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Aa>i||Aa>i&&0>hc)^1&o}function Te(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Sa:-Sa,c=oa(i-e);oa(c-Sa)<Aa?(n.point(e,r=(r+o)/2>0?Ea:-Ea),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Sa&&(oa(e-u)<Aa&&(e-=u*Aa),oa(i-a)<Aa&&(i-=a*Aa),r=qe(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function qe(n,t,e,r){var u,i,o=Math.sin(n-e);return oa(o)>Aa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function ze(n,t,e,r){var u;if(null==n)u=e*Ea,r.point(-Sa,u),r.point(0,u),r.point(Sa,u),r.point(Sa,0),r.point(Sa,-u),r.point(0,-u),r.point(-Sa,-u),r.point(-Sa,0),r.point(-Sa,u);else if(oa(n[0]-t[0])>Aa){var i=n[0]<t[0]?Sa:-Sa;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Re(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Sa:-Sa),h):0;if(!e&&(s=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(de(e,g)||de(p,g))&&(p[0]+=Aa,p[1]+=Aa,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&de(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return l|(s&&c)<<1}}}function r(n,t,e){var r=se(n),u=se(t),o=[1,0,0],a=fe(r,u),c=le(a,a),s=a[0],l=c-s*s;if(!l)return!e&&n;var f=i*c/l,h=-i*s/l,g=fe(o,a),p=ge(o,f),v=ge(a,h);he(p,v);var d=g,m=le(p,d),y=le(d,d),x=m*m-y*(le(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=ge(d,(-m-M)/y);if(he(_,p),_=ve(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=oa(A-Sa)<Aa,N=C||Aa>A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(oa(_[0]-w)<Aa?k:E):k<=_[1]&&_[1]<=E:A>Sa^(w<=_[0]&&_[0]<=S)){var L=ge(d,(-m+M)/y);return he(L,p),[_,ve(L)]}}}function u(t,e){var r=o?n:Sa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=oa(i)>Aa,c=cr(n,6*Na);return Ee(t,e,c,o?[0,-n]:[-Sa,n-Sa])}function De(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function Pe(n,t,e,r){function u(r,u){return oa(r[0]-n)<Aa?u>0?0:3:oa(r[0]-e)<Aa?u>0?2:1:oa(r[1]-t)<Aa?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,s=a[0];c>o;++o)i=a[o],s[1]<=r?i[1]>r&&Z(s,i,n)>0&&++t:i[1]<=r&&Z(s,i,n)<0&&--t,s=i;return 0!==t}function s(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:e,l>1?r:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function l(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){l(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Ac,Math.min(Ac,n)),t=Math.max(-Ac,Math.min(Ac,t));var e=l(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};C(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=Ce(),C=De(n,t,e,r),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Xo.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),u&&we(v,i,t,s,a),a.polygonEnd()),v=d=m=null}};return N}}function Ue(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function je(n){var t=0,e=Sa/3,r=nr(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Sa/180,e=n[1]*Sa/180):[180*(t/Sa),180*(e/Sa)]},u}function He(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,X((i-(n*n+e*e)*u*u)/(2*u))]},e}function Fe(){function n(n,t){Nc+=u*n-r*t,r=n,u=t}var t,e,r,u;Rc.point=function(i,o){Rc.point=n,t=r=i,e=u=o},Rc.lineEnd=function(){n(t,e)}}function Oe(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),Tc>t&&(Tc=t),t>zc&&(zc=t)}function Ye(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Ie(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Ie(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Ie(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Ze(n,t){dc+=n,mc+=t,++yc}function Ve(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);xc+=o*(t+n)/2,Mc+=o*(e+r)/2,_c+=o,Ze(t=n,e=r)}var t,e;Pc.point=function(r,u){Pc.point=n,Ze(t=r,e=u)}}function Xe(){Pc.point=Ze}function $e(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);xc+=o*(r+n)/2,Mc+=o*(u+t)/2,_c+=o,o=u*n-r*t,bc+=o*(r+n),wc+=o*(u+t),Sc+=3*o,Ze(r=n,u=t)}var t,e,r,u;Pc.point=function(i,o){Pc.point=n,Ze(t=r=i,e=u=o)},Pc.lineEnd=function(){n(t,e)}}function Be(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,ka)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:g};return a}function We(n){function t(n){return(a?r:e)(n)}function e(t){return Ke(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=0/0,S.point=i,t.lineStart()}function i(e,r){var i=se([e,r]),o=n(e,r);u(x,M,y,_,b,w,x=o[0],M=o[1],y=e,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-e,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=oa(oa(w)-1)<Aa||oa(r-h)<Aa?(r+h)/2:Math.atan2(b,_),A=n(E,k),C=A[0],N=A[1],L=C-t,T=N-e,q=x*L-y*T;(q*q/M>i||oa((y*L+x*T)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,e,r,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Na),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function Je(n){var t=We(function(t,e){return n([t*La,e*La])});return function(n){return tr(t(n))}}function Ge(n){this.stream=n}function Ke(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Qe(n){return nr(function(){return n})()}function nr(n){function t(n){return n=a(n[0]*Na,n[1]*Na),[n[0]*h+c,s-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*La,n[1]*La]}function r(){a=Ue(o=ur(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u()}function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=We(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ec,_=bt,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=tr(M(o,f(_(n)))),l.valid=!0,l},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ec):Re((b=+n)*Na),u()):b
-},t.clipExtent=function(n){return arguments.length?(w=n,_=n?Pe(n[0][0],n[0][1],n[1][0],n[1][1]):bt,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Na,d=n[1]%360*Na,r()):[v*La,d*La]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Na,y=n[1]%360*Na,x=n.length>2?n[2]%360*Na:0,r()):[m*La,y*La,x*La]},Xo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function tr(n){return Ke(n,function(t,e){n.point(t*Na,e*Na)})}function er(n,t){return[n,t]}function rr(n,t){return[n>Sa?n-ka:-Sa>n?n+ka:n,t]}function ur(n,t,e){return n?t||e?Ue(or(n),ar(t,e)):or(n):t||e?ar(t,e):rr}function ir(n){return function(t,e){return t+=n,[t>Sa?t-ka:-Sa>t?t+ka:t,e]}}function or(n){var t=ir(n);return t.invert=ir(-n),t}function ar(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*r+a*u;return[Math.atan2(c*i-l*o,a*r-s*u),X(l*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*r+l*u),X(l*r-a*u)]},e}function cr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=sr(e,u),i=sr(e,i),(o>0?i>u:u>i)&&(u+=o*ka)):(u=n+o*ka,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=ve([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],s[1])}}function sr(n,t){var e=se(t);e[0]-=n,pe(e);var r=V(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Aa)%(2*Math.PI)}function lr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function fr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function hr(n){return n.source}function gr(n){return n.target}function pr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(J(r-t)+u*o*J(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*l,u=e*s+t*f,o=e*i+t*a;return[Math.atan2(u,r)*La,Math.atan2(o,Math.sqrt(r*r+u*u))*La]}:function(){return[n*La,t*La]};return p.distance=h,p}function vr(){function n(n,u){var i=Math.sin(u*=Na),o=Math.cos(u),a=oa((n*=Na)-t),c=Math.cos(a);Uc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;jc.point=function(u,i){t=u*Na,e=Math.sin(i*=Na),r=Math.cos(i),jc.point=n},jc.lineEnd=function(){jc.point=jc.lineEnd=g}}function dr(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function mr(n,t){function e(n,t){var e=oa(oa(t)-Ea)<Aa?0:o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Sa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=I(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ea]},e):xr}function yr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return oa(u)<Aa?er:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-I(u)*Math.sqrt(n*n+e*e)]},e)}function xr(n,t){return[n,Math.log(Math.tan(Sa/4+t/2))]}function Mr(n){var t,e=Qe(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Sa*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function _r(n,t){return[Math.log(Math.tan(Sa/4+t/2)),-n]}function br(n){return n[0]}function wr(n){return n[1]}function Sr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Z(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function kr(n,t){return n[0]-t[0]||n[1]-t[1]}function Er(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Ar(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],s=e[1],l=t[1]-c,f=r[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function Cr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Nr(){Jr(this),this.edge=this.site=this.circle=null}function Lr(n){var t=Jc.pop()||new Nr;return t.site=n,t}function Tr(n){Or(n),$c.remove(n),Jc.push(n),Jr(n)}function qr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Tr(n);for(var c=i;c.circle&&oa(e-c.circle.x)<Aa&&oa(r-c.circle.cy)<Aa;)i=c.P,a.unshift(c),Tr(c),c=i;a.unshift(c),Or(c);for(var s=o;s.circle&&oa(e-s.circle.x)<Aa&&oa(r-s.circle.cy)<Aa;)o=s.N,a.push(s),Tr(s),s=o;a.push(s),Or(s);var l,f=a.length;for(l=1;f>l;++l)s=a[l],c=a[l-1],$r(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=Vr(c.site,s.site,null,u),Fr(c),Fr(s)}function zr(n){for(var t,e,r,u,i=n.x,o=n.y,a=$c._;a;)if(r=Rr(a,o)-i,r>Aa)a=a.L;else{if(u=i-Dr(a,o),!(u>Aa)){r>-Aa?(t=a.P,e=a):u>-Aa?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Lr(n);if($c.insert(t,c),t||e){if(t===e)return Or(t),e=Lr(t.site),$c.insert(c,e),c.edge=e.edge=Vr(t.site,c.site),Fr(t),Fr(e),void 0;if(!e)return c.edge=Vr(t.site,c.site),void 0;Or(t),Or(e);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=e.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};$r(e.edge,s,p,M),c.edge=Vr(s,n,null,M),e.edge=Vr(n,p,null,M),Fr(t),Fr(e)}}function Rr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,s=c-t;if(!s)return a;var l=a-r,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+r:(r+a)/2}function Dr(n,t){var e=n.N;if(e)return Rr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Pr(n){this.site=n,this.edges=[]}function Ur(n){for(var t,e,r,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),r=l.x,u=l.y,s=a[++o%c].start(),t=s.x,e=s.y,(oa(r-t)>Aa||oa(u-e)>Aa)&&(a.splice(o,0,new Br(Xr(i.site,l,oa(r-f)<Aa&&p-u>Aa?{x:f,y:oa(t-f)<Aa?e:p}:oa(u-p)<Aa&&h-r>Aa?{x:oa(e-p)<Aa?t:h,y:p}:oa(r-h)<Aa&&u-g>Aa?{x:h,y:oa(t-h)<Aa?e:g}:oa(u-g)<Aa&&r-f>Aa?{x:oa(e-g)<Aa?t:f,y:g}:null),i.site,null)),++c)}function jr(n,t){return t.angle-n.angle}function Hr(){Jr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,s=r.y-a,l=i.x-o,f=i.y-a,h=2*(c*f-s*l);if(!(h>=-Ca)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Gc.pop()||new Hr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}Wc.insert(y,m),y||(Bc=m)}}}}function Or(n){var t=n.circle;t&&(t.P||(Bc=t.N),Wc.remove(t),Gc.push(t),Jr(t),n.circle=null)}function Yr(n){for(var t,e=Vc,r=De(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Ir(t,n)||!r(t)||oa(t.a.x-t.b.x)<Aa&&oa(t.a.y-t.b.y)<Aa)&&(t.a=t.b=null,e.splice(u,1))}function Ir(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],s=t[1][1],l=n.l,f=n.r,h=l.x,g=l.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};e={x:d,y:s}}else{if(i){if(i.y<c)return}else i={x:d,y:s};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/r,y:c};e={x:(s-u)/r,y:s}}else{if(i){if(i.y<c)return}else i={x:(s-u)/r,y:s};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Zr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Vr(n,t,e,r){var u=new Zr(n,t);return Vc.push(u),e&&$r(u,n,t,e),r&&$r(u,t,n,r),Xc[n.i].edges.push(new Br(u,n,t)),Xc[t.i].edges.push(new Br(u,t,n)),u}function Xr(n,t,e){var r=new Zr(n,null);return r.a=t,r.b=e,Vc.push(r),r}function $r(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Br(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function Wr(){this._=null}function Jr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function Gr(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Kr(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Qr(n){for(;n.L;)n=n.L;return n}function nu(n,t){var e,r,u,i=n.sort(tu).pop();for(Vc=[],Xc=new Array(n.length),$c=new Wr,Wc=new Wr;;)if(u=Bc,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(Xc[i.i]=new Pr(i),zr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;qr(u.arc)}t&&(Yr(t),Ur(t));var o={cells:Xc,edges:Vc};return $c=Wc=Vc=Xc=null,o}function tu(n,t){return t.y-n.y||t.x-n.x}function eu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function ru(n){return n.x}function uu(n){return n.y}function iu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function ou(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&ou(n,c[0],e,r,o,a),c[1]&&ou(n,c[1],o,r,u,a),c[2]&&ou(n,c[2],e,a,o,i),c[3]&&ou(n,c[3],o,a,u,i)}}function au(n,t){n=Xo.rgb(n),t=Xo.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+vt(Math.round(e+i*n))+vt(Math.round(r+o*n))+vt(Math.round(u+a*n))}}function cu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=fu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function su(n,t){return t-=n=+n,function(e){return n+t*e}}function lu(n,t){var e,r,u,i,o,a=0,c=0,s=[],l=[];for(n+="",t+="",Qc.lastIndex=0,r=0;e=Qc.exec(t);++r)e.index&&s.push(t.substring(a,c=e.index)),l.push({i:s.length,x:e[0]}),s.push(null),a=Qc.lastIndex;for(a<t.length&&s.push(t.substring(a)),r=0,i=l.length;(e=Qc.exec(n))&&i>r;++r)if(o=l[r],o.x==e[0]){if(o.i)if(null==s[o.i+1])for(s[o.i-1]+=o.x,s.splice(o.i,1),u=r+1;i>u;++u)l[u].i--;else for(s[o.i-1]+=o.x+s[o.i+1],s.splice(o.i,2),u=r+1;i>u;++u)l[u].i-=2;else if(null==s[o.i+1])s[o.i]=o.x;else for(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1),u=r+1;i>u;++u)l[u].i--;l.splice(r,1),i--,r--}else o.x=su(parseFloat(e[0]),parseFloat(o.x));for(;i>r;)o=l.pop(),null==s[o.i+1]?s[o.i]=o.x:(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1)),i--;return 1===s.length?null==s[0]?(o=l[0].x,function(n){return o(n)+""}):function(){return t}:function(n){for(r=0;i>r;++r)s[(o=l[r]).i]=o.x(n);return s.join("")}}function fu(n,t){for(var e,r=Xo.interpolators.length;--r>=0&&!(e=Xo.interpolators[r](n,t)););return e}function hu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(fu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function gu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function pu(n){return function(t){return 1-n(1-t)}}function vu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function du(n){return n*n}function mu(n){return n*n*n}function yu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function xu(n){return function(t){return Math.pow(t,n)}}function Mu(n){return 1-Math.cos(n*Ea)}function _u(n){return Math.pow(2,10*(n-1))}function bu(n){return 1-Math.sqrt(1-n*n)}function wu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/ka*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*ka/t)}}function Su(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function ku(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Eu(n,t){n=Xo.hcl(n),t=Xo.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return rt(e+i*n,r+o*n,u+a*n)+""}}function Au(n,t){n=Xo.hsl(n),t=Xo.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return nt(e+i*n,r+o*n,u+a*n)+""}}function Cu(n,t){n=Xo.lab(n),t=Xo.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ot(e+i*n,r+o*n,u+a*n)+""}}function Nu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Lu(n){var t=[n.a,n.b],e=[n.c,n.d],r=qu(t),u=Tu(t,e),i=qu(zu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*La,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*La:0}function Tu(n,t){return n[0]*t[0]+n[1]*t[1]}function qu(n){var t=Math.sqrt(Tu(n,n));return t&&(n[0]/=t,n[1]/=t),t}function zu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ru(n,t){var e,r=[],u=[],i=Xo.transform(n),o=Xo.transform(t),a=i.translate,c=o.translate,s=i.rotate,l=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:su(a[0],c[0])},{i:3,x:su(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),s!=l?(s-l>180?l+=360:l-s>180&&(s+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:su(s,l)})):l&&r.push(r.pop()+"rotate("+l+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:su(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:su(g[0],p[0])},{i:e-2,x:su(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Du(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return(e-n)*t}}function Pu(n,t){return t=t-(n=+n)?1/(t-n):0,function(e){return Math.max(0,Math.min(1,(e-n)*t))}}function Uu(n){for(var t=n.source,e=n.target,r=Hu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function ju(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Hu(n,t){if(n===t)return n;for(var e=ju(n),r=ju(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function Fu(n){n.fixed|=2}function Ou(n){n.fixed&=-7}function Yu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Iu(n){n.fixed&=-5}function Zu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Zu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var s=t*e[n.point.index];n.charge+=n.pointCharge=s,r+=s*n.point.x,u+=s*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Vu(n,t){return Xo.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=Wu,n}function Xu(n){return n.children}function $u(n){return n.value}function Bu(n,t){return t.value-n.value}function Wu(n){return Xo.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function Ju(n){return n.x}function Gu(n){return n.y}function Ku(n,t,e){n.y0=t,n.y=e}function Qu(n){return Xo.range(n.length)}function ni(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function ti(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function ei(n){return n.reduce(ri,0)}function ri(n,t){return n+t[1]}function ui(n,t){return ii(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ii(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function oi(n){return[Xo.min(n),Xo.max(n)]}function ai(n,t){return n.parent==t.parent?1:2}function ci(n){var t=n.children;return t&&t.length?t[0]:n._tree.thread}function si(n){var t,e=n.children;return e&&(t=e.length)?e[t-1]:n._tree.thread}function li(n,t){var e=n.children;if(e&&(u=e.length))for(var r,u,i=-1;++i<u;)t(r=li(e[i],t),n)>0&&(n=r);return n}function fi(n,t){return n.x-t.x}function hi(n,t){return t.x-n.x}function gi(n,t){return n.depth-t.depth}function pi(n,t){function e(n,r){var u=n.children;if(u&&(o=u.length))for(var i,o,a=null,c=-1;++c<o;)i=u[c],e(i,a),a=i;t(n,r)}e(n,null)}function vi(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i]._tree,t.prelim+=e,t.mod+=e,e+=t.shift+(r+=t.change)}function di(n,t,e){n=n._tree,t=t._tree;var r=e/(t.number-n.number);n.change+=r,t.change-=r,t.shift+=e,t.prelim+=e,t.mod+=e}function mi(n,t,e){return n._tree.ancestor.parent==t.parent?n._tree.ancestor:e}function yi(n,t){return n.value-t.value}function xi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Mi(n,t){n._pack_next=t,t._pack_prev=n}function _i(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function bi(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(s=e.length)){var e,r,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(wi),r=e[0],r.x=-r.r,r.y=0,t(r),s>1&&(u=e[1],u.x=u.r,u.y=0,t(u),s>2))for(i=e[2],Ei(r,u,i),t(i),xi(r,i),r._pack_prev=i,xi(i,u),u=r._pack_next,o=3;s>o;o++){Ei(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(_i(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!_i(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?Mi(r,u=a):Mi(r=c,u),o--):(xi(r,i),u=i,t(i))}var m=(l+f)/2,y=(h+g)/2,x=0;for(o=0;s>o;o++)i=e[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,e.forEach(Si)}}function wi(n){n._pack_next=n._pack_prev=n}function Si(n){delete n._pack_next,delete n._pack_prev}function ki(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)ki(u[i],t,e,r)}function Ei(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),s=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+s*i,e.y=n.y+c*i-s*u}else e.x=n.x+r,e.y=n.y}function Ai(n){return 1+Xo.max(n,function(n){return n.y})}function Ci(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ni(n){var t=n.children;return t&&t.length?Ni(t[0]):n}function Li(n){var t,e=n.children;return e&&(t=e.length)?Li(e[t-1]):n}function Ti(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function qi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function zi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ri(n){return n.rangeExtent?n.rangeExtent():zi(n.range())}function Di(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Pi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Ui(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ls}function ji(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=Xo.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Hi(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?ji:Di,c=r?Pu:Du;return o=u(n,t,c,e),a=u(t,n,c,fu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Nu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Ii(n,t)},i.tickFormat=function(t,e){return Zi(n,t,e)},i.nice=function(t){return Oi(n,t),u()},i.copy=function(){return Hi(n,t,e,r)},u()}function Fi(n,t){return Xo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Oi(n,t){return Pi(n,Ui(Yi(n,t)[2]))}function Yi(n,t){null==t&&(t=10);var e=zi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Ii(n,t){return Xo.range.apply(Xo,Yi(n,t))}function Zi(n,t,e){var r=Yi(n,t);return Xo.format(e?e.replace(Qa,function(n,t,e,u,i,o,a,c,s,l){return[t,e,u,i,o,a,c,s||"."+Xi(l,r),l].join("")}):",."+Vi(r[2])+"f")}function Vi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Xi(n,t){var e=Vi(t[2]);return n in fs?Math.abs(e-Vi(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==n):e-2*("%"===n)}function $i(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Pi(r.map(u),e?Math:gs);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=zi(r),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(e){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++<l;)for(var h=f-1;h>0;h--)o.push(i(s)*h);for(s=0;o[s]<a;s++);for(l=o.length;o[l-1]>c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return hs;arguments.length<2?t=hs:"function"!=typeof t&&(t=Xo.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return $i(n.copy(),t,e,r)},Fi(o,n)}function Bi(n,t,e){function r(t){return n(u(t))}var u=Wi(t),i=Wi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Ii(e,n)},r.tickFormat=function(n,t){return Zi(e,n,t)},r.nice=function(n){return r.domain(Oi(e,n))},r.exponent=function(o){return arguments.length?(u=Wi(t=o),i=Wi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Bi(n.copy(),t,e)},Fi(r,n)}function Wi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Ji(n,t){function e(e){return o[((i.get(e)||"range"===t.t&&i.set(e,n.push(e)))-1)%o.length]}function r(t,e){return Xo.range(n.length).map(function(n){return t+e*n})}var i,o,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new u;for(var o,a=-1,c=r.length;++a<c;)i.has(o=r[a])||i.set(o,n.push(o));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(o=n,a=0,t={t:"range",a:arguments},e):o},e.rangePoints=function(u,i){arguments.length<2&&(i=0);var c=u[0],s=u[1],l=(s-c)/(Math.max(1,n.length-1)+i);return o=r(n.length<2?(c+s)/2:c+l*i/2,l),a=0,t={t:"rangePoints",a:arguments},e},e.rangeBands=function(u,i,c){arguments.length<2&&(i=0),arguments.length<3&&(c=i);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=(f-l)/(n.length-i+2*c);return o=r(l+h*c,h),s&&o.reverse(),a=h*(1-i),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,i,c){arguments.length<2&&(i=0),arguments.length<3&&(c=i);var s=u[1]<u[0],l=u[s-0],f=u[1-s],h=Math.floor((f-l)/(n.length-i+2*c)),g=f-l-(n.length-i)*h;return o=r(l+Math.round(g/2),h),s&&o.reverse(),a=Math.round(h*(1-i)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return zi(t.a[0])},e.copy=function(){return Ji(n,t)},e.domain(n)}function Gi(n,t){function e(){var e=0,i=t.length;for(u=[];++e<i;)u[e-1]=Xo.quantile(n,e/i);return r}function r(n){return isNaN(n=+n)?void 0:t[Xo.bisect(u,n)]}var u;return r.domain=function(t){return arguments.length?(n=t.filter(function(n){return!isNaN(n)}).sort(Xo.ascending),e()):n},r.range=function(n){return arguments.length?(t=n,e()):t},r.quantiles=function(){return u},r.invertExtent=function(e){return e=t.indexOf(e),0>e?[0/0,0/0]:[e>0?u[e-1]:n[0],e<u.length?u[e]:n[n.length-1]]},r.copy=function(){return Gi(n,t)},e()}function Ki(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return Ki(n,t,e)},u()}function Qi(n,t){function e(e){return e>=e?t[Xo.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Qi(n,t)},e}function no(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Ii(n,t)},t.tickFormat=function(t,e){return Zi(n,t,e)},t.copy=function(){return no(n)},t}function to(n){return n.innerRadius}function eo(n){return n.outerRadius}function ro(n){return n.startAngle}function uo(n){return n.endAngle}function io(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=_t(e),p=_t(r);++f<h;)u.call(this,c=t[f],f)?l.push([+g.call(this,c,f),+p.call(this,c,f)]):l.length&&(o(),l=[]);return l.length&&o(),s.length?s.join(""):null}var e=br,r=wr,u=be,i=oo,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=Ms.get(n)||oo).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function oo(n){return n.join("L")}function ao(n){return oo(n)+"Z"}function co(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function so(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function lo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function fo(n,t){return n.length<4?oo(n):n[1]+po(n.slice(1,n.length-1),vo(n,t))}function ho(n,t){return n.length<3?oo(n):n[0]+po((n.push(n[0]),n),vo([n[n.length-2]].concat(n,[n[1]]),t))}function go(n,t){return n.length<3?oo(n):n[0]+po(n,vo(n,t))}function po(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return oo(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var s=2;s<t.length;s++,c++)i=n[c],a=t[s],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var l=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+l[0]+","+l[1]}return r}function vo(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function mo(n){if(n.length<3)return oo(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",_o(ws,o),",",_o(ws,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),bo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function yo(n){if(n.length<4)return oo(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(_o(ws,i)+","+_o(ws,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),bo(e,i,o);return e.join("")}function xo(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[_o(ws,o),",",_o(ws,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),bo(t,o,a);return t.join("")}function Mo(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,s=-1;++s<=e;)r=n[s],u=s/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return mo(n)}function _o(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function bo(n,t,e){n.push("C",_o(_s,t),",",_o(_s,e),",",_o(bs,t),",",_o(bs,e),",",_o(ws,t),",",_o(ws,e))}function wo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function So(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=wo(u,i);++t<e;)r[t]=(o+(o=wo(u=i,i=n[t+1])))/2;return r[t]=o,r}function ko(n){for(var t,e,r,u,i=[],o=So(n),a=-1,c=n.length-1;++a<c;)t=wo(n[a],n[a+1]),oa(t)<Aa?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Eo(n){return n.length<3?oo(n):n[0]+po(n,ko(n))}function Ao(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]+ys,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Co(n){function t(t){function c(){v.push("M",a(n(m),f),l,s(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,x=t.length,M=_t(e),_=_t(u),b=e===r?function(){return g}:_t(r),w=u===i?function(){return p}:_t(i);++y<x;)o.call(this,h=t[y],y)?(d.push([g=+M.call(this,h,y),p=+_.call(this,h,y)]),m.push([+b.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=br,r=br,u=0,i=wr,o=be,a=oo,c=a.key,s=a,l="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=Ms.get(n)||oo).key,s=a.reverse||a,l=a.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(f=n,t):f},t}function No(n){return n.radius}function Lo(n){return[n.x,n.y]}function To(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]+ys;return[e*Math.cos(r),e*Math.sin(r)]}}function qo(){return 64}function zo(){return"circle"}function Ro(n){var t=Math.sqrt(n/Sa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Do(n,t){return fa(n,Ns),n.id=t,n}function Po(n,t,e,r){var u=n.id;return R(n,"function"==typeof e?function(n,i,o){n.__transition__[u].tween.set(t,r(e.call(n,n.__data__,i,o)))}:(e=r(e),function(n){n.__transition__[u].tween.set(t,e)}))}function Uo(n){return null==n&&(n=""),function(){this.textContent=n}}function jo(n,t,e,r){var i=n.__transition__||(n.__transition__={active:0,count:0}),o=i[e];if(!o){var a=r.time;o=i[e]={tween:new u,time:a,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,Xo.timer(function(r){function u(r){return i.active>e?s():(i.active=e,o.event&&o.event.start.call(n,l,t),o.tween.forEach(function(e,r){(r=r.call(n,l,t))&&v.push(r)}),Xo.timer(function(){return p.c=c(r||1)?be:c,1},0,a),void 0)}function c(r){if(i.active!==e)return s();for(var u=r/g,a=f(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,l,t),s()):void 0}function s(){return--i.count?delete i[e]:delete n.__transition__,1}var l=n.__data__,f=o.ease,h=o.delay,g=o.duration,p=Ja,v=[];return p.t=h+a,r>=h?u(r-h):(p.c=u,void 0)},0,a)}}function Ho(n,t){n.attr("transform",function(n){return"translate("+t(n)+",0)"})}function Fo(n,t){n.attr("transform",function(n){return"translate(0,"+t(n)+")"})}function Oo(n){return n.toISOString()}function Yo(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=Xo.bisect(js,u);return i==js.length?[t.year,Yi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/js[i-1]<js[i]/u?i-1:i]:[Os,Yi(n,e)[2]]
-}return r.invert=function(t){return Io(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Io)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Io(+e+1),t).length}var i=r.domain(),o=zi(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Pi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=zi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Yo(n.copy(),t,e)},Fi(r,n)}function Io(n){return new Date(n)}function Zo(n){return JSON.parse(n.responseText)}function Vo(n){var t=Wo.createRange();return t.selectNode(Wo.body),t.createContextualFragment(n.responseText)}var Xo={version:"3.4.3"};Date.now||(Date.now=function(){return+new Date});var $o=[].slice,Bo=function(n){return $o.call(n)},Wo=document,Jo=Wo.documentElement,Go=window;try{Bo(Jo.childNodes)[0].nodeType}catch(Ko){Bo=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{Wo.createElement("div").style.setProperty("opacity",0,"")}catch(Qo){var na=Go.Element.prototype,ta=na.setAttribute,ea=na.setAttributeNS,ra=Go.CSSStyleDeclaration.prototype,ua=ra.setProperty;na.setAttribute=function(n,t){ta.call(this,n,t+"")},na.setAttributeNS=function(n,t,e){ea.call(this,n,t,e+"")},ra.setProperty=function(n,t,e){ua.call(this,n,t+"",e)}}Xo.ascending=function(n,t){return t>n?-1:n>t?1:n>=t?0:0/0},Xo.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},Xo.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(e=n[u])&&e>=e);)e=void 0;for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i&&!(null!=(e=t.call(n,n[u],u))&&e>=e);)e=void 0;for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},Xo.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i&&!(null!=(e=n[u])&&e>=e);)e=void 0;for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i&&!(null!=(e=t.call(n,n[u],u))&&e>=e);)e=void 0;for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},Xo.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o&&!(null!=(e=u=n[i])&&e>=e);)e=u=void 0;for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o&&!(null!=(e=u=t.call(n,n[i],i))&&e>=e);)e=void 0;for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},Xo.sum=function(n,t){var e,r=0,u=n.length,i=-1;if(1===arguments.length)for(;++i<u;)isNaN(e=+n[i])||(r+=e);else for(;++i<u;)isNaN(e=+t.call(n,n[i],i))||(r+=e);return r},Xo.mean=function(t,e){var r,u=t.length,i=0,o=-1,a=0;if(1===arguments.length)for(;++o<u;)n(r=t[o])&&(i+=(r-i)/++a);else for(;++o<u;)n(r=e.call(t,t[o],o))&&(i+=(r-i)/++a);return a?i:void 0},Xo.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},Xo.median=function(t,e){return arguments.length>1&&(t=t.map(e)),t=t.filter(n),t.length?Xo.quantile(t.sort(Xo.ascending),.5):void 0},Xo.bisector=function(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n.call(t,t[i],i)<e?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;e<n.call(t,t[i],i)?u=i:r=i+1}return r}}};var ia=Xo.bisector(function(n){return n});Xo.bisectLeft=ia.left,Xo.bisect=Xo.bisectRight=ia.right,Xo.shuffle=function(n){for(var t,e,r=n.length;r;)e=0|Math.random()*r--,t=n[r],n[r]=n[e],n[e]=t;return n},Xo.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},Xo.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},Xo.zip=function(){if(!(u=arguments.length))return[];for(var n=-1,e=Xo.min(arguments,t),r=new Array(e);++n<e;)for(var u,i=-1,o=r[n]=new Array(u);++i<u;)o[i]=arguments[i][n];return r},Xo.transpose=function(n){return Xo.zip.apply(Xo,n)},Xo.keys=function(n){var t=[];for(var e in n)t.push(e);return t},Xo.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},Xo.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},Xo.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var oa=Math.abs;Xo.range=function(n,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/r)throw new Error("infinite range");var u,i=[],o=e(oa(r)),a=-1;if(n*=o,t*=o,r*=o,0>r)for(;(u=n+r*++a)>t;)i.push(u/o);else for(;(u=n+r*++a)<t;)i.push(u/o);return i},Xo.map=function(n){var t=new u;if(n instanceof u)n.forEach(function(n,e){t.set(n,e)});else for(var e in n)t.set(e,n[e]);return t},r(u,{has:i,get:function(n){return this[aa+n]},set:function(n,t){return this[aa+n]=t},remove:o,keys:a,values:function(){var n=[];return this.forEach(function(t,e){n.push(e)}),n},entries:function(){var n=[];return this.forEach(function(t,e){n.push({key:t,value:e})}),n},size:c,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===ca&&n.call(this,t.substring(1),this[t])}});var aa="\x00",ca=aa.charCodeAt(0);Xo.nest=function(){function n(t,a,c){if(c>=o.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,l,f,h,g=-1,p=a.length,v=o[c++],d=new u;++g<p;)(h=d.get(s=v(l=a[g])))?h.push(l):d.set(s,[l]);return t?(l=t(),f=function(e,r){l.set(e,n(t,r,c))}):(l={},f=function(e,r){l[e]=n(t,r,c)}),d.forEach(f),l}function t(n,e){if(e>=o.length)return n;var r=[],u=a[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,i={},o=[],a=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(Xo.map,e,0),0)},i.key=function(n){return o.push(n),i},i.sortKeys=function(n){return a[o.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},Xo.set=function(n){var t=new l;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},r(l,{has:i,add:function(n){return this[aa+n]=!0,n},remove:function(n){return n=aa+n,n in this&&delete this[n]},values:a,size:c,empty:s,forEach:function(n){for(var t in this)t.charCodeAt(0)===ca&&n.call(this,t.substring(1))}}),Xo.behavior={},Xo.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=f(n,t,t[e]);return n};var sa=["webkit","ms","moz","Moz","o","O"];Xo.dispatch=function(){for(var n=new p,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=v(n);return n},p.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.substring(e+1),n=n.substring(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},Xo.event=null,Xo.requote=function(n){return n.replace(la,"\\$&")};var la=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,fa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ha=function(n,t){return t.querySelector(n)},ga=function(n,t){return t.querySelectorAll(n)},pa=Jo[h(Jo,"matchesSelector")],va=function(n,t){return pa.call(n,t)};"function"==typeof Sizzle&&(ha=function(n,t){return Sizzle(n,t)[0]||null},ga=Sizzle,va=Sizzle.matchesSelector),Xo.selection=function(){return xa};var da=Xo.selection.prototype=[];da.select=function(n){var t,e,r,u,i=[];n=M(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,s=r.length;++c<s;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return x(i)},da.selectAll=function(n){var t,e,r=[];n=_(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=Bo(n.call(e,e.__data__,a,u))),t.parentNode=e);return x(r)};var ma={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Xo.ns={prefix:ma,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.substring(0,t),n=n.substring(t+1)),ma.hasOwnProperty(e)?{space:ma[e],local:n}:n}},da.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=Xo.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(b(t,n[t]));return this}return this.each(b(n,t))},da.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=k(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!S(n[u]).test(t))return!1;return!0}for(t in n)this.each(E(t,n[t]));return this}return this.each(E(n,t))},da.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(C(e,n[e],t));return this}if(2>r)return Go.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(C(n,t,e))},da.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(N(t,n[t]));return this}return this.each(N(n,t))},da.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},da.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},da.append=function(n){return n=L(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},da.insert=function(n,t){return n=L(n),t=M(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},da.remove=function(){return this.each(function(){var n=this.parentNode;n&&n.removeChild(this)})},da.data=function(n,t){function e(n,e){var r,i,o,a=n.length,f=e.length,h=Math.min(a,f),g=new Array(f),p=new Array(f),v=new Array(a);if(t){var d,m=new u,y=new u,x=[];for(r=-1;++r<a;)d=t.call(i=n[r],i.__data__,r),m.has(d)?v[r]=i:m.set(d,i),x.push(d);for(r=-1;++r<f;)d=t.call(e,o=e[r],r),(i=m.get(d))?(g[r]=i,i.__data__=o):y.has(d)||(p[r]=T(o)),y.set(d,o),m.remove(d);for(r=-1;++r<a;)m.has(x[r])&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],o=e[r],i?(i.__data__=o,g[r]=i):p[r]=T(o);for(;f>r;++r)p[r]=T(e[r]);for(;a>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),s.push(g),l.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(n=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(n[o]=i.__data__);return n}var c=D([]),s=x([]),l=x([]);if("function"==typeof n)for(;++o<a;)e(r=this[o],n.call(r,r.parentNode.__data__,o));else for(;++o<a;)e(r=this[o],n);return s.enter=function(){return c},s.exit=function(){return l},s},da.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},da.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=q(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return x(u)},da.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},da.sort=function(n){n=z.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},da.each=function(n){return R(this,function(t,e,r){n.call(t,t.__data__,e,r)})},da.call=function(n){var t=Bo(arguments);return n.apply(t[0]=this,t),this},da.empty=function(){return!this.node()},da.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},da.size=function(){var n=0;return this.each(function(){++n}),n};var ya=[];Xo.selection.enter=D,Xo.selection.enter.prototype=ya,ya.append=da.append,ya.empty=da.empty,ya.node=da.node,ya.call=da.call,ya.size=da.size,ya.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var s=-1,l=u.length;++s<l;)(i=u[s])?(t.push(r[s]=e=n.call(u.parentNode,i.__data__,s,a)),e.__data__=i.__data__):t.push(null)}return x(o)},ya.insert=function(n,t){return arguments.length<2&&(t=P(this)),da.insert.call(this,n,t)},da.transition=function(){for(var n,t,e=ks||++Ls,r=[],u=Es||{time:Date.now(),ease:yu,delay:0,duration:250},i=-1,o=this.length;++i<o;){r.push(n=[]);for(var a=this[i],c=-1,s=a.length;++c<s;)(t=a[c])&&jo(t,c,e,u),n.push(t)}return Do(r,e)},da.interrupt=function(){return this.each(U)},Xo.select=function(n){var t=["string"==typeof n?ha(n,Wo):n];return t.parentNode=Jo,x([t])},Xo.selectAll=function(n){var t=Bo("string"==typeof n?ga(n,Wo):n);return t.parentNode=Jo,x([t])};var xa=Xo.select(Jo);da.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(j(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(j(n,t,e))};var Ma=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ma.forEach(function(n){"on"+n in Wo&&Ma.remove(n)});var _a="onselectstart"in Wo?null:h(Jo.style,"userSelect"),ba=0;Xo.mouse=function(n){return Y(n,m())};var wa=/WebKit/.test(Go.navigator.userAgent)?-1:0;Xo.touches=function(n,t){return arguments.length<2&&(t=m().touches),t?Bo(t).map(function(t){var e=Y(n,t);return e.identifier=t.identifier,e}):[]},Xo.behavior.drag=function(){function n(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function t(){return Xo.event.changedTouches[0].identifier}function e(n,t){return Xo.touches(n).filter(function(n){return n.identifier===t})[0]}function r(n,t,e,r){return function(){function o(){var n=t(l,g),e=n[0]-v[0],r=n[1]-v[1];d|=e|r,v=n,f({type:"drag",x:n[0]+c[0],y:n[1]+c[1],dx:e,dy:r})}function a(){m.on(e+"."+p,null).on(r+"."+p,null),y(d&&Xo.event.target===h),f({type:"dragend"})}var c,s=this,l=s.parentNode,f=u.of(s,arguments),h=Xo.event.target,g=n(),p=null==g?"drag":"drag-"+g,v=t(l,g),d=0,m=Xo.select(Go).on(e+"."+p,o).on(r+"."+p,a),y=O();i?(c=i.apply(s,arguments),c=[c.x-v[0],c.y-v[1]]):c=[0,0],f({type:"dragstart"})}}var u=y(n,"drag","dragstart","dragend"),i=null,o=r(g,Xo.mouse,"mousemove","mouseup"),a=r(t,e,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},Xo.rebind(n,u,"on")};var Sa=Math.PI,ka=2*Sa,Ea=Sa/2,Aa=1e-6,Ca=Aa*Aa,Na=Sa/180,La=180/Sa,Ta=Math.SQRT2,qa=2,za=4;Xo.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=B(v),o=i/(qa*h)*(e*W(Ta*t+v)-$(v));return[r+o*s,u+o*l,i*e/B(Ta*t+v)]}return[r+n*s,u+n*l,i*Math.exp(Ta*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],s=o-r,l=a-u,f=s*s+l*l,h=Math.sqrt(f),g=(c*c-i*i+za*f)/(2*i*qa*h),p=(c*c-i*i-za*f)/(2*c*qa*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ta;return e.duration=1e3*y,e},Xo.behavior.zoom=function(){function n(n){n.on(A,s).on(Pa+".zoom",f).on(C,h).on("dblclick.zoom",g).on(L,l)}function t(n){return[(n[0]-S.x)/S.k,(n[1]-S.y)/S.k]}function e(n){return[n[0]*S.k+S.x,n[1]*S.k+S.y]}function r(n){S.k=Math.max(E[0],Math.min(E[1],n))}function u(n,t){t=e(t),S.x+=n[0]-t[0],S.y+=n[1]-t[1]}function i(){_&&_.domain(M.range().map(function(n){return(n-S.x)/S.k}).map(M.invert)),w&&w.domain(b.range().map(function(n){return(n-S.y)/S.k}).map(b.invert))}function o(n){n({type:"zoomstart"})}function a(n){i(),n({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(n){n({type:"zoomend"})}function s(){function n(){l=1,u(Xo.mouse(r),g),a(i)}function e(){f.on(C,Go===r?h:null).on(N,null),p(l&&Xo.event.target===s),c(i)}var r=this,i=T.of(r,arguments),s=Xo.event.target,l=0,f=Xo.select(Go).on(C,n).on(N,e),g=t(Xo.mouse(r)),p=O();U.call(r),o(i)}function l(){function n(){var n=Xo.touches(g);return h=S.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function e(){for(var t=Xo.event.changedTouches,e=0,i=t.length;i>e;++e)v[t[e].identifier]=null;var o=n(),c=Date.now();if(1===o.length){if(500>c-x){var s=o[0],l=v[s.identifier];r(2*S.k),u(s,l),d(),a(p)}x=c}else if(o.length>1){var s=o[0],f=o[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function i(){for(var n,t,e,i,o=Xo.touches(g),c=0,s=o.length;s>c;++c,i=null)if(e=o[c],i=v[e.identifier]){if(t)break;n=e,t=i}if(i){var l=(l=e[0]-n[0])*l+(l=e[1]-n[1])*l,f=m&&Math.sqrt(l/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*h)}x=null,u(n,t),a(p)}function f(){if(Xo.event.touches.length){for(var t=Xo.event.changedTouches,e=0,r=t.length;r>e;++e)delete v[t[e].identifier];for(var u in v)return void n()}b.on(M,null).on(_,null),w.on(A,s).on(L,l),k(),c(p)}var h,g=this,p=T.of(g,arguments),v={},m=0,y=Xo.event.changedTouches[0].identifier,M="touchmove.zoom-"+y,_="touchend.zoom-"+y,b=Xo.select(Go).on(M,i).on(_,f),w=Xo.select(g).on(A,null).on(L,e),k=O();U.call(g),e(),o(p)}function f(){var n=T.of(this,arguments);m?clearTimeout(m):(U.call(this),o(n)),m=setTimeout(function(){m=null,c(n)},50),d();var e=v||Xo.mouse(this);p||(p=t(e)),r(Math.pow(2,.002*Ra())*S.k),u(e,p),a(n)}function h(){p=null}function g(){var n=T.of(this,arguments),e=Xo.mouse(this),i=t(e),s=Math.log(S.k)/Math.LN2;o(n),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(s)-1:Math.floor(s)+1)),u(e,i),a(n),c(n)}var p,v,m,x,M,_,b,w,S={x:0,y:0,k:1},k=[960,500],E=Da,A="mousedown.zoom",C="mousemove.zoom",N="mouseup.zoom",L="touchstart.zoom",T=y(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=T.of(this,arguments),t=S;ks?Xo.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},o(n)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],u=e/2,i=r/2,o=Xo.interpolateZoom([(u-S.x)/S.k,(i-S.y)/S.k,e/S.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),c=e/r[2];this.__chart__=S={x:u-r[0]*c,y:i-r[1]*c,k:c},a(n)}}).each("end.zoom",function(){c(n)}):(this.__chart__=S,o(n),a(n),c(n))})},n.translate=function(t){return arguments.length?(S={x:+t[0],y:+t[1],k:S.k},i(),n):[S.x,S.y]},n.scale=function(t){return arguments.length?(S={x:S.x,y:S.y,k:+t},i(),n):S.k},n.scaleExtent=function(t){return arguments.length?(E=null==t?Da:[+t[0],+t[1]],n):E},n.center=function(t){return arguments.length?(v=t&&[+t[0],+t[1]],n):v},n.size=function(t){return arguments.length?(k=t&&[+t[0],+t[1]],n):k},n.x=function(t){return arguments.length?(_=t,M=t.copy(),S={x:0,y:0,k:1},n):_},n.y=function(t){return arguments.length?(w=t,b=t.copy(),S={x:0,y:0,k:1},n):w},Xo.rebind(n,T,"on")};var Ra,Da=[0,1/0],Pa="onwheel"in Wo?(Ra=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Wo?(Ra=function(){return Xo.event.wheelDelta},"mousewheel"):(Ra=function(){return-Xo.event.detail},"MozMousePixelScroll");G.prototype.toString=function(){return this.rgb()+""},Xo.hsl=function(n,t,e){return 1===arguments.length?n instanceof Q?K(n.h,n.s,n.l):dt(""+n,mt,K):K(+n,+t,+e)};var Ua=Q.prototype=new G;Ua.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),K(this.h,this.s,this.l/n)},Ua.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),K(this.h,this.s,n*this.l)},Ua.rgb=function(){return nt(this.h,this.s,this.l)},Xo.hcl=function(n,t,e){return 1===arguments.length?n instanceof et?tt(n.h,n.c,n.l):n instanceof it?at(n.l,n.a,n.b):at((n=yt((n=Xo.rgb(n)).r,n.g,n.b)).l,n.a,n.b):tt(+n,+t,+e)};var ja=et.prototype=new G;ja.brighter=function(n){return tt(this.h,this.c,Math.min(100,this.l+Ha*(arguments.length?n:1)))},ja.darker=function(n){return tt(this.h,this.c,Math.max(0,this.l-Ha*(arguments.length?n:1)))},ja.rgb=function(){return rt(this.h,this.c,this.l).rgb()},Xo.lab=function(n,t,e){return 1===arguments.length?n instanceof it?ut(n.l,n.a,n.b):n instanceof et?rt(n.l,n.c,n.h):yt((n=Xo.rgb(n)).r,n.g,n.b):ut(+n,+t,+e)};var Ha=18,Fa=.95047,Oa=1,Ya=1.08883,Ia=it.prototype=new G;Ia.brighter=function(n){return ut(Math.min(100,this.l+Ha*(arguments.length?n:1)),this.a,this.b)},Ia.darker=function(n){return ut(Math.max(0,this.l-Ha*(arguments.length?n:1)),this.a,this.b)},Ia.rgb=function(){return ot(this.l,this.a,this.b)},Xo.rgb=function(n,t,e){return 1===arguments.length?n instanceof pt?gt(n.r,n.g,n.b):dt(""+n,gt,nt):gt(~~n,~~t,~~e)};var Za=pt.prototype=new G;Za.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),gt(Math.min(255,~~(t/n)),Math.min(255,~~(e/n)),Math.min(255,~~(r/n)))):gt(u,u,u)},Za.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),gt(~~(n*this.r),~~(n*this.g),~~(n*this.b))},Za.hsl=function(){return mt(this.r,this.g,this.b)},Za.toString=function(){return"#"+vt(this.r)+vt(this.g)+vt(this.b)};var Va=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Va.forEach(function(n,t){Va.set(n,ft(t))}),Xo.functor=_t,Xo.xhr=wt(bt),Xo.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=St(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(l>=s)return o;if(u)return u=!1,i;var t=l;if(34===n.charCodeAt(t)){for(var e=t;e++<s;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}l=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++l):10===r&&(u=!0),n.substring(t+1,e).replace(/""/g,'"')}for(;s>l;){var r=n.charCodeAt(l++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(l)&&(++l,++a);else if(r!==c)continue;return n.substring(t,l-a)}return n.substring(t)}for(var r,u,i={},o={},a=[],s=n.length,l=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();(!t||(h=t(h,f++)))&&a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new l,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv(" ","text/tab-separated-values");var Xa,$a,Ba,Wa,Ja,Ga=Go[h(Go,"requestAnimationFrame")]||function(n){setTimeout(n,17)};Xo.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};$a?$a.n=i:Xa=i,$a=i,Ba||(Wa=clearTimeout(Wa),Ba=1,Ga(Et))},Xo.timer.flush=function(){At(),Ct()},Xo.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var Ka=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Lt);Xo.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=Xo.round(n,Nt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((0>=e?e+1:e-1)/3)))),Ka[8+e/3]};var Qa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,nc=Xo.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=Xo.round(n,Nt(n,t))).toFixed(Math.max(0,Math.min(20,Nt(n*(1+1e-15),t))))}}),tc=Xo.time={},ec=Date;zt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){rc.setUTCDate.apply(this._,arguments)},setDay:function(){rc.setUTCDay.apply(this._,arguments)},setFullYear:function(){rc.setUTCFullYear.apply(this._,arguments)},setHours:function(){rc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){rc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){rc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){rc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){rc.setUTCSeconds.apply(this._,arguments)},setTime:function(){rc.setTime.apply(this._,arguments)}};var rc=Date.prototype;tc.year=Rt(function(n){return n=tc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),tc.years=tc.year.range,tc.years.utc=tc.year.utc.range,tc.day=Rt(function(n){var t=new ec(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),tc.days=tc.day.range,tc.days.utc=tc.day.utc.range,tc.dayOfYear=function(n){var t=tc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=tc[n]=Rt(function(n){return(n=tc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=tc.year(n).getDay();return Math.floor((tc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});tc[n+"s"]=e.range,tc[n+"s"].utc=e.utc.range,tc[n+"OfYear"]=function(n){var e=tc.year(n).getDay();return Math.floor((tc.dayOfYear(n)+(e+t)%7)/7)}}),tc.week=tc.sunday,tc.weeks=tc.sunday.range,tc.weeks.utc=tc.sunday.utc.range,tc.weekOfYear=tc.sundayOfYear;var uc={"-":"",_:" ",0:"0"},ic=/^\s*\d+/,oc=/^%/;Xo.locale=function(n){return{numberFormat:Tt(n),timeFormat:Pt(n)}};var ac=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=ac.numberFormat,Xo.geo={},re.prototype={s:0,t:0,add:function(n){ue(n,this.t,cc),ue(cc.s,this.s,this),this.s?this.t+=cc.t:this.s=cc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var cc=new re;Xo.geo.stream=function(n,t){n&&sc.hasOwnProperty(n.type)?sc[n.type](n,t):ie(n,t)};var sc={Feature:function(n,t){ie(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)ie(e[r].geometry,t)}},lc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){oe(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)oe(e[r],t,0)},Polygon:function(n,t){ae(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ae(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)ie(e[r],t)}};Xo.geo.area=function(n){return fc=0,Xo.geo.stream(n,gc),fc};var fc,hc=new re,gc={sphere:function(){fc+=4*Sa},point:g,lineStart:g,lineEnd:g,polygonStart:function(){hc.reset(),gc.lineStart=ce},polygonEnd:function(){var n=2*hc;fc+=0>n?4*Sa+n:n,gc.lineStart=gc.lineEnd=gc.point=g}};Xo.geo.bounds=function(){function n(n,t){x.push(M=[l=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=se([t*Na,e*Na]);if(m){var u=fe(m,r),i=[u[1],-u[0],0],o=fe(i,u);pe(o),o=ve(o);var c=t-p,s=c>0?1:-1,v=o[0]*La*s,d=oa(c)>180;if(d^(v>s*p&&s*t>v)){var y=o[1]*La;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>s*p&&s*t>v)){var y=-o[1]*La;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t):h>=l?(l>t&&(l=t),t>h&&(h=t)):t>p?a(l,t)>a(l,h)&&(h=t):a(t,h)>a(l,h)&&(l=t)}else n(t,e);m=r,p=t}function e(){_.point=t}function r(){M[0]=l,M[1]=h,_.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=oa(r)>180?r+(r>0?360:-360):r}else v=n,d=e;gc.point(n,e),t(n,e)}function i(){gc.lineStart()}function o(){u(v,d),gc.lineEnd(),oa(y)>Aa&&(l=-(h=180)),M[0]=l,M[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function s(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var l,f,h,g,p,v,d,m,y,x,M,_={point:n,lineStart:e,lineEnd:r,polygonStart:function(){_.point=u,_.lineStart=i,_.lineEnd=o,y=0,gc.polygonStart()},polygonEnd:function(){gc.polygonEnd(),_.point=n,_.lineStart=e,_.lineEnd=r,0>hc?(l=-(h=180),f=-(g=90)):y>Aa?g=90:-Aa>y&&(f=-90),M[0]=l,M[1]=h}};return function(n){g=h=-(l=f=1/0),x=[],Xo.geo.stream(n,_);
-var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],s(e[0],u)||s(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,l=e[0],h=u[1])}return x=M=null,1/0===l||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[l,f],[h,g]]}}(),Xo.geo.centroid=function(n){pc=vc=dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,Xo.geo.stream(n,kc);var t=bc,e=wc,r=Sc,u=t*t+e*e+r*r;return Ca>u&&(t=xc,e=Mc,r=_c,Aa>vc&&(t=dc,e=mc,r=yc),u=t*t+e*e+r*r,Ca>u)?[0/0,0/0]:[Math.atan2(e,t)*La,X(r/Math.sqrt(u))*La]};var pc,vc,dc,mc,yc,xc,Mc,_c,bc,wc,Sc,kc={sphere:g,point:me,lineStart:xe,lineEnd:Me,polygonStart:function(){kc.lineStart=_e},polygonEnd:function(){kc.lineStart=xe}},Ec=Ee(be,Te,ze,[-Sa,-Sa/2]),Ac=1e9;Xo.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Pe(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return je(He)}).raw=He,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var s=i.scale(),l=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[l-.455*s,f-.238*s],[l+.455*s,f+.238*s]]).stream(c).point,r=o.translate([l-.307*s,f+.201*s]).clipExtent([[l-.425*s+Aa,f+.12*s+Aa],[l-.214*s-Aa,f+.234*s-Aa]]).stream(c).point,u=a.translate([l-.205*s,f+.212*s]).clipExtent([[l-.214*s+Aa,f+.166*s+Aa],[l-.115*s-Aa,f+.234*s-Aa]]).stream(c).point,n},n.scale(1070)};var Cc,Nc,Lc,Tc,qc,zc,Rc={point:g,lineStart:g,lineEnd:g,polygonStart:function(){Nc=0,Rc.lineStart=Fe},polygonEnd:function(){Rc.lineStart=Rc.lineEnd=Rc.point=g,Cc+=oa(Nc/2)}},Dc={point:Oe,lineStart:g,lineEnd:g,polygonStart:g,polygonEnd:g},Pc={point:Ze,lineStart:Ve,lineEnd:Xe,polygonStart:function(){Pc.lineStart=$e},polygonEnd:function(){Pc.point=Ze,Pc.lineStart=Ve,Pc.lineEnd=Xe}};Xo.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),Xo.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Cc=0,Xo.geo.stream(n,u(Rc)),Cc},n.centroid=function(n){return dc=mc=yc=xc=Mc=_c=bc=wc=Sc=0,Xo.geo.stream(n,u(Pc)),Sc?[bc/Sc,wc/Sc]:_c?[xc/_c,Mc/_c]:yc?[dc/yc,mc/yc]:[0/0,0/0]},n.bounds=function(n){return qc=zc=-(Lc=Tc=1/0),Xo.geo.stream(n,u(Dc)),[[Lc,Tc],[qc,zc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||Je(n):bt,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Ye:new Be(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(n){return{stream:function(t){var e=new Ge(t);for(var r in n)e[r]=n[r];return e}}},Ge.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=Qe,Xo.geo.projectionMutator=nr,(Xo.geo.equirectangular=function(){return Qe(er)}).raw=er.invert=er,Xo.geo.rotation=function(n){function t(t){return t=n(t[0]*Na,t[1]*Na),t[0]*=La,t[1]*=La,t}return n=ur(n[0]%360*Na,n[1]*Na,n.length>2?n[2]*Na:0),t.invert=function(t){return t=n.invert(t[0]*Na,t[1]*Na),t[0]*=La,t[1]*=La,t},t},rr.invert=er,Xo.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=ur(-n[0]*Na,-n[1]*Na,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=La,n[1]*=La}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=cr((t=+r)*Na,u*Na),n):t},n.precision=function(r){return arguments.length?(e=cr(t*Na,(u=+r)*Na),n):u},n.angle(90)},Xo.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Na,u=n[1]*Na,i=t[1]*Na,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),s=Math.cos(u),l=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=s*l-c*f*a)*e),c*l+s*f*a)},Xo.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return Xo.range(Math.ceil(i/d)*d,u,d).map(h).concat(Xo.range(Math.ceil(s/m)*m,c,m).map(g)).concat(Xo.range(Math.ceil(r/p)*p,e,p).filter(function(n){return oa(n%d)>Aa}).map(l)).concat(Xo.range(Math.ceil(a/v)*v,o,v).filter(function(n){return oa(n%m)>Aa}).map(f))}var e,r,u,i,o,a,c,s,l,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(s).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],s=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),s>c&&(t=s,s=c,c=t),n.precision(y)):[[i,s],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,l=lr(a,o,90),f=fr(r,e,y),h=lr(s,c,90),g=fr(i,u,y),n):y},n.majorExtent([[-180,-90+Aa],[180,90-Aa]]).minorExtent([[-180,-80-Aa],[180,80+Aa]])},Xo.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=hr,u=gr;return n.distance=function(){return Xo.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},Xo.geo.interpolate=function(n,t){return pr(n[0]*Na,n[1]*Na,t[0]*Na,t[1]*Na)},Xo.geo.length=function(n){return Uc=0,Xo.geo.stream(n,jc),Uc};var Uc,jc={sphere:g,point:g,lineStart:vr,lineEnd:g,polygonStart:g,polygonEnd:g},Hc=dr(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(Xo.geo.azimuthalEqualArea=function(){return Qe(Hc)}).raw=Hc;var Fc=dr(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},bt);(Xo.geo.azimuthalEquidistant=function(){return Qe(Fc)}).raw=Fc,(Xo.geo.conicConformal=function(){return je(mr)}).raw=mr,(Xo.geo.conicEquidistant=function(){return je(yr)}).raw=yr;var Oc=dr(function(n){return 1/n},Math.atan);(Xo.geo.gnomonic=function(){return Qe(Oc)}).raw=Oc,xr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ea]},(Xo.geo.mercator=function(){return Mr(xr)}).raw=xr;var Yc=dr(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return Qe(Yc)}).raw=Yc;var Ic=dr(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(Xo.geo.stereographic=function(){return Qe(Ic)}).raw=Ic,_r.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ea]},(Xo.geo.transverseMercator=function(){var n=Mr(_r),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[-n[1],n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},n.rotate([0,0])}).raw=_r,Xo.geom={},Xo.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=_t(e),i=_t(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(kr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var s=Sr(a),l=Sr(c),f=l[0]===s[0],h=l[l.length-1]===s[s.length-1],g=[];for(t=s.length-1;t>=0;--t)g.push(n[a[s[t]][2]]);for(t=+f;t<l.length-h;++t)g.push(n[a[l[t]][2]]);return g}var e=br,r=wr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},Xo.geom.polygon=function(n){return fa(n,Zc),n};var Zc=Xo.geom.polygon.prototype=[];Zc.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},Zc.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},Zc.clip=function(n){for(var t,e,r,u,i,o,a=Cr(n),c=-1,s=this.length-Cr(this),l=this[s-1];++c<s;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Er(o,l,u)?(Er(i,l,u)||n.push(Ar(i,o,l,u)),n.push(o)):Er(i,l,u)&&n.push(Ar(i,o,l,u)),i=o;a&&n.push(n[0]),l=u}return n};var Vc,Xc,$c,Bc,Wc,Jc=[],Gc=[];Pr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(jr),t.length},Br.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Wr.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=Qr(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(Gr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Kr(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(Kr(this,e),n=e,e=n.U),e.C=!1,r.C=!0,Gr(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?Qr(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,Gr(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Kr(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,Gr(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,Kr(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Gr(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,Kr(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},Xo.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return nu(e(n),a).cells.forEach(function(e,a){var c=e.edges,s=e.site,l=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):s.x>=r&&s.x<=i&&s.y>=u&&s.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];l.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Aa)*Aa,y:Math.round(o(n,t)/Aa)*Aa,i:t}})}var r=br,u=wr,i=r,o=u,a=Kc;return n?t(n):(t.links=function(n){return nu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return nu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(jr),c=-1,s=a.length,l=a[s-1].edge,f=l.l===o?l.r:l.l;++c<s;)u=l,i=f,l=a[c].edge,f=l.l===o?l.r:l.l,r<i.i&&r<f.i&&eu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=_t(r=n),t):r},t.y=function(n){return arguments.length?(o=_t(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?Kc:n,t):a===Kc?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===Kc?null:a&&a[1]},t)};var Kc=[[-1e6,-1e6],[1e6,1e6]];Xo.geom.delaunay=function(n){return Xo.geom.voronoi().triangles(n)},Xo.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,l=n.y;if(null!=c)if(oa(c-e)+oa(l-r)<.01)s(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,s(n,f,c,l,u,i,o,a),s(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else s(n,t,e,r,u,i,o,a)}function s(n,t,e,r,u,o,a,c){var s=.5*(u+a),l=.5*(o+c),f=e>=s,h=r>=l,g=(h<<1)+f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=iu()),f?u=s:a=s,h?o=l:c=l,i(n,t,e,r,u,o,a,c)}var l,f,h,g,p,v,d,m,y,x=_t(a),M=_t(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)l=n[g],l.x<v&&(v=l.x),l.y<d&&(d=l.y),l.x>m&&(m=l.x),l.y>y&&(y=l.y),f.push(l.x),h.push(l.y);else for(g=0;p>g;++g){var _=+x(l=n[g],g),b=+M(l,g);v>_&&(v=_),d>b&&(d=b),_>m&&(m=_),b>y&&(y=b),f.push(_),h.push(b)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=iu();if(k.add=function(n){i(k,n,+x(n,++g),+M(n,g),v,d,m,y)},k.visit=function(n){ou(n,k,v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=l=null,k}var o,a=br,c=wr;return(o=arguments.length)?(a=ru,c=uu,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},Xo.interpolateRgb=au,Xo.interpolateObject=cu,Xo.interpolateNumber=su,Xo.interpolateString=lu;var Qc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;Xo.interpolate=fu,Xo.interpolators=[function(n,t){var e=typeof t;return("string"===e?Va.has(t)||/^(#|rgb\(|hsl\()/.test(t)?au:lu:t instanceof G?au:"object"===e?Array.isArray(t)?hu:cu:su)(n,t)}],Xo.interpolateArray=hu;var ns=function(){return bt},ts=Xo.map({linear:ns,poly:xu,quad:function(){return du},cubic:function(){return mu},sin:function(){return Mu},exp:function(){return _u},circle:function(){return bu},elastic:wu,back:Su,bounce:function(){return ku}}),es=Xo.map({"in":bt,out:pu,"in-out":vu,"out-in":function(n){return vu(pu(n))}});Xo.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.substring(0,t):n,r=t>=0?n.substring(t+1):"in";return e=ts.get(e)||ns,r=es.get(r)||bt,gu(r(e.apply(null,$o.call(arguments,1))))},Xo.interpolateHcl=Eu,Xo.interpolateHsl=Au,Xo.interpolateLab=Cu,Xo.interpolateRound=Nu,Xo.transform=function(n){var t=Wo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Lu(e?e.matrix:rs)})(n)},Lu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Ru,Xo.layout={},Xo.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Uu(n[e]));return t}},Xo.layout.chord=function(){function n(){var n,s,f,h,g,p={},v=[],d=Xo.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(s=0,g=-1;++g<i;)s+=u[h][g];v.push(s),m.push(Xo.range(i)),n+=s}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(ka-l*i)/n,s=0,h=-1;++h<i;){for(f=s,g=-1;++g<i;){var y=d[h],x=m[y][g],M=u[y][x],_=s,b=s+=M*n;p[y+"-"+x]={index:y,subindex:x,startAngle:_,endAngle:b,value:M}}r[y]={index:y,startAngle:f,endAngle:s,value:(s-f)/n},s+=l}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,s={},l=0;return s.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,s):u},s.padding=function(n){return arguments.length?(l=n,e=r=null,s):l},s.sortGroups=function(n){return arguments.length?(o=n,e=r=null,s):o},s.sortSubgroups=function(n){return arguments.length?(a=n,e=null,s):a},s.sortChords=function(n){return arguments.length?(c=n,e&&t(),s):c},s.chords=function(){return e||n(),e},s.groups=function(){return r||n(),r},s},Xo.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var s=t.charge/c;n.px-=i*s,n.py-=o*s}return!0}if(t.point&&c&&p>c){var s=t.pointCharge/c;n.px-=i*s,n.py-=o*s}}return!t.charge}}function t(n){n.px=Xo.event.x,n.py=Xo.event.y,a.resume()}var e,r,u,i,o,a={},c=Xo.dispatch("start","tick","end"),s=[1,1],l=.9,f=us,h=is,g=-30,p=os,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,x,M,_=m.length,b=y.length;for(e=0;b>e;++e)a=y[e],f=a.source,h=a.target,x=h.x-f.x,M=h.y-f.y,(p=x*x+M*M)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,x*=p,M*=p,h.x-=x*(d=f.weight/(h.weight+f.weight)),h.y-=M*d,f.x+=x*(d=1-d),f.y+=M*d);if((d=r*v)&&(x=s[0]/2,M=s[1]/2,e=-1,d))for(;++e<_;)a=m[e],a.x+=(x-a.x)*d,a.y+=(M-a.y)*d;if(g)for(Zu(t=Xo.geom.quadtree(m),r,o),e=-1;++e<_;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<_;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*l,a.y-=(a.py-(a.py=a.y))*l);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(s=n,a):s},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(l=+n,a):l},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),Xo.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,s=o.length;++a<s;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,l=y.length,p=s[0],v=s[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;l>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;l>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;l>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;l>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;l>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=Xo.behavior.drag().origin(bt).on("dragstart.force",Fu).on("drag.force",t).on("dragend.force",Ou)),arguments.length?(this.on("mouseover.force",Yu).on("mouseout.force",Iu).call(e),void 0):e},Xo.rebind(a,c,"on")};var us=20,is=1,os=1/0;Xo.layout.hierarchy=function(){function n(t,o,a){var c=u.call(e,t,o);if(t.depth=o,a.push(t),c&&(s=c.length)){for(var s,l,f=-1,h=t.children=new Array(s),g=0,p=o+1;++f<s;)l=h[f]=n(c[f],p,a),l.parent=t,g+=l.value;r&&h.sort(r),i&&(t.value=g)}else delete t.children,i&&(t.value=+i.call(e,t,o)||0);return t}function t(n,r){var u=n.children,o=0;if(u&&(a=u.length))for(var a,c=-1,s=r+1;++c<a;)o+=t(u[c],s);else i&&(o=+i.call(e,n,r)||0);return i&&(n.value=o),o}function e(t){var e=[];return n(t,0,e),e}var r=Bu,u=Xu,i=$u;return e.sort=function(n){return arguments.length?(r=n,e):r},e.children=function(n){return arguments.length?(u=n,e):u},e.value=function(n){return arguments.length?(i=n,e):i},e.revalue=function(n){return t(n,0),n},e},Xo.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,s=-1;for(r=t.value?r/t.value:0;++s<o;)n(a=i[s],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=Xo.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Vu(e,r)},Xo.layout.pie=function(){function n(i){var o=i.map(function(e,r){return+t.call(n,e,r)}),a=+("function"==typeof r?r.apply(this,arguments):r),c=(("function"==typeof u?u.apply(this,arguments):u)-a)/Xo.sum(o),s=Xo.range(i.length);null!=e&&s.sort(e===as?function(n,t){return o[t]-o[n]}:function(n,t){return e(i[n],i[t])});var l=[];return s.forEach(function(n){var t;l[n]={data:i[n],value:t=o[n],startAngle:a,endAngle:a+=t*c}}),l}var t=Number,e=as,r=0,u=ka;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n};var as={};Xo.layout.stack=function(){function n(a,c){var s=a.map(function(e,r){return t.call(n,e,r)}),l=s.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,l,c);s=Xo.permute(s,f),l=Xo.permute(l,f);var h,g,p,v=r.call(n,l,c),d=s.length,m=s[0].length;for(g=0;m>g;++g)for(u.call(n,s[0][g],p=v[g],l[0][g][1]),h=1;d>h;++h)u.call(n,s[h][g],p+=l[h-1][g][1],l[h][g][1]);return a}var t=bt,e=Qu,r=ni,u=Ku,i=Ju,o=Gu;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:cs.get(t)||Qu,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:ss.get(t)||ni,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var cs=Xo.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(ti),i=n.map(ei),o=Xo.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,s=[],l=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],s.push(e)):(c+=i[e],l.push(e));return l.reverse().concat(s)},reverse:function(n){return Xo.range(n.length).reverse()},"default":Qu}),ss=Xo.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,s,l=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=s=0,e=1;h>e;++e){for(t=0,u=0;l>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];l>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,s>c&&(s=c)}for(e=0;h>e;++e)g[e]-=s;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ni});Xo.layout.histogram=function(){function n(n,i){for(var o,a,c=[],s=n.map(e,this),l=r.call(this,s,i),f=u.call(this,l,s,i),i=-1,h=s.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=s[i],a>=l[0]&&a<=l[1]&&(o=c[Xo.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=oi,u=ui;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=_t(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return ii(n,t)}:_t(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},Xo.layout.tree=function(){function n(n,i){function o(n,t){var r=n.children,u=n._tree;if(r&&(i=r.length)){for(var i,a,s,l=r[0],f=l,h=-1;++h<i;)s=r[h],o(s,a),f=c(s,a,f),a=s;vi(n);var g=.5*(l._tree.prelim+s._tree.prelim);t?(u.prelim=t._tree.prelim+e(n,t),u.mod=u.prelim-g):u.prelim=g}else t&&(u.prelim=t._tree.prelim+e(n,t))}function a(n,t){n.x=n._tree.prelim+t;var e=n.children;if(e&&(r=e.length)){var r,u=-1;for(t+=n._tree.mod;++u<r;)a(e[u],t)}}function c(n,t,r){if(t){for(var u,i=n,o=n,a=t,c=n.parent.children[0],s=i._tree.mod,l=o._tree.mod,f=a._tree.mod,h=c._tree.mod;a=si(a),i=ci(i),a&&i;)c=ci(c),o=si(o),o._tree.ancestor=n,u=a._tree.prelim+f-i._tree.prelim-s+e(a,i),u>0&&(di(mi(a,n,r),n,u),s+=u,l+=u),f+=a._tree.mod,s+=i._tree.mod,h+=c._tree.mod,l+=o._tree.mod;a&&!si(o)&&(o._tree.thread=a,o._tree.mod+=f-l),i&&!ci(c)&&(c._tree.thread=i,c._tree.mod+=s-h,r=n)}return r}var s=t.call(this,n,i),l=s[0];pi(l,function(n,t){n._tree={ancestor:n,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),o(l),a(l,-l._tree.prelim);var f=li(l,hi),h=li(l,fi),g=li(l,gi),p=f.x-e(f,h)/2,v=h.x+e(h,f)/2,d=g.depth||1;return pi(l,u?function(n){n.x*=r[0],n.y=n.depth*r[1],delete n._tree}:function(n){n.x=(n.x-p)/(v-p)*r[0],n.y=n.depth/d*r[1],delete n._tree}),s}var t=Xo.layout.hierarchy().sort(null).value(null),e=ai,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Vu(n,t)},Xo.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],s=u[1],l=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,pi(a,function(n){n.r=+l(n.value)}),pi(a,bi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/s))/2;pi(a,function(n){n.r+=f}),pi(a,bi),pi(a,function(n){n.r-=f})}return ki(a,c/2,s/2,t?1:1/Math.max(2*a.r/c,2*a.r/s)),o}var t,e=Xo.layout.hierarchy().sort(yi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Vu(n,e)},Xo.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],s=0;pi(c,function(n){var t=n.children;t&&t.length?(n.x=Ci(t),n.y=Ai(t)):(n.x=o?s+=e(n,o):0,n.y=0,o=n)});var l=Ni(c),f=Li(c),h=l.x-e(l,f)/2,g=f.x+e(f,l)/2;return pi(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=Xo.layout.hierarchy().sort(null).value(null),e=ai,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Vu(n,t)},Xo.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,s=f(e),l=[],h=i.slice(),p=1/0,v="slice"===g?s.dx:"dice"===g?s.dy:"slice-dice"===g?1&e.depth?s.dy:s.dx:Math.min(s.dx,s.dy);for(n(h,s.dx*s.dy/e.value),l.area=0;(c=h.length)>0;)l.push(o=h[c-1]),l.area+=o.area,"squarify"!==g||(a=r(l,v))<=p?(h.pop(),p=a):(l.area-=l.pop().area,u(l,v,s,!1),v=Math.min(s.dx,s.dy),l.length=l.area=0,p=1/0);l.length&&(u(l,v,s,!0),l.length=l.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,s=e.y,l=t?c(n.area/t):0;if(t==e.dx){for((r||l>e.dy)&&(l=e.dy);++i<o;)u=n[i],u.x=a,u.y=s,u.dy=l,a+=u.dx=Math.min(e.x+e.dx-a,l?c(u.area/l):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=l,e.dy-=l}else{for((r||l>e.dx)&&(l=e.dx);++i<o;)u=n[i],u.x=a,u.y=s,u.dx=l,s+=u.dy=Math.min(e.y+e.dy-s,l?c(u.area/l):0);u.z=!1,u.dy+=e.y+e.dy-s,e.x+=l,e.dx-=l}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=s[0],i.dy=s[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=Xo.layout.hierarchy(),c=Math.round,s=[1,1],l=null,f=Ti,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(s=n,i):s},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ti(t):qi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return qi(t,n)}if(!arguments.length)return l;var r;return f=null==(l=n)?Ti:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Vu(i,a)},Xo.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=Xo.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},Xo.scale={};var ls={floor:bt,ceil:bt};Xo.scale.linear=function(){return Hi([0,1],[0,1],fu,!1)};var fs={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return $i(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var hs=Xo.format(".0e"),gs={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};Xo.scale.pow=function(){return Bi(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return Ji([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(ps)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(vs)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(ds)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(ms)};var ps=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ht),vs=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ht),ds=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ht),ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ht);Xo.scale.quantile=function(){return Gi([],[])},Xo.scale.quantize=function(){return Ki(0,1,[0,1])},Xo.scale.threshold=function(){return Qi([.5],[0,1])
-},Xo.scale.identity=function(){return no([0,1])},Xo.svg={},Xo.svg.arc=function(){function n(){var n=t.apply(this,arguments),i=e.apply(this,arguments),o=r.apply(this,arguments)+ys,a=u.apply(this,arguments)+ys,c=(o>a&&(c=o,o=a,a=c),a-o),s=Sa>c?"0":"1",l=Math.cos(o),f=Math.sin(o),h=Math.cos(a),g=Math.sin(a);return c>=xs?n?"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"M0,"+n+"A"+n+","+n+" 0 1,0 0,"+-n+"A"+n+","+n+" 0 1,0 0,"+n+"Z":"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":n?"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L"+n*h+","+n*g+"A"+n+","+n+" 0 "+s+",0 "+n*l+","+n*f+"Z":"M"+i*l+","+i*f+"A"+i+","+i+" 0 "+s+",1 "+i*h+","+i*g+"L0,0"+"Z"}var t=to,e=eo,r=ro,u=uo;return n.innerRadius=function(e){return arguments.length?(t=_t(e),n):t},n.outerRadius=function(t){return arguments.length?(e=_t(t),n):e},n.startAngle=function(t){return arguments.length?(r=_t(t),n):r},n.endAngle=function(t){return arguments.length?(u=_t(t),n):u},n.centroid=function(){var n=(t.apply(this,arguments)+e.apply(this,arguments))/2,i=(r.apply(this,arguments)+u.apply(this,arguments))/2+ys;return[Math.cos(i)*n,Math.sin(i)*n]},n};var ys=-Ea,xs=ka-Aa;Xo.svg.line=function(){return io(bt)};var Ms=Xo.map({linear:oo,"linear-closed":ao,step:co,"step-before":so,"step-after":lo,basis:mo,"basis-open":yo,"basis-closed":xo,bundle:Mo,cardinal:go,"cardinal-open":fo,"cardinal-closed":ho,monotone:Eo});Ms.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var _s=[0,2/3,1/3,0],bs=[0,1/3,2/3,0],ws=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var n=io(Ao);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},so.reverse=lo,lo.reverse=so,Xo.svg.area=function(){return Co(bt)},Xo.svg.area.radial=function(){var n=Co(Ao);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},Xo.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),s=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,s)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,s.r,s.p0)+r(s.r,s.p1,s.a1-s.a0)+u(s.r,s.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)+ys,l=s.call(n,u,r)+ys;return{r:i,a0:o,a1:l,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(l),i*Math.sin(l)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Sa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=hr,o=gr,a=No,c=ro,s=uo;return n.radius=function(t){return arguments.length?(a=_t(t),n):a},n.source=function(t){return arguments.length?(i=_t(t),n):i},n.target=function(t){return arguments.length?(o=_t(t),n):o},n.startAngle=function(t){return arguments.length?(c=_t(t),n):c},n.endAngle=function(t){return arguments.length?(s=_t(t),n):s},n},Xo.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=hr,e=gr,r=Lo;return n.source=function(e){return arguments.length?(t=_t(e),n):t},n.target=function(t){return arguments.length?(e=_t(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},Xo.svg.diagonal.radial=function(){var n=Xo.svg.diagonal(),t=Lo,e=n.projection;return n.projection=function(n){return arguments.length?e(To(t=n)):t},n},Xo.svg.symbol=function(){function n(n,r){return(Ss.get(t.call(this,n,r))||Ro)(e.call(this,n,r))}var t=zo,e=qo;return n.type=function(e){return arguments.length?(t=_t(e),n):t},n.size=function(t){return arguments.length?(e=_t(t),n):e},n};var Ss=Xo.map({circle:Ro,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Cs)),e=t*Cs;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/As),e=t*As/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/As),e=t*As/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});Xo.svg.symbolTypes=Ss.keys();var ks,Es,As=Math.sqrt(3),Cs=Math.tan(30*Na),Ns=[],Ls=0;Ns.call=da.call,Ns.empty=da.empty,Ns.node=da.node,Ns.size=da.size,Xo.transition=function(n){return arguments.length?ks?n.transition():n:xa.transition()},Xo.transition.prototype=Ns,Ns.select=function(n){var t,e,r,u=this.id,i=[];n=M(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]);for(var c=this[o],s=-1,l=c.length;++s<l;)(r=c[s])&&(e=n.call(r,r.__data__,s,o))?("__data__"in r&&(e.__data__=r.__data__),jo(e,s,u,r.__transition__[u]),t.push(e)):t.push(null)}return Do(i,u)},Ns.selectAll=function(n){var t,e,r,u,i,o=this.id,a=[];n=_(n);for(var c=-1,s=this.length;++c<s;)for(var l=this[c],f=-1,h=l.length;++f<h;)if(r=l[f]){i=r.__transition__[o],e=n.call(r,r.__data__,f,c),a.push(t=[]);for(var g=-1,p=e.length;++g<p;)(u=e[g])&&jo(u,g,o,i),t.push(u)}return Do(a,o)},Ns.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=q(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Do(u,this.id)},Ns.tween=function(n,t){var e=this.id;return arguments.length<2?this.node().__transition__[e].tween.get(n):R(this,null==t?function(t){t.__transition__[e].tween.remove(n)}:function(r){r.__transition__[e].tween.set(n,t)})},Ns.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ru:fu,a=Xo.ns.qualify(n);return Po(this,"attr."+n,t,a.local?i:u)},Ns.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=Xo.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Ns.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=Go.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=fu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Po(this,"style."+n,t,u)},Ns.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,Go.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Ns.text=function(n){return Po(this,"text",n,Uo)},Ns.remove=function(){return this.each("end.transition",function(){var n;this.__transition__.count<2&&(n=this.parentNode)&&n.removeChild(this)})},Ns.ease=function(n){var t=this.id;return arguments.length<1?this.node().__transition__[t].ease:("function"!=typeof n&&(n=Xo.ease.apply(Xo,arguments)),R(this,function(e){e.__transition__[t].ease=n}))},Ns.delay=function(n){var t=this.id;return R(this,"function"==typeof n?function(e,r,u){e.__transition__[t].delay=+n.call(e,e.__data__,r,u)}:(n=+n,function(e){e.__transition__[t].delay=n}))},Ns.duration=function(n){var t=this.id;return R(this,"function"==typeof n?function(e,r,u){e.__transition__[t].duration=Math.max(1,n.call(e,e.__data__,r,u))}:(n=Math.max(1,n),function(e){e.__transition__[t].duration=n}))},Ns.each=function(n,t){var e=this.id;if(arguments.length<2){var r=Es,u=ks;ks=e,R(this,function(t,r,u){Es=t.__transition__[e],n.call(t,t.__data__,r,u)}),Es=r,ks=u}else R(this,function(r){var u=r.__transition__[e];(u.event||(u.event=Xo.dispatch("start","end"))).on(n,t)});return this},Ns.transition=function(){for(var n,t,e,r,u=this.id,i=++Ls,o=[],a=0,c=this.length;c>a;a++){o.push(n=[]);for(var t=this[a],s=0,l=t.length;l>s;s++)(e=t[s])&&(r=Object.create(e.__transition__[u]),r.delay+=r.duration,jo(e,s,i,r)),n.push(e)}return Do(o,i)},Xo.svg.axis=function(){function n(n){n.each(function(){var n,s=Xo.select(this),l=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):bt:t,p=s.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Aa),d=Xo.transition(p.exit()).style("opacity",Aa).remove(),m=Xo.transition(p).style("opacity",1),y=Ri(f),x=s.selectAll(".domain").data([0]),M=(x.enter().append("path").attr("class","domain"),Xo.transition(x));v.append("line"),v.append("text");var _=v.select("line"),b=m.select("line"),w=p.select("text").text(g),S=v.select("text"),k=m.select("text");switch(r){case"bottom":n=Ho,_.attr("y2",u),S.attr("y",Math.max(u,0)+o),b.attr("x2",0).attr("y2",u),k.attr("x",0).attr("y",Math.max(u,0)+o),w.attr("dy",".71em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+i+"V0H"+y[1]+"V"+i);break;case"top":n=Ho,_.attr("y2",-u),S.attr("y",-(Math.max(u,0)+o)),b.attr("x2",0).attr("y2",-u),k.attr("x",0).attr("y",-(Math.max(u,0)+o)),w.attr("dy","0em").style("text-anchor","middle"),M.attr("d","M"+y[0]+","+-i+"V0H"+y[1]+"V"+-i);break;case"left":n=Fo,_.attr("x2",-u),S.attr("x",-(Math.max(u,0)+o)),b.attr("x2",-u).attr("y2",0),k.attr("x",-(Math.max(u,0)+o)).attr("y",0),w.attr("dy",".32em").style("text-anchor","end"),M.attr("d","M"+-i+","+y[0]+"H0V"+y[1]+"H"+-i);break;case"right":n=Fo,_.attr("x2",u),S.attr("x",Math.max(u,0)+o),b.attr("x2",u).attr("y2",0),k.attr("x",Math.max(u,0)+o).attr("y",0),w.attr("dy",".32em").style("text-anchor","start"),M.attr("d","M"+i+","+y[0]+"H0V"+y[1]+"H"+i)}if(f.rangeBand){var E=f,A=E.rangeBand()/2;l=f=function(n){return E(n)+A}}else l.rangeBand?l=f:d.call(n,f);v.call(n,l),m.call(n,f)})}var t,e=Xo.scale.linear(),r=Ts,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in qs?t+"":Ts,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ts="bottom",qs={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function n(i){i.each(function(){var i=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,bt);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return zs[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,f=Xo.transition(i),h=Xo.transition(o);c&&(l=Ri(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),e(f)),s&&(l=Ri(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+l[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",l[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==Xo.event.keyCode&&(C||(x=null,L[0]-=l[1],L[1]-=f[1],C=2),d())}function p(){32==Xo.event.keyCode&&2==C&&(L[0]+=l[1],L[1]+=f[1],C=0,d())}function v(){var n=Xo.mouse(_),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),C||(Xo.event.altKey?(x||(x=[(l[0]+l[1])/2,(f[0]+f[1])/2]),L[0]=l[+(n[0]<x[0])],L[1]=f[+(n[1]<x[1])]):x=null),E&&m(n,c,0)&&(e(S),u=!0),A&&m(n,s,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,a=Ri(t),c=a[0],s=a[1],p=L[e],v=e?f:l,d=v[1]-v[0];return C&&(c-=p,s-=d+p),r=(e?g:h)?Math.max(c,Math.min(s,n[e])):n[e],C?u=(r+=p)+d:(x&&(p=Math.max(c,Math.min(s,2*x[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function y(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),Xo.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),N(),w({type:"brushend"})}var x,M,_=this,b=Xo.select(Xo.event.target),w=a.of(_,arguments),S=Xo.select(_),k=b.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&s,C=b.classed("extent"),N=O(),L=Xo.mouse(_),T=Xo.select(Go).on("keydown.brush",u).on("keyup.brush",p);if(Xo.event.changedTouches?T.on("touchmove.brush",v).on("touchend.brush",y):T.on("mousemove.brush",v).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),C)L[0]=l[0]-L[0],L[1]=f[0]-L[1];else if(k){var q=+/w$/.test(k),z=+/^n/.test(k);M=[l[1-q]-L[0],f[1-z]-L[1]],L[0]=l[q],L[1]=f[z]}else Xo.event.altKey&&(x=L.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",b.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=y(n,"brushstart","brush","brushend"),c=null,s=null,l=[0,0],f=[0,0],h=!0,g=!0,p=Rs[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:l,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,ks?Xo.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,l=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=hu(l,t.x),r=hu(f,t.y);return i=o=null,function(u){l=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Rs[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,p=Rs[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(h=!!t[0],g=!!t[1]):c?h=!!t:s&&(g=!!t),n):c&&s?[h,g]:c?h:s?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=l[0]||r!=l[1])&&(l=[e,r])),s&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],s.invert&&(u=s(u),a=s(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=l[0],r=l[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),s&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],s.invert&&(u=s.invert(u),a=s.invert(a)),u>a&&(h=u,u=a,a=h))),c&&s?[[e,u],[r,a]]:c?[e,r]:s&&[u,a])},n.clear=function(){return n.empty()||(l=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&l[0]==l[1]||!!s&&f[0]==f[1]},Xo.rebind(n,a,"on")};var zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Rs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ds=tc.format=ac.timeFormat,Ps=Ds.utc,Us=Ps("%Y-%m-%dT%H:%M:%S.%LZ");Ds.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Oo:Us,Oo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Oo.toString=Us.toString,tc.second=Rt(function(n){return new ec(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),tc.seconds=tc.second.range,tc.seconds.utc=tc.second.utc.range,tc.minute=Rt(function(n){return new ec(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),tc.minutes=tc.minute.range,tc.minutes.utc=tc.minute.utc.range,tc.hour=Rt(function(n){var t=n.getTimezoneOffset()/60;return new ec(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),tc.hours=tc.hour.range,tc.hours.utc=tc.hour.utc.range,tc.month=Rt(function(n){return n=tc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),tc.months=tc.month.range,tc.months.utc=tc.month.utc.range;var js=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Hs=[[tc.second,1],[tc.second,5],[tc.second,15],[tc.second,30],[tc.minute,1],[tc.minute,5],[tc.minute,15],[tc.minute,30],[tc.hour,1],[tc.hour,3],[tc.hour,6],[tc.hour,12],[tc.day,1],[tc.day,2],[tc.week,1],[tc.month,1],[tc.month,3],[tc.year,1]],Fs=Ds.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",be]]),Os={range:function(n,t,e){return Xo.range(Math.ceil(n/e)*e,+t,e).map(Io)},floor:bt,ceil:bt};Hs.year=tc.year,tc.scale=function(){return Yo(Xo.scale.linear(),Hs,Fs)};var Ys=Hs.map(function(n){return[n[0].utc,n[1]]}),Is=Ps.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",be]]);Ys.year=tc.year.utc,tc.scale.utc=function(){return Yo(Xo.scale.linear(),Ys,Is)},Xo.text=wt(function(n){return n.responseText}),Xo.json=function(n,t){return St(n,"application/json",Zo,t)},Xo.html=function(n,t){return St(n,"text/html",Vo,t)},Xo.xml=wt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof module&&module.exports?module.exports=Xo:this.d3=Xo}(); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/devscripts/COPYING b/chromium/third_party/catapult/tracing/third_party/devscripts/COPYING
deleted file mode 100644
index c74d291485b..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/devscripts/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/chromium/third_party/catapult/tracing/third_party/devscripts/README.chromium b/chromium/third_party/catapult/tracing/third_party/devscripts/README.chromium
deleted file mode 100644
index 1016e4cbebb..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/devscripts/README.chromium
+++ /dev/null
@@ -1,12 +0,0 @@
-Name: devscripts
-URL: http://anonscm.debian.org/gitweb/?p=devscripts/devscripts.git
-Version: 2.12.4
-Security Critical: no
-License: GPL 2.0
-
-Description:
-This directory contains selected tools from the Debian's devscripts collection.
-
-A .vanilla file is checked in so that our patched version can be easily
-compared with the unpatched script (e.g. when sending the changes upstream).
-Having a .patch file checked in was too inconvenient to keep up to date.
diff --git a/chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl b/chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl
deleted file mode 100755
index a59bbf96320..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl
+++ /dev/null
@@ -1,671 +0,0 @@
-#!/usr/bin/perl -w
-# This script was originally based on the script of the same name from
-# the KDE SDK (by dfaure@kde.org)
-#
-# This version is
-# Copyright (C) 2007, 2008 Adam D. Barratt
-# Copyright (C) 2012 Francesco Poli
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-
-=head1 NAME
-
-licensecheck - simple license checker for source files
-
-=head1 SYNOPSIS
-
-B<licensecheck> B<--help>|B<--version>
-
-B<licensecheck> [B<--no-conf>] [B<--verbose>] [B<--copyright>]
-[B<-l>|B<--lines=>I<N>] [B<-i>|B<--ignore=>I<regex>] [B<-c>|B<--check=>I<regex>]
-[B<-m>|B<--machine>] [B<-r>|B<--recursive>]
-I<list of files and directories to check>
-
-=head1 DESCRIPTION
-
-B<licensecheck> attempts to determine the license that applies to each file
-passed to it, by searching the start of the file for text belonging to
-various licenses.
-
-If any of the arguments passed are directories, B<licensecheck> will add
-the files contained within to the list of files to process.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<--verbose>, B<--no-verbose>
-
-Specify whether to output the text being processed from each file before
-the corresponding license information.
-
-Default is to be quiet.
-
-=item B<-l=>I<N>, B<--lines=>I<N>
-
-Specify the number of lines of each file's header which should be parsed
-for license information. (Default is 60).
-
-=item B<-i=>I<regex>, B<--ignore=>I<regex>
-
-When processing the list of files and directories, the regular
-expression specified by this option will be used to indicate those which
-should not be considered (e.g. backup files, VCS metadata).
-
-=item B<-r>, B<--recursive>
-
-Specify that the contents of directories should be added
-recursively.
-
-=item B<-c=>I<regex>, B<--check=>I<regex>
-
-Specify a pattern against which filenames will be matched in order to
-decide which files to check the license of.
-
-The default includes common source files.
-
-=item B<--copyright>
-
-Also display copyright text found within the file
-
-=item B<-m>, B<--machine>
-
-Display the information in a machine readable way, i.e. in the form
-<file><tab><license>[<tab><copyright>] so that it can be easily sorted
-and/or filtered, e.g. with the B<awk> and B<sort> commands.
-Note that using the B<--verbose> option will kill the readability.
-
-=item B<--no-conf>, B<--noconf>
-
-Do not read any configuration files. This can only be used as the first
-option given on the command-line.
-
-=back
-
-=head1 CONFIGURATION VARIABLES
-
-The two configuration files F</etc/devscripts.conf> and
-F<~/.devscripts> are sourced by a shell in that order to set
-configuration variables. Command line options can be used to override
-configuration file settings. Environment variable settings are
-ignored for this purpose. The currently recognised variables are:
-
-=over 4
-
-=item B<LICENSECHECK_VERBOSE>
-
-If this is set to I<yes>, then it is the same as the B<--verbose> command
-line parameter being used. The default is I<no>.
-
-=item B<LICENSECHECK_PARSELINES>
-
-If this is set to a positive number then the specified number of lines
-at the start of each file will be read whilst attempting to determine
-the license(s) in use. This is equivalent to the B<--lines> command line
-option.
-
-=back
-
-=head1 LICENSE
-
-This code is copyright by Adam D. Barratt <I<adam@adam-barratt.org.uk>>,
-all rights reserved; based on a script of the same name from the KDE
-SDK, which is copyright by <I<dfaure@kde.org>>.
-This program comes with ABSOLUTELY NO WARRANTY.
-You are free to redistribute this code under the terms of the GNU
-General Public License, version 2 or later.
-
-=head1 AUTHOR
-
-Adam D. Barratt <adam@adam-barratt.org.uk>
-
-=cut
-
-use strict;
-use warnings;
-use Getopt::Long qw(:config gnu_getopt);
-use File::Basename;
-use Tie::File;
-use Fcntl 'O_RDONLY';
-
-sub fatal($);
-sub parse_copyright($);
-sub parselicense($);
-sub remove_comments($);
-
-my $progname = basename($0);
-
-# From dpkg-source
-my $default_ignore_regex = '
-# Ignore general backup files
-(?:^|/).*~$|
-# Ignore emacs recovery files
-(?:^|/)\.#.*$|
-# Ignore vi swap files
-(?:^|/)\..*\.swp$|
-# Ignore baz-style junk files or directories
-(?:^|/),,.*(?:$|/.*$)|
-# File-names that should be ignored (never directories)
-(?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$|
-# File or directory names that should be ignored
-(?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git|
-\.shelf|_MTN|\.bzr(?:\.backup|tags)?)(?:$|/.*$)
-';
-
-# Take out comments and newlines
-$default_ignore_regex =~ s/^#.*$//mg;
-$default_ignore_regex =~ s/\n//sg;
-
-my $default_check_regex = '\.(c(c|pp|xx)?|h(h|pp|xx)?|f(77|90)?|p(l|m)|xs|sh|php|py(|x)|rb|java|vala|el|sc(i|e)|cs|pas|inc|dtd|xsl|mod|m|tex|mli?)$';
-
-my $modified_conf_msg;
-
-my ($opt_verbose, $opt_lines, $opt_noconf) = ('', '', '');
-my $opt_ignore_regex = $default_ignore_regex;
-my $opt_check_regex = $default_check_regex;
-my $opt_recursive = 0;
-my $opt_copyright = 0;
-my $opt_machine = 0;
-my ($opt_help, $opt_version);
-my $def_lines = 60;
-
-# Read configuration files and then command line
-# This is boilerplate
-
-if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
- $modified_conf_msg = " (no configuration files read)";
- shift;
-} else {
- my @config_files = ('/etc/devscripts.conf', '~/.devscripts');
- my %config_vars = (
- 'LICENSECHECK_VERBOSE' => 'no',
- 'LICENSECHECK_PARSELINES' => $def_lines,
- );
- my %config_default = %config_vars;
-
- my $shell_cmd;
- # Set defaults
- foreach my $var (keys %config_vars) {
- $shell_cmd .= qq[$var="$config_vars{$var}";\n];
- }
- $shell_cmd .= 'for file in ' . join(" ", @config_files) . "; do\n";
- $shell_cmd .= '[ -f $file ] && . $file; done;' . "\n";
- # Read back values
- foreach my $var (keys %config_vars) { $shell_cmd .= "echo \$$var;\n" }
- my $shell_out = `/bin/bash -c '$shell_cmd'`;
- @config_vars{keys %config_vars} = split /\n/, $shell_out, -1;
-
- # Check validity
- $config_vars{'LICENSECHECK_VERBOSE'} =~ /^(yes|no)$/
- or $config_vars{'LICENSECHECK_VERBOSE'} = 'no';
- $config_vars{'LICENSECHECK_PARSELINES'} =~ /^[1-9][0-9]*$/
- or $config_vars{'LICENSECHECK_PARSELINES'} = $def_lines;
-
- foreach my $var (sort keys %config_vars) {
- if ($config_vars{$var} ne $config_default{$var}) {
- $modified_conf_msg .= " $var=$config_vars{$var}\n";
- }
- }
- $modified_conf_msg ||= " (none)\n";
- chomp $modified_conf_msg;
-
- $opt_verbose = $config_vars{'LICENSECHECK_VERBOSE'} eq 'yes' ? 1 : 0;
- $opt_lines = $config_vars{'LICENSECHECK_PARSELINES'};
-}
-
-GetOptions("help|h" => \$opt_help,
- "version|v" => \$opt_version,
- "verbose!" => \$opt_verbose,
- "lines|l=i" => \$opt_lines,
- "ignore|i=s" => \$opt_ignore_regex,
- "recursive|r" => \$opt_recursive,
- "check|c=s" => \$opt_check_regex,
- "copyright" => \$opt_copyright,
- "machine|m" => \$opt_machine,
- "noconf" => \$opt_noconf,
- "no-conf" => \$opt_noconf,
- )
- or die "Usage: $progname [options] filelist\nRun $progname --help for more details\n";
-
-$opt_lines = $def_lines if $opt_lines !~ /^[1-9][0-9]*$/;
-
-if ($opt_noconf) {
- fatal "--no-conf is only acceptable as the first command-line option!";
-}
-if ($opt_help) { help(); exit 0; }
-if ($opt_version) { version(); exit 0; }
-
-die "Usage: $progname [options] filelist\nRun $progname --help for more details\n" unless @ARGV;
-
-$opt_lines = $def_lines if not defined $opt_lines;
-
-my @files = ();
-my @find_args = ();
-my $files_count = @ARGV;
-
-push @find_args, qw(-not ( -path */LayoutTests/* -prune ) );
-push @find_args, qw(-not ( -path */out/Debug/* -prune ) );
-push @find_args, qw(-not ( -path */out/Release/* -prune ) );
-push @find_args, qw(-not ( -path .git* -prune ) );
-push @find_args, qw(-not ( -path .svn* -prune ) );
-
-push @find_args, qw(-maxdepth 1) unless $opt_recursive;
-push @find_args, qw(-follow -type f -print);
-
-while (@ARGV) {
- my $file = shift @ARGV;
-
- if (-d $file) {
- open FIND, '-|', 'find', $file, @find_args
- or die "$progname: couldn't exec find: $!\n";
-
- while (<FIND>) {
- chomp;
- next unless m%$opt_check_regex%;
- # Skip empty files
- next if (-z $_);
- push @files, $_ unless m%$opt_ignore_regex%;
- }
- close FIND;
- } else {
- next unless ($files_count == 1) or $file =~ m%$opt_check_regex%;
- push @files, $file unless $file =~ m%$opt_ignore_regex%;
- }
-}
-
-while (@files) {
- my $file = shift @files;
- my $header = '';
- my $copyright_match;
- my $copyright = '';
- my $license = '';
- my %copyrights;
-
- open (F, "<$file") or die "Unable to access $file\n";
- while (<F>) {
- last if ($. > $opt_lines);
- $header .= $_;
- }
- close(F);
-
- $copyright = join(" / ", values %copyrights);
-
- print qq(----- $file header -----\n$header----- end header -----\n\n)
- if $opt_verbose;
-
- remove_comments($header);
- $license = parselicense($header);
-
- # If no license in header, check footer (slow, because read file backwards)
- # Need for instance for Perl files, which often use the footer
- if ($license eq "UNKNOWN") {
- my $footer = '';
- tie(my @file_lines, "Tie::File", $file, autochomp => 0, mode => O_RDONLY) or die("Unable to access $file\n");
- # Avoid indexing error if header is entire file
- if ($#file_lines >= $opt_lines) {
- foreach (@file_lines[-$opt_lines .. -1]) {
- $footer .= $_;
- }
- }
- print qq(----- $file footer -----\n$header----- end footer -----\n\n)
- if $opt_verbose;
- remove_comments($footer);
- $license = parselicense($footer);
- }
-
- if ($opt_machine) {
- print "$file\t$license";
- print "\t" . ($copyright or "*No copyright*") if $opt_copyright;
- print "\n";
- } else {
- print "$file: ";
- print "*No copyright* " unless $copyright;
- print $license . "\n";
- print " [Copyright: " . $copyright . "]\n"
- if $copyright and $opt_copyright;
- print "\n" if $opt_copyright;
- }
-}
-
-sub remove_comments($) {
- $_ = $_[0];
- # Remove Fortran comments
- s/^[cC] //gm;
- # Remove .ASM comments
- s#^;\*?##gm;
- # Remove .S comments
- s#^@ ##gm;
- # Remove new lines
- tr/\t\r\n/ /;
- # Remove C / C++ comments
- s#(\*/|/[/*])##g;
- # Remove all characters not matching search
- tr% A-Za-z.,@;0-9\(\)/-%%cd;
- # Collapse multiple spaces into single space
- tr/ //s;
- $_[0] = $_;
-}
-
-sub parse_copyright($) {
- my $copyright = '';
- my $match;
-
- my $copyright_indicator_regex = '
- (?:copyright # The full word
- |copr\. # Legally-valid abbreviation
- |\x{00a9} # Unicode character COPYRIGHT SIGN
- |\xc2\xa9 # Unicode copyright sign encoded in iso8859
- |\(c\) # Legally-null representation of sign
- )';
- my $copyright_disindicator_regex = '
- \b(?:info(?:rmation)? # Discussing copyright information
- |notice # Discussing the notice
- |and|or # Part of a sentence
- )\b';
-
- if (m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%ix) {
- $match = $1;
-
- # Ignore lines matching "see foo for copyright information" etc.
- if ($match !~ m%^\s*$copyright_disindicator_regex%ix) {
- # De-cruft
- $match =~ s/([,.])?\s*$//;
- $match =~ s/$copyright_indicator_regex//igx;
- $match =~ s/^\s+//;
- $match =~ s/\s{2,}/ /g;
- $match =~ s/\\@/@/g;
- $copyright = $match;
- }
- }
-
- return $copyright;
-}
-
-sub help {
- print <<"EOF";
-Usage: $progname [options] filename [filename ...]
-Valid options are:
- --help, -h Display this message
- --version, -v Display version and copyright info
- --no-conf, --noconf Don't read devscripts config files; must be
- the first option given
- --verbose Display the header of each file before its
- license information
- --lines, -l Specify how many lines of the file header
- should be parsed for license information
- (Default: $def_lines)
- --check, -c Specify a pattern indicating which files should
- be checked
- (Default: '$default_check_regex')
- --machine, -m Display in a machine readable way (good for awk)
- --recursive, -r Add the contents of directories recursively
- --copyright Also display the file's copyright
- --ignore, -i Specify that files / directories matching the
- regular expression should be ignored when
- checking files
- (Default: '$default_ignore_regex')
-
-Default settings modified by devscripts configuration files:
-$modified_conf_msg
-EOF
-}
-
-sub version {
- print <<"EOF";
-This is $progname, from the Debian devscripts package, version ###VERSION###
-Copyright (C) 2007, 2008 by Adam D. Barratt <adam\@adam-barratt.org.uk>; based
-on a script of the same name from the KDE SDK by <dfaure\@kde.org>.
-
-This program comes with ABSOLUTELY NO WARRANTY.
-You are free to redistribute this code under the terms of the
-GNU General Public License, version 2, or (at your option) any
-later version.
-EOF
-}
-
-sub parselicense($) {
- my ($licensetext) = @_;
-
- my $gplver = "";
- my $lgplver = "";
- my $extrainfo = "";
- my $license = "";
-
- if ($licensetext =~ /version ([^, ]+?)[.,]? (?:\(?only\)?.? )?(?:of the GNU (Affero )?General Public License )?(as )?published by the Free Software Foundation/i or
- $licensetext =~ /GNU (?:Affero )?General Public License (?:as )?published by the Free Software Foundation; version ([^, ]+?)[.,]? /i or
- $licensetext =~ /GNU (?:Affero )?General Public License,? [Vv]ersion (\d+(?:\.\d+)?)[ \.]/) {
- $gplver = " (v$1)";
- } elsif ($licensetext =~ /either version ([^ ]+)(?: of the License)?, or \(at your option\) any later version/) {
- $gplver = " (v$1 or later)";
- }
-
- if ($licensetext =~ /version ([^, ]+?)[.,]? (?:or later|or any later version) (?:of the GNU (?:Lesser |Library )General Public License )(as )?published by the Free Software Foundation/i or
- $licensetext =~ /(?:GNU (?:Lesser |Library )|(?:Lesser|Library) GNU )General Public License (?:(?:as )?published by the Free Software Foundation;)?,? (?:either )?[Vv]ersion ([^, ]+?)(?: of the license)?[.,]? (?:or later|or (?:\(at your option\) )?any later version)/i or
- $licensetext =~ /GNU (?:Lesser |Library )General Public License(?: \(LGPL\))?,? [Vv]ersion (\d+(?:\.\d+)?)[ \.]/) {
- $lgplver = " (v$1 or later)";
- }
-
- if ($licensetext =~ /permission (?:is (also granted|given))? to link (the code of )?this program with (any edition of )?(Qt|the Qt library)/i) {
- $extrainfo = " (with Qt exception)$extrainfo"
- }
-
- if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
- $license = "GENERATED FILE";
- }
-
- if ($licensetext =~ /is (free software.? you can redistribute it and\/or modify it|licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i or
- $licensetext =~ /(is distributed|may be used|can redistribute).*terms.*(LGPL|(Lesser|Library) GNU General Public License)/) {
- if ($lgplver) {
- $license = "LGPL$lgplver$extrainfo $license";
- } else {
- $license = "LGPL (unversioned/unknown version) $license";
- }
- }
-
- if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/or modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU General Public License/i) {
- $license = "GPL$gplver$extrainfo $license";
- } elsif ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
- and $gplver) {
- $license = "GPL$gplver$extrainfo $license";
- } elsif ($licensetext =~ /is distributed.*terms.*[^L]GPL/) {
- if ($gplver) {
- $license = "GPL$gplver$extrainfo $license";
- } else {
- $license = "GPL (unversioned/unknown version) $license";
- }
- }
-
- if ($licensetext =~ /This file is part of the .*Qt GUI Toolkit. This file may be distributed under the terms of the Q Public License as defined/) {
- $license = "QPL (part of Qt) $license";
- } elsif ($licensetext =~ /may be distributed under the terms of the Q Public License as defined/) {
- $license = "QPL $license";
- }
-
- if ($licensetext =~ /opensource\.org\/licenses\/mit/) {
- $license = "MIT/X11 (BSD like) $license";
- } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to any person obtaining a copy of this software and(\/or)? associated documentation files \(the (Software|Materials)\), to deal in the (Software|Materials)/) {
- $license = "MIT/X11 (BSD like) $license";
- } elsif ($licensetext =~ /Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose/) {
- $license = "MIT/X11 (BSD like) $license";
- } elsif ($licensetext =~ /Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee/) {
- $license = "MIT/X11 (BSD like) $license";
- } elsif ($licensetext =~ /MIT .* License/) {
- $license = "MIT/X11 (BSD like) $license";
- }
-
- if ($licensetext =~ /This file is part of the Independent JPEG Group(')?s software.*For conditions of distribution and use, see the accompanying README file/i) {
- $license = "Independent JPEG Group License $license";
- }
-
- if ($licensetext =~ /the University of Illinois Open Source License/){
- $license = "University of Illinois/NCSA Open Source License (BSD like) $license";
- }
-
- if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute this software (and its documentation )?for any purpose (with or )?without fee is hereby granted, provided.*(copyright|entire) notice.*all copies/i) {
- $license = "ISC $license";
- }
-
- if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY/ ||
- $licensetext =~ /THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- ITY/) {
- if ($licensetext =~ /All advertising materials mentioning features or use of this software must display the following/) {
- $license = "BSD (4 clause) $license";
- } elsif ($licensetext =~ /be used to endorse or promote products derived from this software/) {
- $license = "BSD (3 clause) $license";
- } elsif ($licensetext =~ /Redistributions of source code must retain the above copyright notice/) {
- $license = "BSD (2 clause) $license";
- } else {
- $license = "BSD $license";
- }
- } elsif ($licensetext =~ /Use of this source code is governed by a BSD-style license/) {
- $license = "BSD-like $license";
- } elsif ($licensetext =~ /BSD terms apply/) {
- $license = "BSD-like $license";
- } elsif ($licensetext =~ /subject to the BSD License/) {
- # TODO(sbc): remove this case once we fix: http://crbug.com/177268
- $license = "BSD-like $license";
- } elsif ($licensetext =~ /license BSD/) {
- $license = "BSD-like $license";
- } elsif ($licensetext =~ /GOVERNED BY A BSD-STYLE SOURCE LICENSE/) {
- $license = "BSD-like $license";
- } elsif ($licensetext =~ /BSD 3-Clause license/) {
- $license = "BSD (3 clause) $license";
- }
-
- if ($licensetext =~ /Mozilla Public License( Version|, v.) ([^ ]+[^., ]),?/) {
- $license = "MPL (v$2) $license";
- }
-
- if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+)/) {
- $license = "Artistic (v$1) $license";
- }
-
- if ($licensetext =~ /is free software under the Artistic [Ll]icense/) {
- $license = "Artistic $license";
- }
-
- if ($licensetext =~ /This (program|library) is free software; you can redistribute it and\/or modify it under the same terms as Perl itself/) {
- $license = "Perl $license";
- }
-
- if ($licensetext =~ /under the terms of the Apache ([^ ]+) License OR version 2 of the GNU/) {
- $license = "Apache (v$1) GPL (v2) $license";
- } elsif ($licensetext =~ /under the Apache License, Version ([^ ]+)/) {
- $license = "Apache (v$1) $license";
- }
-
- if ($licensetext =~ /(THE BEER-WARE LICENSE)/i) {
- $license = "Beerware $license";
- }
-
- if ($licensetext =~ /This source file is subject to version ([^ ]+) of the PHP license/) {
- $license = "PHP (v$1) $license";
- }
-
- if ($licensetext =~ /under the terms of the CeCILL /) {
- $license = "CeCILL $license";
- }
-
- if ($licensetext =~ /under the terms of the CeCILL-([^ ]+) /) {
- $license = "CeCILL-$1 $license";
- }
-
- if ($licensetext =~ /under the SGI Free Software (B License|License B)/) {
- $license = "SGI Free Software License B $license";
- }
-
- if ($licensetext =~ /(in|into) the public domain/i) {
- $license = "Public domain $license";
- }
-
- if ($licensetext =~ /terms of the Common Development and Distribution License(, Version ([^(]+))? \(the License\)/) {
- $license = "CDDL " . ($1 ? "(v$2) " : '') . $license;
- }
-
- if ($licensetext =~ /Microsoft Permissive License \(Ms-PL\)/) {
- $license = "Ms-PL $license";
- }
-
- if ($licensetext =~ /as defined in and that are subject to the Apple Public Source License([ ,-]+Version ([^ ]+)?(\.))/) {
- $license = "APSL " . ($1 ? "(v$2) " : '') . $license;
- } elsif ($licensetext =~ /provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software/) {
- # https://fedoraproject.org/wiki/Licensing/Apple_MIT_License
- $license = "Apple MIT $license";
- }
-
- if ($licensetext =~ /Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license \([\"]?the Software[\"]?\)/ or
- $licensetext =~ /Boost Software License([ ,-]+Version ([^ ]+)?(\.))/i) {
- $license = "BSL " . ($1 ? "(v$2) " : '') . $license;
- }
-
- if ($licensetext =~ /PYTHON SOFTWARE FOUNDATION LICENSE (VERSION ([^ ]+))/i) {
- $license = "PSF " . ($1 ? "(v$2) " : '') . $license;
- }
-
- if ($licensetext =~ /The origin of this software must not be misrepresented.*Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ or
- $licensetext =~ /see copyright notice in zlib\.h/) {
- $license = "zlib/libpng $license";
- } elsif ($licensetext =~ /This code is released under the libpng license/) {
- $license = "libpng $license";
- }
-
- if ($licensetext =~ /under MIT license/) {
- $license = "MIT/X11 (BSD like) $license";
- }
-
- if ($licensetext =~ /License MIT(-| )License/) {
- $license = "MIT/X11 (BSD like) $license";
- }
-
- if ($licensetext =~ /As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice/) {
- $license = $license . "with Bison parser exception";
- }
-
- if ($licensetext =~ /As a special exception to the GNU General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program/) {
- $license = $license . "with libtool exception";
- }
-
- if ($licensetext =~ /These materials are protected by copyright laws and contain material proprietary to the Khronos Group, Inc\. You may use these materials for implementing Khronos specifications, without altering or removing any trademark, copyright or other notice from the specification/) {
- $license = $license . "Khronos Group";
- }
-
- if ($licensetext =~ /This file is part of the FreeType project, and may only be used(,)? modified(,)? and distributed under the terms of the FreeType project license, LICENSE\.TXT\. By continuing to use, modify, or distribute this file you indicate that you have read the license and understand and accept it fully/) {
- $license = "FreeType (BSD like) $license";
- }
- if ($licensetext =~ /This software, and all works of authorship, whether in source or object code form as indicated by the copyright notice.*is made available, and may only be used, modified, and distributed under the FreeType Project License, LICENSE\.TXT\. Additionally, subject to the terms and conditions of the FreeType Project License, each contributor to the Work hereby grants to any individual or legal entity exercising permissions granted by the FreeType Project License and this section.*a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable.*patent license to make/) {
- $license = "FreeType (BSD like) with patent clause $license";
- }
-
- if ($licensetext =~ /Anti-Grain Geometry.*Permission to copy, use, modify, sell and distribute this software is granted provided this copyright notice appears in all copies. This software is provided as is without express or impl/) {
- $license = "Anti-Grain Geometry $license";
- }
-
- if ($licensetext =~ /Developed at SunSoft, a Sun Microsystems, Inc\. business\. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved\./) {
- $license = "SunSoft (BSD like) $license";
- }
-
- $license = "UNKNOWN" unless $license;
-
- # Remove trailing spaces.
- $license =~ s/\s+$//;
-
- return $license;
-}
-
-sub fatal($) {
- my ($pack,$file,$line);
- ($pack,$file,$line) = caller();
- (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d;
- $msg =~ s/\n\n$/\n/;
- die $msg;
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl.vanilla b/chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl.vanilla
deleted file mode 100644
index d98b974adda..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/devscripts/licensecheck.pl.vanilla
+++ /dev/null
@@ -1,577 +0,0 @@
-#!/usr/bin/perl -w
-# This script was originally based on the script of the same name from
-# the KDE SDK (by dfaure@kde.org)
-#
-# This version is
-# Copyright (C) 2007, 2008 Adam D. Barratt
-# Copyright (C) 2012 Francesco Poli
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-
-=head1 NAME
-
-licensecheck - simple license checker for source files
-
-=head1 SYNOPSIS
-
-B<licensecheck> B<--help>|B<--version>
-
-B<licensecheck> [B<--no-conf>] [B<--verbose>] [B<--copyright>]
-[B<-l>|B<--lines=>I<N>] [B<-i>|B<--ignore=>I<regex>] [B<-c>|B<--check=>I<regex>]
-[B<-m>|B<--machine>] [B<-r>|B<--recursive>]
-I<list of files and directories to check>
-
-=head1 DESCRIPTION
-
-B<licensecheck> attempts to determine the license that applies to each file
-passed to it, by searching the start of the file for text belonging to
-various licenses.
-
-If any of the arguments passed are directories, B<licensecheck> will add
-the files contained within to the list of files to process.
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<--verbose>, B<--no-verbose>
-
-Specify whether to output the text being processed from each file before
-the corresponding license information.
-
-Default is to be quiet.
-
-=item B<-l=>I<N>, B<--lines=>I<N>
-
-Specify the number of lines of each file's header which should be parsed
-for license information. (Default is 60).
-
-=item B<-i=>I<regex>, B<--ignore=>I<regex>
-
-When processing the list of files and directories, the regular
-expression specified by this option will be used to indicate those which
-should not be considered (e.g. backup files, VCS metadata).
-
-=item B<-r>, B<--recursive>
-
-Specify that the contents of directories should be added
-recursively.
-
-=item B<-c=>I<regex>, B<--check=>I<regex>
-
-Specify a pattern against which filenames will be matched in order to
-decide which files to check the license of.
-
-The default includes common source files.
-
-=item B<--copyright>
-
-Also display copyright text found within the file
-
-=item B<-m>, B<--machine>
-
-Display the information in a machine readable way, i.e. in the form
-<file><tab><license>[<tab><copyright>] so that it can be easily sorted
-and/or filtered, e.g. with the B<awk> and B<sort> commands.
-Note that using the B<--verbose> option will kill the readability.
-
-=item B<--no-conf>, B<--noconf>
-
-Do not read any configuration files. This can only be used as the first
-option given on the command-line.
-
-=back
-
-=head1 CONFIGURATION VARIABLES
-
-The two configuration files F</etc/devscripts.conf> and
-F<~/.devscripts> are sourced by a shell in that order to set
-configuration variables. Command line options can be used to override
-configuration file settings. Environment variable settings are
-ignored for this purpose. The currently recognised variables are:
-
-=over 4
-
-=item B<LICENSECHECK_VERBOSE>
-
-If this is set to I<yes>, then it is the same as the B<--verbose> command
-line parameter being used. The default is I<no>.
-
-=item B<LICENSECHECK_PARSELINES>
-
-If this is set to a positive number then the specified number of lines
-at the start of each file will be read whilst attempting to determine
-the license(s) in use. This is equivalent to the B<--lines> command line
-option.
-
-=back
-
-=head1 LICENSE
-
-This code is copyright by Adam D. Barratt <I<adam@adam-barratt.org.uk>>,
-all rights reserved; based on a script of the same name from the KDE
-SDK, which is copyright by <I<dfaure@kde.org>>.
-This program comes with ABSOLUTELY NO WARRANTY.
-You are free to redistribute this code under the terms of the GNU
-General Public License, version 2 or later.
-
-=head1 AUTHOR
-
-Adam D. Barratt <adam@adam-barratt.org.uk>
-
-=cut
-
-use strict;
-use warnings;
-use Getopt::Long qw(:config gnu_getopt);
-use File::Basename;
-
-sub fatal($);
-sub parse_copyright($);
-sub parselicense($);
-
-my $progname = basename($0);
-
-# From dpkg-source
-my $default_ignore_regex = '
-# Ignore general backup files
-(?:^|/).*~$|
-# Ignore emacs recovery files
-(?:^|/)\.#.*$|
-# Ignore vi swap files
-(?:^|/)\..*\.swp$|
-# Ignore baz-style junk files or directories
-(?:^|/),,.*(?:$|/.*$)|
-# File-names that should be ignored (never directories)
-(?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$|
-# File or directory names that should be ignored
-(?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git|
-\.shelf|_MTN|\.bzr(?:\.backup|tags)?)(?:$|/.*$)
-';
-
-# Take out comments and newlines
-$default_ignore_regex =~ s/^#.*$//mg;
-$default_ignore_regex =~ s/\n//sg;
-
-my $default_check_regex = '\.(c(c|pp|xx)?|h(h|pp|xx)?|f(77|90)?|p(l|m)|xs|sh|php|py(|x)|rb|java|vala|el|sc(i|e)|cs|pas|inc|dtd|xsl|mod|m|tex|mli?)$';
-
-my $modified_conf_msg;
-
-my ($opt_verbose, $opt_lines, $opt_noconf, $opt_ignore_regex, $opt_check_regex)
- = ('', '', '', '', '');
-my $opt_recursive = 0;
-my $opt_copyright = 0;
-my $opt_machine = 0;
-my ($opt_help, $opt_version);
-my $def_lines = 60;
-
-# Read configuration files and then command line
-# This is boilerplate
-
-if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
- $modified_conf_msg = " (no configuration files read)";
- shift;
-} else {
- my @config_files = ('/etc/devscripts.conf', '~/.devscripts');
- my %config_vars = (
- 'LICENSECHECK_VERBOSE' => 'no',
- 'LICENSECHECK_PARSELINES' => $def_lines,
- );
- my %config_default = %config_vars;
-
- my $shell_cmd;
- # Set defaults
- foreach my $var (keys %config_vars) {
- $shell_cmd .= qq[$var="$config_vars{$var}";\n];
- }
- $shell_cmd .= 'for file in ' . join(" ", @config_files) . "; do\n";
- $shell_cmd .= '[ -f $file ] && . $file; done;' . "\n";
- # Read back values
- foreach my $var (keys %config_vars) { $shell_cmd .= "echo \$$var;\n" }
- my $shell_out = `/bin/bash -c '$shell_cmd'`;
- @config_vars{keys %config_vars} = split /\n/, $shell_out, -1;
-
- # Check validity
- $config_vars{'LICENSECHECK_VERBOSE'} =~ /^(yes|no)$/
- or $config_vars{'LICENSECHECK_VERBOSE'} = 'no';
- $config_vars{'LICENSECHECK_PARSELINES'} =~ /^[1-9][0-9]*$/
- or $config_vars{'LICENSECHECK_PARSELINES'} = $def_lines;
-
- foreach my $var (sort keys %config_vars) {
- if ($config_vars{$var} ne $config_default{$var}) {
- $modified_conf_msg .= " $var=$config_vars{$var}\n";
- }
- }
- $modified_conf_msg ||= " (none)\n";
- chomp $modified_conf_msg;
-
- $opt_verbose = $config_vars{'LICENSECHECK_VERBOSE'} eq 'yes' ? 1 : 0;
- $opt_lines = $config_vars{'LICENSECHECK_PARSELINES'};
-}
-
-GetOptions("help|h" => \$opt_help,
- "version|v" => \$opt_version,
- "verbose!" => \$opt_verbose,
- "lines|l=i" => \$opt_lines,
- "ignore|i=s" => \$opt_ignore_regex,
- "recursive|r" => \$opt_recursive,
- "check|c=s" => \$opt_check_regex,
- "copyright" => \$opt_copyright,
- "machine|m" => \$opt_machine,
- "noconf" => \$opt_noconf,
- "no-conf" => \$opt_noconf,
- )
- or die "Usage: $progname [options] filelist\nRun $progname --help for more details\n";
-
-$opt_lines = $def_lines if $opt_lines !~ /^[1-9][0-9]*$/;
-$opt_ignore_regex = $default_ignore_regex if ! length $opt_ignore_regex;
-$opt_check_regex = $default_check_regex if ! length $opt_check_regex;
-
-if ($opt_noconf) {
- fatal "--no-conf is only acceptable as the first command-line option!";
-}
-if ($opt_help) { help(); exit 0; }
-if ($opt_version) { version(); exit 0; }
-
-die "Usage: $progname [options] filelist\nRun $progname --help for more details\n" unless @ARGV;
-
-$opt_lines = $def_lines if not defined $opt_lines;
-
-my @files = ();
-my @find_args = ();
-my $files_count = @ARGV;
-
-push @find_args, qw(-maxdepth 1) unless $opt_recursive;
-push @find_args, qw(-follow -type f -print);
-
-while (@ARGV) {
- my $file = shift @ARGV;
-
- if (-d $file) {
- open FIND, '-|', 'find', $file, @find_args
- or die "$progname: couldn't exec find: $!\n";
-
- while (<FIND>) {
- chomp;
- next unless m%$opt_check_regex%;
- # Skip empty files
- next if (-z $_);
- push @files, $_ unless m%$opt_ignore_regex%;
- }
- close FIND;
- } else {
- next unless ($files_count == 1) or $file =~ m%$opt_check_regex%;
- push @files, $file unless $file =~ m%$opt_ignore_regex%;
- }
-}
-
-while (@files) {
- my $file = shift @files;
- my $content = '';
- my $copyright_match;
- my $copyright = '';
- my $license = '';
- my %copyrights;
-
- open (F, "<$file") or die "Unable to access $file\n";
- while (<F>) {
- last if ($. > $opt_lines);
- $content .= $_;
- $copyright_match = parse_copyright($_);
- if ($copyright_match) {
- $copyrights{lc("$copyright_match")} = "$copyright_match";
- }
- }
- close(F);
-
- $copyright = join(" / ", values %copyrights);
-
- print qq(----- $file header -----\n$content----- end header -----\n\n)
- if $opt_verbose;
-
- # Remove Fortran comments
- $content =~ s/^[cC] //gm;
- $content =~ tr/\t\r\n/ /;
- # Remove C / C++ comments
- $content =~ s#(\*/|/[/*])##g;
- $content =~ tr% A-Za-z.,@;0-9\(\)/-%%cd;
- $content =~ tr/ //s;
-
- $license = parselicense($content);
- if ($opt_machine) {
- print "$file\t$license";
- print "\t" . ($copyright or "*No copyright*") if $opt_copyright;
- print "\n";
- } else {
- print "$file: ";
- print "*No copyright* " unless $copyright;
- print $license . "\n";
- print " [Copyright: " . $copyright . "]\n"
- if $copyright and $opt_copyright;
- print "\n" if $opt_copyright;
- }
-}
-
-sub parse_copyright($) {
- my $copyright = '';
- my $match;
-
- my $copyright_indicator_regex = '
- (?:copyright # The full word
- |copr\. # Legally-valid abbreviation
- |\x{00a9} # Unicode character COPYRIGHT SIGN
- |\xc2\xa9 # Unicode copyright sign encoded in iso8859
- |\(c\) # Legally-null representation of sign
- )';
- my $copyright_disindicator_regex = '
- \b(?:info(?:rmation)? # Discussing copyright information
- |notice # Discussing the notice
- |and|or # Part of a sentence
- )\b';
-
- if (m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%ix) {
- $match = $1;
-
- # Ignore lines matching "see foo for copyright information" etc.
- if ($match !~ m%^\s*$copyright_disindicator_regex%ix) {
- # De-cruft
- $match =~ s/([,.])?\s*$//;
- $match =~ s/$copyright_indicator_regex//igx;
- $match =~ s/^\s+//;
- $match =~ s/\s{2,}/ /g;
- $match =~ s/\\@/@/g;
- $copyright = $match;
- }
- }
-
- return $copyright;
-}
-
-sub help {
- print <<"EOF";
-Usage: $progname [options] filename [filename ...]
-Valid options are:
- --help, -h Display this message
- --version, -v Display version and copyright info
- --no-conf, --noconf Don't read devscripts config files; must be
- the first option given
- --verbose Display the header of each file before its
- license information
- --lines, -l Specify how many lines of the file header
- should be parsed for license information
- (Default: $def_lines)
- --check, -c Specify a pattern indicating which files should
- be checked
- (Default: '$default_check_regex')
- --machine, -m Display in a machine readable way (good for awk)
- --recursive, -r Add the contents of directories recursively
- --copyright Also display the file's copyright
- --ignore, -i Specify that files / directories matching the
- regular expression should be ignored when
- checking files
- (Default: '$default_ignore_regex')
-
-Default settings modified by devscripts configuration files:
-$modified_conf_msg
-EOF
-}
-
-sub version {
- print <<"EOF";
-This is $progname, from the Debian devscripts package, version ###VERSION###
-Copyright (C) 2007, 2008 by Adam D. Barratt <adam\@adam-barratt.org.uk>; based
-on a script of the same name from the KDE SDK by <dfaure\@kde.org>.
-
-This program comes with ABSOLUTELY NO WARRANTY.
-You are free to redistribute this code under the terms of the
-GNU General Public License, version 2, or (at your option) any
-later version.
-EOF
-}
-
-sub parselicense($) {
- my ($licensetext) = @_;
-
- my $gplver = "";
- my $extrainfo = "";
- my $license = "";
-
- if ($licensetext =~ /version ([^, ]+?)[.,]? (?:\(?only\)?.? )?(?:of the GNU (Affero )?(Lesser |Library )?General Public License )?(as )?published by the Free Software Foundation/i or
- $licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License (?:as )?published by the Free Software Foundation; version ([^, ]+?)[.,]? /i) {
-
- $gplver = " (v$1)";
- } elsif ($licensetext =~ /GNU (?:Affero )?(?:Lesser |Library )?General Public License, version (\d+(?:\.\d+)?)[ \.]/) {
- $gplver = " (v$1)";
- } elsif ($licensetext =~ /either version ([^ ]+)(?: of the License)?, or \(at your option\) any later version/) {
- $gplver = " (v$1 or later)";
- }
-
- if ($licensetext =~ /(?:675 Mass Ave|59 Temple Place|51 Franklin Steet|02139|02111-1307)/i) {
- $extrainfo = " (with incorrect FSF address)$extrainfo";
- }
-
- if ($licensetext =~ /permission (?:is (also granted|given))? to link (the code of )?this program with (any edition of )?(Qt|the Qt library)/i) {
- $extrainfo = " (with Qt exception)$extrainfo"
- }
-
- if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
- $license = "GENERATED FILE";
- }
-
- if ($licensetext =~ /is (free software.? you can redistribute it and\/or modify it|licensed) under the terms of (version [^ ]+ of )?the (GNU (Library |Lesser )General Public License|LGPL)/i) {
- $license = "LGPL$gplver$extrainfo $license";
- }
-
- if ($licensetext =~ /is free software.? you can redistribute it and\/or modify it under the terms of the (GNU Affero General Public License|AGPL)/i) {
- $license = "AGPL$gplver$extrainfo $license";
- }
-
- if ($licensetext =~ /is free software.? you (can|may) redistribute it and\/or modify it under the terms of (?:version [^ ]+ (?:\(?only\)? )?of )?the GNU General Public License/i) {
- $license = "GPL$gplver$extrainfo $license";
- }
-
- if ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
- and length $gplver) {
- $license = "GPL$gplver$extrainfo $license";
- }
-
- if ($licensetext =~ /is distributed.*terms.*GPL/) {
- $license = "GPL (unversioned/unknown version) $license";
- }
-
- if ($licensetext =~ /This file is part of the .*Qt GUI Toolkit. This file may be distributed under the terms of the Q Public License as defined/) {
- $license = "QPL (part of Qt) $license";
- } elsif ($licensetext =~ /may be distributed under the terms of the Q Public License as defined/) {
- $license = "QPL $license";
- }
-
- if ($licensetext =~ /opensource\.org\/licenses\/mit-license\.php/) {
- $license = "MIT/X11 (BSD like) $license";
- } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to any person obtaining a copy of this software and(\/or)? associated documentation files \(the (Software|Materials)\), to deal in the (Software|Materials)/) {
- $license = "MIT/X11 (BSD like) $license";
- } elsif ($licensetext =~ /Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose/) {
- $license = "MIT/X11 (BSD like) $license";
- }
-
- if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute this software for any purpose with or without fee is hereby granted, provided.*copyright notice.*permission notice.*all copies/) {
- $license = "ISC $license";
- }
-
- if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY/) {
- if ($licensetext =~ /All advertising materials mentioning features or use of this software must display the following acknowledge?ment.*This product includes software developed by/i) {
- $license = "BSD (4 clause) $license";
- } elsif ($licensetext =~ /(The name .*? may not|Neither the names? .*? nor the names of (its|their) contributors may) be used to endorse or promote products derived from this software/i) {
- $license = "BSD (3 clause) $license";
- } elsif ($licensetext =~ /Redistributions of source code must retain the above copyright notice/i) {
- $license = "BSD (2 clause) $license";
- } else {
- $license = "BSD $license";
- }
- }
-
- if ($licensetext =~ /Mozilla Public License Version ([^ ]+)/) {
- $license = "MPL (v$1) $license";
- }
-
- if ($licensetext =~ /Released under the terms of the Artistic License ([^ ]+)/) {
- $license = "Artistic (v$1) $license";
- }
-
- if ($licensetext =~ /is free software under the Artistic [Ll]icense/) {
- $license = "Artistic $license";
- }
-
- if ($licensetext =~ /This program is free software; you can redistribute it and\/or modify it under the same terms as Perl itself/) {
- $license = "Perl $license";
- }
-
- if ($licensetext =~ /under the Apache License, Version ([^ ]+)/) {
- $license = "Apache (v$1) $license";
- }
-
- if ($licensetext =~ /(THE BEER-WARE LICENSE)/i) {
- $license = "Beerware $license";
- }
-
- if ($licensetext =~ /This source file is subject to version ([^ ]+) of the PHP license/) {
- $license = "PHP (v$1) $license";
- }
-
- if ($licensetext =~ /under the terms of the CeCILL /) {
- $license = "CeCILL $license";
- }
-
- if ($licensetext =~ /under the terms of the CeCILL-([^ ]+) /) {
- $license = "CeCILL-$1 $license";
- }
-
- if ($licensetext =~ /under the SGI Free Software License B/) {
- $license = "SGI Free Software License B $license";
- }
-
- if ($licensetext =~ /is in the public domain/i) {
- $license = "Public domain $license";
- }
-
- if ($licensetext =~ /terms of the Common Development and Distribution License(, Version ([^(]+))? \(the License\)/) {
- $license = "CDDL " . ($1 ? "(v$2) " : '') . $license;
- }
-
- if ($licensetext =~ /Microsoft Permissive License \(Ms-PL\)/) {
- $license = "Ms-PL $license";
- }
-
- if ($licensetext =~ /Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license \(the \"Software\"\)/ or
- $licensetext =~ /Boost Software License([ ,-]+Version ([^ ]+)?(\.))/i) {
- $license = "BSL " . ($1 ? "(v$2) " : '') . $license;
- }
-
- if ($licensetext =~ /PYTHON SOFTWARE FOUNDATION LICENSE (VERSION ([^ ]+))/i) {
- $license = "PSF " . ($1 ? "(v$2) " : '') . $license;
- }
-
- if ($licensetext =~ /The origin of this software must not be misrepresented.*Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ or
- $licensetext =~ /see copyright notice in zlib\.h/) {
- $license = "zlib/libpng $license";
- } elsif ($licensetext =~ /This code is released under the libpng license/) {
- $license = "libpng $license";
- }
-
- if ($licensetext =~ /Do What The Fuck You Want To Public License, Version ([^, ]+)/i) {
- $license = "WTFPL (v$1) $license";
- }
-
- if ($licensetext =~ /Do what The Fuck You Want To Public License/i) {
- $license = "WTFPL $license";
- }
-
- if ($licensetext =~ /(License WTFPL|Under (the|a) WTFPL)/i) {
- $license = "WTFPL $license";
- }
-
- $license = "UNKNOWN" if (!length($license));
-
- # Remove trailing spaces.
- $license =~ s/\s+$//;
-
- return $license;
-}
-
-sub fatal($) {
- my ($pack,$file,$line);
- ($pack,$file,$line) = caller();
- (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d;
- $msg =~ s/\n\n$/\n/;
- die $msg;
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/BUILDING.md b/chromium/third_party/catapult/tracing/third_party/gl-matrix/BUILDING.md
deleted file mode 100644
index 9170ab3d5b1..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/BUILDING.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Building for the browser
-========================
-
-
-To build `gl-matrix.js` and `gl-matrix-min.js` for use in the browser run the following command:
-
- webpack && webpack --config webpack.config.min.js \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/LICENSE.md b/chromium/third_party/catapult/tracing/third_party/gl-matrix/LICENSE.md
deleted file mode 100644
index 79698edab2c..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/LICENSE.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/README.chromium b/chromium/third_party/catapult/tracing/third_party/gl-matrix/README.chromium
deleted file mode 100644
index 4e5c3d49ea1..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/README.chromium
+++ /dev/null
@@ -1,15 +0,0 @@
-Name: gl-matrix
-Short Name: gl-matrix
-URL: https://github.com/toji/gl-matrix
-Version: 0
-Revision: 8fc4869031e4ab1daf771e5206c2578e044cf495
-Date: Tue Feb 12 14:21:14 2013 -0800
-License: BSD
-License File: NOT_SHIPPED
-Security Critical: no
-
-Description:
-Matrix math in javascript
-
-Local Modifications:
-None.
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/README.md b/chromium/third_party/catapult/tracing/third_party/gl-matrix/README.md
deleted file mode 100644
index ad66cb07f84..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-glMatrix
-=======================
-
-Javascript has evolved into a language capable of handling realtime 3D graphics,
-via WebGL, and computationally intensive tasks such as physics simulations.
-These types of applications demand high performance vector and matrix math,
-which is something that Javascript doesn't provide by default.
-glMatrix to the rescue!
-
-glMatrix is designed to perform vector and matrix operations stupidly fast! By
-hand-tuning each function for maximum performance and encouraging efficient
-usage patterns through API conventions, glMatrix will help you get the most out
-of your browsers Javascript engine.
-
-Learn More
-----------------------
-For documentation, news, tutorials, and more visit the [glMatrix Homepage](http://glmatrix.net/)
-
-Contributing
-----------------------
-Contributions are welcome! Please make pull requests agains the `dev` branch,
-and please provide unit tests for new functionality. (See TESTING.md for details)
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/TESTING.md b/chromium/third_party/catapult/tracing/third_party/gl-matrix/TESTING.md
deleted file mode 100644
index affd5b27b41..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/TESTING.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Running the test suite
-=======================
-
-
-The unit tests are built upon the following tools:
-
-* Jasmine -- the underlying test suite which executes the test and reports feedback
-* node.js -- used for testing at the command line, via the `jasmine-node` package
-
-To run the unit tests use `jasmine-node`:
-
- jasmine-node spec \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/VERSION b/chromium/third_party/catapult/tracing/third_party/gl-matrix/VERSION
deleted file mode 100644
index cc6612c36e0..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-2.3.0 \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/bower.json b/chromium/third_party/catapult/tracing/third_party/gl-matrix/bower.json
deleted file mode 100644
index 7e52c486673..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/bower.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "gl-matrix",
- "homepage": "http://glmatrix.net",
- "authors": [
- "Brandon Jones <tojiro@gmail.com>",
- "Colin MacKenzie IV <sinisterchipmunk@gmail.com>"
- ],
- "description": "Javascript Matrix and Vector library for High Performance WebGL apps",
- "main": "dist/gl-matrix-min.js",
- "ignore": [
- "**/.*",
- "jsdoc-template",
- "spec",
- "src",
- "tasks",
- "Gemfile",
- "Gemfile.lock",
- "Rakefile",
- "TESTING.md"
- ],
- "keywords": [
- "webGL",
- "matrix",
- "vector"
- ],
- "license": "MIT"
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix-min.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix-min.js
deleted file mode 100644
index 62db82edfd9..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix-min.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @fileoverview gl-matrix - High performance matrix and vector operations
- * @author Brandon Jones
- * @author Colin MacKenzie IV
- * @version 2.3.1
- */
-
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define(n);else{var r=n();for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(this,function(){return function(t){function n(a){if(r[a])return r[a].exports;var e=r[a]={exports:{},id:a,loaded:!1};return t[a].call(e.exports,e,e.exports,n),e.loaded=!0,e.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){n.glMatrix=r(1),n.mat2=r(2),n.mat2d=r(3),n.mat3=r(4),n.mat4=r(5),n.quat=r(6),n.vec2=r(9),n.vec3=r(7),n.vec4=r(8)},function(t,n,r){var a={};a.EPSILON=1e-6,a.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,a.RANDOM=Math.random,a.setMatrixArrayType=function(t){GLMAT_ARRAY_TYPE=t};var e=Math.PI/180;a.toRadian=function(t){return t*e},t.exports=a},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},e.clone=function(t){var n=new a.ARRAY_TYPE(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1];t[1]=n[2],t[2]=r}else t[0]=n[0],t[1]=n[2],t[2]=n[1],t[3]=n[3];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*u-e*a;return o?(o=1/o,t[0]=u*o,t[1]=-a*o,t[2]=-e*o,t[3]=r*o,t):null},e.adjoint=function(t,n){var r=n[0];return t[0]=n[3],t[1]=-n[1],t[2]=-n[2],t[3]=r,t},e.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1],f=r[2],s=r[3];return t[0]=a*i+u*c,t[1]=e*i+o*c,t[2]=a*f+u*s,t[3]=e*f+o*s,t},e.mul=e.multiply,e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+u*i,t[1]=e*c+o*i,t[2]=a*-i+u*c,t[3]=e*-i+o*c,t},e.scale=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1];return t[0]=a*i,t[1]=e*i,t[2]=u*c,t[3]=o*c,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=-r,t[3]=a,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t},e.str=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},e.LDU=function(t,n,r,a){return t[2]=a[2]/a[0],r[0]=a[0],r[1]=a[1],r[3]=a[3]-t[2]*r[1],[t,n,r]},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(6);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=r*u-a*e;return c?(c=1/c,t[0]=u*c,t[1]=-a*c,t[2]=-e*c,t[3]=r*c,t[4]=(e*i-u*o)*c,t[5]=(a*o-r*i)*c,t):null},e.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1],h=r[2],M=r[3],l=r[4],v=r[5];return t[0]=a*f+u*s,t[1]=e*f+o*s,t[2]=a*h+u*M,t[3]=e*h+o*M,t[4]=a*l+u*v+i,t[5]=e*l+o*v+c,t},e.mul=e.multiply,e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=Math.sin(r),s=Math.cos(r);return t[0]=a*s+u*f,t[1]=e*s+o*f,t[2]=a*-f+u*s,t[3]=e*-f+o*s,t[4]=i,t[5]=c,t},e.scale=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1];return t[0]=a*f,t[1]=e*f,t[2]=u*s,t[3]=o*s,t[4]=i,t[5]=c,t},e.translate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=r[0],s=r[1];return t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=a*f+u*s+i,t[5]=e*f+o*s+c,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=-r,t[3]=a,t[4]=0,t[5]=0,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=n[1],t[4]=0,t[5]=0,t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=n[0],t[5]=n[1],t},e.str=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat4=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t},e.clone=function(t){var n=new a.ARRAY_TYPE(9);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1],a=n[2],e=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=a,t[7]=e}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=s*o-i*f,M=-s*u+i*c,l=f*u-o*c,v=r*h+a*M+e*l;return v?(v=1/v,t[0]=h*v,t[1]=(-s*a+e*f)*v,t[2]=(i*a-e*o)*v,t[3]=M*v,t[4]=(s*r-e*c)*v,t[5]=(-i*r+e*u)*v,t[6]=l*v,t[7]=(-f*r+a*c)*v,t[8]=(o*r-a*u)*v,t):null},e.adjoint=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8];return t[0]=o*s-i*f,t[1]=e*f-a*s,t[2]=a*i-e*o,t[3]=i*c-u*s,t[4]=r*s-e*c,t[5]=e*u-r*i,t[6]=u*f-o*c,t[7]=a*c-r*f,t[8]=r*o-a*u,t},e.determinant=function(t){var n=t[0],r=t[1],a=t[2],e=t[3],u=t[4],o=t[5],i=t[6],c=t[7],f=t[8];return n*(f*u-o*c)+r*(-f*e+o*i)+a*(c*e-u*i)},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=r[0],l=r[1],v=r[2],m=r[3],p=r[4],d=r[5],A=r[6],R=r[7],w=r[8];return t[0]=M*a+l*o+v*f,t[1]=M*e+l*i+v*s,t[2]=M*u+l*c+v*h,t[3]=m*a+p*o+d*f,t[4]=m*e+p*i+d*s,t[5]=m*u+p*c+d*h,t[6]=A*a+R*o+w*f,t[7]=A*e+R*i+w*s,t[8]=A*u+R*c+w*h,t},e.mul=e.multiply,e.translate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=r[0],l=r[1];return t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=i,t[5]=c,t[6]=M*a+l*o+f,t[7]=M*e+l*i+s,t[8]=M*u+l*c+h,t},e.rotate=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=Math.sin(r),l=Math.cos(r);return t[0]=l*a+M*o,t[1]=l*e+M*i,t[2]=l*u+M*c,t[3]=l*o-M*a,t[4]=l*i-M*e,t[5]=l*c-M*u,t[6]=f,t[7]=s,t[8]=h,t},e.scale=function(t,n,r){var a=r[0],e=r[1];return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=e*n[3],t[4]=e*n[4],t[5]=e*n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},e.fromRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=0,t[3]=-r,t[4]=a,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},e.fromQuat=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r+r,i=a+a,c=e+e,f=r*o,s=a*o,h=a*i,M=e*o,l=e*i,v=e*c,m=u*o,p=u*i,d=u*c;return t[0]=1-h-v,t[3]=s-d,t[6]=M+p,t[1]=s+d,t[4]=1-f-v,t[7]=l-m,t[2]=M-p,t[5]=l+m,t[8]=1-f-h,t},e.normalFromMat4=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15],A=r*i-a*o,R=r*c-e*o,w=r*f-u*o,q=a*c-e*i,Y=a*f-u*i,g=e*f-u*c,y=s*m-h*v,x=s*p-M*v,P=s*d-l*v,E=h*p-M*m,T=h*d-l*m,b=M*d-l*p,D=A*b-R*T+w*E+q*P-Y*x+g*y;return D?(D=1/D,t[0]=(i*b-c*T+f*E)*D,t[1]=(c*P-o*b-f*x)*D,t[2]=(o*T-i*P+f*y)*D,t[3]=(e*T-a*b-u*E)*D,t[4]=(r*b-e*P+u*x)*D,t[5]=(a*P-r*T-u*y)*D,t[6]=(m*g-p*Y+d*q)*D,t[7]=(p*w-v*g-d*R)*D,t[8]=(v*Y-m*w+d*A)*D,t):null},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.clone=function(t){var n=new a.ARRAY_TYPE(16);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.transpose=function(t,n){if(t===n){var r=n[1],a=n[2],e=n[3],u=n[6],o=n[7],i=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=r,t[6]=n[9],t[7]=n[13],t[8]=a,t[9]=u,t[11]=n[14],t[12]=e,t[13]=o,t[14]=i}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t},e.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15],A=r*i-a*o,R=r*c-e*o,w=r*f-u*o,q=a*c-e*i,Y=a*f-u*i,g=e*f-u*c,y=s*m-h*v,x=s*p-M*v,P=s*d-l*v,E=h*p-M*m,T=h*d-l*m,b=M*d-l*p,D=A*b-R*T+w*E+q*P-Y*x+g*y;return D?(D=1/D,t[0]=(i*b-c*T+f*E)*D,t[1]=(e*T-a*b-u*E)*D,t[2]=(m*g-p*Y+d*q)*D,t[3]=(M*Y-h*g-l*q)*D,t[4]=(c*P-o*b-f*x)*D,t[5]=(r*b-e*P+u*x)*D,t[6]=(p*w-v*g-d*R)*D,t[7]=(s*g-M*w+l*R)*D,t[8]=(o*T-i*P+f*y)*D,t[9]=(a*P-r*T-u*y)*D,t[10]=(v*Y-m*w+d*A)*D,t[11]=(h*w-s*Y-l*A)*D,t[12]=(i*x-o*E-c*y)*D,t[13]=(r*E-a*x+e*y)*D,t[14]=(m*R-v*q-p*A)*D,t[15]=(s*q-h*R+M*A)*D,t):null},e.adjoint=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=n[4],i=n[5],c=n[6],f=n[7],s=n[8],h=n[9],M=n[10],l=n[11],v=n[12],m=n[13],p=n[14],d=n[15];return t[0]=i*(M*d-l*p)-h*(c*d-f*p)+m*(c*l-f*M),t[1]=-(a*(M*d-l*p)-h*(e*d-u*p)+m*(e*l-u*M)),t[2]=a*(c*d-f*p)-i*(e*d-u*p)+m*(e*f-u*c),t[3]=-(a*(c*l-f*M)-i*(e*l-u*M)+h*(e*f-u*c)),t[4]=-(o*(M*d-l*p)-s*(c*d-f*p)+v*(c*l-f*M)),t[5]=r*(M*d-l*p)-s*(e*d-u*p)+v*(e*l-u*M),t[6]=-(r*(c*d-f*p)-o*(e*d-u*p)+v*(e*f-u*c)),t[7]=r*(c*l-f*M)-o*(e*l-u*M)+s*(e*f-u*c),t[8]=o*(h*d-l*m)-s*(i*d-f*m)+v*(i*l-f*h),t[9]=-(r*(h*d-l*m)-s*(a*d-u*m)+v*(a*l-u*h)),t[10]=r*(i*d-f*m)-o*(a*d-u*m)+v*(a*f-u*i),t[11]=-(r*(i*l-f*h)-o*(a*l-u*h)+s*(a*f-u*i)),t[12]=-(o*(h*p-M*m)-s*(i*p-c*m)+v*(i*M-c*h)),t[13]=r*(h*p-M*m)-s*(a*p-e*m)+v*(a*M-e*h),t[14]=-(r*(i*p-c*m)-o*(a*p-e*m)+v*(a*c-e*i)),t[15]=r*(i*M-c*h)-o*(a*M-e*h)+s*(a*c-e*i),t},e.determinant=function(t){var n=t[0],r=t[1],a=t[2],e=t[3],u=t[4],o=t[5],i=t[6],c=t[7],f=t[8],s=t[9],h=t[10],M=t[11],l=t[12],v=t[13],m=t[14],p=t[15],d=n*o-r*u,A=n*i-a*u,R=n*c-e*u,w=r*i-a*o,q=r*c-e*o,Y=a*c-e*i,g=f*v-s*l,y=f*m-h*l,x=f*p-M*l,P=s*m-h*v,E=s*p-M*v,T=h*p-M*m;return d*T-A*E+R*P+w*x-q*y+Y*g},e.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=n[9],l=n[10],v=n[11],m=n[12],p=n[13],d=n[14],A=n[15],R=r[0],w=r[1],q=r[2],Y=r[3];return t[0]=R*a+w*i+q*h+Y*m,t[1]=R*e+w*c+q*M+Y*p,t[2]=R*u+w*f+q*l+Y*d,t[3]=R*o+w*s+q*v+Y*A,R=r[4],w=r[5],q=r[6],Y=r[7],t[4]=R*a+w*i+q*h+Y*m,t[5]=R*e+w*c+q*M+Y*p,t[6]=R*u+w*f+q*l+Y*d,t[7]=R*o+w*s+q*v+Y*A,R=r[8],w=r[9],q=r[10],Y=r[11],t[8]=R*a+w*i+q*h+Y*m,t[9]=R*e+w*c+q*M+Y*p,t[10]=R*u+w*f+q*l+Y*d,t[11]=R*o+w*s+q*v+Y*A,R=r[12],w=r[13],q=r[14],Y=r[15],t[12]=R*a+w*i+q*h+Y*m,t[13]=R*e+w*c+q*M+Y*p,t[14]=R*u+w*f+q*l+Y*d,t[15]=R*o+w*s+q*v+Y*A,t},e.mul=e.multiply,e.translate=function(t,n,r){var a,e,u,o,i,c,f,s,h,M,l,v,m=r[0],p=r[1],d=r[2];return n===t?(t[12]=n[0]*m+n[4]*p+n[8]*d+n[12],t[13]=n[1]*m+n[5]*p+n[9]*d+n[13],t[14]=n[2]*m+n[6]*p+n[10]*d+n[14],t[15]=n[3]*m+n[7]*p+n[11]*d+n[15]):(a=n[0],e=n[1],u=n[2],o=n[3],i=n[4],c=n[5],f=n[6],s=n[7],h=n[8],M=n[9],l=n[10],v=n[11],t[0]=a,t[1]=e,t[2]=u,t[3]=o,t[4]=i,t[5]=c,t[6]=f,t[7]=s,t[8]=h,t[9]=M,t[10]=l,t[11]=v,t[12]=a*m+i*p+h*d+n[12],t[13]=e*m+c*p+M*d+n[13],t[14]=u*m+f*p+l*d+n[14],t[15]=o*m+s*p+v*d+n[15]),t},e.scale=function(t,n,r){var a=r[0],e=r[1],u=r[2];return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=n[3]*a,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*u,t[9]=n[9]*u,t[10]=n[10]*u,t[11]=n[11]*u,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},e.rotate=function(t,n,r,e){var u,o,i,c,f,s,h,M,l,v,m,p,d,A,R,w,q,Y,g,y,x,P,E,T,b=e[0],D=e[1],L=e[2],_=Math.sqrt(b*b+D*D+L*L);return Math.abs(_)<a.EPSILON?null:(_=1/_,b*=_,D*=_,L*=_,u=Math.sin(r),o=Math.cos(r),i=1-o,c=n[0],f=n[1],s=n[2],h=n[3],M=n[4],l=n[5],v=n[6],m=n[7],p=n[8],d=n[9],A=n[10],R=n[11],w=b*b*i+o,q=D*b*i+L*u,Y=L*b*i-D*u,g=b*D*i-L*u,y=D*D*i+o,x=L*D*i+b*u,P=b*L*i+D*u,E=D*L*i-b*u,T=L*L*i+o,t[0]=c*w+M*q+p*Y,t[1]=f*w+l*q+d*Y,t[2]=s*w+v*q+A*Y,t[3]=h*w+m*q+R*Y,t[4]=c*g+M*y+p*x,t[5]=f*g+l*y+d*x,t[6]=s*g+v*y+A*x,t[7]=h*g+m*y+R*x,t[8]=c*P+M*E+p*T,t[9]=f*P+l*E+d*T,t[10]=s*P+v*E+A*T,t[11]=h*P+m*E+R*T,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)},e.rotateX=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[4],o=n[5],i=n[6],c=n[7],f=n[8],s=n[9],h=n[10],M=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=u*e+f*a,t[5]=o*e+s*a,t[6]=i*e+h*a,t[7]=c*e+M*a,t[8]=f*e-u*a,t[9]=s*e-o*a,t[10]=h*e-i*a,t[11]=M*e-c*a,t},e.rotateY=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[0],o=n[1],i=n[2],c=n[3],f=n[8],s=n[9],h=n[10],M=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=u*e-f*a,t[1]=o*e-s*a,t[2]=i*e-h*a,t[3]=c*e-M*a,t[8]=u*a+f*e,t[9]=o*a+s*e,t[10]=i*a+h*e,t[11]=c*a+M*e,t},e.rotateZ=function(t,n,r){var a=Math.sin(r),e=Math.cos(r),u=n[0],o=n[1],i=n[2],c=n[3],f=n[4],s=n[5],h=n[6],M=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=u*e+f*a,t[1]=o*e+s*a,t[2]=i*e+h*a,t[3]=c*e+M*a,t[4]=f*e-u*a,t[5]=s*e-o*a,t[6]=h*e-i*a,t[7]=M*e-c*a,t},e.fromTranslation=function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},e.fromScaling=function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotation=function(t,n,r){var e,u,o,i=r[0],c=r[1],f=r[2],s=Math.sqrt(i*i+c*c+f*f);return Math.abs(s)<a.EPSILON?null:(s=1/s,i*=s,c*=s,f*=s,e=Math.sin(n),u=Math.cos(n),o=1-u,t[0]=i*i*o+u,t[1]=c*i*o+f*e,t[2]=f*i*o-c*e,t[3]=0,t[4]=i*c*o-f*e,t[5]=c*c*o+u,t[6]=f*c*o+i*e,t[7]=0,t[8]=i*f*o+c*e,t[9]=c*f*o-i*e,t[10]=f*f*o+u,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},e.fromXRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromYRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromZRotation=function(t,n){var r=Math.sin(n),a=Math.cos(n);return t[0]=a,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotationTranslation=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=a+a,c=e+e,f=u+u,s=a*i,h=a*c,M=a*f,l=e*c,v=e*f,m=u*f,p=o*i,d=o*c,A=o*f;return t[0]=1-(l+m),t[1]=h+A,t[2]=M-d,t[3]=0,t[4]=h-A,t[5]=1-(s+m),t[6]=v+p,t[7]=0,t[8]=M+d,t[9]=v-p,t[10]=1-(s+l),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScale=function(t,n,r,a){var e=n[0],u=n[1],o=n[2],i=n[3],c=e+e,f=u+u,s=o+o,h=e*c,M=e*f,l=e*s,v=u*f,m=u*s,p=o*s,d=i*c,A=i*f,R=i*s,w=a[0],q=a[1],Y=a[2];return t[0]=(1-(v+p))*w,t[1]=(M+R)*w,t[2]=(l-A)*w,t[3]=0,t[4]=(M-R)*q,t[5]=(1-(h+p))*q,t[6]=(m+d)*q,t[7]=0,t[8]=(l+A)*Y,t[9]=(m-d)*Y,t[10]=(1-(h+v))*Y,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScaleOrigin=function(t,n,r,a,e){var u=n[0],o=n[1],i=n[2],c=n[3],f=u+u,s=o+o,h=i+i,M=u*f,l=u*s,v=u*h,m=o*s,p=o*h,d=i*h,A=c*f,R=c*s,w=c*h,q=a[0],Y=a[1],g=a[2],y=e[0],x=e[1],P=e[2];return t[0]=(1-(m+d))*q,t[1]=(l+w)*q,t[2]=(v-R)*q,t[3]=0,t[4]=(l-w)*Y,t[5]=(1-(M+d))*Y,t[6]=(p+A)*Y,t[7]=0,t[8]=(v+R)*g,t[9]=(p-A)*g,t[10]=(1-(M+m))*g,t[11]=0,t[12]=r[0]+y-(t[0]*y+t[4]*x+t[8]*P),t[13]=r[1]+x-(t[1]*y+t[5]*x+t[9]*P),t[14]=r[2]+P-(t[2]*y+t[6]*x+t[10]*P),t[15]=1,t},e.fromQuat=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r+r,i=a+a,c=e+e,f=r*o,s=a*o,h=a*i,M=e*o,l=e*i,v=e*c,m=u*o,p=u*i,d=u*c;return t[0]=1-h-v,t[1]=s+d,t[2]=M-p,t[3]=0,t[4]=s-d,t[5]=1-f-v,t[6]=l+m,t[7]=0,t[8]=M+p,t[9]=l-m,t[10]=1-f-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,n,r,a,e,u,o){var i=1/(r-n),c=1/(e-a),f=1/(u-o);return t[0]=2*u*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*u*c,t[6]=0,t[7]=0,t[8]=(r+n)*i,t[9]=(e+a)*c,t[10]=(o+u)*f,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*u*2*f,t[15]=0,t},e.perspective=function(t,n,r,a,e){var u=1/Math.tan(n/2),o=1/(a-e);return t[0]=u/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(e+a)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*e*a*o,t[15]=0,t},e.perspectiveFromFieldOfView=function(t,n,r,a){var e=Math.tan(n.upDegrees*Math.PI/180),u=Math.tan(n.downDegrees*Math.PI/180),o=Math.tan(n.leftDegrees*Math.PI/180),i=Math.tan(n.rightDegrees*Math.PI/180),c=2/(o+i),f=2/(e+u);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=f,t[6]=0,t[7]=0,t[8]=-((o-i)*c*.5),t[9]=(e-u)*f*.5,t[10]=a/(r-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*r/(r-a),t[15]=0,t},e.ortho=function(t,n,r,a,e,u,o){var i=1/(n-r),c=1/(a-e),f=1/(u-o);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*f,t[11]=0,t[12]=(n+r)*i,t[13]=(e+a)*c,t[14]=(o+u)*f,t[15]=1,t},e.lookAt=function(t,n,r,u){var o,i,c,f,s,h,M,l,v,m,p=n[0],d=n[1],A=n[2],R=u[0],w=u[1],q=u[2],Y=r[0],g=r[1],y=r[2];return Math.abs(p-Y)<a.EPSILON&&Math.abs(d-g)<a.EPSILON&&Math.abs(A-y)<a.EPSILON?e.identity(t):(M=p-Y,l=d-g,v=A-y,m=1/Math.sqrt(M*M+l*l+v*v),M*=m,l*=m,v*=m,o=w*v-q*l,i=q*M-R*v,c=R*l-w*M,m=Math.sqrt(o*o+i*i+c*c),m?(m=1/m,o*=m,i*=m,c*=m):(o=0,i=0,c=0),f=l*c-v*i,s=v*o-M*c,h=M*i-l*o,m=Math.sqrt(f*f+s*s+h*h),m?(m=1/m,f*=m,s*=m,h*=m):(f=0,s=0,h=0),t[0]=o,t[1]=f,t[2]=M,t[3]=0,t[4]=i,t[5]=s,t[6]=l,t[7]=0,t[8]=c,t[9]=h,t[10]=v,t[11]=0,t[12]=-(o*p+i*d+c*A),t[13]=-(f*p+s*d+h*A),t[14]=-(M*p+l*d+v*A),t[15]=1,t)},e.str=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},t.exports=e},function(t,n,r){var a=r(1),e=r(4),u=r(7),o=r(8),i={};i.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},i.rotationTo=function(){var t=u.create(),n=u.fromValues(1,0,0),r=u.fromValues(0,1,0);return function(a,e,o){var c=u.dot(e,o);return-.999999>c?(u.cross(t,n,e),u.length(t)<1e-6&&u.cross(t,r,e),u.normalize(t,t),i.setAxisAngle(a,t,Math.PI),a):c>.999999?(a[0]=0,a[1]=0,a[2]=0,a[3]=1,a):(u.cross(t,e,o),a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=1+c,i.normalize(a,a))}}(),i.setAxes=function(){var t=e.create();return function(n,r,a,e){return t[0]=a[0],t[3]=a[1],t[6]=a[2],t[1]=e[0],t[4]=e[1],t[7]=e[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],i.normalize(n,i.fromMat3(n,t))}}(),i.clone=o.clone,i.fromValues=o.fromValues,i.copy=o.copy,i.set=o.set,i.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},i.setAxisAngle=function(t,n,r){r=.5*r;var a=Math.sin(r);return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=Math.cos(r),t},i.add=o.add,i.multiply=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3],i=r[0],c=r[1],f=r[2],s=r[3];return t[0]=a*s+o*i+e*f-u*c,t[1]=e*s+o*c+u*i-a*f,t[2]=u*s+o*f+a*c-e*i,t[3]=o*s-a*i-e*c-u*f,t},i.mul=i.multiply,i.scale=o.scale,i.rotateX=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+o*i,t[1]=e*c+u*i,t[2]=u*c-e*i,t[3]=o*c-a*i,t},i.rotateY=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c-u*i,t[1]=e*c+o*i,t[2]=u*c+a*i,t[3]=o*c-e*i,t},i.rotateZ=function(t,n,r){r*=.5;var a=n[0],e=n[1],u=n[2],o=n[3],i=Math.sin(r),c=Math.cos(r);return t[0]=a*c+e*i,t[1]=e*c-a*i,t[2]=u*c+o*i,t[3]=o*c-u*i,t},i.calculateW=function(t,n){var r=n[0],a=n[1],e=n[2];return t[0]=r,t[1]=a,t[2]=e,t[3]=Math.sqrt(Math.abs(1-r*r-a*a-e*e)),t},i.dot=o.dot,i.lerp=o.lerp,i.slerp=function(t,n,r,a){var e,u,o,i,c,f=n[0],s=n[1],h=n[2],M=n[3],l=r[0],v=r[1],m=r[2],p=r[3];return u=f*l+s*v+h*m+M*p,0>u&&(u=-u,l=-l,v=-v,m=-m,p=-p),1-u>1e-6?(e=Math.acos(u),o=Math.sin(e),i=Math.sin((1-a)*e)/o,c=Math.sin(a*e)/o):(i=1-a,c=a),t[0]=i*f+c*l,t[1]=i*s+c*v,t[2]=i*h+c*m,t[3]=i*M+c*p,t},i.sqlerp=function(){var t=i.create(),n=i.create();return function(r,a,e,u,o,c){return i.slerp(t,a,o,c),i.slerp(n,e,u,c),i.slerp(r,t,n,2*c*(1-c)),r}}(),i.invert=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*r+a*a+e*e+u*u,i=o?1/o:0;return t[0]=-r*i,t[1]=-a*i,t[2]=-e*i,t[3]=u*i,t},i.conjugate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t},i.length=o.length,i.len=i.length,i.squaredLength=o.squaredLength,i.sqrLen=i.squaredLength,i.normalize=o.normalize,i.fromMat3=function(t,n){var r,a=n[0]+n[4]+n[8];if(a>0)r=Math.sqrt(a+1),t[3]=.5*r,r=.5/r,t[0]=(n[5]-n[7])*r,t[1]=(n[6]-n[2])*r,t[2]=(n[1]-n[3])*r;else{var e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);var u=(e+1)%3,o=(e+2)%3;r=Math.sqrt(n[3*e+e]-n[3*u+u]-n[3*o+o]+1),t[e]=.5*r,r=.5/r,t[3]=(n[3*u+o]-n[3*o+u])*r,t[u]=(n[3*u+e]+n[3*e+u])*r,t[o]=(n[3*o+e]+n[3*e+o])*r}return t},i.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=i},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(3);return t[0]=0,t[1]=0,t[2]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n},e.fromValues=function(t,n,r){var e=new a.ARRAY_TYPE(3);return e[0]=t,e[1]=n,e[2]=r,e},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},e.set=function(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2];return Math.sqrt(r*r+a*a+e*e)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2];return r*r+a*a+e*e},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=n[2],u=r*r+a*a+e*e;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]},e.cross=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2];return t[0]=e*c-u*i,t[1]=u*o-a*c,t[2]=a*i-e*o,t},e.lerp=function(t,n,r,a){var e=n[0],u=n[1],o=n[2];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t[2]=o+a*(r[2]-o),t},e.hermite=function(t,n,r,a,e,u){var o=u*u,i=o*(2*u-3)+1,c=o*(u-2)+u,f=o*(u-1),s=o*(3-2*u);return t[0]=n[0]*i+r[0]*c+a[0]*f+e[0]*s,t[1]=n[1]*i+r[1]*c+a[1]*f+e[1]*s,t[2]=n[2]*i+r[2]*c+a[2]*f+e[2]*s,t},e.bezier=function(t,n,r,a,e,u){var o=1-u,i=o*o,c=u*u,f=i*o,s=3*u*i,h=3*c*o,M=c*u;return t[0]=n[0]*f+r[0]*s+a[0]*h+e[0]*M,t[1]=n[1]*f+r[1]*s+a[1]*h+e[1]*M,t[2]=n[2]*f+r[2]*s+a[2]*h+e[2]*M,t},e.random=function(t,n){n=n||1;var r=2*a.RANDOM()*Math.PI,e=2*a.RANDOM()-1,u=Math.sqrt(1-e*e)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=e*n,t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[3]*a+r[7]*e+r[11]*u+r[15];return o=o||1,t[0]=(r[0]*a+r[4]*e+r[8]*u+r[12])/o,t[1]=(r[1]*a+r[5]*e+r[9]*u+r[13])/o,t[2]=(r[2]*a+r[6]*e+r[10]*u+r[14])/o,t},e.transformMat3=function(t,n,r){var a=n[0],e=n[1],u=n[2];return t[0]=a*r[0]+e*r[3]+u*r[6],t[1]=a*r[1]+e*r[4]+u*r[7],t[2]=a*r[2]+e*r[5]+u*r[8],t},e.transformQuat=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2],f=r[3],s=f*a+i*u-c*e,h=f*e+c*a-o*u,M=f*u+o*e-i*a,l=-o*a-i*e-c*u;return t[0]=s*f+l*-o+h*-c-M*-i,t[1]=h*f+l*-i+M*-o-s*-c,t[2]=M*f+l*-c+s*-i-h*-o,t},e.rotateX=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[0],u[1]=e[1]*Math.cos(a)-e[2]*Math.sin(a),u[2]=e[1]*Math.sin(a)+e[2]*Math.cos(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.rotateY=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[2]*Math.sin(a)+e[0]*Math.cos(a),u[1]=e[1],u[2]=e[2]*Math.cos(a)-e[0]*Math.sin(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.rotateZ=function(t,n,r,a){var e=[],u=[];return e[0]=n[0]-r[0],e[1]=n[1]-r[1],e[2]=n[2]-r[2],u[0]=e[0]*Math.cos(a)-e[1]*Math.sin(a),u[1]=e[0]*Math.sin(a)+e[1]*Math.cos(a),u[2]=e[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=3),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],t[2]=n[i+2],u(t,t,o),n[i]=t[0],n[i+1]=t[1],n[i+2]=t[2];return n}}(),e.angle=function(t,n){var r=e.fromValues(t[0],t[1],t[2]),a=e.fromValues(n[0],n[1],n[2]);e.normalize(r,r),e.normalize(a,a);var u=e.dot(r,a);return u>1?0:Math.acos(u)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n},e.fromValues=function(t,n,r,e){var u=new a.ARRAY_TYPE(4);return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t},e.set=function(t,n,r,a,e){return t[0]=n,t[1]=r,t[2]=a,t[3]=e,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2],u=n[3]-t[3];return Math.sqrt(r*r+a*a+e*e+u*u)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1],e=n[2]-t[2],u=n[3]-t[3];return r*r+a*a+e*e+u*u},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1],a=t[2],e=t[3];return Math.sqrt(n*n+r*r+a*a+e*e)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1],a=t[2],e=t[3];return n*n+r*r+a*a+e*e},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=n[2],u=n[3],o=r*r+a*a+e*e+u*u;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=a*o,t[2]=e*o,t[3]=u*o),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]},e.lerp=function(t,n,r,a){var e=n[0],u=n[1],o=n[2],i=n[3];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t[2]=o+a*(r[2]-o),t[3]=i+a*(r[3]-i),t},e.random=function(t,n){return n=n||1,t[0]=a.RANDOM(),t[1]=a.RANDOM(),t[2]=a.RANDOM(),t[3]=a.RANDOM(),e.normalize(t,t),e.scale(t,t,n),t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=n[3];return t[0]=r[0]*a+r[4]*e+r[8]*u+r[12]*o,t[1]=r[1]*a+r[5]*e+r[9]*u+r[13]*o,t[2]=r[2]*a+r[6]*e+r[10]*u+r[14]*o,t[3]=r[3]*a+r[7]*e+r[11]*u+r[15]*o,t},e.transformQuat=function(t,n,r){var a=n[0],e=n[1],u=n[2],o=r[0],i=r[1],c=r[2],f=r[3],s=f*a+i*u-c*e,h=f*e+c*a-o*u,M=f*u+o*e-i*a,l=-o*a-i*e-c*u;return t[0]=s*f+l*-o+h*-c-M*-i,t[1]=h*f+l*-i+M*-o-s*-c,t[2]=M*f+l*-c+s*-i-h*-o,t[3]=n[3],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=4),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],t[2]=n[i+2],t[3]=n[i+3],u(t,t,o),n[i]=t[0],n[i+1]=t[1],n[i+2]=t[2],n[i+3]=t[3];return n}}(),e.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},t.exports=e},function(t,n,r){var a=r(1),e={};e.create=function(){var t=new a.ARRAY_TYPE(2);return t[0]=0,t[1]=0,t},e.clone=function(t){var n=new a.ARRAY_TYPE(2);return n[0]=t[0],n[1]=t[1],n},e.fromValues=function(t,n){var r=new a.ARRAY_TYPE(2);return r[0]=t,r[1]=n,r},e.copy=function(t,n){return t[0]=n[0],t[1]=n[1],t},e.set=function(t,n,r){return t[0]=n,t[1]=r,t},e.add=function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t},e.subtract=function(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t},e.sub=e.subtract,e.multiply=function(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t},e.mul=e.multiply,e.divide=function(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t},e.div=e.divide,e.min=function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},e.max=function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t},e.scale=function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t},e.scaleAndAdd=function(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t},e.distance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1];return Math.sqrt(r*r+a*a)},e.dist=e.distance,e.squaredDistance=function(t,n){var r=n[0]-t[0],a=n[1]-t[1];return r*r+a*a},e.sqrDist=e.squaredDistance,e.length=function(t){var n=t[0],r=t[1];return Math.sqrt(n*n+r*r)},e.len=e.length,e.squaredLength=function(t){var n=t[0],r=t[1];return n*n+r*r},e.sqrLen=e.squaredLength,e.negate=function(t,n){return t[0]=-n[0],t[1]=-n[1],t},e.inverse=function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},e.normalize=function(t,n){var r=n[0],a=n[1],e=r*r+a*a;return e>0&&(e=1/Math.sqrt(e),t[0]=n[0]*e,t[1]=n[1]*e),t},e.dot=function(t,n){return t[0]*n[0]+t[1]*n[1]},e.cross=function(t,n,r){var a=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=a,t},e.lerp=function(t,n,r,a){var e=n[0],u=n[1];return t[0]=e+a*(r[0]-e),t[1]=u+a*(r[1]-u),t},e.random=function(t,n){n=n||1;var r=2*a.RANDOM()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},e.transformMat2=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[2]*e,t[1]=r[1]*a+r[3]*e,t},e.transformMat2d=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[2]*e+r[4],t[1]=r[1]*a+r[3]*e+r[5],t},e.transformMat3=function(t,n,r){
-var a=n[0],e=n[1];return t[0]=r[0]*a+r[3]*e+r[6],t[1]=r[1]*a+r[4]*e+r[7],t},e.transformMat4=function(t,n,r){var a=n[0],e=n[1];return t[0]=r[0]*a+r[4]*e+r[12],t[1]=r[1]*a+r[5]*e+r[13],t},e.forEach=function(){var t=e.create();return function(n,r,a,e,u,o){var i,c;for(r||(r=2),a||(a=0),c=e?Math.min(e*r+a,n.length):n.length,i=a;c>i;i+=r)t[0]=n[i],t[1]=n[i+1],u(t,t,o),n[i]=t[0],n[i+1]=t[1];return n}}(),e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},t.exports=e}])}); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix.js
deleted file mode 100644
index ab1e9b0aa58..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix.js
+++ /dev/null
@@ -1,5020 +0,0 @@
-/**
- * @fileoverview gl-matrix - High performance matrix and vector operations
- * @author Brandon Jones
- * @author Colin MacKenzie IV
- * @version 2.3.1
- */
-
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define(factory);
- else {
- var a = factory();
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
- }
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
-/******/ // Flag the module as loaded
-/******/ module.loaded = true;
-
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-
-
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
- /**
- * @fileoverview gl-matrix - High performance matrix and vector operations
- * @author Brandon Jones
- * @author Colin MacKenzie IV
- * @version 2.3.1
- */
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
- // END HEADER
-
- exports.glMatrix = __webpack_require__(1);
- exports.mat2 = __webpack_require__(2);
- exports.mat2d = __webpack_require__(3);
- exports.mat3 = __webpack_require__(4);
- exports.mat4 = __webpack_require__(5);
- exports.quat = __webpack_require__(6);
- exports.vec2 = __webpack_require__(9);
- exports.vec3 = __webpack_require__(7);
- exports.vec4 = __webpack_require__(8);
-
-/***/ },
-/* 1 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- /**
- * @class Common utilities
- * @name glMatrix
- */
- var glMatrix = {};
-
- // Constants
- glMatrix.EPSILON = 0.000001;
- glMatrix.ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;
- glMatrix.RANDOM = Math.random;
-
- /**
- * Sets the type of array used when creating new vectors and matrices
- *
- * @param {Type} type Array type, such as Float32Array or Array
- */
- glMatrix.setMatrixArrayType = function(type) {
- GLMAT_ARRAY_TYPE = type;
- }
-
- var degree = Math.PI / 180;
-
- /**
- * Convert Degree To Radian
- *
- * @param {Number} Angle in Degrees
- */
- glMatrix.toRadian = function(a){
- return a * degree;
- }
-
- module.exports = glMatrix;
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 2x2 Matrix
- * @name mat2
- */
- var mat2 = {};
-
- /**
- * Creates a new identity mat2
- *
- * @returns {mat2} a new 2x2 matrix
- */
- mat2.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
-
- /**
- * Creates a new mat2 initialized with values from an existing matrix
- *
- * @param {mat2} a matrix to clone
- * @returns {mat2} a new 2x2 matrix
- */
- mat2.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- };
-
- /**
- * Copy the values from one mat2 to another
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
- mat2.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- };
-
- /**
- * Set a mat2 to the identity matrix
- *
- * @param {mat2} out the receiving matrix
- * @returns {mat2} out
- */
- mat2.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
-
- /**
- * Transpose the values of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
- mat2.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a1 = a[1];
- out[1] = a[2];
- out[2] = a1;
- } else {
- out[0] = a[0];
- out[1] = a[2];
- out[2] = a[1];
- out[3] = a[3];
- }
-
- return out;
- };
-
- /**
- * Inverts a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
- mat2.invert = function(out, a) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
-
- // Calculate the determinant
- det = a0 * a3 - a2 * a1;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = a3 * det;
- out[1] = -a1 * det;
- out[2] = -a2 * det;
- out[3] = a0 * det;
-
- return out;
- };
-
- /**
- * Calculates the adjugate of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
- mat2.adjoint = function(out, a) {
- // Caching this value is nessecary if out == a
- var a0 = a[0];
- out[0] = a[3];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a0;
-
- return out;
- };
-
- /**
- * Calculates the determinant of a mat2
- *
- * @param {mat2} a the source matrix
- * @returns {Number} determinant of a
- */
- mat2.determinant = function (a) {
- return a[0] * a[3] - a[2] * a[1];
- };
-
- /**
- * Multiplies two mat2's
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the first operand
- * @param {mat2} b the second operand
- * @returns {mat2} out
- */
- mat2.multiply = function (out, a, b) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
- var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- return out;
- };
-
- /**
- * Alias for {@link mat2.multiply}
- * @function
- */
- mat2.mul = mat2.multiply;
-
- /**
- * Rotates a mat2 by the given angle
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
- */
- mat2.rotate = function (out, a, rad) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- return out;
- };
-
- /**
- * Scales the mat2 by the dimensions in the given vec2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the matrix to rotate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat2} out
- **/
- mat2.scale = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- v0 = v[0], v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- return out;
- };
-
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.rotate(dest, dest, rad);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
- */
- mat2.fromRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- return out;
- }
-
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.scale(dest, dest, vec);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat2} out
- */
- mat2.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- return out;
- }
-
- /**
- * Returns a string representation of a mat2
- *
- * @param {mat2} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat2.str = function (a) {
- return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
- };
-
- /**
- * Returns Frobenius norm of a mat2
- *
- * @param {mat2} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
- mat2.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))
- };
-
- /**
- * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
- * @param {mat2} L the lower triangular matrix
- * @param {mat2} D the diagonal matrix
- * @param {mat2} U the upper triangular matrix
- * @param {mat2} a the input matrix to factorize
- */
-
- mat2.LDU = function (L, D, U, a) {
- L[2] = a[2]/a[0];
- U[0] = a[0];
- U[1] = a[1];
- U[3] = a[3] - L[2] * U[1];
- return [L, D, U];
- };
-
-
- module.exports = mat2;
-
-
-/***/ },
-/* 3 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 2x3 Matrix
- * @name mat2d
- *
- * @description
- * A mat2d contains six elements defined as:
- * <pre>
- * [a, c, tx,
- * b, d, ty]
- * </pre>
- * This is a short form for the 3x3 matrix:
- * <pre>
- * [a, c, tx,
- * b, d, ty,
- * 0, 0, 1]
- * </pre>
- * The last row is ignored so the array is shorter and operations are faster.
- */
- var mat2d = {};
-
- /**
- * Creates a new identity mat2d
- *
- * @returns {mat2d} a new 2x3 matrix
- */
- mat2d.create = function() {
- var out = new glMatrix.ARRAY_TYPE(6);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
- };
-
- /**
- * Creates a new mat2d initialized with values from an existing matrix
- *
- * @param {mat2d} a matrix to clone
- * @returns {mat2d} a new 2x3 matrix
- */
- mat2d.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(6);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
- };
-
- /**
- * Copy the values from one mat2d to another
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the source matrix
- * @returns {mat2d} out
- */
- mat2d.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
- };
-
- /**
- * Set a mat2d to the identity matrix
- *
- * @param {mat2d} out the receiving matrix
- * @returns {mat2d} out
- */
- mat2d.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
- };
-
- /**
- * Inverts a mat2d
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the source matrix
- * @returns {mat2d} out
- */
- mat2d.invert = function(out, a) {
- var aa = a[0], ab = a[1], ac = a[2], ad = a[3],
- atx = a[4], aty = a[5];
-
- var det = aa * ad - ab * ac;
- if(!det){
- return null;
- }
- det = 1.0 / det;
-
- out[0] = ad * det;
- out[1] = -ab * det;
- out[2] = -ac * det;
- out[3] = aa * det;
- out[4] = (ac * aty - ad * atx) * det;
- out[5] = (ab * atx - aa * aty) * det;
- return out;
- };
-
- /**
- * Calculates the determinant of a mat2d
- *
- * @param {mat2d} a the source matrix
- * @returns {Number} determinant of a
- */
- mat2d.determinant = function (a) {
- return a[0] * a[3] - a[1] * a[2];
- };
-
- /**
- * Multiplies two mat2d's
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the first operand
- * @param {mat2d} b the second operand
- * @returns {mat2d} out
- */
- mat2d.multiply = function (out, a, b) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- out[4] = a0 * b4 + a2 * b5 + a4;
- out[5] = a1 * b4 + a3 * b5 + a5;
- return out;
- };
-
- /**
- * Alias for {@link mat2d.multiply}
- * @function
- */
- mat2d.mul = mat2d.multiply;
-
- /**
- * Rotates a mat2d by the given angle
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
- */
- mat2d.rotate = function (out, a, rad) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- out[4] = a4;
- out[5] = a5;
- return out;
- };
-
- /**
- * Scales the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to translate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat2d} out
- **/
- mat2d.scale = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- v0 = v[0], v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- out[4] = a4;
- out[5] = a5;
- return out;
- };
-
- /**
- * Translates the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to translate
- * @param {vec2} v the vec2 to translate the matrix by
- * @returns {mat2d} out
- **/
- mat2d.translate = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- v0 = v[0], v1 = v[1];
- out[0] = a0;
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = a0 * v0 + a2 * v1 + a4;
- out[5] = a1 * v0 + a3 * v1 + a5;
- return out;
- };
-
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.rotate(dest, dest, rad);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
- */
- mat2d.fromRotation = function(out, rad) {
- var s = Math.sin(rad), c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- out[4] = 0;
- out[5] = 0;
- return out;
- }
-
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.scale(dest, dest, vec);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat2d} out
- */
- mat2d.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- out[4] = 0;
- out[5] = 0;
- return out;
- }
-
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.translate(dest, dest, vec);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {vec2} v Translation vector
- * @returns {mat2d} out
- */
- mat2d.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = v[0];
- out[5] = v[1];
- return out;
- }
-
- /**
- * Returns a string representation of a mat2d
- *
- * @param {mat2d} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat2d.str = function (a) {
- return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' +
- a[3] + ', ' + a[4] + ', ' + a[5] + ')';
- };
-
- /**
- * Returns Frobenius norm of a mat2d
- *
- * @param {mat2d} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
- mat2d.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))
- };
-
- module.exports = mat2d;
-
-
-/***/ },
-/* 4 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 3x3 Matrix
- * @name mat3
- */
- var mat3 = {};
-
- /**
- * Creates a new identity mat3
- *
- * @returns {mat3} a new 3x3 matrix
- */
- mat3.create = function() {
- var out = new glMatrix.ARRAY_TYPE(9);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- };
-
- /**
- * Copies the upper-left 3x3 values into the given mat3.
- *
- * @param {mat3} out the receiving 3x3 matrix
- * @param {mat4} a the source 4x4 matrix
- * @returns {mat3} out
- */
- mat3.fromMat4 = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[4];
- out[4] = a[5];
- out[5] = a[6];
- out[6] = a[8];
- out[7] = a[9];
- out[8] = a[10];
- return out;
- };
-
- /**
- * Creates a new mat3 initialized with values from an existing matrix
- *
- * @param {mat3} a matrix to clone
- * @returns {mat3} a new 3x3 matrix
- */
- mat3.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(9);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- };
-
- /**
- * Copy the values from one mat3 to another
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- };
-
- /**
- * Set a mat3 to the identity matrix
- *
- * @param {mat3} out the receiving matrix
- * @returns {mat3} out
- */
- mat3.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- };
-
- /**
- * Transpose the values of a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1], a02 = a[2], a12 = a[5];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a01;
- out[5] = a[7];
- out[6] = a02;
- out[7] = a12;
- } else {
- out[0] = a[0];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a[1];
- out[4] = a[4];
- out[5] = a[7];
- out[6] = a[2];
- out[7] = a[5];
- out[8] = a[8];
- }
-
- return out;
- };
-
- /**
- * Inverts a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.invert = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- b01 = a22 * a11 - a12 * a21,
- b11 = -a22 * a10 + a12 * a20,
- b21 = a21 * a10 - a11 * a20,
-
- // Calculate the determinant
- det = a00 * b01 + a01 * b11 + a02 * b21;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = b01 * det;
- out[1] = (-a22 * a01 + a02 * a21) * det;
- out[2] = (a12 * a01 - a02 * a11) * det;
- out[3] = b11 * det;
- out[4] = (a22 * a00 - a02 * a20) * det;
- out[5] = (-a12 * a00 + a02 * a10) * det;
- out[6] = b21 * det;
- out[7] = (-a21 * a00 + a01 * a20) * det;
- out[8] = (a11 * a00 - a01 * a10) * det;
- return out;
- };
-
- /**
- * Calculates the adjugate of a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
- mat3.adjoint = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8];
-
- out[0] = (a11 * a22 - a12 * a21);
- out[1] = (a02 * a21 - a01 * a22);
- out[2] = (a01 * a12 - a02 * a11);
- out[3] = (a12 * a20 - a10 * a22);
- out[4] = (a00 * a22 - a02 * a20);
- out[5] = (a02 * a10 - a00 * a12);
- out[6] = (a10 * a21 - a11 * a20);
- out[7] = (a01 * a20 - a00 * a21);
- out[8] = (a00 * a11 - a01 * a10);
- return out;
- };
-
- /**
- * Calculates the determinant of a mat3
- *
- * @param {mat3} a the source matrix
- * @returns {Number} determinant of a
- */
- mat3.determinant = function (a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8];
-
- return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
- };
-
- /**
- * Multiplies two mat3's
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the first operand
- * @param {mat3} b the second operand
- * @returns {mat3} out
- */
- mat3.multiply = function (out, a, b) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- b00 = b[0], b01 = b[1], b02 = b[2],
- b10 = b[3], b11 = b[4], b12 = b[5],
- b20 = b[6], b21 = b[7], b22 = b[8];
-
- out[0] = b00 * a00 + b01 * a10 + b02 * a20;
- out[1] = b00 * a01 + b01 * a11 + b02 * a21;
- out[2] = b00 * a02 + b01 * a12 + b02 * a22;
-
- out[3] = b10 * a00 + b11 * a10 + b12 * a20;
- out[4] = b10 * a01 + b11 * a11 + b12 * a21;
- out[5] = b10 * a02 + b11 * a12 + b12 * a22;
-
- out[6] = b20 * a00 + b21 * a10 + b22 * a20;
- out[7] = b20 * a01 + b21 * a11 + b22 * a21;
- out[8] = b20 * a02 + b21 * a12 + b22 * a22;
- return out;
- };
-
- /**
- * Alias for {@link mat3.multiply}
- * @function
- */
- mat3.mul = mat3.multiply;
-
- /**
- * Translate a mat3 by the given vector
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to translate
- * @param {vec2} v vector to translate by
- * @returns {mat3} out
- */
- mat3.translate = function(out, a, v) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
- x = v[0], y = v[1];
-
- out[0] = a00;
- out[1] = a01;
- out[2] = a02;
-
- out[3] = a10;
- out[4] = a11;
- out[5] = a12;
-
- out[6] = x * a00 + y * a10 + a20;
- out[7] = x * a01 + y * a11 + a21;
- out[8] = x * a02 + y * a12 + a22;
- return out;
- };
-
- /**
- * Rotates a mat3 by the given angle
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
- mat3.rotate = function (out, a, rad) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- s = Math.sin(rad),
- c = Math.cos(rad);
-
- out[0] = c * a00 + s * a10;
- out[1] = c * a01 + s * a11;
- out[2] = c * a02 + s * a12;
-
- out[3] = c * a10 - s * a00;
- out[4] = c * a11 - s * a01;
- out[5] = c * a12 - s * a02;
-
- out[6] = a20;
- out[7] = a21;
- out[8] = a22;
- return out;
- };
-
- /**
- * Scales the mat3 by the dimensions in the given vec2
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to rotate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat3} out
- **/
- mat3.scale = function(out, a, v) {
- var x = v[0], y = v[1];
-
- out[0] = x * a[0];
- out[1] = x * a[1];
- out[2] = x * a[2];
-
- out[3] = y * a[3];
- out[4] = y * a[4];
- out[5] = y * a[5];
-
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
- };
-
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.translate(dest, dest, vec);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {vec2} v Translation vector
- * @returns {mat3} out
- */
- mat3.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = v[0];
- out[7] = v[1];
- out[8] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.rotate(dest, dest, rad);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
- mat3.fromRotation = function(out, rad) {
- var s = Math.sin(rad), c = Math.cos(rad);
-
- out[0] = c;
- out[1] = s;
- out[2] = 0;
-
- out[3] = -s;
- out[4] = c;
- out[5] = 0;
-
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.scale(dest, dest, vec);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat3} out
- */
- mat3.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
-
- out[3] = 0;
- out[4] = v[1];
- out[5] = 0;
-
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
- }
-
- /**
- * Copies the values from a mat2d into a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat2d} a the matrix to copy
- * @returns {mat3} out
- **/
- mat3.fromMat2d = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = 0;
-
- out[3] = a[2];
- out[4] = a[3];
- out[5] = 0;
-
- out[6] = a[4];
- out[7] = a[5];
- out[8] = 1;
- return out;
- };
-
- /**
- * Calculates a 3x3 matrix from the given quaternion
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {quat} q Quaternion to create matrix from
- *
- * @returns {mat3} out
- */
- mat3.fromQuat = function (out, q) {
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- yx = y * x2,
- yy = y * y2,
- zx = z * x2,
- zy = z * y2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - yy - zz;
- out[3] = yx - wz;
- out[6] = zx + wy;
-
- out[1] = yx + wz;
- out[4] = 1 - xx - zz;
- out[7] = zy - wx;
-
- out[2] = zx - wy;
- out[5] = zy + wx;
- out[8] = 1 - xx - yy;
-
- return out;
- };
-
- /**
- * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {mat4} a Mat4 to derive the normal matrix from
- *
- * @returns {mat3} out
- */
- mat3.normalFromMat4 = function (out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32,
-
- // Calculate the determinant
- det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
-
- out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
-
- out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
-
- return out;
- };
-
- /**
- * Returns a string representation of a mat3
- *
- * @param {mat3} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat3.str = function (a) {
- return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' +
- a[3] + ', ' + a[4] + ', ' + a[5] + ', ' +
- a[6] + ', ' + a[7] + ', ' + a[8] + ')';
- };
-
- /**
- * Returns Frobenius norm of a mat3
- *
- * @param {mat3} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
- mat3.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))
- };
-
-
- module.exports = mat3;
-
-
-/***/ },
-/* 5 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 4x4 Matrix
- * @name mat4
- */
- var mat4 = {};
-
- /**
- * Creates a new identity mat4
- *
- * @returns {mat4} a new 4x4 matrix
- */
- mat4.create = function() {
- var out = new glMatrix.ARRAY_TYPE(16);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- };
-
- /**
- * Creates a new mat4 initialized with values from an existing matrix
- *
- * @param {mat4} a matrix to clone
- * @returns {mat4} a new 4x4 matrix
- */
- mat4.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(16);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- };
-
- /**
- * Copy the values from one mat4 to another
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- };
-
- /**
- * Set a mat4 to the identity matrix
- *
- * @param {mat4} out the receiving matrix
- * @returns {mat4} out
- */
- mat4.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- };
-
- /**
- * Transpose the values of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1], a02 = a[2], a03 = a[3],
- a12 = a[6], a13 = a[7],
- a23 = a[11];
-
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a01;
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a02;
- out[9] = a12;
- out[11] = a[14];
- out[12] = a03;
- out[13] = a13;
- out[14] = a23;
- } else {
- out[0] = a[0];
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a[1];
- out[5] = a[5];
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a[2];
- out[9] = a[6];
- out[10] = a[10];
- out[11] = a[14];
- out[12] = a[3];
- out[13] = a[7];
- out[14] = a[11];
- out[15] = a[15];
- }
-
- return out;
- };
-
- /**
- * Inverts a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.invert = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32,
-
- // Calculate the determinant
- det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
- out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
- out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
- out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
- out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
- out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
- out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
- out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
- out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
- out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
-
- return out;
- };
-
- /**
- * Calculates the adjugate of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
- mat4.adjoint = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
-
- out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));
- out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));
- out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));
- out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));
- out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));
- out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));
- out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));
- out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));
- out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));
- out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));
- out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));
- out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));
- out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));
- out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));
- out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));
- out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));
- return out;
- };
-
- /**
- * Calculates the determinant of a mat4
- *
- * @param {mat4} a the source matrix
- * @returns {Number} determinant of a
- */
- mat4.determinant = function (a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32;
-
- // Calculate the determinant
- return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
- };
-
- /**
- * Multiplies two mat4's
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the first operand
- * @param {mat4} b the second operand
- * @returns {mat4} out
- */
- mat4.multiply = function (out, a, b) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
-
- // Cache only the current line of the second matrix
- var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
- out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];
- out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];
- out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];
- out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
- return out;
- };
-
- /**
- * Alias for {@link mat4.multiply}
- * @function
- */
- mat4.mul = mat4.multiply;
-
- /**
- * Translate a mat4 by the given vector
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to translate
- * @param {vec3} v vector to translate by
- * @returns {mat4} out
- */
- mat4.translate = function (out, a, v) {
- var x = v[0], y = v[1], z = v[2],
- a00, a01, a02, a03,
- a10, a11, a12, a13,
- a20, a21, a22, a23;
-
- if (a === out) {
- out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
- out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
- out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
- out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
- } else {
- a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
- a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
- a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
-
- out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;
- out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;
- out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;
-
- out[12] = a00 * x + a10 * y + a20 * z + a[12];
- out[13] = a01 * x + a11 * y + a21 * z + a[13];
- out[14] = a02 * x + a12 * y + a22 * z + a[14];
- out[15] = a03 * x + a13 * y + a23 * z + a[15];
- }
-
- return out;
- };
-
- /**
- * Scales the mat4 by the dimensions in the given vec3
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to scale
- * @param {vec3} v the vec3 to scale the matrix by
- * @returns {mat4} out
- **/
- mat4.scale = function(out, a, v) {
- var x = v[0], y = v[1], z = v[2];
-
- out[0] = a[0] * x;
- out[1] = a[1] * x;
- out[2] = a[2] * x;
- out[3] = a[3] * x;
- out[4] = a[4] * y;
- out[5] = a[5] * y;
- out[6] = a[6] * y;
- out[7] = a[7] * y;
- out[8] = a[8] * z;
- out[9] = a[9] * z;
- out[10] = a[10] * z;
- out[11] = a[11] * z;
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
- };
-
- /**
- * Rotates a mat4 by the given angle around the given axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @param {vec3} axis the axis to rotate around
- * @returns {mat4} out
- */
- mat4.rotate = function (out, a, rad, axis) {
- var x = axis[0], y = axis[1], z = axis[2],
- len = Math.sqrt(x * x + y * y + z * z),
- s, c, t,
- a00, a01, a02, a03,
- a10, a11, a12, a13,
- a20, a21, a22, a23,
- b00, b01, b02,
- b10, b11, b12,
- b20, b21, b22;
-
- if (Math.abs(len) < glMatrix.EPSILON) { return null; }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
-
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
-
- a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
- a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
- a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
-
- // Construct the elements of the rotation matrix
- b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;
- b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;
- b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;
-
- // Perform rotation-specific matrix multiplication
- out[0] = a00 * b00 + a10 * b01 + a20 * b02;
- out[1] = a01 * b00 + a11 * b01 + a21 * b02;
- out[2] = a02 * b00 + a12 * b01 + a22 * b02;
- out[3] = a03 * b00 + a13 * b01 + a23 * b02;
- out[4] = a00 * b10 + a10 * b11 + a20 * b12;
- out[5] = a01 * b10 + a11 * b11 + a21 * b12;
- out[6] = a02 * b10 + a12 * b11 + a22 * b12;
- out[7] = a03 * b10 + a13 * b11 + a23 * b12;
- out[8] = a00 * b20 + a10 * b21 + a20 * b22;
- out[9] = a01 * b20 + a11 * b21 + a21 * b22;
- out[10] = a02 * b20 + a12 * b21 + a22 * b22;
- out[11] = a03 * b20 + a13 * b21 + a23 * b22;
-
- if (a !== out) { // If the source and destination differ, copy the unchanged last row
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
- return out;
- };
-
- /**
- * Rotates a matrix by the given angle around the X axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.rotateX = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7],
- a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged rows
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[4] = a10 * c + a20 * s;
- out[5] = a11 * c + a21 * s;
- out[6] = a12 * c + a22 * s;
- out[7] = a13 * c + a23 * s;
- out[8] = a20 * c - a10 * s;
- out[9] = a21 * c - a11 * s;
- out[10] = a22 * c - a12 * s;
- out[11] = a23 * c - a13 * s;
- return out;
- };
-
- /**
- * Rotates a matrix by the given angle around the Y axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.rotateY = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3],
- a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged rows
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[0] = a00 * c - a20 * s;
- out[1] = a01 * c - a21 * s;
- out[2] = a02 * c - a22 * s;
- out[3] = a03 * c - a23 * s;
- out[8] = a00 * s + a20 * c;
- out[9] = a01 * s + a21 * c;
- out[10] = a02 * s + a22 * c;
- out[11] = a03 * s + a23 * c;
- return out;
- };
-
- /**
- * Rotates a matrix by the given angle around the Z axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.rotateZ = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3],
- a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged last row
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[0] = a00 * c + a10 * s;
- out[1] = a01 * c + a11 * s;
- out[2] = a02 * c + a12 * s;
- out[3] = a03 * c + a13 * s;
- out[4] = a10 * c - a00 * s;
- out[5] = a11 * c - a01 * s;
- out[6] = a12 * c - a02 * s;
- out[7] = a13 * c - a03 * s;
- return out;
- };
-
- /**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {vec3} v Translation vector
- * @returns {mat4} out
- */
- mat4.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.scale(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {vec3} v Scaling vector
- * @returns {mat4} out
- */
- mat4.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = v[1];
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = v[2];
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a given angle around a given axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotate(dest, dest, rad, axis);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @param {vec3} axis the axis to rotate around
- * @returns {mat4} out
- */
- mat4.fromRotation = function(out, rad, axis) {
- var x = axis[0], y = axis[1], z = axis[2],
- len = Math.sqrt(x * x + y * y + z * z),
- s, c, t;
-
- if (Math.abs(len) < glMatrix.EPSILON) { return null; }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
-
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
-
- // Perform rotation-specific matrix multiplication
- out[0] = x * x * t + c;
- out[1] = y * x * t + z * s;
- out[2] = z * x * t - y * s;
- out[3] = 0;
- out[4] = x * y * t - z * s;
- out[5] = y * y * t + c;
- out[6] = z * y * t + x * s;
- out[7] = 0;
- out[8] = x * z * t + y * s;
- out[9] = y * z * t - x * s;
- out[10] = z * z * t + c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from the given angle around the X axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateX(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.fromXRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = c;
- out[6] = s;
- out[7] = 0;
- out[8] = 0;
- out[9] = -s;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from the given angle around the Y axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateY(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.fromYRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = c;
- out[1] = 0;
- out[2] = -s;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = s;
- out[9] = 0;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from the given angle around the Z axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateZ(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
- mat4.fromZRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = c;
- out[1] = s;
- out[2] = 0;
- out[3] = 0;
- out[4] = -s;
- out[5] = c;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
- }
-
- /**
- * Creates a matrix from a quaternion rotation and vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @returns {mat4} out
- */
- mat4.fromRotationTranslation = function (out, q, v) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - (yy + zz);
- out[1] = xy + wz;
- out[2] = xz - wy;
- out[3] = 0;
- out[4] = xy - wz;
- out[5] = 1 - (xx + zz);
- out[6] = yz + wx;
- out[7] = 0;
- out[8] = xz + wy;
- out[9] = yz - wx;
- out[10] = 1 - (xx + yy);
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @param {vec3} s Scaling vector
- * @returns {mat4} out
- */
- mat4.fromRotationTranslationScale = function (out, q, v, s) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2,
- sx = s[0],
- sy = s[1],
- sz = s[2];
-
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * mat4.translate(dest, origin);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- * mat4.translate(dest, negativeOrigin);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @param {vec3} s Scaling vector
- * @param {vec3} o The origin vector around which to scale and rotate
- * @returns {mat4} out
- */
- mat4.fromRotationTranslationScaleOrigin = function (out, q, v, s, o) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2,
-
- sx = s[0],
- sy = s[1],
- sz = s[2],
-
- ox = o[0],
- oy = o[1],
- oz = o[2];
-
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0] + ox - (out[0] * ox + out[4] * oy + out[8] * oz);
- out[13] = v[1] + oy - (out[1] * ox + out[5] * oy + out[9] * oz);
- out[14] = v[2] + oz - (out[2] * ox + out[6] * oy + out[10] * oz);
- out[15] = 1;
-
- return out;
- };
-
- mat4.fromQuat = function (out, q) {
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- yx = y * x2,
- yy = y * y2,
- zx = z * x2,
- zy = z * y2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - yy - zz;
- out[1] = yx + wz;
- out[2] = zx - wy;
- out[3] = 0;
-
- out[4] = yx - wz;
- out[5] = 1 - xx - zz;
- out[6] = zy + wx;
- out[7] = 0;
-
- out[8] = zx + wy;
- out[9] = zy - wx;
- out[10] = 1 - xx - yy;
- out[11] = 0;
-
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Generates a frustum matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {Number} left Left bound of the frustum
- * @param {Number} right Right bound of the frustum
- * @param {Number} bottom Bottom bound of the frustum
- * @param {Number} top Top bound of the frustum
- * @param {Number} near Near bound of the frustum
- * @param {Number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.frustum = function (out, left, right, bottom, top, near, far) {
- var rl = 1 / (right - left),
- tb = 1 / (top - bottom),
- nf = 1 / (near - far);
- out[0] = (near * 2) * rl;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = (near * 2) * tb;
- out[6] = 0;
- out[7] = 0;
- out[8] = (right + left) * rl;
- out[9] = (top + bottom) * tb;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = (far * near * 2) * nf;
- out[15] = 0;
- return out;
- };
-
- /**
- * Generates a perspective projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fovy Vertical field of view in radians
- * @param {number} aspect Aspect ratio. typically viewport width/height
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.perspective = function (out, fovy, aspect, near, far) {
- var f = 1.0 / Math.tan(fovy / 2),
- nf = 1 / (near - far);
- out[0] = f / aspect;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = f;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = (2 * far * near) * nf;
- out[15] = 0;
- return out;
- };
-
- /**
- * Generates a perspective projection matrix with the given field of view.
- * This is primarily useful for generating projection matrices to be used
- * with the still experiemental WebVR API.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.perspectiveFromFieldOfView = function (out, fov, near, far) {
- var upTan = Math.tan(fov.upDegrees * Math.PI/180.0),
- downTan = Math.tan(fov.downDegrees * Math.PI/180.0),
- leftTan = Math.tan(fov.leftDegrees * Math.PI/180.0),
- rightTan = Math.tan(fov.rightDegrees * Math.PI/180.0),
- xScale = 2.0 / (leftTan + rightTan),
- yScale = 2.0 / (upTan + downTan);
-
- out[0] = xScale;
- out[1] = 0.0;
- out[2] = 0.0;
- out[3] = 0.0;
- out[4] = 0.0;
- out[5] = yScale;
- out[6] = 0.0;
- out[7] = 0.0;
- out[8] = -((leftTan - rightTan) * xScale * 0.5);
- out[9] = ((upTan - downTan) * yScale * 0.5);
- out[10] = far / (near - far);
- out[11] = -1.0;
- out[12] = 0.0;
- out[13] = 0.0;
- out[14] = (far * near) / (near - far);
- out[15] = 0.0;
- return out;
- }
-
- /**
- * Generates a orthogonal projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} left Left bound of the frustum
- * @param {number} right Right bound of the frustum
- * @param {number} bottom Bottom bound of the frustum
- * @param {number} top Top bound of the frustum
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
- mat4.ortho = function (out, left, right, bottom, top, near, far) {
- var lr = 1 / (left - right),
- bt = 1 / (bottom - top),
- nf = 1 / (near - far);
- out[0] = -2 * lr;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = -2 * bt;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 2 * nf;
- out[11] = 0;
- out[12] = (left + right) * lr;
- out[13] = (top + bottom) * bt;
- out[14] = (far + near) * nf;
- out[15] = 1;
- return out;
- };
-
- /**
- * Generates a look-at matrix with the given eye position, focal point, and up axis
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {vec3} eye Position of the viewer
- * @param {vec3} center Point the viewer is looking at
- * @param {vec3} up vec3 pointing up
- * @returns {mat4} out
- */
- mat4.lookAt = function (out, eye, center, up) {
- var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,
- eyex = eye[0],
- eyey = eye[1],
- eyez = eye[2],
- upx = up[0],
- upy = up[1],
- upz = up[2],
- centerx = center[0],
- centery = center[1],
- centerz = center[2];
-
- if (Math.abs(eyex - centerx) < glMatrix.EPSILON &&
- Math.abs(eyey - centery) < glMatrix.EPSILON &&
- Math.abs(eyez - centerz) < glMatrix.EPSILON) {
- return mat4.identity(out);
- }
-
- z0 = eyex - centerx;
- z1 = eyey - centery;
- z2 = eyez - centerz;
-
- len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);
- z0 *= len;
- z1 *= len;
- z2 *= len;
-
- x0 = upy * z2 - upz * z1;
- x1 = upz * z0 - upx * z2;
- x2 = upx * z1 - upy * z0;
- len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);
- if (!len) {
- x0 = 0;
- x1 = 0;
- x2 = 0;
- } else {
- len = 1 / len;
- x0 *= len;
- x1 *= len;
- x2 *= len;
- }
-
- y0 = z1 * x2 - z2 * x1;
- y1 = z2 * x0 - z0 * x2;
- y2 = z0 * x1 - z1 * x0;
-
- len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);
- if (!len) {
- y0 = 0;
- y1 = 0;
- y2 = 0;
- } else {
- len = 1 / len;
- y0 *= len;
- y1 *= len;
- y2 *= len;
- }
-
- out[0] = x0;
- out[1] = y0;
- out[2] = z0;
- out[3] = 0;
- out[4] = x1;
- out[5] = y1;
- out[6] = z1;
- out[7] = 0;
- out[8] = x2;
- out[9] = y2;
- out[10] = z2;
- out[11] = 0;
- out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
- out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
- out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
- out[15] = 1;
-
- return out;
- };
-
- /**
- * Returns a string representation of a mat4
- *
- * @param {mat4} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
- mat4.str = function (a) {
- return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +
- a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +
- a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' +
- a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';
- };
-
- /**
- * Returns Frobenius norm of a mat4
- *
- * @param {mat4} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
- mat4.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))
- };
-
-
- module.exports = mat4;
-
-
-/***/ },
-/* 6 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
- var mat3 = __webpack_require__(4);
- var vec3 = __webpack_require__(7);
- var vec4 = __webpack_require__(8);
-
- /**
- * @class Quaternion
- * @name quat
- */
- var quat = {};
-
- /**
- * Creates a new identity quat
- *
- * @returns {quat} a new quaternion
- */
- quat.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
-
- /**
- * Sets a quaternion to represent the shortest rotation from one
- * vector to another.
- *
- * Both vectors are assumed to be unit length.
- *
- * @param {quat} out the receiving quaternion.
- * @param {vec3} a the initial vector
- * @param {vec3} b the destination vector
- * @returns {quat} out
- */
- quat.rotationTo = (function() {
- var tmpvec3 = vec3.create();
- var xUnitVec3 = vec3.fromValues(1,0,0);
- var yUnitVec3 = vec3.fromValues(0,1,0);
-
- return function(out, a, b) {
- var dot = vec3.dot(a, b);
- if (dot < -0.999999) {
- vec3.cross(tmpvec3, xUnitVec3, a);
- if (vec3.length(tmpvec3) < 0.000001)
- vec3.cross(tmpvec3, yUnitVec3, a);
- vec3.normalize(tmpvec3, tmpvec3);
- quat.setAxisAngle(out, tmpvec3, Math.PI);
- return out;
- } else if (dot > 0.999999) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- } else {
- vec3.cross(tmpvec3, a, b);
- out[0] = tmpvec3[0];
- out[1] = tmpvec3[1];
- out[2] = tmpvec3[2];
- out[3] = 1 + dot;
- return quat.normalize(out, out);
- }
- };
- })();
-
- /**
- * Sets the specified quaternion with values corresponding to the given
- * axes. Each axis is a vec3 and is expected to be unit length and
- * perpendicular to all other specified axes.
- *
- * @param {vec3} view the vector representing the viewing direction
- * @param {vec3} right the vector representing the local "right" direction
- * @param {vec3} up the vector representing the local "up" direction
- * @returns {quat} out
- */
- quat.setAxes = (function() {
- var matr = mat3.create();
-
- return function(out, view, right, up) {
- matr[0] = right[0];
- matr[3] = right[1];
- matr[6] = right[2];
-
- matr[1] = up[0];
- matr[4] = up[1];
- matr[7] = up[2];
-
- matr[2] = -view[0];
- matr[5] = -view[1];
- matr[8] = -view[2];
-
- return quat.normalize(out, quat.fromMat3(out, matr));
- };
- })();
-
- /**
- * Creates a new quat initialized with values from an existing quaternion
- *
- * @param {quat} a quaternion to clone
- * @returns {quat} a new quaternion
- * @function
- */
- quat.clone = vec4.clone;
-
- /**
- * Creates a new quat initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} a new quaternion
- * @function
- */
- quat.fromValues = vec4.fromValues;
-
- /**
- * Copy the values from one quat to another
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the source quaternion
- * @returns {quat} out
- * @function
- */
- quat.copy = vec4.copy;
-
- /**
- * Set the components of a quat to the given values
- *
- * @param {quat} out the receiving quaternion
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} out
- * @function
- */
- quat.set = vec4.set;
-
- /**
- * Set a quat to the identity quaternion
- *
- * @param {quat} out the receiving quaternion
- * @returns {quat} out
- */
- quat.identity = function(out) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- };
-
- /**
- * Sets a quat from the given angle and rotation axis,
- * then returns it.
- *
- * @param {quat} out the receiving quaternion
- * @param {vec3} axis the axis around which to rotate
- * @param {Number} rad the angle in radians
- * @returns {quat} out
- **/
- quat.setAxisAngle = function(out, axis, rad) {
- rad = rad * 0.5;
- var s = Math.sin(rad);
- out[0] = s * axis[0];
- out[1] = s * axis[1];
- out[2] = s * axis[2];
- out[3] = Math.cos(rad);
- return out;
- };
-
- /**
- * Adds two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {quat} out
- * @function
- */
- quat.add = vec4.add;
-
- /**
- * Multiplies two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {quat} out
- */
- quat.multiply = function(out, a, b) {
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = b[0], by = b[1], bz = b[2], bw = b[3];
-
- out[0] = ax * bw + aw * bx + ay * bz - az * by;
- out[1] = ay * bw + aw * by + az * bx - ax * bz;
- out[2] = az * bw + aw * bz + ax * by - ay * bx;
- out[3] = aw * bw - ax * bx - ay * by - az * bz;
- return out;
- };
-
- /**
- * Alias for {@link quat.multiply}
- * @function
- */
- quat.mul = quat.multiply;
-
- /**
- * Scales a quat by a scalar number
- *
- * @param {quat} out the receiving vector
- * @param {quat} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {quat} out
- * @function
- */
- quat.scale = vec4.scale;
-
- /**
- * Rotates a quaternion by the given angle about the X axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
- quat.rotateX = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw + aw * bx;
- out[1] = ay * bw + az * bx;
- out[2] = az * bw - ay * bx;
- out[3] = aw * bw - ax * bx;
- return out;
- };
-
- /**
- * Rotates a quaternion by the given angle about the Y axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
- quat.rotateY = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- by = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw - az * by;
- out[1] = ay * bw + aw * by;
- out[2] = az * bw + ax * by;
- out[3] = aw * bw - ay * by;
- return out;
- };
-
- /**
- * Rotates a quaternion by the given angle about the Z axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
- quat.rotateZ = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bz = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw + ay * bz;
- out[1] = ay * bw - ax * bz;
- out[2] = az * bw + aw * bz;
- out[3] = aw * bw - az * bz;
- return out;
- };
-
- /**
- * Calculates the W component of a quat from the X, Y, and Z components.
- * Assumes that quaternion is 1 unit in length.
- * Any existing W component will be ignored.
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate W component of
- * @returns {quat} out
- */
- quat.calculateW = function (out, a) {
- var x = a[0], y = a[1], z = a[2];
-
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));
- return out;
- };
-
- /**
- * Calculates the dot product of two quat's
- *
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {Number} dot product of a and b
- * @function
- */
- quat.dot = vec4.dot;
-
- /**
- * Performs a linear interpolation between two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {quat} out
- * @function
- */
- quat.lerp = vec4.lerp;
-
- /**
- * Performs a spherical linear interpolation between two quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {quat} out
- */
- quat.slerp = function (out, a, b, t) {
- // benchmarks:
- // http://jsperf.com/quaternion-slerp-implementations
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = b[0], by = b[1], bz = b[2], bw = b[3];
-
- var omega, cosom, sinom, scale0, scale1;
-
- // calc cosine
- cosom = ax * bx + ay * by + az * bz + aw * bw;
- // adjust signs (if necessary)
- if ( cosom < 0.0 ) {
- cosom = -cosom;
- bx = - bx;
- by = - by;
- bz = - bz;
- bw = - bw;
- }
- // calculate coefficients
- if ( (1.0 - cosom) > 0.000001 ) {
- // standard case (slerp)
- omega = Math.acos(cosom);
- sinom = Math.sin(omega);
- scale0 = Math.sin((1.0 - t) * omega) / sinom;
- scale1 = Math.sin(t * omega) / sinom;
- } else {
- // "from" and "to" quaternions are very close
- // ... so we can do a linear interpolation
- scale0 = 1.0 - t;
- scale1 = t;
- }
- // calculate final values
- out[0] = scale0 * ax + scale1 * bx;
- out[1] = scale0 * ay + scale1 * by;
- out[2] = scale0 * az + scale1 * bz;
- out[3] = scale0 * aw + scale1 * bw;
-
- return out;
- };
-
- /**
- * Performs a spherical linear interpolation with two control points
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {quat} c the third operand
- * @param {quat} d the fourth operand
- * @param {Number} t interpolation amount
- * @returns {quat} out
- */
- quat.sqlerp = (function () {
- var temp1 = quat.create();
- var temp2 = quat.create();
-
- return function (out, a, b, c, d, t) {
- quat.slerp(temp1, a, d, t);
- quat.slerp(temp2, b, c, t);
- quat.slerp(out, temp1, temp2, 2 * t * (1 - t));
-
- return out;
- };
- }());
-
- /**
- * Calculates the inverse of a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate inverse of
- * @returns {quat} out
- */
- quat.invert = function(out, a) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,
- invDot = dot ? 1.0/dot : 0;
-
- // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
-
- out[0] = -a0*invDot;
- out[1] = -a1*invDot;
- out[2] = -a2*invDot;
- out[3] = a3*invDot;
- return out;
- };
-
- /**
- * Calculates the conjugate of a quat
- * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate conjugate of
- * @returns {quat} out
- */
- quat.conjugate = function (out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a[3];
- return out;
- };
-
- /**
- * Calculates the length of a quat
- *
- * @param {quat} a vector to calculate length of
- * @returns {Number} length of a
- * @function
- */
- quat.length = vec4.length;
-
- /**
- * Alias for {@link quat.length}
- * @function
- */
- quat.len = quat.length;
-
- /**
- * Calculates the squared length of a quat
- *
- * @param {quat} a vector to calculate squared length of
- * @returns {Number} squared length of a
- * @function
- */
- quat.squaredLength = vec4.squaredLength;
-
- /**
- * Alias for {@link quat.squaredLength}
- * @function
- */
- quat.sqrLen = quat.squaredLength;
-
- /**
- * Normalize a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quaternion to normalize
- * @returns {quat} out
- * @function
- */
- quat.normalize = vec4.normalize;
-
- /**
- * Creates a quaternion from the given 3x3 rotation matrix.
- *
- * NOTE: The resultant quaternion is not normalized, so you should be sure
- * to renormalize the quaternion yourself where necessary.
- *
- * @param {quat} out the receiving quaternion
- * @param {mat3} m rotation matrix
- * @returns {quat} out
- * @function
- */
- quat.fromMat3 = function(out, m) {
- // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
- // article "Quaternion Calculus and Fast Animation".
- var fTrace = m[0] + m[4] + m[8];
- var fRoot;
-
- if ( fTrace > 0.0 ) {
- // |w| > 1/2, may as well choose w > 1/2
- fRoot = Math.sqrt(fTrace + 1.0); // 2w
- out[3] = 0.5 * fRoot;
- fRoot = 0.5/fRoot; // 1/(4w)
- out[0] = (m[5]-m[7])*fRoot;
- out[1] = (m[6]-m[2])*fRoot;
- out[2] = (m[1]-m[3])*fRoot;
- } else {
- // |w| <= 1/2
- var i = 0;
- if ( m[4] > m[0] )
- i = 1;
- if ( m[8] > m[i*3+i] )
- i = 2;
- var j = (i+1)%3;
- var k = (i+2)%3;
-
- fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);
- out[i] = 0.5 * fRoot;
- fRoot = 0.5 / fRoot;
- out[3] = (m[j*3+k] - m[k*3+j]) * fRoot;
- out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;
- out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;
- }
-
- return out;
- };
-
- /**
- * Returns a string representation of a quatenion
- *
- * @param {quat} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- quat.str = function (a) {
- return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
- };
-
- module.exports = quat;
-
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 3 Dimensional Vector
- * @name vec3
- */
- var vec3 = {};
-
- /**
- * Creates a new, empty vec3
- *
- * @returns {vec3} a new 3D vector
- */
- vec3.create = function() {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- return out;
- };
-
- /**
- * Creates a new vec3 initialized with values from an existing vector
- *
- * @param {vec3} a vector to clone
- * @returns {vec3} a new 3D vector
- */
- vec3.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
- };
-
- /**
- * Creates a new vec3 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} a new 3D vector
- */
- vec3.fromValues = function(x, y, z) {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
- };
-
- /**
- * Copy the values from one vec3 to another
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the source vector
- * @returns {vec3} out
- */
- vec3.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
- };
-
- /**
- * Set the components of a vec3 to the given values
- *
- * @param {vec3} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} out
- */
- vec3.set = function(out, x, y, z) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
- };
-
- /**
- * Adds two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- return out;
- };
-
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- return out;
- };
-
- /**
- * Alias for {@link vec3.subtract}
- * @function
- */
- vec3.sub = vec3.subtract;
-
- /**
- * Multiplies two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- return out;
- };
-
- /**
- * Alias for {@link vec3.multiply}
- * @function
- */
- vec3.mul = vec3.multiply;
-
- /**
- * Divides two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- return out;
- };
-
- /**
- * Alias for {@link vec3.divide}
- * @function
- */
- vec3.div = vec3.divide;
-
- /**
- * Returns the minimum of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- return out;
- };
-
- /**
- * Returns the maximum of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- return out;
- };
-
- /**
- * Scales a vec3 by a scalar number
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec3} out
- */
- vec3.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- return out;
- };
-
- /**
- * Adds two vec3's after scaling the second operand by a scalar value
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec3} out
- */
- vec3.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- out[2] = a[2] + (b[2] * scale);
- return out;
- };
-
- /**
- * Calculates the euclidian distance between two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} distance between a and b
- */
- vec3.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2];
- return Math.sqrt(x*x + y*y + z*z);
- };
-
- /**
- * Alias for {@link vec3.distance}
- * @function
- */
- vec3.dist = vec3.distance;
-
- /**
- * Calculates the squared euclidian distance between two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} squared distance between a and b
- */
- vec3.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2];
- return x*x + y*y + z*z;
- };
-
- /**
- * Alias for {@link vec3.squaredDistance}
- * @function
- */
- vec3.sqrDist = vec3.squaredDistance;
-
- /**
- * Calculates the length of a vec3
- *
- * @param {vec3} a vector to calculate length of
- * @returns {Number} length of a
- */
- vec3.length = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- return Math.sqrt(x*x + y*y + z*z);
- };
-
- /**
- * Alias for {@link vec3.length}
- * @function
- */
- vec3.len = vec3.length;
-
- /**
- * Calculates the squared length of a vec3
- *
- * @param {vec3} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
- vec3.squaredLength = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- return x*x + y*y + z*z;
- };
-
- /**
- * Alias for {@link vec3.squaredLength}
- * @function
- */
- vec3.sqrLen = vec3.squaredLength;
-
- /**
- * Negates the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to negate
- * @returns {vec3} out
- */
- vec3.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- return out;
- };
-
- /**
- * Returns the inverse of the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to invert
- * @returns {vec3} out
- */
- vec3.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- return out;
- };
-
- /**
- * Normalize a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to normalize
- * @returns {vec3} out
- */
- vec3.normalize = function(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- var len = x*x + y*y + z*z;
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- out[2] = a[2] * len;
- }
- return out;
- };
-
- /**
- * Calculates the dot product of two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} dot product of a and b
- */
- vec3.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
- };
-
- /**
- * Computes the cross product of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
- vec3.cross = function(out, a, b) {
- var ax = a[0], ay = a[1], az = a[2],
- bx = b[0], by = b[1], bz = b[2];
-
- out[0] = ay * bz - az * by;
- out[1] = az * bx - ax * bz;
- out[2] = ax * by - ay * bx;
- return out;
- };
-
- /**
- * Performs a linear interpolation between two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
- vec3.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1],
- az = a[2];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- return out;
- };
-
- /**
- * Performs a hermite interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {vec3} c the third operand
- * @param {vec3} d the fourth operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
- vec3.hermite = function (out, a, b, c, d, t) {
- var factorTimes2 = t * t,
- factor1 = factorTimes2 * (2 * t - 3) + 1,
- factor2 = factorTimes2 * (t - 2) + t,
- factor3 = factorTimes2 * (t - 1),
- factor4 = factorTimes2 * (3 - 2 * t);
-
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
-
- return out;
- };
-
- /**
- * Performs a bezier interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {vec3} c the third operand
- * @param {vec3} d the fourth operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
- vec3.bezier = function (out, a, b, c, d, t) {
- var inverseFactor = 1 - t,
- inverseFactorTimesTwo = inverseFactor * inverseFactor,
- factorTimes2 = t * t,
- factor1 = inverseFactorTimesTwo * inverseFactor,
- factor2 = 3 * t * inverseFactorTimesTwo,
- factor3 = 3 * factorTimes2 * inverseFactor,
- factor4 = factorTimes2 * t;
-
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
-
- return out;
- };
-
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec3} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec3} out
- */
- vec3.random = function (out, scale) {
- scale = scale || 1.0;
-
- var r = glMatrix.RANDOM() * 2.0 * Math.PI;
- var z = (glMatrix.RANDOM() * 2.0) - 1.0;
- var zScale = Math.sqrt(1.0-z*z) * scale;
-
- out[0] = Math.cos(r) * zScale;
- out[1] = Math.sin(r) * zScale;
- out[2] = z * scale;
- return out;
- };
-
- /**
- * Transforms the vec3 with a mat4.
- * 4th vector component is implicitly '1'
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec3} out
- */
- vec3.transformMat4 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2],
- w = m[3] * x + m[7] * y + m[11] * z + m[15];
- w = w || 1.0;
- out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
- out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
- out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
- return out;
- };
-
- /**
- * Transforms the vec3 with a mat3.
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {mat4} m the 3x3 matrix to transform with
- * @returns {vec3} out
- */
- vec3.transformMat3 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2];
- out[0] = x * m[0] + y * m[3] + z * m[6];
- out[1] = x * m[1] + y * m[4] + z * m[7];
- out[2] = x * m[2] + y * m[5] + z * m[8];
- return out;
- };
-
- /**
- * Transforms the vec3 with a quat
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {quat} q quaternion to transform with
- * @returns {vec3} out
- */
- vec3.transformQuat = function(out, a, q) {
- // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations
-
- var x = a[0], y = a[1], z = a[2],
- qx = q[0], qy = q[1], qz = q[2], qw = q[3],
-
- // calculate quat * vec
- ix = qw * x + qy * z - qz * y,
- iy = qw * y + qz * x - qx * z,
- iz = qw * z + qx * y - qy * x,
- iw = -qx * x - qy * y - qz * z;
-
- // calculate result * inverse quat
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- return out;
- };
-
- /**
- * Rotate a 3D vector around the x-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
- vec3.rotateX = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[0];
- r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);
- r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
- };
-
- /**
- * Rotate a 3D vector around the y-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
- vec3.rotateY = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);
- r[1] = p[1];
- r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
- };
-
- /**
- * Rotate a 3D vector around the z-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
- vec3.rotateZ = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);
- r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);
- r[2] = p[2];
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
- };
-
- /**
- * Perform some operation over an array of vec3s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
- vec3.forEach = (function() {
- var vec = vec3.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 3;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];
- }
-
- return a;
- };
- })();
-
- /**
- * Get the angle between two 3D vectors
- * @param {vec3} a The first operand
- * @param {vec3} b The second operand
- * @returns {Number} The angle in radians
- */
- vec3.angle = function(a, b) {
-
- var tempA = vec3.fromValues(a[0], a[1], a[2]);
- var tempB = vec3.fromValues(b[0], b[1], b[2]);
-
- vec3.normalize(tempA, tempA);
- vec3.normalize(tempB, tempB);
-
- var cosine = vec3.dot(tempA, tempB);
-
- if(cosine > 1.0){
- return 0;
- } else {
- return Math.acos(cosine);
- }
- };
-
- /**
- * Returns a string representation of a vector
- *
- * @param {vec3} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- vec3.str = function (a) {
- return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';
- };
-
- module.exports = vec3;
-
-
-/***/ },
-/* 8 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 4 Dimensional Vector
- * @name vec4
- */
- var vec4 = {};
-
- /**
- * Creates a new, empty vec4
- *
- * @returns {vec4} a new 4D vector
- */
- vec4.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- return out;
- };
-
- /**
- * Creates a new vec4 initialized with values from an existing vector
- *
- * @param {vec4} a vector to clone
- * @returns {vec4} a new 4D vector
- */
- vec4.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- };
-
- /**
- * Creates a new vec4 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} a new 4D vector
- */
- vec4.fromValues = function(x, y, z, w) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
- };
-
- /**
- * Copy the values from one vec4 to another
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the source vector
- * @returns {vec4} out
- */
- vec4.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
- };
-
- /**
- * Set the components of a vec4 to the given values
- *
- * @param {vec4} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} out
- */
- vec4.set = function(out, x, y, z, w) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
- };
-
- /**
- * Adds two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- return out;
- };
-
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- return out;
- };
-
- /**
- * Alias for {@link vec4.subtract}
- * @function
- */
- vec4.sub = vec4.subtract;
-
- /**
- * Multiplies two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- out[3] = a[3] * b[3];
- return out;
- };
-
- /**
- * Alias for {@link vec4.multiply}
- * @function
- */
- vec4.mul = vec4.multiply;
-
- /**
- * Divides two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- out[3] = a[3] / b[3];
- return out;
- };
-
- /**
- * Alias for {@link vec4.divide}
- * @function
- */
- vec4.div = vec4.divide;
-
- /**
- * Returns the minimum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- out[3] = Math.min(a[3], b[3]);
- return out;
- };
-
- /**
- * Returns the maximum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
- vec4.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- out[3] = Math.max(a[3], b[3]);
- return out;
- };
-
- /**
- * Scales a vec4 by a scalar number
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec4} out
- */
- vec4.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- return out;
- };
-
- /**
- * Adds two vec4's after scaling the second operand by a scalar value
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec4} out
- */
- vec4.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- out[2] = a[2] + (b[2] * scale);
- out[3] = a[3] + (b[3] * scale);
- return out;
- };
-
- /**
- * Calculates the euclidian distance between two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} distance between a and b
- */
- vec4.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2],
- w = b[3] - a[3];
- return Math.sqrt(x*x + y*y + z*z + w*w);
- };
-
- /**
- * Alias for {@link vec4.distance}
- * @function
- */
- vec4.dist = vec4.distance;
-
- /**
- * Calculates the squared euclidian distance between two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} squared distance between a and b
- */
- vec4.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2],
- w = b[3] - a[3];
- return x*x + y*y + z*z + w*w;
- };
-
- /**
- * Alias for {@link vec4.squaredDistance}
- * @function
- */
- vec4.sqrDist = vec4.squaredDistance;
-
- /**
- * Calculates the length of a vec4
- *
- * @param {vec4} a vector to calculate length of
- * @returns {Number} length of a
- */
- vec4.length = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- return Math.sqrt(x*x + y*y + z*z + w*w);
- };
-
- /**
- * Alias for {@link vec4.length}
- * @function
- */
- vec4.len = vec4.length;
-
- /**
- * Calculates the squared length of a vec4
- *
- * @param {vec4} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
- vec4.squaredLength = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- return x*x + y*y + z*z + w*w;
- };
-
- /**
- * Alias for {@link vec4.squaredLength}
- * @function
- */
- vec4.sqrLen = vec4.squaredLength;
-
- /**
- * Negates the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to negate
- * @returns {vec4} out
- */
- vec4.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = -a[3];
- return out;
- };
-
- /**
- * Returns the inverse of the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to invert
- * @returns {vec4} out
- */
- vec4.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- out[3] = 1.0 / a[3];
- return out;
- };
-
- /**
- * Normalize a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to normalize
- * @returns {vec4} out
- */
- vec4.normalize = function(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- var len = x*x + y*y + z*z + w*w;
- if (len > 0) {
- len = 1 / Math.sqrt(len);
- out[0] = x * len;
- out[1] = y * len;
- out[2] = z * len;
- out[3] = w * len;
- }
- return out;
- };
-
- /**
- * Calculates the dot product of two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} dot product of a and b
- */
- vec4.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- };
-
- /**
- * Performs a linear interpolation between two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec4} out
- */
- vec4.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- out[3] = aw + t * (b[3] - aw);
- return out;
- };
-
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec4} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec4} out
- */
- vec4.random = function (out, scale) {
- scale = scale || 1.0;
-
- //TODO: This is a pretty awful way of doing this. Find something better.
- out[0] = glMatrix.RANDOM();
- out[1] = glMatrix.RANDOM();
- out[2] = glMatrix.RANDOM();
- out[3] = glMatrix.RANDOM();
- vec4.normalize(out, out);
- vec4.scale(out, out, scale);
- return out;
- };
-
- /**
- * Transforms the vec4 with a mat4.
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec4} out
- */
- vec4.transformMat4 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2], w = a[3];
- out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
- out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
- out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
- out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
- return out;
- };
-
- /**
- * Transforms the vec4 with a quat
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to transform
- * @param {quat} q quaternion to transform with
- * @returns {vec4} out
- */
- vec4.transformQuat = function(out, a, q) {
- var x = a[0], y = a[1], z = a[2],
- qx = q[0], qy = q[1], qz = q[2], qw = q[3],
-
- // calculate quat * vec
- ix = qw * x + qy * z - qz * y,
- iy = qw * y + qz * x - qx * z,
- iz = qw * z + qx * y - qy * x,
- iw = -qx * x - qy * y - qz * z;
-
- // calculate result * inverse quat
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- out[3] = a[3];
- return out;
- };
-
- /**
- * Perform some operation over an array of vec4s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
- vec4.forEach = (function() {
- var vec = vec4.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 4;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];
- }
-
- return a;
- };
- })();
-
- /**
- * Returns a string representation of a vector
- *
- * @param {vec4} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- vec4.str = function (a) {
- return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
- };
-
- module.exports = vec4;
-
-
-/***/ },
-/* 9 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE. */
-
- var glMatrix = __webpack_require__(1);
-
- /**
- * @class 2 Dimensional Vector
- * @name vec2
- */
- var vec2 = {};
-
- /**
- * Creates a new, empty vec2
- *
- * @returns {vec2} a new 2D vector
- */
- vec2.create = function() {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = 0;
- out[1] = 0;
- return out;
- };
-
- /**
- * Creates a new vec2 initialized with values from an existing vector
- *
- * @param {vec2} a vector to clone
- * @returns {vec2} a new 2D vector
- */
- vec2.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = a[0];
- out[1] = a[1];
- return out;
- };
-
- /**
- * Creates a new vec2 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} a new 2D vector
- */
- vec2.fromValues = function(x, y) {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = x;
- out[1] = y;
- return out;
- };
-
- /**
- * Copy the values from one vec2 to another
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the source vector
- * @returns {vec2} out
- */
- vec2.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- return out;
- };
-
- /**
- * Set the components of a vec2 to the given values
- *
- * @param {vec2} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} out
- */
- vec2.set = function(out, x, y) {
- out[0] = x;
- out[1] = y;
- return out;
- };
-
- /**
- * Adds two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- return out;
- };
-
- /**
- * Subtracts vector b from vector a
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- return out;
- };
-
- /**
- * Alias for {@link vec2.subtract}
- * @function
- */
- vec2.sub = vec2.subtract;
-
- /**
- * Multiplies two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- return out;
- };
-
- /**
- * Alias for {@link vec2.multiply}
- * @function
- */
- vec2.mul = vec2.multiply;
-
- /**
- * Divides two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- return out;
- };
-
- /**
- * Alias for {@link vec2.divide}
- * @function
- */
- vec2.div = vec2.divide;
-
- /**
- * Returns the minimum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- return out;
- };
-
- /**
- * Returns the maximum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
- vec2.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- return out;
- };
-
- /**
- * Scales a vec2 by a scalar number
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec2} out
- */
- vec2.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- return out;
- };
-
- /**
- * Adds two vec2's after scaling the second operand by a scalar value
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec2} out
- */
- vec2.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- return out;
- };
-
- /**
- * Calculates the euclidian distance between two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} distance between a and b
- */
- vec2.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return Math.sqrt(x*x + y*y);
- };
-
- /**
- * Alias for {@link vec2.distance}
- * @function
- */
- vec2.dist = vec2.distance;
-
- /**
- * Calculates the squared euclidian distance between two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} squared distance between a and b
- */
- vec2.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return x*x + y*y;
- };
-
- /**
- * Alias for {@link vec2.squaredDistance}
- * @function
- */
- vec2.sqrDist = vec2.squaredDistance;
-
- /**
- * Calculates the length of a vec2
- *
- * @param {vec2} a vector to calculate length of
- * @returns {Number} length of a
- */
- vec2.length = function (a) {
- var x = a[0],
- y = a[1];
- return Math.sqrt(x*x + y*y);
- };
-
- /**
- * Alias for {@link vec2.length}
- * @function
- */
- vec2.len = vec2.length;
-
- /**
- * Calculates the squared length of a vec2
- *
- * @param {vec2} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
- vec2.squaredLength = function (a) {
- var x = a[0],
- y = a[1];
- return x*x + y*y;
- };
-
- /**
- * Alias for {@link vec2.squaredLength}
- * @function
- */
- vec2.sqrLen = vec2.squaredLength;
-
- /**
- * Negates the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to negate
- * @returns {vec2} out
- */
- vec2.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- return out;
- };
-
- /**
- * Returns the inverse of the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to invert
- * @returns {vec2} out
- */
- vec2.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- return out;
- };
-
- /**
- * Normalize a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to normalize
- * @returns {vec2} out
- */
- vec2.normalize = function(out, a) {
- var x = a[0],
- y = a[1];
- var len = x*x + y*y;
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- }
- return out;
- };
-
- /**
- * Calculates the dot product of two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} dot product of a and b
- */
- vec2.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1];
- };
-
- /**
- * Computes the cross product of two vec2's
- * Note that the cross product must by definition produce a 3D vector
- *
- * @param {vec3} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec3} out
- */
- vec2.cross = function(out, a, b) {
- var z = a[0] * b[1] - a[1] * b[0];
- out[0] = out[1] = 0;
- out[2] = z;
- return out;
- };
-
- /**
- * Performs a linear interpolation between two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec2} out
- */
- vec2.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- return out;
- };
-
- /**
- * Generates a random vector with the given scale
- *
- * @param {vec2} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec2} out
- */
- vec2.random = function (out, scale) {
- scale = scale || 1.0;
- var r = glMatrix.RANDOM() * 2.0 * Math.PI;
- out[0] = Math.cos(r) * scale;
- out[1] = Math.sin(r) * scale;
- return out;
- };
-
- /**
- * Transforms the vec2 with a mat2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat2} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat2 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y;
- out[1] = m[1] * x + m[3] * y;
- return out;
- };
-
- /**
- * Transforms the vec2 with a mat2d
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat2d} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat2d = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y + m[4];
- out[1] = m[1] * x + m[3] * y + m[5];
- return out;
- };
-
- /**
- * Transforms the vec2 with a mat3
- * 3rd vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat3} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat3 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[3] * y + m[6];
- out[1] = m[1] * x + m[4] * y + m[7];
- return out;
- };
-
- /**
- * Transforms the vec2 with a mat4
- * 3rd vector component is implicitly '0'
- * 4th vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec2} out
- */
- vec2.transformMat4 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[4] * y + m[12];
- out[1] = m[1] * x + m[5] * y + m[13];
- return out;
- };
-
- /**
- * Perform some operation over an array of vec2s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
- vec2.forEach = (function() {
- var vec = vec2.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 2;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1];
- }
-
- return a;
- };
- })();
-
- /**
- * Returns a string representation of a vector
- *
- * @param {vec2} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
- vec2.str = function (a) {
- return 'vec2(' + a[0] + ', ' + a[1] + ')';
- };
-
- module.exports = vec2;
-
-
-/***/ }
-/******/ ])
-});
-; \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allclasses.tmpl b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allclasses.tmpl
deleted file mode 100644
index e89da024d82..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allclasses.tmpl
+++ /dev/null
@@ -1,14 +0,0 @@
-<div align="center">{+new Link().toFile("index.html").withText("Class Index")+}
-| {+new Link().toFile("files.html").withText("File Index")+}</div>
-<hr />
-<h2>Classes</h2>
-<ul class="classList">
- <for each="thisClass" in="data">
- <li>{!
- if (thisClass.alias != "_global_") {
- output += new Link().toClass(thisClass.alias);
- }
- !}</li>
- </for>
-</ul>
-<hr /> \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allfiles.tmpl b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allfiles.tmpl
deleted file mode 100644
index c6e40c9a4fe..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/allfiles.tmpl
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
- {! Link.base = ""; /* all generated links will be relative to this */ !}
- <title>glMatrix - File Index</title>
- <meta name="generator" content="JsDoc Toolkit" />
-
- <style type="text/css">
- {+include("static/default.css")+}
- </style>
- </head>
-
- <body>
- {+include("static/header.html")+}
-
- <div class="wrapper">
-
- <header id="index">
- {+publish.classesIndex+}
- </header>
-
- <section id="content">
- <h1 class="classTitle">File Index</h1>
-
- <for each="item" in="data">
- <div>
- <h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
- <if test="item.desc">{+resolveLinks(item.desc)+}</if>
- <dl>
- <if test="item.author">
- <dt class="heading">Author:</dt>
- <dd>{+item.author+}</dd>
- </if>
- <if test="item.version">
- <dt class="heading">Version:</dt>
- <dd>{+item.version+}</dd>
- </if>
- {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !}
- <if test="locations.length">
- <dt class="heading">Location:</dt>
- <for each="location" in="locations">
- <dd><a href="{+location+}">{+location+}</a></dd>
- </for>
- </if>
- </dl>
- </div>
- <hr />
- </for>
-
- </section>
-
- <footer>
- <small>
- <if test="JSDOC.opt.D.copyright">&copy;{+JSDOC.opt.D.copyright+}<br /></if>
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
- <br/><br/>
- Theme based on Github Pages template by <a href="https://github.com/orderedlist">orderedlist</a>
- </small>
- </footer>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/class.tmpl b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/class.tmpl
deleted file mode 100644
index cb1d2b0f3d6..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/class.tmpl
+++ /dev/null
@@ -1,340 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
- <meta name="generator" content="JsDoc Toolkit" />
- {! Link.base = "../"; /* all generated links will be relative to this */ !}
- <title>glMatrix - {+data.alias+}</title>
-
- <style type="text/css">
- {+include("static/default.css")+}
- </style>
- </head>
-
- <body>
-<!-- ============================== header ================================= -->
- <!-- begin static/header.html -->
- {+include("static/header.html")+}
- <!-- end static/header.html -->
-
- <div class="wrapper">
-<!-- ============================== classes index ============================ -->
- <header id="index">
- <!-- begin publish.classesIndex -->
- {+publish.classesIndex+}
- <!-- end publish.classesIndex -->
- </header>
-
- <section id="content">
-<!-- ============================== class title ============================ -->
- <h1 class="classTitle">
- {!
- var classType = "";
-
- if (data.isBuiltin()) {
- classType += "Built-In ";
- }
-
- if (data.isNamespace) {
- if (data.is('FUNCTION')) {
- classType += "Function ";
- }
- classType += "Namespace ";
- }
- else {
- classType += "Class ";
- }
- !}
- {+classType+}{+data.alias+}
- </h1>
-
-<!-- ============================== class summary ========================== -->
- <p class="description">
- <if test="data.version"><br />Version
- {+ data.version +}.<br />
- </if>
- <if test="data.augments.length"><br />Extends
- {+
- data.augments
- .sort()
- .map(
- function($) { return new Link().toSymbol($); }
- )
- .join(", ")
- +}.<br />
- </if>
-
- {+resolveLinks(data.classDesc)+}
-
- <if test="data.desc">
- <div class="description">{+resolveLinks(summarize(data.desc))+}</div>
- </if>
-
- <if test="!data.isBuiltin()">{# isn't defined in any file #}
- <br /><i>Defined in: </i> {+new Link().toSrc(data.srcFile)+}.
- </if>
- </p>
-
-<!-- ============================== properties summary ===================== -->
- <if test="data.properties.length">
- {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !}
- <if test="ownProperties.length">
- <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class {+data.alias+}.">
- <caption>Field Summary</caption>
- <thead>
- <tr>
- <th scope="col">Field Attributes</th>
- <th scope="col">Field Name and Description</th>
- </tr>
- </thead>
- <tbody>
- <for each="member" in="ownProperties">
- <tr>
- <td class="attributes">{!
- if (member.isPrivate) output += "&lt;private&gt; ";
- if (member.isInner) output += "&lt;inner&gt; ";
- if (member.isStatic) output += "&lt;static&gt; ";
- if (member.isConstant) output += "&lt;constant&gt; ";
- !}&nbsp;</td>
- <td class="nameDescription">
- <div class="fixedFont">
- <if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>
- </div>
- <div class="description">{+resolveLinks(summarize(member.desc))+}</div>
- </td>
- </tr>
- </for>
- </tbody>
- </table>
- </if>
-
- <if test="data.inheritsFrom.length">
- <dl class="inheritsList">
- {!
- var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias});
-
- var contributers = [];
- borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
- for (var i = 0, l = contributers.length; i < l; i++) {
- output +=
- "<dt>Fields borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
- +
- "<dd>" +
- borrowedMembers
- .filter(
- function($) { return $.memberOf == contributers[i] }
- )
- .sort(makeSortby("name"))
- .map(
- function($) { return new Link().toSymbol($.alias).withText($.name) }
- )
- .join(", ")
- +
- "</dd>";
- }
- !}
- </dl>
- </if>
- </if>
-
-<!-- ============================== methods summary ======================== -->
- <if test="data.methods.length">
- {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !}
- <if test="ownMethods.length">
- <h2>Methods</h2>
- <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class {+data.alias+}.">
- <tbody>
- <for each="member" in="ownMethods">
- <tr>
- <td class="nameDescription">
- <code class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}</b>{+makeSignature(member.params)+}
- </code>
- <div class="description">{+resolveLinks(summarize(member.desc))+}</div>
- </td>
- </tr>
- </for>
- </tbody>
- </table>
- </if>
- </if>
-
-<!-- ============================== field details ========================== -->
- <if test="defined(ownProperties) && ownProperties.length">
- <div class="sectionTitle">
- Field Detail
- </div>
- <for each="member" in="ownProperties">
- <a name="{+Link.symbolNameToLinkName(member)+}"> </a>
- <div class="fixedFont">{!
- if (member.isPrivate) output += "&lt;private&gt; ";
- if (member.isInner) output += "&lt;inner&gt; ";
- if (member.isStatic) output += "&lt;static&gt; ";
- if (member.isConstant) output += "&lt;constant&gt; ";
- !}
-
- <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
- <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>
-
- </div>
- <div class="description">
- {+resolveLinks(member.desc)+}
- <if test="member.srcFile != data.srcFile">
- <br />
- <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
- </if>
- <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
- </div>
-
- <if test="member.example.length">
- <for each="example" in="member.example">
- <pre class="code">{+example+}</pre>
- </for>
- </if>
-
- <if test="member.deprecated">
- <dl class="detailList">
- <dt class="heading">Deprecated:</dt>
- <dt>
- {+ resolveLinks(member.deprecated) +}
- </dt>
- </dl>
- </if>
- <if test="member.since">
- <dl class="detailList">
- <dt class="heading">Since:</dt>
- <dd>{+ member.since +}</dd>
- </dl>
- </if>
- <if test="member.see.length">
- <dl class="detailList">
- <dt class="heading">See:</dt>
- <for each="item" in="member.see">
- <dd>{+ new Link().toSymbol(item) +}</dd>
- </for>
- </dl>
- </if>
- <if test="member.defaultValue">
- <dl class="detailList">
- <dt class="heading">Default Value:</dt>
- <dd>
- {+resolveLinks(member.defaultValue)+}
- </dd>
- </dl>
- </if>
-
- <if test="!$member_last"><hr /></if>
- </for>
- </if>
-
-<!-- ============================== method details ========================= -->
- <if test="defined(ownMethods) && ownMethods.length">
- <h2>Method Detail</h2>
- <for each="member" in="ownMethods">
- <a name="{+Link.symbolNameToLinkName(member)+}"> </a>
- <h3 class="fixedFont">
- <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
- <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name.replace(/\^\d+$/, '')+}</b>{+makeSignature(member.params)+}
- </h3>
-
- <div style="margin-left: 1em;">
- <p class="description">
- {+resolveLinks(member.desc)+}
- <if test="member.srcFile != data.srcFile">
- <br />
- <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
- </if>
- <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
- </p>
-
- <if test="member.example.length">
- <for each="example" in="member.example">
- <pre class="code">{+example+}</pre>
- </for>
- </if>
-
- <if test="member.params.length">
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
- <for each="item" in="member.params">
- <dt>
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
- <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
- </dt>
- <dd>{+resolveLinks(item.desc)+}</dd>
- </for>
- </dl>
- </if>
- <if test="member.deprecated">
- <dl class="detailList">
- <dt class="heading">Deprecated:</dt>
- <dt>
- {+ resolveLinks(member.deprecated) +}
- </dt>
- </dl>
- </if>
- <if test="member.since">
- <dl class="detailList">
- <dt class="heading">Since:</dt>
- <dd>{+ member.since +}</dd>
- </dl>
- </dl>
- </if>
- <if test="member.exceptions.length">
- <dl class="detailList">
- <dt class="heading">Throws:</dt>
- <for each="item" in="member.exceptions">
- <dt>
- {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
- </dt>
- <dd>{+resolveLinks(item.desc)+}</dd>
- </for>
- </dl>
- </if>
- <if test="member.returns.length">
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
- <for each="item" in="member.returns">
- <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
- </for>
- </dl>
- </if>
- <if test="member.requires.length">
- <dl class="detailList">
- <dt class="heading">Requires:</dt>
- <for each="item" in="member.requires">
- <dd>{+ resolveLinks(item) +}</dd>
- </for>
- </dl>
- </if>
- <if test="member.see.length">
- <dl class="detailList">
- <dt class="heading">See:</dt>
- <for each="item" in="member.see">
- <dd>{+ new Link().toSymbol(item) +}</dd>
- </for>
- </dl>
- </if>
-
- <if test="!$member_last"><hr /></if>
- </div>
- </for>
- </if>
-
- <hr />
- </section>
-
-
-<!-- ============================== footer ================================= -->
- <footer>
- <small>
- <if test="JSDOC.opt.D.copyright">&copy;{+JSDOC.opt.D.copyright+}<br /></if>
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
- <br/><br/>
- Theme based on Github Pages template by <a href="https://github.com/orderedlist">orderedlist</a>
- </small>
- </footer>
-
- </div>
- </body>
-</html>
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/index.tmpl b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/index.tmpl
deleted file mode 100644
index 7c92dd40ccd..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/index.tmpl
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
-
- <title>glMatrix - Index</title>
- <meta name="generator" content="JsDoc Toolkit" />
-
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-
- <style type="text/css">
- {+include("static/default.css")+}
- </style>
- </head>
-
- <body>
- {+include("static/header.html")+}
-
- <div class="wrapper">
-
- <header id="index">
- {+publish.classesIndex+}
- </header>
-
- <section id="content">
- <h1 class="classTitle">Class Index</h1>
-
- <for each="thisClass" in="data">
- <if test="thisClass.alias != '_global_'">
- <div>
- <h2>{+(new Link().toSymbol(thisClass.alias))+}</h2>
- {+resolveLinks(summarize(thisClass.classDesc))+}
- </div>
- <hr />
- </if>
- </for>
-
- </section>
-
- <footer>
- <small>
- <if test="JSDOC.opt.D.copyright">&copy;{+JSDOC.opt.D.copyright+}<br /></if>
- Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
- <br/><br/>
- Theme based on Github Pages template by <a href="https://github.com/orderedlist">orderedlist</a>
- </small>
- </footer>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/publish.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/publish.js
deleted file mode 100644
index 82c20045e94..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/publish.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/** Called automatically by JsDoc Toolkit. */
-function publish(symbolSet) {
- publish.conf = { // trailing slash expected for dirs
- ext: ".html",
- outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/",
- templatesDir: JSDOC.opt.t || SYS.pwd+"../jsdoc-template/",
- symbolsDir: "symbols/",
- srcDir: "symbols/src/"
- };
-
- // is source output is suppressed, just display the links to the source file
- if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) {
- Link.prototype._makeSrcLink = function(srcFilePath) {
- return "&lt;"+srcFilePath+"&gt;";
- }
- }
-
- // create the folders and subfolders to hold the output
- IO.mkPath((publish.conf.outDir+"symbols/src").split("/"));
-
- // used to allow Link to check the details of things being linked to
- Link.symbolSet = symbolSet;
-
- // create the required templates
- try {
- var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl");
- var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl");
- }
- catch(e) {
- print("Couldn't create the required templates: "+e);
- quit();
- }
-
- // some ustility filters
- function hasNoParent($) {return ($.memberOf == "")}
- function isaFile($) {return ($.is("FILE"))}
- function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)}
-
- // get an array version of the symbolset, useful for filtering
- var symbols = symbolSet.toArray();
-
- // create the hilited source code files
- var files = JSDOC.opt.srcFiles;
- for (var i = 0, l = files.length; i < l; i++) {
- var file = files[i];
- var srcDir = publish.conf.outDir + "symbols/src/";
- makeSrcFile(file, srcDir);
- }
-
- // get a list of all the classes in the symbolset
- var classes = symbols.filter(isaClass).sort(makeSortby("alias"));
-
- // create a filemap in which outfiles must be to be named uniquely, ignoring case
- if (JSDOC.opt.u) {
- var filemapCounts = {};
- Link.filemap = {};
- for (var i = 0, l = classes.length; i < l; i++) {
- var lcAlias = classes[i].alias.toLowerCase();
-
- if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1;
- else filemapCounts[lcAlias]++;
-
- Link.filemap[classes[i].alias] =
- (filemapCounts[lcAlias] > 1)?
- lcAlias+"_"+filemapCounts[lcAlias] : lcAlias;
- }
- }
-
- // create a class index, displayed in the left-hand column of every class page
- Link.base = "../";
- publish.classesIndex = classesTemplate.process(classes); // kept in memory
-
- // create each of the class pages
- for (var i = 0, l = classes.length; i < l; i++) {
- var symbol = classes[i];
-
- symbol.events = symbol.getEvents(); // 1 order matters
- symbol.methods = symbol.getMethods(); // 2
-
- Link.currentSymbol= symbol;
- var output = "";
- output = classTemplate.process(symbol);
-
- IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output);
- }
-
- // regenerate the index with different relative links, used in the index pages
- Link.base = "";
- publish.classesIndex = classesTemplate.process(classes);
-
- // create the class index page
- try {
- var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl");
- }
- catch(e) { print(e.message); quit(); }
-
- var classesIndex = classesindexTemplate.process(classes);
- IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex);
- classesindexTemplate = classesIndex = classes = null;
-
- // create the file index page
- try {
- var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl");
- }
- catch(e) { print(e.message); quit(); }
-
- var documentedFiles = symbols.filter(isaFile); // files that have file-level docs
- var allFiles = []; // not all files have file-level docs, but we need to list every one
-
- for (var i = 0; i < files.length; i++) {
- allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */")));
- }
-
- for (var i = 0; i < documentedFiles.length; i++) {
- var offset = files.indexOf(documentedFiles[i].alias);
- allFiles[offset] = documentedFiles[i];
- }
-
- allFiles = allFiles.sort(makeSortby("name"));
-
- // output the file index page
- var filesIndex = fileindexTemplate.process(allFiles);
- IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex);
- fileindexTemplate = filesIndex = files = null;
-}
-
-
-/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */
-function summarize(desc) {
- if (typeof desc != "undefined")
- return desc.match(/([\w\W]+?\.)[^a-z0-9_$]/i)? RegExp.$1 : desc;
-}
-
-/** Make a symbol sorter by some attribute. */
-function makeSortby(attribute) {
- return function(a, b) {
- if (a[attribute] != undefined && b[attribute] != undefined) {
- a = a[attribute].toLowerCase();
- b = b[attribute].toLowerCase();
- if (a < b) return -1;
- if (a > b) return 1;
- return 0;
- }
- }
-}
-
-/** Pull in the contents of an external file at the given path. */
-function include(path) {
- var path = publish.conf.templatesDir+path;
- return IO.readFile(path);
-}
-
-/** Turn a raw source file into a code-hilited page in the docs. */
-function makeSrcFile(path, srcDir, name) {
- if (JSDOC.opt.s) return;
-
- if (!name) {
- name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_");
- name = name.replace(/\:/g, "_");
- }
-
- var src = {path: path, name:name, charset: IO.encoding, hilited: ""};
-
- if (defined(JSDOC.PluginManager)) {
- JSDOC.PluginManager.run("onPublishSrc", src);
- }
-
- if (src.hilited) {
- IO.saveFile(srcDir, name+publish.conf.ext, src.hilited);
- }
-}
-
-/** Build output for displaying function parameters. */
-function makeSignature(params) {
- if (!params) return "()";
- var signature = "("
- +
- params.filter(
- function($) {
- return $.name.indexOf(".") == -1; // don't show config params in signature
- }
- ).map(
- function($) {
- return $.name;
- }
- ).join(", ")
- +
- ")";
- return signature;
-}
-
-/** Find symbol {@link ...} strings in text and turn into html links */
-function resolveLinks(str, from) {
- str = str.replace(/\{@link ([^} ]+) ?\}/gi,
- function(match, symbolName) {
- return new Link().toSymbol(symbolName);
- }
- );
-
- return str;
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/default.css b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/default.css
deleted file mode 100644
index efcf7827133..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/default.css
+++ /dev/null
@@ -1,428 +0,0 @@
-/* default.css */
-
-/*
-
-body
-{
- font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
- width: 800px;
-}
-
-.header
-{
- clear: both;
- background-color: #ccc;
- padding: 8px;
-}
-
-h1
-{
- font-size: 150%;
- font-weight: bold;
- padding: 0;
- margin: 1em 0 0 .3em;
-}
-
-hr
-{
- border: none 0;
- border-top: 1px solid #7F8FB1;
- height: 1px;
-}
-
-pre.code
-{
- display: block;
- padding: 8px;
- border: 1px dashed #ccc;
-}
-
-#index
-{
- margin-top: 24px;
- float: left;
- width: 160px;
- position: absolute;
- left: 8px;
- background-color: #F3F3F3;
- padding: 8px;
-}
-
-#content
-{
- margin-left: 190px;
- width: 600px;
-}
-
-.classList
-{
- list-style-type: none;
- padding: 0;
- margin: 0 0 0 8px;
- font-family: arial, sans-serif;
- font-size: 1em;
- overflow: auto;
-}
-
-.classList li
-{
- padding: 0;
- margin: 0 0 8px 0;
-}
-
-.summaryTable { width: 100%; }
-
-h1.classTitle
-{
- font-size:170%;
- line-height:130%;
-}
-
-h2 { font-size: 110%; }
-caption, div.sectionTitle
-{
- background-color: #7F8FB1;
- color: #fff;
- font-size:130%;
- text-align: left;
- padding: 2px 6px 2px 6px;
- border: 1px #7F8FB1 solid;
-}
-
-div.sectionTitle { margin-bottom: 8px; }
-.summaryTable thead { display: none; }
-
-.summaryTable td
-{
- vertical-align: top;
- padding: 4px;
- border-bottom: 1px #7F8FB1 solid;
- border-right: 1px #7F8FB1 solid;
- border-left: 1px #7F8FB1 solid;
-}
-
-.summaryTable td.attributes
-{
- border-left: 1px #7F8FB1 solid;
- width: 140px;
- text-align: right;
-}
-
-td.attributes, .fixedFont
-{
- line-height: 15px;
- color: #002EBE;
- font-family: "Courier New",Courier,monospace;
- font-size: 13px;
-}
-
-.summaryTable td.nameDescription
-{
- text-align: left;
- font-size: 13px;
- line-height: 15px;
-}
-
-.summaryTable td.nameDescription, .description
-{
- line-height: 15px;
- padding: 4px;
- padding-left: 4px;
-}
-
-.summaryTable { margin-bottom: 8px; }
-
-ul.inheritsList
-{
- list-style: square;
- margin-left: 20px;
- padding-left: 0;
-}
-
-.detailList {
- margin-left: 20px;
- line-height: 15px;
-}
-.detailList dt { margin-left: 20px; }
-
-.detailList .heading
-{
- font-weight: bold;
- padding-bottom: 6px;
- margin-left: 0;
-}
-
-.light, td.attributes, .light a:link, .light a:visited
-{
- color: #777;
- font-style: italic;
-}
-
-.fineprint
-{
- text-align: right;
- font-size: 10px;
-}
-
-*/
-
-/* Copied from styles.css generated by Github Pages */
-
-@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700);
-
-body {
- padding:50px;
- font:14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
- color:#777;
- font-weight:300;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color:#222;
- margin:0 0 20px;
-}
-
-p, ul, ol, table, pre, dl {
- margin:0 0 20px;
-}
-
-h1, h2, h3 {
- line-height:1.1;
-}
-
-h1 {
- font-size:28px;
-}
-
-h2 {
- color:#393939;
-}
-
-h3, h4, h5, h6 {
- color:#494949;
-}
-
-a {
- color:#39c;
- font-weight:400;
- text-decoration:none;
-}
-
-a small {
- font-size:11px;
- color:#777;
- margin-top:-0.6em;
- display:block;
-}
-
-.wrapper {
- width:860px;
- margin:0 auto;
-}
-
-blockquote {
- border-left:1px solid #e5e5e5;
- margin:0;
- padding:0 0 0 20px;
- font-style:italic;
-}
-
-code, pre {
- font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
- color:#333;
- font-size:12px;
-}
-
-pre {
- padding:8px 15px;
- background: #f8f8f8;
- border-radius:5px;
- border:1px solid #e5e5e5;
- overflow-x: auto;
-}
-
-table {
- width:100%;
- border-collapse:collapse;
-}
-
-th, td {
- text-align:left;
- padding:5px 10px;
- border-bottom:1px solid #e5e5e5;
-}
-
-dt {
- color:#444;
- font-weight:700;
-}
-
-th {
- color:#444;
-}
-
-img {
- max-width:100%;
-}
-
-header {
- width:270px;
- float:left;
- position:fixed;
-}
-
-header ul {
- list-style:none;
- padding:0;
-
- /*background: #eee;
- background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
- background: -webkit-linear-gradient(top, #f8f8f8 0%,#dddddd 100%);
- background: -o-linear-gradient(top, #f8f8f8 0%,#dddddd 100%);
- background: -ms-linear-gradient(top, #f8f8f8 0%,#dddddd 100%);
- background: linear-gradient(top, #f8f8f8 0%,#dddddd 100%);
-
- border-radius:5px;
- border:1px solid #d2d2d2;
- box-shadow:inset #fff 0 1px 0, inset rgba(0,0,0,0.03) 0 -1px 0;*/
- width:270px;
-}
-
-header li {
- width:89px;
- /*float:left;
- border-right:1px solid #d2d2d2;
- height:40px;*/
-}
-
-header ul a {
- line-height:1;
- font-size:11px;
- color:#999;
- display:block;
- text-align:center;
- padding-top:6px;
- /*height:40px;*/
-}
-
-strong {
- color:#222;
- font-weight:700;
-}
-
-/*header ul li + li {
- width:88px;
- border-left:1px solid #fff;
-}
-
-header ul li + li + li {
- border-right:none;
- width:89px;
-}*/
-
-header ul a strong {
- font-size:14px;
- display:block;
- color:#222;
-}
-
-section {
- width:500px;
- float:right;
- padding-bottom:50px;
-}
-
-small {
- font-size:11px;
-}
-
-hr {
- border:0;
- background:#e5e5e5;
- height:1px;
- margin:0 0 20px;
-}
-
-footer {
- width:270px;
- float:left;
- position:fixed;
- bottom:50px;
-}
-
-@media print, screen and (max-width: 960px) {
-
- div.wrapper {
- width:auto;
- margin:0;
- }
-
- header, section, footer {
- float:none;
- position:static;
- width:auto;
- }
-
- header {
- /*padding-right:320px;*/
- padding: 0;
- }
-
- section {
- border:1px solid #e5e5e5;
- border-width:1px 0;
- padding:20px 0;
- margin:0 0 20px;
- }
-
- header a small {
- display:inline;
- }
-
- header ul {
- position:static;
- height:40px;
- width: auto;
- }
-
- header ul li {
- float: left;
- }
-}
-
-@media print, screen and (max-width: 720px) {
- body {
- word-wrap:break-word;
- }
-
- header {
- padding:0;
- }
-
- header ul, header p.view {
- position:static;
- }
-
- pre, code {
- word-wrap:normal;
- }
-}
-
-@media print, screen and (max-width: 480px) {
- body {
- padding:15px;
- }
-
- /*header ul {
- display:none;
- }*/
-}
-
-@media print {
- body {
- padding:0.4in;
- font-size:12pt;
- color:#444;
- }
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/header.html b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/header.html
deleted file mode 100644
index 353b735a4ca..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/header.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<div id="header">
-</div> \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/index.html b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/index.html
deleted file mode 100644
index d51d4efaa15..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/static/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>glMatrix Documentation</title>
-</head>
-<frameset cols="20%,80%">
- <frame src="allclasses-frame.html" name="packageFrame" />
- <frame src="splash.html" name="classFrame" />
- <noframes>
- <body>
- <p>
- This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
- </p>
- </body>
- </noframes>
-</frameset>
-</html> \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/symbol.tmpl b/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/symbol.tmpl
deleted file mode 100644
index f8f4bd1f6f2..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/jsdoc-template/symbol.tmpl
+++ /dev/null
@@ -1,35 +0,0 @@
-<symbol alias="{+data.alias+}">
- <name>{+data.name+}</name>
- <memberOf>{+data.memberOf+}</memberOf>
- <isStatic>{+data.isStatic+}</isStatic>
- <isa>{+data.isa+}</isa>
- <desc>{+data.desc+}</desc>
- <classDesc>{+data.classDesc+}</classDesc>
-
- <methods><for each="method" in="data.methods">
- <method>
- <name>{+method.name+}</name>
- <memberOf>{+method.memberOf+}</memberOf>
- <isStatic>{+method.isStatic+}</isStatic>
- <desc>{+method.desc+}</desc>
- <params><for each="param" in="method.params">
- <param>
- <type>{+param.type+}</type>
- <name>{+param.name+}</name>
- <desc>{+param.desc+}</desc>
- <defaultValue>{+param.defaultValue+}</defaultValue>
- </param></for>
- </params>
- </method></for>
- </methods>
-
- <properties><for each="property" in="data.properties">
- <property>
- <name>{+property.name+}</name>
- <memberOf>{+property.memberOf+}</memberOf>
- <isStatic>{+property.isStatic+}</isStatic>
- <desc>{+property.desc+}</desc>
- <type>{+property.type+}</type>
- </property></for>
- </properties>
-</symbol>
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/package.json b/chromium/third_party/catapult/tracing/third_party/gl-matrix/package.json
deleted file mode 100644
index f92ab7d2083..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "gl-matrix",
- "description": "Javascript Matrix and Vector library for High Performance WebGL apps",
- "version": "2.3.1",
- "main": "src/gl-matrix.js",
- "homepage": "http://glmatrix.net",
- "bugs": {
- "url": "https://github.com/toji/gl-matrix/issues"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/toji/gl-matrix.git"
- },
- "contributors": [
- {
- "name": "Brandon Jones",
- "email": "tojiro@gmail.com"
- },
- {
- "name": "Colin MacKenzie IV",
- "email": "sinisterchipmunk@gmail.com"
- }
- ],
- "devDependencies": {
- "jasmine-node": "1.2.2",
- "node-libs-browser": "^0.5.2",
- "webpack": "^1.9.10"
- },
- "license": "MIT"
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/common-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/common-spec.js
deleted file mode 100644
index b6649d09587..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/common-spec.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-* common.js unit test
-*/
-
-describe("glMatrix", function(){
- var result;
-
- var glMatrix = require("../../src/gl-matrix/common.js");
-
- describe("toRadian", function(){
- beforeEach(function(){ result = glMatrix.toRadian(180); });
- it("should return a value of 3.141592654(Math.PI)", function(){ expect(result).toBeEqualish(Math.PI); });
- });
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2-spec.js
deleted file mode 100644
index e901d332a6c..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2-spec.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("mat2", function() {
- var mat2 = require("../../src/gl-matrix/mat2.js");
-
- var out, matA, matB, identity, result;
-
- beforeEach(function() {
- matA = [1, 2,
- 3, 4];
-
- matB = [5, 6,
- 7, 8];
-
- out = [0, 0,
- 0, 0];
-
- identity = [1, 0,
- 0, 1];
- });
-
- describe("create", function() {
- beforeEach(function() { result = mat2.create(); });
- it("should return a 4 element array initialized to a 2x2 identity matrix", function() { expect(result).toBeEqualish(identity); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = mat2.clone(matA); });
- it("should return a 4 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = mat2.copy(out, matA); });
- it("should place values into out", function() { expect(out).toBeEqualish(matA); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("identity", function() {
- beforeEach(function() { result = mat2.identity(out); });
- it("should place values into out", function() { expect(result).toBeEqualish(identity); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("transpose", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2.transpose(out, matA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 3, 2, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2.transpose(matA, matA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([1, 3, 2, 4]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("invert", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2.invert(out, matA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-2, 1, 1.5, -0.5]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2.invert(matA, matA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([-2, 1, 1.5, -0.5]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("adjoint", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2.adjoint(out, matA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([4, -2, -3, 1]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2.adjoint(matA, matA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([4, -2, -3, 1]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("determinant", function() {
- beforeEach(function() { result = mat2.determinant(matA); });
-
- it("should return the determinant", function() { expect(result).toEqual(-2); });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(mat2.mul).toEqual(mat2.multiply); });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2.multiply(out, matA, matB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([23, 34, 31, 46]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2.multiply(matA, matA, matB); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([23, 34, 31, 46]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- it("should not modify matB", function() { expect(matB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when matB is the output matrix", function() {
- beforeEach(function() { result = mat2.multiply(matB, matA, matB); });
-
- it("should place values into matB", function() { expect(matB).toBeEqualish([23, 34, 31, 46]); });
- it("should return matB", function() { expect(result).toBe(matB); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("rotate", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2.rotate(out, matA, Math.PI * 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4, -1, -2]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2.rotate(matA, matA, Math.PI * 0.5); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([3, 4, -1, -2]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("scale", function() {
- var vecA;
- beforeEach(function() { vecA = [2, 3]; });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2.scale(out, matA, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 9, 12]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2.scale(matA, matA, vecA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 9, 12]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("str", function() {
- beforeEach(function() { result = mat2.str(matA); });
-
- it("should return a string representation of the matrix", function() { expect(result).toEqual("mat2(1, 2, 3, 4)"); });
- });
-
- describe("frob", function() {
- beforeEach(function() { result = mat2.frob(matA); });
- it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(3, 2) + Math.pow(4, 2))); });
- });
-
- describe("LDU", function() {
- beforeEach(function() {L = mat2.create(); D = mat2.create(); U = mat2.create(); result = mat2.LDU(L, D, U, [4,3,6,3]);
- L_result = mat2.create(); L_result[2] = 1.5;
- D_result = mat2.create();
- U_result = mat2.create();
- U_result[0] = 4; U_result[1] = 3; U_result[3] = -1.5;
- });
- it("should return a lower triangular, a diagonal and an upper triangular matrix", function() {
- expect(result[0]).toBeEqualish(L_result);
- expect(result[1]).toBeEqualish(D_result);
- expect(result[2]).toBeEqualish(U_result);
- });
- });
-
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2d-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2d-spec.js
deleted file mode 100644
index dda0ddd6bc2..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat2d-spec.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("mat2d", function() {
- var mat2d = require("../../src/gl-matrix/mat2d.js");
-
- var out, matA, matB, identity, result;
-
- beforeEach(function() {
- matA = [1, 2,
- 3, 4,
- 5, 6];
-
- oldA = [1, 2,
- 3, 4,
- 5, 6];
-
- matB = [7, 8,
- 9, 10,
- 11, 12];
-
- oldB = [7, 8,
- 9, 10,
- 11, 12];
-
- out = [0, 0,
- 0, 0,
- 0, 0];
-
- identity = [1, 0,
- 0, 1,
- 0, 0];
- });
-
- describe("create", function() {
- beforeEach(function() { result = mat2d.create(); });
- it("should return a 6 element array initialized to a 2x3 identity matrix", function() { expect(result).toBeEqualish(identity); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = mat2d.clone(matA); });
- it("should return a 6 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = mat2d.copy(out, matA); });
- it("should place values into out", function() { expect(out).toBeEqualish(matA); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("identity", function() {
- beforeEach(function() { result = mat2d.identity(out); });
- it("should place values into out", function() { expect(result).toBeEqualish(identity); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("invert", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2d.invert(out, matA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([ -2, 1, 1.5, -0.5, 1, -2 ]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2d.invert(matA, matA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([ -2, 1, 1.5, -0.5, 1, -2 ]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("determinant", function() {
- beforeEach(function() { result = mat2d.determinant(matA); });
-
- it("should return the determinant", function() { expect(result).toEqual(-2); });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(mat2d.mul).toEqual(mat2d.multiply); });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2d.multiply(out, matA, matB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([31, 46, 39, 58, 52, 76]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); });
- it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2d.multiply(matA, matA, matB); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([31, 46, 39, 58, 52, 76]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- it("should not modify matB", function() { expect(matB).toBeEqualish(oldB); });
- });
-
- describe("when matB is the output matrix", function() {
- beforeEach(function() { result = mat2d.multiply(matB, matA, matB); });
-
- it("should place values into matB", function() { expect(matB).toBeEqualish([31, 46, 39, 58, 52, 76]); });
- it("should return matB", function() { expect(result).toBe(matB); });
- it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); });
- });
- });
-
- describe("rotate", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2d.rotate(out, matA, Math.PI * 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4, -1, -2, 5, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2d.rotate(matA, matA, Math.PI * 0.5); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([3, 4, -1, -2, 5, 6]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("scale", function() {
- var vecA;
- beforeEach(function() { vecA = [2, 3]; });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2d.scale(out, matA, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 9, 12, 5, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2d.scale(matA, matA, vecA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([2, 4, 9, 12, 5, 6]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("translate", function() {
- var vecA;
- beforeEach(function() { vecA = [2, 3]; });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat2d.translate(out, matA, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4, 16, 22]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() { expect(matA).toBeEqualish(oldA); });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat2d.translate(matA, matA, vecA); });
-
- it("should place values into matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 16, 22]); });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("str", function() {
- beforeEach(function() { result = mat2d.str(matA); });
-
- it("should return a string representation of the matrix", function() { expect(result).toEqual("mat2d(1, 2, 3, 4, 5, 6)"); });
- });
-
- describe("frob", function() {
- beforeEach(function() { result = mat2d.frob(matA); });
- it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(3, 2) + Math.pow(4, 2) + Math.pow(5, 2) + Math.pow(6, 2) + 1)); });
- });
-
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js
deleted file mode 100644
index 9a9d55a71de..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat3-spec.js
+++ /dev/null
@@ -1,347 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("mat3", function() {
- var mat3 = require("../../src/gl-matrix/mat3.js");
- var mat4 = require("../../src/gl-matrix/mat4.js");
- var vec3 = require("../../src/gl-matrix/vec3.js");
-
- var out, matA, matB, identity, result;
-
- beforeEach(function() {
- matA = [1, 0, 0,
- 0, 1, 0,
- 1, 2, 1];
-
- matB = [1, 0, 0,
- 0, 1, 0,
- 3, 4, 1];
-
- out = [0, 0, 0,
- 0, 0, 0,
- 0, 0, 0];
-
- identity = [1, 0, 0,
- 0, 1, 0,
- 0, 0, 1];
- });
-
- describe("normalFromMat4", function() {
- beforeEach(function() {
- matA = [1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1];
- result = mat3.normalFromMat4(out, matA);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- describe("with translation and rotation", function() {
- beforeEach(function() {
- mat4.translate(matA, matA, [2, 4, 6]);
- mat4.rotateX(matA, matA, Math.PI / 2);
-
- result = mat3.normalFromMat4(out, matA);
- });
-
- it("should give rotated matrix", function() {
- expect(result).toBeEqualish([1, 0, 0,
- 0, 0, 1,
- 0,-1, 0]);
- });
-
- describe("and scale", function() {
- beforeEach(function() {
- mat4.scale(matA, matA, [2, 3, 4]);
-
- result = mat3.normalFromMat4(out, matA);
- });
-
- it("should give rotated matrix", function() {
- expect(result).toBeEqualish([0.5, 0, 0,
- 0, 0, 0.333333,
- 0, -0.25, 0]);
- });
- });
- });
- });
-
- describe("fromQuat", function() {
- var q;
-
- beforeEach(function() {
- q = [ 0, -0.7071067811865475, 0, 0.7071067811865475 ];
- result = mat3.fromQuat(out, q);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should rotate a vector the same as the original quat", function() {
- expect(vec3.transformMat3([], [0,0,-1], out)).toBeEqualish(vec3.transformQuat([], [0,0,-1], q));
- });
-
- it("should rotate a vector by PI/2 radians", function() {
- expect(vec3.transformMat3([], [0,0,-1], out)).toBeEqualish([1,0,0]);
- });
- });
-
- describe("fromMat4", function() {
- beforeEach(function() {
- result = mat3.fromMat4(out, [ 1, 2, 3, 4,
- 5, 6, 7, 8,
- 9,10,11,12,
- 13,14,15,16]); });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should calculate proper mat3", function() {
- expect(out).toBeEqualish([ 1, 2, 3,
- 5, 6, 7,
- 9,10,11]);
- });
- });
-
- describe("scale", function() {
- beforeEach(function() { result = mat3.scale(out, matA, [2,2]); });
- it("should return out", function() { expect(result).toBe(out); });
- it('should place proper values in out', function() {
- expect(out).toBeEqualish([ 2, 0, 0,
- 0, 2, 0,
- 1, 2, 1 ]);
- });
- });
-
- describe("create", function() {
- beforeEach(function() { result = mat3.create(); });
- it("should return a 9 element array initialized to a 3x3 identity matrix", function() { expect(result).toBeEqualish(identity); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = mat3.clone(matA); });
- it("should return a 9 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = mat3.copy(out, matA); });
- it("should place values into out", function() { expect(out).toBeEqualish(matA); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("identity", function() {
- beforeEach(function() { result = mat3.identity(out); });
- it("should place values into out", function() { expect(result).toBeEqualish(identity); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("transpose", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat3.transpose(out, matA); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 1,
- 0, 1, 2,
- 0, 0, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 1, 2, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat3.transpose(matA, matA); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 1,
- 0, 1, 2,
- 0, 0, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("invert", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat3.invert(out, matA); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- -1, -2, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 1, 2, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat3.invert(matA, matA); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- -1, -2, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("adjoint", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat3.adjoint(out, matA); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- -1, -2, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 1, 2, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat3.adjoint(matA, matA); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- -1, -2, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("determinant", function() {
- beforeEach(function() { result = mat3.determinant(matA); });
-
- it("should return the determinant", function() { expect(result).toEqual(1); });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(mat3.mul).toEqual(mat3.multiply); });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat3.multiply(out, matA, matB); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 4, 6, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 1, 2, 1
- ]);
- });
- it("should not modify matB", function() {
- expect(matB).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 3, 4, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat3.multiply(matA, matA, matB); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 4, 6, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- it("should not modify matB", function() {
- expect(matB).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 3, 4, 1
- ]);
- });
- });
-
- describe("when matB is the output matrix", function() {
- beforeEach(function() { result = mat3.multiply(matB, matA, matB); });
-
- it("should place values into matB", function() {
- expect(matB).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 4, 6, 1
- ]);
- });
- it("should return matB", function() { expect(result).toBe(matB); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0,
- 0, 1, 0,
- 1, 2, 1
- ]);
- });
- });
- });
-
- describe("str", function() {
- beforeEach(function() { result = mat3.str(matA); });
-
- it("should return a string representation of the matrix", function() { expect(result).toEqual("mat3(1, 0, 0, 0, 1, 0, 1, 2, 1)"); });
- });
-
- describe("frob", function() {
- beforeEach(function() { result = mat3.frob(matA); });
- it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(0, 2) + Math.pow(0, 2) + Math.pow(0, 2) + Math.pow(1, 2) + Math.pow(0, 2) + Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(1, 2))); });
- });
-
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat4-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat4-spec.js
deleted file mode 100644
index 9b7a67f4ee6..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/mat4-spec.js
+++ /dev/null
@@ -1,637 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("mat4", function() {
- var mat4 = require("../../src/gl-matrix/mat4.js");
- var vec3 = require("../../src/gl-matrix/vec3.js");
-
- var out, matA, matB, identity, result;
-
- beforeEach(function() {
- // Attempting to portray a semi-realistic transform matrix
- matA = [1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1];
-
- matB = [1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 4, 5, 6, 1];
-
- out = [0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0];
-
- identity = [1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1];
- });
-
- describe("create", function() {
- beforeEach(function() { result = mat4.create(); });
- it("should return a 16 element array initialized to a 4x4 identity matrix", function() { expect(result).toBeEqualish(identity); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = mat4.clone(matA); });
- it("should return a 16 element array initialized to the values in matA", function() { expect(result).toBeEqualish(matA); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = mat4.copy(out, matA); });
- it("should place values into out", function() { expect(out).toBeEqualish(matA); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("identity", function() {
- beforeEach(function() { result = mat4.identity(out); });
- it("should place values into out", function() { expect(result).toBeEqualish(identity); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("transpose", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.transpose(out, matA); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 1,
- 0, 1, 0, 2,
- 0, 0, 1, 3,
- 0, 0, 0, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.transpose(matA, matA); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 1,
- 0, 1, 0, 2,
- 0, 0, 1, 3,
- 0, 0, 0, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("invert", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.invert(out, matA); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- -1, -2, -3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.invert(matA, matA); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- -1, -2, -3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("adjoint", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.adjoint(out, matA); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- -1, -2, -3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.adjoint(matA, matA); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- -1, -2, -3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("determinant", function() {
- beforeEach(function() { result = mat4.determinant(matA); });
-
- it("should return the determinant", function() { expect(result).toEqual(1); });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(mat4.mul).toEqual(mat4.multiply); });
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.multiply(out, matA, matB); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 5, 7, 9, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- it("should not modify matB", function() {
- expect(matB).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 4, 5, 6, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.multiply(matA, matA, matB); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 5, 7, 9, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- it("should not modify matB", function() {
- expect(matB).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 4, 5, 6, 1
- ]);
- });
- });
-
- describe("when matB is the output matrix", function() {
- beforeEach(function() { result = mat4.multiply(matB, matA, matB); });
-
- it("should place values into matB", function() {
- expect(matB).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 5, 7, 9, 1
- ]);
- });
- it("should return matB", function() { expect(result).toBe(matB); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
- });
-
- describe("translate", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.translate(out, matA, [4, 5, 6]); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 5, 7, 9, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.translate(matA, matA, [4, 5, 6]); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 5, 7, 9, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("scale", function() {
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.scale(out, matA, [4, 5, 6]); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 4, 0, 0, 0,
- 0, 5, 0, 0,
- 0, 0, 6, 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.scale(matA, matA, [4, 5, 6]); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 4, 0, 0, 0,
- 0, 5, 0, 0,
- 0, 0, 6, 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("rotate", function() {
- var rad = Math.PI * 0.5;
- var axis = [1, 0, 0];
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.rotate(out, matA, rad, axis); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 0,
- 0, Math.cos(rad), Math.sin(rad), 0,
- 0, -Math.sin(rad), Math.cos(rad), 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.rotate(matA, matA, rad, axis); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, Math.cos(rad), Math.sin(rad), 0,
- 0, -Math.sin(rad), Math.cos(rad), 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("rotateX", function() {
- var rad = Math.PI * 0.5;
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.rotateX(out, matA, rad); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- 1, 0, 0, 0,
- 0, Math.cos(rad), Math.sin(rad), 0,
- 0, -Math.sin(rad), Math.cos(rad), 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.rotateX(matA, matA, rad); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, Math.cos(rad), Math.sin(rad), 0,
- 0, -Math.sin(rad), Math.cos(rad), 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("rotateY", function() {
- var rad = Math.PI * 0.5;
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.rotateY(out, matA, rad); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- Math.cos(rad), 0, -Math.sin(rad), 0,
- 0, 1, 0, 0,
- Math.sin(rad), 0, Math.cos(rad), 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.rotateY(matA, matA, rad); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- Math.cos(rad), 0, -Math.sin(rad), 0,
- 0, 1, 0, 0,
- Math.sin(rad), 0, Math.cos(rad), 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- describe("rotateZ", function() {
- var rad = Math.PI * 0.5;
-
- describe("with a separate output matrix", function() {
- beforeEach(function() { result = mat4.rotateZ(out, matA, rad); });
-
- it("should place values into out", function() {
- expect(out).toBeEqualish([
- Math.cos(rad), Math.sin(rad), 0, 0,
- -Math.sin(rad), Math.cos(rad), 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify matA", function() {
- expect(matA).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- });
-
- describe("when matA is the output matrix", function() {
- beforeEach(function() { result = mat4.rotateZ(matA, matA, rad); });
-
- it("should place values into matA", function() {
- expect(matA).toBeEqualish([
- Math.cos(rad), Math.sin(rad), 0, 0,
- -Math.sin(rad), Math.cos(rad), 0, 0,
- 0, 0, 1, 0,
- 1, 2, 3, 1
- ]);
- });
- it("should return matA", function() { expect(result).toBe(matA); });
- });
- });
-
- // TODO: fromRotationTranslation
-
- describe("frustum", function() {
- beforeEach(function() { result = mat4.frustum(out, -1, 1, -1, 1, -1, 1); });
- it("should place values into out", function() { expect(result).toBeEqualish([
- -1, 0, 0, 0,
- 0, -1, 0, 0,
- 0, 0, 0, -1,
- 0, 0, 1, 0
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("perspective", function() {
- var fovy = Math.PI * 0.5;
- beforeEach(function() { result = mat4.perspective(out, fovy, 1, 0, 1); });
- it("should place values into out", function() { expect(result).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, -1, -1,
- 0, 0, 0, 0
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
-
- describe("with nonzero near, 45deg fovy, and realistic aspect ratio", function() {
- beforeEach(function() { result = mat4.perspective(out, 45 * Math.PI / 180.0, 640/480, 0.1, 200); });
- it("should calculate correct matrix", function() { expect(result).toBeEqualish([
- 1.81066, 0, 0, 0,
- 0, 2.414213, 0, 0,
- 0, 0, -1.001, -1,
- 0, 0, -0.2001, 0
- ]); });
- });
- });
-
- describe("ortho", function() {
- beforeEach(function() { result = mat4.ortho(out, -1, 1, -1, 1, -1, 1); });
- it("should place values into out", function() { expect(result).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, -1, 0,
- 0, 0, 0, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("lookAt", function() {
- var eye = [0, 0, 1];
- var center = [0, 0, -1];
- var up = [0, 1, 0];
- var view, up, right;
-
- describe("looking down", function() {
- beforeEach(function() {
- view = [0, -1, 0];
- up = [0, 0, -1];
- right= [1, 0, 0];
- result = mat4.lookAt(out, [0, 0, 0], view, up);
- });
-
- it("should transform view into local -Z", function() {
- result = vec3.transformMat4([], view, out);
- expect(result).toBeEqualish([0, 0, -1]);
- });
-
- it("should transform up into local +Y", function() {
- result = vec3.transformMat4([], up, out);
- expect(result).toBeEqualish([0, 1, 0]);
- });
-
- it("should transform right into local +X", function() {
- result = vec3.transformMat4([], right, out);
- expect(result).toBeEqualish([1, 0, 0]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("#74", function() {
- beforeEach(function() {
- mat4.lookAt(out, [0,2,0], [0,0.6,0], [0,0,-1]);
- });
-
- it("should transform a point 'above' into local +Y", function() {
- result = vec3.transformMat4([], [0, 2, -1], out);
- expect(result).toBeEqualish([0, 1, 0]);
- });
-
- it("should transform a point 'right of' into local +X", function() {
- result = vec3.transformMat4([], [1, 2, 0], out);
- expect(result).toBeEqualish([1, 0, 0]);
- });
-
- it("should transform a point 'in front of' into local -Z", function() {
- result = vec3.transformMat4([], [0, 1, 0], out);
- expect(result).toBeEqualish([0, 0, -1]);
- });
- });
-
- beforeEach(function() {
- eye = [0, 0, 1];
- center = [0, 0, -1];
- up = [0, 1, 0];
- result = mat4.lookAt(out, eye, center, up);
- });
- it("should place values into out", function() { expect(result).toBeEqualish([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, -1, 1
- ]);
- });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("str", function() {
- beforeEach(function() { result = mat4.str(matA); });
-
- it("should return a string representation of the matrix", function() { expect(result).toEqual("mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 2, 3, 1)"); });
- });
-
- describe("frob", function() {
- beforeEach(function() { result = mat4.frob(matA); });
- it("should return the Frobenius Norm of the matrix", function() { expect(result).toEqual( Math.sqrt(Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(1, 2) + Math.pow(2, 2) + Math.pow(3, 2) )); });
- });
-
-
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/quat-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/quat-spec.js
deleted file mode 100644
index 4f5150014d0..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/quat-spec.js
+++ /dev/null
@@ -1,559 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("quat", function() {
- var mat3 = require("../../src/gl-matrix/mat3.js");
- var mat4 = require("../../src/gl-matrix/mat4.js");
- var quat = require("../../src/gl-matrix/quat.js");
- var vec3 = require("../../src/gl-matrix/vec3.js");
-
- var out, quatA, quatB, result;
- var vec, id, deg90;
-
- beforeEach(function() {
- quatA = [1, 2, 3, 4];
- quatB = [5, 6, 7, 8];
- out = [0, 0, 0, 0];
- vec = [1, 1, -1];
- id = [0, 0, 0, 1];
- deg90 = Math.PI / 2;
- });
-
- describe("slerp", function() {
- describe("the normal case", function() {
- beforeEach(function() {
- result = quat.slerp(out, [0, 0, 0, 1], [0, 1, 0, 0], 0.5);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- it("should calculate proper quat", function() {
- expect(result).toBeEqualish([0, 0.707106, 0, 0.707106]);
- });
- });
-
- describe("where a == b", function() {
- beforeEach(function() {
- result = quat.slerp(out, [0, 0, 0, 1], [0, 0, 0, 1], 0.5);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- it("should calculate proper quat", function() {
- expect(result).toBeEqualish([0, 0, 0, 1]);
- });
- });
-
- describe("where theta == 180deg", function() {
- beforeEach(function() {
- quat.rotateX(quatA, [1,0,0,0], Math.PI); // 180 deg
- result = quat.slerp(out, [1,0,0,0], quatA, 1);
- });
-
- it("should calculate proper quat", function() {
- expect(result).toBeEqualish([0,0,0,-1]);
- });
- });
-
- describe("where a == -b", function() {
- beforeEach(function() {
- result = quat.slerp(out, [1, 0, 0, 0], [-1, 0, 0, 0], 0.5);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- it("should calculate proper quat", function() {
- expect(result).toBeEqualish([1, 0, 0, 0]);
- });
- });
- });
-
- describe("rotateX", function() {
- beforeEach(function() {
- result = quat.rotateX(out, id, deg90);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- it("should transform vec accordingly", function() {
- vec3.transformQuat(vec, [0,0,-1], out);
- expect(vec).toBeEqualish([0, 1, 0]);
- });
- });
-
- describe("rotateY", function() {
- beforeEach(function() {
- result = quat.rotateY(out, id, deg90);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- it("should transform vec accordingly", function() {
- vec3.transformQuat(vec, [0,0,-1], out);
- expect(vec).toBeEqualish([-1, 0, 0]);
- });
- });
-
- describe("rotateZ", function() {
- beforeEach(function() {
- result = quat.rotateZ(out, id, deg90);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- it("should transform vec accordingly", function() {
- vec3.transformQuat(vec, [0,1,0], out);
- expect(vec).toBeEqualish([-1, 0, 0]);
- });
- });
-
- describe("fromMat3", function() {
- var matr;
-
- describe("legacy", function() {
- beforeEach(function() {
- matr = [ 1, 0, 0,
- 0, 0, -1,
- 0, 1, 0 ];
- result = quat.fromMat3(out, matr);
- });
-
- it("should set dest to the correct value", function() {
- expect(result).toBeEqualish([-0.707106, 0, 0, 0.707106]);
- });
- });
-
- describe("where trace > 0", function() {
- beforeEach(function() {
- matr = [ 1, 0, 0,
- 0, 0, -1,
- 0, 1, 0 ];
- result = quat.fromMat3(out, matr);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should produce the correct transformation", function() {
- expect(vec3.transformQuat([], [0,1,0], out)).toBeEqualish([0,0,-1]);
- });
- });
-
- describe("from a normal matrix looking 'backward'", function() {
- beforeEach(function() {
- matr = mat3.create();
- mat3.transpose(matr, mat3.invert(matr, mat3.fromMat4(matr, mat4.lookAt(mat4.create(), [0, 0, 0], [0, 0, 1], [0, 1, 0]))));
- result = quat.fromMat3(out, matr);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should produce the same transformation as the given matrix", function() {
- expect(vec3.transformQuat([], [3,2,-1], quat.normalize(out, out))).toBeEqualish(vec3.transformMat3([], [3,2,-1], matr));
- });
- });
-
- describe("from a normal matrix looking 'left' and 'upside down'", function() {
- beforeEach(function() {
- matr = mat3.create();
- mat3.transpose(matr, mat3.invert(matr, mat3.fromMat4(matr, mat4.lookAt(mat4.create(), [0, 0, 0], [-1, 0, 0], [0, -1, 0]))));
- result = quat.fromMat3(out, matr);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should produce the same transformation as the given matrix", function() {
- expect(vec3.transformQuat([], [3,2,-1], quat.normalize(out, out))).toBeEqualish(vec3.transformMat3([], [3,2,-1], matr));
- });
- });
-
- describe("from a normal matrix looking 'upside down'", function() {
- beforeEach(function() {
- matr = mat3.create();
- mat3.transpose(matr, mat3.invert(matr, mat3.fromMat4(matr, mat4.lookAt(mat4.create(), [0, 0, 0], [0, 0, -1], [0, -1, 0]))));
- result = quat.fromMat3(out, matr);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should produce the same transformation as the given matrix", function() {
- expect(vec3.transformQuat([], [3,2,-1], quat.normalize(out, out))).toBeEqualish(vec3.transformMat3([], [3,2,-1], matr));
- });
- });
- });
-
- describe("setAxes", function() {
- var r;
- beforeEach(function() { r = vec3.create(); });
-
- describe("looking left", function() {
- var view, up, right;
- beforeEach(function() {
- view = [-1, 0, 0];
- up = [ 0, 1, 0];
- right= [ 0, 0,-1];
- result = quat.setAxes([], view, right, up);
- });
-
- it("should transform local view into world left", function() {
- r = vec3.transformQuat([], [0,0,-1], result);
- expect(r).toBeEqualish([1, 0, 0]);
- });
-
- it("should transform local right into world front", function() {
- r = vec3.transformQuat([], [1,0,0], result);
- expect(r).toBeEqualish([0, 0, 1]);
- });
- });
-
- describe("given opengl defaults", function() {
- var view, up, right;
- beforeEach(function() {
- view = [0, 0, -1];
- up = [0, 1, 0];
- right= [1, 0, 0];
- result = quat.setAxes(out, view, right, up);
- });
-
- it("should return out", function() {
- expect(result).toBe(out);
- });
-
- it("should produce identity", function() {
- expect(out).toBeEqualish([0, 0, 0, 1]);
- });
- });
-
- describe("legacy example", function() {
- var view, up, right;
- beforeEach(function() {
- right= [1, 0, 0];
- up = [0, 0, 1];
- view = [0, -1, 0];
- result = quat.setAxes(out, view, right, up);
- });
-
- xit("should set correct quat4 values", function() {
- expect(result).toBeEqualish([0.707106, 0, 0, 0.707106]);
- });
- });
- });
-
- describe("rotationTo", function() {
- var r;
- beforeEach(function() { r = vec3.create(); });
-
- describe("at right angle", function() {
- beforeEach(function() {
- result = quat.rotationTo(out, [0, 1, 0], [1, 0, 0]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("should calculate proper quaternion", function() {
- expect(out).toBeEqualish([0, 0, -0.707106, 0.707106]);
- });
- });
-
- describe("when vectors are parallel", function() {
- beforeEach(function() {
- result = quat.rotationTo(out, [0, 1, 0], [0, 1, 0]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("multiplying A should produce B", function() {
- expect(vec3.transformQuat(r, [0, 1, 0], out)).toBeEqualish([0, 1, 0]);
- });
- });
-
- describe("when vectors are opposed X", function() {
- beforeEach(function() {
- result = quat.rotationTo(out, [1, 0, 0], [-1, 0, 0]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("multiplying A should produce B", function() {
- expect(vec3.transformQuat(r, [1, 0, 0], out)).toBeEqualish([-1, 0, 0]);
- });
- });
-
- describe("when vectors are opposed Y", function() {
- beforeEach(function() {
- result = quat.rotationTo(out, [0, 1, 0], [0, -1, 0]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("multiplying A should produce B", function() {
- expect(vec3.transformQuat(r, [0, 1, 0], out)).toBeEqualish([0, -1, 0]);
- });
- });
-
- describe("when vectors are opposed Z", function() {
- beforeEach(function() {
- result = quat.rotationTo(out, [0, 0, 1], [0, 0, -1]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
-
- it("multiplying A should produce B", function() {
- expect(vec3.transformQuat(r, [0, 0, 1], out)).toBeEqualish([0, 0, -1]);
- });
- });
- });
-
- describe("create", function() {
- beforeEach(function() { result = quat.create(); });
- it("should return a 4 element array initialized to an identity quaternion", function() { expect(result).toBeEqualish([0, 0, 0, 1]); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = quat.clone(quatA); });
- it("should return a 4 element array initialized to the values in quatA", function() { expect(result).toBeEqualish(quatA); });
- });
-
- describe("fromValues", function() {
- beforeEach(function() { result = quat.fromValues(1, 2, 3, 4); });
- it("should return a 4 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = quat.copy(out, quatA); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("set", function() {
- beforeEach(function() { result = quat.set(out, 1, 2, 3, 4); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("identity", function() {
- beforeEach(function() { result = quat.identity(out); });
- it("should place values into out", function() { expect(result).toBeEqualish([0, 0, 0, 1]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("setAxisAngle", function() {
- beforeEach(function() { result = quat.setAxisAngle(out, [1, 0, 0], Math.PI * 0.5); });
- it("should place values into out", function() { expect(result).toBeEqualish([0.707106, 0, 0, 0.707106]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("add", function() {
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.add(out, quatA, quatB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([6, 8, 10, 12]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.add(quatA, quatA, quatB); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([6, 8, 10, 12]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatB is the output quaternion", function() {
- beforeEach(function() { result = quat.add(quatB, quatA, quatB); });
-
- it("should place values into quatB", function() { expect(quatB).toBeEqualish([6, 8, 10, 12]); });
- it("should return quatB", function() { expect(result).toBe(quatB); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(quat.mul).toEqual(quat.multiply); });
-
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.multiply(out, quatA, quatB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([24, 48, 48, -6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.multiply(quatA, quatA, quatB); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([24, 48, 48, -6]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatB is the output quaternion", function() {
- beforeEach(function() { result = quat.multiply(quatB, quatA, quatB); });
-
- it("should place values into quatB", function() { expect(quatB).toBeEqualish([24, 48, 48, -6]); });
- it("should return quatB", function() { expect(result).toBe(quatB); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("scale", function() {
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.scale(out, quatA, 2); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.scale(quatA, quatA, 2); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([2, 4, 6, 8]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- });
- });
-
- describe("length", function() {
- it("should have an alias called 'len'", function() { expect(quat.len).toEqual(quat.length); });
-
- beforeEach(function() { result = quat.length(quatA); });
-
- it("should return the length", function() { expect(result).toBeCloseTo(5.477225); });
- });
-
- describe("squaredLength", function() {
- it("should have an alias called 'sqrLen'", function() { expect(quat.sqrLen).toEqual(quat.squaredLength); });
-
- beforeEach(function() { result = quat.squaredLength(quatA); });
-
- it("should return the squared length", function() { expect(result).toEqual(30); });
- });
-
- describe("normalize", function() {
- beforeEach(function() { quatA = [5, 0, 0, 0]; });
-
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.normalize(out, quatA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 0, 0, 0]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([5, 0, 0, 0]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.normalize(quatA, quatA); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([1, 0, 0, 0]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- });
- });
-
- describe("lerp", function() {
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.lerp(out, quatA, quatB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 5, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.lerp(quatA, quatA, quatB, 0.5); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([3, 4, 5, 6]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatB is the output quaternion", function() {
- beforeEach(function() { result = quat.lerp(quatB, quatA, quatB, 0.5); });
-
- it("should place values into quatB", function() { expect(quatB).toBeEqualish([3, 4, 5, 6]); });
- it("should return quatB", function() { expect(result).toBe(quatB); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- /*describe("slerp", function() {
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.slerp(out, quatA, quatB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 5, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.slerp(quatA, quatA, quatB, 0.5); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([3, 4, 5, 6]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- it("should not modify quatB", function() { expect(quatB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when quatB is the output quaternion", function() {
- beforeEach(function() { result = quat.slerp(quatB, quatA, quatB, 0.5); });
-
- it("should place values into quatB", function() { expect(quatB).toBeEqualish([3, 4, 5, 6]); });
- it("should return quatB", function() { expect(result).toBe(quatB); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
- });*/
-
- // TODO: slerp, calcuateW, rotateX, rotateY, rotateZ
-
- describe("invert", function() {
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.invert(out, quatA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-0.033333, -0.066666, -0.1, 0.133333]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.invert(quatA, quatA); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([-0.033333, -0.066666, -0.1, 0.133333]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- });
- });
-
- describe("conjugate", function() {
- describe("with a separate output quaternion", function() {
- beforeEach(function() { result = quat.conjugate(out, quatA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-1, -2, -3, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify quatA", function() { expect(quatA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when quatA is the output quaternion", function() {
- beforeEach(function() { result = quat.conjugate(quatA, quatA); });
-
- it("should place values into quatA", function() { expect(quatA).toBeEqualish([-1, -2, -3, 4]); });
- it("should return quatA", function() { expect(result).toBe(quatA); });
- });
- });
-
- describe("str", function() {
- beforeEach(function() { result = quat.str(quatA); });
-
- it("should return a string representation of the quaternion", function() { expect(result).toEqual("quat(1, 2, 3, 4)"); });
- });
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec2-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec2-spec.js
deleted file mode 100644
index 254c52739c3..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec2-spec.js
+++ /dev/null
@@ -1,549 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("vec2", function() {
- var vec2 = require("../../src/gl-matrix/vec2.js");
-
- var out, vecA, vecB, result;
-
- beforeEach(function() { vecA = [1, 2]; vecB = [3, 4]; out = [0, 0]; });
-
- describe("create", function() {
- beforeEach(function() { result = vec2.create(); });
- it("should return a 2 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0]); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = vec2.clone(vecA); });
- it("should return a 2 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); });
- });
-
- describe("fromValues", function() {
- beforeEach(function() { result = vec2.fromValues(1, 2); });
- it("should return a 2 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2]); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = vec2.copy(out, vecA); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("set", function() {
- beforeEach(function() { result = vec2.set(out, 1, 2); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("add", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.add(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([4, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.add(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([4, 6]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.add(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([4, 6]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
- });
-
- describe("subtract", function() {
- it("should have an alias called 'sub'", function() { expect(vec2.sub).toEqual(vec2.subtract); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.subtract(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-2, -2]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.subtract(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-2, -2]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.subtract(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([-2, -2]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(vec2.mul).toEqual(vec2.multiply); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.multiply(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 8]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.multiply(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 8]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.multiply(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 8]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
- });
-
- describe("divide", function() {
- it("should have an alias called 'div'", function() { expect(vec2.div).toEqual(vec2.divide); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.divide(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([0.3333333, 0.5]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.divide(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([0.3333333, 0.5]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.divide(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([0.3333333, 0.5]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
- });
-
- describe("min", function() {
- beforeEach(function() { vecA = [1, 4]; vecB = [3, 2]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.min(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.min(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.min(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([1, 2]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); });
- });
- });
-
- describe("max", function() {
- beforeEach(function() { vecA = [1, 4]; vecB = [3, 2]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.max(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.max(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 2]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.max(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 4]); });
- });
- });
-
- describe("scale", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.scale(out, vecA, 2); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.scale(vecA, vecA, 2); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 4]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("scaleAndAdd", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.scaleAndAdd(out, vecA, vecB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2.5, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.scaleAndAdd(vecA, vecA, vecB, 0.5); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([2.5, 4]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.scaleAndAdd(vecB, vecA, vecB, 0.5); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([2.5, 4]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
- });
-
- describe("distance", function() {
- it("should have an alias called 'dist'", function() { expect(vec2.dist).toEqual(vec2.distance); });
-
- beforeEach(function() { result = vec2.distance(vecA, vecB); });
-
- it("should return the distance", function() { expect(result).toBeCloseTo(2.828427); });
- });
-
- describe("squaredDistance", function() {
- it("should have an alias called 'sqrDist'", function() { expect(vec2.sqrDist).toEqual(vec2.squaredDistance); });
-
- beforeEach(function() { result = vec2.squaredDistance(vecA, vecB); });
-
- it("should return the squared distance", function() { expect(result).toEqual(8); });
- });
-
- describe("length", function() {
- it("should have an alias called 'len'", function() { expect(vec2.len).toEqual(vec2.length); });
-
- beforeEach(function() { result = vec2.length(vecA); });
-
- it("should return the length", function() { expect(result).toBeCloseTo(2.236067); });
- });
-
- describe("squaredLength", function() {
- it("should have an alias called 'sqrLen'", function() { expect(vec2.sqrLen).toEqual(vec2.squaredLength); });
-
- beforeEach(function() { result = vec2.squaredLength(vecA); });
-
- it("should return the squared length", function() { expect(result).toEqual(5); });
- });
-
- describe("negate", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.negate(out, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-1, -2]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.negate(vecA, vecA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-1, -2]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("normalize", function() {
- beforeEach(function() { vecA = [5, 0]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.normalize(out, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 0]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([5, 0]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.normalize(vecA, vecA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 0]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("dot", function() {
- beforeEach(function() { result = vec2.dot(vecA, vecB); });
-
- it("should return the dot product", function() { expect(result).toEqual(11); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("cross", function() {
- var out3;
-
- beforeEach(function() {
- out3 = [0, 0, 0];
- result = vec2.cross(out3, vecA, vecB);
- });
-
- it("should place values into out", function() { expect(out3).toBeEqualish([0, 0, -2]); });
- it("should return out", function() { expect(result).toBe(out3); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("lerp", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.lerp(out, vecA, vecB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 3]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.lerp(vecA, vecA, vecB, 0.5); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 3]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec2.lerp(vecB, vecA, vecB, 0.5); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([2, 3]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
- });
-
- describe("random", function() {
- describe("with no scale", function() {
- beforeEach(function() { result = vec2.random(out); });
-
- it("should result in a unit length vector", function() { expect(vec2.length(out)).toBeCloseTo(1.0); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("with a scale", function() {
- beforeEach(function() { result = vec2.random(out, 5.0); });
-
- it("should result in a unit length vector", function() { expect(vec2.length(out)).toBeCloseTo(5.0); });
- it("should return out", function() { expect(result).toBe(out); });
- });
- });
-
- describe("transformMat2", function() {
- var matA;
- beforeEach(function() { matA = [1, 2, 3, 4]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.transformMat2(out, vecA, matA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([7, 10]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.transformMat2(vecA, vecA, matA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([7, 10]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("transformMat2d", function() {
- var matA;
- beforeEach(function() { matA = [1, 2, 3, 4, 5, 6]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec2.transformMat2d(out, vecA, matA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([12, 16]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec2.transformMat2d(vecA, vecA, matA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([12, 16]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify matA", function() { expect(matA).toBeEqualish([1, 2, 3, 4, 5, 6]); });
- });
- });
-
- describe("forEach", function() {
- var vecArray;
-
- beforeEach(function() {
- vecArray = [
- 1, 2,
- 3, 4,
- 0, 0
- ];
- });
-
- describe("when performing operations that take no extra arguments", function() {
- beforeEach(function() { result = vec2.forEach(vecArray, 0, 0, 0, vec2.normalize); });
-
- it("should update all values", function() {
- expect(vecArray).toBeEqualish([
- 0.447214, 0.894427,
- 0.6, 0.8,
- 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- });
-
- describe("when performing operations that takes one extra arguments", function() {
- beforeEach(function() { result = vec2.forEach(vecArray, 0, 0, 0, vec2.add, vecA); });
-
- it("should update all values", function() {
- expect(vecArray).toBeEqualish([
- 2, 4,
- 4, 6,
- 1, 2
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
-
- describe("when specifying an offset", function() {
- beforeEach(function() { result = vec2.forEach(vecArray, 0, 2, 0, vec2.add, vecA); });
-
- it("should update all values except the first vector", function() {
- expect(vecArray).toBeEqualish([
- 1, 2,
- 4, 6,
- 1, 2
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
-
- describe("when specifying a count", function() {
- beforeEach(function() { result = vec2.forEach(vecArray, 0, 0, 2, vec2.add, vecA); });
-
- it("should update all values except the last vector", function() {
- expect(vecArray).toBeEqualish([
- 2, 4,
- 4, 6,
- 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
-
- describe("when specifying a stride", function() {
- beforeEach(function() { result = vec2.forEach(vecArray, 4, 0, 0, vec2.add, vecA); });
-
- it("should update all values except the second vector", function() {
- expect(vecArray).toBeEqualish([
- 2, 4,
- 3, 4,
- 1, 2
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
- });
-
- describe("when calling a function that does not modify the out variable", function() {
- beforeEach(function() {
- result = vec2.forEach(vecArray, 0, 0, 0, function(out, vec) {});
- });
-
- it("values should remain unchanged", function() {
- expect(vecArray).toBeEqualish([
- 1, 2,
- 3, 4,
- 0, 0,
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- });
- });
-
- describe("str", function() {
- beforeEach(function() { result = vec2.str(vecA); });
-
- it("should return a string representation of the vector", function() { expect(result).toEqual("vec2(1, 2)"); });
- });
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec3-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec3-spec.js
deleted file mode 100644
index 8ef944f1a24..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec3-spec.js
+++ /dev/null
@@ -1,661 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("vec3", function() {
- var mat3 = require("../../src/gl-matrix/mat3.js");
- var mat4 = require("../../src/gl-matrix/mat4.js");
- var vec3 = require("../../src/gl-matrix/vec3.js");
-
- var out, vecA, vecB, result;
-
- beforeEach(function() { vecA = [1, 2, 3]; vecB = [4, 5, 6]; out = [0, 0, 0]; });
-
- describe('rotateX', function(){
- describe('rotation around world origin [0, 0, 0]', function(){
- beforeEach(function(){ vecA = [0, 1, 0]; vecB = [0, 0, 0]; result = vec3.rotateX(out, vecA, vecB, Math.PI); });
- it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -1, 0]); });
- });
- describe('rotation around an arbitrary origin', function(){
- beforeEach(function(){ vecA = [2, 7, 0]; vecB = [2, 5, 0]; result = vec3.rotateX(out, vecA, vecB, Math.PI); });
- it("should return the rotated vector", function(){ expect(result).toBeEqualish([2, 3, 0]); });
- });
- });
-
- describe('rotateY', function(){
- describe('rotation around world origin [0, 0, 0]', function(){
- beforeEach(function(){ vecA = [1, 0, 0]; vecB = [0, 0, 0]; result = vec3.rotateY(out, vecA, vecB, Math.PI); });
- it("should return the rotated vector", function(){ expect(result).toBeEqualish([-1, 0, 0]); });
- });
- describe('rotation around an arbitrary origin', function(){
- beforeEach(function(){ vecA = [-2, 3, 10]; vecB = [-4, 3, 10]; result = vec3.rotateY(out, vecA, vecB, Math.PI); });
- it("should return the rotated vector", function(){ expect(result).toBeEqualish([-6, 3, 10]); });
- });
- });
-
- describe('rotateZ', function(){
- describe('rotation around world origin [0, 0, 0]', function(){
- beforeEach(function(){ vecA = [0, 1, 0]; vecB = [0, 0, 0]; result = vec3.rotateZ(out, vecA, vecB, Math.PI); });
- it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -1, 0]); });
- });
- describe('rotation around an arbitrary origin', function(){
- beforeEach(function(){ vecA = [0, 6, -5]; vecB = [0, 0, -5]; result = vec3.rotateZ(out, vecA, vecB, Math.PI); });
- it("should return the rotated vector", function(){ expect(result).toBeEqualish([0, -6, -5]); });
- });
- });
-
- describe('transformMat4', function() {
- var matr;
- describe("with an identity", function() {
- beforeEach(function() { matr = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] });
-
- beforeEach(function() { result = vec3.transformMat4(out, vecA, matr); });
-
- it("should produce the input", function() {
- expect(out).toBeEqualish([1, 2, 3]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("with a lookAt", function() {
- beforeEach(function() { matr = mat4.lookAt(mat4.create(), [5, 6, 7], [2, 6, 7], [0, 1, 0]); });
-
- beforeEach(function() { result = vec3.transformMat4(out, vecA, matr); });
-
- it("should rotate and translate the input", function() {
- expect(out).toBeEqualish([ 4, -4, -4 ]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("with a perspective matrix (#92)", function() {
- it("should transform a point from perspective(pi/2, 4/3, 1, 100)", function() {
- matr = [0.750, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, -1.02, -1,
- 0, 0, -2.02, 0];
- result = vec3.transformMat4([], [10, 20, 30], matr);
- expect(result).toBeEqualish([-0.25, -0.666666, 1.087333]);
- });
- });
-
- });
-
- describe('transformMat3', function() {
- var matr;
- describe("with an identity", function() {
- beforeEach(function() { matr = [1, 0, 0, 0, 1, 0, 0, 0, 1 ] });
-
- beforeEach(function() { result = vec3.transformMat3(out, vecA, matr); });
-
- it("should produce the input", function() {
- expect(out).toBeEqualish([1, 2, 3]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("with 90deg about X", function() {
- beforeEach(function() {
- result = vec3.transformMat3(out, [0,1,0], [1,0,0,0,0,1,0,-1,0]);
- });
-
- it("should produce correct output", function() {
- expect(out).toBeEqualish([0,0,1]);
- });
- });
-
- describe("with 90deg about Y", function() {
- beforeEach(function() {
- result = vec3.transformMat3(out, [1,0,0], [0,0,-1,0,1,0,1,0,0]);
- });
-
- it("should produce correct output", function() {
- expect(out).toBeEqualish([0,0,-1]);
- });
- });
-
- describe("with 90deg about Z", function() {
- beforeEach(function() {
- result = vec3.transformMat3(out, [1,0,0], [0,1,0,-1,0,0,0,0,1]);
- });
-
- it("should produce correct output", function() {
- expect(out).toBeEqualish([0,1,0]);
- });
- });
-
- describe("with a lookAt normal matrix", function() {
- beforeEach(function() {
- matr = mat4.lookAt(mat4.create(), [5, 6, 7], [2, 6, 7], [0, 1, 0]);
- var n = mat3.create();
- matr = mat3.transpose(n, mat3.invert(n, mat3.fromMat4(n, matr)));
- });
-
- beforeEach(function() { result = vec3.transformMat3(out, [1,0,0], matr); });
-
- it("should rotate the input", function() {
- expect(out).toBeEqualish([ 0,0,1 ]);
- });
-
- it("should return out", function() { expect(result).toBe(out); });
- });
- });
-
- describe("create", function() {
- beforeEach(function() { result = vec3.create(); });
- it("should return a 3 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0, 0]); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = vec3.clone(vecA); });
- it("should return a 3 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); });
- });
-
- describe("fromValues", function() {
- beforeEach(function() { result = vec3.fromValues(1, 2, 3); });
- it("should return a 3 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3]); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = vec3.copy(out, vecA); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("set", function() {
- beforeEach(function() { result = vec3.set(out, 1, 2, 3); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("add", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.add(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([5, 7, 9]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.add(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([5, 7, 9]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.add(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([5, 7, 9]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("subtract", function() {
- it("should have an alias called 'sub'", function() { expect(vec3.sub).toEqual(vec3.subtract); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.subtract(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-3, -3, -3]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.subtract(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-3, -3, -3]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.subtract(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([-3, -3, -3]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(vec3.mul).toEqual(vec3.multiply); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.multiply(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([4, 10, 18]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.multiply(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([4, 10, 18]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.multiply(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([4, 10, 18]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("divide", function() {
- it("should have an alias called 'div'", function() { expect(vec3.div).toEqual(vec3.divide); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.divide(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([0.25, 0.4, 0.5]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.divide(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([0.25, 0.4, 0.5]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.divide(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([0.25, 0.4, 0.5]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("min", function() {
- beforeEach(function() { vecA = [1, 3, 1]; vecB = [3, 1, 3]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.min(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 1, 1]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.min(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 1, 1]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.min(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([1, 1, 1]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); });
- });
- });
-
- describe("max", function() {
- beforeEach(function() { vecA = [1, 3, 1]; vecB = [3, 1, 3]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.max(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 3, 3]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.max(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3, 3]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.max(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 3, 3]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1]); });
- });
- });
-
- describe("scale", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.scale(out, vecA, 2); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.scale(vecA, vecA, 2); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 4, 6]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("scaleAndAdd", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.scaleAndAdd(out, vecA, vecB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4.5, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.scaleAndAdd(vecA, vecA, vecB, 0.5); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4.5, 6]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.scaleAndAdd(vecB, vecA, vecB, 0.5); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 4.5, 6]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("distance", function() {
- it("should have an alias called 'dist'", function() { expect(vec3.dist).toEqual(vec3.distance); });
-
- beforeEach(function() { result = vec3.distance(vecA, vecB); });
-
- it("should return the distance", function() { expect(result).toBeCloseTo(5.196152); });
- });
-
- describe("squaredDistance", function() {
- it("should have an alias called 'sqrDist'", function() { expect(vec3.sqrDist).toEqual(vec3.squaredDistance); });
-
- beforeEach(function() { result = vec3.squaredDistance(vecA, vecB); });
-
- it("should return the squared distance", function() { expect(result).toEqual(27); });
- });
-
- describe("length", function() {
- it("should have an alias called 'len'", function() { expect(vec3.len).toEqual(vec3.length); });
-
- beforeEach(function() { result = vec3.length(vecA); });
-
- it("should return the length", function() { expect(result).toBeCloseTo(3.741657); });
- });
-
- describe("squaredLength", function() {
- it("should have an alias called 'sqrLen'", function() { expect(vec3.sqrLen).toEqual(vec3.squaredLength); });
-
- beforeEach(function() { result = vec3.squaredLength(vecA); });
-
- it("should return the squared length", function() { expect(result).toEqual(14); });
- });
-
- describe("negate", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.negate(out, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-1, -2, -3]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.negate(vecA, vecA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-1, -2, -3]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("normalize", function() {
- beforeEach(function() { vecA = [5, 0, 0]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.normalize(out, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 0, 0]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([5, 0, 0]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.normalize(vecA, vecA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 0, 0]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("dot", function() {
- beforeEach(function() { result = vec3.dot(vecA, vecB); });
-
- it("should return the dot product", function() { expect(result).toEqual(32); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("cross", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.cross(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-3, 6, -3]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.cross(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-3, 6, -3]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.cross(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([-3, 6, -3]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("lerp", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec3.lerp(out, vecA, vecB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2.5, 3.5, 4.5]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec3.lerp(vecA, vecA, vecB, 0.5); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([2.5, 3.5, 4.5]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec3.lerp(vecB, vecA, vecB, 0.5); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([2.5, 3.5, 4.5]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
- });
-
- describe("random", function() {
- describe("with no scale", function() {
- beforeEach(function() { result = vec3.random(out); });
-
- it("should result in a unit length vector", function() { expect(vec3.length(out)).toBeCloseTo(1.0); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("with a scale", function() {
- beforeEach(function() { result = vec3.random(out, 5.0); });
-
- it("should result in a unit length vector", function() { expect(vec3.length(out)).toBeCloseTo(5.0); });
- it("should return out", function() { expect(result).toBe(out); });
- });
- });
-
- describe("forEach", function() {
- var vecArray;
-
- beforeEach(function() {
- vecArray = [
- 1, 2, 3,
- 4, 5, 6,
- 0, 0, 0
- ];
- });
-
- describe("when performing operations that take no extra arguments", function() {
- beforeEach(function() { result = vec3.forEach(vecArray, 0, 0, 0, vec3.normalize); });
-
- it("should update all values", function() {
- expect(vecArray).toBeEqualish([
- 0.267261, 0.534522, 0.801783,
- 0.455842, 0.569802, 0.683763,
- 0, 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- });
-
- describe("when performing operations that takes one extra arguments", function() {
- beforeEach(function() { result = vec3.forEach(vecArray, 0, 0, 0, vec3.add, vecA); });
-
- it("should update all values", function() {
- expect(vecArray).toBeEqualish([
- 2, 4, 6,
- 5, 7, 9,
- 1, 2, 3
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
-
- describe("when specifying an offset", function() {
- beforeEach(function() { result = vec3.forEach(vecArray, 0, 3, 0, vec3.add, vecA); });
-
- it("should update all values except the first vector", function() {
- expect(vecArray).toBeEqualish([
- 1, 2, 3,
- 5, 7, 9,
- 1, 2, 3
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
-
- describe("when specifying a count", function() {
- beforeEach(function() { result = vec3.forEach(vecArray, 0, 0, 2, vec3.add, vecA); });
-
- it("should update all values except the last vector", function() {
- expect(vecArray).toBeEqualish([
- 2, 4, 6,
- 5, 7, 9,
- 0, 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
-
- describe("when specifying a stride", function() {
- beforeEach(function() { result = vec3.forEach(vecArray, 6, 0, 0, vec3.add, vecA); });
-
- it("should update all values except the second vector", function() {
- expect(vecArray).toBeEqualish([
- 2, 4, 6,
- 4, 5, 6,
- 1, 2, 3
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- });
-
- describe("when calling a function that does not modify the out variable", function() {
- beforeEach(function() {
- result = vec3.forEach(vecArray, 0, 0, 0, function(out, vec) {});
- });
-
- it("values should remain unchanged", function() {
- expect(vecArray).toBeEqualish([
- 1, 2, 3,
- 4, 5, 6,
- 0, 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- });
- });
-
- describe("angle", function() {
- beforeEach(function() { result = vec3.angle(vecA, vecB); });
-
- it("should return the angle", function() { expect(result).toBeEqualish(0.225726); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([4, 5, 6]); });
- });
-
- describe("str", function() {
- beforeEach(function() { result = vec3.str(vecA); });
-
- it("should return a string representation of the vector", function() { expect(result).toEqual("vec3(1, 2, 3)"); });
- });
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec4-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec4-spec.js
deleted file mode 100644
index 0c65908cb4a..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/vec4-spec.js
+++ /dev/null
@@ -1,492 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-describe("vec4", function() {
- var vec3 = require("../../src/gl-matrix/vec3.js");
- var vec4 = require("../../src/gl-matrix/vec4.js");
-
- var out, vecA, vecB, result;
-
- beforeEach(function() { vecA = [1, 2, 3, 4]; vecB = [5, 6, 7, 8]; out = [0, 0, 0, 0]; });
-
- describe("create", function() {
- beforeEach(function() { result = vec4.create(); });
- it("should return a 4 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0, 0, 0]); });
- });
-
- describe("clone", function() {
- beforeEach(function() { result = vec4.clone(vecA); });
- it("should return a 4 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); });
- });
-
- describe("fromValues", function() {
- beforeEach(function() { result = vec4.fromValues(1, 2, 3, 4); });
- it("should return a 4 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("copy", function() {
- beforeEach(function() { result = vec4.copy(out, vecA); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("set", function() {
- beforeEach(function() { result = vec4.set(out, 1, 2, 3, 4); });
- it("should place values into out", function() { expect(out).toBeEqualish([1, 2, 3, 4]); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("add", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.add(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([6, 8, 10, 12]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.add(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([6, 8, 10, 12]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.add(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([6, 8, 10, 12]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("subtract", function() {
- it("should have an alias called 'sub'", function() { expect(vec4.sub).toEqual(vec4.subtract); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.subtract(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-4, -4, -4, -4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.subtract(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-4, -4, -4, -4]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.subtract(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([-4, -4, -4, -4]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("multiply", function() {
- it("should have an alias called 'mul'", function() { expect(vec4.mul).toEqual(vec4.multiply); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.multiply(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([5, 12, 21, 32]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.multiply(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([5, 12, 21, 32]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.multiply(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([5, 12, 21, 32]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("divide", function() {
- it("should have an alias called 'div'", function() { expect(vec4.div).toEqual(vec4.divide); });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.divide(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([0.2, 0.333333, 0.428571, 0.5]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.divide(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([0.2, 0.333333, 0.428571, 0.5]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.divide(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([0.2, 0.333333, 0.428571, 0.5]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("min", function() {
- beforeEach(function() { vecA = [1, 3, 1, 3]; vecB = [3, 1, 3, 1]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.min(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 1, 1, 1]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.min(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 1, 1, 1]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.min(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([1, 1, 1, 1]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); });
- });
- });
-
- describe("max", function() {
- beforeEach(function() { vecA = [1, 3, 1, 3]; vecB = [3, 1, 3, 1]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.max(out, vecA, vecB); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 3, 3, 3]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.max(vecA, vecA, vecB); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 3, 3, 3]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 1, 3, 1]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.max(vecB, vecA, vecB); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 3, 3, 3]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 3, 1, 3]); });
- });
- });
-
- describe("scale", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.scale(out, vecA, 2); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([2, 4, 6, 8]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.scale(vecA, vecA, 2); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([2, 4, 6, 8]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("scaleAndAdd", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.scaleAndAdd(out, vecA, vecB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3.5, 5, 6.5, 8]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.scaleAndAdd(vecA, vecA, vecB, 0.5); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3.5, 5, 6.5, 8]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.scaleAndAdd(vecB, vecA, vecB, 0.5); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3.5, 5, 6.5, 8]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("distance", function() {
- it("should have an alias called 'dist'", function() { expect(vec4.dist).toEqual(vec4.distance); });
-
- beforeEach(function() { result = vec4.distance(vecA, vecB); });
-
- it("should return the distance", function() { expect(result).toBeCloseTo(8); });
- });
-
- describe("squaredDistance", function() {
- it("should have an alias called 'sqrDist'", function() { expect(vec4.sqrDist).toEqual(vec4.squaredDistance); });
-
- beforeEach(function() { result = vec4.squaredDistance(vecA, vecB); });
-
- it("should return the squared distance", function() { expect(result).toEqual(64); });
- });
-
- describe("length", function() {
- it("should have an alias called 'len'", function() { expect(vec4.len).toEqual(vec4.length); });
-
- beforeEach(function() { result = vec4.length(vecA); });
-
- it("should return the length", function() { expect(result).toBeCloseTo(5.477225); });
- });
-
- describe("squaredLength", function() {
- it("should have an alias called 'sqrLen'", function() { expect(vec4.sqrLen).toEqual(vec4.squaredLength); });
-
- beforeEach(function() { result = vec4.squaredLength(vecA); });
-
- it("should return the squared length", function() { expect(result).toEqual(30); });
- });
-
- describe("negate", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.negate(out, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([-1, -2, -3, -4]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.negate(vecA, vecA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([-1, -2, -3, -4]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("normalize", function() {
- beforeEach(function() { vecA = [5, 0, 0, 0]; });
-
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.normalize(out, vecA); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([1, 0, 0, 0]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([5, 0, 0, 0]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.normalize(vecA, vecA); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([1, 0, 0, 0]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- });
- });
-
- describe("dot", function() {
- beforeEach(function() { result = vec4.dot(vecA, vecB); });
-
- it("should return the dot product", function() { expect(result).toEqual(70); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("lerp", function() {
- describe("with a separate output vector", function() {
- beforeEach(function() { result = vec4.lerp(out, vecA, vecB, 0.5); });
-
- it("should place values into out", function() { expect(out).toBeEqualish([3, 4, 5, 6]); });
- it("should return out", function() { expect(result).toBe(out); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecA is the output vector", function() {
- beforeEach(function() { result = vec4.lerp(vecA, vecA, vecB, 0.5); });
-
- it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 4, 5, 6]); });
- it("should return vecA", function() { expect(result).toBe(vecA); });
- it("should not modify vecB", function() { expect(vecB).toBeEqualish([5, 6, 7, 8]); });
- });
-
- describe("when vecB is the output vector", function() {
- beforeEach(function() { result = vec4.lerp(vecB, vecA, vecB, 0.5); });
-
- it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 4, 5, 6]); });
- it("should return vecB", function() { expect(result).toBe(vecB); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
- });
-
- describe("random", function() {
- describe("with no scale", function() {
- beforeEach(function() { result = vec4.random(out); });
-
- it("should result in a unit length vector", function() { expect(vec4.length(out)).toBeCloseTo(1.0); });
- it("should return out", function() { expect(result).toBe(out); });
- });
-
- describe("with a scale", function() {
- beforeEach(function() { result = vec4.random(out, 5.0); });
-
- it("should result in a unit length vector", function() { expect(vec4.length(out)).toBeCloseTo(5.0); });
- it("should return out", function() { expect(result).toBe(out); });
- });
- });
-
- describe("forEach", function() {
- var vecArray;
-
- beforeEach(function() {
- vecArray = [
- 1, 2, 3, 4,
- 5, 6, 7, 8,
- 0, 0, 0, 0
- ];
- });
-
- describe("when performing operations that take no extra arguments", function() {
- beforeEach(function() { result = vec4.forEach(vecArray, 0, 0, 0, vec4.normalize); });
-
- it("should update all values", function() {
- expect(vecArray).toBeEqualish([
- 0.182574, 0.365148, 0.547722, 0.730296,
- 0.379049, 0.454858, 0.530668, 0.606478,
- 0, 0, 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- });
-
- describe("when performing operations that takes one extra arguments", function() {
- beforeEach(function() { result = vec4.forEach(vecArray, 0, 0, 0, vec4.add, vecA); });
-
- it("should update all values", function() {
- expect(vecArray).toBeEqualish([
- 2, 4, 6, 8,
- 6, 8, 10, 12,
- 1, 2, 3, 4
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when specifying an offset", function() {
- beforeEach(function() { result = vec4.forEach(vecArray, 0, 4, 0, vec4.add, vecA); });
-
- it("should update all values except the first vector", function() {
- expect(vecArray).toBeEqualish([
- 1, 2, 3, 4,
- 6, 8, 10, 12,
- 1, 2, 3, 4
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when specifying a count", function() {
- beforeEach(function() { result = vec4.forEach(vecArray, 0, 0, 2, vec4.add, vecA); });
-
- it("should update all values except the last vector", function() {
- expect(vecArray).toBeEqualish([
- 2, 4, 6, 8,
- 6, 8, 10, 12,
- 0, 0, 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when specifying a stride", function() {
- beforeEach(function() { result = vec4.forEach(vecArray, 8, 0, 0, vec4.add, vecA); });
-
- it("should update all values except the second vector", function() {
- expect(vecArray).toBeEqualish([
- 2, 4, 6, 8,
- 5, 6, 7, 8,
- 1, 2, 3, 4
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2, 3, 4]); });
- });
-
- describe("when calling a function that does not modify the out variable", function() {
- beforeEach(function() {
- result = vec3.forEach(vecArray, 0, 0, 0, function(out, vec) {});
- });
-
- it("values should remain unchanged", function() {
- expect(vecArray).toBeEqualish([
- 1, 2, 3, 4,
- 5, 6, 7, 8,
- 0, 0, 0, 0
- ]);
- });
- it("should return vecArray", function() { expect(result).toBe(vecArray); });
- });
- });
-
- describe("str", function() {
- beforeEach(function() { result = vec4.str(vecA); });
-
- it("should return a string representation of the vector", function() { expect(result).toEqual("vec4(1, 2, 3, 4)"); });
- });
-});
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/worker-spec.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/worker-spec.js
deleted file mode 100644
index 8b1754f4db1..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/gl-matrix/worker-spec.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* spec tests gl-matrix when embedded into a Web Worker */
-
-// only test with workers if workers are available
-if (typeof(Worker) !== 'undefined') {
- describe("Embedded within Web Workers", function() {
- it("should initialize successfully", function() {
- var xhr = new XMLHttpRequest();
- var source = null;
- xhr.onreadystatechange = function() {
- if (this.readyState == this.DONE) {
- if (this.status == 200) {
- source = this.responseText;
- }
- }
- };
- xhr.open("GET", "/dist/gl-matrix-min.js");
- xhr.send();
-
- var result = null;
-
- waitsFor(function() {
- if (!source) return false;
- var blob = new Blob([
- source,
- "self.postMessage(vec3.create());"
- ],
- {type: "application/javascript"}
- );
-
- var worker = new Worker(URL.createObjectURL(blob));
- worker.onmessage = function(e) {
- result = e.data;
- };
- return true;
- });
-
- waitsFor(function() {
- if (!result) return false;
- expect(result).toBeEqualish([0, 0, 0]);
- return true;
- });
- });
- });
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/helpers/spec-helper.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/helpers/spec-helper.js
deleted file mode 100644
index 58e36714505..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/helpers/spec-helper.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var HELPER_MATCHERS = (function() {
- var EPSILON = 0.00001;
-
- return {
- /*
- Returns true if `actual` has the same length as `expected`, and
- if each element of both arrays is within 0.000001 of each other.
- This is a way to check for "equal enough" conditions, as a way
- of working around floating point imprecision.
- */
- toBeEqualish: function(expected) {
- if (typeof(this.actual) == 'number')
- return Math.abs(this.actual - expected) < EPSILON;
-
- if (this.actual.length != expected.length) return false;
- for (var i = 0; i < this.actual.length; i++) {
- if (isNaN(this.actual[i]) !== isNaN(expected[i]))
- return false;
- if (Math.abs(this.actual[i] - expected[i]) >= EPSILON)
- return false;
- }
- return true;
- }
- };
-})();
-
-beforeEach(function() {
- this.addMatchers(HELPER_MATCHERS);
-});
-
-if (typeof(global) != 'undefined')
- global.HELPER_MATCHERS = HELPER_MATCHERS;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/jasmine.yml b/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/jasmine.yml
deleted file mode 100644
index afb56ec62c9..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/spec/jasmine.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-# src_files
-#
-# Return an array of filepaths relative to src_dir to include before jasmine specs.
-# Default: []
-#
-# EXAMPLE:
-#
-# src_files:
-# - lib/source1.js
-# - lib/source2.js
-# - dist/**/*.js
-#
-src_files:
- - src/gl-matrix.js
- - src/gl-matrix/common.js
-
-# stylesheets
-#
-# Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
-# Default: []
-#
-# EXAMPLE:
-#
-# stylesheets:
-# - css/style.css
-# - stylesheets/*.css
-#
-stylesheets:
-
-# helpers
-#
-# Return an array of filepaths relative to spec_dir to include before jasmine specs.
-# Default: ["helpers/**/*.js"]
-#
-# EXAMPLE:
-#
-# helpers:
-# - helpers/**/*.js
-#
-helpers:
-
-# spec_files
-#
-# Return an array of filepaths relative to spec_dir to include.
-# Default: ["**/*[sS]pec.js"]
-#
-# EXAMPLE:
-#
-# spec_files:
-# - **/*[sS]pec.js
-#
-spec_files:
-
-# src_dir
-#
-# Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
-# Default: project root
-#
-# EXAMPLE:
-#
-# src_dir: public
-#
-src_dir:
-
-# spec_dir
-#
-# Spec directory path. Your spec_files must be returned relative to this path.
-# Default: spec/javascripts
-#
-# EXAMPLE:
-#
-# spec_dir: spec/javascripts
-#
-spec_dir: spec
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix.js
deleted file mode 100644
index da4fe60dfd2..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @fileoverview gl-matrix - High performance matrix and vector operations
- * @author Brandon Jones
- * @author Colin MacKenzie IV
- * @version 2.3.1
- */
-
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-// END HEADER
-
-exports.glMatrix = require("./gl-matrix/common.js");
-exports.mat2 = require("./gl-matrix/mat2.js");
-exports.mat2d = require("./gl-matrix/mat2d.js");
-exports.mat3 = require("./gl-matrix/mat3.js");
-exports.mat4 = require("./gl-matrix/mat4.js");
-exports.quat = require("./gl-matrix/quat.js");
-exports.vec2 = require("./gl-matrix/vec2.js");
-exports.vec3 = require("./gl-matrix/vec3.js");
-exports.vec4 = require("./gl-matrix/vec4.js"); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/common.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/common.js
deleted file mode 100644
index 5253421532e..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/common.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-/**
- * @class Common utilities
- * @name glMatrix
- */
-var glMatrix = {};
-
-// Constants
-glMatrix.EPSILON = 0.000001;
-glMatrix.ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Array : Array;
-glMatrix.RANDOM = Math.random;
-
-/**
- * Sets the type of array used when creating new vectors and matrices
- *
- * @param {Type} type Array type, such as Float32Array or Array
- */
-glMatrix.setMatrixArrayType = function(type) {
- GLMAT_ARRAY_TYPE = type;
-}
-
-var degree = Math.PI / 180;
-
-/**
-* Convert Degree To Radian
-*
-* @param {Number} Angle in Degrees
-*/
-glMatrix.toRadian = function(a){
- return a * degree;
-}
-
-module.exports = glMatrix;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2.js
deleted file mode 100644
index 012a5c1af6b..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2.js
+++ /dev/null
@@ -1,302 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 2x2 Matrix
- * @name mat2
- */
-var mat2 = {};
-
-/**
- * Creates a new identity mat2
- *
- * @returns {mat2} a new 2x2 matrix
- */
-mat2.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
-};
-
-/**
- * Creates a new mat2 initialized with values from an existing matrix
- *
- * @param {mat2} a matrix to clone
- * @returns {mat2} a new 2x2 matrix
- */
-mat2.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
-};
-
-/**
- * Copy the values from one mat2 to another
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
-mat2.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
-};
-
-/**
- * Set a mat2 to the identity matrix
- *
- * @param {mat2} out the receiving matrix
- * @returns {mat2} out
- */
-mat2.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
-};
-
-/**
- * Transpose the values of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
-mat2.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a1 = a[1];
- out[1] = a[2];
- out[2] = a1;
- } else {
- out[0] = a[0];
- out[1] = a[2];
- out[2] = a[1];
- out[3] = a[3];
- }
-
- return out;
-};
-
-/**
- * Inverts a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
-mat2.invert = function(out, a) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
-
- // Calculate the determinant
- det = a0 * a3 - a2 * a1;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = a3 * det;
- out[1] = -a1 * det;
- out[2] = -a2 * det;
- out[3] = a0 * det;
-
- return out;
-};
-
-/**
- * Calculates the adjugate of a mat2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the source matrix
- * @returns {mat2} out
- */
-mat2.adjoint = function(out, a) {
- // Caching this value is nessecary if out == a
- var a0 = a[0];
- out[0] = a[3];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a0;
-
- return out;
-};
-
-/**
- * Calculates the determinant of a mat2
- *
- * @param {mat2} a the source matrix
- * @returns {Number} determinant of a
- */
-mat2.determinant = function (a) {
- return a[0] * a[3] - a[2] * a[1];
-};
-
-/**
- * Multiplies two mat2's
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the first operand
- * @param {mat2} b the second operand
- * @returns {mat2} out
- */
-mat2.multiply = function (out, a, b) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];
- var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- return out;
-};
-
-/**
- * Alias for {@link mat2.multiply}
- * @function
- */
-mat2.mul = mat2.multiply;
-
-/**
- * Rotates a mat2 by the given angle
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
- */
-mat2.rotate = function (out, a, rad) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- return out;
-};
-
-/**
- * Scales the mat2 by the dimensions in the given vec2
- *
- * @param {mat2} out the receiving matrix
- * @param {mat2} a the matrix to rotate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat2} out
- **/
-mat2.scale = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- v0 = v[0], v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- return out;
-};
-
-/**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.rotate(dest, dest, rad);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2} out
- */
-mat2.fromRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- return out;
-}
-
-/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2.identity(dest);
- * mat2.scale(dest, dest, vec);
- *
- * @param {mat2} out mat2 receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat2} out
- */
-mat2.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- return out;
-}
-
-/**
- * Returns a string representation of a mat2
- *
- * @param {mat2} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-mat2.str = function (a) {
- return 'mat2(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
-};
-
-/**
- * Returns Frobenius norm of a mat2
- *
- * @param {mat2} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-mat2.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2)))
-};
-
-/**
- * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
- * @param {mat2} L the lower triangular matrix
- * @param {mat2} D the diagonal matrix
- * @param {mat2} U the upper triangular matrix
- * @param {mat2} a the input matrix to factorize
- */
-
-mat2.LDU = function (L, D, U, a) {
- L[2] = a[2]/a[0];
- U[0] = a[0];
- U[1] = a[1];
- U[3] = a[3] - L[2] * U[1];
- return [L, D, U];
-};
-
-
-module.exports = mat2;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2d.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2d.js
deleted file mode 100644
index df3a0e6a0b3..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat2d.js
+++ /dev/null
@@ -1,317 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 2x3 Matrix
- * @name mat2d
- *
- * @description
- * A mat2d contains six elements defined as:
- * <pre>
- * [a, c, tx,
- * b, d, ty]
- * </pre>
- * This is a short form for the 3x3 matrix:
- * <pre>
- * [a, c, tx,
- * b, d, ty,
- * 0, 0, 1]
- * </pre>
- * The last row is ignored so the array is shorter and operations are faster.
- */
-var mat2d = {};
-
-/**
- * Creates a new identity mat2d
- *
- * @returns {mat2d} a new 2x3 matrix
- */
-mat2d.create = function() {
- var out = new glMatrix.ARRAY_TYPE(6);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
-};
-
-/**
- * Creates a new mat2d initialized with values from an existing matrix
- *
- * @param {mat2d} a matrix to clone
- * @returns {mat2d} a new 2x3 matrix
- */
-mat2d.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(6);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
-};
-
-/**
- * Copy the values from one mat2d to another
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the source matrix
- * @returns {mat2d} out
- */
-mat2d.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- return out;
-};
-
-/**
- * Set a mat2d to the identity matrix
- *
- * @param {mat2d} out the receiving matrix
- * @returns {mat2d} out
- */
-mat2d.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = 0;
- out[5] = 0;
- return out;
-};
-
-/**
- * Inverts a mat2d
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the source matrix
- * @returns {mat2d} out
- */
-mat2d.invert = function(out, a) {
- var aa = a[0], ab = a[1], ac = a[2], ad = a[3],
- atx = a[4], aty = a[5];
-
- var det = aa * ad - ab * ac;
- if(!det){
- return null;
- }
- det = 1.0 / det;
-
- out[0] = ad * det;
- out[1] = -ab * det;
- out[2] = -ac * det;
- out[3] = aa * det;
- out[4] = (ac * aty - ad * atx) * det;
- out[5] = (ab * atx - aa * aty) * det;
- return out;
-};
-
-/**
- * Calculates the determinant of a mat2d
- *
- * @param {mat2d} a the source matrix
- * @returns {Number} determinant of a
- */
-mat2d.determinant = function (a) {
- return a[0] * a[3] - a[1] * a[2];
-};
-
-/**
- * Multiplies two mat2d's
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the first operand
- * @param {mat2d} b the second operand
- * @returns {mat2d} out
- */
-mat2d.multiply = function (out, a, b) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];
- out[0] = a0 * b0 + a2 * b1;
- out[1] = a1 * b0 + a3 * b1;
- out[2] = a0 * b2 + a2 * b3;
- out[3] = a1 * b2 + a3 * b3;
- out[4] = a0 * b4 + a2 * b5 + a4;
- out[5] = a1 * b4 + a3 * b5 + a5;
- return out;
-};
-
-/**
- * Alias for {@link mat2d.multiply}
- * @function
- */
-mat2d.mul = mat2d.multiply;
-
-/**
- * Rotates a mat2d by the given angle
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
- */
-mat2d.rotate = function (out, a, rad) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- s = Math.sin(rad),
- c = Math.cos(rad);
- out[0] = a0 * c + a2 * s;
- out[1] = a1 * c + a3 * s;
- out[2] = a0 * -s + a2 * c;
- out[3] = a1 * -s + a3 * c;
- out[4] = a4;
- out[5] = a5;
- return out;
-};
-
-/**
- * Scales the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to translate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat2d} out
- **/
-mat2d.scale = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- v0 = v[0], v1 = v[1];
- out[0] = a0 * v0;
- out[1] = a1 * v0;
- out[2] = a2 * v1;
- out[3] = a3 * v1;
- out[4] = a4;
- out[5] = a5;
- return out;
-};
-
-/**
- * Translates the mat2d by the dimensions in the given vec2
- *
- * @param {mat2d} out the receiving matrix
- * @param {mat2d} a the matrix to translate
- * @param {vec2} v the vec2 to translate the matrix by
- * @returns {mat2d} out
- **/
-mat2d.translate = function(out, a, v) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5],
- v0 = v[0], v1 = v[1];
- out[0] = a0;
- out[1] = a1;
- out[2] = a2;
- out[3] = a3;
- out[4] = a0 * v0 + a2 * v1 + a4;
- out[5] = a1 * v0 + a3 * v1 + a5;
- return out;
-};
-
-/**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.rotate(dest, dest, rad);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat2d} out
- */
-mat2d.fromRotation = function(out, rad) {
- var s = Math.sin(rad), c = Math.cos(rad);
- out[0] = c;
- out[1] = s;
- out[2] = -s;
- out[3] = c;
- out[4] = 0;
- out[5] = 0;
- return out;
-}
-
-/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.scale(dest, dest, vec);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat2d} out
- */
-mat2d.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = v[1];
- out[4] = 0;
- out[5] = 0;
- return out;
-}
-
-/**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat2d.identity(dest);
- * mat2d.translate(dest, dest, vec);
- *
- * @param {mat2d} out mat2d receiving operation result
- * @param {vec2} v Translation vector
- * @returns {mat2d} out
- */
-mat2d.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- out[4] = v[0];
- out[5] = v[1];
- return out;
-}
-
-/**
- * Returns a string representation of a mat2d
- *
- * @param {mat2d} a matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-mat2d.str = function (a) {
- return 'mat2d(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' +
- a[3] + ', ' + a[4] + ', ' + a[5] + ')';
-};
-
-/**
- * Returns Frobenius norm of a mat2d
- *
- * @param {mat2d} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-mat2d.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + 1))
-};
-
-module.exports = mat2d;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat3.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat3.js
deleted file mode 100644
index bdda05ef020..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat3.js
+++ /dev/null
@@ -1,565 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 3x3 Matrix
- * @name mat3
- */
-var mat3 = {};
-
-/**
- * Creates a new identity mat3
- *
- * @returns {mat3} a new 3x3 matrix
- */
-mat3.create = function() {
- var out = new glMatrix.ARRAY_TYPE(9);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
-};
-
-/**
- * Copies the upper-left 3x3 values into the given mat3.
- *
- * @param {mat3} out the receiving 3x3 matrix
- * @param {mat4} a the source 4x4 matrix
- * @returns {mat3} out
- */
-mat3.fromMat4 = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[4];
- out[4] = a[5];
- out[5] = a[6];
- out[6] = a[8];
- out[7] = a[9];
- out[8] = a[10];
- return out;
-};
-
-/**
- * Creates a new mat3 initialized with values from an existing matrix
- *
- * @param {mat3} a matrix to clone
- * @returns {mat3} a new 3x3 matrix
- */
-mat3.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(9);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
-};
-
-/**
- * Copy the values from one mat3 to another
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
-mat3.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
-};
-
-/**
- * Set a mat3 to the identity matrix
- *
- * @param {mat3} out the receiving matrix
- * @returns {mat3} out
- */
-mat3.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
-};
-
-/**
- * Transpose the values of a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
-mat3.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1], a02 = a[2], a12 = a[5];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a01;
- out[5] = a[7];
- out[6] = a02;
- out[7] = a12;
- } else {
- out[0] = a[0];
- out[1] = a[3];
- out[2] = a[6];
- out[3] = a[1];
- out[4] = a[4];
- out[5] = a[7];
- out[6] = a[2];
- out[7] = a[5];
- out[8] = a[8];
- }
-
- return out;
-};
-
-/**
- * Inverts a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
-mat3.invert = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- b01 = a22 * a11 - a12 * a21,
- b11 = -a22 * a10 + a12 * a20,
- b21 = a21 * a10 - a11 * a20,
-
- // Calculate the determinant
- det = a00 * b01 + a01 * b11 + a02 * b21;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = b01 * det;
- out[1] = (-a22 * a01 + a02 * a21) * det;
- out[2] = (a12 * a01 - a02 * a11) * det;
- out[3] = b11 * det;
- out[4] = (a22 * a00 - a02 * a20) * det;
- out[5] = (-a12 * a00 + a02 * a10) * det;
- out[6] = b21 * det;
- out[7] = (-a21 * a00 + a01 * a20) * det;
- out[8] = (a11 * a00 - a01 * a10) * det;
- return out;
-};
-
-/**
- * Calculates the adjugate of a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the source matrix
- * @returns {mat3} out
- */
-mat3.adjoint = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8];
-
- out[0] = (a11 * a22 - a12 * a21);
- out[1] = (a02 * a21 - a01 * a22);
- out[2] = (a01 * a12 - a02 * a11);
- out[3] = (a12 * a20 - a10 * a22);
- out[4] = (a00 * a22 - a02 * a20);
- out[5] = (a02 * a10 - a00 * a12);
- out[6] = (a10 * a21 - a11 * a20);
- out[7] = (a01 * a20 - a00 * a21);
- out[8] = (a00 * a11 - a01 * a10);
- return out;
-};
-
-/**
- * Calculates the determinant of a mat3
- *
- * @param {mat3} a the source matrix
- * @returns {Number} determinant of a
- */
-mat3.determinant = function (a) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8];
-
- return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);
-};
-
-/**
- * Multiplies two mat3's
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the first operand
- * @param {mat3} b the second operand
- * @returns {mat3} out
- */
-mat3.multiply = function (out, a, b) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- b00 = b[0], b01 = b[1], b02 = b[2],
- b10 = b[3], b11 = b[4], b12 = b[5],
- b20 = b[6], b21 = b[7], b22 = b[8];
-
- out[0] = b00 * a00 + b01 * a10 + b02 * a20;
- out[1] = b00 * a01 + b01 * a11 + b02 * a21;
- out[2] = b00 * a02 + b01 * a12 + b02 * a22;
-
- out[3] = b10 * a00 + b11 * a10 + b12 * a20;
- out[4] = b10 * a01 + b11 * a11 + b12 * a21;
- out[5] = b10 * a02 + b11 * a12 + b12 * a22;
-
- out[6] = b20 * a00 + b21 * a10 + b22 * a20;
- out[7] = b20 * a01 + b21 * a11 + b22 * a21;
- out[8] = b20 * a02 + b21 * a12 + b22 * a22;
- return out;
-};
-
-/**
- * Alias for {@link mat3.multiply}
- * @function
- */
-mat3.mul = mat3.multiply;
-
-/**
- * Translate a mat3 by the given vector
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to translate
- * @param {vec2} v vector to translate by
- * @returns {mat3} out
- */
-mat3.translate = function(out, a, v) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
- x = v[0], y = v[1];
-
- out[0] = a00;
- out[1] = a01;
- out[2] = a02;
-
- out[3] = a10;
- out[4] = a11;
- out[5] = a12;
-
- out[6] = x * a00 + y * a10 + a20;
- out[7] = x * a01 + y * a11 + a21;
- out[8] = x * a02 + y * a12 + a22;
- return out;
-};
-
-/**
- * Rotates a mat3 by the given angle
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
-mat3.rotate = function (out, a, rad) {
- var a00 = a[0], a01 = a[1], a02 = a[2],
- a10 = a[3], a11 = a[4], a12 = a[5],
- a20 = a[6], a21 = a[7], a22 = a[8],
-
- s = Math.sin(rad),
- c = Math.cos(rad);
-
- out[0] = c * a00 + s * a10;
- out[1] = c * a01 + s * a11;
- out[2] = c * a02 + s * a12;
-
- out[3] = c * a10 - s * a00;
- out[4] = c * a11 - s * a01;
- out[5] = c * a12 - s * a02;
-
- out[6] = a20;
- out[7] = a21;
- out[8] = a22;
- return out;
-};
-
-/**
- * Scales the mat3 by the dimensions in the given vec2
- *
- * @param {mat3} out the receiving matrix
- * @param {mat3} a the matrix to rotate
- * @param {vec2} v the vec2 to scale the matrix by
- * @returns {mat3} out
- **/
-mat3.scale = function(out, a, v) {
- var x = v[0], y = v[1];
-
- out[0] = x * a[0];
- out[1] = x * a[1];
- out[2] = x * a[2];
-
- out[3] = y * a[3];
- out[4] = y * a[4];
- out[5] = y * a[5];
-
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- return out;
-};
-
-/**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.translate(dest, dest, vec);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {vec2} v Translation vector
- * @returns {mat3} out
- */
-mat3.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 1;
- out[5] = 0;
- out[6] = v[0];
- out[7] = v[1];
- out[8] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from a given angle
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.rotate(dest, dest, rad);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat3} out
- */
-mat3.fromRotation = function(out, rad) {
- var s = Math.sin(rad), c = Math.cos(rad);
-
- out[0] = c;
- out[1] = s;
- out[2] = 0;
-
- out[3] = -s;
- out[4] = c;
- out[5] = 0;
-
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat3.identity(dest);
- * mat3.scale(dest, dest, vec);
- *
- * @param {mat3} out mat3 receiving operation result
- * @param {vec2} v Scaling vector
- * @returns {mat3} out
- */
-mat3.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
-
- out[3] = 0;
- out[4] = v[1];
- out[5] = 0;
-
- out[6] = 0;
- out[7] = 0;
- out[8] = 1;
- return out;
-}
-
-/**
- * Copies the values from a mat2d into a mat3
- *
- * @param {mat3} out the receiving matrix
- * @param {mat2d} a the matrix to copy
- * @returns {mat3} out
- **/
-mat3.fromMat2d = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = 0;
-
- out[3] = a[2];
- out[4] = a[3];
- out[5] = 0;
-
- out[6] = a[4];
- out[7] = a[5];
- out[8] = 1;
- return out;
-};
-
-/**
-* Calculates a 3x3 matrix from the given quaternion
-*
-* @param {mat3} out mat3 receiving operation result
-* @param {quat} q Quaternion to create matrix from
-*
-* @returns {mat3} out
-*/
-mat3.fromQuat = function (out, q) {
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- yx = y * x2,
- yy = y * y2,
- zx = z * x2,
- zy = z * y2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - yy - zz;
- out[3] = yx - wz;
- out[6] = zx + wy;
-
- out[1] = yx + wz;
- out[4] = 1 - xx - zz;
- out[7] = zy - wx;
-
- out[2] = zx - wy;
- out[5] = zy + wx;
- out[8] = 1 - xx - yy;
-
- return out;
-};
-
-/**
-* Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
-*
-* @param {mat3} out mat3 receiving operation result
-* @param {mat4} a Mat4 to derive the normal matrix from
-*
-* @returns {mat3} out
-*/
-mat3.normalFromMat4 = function (out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32,
-
- // Calculate the determinant
- det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
-
- out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
-
- out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
-
- return out;
-};
-
-/**
- * Returns a string representation of a mat3
- *
- * @param {mat3} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-mat3.str = function (a) {
- return 'mat3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' +
- a[3] + ', ' + a[4] + ', ' + a[5] + ', ' +
- a[6] + ', ' + a[7] + ', ' + a[8] + ')';
-};
-
-/**
- * Returns Frobenius norm of a mat3
- *
- * @param {mat3} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-mat3.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2)))
-};
-
-
-module.exports = mat3;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat4.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat4.js
deleted file mode 100644
index b82526d1365..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/mat4.js
+++ /dev/null
@@ -1,1283 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 4x4 Matrix
- * @name mat4
- */
-var mat4 = {};
-
-/**
- * Creates a new identity mat4
- *
- * @returns {mat4} a new 4x4 matrix
- */
-mat4.create = function() {
- var out = new glMatrix.ARRAY_TYPE(16);
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-};
-
-/**
- * Creates a new mat4 initialized with values from an existing matrix
- *
- * @param {mat4} a matrix to clone
- * @returns {mat4} a new 4x4 matrix
- */
-mat4.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(16);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
-};
-
-/**
- * Copy the values from one mat4 to another
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
-mat4.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
-};
-
-/**
- * Set a mat4 to the identity matrix
- *
- * @param {mat4} out the receiving matrix
- * @returns {mat4} out
- */
-mat4.identity = function(out) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-};
-
-/**
- * Transpose the values of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
-mat4.transpose = function(out, a) {
- // If we are transposing ourselves we can skip a few steps but have to cache some values
- if (out === a) {
- var a01 = a[1], a02 = a[2], a03 = a[3],
- a12 = a[6], a13 = a[7],
- a23 = a[11];
-
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a01;
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a02;
- out[9] = a12;
- out[11] = a[14];
- out[12] = a03;
- out[13] = a13;
- out[14] = a23;
- } else {
- out[0] = a[0];
- out[1] = a[4];
- out[2] = a[8];
- out[3] = a[12];
- out[4] = a[1];
- out[5] = a[5];
- out[6] = a[9];
- out[7] = a[13];
- out[8] = a[2];
- out[9] = a[6];
- out[10] = a[10];
- out[11] = a[14];
- out[12] = a[3];
- out[13] = a[7];
- out[14] = a[11];
- out[15] = a[15];
- }
-
- return out;
-};
-
-/**
- * Inverts a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
-mat4.invert = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32,
-
- // Calculate the determinant
- det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-
- if (!det) {
- return null;
- }
- det = 1.0 / det;
-
- out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
- out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
- out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
- out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
- out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
- out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
- out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
- out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
- out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
- out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
- out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
- out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
- out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
- out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
- out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
- out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
-
- return out;
-};
-
-/**
- * Calculates the adjugate of a mat4
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the source matrix
- * @returns {mat4} out
- */
-mat4.adjoint = function(out, a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
-
- out[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));
- out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));
- out[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));
- out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));
- out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));
- out[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));
- out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));
- out[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));
- out[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));
- out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));
- out[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));
- out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));
- out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));
- out[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));
- out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));
- out[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));
- return out;
-};
-
-/**
- * Calculates the determinant of a mat4
- *
- * @param {mat4} a the source matrix
- * @returns {Number} determinant of a
- */
-mat4.determinant = function (a) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
-
- b00 = a00 * a11 - a01 * a10,
- b01 = a00 * a12 - a02 * a10,
- b02 = a00 * a13 - a03 * a10,
- b03 = a01 * a12 - a02 * a11,
- b04 = a01 * a13 - a03 * a11,
- b05 = a02 * a13 - a03 * a12,
- b06 = a20 * a31 - a21 * a30,
- b07 = a20 * a32 - a22 * a30,
- b08 = a20 * a33 - a23 * a30,
- b09 = a21 * a32 - a22 * a31,
- b10 = a21 * a33 - a23 * a31,
- b11 = a22 * a33 - a23 * a32;
-
- // Calculate the determinant
- return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
-};
-
-/**
- * Multiplies two mat4's
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the first operand
- * @param {mat4} b the second operand
- * @returns {mat4} out
- */
-mat4.multiply = function (out, a, b) {
- var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
- a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
- a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
- a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
-
- // Cache only the current line of the second matrix
- var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];
- out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];
- out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];
- out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
-
- b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];
- out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
- out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
- out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
- out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
- return out;
-};
-
-/**
- * Alias for {@link mat4.multiply}
- * @function
- */
-mat4.mul = mat4.multiply;
-
-/**
- * Translate a mat4 by the given vector
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to translate
- * @param {vec3} v vector to translate by
- * @returns {mat4} out
- */
-mat4.translate = function (out, a, v) {
- var x = v[0], y = v[1], z = v[2],
- a00, a01, a02, a03,
- a10, a11, a12, a13,
- a20, a21, a22, a23;
-
- if (a === out) {
- out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
- out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
- out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
- out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
- } else {
- a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
- a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
- a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
-
- out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;
- out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;
- out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;
-
- out[12] = a00 * x + a10 * y + a20 * z + a[12];
- out[13] = a01 * x + a11 * y + a21 * z + a[13];
- out[14] = a02 * x + a12 * y + a22 * z + a[14];
- out[15] = a03 * x + a13 * y + a23 * z + a[15];
- }
-
- return out;
-};
-
-/**
- * Scales the mat4 by the dimensions in the given vec3
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to scale
- * @param {vec3} v the vec3 to scale the matrix by
- * @returns {mat4} out
- **/
-mat4.scale = function(out, a, v) {
- var x = v[0], y = v[1], z = v[2];
-
- out[0] = a[0] * x;
- out[1] = a[1] * x;
- out[2] = a[2] * x;
- out[3] = a[3] * x;
- out[4] = a[4] * y;
- out[5] = a[5] * y;
- out[6] = a[6] * y;
- out[7] = a[7] * y;
- out[8] = a[8] * z;
- out[9] = a[9] * z;
- out[10] = a[10] * z;
- out[11] = a[11] * z;
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- return out;
-};
-
-/**
- * Rotates a mat4 by the given angle around the given axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @param {vec3} axis the axis to rotate around
- * @returns {mat4} out
- */
-mat4.rotate = function (out, a, rad, axis) {
- var x = axis[0], y = axis[1], z = axis[2],
- len = Math.sqrt(x * x + y * y + z * z),
- s, c, t,
- a00, a01, a02, a03,
- a10, a11, a12, a13,
- a20, a21, a22, a23,
- b00, b01, b02,
- b10, b11, b12,
- b20, b21, b22;
-
- if (Math.abs(len) < glMatrix.EPSILON) { return null; }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
-
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
-
- a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
- a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
- a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
-
- // Construct the elements of the rotation matrix
- b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;
- b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;
- b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;
-
- // Perform rotation-specific matrix multiplication
- out[0] = a00 * b00 + a10 * b01 + a20 * b02;
- out[1] = a01 * b00 + a11 * b01 + a21 * b02;
- out[2] = a02 * b00 + a12 * b01 + a22 * b02;
- out[3] = a03 * b00 + a13 * b01 + a23 * b02;
- out[4] = a00 * b10 + a10 * b11 + a20 * b12;
- out[5] = a01 * b10 + a11 * b11 + a21 * b12;
- out[6] = a02 * b10 + a12 * b11 + a22 * b12;
- out[7] = a03 * b10 + a13 * b11 + a23 * b12;
- out[8] = a00 * b20 + a10 * b21 + a20 * b22;
- out[9] = a01 * b20 + a11 * b21 + a21 * b22;
- out[10] = a02 * b20 + a12 * b21 + a22 * b22;
- out[11] = a03 * b20 + a13 * b21 + a23 * b22;
-
- if (a !== out) { // If the source and destination differ, copy the unchanged last row
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
- return out;
-};
-
-/**
- * Rotates a matrix by the given angle around the X axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-mat4.rotateX = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7],
- a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged rows
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[4] = a10 * c + a20 * s;
- out[5] = a11 * c + a21 * s;
- out[6] = a12 * c + a22 * s;
- out[7] = a13 * c + a23 * s;
- out[8] = a20 * c - a10 * s;
- out[9] = a21 * c - a11 * s;
- out[10] = a22 * c - a12 * s;
- out[11] = a23 * c - a13 * s;
- return out;
-};
-
-/**
- * Rotates a matrix by the given angle around the Y axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-mat4.rotateY = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3],
- a20 = a[8],
- a21 = a[9],
- a22 = a[10],
- a23 = a[11];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged rows
- out[4] = a[4];
- out[5] = a[5];
- out[6] = a[6];
- out[7] = a[7];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[0] = a00 * c - a20 * s;
- out[1] = a01 * c - a21 * s;
- out[2] = a02 * c - a22 * s;
- out[3] = a03 * c - a23 * s;
- out[8] = a00 * s + a20 * c;
- out[9] = a01 * s + a21 * c;
- out[10] = a02 * s + a22 * c;
- out[11] = a03 * s + a23 * c;
- return out;
-};
-
-/**
- * Rotates a matrix by the given angle around the Z axis
- *
- * @param {mat4} out the receiving matrix
- * @param {mat4} a the matrix to rotate
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-mat4.rotateZ = function (out, a, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad),
- a00 = a[0],
- a01 = a[1],
- a02 = a[2],
- a03 = a[3],
- a10 = a[4],
- a11 = a[5],
- a12 = a[6],
- a13 = a[7];
-
- if (a !== out) { // If the source and destination differ, copy the unchanged last row
- out[8] = a[8];
- out[9] = a[9];
- out[10] = a[10];
- out[11] = a[11];
- out[12] = a[12];
- out[13] = a[13];
- out[14] = a[14];
- out[15] = a[15];
- }
-
- // Perform axis-specific matrix multiplication
- out[0] = a00 * c + a10 * s;
- out[1] = a01 * c + a11 * s;
- out[2] = a02 * c + a12 * s;
- out[3] = a03 * c + a13 * s;
- out[4] = a10 * c - a00 * s;
- out[5] = a11 * c - a01 * s;
- out[6] = a12 * c - a02 * s;
- out[7] = a13 * c - a03 * s;
- return out;
-};
-
-/**
- * Creates a matrix from a vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {vec3} v Translation vector
- * @returns {mat4} out
- */
-mat4.fromTranslation = function(out, v) {
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from a vector scaling
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.scale(dest, dest, vec);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {vec3} v Scaling vector
- * @returns {mat4} out
- */
-mat4.fromScaling = function(out, v) {
- out[0] = v[0];
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = v[1];
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = v[2];
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from a given angle around a given axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotate(dest, dest, rad, axis);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @param {vec3} axis the axis to rotate around
- * @returns {mat4} out
- */
-mat4.fromRotation = function(out, rad, axis) {
- var x = axis[0], y = axis[1], z = axis[2],
- len = Math.sqrt(x * x + y * y + z * z),
- s, c, t;
-
- if (Math.abs(len) < glMatrix.EPSILON) { return null; }
-
- len = 1 / len;
- x *= len;
- y *= len;
- z *= len;
-
- s = Math.sin(rad);
- c = Math.cos(rad);
- t = 1 - c;
-
- // Perform rotation-specific matrix multiplication
- out[0] = x * x * t + c;
- out[1] = y * x * t + z * s;
- out[2] = z * x * t - y * s;
- out[3] = 0;
- out[4] = x * y * t - z * s;
- out[5] = y * y * t + c;
- out[6] = z * y * t + x * s;
- out[7] = 0;
- out[8] = x * z * t + y * s;
- out[9] = y * z * t - x * s;
- out[10] = z * z * t + c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from the given angle around the X axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateX(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-mat4.fromXRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = 1;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = c;
- out[6] = s;
- out[7] = 0;
- out[8] = 0;
- out[9] = -s;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from the given angle around the Y axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateY(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-mat4.fromYRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = c;
- out[1] = 0;
- out[2] = -s;
- out[3] = 0;
- out[4] = 0;
- out[5] = 1;
- out[6] = 0;
- out[7] = 0;
- out[8] = s;
- out[9] = 0;
- out[10] = c;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from the given angle around the Z axis
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.rotateZ(dest, dest, rad);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {Number} rad the angle to rotate the matrix by
- * @returns {mat4} out
- */
-mat4.fromZRotation = function(out, rad) {
- var s = Math.sin(rad),
- c = Math.cos(rad);
-
- // Perform axis-specific matrix multiplication
- out[0] = c;
- out[1] = s;
- out[2] = 0;
- out[3] = 0;
- out[4] = -s;
- out[5] = c;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 1;
- out[11] = 0;
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
- return out;
-}
-
-/**
- * Creates a matrix from a quaternion rotation and vector translation
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @returns {mat4} out
- */
-mat4.fromRotationTranslation = function (out, q, v) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - (yy + zz);
- out[1] = xy + wz;
- out[2] = xz - wy;
- out[3] = 0;
- out[4] = xy - wz;
- out[5] = 1 - (xx + zz);
- out[6] = yz + wx;
- out[7] = 0;
- out[8] = xz + wy;
- out[9] = yz - wx;
- out[10] = 1 - (xx + yy);
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
-
- return out;
-};
-
-/**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @param {vec3} s Scaling vector
- * @returns {mat4} out
- */
-mat4.fromRotationTranslationScale = function (out, q, v, s) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2,
- sx = s[0],
- sy = s[1],
- sz = s[2];
-
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0];
- out[13] = v[1];
- out[14] = v[2];
- out[15] = 1;
-
- return out;
-};
-
-/**
- * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin
- * This is equivalent to (but much faster than):
- *
- * mat4.identity(dest);
- * mat4.translate(dest, vec);
- * mat4.translate(dest, origin);
- * var quatMat = mat4.create();
- * quat4.toMat4(quat, quatMat);
- * mat4.multiply(dest, quatMat);
- * mat4.scale(dest, scale)
- * mat4.translate(dest, negativeOrigin);
- *
- * @param {mat4} out mat4 receiving operation result
- * @param {quat4} q Rotation quaternion
- * @param {vec3} v Translation vector
- * @param {vec3} s Scaling vector
- * @param {vec3} o The origin vector around which to scale and rotate
- * @returns {mat4} out
- */
-mat4.fromRotationTranslationScaleOrigin = function (out, q, v, s, o) {
- // Quaternion math
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- xy = x * y2,
- xz = x * z2,
- yy = y * y2,
- yz = y * z2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2,
-
- sx = s[0],
- sy = s[1],
- sz = s[2],
-
- ox = o[0],
- oy = o[1],
- oz = o[2];
-
- out[0] = (1 - (yy + zz)) * sx;
- out[1] = (xy + wz) * sx;
- out[2] = (xz - wy) * sx;
- out[3] = 0;
- out[4] = (xy - wz) * sy;
- out[5] = (1 - (xx + zz)) * sy;
- out[6] = (yz + wx) * sy;
- out[7] = 0;
- out[8] = (xz + wy) * sz;
- out[9] = (yz - wx) * sz;
- out[10] = (1 - (xx + yy)) * sz;
- out[11] = 0;
- out[12] = v[0] + ox - (out[0] * ox + out[4] * oy + out[8] * oz);
- out[13] = v[1] + oy - (out[1] * ox + out[5] * oy + out[9] * oz);
- out[14] = v[2] + oz - (out[2] * ox + out[6] * oy + out[10] * oz);
- out[15] = 1;
-
- return out;
-};
-
-mat4.fromQuat = function (out, q) {
- var x = q[0], y = q[1], z = q[2], w = q[3],
- x2 = x + x,
- y2 = y + y,
- z2 = z + z,
-
- xx = x * x2,
- yx = y * x2,
- yy = y * y2,
- zx = z * x2,
- zy = z * y2,
- zz = z * z2,
- wx = w * x2,
- wy = w * y2,
- wz = w * z2;
-
- out[0] = 1 - yy - zz;
- out[1] = yx + wz;
- out[2] = zx - wy;
- out[3] = 0;
-
- out[4] = yx - wz;
- out[5] = 1 - xx - zz;
- out[6] = zy + wx;
- out[7] = 0;
-
- out[8] = zx + wy;
- out[9] = zy - wx;
- out[10] = 1 - xx - yy;
- out[11] = 0;
-
- out[12] = 0;
- out[13] = 0;
- out[14] = 0;
- out[15] = 1;
-
- return out;
-};
-
-/**
- * Generates a frustum matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {Number} left Left bound of the frustum
- * @param {Number} right Right bound of the frustum
- * @param {Number} bottom Bottom bound of the frustum
- * @param {Number} top Top bound of the frustum
- * @param {Number} near Near bound of the frustum
- * @param {Number} far Far bound of the frustum
- * @returns {mat4} out
- */
-mat4.frustum = function (out, left, right, bottom, top, near, far) {
- var rl = 1 / (right - left),
- tb = 1 / (top - bottom),
- nf = 1 / (near - far);
- out[0] = (near * 2) * rl;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = (near * 2) * tb;
- out[6] = 0;
- out[7] = 0;
- out[8] = (right + left) * rl;
- out[9] = (top + bottom) * tb;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = (far * near * 2) * nf;
- out[15] = 0;
- return out;
-};
-
-/**
- * Generates a perspective projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fovy Vertical field of view in radians
- * @param {number} aspect Aspect ratio. typically viewport width/height
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
-mat4.perspective = function (out, fovy, aspect, near, far) {
- var f = 1.0 / Math.tan(fovy / 2),
- nf = 1 / (near - far);
- out[0] = f / aspect;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = f;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = (far + near) * nf;
- out[11] = -1;
- out[12] = 0;
- out[13] = 0;
- out[14] = (2 * far * near) * nf;
- out[15] = 0;
- return out;
-};
-
-/**
- * Generates a perspective projection matrix with the given field of view.
- * This is primarily useful for generating projection matrices to be used
- * with the still experiemental WebVR API.
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
-mat4.perspectiveFromFieldOfView = function (out, fov, near, far) {
- var upTan = Math.tan(fov.upDegrees * Math.PI/180.0),
- downTan = Math.tan(fov.downDegrees * Math.PI/180.0),
- leftTan = Math.tan(fov.leftDegrees * Math.PI/180.0),
- rightTan = Math.tan(fov.rightDegrees * Math.PI/180.0),
- xScale = 2.0 / (leftTan + rightTan),
- yScale = 2.0 / (upTan + downTan);
-
- out[0] = xScale;
- out[1] = 0.0;
- out[2] = 0.0;
- out[3] = 0.0;
- out[4] = 0.0;
- out[5] = yScale;
- out[6] = 0.0;
- out[7] = 0.0;
- out[8] = -((leftTan - rightTan) * xScale * 0.5);
- out[9] = ((upTan - downTan) * yScale * 0.5);
- out[10] = far / (near - far);
- out[11] = -1.0;
- out[12] = 0.0;
- out[13] = 0.0;
- out[14] = (far * near) / (near - far);
- out[15] = 0.0;
- return out;
-}
-
-/**
- * Generates a orthogonal projection matrix with the given bounds
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {number} left Left bound of the frustum
- * @param {number} right Right bound of the frustum
- * @param {number} bottom Bottom bound of the frustum
- * @param {number} top Top bound of the frustum
- * @param {number} near Near bound of the frustum
- * @param {number} far Far bound of the frustum
- * @returns {mat4} out
- */
-mat4.ortho = function (out, left, right, bottom, top, near, far) {
- var lr = 1 / (left - right),
- bt = 1 / (bottom - top),
- nf = 1 / (near - far);
- out[0] = -2 * lr;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- out[4] = 0;
- out[5] = -2 * bt;
- out[6] = 0;
- out[7] = 0;
- out[8] = 0;
- out[9] = 0;
- out[10] = 2 * nf;
- out[11] = 0;
- out[12] = (left + right) * lr;
- out[13] = (top + bottom) * bt;
- out[14] = (far + near) * nf;
- out[15] = 1;
- return out;
-};
-
-/**
- * Generates a look-at matrix with the given eye position, focal point, and up axis
- *
- * @param {mat4} out mat4 frustum matrix will be written into
- * @param {vec3} eye Position of the viewer
- * @param {vec3} center Point the viewer is looking at
- * @param {vec3} up vec3 pointing up
- * @returns {mat4} out
- */
-mat4.lookAt = function (out, eye, center, up) {
- var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,
- eyex = eye[0],
- eyey = eye[1],
- eyez = eye[2],
- upx = up[0],
- upy = up[1],
- upz = up[2],
- centerx = center[0],
- centery = center[1],
- centerz = center[2];
-
- if (Math.abs(eyex - centerx) < glMatrix.EPSILON &&
- Math.abs(eyey - centery) < glMatrix.EPSILON &&
- Math.abs(eyez - centerz) < glMatrix.EPSILON) {
- return mat4.identity(out);
- }
-
- z0 = eyex - centerx;
- z1 = eyey - centery;
- z2 = eyez - centerz;
-
- len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);
- z0 *= len;
- z1 *= len;
- z2 *= len;
-
- x0 = upy * z2 - upz * z1;
- x1 = upz * z0 - upx * z2;
- x2 = upx * z1 - upy * z0;
- len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);
- if (!len) {
- x0 = 0;
- x1 = 0;
- x2 = 0;
- } else {
- len = 1 / len;
- x0 *= len;
- x1 *= len;
- x2 *= len;
- }
-
- y0 = z1 * x2 - z2 * x1;
- y1 = z2 * x0 - z0 * x2;
- y2 = z0 * x1 - z1 * x0;
-
- len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);
- if (!len) {
- y0 = 0;
- y1 = 0;
- y2 = 0;
- } else {
- len = 1 / len;
- y0 *= len;
- y1 *= len;
- y2 *= len;
- }
-
- out[0] = x0;
- out[1] = y0;
- out[2] = z0;
- out[3] = 0;
- out[4] = x1;
- out[5] = y1;
- out[6] = z1;
- out[7] = 0;
- out[8] = x2;
- out[9] = y2;
- out[10] = z2;
- out[11] = 0;
- out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
- out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
- out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
- out[15] = 1;
-
- return out;
-};
-
-/**
- * Returns a string representation of a mat4
- *
- * @param {mat4} mat matrix to represent as a string
- * @returns {String} string representation of the matrix
- */
-mat4.str = function (a) {
- return 'mat4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ', ' +
- a[4] + ', ' + a[5] + ', ' + a[6] + ', ' + a[7] + ', ' +
- a[8] + ', ' + a[9] + ', ' + a[10] + ', ' + a[11] + ', ' +
- a[12] + ', ' + a[13] + ', ' + a[14] + ', ' + a[15] + ')';
-};
-
-/**
- * Returns Frobenius norm of a mat4
- *
- * @param {mat4} a the matrix to calculate Frobenius norm of
- * @returns {Number} Frobenius norm
- */
-mat4.frob = function (a) {
- return(Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2) + Math.pow(a[2], 2) + Math.pow(a[3], 2) + Math.pow(a[4], 2) + Math.pow(a[5], 2) + Math.pow(a[6], 2) + Math.pow(a[7], 2) + Math.pow(a[8], 2) + Math.pow(a[9], 2) + Math.pow(a[10], 2) + Math.pow(a[11], 2) + Math.pow(a[12], 2) + Math.pow(a[13], 2) + Math.pow(a[14], 2) + Math.pow(a[15], 2) ))
-};
-
-
-module.exports = mat4;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/quat.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/quat.js
deleted file mode 100644
index 2990f7ba52f..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/quat.js
+++ /dev/null
@@ -1,553 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-var mat3 = require("./mat3.js");
-var vec3 = require("./vec3.js");
-var vec4 = require("./vec4.js");
-
-/**
- * @class Quaternion
- * @name quat
- */
-var quat = {};
-
-/**
- * Creates a new identity quat
- *
- * @returns {quat} a new quaternion
- */
-quat.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
-};
-
-/**
- * Sets a quaternion to represent the shortest rotation from one
- * vector to another.
- *
- * Both vectors are assumed to be unit length.
- *
- * @param {quat} out the receiving quaternion.
- * @param {vec3} a the initial vector
- * @param {vec3} b the destination vector
- * @returns {quat} out
- */
-quat.rotationTo = (function() {
- var tmpvec3 = vec3.create();
- var xUnitVec3 = vec3.fromValues(1,0,0);
- var yUnitVec3 = vec3.fromValues(0,1,0);
-
- return function(out, a, b) {
- var dot = vec3.dot(a, b);
- if (dot < -0.999999) {
- vec3.cross(tmpvec3, xUnitVec3, a);
- if (vec3.length(tmpvec3) < 0.000001)
- vec3.cross(tmpvec3, yUnitVec3, a);
- vec3.normalize(tmpvec3, tmpvec3);
- quat.setAxisAngle(out, tmpvec3, Math.PI);
- return out;
- } else if (dot > 0.999999) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
- } else {
- vec3.cross(tmpvec3, a, b);
- out[0] = tmpvec3[0];
- out[1] = tmpvec3[1];
- out[2] = tmpvec3[2];
- out[3] = 1 + dot;
- return quat.normalize(out, out);
- }
- };
-})();
-
-/**
- * Sets the specified quaternion with values corresponding to the given
- * axes. Each axis is a vec3 and is expected to be unit length and
- * perpendicular to all other specified axes.
- *
- * @param {vec3} view the vector representing the viewing direction
- * @param {vec3} right the vector representing the local "right" direction
- * @param {vec3} up the vector representing the local "up" direction
- * @returns {quat} out
- */
-quat.setAxes = (function() {
- var matr = mat3.create();
-
- return function(out, view, right, up) {
- matr[0] = right[0];
- matr[3] = right[1];
- matr[6] = right[2];
-
- matr[1] = up[0];
- matr[4] = up[1];
- matr[7] = up[2];
-
- matr[2] = -view[0];
- matr[5] = -view[1];
- matr[8] = -view[2];
-
- return quat.normalize(out, quat.fromMat3(out, matr));
- };
-})();
-
-/**
- * Creates a new quat initialized with values from an existing quaternion
- *
- * @param {quat} a quaternion to clone
- * @returns {quat} a new quaternion
- * @function
- */
-quat.clone = vec4.clone;
-
-/**
- * Creates a new quat initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} a new quaternion
- * @function
- */
-quat.fromValues = vec4.fromValues;
-
-/**
- * Copy the values from one quat to another
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the source quaternion
- * @returns {quat} out
- * @function
- */
-quat.copy = vec4.copy;
-
-/**
- * Set the components of a quat to the given values
- *
- * @param {quat} out the receiving quaternion
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {quat} out
- * @function
- */
-quat.set = vec4.set;
-
-/**
- * Set a quat to the identity quaternion
- *
- * @param {quat} out the receiving quaternion
- * @returns {quat} out
- */
-quat.identity = function(out) {
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 1;
- return out;
-};
-
-/**
- * Sets a quat from the given angle and rotation axis,
- * then returns it.
- *
- * @param {quat} out the receiving quaternion
- * @param {vec3} axis the axis around which to rotate
- * @param {Number} rad the angle in radians
- * @returns {quat} out
- **/
-quat.setAxisAngle = function(out, axis, rad) {
- rad = rad * 0.5;
- var s = Math.sin(rad);
- out[0] = s * axis[0];
- out[1] = s * axis[1];
- out[2] = s * axis[2];
- out[3] = Math.cos(rad);
- return out;
-};
-
-/**
- * Adds two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {quat} out
- * @function
- */
-quat.add = vec4.add;
-
-/**
- * Multiplies two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {quat} out
- */
-quat.multiply = function(out, a, b) {
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = b[0], by = b[1], bz = b[2], bw = b[3];
-
- out[0] = ax * bw + aw * bx + ay * bz - az * by;
- out[1] = ay * bw + aw * by + az * bx - ax * bz;
- out[2] = az * bw + aw * bz + ax * by - ay * bx;
- out[3] = aw * bw - ax * bx - ay * by - az * bz;
- return out;
-};
-
-/**
- * Alias for {@link quat.multiply}
- * @function
- */
-quat.mul = quat.multiply;
-
-/**
- * Scales a quat by a scalar number
- *
- * @param {quat} out the receiving vector
- * @param {quat} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {quat} out
- * @function
- */
-quat.scale = vec4.scale;
-
-/**
- * Rotates a quaternion by the given angle about the X axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
-quat.rotateX = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw + aw * bx;
- out[1] = ay * bw + az * bx;
- out[2] = az * bw - ay * bx;
- out[3] = aw * bw - ax * bx;
- return out;
-};
-
-/**
- * Rotates a quaternion by the given angle about the Y axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
-quat.rotateY = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- by = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw - az * by;
- out[1] = ay * bw + aw * by;
- out[2] = az * bw + ax * by;
- out[3] = aw * bw - ay * by;
- return out;
-};
-
-/**
- * Rotates a quaternion by the given angle about the Z axis
- *
- * @param {quat} out quat receiving operation result
- * @param {quat} a quat to rotate
- * @param {number} rad angle (in radians) to rotate
- * @returns {quat} out
- */
-quat.rotateZ = function (out, a, rad) {
- rad *= 0.5;
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bz = Math.sin(rad), bw = Math.cos(rad);
-
- out[0] = ax * bw + ay * bz;
- out[1] = ay * bw - ax * bz;
- out[2] = az * bw + aw * bz;
- out[3] = aw * bw - az * bz;
- return out;
-};
-
-/**
- * Calculates the W component of a quat from the X, Y, and Z components.
- * Assumes that quaternion is 1 unit in length.
- * Any existing W component will be ignored.
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate W component of
- * @returns {quat} out
- */
-quat.calculateW = function (out, a) {
- var x = a[0], y = a[1], z = a[2];
-
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));
- return out;
-};
-
-/**
- * Calculates the dot product of two quat's
- *
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @returns {Number} dot product of a and b
- * @function
- */
-quat.dot = vec4.dot;
-
-/**
- * Performs a linear interpolation between two quat's
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {quat} out
- * @function
- */
-quat.lerp = vec4.lerp;
-
-/**
- * Performs a spherical linear interpolation between two quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {quat} out
- */
-quat.slerp = function (out, a, b, t) {
- // benchmarks:
- // http://jsperf.com/quaternion-slerp-implementations
-
- var ax = a[0], ay = a[1], az = a[2], aw = a[3],
- bx = b[0], by = b[1], bz = b[2], bw = b[3];
-
- var omega, cosom, sinom, scale0, scale1;
-
- // calc cosine
- cosom = ax * bx + ay * by + az * bz + aw * bw;
- // adjust signs (if necessary)
- if ( cosom < 0.0 ) {
- cosom = -cosom;
- bx = - bx;
- by = - by;
- bz = - bz;
- bw = - bw;
- }
- // calculate coefficients
- if ( (1.0 - cosom) > 0.000001 ) {
- // standard case (slerp)
- omega = Math.acos(cosom);
- sinom = Math.sin(omega);
- scale0 = Math.sin((1.0 - t) * omega) / sinom;
- scale1 = Math.sin(t * omega) / sinom;
- } else {
- // "from" and "to" quaternions are very close
- // ... so we can do a linear interpolation
- scale0 = 1.0 - t;
- scale1 = t;
- }
- // calculate final values
- out[0] = scale0 * ax + scale1 * bx;
- out[1] = scale0 * ay + scale1 * by;
- out[2] = scale0 * az + scale1 * bz;
- out[3] = scale0 * aw + scale1 * bw;
-
- return out;
-};
-
-/**
- * Performs a spherical linear interpolation with two control points
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a the first operand
- * @param {quat} b the second operand
- * @param {quat} c the third operand
- * @param {quat} d the fourth operand
- * @param {Number} t interpolation amount
- * @returns {quat} out
- */
-quat.sqlerp = (function () {
- var temp1 = quat.create();
- var temp2 = quat.create();
-
- return function (out, a, b, c, d, t) {
- quat.slerp(temp1, a, d, t);
- quat.slerp(temp2, b, c, t);
- quat.slerp(out, temp1, temp2, 2 * t * (1 - t));
-
- return out;
- };
-}());
-
-/**
- * Calculates the inverse of a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate inverse of
- * @returns {quat} out
- */
-quat.invert = function(out, a) {
- var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
- dot = a0*a0 + a1*a1 + a2*a2 + a3*a3,
- invDot = dot ? 1.0/dot : 0;
-
- // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
-
- out[0] = -a0*invDot;
- out[1] = -a1*invDot;
- out[2] = -a2*invDot;
- out[3] = a3*invDot;
- return out;
-};
-
-/**
- * Calculates the conjugate of a quat
- * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quat to calculate conjugate of
- * @returns {quat} out
- */
-quat.conjugate = function (out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = a[3];
- return out;
-};
-
-/**
- * Calculates the length of a quat
- *
- * @param {quat} a vector to calculate length of
- * @returns {Number} length of a
- * @function
- */
-quat.length = vec4.length;
-
-/**
- * Alias for {@link quat.length}
- * @function
- */
-quat.len = quat.length;
-
-/**
- * Calculates the squared length of a quat
- *
- * @param {quat} a vector to calculate squared length of
- * @returns {Number} squared length of a
- * @function
- */
-quat.squaredLength = vec4.squaredLength;
-
-/**
- * Alias for {@link quat.squaredLength}
- * @function
- */
-quat.sqrLen = quat.squaredLength;
-
-/**
- * Normalize a quat
- *
- * @param {quat} out the receiving quaternion
- * @param {quat} a quaternion to normalize
- * @returns {quat} out
- * @function
- */
-quat.normalize = vec4.normalize;
-
-/**
- * Creates a quaternion from the given 3x3 rotation matrix.
- *
- * NOTE: The resultant quaternion is not normalized, so you should be sure
- * to renormalize the quaternion yourself where necessary.
- *
- * @param {quat} out the receiving quaternion
- * @param {mat3} m rotation matrix
- * @returns {quat} out
- * @function
- */
-quat.fromMat3 = function(out, m) {
- // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
- // article "Quaternion Calculus and Fast Animation".
- var fTrace = m[0] + m[4] + m[8];
- var fRoot;
-
- if ( fTrace > 0.0 ) {
- // |w| > 1/2, may as well choose w > 1/2
- fRoot = Math.sqrt(fTrace + 1.0); // 2w
- out[3] = 0.5 * fRoot;
- fRoot = 0.5/fRoot; // 1/(4w)
- out[0] = (m[5]-m[7])*fRoot;
- out[1] = (m[6]-m[2])*fRoot;
- out[2] = (m[1]-m[3])*fRoot;
- } else {
- // |w| <= 1/2
- var i = 0;
- if ( m[4] > m[0] )
- i = 1;
- if ( m[8] > m[i*3+i] )
- i = 2;
- var j = (i+1)%3;
- var k = (i+2)%3;
-
- fRoot = Math.sqrt(m[i*3+i]-m[j*3+j]-m[k*3+k] + 1.0);
- out[i] = 0.5 * fRoot;
- fRoot = 0.5 / fRoot;
- out[3] = (m[j*3+k] - m[k*3+j]) * fRoot;
- out[j] = (m[j*3+i] + m[i*3+j]) * fRoot;
- out[k] = (m[k*3+i] + m[i*3+k]) * fRoot;
- }
-
- return out;
-};
-
-/**
- * Returns a string representation of a quatenion
- *
- * @param {quat} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
-quat.str = function (a) {
- return 'quat(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
-};
-
-module.exports = quat;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec2.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec2.js
deleted file mode 100644
index 9e790563af5..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec2.js
+++ /dev/null
@@ -1,523 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 2 Dimensional Vector
- * @name vec2
- */
-var vec2 = {};
-
-/**
- * Creates a new, empty vec2
- *
- * @returns {vec2} a new 2D vector
- */
-vec2.create = function() {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = 0;
- out[1] = 0;
- return out;
-};
-
-/**
- * Creates a new vec2 initialized with values from an existing vector
- *
- * @param {vec2} a vector to clone
- * @returns {vec2} a new 2D vector
- */
-vec2.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = a[0];
- out[1] = a[1];
- return out;
-};
-
-/**
- * Creates a new vec2 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} a new 2D vector
- */
-vec2.fromValues = function(x, y) {
- var out = new glMatrix.ARRAY_TYPE(2);
- out[0] = x;
- out[1] = y;
- return out;
-};
-
-/**
- * Copy the values from one vec2 to another
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the source vector
- * @returns {vec2} out
- */
-vec2.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- return out;
-};
-
-/**
- * Set the components of a vec2 to the given values
- *
- * @param {vec2} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @returns {vec2} out
- */
-vec2.set = function(out, x, y) {
- out[0] = x;
- out[1] = y;
- return out;
-};
-
-/**
- * Adds two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
-vec2.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- return out;
-};
-
-/**
- * Subtracts vector b from vector a
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
-vec2.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- return out;
-};
-
-/**
- * Alias for {@link vec2.subtract}
- * @function
- */
-vec2.sub = vec2.subtract;
-
-/**
- * Multiplies two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
-vec2.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- return out;
-};
-
-/**
- * Alias for {@link vec2.multiply}
- * @function
- */
-vec2.mul = vec2.multiply;
-
-/**
- * Divides two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
-vec2.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- return out;
-};
-
-/**
- * Alias for {@link vec2.divide}
- * @function
- */
-vec2.div = vec2.divide;
-
-/**
- * Returns the minimum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
-vec2.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- return out;
-};
-
-/**
- * Returns the maximum of two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec2} out
- */
-vec2.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- return out;
-};
-
-/**
- * Scales a vec2 by a scalar number
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec2} out
- */
-vec2.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- return out;
-};
-
-/**
- * Adds two vec2's after scaling the second operand by a scalar value
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec2} out
- */
-vec2.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- return out;
-};
-
-/**
- * Calculates the euclidian distance between two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} distance between a and b
- */
-vec2.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return Math.sqrt(x*x + y*y);
-};
-
-/**
- * Alias for {@link vec2.distance}
- * @function
- */
-vec2.dist = vec2.distance;
-
-/**
- * Calculates the squared euclidian distance between two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} squared distance between a and b
- */
-vec2.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1];
- return x*x + y*y;
-};
-
-/**
- * Alias for {@link vec2.squaredDistance}
- * @function
- */
-vec2.sqrDist = vec2.squaredDistance;
-
-/**
- * Calculates the length of a vec2
- *
- * @param {vec2} a vector to calculate length of
- * @returns {Number} length of a
- */
-vec2.length = function (a) {
- var x = a[0],
- y = a[1];
- return Math.sqrt(x*x + y*y);
-};
-
-/**
- * Alias for {@link vec2.length}
- * @function
- */
-vec2.len = vec2.length;
-
-/**
- * Calculates the squared length of a vec2
- *
- * @param {vec2} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
-vec2.squaredLength = function (a) {
- var x = a[0],
- y = a[1];
- return x*x + y*y;
-};
-
-/**
- * Alias for {@link vec2.squaredLength}
- * @function
- */
-vec2.sqrLen = vec2.squaredLength;
-
-/**
- * Negates the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to negate
- * @returns {vec2} out
- */
-vec2.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- return out;
-};
-
-/**
- * Returns the inverse of the components of a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to invert
- * @returns {vec2} out
- */
-vec2.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- return out;
-};
-
-/**
- * Normalize a vec2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a vector to normalize
- * @returns {vec2} out
- */
-vec2.normalize = function(out, a) {
- var x = a[0],
- y = a[1];
- var len = x*x + y*y;
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- }
- return out;
-};
-
-/**
- * Calculates the dot product of two vec2's
- *
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {Number} dot product of a and b
- */
-vec2.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1];
-};
-
-/**
- * Computes the cross product of two vec2's
- * Note that the cross product must by definition produce a 3D vector
- *
- * @param {vec3} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @returns {vec3} out
- */
-vec2.cross = function(out, a, b) {
- var z = a[0] * b[1] - a[1] * b[0];
- out[0] = out[1] = 0;
- out[2] = z;
- return out;
-};
-
-/**
- * Performs a linear interpolation between two vec2's
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the first operand
- * @param {vec2} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec2} out
- */
-vec2.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- return out;
-};
-
-/**
- * Generates a random vector with the given scale
- *
- * @param {vec2} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec2} out
- */
-vec2.random = function (out, scale) {
- scale = scale || 1.0;
- var r = glMatrix.RANDOM() * 2.0 * Math.PI;
- out[0] = Math.cos(r) * scale;
- out[1] = Math.sin(r) * scale;
- return out;
-};
-
-/**
- * Transforms the vec2 with a mat2
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat2} m matrix to transform with
- * @returns {vec2} out
- */
-vec2.transformMat2 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y;
- out[1] = m[1] * x + m[3] * y;
- return out;
-};
-
-/**
- * Transforms the vec2 with a mat2d
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat2d} m matrix to transform with
- * @returns {vec2} out
- */
-vec2.transformMat2d = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[2] * y + m[4];
- out[1] = m[1] * x + m[3] * y + m[5];
- return out;
-};
-
-/**
- * Transforms the vec2 with a mat3
- * 3rd vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat3} m matrix to transform with
- * @returns {vec2} out
- */
-vec2.transformMat3 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[3] * y + m[6];
- out[1] = m[1] * x + m[4] * y + m[7];
- return out;
-};
-
-/**
- * Transforms the vec2 with a mat4
- * 3rd vector component is implicitly '0'
- * 4th vector component is implicitly '1'
- *
- * @param {vec2} out the receiving vector
- * @param {vec2} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec2} out
- */
-vec2.transformMat4 = function(out, a, m) {
- var x = a[0],
- y = a[1];
- out[0] = m[0] * x + m[4] * y + m[12];
- out[1] = m[1] * x + m[5] * y + m[13];
- return out;
-};
-
-/**
- * Perform some operation over an array of vec2s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
-vec2.forEach = (function() {
- var vec = vec2.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 2;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1];
- }
-
- return a;
- };
-})();
-
-/**
- * Returns a string representation of a vector
- *
- * @param {vec2} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
-vec2.str = function (a) {
- return 'vec2(' + a[0] + ', ' + a[1] + ')';
-};
-
-module.exports = vec2;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec3.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec3.js
deleted file mode 100644
index c0676feefcd..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec3.js
+++ /dev/null
@@ -1,709 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 3 Dimensional Vector
- * @name vec3
- */
-var vec3 = {};
-
-/**
- * Creates a new, empty vec3
- *
- * @returns {vec3} a new 3D vector
- */
-vec3.create = function() {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- return out;
-};
-
-/**
- * Creates a new vec3 initialized with values from an existing vector
- *
- * @param {vec3} a vector to clone
- * @returns {vec3} a new 3D vector
- */
-vec3.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
-};
-
-/**
- * Creates a new vec3 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} a new 3D vector
- */
-vec3.fromValues = function(x, y, z) {
- var out = new glMatrix.ARRAY_TYPE(3);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
-};
-
-/**
- * Copy the values from one vec3 to another
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the source vector
- * @returns {vec3} out
- */
-vec3.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- return out;
-};
-
-/**
- * Set the components of a vec3 to the given values
- *
- * @param {vec3} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @returns {vec3} out
- */
-vec3.set = function(out, x, y, z) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- return out;
-};
-
-/**
- * Adds two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- return out;
-};
-
-/**
- * Subtracts vector b from vector a
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- return out;
-};
-
-/**
- * Alias for {@link vec3.subtract}
- * @function
- */
-vec3.sub = vec3.subtract;
-
-/**
- * Multiplies two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- return out;
-};
-
-/**
- * Alias for {@link vec3.multiply}
- * @function
- */
-vec3.mul = vec3.multiply;
-
-/**
- * Divides two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- return out;
-};
-
-/**
- * Alias for {@link vec3.divide}
- * @function
- */
-vec3.div = vec3.divide;
-
-/**
- * Returns the minimum of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- return out;
-};
-
-/**
- * Returns the maximum of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- return out;
-};
-
-/**
- * Scales a vec3 by a scalar number
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec3} out
- */
-vec3.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- return out;
-};
-
-/**
- * Adds two vec3's after scaling the second operand by a scalar value
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec3} out
- */
-vec3.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- out[2] = a[2] + (b[2] * scale);
- return out;
-};
-
-/**
- * Calculates the euclidian distance between two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} distance between a and b
- */
-vec3.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2];
- return Math.sqrt(x*x + y*y + z*z);
-};
-
-/**
- * Alias for {@link vec3.distance}
- * @function
- */
-vec3.dist = vec3.distance;
-
-/**
- * Calculates the squared euclidian distance between two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} squared distance between a and b
- */
-vec3.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2];
- return x*x + y*y + z*z;
-};
-
-/**
- * Alias for {@link vec3.squaredDistance}
- * @function
- */
-vec3.sqrDist = vec3.squaredDistance;
-
-/**
- * Calculates the length of a vec3
- *
- * @param {vec3} a vector to calculate length of
- * @returns {Number} length of a
- */
-vec3.length = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- return Math.sqrt(x*x + y*y + z*z);
-};
-
-/**
- * Alias for {@link vec3.length}
- * @function
- */
-vec3.len = vec3.length;
-
-/**
- * Calculates the squared length of a vec3
- *
- * @param {vec3} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
-vec3.squaredLength = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- return x*x + y*y + z*z;
-};
-
-/**
- * Alias for {@link vec3.squaredLength}
- * @function
- */
-vec3.sqrLen = vec3.squaredLength;
-
-/**
- * Negates the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to negate
- * @returns {vec3} out
- */
-vec3.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- return out;
-};
-
-/**
- * Returns the inverse of the components of a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to invert
- * @returns {vec3} out
- */
-vec3.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- return out;
-};
-
-/**
- * Normalize a vec3
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a vector to normalize
- * @returns {vec3} out
- */
-vec3.normalize = function(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2];
- var len = x*x + y*y + z*z;
- if (len > 0) {
- //TODO: evaluate use of glm_invsqrt here?
- len = 1 / Math.sqrt(len);
- out[0] = a[0] * len;
- out[1] = a[1] * len;
- out[2] = a[2] * len;
- }
- return out;
-};
-
-/**
- * Calculates the dot product of two vec3's
- *
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {Number} dot product of a and b
- */
-vec3.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
-};
-
-/**
- * Computes the cross product of two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @returns {vec3} out
- */
-vec3.cross = function(out, a, b) {
- var ax = a[0], ay = a[1], az = a[2],
- bx = b[0], by = b[1], bz = b[2];
-
- out[0] = ay * bz - az * by;
- out[1] = az * bx - ax * bz;
- out[2] = ax * by - ay * bx;
- return out;
-};
-
-/**
- * Performs a linear interpolation between two vec3's
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
-vec3.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1],
- az = a[2];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- return out;
-};
-
-/**
- * Performs a hermite interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {vec3} c the third operand
- * @param {vec3} d the fourth operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
-vec3.hermite = function (out, a, b, c, d, t) {
- var factorTimes2 = t * t,
- factor1 = factorTimes2 * (2 * t - 3) + 1,
- factor2 = factorTimes2 * (t - 2) + t,
- factor3 = factorTimes2 * (t - 1),
- factor4 = factorTimes2 * (3 - 2 * t);
-
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
-
- return out;
-};
-
-/**
- * Performs a bezier interpolation with two control points
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the first operand
- * @param {vec3} b the second operand
- * @param {vec3} c the third operand
- * @param {vec3} d the fourth operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec3} out
- */
-vec3.bezier = function (out, a, b, c, d, t) {
- var inverseFactor = 1 - t,
- inverseFactorTimesTwo = inverseFactor * inverseFactor,
- factorTimes2 = t * t,
- factor1 = inverseFactorTimesTwo * inverseFactor,
- factor2 = 3 * t * inverseFactorTimesTwo,
- factor3 = 3 * factorTimes2 * inverseFactor,
- factor4 = factorTimes2 * t;
-
- out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;
- out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;
- out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;
-
- return out;
-};
-
-/**
- * Generates a random vector with the given scale
- *
- * @param {vec3} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec3} out
- */
-vec3.random = function (out, scale) {
- scale = scale || 1.0;
-
- var r = glMatrix.RANDOM() * 2.0 * Math.PI;
- var z = (glMatrix.RANDOM() * 2.0) - 1.0;
- var zScale = Math.sqrt(1.0-z*z) * scale;
-
- out[0] = Math.cos(r) * zScale;
- out[1] = Math.sin(r) * zScale;
- out[2] = z * scale;
- return out;
-};
-
-/**
- * Transforms the vec3 with a mat4.
- * 4th vector component is implicitly '1'
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec3} out
- */
-vec3.transformMat4 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2],
- w = m[3] * x + m[7] * y + m[11] * z + m[15];
- w = w || 1.0;
- out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;
- out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;
- out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;
- return out;
-};
-
-/**
- * Transforms the vec3 with a mat3.
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {mat4} m the 3x3 matrix to transform with
- * @returns {vec3} out
- */
-vec3.transformMat3 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2];
- out[0] = x * m[0] + y * m[3] + z * m[6];
- out[1] = x * m[1] + y * m[4] + z * m[7];
- out[2] = x * m[2] + y * m[5] + z * m[8];
- return out;
-};
-
-/**
- * Transforms the vec3 with a quat
- *
- * @param {vec3} out the receiving vector
- * @param {vec3} a the vector to transform
- * @param {quat} q quaternion to transform with
- * @returns {vec3} out
- */
-vec3.transformQuat = function(out, a, q) {
- // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations
-
- var x = a[0], y = a[1], z = a[2],
- qx = q[0], qy = q[1], qz = q[2], qw = q[3],
-
- // calculate quat * vec
- ix = qw * x + qy * z - qz * y,
- iy = qw * y + qz * x - qx * z,
- iz = qw * z + qx * y - qy * x,
- iw = -qx * x - qy * y - qz * z;
-
- // calculate result * inverse quat
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- return out;
-};
-
-/**
- * Rotate a 3D vector around the x-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
-vec3.rotateX = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[0];
- r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c);
- r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c);
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
-};
-
-/**
- * Rotate a 3D vector around the y-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
-vec3.rotateY = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c);
- r[1] = p[1];
- r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c);
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
-};
-
-/**
- * Rotate a 3D vector around the z-axis
- * @param {vec3} out The receiving vec3
- * @param {vec3} a The vec3 point to rotate
- * @param {vec3} b The origin of the rotation
- * @param {Number} c The angle of rotation
- * @returns {vec3} out
- */
-vec3.rotateZ = function(out, a, b, c){
- var p = [], r=[];
- //Translate point to the origin
- p[0] = a[0] - b[0];
- p[1] = a[1] - b[1];
- p[2] = a[2] - b[2];
-
- //perform rotation
- r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c);
- r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c);
- r[2] = p[2];
-
- //translate to correct position
- out[0] = r[0] + b[0];
- out[1] = r[1] + b[1];
- out[2] = r[2] + b[2];
-
- return out;
-};
-
-/**
- * Perform some operation over an array of vec3s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
-vec3.forEach = (function() {
- var vec = vec3.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 3;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2];
- }
-
- return a;
- };
-})();
-
-/**
- * Get the angle between two 3D vectors
- * @param {vec3} a The first operand
- * @param {vec3} b The second operand
- * @returns {Number} The angle in radians
- */
-vec3.angle = function(a, b) {
-
- var tempA = vec3.fromValues(a[0], a[1], a[2]);
- var tempB = vec3.fromValues(b[0], b[1], b[2]);
-
- vec3.normalize(tempA, tempA);
- vec3.normalize(tempB, tempB);
-
- var cosine = vec3.dot(tempA, tempB);
-
- if(cosine > 1.0){
- return 0;
- } else {
- return Math.acos(cosine);
- }
-};
-
-/**
- * Returns a string representation of a vector
- *
- * @param {vec3} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
-vec3.str = function (a) {
- return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';
-};
-
-module.exports = vec3;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec4.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec4.js
deleted file mode 100644
index f18d17440ae..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/src/gl-matrix/vec4.js
+++ /dev/null
@@ -1,537 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var glMatrix = require("./common.js");
-
-/**
- * @class 4 Dimensional Vector
- * @name vec4
- */
-var vec4 = {};
-
-/**
- * Creates a new, empty vec4
- *
- * @returns {vec4} a new 4D vector
- */
-vec4.create = function() {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = 0;
- out[1] = 0;
- out[2] = 0;
- out[3] = 0;
- return out;
-};
-
-/**
- * Creates a new vec4 initialized with values from an existing vector
- *
- * @param {vec4} a vector to clone
- * @returns {vec4} a new 4D vector
- */
-vec4.clone = function(a) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
-};
-
-/**
- * Creates a new vec4 initialized with the given values
- *
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} a new 4D vector
- */
-vec4.fromValues = function(x, y, z, w) {
- var out = new glMatrix.ARRAY_TYPE(4);
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
-};
-
-/**
- * Copy the values from one vec4 to another
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the source vector
- * @returns {vec4} out
- */
-vec4.copy = function(out, a) {
- out[0] = a[0];
- out[1] = a[1];
- out[2] = a[2];
- out[3] = a[3];
- return out;
-};
-
-/**
- * Set the components of a vec4 to the given values
- *
- * @param {vec4} out the receiving vector
- * @param {Number} x X component
- * @param {Number} y Y component
- * @param {Number} z Z component
- * @param {Number} w W component
- * @returns {vec4} out
- */
-vec4.set = function(out, x, y, z, w) {
- out[0] = x;
- out[1] = y;
- out[2] = z;
- out[3] = w;
- return out;
-};
-
-/**
- * Adds two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
-vec4.add = function(out, a, b) {
- out[0] = a[0] + b[0];
- out[1] = a[1] + b[1];
- out[2] = a[2] + b[2];
- out[3] = a[3] + b[3];
- return out;
-};
-
-/**
- * Subtracts vector b from vector a
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
-vec4.subtract = function(out, a, b) {
- out[0] = a[0] - b[0];
- out[1] = a[1] - b[1];
- out[2] = a[2] - b[2];
- out[3] = a[3] - b[3];
- return out;
-};
-
-/**
- * Alias for {@link vec4.subtract}
- * @function
- */
-vec4.sub = vec4.subtract;
-
-/**
- * Multiplies two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
-vec4.multiply = function(out, a, b) {
- out[0] = a[0] * b[0];
- out[1] = a[1] * b[1];
- out[2] = a[2] * b[2];
- out[3] = a[3] * b[3];
- return out;
-};
-
-/**
- * Alias for {@link vec4.multiply}
- * @function
- */
-vec4.mul = vec4.multiply;
-
-/**
- * Divides two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
-vec4.divide = function(out, a, b) {
- out[0] = a[0] / b[0];
- out[1] = a[1] / b[1];
- out[2] = a[2] / b[2];
- out[3] = a[3] / b[3];
- return out;
-};
-
-/**
- * Alias for {@link vec4.divide}
- * @function
- */
-vec4.div = vec4.divide;
-
-/**
- * Returns the minimum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
-vec4.min = function(out, a, b) {
- out[0] = Math.min(a[0], b[0]);
- out[1] = Math.min(a[1], b[1]);
- out[2] = Math.min(a[2], b[2]);
- out[3] = Math.min(a[3], b[3]);
- return out;
-};
-
-/**
- * Returns the maximum of two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {vec4} out
- */
-vec4.max = function(out, a, b) {
- out[0] = Math.max(a[0], b[0]);
- out[1] = Math.max(a[1], b[1]);
- out[2] = Math.max(a[2], b[2]);
- out[3] = Math.max(a[3], b[3]);
- return out;
-};
-
-/**
- * Scales a vec4 by a scalar number
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to scale
- * @param {Number} b amount to scale the vector by
- * @returns {vec4} out
- */
-vec4.scale = function(out, a, b) {
- out[0] = a[0] * b;
- out[1] = a[1] * b;
- out[2] = a[2] * b;
- out[3] = a[3] * b;
- return out;
-};
-
-/**
- * Adds two vec4's after scaling the second operand by a scalar value
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @param {Number} scale the amount to scale b by before adding
- * @returns {vec4} out
- */
-vec4.scaleAndAdd = function(out, a, b, scale) {
- out[0] = a[0] + (b[0] * scale);
- out[1] = a[1] + (b[1] * scale);
- out[2] = a[2] + (b[2] * scale);
- out[3] = a[3] + (b[3] * scale);
- return out;
-};
-
-/**
- * Calculates the euclidian distance between two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} distance between a and b
- */
-vec4.distance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2],
- w = b[3] - a[3];
- return Math.sqrt(x*x + y*y + z*z + w*w);
-};
-
-/**
- * Alias for {@link vec4.distance}
- * @function
- */
-vec4.dist = vec4.distance;
-
-/**
- * Calculates the squared euclidian distance between two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} squared distance between a and b
- */
-vec4.squaredDistance = function(a, b) {
- var x = b[0] - a[0],
- y = b[1] - a[1],
- z = b[2] - a[2],
- w = b[3] - a[3];
- return x*x + y*y + z*z + w*w;
-};
-
-/**
- * Alias for {@link vec4.squaredDistance}
- * @function
- */
-vec4.sqrDist = vec4.squaredDistance;
-
-/**
- * Calculates the length of a vec4
- *
- * @param {vec4} a vector to calculate length of
- * @returns {Number} length of a
- */
-vec4.length = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- return Math.sqrt(x*x + y*y + z*z + w*w);
-};
-
-/**
- * Alias for {@link vec4.length}
- * @function
- */
-vec4.len = vec4.length;
-
-/**
- * Calculates the squared length of a vec4
- *
- * @param {vec4} a vector to calculate squared length of
- * @returns {Number} squared length of a
- */
-vec4.squaredLength = function (a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- return x*x + y*y + z*z + w*w;
-};
-
-/**
- * Alias for {@link vec4.squaredLength}
- * @function
- */
-vec4.sqrLen = vec4.squaredLength;
-
-/**
- * Negates the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to negate
- * @returns {vec4} out
- */
-vec4.negate = function(out, a) {
- out[0] = -a[0];
- out[1] = -a[1];
- out[2] = -a[2];
- out[3] = -a[3];
- return out;
-};
-
-/**
- * Returns the inverse of the components of a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to invert
- * @returns {vec4} out
- */
-vec4.inverse = function(out, a) {
- out[0] = 1.0 / a[0];
- out[1] = 1.0 / a[1];
- out[2] = 1.0 / a[2];
- out[3] = 1.0 / a[3];
- return out;
-};
-
-/**
- * Normalize a vec4
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a vector to normalize
- * @returns {vec4} out
- */
-vec4.normalize = function(out, a) {
- var x = a[0],
- y = a[1],
- z = a[2],
- w = a[3];
- var len = x*x + y*y + z*z + w*w;
- if (len > 0) {
- len = 1 / Math.sqrt(len);
- out[0] = x * len;
- out[1] = y * len;
- out[2] = z * len;
- out[3] = w * len;
- }
- return out;
-};
-
-/**
- * Calculates the dot product of two vec4's
- *
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @returns {Number} dot product of a and b
- */
-vec4.dot = function (a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
-};
-
-/**
- * Performs a linear interpolation between two vec4's
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the first operand
- * @param {vec4} b the second operand
- * @param {Number} t interpolation amount between the two inputs
- * @returns {vec4} out
- */
-vec4.lerp = function (out, a, b, t) {
- var ax = a[0],
- ay = a[1],
- az = a[2],
- aw = a[3];
- out[0] = ax + t * (b[0] - ax);
- out[1] = ay + t * (b[1] - ay);
- out[2] = az + t * (b[2] - az);
- out[3] = aw + t * (b[3] - aw);
- return out;
-};
-
-/**
- * Generates a random vector with the given scale
- *
- * @param {vec4} out the receiving vector
- * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned
- * @returns {vec4} out
- */
-vec4.random = function (out, scale) {
- scale = scale || 1.0;
-
- //TODO: This is a pretty awful way of doing this. Find something better.
- out[0] = glMatrix.RANDOM();
- out[1] = glMatrix.RANDOM();
- out[2] = glMatrix.RANDOM();
- out[3] = glMatrix.RANDOM();
- vec4.normalize(out, out);
- vec4.scale(out, out, scale);
- return out;
-};
-
-/**
- * Transforms the vec4 with a mat4.
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to transform
- * @param {mat4} m matrix to transform with
- * @returns {vec4} out
- */
-vec4.transformMat4 = function(out, a, m) {
- var x = a[0], y = a[1], z = a[2], w = a[3];
- out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;
- out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;
- out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;
- out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;
- return out;
-};
-
-/**
- * Transforms the vec4 with a quat
- *
- * @param {vec4} out the receiving vector
- * @param {vec4} a the vector to transform
- * @param {quat} q quaternion to transform with
- * @returns {vec4} out
- */
-vec4.transformQuat = function(out, a, q) {
- var x = a[0], y = a[1], z = a[2],
- qx = q[0], qy = q[1], qz = q[2], qw = q[3],
-
- // calculate quat * vec
- ix = qw * x + qy * z - qz * y,
- iy = qw * y + qz * x - qx * z,
- iz = qw * z + qx * y - qy * x,
- iw = -qx * x - qy * y - qz * z;
-
- // calculate result * inverse quat
- out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;
- out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;
- out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;
- out[3] = a[3];
- return out;
-};
-
-/**
- * Perform some operation over an array of vec4s.
- *
- * @param {Array} a the array of vectors to iterate over
- * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
- * @param {Number} offset Number of elements to skip at the beginning of the array
- * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
- * @param {Function} fn Function to call for each vector in the array
- * @param {Object} [arg] additional argument to pass to fn
- * @returns {Array} a
- * @function
- */
-vec4.forEach = (function() {
- var vec = vec4.create();
-
- return function(a, stride, offset, count, fn, arg) {
- var i, l;
- if(!stride) {
- stride = 4;
- }
-
- if(!offset) {
- offset = 0;
- }
-
- if(count) {
- l = Math.min((count * stride) + offset, a.length);
- } else {
- l = a.length;
- }
-
- for(i = offset; i < l; i += stride) {
- vec[0] = a[i]; vec[1] = a[i+1]; vec[2] = a[i+2]; vec[3] = a[i+3];
- fn(vec, vec, arg);
- a[i] = vec[0]; a[i+1] = vec[1]; a[i+2] = vec[2]; a[i+3] = vec[3];
- }
-
- return a;
- };
-})();
-
-/**
- * Returns a string representation of a vector
- *
- * @param {vec4} vec vector to represent as a string
- * @returns {String} string representation of the vector
- */
-vec4.str = function (a) {
- return 'vec4(' + a[0] + ', ' + a[1] + ', ' + a[2] + ', ' + a[3] + ')';
-};
-
-module.exports = vec4;
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build.rake b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build.rake
deleted file mode 100644
index a1783aabc7c..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build.rake
+++ /dev/null
@@ -1,2 +0,0 @@
-desc "compile & minify sources into a single file"
-task :build => ['build:compile', 'build:minify']
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/compile.rake b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/compile.rake
deleted file mode 100644
index 905e393d889..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/compile.rake
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace :build do
- task :compile do
- compile
- end
-end
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/minify.rake b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/minify.rake
deleted file mode 100644
index ea5fec42af5..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/build/minify.rake
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace :build do
- task :minify do
- minify
- end
-end
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/default.rake b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/default.rake
deleted file mode 100644
index c057922037d..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/default.rake
+++ /dev/null
@@ -1 +0,0 @@
-task :default => ['test:node', 'test:ci']
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/release.rake b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/release.rake
deleted file mode 100644
index c70f70cfc13..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/release.rake
+++ /dev/null
@@ -1,21 +0,0 @@
-desc "tag and release gl-matrix v#{GLMatrix::VERSION}"
-task :release do
- require 'thor'
- Bundler.ui = Bundler::UI::Shell.new(Thor::Shell::Basic.new)
- Bundler.ui.debug! if ENV['DEBUG']
-
- # Sanity check: rebuild files just in case dev forgot to.
- # If so, files will change and release will abort since changes
- # were not checked in.
- Rake::Task['build'].invoke
-
- release do
- # Put other release-related stuff here, such as publishing docs;
- # if anything fails, gl-matrix will be untagged and not pushed.
- #
- # Example:
- #
- # Rake::Task['doc:publish'].invoke
- #
- end
-end
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix.rb b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix.rb
deleted file mode 100644
index cecdc615a97..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix.rb
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright (c) 2013 Brandon Jones, Colin MacKenzie IV
-#
-# This software is provided 'as-is', without any express or implied
-# warranty. In no event will the authors be held liable for any damages
-# arising from the use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software
-# in a product, an acknowledgment in the product documentation would be
-# appreciated but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not
-# be misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-#
-$:.unshift File.expand_path('.', File.dirname(__FILE__))
-require 'sprockets'
-require 'jasmine'
-
-class Jasmine::Config
- def simple_config_file
- File.expand_path GLMatrix.base_path.join('spec/jasmine.yml')
- end
-end
-
-class Rack::Jasmine::Runner
- alias_method :jasmine_call, :call
- def call(env)
- GLMatrix.compile
- jasmine_call env
- end
-end
-
-module GLMatrix
- autoload :ReleaseHelper, 'gl-matrix/release_helper'
- autoload :Version, 'gl-matrix/version'
- autoload :VERSION, 'gl-matrix/version'
-
- module_function
-
- def release(&block)
- GLMatrix::ReleaseHelper.release &block
- end
-
- def sprockets
- env = Sprockets::Environment.new base_path
- env.append_path base_path.join('src')
- env
- end
-
- def base_path
- Pathname.new File.expand_path('../..', File.dirname(__FILE__))
- end
-
- # Compiles the source file to the dest file. If a block
- # is given, the source file is yielded and replaced with
- # the result. Returns the destination as a Pathname.
- def compile(source = 'gl-matrix.js', dest = 'dist/gl-matrix.js')
- dest = base_path.join dest
- js = sprockets[source]
- js = yield js if block_given?
-
- File.open dest, "w" do |f|
- f.puts js
- end
-
- puts "compiled #{source} to #{dest.relative_path_from base_path}"
- dest
- end
-
- def minify(source = 'gl-matrix.js', dest = 'dist/gl-matrix-min.js')
- dest = compile source, dest do |js|
- Uglifier.compile js
- end
-
- puts "minified #{source} to #{dest.relative_path_from base_path}"
- end
-
-end
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/release_helper.rb b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/release_helper.rb
deleted file mode 100644
index 4aca02baf88..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/release_helper.rb
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright (c) 2013 Brandon Jones, Colin MacKenzie IV
-#
-# This software is provided 'as-is', without any express or implied
-# warranty. In no event will the authors be held liable for any damages
-# arising from the use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software
-# in a product, an acknowledgment in the product documentation would be
-# appreciated but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not
-# be misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-
-# Pretty much everything here was ripped from Bundler.
-# https://github.com/carlhuda/bundler/blob/master/lib/bundler/gem_helper.rb
-module GLMatrix::ReleaseHelper
- module_function
-
- def release
- guard_clean
- guard_already_tagged
- tag_version {
- yield if block_given?
- git_push
- }
- end
-
- def base
- GLMatrix.base_path.to_s
- end
-
- def git_push
- perform_git_push
- perform_git_push ' --tags'
- Bundler.ui.confirm "Pushed git commits and tags"
- end
-
- def perform_git_push(options = '')
- cmd = "git push #{options}"
- out, code = sh_with_code(cmd)
- raise "Couldn't git push. `#{cmd}' failed with the following output:\n\n#{out}\n" unless code == 0
- end
-
- def guard_already_tagged
- if sh('git tag').split(/\n/).include?(version_tag)
- raise("This tag has already been committed to the repo.")
- end
- end
-
- def guard_clean
- clean? or raise("There are files that need to be committed first.")
- end
-
- def clean?
- sh_with_code("git diff --exit-code")[1] == 0
- end
-
- def tag_version
- sh "git tag -a -m \"Version #{version}\" #{version_tag}"
- Bundler.ui.confirm "Tagged #{version_tag}"
- yield if block_given?
- rescue
- Bundler.ui.error "Untagged #{version_tag} due to error"
- sh_with_code "git tag -d #{version_tag}"
- raise
- end
-
- def version
- GLMatrix::VERSION
- end
-
- def version_tag
- "v#{version}"
- end
-
- def name
- "gl-matrix"
- end
-
- def sh(cmd, &block)
- out, code = sh_with_code(cmd, &block)
- code == 0 ? out : raise(out.empty? ? "Running `#{cmd}' failed. Run this command directly for more detailed output." : out)
- end
-
- def sh_with_code(cmd, &block)
- cmd << " 2>&1"
- outbuf = ''
- Bundler.ui.debug(cmd)
- Dir.chdir(base) {
- outbuf = `#{cmd}`
- if $? == 0
- block.call(outbuf) if block
- end
- }
- [outbuf, $?]
- end
-end
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/version.rb b/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/version.rb
deleted file mode 100644
index 73bb9d2889d..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/tasks/support/gl-matrix/version.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (c) 2013 Brandon Jones, Colin MacKenzie IV
-#
-# This software is provided 'as-is', without any express or implied
-# warranty. In no event will the authors be held liable for any damages
-# arising from the use of this software.
-#
-# Permission is granted to anyone to use this software for any purpose,
-# including commercial applications, and to alter it and redistribute it
-# freely, subject to the following restrictions:
-#
-# 1. The origin of this software must not be misrepresented; you must not
-# claim that you wrote the original software. If you use this software
-# in a product, an acknowledgment in the product documentation would be
-# appreciated but is not required.
-#
-# 2. Altered source versions must be plainly marked as such, and must not
-# be misrepresented as being the original software.
-#
-# 3. This notice may not be removed or altered from any source distribution.
-
-module GLMatrix
- module Version
- MAJOR, MINOR, PATCH, REL = *File.read(base_path.join 'VERSION').split(".")
- STRING = [MAJOR, MINOR, PATCH, REL].compact.join '.'
- end
-
- VERSION = Version::STRING
-end
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.js
deleted file mode 100644
index b9eace3a5ad..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var fs = require('fs');
-var webpack = require('webpack');
-
-var entryFile = './src/gl-matrix.js';
-
-// Read the comments from the top of the main gl-matrix file and append them to
-// the minified version.
-var header = '';
-var mainFile = fs.readFileSync(entryFile, { encoding: 'utf8' });
-if (mainFile) {
- var headerIndex = mainFile.indexOf('\/\/ END HEADER');
- if (headerIndex >= 0) {
- header = mainFile.substr(0, headerIndex);
- }
-}
-
-module.exports = {
- entry: entryFile,
- output: {
- path: __dirname + '/dist',
- filename: 'gl-matrix.js',
- libraryTarget: 'umd'
- },
- plugins: [
- new webpack.BannerPlugin(header, { raw: true }),
- ]
-}; \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.min.js b/chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.min.js
deleted file mode 100644
index c7f91092d1b..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/gl-matrix/webpack.config.min.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. */
-
-var webpack = require('webpack');
-module.exports = require('./webpack.config.js');
-
-module.exports.plugins.unshift(
- new webpack.optimize.UglifyJsPlugin()
-);
-
-module.exports.output.filename = 'gl-matrix-min.js'; \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/jszip/LICENSE.markdown b/chromium/third_party/catapult/tracing/third_party/jszip/LICENSE.markdown
deleted file mode 100644
index 77b40ad819e..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/jszip/LICENSE.markdown
+++ /dev/null
@@ -1,651 +0,0 @@
-JSZip is dual licensed. You may use it under the MIT license *or* the GPLv3
-license.
-
-The MIT License
-===============
-
-Copyright (c) 2009-2012 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-
-GPL version 3
-=============
-
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
diff --git a/chromium/third_party/catapult/tracing/third_party/jszip/README.chromium b/chromium/third_party/catapult/tracing/third_party/jszip/README.chromium
deleted file mode 100644
index ab23a109aae..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/jszip/README.chromium
+++ /dev/null
@@ -1,16 +0,0 @@
-Name: JSZip
-Short Name: JSZip
-URL: https://github.com/Stuk/jszip
-Date: Wed Aug 28 23:10:31 EST 2013
-Revision: 1b5ef3c66bd676c24dd7337ca02ecc99e119e205
-License: LICENSE.markdown
-License File: MIT
-Security Critical: no
-
-Description:
-Create, read and edit .zip files with Javascript
-
-Local Modifications:
-I deleted the below comment from jszip-inflate.js in order to make things load
-correctly.
- //@ sourceMappingURL=rawinflate.min.js.map
diff --git a/chromium/third_party/catapult/tracing/third_party/jszip/README.markdown b/chromium/third_party/catapult/tracing/third_party/jszip/README.markdown
deleted file mode 100644
index 537c7adff7e..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/jszip/README.markdown
+++ /dev/null
@@ -1,32 +0,0 @@
-JSZip
-=====
-
-A library for creating, reading and editing .zip files with Javascript, with a
-lovely and simple API.
-
-See http://stuartk.com/jszip for all the documentation
-
-```javascript
-var zip = new JSZip();
-
-zip.file("Hello.txt", "Hello World\n");
-
-var img = zip.folder("images");
-img.file("smile.gif", imgData, {base64: true});
-
-var content = zip.generate();
-
-location.href = "data:application/zip;base64," + content;
-/*
-Results in a zip containing
-Hello.txt
-images/
- smile.gif
-*/
-```
-
-License
-=======
-
-JSZip is dual-licensed. You may use it under the MIT license *or* the GPLv3
-license. See LICENSE.markdown.
diff --git a/chromium/third_party/catapult/tracing/third_party/jszip/jszip.min.js b/chromium/third_party/catapult/tracing/third_party/jszip/jszip.min.js
deleted file mode 100644
index 767d8c11d27..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/jszip/jszip.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*!
-
-JSZip - A Javascript class for generating and reading zip files
-<http://stuartk.com/jszip>
-
-(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
-Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
-
-JSZip uses the library pako released under the MIT license :
-https://github.com/nodeca/pako/blob/master/LICENSE
-*/
-!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,f,g,h,i,j="",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<a||0>a)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.comment=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){return e.deflateRaw(a)},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;g<e.length;g++)h=e[g],this.file(h.fileName,h.decompressed,{binary:!0,optimizedBinaryString:!0,date:h.date,dir:h.dir,comment:h.fileComment.length?h.fileComment:null,createFolders:b.createFolders});return f.zipComment.length&&(this.comment=f.zipComment),this}},{"./base64":1,"./zipEntries":22}],11:[function(a,b){(function(a){"use strict";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],12:[function(a,b){"use strict";function c(a){this.data=a,this.length=this.data.length,this.index=0}var d=a("./uint8ArrayReader");c.prototype=new d,c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./uint8ArrayReader":18}],13:[function(a,b){"use strict";var c=a("./support"),d=a("./utils"),e=a("./crc32"),f=a("./signature"),g=a("./defaults"),h=a("./base64"),i=a("./compressions"),j=a("./compressedObject"),k=a("./nodeBuffer"),l=a("./utf8"),m=a("./stringWriter"),n=a("./uint8ArrayWriter"),o=function(a){if(a._data instanceof j&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,"uint8array"===d.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},p=function(a){var b=o(a),e=d.getTypeOf(b);return"string"===e?!a.options.binary&&c.nodebuffer?k(b,"utf-8"):a.asBinary():b},q=function(a){var b=o(this);return null===b||"undefined"==typeof b?"":(this.options.base64&&(b=h.decode(b)),b=a&&this.options.binary?A.utf8decode(b):d.transformTo("string",b),a||this.options.binary||(b=d.transformTo("string",A.utf8encode(b))),b)},r=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};r.prototype={asText:function(){return q.call(this,!0)},asBinary:function(){return q.call(this,!1)},asNodeBuffer:function(){var a=p(this);return d.transformTo("nodebuffer",a)},asUint8Array:function(){var a=p(this);return d.transformTo("uint8array",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var s=function(a,b){var c,d="";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=t(a,g),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var e,f=d.getTypeOf(b);if(c=u(c),c.createFolders&&(e=w(a))&&x.call(this,e,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=d.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof j))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=d.transformTo("uint8array",b))}var g=new r(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a,b){return"/"!=a.slice(-1)&&(a+="/"),b="undefined"!=typeof b?b:!1,this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},y=function(a,b){var c,f=new j;return a._data instanceof j?(f.uncompressedSize=a._data.uncompressedSize,f.crc32=a._data.crc32,0===f.uncompressedSize||a.dir?(b=i.STORE,f.compressedContent="",f.crc32=0):a._data.compressionMethod===b.magic?f.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c)))):(c=p(a),(!c||0===c.length||a.dir)&&(b=i.STORE,c=""),f.uncompressedSize=c.length,f.crc32=e(c),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c))),f.compressedSize=f.compressedContent.length,f.compressionMethod=b.magic,f},z=function(a,b,c,g){var h,i,j,k,m=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),n=b.comment||"",o=d.transformTo("string",l.utf8encode(n)),p=m.length!==b.name.length,q=o.length!==n.length,r=b.options,t="",u="",v="";j=b._initialMetadata.dir!==b.dir?b.dir:r.dir,k=b._initialMetadata.date!==b.date?b.date:r.date,h=k.getHours(),h<<=6,h|=k.getMinutes(),h<<=5,h|=k.getSeconds()/2,i=k.getFullYear()-1980,i<<=4,i|=k.getMonth()+1,i<<=5,i|=k.getDate(),p&&(u=s(1,1)+s(e(m),4)+m,t+="up"+s(u.length,2)+u),q&&(v=s(1,1)+s(this.crc32(o),4)+o,t+="uc"+s(v.length,2)+v);var w="";w+="\n\x00",w+=p||q?"\x00\b":"\x00\x00",w+=c.compressionMethod,w+=s(h,2),w+=s(i,2),w+=s(c.crc32,4),w+=s(c.compressedSize,4),w+=s(c.uncompressedSize,4),w+=s(m.length,2),w+=s(t.length,2);var x=f.LOCAL_FILE_HEADER+w+m+t,y=f.CENTRAL_FILE_HEADER+"\x00"+w+s(o.length,2)+"\x00\x00\x00\x00"+(j===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+s(g,4)+m+t+o;return{fileRecord:x,dirRecord:y,compressedObject:c}},A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=x.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=t(a||{},{base64:!0,compression:"STORE",type:"base64",comment:null}),d.checkSupport(a.type);var b,c,e=[],g=0,j=0,k=d.transformTo("string",this.utf8encode(a.comment||this.comment||""));for(var l in this.files)if(this.files.hasOwnProperty(l)){var o=this.files[l],p=o.options.compression||a.compression.toUpperCase(),q=i[p];if(!q)throw new Error(p+" is not a valid compression method !");var r=y.call(this,o,q),u=z.call(this,l,o,r,g);g+=u.fileRecord.length+r.compressedSize,j+=u.dirRecord.length,e.push(u)}var v="";v=f.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+s(e.length,2)+s(e.length,2)+s(j,4)+s(g,4)+s(k.length,2)+k;var w=a.type.toLowerCase();for(b="uint8array"===w||"arraybuffer"===w||"blob"===w||"nodebuffer"===w?new n(g+j+v.length):new m(g+j+v.length),c=0;c<e.length;c++)b.append(e[c].fileRecord),b.append(e[c].compressedObject.compressedContent);for(c=0;c<e.length;c++)b.append(e[c].dirRecord);b.append(v);var x=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return d.transformTo(a.type.toLowerCase(),x);case"blob":return d.arrayBuffer2Blob(d.transformTo("arraybuffer",x));case"base64":return a.base64?h.encode(x):x;default:return x}},crc32:function(a,b){return e(a,b)},utf8encode:function(a){return d.transformTo("string",l.utf8encode(a))},utf8decode:function(a){return l.utf8decode(a)}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],15:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5,"./utils":21}],16:[function(a,b){"use strict";var c=a("./utils"),d=function(){this.data=[]};d.prototype={append:function(a){a=c.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}},b.exports=d},{"./utils":21}],17:[function(a,b,c){(function(a){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof a,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:"application/zip"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob("application/zip").size}catch(d){c.blob=!1}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],18:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k="",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a("./support"),i=a("./compressions"),j=a("./nodeBuffer");c.string2binary=function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a){c.checkSupport("blob");try{return new Blob([a],{type:"application/zip"})}catch(b){try{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,e=new d;return e.append(a),e.getBlob("application/zip")}catch(b){throw new Error("Bug : can't construct the Blob.")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":h.nodebuffer&&j.test(a)?"nodebuffer":h.uint8array&&a instanceof Uint8Array?"uint8array":h.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this browser")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(16>b?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===h.CENTRAL_FILE_HEADER;)a=new i({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(-1===a)throw new Error("Corrupted zip : can't find end of central directory");if(this.reader.setIndex(a),this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===g.MAX_VALUE_16BITS||this.diskWithCentralDirStart===g.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===g.MAX_VALUE_16BITS||this.centralDirRecords===g.MAX_VALUE_16BITS||this.centralDirSize===g.MAX_VALUE_32BITS||this.centralDirOffset===g.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),-1===a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");this.reader.setIndex(a),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(a){var b=g.getTypeOf(a);this.reader="string"!==b||j.uint8array?"nodebuffer"===b?new e(a):new f(g.transformTo("uint8array",a)):new d(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=c},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(a,b){"use strict";function c(a,b){this.options=a,this.loadOptions=b}var d=a("./stringReader"),e=a("./utils"),f=a("./compressedObject"),g=a("./object");c.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,f){return function(){var a=e.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==f)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readString(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=e.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(this.decompressed=new f,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo("string",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readString(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readString(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readString(this.fileCommentLength),this.dir=16&this.externalFileAttributes?!0:!1},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){if(this.useUTF8())this.fileName=g.utf8decode(this.fileName),this.fileComment=g.utf8decode(this.fileComment);else{var a=this.findExtraFieldUnicodePath();null!==a&&(this.fileName=a);var b=this.findExtraFieldUnicodeComment();null!==b&&(this.fileComment=b)}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileName)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileComment)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null}},b.exports=c},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(a,b){"use strict";var c=a("./lib/utils/common").assign,d=a("./lib/deflate"),e=a("./lib/inflate"),f=a("./lib/zlib/constants"),g={};c(g,d,e,f),b.exports=g},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(a,b,c){"use strict";function d(a,b){var c=new s(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a("./zlib/deflate.js"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=0,m=4,n=0,o=1,p=-1,q=0,r=8,s=function(a){this.options=h.assign({level:p,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)
-};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+hb-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<hb)););}while(a.lookahead<jb&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c)),a.match_length>=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function p(a,b){for(var c,d,e;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=hb-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===hb&&a.strstart-a.match_start>4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=hb-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sb}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sb}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ib){if(m(a),a.lookahead<=ib&&b===H)return sb;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+hb-1)/hb),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<<e.lenbits)-1,u=(1<<e.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){e.mode=d;break a}a.msg="invalid literal/length code",e.mode=c;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",e.mode=c;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab=0,Bb=new r.Buf8(4),Cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xb=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<<wb,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=lb;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=lb;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=lb;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Cb[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have<c.nlen+c.ndist;){for(;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(rb&&0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.lencode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<<c.distbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.distcode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;
-if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(a,b){"use strict";var c=a("../utils/common"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<<ab[d];a++)gb[e++]=d;for(e>>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<<ab[d]-7;a++)gb[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=hb[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ib[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=ab[i],0!==j&&(d-=jb[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)}); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/mannwhitneyu/README.chromium b/chromium/third_party/catapult/tracing/third_party/mannwhitneyu/README.chromium
deleted file mode 100644
index 78439f32f52..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/mannwhitneyu/README.chromium
+++ /dev/null
@@ -1,15 +0,0 @@
-Name: Mann-Whitney U Test
-Short Name: mannwhitneyu
-URL: https://gist.github.com/gungorbudak/1c3989cc26b9567c6e50
-Version: 0
-Revision: f8f2918a366798793f5fb7e92de0df9142feb737
-Date: Jan 16 2016
-License: MIT
-License File: NOT_SHIPPED
-Security Critical: no
-
-Description:
-Mann Whitney U Test implemented in javascript
-
-Local Modifications:
-None.
diff --git a/chromium/third_party/catapult/tracing/third_party/mannwhitneyu/mannwhitneyu.js b/chromium/third_party/catapult/tracing/third_party/mannwhitneyu/mannwhitneyu.js
deleted file mode 100644
index 2e2bda544b9..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/mannwhitneyu/mannwhitneyu.js
+++ /dev/null
@@ -1,197 +0,0 @@
-'use strict';
-
-(function(exports) {
-
- var rank = {
- /*
- * Standart ranking
- *
- * The MIT License, Copyright (c) 2014 Ben Magyar
- */
- standard: function(array, key) {
- // sort the array
- array = array.sort(function(a, b) {
- var x = a[key];
- var y = b[key];
- return ((x < y) ? -1 : ((x > y) ? 1 : 0));
- });
- // assign a naive ranking
- for (var i = 1; i < array.length + 1; i++) {
- array[i - 1]['rank'] = i;
- }
- return array;
- },
- /*
- * Fractional ranking
- *
- * The MIT License, Copyright (c) 2014 Ben Magyar
- */
- fractional: function(array, key) {
- array = this.standard(array, key);
- // now apply fractional
- var pos = 0;
- while (pos < array.length) {
- var sum = 0;
- var i = 0;
- for (i = 0; array[pos + i + 1] && (array[pos + i][key] === array[pos + i + 1][key]); i++) {
- sum += array[pos + i]['rank'];
- }
- sum += array[pos + i]['rank'];
- var endPos = pos + i + 1;
- for (pos; pos < endPos; pos++) {
- array[pos]['rank'] = sum / (i + 1);
- }
- pos = endPos;
- }
- return array;
- },
- rank: function(x, y) {
- var nx = x.length,
- ny = y.length,
- combined = [],
- ranked;
- while (nx--) {
- combined.push({
- set: 'x',
- val: x[nx]
- });
- }
- while (ny--) {
- combined.push({
- set: 'y',
- val: y[ny]
- });
- }
- ranked = this.fractional(combined, 'val');
- return ranked
- }
- };
-
- /*
- * Error function
- *
- * The MIT License, Copyright (c) 2013 jStat
- */
- var erf = function erf(x) {
- var cof = [-1.3026537197817094, 6.4196979235649026e-1, 1.9476473204185836e-2, -9.561514786808631e-3, -9.46595344482036e-4, 3.66839497852761e-4,
- 4.2523324806907e-5, -2.0278578112534e-5, -1.624290004647e-6,
- 1.303655835580e-6, 1.5626441722e-8, -8.5238095915e-8,
- 6.529054439e-9, 5.059343495e-9, -9.91364156e-10, -2.27365122e-10, 9.6467911e-11, 2.394038e-12, -6.886027e-12, 8.94487e-13, 3.13092e-13, -1.12708e-13, 3.81e-16, 7.106e-15, -1.523e-15, -9.4e-17, 1.21e-16, -2.8e-17
- ];
- var j = cof.length - 1;
- var isneg = false;
- var d = 0;
- var dd = 0;
- var t, ty, tmp, res;
-
- if (x < 0) {
- x = -x;
- isneg = true;
- }
-
- t = 2 / (2 + x);
- ty = 4 * t - 2;
-
- for (; j > 0; j--) {
- tmp = d;
- d = ty * d - dd + cof[j];
- dd = tmp;
- }
-
- res = t * Math.exp(-x * x + 0.5 * (cof[0] + ty * d) - dd);
- return isneg ? res - 1 : 1 - res;
- };
-
- /*
- * Normal distribution CDF
- *
- * The MIT License, Copyright (c) 2013 jStat
- */
- var dnorm = function(x, mean, std) {
- return 0.5 * (1 + erf((x - mean) / Math.sqrt(2 * std * std)));
- }
-
- var statistic = function(x, y) {
- var ranked = rank.rank(x, y),
- nr = ranked.length,
- nx = x.length,
- ny = y.length,
- ranksums = {
- x: 0,
- y: 0
- },
- i = 0, t = 0, nt = 1, tcf, ux, uy;
-
- while (i < nr) {
- if (i > 0) {
- if (ranked[i].val == ranked[i-1].val) {
- nt++;
- } else {
- if (nt > 1) {
- t += Math.pow(nt, 3) - nt
- nt = 1;
- }
- }
- }
- ranksums[ranked[i].set] += ranked[i].rank
- i++;
- }
- tcf = 1 - (t / (Math.pow(nr, 3) - nr))
- ux = nx*ny + (nx*(nx+1)/2) - ranksums.x;
- uy = nx*ny - ux;
-
- return {
- tcf: tcf,
- ux: ux,
- uy: uy,
- big: Math.max(ux, uy),
- small: Math.min(ux, uy)
- }
- }
-
- exports.test = function(x, y, alt, corr) {
- // set default value for alternative
- alt = typeof alt !== 'undefined' ? alt : 'two-sided';
- // set default value for continuity
- corr = typeof corr !== 'undefined' ? corr : true;
- var nx = x.length, // x's size
- ny = y.length, // y's size
- f = 1,
- u, mu, std, z, p;
-
- // test statistic
- u = statistic(x, y);
-
- // mean compute and correct if given
- if (corr) {
- mu = (nx * ny / 2) + 0.5;
- } else {
- mu = nx * ny / 2;
- }
-
- // compute standard deviation using tie correction factor
- std = Math.sqrt(u.tcf * nx * ny * (nx + ny + 1) / 12);
-
- // compute z according to given alternative
- if (alt == 'less') {
- z = (u.ux - mu) / std;
- } else if (alt == 'greater') {
- z = (u.uy - mu) / std;
- } else if (alt == 'two-sided') {
- z = Math.abs((u.big - mu) / std);
- } else {
- console.log('Unknown alternative argument');
- }
-
- // factor to correct two sided p-value
- if (alt == 'two-sided') {
- f = 2;
- }
-
- // compute p-value using CDF of standard normal
- p = dnorm(-z, 0, 1) * f;
-
- return {U: u.small, p: p};
- }
-
-})(typeof exports === 'undefined' ? this['mannwhitneyu'] = {} : exports); \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/mocha/LICENSE b/chromium/third_party/catapult/tracing/third_party/mocha/LICENSE
deleted file mode 100644
index ca47f261b3f..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/mocha/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2011-2015 TJ Holowaychuk <tj@vision-media.ca>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/chromium/third_party/catapult/tracing/third_party/mocha/README.chromium b/chromium/third_party/catapult/tracing/third_party/mocha/README.chromium
deleted file mode 100644
index e492702c6ba..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/mocha/README.chromium
+++ /dev/null
@@ -1,9 +0,0 @@
-Name: Mocha, simple, flexible, fun javascript test framework for node.js & the browser
-Short Name: Mocha
-URL: https://github.com/mochajs/mocha
-Version: 2c2ed43ae7f047f333468e2043001bfb8c9d13d5
-License: MIT
-License File: NOT_SHIPPED
-Security Critical: no
-Description: Used for testing
-Local Modifications: None
diff --git a/chromium/third_party/catapult/tracing/third_party/mocha/mocha.css b/chromium/third_party/catapult/tracing/third_party/mocha/mocha.css
deleted file mode 100644
index 42b9798fa4e..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/mocha/mocha.css
+++ /dev/null
@@ -1,270 +0,0 @@
-@charset "utf-8";
-
-body {
- margin:0;
-}
-
-#mocha {
- font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
- margin: 60px 50px;
-}
-
-#mocha ul,
-#mocha li {
- margin: 0;
- padding: 0;
-}
-
-#mocha ul {
- list-style: none;
-}
-
-#mocha h1,
-#mocha h2 {
- margin: 0;
-}
-
-#mocha h1 {
- margin-top: 15px;
- font-size: 1em;
- font-weight: 200;
-}
-
-#mocha h1 a {
- text-decoration: none;
- color: inherit;
-}
-
-#mocha h1 a:hover {
- text-decoration: underline;
-}
-
-#mocha .suite .suite h1 {
- margin-top: 0;
- font-size: .8em;
-}
-
-#mocha .hidden {
- display: none;
-}
-
-#mocha h2 {
- font-size: 12px;
- font-weight: normal;
- cursor: pointer;
-}
-
-#mocha .suite {
- margin-left: 15px;
-}
-
-#mocha .test {
- margin-left: 15px;
- overflow: hidden;
-}
-
-#mocha .test.pending:hover h2::after {
- content: '(pending)';
- font-family: arial, sans-serif;
-}
-
-#mocha .test.pass.medium .duration {
- background: #c09853;
-}
-
-#mocha .test.pass.slow .duration {
- background: #b94a48;
-}
-
-#mocha .test.pass::before {
- content: '✓';
- font-size: 12px;
- display: block;
- float: left;
- margin-right: 5px;
- color: #00d6b2;
-}
-
-#mocha .test.pass .duration {
- font-size: 9px;
- margin-left: 5px;
- padding: 2px 5px;
- color: #fff;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
- -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- -ms-border-radius: 5px;
- -o-border-radius: 5px;
- border-radius: 5px;
-}
-
-#mocha .test.pass.fast .duration {
- display: none;
-}
-
-#mocha .test.pending {
- color: #0b97c4;
-}
-
-#mocha .test.pending::before {
- content: '◦';
- color: #0b97c4;
-}
-
-#mocha .test.fail {
- color: #c00;
-}
-
-#mocha .test.fail pre {
- color: black;
-}
-
-#mocha .test.fail::before {
- content: '✖';
- font-size: 12px;
- display: block;
- float: left;
- margin-right: 5px;
- color: #c00;
-}
-
-#mocha .test pre.error {
- color: #c00;
- max-height: 300px;
- overflow: auto;
-}
-
-/**
- * (1): approximate for browsers not supporting calc
- * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
- * ^^ seriously
- */
-#mocha .test pre {
- display: block;
- float: left;
- clear: left;
- font: 12px/1.5 monaco, monospace;
- margin: 5px;
- padding: 15px;
- border: 1px solid #eee;
- max-width: 85%; /*(1)*/
- max-width: calc(100% - 42px); /*(2)*/
- word-wrap: break-word;
- border-bottom-color: #ddd;
- -webkit-border-radius: 3px;
- -webkit-box-shadow: 0 1px 3px #eee;
- -moz-border-radius: 3px;
- -moz-box-shadow: 0 1px 3px #eee;
- border-radius: 3px;
-}
-
-#mocha .test h2 {
- position: relative;
-}
-
-#mocha .test a.replay {
- position: absolute;
- top: 3px;
- right: 0;
- text-decoration: none;
- vertical-align: middle;
- display: block;
- width: 15px;
- height: 15px;
- line-height: 15px;
- text-align: center;
- background: #eee;
- font-size: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
- -webkit-transition: opacity 200ms;
- -moz-transition: opacity 200ms;
- transition: opacity 200ms;
- opacity: 0.3;
- color: #888;
-}
-
-#mocha .test:hover a.replay {
- opacity: 1;
-}
-
-#mocha-report.pass .test.fail {
- display: none;
-}
-
-#mocha-report.fail .test.pass {
- display: none;
-}
-
-#mocha-report.pending .test.pass,
-#mocha-report.pending .test.fail {
- display: none;
-}
-#mocha-report.pending .test.pass.pending {
- display: block;
-}
-
-#mocha-error {
- color: #c00;
- font-size: 1.5em;
- font-weight: 100;
- letter-spacing: 1px;
-}
-
-#mocha-stats {
- position: fixed;
- top: 15px;
- right: 10px;
- font-size: 12px;
- margin: 0;
- color: #888;
- z-index: 1;
-}
-
-#mocha-stats .progress {
- float: right;
- padding-top: 0;
-}
-
-#mocha-stats em {
- color: black;
-}
-
-#mocha-stats a {
- text-decoration: none;
- color: inherit;
-}
-
-#mocha-stats a:hover {
- border-bottom: 1px solid #eee;
-}
-
-#mocha-stats li {
- display: inline-block;
- margin: 0 5px;
- list-style: none;
- padding-top: 11px;
-}
-
-#mocha-stats canvas {
- width: 40px;
- height: 40px;
-}
-
-#mocha code .comment { color: #ddd; }
-#mocha code .init { color: #2f6fad; }
-#mocha code .string { color: #5890ad; }
-#mocha code .keyword { color: #8a6343; }
-#mocha code .number { color: #2f6fad; }
-
-@media screen and (max-device-width: 480px) {
- #mocha {
- margin: 60px 0px;
- }
-
- #mocha #stats {
- position: absolute;
- }
-}
diff --git a/chromium/third_party/catapult/tracing/third_party/mocha/mocha.js b/chromium/third_party/catapult/tracing/third_party/mocha/mocha.js
deleted file mode 100755
index cffddcbc130..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/mocha/mocha.js
+++ /dev/null
@@ -1,6557 +0,0 @@
-;(function(){
-
-// CommonJS require()
-
-function require(p){
- var path = require.resolve(p)
- , mod = require.modules[path];
- if (!mod) throw new Error('failed to require "' + p + '"');
- if (!mod.exports) {
- mod.exports = {};
- mod.call(mod.exports, mod, mod.exports, require.relative(path));
- }
- return mod.exports;
- }
-
-require.modules = {};
-
-require.resolve = function (path){
- var orig = path
- , reg = path + '.js'
- , index = path + '/index.js';
- return require.modules[reg] && reg
- || require.modules[index] && index
- || orig;
- };
-
-require.register = function (path, fn){
- require.modules[path] = fn;
- };
-
-require.relative = function (parent) {
- return function(p){
- if ('.' != p.charAt(0)) return require(p);
-
- var path = parent.split('/')
- , segs = p.split('/');
- path.pop();
-
- for (var i = 0; i < segs.length; i++) {
- var seg = segs[i];
- if ('..' == seg) path.pop();
- else if ('.' != seg) path.push(seg);
- }
-
- return require(path.join('/'));
- };
- };
-
-
-require.register("browser/debug.js", function(module, exports, require){
-module.exports = function(type){
- return function(){
- }
-};
-
-}); // module: browser/debug.js
-
-require.register("browser/diff.js", function(module, exports, require){
-/* See LICENSE file for terms of use */
-
-/*
- * Text diff implementation.
- *
- * This library supports the following APIS:
- * JsDiff.diffChars: Character by character diff
- * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
- * JsDiff.diffLines: Line based diff
- *
- * JsDiff.diffCss: Diff targeted at CSS content
- *
- * These methods are based on the implementation proposed in
- * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
- * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
- */
-var JsDiff = (function() {
- /*jshint maxparams: 5*/
- function clonePath(path) {
- return { newPos: path.newPos, components: path.components.slice(0) };
- }
- function removeEmpty(array) {
- var ret = [];
- for (var i = 0; i < array.length; i++) {
- if (array[i]) {
- ret.push(array[i]);
- }
- }
- return ret;
- }
- function escapeHTML(s) {
- var n = s;
- n = n.replace(/&/g, '&amp;');
- n = n.replace(/</g, '&lt;');
- n = n.replace(/>/g, '&gt;');
- n = n.replace(/"/g, '&quot;');
-
- return n;
- }
-
- var Diff = function(ignoreWhitespace) {
- this.ignoreWhitespace = ignoreWhitespace;
- };
- Diff.prototype = {
- diff: function(oldString, newString) {
- // Handle the identity case (this is due to unrolling editLength == 0
- if (newString === oldString) {
- return [{ value: newString }];
- }
- if (!newString) {
- return [{ value: oldString, removed: true }];
- }
- if (!oldString) {
- return [{ value: newString, added: true }];
- }
-
- newString = this.tokenize(newString);
- oldString = this.tokenize(oldString);
-
- var newLen = newString.length, oldLen = oldString.length;
- var maxEditLength = newLen + oldLen;
- var bestPath = [{ newPos: -1, components: [] }];
-
- // Seed editLength = 0
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
- if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) {
- return bestPath[0].components;
- }
-
- for (var editLength = 1; editLength <= maxEditLength; editLength++) {
- for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) {
- var basePath;
- var addPath = bestPath[diagonalPath-1],
- removePath = bestPath[diagonalPath+1];
- oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
- if (addPath) {
- // No one else is going to attempt to use this value, clear it
- bestPath[diagonalPath-1] = undefined;
- }
-
- var canAdd = addPath && addPath.newPos+1 < newLen;
- var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;
- if (!canAdd && !canRemove) {
- bestPath[diagonalPath] = undefined;
- continue;
- }
-
- // Select the diagonal that we want to branch from. We select the prior
- // path whose position in the new string is the farthest from the origin
- // and does not pass the bounds of the diff graph
- if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {
- basePath = clonePath(removePath);
- this.pushComponent(basePath.components, oldString[oldPos], undefined, true);
- } else {
- basePath = clonePath(addPath);
- basePath.newPos++;
- this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined);
- }
-
- var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath);
-
- if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) {
- return basePath.components;
- } else {
- bestPath[diagonalPath] = basePath;
- }
- }
- }
- },
-
- pushComponent: function(components, value, added, removed) {
- var last = components[components.length-1];
- if (last && last.added === added && last.removed === removed) {
- // We need to clone here as the component clone operation is just
- // as shallow array clone
- components[components.length-1] =
- {value: this.join(last.value, value), added: added, removed: removed };
- } else {
- components.push({value: value, added: added, removed: removed });
- }
- },
- extractCommon: function(basePath, newString, oldString, diagonalPath) {
- var newLen = newString.length,
- oldLen = oldString.length,
- newPos = basePath.newPos,
- oldPos = newPos - diagonalPath;
- while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) {
- newPos++;
- oldPos++;
-
- this.pushComponent(basePath.components, newString[newPos], undefined, undefined);
- }
- basePath.newPos = newPos;
- return oldPos;
- },
-
- equals: function(left, right) {
- var reWhitespace = /\S/;
- if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) {
- return true;
- } else {
- return left === right;
- }
- },
- join: function(left, right) {
- return left + right;
- },
- tokenize: function(value) {
- return value;
- }
- };
-
- var CharDiff = new Diff();
-
- var WordDiff = new Diff(true);
- var WordWithSpaceDiff = new Diff();
- WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) {
- return removeEmpty(value.split(/(\s+|\b)/));
- };
-
- var CssDiff = new Diff(true);
- CssDiff.tokenize = function(value) {
- return removeEmpty(value.split(/([{}:;,]|\s+)/));
- };
-
- var LineDiff = new Diff();
- LineDiff.tokenize = function(value) {
- var retLines = [],
- lines = value.split(/^/m);
-
- for(var i = 0; i < lines.length; i++) {
- var line = lines[i],
- lastLine = lines[i - 1];
-
- // Merge lines that may contain windows new lines
- if (line == '\n' && lastLine && lastLine[lastLine.length - 1] === '\r') {
- retLines[retLines.length - 1] += '\n';
- } else if (line) {
- retLines.push(line);
- }
- }
-
- return retLines;
- };
-
- return {
- Diff: Diff,
-
- diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); },
- diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); },
- diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); },
- diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); },
-
- diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); },
-
- createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) {
- var ret = [];
-
- ret.push('Index: ' + fileName);
- ret.push('===================================================================');
- ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader));
- ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader));
-
- var diff = LineDiff.diff(oldStr, newStr);
- if (!diff[diff.length-1].value) {
- diff.pop(); // Remove trailing newline add
- }
- diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier
-
- function contextLines(lines) {
- return lines.map(function(entry) { return ' ' + entry; });
- }
- function eofNL(curRange, i, current) {
- var last = diff[diff.length-2],
- isLast = i === diff.length-2,
- isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed);
-
- // Figure out if this is the last line for the given file and missing NL
- if (!/\n$/.test(current.value) && (isLast || isLastOfType)) {
- curRange.push('\\ No newline at end of file');
- }
- }
-
- var oldRangeStart = 0, newRangeStart = 0, curRange = [],
- oldLine = 1, newLine = 1;
- for (var i = 0; i < diff.length; i++) {
- var current = diff[i],
- lines = current.lines || current.value.replace(/\n$/, '').split('\n');
- current.lines = lines;
-
- if (current.added || current.removed) {
- if (!oldRangeStart) {
- var prev = diff[i-1];
- oldRangeStart = oldLine;
- newRangeStart = newLine;
-
- if (prev) {
- curRange = contextLines(prev.lines.slice(-4));
- oldRangeStart -= curRange.length;
- newRangeStart -= curRange.length;
- }
- }
- curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; }));
- eofNL(curRange, i, current);
-
- if (current.added) {
- newLine += lines.length;
- } else {
- oldLine += lines.length;
- }
- } else {
- if (oldRangeStart) {
- // Close out any changes that have been output (or join overlapping)
- if (lines.length <= 8 && i < diff.length-2) {
- // Overlapping
- curRange.push.apply(curRange, contextLines(lines));
- } else {
- // end the range and output
- var contextSize = Math.min(lines.length, 4);
- ret.push(
- '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize)
- + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize)
- + ' @@');
- ret.push.apply(ret, curRange);
- ret.push.apply(ret, contextLines(lines.slice(0, contextSize)));
- if (lines.length <= 4) {
- eofNL(ret, i, current);
- }
-
- oldRangeStart = 0; newRangeStart = 0; curRange = [];
- }
- }
- oldLine += lines.length;
- newLine += lines.length;
- }
- }
-
- return ret.join('\n') + '\n';
- },
-
- applyPatch: function(oldStr, uniDiff) {
- var diffstr = uniDiff.split('\n');
- var diff = [];
- var remEOFNL = false,
- addEOFNL = false;
-
- for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) {
- if(diffstr[i][0] === '@') {
- var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);
- diff.unshift({
- start:meh[3],
- oldlength:meh[2],
- oldlines:[],
- newlength:meh[4],
- newlines:[]
- });
- } else if(diffstr[i][0] === '+') {
- diff[0].newlines.push(diffstr[i].substr(1));
- } else if(diffstr[i][0] === '-') {
- diff[0].oldlines.push(diffstr[i].substr(1));
- } else if(diffstr[i][0] === ' ') {
- diff[0].newlines.push(diffstr[i].substr(1));
- diff[0].oldlines.push(diffstr[i].substr(1));
- } else if(diffstr[i][0] === '\\') {
- if (diffstr[i-1][0] === '+') {
- remEOFNL = true;
- } else if(diffstr[i-1][0] === '-') {
- addEOFNL = true;
- }
- }
- }
-
- var str = oldStr.split('\n');
- for (var i = diff.length - 1; i >= 0; i--) {
- var d = diff[i];
- for (var j = 0; j < d.oldlength; j++) {
- if(str[d.start-1+j] !== d.oldlines[j]) {
- return false;
- }
- }
- Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines));
- }
-
- if (remEOFNL) {
- while (!str[str.length-1]) {
- str.pop();
- }
- } else if (addEOFNL) {
- str.push('');
- }
- return str.join('\n');
- },
-
- convertChangesToXML: function(changes){
- var ret = [];
- for ( var i = 0; i < changes.length; i++) {
- var change = changes[i];
- if (change.added) {
- ret.push('<ins>');
- } else if (change.removed) {
- ret.push('<del>');
- }
-
- ret.push(escapeHTML(change.value));
-
- if (change.added) {
- ret.push('</ins>');
- } else if (change.removed) {
- ret.push('</del>');
- }
- }
- return ret.join('');
- },
-
- // See: http://code.google.com/p/google-diff-match-patch/wiki/API
- convertChangesToDMP: function(changes){
- var ret = [], change;
- for ( var i = 0; i < changes.length; i++) {
- change = changes[i];
- ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]);
- }
- return ret;
- }
- };
-})();
-
-if (typeof module !== 'undefined') {
- module.exports = JsDiff;
-}
-
-}); // module: browser/diff.js
-
-require.register("browser/escape-string-regexp.js", function(module, exports, require){
-'use strict';
-
-var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
-
-module.exports = function (str) {
- if (typeof str !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- return str.replace(matchOperatorsRe, '\\$&');
-};
-
-}); // module: browser/escape-string-regexp.js
-
-require.register("browser/events.js", function(module, exports, require){
-/**
- * Module exports.
- */
-
-exports.EventEmitter = EventEmitter;
-
-/**
- * Check if `obj` is an array.
- */
-
-function isArray(obj) {
- return '[object Array]' == {}.toString.call(obj);
-}
-
-/**
- * Event emitter constructor.
- *
- * @api public
- */
-
-function EventEmitter(){};
-
-/**
- * Adds a listener.
- *
- * @api public
- */
-
-EventEmitter.prototype.on = function (name, fn) {
- if (!this.$events) {
- this.$events = {};
- }
-
- if (!this.$events[name]) {
- this.$events[name] = fn;
- } else if (isArray(this.$events[name])) {
- this.$events[name].push(fn);
- } else {
- this.$events[name] = [this.$events[name], fn];
- }
-
- return this;
-};
-
-EventEmitter.prototype.addListener = EventEmitter.prototype.on;
-
-/**
- * Adds a volatile listener.
- *
- * @api public
- */
-
-EventEmitter.prototype.once = function (name, fn) {
- var self = this;
-
- function on () {
- self.removeListener(name, on);
- fn.apply(this, arguments);
- };
-
- on.listener = fn;
- this.on(name, on);
-
- return this;
-};
-
-/**
- * Removes a listener.
- *
- * @api public
- */
-
-EventEmitter.prototype.removeListener = function (name, fn) {
- if (this.$events && this.$events[name]) {
- var list = this.$events[name];
-
- if (isArray(list)) {
- var pos = -1;
-
- for (var i = 0, l = list.length; i < l; i++) {
- if (list[i] === fn || (list[i].listener && list[i].listener === fn)) {
- pos = i;
- break;
- }
- }
-
- if (pos < 0) {
- return this;
- }
-
- list.splice(pos, 1);
-
- if (!list.length) {
- delete this.$events[name];
- }
- } else if (list === fn || (list.listener && list.listener === fn)) {
- delete this.$events[name];
- }
- }
-
- return this;
-};
-
-/**
- * Removes all listeners for an event.
- *
- * @api public
- */
-
-EventEmitter.prototype.removeAllListeners = function (name) {
- if (name === undefined) {
- this.$events = {};
- return this;
- }
-
- if (this.$events && this.$events[name]) {
- this.$events[name] = null;
- }
-
- return this;
-};
-
-/**
- * Gets all listeners for a certain event.
- *
- * @api public
- */
-
-EventEmitter.prototype.listeners = function (name) {
- if (!this.$events) {
- this.$events = {};
- }
-
- if (!this.$events[name]) {
- this.$events[name] = [];
- }
-
- if (!isArray(this.$events[name])) {
- this.$events[name] = [this.$events[name]];
- }
-
- return this.$events[name];
-};
-
-/**
- * Emits an event.
- *
- * @api public
- */
-
-EventEmitter.prototype.emit = function (name) {
- if (!this.$events) {
- return false;
- }
-
- var handler = this.$events[name];
-
- if (!handler) {
- return false;
- }
-
- var args = [].slice.call(arguments, 1);
-
- if ('function' == typeof handler) {
- handler.apply(this, args);
- } else if (isArray(handler)) {
- var listeners = handler.slice();
-
- for (var i = 0, l = listeners.length; i < l; i++) {
- listeners[i].apply(this, args);
- }
- } else {
- return false;
- }
-
- return true;
-};
-
-}); // module: browser/events.js
-
-require.register("browser/fs.js", function(module, exports, require){
-
-}); // module: browser/fs.js
-
-require.register("browser/glob.js", function(module, exports, require){
-
-}); // module: browser/glob.js
-
-require.register("browser/path.js", function(module, exports, require){
-
-}); // module: browser/path.js
-
-require.register("browser/progress.js", function(module, exports, require){
-/**
- * Expose `Progress`.
- */
-
-module.exports = Progress;
-
-/**
- * Initialize a new `Progress` indicator.
- */
-
-function Progress() {
- this.percent = 0;
- this.size(0);
- this.fontSize(11);
- this.font('helvetica, arial, sans-serif');
-}
-
-/**
- * Set progress size to `n`.
- *
- * @param {Number} n
- * @return {Progress} for chaining
- * @api public
- */
-
-Progress.prototype.size = function(n){
- this._size = n;
- return this;
-};
-
-/**
- * Set text to `str`.
- *
- * @param {String} str
- * @return {Progress} for chaining
- * @api public
- */
-
-Progress.prototype.text = function(str){
- this._text = str;
- return this;
-};
-
-/**
- * Set font size to `n`.
- *
- * @param {Number} n
- * @return {Progress} for chaining
- * @api public
- */
-
-Progress.prototype.fontSize = function(n){
- this._fontSize = n;
- return this;
-};
-
-/**
- * Set font `family`.
- *
- * @param {String} family
- * @return {Progress} for chaining
- */
-
-Progress.prototype.font = function(family){
- this._font = family;
- return this;
-};
-
-/**
- * Update percentage to `n`.
- *
- * @param {Number} n
- * @return {Progress} for chaining
- */
-
-Progress.prototype.update = function(n){
- this.percent = n;
- return this;
-};
-
-/**
- * Draw on `ctx`.
- *
- * @param {CanvasRenderingContext2d} ctx
- * @return {Progress} for chaining
- */
-
-Progress.prototype.draw = function(ctx){
- try {
- var percent = Math.min(this.percent, 100)
- , size = this._size
- , half = size / 2
- , x = half
- , y = half
- , rad = half - 1
- , fontSize = this._fontSize;
-
- ctx.font = fontSize + 'px ' + this._font;
-
- var angle = Math.PI * 2 * (percent / 100);
- ctx.clearRect(0, 0, size, size);
-
- // outer circle
- ctx.strokeStyle = '#9f9f9f';
- ctx.beginPath();
- ctx.arc(x, y, rad, 0, angle, false);
- ctx.stroke();
-
- // inner circle
- ctx.strokeStyle = '#eee';
- ctx.beginPath();
- ctx.arc(x, y, rad - 1, 0, angle, true);
- ctx.stroke();
-
- // text
- var text = this._text || (percent | 0) + '%'
- , w = ctx.measureText(text).width;
-
- ctx.fillText(
- text
- , x - w / 2 + 1
- , y + fontSize / 2 - 1);
- } catch (ex) {} //don't fail if we can't render progress
- return this;
-};
-
-}); // module: browser/progress.js
-
-require.register("browser/tty.js", function(module, exports, require){
-exports.isatty = function(){
- return true;
-};
-
-exports.getWindowSize = function(){
- if ('innerHeight' in global) {
- return [global.innerHeight, global.innerWidth];
- } else {
- // In a Web Worker, the DOM Window is not available.
- return [640, 480];
- }
-};
-
-}); // module: browser/tty.js
-
-require.register("context.js", function(module, exports, require){
-/**
- * Expose `Context`.
- */
-
-module.exports = Context;
-
-/**
- * Initialize a new `Context`.
- *
- * @api private
- */
-
-function Context(){}
-
-/**
- * Set or get the context `Runnable` to `runnable`.
- *
- * @param {Runnable} runnable
- * @return {Context}
- * @api private
- */
-
-Context.prototype.runnable = function(runnable){
- if (0 == arguments.length) return this._runnable;
- this.test = this._runnable = runnable;
- return this;
-};
-
-/**
- * Set test timeout `ms`.
- *
- * @param {Number} ms
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.timeout = function(ms){
- if (arguments.length === 0) return this.runnable().timeout();
- this.runnable().timeout(ms);
- return this;
-};
-
-/**
- * Set test timeout `enabled`.
- *
- * @param {Boolean} enabled
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.enableTimeouts = function (enabled) {
- this.runnable().enableTimeouts(enabled);
- return this;
-};
-
-
-/**
- * Set test slowness threshold `ms`.
- *
- * @param {Number} ms
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.slow = function(ms){
- this.runnable().slow(ms);
- return this;
-};
-
-/**
- * Mark a test as skipped.
- *
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.skip = function(){
- this.runnable().skip();
- return this;
-};
-
-/**
- * Inspect the context void of `._runnable`.
- *
- * @return {String}
- * @api private
- */
-
-Context.prototype.inspect = function(){
- return JSON.stringify(this, function(key, val){
- if ('_runnable' == key) return;
- if ('test' == key) return;
- return val;
- }, 2);
-};
-
-}); // module: context.js
-
-require.register("hook.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Runnable = require('./runnable');
-
-/**
- * Expose `Hook`.
- */
-
-module.exports = Hook;
-
-/**
- * Initialize a new `Hook` with the given `title` and callback `fn`.
- *
- * @param {String} title
- * @param {Function} fn
- * @api private
- */
-
-function Hook(title, fn) {
- Runnable.call(this, title, fn);
- this.type = 'hook';
-}
-
-/**
- * Inherit from `Runnable.prototype`.
- */
-
-function F(){};
-F.prototype = Runnable.prototype;
-Hook.prototype = new F;
-Hook.prototype.constructor = Hook;
-
-
-/**
- * Get or set the test `err`.
- *
- * @param {Error} err
- * @return {Error}
- * @api public
- */
-
-Hook.prototype.error = function(err){
- if (0 == arguments.length) {
- var err = this._error;
- this._error = null;
- return err;
- }
-
- this._error = err;
-};
-
-}); // module: hook.js
-
-require.register("interfaces/bdd.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test')
- , utils = require('../utils')
- , escapeRe = require('browser/escape-string-regexp');
-
-/**
- * BDD-style interface:
- *
- * describe('Array', function(){
- * describe('#indexOf()', function(){
- * it('should return -1 when not present', function(){
- *
- * });
- *
- * it('should return the index when present', function(){
- *
- * });
- * });
- * });
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('pre-require', function(context, file, mocha){
-
- var common = require('./common')(suites, context);
-
- context.before = common.before;
- context.after = common.after;
- context.beforeEach = common.beforeEach;
- context.afterEach = common.afterEach;
- context.run = mocha.options.delay && common.runWithSuite(suite);
- /**
- * Describe a "suite" with the given `title`
- * and callback `fn` containing nested suites
- * and/or tests.
- */
-
- context.describe = context.context = function(title, fn){
- var suite = Suite.create(suites[0], title);
- suite.file = file;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- return suite;
- };
-
- /**
- * Pending describe.
- */
-
- context.xdescribe =
- context.xcontext =
- context.describe.skip = function(title, fn){
- var suite = Suite.create(suites[0], title);
- suite.pending = true;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- };
-
- /**
- * Exclusive suite.
- */
-
- context.describe.only = function(title, fn){
- var suite = context.describe(title, fn);
- mocha.grep(suite.fullTitle());
- return suite;
- };
-
- /**
- * Describe a specification or test-case
- * with the given `title` and callback `fn`
- * acting as a thunk.
- */
-
- context.it = context.specify = function(title, fn){
- var suite = suites[0];
- if (suite.pending) fn = null;
- var test = new Test(title, fn);
- test.file = file;
- suite.addTest(test);
- return test;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.it.only = function(title, fn){
- var test = context.it(title, fn);
- var reString = '^' + escapeRe(test.fullTitle()) + '$';
- mocha.grep(new RegExp(reString));
- return test;
- };
-
- /**
- * Pending test case.
- */
-
- context.xit =
- context.xspecify =
- context.it.skip = function(title){
- context.it(title);
- };
-
- });
-};
-
-}); // module: interfaces/bdd.js
-
-require.register("interfaces/common.js", function(module, exports, require){
-/**
- * Functions common to more than one interface
- * @module lib/interfaces/common
- */
-
-'use strict';
-
-module.exports = function (suites, context) {
-
- return {
- /**
- * This is only present if flag --delay is passed into Mocha. It triggers
- * root suite execution. Returns a function which runs the root suite.
- */
- runWithSuite: function runWithSuite(suite) {
- return function run() {
- suite.run();
- };
- },
-
- /**
- * Execute before running tests.
- */
- before: function (name, fn) {
- suites[0].beforeAll(name, fn);
- },
-
- /**
- * Execute after running tests.
- */
- after: function (name, fn) {
- suites[0].afterAll(name, fn);
- },
-
- /**
- * Execute before each test case.
- */
- beforeEach: function (name, fn) {
- suites[0].beforeEach(name, fn);
- },
-
- /**
- * Execute after each test case.
- */
- afterEach: function (name, fn) {
- suites[0].afterEach(name, fn);
- },
-
- test: {
- /**
- * Pending test case.
- */
- skip: function (title) {
- context.test(title);
- }
- }
- }
-};
-
-}); // module: interfaces/common.js
-
-require.register("interfaces/exports.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test');
-
-/**
- * TDD-style interface:
- *
- * exports.Array = {
- * '#indexOf()': {
- * 'should return -1 when the value is not present': function(){
- *
- * },
- *
- * 'should return the correct index when the value is present': function(){
- *
- * }
- * }
- * };
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('require', visit);
-
- function visit(obj, file) {
- var suite;
- for (var key in obj) {
- if ('function' == typeof obj[key]) {
- var fn = obj[key];
- switch (key) {
- case 'before':
- suites[0].beforeAll(fn);
- break;
- case 'after':
- suites[0].afterAll(fn);
- break;
- case 'beforeEach':
- suites[0].beforeEach(fn);
- break;
- case 'afterEach':
- suites[0].afterEach(fn);
- break;
- default:
- var test = new Test(key, fn);
- test.file = file;
- suites[0].addTest(test);
- }
- } else {
- suite = Suite.create(suites[0], key);
- suites.unshift(suite);
- visit(obj[key]);
- suites.shift();
- }
- }
- }
-};
-
-}); // module: interfaces/exports.js
-
-require.register("interfaces/index.js", function(module, exports, require){
-exports.bdd = require('./bdd');
-exports.tdd = require('./tdd');
-exports.qunit = require('./qunit');
-exports.exports = require('./exports');
-
-}); // module: interfaces/index.js
-
-require.register("interfaces/qunit.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test')
- , escapeRe = require('browser/escape-string-regexp')
- , utils = require('../utils');
-
-/**
- * QUnit-style interface:
- *
- * suite('Array');
- *
- * test('#length', function(){
- * var arr = [1,2,3];
- * ok(arr.length == 3);
- * });
- *
- * test('#indexOf()', function(){
- * var arr = [1,2,3];
- * ok(arr.indexOf(1) == 0);
- * ok(arr.indexOf(2) == 1);
- * ok(arr.indexOf(3) == 2);
- * });
- *
- * suite('String');
- *
- * test('#length', function(){
- * ok('foo'.length == 3);
- * });
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('pre-require', function(context, file, mocha){
-
- var common = require('./common')(suites, context);
-
- context.before = common.before;
- context.after = common.after;
- context.beforeEach = common.beforeEach;
- context.afterEach = common.afterEach;
- context.run = mocha.options.delay && common.runWithSuite(suite);
- /**
- * Describe a "suite" with the given `title`.
- */
-
- context.suite = function(title){
- if (suites.length > 1) suites.shift();
- var suite = Suite.create(suites[0], title);
- suite.file = file;
- suites.unshift(suite);
- return suite;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.suite.only = function(title, fn){
- var suite = context.suite(title, fn);
- mocha.grep(suite.fullTitle());
- };
-
- /**
- * Describe a specification or test-case
- * with the given `title` and callback `fn`
- * acting as a thunk.
- */
-
- context.test = function(title, fn){
- var test = new Test(title, fn);
- test.file = file;
- suites[0].addTest(test);
- return test;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.test.only = function(title, fn){
- var test = context.test(title, fn);
- var reString = '^' + escapeRe(test.fullTitle()) + '$';
- mocha.grep(new RegExp(reString));
- };
-
- context.test.skip = common.test.skip;
-
- });
-};
-
-}); // module: interfaces/qunit.js
-
-require.register("interfaces/tdd.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test')
- , escapeRe = require('browser/escape-string-regexp')
- , utils = require('../utils');
-
-/**
- * TDD-style interface:
- *
- * suite('Array', function(){
- * suite('#indexOf()', function(){
- * suiteSetup(function(){
- *
- * });
- *
- * test('should return -1 when not present', function(){
- *
- * });
- *
- * test('should return the index when present', function(){
- *
- * });
- *
- * suiteTeardown(function(){
- *
- * });
- * });
- * });
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('pre-require', function(context, file, mocha){
-
- var common = require('./common')(suites, context);
-
- context.setup = common.beforeEach;
- context.teardown = common.afterEach;
- context.suiteSetup = common.before;
- context.suiteTeardown = common.after;
- context.run = mocha.options.delay && common.runWithSuite(suite);
- /**
- * Describe a "suite" with the given `title`
- * and callback `fn` containing nested suites
- * and/or tests.
- */
-
- context.suite = function(title, fn){
- var suite = Suite.create(suites[0], title);
- suite.file = file;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- return suite;
- };
-
- /**
- * Pending suite.
- */
- context.suite.skip = function(title, fn) {
- var suite = Suite.create(suites[0], title);
- suite.pending = true;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.suite.only = function(title, fn){
- var suite = context.suite(title, fn);
- mocha.grep(suite.fullTitle());
- };
-
- /**
- * Describe a specification or test-case
- * with the given `title` and callback `fn`
- * acting as a thunk.
- */
-
- context.test = function(title, fn){
- var suite = suites[0];
- if (suite.pending) fn = null;
- var test = new Test(title, fn);
- test.file = file;
- suite.addTest(test);
- return test;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.test.only = function(title, fn){
- var test = context.test(title, fn);
- var reString = '^' + escapeRe(test.fullTitle()) + '$';
- mocha.grep(new RegExp(reString));
- };
-
- context.test.skip = common.test.skip;
- });
-};
-
-}); // module: interfaces/tdd.js
-
-require.register("mocha.js", function(module, exports, require){
-/*!
- * mocha
- * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var path = require('browser/path')
- , escapeRe = require('browser/escape-string-regexp')
- , utils = require('./utils');
-
-/**
- * Expose `Mocha`.
- */
-
-exports = module.exports = Mocha;
-
-/**
- * To require local UIs and reporters when running in node.
- */
-
-if (typeof process !== 'undefined' && typeof process.cwd === 'function') {
- var join = path.join
- , cwd = process.cwd();
- module.paths.push(cwd, join(cwd, 'node_modules'));
-}
-
-/**
- * Expose internals.
- */
-
-exports.utils = utils;
-exports.interfaces = require('./interfaces');
-exports.reporters = require('./reporters');
-exports.Runnable = require('./runnable');
-exports.Context = require('./context');
-exports.Runner = require('./runner');
-exports.Suite = require('./suite');
-exports.Hook = require('./hook');
-exports.Test = require('./test');
-
-/**
- * Return image `name` path.
- *
- * @param {String} name
- * @return {String}
- * @api private
- */
-
-function image(name) {
- return __dirname + '/../images/' + name + '.png';
-}
-
-/**
- * Setup mocha with `options`.
- *
- * Options:
- *
- * - `ui` name "bdd", "tdd", "exports" etc
- * - `reporter` reporter instance, defaults to `mocha.reporters.spec`
- * - `globals` array of accepted globals
- * - `timeout` timeout in milliseconds
- * - `bail` bail on the first test failure
- * - `slow` milliseconds to wait before considering a test slow
- * - `ignoreLeaks` ignore global leaks
- * - `fullTrace` display the full stack-trace on failing
- * - `grep` string or regexp to filter tests with
- *
- * @param {Object} options
- * @api public
- */
-
-function Mocha(options) {
- options = options || {};
- this.files = [];
- this.options = options;
- if (options.grep) this.grep(new RegExp(options.grep));
- if (options.fgrep) this.grep(options.fgrep);
- this.suite = new exports.Suite('', new exports.Context);
- this.ui(options.ui);
- this.bail(options.bail);
- this.reporter(options.reporter, options.reporterOptions);
- if (null != options.timeout) this.timeout(options.timeout);
- this.useColors(options.useColors);
- if (options.enableTimeouts !== null) this.enableTimeouts(options.enableTimeouts);
- if (options.slow) this.slow(options.slow);
-
- this.suite.on('pre-require', function (context) {
- exports.afterEach = context.afterEach || context.teardown;
- exports.after = context.after || context.suiteTeardown;
- exports.beforeEach = context.beforeEach || context.setup;
- exports.before = context.before || context.suiteSetup;
- exports.describe = context.describe || context.suite;
- exports.it = context.it || context.test;
- exports.setup = context.setup || context.beforeEach;
- exports.suiteSetup = context.suiteSetup || context.before;
- exports.suiteTeardown = context.suiteTeardown || context.after;
- exports.suite = context.suite || context.describe;
- exports.teardown = context.teardown || context.afterEach;
- exports.test = context.test || context.it;
- exports.run = context.run;
- });
-}
-
-/**
- * Enable or disable bailing on the first failure.
- *
- * @param {Boolean} [bail]
- * @api public
- */
-
-Mocha.prototype.bail = function(bail){
- if (0 == arguments.length) bail = true;
- this.suite.bail(bail);
- return this;
-};
-
-/**
- * Add test `file`.
- *
- * @param {String} file
- * @api public
- */
-
-Mocha.prototype.addFile = function(file){
- this.files.push(file);
- return this;
-};
-
-/**
- * Set reporter to `reporter`, defaults to "spec".
- *
- * @param {String|Function} reporter name or constructor
- * @param {Object} reporterOptions optional options
- * @api public
- */
-Mocha.prototype.reporter = function(reporter, reporterOptions){
- if ('function' == typeof reporter) {
- this._reporter = reporter;
- } else {
- reporter = reporter || 'spec';
- var _reporter;
- try { _reporter = require('./reporters/' + reporter); } catch (err) {}
- if (!_reporter) try { _reporter = require(reporter); } catch (err) {}
- if (!_reporter && reporter === 'teamcity')
- console.warn('The Teamcity reporter was moved to a package named ' +
- 'mocha-teamcity-reporter ' +
- '(https://npmjs.org/package/mocha-teamcity-reporter).');
- if (!_reporter) throw new Error('invalid reporter "' + reporter + '"');
- this._reporter = _reporter;
- }
- this.options.reporterOptions = reporterOptions;
- return this;
-};
-
-/**
- * Set test UI `name`, defaults to "bdd".
- *
- * @param {String} bdd
- * @api public
- */
-
-Mocha.prototype.ui = function(name){
- name = name || 'bdd';
- this._ui = exports.interfaces[name];
- if (!this._ui) try { this._ui = require(name); } catch (err) {}
- if (!this._ui) throw new Error('invalid interface "' + name + '"');
- this._ui = this._ui(this.suite);
- return this;
-};
-
-/**
- * Load registered files.
- *
- * @api private
- */
-
-Mocha.prototype.loadFiles = function(fn){
- var self = this;
- var suite = this.suite;
- var pending = this.files.length;
- this.files.forEach(function(file){
- file = path.resolve(file);
- suite.emit('pre-require', global, file, self);
- suite.emit('require', require(file), file, self);
- suite.emit('post-require', global, file, self);
- --pending || (fn && fn());
- });
-};
-
-/**
- * Enable growl support.
- *
- * @api private
- */
-
-Mocha.prototype._growl = function(runner, reporter) {
- var notify = require('growl');
-
- runner.on('end', function(){
- var stats = reporter.stats;
- if (stats.failures) {
- var msg = stats.failures + ' of ' + runner.total + ' tests failed';
- notify(msg, { name: 'mocha', title: 'Failed', image: image('error') });
- } else {
- notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
- name: 'mocha'
- , title: 'Passed'
- , image: image('ok')
- });
- }
- });
-};
-
-/**
- * Add regexp to grep, if `re` is a string it is escaped.
- *
- * @param {RegExp|String} re
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.grep = function(re){
- this.options.grep = 'string' == typeof re
- ? new RegExp(escapeRe(re))
- : re;
- return this;
-};
-
-/**
- * Invert `.grep()` matches.
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.invert = function(){
- this.options.invert = true;
- return this;
-};
-
-/**
- * Ignore global leaks.
- *
- * @param {Boolean} ignore
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.ignoreLeaks = function(ignore){
- this.options.ignoreLeaks = !!ignore;
- return this;
-};
-
-/**
- * Enable global leak checking.
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.checkLeaks = function(){
- this.options.ignoreLeaks = false;
- return this;
-};
-
-/**
- * Display long stack-trace on failing
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.fullTrace = function() {
- this.options.fullStackTrace = true;
- return this;
-};
-
-/**
- * Enable growl support.
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.growl = function(){
- this.options.growl = true;
- return this;
-};
-
-/**
- * Ignore `globals` array or string.
- *
- * @param {Array|String} globals
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.globals = function(globals){
- this.options.globals = (this.options.globals || []).concat(globals);
- return this;
-};
-
-/**
- * Emit color output.
- *
- * @param {Boolean} colors
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.useColors = function(colors){
- if (colors !== undefined) {
- this.options.useColors = colors;
- }
- return this;
-};
-
-/**
- * Use inline diffs rather than +/-.
- *
- * @param {Boolean} inlineDiffs
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.useInlineDiffs = function(inlineDiffs) {
- this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined
- ? inlineDiffs
- : false;
- return this;
-};
-
-/**
- * Set the timeout in milliseconds.
- *
- * @param {Number} timeout
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.timeout = function(timeout){
- this.suite.timeout(timeout);
- return this;
-};
-
-/**
- * Set slowness threshold in milliseconds.
- *
- * @param {Number} slow
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.slow = function(slow){
- this.suite.slow(slow);
- return this;
-};
-
-/**
- * Enable timeouts.
- *
- * @param {Boolean} enabled
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.enableTimeouts = function(enabled) {
- this.suite.enableTimeouts(arguments.length && enabled !== undefined
- ? enabled
- : true);
- return this
-};
-
-/**
- * Makes all tests async (accepting a callback)
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.asyncOnly = function(){
- this.options.asyncOnly = true;
- return this;
-};
-
-/**
- * Disable syntax highlighting (in browser).
- * @returns {Mocha}
- * @api public
- */
-Mocha.prototype.noHighlighting = function() {
- this.options.noHighlighting = true;
- return this;
-};
-
-/**
- * Delay root suite execution.
- * @returns {Mocha}
- * @api public
- */
-Mocha.prototype.delay = function delay() {
- this.options.delay = true;
- return this;
-};
-
-/**
- * Run tests and invoke `fn()` when complete.
- *
- * @param {Function} fn
- * @return {Runner}
- * @api public
- */
-Mocha.prototype.run = function(fn){
- if (this.files.length) this.loadFiles();
- var suite = this.suite;
- var options = this.options;
- options.files = this.files;
- var runner = new exports.Runner(suite, options.delay);
- var reporter = new this._reporter(runner, options);
- runner.ignoreLeaks = false !== options.ignoreLeaks;
- runner.fullStackTrace = options.fullStackTrace;
- runner.asyncOnly = options.asyncOnly;
- if (options.grep) runner.grep(options.grep, options.invert);
- if (options.globals) runner.globals(options.globals);
- if (options.growl) this._growl(runner, reporter);
- if (options.useColors !== undefined) {
- exports.reporters.Base.useColors = options.useColors;
- }
- exports.reporters.Base.inlineDiffs = options.useInlineDiffs;
-
- function done(failures) {
- if (reporter.done) {
- reporter.done(failures, fn);
- } else fn && fn(failures);
- }
-
- return runner.run(done);
-};
-
-}); // module: mocha.js
-
-require.register("ms.js", function(module, exports, require){
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var y = d * 365.25;
-
-/**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} options
- * @return {String|Number}
- * @api public
- */
-
-module.exports = function(val, options){
- options = options || {};
- if ('string' == typeof val) return parse(val);
- return options['long'] ? longFormat(val) : shortFormat(val);
-};
-
-/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function parse(str) {
- var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str);
- if (!match) return;
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
- switch (type) {
- case 'years':
- case 'year':
- case 'y':
- return n * y;
- case 'days':
- case 'day':
- case 'd':
- return n * d;
- case 'hours':
- case 'hour':
- case 'h':
- return n * h;
- case 'minutes':
- case 'minute':
- case 'm':
- return n * m;
- case 'seconds':
- case 'second':
- case 's':
- return n * s;
- case 'ms':
- return n;
- }
-}
-
-/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function shortFormat(ms) {
- if (ms >= d) return Math.round(ms / d) + 'd';
- if (ms >= h) return Math.round(ms / h) + 'h';
- if (ms >= m) return Math.round(ms / m) + 'm';
- if (ms >= s) return Math.round(ms / s) + 's';
- return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function longFormat(ms) {
- return plural(ms, d, 'day')
- || plural(ms, h, 'hour')
- || plural(ms, m, 'minute')
- || plural(ms, s, 'second')
- || ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, n, name) {
- if (ms < n) return;
- if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
- return Math.ceil(ms / n) + ' ' + name + 's';
-}
-
-}); // module: ms.js
-
-require.register("pending.js", function(module, exports, require){
-
-/**
- * Expose `Pending`.
- */
-
-module.exports = Pending;
-
-/**
- * Initialize a new `Pending` error with the given message.
- *
- * @param {String} message
- */
-
-function Pending(message) {
- this.message = message;
-}
-
-}); // module: pending.js
-
-require.register("reporters/base.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var tty = require('browser/tty')
- , diff = require('browser/diff')
- , ms = require('../ms')
- , utils = require('../utils')
- , supportsColor = process.env ? require('supports-color') : null;
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Check if both stdio streams are associated with a tty.
- */
-
-var isatty = tty.isatty(1) && tty.isatty(2);
-
-/**
- * Expose `Base`.
- */
-
-exports = module.exports = Base;
-
-/**
- * Enable coloring by default, except in the browser interface.
- */
-
-exports.useColors = process.env
- ? (supportsColor || (process.env.MOCHA_COLORS !== undefined))
- : false;
-
-/**
- * Inline diffs instead of +/-
- */
-
-exports.inlineDiffs = false;
-
-/**
- * Default color map.
- */
-
-exports.colors = {
- 'pass': 90
- , 'fail': 31
- , 'bright pass': 92
- , 'bright fail': 91
- , 'bright yellow': 93
- , 'pending': 36
- , 'suite': 0
- , 'error title': 0
- , 'error message': 31
- , 'error stack': 90
- , 'checkmark': 32
- , 'fast': 90
- , 'medium': 33
- , 'slow': 31
- , 'green': 32
- , 'light': 90
- , 'diff gutter': 90
- , 'diff added': 42
- , 'diff removed': 41
-};
-
-/**
- * Default symbol map.
- */
-
-exports.symbols = {
- ok: '✓',
- err: '✖',
- dot: '․'
-};
-
-// With node.js on Windows: use symbols available in terminal default fonts
-if ('win32' == process.platform) {
- exports.symbols.ok = '\u221A';
- exports.symbols.err = '\u00D7';
- exports.symbols.dot = '.';
-}
-
-/**
- * Color `str` with the given `type`,
- * allowing colors to be disabled,
- * as well as user-defined color
- * schemes.
- *
- * @param {String} type
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-var color = exports.color = function(type, str) {
- if (!exports.useColors) return String(str);
- return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m';
-};
-
-/**
- * Expose term window size, with some
- * defaults for when stderr is not a tty.
- */
-
-exports.window = {
- width: isatty
- ? process.stdout.getWindowSize
- ? process.stdout.getWindowSize(1)[0]
- : tty.getWindowSize()[1]
- : 75
-};
-
-/**
- * Expose some basic cursor interactions
- * that are common among reporters.
- */
-
-exports.cursor = {
- hide: function(){
- isatty && process.stdout.write('\u001b[?25l');
- },
-
- show: function(){
- isatty && process.stdout.write('\u001b[?25h');
- },
-
- deleteLine: function(){
- isatty && process.stdout.write('\u001b[2K');
- },
-
- beginningOfLine: function(){
- isatty && process.stdout.write('\u001b[0G');
- },
-
- CR: function(){
- if (isatty) {
- exports.cursor.deleteLine();
- exports.cursor.beginningOfLine();
- } else {
- process.stdout.write('\r');
- }
- }
-};
-
-/**
- * Outut the given `failures` as a list.
- *
- * @param {Array} failures
- * @api public
- */
-
-exports.list = function(failures){
- console.log();
- failures.forEach(function(test, i){
- // format
- var fmt = color('error title', ' %s) %s:\n')
- + color('error message', ' %s')
- + color('error stack', '\n%s\n');
-
- // msg
- var err = test.err
- , message = err.message || ''
- , stack = err.stack || message
- , index = stack.indexOf(message) + message.length
- , msg = stack.slice(0, index)
- , actual = err.actual
- , expected = err.expected
- , escape = true;
-
- // uncaught
- if (err.uncaught) {
- msg = 'Uncaught ' + msg;
- }
- // explicitly show diff
- if (err.showDiff && sameType(actual, expected)) {
-
- if ('string' !== typeof actual) {
- escape = false;
- err.actual = actual = utils.stringify(actual);
- err.expected = expected = utils.stringify(expected);
- }
-
- fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n');
- var match = message.match(/^([^:]+): expected/);
- msg = '\n ' + color('error message', match ? match[1] : msg);
-
- if (exports.inlineDiffs) {
- msg += inlineDiff(err, escape);
- } else {
- msg += unifiedDiff(err, escape);
- }
- }
-
- // indent stack trace without msg
- stack = stack.slice(index ? index + 1 : index)
- .replace(/^/gm, ' ');
-
- console.log(fmt, (i + 1), test.fullTitle(), msg, stack);
- });
-};
-
-/**
- * Initialize a new `Base` reporter.
- *
- * All other reporters generally
- * inherit from this reporter, providing
- * stats such as test duration, number
- * of tests passed / failed etc.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Base(runner) {
- var self = this
- , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }
- , failures = this.failures = [];
-
- if (!runner) return;
- this.runner = runner;
-
- runner.stats = stats;
-
- runner.on('start', function(){
- stats.start = new Date;
- });
-
- runner.on('suite', function(suite){
- stats.suites = stats.suites || 0;
- suite.root || stats.suites++;
- });
-
- runner.on('test end', function(test){
- stats.tests = stats.tests || 0;
- stats.tests++;
- });
-
- runner.on('pass', function(test){
- stats.passes = stats.passes || 0;
-
- var medium = test.slow() / 2;
- test.speed = test.duration > test.slow()
- ? 'slow'
- : test.duration > medium
- ? 'medium'
- : 'fast';
-
- stats.passes++;
- });
-
- runner.on('fail', function(test, err){
- stats.failures = stats.failures || 0;
- stats.failures++;
- test.err = err;
- failures.push(test);
- });
-
- runner.on('end', function(){
- stats.end = new Date;
- stats.duration = new Date - stats.start;
- });
-
- runner.on('pending', function(){
- stats.pending++;
- });
-}
-
-/**
- * Output common epilogue used by many of
- * the bundled reporters.
- *
- * @api public
- */
-
-Base.prototype.epilogue = function(){
- var stats = this.stats;
- var tests;
- var fmt;
-
- console.log();
-
- // passes
- fmt = color('bright pass', ' ')
- + color('green', ' %d passing')
- + color('light', ' (%s)');
-
- console.log(fmt,
- stats.passes || 0,
- ms(stats.duration));
-
- // pending
- if (stats.pending) {
- fmt = color('pending', ' ')
- + color('pending', ' %d pending');
-
- console.log(fmt, stats.pending);
- }
-
- // failures
- if (stats.failures) {
- fmt = color('fail', ' %d failing');
-
- console.log(fmt, stats.failures);
-
- Base.list(this.failures);
- console.log();
- }
-
- console.log();
-};
-
-/**
- * Pad the given `str` to `len`.
- *
- * @param {String} str
- * @param {String} len
- * @return {String}
- * @api private
- */
-
-function pad(str, len) {
- str = String(str);
- return Array(len - str.length + 1).join(' ') + str;
-}
-
-
-/**
- * Returns an inline diff between 2 strings with coloured ANSI output
- *
- * @param {Error} Error with actual/expected
- * @return {String} Diff
- * @api private
- */
-
-function inlineDiff(err, escape) {
- var msg = errorDiff(err, 'WordsWithSpace', escape);
-
- // linenos
- var lines = msg.split('\n');
- if (lines.length > 4) {
- var width = String(lines.length).length;
- msg = lines.map(function(str, i){
- return pad(++i, width) + ' |' + ' ' + str;
- }).join('\n');
- }
-
- // legend
- msg = '\n'
- + color('diff removed', 'actual')
- + ' '
- + color('diff added', 'expected')
- + '\n\n'
- + msg
- + '\n';
-
- // indent
- msg = msg.replace(/^/gm, ' ');
- return msg;
-}
-
-/**
- * Returns a unified diff between 2 strings
- *
- * @param {Error} Error with actual/expected
- * @return {String} Diff
- * @api private
- */
-
-function unifiedDiff(err, escape) {
- var indent = ' ';
- function cleanUp(line) {
- if (escape) {
- line = escapeInvisibles(line);
- }
- if (line[0] === '+') return indent + colorLines('diff added', line);
- if (line[0] === '-') return indent + colorLines('diff removed', line);
- if (line.match(/\@\@/)) return null;
- if (line.match(/\\ No newline/)) return null;
- else return indent + line;
- }
- function notBlank(line) {
- return line != null;
- }
- var msg = diff.createPatch('string', err.actual, err.expected);
- var lines = msg.split('\n').splice(4);
- return '\n '
- + colorLines('diff added', '+ expected') + ' '
- + colorLines('diff removed', '- actual')
- + '\n\n'
- + lines.map(cleanUp).filter(notBlank).join('\n');
-}
-
-/**
- * Return a character diff for `err`.
- *
- * @param {Error} err
- * @return {String}
- * @api private
- */
-
-function errorDiff(err, type, escape) {
- var actual = escape ? escapeInvisibles(err.actual) : err.actual;
- var expected = escape ? escapeInvisibles(err.expected) : err.expected;
- return diff['diff' + type](actual, expected).map(function(str){
- if (str.added) return colorLines('diff added', str.value);
- if (str.removed) return colorLines('diff removed', str.value);
- return str.value;
- }).join('');
-}
-
-/**
- * Returns a string with all invisible characters in plain text
- *
- * @param {String} line
- * @return {String}
- * @api private
- */
-function escapeInvisibles(line) {
- return line.replace(/\t/g, '<tab>')
- .replace(/\r/g, '<CR>')
- .replace(/\n/g, '<LF>\n');
-}
-
-/**
- * Color lines for `str`, using the color `name`.
- *
- * @param {String} name
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-function colorLines(name, str) {
- return str.split('\n').map(function(str){
- return color(name, str);
- }).join('\n');
-}
-
-/**
- * Check that a / b have the same type.
- *
- * @param {Object} a
- * @param {Object} b
- * @return {Boolean}
- * @api private
- */
-
-function sameType(a, b) {
- a = Object.prototype.toString.call(a);
- b = Object.prototype.toString.call(b);
- return a == b;
-}
-
-}); // module: reporters/base.js
-
-require.register("reporters/doc.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils');
-
-/**
- * Expose `Doc`.
- */
-
-exports = module.exports = Doc;
-
-/**
- * Initialize a new `Doc` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Doc(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , total = runner.total
- , indents = 2;
-
- function indent() {
- return Array(indents).join(' ');
- }
-
- runner.on('suite', function(suite){
- if (suite.root) return;
- ++indents;
- console.log('%s<section class="suite">', indent());
- ++indents;
- console.log('%s<h1>%s</h1>', indent(), utils.escape(suite.title));
- console.log('%s<dl>', indent());
- });
-
- runner.on('suite end', function(suite){
- if (suite.root) return;
- console.log('%s</dl>', indent());
- --indents;
- console.log('%s</section>', indent());
- --indents;
- });
-
- runner.on('pass', function(test){
- console.log('%s <dt>%s</dt>', indent(), utils.escape(test.title));
- var code = utils.escape(utils.clean(test.fn.toString()));
- console.log('%s <dd><pre><code>%s</code></pre></dd>', indent(), code);
- });
-
- runner.on('fail', function(test, err){
- console.log('%s <dt class="error">%s</dt>', indent(), utils.escape(test.title));
- var code = utils.escape(utils.clean(test.fn.toString()));
- console.log('%s <dd class="error"><pre><code>%s</code></pre></dd>', indent(), code);
- console.log('%s <dd class="error">%s</dd>', indent(), utils.escape(err));
- });
-}
-
-}); // module: reporters/doc.js
-
-require.register("reporters/dot.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , color = Base.color;
-
-/**
- * Expose `Dot`.
- */
-
-exports = module.exports = Dot;
-
-/**
- * Initialize a new `Dot` matrix test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Dot(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , width = Base.window.width * .75 | 0
- , n = -1;
-
- runner.on('start', function(){
- process.stdout.write('\n ');
- });
-
- runner.on('pending', function(test){
- if (++n % width == 0) process.stdout.write('\n ');
- process.stdout.write(color('pending', Base.symbols.dot));
- });
-
- runner.on('pass', function(test){
- if (++n % width == 0) process.stdout.write('\n ');
- if ('slow' == test.speed) {
- process.stdout.write(color('bright yellow', Base.symbols.dot));
- } else {
- process.stdout.write(color(test.speed, Base.symbols.dot));
- }
- });
-
- runner.on('fail', function(test, err){
- if (++n % width == 0) process.stdout.write('\n ');
- process.stdout.write(color('fail', Base.symbols.dot));
- });
-
- runner.on('end', function(){
- console.log();
- self.epilogue();
- });
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-Dot.prototype = new F;
-Dot.prototype.constructor = Dot;
-
-
-}); // module: reporters/dot.js
-
-require.register("reporters/html-cov.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var JSONCov = require('./json-cov')
- , fs = require('browser/fs');
-
-/**
- * Expose `HTMLCov`.
- */
-
-exports = module.exports = HTMLCov;
-
-/**
- * Initialize a new `JsCoverage` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function HTMLCov(runner) {
- var jade = require('jade')
- , file = __dirname + '/templates/coverage.jade'
- , str = fs.readFileSync(file, 'utf8')
- , fn = jade.compile(str, { filename: file })
- , self = this;
-
- JSONCov.call(this, runner, false);
-
- runner.on('end', function(){
- process.stdout.write(fn({
- cov: self.cov
- , coverageClass: coverageClass
- }));
- });
-}
-
-/**
- * Return coverage class for `n`.
- *
- * @return {String}
- * @api private
- */
-
-function coverageClass(n) {
- if (n >= 75) return 'high';
- if (n >= 50) return 'medium';
- if (n >= 25) return 'low';
- return 'terrible';
-}
-
-}); // module: reporters/html-cov.js
-
-require.register("reporters/html.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils')
- , Progress = require('../browser/progress')
- , escape = utils.escape;
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Expose `HTML`.
- */
-
-exports = module.exports = HTML;
-
-/**
- * Stats template.
- */
-
-var statsTemplate = '<ul id="mocha-stats">'
- + '<li class="progress"><canvas width="40" height="40"></canvas></li>'
- + '<li class="passes"><a href="#">passes:</a> <em>0</em></li>'
- + '<li class="failures"><a href="#">failures:</a> <em>0</em></li>'
- + '<li class="duration">duration: <em>0</em>s</li>'
- + '</ul>';
-
-/**
- * Initialize a new `HTML` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function HTML(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , total = runner.total
- , stat = fragment(statsTemplate)
- , items = stat.getElementsByTagName('li')
- , passes = items[1].getElementsByTagName('em')[0]
- , passesLink = items[1].getElementsByTagName('a')[0]
- , failures = items[2].getElementsByTagName('em')[0]
- , failuresLink = items[2].getElementsByTagName('a')[0]
- , duration = items[3].getElementsByTagName('em')[0]
- , canvas = stat.getElementsByTagName('canvas')[0]
- , report = fragment('<ul id="mocha-report"></ul>')
- , stack = [report]
- , progress
- , ctx
- , root = document.getElementById('mocha');
-
- if (canvas.getContext) {
- var ratio = window.devicePixelRatio || 1;
- canvas.style.width = canvas.width;
- canvas.style.height = canvas.height;
- canvas.width *= ratio;
- canvas.height *= ratio;
- ctx = canvas.getContext('2d');
- ctx.scale(ratio, ratio);
- progress = new Progress;
- }
-
- if (!root) return error('#mocha div missing, add it to your document');
-
- // pass toggle
- on(passesLink, 'click', function(){
- unhide();
- var name = /pass/.test(report.className) ? '' : ' pass';
- report.className = report.className.replace(/fail|pass/g, '') + name;
- if (report.className.trim()) hideSuitesWithout('test pass');
- });
-
- // failure toggle
- on(failuresLink, 'click', function(){
- unhide();
- var name = /fail/.test(report.className) ? '' : ' fail';
- report.className = report.className.replace(/fail|pass/g, '') + name;
- if (report.className.trim()) hideSuitesWithout('test fail');
- });
-
- root.appendChild(stat);
- root.appendChild(report);
-
- if (progress) progress.size(40);
-
- runner.on('suite', function(suite){
- if (suite.root) return;
-
- // suite
- var url = self.suiteURL(suite);
- var el = fragment('<li class="suite"><h1><a href="%s">%s</a></h1></li>', url, escape(suite.title));
-
- // container
- stack[0].appendChild(el);
- stack.unshift(document.createElement('ul'));
- el.appendChild(stack[0]);
- });
-
- runner.on('suite end', function(suite){
- if (suite.root) return;
- stack.shift();
- });
-
- runner.on('fail', function(test, err){
- if ('hook' == test.type) runner.emit('test end', test);
- });
-
- runner.on('test end', function(test){
- // TODO: add to stats
- var percent = stats.tests / this.total * 100 | 0;
- if (progress) progress.update(percent).draw(ctx);
-
- // update stats
- var ms = new Date - stats.start;
- text(passes, stats.passes);
- text(failures, stats.failures);
- text(duration, (ms / 1000).toFixed(2));
-
- // test
- if ('passed' == test.state) {
- var url = self.testURL(test);
- var el = fragment('<li class="test pass %e"><h2>%e<span class="duration">%ems</span> <a href="%s" class="replay">‣</a></h2></li>', test.speed, test.title, test.duration, url);
- } else if (test.pending) {
- var el = fragment('<li class="test pass pending"><h2>%e</h2></li>', test.title);
- } else {
- var el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay">‣</a></h2></li>', test.title, self.testURL(test));
- var str = test.err.stack || test.err.toString();
-
- // FF / Opera do not add the message
- if (!~str.indexOf(test.err.message)) {
- str = test.err.message + '\n' + str;
- }
-
- // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we
- // check for the result of the stringifying.
- if ('[object Error]' == str) str = test.err.message;
-
- // Safari doesn't give you a stack. Let's at least provide a source line.
- if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) {
- str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")";
- }
-
- el.appendChild(fragment('<pre class="error">%e</pre>', str));
- }
-
- // toggle code
- // TODO: defer
- if (!test.pending) {
- var h2 = el.getElementsByTagName('h2')[0];
-
- on(h2, 'click', function(){
- pre.style.display = 'none' == pre.style.display
- ? 'block'
- : 'none';
- });
-
- var pre = fragment('<pre><code>%e</code></pre>', utils.clean(test.fn.toString()));
- el.appendChild(pre);
- pre.style.display = 'none';
- }
-
- // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack.
- if (stack[0]) stack[0].appendChild(el);
- });
-}
-
-/**
- * Makes a URL, preserving querystring ("search") parameters.
- * @param {string} s
- * @returns {string} your new URL
- */
-var makeUrl = function makeUrl(s) {
- var search = window.location.search;
-
- // Remove previous grep query parameter if present
- if (search) {
- search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?');
- }
-
- return window.location.pathname + (search ? search + '&' : '?' ) + 'grep=' + encodeURIComponent(s);
-};
-
-/**
- * Provide suite URL
- *
- * @param {Object} [suite]
- */
-HTML.prototype.suiteURL = function(suite){
- return makeUrl(suite.fullTitle());
-};
-
-/**
- * Provide test URL
- *
- * @param {Object} [test]
- */
-
-HTML.prototype.testURL = function(test){
- return makeUrl(test.fullTitle());
-};
-
-/**
- * Display error `msg`.
- */
-
-function error(msg) {
- document.body.appendChild(fragment('<div id="mocha-error">%s</div>', msg));
-}
-
-/**
- * Return a DOM fragment from `html`.
- */
-
-function fragment(html) {
- var args = arguments
- , div = document.createElement('div')
- , i = 1;
-
- div.innerHTML = html.replace(/%([se])/g, function(_, type){
- switch (type) {
- case 's': return String(args[i++]);
- case 'e': return escape(args[i++]);
- }
- });
-
- return div.firstChild;
-}
-
-/**
- * Check for suites that do not have elements
- * with `classname`, and hide them.
- */
-
-function hideSuitesWithout(classname) {
- var suites = document.getElementsByClassName('suite');
- for (var i = 0; i < suites.length; i++) {
- var els = suites[i].getElementsByClassName(classname);
- if (0 == els.length) suites[i].className += ' hidden';
- }
-}
-
-/**
- * Unhide .hidden suites.
- */
-
-function unhide() {
- var els = document.getElementsByClassName('suite hidden');
- for (var i = 0; i < els.length; ++i) {
- els[i].className = els[i].className.replace('suite hidden', 'suite');
- }
-}
-
-/**
- * Set `el` text to `str`.
- */
-
-function text(el, str) {
- if (el.textContent) {
- el.textContent = str;
- } else {
- el.innerText = str;
- }
-}
-
-/**
- * Listen on `event` with callback `fn`.
- */
-
-function on(el, event, fn) {
- if (el.addEventListener) {
- el.addEventListener(event, fn, false);
- } else {
- el.attachEvent('on' + event, fn);
- }
-}
-
-}); // module: reporters/html.js
-
-require.register("reporters/index.js", function(module, exports, require){
-exports.Base = require('./base');
-exports.Dot = require('./dot');
-exports.Doc = require('./doc');
-exports.TAP = require('./tap');
-exports.JSON = require('./json');
-exports.HTML = require('./html');
-exports.List = require('./list');
-exports.Min = require('./min');
-exports.Spec = require('./spec');
-exports.Nyan = require('./nyan');
-exports.XUnit = require('./xunit');
-exports.Markdown = require('./markdown');
-exports.Progress = require('./progress');
-exports.Landing = require('./landing');
-exports.JSONCov = require('./json-cov');
-exports.HTMLCov = require('./html-cov');
-exports.JSONStream = require('./json-stream');
-
-}); // module: reporters/index.js
-
-require.register("reporters/json-cov.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base');
-
-/**
- * Expose `JSONCov`.
- */
-
-exports = module.exports = JSONCov;
-
-/**
- * Initialize a new `JsCoverage` reporter.
- *
- * @param {Runner} runner
- * @param {Boolean} output
- * @api public
- */
-
-function JSONCov(runner, output) {
- var self = this
- , output = 1 == arguments.length ? true : output;
-
- Base.call(this, runner);
-
- var tests = []
- , failures = []
- , passes = [];
-
- runner.on('test end', function(test){
- tests.push(test);
- });
-
- runner.on('pass', function(test){
- passes.push(test);
- });
-
- runner.on('fail', function(test){
- failures.push(test);
- });
-
- runner.on('end', function(){
- var cov = global._$jscoverage || {};
- var result = self.cov = map(cov);
- result.stats = self.stats;
- result.tests = tests.map(clean);
- result.failures = failures.map(clean);
- result.passes = passes.map(clean);
- if (!output) return;
- process.stdout.write(JSON.stringify(result, null, 2 ));
- });
-}
-
-/**
- * Map jscoverage data to a JSON structure
- * suitable for reporting.
- *
- * @param {Object} cov
- * @return {Object}
- * @api private
- */
-
-function map(cov) {
- var ret = {
- instrumentation: 'node-jscoverage'
- , sloc: 0
- , hits: 0
- , misses: 0
- , coverage: 0
- , files: []
- };
-
- for (var filename in cov) {
- var data = coverage(filename, cov[filename]);
- ret.files.push(data);
- ret.hits += data.hits;
- ret.misses += data.misses;
- ret.sloc += data.sloc;
- }
-
- ret.files.sort(function(a, b) {
- return a.filename.localeCompare(b.filename);
- });
-
- if (ret.sloc > 0) {
- ret.coverage = (ret.hits / ret.sloc) * 100;
- }
-
- return ret;
-}
-
-/**
- * Map jscoverage data for a single source file
- * to a JSON structure suitable for reporting.
- *
- * @param {String} filename name of the source file
- * @param {Object} data jscoverage coverage data
- * @return {Object}
- * @api private
- */
-
-function coverage(filename, data) {
- var ret = {
- filename: filename,
- coverage: 0,
- hits: 0,
- misses: 0,
- sloc: 0,
- source: {}
- };
-
- data.source.forEach(function(line, num){
- num++;
-
- if (data[num] === 0) {
- ret.misses++;
- ret.sloc++;
- } else if (data[num] !== undefined) {
- ret.hits++;
- ret.sloc++;
- }
-
- ret.source[num] = {
- source: line
- , coverage: data[num] === undefined
- ? ''
- : data[num]
- };
- });
-
- ret.coverage = ret.hits / ret.sloc * 100;
-
- return ret;
-}
-
-/**
- * Return a plain-object representation of `test`
- * free of cyclic properties etc.
- *
- * @param {Object} test
- * @return {Object}
- * @api private
- */
-
-function clean(test) {
- return {
- title: test.title
- , fullTitle: test.fullTitle()
- , duration: test.duration
- }
-}
-
-}); // module: reporters/json-cov.js
-
-require.register("reporters/json-stream.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , color = Base.color;
-
-/**
- * Expose `List`.
- */
-
-exports = module.exports = List;
-
-/**
- * Initialize a new `List` test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function List(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , total = runner.total;
-
- runner.on('start', function(){
- console.log(JSON.stringify(['start', { total: total }]));
- });
-
- runner.on('pass', function(test){
- console.log(JSON.stringify(['pass', clean(test)]));
- });
-
- runner.on('fail', function(test, err){
- test = clean(test);
- test.err = err.message;
- console.log(JSON.stringify(['fail', test]));
- });
-
- runner.on('end', function(){
- process.stdout.write(JSON.stringify(['end', self.stats]));
- });
-}
-
-/**
- * Return a plain-object representation of `test`
- * free of cyclic properties etc.
- *
- * @param {Object} test
- * @return {Object}
- * @api private
- */
-
-function clean(test) {
- return {
- title: test.title
- , fullTitle: test.fullTitle()
- , duration: test.duration
- }
-}
-
-}); // module: reporters/json-stream.js
-
-require.register("reporters/json.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `JSON`.
- */
-
-exports = module.exports = JSONReporter;
-
-/**
- * Initialize a new `JSON` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function JSONReporter(runner) {
- var self = this;
- Base.call(this, runner);
-
- var tests = []
- , pending = []
- , failures = []
- , passes = [];
-
- runner.on('test end', function(test){
- tests.push(test);
- });
-
- runner.on('pass', function(test){
- passes.push(test);
- });
-
- runner.on('fail', function(test){
- failures.push(test);
- });
-
- runner.on('pending', function(test){
- pending.push(test);
- });
-
- runner.on('end', function(){
- var obj = {
- stats: self.stats,
- tests: tests.map(clean),
- pending: pending.map(clean),
- failures: failures.map(clean),
- passes: passes.map(clean)
- };
-
- runner.testResults = obj;
-
- process.stdout.write(JSON.stringify(obj, null, 2));
- });
-}
-
-/**
- * Return a plain-object representation of `test`
- * free of cyclic properties etc.
- *
- * @param {Object} test
- * @return {Object}
- * @api private
- */
-
-function clean(test) {
- return {
- title: test.title,
- fullTitle: test.fullTitle(),
- duration: test.duration,
- err: errorJSON(test.err || {})
- }
-}
-
-/**
- * Transform `error` into a JSON object.
- * @param {Error} err
- * @return {Object}
- */
-
-function errorJSON(err) {
- var res = {};
- Object.getOwnPropertyNames(err).forEach(function(key) {
- res[key] = err[key];
- }, err);
- return res;
-}
-
-}); // module: reporters/json.js
-
-require.register("reporters/landing.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `Landing`.
- */
-
-exports = module.exports = Landing;
-
-/**
- * Airplane color.
- */
-
-Base.colors.plane = 0;
-
-/**
- * Airplane crash color.
- */
-
-Base.colors['plane crash'] = 31;
-
-/**
- * Runway color.
- */
-
-Base.colors.runway = 90;
-
-/**
- * Initialize a new `Landing` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Landing(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , width = Base.window.width * .75 | 0
- , total = runner.total
- , stream = process.stdout
- , plane = color('plane', '✈')
- , crashed = -1
- , n = 0;
-
- function runway() {
- var buf = Array(width).join('-');
- return ' ' + color('runway', buf);
- }
-
- runner.on('start', function(){
- stream.write('\n\n\n ');
- cursor.hide();
- });
-
- runner.on('test end', function(test){
- // check if the plane crashed
- var col = -1 == crashed
- ? width * ++n / total | 0
- : crashed;
-
- // show the crash
- if ('failed' == test.state) {
- plane = color('plane crash', '✈');
- crashed = col;
- }
-
- // render landing strip
- stream.write('\u001b['+(width+1)+'D\u001b[2A');
- stream.write(runway());
- stream.write('\n ');
- stream.write(color('runway', Array(col).join('⋅')));
- stream.write(plane)
- stream.write(color('runway', Array(width - col).join('⋅') + '\n'));
- stream.write(runway());
- stream.write('\u001b[0m');
- });
-
- runner.on('end', function(){
- cursor.show();
- console.log();
- self.epilogue();
- });
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-Landing.prototype = new F;
-Landing.prototype.constructor = Landing;
-
-
-}); // module: reporters/landing.js
-
-require.register("reporters/list.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `List`.
- */
-
-exports = module.exports = List;
-
-/**
- * Initialize a new `List` test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function List(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , n = 0;
-
- runner.on('start', function(){
- console.log();
- });
-
- runner.on('test', function(test){
- process.stdout.write(color('pass', ' ' + test.fullTitle() + ': '));
- });
-
- runner.on('pending', function(test){
- var fmt = color('checkmark', ' -')
- + color('pending', ' %s');
- console.log(fmt, test.fullTitle());
- });
-
- runner.on('pass', function(test){
- var fmt = color('checkmark', ' '+Base.symbols.dot)
- + color('pass', ' %s: ')
- + color(test.speed, '%dms');
- cursor.CR();
- console.log(fmt, test.fullTitle(), test.duration);
- });
-
- runner.on('fail', function(test, err){
- cursor.CR();
- console.log(color('fail', ' %d) %s'), ++n, test.fullTitle());
- });
-
- runner.on('end', self.epilogue.bind(self));
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-List.prototype = new F;
-List.prototype.constructor = List;
-
-
-}); // module: reporters/list.js
-
-require.register("reporters/markdown.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils');
-
-/**
- * Constants
- */
-
-var SUITE_PREFIX = '$';
-
-/**
- * Expose `Markdown`.
- */
-
-exports = module.exports = Markdown;
-
-/**
- * Initialize a new `Markdown` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Markdown(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , level = 0
- , buf = '';
-
- function title(str) {
- return Array(level).join('#') + ' ' + str;
- }
-
- function indent() {
- return Array(level).join(' ');
- }
-
- function mapTOC(suite, obj) {
- var ret = obj,
- key = SUITE_PREFIX + suite.title;
- obj = obj[key] = obj[key] || { suite: suite };
- suite.suites.forEach(function(suite){
- mapTOC(suite, obj);
- });
- return ret;
- }
-
- function stringifyTOC(obj, level) {
- ++level;
- var buf = '';
- var link;
- for (var key in obj) {
- if ('suite' == key) continue;
- if (key !== SUITE_PREFIX) {
- link = ' - [' + key.substring(1) + ']';
- link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\n';
- buf += Array(level).join(' ') + link;
- }
- buf += stringifyTOC(obj[key], level);
- }
- return buf;
- }
-
- function generateTOC(suite) {
- var obj = mapTOC(suite, {});
- return stringifyTOC(obj, 0);
- }
-
- generateTOC(runner.suite);
-
- runner.on('suite', function(suite){
- ++level;
- var slug = utils.slug(suite.fullTitle());
- buf += '<a name="' + slug + '"></a>' + '\n';
- buf += title(suite.title) + '\n';
- });
-
- runner.on('suite end', function(suite){
- --level;
- });
-
- runner.on('pass', function(test){
- var code = utils.clean(test.fn.toString());
- buf += test.title + '.\n';
- buf += '\n```js\n';
- buf += code + '\n';
- buf += '```\n\n';
- });
-
- runner.on('end', function(){
- process.stdout.write('# TOC\n');
- process.stdout.write(generateTOC(runner.suite));
- process.stdout.write(buf);
- });
-}
-
-}); // module: reporters/markdown.js
-
-require.register("reporters/min.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base');
-
-/**
- * Expose `Min`.
- */
-
-exports = module.exports = Min;
-
-/**
- * Initialize a new `Min` minimal test reporter (best used with --watch).
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Min(runner) {
- Base.call(this, runner);
-
- runner.on('start', function(){
- // clear screen
- process.stdout.write('\u001b[2J');
- // set cursor position
- process.stdout.write('\u001b[1;3H');
- });
-
- runner.on('end', this.epilogue.bind(this));
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-Min.prototype = new F;
-Min.prototype.constructor = Min;
-
-
-}); // module: reporters/min.js
-
-require.register("reporters/nyan.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base');
-
-/**
- * Expose `Dot`.
- */
-
-exports = module.exports = NyanCat;
-
-/**
- * Initialize a new `Dot` matrix test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function NyanCat(runner) {
- Base.call(this, runner);
- var self = this
- , stats = this.stats
- , width = Base.window.width * .75 | 0
- , rainbowColors = this.rainbowColors = self.generateColors()
- , colorIndex = this.colorIndex = 0
- , numerOfLines = this.numberOfLines = 4
- , trajectories = this.trajectories = [[], [], [], []]
- , nyanCatWidth = this.nyanCatWidth = 11
- , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth)
- , scoreboardWidth = this.scoreboardWidth = 5
- , tick = this.tick = 0
- , n = 0;
-
- runner.on('start', function(){
- Base.cursor.hide();
- self.draw();
- });
-
- runner.on('pending', function(test){
- self.draw();
- });
-
- runner.on('pass', function(test){
- self.draw();
- });
-
- runner.on('fail', function(test, err){
- self.draw();
- });
-
- runner.on('end', function(){
- Base.cursor.show();
- for (var i = 0; i < self.numberOfLines; i++) write('\n');
- self.epilogue();
- });
-}
-
-/**
- * Draw the nyan cat
- *
- * @api private
- */
-
-NyanCat.prototype.draw = function(){
- this.appendRainbow();
- this.drawScoreboard();
- this.drawRainbow();
- this.drawNyanCat();
- this.tick = !this.tick;
-};
-
-/**
- * Draw the "scoreboard" showing the number
- * of passes, failures and pending tests.
- *
- * @api private
- */
-
-NyanCat.prototype.drawScoreboard = function(){
- var stats = this.stats;
-
- function draw(type, n) {
- write(' ');
- write(Base.color(type, n));
- write('\n');
- }
-
- draw('green', stats.passes);
- draw('fail', stats.failures);
- draw('pending', stats.pending);
- write('\n');
-
- this.cursorUp(this.numberOfLines);
-};
-
-/**
- * Append the rainbow.
- *
- * @api private
- */
-
-NyanCat.prototype.appendRainbow = function(){
- var segment = this.tick ? '_' : '-';
- var rainbowified = this.rainbowify(segment);
-
- for (var index = 0; index < this.numberOfLines; index++) {
- var trajectory = this.trajectories[index];
- if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift();
- trajectory.push(rainbowified);
- }
-};
-
-/**
- * Draw the rainbow.
- *
- * @api private
- */
-
-NyanCat.prototype.drawRainbow = function(){
- var self = this;
-
- this.trajectories.forEach(function(line, index) {
- write('\u001b[' + self.scoreboardWidth + 'C');
- write(line.join(''));
- write('\n');
- });
-
- this.cursorUp(this.numberOfLines);
-};
-
-/**
- * Draw the nyan cat
- *
- * @api private
- */
-
-NyanCat.prototype.drawNyanCat = function() {
- var self = this;
- var startWidth = this.scoreboardWidth + this.trajectories[0].length;
- var dist = '\u001b[' + startWidth + 'C';
- var padding = '';
-
- write(dist);
- write('_,------,');
- write('\n');
-
- write(dist);
- padding = self.tick ? ' ' : ' ';
- write('_|' + padding + '/\\_/\\ ');
- write('\n');
-
- write(dist);
- padding = self.tick ? '_' : '__';
- var tail = self.tick ? '~' : '^';
- var face;
- write(tail + '|' + padding + this.face() + ' ');
- write('\n');
-
- write(dist);
- padding = self.tick ? ' ' : ' ';
- write(padding + '"" "" ');
- write('\n');
-
- this.cursorUp(this.numberOfLines);
-};
-
-/**
- * Draw nyan cat face.
- *
- * @return {String}
- * @api private
- */
-
-NyanCat.prototype.face = function() {
- var stats = this.stats;
- if (stats.failures) {
- return '( x .x)';
- } else if (stats.pending) {
- return '( o .o)';
- } else if(stats.passes) {
- return '( ^ .^)';
- } else {
- return '( - .-)';
- }
-};
-
-/**
- * Move cursor up `n`.
- *
- * @param {Number} n
- * @api private
- */
-
-NyanCat.prototype.cursorUp = function(n) {
- write('\u001b[' + n + 'A');
-};
-
-/**
- * Move cursor down `n`.
- *
- * @param {Number} n
- * @api private
- */
-
-NyanCat.prototype.cursorDown = function(n) {
- write('\u001b[' + n + 'B');
-};
-
-/**
- * Generate rainbow colors.
- *
- * @return {Array}
- * @api private
- */
-
-NyanCat.prototype.generateColors = function(){
- var colors = [];
-
- for (var i = 0; i < (6 * 7); i++) {
- var pi3 = Math.floor(Math.PI / 3);
- var n = (i * (1.0 / 6));
- var r = Math.floor(3 * Math.sin(n) + 3);
- var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);
- var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);
- colors.push(36 * r + 6 * g + b + 16);
- }
-
- return colors;
-};
-
-/**
- * Apply rainbow to the given `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-NyanCat.prototype.rainbowify = function(str){
- if (!Base.useColors)
- return str;
- var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length];
- this.colorIndex += 1;
- return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m';
-};
-
-/**
- * Stdout helper.
- */
-
-function write(string) {
- process.stdout.write(string);
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-NyanCat.prototype = new F;
-NyanCat.prototype.constructor = NyanCat;
-
-
-}); // module: reporters/nyan.js
-
-require.register("reporters/progress.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `Progress`.
- */
-
-exports = module.exports = Progress;
-
-/**
- * General progress bar color.
- */
-
-Base.colors.progress = 90;
-
-/**
- * Initialize a new `Progress` bar test reporter.
- *
- * @param {Runner} runner
- * @param {Object} options
- * @api public
- */
-
-function Progress(runner, options) {
- Base.call(this, runner);
-
- var self = this
- , options = options || {}
- , stats = this.stats
- , width = Base.window.width * .50 | 0
- , total = runner.total
- , complete = 0
- , max = Math.max
- , lastN = -1;
-
- // default chars
- options.open = options.open || '[';
- options.complete = options.complete || '▬';
- options.incomplete = options.incomplete || Base.symbols.dot;
- options.close = options.close || ']';
- options.verbose = false;
-
- // tests started
- runner.on('start', function(){
- console.log();
- cursor.hide();
- });
-
- // tests complete
- runner.on('test end', function(){
- complete++;
- var incomplete = total - complete
- , percent = complete / total
- , n = width * percent | 0
- , i = width - n;
-
- if (lastN === n && !options.verbose) {
- // Don't re-render the line if it hasn't changed
- return;
- }
- lastN = n;
-
- cursor.CR();
- process.stdout.write('\u001b[J');
- process.stdout.write(color('progress', ' ' + options.open));
- process.stdout.write(Array(n).join(options.complete));
- process.stdout.write(Array(i).join(options.incomplete));
- process.stdout.write(color('progress', options.close));
- if (options.verbose) {
- process.stdout.write(color('progress', ' ' + complete + ' of ' + total));
- }
- });
-
- // tests are complete, output some stats
- // and the failures if any
- runner.on('end', function(){
- cursor.show();
- console.log();
- self.epilogue();
- });
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-Progress.prototype = new F;
-Progress.prototype.constructor = Progress;
-
-
-}); // module: reporters/progress.js
-
-require.register("reporters/spec.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `Spec`.
- */
-
-exports = module.exports = Spec;
-
-/**
- * Initialize a new `Spec` test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Spec(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , indents = 0
- , n = 0;
-
- function indent() {
- return Array(indents).join(' ')
- }
-
- runner.on('start', function(){
- console.log();
- });
-
- runner.on('suite', function(suite){
- ++indents;
- console.log(color('suite', '%s%s'), indent(), suite.title);
- });
-
- runner.on('suite end', function(suite){
- --indents;
- if (1 == indents) console.log();
- });
-
- runner.on('pending', function(test){
- var fmt = indent() + color('pending', ' - %s');
- console.log(fmt, test.title);
- });
-
- runner.on('pass', function(test){
- if ('fast' == test.speed) {
- var fmt = indent()
- + color('checkmark', ' ' + Base.symbols.ok)
- + color('pass', ' %s ');
- cursor.CR();
- console.log(fmt, test.title);
- } else {
- var fmt = indent()
- + color('checkmark', ' ' + Base.symbols.ok)
- + color('pass', ' %s ')
- + color(test.speed, '(%dms)');
- cursor.CR();
- console.log(fmt, test.title, test.duration);
- }
- });
-
- runner.on('fail', function(test, err){
- cursor.CR();
- console.log(indent() + color('fail', ' %d) %s'), ++n, test.title);
- });
-
- runner.on('end', self.epilogue.bind(self));
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-Spec.prototype = new F;
-Spec.prototype.constructor = Spec;
-
-
-}); // module: reporters/spec.js
-
-require.register("reporters/tap.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `TAP`.
- */
-
-exports = module.exports = TAP;
-
-/**
- * Initialize a new `TAP` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function TAP(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , n = 1
- , passes = 0
- , failures = 0;
-
- runner.on('start', function(){
- var total = runner.grepTotal(runner.suite);
- console.log('%d..%d', 1, total);
- });
-
- runner.on('test end', function(){
- ++n;
- });
-
- runner.on('pending', function(test){
- console.log('ok %d %s # SKIP -', n, title(test));
- });
-
- runner.on('pass', function(test){
- passes++;
- console.log('ok %d %s', n, title(test));
- });
-
- runner.on('fail', function(test, err){
- failures++;
- console.log('not ok %d %s', n, title(test));
- if (err.stack) console.log(err.stack.replace(/^/gm, ' '));
- });
-
- runner.on('end', function(){
- console.log('# tests ' + (passes + failures));
- console.log('# pass ' + passes);
- console.log('# fail ' + failures);
- });
-}
-
-/**
- * Return a TAP-safe title of `test`
- *
- * @param {Object} test
- * @return {String}
- * @api private
- */
-
-function title(test) {
- return test.fullTitle().replace(/#/g, '');
-}
-
-}); // module: reporters/tap.js
-
-require.register("reporters/xunit.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils')
- , fs = require('browser/fs')
- , escape = utils.escape;
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Expose `XUnit`.
- */
-
-exports = module.exports = XUnit;
-
-/**
- * Initialize a new `XUnit` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function XUnit(runner, options) {
- Base.call(this, runner);
- var stats = this.stats
- , tests = []
- , self = this;
-
- if (options.reporterOptions && options.reporterOptions.output) {
- if (! fs.createWriteStream) {
- throw new Error('file output not supported in browser');
- }
- self.fileStream = fs.createWriteStream(options.reporterOptions.output);
- }
-
- runner.on('pending', function(test){
- tests.push(test);
- });
-
- runner.on('pass', function(test){
- tests.push(test);
- });
-
- runner.on('fail', function(test){
- tests.push(test);
- });
-
- runner.on('end', function(){
- self.write(tag('testsuite', {
- name: 'Mocha Tests'
- , tests: stats.tests
- , failures: stats.failures
- , errors: stats.failures
- , skipped: stats.tests - stats.failures - stats.passes
- , timestamp: (new Date).toUTCString()
- , time: (stats.duration / 1000) || 0
- }, false));
-
- tests.forEach(function(t) { self.test(t); });
- self.write('</testsuite>');
- });
-}
-
-/**
- * Override done to close the stream (if it's a file).
- */
-XUnit.prototype.done = function(failures, fn) {
- if (this.fileStream) {
- this.fileStream.end(function() {
- fn(failures);
- });
- } else {
- fn(failures);
- }
-};
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){};
-F.prototype = Base.prototype;
-XUnit.prototype = new F;
-XUnit.prototype.constructor = XUnit;
-
-
-/**
- * Write out the given line
- */
-XUnit.prototype.write = function(line) {
- if (this.fileStream) {
- this.fileStream.write(line + '\n');
- } else {
- console.log(line);
- }
-};
-
-/**
- * Output tag for the given `test.`
- */
-
-XUnit.prototype.test = function(test, ostream) {
- var attrs = {
- classname: test.parent.fullTitle()
- , name: test.title
- , time: (test.duration / 1000) || 0
- };
-
- if ('failed' == test.state) {
- var err = test.err;
- this.write(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + "\n" + err.stack))));
- } else if (test.pending) {
- this.write(tag('testcase', attrs, false, tag('skipped', {}, true)));
- } else {
- this.write(tag('testcase', attrs, true) );
- }
-};
-
-/**
- * HTML tag helper.
- */
-
-function tag(name, attrs, close, content) {
- var end = close ? '/>' : '>'
- , pairs = []
- , tag;
-
- for (var key in attrs) {
- pairs.push(key + '="' + escape(attrs[key]) + '"');
- }
-
- tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end;
- if (content) tag += content + '</' + name + end;
- return tag;
-}
-
-/**
- * Return cdata escaped CDATA `str`.
- */
-
-function cdata(str) {
- return '<![CDATA[' + escape(str) + ']]>';
-}
-
-}); // module: reporters/xunit.js
-
-require.register("runnable.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('browser/events').EventEmitter
- , debug = require('browser/debug')('mocha:runnable')
- , Pending = require('./pending')
- , milliseconds = require('./ms')
- , utils = require('./utils');
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Object#toString().
- */
-
-var toString = Object.prototype.toString;
-
-/**
- * Expose `Runnable`.
- */
-
-module.exports = Runnable;
-
-/**
- * Initialize a new `Runnable` with the given `title` and callback `fn`.
- *
- * @param {String} title
- * @param {Function} fn
- * @api private
- */
-
-function Runnable(title, fn) {
- this.title = title;
- this.fn = fn;
- this.async = fn && fn.length;
- this.sync = ! this.async;
- this._timeout = 2000;
- this._slow = 75;
- this._enableTimeouts = true;
- this.timedOut = false;
- this._trace = new Error('done() called multiple times')
-}
-
-/**
- * Inherit from `EventEmitter.prototype`.
- */
-
-function F(){};
-F.prototype = EventEmitter.prototype;
-Runnable.prototype = new F;
-Runnable.prototype.constructor = Runnable;
-
-
-/**
- * Set & get timeout `ms`.
- *
- * @param {Number|String} ms
- * @return {Runnable|Number} ms or self
- * @api private
- */
-
-Runnable.prototype.timeout = function(ms){
- if (0 == arguments.length) return this._timeout;
- if (ms === 0) this._enableTimeouts = false;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('timeout %d', ms);
- this._timeout = ms;
- if (this.timer) this.resetTimeout();
- return this;
-};
-
-/**
- * Set & get slow `ms`.
- *
- * @param {Number|String} ms
- * @return {Runnable|Number} ms or self
- * @api private
- */
-
-Runnable.prototype.slow = function(ms){
- if (0 === arguments.length) return this._slow;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('timeout %d', ms);
- this._slow = ms;
- return this;
-};
-
-/**
- * Set and & get timeout `enabled`.
- *
- * @param {Boolean} enabled
- * @return {Runnable|Boolean} enabled or self
- * @api private
- */
-
-Runnable.prototype.enableTimeouts = function(enabled){
- if (arguments.length === 0) return this._enableTimeouts;
- debug('enableTimeouts %s', enabled);
- this._enableTimeouts = enabled;
- return this;
-};
-
-/**
- * Halt and mark as pending.
- *
- * @api private
- */
-
-Runnable.prototype.skip = function(){
- throw new Pending();
-};
-
-/**
- * Return the full title generated by recursively
- * concatenating the parent's full title.
- *
- * @return {String}
- * @api public
- */
-
-Runnable.prototype.fullTitle = function(){
- return this.parent.fullTitle() + ' ' + this.title;
-};
-
-/**
- * Clear the timeout.
- *
- * @api private
- */
-
-Runnable.prototype.clearTimeout = function(){
- clearTimeout(this.timer);
-};
-
-/**
- * Inspect the runnable void of private properties.
- *
- * @return {String}
- * @api private
- */
-
-Runnable.prototype.inspect = function(){
- return JSON.stringify(this, function(key, val){
- if ('_' == key[0]) return;
- if ('parent' == key) return '#<Suite>';
- if ('ctx' == key) return '#<Context>';
- return val;
- }, 2);
-};
-
-/**
- * Reset the timeout.
- *
- * @api private
- */
-
-Runnable.prototype.resetTimeout = function(){
- var self = this;
- var ms = this.timeout() || 1e9;
-
- if (!this._enableTimeouts) return;
- this.clearTimeout();
- this.timer = setTimeout(function(){
- if (!self._enableTimeouts) return;
- self.callback(new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.'));
- self.timedOut = true;
- }, ms);
-};
-
-/**
- * Whitelist these globals for this test run
- *
- * @api private
- */
-Runnable.prototype.globals = function(arr){
- var self = this;
- this._allowedGlobals = arr;
-};
-
-/**
- * Run the test and invoke `fn(err)`.
- *
- * @param {Function} fn
- * @api private
- */
-
-Runnable.prototype.run = function(fn){
- var self = this
- , start = new Date
- , ctx = this.ctx
- , finished
- , emitted;
-
- // Some times the ctx exists but it is not runnable
- if (ctx && ctx.runnable) ctx.runnable(this);
-
- // called multiple times
- function multiple(err) {
- if (emitted) return;
- emitted = true;
- self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate'));
- }
-
- // finished
- function done(err) {
- var ms = self.timeout();
- if (self.timedOut) return;
- if (finished) return multiple(err || self._trace);
-
- // Discard the resolution if this test has already failed asynchronously
- if (self.state) return;
-
- self.clearTimeout();
- self.duration = new Date - start;
- finished = true;
- if (!err && self.duration > ms && self._enableTimeouts) err = new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.');
- fn(err);
- }
-
- // for .resetTimeout()
- this.callback = done;
-
- // explicit async with `done` argument
- if (this.async) {
- this.resetTimeout();
-
- try {
- this.fn.call(ctx, function(err){
- if (err instanceof Error || toString.call(err) === "[object Error]") return done(err);
- if (null != err) {
- if (Object.prototype.toString.call(err) === '[object Object]') {
- return done(new Error('done() invoked with non-Error: ' + JSON.stringify(err)));
- } else {
- return done(new Error('done() invoked with non-Error: ' + err));
- }
- }
- done();
- });
- } catch (err) {
- done(utils.getError(err));
- }
- return;
- }
-
- if (this.asyncOnly) {
- return done(new Error('--async-only option in use without declaring `done()`'));
- }
-
- // sync or promise-returning
- try {
- if (this.pending) {
- done();
- } else {
- callFn(this.fn);
- }
- } catch (err) {
- done(utils.getError(err));
- }
-
- function callFn(fn) {
- var result = fn.call(ctx);
- if (result && typeof result.then === 'function') {
- self.resetTimeout();
- result
- .then(function() {
- done()
- },
- function(reason) {
- done(reason || new Error('Promise rejected with no or falsy reason'))
- });
- } else {
- done();
- }
- }
-};
-
-}); // module: runnable.js
-
-require.register("runner.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('browser/events').EventEmitter
- , debug = require('browser/debug')('mocha:runner')
- , Pending = require('./pending')
- , Test = require('./test')
- , utils = require('./utils')
- , filter = utils.filter
- , keys = utils.keys
- , type = utils.type
- , stringify = utils.stringify
- , stackFilter = utils.stackTraceFilter();
-
-/**
- * Non-enumerable globals.
- */
-
-var globals = [
- 'setTimeout',
- 'clearTimeout',
- 'setInterval',
- 'clearInterval',
- 'XMLHttpRequest',
- 'Date',
- 'setImmediate',
- 'clearImmediate'
-];
-
-/**
- * Expose `Runner`.
- */
-
-module.exports = Runner;
-
-/**
- * Initialize a `Runner` for the given `suite`.
- *
- * Events:
- *
- * - `start` execution started
- * - `end` execution complete
- * - `suite` (suite) test suite execution started
- * - `suite end` (suite) all tests (and sub-suites) have finished
- * - `test` (test) test execution started
- * - `test end` (test) test completed
- * - `hook` (hook) hook execution started
- * - `hook end` (hook) hook complete
- * - `pass` (test) test passed
- * - `fail` (test, err) test failed
- * - `pending` (test) test pending
- *
- * @param {Suite} suite Root suite
- * @param {boolean} [delay] Whether or not to delay execution of root suite
- * until ready.
- * @api public
- */
-
-function Runner(suite, delay) {
- var self = this;
- this._globals = [];
- this._abort = false;
- this._delay = delay;
- this.suite = suite;
- this.total = suite.total();
- this.failures = 0;
- this.on('test end', function(test){ self.checkGlobals(test); });
- this.on('hook end', function(hook){ self.checkGlobals(hook); });
- this.grep(/.*/);
- this.globals(this.globalProps().concat(extraGlobals()));
-}
-
-/**
- * Wrapper for setImmediate, process.nextTick, or browser polyfill.
- *
- * @param {Function} fn
- * @api private
- */
-
-Runner.immediately = global.setImmediate || process.nextTick;
-
-/**
- * Inherit from `EventEmitter.prototype`.
- */
-
-function F(){};
-F.prototype = EventEmitter.prototype;
-Runner.prototype = new F;
-Runner.prototype.constructor = Runner;
-
-
-/**
- * Run tests with full titles matching `re`. Updates runner.total
- * with number of tests matched.
- *
- * @param {RegExp} re
- * @param {Boolean} invert
- * @return {Runner} for chaining
- * @api public
- */
-
-Runner.prototype.grep = function(re, invert){
- debug('grep %s', re);
- this._grep = re;
- this._invert = invert;
- this.total = this.grepTotal(this.suite);
- return this;
-};
-
-/**
- * Returns the number of tests matching the grep search for the
- * given suite.
- *
- * @param {Suite} suite
- * @return {Number}
- * @api public
- */
-
-Runner.prototype.grepTotal = function(suite) {
- var self = this;
- var total = 0;
-
- suite.eachTest(function(test){
- var match = self._grep.test(test.fullTitle());
- if (self._invert) match = !match;
- if (match) total++;
- });
-
- return total;
-};
-
-/**
- * Return a list of global properties.
- *
- * @return {Array}
- * @api private
- */
-
-Runner.prototype.globalProps = function() {
- var props = utils.keys(global);
-
- // non-enumerables
- for (var i = 0; i < globals.length; ++i) {
- if (~utils.indexOf(props, globals[i])) continue;
- props.push(globals[i]);
- }
-
- return props;
-};
-
-/**
- * Allow the given `arr` of globals.
- *
- * @param {Array} arr
- * @return {Runner} for chaining
- * @api public
- */
-
-Runner.prototype.globals = function(arr){
- if (0 == arguments.length) return this._globals;
- debug('globals %j', arr);
- this._globals = this._globals.concat(arr);
- return this;
-};
-
-/**
- * Check for global variable leaks.
- *
- * @api private
- */
-
-Runner.prototype.checkGlobals = function(test){
- if (this.ignoreLeaks) return;
- var ok = this._globals;
-
- var globals = this.globalProps();
- var leaks;
-
- if (test) {
- ok = ok.concat(test._allowedGlobals || []);
- }
-
- if(this.prevGlobalsLength == globals.length) return;
- this.prevGlobalsLength = globals.length;
-
- leaks = filterLeaks(ok, globals);
- this._globals = this._globals.concat(leaks);
-
- if (leaks.length > 1) {
- this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + ''));
- } else if (leaks.length) {
- this.fail(test, new Error('global leak detected: ' + leaks[0]));
- }
-};
-
-/**
- * Fail the given `test`.
- *
- * @param {Test} test
- * @param {Error} err
- * @api private
- */
-
-Runner.prototype.fail = function(test, err) {
- ++this.failures;
- test.state = 'failed';
-
- if (!(err instanceof Error)) {
- err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)');
- }
-
- err.stack = this.fullStackTrace
- ? err.stack
- : stackFilter(err.stack);
-
- this.emit('fail', test, err);
-};
-
-/**
- * Fail the given `hook` with `err`.
- *
- * Hook failures work in the following pattern:
- * - If bail, then exit
- * - Failed `before` hook skips all tests in a suite and subsuites,
- * but jumps to corresponding `after` hook
- * - Failed `before each` hook skips remaining tests in a
- * suite and jumps to corresponding `after each` hook,
- * which is run only once
- * - Failed `after` hook does not alter
- * execution order
- * - Failed `after each` hook skips remaining tests in a
- * suite and subsuites, but executes other `after each`
- * hooks
- *
- * @param {Hook} hook
- * @param {Error} err
- * @api private
- */
-
-Runner.prototype.failHook = function(hook, err){
- this.fail(hook, err);
- if (this.suite.bail()) {
- this.emit('end');
- }
-};
-
-/**
- * Run hook `name` callbacks and then invoke `fn()`.
- *
- * @param {String} name
- * @param {Function} function
- * @api private
- */
-
-Runner.prototype.hook = function(name, fn){
- var suite = this.suite
- , hooks = suite['_' + name]
- , self = this
- , timer;
-
- function next(i) {
- var hook = hooks[i];
- if (!hook) return fn();
- self.currentRunnable = hook;
-
- hook.ctx.currentTest = self.test;
-
- self.emit('hook', hook);
-
- hook.on('error', function(err){
- self.failHook(hook, err);
- });
-
- hook.run(function(err){
- hook.removeAllListeners('error');
- var testError = hook.error();
- if (testError) self.fail(self.test, testError);
- if (err) {
- if (err instanceof Pending) {
- suite.pending = true;
- } else {
- self.failHook(hook, err);
-
- // stop executing hooks, notify callee of hook err
- return fn(err);
- }
- }
- self.emit('hook end', hook);
- delete hook.ctx.currentTest;
- next(++i);
- });
- }
-
- Runner.immediately(function(){
- next(0);
- });
-};
-
-/**
- * Run hook `name` for the given array of `suites`
- * in order, and callback `fn(err, errSuite)`.
- *
- * @param {String} name
- * @param {Array} suites
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.hooks = function(name, suites, fn){
- var self = this
- , orig = this.suite;
-
- function next(suite) {
- self.suite = suite;
-
- if (!suite) {
- self.suite = orig;
- return fn();
- }
-
- self.hook(name, function(err){
- if (err) {
- var errSuite = self.suite;
- self.suite = orig;
- return fn(err, errSuite);
- }
-
- next(suites.pop());
- });
- }
-
- next(suites.pop());
-};
-
-/**
- * Run hooks from the top level down.
- *
- * @param {String} name
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.hookUp = function(name, fn){
- var suites = [this.suite].concat(this.parents()).reverse();
- this.hooks(name, suites, fn);
-};
-
-/**
- * Run hooks from the bottom up.
- *
- * @param {String} name
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.hookDown = function(name, fn){
- var suites = [this.suite].concat(this.parents());
- this.hooks(name, suites, fn);
-};
-
-/**
- * Return an array of parent Suites from
- * closest to furthest.
- *
- * @return {Array}
- * @api private
- */
-
-Runner.prototype.parents = function(){
- var suite = this.suite
- , suites = [];
- while (suite = suite.parent) suites.push(suite);
- return suites;
-};
-
-/**
- * Run the current test and callback `fn(err)`.
- *
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.runTest = function(fn){
- var test = this.test
- , self = this;
-
- if (this.asyncOnly) test.asyncOnly = true;
-
- try {
- test.on('error', function(err){
- self.fail(test, err);
- });
- test.run(fn);
- } catch (err) {
- fn(err);
- }
-};
-
-/**
- * Run tests in the given `suite` and invoke
- * the callback `fn()` when complete.
- *
- * @param {Suite} suite
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.runTests = function(suite, fn){
- var self = this
- , tests = suite.tests.slice()
- , test;
-
-
- function hookErr(err, errSuite, after) {
- // before/after Each hook for errSuite failed:
- var orig = self.suite;
-
- // for failed 'after each' hook start from errSuite parent,
- // otherwise start from errSuite itself
- self.suite = after ? errSuite.parent : errSuite;
-
- if (self.suite) {
- // call hookUp afterEach
- self.hookUp('afterEach', function(err2, errSuite2) {
- self.suite = orig;
- // some hooks may fail even now
- if (err2) return hookErr(err2, errSuite2, true);
- // report error suite
- fn(errSuite);
- });
- } else {
- // there is no need calling other 'after each' hooks
- self.suite = orig;
- fn(errSuite);
- }
- }
-
- function next(err, errSuite) {
- // if we bail after first err
- if (self.failures && suite._bail) return fn();
-
- if (self._abort) return fn();
-
- if (err) return hookErr(err, errSuite, true);
-
- // next test
- test = tests.shift();
-
- // all done
- if (!test) return fn();
-
- // grep
- var match = self._grep.test(test.fullTitle());
- if (self._invert) match = !match;
- if (!match) return next();
-
- // pending
- if (test.pending) {
- self.emit('pending', test);
- self.emit('test end', test);
- return next();
- }
-
- // execute test and hook(s)
- self.emit('test', self.test = test);
- self.hookDown('beforeEach', function(err, errSuite){
-
- if (suite.pending) {
- self.emit('pending', test);
- self.emit('test end', test);
- return next();
- }
- if (err) return hookErr(err, errSuite, false);
-
- self.currentRunnable = self.test;
- self.runTest(function(err){
- test = self.test;
-
- if (err) {
- if (err instanceof Pending) {
- self.emit('pending', test);
- } else {
- self.fail(test, err);
- }
- self.emit('test end', test);
-
- if (err instanceof Pending) {
- return next();
- }
-
- return self.hookUp('afterEach', next);
- }
-
- test.state = 'passed';
- self.emit('pass', test);
- self.emit('test end', test);
- self.hookUp('afterEach', next);
- });
- });
- }
-
- this.next = next;
- next();
-};
-
-/**
- * Run the given `suite` and invoke the
- * callback `fn()` when complete.
- *
- * @param {Suite} suite
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.runSuite = function(suite, fn){
- var total = this.grepTotal(suite)
- , self = this
- , i = 0;
-
- debug('run suite %s', suite.fullTitle());
-
- if (!total) return fn();
-
- this.emit('suite', this.suite = suite);
-
- function next(errSuite) {
- if (errSuite) {
- // current suite failed on a hook from errSuite
- if (errSuite == suite) {
- // if errSuite is current suite
- // continue to the next sibling suite
- return done();
- } else {
- // errSuite is among the parents of current suite
- // stop execution of errSuite and all sub-suites
- return done(errSuite);
- }
- }
-
- if (self._abort) return done();
-
- var curr = suite.suites[i++];
- if (!curr) return done();
- self.runSuite(curr, next);
- }
-
- function done(errSuite) {
- self.suite = suite;
- self.hook('afterAll', function(){
- self.emit('suite end', suite);
- fn(errSuite);
- });
- }
-
- this.hook('beforeAll', function(err){
- if (err) return done();
- self.runTests(suite, next);
- });
-};
-
-/**
- * Handle uncaught exceptions.
- *
- * @param {Error} err
- * @api private
- */
-
-Runner.prototype.uncaught = function(err){
- if (err) {
- debug('uncaught exception %s', err !== function () {
- return this;
- }.call(err) ? err : ( err.message || err ));
- } else {
- debug('uncaught undefined exception');
- err = utils.undefinedError();
- }
- err.uncaught = true;
-
- var runnable = this.currentRunnable;
- if (!runnable) return;
-
- runnable.clearTimeout();
-
- // Ignore errors if complete
- if (runnable.state) return;
- this.fail(runnable, err);
-
- // recover from test
- if ('test' == runnable.type) {
- this.emit('test end', runnable);
- this.hookUp('afterEach', this.next);
- return;
- }
-
- // bail on hooks
- this.emit('end');
-};
-
-/**
- * Run the root suite and invoke `fn(failures)`
- * on completion.
- *
- * @param {Function} fn
- * @return {Runner} for chaining
- * @api public
- */
-
-Runner.prototype.run = function(fn){
- var self = this,
- rootSuite = this.suite;
-
- fn = fn || function(){};
-
- function uncaught(err){
- self.uncaught(err);
- }
-
- function start() {
- self.emit('start');
- self.runSuite(rootSuite, function(){
- debug('finished running');
- self.emit('end');
- });
- }
-
- debug('start');
-
- // callback
- this.on('end', function(){
- debug('end');
- process.removeListener('uncaughtException', uncaught);
- fn(self.failures);
- });
-
- // uncaught exception
- process.on('uncaughtException', uncaught);
-
- if (this._delay) {
- // for reporters, I guess.
- // might be nice to debounce some dots while we wait.
- this.emit('waiting', rootSuite);
- rootSuite.once('run', start);
- }
- else {
- start();
- }
-
- return this;
-};
-
-/**
- * Cleanly abort execution
- *
- * @return {Runner} for chaining
- * @api public
- */
-Runner.prototype.abort = function(){
- debug('aborting');
- this._abort = true;
-};
-
-/**
- * Filter leaks with the given globals flagged as `ok`.
- *
- * @param {Array} ok
- * @param {Array} globals
- * @return {Array}
- * @api private
- */
-
-function filterLeaks(ok, globals) {
- return filter(globals, function(key){
- // Firefox and Chrome exposes iframes as index inside the window object
- if (/^d+/.test(key)) return false;
-
- // in firefox
- // if runner runs in an iframe, this iframe's window.getInterface method not init at first
- // it is assigned in some seconds
- if (global.navigator && /^getInterface/.test(key)) return false;
-
- // an iframe could be approached by window[iframeIndex]
- // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak
- if (global.navigator && /^\d+/.test(key)) return false;
-
- // Opera and IE expose global variables for HTML element IDs (issue #243)
- if (/^mocha-/.test(key)) return false;
-
- var matched = filter(ok, function(ok){
- if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]);
- return key == ok;
- });
- return matched.length == 0 && (!global.navigator || 'onerror' !== key);
- });
-}
-
-/**
- * Array of globals dependent on the environment.
- *
- * @return {Array}
- * @api private
- */
-
-function extraGlobals() {
- if (typeof(process) === 'object' &&
- typeof(process.version) === 'string') {
-
- var nodeVersion = process.version.split('.').reduce(function(a, v) {
- return a << 8 | v;
- });
-
- // 'errno' was renamed to process._errno in v0.9.11.
-
- if (nodeVersion < 0x00090B) {
- return ['errno'];
- }
- }
-
- return [];
-}
-
-}); // module: runner.js
-
-require.register("suite.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('browser/events').EventEmitter
- , debug = require('browser/debug')('mocha:suite')
- , milliseconds = require('./ms')
- , utils = require('./utils')
- , Hook = require('./hook');
-
-/**
- * Expose `Suite`.
- */
-
-exports = module.exports = Suite;
-
-/**
- * Create a new `Suite` with the given `title`
- * and parent `Suite`. When a suite with the
- * same title is already present, that suite
- * is returned to provide nicer reporter
- * and more flexible meta-testing.
- *
- * @param {Suite} parent
- * @param {String} title
- * @return {Suite}
- * @api public
- */
-
-exports.create = function(parent, title){
- var suite = new Suite(title, parent.ctx);
- suite.parent = parent;
- if (parent.pending) suite.pending = true;
- title = suite.fullTitle();
- parent.addSuite(suite);
- return suite;
-};
-
-/**
- * Initialize a new `Suite` with the given
- * `title` and `ctx`.
- *
- * @param {String} title
- * @param {Context} ctx
- * @api private
- */
-
-function Suite(title, parentContext) {
- this.title = title;
- var context = function() {};
- context.prototype = parentContext;
- this.ctx = new context();
- this.suites = [];
- this.tests = [];
- this.pending = false;
- this._beforeEach = [];
- this._beforeAll = [];
- this._afterEach = [];
- this._afterAll = [];
- this.root = !title;
- this._timeout = 2000;
- this._enableTimeouts = true;
- this._slow = 75;
- this._bail = false;
- this.delayed = false;
-}
-
-/**
- * Inherit from `EventEmitter.prototype`.
- */
-
-function F(){};
-F.prototype = EventEmitter.prototype;
-Suite.prototype = new F;
-Suite.prototype.constructor = Suite;
-
-
-/**
- * Return a clone of this `Suite`.
- *
- * @return {Suite}
- * @api private
- */
-
-Suite.prototype.clone = function(){
- var suite = new Suite(this.title);
- debug('clone');
- suite.ctx = this.ctx;
- suite.timeout(this.timeout());
- suite.enableTimeouts(this.enableTimeouts());
- suite.slow(this.slow());
- suite.bail(this.bail());
- return suite;
-};
-
-/**
- * Set timeout `ms` or short-hand such as "2s".
- *
- * @param {Number|String} ms
- * @return {Suite|Number} for chaining
- * @api private
- */
-
-Suite.prototype.timeout = function(ms){
- if (0 == arguments.length) return this._timeout;
- if (ms.toString() === '0') this._enableTimeouts = false;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('timeout %d', ms);
- this._timeout = parseInt(ms, 10);
- return this;
-};
-
-/**
- * Set timeout `enabled`.
- *
- * @param {Boolean} enabled
- * @return {Suite|Boolean} self or enabled
- * @api private
- */
-
-Suite.prototype.enableTimeouts = function(enabled){
- if (arguments.length === 0) return this._enableTimeouts;
- debug('enableTimeouts %s', enabled);
- this._enableTimeouts = enabled;
- return this;
-};
-
-/**
- * Set slow `ms` or short-hand such as "2s".
- *
- * @param {Number|String} ms
- * @return {Suite|Number} for chaining
- * @api private
- */
-
-Suite.prototype.slow = function(ms){
- if (0 === arguments.length) return this._slow;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('slow %d', ms);
- this._slow = ms;
- return this;
-};
-
-/**
- * Sets whether to bail after first error.
- *
- * @param {Boolean} bail
- * @return {Suite|Number} for chaining
- * @api private
- */
-
-Suite.prototype.bail = function(bail){
- if (0 == arguments.length) return this._bail;
- debug('bail %s', bail);
- this._bail = bail;
- return this;
-};
-
-/**
- * Run `fn(test[, done])` before running tests.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.beforeAll = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"before all" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._beforeAll.push(hook);
- this.emit('beforeAll', hook);
- return this;
-};
-
-/**
- * Run `fn(test[, done])` after running tests.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.afterAll = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"after all" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._afterAll.push(hook);
- this.emit('afterAll', hook);
- return this;
-};
-
-/**
- * Run `fn(test[, done])` before each test case.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.beforeEach = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"before each" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._beforeEach.push(hook);
- this.emit('beforeEach', hook);
- return this;
-};
-
-/**
- * Run `fn(test[, done])` after each test case.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.afterEach = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"after each" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._afterEach.push(hook);
- this.emit('afterEach', hook);
- return this;
-};
-
-/**
- * Add a test `suite`.
- *
- * @param {Suite} suite
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.addSuite = function(suite){
- suite.parent = this;
- suite.timeout(this.timeout());
- suite.enableTimeouts(this.enableTimeouts());
- suite.slow(this.slow());
- suite.bail(this.bail());
- this.suites.push(suite);
- this.emit('suite', suite);
- return this;
-};
-
-/**
- * Add a `test` to this suite.
- *
- * @param {Test} test
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.addTest = function(test){
- test.parent = this;
- test.timeout(this.timeout());
- test.enableTimeouts(this.enableTimeouts());
- test.slow(this.slow());
- test.ctx = this.ctx;
- this.tests.push(test);
- this.emit('test', test);
- return this;
-};
-
-/**
- * Return the full title generated by recursively
- * concatenating the parent's full title.
- *
- * @return {String}
- * @api public
- */
-
-Suite.prototype.fullTitle = function(){
- if (this.parent) {
- var full = this.parent.fullTitle();
- if (full) return full + ' ' + this.title;
- }
- return this.title;
-};
-
-/**
- * Return the total number of tests.
- *
- * @return {Number}
- * @api public
- */
-
-Suite.prototype.total = function(){
- return utils.reduce(this.suites, function(sum, suite){
- return sum + suite.total();
- }, 0) + this.tests.length;
-};
-
-/**
- * Iterates through each suite recursively to find
- * all tests. Applies a function in the format
- * `fn(test)`.
- *
- * @param {Function} fn
- * @return {Suite}
- * @api private
- */
-
-Suite.prototype.eachTest = function(fn){
- utils.forEach(this.tests, fn);
- utils.forEach(this.suites, function(suite){
- suite.eachTest(fn);
- });
- return this;
-};
-
-/**
- * This will run the root suite if we happen to be running in delayed mode.
- */
-Suite.prototype.run = function run() {
- if (this.root) {
- this.emit('run');
- }
-};
-
-}); // module: suite.js
-
-require.register("test.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Runnable = require('./runnable');
-
-/**
- * Expose `Test`.
- */
-
-module.exports = Test;
-
-/**
- * Initialize a new `Test` with the given `title` and callback `fn`.
- *
- * @param {String} title
- * @param {Function} fn
- * @api private
- */
-
-function Test(title, fn) {
- Runnable.call(this, title, fn);
- this.pending = !fn;
- this.type = 'test';
-}
-
-/**
- * Inherit from `Runnable.prototype`.
- */
-
-function F(){};
-F.prototype = Runnable.prototype;
-Test.prototype = new F;
-Test.prototype.constructor = Test;
-
-
-}); // module: test.js
-
-require.register("utils.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var fs = require('browser/fs')
- , path = require('browser/path')
- , basename = path.basename
- , exists = fs.existsSync || path.existsSync
- , glob = require('browser/glob')
- , join = path.join
- , debug = require('browser/debug')('mocha:watch');
-
-/**
- * Ignored directories.
- */
-
-var ignore = ['node_modules', '.git'];
-
-/**
- * Escape special characters in the given string of html.
- *
- * @param {String} html
- * @return {String}
- * @api private
- */
-
-exports.escape = function(html){
- return String(html)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
-};
-
-/**
- * Array#forEach (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @param {Object} scope
- * @api private
- */
-
-exports.forEach = function(arr, fn, scope){
- for (var i = 0, l = arr.length; i < l; i++)
- fn.call(scope, arr[i], i);
-};
-
-/**
- * Array#map (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @param {Object} scope
- * @api private
- */
-
-exports.map = function(arr, fn, scope){
- var result = [];
- for (var i = 0, l = arr.length; i < l; i++)
- result.push(fn.call(scope, arr[i], i, arr));
- return result;
-};
-
-/**
- * Array#indexOf (<=IE8)
- *
- * @parma {Array} arr
- * @param {Object} obj to find index of
- * @param {Number} start
- * @api private
- */
-
-exports.indexOf = function(arr, obj, start){
- for (var i = start || 0, l = arr.length; i < l; i++) {
- if (arr[i] === obj)
- return i;
- }
- return -1;
-};
-
-/**
- * Array#reduce (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @param {Object} initial value
- * @api private
- */
-
-exports.reduce = function(arr, fn, val){
- var rval = val;
-
- for (var i = 0, l = arr.length; i < l; i++) {
- rval = fn(rval, arr[i], i, arr);
- }
-
- return rval;
-};
-
-/**
- * Array#filter (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @api private
- */
-
-exports.filter = function(arr, fn){
- var ret = [];
-
- for (var i = 0, l = arr.length; i < l; i++) {
- var val = arr[i];
- if (fn(val, i, arr)) ret.push(val);
- }
-
- return ret;
-};
-
-/**
- * Object.keys (<=IE8)
- *
- * @param {Object} obj
- * @return {Array} keys
- * @api private
- */
-
-exports.keys = Object.keys || function(obj) {
- var keys = []
- , has = Object.prototype.hasOwnProperty; // for `window` on <=IE8
-
- for (var key in obj) {
- if (has.call(obj, key)) {
- keys.push(key);
- }
- }
-
- return keys;
-};
-
-/**
- * Watch the given `files` for changes
- * and invoke `fn(file)` on modification.
- *
- * @param {Array} files
- * @param {Function} fn
- * @api private
- */
-
-exports.watch = function(files, fn){
- var options = { interval: 100 };
- files.forEach(function(file){
- debug('file %s', file);
- fs.watchFile(file, options, function(curr, prev){
- if (prev.mtime < curr.mtime) fn(file);
- });
- });
-};
-
-/**
- * Array.isArray (<=IE8)
- *
- * @param {Object} obj
- * @return {Boolean}
- * @api private
- */
-var isArray = Array.isArray || function (obj) {
- return '[object Array]' == {}.toString.call(obj);
-};
-
-/**
- * @description
- * Buffer.prototype.toJSON polyfill
- * @type {Function}
- */
-if(typeof Buffer !== 'undefined' && Buffer.prototype) {
- Buffer.prototype.toJSON = Buffer.prototype.toJSON || function () {
- return Array.prototype.slice.call(this, 0);
- };
-}
-
-/**
- * Ignored files.
- */
-
-function ignored(path){
- return !~ignore.indexOf(path);
-}
-
-/**
- * Lookup files in the given `dir`.
- *
- * @return {Array}
- * @api private
- */
-
-exports.files = function(dir, ext, ret){
- ret = ret || [];
- ext = ext || ['js'];
-
- var re = new RegExp('\\.(' + ext.join('|') + ')$');
-
- fs.readdirSync(dir)
- .filter(ignored)
- .forEach(function(path){
- path = join(dir, path);
- if (fs.statSync(path).isDirectory()) {
- exports.files(path, ext, ret);
- } else if (path.match(re)) {
- ret.push(path);
- }
- });
-
- return ret;
-};
-
-/**
- * Compute a slug from the given `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-exports.slug = function(str){
- return str
- .toLowerCase()
- .replace(/ +/g, '-')
- .replace(/[^-\w]/g, '');
-};
-
-/**
- * Strip the function definition from `str`,
- * and re-indent for pre whitespace.
- */
-
-exports.clean = function(str) {
- str = str
- .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '')
- .replace(/^function *\(.*\) *{|\(.*\) *=> *{?/, '')
- .replace(/\s+\}$/, '');
-
- var spaces = str.match(/^\n?( *)/)[1].length
- , tabs = str.match(/^\n?(\t*)/)[1].length
- , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm');
-
- str = str.replace(re, '');
-
- return exports.trim(str);
-};
-
-/**
- * Trim the given `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-exports.trim = function(str){
- return str.replace(/^\s+|\s+$/g, '');
-};
-
-/**
- * Parse the given `qs`.
- *
- * @param {String} qs
- * @return {Object}
- * @api private
- */
-
-exports.parseQuery = function(qs){
- return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){
- var i = pair.indexOf('=')
- , key = pair.slice(0, i)
- , val = pair.slice(++i);
-
- obj[key] = decodeURIComponent(val);
- return obj;
- }, {});
-};
-
-/**
- * Highlight the given string of `js`.
- *
- * @param {String} js
- * @return {String}
- * @api private
- */
-
-function highlight(js) {
- return js
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/\/\/(.*)/gm, '<span class="comment">//$1</span>')
- .replace(/('.*?')/gm, '<span class="string">$1</span>')
- .replace(/(\d+\.\d+)/gm, '<span class="number">$1</span>')
- .replace(/(\d+)/gm, '<span class="number">$1</span>')
- .replace(/\bnew[ \t]+(\w+)/gm, '<span class="keyword">new</span> <span class="init">$1</span>')
- .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '<span class="keyword">$1</span>')
-}
-
-/**
- * Highlight the contents of tag `name`.
- *
- * @param {String} name
- * @api private
- */
-
-exports.highlightTags = function(name) {
- var code = document.getElementById('mocha').getElementsByTagName(name);
- for (var i = 0, len = code.length; i < len; ++i) {
- code[i].innerHTML = highlight(code[i].innerHTML);
- }
-};
-
-/**
- * If a value could have properties, and has none, this function is called, which returns
- * a string representation of the empty value.
- *
- * Functions w/ no properties return `'[Function]'`
- * Arrays w/ length === 0 return `'[]'`
- * Objects w/ no properties return `'{}'`
- * All else: return result of `value.toString()`
- *
- * @param {*} value Value to inspect
- * @param {string} [type] The type of the value, if known.
- * @returns {string}
- */
-var emptyRepresentation = function emptyRepresentation(value, type) {
- type = type || exports.type(value);
-
- switch(type) {
- case 'function':
- return '[Function]';
- case 'object':
- return '{}';
- case 'array':
- return '[]';
- default:
- return value.toString();
- }
-};
-
-/**
- * Takes some variable and asks `{}.toString()` what it thinks it is.
- * @param {*} value Anything
- * @example
- * type({}) // 'object'
- * type([]) // 'array'
- * type(1) // 'number'
- * type(false) // 'boolean'
- * type(Infinity) // 'number'
- * type(null) // 'null'
- * type(new Date()) // 'date'
- * type(/foo/) // 'regexp'
- * type('type') // 'string'
- * type(global) // 'global'
- * @api private
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
- * @returns {string}
- */
-exports.type = function type(value) {
- if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
- return 'buffer';
- }
- return Object.prototype.toString.call(value)
- .replace(/^\[.+\s(.+?)\]$/, '$1')
- .toLowerCase();
-};
-
-/**
- * @summary Stringify `value`.
- * @description Different behavior depending on type of value.
- * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.
- * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.
- * - If `value` is an *empty* object, function, or array, return result of function
- * {@link emptyRepresentation}.
- * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of
- * JSON.stringify().
- *
- * @see exports.type
- * @param {*} value
- * @return {string}
- * @api private
- */
-
-exports.stringify = function(value) {
- var type = exports.type(value);
-
- if (!~exports.indexOf(['object', 'array', 'function'], type)) {
- if(type != 'buffer') {
- return jsonStringify(value);
- }
- var json = value.toJSON();
- // Based on the toJSON result
- return jsonStringify(json.data && json.type ? json.data : json, 2)
- .replace(/,(\n|$)/g, '$1');
- }
-
- for (var prop in value) {
- if (Object.prototype.hasOwnProperty.call(value, prop)) {
- return jsonStringify(exports.canonicalize(value), 2).replace(/,(\n|$)/g, '$1');
- }
- }
-
- return emptyRepresentation(value, type);
-};
-
-/**
- * @description
- * like JSON.stringify but more sense.
- * @param {Object} object
- * @param {Number=} spaces
- * @param {number=} depth
- * @returns {*}
- * @private
- */
-function jsonStringify(object, spaces, depth) {
- if(typeof spaces == 'undefined') return _stringify(object); // primitive types
-
- depth = depth || 1;
- var space = spaces * depth
- , str = isArray(object) ? '[' : '{'
- , end = isArray(object) ? ']' : '}'
- , length = object.length || exports.keys(object).length
- , repeat = function(s, n) { return new Array(n).join(s); }; // `.repeat()` polyfill
-
- function _stringify(val) {
- switch (exports.type(val)) {
- case 'null':
- case 'undefined':
- val = '[' + val + ']';
- break;
- case 'array':
- case 'object':
- val = jsonStringify(val, spaces, depth + 1);
- break;
- case 'boolean':
- case 'regexp':
- case 'number':
- val = val === 0 && (1/val) === -Infinity // `-0`
- ? '-0'
- : val.toString();
- break;
- case 'date':
- val = '[Date: ' + val.toISOString() + ']';
- break;
- case 'buffer':
- var json = val.toJSON();
- // Based on the toJSON result
- json = json.data && json.type ? json.data : json;
- val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
- break;
- default:
- val = (val == '[Function]' || val == '[Circular]')
- ? val
- : '"' + val + '"'; //string
- }
- return val;
- }
-
- for(var i in object) {
- if(!object.hasOwnProperty(i)) continue; // not my business
- --length;
- str += '\n ' + repeat(' ', space)
- + (isArray(object) ? '' : '"' + i + '": ') // key
- + _stringify(object[i]) // value
- + (length ? ',' : ''); // comma
- }
-
- return str + (str.length != 1 // [], {}
- ? '\n' + repeat(' ', --space) + end
- : end);
-}
-
-/**
- * Return if obj is a Buffer
- * @param {Object} arg
- * @return {Boolean}
- * @api private
- */
-exports.isBuffer = function (arg) {
- return typeof Buffer !== 'undefined' && Buffer.isBuffer(arg);
-};
-
-/**
- * @summary Return a new Thing that has the keys in sorted order. Recursive.
- * @description If the Thing...
- * - has already been seen, return string `'[Circular]'`
- * - is `undefined`, return string `'[undefined]'`
- * - is `null`, return value `null`
- * - is some other primitive, return the value
- * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method
- * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.
- * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()`
- *
- * @param {*} value Thing to inspect. May or may not have properties.
- * @param {Array} [stack=[]] Stack of seen values
- * @return {(Object|Array|Function|string|undefined)}
- * @see {@link exports.stringify}
- * @api private
- */
-
-exports.canonicalize = function(value, stack) {
- var canonicalizedObj,
- type = exports.type(value),
- prop,
- withStack = function withStack(value, fn) {
- stack.push(value);
- fn();
- stack.pop();
- };
-
- stack = stack || [];
-
- if (exports.indexOf(stack, value) !== -1) {
- return '[Circular]';
- }
-
- switch(type) {
- case 'undefined':
- case 'buffer':
- case 'null':
- canonicalizedObj = value;
- break;
- case 'array':
- withStack(value, function () {
- canonicalizedObj = exports.map(value, function (item) {
- return exports.canonicalize(item, stack);
- });
- });
- break;
- case 'function':
- for (prop in value) {
- canonicalizedObj = {};
- break;
- }
- if (!canonicalizedObj) {
- canonicalizedObj = emptyRepresentation(value, type);
- break;
- }
- /* falls through */
- case 'object':
- canonicalizedObj = canonicalizedObj || {};
- withStack(value, function () {
- exports.forEach(exports.keys(value).sort(), function (key) {
- canonicalizedObj[key] = exports.canonicalize(value[key], stack);
- });
- });
- break;
- case 'date':
- case 'number':
- case 'regexp':
- case 'boolean':
- canonicalizedObj = value;
- break;
- default:
- canonicalizedObj = value.toString();
- }
-
- return canonicalizedObj;
-};
-
-/**
- * Lookup file names at the given `path`.
- */
-exports.lookupFiles = function lookupFiles(path, extensions, recursive) {
- var files = [];
- var re = new RegExp('\\.(' + extensions.join('|') + ')$');
-
- if (!exists(path)) {
- if (exists(path + '.js')) {
- path += '.js';
- } else {
- files = glob.sync(path);
- if (!files.length) throw new Error("cannot resolve path (or pattern) '" + path + "'");
- return files;
- }
- }
-
- try {
- var stat = fs.statSync(path);
- if (stat.isFile()) return path;
- }
- catch (ignored) {
- return;
- }
-
- fs.readdirSync(path).forEach(function(file) {
- file = join(path, file);
- try {
- var stat = fs.statSync(file);
- if (stat.isDirectory()) {
- if (recursive) {
- files = files.concat(lookupFiles(file, extensions, recursive));
- }
- return;
- }
- }
- catch (ignored) {
- return;
- }
- if (!stat.isFile() || !re.test(file) || basename(file)[0] === '.') return;
- files.push(file);
- });
-
- return files;
-};
-
-/**
- * Generate an undefined error with a message warning the user.
- *
- * @return {Error}
- */
-
-exports.undefinedError = function() {
- return new Error('Caught undefined error, did you throw without specifying what?');
-};
-
-/**
- * Generate an undefined error if `err` is not defined.
- *
- * @param {Error} err
- * @return {Error}
- */
-
-exports.getError = function(err) {
- return err || exports.undefinedError();
-};
-
-
-/**
- * @summary
- * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`)
- * @description
- * When invoking this function you get a filter function that get the Error.stack as an input,
- * and return a prettify output.
- * (i.e: strip Mocha, node_modules, bower and componentJS from stack trace).
- * @returns {Function}
- */
-
-exports.stackTraceFilter = function() {
- var slash = '/'
- , is = typeof document === 'undefined'
- ? { node: true }
- : { browser: true }
- , cwd = is.node
- ? process.cwd() + slash
- : location.href.replace(/\/[^\/]*$/, '/');
-
- function isNodeModule (line) {
- return (~line.indexOf('node_modules'));
- }
-
- function isMochaInternal (line) {
- return (~line.indexOf('node_modules' + slash + 'mocha')) ||
- (~line.indexOf('components' + slash + 'mochajs')) ||
- (~line.indexOf('components' + slash + 'mocha'));
- }
-
- // node_modules, bower, componentJS
- function isBrowserModule(line) {
- return (~line.indexOf('node_modules')) ||
- (~line.indexOf('components'));
- }
-
- function isNodeInternal (line) {
- return (~line.indexOf('(timers.js:')) ||
- (~line.indexOf('(events.js:')) ||
- (~line.indexOf('(node.js:')) ||
- (~line.indexOf('(module.js:')) ||
- (~line.indexOf('GeneratorFunctionPrototype.next (native)')) ||
- false
- }
-
- return function(stack) {
- stack = stack.split('\n');
-
- stack = stack.reduce(function (list, line) {
- if (is.node && (isNodeModule(line) ||
- isMochaInternal(line) ||
- isNodeInternal(line)))
- return list;
-
- if (is.browser && (isBrowserModule(line)))
- return list;
-
- // Clean up cwd(absolute)
- list.push(line.replace(cwd, ''));
- return list;
- }, []);
-
- return stack.join('\n');
- }
-};
-}); // module: utils.js
-// The global object is "self" in Web Workers.
-var global = (function() { return this; })();
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date;
-var setTimeout = global.setTimeout;
-var setInterval = global.setInterval;
-var clearTimeout = global.clearTimeout;
-var clearInterval = global.clearInterval;
-
-/**
- * Node shims.
- *
- * These are meant only to allow
- * mocha.js to run untouched, not
- * to allow running node code in
- * the browser.
- */
-
-var process = {};
-process.exit = function(status){};
-process.stdout = {};
-
-var uncaughtExceptionHandlers = [];
-
-var originalOnerrorHandler = global.onerror;
-
-/**
- * Remove uncaughtException listener.
- * Revert to original onerror handler if previously defined.
- */
-
-process.removeListener = function(e, fn){
- if ('uncaughtException' == e) {
- if (originalOnerrorHandler) {
- global.onerror = originalOnerrorHandler;
- } else {
- global.onerror = function() {};
- }
- var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn);
- if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }
- }
-};
-
-/**
- * Implements uncaughtException listener.
- */
-
-process.on = function(e, fn){
- if ('uncaughtException' == e) {
- global.onerror = function(err, url, line){
- fn(new Error(err + ' (' + url + ':' + line + ')'));
- return true;
- };
- uncaughtExceptionHandlers.push(fn);
- }
-};
-
-/**
- * Expose mocha.
- */
-
-var Mocha = global.Mocha = require('mocha'),
- mocha = global.mocha = new Mocha({ reporter: 'html' });
-
-// The BDD UI is registered by default, but no UI will be functional in the
-// browser without an explicit call to the overridden `mocha.ui` (see below).
-// Ensure that this default UI does not expose its methods to the global scope.
-mocha.suite.removeAllListeners('pre-require');
-
-var immediateQueue = []
- , immediateTimeout;
-
-function timeslice() {
- var immediateStart = new Date().getTime();
- while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) {
- immediateQueue.shift()();
- }
- if (immediateQueue.length) {
- immediateTimeout = setTimeout(timeslice, 0);
- } else {
- immediateTimeout = null;
- }
-}
-
-/**
- * High-performance override of Runner.immediately.
- */
-
-Mocha.Runner.immediately = function(callback) {
- immediateQueue.push(callback);
- if (!immediateTimeout) {
- immediateTimeout = setTimeout(timeslice, 0);
- }
-};
-
-/**
- * Function to allow assertion libraries to throw errors directly into mocha.
- * This is useful when running tests in a browser because window.onerror will
- * only receive the 'message' attribute of the Error.
- */
-mocha.throwError = function(err) {
- Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) {
- fn(err);
- });
- throw err;
-};
-
-/**
- * Override ui to ensure that the ui functions are initialized.
- * Normally this would happen in Mocha.prototype.loadFiles.
- */
-
-mocha.ui = function(ui){
- Mocha.prototype.ui.call(this, ui);
- this.suite.emit('pre-require', global, null, this);
- return this;
-};
-
-/**
- * Setup mocha with the given setting options.
- */
-
-mocha.setup = function(opts){
- if ('string' == typeof opts) opts = { ui: opts };
- for (var opt in opts) {
- if (opts.hasOwnProperty(opt)) {
- this[opt](opts[opt]);
- }
- }
- return this;
-};
-
-/**
- * Run mocha, returning the Runner.
- */
-
-mocha.run = function(fn){
- var options = mocha.options;
- mocha.globals('location');
-
- var query = Mocha.utils.parseQuery(global.location.search || '');
- if (query.grep) mocha.grep(new RegExp(query.grep));
- if (query.fgrep) mocha.grep(query.fgrep);
- if (query.invert) mocha.invert();
-
- return Mocha.prototype.run.call(mocha, function(err){
- // The DOM Document is not available in Web Workers.
- var document = global.document;
- if (document && document.getElementById('mocha') && options.noHighlighting !== true) {
- Mocha.utils.highlightTags('code');
- }
- if (fn) fn(err);
- });
-};
-
-/**
- * Expose the process shim.
- */
-
-Mocha.process = process;
-})();
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/README.chromium b/chromium/third_party/catapult/tracing/third_party/symbols/README.chromium
deleted file mode 100644
index b50ed33a8e4..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/README.chromium
+++ /dev/null
@@ -1,21 +0,0 @@
-Name: symbols module from Chromium
-URL: https://chromium.googlesource.com/chromium/src.git
-License: BSD
-
-Description:
-
-Originally added to src/build/android/pylib/symbols by Primiano Tucci:
-
-commit eb3ad0de43537c5bff297326b11b121c77cc18e6
-Author: primiano@chromium.org
-Date: Mon Feb 24 19:23:59 2014 +0000
-
- Add fast ELF Symbolizer to memory_inspector.
-
- This CL introduces a multiprocess, pipelined and asynchronous ELF
- symbolizer (based on addr2line) which gives honor to a bulkly workstation
- when symbolizing large batches of symbols.
-
- BUG=340294,339059
-
- Review URL: https://codereview.chromium.org/167893009
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/PRESUBMIT.py b/chromium/third_party/catapult/tracing/third_party/symbols/symbols/PRESUBMIT.py
deleted file mode 100644
index b4d94ae225b..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/PRESUBMIT.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-def CommonChecks(input_api, output_api):
- output = []
- output.extend(input_api.canned_checks.RunPylint(input_api, output_api))
- output.extend(input_api.canned_checks.RunUnitTestsInDirectory(
- input_api,
- output_api,
- input_api.PresubmitLocalPath(),
- whitelist=[r'^.+_unittest\.py$']))
- return output
-
-
-def CheckChangeOnUpload(input_api, output_api):
- return CommonChecks(input_api, output_api)
-
-
-def CheckChangeOnCommit(input_api, output_api):
- return CommonChecks(input_api, output_api) \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/__init__.py b/chromium/third_party/catapult/tracing/third_party/symbols/symbols/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/__init__.py
+++ /dev/null
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer.py b/chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer.py
deleted file mode 100644
index 374063a57f8..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer.py
+++ /dev/null
@@ -1,467 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import collections
-import datetime
-import logging
-import multiprocessing
-import os
-import posixpath
-import Queue
-import re
-import subprocess
-import sys
-import threading
-import time
-
-
-# addr2line builds a possibly infinite memory cache that can exhaust
-# the computer's memory if allowed to grow for too long. This constant
-# controls how many lookups we do before restarting the process. 4000
-# gives near peak performance without extreme memory usage.
-ADDR2LINE_RECYCLE_LIMIT = 4000
-
-
-class ELFSymbolizer(object):
- """An uber-fast (multiprocessing, pipelined and asynchronous) ELF symbolizer.
-
- This class is a frontend for addr2line (part of GNU binutils), designed to
- symbolize batches of large numbers of symbols for a given ELF file. It
- supports sharding symbolization against many addr2line instances and
- pipelining of multiple requests per each instance (in order to hide addr2line
- internals and OS pipe latencies).
-
- The interface exhibited by this class is a very simple asynchronous interface,
- which is based on the following three methods:
- - SymbolizeAsync(): used to request (enqueue) resolution of a given address.
- - The |callback| method: used to communicated back the symbol information.
- - Join(): called to conclude the batch to gather the last outstanding results.
- In essence, before the Join method returns, this class will have issued as
- many callbacks as the number of SymbolizeAsync() calls. In this regard, note
- that due to multiprocess sharding, callbacks can be delivered out of order.
-
- Some background about addr2line:
- - it is invoked passing the elf path in the cmdline, piping the addresses in
- its stdin and getting results on its stdout.
- - it has pretty large response times for the first requests, but it
- works very well in streaming mode once it has been warmed up.
- - it doesn't scale by itself (on more cores). However, spawning multiple
- instances at the same time on the same file is pretty efficient as they
- keep hitting the pagecache and become mostly CPU bound.
- - it might hang or crash, mostly for OOM. This class deals with both of these
- problems.
-
- Despite the "scary" imports and the multi* words above, (almost) no multi-
- threading/processing is involved from the python viewpoint. Concurrency
- here is achieved by spawning several addr2line subprocesses and handling their
- output pipes asynchronously. Therefore, all the code here (with the exception
- of the Queue instance in Addr2Line) should be free from mind-blowing
- thread-safety concerns.
-
- The multiprocess sharding works as follows:
- The symbolizer tries to use the lowest number of addr2line instances as
- possible (with respect of |max_concurrent_jobs|) and enqueue all the requests
- in a single addr2line instance. For few symbols (i.e. dozens) sharding isn't
- worth the startup cost.
- The multiprocess logic kicks in as soon as the queues for the existing
- instances grow. Specifically, once all the existing instances reach the
- |max_queue_size| bound, a new addr2line instance is kicked in.
- In the case of a very eager producer (i.e. all |max_concurrent_jobs| instances
- have a backlog of |max_queue_size|), back-pressure is applied on the caller by
- blocking the SymbolizeAsync method.
-
- This module has been deliberately designed to be dependency free (w.r.t. of
- other modules in this project), to allow easy reuse in external projects.
- """
-
- def __init__(self, elf_file_path, addr2line_path, callback, inlines=False,
- max_concurrent_jobs=None, addr2line_timeout=30, max_queue_size=50,
- source_root_path=None, strip_base_path=None):
- """Args:
- elf_file_path: path of the elf file to be symbolized.
- addr2line_path: path of the toolchain's addr2line binary.
- callback: a callback which will be invoked for each resolved symbol with
- the two args (sym_info, callback_arg). The former is an instance of
- |ELFSymbolInfo| and contains the symbol information. The latter is an
- embedder-provided argument which is passed to SymbolizeAsync().
- inlines: when True, the ELFSymbolInfo will contain also the details about
- the outer inlining functions. When False, only the innermost function
- will be provided.
- max_concurrent_jobs: Max number of addr2line instances spawned.
- Parallelize responsibly, addr2line is a memory and I/O monster.
- max_queue_size: Max number of outstanding requests per addr2line instance.
- addr2line_timeout: Max time (in seconds) to wait for a addr2line response.
- After the timeout, the instance will be considered hung and respawned.
- source_root_path: In some toolchains only the name of the source file is
- is output, without any path information; disambiguation searches
- through the source directory specified by |source_root_path| argument
- for files whose name matches, adding the full path information to the
- output. For example, if the toolchain outputs "unicode.cc" and there
- is a file called "unicode.cc" located under |source_root_path|/foo,
- the tool will replace "unicode.cc" with
- "|source_root_path|/foo/unicode.cc". If there are multiple files with
- the same name, disambiguation will fail because the tool cannot
- determine which of the files was the source of the symbol.
- strip_base_path: Rebases the symbols source paths onto |source_root_path|
- (i.e replace |strip_base_path| with |source_root_path).
- """
- assert(os.path.isfile(addr2line_path)), 'Cannot find ' + addr2line_path
- self.elf_file_path = elf_file_path
- self.addr2line_path = addr2line_path
- self.callback = callback
- self.inlines = inlines
- self.max_concurrent_jobs = (max_concurrent_jobs or
- min(multiprocessing.cpu_count(), 4))
- self.max_queue_size = max_queue_size
- self.addr2line_timeout = addr2line_timeout
- self.requests_counter = 0 # For generating monotonic request IDs.
- self._a2l_instances = [] # Up to |max_concurrent_jobs| _Addr2Line inst.
-
- # If necessary, create disambiguation lookup table
- self.disambiguate = source_root_path is not None
- self.disambiguation_table = {}
- self.strip_base_path = strip_base_path
- if(self.disambiguate):
- self.source_root_path = os.path.abspath(source_root_path)
- self._CreateDisambiguationTable()
-
- # Create one addr2line instance. More instances will be created on demand
- # (up to |max_concurrent_jobs|) depending on the rate of the requests.
- self._CreateNewA2LInstance()
-
- def SymbolizeAsync(self, addr, callback_arg=None):
- """Requests symbolization of a given address.
-
- This method is not guaranteed to return immediately. It generally does, but
- in some scenarios (e.g. all addr2line instances have full queues) it can
- block to create back-pressure.
-
- Args:
- addr: address to symbolize.
- callback_arg: optional argument which will be passed to the |callback|."""
- assert(isinstance(addr, int))
-
- # Process all the symbols that have been resolved in the meanwhile.
- # Essentially, this drains all the addr2line(s) out queues.
- for a2l_to_purge in self._a2l_instances:
- a2l_to_purge.ProcessAllResolvedSymbolsInQueue()
- a2l_to_purge.RecycleIfNecessary()
-
- # Find the best instance according to this logic:
- # 1. Find an existing instance with the shortest queue.
- # 2. If all of instances' queues are full, but there is room in the pool,
- # (i.e. < |max_concurrent_jobs|) create a new instance.
- # 3. If there were already |max_concurrent_jobs| instances and all of them
- # had full queues, make back-pressure.
-
- # 1.
- def _SortByQueueSizeAndReqID(a2l):
- return (a2l.queue_size, a2l.first_request_id)
- a2l = min(self._a2l_instances, key=_SortByQueueSizeAndReqID)
-
- # 2.
- if (a2l.queue_size >= self.max_queue_size and
- len(self._a2l_instances) < self.max_concurrent_jobs):
- a2l = self._CreateNewA2LInstance()
-
- # 3.
- if a2l.queue_size >= self.max_queue_size:
- a2l.WaitForNextSymbolInQueue()
-
- a2l.EnqueueRequest(addr, callback_arg)
-
- def Join(self):
- """Waits for all the outstanding requests to complete and terminates."""
- for a2l in self._a2l_instances:
- a2l.WaitForIdle()
- a2l.Terminate()
-
- def _CreateNewA2LInstance(self):
- assert(len(self._a2l_instances) < self.max_concurrent_jobs)
- a2l = ELFSymbolizer.Addr2Line(self)
- self._a2l_instances.append(a2l)
- return a2l
-
- def _CreateDisambiguationTable(self):
- """ Non-unique file names will result in None entries"""
- start_time = time.time()
- logging.info('Collecting information about available source files...')
- self.disambiguation_table = {}
-
- for root, _, filenames in os.walk(self.source_root_path):
- for f in filenames:
- self.disambiguation_table[f] = os.path.join(root, f) if (f not in
- self.disambiguation_table) else None
- logging.info('Finished collecting information about '
- 'possible files (took %.1f s).',
- (time.time() - start_time))
-
-
- class Addr2Line(object):
- """A python wrapper around an addr2line instance.
-
- The communication with the addr2line process looks as follows:
- [STDIN] [STDOUT] (from addr2line's viewpoint)
- > f001111
- > f002222
- < Symbol::Name(foo, bar) for f001111
- < /path/to/source/file.c:line_number
- > f003333
- < Symbol::Name2() for f002222
- < /path/to/source/file.c:line_number
- < Symbol::Name3() for f003333
- < /path/to/source/file.c:line_number
- """
-
- SYM_ADDR_RE = re.compile(r'([^:]+):(\?|\d+).*')
-
- def __init__(self, symbolizer):
- self._symbolizer = symbolizer
- self._lib_file_name = posixpath.basename(symbolizer.elf_file_path)
-
- # The request queue (i.e. addresses pushed to addr2line's stdin and not
- # yet retrieved on stdout)
- self._request_queue = collections.deque()
-
- # This is essentially len(self._request_queue). It has been optimized to a
- # separate field because turned out to be a perf hot-spot.
- self.queue_size = 0
-
- # Keep track of the number of symbols a process has processed to
- # avoid a single process growing too big and using all the memory.
- self._processed_symbols_count = 0
-
- # Objects required to handle the addr2line subprocess.
- self._proc = None # Subprocess.Popen(...) instance.
- self._thread = None # Threading.thread instance.
- self._out_queue = None # Queue.Queue instance (for buffering a2l stdout).
- self._RestartAddr2LineProcess()
-
- def EnqueueRequest(self, addr, callback_arg):
- """Pushes an address to addr2line's stdin (and keeps track of it)."""
- self._symbolizer.requests_counter += 1 # For global "age" of requests.
- req_idx = self._symbolizer.requests_counter
- self._request_queue.append((addr, callback_arg, req_idx))
- self.queue_size += 1
- self._WriteToA2lStdin(addr)
-
- def WaitForIdle(self):
- """Waits until all the pending requests have been symbolized."""
- while self.queue_size > 0:
- self.WaitForNextSymbolInQueue()
-
- def WaitForNextSymbolInQueue(self):
- """Waits for the next pending request to be symbolized."""
- if not self.queue_size:
- return
-
- # This outer loop guards against a2l hanging (detecting stdout timeout).
- while True:
- start_time = datetime.datetime.now()
- timeout = datetime.timedelta(seconds=self._symbolizer.addr2line_timeout)
-
- # The inner loop guards against a2l crashing (checking if it exited).
- while (datetime.datetime.now() - start_time < timeout):
- # poll() returns !None if the process exited. a2l should never exit.
- if self._proc.poll():
- logging.warning('addr2line crashed, respawning (lib: %s).' %
- self._lib_file_name)
- self._RestartAddr2LineProcess()
- # TODO(primiano): the best thing to do in this case would be
- # shrinking the pool size as, very likely, addr2line is crashed
- # due to low memory (and the respawned one will die again soon).
-
- try:
- lines = self._out_queue.get(block=True, timeout=0.25)
- except Queue.Empty:
- # On timeout (1/4 s.) repeat the inner loop and check if either the
- # addr2line process did crash or we waited its output for too long.
- continue
-
- # In nominal conditions, we get straight to this point.
- self._ProcessSymbolOutput(lines)
- return
-
- # If this point is reached, we waited more than |addr2line_timeout|.
- logging.warning('Hung addr2line process, respawning (lib: %s).' %
- self._lib_file_name)
- self._RestartAddr2LineProcess()
-
- def ProcessAllResolvedSymbolsInQueue(self):
- """Consumes all the addr2line output lines produced (without blocking)."""
- if not self.queue_size:
- return
- while True:
- try:
- lines = self._out_queue.get_nowait()
- except Queue.Empty:
- break
- self._ProcessSymbolOutput(lines)
-
- def RecycleIfNecessary(self):
- """Restarts the process if it has been used for too long.
-
- A long running addr2line process will consume excessive amounts
- of memory without any gain in performance."""
- if self._processed_symbols_count >= ADDR2LINE_RECYCLE_LIMIT:
- self._RestartAddr2LineProcess()
-
-
- def Terminate(self):
- """Kills the underlying addr2line process.
-
- The poller |_thread| will terminate as well due to the broken pipe."""
- try:
- self._proc.kill()
- self._proc.communicate() # Essentially wait() without risking deadlock.
- except Exception: # An exception while terminating? How interesting.
- pass
- self._proc = None
-
- def _WriteToA2lStdin(self, addr):
- self._proc.stdin.write('%s\n' % hex(addr))
- if self._symbolizer.inlines:
- # In the case of inlines we output an extra blank line, which causes
- # addr2line to emit a (??,??:0) tuple that we use as a boundary marker.
- self._proc.stdin.write('\n')
- self._proc.stdin.flush()
-
- def _ProcessSymbolOutput(self, lines):
- """Parses an addr2line symbol output and triggers the client callback."""
- (_, callback_arg, _) = self._request_queue.popleft()
- self.queue_size -= 1
-
- innermost_sym_info = None
- sym_info = None
- for (line1, line2) in lines:
- prev_sym_info = sym_info
- name = line1 if not line1.startswith('?') else None
- source_path = None
- source_line = None
- m = ELFSymbolizer.Addr2Line.SYM_ADDR_RE.match(line2)
- if m:
- if not m.group(1).startswith('?'):
- source_path = m.group(1)
- if not m.group(2).startswith('?'):
- source_line = int(m.group(2))
- else:
- logging.warning('Got invalid symbol path from addr2line: %s' % line2)
-
- # In case disambiguation is on, and needed
- was_ambiguous = False
- disambiguated = False
- if self._symbolizer.disambiguate:
- if source_path and not posixpath.isabs(source_path):
- path = self._symbolizer.disambiguation_table.get(source_path)
- was_ambiguous = True
- disambiguated = path is not None
- source_path = path if disambiguated else source_path
-
- # Use absolute paths (so that paths are consistent, as disambiguation
- # uses absolute paths)
- if source_path and not was_ambiguous:
- source_path = os.path.abspath(source_path)
-
- if source_path and self._symbolizer.strip_base_path:
- # Strip the base path
- source_path = re.sub('^' + self._symbolizer.strip_base_path,
- self._symbolizer.source_root_path or '', source_path)
-
- sym_info = ELFSymbolInfo(name, source_path, source_line, was_ambiguous,
- disambiguated)
- if prev_sym_info:
- prev_sym_info.inlined_by = sym_info
- if not innermost_sym_info:
- innermost_sym_info = sym_info
-
- self._processed_symbols_count += 1
- self._symbolizer.callback(innermost_sym_info, callback_arg)
-
- def _RestartAddr2LineProcess(self):
- if self._proc:
- self.Terminate()
-
- # The only reason of existence of this Queue (and the corresponding
- # Thread below) is the lack of a subprocess.stdout.poll_avail_lines().
- # Essentially this is a pipe able to extract a couple of lines atomically.
- self._out_queue = Queue.Queue()
-
- # Start the underlying addr2line process in line buffered mode.
-
- cmd = [self._symbolizer.addr2line_path, '--functions', '--demangle',
- '--exe=' + self._symbolizer.elf_file_path]
- if self._symbolizer.inlines:
- cmd += ['--inlines']
- self._proc = subprocess.Popen(cmd, bufsize=1, stdout=subprocess.PIPE,
- stdin=subprocess.PIPE, stderr=sys.stderr, close_fds=True)
-
- # Start the poller thread, which simply moves atomically the lines read
- # from the addr2line's stdout to the |_out_queue|.
- self._thread = threading.Thread(
- target=ELFSymbolizer.Addr2Line.StdoutReaderThread,
- args=(self._proc.stdout, self._out_queue, self._symbolizer.inlines))
- self._thread.daemon = True # Don't prevent early process exit.
- self._thread.start()
-
- self._processed_symbols_count = 0
-
- # Replay the pending requests on the new process (only for the case
- # of a hung addr2line timing out during the game).
- for (addr, _, _) in self._request_queue:
- self._WriteToA2lStdin(addr)
-
- @staticmethod
- def StdoutReaderThread(process_pipe, queue, inlines):
- """The poller thread fn, which moves the addr2line stdout to the |queue|.
-
- This is the only piece of code not running on the main thread. It merely
- writes to a Queue, which is thread-safe. In the case of inlines, it
- detects the ??,??:0 marker and sends the lines atomically, such that the
- main thread always receives all the lines corresponding to one symbol in
- one shot."""
- try:
- lines_for_one_symbol = []
- while True:
- line1 = process_pipe.readline().rstrip('\r\n')
- line2 = process_pipe.readline().rstrip('\r\n')
- if not line1 or not line2:
- break
- inline_has_more_lines = inlines and (len(lines_for_one_symbol) == 0 or
- (line1 != '??' and line2 != '??:0'))
- if not inlines or inline_has_more_lines:
- lines_for_one_symbol += [(line1, line2)]
- if inline_has_more_lines:
- continue
- queue.put(lines_for_one_symbol)
- lines_for_one_symbol = []
- process_pipe.close()
-
- # Every addr2line processes will die at some point, please die silently.
- except (IOError, OSError):
- pass
-
- @property
- def first_request_id(self):
- """Returns the request_id of the oldest pending request in the queue."""
- return self._request_queue[0][2] if self._request_queue else 0
-
-
-class ELFSymbolInfo(object):
- """The result of the symbolization passed as first arg. of each callback."""
-
- def __init__(self, name, source_path, source_line, was_ambiguous=False,
- disambiguated=False):
- """All the fields here can be None (if addr2line replies with '??')."""
- self.name = name
- self.source_path = source_path
- self.source_line = source_line
- # In the case of |inlines|=True, the |inlined_by| points to the outer
- # function inlining the current one (and so on, to form a chain).
- self.inlined_by = None
- self.disambiguated = disambiguated
- self.was_ambiguous = was_ambiguous
-
- def __str__(self):
- return '%s [%s:%d]' % (
- self.name or '??', self.source_path or '??', self.source_line or 0)
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer_unittest.py b/chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer_unittest.py
deleted file mode 100755
index d7978aba0f8..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/elf_symbolizer_unittest.py
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import functools
-import logging
-import os
-import sys
-import unittest
-
-sys.path.insert(0, os.path.dirname(__file__))
-# pylint: disable=relative-import
-import elf_symbolizer
-import mock_addr2line
-
-
-_MOCK_A2L_PATH = os.path.join(os.path.dirname(mock_addr2line.__file__),
- 'mock_addr2line')
-_INCOMPLETE_MOCK_ADDR = 1024 * 1024
-_UNKNOWN_MOCK_ADDR = 2 * 1024 * 1024
-_INLINE_MOCK_ADDR = 3 * 1024 * 1024
-
-
-class ELFSymbolizerTest(unittest.TestCase):
- def setUp(self):
- self._callback = functools.partial(
- ELFSymbolizerTest._SymbolizeCallback, self)
- self._resolved_addresses = set()
- # Mute warnings, we expect them due to the crash/hang tests.
- logging.getLogger().setLevel(logging.ERROR)
-
- def testParallelism1(self):
- self._RunTest(max_concurrent_jobs=1, num_symbols=100)
-
- def testParallelism4(self):
- self._RunTest(max_concurrent_jobs=4, num_symbols=100)
-
- def testParallelism8(self):
- self._RunTest(max_concurrent_jobs=8, num_symbols=100)
-
- def testCrash(self):
- os.environ['MOCK_A2L_CRASH_EVERY'] = '99'
- self._RunTest(max_concurrent_jobs=1, num_symbols=100)
- os.environ['MOCK_A2L_CRASH_EVERY'] = '0'
-
- def testHang(self):
- os.environ['MOCK_A2L_HANG_EVERY'] = '99'
- self._RunTest(max_concurrent_jobs=1, num_symbols=100)
- os.environ['MOCK_A2L_HANG_EVERY'] = '0'
-
- def testInlines(self):
- """Stimulate the inline processing logic."""
- symbolizer = elf_symbolizer.ELFSymbolizer(
- elf_file_path='/path/doesnt/matter/mock_lib1.so',
- addr2line_path=_MOCK_A2L_PATH,
- callback=self._callback,
- inlines=True,
- max_concurrent_jobs=4)
-
- for addr in xrange(1000):
- exp_inline = False
- exp_unknown = False
-
- # First 100 addresses with inlines.
- if addr < 100:
- addr += _INLINE_MOCK_ADDR
- exp_inline = True
-
- # Followed by 100 without inlines.
- elif addr < 200:
- pass
-
- # Followed by 100 interleaved inlines and not inlines.
- elif addr < 300:
- if addr & 1:
- addr += _INLINE_MOCK_ADDR
- exp_inline = True
-
- # Followed by 100 interleaved inlines and unknonwn.
- elif addr < 400:
- if addr & 1:
- addr += _INLINE_MOCK_ADDR
- exp_inline = True
- else:
- addr += _UNKNOWN_MOCK_ADDR
- exp_unknown = True
-
- exp_name = 'mock_sym_for_addr_%d' % addr if not exp_unknown else None
- exp_source_path = 'mock_src/mock_lib1.so.c' if not exp_unknown else None
- exp_source_line = addr if not exp_unknown else None
- cb_arg = (addr, exp_name, exp_source_path, exp_source_line, exp_inline)
- symbolizer.SymbolizeAsync(addr, cb_arg)
-
- symbolizer.Join()
-
- def testIncompleteSyminfo(self):
- """Stimulate the symbol-not-resolved logic."""
- symbolizer = elf_symbolizer.ELFSymbolizer(
- elf_file_path='/path/doesnt/matter/mock_lib1.so',
- addr2line_path=_MOCK_A2L_PATH,
- callback=self._callback,
- max_concurrent_jobs=1)
-
- # Test symbols with valid name but incomplete path.
- addr = _INCOMPLETE_MOCK_ADDR
- exp_name = 'mock_sym_for_addr_%d' % addr
- exp_source_path = None
- exp_source_line = None
- cb_arg = (addr, exp_name, exp_source_path, exp_source_line, False)
- symbolizer.SymbolizeAsync(addr, cb_arg)
-
- # Test symbols with no name or sym info.
- addr = _UNKNOWN_MOCK_ADDR
- exp_name = None
- exp_source_path = None
- exp_source_line = None
- cb_arg = (addr, exp_name, exp_source_path, exp_source_line, False)
- symbolizer.SymbolizeAsync(addr, cb_arg)
-
- symbolizer.Join()
-
- def _RunTest(self, max_concurrent_jobs, num_symbols):
- symbolizer = elf_symbolizer.ELFSymbolizer(
- elf_file_path='/path/doesnt/matter/mock_lib1.so',
- addr2line_path=_MOCK_A2L_PATH,
- callback=self._callback,
- max_concurrent_jobs=max_concurrent_jobs,
- addr2line_timeout=0.5)
-
- for addr in xrange(num_symbols):
- exp_name = 'mock_sym_for_addr_%d' % addr
- exp_source_path = 'mock_src/mock_lib1.so.c'
- exp_source_line = addr
- cb_arg = (addr, exp_name, exp_source_path, exp_source_line, False)
- symbolizer.SymbolizeAsync(addr, cb_arg)
-
- symbolizer.Join()
-
- # Check that all the expected callbacks have been received.
- for addr in xrange(num_symbols):
- self.assertIn(addr, self._resolved_addresses)
- self._resolved_addresses.remove(addr)
-
- # Check for unexpected callbacks.
- self.assertEqual(len(self._resolved_addresses), 0)
-
- def _SymbolizeCallback(self, sym_info, cb_arg):
- self.assertTrue(isinstance(sym_info, elf_symbolizer.ELFSymbolInfo))
- self.assertTrue(isinstance(cb_arg, tuple))
- self.assertEqual(len(cb_arg), 5)
-
- # Unpack expectations from the callback extra argument.
- (addr, exp_name, exp_source_path, exp_source_line, exp_inlines) = cb_arg
- if exp_name is None:
- self.assertIsNone(sym_info.name)
- else:
- self.assertTrue(sym_info.name.startswith(exp_name))
- self.assertEqual(sym_info.source_path, exp_source_path)
- self.assertEqual(sym_info.source_line, exp_source_line)
-
- if exp_inlines:
- self.assertEqual(sym_info.name, exp_name + '_inner')
- self.assertEqual(sym_info.inlined_by.name, exp_name + '_middle')
- self.assertEqual(sym_info.inlined_by.inlined_by.name,
- exp_name + '_outer')
-
- # Check against duplicate callbacks.
- self.assertNotIn(addr, self._resolved_addresses)
- self._resolved_addresses.add(addr)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/__init__.py b/chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/__init__.py
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/__init__.py
+++ /dev/null
diff --git a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/mock_addr2line b/chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/mock_addr2line
deleted file mode 100755
index 5544359ad60..00000000000
--- a/chromium/third_party/catapult/tracing/third_party/symbols/symbols/mock_addr2line/mock_addr2line
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Simple mock for addr2line.
-
-Outputs mock symbol information, with each symbol being a function of the
-original address (so it is easy to double-check consistency in unittests).
-"""
-
-import optparse
-import os
-import posixpath
-import sys
-import time
-
-
-def main(argv):
- parser = optparse.OptionParser()
- parser.add_option('-e', '--exe', dest='exe') # Path of the debug-library.so.
- # Silently swallow the other unnecessary arguments.
- parser.add_option('-C', '--demangle', action='store_true')
- parser.add_option('-f', '--functions', action='store_true')
- parser.add_option('-i', '--inlines', action='store_true')
- options, _ = parser.parse_args(argv[1:])
- lib_file_name = posixpath.basename(options.exe)
- processed_sym_count = 0
- crash_every = int(os.environ.get('MOCK_A2L_CRASH_EVERY', 0))
- hang_every = int(os.environ.get('MOCK_A2L_HANG_EVERY', 0))
-
- while(True):
- line = sys.stdin.readline().rstrip('\r')
- if not line:
- break
-
- # An empty line should generate '??,??:0' (is used as marker for inlines).
- if line == '\n':
- print '??'
- print '??:0'
- sys.stdout.flush()
- continue
-
- addr = int(line, 16)
- processed_sym_count += 1
- if crash_every and processed_sym_count % crash_every == 0:
- sys.exit(1)
- if hang_every and processed_sym_count % hang_every == 0:
- time.sleep(1)
-
- # Addresses < 1M will return good mock symbol information.
- if addr < 1024 * 1024:
- print 'mock_sym_for_addr_%d' % addr
- print 'mock_src/%s.c:%d' % (lib_file_name, addr)
-
- # Addresses 1M <= x < 2M will return symbols with a name but a missing path.
- elif addr < 2 * 1024 * 1024:
- print 'mock_sym_for_addr_%d' % addr
- print '??:0'
-
- # Addresses 2M <= x < 3M will return unknown symbol information.
- elif addr < 3 * 1024 * 1024:
- print '??'
- print '??'
-
- # Addresses 3M <= x < 4M will return inlines.
- elif addr < 4 * 1024 * 1024:
- print 'mock_sym_for_addr_%d_inner' % addr
- print 'mock_src/%s.c:%d' % (lib_file_name, addr)
- print 'mock_sym_for_addr_%d_middle' % addr
- print 'mock_src/%s.c:%d' % (lib_file_name, addr)
- print 'mock_sym_for_addr_%d_outer' % addr
- print 'mock_src/%s.c:%d' % (lib_file_name, addr)
-
- else:
- print 'mock_sym_for_addr_%d' % addr
- print 'mock_src/%s.c:%d' % (lib_file_name, addr)
-
- sys.stdout.flush()
-
-
-if __name__ == '__main__':
- main(sys.argv) \ No newline at end of file
diff --git a/chromium/third_party/catapult/tracing/tracing/__init__.py b/chromium/third_party/catapult/tracing/tracing/__init__.py
deleted file mode 100644
index 76063aae790..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# Copyright (c) 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import tracing_project
-tracing_project.UpdateSysPathIfNeeded()
diff --git a/chromium/third_party/catapult/tracing/tracing/base/base.html b/chromium/third_party/catapult/tracing/tracing/base/base.html
deleted file mode 100644
index 9c9254b6c7f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/base.html
+++ /dev/null
@@ -1,194 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<script>
-'use strict';
-
-/**
- * The global object.
- * @type {!Object}
- * @const
- */
-var global = this;
-
-/** Platform, package, object property, and Event support. */
-this.tr = (function() {
- if (global.tr) {
- console.warn('Base was multiply initialized. First init wins.');
- return global.tr;
- }
-
- /**
- * Builds an object structure for the provided namespace path,
- * ensuring that names that already exist are not overwritten. For
- * example:
- * 'a.b.c' -> a = {};a.b={};a.b.c={};
- * @param {string} name Name of the object that this file defines.
- * @private
- */
- function exportPath(name) {
- var parts = name.split('.');
- var cur = global;
-
- for (var part; parts.length && (part = parts.shift());) {
- if (part in cur) {
- cur = cur[part];
- } else {
- cur = cur[part] = {};
- }
- }
- return cur;
- };
-
- function isExported(name) {
- var parts = name.split('.');
- var cur = global;
-
- for (var part; parts.length && (part = parts.shift());) {
- if (part in cur) {
- cur = cur[part];
- } else {
- return false;
- }
- }
- return true;
- }
-
- function isDefined(name) {
- var parts = name.split('.');
-
- var curObject = global;
-
- for (var i = 0; i < parts.length; i++) {
- var partName = parts[i];
- var nextObject = curObject[partName];
- if (nextObject === undefined)
- return false;
- curObject = nextObject;
- }
- return true;
- }
-
- var panicElement = undefined;
- var rawPanicMessages = [];
- function showPanicElementIfNeeded() {
- if (panicElement)
- return;
-
- var panicOverlay = document.createElement('div');
- panicOverlay.style.backgroundColor = 'white';
- panicOverlay.style.border = '3px solid red';
- panicOverlay.style.boxSizing = 'border-box';
- panicOverlay.style.color = 'black';
- panicOverlay.style.display = '-webkit-flex';
- panicOverlay.style.height = '100%';
- panicOverlay.style.left = 0;
- panicOverlay.style.padding = '8px';
- panicOverlay.style.position = 'fixed';
- panicOverlay.style.top = 0;
- panicOverlay.style.webkitFlexDirection = 'column';
- panicOverlay.style.width = '100%';
-
- panicElement = document.createElement('div');
- panicElement.style.webkitFlex = '1 1 auto';
- panicElement.style.overflow = 'auto';
- panicOverlay.appendChild(panicElement);
-
- if (!document.body) {
- setTimeout(function() {
- document.body.appendChild(panicOverlay);
- }, 150);
- } else {
- document.body.appendChild(panicOverlay);
- }
- }
-
- function showPanic(panicTitle, panicDetails) {
- if (tr.isHeadless) {
- if (panicDetails instanceof Error)
- throw panicDetails;
- throw new Error('Panic: ' + panicTitle + ':\n' + panicDetails);
- }
-
- if (panicDetails instanceof Error)
- panicDetails = panicDetails.stack;
-
- showPanicElementIfNeeded();
- var panicMessageEl = document.createElement('div');
- panicMessageEl.innerHTML =
- '<h2 id="message"></h2>' +
- '<pre id="details"></pre>';
- panicMessageEl.querySelector('#message').textContent = panicTitle;
- panicMessageEl.querySelector('#details').textContent = panicDetails;
- panicElement.appendChild(panicMessageEl);
-
- rawPanicMessages.push({
- title: panicTitle,
- details: panicDetails
- });
- }
-
- function hasPanic() {
- return rawPanicMessages.length !== 0;
- }
- function getPanicText() {
- return rawPanicMessages.map(function(msg) {
- return msg.title;
- }).join(', ');
- }
-
- function exportTo(namespace, fn) {
- var obj = exportPath(namespace);
- var exports = fn();
-
- for (var propertyName in exports) {
- // Maybe we should check the prototype chain here? The current usage
- // pattern is always using an object literal so we only care about own
- // properties.
- var propertyDescriptor = Object.getOwnPropertyDescriptor(exports,
- propertyName);
- if (propertyDescriptor)
- Object.defineProperty(obj, propertyName, propertyDescriptor);
- }
- };
-
- /**
- * Initialization which must be deferred until run-time.
- */
- function initialize() {
- if (global.isVinn) {
- tr.isVinn = true;
- } else if (global.process && global.process.versions.node) {
- tr.isNode = true;
- } else {
- tr.isVinn = false;
- tr.isNode = false;
- tr.doc = document;
-
- tr.isMac = /Mac/.test(navigator.platform);
- tr.isWindows = /Win/.test(navigator.platform);
- tr.isChromeOS = /CrOS/.test(navigator.userAgent);
- tr.isLinux = /Linux/.test(navigator.userAgent);
- }
- tr.isHeadless = tr.isVinn || tr.isNode;
- }
-
- return {
- initialize: initialize,
-
- exportTo: exportTo,
- isExported: isExported,
- isDefined: isDefined,
-
- showPanic: showPanic,
- hasPanic: hasPanic,
- getPanicText: getPanicText
- };
-})();
-
-tr.initialize();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/base64.html b/chromium/third_party/catapult/tracing/tracing/base/base64.html
deleted file mode 100644
index bceb821c49e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/base64.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
-
- function Base64() {
- }
-
- function b64ToUint6(nChr) {
- if (nChr > 64 && nChr < 91)
- return nChr - 65;
- if (nChr > 96 && nChr < 123)
- return nChr - 71;
- if (nChr > 47 && nChr < 58)
- return nChr + 4;
- if (nChr === 43)
- return 62;
- if (nChr === 47)
- return 63;
- return 0;
- }
-
- Base64.getDecodedBufferLength = function(input) {
- return input.length * 3 + 1 >> 2;
- };
-
- Base64.EncodeArrayBufferToString = function(input) {
- // http://stackoverflow.com/questions/9267899/
- var binary = '';
- var bytes = new Uint8Array(input);
- var len = bytes.byteLength;
- for (var i = 0; i < len; i++)
- binary += String.fromCharCode(bytes[i]);
- return btoa(binary);
- };
-
- Base64.DecodeToTypedArray = function(input, output) {
-
- var nInLen = input.length;
- var nOutLen = nInLen * 3 + 1 >> 2;
- var nMod3 = 0;
- var nMod4 = 0;
- var nUint24 = 0;
- var nOutIdx = 0;
-
- if (nOutLen > output.byteLength)
- throw new Error('Output buffer too small to decode.');
-
- for (var nInIdx = 0; nInIdx < nInLen; nInIdx++) {
- nMod4 = nInIdx & 3;
- nUint24 |= b64ToUint6(input.charCodeAt(nInIdx)) << 18 - 6 * nMod4;
- if (nMod4 === 3 || nInLen - nInIdx === 1) {
- for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) {
- output.setUint8(nOutIdx, nUint24 >>> (16 >>> nMod3 & 24) & 255);
- }
- nUint24 = 0;
- }
- }
- return nOutIdx - 1;
- };
-
- /*
- * Wrapper of btoa
- * The reason is that window object has a builtin btoa,
- * but we also want to use btoa when it is headless.
- * For example we want to use it in a mapper
- */
- Base64.btoa = function(input) {
- return btoa(input);
- };
-
- /*
- * Wrapper of atob
- * The reason is that window object has a builtin atob,
- * but we also want to use atob when it is headless.
- * For example we want to use it in a mapper
- */
- Base64.atob = function(input) {
- return atob(input);
- };
-
- return {
- Base64: Base64
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/base64_test.html b/chromium/third_party/catapult/tracing/tracing/base/base64_test.html
deleted file mode 100644
index a2b46d80ad9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/base64_test.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base64.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('getDecodedLength', function() {
- assert.isTrue(tr.b.Base64.getDecodedBufferLength('YQ==') >= 1);
- assert.isTrue(tr.b.Base64.getDecodedBufferLength('YWJjZA==') >= 4);
- assert.isTrue(tr.b.Base64.getDecodedBufferLength('YWJjZGVm') >= 6);
- });
-
- test('DecodeToTypedArray', function() {
- var buffer = new DataView(new ArrayBuffer(256));
- tr.b.Base64.DecodeToTypedArray('YQ==', buffer);
- assert.equal(buffer.getInt8(0), 97);
-
- tr.b.Base64.DecodeToTypedArray('YWJjZA==', buffer);
- for (var i = 0; i < 4; i++)
- assert.equal(buffer.getInt8(i), 97 + i);
-
- tr.b.Base64.DecodeToTypedArray('YWJjZGVm', buffer);
- for (var i = 0; i < 4; i++)
- assert.equal(buffer.getInt8(i), 97 + i);
- });
-
- test('DecodeLengthReturn', function() {
- var buffer = new DataView(new ArrayBuffer(256));
- var len = tr.b.Base64.DecodeToTypedArray(btoa('hello'), buffer);
- assert.equal(len, 5);
- });
-
- test('Base64.atob', function() {
- var output = tr.b.Base64.atob('aGVsbG8gd29ybGQ=');
- assert.equal(output, 'hello world');
- });
-
- test('Base64.btoa', function() {
- var output = tr.b.Base64.btoa('hello world');
- assert.equal(output, 'aGVsbG8gd29ybGQ=');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/bbox2.html b/chromium/third_party/catapult/tracing/tracing/base/bbox2.html
deleted file mode 100644
index 639a7a3e9f3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/bbox2.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/math.html">
-<link rel="import" href="/tracing/base/rect.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview 2D bounding box computations.
- */
-tr.exportTo('tr.b', function() {
-
- /**
- * Tracks a 2D bounding box.
- * @constructor
- */
- function BBox2() {
- this.isEmpty_ = true;
- this.min_ = undefined;
- this.max_ = undefined;
- };
-
- BBox2.prototype = {
- __proto__: Object.prototype,
-
- reset: function() {
- this.isEmpty_ = true;
- this.min_ = undefined;
- this.max_ = undefined;
- },
-
- get isEmpty() {
- return this.isEmpty_;
- },
-
- addBBox2: function(bbox2) {
- if (bbox2.isEmpty)
- return;
- this.addVec2(bbox2.min_);
- this.addVec2(bbox2.max_);
- },
-
- clone: function() {
- var bbox = new BBox2();
- bbox.addBBox2(this);
- return bbox;
- },
-
- /**
- * Adds x, y to the range.
- */
- addXY: function(x, y) {
- if (this.isEmpty_) {
- this.max_ = vec2.create();
- this.min_ = vec2.create();
- vec2.set(this.max_, x, y);
- vec2.set(this.min_, x, y);
- this.isEmpty_ = false;
- return;
- }
- this.max_[0] = Math.max(this.max_[0], x);
- this.max_[1] = Math.max(this.max_[1], y);
- this.min_[0] = Math.min(this.min_[0], x);
- this.min_[1] = Math.min(this.min_[1], y);
- },
-
- /**
- * Adds value_x, value_y in the form [value_x,value_y] to the range.
- */
- addVec2: function(value) {
- if (this.isEmpty_) {
- this.max_ = vec2.create();
- this.min_ = vec2.create();
- vec2.set(this.max_, value[0], value[1]);
- vec2.set(this.min_, value[0], value[1]);
- this.isEmpty_ = false;
- return;
- }
- this.max_[0] = Math.max(this.max_[0], value[0]);
- this.max_[1] = Math.max(this.max_[1], value[1]);
- this.min_[0] = Math.min(this.min_[0], value[0]);
- this.min_[1] = Math.min(this.min_[1], value[1]);
- },
-
- addQuad: function(quad) {
- this.addVec2(quad.p1);
- this.addVec2(quad.p2);
- this.addVec2(quad.p3);
- this.addVec2(quad.p4);
- },
-
- get minVec2() {
- if (this.isEmpty_)
- return undefined;
- return this.min_;
- },
-
- get maxVec2() {
- if (this.isEmpty_)
- return undefined;
- return this.max_;
- },
-
- get sizeAsVec2() {
- if (this.isEmpty_)
- throw new Error('Empty BBox2 has no size');
- var size = vec2.create();
- vec2.subtract(size, this.max_, this.min_);
- return size;
- },
-
- get size() {
- if (this.isEmpty_)
- throw new Error('Empty BBox2 has no size');
- return {width: this.max_[0] - this.min_[0],
- height: this.max_[1] - this.min_[1]};
- },
-
- get width() {
- if (this.isEmpty_)
- throw new Error('Empty BBox2 has no width');
- return this.max_[0] - this.min_[0];
- },
-
- get height() {
- if (this.isEmpty_)
- throw new Error('Empty BBox2 has no width');
- return this.max_[1] - this.min_[1];
- },
-
- toString: function() {
- if (this.isEmpty_)
- return 'empty';
- return 'min=(' + this.min_[0] + ',' + this.min_[1] + ') ' +
- 'max=(' + this.max_[0] + ',' + this.max_[1] + ')';
- },
-
- asRect: function() {
- return tr.b.Rect.fromXYWH(
- this.min_[0],
- this.min_[1],
- this.max_[0] - this.min_[0],
- this.max_[1] - this.min_[1]);
- }
- };
-
- return {
- BBox2: BBox2
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/bbox2_test.html b/chromium/third_party/catapult/tracing/tracing/base/bbox2_test.html
deleted file mode 100644
index 156c25e176c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/bbox2_test.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/bbox2.html">
-<script>
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('addVec2', function() {
- var bbox = new tr.b.BBox2();
- var x = vec2.create();
- vec2.set(x, 10, 10);
- bbox.addVec2(x);
- assert.equal(bbox.minVec2[0], 10);
- assert.equal(bbox.minVec2[1], 10);
- assert.equal(bbox.maxVec2[0], 10);
- assert.equal(bbox.maxVec2[1], 10);
-
- // Mutate x.
- vec2.set(x, 11, 11);
-
- // Bbox shouldn't have changed.
- assert.equal(bbox.minVec2[0], 10);
- assert.equal(bbox.minVec2[1], 10);
- assert.equal(bbox.maxVec2[0], 10);
- assert.equal(bbox.maxVec2[1], 10);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/category_util.html b/chromium/third_party/catapult/tracing/tracing/base/category_util.html
deleted file mode 100644
index 71fd210dd7e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/category_util.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper code for working with tracing categories.
- *
- */
-tr.exportTo('tr.b', function() {
-
- // Cached values for getCategoryParts.
- var categoryPartsFor = {};
-
- /**
- * Categories are stored in comma-separated form, e.g: 'a,b' meaning
- * that the event is part of the a and b category.
- *
- * This function returns the category split by string, caching the
- * array for performance.
- *
- * Do not mutate the returned array!!!!
- */
- function getCategoryParts(category) {
- var parts = categoryPartsFor[category];
- if (parts !== undefined)
- return parts;
- parts = category.split(',');
- categoryPartsFor[category] = parts;
- return parts;
- }
-
- return {
- getCategoryParts: getCategoryParts
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/color.html b/chromium/third_party/catapult/tracing/tracing/base/color.html
deleted file mode 100644
index d173fb45073..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/color.html
+++ /dev/null
@@ -1,252 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- function clamp01(value) {
- return Math.max(0, Math.min(1, value));
- }
-
- function Color(opt_r, opt_g, opt_b, opt_a) {
- this.r = Math.floor(opt_r) || 0;
- this.g = Math.floor(opt_g) || 0;
- this.b = Math.floor(opt_b) || 0;
- this.a = opt_a;
- }
-
- Color.fromString = function(str) {
- var tmp;
- var values;
- if (str.substr(0, 4) === 'rgb(') {
- tmp = str.substr(4, str.length - 5);
- values = tmp.split(',').map(function(v) {
- return v.replace(/^\s+/, '', 'g');
- });
- if (values.length !== 3)
- throw new Error('Malformatted rgb-expression');
- return new Color(
- parseInt(values[0]),
- parseInt(values[1]),
- parseInt(values[2]));
- } else if (str.substr(0, 5) === 'rgba(') {
- tmp = str.substr(5, str.length - 6);
- values = tmp.split(',').map(function(v) {
- return v.replace(/^\s+/, '', 'g');
- });
- if (values.length !== 4)
- throw new Error('Malformatted rgb-expression');
- return new Color(
- parseInt(values[0]),
- parseInt(values[1]),
- parseInt(values[2]),
- parseFloat(values[3]));
- } else if (str[0] === '#' && str.length === 7) {
- return new Color(
- parseInt(str.substr(1, 2), 16),
- parseInt(str.substr(3, 2), 16),
- parseInt(str.substr(5, 2), 16));
- } else {
- throw new Error('Unrecognized string format.');
- }
- };
-
- Color.lerp = function(a, b, percent) {
- if (a.a !== undefined && b.a !== undefined)
- return Color.lerpRGBA(a, b, percent);
- return Color.lerpRGB(a, b, percent);
- };
-
- Color.lerpRGB = function(a, b, percent) {
- return new Color(
- ((b.r - a.r) * percent) + a.r,
- ((b.g - a.g) * percent) + a.g,
- ((b.b - a.b) * percent) + a.b);
- };
-
- Color.lerpRGBA = function(a, b, percent) {
- return new Color(
- ((b.r - a.r) * percent) + a.r,
- ((b.g - a.g) * percent) + a.g,
- ((b.b - a.b) * percent) + a.b,
- ((b.a - a.a) * percent) + a.a);
- };
-
- Color.fromDict = function(dict) {
- return new Color(dict.r, dict.g, dict.b, dict.a);
- };
-
- /**
- * Converts an HSL triplet with alpha to an RGB color.
- * |h| Hue value in [0, 1].
- * |s| Saturation value in [0, 1].
- * |l| Lightness in [0, 1].
- * |a| Alpha in [0, 1]
- */
- Color.fromHSLExplicit = function(h, s, l, a) {
- var r, g, b;
- function hue2rgb(p, q, t) {
- if (t < 0) t += 1;
- if (t > 1) t -= 1;
- if (t < 1 / 6) return p + (q - p) * 6 * t;
- if (t < 1 / 2) return q;
- if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
- return p;
- }
-
- if (s === 0) {
- r = g = b = l;
- } else {
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
- var p = 2 * l - q;
- r = hue2rgb(p, q, h + 1 / 3);
- g = hue2rgb(p, q, h);
- b = hue2rgb(p, q, h - 1 / 3);
- }
-
- return new Color(Math.floor(r * 255),
- Math.floor(g * 255),
- Math.floor(b * 255), a);
- }
-
- Color.fromHSL = function(hsl) {
- return Color.fromHSLExplicit(hsl.h, hsl.s, hsl.l, hsl.a);
- }
-
- Color.prototype = {
- clone: function() {
- var c = new Color();
- c.r = this.r;
- c.g = this.g;
- c.b = this.b;
- c.a = this.a;
- return c;
- },
-
- blendOver: function(bgColor) {
- var oneMinusThisAlpha = 1 - this.a;
- var outA = this.a + bgColor.a * oneMinusThisAlpha;
- var bgBlend = (bgColor.a * oneMinusThisAlpha) / bgColor.a;
- return new Color(
- this.r * this.a + bgColor.r * bgBlend,
- this.g * this.a + bgColor.g * bgBlend,
- this.b * this.a + bgColor.b * bgBlend,
- outA);
- },
-
- brighten: function(opt_k) {
- var k;
- k = opt_k || 0.45;
-
- return new Color(
- Math.min(255, this.r + Math.floor(this.r * k)),
- Math.min(255, this.g + Math.floor(this.g * k)),
- Math.min(255, this.b + Math.floor(this.b * k)),
- this.a);
- },
-
- lighten: function(k, opt_maxL) {
- var maxL = opt_maxL !== undefined ? opt_maxL : 1.0;
- var hsl = this.toHSL();
- hsl.l = clamp01(hsl.l + k);
- return Color.fromHSL(hsl);
- },
-
- darken: function(opt_k) {
- var k;
- if (opt_k !== undefined)
- k = opt_k;
- else
- k = 0.45;
-
- return new Color(
- Math.min(255, this.r - Math.floor(this.r * k)),
- Math.min(255, this.g - Math.floor(this.g * k)),
- Math.min(255, this.b - Math.floor(this.b * k)),
- this.a);
- },
-
- desaturate: function(opt_desaturateFactor) {
- var desaturateFactor;
- if (opt_desaturateFactor !== undefined)
- desaturateFactor = opt_desaturateFactor;
- else
- desaturateFactor = 1;
-
- var hsl = this.toHSL();
- hsl.s = clamp01(hsl.s * (1 - desaturateFactor));
- return Color.fromHSL(hsl);
- },
-
- withAlpha: function(a) {
- return new Color(this.r, this.g, this.b, a);
- },
-
- toString: function() {
- if (this.a !== undefined) {
- return 'rgba(' +
- this.r + ',' + this.g + ',' +
- this.b + ',' + this.a + ')';
- }
- return 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';
- },
-
- /**
- * Returns a dict {h, s, l, a} with:
- * |h| Hue value in [0, 1].
- * |s| Saturation value in [0, 1].
- * |l| Lightness in [0, 1].
- * |a| Alpha in [0, 1]
- */
- toHSL: function() {
- var r = this.r / 255;
- var g = this.g / 255;
- var b = this.b / 255;
-
- var max = Math.max(r, g, b);
- var min = Math.min(r, g, b);
-
- var h, s;
- var l = (max + min) / 2;
- if (min === max) {
- h = 0;
- s = 0;
- } else {
- var delta = max - min;
- if (l > 0.5)
- s = delta / (2 - max - min);
- else
- s = delta / (max + min);
-
- if (r === max) {
- h = (g - b) / delta;
- if (g < b)
- h += 6;
- } else if (g === max) {
- h = 2 + ((b - r) / delta);
- } else {
- h = 4 + ((r - g) / delta);
- }
- h /= 6;
- }
-
- return {h: h, s: s, l: l, a: this.a};
- },
-
- toStringWithAlphaOverride: function(alpha) {
- return 'rgba(' +
- this.r + ',' + this.g + ',' +
- this.b + ',' + alpha + ')';
- }
- };
-
- return {
- Color: Color
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/color_scheme.html b/chromium/third_party/catapult/tracing/tracing/base/color_scheme.html
deleted file mode 100644
index 07fe220272a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/color_scheme.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/color.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides color scheme related functions.
- */
-tr.exportTo('tr.b', function() {
- // Basic constants...
- var generalPurposeColors = [
- new tr.b.Color(122, 98, 135),
- new tr.b.Color(150, 83, 105),
- new tr.b.Color(44, 56, 189),
- new tr.b.Color(99, 86, 147),
- new tr.b.Color(104, 129, 107),
- new tr.b.Color(130, 178, 55),
- new tr.b.Color(87, 109, 147),
- new tr.b.Color(111, 145, 88),
- new tr.b.Color(81, 152, 131),
- new tr.b.Color(142, 91, 111),
- new tr.b.Color(81, 163, 70),
- new tr.b.Color(148, 94, 86),
- new tr.b.Color(144, 89, 118),
- new tr.b.Color(83, 150, 97),
- new tr.b.Color(105, 94, 139),
- new tr.b.Color(89, 144, 122),
- new tr.b.Color(105, 119, 128),
- new tr.b.Color(96, 128, 137),
- new tr.b.Color(145, 88, 145),
- new tr.b.Color(88, 145, 144),
- new tr.b.Color(90, 100, 143),
- new tr.b.Color(121, 97, 136),
- new tr.b.Color(111, 160, 73),
- new tr.b.Color(112, 91, 142),
- new tr.b.Color(86, 147, 86),
- new tr.b.Color(63, 100, 170),
- new tr.b.Color(81, 152, 107),
- new tr.b.Color(60, 164, 173),
- new tr.b.Color(143, 72, 161),
- new tr.b.Color(159, 74, 86)];
-
- var reservedColorsByName = {
- thread_state_uninterruptible: new tr.b.Color(182, 125, 143),
- thread_state_iowait: new tr.b.Color(255, 140, 0),
- thread_state_running: new tr.b.Color(126, 200, 148),
- thread_state_runnable: new tr.b.Color(133, 160, 210),
- thread_state_sleeping: new tr.b.Color(240, 240, 240),
- thread_state_unknown: new tr.b.Color(199, 155, 125),
-
- background_memory_dump: new tr.b.Color(0, 180, 180),
- light_memory_dump: new tr.b.Color(0, 0, 180),
- detailed_memory_dump: new tr.b.Color(180, 0, 180),
-
- generic_work: new tr.b.Color(125, 125, 125),
-
- good: new tr.b.Color(0, 125, 0),
- bad: new tr.b.Color(180, 125, 0),
- terrible: new tr.b.Color(180, 0, 0),
-
- black: new tr.b.Color(0, 0, 0),
-
- rail_response: new tr.b.Color(67, 135, 253),
- rail_animation: new tr.b.Color(244, 74, 63),
- rail_idle: new tr.b.Color(238, 142, 0),
- rail_load: new tr.b.Color(13, 168, 97),
- startup: new tr.b.Color(230, 230, 0),
-
- used_memory_column: new tr.b.Color(0, 0, 255),
- older_used_memory_column: new tr.b.Color(153, 204, 255),
- tracing_memory_column: new tr.b.Color(153, 153, 153),
-
- heap_dump_stack_frame: new tr.b.Color(128, 128, 128),
- heap_dump_object_type: new tr.b.Color(0, 0, 255),
- heap_dump_child_node_arrow: new tr.b.Color(204, 102, 0),
-
- cq_build_running: new tr.b.Color(255, 255, 119),
- cq_build_passed: new tr.b.Color(153, 238, 102),
- cq_build_failed: new tr.b.Color(238, 136, 136),
- cq_build_abandoned: new tr.b.Color(187, 187, 187),
-
- cq_build_attempt_runnig: new tr.b.Color(222, 222, 75),
- cq_build_attempt_passed: new tr.b.Color(103, 218, 35),
- cq_build_attempt_failed: new tr.b.Color(197, 81, 81)
- };
-
- // Some constants we'll need for later lookups.
- var numGeneralPurposeColorIds = generalPurposeColors.length;
- var numReservedColorIds = tr.b.dictionaryLength(reservedColorsByName);
- var numColorsPerVariant = numGeneralPurposeColorIds + numReservedColorIds;
-
- function ColorScheme() {
- }
-
- /*
- * A flat array of tr.b.Color values of the palette, and their variants.
- *
- * This array is made up of a set of base colors, repeated N times to form
- * a set of variants on that base color.
- *
- * Within the base colors, there are "general purpose" colors,
- * which can be used for random color selection, and
- * reserved colors, which are used when specific colors
- * need to be used, e.g. where red is desired.
- *
- * The variants are automatically generated from the base colors. The 0th
- * variant is the default apeparance of the color, and the varaiants are
- * mutations of that color, e.g. several brightening levels and desaturations.
- *
- * For example, a very simple version of this array looks like the following:
- * 0: Generic Color 0
- * 1: Generic Color 1
- * 2: Named Color 'foo'
- * 3: Brightened Generic Color 0
- * 4: Brightened Generic Color 1
- * 5: Brightened Named Color 'foo'
- */
- var paletteBase = [];
- paletteBase.push.apply(paletteBase, generalPurposeColors);
- paletteBase.push.apply(paletteBase,
- tr.b.dictionaryValues(reservedColorsByName));
- ColorScheme.colors = [];
- ColorScheme.properties = {};
- ColorScheme.properties = {
- numColorsPerVariant: numColorsPerVariant
- };
-
- function pushVariant(func) {
- var variantColors = paletteBase.map(func);
- ColorScheme.colors.push.apply(ColorScheme.colors, variantColors);
- }
-
- // Basic colors.
- pushVariant(function(c) { return c; });
-
- // Brightened variants.
- ColorScheme.properties.brightenedOffsets = [];
- ColorScheme.properties.brightenedOffsets.push(ColorScheme.colors.length);
- pushVariant(function(c) {
- return c.lighten(0.3, 0.9);
- });
-
- ColorScheme.properties.brightenedOffsets.push(ColorScheme.colors.length);
- pushVariant(function(c) {
- return c.lighten(0.48, 0.9);
- });
-
- ColorScheme.properties.brightenedOffsets.push(ColorScheme.colors.length);
- pushVariant(function(c) {
- return c.lighten(0.65, 0.9);
- });
-
-
- // Desaturated variants.
- ColorScheme.properties.dimmedOffsets = [];
- ColorScheme.properties.dimmedOffsets.push(ColorScheme.colors.length);
- pushVariant(function(c) {
- return c.desaturate();
- });
- ColorScheme.properties.dimmedOffsets.push(ColorScheme.colors.length);
- pushVariant(function(c) {
- return c.desaturate(0.5);
- });
- ColorScheme.properties.dimmedOffsets.push(ColorScheme.colors.length);
- pushVariant(function(c) {
- return c.desaturate(0.3);
- });
-
- /**
- * A toString'd representation of ColorScheme.colors.
- */
- ColorScheme.colorsAsStrings = ColorScheme.colors.map(function(c) {
- return c.toString();
- });
-
- // Build reservedColorNameToIdMap.
- var reservedColorNameToIdMap = (function() {
- var m = new Map();
- var i = generalPurposeColors.length;
- tr.b.iterItems(reservedColorsByName, function(key, value) {
- m.set(key, i++);
- });
- return m;
- })();
-
- /**
- * @param {String} name The color name.
- * @return {Number} The color ID for the given color name.
- */
- ColorScheme.getColorIdForReservedName = function(name) {
- var id = reservedColorNameToIdMap.get(name);
- if (id === undefined)
- throw new Error('Unrecognized color ') + name;
- return id;
- };
-
- ColorScheme.getColorForReservedNameAsString = function(reservedName) {
- var id = ColorScheme.getColorIdForReservedName(reservedName);
- return ColorScheme.colorsAsStrings[id];
- };
-
- /**
- * Computes a simplistic hashcode of the provide name. Used to chose colors
- * for slices.
- * @param {string} name The string to hash.
- */
- ColorScheme.getStringHash = function(name) {
- var hash = 0;
- for (var i = 0; i < name.length; ++i)
- hash = (hash + 37 * hash + 11 * name.charCodeAt(i)) % 0xFFFFFFFF;
- return hash;
- };
-
- // Previously computed string color IDs. They are based on a stable hash, so
- // it is safe to save them throughout the program time.
- var stringColorIdCache = new Map();
-
- /**
- * @return {Number} A color ID that is stably associated to the provided via
- * the getStringHash method. The color ID will be chosen from the general
- * purpose ID space only, e.g. no reserved ID will be used.
- */
- ColorScheme.getColorIdForGeneralPurposeString = function(string) {
- if (stringColorIdCache.get(string) === undefined) {
- var hash = ColorScheme.getStringHash(string);
- stringColorIdCache.set(string, hash % numGeneralPurposeColorIds);
- }
- return stringColorIdCache.get(string);
- };
-
- return {
- ColorScheme: ColorScheme
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/color_scheme_test.html b/chromium/third_party/catapult/tracing/tracing/base/color_scheme_test.html
deleted file mode 100644
index 2accda5d95b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/color_scheme_test.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ColorScheme = tr.b.ColorScheme;
-
- function isValidColorId(colorId) {
- return typeof(colorId) === 'number' &&
- colorId >= 0 &&
- colorId <= 200;
- }
-
- test('getColorIdForReservedName', function() {
- assert.isTrue(isValidColorId(
- ColorScheme.getColorIdForReservedName('black')));
- assert.throws(ColorScheme.getColorIdForReservedName.bind(
- undefined, 'NOT_A_RESERVED_NAME'));
- assert.throws(ColorScheme.getColorIdForReservedName.bind(
- undefined, 'constructor'));
- });
-
- test('getColorForReservedNameAsString', function() {
- assert.equal('rgb(0,0,0)',
- ColorScheme.getColorForReservedNameAsString('black'));
- assert.throws(ColorScheme.getColorForReservedNameAsString.bind(
- undefined, 'NOT_A_RESERVED_NAME'));
- assert.throws(ColorScheme.getColorForReservedNameAsString.bind(
- undefined, 'constructor'));
- });
-
- test('getColorIdForGeneralPurposeString', function() {
- assert.isTrue(isValidColorId(
- ColorScheme.getColorIdForGeneralPurposeString('black')));
- assert.isTrue(isValidColorId(
- ColorScheme.getColorIdForGeneralPurposeString('NOT_A_RESERVED_NAME')));
- assert.isTrue(isValidColorId(
- ColorScheme.getColorIdForGeneralPurposeString('constructor')));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/color_test.html b/chromium/third_party/catapult/tracing/tracing/base/color_test.html
deleted file mode 100644
index 208ab9939c6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/color_test.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/color.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('fromRGB', function() {
- var c = tr.b.Color.fromString('rgb(1, 2, 3)');
- assert.equal(c.r, 1);
- assert.equal(c.g, 2);
- assert.equal(c.b, 3);
- assert.isUndefined(c.a);
- });
-
- test('fromRGBA', function() {
- var c = tr.b.Color.fromString('rgba(1, 2, 3, 0.5)');
- assert.equal(c.r, 1);
- assert.equal(c.g, 2);
- assert.equal(c.b, 3);
- assert.equal(c.a, 0.5);
- });
-
- test('fromHex', function() {
- var c = tr.b.Color.fromString('#010203');
- assert.equal(c.r, 1);
- assert.equal(c.g, 2);
- assert.equal(c.b, 3);
- assert.isUndefined(c.a);
- });
-
- test('toStringRGB', function() {
- var c = new tr.b.Color(1, 2, 3);
- assert.equal(c.toString(), 'rgb(1,2,3)');
- });
-
- test('toStringRGBA', function() {
- var c = new tr.b.Color(1, 2, 3, 0.5);
- assert.equal(c.toString(), 'rgba(1,2,3,0.5)');
- });
-
- test('lerpRGB', function() {
- var a = new tr.b.Color(0, 127, 191);
- var b = new tr.b.Color(255, 255, 255);
- var x = tr.b.Color.lerpRGB(a, b, 0.25);
- assert.equal(x.r, 63);
- assert.equal(x.g, 159);
- assert.equal(x.b, 207);
- });
-
- test('lerpRGBA', function() {
- var a = new tr.b.Color(0, 127, 191, 0.5);
- var b = new tr.b.Color(255, 255, 255, 1);
- var x = tr.b.Color.lerpRGBA(a, b, 0.25);
- assert.equal(x.r, 63);
- assert.equal(x.g, 159);
- assert.equal(x.b, 207);
- assert.equal(x.a, 0.625);
- });
-
- test('blendRGBA', function() {
- var red = new tr.b.Color(255, 0, 0, 0.5);
- var white = new tr.b.Color(255, 255, 255, 1);
- var x = red.blendOver(white);
- assert.equal(x.r, 255);
- assert.equal(x.g, 127);
- assert.equal(x.b, 127);
- assert.equal(x.a, 1);
- });
-
- test('fromHSL', function() {
- var reddish = tr.b.Color.fromHSLExplicit(.994, 0.644, .484, 0.8);
- assert.equal(reddish.r, 202);
- assert.equal(reddish.g, 43);
- assert.equal(reddish.b, 49);
- assert.equal(reddish.a, 0.8);
-
- var gray = tr.b.Color.fromHSLExplicit(0, 0, .50, 1.0);
- assert.equal(gray.r, 127);
- assert.equal(gray.g, 127);
- assert.equal(gray.b, 127);
- assert.equal(gray.a, 1.0);
- });
-
- test('toHSL', function() {
- var reddish = new tr.b.Color(203, 44, 49, 0.8).toHSL();
- assert.closeTo(reddish.h, .994, 0.01);
- assert.closeTo(reddish.s, 0.644, 0.01);
- assert.closeTo(reddish.l, 0.484, 0.01);
- assert.equal(reddish.a, 0.8);
-
- var gray = new tr.b.Color(128, 128, 128, 1.0).toHSL();
- assert.equal(gray.h, 0);
- assert.equal(gray.s, 0);
- assert.closeTo(gray.l, .50, 0.01);
- assert.equal(gray.a, 1.0);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/event.html b/chromium/third_party/catapult/tracing/tracing/base/event.html
deleted file mode 100644
index 4b10d3f31f9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/event.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event_target.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var Event;
- if (tr.isHeadless) {
- /**
- * Creates a new event to be used with tr.b.EventTarget or DOM EventTarget
- * objects.
- * @param {string} type The name of the event.
- * @param {boolean=} opt_bubbles Whether the event bubbles.
- * Default is false.
- * @param {boolean=} opt_preventable Whether the default action of the event
- * can be prevented.
- * @constructor
- * @extends {Event}
- */
- function HeadlessEvent(type, opt_bubbles, opt_preventable) {
- this.type = type;
- this.bubbles = (opt_bubbles !== undefined ?
- !!opt_bubbles : false);
- this.cancelable = (opt_preventable !== undefined ?
- !!opt_preventable : false);
-
- this.defaultPrevented = false;
- this.cancelBubble = false;
- };
-
- HeadlessEvent.prototype = {
- preventDefault: function() {
- this.defaultPrevented = true;
- },
-
- stopPropagation: function() {
- this.cancelBubble = true;
- }
- };
- Event = HeadlessEvent;
- } else {
- /**
- * Creates a new event to be used with tr.b.EventTarget or DOM EventTarget
- * objects.
- * @param {string} type The name of the event.
- * @param {boolean=} opt_bubbles Whether the event bubbles.
- * Default is false.
- * @param {boolean=} opt_preventable Whether the default action of the event
- * can be prevented.
- * @constructor
- * @extends {Event}
- */
- function TrEvent(type, opt_bubbles, opt_preventable) {
- var e = tr.doc.createEvent('Event');
- e.initEvent(type, !!opt_bubbles, !!opt_preventable);
- e.__proto__ = global.Event.prototype;
- return e;
- };
-
- TrEvent.prototype = {
- __proto__: global.Event.prototype
- };
- Event = TrEvent;
- }
-
- /**
- * Dispatches a simple event on an event target.
- * @param {!EventTarget} target The event target to dispatch the event on.
- * @param {string} type The type of the event.
- * @param {boolean=} opt_bubbles Whether the event bubbles or not.
- * @param {boolean=} opt_cancelable Whether the default action of the event
- * can be prevented.
- * @param {!Object=} opt_fields
- *
- * @return {boolean} If any of the listeners called {@code preventDefault}
- * during the dispatch this will return false.
- */
- function dispatchSimpleEvent(target, type, opt_bubbles, opt_cancelable,
- opt_fields) {
- var e = new tr.b.Event(type, opt_bubbles, opt_cancelable);
- if (opt_fields) {
- tr.b.iterItems(opt_fields, function(name, value) {
- e[name] = value;
- });
- }
- return target.dispatchEvent(e);
- }
-
- return {
- Event: Event,
- dispatchSimpleEvent: dispatchSimpleEvent
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/event_target.html b/chromium/third_party/catapult/tracing/tracing/base/event_target.html
deleted file mode 100644
index 7c95eda5434..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/event_target.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview This contains an implementation of the EventTarget interface
- * as defined by DOM Level 2 Events.
- */
-tr.exportTo('tr.b', function() {
-
- /**
- * Creates a new EventTarget. This class implements the DOM level 2
- * EventTarget interface and can be used wherever those are used.
- * @constructor
- */
- function EventTarget() {
- }
- EventTarget.decorate = function(target) {
- for (var k in EventTarget.prototype) {
- if (k === 'decorate')
- continue;
- var v = EventTarget.prototype[k];
- if (typeof v !== 'function')
- continue;
- target[k] = v;
- }
- };
-
- EventTarget.prototype = {
-
- /**
- * Adds an event listener to the target.
- * @param {string} type The name of the event.
- * @param {!Function|{handleEvent:Function}} handler The handler for the
- * event. This is called when the event is dispatched.
- */
- addEventListener: function(type, handler) {
- if (!this.listeners_)
- this.listeners_ = Object.create(null);
- if (!(type in this.listeners_)) {
- this.listeners_[type] = [handler];
- } else {
- var handlers = this.listeners_[type];
- if (handlers.indexOf(handler) < 0)
- handlers.push(handler);
- }
- },
-
- /**
- * Removes an event listener from the target.
- * @param {string} type The name of the event.
- * @param {!Function|{handleEvent:Function}} handler The handler for the
- * event.
- */
- removeEventListener: function(type, handler) {
- if (!this.listeners_)
- return;
- if (type in this.listeners_) {
- var handlers = this.listeners_[type];
- var index = handlers.indexOf(handler);
- if (index >= 0) {
- // Clean up if this was the last listener.
- if (handlers.length === 1)
- delete this.listeners_[type];
- else
- handlers.splice(index, 1);
- }
- }
- },
-
- /**
- * Dispatches an event and calls all the listeners that are listening to
- * the type of the event.
- * @param {!cr.event.Event} event The event to dispatch.
- * @return {boolean} Whether the default action was prevented. If someone
- * calls preventDefault on the event object then this returns false.
- */
- dispatchEvent: function(event) {
- if (!this.listeners_)
- return true;
-
- // Since we are using DOM Event objects we need to override some of the
- // properties and methods so that we can emulate this correctly.
- var self = this;
- event.__defineGetter__('target', function() {
- return self;
- });
- var realPreventDefault = event.preventDefault;
- event.preventDefault = function() {
- realPreventDefault.call(this);
- this.rawReturnValue = false;
- };
-
- var type = event.type;
- var prevented = 0;
- if (type in this.listeners_) {
- // Clone to prevent removal during dispatch
- var handlers = this.listeners_[type].concat();
- for (var i = 0, handler; handler = handlers[i]; i++) {
- if (handler.handleEvent)
- prevented |= handler.handleEvent.call(handler, event) === false;
- else
- prevented |= handler.call(this, event) === false;
- }
- }
-
- return !prevented && event.rawReturnValue;
- },
-
- hasEventListener: function(type) {
- return this.listeners_[type] !== undefined;
- }
- };
-
- var EventTargetHelper = {
- decorate: function(target) {
- for (var k in EventTargetHelper) {
- if (k === 'decorate')
- continue;
- var v = EventTargetHelper[k];
- if (typeof v !== 'function')
- continue;
- target[k] = v;
- }
- target.listenerCounts_ = {};
- },
-
- addEventListener: function(type, listener, useCapture) {
- this.__proto__.addEventListener.call(
- this, type, listener, useCapture);
- if (this.listenerCounts_[type] === undefined)
- this.listenerCounts_[type] = 0;
- this.listenerCounts_[type]++;
- },
-
- removeEventListener: function(type, listener, useCapture) {
- this.__proto__.removeEventListener.call(
- this, type, listener, useCapture);
- this.listenerCounts_[type]--;
- },
-
- hasEventListener: function(type) {
- return this.listenerCounts_[type] > 0;
- }
- };
-
- // Export
- return {
- EventTarget: EventTarget,
- EventTargetHelper: EventTargetHelper
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/event_target_test.html b/chromium/third_party/catapult/tracing/tracing/base/event_target_test.html
deleted file mode 100644
index 5df964b6e50..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/event_target_test.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/event.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('eventTargetHelper', function() {
- var listenerCallCount = 0;
- function listener() { listenerCallCount++; }
-
- var div = new tr.b.EventTarget();
- tr.b.EventTargetHelper.decorate(div);
-
- assert.isFalse(div.hasEventListener('foo'));
-
- div.addEventListener('foo', listener);
- assert.isTrue(div.hasEventListener('foo'));
-
- tr.b.dispatchSimpleEvent(div, 'foo');
- assert.equal(listenerCallCount, 1);
-
- div.removeEventListener('foo', listener);
-
- tr.b.dispatchSimpleEvent(div, 'foo');
- assert.equal(listenerCallCount, 1);
-
- assert.isFalse(div.hasEventListener('foo'));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/extension_registry.html b/chromium/third_party/catapult/tracing/tracing/base/extension_registry.html
deleted file mode 100644
index 713a79045c2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/extension_registry.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/extension_registry_base.html">
-<link rel="import" href="/tracing/base/extension_registry_basic.html">
-<link rel="import" href="/tracing/base/extension_registry_type_based.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper code for defining extension registries, which can be
- * used to make a part of trace-viewer extensible.
- *
- * This file provides two basic types of extension registries:
- * - Generic: register a type with metadata, query for those types based on
- * a predicate
- *
- * - TypeName-based: register a type that handles some combination
- * of tracing categories or typeNames, then query
- * for it based on a category, typeName or both.
- *
- * When you register subtypes, you pass the constructor for the
- * subtype, and any metadata you want associated with the subtype. Use metadata
- * instead of stuffing fields onto the constructor. E.g.:
- * registry.register(MySubclass, {titleWhenShownInTabStrip: 'MySub'})
- *
- * Some registries want a default object that is returned when a more precise
- * subtype has been registered. To provide one, set the defaultConstructor
- * option on the registry options.
- *
- * TODO: Extension registry used to make reference to mandatoryBaseType but it
- * was never enforced. We may want to add it back in the future in order to
- * enforce the types that can be put into a given registry.
- */
-tr.exportTo('tr.b', function() {
-
- function decorateExtensionRegistry(registry, registryOptions) {
- if (registry.register)
- throw new Error('Already has registry');
-
- registryOptions.freeze();
- if (registryOptions.mode === tr.b.BASIC_REGISTRY_MODE) {
- tr.b._decorateBasicExtensionRegistry(registry, registryOptions);
- } else if (registryOptions.mode === tr.b.TYPE_BASED_REGISTRY_MODE) {
- tr.b._decorateTypeBasedExtensionRegistry(registry, registryOptions);
- } else {
- throw new Error('Unrecognized mode');
- }
-
- // Make it an event target.
- if (registry.addEventListener === undefined)
- tr.b.EventTarget.decorate(registry);
- }
-
- return {
- decorateExtensionRegistry: decorateExtensionRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_base.html b/chromium/third_party/catapult/tracing/tracing/base/extension_registry_base.html
deleted file mode 100644
index 29de7d7cd70..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_base.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- function RegisteredTypeInfo(constructor, metadata) {
- this.constructor = constructor;
- this.metadata = metadata;
- };
-
- var BASIC_REGISTRY_MODE = 'BASIC_REGISTRY_MODE';
- var TYPE_BASED_REGISTRY_MODE = 'TYPE_BASED_REGISTRY_MODE';
- var ALL_MODES = {BASIC_REGISTRY_MODE: true, TYPE_BASED_REGISTRY_MODE: true};
-
- function ExtensionRegistryOptions(mode) {
- if (mode === undefined)
- throw new Error('Mode is required');
- if (!ALL_MODES[mode])
- throw new Error('Not a mode.');
-
- this.mode_ = mode;
- this.defaultMetadata_ = {};
- this.defaultConstructor_ = undefined;
- this.defaultTypeInfo_ = undefined;
- this.frozen_ = false;
- }
- ExtensionRegistryOptions.prototype = {
- freeze: function() {
- if (this.frozen_)
- throw new Error('Frozen');
- this.frozen_ = true;
- },
-
- get mode() {
- return this.mode_;
- },
-
- get defaultMetadata() {
- return this.defaultMetadata_;
- },
-
- set defaultMetadata(defaultMetadata) {
- if (this.frozen_)
- throw new Error('Frozen');
- this.defaultMetadata_ = defaultMetadata;
- this.defaultTypeInfo_ = undefined;
- },
-
- get defaultConstructor() {
- return this.defaultConstructor_;
- },
-
- set defaultConstructor(defaultConstructor) {
- if (this.frozen_)
- throw new Error('Frozen');
- this.defaultConstructor_ = defaultConstructor;
- this.defaultTypeInfo_ = undefined;
- },
-
- get defaultTypeInfo() {
- if (this.defaultTypeInfo_ === undefined && this.defaultConstructor_) {
- this.defaultTypeInfo_ = new RegisteredTypeInfo(
- this.defaultConstructor,
- this.defaultMetadata);
- }
- return this.defaultTypeInfo_;
- },
-
- validateConstructor: function(constructor) {
- if (!this.mandatoryBaseClass)
- return;
- var curProto = constructor.prototype.__proto__;
- var ok = false;
- while (curProto) {
- if (curProto === this.mandatoryBaseClass.prototype) {
- ok = true;
- break;
- }
- curProto = curProto.__proto__;
- }
- if (!ok)
- throw new Error(constructor + 'must be subclass of ' + registry);
- }
- };
-
- return {
- BASIC_REGISTRY_MODE: BASIC_REGISTRY_MODE,
- TYPE_BASED_REGISTRY_MODE: TYPE_BASED_REGISTRY_MODE,
-
- ExtensionRegistryOptions: ExtensionRegistryOptions,
- RegisteredTypeInfo: RegisteredTypeInfo
- };
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_basic.html b/chromium/third_party/catapult/tracing/tracing/base/extension_registry_basic.html
deleted file mode 100644
index 7547e13ea8a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_basic.html
+++ /dev/null
@@ -1,120 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/extension_registry_base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
-
- var RegisteredTypeInfo = tr.b.RegisteredTypeInfo;
- var ExtensionRegistryOptions = tr.b.ExtensionRegistryOptions;
-
- function decorateBasicExtensionRegistry(registry, extensionRegistryOptions) {
- var savedStateStack = [];
- registry.registeredTypeInfos_ = [];
-
- registry.register = function(constructor,
- opt_metadata) {
- if (registry.findIndexOfRegisteredConstructor(
- constructor) !== undefined)
- throw new Error('Handler already registered for ' + constructor);
-
- extensionRegistryOptions.validateConstructor(constructor);
-
- var metadata = {};
- for (var k in extensionRegistryOptions.defaultMetadata)
- metadata[k] = extensionRegistryOptions.defaultMetadata[k];
- if (opt_metadata) {
- for (var k in opt_metadata)
- metadata[k] = opt_metadata[k];
- }
-
- var typeInfo = new RegisteredTypeInfo(
- constructor,
- metadata);
-
- var e = new tr.b.Event('will-register');
- e.typeInfo = typeInfo;
- registry.dispatchEvent(e);
-
- registry.registeredTypeInfos_.push(typeInfo);
-
- e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.pushCleanStateBeforeTest = function() {
- savedStateStack.push(registry.registeredTypeInfos_);
- registry.registeredTypeInfos_ = [];
-
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
- registry.popCleanStateAfterTest = function() {
- registry.registeredTypeInfos_ = savedStateStack[0];
- savedStateStack.splice(0, 1);
-
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.findIndexOfRegisteredConstructor = function(constructor) {
- for (var i = 0; i < registry.registeredTypeInfos_.length; i++)
- if (registry.registeredTypeInfos_[i].constructor === constructor)
- return i;
- return undefined;
- };
-
- registry.unregister = function(constructor) {
- var foundIndex = registry.findIndexOfRegisteredConstructor(constructor);
- if (foundIndex === undefined)
- throw new Error(constructor + ' not registered');
- registry.registeredTypeInfos_.splice(foundIndex, 1);
-
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.getAllRegisteredTypeInfos = function() {
- return registry.registeredTypeInfos_;
- };
-
- registry.findTypeInfo = function(constructor) {
- var foundIndex = this.findIndexOfRegisteredConstructor(constructor);
- if (foundIndex !== undefined)
- return this.registeredTypeInfos_[foundIndex];
- return undefined;
- };
-
- registry.findTypeInfoMatching = function(predicate, opt_this) {
- opt_this = opt_this ? opt_this : undefined;
- for (var i = 0; i < registry.registeredTypeInfos_.length; ++i) {
- var typeInfo = registry.registeredTypeInfos_[i];
- if (predicate.call(opt_this, typeInfo))
- return typeInfo;
- }
- return extensionRegistryOptions.defaultTypeInfo;
- };
-
- registry.findTypeInfoWithName = function(name) {
- if (typeof(name) !== 'string')
- throw new Error('Name is not a string.');
- var typeInfo = registry.findTypeInfoMatching(function(ti) {
- return ti.constructor.name === name;
- });
- if (typeInfo)
- return typeInfo;
- return undefined;
- };
- }
-
- return {
- _decorateBasicExtensionRegistry: decorateBasicExtensionRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_test.html b/chromium/third_party/catapult/tracing/tracing/base/extension_registry_test.html
deleted file mode 100644
index d67f342b38f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_test.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('tberSimpleNamedRegistration', function() {
- function DummyEvent() {
- }
- DummyEvent.prototype = {
- };
-
- function DummyEventSubclass() {
- }
- DummyEventSubclass.prototype = {
- __proto__: DummyEvent.prototype
- };
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = DummyEvent;
- options.defaultConstructor = DummyEvent;
- tr.b.decorateExtensionRegistry(
- DummyEvent, options);
-
- DummyEvent.register(DummyEventSubclass, {typeName: 'dummy-name'});
- assert.equal(DummyEvent, DummyEvent.getConstructor('cat', 'name'));
- assert.equal(DummyEvent.getConstructor('dummy', 'dummy-name'),
- DummyEventSubclass);
- DummyEvent.unregister(DummyEventSubclass);
- assert.equal(DummyEvent, DummyEvent.getConstructor('dummy', 'dummy-name'));
- });
-
- test('tberSimpleCategoryRegistration', function() {
- function DummyEvent() {
- }
- DummyEvent.prototype = {
- };
-
- function DummyEventSubclass() {
- }
- DummyEventSubclass.prototype = {
- __proto__: DummyEvent.prototype
- };
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = DummyEvent;
- options.defaultConstructor = DummyEvent;
- tr.b.decorateExtensionRegistry(
- DummyEvent, options);
-
- DummyEvent.register(
- DummyEventSubclass,
- {categoryParts: ['dummy']
- });
- assert.equal(DummyEvent, DummyEvent.getConstructor('cat', 'name'));
- assert.equal(DummyEvent.getConstructor('dummy', 'dummy-name'),
- DummyEventSubclass);
- DummyEvent.unregister(DummyEventSubclass);
- assert.equal(DummyEvent, DummyEvent.getConstructor('dummy', 'dummy-name'));
- });
-
- test('tberSimpleCompoundCategory', function() {
- function DummyEvent() {
- }
- DummyEvent.prototype = {
- };
-
- function DummyEventSubclass() {
- }
- DummyEventSubclass.prototype = {
- __proto__: DummyEvent.prototype
- };
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = DummyEvent;
- options.defaultConstructor = DummyEvent;
- tr.b.decorateExtensionRegistry(
- DummyEvent, options);
-
- DummyEvent.register(
- DummyEventSubclass,
- {
- categoryParts: ['dummy']
- });
- assert.equal(DummyEvent, DummyEvent.getConstructor('cat', 'name'));
- assert.equal(DummyEventSubclass,
- DummyEvent.getConstructor('dummy,something-else',
- 'dummy-name'));
- });
-
- test('tberDefaultType', function() {
- function DummyEvent() {
- }
- DummyEvent.prototype = {
- };
-
- function DummyEventSubclass() {
- }
- DummyEventSubclass.prototype = {
- __proto__: DummyEvent.prototype
- };
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = DummyEvent;
- options.defaultConstructor = DummyEvent;
- tr.b.decorateExtensionRegistry(
- DummyEvent, options);
-
- DummyEvent.register(
- DummyEventSubclass,
- {
- categoryParts: ['dummy']
- });
- assert.equal(DummyEvent, DummyEvent.getConstructor('cat', 'name'));
- assert.equal(DummyEventSubclass,
- DummyEvent.getConstructor('dummy,something-else',
- 'dummy-name'));
- });
-
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_type_based.html b/chromium/third_party/catapult/tracing/tracing/base/extension_registry_type_based.html
deleted file mode 100644
index e45639e96c2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/extension_registry_type_based.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/category_util.html">
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/extension_registry_base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var getCategoryParts = tr.b.getCategoryParts;
-
- var RegisteredTypeInfo = tr.b.RegisteredTypeInfo;
- var ExtensionRegistryOptions = tr.b.ExtensionRegistryOptions;
-
-
- function decorateTypeBasedExtensionRegistry(registry,
- extensionRegistryOptions) {
- var savedStateStack = [];
-
- registry.registeredTypeInfos_ = [];
-
- registry.categoryPartToTypeInfoMap_ = new Map();
- registry.typeNameToTypeInfoMap_ = new Map();
-
- registry.register = function(constructor,
- metadata) {
-
- extensionRegistryOptions.validateConstructor(constructor);
-
- var typeInfo = new RegisteredTypeInfo(
- constructor,
- metadata || extensionRegistryOptions.defaultMetadata);
-
- typeInfo.typeNames = [];
- typeInfo.categoryParts = [];
- if (metadata && metadata.typeName)
- typeInfo.typeNames.push(metadata.typeName);
- if (metadata && metadata.typeNames) {
- typeInfo.typeNames.push.apply(
- typeInfo.typeNames, metadata.typeNames);
- }
- if (metadata && metadata.categoryParts) {
- typeInfo.categoryParts.push.apply(
- typeInfo.categoryParts, metadata.categoryParts);
- }
-
- if (typeInfo.typeNames.length === 0 &&
- typeInfo.categoryParts.length === 0)
- throw new Error('typeName or typeNames must be provided');
-
- // Sanity checks...
- typeInfo.typeNames.forEach(function(typeName) {
- if (registry.typeNameToTypeInfoMap_.has(typeName))
- throw new Error('typeName ' + typeName + ' already registered');
- });
- typeInfo.categoryParts.forEach(function(categoryPart) {
- if (registry.categoryPartToTypeInfoMap_.has(categoryPart)) {
- throw new Error('categoryPart ' + categoryPart +
- ' already registered');
- }
- });
-
- var e = new tr.b.Event('will-register');
- e.typeInfo = typeInfo;
- registry.dispatchEvent(e);
-
- // Actual registration.
- typeInfo.typeNames.forEach(function(typeName) {
- registry.typeNameToTypeInfoMap_.set(typeName, typeInfo);
- });
- typeInfo.categoryParts.forEach(function(categoryPart) {
- registry.categoryPartToTypeInfoMap_.set(categoryPart, typeInfo);
- });
- registry.registeredTypeInfos_.push(typeInfo);
-
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.pushCleanStateBeforeTest = function() {
- savedStateStack.push({
- registeredTypeInfos: registry.registeredTypeInfos_,
- typeNameToTypeInfoMap: registry.typeNameToTypeInfoMap_,
- categoryPartToTypeInfoMap: registry.categoryPartToTypeInfoMap_
- });
- registry.registeredTypeInfos_ = [];
- registry.typeNameToTypeInfoMap_ = new Map();
- registry.categoryPartToTypeInfoMap_ = new Map();
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.popCleanStateAfterTest = function() {
- var state = savedStateStack[0];
- savedStateStack.splice(0, 1);
-
- registry.registeredTypeInfos_ = state.registeredTypeInfos;
- registry.typeNameToTypeInfoMap_ = state.typeNameToTypeInfoMap;
- registry.categoryPartToTypeInfoMap_ = state.categoryPartToTypeInfoMap;
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.unregister = function(constructor) {
- var typeInfoIndex = -1;
- for (var i = 0; i < registry.registeredTypeInfos_.length; i++) {
- if (registry.registeredTypeInfos_[i].constructor === constructor) {
- typeInfoIndex = i;
- break;
- }
- }
- if (typeInfoIndex === -1)
- throw new Error(constructor + ' not registered');
-
- var typeInfo = registry.registeredTypeInfos_[typeInfoIndex];
- registry.registeredTypeInfos_.splice(typeInfoIndex, 1);
- typeInfo.typeNames.forEach(function(typeName) {
- registry.typeNameToTypeInfoMap_.delete(typeName);
- });
- typeInfo.categoryParts.forEach(function(categoryPart) {
- registry.categoryPartToTypeInfoMap_.delete(categoryPart);
- });
- var e = new tr.b.Event('registry-changed');
- registry.dispatchEvent(e);
- };
-
- registry.getTypeInfo = function(category, typeName) {
- if (category) {
- var categoryParts = getCategoryParts(category);
- for (var i = 0; i < categoryParts.length; i++) {
- var categoryPart = categoryParts[i];
- var typeInfo = registry.categoryPartToTypeInfoMap_.get(categoryPart);
- if (typeInfo !== undefined)
- return typeInfo;
- }
- }
- var typeInfo = registry.typeNameToTypeInfoMap_.get(typeName);
- if (typeInfo !== undefined)
- return typeInfo;
-
- return extensionRegistryOptions.defaultTypeInfo;
- };
-
- // TODO(nduca): Remove or rename.
- registry.getConstructor = function(category, typeName) {
- var typeInfo = registry.getTypeInfo(category, typeName);
- if (typeInfo)
- return typeInfo.constructor;
- return undefined;
- };
- }
-
- return {
- _decorateTypeBasedExtensionRegistry: decorateTypeBasedExtensionRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/guid.html b/chromium/third_party/catapult/tracing/tracing/base/guid.html
deleted file mode 100644
index ab19ce10598..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/guid.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var nextGUID = 1;
-
- var UUID4_PATTERN = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
-
- var GUID = {
- /* Allocate an integer GUID.
- *
- * These GUIDs are not unique between loads, but are fast to generate, and
- * consume very little memory.
- *
- * @return {number} globally unique id.
- */
- allocateSimple: function() {
- return nextGUID++;
- },
-
- /* Return the last GUID allocated without allocating a new one.
- *
- * @return {number} last guid.
- */
- getLastSimpleGuid: function() {
- return nextGUID - 1;
- },
-
- /* Generate a random string UUID.
- *
- * Version 4 random UUIDs are practically guaranteed to be unique between
- * loads, so they can be serialized and compared with results from other
- * loads. These are slower to generate and consume more memory than simple
- * GUIDs.
- *
- * @return {string} universally unique id.
- */
- allocateUUID4: function() {
- return UUID4_PATTERN.replace(/[xy]/g, function(c) {
- var r = parseInt(Math.random() * 16);
- if (c === 'y')
- r = (r & 3) + 8;
- return r.toString(16);
- });
- }
- };
-
- return {
- GUID: GUID
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/headless_tests.html b/chromium/third_party/catapult/tracing/tracing/base/headless_tests.html
deleted file mode 100644
index 6c3f5f4d6ab..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/headless_tests.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/unittest.html">
-<link rel="import" href="/tracing/base/unittest/test_runner.html">
-<link rel="import" href="/tracing/base/unittest/text_test_results.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- if (!tr.isHeadless) {
- throw new Error('headless_tests.html only works in headless mode');
- }
- function quit(errCode) {
- if (tr.isVinn)
- global.quit(errCode);
- else
- process.exit(errCode);
- }
-
- function printSpacer() {
- console.log('\n\n------------------------------------------------------' +
- '----------------');
- }
- function loadAndRunTests(suiteRelpathsToLoad) {
- var results = new tr.b.unittest.TextTestResults();
-
- var loader = new tr.b.unittest.SuiteLoader(suiteRelpathsToLoad);
-
- var p = loader.allSuitesLoadedPromise;
-
- p = p.then(
- function didAllSuitesLoad() {
- var tests = loader.getAllTests().filter(function(testCase) {
- if (testCase instanceof tr.b.unittest.PerfTestCase)
- return false;
- return true;
- });
- if (tests.length === 0) {
- printSpacer();
- console.log('FAILED: No tests to run.');
- console.log(err.stack);
- quit(1);
- }
- var runner = new tr.b.unittest.TestRunner(results, tests);
- return runner.beginRunning();
- },
- function suiteLoadingFailure(err) {
- printSpacer();
- console.log('FAILED: A test suite failed to load.');
- console.log(err.stack);
- quit(1);
- });
-
- p = p.then(
- function didAllTestRun() {
- if (results.numTestsThatFailed > 0)
- quit(1);
- else
- quit(0);
- },
- function testHarnessError(e) {
- console.log('FAILED: A test harness error has ocurred.');
- console.log(e.stack);
- quit(1);
- });
- return p;
- }
-
- return {
- loadAndRunTests: loadAndRunTests
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/interval_tree.html b/chromium/third_party/catapult/tracing/tracing/base/interval_tree.html
deleted file mode 100644
index f8291dc45e4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/interval_tree.html
+++ /dev/null
@@ -1,349 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- function max(a, b) {
- if (a === undefined)
- return b;
- if (b === undefined)
- return a;
- return Math.max(a, b);
- }
-
- /**
- * This class implements an interval tree.
- * See: http://wikipedia.org/wiki/Interval_tree
- *
- * Internally the tree is a Red-Black tree. The insertion/colour is done using
- * the Left-leaning Red-Black Trees algorithm as described in:
- * http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf
- *
- * @param {function} beginPositionCb Callback to retrieve the begin position.
- * @param {function} endPositionCb Callback to retrieve the end position.
- *
- * @constructor
- */
- function IntervalTree(beginPositionCb, endPositionCb) {
- this.beginPositionCb_ = beginPositionCb;
- this.endPositionCb_ = endPositionCb;
-
- this.root_ = undefined;
- this.size_ = 0;
- }
-
- IntervalTree.prototype = {
- /**
- * Insert events into the interval tree.
- *
- * @param {Object} datum The object to insert.
- */
- insert: function(datum) {
- var startPosition = this.beginPositionCb_(datum);
- var endPosition = this.endPositionCb_(datum);
-
- var node = new IntervalTreeNode(datum,
- startPosition, endPosition);
- this.size_++;
-
- this.root_ = this.insertNode_(this.root_, node);
- this.root_.colour = Colour.BLACK;
- return datum;
- },
-
- insertNode_: function(root, node) {
- if (root === undefined)
- return node;
-
- if (root.leftNode && root.leftNode.isRed &&
- root.rightNode && root.rightNode.isRed)
- this.flipNodeColour_(root);
-
- if (node.key < root.key)
- root.leftNode = this.insertNode_(root.leftNode, node);
- else if (node.key === root.key)
- root.merge(node);
- else
- root.rightNode = this.insertNode_(root.rightNode, node);
-
- if (root.rightNode && root.rightNode.isRed &&
- (root.leftNode === undefined || !root.leftNode.isRed))
- root = this.rotateLeft_(root);
-
- if (root.leftNode && root.leftNode.isRed &&
- root.leftNode.leftNode && root.leftNode.leftNode.isRed)
- root = this.rotateRight_(root);
-
- return root;
- },
-
- rotateRight_: function(node) {
- var sibling = node.leftNode;
- node.leftNode = sibling.rightNode;
- sibling.rightNode = node;
- sibling.colour = node.colour;
- node.colour = Colour.RED;
- return sibling;
- },
-
- rotateLeft_: function(node) {
- var sibling = node.rightNode;
- node.rightNode = sibling.leftNode;
- sibling.leftNode = node;
- sibling.colour = node.colour;
- node.colour = Colour.RED;
- return sibling;
- },
-
- flipNodeColour_: function(node) {
- node.colour = this.flipColour_(node.colour);
- node.leftNode.colour = this.flipColour_(node.leftNode.colour);
- node.rightNode.colour = this.flipColour_(node.rightNode.colour);
- },
-
- flipColour_: function(colour) {
- return colour === Colour.RED ? Colour.BLACK : Colour.RED;
- },
-
- /* The high values are used to find intersection. It should be called after
- * all of the nodes are inserted. Doing it each insert is _slow_. */
- updateHighValues: function() {
- this.updateHighValues_(this.root_);
- },
-
- /* There is probably a smarter way to do this by starting from the inserted
- * node, but need to handle the rotations correctly. Went the easy route
- * for now. */
- updateHighValues_: function(node) {
- if (node === undefined)
- return undefined;
-
- node.maxHighLeft = this.updateHighValues_(node.leftNode);
- node.maxHighRight = this.updateHighValues_(node.rightNode);
-
- return max(max(node.maxHighLeft, node.highValue), node.maxHighRight);
- },
-
- validateFindArguments_: function(queryLow, queryHigh) {
- if (queryLow === undefined || queryHigh === undefined)
- throw new Error('queryLow and queryHigh must be defined');
- if ((typeof queryLow !== 'number') || (typeof queryHigh !== 'number'))
- throw new Error('queryLow and queryHigh must be numbers');
- },
-
- /**
- * Retrieve all overlapping intervals.
- *
- * @param {number} queryLow The low value for the intersection interval.
- * @param {number} queryHigh The high value for the intersection interval.
- * @return {Array} All [begin, end] pairs inside intersecting intervals.
- */
- findIntersection: function(queryLow, queryHigh) {
- this.validateFindArguments_(queryLow, queryHigh);
- if (this.root_ === undefined)
- return [];
-
- var ret = [];
- this.root_.appendIntersectionsInto_(ret, queryLow, queryHigh);
- return ret;
- },
-
- /**
- * Returns the number of nodes in the tree.
- */
- get size() {
- return this.size_;
- },
-
- /**
- * Returns the root node in the tree.
- */
- get root() {
- return this.root_;
- },
-
- /**
- * Dumps out the [lowValue, highValue] pairs for each node in depth-first
- * order.
- */
- dump_: function() {
- if (this.root_ === undefined)
- return [];
- return this.root_.dump();
- }
- };
-
- var Colour = {
- RED: 'red',
- BLACK: 'black'
- };
-
- function IntervalTreeNode(datum, lowValue, highValue) {
- this.lowValue_ = lowValue;
-
- this.data_ = [{
- datum: datum,
- high: highValue,
- low: lowValue
- }];
-
- this.colour_ = Colour.RED;
-
- this.parentNode_ = undefined;
- this.leftNode_ = undefined;
- this.rightNode_ = undefined;
-
- this.maxHighLeft_ = undefined;
- this.maxHighRight_ = undefined;
- }
-
- IntervalTreeNode.prototype = {
- appendIntersectionsInto_: function(ret, queryLow, queryHigh) {
- /* This node starts has a start point at or further right then queryHigh
- * so we know this node is out and all right children are out. Just need
- * to check left */
- if (this.lowValue_ >= queryHigh) {
- if (!this.leftNode_)
- return;
- return this.leftNode_.appendIntersectionsInto_(
- ret, queryLow, queryHigh);
- }
-
- /* If we have a maximum left high value that is bigger then queryLow we
- * need to check left for matches */
- if (this.maxHighLeft_ > queryLow) {
- this.leftNode_.appendIntersectionsInto_(ret, queryLow, queryHigh);
- }
-
- /* We know that this node starts before queryHigh, if any of it's data
- * ends after queryLow we need to add those nodes */
- if (this.highValue > queryLow) {
- for (var i = (this.data.length - 1); i >= 0; --i) {
- /* data nodes are sorted by high value, so as soon as we see one
- * before low value we're done. */
- if (this.data[i].high < queryLow)
- break;
-
- ret.push(this.data[i].datum);
- }
- }
-
- /* check for matches in the right tree */
- if (this.rightNode_) {
- this.rightNode_.appendIntersectionsInto_(ret, queryLow, queryHigh);
- }
- },
-
- get colour() {
- return this.colour_;
- },
-
- set colour(colour) {
- this.colour_ = colour;
- },
-
- get key() {
- return this.lowValue_;
- },
-
- get lowValue() {
- return this.lowValue_;
- },
-
- get highValue() {
- return this.data_[this.data_.length - 1].high;
- },
-
- set leftNode(left) {
- this.leftNode_ = left;
- },
-
- get leftNode() {
- return this.leftNode_;
- },
-
- get hasLeftNode() {
- return this.leftNode_ !== undefined;
- },
-
- set rightNode(right) {
- this.rightNode_ = right;
- },
-
- get rightNode() {
- return this.rightNode_;
- },
-
- get hasRightNode() {
- return this.rightNode_ !== undefined;
- },
-
- set parentNode(parent) {
- this.parentNode_ = parent;
- },
-
- get parentNode() {
- return this.parentNode_;
- },
-
- get isRootNode() {
- return this.parentNode_ === undefined;
- },
-
- set maxHighLeft(high) {
- this.maxHighLeft_ = high;
- },
-
- get maxHighLeft() {
- return this.maxHighLeft_;
- },
-
- set maxHighRight(high) {
- this.maxHighRight_ = high;
- },
-
- get maxHighRight() {
- return this.maxHighRight_;
- },
-
- get data() {
- return this.data_;
- },
-
- get isRed() {
- return this.colour_ === Colour.RED;
- },
-
- merge: function(node) {
- for (var i = 0; i < node.data.length; i++)
- this.data_.push(node.data[i]);
- this.data_.sort(function(a, b) {
- return a.high - b.high;
- });
- },
-
- dump: function() {
- var ret = {};
- if (this.leftNode_)
- ret['left'] = this.leftNode_.dump();
-
- ret['data'] = this.data_.map(function(d) { return [d.low, d.high]; });
-
- if (this.rightNode_)
- ret['right'] = this.rightNode_.dump();
-
- return ret;
- }
- };
-
- return {
- IntervalTree: IntervalTree
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/interval_tree_test.html b/chromium/third_party/catapult/tracing/tracing/base/interval_tree_test.html
deleted file mode 100644
index dad90c45274..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/interval_tree_test.html
+++ /dev/null
@@ -1,236 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/interval_tree.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function SimpleIntervalTree() {
- tr.b.IntervalTree.call(this,
- function(s) { return s.start; },
- function(s) { return s.end; });
- return this;
- }
- SimpleIntervalTree.prototype = {
- __proto__: tr.b.IntervalTree.prototype
- };
-
- function buildSimpleTree() {
- var tree = new SimpleIntervalTree();
- tree.v0 = tree.insert({start: 2, end: 6});
- tree.v1 = tree.insert({start: 1, end: 3});
- tree.v2 = tree.insert({start: 5, end: 7});
- tree.v3 = tree.insert({start: 1, end: 5});
- tree.v4 = tree.insert({start: 3, end: 5});
- tree.v5 = tree.insert({start: 3, end: 5});
- tree.v6 = tree.insert({start: 3, end: 6});
- tree.v7 = tree.insert({start: 1, end: 1});
- tree.v8 = tree.insert({start: 4, end: 8});
- tree.v9 = tree.insert({start: 0, end: 2});
-
- tree.updateHighValues();
-
- return tree;
- }
-
- function sortSimpleResults(intersection) {
- intersection.sort(function(a, b) {
- if (a.start === b.start)
- return a.end - b.end;
- return a.start - b.start;
- });
- }
-
- test('findIntersection', function() {
- var tree = buildSimpleTree();
- var intersection = tree.findIntersection(2, 4);
- sortSimpleResults(intersection);
-
- var expected = [tree.v1, tree.v3, tree.v0, tree.v4, tree.v5, tree.v6];
- assert.equal(intersection.length, 6);
- assert.deepEqual(intersection, expected);
- });
-
- test('findIntersection_zeroDuration', function() {
- var tree = buildSimpleTree();
- var intersection = tree.findIntersection(2, 2);
- sortSimpleResults(intersection);
-
- var expected = [tree.v1, tree.v3];
- assert.equal(intersection.length, 2);
- assert.deepEqual(intersection, expected);
- });
-
- test('findIntersection_noMatching', function() {
- var tree = buildSimpleTree();
- var intersection = tree.findIntersection(9, 10);
- assert.deepEqual(intersection, []);
- });
-
- test('findIntersection_emptyTree', function() {
- var tree = new tr.b.IntervalTree();
- tree.updateHighValues();
-
- var intersection = tree.findIntersection(2, 4);
- assert.deepEqual(intersection, []);
- });
-
- test('findIntersection_emptyInterval', function() {
- var tree = new tr.b.IntervalTree();
- tree.updateHighValues();
-
- assert.throws(function() {
- tree.findIntersection();
- });
- assert.throws(function() {
- tree.findIntersection(1);
- });
- assert.throws(function() {
- tree.findIntersection('a', 'b');
- });
- });
-
- test('insert', function() {
- var tree = new tr.b.IntervalTree(
- function(s) { return s.start; },
- function(s) { return s.end; });
-
- assert.equal(tree.size, 0);
-
- tree.insert({start: 1, end: 4});
- tree.insert({start: 3, end: 5});
- tree.updateHighValues();
-
- var outTree = {
- 'left': {
- 'data': [[1, 4]]
- },
- 'data': [[3, 5]]
- };
-
- assert.equal(tree.size, 2);
- assert.deepEqual(tree.dump_(), outTree);
- });
-
- test('insert_withoutEnd', function() {
- var tree = new tr.b.IntervalTree(
- function(s) { return s.start; },
- function(s) { return s.end; });
-
- assert.equal(tree.size, 0);
-
- tree.insert({start: 3, end: 5});
- tree.insert({start: 1, end: 4});
- tree.updateHighValues();
-
- var outTree = {
- 'left': {
- 'data': [[1, 4]]
- },
- 'data': [[3, 5]]
- };
-
- assert.equal(tree.size, 2);
- assert.deepEqual(tree.dump_(), outTree);
- });
-
- test('insert_balancesTree', function() {
- var tree = new tr.b.IntervalTree(
- function(s) { return s.start; },
- function(s) { return s.end; });
-
- assert.equal(tree.size, 0);
-
- for (var i = 0; i < 10; ++i)
- tree.insert({start: i, end: 5});
- tree.updateHighValues();
-
- var outTree = {
- 'left': {
- 'left': {
- 'data': [[0, 5]]
- },
- 'data': [[1, 5]],
- 'right': {
- 'data': [[2, 5]]
- }
- },
- 'data': [[3, 5]],
- 'right': {
- 'left': {
- 'left': {
- 'data': [[4, 5]]
- },
- 'data': [[5, 5]],
- 'right': {
- 'data': [[6, 5]]
- }
- },
- 'data': [[7, 5]],
- 'right': {
- 'left': {
- 'data': [[8, 5]]
- },
- 'data': [[9, 5]]
- }
- }
- };
-
- assert.deepEqual(tree.dump_(), outTree);
- });
-
- test('insert_withDuplicateIntervals', function() {
- var tree = new tr.b.IntervalTree(
- function(s) { return s.start; },
- function(s) { return s.end; });
-
- assert.equal(tree.size, 0);
-
- tree.insert({start: 1, end: 4});
- tree.insert({start: 3, end: 5});
- tree.insert({start: 3, end: 5});
- tree.insert({start: 3, end: 6});
- tree.updateHighValues();
-
- var outTree = {
- 'left': {
- 'data': [[1, 4]]
- },
- 'data': [[3, 5], [3, 5], [3, 6]]
- };
-
- assert.equal(tree.size, 4);
- assert.deepEqual(tree.dump_(), outTree);
- });
-
- test('insert_updatesHighValues', function() {
- var tree = buildSimpleTree();
-
- var expected = [
- [undefined, undefined],
- [2, undefined],
- [5, 8],
- [undefined, undefined],
- [6, 7],
- [undefined, undefined]
- ];
-
- var result = [];
- function walk(node) {
- if (node === undefined)
- return;
-
- walk(node.leftNode);
- result.push([node.maxHighLeft, node.maxHighRight]);
- walk(node.rightNode);
- }
- walk(tree.root);
-
- assert.deepEqual(result, expected);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/iteration_helpers.html b/chromium/third_party/catapult/tracing/tracing/base/iteration_helpers.html
deleted file mode 100644
index d3e8bf7a4df..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/iteration_helpers.html
+++ /dev/null
@@ -1,472 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
-
- /**
- * Converts any object which is either (a) an iterable, or (b) an
- * "array-ish" object (has length property and can be indexed into)
- * into an array.
- */
- function asArray(x) {
- var values = [];
- if (x[Symbol.iterator])
- for (var value of x)
- values.push(value);
- else
- for (var i = 0; i < x.length; i++)
- values.push(x[i]);
- return values;
- }
-
- /**
- * Returns the only element in the iterable. If the iterable is empty or has
- * more than one element, an error is thrown.
- */
- function getOnlyElement(iterable) {
- var iterator = iterable[Symbol.iterator]();
-
- var firstIteration = iterator.next();
- if (firstIteration.done)
- throw new Error('getOnlyElement was passed an empty iterable.');
-
- var secondIteration = iterator.next();
- if (!secondIteration.done)
- throw new Error(
- 'getOnlyElement was passed an iterable with multiple elements.');
-
- return firstIteration.value;
- }
-
- /**
- * Returns the first element in the iterable. If the iterable is empty, an
- * error is thrown.
- */
- function getFirstElement(iterable) {
- var iterator = iterable[Symbol.iterator]();
- var result = iterator.next();
- if (result.done)
- throw new Error('getFirstElement was passed an empty iterable.');
-
- return result.value;
- }
-
- function compareArrays(x, y, elementCmp) {
- var minLength = Math.min(x.length, y.length);
- for (var i = 0; i < minLength; i++) {
- var tmp = elementCmp(x[i], y[i]);
- if (tmp)
- return tmp;
- }
- if (x.length === y.length)
- return 0;
-
- if (x[i] === undefined)
- return -1;
-
- return 1;
- }
-
- /**
- * Compares two values when one or both might be undefined. Undefined
- * values are sorted after defined.
- */
- function comparePossiblyUndefinedValues(x, y, cmp, opt_this) {
- if (x !== undefined && y !== undefined)
- return cmp.call(opt_this, x, y);
- if (x !== undefined)
- return -1;
- if (y !== undefined)
- return 1;
- return 0;
- }
-
- /**
- * Compares two numeric values when one or both might be undefined or NaNs.
- * Undefined / NaN values are sorted after others.
- */
- function compareNumericWithNaNs(x, y) {
- if (!isNaN(x) && !isNaN(y))
- return x - y;
- if (isNaN(x))
- return 1;
- if (isNaN(y))
- return -1;
- return 0;
- }
-
- function concatenateArrays(/*arguments*/) {
- var values = [];
- for (var i = 0; i < arguments.length; i++) {
- if (!(arguments[i] instanceof Array))
- throw new Error('Arguments ' + i + 'is not an array');
- values.push.apply(values, arguments[i]);
- }
- return values;
- }
-
- function concatenateObjects(/*arguments*/) {
- var result = {};
- for (var i = 0; i < arguments.length; i++) {
- var object = arguments[i];
- for (var j in object) {
- result[j] = object[j];
- }
- }
- return result;
- }
-
- function cloneDictionary(dict) {
- var clone = {};
- for (var k in dict) {
- clone[k] = dict[k];
- }
- return clone;
- }
-
- function dictionaryKeys(dict) {
- var keys = [];
- for (var key in dict)
- keys.push(key);
- return keys;
- }
-
- function dictionaryValues(dict) {
- var values = [];
- for (var key in dict)
- values.push(dict[key]);
- return values;
- }
-
- function dictionaryLength(dict) {
- var n = 0;
- for (var key in dict)
- n++;
- return n;
- }
-
- function dictionaryContainsValue(dict, value) {
- for (var key in dict)
- if (dict[key] === value)
- return true;
- return false;
- }
-
- /**
- * Returns true if all the elements of the iterable pass the predicate.
- */
- function every(iterable, predicate) {
- for (var x of iterable)
- if (!predicate(x))
- return false;
- return true;
- }
-
- /**
- * Returns a new dictionary with items grouped by the return value of the
- * specified function being called on each item.
- * @param {!Array.<!*>} ary The array being iterated through
- * @param {!function(!*):!*} callback The mapping function between the array
- * value and the map key.
- * @param {*=} opt_this
- */
- function group(ary, callback, opt_this, opt_arrayConstructor) {
- var arrayConstructor = opt_arrayConstructor || Array;
- var results = {};
- for (var element of ary) {
- var key = callback.call(opt_this, element);
- if (!(key in results))
- results[key] = new arrayConstructor();
- results[key].push(element);
- }
- return results;
- }
-
- /**
- * Returns a new Map with items grouped by the return value of the
- * specified function being called on each item.
- * @param {!Array.<!*>} ary The array being iterated through
- * @param {!function(!*):!*} callback The mapping function between the array
- * value and the map key.
- * @param {*=} opt_this
- */
- function groupIntoMap(ary, callback, opt_this, opt_arrayConstructor) {
- var arrayConstructor = opt_arrayConstructor || Array;
- var results = new Map();
- for (var element of ary) {
- var key = callback.call(opt_this, element);
- var items = results.get(key);
- if (items === undefined) {
- items = new arrayConstructor();
- results.set(key, items);
- }
- items.push(element);
- }
- return results;
- }
-
- function iterItems(dict, fn, opt_this) {
- opt_this = opt_this || this;
- var keys = Object.keys(dict);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- fn.call(opt_this, key, dict[key]);
- }
- }
-
- /**
- * Create a new dictionary with the same keys as the original dictionary
- * mapped to the results of the provided function called on the corresponding
- * entries in the original dictionary, i.e. result[key] = fn(key, dict[key])
- * for all keys in dict (own enumerable properties only).
- *
- * Example:
- * var srcDict = {a: 10, b: 15};
- * var dstDict = mapItems(srcDict, function(k, v) { return 2 * v; });
- * // srcDict is unmodified and dstDict is now equal to {a: 20, b: 30}.
- */
- function mapItems(dict, fn, opt_this) {
- opt_this = opt_this || this;
- var result = {};
- var keys = Object.keys(dict);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- result[key] = fn.call(opt_this, key, dict[key]);
- }
- return result;
- }
-
- function filterItems(dict, predicate, opt_this) {
- opt_this = opt_this || this;
- var result = {};
- var keys = Object.keys(dict);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = dict[key];
- if (predicate.call(opt_this, key, value))
- result[key] = value;
- }
- return result;
- }
-
- function iterObjectFieldsRecursively(object, func) {
- if (!(object instanceof Object))
- return;
-
- if (object instanceof Array) {
- for (var i = 0; i < object.length; i++) {
- func(object, i, object[i]);
- iterObjectFieldsRecursively(object[i], func);
- }
- return;
- }
-
- for (var key in object) {
- var value = object[key];
- func(object, key, value);
- iterObjectFieldsRecursively(value, func);
- }
- }
-
- /**
- * Convert an array of dictionaries to a dictionary of arrays.
- *
- * The keys of the resulting dictionary are a union of the keys of all
- * dictionaries in the provided array. Each array in the resulting dictionary
- * has the same length as the provided array and contains the values of its
- * key in the dictionaries in the provided array. Example:
- *
- * INPUT:
- *
- * [
- * {a: 6, b: 5 },
- * undefined,
- * {a: 4, b: 3, c: 2},
- * { b: 1, c: 0}
- * ]
- *
- * OUTPUT:
- *
- * {
- * a: [6, undefined, 4, undefined],
- * b: [5, undefined, 3, 1 ],
- * c: [undefined, undefined, 2, 0 ]
- * }
- *
- * @param {!Array} array Array of items to be inverted. If opt_dictGetter
- * is not provided, all elements of the array must be either undefined,
- * or dictionaries.
- * @param {?(function(*): (!Object|undefined))=} opt_dictGetter Optional
- * function mapping defined elements of array to dictionaries.
- * @param {*=} opt_this Optional 'this' context for opt_dictGetter.
- */
- function invertArrayOfDicts(array, opt_dictGetter, opt_this) {
- opt_this = opt_this || this;
- var result = {};
- for (var i = 0; i < array.length; i++) {
- var item = array[i];
- if (item === undefined)
- continue;
- var dict = opt_dictGetter ? opt_dictGetter.call(opt_this, item) : item;
- if (dict === undefined)
- continue;
- for (var key in dict) {
- var valueList = result[key];
- if (valueList === undefined)
- result[key] = valueList = new Array(array.length);
- valueList[i] = dict[key];
- }
- }
- return result;
- }
-
- /**
- * Convert an array to a dictionary.
- *
- * Every element in the array is mapped in the dictionary to the key returned
- * by the provided function:
- *
- * dictionary[valueToKeyFn(element)] = element;
- *
- * @param {!Array} array Arbitrary array.
- * @param {function(*): string} valueToKeyFn Function mapping array elements
- * to dictionary keys.
- * @param {*=} opt_this Optional 'this' context for valueToKeyFn.
- */
- function arrayToDict(array, valueToKeyFn, opt_this) {
- opt_this = opt_this || this;
- var result = {};
- var length = array.length;
- for (var i = 0; i < length; i++) {
- var value = array[i];
- var key = valueToKeyFn.call(opt_this, value);
- result[key] = value;
- }
- return result;
- }
-
- /** Returns the value passed in. */
- function identity(d) {
- return d;
- }
-
- /**
- * Returns the index of the first element in |ary| for which |opt_func|
- * returns a truthy value.
- *
- * @param {!Array} ary The array being searched
- * @param {function(*): *=} opt_func The test function which accepts an array
- * element and returns a value that is coerced to a boolean. Defaults to
- * the identity function.
- * @param {*=} opt_this Optional 'this' context for opt_func.
- */
- function findFirstIndexInArray(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- for (var i = 0; i < ary.length; i++) {
- if (func.call(opt_this, ary[i], i))
- return i;
- }
- return -1;
- }
-
- /**
- * Returns the value of the first element in |ary| for which |opt_func|
- * returns a truthy value.
- *
- * @param {!Array} ary The array being searched.
- * @param {function(*): *=} opt_func The test function which accepts an array
- * element and returns a value that is coerced to a boolean. Defaults to
- * the identity function.
- * @param {*=} opt_this Optional 'this' context for opt_func.
- */
- function findFirstInArray(ary, opt_func, opt_this) {
- var i = findFirstIndexInArray(ary, opt_func, opt_func);
- if (i === -1)
- return undefined;
- return ary[i];
- }
-
- /**
- * Returns the key of the first dictionary entry for which |opt_func| returns
- * a truthy value.
- *
- * @param {!Object} dict The dictionary being searched.
- * @param {function(*, *): *=} opt_func The test function which accepts a
- * dictionary key as its first parameter, the corresponding dictionary
- * value as its second parameter, and returns a value that is coerced to a
- * boolean. Defaults to the identity function (which returns the key).
- * @param {*=} opt_this Optional 'this' context for opt_func.
- */
- function findFirstKeyInDictMatching(dict, opt_func, opt_this) {
- var func = opt_func || identity;
- for (var key in dict) {
- if (func.call(opt_this, key, dict[key]))
- return key;
- }
- return undefined;
- }
-
- /** Returns the values in an ES6 Map object. */
- function mapValues(map) {
- var values = [];
- for (var value of map.values())
- values.push(value);
- return values;
- }
-
- /**
- * Calls |fn| on each entry in an ES6 Map.
- *
- * @param {!Map} The map whose entries are being processed.
- * @param {function(*, *): *} The function which accepts a map key as its
- * first parameter and a map value as its second parameter. Any return
- * value is ignored.
- * @param {*=} opt_this Optional 'this' context for fn.
- */
- function iterMapItems(map, fn, opt_this) {
- opt_this = opt_this || this;
- for (var key of map.keys())
- fn.call(opt_this, key, map.get(key));
- }
-
- return {
- asArray: asArray,
- concatenateArrays: concatenateArrays,
- concatenateObjects: concatenateObjects,
- compareArrays: compareArrays,
- comparePossiblyUndefinedValues: comparePossiblyUndefinedValues,
- compareNumericWithNaNs: compareNumericWithNaNs,
- cloneDictionary: cloneDictionary,
- dictionaryLength: dictionaryLength,
- dictionaryKeys: dictionaryKeys,
- dictionaryValues: dictionaryValues,
- dictionaryContainsValue: dictionaryContainsValue,
- every: every,
- getOnlyElement: getOnlyElement,
- getFirstElement: getFirstElement,
- group: group,
- groupIntoMap: groupIntoMap,
- iterItems: iterItems,
- mapItems: mapItems,
- filterItems: filterItems,
- iterObjectFieldsRecursively: iterObjectFieldsRecursively,
- invertArrayOfDicts: invertArrayOfDicts,
- arrayToDict: arrayToDict,
- identity: identity,
- findFirstIndexInArray: findFirstIndexInArray,
- findFirstInArray: findFirstInArray,
- findFirstKeyInDictMatching: findFirstKeyInDictMatching,
- mapValues: mapValues,
- iterMapItems: iterMapItems
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/iteration_helpers_test.html b/chromium/third_party/catapult/tracing/tracing/base/iteration_helpers_test.html
deleted file mode 100644
index 28d030b5db3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/iteration_helpers_test.html
+++ /dev/null
@@ -1,351 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var comparePossiblyUndefinedValues = tr.b.comparePossiblyUndefinedValues;
- var compareArrays = tr.b.compareArrays;
- var asArray = tr.b.asArray;
- var getOnlyElement = tr.b.getOnlyElement;
- var every = tr.b.every;
- var getFirstElement = tr.b.getFirstElement;
-
- test('asArray_indexed', function() {
- assert.deepEqual(asArray({'0': 2, '1': 4, '2': 6, 'length': 3}), [2, 4, 6]);
- });
-
- test('asArray_iterable', function() {
- function *iterfunc() {
- yield 2;
- yield 4;
- yield 6;
- }
- assert.deepEqual(asArray({[Symbol.iterator]: iterfunc}), [2, 4, 6]);
- });
-
- test('comparePossiblyUndefinedValues', function() {
- function cmp(x, y) {
- assert.isDefined(x);
- assert.isDefined(y);
- return x - y;
- }
-
- assert.isBelow(comparePossiblyUndefinedValues(0, 1, cmp), 0);
- assert.isAbove(comparePossiblyUndefinedValues(1, 0, cmp), 0);
- assert.equal(comparePossiblyUndefinedValues(1, 1, cmp), 0);
-
- assert.isBelow(comparePossiblyUndefinedValues(0, undefined, cmp), 0);
- assert.isAbove(comparePossiblyUndefinedValues(undefined, 0, cmp), 0);
- assert.equal(comparePossiblyUndefinedValues(undefined, undefined, cmp), 0);
- });
-
- test('compareArrays', function() {
- function cmp(x, y) {
- assert.isDefined(x);
- assert.isDefined(y);
- return x - y;
- }
-
- assert.isBelow(compareArrays([1], [2], cmp), 0);
- assert.isAbove(compareArrays([2], [1], cmp), 0);
-
- assert.isBelow(compareArrays([1], [1, 2], cmp), 0);
- assert.isAbove(compareArrays([1, 2], [1], cmp), 0);
-
- assert.isBelow(compareArrays([], [1], cmp), 0);
- assert.isAbove(compareArrays([1], [], cmp), 0);
-
- assert.isAbove(compareArrays([2], [1], cmp), 0);
-
- assert.equal(compareArrays([], [], cmp), 0);
- assert.equal(compareArrays([1], [1], cmp), 0);
- });
-
- test('every_empty', function() {
- assert.isTrue(every([], x => false));
- });
-
- test('every_true', function() {
- assert.isTrue(every([2, 4, 6], x => x % 2 === 0));
- });
-
- test('every_false', function() {
- assert.isTrue(!every([2, 3, 4], x => x % 2 === 0));
- });
-
- test('getOnlyElement_throwsIfEmpty', function() {
- assert.throws(() => getOnlyElement([]),
- 'getOnlyElement was passed an empty iterable.');
- });
-
- test('getOnlyElement_oneItem', function() {
- assert.equal(getOnlyElement([1]), 1);
- });
-
- test('getOnlyElement_twoItems', function() {
- assert.throws(() => getOnlyElement([1, 2]),
- 'getOnlyElement was passed an iterable with multiple elements.');
- });
-
- test('getFirstElement_throwsIfEmpty', function() {
- assert.throws(() => getFirstElement([]),
- 'getFirstElement was passed an empty iterable.');
- });
-
- test('getFirstElement_oneItem', function() {
- assert.equal(getFirstElement([1]), 1);
- });
-
- test('getFirstElement_twoItems', function() {
- assert.equal(getFirstElement([1, 2]), 1);
- });
-
- test('group', function() {
- // Empty array
- var srcArray = [];
- var fn = function(curr) { return (curr % 2); };
- var dstDict = {};
-
- assert.deepEqual(tr.b.group(srcArray, fn), dstDict);
-
- // Non-empty array
- var srcArray = [0, 1, 2, 3, 4, 5, 6];
- var dstDict = {
- 0: [0, 2, 4, 6],
- 1: [1, 3, 5]
- };
-
- assert.deepEqual(tr.b.group(srcArray, fn), dstDict);
- });
-
- test('groupIntoMap', function() {
- // Empty array
- var srcArray = [];
- var fn = function(curr) { return (curr % 2); };
- var dstDict = {};
-
- assert.deepEqual(tr.b.groupIntoMap(srcArray, fn), dstDict);
-
- // Non-empty array
- var srcArray = [0, 1, 2, 3, 4, 5, 6];
- var dstMap = new Map([
- [0, [0, 2, 4, 6]],
- [1, [1, 3, 5]]
- ]);
-
- assert.deepEqual(tr.b.groupIntoMap(srcArray, fn), dstMap);
- });
-
- test('mapItems', function() {
- // Empty dictionary.
- var srcDict = {};
- var dstDict = tr.b.mapItems(srcDict, function(key, value) {
- return value;
- });
- assert.lengthOf(Object.keys(srcDict), 0);
- assert.lengthOf(Object.keys(dstDict), 0);
- assert.notStrictEqual(dstDict, srcDict);
-
- // Non-empty dictionary.
- var srcDict = {a: 0, b: 30};
- var dstDict = tr.b.mapItems(srcDict, function(key, value) {
- return 9 * value / 5 + 32;
- });
- assert.lengthOf(Object.keys(srcDict), 2);
- assert.equal(srcDict.a, 0);
- assert.equal(srcDict.b, 30);
- assert.lengthOf(Object.keys(dstDict), 2);
- assert.equal(dstDict.a, 32);
- assert.equal(dstDict.b, 86);
- assert.notStrictEqual(dstDict, srcDict);
-
- // Optional 'this' argument.
- var srcDict = {c: '?', d: '!', e: '.'};
- var dstDict = tr.b.mapItems(srcDict, function(key, value) {
- return key + this.delimiter + value;
- }, {delimiter: '='});
- assert.lengthOf(Object.keys(srcDict), 3);
- assert.equal(srcDict.c, '?');
- assert.equal(srcDict.d, '!');
- assert.equal(srcDict.e, '.');
- assert.lengthOf(Object.keys(dstDict), 3);
- assert.equal(dstDict.c, 'c=?');
- assert.equal(dstDict.d, 'd=!');
- assert.equal(dstDict.e, 'e=.');
- assert.notStrictEqual(dstDict, srcDict);
-
- // Inherited properties should not be mapped.
- var srcDict = {__proto__: {a: 10}};
- var dstDict = tr.b.mapItems(srcDict, function(key, value) {
- return value;
- });
- assert.lengthOf(Object.keys(srcDict), 0);
- assert.lengthOf(Object.keys(dstDict), 0);
- });
-
- test('filterItemsSimple', function() {
- var someThisArg = {};
- var srcDict = {a: 0, b: 30};
- var dstDict = tr.b.filterItems(srcDict, function(key, value) {
- assert.equal(this, someThisArg);
- return value >= 30;
- }, someThisArg);
- assert.lengthOf(Object.keys(dstDict), 1);
- assert.equal(dstDict.b, 30);
- });
-
- test('filterItemsInheritedProps', function() {
- var srcDict = {
- a: 0,
- b: 30,
- __proto__: {
- c: 40
- }
- };
- var dstDict = tr.b.filterItems(srcDict, function(key, value) {
- return value >= 30;
- });
- assert.lengthOf(Object.keys(dstDict), 1);
- assert.equal(dstDict.b, 30);
- });
-
- test('invertArrayOfDicts_defaultGetter', function() {
- var array = [
- {a: 6, b: 5},
- undefined,
- {a: 4, b: 3, c: 2},
- {b: 1, c: 0}
- ];
- var dict = tr.b.invertArrayOfDicts(array);
- assert.sameMembers(Object.keys(dict), ['a', 'b', 'c']);
- assert.deepEqual(tr.b.asArray(dict['a']), [6, undefined, 4, undefined]);
- assert.deepEqual(tr.b.asArray(dict['b']), [5, undefined, 3, 1]);
- assert.deepEqual(tr.b.asArray(dict['c']), [undefined, undefined, 2, 0]);
- });
-
- test('invertArrayOfDicts_customGetter', function() {
- var fakeThis = { itemToDict: JSON.parse };
- var array = [
- '{"a": "test", "b": true}',
- '{}',
- '{invalid-json}',
- '{"a": 42, "c": false}'
- ];
- var dict = tr.b.invertArrayOfDicts(array, function(item) {
- try {
- return this.itemToDict(item);
- } catch (e) {
- return undefined;
- }
- }, fakeThis);
- assert.sameMembers(Object.keys(dict), ['a', 'b', 'c']);
- assert.deepEqual(
- tr.b.asArray(dict['a']), ['test', undefined, undefined, 42]);
- assert.deepEqual(
- tr.b.asArray(dict['b']), [true, undefined, undefined, undefined]);
- assert.deepEqual(
- tr.b.asArray(dict['c']), [undefined, undefined, undefined, false]);
- });
-
- test('arrayToDict', function() {
- var fakeThis = { prefix: 'key_' };
- var array = [5, undefined, 'test'];
- var dict = tr.b.arrayToDict(array, function(value) {
- return this.prefix + value;
- }, fakeThis);
- assert.deepEqual(dict, {
- 'key_5': 5,
- 'key_undefined': undefined,
- 'key_test': 'test'
- });
- });
-
- test('identity', function() {
- // Undefined value.
- assert.isUndefined(tr.b.identity(undefined));
-
- // Primitive value.
- assert.equal(tr.b.identity(-273.15), -273.15);
-
- // List.
- var list = ['list', 'with', 1, undefined, 'value'];
- assert.strictEqual(tr.b.identity(list), list);
-
- // Object.
- var object = {'hasItems': true};
- assert.strictEqual(tr.b.identity(object), object);
- });
-
- test('findFirstKeyInDictMatching', function() {
- var dict = {a: 1, b: 2, c: 3};
-
- var that = this;
- var k = tr.b.findFirstKeyInDictMatching(dict, function(key, value) {
- assert.equal(this, that);
- return value === 2;
- }, this);
- assert.equal(k, 'b');
-
- var k = tr.b.findFirstKeyInDictMatching(dict, function(key, value) {
- assert.equal(this, that);
- return false;
- }, this);
- assert.equal(k, undefined);
- });
-
- test('dictionaryContainsValue', function() {
- var emptyDict = {};
- assert.isFalse(tr.b.dictionaryContainsValue(emptyDict, 'missing'));
-
- var nonEmptyDict = {a: 42, b: 'value'};
- assert.isTrue(tr.b.dictionaryContainsValue(nonEmptyDict, 42));
- assert.isTrue(tr.b.dictionaryContainsValue(nonEmptyDict, 'value'));
- assert.isFalse(tr.b.dictionaryContainsValue(nonEmptyDict, 'a'));
- assert.isFalse(tr.b.dictionaryContainsValue(nonEmptyDict, 'b'));
- assert.isFalse(tr.b.dictionaryContainsValue(nonEmptyDict, 'missing'));
- });
-
- test('mapValues', function() {
- var map = new Map();
- map.set('a', 1);
- map.set('b', 2);
- map.set('c', 3);
- var values = tr.b.mapValues(map);
- assert.strictEqual(values.length, 3);
- assert.sameMembers([1, 2, 3], values);
- });
-
- test('iterMapItems', function() {
- var map = new Map();
- map.set('a', 'aa');
- map.set('b', 'bb');
- map.set('c', 'cc');
- var counter = 0;
- var keyCheck = ['a', 'b', 'c'];
- var valueCheck = ['aa', 'bb', 'cc'];
- tr.b.iterMapItems(map, function(key, value) {
- assert.strictEqual(key, keyCheck[counter]);
- assert.strictEqual(value, valueCheck[counter]);
- ++counter;
- });
- assert.strictEqual(counter, 3);
-
- // Optional 'this' argument.
- var retObj = {delimiter: '=', result: {}};
- assert.lengthOf(Object.keys(retObj.result), 0);
- tr.b.iterMapItems(map, function(key, value) {
- this.result[key] = key + this.delimiter + value;
- }, retObj);
- assert.lengthOf(Object.keys(retObj.result), 3);
- assert.equal(retObj.result.a, 'a=aa');
- assert.equal(retObj.result.b, 'b=bb');
- assert.equal(retObj.result.c, 'c=cc');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/math.html b/chromium/third_party/catapult/tracing/tracing/base/math.html
deleted file mode 100644
index 8480bbb7120..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/math.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script src="/gl-matrix-min.js"></script>
-
-<script>
-'use strict';
-
-// In node, the script-src for gl-matrix-min above brings in glmatrix into
-// a module, instead of into the global scope. Whereas, Tracing code
-// assumes that glMatrix is in the global scope. So, in Node only, we
-// require() it in, and then take all its exports and shove them into the
-// global scope by hand.
-(function(global) {
- if (tr.isNode) {
- var glMatrixAbsPath = HTMLImportsLoader.hrefToAbsolutePath(
- '/gl-matrix-min.js');
- var glMatrixModule = require(glMatrixAbsPath);
- for (var exportName in glMatrixModule) {
- global[exportName] = glMatrixModule[exportName];
- }
- }
-})(this);
-</script>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- /* Returns true when x and y are within delta of each other. */
- function approximately(x, y, delta) {
- if (delta === undefined)
- delta = 1e-9;
- return Math.abs(x - y) < delta;
- }
-
- function clamp(x, lo, hi) {
- return Math.min(Math.max(x, lo), hi);
- }
-
- function lerp(percentage, lo, hi) {
- var range = hi - lo;
- return lo + percentage * range;
- }
-
- function normalize(value, lo, hi) {
- return (value - lo) / (hi - lo);
- }
-
- function deg2rad(deg) {
- return (Math.PI * deg) / 180.0;
- }
-
- /* The Gauss error function gives the probability that a measurement (which is
- * under the influence of normally distributed errors with standard deviation
- * sigma = 1) is less than x from the mean value of the standard normal
- * distribution.
- * https://www.desmos.com/calculator/t1v4bdpske
- *
- * @param {number} x A tolerance for error.
- * @return {number} The probability that a measurement is less than |x| from
- * the mean value of the standard normal distribution.
- */
- function erf(x) {
- // save the sign of x
- // erf(-x) = -erf(x);
- var sign = (x >= 0) ? 1 : -1;
- x = Math.abs(x);
-
- // constants
- var a1 = 0.254829592;
- var a2 = -0.284496736;
- var a3 = 1.421413741;
- var a4 = -1.453152027;
- var a5 = 1.061405429;
- var p = 0.3275911;
-
- // Abramowitz and Stegun formula 7.1.26
- // maximum error: 1.5e-7
- var t = 1.0 / (1.0 + p * x);
- var y = 1.0 - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t *
- Math.exp(-x * x);
- return sign * y;
- }
-
- var tmpVec2 = vec2.create();
- var tmpVec2b = vec2.create();
- var tmpVec4 = vec4.create();
- var tmpMat2d = mat2d.create();
-
- vec2.createFromArray = function(arr) {
- if (arr.length !== 2)
- throw new Error('Should be length 2');
- var v = vec2.create();
- vec2.set(v, arr[0], arr[1]);
- return v;
- };
-
- vec2.createXY = function(x, y) {
- var v = vec2.create();
- vec2.set(v, x, y);
- return v;
- };
-
- vec2.toString = function(a) {
- return '[' + a[0] + ', ' + a[1] + ']';
- };
-
- vec2.addTwoScaledUnitVectors = function(out, u1, scale1, u2, scale2) {
- // out = u1 * scale1 + u2 * scale2
- vec2.scale(tmpVec2, u1, scale1);
- vec2.scale(tmpVec2b, u2, scale2);
- vec2.add(out, tmpVec2, tmpVec2b);
- };
-
- vec2.interpolatePiecewiseFunction = function(points, x) {
- if (x < points[0][0])
- return points[0][1];
- for (var i = 1; i < points.length; ++i) {
- if (x < points[i][0]) {
- var percent = normalize(x, points[i - 1][0], points[i][0]);
- return lerp(percent, points[i - 1][1], points[i][1]);
- }
- }
- return points[points.length - 1][1];
- };
-
- vec3.createXYZ = function(x, y, z) {
- var v = vec3.create();
- vec3.set(v, x, y, z);
- return v;
- };
-
- vec3.toString = function(a) {
- return 'vec3(' + a[0] + ', ' + a[1] + ', ' + a[2] + ')';
- };
-
- mat2d.translateXY = function(out, x, y) {
- vec2.set(tmpVec2, x, y);
- mat2d.translate(out, out, tmpVec2);
- };
-
- mat2d.scaleXY = function(out, x, y) {
- vec2.set(tmpVec2, x, y);
- mat2d.scale(out, out, tmpVec2);
- };
-
- vec4.unitize = function(out, a) {
- out[0] = a[0] / a[3];
- out[1] = a[1] / a[3];
- out[2] = a[2] / a[3];
- out[3] = 1;
- return out;
- };
-
- vec2.copyFromVec4 = function(out, a) {
- vec4.unitize(tmpVec4, a);
- vec2.copy(out, tmpVec4);
- };
-
- return {
- approximately: approximately,
- clamp: clamp,
- lerp: lerp,
- normalize: normalize,
- deg2rad: deg2rad,
- erf: erf
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/math_test.html b/chromium/third_party/catapult/tracing/tracing/base/math_test.html
deleted file mode 100644
index d342aad5f66..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/math_test.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/math.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('erf', function() {
- assert.closeTo(-1, tr.b.erf(-1e10), 1e-6);
- assert.closeTo(-0.8427, tr.b.erf(-1), 1e-6);
- assert.closeTo(-0.5205, tr.b.erf(-0.5), 1e-6);
- assert.closeTo(0, tr.b.erf(0), 1e-6);
- assert.closeTo(0.5205, tr.b.erf(0.5), 1e-6);
- assert.closeTo(0.8427, tr.b.erf(1), 1e-6);
- assert.closeTo(1, tr.b.erf(1e10), 1e-6);
- });
-
- test('clamping', function() {
- assert.equal(tr.b.clamp(2, 1, 3), 2);
- assert.equal(tr.b.clamp(1, 1, 3), 1);
- assert.equal(tr.b.clamp(0, 1, 3), 1);
- assert.equal(tr.b.clamp(3, 1, 3), 3);
- assert.equal(tr.b.clamp(4, 1, 3), 3);
- });
-
- test('interpolatePiecewiseFunction', function() {
- var points = [[0, 0], [0.1, 0.5], [1, 1]];
- assert.equal(0, vec2.interpolatePiecewiseFunction(points, -1));
- assert.equal(0, vec2.interpolatePiecewiseFunction(points, 0));
- assert.equal(0.25, vec2.interpolatePiecewiseFunction(points, 0.05));
- assert.equal(0.5, vec2.interpolatePiecewiseFunction(points, 0.1));
- assert.equal(0.75, vec2.interpolatePiecewiseFunction(points, 0.55));
- assert.equal(1, vec2.interpolatePiecewiseFunction(points, 1));
- assert.equal(1, vec2.interpolatePiecewiseFunction(points, 2));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view.html b/chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view.html
deleted file mode 100644
index f0cdb346db4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view.html
+++ /dev/null
@@ -1,1167 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Multi-dimensional view data structure.
- *
- * A multi-dimensional view provides a hierarchical representation of a
- * collection of multi-dimensional paths with associated scalar values. Unlike
- * separate single-dimensional views (e.g. one tree for each dimension),
- * multi-dimensional views facilitate aggregation over combinations of
- * substrings of the path dimensions (rather than just substrings of a single
- * path dimension).
- *
- * Every view consists of multi-dimensional nodes (see MultiDimensionalViewNode
- * for more details). This file also provides a builder class for constructing
- * top-down and bottom-up representations of arbitrary collections of
- * multi-dimensional paths (see MultiDimensionalViewBuilder for more details).
- *
- * Example: Given the following collection of two dimensional paths:
- *
- * <===================== Path =====================> <== Total values ===>
- * <------- dimension 0 -------> <- dimension 1 -> <- v 0 -> <- v 1 ->
- * [['Run()', 'Exec()', 'Call()'], ['Obj', 'View'] ]: [1 , 3
- * [['Run()', 'Exec()', 'Call()'], ['Obj', 'Widget']]: [2 , 5
- * [['Run()', 'Exec()', 'Load()'], ['Obj'] ]: [4 , 11
- * [['Run()', 'Exec()'] , ['int'] ]: [8 , 7
- * [['Run()'] , ['Obj', 'Window']]: [16 , 0
- * [['Stop()'] , ['Obj'] ]: [32 , 13
- *
- * a multi-dimensional view provides a recursive breakdown of the aggregated
- * values, e.g. (total values shown in square brackets):
- *
- * (root): [63, 39]
- * |
- * | break down by 0th dimension
- * v
- * Run(): [31, 26]
- * |
- * | break down by 0th dimension
- * v
- * Exec(): [15, 26]
- * |
- * | break down by 1st dimension
- * v
- * Obj: [7, 19]
- * |
- * | break down by 0th dimension again
- * v
- * Call(): [3, 8]
- * |
- * | break down by 1st dimension again
- * v
- * View: [1, 3]
- *
- * Observe that the recursive breakdown above is over both dimensions.
- * Furthermore, the underlying single-dimension paths (Run() -> Exec() -> Call()
- * and Obj -> View) can be arbitrarily interleaved in the breakdown.
- */
-tr.exportTo('tr.b', function() {
-
- /**
- * Node of a multi-dimensional view.
- *
- * The structure of a view is encoded in the nodes using links to their
- * children wrt each dimension. The diagram below shows how the nodes
- * corresponding to the following four two-dimensional view paths:
- *
- * 1. [['A', 'B'], ['1', '2']]
- * 2. [['A', 'C'], ['1', '2']]
- * 3. [['A', 'B'], ['1', '3']]
- * 4. [['A', 'C'], ['1', '3']]
- *
- * can be reached from the root of a two-dimensional view using these links
- * ('*' stands for undefined):
- *
- * +---------------------+
- * | title: [*,*] (root) |
- * +---------------------+
- * children wrt children wrt
- * 0th dimension 1st dimension
- * | :
- * _______A________| :........1.........
- * | :
- * v v
- * +--------------+ +--------------+
- * | title: [A,*] | | title: [*,1] |
- * +--------------+ +--------------+
- * children wrt children wrt children wrt children wrt
- * 0th dimension 1st dimension 0th dimension 1st dimension
- * | | :.....1...... _____A_____| : :
- * _B_| |__C__ : | ...2..: :.3..
- * | | : | : :
- * v v v v v v
- * +-------+ +-------+ +-------+ +-------+ +-------+
- * | [B,*] | | [C,*] | | [A,1] | | [*,2] | | [*,3] |
- * +-------+ +-------+ +-------+ +-------+ +-------+
- * : ___:_____B______| | : :......3.....|.... |
- * :.1.. | :.1.. __C___| :...2... _A_| : _A_|
- * : | : | : | : |
- * v v v v v v v v
- * +-------+ +-------+ +-------+ +-------+
- * | [B,1] | | [C,1] | | [A,2] | | [A,3] |
- * +-------+ +-------+ +-------+ +-------+
- * : : : :.......3.......||.......... ||
- * : :..3....:................ BC : BC
- * : ______:_______________:___|| : ||
- * 2 | 2 _______:____| ______:___||
- * : | : | : | : |
- * v v v v v v v v
- * +----------+ +----------+ +----------+ +----------+
- * | [B,2] | | [C,2] | | [B,3] | | [C,3] |
- * | (node 1) | | (node 2) | | (node 3) | | (node 4) |
- * +----------+ +----------+ +----------+ +----------+
- *
- * The self/total values of a node represents the aggregated values of all
- * paths (in the collection from which the view was built) matching the node
- * excluding/including the node's descendants.
- *
- * Terminology examples:
- *
- * - Children of [A,*] wrt 0th dimension: [B,*], [C,*]
- * - Children of [A,*] (wrt all dimensions): [B,*], [C,*], [A,1]
- * - Descendants of [A,*] wrt 1st dimension: [A,1], [A,2], [A,3]
- * - Single-dimensional descendants of [A,*]: [A,1], [A,2], [A,3], [B,*],
- * [C,*]
- * - Descendants of [A,*] (wrt all dimensions): [A,1], [A,2], [A,3], [B,*],
- * [C,*], [B,1], [C,1], [B,2], [C,2], [B,3], [C,3]
- *
- * @{constructor}
- */
- function MultiDimensionalViewNode(title, valueCount) {
- // List of titles of this node wrt each dimension.
- this.title = title;
-
- // Map from child name to child node for each dimension.
- var dimensions = title.length;
- this.children = new Array(dimensions);
- for (var i = 0; i < dimensions; i++)
- this.children[i] = new Map();
-
- // For each value index (from 0 to |valueCount| - 1), we store the self and
- // total values together with a Boolean flag whether the value is only a
- // lower bound (i.e. aggregated from children rather than provided
- // directly).
- this.values = new Array(valueCount);
- for (var v = 0; v < valueCount; v++)
- this.values[v] = { self: 0, total: 0, totalState: NOT_PROVIDED };
- }
-
- /**
- * States of total values stored in multi-dimensional view nodes.
- *
- * @enum
- */
- MultiDimensionalViewNode.TotalState = {
- // Neither total nor self value was provided for either the node or any of
- // its descendants.
- NOT_PROVIDED: 0,
-
- // The total value was NOT provided for the node, but the self value was
- // provided for the node or the total or self value was provided for at
- // least one of its descendants.
- LOWER_BOUND: 1,
-
- // The total value was provided for the node.
- EXACT: 2
- };
- // Cache the total value states to avoid repeated object field lookups.
- var NOT_PROVIDED = MultiDimensionalViewNode.TotalState.NOT_PROVIDED;
- var LOWER_BOUND = MultiDimensionalViewNode.TotalState.LOWER_BOUND;
- var EXACT = MultiDimensionalViewNode.TotalState.EXACT;
-
- MultiDimensionalViewNode.prototype = {
- /** Duck type <tr-ui-b-table> rows. */
- get subRows() {
- return tr.b.mapValues(this.children[0]);
- }
- };
-
- /**
- * Builder for multi-dimensional views.
- *
- * Given a collection of multi-dimensional paths, a builder can be used to
- * construct the following three representations of the paths:
- *
- * 1. Top-down tree view
- * A multi-dimensional path in the view corresponds to all paths in the
- * collection that have it as their prefix.
- *
- * 2. Top-down heavy view
- * A multi-dimensional path in the view corresponds to all paths in the
- * collection that have it as their substring
- *
- * 3. Bottom-up heavy view
- * A multi-dimensional path in the view corresponds to all paths in the
- * collection that have it as their substring reversed.
- *
- * For example, the following collection of 2-dimensional paths (with single
- * values):
- *
- * 2-dimensional path | self
- * Time (0th dimension) | Activity (1st dimension) | value
- * ========================+========================+=======
- * Saturday | Cooking | 1 h
- * Saturday | Sports -> Football | 2 h
- * Sunday | Sports -> Basketball | 3 h
- *
- * gives rise to the following top-down tree view, which aggregates the
- * scalar values over prefixes of the given paths:
- *
- * +---------+
- * | * |
- * | * |
- * | self=0 |
- * | total=6 |
- * +---------+
- * | : | :
- * _________Cooking_______| : | :............Sunday............
- * | : | :
- * | ...Saturday..: |_Sports_ :
- * | : | :
- * v v v v
- * +---------+ +---------+ +---------+ +---------+
- * | * | | Sat | | * | | Sun |
- * | Cooking | | * | | Sports | | * |
- * | self=0 | | self=0 | | self=0 | | self=0 |
- * | total=1 | | total=3 | | total=5 | | total=3 |
- * +---------+ +---------+ +---------+ +---------+
- * : | | : | | : |
- * Saturday | Sports : | | : Sports
- * : | | .....Saturday....: | | :.....Sunday....... |
- * : _Cook_| | : _Foot_| |_Bask_ : |
- * : | | : | | : |
- * v v v v v v v v
- * +---------+ +---------+ +------------+ +--------------+ +---------+
- * | Sat | | Sat | | * | | * | | Sun |
- * | Cooking | | Sports | | S/Football | | S/Basketball | | Sports |
- * | self=1 | | self=0 | | self=0 | | self=0 | | self=0 |
- * | total=1 | | total=2 | | total=2 | | total=3 | | total=3 |
- * +---------+ +---------+ +------------+ +--------------+ +---------+
- * | : : |
- * |_Foot_ ..Sat.: :.Sun.. _Bask_|
- * | : : |
- * v v v v
- * +------------+ +--------------+
- * | Sat | | Sun |
- * | S/Football | | S/Basketball |
- * | self=2 | | self=3 |
- * | total=2 | | total=3 |
- * +------------+ +--------------+
- *
- * To build a multi-dimensional view of a collection of multi-dimensional
- * paths, you create a builder, add the paths to it and then use it to
- * construct the view. For example, the following code generates the
- * 2-dimensional top-down tree view shown above:
- *
- * var builder = new MultiDimensionalViewBuilder(2);
- * builder.addPath([['Saturday'], ['Cooking']], [1], SELF);
- * builder.addPath([['Saturday'], ['Sports', 'Football']], [2], SELF);
- * builder.addPath([['Sunday'], ['Sports', 'Basketball']], [3], SELF);
- * var treeViewRoot = builder.buildTopDownTreeView();
- *
- * The heavy views can be constructed analogously (by calling
- * buildTopDownHeavyView() or buildBottomUpHeavyView() at the end instead).
- *
- * Note that the same builder can be used to construct both the tree and
- * heavy views (for the same collection of paths). However, no more paths can
- * be added once either view has been built.
- *
- * @{constructor}
- */
- function MultiDimensionalViewBuilder(dimensions, valueCount) {
- if (typeof(dimensions) !== 'number' || dimensions < 0)
- throw new Error('Dimensions must be a non-negative number');
- this.dimensions_ = dimensions;
-
- if (typeof(valueCount) !== 'number' || valueCount < 0)
- throw new Error('Number of values must be a non-negative number');
- this.valueCount_ = valueCount;
-
- this.buildRoot_ = this.createRootNode_();
- this.topDownTreeViewRoot_ = undefined;
- this.topDownHeavyViewRoot_ = undefined;
- this.bottomUpHeavyViewNode_ = undefined;
-
- this.maxDimensionDepths_ = new Array(dimensions);
- for (var d = 0; d < dimensions; d++)
- this.maxDimensionDepths_[d] = 0;
- }
-
- /** @{enum} */
- MultiDimensionalViewBuilder.ValueKind = {
- SELF: 0,
- TOTAL: 1
- };
-
- /**
- * Types of multi-dimensional views provided by MultiDimensionalViewBuilder.
- *
- * @enum
- */
- MultiDimensionalViewBuilder.ViewType = {
- TOP_DOWN_TREE_VIEW: 0,
- TOP_DOWN_HEAVY_VIEW: 1,
- BOTTOM_UP_HEAVY_VIEW: 2
- };
-
- MultiDimensionalViewBuilder.prototype = {
- /**
- * Add values associated with a multi-dimensional path to the tree.
- *
- * The path must have the same number of dimensions as the builder. Its
- * elements must be single-dimension paths (lists of strings) of arbitrary
- * length (empty for the root of the given dimension). Starting from the
- * root of the tree, each single-dimension path is traversed from left to
- * right to reach the node corresponding to the whole path.
- *
- * The length of the provided list of values must be equal to the builder's
- * value count. The builder supports adding both kinds of values
- * (self/total) wrt all value indices for an arbitrary multi-dimensional
- * path. The rationale for adding total values (in addition to/instead of
- * self values) is to cater for missing sub-paths. Example: Consider the
- * following collection of single-dimensional paths (with single values):
- *
- * [['Loop::Run()', 'Execute()', 'FunctionBig']]: self=99000
- * [['Loop::Run()', 'Execute()', 'FunctionSmall1']]: self=1
- * [['Loop::Run()', 'Execute()', 'FunctionSmall2']]: self=1
- * ...
- * [['Loop::Run()', 'Execute()', 'FunctionSmall1000']]: self=1
- *
- * If we required that only self values could be added to the builder, then
- * all of the 1001 paths would need to be provided (most likely in a trace)
- * to obtain the correct total of [['Loop::Run()', 'Execute()']]. However,
- * since we allow adding total values as well, only the following 2 paths
- * need to be provided to get the correct numbers explaining 99% of the
- * aggregated total value:
- *
- * [['Loop::Run()', 'Execute()']]: total=100000
- * [['Loop::Run()', 'Execute()', 'FunctionBig']]: self=99000
- *
- * In other words, the long tail containing 1000 small paths need not be
- * dumped (greatly reducing the size of a trace where applicable).
- *
- * Important: No paths can be added to a builder once either view has been
- * built!
- */
- addPath: function(path, values, valueKind) {
- if (this.buildRoot_ === undefined) {
- throw new Error(
- 'Paths cannot be added after either view has been built');
- }
- if (path.length !== this.dimensions_)
- throw new Error('Path must be ' + this.dimensions_ + '-dimensional');
- if (values.length !== this.valueCount_)
- throw new Error('Must provide ' + this.valueCount_ + ' values');
-
- var isTotal;
- switch (valueKind) {
- case MultiDimensionalViewBuilder.ValueKind.SELF:
- isTotal = false;
- break;
- case MultiDimensionalViewBuilder.ValueKind.TOTAL:
- isTotal = true;
- break;
- default:
- throw new Error('Invalid value kind: ' + valueKind);
- }
-
- var node = this.buildRoot_;
- for (var d = 0; d < path.length; d++) {
- var singleDimensionPath = path[d];
- var singleDimensionPathLength = singleDimensionPath.length;
- this.maxDimensionDepths_[d] =
- Math.max(this.maxDimensionDepths_[d], singleDimensionPathLength);
- for (var i = 0; i < singleDimensionPathLength; i++)
- node = this.getOrCreateChildNode_(node, d, singleDimensionPath[i]);
- }
-
- for (var v = 0; v < this.valueCount_; v++) {
- var addedValue = values[v];
- if (addedValue === undefined)
- continue;
- var nodeValue = node.values[v];
- if (isTotal) {
- nodeValue.total += addedValue;
- nodeValue.totalState = EXACT;
- } else {
- nodeValue.self += addedValue;
- nodeValue.totalState = Math.max(nodeValue.totalState, LOWER_BOUND);
- }
- }
- },
-
- buildView: function(viewType) {
- switch (viewType) {
- case MultiDimensionalViewBuilder.ViewType.TOP_DOWN_TREE_VIEW:
- return this.buildTopDownTreeView();
- case MultiDimensionalViewBuilder.ViewType.TOP_DOWN_HEAVY_VIEW:
- return this.buildTopDownHeavyView();
- case MultiDimensionalViewBuilder.ViewType.BOTTOM_UP_HEAVY_VIEW:
- return this.buildBottomUpHeavyView();
- default:
- throw new Error('Unknown multi-dimensional view type: ' + viewType);
- }
- },
-
- /**
- * Build the top-down tree view of the multi-dimensional view.
- *
- * Note that no more paths can be added to the builder once either view has
- * been built.
- */
- buildTopDownTreeView: function() {
- if (this.topDownTreeViewRoot_ === undefined) {
- var treeViewRoot = this.buildRoot_;
- this.buildRoot_ = undefined;
-
- this.setUpMissingChildRelationships_(treeViewRoot,
- 0 /* firstDimensionToSetUp */);
- this.finalizeTotalValues_(treeViewRoot,
- 0 /* firstDimensionToFinalize */,
- new WeakMap() /* dimensionalSelfSumsMap */);
-
- this.topDownTreeViewRoot_ = treeViewRoot;
- }
-
- return this.topDownTreeViewRoot_;
- },
-
- /**
- * Build the top-down heavy view of the multi-dimensional view.
- *
- * Note that no more paths can be added to the builder once either view has
- * been built.
- */
- buildTopDownHeavyView: function() {
- if (this.topDownHeavyViewRoot_ === undefined) {
- this.topDownHeavyViewRoot_ = this.buildGenericHeavyView_(
- this.addDimensionToTopDownHeavyViewNode_.bind(this));
- }
- return this.topDownHeavyViewRoot_;
- },
-
- /**
- * Build the bottom-up heavy view of the multi-dimensional view.
- *
- * Note that no more paths can be added to the builder once either view has
- * been built.
- */
- buildBottomUpHeavyView: function() {
- if (this.bottomUpHeavyViewNode_ === undefined) {
- this.bottomUpHeavyViewNode_ = this.buildGenericHeavyView_(
- this.addDimensionToBottomUpHeavyViewNode_.bind(this));
- }
- return this.bottomUpHeavyViewNode_;
- },
-
- createRootNode_: function() {
- return new MultiDimensionalViewNode(
- new Array(this.dimensions_) /* title */, this.valueCount_);
- },
-
- getOrCreateChildNode_: function(
- parentNode, dimension, childDimensionTitle) {
- if (dimension < 0 || dimension >= this.dimensions_)
- throw new Error('Invalid dimension');
-
- var dimensionChildren = parentNode.children[dimension];
-
- var childNode = dimensionChildren.get(childDimensionTitle);
- if (childNode !== undefined)
- return childNode;
-
- var childTitle = parentNode.title.slice();
- childTitle[dimension] = childDimensionTitle;
- childNode = new MultiDimensionalViewNode(childTitle, this.valueCount_);
- dimensionChildren.set(childDimensionTitle, childNode);
-
- return childNode;
- },
-
- /**
- * Set up missing child relationships.
- *
- * When an arbitrary multi-dimensional path [path1, path2, ..., pathN] is
- * added to the build tree (see addPath), only the nodes on the path1 ->
- * path2 -> ... -> pathN chain are created (i.e. no interleavings of the
- * single-dimensional paths are added to the tree). This method recursively
- * adds all the missing paths.
- *
- * Two-dimensional example:
- *
- * Initial build tree . After path . After missing child
- * (root only) . [[A, B], [1, 2]] . relationships were
- * . was added . set up
- * . .
- * +---+ . +---+ . +---+
- * |*,*| . |*,*| . |*,*|
- * +---+ . +---+ . +---+
- * . A . A 1
- * . | . | :
- * . v . v V
- * . +---+ . +---+ +---+
- * . |A,*| . |A,*| |*,1|
- * . +---+ . +---+ +---+
- * . B . B 1 A 2
- * . | . | : | :
- * . v . v v v v
- * . +---+ . +---+ +---+ +---+
- * . |B,*| . |B,*| |A,1| |*,2|
- * . +---+ . +---+ +---+ +---+
- * . 1 . 1 B 2 A
- * . : . : | : |
- * . v . v v v v
- * . +---+ . +---+ +---+
- * . |B,1| . |B,1| |A,2|
- * . +---+ . +---+ +---+
- * . 2 . 2 B
- * . : . : |
- * . v . v V
- * . +---+ . +---+
- * . |B,2| . |B,2|
- * . +---+ . +---+
- */
- setUpMissingChildRelationships_: function(node, firstDimensionToSetUp) {
- // Missing child relationships of this node wrt dimensions 0, ...,
- // (firstDimensionToSetUp - 1) and all descendants of the associated
- // children have already been set up. Now we do the same for dimensions
- // firstDimensionToSetUp, ..., (this.dimensions_ - 1).
- for (var d = firstDimensionToSetUp; d < this.dimensions_; d++) {
- // Step 1. Gather the names of all children wrt the current dimension.
- var currentDimensionChildTitles = new Set(node.children[d].keys());
- for (var i = 0; i < d; i++) {
- for (var previousDimensionChildNode of node.children[i].values()) {
- for (var previousDimensionGrandChildTitle of
- previousDimensionChildNode.children[d].keys()) {
- currentDimensionChildTitles.add(previousDimensionGrandChildTitle);
- }
- }
- }
-
- // Step 2. Add missing children wrt the current dimension and
- // recursively set up its missing child relationships.
- for (var currentDimensionChildTitle of currentDimensionChildTitles) {
- // Add a missing child (if it doesn't exist).
- var currentDimensionChildNode =
- this.getOrCreateChildNode_(node, d, currentDimensionChildTitle);
-
- // Set-up child relationships (of the child node) wrt dimensions 0,
- // ..., d - 1.
- for (var i = 0; i < d; i++) {
- for (var previousDimensionChildNode of node.children[i].values()) {
- var previousDimensionGrandChildNode =
- previousDimensionChildNode.children[d].get(
- currentDimensionChildTitle);
- if (previousDimensionGrandChildNode !== undefined) {
- currentDimensionChildNode.children[i].set(
- previousDimensionChildNode.title[i],
- previousDimensionGrandChildNode);
- }
- }
- }
-
- // Set-up child relationships (of the child node) wrt dimensions d,
- // ..., (this.dimensions_ - 1).
- this.setUpMissingChildRelationships_(currentDimensionChildNode, d);
- }
- }
- },
-
- /**
- * Finalize the total values of a multi-dimensional tree.
- *
- * The intermediate builder tree, a node of which we want to finalize
- * recursively, already has the right shape. The only thing that needs to
- * be done is to propagate self and total values from subsumed child nodes
- * in each dimension and update total value states appropriately.
- *
- * To derive the expression for the lower bound on the total value wrt
- * value index V (from 1 to |this.valueCount_| - 1), we rely on the
- * following assumptions:
- *
- * 1. Self/total values associated with different value indices are
- * independent. From this point onwards, "self/total value" refers to
- * self/total value wrt the fixed value index V.
- *
- * 2. Each node's self value does NOT overlap with the self or total value
- * of any other node.
- *
- * 3. The total values of a node's children wrt a single dimension (e.g.
- * [path1/A, path2] and [path1/B, path2]) do NOT overlap.
- *
- * 4. The total values of a node's children wrt different dimensions
- * (e.g. [path1/A, path2] and [path1, path2/1]) MIGHT overlap.
- *
- * As a consequence of assumptions 1 and 3, the total value of a node can
- * be split into the part that cannot overlap (so-called "self-sum") and
- * the part that can overlap (so-called "residual"):
- *
- * total(N, V) = selfSum(N, V) + residual(N, V) (A)
- *
- * where the self-sum is calculated as the sum of the node's self value
- * plus the sum of its descendants' self values (summed over all
- * dimensions):
- *
- * selfSum(N, V) = self(N, V) + sum over all descendants C of N {
- * self(C, V) (B)
- * }
- *
- * Observe that the residual of a node does not include any self value (of
- * any node in the view). Furthermore, by assumption 2, we derive that the
- * residuals of a node's children wrt a single dimension don't overlap. On
- * the other hand, the residuals of a node's children wrt different
- * dimensions might overlap. This gives us the following lower bound on the
- * residual of a node:
- *
- * residual(N, V) >= minResidual(N, V) = max over dimensions D {
- * sum over children C of N at dimension D {
- * residual(C, V) (C)
- * }
- * })
- *
- * By combining equation (A) and inequality (C), we get a lower bound on
- * the total value of a node:
- *
- * total(N, V) >= selfSum(N, V) + minResidual(N, V)
- *
- * For example, given a two-dimensional node [path1, path2] with self value
- * 10 and four children (2 wrt each dimension):
- *
- * Child | Self value | Total value
- * ==================+============+=============
- * [path1/A, path2] | 21 | 30
- * [path1/B, path2] | 25 | 32
- * [path1, path2/1] | 3 | 15
- * [path1, path2/2] | 40 | 41
- *
- * and assuming that the children have no further descendants (i.e. their
- * residual values are equal to the differences between their total and
- * self values), the lower bound on the total value of [path1, path2] is:
- *
- * total([path1, path2], 0)
- * >= selfSum([path1, path2], 0) +
- * minResidual([path1, path2], 0)
- * = self([path1, path2], 0) +
- * sum over all descendants C of [path1, path2] {
- * self (C, 0)
- * } +
- * max over dimensions D {
- * sum over children C of [path1, path2] at dimension D {
- * residual(C, 0)
- * }
- * }
- * = self([path1, path2], 0) +
- * ((self([path1/A, path2], 0) + self([path1/B, path2], 0)) +
- * (self([path1, path2/1], 0) + self([path1, path2/2], 0))) +
- * max(residual([path1/A, path2], 0) +
- * residual([path1/B, path2], 0),
- * residual([path1, path2/1], 0) +
- * residual([path1, path2/2], 0))
- * = 10 +
- * ((21 + 25) + (3 + 40)) +
- * max((30 - 21) + (32 - 25), (15 - 3) + (41 - 40))
- * = 115
- *
- * To reduce the complexity of the calculation, we keep a temporary list of
- * dimensional self-sums for each node that we have already visited. For a
- * given node, the Kth element in the list is equal to the self size of the
- * node plus the sum of self sizes of all its descendants wrt dimensions 0
- * to K (inclusive). The list has two important properties:
- *
- * 1. The last element in the list is equal to the self-sum of the
- * associated node (equation (B)).
- *
- * 2. The calculation of the list can be performed recursively using the
- * lists of the associated node's children (avoids square complexity
- * in the size of the graph):
- *
- * dimensionalSelfSum(N, V)[D] =
- * self(N, V) +
- * sum I = 0 to D {
- * sum over children C of N at dimension I {
- * dimensionalSelfSum(C, V)[I]
- * }
- * }
- *
- * This method also (recursively) ensures that, for each value index V, if
- * at least one of the descendants C of node N has at least a LOWER_BOUND
- * on total(C, V), then the N will also be marked as having a LOWER_BOUND
- * on total(N, V) (unless N contains the EXACT value of total(N, V), in
- * which case its relevant totalState won't be modified).
- */
- finalizeTotalValues_: function(
- node, firstDimensionToFinalize, dimensionalSelfSumsMap) {
- // Dimension D -> Value index V -> dimensionalSelfSum(|node|, V)[D].
- var dimensionalSelfSums = new Array(this.dimensions_);
-
- // Value index V -> minResidual(|node|, V).
- var minResidual = new Array(this.valueCount_);
- for (var v = 0; v < this.valueCount_; v++)
- minResidual[v] = 0;
-
- // Value index V -> |node| value V.
- var nodeValues = node.values;
-
- // Value index V -> dimensionalSelfSum(|node|, V)[|d|].
- var nodeSelfSums = new Array(this.valueCount_);
- for (var v = 0; v < this.valueCount_; v++)
- nodeSelfSums[v] = nodeValues[v].self;
-
- for (var d = 0; d < this.dimensions_; d++) {
- // Value index V -> sum over children C of |node| at dimension |d| {
- // residual(C, V) }.
- var childResidualSums = new Array(this.valueCount_);
- for (var v = 0; v < this.valueCount_; v++)
- childResidualSums[v] = 0;
-
- for (var childNode of node.children[d].values()) {
- if (d >= firstDimensionToFinalize)
- this.finalizeTotalValues_(childNode, d, dimensionalSelfSumsMap);
- // Dimension D -> Value index V ->
- // dimensionalSelfSum(|childNode|, V)[D].
- var childNodeSelfSums = dimensionalSelfSumsMap.get(childNode);
- var childNodeValues = childNode.values;
- for (var v = 0; v < this.valueCount_; v++) {
- nodeSelfSums[v] += childNodeSelfSums[d][v];
- var residual = childNodeValues[v].total -
- childNodeSelfSums[this.dimensions_ - 1][v];
- childResidualSums[v] += residual;
- if (childNodeValues[v].totalState > NOT_PROVIDED) {
- nodeValues[v].totalState = Math.max(
- nodeValues[v].totalState, LOWER_BOUND);
- }
- }
- }
-
- dimensionalSelfSums[d] = nodeSelfSums.slice();
- for (var v = 0; v < this.valueCount_; v++)
- minResidual[v] = Math.max(minResidual[v], childResidualSums[v]);
- }
-
- for (var v = 0; v < this.valueCount_; v++) {
- nodeValues[v].total = Math.max(
- nodeValues[v].total, nodeSelfSums[v] + minResidual[v]);
- }
-
- if (dimensionalSelfSumsMap.has(node))
- throw new Error('Internal error: Node finalized more than once');
- dimensionalSelfSumsMap.set(node, dimensionalSelfSums);
- },
-
- /**
- * Build a generic heavy view of the multi-dimensional view.
- */
- buildGenericHeavyView_: function(treeViewNodeHandler) {
- // 1. Clone the root node of the top-down tree view node (except
- // children).
- var treeViewRoot = this.buildTopDownTreeView();
- var heavyViewRoot = this.createRootNode_();
- heavyViewRoot.values = treeViewRoot.values;
-
- // 2. Create recursion depth trackers (to avoid total value
- // double-counting).
- var recursionDepthTrackers = new Array(this.dimensions_);
- for (var d = 0; d < this.dimensions_; d++) {
- recursionDepthTrackers[d] =
- new RecursionDepthTracker(this.maxDimensionDepths_[d], d);
- }
-
- // 3. Add all paths associated with the single-dimensional descendants of
- // the top-down tree view root node to the heavy view root node
- // (depending on the type of the target heavy view).
- this.addDimensionsToGenericHeavyViewNode_(treeViewRoot, heavyViewRoot,
- 0 /* startDimension */, recursionDepthTrackers,
- false /* previousDimensionsRecursive */, treeViewNodeHandler);
-
- // 4. Set up missing child relationships.
- this.setUpMissingChildRelationships_(heavyViewRoot,
- 0 /* firstDimensionToSetUp */);
-
- return heavyViewRoot;
- },
-
- /**
- * Add all paths associated with the single-dimensional descendants of a
- * top-down tree-view node wrt multiple dimensions to a generic heavy-view
- * node (depending on the type of the target heavy view).
- */
- addDimensionsToGenericHeavyViewNode_: function(treeViewParentNode,
- heavyViewParentNode, startDimension, recursionDepthTrackers,
- previousDimensionsRecursive, treeViewNodeHandler) {
- for (var d = startDimension; d < this.dimensions_; d++) {
- this.addDimensionDescendantsToGenericHeavyViewNode_(treeViewParentNode,
- heavyViewParentNode, d, recursionDepthTrackers,
- previousDimensionsRecursive, treeViewNodeHandler);
- }
- },
-
- /**
- * Add all paths associated with the descendants of a top-down tree-view
- * node wrt a single dimension to a generic heavy-view node (depending on
- * the type of the target heavy view).
- */
- addDimensionDescendantsToGenericHeavyViewNode_: function(treeViewParentNode,
- heavyViewParentNode, currentDimension, recursionDepthTrackers,
- previousDimensionsRecursive, treeViewNodeHandler) {
- var treeViewChildren = treeViewParentNode.children[currentDimension];
- var recursionDepthTracker = recursionDepthTrackers[currentDimension];
- for (var treeViewChildNode of treeViewChildren.values()) {
- recursionDepthTracker.push(treeViewChildNode);
-
- // Add all paths associated with the child node to the heavy view-node
- // parent node.
- treeViewNodeHandler(
- treeViewChildNode, heavyViewParentNode, currentDimension,
- recursionDepthTrackers, previousDimensionsRecursive);
-
- // Recursively add all paths associated with the descendants of the
- // tree view child node wrt the current dimension to the heavy-view
- // parent node.
- this.addDimensionDescendantsToGenericHeavyViewNode_(treeViewChildNode,
- heavyViewParentNode, currentDimension, recursionDepthTrackers,
- previousDimensionsRecursive, treeViewNodeHandler);
-
- recursionDepthTracker.pop();
- }
- },
-
- /**
- * Add a top-down tree-view child node together with its single-dimensional
- * subtree to a top-down heavy-view parent node (tree-view node handler for
- * top-down heavy view).
- *
- * Sample resulting top-down heavy view:
- *
- * +----------------+ +-----------------+
- * | source | | destination |
- * | tree-view root | ===============> | heavy-view root |
- * | self=0 | | self=0 |
- * | total=48 | | total=48 |
- * +----------------+ +-----------------+
- * | | ______| | |______
- * v v v v v
- * +----------+ +----------+ +----------+ +----------+ +----------+
- * | A* | | B | | A*** | | B | | C |
- * | self=10 | | self=12 | | self=13 | | self=13 | | self=2 |
- * | total=30 | | total=18 | | total=30 | | total=34 | | total=7 |
- * +----------+ +----------+ +----------+ +----------+ +----------+
- * | : : :.........
- * v v v v
- * +----------+ ............ ............ ............
- * | B | : B : : A : : C :
- * | self=1 | : self=1 : : self=3 : : self=2 :
- * | total=16 | : total=16 : : total=8 : : total=7 :
- * +----------+ ............ ............ ............
- * | |________ : :.........
- * v v v v
- * +----------+ +----------+ ............ ............
- * | A** | | C | : A : : C :
- * | self=3 | | self=2 | : self=3 : : self=2 :
- * | total=8 | | total=7 | : total=8 : : total=7 :
- * +----------+ +----------+ ............ ............
- *
- * Observe that care needs to be taken when dealing with recursion to avoid
- * double-counting, e.g. the total value of A** (8) was not added to the
- * total value of A*** (30) because it is already included in the total
- * value of A* (30) (which was also added to A***). That is why we need to
- * keep track of the path we traversed along the current dimension (to
- * determine whether total value should be added or not).
- */
- addDimensionToTopDownHeavyViewNode_: function(
- treeViewChildNode, heavyViewParentNode, currentDimension,
- recursionDepthTrackers, previousDimensionsRecursive) {
- this.addDimensionToTopDownHeavyViewNodeRecursively_(treeViewChildNode,
- heavyViewParentNode, currentDimension, recursionDepthTrackers,
- previousDimensionsRecursive, 1 /* subTreeDepth */);
- },
-
- addDimensionToTopDownHeavyViewNodeRecursively_: function(
- treeViewChildNode, heavyViewParentNode, currentDimension,
- recursionDepthTrackers, previousDimensionsRecursive, subTreeDepth) {
- var recursionDepthTracker = recursionDepthTrackers[currentDimension];
- var currentDimensionRecursive =
- subTreeDepth <= recursionDepthTracker.recursionDepth;
- var currentOrPreviousDimensionsRecursive =
- currentDimensionRecursive || previousDimensionsRecursive;
-
- var dimensionTitle = treeViewChildNode.title[currentDimension];
- var heavyViewChildNode = this.getOrCreateChildNode_(
- heavyViewParentNode, currentDimension, dimensionTitle);
-
- this.addNodeValues_(treeViewChildNode, heavyViewChildNode,
- !currentOrPreviousDimensionsRecursive /* addTotal */);
-
- // Add the descendants of the tree-view child node wrt the next
- // dimensions as children of the heavy-view child node.
- this.addDimensionsToGenericHeavyViewNode_(treeViewChildNode,
- heavyViewChildNode, currentDimension + 1, recursionDepthTrackers,
- currentOrPreviousDimensionsRecursive,
- this.addDimensionToTopDownHeavyViewNode_.bind(this));
-
- for (var treeViewGrandChildNode of
- treeViewChildNode.children[currentDimension].values()) {
- recursionDepthTracker.push(treeViewGrandChildNode);
-
- // Recursively add the tree-view grandchild node to the heavy-view
- // child node.
- this.addDimensionToTopDownHeavyViewNodeRecursively_(
- treeViewGrandChildNode, heavyViewChildNode, currentDimension,
- recursionDepthTrackers, previousDimensionsRecursive,
- subTreeDepth + 1);
-
- recursionDepthTracker.pop();
- }
- },
-
- /**
- * Add a top-down tree-view child node together with all its ancestors wrt
- * the given dimension as descendants of a bottom-up heavy-view parent node
- * in the reverse order (tree-view node handler for bottom-up heavy view).
- *
- * Sample resulting bottom-up heavy view:
- *
- * +----------------+ +-----------------+
- * | source | | destination |
- * | tree-view root | ===============> | heavy-view root |
- * | self=0 | | self=0 |
- * | total=48 | | total=48 |
- * +----------------+ +-----------------+
- * | | ______| | |______
- * v v v v v
- * +----------+ +----------+ +----------+ +----------+ +----------+
- * | A* | | B | | A*** | | B | | C |
- * | self=10 | | self=12 | | self=13 | | self=13 | | self=2 |
- * | total=30 | | total=18 | | total=30 | | total=34 | | total=7 |
- * +----------+ +----------+ +----------+ +----------+ +----------+
- * | : : :
- * v v v v
- * +----------+ ............ ............ ............
- * | B# | : B : : A : : B## :
- * | self=1 | : self=3 : : self=1 : : self=2 :
- * | total=16 | : total=8 : : total=16 : : total=7 :
- * +----------+ ............ ............ ............
- * | |________ : :
- * v v v v
- * +----------+ +----------+ ............ ............
- * | A** | | C | : A : : A :
- * | self=3 | | self=2 | : self=3 : : self=2 :
- * | total=8 | | total=7 | : total=8 : : total=7 :
- * +----------+ +----------+ ............ ............
- *
- * Similarly to the construction of the top-down heavy view, care needs to
- * be taken when dealing with recursion to avoid double-counting, e.g. the
- * total value of A** (8) was not added to the total value of A*** (30)
- * because it is already included in the total value of A* (30) (which was
- * also added to A***). That is why we need to keep track of the path we
- * traversed along the current dimension (to determine whether total value
- * should be added or not).
- *
- * Note that when we add an ancestor (B#) of a top-down tree-view node (C)
- * to the bottom-up heavy view, the values of the original tree-view node
- * (C) (rather than the ancestor's values) are added to the corresponding
- * heavy-view node (B##).
- */
- addDimensionToBottomUpHeavyViewNode_: function(
- treeViewChildNode, heavyViewParentNode, currentDimension,
- recursionDepthTrackers, previousDimensionsRecursive) {
- var recursionDepthTracker = recursionDepthTrackers[currentDimension];
- var bottomIndex = recursionDepthTracker.bottomIndex;
- var topIndex = recursionDepthTracker.topIndex;
- var firstNonRecursiveIndex =
- bottomIndex + recursionDepthTracker.recursionDepth;
- var viewNodePath = recursionDepthTracker.viewNodePath;
-
- var trackerAncestorNode = recursionDepthTracker.trackerAncestorNode;
- var heavyViewDescendantNode = heavyViewParentNode;
- for (var i = bottomIndex; i < topIndex; i++) {
- var treeViewAncestorNode = viewNodePath[i];
- var dimensionTitle = treeViewAncestorNode.title[currentDimension];
- heavyViewDescendantNode = this.getOrCreateChildNode_(
- heavyViewDescendantNode, currentDimension, dimensionTitle);
-
- var currentDimensionRecursive = i < firstNonRecursiveIndex;
- var currentOrPreviousDimensionsRecursive =
- currentDimensionRecursive || previousDimensionsRecursive;
-
- // The self and total values are taken from the original top-down tree
- // view child node (rather than the ancestor node).
- this.addNodeValues_(treeViewChildNode, heavyViewDescendantNode,
- !currentOrPreviousDimensionsRecursive);
-
- // Add the descendants of the tree-view child node wrt the next
- // dimensions as children of the heavy-view child node.
- this.addDimensionsToGenericHeavyViewNode_(treeViewChildNode,
- heavyViewDescendantNode, currentDimension + 1,
- recursionDepthTrackers, currentOrPreviousDimensionsRecursive,
- this.addDimensionToBottomUpHeavyViewNode_.bind(this));
- }
- },
-
- addNodeValues_: function(sourceNode, targetNode, addTotal) {
- var targetNodeValues = targetNode.values;
- var sourceNodeValues = sourceNode.values;
- for (var v = 0; v < this.valueCount_; v++) {
- var targetNodeValue = targetNodeValues[v];
- var sourceNodeValue = sourceNodeValues[v];
- targetNodeValue.self += sourceNodeValue.self;
- if (addTotal) {
- targetNodeValue.total += sourceNodeValue.total;
- if (sourceNodeValue.totalState > NOT_PROVIDED) {
- targetNodeValue.totalState = Math.max(
- targetNodeValue.totalState, LOWER_BOUND);
- }
- }
- }
- }
- };
-
- /**
- * Recursion depth tracker.
- *
- * This class tracks the recursion depth of the current stack (updated via
- * the push and pop methods). The recursion depth of a stack is the lengh of
- * its longest leaf suffix that is repeated within the stack itself.
- *
- * For example, the recursion depth of the stack A -> B -> C -> A -> B -> B
- * -> C (where C is the leaf node) is 2 because the suffix B -> C is repeated
- * within it.
- *
- * @{constructor}
- */
- function RecursionDepthTracker(maxDepth, dimension) {
- this.titlePath = new Array(maxDepth);
- this.viewNodePath = new Array(maxDepth);
- this.bottomIndex = this.topIndex = maxDepth;
-
- this.dimension_ = dimension;
- this.currentTrackerNode_ =
- this.createNode_(0 /* recursionDepth */, undefined /* parent */);
- }
-
- RecursionDepthTracker.prototype = {
- push: function(viewNode) {
- if (this.bottomIndex === 0)
- throw new Error('Cannot push to a full tracker');
- var title = viewNode.title[this.dimension_];
- this.bottomIndex--;
- this.titlePath[this.bottomIndex] = title;
- this.viewNodePath[this.bottomIndex] = viewNode;
-
- var childTrackerNode = this.currentTrackerNode_.children.get(title);
- if (childTrackerNode !== undefined) {
- // Child node already exists, so we don't need to calculate anything.
- this.currentTrackerNode_ = childTrackerNode;
- return;
- }
-
- // Child node doesn't exist yet, so we need to calculate its recursion
- // depth.
- var maxLengths = zFunction(this.titlePath, this.bottomIndex);
- var recursionDepth = 0;
- for (var i = 0; i < maxLengths.length; i++)
- recursionDepth = Math.max(recursionDepth, maxLengths[i]);
-
- childTrackerNode =
- this.createNode_(recursionDepth, this.currentTrackerNode_);
- this.currentTrackerNode_.children.set(title, childTrackerNode);
- this.currentTrackerNode_ = childTrackerNode;
- },
-
- pop: function() {
- if (this.bottomIndex === this.topIndex)
- throw new Error('Cannot pop from an empty tracker');
-
- this.titlePath[this.bottomIndex] = undefined;
- this.viewNodePath[this.bottomIndex] = undefined;
- this.bottomIndex++;
-
- this.currentTrackerNode_ = this.currentTrackerNode_.parent;
- },
-
- get recursionDepth() {
- return this.currentTrackerNode_.recursionDepth;
- },
-
- createNode_: function(recursionDepth, parent) {
- return {
- recursionDepth: recursionDepth,
- parent: parent,
- children: new Map()
- };
- }
- };
-
- /**
- * Calculate the Z-function of (a suffix of) a list.
- *
- * Z-function: Given a list (or a string) of length n, for each index i from
- * 1 to n - 1, find the length z[i] of the longest substring starting at
- * position i which is also a prefix of the list. This function returns the
- * list of maximum lengths z.
- *
- * Mathematically, for each i from 1 to n - 1, z[i] is the maximum value such
- * that [list[0], ..., list[i - 1]] = [list[i], ..., list[i + z[i] - 1]].
- * z[0] is defined to be zero for convenience.
- *
- * Example:
- *
- * Input (list): ['A', 'B', 'A', 'C', 'A', 'B', 'A']
- * Output (z): [ 0 , 0 , 1 , 0 , 3 , 0 , 1 ]
- *
- * Unlike the brute-force approach (which is O(n^2) in the worst case), the
- * complexity of this implementation is linear in the size of the list, i.e.
- * O(n).
- *
- * Source: http://e-maxx-eng.github.io/string/z-function.html
- */
- function zFunction(list, startIndex) {
- var n = list.length - startIndex;
- if (n === 0)
- return [];
-
- var z = new Array(n);
- z[0] = 0;
-
- for (var i = 1, left = 0, right = 0; i < n; ++i) {
- var maxLength;
- if (i <= right)
- maxLength = Math.min(right - i + 1, z[i - left]);
- else
- maxLength = 0;
-
- while (i + maxLength < n && list[startIndex + maxLength] ===
- list[startIndex + i + maxLength]) {
- ++maxLength;
- }
-
- if (i + maxLength - 1 > right) {
- left = i;
- right = i + maxLength - 1;
- }
-
- z[i] = maxLength;
- }
-
- return z;
- }
-
- return {
- MultiDimensionalViewBuilder: MultiDimensionalViewBuilder,
- MultiDimensionalViewNode: MultiDimensionalViewNode,
-
- // Exports below are for testing only.
- RecursionDepthTracker: RecursionDepthTracker,
- zFunction: zFunction
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view_test.html b/chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view_test.html
deleted file mode 100644
index 43af9e74074..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/multi_dimensional_view_test.html
+++ /dev/null
@@ -1,13117 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/multi_dimensional_view.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var MultiDimensionalViewBuilder = tr.b.MultiDimensionalViewBuilder;
- var MultiDimensionalViewNode = tr.b.MultiDimensionalViewNode;
- var ViewType = MultiDimensionalViewBuilder.ViewType;
- var SELF = MultiDimensionalViewBuilder.ValueKind.SELF;
- var TOTAL = MultiDimensionalViewBuilder.ValueKind.TOTAL;
- var NOT_PROVIDED = MultiDimensionalViewNode.TotalState.NOT_PROVIDED;
- var LOWER_BOUND = MultiDimensionalViewNode.TotalState.LOWER_BOUND;
- var EXACT = MultiDimensionalViewNode.TotalState.EXACT;
- var RecursionDepthTracker = tr.b.RecursionDepthTracker;
- var zFunction = tr.b.zFunction;
-
- function assertListStrictEqual(a, b) {
- assert.lengthOf(a, b.length);
- for (var i = 0; i < a.length; i++)
- assert.strictEqual(a[i], b[i]);
- }
-
- function checkTree(actualTreeRootNode, expectedStructureRootNode) {
- // Build map from expected structure node IDs to expected structure nodes.
- var expectedStructureNodesById = new Map();
- addExpectedStructureToMap(
- expectedStructureRootNode, expectedStructureNodesById);
-
- // Recursively check the structure of the actual tree.
- var actualTreeNodesById = new Map();
- checkTreeStructure(actualTreeRootNode, expectedStructureRootNode,
- actualTreeNodesById, expectedStructureNodesById);
-
- // Test sanity check.
- assert.strictEqual(
- actualTreeNodesById.size, expectedStructureNodesById.size);
- }
-
- function addExpectedStructureToMap(expectedStructureNode, map) {
- if (typeof expectedStructureNode === 'string')
- return; // Reference to another expected structure node.
-
- var expectedStructureNodeId = expectedStructureNode.id;
- if (expectedStructureNodeId !== undefined) {
- assert.isFalse(map.has(expectedStructureNodeId));
- map.set(expectedStructureNodeId, expectedStructureNode);
- }
-
- var expectedStructureChildren = expectedStructureNode.children;
- for (var d = 0; d < expectedStructureChildren.length; d++) {
- var expectedStructureDimensionChildren = expectedStructureChildren[d];
- for (var i = 0; i < expectedStructureDimensionChildren.length; i++)
- addExpectedStructureToMap(expectedStructureDimensionChildren[i], map);
- }
- }
-
- function checkTreeStructure(actualTreeNode, expectedStructureNode,
- actualTreeNodesById, expectedStructureNodesById) {
- // Check the multi-dimensional title.
- assert.deepEqual(
- tr.b.asArray(actualTreeNode.title), expectedStructureNode.title);
-
- // Check the values.
- assert.deepEqual(actualTreeNode.values, expectedStructureNode.values);
-
- // Check the children.
- var expectedStructureChildNodes = expectedStructureNode.children;
- var actualTreeChildNodes = actualTreeNode.children;
- assert.lengthOf(actualTreeChildNodes, expectedStructureChildNodes.length);
-
- for (var d = 0; d < expectedStructureChildNodes.length; d++) {
- var expectedStructureDimensionChildNodes = expectedStructureChildNodes[d];
- var actualTreeDimensionChildNodes = actualTreeChildNodes[d];
- assert.strictEqual(actualTreeDimensionChildNodes.size,
- expectedStructureDimensionChildNodes.length);
-
- var expectedStructureDimensionChildNodeTitles = new Set();
-
- for (var i = 0; i < expectedStructureDimensionChildNodes.length; i++) {
- var expectedStructureDimensionChildNode =
- expectedStructureDimensionChildNodes[i];
- var isReference = false;
-
- // If the expected structure child node is a reference to another
- // expected structure node, resolve it.
- if (typeof expectedStructureDimensionChildNode === 'string') {
- expectedStructureDimensionChildNode = expectedStructureNodesById.get(
- expectedStructureDimensionChildNode);
- assert.isDefined(expectedStructureDimensionChildNode);
- isReference = true;
- }
-
- // Check that the expected structure doesn't contain two children with
- // the same title.
- var childTitle = expectedStructureDimensionChildNode.title[d];
- assert.isFalse(
- expectedStructureDimensionChildNodeTitles.has(childTitle));
- expectedStructureDimensionChildNodeTitles.add(childTitle);
-
- // Get the associated child node of the actual tree.
- var actualTreeDimensionChildNode =
- actualTreeDimensionChildNodes.get(childTitle);
- assert.isDefined(actualTreeDimensionChildNode);
-
- // Check that all expected structure nodes with the same ID correspond
- // to the same actual tree node.
- var childId = expectedStructureDimensionChildNode.id;
- if (childId !== undefined) {
- if (actualTreeNodesById.has(childId)) {
- assert.strictEqual(actualTreeDimensionChildNode,
- actualTreeNodesById.get(childId));
- } else {
- actualTreeNodesById.set(childId, actualTreeDimensionChildNode);
- }
- }
-
- // Recursively check the structure of the actual tree child node
- // (unless the expected structure child node was a reference).
- if (!isReference) {
- checkTreeStructure(actualTreeDimensionChildNode,
- expectedStructureDimensionChildNode, actualTreeNodesById,
- expectedStructureNodesById);
- }
- }
-
- // Test sanity check (all child titles should be unique).
- assert.strictEqual(expectedStructureDimensionChildNodeTitles.size,
- expectedStructureDimensionChildNodes.length);
- }
- }
-
- function createBuilderWithEntries(dimensions, valueCount, pathEntries) {
- var builder = new MultiDimensionalViewBuilder(dimensions, valueCount);
- pathEntries.forEach(function(pathEntry) {
- builder.addPath(pathEntry.path, pathEntry.values, pathEntry.kind);
- });
- return builder;
- }
-
- function builderTest(testName, dimensions, valueCount, pathEntries,
- expectedTopDownTreeViewStructure, expectedTopDownHeavyViewStructure,
- expectedBottomUpHeavyViewStructure) {
- test('builder_' + testName, function() {
- // Create a multi-dimensional tree builder and add all paths to it.
- var builder =
- createBuilderWithEntries(dimensions, valueCount, pathEntries);
-
- // Build and check the views.
- checkTree(
- builder.buildView(ViewType.TOP_DOWN_TREE_VIEW),
- expectedTopDownTreeViewStructure);
- checkTree(
- builder.buildView(ViewType.TOP_DOWN_HEAVY_VIEW),
- expectedTopDownHeavyViewStructure);
- checkTree(
- builder.buildView(ViewType.BOTTOM_UP_HEAVY_VIEW),
- expectedBottomUpHeavyViewStructure);
- });
- }
-
- /**
- * Calculate the sum of binary powers.
- *
- * Each exponent can either be (1) a single number corresponding to a single
- * power of two (2**exponent), or (2) a two-element list for a sum over a
- * range of exponents (2**exponent[0] + 2**(exponent[0] + 1) + ... +
- * 2**exponent[1]).
- */
- function b(/* exponent1, ..., exponentN */) {
-
- var sum = 0;
- for (var i = 0; i < arguments.length; i++) {
- var exponent = arguments[i];
- if (typeof exponent === 'number') {
- sum += 1 << arguments[i];
- } else {
- assert.lengthOf(exponent, 2); // Test sanity check.
- // We use the fact that 2**A + 2**(A + 1) ... + 2**B =
- // (2**0 + 2**1 + ... 2**B) - (2**0 + 2**1 + ... + 2**(A - 1)) =
- // (2**(B + 1) - 1) - (2**A - 1) = 2**(B + 1) - 2**A.
- sum += (1 << (exponent[1] + 1)) - (1 << exponent[0]);
- }
- }
- return sum;
- }
-
- function checkZFunction(list, expectedResult) {
- if (typeof list === 'string') {
- assert.deepEqual(zFunction(list, 0), expectedResult);
- assert.deepEqual(zFunction(list[0] + list, 1), expectedResult);
- assert.deepEqual(zFunction(list + list, list.length), expectedResult);
- } else {
- assert.deepEqual(zFunction([].concat(list), 0), expectedResult);
- assert.deepEqual(zFunction([list[0]].concat(list), 1), expectedResult);
- assert.deepEqual(
- zFunction(list.concat(list), list.length), expectedResult);
- }
- }
-
- /**
- * Helper function for generating builder tests. Given a number of dimensions
- * and a list of path entries, this function generates the source code of
- * the corresponding builder test with expected top-down tree view, top-down
- * heavy view and bottom-up heavy view structures.
- *
- * This avoids the need to write such tests manually, which is very tedious.
- * However, the correctness of the generated structures needs to be verified
- * by the developer! Maximum line length must also be enforced manually.
- */
- function generateBuilderTest(
- targetTestName, dimensions, valueCount, pathEntries) {
- test('builderTestGenerator_' + targetTestName, function() {
- // Create the builder.
- var builder =
- createBuilderWithEntries(dimensions, valueCount, pathEntries);
-
- // Generate the test case source code.
- var generator = new tr.c.TestUtils.SourceGenerator();
- generator.indentBlock(2, false /* don't break line */, function() {
- // Test name and number of dimensions (first line).
- generator.push('builderTest(\'', targetTestName, '\', ',
- String(dimensions), ' /* dimensions */, ',
- String(valueCount), ' /* valueCount */,');
-
- generator.indentBlock(4, true /* break line */, function() {
- // Path entries.
- generator.formatMultiLineList(pathEntries, function(pathEntry) {
- generator.push('{ path: ');
- generator.formatSingleLineList(
- pathEntry.path,
- function(singleDimensionPath) {
- generator.formatSingleLineList(
- singleDimensionPath, generator.formatString, generator);
- });
- generator.push(', values: ');
- generator.formatSingleLineList(
- pathEntry.values,
- function(value) {
- generator.push(String(value));
- });
- var kind = pathEntry.kind === SELF ? 'SELF' : 'TOTAL';
- generator.push(', kind: ', kind, ' }');
- });
- generator.push(',');
- generator.breakLine();
-
- function formatExpectedTreeStructure(root, label) {
- var nextNodeId = 0;
- var nodeInfos = new WeakMap();
-
- function assignNodeIdsToRepeatedNodes(node) {
- if (nodeInfos.has(node)) {
- // We have already visited the node (one or more times), so
- // there is no need to visit its children.
- if (nodeInfos.get(node) === undefined) {
- // This is the second time we visited the node: Change the
- // undefined entry to a defined node info entry.
- nodeInfos.set(node, { id: undefined });
- }
- return;
- }
-
- // This is the first time we visited the node: Add an undefined
- // entry to the node info map and recursively visit all its
- // children.
- nodeInfos.set(node, undefined);
- node.children.forEach(function(singleDimensionChildren) {
- for (var child of singleDimensionChildren.values())
- assignNodeIdsToRepeatedNodes(child);
- });
- }
- assignNodeIdsToRepeatedNodes(root);
-
- // Track the multi-dimensional path to the current node to generate
- // comments.
- var paths = new Array(dimensions);
- for (var i = 0; i < paths.length; i++)
- paths[i] = [];
- function withChild(childNode, dimension, callback) {
- paths[dimension].push(childNode.title[dimension]);
- callback();
- paths[dimension].pop();
- }
- function appendPathComment(opt_label) {
- if (opt_label) {
- generator.pushComment(opt_label);
- return;
- }
-
- paths.forEach(function(dimensionPath, dimensionIndex) {
- if (dimensionIndex > 0)
- generator.pushComment(', ');
- if (dimensionPath.length === 0) {
- generator.pushComment('*');
- return;
- }
- dimensionPath.forEach(function(ancestorTitle, ancestorIndex) {
- if (ancestorIndex > 0)
- generator.pushComment(' -> ');
- generator.pushComment(ancestorTitle);
- });
- });
- }
-
- function formatExpectedTreeStructureRecursively(node, opt_label) {
- var nodeId = undefined;
- var nodeInfo = nodeInfos.get(node);
- if (nodeInfo !== undefined) {
- // This node is referenced multiple times in the expected tree
- // structure.
- nodeId = nodeInfo.id;
- if (nodeId === undefined) {
- // This is the first time we visited the node: Assign it a
- // unique node id and then format it and its descendants
- // recursively.
- nodeId = '#' + (nextNodeId++);
- nodeInfo.id = nodeId;
- } else {
- // We have already visited this node: Just insert the node's
- // id (instead of formatting it and its descendants
- // recursively again).
- generator.push('\'', nodeId, '\'');
- appendPathComment();
- return;
- }
- }
-
- generator.push('{');
- appendPathComment(opt_label);
-
- generator.indentBlock(2, true /* break line */, function() {
- // Node id (if defined).
- if (nodeId !== undefined) {
- generator.push('id: \'', nodeId, '\',');
- generator.breakLine();
- }
-
- // Node title.
- generator.push('title: ');
- generator.formatSingleLineList(
- node.title, generator.formatString, generator);
- generator.push(',');
- generator.breakLine();
-
- // Node values.
- generator.push('values: ');
- generator.formatMultiLineList(
- node.values,
- function(value) {
- generator.push('{');
- generator.indentBlock(2, true /* break line */,
- function() {
- generator.push('total: ', String(value.total), ',');
- generator.breakLine();
- generator.push('self: ', String(value.self), ',');
- generator.breakLine();
- generator.push('totalState: ');
- var totalStateName =
- tr.b.findFirstKeyInDictMatching(
- MultiDimensionalViewNode.TotalState,
- (n, s) => s === value.totalState);
- if (totalStateName === undefined) {
- throw new Error(
- 'Unknown total state: ' + value.totalState);
- }
- generator.push(totalStateName);
- generator.breakLine();
- });
- generator.push('}');
- });
- generator.push(',');
- generator.breakLine();
-
- // Node children.
- var children = node.children;
- generator.push('children: ');
- generator.formatMultiLineList(
- children,
- function(singleDimensionChildren, dimension) {
- generator.formatMultiLineList(
- tr.b.mapValues(singleDimensionChildren),
- function(child, childIndex) {
- withChild(child, dimension, function() {
- formatExpectedTreeStructureRecursively(child);
- });
- });
- });
- });
- generator.breakLine();
- generator.push('}');
- }
-
- formatExpectedTreeStructureRecursively(root, label);
- }
-
- // Build and format the three multi-dimensional views.
- formatExpectedTreeStructure(
- builder.buildTopDownTreeView(), 'Top-down tree view');
- generator.push(',');
- generator.breakLine();
- formatExpectedTreeStructure(
- builder.buildTopDownHeavyView(), 'Top-down heavy view');
- generator.push(',');
- generator.breakLine();
- formatExpectedTreeStructure(
- builder.buildBottomUpHeavyView(), 'Bottom-up heavy view');
- generator.push(');');
- });
- });
-
- tr.c.TestUtils.addSourceListing(this, generator.build());
-
- throw new Error('This error is thrown to prevent accidentally ' +
- 'checking in a test generator instead of an actual test.');
- });
- }
-
- builderTest('zeroDimensions_noPaths', 0 /* dimensions */, 1 /* valueCount */,
- [],
- { // Top-down tree view.
- title: [],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: []
- },
- { // Top-down heavy view.
- title: [],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: []
- },
- { // Bottom-up heavy view.
- title: [],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: []
- });
-
- builderTest('zeroDimensions_withPaths', 0 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [], values: [2], kind: SELF },
- { path: [], values: [3], kind: TOTAL },
- { path: [], values: [4], kind: SELF },
- { path: [], values: [5], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [],
- values: [
- {
- total: 8,
- self: 6,
- totalState: EXACT
- }
- ],
- children: []
- },
- { // Top-down heavy view.
- title: [],
- values: [
- {
- total: 8,
- self: 6,
- totalState: EXACT
- }
- ],
- children: []
- },
- { // Bottom-up heavy view.
- title: [],
- values: [
- {
- total: 8,
- self: 6,
- totalState: EXACT
- }
- ],
- children: []
- });
-
- builderTest('oneDimension_noPaths', 1 /* dimensions */, 1 /* valueCount */,
- [],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- []
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- []
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- []
- ]
- });
-
- builderTest('oneDimension_zeroLengthPath', 1 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [[]], values: [42], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 42,
- self: 42,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 42,
- self: 42,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 42,
- self: 42,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- });
-
- builderTest('oneDimension_noRecursion', 1 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A', 'B', 'C']], values: [10], kind: SELF },
- { path: [['A', 'B']], values: [20], kind: SELF },
- { path: [['B', 'D']], values: [30], kind: SELF },
- { path: [['A', 'B', 'D']], values: [40], kind: SELF },
- { path: [['A', 'C']], values: [50], kind: SELF },
- { path: [[]], values: [60], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 210,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 120,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 70,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A -> B -> D.
- title: ['D'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // A -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 30,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 210,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 120,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 70,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A -> B -> D.
- title: ['D'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // A -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 100,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C.
- title: ['C'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // B -> D.
- title: ['D'],
- values: [
- {
- total: 70,
- self: 70,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 60,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // D.
- title: ['D'],
- values: [
- {
- total: 70,
- self: 70,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 210,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 120,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 100,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A.
- title: ['A'],
- values: [
- {
- total: 70,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 60,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B.
- title: ['B'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A.
- title: ['A'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // D.
- title: ['D'],
- values: [
- {
- total: 70,
- self: 70,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B.
- title: ['B'],
- values: [
- {
- total: 70,
- self: 70,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> A.
- title: ['A'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('oneDimension_simpleRecursion', 1 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A']], values: [10], kind: SELF },
- { path: [['A', 'A', 'A']], values: [20], kind: SELF },
- { path: [['A', 'A']], values: [30], kind: SELF },
- { path: [['A', 'A', 'A', 'A']], values: [40], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 100,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A.
- title: ['A'],
- values: [
- {
- total: 90,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> A -> A.
- title: ['A'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 100,
- self: 100,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A.
- title: ['A'],
- values: [
- {
- total: 90,
- self: 90,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> A -> A.
- title: ['A'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 100,
- self: 100,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A.
- title: ['A'],
- values: [
- {
- total: 90,
- self: 90,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 60,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> A -> A.
- title: ['A'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('oneDimension_complexRecursion', 1 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A', 'B', 'C']], values: [10], kind: SELF },
- { path: [['A', 'D', 'B', 'C', 'A', 'B', 'C']], values: [20],
- kind: SELF },
- { path: [['A', 'D', 'B', 'C', 'A', 'B', 'D']], values: [30],
- kind: SELF },
- { path: [['C', 'B', 'C']], values: [40], kind: SELF },
- { path: [['C', 'B', 'C', 'B', 'C']], values: [50], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 150,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // A -> D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C -> A -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C -> A ->
- // B -> C.
- title: ['C'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A -> D -> B -> C -> A ->
- // B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 90,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B.
- title: ['B'],
- values: [
- {
- total: 90,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 90,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 150,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A -> B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // A -> D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C -> A -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> D -> B -> C -> A ->
- // B -> C.
- title: ['C'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A -> D -> B -> C -> A ->
- // B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 150,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C.
- title: ['C'],
- values: [
- {
- total: 150,
- self: 120,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> A -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // B -> C -> A -> B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 150,
- self: 120,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> A -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // C -> A -> B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // C -> B.
- title: ['B'],
- values: [
- {
- total: 90,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 90,
- self: 90,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> C -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> C -> A -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> C -> A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // D -> B -> C -> A -> B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 150,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> C -> B -> D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> C -> B -> D -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 150,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A.
- title: ['A'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A -> C -> B -> D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A -> C -> B -> D -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B -> D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> D -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // B -> C.
- title: ['C'],
- values: [
- {
- total: 90,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 150,
- self: 120,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B.
- title: ['B'],
- values: [
- {
- total: 150,
- self: 120,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A.
- title: ['A'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A -> C.
- title: ['C'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A -> C -> B.
- title: ['B'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A -> C -> B -> D.
- title: ['D'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A -> C -> B ->
- // D -> A.
- title: ['A'],
- values: [
- {
- total: 20,
- self: 20,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // C -> B -> D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> D -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 90,
- self: 90,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C -> B.
- title: ['B'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> C -> B -> C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 50,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // D.
- title: ['D'],
- values: [
- {
- total: 50,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> A.
- title: ['A'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // D -> B.
- title: ['B'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> A.
- title: ['A'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> A -> C.
- title: ['C'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> A -> C -> B.
- title: ['B'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> A -> C -> B -> D.
- title: ['D'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> B -> A -> C -> B ->
- // D -> A.
- title: ['A'],
- values: [
- {
- total: 30,
- self: 30,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('oneDimension_withTotalSizes', 1 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['B', 'C']], values: [10], kind: TOTAL },
- { path: [['B', 'C', 'D']], values: [5], kind: TOTAL },
- { path: [['B']], values: [15], kind: SELF },
- { path: [['B']], values: [20], kind: TOTAL },
- { path: [['B', 'D']], values: [40], kind: SELF },
- { path: [['C']], values: [50], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 115,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B.
- title: ['B'],
- values: [
- {
- total: 65,
- self: 15,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // B -> C.
- title: ['C'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // B -> C -> D.
- title: ['D'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // B -> D.
- title: ['D'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 50,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 115,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B.
- title: ['B'],
- values: [
- {
- total: 65,
- self: 15,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C.
- title: ['C'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> C -> D.
- title: ['D'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // B -> D.
- title: ['D'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> D.
- title: ['D'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // D.
- title: ['D'],
- values: [
- {
- total: 45,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 115,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B.
- title: ['B'],
- values: [
- {
- total: 65,
- self: 15,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B.
- title: ['B'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // D.
- title: ['D'],
- values: [
- {
- total: 45,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> C.
- title: ['C'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // D -> C -> B.
- title: ['B'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // D -> B.
- title: ['B'],
- values: [
- {
- total: 40,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('oneDimension_protoTitle', 1 /* dimensions */, 1 /* valueCount */,
- [
- { path: [['__proto__']], values: [45], kind: SELF },
- { path: [['A']], values: [18], kind: SELF },
- { path: [['A', '__proto__']], values: [89], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 152,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // __proto__.
- title: ['__proto__'],
- values: [
- {
- total: 45,
- self: 45,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A.
- title: ['A'],
- values: [
- {
- total: 107,
- self: 18,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> __proto__.
- title: ['__proto__'],
- values: [
- {
- total: 89,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 152,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // __proto__.
- title: ['__proto__'],
- values: [
- {
- total: 134,
- self: 45,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A.
- title: ['A'],
- values: [
- {
- total: 107,
- self: 18,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> __proto__.
- title: ['__proto__'],
- values: [
- {
- total: 89,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 152,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // __proto__.
- title: ['__proto__'],
- values: [
- {
- total: 134,
- self: 45,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // __proto__ -> A.
- title: ['A'],
- values: [
- {
- total: 89,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // A.
- title: ['A'],
- values: [
- {
- total: 107,
- self: 18,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- });
-
- // See tracing/tracing/base/multi_dimensional_view.html
- // (MultiDimensionalViewBuilder.addDimensionToTopDownHeavyViewNode_ and
- // MultiDimensionalViewBuilder.addDimensionToBottomUpHeavyViewNode_
- // documentation).
- builderTest('oneDimension_documentationExample', 1 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A']], values: [10], kind: SELF },
- { path: [['A']], values: [30], kind: TOTAL },
- { path: [['A', 'B']], values: [1], kind: SELF },
- { path: [['A', 'B', 'A']], values: [3], kind: SELF },
- { path: [['A', 'B', 'A']], values: [8], kind: TOTAL },
- { path: [['A', 'B', 'C']], values: [2], kind: SELF },
- { path: [['A', 'B', 'C']], values: [7], kind: TOTAL },
- { path: [['B']], values: [12], kind: SELF },
- { path: [['B']], values: [18], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined],
- values: [
- {
- total: 48,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 30,
- self: 10,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 16,
- self: 1,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> A.
- title: ['A'],
- values: [
- {
- total: 8,
- self: 3,
- totalState: EXACT
- }
- ],
- children: [
- []
- ]
- },
- { // A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: EXACT
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 18,
- self: 12,
- totalState: EXACT
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined],
- values: [
- {
- total: 48,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 30,
- self: 13,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 16,
- self: 1,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> A.
- title: ['A'],
- values: [
- {
- total: 8,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // A -> B -> C.
- title: ['C'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 34,
- self: 13,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A.
- title: ['A'],
- values: [
- {
- total: 8,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- },
- { // B -> C.
- title: ['C'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined],
- values: [
- {
- total: 48,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A.
- title: ['A'],
- values: [
- {
- total: 30,
- self: 13,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B.
- title: ['B'],
- values: [
- {
- total: 8,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> A.
- title: ['A'],
- values: [
- {
- total: 8,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B.
- title: ['B'],
- values: [
- {
- total: 34,
- self: 13,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A.
- title: ['A'],
- values: [
- {
- total: 16,
- self: 1,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- },
- { // C.
- title: ['C'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B.
- title: ['B'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A.
- title: ['A'],
- values: [
- {
- total: 7,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('twoDimensions_noPaths', 2 /* dimensions */, 1 /* valueCount */,
- [],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- []
- ]
- });
-
- // See tracing/tracing/base/multi_dimensional_view.html
- // (MultiDimensionalViewNode.finalizeTotalValues_ documentation).
- builderTest('twoDimensions_totalCalculation', 2 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [[], []], values: [10], kind: SELF },
- { path: [['A'], []], values: [21], kind: SELF },
- { path: [['A'], []], values: [30], kind: TOTAL },
- { path: [['B'], []], values: [25], kind: SELF },
- { path: [['B'], []], values: [32], kind: TOTAL },
- { path: [[], ['1']], values: [3], kind: SELF },
- { path: [[], ['1']], values: [15], kind: TOTAL },
- { path: [[], ['2']], values: [40], kind: SELF },
- { path: [[], ['2']], values: [41], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 115,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 30,
- self: 21,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 32,
- self: 25,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ],
- [
- { // *, 1.
- title: [undefined, '1'],
- values: [
- {
- total: 15,
- self: 3,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // *, 2.
- title: [undefined, '2'],
- values: [
- {
- total: 41,
- self: 40,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 115,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 30,
- self: 21,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 32,
- self: 25,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ],
- [
- { // *, 1.
- title: [undefined, '1'],
- values: [
- {
- total: 15,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // *, 2.
- title: [undefined, '2'],
- values: [
- {
- total: 41,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 115,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 30,
- self: 21,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 32,
- self: 25,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ],
- [
- { // *, 1.
- title: [undefined, '1'],
- values: [
- {
- total: 15,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // *, 2.
- title: [undefined, '2'],
- values: [
- {
- total: 41,
- self: 40,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- });
-
- // See tracing/tracing/base/multi_dimensional_view.html
- // (MultiDimensionalViewNode documentation).
- builderTest('twoDimensions_documentationExample1', 2 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A', 'B'], ['T1', 'T2']], values: [1], kind: TOTAL },
- { path: [['A', 'B'], ['T1']], values: [2], kind: TOTAL },
- { path: [['A', 'B'], []], values: [4], kind: TOTAL },
- { path: [['A'], ['T1', 'T2']], values: [10], kind: TOTAL },
- { path: [['A'], ['T1']], values: [20], kind: TOTAL },
- { path: [['A'], []], values: [40], kind: TOTAL },
- { path: [[], ['T1', 'T2']], values: [100], kind: TOTAL },
- { path: [[], ['T1']], values: [200], kind: TOTAL },
- { path: [[], []], values: [400], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 400,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 4,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // A -> B, T1.
- id: '#0',
- title: ['B', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // A -> B, T1 -> T2.
- id: '#1',
- title: ['B', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, T1.
- id: '#2',
- title: ['A', 'T1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#0' // A -> B, T1.
- ],
- [
- { // A, T1 -> T2.
- id: '#3',
- title: ['A', 'T2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#1' // A -> B, T1 -> T2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 200,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#2' // A, T1.
- ],
- [
- { // *, T1 -> T2.
- title: [undefined, 'T2'],
- values: [
- {
- total: 100,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#3' // A, T1 -> T2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 400,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 4,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B, T1.
- id: '#0',
- title: ['B', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B, T1 -> T2.
- id: '#1',
- title: ['B', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, T2.
- id: '#2',
- title: ['B', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, T1.
- id: '#3',
- title: ['A', 'T1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> B, T1.
- ],
- [
- { // A, T1 -> T2.
- id: '#4',
- title: ['A', 'T2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // A -> B, T1 -> T2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A, T2.
- id: '#5',
- title: ['A', 'T2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // A -> B, T2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 4,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B, T1.
- id: '#6',
- title: ['B', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B, T1 -> T2.
- id: '#7',
- title: ['B', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B, T2.
- id: '#8',
- title: ['B', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 200,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3', // A, T1.
- '#6' // B, T1.
- ],
- [
- { // *, T1 -> T2.
- title: [undefined, 'T2'],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4', // A, T1 -> T2.
- '#7' // B, T1 -> T2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, T2.
- title: [undefined, 'T2'],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5', // A, T2.
- '#8' // B, T2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 400,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A, T1.
- id: '#0',
- title: ['A', 'T1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // A, T2.
- id: '#1',
- title: ['A', 'T2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A, T2 -> T1.
- id: '#2',
- title: ['A', 'T1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 4,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 4,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A, T1.
- id: '#3',
- title: ['A', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // B -> A, T2.
- id: '#4',
- title: ['A', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A, T2 -> T1.
- id: '#5',
- title: ['A', 'T1'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, T1.
- id: '#6',
- title: ['B', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // B -> A, T1.
- ],
- []
- ]
- },
- { // B, T2.
- id: '#7',
- title: ['B', 'T2'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // B -> A, T2.
- ],
- [
- { // B, T2 -> T1.
- id: '#8',
- title: ['B', 'T1'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // B -> A, T2 -> T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 200,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0', // A, T1.
- '#6' // B, T1.
- ],
- []
- ]
- },
- { // *, T2.
- title: [undefined, 'T2'],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1', // A, T2.
- '#7' // B, T2.
- ],
- [
- { // *, T2 -> T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 100,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2', // A, T2 -> T1.
- '#8' // B, T2 -> T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- // See tracing/tracing/base/multi_dimensional_view.html
- // (MultiDimensionalViewBuilder documentation).
- builderTest('twoDimensions_documentationExample2', 2 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['Saturday'], ['Cooking']], values: [1], kind: SELF },
- { path: [['Saturday'], ['Sports', 'Football']], values: [2],
- kind: SELF },
- { path: [['Sunday'], ['Sports', 'Basketball']], values: [3],
- kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 6,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // Saturday, *.
- title: ['Saturday', undefined],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Saturday, Cooking.
- id: '#0',
- title: ['Saturday', 'Cooking'],
- values: [
- {
- total: 1,
- self: 1,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Saturday, Sports.
- id: '#1',
- title: ['Saturday', 'Sports'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Saturday, Sports -> Football.
- id: '#2',
- title: ['Saturday', 'Football'],
- values: [
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Sunday, *.
- title: ['Sunday', undefined],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Sunday, Sports.
- id: '#3',
- title: ['Sunday', 'Sports'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Sunday, Sports -> Basketball.
- id: '#4',
- title: ['Sunday', 'Basketball'],
- values: [
- {
- total: 3,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, Cooking.
- title: [undefined, 'Cooking'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // Saturday, Cooking.
- ],
- []
- ]
- },
- { // *, Sports.
- title: [undefined, 'Sports'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1', // Saturday, Sports.
- '#3' // Sunday, Sports.
- ],
- [
- { // *, Sports -> Football.
- title: [undefined, 'Football'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // Saturday, Sports -> Football.
- ],
- []
- ]
- },
- { // *, Sports -> Basketball.
- title: [undefined, 'Basketball'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // Sunday, Sports -> Basketball.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 6,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // Saturday, *.
- title: ['Saturday', undefined],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Saturday, Cooking.
- id: '#0',
- title: ['Saturday', 'Cooking'],
- values: [
- {
- total: 1,
- self: 1,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Saturday, Sports.
- id: '#1',
- title: ['Saturday', 'Sports'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Saturday, Sports -> Football.
- id: '#2',
- title: ['Saturday', 'Football'],
- values: [
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Saturday, Football.
- id: '#3',
- title: ['Saturday', 'Football'],
- values: [
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Sunday, *.
- title: ['Sunday', undefined],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Sunday, Sports.
- id: '#4',
- title: ['Sunday', 'Sports'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Sunday, Sports -> Basketball.
- id: '#5',
- title: ['Sunday', 'Basketball'],
- values: [
- {
- total: 3,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Sunday, Basketball.
- id: '#6',
- title: ['Sunday', 'Basketball'],
- values: [
- {
- total: 3,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, Cooking.
- title: [undefined, 'Cooking'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // Saturday, Cooking.
- ],
- []
- ]
- },
- { // *, Sports.
- title: [undefined, 'Sports'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1', // Saturday, Sports.
- '#4' // Sunday, Sports.
- ],
- [
- { // *, Sports -> Football.
- title: [undefined, 'Football'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // Saturday, Sports -> Football.
- ],
- []
- ]
- },
- { // *, Sports -> Basketball.
- title: [undefined, 'Basketball'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // Sunday, Sports -> Basketball.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, Football.
- title: [undefined, 'Football'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // Saturday, Football.
- ],
- []
- ]
- },
- { // *, Basketball.
- title: [undefined, 'Basketball'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6' // Sunday, Basketball.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 6,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // Saturday, *.
- title: ['Saturday', undefined],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Saturday, Cooking.
- id: '#0',
- title: ['Saturday', 'Cooking'],
- values: [
- {
- total: 1,
- self: 1,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Saturday, Sports.
- id: '#1',
- title: ['Saturday', 'Sports'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Saturday, Football.
- id: '#2',
- title: ['Saturday', 'Football'],
- values: [
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Saturday, Football -> Sports.
- id: '#3',
- title: ['Saturday', 'Sports'],
- values: [
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Sunday, *.
- title: ['Sunday', undefined],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Sunday, Sports.
- id: '#4',
- title: ['Sunday', 'Sports'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Sunday, Basketball.
- id: '#5',
- title: ['Sunday', 'Basketball'],
- values: [
- {
- total: 3,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Sunday, Basketball -> Sports.
- id: '#6',
- title: ['Sunday', 'Sports'],
- values: [
- {
- total: 3,
- self: 3,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, Cooking.
- title: [undefined, 'Cooking'],
- values: [
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // Saturday, Cooking.
- ],
- []
- ]
- },
- { // *, Sports.
- title: [undefined, 'Sports'],
- values: [
- {
- total: 5,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1', // Saturday, Sports.
- '#4' // Sunday, Sports.
- ],
- []
- ]
- },
- { // *, Football.
- title: [undefined, 'Football'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // Saturday, Football.
- ],
- [
- { // *, Football -> Sports.
- title: [undefined, 'Sports'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // Saturday, Football -> Sports.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, Basketball.
- title: [undefined, 'Basketball'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // Sunday, Basketball.
- ],
- [
- { // *, Basketball -> Sports.
- title: [undefined, 'Sports'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6' // Sunday, Basketball -> Sports.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- // See https://goo.gl/KY7zVE.
- builderTest('twoDimensions_heapDumpExample', 2 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['BrMain', 'Init'], ['T']], values: [151], kind: TOTAL },
- { path: [['BrMain', 'Init'], ['W']], values: [83], kind: TOTAL },
- { path: [['BrMain', 'Init'], []], values: [242], kind: TOTAL },
- { path: [['BrMain', 'MsgLp'], ['T']], values: [307], kind: TOTAL },
- { path: [['BrMain', 'MsgLp'], ['V']], values: [281], kind: TOTAL },
- { path: [['BrMain', 'MsgLp'], []], values: [601], kind: TOTAL },
- { path: [['RdMain', 'RTask'], ['T']], values: [211], kind: TOTAL },
- { path: [['RdMain', 'RTask'], ['W']], values: [337], kind: TOTAL },
- { path: [['RdMain', 'RTask'], []], values: [556], kind: TOTAL },
- { path: [[], ['T']], values: [698], kind: TOTAL },
- { path: [[], ['V']], values: [340], kind: TOTAL },
- { path: [[], ['W']], values: [461], kind: TOTAL },
- { path: [[], []], values: [1538], kind: TOTAL },
- { path: [['BrMain'], ['T']], values: [465], kind: TOTAL },
- { path: [['BrMain'], ['V']], values: [297], kind: TOTAL },
- { path: [['BrMain'], ['W']], values: [96], kind: TOTAL },
- { path: [['BrMain'], []], values: [876], kind: TOTAL },
- { path: [['RdMain'], ['T']], values: [229], kind: TOTAL },
- { path: [['RdMain'], ['W']], values: [355], kind: TOTAL },
- { path: [['RdMain'], []], values: [628], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 1538,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // BrMain, *.
- title: ['BrMain', undefined],
- values: [
- {
- total: 876,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // BrMain -> Init, *.
- title: ['Init', undefined],
- values: [
- {
- total: 242,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // BrMain -> Init, T.
- id: '#0',
- title: ['Init', 'T'],
- values: [
- {
- total: 151,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // BrMain -> Init, W.
- id: '#1',
- title: ['Init', 'W'],
- values: [
- {
- total: 83,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // BrMain -> MsgLp, *.
- title: ['MsgLp', undefined],
- values: [
- {
- total: 601,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // BrMain -> MsgLp, T.
- id: '#2',
- title: ['MsgLp', 'T'],
- values: [
- {
- total: 307,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // BrMain -> MsgLp, V.
- id: '#3',
- title: ['MsgLp', 'V'],
- values: [
- {
- total: 281,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // BrMain, T.
- id: '#4',
- title: ['BrMain', 'T'],
- values: [
- {
- total: 465,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#0', // BrMain -> Init, T.
- '#2' // BrMain -> MsgLp, T.
- ],
- []
- ]
- },
- { // BrMain, V.
- id: '#5',
- title: ['BrMain', 'V'],
- values: [
- {
- total: 297,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#3' // BrMain -> MsgLp, V.
- ],
- []
- ]
- },
- { // BrMain, W.
- id: '#6',
- title: ['BrMain', 'W'],
- values: [
- {
- total: 96,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#1' // BrMain -> Init, W.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // RdMain, *.
- title: ['RdMain', undefined],
- values: [
- {
- total: 628,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // RdMain -> RTask, *.
- title: ['RTask', undefined],
- values: [
- {
- total: 556,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // RdMain -> RTask, T.
- id: '#7',
- title: ['RTask', 'T'],
- values: [
- {
- total: 211,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // RdMain -> RTask, W.
- id: '#8',
- title: ['RTask', 'W'],
- values: [
- {
- total: 337,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // RdMain, T.
- id: '#9',
- title: ['RdMain', 'T'],
- values: [
- {
- total: 229,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#7' // RdMain -> RTask, T.
- ],
- []
- ]
- },
- { // RdMain, W.
- id: '#10',
- title: ['RdMain', 'W'],
- values: [
- {
- total: 355,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#8' // RdMain -> RTask, W.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T.
- title: [undefined, 'T'],
- values: [
- {
- total: 698,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#4', // BrMain, T.
- '#9' // RdMain, T.
- ],
- []
- ]
- },
- { // *, V.
- title: [undefined, 'V'],
- values: [
- {
- total: 340,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#5' // BrMain, V.
- ],
- []
- ]
- },
- { // *, W.
- title: [undefined, 'W'],
- values: [
- {
- total: 461,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#6', // BrMain, W.
- '#10' // RdMain, W.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 1538,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // BrMain, *.
- title: ['BrMain', undefined],
- values: [
- {
- total: 876,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // BrMain -> Init, *.
- title: ['Init', undefined],
- values: [
- {
- total: 242,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // BrMain -> Init, T.
- id: '#0',
- title: ['Init', 'T'],
- values: [
- {
- total: 151,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // BrMain -> Init, W.
- id: '#1',
- title: ['Init', 'W'],
- values: [
- {
- total: 83,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // BrMain -> MsgLp, *.
- title: ['MsgLp', undefined],
- values: [
- {
- total: 601,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // BrMain -> MsgLp, T.
- id: '#2',
- title: ['MsgLp', 'T'],
- values: [
- {
- total: 307,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // BrMain -> MsgLp, V.
- id: '#3',
- title: ['MsgLp', 'V'],
- values: [
- {
- total: 281,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // BrMain, T.
- id: '#4',
- title: ['BrMain', 'T'],
- values: [
- {
- total: 465,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0', // BrMain -> Init, T.
- '#2' // BrMain -> MsgLp, T.
- ],
- []
- ]
- },
- { // BrMain, V.
- id: '#5',
- title: ['BrMain', 'V'],
- values: [
- {
- total: 297,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // BrMain -> MsgLp, V.
- ],
- []
- ]
- },
- { // BrMain, W.
- id: '#6',
- title: ['BrMain', 'W'],
- values: [
- {
- total: 96,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // BrMain -> Init, W.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Init, *.
- title: ['Init', undefined],
- values: [
- {
- total: 242,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Init, T.
- id: '#7',
- title: ['Init', 'T'],
- values: [
- {
- total: 151,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Init, W.
- id: '#8',
- title: ['Init', 'W'],
- values: [
- {
- total: 83,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // MsgLp, *.
- title: ['MsgLp', undefined],
- values: [
- {
- total: 601,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // MsgLp, T.
- id: '#9',
- title: ['MsgLp', 'T'],
- values: [
- {
- total: 307,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // MsgLp, V.
- id: '#10',
- title: ['MsgLp', 'V'],
- values: [
- {
- total: 281,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // RdMain, *.
- title: ['RdMain', undefined],
- values: [
- {
- total: 628,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // RdMain -> RTask, *.
- title: ['RTask', undefined],
- values: [
- {
- total: 556,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // RdMain -> RTask, T.
- id: '#11',
- title: ['RTask', 'T'],
- values: [
- {
- total: 211,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // RdMain -> RTask, W.
- id: '#12',
- title: ['RTask', 'W'],
- values: [
- {
- total: 337,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // RdMain, T.
- id: '#13',
- title: ['RdMain', 'T'],
- values: [
- {
- total: 229,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11' // RdMain -> RTask, T.
- ],
- []
- ]
- },
- { // RdMain, W.
- id: '#14',
- title: ['RdMain', 'W'],
- values: [
- {
- total: 355,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12' // RdMain -> RTask, W.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // RTask, *.
- title: ['RTask', undefined],
- values: [
- {
- total: 556,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // RTask, T.
- id: '#15',
- title: ['RTask', 'T'],
- values: [
- {
- total: 211,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // RTask, W.
- id: '#16',
- title: ['RTask', 'W'],
- values: [
- {
- total: 337,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T.
- title: [undefined, 'T'],
- values: [
- {
- total: 698,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4', // BrMain, T.
- '#7', // Init, T.
- '#9', // MsgLp, T.
- '#13', // RdMain, T.
- '#15' // RTask, T.
- ],
- []
- ]
- },
- { // *, V.
- title: [undefined, 'V'],
- values: [
- {
- total: 340,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5', // BrMain, V.
- '#10' // MsgLp, V.
- ],
- []
- ]
- },
- { // *, W.
- title: [undefined, 'W'],
- values: [
- {
- total: 461,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6', // BrMain, W.
- '#8', // Init, W.
- '#14', // RdMain, W.
- '#16' // RTask, W.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 1538,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // BrMain, *.
- title: ['BrMain', undefined],
- values: [
- {
- total: 876,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // BrMain, T.
- id: '#0',
- title: ['BrMain', 'T'],
- values: [
- {
- total: 465,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // BrMain, V.
- id: '#1',
- title: ['BrMain', 'V'],
- values: [
- {
- total: 297,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // BrMain, W.
- id: '#2',
- title: ['BrMain', 'W'],
- values: [
- {
- total: 96,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Init, *.
- title: ['Init', undefined],
- values: [
- {
- total: 242,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // Init -> BrMain, *.
- title: ['BrMain', undefined],
- values: [
- {
- total: 242,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // Init -> BrMain, T.
- id: '#3',
- title: ['BrMain', 'T'],
- values: [
- {
- total: 151,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // Init -> BrMain, W.
- id: '#4',
- title: ['BrMain', 'W'],
- values: [
- {
- total: 83,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // Init, T.
- id: '#5',
- title: ['Init', 'T'],
- values: [
- {
- total: 151,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // Init -> BrMain, T.
- ],
- []
- ]
- },
- { // Init, W.
- id: '#6',
- title: ['Init', 'W'],
- values: [
- {
- total: 83,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // Init -> BrMain, W.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // MsgLp, *.
- title: ['MsgLp', undefined],
- values: [
- {
- total: 601,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // MsgLp -> BrMain, *.
- title: ['BrMain', undefined],
- values: [
- {
- total: 601,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // MsgLp -> BrMain, T.
- id: '#7',
- title: ['BrMain', 'T'],
- values: [
- {
- total: 307,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // MsgLp -> BrMain, V.
- id: '#8',
- title: ['BrMain', 'V'],
- values: [
- {
- total: 281,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // MsgLp, T.
- id: '#9',
- title: ['MsgLp', 'T'],
- values: [
- {
- total: 307,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7' // MsgLp -> BrMain, T.
- ],
- []
- ]
- },
- { // MsgLp, V.
- id: '#10',
- title: ['MsgLp', 'V'],
- values: [
- {
- total: 281,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8' // MsgLp -> BrMain, V.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // RdMain, *.
- title: ['RdMain', undefined],
- values: [
- {
- total: 628,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // RdMain, T.
- id: '#11',
- title: ['RdMain', 'T'],
- values: [
- {
- total: 229,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // RdMain, W.
- id: '#12',
- title: ['RdMain', 'W'],
- values: [
- {
- total: 355,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // RTask, *.
- title: ['RTask', undefined],
- values: [
- {
- total: 556,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // RTask -> RdMain, *.
- title: ['RdMain', undefined],
- values: [
- {
- total: 556,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // RTask -> RdMain, T.
- id: '#13',
- title: ['RdMain', 'T'],
- values: [
- {
- total: 211,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // RTask -> RdMain, W.
- id: '#14',
- title: ['RdMain', 'W'],
- values: [
- {
- total: 337,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // RTask, T.
- id: '#15',
- title: ['RTask', 'T'],
- values: [
- {
- total: 211,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13' // RTask -> RdMain, T.
- ],
- []
- ]
- },
- { // RTask, W.
- id: '#16',
- title: ['RTask', 'W'],
- values: [
- {
- total: 337,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14' // RTask -> RdMain, W.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T.
- title: [undefined, 'T'],
- values: [
- {
- total: 698,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0', // BrMain, T.
- '#5', // Init, T.
- '#9', // MsgLp, T.
- '#11', // RdMain, T.
- '#15' // RTask, T.
- ],
- []
- ]
- },
- { // *, V.
- title: [undefined, 'V'],
- values: [
- {
- total: 340,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1', // BrMain, V.
- '#10' // MsgLp, V.
- ],
- []
- ]
- },
- { // *, W.
- title: [undefined, 'W'],
- values: [
- {
- total: 461,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2', // BrMain, W.
- '#6', // Init, W.
- '#12', // RdMain, W.
- '#16' // RTask, W.
- ],
- []
- ]
- }
- ]
- ]
- });
-
- builderTest('twoDimensions_oneRecursiveDimension', 2 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A', 'B'], []], values: [1500], kind: TOTAL },
- { path: [['A', 'B', 'A'], []], values: [200], kind: TOTAL },
- { path: [['A', 'B', 'B'], []], values: [300], kind: TOTAL },
- { path: [['A', 'B', 'C'], []], values: [700], kind: TOTAL },
- { path: [['A', 'B'], ['T1']], values: [15], kind: TOTAL },
- { path: [['A', 'B', 'A'], ['T1']], values: [2], kind: TOTAL },
- { path: [['A', 'B', 'B'], ['T1']], values: [3], kind: TOTAL },
- { path: [['A', 'B', 'C'], ['T1']], values: [7], kind: TOTAL },
- { path: [['B', 'A'], ['T1']], values: [30000], kind: TOTAL },
- { path: [['B', 'A'], []], values: [40000], kind: TOTAL }
- ],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 1500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 1500,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- { // A -> B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 200,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // A -> B -> A, T1.
- id: '#0',
- title: ['A', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 300,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, T1.
- id: '#1',
- title: ['B', 'T1'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B -> C, *.
- title: ['C', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // A -> B -> C, T1.
- id: '#2',
- title: ['C', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, T1.
- id: '#3',
- title: ['B', 'T1'],
- values: [
- {
- total: 15,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#0', // A -> B -> A, T1.
- '#1', // A -> B -> B, T1.
- '#2' // A -> B -> C, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, T1.
- id: '#4',
- title: ['A', 'T1'],
- values: [
- {
- total: 15,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // A -> B, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 40000,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40000,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [
- { // B -> A, T1.
- id: '#5',
- title: ['A', 'T1'],
- values: [
- {
- total: 30000,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, T1.
- id: '#6',
- title: ['B', 'T1'],
- values: [
- {
- total: 30000,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // B -> A, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4', // A, T1.
- '#6' // B, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 1500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 200,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> A, T1.
- id: '#0',
- title: ['A', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 300,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, T1.
- id: '#1',
- title: ['B', 'T1'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B -> C, *.
- title: ['C', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> C, T1.
- id: '#2',
- title: ['C', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, T1.
- id: '#3',
- title: ['B', 'T1'],
- values: [
- {
- total: 15,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0', // A -> B -> A, T1.
- '#1', // A -> B -> B, T1.
- '#2' // A -> B -> C, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, T1.
- id: '#4',
- title: ['A', 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // A -> B, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40200,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A, T1.
- id: '#5',
- title: ['A', 'T1'],
- values: [
- {
- total: 30002,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 300,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B, T1.
- id: '#6',
- title: ['B', 'T1'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> C, *.
- title: ['C', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> C, T1.
- id: '#7',
- title: ['C', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, T1.
- id: '#8',
- title: ['B', 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5', // B -> A, T1.
- '#6', // B -> B, T1.
- '#7' // B -> C, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // C, *.
- title: ['C', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // C, T1.
- id: '#9',
- title: ['C', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4', // A, T1.
- '#8', // B, T1.
- '#9' // C, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 40200,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 200,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> A, T1.
- id: '#0',
- title: ['A', 'T1'],
- values: [
- {
- total: 2,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, T1.
- id: '#1',
- title: ['B', 'T1'],
- values: [
- {
- total: 30002,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> B -> A, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, T1.
- id: '#2',
- title: ['A', 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // A -> B, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 41500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 1500,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A, T1.
- id: '#3',
- title: ['A', 'T1'],
- values: [
- {
- total: 15,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 300,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 300,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B -> A, T1.
- id: '#4',
- title: ['A', 'T1'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B -> B, T1.
- id: '#5',
- title: ['B', 'T1'],
- values: [
- {
- total: 3,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // B -> B -> A, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, T1.
- id: '#6',
- title: ['B', 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3', // B -> A, T1.
- '#5' // B -> B, T1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // C, *.
- title: ['C', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // C -> B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 700,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // C -> B -> A, T1.
- id: '#7',
- title: ['A', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // C -> B, T1.
- id: '#8',
- title: ['B', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7' // C -> B -> A, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // C, T1.
- id: '#9',
- title: ['C', 'T1'],
- values: [
- {
- total: 7,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8' // C -> B, T1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, T1.
- title: [undefined, 'T1'],
- values: [
- {
- total: 30015,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2', // A, T1.
- '#6', // B, T1.
- '#9' // C, T1.
- ],
- []
- ]
- }
- ]
- ]
- });
-
- builderTest('twoDimensions_twoRecursiveDimensions', 2 /* dimensions */,
- 1 /* valueCount */,
- [
- { path: [['A', 'A', 'B'], ['1', '2', '2']], values: [10], kind: SELF },
- { path: [['A', 'A'], ['1', '2']], values: [40], kind: TOTAL },
- { path: [['A', 'B', 'B'], ['1', '1', '2']], values: [20], kind: TOTAL },
- { path: [['A', 'B'], ['1', '1']], values: [5], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined, undefined],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 1.
- id: '#0',
- title: ['B', '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 1 -> 2.
- id: '#1',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 1 -> 2 -> 2.
- id: '#2',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> A, 1.
- id: '#3',
- title: ['A', '1'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> A -> B, 1.
- ],
- [
- { // A -> A, 1 -> 2.
- id: '#4',
- title: ['A', '2'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [
- '#1' // A -> A -> B, 1 -> 2.
- ],
- [
- { // A -> A, 1 -> 2 -> 2.
- id: '#5',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // A -> A -> B, 1 -> 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, 1.
- id: '#6',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, 1 -> 1.
- id: '#7',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, 1 -> 1 -> 2.
- id: '#8',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, 1.
- id: '#9',
- title: ['B', '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6' // A -> B -> B, 1.
- ],
- [
- { // A -> B, 1 -> 1.
- id: '#10',
- title: ['B', '1'],
- values: [
- {
- total: 25,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7' // A -> B -> B, 1 -> 1.
- ],
- [
- { // A -> B, 1 -> 1 -> 2.
- id: '#11',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8' // A -> B -> B, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, 1.
- id: '#12',
- title: ['A', '1'],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3', // A -> A, 1.
- '#9' // A -> B, 1.
- ],
- [
- { // A, 1 -> 2.
- id: '#13',
- title: ['A', '2'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // A -> A, 1 -> 2.
- ],
- [
- { // A, 1 -> 2 -> 2.
- id: '#14',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // A -> A, 1 -> 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A, 1 -> 1.
- id: '#15',
- title: ['A', '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#10' // A -> B, 1 -> 1.
- ],
- [
- { // A, 1 -> 1 -> 2.
- id: '#16',
- title: ['A', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11' // A -> B, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, 1.
- title: [undefined, '1'],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12' // A, 1.
- ],
- [
- { // *, 1 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13' // A, 1 -> 2.
- ],
- [
- { // *, 1 -> 2 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14' // A, 1 -> 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, 1 -> 1.
- title: [undefined, '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#15' // A, 1 -> 1.
- ],
- [
- { // *, 1 -> 1 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#16' // A, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 1.
- id: '#0',
- title: ['B', '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 1 -> 2.
- id: '#1',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 1 -> 2 -> 2.
- id: '#2',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A -> A -> B, 2.
- id: '#3',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A -> B, 2 -> 2.
- id: '#4',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> A, 1.
- id: '#5',
- title: ['A', '1'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> A -> B, 1.
- ],
- [
- { // A -> A, 1 -> 2.
- id: '#6',
- title: ['A', '2'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // A -> A -> B, 1 -> 2.
- ],
- [
- { // A -> A, 1 -> 2 -> 2.
- id: '#7',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // A -> A -> B, 1 -> 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A -> A, 2.
- id: '#8',
- title: ['A', '2'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // A -> A -> B, 2.
- ],
- [
- { // A -> A, 2 -> 2.
- id: '#9',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // A -> A -> B, 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 35,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, 1.
- id: '#10',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, 1 -> 1.
- id: '#11',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B -> B, 1 -> 1 -> 2.
- id: '#12',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B -> B, 1 -> 2.
- id: '#13',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B -> B, 2.
- id: '#14',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, 1.
- id: '#15',
- title: ['B', '1'],
- values: [
- {
- total: 35,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#10' // A -> B -> B, 1.
- ],
- [
- { // A -> B, 1 -> 1.
- id: '#16',
- title: ['B', '1'],
- values: [
- {
- total: 25,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11' // A -> B -> B, 1 -> 1.
- ],
- [
- { // A -> B, 1 -> 1 -> 2.
- id: '#17',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12' // A -> B -> B, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, 1 -> 2.
- id: '#18',
- title: ['B', '2'],
- values: [
- {
- total: 30,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13' // A -> B -> B, 1 -> 2.
- ],
- [
- { // A -> B, 1 -> 2 -> 2.
- id: '#19',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A -> B, 2.
- id: '#20',
- title: ['B', '2'],
- values: [
- {
- total: 30,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14' // A -> B -> B, 2.
- ],
- [
- { // A -> B, 2 -> 2.
- id: '#21',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, 1.
- id: '#22',
- title: ['A', '1'],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5', // A -> A, 1.
- '#15' // A -> B, 1.
- ],
- [
- { // A, 1 -> 2.
- id: '#23',
- title: ['A', '2'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6', // A -> A, 1 -> 2.
- '#18' // A -> B, 1 -> 2.
- ],
- [
- { // A, 1 -> 2 -> 2.
- id: '#24',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7', // A -> A, 1 -> 2 -> 2.
- '#19' // A -> B, 1 -> 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A, 1 -> 1.
- id: '#25',
- title: ['A', '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#16' // A -> B, 1 -> 1.
- ],
- [
- { // A, 1 -> 1 -> 2.
- id: '#26',
- title: ['A', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#17' // A -> B, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A, 2.
- id: '#27',
- title: ['A', '2'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8', // A -> A, 2.
- '#20' // A -> B, 2.
- ],
- [
- { // A, 2 -> 2.
- id: '#28',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#9', // A -> A, 2 -> 2.
- '#21' // A -> B, 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 35,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B, 1.
- id: '#29',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B, 1 -> 1.
- id: '#30',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B, 1 -> 1 -> 2.
- id: '#31',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> B, 1 -> 2.
- id: '#32',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> B, 2.
- id: '#33',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, 1.
- id: '#34',
- title: ['B', '1'],
- values: [
- {
- total: 35,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#29' // B -> B, 1.
- ],
- [
- { // B, 1 -> 2.
- id: '#35',
- title: ['B', '2'],
- values: [
- {
- total: 30,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#32' // B -> B, 1 -> 2.
- ],
- [
- { // B, 1 -> 2 -> 2.
- id: '#36',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B, 1 -> 1.
- id: '#37',
- title: ['B', '1'],
- values: [
- {
- total: 25,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#30' // B -> B, 1 -> 1.
- ],
- [
- { // B, 1 -> 1 -> 2.
- id: '#38',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#31' // B -> B, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B, 2.
- id: '#39',
- title: ['B', '2'],
- values: [
- {
- total: 30,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#33' // B -> B, 2.
- ],
- [
- { // B, 2 -> 2.
- id: '#40',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, 1.
- title: [undefined, '1'],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#22', // A, 1.
- '#34' // B, 1.
- ],
- [
- { // *, 1 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#23', // A, 1 -> 2.
- '#35' // B, 1 -> 2.
- ],
- [
- { // *, 1 -> 2 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#24', // A, 1 -> 2 -> 2.
- '#36' // B, 1 -> 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, 1 -> 1.
- title: [undefined, '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#25', // A, 1 -> 1.
- '#37' // B, 1 -> 1.
- ],
- [
- { // *, 1 -> 1 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#26', // A, 1 -> 1 -> 2.
- '#38' // B, 1 -> 1 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // *, 2.
- title: [undefined, '2'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#27', // A, 2.
- '#39' // B, 2.
- ],
- [
- { // *, 2 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#28', // A, 2 -> 2.
- '#40' // B, 2 -> 2.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *.
- title: ['A', undefined],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A, 1.
- id: '#0',
- title: ['A', '1'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // A -> A, 2.
- id: '#1',
- title: ['A', '2'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A, 2 -> 1.
- id: '#2',
- title: ['A', '1'],
- values: [
- {
- total: 40,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // A -> A, 2 -> 2.
- id: '#3',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> A, 2 -> 2 -> 1.
- id: '#4',
- title: ['A', '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, 1.
- id: '#5',
- title: ['A', '1'],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> A, 1.
- ],
- [
- { // A, 1 -> 1.
- id: '#6',
- title: ['A', '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A, 2.
- id: '#7',
- title: ['A', '2'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // A -> A, 2.
- ],
- [
- { // A, 2 -> 1.
- id: '#8',
- title: ['A', '1'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // A -> A, 2 -> 1.
- ],
- [
- { // A, 2 -> 1 -> 1.
- id: '#9',
- title: ['A', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A, 2 -> 2.
- id: '#10',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // A -> A, 2 -> 2.
- ],
- [
- { // A, 2 -> 2 -> 1.
- id: '#11',
- title: ['A', '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // A -> A, 2 -> 2 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B, *.
- title: ['B', undefined],
- values: [
- {
- total: 35,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 35,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A -> A, 1.
- id: '#12',
- title: ['A', '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // B -> A -> A, 2.
- id: '#13',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A -> A, 2 -> 1.
- id: '#14',
- title: ['A', '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- },
- { // B -> A -> A, 2 -> 2.
- id: '#15',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A -> A, 2 -> 2 -> 1.
- id: '#16',
- title: ['A', '1'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B -> A, 1.
- id: '#17',
- title: ['A', '1'],
- values: [
- {
- total: 35,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12' // B -> A -> A, 1.
- ],
- [
- { // B -> A, 1 -> 1.
- id: '#18',
- title: ['A', '1'],
- values: [
- {
- total: 25,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> A, 2.
- id: '#19',
- title: ['A', '2'],
- values: [
- {
- total: 30,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13' // B -> A -> A, 2.
- ],
- [
- { // B -> A, 2 -> 1.
- id: '#20',
- title: ['A', '1'],
- values: [
- {
- total: 30,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14' // B -> A -> A, 2 -> 1.
- ],
- [
- { // B -> A, 2 -> 1 -> 1.
- id: '#21',
- title: ['A', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> A, 2 -> 2.
- id: '#22',
- title: ['A', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#15' // B -> A -> A, 2 -> 2.
- ],
- [
- { // B -> A, 2 -> 2 -> 1.
- id: '#23',
- title: ['A', '1'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#16' // B -> A -> A, 2 -> 2 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B -> B, *.
- title: ['B', undefined],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> B -> A, *.
- title: ['A', undefined],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B -> A, 1.
- id: '#24',
- title: ['A', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B -> A, 1 -> 1.
- id: '#25',
- title: ['A', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B -> B -> A, 2.
- id: '#26',
- title: ['A', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B -> A, 2 -> 1.
- id: '#27',
- title: ['A', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> B -> A, 2 -> 1 -> 1.
- id: '#28',
- title: ['A', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B -> B, 1.
- id: '#29',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#24' // B -> B -> A, 1.
- ],
- [
- { // B -> B, 1 -> 1.
- id: '#30',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#25' // B -> B -> A, 1 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B -> B, 2.
- id: '#31',
- title: ['B', '2'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#26' // B -> B -> A, 2.
- ],
- [
- { // B -> B, 2 -> 1.
- id: '#32',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#27' // B -> B -> A, 2 -> 1.
- ],
- [
- { // B -> B, 2 -> 1 -> 1.
- id: '#33',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#28' // B -> B -> A, 2 -> 1 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, 1.
- id: '#34',
- title: ['B', '1'],
- values: [
- {
- total: 35,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#17', // B -> A, 1.
- '#29' // B -> B, 1.
- ],
- [
- { // B, 1 -> 1.
- id: '#35',
- title: ['B', '1'],
- values: [
- {
- total: 25,
- self: 5,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#18', // B -> A, 1 -> 1.
- '#30' // B -> B, 1 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, 2.
- id: '#36',
- title: ['B', '2'],
- values: [
- {
- total: 30,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#19', // B -> A, 2.
- '#31' // B -> B, 2.
- ],
- [
- { // B, 2 -> 1.
- id: '#37',
- title: ['B', '1'],
- values: [
- {
- total: 30,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#20', // B -> A, 2 -> 1.
- '#32' // B -> B, 2 -> 1.
- ],
- [
- { // B, 2 -> 1 -> 1.
- id: '#38',
- title: ['B', '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#21', // B -> A, 2 -> 1 -> 1.
- '#33' // B -> B, 2 -> 1 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, 2 -> 2.
- id: '#39',
- title: ['B', '2'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#22' // B -> A, 2 -> 2.
- ],
- [
- { // B, 2 -> 2 -> 1.
- id: '#40',
- title: ['B', '1'],
- values: [
- {
- total: 10,
- self: 10,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#23' // B -> A, 2 -> 2 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, 1.
- title: [undefined, '1'],
- values: [
- {
- total: 65,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5', // A, 1.
- '#34' // B, 1.
- ],
- [
- { // *, 1 -> 1.
- title: [undefined, '1'],
- values: [
- {
- total: 25,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6', // A, 1 -> 1.
- '#35' // B, 1 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, 2.
- title: [undefined, '2'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7', // A, 2.
- '#36' // B, 2.
- ],
- [
- { // *, 2 -> 1.
- title: [undefined, '1'],
- values: [
- {
- total: 60,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8', // A, 2 -> 1.
- '#37' // B, 2 -> 1.
- ],
- [
- { // *, 2 -> 1 -> 1.
- title: [undefined, '1'],
- values: [
- {
- total: 20,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#9', // A, 2 -> 1 -> 1.
- '#38' // B, 2 -> 1 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, 2 -> 2.
- title: [undefined, '2'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#10', // A, 2 -> 2.
- '#39' // B, 2 -> 2.
- ],
- [
- { // *, 2 -> 2 -> 1.
- title: [undefined, '1'],
- values: [
- {
- total: 10,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11', // A, 2 -> 2 -> 1.
- '#40' // B, 2 -> 2 -> 1.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('threeDimensions', 3 /* dimensions */, 1 /* valueCount */,
- [
- { path: [['A', 'B'], ['C', 'D'], ['E', 'F']], values: [b(0)],
- kind: SELF },
- { path: [['A', 'B'], ['C', 'D'], ['E']], values: [b(1)], kind: SELF },
- { path: [['A', 'B'], ['C', 'D'], []], values: [b(2)], kind: SELF },
- { path: [['A', 'B'], ['C'], ['E', 'F']], values: [b(3)], kind: SELF },
- { path: [['A', 'B'], ['C'], ['E']], values: [b(4)], kind: SELF },
- { path: [['A', 'B'], ['C'], []], values: [b(5)], kind: SELF },
- { path: [['A', 'B'], [], ['E', 'F']], values: [b(6)], kind: SELF },
- { path: [['A', 'B'], [], ['E']], values: [b(7)], kind: SELF },
- { path: [['A', 'B'], [], []], values: [b(8)], kind: SELF },
-
- { path: [['A'], ['C', 'D'], ['E', 'F']], values: [b(9)], kind: SELF },
- { path: [['A'], ['C', 'D'], ['E']], values: [b(10)], kind: SELF },
- { path: [['A'], ['C', 'D'], []], values: [b(11)], kind: SELF },
- { path: [['A'], ['C'], ['E', 'F']], values: [b(12)], kind: SELF },
- { path: [['A'], ['C'], ['E']], values: [b(13)], kind: SELF },
- { path: [['A'], ['C'], []], values: [b(14)], kind: SELF },
- { path: [['A'], [], ['E', 'F']], values: [b(15)], kind: SELF },
- { path: [['A'], [], ['E']], values: [b(16)], kind: SELF },
- { path: [['A'], [], []], values: [b(17)], kind: SELF },
-
- { path: [[], ['C', 'D'], ['E', 'F']], values: [b(18)], kind: SELF },
- { path: [[], ['C', 'D'], ['E']], values: [b(19)], kind: SELF },
- { path: [[], ['C', 'D'], []], values: [b(20)], kind: SELF },
- { path: [[], ['C'], ['E', 'F']], values: [b(21)], kind: SELF },
- { path: [[], ['C'], ['E']], values: [b(22)], kind: SELF },
- { path: [[], ['C'], []], values: [b(23)], kind: SELF },
- { path: [[], [], ['E', 'F']], values: [b(24)], kind: SELF },
- { path: [[], [], ['E']], values: [b(25)], kind: SELF },
- { path: [[], [], []], values: [b(26)], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined, undefined, undefined],
- values: [
- {
- total: b([0, 26]),
- self: b(26),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: b([0, 17]),
- self: b(17),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: b([0, 8]),
- self: b(8),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B, C, *.
- id: '#0',
- title: ['B', 'C', undefined],
- values: [
- {
- total: b([0, 5]),
- self: b(5),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B, C -> D, *.
- id: '#1',
- title: ['B', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A -> B, C -> D, E.
- id: '#2',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A -> B, C -> D, E -> F.
- id: '#3',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, C, E.
- id: '#4',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4),
- self: b(4),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#2' // A -> B, C -> D, E.
- ],
- [
- { // A -> B, C, E -> F.
- id: '#5',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#3' // A -> B, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, *, E.
- id: '#6',
- title: ['B', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7),
- self: b(7),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#4' // A -> B, C, E.
- ],
- [
- { // A -> B, *, E -> F.
- id: '#7',
- title: ['B', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#5' // A -> B, C, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, C, *.
- id: '#8',
- title: ['A', 'C', undefined],
- values: [
- {
- total: b([0, 5], [9, 14]),
- self: b(14),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> B, C, *.
- ],
- [
- { // A, C -> D, *.
- id: '#9',
- title: ['A', 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11]),
- self: b(11),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // A -> B, C -> D, *.
- ],
- [],
- [
- { // A, C -> D, E.
- id: '#10',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10),
- self: b(10),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // A -> B, C -> D, E.
- ],
- [],
- [
- { // A, C -> D, E -> F.
- id: '#11',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // A -> B, C -> D, E -> F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, C, E.
- id: '#12',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 9, 10, 12, 13),
- self: b(13),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // A -> B, C, E.
- ],
- [
- '#10' // A, C -> D, E.
- ],
- [
- { // A, C, E -> F.
- id: '#13',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12),
- self: b(12),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // A -> B, C, E -> F.
- ],
- [
- '#11' // A, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, *, E.
- id: '#14',
- title: ['A', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16),
- self: b(16),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6' // A -> B, *, E.
- ],
- [
- '#12' // A, C, E.
- ],
- [
- { // A, *, E -> F.
- id: '#15',
- title: ['A', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15),
- self: b(15),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7' // A -> B, *, E -> F.
- ],
- [
- '#13' // A, C, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, C, *.
- title: [undefined, 'C', undefined],
- values: [
- {
- total: b([0, 5], [9, 14], [18, 23]),
- self: b(23),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8' // A, C, *.
- ],
- [
- { // *, C -> D, *.
- title: [undefined, 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11], [18, 20]),
- self: b(20),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#9' // A, C -> D, *.
- ],
- [],
- [
- { // *, C -> D, E.
- id: '#16',
- title: [undefined, 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10, 18, 19),
- self: b(19),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#10' // A, C -> D, E.
- ],
- [],
- [
- { // *, C -> D, E -> F.
- id: '#17',
- title: [undefined, 'D', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11' // A, C -> D, E -> F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, C, E.
- id: '#18',
- title: [undefined, 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 9, 10, 12, 13, 18, 19, 21, 22),
- self: b(22),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12' // A, C, E.
- ],
- [
- '#16' // *, C -> D, E.
- ],
- [
- { // *, C, E -> F.
- id: '#19',
- title: [undefined, 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12, 18, 21),
- self: b(21),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13' // A, C, E -> F.
- ],
- [
- '#17' // *, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, *, E.
- title: [undefined, undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21,
- 22, 24, 25),
- self: b(25),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14' // A, *, E.
- ],
- [
- '#18' // *, C, E.
- ],
- [
- { // *, *, E -> F.
- title: [undefined, undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
- self: b(24),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#15' // A, *, E -> F.
- ],
- [
- '#19' // *, C, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined, undefined],
- values: [
- {
- total: b([0, 26]),
- self: b(26),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: b([0, 17]),
- self: b(17),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A -> B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: b([0, 8]),
- self: b(8),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B, C, *.
- id: '#0',
- title: ['B', 'C', undefined],
- values: [
- {
- total: b([0, 5]),
- self: b(5),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A -> B, C -> D, *.
- id: '#1',
- title: ['B', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A -> B, C -> D, E.
- id: '#2',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A -> B, C -> D, E -> F.
- id: '#3',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, C -> D, F.
- id: '#4',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, C, E.
- id: '#5',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4),
- self: b(4),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#2' // A -> B, C -> D, E.
- ],
- [
- { // A -> B, C, E -> F.
- id: '#6',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#3' // A -> B, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, C, F.
- id: '#7',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#4' // A -> B, C -> D, F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, D, *.
- id: '#8',
- title: ['B', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A -> B, D, E.
- id: '#9',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A -> B, D, E -> F.
- id: '#10',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, D, F.
- id: '#11',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A -> B, *, E.
- id: '#12',
- title: ['B', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7),
- self: b(7),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#5', // A -> B, C, E.
- '#9' // A -> B, D, E.
- ],
- [
- { // A -> B, *, E -> F.
- id: '#13',
- title: ['B', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#6', // A -> B, C, E -> F.
- '#10' // A -> B, D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A -> B, *, F.
- id: '#14',
- title: ['B', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#7', // A -> B, C, F.
- '#11' // A -> B, D, F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, C, *.
- id: '#15',
- title: ['A', 'C', undefined],
- values: [
- {
- total: b([0, 5], [9, 14]),
- self: b(14),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0' // A -> B, C, *.
- ],
- [
- { // A, C -> D, *.
- id: '#16',
- title: ['A', 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11]),
- self: b(11),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1' // A -> B, C -> D, *.
- ],
- [],
- [
- { // A, C -> D, E.
- id: '#17',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10),
- self: b(10),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2' // A -> B, C -> D, E.
- ],
- [],
- [
- { // A, C -> D, E -> F.
- id: '#18',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3' // A -> B, C -> D, E -> F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A, C -> D, F.
- id: '#19',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4' // A -> B, C -> D, F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, C, E.
- id: '#20',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 9, 10, 12, 13),
- self: b(13),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5' // A -> B, C, E.
- ],
- [
- '#17' // A, C -> D, E.
- ],
- [
- { // A, C, E -> F.
- id: '#21',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12),
- self: b(12),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6' // A -> B, C, E -> F.
- ],
- [
- '#18' // A, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A, C, F.
- id: '#22',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12),
- self: b(12),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7' // A -> B, C, F.
- ],
- [
- '#19' // A, C -> D, F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A, D, *.
- id: '#23',
- title: ['A', 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11]),
- self: b(11),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8' // A -> B, D, *.
- ],
- [],
- [
- { // A, D, E.
- id: '#24',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10),
- self: b(10),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#9' // A -> B, D, E.
- ],
- [],
- [
- { // A, D, E -> F.
- id: '#25',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#10' // A -> B, D, E -> F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // A, D, F.
- id: '#26',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11' // A -> B, D, F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, *, E.
- id: '#27',
- title: ['A', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16),
- self: b(16),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12' // A -> B, *, E.
- ],
- [
- '#20', // A, C, E.
- '#24' // A, D, E.
- ],
- [
- { // A, *, E -> F.
- id: '#28',
- title: ['A', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15),
- self: b(15),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13' // A -> B, *, E -> F.
- ],
- [
- '#21', // A, C, E -> F.
- '#25' // A, D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // A, *, F.
- id: '#29',
- title: ['A', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15),
- self: b(15),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14' // A -> B, *, F.
- ],
- [
- '#22', // A, C, F.
- '#26' // A, D, F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: b([0, 8]),
- self: b(8),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B, C, *.
- id: '#30',
- title: ['B', 'C', undefined],
- values: [
- {
- total: b([0, 5]),
- self: b(5),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B, C -> D, *.
- id: '#31',
- title: ['B', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B, C -> D, E.
- id: '#32',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B, C -> D, E -> F.
- id: '#33',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B, C -> D, F.
- id: '#34',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, C, E.
- id: '#35',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4),
- self: b(4),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#32' // B, C -> D, E.
- ],
- [
- { // B, C, E -> F.
- id: '#36',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#33' // B, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, C, F.
- id: '#37',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#34' // B, C -> D, F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, D, *.
- id: '#38',
- title: ['B', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B, D, E.
- id: '#39',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B, D, E -> F.
- id: '#40',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // B, D, F.
- id: '#41',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, *, E.
- id: '#42',
- title: ['B', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7),
- self: b(7),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#35', // B, C, E.
- '#39' // B, D, E.
- ],
- [
- { // B, *, E -> F.
- id: '#43',
- title: ['B', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#36', // B, C, E -> F.
- '#40' // B, D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // B, *, F.
- id: '#44',
- title: ['B', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#37', // B, C, F.
- '#41' // B, D, F.
- ],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, C, *.
- title: [undefined, 'C', undefined],
- values: [
- {
- total: b([0, 5], [9, 14], [18, 23]),
- self: b(23),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#15', // A, C, *.
- '#30' // B, C, *.
- ],
- [
- { // *, C -> D, *.
- title: [undefined, 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11], [18, 20]),
- self: b(20),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#16', // A, C -> D, *.
- '#31' // B, C -> D, *.
- ],
- [],
- [
- { // *, C -> D, E.
- id: '#45',
- title: [undefined, 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10, 18, 19),
- self: b(19),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#17', // A, C -> D, E.
- '#32' // B, C -> D, E.
- ],
- [],
- [
- { // *, C -> D, E -> F.
- id: '#46',
- title: [undefined, 'D', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#18', // A, C -> D, E -> F.
- '#33' // B, C -> D, E -> F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // *, C -> D, F.
- id: '#47',
- title: [undefined, 'D', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#19', // A, C -> D, F.
- '#34' // B, C -> D, F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, C, E.
- id: '#48',
- title: [undefined, 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 9, 10, 12, 13, 18, 19, 21, 22),
- self: b(22),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#20', // A, C, E.
- '#35' // B, C, E.
- ],
- [
- '#45' // *, C -> D, E.
- ],
- [
- { // *, C, E -> F.
- id: '#49',
- title: [undefined, 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12, 18, 21),
- self: b(21),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#21', // A, C, E -> F.
- '#36' // B, C, E -> F.
- ],
- [
- '#46' // *, C -> D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, C, F.
- id: '#50',
- title: [undefined, 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12, 18, 21),
- self: b(21),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#22', // A, C, F.
- '#37' // B, C, F.
- ],
- [
- '#47' // *, C -> D, F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, D, *.
- title: [undefined, 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11], [18, 20]),
- self: b(20),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#23', // A, D, *.
- '#38' // B, D, *.
- ],
- [],
- [
- { // *, D, E.
- id: '#51',
- title: [undefined, 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10, 18, 19),
- self: b(19),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#24', // A, D, E.
- '#39' // B, D, E.
- ],
- [],
- [
- { // *, D, E -> F.
- id: '#52',
- title: [undefined, 'D', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#25', // A, D, E -> F.
- '#40' // B, D, E -> F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // *, D, F.
- id: '#53',
- title: [undefined, 'D', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#26', // A, D, F.
- '#41' // B, D, F.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, *, E.
- title: [undefined, undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21,
- 22, 24, 25),
- self: b(25),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#27', // A, *, E.
- '#42' // B, *, E.
- ],
- [
- '#48', // *, C, E.
- '#51' // *, D, E.
- ],
- [
- { // *, *, E -> F.
- title: [undefined, undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
- self: b(24),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#28', // A, *, E -> F.
- '#43' // B, *, E -> F.
- ],
- [
- '#49', // *, C, E -> F.
- '#52' // *, D, E -> F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // *, *, F.
- title: [undefined, undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
- self: b(24),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#29', // A, *, F.
- '#44' // B, *, F.
- ],
- [
- '#50', // *, C, F.
- '#53' // *, D, F.
- ],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined, undefined],
- values: [
- {
- total: b([0, 26]),
- self: b(26),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: b([0, 17]),
- self: b(17),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A, C, *.
- id: '#0',
- title: ['A', 'C', undefined],
- values: [
- {
- total: b([0, 5], [9, 14]),
- self: b(14),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A, C, E.
- id: '#1',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 9, 10, 12, 13),
- self: b(13),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // A, C, F.
- id: '#2',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12),
- self: b(12),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A, C, F -> E.
- id: '#3',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 3, 9, 12),
- self: b(12),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // A, D, *.
- id: '#4',
- title: ['A', 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11]),
- self: b(11),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // A, D -> C, *.
- id: '#5',
- title: ['A', 'C', undefined],
- values: [
- {
- total: b([0, 2], [9, 11]),
- self: b(11),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A, D -> C, E.
- id: '#6',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10),
- self: b(10),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // A, D -> C, F.
- id: '#7',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // A, D -> C, F -> E.
- id: '#8',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, D, E.
- id: '#9',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10),
- self: b(10),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#6' // A, D -> C, E.
- ],
- []
- ]
- },
- { // A, D, F.
- id: '#10',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#7' // A, D -> C, F.
- ],
- [
- { // A, D, F -> E.
- id: '#11',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0, 9),
- self: b(9),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#8' // A, D -> C, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // A, *, E.
- id: '#12',
- title: ['A', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16),
- self: b(16),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#1', // A, C, E.
- '#9' // A, D, E.
- ],
- []
- ]
- },
- { // A, *, F.
- id: '#13',
- title: ['A', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15),
- self: b(15),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#2', // A, C, F.
- '#10' // A, D, F.
- ],
- [
- { // A, *, F -> E.
- id: '#14',
- title: ['A', undefined, 'E'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15),
- self: b(15),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#3', // A, C, F -> E.
- '#11' // A, D, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: b([0, 8]),
- self: b(8),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // B -> A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: b([0, 8]),
- self: b(8),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A, C, *.
- id: '#15',
- title: ['A', 'C', undefined],
- values: [
- {
- total: b([0, 5]),
- self: b(5),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B -> A, C, E.
- id: '#16',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4),
- self: b(4),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // B -> A, C, F.
- id: '#17',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B -> A, C, F -> E.
- id: '#18',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B -> A, D, *.
- id: '#19',
- title: ['A', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- { // B -> A, D -> C, *.
- id: '#20',
- title: ['A', 'C', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B -> A, D -> C, E.
- id: '#21',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // B -> A, D -> C, F.
- id: '#22',
- title: ['A', 'C', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- [
- { // B -> A, D -> C, F -> E.
- id: '#23',
- title: ['A', 'C', 'E'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B -> A, D, E.
- id: '#24',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#21' // B -> A, D -> C, E.
- ],
- []
- ]
- },
- { // B -> A, D, F.
- id: '#25',
- title: ['A', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#22' // B -> A, D -> C, F.
- ],
- [
- { // B -> A, D, F -> E.
- id: '#26',
- title: ['A', 'D', 'E'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#23' // B -> A, D -> C, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B -> A, *, E.
- id: '#27',
- title: ['A', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7),
- self: b(7),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#16', // B -> A, C, E.
- '#24' // B -> A, D, E.
- ],
- []
- ]
- },
- { // B -> A, *, F.
- id: '#28',
- title: ['A', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#17', // B -> A, C, F.
- '#25' // B -> A, D, F.
- ],
- [
- { // B -> A, *, F -> E.
- id: '#29',
- title: ['A', undefined, 'E'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [
- '#18', // B -> A, C, F -> E.
- '#26' // B -> A, D, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, C, *.
- id: '#30',
- title: ['B', 'C', undefined],
- values: [
- {
- total: b([0, 5]),
- self: b(5),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#15' // B -> A, C, *.
- ],
- [],
- [
- { // B, C, E.
- id: '#31',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4),
- self: b(4),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#16' // B -> A, C, E.
- ],
- [],
- []
- ]
- },
- { // B, C, F.
- id: '#32',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#17' // B -> A, C, F.
- ],
- [],
- [
- { // B, C, F -> E.
- id: '#33',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0, 3),
- self: b(3),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#18' // B -> A, C, F -> E.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // B, D, *.
- id: '#34',
- title: ['B', 'D', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#19' // B -> A, D, *.
- ],
- [
- { // B, D -> C, *.
- id: '#35',
- title: ['B', 'C', undefined],
- values: [
- {
- total: b([0, 2]),
- self: b(2),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#20' // B -> A, D -> C, *.
- ],
- [],
- [
- { // B, D -> C, E.
- id: '#36',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#21' // B -> A, D -> C, E.
- ],
- [],
- []
- ]
- },
- { // B, D -> C, F.
- id: '#37',
- title: ['B', 'C', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#22' // B -> A, D -> C, F.
- ],
- [],
- [
- { // B, D -> C, F -> E.
- id: '#38',
- title: ['B', 'C', 'E'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#23' // B -> A, D -> C, F -> E.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, D, E.
- id: '#39',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0, 1),
- self: b(1),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#24' // B -> A, D, E.
- ],
- [
- '#36' // B, D -> C, E.
- ],
- []
- ]
- },
- { // B, D, F.
- id: '#40',
- title: ['B', 'D', 'F'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#25' // B -> A, D, F.
- ],
- [
- '#37' // B, D -> C, F.
- ],
- [
- { // B, D, F -> E.
- id: '#41',
- title: ['B', 'D', 'E'],
- values: [
- {
- total: b(0),
- self: b(0),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#26' // B -> A, D, F -> E.
- ],
- [
- '#38' // B, D -> C, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // B, *, E.
- id: '#42',
- title: ['B', undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7),
- self: b(7),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#27' // B -> A, *, E.
- ],
- [
- '#31', // B, C, E.
- '#39' // B, D, E.
- ],
- []
- ]
- },
- { // B, *, F.
- id: '#43',
- title: ['B', undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#28' // B -> A, *, F.
- ],
- [
- '#32', // B, C, F.
- '#40' // B, D, F.
- ],
- [
- { // B, *, F -> E.
- id: '#44',
- title: ['B', undefined, 'E'],
- values: [
- {
- total: b(0, 3, 6),
- self: b(6),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#29' // B -> A, *, F -> E.
- ],
- [
- '#33', // B, C, F -> E.
- '#41' // B, D, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, C, *.
- title: [undefined, 'C', undefined],
- values: [
- {
- total: b([0, 5], [9, 14], [18, 23]),
- self: b(23),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#0', // A, C, *.
- '#30' // B, C, *.
- ],
- [],
- [
- { // *, C, E.
- id: '#45',
- title: [undefined, 'C', 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 9, 10, 12, 13, 18, 19, 21, 22),
- self: b(22),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#1', // A, C, E.
- '#31' // B, C, E.
- ],
- [],
- []
- ]
- },
- { // *, C, F.
- id: '#46',
- title: [undefined, 'C', 'F'],
- values: [
- {
- total: b(0, 3, 9, 12, 18, 21),
- self: b(21),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#2', // A, C, F.
- '#32' // B, C, F.
- ],
- [],
- [
- { // *, C, F -> E.
- id: '#47',
- title: [undefined, 'C', 'E'],
- values: [
- {
- total: b(0, 3, 9, 12, 18, 21),
- self: b(21),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#3', // A, C, F -> E.
- '#33' // B, C, F -> E.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- },
- { // *, D, *.
- title: [undefined, 'D', undefined],
- values: [
- {
- total: b([0, 2], [9, 11], [18, 20]),
- self: b(20),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#4', // A, D, *.
- '#34' // B, D, *.
- ],
- [
- { // *, D -> C, *.
- title: [undefined, 'C', undefined],
- values: [
- {
- total: b([0, 2], [9, 11], [18, 20]),
- self: b(20),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#5', // A, D -> C, *.
- '#35' // B, D -> C, *.
- ],
- [],
- [
- { // *, D -> C, E.
- id: '#48',
- title: [undefined, 'C', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10, 18, 19),
- self: b(19),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#6', // A, D -> C, E.
- '#36' // B, D -> C, E.
- ],
- [],
- []
- ]
- },
- { // *, D -> C, F.
- id: '#49',
- title: [undefined, 'C', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#7', // A, D -> C, F.
- '#37' // B, D -> C, F.
- ],
- [],
- [
- { // *, D -> C, F -> E.
- id: '#50',
- title: [undefined, 'C', 'E'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#8', // A, D -> C, F -> E.
- '#38' // B, D -> C, F -> E.
- ],
- [],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, D, E.
- id: '#51',
- title: [undefined, 'D', 'E'],
- values: [
- {
- total: b(0, 1, 9, 10, 18, 19),
- self: b(19),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#9', // A, D, E.
- '#39' // B, D, E.
- ],
- [
- '#48' // *, D -> C, E.
- ],
- []
- ]
- },
- { // *, D, F.
- id: '#52',
- title: [undefined, 'D', 'F'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#10', // A, D, F.
- '#40' // B, D, F.
- ],
- [
- '#49' // *, D -> C, F.
- ],
- [
- { // *, D, F -> E.
- id: '#53',
- title: [undefined, 'D', 'E'],
- values: [
- {
- total: b(0, 9, 18),
- self: b(18),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#11', // A, D, F -> E.
- '#41' // B, D, F -> E.
- ],
- [
- '#50' // *, D -> C, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- }
- ],
- [
- { // *, *, E.
- title: [undefined, undefined, 'E'],
- values: [
- {
- total: b(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21,
- 22, 24, 25),
- self: b(25),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#12', // A, *, E.
- '#42' // B, *, E.
- ],
- [
- '#45', // *, C, E.
- '#51' // *, D, E.
- ],
- []
- ]
- },
- { // *, *, F.
- title: [undefined, undefined, 'F'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
- self: b(24),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#13', // A, *, F.
- '#43' // B, *, F.
- ],
- [
- '#46', // *, C, F.
- '#52' // *, D, F.
- ],
- [
- { // *, *, F -> E.
- title: [undefined, undefined, 'E'],
- values: [
- {
- total: b(0, 3, 6, 9, 12, 15, 18, 21, 24),
- self: b(24),
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- '#14', // A, *, F -> E.
- '#44' // B, *, F -> E.
- ],
- [
- '#47', // *, C, F -> E.
- '#53' // *, D, F -> E.
- ],
- []
- ]
- }
- ]
- ]
- }
- ]
- ]
- });
-
- builderTest('threeDimensions_twoValues', 3 /* dimensions */,
- 2 /* valueCount */,
- [
- { path: [[], [], []], values: [1, 89], kind: SELF },
- { path: [['A'], [], []], values: [2, 34], kind: SELF },
- { path: [['A'], [], []], values: [4, 55], kind: TOTAL },
- { path: [['B'], [], []], values: [undefined, 13], kind: SELF },
- { path: [['B'], [], []], values: [16, 21], kind: TOTAL },
- { path: [[], ['1'], []], values: [32, undefined], kind: SELF },
- { path: [[], ['1'], []], values: [64, 8], kind: TOTAL },
- { path: [[], ['2'], []], values: [128, 2], kind: SELF },
- { path: [[], ['2'], []], values: [undefined, undefined], kind: TOTAL },
- { path: [[], [], ['%']], values: [undefined, 1], kind: TOTAL },
- { path: [[], [], ['$']], values: [1024, undefined], kind: TOTAL },
- { path: [[], [], ['@']], values: [undefined, undefined], kind: SELF }
- ],
- { // Top-down tree view.
- title: [undefined, undefined, undefined],
- values: [
- {
- total: (1 + 2 + 32 + 128) /* selfSum([[], [], []], 0) */ +
- 1024 /* minResidual([[], [], []], 0) */,
- self: 1,
- totalState: LOWER_BOUND
- },
- {
- total: (89 + 34 + 13 + 2) /* selfSum([[], [], []], 1) */ +
- ((55 - 34) + (21 - 13)) /* maxResidual([[], [], []], 1) */,
- self: 89,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: 4,
- self: 2,
- totalState: EXACT
- },
- {
- total: 55,
- self: 34,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: 16,
- self: 0,
- totalState: EXACT
- },
- {
- total: 21,
- self: 13,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ],
- [
- { // *, 1, *.
- title: [undefined, '1', undefined],
- values: [
- {
- total: 64,
- self: 32,
- totalState: EXACT
- },
- {
- total: 8,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, 2, *.
- title: [undefined, '2', undefined],
- values: [
- {
- total: 128,
- self: 128,
- totalState: LOWER_BOUND
- },
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ],
- [
- { // *, *, %.
- title: [undefined, undefined, '%'],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- },
- {
- total: 1,
- self: 0,
- totalState: EXACT
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, *, $.
- title: [undefined, undefined, '$'],
- values: [
- {
- total: 1024,
- self: 0,
- totalState: EXACT
- },
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, *, @.
- title: [undefined, undefined, '@'],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- },
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Top-down heavy view.
- title: [undefined, undefined, undefined],
- values: [
- {
- total: 1187,
- self: 1,
- totalState: LOWER_BOUND
- },
- {
- total: 167,
- self: 89,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: 4,
- self: 2,
- totalState: LOWER_BOUND
- },
- {
- total: 55,
- self: 34,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: 16,
- self: 0,
- totalState: LOWER_BOUND
- },
- {
- total: 21,
- self: 13,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ],
- [
- { // *, 1, *.
- title: [undefined, '1', undefined],
- values: [
- {
- total: 64,
- self: 32,
- totalState: LOWER_BOUND
- },
- {
- total: 8,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, 2, *.
- title: [undefined, '2', undefined],
- values: [
- {
- total: 128,
- self: 128,
- totalState: LOWER_BOUND
- },
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ],
- [
- { // *, *, %.
- title: [undefined, undefined, '%'],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- },
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, *, $.
- title: [undefined, undefined, '$'],
- values: [
- {
- total: 1024,
- self: 0,
- totalState: LOWER_BOUND
- },
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, *, @.
- title: [undefined, undefined, '@'],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- },
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- },
- { // Bottom-up heavy view.
- title: [undefined, undefined, undefined],
- values: [
- {
- total: 1187,
- self: 1,
- totalState: LOWER_BOUND
- },
- {
- total: 167,
- self: 89,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [
- { // A, *, *.
- title: ['A', undefined, undefined],
- values: [
- {
- total: 4,
- self: 2,
- totalState: LOWER_BOUND
- },
- {
- total: 55,
- self: 34,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // B, *, *.
- title: ['B', undefined, undefined],
- values: [
- {
- total: 16,
- self: 0,
- totalState: LOWER_BOUND
- },
- {
- total: 21,
- self: 13,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ],
- [
- { // *, 1, *.
- title: [undefined, '1', undefined],
- values: [
- {
- total: 64,
- self: 32,
- totalState: LOWER_BOUND
- },
- {
- total: 8,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, 2, *.
- title: [undefined, '2', undefined],
- values: [
- {
- total: 128,
- self: 128,
- totalState: LOWER_BOUND
- },
- {
- total: 2,
- self: 2,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ],
- [
- { // *, *, %.
- title: [undefined, undefined, '%'],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- },
- {
- total: 1,
- self: 0,
- totalState: LOWER_BOUND
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, *, $.
- title: [undefined, undefined, '$'],
- values: [
- {
- total: 1024,
- self: 0,
- totalState: LOWER_BOUND
- },
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- [],
- []
- ]
- },
- { // *, *, @.
- title: [undefined, undefined, '@'],
- values: [
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- },
- {
- total: 0,
- self: 0,
- totalState: NOT_PROVIDED
- }
- ],
- children: [
- [],
- [],
- []
- ]
- }
- ]
- ]
- });
-
- test('recursionDepthTracker', function() {
- var MAX_DEPTH = 5;
- var tracker = new RecursionDepthTracker(MAX_DEPTH, 2 /* dimension */);
-
- function pushNewNode(title) {
- var node = new MultiDimensionalViewNode(
- [undefined, 'ignored dimension', title, 'also ignored'],
- 1 /* valueCount (not relevant for this test) */);
- tracker.push(node);
- return node;
- }
-
- function checkTracker(expectedDefinedViewNodePath, expectedRecursionDepth) {
- var expectedBottomIndex = MAX_DEPTH - expectedDefinedViewNodePath.length;
- assert.strictEqual(tracker.bottomIndex, expectedBottomIndex);
- assert.strictEqual(tracker.topIndex, MAX_DEPTH);
-
- var undefinedPadding = new Array(expectedBottomIndex);
- var expectedViewNodePath =
- undefinedPadding.concat(expectedDefinedViewNodePath);
- var expectedTitlePath =
- undefinedPadding.concat(expectedDefinedViewNodePath.map(
- function(node) { return node.title[2]; }));
- assertListStrictEqual(tracker.viewNodePath, expectedViewNodePath);
- assertListStrictEqual(tracker.titlePath, expectedTitlePath);
-
- assert.strictEqual(tracker.recursionDepth, expectedRecursionDepth);
- }
-
- checkTracker([] /* empty stack */, 0);
- var a1 = pushNewNode('A');
- checkTracker([a1], 0);
- var b1 = pushNewNode('B');
- checkTracker([b1, a1], 0);
- var c1 = pushNewNode('C');
- checkTracker([c1, b1, a1], 0);
- var d1 = pushNewNode('D');
- checkTracker([d1, c1, b1, a1], 0);
- tracker.pop();
- checkTracker([c1, b1, a1], 0);
- var a2 = pushNewNode('A');
- checkTracker([a2, c1, b1, a1], 1);
- var b2 = pushNewNode('B');
- checkTracker([b2, a2, c1, b1, a1], 2);
- tracker.pop();
- checkTracker([a2, c1, b1, a1], 1);
- tracker.pop();
- checkTracker([c1, b1, a1], 0);
- tracker.push(b2);
- checkTracker([b2, c1, b1, a1], 1);
- tracker.pop();
- checkTracker([c1, b1, a1], 0);
- tracker.pop();
- checkTracker([b1, a1], 0);
- tracker.pop();
- checkTracker([a1], 0);
- var a3 = pushNewNode('A');
- checkTracker([a3, a1], 1);
- tracker.push(a2);
- checkTracker([a2, a3, a1], 2);
- var a4 = pushNewNode('A');
- checkTracker([a4, a2, a3, a1], 3);
- tracker.pop();
- checkTracker([a2, a3, a1], 2);
- var b3 = pushNewNode('B');
- checkTracker([b3, a2, a3, a1], 0);
- tracker.push(a4);
- checkTracker([a4, b3, a2, a3, a1], 1);
- tracker.pop();
- checkTracker([b3, a2, a3, a1], 0);
- tracker.pop();
- checkTracker([a2, a3, a1], 2);
- tracker.pop();
- checkTracker([a3, a1], 1);
- tracker.pop();
- checkTracker([a1], 0);
- tracker.pop();
- checkTracker([], 0);
- tracker.push(a4);
- checkTracker([a4], 0);
- tracker.push(b1);
- checkTracker([b1, a4], 0);
- tracker.push(a1);
- checkTracker([a1, b1, a4], 1);
- tracker.pop();
- checkTracker([b1, a4], 0);
- var c2 = pushNewNode('C');
- checkTracker([c2, b1, a4], 0);
- tracker.push(a3);
- checkTracker([a3, c2, b1, a4], 1);
- tracker.pop();
- checkTracker([c2, b1, a4], 0);
- tracker.pop();
- checkTracker([b1, a4], 0);
- tracker.pop();
- checkTracker([a4], 0);
- tracker.pop();
- checkTracker([], 0);
-
- assert.throws(function() {
- // Try popping from an empty tracker.
- tracker.pop();
- });
-
- pushNewNode('F');
- pushNewNode('U');
- pushNewNode('L');
- pushNewNode('L');
- pushNewNode('!');
- assert.throws(function() {
- // Try pushing to a full tracker.
- pushNewNode(':-(');
- });
- });
-
- test('zFunction', function() {
- // Empty list/string (suffix).
- assert.deepEqual(zFunction([], 0), []);
- assert.deepEqual(zFunction(['A'], 1), []);
- assert.deepEqual(zFunction(['A', 'B', 'C'], 3), []);
- assert.deepEqual(zFunction('', 0), []);
- assert.deepEqual(zFunction('A', 1), []);
- assert.deepEqual(zFunction('ABC', 3), []);
-
- // Singleton list/string.
- checkZFunction([1], [0]);
- checkZFunction('T', [0]);
-
- // No duplicate elements.
- checkZFunction([1, 2, 3, 4, 5], [0, 0, 0, 0, 0]);
- checkZFunction('ABCDEF', [0, 0, 0, 0, 0, 0]);
-
- // No substring is a suffix.
- checkZFunction([1, 2, 3, 2], [0, 0, 0, 0]);
- checkZFunction('ABBB', [0, 0, 0, 0]);
-
- // Pure repetition.
- checkZFunction([1, 1, 1, 1, 1], [0, 4, 3, 2, 1]);
- checkZFunction('AAAAA', [0, 4, 3, 2, 1]);
-
- // Interleaved repetition.
- checkZFunction([1, 2, 1, 3, 1, 2, 1], [0, 0, 1, 0, 3, 0, 1]);
- checkZFunction('AAABAAB', [0, 2, 1, 0, 2, 1, 0]);
-
- // Complex patterns.
- checkZFunction([7, 9, 7, 9, 7, 9, 7, 9], [0, 0, 6, 0, 4, 0, 2, 0]);
- checkZFunction('CCGTCCCGTACC', [0, 1, 0, 0, 2, 4, 1, 0, 0, 0, 2, 1]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function.html b/chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function.html
deleted file mode 100644
index 9ed89349f69..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var PERCENTILE_PRECISION = 1e-7;
- /**
- * A function that consists of linear pieces.
- * See https://en.wikipedia.org/wiki/Piecewise_linear_function.
- * @constructor
- */
- function PiecewiseLinearFunction() {
- this.pieces = [];
- }
-
- PiecewiseLinearFunction.prototype = {
- /**
- * Push a linear piece defined by linear interpolation between.
- * (x1, y1) and (x2, y2).
- * Pieces must be pushed in the order of increasing x coordinate.
- */
- push: function(x1, y1, x2, y2) {
- if (x1 >= x2)
- throw new Error('Invalid segment');
- if (this.pieces.length > 0 &&
- this.pieces[this.pieces.length - 1].x2 > x1) {
- throw new Error('Potentially overlapping segments');
- }
- if (x1 < x2)
- this.pieces.push(new Piece(x1, y1, x2, y2));
- },
-
- /**
- * Returns the size of the set A such that for all x in A: f(x) < y.
- */
- partBelow: function(y) {
- return this.pieces.reduce((acc, p) => (acc + p.partBelow(y)), 0);
- },
-
- get min() {
- return this.pieces.reduce((acc, p) => Math.min(acc, p.min), Infinity);
- },
-
- get max() {
- return this.pieces.reduce((acc, p) => Math.max(acc, p.max), -Infinity);
- },
-
- get average() {
- var weightedSum = 0;
- var totalWeight = 0;
- this.pieces.forEach(function(piece) {
- weightedSum += piece.width * piece.average;
- totalWeight += piece.width;
- });
- if (totalWeight === 0)
- return 0;
- return weightedSum / totalWeight;
- },
-
- /**
- * Returns the minimum possible value y such that the percentage of x points
- * that have f(x) <= y is approximately equal to the given |percent|.
- */
- percentile: function(percent) {
- if (!(percent >= 0 && percent <= 1))
- throw new Error('percent must be [0,1]');
- var lower = this.min;
- var upper = this.max;
- var total = this.partBelow(upper);
- if (total === 0)
- return 0;
- while (upper - lower > PERCENTILE_PRECISION) {
- var middle = (lower + upper) / 2;
- var below = this.partBelow(middle);
- if (below / total < percent)
- lower = middle;
- else
- upper = middle;
- }
- return (lower + upper) / 2;
- }
- };
-
- /**
- * A linear segment from (x1, y1) to (x2, y2).
- * @constructor
- */
- function Piece(x1, y1, x2, y2) {
- this.x1 = x1;
- this.y1 = y1;
- this.x2 = x2;
- this.y2 = y2;
- }
-
- Piece.prototype = {
- /**
- * The total length of all x points such that f(x) < y.
- * More formally:
- * max(x2 - x1) such that for all x in [x1 .. x2]: f(x) < y.
- */
- partBelow: function(y) {
- var width = this.width;
- if (width === 0)
- return 0;
- var minY = this.min;
- var maxY = this.max;
- if (y >= maxY)
- return width;
- if (y < minY)
- return 0;
- return (y - minY) / (maxY - minY) * width;
- },
-
- get min() {
- return Math.min(this.y1, this.y2);
- },
-
- get max() {
- return Math.max(this.y1, this.y2);
- },
-
- get average() {
- return (this.y1 + this.y2) / 2;
- },
-
- get width() {
- return this.x2 - this.x1;
- }
- };
-
- return {
- PiecewiseLinearFunction: PiecewiseLinearFunction
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function_test.html b/chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function_test.html
deleted file mode 100644
index 7b36d7d256c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/piecewise_linear_function_test.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/piecewise_linear_function.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('PiecewiseLinearFunctionEmpty', function() {
- var f = new tr.b.PiecewiseLinearFunction();
- assert.strictEqual(f.max, -Infinity);
- assert.strictEqual(f.min, Infinity);
- assert.strictEqual(f.average, 0);
- assert.strictEqual(f.percentile(0.5), 0);
- });
-
- test('PiecewiseLinearFunction', function() {
- var f = new tr.b.PiecewiseLinearFunction();
- f.push(0, 0.0, 10, 1.0);
- f.push(10, 1.0, 20, 0.0);
- f.push(20, 0.0, 30, 0.0);
- assert.strictEqual(f.max, 1.0);
- assert.strictEqual(f.min, 0.0);
- assert.closeTo(f.average, 20 * 1 / 2.0 / 30, 1e-6);
- assert.closeTo(f.percentile(1.0 / 3.0), 0.0, 1e-6);
- assert.closeTo(f.percentile(2.0 / 3.0), 0.5, 1e-6);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/quad.html b/chromium/third_party/catapult/tracing/tracing/base/quad.html
deleted file mode 100644
index 9e66c5e21c5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/quad.html
+++ /dev/null
@@ -1,232 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/math.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var tmpVec2s = [];
- for (var i = 0; i < 8; i++)
- tmpVec2s[i] = vec2.create();
-
- var tmpVec2a = vec4.create();
- var tmpVec4a = vec4.create();
- var tmpVec4b = vec4.create();
- var tmpMat4 = mat4.create();
- var tmpMat4b = mat4.create();
-
- var p00 = vec2.createXY(0, 0);
- var p10 = vec2.createXY(1, 0);
- var p01 = vec2.createXY(0, 1);
- var p11 = vec2.createXY(1, 1);
-
- var lerpingVecA = vec2.create();
- var lerpingVecB = vec2.create();
- function lerpVec2(out, a, b, amt) {
- vec2.scale(lerpingVecA, a, amt);
- vec2.scale(lerpingVecB, b, 1 - amt);
- vec2.add(out, lerpingVecA, lerpingVecB);
- vec2.normalize(out, out);
- return out;
- }
-
- /**
- * @constructor
- */
- function Quad() {
- this.p1 = vec2.create();
- this.p2 = vec2.create();
- this.p3 = vec2.create();
- this.p4 = vec2.create();
- }
-
- Quad.fromXYWH = function(x, y, w, h) {
- var q = new Quad();
- vec2.set(q.p1, x, y);
- vec2.set(q.p2, x + w, y);
- vec2.set(q.p3, x + w, y + h);
- vec2.set(q.p4, x, y + h);
- return q;
- }
-
- Quad.fromRect = function(r) {
- return new Quad.fromXYWH(
- r.x, r.y,
- r.width, r.height);
- }
-
- Quad.from4Vecs = function(p1, p2, p3, p4) {
- var q = new Quad();
- vec2.set(q.p1, p1[0], p1[1]);
- vec2.set(q.p2, p2[0], p2[1]);
- vec2.set(q.p3, p3[0], p3[1]);
- vec2.set(q.p4, p4[0], p4[1]);
- return q;
- }
-
- Quad.from8Array = function(arr) {
- if (arr.length !== 8)
- throw new Error('Array must be 8 long');
- var q = new Quad();
- q.p1[0] = arr[0];
- q.p1[1] = arr[1];
- q.p2[0] = arr[2];
- q.p2[1] = arr[3];
- q.p3[0] = arr[4];
- q.p3[1] = arr[5];
- q.p4[0] = arr[6];
- q.p4[1] = arr[7];
- return q;
- };
-
- Quad.prototype = {
- pointInside: function(point) {
- return pointInImplicitQuad(point,
- this.p1, this.p2, this.p3, this.p4);
- },
-
- boundingRect: function() {
- var x0 = Math.min(this.p1[0], this.p2[0], this.p3[0], this.p4[0]);
- var y0 = Math.min(this.p1[1], this.p2[1], this.p3[1], this.p4[1]);
-
- var x1 = Math.max(this.p1[0], this.p2[0], this.p3[0], this.p4[0]);
- var y1 = Math.max(this.p1[1], this.p2[1], this.p3[1], this.p4[1]);
-
- return new tr.b.Rect.fromXYWH(x0, y0, x1 - x0, y1 - y0);
- },
-
- clone: function() {
- var q = new Quad();
- vec2.copy(q.p1, this.p1);
- vec2.copy(q.p2, this.p2);
- vec2.copy(q.p3, this.p3);
- vec2.copy(q.p4, this.p4);
- return q;
- },
-
- scale: function(s) {
- var q = new Quad();
- this.scaleFast(q, s);
- return q;
- },
-
- scaleFast: function(dstQuad, s) {
- vec2.copy(dstQuad.p1, this.p1, s);
- vec2.copy(dstQuad.p2, this.p2, s);
- vec2.copy(dstQuad.p3, this.p3, s);
- vec2.copy(dstQuad.p3, this.p3, s);
- },
-
- isRectangle: function() {
- // Simple rectangle check. Note: will not handle out-of-order components.
- var bounds = this.boundingRect();
- return (
- bounds.x === this.p1[0] &&
- bounds.y === this.p1[1] &&
- bounds.width === this.p2[0] - this.p1[0] &&
- bounds.y === this.p2[1] &&
- bounds.width === this.p3[0] - this.p1[0] &&
- bounds.height === this.p3[1] - this.p2[1] &&
- bounds.x === this.p4[0] &&
- bounds.height === this.p4[1] - this.p2[1]
- );
- },
-
- projectUnitRect: function(rect) {
- var q = new Quad();
- this.projectUnitRectFast(q, rect);
- return q;
- },
-
- projectUnitRectFast: function(dstQuad, rect) {
- var v12 = tmpVec2s[0];
- var v14 = tmpVec2s[1];
- var v23 = tmpVec2s[2];
- var v43 = tmpVec2s[3];
- var l12, l14, l23, l43;
-
- vec2.sub(v12, this.p2, this.p1);
- l12 = vec2.length(v12);
- vec2.scale(v12, v12, 1 / l12);
-
- vec2.sub(v14, this.p4, this.p1);
- l14 = vec2.length(v14);
- vec2.scale(v14, v14, 1 / l14);
-
- vec2.sub(v23, this.p3, this.p2);
- l23 = vec2.length(v23);
- vec2.scale(v23, v23, 1 / l23);
-
- vec2.sub(v43, this.p3, this.p4);
- l43 = vec2.length(v43);
- vec2.scale(v43, v43, 1 / l43);
-
- var b12 = tmpVec2s[0];
- var b14 = tmpVec2s[1];
- var b23 = tmpVec2s[2];
- var b43 = tmpVec2s[3];
- lerpVec2(b12, v12, v43, rect.y);
- lerpVec2(b43, v12, v43, 1 - rect.bottom);
- lerpVec2(b14, v14, v23, rect.x);
- lerpVec2(b23, v14, v23, 1 - rect.right);
-
- vec2.addTwoScaledUnitVectors(tmpVec2a,
- b12, l12 * rect.x,
- b14, l14 * rect.y);
- vec2.add(dstQuad.p1, this.p1, tmpVec2a);
-
- vec2.addTwoScaledUnitVectors(tmpVec2a,
- b12, l12 * -(1.0 - rect.right),
- b23, l23 * rect.y);
- vec2.add(dstQuad.p2, this.p2, tmpVec2a);
-
-
- vec2.addTwoScaledUnitVectors(tmpVec2a,
- b43, l43 * -(1.0 - rect.right),
- b23, l23 * -(1.0 - rect.bottom));
- vec2.add(dstQuad.p3, this.p3, tmpVec2a);
-
- vec2.addTwoScaledUnitVectors(tmpVec2a,
- b43, l43 * rect.left,
- b14, l14 * -(1.0 - rect.bottom));
- vec2.add(dstQuad.p4, this.p4, tmpVec2a);
- },
-
- toString: function() {
- return 'Quad(' +
- vec2.toString(this.p1) + ', ' +
- vec2.toString(this.p2) + ', ' +
- vec2.toString(this.p3) + ', ' +
- vec2.toString(this.p4) + ')';
- }
- };
-
- function sign(p1, p2, p3) {
- return (p1[0] - p3[0]) * (p2[1] - p3[1]) -
- (p2[0] - p3[0]) * (p1[1] - p3[1]);
- }
-
- function pointInTriangle2(pt, p1, p2, p3) {
- var b1 = sign(pt, p1, p2) < 0.0;
- var b2 = sign(pt, p2, p3) < 0.0;
- var b3 = sign(pt, p3, p1) < 0.0;
- return ((b1 === b2) && (b2 === b3));
- }
-
- function pointInImplicitQuad(point, p1, p2, p3, p4) {
- return pointInTriangle2(point, p1, p2, p3) ||
- pointInTriangle2(point, p1, p3, p4);
- }
-
- return {
- pointInTriangle2: pointInTriangle2,
- pointInImplicitQuad: pointInImplicitQuad,
- Quad: Quad
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/quad_test.html b/chromium/third_party/catapult/tracing/tracing/base/quad_test.html
deleted file mode 100644
index ab25ee62498..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/quad_test.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/base/quad.html">
-<script>
-'use strict';
-
-function assertQuadEquals(a, b, opt_message) {
- var ok = true;
- ok &= a.p1[0] === b.p1[0] && a.p1[1] === b.p1[1];
- ok &= a.p2[0] === b.p2[0] && a.p2[1] === b.p2[1];
- ok &= a.p3[0] === b.p3[0] && a.p3[1] === b.p3[1];
- ok &= a.p4[0] === b.p4[0] && a.p4[1] === b.p4[1];
- if (ok)
- return;
- var message = opt_message || 'Expected "' + a.toString() +
- '", got "' + b.toString() + '"';
- throw new tr.b.unittest.TestError(message);
-}
-
-tr.b.unittest.testSuite(function() {
- test('pointInTri', function() {
- var res = tr.b.pointInTriangle2(
- [0.25, 0.25],
- [0, 0],
- [1, 0],
- [0, 1]);
- assert.isTrue(res);
- });
-
- test('pointNotInTri', function() {
- var res = tr.b.pointInTriangle2(
- [0.75, 0.75],
- [0, 0],
- [1, 0],
- [0, 1]);
- assert.isFalse(res);
- });
-
- test('pointInside', function() {
- var q = tr.b.Quad.from4Vecs([0, 0],
- [1, 0],
- [1, 1],
- [0, 1]);
- var res = q.pointInside([0.5, 0.5]);
- assert.isTrue(res);
- });
-
- test('pointNotInQuad', function() {
- var q = tr.b.Quad.from4Vecs([0, 0],
- [1, 0],
- [1, 1],
- [0, 1]);
- var res = q.pointInside([1.5, 0.5]);
- assert.isFalse(res);
- });
-
- test('isRectangle', function() {
- assert.isTrue(tr.b.Quad.fromXYWH(0, 0, 10, 10).isRectangle());
- assert.isTrue(tr.b.Quad.fromXYWH(-10, -10, 5, 5).isRectangle());
- assert.isTrue(tr.b.Quad.fromXYWH(-10, -10, 20, 20).isRectangle());
- assert.isTrue(tr.b.Quad.fromXYWH(-10, 10, 5, 5).isRectangle());
-
- assert.isFalse(tr.b.Quad.fromXYWH(0, 0, -10, -10).isRectangle());
- assert.isFalse(
- tr.b.Quad.from8Array([0, 1, 2, 3, 4, 5, 6, 7]).isRectangle());
- assert.isFalse(
- tr.b.Quad.from8Array([0, 0, 0, 5, 5, 5, 0, 0]).isRectangle());
- });
-
- test('projectUnitRect', function() {
- var container = tr.b.Quad.fromXYWH(0, 0, 10, 10);
- var srcRect = tr.b.Rect.fromXYWH(0.1, 0.8, 0.8, 0.1);
- var expectedRect = srcRect.scale(10);
-
- var q = new tr.b.Quad();
- container.projectUnitRectFast(q, srcRect);
-
- assertQuadEquals(tr.b.Quad.fromRect(expectedRect), q);
- });
-
- test('projectUnitRectOntoUnitQuad', function() {
- var container = tr.b.Quad.fromXYWH(0, 0, 1, 1);
- var srcRect = tr.b.Rect.fromXYWH(0.0, 0, 1, 1);
- var expectedRect = srcRect;
-
- var q = new tr.b.Quad();
- container.projectUnitRectFast(q, srcRect);
-
- assertQuadEquals(tr.b.Quad.fromRect(expectedRect), q);
- });
-
- test('projectUnitRectOntoSizeTwoQuad', function() {
- var container = tr.b.Quad.fromXYWH(0, 0, 2, 2);
- var srcRect = tr.b.Rect.fromXYWH(0.0, 0, 1, 1);
- var expectedRect = srcRect.scale(2);
-
- var q = new tr.b.Quad();
- container.projectUnitRectFast(q, srcRect);
-
- assertQuadEquals(tr.b.Quad.fromRect(expectedRect), q);
- });
-
- test('projectUnitRectOntoTranslatedQuad', function() {
- var container = tr.b.Quad.fromXYWH(1, 1, 1, 1);
- var srcRect = tr.b.Rect.fromXYWH(0.0, 0, 1, 1);
- var expectedRect = srcRect.translate([1, 1]);
-
- var q = new tr.b.Quad();
- container.projectUnitRectFast(q, srcRect);
-
- assertQuadEquals(tr.b.Quad.fromRect(expectedRect), q);
- });
-
- test('projectShrunkUnitRectOntoUnitQuad', function() {
- var container = tr.b.Quad.fromXYWH(0, 0, 1, 1);
- var srcRect = tr.b.Rect.fromXYWH(0.1, 0.1, 0.8, 0.8);
- var expectedRect = srcRect;
-
- var q = new tr.b.Quad();
- container.projectUnitRectFast(q, srcRect);
-
- assertQuadEquals(tr.b.Quad.fromRect(expectedRect), q);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/raf.html b/chromium/third_party/catapult/tracing/tracing/base/raf.html
deleted file mode 100644
index 9082e972f1b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/raf.html
+++ /dev/null
@@ -1,214 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/utils.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var ESTIMATED_IDLE_PERIOD_LENGTH_MILLISECONDS = 10;
- // The maximum amount of time that we allow for a task to get scheduled
- // in idle time before forcing the task to run.
- var REQUEST_IDLE_CALLBACK_TIMEOUT_MILLISECONDS = 100;
-
- // Setting this to true will cause stack traces to get dumped into the
- // tasks. When an exception happens the original stack will be printed.
- //
- // NOTE: This should never be set committed as true.
- var recordRAFStacks = false;
-
- var pendingPreAFs = [];
- var pendingRAFs = [];
- var pendingIdleCallbacks = [];
- var currentRAFDispatchList = undefined;
-
- var rafScheduled = false;
- var idleWorkScheduled = false;
-
- function scheduleRAF() {
- if (rafScheduled)
- return;
- rafScheduled = true;
- if (tr.isHeadless) {
- Promise.resolve().then(function() {
- processRequests(false, 0);
- }, function(e) {
- console.log(e.stack);
- throw e;
- });
- } else {
- if (window.requestAnimationFrame) {
- window.requestAnimationFrame(processRequests.bind(this, false));
- } else {
- var delta = Date.now() - window.performance.now();
- window.webkitRequestAnimationFrame(function(domTimeStamp) {
- processRequests(false, domTimeStamp - delta);
- });
- }
- }
- }
-
- function nativeRequestIdleCallbackSupported() {
- return !tr.isHeadless && window.requestIdleCallback;
- }
-
- function scheduleIdleWork() {
- if (idleWorkScheduled)
- return;
- if (!nativeRequestIdleCallbackSupported()) {
- scheduleRAF();
- return;
- }
- idleWorkScheduled = true;
- window.requestIdleCallback(function(deadline, didTimeout) {
- processIdleWork(false /* forceAllTasksToRun */, deadline);
- }, { timeout: REQUEST_IDLE_CALLBACK_TIMEOUT_MILLISECONDS });
- }
-
- function onAnimationFrameError(e, opt_stack) {
- console.log(e.stack);
- if (tr.isHeadless)
- throw e;
-
- if (opt_stack)
- console.log(opt_stack);
-
- if (e.message)
- console.error(e.message, e.stack);
- else
- console.error(e);
- }
-
- function runTask(task, frameBeginTime) {
- try {
- task.callback.call(task.context, frameBeginTime);
- } catch (e) {
- tr.b.onAnimationFrameError(e, task.stack);
- }
- }
-
- function processRequests(forceAllTasksToRun, frameBeginTime) {
- rafScheduled = false;
-
- var currentPreAFs = pendingPreAFs;
- currentRAFDispatchList = pendingRAFs;
- pendingPreAFs = [];
- pendingRAFs = [];
- var hasRAFTasks = currentPreAFs.length || currentRAFDispatchList.length;
-
- for (var i = 0; i < currentPreAFs.length; i++)
- runTask(currentPreAFs[i], frameBeginTime);
-
- while (currentRAFDispatchList.length > 0)
- runTask(currentRAFDispatchList.shift(), frameBeginTime);
- currentRAFDispatchList = undefined;
-
- if ((!hasRAFTasks && !nativeRequestIdleCallbackSupported()) ||
- forceAllTasksToRun) {
- // We assume that we want to do a fixed maximum amount of optional work
- // per frame. Hopefully rAF will eventually pass this in for us.
- var rafCompletionDeadline =
- frameBeginTime + ESTIMATED_IDLE_PERIOD_LENGTH_MILLISECONDS;
- processIdleWork(
- forceAllTasksToRun, {
- timeRemaining: function() {
- return rafCompletionDeadline - window.performance.now();
- }
- }
- );
- }
-
- if (pendingIdleCallbacks.length > 0)
- scheduleIdleWork();
- }
-
- function processIdleWork(forceAllTasksToRun, deadline) {
- idleWorkScheduled = false;
- while (pendingIdleCallbacks.length > 0) {
- runTask(pendingIdleCallbacks.shift());
- // Check timer after running at least one idle task to avoid buggy
- // window.performance.now() on some platforms from blocking the idle
- // task queue.
- if (!forceAllTasksToRun &&
- (tr.isHeadless || deadline.timeRemaining() <= 0)) {
- break;
- }
- }
-
- if (pendingIdleCallbacks.length > 0)
- scheduleIdleWork();
- }
-
- function getStack_() {
- if (!recordRAFStacks)
- return '';
-
- var stackLines = tr.b.stackTrace();
- // Strip off getStack_.
- stackLines.shift();
- return stackLines.join('\n');
- }
-
- function requestPreAnimationFrame(callback, opt_this) {
- pendingPreAFs.push({
- callback: callback,
- context: opt_this || global,
- stack: getStack_()});
- scheduleRAF();
- }
-
- function requestAnimationFrameInThisFrameIfPossible(callback, opt_this) {
- if (!currentRAFDispatchList) {
- requestAnimationFrame(callback, opt_this);
- return;
- }
- currentRAFDispatchList.push({
- callback: callback,
- context: opt_this || global,
- stack: getStack_()});
- return;
- }
-
- function requestAnimationFrame(callback, opt_this) {
- pendingRAFs.push({
- callback: callback,
- context: opt_this || global,
- stack: getStack_()});
- scheduleRAF();
- }
-
- function requestIdleCallback(callback, opt_this) {
- pendingIdleCallbacks.push({
- callback: callback,
- context: opt_this || global,
- stack: getStack_()});
- scheduleIdleWork();
- }
-
- function forcePendingRAFTasksToRun(frameBeginTime) {
- if (!rafScheduled)
- return;
- processRequests(false, frameBeginTime);
- }
-
- function forceAllPendingTasksToRunForTest() {
- if (!rafScheduled && !idleWorkScheduled)
- return;
- processRequests(true, 0);
- }
-
- return {
- onAnimationFrameError: onAnimationFrameError,
- requestPreAnimationFrame: requestPreAnimationFrame,
- requestAnimationFrame: requestAnimationFrame,
- requestAnimationFrameInThisFrameIfPossible:
- requestAnimationFrameInThisFrameIfPossible,
- requestIdleCallback: requestIdleCallback,
- forcePendingRAFTasksToRun: forcePendingRAFTasksToRun,
- forceAllPendingTasksToRunForTest: forceAllPendingTasksToRunForTest
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/raf_test.html b/chromium/third_party/catapult/tracing/tracing/base/raf_test.html
deleted file mode 100644
index 289ab52a650..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/raf_test.html
+++ /dev/null
@@ -1,247 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/raf.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- if (tr.isHeadless)
- return;
-
- test('idleCallbackWorks', function() {
- return new Promise(function(resolve, reject) {
- tr.b.requestIdleCallback(resolve);
- });
- });
-
- test('forceAllPendingTasksToRunForTest', function() {
- var rafRan = false;
- tr.b.requestAnimationFrame(function() {
- rafRan = true;
- });
- var idleRan = false;
- tr.b.requestIdleCallback(function() {
- idleRan = true;
- });
- assert.isFalse(rafRan);
- assert.isFalse(idleRan);
- tr.b.forceAllPendingTasksToRunForTest();
- assert.isTrue(rafRan);
- assert.isTrue(idleRan);
- });
-
- test('forcePendingRAFTasksToRun', function() {
- var rafRan = false;
- tr.b.requestAnimationFrame(function() {
- rafRan = true;
- });
- var idleRan = false;
- tr.b.requestIdleCallback(function() {
- idleRan = true;
- });
- tr.b.forcePendingRAFTasksToRun();
- assert.isTrue(rafRan);
- assert.isFalse(idleRan);
- });
-
- var fakeNow = undefined;
- function withFakeWindowPerformanceNow(func) {
- var oldNow = window.performance.now;
- try {
- window.performance.now = function() { return fakeNow; };
- func();
- } finally {
- window.performance.now = oldNow;
- }
- }
-
- // None of the following tests are relevant if the browser supports idle
- // callbacks natively. Nevertheless, run them without native idle support to
- // make sure the fallback keeps working.
- function withoutNativeIdleCallbacks(func) {
- var oldRIC = window.requestIdleCallback;
- try {
- window.requestIdleCallback = undefined;
- func();
- } finally {
- window.requestIdleCallback = oldRIC;
- }
- }
-
- function withMockedScheduling(func) {
- withFakeWindowPerformanceNow(function() {
- withoutNativeIdleCallbacks(func);
- });
- }
-
- test('runIdleTaskWhileIdle', function() {
- withMockedScheduling(function() {
- tr.b.forceAllPendingTasksToRunForTest();
-
- var rafRan = false;
- tr.b.requestAnimationFrame(function() {
- rafRan = true;
- });
- var idleRan = false;
- tr.b.requestIdleCallback(function() {
- idleRan = true;
- });
- fakeNow = 0;
- tr.b.forcePendingRAFTasksToRun(fakeNow);
- assert.isFalse(idleRan);
- assert.isTrue(rafRan);
- tr.b.forcePendingRAFTasksToRun(fakeNow);
- assert.isTrue(idleRan);
- });
- });
-
- test('twoShortIdleCallbacks', function() {
- withMockedScheduling(function() {
- tr.b.forceAllPendingTasksToRunForTest();
-
- var idle1Ran = false;
- var idle2Ran = false;
- tr.b.requestIdleCallback(function() {
- fakeNow += 1;
- idle1Ran = true;
- });
- tr.b.requestIdleCallback(function() {
- fakeNow += 1;
- idle2Ran = true;
- });
- fakeNow = 0;
- tr.b.forcePendingRAFTasksToRun(fakeNow);
- assert.isTrue(idle1Ran);
- assert.isTrue(idle2Ran);
- });
- });
-
-
- test('oneLongOneShortIdleCallback', function() {
- withMockedScheduling(function() {
- tr.b.forceAllPendingTasksToRunForTest();
-
- var idle1Ran = false;
- var idle2Ran = false;
- tr.b.requestIdleCallback(function() {
- fakeNow += 100;
- idle1Ran = true;
- });
- tr.b.requestIdleCallback(function() {
- fakeNow += 1;
- idle2Ran = true;
- });
- fakeNow = 0;
- tr.b.forcePendingRAFTasksToRun(fakeNow);
- assert.isTrue(idle1Ran);
- assert.isFalse(idle2Ran);
-
- // Reset idle1Ran to verify that it dosn't run again.
- idle1Ran = false;
-
- // Now run. idle2 should now run.
- tr.b.forcePendingRAFTasksToRun(fakeNow);
- assert.isFalse(idle1Ran);
- assert.isTrue(idle2Ran);
- });
- });
-
- test('buggyPerformanceNowDoesNotBlockIdleTasks', function() {
- withMockedScheduling(function() {
- tr.b.forcePendingRAFTasksToRun(); // Clear current RAF task queue.
-
- var idle1Ran = false;
- var idle2Ran = false;
- tr.b.requestIdleCallback(function() {
- fakeNow += 100;
- idle1Ran = true;
- });
- tr.b.requestIdleCallback(function() {
- fakeNow += 1;
- idle2Ran = true;
- });
- fakeNow = 10000;
- tr.b.forcePendingRAFTasksToRun(0);
- assert.isTrue(idle1Ran);
- assert.isFalse(idle2Ran);
-
- // Reset idle1Ran to verify that it dosn't run again.
- idle1Ran = false;
-
- // Now run. idle2 should now run.
- tr.b.forcePendingRAFTasksToRun(0);
- assert.isFalse(idle1Ran);
- assert.isTrue(idle2Ran);
- });
- });
-
- function withFixedIdleTimeRemaining(idleTime, func) {
- var oldRIC = window.requestIdleCallback;
- try {
- var pendingIdleCallbacks = [];
- window.requestIdleCallback = function(callback) {
- var deadline = {
- timeRemaining: function() {
- return idleTime;
- }
- };
- pendingIdleCallbacks.push(function() {
- callback(deadline, false /* didTimeout */);
- });
- };
- func(pendingIdleCallbacks);
- } finally {
- window.requestIdleCallback = oldRIC;
- }
- }
-
- test('idleCallbackWithIdletime', function() {
- withFixedIdleTimeRemaining(1000, function(pendingIdleCallbacks) {
- var idle1Ran = false;
- var idle2Ran = false;
- tr.b.requestIdleCallback(function() {
- idle1Ran = true;
- });
- tr.b.requestIdleCallback(function() {
- idle2Ran = true;
- });
- assert.lengthOf(pendingIdleCallbacks, 1);
- pendingIdleCallbacks.shift()();
-
- // Both callbacks should have run since there was idle time.
- assert.isTrue(idle1Ran);
- assert.isTrue(idle2Ran);
- });
- });
-
- test('idleCallbackWithoutIdletime', function() {
- withFixedIdleTimeRemaining(0, function(pendingIdleCallbacks) {
- var idle1Ran = false;
- var idle2Ran = false;
- tr.b.requestIdleCallback(function() {
- idle1Ran = true;
- });
- tr.b.requestIdleCallback(function() {
- idle2Ran = true;
- });
- assert.lengthOf(pendingIdleCallbacks, 1);
- pendingIdleCallbacks.shift()();
-
- // Only the first idle callback should have run since there was no idle
- // time left.
- assert.isTrue(idle1Ran);
- assert.isFalse(idle2Ran);
-
- // Run the remaining idle task.
- assert.lengthOf(pendingIdleCallbacks, 1);
- pendingIdleCallbacks.shift()();
- assert.isTrue(idle2Ran);
- });
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/range.html b/chromium/third_party/catapult/tracing/tracing/base/range.html
deleted file mode 100644
index 593d85f13b5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/range.html
+++ /dev/null
@@ -1,277 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/math.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Quick range computations.
- */
-tr.exportTo('tr.b', function() {
-
- function Range() {
- this.isEmpty_ = true;
- this.min_ = undefined;
- this.max_ = undefined;
- }
-
- Range.prototype = {
- __proto__: Object.prototype,
-
- reset: function() {
- this.isEmpty_ = true;
- this.min_ = undefined;
- this.max_ = undefined;
- },
-
- get isEmpty() {
- return this.isEmpty_;
- },
-
- addRange: function(range) {
- if (range.isEmpty)
- return;
- this.addValue(range.min);
- this.addValue(range.max);
- },
-
- addValue: function(value) {
- if (this.isEmpty_) {
- this.max_ = value;
- this.min_ = value;
- this.isEmpty_ = false;
- return;
- }
- this.max_ = Math.max(this.max_, value);
- this.min_ = Math.min(this.min_, value);
- },
-
- set min(min) {
- this.isEmpty_ = false;
- this.min_ = min;
- },
-
- get min() {
- if (this.isEmpty_)
- return undefined;
- return this.min_;
- },
-
- get max() {
- if (this.isEmpty_)
- return undefined;
- return this.max_;
- },
-
- set max(max) {
- this.isEmpty_ = false;
- this.max_ = max;
- },
-
- get range() {
- if (this.isEmpty_)
- return undefined;
- return this.max_ - this.min_;
- },
-
- get center() {
- return (this.min_ + this.max_) * 0.5;
- },
-
- get duration() {
- if (this.isEmpty_)
- return 0;
- return this.max_ - this.min_;
- },
-
- normalize: function(x) {
- return tr.b.normalize(x, this.min, this.max);
- },
-
- lerp: function(x) {
- return tr.b.lerp(x, this.min, this.max);
- },
-
- equals: function(that) {
- if (this.isEmpty && that.isEmpty)
- return true;
- if (this.isEmpty !== that.isEmpty)
- return false;
- return (tr.b.approximately(this.min, that.min) &&
- tr.b.approximately(this.max, that.max));
- },
-
- containsExplicitRangeInclusive: function(min, max) {
- if (this.isEmpty)
- return false;
- return this.min_ <= min && max <= this.max_;
- },
-
- containsExplicitRangeExclusive: function(min, max) {
- if (this.isEmpty)
- return false;
- return this.min_ < min && max < this.max_;
- },
-
- intersectsExplicitRangeInclusive: function(min, max) {
- if (this.isEmpty)
- return false;
- return this.min_ <= max && min <= this.max_;
- },
-
- intersectsExplicitRangeExclusive: function(min, max) {
- if (this.isEmpty)
- return false;
- return this.min_ < max && min < this.max_;
- },
-
- containsRangeInclusive: function(range) {
- if (range.isEmpty)
- return false;
- return this.containsExplicitRangeInclusive(range.min_, range.max_);
- },
-
- containsRangeExclusive: function(range) {
- if (range.isEmpty)
- return false;
- return this.containsExplicitRangeExclusive(range.min_, range.max_);
- },
-
- intersectsRangeInclusive: function(range) {
- if (range.isEmpty)
- return false;
- return this.intersectsExplicitRangeInclusive(range.min_, range.max_);
- },
-
- intersectsRangeExclusive: function(range) {
- if (range.isEmpty)
- return false;
- return this.intersectsExplicitRangeExclusive(range.min_, range.max_);
- },
-
- findExplicitIntersectionDuration: function(min, max) {
- var min = Math.max(this.min, min);
- var max = Math.min(this.max, max);
- if (max < min)
- return 0;
- return max - min;
- },
-
- findIntersection: function(range) {
- if (this.isEmpty || range.isEmpty)
- return new Range();
-
- var min = Math.max(this.min, range.min);
- var max = Math.min(this.max, range.max);
-
- if (max < min)
- return new Range();
-
- return Range.fromExplicitRange(min, max);
- },
-
- toJSON: function() {
- if (this.isEmpty_)
- return {isEmpty: true};
- return {
- isEmpty: false,
- max: this.max,
- min: this.min
- };
- },
-
- /**
- * Returns a slice of the input array that intersects with this range
- * inclusively.
- * If the range does not have a min, it is treated as unbounded from below.
- * Similarly, if max is undefined, the range is unbounded from above.
- *
- * @param {Array} array The array of elements to be filtered.
- * @param {Funcation=} opt_keyFunc A function that extracts a numeric value,
- * to be used in comparisons, from an element of the array. If not
- * specified, array elements themselves will be used.
- * @param {Object=} opt_this An optional this argument to be passed to
- * opt_keyFunc.
- */
- filterArray: function(array, opt_keyFunc, opt_this) {
- if (this.isEmpty_)
- return [];
- // Binary search. |test| is a function that should return true when we
- // need to explore the left branch and false to explore the right branch.
- function binSearch(test) {
- var i0 = 0;
- var i1 = array.length;
- while (i0 < i1) {
- var i = Math.trunc((i0 + i1) / 2);
- if (test(i))
- i1 = i; // Explore the left branch.
- else
- i0 = i + 1; // Explore the right branch.
- }
- return i1;
- }
-
- var keyFunc = opt_keyFunc || tr.b.identity;
- function getValue(index) {
- return keyFunc.call(opt_this, array[index]);
- }
-
- var first = binSearch(function(i) {
- return this.min_ === undefined || this.min_ <= getValue(i);
- }.bind(this));
- var last = binSearch(function(i) {
- return this.max_ !== undefined && this.max_ < getValue(i);
- }.bind(this));
- return array.slice(first, last);
- }
- };
-
- Range.fromDict = function(d) {
- if (d.isEmpty === true) {
- return new Range();
- } else if (d.isEmpty === false) {
- var range = new Range();
- range.min = d.min;
- range.max = d.max;
- return range;
- } else {
- throw new Error('Not a range');
- }
- };
-
- Range.fromExplicitRange = function(min, max) {
- var range = new Range();
- range.min = min;
- range.max = max;
- return range;
- };
-
- Range.compareByMinTimes = function(a, b) {
- if (!a.isEmpty && !b.isEmpty)
- return a.min_ - b.min_;
-
- if (a.isEmpty && !b.isEmpty)
- return -1;
-
- if (!a.isEmpty && b.isEmpty)
- return 1;
-
- return 0;
- };
-
- Range.PERCENT_RANGE = Range.fromExplicitRange(0, 1);
- Object.freeze(Range.PERCENT_RANGE);
-
- return {
- Range: Range
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/range_test.html b/chromium/third_party/catapult/tracing/tracing/base/range_test.html
deleted file mode 100644
index e404f732c8c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/range_test.html
+++ /dev/null
@@ -1,465 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Range = tr.b.Range;
-
- test('addValue', function() {
- var range = new Range();
- assert.isTrue(range.isEmpty);
- range.addValue(1);
- assert.isFalse(range.isEmpty);
- assert.equal(1, range.min);
- assert.equal(1, range.max);
-
- range.addValue(2);
- assert.isFalse(range.isEmpty);
- assert.equal(1, range.min);
- assert.equal(2, range.max);
- });
-
- test('addNonEmptyRange', function() {
- var r1 = new Range();
- r1.addValue(1);
- r1.addValue(2);
-
- var r = new Range();
- r.addRange(r1);
- assert.equal(1, r.min);
- assert.equal(2, r.max);
-
- var r2 = Range.fromDict(r.toJSON());
- assert.equal(r2.isEmpty, r.isEmpty);
- assert.equal(r2.max, r.max);
- assert.equal(r2.min, r.min);
- });
-
- test('addEmptyRange', function() {
- var r1 = new Range();
-
- var r = new Range();
- r.addRange(r1);
- assert.isTrue(r.isEmpty);
- assert.isUndefined(r.min);
- assert.isUndefined(r.max);
-
- var r2 = Range.fromDict(r.toJSON());
- assert.equal(r2.isEmpty, r.isEmpty);
- assert.isUndefined(r2.max);
- assert.isUndefined(r2.min);
- });
-
- test('addRangeToRange', function() {
- var r1 = new Range();
- r1.addValue(1);
- r1.addValue(2);
-
- var r = new Range();
- r.addValue(3);
- r.addRange(r1);
-
- assert.isFalse(r.isEmpty);
- assert.equal(1, r.min);
- assert.equal(3, r.max);
- });
-
- test('containsRange', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(1, 2);
-
- assert.isTrue(r1.containsRangeInclusive(r2));
- assert.isFalse(r2.containsRangeInclusive(r1));
- assert.isTrue(r1.containsRangeExclusive(r2));
- assert.isFalse(r2.containsRangeExclusive(r1));
- });
-
- test('containsRange_emptyRange', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = new Range();
-
- assert.isFalse(r1.containsRangeInclusive(r2));
- assert.isFalse(r2.containsRangeInclusive(r1));
- assert.isFalse(r1.containsRangeExclusive(r2));
- assert.isFalse(r2.containsRangeExclusive(r1));
- });
-
- test('containsRange_overlapping', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(2, 4);
-
- assert.isFalse(r1.containsRangeInclusive(r2));
- assert.isFalse(r2.containsRangeInclusive(r1));
- assert.isFalse(r1.containsRangeExclusive(r2));
- assert.isFalse(r2.containsRangeExclusive(r1));
- });
-
- test('containsRange_disjoint', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(3, 5);
-
- assert.isFalse(r1.containsRangeInclusive(r2));
- assert.isFalse(r2.containsRangeInclusive(r1));
- assert.isFalse(r1.containsRangeExclusive(r2));
- assert.isFalse(r2.containsRangeExclusive(r1));
- });
-
- test('containsRange_singlePointRange', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(1, 1);
-
- assert.isTrue(r1.containsRangeInclusive(r2));
- assert.isFalse(r2.containsRangeInclusive(r1));
- assert.isTrue(r1.containsRangeExclusive(r2));
- assert.isFalse(r2.containsRangeExclusive(r1));
- });
-
- test('containsRange_singlePointRangeAtBorder', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(2, 2);
-
- assert.isTrue(r1.containsRangeInclusive(r2));
- assert.isFalse(r2.containsRangeInclusive(r1));
- assert.isFalse(r1.containsRangeExclusive(r2));
- assert.isFalse(r2.containsRangeExclusive(r1));
- });
-
- test('containsExplicitRange', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(1, 2);
-
- assert.isTrue(r1.containsExplicitRangeInclusive(1, 2));
- assert.isFalse(r2.containsExplicitRangeInclusive(0, 3));
- assert.isTrue(r1.containsExplicitRangeExclusive(1, 2));
- assert.isFalse(r2.containsExplicitRangeExclusive(0, 3));
- });
-
- test('containsExplicitRange_overlapping', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(2, 4);
-
- assert.isFalse(r1.containsExplicitRangeInclusive(2, 4));
- assert.isFalse(r2.containsExplicitRangeInclusive(0, 3));
- assert.isFalse(r1.containsExplicitRangeExclusive(2, 4));
- assert.isFalse(r2.containsExplicitRangeExclusive(0, 3));
- });
-
- test('containsExplicitRange_disjoint', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(3, 5);
-
- assert.isFalse(r1.containsExplicitRangeInclusive(3, 5));
- assert.isFalse(r2.containsExplicitRangeInclusive(0, 2));
- assert.isFalse(r1.containsExplicitRangeExclusive(3, 5));
- assert.isFalse(r2.containsExplicitRangeExclusive(0, 2));
- });
-
- test('containsExplicitRange_singlePointRange', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(1, 1);
-
- assert.isTrue(r1.containsExplicitRangeInclusive(1, 1));
- assert.isFalse(r2.containsExplicitRangeInclusive(0, 2));
- assert.isTrue(r1.containsExplicitRangeExclusive(1, 1));
- assert.isFalse(r2.containsExplicitRangeExclusive(0, 2));
- });
-
- test('containsExplicitRange_singlePointRangeAtBorder', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(2, 2);
-
- assert.isTrue(r1.containsExplicitRangeInclusive(2, 2));
- assert.isFalse(r2.containsExplicitRangeInclusive(0, 2));
- assert.isFalse(r1.containsExplicitRangeExclusive(2, 2));
- assert.isFalse(r2.containsExplicitRangeExclusive(0, 2));
- });
-
- test('intersectsRange', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(1, 2);
-
- assert.isTrue(r1.intersectsRangeInclusive(r2));
- assert.isTrue(r2.intersectsRangeInclusive(r1));
- assert.isTrue(r1.intersectsRangeExclusive(r2));
- assert.isTrue(r2.intersectsRangeExclusive(r1));
- });
-
- test('intersectsRange_emptyRange', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = new Range();
-
- assert.isFalse(r1.intersectsRangeInclusive(r2));
- assert.isFalse(r2.intersectsRangeInclusive(r1));
- assert.isFalse(r1.intersectsRangeExclusive(r2));
- assert.isFalse(r2.intersectsRangeExclusive(r1));
- });
-
- test('intersectsRange_overlapping', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(2, 4);
-
- assert.isTrue(r1.intersectsRangeInclusive(r2));
- assert.isTrue(r2.intersectsRangeInclusive(r1));
- assert.isTrue(r1.intersectsRangeExclusive(r2));
- assert.isTrue(r2.intersectsRangeExclusive(r1));
- });
-
- test('intersectsRange_disjoint', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(3, 5);
-
- assert.isFalse(r1.intersectsRangeInclusive(r2));
- assert.isFalse(r2.intersectsRangeInclusive(r1));
- assert.isFalse(r1.intersectsRangeExclusive(r2));
- assert.isFalse(r2.intersectsRangeExclusive(r1));
- });
-
- test('intersectsRange_singlePointRange', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(1, 1);
-
- assert.isTrue(r1.intersectsRangeInclusive(r2));
- assert.isTrue(r2.intersectsRangeInclusive(r1));
- assert.isTrue(r1.intersectsRangeExclusive(r2));
- assert.isTrue(r2.intersectsRangeExclusive(r1));
- });
-
- test('intersectsRange_singlePointRangeAtBorder', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(2, 2);
-
- assert.isTrue(r1.intersectsRangeInclusive(r2));
- assert.isTrue(r2.intersectsRangeInclusive(r1));
- assert.isFalse(r1.intersectsRangeExclusive(r2));
- assert.isFalse(r2.intersectsRangeExclusive(r1));
- });
-
- test('intersectsExplicitRange', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(1, 2);
-
- assert.isTrue(r1.intersectsExplicitRangeInclusive(1, 2));
- assert.isTrue(r2.intersectsExplicitRangeInclusive(0, 3));
- assert.isTrue(r1.intersectsExplicitRangeExclusive(1, 2));
- assert.isTrue(r2.intersectsExplicitRangeExclusive(0, 3));
- });
-
- test('intersectsExplicitRange_overlapping', function() {
- var r1 = Range.fromExplicitRange(0, 3);
- var r2 = Range.fromExplicitRange(2, 4);
-
- assert.isTrue(r1.intersectsExplicitRangeInclusive(2, 4));
- assert.isTrue(r2.intersectsExplicitRangeInclusive(0, 3));
- assert.isTrue(r1.intersectsExplicitRangeExclusive(2, 4));
- assert.isTrue(r2.intersectsExplicitRangeExclusive(0, 3));
- });
-
- test('intersectsExplicitRange_disjoint', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(3, 5);
-
- assert.isFalse(r1.intersectsExplicitRangeInclusive(3, 5));
- assert.isFalse(r2.intersectsExplicitRangeInclusive(0, 2));
- assert.isFalse(r1.intersectsExplicitRangeExclusive(3, 5));
- assert.isFalse(r2.intersectsExplicitRangeExclusive(0, 2));
- });
-
- test('intersectsExplicitRange_singlePointRange', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(1, 1);
-
- assert.isTrue(r1.intersectsExplicitRangeInclusive(1, 1));
- assert.isTrue(r2.intersectsExplicitRangeInclusive(0, 2));
- assert.isTrue(r1.intersectsExplicitRangeExclusive(1, 1));
- assert.isTrue(r2.intersectsExplicitRangeExclusive(0, 2));
- });
-
- test('intersectsExplicitRange_singlePointRangeAtBorder', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(2, 2);
-
- assert.isTrue(r1.intersectsExplicitRangeInclusive(2, 2));
- assert.isTrue(r2.intersectsExplicitRangeInclusive(0, 2));
- assert.isFalse(r1.intersectsExplicitRangeExclusive(2, 2));
- assert.isFalse(r2.intersectsExplicitRangeExclusive(0, 2));
- });
-
- test('duration', function() {
- assert.equal(Range.fromExplicitRange(2, 4).duration, 2);
- });
-
- test('duration_singlePointRange', function() {
- assert.equal(Range.fromExplicitRange(2, 2).duration, 0);
- });
-
- test('duration_emptyRange', function() {
- assert.equal(new Range().duration, 0);
- });
-
- test('findIntersection_overlapping', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(1, 3);
-
- var result = Range.fromExplicitRange(1, 2);
- assert.deepEqual(r1.findIntersection(r2), result);
- assert.deepEqual(r2.findIntersection(r1), result);
- });
-
- test('findIntersection_bordering', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(2, 4);
-
- var result = Range.fromExplicitRange(2, 2);
- assert.deepEqual(r1.findIntersection(r2), result);
- assert.deepEqual(r2.findIntersection(r1), result);
- });
-
- test('findIntersection_singlePointRange', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(2, 2);
-
- var result = Range.fromExplicitRange(2, 2);
- assert.deepEqual(r1.findIntersection(r2), result);
- assert.deepEqual(r2.findIntersection(r1), result);
- });
-
- test('findIntersection_disjoint', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = Range.fromExplicitRange(3, 5);
-
- assert.isTrue(r1.findIntersection(r2).isEmpty);
- assert.isTrue(r2.findIntersection(r1).isEmpty);
- });
-
- test('findIntersection_emptyRange', function() {
- var r1 = Range.fromExplicitRange(0, 2);
- var r2 = new Range();
-
- assert.isTrue(r1.findIntersection(r2).isEmpty);
- assert.isTrue(r2.findIntersection(r1).isEmpty);
- });
-
- test('findExplicitIntersectionDuration_overlapping', function() {
- var r = Range.fromExplicitRange(2, 4);
- assert.equal(1, r.findExplicitIntersectionDuration(1, 3));
- assert.equal(1, r.findExplicitIntersectionDuration(3, 5));
- assert.equal(2, r.findExplicitIntersectionDuration(0, 5));
- });
-
- test('findExplicitIntersectionDuration_invalidOtherRange', function() {
- var r = Range.fromExplicitRange(2, 4);
- assert.equal(0, r.findExplicitIntersectionDuration(3, 1));
- assert.equal(0, r.findExplicitIntersectionDuration(5, 3));
- });
-
- test('findExplicitIntersectionDuration_disjoint', function() {
- var r = Range.fromExplicitRange(2, 4);
- assert.equal(0, r.findExplicitIntersectionDuration(0, 1));
- assert.equal(0, r.findExplicitIntersectionDuration(4.5, 5));
- });
-
- test('filter_numericField', function() {
- var r = Range.fromExplicitRange(2, 3);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([{start: 2}, {start: 3}], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('filter_noNumericField', function() {
- var r = Range.fromExplicitRange(2, 3);
- assert.deepEqual([2, 3], r.filterArray([1, 2, 3, 4]));
- });
-
- test('filter_empty', function() {
- var r = new Range();
- assert.deepEqual([], r.filterArray([1, 2, 3, 4]));
- });
-
- test('filter_oneSided', function() {
- var r = new Range();
- r.min = 2;
- assert.deepEqual([2, 3, 4], r.filterArray([1, 2, 3, 4]));
- });
-
- test('left_boundary_corner_case1', function() {
- var r = Range.fromExplicitRange(1, 2);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([{start: 1}, {start: 2}], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('left_boundary_corner_case2', function() {
- var r = Range.fromExplicitRange(0, 2);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([{start: 1}, {start: 2}], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('left_boundary_corner_case3', function() {
- var r = Range.fromExplicitRange(1, 1);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([{start: 1}], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('left_boundary_corner_case4', function() {
- var r = Range.fromExplicitRange(0, 0);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('right_boundary_corner_case1', function() {
- var r = Range.fromExplicitRange(4, 5);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([{start: 4}], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('right_boundary_corner_case2', function() {
- var r = Range.fromExplicitRange(4, 4);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([{start: 4}], r.filterArray(
- array, function(value) {return value.start;}));
- });
-
- test('right_boundary_corner_case3', function() {
- var r = Range.fromExplicitRange(5, 5);
- var array = [{start: 1},
- {start: 2},
- {start: 3},
- {start: 4}];
- assert.deepEqual([], r.filterArray(
- array, function(value) {return value.start;}));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/range_utils.html b/chromium/third_party/catapult/tracing/tracing/base/range_utils.html
deleted file mode 100644
index 73dc67ae2d5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/range_utils.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides event merging functionality for grouping/analysis.
- */
-tr.exportTo('tr.b', function() {
- function convertEventsToRanges(events) {
- return events.map(function(event) {
- return tr.b.Range.fromExplicitRange(event.start, event.end);
- });
- }
-
- function mergeRanges(inRanges, mergeThreshold, mergeFunction) {
- var remainingEvents = inRanges.slice();
- remainingEvents.sort(function(x, y) {
- return x.min - y.min;
- });
-
- if (remainingEvents.length <= 1) {
- var merged = [];
- if (remainingEvents.length === 1) {
- merged.push(mergeFunction(remainingEvents));
- }
- return merged;
- }
-
- var mergedEvents = [];
-
- var currentMergeBuffer = [];
- var rightEdge;
- function beginMerging() {
- currentMergeBuffer.push(remainingEvents[0]);
- remainingEvents.splice(0, 1);
- rightEdge = currentMergeBuffer[0].max;
- }
-
- function flushCurrentMergeBuffer() {
- if (currentMergeBuffer.length === 0)
- return;
-
- mergedEvents.push(mergeFunction(currentMergeBuffer));
- currentMergeBuffer = [];
-
- // Refill merge buffer if needed.
- if (remainingEvents.length !== 0)
- beginMerging();
- }
-
- beginMerging();
-
- while (remainingEvents.length) {
- var currentEvent = remainingEvents[0];
-
- var distanceFromRightEdge = currentEvent.min - rightEdge;
- if (distanceFromRightEdge < mergeThreshold) {
- rightEdge = Math.max(rightEdge, currentEvent.max);
- remainingEvents.splice(0, 1);
- currentMergeBuffer.push(currentEvent);
- continue;
- }
-
- // Too big a gap.
- flushCurrentMergeBuffer();
- }
- flushCurrentMergeBuffer();
-
- return mergedEvents;
- }
-
- // Pass in |opt_totalRange| in order to find empty ranges before the first of
- // |inRanges| and after the last of |inRanges|.
- function findEmptyRangesBetweenRanges(inRanges, opt_totalRange) {
- if (opt_totalRange && opt_totalRange.isEmpty)
- opt_totalRange = undefined;
-
- var emptyRanges = [];
- if (!inRanges.length) {
- if (opt_totalRange)
- emptyRanges.push(opt_totalRange);
- return emptyRanges;
- }
-
- inRanges = inRanges.slice();
- inRanges.sort(function(x, y) {
- return x.min - y.min;
- });
- if (opt_totalRange &&
- (opt_totalRange.min < inRanges[0].min)) {
- emptyRanges.push(tr.b.Range.fromExplicitRange(
- opt_totalRange.min, inRanges[0].min));
- }
-
- inRanges.forEach(function(range, index) {
- for (var otherIndex = 0; otherIndex < inRanges.length; ++otherIndex) {
- if (index === otherIndex)
- continue;
- var other = inRanges[otherIndex];
-
- if (other.min > range.max) {
- // |inRanges| is sorted, so |other| is the first range after |range|,
- // and there is an empty range between them.
- emptyRanges.push(tr.b.Range.fromExplicitRange(
- range.max, other.min));
- return;
- }
- // Otherwise, |other| starts before |range| ends, so |other| might
- // possibly contain the end of |range|.
-
- if (other.max > range.max) {
- // |other| does contain the end of |range|, so no empty range starts
- // at the end of this |range|.
- return;
- }
- }
- if (opt_totalRange && (range.max < opt_totalRange.max)) {
- emptyRanges.push(tr.b.Range.fromExplicitRange(
- range.max, opt_totalRange.max));
- }
- });
- return emptyRanges;
- }
-
- return {
- convertEventsToRanges: convertEventsToRanges,
- findEmptyRangesBetweenRanges: findEmptyRangesBetweenRanges,
- mergeRanges: mergeRanges
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/range_utils_test.html b/chromium/third_party/catapult/tracing/tracing/base/range_utils_test.html
deleted file mode 100644
index 13cae71f37d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/range_utils_test.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function simpleMerger(events) {
- return {
- min: events[0].min,
- max: events[events.length - 1].max
- };
- }
- test('simple', function() {
- var inEvents = [
- {min: 0, max: 100},
- {min: 100, max: 120},
- {min: 200, max: 220}
- ];
-
- var merged = tr.b.mergeRanges(inEvents, 50, simpleMerger);
-
- assert.equal(merged.length, 2);
- assert.deepEqual(merged[0], {min: 0, max: 120});
- assert.deepEqual(merged[1], {min: 200, max: 220});
- });
-
- test('overlapping', function() {
- var inEvents = [
- {min: 0, max: 100},
- {min: 80, max: 120},
- {min: 200, max: 220}
- ];
-
- var merged = tr.b.mergeRanges(inEvents, 50, simpleMerger);
-
- assert.equal(merged.length, 2);
- assert.deepEqual(merged[0], {min: 0, max: 120});
- assert.deepEqual(merged[1], {min: 200, max: 220});
- });
-
- test('middleOneIsSmall', function() {
- var inEvents = [
- {min: 0, max: 100},
- {min: 40, max: 50},
- {min: 100, max: 120}
- ];
-
- var merged = tr.b.mergeRanges(inEvents, 50, simpleMerger);
-
- assert.equal(merged.length, 1);
- assert.deepEqual(merged[0], {min: 0, max: 120});
- });
-
- test('firstEventIsSplitPoint', function() {
- var inEvents = [
- {min: 0, max: 100},
- {min: 150, max: 200}
- ];
-
- var merged = tr.b.mergeRanges(inEvents, 25, simpleMerger);
-
- assert.equal(merged.length, 2);
- assert.deepEqual(merged[0], {min: 0, max: 100});
- assert.deepEqual(merged[1], {min: 150, max: 200});
- });
-
- test('mergeSingleEvent', function() {
- var inEvents = [
- {min: 0, max: 100}
- ];
-
- var mergeCount = 0;
- tr.b.mergeRanges(inEvents, 25, function(events) {
- assert.deepEqual(events, inEvents);
- mergeCount++;
- });
- assert.equal(mergeCount, 1);
- });
-
- test('zeroDurationSplit', function() {
- var inEvents = [0, 10, 20, 50, 60];
- inEvents = inEvents.map(function(event) {
- return tr.b.Range.fromExplicitRange(event, event);
- });
- var timestampMerger = function(timestamps) {
- return {
- min: timestamps[0].min,
- max: timestamps[timestamps.length - 1].max
- };
- };
- var merged = tr.b.mergeRanges(inEvents, 15, timestampMerger);
- assert.equal(merged.length, 2);
- assert.deepEqual(merged[0], {min: 0, max: 20});
- assert.deepEqual(merged[1], {min: 50, max: 60});
- });
-
- test('findEmptyRangesBetweenRanges', function() {
- var events = [
- {min: 2, max: 4},
- {min: 1, max: 3},
- {min: 6, max: 8}
- ];
- var ranges = tr.b.findEmptyRangesBetweenRanges(
- events, {min: 0, max: 10});
- assert.equal(3, ranges.length);
- assert.equal(0, ranges[0].min);
- assert.equal(1, ranges[0].max);
- assert.equal(4, ranges[1].min);
- assert.equal(6, ranges[1].max);
- assert.equal(8, ranges[2].min);
- assert.equal(10, ranges[2].max);
- });
-
- test('findEmptyRangesWithEmptyInput', function() {
- var ranges = tr.b.findEmptyRangesBetweenRanges(
- [], {min: 0, max: 10});
- assert.equal(1, ranges.length);
- assert.equal(0, ranges[0].min);
- assert.equal(10, ranges[0].max);
-
- ranges = tr.b.findEmptyRangesBetweenRanges([]);
- assert.equal(0, ranges.length);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/rect.html b/chromium/third_party/catapult/tracing/tracing/base/rect.html
deleted file mode 100644
index 3245a82f40c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/rect.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/math.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
-
- /**
- * Tracks a 2D bounding box.
- * @constructor
- */
- function Rect() {
- this.x = 0;
- this.y = 0;
- this.width = 0;
- this.height = 0;
- }
- Rect.fromXYWH = function(x, y, w, h) {
- var rect = new Rect();
- rect.x = x;
- rect.y = y;
- rect.width = w;
- rect.height = h;
- return rect;
- }
- Rect.fromArray = function(ary) {
- if (ary.length !== 4)
- throw new Error('ary.length must be 4');
- var rect = new Rect();
- rect.x = ary[0];
- rect.y = ary[1];
- rect.width = ary[2];
- rect.height = ary[3];
- return rect;
- }
-
- Rect.prototype = {
- __proto__: Object.prototype,
-
- get left() {
- return this.x;
- },
-
- get top() {
- return this.y;
- },
-
- get right() {
- return this.x + this.width;
- },
-
- get bottom() {
- return this.y + this.height;
- },
-
- toString: function() {
- return 'Rect(' + this.x + ', ' + this.y + ', ' +
- this.width + ', ' + this.height + ')';
- },
-
- toArray: function() {
- return [this.x, this.y, this.width, this.height];
- },
-
- clone: function() {
- var rect = new Rect();
- rect.x = this.x;
- rect.y = this.y;
- rect.width = this.width;
- rect.height = this.height;
- return rect;
- },
-
- enlarge: function(pad) {
- var rect = new Rect();
- this.enlargeFast(rect, pad);
- return rect;
- },
-
- enlargeFast: function(out, pad) {
- out.x = this.x - pad;
- out.y = this.y - pad;
- out.width = this.width + 2 * pad;
- out.height = this.height + 2 * pad;
- return out;
- },
-
- size: function() {
- return {width: this.width, height: this.height};
- },
-
- scale: function(s) {
- var rect = new Rect();
- this.scaleFast(rect, s);
- return rect;
- },
-
- scaleSize: function(s) {
- return Rect.fromXYWH(this.x, this.y, this.width * s, this.height * s);
- },
-
- scaleFast: function(out, s) {
- out.x = this.x * s;
- out.y = this.y * s;
- out.width = this.width * s;
- out.height = this.height * s;
- return out;
- },
-
- translate: function(v) {
- var rect = new Rect();
- this.translateFast(rect, v);
- return rect;
- },
-
- translateFast: function(out, v) {
- out.x = this.x + v[0];
- out.y = this.x + v[1];
- out.width = this.width;
- out.height = this.height;
- return out;
- },
-
- asUVRectInside: function(containingRect) {
- var rect = new Rect();
- rect.x = (this.x - containingRect.x) / containingRect.width;
- rect.y = (this.y - containingRect.y) / containingRect.height;
- rect.width = this.width / containingRect.width;
- rect.height = this.height / containingRect.height;
- return rect;
- },
-
- intersects: function(that) {
- var ok = true;
- ok &= this.x < that.right;
- ok &= this.right > that.x;
- ok &= this.y < that.bottom;
- ok &= this.bottom > that.y;
- return ok;
- },
-
- equalTo: function(rect) {
- return rect &&
- (this.x === rect.x) &&
- (this.y === rect.y) &&
- (this.width === rect.width) &&
- (this.height === rect.height);
- }
- };
-
- return {
- Rect: Rect
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/rect_test.html b/chromium/third_party/catapult/tracing/tracing/base/rect_test.html
deleted file mode 100644
index dc976c36614..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/rect_test.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/rect.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('UVRectBasic', function() {
- function assertRectEquals(a, b, opt_message) {
- var ok = true;
- if (a.x === b.x && a.y === b.y &&
- a.width === b.width && a.height === b.height) {
- return;
- }
- var message = opt_message || 'Expected "' + a.toString() +
- '", got "' + b.toString() + '"';
- throw new tr.b.unittest.TestError(message);
- }
- var container = tr.b.Rect.fromXYWH(0, 0, 10, 10);
- var inner = tr.b.Rect.fromXYWH(1, 1, 8, 8);
- var uv = inner.asUVRectInside(container);
- assertRectEquals(uv, tr.b.Rect.fromXYWH(0.1, 0.1, .8, .8));
- assert.equal(10, container.size().width);
- assert.equal(10, container.size().height);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/running_statistics.html b/chromium/third_party/catapult/tracing/tracing/base/running_statistics.html
deleted file mode 100644
index 292d595353a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/running_statistics.html
+++ /dev/null
@@ -1,180 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- /***
- * An object of this class computes basic statistics online in O(1).
- * Usage:
- * 1. Create an instance.
- * 2. Add numbers using the |add| method.
- * 3. Query statistics.
- * 4. Repeat from step 2.
- */
- class RunningStatistics {
- constructor() {
- this.mean_ = 0;
- this.count_ = 0;
- this.max_ = -Infinity;
- this.min_ = Infinity;
- this.sum_ = 0;
- this.variance_ = 0;
-
- // Mean of logarithms of absolute values of samples, or undefined if any
- // samples were <= 0.
- this.meanlogs_ = 0;
- }
-
- get count() {
- return this.count_;
- }
-
- get geometricMean() {
- if (this.meanlogs_ === undefined)
- return 0;
- return Math.exp(this.meanlogs_);
- }
-
- get mean() {
- if (this.count_ === 0)
- return undefined;
- return this.mean_;
- }
-
- get max() {
- return this.max_;
- }
-
- get min() {
- return this.min_;
- }
-
- get sum() {
- return this.sum_;
- }
-
- get variance() {
- if (this.count_ === 0)
- return undefined;
- if (this.count_ === 1)
- return 0;
- return this.variance_ / (this.count_ - 1);
- }
-
- get stddev() {
- if (this.count_ === 0)
- return undefined;
- return Math.sqrt(this.variance);
- }
-
- add(x) {
- this.count_++;
- this.max_ = Math.max(this.max_, x);
- this.min_ = Math.min(this.min_, x);
- this.sum_ += x;
-
- // The geometric mean is computed using the arithmetic mean of logarithms.
- if (x <= 0)
- this.meanlogs_ = undefined;
- else if (this.meanlogs_ !== undefined)
- this.meanlogs_ += (Math.log(Math.abs(x)) - this.meanlogs_) / this.count;
-
- // The following uses Welford's algorithm for computing running mean
- // and variance. See http://www.johndcook.com/blog/standard_deviation.
- if (this.count_ === 1) {
- this.mean_ = x;
- this.variance_ = 0;
- } else {
- var oldMean = this.mean_;
- var oldVariance = this.variance_;
- // Using the 2nd formula for updating the mean yields better precision
- // but it doesn't work for the case oldMean is Infinity. Hence we handle
- // that case separately.
- if (oldMean === Infinity || oldMean === -Infinity) {
- this.mean_ = this.sum_ / this.count_;
- } else {
- this.mean_ = oldMean + (x - oldMean) / this.count_;
- }
- this.variance_ = oldVariance + (x - oldMean) * (x - this.mean_);
- }
- }
-
- merge(other) {
- var result = new RunningStatistics();
- result.count_ = this.count_ + other.count_;
- result.sum_ = this.sum_ + other.sum_;
- result.min_ = Math.min(this.min_, other.min_);
- result.max_ = Math.max(this.max_, other.max_);
- if (result.count === 0) {
- result.mean_ = 0;
- result.variance_ = 0;
- result.meanlogs_ = 0;
- } else {
- // Combine the mean and the variance using the formulas from
- // https://goo.gl/ddcAep.
- result.mean_ = result.sum / result.count;
- var deltaMean = (this.mean || 0) - (other.mean || 0);
- result.variance_ = this.variance_ + other.variance_ +
- (this.count * other.count * deltaMean * deltaMean / result.count);
-
- // Merge the arithmetic means of logarithms of absolute values of
- // samples, weighted by counts.
- if (this.meanlogs_ === undefined || other.meanlogs_ === undefined) {
- result.meanlogs_ = undefined;
- } else {
- result.meanlogs_ = (this.count * this.meanlogs_ +
- other.count * other.meanlogs_) / result.count;
- }
- }
- return result;
- }
-
- asDict() {
- if (!this.count) {
- return [];
- }
- // It's more efficient to serialize these fields in an array. If you
- // add any other fields, you should re-evaluate whether it would be more
- // efficient to serialize as a dict.
- return [
- this.count_,
- this.max_,
- this.meanlogs_,
- this.mean_,
- this.min_,
- this.sum_,
- this.variance_,
- ];
- }
-
- static fromDict(dict) {
- var result = new RunningStatistics();
- if (dict.length !== 7) {
- return result;
- }
- [
- result.count_,
- result.max_,
- result.meanlogs_,
- result.mean_,
- result.min_,
- result.sum_,
- result.variance_,
- ] = dict;
- return result;
- }
- }
-
- return {
- RunningStatistics: RunningStatistics
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/running_statistics_test.html b/chromium/third_party/catapult/tracing/tracing/base/running_statistics_test.html
deleted file mode 100644
index ab27bafc089..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/running_statistics_test.html
+++ /dev/null
@@ -1,195 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/running_statistics.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var RunningStatistics = tr.b.RunningStatistics;
- var Statistics = tr.b.Statistics;
-
- function run(data) {
- var running = new RunningStatistics();
- data.forEach(x => running.add(x));
- return running;
- }
-
- test('sum', function() {
- var data;
- data = [];
- assert.closeTo(Statistics.sum(data), run(data).sum, 1e-6);
- data = [1];
- assert.closeTo(Statistics.sum(data), run(data).sum, 1e-6);
- data = [1, 2, 3];
- assert.closeTo(Statistics.sum(data), run(data).sum, 1e-6);
- data = [2, 4, 4, 2];
- assert.closeTo(Statistics.sum(data), run(data).sum, 1e-6);
- data = [Infinity, Infinity, Infinity, 4, 4, Infinity, 1];
- assert.equal(Statistics.sum(data), run(data).sum, Infinity);
- data = [-Infinity, -Infinity, 2, -Infinity, 5, -Infinity];
- assert.equal(Statistics.sum(data), run(data).sum, -Infinity);
- });
-
- test('min', function() {
- var data;
- data = [];
- assert.equal(Statistics.min(data), run(data).min);
- data = [1];
- assert.equal(Statistics.min(data), run(data).min);
- data = [1, 2, 3];
- assert.equal(Statistics.min(data), run(data).min);
- data = [2, 4, 4, 2];
- assert.equal(Statistics.min(data), run(data).min);
- });
-
- test('max', function() {
- var data;
- data = [];
- assert.equal(Statistics.max(data), run(data).max);
- data = [1];
- assert.equal(Statistics.max(data), run(data).max);
- data = [1, 2, 3];
- assert.equal(Statistics.max(data), run(data).max);
- data = [2, 4, 4, 2];
- assert.equal(Statistics.max(data), run(data).max);
- });
-
- test('mean', function() {
- var data;
- data = [];
- assert.equal(Statistics.mean(data), run(data).mean);
- data = [1];
- assert.equal(Statistics.mean(data), run(data).mean);
- data = [1, 2, 3];
- assert.closeTo(Statistics.mean(data), run(data).mean, 1e-6);
- data = [2, 4, 4, 2];
- assert.closeTo(Statistics.mean(data), run(data).mean, 1e-6);
- data = [Infinity, Infinity, Infinity, 4, 4, Infinity, 1];
- assert.equal(Statistics.mean(data), run(data).mean, Infinity);
- data = [-Infinity, -Infinity, 2, -Infinity, 5, -Infinity];
- assert.equal(Statistics.mean(data), run(data).mean, -Infinity);
- });
-
- test('geometricMean', function() {
- var data;
- data = [];
- assert.equal(Statistics.geometricMean(data), run(data).geometricMean);
- data = [-1];
- assert.equal(Statistics.geometricMean(data), run(data).geometricMean);
- data = [1];
- assert.equal(Statistics.geometricMean(data), run(data).geometricMean);
- data = [1, 2, 3];
- assert.closeTo(Statistics.geometricMean(data),
- run(data).geometricMean, 1e-6);
- data = [2, 4, 4, 2];
- assert.closeTo(Statistics.geometricMean(data),
- run(data).geometricMean, 1e-6);
- });
-
- test('variance', function() {
- var data;
- data = [];
- assert.equal(Statistics.variance(data), run(data).variance);
- data = [1];
- assert.equal(Statistics.variance(data), run(data).variance);
- data = [1, 2, 3];
- assert.closeTo(Statistics.variance(data), run(data).variance, 1e-6);
- data = [2, 4, 4, 2];
- assert.closeTo(Statistics.variance(data), run(data).variance, 1e-6);
- });
-
- test('stddev', function() {
- var data;
- data = [];
- assert.equal(Statistics.stddev(data), run(data).stddev);
- data = [1];
- assert.equal(Statistics.stddev(data), run(data).stddev);
- data = [1, 2, 3];
- assert.closeTo(Statistics.stddev(data), run(data).stddev, 1e-6);
- data = [2, 4, 4, 2];
- assert.closeTo(Statistics.stddev(data), run(data).stddev, 1e-6);
- });
-
- test('merge', function() {
- var data1, data2, data, stats;
-
- data1 = [];
- data2 = [];
- data = data1.concat(data2);
- stats = run(data1).merge(run(data2));
- assert.equal(Statistics.sum(data), stats.sum);
- assert.equal(Statistics.min(data), stats.min);
- assert.equal(Statistics.max(data), stats.max);
- assert.equal(Statistics.mean(data), stats.mean);
- assert.equal(Statistics.variance(data), stats.variance);
- assert.equal(Statistics.stddev(data), stats.stddev);
- assert.equal(Statistics.geometricMean(data), stats.geometricMean);
-
- data1 = [];
- data2 = [1, 2, 3];
- data = data1.concat(data2);
- stats = run(data1).merge(run(data2));
- assert.equal(Statistics.sum(data), stats.sum);
- assert.equal(Statistics.min(data), stats.min);
- assert.equal(Statistics.max(data), stats.max);
- assert.equal(Statistics.mean(data), stats.mean);
- assert.closeTo(Statistics.variance(data), stats.variance, 1e-6);
- assert.closeTo(Statistics.stddev(data), stats.stddev, 1e-6);
- assert.closeTo(Statistics.geometricMean(data), stats.geometricMean, 1e-6);
-
- data1 = [1, 2, 3];
- data2 = [];
- data = data1.concat(data2);
- stats = run(data1).merge(run(data2));
- assert.equal(Statistics.sum(data), stats.sum);
- assert.equal(Statistics.min(data), stats.min);
- assert.equal(Statistics.max(data), stats.max);
- assert.equal(Statistics.mean(data), stats.mean);
- assert.closeTo(Statistics.variance(data), stats.variance, 1e-6);
- assert.closeTo(Statistics.stddev(data), stats.stddev, 1e-6);
- assert.closeTo(Statistics.geometricMean(data), stats.geometricMean, 1e-6);
-
- data1 = [1, 2, 3];
- data2 = [10, 20, 100];
- data = data1.concat(data2);
- stats = run(data1).merge(run(data2));
- assert.equal(Statistics.sum(data), stats.sum);
- assert.equal(Statistics.min(data), stats.min);
- assert.equal(Statistics.max(data), stats.max);
- assert.equal(Statistics.mean(data), stats.mean);
- assert.closeTo(Statistics.variance(data), stats.variance, 1e-6);
- assert.closeTo(Statistics.stddev(data), stats.stddev, 1e-6);
- assert.closeTo(Statistics.geometricMean(data), stats.geometricMean, 1e-6);
-
- data1 = [1, 1, 1, 1, 1];
- data2 = [10, 20, 10, 40];
- data = data1.concat(data2);
- stats = run(data1).merge(run(data2));
- assert.equal(Statistics.sum(data), stats.sum);
- assert.equal(Statistics.min(data), stats.min);
- assert.equal(Statistics.max(data), stats.max);
- assert.equal(Statistics.mean(data), stats.mean);
- assert.closeTo(Statistics.variance(data), stats.variance, 1e-6);
- assert.closeTo(Statistics.stddev(data), stats.stddev, 1e-6);
- assert.closeTo(Statistics.geometricMean(data), stats.geometricMean, 1e-6);
- });
-
- test('serialization', function() {
- var data = [1, 2, 3];
- var dict = run(data).asDict();
- var cloneDict = RunningStatistics.fromDict(dict).asDict();
- for (var field = 0; field < dict.length; ++field) {
- assert.closeTo(dict[field], cloneDict[field], 1e-6);
- }
-
- // You can change this number, but when you do, please explain in your CL
- // description why it changed.
- assert.strictEqual(32, JSON.stringify(dict).length);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/settings.html b/chromium/third_party/catapult/tracing/tracing/base/settings.html
deleted file mode 100644
index 9cef5eb9179..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/settings.html
+++ /dev/null
@@ -1,204 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Settings object.
- */
-tr.exportTo('tr.b', function() {
- /**
- * Settings is a simple wrapper around local storage, to make it easier
- * to test classes that have settings.
- *
- * May be called as new tr.b.Settings() or simply tr.b.Settings()
- * @constructor
- */
- function Settings() {
- return Settings;
- }
-
- if (tr.b.unittest && tr.b.unittest.TestRunner) {
- tr.b.unittest.TestRunner.addEventListener(
- 'tr-unittest-will-run',
- function() {
- if (tr.isHeadless)
- Settings.setAlternativeStorageInstance(new HeadlessStorage());
- else
- Settings.setAlternativeStorageInstance(global.sessionStorage);
- });
- }
-
- function SessionSettings() {
- return SessionSettings;
- }
-
- function AddStaticStorageFunctionsToClass_(inputClass, storage) {
- inputClass.storage_ = storage;
-
- /**
- * Get the setting with the given name.
- *
- * @param {string} key The name of the setting.
- * @param {string=} opt_default The default value to return if not set.
- * @param {string=} opt_namespace If set, the setting name will be prefixed
- * with this namespace, e.g. "categories.settingName". This is useful for
- * a set of related settings.
- */
- inputClass.get = function(key, opt_default, opt_namespace) {
- key = inputClass.namespace_(key, opt_namespace);
- var rawVal = inputClass.storage_.getItem(key);
- if (rawVal === null || rawVal === undefined)
- return opt_default;
-
- // Old settings versions used to stringify objects instead of putting them
- // into JSON. If those are encountered, parse will fail. In that case,
- // "upgrade" the setting to the default value.
- try {
- return JSON.parse(rawVal).value;
- } catch (e) {
- inputClass.storage_.removeItem(key);
- return opt_default;
- }
- }
-
- /**
- * Set the setting with the given name to the given value.
- *
- * @param {string} key The name of the setting.
- * @param {string} value The value of the setting.
- * @param {string=} opt_namespace If set, the setting name will be prefixed
- * with this namespace, e.g. "categories.settingName". This is useful for
- * a set of related settings.
- */
- inputClass.set = function(key, value, opt_namespace) {
- if (value === undefined)
- throw new Error('Settings.set: value must not be undefined');
- var v = JSON.stringify({value: value});
- inputClass.storage_.setItem(
- inputClass.namespace_(key, opt_namespace), v);
- };
-
- /**
- * Return a list of all the keys, or all the keys in the given namespace
- * if one is provided.
- *
- * @param {string=} opt_namespace If set, only return settings which
- * begin with this prefix.
- */
- inputClass.keys = function(opt_namespace) {
- var result = [];
- opt_namespace = opt_namespace || '';
- for (var i = 0; i < inputClass.storage_.length; i++) {
- var key = inputClass.storage_.key(i);
- if (inputClass.isnamespaced_(key, opt_namespace))
- result.push(inputClass.unnamespace_(key, opt_namespace));
- }
- return result;
- };
-
- inputClass.isnamespaced_ = function(key, opt_namespace) {
- return key.indexOf(inputClass.normalize_(opt_namespace)) === 0;
- };
-
- inputClass.namespace_ = function(key, opt_namespace) {
- return inputClass.normalize_(opt_namespace) + key;
- };
-
- inputClass.unnamespace_ = function(key, opt_namespace) {
- return key.replace(inputClass.normalize_(opt_namespace), '');
- };
-
- /**
- * All settings are prefixed with a global namespace to avoid collisions.
- * inputClass may also be namespaced with an additional prefix passed into
- * the get, set, and keys methods in order to group related settings.
- * This method makes sure the two namespaces are always set properly.
- */
- inputClass.normalize_ = function(opt_namespace) {
- return inputClass.NAMESPACE + (opt_namespace ? opt_namespace + '.' : '');
- };
-
- inputClass.setAlternativeStorageInstance = function(instance) {
- inputClass.storage_ = instance;
- };
-
- inputClass.getAlternativeStorageInstance = function() {
- if (!tr.isHeadless && inputClass.storage_ === localStorage)
- return undefined;
- return inputClass.storage_;
- };
-
- inputClass.NAMESPACE = 'trace-viewer';
- }
-
- function HeadlessStorage() {
- this.length = 0;
- this.hasItem_ = {};
- this.items_ = {};
- this.itemsAsArray_ = undefined;
- }
- HeadlessStorage.prototype = {
- key: function(index) {
- return this.itemsAsArray[index];
- },
-
- get itemsAsArray() {
- if (this.itemsAsArray_ !== undefined)
- return this.itemsAsArray_;
- var itemsAsArray = [];
- for (var k in this.items_)
- itemsAsArray.push(k);
- this.itemsAsArray_ = itemsAsArray;
- return this.itemsAsArray_;
- },
-
- getItem: function(key) {
- if (!this.hasItem_[key])
- return null;
- return this.items_[key];
- },
-
- removeItem: function(key) {
- if (!this.hasItem_[key])
- return;
- var value = this.items_[key];
- delete this.hasItem_[key];
- delete this.items_[key];
- this.length--;
- this.itemsAsArray_ = undefined;
- return value;
- },
-
- setItem: function(key, value) {
- if (this.hasItem_[key]) {
- this.items_[key] = value;
- return;
- }
- this.items_[key] = value;
- this.hasItem_[key] = true;
- this.length++;
- this.itemsAsArray_ = undefined;
- return value;
- }
- };
-
- if (tr.isHeadless) {
- AddStaticStorageFunctionsToClass_(Settings, new HeadlessStorage());
- AddStaticStorageFunctionsToClass_(SessionSettings, new HeadlessStorage());
- } else {
- AddStaticStorageFunctionsToClass_(Settings, localStorage);
- AddStaticStorageFunctionsToClass_(SessionSettings, sessionStorage);
- }
-
- return {
- Settings: Settings,
- SessionSettings: SessionSettings
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/settings_test.html b/chromium/third_party/catapult/tracing/tracing/base/settings_test.html
deleted file mode 100644
index 8c9ea50d9b7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/settings_test.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/settings.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function assertSettingIs(expectedValue, key) {
- assert.equal(tr.b.Settings.get(key), expectedValue);
- }
-
- // Old settings versions used to stringify objects instead of putting them
- // into JSON. This test makes sure that these old settings yield the default
- // value instead of strings.
- test('oldStyleSettingYieldsDefaultValue', function() {
- var storage = tr.b.Settings.getAlternativeStorageInstance();
- storage.setItem(tr.b.Settings.namespace_('key'), 'hello world');
-
- assert.equal(tr.b.Settings.get('key', 'value'), 'value');
- });
-
- test('setGetString', function() {
- var settings = new tr.b.Settings();
- settings.set('my_key', 'my_val');
- assert.equal(settings.get('my_key'), 'my_val');
- // tr.b.Settings() is a singleton
- assert.equal(tr.b.Settings().get('my_key'), 'my_val');
- });
-
- test('setGetNumber', function() {
- var settings = new tr.b.Settings();
- settings.set('my_key', 5);
- assertSettingIs(5, 'my_key');
- });
-
- test('setGetBool', function() {
- var settings = new tr.b.Settings();
- settings.set('my_key', false);
- assertSettingIs(false, 'my_key');
- });
-
- test('setGetObject', function() {
- var settings = new tr.b.Settings();
- settings.set('my_key', {'hello': 5});
- assert.deepEqual(settings.get('my_key'), {'hello': 5});
- });
-
- test('setInvalidObject', function() {
- var settings = new tr.b.Settings();
- var obj = {'hello': undefined};
- obj.hello = obj;
- assert.throws(function() {
- settings.set('my_key', obj);
- });
- });
-
- test('setUndefined', function() {
- var settings = new tr.b.Settings();
- assert.throws(function() {
- settings.set('my_key', undefined);
- });
- });
-
- test('getUnset', function() {
- var settings = new tr.b.Settings();
- // Undefined should be returned if value isn't set.
- assertSettingIs(undefined, 'my_key');
- });
-
- test('getDefault', function() {
- var settings = new tr.b.Settings();
- // default_val should be returned if value isn't set.
- assert.equal(settings.get('my_key', 'default_val'), 'default_val');
- });
-
- test('setGetPrefix', function() {
- var settings = new tr.b.Settings();
- settings.set('key_a', 'foo', 'my_prefix');
- assert.equal(settings.get('key_a', undefined, 'my_prefix'), 'foo');
- assert.equal(settings.get('key_a', 'bar', 'my_prefix'), 'foo');
- assert.isUndefined(settings.get('key_a'));
- assert.equal(settings.get('key_a', 'bar'), 'bar');
- });
-
- test('keys', function() {
- var settings = new tr.b.Settings();
- settings.set('key_a', 'foo');
- settings.set('key_b', 'bar');
- settings.set('key_c', 'baz');
- assert.sameMembers(settings.keys(), ['key_a', 'key_b', 'key_c']);
- });
-
- test('keysPrefix', function() {
- var settings = new tr.b.Settings();
- settings.set('key_a', 'foo', 'prefix1');
- settings.set('key_b', 'bar', 'prefix1');
- settings.set('key_c', 'baz', 'prefix1');
- settings.set('key_a', 'foo', 'prefix2');
- settings.set('key_b', 'bar', 'prefix2');
- settings.set('key_C', 'baz', 'prefix2');
- assert.sameMembers(settings.keys('prefix1'), ['key_a', 'key_b', 'key_c']);
- assert.sameMembers(settings.keys('prefix2'), ['key_C', 'key_a', 'key_b']);
- assert.sameMembers(
- settings.keys(),
- ['prefix1.key_a', 'prefix1.key_b', 'prefix1.key_c',
- 'prefix2.key_C', 'prefix2.key_a', 'prefix2.key_b']);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator.html b/chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator.html
deleted file mode 100644
index 45c4e5cc25c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/math.html">
-
-<script>
-'use strict';
-tr.exportTo('tr.b', function() {
- /**
- * Generate pretty colors!
- * http://basecase.org/env/on-rainbows
- * https://mycarta.wordpress.com/2012/10/06/the-rainbow-is-deadlong-live-the-rainbow-part-3/
- *
- * Set brightness = 0 to always generate black.
- * Set brightness = 2 to always generate white.
- * Set brightness = 1 to generate saturated colors.
- *
- * @constructor
- * @param {number=} opt_a alpha opacity in [0,1]
- * @param {number=} opt_brightness in [0,2]
- */
- function SinebowColorGenerator(opt_a, opt_brightness) {
- this.a_ = (opt_a === undefined) ? 1 : opt_a;
- this.brightness_ = (opt_brightness === undefined) ? 1 : opt_brightness;
- this.colorIndex_ = 0;
- this.keyToColor = {};
- }
-
- SinebowColorGenerator.prototype = {
- colorForKey: function(key) {
- if (!this.keyToColor[key])
- this.keyToColor[key] = this.nextColor();
- return this.keyToColor[key];
- },
-
- nextColor: function() {
- var components = SinebowColorGenerator.nthColor(this.colorIndex_++);
- return tr.b.Color.fromString(SinebowColorGenerator.calculateColor(
- components[0], components[1], components[2],
- this.a_, this.brightness_));
- }
- };
-
- SinebowColorGenerator.PHI = (1 + Math.sqrt(5)) / 2;
-
- SinebowColorGenerator.sinebow_ = function(h) {
- h += 0.5;
- h = -h;
- var r = Math.sin(Math.PI * h);
- var g = Math.sin(Math.PI * (h + 1 / 3));
- var b = Math.sin(Math.PI * (h + 2 / 3));
- r *= r; g *= g; b *= b;
- // Roughly correct for human perception.
- // https://en.wikipedia.org/wiki/Luma_%28video%29
- // Multiply by 2 to normalize all values to 0.5.
- // (Halfway between black and white.)
- var y = 2 * (0.2989 * r + 0.5870 * g + 0.1140 * b);
- r /= y; g /= y; b /= y;
- return [256 * r, 256 * g, 256 * b];
- };
-
- SinebowColorGenerator.nthColor = function(n) {
- return SinebowColorGenerator.sinebow_(n * this.PHI);
- };
-
- SinebowColorGenerator.calculateColor = function(r, g, b, a, brightness) {
- if (brightness <= 1) {
- r *= brightness;
- g *= brightness;
- b *= brightness;
- } else {
- r = tr.b.lerp(tr.b.normalize(brightness, 1, 2), r, 255);
- g = tr.b.lerp(tr.b.normalize(brightness, 1, 2), g, 255);
- b = tr.b.lerp(tr.b.normalize(brightness, 1, 2), b, 255);
- }
- r = Math.round(r);
- g = Math.round(g);
- b = Math.round(b);
- return 'rgba(' + r + ',' + g + ',' + b + ', ' + a + ')';
- };
-
- return {
- SinebowColorGenerator: SinebowColorGenerator
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator_test.html b/chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator_test.html
deleted file mode 100644
index 0676847cb61..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/sinebow_color_generator_test.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/sinebow_color_generator.html">
-
-<script>
-'use strict';
-tr.b.unittest.testSuite(function() {
- test('SinebowColorGenerator', function() {
- var generator = new tr.b.SinebowColorGenerator();
- assert.strictEqual('rgba(270,67,67,1)',
- generator.colorForKey('z').toString());
- assert.strictEqual('rgba(44,132,329,1)',
- generator.colorForKey('y').toString());
- assert.strictEqual('rgba(99,166,9,1)',
- generator.colorForKey('x').toString());
- assert.strictEqual('rgba(270,67,67,1)',
- generator.colorForKey('z').toString());
-
- generator = new tr.b.SinebowColorGenerator(0.5);
- assert.strictEqual('rgba(270,67,67,0.5)',
- generator.colorForKey('z').toString());
- assert.strictEqual('rgba(44,132,329,0.5)',
- generator.colorForKey('y').toString());
- assert.strictEqual('rgba(99,166,9,0.5)',
- generator.colorForKey('x').toString());
- assert.strictEqual('rgba(270,67,67,0.5)',
- generator.colorForKey('z').toString());
-
- generator = new tr.b.SinebowColorGenerator(1, 0);
- assert.strictEqual('rgba(0,0,0,1)',
- generator.colorForKey('z').toString());
- assert.strictEqual('rgba(0,0,0,1)',
- generator.colorForKey('y').toString());
- assert.strictEqual('rgba(0,0,0,1)',
- generator.colorForKey('x').toString());
- assert.strictEqual('rgba(0,0,0,1)',
- generator.colorForKey('z').toString());
-
- generator = new tr.b.SinebowColorGenerator(1, 2);
- assert.strictEqual('rgba(255,255,255,1)',
- generator.colorForKey('z').toString());
- assert.strictEqual('rgba(255,255,255,1)',
- generator.colorForKey('y').toString());
- assert.strictEqual('rgba(255,255,255,1)',
- generator.colorForKey('x').toString());
- assert.strictEqual('rgba(255,255,255,1)',
- generator.colorForKey('z').toString());
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils.html b/chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils.html
deleted file mode 100644
index 3352f9487ad..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils.html
+++ /dev/null
@@ -1,334 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper functions for doing intersections and iteration
- * over sorted arrays and intervals.
- *
- */
-tr.exportTo('tr.b', function() {
- /**
- * Finds the first index in the array whose value is >= loVal.
- *
- * The key for the search is defined by the mapFn. This array must
- * be prearranged such that ary.map(mapFn) would also be sorted in
- * ascending order.
- *
- * @param {Array} ary An array of arbitrary objects.
- * @param {function():*} mapFn Callback that produces a key value
- * from an element in ary.
- * @param {number} loVal Value for which to search.
- * @return {Number} Offset o into ary where all ary[i] for i <= o
- * are < loVal, or ary.length if loVal is greater than all elements in
- * the array.
- */
- function findLowIndexInSortedArray(ary, mapFn, loVal) {
- if (ary.length === 0)
- return 1;
-
- var low = 0;
- var high = ary.length - 1;
- var i, comparison;
- var hitPos = -1;
- while (low <= high) {
- i = Math.floor((low + high) / 2);
- comparison = mapFn(ary[i]) - loVal;
- if (comparison < 0) {
- low = i + 1; continue;
- } else if (comparison > 0) {
- high = i - 1; continue;
- } else {
- hitPos = i;
- high = i - 1;
- }
- }
- // return where we hit, or failing that the low pos
- return hitPos !== -1 ? hitPos : low;
- }
-
- // From devtools/front_end/platform/utilities.js upperBound
- function findHighIndexInSortedArray(ary, mapFn, loVal, hiVal) {
- var lo = loVal || 0;
- var hi = hiVal !== undefined ? hiVal : ary.length;
- while (lo < hi) {
- var mid = (lo + hi) >> 1;
- if (mapFn(ary[mid]) >= 0)
- lo = mid + 1;
- else
- hi = mid;
- }
- return hi;
- }
-
- /**
- * Finds an index in an array of intervals that either intersects
- * the provided loVal, or if no intersection is found, -1 or ary.length.
- *
- * The array of intervals is defined implicitly via two mapping functions
- * over the provided ary. mapLoFn determines the lower value of the interval,
- * mapWidthFn the width. Intersection is lower-inclusive, e.g. [lo,lo+w).
- *
- * The array of intervals formed by this mapping must be non-overlapping and
- * sorted in ascending order by loVal.
- *
- * @param {Array} ary An array of objects that can be converted into sorted
- * nonoverlapping ranges [x,y) using the mapLoFn and mapWidth.
- * @param {function():*} mapLoFn Callback that produces the low value for the
- * interval represented by an element in the array.
- * @param {function():*} mapWidthFn Callback that produces the width for the
- * interval represented by an element in the array.
- * @param {number} loVal The low value for the search.
- * @return {Number} An index in the array that intersects or is first-above
- * loVal, -1 if none found and loVal is below than all the intervals,
- * ary.length if loVal is greater than all the intervals.
- */
- function findIndexInSortedIntervals(ary, mapLoFn, mapWidthFn, loVal) {
- var first = findLowIndexInSortedArray(ary, mapLoFn, loVal);
- if (first === 0) {
- if (loVal >= mapLoFn(ary[0]) &&
- loVal < mapLoFn(ary[0]) + mapWidthFn(ary[0], 0)) {
- return 0;
- } else {
- return -1;
- }
- } else if (first < ary.length) {
- if (loVal >= mapLoFn(ary[first]) &&
- loVal < mapLoFn(ary[first]) + mapWidthFn(ary[first], first)) {
- return first;
- } else if (loVal >= mapLoFn(ary[first - 1]) &&
- loVal < mapLoFn(ary[first - 1]) +
- mapWidthFn(ary[first - 1], first - 1)) {
- return first - 1;
- } else {
- return ary.length;
- }
- } else if (first === ary.length) {
- if (loVal >= mapLoFn(ary[first - 1]) &&
- loVal < mapLoFn(ary[first - 1]) +
- mapWidthFn(ary[first - 1], first - 1)) {
- return first - 1;
- } else {
- return ary.length;
- }
- } else {
- return ary.length;
- }
- }
-
- /**
- * Finds an index in an array of sorted closed intervals that either
- * intersects the provided val, or if no intersection is found, -1 or
- * ary.length.
- *
- * The array of intervals is defined implicitly via two mapping functions
- * over the provided ary. mapLoFn determines the lower value of the interval,
- * mapHiFn the high. Intersection is closed, e.g. [lo,hi], unlike with
- * findIndexInSortedIntervals, which is right-open.
- *
- * The array of intervals formed by this mapping must be non-overlapping, and
- * sorted in ascending order by val.
- *
- * @param {Array} ary An array of objects that can be converted into sorted
- * nonoverlapping ranges [x,y) using the mapLoFn and mapWidth.
- * @param {function():*} mapLoFn Callback that produces the low value for the
- * interval represented by an element in the array.
- * @param {function():*} mapHiFn Callback that produces the high for the
- * interval represented by an element in the array.
- * @param {number} val The value for the search.
- * @return {Number} An index in the array that intersects or is first-above
- * val, -1 if none found and val is below than all the intervals,
- * ary.length if val is greater than all the intervals.
- */
- function findIndexInSortedClosedIntervals(ary, mapLoFn, mapHiFn, val) {
- var i = findLowIndexInSortedArray(ary, mapLoFn, val);
- if (i === 0) {
- if (val >= mapLoFn(ary[0], 0) &&
- val <= mapHiFn(ary[0], 0)) {
- return 0;
- } else {
- return -1;
- }
- } else if (i < ary.length) {
- if (val >= mapLoFn(ary[i - 1], i - 1) &&
- val <= mapHiFn(ary[i - 1], i - 1)) {
- return i - 1;
- } else if (val >= mapLoFn(ary[i], i) &&
- val <= mapHiFn(ary[i], i)) {
- return i;
- } else {
- return ary.length;
- }
- } else if (i === ary.length) {
- if (val >= mapLoFn(ary[i - 1], i - 1) &&
- val <= mapHiFn(ary[i - 1], i - 1)) {
- return i - 1;
- } else {
- return ary.length;
- }
- } else {
- return ary.length;
- }
- }
-
- /**
- * Calls cb for all intervals in the implicit array of intervals
- * defnied by ary, mapLoFn and mapHiFn that intersect the range
- * [loVal,hiVal)
- *
- * This function uses the same scheme as findLowIndexInSortedArray
- * to define the intervals. The same restrictions on sortedness and
- * non-overlappingness apply.
- *
- * @param {Array} ary An array of objects that can be converted into sorted
- * nonoverlapping ranges [x,y) using the mapLoFn and mapWidth.
- * @param {function():*} mapLoFn Callback that produces the low value for the
- * interval represented by an element in the array.
- * @param {function():*} mapWidthFn Callback that produces the width for the
- * interval represented by an element in the array.
- * @param {number} loVal The low value for the search, inclusive.
- * @param {number} hiVal The high value for the search, non inclusive.
- * @param {function():*} cb The function to run for intersecting intervals.
- */
- function iterateOverIntersectingIntervals(ary, mapLoFn, mapWidthFn, loVal,
- hiVal, cb) {
- if (ary.length === 0)
- return;
-
- if (loVal > hiVal) return;
-
- var i = findLowIndexInSortedArray(ary, mapLoFn, loVal);
- if (i === -1) {
- return;
- }
- if (i > 0) {
- var hi = mapLoFn(ary[i - 1]) + mapWidthFn(ary[i - 1], i - 1);
- if (hi >= loVal) {
- cb(ary[i - 1], i - 1);
- }
- }
- if (i === ary.length) {
- return;
- }
-
- for (var n = ary.length; i < n; i++) {
- var lo = mapLoFn(ary[i]);
- if (lo >= hiVal)
- break;
- cb(ary[i], i);
- }
- }
-
- /**
- * Non iterative version of iterateOverIntersectingIntervals.
- *
- * @return {Array} Array of elements in ary that intersect loVal, hiVal.
- */
- function getIntersectingIntervals(ary, mapLoFn, mapWidthFn, loVal, hiVal) {
- var tmp = [];
- iterateOverIntersectingIntervals(ary, mapLoFn, mapWidthFn, loVal, hiVal,
- function(d) {
- tmp.push(d);
- });
- return tmp;
- }
-
- /**
- * Finds the element in the array whose value is closest to |val|.
- *
- * The same restrictions on sortedness as for findLowIndexInSortedArray apply.
- *
- * @param {Array} ary An array of arbitrary objects.
- * @param {function():*} mapFn Callback that produces a key value
- * from an element in ary.
- * @param {number} val Value for which to search.
- * @param {number} maxDiff Maximum allowed difference in value between |val|
- * and an element's value.
- * @return {object} Object in the array whose value is closest to |val|, or
- * null if no object is within range.
- */
- function findClosestElementInSortedArray(ary, mapFn, val, maxDiff) {
- if (ary.length === 0)
- return null;
-
- var aftIdx = findLowIndexInSortedArray(ary, mapFn, val);
- var befIdx = aftIdx > 0 ? aftIdx - 1 : 0;
-
- if (aftIdx === ary.length)
- aftIdx -= 1;
-
- var befDiff = Math.abs(val - mapFn(ary[befIdx]));
- var aftDiff = Math.abs(val - mapFn(ary[aftIdx]));
-
- if (befDiff > maxDiff && aftDiff > maxDiff)
- return null;
-
- var idx = befDiff < aftDiff ? befIdx : aftIdx;
- return ary[idx];
- }
-
- /**
- * Finds the closest interval in the implicit array of intervals
- * defined by ary, mapLoFn and mapHiFn.
- *
- * This function uses the same scheme as findLowIndexInSortedArray
- * to define the intervals. The same restrictions on sortedness and
- * non-overlappingness apply.
- *
- * @param {Array} ary An array of objects that can be converted into sorted
- * nonoverlapping ranges [x,y) using the mapLoFn and mapHiFn.
- * @param {function():*} mapLoFn Callback that produces the low value for the
- * interval represented by an element in the array.
- * @param {function():*} mapHiFn Callback that produces the high for the
- * interval represented by an element in the array.
- * @param {number} val The value for the search.
- * @param {number} maxDiff Maximum allowed difference in value between |val|
- * and an interval's low or high value.
- * @return {interval} Interval in the array whose high or low value is closest
- * to |val|, or null if no interval is within range.
- */
- function findClosestIntervalInSortedIntervals(ary, mapLoFn, mapHiFn, val,
- maxDiff) {
- if (ary.length === 0)
- return null;
-
- var idx = findLowIndexInSortedArray(ary, mapLoFn, val);
- if (idx > 0)
- idx -= 1;
-
- var hiInt = ary[idx];
- var loInt = hiInt;
-
- if (val > mapHiFn(hiInt) && idx + 1 < ary.length)
- loInt = ary[idx + 1];
-
- var loDiff = Math.abs(val - mapLoFn(loInt));
- var hiDiff = Math.abs(val - mapHiFn(hiInt));
-
- if (loDiff > maxDiff && hiDiff > maxDiff)
- return null;
-
- if (loDiff < hiDiff)
- return loInt;
- else
- return hiInt;
- }
-
- return {
- findLowIndexInSortedArray: findLowIndexInSortedArray,
- findHighIndexInSortedArray: findHighIndexInSortedArray,
- findIndexInSortedIntervals: findIndexInSortedIntervals,
- findIndexInSortedClosedIntervals: findIndexInSortedClosedIntervals,
- iterateOverIntersectingIntervals: iterateOverIntersectingIntervals,
- getIntersectingIntervals: getIntersectingIntervals,
- findClosestElementInSortedArray: findClosestElementInSortedArray,
- findClosestIntervalInSortedIntervals: findClosestIntervalInSortedIntervals
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils_test.html b/chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils_test.html
deleted file mode 100644
index ef50caa0df1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/sorted_array_utils_test.html
+++ /dev/null
@@ -1,239 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ArrayOfIntervals = function(array) {
- this.array = array;
- }
-
- ArrayOfIntervals.prototype = {
-
- get: function(index) {
- return this.array[index];
- },
-
- findLowElementIndex: function(ts) {
- return tr.b.findLowIndexInSortedArray(
- this.array,
- function(x) { return x.lo; },
- ts);
- },
-
- findIntervalIndex: function(ts) {
- return tr.b.findIndexInSortedIntervals(
- this.array,
- function(x) { return x.lo; },
- function(x) { return x.hi - x.lo; },
- ts);
- },
-
- findIndexInClosedIntervals: function(ts) {
- return tr.b.findIndexInSortedClosedIntervals(
- this.array,
- function(x) { return x.lo; },
- function(x) { return x.hi; },
- ts);
- },
-
- findIntersectingIntervals: function(tsA, tsB) {
- var array = this.array;
- var result = [];
- tr.b.iterateOverIntersectingIntervals(
- this.array,
- function(x) { return x.lo; },
- function(x) { return x.hi - x.lo; },
- tsA,
- tsB,
- function(x) { result.push(array.indexOf(x)); });
- return result;
- },
-
- findClosestElement: function(ts, tsDiff) {
- return tr.b.findClosestElementInSortedArray(
- this.array,
- function(x) { return x.lo; },
- ts,
- tsDiff);
- },
-
- findClosestInterval: function(ts, tsDiff) {
- return tr.b.findClosestIntervalInSortedIntervals(
- this.array,
- function(x) { return x.lo; },
- function(x) { return x.hi; },
- ts,
- tsDiff);
- }
- };
-
- test('findLowElementIndex', function() {
- var array = new ArrayOfIntervals([
- {lo: 10, hi: 15},
- {lo: 20, hi: 30}
- ]);
-
- assert.equal(array.findLowElementIndex(-100), 0);
- assert.equal(array.findLowElementIndex(0), 0);
- assert.equal(array.findLowElementIndex(10), 0);
-
- assert.equal(array.findLowElementIndex(10.1), 1);
- assert.equal(array.findLowElementIndex(15), 1);
- assert.equal(array.findLowElementIndex(20), 1);
-
- assert.equal(array.findLowElementIndex(20.1), 2);
- assert.equal(array.findLowElementIndex(21), 2);
- assert.equal(array.findLowElementIndex(100), 2);
- });
-
- test('findIntervalIndex', function() {
- var array = new ArrayOfIntervals([
- {lo: 10, hi: 15},
- {lo: 20, hi: 30}
- ]);
-
- assert.equal(array.findIntervalIndex(0), -1);
- assert.equal(array.findIntervalIndex(9.9), -1);
-
- assert.equal(array.findIntervalIndex(10), 0);
- assert.equal(array.findIntervalIndex(12), 0);
- assert.equal(array.findIntervalIndex(14.9), 0);
-
- assert.equal(array.findIntervalIndex(20), 1);
- assert.equal(array.findIntervalIndex(21), 1);
- assert.equal(array.findIntervalIndex(29.99), 1);
-
- assert.equal(array.findIntervalIndex(30), 2);
- assert.equal(array.findIntervalIndex(40), 2);
-
-
- // misses, in between the intervals, return array length
- assert.equal(array.findIntervalIndex(15), 2);
- assert.equal(array.findIntervalIndex(19.9), 2);
- });
-
- test('findClosedIntervalIndex', function() {
- var array = new ArrayOfIntervals([
- {lo: 10, hi: 15},
- {lo: 15, hi: 20},
- {lo: 21, hi: 25}
- ]);
-
- assert.equal(array.findIndexInClosedIntervals(0), -1);
- assert.equal(array.findIndexInClosedIntervals(9.999), -1);
- assert.equal(array.findIndexInClosedIntervals(10), 0);
- assert.equal(array.findIndexInClosedIntervals(14), 0);
- assert.equal(array.findIndexInClosedIntervals(15), 0);
- assert.equal(array.findIndexInClosedIntervals(15.00001), 1);
- assert.equal(array.findIndexInClosedIntervals(20.5), 3);
- assert.equal(array.findIndexInClosedIntervals(22), 2);
- assert.equal(array.findIndexInClosedIntervals(25), 2);
- assert.equal(array.findIndexInClosedIntervals(25.00001), 3);
- });
-
- test('findClosedInEmptyArray', function() {
- var array = new ArrayOfIntervals([]);
- assert.equal(array.findIndexInClosedIntervals(0), 0);
- });
-
- test('findIntersectingIntervals', function() {
- var array = new ArrayOfIntervals([
- {lo: 10, hi: 15},
- {lo: 20, hi: 30}
- ]);
-
- assert.deepEqual(array.findIntersectingIntervals(0, 0), []);
- assert.deepEqual(array.findIntersectingIntervals(100, 0), []);
- assert.deepEqual(array.findIntersectingIntervals(0, 10), []);
-
- assert.deepEqual(array.findIntersectingIntervals(0, 10.1), [0]);
- assert.deepEqual(array.findIntersectingIntervals(5, 15), [0]);
- assert.deepEqual(array.findIntersectingIntervals(15, 20), [0]);
-
- assert.deepEqual(array.findIntersectingIntervals(15.1, 20), []);
-
- assert.deepEqual(array.findIntersectingIntervals(15.1, 20.1), [1]);
- assert.deepEqual(array.findIntersectingIntervals(20, 30), [1]);
- assert.deepEqual(array.findIntersectingIntervals(30, 100), [1]);
-
- assert.deepEqual(array.findIntersectingIntervals(0, 100), [0, 1]);
- assert.deepEqual(array.findIntersectingIntervals(15, 20.1), [0, 1]);
- });
-
- test('findClosestElement', function() {
- var array = new ArrayOfIntervals([
- {lo: 10, hi: 15},
- {lo: 20, hi: 30}
- ]);
-
- // Test the helper method first.
- assert.isUndefined(array.get(-1));
- assert.equal(array.get(0), array.array[0]);
- assert.equal(array.get(1), array.array[1]);
- assert.isUndefined(array.get(2));
-
- assert.isNull(array.findClosestElement(0, 0));
- assert.isNull(array.findClosestElement(0, 9.9));
- assert.isNull(array.findClosestElement(10, -10));
-
- assert.equal(array.get(0), array.findClosestElement(0, 10));
- assert.equal(array.get(0), array.findClosestElement(8, 5));
- assert.equal(array.get(0), array.findClosestElement(10, 0));
- assert.equal(array.get(0), array.findClosestElement(12, 2));
-
- assert.isNull(array.findClosestElement(15, 3));
- assert.isNotNull(array.findClosestElement(15, 5));
-
- assert.equal(array.get(1), array.findClosestElement(19, 1));
- assert.equal(array.get(1), array.findClosestElement(20, 0));
- assert.equal(array.get(1), array.findClosestElement(30, 15));
-
- assert.isNull(array.findClosestElement(30, 9.9));
- assert.isNull(array.findClosestElement(100, 50));
- });
-
- test('findClosestInterval', function() {
- var array = new ArrayOfIntervals([
- {lo: 10, hi: 15},
- {lo: 20, hi: 30}
- ]);
-
- assert.isNull(array.findClosestInterval(0, 0));
- assert.isNull(array.findClosestInterval(0, 9.9));
- assert.isNull(array.findClosestInterval(0, -100));
-
- assert.equal(array.get(0), array.findClosestInterval(0, 10));
- assert.equal(array.get(0), array.findClosestInterval(10, 0));
- assert.equal(array.get(0), array.findClosestInterval(12, 3));
- assert.equal(array.get(0), array.findClosestInterval(12, 100));
-
- assert.equal(array.get(0), array.findClosestInterval(13, 3));
- assert.equal(array.get(0), array.findClosestInterval(13, 20));
- assert.equal(array.get(0), array.findClosestInterval(15, 0));
-
- assert.isNull(array.findClosestInterval(17.5, 0));
- assert.isNull(array.findClosestInterval(17.5, 2.4));
- assert.isNotNull(array.findClosestInterval(17.5, 2.5));
- assert.isNotNull(array.findClosestInterval(17.5, 10));
-
- assert.equal(array.get(1), array.findClosestInterval(19, 2));
- assert.equal(array.get(1), array.findClosestInterval(20, 0));
- assert.equal(array.get(1), array.findClosestInterval(24, 100));
- assert.equal(array.get(1), array.findClosestInterval(26, 100));
-
- assert.equal(array.get(1), array.findClosestInterval(30, 0));
- assert.equal(array.get(1), array.findClosestInterval(35, 10));
- assert.equal(array.get(1), array.findClosestInterval(50, 100));
-
- assert.isNull(array.findClosestInterval(50, 19));
- assert.isNull(array.findClosestInterval(100, 50));
- assert.isNull(array.findClosestInterval(50, -100));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/statistics.html b/chromium/third_party/catapult/tracing/tracing/base/statistics.html
deleted file mode 100644
index b6decb2a54e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/statistics.html
+++ /dev/null
@@ -1,848 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/math.html">
-<link rel="import" href="/tracing/base/range.html">
-<script src="/mannwhitneyu/mannwhitneyu.js"></script>
-
-<script>
-'use strict';
-
-// In node, the script-src for mannwhitneyu above brings in mannwhitneyui
-// into a module, instead of into the global scope. Whereas this file
-// assumes that mannwhitneyu is in the global scope. So, in Node only, we
-// require() it in, and then take all its exports and shove them into the
-// global scope by hand.
-(function(global) {
- if (tr.isNode) {
- var mwuAbsPath = HTMLImportsLoader.hrefToAbsolutePath(
- '/mannwhitneyu.js');
- var mwuModule = require(mwuAbsPath);
- for (var exportName in mwuModule) {
- global[exportName] = mwuModule[exportName];
- }
- }
-})(this);
-</script>
-
-<script>
-'use strict';
-
-// TODO(charliea): Remove:
-/* eslint-disable catapult-camelcase */
-
-tr.exportTo('tr.b', function() {
- var identity = x => x;
-
- var Statistics = {};
-
- /* Returns the quotient, or zero if the denominator is zero.*/
- Statistics.divideIfPossibleOrZero = function(numerator, denominator) {
- if (denominator === 0)
- return 0;
- return numerator / denominator;
- };
-
- Statistics.sum = function(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- var ret = 0;
- var i = 0;
- for (var elt of ary)
- ret += func.call(opt_this, elt, i++);
- return ret;
- };
-
- Statistics.mean = function(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- var sum = 0;
- var i = 0;
-
- for (var elt of ary)
- sum += func.call(opt_this, elt, i++);
-
- if (i === 0)
- return undefined;
-
- return sum / i;
- };
-
- Statistics.geometricMean = function(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- var i = 0;
- var logsum = 0;
-
- // The geometric mean is expressed as the arithmetic mean of logarithms
- // in order to prevent overflow.
- for (var elt of ary) {
- var x = func.call(opt_this, elt, i++);
- if (x <= 0)
- return 0;
- logsum += Math.log(Math.abs(x));
- }
-
- if (i === 0)
- return 1;
-
- return Math.exp(logsum / i);
- };
-
- // Returns undefined if the sum of the weights is zero.
- Statistics.weightedMean = function(
- ary, weightCallback, opt_valueCallback, opt_this) {
- var valueCallback = opt_valueCallback || identity;
- var numerator = 0;
- var denominator = 0;
- var i = -1;
-
- for (var elt of ary) {
- i++;
- var value = valueCallback.call(opt_this, elt, i);
- if (value === undefined)
- continue;
- var weight = weightCallback.call(opt_this, elt, i, value);
- numerator += weight * value;
- denominator += weight;
- }
-
- if (denominator === 0)
- return undefined;
-
- return numerator / denominator;
- };
-
- Statistics.variance = function(ary, opt_func, opt_this) {
- if (ary.length === 0)
- return undefined;
- if (ary.length === 1)
- return 0;
- var func = opt_func || identity;
- var mean = Statistics.mean(ary, func, opt_this);
- var sumOfSquaredDistances = Statistics.sum(
- ary,
- function(d, i) {
- var v = func.call(this, d, i) - mean;
- return v * v;
- },
- opt_this);
- return sumOfSquaredDistances / (ary.length - 1);
- };
-
- Statistics.stddev = function(ary, opt_func, opt_this) {
- if (ary.length === 0)
- return undefined;
- return Math.sqrt(
- Statistics.variance(ary, opt_func, opt_this));
- };
-
- Statistics.max = function(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- var ret = -Infinity;
- var i = 0;
- for (var elt of ary)
- ret = Math.max(ret, func.call(opt_this, elt, i++));
- return ret;
- };
-
- Statistics.min = function(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- var ret = Infinity;
- var i = 0;
- for (var elt of ary)
- ret = Math.min(ret, func.call(opt_this, elt, i++));
- return ret;
- };
-
- Statistics.range = function(ary, opt_func, opt_this) {
- var func = opt_func || identity;
- var ret = new tr.b.Range();
- var i = 0;
- for (var elt of ary)
- ret.addValue(func.call(opt_this, elt, i++));
- return ret;
- };
-
- Statistics.percentile = function(ary, percent, opt_func, opt_this) {
- if (!(percent >= 0 && percent <= 1))
- throw new Error('percent must be [0,1]');
-
- var func = opt_func || identity;
- var tmp = new Array(ary.length);
- var i = 0;
- for (var elt of ary)
- tmp[i] = func.call(opt_this, elt, i++);
- tmp.sort((a, b) => a - b);
- var idx = Math.floor((ary.length - 1) * percent);
- return tmp[idx];
- };
-
- /**
- * Sorts the samples, and map them linearly to the range [0,1].
- *
- * They're mapped such that for the N samples, the first sample is 0.5/N and
- * the last sample is (N-0.5)/N.
- *
- * Background: The discrepancy of the sample set i/(N-1); i=0, ..., N-1 is
- * 2/N, twice the discrepancy of the sample set (i+1/2)/N; i=0, ..., N-1. In
- * our case we don't want to distinguish between these two cases, as our
- * original domain is not bounded (it is for Monte Carlo integration, where
- * discrepancy was first used).
- **/
- Statistics.normalizeSamples = function(samples) {
- if (samples.length === 0) {
- return {
- normalized_samples: samples,
- scale: 1.0
- };
- }
- // Create a copy to make sure that we don't mutate original |samples| input.
- samples = samples.slice().sort(
- function(a, b) {
- return a - b;
- }
- );
- var low = Math.min.apply(null, samples);
- var high = Math.max.apply(null, samples);
- var newLow = 0.5 / samples.length;
- var newHigh = (samples.length - 0.5) / samples.length;
- if (high - low === 0.0) {
- // Samples is an array of 0.5 in this case.
- samples = Array.apply(null, new Array(samples.length)).map(
- function() { return 0.5;});
- return {
- normalized_samples: samples,
- scale: 1.0
- };
- }
- var scale = (newHigh - newLow) / (high - low);
- for (var i = 0; i < samples.length; i++) {
- samples[i] = (samples[i] - low) * scale + newLow;
- }
- return {
- normalized_samples: samples,
- scale: scale
- };
- };
-
- /**
- * Computes the discrepancy of a set of 1D samples from the interval [0,1].
- *
- * The samples must be sorted. We define the discrepancy of an empty set
- * of samples to be zero.
- *
- * http://en.wikipedia.org/wiki/Low-discrepancy_sequence
- * http://mathworld.wolfram.com/Discrepancy.html
- */
- Statistics.discrepancy = function(samples, opt_locationCount) {
- if (samples.length === 0)
- return 0.0;
-
- var maxLocalDiscrepancy = 0;
- var invSampleCount = 1.0 / samples.length;
- var locations = [];
- // For each location, stores the number of samples less than that location.
- var countLess = [];
- // For each location, stores the number of samples less than or equal to
- // that location.
- var countLessEqual = [];
-
- if (opt_locationCount !== undefined) {
- // Generate list of equally spaced locations.
- var sampleIndex = 0;
- for (var i = 0; i < opt_locationCount; i++) {
- var location = i / (opt_locationCount - 1);
- locations.push(location);
- while (sampleIndex < samples.length &&
- samples[sampleIndex] < location) {
- sampleIndex += 1;
- }
- countLess.push(sampleIndex);
- while (sampleIndex < samples.length &&
- samples[sampleIndex] <= location) {
- sampleIndex += 1;
- }
- countLessEqual.push(sampleIndex);
- }
- } else {
- // Populate locations with sample positions. Append 0 and 1 if necessary.
- if (samples[0] > 0.0) {
- locations.push(0.0);
- countLess.push(0);
- countLessEqual.push(0);
- }
- for (var i = 0; i < samples.length; i++) {
- locations.push(samples[i]);
- countLess.push(i);
- countLessEqual.push(i + 1);
- }
- if (samples[-1] < 1.0) {
- locations.push(1.0);
- countLess.push(samples.length);
- countLessEqual.push(samples.length);
- }
- }
-
- // Compute discrepancy as max(overshoot, -undershoot), where
- // overshoot = max(countClosed(i, j)/N - length(i, j)) for all i < j,
- // undershoot = min(countOpen(i, j)/N - length(i, j)) for all i < j,
- // N = len(samples),
- // countClosed(i, j) is the number of points between i and j
- // including ends,
- // countOpen(i, j) is the number of points between i and j excluding ends,
- // length(i, j) is locations[i] - locations[j].
-
- // The following algorithm is modification of Kadane's algorithm,
- // see https://en.wikipedia.org/wiki/Maximum_subarray_problem.
-
- // The maximum of (countClosed(k, i-1)/N - length(k, i-1)) for any k < i-1.
- var maxDiff = 0;
- // The minimum of (countOpen(k, i-1)/N - length(k, i-1)) for any k < i-1.
- var minDiff = 0;
- for (var i = 1; i < locations.length; i++) {
- var length = locations[i] - locations[i - 1];
- var countClosed = countLessEqual[i] - countLess[i - 1];
- var countOpen = countLess[i] - countLessEqual[i - 1];
- // Number of points that are added if we extend a closed range that
- // ends at location (i-1).
- var countClosedIncrement =
- countLessEqual[i] - countLessEqual[i - 1];
- // Number of points that are added if we extend an open range that
- // ends at location (i-1).
- var countOpenIncrement = countLess[i] - countLess[i - 1];
-
- // Either extend the previous optimal range or start a new one.
- maxDiff = Math.max(
- countClosedIncrement * invSampleCount - length + maxDiff,
- countClosed * invSampleCount - length);
- minDiff = Math.min(
- countOpenIncrement * invSampleCount - length + minDiff,
- countOpen * invSampleCount - length);
-
- maxLocalDiscrepancy = Math.max(
- maxDiff, -minDiff, maxLocalDiscrepancy);
- }
- return maxLocalDiscrepancy;
- };
-
- /**
- * A discrepancy based metric for measuring timestamp jank.
- *
- * timestampsDiscrepancy quantifies the largest area of jank observed in a
- * series of timestamps. Note that this is different from metrics based on
- * the max_time_interval. For example, the time stamp series A = [0,1,2,3,5,6]
- * and B = [0,1,2,3,5,7] have the same max_time_interval = 2, but
- * Discrepancy(B) > Discrepancy(A).
- *
- * Two variants of discrepancy can be computed:
- *
- * Relative discrepancy is following the original definition of
- * discrepancy. It characterized the largest area of jank, relative to the
- * duration of the entire time stamp series. We normalize the raw results,
- * because the best case discrepancy for a set of N samples is 1/N (for
- * equally spaced samples), and we want our metric to report 0.0 in that
- * case.
- *
- * Absolute discrepancy also characterizes the largest area of jank, but its
- * value wouldn't change (except for imprecisions due to a low
- * |interval_multiplier|) if additional 'good' intervals were added to an
- * exisiting list of time stamps. Its range is [0,inf] and the unit is
- * milliseconds.
- *
- * The time stamp series C = [0,2,3,4] and D = [0,2,3,4,5] have the same
- * absolute discrepancy, but D has lower relative discrepancy than C.
- *
- * |timestamps| may be a list of lists S = [S_1, S_2, ..., S_N], where each
- * S_i is a time stamp series. In that case, the discrepancy D(S) is:
- * D(S) = max(D(S_1), D(S_2), ..., D(S_N))
- **/
- Statistics.timestampsDiscrepancy = function(timestamps, opt_absolute,
- opt_locationCount) {
- if (timestamps.length === 0)
- return 0.0;
-
- if (opt_absolute === undefined)
- opt_absolute = true;
-
- if (Array.isArray(timestamps[0])) {
- var rangeDiscrepancies = timestamps.map(function(r) {
- return Statistics.timestampsDiscrepancy(r);
- });
- return Math.max.apply(null, rangeDiscrepancies);
- }
-
- var s = Statistics.normalizeSamples(timestamps);
- var samples = s.normalized_samples;
- var sampleScale = s.scale;
- var discrepancy = Statistics.discrepancy(samples, opt_locationCount);
- var invSampleCount = 1.0 / samples.length;
- if (opt_absolute === true) {
- // Compute absolute discrepancy
- discrepancy /= sampleScale;
- } else {
- // Compute relative discrepancy
- discrepancy = tr.b.clamp(
- (discrepancy - invSampleCount) / (1.0 - invSampleCount), 0.0, 1.0);
- }
- return discrepancy;
- };
-
- /**
- * A discrepancy based metric for measuring duration jank.
- *
- * DurationsDiscrepancy computes a jank metric which measures how irregular a
- * given sequence of intervals is. In order to minimize jank, each duration
- * should be equally long. This is similar to how timestamp jank works,
- * and we therefore reuse the timestamp discrepancy function above to compute
- * a similar duration discrepancy number.
- *
- * Because timestamp discrepancy is defined in terms of timestamps, we first
- * convert the list of durations to monotonically increasing timestamps.
- *
- * Args:
- * durations: List of interval lengths in milliseconds.
- * absolute: See TimestampsDiscrepancy.
- * opt_locationCount: See TimestampsDiscrepancy.
- **/
- Statistics.durationsDiscrepancy = function(
- durations, opt_absolute, opt_locationCount) {
- if (durations.length === 0)
- return 0.0;
-
- var timestamps = durations.reduce(function(prev, curr, index, array) {
- prev.push(prev[prev.length - 1] + curr);
- return prev;
- }, [0]);
- return Statistics.timestampsDiscrepancy(
- timestamps, opt_absolute, opt_locationCount);
- };
-
- /**
- * Modifies |samples| in-place to reduce its length down to |count|.
- *
- * @param {!Array} samples
- * @param {number} count
- * @return {!Array}
- */
- Statistics.uniformlySampleArray = function(samples, count) {
- if (samples.length <= count) {
- return samples;
- }
- while (samples.length > count) {
- var i = parseInt(Math.random() * samples.length);
- samples.splice(i, 1);
- }
- return samples;
- };
-
- /**
- * A mechanism to uniformly sample elements from an arbitrary long stream.
- *
- * Call this method every time a new element is obtained from the stream,
- * passing always the same |samples| array and the |numSamples| you desire.
- * Also pass in the current |streamLength|, which is the same as the index of
- * |newElement| within that stream.
- *
- * The |samples| array will possibly be updated, replacing one of its element
- * with |newElements|. The length of |samples| will not be more than
- * |numSamples|.
- *
- * This method guarantees that after |streamLength| elements have been
- * processed each one has equal probability of being in |samples|. The order
- * of samples is not preserved though.
- *
- * Args:
- * samples: Array of elements that have already been selected. Start with [].
- * streamLength: The current length of the stream, up to |newElement|.
- * newElement: The element that was just extracted from the stream.
- * numSamples: The total number of samples desired.
- **/
- Statistics.uniformlySampleStream = function(samples, streamLength, newElement,
- numSamples) {
- if (streamLength <= numSamples) {
- if (samples.length >= streamLength)
- samples[streamLength - 1] = newElement;
- else
- samples.push(newElement);
- return;
- }
-
- var probToKeep = numSamples / streamLength;
- if (Math.random() > probToKeep)
- return; // New sample was rejected.
-
- // Keeping it, replace an alement randomly.
- var index = Math.floor(Math.random() * numSamples);
- samples[index] = newElement;
- };
-
- /**
- * A mechanism to merge two arrays of uniformly sampled elements in a way that
- * ensures elements in the final array are still sampled uniformly.
- *
- * This works similarly to sampleStreamUniform. The |samplesA| array will be
- * updated, some of its elements replaced by elements from |samplesB| in a
- * way that ensure that elements will be sampled uniformly.
- *
- * Args:
- * samplesA: Array of uniformly sampled elements, will be updated.
- * streamLengthA: The length of the stream from which |samplesA| was sampled.
- * samplesB: Other array of uniformly sampled elements, will NOT be updated.
- * streamLengthB: The length of the stream from which |samplesB| was sampled.
- * numSamples: The total number of samples desired, both in |samplesA| and
- * |samplesB|.
- **/
- Statistics.mergeSampledStreams = function(
- samplesA, streamLengthA,
- samplesB, streamLengthB, numSamples) {
- if (streamLengthB < numSamples) {
- // samplesB has not reached max capacity so every sample of stream B were
- // chosen with certainty. Add them one by one into samplesA.
- var nbElements = Math.min(streamLengthB, samplesB.length);
- for (var i = 0; i < nbElements; ++i) {
- Statistics.uniformlySampleStream(samplesA, streamLengthA + i + 1,
- samplesB[i], numSamples);
- }
- return;
- }
- if (streamLengthA < numSamples) {
- // samplesA has not reached max capacity so every sample of stream A were
- // chosen with certainty. Add them one by one into samplesB.
- var nbElements = Math.min(streamLengthA, samplesA.length);
- var tempSamples = samplesB.slice();
- for (var i = 0; i < nbElements; ++i) {
- Statistics.uniformlySampleStream(tempSamples, streamLengthB + i + 1,
- samplesA[i], numSamples);
- }
- // Copy that back into the first vector.
- for (var i = 0; i < tempSamples.length; ++i) {
- samplesA[i] = tempSamples[i];
- }
- return;
- }
-
- // Both sample arrays are at max capacity, use the power of maths!
- // Elements in samplesA have been selected with probability
- // numSamples / streamLengthA. Same for samplesB. For each index of the
- // array we keep samplesA[i] with probability
- // P = streamLengthA / (streamLengthA + streamLengthB)
- // and replace it with samplesB[i] with probability 1-P.
- // The total probability of keeping it is therefore
- // numSamples / streamLengthA *
- // streamLengthA / (streamLengthA + streamLengthB)
- // = numSamples / (streamLengthA + streamLengthB)
- // A similar computation shows we have the same probability of keeping any
- // element in samplesB. Magic!
- var nbElements = Math.min(numSamples, samplesB.length);
- var probOfSwapping = streamLengthB / (streamLengthA + streamLengthB);
- for (var i = 0; i < nbElements; ++i) {
- if (Math.random() < probOfSwapping) {
- samplesA[i] = samplesB[i];
- }
- }
- };
-
- /* Continuous distributions are defined by probability density functions.
- *
- * Random variables are referred to by capital letters: X, Y, Z.
- * Particular values from these distributions are referred to by lowercase
- * letters like |x|.
- * The probability that |X| ever exactly equals |x| is P(X==x) = 0.
- *
- * For a discrete probability distribution, see tr.v.Histogram.
- */
- function Distribution() {
- }
-
- Distribution.prototype = {
- /* The probability density of the random variable at value |x| is the
- * relative likelihood for this random variable to take on the given value
- * |x|.
- *
- * @param {number} x A value from the random distribution.
- * @return {number} probability density at x.
- */
- computeDensity: function(x) {
- throw Error('Not implemented');
- },
-
- /* A percentile is the probability that a sample from the distribution is
- * less than the given value |x|. This function is monotonically increasing.
- *
- * @param {number} x A value from the random distribution.
- * @return {number} P(X<x).
- */
- computePercentile: function(x) {
- throw Error('Not implemented');
- },
-
- /* A complementary percentile is the probability that a sample from the
- * distribution is greater than the given value |x|. This function is
- * monotonically decreasing.
- *
- * @param {number} x A value from the random distribution.
- * @return {number} P(X>x).
- */
- computeComplementaryPercentile: function(x) {
- return 1 - this.computePercentile(x);
- },
-
- /* Compute the mean of the probability distribution.
- *
- * @return {number} mean.
- */
- get mean() {
- throw Error('Not implemented');
- },
-
- /* The mode of a distribution is the most likely value.
- * The maximum of the computeDensity() function is at this mode.
- * @return {number} mode.
- */
- get mode() {
- throw Error('Not implemented');
- },
-
- /* The median is the center value of the distribution.
- * computePercentile(median) = computeComplementaryPercentile(median) = 0.5
- *
- * @return {number} median.
- */
- get median() {
- throw Error('Not implemented');
- },
-
- /* The standard deviation is a measure of how dispersed or spread out the
- * distribution is (this statistic has the same units as the values).
- *
- * @return {number} standard deviation.
- */
- get standardDeviation() {
- throw Error('Not implemented');
- },
-
- /* An alternative measure of how spread out the distribution is,
- * the variance is the square of the standard deviation.
- * @return {number} variance.
- */
- get variance() {
- throw Error('Not implemented');
- }
- };
-
- Statistics.UniformDistribution = function(opt_range) {
- if (!opt_range)
- opt_range = tr.b.Range.fromExplicitRange(0, 1);
- this.range = opt_range;
- };
-
- Statistics.UniformDistribution.prototype = {
- __proto__: Distribution.prototype,
-
- computeDensity: function(x) {
- return 1 / this.range.range;
- },
-
- computePercentile: function(x) {
- return tr.b.normalize(x, this.range.min, this.range.max);
- },
-
- get mean() {
- return this.range.center;
- },
-
- get mode() {
- return undefined;
- },
-
- get median() {
- return this.mean;
- },
-
- get standardDeviation() {
- return Math.sqrt(this.variance);
- },
-
- get variance() {
- return Math.pow(this.range.range, 2) / 12;
- }
- };
-
- /* The Normal or Gaussian distribution, or bell curve, is common in complex
- * processes such as are found in many of the natural sciences. If Z is the
- * standard normal distribution with mean = 0 and variance = 1, then the
- * general normal distribution is Y = mean + Z*sqrt(variance).
- * https://www.desmos.com/calculator/tqtbjm4s3z
- */
- Statistics.NormalDistribution = function(opt_mean, opt_variance) {
- this.mean_ = opt_mean || 0;
- this.variance_ = opt_variance || 1;
- this.standardDeviation_ = Math.sqrt(this.variance_);
- };
-
- Statistics.NormalDistribution.prototype = {
- __proto__: Distribution.prototype,
-
- computeDensity: function(x) {
- var scale = (1.0 / (this.standardDeviation * Math.sqrt(2.0 * Math.PI)));
- var exponent = -Math.pow(x - this.mean, 2) / (2.0 * this.variance);
- return scale * Math.exp(exponent);
- },
-
- computePercentile: function(x) {
- var standardizedX = ((x - this.mean) /
- Math.sqrt(2.0 * this.variance));
- return (1.0 + tr.b.erf(standardizedX)) / 2.0;
- },
-
- get mean() {
- return this.mean_;
- },
-
- get median() {
- return this.mean;
- },
-
- get mode() {
- return this.mean;
- },
-
- get standardDeviation() {
- return this.standardDeviation_;
- },
-
- get variance() {
- return this.variance_;
- }
- };
-
- /* The log-normal distribution is a continuous probability distribution of a
- * random variable whose logarithm is normally distributed.
- * If Y is the general normal distribution, then X = exp(Y) is the general
- * log-normal distribution.
- * X will have different parameters from Y,
- * so the mean of Y is called the "location" of X,
- * and the standard deviation of Y is called the "shape" of X.
- * The standard lognormal distribution exp(Z) has location = 0 and shape = 1.
- * https://www.desmos.com/calculator/tqtbjm4s3z
- */
- Statistics.LogNormalDistribution = function(opt_location, opt_shape) {
- this.normalDistribution_ = new Statistics.NormalDistribution(
- opt_location, Math.pow(opt_shape || 1, 2));
- };
-
- Statistics.LogNormalDistribution.prototype = {
- __proto__: Statistics.NormalDistribution.prototype,
-
- computeDensity: function(x) {
- return this.normalDistribution_.computeDensity(Math.log(x)) / x;
- },
-
- computePercentile: function(x) {
- return this.normalDistribution_.computePercentile(Math.log(x));
- },
-
- get mean() {
- return Math.exp(this.normalDistribution_.mean +
- (this.normalDistribution_.variance / 2));
- },
-
- get variance() {
- var nm = this.normalDistribution_.mean;
- var nv = this.normalDistribution_.variance;
- return (Math.exp(2 * (nm + nv)) -
- Math.exp(2 * nm + nv));
- },
-
- get standardDeviation() {
- return Math.sqrt(this.variance);
- },
-
- get median() {
- return Math.exp(this.normalDistribution_.mean);
- },
-
- get mode() {
- return Math.exp(this.normalDistribution_.mean -
- this.normalDistribution_.variance);
- }
- };
-
- /**
- * Instead of describing a LogNormalDistribution in terms of its "location"
- * and "shape", it can also be described in terms of its median
- * and the point at which its complementary cumulative distribution
- * function bends between the linear-ish region in the middle and the
- * exponential-ish region. When the distribution is used to compute
- * percentiles for log-normal random processes such as latency, as the latency
- * improves, it hits a point of diminishing returns, when it becomes
- * relatively difficult to improve the score further. This point of
- * diminishing returns is the first x-intercept of the third derivative of the
- * CDF, which is the second derivative of the PDF.
- *
- * https://www.desmos.com/calculator/cg5rnftabn
- *
- * @param {number} median The median of the distribution.
- * @param {number} diminishingReturns The point of diminishing returns.
- * @return {LogNormalDistribution}
- */
- Statistics.LogNormalDistribution.fromMedianAndDiminishingReturns =
- function(median, diminishingReturns) {
- diminishingReturns = Math.log(diminishingReturns / median);
- var shape = Math.sqrt(1 - 3 * diminishingReturns -
- Math.sqrt(Math.pow(diminishingReturns - 3, 2) - 8)) / 2;
- var location = Math.log(median);
- return new Statistics.LogNormalDistribution(location, shape);
- };
-
- // p-values less than this indicate statistical significance.
- Statistics.DEFAULT_ALPHA = 0.01;
-
- // If a statistical significant difference has not been established with
- // this many observations per sample, we'll assume none exists.
- Statistics.MAX_SUGGESTED_SAMPLE_SIZE = 20;
-
- /** @enum */
- Statistics.Significance = {
- SIGNIFICANT: 'REJECT',
- INSIGNIFICANT: 'FAIL_TO_REJECT',
- NEED_MORE_DATA: 'NEED_MORE_DATA',
- DONT_CARE: 'DONT_CARE',
- };
-
-
- /**
- * @typedef {Object} HypothesisTestResult
- * @property {number} p
- * @property {number} U
- * @property {!tr.b.Statistics.Significance} significance
- */
-
- /**
- * @param {!Array.<number>} a
- * @param {!Array.<number>} b
- * @param {number=} opt_alpha
- * @param {number=} opt_reqSampleSize
- * @return {!HypothesisTestResult}
- */
- Statistics.mwu = function(a, b, opt_alpha, opt_reqSampleSize) {
- var result = mannwhitneyu.test(a, b);
- var alpha = opt_alpha || Statistics.DEFAULT_ALPHA;
- if (result.p < alpha) {
- result.significance = Statistics.Significance.SIGNIFICANT;
- } else if (opt_reqSampleSize && (a.length < opt_reqSampleSize ||
- b.length < opt_reqSampleSize)) {
- result.significance = Statistics.Significance.NEED_MORE_DATA;
- } else {
- result.significance = Statistics.Significance.INSIGNIFICANT;
- }
- return result;
- };
-
- return {
- Statistics: Statistics
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/statistics_test.html b/chromium/third_party/catapult/tracing/tracing/base/statistics_test.html
deleted file mode 100644
index 2b243c93dc8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/statistics_test.html
+++ /dev/null
@@ -1,577 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/statistics.html">
-<script>
-'use strict';
-
-// TODO(charliea): Remove:
-/* eslint-disable catapult-camelcase */
-
-tr.b.unittest.testSuite(function() {
- var Statistics = tr.b.Statistics;
-
- /**
- * Lloyd relaxation in 1D.
- *
- * Keeps the position of the first and last sample.
- **/
- function relax(samples, opt_iterations) {
- opt_iterations = opt_iterations || 10;
- for (var i = 0; i < opt_iterations; i++) {
- var voronoiBoundaries = [];
- for (var j = 1; j < samples.length; j++)
- voronoiBoundaries.push((samples[j] + samples[j - 1]) * 0.5);
-
- var relaxedSamples = [];
- relaxedSamples.push(samples[0]);
- for (var j = 1; j < samples.length - 1; j++) {
- relaxedSamples.push(
- (voronoiBoundaries[j - 1] + voronoiBoundaries[j]) * 0.5);
- }
- relaxedSamples.push(samples[samples.length - 1]);
- samples = relaxedSamples;
- }
- return samples;
- }
-
- function createRandomSamples(numSamples) {
- var samples = [];
- var position = 0.0;
- samples.push(position);
- for (var i = 1; i < numSamples; i++) {
- position += Math.random();
- samples.push(position);
- }
- return samples;
- }
-
- test('normalDistribution', function() {
- for (var mean = -100; mean <= 100; mean += 25) {
- for (var stddev = 0.1; stddev < 2; stddev += 0.2) {
- var dist = new Statistics.NormalDistribution(mean, stddev * stddev);
- assert.closeTo(mean, dist.mean, 1e-6);
- assert.closeTo(stddev, dist.standardDeviation, 1e-6);
- assert.closeTo(0, dist.standardDeviation * dist.computeDensity(
- -1e10), 1e-5);
- assert.closeTo(0.05399, dist.standardDeviation * dist.computeDensity(
- dist.mean - 2 * dist.standardDeviation), 1e-5);
- assert.closeTo(0.24197, dist.standardDeviation * dist.computeDensity(
- dist.mean - dist.standardDeviation), 1e-5);
- assert.closeTo(0.39894, dist.standardDeviation * dist.computeDensity(
- dist.mean), 1e-5);
- assert.closeTo(0.24197, dist.standardDeviation * dist.computeDensity(
- dist.mean + dist.standardDeviation), 1e-5);
- assert.closeTo(0.054, dist.standardDeviation * dist.computeDensity(
- dist.mean + 2 * dist.standardDeviation), 1e-5);
- assert.closeTo(0, dist.standardDeviation * dist.computeDensity(
- 1e10), 1e-5);
-
- assert.closeTo(0, dist.computePercentile(-1e10), 1e-5);
- assert.closeTo(0.02275, dist.computePercentile(
- dist.mean - 2 * dist.standardDeviation), 1e-5);
- assert.closeTo(0.15866, dist.computePercentile(
- dist.mean - dist.standardDeviation), 1e-5);
- assert.closeTo(0.5, dist.computePercentile(dist.mean), 1e-5);
- assert.closeTo(0.841344, dist.computePercentile(
- dist.mean + dist.standardDeviation), 1e-5);
- assert.closeTo(0.97725, dist.computePercentile(
- dist.mean + 2 * dist.standardDeviation), 1e-5);
- assert.closeTo(1, dist.computePercentile(1e10), 1e-5);
- }
- }
- });
-
- test('logNormalDistribution', function() {
- // Unlike the Normal distribution, the LogNormal distribution can look very
- // different depending on its parameters, and it's defined in terms of the
- // Normal distribution anyway, so only test the standard LogNormal
- // distribution.
- var dist = new Statistics.LogNormalDistribution(0, 1);
- assert.closeTo(0.3678, dist.mode, 1e-4);
- assert.closeTo(1, dist.median, 1e-6);
- assert.closeTo(1.6487, dist.mean, 1e-4);
- assert.closeTo(0.65774, dist.computeDensity(dist.mode), 1e-5);
- assert.closeTo(0.39894, dist.computeDensity(dist.median), 1e-5);
- assert.closeTo(0.21354, dist.computeDensity(dist.mean), 1e-5);
- assert.closeTo(0, dist.computePercentile(1e-10), 1e-6);
- assert.closeTo(0.15865, dist.computePercentile(dist.mode), 1e-5);
- assert.closeTo(0.5, dist.computePercentile(dist.median), 1e-6);
- assert.closeTo(0.69146, dist.computePercentile(dist.mean), 1e-5);
- assert.closeTo(1, dist.computePercentile(1e100), 1e-5);
- });
-
- test('divideIfPossibleOrZero', function() {
- assert.equal(Statistics.divideIfPossibleOrZero(1, 2), 0.5);
- assert.equal(Statistics.divideIfPossibleOrZero(0, 2), 0);
- assert.equal(Statistics.divideIfPossibleOrZero(1, 0), 0);
- assert.equal(Statistics.divideIfPossibleOrZero(0, 0), 0);
- });
-
- test('sumBasic', function() {
- assert.equal(Statistics.sum([1, 2, 3]), 6);
- });
-
- test('sumWithFunctor', function() {
- var ctx = {};
- var ary = [1, 2, 3];
- assert.equal(12, Statistics.sum(ary, function(x, i) {
- assert.equal(this, ctx);
- assert.equal(ary[i], x);
- return x * 2;
- }, ctx));
- });
-
- test('minMaxWithFunctor', function() {
- var ctx = {};
- var ary = [1, 2, 3];
- function func(x, i) {
- assert.equal(this, ctx);
- assert.equal(ary[i], x);
- return x;
- }
- assert.equal(Statistics.max(ary, func, ctx), 3);
- assert.equal(Statistics.min(ary, func, ctx), 1);
-
- var range = Statistics.range(ary, func, ctx);
- assert.isFalse(range.isEmpty);
- assert.equal(range.min, 1);
- assert.equal(range.max, 3);
- });
-
- test('maxExtrema', function() {
- assert.equal(Statistics.max([]), -Infinity);
- assert.equal(Statistics.min([]), Infinity);
- });
-
- test('meanBasic', function() {
- assert.closeTo(Statistics.mean([1, 2, 3]), 2, 1e-6);
- assert.closeTo(Statistics.mean(new Set([1, 2, 3])), 2, 1e-6);
- });
-
- test('geometricMean', function() {
- assert.strictEqual(1, Statistics.geometricMean([]));
- assert.strictEqual(1, Statistics.geometricMean([1]));
- assert.strictEqual(0, Statistics.geometricMean([-1]));
- assert.strictEqual(0, Statistics.geometricMean([0]));
- assert.strictEqual(0, Statistics.geometricMean([1, 2, 3, 0]));
- assert.strictEqual(0, Statistics.geometricMean([1, 2, 3, -1]));
- assert.strictEqual(1, Statistics.geometricMean([1, 1, 1]));
- assert.strictEqual(2, Statistics.geometricMean([2]));
- assert.closeTo(Math.sqrt(6), Statistics.geometricMean([2, 3]), 1e-6);
- assert.closeTo(6, Statistics.geometricMean(new Set([4, 9])), 1e-6);
-
- var samples = [];
- for (var i = 0; i < 1e3; ++i)
- samples.push(Number.MAX_SAFE_INTEGER);
- assert.closeTo(Number.MAX_SAFE_INTEGER, Statistics.geometricMean(samples),
- Number.MAX_SAFE_INTEGER * 1e-13);
-
- samples = [];
- for (var i = 0; i < 1e3; ++i)
- samples.push(Number.MAX_VALUE / 1e3);
- assert.closeTo(Number.MAX_VALUE / 1e3, Statistics.geometricMean(samples),
- Number.MAX_VALUE * 1e-13);
- });
-
- test('weightedMean', function() {
- function getWeight(element) {
- return element.weight;
- }
- function getValue(element) {
- return element.value;
- }
-
- var data = [
- {value: 10, weight: 3},
- {value: 20, weight: 1},
- {value: 30, weight: 6}
- ];
- assert.equal(23, Statistics.weightedMean(data, getWeight, getValue));
-
- data = [
- {value: 10, weight: 0},
- {value: 20, weight: 0},
- {value: 30, weight: 0}
- ];
- assert.equal(undefined, Statistics.weightedMean(data, getWeight, getValue));
-
- data = [
- {value: 10, weight: -10},
- {value: 20, weight: 5},
- {value: 30, weight: 5}
- ];
- assert.equal(undefined, Statistics.weightedMean(data, getWeight, getValue));
- });
-
- test('weightedMean_positionDependent', function() {
- function getWeight(element, idx) {
- return idx;
- }
- // 3 has weight of 0, 6 has weight of 1, 9 has weight of 2
- assert.equal(8, Statistics.weightedMean([3, 6, 9], getWeight));
- });
-
- test('max_positionDependent', function() {
- function getValue(element, idx) {
- return element * idx;
- }
- assert.equal(6, Statistics.max([1, 2, 3], getValue));
- });
-
- test('min_positionDependent', function() {
- function getValue(element, idx) {
- return element * idx;
- }
- assert.equal(-6, Statistics.min([1, 2, -3], getValue));
- });
-
- test('varianceBasic', function() {
- // In [2, 4, 4, 2], all items have a deviation of 1.0 from the mean so the
- // population variance is 4.0 / 4 = 1.0, but the sample variance is 4.0 / 3.
- assert.equal(Statistics.variance([2, 4, 4, 2]), 4.0 / 3);
-
- // In [1, 2, 3], the squared deviations are 1.0, 0.0 and 1.0 respectively;
- // population variance 2.0 / 3 but sample variance is 2.0 / 2 = 1.0.
- assert.equal(Statistics.variance([1, 2, 3]), 1.0);
- });
-
- test('varianceWithFunctor', function() {
- var ctx = {};
- var ary = [{x: 2},
- {x: 4},
- {x: 4},
- {x: 2}];
- assert.equal(4.0 / 3, Statistics.variance(ary, function(d) {
- assert.equal(ctx, this);
- return d.x;
- }, ctx));
- });
-
- test('stddevBasic', function() {
- assert.equal(Statistics.stddev([2, 4, 4, 2]), Math.sqrt(4.0 / 3));
- });
-
- test('stddevWithFunctor', function() {
- var ctx = {};
- var ary = [{x: 2},
- {x: 4},
- {x: 4},
- {x: 2}];
- assert.equal(Math.sqrt(4.0 / 3), Statistics.stddev(ary, function(d) {
- assert.equal(ctx, this);
- return d.x;
- }, ctx));
- });
-
- test('percentile', function() {
- var ctx = {};
- var ary = [{x: 0},
- {x: 1},
- {x: 2},
- {x: 3},
- {x: 4},
- {x: 5},
- {x: 6},
- {x: 7},
- {x: 8},
- {x: 9}];
- function func(d, i) {
- assert.equal(ctx, this);
- return d.x;
- }
- assert.equal(Statistics.percentile(ary, 0, func, ctx), 0);
- assert.equal(Statistics.percentile(ary, .5, func, ctx), 4);
- assert.equal(Statistics.percentile(ary, .75, func, ctx), 6);
- assert.equal(Statistics.percentile(ary, 1, func, ctx), 9);
- });
-
- test('percentile_positionDependent', function() {
- var ctx = {};
- var ary = [{x: 0},
- {x: 1},
- {x: 2},
- {x: 3},
- {x: 4},
- {x: 5},
- {x: 6},
- {x: 7},
- {x: 8},
- {x: 9}];
- function func(d, i) {
- assert.equal(ctx, this);
- assert.equal(d.x, i);
- return d.x * i;
- }
- assert.equal(Statistics.percentile(ary, 0, func, ctx), 0);
- assert.equal(Statistics.percentile(ary, .5, func, ctx), 16);
- assert.equal(Statistics.percentile(ary, .75, func, ctx), 36);
- assert.equal(Statistics.percentile(ary, 1, func, ctx), 81);
- });
-
- test('normalizeSamples', function() {
- var samples = [];
- var results = Statistics.normalizeSamples(samples);
- assert.deepEqual(results.normalized_samples, []);
- assert.deepEqual(results.scale, 1.0);
-
- samples = [0.0, 0.0];
- results = Statistics.normalizeSamples(samples);
- assert.deepEqual(results.normalized_samples, [0.5, 0.5]);
- assert.deepEqual(results.scale, 1.0);
-
- samples = [0.0, 1.0 / 3.0, 2.0 / 3.0, 1.0];
- results = Statistics.normalizeSamples(samples);
- assert.deepEqual(results.normalized_samples,
- [1.0 / 8.0, 3.0 / 8.0, 5.0 / 8.0, 7.0 / 8.0]);
- assert.deepEqual(results.scale, 0.75);
-
- samples = [1.0 / 8.0, 3.0 / 8.0, 5.0 / 8.0, 7.0 / 8.0];
- results = Statistics.normalizeSamples(samples);
- assert.deepEqual(results.normalized_samples, samples);
- assert.deepEqual(results.scale, 1.0);
- });
-
- /**
- *Tests NormalizeSamples and Discrepancy with random samples.
- *
- * Generates 10 sets of 10 random samples, computes the discrepancy,
- * relaxes the samples using Llloyd's algorithm in 1D, and computes the
- * discrepancy of the relaxed samples. Discrepancy of the relaxed samples
- * must be less than or equal to the discrepancy of the original samples.
- **/
- test('discrepancy_Random', function() {
- for (var i = 0; i < 10; i++) {
- var samples = createRandomSamples(10);
- var samples = Statistics.normalizeSamples(samples).normalized_samples;
- var d = Statistics.discrepancy(samples);
- var relaxedSamples = relax(samples);
- var dRelaxed = Statistics.discrepancy(relaxedSamples);
- assert.isBelow(dRelaxed, d);
- }
- });
-
-
- /* Computes discrepancy for sample sets with known statistics. */
- test('discrepancy_Analytic', function() {
- var samples = [];
- var d = Statistics.discrepancy(samples);
- assert.equal(d, 0.0);
-
- samples = [0.5];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 0.5);
-
- samples = [0.0, 1.0];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 1.0);
-
- samples = [0.5, 0.5, 0.5];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 1.0);
-
- samples = [1.0 / 8.0, 3.0 / 8.0, 5.0 / 8.0, 7.0 / 8.0];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 0.25);
-
- samples = [1.0 / 8.0, 5.0 / 8.0, 5.0 / 8.0, 7.0 / 8.0];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 0.5);
-
- samples = [1.0 / 8.0, 3.0 / 8.0, 5.0 / 8.0, 5.0 / 8.0, 7.0 / 8.0];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 0.4);
-
- samples = [0.0, 1.0 / 3.0, 2.0 / 3.0, 1.0];
- d = Statistics.discrepancy(samples);
- assert.equal(d, 0.5);
-
- samples = Statistics.normalizeSamples(samples).normalized_samples;
- d = Statistics.discrepancy(samples);
- assert.equal(d, 0.25);
- });
-
- test('timestampsDiscrepancy', function() {
- var timestamps = [];
- var dAbs = Statistics.timestampsDiscrepancy(timestamps, true);
- assert.equal(dAbs, 0.0);
-
- timestamps = [4];
- dAbs = Statistics.timestampsDiscrepancy(timestamps, true);
- assert.equal(dAbs, 0.5);
-
- var timestampsA = [0, 1, 2, 3, 5, 6];
- var timestampsB = [0, 1, 2, 3, 5, 7];
- var timestampsC = [0, 2, 3, 4];
- var timestampsD = [0, 2, 3, 4, 5];
-
-
- var dAbsA = Statistics.timestampsDiscrepancy(timestampsA, true);
- var dAbsB = Statistics.timestampsDiscrepancy(timestampsB, true);
- var dAbsC = Statistics.timestampsDiscrepancy(timestampsC, true);
- var dAbsD = Statistics.timestampsDiscrepancy(timestampsD, true);
- var dRelA = Statistics.timestampsDiscrepancy(timestampsA, false);
- var dRelB = Statistics.timestampsDiscrepancy(timestampsB, false);
- var dRelC = Statistics.timestampsDiscrepancy(timestampsC, false);
- var dRelD = Statistics.timestampsDiscrepancy(timestampsD, false);
-
-
- assert.isBelow(dAbsA, dAbsB);
- assert.isBelow(dRelA, dRelB);
- assert.isBelow(dRelD, dRelC);
- assert.closeTo(dAbsD, dAbsC, 0.0001);
- });
-
- test('discrepancyMultipleRanges', function() {
- var samples = [[0.0, 1.2, 2.3, 3.3], [6.3, 7.5, 8.4], [4.2, 5.4, 5.9]];
- var d0 = Statistics.timestampsDiscrepancy(samples[0]);
- var d1 = Statistics.timestampsDiscrepancy(samples[1]);
- var d2 = Statistics.timestampsDiscrepancy(samples[2]);
- var d = Statistics.timestampsDiscrepancy(samples);
- assert.equal(d, Math.max(d0, d1, d2));
- });
-
- /**
- * Tests approimate discrepancy implementation by comparing to exact
- * solution.
- **/
- test('approximateDiscrepancy', function() {
- for (var i = 0; i < 5; i++) {
- var samples = createRandomSamples(10);
- samples = Statistics.normalizeSamples(samples).normalized_samples;
- var d = Statistics.discrepancy(samples);
- var dApprox = Statistics.discrepancy(samples, 500);
- assert.closeTo(d, dApprox, 0.01);
- }
- });
-
- test('durationsDiscrepancy', function() {
- var durations = [];
- var d = Statistics.durationsDiscrepancy(durations);
- assert.equal(d, 0.0);
-
- durations = [4];
- d = Statistics.durationsDiscrepancy(durations);
- assert.equal(d, 4.0);
-
- var durationsA = [1, 1, 1, 1, 1];
- var durationsB = [1, 1, 2, 1, 1];
- var durationsC = [1, 2, 1, 2, 1];
-
- var dA = Statistics.durationsDiscrepancy(durationsA);
- var dB = Statistics.durationsDiscrepancy(durationsB);
- var dC = Statistics.durationsDiscrepancy(durationsC);
-
- assert.isBelow(dA, dB);
- assert.isBelow(dB, dC);
- });
-
- test('uniformlySampleArray', function() {
- var samples = ['A', 'B', 'C', 'D', 'E'];
- for (var i = samples.length; i >= 0; --i) {
- Statistics.uniformlySampleArray(samples, i);
- assert.lengthOf(samples, i);
- }
- });
-
- test('uniformlySampleStream', function() {
- var samples = [];
- Statistics.uniformlySampleStream(samples, 1, 'A', 5);
- assert.deepEqual(['A'], samples);
- Statistics.uniformlySampleStream(samples, 2, 'B', 5);
- Statistics.uniformlySampleStream(samples, 3, 'C', 5);
- Statistics.uniformlySampleStream(samples, 4, 'D', 5);
- Statistics.uniformlySampleStream(samples, 5, 'E', 5);
- assert.deepEqual(['A', 'B', 'C', 'D', 'E'], samples);
-
- Statistics.uniformlySampleStream(samples, 6, 'F', 5);
- // Can't really assert anything more than the length since the elements are
- // drawn at random.
- assert.equal(samples.length, 5);
-
- // Try starting with a non-empty array.
- samples = [0, 0, 0];
- Statistics.uniformlySampleStream(samples, 1, 'G', 5);
- assert.deepEqual(['G', 0, 0], samples);
- });
-
- test('mergeSampledStreams', function() {
- var samples = [];
- Statistics.mergeSampledStreams(samples, 0, ['A'], 1, 5);
- assert.deepEqual(['A'], samples);
- Statistics.mergeSampledStreams(samples, 1, ['B', 'C', 'D', 'E'], 4, 5);
- assert.deepEqual(['A', 'B', 'C', 'D', 'E'], samples);
-
- Statistics.mergeSampledStreams(samples, 9, ['F', 'G', 'H', 'I', 'J'], 7, 5);
- // Can't really assert anything more than the length since the elements are
- // drawn at random.
- assert.equal(samples.length, 5);
-
- var samples = ['A', 'B'];
- Statistics.mergeSampledStreams(samples, 2, ['F', 'G', 'H', 'I', 'J'], 7, 5);
- assert.equal(samples.length, 5);
- });
-
- test('mannWhitneyUTestSmokeTest', function() {
- // x < 0.01
- var sampleA = [1, 2, 2.1, 2.2, 2, 1];
- var sampleB = [12, 13, 13.1, 13.2, 13, 12];
- var results = Statistics.mwu(sampleA, sampleB);
- assert.isBelow(results.p, 0.1);
-
- // 0.01 < x < 0.1
- sampleA = [1, 2, 2.1, 2.2, 2, 1];
- sampleB = [2, 3, 3.1, 3.2, 3, 2];
- results = Statistics.mwu(sampleA, sampleB);
- assert.isBelow(results.p, 0.1);
- assert.isAbove(results.p, 0.01);
-
- // 0.1 < x
- sampleA = [1, 2, 2.1, 2.2, 2, 1];
- sampleB = [1, 2, 2.1, 2.2, 2, 1];
- results = Statistics.mwu(sampleA, sampleB);
- assert.isAbove(results.p, 0.1);
- });
-
- test('mannWhitneyUEdgeCases', function() {
- var longRepeatingSample = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
- var emptySample = [];
- var singleLargeValue = [1000000];
- // mean 10, std 2
- var normallyDistributedSample = [
- 8.341540e+0, 7.216640e+0, 8.844310e+0, 9.801980e+0, 1.048760e+1,
- 6.915150e+0, 7.881740e+0, 1.131160e+1, 9.959400e+0, 9.030880e+0
- ];
- // Identical samples should not cause the null to be rejected.
- var results = Statistics.mwu(longRepeatingSample, longRepeatingSample);
- assert.isAbove(results.p, 0.05);
- results = Statistics.mwu(normallyDistributedSample,
- normallyDistributedSample);
- assert.isAbove(results.p, 0.05);
- results = Statistics.mwu(singleLargeValue, singleLargeValue);
-
- // A single value is generally not sufficient to reject the null, no matter
- // how far off it is.
- results = Statistics.mwu(normallyDistributedSample, singleLargeValue);
- assert.isAbove(results.p, 0.05);
-
- // A single value way outside the first sample may be enough to reject,
- // if the first sample is large enough.
- results = Statistics.mwu(longRepeatingSample, singleLargeValue);
- assert.isBelow(results.p, 0.005);
-
- // Empty samples should not be comparable.
- results = Statistics.mwu(emptySample, emptySample);
- assert(isNaN(results.p));
-
- // The result of comparing a sample against an empty sample should not be a
- // valid p value. NOTE: The current implementation returns 0, it is up to
- // the caller to interpret this.
- results = Statistics.mwu(normallyDistributedSample, emptySample);
- assert(!results.p);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/task.html b/chromium/third_party/catapult/tracing/tracing/base/task.html
deleted file mode 100644
index 54f8e852d4a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/task.html
+++ /dev/null
@@ -1,186 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/timing.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var Timing = tr.b.Timing;
- /**
- * A task is a combination of a run callback, a set of subtasks, and an after
- * task.
- *
- * When executed, a task does the following things:
- * 1. Runs its callback
- * 2. Runs its subtasks
- * 3. Runs its after callback.
- *
- * The list of subtasks and after task can be mutated inside step #1 but as
- * soon as the task's callback returns, the subtask list and after task is
- * fixed and cannot be changed again.
- *
- * Use task.after().after().after() to describe the toplevel passes that make
- * up your computation. Then, use subTasks to add detail to each subtask as it
- * runs. For example:
- * var pieces = [];
- * taskA = new Task(function() { pieces = getPieces(); });
- * taskA.after(function(taskA) {
- * pieces.forEach(function(piece) {
- * taskA.subTask(function(taskB) { piece.process(); }, this);
- * });
- * });
- *
- * @constructor
- */
- function Task(runCb, thisArg) {
- if (runCb !== undefined && thisArg === undefined)
- throw new Error('Almost certainly, you meant to pass a thisArg.');
- this.runCb_ = runCb;
- this.thisArg_ = thisArg;
- this.afterTask_ = undefined;
- this.subTasks_ = [];
- }
-
- Task.prototype = {
- get name() {
- return this.runCb_.name;
- },
-
- /*
- * See constructor documentation on semantics of subtasks.
- */
- subTask: function(cb, thisArg) {
- if (cb instanceof Task)
- this.subTasks_.push(cb);
- else
- this.subTasks_.push(new Task(cb, thisArg));
- return this.subTasks_[this.subTasks_.length - 1];
- },
-
- /**
- * Runs the current task and returns the task that should be executed next.
- */
- run: function() {
- if (this.runCb_ !== undefined)
- this.runCb_.call(this.thisArg_, this);
- var subTasks = this.subTasks_;
- this.subTasks_ = undefined; // Prevent more subTasks from being posted.
-
- if (!subTasks.length)
- return this.afterTask_;
-
- // If there are subtasks, then we want to execute all the subtasks and
- // then this task's afterTask. To make this happen, we update the
- // afterTask of all the subtasks so the point upward to each other, e.g.
- // subTask[0].afterTask to subTask[1] and so on. Then, the last subTask's
- // afterTask points at this task's afterTask.
- for (var i = 1; i < subTasks.length; i++)
- subTasks[i - 1].afterTask_ = subTasks[i];
- subTasks[subTasks.length - 1].afterTask_ = this.afterTask_;
- return subTasks[0];
- },
-
- /*
- * See constructor documentation on semantics of after tasks.
- */
- after: function(cb, thisArg) {
- if (this.afterTask_)
- throw new Error('Has an after task already');
- if (cb instanceof Task)
- this.afterTask_ = cb;
- else
- this.afterTask_ = new Task(cb, thisArg);
- return this.afterTask_;
- },
-
- /*
- * See constructor documentation on semantics of after tasks.
- * Note: timedAfter doesn't work when a task throws an exception.
- * This is because task system doesn't support catching currently.
- * At the time of writing, this is considered to be an acceptable tradeoff.
- */
- timedAfter: function(groupName, cb, thisArg, opt_args) {
- if (cb.name === '')
- throw new Error('Anonymous Task is not allowed');
- return this.namedTimedAfter(groupName, cb.name, cb, thisArg, opt_args);
- },
-
- /*
- * See constructor documentation on semantics of after tasks.
- * Note: namedTimedAfter doesn't work when a task throws an exception.
- * This is because task system doesn't support catching currently.
- * At the time of writing, this is considered to be an acceptable tradeoff.
- */
- namedTimedAfter: function(groupName, name, cb, thisArg, opt_args) {
- if (this.afterTask_)
- throw new Error('Has an after task already');
- var realTask;
- if (cb instanceof Task)
- realTask = cb;
- else
- realTask = new Task(cb, thisArg);
- this.afterTask_ = new Task(function(task) {
- var markedTask = Timing.mark(groupName, name, opt_args);
- task.subTask(realTask, thisArg);
- task.subTask(function() {
- markedTask.end();
- }, thisArg);
- }, thisArg);
- return this.afterTask_;
- },
-
- /*
- * Adds a task after the chain of tasks.
- */
- enqueue: function(cb, thisArg) {
- var lastTask = this;
- while (lastTask.afterTask_)
- lastTask = lastTask.afterTask_;
- return lastTask.after(cb, thisArg);
- }
- };
-
- Task.RunSynchronously = function(task) {
- var curTask = task;
- while (curTask)
- curTask = curTask.run();
- }
-
- /**
- * Runs a task using raf.requestIdleCallback, returning
- * a promise for its completion.
- */
- Task.RunWhenIdle = function(task) {
- return new Promise(function(resolve, reject) {
- var curTask = task;
- function runAnother() {
- try {
- curTask = curTask.run();
- } catch (e) {
- reject(e);
- console.error(e.stack);
- return;
- }
-
- if (curTask) {
- tr.b.requestIdleCallback(runAnother);
- return;
- }
-
- resolve();
- }
- tr.b.requestIdleCallback(runAnother);
- });
- }
-
- return {
- Task: Task
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/task_test.html b/chromium/third_party/catapult/tracing/tracing/base/task_test.html
deleted file mode 100644
index 59a6f6936d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/task_test.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/task.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Task = tr.b.Task;
-
- test('basicAllStepsPass', function() {
- var results = [];
-
- var startingTask = new Task(function(task) {
- results.push('a');
- task.subTask(function() {
- results.push('a/1');
- }, this);
- task.subTask(function() {
- results.push('a/2');
- }, this);
- }, this);
- startingTask.after(function() {
- results.push('b');
- }, this).after(function() {
- results.push('c');
- }, this);
-
- Task.RunSynchronously(startingTask);
- assert.deepEqual(results, ['a', 'a/1', 'a/2', 'b', 'c']);
- });
-
- test('basicAllStepsPassAsync', function() {
- var results = [];
-
- var startingTask = new Task(function(task) {
- results.push('a');
- task.subTask(function() {
- results.push('a/1');
- }, this);
- task.subTask(function() {
- results.push('a/2');
- }, this);
- }, this);
- startingTask.after(function() {
- results.push('b');
- }, this).after(function() {
- results.push('c');
- }, this);
-
- var promise = Task.RunWhenIdle(startingTask);
- promise.then(function() {
- assert.deepEqual(results, ['a', 'a/1', 'a/2', 'b', 'c']);
- });
- return promise;
- });
-
- test('taskThatThrowsShouldRejectItsPromise', function() {
- var startingTask = new Task(function(task) {
- throw new Error(
- 'IGNORE. This is an expected error to test error handling.');
- }, this);
-
- var taskPromise = Task.RunWhenIdle(startingTask);
-
- return new Promise(function(resolve, reject) {
- taskPromise.then(function() {
- reject(new Error('Should have thrown'));
- }, function(err) {
- resolve();
- });
- });
- });
-
- test('timedAfter', function() {
- if (tr.isHeadless)
- return;
-
- var results = [];
-
- var startingTask = new Task(function(task) {
- results.push('a');
- }, this);
- startingTask.timedAfter('Test', function pushB() {
- results.push('b');
- }, this).after(function() {
- results.push('c');
- }, this);
-
- Task.RunSynchronously(startingTask);
- assert.deepEqual(results, ['a', 'b', 'c']);
- var result = window.performance.getEntriesByName('Test:pushB');
- var duration = parseFloat(result[0].duration);
- assert.isAbove(duration, 0.0);
- });
-
- test('timedAfterWithSubTask', function() {
- if (tr.isHeadless)
- return;
-
- var results = [];
-
- var startingTask = new Task(function(task) {
- results.push('a');
- task.subTask(function(task) {
- results.push('a/1');
- }, this);
- task.subTask(function(task) {
- results.push('a/2');
- }, this);
- }, this);
- startingTask.timedAfter('Test', function pushB() {
- results.push('b');
- }, this).after(function() {
- results.push('c');
- }, this);
-
- Task.RunSynchronously(startingTask);
- assert.deepEqual(results, ['a', 'a/1', 'a/2', 'b', 'c']);
- var result = window.performance.getEntriesByName('Test:pushB');
- var duration = parseFloat(result[0].duration);
- assert.isAbove(duration, 0.0);
- });
-
- test('timedAfterWithAnoymousTask', function() {
- if (tr.isHeadless)
- return;
-
- var results = [];
-
- var startingTask = new Task(function(task) {
- results.push('a');
- }, this);
- assert.throw(function() {
- startingTask.timedAfter('Test', function() {
- results.push('b');
- }, this);
- }, Error, 'Anonymous Task is not allowed');
-
- Task.RunSynchronously(startingTask);
- assert.deepEqual(results, ['a']);
- });
-
- test('namedTimedAfter', function() {
- if (tr.isHeadless)
- return;
-
- var results = [];
-
- var startingTask = new Task(function(task) {
- results.push('a');
- }, this);
- startingTask.namedTimedAfter('Test', 'pushB', function() {
- results.push('b');
- }, this).after(function() {
- results.push('c');
- }, this);
-
- Task.RunSynchronously(startingTask);
- assert.deepEqual(results, ['a', 'b', 'c']);
- var result = window.performance.getEntriesByName('Test:pushB');
- var duration = parseFloat(result[0].duration);
- assert.isAbove(duration, 0.0);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/time_display_modes.html b/chromium/third_party/catapult/tracing/tracing/base/time_display_modes.html
deleted file mode 100644
index 8c91df5d24a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/time_display_modes.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit_scale.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Time currentDisplayUnit
- */
-tr.exportTo('tr.b', function() {
- var msDisplayMode = {
- scale: 1e-3,
- suffix: 'ms',
- // Compares a < b with adjustments to precision errors.
- roundedLess: function(a, b) {
- return Math.round(a * 1000) < Math.round(b * 1000);
- },
- formatSpec: {
- unit: 's',
- unitPrefix: tr.b.UnitScale.Metric.MILLI,
- minimumFractionDigits: 3,
- }
- };
-
- var nsDisplayMode = {
- scale: 1e-9,
- suffix: 'ns',
- // Compares a < b with adjustments to precision errors.
- roundedLess: function(a, b) {
- return Math.round(a * 1000000) < Math.round(b * 1000000);
- },
- formatSpec: {
- unit: 's',
- unitPrefix: tr.b.UnitScale.Metric.NANO,
- maximumFractionDigits: 0
- }
- };
-
- var TimeDisplayModes = {
- ns: nsDisplayMode,
- ms: msDisplayMode
- };
-
- return {
- TimeDisplayModes: TimeDisplayModes
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/timing.html b/chromium/third_party/catapult/tracing/tracing/base/timing.html
deleted file mode 100644
index 5a6ee391520..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/timing.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/base64.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var Base64 = tr.b.Base64;
-
- function computeUserTimingMarkName(groupName, functionName, opt_args) {
- if (groupName === undefined)
- throw new Error('getMeasureString should have group name');
- if (functionName === undefined)
- throw new Error('getMeasureString should have function name');
- var userTimingMarkName = groupName + ':' + functionName;
- if (opt_args !== undefined) {
- userTimingMarkName += '/';
- userTimingMarkName += Base64.btoa(JSON.stringify(opt_args));
- }
- return userTimingMarkName;
- }
-
- function Timing() {
- }
-
- Timing.nextMarkNumber = 0;
-
- Timing.mark = function(groupName, functionName, opt_args) {
- if (tr.isHeadless) {
- return {
- end: function() {}
- };
- }
- var userTimingMarkName = computeUserTimingMarkName(
- groupName, functionName, opt_args);
- var markBeginName = 'tvcm.mark' + Timing.nextMarkNumber++;
- var markEndName = 'tvcm.mark' + Timing.nextMarkNumber++;
- window.performance.mark(markBeginName);
- return {
- end: function() {
- window.performance.mark(markEndName);
- window.performance.measure(userTimingMarkName,
- markBeginName,
- markEndName);
- }
- };
- };
-
- Timing.wrap = function(groupName, callback, opt_args) {
- if (groupName === undefined)
- throw new Error('Timing.wrap should have group name');
- if (callback.name === '')
- throw new Error('Anonymous function is not allowed');
- return Timing.wrapNamedFunction(
- groupName, callback.name, callback, opt_args);
- };
-
- Timing.wrapNamedFunction = function(groupName, functionName, callback,
- opt_args) {
- function timedNamedFunction() {
- var markedTime = Timing.mark(groupName, functionName, opt_args);
- try {
- callback.apply(this, arguments);
- } finally {
- markedTime.end();
- }
- }
- return timedNamedFunction;
- };
-
- function TimedNamedPromise(groupName, name, executor, opt_args) {
- var markedTime = Timing.mark(groupName, name, opt_args);
- var promise = new Promise(executor);
- promise.then(function(result) {
- markedTime.end();
- return result;
- }, function(e) {
- markedTime.end();
- throw e;
- });
- return promise;
- }
-
- return {
- _computeUserTimingMarkName: computeUserTimingMarkName, // export for testing
- TimedNamedPromise: TimedNamedPromise,
- Timing: Timing
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/timing_test.html b/chromium/third_party/catapult/tracing/tracing/base/timing_test.html
deleted file mode 100644
index 459bfa1aafa..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/timing_test.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/timing.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Timing = tr.b.Timing;
-
- test('computeUserTimingMarkName', function() {
- if (tr.isHeadless)
- return;
- var name1 = tr.b._computeUserTimingMarkName('Test', 'test1', {'a': 1});
- assert.equal(name1, 'Test:test1/eyJhIjoxfQ==');
- var name2 = tr.b._computeUserTimingMarkName('Test', 'test2');
- assert.equal(name2, 'Test:test2');
- var name3 = tr.b._computeUserTimingMarkName(
- 'Test', 'test1', {'a': 1, 'b': {'c': 2}});
- assert.equal(name3, 'Test:test1/eyJhIjoxLCJiIjp7ImMiOjJ9fQ==');
- });
-
- test('TimingMarkWithoutArgs', function() {
- if (tr.isHeadless)
- return;
- var markedTime = Timing.mark('Test', 'TimingMarkWithoutArgs');
- markedTime.end();
- var result = window.performance.getEntriesByName(
- 'Test:TimingMarkWithoutArgs');
- var duration = parseFloat(result[0].duration);
- assert.isTrue(duration >= 0.0);
- });
-
- test('TimingMarkWithArgs', function() {
- if (tr.isHeadless)
- return;
- var markedTime = Timing.mark('Test', 'TimingMarkWithoutArgs', {'a': 1});
- markedTime.end();
- var result = window.performance.getEntriesByName(
- 'Test:TimingMarkWithoutArgs/eyJhIjoxfQ==');
- var duration = parseFloat(result[0].duration);
- assert.isTrue(duration >= 0.0);
- });
-
- test('TimingWrapWithAnonymousFunction', function() {
- assert.throw(function() {
- Timing.wrap('Test', function() {})();
- }, Error, 'Anonymous function is not allowed');
- });
-
- test('TimingWrap', function(done) {
- if (tr.isHeadless)
- return;
- Timing.wrap('Test', function addTo1000() {
- var x = 0;
- for (var i = 0; i <= 1000; ++i)
- x += i;
- assert.equal(x, 500500);
- })();
- var result = window.performance.getEntriesByName('Test:addTo1000');
- var duration = parseFloat(result[0].duration);
- assert.isTrue(duration >= 0.0);
- });
-
- test('TimingWrapNamedFunction', function() {
- if (tr.isHeadless)
- return;
- Timing.wrapNamedFunction('Test', 'addTo100', function() {
- var x = 0;
- for (var i = 0; i <= 100; ++i)
- x += i;
- assert.equal(x, 5050);
- })();
- var result = window.performance.getEntriesByName('Test:addTo100');
- var duration = parseFloat(result[0].duration);
- assert.isTrue(duration >= 0.0);
- });
-
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unit.html b/chromium/third_party/catapult/tracing/tracing/base/unit.html
deleted file mode 100644
index c260f55fe26..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unit.html
+++ /dev/null
@@ -1,385 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var TimeDisplayModes = tr.b.TimeDisplayModes;
-
- var PLUS_MINUS_SIGN = String.fromCharCode(177);
-
- function max(a, b) {
- if (a === undefined)
- return b;
- if (b === undefined)
- return a;
- return a.scale > b.scale ? a : b;
- }
-
- /** @enum */
- var ImprovementDirection = {
- DONT_CARE: 0,
- BIGGER_IS_BETTER: 1,
- SMALLER_IS_BETTER: 2
- };
-
- /** @constructor */
- function Unit(unitName, jsonName, basePrefix, isDelta, improvementDirection,
- formatSpec) {
- this.unitName = unitName;
- this.jsonName = jsonName;
- this.basePrefix = basePrefix;
- this.isDelta = isDelta;
- this.improvementDirection = improvementDirection;
- this.formatSpec_ = formatSpec;
-
- // Example: powerInWattsDelta_biggerIsBetter -> powerInWatts.
- this.baseUnit = undefined;
-
- // Example: energyInJoules_smallerIsBetter ->
- // energyInJoulesDelta_smallerIsBetter.
- this.correspondingDeltaUnit = undefined;
- }
-
- Unit.prototype = {
- asJSON: function() {
- return this.jsonName;
- },
-
- get unitString() {
- // TODO(benjhayden): Refactor with format() and test.
- var formatSpec = this.formatSpec_;
- if (typeof formatSpec === 'function')
- formatSpec = formatSpec();
- if (!formatSpec.unit) {
- return '';
- }
-
- var unitString = '';
- var unitPrefix = formatSpec.unitPrefix;
- if (unitPrefix !== undefined) {
- var selectedPrefix;
- if (unitPrefix instanceof Array) {
- selectedPrefix = unitPrefix[0];
- } else {
- selectedPrefix = unitPrefix;
- }
- unitString += selectedPrefix.symbol || '';
- }
- unitString += formatSpec.unit;
-
- return unitString;
- },
-
- format: function(value, opt_context) {
- var context = opt_context || {};
- var formatSpec = this.formatSpec_;
- if (typeof formatSpec === 'function')
- formatSpec = formatSpec();
-
- function resolveProperty(propertyName) {
- if (propertyName in context)
- return context[propertyName];
- else if (propertyName in formatSpec)
- return formatSpec[propertyName];
- else
- return undefined;
- }
-
- var signString = '';
- if (value < 0) {
- signString = '-';
- value = -value; // Treat positive and negative values symmetrically.
- } else if (this.isDelta) {
- signString = value === 0 ? PLUS_MINUS_SIGN : '+';
- }
-
- var unitString = '';
- if (formatSpec.unit) {
- if (formatSpec.unitHasPrecedingSpace !== false)
- unitString += ' ';
- var unitPrefix = resolveProperty('unitPrefix');
- if (unitPrefix !== undefined) {
- var selectedPrefix;
- if (unitPrefix instanceof Array) {
- var i = 0;
- while (i < unitPrefix.length - 1 &&
- value / unitPrefix[i + 1].value >= 1) {
- i++;
- }
- selectedPrefix = unitPrefix[i];
- } else {
- selectedPrefix = unitPrefix;
- }
- unitString += selectedPrefix.symbol || '';
- value = tr.b.convertUnit(value, this.basePrefix, selectedPrefix);
- } else {
- value = tr.b.convertUnit(value, this.basePrefix,
- tr.b.UnitScale.Metric.NONE);
- }
- unitString += formatSpec.unit;
- }
-
- var minimumFractionDigits = resolveProperty('minimumFractionDigits');
- var maximumFractionDigits = resolveProperty('maximumFractionDigits');
-
- // If the context overrides only one of the two |*FractionDigits|
- // properties and the other one is provided by the unit, we might need to
- // shift the other property so that
- // |minimumFractionDigits| <= |maximumFractionDigits|.
- if (minimumFractionDigits > maximumFractionDigits) {
- if ('minimumFractionDigits' in context &&
- !('maximumFractionDigits' in context)) {
- // Only minimumFractionDigits was overriden by context.
- maximumFractionDigits = minimumFractionDigits;
- } else if ('maximumFractionDigits' in context &&
- !('minimumFractionDigits' in context)) {
- // Only maximumFractionDigits was overriden by context.
- minimumFractionDigits = maximumFractionDigits;
- }
- }
-
- var numberString = value.toLocaleString(undefined, {
- minimumFractionDigits: minimumFractionDigits,
- maximumFractionDigits: maximumFractionDigits
- });
-
- return signString + numberString + unitString;
- }
- };
-
- Unit.reset = function() {
- Unit.currentTimeDisplayMode = TimeDisplayModes.ms;
- };
-
- Unit.timestampFromUs = function(us) {
- return tr.b.convertUnit(us, tr.b.UnitScale.Metric.MICRO,
- tr.b.UnitScale.Metric.MILLI);
- };
-
- Object.defineProperty(Unit, 'currentTimeDisplayMode', {
- get: function() {
- return Unit.currentTimeDisplayMode_;
- },
- // Use tr-v-ui-preferred-display-unit element instead of directly setting.
- set: function(value) {
- if (Unit.currentTimeDisplayMode_ === value)
- return;
-
- Unit.currentTimeDisplayMode_ = value;
- Unit.dispatchEvent(new tr.b.Event('display-mode-changed'));
- }
- });
-
- Unit.didPreferredTimeDisplayUnitChange = function() {
- var largest = undefined;
- var els = tr.b.findDeepElementsMatching(document.body,
- 'tr-v-ui-preferred-display-unit');
- els.forEach(function(el) {
- largest = max(largest, el.preferredTimeDisplayMode);
- });
-
- Unit.currentDisplayUnit = largest === undefined ?
- TimeDisplayModes.ms : largest;
- };
-
- Unit.byName = {};
- Unit.byJSONName = {};
-
- Unit.fromJSON = function(object) {
- var u = Unit.byJSONName[object];
- if (u) {
- return u;
- }
- throw new Error('Unrecognized unit');
- };
-
- /**
- * Define all combinations of a unit with isDelta and improvementDirection
- * flags. For example, the following code:
- *
- * Unit.define({
- * baseUnitName: 'powerInWatts'
- * baseJsonName: 'W'
- * formatSpec: {
- * // Specification of how the unit should be formatted (unit symbol,
- * // unit prefix, fraction digits, etc), or a function returning such
- * // a specification.
- * }
- * });
- *
- * generates the following six units (JSON names shown in parentheses):
- *
- * Unit.byName.powerInWatts (W)
- * Unit.byName.powerInWatts_smallerIsBetter (W_smallerIsBetter)
- * Unit.byName.powerInWatts_biggerIsBetter (W_biggerIsBetter)
- * Unit.byName.powerInWattsDelta (WDelta)
- * Unit.byName.powerInWattsDelta_smallerIsBetter (WDelta_smallerIsBetter)
- * Unit.byName.powerInWattsDelta_biggerIsBetter (WDelta_biggerIsBetter)
- *
- * with the appropriate flags and formatting code (including +/- prefixes
- * for deltas).
- */
- Unit.define = function(params) {
- var definedUnits = [];
-
- tr.b.iterItems(ImprovementDirection, function(_, improvementDirection) {
- var regularUnit =
- Unit.defineUnitVariant_(params, false, improvementDirection);
- var deltaUnit =
- Unit.defineUnitVariant_(params, true, improvementDirection);
-
- regularUnit.correspondingDeltaUnit = deltaUnit;
- deltaUnit.correspondingDeltaUnit = deltaUnit;
- definedUnits.push(regularUnit, deltaUnit);
- });
-
- var baseUnit = Unit.byName[params.baseUnitName];
- definedUnits.forEach(u => u.baseUnit = baseUnit);
- };
-
- Unit.nameSuffixForImprovementDirection = function(improvementDirection) {
- switch (improvementDirection) {
- case ImprovementDirection.DONT_CARE:
- return '';
- case ImprovementDirection.BIGGER_IS_BETTER:
- return '_biggerIsBetter';
- case ImprovementDirection.SMALLER_IS_BETTER:
- return '_smallerIsBetter';
- default:
- throw new Error(
- 'Unknown improvement direction: ' + improvementDirection);
- }
- };
-
- Unit.defineUnitVariant_ = function(params, isDelta, improvementDirection) {
- var nameSuffix = isDelta ? 'Delta' : '';
- nameSuffix += Unit.nameSuffixForImprovementDirection(improvementDirection);
-
- var unitName = params.baseUnitName + nameSuffix;
- var jsonName = params.baseJsonName + nameSuffix;
- if (Unit.byName[unitName] !== undefined)
- throw new Error('Unit \'' + unitName + '\' already exists');
- if (Unit.byJSONName[jsonName] !== undefined)
- throw new Error('JSON unit \'' + jsonName + '\' alread exists');
-
- var basePrefix = params.basePrefix ?
- params.basePrefix : tr.b.UnitScale.Metric.NONE;
- var unit = new Unit(unitName, jsonName, basePrefix,
- isDelta, improvementDirection, params.formatSpec);
- Unit.byName[unitName] = unit;
- Unit.byJSONName[jsonName] = unit;
-
- return unit;
- };
-
- tr.b.EventTarget.decorate(Unit);
- Unit.reset();
-
- // Known display units follow.
- //////////////////////////////////////////////////////////////////////////////
-
- Unit.define({
- baseUnitName: 'timeDurationInMs',
- baseJsonName: 'ms',
- basePrefix: tr.b.UnitScale.Metric.MILLI,
- formatSpec: function() {
- return Unit.currentTimeDisplayMode_.formatSpec;
- }
- });
-
- Unit.define({
- baseUnitName: 'timeStampInMs',
- baseJsonName: 'tsMs',
- basePrefix: tr.b.UnitScale.Metric.MILLI,
- formatSpec: function() {
- return Unit.currentTimeDisplayMode_.formatSpec;
- }
- });
-
- Unit.define({
- baseUnitName: 'normalizedPercentage',
- baseJsonName: 'n%',
- formatSpec: {
- unit: '%',
- unitPrefix: { value: 0.01 },
- unitHasPrecedingSpace: false,
- minimumFractionDigits: 3,
- maximumFractionDigits: 3
- }
- });
-
- Unit.define({
- baseUnitName: 'sizeInBytes',
- baseJsonName: 'sizeInBytes',
- formatSpec: {
- unit: 'B',
- unitPrefix: tr.b.UnitScale.Binary.AUTO,
- minimumFractionDigits: 1,
- maximumFractionDigits: 1
- }
- });
-
- Unit.define({
- baseUnitName: 'energyInJoules',
- baseJsonName: 'J',
- formatSpec: {
- unit: 'J',
- minimumFractionDigits: 3
- }
- });
-
- Unit.define({
- baseUnitName: 'powerInWatts',
- baseJsonName: 'W',
- formatSpec: {
- unit: 'W',
- minimumFractionDigits: 3
- }
- });
-
- Unit.define({
- baseUnitName: 'unitlessNumber',
- baseJsonName: 'unitless',
- formatSpec: {
- minimumFractionDigits: 3,
- maximumFractionDigits: 3
- }
- });
-
- Unit.define({
- baseUnitName: 'count',
- baseJsonName: 'count',
- formatSpec: {
- minimumFractionDigits: 0,
- maximumFractionDigits: 0
- }
- });
-
- Unit.define({
- baseUnitName: 'sigma',
- baseJsonName: 'sigma',
- formatSpec: {
- unit: String.fromCharCode(963),
- minimumFractionDigits: 1,
- maximumFractionDigits: 1
- }
- });
-
- return {
- ImprovementDirection: ImprovementDirection,
- Unit: Unit
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unit_scale.html b/chromium/third_party/catapult/tracing/tracing/base/unit_scale.html
deleted file mode 100644
index d18022ed595..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unit_scale.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-var GREEK_SMALL_LETTER_MU = String.fromCharCode(956);
-
-tr.exportTo('tr.b', function() {
-
- var UnitScale = {};
-
- function defineUnitScale(name, prefixes) {
- if (UnitScale[name] !== undefined)
- throw new Error('Unit scale \'' + name + '\' already exists');
- if (prefixes.AUTO !== undefined) {
- throw new Error('\'AUTO\' unit prefix will be added automatically ' +
- 'for unit scale \'' + name + '\'');
- }
-
- // If the 'AUTO' unit prefix is used, the prefix that results in
- // the absolute formatted value being as close to the [1, 1024) interval as
- // possible is used. Example: 1023 and 1024 bytes are displayed as
- // "1,023.0 B" and "1.0 KiB", respectively.
- prefixes.AUTO = tr.b.dictionaryValues(prefixes);
- prefixes.AUTO.sort((a, b) => a.value - b.value);
-
- UnitScale[name] = prefixes;
- }
-
- /**
- * Converts |value| from |fromPrefix| (e.g. kilo) to |toPrefix| (e.g. mega).
- *
- * Returns undefined if |value| is undefined.
- * |fromPrefix| and |toPrefix| need not come from the same UnitScale.
- *
- * @param {(undefined|number)} value
- * @param {!object} fromPrefix
- * @param {!object} toPrefix
- * @return {(undefined|number)}
- */
- function convertUnit(value, fromPrefix, toPrefix) {
- if (value === undefined)
- return undefined;
- return value * (fromPrefix.value / toPrefix.value);
- }
-
- // See https://en.wikipedia.org/wiki/Binary_prefix.
- defineUnitScale('Binary', {
- NONE: { value: Math.pow(1024, 0), symbol: '' },
- KIBI: { value: Math.pow(1024, 1), symbol: 'Ki' },
- MEBI: { value: Math.pow(1024, 2), symbol: 'Mi' },
- GIBI: { value: Math.pow(1024, 3), symbol: 'Gi' },
- TEBI: { value: Math.pow(1024, 4), symbol: 'Ti' }
- });
-
- // See https://en.wikipedia.org/wiki/Metric_prefix.
- defineUnitScale('Metric', {
- NANO: { value: 1e-9, symbol: 'n' },
- MICRO: { value: 1e-6, symbol: GREEK_SMALL_LETTER_MU },
- MILLI: { value: 1e-3, symbol: 'm' },
- NONE: { value: 1, symbol: ''},
- KILO: { value: 1e3, symbol: 'k'},
- MEGA: { value: 1e6, symbol: 'M'},
- GIGA: { value: 1e9, symbol: 'G'}
- });
-
- return {
- UnitScale: UnitScale,
- convertUnit: convertUnit
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unit_test.html b/chromium/third_party/catapult/tracing/tracing/base/unit_test.html
deleted file mode 100644
index 79585ccd25d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unit_test.html
+++ /dev/null
@@ -1,229 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ImprovementDirection = tr.b.ImprovementDirection;
- var Unit = tr.b.Unit;
- var UnitScale = tr.b.UnitScale;
-
- test('Unit.display-mode-changed', function() {
- var TimeDisplayModes = tr.b.TimeDisplayModes;
-
- var listenerWasCalled = false;
- function listener(e) {
- listenerWasCalled = true;
- }
-
- try {
- Unit.currentTimeDisplayMode = TimeDisplayModes.ms;
- Unit.addEventListener('display-mode-changed', listener);
-
- listenerWasCalled = false;
- Unit.currentTimeDisplayMode = TimeDisplayModes.ns;
- assert.isTrue(listenerWasCalled);
- assert.equal(Unit.currentTimeDisplayMode, TimeDisplayModes.ns);
- } finally {
- Unit.removeEventListener('display-mode-changed', listener);
- Unit.reset();
- }
- });
-
- function checkTimeUnit(unit) {
- try {
- // Use milliseconds to display time (default behavior).
- Unit.currentTimeDisplayMode = tr.b.TimeDisplayModes.ms;
-
- assert.strictEqual(unit.format(0), '0.000 ms');
- assert.strictEqual(unit.format(0.02), '0.020 ms');
- assert.strictEqual(unit.format(0.001), '0.001 ms');
- assert.strictEqual(unit.format(0.0005), '0.001 ms');
- assert.strictEqual(unit.format(0.00049), '0.000 ms');
- assert.strictEqual(unit.format(999.999), '999.999 ms');
- assert.strictEqual(unit.format(1000.001), '1,000.001 ms');
- assert.strictEqual(unit.format(123456789), '123,456,789.000 ms');
- assert.strictEqual(unit.format(-0.00051), '-0.001 ms');
- assert.strictEqual(unit.format(-123456789), '-123,456,789.000 ms');
-
- // Change the unit to nanoseconds.
- Unit.currentTimeDisplayMode = tr.b.TimeDisplayModes.ns;
-
- assert.strictEqual(unit.format(0), '0 ns');
- assert.strictEqual(unit.format(1), '1,000,000 ns');
- assert.strictEqual(unit.format(0.000042), '42 ns');
- assert.strictEqual(unit.format(0.000001), '1 ns');
- assert.strictEqual(unit.format(0.0000005), '1 ns');
- assert.strictEqual(unit.format(0.00000049), '0 ns');
- assert.strictEqual(unit.format(123.456), '123,456,000 ns');
- assert.strictEqual(unit.format(-0.07), '-70,000 ns');
- } finally {
- Unit.reset();
- }
- }
-
- test('timeStampInMs', function() {
- assert.strictEqual(Unit.byName.timeStampInMs.unitName, 'timeStampInMs');
- assert.strictEqual(Unit.byName.timeStampInMs.asJSON(), 'tsMs');
- checkTimeUnit(Unit.byName.timeStampInMs);
- });
-
- test('timeDurationInMs', function() {
- assert.strictEqual(Unit.byName.timeDurationInMs.unitName,
- 'timeDurationInMs');
- assert.strictEqual(Unit.byName.timeDurationInMs.asJSON(), 'ms');
- checkTimeUnit(Unit.byName.timeDurationInMs);
- });
-
- test('sizeInBytes', function() {
- var SOURCE_VALUES = [0, 1, 1536, 424.5 * 1024 * 1024,
- 1025 * 1024 * 1024 * 1024 * 1024, -2.5 * 1024 * 1024];
- var EXPECTED_REGULAR_FORMATTED_VALUES = ['0.0 B', '1.0 B', '1.5 KiB',
- '424.5 MiB', '1,025.0 TiB', '-2.5 MiB'];
- var EXPECTED_DELTA_FORMATTED_VALUES = ['\u00B10.0 B', '+1.0 B', '+1.5 KiB',
- '+424.5 MiB', '+1,025.0 TiB', '-2.5 MiB'];
-
- function checkSizeUnit(unit, expectation) {
- assert.strictEqual(unit.unitName, expectation.unitName);
- assert.strictEqual(unit.asJSON(), expectation.asJSON);
- assert.strictEqual(unit.isDelta, expectation.isDelta);
- assert.strictEqual(unit.baseUnit, expectation.baseUnit);
- assert.strictEqual(unit.correspondingDeltaUnit,
- expectation.correspondingDeltaUnit);
- assert.strictEqual(unit.improvementDirection,
- expectation.improvementDirection);
- assert.deepEqual(SOURCE_VALUES.map(v => unit.format(v)),
- expectation.formattedValues);
- }
-
- // Regular (non-delta).
- checkSizeUnit(Unit.byName.sizeInBytes, {
- unitName: 'sizeInBytes',
- asJSON: 'sizeInBytes',
- isDelta: false,
- baseUnit: Unit.byName.sizeInBytes,
- correspondingDeltaUnit: Unit.byName.sizeInBytesDelta,
- improvementDirection: ImprovementDirection.DONT_CARE,
- formattedValues: EXPECTED_REGULAR_FORMATTED_VALUES
- });
- checkSizeUnit(Unit.byName.sizeInBytes_smallerIsBetter, {
- unitName: 'sizeInBytes_smallerIsBetter',
- asJSON: 'sizeInBytes_smallerIsBetter',
- isDelta: false,
- baseUnit: Unit.byName.sizeInBytes,
- correspondingDeltaUnit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- improvementDirection: ImprovementDirection.SMALLER_IS_BETTER,
- formattedValues: EXPECTED_REGULAR_FORMATTED_VALUES
- });
- checkSizeUnit(Unit.byName.sizeInBytes_biggerIsBetter, {
- unitName: 'sizeInBytes_biggerIsBetter',
- asJSON: 'sizeInBytes_biggerIsBetter',
- isDelta: false,
- baseUnit: Unit.byName.sizeInBytes,
- correspondingDeltaUnit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- improvementDirection: ImprovementDirection.BIGGER_IS_BETTER,
- formattedValues: EXPECTED_REGULAR_FORMATTED_VALUES
- });
-
- // Delta.
- checkSizeUnit(Unit.byName.sizeInBytesDelta, {
- unitName: 'sizeInBytesDelta',
- asJSON: 'sizeInBytesDelta',
- isDelta: true,
- baseUnit: Unit.byName.sizeInBytes,
- correspondingDeltaUnit: Unit.byName.sizeInBytesDelta,
- improvementDirection: ImprovementDirection.DONT_CARE,
- formattedValues: EXPECTED_DELTA_FORMATTED_VALUES
- });
- checkSizeUnit(Unit.byName.sizeInBytesDelta_smallerIsBetter, {
- unitName: 'sizeInBytesDelta_smallerIsBetter',
- asJSON: 'sizeInBytesDelta_smallerIsBetter',
- isDelta: true,
- baseUnit: Unit.byName.sizeInBytes,
- correspondingDeltaUnit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- improvementDirection: ImprovementDirection.SMALLER_IS_BETTER,
- formattedValues: EXPECTED_DELTA_FORMATTED_VALUES
- });
- checkSizeUnit(Unit.byName.sizeInBytesDelta_biggerIsBetter, {
- unitName: 'sizeInBytesDelta_biggerIsBetter',
- asJSON: 'sizeInBytesDelta_biggerIsBetter',
- isDelta: true,
- baseUnit: Unit.byName.sizeInBytes,
- correspondingDeltaUnit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- improvementDirection: ImprovementDirection.BIGGER_IS_BETTER,
- formattedValues: EXPECTED_DELTA_FORMATTED_VALUES
- });
- });
-
- test('context', function() {
- assert.strictEqual(Unit.byName.timeStampInMs.format(0, {}), '0.000 ms');
- assert.strictEqual(Unit.byName.normalizedPercentageDelta.format(1.23456,
- { maximumFractionDigits: 2 }), '+123.46%');
- assert.strictEqual(Unit.byName.powerInWatts.format(999.999,
- { minimumFractionDigits: 5 }), '999.99900 W');
- assert.strictEqual(Unit.byName.powerInWatts_biggerIsBetter.format(8.88,
- { minimumFractionDigits: 1 }), '8.88 W');
- assert.strictEqual(Unit.byName.unitlessNumber.format(0.00789,
- { maximumFractionDigits: 6 }), '0.00789');
- assert.strictEqual(Unit.byName.unitlessNumber.format(41.9,
- { maximumFractionDigits: 0 }), '42');
- assert.strictEqual(
- Unit.byName.energyInJoules.format(0.4444,
- { minimumFractionDigits: 2, maximumFractionDigits: 3 }),
- '0.444 J');
- assert.strictEqual(
- Unit.byName.energyInJoules.format(0.6,
- { minimumFractionDigits: 2, maximumFractionDigits: 3 }),
- '0.60 J');
- assert.strictEqual(
- Unit.byName.sizeInBytesDelta_smallerIsBetter.format(0,
- { minimumFractionDigits: 1, maximumFractionDigits: 1 }),
- '\u00B10.0 B');
- assert.strictEqual(
- Unit.byName.sizeInBytes.format(25600000000,
- { unitPrefix: UnitScale.Binary.KIBI }),
- '25,000,000.0 KiB');
- assert.strictEqual(
- Unit.byName.sizeInBytes.format(5243,
- { unitPrefix: UnitScale.Binary.MEBI, minimumFractionDigits: 2 }),
- '0.01 MiB');
- });
-
- test('energyInJoules', function() {
- assert.equal(Unit.byName.energyInJoules.format(1000), '1,000.000 J');
- assert.equal(Unit.byName.energyInJoules.format(1), '1.000 J');
- assert.equal(Unit.byName.energyInJoules.format(.005), '0.005 J');
- assert.equal(Unit.byName.energyInJoules.format(.0005), '0.001 J');
- assert.equal(Unit.byName.energyInJoules.format(.0004), '0.000 J');
- });
-
- test('powerInWatts', function() {
- assert.equal(Unit.byName.powerInWatts.format(1000), '1,000.000 W');
- assert.equal(Unit.byName.powerInWatts.format(1), '1.000 W');
- assert.equal(Unit.byName.powerInWatts.format(.001), '0.001 W');
- assert.equal(Unit.byName.powerInWatts.format(.001005), '0.001 W');
- });
-
- test('unitlessNumber', function() {
- assert.equal(Unit.byName.unitlessNumber.format(1), '1.000');
- assert.equal(Unit.byName.unitlessNumber.format(1.23), '1.230');
- assert.equal(Unit.byName.unitlessNumber.format(-1.23), '-1.230');
- assert.equal(Unit.byName.unitlessNumber.format(0), '0.000');
- });
-
- test('count', function() {
- assert.equal(Unit.byName.count.format(0), '0');
- assert.equal(Unit.byName.count.format(1), '1');
- assert.equal(Unit.byName.count.format(100), '100');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest.html b/chromium/third_party/catapult/tracing/tracing/base/unittest.html
deleted file mode 100644
index 8602f1e824c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-
-<script src="/chai/chai.js"></script>
-<script>
- 'use strict';
- /**
- * Alias chai assert to the global assert.
- */
- if (tr.isNode) {
- // In node, chai.js knows to act as a node module, whereas our HTML
- // imports code expects chai to end up in the global scope. So, in Node,
- // copy the chai exports into global.
- var chaiAbsPath = HTMLImportsLoader.hrefToAbsolutePath(
- '/chai/chai.js');
- var chaiModule = require(chaiAbsPath);
- for (var exportName in chaiModule)
- global[exportName] = chaiModule[exportName];
- } else {
- /**
- * Catapult presubmit wanted me to put a jsdoc here. So nduca did.
- */
- global.assert = chai.assert;
- }
-</script>
-
-<link rel="import" href="/tracing/base/unittest/suite_loader.html">
-<link rel="import" href="/tracing/base/unittest/test_case.html">
-<link rel="import" href="/tracing/base/unittest/test_suite.html">
-<link rel="import" href="/tracing/base/unittest/test_runner.html">
-<script>
-'use strict';
-tr.exportTo('tr.b.unittest', function() {
- return {
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/constants.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/constants.html
deleted file mode 100644
index 6f58a59c135..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/constants.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- var TestStatus = {
- PENDING: 'pending-status',
- RUNNING: 'running-status',
- DONE_RUNNING: 'done-running-status'
- };
-
- var TestTypes = {
- UNITTEST: 'unittest-type',
- PERFTEST: 'perftest-type'
- };
-
- return {
- TestStatus: TestStatus,
- TestTypes: TestTypes
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html
deleted file mode 100644
index d648fff082d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/html_test_results.html
+++ /dev/null
@@ -1,489 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/unittest/constants.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<style>
- x-tr-b-unittest-test-results {
- display: flex;
- flex-direction: column;
- flex: 0 0 auto;
- }
-
- x-tr-b-unittest-test-results > x-html-test-case-result.dark > #summary {
- background-color: #eee;
- }
-
- x-html-test-case-result {
- display: block;
- }
- x-html-test-case-result > #summary > #title,
- x-html-test-case-result > #summary > #status,
- x-html-test-case-result > #details > x-html-test-case-error > #message,
- x-html-test-case-result > #details > x-html-test-case-error > #stack,
- x-html-test-case-result > #details > x-html-test-case-error > #return-value,
- x-html-test-case-result > #details > x-html-test-case-flaky > #message {
- -webkit-user-select: auto;
- }
-
- x-html-test-case-result > #details > x-html-test-case-error,
- x-html-test-case-result > #details > x-html-test-case-flaky {
- display: block;
- border: 1px solid grey;
- border-radius: 5px;
- font-family: monospace;
- margin-bottom: 14px;
- }
-
- x-html-test-case-result > #details > x-html-test-case-error > #message,
- x-html-test-case-result > #details > x-html-test-case-error > #stack,
- x-html-test-case-result > #details > x-html-test-case-flaky > #message {
- white-space: pre;
- }
-
- x-html-test-case-result > #details > x-html-test-case-html-result {
- display: block;
- }
-
- .unittest-pending {
- color: orange;
- }
- .unittest-running {
- color: orange;
- font-weight: bold;
- }
-
- .unittest-passed {
- color: darkgreen;
- }
-
- .unittest-failed {
- color: darkred;
- font-weight: bold;
- }
-
- .unittest-flaky {
- color: darkorange;
- }
-
- .unittest-exception {
- color: red;
- font-weight: bold;
- }
-
- .unittest-failure {
- border: 1px solid grey;
- border-radius: 5px;
- padding: 5px;
- }
-</style>
-<template id="x-html-test-case-result-template">
- <div id="summary">
- <span id="title"></span>&nbsp;
- <span id="status"></span>&nbsp;
- <span id="return-value"></span>
- </div>
- <div id="details"></div>
-</template>
-
-<template id="x-html-test-case-error-template">
- <div id="stack"></div>
-</template>
-
-<template id="x-html-test-case-flaky-template">
- <div id="message"></div>
-</template>
-
-<script>
-'use strict';
-tr.exportTo('tr.b.unittest', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- var TestStatus = tr.b.unittest.TestStatus;
- var TestTypes = tr.b.unittest.TestTypes;
-
- /**
- * @constructor
- */
- var HTMLTestCaseResult = tr.ui.b.define('x-html-test-case-result');
-
- HTMLTestCaseResult.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- Polymer.dom(this).appendChild(tr.ui.b.instantiateTemplate(
- '#x-html-test-case-result-template', THIS_DOC));
- this.testCase_ = undefined;
- this.testCaseHRef_ = undefined;
- this.duration_ = undefined;
- this.testStatus_ = TestStatus.PENDING;
- this.testReturnValue_ = undefined;
- this.showHTMLOutput_ = false;
- this.updateColorAndStatus_();
- },
-
- get showHTMLOutput() {
- return this.showHTMLOutput_;
- },
-
- set showHTMLOutput(showHTMLOutput) {
- this.showHTMLOutput_ = showHTMLOutput;
- this.updateHTMLOutputDisplayState_();
- },
-
- get testCase() {
- return this.testCase_;
- },
-
- set testCase(testCase) {
- this.testCase_ = testCase;
- this.updateTitle_();
- },
-
- get testCaseHRef() {
- return this.testCaseHRef_;
- },
-
- set testCaseHRef(href) {
- this.testCaseHRef_ = href;
- this.updateTitle_();
- },
- updateTitle_: function() {
- var titleEl = Polymer.dom(this).querySelector('#title');
- if (this.testCase_ === undefined) {
- Polymer.dom(titleEl).textContent = '';
- return;
- }
-
- if (this.testCaseHRef_) {
- Polymer.dom(titleEl).innerHTML =
- '<a href="' + this.testCaseHRef_ + '">' +
- this.testCase_.fullyQualifiedName + '</a>';
- } else {
- Polymer.dom(titleEl).textContent = this.testCase_.fullyQualifiedName;
- }
- },
-
- addError: function(normalizedException) {
- var errorEl = document.createElement('x-html-test-case-error');
- Polymer.dom(errorEl).appendChild(tr.ui.b.instantiateTemplate(
- '#x-html-test-case-error-template', THIS_DOC));
- Polymer.dom(Polymer.dom(errorEl).querySelector('#stack')).
- textContent = normalizedException.stack;
- Polymer.dom(Polymer.dom(this).querySelector('#details')).appendChild(
- errorEl);
- this.updateColorAndStatus_();
- },
-
- addFlaky: function() {
- var flakyEl = document.createElement('x-html-test-case-flaky');
- Polymer.dom(flakyEl).appendChild(tr.ui.b.instantiateTemplate(
- '#x-html-test-case-flaky-template', THIS_DOC));
- Polymer.dom(Polymer.dom(flakyEl).querySelector('#message'))
- .textContent = 'FLAKY';
- Polymer.dom(Polymer.dom(this).querySelector('#details')).appendChild(
- flakyEl);
- this.updateColorAndStatus_();
- },
-
- addHTMLOutput: function(element) {
- var htmlResultEl = document.createElement('x-html-test-case-html-result');
- Polymer.dom(htmlResultEl).appendChild(element);
- Polymer.dom(Polymer.dom(this).querySelector('#details'))
- .appendChild(htmlResultEl);
- },
-
- updateHTMLOutputDisplayState_: function() {
- var htmlResults =
- Polymer.dom(this).querySelectorAll('x-html-test-case-html-result');
- var display;
- if (this.showHTMLOutput)
- display = '';
- else
- display = (this.testStatus_ === TestStatus.RUNNING) ? '' : 'none';
- for (var i = 0; i < htmlResults.length; i++)
- htmlResults[i].style.display = display;
- },
-
- get hadErrors() {
- return !!Polymer.dom(this).querySelector('x-html-test-case-error');
- },
-
- get isFlaky() {
- return !!Polymer.dom(this).querySelector('x-html-test-case-flaky');
- },
-
- get duration() {
- return this.duration_;
- },
-
- set duration(duration) {
- this.duration_ = duration;
- this.updateColorAndStatus_();
- },
-
- get testStatus() {
- return this.testStatus_;
- },
-
- set testStatus(testStatus) {
- this.testStatus_ = testStatus;
- this.updateColorAndStatus_();
- this.updateHTMLOutputDisplayState_();
- },
-
- updateColorAndStatus_: function() {
- var colorCls;
- var status;
- if (this.hadErrors) {
- colorCls = 'unittest-failed';
- status = 'failed';
- } else if (this.isFlaky) {
- colorCls = 'unittest-flaky';
- status = 'flaky';
- } else if (this.testStatus_ === TestStatus.PENDING) {
- colorCls = 'unittest-pending';
- status = 'pending';
- } else if (this.testStatus_ === TestStatus.RUNNING) {
- colorCls = 'unittest-running';
- status = 'running';
- } else { // DONE_RUNNING and no errors
- colorCls = 'unittest-passed';
- status = 'passed';
- }
-
- var statusEl = Polymer.dom(this).querySelector('#status');
- if (this.duration_)
- Polymer.dom(statusEl).textContent = status + ' (' +
- this.duration_.toFixed(2) + 'ms)';
- else
- Polymer.dom(statusEl).textContent = status;
- statusEl.className = colorCls;
- },
-
- get testReturnValue() {
- return this.testReturnValue_;
- },
-
- set testReturnValue(testReturnValue) {
- this.testReturnValue_ = testReturnValue;
- Polymer.dom(Polymer.dom(this).querySelector('#return-value'))
- .textContent = testReturnValue;
- }
- };
-
-
-
-
- /**
- * @constructor
- */
- var HTMLTestResults = tr.ui.b.define('x-tr-b-unittest-test-results');
-
- HTMLTestResults.prototype = {
- __proto__: HTMLUnknownElement.prototype,
-
- decorate: function() {
- this.testCaseResultsByCaseGUID_ = {};
- this.currentTestCaseStartTime_ = undefined;
- this.totalRunTime_ = 0;
- this.numTestsThatPassed_ = 0;
- this.numTestsThatFailed_ = 0;
- this.numFlakyTests_ = 0;
- this.showHTMLOutput_ = false;
- this.showPendingAndPassedTests_ = false;
- this.linkifyCallback_ = undefined;
- this.headless_ = false;
- },
-
- get headless() {
- return this.headless_;
- },
-
- set headless(headless) {
- this.headless_ = headless;
- },
-
- getHRefForTestCase: function(testCase) {
- /* Override this to create custom links */
- return undefined;
- },
-
- get showHTMLOutput() {
- return this.showHTMLOutput_;
- },
-
- set showHTMLOutput(showHTMLOutput) {
- this.showHTMLOutput_ = showHTMLOutput;
- var testCaseResults =
- Polymer.dom(this).querySelectorAll('x-html-test-case-result');
- for (var i = 0; i < testCaseResults.length; i++)
- testCaseResults[i].showHTMLOutput = showHTMLOutput;
- },
-
- get showPendingAndPassedTests() {
- return this.showPendingAndPassedTests_;
- },
-
- set showPendingAndPassedTests(showPendingAndPassedTests) {
- this.showPendingAndPassedTests_ = showPendingAndPassedTests;
-
- var testCaseResults =
- Polymer.dom(this).querySelectorAll('x-html-test-case-result');
- for (var i = testCaseResults.length - 1; i >= 0; i--)
- this.updateDisplayStateForResult_(testCaseResults[i]);
- },
-
- updateDisplayStateForResult_: function(res) {
- var display;
- if (this.showPendingAndPassedTests_) {
- if (res.testStatus === TestStatus.RUNNING ||
- res.hadErrors) {
- display = '';
- } else {
- display = 'none';
- }
- } else {
- display = '';
- }
- res.style.display = display;
- },
-
- willRunTests: function(testCases) {
- this.timeAtBeginningOfTest_ = window.performance.now();
- testCases.forEach(function(testCase, i) {
- var testCaseResult = new HTMLTestCaseResult();
- testCaseResult.showHTMLOutput = this.showHTMLOutput_;
- testCaseResult.testCase = testCase;
- if ((i % 2) === 0)
- Polymer.dom(testCaseResult).classList.add('dark');
-
- var href = this.getHRefForTestCase(testCase);
- if (href)
- testCaseResult.testCaseHRef = href;
- testCaseResult.testStatus = TestStatus.PENDING;
- this.testCaseResultsByCaseGUID_[testCase.guid] = testCaseResult;
- Polymer.dom(this).appendChild(testCaseResult);
- this.updateDisplayStateForResult_(testCaseResult);
- }, this);
- },
-
- willRunTest: function(testCase) {
- this.currentTestCaseResult_ = this.testCaseResultsByCaseGUID_[
- testCase.guid];
- this.currentTestCaseStartTime_ = window.performance.now();
- this.currentTestCaseResult_.testStatus = TestStatus.RUNNING;
- this.updateDisplayStateForResult_(this.currentTestCaseResult_);
- this.log_(testCase.fullyQualifiedName + ': ');
- },
-
- addErrorForCurrentTest: function(error) {
- this.log_('\n');
-
- var normalizedException = tr.b.normalizeException(error);
- this.log_('Exception: ' + normalizedException.message + '\n' +
- normalizedException.stack);
-
- this.currentTestCaseResult_.addError(normalizedException);
- this.updateDisplayStateForResult_(this.currentTestCaseResult_);
- if (this.headless_)
- this.notifyTestResultToDevServer_('EXCEPT', normalizedException.stack);
- },
-
- addHTMLOutputForCurrentTest: function(element) {
- this.currentTestCaseResult_.addHTMLOutput(element);
- this.updateDisplayStateForResult_(this.currentTestCaseResult_);
- },
-
- setCurrentTestFlaky: function() {
- this.currentTestCaseResult_.addFlaky();
- this.updateDisplayStateForResult_(this.currentTestCaseResult_);
- },
-
- setReturnValueFromCurrentTest: function(returnValue) {
- this.currentTestCaseResult_.testReturnValue = returnValue;
- },
-
- didCurrentTestEnd: function() {
- var now = window.performance.now();
- var testCaseResult = this.currentTestCaseResult_;
- var testCaseDuration = now - this.currentTestCaseStartTime_;
- this.currentTestCaseResult_.testStatus = TestStatus.DONE_RUNNING;
- testCaseResult.duration = testCaseDuration;
- this.totalRunTime_ = now - this.timeAtBeginningOfTest_;
- var resultString;
- if (testCaseResult.hadErrors) {
- resultString = 'FAILED';
- this.numTestsThatFailed_ += 1;
- tr.b.dispatchSimpleEvent(this, 'testfailed');
- } else if (testCaseResult.isFlaky) {
- resultString = 'FLAKY';
- this.numFlakyTests_ += 1;
- tr.b.dispatchSimpleEvent(this, 'testflaky');
- } else {
- resultString = 'PASSED';
- this.numTestsThatPassed_ += 1;
- tr.b.dispatchSimpleEvent(this, 'testpassed');
- }
- this.log_('[' + resultString + ']\n');
-
- if (this.headless_)
- this.notifyTestResultToDevServer_(resultString);
-
- this.updateDisplayStateForResult_(this.currentTestCaseResult_);
- this.currentTestCaseResult_ = undefined;
- },
-
- didRunTests: function() {
- this.log_('[DONE]\n');
- if (this.headless_)
- this.notifyTestCompletionToDevServer_();
- },
-
- getStats: function() {
- return {
- numTestsThatPassed: this.numTestsThatPassed_,
- numTestsThatFailed: this.numTestsThatFailed_,
- numFlakyTests: this.numFlakyTests_,
- totalRunTime: this.totalRunTime_
- };
- },
-
- notifyTestResultToDevServer_: function(result, extraMsg) {
- var req = new XMLHttpRequest();
- var testName = this.currentTestCaseResult_.testCase.fullyQualifiedName;
- var data = result + ' ' + testName + ' ' + (extraMsg || '');
- tr.b.postAsync('/tracing/notify_test_result', data);
- },
-
- notifyTestCompletionToDevServer_: function() {
- if (this.numTestsThatPassed_ + this.numTestsThatFailed_ +
- this.numFlakyTests_ === 0) {
- return;
- }
- var data = this.numTestsThatFailed_ === 0 ? 'ALL_PASSED' : 'HAD_FAILURES';
- data += '\nPassed tests: ' + this.numTestsThatPassed_ +
- ' Failed tests: ' + this.numTestsThatFailed_ +
- ' Flaky tests: ' + this.numFlakyTests_;
-
- tr.b.postAsync('/tracing/notify_tests_completed', data);
- },
-
- log_: function(msg) {
- tr.b.dispatchSimpleEvent(this, 'statschange');
- }
- };
-
- return {
- HTMLTestResults: HTMLTestResults
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html
deleted file mode 100644
index 87c5127f57d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/interactive_test_runner.html
+++ /dev/null
@@ -1,709 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/unittest.html">
-<link rel="import" href="/tracing/base/unittest/html_test_results.html">
-<link rel="import" href="/tracing/base/unittest/suite_loader.html">
-<link rel="import" href="/tracing/base/unittest/test_runner.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<style>
- x-base-interactive-test-runner {
- display: flex;
- flex-direction: column;
- flex: 0 0 auto;
- }
-
- x-base-interactive-test-runner > * {
- flex: 0 0 auto;
- }
- x-base-interactive-test-runner > #title {
- font-size: 16pt;
- }
-
- x-base-interactive-test-runner {
- font-family: sans-serif;
- }
-
- x-base-interactive-test-runner > h1 {
- margin: 5px 0px 10px 0px;
- }
-
- x-base-interactive-test-runner > #stats {
- }
-
- x-base-interactive-test-runner > #controls {
- display: block;
- margin-bottom: 5px;
- }
-
- x-base-interactive-test-runner > #controls > ul {
- list-style-type: none;
- padding: 0;
- margin: 0;
- }
-
- x-base-interactive-test-runner > #controls > ul > li {
- float: left;
- margin-right: 10px;
- padding-top: 5px;
- padding-bottom: 5px;
- }
-
- x-base-interactive-test-runner > #shortform-results {
- color: green;
- height; 40px;
- word-wrap: break-word;
- }
-
- x-base-interactive-test-runner > #shortform-results > .fail {
- color: darkred;
- font-weight: bold;
- }
-
- x-base-interactive-test-runner > #shortform-results > .flaky {
- color: darkorange;
- }
-
- x-base-interactive-test-runner > #results-container {
- flex: 1 1 auto;
- min-height: 0;
- overflow: auto;
- padding: 0 4px 0 4px;
- }
-
- .unittest-pending {
- color: orange;
- }
- .unittest-running {
- color: orange;
- font-weight: bold;
- }
-
- .unittest-passed {
- color: darkgreen;
- }
-
- .unittest-failed {
- color: darkred;
- font-weight: bold;
- }
-
- .unittest-flaky {
- color: darkorange;
- }
-
- .unittest-exception {
- color: red;
- font-weight: bold;
- }
-
- .unittest-failure {
- border: 1px solid grey;
- border-radius: 5px;
- padding: 5px;
- }
-</style>
-
-<template id="x-base-interactive-test-runner-template">
- <h1 id="title">Tests</h1>
- <div id="stats"></div>
- <div id="controls">
- <ul id="links">
- </ul>
- <div style="clear: both;"></div>
-
- <div>
- <span>
- <label>
- <input type="radio" name="test-type-to-run" value="unit" />
- Run unit tests
- </label>
- </span>
- <span>
- <label>
- <input type="radio" name="test-type-to-run" value="perf" />
- Run perf tests
- </label>
- </span>
- <span>
- <label>
- <input type="radio" name="test-type-to-run" value="all" />
- Run all tests
- </label>
- </span>
- </div>
- <span>
- <label>
- <input type="checkbox" id="short-format" /> Short format</label>
- </span>
- </div>
- <div id="shortform-results">
- </div>
- <div id="results-container">
- </div>
-</template>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
- var ALL_TEST_TYPES = 'all';
-
- /**
- * @constructor
- */
- var InteractiveTestRunner = tr.ui.b.define('x-base-interactive-test-runner');
-
- InteractiveTestRunner.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.allTests_ = undefined;
-
- this.suppressStateChange_ = false;
-
- this.testFilterString_ = '';
- this.testTypeToRun_ = tr.b.unittest.TestTypes.UNITTEST;
- this.shortFormat_ = false;
- this.testSuiteName_ = '';
-
- this.rerunPending_ = false;
- this.runner_ = undefined;
- this.results_ = undefined;
- this.headless_ = false;
-
- this.onResultsStatsChanged_ = this.onResultsStatsChanged_.bind(this);
- this.onTestFailed_ = this.onTestFailed_.bind(this);
- this.onTestFlaky_ = this.onTestFlaky_.bind(this);
- this.onTestPassed_ = this.onTestPassed_.bind(this);
-
- Polymer.dom(this).appendChild(tr.ui.b.instantiateTemplate(
- '#x-base-interactive-test-runner-template', THIS_DOC));
-
- Polymer.dom(this).querySelector(
- 'input[name=test-type-to-run][value=unit]').checked = true;
- var testTypeToRunEls = tr.b.asArray(Polymer.dom(this).querySelectorAll(
- 'input[name=test-type-to-run]'));
-
- testTypeToRunEls.forEach(
- function(inputEl) {
- inputEl.addEventListener(
- 'click', this.onTestTypeToRunClick_.bind(this));
- }, this);
-
- var shortFormatEl = Polymer.dom(this).querySelector('#short-format');
- shortFormatEl.checked = this.shortFormat_;
- shortFormatEl.addEventListener(
- 'click', this.onShortFormatClick_.bind(this));
- this.updateShortFormResultsDisplay_();
-
- // Oh, DOM, how I love you. Title is such a convenient property name and I
- // refuse to change my worldview because of tooltips.
- this.__defineSetter__(
- 'title',
- function(title) {
- Polymer.dom(Polymer.dom(this).querySelector('#title')).textContent =
- title;
- });
- },
-
- get allTests() {
- return this.allTests_;
- },
-
- set allTests(allTests) {
- this.allTests_ = allTests;
- this.scheduleRerun_();
- },
-
- get testLinks() {
- return this.testLinks_;
- },
- set testLinks(testLinks) {
- this.testLinks_ = testLinks;
- var linksEl = Polymer.dom(this).querySelector('#links');
- Polymer.dom(linksEl).textContent = '';
- this.testLinks_.forEach(function(l) {
- var link = document.createElement('a');
- link.href = l.linkPath;
- Polymer.dom(link).textContent = l.title;
-
- var li = document.createElement('li');
- Polymer.dom(li).appendChild(link);
-
- Polymer.dom(linksEl).appendChild(li);
- }, this);
- },
-
- get testFilterString() {
- return this.testFilterString_;
- },
-
- set testFilterString(testFilterString) {
- this.testFilterString_ = testFilterString;
- this.scheduleRerun_();
- if (!this.suppressStateChange_)
- tr.b.dispatchSimpleEvent(this, 'statechange');
- },
-
- get shortFormat() {
- return this.shortFormat_;
- },
-
- set shortFormat(shortFormat) {
- this.shortFormat_ = shortFormat;
- Polymer.dom(this).querySelector('#short-format').checked = shortFormat;
- if (this.results_)
- this.results_.shortFormat = shortFormat;
- if (!this.suppressStateChange_)
- tr.b.dispatchSimpleEvent(this, 'statechange');
- },
-
- onShortFormatClick_: function(e) {
- this.shortFormat_ =
- Polymer.dom(this).querySelector('#short-format').checked;
- this.updateShortFormResultsDisplay_();
- this.updateResultsGivenShortFormat_();
- if (!this.suppressStateChange_)
- tr.b.dispatchSimpleEvent(this, 'statechange');
- },
-
- updateShortFormResultsDisplay_: function() {
- var display = this.shortFormat_ ? '' : 'none';
- Polymer.dom(this).querySelector('#shortform-results').style.display =
- display;
- },
-
- updateResultsGivenShortFormat_: function() {
- if (!this.results_)
- return;
-
- if (this.testFilterString_.length || this.testSuiteName_.length)
- this.results_.showHTMLOutput = true;
- else
- this.results_.showHTMLOutput = false;
- this.results_.showPendingAndPassedTests = this.shortFormat_;
- },
-
- get testTypeToRun() {
- return this.testTypeToRun_;
- },
-
- set testTypeToRun(testTypeToRun) {
- this.testTypeToRun_ = testTypeToRun;
- var sel;
- switch (testTypeToRun) {
- case tr.b.unittest.TestTypes.UNITTEST:
- sel = 'input[name=test-type-to-run][value=unit]';
- break;
- case tr.b.unittest.TestTypes.PERFTEST:
- sel = 'input[name=test-type-to-run][value=perf]';
- break;
- case ALL_TEST_TYPES:
- sel = 'input[name=test-type-to-run][value=all]';
- break;
- default:
- throw new Error('Invalid test type to run: ' + testTypeToRun);
- }
- Polymer.dom(this).querySelector(sel).checked = true;
- this.scheduleRerun_();
- if (!this.suppressStateChange_)
- tr.b.dispatchSimpleEvent(this, 'statechange');
- },
-
- onTestTypeToRunClick_: function(e) {
- switch (e.target.value) {
- case 'unit':
- this.testTypeToRun_ = tr.b.unittest.TestTypes.UNITTEST;
- break;
- case 'perf':
- this.testTypeToRun_ = tr.b.unittest.TestTypes.PERFTEST;
- break;
- case 'all':
- this.testTypeToRun_ = ALL_TEST_TYPES;
- break;
- default:
- throw new Error('Inalid test type: ' + e.target.value);
- }
-
- this.scheduleRerun_();
- if (!this.suppressStateChange_)
- tr.b.dispatchSimpleEvent(this, 'statechange');
- },
-
- onTestPassed_: function() {
- Polymer.dom(Polymer.dom(this).querySelector('#shortform-results')).
- appendChild(document.createTextNode('.'));
- },
-
- onTestFailed_: function() {
- var span = document.createElement('span');
- Polymer.dom(span).classList.add('fail');
- Polymer.dom(span).appendChild(document.createTextNode('F'));
- Polymer.dom(Polymer.dom(this).querySelector('#shortform-results'))
- .appendChild(span);
- },
-
- onTestFlaky_: function() {
- var span = document.createElement('span');
- Polymer.dom(span).classList.add('flaky');
- Polymer.dom(span).appendChild(document.createTextNode('~'));
- Polymer.dom(Polymer.dom(this).querySelector('#shortform-results'))
- .appendChild(span);
- },
-
- onResultsStatsChanged_: function() {
- var statsEl = Polymer.dom(this).querySelector('#stats');
- var stats = this.results_.getStats();
- var numTestsOverall = this.runner_.testCases.length;
- var numTestsThatRan = stats.numTestsThatPassed +
- stats.numTestsThatFailed + stats.numFlakyTests;
- Polymer.dom(statsEl).innerHTML =
- '<span>' + numTestsThatRan + '/' + numTestsOverall +
- '</span> tests run, ' +
- '<span class="unittest-failed">' + stats.numTestsThatFailed +
- '</span> failures, ' +
- '<span class="unittest-flaky">' + stats.numFlakyTests +
- '</span> flaky, ' +
- ' in ' + stats.totalRunTime.toFixed(2) + 'ms.';
- },
-
- scheduleRerun_: function() {
- if (this.rerunPending_)
- return;
- if (this.runner_) {
- this.rerunPending_ = true;
- this.runner_.beginToStopRunning();
- var doRerun = function() {
- this.rerunPending_ = false;
- this.scheduleRerun_();
- }.bind(this);
- this.runner_.runCompletedPromise.then(
- doRerun, doRerun);
- return;
- }
- this.beginRunning_();
- },
-
- beginRunning_: function() {
- var resultsContainer =
- Polymer.dom(this).querySelector('#results-container');
- if (this.results_) {
- this.results_.removeEventListener('testpassed', this.onTestPassed_);
- this.results_.removeEventListener('testfailed', this.onTestFailed_);
- this.results_.removeEventListener('testflaky', this.onTestFlaky_);
- this.results_.removeEventListener('statschange',
- this.onResultsStatsChanged_);
- delete this.results_.getHRefForTestCase;
- Polymer.dom(resultsContainer).removeChild(this.results_);
- }
-
- this.results_ = new tr.b.unittest.HTMLTestResults();
- this.results_.headless = this.headless_;
- this.results_.getHRefForTestCase = this.getHRefForTestCase.bind(this);
- this.updateResultsGivenShortFormat_();
-
- this.results_.shortFormat = this.shortFormat_;
- this.results_.addEventListener('testpassed', this.onTestPassed_);
- this.results_.addEventListener('testfailed', this.onTestFailed_);
- this.results_.addEventListener('testflaky', this.onTestFlaky_);
- this.results_.addEventListener('statschange',
- this.onResultsStatsChanged_);
- Polymer.dom(resultsContainer).appendChild(this.results_);
-
- var tests = this.allTests_.filter(function(test) {
- var i = test.fullyQualifiedName.indexOf(this.testFilterString_);
- if (i === -1)
- return false;
- if (this.testTypeToRun_ !== ALL_TEST_TYPES &&
- test.testType !== this.testTypeToRun_)
- return false;
- return true;
- }, this);
-
- this.runner_ = new tr.b.unittest.TestRunner(this.results_, tests);
- this.runner_.beginRunning();
-
- this.runner_.runCompletedPromise.then(
- this.runCompleted_.bind(this),
- this.runCompleted_.bind(this));
- },
-
- setState: function(state, opt_suppressStateChange) {
- this.suppressStateChange_ = true;
- if (state.testFilterString !== undefined)
- this.testFilterString = state.testFilterString;
- else
- this.testFilterString = '';
-
- if (state.shortFormat === undefined)
- this.shortFormat = false;
- else
- this.shortFormat = state.shortFormat;
-
- if (state.testTypeToRun === undefined)
- this.testTypeToRun = tr.b.unittest.TestTypes.UNITTEST;
- else
- this.testTypeToRun = state.testTypeToRun;
-
- this.testSuiteName_ = state.testSuiteName || '';
- this.headless_ = state.headless || false;
-
- if (!opt_suppressStateChange)
- this.suppressStateChange_ = false;
-
- this.onShortFormatClick_();
- this.scheduleRerun_();
- this.suppressStateChange_ = false;
- },
-
- getDefaultState: function() {
- return {
- testFilterString: '',
- testSuiteName: '',
- shortFormat: false,
- testTypeToRun: tr.b.unittest.TestTypes.UNITTEST
- };
- },
-
- getState: function() {
- return {
- testFilterString: this.testFilterString_,
- testSuiteName: this.testSuiteName_,
- shortFormat: this.shortFormat_,
- testTypeToRun: this.testTypeToRun_
- };
- },
-
- getHRefForTestCase: function(testCases) {
- return undefined;
- },
-
- runCompleted_: function() {
- this.runner_ = undefined;
- }
- };
-
- function loadAndRunTests(runnerConfig) {
-
- // The test runner no-ops pushState so keep it around.
- var realWindowHistoryPushState = window.history.pushState.bind(
- window.history);
-
- function stateToSearchString(defaultState, state) {
- var parts = [];
- for (var k in state) {
- if (state[k] === defaultState[k])
- continue;
- var v = state[k];
- var kv;
- if (v === true) {
- kv = k;
- } else if (v === false) {
- kv = k + '=false';
- } else if (v === '') {
- continue;
- } else {
- kv = k + '=' + v;
- }
- parts.push(kv);
- }
- return parts.join('&');
- }
-
- function stateFromSearchString(string) {
- var state = {};
- string.split('&').forEach(function(part) {
- if (part === '')
- return;
- var kv = part.split('=');
- var k, v;
- if (kv.length === 1) {
- k = kv[0];
- v = true;
- } else {
- k = kv[0];
- if (kv[1] === 'false')
- v = false;
- else
- v = kv[1];
- }
- state[k] = v;
- });
- return state;
- }
-
- function getSuiteRelpathsToLoad(state) {
- if (state.testSuiteName) {
- return new Promise(function(resolve) {
- var parts = state.testSuiteName.split('.');
- var testSuiteRelPath = '/' + parts.join('/') + '.html';
-
- var suiteRelpathsToLoad = [testSuiteRelPath];
- resolve(suiteRelpathsToLoad);
- });
- }
- return runnerConfig.getAllSuiteRelPathsAsync();
- }
-
-
- function loadAndRunTestsImpl() {
- var state = stateFromSearchString(
- window.location.search.substring(1));
- updateTitle(state);
-
-
- showLoadingOverlay();
-
- var loader;
- var p = getSuiteRelpathsToLoad(state);
- p = p.then(
- function(suiteRelpathsToLoad) {
- loader = new tr.b.unittest.SuiteLoader(suiteRelpathsToLoad);
- return loader.allSuitesLoadedPromise;
- },
- function(e) {
- hideLoadingOverlay();
- throw e;
- });
- p = p.then(
- function() {
- hideLoadingOverlay();
- // FIXME
- window.addEventListener('WebComponentsReady', function() {
- runTests(loader, state);
- });
- runTests(loader, state);
- // Polymer.whenReady(function() {
- // runTests(loader, state);
- // });
- },
- function(err) {
- hideLoadingOverlay();
- tr.showPanic('Module loading failure', err);
- throw err;
- });
- return p;
- }
-
- function showLoadingOverlay() {
- var overlay = document.createElement('div');
- overlay.id = 'tests-loading-overlay';
- overlay.style.backgroundColor = 'white';
- overlay.style.boxSizing = 'border-box';
- overlay.style.color = 'black';
- overlay.style.display = 'flex';
- overlay.style.height = '100%';
- overlay.style.left = 0;
- overlay.style.padding = '8px';
- overlay.style.position = 'fixed';
- overlay.style.top = 0;
- overlay.style.flexDirection = 'column';
- overlay.style.width = '100%';
-
- var element = document.createElement('div');
- element.style.flex = '1 1 auto';
- element.style.overflow = 'auto';
- Polymer.dom(overlay).appendChild(element);
-
- Polymer.dom(element).textContent = 'Loading tests...';
- Polymer.dom(document.body).appendChild(overlay);
- }
- function hideLoadingOverlay() {
- var overlay = Polymer.dom(document.body).querySelector(
- '#tests-loading-overlay');
- Polymer.dom(document.body).removeChild(overlay);
- }
-
- function updateTitle(state) {
- var testFilterString = state.testFilterString || '';
- var testSuiteName = state.testSuiteName || '';
-
- var title;
- if (testSuiteName && testFilterString.length) {
- title = testFilterString + ' in ' + testSuiteName;
- } else if (testSuiteName) {
- title = testSuiteName;
- } else if (testFilterString) {
- title = testFilterString + ' in all tests';
- } else {
- title = runnerConfig.title;
- }
-
- if (state.shortFormat)
- title += '(s)';
- document.title = title;
- var runner = Polymer.dom(document).querySelector(
- 'x-base-interactive-test-runner');
- if (runner)
- runner.title = title;
- }
-
- function runTests(loader, state) {
- var runner = new tr.b.unittest.InteractiveTestRunner();
- runner.style.width = '100%';
- runner.style.height = '100%';
- runner.testLinks = runnerConfig.testLinks;
- runner.allTests = loader.getAllTests();
- Polymer.dom(document.body).appendChild(runner);
-
- runner.setState(state);
- updateTitle(state);
-
- runner.addEventListener('statechange', function() {
- var state = runner.getState();
- var stateString = stateToSearchString(runner.getDefaultState(),
- state);
- if (window.location.search.substring(1) === stateString)
- return;
-
- updateTitle(state);
- var stateURL;
- if (stateString.length > 0)
- stateURL = window.location.pathname + '?' + stateString;
- else
- stateURL = window.location.pathname;
- realWindowHistoryPushState(state, document.title, stateURL);
- });
-
- window.addEventListener('popstate', function(state) {
- runner.setState(state, true);
- });
-
- runner.getHRefForTestCase = function(testCase) {
- var state = runner.getState();
- if (state.testFilterString === '' &&
- state.testSuiteName === '') {
- state.testSuiteName = testCase.suite.name;
- state.testFilterString = '';
- state.shortFormat = false;
- } else {
- state.testSuiteName = testCase.suite.name;
- state.testFilterString = testCase.name;
- state.shortFormat = false;
- }
- var stateString = stateToSearchString(runner.getDefaultState(),
- state);
- if (stateString.length > 0)
- return window.location.pathname + '?' + stateString;
- else
- return window.location.pathname;
- };
- }
-
- loadAndRunTestsImpl();
- }
-
- return {
- InteractiveTestRunner: InteractiveTestRunner,
- loadAndRunTests: loadAndRunTests
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html
deleted file mode 100644
index c5be2b85a2a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/suite_loader.html
+++ /dev/null
@@ -1,244 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unittest/test_suite.html">
-<link rel="import" href="/tracing/base/xhr.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- function HTMLImportsModuleLoader() {
- }
- HTMLImportsModuleLoader.prototype = {
- loadModule: function(testRelpath, moduleName) {
- return new Promise(function(resolve, reject) {
- var importEl = document.createElement('link');
- importEl.moduleName = moduleName;
- Polymer.dom(importEl).setAttribute('rel', 'import');
- Polymer.dom(importEl).setAttribute('href', testRelpath);
-
- importEl.addEventListener('load', function() {
- resolve({testRelpath: testRelpath,
- moduleName: moduleName});
- });
- importEl.addEventListener('error', function(e) {
- reject('Error loading &#60;link rel="import" href="' +
- testRelpath + '"');
- });
-
- Polymer.dom(tr.doc.head).appendChild(importEl);
- });
- },
-
- getCurrentlyExecutingModuleName: function() {
- if (!document.currentScript)
- throw new Error('Cannot call testSuite except during load.');
- var linkDoc = document.currentScript.ownerDocument;
- var url = linkDoc.URL;
- var name = this.guessModuleNameFromURL_(url);
- return name;
- },
-
- guessModuleNameFromURL_: function(url) {
- var m = /.+?:\/\/.+?(\/.+)/.exec(url);
- if (!m)
- throw new Error('Guessing module name failed');
- var path = m[1];
- if (path[0] !== '/')
- throw new Error('malformed path');
- if (path.substring(path.length - 5) !== '.html')
- throw new Error('Cannot define testSuites outside html imports');
- var parts = path.substring(1, path.length - 5).split('/');
- return parts.join('.');
- }
- };
-
- function HeadlessModuleLoader() {
- this.currentlyExecutingModuleInfo_ = undefined;
- }
- HeadlessModuleLoader.prototype = {
- loadModule: function(testRelpath, moduleName) {
- return Promise.resolve().then(function() {
- var moduleInfo = {
- testRelpath: testRelpath,
- moduleName: moduleName
- };
- if (this.currentlyExecutingModuleInfo_ !== undefined)
- throw new Error('WAT');
- this.currentlyExecutingModuleInfo_ = moduleInfo;
-
- try {
- loadHTML(testRelpath);
- } catch (e) {
- e.message = 'While loading ' + moduleName + ', ' + e.message;
- e.stack = 'While loading ' + moduleName + ', ' + e.stack;
- throw e;
- } finally {
- this.currentlyExecutingModuleInfo_ = undefined;
- }
-
- return moduleInfo;
- }.bind(this));
- },
-
- getCurrentlyExecutingModuleName: function() {
- if (this.currentlyExecutingModuleInfo_ === undefined)
- throw new Error('No currently loading module');
- return this.currentlyExecutingModuleInfo_.moduleName;
- }
- };
-
-
- function SuiteLoader(suiteRelpathsToLoad) {
- tr.b.EventTarget.call(this);
-
- this.currentModuleLoader_ = undefined;
- this.testSuites = [];
-
- if (tr.isHeadless) {
- this.currentModuleLoader_ = new HeadlessModuleLoader();
- } else {
- this.currentModuleLoader_ = new HTMLImportsModuleLoader();
- }
-
- this.allSuitesLoadedPromise = this.beginLoadingModules_(
- suiteRelpathsToLoad);
- }
-
- SuiteLoader.prototype = {
- __proto__: tr.b.EventTarget.prototype,
-
- beginLoadingModules_: function(testRelpaths) {
- // Hooks!
- this.bindGlobalHooks_();
-
- // Load the modules.
- var modulePromises = [];
- for (var i = 0; i < testRelpaths.length; i++) {
- var testRelpath = testRelpaths[i];
- var moduleName = testRelpath.split('/').slice(-1)[0];
-
- var p = this.currentModuleLoader_.loadModule(testRelpath, moduleName);
- modulePromises.push(p);
- }
-
- var allModulesLoadedPromise = new Promise(function(resolve, reject) {
- var remaining = modulePromises.length;
- var resolved = false;
- function oneMoreLoaded() {
- if (resolved)
- return;
- remaining--;
- if (remaining > 0)
- return;
- resolved = true;
- resolve();
- }
-
- function oneRejected(e) {
- if (resolved)
- return;
- resolved = true;
- reject(e);
- }
-
- modulePromises.forEach(function(modulePromise) {
- modulePromise.then(oneMoreLoaded, oneRejected);
- });
- });
-
- // Script errors errors abort load;
- var scriptErrorPromise = new Promise(function(xresolve, xreject) {
- this.scriptErrorPromiseResolver_ = {
- resolve: xresolve,
- reject: xreject
- };
- }.bind(this));
- var donePromise = Promise.race([
- allModulesLoadedPromise,
- scriptErrorPromise
- ]);
-
- // Cleanup.
- return donePromise.then(
- function() {
- this.scriptErrorPromiseResolver_ = undefined;
- this.unbindGlobalHooks_();
- }.bind(this),
- function(e) {
- this.scriptErrorPromiseResolver_ = undefined;
- this.unbindGlobalHooks_();
- throw e;
- }.bind(this));
- },
-
- bindGlobalHooks_: function() {
- if (global._currentSuiteLoader !== undefined)
- throw new Error('A suite loader exists already');
- global._currentSuiteLoader = this;
-
- this.oldGlobalOnError_ = global.onerror;
- global.onerror = function(errorMsg, url, lineNumber) {
- this.scriptErrorPromiseResolver_.reject(
- new Error(errorMsg + '\n' + url + ':' + lineNumber));
- if (this.oldGlobalOnError_)
- return this.oldGlobalOnError_(errorMsg, url, lineNumber);
- return false;
- }.bind(this);
- },
-
- unbindGlobalHooks_: function() {
- global._currentSuiteLoader = undefined;
-
- global.onerror = this.oldGlobalOnError_;
- this.oldGlobalOnError_ = undefined;
- },
-
- constructAndRegisterTestSuite: function(suiteConstructor) {
- var name = this.currentModuleLoader_.getCurrentlyExecutingModuleName();
-
- var testSuite = new tr.b.unittest.TestSuite(
- name, suiteConstructor);
-
- this.testSuites.push(testSuite);
-
- var e = new tr.b.Event('suite-loaded');
- e.testSuite = testSuite;
- this.dispatchEvent(e);
- },
-
- getAllTests: function() {
- var tests = [];
- this.testSuites.forEach(function(suite) {
- tests.push.apply(tests, suite.tests);
- });
- return tests;
- },
-
- findTestWithFullyQualifiedName: function(fullyQualifiedName) {
- for (var i = 0; i < this.testSuites.length; i++) {
- var suite = this.testSuites[i];
- for (var j = 0; j < suite.tests.length; j++) {
- var test = suite.tests[j];
- if (test.fullyQualifiedName === fullyQualifiedName)
- return test;
- }
- }
- throw new Error('Test ' + fullyQualifiedName +
- 'not found amongst ' + this.testSuites.length);
- }
- };
-
- return {
- SuiteLoader: SuiteLoader
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html
deleted file mode 100644
index 231ebfde0f7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/unittest/constants.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- var TestTypes = tr.b.unittest.TestTypes;
-
- function TestCase(name, opt_testFn, opt_options) {
- if (!name)
- throw new Error('Name must be provided');
- this.guid_ = tr.b.GUID.allocateSimple();
- this.suite_ = undefined; // Set by TestSuite.addTest.
- this.name_ = name;
-
- if (opt_options)
- this.options_ = opt_options;
- else
- this.options_ = {};
-
- this.testFn_ = opt_testFn;
- }
-
- TestCase.parseFullyQualifiedName = function(fqn) {
- var i = fqn.lastIndexOf('.');
- if (i === -1)
- throw new Error('FullyQualifiedNames must have a period in them');
- return {
- suiteName: fqn.substr(0, i),
- testCaseName: fqn.substr(i + 1)
- };
- };
-
- TestCase.prototype = {
- __proto__: Object.prototype,
-
- get guid() {
- return this.guid_;
- },
-
- get suite() {
- return this.suite_;
- },
-
- set suite(suite) {
- if (this.suite_ !== undefined)
- throw new Error('Suite can only be assigned once.');
- this.suite_ = suite;
- },
-
- get testType() {
- return TestTypes.UNITTEST;
- },
-
- get name() {
- return this.name_;
- },
-
- get fullyQualifiedName() {
- return this.suite_.name + '.' + this.name_;
- },
-
- get options() {
- return this.options_;
- },
-
- setUp: function() {
- if (this.options_.setUp)
- this.options_.setUp.call(this);
- },
-
- run: function(htmlHook) {
- return this.testFn_();
- },
-
- tearDown: function() {
- if (this.options_.tearDown)
- this.options_.tearDown.call(this);
- },
-
- // TODO(nduca): The routing of this is a bit awkward. Probably better
- // to install a global function.
- addHTMLOutput: function(element) {
- tr.b.unittest.addHTMLOutputForCurrentTest(element);
- }
- };
-
- function PerfTestCase(name, testFn, opt_options) {
- TestCase.call(this, name, testFn, opt_options);
- this.iterations = this.options.iterations || 10;
- }
-
- PerfTestCase.prototype = {
- __proto__: TestCase.prototype,
-
- get testType() {
- return TestTypes.PERFTEST;
- },
-
- run: function() {
- var durations = [];
- var iterations = this.iterations;
- for (var i = 0; i < iterations; ++i) {
- var start = window.performance.now();
- this.runOneIteration();
- var duration = window.performance.now() - start;
- durations.push(duration);
- }
-
- var durationStrings = durations.map(function(d) {
- return d.toFixed(2) + 'ms';
- });
- var average = tr.b.Statistics.mean(durations);
- var min = tr.b.Statistics.min(durations);
-
- var summaryString = ' [';
- summaryString += 'min ' + min.toFixed(2) + 'ms, ';
- summaryString += 'avg ' + average.toFixed(2) + 'ms';
- summaryString += ']';
-
- return durationStrings.join(', ') + summaryString;
- },
-
- runOneIteration: function() {
- this.testFn_();
- }
- };
-
- return {
- TestCase: TestCase,
- PerfTestCase: PerfTestCase
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case_test.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case_test.html
deleted file mode 100644
index 33f176ad5c5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_case_test.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/unittest/test_case.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('parseFullyQualifiedName', function() {
- var p = tr.b.unittest.TestCase.parseFullyQualifiedName('foo.bar');
- assert.equal(p.suiteName, 'foo');
- assert.equal(p.testCaseName, 'bar');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html
deleted file mode 100644
index ac3b16f46e1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_runner.html
+++ /dev/null
@@ -1,273 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/timing.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- var realTvOnAnimationFrameError;
- var realGlobalOnError;
- var realGlobalHistoryPushState;
-
- var NUM_TESTS_PER_RIC = 16;
-
- function installGlobalTestHooks(runner) {
- realTvOnAnimationFrameError = tr.b.onAnimationFrameError;
- tr.b.onAnimationFrameError = function(error) {
- runner.results.addErrorForCurrentTest(error);
- };
-
- if (tr.isExported('global.onerror')) {
- realGlobalOnError = global.onerror;
- global.onerror = function(errorMsg, url, lineNumber) {
- runner.results.addErrorForCurrentTest(
- errorMsg + ' at ' + url + ':' + lineNumber);
- if (realGlobalOnError)
- return realGlobalOnError(errorMsg, url, lineNumber);
- return false;
- };
- }
-
- if (tr.isExported('global.history')) {
- realGlobalHistoryPushState = global.history.pushState;
- global.history.pushState = function() {
- };
- }
-
- tr.b.unittest.addHTMLOutputForCurrentTest = function(element) {
- runner.results.addHTMLOutputForCurrentTest(element);
- };
-
- if (tr.isExported('global.sessionStorage')) {
- global.sessionStorage.clear();
- }
-
- var e = new tr.b.Event('tr-unittest-will-run');
- TestRunner.dispatchEvent(e);
- }
-
- function uninstallGlobalTestHooks() {
- if (tr.isExported('global.onerror')) {
- global.onerror = realGlobalOnError;
- realGlobalOnError = undefined;
- }
-
- tr.b.onAnimationFrameError = realTvOnAnimationFrameError;
- realTvOnAnimationFrameError = undefined;
-
- if (tr.isExported('global.history')) {
- global.history.pushState = realGlobalHistoryPushState;
- realGlobalHistoryPushState = undefined;
- }
-
- tr.b.unittest.addHTMLOutputForCurrentTest = undefined;
- }
-
-
- function TestRunner(results, testCases) {
- this.results_ = results;
- this.testCases_ = testCases;
- this.pendingTestCases_ = [];
-
- this.runOneTestCaseScheduled_ = false;
- this.numRunsSinceLastRIC_ = 0;
-
- this.runCompletedPromise = undefined;
- this.runCompletedResolver_ = undefined;
-
- this.currentTestCase_ = undefined;
- }
-
- TestRunner.prototype = {
- __proto__: Object.prototype,
-
- beginRunning: function() {
- if (this.pendingTestCases_.length)
- throw new Error('Tests still running!');
-
- this.runCompletedPromise = new Promise(function(resolve, reject) {
- this.runCompletedResolver_ = {
- resolve: resolve,
- reject: reject
- };
- }.bind(this));
-
- this.pendingTestCases_ = this.testCases_.slice(0);
-
- this.results_.willRunTests(this.pendingTestCases_);
-
- this.scheduleRunOneTestCase_();
-
- return this.runCompletedPromise;
- },
-
- beginToStopRunning: function() {
- if (!this.runCompletedResolver_)
- throw new Error('Still running');
- this.pendingTestCases_ = [];
- return this.runCompletedPromise;
- },
-
- get testCases() {
- return this.testCases_;
- },
-
- get results() {
- return this.results_;
- },
-
- scheduleRunOneTestCase_: function() {
- if (this.runOneTestCaseScheduled_)
- return;
- this.runOneTestCaseScheduled_ = true;
-
- this.numRunsSinceLastRIC_++;
- if (this.numRunsSinceLastRIC_ === NUM_TESTS_PER_RIC) {
- this.numRunsSinceLastRIC_ = 0;
- tr.b.requestIdleCallback(this.runOneTestCase_, this);
- } else {
- Promise.resolve().then(this.runOneTestCase_.bind(this));
- }
- },
-
- runOneTestCase_: function() {
- this.runOneTestCaseScheduled_ = false;
-
- if (this.pendingTestCases_.length === 0) {
- this.didFinishRunningAllTests_();
- return;
- }
-
- this.currentTestCase_ = this.pendingTestCases_.splice(0, 1)[0];
- this.currentMark_ = tr.b.Timing.mark(
- 'TestRunner', 'RunTest', {testName: this.currentTestCase_.name});
- this.results_.willRunTest(this.currentTestCase_);
-
- if (this.isCurrentTestFlaky_()) {
- this.results_.setCurrentTestFlaky();
- this.results_.didCurrentTestEnd();
- this.currentMark_.end();
- this.currentTestCase_ = undefined;
- this.scheduleRunOneTestCase_();
- return;
- }
-
- if (!this.setUpCurrentTestCase_()) {
- this.results_.didCurrentTestEnd();
- this.currentMark_.end();
- this.currentTestCase_ = undefined;
- this.scheduleRunOneTestCase_();
- return;
- }
-
- this.runCurrentTestCase_().then(
- function pass(result) {
- try {
- this.tearDownCurrentTestCase_(true);
- if (result)
- this.results_.setReturnValueFromCurrentTest(result);
- this.results_.didCurrentTestEnd();
- this.currentMark_.end();
- this.currentTestCase_ = undefined;
- this.scheduleRunOneTestCase_();
- } catch (e) {
- this.hadInternalError_(e);
- throw e;
- }
- }.bind(this),
- function fail(error) {
- try {
- this.results_.addErrorForCurrentTest(error);
- this.tearDownCurrentTestCase_(false);
- this.results_.didCurrentTestEnd();
- this.currentMark_.end();
- this.currentTestCase_ = undefined;
- this.scheduleRunOneTestCase_();
- } catch (e) {
- this.hadInternalError_(e);
- throw e;
- }
- }.bind(this));
- },
-
- isCurrentTestFlaky_: function() {
- return !!this.currentTestCase_.options['flaky'];
- },
-
- setUpCurrentTestCase_: function() {
- // Try setting it up. Return true if succeeded.
- installGlobalTestHooks(this);
- try {
- this.currentTestCase_.setUp();
- } catch (error) {
- this.results_.addErrorForCurrentTest(error);
- return false;
- }
- return true;
- },
-
- runCurrentTestCase_: function() {
- return new Promise(function(resolve, reject) {
- try {
- var maybePromise = this.currentTestCase_.run();
- } catch (error) {
- reject(error);
- return;
- }
-
- if (maybePromise !== undefined && maybePromise.then) {
- maybePromise.then(
- function(result) {
- resolve(result);
- },
- function(error) {
- reject(error);
- });
- } else {
- resolve(maybePromise);
- }
- }.bind(this));
- },
-
- hadInternalError_: function(outerE) {
- try {
- this.results.didRunTests();
- } catch (e) {
- console.log('Had another error during hadInternalError_!');
- console.log(e.stack);
- }
-
- this.runCompletedResolver_.reject(outerE);
- this.runCompletedResolver_ = undefined;
- },
-
- tearDownCurrentTestCase_: function() {
- try {
- this.currentTestCase_.tearDown();
- } catch (error) {
- this.results_.addErrorForCurrentTest(error);
- }
-
- uninstallGlobalTestHooks();
- },
-
- didFinishRunningAllTests_: function() {
- this.results.didRunTests();
- this.runCompletedResolver_.resolve();
- this.runCompletedResolver_ = undefined;
- }
- };
-
- tr.b.EventTarget.decorate(TestRunner);
-
- return {
- TestRunner: TestRunner
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html
deleted file mode 100644
index 34f5d0525a0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/test_suite.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unittest/constants.html">
-<link rel="import" href="/tracing/base/unittest/test_case.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- var TestCase = tr.b.unittest.TestCase;
- var PerfTestCase = tr.b.unittest.PerfTestCase;
-
- var TestTypes = tr.b.unittest.TestTypes;
-
- function TestSuite(name, suiteConstructor) {
- this.guid = tr.b.GUID.allocateSimple();
- this.name_ = name;
- this.tests_ = [];
- this.testNames_ = {}; // For dupe checking.
-
- global.flakyTest = function(testCaseOrName, opt_testFn, opt_options) {
- if (testCaseOrName instanceof TestCase) {
- testCaseOrName.options['flaky'] = true;
- test(testCaseOrName);
- } else {
- var options = opt_options || {};
- options['flaky'] = true;
- test(testCaseOrName, opt_testFn, options);
- }
- }.bind(this);
-
- global.test = function(testCaseOrName, opt_testFn, opt_options) {
- if (testCaseOrName instanceof TestCase) {
- if (opt_testFn !== undefined)
- throw new Error('opt_testFn cannot be given when giving a TestCase');
- if (opt_options !== undefined)
- throw new Error('opt_options cannot be given when giving a TestCase');
- this.addTest(testCaseOrName);
- return;
- }
-
- var testName = testCaseOrName;
- var testFn = opt_testFn;
- var options = opt_options || {};
- if (testFn === undefined)
- throw new Error('Must provide opt_testFn');
-
- // If the test cares about DPI settings then we first push a test
- // that fakes the DPI as the low or hi Dpi version, depending on what
- // we're current using.
- if (options.dpiAware) {
- var defaultDevicePixelRatio = window.devicePixelRatio;
- var dpi = defaultDevicePixelRatio > 1 ? 1 : 2;
-
- var testWrapper = function() {
- window.devicePixelRatio = dpi;
- try {
- testFn.bind(this).call();
- } finally {
- window.devicePixelRatio = defaultDevicePixelRatio;
- }
- };
-
- var newName = name;
- if (dpi === 1) {
- newName += '_loDPI';
- testName += '_hiDPI';
- } else {
- newName += '_hiDPI';
- testName += '_loDPI';
- }
-
- this.addTest(new TestCase(newName,
- testWrapper, options || {}));
- }
-
- this.addTest(new TestCase(testName,
- testFn, options || {}));
- }.bind(this);
-
- global.timedPerfTest = function(name, testFn, options) {
- if (options === undefined || options.iterations === undefined)
- throw new Error('timedPerfTest must have iteration option provided.');
- this.addTest(new PerfTestCase(name, testFn, options));
- }.bind(this);
-
- try {
- suiteConstructor.call();
- } finally {
- global.test = undefined;
- global.timedPerfTest = undefined;
- }
- }
-
- TestSuite.prototype = {
- __proto__: Object.prototype,
-
- get tests() {
- return this.tests_;
- },
-
- addTest: function(test) {
- if (test.suite !== undefined)
- throw new Error('Test suite is already assigned');
- if (this.testNames_[test.name] !== undefined)
- throw new Error('Test name already used');
- test.suite = this;
- this.testNames_[test.name] = true;
- this.tests_.push(test);
- },
-
- get name() {
- return this.name_;
- }
- };
-
- function testSuite(suiteConstructor) {
- if (!global._currentSuiteLoader)
- throw new Error('testSuites can only be defined during suite loading');
- global._currentSuiteLoader.constructAndRegisterTestSuite(suiteConstructor);
- }
-
- return {
- TestSuite: TestSuite,
- testSuite: testSuite
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html b/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html
deleted file mode 100644
index 3c286d75fbe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest/text_test_results.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/unittest/constants.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.b.unittest', function() {
- /**
- * @constructor
- */
- function TextTestResults() {
- this.numTestsThatPassed_ = 0;
- this.numTestsThatFailed_ = 0;
- this.numFlakyTests_ = 0;
- this.currentTestCaseHadErrors_ = false;
- this.currentTestIsFlaky_ = false;
- }
-
- TextTestResults.prototype = {
- get numTestsThatRan() {
- return this.numTestsThatPassed_ + this.numTestsThatFailed_ +
- this.numFlakyTests_;
- },
-
- get numTestsThatFailed() {
- return this.numTestsThatFailed_;
- },
-
- get numTestsThatPassed() {
- return this.numTestsThatPassed_;
- },
-
- get numFlakyTests() {
- return this.numFlakyTests_;
- },
-
- willRunTests: function(testCases) {
- },
-
- willRunTest: function(testCase) {
- this.write_(testCase.name + ' (' + testCase.suite.name + ') ... ');
- this.currentTestCaseHadErrors_ = false;
- this.currentTestIsFlaky_ = false;
- },
-
- addErrorForCurrentTest: function(error) {
- if (!this.currentTestCaseHadErrors_)
- this.write_('FAIL\n');
- var normalizedException = tr.b.normalizeException(error);
- this.write_(normalizedException.stack + '\n');
- this.currentTestCaseHadErrors_ = true;
- },
-
- addHTMLOutputForCurrentTest: function(element) {
- this.curHTMLOutput_.push(element);
- },
-
- setCurrentTestFlaky: function() {
- if (!this.currentTestIsFlaky_)
- this.write_('FLAKY\n');
- this.currentTestIsFlaky_ = true;
- },
-
- setReturnValueFromCurrentTest: function(returnValue) {
- this.write_('[RESULT] ' + JSON.stringify(returnValue) + '\n');
- },
-
- didCurrentTestEnd: function() {
- if (this.currentTestCaseHadErrors_) {
- this.numTestsThatFailed_ += 1;
- } else if (this.currentTestIsFlaky_) {
- this.numFlakyTests_ += 1;
- } else {
- this.numTestsThatPassed_ += 1;
- this.write_('ok\n');
- }
- },
-
- didRunTests: function() {
- this.write_('\n------------------------------------------------------' +
- '----------------\n');
- if (this.numTestsThatRan === 1)
- this.write_('Ran 1 test\n');
- else
- this.write_('Ran ' + this.numTestsThatRan + ' tests\n');
-
- if (this.numTestsThatFailed > 0) {
- var flakyString = this.numFlakyTests === 0 ? '' :
- ' flaky=' + this.numFlakyTests;
- this.write_('\nFAILED (errors=' + this.numTestsThatFailed +
- flakyString + ')');
- } else {
- var flakyString = this.numFlakyTests === 0 ? '' :
- ' (flaky=' + this.numFlakyTests + ')';
- this.write_('\nOK' + flakyString);
- }
- },
-
- write_: function(msg) {
- if (tr.isVinn)
- global.write(msg);
- else
- console.log(msg);
- }
- };
-
- return {
- TextTestResults: TextTestResults
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/unittest_test.html b/chromium/third_party/catapult/tracing/tracing/base/unittest_test.html
deleted file mode 100644
index b3ef6dc7d76..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/unittest_test.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/unittest.html">
-<link rel="import" href="/tracing/base/raf.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
-
- test('promise', function() {
- return new Promise(function(resolve, reject) {
- resolve();
- });
- });
-
- test('async', function() {
- return new Promise(function(resolve) {
- tr.b.requestAnimationFrame(function() {
- resolve();
- });
- });
- });
-
- /* To test failures remove comments
- test('fail', function() {
- assert.equal(true, false);
- });
-
- test('rejected-promise', function() {
- return new Promise(function(resolve, reject){
- reject("Failure by rejection");
- });
- });
-
- test('promise-that-throws-after-resolver', function() {
- return new Promise(function(resolve, rejet){
- throw new Error('blah');
- });
- });
-
- */
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/utils.html b/chromium/third_party/catapult/tracing/tracing/base/utils.html
deleted file mode 100644
index 2f71be02483..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/utils.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- /**
- * Adds a {@code getInstance} static method that always return the same
- * instance object.
- * @param {!Function} ctor The constructor for the class to add the static
- * method to.
- */
- function addSingletonGetter(ctor) {
- ctor.getInstance = function() {
- return ctor.instance_ || (ctor.instance_ = new ctor());
- };
- }
-
- function deepCopy(value) {
- if (!(value instanceof Object)) {
- if (value === undefined || value === null)
- return value;
- if (typeof value === 'string')
- return value.substring();
- if (typeof value === 'boolean')
- return value;
- if (typeof value === 'number')
- return value;
- throw new Error('Unrecognized: ' + typeof value);
- }
-
- var object = value;
- if (object instanceof Array) {
- var res = new Array(object.length);
- for (var i = 0; i < object.length; i++)
- res[i] = deepCopy(object[i]);
- return res;
- }
-
- if (object.__proto__ !== Object.prototype)
- throw new Error('Can only clone simple types');
- var res = {};
- for (var key in object) {
- res[key] = deepCopy(object[key]);
- }
- return res;
- }
-
- function normalizeException(e) {
- if (e === undefined || e === null) {
- return {
- typeName: 'UndefinedError',
- message: 'Unknown: null or undefined exception',
- stack: 'Unknown'
- };
- }
-
- if (typeof(e) === 'string') {
- return {
- typeName: 'StringError',
- message: e,
- stack: [e]
- };
- }
-
- var typeName;
- if (e.name) {
- typeName = e.name;
- } else if (e.constructor) {
- if (e.constructor.name) {
- typeName = e.constructor.name;
- } else {
- typeName = 'AnonymousError';
- }
- } else {
- typeName = 'ErrorWithNoConstructor';
- }
-
- var msg = e.message ? e.message : 'Unknown';
- return {
- typeName: typeName,
- message: msg,
- stack: e.stack ? e.stack : [msg]
- };
- }
-
- function stackTraceAsString() {
- return new Error().stack + '';
- }
- function stackTrace() {
- var stack = stackTraceAsString();
- stack = stack.split('\n');
- return stack.slice(2);
- }
-
- function getUsingPath(path, fromDict) {
- var parts = path.split('.');
- var cur = fromDict;
-
- for (var part; parts.length && (part = parts.shift());) {
- if (!parts.length) {
- return cur[part];
- } else if (part in cur) {
- cur = cur[part];
- } else {
- return undefined;
- }
- }
- return undefined;
- }
-
- /**
- * Format date as a string "YYYY-MM-DD HH:mm:ss". The timezone is implicitly
- * UTC. This format is based on the ISO format, but without milliseconds and
- * the 'T' is replaced with a space for legibility.
- *
- * @param {!Date} date
- * @return {string}
- */
- function formatDate(date) {
- return date.toISOString().replace('T', ' ').slice(0, 19);
- }
-
- return {
- addSingletonGetter: addSingletonGetter,
-
- deepCopy: deepCopy,
-
- normalizeException: normalizeException,
- stackTrace: stackTrace,
- stackTraceAsString: stackTraceAsString,
- formatDate: formatDate,
-
- getUsingPath: getUsingPath
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/utils_test.html b/chromium/third_party/catapult/tracing/tracing/base/utils_test.html
deleted file mode 100644
index 8e7c91a7fce..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/utils_test.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('getUsingPath', function() {
- var z = tr.b.getUsingPath('x.y.z', {'x': {'y': {'z': 3}}});
- assert.equal(z, 3);
-
- var w = tr.b.getUsingPath('x.w', {'x': {'y': {'z': 3}}});
- assert.isUndefined(w);
- });
-
- test('testExceptionNaming', function() {
- var err = new Error('asdf');
- err.name = 'MyError';
-
- var ex = tr.b.normalizeException(err);
- assert.equal(ex.typeName, 'MyError');
- });
-
- test('formatDate', function() {
- assert.strictEqual(tr.b.formatDate(new Date(0)), '1970-01-01 00:00:00');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/base/xhr.html b/chromium/third_party/catapult/tracing/tracing/base/xhr.html
deleted file mode 100644
index cde65905a01..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/xhr.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.b', function() {
- var fs;
- if (tr.isNode)
- fs = require('fs');
-
- function guessBinary(url) {
- return /[.]gz$/.test(url) || /[.]zip$/.test(url);
- }
- function xhr(method, url, async, opt_data, forceBinary) {
- var req = new XMLHttpRequest();
- req.overrideMimeType('text/plain; charset=x-user-defined');
- req.open(method, url, async);
-
- var isBinary = forceBinary;
-
- if (isBinary === undefined) {
- guessBinary(url);
- if (isBinary && async)
- req.responseType = 'arraybuffer';
- }
-
- var data = opt_data !== undefined ? opt_data : null;
-
- if (!async) {
- req.send(data);
- if (req.status === 200) {
- return req.responseText;
- } else {
- throw new Error('XHR failed with status ' + req.status);
- }
- }
-
- var p = new Promise(function(resolve, reject) {
- req.onreadystatechange = function(aEvt) {
- if (req.readyState === 4) {
- window.setTimeout(function() {
- if (req.status === 200) {
- if (req.responseType === 'arraybuffer')
- return resolve(req.response);
- return resolve(req.responseText);
- } else {
- reject(new Error('XHR failed with status ' + req.status));
- }
- }, 0);
- }
- };
- });
- req.send(data);
- return p;
- }
-
- function getAsync(url) {
- // Browser.
- if (!tr.isHeadless)
- return xhr('GET', url, true);
-
- // Node or vinn prep.
- var filename;
- if (url.startsWith('file:///'))
- filename = url.substring(7);
- else
- filename = global.HTMLImportsLoader.hrefToAbsolutePath(url);
- var isBinary = guessBinary(url);
-
- // Node.
- if (tr.isNode) {
- var encoding = isBinary ? undefined : 'utf8';
- return new Promise(function(resolve, reject) {
- fs.readFile(filename, encoding, function(err, data) {
- if (err) {
- reject(err);
- return;
- }
- resolve(data);
- });
- });
- }
-
- // Vinn.
- return Promise.resolve().then(function() {
- if (isBinary)
- return readbuffer(filename);
- return read(filename);
- });
- }
-
- function getSync(url) {
- // Browser.
- if (!tr.isHeadless)
- return xhr('GET', url, false);
-
- // Node or vinn prep.
- var filename;
- if (url.startsWith('file:///')) // posix
- filename = url.substring(7);
- else if (url.startsWith('file://') && url[8] === ':') // win
- filename = url.substring(7);
- else
- filename = global.HTMLImportsLoader.hrefToAbsolutePath(url);
- var isBinary = guessBinary(url);
-
- // Node.
- if (tr.isNode) {
- var encoding = isBinary ? undefined : 'utf8';
- return fs.readFileSync(filename, encoding);
- }
-
- // Vinn.
- if (isBinary)
- return readbuffer(filename);
- return read(filename);
- }
-
- function postAsync(url, data) {
- if (tr.isHeadless)
- throw new Error('Only supported inside a browser');
- return xhr('POST', url, true, data);
- }
-
- function postTextAsync(url, data) {
- if (tr.isHeadless)
- throw new Error('Only supported inside a browser');
- return xhr('POST', url, true, data, false);
- }
-
- return {
- getAsync: getAsync,
- getSync: getSync,
- postAsync: postAsync
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/core/auditor.html b/chromium/third_party/catapult/tracing/tracing/core/auditor.html
deleted file mode 100644
index 5616073a27b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/auditor.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/extension_registry.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for auditors.
- */
-tr.exportTo('tr.c', function() {
- function Auditor(model) {
- this.model_ = model;
- }
-
- Auditor.prototype = {
- __proto__: Object.prototype,
-
- get model() {
- return this.model_;
- },
-
- /**
- * Called by the Model after baking slices. May modify model.
- */
- runAnnotate: function() {
- },
-
- /**
- * Called by import to install userFriendlyCategoryDriver.
- */
- installUserFriendlyCategoryDriverIfNeeded: function() {
- },
-
- /**
- * Called by the Model after importing. Should not modify model, except
- * for adding interaction ranges and audits.
- */
- runAudit: function() {
- }
- };
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.defaultMetadata = {};
- options.mandatoryBaseClass = Auditor;
- tr.b.decorateExtensionRegistry(Auditor, options);
-
- return {
- Auditor: Auditor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/core/filter.html b/chromium/third_party/catapult/tracing/tracing/core/filter.html
deleted file mode 100644
index a8466f6a730..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/filter.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.c', function() {
- function makeCaseInsensitiveRegex(pattern) {
- // See https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/
- // Regular_Expressions.
- pattern = pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
- return new RegExp(pattern, 'i');
- }
-
- /**
- * @constructor The generic base class for filtering a Model based on
- * various rules. The base class returns true for everything.
- */
- function Filter() { }
-
- Filter.prototype = {
- __proto__: Object.prototype,
-
- matchCounter: function(counter) {
- return true;
- },
-
- matchCpu: function(cpu) {
- return true;
- },
-
- matchProcess: function(process) {
- return true;
- },
-
- matchSlice: function(slice) {
- return true;
- },
-
- matchThread: function(thread) {
- return true;
- }
- };
-
- /**
- * @constructor A filter that matches objects by their name or category
- * case insensitive.
- * .findAllObjectsMatchingFilter
- */
- function TitleOrCategoryFilter(text) {
- Filter.call(this);
- this.regex_ = makeCaseInsensitiveRegex(text);
-
- if (!text.length)
- throw new Error('Filter text is empty.');
- }
- TitleOrCategoryFilter.prototype = {
- __proto__: Filter.prototype,
-
- matchSlice: function(slice) {
- if (slice.title === undefined && slice.category === undefined)
- return false;
-
- return this.regex_.test(slice.title) ||
- (!!slice.category && this.regex_.test(slice.category));
- }
- };
-
- /**
- * @constructor A filter that matches objects with the exact given title.
- */
- function ExactTitleFilter(text) {
- Filter.call(this);
- this.text_ = text;
-
- if (!text.length)
- throw new Error('Filter text is empty.');
- }
- ExactTitleFilter.prototype = {
- __proto__: Filter.prototype,
-
- matchSlice: function(slice) {
- return slice.title === this.text_;
- }
- };
-
- /**
- * @constructor A filter that matches objects by their full text contents
- * (title, category, args). Note that for performance this filter applies a
- * regex against all the keys of the slice arguments instead of recursing
- * through any embedded sub-objects.
- */
- function FullTextFilter(text) {
- Filter.call(this);
- this.regex_ = makeCaseInsensitiveRegex(text);
- this.titleOrCategoryFilter_ = new TitleOrCategoryFilter(text);
- }
- FullTextFilter.prototype = {
- __proto__: Filter.prototype,
-
- matchObject_: function(obj) {
- for (var key in obj) {
- if (!obj.hasOwnProperty(key))
- continue;
- if (this.regex_.test(key))
- return true;
- if (this.regex_.test(obj[key]))
- return true;
- }
- return false;
- },
-
- matchSlice: function(slice) {
- if (this.titleOrCategoryFilter_.matchSlice(slice))
- return true;
- return this.matchObject_(slice.args);
- }
- };
-
- return {
- Filter: Filter,
- TitleOrCategoryFilter: TitleOrCategoryFilter,
- ExactTitleFilter: ExactTitleFilter,
- FullTextFilter: FullTextFilter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/core/filter_test.html b/chromium/third_party/catapult/tracing/tracing/core/filter_test.html
deleted file mode 100644
index 6dbdcb10b79..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/filter_test.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unittest.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TitleOrCategoryFilter = tr.c.TitleOrCategoryFilter;
- var ExactTitleFilter = tr.c.ExactTitleFilter;
- var FullTextFilter = tr.c.FullTextFilter;
-
- test('titleOrCategoryFilter', function() {
- assert.throw(function() {
- new TitleOrCategoryFilter();
- });
- assert.throw(function() {
- new TitleOrCategoryFilter('');
- });
-
- var s0 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'a', start: 1, duration: 3});
- assert.isTrue(new TitleOrCategoryFilter('a').matchSlice(s0));
- assert.isTrue(new TitleOrCategoryFilter('cat').matchSlice(s0));
- assert.isTrue(new TitleOrCategoryFilter('at').matchSlice(s0));
- assert.isFalse(new TitleOrCategoryFilter('b').matchSlice(s0));
- assert.isFalse(new TitleOrCategoryFilter('X').matchSlice(s0));
-
- var s1 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'abc', start: 1, duration: 3});
- assert.isTrue(new TitleOrCategoryFilter('abc').matchSlice(s1));
- assert.isTrue(new TitleOrCategoryFilter('Abc').matchSlice(s1));
- assert.isTrue(new TitleOrCategoryFilter('cat').matchSlice(s1));
- assert.isTrue(new TitleOrCategoryFilter('Cat').matchSlice(s1));
- assert.isFalse(new TitleOrCategoryFilter('cat1').matchSlice(s1));
- assert.isFalse(new TitleOrCategoryFilter('X').matchSlice(s1));
- });
-
- test('exactTitleFilter', function() {
- assert.throw(function() {
- new ExactTitleFilter();
- });
- assert.throw(function() {
- new ExactTitleFilter('');
- });
-
- var s0 = tr.c.TestUtils.newSliceEx({title: 'a', start: 1, duration: 3});
- assert.isTrue(new ExactTitleFilter('a').matchSlice(s0));
- assert.isFalse(new ExactTitleFilter('b').matchSlice(s0));
- assert.isFalse(new ExactTitleFilter('A').matchSlice(s0));
-
- var s1 = tr.c.TestUtils.newSliceEx({title: 'abc', start: 1, duration: 3});
- assert.isTrue(new ExactTitleFilter('abc').matchSlice(s1));
- assert.isFalse(new ExactTitleFilter('Abc').matchSlice(s1));
- assert.isFalse(new ExactTitleFilter('bc').matchSlice(s1));
- assert.isFalse(new ExactTitleFilter('a').matchSlice(s1));
- });
-
- test('fullTextFilter', function() {
- assert.throw(function() {
- new FullTextFilter();
- });
- assert.throw(function() {
- new FullTextFilter('');
- });
-
- var s0 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'a', start: 1, duration: 3});
- s0.args['key'] = 'value';
- s0.args['anotherKey'] = 'anotherValue';
- assert.isTrue(new FullTextFilter('cat').matchSlice(s0));
- assert.isTrue(new FullTextFilter('a').matchSlice(s0));
- assert.isTrue(new FullTextFilter('key').matchSlice(s0));
- assert.isTrue(new FullTextFilter('value').matchSlice(s0));
- assert.isTrue(new FullTextFilter('anotherValue').matchSlice(s0));
- assert.isFalse(new FullTextFilter('not there').matchSlice(s0));
-
- var s1 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'a', start: 1, duration: 3});
- s1.args['key'] = 123;
- assert.isTrue(new FullTextFilter('123').matchSlice(s1));
-
- var s2 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'a', start: 1, duration: 3});
- s2.args['key'] = ['innerValue1', 'innerValue2'];
- assert.isTrue(new FullTextFilter('innerValue1').matchSlice(s2));
- assert.isTrue(new FullTextFilter('innerValue2').matchSlice(s2));
-
- var s3 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'a', start: 1, duration: 3});
- s3.args['key'] = ['one', 'two', 'three'];
- assert.isTrue(new FullTextFilter('two').matchSlice(s3));
-
- var s4 = tr.c.TestUtils.newSliceEx(
- {cat: 'cat', title: 'a', start: 1, duration: 3});
- s4.args['key'] = undefined;
- assert.isFalse(new FullTextFilter('not there').matchSlice(s4));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/core/scripting_controller.html b/chromium/third_party/catapult/tracing/tracing/core/scripting_controller.html
deleted file mode 100644
index 1b64f92027a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/scripting_controller.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-<link rel="import" href="/tracing/core/scripting_object.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.c', function() {
- function ScriptingController(brushingStateController) {
- this.brushingStateController_ = brushingStateController;
- this.scriptObjectNames_ = [];
- this.scriptObjectValues_ = [];
- this.brushingStateController.addEventListener(
- 'model-changed', this.onModelChanged_.bind(this));
-
- // Register all scripting objects.
- var typeInfos = ScriptingObjectRegistry.getAllRegisteredTypeInfos();
- typeInfos.forEach(function(typeInfo) {
- this.addScriptObject(typeInfo.metadata.name, typeInfo.constructor);
- // Also make the object available to the DevTools inspector.
- global[typeInfo.metadata.name] = typeInfo.constructor;
- }, this);
- }
-
- function ScriptingObjectRegistry() {
- }
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- tr.b.decorateExtensionRegistry(ScriptingObjectRegistry, options);
-
- ScriptingController.prototype = {
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- onModelChanged_: function() {
- this.scriptObjectValues_.forEach(function(v) {
- if (v.onModelChanged)
- v.onModelChanged(this.brushingStateController.model);
- }, this);
- },
-
- addScriptObject: function(name, value) {
- this.scriptObjectNames_.push(name);
- this.scriptObjectValues_.push(value);
- },
-
- executeCommand: function(command) {
- var f = new Function(
- this.scriptObjectNames_, 'return eval(' + command + ')');
- return f.apply(null, this.scriptObjectValues_);
- }
- };
-
- return {
- ScriptingController: ScriptingController,
- ScriptingObjectRegistry: ScriptingObjectRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/core/scripting_controller_test.html b/chromium/third_party/catapult/tracing/tracing/core/scripting_controller_test.html
deleted file mode 100644
index 18f25a9c350..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/scripting_controller_test.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function FakeBrushingStateController() {
- tr.b.EventTarget.call(this);
-
- this.addAllEventsMatchingFilterToSelectionReturnValue = [];
-
- this.viewport = undefined;
- this.model = undefined;
- this.selection = new tr.model.EventSet();
- this.highlight = new tr.model.EventSet();
- }
- FakeBrushingStateController.prototype = {
- __proto__: tr.b.EventTarget.prototype
- };
-
- test('scriptingControllerBasicArithmetic', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.c.ScriptingController(brushingStateController);
- var result = controller.executeCommand('1 + 1');
- assert.equal(result, 2);
- });
-
- test('scriptingControllerNonLocalContext', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.c.ScriptingController(brushingStateController);
- var x = 1;
- controller.executeCommand('x = 2');
- assert.equal(x, 1);
- });
-
- test('scriptingControllerModifyGlobalContext', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.c.ScriptingController(brushingStateController);
- global._x = 1;
- controller.executeCommand('_x = 2');
- assert.equal(global._x, 2);
- delete global._x;
- });
-
- test('scriptingControllerPersistentContext', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.c.ScriptingController(brushingStateController);
- controller.executeCommand('a = 42');
- var result = controller.executeCommand('a');
- assert.equal(result, 42);
- });
-
- test('scriptingControllerAddScriptObject', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.c.ScriptingController(brushingStateController);
- controller.addScriptObject('z', 123);
- var result = controller.executeCommand('z');
- assert.equal(result, 123);
- });
-
- test('scriptingControllerObjectRegistry', function() {
- var brushingStateController = new FakeBrushingStateController();
-
- tr.c.ScriptingObjectRegistry.register(
- function() { return 123; },
- {
- name: 'testFunctionName'
- }
- );
- var controller = new tr.c.ScriptingController(brushingStateController);
- var result = controller.executeCommand('testFunctionName()');
- assert.equal(result, 123);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/core/scripting_object.html b/chromium/third_party/catapult/tracing/tracing/core/scripting_object.html
deleted file mode 100644
index 377211f45f8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/scripting_object.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.c', function() {
- function ScriptingObject() {
- }
-
- ScriptingObject.prototype = {
- onModelChanged: function(model) {
- }
- };
-
- return {
- ScriptingObject: ScriptingObject
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/core/test_utils.html b/chromium/third_party/catapult/tracing/tracing/core/test_utils.html
deleted file mode 100644
index 27654041438..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/core/test_utils.html
+++ /dev/null
@@ -1,485 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/counter.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/model/stack_frame.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-<link rel="import" href="/tracing/model/thread_time_slice.html">
-<link rel="import" href="/tracing/model/user_model/stub_expectation.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper functions for use in tracing tests.
- */
-tr.exportTo('tr.c', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- function _getStartAndCpuDurationFromDict(
- options, required, startFieldName, durationFieldName, endFieldName) {
-
- if (options[startFieldName] === undefined) {
- if (required)
- throw new Error('Too little information.');
- else
- return {start: undefined, duration: undefined};
- }
- if (options[durationFieldName] !== undefined &&
- options[endFieldName] !== undefined) {
- throw new Error('Too much information.');
- }
- if (options[durationFieldName] === undefined &&
- options[endFieldName] === undefined) {
- if (required)
- throw new Error('Too little information.');
- else
- return {start: undefined, duration: undefined};
- }
-
- var duration;
- if (options[durationFieldName] !== undefined) {
- duration = options[durationFieldName];
- } else {
- duration = options[endFieldName] - options[startFieldName];
- }
-
- return {
- start: options[startFieldName],
- duration: duration
- };
- }
-
- function _maybeGetCpuStartAndCpuDurationFromDict(options) {
- return _getStartAndCpuDurationFromDict(
- options, false, 'cpuStart', 'cpuDuration', 'cpuEnd');
- }
-
- function TestUtils() {
- }
-
- TestUtils.getStartAndDurationFromDict = function(options) {
- return _getStartAndCpuDurationFromDict(
- options, true, 'start', 'duration', 'end');
- };
-
- TestUtils.newAsyncSlice = function(start, duration, startThread, endThread) {
- return TestUtils.newAsyncSliceNamed(
- 'a', start, duration, startThread, endThread);
- };
-
- TestUtils.newAsyncSliceNamed = function(
- name, start, duration, startThread, endThread) {
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor('', name);
-
- var s = new asyncSliceConstructor('', name, 0, start);
- s.duration = duration;
- s.startThread = startThread;
- s.endThread = endThread;
- return s;
- };
-
- function getColorId(colorId) {
- if (colorId) {
- if (colorId === 'random') {
- colorId = Math.floor(
- Math.random() *
- ColorScheme.proprties.numGeneralPurposeColorIds);
- }
- } else {
- colorId = 0;
- }
- return colorId;
- }
-
- TestUtils.newAsyncSliceEx = function(options) {
- var sd = TestUtils.getStartAndDurationFromDict(options);
-
- var cat = options.cat ? options.cat : 'cat';
- var title = options.title ? options.title : 'a';
- var colorId = getColorId(options.colorId);
-
- var isTopLevel;
- if (options.isTopLevel !== undefined)
- isTopLevel = options.isTopLevel;
- else
- isTopLevel = false;
-
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor(cat, title);
-
- var slice = new asyncSliceConstructor(
- cat,
- title,
- colorId,
- sd.start,
- options.args ? options.args : {},
- sd.duration, isTopLevel);
-
- if (options.id)
- slice.id = options.id;
- else
- slice.id = tr.b.GUID.allocateSimple();
-
- if (options.startStackFrame)
- slice.startStackFrame = options.startStackFrame;
- if (options.endStackFrame)
- slice.endStackFrame = options.endStackFrame;
- if (options.important)
- slice.important = options.important;
- if (options.startThread)
- slice.startThread = options.startThread;
- if (options.endThread)
- slice.endThread = options.endThread;
- return slice;
- };
-
- TestUtils.newCounter = function(parent) {
- return TestUtils.newCounterNamed(parent, 'a');
- };
-
- TestUtils.newCounterNamed = function(parent, name) {
- var s = new tr.model.Counter(parent, name, null, name);
- return s;
- };
-
- TestUtils.newCounterCategory = function(parent, category, name) {
- var s = new tr.model.Counter(parent, name, category, name);
- return s;
- };
-
- TestUtils.newCounterSeries = function() {
- var s = new tr.model.CounterSeries('a', 0);
- return s;
- };
-
- TestUtils.newFlowEventEx = function(options) {
- if (options.start === undefined)
- throw new Error('Too little info');
-
- var title = options.title ? options.title : 'a';
-
- var colorId = options.colorId ? options.colorId : 0;
-
- var sd = TestUtils.getStartAndDurationFromDict(options);
-
- var id;
- if (options.id !== undefined)
- id = options.id;
- else
- id = tr.b.GUID.allocateSimple();
-
- var event = new tr.model.FlowEvent(
- options.cat ? options.cat : 'cat',
- id,
- title,
- colorId,
- sd.start,
- options.args ? options.args : {},
- sd.duration);
-
- if (options.startStackFrame)
- event.startStackFrame = options.startStackFrame;
- if (options.endStackFrame)
- event.endStackFrame = options.endStackFrame;
- if (options.important)
- event.important = options.important;
- if (options.startSlice) {
- event.startSlice = options.startSlice;
- event.startSlice.outFlowEvents.push(event);
- }
- if (options.endSlice) {
- event.endSlice = options.endSlice;
- event.endSlice.inFlowEvents.push(event);
- }
- return event;
- };
-
- TestUtils.newThreadSlice = function(thread, state, start, duration, opt_cpu) {
- var s = new tr.model.ThreadTimeSlice(
- thread, state, 'cat', start, {}, duration);
- if (opt_cpu)
- s.cpuOnWhichThreadWasRunning = opt_cpu;
- return s;
- };
-
- TestUtils.newSampleNamed = function(
- thread, sampleName, category, frameNames, start) {
- var model;
- if (thread.parent)
- model = thread.parent.model;
- else
- model = undefined;
- var sf = TestUtils.newStackTrace(model, frameNames);
- var s = new tr.model.Sample(undefined, thread,
- sampleName, start,
- sf,
- 1);
- return s;
- };
-
- TestUtils.newSliceEx = function(options) {
- var sd = TestUtils.getStartAndDurationFromDict(options);
-
- var title = options.title ? options.title : 'a';
-
- var colorId = options.colorId ? options.colorId : 0;
-
- var cpuSD = _maybeGetCpuStartAndCpuDurationFromDict(options);
-
- var cat = options.cat ? options.cat : 'cat';
-
- var type;
- if (options.type)
- type = options.type;
- else
- type = tr.model.ThreadSlice.subTypes.getConstructor(cat, title);
-
- var slice = new type(
- cat,
- title,
- colorId,
- sd.start,
- options.args ? options.args : {},
- sd.duration,
- cpuSD.start, cpuSD.duration);
-
- if (options.isTopLevel)
- slice.isTopLevel = true;
-
- return slice;
- };
-
- TestUtils.newStackTrace = function(model, titles) {
- var frame = undefined;
- titles.forEach(function(title) {
- frame = new tr.model.StackFrame(
- frame, tr.b.GUID.allocateSimple(), title, 7);
- if (model)
- model.addStackFrame(frame);
- });
- return frame;
- };
-
- TestUtils.newSnapshot = function(model, options) {
- return model.getOrCreateProcess(options.pid || 1).objects.addSnapshot(
- new tr.model.ScopedId(options.scope || tr.model.OBJECT_DEFAULT_SCOPE,
- options.id || '0x1'),
- options.category || 'cat',
- options.name || 'A',
- options.ts || 0,
- options.args || {},
- options.baseTypeName);
- };
-
- TestUtils.findSliceNamed = function(slices, name) {
- if (slices instanceof tr.model.SliceGroup)
- slices = slices.slices;
- for (var i = 0; i < slices.length; i++)
- if (slices[i].title === name)
- return slices[i];
- return undefined;
- };
-
- TestUtils.newInteractionRecord = function(parentModel, start, duration) {
- return new tr.model.um.StubExpectation({
- parentModel: parentModel, start: start, duration: duration});
- };
-
- TestUtils.newModel = function(customizeModelCallback) {
- return TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneEmptyContainers: false,
- customizeModelCallback: customizeModelCallback
- });
- };
-
- TestUtils.newModelWithEvents = function(events, opts) {
- if (!(events instanceof Array))
- events = [events];
-
- opts = opts || {};
-
- var io = new tr.importer.ImportOptions();
- io.showImportWarnings = false;
- io.customizeModelCallback = opts.customizeModelCallback;
- io.trackDetailedModelStats = opts.trackDetailedModelStats === undefined ?
- false : opts.trackDetailedModelStats;
- io.shiftWorldToZero = opts.shiftWorldToZero === undefined ?
- true : opts.shiftWorldToZero;
- io.pruneEmptyContainers = opts.pruneEmptyContainers === undefined ?
- true : opts.pruneEmptyContainers;
- io.auditorConstructors = opts.auditorConstructors === undefined ?
- [] : opts.auditorConstructors;
-
- var m = new tr.Model();
- var i = new tr.importer.Import(m, io);
- i.importTraces(events);
- return m;
- };
-
- TestUtils.newModelWithAuditor = function(customizeModelCallback, auditor) {
- return TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneEmptyContainers: false,
- customizeModelCallback: customizeModelCallback,
- auditorConstructors: [auditor]
- });
- };
-
- TestUtils.newFakeThread = function() {
- var process = {model: {}};
- return new tr.model.Thread(process);
- };
-
- /** @constructor */
- TestUtils.SourceGenerator = function() {
- this.sourceList_ = [];
- this.currentLineCommentList_ = [];
- this.currentIndent_ = 0;
- this.currentLineEmpty_ = true;
- };
-
- TestUtils.SourceGenerator.prototype = {
- push: function(/* arguments */) {
- if (this.currentLineEmpty_) {
- this.sourceList_.push(' '.repeat(this.currentIndent_));
- this.currentLineEmpty_ = false;
- }
- this.sourceList_.push.apply(
- this.sourceList_, Array.prototype.slice.call(arguments));
- },
-
- pushComment: function(/* arguments */) {
- this.currentLineCommentList_.push.apply(
- this.currentLineCommentList_, Array.prototype.slice.call(arguments));
- },
-
- build: function() {
- this.finishLine_();
- return this.sourceList_.join('');
- },
-
- breakLine: function() {
- this.finishLine_();
- this.push('\n');
- this.currentLineEmpty_ = true;
- },
-
- finishLine_: function() {
- if (this.currentLineCommentList_.length === 0)
- return;
- this.push(' // ');
- this.push.apply(this, this.currentLineCommentList_);
- this.push('.');
- this.currentLineCommentList_ = [];
- },
-
- indentBlock: function(spaces, breakLine, blockCallback, opt_this) {
- opt_this = opt_this || this;
- this.currentIndent_ += spaces;
- if (breakLine)
- this.breakLine();
- blockCallback.call(opt_this);
- this.currentIndent_ -= spaces;
- },
-
- formatSingleLineList: function(list, itemCallback, opt_this) {
- opt_this = opt_this || this;
- this.push('[');
- tr.b.asArray(list).forEach(function(item, index) {
- if (index > 0)
- this.push(', ');
- itemCallback.call(opt_this, item, index);
- }, this);
- this.push(']');
- },
-
- formatMultiLineList: function(list, itemCallback, opt_this) {
- opt_this = opt_this || this;
- this.push('[');
- this.indentBlock(2, false /* don't break line */, function() {
- tr.b.asArray(list).forEach(function(item, index) {
- if (index > 0)
- this.push(',');
- this.breakLine();
- itemCallback.call(opt_this, item, index);
- }, this);
- }, this);
- if (list.length > 0)
- this.breakLine();
- this.push(']');
- },
-
- formatString: function(string) {
- if (string === undefined)
- this.push('undefined');
- else
- this.push('\'', string, '\'');
- }
- };
-
- TestUtils.addSourceListing = function(test, source) {
- var testSourceEl = document.createElement('pre');
- testSourceEl.style.fontFamily = 'monospace';
- Polymer.dom(testSourceEl).textContent = source;
-
- var copyButtonEl = document.createElement('button');
- Polymer.dom(copyButtonEl).textContent = 'Copy into to clipboard';
- copyButtonEl.addEventListener('click', function() {
- var selection = window.getSelection();
-
- // Store the original selection.
- var originalRanges = new Array(selection.rangeCount);
- for (var i = 0; i < originalRanges.length; i++)
- originalRanges[i] = selection.getRangeAt(i);
-
- // Copy the generated test source code into clipboard.
- selection.removeAllRanges();
- var range = document.createRange();
- range.selectNode(testSourceEl);
- selection.addRange(range);
- document.execCommand('copy');
-
- // Restore the original selection.
- selection.removeAllRanges();
- for (var i = 0; i < originalRanges.length; i++)
- selection.addRange(originalRanges[i]);
- });
-
- var outputEl = document.createElement('div');
- Polymer.dom(outputEl).appendChild(copyButtonEl);
- Polymer.dom(outputEl).appendChild(testSourceEl);
- test.addHTMLOutput(outputEl);
- };
-
- TestUtils.newInstantEvent = function(options) {
- var title = options.title;
- var start = options.start;
- if ((title === undefined) ||
- (title === '') ||
- (start === undefined))
- throw new Error('too little information');
-
- var category = options.category || 'category';
- var colorId = getColorId(options.colorId);
- var args = options.args || {};
- return new tr.model.InstantEvent(
- category, title, colorId, start, args);
- };
-
- return {
- TestUtils: TestUtils
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category.html b/chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category.html
deleted file mode 100644
index d41965b99df..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.ads', function() {
- function Rule(expr, category) {
- this.expr = expr;
- this.category = category;
- }
-
- var CATEGORY_ADS = 'Ads';
- var CATEGORY_ANALYTICS = 'Analytics';
- var CATEGORY_CONTENT_RECOMMENDATION = 'Content Recommendation';
- var CATEGORY_EXTENSIONS = 'Extensions';
- var CATEGORY_OTHER = 'Other';
- var CATEGORY_SOCIAL = 'Social';
- var CATEGORY_TRACING = 'Tracing';
-
- // Each rule is a tuple of (RegEx, Category). The first match will be used.
- // For now we only assign 1 category to a domain; it may make sense to
- // generalize this later to labeling domains with several categories.
- var CATEGORY_DOMAIN_RULES = [
- new Rule(/\.googleadservices\.com$/, CATEGORY_ADS),
- new Rule(/\.moatads\.com$/, CATEGORY_ANALYTICS),
- // Yahoo-Bing Contextual Ads
- new Rule(/contextual\.media\.net$/, CATEGORY_ADS),
- new Rule(/\.postrelease\.com$/, CATEGORY_CONTENT_RECOMMENDATION),
- new Rule(/\.burt\.io$/, CATEGORY_ANALYTICS),
- // Google DoubleClick, GPT
- new Rule(/\.googletagservices\.com$/, CATEGORY_ADS),
- new Rule(/\.ensighten\.com$/, CATEGORY_ANALYTICS),
- // Amazon CloudFront
- new Rule(/\.cloudfront\.net$/, CATEGORY_ADS),
- new Rule(/\.viafoura\.net$/, CATEGORY_ANALYTICS),
- // Google Content Ads/DoubleClick
- new Rule(/\.googlesyndication\.com$/, CATEGORY_ADS),
- // Google DoubleClick
- new Rule(/\.doubleclick\.net$/, CATEGORY_ADS),
- // Adobe Analytics/TagManager
- new Rule(/\.adobetag\.com$/, CATEGORY_ANALYTICS),
- new Rule(/\.rubiconproject\.com$/, CATEGORY_ADS),
- new Rule(/\.sharethrough\.com$/, CATEGORY_ADS),
- new Rule(/\.facebook\.net$/, CATEGORY_SOCIAL),
- new Rule(/\.facebook\.com$/, CATEGORY_SOCIAL),
- new Rule(/\.outbrain\.com$/, CATEGORY_CONTENT_RECOMMENDATION),
- // Google Content Ads/Others
- new Rule(/\.gstatic\.com$/, CATEGORY_ADS),
- new Rule(/\.newrelic\.com$/, CATEGORY_ANALYTICS),
- new Rule(/\.newsinc\.com$/, CATEGORY_ADS),
- new Rule(/\.spingo\.com$/, CATEGORY_CONTENT_RECOMMENDATION),
- new Rule(/\.visualrevenue\.com$/, CATEGORY_ANALYTICS),
- new Rule(/cdn\.livefyre\.com$/, CATEGORY_SOCIAL),
- new Rule(/\.dynamicyield\.com$/, CATEGORY_ANALYTICS),
- new Rule(/cdn\.krxd\.net$/, CATEGORY_ANALYTICS),
- new Rule(/\.chartbeat\.com$/, CATEGORY_ANALYTICS),
- new Rule(/\.clicktale\.net$/, CATEGORY_ANALYTICS),
- new Rule(/\.gravity\.com$/, CATEGORY_ANALYTICS),
- new Rule(/\.brightcove\.com$/, CATEGORY_ANALYTICS),
- new Rule(/^chrome:\/\//, CATEGORY_TRACING),
- new Rule(/^chrome-extension:\/\//, CATEGORY_EXTENSIONS)
- ];
-
- function DomainCategory() {
- }
-
- DomainCategory.fromDomain = function(domain) {
- for (var i = 0; i < CATEGORY_DOMAIN_RULES.length; i++) {
- if (CATEGORY_DOMAIN_RULES[i].expr.test(domain))
- return CATEGORY_DOMAIN_RULES[i].category;
- }
- return CATEGORY_OTHER;
- };
-
- return {
- DomainCategory: DomainCategory
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category_test.html b/chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category_test.html
deleted file mode 100644
index 8fa85aaaa4f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/ads/domain_category_test.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/ads/domain_category.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var DomainCategory = tr.e.ads.DomainCategory;
- test('domainCategory', function() {
- assert.equal(
- 'Ads',
- DomainCategory.fromDomain('https://parnter.googleadservices.com'));
- assert.equal(
- 'Analytics',
- DomainCategory.fromDomain('https://x.adobetag.com'));
- assert.equal(
- 'Social',
- DomainCategory.fromDomain('http://x.facebook.net'));
- assert.equal(
- 'Content Recommendation',
- DomainCategory.fromDomain('http://xyz.outbrain.com'));
- assert.equal(
- 'Tracing', DomainCategory.fromDomain('chrome://tracing'));
- assert.equal(
- 'Extensions',
- DomainCategory.fromDomain('chrome-extension://oiuy325oiu'));
- assert.equal(
- 'Other',
- DomainCategory.fromDomain('http://xyz.outbrain.com.au'));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor.html b/chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor.html
deleted file mode 100644
index c0cb2008395..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor.html
+++ /dev/null
@@ -1,755 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/auditor.html">
-<link rel="import" href="/tracing/model/alert.html">
-<link rel="import" href="/tracing/model/frame.html">
-<link rel="import" href="/tracing/model/helpers/android_model_helper.html">
-<link rel="import" href="/tracing/model/thread_time_slice.html">
-<link rel="import" href="/tracing/model/user_model/response_expectation.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Class for Android-specific Auditing.
- */
-tr.exportTo('tr.e.audits', function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var Auditor = tr.c.Auditor;
- var AndroidModelHelper = tr.model.helpers.AndroidModelHelper;
- var ColorScheme = tr.b.ColorScheme;
- var Statistics = tr.b.Statistics;
- var FRAME_PERF_CLASS = tr.model.FRAME_PERF_CLASS;
- var Alert = tr.model.Alert;
- var EventInfo = tr.model.EventInfo;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var timeDurationInMs = tr.b.Unit.byName.timeDurationInMs;
-
- // TODO: extract from VSYNC, since not all devices have vsync near 60fps
- var EXPECTED_FRAME_TIME_MS = 16.67;
-
- function getStart(e) { return e.start; }
- function getDuration(e) { return e.duration; }
- // used for general UI thread responsiveness alerts, falls back to duration
- function getCpuDuration(e) {
- return (e.cpuDuration !== undefined) ? e.cpuDuration : e.duration;
- }
-
- function frameIsActivityStart(frame) {
- return frame.associatedEvents.any(x => x.title === 'activityStart');
- }
-
- function frameMissedDeadline(frame) {
- return frame.args['deadline'] && frame.args['deadline'] < frame.end;
- }
-
- /** Builder object for EventInfo docLink structures */
- function DocLinkBuilder() {
- this.docLinks = [];
- }
- DocLinkBuilder.prototype = {
- addAppVideo: function(name, videoId) {
- this.docLinks.push({
- label: 'Video Link',
- textContent: ('Android Performance Patterns: ' + name),
- href: 'https://www.youtube.com/watch?list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE&v=' + videoId // @suppress longLineCheck
- });
- return this;
- },
- addDacRef: function(name, link) {
- this.docLinks.push({
- label: 'Doc Link',
- textContent: (name + ' documentation'),
- href: 'https://developer.android.com/reference/' + link
- });
- return this;
- },
- build: function() {
- return this.docLinks;
- }
- };
-
- /**
- * Auditor for Android-specific traces.
- * @constructor
- */
- function AndroidAuditor(model) {
- Auditor.call(this, model);
-
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- if (helper.apps.length || helper.surfaceFlinger)
- this.helper = helper;
- }
-
- //////////////////////////////////////////////////////////////////////////////
- // Rendering / RenderThread alerts - only available on SDK 22+
- //////////////////////////////////////////////////////////////////////////////
-
- AndroidAuditor.viewAlphaAlertInfo_ = new EventInfo(
- 'Inefficient View alpha usage',
- 'Setting an alpha between 0 and 1 has significant performance costs, if one of the fast alpha paths is not used.', // @suppress longLineCheck
- new DocLinkBuilder()
- .addAppVideo('Hidden Cost of Transparency', 'wIy8g8yNhNk')
- .addDacRef('View#setAlpha()', 'android/view/View.html#setAlpha(float)') // @suppress longLineCheck
- .build());
- AndroidAuditor.saveLayerAlertInfo_ = new EventInfo(
- 'Expensive rendering with Canvas#saveLayer()',
- 'Canvas#saveLayer() incurs extremely high rendering cost. They disrupt the rendering pipeline when drawn, forcing a flush of drawing content. Instead use View hardware layers, or static Bitmaps. This enables the offscreen buffers to be reused in between frames, and avoids the disruptive render target switch.', // @suppress longLineCheck
- new DocLinkBuilder()
- .addAppVideo('Hidden Cost of Transparency', 'wIy8g8yNhNk')
- .addDacRef('Canvas#saveLayerAlpha()', 'android/graphics/Canvas.html#saveLayerAlpha(android.graphics.RectF, int, int)') // @suppress longLineCheck
- .build());
- AndroidAuditor.getSaveLayerAlerts_ = function(frame) {
- var badAlphaRegEx =
- /^(.+) alpha caused (unclipped )?saveLayer (\d+)x(\d+)$/;
- var saveLayerRegEx = /^(unclipped )?saveLayer (\d+)x(\d+)$/;
-
- var ret = [];
- var events = [];
-
- frame.associatedEvents.forEach(function(slice) {
- var match = badAlphaRegEx.exec(slice.title);
- if (match) {
- // due to bug in tracing code on SDK 22, ignore
- // presence of 'unclipped' string in View alpha slices
- var args = { 'view name': match[1],
- width: parseInt(match[3]),
- height: parseInt(match[4]) };
- ret.push(new Alert(AndroidAuditor.viewAlphaAlertInfo_,
- slice.start, [slice], args));
- } else if (saveLayerRegEx.test(slice.title))
- events.push(slice);
- }, this);
-
- if (events.length > ret.length) {
- // more saveLayers than bad alpha can account for - add another alert
-
- var unclippedSeen = Statistics.sum(events, function(slice) {
- return saveLayerRegEx.exec(slice.title)[1] ? 1 : 0;
- });
- var clippedSeen = events.length - unclippedSeen;
- var earliestStart = Statistics.min(events, function(slice) {
- return slice.start;
- });
-
- var args = {
- 'Unclipped saveLayer count (especially bad!)': unclippedSeen,
- 'Clipped saveLayer count': clippedSeen
- };
-
- events.push(frame);
- ret.push(new Alert(AndroidAuditor.saveLayerAlertInfo_,
- earliestStart, events, args));
- }
-
- return ret;
- };
-
-
- AndroidAuditor.pathAlertInfo_ = new EventInfo(
- 'Path texture churn',
- 'Paths are drawn with a mask texture, so when a path is modified / newly drawn, that texture must be generated and uploaded to the GPU. Ensure that you cache paths between frames and do not unnecessarily call Path#reset(). You can cut down on this cost by sharing Path object instances between drawables/views.'); // @suppress longLineCheck
- AndroidAuditor.getPathAlert_ = function(frame) {
- var uploadRegEx = /^Generate Path Texture$/;
-
- var events = frame.associatedEvents.filter(function(event) {
- return event.title === 'Generate Path Texture';
- });
- var start = Statistics.min(events, getStart);
- var duration = Statistics.sum(events, getDuration);
-
- if (duration < 3)
- return undefined;
-
- events.push(frame);
- return new Alert(AndroidAuditor.pathAlertInfo_, start, events,
- { 'Time spent': new ScalarNumeric(timeDurationInMs, duration) });
- };
-
-
- AndroidAuditor.uploadAlertInfo_ = new EventInfo(
- 'Expensive Bitmap uploads',
- 'Bitmaps that have been modified / newly drawn must be uploaded to the GPU. Since this is expensive if the total number of pixels uploaded is large, reduce the amount of Bitmap churn in this animation/context, per frame.'); // @suppress longLineCheck
- AndroidAuditor.getUploadAlert_ = function(frame) {
- var uploadRegEx = /^Upload (\d+)x(\d+) Texture$/;
-
- var events = [];
- var start = Number.POSITIVE_INFINITY;
- var duration = 0;
- var pixelsUploaded = 0;
- frame.associatedEvents.forEach(function(event) {
- var match = uploadRegEx.exec(event.title);
- if (match) {
- events.push(event);
- start = Math.min(start, event.start);
- duration += event.duration;
- pixelsUploaded += parseInt(match[1]) * parseInt(match[2]);
- }
- });
- if (events.length === 0 || duration < 3)
- return undefined;
-
- var mPixels = (pixelsUploaded / 1000000).toFixed(2) + ' million';
- var args = { 'Pixels uploaded': mPixels,
- 'Time spent': new ScalarNumeric(timeDurationInMs, duration) };
- events.push(frame);
- return new Alert(AndroidAuditor.uploadAlertInfo_, start, events, args);
- };
-
- //////////////////////////////////////////////////////////////////////////////
- // UI responsiveness alerts
- //////////////////////////////////////////////////////////////////////////////
-
- AndroidAuditor.ListViewInflateAlertInfo_ = new EventInfo(
- 'Inflation during ListView recycling',
- 'ListView item recycling involved inflating views. Ensure your Adapter#getView() recycles the incoming View, instead of constructing a new one.'); // @suppress longLineCheck
- AndroidAuditor.ListViewBindAlertInfo_ = new EventInfo(
- 'Inefficient ListView recycling/rebinding',
- 'ListView recycling taking too much time per frame. Ensure your Adapter#getView() binds data efficiently.'); // @suppress longLineCheck
- AndroidAuditor.getListViewAlert_ = function(frame) {
- var events = frame.associatedEvents.filter(function(event) {
- return event.title === 'obtainView' || event.title === 'setupListItem';
- });
- var duration = Statistics.sum(events, getCpuDuration);
-
- if (events.length === 0 || duration < 3)
- return undefined;
-
- // simplifying assumption - check for *any* inflation.
- // TODO(ccraik): make 'inflate' slices associated events.
- var hasInflation = false;
- for (var event of events)
- if (event.findDescendentSlice('inflate'))
- hasInflation = true;
-
- var start = Statistics.min(events, getStart);
- var args = { 'Time spent': new ScalarNumeric(timeDurationInMs, duration) };
- args['ListView items ' + (hasInflation ? 'inflated' : 'rebound')] =
- events.length / 2;
- var eventInfo = hasInflation ? AndroidAuditor.ListViewInflateAlertInfo_ :
- AndroidAuditor.ListViewBindAlertInfo_;
- events.push(frame);
- return new Alert(eventInfo, start, events, args);
- };
-
-
- AndroidAuditor.measureLayoutAlertInfo_ = new EventInfo(
- 'Expensive measure/layout pass',
- 'Measure/Layout took a significant time, contributing to jank. Avoid triggering layout during animations.', // @suppress longLineCheck
- new DocLinkBuilder()
- .addAppVideo('Invalidations, Layouts, and Performance', 'we6poP0kw6E')
- .build());
- AndroidAuditor.getMeasureLayoutAlert_ = function(frame) {
- var events = frame.associatedEvents.filter(function(event) {
- return event.title === 'measure' || event.title === 'layout';
- });
- var duration = Statistics.sum(events, getCpuDuration);
-
- if (events.length === 0 || duration < 3)
- return undefined;
-
- var start = Statistics.min(events, getStart);
- events.push(frame);
- return new Alert(AndroidAuditor.measureLayoutAlertInfo_, start, events,
- { 'Time spent': new ScalarNumeric(timeDurationInMs, duration) });
- };
-
-
- AndroidAuditor.viewDrawAlertInfo_ = new EventInfo(
- 'Long View#draw()',
- 'Recording the drawing commands of invalidated Views took a long time. Avoid significant work in View or Drawable custom drawing, especially allocations or drawing to Bitmaps.', // @suppress longLineCheck
- new DocLinkBuilder()
- .addAppVideo('Invalidations, Layouts, and Performance', 'we6poP0kw6E')
- .addAppVideo('Avoiding Allocations in onDraw()', 'HAK5acHQ53E')
- .build());
- AndroidAuditor.getViewDrawAlert_ = function(frame) {
- var slice = undefined;
- for (var event of frame.associatedEvents) {
- if (event.title === 'getDisplayList' ||
- event.title === 'Record View#draw()') {
- slice = event;
- break;
- }
- }
-
- if (!slice || getCpuDuration(slice) < 3)
- return undefined;
- return new Alert(AndroidAuditor.viewDrawAlertInfo_, slice.start,
- [slice, frame],
- { 'Time spent': new ScalarNumeric(
- timeDurationInMs, getCpuDuration(slice)) });
- };
-
-
- //////////////////////////////////////////////////////////////////////////////
- // Runtime alerts
- //////////////////////////////////////////////////////////////////////////////
-
- AndroidAuditor.blockingGcAlertInfo_ = new EventInfo(
- 'Blocking Garbage Collection',
- 'Blocking GCs are caused by object churn, and made worse by having large numbers of objects in the heap. Avoid allocating objects during animations/scrolling, and recycle Bitmaps to avoid triggering garbage collection.', // @suppress longLineCheck
- new DocLinkBuilder()
- .addAppVideo('Garbage Collection in Android', 'pzfzz50W5Uo')
- .addAppVideo('Avoiding Allocations in onDraw()', 'HAK5acHQ53E')
- .build());
- AndroidAuditor.getBlockingGcAlert_ = function(frame) {
- var events = frame.associatedEvents.filter(function(event) {
- return event.title === 'DVM Suspend' ||
- event.title === 'GC: Wait For Concurrent';
- });
- var blockedDuration = Statistics.sum(events, getDuration);
- if (blockedDuration < 3)
- return undefined;
-
- var start = Statistics.min(events, getStart);
- events.push(frame);
- return new Alert(AndroidAuditor.blockingGcAlertInfo_, start, events,
- { 'Blocked duration': new ScalarNumeric(
- timeDurationInMs, blockedDuration) });
- };
-
-
- AndroidAuditor.lockContentionAlertInfo_ = new EventInfo(
- 'Lock contention',
- 'UI thread lock contention is caused when another thread holds a lock that the UI thread is trying to use. UI thread progress is blocked until the lock is released. Inspect locking done within the UI thread, and ensure critical sections are short.'); // @suppress longLineCheck
- AndroidAuditor.getLockContentionAlert_ = function(frame) {
- var events = frame.associatedEvents.filter(function(event) {
- return /^Lock Contention on /.test(event.title);
- });
-
- var blockedDuration = Statistics.sum(events, getDuration);
- if (blockedDuration < 1)
- return undefined;
-
- var start = Statistics.min(events, getStart);
- events.push(frame);
- return new Alert(AndroidAuditor.lockContentionAlertInfo_, start, events,
- { 'Blocked duration': new ScalarNumeric(
- timeDurationInMs, blockedDuration) });
- };
-
- AndroidAuditor.schedulingAlertInfo_ = new EventInfo(
- 'Scheduling delay',
- 'Work to produce this frame was descheduled for several milliseconds, contributing to jank. Ensure that code on the UI thread doesn\'t block on work being done on other threads, and that background threads (doing e.g. network or bitmap loading) are running at android.os.Process#THREAD_PRIORITY_BACKGROUND or lower so they are less likely to interrupt the UI thread. These background threads should show up with a priority number of 130 or higher in the scheduling section under the Kernel process.'); // @suppress longLineCheck
- AndroidAuditor.getSchedulingAlert_ = function(frame) {
- var totalDuration = 0;
- var totalStats = {};
- frame.threadTimeRanges.forEach(function(ttr) {
- var stats = ttr.thread.getSchedulingStatsForRange(ttr.start, ttr.end);
- tr.b.iterItems(stats, function(key, value) {
- if (!(key in totalStats))
- totalStats[key] = 0;
- totalStats[key] += value;
- totalDuration += value;
- });
- });
-
- // only alert if frame not running for > 3ms. Note that we expect a frame
- // to never describe intentionally idle time.
- if (!(SCHEDULING_STATE.RUNNING in totalStats) ||
- totalDuration === 0 ||
- totalDuration - totalStats[SCHEDULING_STATE.RUNNING] < 3)
- return;
-
- var args = {};
- tr.b.iterItems(totalStats, function(key, value) {
- if (key === SCHEDULING_STATE.RUNNABLE)
- key = 'Not scheduled, but runnable';
- else if (key === SCHEDULING_STATE.UNINTR_SLEEP)
- key = 'Blocking I/O delay';
- args[key] = new ScalarNumeric(timeDurationInMs, value);
- });
-
- return new Alert(AndroidAuditor.schedulingAlertInfo_, frame.start, [frame],
- args);
- };
-
- AndroidAuditor.prototype = {
- __proto__: Auditor.prototype,
-
- renameAndSort_: function() {
- this.model.kernel.important = false;// auto collapse
- // SurfaceFlinger first, other processes sorted by slice count
- this.model.getAllProcesses().forEach(function(process) {
- if (this.helper.surfaceFlinger &&
- process === this.helper.surfaceFlinger.process) {
- if (!process.name)
- process.name = 'SurfaceFlinger';
- process.sortIndex = Number.NEGATIVE_INFINITY;
- process.important = false; // auto collapse
- return;
- }
-
- var uiThread = process.getThread(process.pid);
- if (!process.name && uiThread && uiThread.name) {
- if (/^ndroid\./.test(uiThread.name))
- uiThread.name = 'a' + uiThread.name;
- process.name = uiThread.name;
-
- uiThread.name = 'UI Thread';
- }
-
- process.sortIndex = 0;
- for (var tid in process.threads) {
- process.sortIndex -= process.threads[tid].sliceGroup.slices.length;
- }
- }, this);
-
- // ensure sequential, relative order for UI/Render/Worker threads
- this.model.getAllThreads().forEach(function(thread) {
- if (thread.tid === thread.parent.pid)
- thread.sortIndex = -3;
- if (thread.name === 'RenderThread')
- thread.sortIndex = -2;
- if (/^hwuiTask/.test(thread.name))
- thread.sortIndex = -1;
- });
- },
-
- pushFramesAndJudgeJank_: function() {
- var badFramesObserved = 0;
- var framesObserved = 0;
- var surfaceFlinger = this.helper.surfaceFlinger;
-
- this.helper.apps.forEach(function(app) {
- // override frame list
- app.process.frames = app.getFrames();
-
- app.process.frames.forEach(function(frame) {
- if (frame.totalDuration > EXPECTED_FRAME_TIME_MS * 2) {
- badFramesObserved += 2;
- frame.perfClass = FRAME_PERF_CLASS.TERRIBLE;
- } else if (frame.totalDuration > EXPECTED_FRAME_TIME_MS ||
- frameMissedDeadline(frame)) {
- badFramesObserved++;
- frame.perfClass = FRAME_PERF_CLASS.BAD;
- } else {
- frame.perfClass = FRAME_PERF_CLASS.GOOD;
- }
- });
- framesObserved += app.process.frames.length;
- });
-
- if (framesObserved) {
- var portionBad = badFramesObserved / framesObserved;
- if (portionBad > 0.3)
- this.model.faviconHue = 'red';
- else if (portionBad > 0.05)
- this.model.faviconHue = 'yellow';
- else
- this.model.faviconHue = 'green';
- }
- },
-
- pushEventInfo_: function() {
- var appAnnotator = new AppAnnotator();
- this.helper.apps.forEach(function(app) {
- if (app.uiThread)
- appAnnotator.applyEventInfos(app.uiThread.sliceGroup);
- if (app.renderThread)
- appAnnotator.applyEventInfos(app.renderThread.sliceGroup);
- });
- },
-
- runAnnotate: function() {
- if (!this.helper)
- return;
-
- this.renameAndSort_();
- this.pushFramesAndJudgeJank_();
- this.pushEventInfo_();
-
- this.helper.iterateImportantSlices(function(slice) {
- slice.important = true;
- });
- },
-
- runAudit: function() {
- if (!this.helper)
- return;
-
- var alerts = this.model.alerts;
- this.helper.apps.forEach(function(app) {
- app.getFrames().forEach(function(frame) {
- alerts.push.apply(alerts, AndroidAuditor.getSaveLayerAlerts_(frame));
-
- // skip most alerts for neutral or good frames
- if (frame.perfClass === FRAME_PERF_CLASS.NEUTRAL ||
- frame.perfClass === FRAME_PERF_CLASS.GOOD)
- return;
-
- var alert = AndroidAuditor.getPathAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getUploadAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getListViewAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getMeasureLayoutAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getViewDrawAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getBlockingGcAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getLockContentionAlert_(frame);
- if (alert)
- alerts.push(alert);
- var alert = AndroidAuditor.getSchedulingAlert_(frame);
- if (alert)
- alerts.push(alert);
- });
- }, this);
-
- this.addRenderingInteractionRecords();
- this.addInputInteractionRecords();
- },
-
- addRenderingInteractionRecords: function() {
- var events = [];
- this.helper.apps.forEach(function(app) {
- events.push.apply(events, app.getAnimationAsyncSlices());
- events.push.apply(events, app.getFrames());
- });
-
- var mergerFunction = function(events) {
- var ir = new tr.model.um.ResponseExpectation(
- this.model, 'Rendering',
- events[0].min,
- events[events.length - 1].max - events[0].min);
- this.model.userModel.expectations.push(ir);
- }.bind(this);
- tr.b.mergeRanges(tr.b.convertEventsToRanges(events), 30, mergerFunction);
- },
-
- addInputInteractionRecords: function() {
- var inputSamples = [];
- this.helper.apps.forEach(function(app) {
- inputSamples.push.apply(inputSamples, app.getInputSamples());
- });
-
- var mergerFunction = function(events) {
- var ir = new tr.model.um.ResponseExpectation(
- this.model, 'Input',
- events[0].min,
- events[events.length - 1].max - events[0].min);
- this.model.userModel.expectations.push(ir);
- }.bind(this);
- var inputRanges = inputSamples.map(function(sample) {
- return tr.b.Range.fromExplicitRange(sample.timestamp, sample.timestamp);
- });
- tr.b.mergeRanges(inputRanges, 30, mergerFunction);
- }
- };
-
- Auditor.register(AndroidAuditor);
-
- function AppAnnotator() {
- this.titleInfoLookup = new Map();
- this.titleParentLookup = new Map();
- this.build_();
- }
-
- AppAnnotator.prototype = {
- build_: function() {
- var registerEventInfo = function(dict) {
- this.titleInfoLookup.set(dict.title, new EventInfo(
- dict.title, dict.description, dict.docLinks));
- if (dict.parents)
- this.titleParentLookup.set(dict.title, dict.parents);
- }.bind(this);
-
- registerEventInfo({
- title: 'inflate',
- description: 'Constructing a View hierarchy from pre-processed XML via LayoutInflater#layout. This includes constructing all of the View objects in the hierarchy, and applying styled attributes.'}); // @suppress longLineCheck
-
- //////////////////////////////////////////////////////////////////////////
- // Adapter view
- //////////////////////////////////////////////////////////////////////////
- registerEventInfo({
- title: 'obtainView',
- description: 'Adapter#getView() called to bind content to a recycled View that is being presented.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'setupListItem',
- description: 'Attached a newly-bound, recycled View to its parent ListView.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'setupGridItem',
- description: 'Attached a newly-bound, recycled View to its parent GridView.'}); // @suppress longLineCheck
-
- //////////////////////////////////////////////////////////////////////////
- // Choreographer (tracing enabled on M+)
- //////////////////////////////////////////////////////////////////////////
- var choreographerLinks = new DocLinkBuilder()
- .addDacRef('Choreographer', 'android/view/Choreographer.html') // @suppress longLineCheck
- .build();
- registerEventInfo({
- title: 'Choreographer#doFrame',
- docLinks: choreographerLinks,
- description: 'Choreographer executes frame callbacks for inputs, animations, and rendering traversals. When this work is done, a frame will be presented to the user.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'input',
- parents: ['Choreographer#doFrame'],
- docLinks: choreographerLinks,
- description: 'Input callbacks are processed. This generally encompasses dispatching input to Views, as well as any work the Views do to process this input/gesture.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'animation',
- parents: ['Choreographer#doFrame'],
- docLinks: choreographerLinks,
- description: 'Animation callbacks are processed. This is generally minimal work, as animations determine progress for the frame, and push new state to animated objects (such as setting View properties).'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'traversals',
- parents: ['Choreographer#doFrame'],
- docLinks: choreographerLinks,
- description: 'Primary draw traversals. This is the primary traversal of the View hierarchy, including layout and draw passes.'}); // @suppress longLineCheck
-
- //////////////////////////////////////////////////////////////////////////
- // performTraversals + sub methods
- //////////////////////////////////////////////////////////////////////////
- var traversalParents = ['Choreographer#doFrame', 'performTraversals'];
- var layoutLinks = new DocLinkBuilder()
- .addDacRef('View#Layout', 'android/view/View.html#Layout')
- .build();
- registerEventInfo({
- title: 'performTraversals',
- description: 'A drawing traversal of the View hierarchy, comprised of all layout and drawing needed to produce the frame.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'measure',
- parents: traversalParents,
- docLinks: layoutLinks,
- description: 'First of two phases in view hierarchy layout. Views are asked to size themselves according to constraints supplied by their parent. Some ViewGroups may measure a child more than once to help satisfy their own constraints. Nesting ViewGroups that measure children more than once can lead to excessive and repeated work.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'layout',
- parents: traversalParents,
- docLinks: layoutLinks,
- description: 'Second of two phases in view hierarchy layout, repositioning content and child Views into their new locations.'}); // @suppress longLineCheck
- var drawString = 'Draw pass over the View hierarchy. Every invalidated View will have its drawing commands recorded. On Android versions prior to Lollipop, this would also include the issuing of draw commands to the GPU. Starting with Lollipop, it only includes the recording of commands, and syncing that information to the RenderThread.'; // @suppress longLineCheck
- registerEventInfo({
- title: 'draw',
- parents: traversalParents,
- description: drawString});
-
- var recordString = 'Every invalidated View\'s drawing commands are recorded. Each will have View#draw() called, and is passed a Canvas that will record and store its drawing commands until it is next invalidated/rerecorded.'; // @suppress longLineCheck
- registerEventInfo({
- title: 'getDisplayList', // Legacy name for compatibility.
- parents: ['draw'],
- description: recordString});
- registerEventInfo({
- title: 'Record View#draw()',
- parents: ['draw'],
- description: recordString});
-
- registerEventInfo({
- title: 'drawDisplayList',
- parents: ['draw'],
- description: 'Execution of recorded draw commands to generate a frame. This represents the actual formation and issuing of drawing commands to the GPU. On Android L and higher devices, this work is done on a dedicated RenderThread, instead of on the UI Thread.'}); // @suppress longLineCheck
-
- //////////////////////////////////////////////////////////////////////////
- // RenderThread
- //////////////////////////////////////////////////////////////////////////
- registerEventInfo({
- title: 'DrawFrame',
- description: 'RenderThread portion of the standard UI/RenderThread split frame. This represents the actual formation and issuing of drawing commands to the GPU.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'doFrame',
- description: 'RenderThread animation frame. Represents drawing work done by the RenderThread on a frame where the UI thread did not produce new drawing content.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'syncFrameState',
- description: 'Sync stage between the UI thread and the RenderThread, where the UI thread hands off a frame (including information about modified Views). Time in this method primarily consists of uploading modified Bitmaps to the GPU. After this sync is completed, the UI thread is unblocked, and the RenderThread starts to render the frame.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'flush drawing commands',
- description: 'Issuing the now complete drawing commands to the GPU.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'eglSwapBuffers',
- description: 'Complete GPU rendering of the frame.'}); // @suppress longLineCheck
-
- //////////////////////////////////////////////////////////////////////////
- // RecyclerView
- //////////////////////////////////////////////////////////////////////////
- registerEventInfo({
- title: 'RV Scroll',
- description: 'RecyclerView is calculating a scroll. If there are too many of these in Systrace, some Views inside RecyclerView might be causing it. Try to avoid using EditText, focusable views or handle them with care.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'RV OnLayout',
- description: 'OnLayout has been called by the View system. If this shows up too many times in Systrace, make sure the children of RecyclerView do not update themselves directly. This will cause a full re-layout but when it happens via the Adapter notifyItemChanged, RecyclerView can avoid full layout calculation.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'RV FullInvalidate',
- description: 'NotifyDataSetChanged or equal has been called. If this is taking a long time, try sending granular notify adapter changes instead of just calling notifyDataSetChanged or setAdapter / swapAdapter. Adding stable ids to your adapter might help.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'RV PartialInvalidate',
- description: 'RecyclerView is rebinding a View. If this is taking a lot of time, consider optimizing your layout or make sure you are not doing extra operations in onBindViewHolder call.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'RV OnBindView',
- description: 'RecyclerView is rebinding a View. If this is taking a lot of time, consider optimizing your layout or make sure you are not doing extra operations in onBindViewHolder call.'}); // @suppress longLineCheck
- registerEventInfo({
- title: 'RV CreateView',
- description: 'RecyclerView is creating a new View. If too many of these are present: 1) There might be a problem in Recycling (e.g. custom Animations that set transient state and prevent recycling or ItemAnimator not implementing the contract properly. See Adapter#onFailedToRecycleView(ViewHolder). 2) There may be too many item view types. Try merging them. 3) There might be too many itemChange animations and not enough space in RecyclerPool. Try increasing your pool size and item cache size.'}); // @suppress longLineCheck
-
- //////////////////////////////////////////////////////////////////////////
- // Graphics + Composition
- //////////////////////////////////////////////////////////////////////////
- // TODO(ccraik): SurfaceFlinger work
- registerEventInfo({
- title: 'eglSwapBuffers',
- description: 'The CPU has finished producing drawing commands, and is flushing drawing work to the GPU, and posting that buffer to the consumer (which is often SurfaceFlinger window composition). Once this is completed, the GPU can produce the frame content without any involvement from the CPU.'}); // @suppress longLineCheck
- },
-
- applyEventInfosRecursive_: function(parentNames, slice) {
- var checkExpectedParentNames = function(expectedParentNames) {
- if (!expectedParentNames)
- return true;
- return expectedParentNames.some(function(name) {
- return parentNames.has(name);
- });
- };
-
- // Set EventInfo on the slice if it matches title, and parent.
- if (this.titleInfoLookup.has(slice.title)) {
- if (checkExpectedParentNames(this.titleParentLookup.get(slice.title)))
- slice.info = this.titleInfoLookup.get(slice.title);
- }
-
- // Push slice into parentNames, and recurse over subSlices.
- if (slice.subSlices.length > 0) {
- // Increment title in parentName dict.
- if (!parentNames.has(slice.title))
- parentNames.set(slice.title, 0);
- parentNames.set(slice.title, parentNames.get(slice.title) + 1);
-
- // Recurse over subSlices.
- slice.subSlices.forEach(function(subSlice) {
- this.applyEventInfosRecursive_(parentNames, subSlice);
- }, this);
-
- // Decrement title in parentName dict.
- parentNames.set(slice.title, parentNames.get(slice.title) - 1);
- if (parentNames.get(slice.title) === 0)
- delete parentNames[slice.title];
- }
- },
-
- applyEventInfos: function(sliceGroup) {
- sliceGroup.topLevelSlices.forEach(function(slice) {
- this.applyEventInfosRecursive_(new Map(), slice);
- }, this);
- }
- };
-
- return {
- AndroidAuditor: AndroidAuditor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor_test.html b/chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor_test.html
deleted file mode 100644
index 6ceb0bd67d0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/android/android_auditor_test.html
+++ /dev/null
@@ -1,425 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/android/android_auditor.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/model/frame.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var FRAME_PERF_CLASS = tr.model.FRAME_PERF_CLASS;
- var newThreadSlice = tr.c.TestUtils.newThreadSlice;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var timeDurationInMs = tr.b.Unit.byName.timeDurationInMs;
-
- test('constructorSliceName', function() {
- // verify 'constructor' slice name doesn't break the auditor
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var renderThread = model.getOrCreateProcess(1).getOrCreateThread(2);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'constructor', start: 200, duration: 5}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 0);
- });
-
- test('saveLayerAlert_badAlpha', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var renderThread = model.getOrCreateProcess(1).getOrCreateThread(2);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'doFrame', start: 200, duration: 5}));
- renderThread.sliceGroup.pushSlice(newSliceEx({
- title: 'BadAlphaView alpha caused saveLayer 480x320',
- start: 203,
- duration: 1
- }));
-
- // doesn't create alert, since bad alpha accounts for this savelayer
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'unclipped saveLayer 480x320', start: 204, duration: 1}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 1);
-
- var alert = model.alerts[0];
- assert.equal(alert.args['view name'], 'BadAlphaView');
- assert.equal(alert.args.width, 480);
- assert.equal(alert.args.height, 320);
- });
-
- test('saveLayerAlert_canvas', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var renderThread = model.getOrCreateProcess(1).getOrCreateThread(2);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'doFrame', start: 200, duration: 5}));
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'saveLayer 480x320', start: 204, duration: 1}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 1);
-
- var alert = model.alerts[0];
- assert.equal(alert.args['Clipped saveLayer count'], 1);
- assert.equal(alert.associatedEvents.length, 2);
- });
-
- test('generatePathAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var renderThread = model.getOrCreateProcess(1).getOrCreateThread(2);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'doFrame', start: 0, duration: 20}));
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Generate Path Texture', start: 0, duration: 3}));
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Generate Path Texture', start: 3, duration: 6}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 1);
-
- var alert = model.alerts[0];
- assert.deepEqual(alert.args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 9));
- assert.equal(alert.associatedEvents.length, 3);
- });
-
- test('uploadAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var renderThread = model.getOrCreateProcess(1).getOrCreateThread(2);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'doFrame', start: 0, duration: 20}));
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Upload 1000x1000 Texture', start: 0, duration: 15}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 1);
-
- var alert = model.alerts[0];
- assert.equal(alert.args['Pixels uploaded'], '1.00 million');
- assert.deepEqual(alert.args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 15));
- assert.equal(alert.associatedEvents.length, 2);
- });
-
- test('listViewAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'obtainView', start: 0, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'setupListItem', start: 5, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'obtainView', start: 10, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'setupListItem', start: 15, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 20, duration: 5}));
-
- // short frame, so no alert should be generated
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'obtainView', start: 50, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'setupListItem', start: 55, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 60, duration: 1}));
-
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'obtainView', start: 100, duration: 10}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'inflate', start: 101, duration: 8}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'setupListItem', start: 110, duration: 10}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 120, duration: 5}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 2);
- var alert = model.alerts[0];
- assert.equal(alert.args['ListView items rebound'], 2);
- assert.deepEqual(alert.args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 20));
- assert.equal(alert.associatedEvents.length, 5);
-
- var alert = model.alerts[1];
- assert.equal(alert.args['ListView items inflated'], 1);
- assert.deepEqual(alert.args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 20));
- assert.equal(alert.associatedEvents.length, 3); // note: inflate not assoc.
- });
-
- test('measureLayoutAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 20}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'measure', start: 0, duration: 5}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'layout', start: 10, duration: 5}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 1);
-
- var alert = model.alerts[0];
- assert.deepEqual(alert.args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 10));
- assert.equal(alert.associatedEvents.length, 3);
- });
-
- test('viewDrawAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- // modern naming
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 20}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Record View#draw()', start: 0, duration: 10}));
-
- // legacy naming
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 40, duration: 20}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'getDisplayList', start: 40, duration: 10}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 2);
- assert.deepEqual(model.alerts[0].args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 10));
- assert.deepEqual(model.alerts[1].args['Time spent'],
- new ScalarNumeric(timeDurationInMs, 10));
- });
-
- test('blockingGcAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- var sliceGroup = uiThread.sliceGroup;
- sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 20}));
- sliceGroup.pushSlice(newSliceEx(
- {title: 'DVM Suspend', start: 0, duration: 15}));
-
- sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 50, duration: 20}));
- sliceGroup.pushSlice(newSliceEx(
- {title: 'GC: Wait For Concurrent', start: 50, duration: 15}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 2);
- assert.deepEqual(model.alerts[0].args['Blocked duration'],
- new ScalarNumeric(timeDurationInMs, 15));
- assert.deepEqual(model.alerts[1].args['Blocked duration'],
- new ScalarNumeric(timeDurationInMs, 15));
- });
-
- test('lockContentionAlert', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- var sliceGroup = uiThread.sliceGroup;
- sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 20}));
- sliceGroup.pushSlice(newSliceEx(
- {title: 'Lock Contention on a lock', start: 0, duration: 15}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(model.alerts.length, 1);
- assert.deepEqual(model.alerts[0].args['Blocked duration'],
- new ScalarNumeric(timeDurationInMs, 15));
- });
-
- test('schedulingAlerts', function() {
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 20}));
- uiThread.timeSlices = [
- newThreadSlice(uiThread, SCHEDULING_STATE.RUNNING, 0, 6),
- newThreadSlice(uiThread, SCHEDULING_STATE.RUNNABLE, 6, 10),
- newThreadSlice(uiThread, SCHEDULING_STATE.RUNNING, 16, 4)];
- }, tr.e.audits.AndroidAuditor);
- assert.equal(model.alerts.length, 1);
- var alert = model.alerts[0];
- assert.equal(alert.info.title, 'Scheduling delay');
- assert.deepEqual(alert.args['Not scheduled, but runnable'],
- new ScalarNumeric(timeDurationInMs, 10));
-
- model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 20}));
- uiThread.timeSlices = [
- newThreadSlice(uiThread, SCHEDULING_STATE.RUNNING, 0, 5),
- newThreadSlice(uiThread, SCHEDULING_STATE.UNINTR_SLEEP, 5, 10),
- newThreadSlice(uiThread, SCHEDULING_STATE.RUNNING, 15, 5)];
- }, tr.e.audits.AndroidAuditor);
- assert.equal(model.alerts.length, 1);
- var alert = model.alerts[0];
- assert.equal(alert.info.title, 'Scheduling delay');
- assert.deepEqual(alert.args['Blocking I/O delay'],
- new ScalarNumeric(timeDurationInMs, 10));
- });
-
- test('addFramesToModel', function() {
- var process;
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- process = model.getOrCreateProcess(1);
- var uiThread = process.getOrCreateThread(1);
-
- // High level choreographer frame signal
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Choreographer#doFrame', start: 0, duration: 8}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Choreographer#doFrame', start: 16, duration: 20}));
-
- // Old devices only have 'performTraversals'
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 40, duration: 90}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.equal(process.frames.length, 3);
- assert.closeTo(process.frames[0].totalDuration, 8, 1e-5);
- assert.closeTo(process.frames[1].totalDuration, 20, 1e-5);
- assert.closeTo(process.frames[2].totalDuration, 90, 1e-5);
-
- assert.equal(process.frames[0].perfClass,
- FRAME_PERF_CLASS.GOOD);
- assert.equal(process.frames[1].perfClass,
- FRAME_PERF_CLASS.BAD);
- assert.equal(process.frames[2].perfClass,
- FRAME_PERF_CLASS.TERRIBLE);
- });
-
- test('processRenameAndSort', function() {
- var appProcess;
- var sfProcess;
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- appProcess = model.getOrCreateProcess(1);
- var uiThread = appProcess.getOrCreateThread(1);
- uiThread.name = 'ndroid.systemui';
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 8}));
-
- sfProcess = model.getOrCreateProcess(2);
- var sfThread = sfProcess.getOrCreateThread(2);
- sfThread.name = '/system/bin/surfaceflinger';
- sfThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'doComposition', start: 8, duration: 2}));
-
- }, tr.e.audits.AndroidAuditor);
-
- // both processes should be renamed
- assert.equal(appProcess.name, 'android.systemui');
- assert.equal(sfProcess.name, 'SurfaceFlinger');
-
- assert.isTrue(sfProcess.sortIndex < appProcess.sortIndex);
- assert.isTrue(appProcess.important);
- assert.isFalse(sfProcess.important);
- });
-
- test('eventInfo', function() {
- var eventsExpectingInfo = [];
- var eventsNotExpectingInfo = [];
-
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var appProcess = model.getOrCreateProcess(1);
- var uiThread = appProcess.getOrCreateThread(1);
- uiThread.name = 'ndroid.systemui';
-
- var pushInfoSlice = function(slice) {
- eventsExpectingInfo.push(slice);
- uiThread.sliceGroup.pushSlice(slice);
- };
- var pushNonInfoSlice = function(slice) {
- eventsNotExpectingInfo.push(slice);
- uiThread.sliceGroup.pushSlice(slice);
- };
-
- pushInfoSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 10}));
- pushInfoSlice(newSliceEx({title: 'measure', start: 0, duration: 2}));
- pushInfoSlice(newSliceEx({title: 'layout', start: 2, duration: 1}));
- pushInfoSlice(newSliceEx({title: 'draw', start: 3, duration: 7}));
-
- // Out of place slices should not be tagged.
- pushNonInfoSlice(newSliceEx({title: 'measure', start: 11, duration: 1}));
- pushNonInfoSlice(newSliceEx({title: 'draw', start: 12, duration: 1}));
- }, tr.e.audits.AndroidAuditor);
-
- eventsExpectingInfo.forEach(function(event) {
- assert.notEqual(event.info, undefined);
- });
-
- eventsNotExpectingInfo.forEach(function(event) {
- assert.equal(event.info, undefined);
- });
- });
-
- test('drawingThreadPriorities', function() {
- var uiThread;
- var renderThread;
- var workerThread;
- var otherThread;
- var model = tr.c.TestUtils.newModelWithAuditor(function(model) {
- var appProcess = model.getOrCreateProcess(1);
-
- uiThread = appProcess.getOrCreateThread(1);
- uiThread.name = 'ndroid.systemui';
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 0, duration: 4}));
-
- renderThread = appProcess.getOrCreateThread(2);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'DrawFrame', start: 3, duration: 4}));
-
- workerThread = appProcess.getOrCreateThread(3);
- workerThread.name = 'hwuiTask1';
- workerThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'work', start: 4, duration: 1}));
-
- otherThread = appProcess.getOrCreateThread(4);
- otherThread.name = 'other';
- otherThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'otherWork', start: 0, duration: 2}));
- }, tr.e.audits.AndroidAuditor);
-
- assert.isTrue(uiThread.sortIndex < renderThread.sortIndex);
- assert.isTrue(renderThread.sortIndex < workerThread.sortIndex);
- assert.isTrue(workerThread.sortIndex < otherThread.sortIndex);
- });
-
- test('favicon', function() {
- var createModelWithJank = function(percentageJank) {
-
- return tr.c.TestUtils.newModelWithAuditor(function(model) {
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- for (var i = 0; i < 100; i++) {
- var slice = newSliceEx({
- title: 'performTraversals',
- start: 30 * i,
- duration: i <= percentageJank ? 24 : 8
- });
- uiThread.sliceGroup.pushSlice(slice);
- }
- }, tr.e.audits.AndroidAuditor);
- };
- assert.equal(createModelWithJank(3).faviconHue, 'green');
- assert.equal(createModelWithJank(10).faviconHue, 'yellow');
- assert.equal(createModelWithJank(50).faviconHue, 'red');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context.html
deleted file mode 100644
index 18605115cb5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview BlameContext is the Trace Viewer side correspondence of
- * Chrome's class base::trace_event::BlameContext. More specifically,
- *
- * BlameContextSnapshot, which inherits from ObjectSnapshot, is the base class
- * of all snapshots of blame contexts traced in Chrome.
- *
- * BlameContextInstance, which inherits from ObjectInstance, gathers snapshots
- * of the same blame context traced in Chrome.
- *
- * BlameContextSnapshot and BlameContextInstance should never be instantiated
- * directly. Subclasses corresponding to different BlameContexts in Chrome
- * should define their own BlameContextSnapshot and BlameContextInstance
- * specializations for instantiation.
- *
- */
-tr.exportTo('tr.e.chrome', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
- var ObjectInstance = tr.model.ObjectInstance;
-
- function BlameContextSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- BlameContextSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- /**
- * Returns the parent in the context tree.
- */
- get parentContext() {
- if (this.args.parent instanceof BlameContextSnapshot)
- return this.args.parent;
- return undefined;
- },
-
- get userFriendlyName() {
- return 'BlameContext';
- }
- };
-
- function BlameContextInstance() {
- ObjectInstance.apply(this, arguments);
- }
-
- BlameContextInstance.prototype = {
- __proto__: ObjectInstance.prototype,
-
- /**
- * Returns the type of the blame context, to be overriden by subclasses.
- */
- get blameContextType() {
- throw new Error('Not implemented');
- }
- };
-
- return {
- BlameContextSnapshot: BlameContextSnapshot,
- BlameContextInstance: BlameContextInstance
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context_test.html
deleted file mode 100644
index f8009f0bd10..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/blame_context_test.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot;
- var BlameContextInstance = tr.e.chrome.BlameContextInstance;
-
- function TestBlameContextSnapshot() {
- BlameContextSnapshot.apply(this, arguments);
- }
-
- TestBlameContextSnapshot.prototype = {
- __proto__: BlameContextSnapshot.prototype,
-
- get userFriendlyName() {
- return 'Test';
- }
- };
-
- tr.model.ObjectSnapshot.subTypes.register(
- TestBlameContextSnapshot,
- {typeName: 'Test'});
-
- function TestBlameContextInstance() {
- BlameContextInstance.apply(this, arguments);
- }
-
- TestBlameContextInstance.prototype = {
- __proto__: BlameContextInstance.prototype,
-
- get blameContextType() {
- return 'Test';
- }
- };
-
- tr.model.ObjectInstance.subTypes.register(
- TestBlameContextInstance,
- {typeName: 'Test'});
-
- var TestUtils = tr.c.TestUtils;
-
- test('parentContext', function() {
- var parent;
- var child;
- TestUtils.newModel(function(model) {
- parent = TestUtils.newSnapshot(model, {id: '0x1', name: 'Test'});
- child = TestUtils.newSnapshot(model, {id: '0x2', name: 'Test',
- args: {parent: {id_ref: '0x1'}}});
- });
-
- assert.isTrue(child.parentContext === parent);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_blame_context_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_blame_context_test.html
deleted file mode 100644
index 8fd3bb2c69e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_blame_context_test.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/frame_tree_node.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/render_frame.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/top_level.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestUtils = tr.c.TestUtils;
-
- test('crossProcessCounterpart', function() {
- var frameTreeNode;
- var renderFrame;
- TestUtils.newModel(function(model) {
- // Add a toplevel to make the context tree consistent with the spec,
- // though its functionality is not tested here.
- TestUtils.newSnapshot(model, {
- pid: 1, name: 'TopLevel', id: '0x1',
- scope: 'PlatformThread', category: 'blink'});
- renderFrame = TestUtils.newSnapshot(
- model, {
- pid: 1, name: 'RenderFrame', id: '0x2', scope: 'RenderFrame',
- category: 'blink', args: {
- parent: {scope: 'PlatformThread', id_ref: '0x1'}}});
- frameTreeNode = TestUtils.newSnapshot(
- model, {
- pid: 2, name: 'FrameTreeNode', id: '0x3', scope: 'FrameTreeNode',
- category: 'navigation', args: {
- renderFrame: {scope: 'RenderFrame', id_ref: '0x2', pid_ref: 1}}});
- });
-
- assert.isTrue(frameTreeNode.renderFrame === renderFrame);
- assert.isTrue(renderFrame.frameTreeNode === frameTreeNode);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_tree_node.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_tree_node.html
deleted file mode 100644
index 4a1fc5e61d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/frame_tree_node.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Trace Viewer side's correspondence of Chrome's
- * content::FrameTreeNode class.
- *
- */
-tr.exportTo('tr.e.chrome', function() {
- var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot;
- var BlameContextInstance = tr.e.chrome.BlameContextInstance;
-
- function FrameTreeNodeSnapshot() {
- BlameContextSnapshot.apply(this, arguments);
- }
-
- FrameTreeNodeSnapshot.prototype = {
- __proto__: BlameContextSnapshot.prototype,
-
- get renderFrame() {
- if (this.args.renderFrame instanceof tr.e.chrome.RenderFrameSnapshot)
- return this.args.renderFrame;
- return undefined;
- },
-
- get url() {
- return this.args.url;
- },
-
- get userFriendlyName() {
- return 'FrameTreeNode';
- }
- };
-
- tr.model.ObjectSnapshot.subTypes.register(
- FrameTreeNodeSnapshot,
- {typeName: 'FrameTreeNode'});
-
- function FrameTreeNodeInstance() {
- BlameContextInstance.apply(this, arguments);
- }
-
- FrameTreeNodeInstance.prototype = {
- __proto__: BlameContextInstance.prototype,
-
- get blameContextType() {
- return 'Frame';
- }
- };
-
- tr.model.ObjectInstance.subTypes.register(
- FrameTreeNodeInstance,
- {typeName: 'FrameTreeNode'});
-
- return {
- FrameTreeNodeSnapshot: FrameTreeNodeSnapshot,
- FrameTreeNodeInstance: FrameTreeNodeInstance
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/render_frame.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/render_frame.html
deleted file mode 100644
index 081ef81c2e6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/render_frame.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Trace Viewer side's correspondence of Chrome's
- * content::FrameBlameContext class.
- *
- */
-tr.exportTo('tr.e.chrome', function() {
- var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot;
- var BlameContextInstance = tr.e.chrome.BlameContextInstance;
-
- function RenderFrameSnapshot() {
- BlameContextSnapshot.apply(this, arguments);
- }
-
- RenderFrameSnapshot.prototype = {
- __proto__: BlameContextSnapshot.prototype,
-
- referencedAt: function(item, object, field) {
- if (item instanceof tr.e.chrome.FrameTreeNodeSnapshot &&
- object === item.args &&
- field === 'renderFrame') {
- this.args.frameTreeNode = item;
- }
- },
-
- get frameTreeNode() {
- if (this.args.frameTreeNode instanceof tr.e.chrome.FrameTreeNodeSnapshot)
- return this.args.frameTreeNode;
- return undefined;
- },
-
- get url() {
- if (this.frameTreeNode)
- return this.frameTreeNode.url;
- return undefined;
- },
-
- get userFriendlyName() {
- return 'RenderFrame';
- }
- };
-
- tr.model.ObjectSnapshot.subTypes.register(
- RenderFrameSnapshot,
- {typeName: 'RenderFrame'});
-
- function RenderFrameInstance() {
- BlameContextInstance.apply(this, arguments);
- }
-
- RenderFrameInstance.prototype = {
- __proto__: BlameContextInstance.prototype,
-
- get blameContextType() {
- return 'Frame';
- }
- };
-
- tr.model.ObjectInstance.subTypes.register(
- RenderFrameInstance,
- {typeName: 'RenderFrame'});
-
- return {
- RenderFrameSnapshot: RenderFrameSnapshot,
- RenderFrameInstance: RenderFrameInstance
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/top_level.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/top_level.html
deleted file mode 100644
index b8b70692ab1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/blame_context/top_level.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Trace Viewer side's correspondence of Chrome's
- * content::TopLevelBlameContext class.
- *
- */
-tr.exportTo('tr.e.chrome', function() {
- var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot;
- var BlameContextInstance = tr.e.chrome.BlameContextInstance;
-
- function TopLevelSnapshot() {
- BlameContextSnapshot.apply(this, arguments);
- }
-
- TopLevelSnapshot.prototype = {
- __proto__: BlameContextSnapshot.prototype,
-
- get userFriendlyName() {
- return 'TopLevel';
- }
- };
-
- tr.model.ObjectSnapshot.subTypes.register(
- TopLevelSnapshot,
- {typeName: 'TopLevel'});
-
- function TopLevelInstance() {
- BlameContextInstance.apply(this, arguments);
- }
-
- TopLevelInstance.prototype = {
- __proto__: BlameContextInstance.prototype,
-
- get blameContextType() {
- return 'TopLevel';
- }
- };
-
- tr.model.ObjectInstance.subTypes.register(
- TopLevelInstance,
- {typeName: 'TopLevel'});
-
- return {
- TopLevelSnapshot: TopLevelSnapshot,
- TopLevelInstance: TopLevelInstance
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/cc.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/cc.html
deleted file mode 100644
index 8ef67b0d21e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/cc.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/display_item_list.html">
-<link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/extras/chrome/cc/tile.html">
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/constants.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/constants.html
deleted file mode 100644
index c65adca5b59..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/constants.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var constants = {};
- constants.ACTIVE_TREE = 0;
- constants.PENDING_TREE = 1;
-
- constants.HIGH_PRIORITY_BIN = 0;
- constants.LOW_PRIORITY_BIN = 1;
-
- constants.SEND_BEGIN_FRAME_EVENT =
- 'ThreadProxy::ScheduledActionSendBeginMainFrame';
- constants.BEGIN_MAIN_FRAME_EVENT = 'ThreadProxy::BeginMainFrame';
-
- return {
- constants: constants
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/debug_colors.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/debug_colors.html
deleted file mode 100644
index 1c5ae61e3f5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/debug_colors.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Mapping of different tile configuration
- * to border colors and widths.
- */
-tr.exportTo('tr.e.cc', function() {
- var tileTypes = {
- highRes: 'highRes',
- lowRes: 'lowRes',
- extraHighRes: 'extraHighRes',
- extraLowRes: 'extraLowRes',
- missing: 'missing',
- culled: 'culled',
- solidColor: 'solidColor',
- picture: 'picture',
- directPicture: 'directPicture',
- unknown: 'unknown'
- };
-
- var tileBorder = {
- highRes: {
- color: 'rgba(80, 200, 200, 0.7)',
- width: 1
- },
- lowRes: {
- color: 'rgba(212, 83, 192, 0.7)',
- width: 2
- },
- extraHighRes: {
- color: 'rgba(239, 231, 20, 0.7)',
- width: 2
- },
- extraLowRes: {
- color: 'rgba(93, 186, 18, 0.7)',
- width: 2
- },
- missing: {
- color: 'rgba(255, 0, 0, 0.7)',
- width: 1
- },
- culled: {
- color: 'rgba(160, 100, 0, 0.8)',
- width: 1
- },
- solidColor: {
- color: 'rgba(128, 128, 128, 0.7)',
- width: 1
- },
- picture: {
- color: 'rgba(64, 64, 64, 0.7)',
- width: 1
- },
- directPicture: {
- color: 'rgba(127, 255, 0, 1.0)',
- width: 1
- },
- unknown: {
- color: 'rgba(0, 0, 0, 1.0)',
- width: 2
- }
- };
-
- return {
- tileTypes: tileTypes,
- tileBorder: tileBorder
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list.html
deleted file mode 100644
index 36a0d33728b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- function DisplayItemList(skp64, layerRect) {
- tr.e.cc.Picture.apply(this, arguments);
- }
-
- DisplayItemList.prototype = {
- __proto__: tr.e.cc.Picture.prototype
- };
-
- /**
- * @constructor
- */
- function DisplayItemListSnapshot() {
- tr.e.cc.PictureSnapshot.apply(this, arguments);
- }
-
- DisplayItemListSnapshot.prototype = {
- __proto__: tr.e.cc.PictureSnapshot.prototype,
-
- initialize: function() {
- tr.e.cc.PictureSnapshot.prototype.initialize.call(this);
- this.displayItems_ = this.args.params.items;
- },
-
- get items() {
- return this.displayItems_;
- }
- };
-
- ObjectSnapshot.subTypes.register(
- DisplayItemListSnapshot,
- {typeNames: ['cc::DisplayItemList']});
-
- return {
- DisplayItemListSnapshot: DisplayItemListSnapshot,
- DisplayItemList: DisplayItemList
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list_test.html
deleted file mode 100644
index 9bbab94fc2d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/display_item_list_test.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/cc.html">
-<link rel="import" href="/tracing/extras/chrome/cc/display_item_list.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::DisplayItemList')[0];
- var snapshot = instance.snapshots[0];
-
- assert.instanceOf(snapshot, tr.e.cc.DisplayItemListSnapshot);
- instance.wasDeleted(150);
- });
-
- test('getItems', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::DisplayItemList')[0];
- var snapshot = instance.snapshots[0];
-
- var items = snapshot.items;
- assert.equal(items.length, 2);
-
- assert.equal(items[0], 'BeginClipDisplayItem');
- assert.equal(items[1], 'EndClipDisplayItem');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice.html
deleted file mode 100644
index d641963e59f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice.html
+++ /dev/null
@@ -1,629 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/async_slice.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var AsyncSlice = tr.model.AsyncSlice;
- var EventSet = tr.model.EventSet;
-
- var UI_COMP_NAME = 'INPUT_EVENT_LATENCY_UI_COMPONENT';
- var ORIGINAL_COMP_NAME = 'INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT';
- var BEGIN_COMP_NAME = 'INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT';
- var END_COMP_NAME = 'INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT';
-
- var MAIN_RENDERER_THREAD_NAME = 'CrRendererMain';
- var COMPOSITOR_THREAD_NAME = 'Compositor';
-
- var POSTTASK_FLOW_EVENT = 'disabled-by-default-toplevel.flow';
- var IPC_FLOW_EVENT = 'disabled-by-default-ipc.flow';
-
- var INPUT_EVENT_TYPE_NAMES = {
- CHAR: 'Char',
- CLICK: 'GestureClick',
- CONTEXT_MENU: 'ContextMenu',
- FLING_CANCEL: 'GestureFlingCancel',
- FLING_START: 'GestureFlingStart',
- KEY_DOWN: 'KeyDown',
- KEY_DOWN_RAW: 'RawKeyDown',
- KEY_UP: 'KeyUp',
- LATENCY_SCROLL_UPDATE: 'ScrollUpdate',
- MOUSE_DOWN: 'MouseDown',
- MOUSE_ENTER: 'MouseEnter',
- MOUSE_LEAVE: 'MouseLeave',
- MOUSE_MOVE: 'MouseMove',
- MOUSE_UP: 'MouseUp',
- MOUSE_WHEEL: 'MouseWheel',
- PINCH_BEGIN: 'GesturePinchBegin',
- PINCH_END: 'GesturePinchEnd',
- PINCH_UPDATE: 'GesturePinchUpdate',
- SCROLL_BEGIN: 'GestureScrollBegin',
- SCROLL_END: 'GestureScrollEnd',
- SCROLL_UPDATE: 'GestureScrollUpdate',
- SCROLL_UPDATE_RENDERER: 'ScrollUpdate',
- SHOW_PRESS: 'GestureShowPress',
- TAP: 'GestureTap',
- TAP_CANCEL: 'GestureTapCancel',
- TAP_DOWN: 'GestureTapDown',
- TOUCH_CANCEL: 'TouchCancel',
- TOUCH_END: 'TouchEnd',
- TOUCH_MOVE: 'TouchMove',
- TOUCH_START: 'TouchStart',
- UNKNOWN: 'UNKNOWN'
- };
-
- function InputLatencyAsyncSlice() {
- AsyncSlice.apply(this, arguments);
- this.associatedEvents_ = new EventSet();
- this.typeName_ = undefined;
- if (!this.isLegacyEvent)
- this.determineModernTypeName_();
- }
-
- InputLatencyAsyncSlice.prototype = {
- __proto__: AsyncSlice.prototype,
-
- // Legacy InputLatencyAsyncSlices involve a top-level slice titled
- // "InputLatency" containing a subSlice whose title starts with
- // "InputLatency:". Modern InputLatencyAsyncSlices involve a single
- // top-level slice whose title starts with "InputLatency::".
- // Legacy subSlices are not available at construction time, so
- // determineLegacyTypeName_() must be called at get time.
- // So this returns false for the legacy subSlice events titled like
- // "InputLatency:Foo" even though they are technically legacy events.
- get isLegacyEvent() {
- return this.title === 'InputLatency';
- },
-
- get typeName() {
- if (!this.typeName_)
- this.determineLegacyTypeName_();
- return this.typeName_;
- },
-
- checkTypeName_: function() {
- if (!this.typeName_)
- throw 'Unable to determine typeName';
- var found = false;
- for (var typeName in INPUT_EVENT_TYPE_NAMES) {
- if (this.typeName === INPUT_EVENT_TYPE_NAMES[typeName]) {
- found = true;
- break;
- }
- }
- if (!found)
- this.typeName_ = INPUT_EVENT_TYPE_NAMES.UNKNOWN;
- },
-
- determineModernTypeName_: function() {
- // This method works both on modern events titled like
- // "InputLatency::Foo" and also on the legacy subSlices titled like
- // "InputLatency:Foo". Modern events' titles contain 2 colons, whereas the
- // legacy subSlices events contain 1 colon.
-
- var lastColonIndex = this.title.lastIndexOf(':');
- if (lastColonIndex < 0)
- return;
-
- var characterAfterLastColonIndex = lastColonIndex + 1;
- this.typeName_ = this.title.slice(characterAfterLastColonIndex);
-
- // Check that the determined typeName is known.
- this.checkTypeName_();
- },
-
- determineLegacyTypeName_: function() {
- // Iterate over all descendent subSlices.
- for (var subSlice of this.enumerateAllDescendents()) {
-
- // If |subSlice| is not an InputLatencyAsyncSlice, then ignore it.
- var subSliceIsAInputLatencyAsyncSlice = (
- subSlice instanceof InputLatencyAsyncSlice);
- if (!subSliceIsAInputLatencyAsyncSlice)
- continue;
-
- // If |subSlice| does not have a typeName, then ignore it.
- if (!subSlice.typeName)
- continue;
-
- // If |this| already has a typeName and |subSlice| has a different
- // typeName, then explode!
- if (this.typeName_ && subSlice.typeName_) {
- var subSliceHasDifferentTypeName = (
- this.typeName_ !== subSlice.typeName_);
- if (subSliceHasDifferentTypeName) {
- throw 'InputLatencyAsyncSlice.determineLegacyTypeName_() ' +
- ' found multiple typeNames';
- }
- }
-
- // The typeName of |this| top-level event is whatever the typeName of
- // |subSlice| is. Set |this.typeName_| to the subSlice's typeName.
- this.typeName_ = subSlice.typeName_;
- }
-
- // If typeName could not be determined, then explode!
- if (!this.typeName_)
- throw 'InputLatencyAsyncSlice.determineLegacyTypeName_() failed';
-
- // Check that the determined typeName is known.
- this.checkTypeName_();
- },
-
- getRendererHelper: function(sourceSlices) {
- var traceModel = this.startThread.parent.model;
- var modelHelper = traceModel.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- if (!modelHelper)
- return undefined;
-
- var mainThread = undefined;
- var compositorThread = undefined;
-
- for (var i in sourceSlices) {
- if (sourceSlices[i].parentContainer.name ===
- MAIN_RENDERER_THREAD_NAME)
- mainThread = sourceSlices[i].parentContainer;
- else if (sourceSlices[i].parentContainer.name ===
- COMPOSITOR_THREAD_NAME)
- compositorThread = sourceSlices[i].parentContainer;
-
- if (mainThread && compositorThread)
- break;
- }
-
- var rendererHelpers = modelHelper.rendererHelpers;
-
- var pids = Object.keys(rendererHelpers);
- for (var i = 0; i < pids.length; i++) {
- var pid = pids[i];
- var rendererHelper = rendererHelpers[pid];
- if (rendererHelper.mainThread === mainThread ||
- rendererHelper.compositorThread === compositorThread)
- return rendererHelper;
- }
-
- return undefined;
- },
-
- addEntireSliceHierarchy: function(slice) {
- this.associatedEvents_.push(slice);
- slice.iterateAllSubsequentSlices(function(subsequentSlice) {
- this.associatedEvents_.push(subsequentSlice);
- }, this);
- },
-
- addDirectlyAssociatedEvents: function(flowEvents) {
- var slices = [];
-
- flowEvents.forEach(function(flowEvent) {
- this.associatedEvents_.push(flowEvent);
- var newSource = flowEvent.startSlice.mostTopLevelSlice;
- if (slices.indexOf(newSource) === -1)
- slices.push(newSource);
- }, this);
-
- var lastFlowEvent = flowEvents[flowEvents.length - 1];
- var lastSource = lastFlowEvent.endSlice.mostTopLevelSlice;
- if (slices.indexOf(lastSource) === -1)
- slices.push(lastSource);
-
- return slices;
- },
-
- // Find the Latency::ScrollUpdate slice that corresponds to the
- // InputLatency::GestureScrollUpdate slice.
- // The C++ CL that makes this connection is at:
- // https://codereview.chromium.org/1178963003
- addScrollUpdateEvents: function(rendererHelper) {
- if (!rendererHelper || !rendererHelper.compositorThread)
- return;
-
- var compositorThread = rendererHelper.compositorThread;
- var gestureScrollUpdateStart = this.start;
- var gestureScrollUpdateEnd = this.end;
-
- var allCompositorAsyncSlices =
- compositorThread.asyncSliceGroup.slices;
-
- for (var i in allCompositorAsyncSlices) {
- var slice = allCompositorAsyncSlices[i];
-
- if (slice.title !== 'Latency::ScrollUpdate')
- continue;
-
- var parentId = slice.args.data.
- INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT.
- sequence_number;
-
- if (parentId === undefined) {
- // Old trace, we can only rely on the timestamp to find the slice
- if (slice.start < gestureScrollUpdateStart ||
- slice.start >= gestureScrollUpdateEnd)
- continue;
- } else {
- // New trace, we can definitively find the latency slice by comparing
- // its sequence number with gesture id
- if (parseInt(parentId) !== parseInt(this.id))
- continue;
- }
-
- slice.associatedEvents.forEach(function(event) {
- this.associatedEvents_.push(event);
- }, this);
- break;
- }
- },
-
- // Return true if the slice hierarchy is tracked by LatencyInfo of other
- // input latency events. If the slice hierarchy is tracked by both, this
- // function still returns true.
- belongToOtherInputs: function(slice, flowEvents) {
- var fromOtherInputs = false;
-
- slice.iterateEntireHierarchy(function(subsequentSlice) {
- if (fromOtherInputs)
- return;
-
- subsequentSlice.inFlowEvents.forEach(function(inflow) {
- if (fromOtherInputs)
- return;
-
- if (inflow.category.indexOf('input') > -1) {
- if (flowEvents.indexOf(inflow) === -1)
- fromOtherInputs = true;
- }
- }, this);
- }, this);
-
- return fromOtherInputs;
- },
-
- // Return true if |event| triggers slices of other inputs.
- triggerOtherInputs: function(event, flowEvents) {
- if (event.outFlowEvents === undefined ||
- event.outFlowEvents.length === 0)
- return false;
-
- // Once we fix the bug of flow event binding, there should exist one and
- // only one outgoing flow (PostTask) from ScheduleBeginImplFrameDeadline
- // and PostComposite.
- var flow = event.outFlowEvents[0];
-
- if (flow.category !== POSTTASK_FLOW_EVENT ||
- !flow.endSlice)
- return false;
-
- var endSlice = flow.endSlice;
- if (this.belongToOtherInputs(endSlice.mostTopLevelSlice, flowEvents))
- return true;
-
- return false;
- },
-
- // Follow outgoing flow of subsequentSlices in the current hierarchy.
- // We also handle cases where different inputs interfere with each other.
- followSubsequentSlices: function(event, queue, visited, flowEvents) {
- var stopFollowing = false;
- var inputAck = false;
-
- event.iterateAllSubsequentSlices(function(slice) {
- if (stopFollowing)
- return;
-
- // Do not follow TaskQueueManager::RunTask because it causes
- // many false events to be included.
- if (slice.title === 'TaskQueueManager::RunTask')
- return;
-
- // Do not follow ScheduledActionSendBeginMainFrame because the real
- // main thread BeginMainFrame is already traced by LatencyInfo flow.
- if (slice.title === 'ThreadProxy::ScheduledActionSendBeginMainFrame')
- return;
-
- // Do not follow ScheduleBeginImplFrameDeadline that triggers an
- // OnBeginImplFrameDeadline that is tracked by another LatencyInfo.
- if (slice.title === 'Scheduler::ScheduleBeginImplFrameDeadline') {
- if (this.triggerOtherInputs(slice, flowEvents))
- return;
- }
-
- // Do not follow PostComposite that triggers CompositeImmediately
- // that is tracked by another LatencyInfo.
- if (slice.title === 'CompositorImpl::PostComposite') {
- if (this.triggerOtherInputs(slice, flowEvents))
- return;
- }
-
- // Stop following the rest of the current slice hierarchy if
- // FilterAndSendWebInputEvent occurs after ProcessInputEventAck.
- if (slice.title === 'InputRouterImpl::ProcessInputEventAck')
- inputAck = true;
- if (inputAck &&
- slice.title === 'InputRouterImpl::FilterAndSendWebInputEvent')
- stopFollowing = true;
-
- this.followCurrentSlice(slice, queue, visited);
- }, this);
- },
-
- // Follow outgoing flow events of the current slice.
- followCurrentSlice: function(event, queue, visited) {
- event.outFlowEvents.forEach(function(outflow) {
- if ((outflow.category === POSTTASK_FLOW_EVENT ||
- outflow.category === IPC_FLOW_EVENT) &&
- outflow.endSlice) {
- this.associatedEvents_.push(outflow);
-
- var nextEvent = outflow.endSlice.mostTopLevelSlice;
- if (!visited.contains(nextEvent)) {
- visited.push(nextEvent);
- queue.push(nextEvent);
- }
- }
- }, this);
- },
-
- backtraceFromDraw: function(beginImplFrame, visited) {
- var pendingEventQueue = [];
- pendingEventQueue.push(beginImplFrame.mostTopLevelSlice);
-
- while (pendingEventQueue.length !== 0) {
- var event = pendingEventQueue.pop();
-
- this.addEntireSliceHierarchy(event);
-
- // TODO(yuhao): For now, we backtrace all the way to the source input.
- // But is this really needed? I will have an entry in the design
- // doc to discuss this.
- event.inFlowEvents.forEach(function(inflow) {
- if (inflow.category === POSTTASK_FLOW_EVENT && inflow.startSlice) {
- var nextEvent = inflow.startSlice.mostTopLevelSlice;
- if (!visited.contains(nextEvent)) {
- visited.push(nextEvent);
- pendingEventQueue.push(nextEvent);
- }
- }
- }, this);
- }
- },
-
- sortRasterizerSlices: function(rasterWorkerThreads,
- sortedRasterizerSlices) {
- rasterWorkerThreads.forEach(function(rasterizer) {
- Array.prototype.push.apply(sortedRasterizerSlices,
- rasterizer.sliceGroup.slices);
- }, this);
-
- sortedRasterizerSlices.sort(function(a, b) {
- if (a.start !== b.start)
- return a.start - b.start;
- return a.guid - b.guid;
- });
- },
-
- // Find rasterization slices that have the source_prepare_tiles_id
- // same as the prepare_tiles_id of TileManager::PrepareTiles
- // The C++ CL that makes this connection is at:
- // https://codereview.chromium.org/1208683002/
- addRasterizationEvents: function(prepareTiles, rendererHelper,
- visited, flowEvents, sortedRasterizerSlices) {
- if (!prepareTiles.args.prepare_tiles_id)
- return;
-
- if (!rendererHelper || !rendererHelper.rasterWorkerThreads)
- return;
-
- var rasterWorkerThreads = rendererHelper.rasterWorkerThreads;
- var prepareTileId = prepareTiles.args.prepare_tiles_id;
- var pendingEventQueue = [];
-
- // Collect all the rasterizer tasks. Return the cached copy if possible.
- if (sortedRasterizerSlices.length === 0)
- this.sortRasterizerSlices(rasterWorkerThreads, sortedRasterizerSlices);
-
- // TODO(yuhao): Once TaskSetFinishedTaskImpl also get the prepareTileId
- // we can simply track by checking id rather than counting.
- var numFinishedTasks = 0;
- var RASTER_TASK_TITLE = 'RasterizerTaskImpl::RunOnWorkerThread';
- var IMAGEDECODE_TASK_TITLE = 'ImageDecodeTaskImpl::RunOnWorkerThread';
- var FINISHED_TASK_TITLE = 'TaskSetFinishedTaskImpl::RunOnWorkerThread';
-
- for (var i = 0; i < sortedRasterizerSlices.length; i++) {
- var task = sortedRasterizerSlices[i];
-
- if (task.title === RASTER_TASK_TITLE ||
- task.title === IMAGEDECODE_TASK_TITLE) {
- if (task.args.source_prepare_tiles_id === prepareTileId)
- this.addEntireSliceHierarchy(task.mostTopLevelSlice);
- } else if (task.title === FINISHED_TASK_TITLE) {
- if (task.start > prepareTiles.start) {
- pendingEventQueue.push(task.mostTopLevelSlice);
- if (++numFinishedTasks === 3)
- break;
- }
- }
- }
-
- // Trace PostTask from rasterizer tasks.
- while (pendingEventQueue.length !== 0) {
- var event = pendingEventQueue.pop();
-
- this.addEntireSliceHierarchy(event);
- this.followSubsequentSlices(event, pendingEventQueue, visited,
- flowEvents);
- }
- },
-
- addOtherCausallyRelatedEvents: function(rendererHelper, sourceSlices,
- flowEvents, sortedRasterizerSlices) {
- var pendingEventQueue = [];
- // Keep track of visited nodes when traversing a DAG
- var visitedEvents = new EventSet();
- var beginImplFrame = undefined;
- var prepareTiles = undefined;
- var sortedRasterizerSlices = [];
-
- sourceSlices.forEach(function(sourceSlice) {
- if (!visitedEvents.contains(sourceSlice)) {
- visitedEvents.push(sourceSlice);
- pendingEventQueue.push(sourceSlice);
- }
- }, this);
-
- while (pendingEventQueue.length !== 0) {
- var event = pendingEventQueue.pop();
-
- // Push the current event chunk into associatedEvents.
- this.addEntireSliceHierarchy(event);
-
- this.followCurrentSlice(event, pendingEventQueue, visitedEvents);
-
- this.followSubsequentSlices(event, pendingEventQueue, visitedEvents,
- flowEvents);
-
- // The rasterization work (CompositorTileWorker thread) and the
- // Compositor tile manager are connect by the prepare_tiles_id
- // instead of flow events.
- var COMPOSITOR_PREPARE_TILES = 'TileManager::PrepareTiles';
- prepareTiles = event.findDescendentSlice(COMPOSITOR_PREPARE_TILES);
- if (prepareTiles)
- this.addRasterizationEvents(prepareTiles, rendererHelper,
- visitedEvents, flowEvents, sortedRasterizerSlices);
-
- // OnBeginImplFrameDeadline could be triggered by other inputs.
- // For now, we backtrace from it.
- // TODO(yuhao): There are more such slices that we need to backtrace
- var COMPOSITOR_ON_BIFD = 'Scheduler::OnBeginImplFrameDeadline';
- beginImplFrame = event.findDescendentSlice(COMPOSITOR_ON_BIFD);
- if (beginImplFrame)
- this.backtraceFromDraw(beginImplFrame, visitedEvents);
- }
-
- // A separate pass on GestureScrollUpdate.
- // Scroll update doesn't go through the main thread, but the compositor
- // may go back to the main thread if there is an onscroll event handler.
- // This is captured by a different flow event, which does not have the
- // same ID as the Input Latency Event, but it is technically causally
- // related to the GestureScrollUpdate input. Add them manually for now.
- var INPUT_GSU = 'InputLatency::GestureScrollUpdate';
- if (this.title === INPUT_GSU)
- this.addScrollUpdateEvents(rendererHelper);
- },
-
- get associatedEvents() {
- if (this.associatedEvents_.length !== 0)
- return this.associatedEvents_;
-
- var modelIndices = this.startThread.parent.model.modelIndices;
- var flowEvents = modelIndices.getFlowEventsWithId(this.id);
-
- if (flowEvents.length === 0)
- return this.associatedEvents_;
-
- // Step 1: Get events that are directly connected by the LatencyInfo
- // flow events. This gives us a small set of events that are guaranteed
- // to be associated with the input, but are almost certain incomplete.
- // We call this set "source" event set.
- // This step returns the "source" event set (sourceSlices), which is then
- // used in the second step.
- var sourceSlices = this.addDirectlyAssociatedEvents(flowEvents);
-
- // Step 2: Start from the previously constructed "source" event set, we
- // follow the toplevel (i.e., PostTask) and IPC flow events. Any slices
- // that are reachable from the "source" event set via PostTasks or IPCs
- // are conservatively considered associated with the input event.
- // We then deal with specific cases where flow events either over include
- // or miss capturing slices.
- var rendererHelper = this.getRendererHelper(sourceSlices);
- this.addOtherCausallyRelatedEvents(rendererHelper, sourceSlices,
- flowEvents);
-
- return this.associatedEvents_;
- },
-
- get inputLatency() {
- if (!('data' in this.args))
- return undefined;
-
- var data = this.args.data;
- if (!(END_COMP_NAME in data))
- return undefined;
-
- var latency = 0;
- var endTime = data[END_COMP_NAME].time;
- if (ORIGINAL_COMP_NAME in data) {
- latency = endTime - data[ORIGINAL_COMP_NAME].time;
- } else if (UI_COMP_NAME in data) {
- latency = endTime - data[UI_COMP_NAME].time;
- } else if (BEGIN_COMP_NAME in data) {
- latency = endTime - data[BEGIN_COMP_NAME].time;
- } else {
- throw new Error('No valid begin latency component');
- }
- return latency;
- }
- };
-
- var eventTypeNames = [
- 'Char',
- 'ContextMenu',
- 'GestureClick',
- 'GestureFlingCancel',
- 'GestureFlingStart',
- 'GestureScrollBegin',
- 'GestureScrollEnd',
- 'GestureScrollUpdate',
- 'GestureShowPress',
- 'GestureTap',
- 'GestureTapCancel',
- 'GestureTapDown',
- 'GesturePinchBegin',
- 'GesturePinchEnd',
- 'GesturePinchUpdate',
- 'KeyDown',
- 'KeyUp',
- 'MouseDown',
- 'MouseEnter',
- 'MouseLeave',
- 'MouseMove',
- 'MouseUp',
- 'MouseWheel',
- 'RawKeyDown',
- 'ScrollUpdate',
- 'TouchCancel',
- 'TouchEnd',
- 'TouchMove',
- 'TouchStart'
- ];
- var allTypeNames = ['InputLatency'];
- eventTypeNames.forEach(function(eventTypeName) {
- // Old style.
- allTypeNames.push('InputLatency:' + eventTypeName);
-
- // New style.
- allTypeNames.push('InputLatency::' + eventTypeName);
- });
-
- AsyncSlice.subTypes.register(
- InputLatencyAsyncSlice,
- {
- typeNames: allTypeNames,
- categoryParts: ['latencyInfo']
- });
-
- return {
- InputLatencyAsyncSlice: InputLatencyAsyncSlice,
- INPUT_EVENT_TYPE_NAMES: INPUT_EVENT_TYPE_NAMES
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice_test.html
deleted file mode 100644
index 7de9a060e0f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/input_latency_async_slice_test.html
+++ /dev/null
@@ -1,689 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/model_indices.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newAsyncSliceEx = tr.c.TestUtils.newAsyncSliceEx;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newFlowEventEx = tr.c.TestUtils.newFlowEventEx;
- var newModel = tr.c.TestUtils.newModel;
- var EventSet = tr.model.EventSet;
-
- test('matchByType_oldStyle', function() {
- var sOuter = newAsyncSliceEx({
- title: 'InputLatency',
- cat: 'benchmark',
- start: 0,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- args: {
- data: {
- INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT: {'time' : 0},
- INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT: {time: 10}
- }
- }
- });
- assert.throws(function() {
- sOuter.typeName;
- });
-
- var sInner = newAsyncSliceEx({
- title: 'InputLatency:GestureScrollUpdate',
- cat: 'benchmark',
- start: 2,
- end: 10,
- id: '0x100',
- args: {
- 'step': 'GestureScrollUpdate'
- }
- });
- sOuter.subSlices.push(sInner);
- assert.isTrue(sOuter instanceof tr.e.cc.InputLatencyAsyncSlice);
- assert.isTrue(sInner instanceof tr.e.cc.InputLatencyAsyncSlice);
- assert.equal(sOuter.inputLatency, 10);
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.SCROLL_UPDATE, sInner.typeName);
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.SCROLL_UPDATE, sOuter.typeName);
- });
-
- test('matchByType_newStyle', function() {
- var sInfo = newAsyncSliceEx({
- title: 'InputLatency::GestureScrollUpdate',
- cat: 'benchmark',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- args: {
- data: {
- INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT: {'time' : 0},
- INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT: {time: 10}
- }
- }
- });
-
- assert.isTrue(sInfo instanceof tr.e.cc.InputLatencyAsyncSlice);
- assert.equal(sInfo.inputLatency, 10);
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.SCROLL_UPDATE, sInfo.typeName);
- });
-
- test('unknownType', function() {
- var sInfo = newAsyncSliceEx({
- title: 'InputLatency::BadTypeName',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- args: {
- data: {
- INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT: {'time' : 0},
- INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT: {'time' : 0},
- INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT: {time: 10}
- }
- }
- });
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.UNKNOWN, sInfo.typeName);
- });
-
- test('getAssociatedEventsBypassRendererMain', function() {
- var m = newModel(function(m) {
-
- var pb = m.getOrCreateProcess(1);
- var pr = m.getOrCreateProcess(2);
- var mainBrowserThread = pb.getOrCreateThread(10);
- var mainRendererThread = pr.getOrCreateThread(20);
- var compositorThread = pr.getOrCreateThread(21);
-
- mainBrowserThread.name = 'CrBrowserMain';
- mainRendererThread.name = 'CrRendererMain';
- compositorThread.name = 'Compositor';
-
- // Expectation: None of s2 and s3 should be included
- // CrBrowserMain: [s0] [s1]
- // | /|\
- // CrRendererMain: | [s2] [s3] |
- // \|/ |
- // Compositor: [s4]-------------|
-
- m.s0 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's0', start: 0.0, duration: 1.0 }));
- m.s1 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's1', start: 6.0, duration: 1.0 }));
- m.s2 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's2', start: 2.0, duration: 1.0 }));
- m.s3 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's3', start: 4.0, duration: 1.0 }));
- m.s4 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's4', start: 0.5, duration: 1.0 }));
-
- m.f1 = newFlowEventEx({
- title: 'test1',
- start: 0,
- end: 10,
- startSlice: m.s0,
- endSlice: m.s4,
- id: '0x100'
- });
-
- m.f2 = newFlowEventEx({
- title: 'test2',
- start: 20,
- end: 30,
- startSlice: m.s4,
- endSlice: m.s1,
- id: '0x100'
- });
-
- m.flowEvents.push(m.f1);
- m.flowEvents.push(m.f2);
-
- m.as0 = newAsyncSliceEx({
- title: 'test1',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x101',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- m.as1 = newAsyncSliceEx({
- title: 'test2',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- startThread: compositorThread
- });
-
- });
-
- assert.isTrue(m.as0.associatedEvents.length === 0);
- assert.isTrue(m.as1.associatedEvents.equals(
- new EventSet([m.f1, m.s0, m.f2, m.s4, m.s1])));
- });
-
- test('getAssociatedEventsBypassRendererMainWithOnScroll', function() {
- var m = newModel(function(m) {
-
- var pb = m.getOrCreateProcess(1);
- var pr = m.getOrCreateProcess(2);
- var mainBrowserThread = pb.getOrCreateThread(10);
- var mainRendererThread = pr.getOrCreateThread(20);
- var compositorThread = pr.getOrCreateThread(21);
-
- mainBrowserThread.name = 'CrBrowserMain';
- mainRendererThread.name = 'CrRendererMain';
- compositorThread.name = 'Compositor';
-
- // Expectation: s2 should be included but not s3
- // GestureScrollUpdate: [ as1 ]
- // CrBrowserMain: [s0] [s1]
- // | /|\
- // CrRendererMain: | [s2] [s3] |
- // \|/ /|\ |
- // Compositor: [s4]___|__________|
- // ScrollUpdate: [ as2 ]
-
- m.s0 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's0', start: 0.0, duration: 1.0 }));
- m.s1 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's1', start: 6.0, duration: 1.0 }));
- m.s2 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's2', start: 2.0, duration: 1.0 }));
- m.s3 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's3', start: 4.0, duration: 1.0 }));
- m.s4 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's4', start: 0.5, duration: 1.0 }));
-
- m.f1 = newFlowEventEx({
- title: 'f1',
- start: 0,
- end: 10,
- startSlice: m.s0,
- endSlice: m.s4,
- id: '0x100'
- });
-
- m.f2 = newFlowEventEx({
- title: 'f2',
- start: 20,
- end: 30,
- startSlice: m.s4,
- endSlice: m.s1,
- id: '0x100'
- });
-
- m.f3 = newFlowEventEx({
- title: 'f3',
- start: 20,
- end: 30,
- startSlice: m.s4,
- endSlice: m.s2,
- id: '0x800'
- });
-
- m.flowEvents.push(m.f1);
- m.flowEvents.push(m.f2);
- m.flowEvents.push(m.f3);
-
- m.as0 = mainBrowserThread.asyncSliceGroup.push(newAsyncSliceEx({
- title: 'InputLatency::GestureScrollUpdate',
- cat: 'benchmark,latencyInfo',
- args: {
- data: {
- INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT: 100
- }
- },
- start: 2,
- end: 10,
- id: '0x101',
- isTopLevel: true,
- startThread: mainBrowserThread
- }));
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.SCROLL_UPDATE,
- m.as0.typeName);
-
- m.as1 = mainBrowserThread.asyncSliceGroup.push(newAsyncSliceEx({
- title: 'InputLatency::GestureScrollUpdate',
- cat: 'benchmark,latencyInfo',
- args: {
- data: {}
- },
- start: 0,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- startThread: mainBrowserThread
- }));
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.SCROLL_UPDATE,
- m.as1.typeName);
-
- m.as2 = compositorThread.asyncSliceGroup.push(newAsyncSliceEx({
- title: 'Latency::ScrollUpdate',
- cat: 'benchmark,latencyInfo',
- args: {
- data: {
- INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT: 100
- }
- },
- start: 1.5,
- end: 8,
- id: '0x800',
- isTopLevel: true,
- startThread: compositorThread
- }));
- assert.equal(tr.e.cc.INPUT_EVENT_TYPE_NAMES.LATENCY_SCROLL_UPDATE,
- m.as2.typeName);
- });
-
- assert.isTrue(m.as0.associatedEvents.length === 0);
- assert.isTrue(m.as1.associatedEvents.equals(
- new EventSet([m.f1, m.s0, m.f2, m.s4, m.s1, m.f3, m.s2])));
- });
-
- test('getAssociatedEventsWithoutCommit', function() {
- var m = newModel(function(m) {
-
- var pb = m.getOrCreateProcess(1);
- var pr = m.getOrCreateProcess(2);
- var mainBrowserThread = pb.getOrCreateThread(10);
- var mainRendererThread = pr.getOrCreateThread(20);
- var compositorThread = pr.getOrCreateThread(21);
-
- mainBrowserThread.name = 'CrBrowserMain';
- mainRendererThread.name = 'CrRendererMain';
- compositorThread.name = 'Compositor';
-
- // Expectation: none of s3 and s5 should be included
- // CrBrowserMain: [s0] [s1]
- // | /|\
- // | __________|
- // | |
- // CrRendererMain: | [s2] [s3] [s5]
- // \|/ /|\
- // Compositor: [s4]___|
-
- m.s0 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's0', start: 0.0, duration: 1.0 }));
- m.s1 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's1', start: 6.0, duration: 1.0 }));
- m.s2 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's2', start: 2.0, duration: 1.0 }));
- m.s3 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's3', start: 4.0, duration: 1.0 }));
- m.s4 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's4', start: 0.5, duration: 1.0 }));
- m.s5 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's5', start: 100.0, duration: 1.0 }));
-
- m.f1 = newFlowEventEx({
- title: 'f1',
- start: 0,
- end: 10,
- startSlice: m.s0,
- endSlice: m.s4,
- id: '0x100'
- });
-
- m.f2 = newFlowEventEx({
- title: 'f2',
- start: 20,
- end: 30,
- startSlice: m.s4,
- endSlice: m.s2,
- id: '0x100'
- });
-
- m.f3 = newFlowEventEx({
- title: 'f3',
- start: 20,
- end: 30,
- startSlice: m.s2,
- endSlice: m.s1,
- id: '0x100'
- });
-
- m.flowEvents.push(m.f1);
- m.flowEvents.push(m.f2);
- m.flowEvents.push(m.f3);
-
- m.as0 = newAsyncSliceEx({
- title: 'test1',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x101',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- m.as1 = newAsyncSliceEx({
- title: 'test2',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- });
-
- assert.isTrue(m.as0.associatedEvents.length === 0);
- assert.isTrue(m.as1.associatedEvents.equals(
- new EventSet([m.f1, m.s0, m.f2, m.s4, m.f3, m.s2, m.s1])));
- });
-
- test('getAssociatedEventsWillCommit', function() {
- var m = newModel(function(m) {
-
- var pb = m.getOrCreateProcess(1);
- var pr = m.getOrCreateProcess(2);
- var mainBrowserThread = pb.getOrCreateThread(10);
- var mainRendererThread = pr.getOrCreateThread(20);
- var compositorThread = pr.getOrCreateThread(21);
-
- mainBrowserThread.name = 'CrBrowserMain';
- mainRendererThread.name = 'CrRendererMain';
- compositorThread.name = 'Compositor';
-
- // Expectation: s3 should be included by getOtherCasuallyRelatedEvents,
- // because there is a PostTask s7 -> s3, but s6 shouldn't be included.
- // CrBrowserMain: [s0] [ s1 ]
- // | /|\
- // | |
- // | [ s2 ]____ |
- // CrRendererMain: | /|\ [s7] | | [s6]
- // | | | | |
- // | | | | |
- // \|/ | \|/ \|/ |
- // Compositor: [s4]__| [s3] [s5]__|
-
- m.s0 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's0', start: 0.0, duration: 1.0 }));
- m.s1 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's1', start: 6.0, duration: 1.0 }));
- m.s2 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's2', start: 2.0, duration: 1.0 }));
- m.s3 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's3', start: 4.0, duration: 1.0 }));
- m.s4 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's4', start: 0.5, duration: 1.0 }));
- m.s5 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's5', start: 5.5, duration: 1.0 }));
- m.s6 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's6', start: 1000.0, duration: 1.0 }));
- m.s7 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's7', start: 2.5, duration: 0.2 }));
-
- mainBrowserThread.sliceGroup.createSubSlices();
- mainRendererThread.sliceGroup.createSubSlices();
- compositorThread.sliceGroup.createSubSlices();
-
- m.f1 = newFlowEventEx({
- title: 'f1',
- start: 0,
- end: 10,
- startSlice: m.s0,
- endSlice: m.s4,
- id: '0x100'
- });
-
- m.f2 = newFlowEventEx({
- title: 'f2',
- start: 20,
- end: 30,
- startSlice: m.s4,
- endSlice: m.s2,
- id: '0x100'
- });
-
- m.f3 = newFlowEventEx({
- title: 'f3',
- start: 20,
- end: 30,
- startSlice: m.s2,
- endSlice: m.s5,
- id: '0x100'
- });
-
- m.f4 = newFlowEventEx({
- title: 'f4',
- start: 20,
- end: 30,
- startSlice: m.s5,
- endSlice: m.s1,
- id: '0x100'
- });
-
- m.f5 = newFlowEventEx({
- title: 'f5',
- cat: 'disabled-by-default-toplevel.flow',
- start: 20,
- end: 30,
- startSlice: m.s7,
- endSlice: m.s3,
- id: '0xAAA'
- });
-
- m.flowEvents.push(m.f1);
- m.flowEvents.push(m.f2);
- m.flowEvents.push(m.f3);
- m.flowEvents.push(m.f4);
- m.flowEvents.push(m.f5);
-
- m.as0 = newAsyncSliceEx({
- title: 'test1',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x101',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- m.as1 = newAsyncSliceEx({
- title: 'test2',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- });
-
- assert.isTrue(m.as0.associatedEvents.length === 0);
- assert.isTrue(m.as1.associatedEvents.equals(new EventSet(
- [m.f1, m.f2, m.f3, m.f4, m.f5,
- m.s0, m.s1, m.s2, m.s3, m.s4, m.s5, m.s7])));
- });
-
- test('getAssociatedEventsExcludeOtherInputs', function() {
- var m = newModel(function(m) {
-
- var pb = m.getOrCreateProcess(1);
- var pr = m.getOrCreateProcess(2);
- var mainBrowserThread = pb.getOrCreateThread(10);
- var mainRendererThread = pr.getOrCreateThread(20);
- var compositorThread = pr.getOrCreateThread(21);
-
- mainBrowserThread.name = 'CrBrowserMain';
- mainRendererThread.name = 'CrRendererMain';
- compositorThread.name = 'Compositor';
-
- // Expectation: s3 should be included by getOtherCasuallyRelatedEvents,
- // because there is a PostTask s7 -> s3. Even though there is also a
- // PostTask from s9 to s6, s6 shouldn't be included because it's tracked
- // by LatencyInfo of another input.
- // CrBrowserMain: [s0] [ s1 ] [s8]
- // | /|\ |
- // | | |
- // | [ s2 ]____ | \|/
- // CrRendererMain: | /|\ [s7] | | [s6]
- // | | | | | /|\
- // | | | | | |
- // \|/ | \|/ \|/ | |
- // Compositor: [s4]__| [s3] [ s5 ]_| |
- // [s9]_________|
-
- m.s0 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's0', start: 0.0, duration: 1.0 }));
- m.s1 = mainBrowserThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's1', start: 6.0, duration: 1.0 }));
- m.s2 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's2', start: 2.0, duration: 1.0 }));
- m.s3 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's3', start: 4.0, duration: 1.0 }));
- m.s4 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's4', start: 0.5, duration: 1.0 }));
- m.s5 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's5', start: 5.5, duration: 1.0 }));
- m.s6 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's6', start: 10.0, duration: 1.0 }));
- m.s7 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's7', start: 2.5, duration: 0.2 }));
- m.s8 = mainRendererThread.sliceGroup.pushSlice(newSliceEx(
- { title: 's8', start: 9.5, duration: 1.0 }));
- m.s9 = compositorThread.sliceGroup.pushSlice(newSliceEx(
- { title: 'Scheduler::ScheduleBeginImplFrameDeadline',
- start: 5.7, duration: 0.2 }));
-
- mainBrowserThread.sliceGroup.createSubSlices();
- mainRendererThread.sliceGroup.createSubSlices();
- compositorThread.sliceGroup.createSubSlices();
-
- m.f1 = newFlowEventEx({
- title: 'f1',
- cat: 'input',
- start: 0,
- end: 10,
- startSlice: m.s0,
- endSlice: m.s4,
- id: '0x100'
- });
-
- m.f2 = newFlowEventEx({
- title: 'f2',
- cat: 'input',
- start: 20,
- end: 30,
- startSlice: m.s4,
- endSlice: m.s2,
- id: '0x100'
- });
-
- m.f3 = newFlowEventEx({
- title: 'f3',
- cat: 'input',
- start: 20,
- end: 30,
- startSlice: m.s2,
- endSlice: m.s5,
- id: '0x100'
- });
-
- m.f4 = newFlowEventEx({
- title: 'f4',
- cat: 'input',
- start: 20,
- end: 30,
- startSlice: m.s5,
- endSlice: m.s1,
- id: '0x100'
- });
-
- m.f5 = newFlowEventEx({
- title: 'f5',
- cat: 'disabled-by-default-toplevel.flow',
- start: 20,
- end: 30,
- startSlice: m.s7,
- endSlice: m.s3,
- id: '0xAAA'
- });
-
- m.f6 = newFlowEventEx({
- title: 'f6',
- cat: 'disabled-by-default-toplevel.flow',
- start: 20,
- end: 30,
- startSlice: m.s9,
- endSlice: m.s6,
- id: '0xAAB'
- });
-
- m.f7 = newFlowEventEx({
- title: 'f7',
- cat: 'input',
- start: 20,
- end: 30,
- startSlice: m.s8,
- endSlice: m.s6,
- id: '0x102'
- });
-
- m.flowEvents.push(m.f1);
- m.flowEvents.push(m.f2);
- m.flowEvents.push(m.f3);
- m.flowEvents.push(m.f4);
- m.flowEvents.push(m.f5);
- m.flowEvents.push(m.f6);
- m.flowEvents.push(m.f7);
-
- m.as0 = newAsyncSliceEx({
- title: 'test1',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x101',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- m.as1 = newAsyncSliceEx({
- title: 'test2',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- m.as2 = newAsyncSliceEx({
- title: 'test2',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x102',
- isTopLevel: true,
- startThread: mainBrowserThread
- });
-
- });
-
- assert.isTrue(m.as0.associatedEvents.length === 0);
- assert.isTrue(m.as1.associatedEvents.equals(new EventSet(
- [m.f1, m.f2, m.f3, m.f4, m.f5,
- m.s0, m.s1, m.s2, m.s3, m.s4, m.s5, m.s7, m.s9])));
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_impl.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_impl.html
deleted file mode 100644
index 9f711166a7c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_impl.html
+++ /dev/null
@@ -1,208 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/extras/chrome/cc/constants.html">
-<link rel="import" href="/tracing/extras/chrome/cc/region.html">
-<link rel="import" href="/tracing/extras/chrome/cc/tile_coverage_rect.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var constants = tr.e.cc.constants;
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * @constructor
- */
- function LayerImplSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- LayerImplSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- tr.e.cc.preInitializeObject(this);
-
- this.layerTreeImpl_ = undefined;
- this.parentLayer = undefined;
- },
-
- initialize: function() {
- // Defaults.
- this.invalidation = new tr.e.cc.Region();
- this.annotatedInvalidation = new tr.e.cc.Region();
- this.unrecordedRegion = new tr.e.cc.Region();
- this.pictures = [];
-
- // Import & validate this.args
- tr.e.cc.moveRequiredFieldsFromArgsToToplevel(
- this, ['layerId', 'layerQuad']);
- tr.e.cc.moveOptionalFieldsFromArgsToToplevel(
- this, ['children', 'maskLayer', 'replicaLayer',
- 'idealContentsScale', 'geometryContentsScale',
- 'layoutRects', 'usingGpuRasterization']);
-
- // Leave gpu memory usage in both places.
- this.gpuMemoryUsageInBytes = this.args.gpuMemoryUsage;
-
- // Leave bounds in both places.
- this.bounds = tr.b.Rect.fromXYWH(
- 0, 0,
- this.args.bounds.width, this.args.bounds.height);
-
- if (this.args.animationBounds) {
- // AnimationBounds[2] and [5] are the Z-component of the box.
- this.animationBoundsRect = tr.b.Rect.fromXYWH(
- this.args.animationBounds[0], this.args.animationBounds[1],
- this.args.animationBounds[3], this.args.animationBounds[4]);
- }
-
- // After Slimming Paint v2, compositor no longer knows hierarchy
- // information. If the children value is undefined, the tracing
- // data comes from the new version of cc, otherwise we set the
- // parentLayer as we did before SPv2.
- if (this.children) {
- for (var i = 0; i < this.children.length; i++)
- this.children[i].parentLayer = this;
- }
- if (this.maskLayer)
- this.maskLayer.parentLayer = this;
- if (this.replicaLayer)
- this.replicaLayer.parentLayer = this;
- if (!this.geometryContentsScale)
- this.geometryContentsScale = 1.0;
- if (!this.idealContentsScale)
- this.idealContentsScale = 1.0;
-
- this.touchEventHandlerRegion = tr.e.cc.Region.fromArrayOrUndefined(
- this.args.touchEventHandlerRegion);
- this.wheelEventHandlerRegion = tr.e.cc.Region.fromArrayOrUndefined(
- this.args.wheelEventHandlerRegion);
- this.nonFastScrollableRegion = tr.e.cc.Region.fromArrayOrUndefined(
- this.args.nonFastScrollableRegion);
- },
-
- get layerTreeImpl() {
- if (this.layerTreeImpl_)
- return this.layerTreeImpl_;
- if (this.parentLayer)
- return this.parentLayer.layerTreeImpl;
- return undefined;
- },
- set layerTreeImpl(layerTreeImpl) {
- this.layerTreeImpl_ = layerTreeImpl;
- },
-
- get activeLayer() {
- if (this.layerTreeImpl.whichTree === constants.ACTIVE_TREE)
- return this;
- var activeTree = this.layerTreeImpl.layerTreeHostImpl.activeTree;
- return activeTree.findLayerWithId(this.layerId);
- },
-
- get pendingLayer() {
- if (this.layerTreeImpl.whichTree === constants.PENDING_TREE)
- return this;
- var pendingTree = this.layerTreeImpl.layerTreeHostImpl.pendingTree;
- return pendingTree.findLayerWithId(this.layerId);
- }
- };
-
- /**
- * @constructor
- */
- function PictureLayerImplSnapshot() {
- LayerImplSnapshot.apply(this, arguments);
- }
-
- PictureLayerImplSnapshot.prototype = {
- __proto__: LayerImplSnapshot.prototype,
-
- initialize: function() {
- LayerImplSnapshot.prototype.initialize.call(this);
-
- if (this.args.invalidation) {
- this.invalidation = tr.e.cc.Region.fromArray(this.args.invalidation);
- delete this.args.invalidation;
- }
- if (this.args.annotatedInvalidationRects) {
- this.annotatedInvalidation = new tr.e.cc.Region();
- for (var i = 0; i < this.args.annotatedInvalidationRects.length; ++i) {
- var annotatedRect = this.args.annotatedInvalidationRects[i];
- var rect = annotatedRect.geometryRect;
- rect.reason = annotatedRect.reason;
- this.annotatedInvalidation.addRect(rect);
- }
- delete this.args.annotatedInvalidationRects;
- }
- if (this.args.unrecordedRegion) {
- this.unrecordedRegion = tr.e.cc.Region.fromArray(
- this.args.unrecordedRegion);
- delete this.args.unrecordedRegion;
- }
- if (this.args.pictures) {
- this.pictures = this.args.pictures;
-
- // The picture list comes in with an unknown ordering. We resort based
- // on timestamp order so we will draw the base picture first and the
- // various fixes on top of that.
- this.pictures.sort(function(a, b) { return a.ts - b.ts; });
- }
-
- this.tileCoverageRects = [];
- if (this.args.coverageTiles) {
- for (var i = 0; i < this.args.coverageTiles.length; ++i) {
- var rect = this.args.coverageTiles[i].geometryRect.scale(
- this.idealContentsScale);
- var tile = this.args.coverageTiles[i].tile;
- this.tileCoverageRects.push(new tr.e.cc.TileCoverageRect(rect, tile));
- }
- delete this.args.coverageTiles;
- }
- }
- };
-
- ObjectSnapshot.subTypes.register(
- PictureLayerImplSnapshot,
- {
- typeName: 'cc::PictureLayerImpl'
- });
-
- ObjectSnapshot.subTypes.register(
- LayerImplSnapshot,
- {
- typeNames: [
- 'cc::LayerImpl',
- 'cc::DelegatedRendererLayerImpl',
- 'cc::HeadsUpDisplayLayerImpl',
- 'cc::IOSurfaceLayerImpl',
- 'cc::NinePatchLayerImpl',
- 'cc::PictureImageLayerImpl',
- 'cc::ScrollbarLayerImpl',
- 'cc::SolidColorLayerImpl',
- 'cc::SolidColorScrollbarLayerImpl',
- 'cc::SurfaceLayerImpl',
- 'cc::TextureLayerImpl',
- 'cc::TiledLayerImpl',
- 'cc::VideoLayerImpl',
- 'cc::PaintedScrollbarLayerImpl',
- 'ClankPatchLayer',
- 'TabBorderLayer',
- 'CounterLayer'
- ]
- });
-
- return {
- LayerImplSnapshot: LayerImplSnapshot,
- PictureLayerImplSnapshot: PictureLayerImplSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl.html
deleted file mode 100644
index 3df73b5d39b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/bbox2.html">
-<link rel="import" href="/tracing/extras/chrome/cc/constants.html">
-<link rel="import" href="/tracing/extras/chrome/cc/layer_tree_impl.html">
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the LayerTreeHostImpl model-level objects.
- */
-tr.exportTo('tr.e.cc', function() {
- var constants = tr.e.cc.constants;
-
- var ObjectSnapshot = tr.model.ObjectSnapshot;
- var ObjectInstance = tr.model.ObjectInstance;
-
- /**
- * @constructor
- */
- function LayerTreeHostImplSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- LayerTreeHostImplSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- tr.e.cc.preInitializeObject(this);
- },
-
- initialize: function() {
- tr.e.cc.moveRequiredFieldsFromArgsToToplevel(
- this, ['deviceViewportSize',
- 'activeTree']);
- tr.e.cc.moveOptionalFieldsFromArgsToToplevel(
- this, ['pendingTree']);
-
- // Move active_tiles into this.tiles. If that doesn't exist then, then as
- // a backward compatability move tiles into this.tiles.
- if (this.args.activeTiles !== undefined) {
- this.activeTiles = this.args.activeTiles;
- delete this.args.activeTiles;
- } else if (this.args.tiles !== undefined) {
- this.activeTiles = this.args.tiles;
- delete this.args.tiles;
- }
-
- if (!this.activeTiles)
- this.activeTiles = [];
-
- this.activeTree.layerTreeHostImpl = this;
- this.activeTree.whichTree = constants.ACTIVE_TREE;
- if (this.pendingTree) {
- this.pendingTree.layerTreeHostImpl = this;
- this.pendingTree.whichTree = constants.PENDING_TREE;
- }
- },
-
- /**
- * Get all of tile scales and their associated names.
- */
- getContentsScaleNames: function() {
- var scales = {};
- for (var i = 0; i < this.activeTiles.length; ++i) {
- var tile = this.activeTiles[i];
- // Return scale -> scale name mappings.
- // Example:
- // 0.25 -> LOW_RESOLUTION
- // 1.0 -> HIGH_RESOLUTION
- // 0.75 -> NON_IDEAL_RESOLUTION
- scales[tile.contentsScale] = tile.resolution;
- }
- return scales;
- },
-
- getTree: function(whichTree) {
- if (whichTree === constants.ACTIVE_TREE)
- return this.activeTree;
- if (whichTree === constants.PENDING_TREE)
- return this.pendingTree;
- throw new Exception('Unknown tree type + ' + whichTree);
- },
-
- get tilesHaveGpuMemoryUsageInfo() {
- if (this.tilesHaveGpuMemoryUsageInfo_ !== undefined)
- return this.tilesHaveGpuMemoryUsageInfo_;
-
- for (var i = 0; i < this.activeTiles.length; i++) {
- if (this.activeTiles[i].gpuMemoryUsageInBytes === undefined)
- continue;
- this.tilesHaveGpuMemoryUsageInfo_ = true;
- return true;
- }
- this.tilesHaveGpuMemoryUsageInfo_ = false;
- return false;
- },
-
- get gpuMemoryUsageInBytes() {
- if (!this.tilesHaveGpuMemoryUsageInfo)
- return;
-
- var usage = 0;
- for (var i = 0; i < this.activeTiles.length; i++) {
- var u = this.activeTiles[i].gpuMemoryUsageInBytes;
- if (u !== undefined)
- usage += u;
- }
- return usage;
- },
-
- get userFriendlyName() {
- var frameNumber;
- if (!this.activeTree) {
- frameNumber = this.objectInstance.snapshots.indexOf(this);
- } else {
- if (this.activeTree.sourceFrameNumber === undefined)
- frameNumber = this.objectInstance.snapshots.indexOf(this);
- else
- frameNumber = this.activeTree.sourceFrameNumber;
- }
- return 'cc::LayerTreeHostImpl frame ' + frameNumber;
- }
- };
-
- ObjectSnapshot.subTypes.register(
- LayerTreeHostImplSnapshot,
- {typeName: 'cc::LayerTreeHostImpl'});
-
- /**
- * @constructor
- */
- function LayerTreeHostImplInstance() {
- ObjectInstance.apply(this, arguments);
-
- this.allLayersBBox_ = undefined;
- }
-
- LayerTreeHostImplInstance.prototype = {
- __proto__: ObjectInstance.prototype,
-
- get allContentsScales() {
- if (this.allContentsScales_)
- return this.allContentsScales_;
-
- var scales = {};
- for (var tileID in this.allTileHistories_) {
- var tileHistory = this.allTileHistories_[tileID];
- scales[tileHistory.contentsScale] = true;
- }
- this.allContentsScales_ = tr.b.dictionaryKeys(scales);
- return this.allContentsScales_;
- },
-
- get allLayersBBox() {
- if (this.allLayersBBox_)
- return this.allLayersBBox_;
- var bbox = new tr.b.BBox2();
- function handleTree(tree) {
- tree.renderSurfaceLayerList.forEach(function(layer) {
- bbox.addQuad(layer.layerQuad);
- });
- }
- this.snapshots.forEach(function(lthi) {
- handleTree(lthi.activeTree);
- if (lthi.pendingTree)
- handleTree(lthi.pendingTree);
- });
- this.allLayersBBox_ = bbox;
- return this.allLayersBBox_;
- }
- };
-
- ObjectInstance.subTypes.register(
- LayerTreeHostImplInstance,
- {typeName: 'cc::LayerTreeHostImpl'});
-
- return {
- LayerTreeHostImplSnapshot: LayerTreeHostImplSnapshot,
- LayerTreeHostImplInstance: LayerTreeHostImplInstance
-
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test.html
deleted file mode 100644
index f9a165a8137..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
- var snapshot = instance.snapshots[0];
-
- assert.instanceOf(snapshot, tr.e.cc.LayerTreeHostImplSnapshot);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js
deleted file mode 100644
index 7d5036d7310..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-'use strict';
-
-// A single LTHI sort of manually created from a Google search for cats.
-var g_catLTHIEvents = [
- {
- 'name': 'cc::Picture',
- 'args': {
- 'snapshot': {
- 'params': {
- 'opaque_rect': [
- -15,
- -15,
- 0,
- 0
- ],
- 'layer_rect': [
- -15,
- -15,
- 1260,
- 1697
- ]
- },
- 'skp64': 'c2tpYXBpY3QWAAAAOAQAABQDAAADAAAAAWRhZXKoCQAACAAAHgMAAAAIAAAeAwAAAAwAACMAAHBBAABwQRwAAAMAAHDBAABwwQAghUQAQEFEAQAAAKAJAAAYAAAVAQAAAAAAAAAAAAAAAECDRACAPUQIAAAeAwAAABwAAAMAAAAAAAAAAABAg0QAAMhBAQAAAIwAAAAYAAAVAgAAAAAAAAAAAAAAAECDRAAAyEEEAAAcCAAAHgMAAAAcAAADAAAAAAAAyEEAQINEAADQQQEAAADYAAAADAAAIwAAAAAAAMhBGAAAFQIAAAAAAAAAAAAAAABAg0QAAMhBBAAAHBgAABUDAAAAAAAAAAAAyEEAQINEAADQQQgAAB4DAAAACAAAHgMAAAAMAAAjAABwwQAAcMEUAAAGAAAAAAAAAAAAAIhBAACIQQQAABwEAAAcCAAAHgMAAAAcAAADAACAQAAAAEAAAHxCAADAQQEAAABQAQAABAAAHAgAAB4DAAAAHAAAAwAAgEAAAABAAAB8QgAAwEEBAAAAeAEAAAQAABwIAAAeAwAAABwAAAMAAIBAAAAAQAAAfEIAAMBBAQAAAOABAABAAAAUBAAAAAwAAAA1AEgARgBSAFUARwAGAAAAAKDcPwCG4kEAAJBBAAAgQQDSlkEAONVBAEsHQgCxKUIAm0BCBAAAHAgAAB4DAAAAHAAAAwAAgEAAAABAAAB8QgAAwEEBAAAACAIAAAQAABwkAAAUBQAAAAIAAAADAAAAAQAAAAAAYD0AkM1BAACQQQDwhUIIAAAeAwAAAAgAAB4DAAAADAAAIwAAcMEAAHDBFAAABgAAAAABAAAAAACyQgAAsEEEAAAcBAAAHCQAABQFAAAAAgAAAAMAAAABAAAAAABgPQCQzUEAAJBBAJCxQlgAABQGAAAAFAAAADAAUgBRAEwAVwBSAFUATABRAEoACgAAAAAQE0AA3sVBAACQQQCQvUIAkNVCAJDlQgCQ9UIAkPtCAMgBQwDICUMAyA5DAMgRQwDIGUMkAAAUBQAAAAIAAAADAAAAAQAAAAAAYD0AkM1BAACQQQDII0MIAAAeAwAAAAgAAB4DAAAADAAAIwAAcMEAAHDBFAAABgAAAAACAAAAAAA5QwAAiEEEAAAcBAAAHAgAAB4DAAAAHAAAAwAALEMAAABAAIC/QwAAwEEBAAAAZAMAAAQAABwIAAAeAwAAABwAAAMAACxDAAAAQACAv0MAAMBBAQAAAIwDAAAEAAAcCAAAHgMAAAAcAAADAAAsQwAAAEAAgL9DAADAQQEAAAB0BAAAwAAAFAcAAAA2AAAAJgBEAFMAVwBYAFUASAADADAAUgBRAEwAVwBSAFUATABRAEoAAwA2AFEARABTAFYASwBSAFcAAAAbAAAAAKDcPwCG4kEAAJBBAAAyQ8CvO0MAa0NDwDpMQ0B3UUOAJ1pDAOJfQ8CuZ0PAHGxDwCt4Q6BigEPAuoRDwMCGQwBfiUPAq41DAImQQwCPkkMg55ZDgESbQ4B7nUOgQKFDwJilQ2B2qUNA3q1DwG+xQ+DHtUOgFLpDBAAAHAgAAB4DAAAAHAAAAwAALEMAAABAAIC/QwAAwEEBAAAAnAQAAAQAABwkAAAUBQAAAAIAAAADAAAAAQAAAAAAYD0AkM1BAACQQQCYwUMIAAAeAwAAAAgAAB4DAAAADAAAIwAAcMEAAHDBFAAABgAAAAADAAAAAADrQwAAiEEEAAAcBAAAHAgAAB4DAAAAHAAAAwCA5EMAAABAAAD6QwAAwEEBAAAAIAUAAAQAABwIAAAeAwAAABwAAAMAgORDAAAAQAAA+kMAAMBBAQAAAEgFAAAEAAAcCAAAHgMAAAAcAAADAIDkQwAAAEAAAPpDAADAQQEAAACkBQAANAAAFAcAAAAIAAAANgBEAFkASAAEAAAAAKDcPwCG4kEAAJBBAIDnQyBF60PAIu9DQMLyQwQAABwIAAAeAwAAABwAAAMAgORDAAAAQAAA+kMAAMBBAQAAAMwFAAAEAAAcJAAAFAUAAAACAAAAAwAAAAEAAAAAAGA9AJDNQQAAkEEAwvtDCAAAHgMAAAAIAAAeAwAAAAwAACMAAHDBAABwwRQAAAYAAAAABAAAAABAA0QAAIhBBAAAHAQAABwIAAAeAwAAABwAAAMAAABEAAAAQAAAC0QAAMBBAQAAAFAGAAAEAAAcCAAAHgMAAAAcAAADAAAARAAAAEAAAAtEAADAQQEAAAB4BgAABAAAHAgAAB4DAAAAHAAAAwAAAEQAAABAAAALRAAAwEEBAAAA1AYAADQAABQEAAAACAAAAC8AUgBEAEcABAAAAACg3D8AhuJBAACQQQCAAUTAXQNEIIQFRPByB0QEAAAcCAAAHgMAAAAcAAADAAAARAAAAEAAAAtEAADAQQEAAAD8BgAABAAAHDAAABQGAAAABgAAAEEAQgBBAAAAAwAAAACAmD4A3rVBAACAQQCADEQAQA5EAEAQRBgAABUIAAAAAECARAAAAEAAIINEAADAQQwAAA4JAAAAAQAAACQAABQKAAAAAgAAACIAAAABAAAAAICYPgDetUEAAIBBADCBRBgAABUDAAAAAAAAAAAA+kMAQINEAID6QxgAABULAAAAAICARAAA0EEAQINEAAD6QxgAABUMAAAAAICARAAA0EEAoIBEAAD6QxgAABUNAAAAAAAAAAAA/kMAQINEAIA9RBgAABUIAAAAAMBNRAAAAEAAQHhEAACoQQwAAA4JAAAAAgAAACQAABQOAAAAAgAAAJ0DAAABAAAAAIAmwABQ3kEAAIBBAEB4RCQAABQOAAAAAgAAAJ8DAAABAAAAAIAmwABQ3kEAAIBBAEB8RAgAAB4DAAAAHAAAAwDATUQAAEBAAEB4RAAAsEEBAAAAfAgAABAAAB8AAAAADwAAAB8AAAAEAAAcBAAAHAgAAB4DAAAAHAAAAwAAAAAAgPpDAECDRAAA+0MBAAAA1AgAAAwAACMAAAAAAID6QwwAACMAAACAAACAwBgAABUQAAAAAAAAAAAAAAAAQINEAACgQAQAABwIAAAeAwAAABwAAAMAAAAAAAD7QwBAg0QAgP1DAQAAACAJAAAMAAAjAAAAAAAA+0MYAAAVEAAAAAAAAAAAAAAAAECDRAAAoEAEAAAcCAAAHgMAAAAcAAADAAAAAACA/UMAQINEAAD+QwEAAABsCQAADAAAIwAAAAAAgP1DGAAAFRAAAAAAAAAAAAAAAABAg0QAAKBABAAAHBgAABURAAAAAAAAAACA+kMAQINEAAD7QxgAABUSAAAAAAAAAACA/UMAQINEAAD+QwQAABwEAAAcdGNhZiMAAAACAAAADVNrU3JjWGZlcm1vZGUQU2tMaW5lYXJHcmFkaWVudGNmcHQCAAAAAAENTHVjaWRhIEdyYW5kZQQNTHVjaWRhIEdyYW5kZQYMTHVjaWRhR3JhbmRl/v8AAAABCUhlbHZldGljYQQJSGVsdmV0aWNhBglIZWx2ZXRpY2H+/wAAeWFyYcQIAABwbXRiBQAAAD8AAAAWAAAAAAAAAKkAAACJUE5HDQoaCgAAAA1JSERSAAAAPwAAABYIBgAAAHf8RCEAAABwSURBVFiF7ZSxAcQgDMRk8KQMRQdD0lElxf8MueKsCSSMHXPOB1MSYIyh9vicvfcv/t6rdpGQAOcctYeEphZQkgCteb5Bxffe1R4SEiAi1B4SKt7123teuj/Wk6+dd42vnXedfMVXvCEVv9ZSe0h4ASOjDeti06sSAAAAAElFTkSuQmCCAAAAAAAAAAAAAAAMAAAADQAAAAAAAAAPAQAAiVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAA1klEQVQokZWSMWrDQBBF38hrxW5SGJdSkyqtyRXSB3QRnUUXEWzvK+QKwSCxxbIE5CpaZMmFsuBCK/DAr+a9zxQjwBY4AK/AjuX5A67ArwIOVVV9FEXxlmXZcYlu29bVdf1TluW3AO9N03zG4Ecpz/OzAKdpmr7W4DAiohUgwzAwjuMqnCQJgCiAJwQUgPce7/2qkKbpLAY7NMTawz5OxWSgN8a40BKLMcYBfQJ0WuuLtdYppViKtdZprS9AJ8AeODK/xkvkkp75NZwAAmz+IxFhAm7A7Q619kxK1JGuJQAAAABJRU5ErkJgggAAAAAAAAAAANcAAAAWAAAAAAAAAMcAAACJUE5HDQoaCgAAAA1JSERSAAAA1wAAABYIBgAAAFPJCaQAAACOSURBVHic7duxDYQwEETRObSVupJrgpQiiRwS0AIrS9Z7FUzytU78O8/zH+BzlSRjjNU7YCvXdb1xzTlXb4HtVJLc9716B2znWD0AdlVJchwag69VklTV6h2wHZcLmqgKmrhc0ERc0ERc0ERc0ERV0ERc0MSzEJqoCpq4XNBEVdDE5YImqoImlbz//YFvPbqBDWEab+OuAAAAAElFTkSuQmCCAAAAAAAAAAAALwAAABYAAAAAAAAApgAAAIlQTkcNChoKAAAADUlIRFIAAAAvAAAAFggGAAAAUFLFyQAAAG1JREFUWIXt17ENwCAUA9EL8qRMkiVoGZKKMgVZIKSwLPEmOKzfcLXWbkIJoNbq7vis977i55zuli0CGGO4O7YUd8AfAigl8w0CkOTu2BK9fGb1K3r5E+8SHZ9Z/YqOP2fjcpZ3Ocu7CNZ/MNEDHg4NYflXb+0AAAAASUVORK5CYIIAAAAAAAAAAAAAMAAAABYAAAAAAAAArgAAAIlQTkcNChoKAAAADUlIRFIAAAAwAAAAFggGAAAAhvcfrAAAAHVJREFUWIXtk7ERwCAMxGTwpAxFB0PSUSVFMoFT/JmLJpDOfuu9XyTGAVprao8Qc84nYO+tdgnjAGsttUeYohb4igOUkrfjjIBaq9ojjAOYmdojzBkBmV8o73pf0l/gjA1kDjhjA5kv8Aeo+QPUOMAYQ+0R5gZf3A3r3/HMCQAAAABJRU5ErkJgggAAAAAAAAAAAAAgdG5wEgAAAAAAQEEAAIA/AAAAAAAAAAAAAIBA/////wIwAwAAAAAAAAAAAAAAAAABAAAABAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBBAACAPwAAAAAAAAAAAACAQAAAAP8CMAMAAAAAAAAAAAACAAAATAAAAAAAAAAAAAAAAgAAAOXl5f/R0dH/EAAAAAAAAAAK1yM9AAAAAArXI70AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAyEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQQAAgD8AAAAAAAAAAAAAgECOjo7/ADADAAAAAAAAAGBBAACAPwAAAAAAAAAAAACAQAAAAP8BMIMCAwAAAAEAAAAAAIBBAACAPwAAAAAAAAAAAACAQAAAAP8BMIMCAwAAAAIAAAAAAGBBAACAPwAAAAAAAAAAAACAQAAAAP8BMIMCAwAAAAIAAAAAAGBBAACAPwAAAAAAAAAAAACAQH9/f/8BMIMCAwAAAAEAAAAAAEBBAACAPwAAAAAAAAAAAACAQPj4+P8AMAMAAAAAAAAAQEEAAIA/AAAAAAAAAAAAAIBAAAAAfwAwAwAAAAAAAABgQQAAgD8AAAAAAAAAAAAAgEAAAADMATCDAgMAAAACAAAAAABAQQAAgD8AAAAAAAAAAAAAgEDs7Oz/ADADAAAAAAAAAEBBAACAPwAAAAAAAAAAAACAQAAAAP8AMAMAAAAAAAAAQEEAAIA/AAAAAAAAAAAAAIBA/////wAwAwAAAAAAAACAQQAAgD8AAAAAAAAAAAAAgEAAAAD/ATCDAgMAAAABAAAAAABAQQAAgD8AAAAAAAAAAAAAgEAAAAA/ADAAAAAAAAAAAEBBAACAPwAAAAAAAAAAAACAQAAAAP8CMAMAAAAAAAAAAAACAAAATAAAAAAAAAAAAAAAAgAAAOXl5f/R0dH/EAAAAAAAAADNzEw+AAAAAM3MTL4AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAoEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQQAAgD8AAAAAAAAAAAAAgED/////ADACAAAAAAAAAEBBAACAPwAAAAAAAAAAAACAQI6Ojv8AMAIAAAAAACBodHACAAAAAgAAAAABAAABAAACAAAAAAoAAAAIAAAAAAAAAAUBAQEABQEBAQAAQIBEAAAAQAAgg0QAAABAACCDRAAAwEEAQIBEAADAQQBggEQAAEBAAACDRAAAQEAAAINEAAC4QQBggEQAALhBAECARAAAAEAAIINEAADAQQAAAAEAAAEAAAIAAAAACgAAAAgAAAAAAAAABQEBAQAFAQEBAADATUQAAABAAEB4RAAAAEAAQHhEAACoQQDATUQAAKhBAABORAAAQEAAAHhEAABAQAAAeEQAAKBBAABORAAAoEEAwE1EAAAAQABAeEQAAKhBAAAgZm9l' // @suppress longLineCheck
- }
- },
- 'pid': 1,
- 'ts': 100,
- 'cat': 'disabled-by-default-cc.debug',
- 'tid': 1,
- 'ph': 'O',
- 'id': 'PICTURE_1'
- },
- {
- 'name': 'AnalyzeTask',
- 'args': {
- 'data': {
- 'source_frame_number': 107,
- 'tile_id': {
- 'id_ref': 'TILE_1'
- },
- 'resolution': 'HIGH_RESOLUTION',
- 'is_tile_in_pending_tree_now_bin': true
- }
- },
- 'pid': 1,
- 'ts': 101,
- 'cat': 'cc',
- 'tid': 1,
- 'ph': 'B'
- },
- {
- 'name': 'AnalyzeTask',
- 'args': {},
- 'pid': 1,
- 'ts': 105,
- 'cat': 'cc',
- 'tid': 1,
- 'ph': 'E'
- },
- {
- 'name': 'RasterTask',
- 'args': {
- 'data': {
- 'source_frame_number': 107,
- 'tile_id': {
- 'id_ref': 'TILE_1'
- },
- 'resolution': 'HIGH_RESOLUTION',
- 'is_tile_in_pending_tree_now_bin': true
- }
- },
- 'pid': 1,
- 'ts': 110,
- 'cat': 'cc',
- 'tid': 1,
- 'ph': 'B'
- },
- {
- 'name': 'RasterTask',
- 'args': {},
- 'pid': 1,
- 'ts': 150,
- 'cat': 'cc',
- 'tid': 1,
- 'ph': 'E'
- },
- {
- 'name': 'RasterTask',
- 'args': {
- 'data': {
- 'source_frame_number': 107,
- 'tile_id': {
- 'id_ref': 'TILE_2'
- },
- 'resolution': 'HIGH_RESOLUTION',
- 'is_tile_in_pending_tree_now_bin': true
- }
- },
- 'pid': 1,
- 'ts': 170,
- 'cat': 'cc',
- 'tid': 1,
- 'ph': 'B'
- },
- {
- 'name': 'RasterTask',
- 'args': {},
- 'pid': 1,
- 'ts': 180,
- 'cat': 'cc',
- 'tid': 1,
- 'ph': 'E'
- },
- {
- 'name': 'cc::LayerTreeHostImpl',
- 'args': {
- 'snapshot': {
- 'device_viewport_size': {
- 'width': 2460,
- 'height': 1606
- },
- 'active_tree': {
- 'source_frame_number': 7,
- 'root_layer': {
- 'tilings': [
- {
- 'content_scale': 2,
- 'content_bounds': {
- 'width': 2460,
- 'height': 3334
- },
- 'num_tiles': 1
- },
- {
- 'content_scale': 0.25,
- 'content_bounds': {
- 'width': 308,
- 'height': 417
- },
- 'num_tiles': 1
- }
- ],
- 'coverage_tiles': [
- {
- 'geometry_rect': [0, 0, 256, 256],
- 'tile': {
- 'id_ref': 'TILE_1'
- }
- },
- {
- 'geometry_rect': [256, 0, 256, 256]
- },
- {
- 'geometry_rect': [512, 0, 256, 256]
- },
- {
- 'geometry_rect': [0, 256, 256, 512]
- },
- {
- 'geometry_rect': [256, 256, 512, 512]
- }
- ],
- 'gpu_memory_usage': 22069248,
- 'draws_content': 1,
- 'layer_id': 6,
- 'invalidation': [],
- 'bounds': {
- 'width': 1230,
- 'height': 1667
- },
- 'children': [
- {
- 'tilings': [
- {
- 'content_scale': 2,
- 'content_bounds': {
- 'width': 200,
- 'height': 100
- },
- 'num_tiles': 1
- }
- ],
- 'gpu_memory_usage': 128000,
- 'draws_content': 1,
- 'layer_id': 7,
- 'invalidation': [],
- 'bounds': {
- 'width': 100,
- 'height': 50
- },
- 'children': [
- ],
- 'ideal_contents_scale': 2,
- 'layer_quad': [
- 0,
- 0,
- 200,
- 0,
- 200,
- 100,
- 0,
- 100
- ],
- 'pictures': [
- ],
- 'id': 'cc::PictureLayerImpl/LAYER_2'
- }
- ],
- 'ideal_contents_scale': 2,
- 'layer_quad': [
- 0,
- -1022,
- 2460,
- -1022,
- 2460,
- 2312,
- 0,
- 2312
- ],
- 'pictures': [
- {
- 'id_ref': 'PICTURE_1'
- }
- ],
- 'id': 'cc::PictureLayerImpl/LAYER_1'
- },
- 'render_surface_layer_list': [
- {'id_ref': 'LAYER_1'},
- {'id_ref': 'LAYER_2'}
- ],
- 'id': 'cc::LayerTreeImpl/0x7d246ee0'
- },
- 'tiles': [
- {
- 'active_priority': {
- 'time_to_visible_in_seconds': 0,
- 'resolution': 'HIGH_RESOLUTION',
- 'distance_to_visible_in_pixels': 0
- },
- 'pending_priority': {
- 'time_to_visible_in_seconds': 3.4028234663852886e+38,
- 'resolution': 'NON_IDEAL_RESOLUTION',
- 'distance_to_visible_in_pixels': 3.4028234663852886e+38
- },
- 'managed_state': {
- 'resolution': 'HIGH_RESOLUTION',
- 'is_solid_color': false,
- 'is_using_gpu_memory': true,
- 'has_resource': true,
- 'scheduled_priority': 10,
- 'distance_to_visible': 0,
- 'gpu_memory_usage': 1024000
- },
- 'layer_id': '6',
- 'picture_pile': {
- 'id_ref': 'PICTURE_1'
- },
- 'contents_scale': 2,
- 'content_rect': [0, 0, 1024, 1024],
- 'id': 'cc::Tile/TILE_1'
- },
- {
- 'active_priority': {
- 'time_to_visible_in_seconds': 0,
- 'resolution': 'HIGH_RESOLUTION',
- 'distance_to_visible_in_pixels': 0
- },
- 'pending_priority': {
- 'time_to_visible_in_seconds': 3.4028234663852886e+38,
- 'resolution': 'NON_IDEAL_RESOLUTION',
- 'distance_to_visible_in_pixels': 3.4028234663852886e+38
- },
- 'managed_state': {
- 'resolution': 'HIGH_RESOLUTION',
- 'is_solid_color': false,
- 'is_using_gpu_memory': true,
- 'has_resource': true,
- 'scheduled_priority': 12,
- 'distance_to_visible': 0,
- 'gpu_memory_usage': 1024000
- },
- 'layer_id': '6',
- 'picture_pile': {
- 'id_ref': 'PICTURE_1'
- },
- 'contents_scale': 2,
- 'content_rect': [0, 1024, 1024, 1024],
- 'id': 'cc::Tile/TILE_2'
- }
- ]
- }
- },
- 'pid': 1,
- 'ts': 500,
- 'cat': 'disabled-by-default-cc.debug',
- 'tid': 28163,
- 'ph': 'O',
- 'id': 'LTHI_1'
- },
- {
- 'name': 'cc::DisplayItemList',
- 'args': {
- 'snapshot': {
- 'params': {
- 'layer_rect': [
- -15,
- -15,
- 1260,
- 1697
- ],
- 'items': [
- 'BeginClipDisplayItem',
- 'EndClipDisplayItem'
- ]
- },
- 'skp64': '[base 64 encoded skia picture]'
- }
- },
- 'pid': 1,
- 'ts': 300,
- 'cat': 'disabled-by-default-cc.debug',
- 'tid': 1,
- 'ph': 'O',
- 'id': 'PICTURE_3'
- }
-];
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_impl.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_impl.html
deleted file mode 100644
index 639e98e3451..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_impl.html
+++ /dev/null
@@ -1,170 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/constants.html">
-<link rel="import" href="/tracing/extras/chrome/cc/layer_impl.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
-
- var constants = tr.e.cc.constants;
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * @constructor
- */
- function LayerTreeImplSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- LayerTreeImplSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- tr.e.cc.preInitializeObject(this);
- this.layerTreeHostImpl = undefined;
- this.whichTree = undefined;
- this.sourceFrameNumber = undefined;
- },
-
- initialize: function() {
- tr.e.cc.moveRequiredFieldsFromArgsToToplevel(
- this, ['renderSurfaceLayerList']);
- tr.e.cc.moveOptionalFieldsFromArgsToToplevel(
- this, ['rootLayer', 'layers']);
- if (this.args.sourceFrameNumber)
- this.sourceFrameNumber = this.args.sourceFrameNumber;
-
- // Slimming Paint v2 removes the tree hierarchy and replace
- // it with a layer list. The tracing data should have either
- // rootLayer or layers available.
- if (this.rootLayer) {
- // The version before SPv2
- this.rootLayer.layerTreeImpl = this;
- } else {
- // The SPv2 version, where the layer list contains all
- // non-mask, non-replica layers.
- for (var i = 0; i < this.layers.length; i++) {
- this.layers[i].layerTreeImpl = this;
- }
- }
-
- if (this.args.swapPromiseTraceIds &&
- this.args.swapPromiseTraceIds.length) {
- this.tracedInputLatencies = [];
-
- var ownProcess = this.objectInstance.parent;
- var modelHelper = ownProcess.model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- if (modelHelper)
- this._initializeTracedInputLatencies(modelHelper);
- }
- },
-
- _initializeTracedInputLatencies: function(modelHelper) {
- var latencyEvents = modelHelper.browserHelper.getLatencyEventsInRange(
- modelHelper.model.bounds);
-
- // Convert all ids to InputLatency Async objects.
- latencyEvents.forEach(function(event) {
- for (var i = 0; i < this.args.swapPromiseTraceIds.length; i++) {
- if (!event.args.data || !event.args.data.trace_id)
- continue;
- if (parseInt(event.args.data.trace_id) ===
- this.args.swapPromiseTraceIds[i])
- this.tracedInputLatencies.push(event);
- }
- }, this);
- },
-
- get hasSourceFrameBeenDrawnBefore() {
- if (this.whichTree === tr.e.cc.constants.PENDING_TREE)
- return false;
-
- // Old chrome's don't produce sourceFrameNumber.
- if (this.sourceFrameNumber === undefined)
- return;
-
- var thisLTHI = this.layerTreeHostImpl;
- var thisLTHIIndex = thisLTHI.objectInstance.snapshots.indexOf(
- thisLTHI);
- var prevLTHIIndex = thisLTHIIndex - 1;
- if (prevLTHIIndex < 0 ||
- prevLTHIIndex >= thisLTHI.objectInstance.snapshots.length)
- return false;
- var prevLTHI = thisLTHI.objectInstance.snapshots[prevLTHIIndex];
- if (!prevLTHI.activeTree)
- return false;
-
- // Old chrome's don't produce sourceFrameNumber.
- if (prevLTHI.activeTree.sourceFrameNumber === undefined)
- return;
- return prevLTHI.activeTree.sourceFrameNumber === this.sourceFrameNumber;
- },
-
- get otherTree() {
- var other = this.whichTree === constants.ACTIVE_TREE ?
- constants.PENDING_TREE : constants.ACTIVE_TREE;
- return this.layerTreeHostImpl.getTree(other);
- },
-
- get gpuMemoryUsageInBytes() {
- var totalBytes = 0;
- this.iterLayers(function(layer) {
- if (layer.gpuMemoryUsageInBytes !== undefined)
- totalBytes += layer.gpuMemoryUsageInBytes;
- });
- return totalBytes;
- },
-
- iterLayers: function(func, thisArg) {
- var visitedLayers = {};
- function visitLayer(layer, depth, isMask, isReplica) {
- if (visitedLayers[layer.layerId])
- return;
- visitedLayers[layer.layerId] = true;
- func.call(thisArg, layer, depth, isMask, isReplica);
- if (layer.children) {
- for (var i = 0; i < layer.children.length; i++)
- visitLayer(layer.children[i], depth + 1);
- }
- if (layer.maskLayer)
- visitLayer(layer.maskLayer, depth + 1, true, false);
- if (layer.replicaLayer)
- visitLayer(layer.replicaLayer, depth + 1, false, true);
- }
- if (this.rootLayer) {
- visitLayer(this.rootLayer, 0, false, false);
- } else {
- for (var i = 0; i < this.layers.length; i++)
- visitLayer(this.layers[i], 0, false, false);
- }
- },
- findLayerWithId: function(id) {
- var foundLayer = undefined;
- function visitLayer(layer) {
- if (layer.layerId === id)
- foundLayer = layer;
- }
- this.iterLayers(visitLayer);
- return foundLayer;
- }
- };
-
- ObjectSnapshot.subTypes.register(
- LayerTreeImplSnapshot,
- {typeName: 'cc::LayerTreeImpl'});
-
- return {
- LayerTreeImplSnapshot: LayerTreeImplSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture.html
deleted file mode 100644
index ca25a118528..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture.html
+++ /dev/null
@@ -1,413 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture_as_image_data.html">
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- // Number of pictures created. Used as an uniqueId because we are immutable.
- var PictureCount = 0;
- var OPS_TIMING_ITERATIONS = 3;
-
- function Picture(skp64, layerRect) {
- this.skp64_ = skp64;
- this.layerRect_ = layerRect;
-
- this.guid_ = tr.b.GUID.allocateSimple();
- }
-
- Picture.prototype = {
- get canSave() {
- return true;
- },
-
- get layerRect() {
- return this.layerRect_;
- },
-
- get guid() {
- return this.guid_;
- },
-
- getBase64SkpData: function() {
- return this.skp64_;
- },
-
- getOps: function() {
- if (!PictureSnapshot.CanGetOps()) {
- console.error(PictureSnapshot.HowToEnablePictureDebugging());
- return undefined;
- }
-
- var ops = window.chrome.skiaBenchmarking.getOps({
- skp64: this.skp64_,
- params: {
- layer_rect: this.layerRect_.toArray()
- }
- });
-
- if (!ops)
- console.error('Failed to get picture ops.');
-
- return ops;
- },
-
- getOpTimings: function() {
- if (!PictureSnapshot.CanGetOpTimings()) {
- console.error(PictureSnapshot.HowToEnablePictureDebugging());
- return undefined;
- }
-
- var opTimings = window.chrome.skiaBenchmarking.getOpTimings({
- skp64: this.skp64_,
- params: {
- layer_rect: this.layerRect_.toArray()
- }
- });
-
- if (!opTimings)
- console.error('Failed to get picture op timings.');
-
- return opTimings;
- },
-
- /**
- * Tag each op with the time it takes to rasterize.
- *
- * FIXME: We should use real statistics to get better numbers here, see
- * https://code.google.com/p/trace-viewer/issues/detail?id=357
- *
- * @param {Array} ops Array of Skia operations.
- * @return {Array} Skia ops where op.cmd_time contains the associated time
- * for a given op.
- */
- tagOpsWithTimings: function(ops) {
- var opTimings = new Array();
- for (var iteration = 0; iteration < OPS_TIMING_ITERATIONS; iteration++) {
- opTimings[iteration] = this.getOpTimings();
- if (!opTimings[iteration] || !opTimings[iteration].cmd_times)
- return ops;
- if (opTimings[iteration].cmd_times.length !== ops.length)
- return ops;
- }
-
- for (var opIndex = 0; opIndex < ops.length; opIndex++) {
- var min = Number.MAX_VALUE;
- for (var i = 0; i < OPS_TIMING_ITERATIONS; i++)
- min = Math.min(min, opTimings[i].cmd_times[opIndex]);
- ops[opIndex].cmd_time = min;
- }
-
- return ops;
- },
-
- /**
- * Rasterize the picture.
- *
- * @param {{opt_stopIndex: number, params}} The SkPicture operation to
- * rasterize up to. If not defined, the entire SkPicture is rasterized.
- * @param {{opt_showOverdraw: bool, params}} Defines whether pixel overdraw
- should be visualized in the image.
- * @param {function(tr.e.cc.PictureAsImageData)} The callback function that
- * is called after rasterization is complete or fails.
- */
- rasterize: function(params, rasterCompleteCallback) {
- if (!PictureSnapshot.CanRasterize() || !PictureSnapshot.CanGetOps()) {
- rasterCompleteCallback(new tr.e.cc.PictureAsImageData(
- this, tr.e.cc.PictureSnapshot.HowToEnablePictureDebugging()));
- return;
- }
-
- var raster = window.chrome.skiaBenchmarking.rasterize(
- {
- skp64: this.skp64_,
- params: {
- layer_rect: this.layerRect_.toArray()
- }
- },
- {
- stop: params.stopIndex === undefined ? -1 : params.stopIndex,
- overdraw: !!params.showOverdraw,
- params: { }
- });
-
- if (raster) {
- var canvas = document.createElement('canvas');
- var ctx = canvas.getContext('2d');
- canvas.width = raster.width;
- canvas.height = raster.height;
- var imageData = ctx.createImageData(raster.width, raster.height);
- imageData.data.set(new Uint8ClampedArray(raster.data));
- rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this, imageData));
- } else {
- var error = 'Failed to rasterize picture. ' +
- 'Your recording may be from an old Chrome version. ' +
- 'The SkPicture format is not backward compatible.';
- rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this, error));
- }
- }
- };
-
- function LayeredPicture(pictures) {
- this.guid_ = tr.b.GUID.allocateSimple();
- this.pictures_ = pictures;
- this.layerRect_ = undefined;
- }
-
- LayeredPicture.prototype = {
- __proto__: Picture.prototype,
-
- get canSave() {
- return false;
- },
-
- get typeName() {
- return 'cc::LayeredPicture';
- },
-
- get layerRect() {
- if (this.layerRect_ !== undefined)
- return this.layerRect_;
-
- this.layerRect_ = {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- };
-
- for (var i = 0; i < this.pictures_.length; ++i) {
- var rect = this.pictures_[i].layerRect;
- this.layerRect_.x = Math.min(this.layerRect_.x, rect.x);
- this.layerRect_.y = Math.min(this.layerRect_.y, rect.y);
- this.layerRect_.width =
- Math.max(this.layerRect_.width, rect.x + rect.width);
- this.layerRect_.height =
- Math.max(this.layerRect_.height, rect.y + rect.height);
- }
- return this.layerRect_;
- },
-
- get guid() {
- return this.guid_;
- },
-
- getBase64SkpData: function() {
- throw new Error('Not available with a LayeredPicture.');
- },
-
- getOps: function() {
- var ops = [];
- for (var i = 0; i < this.pictures_.length; ++i)
- ops = ops.concat(this.pictures_[i].getOps());
- return ops;
- },
-
- getOpTimings: function() {
- var opTimings = this.pictures_[0].getOpTimings();
- for (var i = 1; i < this.pictures_.length; ++i) {
- var timings = this.pictures_[i].getOpTimings();
- opTimings.cmd_times = opTimings.cmd_times.concat(timings.cmd_times);
- opTimings.total_time += timings.total_time;
- }
- return opTimings;
- },
-
- tagOpsWithTimings: function(ops) {
- var opTimings = new Array();
- for (var iteration = 0; iteration < OPS_TIMING_ITERATIONS; iteration++) {
- opTimings[iteration] = this.getOpTimings();
- if (!opTimings[iteration] || !opTimings[iteration].cmd_times)
- return ops;
- }
-
- for (var opIndex = 0; opIndex < ops.length; opIndex++) {
- var min = Number.MAX_VALUE;
- for (var i = 0; i < OPS_TIMING_ITERATIONS; i++)
- min = Math.min(min, opTimings[i].cmd_times[opIndex]);
- ops[opIndex].cmd_time = min;
- }
- return ops;
- },
-
- rasterize: function(params, rasterCompleteCallback) {
- this.picturesAsImageData_ = [];
- var rasterCallback = function(pictureAsImageData) {
- this.picturesAsImageData_.push(pictureAsImageData);
- if (this.picturesAsImageData_.length !== this.pictures_.length)
- return;
-
- var canvas = document.createElement('canvas');
- var ctx = canvas.getContext('2d');
- canvas.width = this.layerRect.width;
- canvas.height = this.layerRect.height;
-
- // TODO(dsinclair): Verify these finish in the order started.
- // Do the rasterize calls run sync or asyn? As the imageData
- // going to be in the same order as the pictures_ list?
- for (var i = 0; i < this.picturesAsImageData_.length; ++i) {
- ctx.putImageData(this.picturesAsImageData_[i].imageData,
- this.pictures_[i].layerRect.x,
- this.pictures_[i].layerRect.y);
- }
- this.picturesAsImageData_ = [];
-
- rasterCompleteCallback(new tr.e.cc.PictureAsImageData(this,
- ctx.getImageData(this.layerRect.x, this.layerRect.y,
- this.layerRect.width, this.layerRect.height)));
- }.bind(this);
-
- for (var i = 0; i < this.pictures_.length; ++i)
- this.pictures_[i].rasterize(params, rasterCallback);
- }
- };
-
-
- /**
- * @constructor
- */
- function PictureSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- PictureSnapshot.HasSkiaBenchmarking = function() {
- return tr.isExported('chrome.skiaBenchmarking');
- };
-
- PictureSnapshot.CanRasterize = function() {
- if (!PictureSnapshot.HasSkiaBenchmarking())
- return false;
- if (!window.chrome.skiaBenchmarking.rasterize)
- return false;
- return true;
- };
-
- PictureSnapshot.CanGetOps = function() {
- if (!PictureSnapshot.HasSkiaBenchmarking())
- return false;
- if (!window.chrome.skiaBenchmarking.getOps)
- return false;
- return true;
- };
-
- PictureSnapshot.CanGetOpTimings = function() {
- if (!PictureSnapshot.HasSkiaBenchmarking())
- return false;
- if (!window.chrome.skiaBenchmarking.getOpTimings)
- return false;
- return true;
- };
-
- PictureSnapshot.CanGetInfo = function() {
- if (!PictureSnapshot.HasSkiaBenchmarking())
- return false;
- if (!window.chrome.skiaBenchmarking.getInfo)
- return false;
- return true;
- };
-
- PictureSnapshot.HowToEnablePictureDebugging = function() {
- if (tr.isHeadless)
- return 'Pictures only work in chrome';
-
- var usualReason = [
- 'For pictures to show up, you need to have Chrome running with ',
- '--enable-skia-benchmarking. Please restart chrome with this flag ',
- 'and try again.'
- ].join('');
-
- if (!tr.isExported('global.chrome.skiaBenchmarking'))
- return usualReason;
- if (!global.chrome.skiaBenchmarking.rasterize)
- return 'Your chrome is old';
- if (!global.chrome.skiaBenchmarking.getOps)
- return 'Your chrome is old: skiaBenchmarking.getOps not found';
- if (!global.chrome.skiaBenchmarking.getOpTimings)
- return 'Your chrome is old: skiaBenchmarking.getOpTimings not found';
- if (!global.chrome.skiaBenchmarking.getInfo)
- return 'Your chrome is old: skiaBenchmarking.getInfo not found';
- return 'Rasterizing is on';
- };
-
- PictureSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- tr.e.cc.preInitializeObject(this);
- this.rasterResult_ = undefined;
- },
-
- initialize: function() {
- // If we have an alias args, that means this picture was represented
- // by an alias, and the real args is in alias.args.
- if (this.args.alias)
- this.args = this.args.alias.args;
-
- if (!this.args.params.layerRect)
- throw new Error('Missing layer rect');
-
- this.layerRect_ = this.args.params.layerRect;
- this.picture_ = new Picture(this.args.skp64, this.args.params.layerRect);
- },
-
- set picture(picture) {
- this.picture_ = picture;
- },
-
- get canSave() {
- return this.picture_.canSave;
- },
-
- get layerRect() {
- return this.layerRect_ ? this.layerRect_ : this.picture_.layerRect;
- },
-
- get guid() {
- return this.picture_.guid;
- },
-
- getBase64SkpData: function() {
- return this.picture_.getBase64SkpData();
- },
-
- getOps: function() {
- return this.picture_.getOps();
- },
-
- getOpTimings: function() {
- return this.picture_.getOpTimings();
- },
-
- tagOpsWithTimings: function(ops) {
- return this.picture_.tagOpsWithTimings(ops);
- },
-
- rasterize: function(params, rasterCompleteCallback) {
- this.picture_.rasterize(params, rasterCompleteCallback);
- }
- };
-
- ObjectSnapshot.subTypes.register(
- PictureSnapshot,
- {typeNames: ['cc::Picture']});
-
- return {
- PictureSnapshot: PictureSnapshot,
- Picture: Picture,
- LayeredPicture: LayeredPicture
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_as_image_data.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_as_image_data.html
deleted file mode 100644
index e0a5bc9f7fa..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_as_image_data.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- /**
- * @constructor
- */
- function PictureAsImageData(picture, errorOrImageData) {
- this.picture_ = picture;
- if (errorOrImageData instanceof ImageData) {
- this.error_ = undefined;
- this.imageData_ = errorOrImageData;
- } else {
- this.error_ = errorOrImageData;
- this.imageData_ = undefined;
- }
- };
-
- /**
- * Creates a new pending PictureAsImageData (no image data and no error).
- *
- * @return {PictureAsImageData} a new pending PictureAsImageData.
- */
- PictureAsImageData.Pending = function(picture) {
- return new PictureAsImageData(picture, undefined);
- };
-
- PictureAsImageData.prototype = {
- get picture() {
- return this.picture_;
- },
-
- get error() {
- return this.error_;
- },
-
- get imageData() {
- return this.imageData_;
- },
-
- isPending: function() {
- return this.error_ === undefined && this.imageData_ === undefined;
- },
-
- asCanvas: function() {
- if (!this.imageData_)
- return;
-
- var canvas = document.createElement('canvas');
- var ctx = canvas.getContext('2d');
-
- canvas.width = this.imageData_.width;
- canvas.height = this.imageData_.height;
- ctx.putImageData(this.imageData_, 0, 0);
- return canvas;
- }
- };
-
- return {
- PictureAsImageData: PictureAsImageData
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_test.html
deleted file mode 100644
index 25fe0544923..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/picture_test.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/cc.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::Picture')[0];
- var snapshot = instance.snapshots[0];
-
- assert.instanceOf(snapshot, tr.e.cc.PictureSnapshot);
- instance.wasDeleted(150);
- });
-
- test('getOps', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::Picture')[0];
- var snapshot = instance.snapshots[0];
-
- var ops = snapshot.getOps();
- if (!ops)
- return;
- assert.equal(ops.length, 142);
-
- var op0 = ops[0];
- assert.equal(op0.cmd_string, 'Save');
- assert.instanceOf(op0.info, Array);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/raster_task.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/raster_task.html
deleted file mode 100644
index 30d0268d6f1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/raster_task.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/extras/chrome/cc/tile.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
-
- var knownRasterTaskNames = [
- 'TileManager::RunRasterTask',
- 'RasterWorkerPoolTaskImpl::RunRasterOnThread',
- 'RasterWorkerPoolTaskImpl::Raster',
- 'RasterTaskImpl::Raster',
- 'cc::RasterTask',
- 'RasterTask'
- ];
-
- var knownAnalysisTaskNames = [
- 'TileManager::RunAnalyzeTask',
- 'RasterWorkerPoolTaskImpl::RunAnalysisOnThread',
- 'RasterWorkerPoolTaskImpl::Analyze',
- 'RasterTaskImpl::Analyze',
- 'cc::AnalyzeTask',
- 'AnalyzeTask'
- ];
-
- function getTileFromRasterTaskSlice(slice) {
- if (!(isSliceDoingRasterization(slice) || isSliceDoingAnalysis(slice)))
- return undefined;
-
- var tileData;
- if (slice.args.data)
- tileData = slice.args.data;
- else
- tileData = slice.args.tileData;
- if (tileData === undefined)
- return undefined;
- if (tileData.tile_id)
- return tileData.tile_id;
-
- var tile = tileData.tileId;
- if (!(tile instanceof tr.e.cc.TileSnapshot))
- return undefined;
- return tileData.tileId;
- }
-
- function isSliceDoingRasterization(slice) {
- if (knownRasterTaskNames.indexOf(slice.title) !== -1)
- return true;
- return false;
- }
-
- function isSliceDoingAnalysis(slice) {
- if (knownAnalysisTaskNames.indexOf(slice.title) !== -1)
- return true;
- return false;
- }
-
- return {
- getTileFromRasterTaskSlice: getTileFromRasterTaskSlice,
- isSliceDoingRasterization: isSliceDoingRasterization,
- isSliceDoingAnalysis: isSliceDoingAnalysis
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/region.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/region.html
deleted file mode 100644
index e6934a93c71..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/region.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/rect.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- /**
- * @constructor
- */
- function Region() {
- this.rects = [];
- }
-
- Region.fromArray = function(array) {
- if (array.length % 4 !== 0)
- throw new Error('Array must consist be a multiple of 4 in length');
-
- var r = new Region();
- for (var i = 0; i < array.length; i += 4) {
- r.rects.push(tr.b.Rect.fromXYWH(array[i], array[i + 1],
- array[i + 2], array[i + 3]));
- }
- return r;
- }
-
- /**
- * @return {Region} If array is undefined, returns an empty region. Otherwise
- * returns Region.fromArray(array).
- */
- Region.fromArrayOrUndefined = function(array) {
- if (array === undefined)
- return new Region();
- return Region.fromArray(array);
- };
-
- Region.prototype = {
- __proto__: Region.prototype,
-
- rectIntersects: function(r) {
- for (var i = 0; i < this.rects.length; i++) {
- if (this.rects[i].intersects(r))
- return true;
- }
- return false;
- },
-
- addRect: function(r) {
- this.rects.push(r);
- }
- };
-
- return {
- Region: Region
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/render_pass.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/render_pass.html
deleted file mode 100644
index 8b302435858..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/render_pass.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * @constructor
- */
- function RenderPassSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- RenderPassSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- tr.e.cc.preInitializeObject(this);
- },
-
- initialize: function() {
- tr.e.cc.moveRequiredFieldsFromArgsToToplevel(
- this, ['quadList']);
- }
- };
-
- ObjectSnapshot.subTypes.register(
- RenderPassSnapshot,
- {typeName: 'cc::RenderPass'});
-
- return {
- RenderPassSnapshot: RenderPassSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile.html
deleted file mode 100644
index a24e58483e2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/extras/chrome/cc/debug_colors.html">
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * @constructor
- */
- function TileSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- TileSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- tr.e.cc.preInitializeObject(this);
- },
-
- initialize: function() {
- tr.e.cc.moveOptionalFieldsFromArgsToToplevel(
- this, ['layerId', 'contentsScale', 'contentRect']);
- if (this.args.managedState) {
- this.resolution = this.args.managedState.resolution;
- this.isSolidColor = this.args.managedState.isSolidColor;
- this.isUsingGpuMemory = this.args.managedState.isUsingGpuMemory;
- this.hasResource = this.args.managedState.hasResource;
- this.scheduledPriority = this.args.scheduledPriority;
- this.gpuMemoryUsageInBytes = this.args.gpuMemoryUsage;
- } else {
- this.resolution = this.args.resolution;
- this.isSolidColor = this.args.drawInfo.isSolidColor;
- this.isUsingGpuMemory = this.args.isUsingGpuMemory;
- this.hasResource = this.args.hasResource;
- this.scheduledPriority = this.args.scheduledPriority;
- this.gpuMemoryUsageInBytes = this.args.gpuMemoryUsage;
- }
-
- // This check is for backward compatability. It can probably
- // be removed once we're confident that most traces contain
- // content_rect.
- if (this.contentRect)
- this.layerRect = this.contentRect.scale(1.0 / this.contentsScale);
-
- if (this.isSolidColor)
- this.type_ = tr.e.cc.tileTypes.solidColor;
- else if (!this.hasResource)
- this.type_ = tr.e.cc.tileTypes.missing;
- else if (this.resolution === 'HIGH_RESOLUTION')
- this.type_ = tr.e.cc.tileTypes.highRes;
- else if (this.resolution === 'LOW_RESOLUTION')
- this.type_ = tr.e.cc.tileTypes.lowRes;
- else
- this.type_ = tr.e.cc.tileTypes.unknown;
- },
-
- getTypeForLayer: function(layer) {
- var type = this.type_;
- if (type === tr.e.cc.tileTypes.unknown) {
- if (this.contentsScale < layer.idealContentsScale)
- type = tr.e.cc.tileTypes.extraLowRes;
- else if (this.contentsScale > layer.idealContentsScale)
- type = tr.e.cc.tileTypes.extraHighRes;
- }
- return type;
- }
- };
-
- ObjectSnapshot.subTypes.register(TileSnapshot, {typeName: 'cc::Tile'});
-
- return {
- TileSnapshot: TileSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_coverage_rect.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_coverage_rect.html
deleted file mode 100644
index 5479593784b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_coverage_rect.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- /**
- * This class represents a tile (from impl side) and its final rect on the
- * layer. Note that the rect is determined by what is needed to cover all
- * of the layer without overlap.
- * @constructor
- */
- function TileCoverageRect(rect, tile) {
- this.geometryRect = rect;
- this.tile = tile;
- }
-
- return {
- TileCoverageRect: TileCoverageRect
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_test.html
deleted file mode 100644
index c29971382e9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/tile_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/tile.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
- var instance = p.objects.getAllInstancesNamed('cc::Tile')[0];
- var snapshot = instance.snapshots[0];
-
- assert.instanceOf(snapshot, tr.e.cc.TileSnapshot);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util.html
deleted file mode 100644
index a8689fe0d6d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util.html
+++ /dev/null
@@ -1,148 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/quad.html">
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-<script>
-
-'use strict';
-
-tr.exportTo('tr.e.cc', function() {
- var convertedNameCache = {};
- function convertNameToJSConvention(name) {
- if (name in convertedNameCache)
- return convertedNameCache[name];
-
- if (name[0] === '_' ||
- name[name.length - 1] === '_') {
- convertedNameCache[name] = name;
- return name;
- }
-
- var words = name.split('_');
- if (words.length === 1) {
- convertedNameCache[name] = words[0];
- return words[0];
- }
-
- for (var i = 1; i < words.length; i++)
- words[i] = words[i][0].toUpperCase() + words[i].substring(1);
-
- convertedNameCache[name] = words.join('');
- return convertedNameCache[name];
- }
-
- function convertObjectFieldNamesToJSConventions(object) {
- tr.b.iterObjectFieldsRecursively(
- object,
- function(object, fieldName, fieldValue) {
- delete object[fieldName];
- object[newFieldName] = fieldValue;
- return newFieldName;
- });
- }
-
- function convertQuadSuffixedTypesToQuads(object) {
- tr.b.iterObjectFieldsRecursively(
- object,
- function(object, fieldName, fieldValue) {
- });
- }
-
- function convertObject(object) {
- convertObjectFieldNamesToJSConventions(object);
- convertQuadSuffixedTypesToQuads(object);
- }
-
- function moveRequiredFieldsFromArgsToToplevel(object, fields) {
- for (var i = 0; i < fields.length; i++) {
- var key = fields[i];
- if (object.args[key] === undefined)
- throw Error('Expected field ' + key + ' not found in args');
- if (object[key] !== undefined)
- throw Error('Field ' + key + ' already in object');
- object[key] = object.args[key];
- delete object.args[key];
- }
- }
-
- function moveOptionalFieldsFromArgsToToplevel(object, fields) {
- for (var i = 0; i < fields.length; i++) {
- var key = fields[i];
- if (object.args[key] === undefined)
- continue;
- if (object[key] !== undefined)
- throw Error('Field ' + key + ' already in object');
- object[key] = object.args[key];
- delete object.args[key];
- }
- }
-
- function preInitializeObject(object) {
- preInitializeObjectInner(object.args, false);
- }
-
- function preInitializeObjectInner(object, hasRecursed) {
- if (!(object instanceof Object))
- return;
-
- if (object instanceof Array) {
- for (var i = 0; i < object.length; i++)
- preInitializeObjectInner(object[i], true);
- return;
- }
-
- if (hasRecursed &&
- (object instanceof tr.model.ObjectSnapshot ||
- object instanceof tr.model.ObjectInstance))
- return;
-
- for (var key in object) {
- var newKey = convertNameToJSConvention(key);
- if (newKey !== key) {
- var value = object[key];
- delete object[key];
- object[newKey] = value;
- key = newKey;
- }
-
- // Convert objects with keys ending with Quad to tr.b.Quad type.
- if (/Quad$/.test(key) && !(object[key] instanceof tr.b.Quad)) {
- var q;
- try {
- q = tr.b.Quad.from8Array(object[key]);
- } catch (e) {
- console.log(e);
- }
- object[key] = q;
- continue;
- }
-
- // Convert objects with keys ending with Rect to tr.b.Rect type.
- if (/Rect$/.test(key) && !(object[key] instanceof tr.b.Rect)) {
- var r;
- try {
- r = tr.b.Rect.fromArray(object[key]);
- } catch (e) {
- console.log(e);
- }
- object[key] = r;
- }
-
- preInitializeObjectInner(object[key], true);
- }
- }
-
- return {
- preInitializeObject: preInitializeObject,
- convertNameToJSConvention: convertNameToJSConvention,
- moveRequiredFieldsFromArgsToToplevel: moveRequiredFieldsFromArgsToToplevel,
- moveOptionalFieldsFromArgsToToplevel: moveOptionalFieldsFromArgsToToplevel,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util_test.html
deleted file mode 100644
index b29fd6a57a7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/cc/util_test.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/base/quad.html">
-<link rel="import" href="/tracing/base/rect.html">
-
-<script>
-
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('nameConvert', function() {
- assert.equal(tr.e.cc.convertNameToJSConvention('_foo'), '_foo');
- assert.equal(tr.e.cc.convertNameToJSConvention('foo_'), 'foo_');
- assert.equal(tr.e.cc.convertNameToJSConvention('foo'), 'foo');
- assert.equal(tr.e.cc.convertNameToJSConvention('foo_bar'), 'fooBar');
- assert.equal(tr.e.cc.convertNameToJSConvention('foo_bar_baz'),
- 'fooBarBaz');
- });
-
- test('objectConvertNested', function() {
- var object = {
- un_disturbed: true,
- args: {
- foo_bar: {
- a_field: 7
- }
- }
- };
- var expected = {
- un_disturbed: true,
- args: {
- fooBar: {
- aField: 7
- }
- }
- };
- tr.e.cc.preInitializeObject(object);
- assert.deepEqual(object, expected);
- });
-
- test('arrayConvert', function() {
- var object = {
- un_disturbed: true,
- args: [
- {foo_bar: 7},
- {foo_bar: 8}
- ]
- };
- var expected = {
- un_disturbed: true,
- args: [
- {fooBar: 7},
- {fooBar: 8}
- ]
- };
- tr.e.cc.preInitializeObject(object);
- assert.deepEqual(object, expected);
- });
-
- test('quadCoversion', function() {
- var object = {
- args: {
- some_quad: [1, 2, 3, 4, 5, 6, 7, 8]
- }
- };
- tr.e.cc.preInitializeObject(object);
- assert.instanceOf(object.args.someQuad, tr.b.Quad);
- });
-
- test('quadConversionNested', function() {
- var object = {
- args: {
- nested_field: {
- a_quad: [1, 2, 3, 4, 5, 6, 7, 8]
- },
- non_nested_quad: [1, 2, 3, 4, 5, 6, 7, 8]
- }
- };
- tr.e.cc.preInitializeObject(object);
- assert.instanceOf(object.args.nestedField.aQuad, tr.b.Quad);
- assert.instanceOf(object.args.nonNestedQuad, tr.b.Quad);
- });
-
- test('rectCoversion', function() {
- var object = {
- args: {
- some_rect: [1, 2, 3, 4]
- }
- };
- tr.e.cc.preInitializeObject(object);
- assert.instanceOf(object.args.someRect, tr.b.Rect);
- });
-
- test('rectCoversionNested', function() {
- var object = {
- args: {
- nested_field: {
- a_rect: [1, 2, 3, 4]
- },
- non_nested_rect: [1, 2, 3, 4]
- }
- };
- tr.e.cc.preInitializeObject(object);
- assert.instanceOf(object.args.nestedField.aRect, tr.b.Rect);
- assert.instanceOf(object.args.nonNestedRect, tr.b.Rect);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor.html
deleted file mode 100644
index 9be58a54a0c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/core/auditor.html">
-<link rel="import"
- href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import"
- href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/model/constants.html">
-<link rel="import" href="/tracing/model/event_info.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for trace data Auditors.
- */
-tr.exportTo('tr.e.audits', function() {
- var Auditor = tr.c.Auditor;
-
- /**
- * Auditor for Chrome-specific traces.
- * @constructor
- */
- function ChromeAuditor(model) {
- Auditor.call(this, model);
-
- var modelHelper = this.model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- if (modelHelper && modelHelper.browserHelper) {
- // Must be a browserHelper in order to do audits.
- this.modelHelper = modelHelper;
- } else {
- this.modelHelper = undefined;
- }
- };
-
- ChromeAuditor.prototype = {
- __proto__: Auditor.prototype,
-
- runAnnotate: function() {
- if (!this.modelHelper)
- return;
-
- for (var pid in this.modelHelper.rendererHelpers) {
- var rendererHelper = this.modelHelper.rendererHelpers[pid];
-
- if (rendererHelper.isChromeTracingUI)
- rendererHelper.process.important = false;
- }
- },
-
- /**
- * Called by import to install userFriendlyCategoryDriver.
- */
- installUserFriendlyCategoryDriverIfNeeded: function() {
- this.model.addUserFriendlyCategoryDriver(
- tr.e.chrome.ChromeUserFriendlyCategoryDriver);
- },
-
- runAudit: function() {
- if (!this.modelHelper)
- return;
-
- this.model.replacePIDRefsInPatchups(
- tr.model.BROWSER_PROCESS_PID_REF,
- this.modelHelper.browserProcess.pid);
- this.model.applyObjectRefPatchups();
- }
- };
-
- Auditor.register(ChromeAuditor);
-
- return {
- ChromeAuditor: ChromeAuditor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor_test.html
deleted file mode 100644
index 9537629a767..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_auditor_test.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_auditor.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ColorScheme = tr.b.ColorScheme;
-
- function createMainProcesses(m) {
- m.browserProcess = m.getOrCreateProcess(1);
- m.browserMain = m.browserProcess.getOrCreateThread(2);
- m.browserMain.name = 'CrBrowserMain';
-
- m.renderer1 = m.getOrCreateProcess(3);
- m.renderer1Main = m.renderer1.getOrCreateThread(4);
- m.renderer1Main.name = 'CrRendererMain';
-
- m.renderer1Compositor = m.renderer1.getOrCreateThread(4);
- m.renderer1Compositor.name = 'Compositor';
- }
-
- function newInputLatencyEvent(tsStart, tsEnd, opt_args) {
- var e = new tr.model.AsyncSlice(
- 'benchmark', 'InputLatency',
- ColorScheme.getColorIdForGeneralPurposeString('InputLatency'),
- tsStart, opt_args);
- e.duration = tsEnd - tsStart;
- return e;
- }
-
- function newImplRenderingStatsEvent(ts, opt_args) {
- var e = new tr.model.ThreadSlice(
- 'benchmark', 'BenchmarkInstrumentation::ImplThreadRenderingStats',
- ColorScheme.getColorIdForGeneralPurposeString('x'),
- ts, opt_args, 0);
- return e;
- }
-
- test('simple', function() {
- tr.c.TestUtils.newModelWithAuditor(function(m) {
- createMainProcesses(m);
- var bAsyncSlices = m.browserMain.asyncSliceGroup;
- bAsyncSlices.push(newInputLatencyEvent(100, 130));
- bAsyncSlices.push(newInputLatencyEvent(116, 150));
- bAsyncSlices.push(newInputLatencyEvent(133, 166));
- bAsyncSlices.push(newInputLatencyEvent(150, 183));
- bAsyncSlices.push(newInputLatencyEvent(166, 200));
- bAsyncSlices.push(newInputLatencyEvent(183, 216));
-
- var rm1Slices = m.renderer1Compositor.sliceGroup;
- rm1Slices.pushSlice(newImplRenderingStatsEvent(113));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(130));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(147));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(163));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(180));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(197));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(213));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(230));
- rm1Slices.pushSlice(newImplRenderingStatsEvent(247));
- }, tr.e.audits.ChromeAuditor);
- });
-
- test('refsToBrowser', function() {
- var events = [
- // An object created and snapshotted in the browser process.
- {ts: 1000, pid: 1, tid: 2, ph: 'N', cat: 'c', id: '0x1000', name: 'a',
- args: {}},
- {ts: 1100, pid: 1, tid: 2, ph: 'O', cat: 'c', id: '0x1000', name: 'a',
- args: {snapshot: {foo: 12345}}},
- {ts: 1300, pid: 1, tid: 2, ph: 'D', cat: 'c', id: '0x1000', name: 'a',
- args: {}},
-
- // A reference to the object in the browser from the renderer process.
- {ts: 1200, pid: 3, tid: 4, ph: 'X', cat: 'c', name: 'b', dur: 100,
- args: {bar: {pid_ref: -1, id_ref: '0x1000'}}}
- ];
-
- var m = tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false,
- pruneEmptyContainers: false,
- customizeModelCallback: createMainProcesses,
- auditorConstructors: [tr.e.audits.ChromeAuditor]
- });
-
- var browserObject = m.browserProcess.objects.getObjectInstanceAt(
- new tr.model.ScopedId('ptr', '0x1000'), 1.2);
- assert.isDefined(browserObject);
- var foo = browserObject.getSnapshotAt(1.2);
- assert.isDefined(foo);
-
- assert.equal(m.renderer1Main.sliceGroup.slices.length, 1);
- var slice = m.renderer1Main.sliceGroup.slices[0];
- assert.equal(slice.title, 'b');
- assert.equal(slice.args.bar, foo);
- });
-
- test('filterTracingUI', function() {
- var m = tr.c.TestUtils.newModelWithAuditor(function(m) {
- m.browserProcess = m.getOrCreateProcess(1);
- m.browserMain = m.browserProcess.getOrCreateThread(2);
- m.browserMain.name = 'CrBrowserMain';
-
- m.renderer1 = m.getOrCreateProcess(3);
- m.renderer1.labels = ['https://google.com'];
- m.renderer1Main = m.renderer1.getOrCreateThread(4);
- m.renderer1Main.name = 'CrRendererMain';
-
- m.renderer2 = m.getOrCreateProcess(5);
- m.renderer2.labels = ['chrome://tracing'];
- m.renderer2Main = m.renderer2.getOrCreateThread(6);
- m.renderer2Main.name = 'CrRendererMain';
- }, tr.e.audits.ChromeAuditor);
-
- assert.isTrue(m.renderer1.important);
- assert.isFalse(m.renderer2.important);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_test_utils.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_test_utils.html
deleted file mode 100644
index df91f506ece..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_test_utils.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for trace data Auditors.
- */
-tr.exportTo('tr.e.chrome', function() {
- function ChromeTestUtils() {
- }
-
- ChromeTestUtils.newChromeModel = function(customizeModelCallback) {
- return tr.c.TestUtils.newModel(function(model) {
- model.browserProcess = model.getOrCreateProcess(1);
- model.browserMain = model.browserProcess.getOrCreateThread(2);
- model.browserMain.name = 'CrBrowserMain';
-
- model.rendererProcess = model.getOrCreateProcess(2);
- model.rendererMain = model.rendererProcess.getOrCreateThread(3);
- model.rendererMain.name = 'CrRendererMain';
-
- model.rendererCompositor = model.rendererProcess.getOrCreateThread(4);
- model.rendererCompositor.name = 'Compositor';
-
- model.rasterWorker1 = model.rendererProcess.getOrCreateThread(5);
- model.rasterWorker1.name = 'CompositorTileWorker1';
-
- customizeModelCallback(model);
- });
- };
-
- ChromeTestUtils.addEvent = function(thread, dict) {
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- thread.asyncSliceGroup.push(slice);
- return slice;
- };
-
- ChromeTestUtils.addNavigationStartEvent = function(model, dict) {
- dict.title = 'NavigationTiming navigationStart';
- var event = tr.c.TestUtils.newInstantEvent(dict);
- model.instantEvents.push(event);
- return event;
- };
-
- ChromeTestUtils.addFirstContentfulPaintEvent = function(model, dict) {
- dict.title = 'firstContentfulPaint';
- var event = tr.c.TestUtils.newInstantEvent(dict);
- model.instantEvents.push(event);
- return event;
- };
-
- ChromeTestUtils.addInputEvent = function(model, typeName, dict) {
- dict.title = 'InputLatency::' + typeName;
- dict.isTopLevel = (dict.isTopLevel === undefined);
- dict.startThread = model.browserMain;
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.browserMain.asyncSliceGroup.push(slice);
- return slice;
- };
-
- ChromeTestUtils.addFlingAnimationEvent = function(model, dict) {
- dict.title = 'InputHandlerProxy::HandleGestureFling::started';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.rendererCompositor.asyncSliceGroup.push(slice);
- return slice;
- };
-
- ChromeTestUtils.addRenderingEvent = function(model, dict) {
- dict.title = dict.title || 'DummyEvent';
- dict.type = tr.model.ThreadSlice;
- var slice = tr.c.TestUtils.newSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addFrameEvent = function(model, dict) {
- dict.title = tr.model.helpers.IMPL_RENDERING_STATS;
- dict.type = tr.model.ThreadSlice;
- var slice = tr.c.TestUtils.newSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addLoadingEvent = function(model, dict) {
- dict.title = 'WebContentsImpl Loading';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.rendererMain.asyncSliceGroup.push(slice);
- return slice;
- };
-
- ChromeTestUtils.addNetworkEvent = function(model, dict) {
- dict.cat = 'netlog';
- dict.title = 'Generic Network event';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.browserMain.asyncSliceGroup.push(slice);
- return slice;
- };
-
- ChromeTestUtils.addCommitLoadEvent = function(model, dict) {
- dict.title = 'RenderFrameImpl::didCommitProvisionalLoad';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addCreateChildFrameEvent = function(model, dict) {
- dict.title = 'RenderFrameImpl::createChildFrame';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addStartProvisionalLoadEvent = function(model, dict) {
- dict.title = 'RenderFrameImpl::didStartProvisionalLoad';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addFailProvisionalLoadEvent = function(model, dict) {
- dict.title = 'RenderFrameImpl::didFailProvisionalLoad';
- var slice = tr.c.TestUtils.newAsyncSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addFinishLoadEvent = function(model, dict) {
- dict.title = 'RenderFrameImpl::didFinishLoad';
- var slice = tr.c.TestUtils.newSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addLoadFinishedEvent = function(model, dict) {
- dict.title = 'LoadFinished';
- var slice = tr.c.TestUtils.newSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- ChromeTestUtils.addCreateThreadsEvent = function(model, dict) {
- dict.title = 'BrowserMainLoop::CreateThreads';
- var slice = tr.c.TestUtils.newSliceEx(dict);
- model.rendererMain.sliceGroup.pushSlice(slice);
- return slice;
- };
-
- return {
- ChromeTestUtils: ChromeTestUtils
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver.html
deleted file mode 100644
index ee542f12e0c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver.html
+++ /dev/null
@@ -1,213 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/sinebow_color_generator.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.chrome', function() {
- var SAME_AS_PARENT = 'same-as-parent';
-
- var TITLES_FOR_USER_FRIENDLY_CATEGORY = {
- composite: [
- 'CompositingInputsUpdater::update',
- 'ThreadProxy::SetNeedsUpdateLayers',
- 'LayerTreeHost::UpdateLayers::CalcDrawProps',
- 'UpdateLayerTree'
- ],
-
- gc: [
- 'minorGC',
- 'majorGC',
- 'MajorGC',
- 'MinorGC',
- 'V8.GCScavenger',
- 'V8.GCIncrementalMarking',
- 'V8.GCIdleNotification',
- 'V8.GCContext',
- 'V8.GCCompactor',
- 'V8GCController::traceDOMWrappers'
- ],
-
- iframe_creation: [
- 'WebLocalFrameImpl::createChildframe'
- ],
-
- imageDecode: [
- 'Decode Image',
- 'ImageFrameGenerator::decode',
- 'ImageFrameGenerator::decodeAndScale'
- ],
-
- input: [
- 'HitTest',
- 'ScrollableArea::scrollPositionChanged',
- 'EventHandler::handleMouseMoveEvent'
- ],
-
- layout: [
- 'FrameView::invalidateTree',
- 'FrameView::layout',
- 'FrameView::performLayout',
- 'FrameView::performPostLayoutTasks',
- 'FrameView::performPreLayoutTasks',
- 'Layer::updateLayerPositionsAfterLayout',
- 'Layout',
- 'LayoutView::hitTest',
- 'ResourceLoadPriorityOptimizer::updateAllImageResourcePriorities',
- 'WebViewImpl::layout'
- ],
-
- parseHTML: [
- 'ParseHTML',
- 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser',
- 'HTMLDocumentParser::processParsedChunkFromBackgroundParser'
- ],
-
- raster: [
- 'DisplayListRasterSource::PerformSolidColorAnalysis',
- 'Picture::Raster',
- 'RasterBufferImpl::Playback',
- 'RasterTask',
- 'RasterizerTaskImpl::RunOnWorkerThread',
- 'SkCanvas::drawImageRect()',
- 'SkCanvas::drawPicture()',
- 'SkCanvas::drawTextBlob()',
- 'TileTaskWorkerPool::PlaybackToMemory'
- ],
-
- record: [
- 'ContentLayerDelegate::paintContents',
- 'DeprecatedPaintLayerCompositor::updateIfNeededRecursive',
- 'DeprecatedPaintLayerCompositor::updateLayerPositionsAfterLayout',
- 'Paint',
- 'Picture::Record',
- 'PictureLayer::Update',
- 'RenderLayer::updateLayerPositionsAfterLayout'
- ],
-
- style: [
- 'CSSParserImpl::parseStyleSheet.parse',
- 'CSSParserImpl::parseStyleSheet.tokenize',
- 'Document::updateStyle',
- 'Document::updateStyleInvalidationIfNeeded',
- 'ParseAuthorStyleSheet',
- 'RuleSet::addRulesFromSheet',
- 'StyleElement::processStyleSheet',
- 'StyleEngine::createResolver',
- 'StyleSheetContents::parseAuthorStyleSheet',
- 'UpdateLayoutTree'
- ],
-
- script_parse_and_compile: [
- 'v8.parseOnBackground',
- 'V8.ScriptCompiler'
- ],
-
- script_execute: [
- 'V8.Execute',
- 'WindowProxy::initialize'
- ],
-
- resource_loading: [
- 'ResourceFetcher::requestResource',
- 'ResourceDispatcher::OnReceivedData',
- 'ResourceDispatcher::OnRequestComplete',
- 'ResourceDispatcher::OnReceivedResponse',
- 'Resource::appendData'
- ],
-
- // Where do these go?
- renderer_misc: [
- 'DecodeFont',
- 'ThreadState::completeSweep' // blink_gc
- ],
-
- // TODO(fmeawad): https://github.com/catapult-project/catapult/issues/2572
- v8_runtime: [
- // Dynamically populated.
- ],
-
- [SAME_AS_PARENT]: [
- 'SyncChannel::Send'
- ]
- };
-
- var COLOR_FOR_USER_FRIENDLY_CATEGORY = new tr.b.SinebowColorGenerator();
- var USER_FRIENDLY_CATEGORY_FOR_TITLE = new Map();
-
- for (var category in TITLES_FOR_USER_FRIENDLY_CATEGORY) {
- TITLES_FOR_USER_FRIENDLY_CATEGORY[category].forEach(function(title) {
- USER_FRIENDLY_CATEGORY_FOR_TITLE.set(title, category);
- });
- }
-
- // keys: event.category part
- // values: user friendly category
- var USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY = {
- netlog: 'net',
- overhead: 'overhead',
- startup: 'startup',
- gpu: 'gpu'
- };
-
- function ChromeUserFriendlyCategoryDriver() {
- }
-
- ChromeUserFriendlyCategoryDriver.fromEvent = function(event) {
- var userFriendlyCategory =
- USER_FRIENDLY_CATEGORY_FOR_TITLE.get(event.title);
- if (userFriendlyCategory) {
- if (userFriendlyCategory === SAME_AS_PARENT) {
- if (event.parentSlice)
- return ChromeUserFriendlyCategoryDriver.fromEvent(event.parentSlice);
- } else {
- return userFriendlyCategory;
- }
- }
-
- var eventCategoryParts = tr.b.getCategoryParts(event.category);
- for (var i = 0; i < eventCategoryParts.length; ++i) {
- var eventCategory = eventCategoryParts[i];
- userFriendlyCategory = USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY[
- eventCategory];
- if (userFriendlyCategory)
- return userFriendlyCategory;
- }
-
- return 'other';
- };
-
- ChromeUserFriendlyCategoryDriver.getColor = function(ufc) {
- return COLOR_FOR_USER_FRIENDLY_CATEGORY.colorForKey(ufc);
- };
-
- ChromeUserFriendlyCategoryDriver.ALL_TITLES = ['other'];
- for (var category in TITLES_FOR_USER_FRIENDLY_CATEGORY) {
- if (category === SAME_AS_PARENT)
- continue;
- ChromeUserFriendlyCategoryDriver.ALL_TITLES.push(category);
- }
- for (var category of tr.b.dictionaryValues(
- USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY)) {
- ChromeUserFriendlyCategoryDriver.ALL_TITLES.push(category);
- }
- ChromeUserFriendlyCategoryDriver.ALL_TITLES.sort();
-
- // Prime the color generator by iterating through all UFCs in alphabetical
- // order.
- for (var category of ChromeUserFriendlyCategoryDriver.ALL_TITLES)
- ChromeUserFriendlyCategoryDriver.getColor(category);
-
- return {
- ChromeUserFriendlyCategoryDriver: ChromeUserFriendlyCategoryDriver
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver_test.html
deleted file mode 100644
index 26fa4d599c9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/chrome_user_friendly_category_driver_test.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import"
- href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ufcFromEvent = tr.e.chrome.ChromeUserFriendlyCategoryDriver.fromEvent;
-
- test('userFriendlyCategory', function() {
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'FrameView::layout',
- category: 'cat'
- }), 'layout');
-
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'V8.Execute',
- category: 'cat'
- }), 'script_execute');
-
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'Paint',
- category: 'cat'
- }), 'record');
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'Document::updateStyle',
- category: 'cat'
- }), 'style');
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser',
- category: 'cat'
- }), 'parseHTML');
-
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'constructor',
- category: 'cat'
- }), 'other');
- });
-
- test('ufcFromTraceCategory', function() {
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'a',
- category: 'netlog'
- }), 'net');
-
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'a',
- category: 'foobar,overhead'
- }), 'overhead');
-
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'a',
- category: 'startup'
- }), 'startup');
- });
-
- test('ufcOther', function() {
- assert.equal(ufcFromEvent({
- guid: tr.b.GUID.allocateSimple(),
- title: 'a',
- category: 'other'
- }), 'other');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice.html
deleted file mode 100644
index e95d6787b48..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/model/async_slice.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.gpu', function() {
- var AsyncSlice = tr.model.AsyncSlice;
-
- function GpuAsyncSlice() {
- AsyncSlice.apply(this, arguments);
- }
-
- GpuAsyncSlice.prototype = {
- __proto__: AsyncSlice.prototype,
-
- get viewSubGroupTitle() {
- if (this.args.channel) {
- if (this.category === 'disabled-by-default-gpu.device')
- return 'Device.' + this.args.channel;
- else
- return 'Service.' + this.args.channel;
- }
- return this.title;
- }
- };
-
- AsyncSlice.subTypes.register(
- GpuAsyncSlice,
- {
- categoryParts: ['disabled-by-default-gpu.device',
- 'disabled-by-default-gpu.service']
- });
-
- return {
- GpuAsyncSlice: GpuAsyncSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice_test.html
deleted file mode 100644
index 3b23bb5a80e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/gpu_async_slice_test.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/gpu/gpu_async_slice.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AsyncSlice = tr.model.AsyncSlice;
- var GpuAsyncSlice = tr.e.gpu.GpuAsyncSlice;
-
- test('construct', function() {
- assert.equal(AsyncSlice.subTypes.getConstructor(
- 'disabled-by-default-gpu.device', 'gpu1'),
- GpuAsyncSlice);
- assert.equal(AsyncSlice.subTypes.getConstructor(
- 'disabled-by-default-gpu.service', 'gpu2'),
- GpuAsyncSlice);
- });
-
- test('subgroup', function() {
- var sDevice = new GpuAsyncSlice('disabled-by-default-gpu.device', 'gpu1',
- 7, 0, {'channel': 'test_channel1'});
-
- var sService = new GpuAsyncSlice('disabled-by-default-gpu.service', 'gpu2',
- 7, 0, {'channel': 'test_channel2'});
-
- assert.equal(sDevice.viewSubGroupTitle, 'Device.test_channel1');
- assert.equal(sService.viewSubGroupTitle, 'Service.test_channel2');
- });
-
- test('import', function() {
- var events = [
- {name: 'trace1', args: {}, pid: 1, ts: 100,
- cat: 'disabled-by-default-gpu.service', tid: 2, ph: 'b', id: 71},
- {name: 'trace1', args: {}, pid: 1, ts: 200,
- cat: 'disabled-by-default-gpu.service', tid: 2, ph: 'e', id: 71},
- {name: 'trace2', args: {'channel': 'test_channel'}, pid: 1, ts: 100,
- cat: 'disabled-by-default-gpu.service', tid: 2, ph: 'b', id: 72},
- {name: 'trace2', args: {'channel': 'test_channel'}, pid: 1, ts: 200,
- cat: 'disabled-by-default-gpu.service', tid: 2, ph: 'e', id: 72},
- {name: 'trace3', args: {'channel': 'test_channel'}, pid: 1, ts: 100,
- cat: 'disabled-by-default-gpu.device', tid: 2, ph: 'b', id: 73},
- {name: 'trace3', args: {'channel': 'test_channel'}, pid: 1, ts: 200,
- cat: 'disabled-by-default-gpu.device', tid: 2, ph: 'e', id: 73}
- ];
- var m = tr.c.TestUtils.newModelWithEvents([events]);
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- assert.equal(t2.asyncSliceGroup.length, 3);
-
- var slice1 = t2.asyncSliceGroup.slices[0];
- var slice2 = t2.asyncSliceGroup.slices[1];
- var slice3 = t2.asyncSliceGroup.slices[2];
-
- assert.instanceOf(slice1, GpuAsyncSlice);
- assert.instanceOf(slice2, GpuAsyncSlice);
- assert.instanceOf(slice3, GpuAsyncSlice);
-
- assert.equal(slice1.viewSubGroupTitle, 'trace1');
- assert.equal(slice2.viewSubGroupTitle, 'Service.test_channel');
- assert.equal(slice3.viewSubGroupTitle, 'Device.test_channel');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state.html
deleted file mode 100644
index 68ac8e1594d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.gpu', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * @constructor
- */
- function StateSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- }
-
- StateSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- preInitialize: function() {
- this.screenshot_ = undefined;
- },
-
- initialize: function() {
- if (this.args.screenshot)
- this.screenshot_ = this.args.screenshot;
- },
-
- /**
- * @return {String} a base64 encoded screenshot if available.
- */
- get screenshot() {
- return this.screenshot_;
- }
- };
-
- ObjectSnapshot.subTypes.register(
- StateSnapshot,
- {typeName: 'gpu::State'});
-
- return {
- StateSnapshot: StateSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test.html
deleted file mode 100644
index 97747dbd44b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/gpu/state.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script src="/tracing/extras/chrome/gpu/state_test_data.js"></script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_gpuStateTrace]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('gpu::State')[0];
- var snapshot = instance.snapshots[0];
-
- assert.instanceOf(snapshot, tr.e.gpu.StateSnapshot);
- assert.typeOf(snapshot.screenshot, 'string');
- instance.wasDeleted(150);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test_data.js b/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test_data.js
deleted file mode 100644
index a781837f140..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/gpu/state_test_data.js
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-'use strict';
-
-var g_gpuStateTrace = [
- {
- 'cat': 'disabled-by-default-gpu.debug',
- 'pid': 23969,
- 'tid': 1799,
- 'ts': 1427012847340,
- 'ph': 'O',
- 'name': 'gpu::State',
- 'args': {
- 'snapshot': {
- 'screenshot': 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB90JCREbHlyxtxQAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAqUlEQVRIx+2WiwrAIAhF/f9vHmywQTMft8w2CJKIoPDozR50fmy0AcsAiMjs9UDOJgG4jwG8SMuUXoMAZcVYBmgPqDYNwLo3JHqcHufbRETZKireOSbDQAA+zgKE7lyiCQDtcQygS6PKYIp3vZ5MvgB0mhmQu8kcgAXE6bYBoZYFmPnhgg5n4En/h0RmvdmX3eKAMYZ3HtGD0+NU3w2BR795dPe/aANuuwDyW5SiCgNBiQAAAABJRU5ErkJggg==' // @suppress longLineCheck
- }
- },
- 'id': '0x7d229bc0'
- }
-];
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object.html
deleted file mode 100644
index 1403ff1eec3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.chrome', function() {
- var KNOWN_PROPERTIES = {
- absX: 1,
- absY: 1,
- address: 1,
- anonymous: 1,
- childNeeds: 1,
- children: 1,
- classNames: 1,
- col: 1,
- colSpan: 1,
- float: 1,
- height: 1,
- htmlId: 1,
- name: 1,
- posChildNeeds: 1,
- positioned: 1,
- positionedMovement: 1,
- relX: 1,
- relY: 1,
- relativePositioned: 1,
- row: 1,
- rowSpan: 1,
- selfNeeds: 1,
- stickyPositioned: 1,
- tag: 1,
- width: 1
- };
-
- function LayoutObject(snapshot, args) {
- this.snapshot_ = snapshot;
- this.id_ = args.address;
- this.name_ = args.name;
- this.childLayoutObjects_ = [];
- this.otherProperties_ = {};
- this.tag_ = args.tag;
- this.relativeRect_ = tr.b.Rect.fromXYWH(
- args.relX, args.relY, args.width, args.height);
- this.absoluteRect_ = tr.b.Rect.fromXYWH(
- args.absX, args.absY, args.width, args.height);
- this.isFloat_ = args.float;
- this.isStickyPositioned_ = args.stickyPositioned;
- this.isPositioned_ = args.positioned;
- this.isRelativePositioned_ = args.relativePositioned;
- this.isAnonymous_ = args.anonymous;
- this.htmlId_ = args.htmlId;
- this.classNames_ = args.classNames;
- this.needsLayoutReasons_ = [];
- if (args.selfNeeds)
- this.needsLayoutReasons_.push('self');
- if (args.childNeeds)
- this.needsLayoutReasons_.push('child');
- if (args.posChildNeeds)
- this.needsLayoutReasons_.push('positionedChild');
- if (args.positionedMovement)
- this.needsLayoutReasons_.push('positionedMovement');
- this.tableRow_ = args.row;
- this.tableCol_ = args.col;
- this.tableRowSpan_ = args.rowSpan;
- this.tableColSpan_ = args.colSpan;
-
- if (args.children) {
- args.children.forEach(function(child) {
- this.childLayoutObjects_.push(new LayoutObject(snapshot, child));
- }.bind(this));
- }
-
- for (var property in args) {
- if (!KNOWN_PROPERTIES[property])
- this.otherProperties_[property] = args[property];
- }
- }
-
- LayoutObject.prototype = {
- get snapshot() {
- return this.snapshot_;
- },
-
- get id() {
- return this.id_;
- },
-
- get name() {
- return this.name_;
- },
-
- get tag() {
- return this.tag_;
- },
-
- get relativeRect() {
- return this.relativeRect_;
- },
-
- get absoluteRect() {
- return this.absoluteRect_;
- },
-
- get isPositioned() {
- return this.isPositioned_;
- },
-
- get isFloat() {
- return this.isFloat_;
- },
-
- get isStickyPositioned() {
- return this.isStickyPositioned_;
- },
-
- get isRelativePositioned() {
- return this.isRelativePositioned_;
- },
-
- get isAnonymous() {
- return this.isAnonymous_;
- },
-
- get tableRow() {
- return this.tableRow_;
- },
-
- get tableCol() {
- return this.tableCol_;
- },
-
- get tableRowSpan() {
- return this.tableRowSpan_;
- },
-
- get tableColSpan() {
- return this.tableColSpan_;
- },
-
- get htmlId() {
- return this.htmlId_;
- },
-
- get classNames() {
- return this.classNames_;
- },
-
- get needsLayoutReasons() {
- return this.needsLayoutReasons_;
- },
-
- get hasChildLayoutObjects() {
- return this.childLayoutObjects_.length > 0;
- },
-
- get childLayoutObjects() {
- return this.childLayoutObjects_;
- },
-
- traverseTree: function(cb, opt_this) {
- cb.call(opt_this, this);
- if (!this.hasChildLayoutObjects)
- return;
- this.childLayoutObjects.forEach(function(child) {
- child.traverseTree(cb, opt_this);
- });
- },
-
- get otherPropertyNames() {
- var names = [];
- for (var name in this.otherProperties_) {
- names.push(name);
- }
- return names;
- },
-
- getProperty: function(name) {
- return this.otherProperties_[name];
- },
-
- get previousSnapshotLayoutObject() {
- if (!this.snapshot.previousSnapshot)
- return undefined;
- return this.snapshot.previousSnapshot.getLayoutObjectById(this.id);
- },
-
- get nextSnapshotLayoutObject() {
- if (!this.snapshot.nextSnapshot)
- return undefined;
- return this.snapshot.nextSnapshot.getLayoutObjectById(this.id);
- }
- };
-
- return {
- LayoutObject: LayoutObject
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object_test.html
deleted file mode 100644
index 0d1958f47a1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_object_test.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/layout_object.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function FakeSnapshot() {
- this.layoutObjectsById = {};
- }
- FakeSnapshot.prototype = {
- getLayoutObjectById: function(id) {
- return this.layoutObjectsById[id];
- }
- };
-
- test('instantiate', function() {
- var snapshot = new FakeSnapshot();
- var layoutObject = new tr.e.chrome.LayoutObject(snapshot, {
- address: 'deadbeef',
- name: 'LayoutView',
- other: 1,
- children: [
- {
- address: 'beef2',
- name: 'LayoutBlockFlow',
- other: 2
- }
- ]
- });
- snapshot.layoutObjectsById[layoutObject.id] = layoutObject;
-
- assert.strictEqual(snapshot, layoutObject.snapshot);
- assert.equal('LayoutView', layoutObject.name);
- assert.equal('deadbeef', layoutObject.id);
- assert.equal(1, layoutObject.otherPropertyNames.length);
- assert.equal(1, layoutObject.getProperty('other'));
- assert.isTrue(layoutObject.hasChildLayoutObjects);
- var child = layoutObject.childLayoutObjects[0];
- assert.equal('LayoutBlockFlow', child.name);
- assert.equal('beef2', child.id);
- assert.equal(1, child.otherPropertyNames.length);
- assert.equal(2, child.getProperty('other'));
-
- assert.isUndefined(layoutObject.previousSnapshotLayoutObject);
- assert.isUndefined(layoutObject.nextSnapshotLayoutObject);
-
- var count = 0;
- layoutObject.traverseTree(function(node) {
- count += 1;
- });
- assert.equal(2, count);
-
- var nextSnapshot = new FakeSnapshot();
- nextSnapshot.previousSnapshot = snapshot;
- snapshot.nextSnapshot = nextSnapshot;
-
- var nextLayoutObject = new tr.e.chrome.LayoutObject(nextSnapshot, {
- address: 'deadbeef',
- name: 'LayoutView'
- });
- nextSnapshot.layoutObjectsById[nextLayoutObject.id] = nextLayoutObject;
-
- assert.strictEqual(layoutObject,
- nextLayoutObject.previousSnapshotLayoutObject);
- assert.strictEqual(nextLayoutObject, layoutObject.nextSnapshotLayoutObject);
- assert.isUndefined(layoutObject.previousSnapshotLayoutObject);
- assert.isUndefined(nextLayoutObject.nextSnapshotLayoutObject);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_tree.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_tree.html
deleted file mode 100644
index 288016cb796..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/layout_tree.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_registry.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.chrome', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
- var ObjectInstance = tr.model.ObjectInstance;
-
- function LayoutTreeInstance() {
- ObjectInstance.apply(this, arguments);
- }
-
- LayoutTreeInstance.prototype = {
- __proto__: ObjectInstance.prototype,
- };
-
- ObjectInstance.subTypes.register(
- LayoutTreeInstance, {typeName: 'LayoutTree'});
-
- function LayoutTreeSnapshot() {
- ObjectSnapshot.apply(this, arguments);
- this.rootLayoutObject = new tr.e.chrome.LayoutObject(this, this.args);
- }
-
- LayoutTreeSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
- };
-
- ObjectSnapshot.subTypes.register(
- LayoutTreeSnapshot, {typeName: 'LayoutTree'});
-
- return {
- LayoutTreeInstance: LayoutTreeInstance,
- LayoutTreeSnapshot: LayoutTreeSnapshot
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer.html
deleted file mode 100644
index b1af1e27432..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Some generic slice titles appear very frequently in traces,
- * like MessageLoop::RunTask. Some of these slices have arguments that give
- * useful context. This class combine such arguments with the slice title to
- * generate a more useful title.
- */
-tr.exportTo('tr.e.chrome', function() {
- function SliceTitleFixer() {
- }
-
- // AsyncSlice uses virtual functions to accomplish something similar to what
- // we're doing here. If this function ever becomes too complex we may consider
- // using a similar pattern.
- SliceTitleFixer.fromEvent = function(event) {
- if (event.args && event.args['src_func'])
- return event.title + ' <- ' + event.args['src_func'];
- return event.title;
- };
-
- return {
- SliceTitleFixer: SliceTitleFixer
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer_test.html
deleted file mode 100644
index 581e3d1886c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome/slice_title_fixer_test.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/slice_title_fixer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var stfFromEvent = tr.e.chrome.SliceTitleFixer.fromEvent;
-
- test('sliceTitleFixer', function() {
- assert.equal(stfFromEvent({
- title: 'SomeDummy:event'
- }), 'SomeDummy:event');
-
- assert.equal(stfFromEvent({
- title: 'EventWith:sourceFunction',
- args: {'src_func': 'theSource'}
- }), 'EventWith:sourceFunction <- theSource');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/chrome_config.html b/chromium/third_party/catapult/tracing/tracing/extras/chrome_config.html
deleted file mode 100644
index 8e0ef237d64..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/chrome_config.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-The chrome config is heavily used:
- - chrome://tracing,
- - trace2html, which in turn implies
- - adb_profile_chrome
- - telemetry
--->
-
-<link rel="import" href="/tracing/extras/android/android_auditor.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/blame_context.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/frame_tree_node.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/render_frame.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/top_level.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_auditor.html">
-<link rel="import" href="/tracing/extras/chrome/layout_object.html">
-<link rel="import" href="/tracing/extras/chrome/layout_tree.html">
-<link rel="import" href="/tracing/extras/importer/etw/etw_importer.html">
-<link rel="import" href="/tracing/extras/importer/gzip_importer.html">
-<link rel="import" href="/tracing/extras/importer/trace2html_importer.html">
-<link rel="import" href="/tracing/extras/importer/v8/v8_log_importer.html">
-<link rel="import" href="/tracing/extras/importer/zip_importer.html">
-<link rel="import" href="/tracing/extras/lean_config.html">
-<link rel="import" href="/tracing/extras/measure/measure.html">
-<link rel="import" href="/tracing/extras/net/net.html">
-<link rel="import" href="/tracing/extras/systrace_config.html">
-<link rel="import" href="/tracing/extras/v8_config.html">
-<link rel="import" href="/tracing/extras/vsync/vsync_auditor.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/full_config.html b/chromium/third_party/catapult/tracing/tracing/extras/full_config.html
deleted file mode 100644
index 2f157189922..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/full_config.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!-- The full config is all the configs slammed together. -->
-<link rel="import" href="/tracing/extras/chrome_config.html">
-<link rel="import" href="/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html">
-<link rel="import" href="/tracing/extras/lean_config.html">
-<link rel="import" href="/tracing/extras/systrace_config.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/android/event_log_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/android/event_log_importer.html
deleted file mode 100644
index af24ea1cbbc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/android/event_log_importer.html
+++ /dev/null
@@ -1,321 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/importer/simple_line_reader.html">
-<link rel="import" href="/tracing/model/activity.html">
-<link rel="import" href="/tracing/model/model.html">
-
-
-<script>
-/**
- * @fileoverview Imports android event log data into the trace model.
- * Android event log data contains information about activities that
- * are launched/paused, processes that are started, memory usage, etc.
- *
- * The current implementation only parses activity events, with the goal of
- * determining which Activity is running in the foreground for a process.
- *
- * This importer assumes the events arrive as a string. The unit tests provide
- * examples of the trace format.
- */
-'use strict';
-
-tr.exportTo('tr.e.importer.android', function() {
- var Importer = tr.importer.Importer;
-
- var ACTIVITY_STATE = {
- NONE: 'none',
- CREATED: 'created',
- STARTED: 'started',
- RESUMED: 'resumed',
- PAUSED: 'paused',
- STOPPED: 'stopped',
- DESTROYED: 'destroyed'
- };
-
- var activityMap = {};
-
- /**
- * Imports android event log data (adb logcat -b events)
- * @constructor
- */
- function EventLogImporter(model, events) {
- this.model_ = model;
- this.events_ = events;
- this.importPriority = 3;
- }
-
- // Generic format of event log entries.
- // Sample event log entry that this matches (split over 2 lines):
- // 08-11 13:12:31.405 880 2645 I am_focused_activity: [0,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL] // @suppress longLineCheck
- var eventLogActivityRE = new RegExp(
- '(\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.\\d+)' +
- '\\s+(\\d+)\\s+(\\d+)\\s+([A-Z])\\s*' +
- '(am_\\w+)\\s*:(.*)');
-
- // 08-28 03:58:21.834 888 3177 I am_create_activity: [0,5972200,30,com.nxp.taginfolite/.activities.MainView,android.intent.action.MAIN,NULL,NULL,270532608] // @suppress longLineCheck
- // Store the name of the created activity only
- var amCreateRE = new RegExp('\s*\\[.*,.*,.*,(.*),.*,.*,.*,.*\\]');
-
- // 07-22 12:22:19.504 920 2504 I am_focused_activity: [0,com.android.systemui/.recents.RecentsActivity] // @suppress longLineCheck
- //Store the name of the focused activity only
- var amFocusedRE = new RegExp('\s*\\[\\d+,(.*)\\]');
-
- // 07-21 19:56:12.315 920 2261 I am_proc_start: [0,19942,10062,com.google.android.talk,broadcast,com.google.android.talk/com.google.android.apps.hangouts.realtimechat.RealTimeChatService$AlarmReceiver] // @suppress longLineCheck
- // We care about proc starts on behalf of activities, and store the activity
- var amProcStartRE = new RegExp('\s*\\[\\d+,\\d+,\\d+,.*,activity,(.*)\\]');
-
- // 07-22 12:21:43.490 2893 2893 I am_on_resume_called: [0,com.google.android.launcher.GEL] // @suppress longLineCheck
- // Store the activity name only
- var amOnResumeRE = new RegExp('\s*\\[\\d+,(.*)\\]');
-
- // 07-22 12:22:19.545 2893 2893 I am_on_paused_called: [0,com.google.android.launcher.GEL] // @suppress longLineCheck
- // Store the activity name only
- var amOnPauseRE = new RegExp('\s*\\[\\d+,(.*)\\]');
-
- // 08-28 03:51:54.456 888 907 I am_activity_launch_time: [0,185307115,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL,1174,1174] // @suppress longLineCheck
- // Store the activity name and launch times
- var amLaunchTimeRE = new RegExp('\s*\\[\\d+,\\d+,(.*),(\\d+),(\\d+)');
-
- // 08-28 03:58:15.854 888 902 I am_destroy_activity: [0,203516597,29,com.android.chrome/com.google.android.apps.chrome.Main,finish-idle] // @suppress longLineCheck
- // Store the activity name only
- var amDestroyRE = new RegExp('\s*\\[\\d+,\\d+,\\d+,(.*)\\]');
-
- /**
- * @return {boolean} True when events is an android event log array.
- */
- EventLogImporter.canImport = function(events) {
- if (!(typeof(events) === 'string' || events instanceof String))
- return false;
-
- // Prevent the importer from matching this file in vulcanized traces.
- if (/^<!DOCTYPE html>/.test(events))
- return false;
-
- return eventLogActivityRE.test(events);
- };
-
- EventLogImporter.prototype = {
- __proto__: Importer.prototype,
-
- get importerName() {
- return 'EventLogImporter';
- },
-
- get model() {
- return this.model_;
- },
-
- /**
- * @return {string} the full activity name (including package) from
- * a component
- */
- getFullActivityName: function(component) {
- var componentSplit = component.split('/');
- if (componentSplit[1].startsWith('.'))
- return componentSplit[0] + componentSplit[1];
-
- return componentSplit[1];
- },
-
- /**
- * @return {string} the process name of a component
- */
- getProcName: function(component) {
- var componentSplit = component.split('/');
- return componentSplit[0];
- },
-
- findOrCreateActivity: function(activityName) {
- if (activityName in activityMap)
- return activityMap[activityName];
- var activity = {
- state: ACTIVITY_STATE.NONE,
- name: activityName
- };
- activityMap[activityName] = activity;
- return activity;
- },
-
- deleteActivity: function(activityName) {
- delete activityMap[activityName];
- },
-
- handleCreateActivity: function(ts, activityName) {
- var activity = this.findOrCreateActivity(activityName);
- activity.state = ACTIVITY_STATE.CREATED;
- activity.createdTs = ts;
- },
-
- handleFocusActivity: function(ts, procName, activityName) {
- var activity = this.findOrCreateActivity(activityName);
- activity.lastFocusedTs = ts;
- },
-
- handleProcStartForActivity: function(ts, activityName) {
- var activity = this.findOrCreateActivity(activityName);
- activity.procStartTs = ts;
- },
-
- handleOnResumeCalled: function(ts, pid, activityName) {
- var activity = this.findOrCreateActivity(activityName);
- activity.state = ACTIVITY_STATE.RESUMED;
- activity.lastResumeTs = ts;
- // on_resume_called shows the actual PID; use this
- // to link the activity up with a process later
- activity.pid = pid;
- },
-
- handleOnPauseCalled: function(ts, activityName) {
- var activity = this.findOrCreateActivity(activityName);
- activity.state = ACTIVITY_STATE.PAUSED;
- activity.lastPauseTs = ts;
- // Create a new AndroidActivity representing the foreground state,
- // but only if the pause happened within the model bounds
- if (ts > this.model_.bounds.min && ts < this.model_.bounds.max)
- this.addActivityToProcess(activity);
- },
-
- handleLaunchTime: function(ts, activityName, launchTime) {
- var activity = this.findOrCreateActivity(activityName);
- activity.launchTime = launchTime;
- },
-
- handleDestroyActivity: function(ts, activityName) {
- this.deleteActivity(activityName);
- },
-
- addActivityToProcess: function(activity) {
- if (activity.pid === undefined)
- return;
- var process = this.model_.getOrCreateProcess(activity.pid);
- // The range of the activity is the time from resume to time
- // of pause; limit the start time to the beginning of the model
- var range = tr.b.Range.fromExplicitRange(
- Math.max(this.model_.bounds.min, activity.lastResumeTs),
- activity.lastPauseTs);
- var newActivity = new tr.model.Activity(activity.name,
- 'Android Activity', range,
- {created: activity.createdTs,
- procstart: activity.procStartTs,
- lastfocus: activity.lastFocusedTs});
- process.activities.push(newActivity);
- },
-
- parseAmLine_: function(line) {
- var match = eventLogActivityRE.exec(line);
- if (!match)
- return;
-
- // Possible activity life-cycles:
- // 1) Launch from scratch:
- // - am_create_activity
- // - am_focused_activity
- // - am_proc_start
- // - am_proc_bound
- // - am_restart_activity
- // - am_on_resume_called
- // 2) Re-open existing activity
- // - am_focused_activity
- // - am_on_resume_called
-
- // HACK: event log date format is "MM-DD" and doesn't contain the year;
- // to figure out the year, take the min bound of the model, convert
- // to real-time and use that as the year.
- // The Android event log will eventually contain the year once this
- // CL is in a release:
- // https://android-review.googlesource.com/#/c/168900
- var firstRealtimeTs = this.model_.bounds.min -
- this.model_.realtime_to_monotonic_offset_ms;
- var year = new Date(firstRealtimeTs).getFullYear();
- var ts = match[1].substring(0, 5) + '-' + year + ' ' +
- match[1].substring(5, match[1].length);
-
- var monotonicTs = Date.parse(ts) +
- this.model_.realtime_to_monotonic_offset_ms;
-
- var pid = match[2];
- var action = match[5];
- var data = match[6];
-
- if (action === 'am_create_activity') {
- match = amCreateRE.exec(data);
- if (match && match.length >= 2) {
- this.handleCreateActivity(monotonicTs,
- this.getFullActivityName(match[1]));
- }
- } else if (action === 'am_focused_activity') {
- match = amFocusedRE.exec(data);
- if (match && match.length >= 2) {
- this.handleFocusActivity(monotonicTs,
- this.getProcName(match[1]), this.getFullActivityName(match[1]));
- }
- } else if (action === 'am_proc_start') {
- match = amProcStartRE.exec(data);
- if (match && match.length >= 2) {
- this.handleProcStartForActivity(monotonicTs,
- this.getFullActivityName(match[1]));
- }
- } else if (action === 'am_on_resume_called') {
- match = amOnResumeRE.exec(data);
- if (match && match.length >= 2)
- this.handleOnResumeCalled(monotonicTs, pid, match[1]);
- } else if (action === 'am_on_paused_called') {
- match = amOnPauseRE.exec(data);
- if (match && match.length >= 2)
- this.handleOnPauseCalled(monotonicTs, match[1]);
- } else if (action === 'am_activity_launch_time') {
- match = amLaunchTimeRE.exec(data);
- this.handleLaunchTime(monotonicTs,
- this.getFullActivityName(match[1]), match[2]);
- } else if (action === 'am_destroy_activity') {
- match = amDestroyRE.exec(data);
- if (match && match.length === 2) {
- this.handleDestroyActivity(monotonicTs,
- this.getFullActivityName(match[1]));
- }
- }
- },
-
- importEvents: function() {
- // Check if we have a mapping from real-time to CLOCK_MONOTONIC
- if (isNaN(this.model_.realtime_to_monotonic_offset_ms)) {
- this.model_.importWarning({
- type: 'eveng_log_clock_sync',
- message: 'Need a trace_event_clock_sync to map realtime to import.'
- });
- return;
- }
- // Since the event log typically spans a much larger timeframe
- // than the ftrace data, we want to calculate the bounds of the existing
- // model, and dump all event log data outside of those bounds
- this.model_.updateBounds();
-
- var lines = this.events_.split('\n');
- lines.forEach(this.parseAmLine_, this);
-
- // Iterate over all created activities that are not destroyed yet
- for (var activityName in activityMap) {
- var activity = activityMap[activityName];
- // If we're still in the foreground, store the activity anyway
- if (activity.state === ACTIVITY_STATE.RESUMED) {
- // Set the pause timestamp to the end of the model bounds
- activity.lastPauseTs = this.model_.bounds.max;
- this.addActivityToProcess(activity);
- }
- }
- }
- };
-
- Importer.register(EventLogImporter);
-
- return {
- EventLogImporter: EventLogImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer.html
deleted file mode 100644
index 03db04866d9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer.html
+++ /dev/null
@@ -1,184 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-
-<script>
-/**
- * @fileoverview Imports text files in the BattOr format into the
- * Model. This format is output by the battor_agent executable and library.
- *
- * This importer assumes the events arrive as a string. The unit tests provide
- * examples of the trace format.
- */
-'use strict';
-
-tr.exportTo('tr.e.importer.battor', function() {
- /**
- * Imports a BattOr power trace into a specified model.
- * @constructor
- */
- function BattorImporter(model, events) {
- this.importPriority = 3; // runs after the linux_perf importer
- this.model_ = model;
-
- // The list of power samples contained within the trace.
- this.samples_ = [];
- // The clock sync markers contained within the trace.
- this.syncTimestampsById_ = new Map();
-
- this.parseTrace_(events);
- }
-
- var battorDataLineRE = new RegExp(
- '^(-?\\d+\\.\\d+)\\s+(-?\\d+\\.\\d+)\\s+(-?\\d+\\.\\d+)' +
- '(?:\\s+<(\\S+)>)?$'
- );
- var battorHeaderLineRE = /^# BattOr/;
-
- /**
- * Guesses whether the provided events is a BattOr string.
- * Looks for the magic string "# BattOr" at the start of the file,
- *
- * @return {boolean} True when events is a BattOr array.
- */
- BattorImporter.canImport = function(events) {
- if (!(typeof(events) === 'string' || events instanceof String))
- return false;
-
- return battorHeaderLineRE.test(events);
- };
-
- BattorImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'BattorImporter';
- },
-
- get model() {
- return this.model_;
- },
-
- /**
- * Imports clock sync markers from the trace into into this.model_.
- */
- importClockSyncMarkers: function() {
- for (var [syncId, ts] of this.syncTimestampsById_) {
- this.model_.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.BATTOR, syncId, ts);
- }
- },
-
- /**
- * Imports the events from the trace into this.model_.
- */
- importEvents: function() {
- if (this.model_.device.powerSeries) {
- this.model_.importWarning({
- type: 'import_error',
- message: 'Power counter exists, can not import BattOr power trace.'
- });
- return;
- }
-
- var modelTimeTransformer =
- this.model_.clockSyncManager.getModelTimeTransformer(
- tr.model.ClockDomainId.BATTOR);
-
- var powerSeries = this.model_.device.powerSeries =
- new tr.model.PowerSeries(this.model_.device);
- for (var i = 0; i < this.samples_.length; i++) {
- var sample = this.samples_[i];
- powerSeries.addPowerSample(
- modelTimeTransformer(sample.ts), sample.powerInW);
- }
- },
-
- /**
- * Given the BattOr trace as a string, parse it and store the results in
- * this.samples_ and this.syncTimestampsById_.
- */
- parseTrace_: function(trace) {
- var lines = trace.split('\n');
-
- for (var line of lines) {
- line = line.trim();
-
- if (line.length === 0)
- continue;
-
- if (line.startsWith('#'))
- continue;
-
- // Parse power sample.
- var groups = battorDataLineRE.exec(line);
- if (!groups) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Unrecognized line in BattOr trace: ' + line
- });
- continue;
- }
-
- var ts = parseFloat(groups[1]);
- var voltageInV = tr.b.convertUnit(parseFloat(groups[2]),
- tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
- var currentInA = tr.b.convertUnit(parseFloat(groups[3]),
- tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
- var syncId = groups[4];
-
- if (syncId)
- this.syncTimestampsById_.set(syncId, ts);
-
- if (voltageInV < 0 || currentInA < 0) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'The following line in the BattOr trace has a negative ' +
- 'voltage or current, neither of which are allowed: ' + line +
- '. A common cause of this is that the device is charging ' +
- 'while the trace is being recorded.'
- });
- continue;
- }
-
- this.samples_.push(new Sample(ts, voltageInV, currentInA));
- }
- }
- };
-
- /**
- * A sample recorded by a BattOr.
- *
- * @param {number} ts The timestamp (in milliseconds) of the sample.
- * @param {number} voltage The voltage (in volts) at the specified time.
- * @param {number} current The current (in amps) at the specified time.
- *
- * @constructor
- */
- function Sample(ts, voltageInV, currentInA) {
- this.ts = ts;
- this.voltageInV = voltageInV;
- this.currentInA = currentInA;
- }
-
- Sample.prototype = {
- /** Returns the instantaneous power consumption (in Watts). */
- get powerInW() { return this.voltageInV * this.currentInA; }
- };
-
- tr.importer.Importer.register(BattorImporter);
-
- return {
- BattorImporter: BattorImporter
- };
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer_test.html
deleted file mode 100644
index a5e347caede..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/battor_importer_test.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/battor_importer.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var CHROMIUM_EVENTS = [
- {
- name: 'a', args: {}, pid: 52, ts: 0,
- cat: 'foo', tid: 53, ph: 'B'
- },
- {
- pid: 94936, tid: 5643, ts: 15000,
- ph: 'c', cat: '__metadata', name: 'clock_sync',
- args: {sync_id: 'ABCDEF-01234-5678-0A1B2C3D', issue_ts: 10000},
- tts: 16496444
- }
- ];
-
- var BATTOR_LINES = [
- '# BattOr',
- '# voltage_range [0.0, 6144.0] mV',
- '# current_range [0.0, 2275.5] mA',
- '# sample_rate 2000 Hz, gain 5.0x',
- '0.000000 0.000000 4000.000000',
- '0.500000 0.000000 4000.000000',
- '1.000000 0.000000 4000.000000',
- '1.500000 0.000000 4000.000000',
- '2.000000 1.000000 4000.000000'
- ];
-
- test('canImport', function() {
- assert.isFalse(tr.e.importer.battor.BattorImporter.canImport('string'));
- assert.isFalse(tr.e.importer.battor.BattorImporter.canImport([]));
- assert.isTrue(tr.e.importer.battor.BattorImporter.canImport(
- BATTOR_LINES.join('\n')));
- });
-
- test('importExplicitClockSync', function() {
- // Add a BattOr sample with an explicit clock sync.
- var battorLinesWithExplicitSync = BATTOR_LINES.slice();
- battorLinesWithExplicitSync.push(
- '2.500000 1.000000 4000.000000 <ABCDEF-01234-5678-0A1B2C3D>');
-
- var m = tr.c.TestUtils.newModelWithEvents(
- [CHROMIUM_EVENTS, battorLinesWithExplicitSync.join('\n')]);
-
- // Check to see if power samples were imported successfully.
- assert.isDefined(m.device.powerSeries);
-
- assert.strictEqual(m.device.powerSeries.samples[0].start, 7.5);
- assert.strictEqual(m.device.powerSeries.samples[5].start, 10.0);
- });
-
- test('importExplicitClockSync_syncOnNegativeVoltageLine', function() {
- // Add a BattOr sample with an explicit clock sync that occurs on a line
- // with a negative voltage measurement. The sample should be ignored, but
- // the clock sync should be counted.
- var battorLinesWithExplicitSync = BATTOR_LINES.slice();
- battorLinesWithExplicitSync.push(
- '2.500000 -1.000000 4000.000000 <ABCDEF-01234-5678-0A1B2C3D>');
-
- var m = tr.c.TestUtils.newModelWithEvents(
- [CHROMIUM_EVENTS, battorLinesWithExplicitSync.join('\n')]);
-
- // Check to see if power samples were imported successfully.
- assert.isDefined(m.device.powerSeries);
-
- assert.lengthOf(m.device.powerSeries.samples, 5);
- assert.strictEqual(m.device.powerSeries.samples[0].start, 7.5);
- });
-
- test('explicitClockSyncWithoutSyncMarkers', function() {
- // Create an empty model.
- var m = new tr.Model();
- var io = new tr.importer.ImportOptions();
- io.showImportWarnings = false;
- m.importOptions = io;
-
- // Add a BattOr sample with an explicit clock sync.
- var battorLinesWithExplicitSync = BATTOR_LINES.slice();
- battorLinesWithExplicitSync.push(
- '2.500000 1.000000 4000.000000 <ABCDEF-01234-5678-0A1B2C3D>');
-
- var m = tr.c.TestUtils.newModelWithEvents(
- [battorLinesWithExplicitSync.join('\n')]);
-
- assert.lengthOf(m.device.powerSeries.samples, 6);
- assert.strictEqual(m.device.powerSeries.samples[0].start, 0);
- assert.strictEqual(m.device.powerSeries.samples[5].start, 2.5);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer.html
deleted file mode 100644
index a4019cefcd1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer.html
+++ /dev/null
@@ -1,221 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/jszip.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-/**
- * @fileoverview Blah.
- */
-'use strict';
-
-tr.exportTo('tr.e.importer.ddms', function() {
- var kPid = 0;
- var kCategory = 'java';
- var kMethodLutEndMarker = '\n*end\n';
- var kThreadsStart = '\n*threads\n';
- var kMethodsStart = '\n*methods\n';
-
- var kTraceMethodEnter = 0x00; // method entry
- var kTraceMethodExit = 0x01; // method exit
- var kTraceUnroll = 0x02; // method exited by exception unrolling
- // 0x03 currently unused
- var kTraceMethodActionMask = 0x03; // two bits
-
- var kTraceHeaderLength = 32;
- var kTraceMagicValue = 0x574f4c53;
- var kTraceVersionSingleClock = 2;
- var kTraceVersionDualClock = 3;
- var kTraceRecordSizeSingleClock = 10; // using v2
- var kTraceRecordSizeDualClock = 14; // using v3 with two timestamps
-
- function Reader(stringPayload) {
- this.position_ = 0;
- this.data_ = JSZip.utils.transformTo('uint8array', stringPayload);
- }
-
- Reader.prototype = {
- __proto__: Object.prototype,
-
- uint8: function() {
- var result = this.data_[this.position_];
- this.position_ += 1;
- return result;
- },
-
- uint16: function() {
- var result = 0;
- result += this.uint8();
- result += this.uint8() << 8;
- return result;
- },
-
- uint32: function() {
- var result = 0;
- result += this.uint8();
- result += this.uint8() << 8;
- result += this.uint8() << 16;
- result += this.uint8() << 24;
- return result;
- },
-
- uint64: function() {
- // Javascript isn't able to manage 64-bit numeric values.
- var low = this.uint32();
- var high = this.uint32();
- var lowStr = ('0000000' + low.toString(16)).substr(-8);
- var highStr = ('0000000' + high.toString(16)).substr(-8);
- var result = highStr + lowStr;
- return result;
- },
-
- seekTo: function(position) {
- this.position_ = position;
- },
-
- hasMore: function() {
- return this.position_ < this.data_.length;
- }
- };
-
- /**
- * Imports DDMS method tracing events into a specified model.
- * @constructor
- */
- function DdmsImporter(model, data) {
- this.importPriority = 3;
- this.model_ = model;
- this.data_ = data;
- }
-
- /**
- * Guesses whether the provided events is from a DDMS method trace.
- * @return {boolean} True when events is a DDMS method trace.
- */
- DdmsImporter.canImport = function(data) {
- if (typeof(data) === 'string' || data instanceof String) {
- var header = data.slice(0, 1000);
- return header.startsWith('*version\n') &&
- header.indexOf('\nvm=') >= 0 &&
- header.indexOf(kThreadsStart) >= 0;
- }
- /* key bit */
- return false;
- };
-
- DdmsImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'DdmsImporter';
- },
-
- get model() {
- return this.model_;
- },
-
- /**
- * Imports the data in this.data_ into this.model_.
- */
- importEvents: function() {
- var divider = this.data_.indexOf(kMethodLutEndMarker) +
- kMethodLutEndMarker.length;
- this.metadata_ = this.data_.slice(0, divider);
- this.methods_ = {};
- this.parseThreads();
- this.parseMethods();
-
- var traceReader = new Reader(this.data_.slice(divider));
- var magic = traceReader.uint32();
- if (magic !== kTraceMagicValue) {
- throw Error('Failed to match magic value');
- }
- this.version_ = traceReader.uint16();
- if (this.version_ !== kTraceVersionDualClock) {
- throw Error('Unknown version');
- }
- var dataOffest = traceReader.uint16();
- var startDateTime = traceReader.uint64();
- var recordSize = traceReader.uint16();
-
- traceReader.seekTo(dataOffest);
-
- while (traceReader.hasMore()) {
- this.parseTraceEntry(traceReader);
- }
- },
-
- parseTraceEntry: function(reader) {
- var tid = reader.uint16();
- var methodPacked = reader.uint32();
- var cpuSinceStart = reader.uint32();
- var wallClockSinceStart = reader.uint32();
- var method = methodPacked & ~kTraceMethodActionMask;
- var action = methodPacked & kTraceMethodActionMask;
- var thread = this.getTid(tid);
- method = this.getMethodName(method);
- if (action === kTraceMethodEnter) {
- thread.sliceGroup.beginSlice(kCategory, method, wallClockSinceStart,
- undefined, cpuSinceStart);
- } else if (thread.sliceGroup.openSliceCount) {
- thread.sliceGroup.endSlice(wallClockSinceStart, cpuSinceStart);
- }
- },
-
- parseThreads: function() {
- var threads = this.metadata_.slice(this.metadata_.indexOf(kThreadsStart) +
- kThreadsStart.length);
- threads = threads.slice(0, threads.indexOf('\n*'));
- threads = threads.split('\n');
- threads.forEach(this.parseThread.bind(this));
- },
-
- parseThread: function(threadLine) {
- var tid = threadLine.slice(0, threadLine.indexOf('\t'));
- var thread = this.getTid(parseInt(tid));
- thread.name = threadLine.slice(threadLine.indexOf('\t') + 1);
- },
-
- getTid: function(tid) {
- return this.model_.getOrCreateProcess(kPid)
- .getOrCreateThread(tid);
- },
-
- parseMethods: function() {
- var methods = this.metadata_.slice(this.metadata_.indexOf(kMethodsStart) +
- kMethodsStart.length);
- methods = methods.slice(0, methods.indexOf('\n*'));
- methods = methods.split('\n');
- methods.forEach(this.parseMethod.bind(this));
- },
-
- parseMethod: function(methodLine) {
- var data = methodLine.split('\t');
- var methodId = parseInt(data[0]);
- var methodName = data[1] + '.' + data[2] + data[3];
- this.addMethod(methodId, methodName);
- },
-
- addMethod: function(methodId, methodName) {
- this.methods_[methodId] = methodName;
- },
-
- getMethodName: function(methodId) {
- return this.methods_[methodId];
- }
- };
-
- // Register the DdmsImporter to the Importer.
- tr.importer.Importer.register(DdmsImporter);
-
- return {
- DdmsImporter: DdmsImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer_test.html
deleted file mode 100644
index 997556b7273..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/ddms_importer_test.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/ddms_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Base64 = tr.b.Base64;
-
- test('canImport', function() {
- assert.isFalse(tr.e.importer.ddms.DdmsImporter.canImport('string'));
- assert.isFalse(tr.e.importer.ddms.DdmsImporter.canImport([]));
- assert.isTrue(tr.e.importer.ddms.DdmsImporter.canImport(TEST_DATA));
- });
-
- test('parseThreads', function() {
- var m = tr.c.TestUtils.newModelWithEvents(TEST_DATA, {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 2);
- threads = m.findAllThreadsNamed('main');
- assert.equal(threads.length, 1);
- var thread = threads[0];
- assert.equal(thread.tid, 2703);
- });
-
- test('parseMethods', function() {
- var m = tr.c.TestUtils.newModelWithEvents(TEST_DATA, {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.findAllThreadsNamed('Binder_1');
- assert.equal(threads.length, 1);
- var thread = threads[0];
- assert.equal(thread.sliceGroup.length, 22);
- assert.equal('android.os.Binder.execTransact(IJJI)Z',
- thread.sliceGroup.slices[0].title);
- });
-
- var TEST_DATA = Base64.atob(
- 'KnZlcnNpb24KMwpkYXRhLWZpbGUtb3ZlcmZsb3c9ZmFsc2UKY2' +
- 'xvY2s9ZHVhbAplbGFwc2VkLXRpbWUtdXNlYz02MzMwNzc5Cm51' +
- 'bS1tZXRob2QtY2FsbHM9NzYKY2xvY2stY2FsbC1vdmVyaGVhZC' +
- '1uc2VjPTMzNDMKdm09YXJ0Cip0aHJlYWRzCjI3MDMJbWFpbgoy' +
- 'NzEwCUhlYXAgdGhyZWFkIHBvb2wgd29ya2VyIHRocmVhZCAxCj' +
- 'I3MDkJSGVhcCB0aHJlYWQgcG9vbCB3b3JrZXIgdGhyZWFkIDAK' +
- 'MjcxMQlIZWFwIHRocmVhZCBwb29sIHdvcmtlciB0aHJlYWQgMg' +
- 'oyNzEyCVNpZ25hbCBDYXRjaGVyCjI3MTMJSkRXUAoyNzE0CVJl' +
- 'ZmVyZW5jZVF1ZXVlRGFlbW9uCjI3MTUJRmluYWxpemVyRGFlbW' +
- '9uCjI3MTYJRmluYWxpemVyV2F0Y2hkb2dEYWVtb24KMjcxNwlI' +
- 'ZWFwVHJpbW1lckRhZW1vbgoyNzE4CUdDRGFlbW9uCjI3MTkJQm' +
- 'luZGVyXzEKMjcyMAlCaW5kZXJfMgoyNzI3CVJlbmRlclRocmVh' +
- 'ZAoyNzI4CUFzeW5jVGFzayAjMQoyNzI5CUFzeW5jVGFzayAjMg' +
- 'oyNzMwCUJpbmRlcl8zCjExNTk4CWh3dWlUYXNrMQoxMTU5OQlo' +
- 'd3VpVGFzazIKMTE2MDAJQXN5bmNUYXNrICMzCjExNjAxCUFzeW' +
- '5jVGFzayAjNAoxMTY3MwlBc3luY1Rhc2sgIzUKKm1ldGhvZHMK' +
- 'MHg3MGZiNzc1OAlkYWx2aWsuc3lzdGVtLkNsb3NlR3VhcmQJY2' +
- 'xvc2UJKClWCUNsb3NlR3VhcmQuamF2YQoweDcwZmI4NDE4CWRh' +
- 'bHZpay5zeXN0ZW0uVk1EZWJ1ZwlzdGFydE1ldGhvZFRyYWNpbm' +
- 'cJKExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2lvL0ZpbGVEZXNj' +
- 'cmlwdG9yO0lJWkkpVglWTURlYnVnLmphdmEKMHg3MGZlYTcyOA' +
- 'lqYXZhLnV0aWwuQXJyYXlMaXN0CXNpemUJKClJCUFycmF5TGlz' +
- 'dC5qYXZhCjB4NzEwMTNmYTgJbGliY29yZS5pby5CbG9ja0d1YX' +
- 'JkT3MJY2xvc2UJKExqYXZhL2lvL0ZpbGVEZXNjcmlwdG9yOylW' +
- 'CUJsb2NrR3VhcmRPcy5qYXZhCjB4NzEwNTc3NDgJYW5kcm9pZC' +
- '5vcy5CaW5kZXIJZXhlY1RyYW5zYWN0CShJSkpJKVoJQmluZGVy' +
- 'LmphdmEKMHg3MTA3MTdlOAlhbmRyb2lkLmFwcC5BY3Rpdml0eV' +
- 'RocmVhZCRBcHBsaWNhdGlvblRocmVhZAlwcm9maWxlckNvbnRy' +
- 'b2wJKFpMYW5kcm9pZC9hcHAvUHJvZmlsZXJJbmZvO0kpVglBY3' +
- 'Rpdml0eVRocmVhZC5qYXZhCjB4NzEwNzJhNDgJYW5kcm9pZC5h' +
- 'cHAuQXBwbGljYXRpb25UaHJlYWROYXRpdmUJb25UcmFuc2FjdA' +
- 'koSUxhbmRyb2lkL29zL1BhcmNlbDtMYW5kcm9pZC9vcy9QYXJj' +
- 'ZWw7SSlaCUFwcGxpY2F0aW9uVGhyZWFkTmF0aXZlLmphdmEKMH' +
- 'g3MTA3MmYyOAlhbmRyb2lkLm9zLkhhbmRsZXIJZW5xdWV1ZU1l' +
- 'c3NhZ2UJKExhbmRyb2lkL29zL01lc3NhZ2VRdWV1ZTtMYW5kcm' +
- '9pZC9vcy9NZXNzYWdlO0opWglIYW5kbGVyLmphdmEKMHg3MTA3' +
- 'MmZlOAlhbmRyb2lkLm9zLkhhbmRsZXIJZGlzcGF0Y2hNZXNzYW' +
- 'dlCShMYW5kcm9pZC9vcy9NZXNzYWdlOylWCUhhbmRsZXIuamF2' +
- 'YQoweDcxMDczNTI4CWFuZHJvaWQub3MuSGFuZGxlcglzZW5kTW' +
- 'Vzc2FnZQkoTGFuZHJvaWQvb3MvTWVzc2FnZTspWglIYW5kbGVy' +
- 'LmphdmEKMHg3MTA3MzU4OAlhbmRyb2lkLm9zLkhhbmRsZXIJc2' +
- 'VuZE1lc3NhZ2VBdFRpbWUJKExhbmRyb2lkL29zL01lc3NhZ2U7' +
- 'SilaCUhhbmRsZXIuamF2YQoweDcxMDczNWI4CWFuZHJvaWQub3' +
- 'MuSGFuZGxlcglzZW5kTWVzc2FnZURlbGF5ZWQJKExhbmRyb2lk' +
- 'L29zL01lc3NhZ2U7SilaCUhhbmRsZXIuamF2YQoweDcxMDczNj' +
- 'Q4CWFuZHJvaWQuYXBwLkFjdGl2aXR5VGhyZWFkJEgJaGFuZGxl' +
- 'TWVzc2FnZQkoTGFuZHJvaWQvb3MvTWVzc2FnZTspVglBY3Rpdm' +
- 'l0eVRocmVhZC5qYXZhCjB4NzEwNzM3NjgJYW5kcm9pZC5hcHAu' +
- 'QWN0aXZpdHlUaHJlYWQkUHJvZmlsZXIJc3RhcnRQcm9maWxpbm' +
- 'cJKClWCUFjdGl2aXR5VGhyZWFkLmphdmEKMHg3MTA3Mzc5OAlh' +
- 'bmRyb2lkLmFwcC5BY3Rpdml0eVRocmVhZCRQcm9maWxlcglzdG' +
- '9wUHJvZmlsaW5nCSgpVglBY3Rpdml0eVRocmVhZC5qYXZhCjB4' +
- 'NzEwYzQ2ZDgJYW5kcm9pZC5vcy5NZXNzYWdlCW9idGFpbgkoKU' +
- 'xhbmRyb2lkL29zL01lc3NhZ2U7CU1lc3NhZ2UuamF2YQoweDcx' +
- 'MGM0YTM4CWFuZHJvaWQub3MuTWVzc2FnZQlpc0luVXNlCSgpWg' +
- 'lNZXNzYWdlLmphdmEKMHg3MTBjNGE2OAlhbmRyb2lkLm9zLk1l' +
- 'c3NhZ2UJbWFya0luVXNlCSgpVglNZXNzYWdlLmphdmEKMHg3MT' +
- 'BjNGFmOAlhbmRyb2lkLm9zLk1lc3NhZ2UJcmVjeWNsZVVuY2hl' +
- 'Y2tlZAkoKVYJTWVzc2FnZS5qYXZhCjB4NzEwYzRmMTgJYW5kcm' +
- '9pZC5vcy5QYXJjZWwJaW5pdAkoSilWCVBhcmNlbC5qYXZhCjB4' +
- 'NzEwYzRmYTgJYW5kcm9pZC5vcy5QYXJjZWwJb2J0YWluCShKKU' +
- 'xhbmRyb2lkL29zL1BhcmNlbDsJUGFyY2VsLmphdmEKMHg3MTBj' +
- 'NTQyOAlhbmRyb2lkLm9zLlBhcmNlbAllbmZvcmNlSW50ZXJmYW' +
- 'NlCShMamF2YS9sYW5nL1N0cmluZzspVglQYXJjZWwuamF2YQow' +
- 'eDcxMGM1OWY4CWFuZHJvaWQub3MuUGFyY2VsCXJlYWRJbnQJKC' +
- 'lJCVBhcmNlbC5qYXZhCjB4NzEwYzZhNDgJYW5kcm9pZC5vcy5Q' +
- 'YXJjZWxGaWxlRGVzY3JpcHRvcgljbG9zZVdpdGhTdGF0dXMJKE' +
- 'lMamF2YS9sYW5nL1N0cmluZzspVglQYXJjZWxGaWxlRGVzY3Jp' +
- 'cHRvci5qYXZhCjB4NzEwYzZkNzgJYW5kcm9pZC5vcy5QYXJjZW' +
- 'xGaWxlRGVzY3JpcHRvcgl3cml0ZUNvbW1TdGF0dXNBbmRDbG9z' +
- 'ZQkoSUxqYXZhL2xhbmcvU3RyaW5nOylWCVBhcmNlbEZpbGVEZX' +
- 'NjcmlwdG9yLmphdmEKMHg3MTBjNmUwOAlhbmRyb2lkLm9zLlBh' +
- 'cmNlbEZpbGVEZXNjcmlwdG9yCWNsb3NlCSgpVglQYXJjZWxGaW' +
- 'xlRGVzY3JpcHRvci5qYXZhCjB4NzEwYzZmZTgJYW5kcm9pZC5v' +
- 'cy5QYXJjZWxGaWxlRGVzY3JpcHRvcglyZWxlYXNlUmVzb3VyY2' +
- 'VzCSgpVglQYXJjZWxGaWxlRGVzY3JpcHRvci5qYXZhCjB4NzEx' +
- 'NWIwZjgJYW5kcm9pZC5vcy5NZXNzYWdlUXVldWUJZW5xdWV1ZU' +
- '1lc3NhZ2UJKExhbmRyb2lkL29zL01lc3NhZ2U7SilaCU1lc3Nh' +
- 'Z2VRdWV1ZS5qYXZhCjB4NzExNWIyMTgJYW5kcm9pZC5vcy5NZX' +
- 'NzYWdlUXVldWUJbmV4dAkoKUxhbmRyb2lkL29zL01lc3NhZ2U7' +
- 'CU1lc3NhZ2VRdWV1ZS5qYXZhCjB4NzE3ZTM2MzAJZGFsdmlrLn' +
- 'N5c3RlbS5WTURlYnVnCXN0YXJ0TWV0aG9kVHJhY2luZ0ZkCShM' +
- 'amF2YS9sYW5nL1N0cmluZztMamF2YS9pby9GaWxlRGVzY3JpcH' +
- 'RvcjtJSVpJKVYJVk1EZWJ1Zy5qYXZhCjB4NzE4MTBhMjAJamF2' +
- 'YS5pby5GaWxlRGVzY3JpcHRvcglpc1NvY2tldAkoKVoJRmlsZU' +
- 'Rlc2NyaXB0b3IuamF2YQoweDcxODEwYWUwCWphdmEuaW8uRmls' +
- 'ZURlc2NyaXB0b3IJdmFsaWQJKClaCUZpbGVEZXNjcmlwdG9yLm' +
- 'phdmEKMHg3MTgxYmI4MAlsaWJjb3JlLmlvLklvVXRpbHMJY2xv' +
- 'c2UJKExqYXZhL2lvL0ZpbGVEZXNjcmlwdG9yOylWCUlvVXRpbH' +
- 'MuamF2YQoweDcxODFiYmIwCWxpYmNvcmUuaW8uSW9VdGlscwlj' +
- 'bG9zZVF1aWV0bHkJKExqYXZhL2lvL0ZpbGVEZXNjcmlwdG9yOy' +
- 'lWCUlvVXRpbHMuamF2YQoweDcxODIxZWUwCWFuZHJvaWQuYXBw' +
- 'LkFjdGl2aXR5VGhyZWFkCWFjY2VzcyQzMDAJKExhbmRyb2lkL2' +
- 'FwcC9BY3Rpdml0eVRocmVhZDtJTGphdmEvbGFuZy9PYmplY3Q7' +
- 'SUkpVglBY3Rpdml0eVRocmVhZC5qYXZhCjB4NzE4MjJhZTAJYW' +
- '5kcm9pZC5hcHAuQWN0aXZpdHlUaHJlYWQJc2VuZE1lc3NhZ2UJ' +
- 'KElMamF2YS9sYW5nL09iamVjdDtJSSlWCUFjdGl2aXR5VGhyZW' +
- 'FkLmphdmEKMHg3MTgyMmIxMAlhbmRyb2lkLmFwcC5BY3Rpdml0' +
- 'eVRocmVhZAlzZW5kTWVzc2FnZQkoSUxqYXZhL2xhbmcvT2JqZW' +
- 'N0O0lJWilWCUFjdGl2aXR5VGhyZWFkLmphdmEKMHg3MTgyMzIz' +
- 'MAlhbmRyb2lkLmFwcC5BY3Rpdml0eVRocmVhZAloYW5kbGVQcm' +
- '9maWxlckNvbnRyb2wJKFpMYW5kcm9pZC9hcHAvUHJvZmlsZXJJ' +
- 'bmZvO0kpVglBY3Rpdml0eVRocmVhZC5qYXZhCjB4NzE4MzY3MD' +
- 'AJYW5kcm9pZC5vcy5EZWJ1ZwlzdG9wTWV0aG9kVHJhY2luZwko' +
- 'KVYJRGVidWcuamF2YQoqZW5kClNMT1cDACAASxycoWkAAAAOAA' +
- 'AAAAAAAAAAAAAAAAAAjwoxNn5xxtotAKISAgCPChmE+3CT4y0A' +
- '/hsCAI8KaTcHcbbkLQAtNQIAjwoIbgxx0eQtAEc1AgCPCkhqDH' +
- 'Hk5C0AWjUCAI8KWHf7cPLkLQBoNQIAjwpZd/tw/eQtAHM1AgCP' +
- 'CnhtDHED5S0AeTUCAI8KeW0McQjlLQB+NQIAjwqwu4FxFOUtAI' +
- 'o1AgCPCoC7gXEa5S0AkDUCAI8K4AqBcSPlLQCaNQIAjwrhCoFx' +
- 'KuUtAKE1AgCPCqg/AXE65S0AsTUCAI8KIAqBcUDlLQC2NQIAjw' +
- 'ohCoFxTuUtAMU1AgCPCqk/AXFn5S0A3jUCAI8KgbuBcWzlLQDi' +
- 'NQIAjwqxu4Fxb+UtAOU1AgCPCuhvDHF15S0A6zUCAI8K6W8McX' +
- 'nlLQDvNQIAjwpJagxxfOUtAPI1AgCPCgluDHGB5S0A9zUCAI8K' +
- 'MTKCcYXlLQD6NQIAjwpJNgdxjOUtAAM2AgCPCukvB3GS5S0ACT' +
- 'YCAI8K+EoMcaTlLQAbNgIAjwr5SgxxwOUtADY2AgCPChiyFXHH' +
- '5S0APTYCAI8KKKf+cPHlLQBnNgIAjwopp/5w++UtAHE2AgCfCk' +
- 'h3BXHy2wAAu5RgAJ8KqE8McSvcAADwlGAAnwoYTwxxaNwAACyV' +
- 'YACfChlPDHGD3AAARpVgAJ8KqU8McZbcAABZlWAAnwqoTwxxrN' +
- 'wAAG6VYACfChhPDHHL3AAAjpVgAJ8KGU8MceDcAACjlWAAnwqp' +
- 'Twxx8twAALSVYACfCkgqB3Ea3QAA3ZVgAJ8KKFQMcUHdAAAFlm' +
- 'AAnwopVAxxjN0AAFGWYACfCvhZDHHD3QAAiJZgAJ8K+VkMcejd' +
- 'AACslmAAnwr4WQxxAN4AAMOWYACfCvlZDHEa3gAA3ZZgAJ8K+F' +
- 'kMcS/eAADylmAAnwr5WQxxR94AAAqXYACfCugXB3Fv3gAAM5dg' +
- 'AJ8K4B6CcYveAABPl2AAnwrgKoJxrN4AAHCXYACfChArgnHQ3g' +
- 'AAkpdgAJ8K2EYMceTeAACml2AAnwrZRgxxDd8AANCXYACfCig1' +
- 'B3Er3wAA7pdgAJ8KuDUHcT7fAAAAmGAAnwqINQdxa98AAC+YYA' +
- 'CfCigvB3GD3wAASJhgAJ8K+LAVcaDfAABjmGAAnwo4Sgxxtt8A' +
- 'AHiYYACfCjlKDHHL3wAAkJhgAJ8KaEoMce3fAACxmGAAnwppSg' +
- 'xxAuAAAMWYYACfCvmwFXFz4AAAOJlgAI8KGbIVcU3mLQBAmWAA' +
- 'jwroLwdxVuYtAEmZYACfCikvB3GG4AAASZlgAI8KSDYHcVzmLQ' +
- 'BPmWAAjwowMoJxZuYtAFmZYACfCok1B3GW4AAAWJlgAI8KmDcH' +
- 'cXTmLQBnmWAAnwq5NQdxr+AAAHGZYACPCgBng3GC5i0AdplgAJ' +
- '8KKTUHcb3gAAB/mWAAnwoRK4JxzOAAAI6ZYAA=');
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer.html
deleted file mode 100644
index 215978b75f2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer.html
+++ /dev/null
@@ -1,477 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/extras/importer/etw/eventtrace_parser.html">
-<link rel="import" href="/tracing/extras/importer/etw/process_parser.html">
-<link rel="import" href="/tracing/extras/importer/etw/thread_parser.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-/**
- * @fileoverview Imports JSON file with the raw payloads from a Windows event
- * trace into the Model. This format is outputted by Chrome running
- * on a Windows system.
- *
- * This importer assumes the events arrived as a JSON file and the payloads are
- * undecoded sequence of bytes in hex format string. The unit tests provide
- * examples of the trace format.
- *
- * The format of the system trace is
- * {
- * name: 'ETW',
- * content: [ <events> ]
- * }
- *
- * where the <events> are dictionary values with fields.
- *
- * {
- * guid: "1234-...", // The unique GUID for the event.
- * op: 12, // The opcode of the event.
- * ver: 1, // The encoding version of the event.
- * cpu: 0, // The cpu id on which the event was captured.
- * ts: 1092, // The thread id on which the event was captured.
- * payload: "aaaa" // A base64 encoded string of the raw payload.
- * }
- *
- * The payload is an undecoded version of the raw event sent by ETW.
- * This importer uses specific parsers to decode recognized events.
- * A parser need to register the recognized event by calling
- * registerEventHandler(guid, opcode, handler). The parser is responsible to
- * decode the payload and update the Model.
- *
- * The payload formats are described there:
- * http://msdn.microsoft.com/en-us/library/windows/desktop/aa364085(v=vs.85).aspx
- *
- */
-'use strict';
-
-tr.exportTo('tr.e.importer.etw', function() {
- // GUID and opcode of a Thread DCStart event, as defined at the link above.
- var kThreadGuid = '3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';
- var kThreadDCStartOpcode = 3;
-
- /**
- * Represents the raw bytes payload decoder.
- * @constructor
- */
- function Decoder() {
- this.payload_ = new DataView(new ArrayBuffer(256));
- }
-
- Decoder.prototype = {
- __proto__: Object.prototype,
-
- reset: function(base64Payload) {
- var decodedSize = tr.b.Base64.getDecodedBufferLength(base64Payload);
- if (decodedSize > this.payload_.byteLength)
- this.payload_ = new DataView(new ArrayBuffer(decodedSize));
-
- tr.b.Base64.DecodeToTypedArray(base64Payload, this.payload_);
- this.position_ = 0;
- },
-
- skip: function(length) {
- this.position_ += length;
- },
-
- decodeUInt8: function() {
- var result = this.payload_.getUint8(this.position_, true);
- this.position_ += 1;
- return result;
- },
-
- decodeUInt16: function() {
- var result = this.payload_.getUint16(this.position_, true);
- this.position_ += 2;
- return result;
- },
-
- decodeUInt32: function() {
- var result = this.payload_.getUint32(this.position_, true);
- this.position_ += 4;
- return result;
- },
-
- decodeUInt64ToString: function() {
- // Javascript isn't able to manage 64-bit numeric values.
- var low = this.decodeUInt32();
- var high = this.decodeUInt32();
- var lowStr = ('0000000' + low.toString(16)).substr(-8);
- var highStr = ('0000000' + high.toString(16)).substr(-8);
- var result = highStr + lowStr;
- return result;
- },
-
- decodeInt8: function() {
- var result = this.payload_.getInt8(this.position_, true);
- this.position_ += 1;
- return result;
- },
-
- decodeInt16: function() {
- var result = this.payload_.getInt16(this.position_, true);
- this.position_ += 2;
- return result;
- },
-
- decodeInt32: function() {
- var result = this.payload_.getInt32(this.position_, true);
- this.position_ += 4;
- return result;
- },
-
- decodeInt64ToString: function() {
- // Javascript isn't able to manage 64-bit numeric values.
- // Fallback to unsigned 64-bit hexa value.
- return this.decodeUInt64ToString();
- },
-
- decodeUInteger: function(is64) {
- if (is64)
- return this.decodeUInt64ToString();
- return this.decodeUInt32();
- },
-
- decodeString: function() {
- var str = '';
- while (true) {
- var c = this.decodeUInt8();
- if (!c)
- return str;
- str = str + String.fromCharCode(c);
- }
- },
-
- decodeW16String: function() {
- var str = '';
- while (true) {
- var c = this.decodeUInt16();
- if (!c)
- return str;
- str = str + String.fromCharCode(c);
- }
- },
-
- decodeFixedW16String: function(length) {
- var oldPosition = this.position_;
- var str = '';
- for (var i = 0; i < length; i++) {
- var c = this.decodeUInt16();
- if (!c)
- break;
- str = str + String.fromCharCode(c);
- }
-
- // Move the position after the fixed buffer (i.e. wchar[length]).
- this.position_ = oldPosition + 2 * length;
- return str;
- },
-
- decodeBytes: function(length) {
- var bytes = [];
- for (var i = 0; i < length; ++i) {
- var c = this.decodeUInt8();
- bytes.push(c);
- }
- return bytes;
- },
-
- decodeSID: function(is64) {
- // Decode the TOKEN_USER structure.
- var pSid = this.decodeUInteger(is64);
- var attributes = this.decodeUInt32();
-
- // Skip padding.
- if (is64)
- this.decodeUInt32();
-
- // Decode the SID structure.
- var revision = this.decodeUInt8();
- var subAuthorityCount = this.decodeUInt8();
- this.decodeUInt16();
- this.decodeUInt32();
-
- if (revision !== 1)
- throw 'Invalid SID revision: could not decode the SID structure.';
-
- var sid = this.decodeBytes(4 * subAuthorityCount);
-
- return {
- pSid: pSid,
- attributes: attributes,
- sid: sid
- };
- },
-
- decodeSystemTime: function() {
- // Decode the SystemTime structure.
- var wYear = this.decodeInt16();
- var wMonth = this.decodeInt16();
- var wDayOfWeek = this.decodeInt16();
- var wDay = this.decodeInt16();
- var wHour = this.decodeInt16();
- var wMinute = this.decodeInt16();
- var wSecond = this.decodeInt16();
- var wMilliseconds = this.decodeInt16();
- return {
- wYear: wYear,
- wMonth: wMonth,
- wDayOfWeek: wDayOfWeek,
- wDay: wDay,
- wHour: wHour,
- wMinute: wMinute,
- wSecond: wSecond,
- wMilliseconds: wMilliseconds
- };
- },
-
- decodeTimeZoneInformation: function() {
- // Decode the TimeZoneInformation structure.
- var bias = this.decodeUInt32();
- var standardName = this.decodeFixedW16String(32);
- var standardDate = this.decodeSystemTime();
- var standardBias = this.decodeUInt32();
- var daylightName = this.decodeFixedW16String(32);
- var daylightDate = this.decodeSystemTime();
- var daylightBias = this.decodeUInt32();
- return {
- bias: bias,
- standardName: standardName,
- standardDate: standardDate,
- standardBias: standardBias,
- daylightName: daylightName,
- daylightDate: daylightDate,
- daylightBias: daylightBias
- };
- }
-
- };
-
- /**
- * Imports Windows ETW kernel events into a specified model.
- * @constructor
- */
- function EtwImporter(model, events) {
- this.importPriority = 3;
- this.model_ = model;
- this.events_ = events;
- this.handlers_ = {};
- this.decoder_ = new Decoder();
- this.walltime_ = undefined;
- this.ticks_ = undefined;
- this.is64bit_ = undefined;
-
- // A map of tids to their process pid. On Windows, the tid is global to
- // the system and doesn't need to belong to a process. As many events
- // only provide tid, this map allows to retrieve the parent process.
- this.tidsToPid_ = {};
-
- // Instantiate the parsers; this will register handlers for known events.
- var allTypeInfos = tr.e.importer.etw.Parser.getAllRegisteredTypeInfos();
- this.parsers_ = allTypeInfos.map(
- function(typeInfo) {
- return new typeInfo.constructor(this);
- }, this);
- }
-
- /**
- * Guesses whether the provided events is from a Windows ETW trace.
- * The object must has a property named 'name' with the value 'ETW' and
- * a property 'content' with all the undecoded events.
- *
- * @return {boolean} True when events is a Windows ETW array.
- */
- EtwImporter.canImport = function(events) {
- if (!events.hasOwnProperty('name') ||
- !events.hasOwnProperty('content') ||
- events.name !== 'ETW') {
- return false;
- }
-
- return true;
- };
-
- EtwImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'EtwImporter';
- },
-
- get model() {
- return this.model_;
- },
-
- createThreadIfNeeded: function(pid, tid) {
- this.tidsToPid_[tid] = pid;
- },
-
- removeThreadIfPresent: function(tid) {
- this.tidsToPid_[tid] = undefined;
- },
-
- getPidFromWindowsTid: function(tid) {
- if (tid === 0)
- return 0;
- var pid = this.tidsToPid_[tid];
- if (pid === undefined) {
- // Kernel threads are not defined.
- return 0;
- }
- return pid;
- },
-
- getThreadFromWindowsTid: function(tid) {
- var pid = this.getPidFromWindowsTid(tid);
- var process = this.model_.getProcess(pid);
- if (!process)
- return undefined;
- return process.getThread(tid);
- },
-
- /*
- * Retrieve the Cpu for a given cpuNumber.
- * @return {Cpu} A Cpu corresponding to the given cpuNumber.
- */
- getOrCreateCpu: function(cpuNumber) {
- var cpu = this.model_.kernel.getOrCreateCpu(cpuNumber);
- return cpu;
- },
-
- /**
- * Imports the data in this.events_ into this.model_.
- */
- importEvents: function() {
- this.events_.content.forEach(this.parseInfo.bind(this));
-
- if (this.walltime_ === undefined || this.ticks_ === undefined)
- throw Error('Cannot find clock sync information in the system trace.');
-
- if (this.is64bit_ === undefined)
- throw Error('Cannot determine pointer size of the system trace.');
-
- this.events_.content.forEach(this.parseEvent.bind(this));
- },
-
- importTimestamp: function(timestamp) {
- var ts = parseInt(timestamp, 16);
- return (ts - this.walltime_ + this.ticks_) / 1000.;
- },
-
- parseInfo: function(event) {
- // Retrieve clock sync information.
- if (event.hasOwnProperty('guid') &&
- event.hasOwnProperty('walltime') &&
- event.hasOwnProperty('tick') &&
- event.guid === 'ClockSync') {
- this.walltime_ = parseInt(event.walltime, 16);
- this.ticks_ = parseInt(event.tick, 16);
- }
-
- // Retrieve pointer size information from a Thread.DCStart event.
- if (this.is64bit_ === undefined &&
- event.hasOwnProperty('guid') &&
- event.hasOwnProperty('op') &&
- event.hasOwnProperty('ver') &&
- event.hasOwnProperty('payload') &&
- event.guid === kThreadGuid &&
- event.op === kThreadDCStartOpcode) {
- var decodedSize = tr.b.Base64.getDecodedBufferLength(event.payload);
-
- if (event.ver === 1) {
- if (decodedSize >= 52)
- this.is64bit_ = true;
- else
- this.is64bit_ = false;
- } else if (event.ver === 2) {
- if (decodedSize >= 64)
- this.is64bit_ = true;
- else
- this.is64bit_ = false;
- } else if (event.ver === 3) {
- if (decodedSize >= 60)
- this.is64bit_ = true;
- else
- this.is64bit_ = false;
- }
- }
-
- return true;
- },
-
- parseEvent: function(event) {
- if (!event.hasOwnProperty('guid') ||
- !event.hasOwnProperty('op') ||
- !event.hasOwnProperty('ver') ||
- !event.hasOwnProperty('cpu') ||
- !event.hasOwnProperty('ts') ||
- !event.hasOwnProperty('payload')) {
- return false;
- }
-
- var timestamp = this.importTimestamp(event.ts);
-
- // Create the event header.
- var header = {
- guid: event.guid,
- opcode: event.op,
- version: event.ver,
- cpu: event.cpu,
- timestamp: timestamp,
- is64: this.is64bit_
- };
-
- // Set the payload to decode.
- var decoder = this.decoder_;
- decoder.reset(event.payload);
-
- // Retrieve the handler to decode the payload.
- var handler = this.getEventHandler(header.guid, header.opcode);
- if (!handler)
- return false;
-
- if (!handler(header, decoder)) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Malformed ' + header.guid + ' event (' + event.payload + ')'
- });
- return false;
- }
-
- return true;
- },
-
- /**
- * Registers a windows ETW event handler used by parseEvent().
- */
- registerEventHandler: function(guid, opcode, handler) {
- if (this.handlers_[guid] === undefined)
- this.handlers_[guid] = [];
- this.handlers_[guid][opcode] = handler;
- },
-
- /**
- * Retrieves a registered event handler.
- */
- getEventHandler: function(guid, opcode) {
- if (this.handlers_[guid] === undefined)
- return undefined;
- return this.handlers_[guid][opcode];
- }
-
- };
-
- // Register the EtwImporter to the Importer.
- tr.importer.Importer.register(EtwImporter);
-
- return {
- EtwImporter: EtwImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer_test.html
deleted file mode 100644
index 584233fccd2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/etw_importer_test.html
+++ /dev/null
@@ -1,290 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/etw/etw_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Base64 = tr.b.Base64;
-
- test('canImport', function() {
- assert.isFalse(tr.e.importer.etw.EtwImporter.canImport('string'));
- assert.isFalse(tr.e.importer.etw.EtwImporter.canImport([]));
-
- // Must not parse an invalid name.
- var dummy = { name: 'dummy', content: [] };
- assert.isFalse(tr.e.importer.etw.EtwImporter.canImport(dummy));
-
- // Must parse an empty valid trace.
- var valid = { name: 'ETW', content: [] };
- assert.isTrue(tr.e.importer.etw.EtwImporter.canImport(valid));
- });
-
- test('getModel', function() {
- var model = 'dummy';
- var events = [];
- var importer = new tr.e.importer.etw.EtwImporter(model, events);
- assert.strictEqual(importer.model, model);
- });
-
- test('registerEventHandler', function() {
- // Create a dummy EtwImporter.
- var model = 'dummy';
- var events = ['events'];
- var importer = new tr.e.importer.etw.EtwImporter(model, events);
- var dummyHandler = function() {};
-
- // The handler must not exists.
- assert.isUndefined(importer.getEventHandler('ABCDEF', 2));
-
- // Register an event handler for guid: ABCDEF and opcode: 2.
- importer.registerEventHandler('ABCDEF', 2, dummyHandler);
-
- // The handler exists now, must find it.
- assert.isDefined(importer.getEventHandler('ABCDEF', 2));
-
- // Must be able to manage an invalid handler.
- assert.isUndefined(importer.getEventHandler('zzzzzz', 2));
- });
-
- test('parseEvent', function() {
- var model = 'dummy';
- var events = [];
- var importer = new tr.e.importer.etw.EtwImporter(model, events);
- var handlerCalled = false;
- var dummyHandler = function() { handlerCalled = true; return true; };
-
- // Register a valid handler.
- importer.registerEventHandler('aaaa', 42, dummyHandler);
-
- // Try to parse an invalid event with missing fields.
- var incompleteEvent = { guid: 'aaaa', 'op': 42, 'ver': 0 };
- assert.isFalse(importer.parseEvent(incompleteEvent));
- assert.isFalse(handlerCalled);
-
- // Try to parse a valid event.
- var validEvent = {
- guid: 'aaaa', 'op': 42, 'ver': 0, 'cpu': 0, 'ts': 0,
- 'payload': Base64.btoa('0')
- };
- assert.isTrue(importer.parseEvent(validEvent));
- assert.isTrue(handlerCalled);
- });
-
- test('resetTooSmall', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
-
- var oldByteLength = decoder.payload_.byteLength;
- // Decode a payload too big for the actual buffer.
- decoder.reset('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==');
- var newByteLength = decoder.payload_.byteLength;
-
- // Validate the buffer has been resized.
- assert.isBelow(oldByteLength, newByteLength);
- });
-
- test('decode', function() {
- var model = 'dummy';
- var events = [];
- var importer = new tr.e.importer.etw.EtwImporter(model, events);
-
- var decoder = importer.decoder_;
-
- decoder.reset('YQBiYw==');
- assert.equal(decoder.decodeInt32(), 0x63620061);
-
- // Decode unsigned numbers.
- decoder.reset('AQ==');
- assert.equal(decoder.decodeUInt8(), 0x01);
-
- decoder.reset('AQI=');
- assert.equal(decoder.decodeUInt16(), 0x0201);
-
- decoder.reset('AQIDBA==');
- assert.equal(decoder.decodeUInt32(), 0x04030201);
-
- decoder.reset('AQIDBAUGBwg=');
- assert.strictEqual(decoder.decodeUInt64ToString(), '0807060504030201');
-
- // Decode signed numbers.
- decoder.reset('AQ==');
- assert.equal(decoder.decodeInt8(), 0x01);
-
- decoder.reset('AQI=');
- assert.equal(decoder.decodeInt16(), 0x0201);
-
- decoder.reset('AQIDBA==');
- assert.equal(decoder.decodeInt32(), 0x04030201);
-
- decoder.reset('AQIDBAUGBwg=');
- assert.strictEqual(decoder.decodeInt64ToString(), '0807060504030201');
-
- // Last value before being a signed number.
- decoder.reset('fw==');
- assert.equal(decoder.decodeInt8(), 127);
-
- // Decode negative numbers.
- decoder.reset('1g==');
- assert.equal(decoder.decodeInt8(), -42);
-
- decoder.reset('gA==');
- assert.equal(decoder.decodeInt8(), -128);
-
- decoder.reset('hYI=');
- assert.equal(decoder.decodeInt16(), -32123);
-
- decoder.reset('hYL//w==');
- assert.equal(decoder.decodeInt32(), -32123);
-
- decoder.reset('Lv1ptv////8=');
- assert.equal(decoder.decodeInt32(), -1234567890);
-
- // Decode number with zero (nul) in the middle of the string.
- decoder.reset('YQBiYw==');
- assert.equal(decoder.decodeInt32(), 0x63620061);
- });
-
- test('decodeUInteger', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
-
- decoder.reset('AQIDBAUGBwg=');
- assert.equal(decoder.decodeUInteger(false), 0x04030201);
-
- decoder.reset('AQIDBAUGBwg=');
- assert.strictEqual(decoder.decodeUInteger(true), '0807060504030201');
- });
-
- test('decodeString', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
-
- decoder.reset('dGVzdAA=');
- assert.strictEqual(decoder.decodeString(), 'test');
-
- decoder.reset('VGhpcyBpcyBhIHRlc3Qu');
- assert.strictEqual(decoder.decodeString(), 'This is a test.');
- });
-
- test('decodeW16String', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- decoder.reset('dABlAHMAdAAAAA==');
- assert.strictEqual(decoder.decodeW16String(), 'test');
- });
-
- test('decodeFixedW16String', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- decoder.reset('dABlAHMAdAAAAA==');
- assert.strictEqual(decoder.decodeFixedW16String(32), 'test');
- assert.equal(decoder.position_, 64);
-
- decoder.reset('dABlAHMAdAAAAA==');
- assert.strictEqual(decoder.decodeFixedW16String(1), 't');
- assert.equal(decoder.position_, 2);
- });
-
- test('decodeBytes', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- decoder.reset('AAECAwQFBgc=');
- var bytes = decoder.decodeBytes(8);
- for (var i = 0; i < bytes.length; ++i)
- assert.equal(bytes[i], i);
- });
-
- test('decodeSID', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
-
- // Decode a SID structure with 64-bit pointer.
- decoder.reset(
- 'AQIDBAECAwQFBAMCAAAAAAEFAAAAAAAFFQAAAAECAwQFBgcICQoLDA0DAAA=');
- var sid = decoder.decodeSID(true);
-
- assert.strictEqual(sid.pSid, '0403020104030201');
- assert.equal(sid.attributes, 0x02030405);
- assert.equal(sid.sid.length, 20);
- });
-
- test('decodeSystemTime', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
-
- // Decode a SystemTime structure.
- decoder.reset('AQACAAMABAAFAAYABwAIAA==');
- var time = decoder.decodeSystemTime();
- assert.equal(time.wYear, 1);
- assert.equal(time.wMonth, 2);
- assert.equal(time.wDayOfWeek, 3);
- assert.equal(time.wDay, 4);
- assert.equal(time.wHour, 5);
- assert.equal(time.wMinute, 6);
- assert.equal(time.wSecond, 7);
- assert.equal(time.wMilliseconds, 8);
- });
-
- test('decodeTimeZoneInformation', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
-
- // Decode a TimeZoneInformation structure.
- decoder.reset('AQIDBGEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAIAAwAEAAUABgAHAAgABA' +
- 'MCAWIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAIAAwAEAAUABgAHAAgACAgI' +
- 'CA==');
- var time = decoder.decodeTimeZoneInformation();
-
- assert.equal(time.bias, 0x04030201);
- assert.equal(time.standardBias, 0x01020304);
- assert.equal(time.daylightBias, 0x08080808);
- assert.strictEqual(time.standardName, 'a');
- assert.strictEqual(time.daylightName, 'b');
- });
-
- test('manageThreads', function() {
- var events = [];
- var model = 'dummy';
- var importer = new tr.e.importer.etw.EtwImporter(model, events);
-
- // After initialisation, no threads must exists.
- assert.equal(Object.getOwnPropertyNames(importer.tidsToPid_).length, 0);
-
- // Add some threads.
- var thread10 = importer.createThreadIfNeeded(1, 10);
- var thread11 = importer.createThreadIfNeeded(1, 11);
- var thread20 = importer.createThreadIfNeeded(2, 20);
-
- assert.equal(Object.getOwnPropertyNames(importer.tidsToPid_).length, 3);
- assert.isTrue(importer.tidsToPid_.hasOwnProperty(10));
- assert.isTrue(importer.tidsToPid_.hasOwnProperty(11));
- assert.isTrue(importer.tidsToPid_.hasOwnProperty(20));
-
- // Retrieve existing threads and processes.
- var pid10 = importer.getPidFromWindowsTid(10);
- var pid11 = importer.getPidFromWindowsTid(11);
- var pid20 = importer.getPidFromWindowsTid(20);
-
- assert.equal(pid10, 1);
- assert.equal(pid11, 1);
- assert.equal(pid20, 2);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser.html
deleted file mode 100644
index 8496ec958b7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/etw/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses EventTrace events in the Windows event trace format.
- */
-
-tr.exportTo('tr.e.importer.etw', function() {
- var Parser = tr.e.importer.etw.Parser;
-
- // Constants for EventTrace events.
- var guid = '68FDD900-4A3E-11D1-84F4-0000F80464E3';
- var kEventTraceHeaderOpcode = 0;
-
- /**
- * Parses Windows EventTrace trace events.
- * @constructor
- */
- function EventTraceParser(importer) {
- Parser.call(this, importer);
-
- // Register handlers.
- importer.registerEventHandler(guid, kEventTraceHeaderOpcode,
- EventTraceParser.prototype.decodeHeader.bind(this));
- }
-
- EventTraceParser.prototype = {
- __proto__: Parser.prototype,
-
- decodeFields: function(header, decoder) {
- if (header.version !== 2)
- throw new Error('Incompatible EventTrace event version.');
-
- var bufferSize = decoder.decodeUInt32();
- var version = decoder.decodeUInt32();
- var providerVersion = decoder.decodeUInt32();
- var numberOfProcessors = decoder.decodeUInt32();
- var endTime = decoder.decodeUInt64ToString();
- var timerResolution = decoder.decodeUInt32();
- var maxFileSize = decoder.decodeUInt32();
- var logFileMode = decoder.decodeUInt32();
- var buffersWritten = decoder.decodeUInt32();
- var startBuffers = decoder.decodeUInt32();
- var pointerSize = decoder.decodeUInt32();
- var eventsLost = decoder.decodeUInt32();
- var cpuSpeed = decoder.decodeUInt32();
- var loggerName = decoder.decodeUInteger(header.is64);
- var logFileName = decoder.decodeUInteger(header.is64);
- var timeZoneInformation = decoder.decodeTimeZoneInformation();
- var padding = decoder.decodeUInt32();
- var bootTime = decoder.decodeUInt64ToString();
- var perfFreq = decoder.decodeUInt64ToString();
- var startTime = decoder.decodeUInt64ToString();
- var reservedFlags = decoder.decodeUInt32();
- var buffersLost = decoder.decodeUInt32();
- var sessionNameString = decoder.decodeW16String();
- var logFileNameString = decoder.decodeW16String();
-
- return {
- bufferSize: bufferSize,
- version: version,
- providerVersion: providerVersion,
- numberOfProcessors: numberOfProcessors,
- endTime: endTime,
- timerResolution: timerResolution,
- maxFileSize: maxFileSize,
- logFileMode: logFileMode,
- buffersWritten: buffersWritten,
- startBuffers: startBuffers,
- pointerSize: pointerSize,
- eventsLost: eventsLost,
- cpuSpeed: cpuSpeed,
- loggerName: loggerName,
- logFileName: logFileName,
- timeZoneInformation: timeZoneInformation,
- bootTime: bootTime,
- perfFreq: perfFreq,
- startTime: startTime,
- reservedFlags: reservedFlags,
- buffersLost: buffersLost,
- sessionNameString: sessionNameString,
- logFileNameString: logFileNameString
- };
- },
-
- decodeHeader: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- // TODO(etienneb): Update the Model with |fields|.
- return true;
- }
-
- };
-
- Parser.register(EventTraceParser);
-
- return {
- EventTraceParser: EventTraceParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser_test.html
deleted file mode 100644
index 840eb5ef06a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/eventtrace_parser_test.html
+++ /dev/null
@@ -1,120 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/etw/etw_importer.html">
-<link rel="import" href="/tracing/extras/importer/etw/eventtrace_parser.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- // Constants for EventTrace events.
- var guid = '68FDD900-4A3E-11D1-84F4-0000F80464E3';
- var kEventTraceHeaderOpcode = 0;
-
- var kEventTraceHeaderPayload32bitV2 =
- 'AAABAAYBAQWwHQAAEAAAABEs1WHICMwBYWECAGQAAAABAAAAAwAAAAEAAAAEAAAAAAAAA' +
- 'FoJAAAFAAAABgAAACwBAABAAHQAegByAGUAcwAuAGQAbABsACwALQAxADEAMgAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQACAAAAAAAAAAAAAABAAHQ' +
- 'AegByAGUAcwAuAGQAbABsACwALQAxADEAMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAADAAAAAgACAAAAAAAAAMT///8AAAAAf0Ob368FzAGdrCMAAAAAACw0o' +
- '2DICMwBAQAAAAAAAABNAGEAawBlACAAVABlAHMAdAAgAEQAYQB0AGEAIABTAGUAcwBzAG' +
- 'kAbwBuAAAAYwA6AFwAcwByAGMAXABzAGEAdwBiAHUAYwBrAFwAdAByAHUAbgBrAFwAcwB' +
- 'yAGMAXABzAGEAdwBiAHUAYwBrAFwAbABvAGcAXwBsAGkAYgBcAHQAZQBzAHQAXwBkAGEA' +
- 'dABhAFwAaQBtAGEAZwBlAF8AZABhAHQAYQBfADMAMgBfAHYAMAAuAGUAdABsAAAA';
-
- var kEventTraceHeaderPayload64bitV2 =
- 'AAABAAYBAQWxHQAABAAAADsuzRRYLM8BYWECAAAAAAABAAEAtgEAAAEAAAAIAAAAHwAAA' +
- 'KAGAAAAAAAAAAAAAAAAAAAAAAAALAEAAEAAdAB6AHIAZQBzAC4AZABsAGwALAAtADEAMQ' +
- 'AyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAIAAAAAAAA' +
- 'AAAAAAEAAdAB6AHIAZQBzAC4AZABsAGwALAAtADEAMQAxAAAAAAAAAAAAAAAAAAAAAAAA' +
- 'AAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAIAAAAAAAAAxP///wAAAABZQyWiwCvPAX1GG' +
- 'QAAAAAALWSZBFgszwEBAAAAAAAAAFIAZQBsAG8AZwBnAGUAcgAAAEMAOgBcAGsAZQByAG' +
- '4AZQBsAC4AZQB0AGwAAAA=';
-
- test('DecodeFields', function() {
-
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- var parser = new tr.e.importer.etw.EventTraceParser(importer);
- var header;
- var fields;
-
- // Validate a version 2 32-bit payload.
- header = {
- guid: guid, opcode: kEventTraceHeaderOpcode, version: 2, is64: 0
- };
- decoder.reset(kEventTraceHeaderPayload32bitV2);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.bufferSize, 65536);
- assert.equal(fields.version, 83951878);
- assert.equal(fields.providerVersion, 7600);
- assert.equal(fields.numberOfProcessors, 16);
- assert.strictEqual(fields.endTime, '01cc08c861d52c11');
- assert.equal(fields.timerResolution, 156001);
- assert.equal(fields.maxFileSize, 100);
- assert.equal(fields.logFileMode, 1);
- assert.equal(fields.buffersWritten, 3);
- assert.equal(fields.startBuffers, 1);
- assert.equal(fields.pointerSize, 4);
- assert.equal(fields.eventsLost, 0);
- assert.equal(fields.cpuSpeed, 2394);
- assert.equal(fields.loggerName, 5);
- assert.equal(fields.logFileName, 6);
- assert.strictEqual(fields.timeZoneInformation.standardName,
- '@tzres.dll,-112');
- assert.strictEqual(fields.timeZoneInformation.daylightName,
- '@tzres.dll,-111');
- assert.strictEqual(fields.bootTime, '01cc05afdf9b437f');
- assert.strictEqual(fields.perfFreq, '000000000023ac9d');
- assert.strictEqual(fields.startTime, '01cc08c860a3342c');
- assert.equal(fields.reservedFlags, 1);
- assert.equal(fields.buffersLost, 0);
- assert.strictEqual(fields.sessionNameString, 'Make Test Data Session');
- assert.strictEqual(fields.logFileNameString,
- 'c:\\src\\sawbuck\\trunk\\src\\sawbuck\\log_lib\\' +
- 'test_data\\image_data_32_v0.etl');
-
- // Validate a version 2 64-bit payload.
- header = {
- guid: guid, opcode: kEventTraceHeaderOpcode, version: 2, is64: 1
- };
- decoder.reset(kEventTraceHeaderPayload64bitV2);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.bufferSize, 65536);
- assert.equal(fields.version, 83951878);
- assert.equal(fields.providerVersion, 7601);
- assert.equal(fields.numberOfProcessors, 4);
- assert.strictEqual(fields.endTime, '01cf2c5814cd2e3b');
- assert.equal(fields.timerResolution, 156001);
- assert.equal(fields.maxFileSize, 0);
- assert.equal(fields.logFileMode, 0x10001);
- assert.equal(fields.buffersWritten, 438);
- assert.equal(fields.startBuffers, 1);
- assert.equal(fields.pointerSize, 8);
- assert.equal(fields.eventsLost, 31);
- assert.equal(fields.cpuSpeed, 1696);
- assert.equal(fields.loggerName, 0);
- assert.equal(fields.logFileName, 0);
- assert.strictEqual(fields.timeZoneInformation.standardName,
- '@tzres.dll,-112');
- assert.strictEqual(fields.timeZoneInformation.daylightName,
- '@tzres.dll,-111');
- assert.strictEqual(fields.bootTime, '01cf2bc0a2254359');
- assert.strictEqual(fields.perfFreq, '000000000019467d');
- assert.strictEqual(fields.startTime, '01cf2c580499642d');
- assert.equal(fields.reservedFlags, 1);
- assert.equal(fields.buffersLost, 0);
- assert.strictEqual(fields.sessionNameString, 'Relogger');
- assert.strictEqual(fields.logFileNameString, 'C:\\kernel.etl');
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/parser.html
deleted file mode 100644
index 414defe510b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/parser.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/extension_registry.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for Windows ETW event parsers.
- *
- * The ETW trace event importer depends on subclasses of
- * Parser to parse event data. Each subclass corresponds
- * to a group of trace events; e.g. Thread and Process implements
- * decoding of scheduling events. Parser subclasses must
- * call Parser.register to arrange to be instantiated
- * and their constructor must register their event handlers with the
- * importer. For example,
- *
- * var Parser = tr.e.importer.etw.Parser;
- *
- * function ThreadParser(importer) {
- * Parser.call(this, importer);
- *
- * importer.registerEventHandler(guid, kThreadStartOpcode,
- * ThreadParser.prototype.decodeStart.bind(this));
- * importer.registerEventHandler(guid, kThreadEndOpcode,
- * ThreadParser.prototype.decodeEnd.bind(this));
- * }
- *
- * Parser.register(ThreadParser);
- *
- * When a registered event is found, the associated event handler is invoked:
- *
- * decodeStart: function(header, decoder) {
- * [...]
- * return true;
- * },
- *
- * If the routine returns false the caller will generate an import error
- * saying there was a problem parsing it. Handlers can also emit import
- * messages using this.importer.model.importWarning. If this is done in lieu of
- * the generic import error it may be desirable for the handler to return
- * true.
- *
- */
-tr.exportTo('tr.e.importer.etw', function() {
- /**
- * Parses Windows ETW events.
- * @constructor
- */
- function Parser(importer) {
- this.importer = importer;
- this.model = importer.model;
- }
-
- Parser.prototype = {
- __proto__: Object.prototype
- };
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.mandatoryBaseClass = Parser;
- tr.b.decorateExtensionRegistry(Parser, options);
-
-
- return {
- Parser: Parser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser.html
deleted file mode 100644
index 040d24d3bf7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/etw/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses processes events in the Windows event trace format.
- *
- * The Windows process events are:
- *
- * - DCStart: Describes a process that was already running when the trace
- * started. ETW automatically generates these events for all running
- * processes at the beginning of the trace.
- * - Start: Describes a process launched during the tracing session.
- * - End: Describes a process that ended during the tracing session.
- * - DCEnd: Describes a process that was still running when the trace ended.
- *
- * See http://msdn.microsoft.com/library/windows/desktop/aa364092.aspx
- */
-tr.exportTo('tr.e.importer.etw', function() {
- var Parser = tr.e.importer.etw.Parser;
-
- // Constants for Process events.
- var guid = '3D6FA8D0-FE05-11D0-9DDA-00C04FD7BA7C';
- var kProcessStartOpcode = 1;
- var kProcessEndOpcode = 2;
- var kProcessDCStartOpcode = 3;
- var kProcessDCEndOpcode = 4;
- var kProcessDefunctOpcode = 39;
-
- /**
- * Parses Windows process trace events.
- * @constructor
- */
- function ProcessParser(importer) {
- Parser.call(this, importer);
-
- // Register handlers.
- importer.registerEventHandler(guid, kProcessStartOpcode,
- ProcessParser.prototype.decodeStart.bind(this));
- importer.registerEventHandler(guid, kProcessEndOpcode,
- ProcessParser.prototype.decodeEnd.bind(this));
- importer.registerEventHandler(guid, kProcessDCStartOpcode,
- ProcessParser.prototype.decodeDCStart.bind(this));
- importer.registerEventHandler(guid, kProcessDCEndOpcode,
- ProcessParser.prototype.decodeDCEnd.bind(this));
- importer.registerEventHandler(guid, kProcessDefunctOpcode,
- ProcessParser.prototype.decodeDefunct.bind(this));
- }
-
- ProcessParser.prototype = {
- __proto__: Parser.prototype,
-
- decodeFields: function(header, decoder) {
- if (header.version > 5)
- throw new Error('Incompatible Process event version.');
-
- var pageDirectoryBase;
- if (header.version === 1)
- pageDirectoryBase = decoder.decodeUInteger(header.is64);
-
- var uniqueProcessKey;
- if (header.version >= 2)
- uniqueProcessKey = decoder.decodeUInteger(header.is64);
-
- var processId = decoder.decodeUInt32();
- var parentId = decoder.decodeUInt32();
-
- var sessionId;
- var exitStatus;
- if (header.version >= 1) {
- sessionId = decoder.decodeUInt32();
- exitStatus = decoder.decodeInt32();
- }
-
- var directoryTableBase;
- if (header.version >= 3)
- directoryTableBase = decoder.decodeUInteger(header.is64);
-
- var flags;
- if (header.version >= 4)
- flags = decoder.decodeUInt32();
-
- var userSID = decoder.decodeSID(header.is64);
-
- var imageFileName;
- if (header.version >= 1)
- imageFileName = decoder.decodeString();
-
- var commandLine;
- if (header.version >= 2)
- commandLine = decoder.decodeW16String();
-
- var packageFullName;
- var applicationId;
- if (header.version >= 4) {
- packageFullName = decoder.decodeW16String();
- applicationId = decoder.decodeW16String();
- }
-
- var exitTime;
- if (header.version === 5 && header.opcode === kProcessDefunctOpcode)
- exitTime = decoder.decodeUInt64ToString();
-
- return {
- pageDirectoryBase: pageDirectoryBase,
- uniqueProcessKey: uniqueProcessKey,
- processId: processId,
- parentId: parentId,
- sessionId: sessionId,
- exitStatus: exitStatus,
- directoryTableBase: directoryTableBase,
- flags: flags,
- userSID: userSID,
- imageFileName: imageFileName,
- commandLine: commandLine,
- packageFullName: packageFullName,
- applicationId: applicationId,
- exitTime: exitTime
- };
- },
-
- decodeStart: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- var process = this.model.getOrCreateProcess(fields.processId);
- if (process.hasOwnProperty('has_ended')) {
- // On Windows, a process ID used by a process could be reused as soon as
- // the process ends (there is no pid cycling like on Linux). However, in
- // a short trace, this is unlikely to happen.
- throw new Error('Process clash detected.');
- }
- process.name = fields.imageFileName;
- return true;
- },
-
- decodeEnd: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- var process = this.model.getOrCreateProcess(fields.processId);
- process.has_ended = true;
- return true;
- },
-
- decodeDCStart: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- var process = this.model.getOrCreateProcess(fields.processId);
- if (process.hasOwnProperty('has_ended'))
- throw new Error('Process clash detected.');
- process.name = fields.imageFileName;
- return true;
- },
-
- decodeDCEnd: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- var process = this.model.getOrCreateProcess(fields.processId);
- process.has_ended = true;
- return true;
- },
-
- decodeDefunct: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- // TODO(etienneb): Update the Model with |fields|.
- return true;
- }
-
- };
-
- Parser.register(ProcessParser);
-
- return {
- ProcessParser: ProcessParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser_test.html
deleted file mode 100644
index 3f98e83c08a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/process_parser_test.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/etw/etw_importer.html">
-<link rel="import" href="/tracing/extras/importer/etw/process_parser.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- // Constants for Process events.
- var guid = '3D6FA8D0-FE05-11D0-9DDA-00C04FD7BA7C';
- var kProcessStartOpcode = 1;
- var kProcessDefunctOpcode = 39;
-
- var kProcessStartPayload32bitV1 =
- 'AAAAAPAGAADcAwAAAQAAAAMBAAAAAAAAAAAAAAEFAAAAAAAFFQAAAJYs7Cxo/TEG8dyk0' +
- '+gDAABub3RlcGFkLmV4ZQA=';
-
- var kProcessStartPayload32bitV2 =
- 'AAAAAPAGAADcAwAAAQAAAAMBAAAAAAAAAAAAAAEFAAAAAAAFFQAAAJYs7Cxo/TEG8dyk0' +
- '+gDAABub3RlcGFkLmV4ZQAiAEMAOgBcAFcAaQBuAGQAbwB3AHMAXABzAHkAcwB0AGUAbQ' +
- 'AzADIAXABuAG8AdABlAHAAYQBkAC4AZQB4AGUAIgAgAAAA';
-
- var kProcessStartPayload32bitV3 =
- 'AAAAAPAGAADcAwAAAQAAAAMBAAAAAAAAAAAAAAAAAAABBQAAAAAABRUAAACWLOwsaP0xB' +
- 'vHcpNPoAwAAbm90ZXBhZC5leGUAIgBDADoAXABXAGkAbgBkAG8AdwBzAFwAcwB5AHMAdA' +
- 'BlAG0AMwAyAFwAbgBvAHQAZQBwAGEAZAAuAGUAeABlACIAIAAAAA==';
-
- var kProcessStartPayload64bitV3 =
- 'YIBiD4D6//8AGgAAoBwAAAEAAAADAQAAAPBDHQEAAAAwVlMVoPj//wAAAACg+P//AQUAA' +
- 'AAAAAUVAAAAAgMBAgMEBQYHCAkKCwwAAHhwZXJmLmV4ZQB4AHAAZQByAGYAIAAgAC0AZA' +
- 'AgAG8AdQB0AC4AZQB0AGwAAAA=';
-
- var kProcessStartPayload64bitV4 =
- 'gED8GgDg//+MCgAACBcAAAUAAAADAQAAALCiowAAAAAAAAAAkPBXBADA//8AAAAAAAAAA' +
- 'AEFAAAAAAAFFQAAAAECAwQFBgcICQoLBukDAAB4cGVyZi5leGUAeABwAGUAcgBmACAAIA' +
- 'AtAHMAdABvAHAAAAAAAAAA';
-
- var kProcessDefunctPayload64bitV5 =
- 'wMXyBgDg//9IGQAAEAgAAAEAAAAAAAAAAGDLTwAAAAAAAAAA8OU7AwDA//8AAAAAAAAMA' +
- 'AEFAAAAAAAFFQAAAMDBwsPExcbH0NHS09QDAABjaHJvbWUuZXhlAAAAAAAAAI1Jovns+s' +
- '4B';
-
- test('DecodeFields', function() {
-
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- var parser = new tr.e.importer.etw.ProcessParser(importer);
- var header;
- var fields;
-
- // Validate a version 1 32-bit payload.
- header = { guid: guid, opcode: kProcessStartOpcode, version: 1, is64: 0 };
- decoder.reset(kProcessStartPayload32bitV1);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.pageDirectoryBase, 0);
- assert.equal(fields.processId, 1776);
- assert.equal(fields.parentId, 988);
- assert.equal(fields.sessionId, 1);
- assert.equal(fields.exitStatus, 259);
- assert.strictEqual(fields.imageFileName, 'notepad.exe');
-
- // Validate a version 2 32-bit payload.
- header = { guid: guid, opcode: kProcessStartOpcode, version: 2, is64: 0 };
- decoder.reset(kProcessStartPayload32bitV2);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.uniqueProcessKey, 0);
- assert.equal(fields.processId, 1776);
- assert.equal(fields.parentId, 988);
- assert.equal(fields.sessionId, 1);
- assert.equal(fields.exitStatus, 259);
- assert.strictEqual(fields.imageFileName, 'notepad.exe');
- assert.strictEqual(fields.commandLine,
- '\"C:\\Windows\\system32\\notepad.exe\" ');
-
- // Validate a version 3 32-bit payload.
- header = { guid: guid, opcode: kProcessStartOpcode, version: 3, is64: 0 };
- decoder.reset(kProcessStartPayload32bitV3);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.uniqueProcessKey, 0);
- assert.equal(fields.processId, 1776);
- assert.equal(fields.parentId, 988);
- assert.equal(fields.sessionId, 1);
- assert.equal(fields.exitStatus, 259);
- assert.equal(fields.directoryTableBase, 0);
- assert.strictEqual(fields.imageFileName, 'notepad.exe');
- assert.strictEqual(fields.commandLine,
- '\"C:\\Windows\\system32\\notepad.exe\" ');
-
- // Validate a version 3 64-bit payload.
- header = { guid: guid, opcode: kProcessStartOpcode, version: 3, is64: 1 };
- decoder.reset(kProcessStartPayload64bitV3);
- fields = parser.decodeFields(header, decoder);
-
- assert.strictEqual(fields.uniqueProcessKey, 'fffffa800f628060');
- assert.equal(fields.processId, 6656);
- assert.equal(fields.parentId, 7328);
- assert.equal(fields.sessionId, 1);
- assert.equal(fields.exitStatus, 259);
- assert.strictEqual(fields.directoryTableBase, '000000011d43f000');
- assert.strictEqual(fields.imageFileName, 'xperf.exe');
- assert.strictEqual(fields.commandLine, 'xperf -d out.etl');
-
- // Validate a version 4 64-bit payload.
- header = { guid: guid, opcode: kProcessStartOpcode, version: 4, is64: 1 };
- decoder.reset(kProcessStartPayload64bitV4);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.uniqueProcessKey, 'ffffe0001afc4080');
- assert.equal(fields.processId, 2700);
- assert.equal(fields.parentId, 5896);
- assert.equal(fields.sessionId, 5);
- assert.equal(fields.exitStatus, 259);
- assert.equal(fields.directoryTableBase, '00000000a3a2b000');
- assert.equal(fields.flags, 0);
- assert.strictEqual(fields.imageFileName, 'xperf.exe');
- assert.strictEqual(fields.commandLine, 'xperf -stop');
- assert.strictEqual(fields.packageFullName, '');
- assert.strictEqual(fields.applicationId, '');
-
- // Validate a version 5 64-bit payload.
- header = { guid: guid, opcode: kProcessDefunctOpcode, version: 5, is64: 1 };
- decoder.reset(kProcessDefunctPayload64bitV5);
- fields = parser.decodeFields(header, decoder);
-
- assert.strictEqual(fields.uniqueProcessKey, 'ffffe00006f2c5c0');
- assert.equal(fields.processId, 6472);
- assert.equal(fields.parentId, 2064);
- assert.equal(fields.sessionId, 1);
- assert.equal(fields.exitStatus, 0);
- assert.strictEqual(fields.directoryTableBase, '000000004fcb6000');
- assert.equal(fields.flags, 0);
- assert.strictEqual(fields.imageFileName, 'chrome.exe');
- assert.strictEqual(fields.commandLine, '');
- assert.strictEqual(fields.packageFullName, '');
- assert.strictEqual(fields.applicationId, '');
- assert.strictEqual(fields.exitTime, '01cefaecf9a2498d');
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser.html
deleted file mode 100644
index 530cb69e5a9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser.html
+++ /dev/null
@@ -1,242 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/etw/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses threads events in the Windows event trace format.
- *
- * The Windows thread events are:
- *
- * - DCStart: Describes a thread that was already running when the trace
- * started. ETW automatically generates these events for all running
- * threads at the beginning of the trace.
- * - Start: Describes a thread that started during the tracing session.
- * - End: Describes a thread that ended during the tracing session.
- * - DCEnd: Describes a thread that was still alive when the trace ended.
- *
- * See http://msdn.microsoft.com/library/windows/desktop/aa364132.aspx
- */
-tr.exportTo('tr.e.importer.etw', function() {
- var Parser = tr.e.importer.etw.Parser;
-
- // Constants for Thread events.
- var guid = '3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';
- var kThreadStartOpcode = 1;
- var kThreadEndOpcode = 2;
- var kThreadDCStartOpcode = 3;
- var kThreadDCEndOpcode = 4;
- var kThreadCSwitchOpcode = 36;
-
- /**
- * Parses Windows threads trace events.
- * @constructor
- */
- function ThreadParser(importer) {
- Parser.call(this, importer);
-
- // Register handlers.
- importer.registerEventHandler(guid, kThreadStartOpcode,
- ThreadParser.prototype.decodeStart.bind(this));
- importer.registerEventHandler(guid, kThreadEndOpcode,
- ThreadParser.prototype.decodeEnd.bind(this));
- importer.registerEventHandler(guid, kThreadDCStartOpcode,
- ThreadParser.prototype.decodeDCStart.bind(this));
- importer.registerEventHandler(guid, kThreadDCEndOpcode,
- ThreadParser.prototype.decodeDCEnd.bind(this));
- importer.registerEventHandler(guid, kThreadCSwitchOpcode,
- ThreadParser.prototype.decodeCSwitch.bind(this));
- }
-
- ThreadParser.prototype = {
- __proto__: Parser.prototype,
-
- decodeFields: function(header, decoder) {
- if (header.version > 3)
- throw new Error('Incompatible Thread event version.');
-
- // Common fields to all Thread events.
- var processId = decoder.decodeUInt32();
- var threadId = decoder.decodeUInt32();
-
- // Extended fields.
- var stackBase;
- var stackLimit;
- var userStackBase;
- var userStackLimit;
- var affinity;
- var startAddr;
- var win32StartAddr;
- var tebBase;
- var subProcessTag;
- var basePriority;
- var pagePriority;
- var ioPriority;
- var threadFlags;
- var waitMode;
-
- if (header.version === 1) {
- // On version 1, only start events have extended information.
- if (header.opcode === kThreadStartOpcode ||
- header.opcode === kThreadDCStartOpcode) {
- stackBase = decoder.decodeUInteger(header.is64);
- stackLimit = decoder.decodeUInteger(header.is64);
- userStackBase = decoder.decodeUInteger(header.is64);
- userStackLimit = decoder.decodeUInteger(header.is64);
- startAddr = decoder.decodeUInteger(header.is64);
- win32StartAddr = decoder.decodeUInteger(header.is64);
- waitMode = decoder.decodeInt8();
- decoder.skip(3);
- }
- } else {
- stackBase = decoder.decodeUInteger(header.is64);
- stackLimit = decoder.decodeUInteger(header.is64);
- userStackBase = decoder.decodeUInteger(header.is64);
- userStackLimit = decoder.decodeUInteger(header.is64);
-
- // Version 2 produces a field named 'startAddr'.
- if (header.version === 2)
- startAddr = decoder.decodeUInteger(header.is64);
- else
- affinity = decoder.decodeUInteger(header.is64);
-
- win32StartAddr = decoder.decodeUInteger(header.is64);
- tebBase = decoder.decodeUInteger(header.is64);
- subProcessTag = decoder.decodeUInt32();
-
- if (header.version === 3) {
- basePriority = decoder.decodeUInt8();
- pagePriority = decoder.decodeUInt8();
- ioPriority = decoder.decodeUInt8();
- threadFlags = decoder.decodeUInt8();
- }
- }
-
- return {
- processId: processId,
- threadId: threadId,
- stackBase: stackBase,
- stackLimit: stackLimit,
- userStackBase: userStackBase,
- userStackLimit: userStackLimit,
- affinity: affinity,
- startAddr: startAddr,
- win32StartAddr: win32StartAddr,
- tebBase: tebBase,
- subProcessTag: subProcessTag,
- waitMode: waitMode,
- basePriority: basePriority,
- pagePriority: pagePriority,
- ioPriority: ioPriority,
- threadFlags: threadFlags
- };
- },
-
- decodeCSwitchFields: function(header, decoder) {
- if (header.version !== 2)
- throw new Error('Incompatible Thread event version.');
-
- // Decode CSwitch payload.
- var newThreadId = decoder.decodeUInt32();
- var oldThreadId = decoder.decodeUInt32();
- var newThreadPriority = decoder.decodeInt8();
- var oldThreadPriority = decoder.decodeInt8();
- var previousCState = decoder.decodeUInt8();
- var spareByte = decoder.decodeInt8();
- var oldThreadWaitReason = decoder.decodeInt8();
- var oldThreadWaitMode = decoder.decodeInt8();
- var oldThreadState = decoder.decodeInt8();
- var oldThreadWaitIdealProcessor = decoder.decodeInt8();
- var newThreadWaitTime = decoder.decodeUInt32();
- var reserved = decoder.decodeUInt32();
-
- return {
- newThreadId: newThreadId,
- oldThreadId: oldThreadId,
- newThreadPriority: newThreadPriority,
- oldThreadPriority: oldThreadPriority,
- previousCState: previousCState,
- spareByte: spareByte,
- oldThreadWaitReason: oldThreadWaitReason,
- oldThreadWaitMode: oldThreadWaitMode,
- oldThreadState: oldThreadState,
- oldThreadWaitIdealProcessor: oldThreadWaitIdealProcessor,
- newThreadWaitTime: newThreadWaitTime,
- reserved: reserved
- };
- },
-
- decodeStart: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- this.importer.createThreadIfNeeded(fields.processId, fields.threadId);
- return true;
- },
-
- decodeEnd: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- this.importer.removeThreadIfPresent(fields.threadId);
- return true;
- },
-
- decodeDCStart: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- this.importer.createThreadIfNeeded(fields.processId, fields.threadId);
- return true;
- },
-
- decodeDCEnd: function(header, decoder) {
- var fields = this.decodeFields(header, decoder);
- this.importer.removeThreadIfPresent(fields.threadId);
- return true;
- },
-
- decodeCSwitch: function(header, decoder) {
- var fields = this.decodeCSwitchFields(header, decoder);
- var cpu = this.importer.getOrCreateCpu(header.cpu);
- var newThread =
- this.importer.getThreadFromWindowsTid(fields.newThreadId);
-
- // Generate the new thread name. If some events were lost, it's possible
- // that information about the new thread or process is not available.
- var newThreadName;
- if (newThread && newThread.userFriendlyName) {
- newThreadName = newThread.userFriendlyName;
- } else {
- var newProcessId = this.importer.getPidFromWindowsTid(
- fields.newThreadId);
- var newProcess = this.model.getProcess(newProcessId);
- var newProcessName;
- if (newProcess)
- newProcessName = newProcess.name;
- else
- newProcessName = 'Unknown process';
-
- newThreadName =
- newProcessName + ' (tid ' + fields.newThreadId + ')';
- }
-
- cpu.switchActiveThread(
- header.timestamp,
- {},
- fields.newThreadId,
- newThreadName,
- fields);
- return true;
- }
-
- };
-
- Parser.register(ThreadParser);
-
- return {
- ThreadParser: ThreadParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser_test.html
deleted file mode 100644
index 56031c6381f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/etw/thread_parser_test.html
+++ /dev/null
@@ -1,179 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/etw/etw_importer.html">
-<link rel="import" href="/tracing/extras/importer/etw/thread_parser.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- // Constants for Thread events.
- var guid = '3D6FA8D1-FE05-11D0-9DDA-00C04FD7BA7C';
- var kThreadStartOpcode = 1;
- var kThreadEndOpcode = 2;
- var kThreadDCStartOpcode = 3;
- var kThreadCSwitchOpcode = 36;
-
- var kThreadStartPayload32bitV1 =
- 'BAAAAEwHAAAAYLfzADC38wAAAAAAAAAAhdse9wAAAAD/AAAA';
-
- var kThreadEndPayload32bitV1 = 'BAAAALQAAAA=';
-
-
- var kThreadDCStartPayload64bitV2 =
- 'AAAAAAAAAAAAYPUCAPj//wAA9QIA+P//AAAAAAAAAAAAAAAAAAAAAIAlxwEA+P//gCXHA' +
- 'QD4//8AAAAAAAAAAAAAAAA=';
-
- var kThreadStartPayload32bitV3 =
- 'LAIAACwTAAAAUJixACCYsQAA1QAAwNQAAwAAAOkDq3cA4P1/AAAAAAkFAgA=';
-
- var kThreadStartPayload64bitV3 =
- 'eCEAAJQUAAAAMA4nAND//wDQDScA0P//MP0LBgAAAAAAgAsGAAAAAP8AAAAAAAAALP1YX' +
- 'AAAAAAAwBL/AAAAAAAAAAAIBQIA';
-
- var kThreadCSwitchPayload32bitV2 = 'AAAAACwRAAAACQAAFwABABIAAAAmSAAA';
- var kThreadCSwitchPayload64bitV2 = 'zAgAAAAAAAAIAAEAAAACBAEAAACHbYg0';
-
- test('DecodeFields', function() {
-
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- var parser = new tr.e.importer.etw.ThreadParser(importer);
- var header;
- var fields;
-
- // Validate a version 1 32-bit payload.
- header = { guid: guid, opcode: kThreadStartOpcode, version: 1, is64: 0 };
- decoder.reset(kThreadStartPayload32bitV1);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.processId, 4);
- assert.equal(fields.threadId, 1868);
- assert.equal(fields.stackBase, 4088881152);
- assert.equal(fields.stackLimit, 4088868864);
- assert.equal(fields.userStackBase, 0);
- assert.equal(fields.userStackLimit, 0);
- assert.equal(fields.startAddr, 4145994629);
- assert.equal(fields.win32StartAddr, 0);
- assert.equal(fields.waitMode, -1);
-
- // Validate an End version 1 32-bit payload.
- header = { guid: guid, opcode: kThreadEndOpcode, version: 1, is64: 0 };
- decoder.reset(kThreadStartPayload32bitV1);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.processId, 4);
- assert.equal(fields.threadId, 1868);
-
- // Validate a version 2 64-bit payload.
- header = { guid: guid, opcode: kThreadDCStartOpcode, version: 2, is64: 1 };
- decoder.reset(kThreadDCStartPayload64bitV2);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.processId, 0);
- assert.equal(fields.threadId, 0);
- assert.strictEqual(fields.stackBase, 'fffff80002f56000');
- assert.equal(fields.stackLimit, 'fffff80002f50000');
- assert.strictEqual(fields.userStackBase, '0000000000000000');
- assert.strictEqual(fields.userStackLimit, '0000000000000000');
- assert.strictEqual(fields.startAddr, 'fffff80001c72580');
- assert.strictEqual(fields.win32StartAddr, 'fffff80001c72580');
- assert.strictEqual(fields.tebBase, '0000000000000000');
- assert.equal(fields.subProcessTag, 0);
-
- // Validate a version 3 32-bit payload.
- header = { guid: guid, opcode: kThreadStartOpcode, version: 3, is64: 0 };
- decoder.reset(kThreadStartPayload32bitV3);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.processId, 556);
- assert.equal(fields.threadId, 4908);
- assert.equal(fields.stackBase, 2979549184);
- assert.equal(fields.stackLimit, 2979536896);
- assert.equal(fields.userStackBase, 13959168);
- assert.equal(fields.userStackLimit, 13942784);
- assert.equal(fields.affinity, 3);
- assert.equal(fields.win32StartAddr, 2007696361);
- assert.equal(fields.tebBase, 2147344384);
- assert.equal(fields.subProcessTag, 0);
- assert.equal(fields.basePriority, 9);
- assert.equal(fields.pagePriority, 5);
- assert.equal(fields.ioPriority, 2);
- assert.equal(fields.threadFlags, 0);
-
- // Validate a version 3 64-bit payload.
- header = { guid: guid, opcode: kThreadStartOpcode, version: 3, is64: 1 };
- decoder.reset(kThreadStartPayload64bitV3);
- fields = parser.decodeFields(header, decoder);
-
- assert.equal(fields.processId, 8568);
- assert.equal(fields.threadId, 5268);
- assert.strictEqual(fields.stackBase, 'ffffd000270e3000');
- assert.strictEqual(fields.stackLimit, 'ffffd000270dd000');
- assert.strictEqual(fields.userStackBase, '00000000060bfd30');
- assert.strictEqual(fields.userStackLimit, '00000000060b8000');
- assert.strictEqual(fields.affinity, '00000000000000ff');
- assert.strictEqual(fields.win32StartAddr, '000000005c58fd2c');
- assert.strictEqual(fields.tebBase, '00000000ff12c000');
- assert.equal(fields.subProcessTag, 0);
- assert.equal(fields.basePriority, 8);
- assert.equal(fields.pagePriority, 5);
- assert.equal(fields.ioPriority, 2);
- assert.equal(fields.threadFlags, 0);
- });
-
- test('DecodeCSwitchFields', function() {
- var importer = new tr.e.importer.etw.EtwImporter('dummy', []);
- var decoder = importer.decoder_;
- var parser = new tr.e.importer.etw.ThreadParser(importer);
- var header;
- var fields;
-
-
- // Validate a version 2 CSwitch 32-bit payload.
- header = { guid: guid, opcode: kThreadCSwitchOpcode, version: 2, is64: 0 };
- decoder.reset(kThreadCSwitchPayload32bitV2);
- fields = parser.decodeCSwitchFields(header, decoder);
-
- assert.equal(fields.newThreadId, 0);
- assert.equal(fields.oldThreadId, 4396);
- assert.equal(fields.newThreadPriority, 0);
- assert.equal(fields.oldThreadPriority, 9);
- assert.equal(fields.previousCState, 0);
- assert.equal(fields.spareByte, 0);
- assert.equal(fields.oldThreadWaitReason, 23);
- assert.equal(fields.oldThreadWaitMode, 0);
- assert.equal(fields.oldThreadState, 1);
- assert.equal(fields.oldThreadWaitIdealProcessor, 0);
- assert.equal(fields.newThreadWaitTime, 18);
- assert.equal(fields.reserved, 18470);
-
- // Validate a version 2 CSwitch 64-bit payload.
- header = { guid: guid, opcode: kThreadCSwitchOpcode, version: 2, is64: 1 };
- decoder.reset(kThreadCSwitchPayload64bitV2);
- fields = parser.decodeCSwitchFields(header, decoder);
-
- assert.equal(fields.newThreadId, 2252);
- assert.equal(fields.oldThreadId, 0);
- assert.equal(fields.newThreadPriority, 8);
- assert.equal(fields.oldThreadPriority, 0);
- assert.equal(fields.previousCState, 1);
- assert.equal(fields.spareByte, 0);
- assert.equal(fields.oldThreadWaitReason, 0);
- assert.equal(fields.oldThreadWaitMode, 0);
- assert.equal(fields.oldThreadState, 2);
- assert.equal(fields.oldThreadWaitIdealProcessor, 4);
- assert.equal(fields.newThreadWaitTime, 1);
- assert.equal(fields.reserved, 881356167);
-
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html
deleted file mode 100644
index 08bc702914e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/importer/importer.html">
-
-<script>
-
-'use strict';
-
-/**
- * @fileoverview GcloudTraceImporter imports JSON data from Google Cloud Trace.
- */
-tr.exportTo('tr.e.importer.gcloud_trace', function() {
- function GcloudTraceImporter(model, eventData) {
- this.importPriority = 2;
- this.eventData_ = eventData;
- }
-
- /**
- * @return {boolean} Whether obj looks like the JSON output from Cloud Trace.
- */
- GcloudTraceImporter.canImport = function(eventData) {
- if (typeof(eventData) !== 'string' && !(eventData instanceof String))
- return false;
-
- // Slice the data so we don't potentially do a replace on a gigantic string.
- var normalizedEventData = eventData.slice(0, 20).replace(/\s/g, '');
- if (normalizedEventData.length < 14)
- return false;
-
- return normalizedEventData.slice(0, 14) === '{"projectId":"';
- };
-
- GcloudTraceImporter.prototype = {
-
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'GcloudTraceImporter';
- },
-
- /**
- * Called by the Model to extract subtraces from the event data. The
- * subtraces are passed on to other importers that can recognize them.
- */
- extractSubtraces: function() {
- var traceEvents = this.createEventsForTrace();
- return traceEvents ? [traceEvents] : [];
- },
-
- createEventsForTrace: function() {
- var events = [];
- var trace = JSON.parse(this.eventData_);
- var spanLength = trace.spans.length;
- for (var i = 0; i < spanLength; i++) {
- events.push(this.createEventForSpan(trace.traceId, trace.spans[i]));
- }
- return {
- 'traceEvents': events
- };
- },
-
- createEventForSpan: function(traceId, span) {
- var newArgs = {};
- if (span.labels) {
- newArgs = JSON.parse(JSON.stringify(span.labels));
- }
- newArgs['Span ID'] = span.spanId;
- newArgs['Start Time'] = span.startTime;
- newArgs['End Time'] = span.endTime;
- if (span.parentSpanId) {
- newArgs['Parent Span ID'] = span.parentSpanId;
- }
- // The timestamps are ISO-standard strings, which are parsed to millis,
- // then converted to the micros that the trace viewer expects.
- return {
- name: span.name,
- args: newArgs,
- pid: traceId,
- ts: Date.parse(span.startTime) * 1000,
- dur: (Date.parse(span.endTime) - Date.parse(span.startTime)) * 1000,
- cat: 'tracespan',
- tid: traceId,
- ph: 'X'
- };
- }
- };
-
- tr.importer.Importer.register(GcloudTraceImporter);
-
- return {
- GcloudTraceImporter: GcloudTraceImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer_test.html
deleted file mode 100644
index 2c229ffc31c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/gcloud_trace/gcloud_trace_importer_test.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html">
-
-<script>
-
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var GcloudTraceImporter = tr.e.importer.gcloud_trace.GcloudTraceImporter;
-
- test('noSpans', function() {
- var trace = {projectId: 'My Project', traceId: '123', spans: []};
-
- var model = new tr.Model();
- var importer = new tr.e.importer.gcloud_trace.GcloudTraceImporter(model,
- JSON.stringify(trace));
- var subtraces = importer.extractSubtraces();
- assert.equal(1, subtraces.length);
- // Note there are, in fact, use cases for traces with no events (spans).
- assert.deepEqual([], subtraces[0].traceEvents);
- });
-
- test('typicalTrace', function() {
- var span1 = {
- 'spanId': '1',
- 'kind': 'RPC_CLIENT',
- 'name': '/first',
- 'startTime': '2015-09-03T16:40:00.841654024Z',
- 'endTime': '2015-09-03T16:40:00.856599389Z',
- 'labels': {
- 'key1': 'value1',
- 'key2': 'value2'
- }
- };
- var span2 = {
- 'spanId': '2',
- 'kind': 'RPC_SERVER',
- 'name': '/second',
- 'startTime': '2015-09-03T16:40:00.842880028Z',
- 'endTime': '2015-09-03T16:40:00.851729538Z',
- 'parentSpanId': '1',
- 'labels': {
- 'key1': 'value3',
- 'key2': 'value4'
- }
- };
- var trace = {projectId: 'My Project', traceId: '123',
- spans: [span1, span2]};
-
- var model = new tr.Model();
- var importer = new tr.e.importer.gcloud_trace.GcloudTraceImporter(model,
- JSON.stringify(trace));
- var subtraces = importer.extractSubtraces();
- assert.equal(1, subtraces.length);
- assert.equal(2, subtraces[0].traceEvents.length);
-
- var span1Event = subtraces[0].traceEvents[0];
- assert.equal('tracespan', span1Event.cat);
- assert.equal('/first', span1Event.name);
- assert.equal(1441298400841000, span1Event.ts);
- assert.equal(15000, span1Event.dur);
- assert.equal('123', span1Event.pid);
- assert.equal('123', span1Event.tid);
- assert.equal('2015-09-03T16:40:00.856599389Z', span1Event.args['End Time']);
- assert.equal('1', span1Event.args['Span ID']);
- assert.equal('value1', span1Event.args['key1']);
- assert.equal('value2', span1Event.args['key2']);
- assert.equal('2015-09-03T16:40:00.856599389Z', span1Event.args['End Time']);
-
- var span2Event = subtraces[0].traceEvents[1];
- assert.equal('tracespan', span2Event.cat);
- assert.equal('/second', span2Event.name);
- assert.equal(1441298400842000, span2Event.ts);
- assert.equal(9000, span2Event.dur);
- assert.equal('123', span2Event.pid);
- assert.equal('123', span2Event.tid);
- });
-
- test('canImport', function() {
- assert.isTrue(GcloudTraceImporter.canImport(
- JSON.stringify({projectId: 'My Project'})));
- assert.isTrue(GcloudTraceImporter.canImport(
- JSON.stringify({projectId: '56', traceId: '34'})));
- assert.isFalse(GcloudTraceImporter.canImport(
- JSON.stringify({wrongjson: '33'})));
- assert.isFalse(GcloudTraceImporter.canImport(''));
- assert.isFalse(GcloudTraceImporter.canImport([]));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer.html
deleted file mode 100644
index 0af7cbee80e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/jszip.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview GzipImporter inflates gzip compressed data and passes it along
- * to an actual importer.
- */
-tr.exportTo('tr.e.importer', function() {
- var GZIP_MEMBER_HEADER_ID_SIZE = 3;
-
- var GZIP_HEADER_ID1 = 0x1f;
- var GZIP_HEADER_ID2 = 0x8b;
- var GZIP_DEFLATE_COMPRESSION = 8;
-
- function GzipImporter(model, eventData) {
- // Normalize the data into an Uint8Array.
- if (typeof(eventData) === 'string' || eventData instanceof String) {
- eventData = JSZip.utils.transformTo('uint8array', eventData);
- } else if (eventData instanceof ArrayBuffer) {
- eventData = new Uint8Array(eventData);
- } else
- throw new Error('Unknown gzip data format');
- this.model_ = model;
- this.gzipData_ = eventData;
- }
-
- /**
- * @param {eventData} Possibly gzip compressed data as a string or an
- * ArrayBuffer.
- * @return {boolean} Whether obj looks like gzip compressed data.
- */
- GzipImporter.canImport = function(eventData) {
- var header;
- if (eventData instanceof ArrayBuffer)
- header = new Uint8Array(eventData.slice(0, GZIP_MEMBER_HEADER_ID_SIZE));
- else if (typeof(eventData) === 'string' || eventData instanceof String) {
- header = eventData.substring(0, GZIP_MEMBER_HEADER_ID_SIZE);
- // Convert the string to a byteArray for correct value comparison.
- header = JSZip.utils.transformTo('uint8array', header);
- } else
- return false;
- return header[0] === GZIP_HEADER_ID1 &&
- header[1] === GZIP_HEADER_ID2 &&
- header[2] === GZIP_DEFLATE_COMPRESSION;
- };
-
- /**
- * Inflates (decompresses) the data stored in the given gzip bitstream.
- * @return {string} Inflated data.
- */
- GzipImporter.inflateGzipData_ = function(data) {
- var position = 0;
-
- function getByte() {
- if (position >= data.length)
- throw new Error('Unexpected end of gzip data');
- return data[position++];
- }
-
- function getWord() {
- var low = getByte();
- var high = getByte();
- return (high << 8) + low;
- }
-
- function skipBytes(amount) {
- position += amount;
- }
-
- function skipZeroTerminatedString() {
- while (getByte() !== 0) {}
- }
-
- var id1 = getByte();
- var id2 = getByte();
- if (id1 !== GZIP_HEADER_ID1 || id2 !== GZIP_HEADER_ID2)
- throw new Error('Not gzip data');
- var compressionMethod = getByte();
- if (compressionMethod !== GZIP_DEFLATE_COMPRESSION)
- throw new Error('Unsupported compression method: ' + compressionMethod);
- var flags = getByte();
- var haveHeaderCrc = flags & (1 << 1);
- var haveExtraFields = flags & (1 << 2);
- var haveFileName = flags & (1 << 3);
- var haveComment = flags & (1 << 4);
-
- // Skip modification time, extra flags and OS.
- skipBytes(4 + 1 + 1);
-
- // Skip remaining fields before compressed data.
- if (haveExtraFields) {
- var bytesToSkip = getWord();
- skipBytes(bytesToSkip);
- }
- if (haveFileName)
- skipZeroTerminatedString();
- if (haveComment)
- skipZeroTerminatedString();
- if (haveHeaderCrc)
- getWord();
-
- // Inflate the data using jszip.
- var inflatedData =
- JSZip.compressions['DEFLATE'].uncompress(data.subarray(position));
- var string = GzipImporter.transformToString(inflatedData);
-
- if (inflatedData.length > 0 && string.length === 0) {
- throw new RangeError('Inflated gzip data too long to fit into a string' +
- ' (' + inflatedData.length + ').');
- }
-
- return string;
- };
-
- /**
- * Transforms an array-like object to a string.
- *
- * Note that the following two expressions yield identical results:
- *
- * GzipImporter.transformToString_(data)
- * JSZip.utils.transformTo('string', data)
- *
- * We use a custom static method because it is faster and, more importantly,
- * avoids OOMing on large traces. See
- * https://github.com/catapult-project/catapult/issues/2051.
- */
- GzipImporter.transformToString = function(data) {
- if (typeof TextDecoder === 'undefined') {
- // Fall back to jszip if TextDecoder is not available.
- return JSZip.utils.transformTo('string', data);
- }
-
- var type = JSZip.utils.getTypeOf(data);
- if (type === 'string')
- return data; // We already have a string.
-
- if (type === 'array') {
- // TextDecoder requires an ArrayBuffer or an ArrayBufferView.
- data = new Uint8Array(data);
- }
-
- var decoder = new TextDecoder('utf-8');
- return decoder.decode(data);
- };
-
- GzipImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'GzipImporter';
- },
-
- /**
- * Called by the Model to check whether the importer just encapsulates
- * the actual trace data which needs to be imported by another importer.
- */
- isTraceDataContainer: function() {
- return true;
- },
-
- /**
- * Called by the Model to extract subtraces from the event data. The
- * subtraces are passed on to other importers that can recognize them.
- */
- extractSubtraces: function() {
- var eventData = GzipImporter.inflateGzipData_(this.gzipData_);
- return eventData ? [eventData] : [];
- }
- };
-
- tr.importer.Importer.register(GzipImporter);
-
- return {
- GzipImporter: GzipImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer_test.html
deleted file mode 100644
index ea64eb0188b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/gzip_importer_test.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/gzip_importer.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Base64 = tr.b.Base64;
- var findSliceNamed = tr.c.TestUtils.findSliceNamed;
- var ORIGINAL_DATA =
- '[{"name":"a","args":{},"pid":52,"ts":520,"cat":"foo","tid":53,' +
- '"ph":"B"},{"name":"a","args":{},"pid":52,"ts":520,"cat":"foo",' +
- '"tid":53,"ph":"E"}]\n';
- var GZIP_DATA_BASE_64 =
- 'H4sICHr4HVIAA3RyYWNlAIuuVspLzE1VslJKVNJRSixKL1ayqq7VUSrITFGy' +
- 'MjXSUSopBtEGOkrJiSVAVWn5+UB1JWBZY6CyDKCYk1KtDhWMcVWqjeUCALak' +
- 'EH+QAAAA';
-
- test('failImportEmpty', function() {
- assert.isFalse(tr.e.importer.GzipImporter.canImport([]));
- assert.isFalse(tr.e.importer.GzipImporter.canImport(''));
- });
-
- test('inflateString', function() {
- // Test inflating the data from a string.
- var gzipData = Base64.atob(GZIP_DATA_BASE_64);
- var importer = new tr.e.importer.GzipImporter(null, gzipData);
- assert.isTrue(tr.e.importer.GzipImporter.canImport(gzipData));
- assert.equal(importer.extractSubtraces()[0], ORIGINAL_DATA);
- });
-
- test('inflateArrayBuffer', function() {
- // Test inflating the data from an ArrayBuffer.
- var gzipData = Base64.atob(GZIP_DATA_BASE_64);
- var buffer = new ArrayBuffer(gzipData.length);
- var view = new Uint8Array(buffer);
- for (var i = 0; i < gzipData.length; i++)
- view[i] = gzipData.charCodeAt(i);
- var importer = new tr.e.importer.GzipImporter(null, buffer);
- assert.isTrue(tr.e.importer.GzipImporter.canImport(buffer));
- assert.equal(importer.extractSubtraces()[0], ORIGINAL_DATA);
- });
-
- test('import', function() {
- var gzipData = Base64.atob(GZIP_DATA_BASE_64);
- assert.isTrue(tr.e.importer.GzipImporter.canImport(gzipData));
-
- var model = tr.c.TestUtils.newModelWithEvents(gzipData);
- var threads = model.getAllThreads();
- assert.equal(threads.length, 1);
-
- var slice = findSliceNamed(threads[0].sliceGroup, 'a');
- assert.equal(slice.category, 'foo');
- });
-
- test('transformToString', function() {
- function checkTransform(data, expectedString) {
- assert.strictEqual(tr.e.importer.GzipImporter.transformToString(data),
- expectedString);
- }
-
- function createArrayBuffer(values) {
- var buffer = new ArrayBuffer(values.length);
- var view = new Uint8Array(buffer);
- view.set(values);
- return buffer;
- }
-
- // If the browser supports TextDecoder, this will test our custom
- // implementation. Otherwise, the jszip fallback will be tested.
- checkTransform('abc012', 'abc012');
- checkTransform([100, 101, 102, 51, 52, 53], 'def345');
- checkTransform(createArrayBuffer([103, 104, 105, 54, 55, 56]), 'ghi678');
- checkTransform(new Uint8Array([106, 107, 108, 57, 58, 59]), 'jkl9:;');
-
- if (typeof TextDecoder === 'undefined') {
- // The browser doesn't support TextDecoder, so we have already checked
- // the jszip fallback.
- return;
- }
-
- // The browser supports TextDecoder, so we now check the jszip fallback.
- var oldTextDecoder = TextDecoder;
- TextDecoder = undefined;
- try {
- checkTransform('abc012', 'abc012');
- checkTransform([100, 101, 102, 51, 52, 53], 'def345');
- checkTransform(createArrayBuffer([103, 104, 105, 54, 55, 56]), 'ghi678');
- checkTransform(new Uint8Array([106, 107, 108, 57, 58, 59]), 'jkl9:;');
- } finally {
- TextDecoder = oldTextDecoder;
- }
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/jszip.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/jszip.html
deleted file mode 100644
index 0840c06ff74..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/jszip.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-// Vinn workaround for JSzip requiring window.
-if (tr.isVinn) {
- /**
- * Hack.
- */
- global.window = {};
-}
-</script>
-<script src="/jszip.min.js"></script>
-<script>
-'use strict';
-// Vinn workaround for JSzip requiring window.
-if (tr.isVinn) {
- /**
- * Hack.
- */
- global.JSZip = global.window.JSZip;
- global.window = undefined;
-} else if (tr.isNode) {
- var jsZipAbsPath = HTMLImportsLoader.hrefToAbsolutePath(
- '/jszip.min.js');
- var jsZipModule = require(jsZipAbsPath);
- global.JSZip = jsZipModule;
-}
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser.html
deleted file mode 100644
index 33dc13a76e4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser.html
+++ /dev/null
@@ -1,240 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses trace_marker events that were inserted in the trace by
- * userland.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux trace mark events that were inserted in the trace by userland.
- * @constructor
- */
- function AndroidParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('tracing_mark_write:android',
- AndroidParser.prototype.traceMarkWriteAndroidEvent.bind(this));
- importer.registerEventHandler('0:android',
- AndroidParser.prototype.traceMarkWriteAndroidEvent.bind(this));
-
- this.model_ = importer.model_;
- this.ppids_ = {};
- }
-
- function parseArgs(argsString) {
- var args = {};
- if (argsString) {
- var argsArray = argsString.split(';');
- for (var i = 0; i < argsArray.length; ++i) {
- var parts = argsArray[i].split('=');
- if (parts[0])
- args[parts.shift()] = parts.join('=');
- }
- }
- return args;
- }
-
- AndroidParser.prototype = {
- __proto__: Parser.prototype,
-
- openAsyncSlice: function(thread, category, name, cookie, ts, args) {
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor(
- category, name);
- var slice = new asyncSliceConstructor(
- category, name,
- ColorScheme.getColorIdForGeneralPurposeString(name), ts, args);
- var key = category + ':' + name + ':' + cookie;
- slice.id = cookie;
- slice.startThread = thread;
-
- if (!this.openAsyncSlices) {
- this.openAsyncSlices = { };
- }
- this.openAsyncSlices[key] = slice;
- },
-
- closeAsyncSlice: function(thread, category, name, cookie, ts, args) {
- if (!this.openAsyncSlices) {
- // No async slices have been started.
- return;
- }
-
- var key = category + ':' + name + ':' + cookie;
- var slice = this.openAsyncSlices[key];
- if (!slice) {
- // No async slices w/ this key have been started.
- return;
- }
-
- for (var arg in args) {
- if (slice.args[arg] !== undefined) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Both the S and F events of ' + slice.title +
- ' provided values for argument ' + arg + '.' +
- ' The value of the F event will be used.'
- });
- }
- slice.args[arg] = args[arg];
- }
-
- slice.endThread = thread;
- slice.duration = ts - slice.start;
- slice.startThread.asyncSliceGroup.push(slice);
- slice.subSlices = [new tr.model.AsyncSlice(slice.category,
- slice.title, slice.colorId, slice.start, slice.args, slice.duration)];
- delete this.openAsyncSlices[key];
- },
-
- traceMarkWriteAndroidEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var eventData = eventBase.details.split('|');
- switch (eventData[0]) {
- case 'B':
- var ppid = parseInt(eventData[1]);
- var title = eventData[2];
- var args = parseArgs(eventData[3]);
- var category = eventData[4];
- if (category === undefined)
- category = 'android';
-
- var thread = this.model_.getOrCreateProcess(ppid)
- .getOrCreateThread(pid);
- thread.name = eventBase.threadName;
- if (!thread.sliceGroup.isTimestampValidForBeginOrEnd(ts)) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Timestamps are moving backward.'
- });
- return false;
- }
-
- this.ppids_[pid] = ppid;
- thread.sliceGroup.beginSlice(category, title, ts, args);
-
- break;
-
- case 'E':
- var ppid = this.ppids_[pid];
- if (ppid === undefined) {
- // Silently ignore unmatched E events.
- break;
- }
-
- var thread = this.model_.getOrCreateProcess(ppid)
- .getOrCreateThread(pid);
- if (!thread.sliceGroup.openSliceCount) {
- // Silently ignore unmatched E events.
- break;
- }
-
- var slice = thread.sliceGroup.endSlice(ts);
-
- var args = parseArgs(eventData[3]);
- for (var arg in args) {
- if (slice.args[arg] !== undefined) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Both the B and E events of ' + slice.title +
- ' provided values for argument ' + arg + '.' +
- ' The value of the E event will be used.'
- });
- }
- slice.args[arg] = args[arg];
- }
-
- break;
-
- case 'C':
- var ppid = parseInt(eventData[1]);
- var name = eventData[2];
- var value = parseInt(eventData[3]);
- var category = eventData[4];
- if (category === undefined)
- category = 'android';
-
- var ctr = this.model_.getOrCreateProcess(ppid)
- .getOrCreateCounter(category, name);
- // Initialize the counter's series fields if needed.
- if (ctr.numSeries === 0) {
- ctr.addSeries(new tr.model.CounterSeries(value,
- ColorScheme.getColorIdForGeneralPurposeString(
- ctr.name + '.' + 'value')));
- }
-
- ctr.series.forEach(function(series) {
- series.addCounterSample(ts, value);
- });
-
- break;
-
- case 'S':
- var ppid = parseInt(eventData[1]);
- var name = eventData[2];
- var cookie = parseInt(eventData[3]);
- var args = parseArgs(eventData[4]);
- var category = eventData[5];
- if (category === undefined)
- category = 'android';
-
-
- var thread = this.model_.getOrCreateProcess(ppid)
- .getOrCreateThread(pid);
- thread.name = eventBase.threadName;
-
- this.ppids_[pid] = ppid;
- this.openAsyncSlice(thread, category, name, cookie, ts, args);
-
- break;
-
- case 'F':
- // Note: An async slice may end on a different thread from the one
- // that started it so this thread may not have been seen yet.
- var ppid = parseInt(eventData[1]);
-
- var name = eventData[2];
- var cookie = parseInt(eventData[3]);
- var args = parseArgs(eventData[4]);
- var category = eventData[5];
- if (category === undefined)
- category = 'android';
-
- var thread = this.model_.getOrCreateProcess(ppid)
- .getOrCreateThread(pid);
- thread.name = eventBase.threadName;
-
- this.ppids_[pid] = ppid;
- this.closeAsyncSlice(thread, category, name, cookie, ts, args);
-
- break;
-
- default:
- return false;
- }
-
- return true;
- }
- };
-
- Parser.register(AndroidParser);
-
- return {
- AndroidParser: AndroidParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser_test.html
deleted file mode 100644
index ddc5ba99823..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/android_parser_test.html
+++ /dev/null
@@ -1,230 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('androidUserlandImport', function() {
- var lines = [
- 'SurfaceFlinger-4831 [001] ...1 80909.598554: tracing_mark_write: B|4829|onMessageReceived', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598572: tracing_mark_write: B|4829|handleMessageInvalidate', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598590: tracing_mark_write: B|4829|latchBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598604: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598627: tracing_mark_write: B|4829|latchBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598651: tracing_mark_write: B|4829|updateTexImage', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598675: tracing_mark_write: B|4829|acquireBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598695: tracing_mark_write: B|4829|' + // @suppress longLineCheck
- 'com.android.launcher/com.android.launcher2.Launcher: 0',
- 'SurfaceFlinger-4831 [001] ...1 80909.598709: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598733: tracing_mark_write: C|4829|' + // @suppress longLineCheck
- 'com.android.launcher/com.android.launcher2.Launcher|0',
- 'SurfaceFlinger-4831 [001] ...1 80909.598746: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598844: tracing_mark_write: B|4829|releaseBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598862: tracing_mark_write: B|4829|' + // @suppress longLineCheck
- 'com.android.launcher/com.android.launcher2.Launcher: 2',
- 'SurfaceFlinger-4831 [001] ...1 80909.598876: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598892: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598925: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598955: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598988: tracing_mark_write: B|4829|latchBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.599001: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599021: tracing_mark_write: B|4829|latchBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.599036: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599068: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599087: tracing_mark_write: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599104: tracing_mark_write: E'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 4829);
- assert.equal(thread.tid, 4831);
- assert.equal(thread.name, 'SurfaceFlinger');
- assert.equal(thread.sliceGroup.length, 11);
- });
-
- test('androidUserlandImportWithSpacesInThreadName', function() {
- var lines = [
- 'Surface Flinger -4831 [001] ...1 80909.598590: tracing_mark_write: B|4829|latchBuffer', // @suppress longLineCheck
- 'Surface Flinger -4831 [001] ...1 80909.598604: tracing_mark_write: E' // @suppress longLineCheck
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 4829);
- assert.equal(thread.tid, 4831);
- assert.equal(thread.name, 'Surface Flinger ');
- assert.equal(thread.sliceGroup.length, 1);
- });
-
- test('androidAsyncUserlandImport', function() {
- var lines = [
- 'ndroid.launcher-9649 ( 9649) [000] ...1 1990280.663276: ' +
- 'tracing_mark_write: S|9649|animator:childrenOutlineAlpha|' +
- '1113053968',
- 'ndroid.launcher-9649 ( 9649) [000] ...1 1990280.781445: ' +
- 'tracing_mark_write: F|9649|animator:childrenOutlineAlpha|' +
- '1113053968'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 9649);
- assert.equal(thread.tid, 9649);
- assert.equal(thread.name, 'ndroid.launcher');
- assert.equal(thread.sliceGroup.length, 0);
- assert.equal(thread.asyncSliceGroup.length, 1);
-
- var slice = thread.asyncSliceGroup.slices[0];
- assert.equal(slice.title, 'animator:childrenOutlineAlpha');
- assert.closeTo(118.169, slice.duration, 1e-5);
- });
-
- test('androidUserlandLegacyKernelImport', function() {
- var lines = [
- 'SurfaceFlinger-4831 [001] ...1 80909.598554: 0: B|4829|onMessageReceived', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598572: 0: B|4829|handleMessageInvalidate', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598590: 0: B|4829|latchBuffer',
- 'SurfaceFlinger-4831 [001] ...1 80909.598604: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598627: 0: B|4829|latchBuffer',
- 'SurfaceFlinger-4831 [001] ...1 80909.598651: 0: B|4829|updateTexImage', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598675: 0: B|4829|acquireBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598695: 0: B|4829|' +
- 'com.android.launcher/com.android.launcher2.Launcher: 0',
- 'SurfaceFlinger-4831 [001] ...1 80909.598709: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598733: 0: C|4829|' +
- 'com.android.launcher/com.android.launcher2.Launcher|0',
- 'SurfaceFlinger-4831 [001] ...1 80909.598746: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598844: 0: B|4829|releaseBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.598862: 0: B|4829|' +
- 'com.android.launcher/com.android.launcher2.Launcher: 2',
- 'SurfaceFlinger-4831 [001] ...1 80909.598876: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598892: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598925: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598955: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.598988: 0: B|4829|latchBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.599001: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599021: 0: B|4829|latchBuffer', // @suppress longLineCheck
- 'SurfaceFlinger-4831 [001] ...1 80909.599036: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599068: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599087: 0: E',
- 'SurfaceFlinger-4831 [001] ...1 80909.599104: 0: E'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 4829);
- assert.equal(thread.tid, 4831);
- assert.equal(thread.name, 'SurfaceFlinger');
- assert.equal(thread.sliceGroup.length, 11);
- });
-
- test('androidUserlandChromiumImport', function() {
- var lines = [
- 'SandboxedProces-2894 [001] ...1 253.780659: tracing_mark_write: B|2867|DoWorkLoop|arg1=1|cat1', // @suppress longLineCheck
- 'SandboxedProces-2894 [001] ...1 253.780671: tracing_mark_write: B|2867|DeferOrRunPendingTask|source=test=test;task=xyz|cat2', // @suppress longLineCheck
- 'SandboxedProces-2894 [001] ...1 253.780671: tracing_mark_write: E|2867|DeferOrRunPendingTask||cat1', // @suppress longLineCheck
- 'SandboxedProces-2894 [001] ...1 253.780686: tracing_mark_write: B|2867|MessageLoop::RunTask|source=ipc/ipc_sync_message_filter.cc:Send|cat2', // @suppress longLineCheck
- 'SandboxedProces-2894 [001] ...1 253.780700: tracing_mark_write: E|2867|MessageLoop::RunTask||cat1', // @suppress longLineCheck
- 'SandboxedProces-2894 [001] ...1 253.780750: tracing_mark_write: C|2867|counter1|10|cat1', // @suppress longLineCheck
- 'SandboxedProces-2894 [001] ...1 253.780859: tracing_mark_write: E|2867|DoWorkLoop|arg2=2|cat2', // @suppress longLineCheck
- 'SandboxedProces-2894 [000] ...1 255.663276: tracing_mark_write: S|2867|async|1113053968|arg1=1;arg2=2|cat1', // @suppress longLineCheck
- 'SandboxedProces-2894 [000] ...1 255.663276: tracing_mark_write: F|2867|async|1113053968|arg3=3|cat1', // @suppress longLineCheck
- 'SandboxedProces-2894 [000] ...1 255.663276: tracing_mark_write: trace_event_clock_sync: parent_ts=128' // @suppress longLineCheck
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 2867);
- assert.equal(thread.tid, 2894);
- assert.equal(thread.name, 'SandboxedProces');
- assert.equal(thread.sliceGroup.length, 3);
-
- assert.equal(thread.sliceGroup.slices[0].args['arg1'], '1');
- assert.equal(thread.sliceGroup.slices[0].args['arg2'], '2');
-
- assert.equal(thread.sliceGroup.slices[1].args['source'], 'test=test');
- assert.equal(thread.sliceGroup.slices[1].category, 'cat2');
- assert.equal('DeferOrRunPendingTask',
- thread.sliceGroup.slices[1].title);
- assert.equal(thread.sliceGroup.slices[1].args['task'], 'xyz');
-
- assert.equal('ipc/ipc_sync_message_filter.cc:Send',
- thread.sliceGroup.slices[2].args['source']);
-
- assert.equal(thread.asyncSliceGroup.length, 1);
- assert.equal(thread.asyncSliceGroup.slices[0].args['arg1'], '1');
- assert.equal(thread.asyncSliceGroup.slices[0].args['arg2'], '2');
- assert.equal(thread.asyncSliceGroup.slices[0].args['arg3'], '3');
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 1);
- assert.equal(counters[0].category, 'cat1');
- assert.equal(counters[0].name, 'counter1');
-
- assert.equal(counters[0].numSamples, 1);
- assert.equal(counters[0].getSeries(0).getSample(0).value, 10);
-
- assert.equal(Math.round((253.780659 - (255.663276 - 128)) * 1000),
- Math.round(thread.sliceGroup.slices[0].start));
- });
-
- test('androidNeedReschedImport', function() {
- var lines = [
- 'RenderThread-3894 [001] ...1 253.780659: tracing_mark_write: B|3586|DrawFrame', // @suppress longLineCheck
- 'RenderThread-3894 [001] ...1 253.780671: tracing_mark_write: B|3586|waitForTask', // @suppress longLineCheck
- 'RenderThread-3894 [001] .N.1 253.780671: tracing_mark_write: E', // @suppress longLineCheck
- 'RenderThread-3894 [001] ...1 253.780671: tracing_mark_write: B|3586|waitForTask', // @suppress longLineCheck
- 'RenderThread-3894 [001] .n.1 253.780671: tracing_mark_write: E', // @suppress longLineCheck
- 'RenderThread-3894 [001] ...1 253.780671: tracing_mark_write: B|3586|waitForTask', // @suppress longLineCheck
- 'RenderThread-3894 [001] .p.1 253.780671: tracing_mark_write: E', // @suppress longLineCheck
- 'RenderThread-3894 [001] ...1 253.780686: tracing_mark_write: E' // @suppress longLineCheck
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings, 'hasImportWarnings');
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 3586);
- assert.equal(thread.tid, 3894);
- assert.equal(thread.name, 'RenderThread');
- assert.equal(thread.sliceGroup.length, 4);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser.html
deleted file mode 100644
index 3cabe135cf6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser.html
+++ /dev/null
@@ -1,692 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses Binder events
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- // Matches binder transactions:
- // transaction=%d dest_node=%d dest_proc=%d dest_thread=%d reply=%d flags=0x%x
- // code=0x%x
- var binderTransRE = new RegExp('transaction=(\\d+) dest_node=(\\d+) ' +
- 'dest_proc=(\\d+) dest_thread=(\\d+) ' +
- 'reply=(\\d+) flags=(0x[0-9a-fA-F]+) ' +
- 'code=(0x[0-9a-fA-F]+)');
-
- var binderTransReceivedRE = /transaction=(\d+)/;
-
- function isBinderThread(name) {
- return (name.indexOf('Binder') > -1);
- }
-
- // Taken from kernel source: include/uapi/linux/android/binder.h.
- var TF_ONE_WAY = 0x01;
- var TF_ROOT_OBJECT = 0x04;
- var TF_STATUS_CODE = 0x08;
- var TF_ACCEPT_FDS = 0x10;
- var NO_FLAGS = 0;
-
- function binderFlagsToHuman(num) {
- var flag = parseInt(num, 16);
- var str = '';
-
- if (flag & TF_ONE_WAY)
- str += 'this is a one-way call: async, no return; ';
- if (flag & TF_ROOT_OBJECT)
- str += 'contents are the components root object; ';
- if (flag & TF_STATUS_CODE)
- str += 'contents are a 32-bit status code; ';
- if (flag & TF_ACCEPT_FDS)
- str += 'allow replies with file descriptors; ';
- if (flag === NO_FLAGS)
- str += 'No Flags Set';
-
- return str;
- }
-
- function isReplyToOrigin(calling, called) {
- return (called.dest_proc === calling.calling_pid ||
- called.dest_thread === calling.calling_pid);
- }
-
- function binderCodeToHuman(code) {
- return 'Java Layer Dependent';
- }
-
- function doInternalSlice(trans, slice, ts) {
- if (slice.subSlices.length !== 0) {
- /* We want to make sure we keep moving the small slice to the end of
- the big slice or else the arrows will not point to the end.
- */
- slice.subSlices[0].start = ts;
- return slice.subSlices[0];
- }
- var kthread = trans.calling_kthread.thread;
- var internalSlice = kthread.sliceGroup.pushCompleteSlice('binder',
- slice.title,
- ts, .001, 0, 0,
- slice.args);
-
- internalSlice.title = slice.title;
- internalSlice.id = slice.id;
- internalSlice.colorId = slice.colorId;
- slice.subSlices.push(internalSlice);
- return internalSlice;
- }
-
- function generateBinderArgsForSlice(trans, cThreadName) {
- return {
- 'Transaction Id': trans.transaction_key,
- 'Destination Node': trans.dest_node,
- 'Destination Process': trans.dest_proc,
- 'Destination Thread': trans.dest_thread,
- 'Destination Name': cThreadName,
- 'Reply transaction?': trans.is_reply_transaction,
- 'Flags': trans.flags + ' ' +
- binderFlagsToHuman(trans.flags),
-
- 'Code': trans.code + ' ' +
- binderCodeToHuman(trans.code),
-
- 'Calling PID': trans.calling_pid,
- 'Calling tgid': trans.calling_kthread.thread.parent.pid
- };
- }
-
- /** @constructor */
- function BinderTransaction(events, callingPid, callingTs, callingKthread) {
- this.transaction_key = parseInt(events[1]);
- this.dest_node = parseInt(events[2]);
- this.dest_proc = parseInt(events[3]);
- this.dest_thread = parseInt(events[4]);
- this.is_reply_transaction = parseInt(events[5]) === 1 ? true : false;
- this.expect_reply = ((this.is_reply_transaction === false) &&
- (parseInt(events[6], 16) & TF_ONE_WAY) === 0);
-
- this.flags = events[6];
- this.code = events[7];
- this.calling_pid = callingPid;
- this.calling_ts = callingTs;
- this.calling_kthread = callingKthread;
- }
-
-
- /** @constructor */
- function BinderParser(importer) {
- Parser.call(this, importer);
- importer.registerEventHandler('binder_locked',
- BinderParser.prototype.
- binderLocked.bind(this));
- importer.registerEventHandler('binder_unlock',
- BinderParser.prototype.
- binderUnlock.bind(this));
- importer.registerEventHandler('binder_lock',
- BinderParser.prototype.binderLock.bind(this));
- importer.registerEventHandler('binder_transaction',
- BinderParser.prototype.
- binderTransaction.bind(this));
- importer.registerEventHandler('binder_transaction_received',
- BinderParser.prototype.
- binderTransactionReceived.bind(this));
-
- this.model_ = importer.model;
- this.kthreadlookup = {};
- this.importer_ = importer;
- this.transWaitingRecv = {};
- this.syncTransWaitingCompletion = {};
- this.recursiveSyncTransWaitingCompletion_ByPID = {};
- this.receivedTransWaitingConversion = {};
- }
-
- BinderParser.prototype = {
- __proto__: Parser.prototype,
-
- binderLock: function(eventName, cpuNumber, pid, ts, eventBase) {
- var tgid = parseInt(eventBase.tgid);
- this.doNameMappings(pid, tgid, eventName.threadName);
-
- var kthread = this.importer_.
- getOrCreateBinderKernelThread(eventBase.threadName, tgid, pid);
-
- kthread.binderAttemptLockTS = ts;
- kthread.binderOpenTsA = ts;
- return true;
- },
-
- binderLocked: function(eventName, cpuNumber, pid, ts, eventBase) {
- var binderThread = isBinderThread(eventBase.threadName);
- var tgid, name;
- var kthread, rthread;
-
- tgid = parseInt(eventBase.tgid);
- name = eventBase.threadName;
-
- kthread = this.importer_.
- getOrCreateBinderKernelThread(eventBase.threadName, tgid, pid);
-
- this.doNameMappings(pid, tgid, name);
-
- rthread = kthread.thread;
- kthread.binderLockAquiredTS = ts;
-
- if (kthread.binderAttemptLockTS === undefined)
- return false;
-
- var args = this.generateArgsForSlice(tgid, pid, name, kthread);
- rthread.sliceGroup.pushCompleteSlice('binder', 'binder lock waiting',
- kthread.binderAttemptLockTS,
- ts - kthread.binderAttemptLockTS,
- 0, 0, args);
-
- kthread.binderAttemptLockTS = undefined;
- return true;
- },
-
- binderUnlock: function(eventName, cpuNumber, pid, ts, eventBase) {
- var tgid = parseInt(eventBase.tgid);
- var kthread = this.importer_.
- getOrCreateBinderKernelThread(
- eventBase.threadName, tgid, pid);
-
- if (kthread.binderLockAquiredTS === undefined)
- return false;
-
- var args = this.generateArgsForSlice(tgid, pid, eventBase.threadName,
- kthread);
- kthread.thread.sliceGroup.pushCompleteSlice(
- 'binder',
- 'binder lock held',
- kthread.binderLockAquiredTS,
- ts - kthread.binderLockAquiredTS,
- 0, 0, args);
-
- kthread.binderLockAquiredTS = undefined;
- return true;
- },
-
- /** There are a few transaction status changes that signify
- * progress through a binder transaction:
- *
- * Case One: Sync transaction.
- * Thread A calls a blocking function on Thread B. We receive a
- * binder_transaction msg From thread A stating that it is going to Call
- * thread B. We create a slice and a binder object for this transaction and
- * add it to addTransactionWaitingForRecv(transaction key, binder object)
- * This notifies thread B and passes the slice, binder object and time
- * stamp.
- *
- * Case Two: Async transaction.
- * Thread A calls an async function on Thread B. Like above we receive a
- * binder_transaction message, but the flags differ from above. The
- * TF_ONEWAY flags are set so we know that when Thread B gets the
- * binder_transaction_received with the same transaciton key the total
- * transaction is complete.
- *
- * Case Three: 'Prior_receive'
- * Prior_receive occurs when the thread being called (think A calls B),
- * receives a binder_transaction_received message, but cannot correlate it
- * to any current outstanding recursive transactions. That means the
- * message it just received is the start of some communication, not some
- * ongoing communication.
- * Once the execution flow has been passed to thread B, from A:
- * Thread B enters binder_transaction_received() we see that Thread A
- * had notified us that it sent us a message by calling
- * getTransactionWaitingForRecv(transaction key);
- * What can happen now is either this was a simple Call reply,
- * or this is a call -> recursion -> reply. We call modelPriorReceive()
- * which sets up the slices accordingly.
- * If this is a call -> recursion -> reply
- * we will go to case 4 by calling addRecursiveSyncTransNeedingCompletion()
- * The function takes B's PID, the binder object from A and the current
- * binder object from B. This function adds outstanding non-complete
- * transactions to a stack on thread B.
- *
- * Case Four: 'recursiveTrans'
- * This case follows Like above:
- * A sent binder_transaction
- * B got binder_transaction_received
- * B instead of replying to A can Call C or call 'into' A, ie recursion
- * Case four also deals with setting up a large slice to 'contain'
- * all the recursive transactions that happen until B finally replies to
- * A.
- *
- *
- * An example: A-> B-> C-> B-> A
- *
- * (1) A starts a synchronous transaction to B.
- * (2) A enters binderTransaction() event handler, hits the else statement
- * (3) A calls addTransactionWaitingForRecv(trans key, object) to notify
- * Thread B.
- * (4) B Enters binderTransactionReceived().
- * (5) B hits the second if after calling
- * getTransactionWaitingForRecv(trans key)
- * This function returns us the object set up in step (3).
- * (6) This is not an async transaction, B calls
- * setCurrentReceiveOnPID(B's PID, [ts for (4), object from (3)]).
- *
- * (7) B enters binderTransaction() event handler, first if triggers after
- * calling getPriorReceiveOnPID(B's PID) the tuple from (6) is returned.
- *
- * (8) Execution enters modelPriorReceive().
- * (8a) A slice is setup for this binder transaction in B's timeline.
- * (9) This is not a reply to thread A, B is going to call Thread C.
- * (10) else statement is hit.
- * (11) We set the tile from (8a) to be binder_reply this is the
- * 'containg slice' for the recursion
- * (12) We create a new slice 'binder_transaction' this slice is the
- * recursive slice that will have arrows to Thread C's slice.
- * (13) addRecursiveSyncTransNeedingCompletion(B's PID,
- * [obj from (3), obj from 7])
- * this sets up notification that B's pid has outstanding recursive
- * transactions that need to be completed.
- * (14) B notifies C that a transaction is waiting for it by calling
- * addTransactionWaitingForRecv like in step (3).
- * (15) C enters binderTransactionReceived() step 5 6 7 8 8a happen, but in
- * the context of Thread C.
- * (16) C is in modelPriorReceive(), it hits the first if statement,
- * this transaction _IS_ a reply, and it is a reply to B.
- * (17) C calls addSyncTransNeedingCompletion(trans key,
- * [object from(3), object from 15-5])
- * (18) B enters binderTransactionReceived() hits the first if after calling
- * getSyncTransNeedingCompletion(trans key from (17)) the tuple from
- * (17) gets returned.
- *
- * (19) B scales up the slice created in (12) and sets up flows from 15-8a
- * slice.
- * (20) B enters BinderTransaction() event handler and the second if is hit
- * after calling getRecursiveTransactionNeedingCompletion(B's pid).
- * (21) modelRecursiveTransactions() gets called, first if executes.
- * (22) slice durations are fixed up.
- * (23) B notifies A via
- * addSyncTransNeedingCompletion(trans key, binder obj from 8a).
- * (24) B deletes the outstanding asynctrans via
- ( removeRecursiveTransaction(B's pid).
- * (25) A enters binderTransactionReceived() event handler and finishes up
- * some flows, and slices.
- */
- binderTransaction: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = binderTransRE.exec(eventBase.details);
- if (event === undefined)
- return false;
-
- var tgid = parseInt(eventBase.tgid);
-
- this.doNameMappings(pid, tgid, eventBase.threadName);
-
- var kthread;
- kthread = this.importer_.
- getOrCreateBinderKernelThread(eventBase.threadName, tgid, pid);
-
- var trans = new BinderTransaction(event, pid, ts, kthread);
- var args = generateBinderArgsForSlice(trans, eventBase.threadName);
- /**
- * This thread previously ack'd the transaction with a
- * transaction_received. That means someone sent us a message we processed
- * it and are now sending a transaction.
- * The transaction could be a response, or it could be recursive.
- */
- var priorReceive = this.getPriorReceiveOnPID(pid);
-
- if (priorReceive !== false) {
- return this.modelPriorReceive(priorReceive, ts, pid, tgid, kthread,
- trans, args, event);
- }
- /**
- * This Thread has an already established recursive slice. We will now
- * either complete the entire transaction, OR do more recursive calls.
- */
- var recursiveTrans = this.getRecursiveTransactionNeedingCompletion(pid);
-
- if (recursiveTrans !== false)
- return this.modelRecursiveTransactions(recursiveTrans, ts, pid,
- kthread, trans, args);
-
- /**
- * Start of a Transaction. This thread is the initiator of either a call
- * response, an async call -> ack, or a call -> recursion -> response.
- * Note, we put a fake duration into this slice and patch it up later.
- */
- var slice = kthread.thread.sliceGroup.pushCompleteSlice('binder',
- '', ts, .03, 0, 0, args);
-
- slice.colorId = ColorScheme.getColorIdForGeneralPurposeString(
- ts.toString());
- trans.slice = slice;
-
- if (trans.expect_reply)
- slice.title = 'binder transaction';
- else
- slice.title = 'binder transaction async';
-
- this.addTransactionWaitingForRecv(trans.transaction_key, trans);
-
- return true;
- },
-
- binderTransactionReceived: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var event = binderTransReceivedRE.exec(eventBase.details);
-
- if (event === undefined)
- return false;
-
- var transactionkey = parseInt(event[1]);
- var tgid = parseInt(eventBase.tgid);
- var kthread;
- kthread = this.importer_.
- getOrCreateBinderKernelThread(eventBase.threadName, tgid, pid);
-
- var syncComplete = this.getSyncTransNeedsCompletion(transactionkey);
-
- if (syncComplete !== false) {
- /* This recv is the completion of a synchronous transaction.
- * We need to scale the slice up to the current ts and finish
- * creating some flows.
- */
- var syncTrans = syncComplete[0];
- var syncSlice = syncTrans.slice;
- var responseTrans = syncComplete[1];
- var responseSlice = responseTrans.slice;
-
- syncSlice.duration = ts - syncSlice.start;
- /** These calls are a little hack that places a very small slice at
- * the end of the sync slice and the response slice. This allows us
- * to hook flow events (arrows) from the start to the end of the
- * slices.
- */
- var syncInternal = doInternalSlice(syncTrans, syncSlice, ts);
- var responseTs = responseSlice.start + responseSlice.duration;
- var responseInternal = doInternalSlice(responseTrans,
- responseSlice, responseTs);
-
- if (responseSlice.outFlowEvents.length === 0 ||
- syncSlice.inFlowEvents.length === 0) {
- var flow = this.generateFlow(responseInternal, syncInternal,
- responseTrans, syncTrans);
-
- syncSlice.inFlowEvents.push(flow);
- responseSlice.outFlowEvents.push(flow);
- this.model_.flowEvents.push(flow);
- }
- // Move flow arrows -- but not the first one.
- for (var i = 1; i < syncSlice.inFlowEvents.length; i++) {
- syncSlice.inFlowEvents[i].duration =
- ts - syncSlice.inFlowEvents[i].start;
- }
- return true;
- }
-
- var trForRecv = this.getTransactionWaitingForRecv(transactionkey);
-
- if (trForRecv !== false) {
- if (!trForRecv.expect_reply) {
- // This is an async call place an Async slice.
- var args = generateBinderArgsForSlice(trForRecv,
- eventBase.threadName);
- var slice = kthread.thread.sliceGroup.
- pushCompleteSlice('binder',
- 'binder Async recv',
- ts, .03, 0, 0,
- args);
-
- var fakeEvent = [0, 0, 0, 0, 0, 0, 0];
- var fakeTrans = new BinderTransaction(fakeEvent, pid, ts, kthread);
- var flow = this.generateFlow(trForRecv.slice, slice,
- trForRecv, fakeTrans);
-
- this.model_.flowEvents.push(flow);
- trForRecv.slice.title = 'binder transaction async';
- trForRecv.slice.duration = .03;
- return true;
- }
- // Setup prior receive.
- trForRecv.slice.title = 'binder transaction';
- this.setCurrentReceiveOnPID(pid, [ts, trForRecv]);
- return true;
- }
- /** This case is when we received an ack for a transaction we have
- * never seen before. This usually happens at the start of a trace.
- * We will get incomplete transactions that started before started
- * tracing. Just discard them.
- */
- return false;
- },
-
- // helper functions
- modelRecursiveTransactions: function(recursiveTrans, ts, pid, kthread,
- trans, args) {
-
- var recursiveSlice = recursiveTrans[1].slice;
- var origSlice = recursiveTrans[0].slice;
- recursiveSlice.duration = ts - recursiveSlice.start;
- trans.slice = recursiveSlice;
-
- if (trans.is_reply_transaction) {
- /* Case one:
- * This transaction is finally the reply of the recursion.
- */
- origSlice.duration = ts - origSlice.start;
- this.addSyncTransNeedingCompletion(trans.transaction_key,
- recursiveTrans);
-
- if (isReplyToOrigin(recursiveTrans[0], trans))
- this.removeRecursiveTransaction(pid);
- } else {
- /**
- * Case two:
- * This transaction is more recursive calls.
- * This is a nested call within an already started transaction,
- * it can either be a async or a normal sync transaction.
- */
- var slice = kthread.thread.sliceGroup.pushCompleteSlice('binder',
- '' , ts, .03, 0,
- 0, args);
-
- trans.slice = slice;
- this.addTransactionWaitingForRecv(trans.transaction_key, trans);
- }
- return true;
- },
-
- modelPriorReceive: function(priorReceive, ts, pid, tgid, kthread, trans,
- args, event) {
- var calleeSlice = priorReceive[1].slice;
- var calleeTrans = priorReceive[1];
- var recvTs = priorReceive[0];
- var slice = kthread.thread.sliceGroup.pushCompleteSlice('binder',
- '', recvTs, ts - recvTs, 0, 0, args);
-
- var flow = this.generateFlow(calleeSlice, slice, calleeTrans, trans);
- this.model_.flowEvents.push(flow);
- trans.slice = slice;
-
- if (trans.is_reply_transaction) {
- /* This is a response to a synchronous or a recursive sync
- * transaction.
- */
- slice.title = 'binder reply';
- /* Notify this transaction key that when it recv's it is completing
- * a sync transaction.
- */
- this.addSyncTransNeedingCompletion(trans.transaction_key,
- [calleeTrans, trans]);
- } else {
- /**
- * Recursive calls and or calls around, either way it's not
- * going to complete a transaction.
- */
- slice.title = 'binder reply';
- /* Since this is a recursive transaction we want to create the main
- * large slice which will contain all these recursive transactions.
- * For that we created the main slice above and this is a recursive
- * transaction that will be placed right below it. Note, that this
- * is only for the first recursive transaction. If more come they will
- * be handled below in the getRecursiveTransactionNeedingCompletion
- */
- var trans1 = new BinderTransaction(event, pid, ts, kthread);
-
- slice = kthread.thread.sliceGroup.
- pushCompleteSlice('binder',
- 'binder transaction',
- recvTs,
- (ts - recvTs), 0,
- 0, args);
-
- /* could be a async trans if so set the length to be a small one */
- if (!trans.expect_reply) {
- slice.title = 'binder transaction async';
- slice.duration = .03;
- } else {
- /* stupid hack to stop merging of AIDL slices and
- * this slice. This is currently disabled, if AIDL tracing is on we
- * will see merging of this slice and the AIDL slice. Once upstream
- * has a solution for flow events to be placed in the middle of
- * slices this part can be fixed.
- *
- * This is commented out because AIDL tracing doesn't exit yet.
- */
- //slice.start += .15;
- }
- trans1.slice = slice;
- this.addRecursiveSyncTransNeedingCompletion(pid,
- [calleeTrans, trans]);
- this.addTransactionWaitingForRecv(trans.transaction_key, trans1);
- }
- return true;
- },
-
- getRecursiveTransactionNeedingCompletion: function(pid) {
- if (this.recursiveSyncTransWaitingCompletion_ByPID[pid] === undefined)
- return false;
-
- var len = this.recursiveSyncTransWaitingCompletion_ByPID[pid].length;
- if (len === 0)
- return false;
-
- return this.recursiveSyncTransWaitingCompletion_ByPID[pid][len - 1];
- },
-
- addRecursiveSyncTransNeedingCompletion: function(pid, tuple) {
- if (this.recursiveSyncTransWaitingCompletion_ByPID[pid] === undefined)
- this.recursiveSyncTransWaitingCompletion_ByPID[pid] = [];
-
- this.recursiveSyncTransWaitingCompletion_ByPID[pid].push(tuple);
- },
-
- removeRecursiveTransaction: function(pid) {
- var len = this.recursiveSyncTransWaitingCompletion_ByPID[pid].length;
- if (len === 0) {
- delete this.recursiveSyncTransWaitingCompletion_ByPID[pid];
- return;
- }
-
- this.recursiveSyncTransWaitingCompletion_ByPID[pid].splice(len - 1, 1);
- },
-
- setCurrentReceiveOnPID: function(pid, tuple) {
- if (this.receivedTransWaitingConversion[pid] === undefined) {
- this.receivedTransWaitingConversion[pid] = [];
- }
- this.receivedTransWaitingConversion[pid].push(tuple);
- },
-
- getPriorReceiveOnPID: function(pid) {
- if (this.receivedTransWaitingConversion[pid] === undefined)
- return false;
-
- var len = this.receivedTransWaitingConversion[pid].length;
- if (len === 0)
- return false;
-
- return this.receivedTransWaitingConversion[pid].splice(len - 1, 1)[0];
- },
-
- addSyncTransNeedingCompletion: function(transactionkey, tuple) {
- var dict = this.syncTransWaitingCompletion;
- dict[transactionkey] = tuple;
- },
-
- getSyncTransNeedsCompletion: function(transactionkey) {
- var ret = this.syncTransWaitingCompletion[transactionkey];
- if (ret === undefined)
- return false;
-
- delete this.syncTransWaitingCompletion[transactionkey];
- return ret;
- },
-
- getTransactionWaitingForRecv: function(transactionkey) {
- var ret = this.transWaitingRecv[transactionkey];
- if (ret === undefined)
- return false;
-
- delete this.transWaitingRecv[transactionkey];
- return ret;
- },
-
- addTransactionWaitingForRecv: function(transactionkey, transaction) {
- this.transWaitingRecv[transactionkey] = transaction;
- },
-
- generateFlow: function(from, to, fromTrans, toTrans) {
- var title = 'Transaction from : ' +
- this.pid2name(fromTrans.calling_pid) +
- ' From PID: ' + fromTrans.calling_pid + ' to pid: ' +
- toTrans.calling_pid +
- ' Thread Name: ' + this.pid2name(toTrans.calling_pid);
-
- var ts = from.start;
- var flow = new tr.model.FlowEvent('binder', 'binder',
- title, 1, ts, []);
- flow.startSlice = from;
- flow.endSlice = to;
- flow.start = from.start;
- flow.duration = to.start - ts;
-
- from.outFlowEvents.push(flow);
- to.inFlowEvents.push(flow);
-
- return flow;
- },
-
- generateArgsForSlice: function(tgid, pid, name, kthread) {
- return {
- 'Thread Name': name,
- 'pid': pid,
- 'gid': tgid
- };
- },
-
- pid2name: function(pid) {
- return this.kthreadlookup[pid];
- },
-
- doNameMappings: function(pid, tgid, name) {
- this.registerPidName(pid, name);
- this.registerPidName(tgid, name);
- },
-
- registerPidName: function(pid, name) {
- if (this.pid2name(pid) === undefined)
- this.kthreadlookup[pid] = name;
- }
- };
-
- Parser.register(BinderParser);
- return {
- BinderParser: BinderParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser_test.html
deleted file mode 100644
index 9365df1ea5b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/binder_parser_test.html
+++ /dev/null
@@ -1,224 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('binderParserImport', function() {
- var lines = [
- 'binderLibTest-10619 (10619) [001] ...1 25191.335749: binder_transaction' +
- ': transaction=489053 dest_node=489048 dest_proc=10670 dest_thread=0 ' +
- 'reply=0 flags=0x10 code=0xd',
- 'binderLibTest-10670 (10670) [000] ...1 25191.335996:' +
- ' binder_transaction_received: transaction=489053',
- 'binderLibTest-10670 (10670) [000] ...1 25191.336167:' +
- ' binder_transaction: transaction=489056 dest_node=161277 ' +
- 'dest_proc=3454 dest_thread=0 reply=0 flags=0x10 code=0x2',
- '/system/bin/servicemanager-3454 ( 3454) [000] ...1 25191.336199:' +
- ' binder_transaction_received: transaction=489056',
- '/system/bin/servicemanager-3454 ( 3454) [000] ...1 25191.336302:' +
- ' binder_transaction: transaction=489057 dest_node=0 dest_proc=10670' +
- ' dest_thread=10670 reply=1 flags=0x0 code=0x0',
- 'binderLibTest-10670 (10670) [000] ...1 25191.336334:' +
- ' binder_transaction_received: transaction=489057',
- 'binderLibTest-10670 (10670) [000] ...1 25191.336655:' +
- ' binder_transaction: transaction=489059 dest_node=488755' +
- ' dest_proc=10622 dest_thread=0 reply=0 flags=0x10 code=0x1',
- 'Binder_4-10645 (10622) [001] ...1 25191.336693:' +
- ' binder_transaction_received: transaction=489059',
- 'Binder_4-10645 (10622) [001] ...1 25191.336754: binder_transaction:' +
- ' transaction=489060 dest_node=0 dest_proc=10670 dest_thread=10670' +
- ' reply=1 flags=0x0 code=0x0',
- 'binderLibTest-10670 (10670) [000] ...1 25191.337003:' +
- ' binder_transaction_received: transaction=489060',
- 'binderLibTest-10670 (10670) [000] ...1 25191.337052:' +
- ' binder_transaction: transaction=489061 dest_node=0 dest_proc=10619' +
- ' dest_thread=10619 reply=1 flags=0x8 code=0x0',
- 'binderLibTest-10619 (10619) [001] ...1 25191.337085:' +
- ' binder_transaction_received: transaction=489061',
- 'atrace-10618 (10618) [000] ...1 25196.059954: tracing_mark_write:' +
- ' trace_event_clock_sync: parent_ts=25196.050781'
- ];
-
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shfitWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 4);
-
- });
-
- test('binderRecursiveTest', function() {
- var lines = [
- 'binderLibTest-10619 (10619) [001] ...1 25191.335749: binder_transaction' +
- ': transaction=489053 dest_node=489048 dest_proc=10670 dest_thread=0 ' +
- 'reply=0 flags=0x10 code=0xd',
- 'binderLibTest-10670 (10670) [000] ...1 25191.335996:' +
- ' binder_transaction_received: transaction=489053',
- 'binderLibTest-10670 (10670) [000] ...1 25191.336167:' +
- ' binder_transaction: transaction=489056 dest_node=161277 ' +
- 'dest_proc=3454 dest_thread=0 reply=0 flags=0x10 code=0x2',
- '/system/bin/servicemanager-3454 ( 3454) [000] ...1 25191.336199:' +
- ' binder_transaction_received: transaction=489056',
- '/system/bin/servicemanager-3454 ( 3454) [000] ...1 25191.336302:' +
- ' binder_transaction: transaction=489057 dest_node=0 dest_proc=10670' +
- ' dest_thread=10670 reply=1 flags=0x0 code=0x0',
- 'binderLibTest-10670 (10670) [000] ...1 25191.336334:' +
- ' binder_transaction_received: transaction=489057',
- 'binderLibTest-10670 (10670) [000] ...1 25191.336655:' +
- ' binder_transaction: transaction=489059 dest_node=488755' +
- ' dest_proc=10622 dest_thread=0 reply=0 flags=0x10 code=0x1',
- 'Binder_4-10645 (10622) [001] ...1 25191.336693:' +
- ' binder_transaction_received: transaction=489059',
- 'Binder_4-10645 (10622) [001] ...1 25191.336754: binder_transaction:' +
- ' transaction=489060 dest_node=0 dest_proc=10670 dest_thread=10670' +
- ' reply=1 flags=0x0 code=0x0',
- 'binderLibTest-10670 (10670) [000] ...1 25191.337003:' +
- ' binder_transaction_received: transaction=489060',
- 'binderLibTest-10670 (10670) [000] ...1 25191.337052:' +
- ' binder_transaction: transaction=489061 dest_node=0 dest_proc=10619' +
- ' dest_thread=10619 reply=1 flags=0x8 code=0x0',
- 'binderLibTest-10619 (10619) [001] ...1 25191.337085:' +
- ' binder_transaction_received: transaction=489061',
- 'atrace-10618 (10618) [000] ...1 25196.059954: tracing_mark_write:' +
- ' trace_event_clock_sync: parent_ts=25196.050781'
- ];
-
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shfitWorldToZero: false
- });
- var threads = m.getAllThreads();
-
- var thread = threads[0];
- assert.equal(thread.parent.pid, 3454);
- assert.equal(thread.tid, 3454);
- assert.equal(thread.name, '/system/bin/servicemanager');
- /* one main slice and one 'internal slice' for the end flow event' */
- assert.equal(thread.sliceGroup.length, 2);
-
- /* check flow events for service manager */
- var mainSlice = thread.sliceGroup.slices[0];
- assert.equal(mainSlice.inFlowEvents.length, 1);
- assert.equal(mainSlice.outFlowEvents.length, 1);
- var internalSlice = thread.sliceGroup.slices[1];
- assert.equal(internalSlice.outFlowEvents.length, 1);
-
- /* check name of slice */
- assert.equal(mainSlice.title, 'binder reply');
-
- /* check binderLibTest */
- thread = threads[1];
- assert.equal(thread.parent.pid, 10619);
- assert.equal(thread.tid, 10619);
- assert.equal(thread.name, 'binderLibTest');
-
- assert.equal(2, thread.sliceGroup.length);
-
- mainSlice = thread.sliceGroup.slices[0];
- assert.equal(mainSlice.inFlowEvents.length, 1);
- assert.equal(mainSlice.outFlowEvents.length, 1);
- internalSlice = thread.sliceGroup.slices[1];
- assert.equal(internalSlice.inFlowEvents.length, 1);
-
- assert.equal(mainSlice.title, 'binder transaction');
-
- /* check Binder_4 */
- thread = threads[2];
- assert.equal(thread.parent.pid, 10622);
- assert.equal(thread.tid, 10645);
- assert.equal(thread.name, 'Binder_4');
- assert.equal(2, thread.sliceGroup.length);
-
- mainSlice = thread.sliceGroup.slices[0];
- assert.equal(mainSlice.inFlowEvents.length, 1);
- assert.equal(mainSlice.outFlowEvents.length, 1);
- internalSlice = thread.sliceGroup.slices[1];
- assert.equal(internalSlice.outFlowEvents.length, 1);
-
- assert.equal(mainSlice.title, 'binder reply');
-
- /* check last binderLibTest with recursive slices */
- thread = threads[3];
- assert.equal(thread.parent.pid, 10670);
- assert.equal(thread.tid, 10670);
- assert.equal(thread.name, 'binderLibTest');
- assert.equal(6, thread.sliceGroup.length);
-
- mainSlice = thread.sliceGroup.slices[0];
- assert.equal(mainSlice.inFlowEvents.length, 1);
- assert.equal(mainSlice.outFlowEvents.length, 1);
- internalSlice = thread.sliceGroup.slices[5];
- assert.equal(internalSlice.outFlowEvents.length, 1);
-
- assert.equal(mainSlice.title, 'binder reply');
-
- var recursive = thread.sliceGroup.slices[1];
- var recursiveInternal = thread.sliceGroup.slices[2];
- assert.equal(recursive.inFlowEvents.length, 1);
- assert.equal(recursive.outFlowEvents.length, 1);
- assert.equal(recursiveInternal.inFlowEvents.length, 1);
-
- assert.equal(recursive.title, 'binder transaction');
-
- /* check second recursive slice and internal */
-
- var recursive = thread.sliceGroup.slices[3];
- var recursiveInternal = thread.sliceGroup.slices[4];
- assert.equal(recursive.inFlowEvents.length, 1);
- assert.equal(recursive.outFlowEvents.length, 1);
- assert.equal(recursiveInternal.inFlowEvents.length, 1);
-
- assert.equal(recursive.title, 'binder transaction');
- });
-
- test('binderSimpleAsync', function() {
- var lines = [
- '/system/bin/surfaceflinger-3462 ( 3462) [000] ...1 108286.109437:' +
- ' binder_transaction: transaction=923419 dest_node=175950' +
- ' dest_proc=4044 dest_thread=0 reply=0 flags=0x11 code=0x1',
- 'Binder_5-12869 ( 4044) [000] ...1 108286.109835:' +
- ' binder_transaction_received: transaction=923419'
- ];
-
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shfitWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads(0);
- assert.equal(threads.length, 2);
-
- var thread = threads[0];
- assert.equal(thread.tid, 3462);
- assert.equal(thread.name, '/system/bin/surfaceflinger');
- assert.equal(thread.sliceGroup.length, 1);
-
- var slice = thread.sliceGroup.slices[0];
- assert.equal(slice.outFlowEvents.length, 1);
- assert.equal(slice.inFlowEvents.length, 0);
- assert.equal(slice.title, 'binder transaction async');
-
- thread = threads[1];
- assert.equal(thread.tid, 12869);
- assert.equal(thread.name, 'Binder_5');
- assert.equal(thread.sliceGroup.length, 1);
-
- slice = thread.sliceGroup.slices[0];
- assert.equal(slice.inFlowEvents.length, 1);
- assert.equal(slice.outFlowEvents.length, 0);
- assert.equal(slice.title, 'binder Async recv');
-
- });
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser.html
deleted file mode 100644
index d3ac9837afb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses trace_marker events that were inserted in the trace by
- * userland.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux trace mark events that were inserted in the trace by userland.
- * @constructor
- */
- function BusParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('memory_bus_usage',
- BusParser.prototype.traceMarkWriteBusEvent.bind(this));
-
- this.model_ = importer.model_;
- this.ppids_ = {};
- }
-
- BusParser.prototype = {
- __proto__: Parser.prototype,
-
- traceMarkWriteBusEvent: function(eventName, cpuNumber, pid, ts,
- eventBase, threadName) {
- var re = new RegExp('bus=(\\S+) rw_bytes=(\\d+) r_bytes=(\\d+) ' +
- 'w_bytes=(\\d+) cycles=(\\d+) ns=(\\d+)');
- var event = re.exec(eventBase.details);
-
- var name = event[1];
- var rwBytes = parseInt(event[2]);
- var rBytes = parseInt(event[3]);
- var wBytes = parseInt(event[4]);
- var cycles = parseInt(event[5]);
- var ns = parseInt(event[6]);
-
- // BW in MiB/s.
- var sec = tr.b.convertUnit(ns, tr.b.UnitScale.Metric.NANO,
- tr.b.UnitScale.Metric.NONE);
- var readBandwidthInBps = rBytes / sec;
- var readBandwidthInMiBps = tr.b.convertUnit(readBandwidthInBps,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI);
- var writeBandwidthInBps = wBytes / sec;
- var writeBandwidthInMiBps = tr.b.convertUnit(writeBandwidthInBps,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI);
-
- var ctr = this.model_.kernel
- .getOrCreateCounter(null, 'bus ' + name + ' read');
- if (ctr.numSeries === 0) {
- ctr.addSeries(new tr.model.CounterSeries('value',
- ColorScheme.getColorIdForGeneralPurposeString(
- ctr.name + '.' + 'value')));
- }
- ctr.series.forEach(function(series) {
- series.addCounterSample(ts, readBandwidthInMiBps);
- });
-
- ctr = this.model_.kernel
- .getOrCreateCounter(null, 'bus ' + name + ' write');
- if (ctr.numSeries === 0) {
- ctr.addSeries(new tr.model.CounterSeries('value',
- ColorScheme.getColorIdForGeneralPurposeString(
- ctr.name + '.' + 'value')));
- }
- ctr.series.forEach(function(series) {
- series.addCounterSample(ts, writeBandwidthInMiBps);
- });
-
- return true;
- }
- };
-
- Parser.register(BusParser);
-
- return {
- BusParser: BusParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser_test.html
deleted file mode 100644
index 6222067d64c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/bus_parser_test.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('exynos5Bus', function() {
- var lines = [
- 's3c-fb-vsync-85 [001] d..2 8116.730115: memory_bus_usage: ' +
- 'bus=RIGHT rw_bytes=0 r_bytes=0 w_bytes=0 cycles=2681746 ns=16760792',
-
- 's3c-fb-vsync-85 [001] d..2 8116.730118: memory_bus_usage: ' +
- 'bus=CPU rw_bytes=2756608 r_bytes=2267328 w_bytes=491328 ' +
- 'cycles=6705198 ns=16763375',
-
- 's3c-fb-vsync-85 [001] d..2 8116.746788: memory_bus_usage: ' +
- 'bus=DDR_C rw_bytes=2736128 r_bytes=2260864 w_bytes=479248 ' +
- 'cycles=6670677 ns=16676375',
-
- 's3c-fb-vsync-85 [001] d..2 8116.746790: memory_bus_usage: ' +
- 'bus=DDR_R1 rw_bytes=31457280 r_bytes=31460912 w_bytes=0 ' +
- 'cycles=6670521 ns=16676500',
-
- 's3c-fb-vsync-85 [001] d..2 8116.746792: memory_bus_usage: ' +
- 'bus=DDR_L rw_bytes=16953344 r_bytes=16731088 w_bytes=223664 ' +
- 'cycles=6669885 ns=16674833',
-
- 's3c-fb-vsync-85 [001] d..2 8116.746793: memory_bus_usage: ' +
- 'bus=RIGHT rw_bytes=0 r_bytes=0 w_bytes=0 cycles=2667378 ns=16671250',
-
- 's3c-fb-vsync-85 [001] d..2 8116.746798: memory_bus_usage: ' +
- 'bus=CPU rw_bytes=2797568 r_bytes=2309424 w_bytes=491968 ' +
- 'cycles=6672156 ns=16680458',
-
- 's3c-fb-vsync-85 [001] d..2 8116.763521: memory_bus_usage: ' +
- 'bus=DDR_C rw_bytes=2408448 r_bytes=1968448 w_bytes=441456 ' +
- 'cycles=6689562 ns=16723458',
-
- 's3c-fb-vsync-85 [001] d..2 8116.763523: memory_bus_usage: ' +
- 'bus=DDR_R1 rw_bytes=31490048 r_bytes=31493360 w_bytes=0 ' +
- 'cycles=6690012 ns=16725083',
-
- 's3c-fb-vsync-85 [001] d..2 8116.763525: memory_bus_usage: ' +
- 'bus=DDR_L rw_bytes=16941056 r_bytes=16719136 w_bytes=223472 ' +
- 'cycles=6690156 ns=16725375'
-
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 10);
-
- assert.equal(counters[0].series[0].samples.length, 2);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser.html
deleted file mode 100644
index 41c12d7f0c3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses trace_marker events that were inserted in the trace by
- * userland.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux trace mark events that were inserted in the trace by userland.
- * @constructor
- */
- function ClockParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('clock_set_rate',
- ClockParser.prototype.traceMarkWriteClockEvent.bind(this));
-
- this.model_ = importer.model_;
- this.ppids_ = {};
- }
-
- ClockParser.prototype = {
- __proto__: Parser.prototype,
-
- traceMarkWriteClockEvent: function(eventName, cpuNumber, pid, ts,
- eventBase, threadName) {
- var event = /(\S+) state=(\d+) cpu_id=(\d+)/.exec(eventBase.details);
-
-
- var name = event[1];
- var rate = parseInt(event[2]);
-
- var ctr = this.model_.kernel
- .getOrCreateCounter(null, name);
- // Initialize the counter's series fields if needed.
- if (ctr.numSeries === 0) {
- ctr.addSeries(new tr.model.CounterSeries('value',
- ColorScheme.getColorIdForGeneralPurposeString(
- ctr.name + '.' + 'value')));
- }
- ctr.series.forEach(function(series) {
- series.addCounterSample(ts, rate);
- });
-
- return true;
- }
- };
-
- Parser.register(ClockParser);
-
- return {
- ClockParser: ClockParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser_test.html
deleted file mode 100644
index a348fe07cbc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/clock_parser_test.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('clock', function() {
- var lines = [
- 'cfinteractive-23 [000] d..2 8113.233768: clock_set_rate: ' +
- 'fout_apll state=500000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.249509: clock_set_rate: ' +
- 'fout_apll state=300000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.289796: clock_set_rate: ' +
- 'fout_apll state=400000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.294568: clock_set_rate: ' +
- 'fout_apll state=500000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.309509: clock_set_rate: ' +
- 'fout_apll state=800000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.388732: clock_set_rate: ' +
- 'fout_apll state=200000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.410182: clock_set_rate: ' +
- 'fout_apll state=300000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.414872: clock_set_rate: ' +
- 'fout_apll state=600000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.494455: clock_set_rate: ' +
- 'fout_apll state=200000000 cpu_id=0',
-
- 'cfinteractive-23 [000] d..2 8113.515254: clock_set_rate: ' +
- 'fout_apll state=500000000 cpu_id=0'
- ];
-
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 1);
-
- assert.equal(counters[0].series[0].samples.length, 10);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser.html
deleted file mode 100644
index 8845abc0f0f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses cpufreq events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux cpufreq trace events.
- * @constructor
- */
- function CpufreqParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('cpufreq_interactive_up',
- CpufreqParser.prototype.cpufreqUpDownEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_down',
- CpufreqParser.prototype.cpufreqUpDownEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_already',
- CpufreqParser.prototype.cpufreqTargetEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_notyet',
- CpufreqParser.prototype.cpufreqTargetEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_setspeed',
- CpufreqParser.prototype.cpufreqTargetEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_target',
- CpufreqParser.prototype.cpufreqTargetEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_boost',
- CpufreqParser.prototype.cpufreqBoostUnboostEvent.bind(this));
- importer.registerEventHandler('cpufreq_interactive_unboost',
- CpufreqParser.prototype.cpufreqBoostUnboostEvent.bind(this));
- }
-
- function splitData(input) {
- // TODO(sleffler) split by cpu
- var data = {};
- var args = input.split(/\s+/);
- var len = args.length;
- for (var i = 0; i < len; i++) {
- var item = args[i].split('=');
- data[item[0]] = parseInt(item[1]);
- }
- return data;
- }
-
- CpufreqParser.prototype = {
- __proto__: Parser.prototype,
-
- cpufreqSlice: function(ts, eventName, cpu, args) {
- // TODO(sleffler) should be per-cpu
- var kthread = this.importer.getOrCreatePseudoThread('cpufreq');
- kthread.openSlice = eventName;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- cpufreqBoostSlice: function(ts, eventName, args) {
- var kthread = this.importer.getOrCreatePseudoThread('cpufreq_boost');
- kthread.openSlice = eventName;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- /**
- * Parses cpufreq events and sets up state in the importer.
- */
- cpufreqUpDownEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var data = splitData(eventBase.details);
- this.cpufreqSlice(ts, eventName, data.cpu, data);
- return true;
- },
-
- cpufreqTargetEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var data = splitData(eventBase.details);
- this.cpufreqSlice(ts, eventName, data.cpu, data);
- return true;
- },
-
- cpufreqBoostUnboostEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- this.cpufreqBoostSlice(ts, eventName,
- {
- type: eventBase.details
- });
- return true;
- }
- };
-
- Parser.register(CpufreqParser);
-
- return {
- CpufreqParser: CpufreqParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser_test.html
deleted file mode 100644
index 114b8aa4c1a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/cpufreq_parser_test.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('cpuFreqTargetImport', function() {
- var lines = [
- '<idle>-0 [000] ..s3 1043.718825: cpufreq_interactive_target: ' +
- 'cpu=0 load=2 cur=2000000 targ=300000\n',
- '<idle>-0 [000] ..s3 1043.718825: cpufreq_interactive_target: ' +
- 'cpu=0 load=12 cur=1000000 actual=1000000 targ=200000\n'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['cpu'], 0);
- assert.equal(thread.sliceGroup.slices[0].args['load'], 2);
- assert.equal(thread.sliceGroup.slices[0].args['cur'], 2000000);
- assert.equal(thread.sliceGroup.slices[0].args['targ'], 300000);
-
- assert.equal(thread.sliceGroup.slices[1].args['cpu'], 0);
- assert.equal(thread.sliceGroup.slices[1].args['load'], 12);
- assert.equal(thread.sliceGroup.slices[1].args['cur'], 1000000);
- assert.equal(thread.sliceGroup.slices[1].args['actual'], 1000000);
- assert.equal(thread.sliceGroup.slices[1].args['targ'], 200000);
- });
-
- test('cpuFreqNotYetImport', function() {
- var lines = [
- '<idle>-0 [001] ..s3 1043.718832: cpufreq_interactive_notyet: ' +
- 'cpu=1 load=10 cur=700000 targ=200000\n',
- '<idle>-0 [001] ..s3 1043.718832: cpufreq_interactive_notyet: ' +
- 'cpu=1 load=10 cur=700000 actual=1000000 targ=200000\n'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['cpu'], 1);
- assert.equal(thread.sliceGroup.slices[0].args['load'], 10);
- assert.equal(thread.sliceGroup.slices[0].args['cur'], 700000);
- assert.equal(thread.sliceGroup.slices[0].args['targ'], 200000);
-
- assert.equal(thread.sliceGroup.slices[1].args['cpu'], 1);
- assert.equal(thread.sliceGroup.slices[1].args['load'], 10);
- assert.equal(thread.sliceGroup.slices[1].args['cur'], 700000);
- assert.equal(thread.sliceGroup.slices[1].args['actual'], 1000000);
- assert.equal(thread.sliceGroup.slices[1].args['targ'], 200000);
- });
-
- test('cpuFreqSetSpeedImport', function() {
- var lines = [
- 'cfinteractive-23 [001] ...1 1043.719688: ' +
- 'cpufreq_interactive_setspeed: cpu=0 targ=200000 actual=700000\n'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['cpu'], 0);
- assert.equal(thread.sliceGroup.slices[0].args['targ'], 200000);
- assert.equal(thread.sliceGroup.slices[0].args['actual'], 700000);
- });
-
- test('cpuFreqAlreadyImport', function() {
- var lines = [
- '<idle>-0 [000] ..s3 1043.738822: cpufreq_interactive_already: cpu=0 load=18 cur=200000 actual=700000 targ=200000\n' // @suppress longLineCheck
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['cpu'], 0);
- assert.equal(thread.sliceGroup.slices[0].args['load'], 18);
- assert.equal(thread.sliceGroup.slices[0].args['cur'], 200000);
- assert.equal(thread.sliceGroup.slices[0].args['actual'], 700000);
- assert.equal(thread.sliceGroup.slices[0].args['targ'], 200000);
- });
-
- test('cpuFreqBoostImport', function() {
- var lines = [
- 'InputDispatcher-465 [001] ...1 1044.213948: ' +
- 'cpufreq_interactive_boost: pulse\n'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['type'], 'pulse');
- });
-
- test('cpuFreqUnBoostImport', function() {
- var lines = [
- 'InputDispatcher-465 [001] ...1 1044.213948: ' +
- 'cpufreq_interactive_unboost: pulse\n'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['type'], 'pulse');
- });
-
- test('cpuFreqUpImport', function() {
- var lines = [
- 'kinteractive-69 [003] .... 414324.164432: ' +
- 'cpufreq_interactive_up: cpu=1 targ=1400000 actual=800000'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['cpu'], 1);
- assert.equal(thread.sliceGroup.slices[0].args['targ'], 1400000);
- assert.equal(thread.sliceGroup.slices[0].args['actual'], 800000);
- });
-
- test('cpuFreqDownImport', function() {
- var lines = [
- 'kinteractive-69 [003] .... 414365.834193: ' +
- 'cpufreq_interactive_down: cpu=3 targ=800000 actual=1000000'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
- assert.equal(thread.sliceGroup.slices[0].args['cpu'], 3);
- assert.equal(thread.sliceGroup.slices[0].args['targ'], 800000);
- assert.equal(thread.sliceGroup.slices[0].args['actual'], 1000000);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser.html
deleted file mode 100644
index 7e223467fc3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser.html
+++ /dev/null
@@ -1,313 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses filesystem and block device events in the Linux event
- * trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux filesystem and block device trace events.
- * @constructor
- */
- function DiskParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('f2fs_write_begin',
- DiskParser.prototype.f2fsWriteBeginEvent.bind(this));
- importer.registerEventHandler('f2fs_write_end',
- DiskParser.prototype.f2fsWriteEndEvent.bind(this));
- importer.registerEventHandler('f2fs_sync_file_enter',
- DiskParser.prototype.f2fsSyncFileEnterEvent.bind(this));
- importer.registerEventHandler('f2fs_sync_file_exit',
- DiskParser.prototype.f2fsSyncFileExitEvent.bind(this));
- importer.registerEventHandler('ext4_sync_file_enter',
- DiskParser.prototype.ext4SyncFileEnterEvent.bind(this));
- importer.registerEventHandler('ext4_sync_file_exit',
- DiskParser.prototype.ext4SyncFileExitEvent.bind(this));
- importer.registerEventHandler('ext4_da_write_begin',
- DiskParser.prototype.ext4WriteBeginEvent.bind(this));
- importer.registerEventHandler('ext4_da_write_end',
- DiskParser.prototype.ext4WriteEndEvent.bind(this));
- importer.registerEventHandler('block_rq_issue',
- DiskParser.prototype.blockRqIssueEvent.bind(this));
- importer.registerEventHandler('block_rq_complete',
- DiskParser.prototype.blockRqCompleteEvent.bind(this));
- }
-
- DiskParser.prototype = {
- __proto__: Parser.prototype,
-
- openAsyncSlice: function(ts, category, threadName, pid, key, name) {
- var kthread = this.importer.getOrCreateKernelThread(
- category + ':' + threadName, pid);
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor(
- category, name);
- var slice = new asyncSliceConstructor(
- category, name,
- ColorScheme.getColorIdForGeneralPurposeString(name),
- ts);
- slice.startThread = kthread.thread;
-
- if (!kthread.openAsyncSlices) {
- kthread.openAsyncSlices = { };
- }
- kthread.openAsyncSlices[key] = slice;
- },
-
- closeAsyncSlice: function(ts, category, threadName, pid, key, args) {
- var kthread = this.importer.getOrCreateKernelThread(
- category + ':' + threadName, pid);
- if (kthread.openAsyncSlices) {
- var slice = kthread.openAsyncSlices[key];
- if (slice) {
- slice.duration = ts - slice.start;
- slice.args = args;
- slice.endThread = kthread.thread;
- slice.subSlices = [
- new tr.model.AsyncSlice(category, slice.title,
- slice.colorId, slice.start, slice.args, slice.duration)
- ];
- kthread.thread.asyncSliceGroup.push(slice);
- delete kthread.openAsyncSlices[key];
- }
- }
- },
-
- /**
- * Parses events and sets up state in the importer.
- */
- f2fsWriteBeginEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev = \((\d+,\d+)\), ino = (\d+), pos = (\d+), len = (\d+), flags = (\d+)/. // @suppress longLineCheck
- exec(eventBase.details);
- if (!event)
- return false;
- var device = event[1];
- var inode = parseInt(event[2]);
- var pos = parseInt(event[3]);
- var len = parseInt(event[4]);
- var key = device + '-' + inode + '-' + pos + '-' + len;
- this.openAsyncSlice(ts, 'f2fs', eventBase.threadName, eventBase.pid,
- key, 'f2fs_write');
- return true;
- },
-
- f2fsWriteEndEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev = \((\d+,\d+)\), ino = (\d+), pos = (\d+), len = (\d+), copied = (\d+)/. // @suppress longLineCheck
- exec(eventBase.details);
- if (!event)
- return false;
-
- var device = event[1];
- var inode = parseInt(event[2]);
- var pos = parseInt(event[3]);
- var len = parseInt(event[4]);
- var error = parseInt(event[5]) !== len;
- var key = device + '-' + inode + '-' + pos + '-' + len;
- this.closeAsyncSlice(ts, 'f2fs', eventBase.threadName, eventBase.pid,
- key, {
- device: device,
- inode: inode,
- error: error
- });
- return true;
- },
-
- ext4WriteBeginEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev (\d+,\d+) ino (\d+) pos (\d+) len (\d+) flags (\d+)/.
- exec(eventBase.details);
- if (!event)
- return false;
- var device = event[1];
- var inode = parseInt(event[2]);
- var pos = parseInt(event[3]);
- var len = parseInt(event[4]);
- var key = device + '-' + inode + '-' + pos + '-' + len;
- this.openAsyncSlice(ts, 'ext4', eventBase.threadName, eventBase.pid,
- key, 'ext4_write');
- return true;
- },
-
- ext4WriteEndEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev (\d+,\d+) ino (\d+) pos (\d+) len (\d+) copied (\d+)/.
- exec(eventBase.details);
- if (!event)
- return false;
-
- var device = event[1];
- var inode = parseInt(event[2]);
- var pos = parseInt(event[3]);
- var len = parseInt(event[4]);
- var error = parseInt(event[5]) !== len;
- var key = device + '-' + inode + '-' + pos + '-' + len;
- this.closeAsyncSlice(ts, 'ext4', eventBase.threadName, eventBase.pid,
- key, {
- device: device,
- inode: inode,
- error: error
- });
- return true;
- },
-
- f2fsSyncFileEnterEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = new RegExp(
- 'dev = \\((\\d+,\\d+)\\), ino = (\\d+), pino = (\\d+), i_mode = (\\S+), ' + // @suppress longLineCheck
- 'i_size = (\\d+), i_nlink = (\\d+), i_blocks = (\\d+), i_advise = (\\d+)'). // @suppress longLineCheck
- exec(eventBase.details);
- if (!event)
- return false;
-
- var device = event[1];
- var inode = parseInt(event[2]);
- var key = device + '-' + inode;
- this.openAsyncSlice(ts, 'f2fs', eventBase.threadName, eventBase.pid,
- key, 'fsync');
- return true;
- },
-
- f2fsSyncFileExitEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = new RegExp('dev = \\((\\d+,\\d+)\\), ino = (\\d+), checkpoint is (\\S+), ' + // @suppress longLineCheck
- 'datasync = (\\d+), ret = (\\d+)').
- exec(eventBase.details.replace('not needed', 'not_needed'));
- if (!event)
- return false;
-
- var device = event[1];
- var inode = parseInt(event[2]);
- var error = parseInt(event[5]);
- var key = device + '-' + inode;
- this.closeAsyncSlice(ts, 'f2fs', eventBase.threadName, eventBase.pid,
- key, {
- device: device,
- inode: inode,
- error: error
- });
- return true;
- },
-
- ext4SyncFileEnterEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev (\d+,\d+) ino (\d+) parent (\d+) datasync (\d+)/.
- exec(eventBase.details);
- if (!event)
- return false;
-
- var device = event[1];
- var inode = parseInt(event[2]);
- var datasync = (event[4] === '1') || (event[4] === 1);
- var key = device + '-' + inode;
- var action = datasync ? 'fdatasync' : 'fsync';
- this.openAsyncSlice(ts, 'ext4', eventBase.threadName, eventBase.pid,
- key, action);
- return true;
- },
-
- ext4SyncFileExitEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev (\d+,\d+) ino (\d+) ret (\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var device = event[1];
- var inode = parseInt(event[2]);
- var error = parseInt(event[3]);
- var key = device + '-' + inode;
- this.closeAsyncSlice(ts, 'ext4', eventBase.threadName, eventBase.pid,
- key, {
- device: device,
- inode: inode,
- error: error
- });
- return true;
- },
-
- blockRqIssueEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = new RegExp('(\\d+,\\d+) (F)?([DWRN])(F)?(A)?(S)?(M)? ' +
- '\\d+ \\(.*\\) (\\d+) \\+ (\\d+) \\[.*\\]').exec(eventBase.details);
- if (!event)
- return false;
-
- var action;
- switch (event[3]) {
- case 'D':
- action = 'discard';
- break;
- case 'W':
- action = 'write';
- break;
- case 'R':
- action = 'read';
- break;
- case 'N':
- action = 'none';
- break;
- default:
- action = 'unknown';
- break;
- }
-
- if (event[2]) {
- action += ' flush';
- }
- if (event[4] === 'F') {
- action += ' fua';
- }
- if (event[5] === 'A') {
- action += ' ahead';
- }
- if (event[6] === 'S') {
- action += ' sync';
- }
- if (event[7] === 'M') {
- action += ' meta';
- }
- var device = event[1];
- var sector = parseInt(event[8]);
- var numSectors = parseInt(event[9]);
- var key = device + '-' + sector + '-' + numSectors;
- this.openAsyncSlice(ts, 'block', eventBase.threadName, eventBase.pid,
- key, action);
- return true;
- },
-
- blockRqCompleteEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = new RegExp('(\\d+,\\d+) (F)?([DWRN])(F)?(A)?(S)?(M)? ' +
- '\\(.*\\) (\\d+) \\+ (\\d+) \\[(.*)\\]').exec(eventBase.details);
- if (!event)
- return false;
-
- var device = event[1];
- var sector = parseInt(event[8]);
- var numSectors = parseInt(event[9]);
- var error = parseInt(event[10]);
- var key = device + '-' + sector + '-' + numSectors;
- this.closeAsyncSlice(ts, 'block', eventBase.threadName, eventBase.pid,
- key, {
- device: device,
- sector: sector,
- numSectors: numSectors,
- error: error
- });
- return true;
- }
- };
-
- Parser.register(DiskParser);
-
- return {
- DiskParser: DiskParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser_test.html
deleted file mode 100644
index c2e9a14deab..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/disk_parser_test.html
+++ /dev/null
@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('diskImport', function() {
- var lines = [
- // NB: spliced from different traces; mismatched timestamps don't matter
- 'AsyncTask #2-18830 [000] ...1 154578.668286: ext4_sync_file_enter: ' +
- 'dev 259,1 ino 81993 parent 81906 datasync 1',
- 'Binder_A-3179 [001] ...1 1354.510088: f2fs_sync_file_enter: ' +
- 'dev = (259,14), ino = 4882, pino = 313, i_mode = 0x81b0, i_size = ' +
- '25136, i_nlink = 1, i_blocks = 8, i_advise = 0x0',
- 'Binder_A-3179 [001] ...1 1354.514013: f2fs_sync_file_exit: ' +
- 'dev = (259,14), ino = 4882, checkpoint is not needed, datasync = 1, ret = 0', // @suppress longLineCheck
- 'mmcqd/0-81 [000] d..2 154578.668390: block_rq_issue: ' +
- '179,0 WS 0 () 3427120 + 16 [mmcqd/0]',
- 'mmcqd/0-81 [000] d..2 154578.669181: block_rq_complete: ' +
- '179,0 WS () 3427120 + 16 [0]',
- 'mmcqd/0-81 [001] d..2 154578.670853: block_rq_issue: ' +
- '179,0 FWS 0 () 18446744073709551615 + 0 [mmcqd/0]',
- 'mmcqd/0-81 [001] d..2 154578.670869: block_rq_complete: ' +
- '179,0 FWS () 18446744073709551615 + 0 [0]',
- 'AsyncTask #2-18830 [001] ...1 154578.670901: ext4_sync_file_exit: ' +
- 'dev 259,1 ino 81993 ret 0',
- 'mmcqd/0-81 [001] d..2 154578.877038: block_rq_issue: ' +
- '179,0 R 0 () 3255256 + 8 [mmcqd/0]',
- 'mmcqd/0-81 [001] d..2 154578.877110: block_rq_issue: ' +
- '179,0 R 0 () 3255288 + 8 [mmcqd/0]',
- 'mmcqd/0-81 [000] d..2 154578.877345: block_rq_complete: ' +
- '179,0 R () 3255256 + 8 [0]',
- 'mmcqd/0-81 [000] d..2 154578.877466: block_rq_complete: ' +
- '179,0 R () 3255288 + 8 [0]',
- 'ContactsProvide-1184 [000] ...1 66.613719: f2fs_write_begin: ' +
- 'dev = (253,2), ino = 3342, pos = 0, len = 75, flags = 0',
- 'ContactsProvide-1184 [000] ...1 66.613733: f2fs_write_end: ' +
- 'dev = (253,2), ino = 3342, pos = 0, len = 75, copied = 75'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var blockThread = undefined;
- var ext4Thread = undefined;
- var f2fsSyncThread = undefined;
- var f2fsWriteThread = undefined;
-
- m.getAllThreads().forEach(function(t) {
- switch (t.name) {
- case 'block:mmcqd/0':
- blockThread = t;
- break;
- case 'ext4:AsyncTask #2':
- ext4Thread = t;
- break;
- case 'f2fs:Binder_A':
- f2fsSyncThread = t;
- break;
- case 'f2fs:ContactsProvide':
- f2fsWriteThread = t;
- break;
- default:
- throw new unittest.TestError('Unexpected thread named ' + t.name);
- }
- });
- assert.isDefined(blockThread);
- assert.isDefined(ext4Thread);
- assert.isDefined(f2fsSyncThread);
- assert.isDefined(f2fsWriteThread);
-
- assert.equal(blockThread.asyncSliceGroup.length, 4);
-
- var slice = blockThread.asyncSliceGroup.slices[0];
- assert.equal(slice.category, 'block');
- assert.equal(slice.title, 'write sync');
- assert.equal(slice.args.device, '179,0');
- assert.equal(slice.args.error, 0);
- assert.equal(slice.args.numSectors, 16);
- assert.equal(slice.args.sector, 3427120);
-
- assert.equal(ext4Thread.asyncSliceGroup.length, 1);
-
- slice = ext4Thread.asyncSliceGroup.slices[0];
- assert.equal(slice.category, 'ext4');
- assert.equal(slice.title, 'fdatasync');
- assert.equal(slice.args.device, '259,1');
- assert.equal(slice.args.error, 0);
- assert.equal(slice.args.inode, 81993);
-
- assert.equal(f2fsSyncThread.asyncSliceGroup.length, 1);
-
- slice = f2fsSyncThread.asyncSliceGroup.slices[0];
- assert.equal(slice.category, 'f2fs');
- assert.equal(slice.title, 'fsync');
- assert.equal(slice.args.device, '259,14');
- assert.equal(slice.args.error, 0);
- assert.equal(slice.args.inode, 4882);
-
- assert.equal(f2fsWriteThread.asyncSliceGroup.length, 1);
-
- slice = f2fsWriteThread.asyncSliceGroup.slices[0];
- assert.equal(slice.category, 'f2fs');
- assert.equal(slice.title, 'f2fs_write');
- assert.equal(slice.args.device, '253,2');
- assert.equal(slice.args.inode, 3342);
- assert.equal(slice.args.error, false);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser.html
deleted file mode 100644
index 163ba066944..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses drm driver events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux drm trace events.
- * @constructor
- */
- function DrmParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('drm_vblank_event',
- DrmParser.prototype.vblankEvent.bind(this));
- }
-
- DrmParser.prototype = {
- __proto__: Parser.prototype,
-
- drmVblankSlice: function(ts, eventName, args) {
- var kthread = this.importer.getOrCreatePseudoThread('drm_vblank');
- kthread.openSlice = eventName;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- /**
- * Parses drm driver events and sets up state in the importer.
- */
- vblankEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /crtc=(\d+), seq=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var crtc = parseInt(event[1]);
- var seq = parseInt(event[2]);
- this.drmVblankSlice(ts, 'vblank:' + crtc,
- {
- crtc: crtc,
- seq: seq
- });
- return true;
- }
- };
-
- Parser.register(DrmParser);
-
- return {
- DrmParser: DrmParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser_test.html
deleted file mode 100644
index cdb214fb2de..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/drm_parser_test.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('drmImport', function() {
- var lines = [
- ' chrome-2465 [000] 71.653157: drm_vblank_event: crtc=0, seq=4233',
- ' <idle>-0 [000] 71.669851: drm_vblank_event: crtc=0, seq=4234'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var vblankThread = threads[0];
- assert.equal(vblankThread.name, 'drm_vblank');
- assert.equal(vblankThread.sliceGroup.length, 2);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser.html
deleted file mode 100644
index e0e8975f67b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses exynos events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux exynos trace events.
- * @constructor
- */
- function ExynosParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('exynos_busfreq_target_int',
- ExynosParser.prototype.busfreqTargetIntEvent.bind(this));
- importer.registerEventHandler('exynos_busfreq_target_mif',
- ExynosParser.prototype.busfreqTargetMifEvent.bind(this));
-
- importer.registerEventHandler('exynos_page_flip_state',
- ExynosParser.prototype.pageFlipStateEvent.bind(this));
- }
-
- ExynosParser.prototype = {
- __proto__: Parser.prototype,
-
- exynosBusfreqSample: function(name, ts, frequency) {
- var targetCpu = this.importer.getOrCreateCpu(0);
- var counter = targetCpu.getOrCreateCounter('', name);
- if (counter.numSeries === 0) {
- counter.addSeries(new tr.model.CounterSeries('frequency',
- ColorScheme.getColorIdForGeneralPurposeString(
- counter.name + '.' + 'frequency')));
- }
- counter.series.forEach(function(series) {
- series.addCounterSample(ts, frequency);
- });
- },
-
- /**
- * Parses exynos_busfreq_target_int events and sets up state.
- */
- busfreqTargetIntEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /frequency=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- this.exynosBusfreqSample('INT Frequency', ts, parseInt(event[1]));
- return true;
- },
-
- /**
- * Parses exynos_busfreq_target_mif events and sets up state.
- */
- busfreqTargetMifEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /frequency=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- this.exynosBusfreqSample('MIF Frequency', ts, parseInt(event[1]));
- return true;
- },
-
- exynosPageFlipStateOpenSlice: function(ts, pipe, fb, state) {
- var kthread = this.importer.getOrCreatePseudoThread(
- 'exynos_flip_state (pipe:' + pipe + ', fb:' + fb + ')');
- kthread.openSliceTS = ts;
- kthread.openSlice = state;
- },
-
- exynosPageFlipStateCloseSlice: function(ts, pipe, fb, args) {
- var kthread = this.importer.getOrCreatePseudoThread(
- 'exynos_flip_state (pipe:' + pipe + ', fb:' + fb + ')');
- if (kthread.openSlice) {
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- kthread.openSliceTS,
- args,
- ts - kthread.openSliceTS);
- kthread.thread.sliceGroup.pushSlice(slice);
- }
- kthread.openSlice = undefined;
- },
-
- /**
- * Parses page_flip_state events and sets up state in the importer.
- */
- pageFlipStateEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /pipe=(\d+), fb=(\d+), state=(.*)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var pipe = parseInt(event[1]);
- var fb = parseInt(event[2]);
- var state = event[3];
-
- this.exynosPageFlipStateCloseSlice(ts, pipe, fb,
- {
- pipe: pipe,
- fb: fb
- });
- if (state !== 'flipped')
- this.exynosPageFlipStateOpenSlice(ts, pipe, fb, state);
- return true;
- }
- };
-
- Parser.register(ExynosParser);
-
- return {
- ExynosParser: ExynosParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser_test.html
deleted file mode 100644
index 1e5d16cd1db..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/exynos_parser_test.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('exynosBusfreqImport', function() {
- var lines = [
- ' kworker/1:0-4177 [001] .... 2803.129806: ' +
- 'exynos_busfreq_target_int: frequency=200000',
- ' kworker/1:0-4177 [001] .... 2803.229207: ' +
- 'exynos_busfreq_target_int: frequency=267000',
- ' kworker/1:0-4177 [001] .... 2803.329031: ' +
- 'exynos_busfreq_target_int: frequency=160000',
- ' kworker/1:0-4177 [001] .... 2805.729039: ' +
- 'exynos_busfreq_target_mif: frequency=200000'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c0 = m.kernel.cpus[0];
- assert.equal(c0.slices.length, 0);
- assert.equal(c0.counters['.INT Frequency'].series[0].samples.length, 3);
- assert.equal(c0.counters['.MIF Frequency'].series[0].samples.length, 1);
- });
-
- test('exynosPageFlipSlowRequestImport', function() {
- var lines = [
- ' <idle>-0 [000] d.h. 1000.000000: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_kds',
- ' Chrome_IOThread-21603 [000] d.h. 1000.000001: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_apply',
- ' kworker/0:1-25931 [000] .... 1000.000002: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_flip',
- ' kworker/0:1-25931 [000] .... 1000.000003: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=flipped',
- ' <idle>-0 [000] d.h. 1000.000004: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_kds',
- ' Chrome_IOThread-21603 [000] d.h. 1000.000005: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_apply',
- ' kworker/0:1-25931 [000] .... 1000.000006: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_flip',
- ' kworker/0:1-25931 [000] .... 1000.000007: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=flipped'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- // there are 2 threads:
- // (1) "exynos_flip_state (pipe:0, fb:25)"
- // (2) "exynos_flip_state (pipe:0, fb:26)"
- assert.equal(threads.length, 2);
-
- // in the test data, event of fb=26 occurs first, so it's thread[0]
- var gfxFbId26Thread = threads[0]; // thread where fb === 26
- var gfxFbId25Thread = threads[1]; // thread where fb === 25
- assert.equal(gfxFbId25Thread.name, 'exynos_flip_state (pipe:0, fb:25)');
- assert.equal(gfxFbId26Thread.name, 'exynos_flip_state (pipe:0, fb:26)');
- // Every state (except for 'flipped') will start a new slice.
- // The last event will not be closed, so it's not a slice
- assert.equal(gfxFbId25Thread.sliceGroup.length, 3);
- assert.equal(gfxFbId26Thread.sliceGroup.length, 3);
- });
-
- test('exynosPageFlipFastRequestImport', function() {
- var lines = [
- ' <idle>-0 [000] d.h. 1000.000000: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_kds',
- ' Chrome_IOThread-21603 [000] d.h. 1000.000001: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_kds',
- ' X-21385 [000] .... 1000.000002: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_apply',
- ' kworker/0:1-25931 [000] .... 1000.000003: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_flip',
- ' X-21385 [001] .... 1000.000004: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_apply',
- ' kworker/0:1-25931 [000] .... 1000.000005: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=flipped',
- ' <idle>-0 [000] d.h. 1000.000006: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_kds',
- ' X-21385 [000] .... 1000.000007: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_flip',
- ' kworker/0:1-25931 [000] .... 1000.000008: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=flipped',
- ' kworker/0:1-25931 [000] .... 1000.000009: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_kds',
- ' Chrome_IOThread-21603 [000] d.h. 1000.000010: ' +
- 'exynos_page_flip_state: pipe=0, fb=25, state=wait_apply',
- ' <idle>-0 [000] d.h. 1000.000011: ' +
- 'exynos_page_flip_state: pipe=0, fb=26, state=wait_apply'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- // there are 2 threads:
- // (1) "exynos_flip_state (pipe:0, fb:25)"
- // (2) "exynos_flip_state (pipe:0, fb:26)"
- assert.equal(threads.length, 2);
-
- // in the test data, event of fb=26 occurs first, so it's thread[0]
- var gfxFbId26Thread = threads[0]; // thread where fb === 26
- var gfxFbId25Thread = threads[1]; // thread where fb === 25
- assert.equal(gfxFbId25Thread.name, 'exynos_flip_state (pipe:0, fb:25)');
- assert.equal(gfxFbId26Thread.name, 'exynos_flip_state (pipe:0, fb:26)');
- // Every state (except for 'flipped') will start a new slice.
- // The last event will not be closed, so it's not a slice
- assert.equal(gfxFbId25Thread.sliceGroup.length, 4);
- assert.equal(gfxFbId26Thread.sliceGroup.length, 4);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer.html
deleted file mode 100644
index 2e83145cf98..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer.html
+++ /dev/null
@@ -1,932 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/android_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/binder_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/bus_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/clock_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/cpufreq_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/disk_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/drm_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/exynos_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/gesture_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/i2c_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/i915_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/irq_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/kfunc_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/mali_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/memreclaim_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/power_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/regulator_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/sched_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/sync_parser.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/workqueue_parser.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/importer/simple_line_reader.html">
-<link rel="import" href="/tracing/model/clock_sync_manager.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-/**
- * @fileoverview Imports text files in the Linux event trace format into the
- * Model. This format is output both by sched_trace and by Linux's perf tool.
- *
- * This importer assumes the events arrive as a string. The unit tests provide
- * examples of the trace format.
- *
- * Linux scheduler traces use a definition for 'pid' that is different than
- * tracing uses. Whereas tracing uses pid to identify a specific process, a pid
- * in a linux trace refers to a specific thread within a process. Within this
- * file, we the definition used in Linux traces, as it improves the importing
- * code's readability.
- */
-'use strict';
-
-tr.exportTo('tr.e.importer.linux_perf', function() {
- var MONOTONIC_TO_FTRACE_GLOBAL_SYNC_ID =
- 'linux_clock_monotonic_to_ftrace_global';
-
- /**
- * Imports linux perf events into a specified model.
- * @constructor
- */
- function FTraceImporter(model, events) {
- this.importPriority = 2;
- this.model_ = model;
- this.events_ = events;
- this.wakeups_ = [];
- this.blockedReasons_ = [];
- this.kernelThreadStates_ = {};
- this.buildMapFromLinuxPidsToThreads_();
- this.lines_ = [];
- this.pseudoThreadCounter = 1;
- this.parsers_ = [];
- this.eventHandlers_ = {};
- this.haveClockSyncedMonotonicToGlobal_ = false;
- }
-
- var TestExports = {};
-
- // Matches the trace record in 3.2 and later with the print-tgid option:
- // <idle>-0 0 [001] d... 1.23: sched_switch
- //
- // A TGID (Thread Group ID) is basically what the Linux kernel calls what
- // userland refers to as a process ID (as opposed to a Linux pid, which is
- // what userland calls a thread ID).
- var lineREWithTGID = new RegExp(
- '^\\s*(.+)-(\\d+)\\s+\\(\\s*(\\d+|-+)\\)\\s\\[(\\d+)\\]' +
- '\\s+[dX.][Nnp.][Hhs.][0-9a-f.]' +
- '\\s+(\\d+\\.\\d+):\\s+(\\S+):\\s(.*)$');
- var lineParserWithTGID = function(line) {
- var groups = lineREWithTGID.exec(line);
- if (!groups) {
- return groups;
- }
-
- var tgid = groups[3];
- if (tgid[0] === '-')
- tgid = undefined;
-
- return {
- threadName: groups[1],
- pid: groups[2],
- tgid: tgid,
- cpuNumber: groups[4],
- timestamp: groups[5],
- eventName: groups[6],
- details: groups[7]
- };
- };
- TestExports.lineParserWithTGID = lineParserWithTGID;
-
- // Matches the default trace record in 3.2 and later (includes irq-info):
- // <idle>-0 [001] d... 1.23: sched_switch
- var lineREWithIRQInfo = new RegExp(
- '^\\s*(.+)-(\\d+)\\s+\\[(\\d+)\\]' +
- '\\s+[dX.][Nnp.][Hhs.][0-9a-f.]' +
- '\\s+(\\d+\\.\\d+):\\s+(\\S+):\\s(.*)$');
- var lineParserWithIRQInfo = function(line) {
- var groups = lineREWithIRQInfo.exec(line);
- if (!groups) {
- return groups;
- }
- return {
- threadName: groups[1],
- pid: groups[2],
- cpuNumber: groups[3],
- timestamp: groups[4],
- eventName: groups[5],
- details: groups[6]
- };
- };
- TestExports.lineParserWithIRQInfo = lineParserWithIRQInfo;
-
- // Matches the default trace record pre-3.2:
- // <idle>-0 [001] 1.23: sched_switch
- var lineREWithLegacyFmt =
- /^\s*(.+)-(\d+)\s+\[(\d+)\]\s*(\d+\.\d+):\s+(\S+):\s(.*)$/;
- var lineParserWithLegacyFmt = function(line) {
- var groups = lineREWithLegacyFmt.exec(line);
- if (!groups) {
- return groups;
- }
- return {
- threadName: groups[1],
- pid: groups[2],
- cpuNumber: groups[3],
- timestamp: groups[4],
- eventName: groups[5],
- details: groups[6]
- };
- };
- TestExports.lineParserWithLegacyFmt = lineParserWithLegacyFmt;
-
- // Matches the trace_event_clock_sync marker:
- // 0: trace_event_clock_sync: parent_ts=19581477508
- var traceEventClockSyncRE = /trace_event_clock_sync: parent_ts=(\d+\.?\d*)/;
- TestExports.traceEventClockSyncRE = traceEventClockSyncRE;
-
- var realTimeClockSyncRE = /trace_event_clock_sync: realtime_ts=(\d+)/;
- var genericClockSyncRE = /trace_event_clock_sync: name=([\w\-]+)/;
-
- // Some kernel trace events are manually classified in slices and
- // hand-assigned a pseudo PID.
- var pseudoKernelPID = 0;
-
- /**
- * Deduce the format of trace data. Linux kernels prior to 3.3 used one
- * format (by default); 3.4 and later used another. Additionally, newer
- * kernels can optionally trace the TGID.
- *
- * @return {function} the function for parsing data when the format is
- * recognized; otherwise undefined.
- */
- function autoDetectLineParser(line) {
- if (line[0] === '{')
- return false;
- if (lineREWithTGID.test(line))
- return lineParserWithTGID;
- if (lineREWithIRQInfo.test(line))
- return lineParserWithIRQInfo;
- if (lineREWithLegacyFmt.test(line))
- return lineParserWithLegacyFmt;
- return undefined;
- }
- TestExports.autoDetectLineParser = autoDetectLineParser;
-
- /**
- * Guesses whether the provided events is a Linux perf string.
- * Looks for the magic string "# tracer" at the start of the file,
- * or the typical task-pid-cpu-timestamp-function sequence of a typical
- * trace's body.
- *
- * @return {boolean} True when events is a linux perf array.
- */
- FTraceImporter.canImport = function(events) {
- if (!(typeof(events) === 'string' || events instanceof String))
- return false;
-
- if (FTraceImporter._extractEventsFromSystraceHTML(events, false).ok)
- return true;
-
- if (FTraceImporter._extractEventsFromSystraceMultiHTML(events, false).ok)
- return true;
-
- if (/^# tracer:/.test(events))
- return true;
-
- var lineBreakIndex = events.indexOf('\n');
- if (lineBreakIndex > -1)
- events = events.substring(0, lineBreakIndex);
-
- if (autoDetectLineParser(events))
- return true;
-
- return false;
- };
-
- FTraceImporter._extractEventsFromSystraceHTML = function(
- incomingEvents, produceResult) {
- var failure = {ok: false};
- if (produceResult === undefined)
- produceResult = true;
-
- if (!/^<!DOCTYPE html>/.test(incomingEvents))
- return failure;
- var r = new tr.importer.SimpleLineReader(incomingEvents);
-
- // Try to find the data...
- if (!r.advanceToLineMatching(/^ <script>$/))
- return failure;
- if (!r.advanceToLineMatching(/^ var linuxPerfData = "\\$/))
- return failure;
-
- var eventsBeginAtLine = r.curLineNumber + 1;
- r.beginSavingLines();
- if (!r.advanceToLineMatching(/^ <\/script>$/))
- return failure;
-
- var rawEvents = r.endSavingLinesAndGetResult();
-
- // Drop off first and last event as it contains the tag.
- rawEvents = rawEvents.slice(1, rawEvents.length - 1);
-
- if (!r.advanceToLineMatching(/^<\/body>$/))
- return failure;
- if (!r.advanceToLineMatching(/^<\/html>$/))
- return failure;
-
- function endsWith(str, suffix) {
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- }
- function stripSuffix(str, suffix) {
- if (!endsWith(str, suffix))
- return str;
- return str.substring(str, str.length - suffix.length);
- }
-
- // Strip off escaping in the file needed to preserve linebreaks.
- var events = [];
- if (produceResult) {
- for (var i = 0; i < rawEvents.length; i++) {
- var event = rawEvents[i];
- event = stripSuffix(event, '\\n\\');
- events.push(event);
- }
- } else {
- events = [rawEvents[rawEvents.length - 1]];
- }
-
- // Last event ends differently. Strip that off too,
- // treating absence of that trailing string as a failure.
- var oldLastEvent = events[events.length - 1];
- var newLastEvent = stripSuffix(oldLastEvent, '\\n";');
- if (newLastEvent === oldLastEvent)
- return failure;
- events[events.length - 1] = newLastEvent;
-
- return {ok: true,
- lines: produceResult ? events : undefined,
- eventsBeginAtLine: eventsBeginAtLine};
- };
-
- FTraceImporter._extractEventsFromSystraceMultiHTML = function(
- incomingEvents, produceResult) {
- var failure = {ok: false};
- if (produceResult === undefined)
- produceResult = true;
-
- if (!(new RegExp('^<!DOCTYPE HTML>', 'i').test(incomingEvents)))
- return failure;
-
- var r = new tr.importer.SimpleLineReader(incomingEvents);
-
- // Try to find the Linux perf trace in any of the trace-data tags
- var events = [];
- while (!/^# tracer:/.test(events)) {
- if (!r.advanceToLineMatching(
- /^ <script class="trace-data" type="application\/text">$/))
- return failure;
-
- var eventsBeginAtLine = r.curLineNumber + 1;
-
- r.beginSavingLines();
- if (!r.advanceToLineMatching(/^ <\/script>$/))
- return failure;
-
- events = r.endSavingLinesAndGetResult();
-
- // Drop off first and last event as it contains the tag.
- events = events.slice(1, events.length - 1);
- }
-
- if (!r.advanceToLineMatching(/^<\/body>$/))
- return failure;
- if (!r.advanceToLineMatching(/^<\/html>$/))
- return failure;
-
- return {ok: true,
- lines: produceResult ? events : undefined,
- eventsBeginAtLine: eventsBeginAtLine};
- };
-
- FTraceImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'FTraceImporter';
- },
-
- get model() {
- return this.model_;
- },
-
- /**
- * Imports clock sync markers into model_.
- */
- importClockSyncMarkers: function() {
- this.lazyInit_();
-
- this.forEachLine_(function(text, eventBase, cpuNumber, pid, ts) {
- var eventName = eventBase.eventName;
- if (eventName !== 'tracing_mark_write' && eventName !== '0')
- return;
-
- if (traceEventClockSyncRE.exec(eventBase.details) ||
- genericClockSyncRE.exec(eventBase.details)) {
- this.traceClockSyncEvent_(eventName, cpuNumber, pid, ts, eventBase);
- } else if (realTimeClockSyncRE.exec(eventBase.details)) {
- // TODO(charliea): Migrate this sync to ClockSyncManager.
- // This entry syncs CLOCK_REALTIME with CLOCK_MONOTONIC. Store the
- // offset between the two in the model so that importers parsing files
- // with CLOCK_REALTIME timestamps can map back to CLOCK_MONOTONIC.
- var match = realTimeClockSyncRE.exec(eventBase.details);
- this.model_.realtime_to_monotonic_offset_ms = ts - match[1];
- }
- }.bind(this));
- },
-
- /**
- * Imports the data in this.events_ into model_.
- */
- importEvents: function() {
- var modelTimeTransformer =
- this.model_.clockSyncManager.getModelTimeTransformer(
- tr.model.ClockDomainId.LINUX_FTRACE_GLOBAL);
-
- this.importCpuData_(modelTimeTransformer);
- this.buildMapFromLinuxPidsToThreads_();
- this.buildPerThreadCpuSlicesFromCpuState_();
- },
-
- /**
- * Registers a linux perf event parser used by importCpuData_.
- */
- registerEventHandler: function(eventName, handler) {
- // TODO(sleffler) how to handle conflicts?
- this.eventHandlers_[eventName] = handler;
- },
-
- /**
- * @return {Cpu} A Cpu corresponding to the given cpuNumber.
- */
- getOrCreateCpu: function(cpuNumber) {
- return this.model_.kernel.getOrCreateCpu(cpuNumber);
- },
-
- /**
- * @return {TimelineThread} A thread corresponding to the kernelThreadName.
- */
- getOrCreateKernelThread: function(kernelThreadName, pid, tid) {
- if (!this.kernelThreadStates_[kernelThreadName]) {
- var thread = this.model_.getOrCreateProcess(pid).getOrCreateThread(tid);
- thread.name = kernelThreadName;
- this.kernelThreadStates_[kernelThreadName] = {
- pid: pid,
- thread: thread,
- openSlice: undefined,
- openSliceTS: undefined
- };
- this.threadsByLinuxPid[pid] = thread;
- }
- return this.kernelThreadStates_[kernelThreadName];
- },
-
- /**
- * Processes can have multiple binder threads.
- * Binder thread names are not unique across processes we therefore need to
- * keep more information in order to return the correct threads.
- */
- getOrCreateBinderKernelThread: function(kernelThreadName, pid, tid) {
- var key = kernelThreadName + pid + tid;
- if (!this.kernelThreadStates_[key]) {
- var thread = this.model_.getOrCreateProcess(pid).getOrCreateThread(tid);
- thread.name = kernelThreadName;
- this.kernelThreadStates_[key] = {
- pid: pid,
- thread: thread,
- openSlice: undefined,
- openSliceTS: undefined
- };
- this.threadsByLinuxPid[pid] = thread;
- }
- return this.kernelThreadStates_[key];
- },
-
- /**
- * @return {TimelineThread} A pseudo thread corresponding to the
- * threadName. Pseudo threads are for events that we want to break
- * out to a separate timeline but would not otherwise happen.
- * These threads are assigned to pseudoKernelPID and given a
- * unique (incrementing) TID.
- */
- getOrCreatePseudoThread: function(threadName) {
- var thread = this.kernelThreadStates_[threadName];
- if (!thread) {
- thread = this.getOrCreateKernelThread(threadName, pseudoKernelPID,
- this.pseudoThreadCounter);
- this.pseudoThreadCounter++;
- }
- return thread;
- },
-
- /**
- * Records the fact that a pid has become runnable. This data will
- * eventually get used to derive each thread's timeSlices array.
- */
- markPidRunnable: function(ts, pid, comm, prio, fromPid) {
- // The the pids that get passed in to this function are Linux kernel
- // pids, which identify threads. The rest of trace-viewer refers to
- // these as tids, so the change of nomenclature happens in the following
- // construction of the wakeup object.
- this.wakeups_.push({ts: ts, tid: pid, fromTid: fromPid});
- },
-
- /**
- * Records the reason why a pid has gone into uninterruptible sleep.
- */
- addPidBlockedReason: function(ts, pid, iowait, caller) {
- // The the pids that get passed in to this function are Linux kernel
- // pids, which identify threads. The rest of trace-viewer refers to
- // these as tids, so the change of nomenclature happens in the following
- // construction of the wakeup object.
- this.blockedReasons_.push({ts: ts, tid: pid, iowait: iowait,
- caller: caller});
- },
-
- /**
- * Precomputes a lookup table from linux pids back to existing
- * Threads. This is used during importing to add information to each
- * thread about whether it was running, descheduled, sleeping, et
- * cetera.
- */
- buildMapFromLinuxPidsToThreads_: function() {
- this.threadsByLinuxPid = {};
- this.model_.getAllThreads().forEach(
- function(thread) {
- this.threadsByLinuxPid[thread.tid] = thread;
- }.bind(this));
- },
-
- /**
- * Builds the timeSlices array on each thread based on our knowledge of what
- * each Cpu is doing. This is done only for Threads that are
- * already in the model, on the assumption that not having any traced data
- * on a thread means that it is not of interest to the user.
- */
- buildPerThreadCpuSlicesFromCpuState_: function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
-
- // Push the cpu slices to the threads that they run on.
- for (var cpuNumber in this.model_.kernel.cpus) {
- var cpu = this.model_.kernel.cpus[cpuNumber];
-
- for (var i = 0; i < cpu.slices.length; i++) {
- var cpuSlice = cpu.slices[i];
-
- var thread = this.threadsByLinuxPid[cpuSlice.args.tid];
- if (!thread)
- continue;
-
- cpuSlice.threadThatWasRunning = thread;
-
- if (!thread.tempCpuSlices)
- thread.tempCpuSlices = [];
- thread.tempCpuSlices.push(cpuSlice);
- }
- }
-
- for (var i in this.wakeups_) {
- var wakeup = this.wakeups_[i];
- var thread = this.threadsByLinuxPid[wakeup.tid];
- if (!thread)
- continue;
- thread.tempWakeups = thread.tempWakeups || [];
- thread.tempWakeups.push(wakeup);
- }
- for (var i in this.blockedReasons_) {
- var reason = this.blockedReasons_[i];
- var thread = this.threadsByLinuxPid[reason.tid];
- if (!thread)
- continue;
- thread.tempBlockedReasons = thread.tempBlockedReasons || [];
- thread.tempBlockedReasons.push(reason);
- }
-
- // Create slices for when the thread is not running.
- this.model_.getAllThreads().forEach(function(thread) {
- if (thread.tempCpuSlices === undefined)
- return;
- var origSlices = thread.tempCpuSlices;
- delete thread.tempCpuSlices;
-
- origSlices.sort(function(x, y) {
- return x.start - y.start;
- });
-
- var wakeups = thread.tempWakeups || [];
- delete thread.tempWakeups;
- wakeups.sort(function(x, y) {
- return x.ts - y.ts;
- });
-
- var reasons = thread.tempBlockedReasons || [];
- delete thread.tempBlockedReasons;
- reasons.sort(function(x, y) {
- return x.ts - y.ts;
- });
-
- // Walk the slice list and put slices between each original slice to
- // show when the thread isn't running.
- var slices = [];
-
- if (origSlices.length) {
- var slice = origSlices[0];
-
- if (wakeups.length && wakeups[0].ts < slice.start) {
- var wakeup = wakeups.shift();
- var wakeupDuration = slice.start - wakeup.ts;
- var args = {'wakeup from tid': wakeup.fromTid};
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.RUNNABLE, '',
- wakeup.ts, args, wakeupDuration));
- }
-
- var runningSlice = new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.RUNNING, '',
- slice.start, {}, slice.duration);
- runningSlice.cpuOnWhichThreadWasRunning = slice.cpu;
- slices.push(runningSlice);
- }
-
- var wakeup = undefined;
- for (var i = 1; i < origSlices.length; i++) {
- var prevSlice = origSlices[i - 1];
- var nextSlice = origSlices[i];
- var midDuration = nextSlice.start - prevSlice.end;
- while (wakeups.length && wakeups[0].ts < nextSlice.start) {
- var w = wakeups.shift();
- if (wakeup === undefined && w.ts > prevSlice.end) {
- wakeup = w;
- }
- }
- var blockedReason = undefined;
- while (reasons.length && reasons[0].ts < prevSlice.end) {
- var r = reasons.shift();
- }
- if (wakeup !== undefined &&
- reasons.length &&
- reasons[0].ts < wakeup.ts) {
- blockedReason = reasons.shift();
- }
-
- // Push a sleep slice onto the slices list, interrupting it with a
- // wakeup if appropriate.
- var pushSleep = function(state) {
- if (wakeup !== undefined) {
- midDuration = wakeup.ts - prevSlice.end;
- }
-
- if (blockedReason !== undefined) {
- var args = {
- 'kernel callsite when blocked:' : blockedReason.caller
- };
- if (blockedReason.iowait) {
- switch (state) {
- case SCHEDULING_STATE.UNINTR_SLEEP:
- state = SCHEDULING_STATE.UNINTR_SLEEP_IO;
- break;
- case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL:
- state = SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO;
- break;
- case SCHEDULING_STATE.UNINTR_SLEEP_WAKING:
- state = SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO;
- break;
- default:
- }
- }
- slices.push(new tr.model.ThreadTimeSlice(
- thread,
- state, '', prevSlice.end, args, midDuration));
- } else {
- slices.push(new tr.model.ThreadTimeSlice(
- thread,
- state, '', prevSlice.end, {}, midDuration));
- }
- if (wakeup !== undefined) {
- var wakeupDuration = nextSlice.start - wakeup.ts;
- var args = {'wakeup from tid': wakeup.fromTid};
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.RUNNABLE, '',
- wakeup.ts, args, wakeupDuration));
- wakeup = undefined;
- }
- };
-
- if (prevSlice.args.stateWhenDescheduled === 'S') {
- pushSleep(SCHEDULING_STATE.SLEEPING);
- } else if (prevSlice.args.stateWhenDescheduled === 'R' ||
- prevSlice.args.stateWhenDescheduled === 'R+') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.RUNNABLE, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'D') {
- pushSleep(SCHEDULING_STATE.UNINTR_SLEEP);
- } else if (prevSlice.args.stateWhenDescheduled === 'T') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.STOPPED, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 't') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.DEBUG, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'Z') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.ZOMBIE, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'X') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.EXIT_DEAD, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'x') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.TASK_DEAD, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'K') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.WAKE_KILL, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'W') {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.WAKING, '',
- prevSlice.end, {}, midDuration));
- } else if (prevSlice.args.stateWhenDescheduled === 'D|K') {
- pushSleep(SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL);
- } else if (prevSlice.args.stateWhenDescheduled === 'D|W') {
- pushSleep(SCHEDULING_STATE.UNINTR_SLEEP_WAKING);
- } else {
- slices.push(new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.UNKNOWN, '',
- prevSlice.end, {}, midDuration));
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Unrecognized sleep state: ' +
- prevSlice.args.stateWhenDescheduled
- });
- }
-
- var runningSlice = new tr.model.ThreadTimeSlice(
- thread, SCHEDULING_STATE.RUNNING, '',
- nextSlice.start, {}, nextSlice.duration);
- runningSlice.cpuOnWhichThreadWasRunning = prevSlice.cpu;
- slices.push(runningSlice);
- }
- thread.timeSlices = slices;
- }, this);
- },
-
- /**
- * Creates an instance of each registered linux perf event parser.
- * This allows the parsers to register handlers for the events they
- * understand. We also register our own special handlers (for the
- * timestamp synchronization markers).
- */
- createParsers_: function() {
- // Instantiate the parsers; this will register handlers for known events
- var allTypeInfos = tr.e.importer.linux_perf.
- Parser.getAllRegisteredTypeInfos();
- var parsers = allTypeInfos.map(
- function(typeInfo) {
- return new typeInfo.constructor(this);
- }, this);
-
- return parsers;
- },
-
- registerDefaultHandlers_: function() {
- this.registerEventHandler('tracing_mark_write',
- FTraceImporter.prototype.traceMarkingWriteEvent_.bind(this));
- // NB: old-style trace markers; deprecated
- this.registerEventHandler('0',
- FTraceImporter.prototype.traceMarkingWriteEvent_.bind(this));
- // Register dummy clock sync handlers to avoid warnings in the log.
- this.registerEventHandler('tracing_mark_write:trace_event_clock_sync',
- function() { return true; });
- this.registerEventHandler('0:trace_event_clock_sync',
- function() { return true; });
- },
-
- /**
- * Processes a trace_event_clock_sync event.
- */
- traceClockSyncEvent_: function(eventName, cpuNumber, pid, ts, eventBase) {
- // Check to see if we have a normal clock sync marker that contains a
- // sync ID and the current time according to the "ftrace global" clock.
- var event = /name=(\w+?)\s(.+)/.exec(eventBase.details);
- if (event) {
- // TODO(alexandermont): This section of code seems to be broken. It
- // creates an "args" variable, but doesn't seem to do anything with it.
- var name = event[1];
- var pieces = event[2].split(' ');
- var args = {
- perfTs: ts
- };
- for (var i = 0; i < pieces.length; i++) {
- var parts = pieces[i].split('=');
- if (parts.length !== 2)
- throw new Error('omgbbq');
- args[parts[0]] = parts[1];
- }
-
- this.model_.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.LINUX_FTRACE_GLOBAL, name, ts);
- return true;
- }
-
- // Check to see if we have a "new style" clock sync marker that contains
- // only a sync ID.
- var event = /name=([\w\-]+)/.exec(eventBase.details);
- if (event) {
- this.model_.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.LINUX_FTRACE_GLOBAL, event[1], ts);
- return true;
- }
-
- // Check to see if we have a special clock sync marker that contains both
- // the current "ftrace global" time and the current CLOCK_MONOTONIC time.
- event = /parent_ts=(\d+\.?\d*)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var monotonicTs = event[1] * 1000;
- // A monotonic timestamp of zero is used as a sentinel value to indicate
- // that CLOCK_MONOTONIC and the ftrace global clock are identical.
- if (monotonicTs === 0)
- monotonicTs = ts;
-
- if (this.haveClockSyncedMonotonicToGlobal_)
- // ftrace sometimes includes multiple clock syncs between the monotonic
- // and global clocks within a single trace. We protect against this by
- // only taking the first one into account.
- return true;
-
- // We have a clock sync event that contains two timestamps: a timestamp
- // according to the ftrace 'global' clock, and that same timestamp
- // according to clock_gettime(CLOCK_MONOTONIC).
- this.model_.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.LINUX_FTRACE_GLOBAL,
- MONOTONIC_TO_FTRACE_GLOBAL_SYNC_ID, ts);
- this.model_.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.LINUX_CLOCK_MONOTONIC,
- MONOTONIC_TO_FTRACE_GLOBAL_SYNC_ID, monotonicTs);
-
- this.haveClockSyncedMonotonicToGlobal_ = true;
- return true;
- },
-
- /**
- * Processes a trace_marking_write event.
- */
- traceMarkingWriteEvent_: function(eventName, cpuNumber, pid, ts, eventBase,
- threadName) {
-
- // Some profiles end up with a \n\ on the end of each line. Strip it
- // before we do the comparisons.
- eventBase.details = eventBase.details.replace(/\\n.*$/, '');
-
- var event = /^\s*(\w+):\s*(.*)$/.exec(eventBase.details);
- if (!event) {
- // Check if the event matches events traced by the Android framework
- var tag = eventBase.details.substring(0, 2);
- if (tag === 'B|' || tag === 'E' || tag === 'E|' || tag === 'X|' ||
- tag === 'C|' || tag === 'S|' || tag === 'F|') {
- eventBase.subEventName = 'android';
- } else {
- return false;
- }
- } else {
- eventBase.subEventName = event[1];
- eventBase.details = event[2];
- }
-
- var writeEventName = eventName + ':' + eventBase.subEventName;
- var handler = this.eventHandlers_[writeEventName];
- if (!handler) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Unknown trace_marking_write event ' + writeEventName
- });
- return true;
- }
- return handler(writeEventName, cpuNumber, pid, ts, eventBase, threadName);
- },
-
- /**
- * Walks the this.events_ structure and creates Cpu objects.
- */
- importCpuData_: function(modelTimeTransformer) {
- this.forEachLine_(function(text, eventBase, cpuNumber, pid, ts) {
- var eventName = eventBase.eventName;
- var handler = this.eventHandlers_[eventName];
- if (!handler) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Unknown event ' + eventName + ' (' + text + ')'
- });
- return;
- }
- ts = modelTimeTransformer(ts);
- if (!handler(eventName, cpuNumber, pid, ts, eventBase)) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Malformed ' + eventName + ' event (' + text + ')'
- });
- }
- }.bind(this));
- },
-
- /**
- * Walks the this.events_ structure and populates this.lines_.
- */
- parseLines_: function() {
- var lines = [];
- var extractResult = FTraceImporter._extractEventsFromSystraceHTML(
- this.events_, true);
- if (!extractResult.ok)
- extractResult = FTraceImporter._extractEventsFromSystraceMultiHTML(
- this.events_, true);
- var lines = extractResult.ok ?
- extractResult.lines : this.events_.split('\n');
-
- var lineParser = undefined;
- for (var lineNumber = 0; lineNumber < lines.length; ++lineNumber) {
- var line = lines[lineNumber].trim();
- if (line.length === 0 || /^#/.test(line))
- continue;
-
- if (!lineParser) {
- lineParser = autoDetectLineParser(line);
- if (!lineParser) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Cannot parse line: ' + line
- });
- continue;
- }
- }
-
- var eventBase = lineParser(line);
- if (!eventBase) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Unrecognized line: ' + line
- });
- continue;
- }
-
- this.lines_.push([
- line,
- eventBase,
- parseInt(eventBase.cpuNumber),
- parseInt(eventBase.pid),
- parseFloat(eventBase.timestamp) * 1000
- ]);
- }
- },
-
- /**
- * Calls |handler| for every parsed line.
- */
- forEachLine_: function(handler) {
- for (var i = 0; i < this.lines_.length; ++i) {
- var line = this.lines_[i];
- handler.apply(this, line);
- }
- },
-
- /**
- * Initializes the ftrace importer. This initialization can't be done in the
- * constructor because all trace event handlers may not have been registered
- * by that point.
- */
- lazyInit_: function() {
- this.parsers_ = this.createParsers_();
- this.registerDefaultHandlers_();
- this.parseLines_();
- }
- };
-
- tr.importer.Importer.register(FTraceImporter);
-
- return {
- FTraceImporter: FTraceImporter,
- _FTraceImporterTestExports: TestExports
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer_test.html
deleted file mode 100644
index 244e3e28a13..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/ftrace_importer_test.html
+++ /dev/null
@@ -1,530 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/clock_sync_manager.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ClockDomainId = tr.model.ClockDomainId;
- var FTraceImporter = tr.e.importer.linux_perf.FTraceImporter;
- var FTraceImporterTestExports =
- tr.e.importer.linux_perf._FTraceImporterTestExports;
-
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('lineParserWithLegacyFmt', function() {
- var p = FTraceImporterTestExports.lineParserWithLegacyFmt;
- var x = p(' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=SurfaceFlinger next_pid=178 next_prio=112');
- assert.isNotNull(x);
- assert.equal(x.threadName, '<idle>');
- assert.equal(x.pid, '0');
- assert.equal(x.cpuNumber, '001');
- assert.equal(x.timestamp, '4467.843475');
- assert.equal(x.eventName, 'sched_switch');
- assert.equal('prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R' +
- ' ==> next_comm=SurfaceFlinger next_pid=178 next_prio=112', x.details);
-
- var x = p('Binder-Thread #-647 [001] 260.464294: sched_switch: ' +
- 'prev_comm=Binder Thread # prev_pid=647 prev_prio=120 prev_state=D ' +
- ' ==> next_comm=.android.chrome next_pid=1562 next_prio=120');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'Binder-Thread #');
- assert.equal(x.pid, '647');
- });
-
- test('lineParserWithIRQInfo', function() {
- var p = FTraceImporterTestExports.lineParserWithIRQInfo;
- var x = p(' systrace.sh-5441 [001] d... 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'systrace.sh');
- assert.equal(x.pid, '5441');
- assert.equal(x.cpuNumber, '001');
- assert.equal(x.timestamp, '1031.091570');
- assert.equal(x.eventName, 'sched_wakeup');
- assert.equal(x.details, 'comm=debugd pid=4978 prio=120 success=1 target_cpu=000'); // @suppress longLineCheck
- });
-
- test('lineParserWithIRQInfoNeedResched', function() {
- var p = FTraceImporterTestExports.lineParserWithIRQInfo;
- var x = p(' systrace.sh-5441 [001] .N.. 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'systrace.sh');
- assert.equal(x.pid, '5441');
- assert.equal(x.cpuNumber, '001');
- assert.equal(x.timestamp, '1031.091570');
- assert.equal(x.eventName, 'sched_wakeup');
- assert.equal(x.details, 'comm=debugd pid=4978 prio=120 success=1 target_cpu=000'); // @suppress longLineCheck
-
- var x = p(' systrace.sh-5441 [001] .n.. 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'systrace.sh');
-
- var x = p(' systrace.sh-5441 [001] .p.. 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'systrace.sh');
- });
-
- test('lineParserWithTGID', function() {
- var p = FTraceImporterTestExports.lineParserWithTGID;
- var x = p(' systrace.sh-5441 (54321) [001] d... 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'systrace.sh');
- assert.equal(x.pid, '5441');
- assert.equal(x.tgid, '54321');
- assert.equal(x.cpuNumber, '001');
- assert.equal(x.timestamp, '1031.091570');
- assert.equal(x.eventName, 'sched_wakeup');
- assert.equal(x.details, 'comm=debugd pid=4978 prio=120 success=1 target_cpu=000'); // @suppress longLineCheck
-
- var x = p(' systrace.sh-5441 ( 321) [001] d... 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.tgid, '321');
-
- var x = p(' systrace.sh-5441 (-----) [001] d... 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.isUndefined(x.tgid);
- });
-
- test('lineParserWithTGIDNeedResched', function() {
- var p = FTraceImporterTestExports.lineParserWithTGID;
- var x = p(' systrace.sh-5441 (54321) [001] .N.. 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.threadName, 'systrace.sh');
- assert.equal(x.pid, '5441');
- assert.equal(x.tgid, '54321');
- assert.equal(x.cpuNumber, '001');
- assert.equal(x.timestamp, '1031.091570');
- assert.equal(x.eventName, 'sched_wakeup');
- assert.equal(x.details, 'comm=debugd pid=4978 prio=120 success=1 target_cpu=000'); // @suppress longLineCheck
-
- var x = p(' systrace.sh-5441 ( 321) [001] .n.. 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x.tgid, '321');
-
- var x = p(' systrace.sh-5441 (-----) [001] .p.. 1031.091570: ' +
- 'sched_wakeup: comm=debugd pid=4978 prio=120 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.isUndefined(x.tgid);
- });
-
- test('autodetectLineCornerCases', function() {
- var detectParser = FTraceImporterTestExports.autoDetectLineParser;
- var lineParserWithLegacyFmt =
- FTraceImporterTestExports.lineParserWithLegacyFmt;
- var lineParserWithIRQInfo = FTraceImporterTestExports.lineParserWithIRQInfo;
- var lineParserWithTGID = FTraceImporterTestExports.lineParserWithTGID;
-
- var lineWithLegacyFmt =
- 'systrace.sh-8170 [001] 15180.978813: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=8170 prev_prio=120 ' +
- 'prev_state=x ==> next_comm=kworker/1:0 next_pid=7873 ' +
- 'next_prio=120';
- var detected = detectParser(lineWithLegacyFmt);
- assert.equal(lineParserWithLegacyFmt, detected);
-
- var lineWithIRQInfo =
- 'systrace.sh-8170 [001] d... 15180.978813: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=8170 prev_prio=120 ' +
- 'prev_state=x ==> next_comm=kworker/1:0 next_pid=7873 ' +
- 'next_prio=120';
- var detected = detectParser(lineWithIRQInfo);
- assert.equal(lineParserWithIRQInfo, detected);
-
- var lineWithTGID =
- 'systrace.sh-8170 (54321) [001] d... 15180.978813: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=8170 prev_prio=120 ' +
- 'prev_state=x ==> next_comm=kworker/1:0 next_pid=7873 ' +
- 'next_prio=120';
- var detected = detectParser(lineWithTGID);
- assert.equal(lineParserWithTGID, detected);
- });
-
- test('traceEventClockSyncRE', function() {
- var re = FTraceImporterTestExports.traceEventClockSyncRE;
- var x = re.exec('trace_event_clock_sync: parent_ts=19581477508');
- assert.isNotNull(x);
- assert.equal(x[1], '19581477508');
-
- var x = re.exec('trace_event_clock_sync: parent_ts=123.456');
- assert.isNotNull(x);
- assert.equal(x[1], '123.456');
- });
-
- test('genericClockSync', function() {
- var lines = [
- '# tracer: nop',
- '#',
- '# TASK-PID CPU# TIMESTAMP FUNCTION',
- '# | | | | |',
- 'sh-26121 [000] ...1 15.050: tracing_mark_write: trace_event_clock_sync: name=battor regulator=8941_smbb_boost' // @suppress longLineCheck
- ];
-
- var io = new tr.importer.ImportOptions();
- var m = new tr.Model();
- var i = new tr.importer.Import(m, io);
-
- m.clockSyncManager.addClockSyncMarker(ClockDomainId.BATTOR, 'battor', 50);
-
- i.importTraces([lines.join('\n')]);
-
- assert.isFalse(m.hasImportWarnings);
- // The clock sync happened at 15050 in the ftrace global domain and at 50
- // in the BattOr domain. This means the ftrace global timestamps need 15000
- // subtracted from them in order to be on the BattOr timeline.
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(ClockDomainId.BATTOR)(3),
- 3);
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- ClockDomainId.LINUX_FTRACE_GLOBAL)(15003),
- 3);
- });
-
- test('canImport', function() {
- var lines = [
- '# tracer: nop',
- '#',
- '# TASK-PID CPU# TIMESTAMP FUNCTION',
- '# | | | | |',
- ' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=SurfaceFlinger next_pid=178 next_prio=112',
-
- ' SurfaceFlinger-178 [001] 4467.843536: sched_switch: ' +
- 'prev_comm=SurfaceFlinger prev_pid=178 prev_prio=112 prev_state=S ' +
- '==> next_comm=kworker/u:2 next_pid=2844 next_prio=120',
-
- ' kworker/u:2-2844 [001] 4467.843567: sched_switch: ' +
- 'prev_comm=kworker/u:2 prev_pid=2844 prev_prio=120 prev_state=S ' +
- '==> next_comm=swapper next_pid=0 next_prio=120',
-
- ' <idle>-0 [001] 4467.844208: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=kworker/u:2 next_pid=2844 next_prio=120'
- ];
- assert.isTrue(FTraceImporter.canImport(lines.join('\n')));
-
- var lines = [
- ' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=SurfaceFlinger next_pid=178 next_prio=112'
- ];
- assert.isTrue(FTraceImporter.canImport(lines.join('\n')));
-
- var lines = [
- ' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=SurfaceFlinger next_pid=178 next_prio=112',
-
- ' SurfaceFlinger-178 [001] 4467.843536: sched_switch: ' +
- 'prev_comm=SurfaceFlinger prev_pid=178 prev_prio=112 ' +
- 'prev_state=S ==> next_comm=kworker/u:2 next_pid=2844 ' +
- 'next_prio=120'
- ];
- assert.isTrue(FTraceImporter.canImport(lines.join('\n')));
-
- var lines = [
- 'SomeRandomText',
- 'More random text'
- ];
- assert.isFalse(FTraceImporter.canImport(lines.join('\n')));
- });
-
- test('canImport34AndLater', function() {
- var lines = [
- '# tracer: nop',
- '#',
- '# entries-in-buffer/entries-written: 55191/55191 #P:2',
- '#',
- '# _-----=> irqs-off',
- '# / _----=> need-resched',
- '# | / _---=> hardirq/softirq',
- '# || / _--=> preempt-depth',
- '# ||| / delay',
- '# TASK-PID CPU# |||| TIMESTAMP FUNCTION',
- '# | | | |||| | |',
- ' systrace.sh-5441 [001] d... 1031.091570: sched_wakeup: ' +
- 'comm=debugd pid=4978 prio=120 success=1 target_cpu=000',
- ' systrace.sh-5441 [001] d... 1031.091584: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=5441 prev_prio=120 prev_state=x ' +
- '==> next_comm=chrome next_pid=5418 next_prio=120'
- ];
- assert.isTrue(FTraceImporter.canImport(lines.join('\n')));
-
- var lines = [
- ' systrace.sh-5441 [001] d... 1031.091570: sched_wakeup: ' +
- 'comm=debugd pid=4978 prio=120 success=1 target_cpu=000',
- ' systrace.sh-5441 [001] d... 1031.091584: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=5441 prev_prio=120 prev_state=x ' +
- '==> next_comm=chrome next_pid=5418 next_prio=120'
- ];
- assert.isTrue(FTraceImporter.canImport(lines.join('\n')));
- });
-
- test('importOneSequence', function() {
- var lines = [
- ' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=SurfaceFlinger next_pid=178 next_prio=112',
-
- ' SurfaceFlinger-178 [001] 4467.843536: sched_switch: ' +
- 'prev_comm=SurfaceFlinger prev_pid=178 prev_prio=112 ' +
- 'prev_state=S ==> next_comm=kworker/u:2 next_pid=2844 ' +
- 'next_prio=120',
-
- ' kworker/u:2-2844 [001] 4467.843567: sched_switch: ' +
- 'prev_comm=kworker/u:2 prev_pid=2844 prev_prio=120 ' +
- 'prev_state=S ==> next_comm=swapper next_pid=0 next_prio=120'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c = m.kernel.cpus[1];
- assert.equal(c.slices.length, 2);
-
- assert.equal(c.slices[0].title, 'SurfaceFlinger');
- assert.equal(c.slices[0].start, 4467843.475);
- assert.closeTo(.536 - .475, c.slices[0].duration, 1e-5);
- });
-
- test('importOneSequenceWithSpacyThreadName', function() {
- var lines = [
- ' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ==> ' +
- 'next_comm=Surface Flinger next_pid=178 next_prio=112',
-
- 'Surface Flinger -178 [001] 4467.843536: sched_switch: ' +
- 'prev_comm=Surface Flinger prev_pid=178 prev_prio=112 ' +
- 'prev_state=S ==> next_comm=kworker/u:2 next_pid=2844 ' +
- 'next_prio=120',
-
- ' kworker/u:2-2844 [001] 4467.843567: sched_switch: ' +
- 'prev_comm=kworker/u:2 prev_pid=2844 prev_prio=120 ' +
- 'prev_state=S ==> next_comm=swapper next_pid=0 next_prio=120'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c = m.kernel.cpus[1];
- assert.equal(c.slices.length, 2);
-
- assert.equal(c.slices[0].title, 'Surface Flinger ');
- assert.equal(c.slices[0].start, 4467843.475);
- assert.closeTo(.536 - .475, c.slices[0].duration, 1e-5);
- });
-
- test('importWithNewline', function() {
- var lines = [
- ''
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('importSystraceHtml', function() {
- var p = tr.b.getAsync(
- '/test_data/trivial_systrace.html');
- return p.then(function(data) {
- var m = newModel(data);
- assert.isFalse(m.hasImportWarnings);
-
- assert.isDefined(m.processes[124]);
- assert.isDefined(m.processes[360]);
-
- assert.isDefined(m.processes[124].counters['android.StatusBar']);
- assert.equal(m.processes[124].counters['android.StatusBar'].numSamples,
- 1);
- assert.isDefined(m.processes[124].counters['android.VSYNC']);
- assert.equal(2, m.processes[124].counters['android.VSYNC'].numSamples);
- assert.isDefined(m.processes[360].counters['android.iq']);
- assert.equal(1, m.processes[360].counters['android.iq'].numSamples);
- }, function(err) {
- throw err;
- });
- });
-
- test('importMultiTraceHtml', function() {
- var lines = [
- '<!DoCTYPE hTml>', // check must be case insensitive
- '<body>',
- ' <div class="view">',
- ' <\/div>',
- ' <script class="trace-data" type="application/text">',
- 'test1',
- 'test2',
- ' <\/script>',
- ' <script class="trace-data" type="application/text">',
- '# tracer: nop',
- '#',
- '# TASK-PID CPU# TIMESTAMP FUNCTION',
- '# | | | | |',
- ' hwc_eventmon-336 [000] 50260.929925: 0: C|124|VSYNC|1',
- ' Binder_1-340 [000] 50260.935656: 0: C|124|StatusBar|1',
- ' hwc_eventmon-336 [000] 50260.946573: 0: C|124|VSYNC|0',
- ' InputReader-419 [000] 50262.538578: 0: C|360|iq|1',
- ' <\/script>',
- '<\/body>',
- '<\/html>'
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- assert.isDefined(m.processes[124]);
- assert.isDefined(m.processes[360]);
-
- assert.isDefined(m.processes[124].counters['android.StatusBar']);
- assert.equal(m.processes[124].counters['android.StatusBar'].numSamples,
- 1);
- assert.isDefined(m.processes[124].counters['android.VSYNC']);
- assert.equal(2, m.processes[124].counters['android.VSYNC'].numSamples);
- assert.isDefined(m.processes[360].counters['android.iq']);
- assert.equal(1, m.processes[360].counters['android.iq'].numSamples);
- });
-
- test('clockSync', function() {
- var lines = [
- ' <idle>-0 [001] 4467.843475: sched_switch: ' +
- 'prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ' +
- '==> next_comm=SurfaceFlinger next_pid=178 next_prio=112',
- ' SurfaceFlinger-178 [001] 4467.843536: sched_switch: ' +
- 'prev_comm=SurfaceFlinger prev_pid=178 prev_prio=112 ' +
- 'prev_state=S ==> next_comm=kworker/u:2 next_pid=2844 ' +
- 'next_prio=120',
- ' kworker/u:2-2844 [001] 4467.843567: sched_switch: ' +
- 'prev_comm=kworker/u:2 prev_pid=2844 prev_prio=120 ' +
- 'prev_state=S ==> next_comm=swapper next_pid=0 ' +
- 'next_prio=120',
- ' kworker/u:2-2844 [001] 4467.843000: 0: ' +
- 'trace_event_clock_sync: parent_ts=0.1'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c = m.kernel.cpus[1];
- assert.equal(c.slices.length, 2);
-
- assert.closeTo(
- (467.843475 - (467.843 - 0.1)) * 1000,
- c.slices[0].start,
- 1e-5);
- });
-
- test('clockSyncMarkWrite', function() {
- var lines = [
- 'systrace.sh-8170 [001] 15180.978813: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=8170 prev_prio=120 ' +
- 'prev_state=x ==> next_comm=kworker/1:0 next_pid=7873 ' +
- 'next_prio=120',
- ' kworker/1:0-7873 [001] 15180.978836: sched_switch: ' +
- 'prev_comm=kworker/1:0 prev_pid=7873 prev_prio=120 ' +
- 'prev_state=S ==> next_comm=debugd next_pid=4404 next_prio=120',
- ' debugd-4404 [001] 15180.979010: sched_switch: prev_comm=debugd ' +
- 'prev_pid=4404 prev_prio=120 prev_state=S ==> ' +
- 'next_comm=dbus-daemon next_pid=510 next_prio=120',
- 'systrace.sh-8182 [000] 15186.203900: tracing_mark_write: ' +
- 'trace_event_clock_sync: parent_ts=0'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c = m.kernel.cpus[1];
- assert.equal(c.slices.length, 2);
-
- assert.closeTo((15180.978813 - 0) * 1000, c.slices[0].start, 1e-5);
-
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- tr.model.ClockDomainId.LINUX_FTRACE_GLOBAL)(100),
- 100);
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- tr.model.ClockDomainId.LINUX_CLOCK_MONOTONIC)(100),
- 100);
- });
-
- test('clockSyncMarkWriteSecondIgnored', function() {
- var lines = [
- 'systrace.sh-8182 [000] 15186.203900: tracing_mark_write: ' +
- 'trace_event_clock_sync: parent_ts=0',
- 'systrace.sh-8182 [000] 15187.203900: tracing_mark_write: ' +
- 'trace_event_clock_sync: parent_ts=0'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- tr.model.ClockDomainId.LINUX_FTRACE_GLOBAL)(100),
- 100);
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- tr.model.ClockDomainId.LINUX_CLOCK_MONOTONIC)(100),
- 100);
- });
-
- test('tracingMarkWriteEOLCleanup', function() {
- var lines = [
- 'systrace.sh-8182 [001] ...1 2068001.677892: tracing_mark_write: ' +
- 'B|9304|test\\n\\',
- 'systrace.sh-8182 [002] ...1 2068991.686415: tracing_mark_write: E\\n\\'
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c = m.processes[9304].threads[8182].sliceGroup;
- assert.equal(c.slices.length, 1);
-
- assert.closeTo((2068001.677892 - 0) * 1000, c.slices[0].start, 1e-5);
- assert.closeTo(
- (2068991.686415 - 2068001.677892) * 1000,
- c.slices[0].duration,
- 1e-5);
- });
-
- test('cpuCount', function() {
- var lines = [
- 'systrace.sh-8170 [001] 15180.978813: sched_switch: ' +
- 'prev_comm=systrace.sh prev_pid=8170 prev_prio=120 ' +
- 'prev_state=x ==> next_comm=kworker/1:0 next_pid=7873 ' +
- 'next_prio=120',
- ' kworker/1:0-7873 [001] 15180.978836: sched_switch: ' +
- 'prev_comm=kworker/1:0 prev_pid=7873 prev_prio=120 ' +
- 'prev_state=S ==> next_comm=debugd next_pid=4404 next_prio=120',
- ' debugd-4404 [000] 15180.979010: sched_switch: prev_comm=debugd ' +
- 'prev_pid=4404 prev_prio=120 prev_state=S ==> ' +
- 'next_comm=dbus-daemon next_pid=510 next_prio=120'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- assert.equal(tr.b.dictionaryLength(m.kernel.cpus), 2);
- assert.equal(m.kernel.bestGuessAtCpuCount, 2);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser.html
deleted file mode 100644
index 42d2d7ebecf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses gesture events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses trace events generated by gesture library for touchpad.
- * @constructor
- */
- function GestureParser(importer) {
- Parser.call(this, importer);
- importer.registerEventHandler('tracing_mark_write:log',
- GestureParser.prototype.logEvent.bind(this));
- importer.registerEventHandler('tracing_mark_write:SyncInterpret',
- GestureParser.prototype.syncEvent.bind(this));
- importer.registerEventHandler('tracing_mark_write:HandleTimer',
- GestureParser.prototype.timerEvent.bind(this));
- }
-
- GestureParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parse events generate by gesture library.
- * gestureOpenSlice and gestureCloseSlice are two common
- * functions to store the begin time and end time for all
- * events in gesture library
- */
- gestureOpenSlice: function(title, ts, opt_args) {
- var thread = this.importer.getOrCreatePseudoThread('gesture').thread;
- thread.sliceGroup.beginSlice(
- 'touchpad_gesture', title, ts, opt_args);
- },
-
- gestureCloseSlice: function(title, ts) {
- var thread = this.importer.getOrCreatePseudoThread('gesture').thread;
- if (thread.sliceGroup.openSliceCount) {
- var slice = thread.sliceGroup.mostRecentlyOpenedPartialSlice;
- if (slice.title !== title) {
- this.importer.model.importWarning({
- type: 'title_match_error',
- message: 'Titles do not match. Title is ' +
- slice.title + ' in openSlice, and is ' +
- title + ' in endSlice'
- });
- } else {
- thread.sliceGroup.endSlice(ts);
- }
- }
- },
-
- /**
- * For log events, events will come in pairs with a tag log:
- * like this:
- * tracing_mark_write: log: start: TimerLogOutputs
- * tracing_mark_write: log: end: TimerLogOutputs
- * which represent the start and the end time of certain log behavior
- * Take these logs above for example, they are the start and end time
- * of logging Output for HandleTimer function
- */
- logEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var innerEvent =
- /^\s*(\w+):\s*(\w+)$/.exec(eventBase.details);
- switch (innerEvent[1]) {
- case 'start':
- this.gestureOpenSlice('GestureLog', ts, {name: innerEvent[2]});
- break;
- case 'end':
- this.gestureCloseSlice('GestureLog', ts);
- }
- return true;
- },
-
- /**
- * For SyncInterpret events, events will come in pairs with
- * a tag SyncInterpret:
- * like this:
- * tracing_mark_write: SyncInterpret: start: ClickWiggleFilterInterpreter
- * tracing_mark_write: SyncInterpret: end: ClickWiggleFilterInterpreter
- * which represent the start and the end time of SyncInterpret function
- * inside the certain interpreter in the gesture library.
- * Take the logs above for example, they are the start and end time
- * of the SyncInterpret function inside ClickWiggleFilterInterpreter
- */
- syncEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var innerEvent = /^\s*(\w+):\s*(\w+)$/.exec(eventBase.details);
- switch (innerEvent[1]) {
- case 'start':
- this.gestureOpenSlice('SyncInterpret', ts,
- {interpreter: innerEvent[2]});
- break;
- case 'end':
- this.gestureCloseSlice('SyncInterpret', ts);
- }
- return true;
- },
-
- /**
- * For HandleTimer events, events will come in pairs with
- * a tag HandleTimer:
- * like this:
- * tracing_mark_write: HandleTimer: start: LookaheadFilterInterpreter
- * tracing_mark_write: HandleTimer: end: LookaheadFilterInterpreter
- * which represent the start and the end time of HandleTimer function
- * inside the certain interpreter in the gesture library.
- * Take the logs above for example, they are the start and end time
- * of the HandleTimer function inside LookaheadFilterInterpreter
- */
- timerEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var innerEvent = /^\s*(\w+):\s*(\w+)$/.exec(eventBase.details);
- switch (innerEvent[1]) {
- case 'start':
- this.gestureOpenSlice('HandleTimer', ts,
- {interpreter: innerEvent[2]});
- break;
- case 'end':
- this.gestureCloseSlice('HandleTimer', ts);
- }
- return true;
- }
- };
-
- Parser.register(GestureParser);
-
- return {
- GestureParser: GestureParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser_test.html
deleted file mode 100644
index 002844dcd2e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/gesture_parser_test.html
+++ /dev/null
@@ -1,213 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('gestureImport', function() {
- var lines = [
- '<...>-1837 [000] ...1 875292.741648: tracing_mark_write: ' +
- 'log: start: TimerLogOutputs', // 0
- '<...>-1837 [000] ...1 875292.741651: tracing_mark_write: ' +
- 'log: end: TimerLogOutputs',
- '<...>-1837 [000] ...1 875292.742796: tracing_mark_write: ' +
- 'log: start: LogTimerCallback',
- '<...>-1837 [000] ...1 875292.742802: tracing_mark_write: ' +
- 'log: end: LogTimerCallback',
- '<...>-1837 [000] ...1 875292.742805: tracing_mark_write: ' +
- 'HandleTimer: start: LoggingFilterInterpreter', // 2
- '<...>-1837 [000] ...1 875292.742809: tracing_mark_write: ' +
- 'HandleTimer: start: AppleTrackpadFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742814: tracing_mark_write: ' +
- 'HandleTimer: start: Cr48ProfileSensorFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742818: tracing_mark_write: ' +
- 'HandleTimer: start: T5R2CorrectingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742822: tracing_mark_write: ' +
- 'HandleTimer: start: StuckButtonInhibitorFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742825: tracing_mark_write: ' +
- 'HandleTimer: start: IntegralGestureFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742829: tracing_mark_write: ' +
- 'HandleTimer: start: ScalingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742833: tracing_mark_write: ' +
- 'HandleTimer: start: SplitCorrectingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742836: tracing_mark_write: ' +
- 'HandleTimer: start: AccelFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742840: tracing_mark_write: ' +
- 'HandleTimer: start: SensorJumpFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742843: tracing_mark_write: ' +
- 'HandleTimer: start: BoxFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742846: tracing_mark_write: ' +
- 'HandleTimer: start: LookaheadFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742853: tracing_mark_write: ' +
- 'SyncInterpret: start: IirFilterInterpreter', // 14
- '<...>-1837 [000] ...1 875292.742861: tracing_mark_write: ' +
- 'SyncInterpret: start: PalmClassifyingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742872: tracing_mark_write: ' +
- 'SyncInterpret: start: ClickWiggleFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742881: tracing_mark_write: ' +
- 'SyncInterpret: start: FlingStopFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742887: tracing_mark_write: ' +
- 'SyncInterpret: start: ImmediateInterpreter',
- '<...>-1837 [000] ...1 875292.742906: tracing_mark_write: ' +
- 'SyncInterpret: end: ImmediateInterpreter',
- '<...>-1837 [000] ...1 875292.742910: tracing_mark_write: ' +
- 'SyncInterpret: end: FlingStopFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742914: tracing_mark_write: ' +
- 'SyncInterpret: end: ClickWiggleFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742917: tracing_mark_write: ' +
- 'SyncInterpret: end: PalmClassifyingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742921: tracing_mark_write: ' +
- 'SyncInterpret: end: IirFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742926: tracing_mark_write: ' +
- 'HandleTimer: end: LookaheadFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742929: tracing_mark_write: ' +
- 'HandleTimer: end: BoxFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742932: tracing_mark_write: ' +
- 'HandleTimer: end: SensorJumpFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742937: tracing_mark_write: ' +
- 'HandleTimer: end: AccelFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742940: tracing_mark_write: ' +
- 'HandleTimer: end: SplitCorrectingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742944: tracing_mark_write: ' +
- 'HandleTimer: end: ScalingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742949: tracing_mark_write: ' +
- 'HandleTimer: end: IntegralGestureFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742952: tracing_mark_write: ' +
- 'HandleTimer: end: StuckButtonInhibitorFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742956: tracing_mark_write: ' +
- 'HandleTimer: end: T5R2CorrectingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742959: tracing_mark_write: ' +
- 'HandleTimer: end: Cr48ProfileSensorFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742962: tracing_mark_write: ' +
- 'HandleTimer: end: AppleTrackpadFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742966: tracing_mark_write: ' +
- 'HandleTimer: end: LoggingFilterInterpreter',
- '<...>-1837 [000] ...1 875292.742969: tracing_mark_write: ' +
- 'log: start: TimerLogOutputs',
- '<...>-1837 [000] ...1 875292.742973: tracing_mark_write: ' +
- 'log: end: TimerLogOutputs',
- '<...>-1837 [000] ...1 875292.795219: tracing_mark_write: ' +
- 'log: start: LogHardwareState',
- '<...>-1837 [000] ...1 875292.795231: tracing_mark_write: ' +
- 'log: end: LogHardwareState'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var gestureThread = threads[0];
- assert.equal(gestureThread.name, 'gesture');
- assert.equal(gestureThread.sliceGroup.length, 21);
- assert.equal('touchpad_gesture',
- gestureThread.sliceGroup.slices[0].category);
- assert.equal('GestureLog',
- gestureThread.sliceGroup.slices[0].title);
- assert.equal('touchpad_gesture',
- gestureThread.sliceGroup.slices[2].category);
- assert.equal('HandleTimer',
- gestureThread.sliceGroup.slices[2].title);
- assert.equal('touchpad_gesture',
- gestureThread.sliceGroup.slices[14].category);
- assert.equal('SyncInterpret',
- gestureThread.sliceGroup.slices[14].title);
- });
-
- test('unusualStart', function() {
- var lines = [
- 'X-30368 [000] ...1 1819362.481867: tracing_mark_write: ' +
- 'SyncInterpret: start: IirFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481881: tracing_mark_write: ' +
- 'SyncInterpret: start: PalmClassifyingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481894: tracing_mark_write: ' +
- 'SyncInterpret: start: ClickWiggleFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481905: tracing_mark_write: ' +
- 'SyncInterpret: start: FlingStopFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481912: tracing_mark_write: ' +
- 'SyncInterpret: start: ImmediateInterpreter',
- 'X-30368 [000] ...1 1819362.481933: tracing_mark_write: ' +
- 'SyncInterpret: end: ImmediateInterpreter',
- 'X-30368 [000] ...1 1819362.481938: tracing_mark_write: ' +
- 'SyncInterpret: end: FlingStopFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481943: tracing_mark_write: ' +
- 'SyncInterpret: end: ClickWiggleFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481947: tracing_mark_write: ' +
- 'SyncInterpret: end: PalmClassifyingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481952: tracing_mark_write: ' +
- 'SyncInterpret: end: IirFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481958: tracing_mark_write: ' +
- 'HandleTimer: end: LookaheadFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481962: tracing_mark_write: ' +
- 'HandleTimer: end: BoxFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481967: tracing_mark_write: ' +
- 'HandleTimer: end: SensorJumpFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481973: tracing_mark_write: ' +
- 'HandleTimer: end: AccelFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481977: tracing_mark_write: ' +
- 'HandleTimer: end: SplitCorrectingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481982: tracing_mark_write: ' +
- 'HandleTimer: end: ScalingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481988: tracing_mark_write: ' +
- 'HandleTimer: end: IntegralGestureFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481993: tracing_mark_write: ' +
- 'HandleTimer: end: StuckButtonInhibitorFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481998: tracing_mark_write: ' +
- 'HandleTimer: end: T5R2CorrectingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.482033: tracing_mark_write: ' +
- 'HandleTimer: end: Cr48ProfileSensorFilterInterpreter',
- 'X-30368 [000] ...1 1819362.482038: tracing_mark_write: ' +
- 'HandleTimer: end: AppleTrackpadFilterInterpreter',
- 'X-30368 [000] ...1 1819362.482043: tracing_mark_write: ' +
- 'HandleTimer: end: LoggingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.482047: tracing_mark_write: ' +
- 'log: start: TimerLogOutputs',
- 'X-30368 [000] ...1 1819362.482053: tracing_mark_write: ' +
- 'log: end: TimerLogOutputs'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
- });
-
- test('importError', function() {
- var lines = [
- 'X-30368 [000] ...1 1819362.481912: tracing_mark_write: ' +
- 'SyncInterpret: start: ImmediateInterpreter',
- 'X-30368 [000] ...1 1819362.481958: tracing_mark_write: ' +
- 'HandleTimer: end: LookaheadFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481962: tracing_mark_write: ' +
- 'HandleTimer: end: BoxFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481967: tracing_mark_write: ' +
- 'HandleTimer: end: SensorJumpFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481973: tracing_mark_write: ' +
- 'HandleTimer: end: AccelFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481977: tracing_mark_write: ' +
- 'HandleTimer: end: SplitCorrectingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481982: tracing_mark_write: ' +
- 'HandleTimer: end: ScalingFilterInterpreter',
- 'X-30368 [000] ...1 1819362.481988: tracing_mark_write: ' +
- 'HandleTimer: end: IntegralGestureFilterInterpreter'
- ];
- var m = newModel(lines.join('\n'));
-
- assert.isTrue(m.hasImportWarnings);
- assert.equal(m.importWarnings.length, 7);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser.html
deleted file mode 100644
index d6e3cac93db..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser.html
+++ /dev/null
@@ -1,182 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses i2c driver events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux i2c trace events.
- * @constructor
- */
- function I2cParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('i2c_write',
- I2cParser.prototype.i2cWriteEvent.bind(this));
- importer.registerEventHandler('i2c_read',
- I2cParser.prototype.i2cReadEvent.bind(this));
- importer.registerEventHandler('i2c_reply',
- I2cParser.prototype.i2cReplyEvent.bind(this));
- importer.registerEventHandler('i2c_result',
- I2cParser.prototype.i2cResultEvent.bind(this));
- }
-
- // Matches the i2c_write and i2c_reply records
- var i2cWriteReplyRE = new RegExp(
- 'i2c-(\\d+) #(\\d+) a=([\\da-fA-F]+) f=([\\da-fA-F]+) l=(\\d+) ' +
- '(\\[[\\da-fA-F\\-]+\\])');
- // Matches the i2c_read record
- var i2cReadRE = /i2c-(\d+) #(\d+) a=([\da-fA-F]+) f=([\da-fA-F]+) l=(\d+)/;
- // Matches the i2c_result record
- var i2cResultRE = /i2c-(\d+) n=(\d+) ret=(\d+)/;
-
- I2cParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parses i2c events and sets up state in the importer.
- */
- i2cWriteEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = i2cWriteReplyRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var adapterNumber = parseInt(event[1]);
- var messageNumber = event[2];
- var address = event[3];
- var flags = event[4];
- var dataLength = event[5];
- var data = event[6];
- var thread = this.importer.getOrCreatePseudoThread(
- 'i2c adapter ' + adapterNumber);
-
- pushLastSliceIfNeeded(thread, event[1], ts);
-
- thread.lastEntryTitle = 'i2c write';
- thread.lastEntryTs = ts;
- thread.lastEntryArgs = {
- 'Message number': messageNumber,
- 'Address': address,
- 'Flags': flags,
- 'Data Length': dataLength,
- 'Data': data
- };
-
- return true;
- },
-
- i2cReadEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = i2cReadRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var adapterNumber = parseInt(event[1]);
- var messageNumber = event[2];
- var address = event[3];
- var flags = event[4];
- var dataLength = event[5];
- var thread = this.importer.getOrCreatePseudoThread(
- 'i2c adapter ' + adapterNumber);
-
- pushLastSliceIfNeeded(thread, event[1], ts);
-
- thread.lastEntryTitle = 'i2c read';
- thread.lastEntryTs = ts;
- thread.lastEntryArgs = {
- 'Message number': messageNumber,
- 'Address': address,
- 'Flags': flags,
- 'Data Length': dataLength
- };
-
- return true;
- },
-
- i2cReplyEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = i2cWriteReplyRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var adapterNumber = parseInt(event[1]);
- var messageNumber = event[2];
- var address = event[3];
- var flags = event[4];
- var dataLength = event[5];
- var data = event[6];
- var thread = this.importer.getOrCreatePseudoThread(
- 'i2c adapter ' + adapterNumber);
-
- pushLastSliceIfNeeded(thread, event[1], ts);
-
- thread.lastEntryTitle = 'i2c reply';
- thread.lastEntryTs = ts;
- thread.lastEntryArgs = {
- 'Message number': messageNumber,
- 'Address': address,
- 'Flags': flags,
- 'Data Length': dataLength,
- 'Data': data
- };
-
- return true;
- },
-
- i2cResultEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = i2cResultRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var adapterNumber = parseInt(event[1]);
- var numMessages = event[2];
- var ret = event[3];
- var thread = this.importer.getOrCreatePseudoThread(
- 'i2c adapter ' + adapterNumber);
-
- var args = thread.lastEntryArgs;
- if (args !== undefined) {
- args['Number of messages'] = numMessages;
- args['Return'] = ret;
- }
-
- pushLastSliceIfNeeded(thread, event[1], ts);
-
- thread.lastEntryTitle = undefined;
- thread.lastEntryTs = undefined;
- thread.lastEntryArgs = undefined;
-
- return true;
- },
- };
-
- function pushLastSliceIfNeeded(thread, id, currentTs) {
- if (thread.lastEntryTs !== undefined) {
- var duration = currentTs - thread.lastEntryTs;
- var slice = new tr.model.ThreadSlice(
- '', thread.lastEntryTitle,
- ColorScheme.getColorIdForGeneralPurposeString(id),
- thread.lastEntryTs, thread.lastEntryArgs, duration);
- thread.thread.sliceGroup.pushSlice(slice);
- }
- }
-
- Parser.register(I2cParser);
-
- return {
- I2cParser: I2cParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser_test.html
deleted file mode 100644
index 156a50ba767..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i2c_parser_test.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('i2cImport', function() {
- var lines = [
-
- ' /system/bin/surfaceflinger-516 ( 516) [002] ...1 6481.291425: ' +
- 'i2c_write: i2c-3 #0 a=020 f=0000 l=2 [15-00]',
- ' /system/bin/surfaceflinger-516 ( 516) [002] ...1 6481.291602: ' +
- 'i2c_result: i2c-3 n=1 ret=1',
- ' kworker/u8:5-9309 ( 9309) [001] ...1 6481.365821: ' +
- 'i2c_write: i2c-7 #0 a=01d f=0000 l=1 [00]',
- ' kworker/u8:5-9309 ( 9309) [001] ...1 6481.365823: ' +
- 'i2c_read: i2c-7 #1 a=01d f=0001 l=1',
- ' kworker/u8:5-9309 ( 9309) [001] ...1 6481.366730: ' +
- 'i2c_reply: i2c-7 #1 a=01d f=0001 l=1 [01]',
- ' kworker/u8:5-9309 ( 9309) [001] ...1 6481.366732: ' +
- 'i2c_result: i2c-7 n=2 ret=2'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- var warnings = m.importWarnings;
- for (var i = 0; i < warnings.length; i++) {
- console.log(warnings[i]);
- }
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 2);
-
- var threads = m.findAllThreadsNamed('i2c adapter 3');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 1);
- var slice = threads[0].sliceGroup.slices[0];
- assert.equal(slice.title, 'i2c write');
- assert.isDefined(slice.args);
- assert.equal(slice.args['Message number'], '0');
- assert.equal(slice.args['Address'], '020');
- assert.equal(slice.args['Flags'], '0000');
- assert.equal(slice.args['Data Length'], '2');
- assert.equal(slice.args['Data'], '[15-00]');
-
- var threads = m.findAllThreadsNamed('i2c adapter 7');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 3);
-
- var slice = threads[0].sliceGroup.slices[0];
- assert.equal(slice.title, 'i2c write');
- assert.equal(slice.args['Message number'], '0');
- assert.equal(slice.args['Address'], '01d');
- assert.equal(slice.args['Flags'], '0000');
- assert.equal(slice.args['Data Length'], '1');
- assert.equal(slice.args['Data'], '[00]');
-
- slice = threads[0].sliceGroup.slices[1];
- assert.equal(slice.title, 'i2c read');
- assert.equal(slice.args['Message number'], '1');
- assert.equal(slice.args['Address'], '01d');
- assert.equal(slice.args['Flags'], '0001');
- assert.equal(slice.args['Data Length'], '1');
-
- slice = threads[0].sliceGroup.slices[2];
- assert.equal(slice.title, 'i2c reply');
- assert.equal(slice.args['Message number'], '1');
- assert.equal(slice.args['Address'], '01d');
- assert.equal(slice.args['Flags'], '0001');
- assert.equal(slice.args['Data Length'], '1');
- assert.equal(slice.args['Data'], '[01]');
- assert.equal(slice.args['Number of messages'], '2');
- assert.equal(slice.args['Return'], '2');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser.html
deleted file mode 100644
index e1c6334a28a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser.html
+++ /dev/null
@@ -1,371 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses i915 driver events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux i915 trace events.
- * @constructor
- */
- function I915Parser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('i915_gem_object_create',
- I915Parser.prototype.gemObjectCreateEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_bind',
- I915Parser.prototype.gemObjectBindEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_unbind',
- I915Parser.prototype.gemObjectBindEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_change_domain',
- I915Parser.prototype.gemObjectChangeDomainEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_pread',
- I915Parser.prototype.gemObjectPreadWriteEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_pwrite',
- I915Parser.prototype.gemObjectPreadWriteEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_fault',
- I915Parser.prototype.gemObjectFaultEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_clflush',
- // NB: reuse destroy handler
- I915Parser.prototype.gemObjectDestroyEvent.bind(this));
- importer.registerEventHandler('i915_gem_object_destroy',
- I915Parser.prototype.gemObjectDestroyEvent.bind(this));
- importer.registerEventHandler('i915_gem_ring_dispatch',
- I915Parser.prototype.gemRingDispatchEvent.bind(this));
- importer.registerEventHandler('i915_gem_ring_flush',
- I915Parser.prototype.gemRingFlushEvent.bind(this));
- importer.registerEventHandler('i915_gem_request',
- I915Parser.prototype.gemRequestEvent.bind(this));
- importer.registerEventHandler('i915_gem_request_add',
- I915Parser.prototype.gemRequestEvent.bind(this));
- importer.registerEventHandler('i915_gem_request_complete',
- I915Parser.prototype.gemRequestEvent.bind(this));
- importer.registerEventHandler('i915_gem_request_retire',
- I915Parser.prototype.gemRequestEvent.bind(this));
- importer.registerEventHandler('i915_gem_request_wait_begin',
- I915Parser.prototype.gemRequestEvent.bind(this));
- importer.registerEventHandler('i915_gem_request_wait_end',
- I915Parser.prototype.gemRequestEvent.bind(this));
- importer.registerEventHandler('i915_gem_ring_wait_begin',
- I915Parser.prototype.gemRingWaitEvent.bind(this));
- importer.registerEventHandler('i915_gem_ring_wait_end',
- I915Parser.prototype.gemRingWaitEvent.bind(this));
- importer.registerEventHandler('i915_reg_rw',
- I915Parser.prototype.regRWEvent.bind(this));
- importer.registerEventHandler('i915_flip_request',
- I915Parser.prototype.flipEvent.bind(this));
- importer.registerEventHandler('i915_flip_complete',
- I915Parser.prototype.flipEvent.bind(this));
- importer.registerEventHandler('intel_gpu_freq_change',
- I915Parser.prototype.gpuFrequency.bind(this));
- }
-
- I915Parser.prototype = {
- __proto__: Parser.prototype,
-
- i915FlipOpenSlice: function(ts, obj, plane) {
- // use i915_flip_obj_plane?
- var kthread = this.importer.getOrCreatePseudoThread('i915_flip');
- kthread.openSliceTS = ts;
- kthread.openSlice = 'flip:' + obj + '/' + plane;
- },
-
- i915FlipCloseSlice: function(ts, args) {
- var kthread = this.importer.getOrCreatePseudoThread('i915_flip');
- if (kthread.openSlice) {
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- kthread.openSliceTS,
- args,
- ts - kthread.openSliceTS);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- }
- kthread.openSlice = undefined;
- },
-
- i915GemObjectSlice: function(ts, eventName, obj, args) {
- var kthread = this.importer.getOrCreatePseudoThread('i915_gem');
- kthread.openSlice = eventName + ':' + obj;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- i915GemRingSlice: function(ts, eventName, dev, ring, args) {
- var kthread = this.importer.getOrCreatePseudoThread('i915_gem_ring');
- kthread.openSlice = eventName + ':' + dev + '.' + ring;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- i915RegSlice: function(ts, eventName, reg, args) {
- var kthread = this.importer.getOrCreatePseudoThread('i915_reg');
- kthread.openSlice = eventName + ':' + reg;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- i915FreqChangeSlice: function(ts, eventName, args) {
- var kthread = this.importer.getOrCreatePseudoThread('i915_gpu_freq');
- kthread.openSlice = eventName;
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- ts, args, 0);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- },
-
- /**
- * Parses i915 driver events and sets up state in the importer.
- */
- gemObjectCreateEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /obj=(\w+), size=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var obj = event[1];
- var size = parseInt(event[2]);
- this.i915GemObjectSlice(ts, eventName, obj,
- {
- obj: obj,
- size: size
- });
- return true;
- },
-
- gemObjectBindEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- // TODO(sleffler) mappable
- var event = /obj=(\w+), offset=(\w+), size=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var obj = event[1];
- var offset = event[2];
- var size = parseInt(event[3]);
- this.i915ObjectGemSlice(ts, eventName + ':' + obj,
- {
- obj: obj,
- offset: offset,
- size: size
- });
- return true;
- },
-
- gemObjectChangeDomainEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var event = /obj=(\w+), read=(\w+=>\w+), write=(\w+=>\w+)/
- .exec(eventBase.details);
- if (!event)
- return false;
-
- var obj = event[1];
- var read = event[2];
- var write = event[3];
- this.i915GemObjectSlice(ts, eventName, obj,
- {
- obj: obj,
- read: read,
- write: write
- });
- return true;
- },
-
- gemObjectPreadWriteEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var event = /obj=(\w+), offset=(\d+), len=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var obj = event[1];
- var offset = parseInt(event[2]);
- var len = parseInt(event[3]);
- this.i915GemObjectSlice(ts, eventName, obj,
- {
- obj: obj,
- offset: offset,
- len: len
- });
- return true;
- },
-
- gemObjectFaultEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- // TODO(sleffler) writable
- var event = /obj=(\w+), (\w+) index=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var obj = event[1];
- var type = event[2];
- var index = parseInt(event[3]);
- this.i915GemObjectSlice(ts, eventName, obj,
- {
- obj: obj,
- type: type,
- index: index
- });
- return true;
- },
-
- gemObjectDestroyEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /obj=(\w+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var obj = event[1];
- this.i915GemObjectSlice(ts, eventName, obj,
- {
- obj: obj
- });
- return true;
- },
-
- gemRingDispatchEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev=(\d+), ring=(\d+), seqno=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var dev = parseInt(event[1]);
- var ring = parseInt(event[2]);
- var seqno = parseInt(event[3]);
- this.i915GemRingSlice(ts, eventName, dev, ring,
- {
- dev: dev,
- ring: ring,
- seqno: seqno
- });
- return true;
- },
-
- gemRingFlushEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev=(\d+), ring=(\w+), invalidate=(\w+), flush=(\w+)/
- .exec(eventBase.details);
- if (!event)
- return false;
-
- var dev = parseInt(event[1]);
- var ring = parseInt(event[2]);
- var invalidate = event[3];
- var flush = event[4];
- this.i915GemRingSlice(ts, eventName, dev, ring,
- {
- dev: dev,
- ring: ring,
- invalidate: invalidate,
- flush: flush
- });
- return true;
- },
-
- gemRequestEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev=(\d+), ring=(\d+), seqno=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var dev = parseInt(event[1]);
- var ring = parseInt(event[2]);
- var seqno = parseInt(event[3]);
- this.i915GemRingSlice(ts, eventName, dev, ring,
- {
- dev: dev,
- ring: ring,
- seqno: seqno
- });
- return true;
- },
-
- gemRingWaitEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /dev=(\d+), ring=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var dev = parseInt(event[1]);
- var ring = parseInt(event[2]);
- this.i915GemRingSlice(ts, eventName, dev, ring,
- {
- dev: dev,
- ring: ring
- });
- return true;
- },
-
- regRWEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /(\w+) reg=(\w+), len=(\d+), val=(\(\w+, \w+\))/
- .exec(eventBase.details);
- if (!event)
- return false;
-
- var rw = event[1];
- var reg = event[2];
- var len = event[3];
- var data = event[3];
- this.i915RegSlice(ts, rw, reg,
- {
- rw: rw,
- reg: reg,
- len: len,
- data: data
- });
- return true;
- },
-
- flipEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /plane=(\d+), obj=(\w+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var plane = parseInt(event[1]);
- var obj = event[2];
- if (eventName === 'i915_flip_request')
- this.i915FlipOpenSlice(ts, obj, plane);
- else
- this.i915FlipCloseSlice(ts,
- {
- obj: obj,
- plane: plane
- });
- return true;
- },
-
- gpuFrequency: function(eventName, cpuNumver, pid, ts, eventBase) {
- var event = /new_freq=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
- var freq = parseInt(event[1]);
-
- this.i915FreqChangeSlice(ts, eventName, {
- freq: freq
- });
- return true;
- }
- };
-
- Parser.register(I915Parser);
-
- return {
- I915Parser: I915Parser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser_test.html
deleted file mode 100644
index cc62910919f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/i915_parser_test.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('i915Import', function() {
- var lines = [
- // NB: spliced from different traces; mismatched timestamps don't matter
- ' chrome-1223 [000] 2784.773556: i915_gem_object_pwrite: ' +
- 'obj=ffff88013f13fc00, offset=0, len=2984',
- ' chrome-1539 [000] 18420.677750: ' +
- 'i915_gem_object_change_domain: ' +
- 'obj=ffff8800a88d1400, read=44=>40, write=00=>40',
- ' chrome-1539 [000] 18420.677759: i915_gem_object_fault: ' +
- 'obj=ffff8800a88d1400, GTT index=0 , writable',
- ' X-964 [000] 2784.774864: i915_flip_request: ' +
- 'plane=0, obj=ffff88013f0b9a00',
- ' <idle>-0 [000] 2784.788644: i915_flip_complete: ' +
- 'plane=0, obj=ffff88013f0b9a00',
- ' chrome-1539 [001] 18420.681687: i915_gem_request_retire: ' +
- 'dev=0, ring=1, seqno=1178152',
- ' chrome-1539 [000] 18422.955688: i915_gem_request_add: ' +
- 'dev=0, ring=1, seqno=1178364',
- ' cat-21833 [000] 18422.956832: i915_gem_request_complete: ' +
- 'dev=0, ring=1, seqno=1178364',
- ' X-1012 [001] 18420.682511: i915_gem_request_wait_begin: ' +
- 'dev=0, ring=4, seqno=1178156',
- ' X-1012 [000] 18422.765707: i915_gem_request_wait_end: ' +
- 'dev=0, ring=4, seqno=1178359',
- ' chrome-1539 [000] 18422.955655: i915_gem_ring_flush: ' +
- 'dev=0, ring=1, invalidate=001e, flush=0040',
- ' chrome-1539 [000] 18422.955660: i915_gem_ring_dispatch: ' +
- 'dev=0, ring=1, seqno=1178364',
- ' chrome-1539 [000] 18420.677772: i915_reg_rw: ' +
- 'write reg=0x100030, len=8, val=(0xfca9001, 0xfce8007)',
- ' kworker/u16:2-13998 [005] 1577664.436065: ' +
- 'intel_gpu_freq_change: new_freq=350'
-
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var i915GemThread = undefined;
- var i915FlipThread = undefined;
- var i915GemRingThread = undefined;
- var i915RegThread = undefined;
- var i915GpuFreqThread = undefined;
- m.getAllThreads().forEach(function(t) {
- switch (t.name) {
- case 'i915_gem':
- i915GemThread = t;
- break;
- case 'i915_flip':
- i915FlipThread = t;
- break;
- case 'i915_gem_ring':
- i915GemRingThread = t;
- break;
- case 'i915_reg':
- i915RegThread = t;
- break;
- case 'i915_gpu_freq':
- i915GpuFreqThread = t;
- break;
- default:
- throw new unittest.TestError('Unexpected thread named ' + t.name);
- }
- });
- assert.isDefined(i915GemThread);
- assert.isDefined(i915FlipThread);
- assert.isDefined(i915GemRingThread);
- assert.isDefined(i915RegThread);
- assert.isDefined(i915GpuFreqThread);
-
- assert.equal(i915GemThread.sliceGroup.length, 3);
-
- assert.equal(i915FlipThread.sliceGroup.length, 1);
-
- assert.closeTo(
- 2784.774864 * 1000.0,
- i915FlipThread.sliceGroup.slices[0].start,
- 1e-5);
- assert.closeTo(
- (2784.788644 - 2784.774864) * 1000.0,
- i915FlipThread.sliceGroup.slices[0].duration,
- 1e-5);
-
- assert.equal(i915GemRingThread.sliceGroup.length, 7);
- assert.equal(i915RegThread.sliceGroup.length, 1);
- assert.equal(i915GpuFreqThread.sliceGroup.length, 1);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser.html
deleted file mode 100644
index eeae99d836b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser.html
+++ /dev/null
@@ -1,184 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses drm driver events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux irq trace events.
- * @constructor
- */
- function IrqParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('irq_handler_entry',
- IrqParser.prototype.irqHandlerEntryEvent.bind(this));
- importer.registerEventHandler('irq_handler_exit',
- IrqParser.prototype.irqHandlerExitEvent.bind(this));
- importer.registerEventHandler('softirq_raise',
- IrqParser.prototype.softirqRaiseEvent.bind(this));
- importer.registerEventHandler('softirq_entry',
- IrqParser.prototype.softirqEntryEvent.bind(this));
- importer.registerEventHandler('softirq_exit',
- IrqParser.prototype.softirqExitEvent.bind(this));
- importer.registerEventHandler('ipi_entry',
- IrqParser.prototype.ipiEntryEvent.bind(this));
- importer.registerEventHandler('ipi_exit',
- IrqParser.prototype.ipiExitEvent.bind(this));
- }
-
- // Matches the irq_handler_entry record
- var irqHandlerEntryRE = /irq=(\d+) name=(.+)/;
-
- // Matches the irq_handler_exit record
- var irqHandlerExitRE = /irq=(\d+) ret=(.+)/;
-
- // Matches the softirq_raise record
- var softirqRE = /vec=(\d+) \[action=(.+)\]/;
-
- // Matches the ipi_exit_
- var ipiHandlerExitRE = /\((.+)\)/;
-
- IrqParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parses irq events and sets up state in the mporter.
- */
- irqHandlerEntryEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = irqHandlerEntryRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var irq = parseInt(event[1]);
- var name = event[2];
-
- var thread = this.importer.getOrCreatePseudoThread(
- 'irqs cpu ' + cpuNumber);
- thread.lastEntryTs = ts;
- thread.irqName = name;
-
- return true;
- },
-
- irqHandlerExitEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = irqHandlerExitRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var irq = parseInt(event[1]);
- var ret = event[2];
- var thread = this.importer.getOrCreatePseudoThread(
- 'irqs cpu ' + cpuNumber);
-
- if (thread.lastEntryTs !== undefined) {
- var duration = ts - thread.lastEntryTs;
- var slice = new tr.model.ThreadSlice(
- '',
- 'IRQ (' + thread.irqName + ')',
- ColorScheme.getColorIdForGeneralPurposeString(event[1]),
- thread.lastEntryTs, { ret: ret },
- duration);
- thread.thread.sliceGroup.pushSlice(slice);
- }
- thread.lastEntryTs = undefined;
- thread.irqName = undefined;
- return true;
- },
-
- softirqRaiseEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- return true;
- },
-
- softirqEntryEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = softirqRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var action = event[2];
- var thread = this.importer.getOrCreatePseudoThread(
- 'softirq cpu ' + cpuNumber);
- thread.lastEntryTs = ts;
-
- return true;
- },
-
- softirqExitEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = softirqRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var vec = parseInt(event[1]);
- var action = event[2];
- var thread = this.importer.getOrCreatePseudoThread(
- 'softirq cpu ' + cpuNumber);
-
- if (thread.lastEntryTs !== undefined) {
- var duration = ts - thread.lastEntryTs;
- var slice = new tr.model.ThreadSlice(
- '', action,
- ColorScheme.getColorIdForGeneralPurposeString(event[1]),
- thread.lastEntryTs, { vec: vec },
- duration);
- thread.thread.sliceGroup.pushSlice(slice);
- }
- thread.lastEntryTs = undefined;
- return true;
- },
- /**
- * Parses ipi events and sets up state in the mporter.
- */
- ipiEntryEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var thread = this.importer.getOrCreatePseudoThread(
- 'irqs cpu ' + cpuNumber);
- thread.lastEntryTs = ts;
-
- return true;
- },
-
- ipiExitEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = ipiHandlerExitRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var ipiName = event[1];
- var thread = this.importer.getOrCreatePseudoThread(
- 'irqs cpu ' + cpuNumber);
-
- if (thread.lastEntryTs !== undefined) {
- var duration = ts - thread.lastEntryTs;
- var slice = new tr.model.ThreadSlice(
- '',
- 'IPI (' + ipiName + ')',
- ColorScheme.getColorIdForGeneralPurposeString(ipiName),
- thread.lastEntryTs,
- {},
- duration);
- thread.thread.sliceGroup.pushSlice(slice);
- }
- thread.lastEntryTs = undefined;
- return true;
- }
- };
-
- Parser.register(IrqParser);
-
- return {
- IrqParser: IrqParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser_test.html
deleted file mode 100644
index 647bd821e73..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/irq_parser_test.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('irqImport', function() {
- var lines = [
- ' kworker/u4:1-31907 (31907) [001] d.h3 14063.748288: ' +
- 'irq_handler_entry: irq=27 name=arch_timer',
- ' kworker/u4:1-31907 (31907) [001] dNh3 14063.748384: ' +
- 'irq_handler_exit: irq=27 ret=handled',
- ' kworker/u4:2-31908 (31908) [000] ..s3 14063.477231: ' +
- 'softirq_entry: vec=9 [action=RCU]',
- ' kworker/u4:2-31908 (31908) [000] ..s3 14063.477246: ' +
- 'softirq_exit: vec=9 [action=RCU]',
- ' RenderThread-2978 ( 2794) [002] dN.1 62828.421805: ' +
- 'ipi_entry: (Rescheduling interrupts)',
- ' RenderThread-2978 ( 2794) [002] dN.1 62828.421809: ' +
- 'ipi_exit: (Rescheduling interrupts)'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 3);
-
- var threads = m.findAllThreadsNamed('irqs cpu 1');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 1);
-
- var threads = m.findAllThreadsNamed('softirq cpu 0');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 1);
-
- var threads = m.findAllThreadsNamed('irqs cpu 2');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser.html
deleted file mode 100644
index 72dbc71e512..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses graph_ent and graph_ret events that were inserted by
- * the Linux kernel's function graph trace.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var LinuxPerfParser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses graph_ent and graph_ret events that were inserted by the Linux
- * kernel's function graph trace.
- * @constructor
- */
- function KernelFuncParser(importer) {
- LinuxPerfParser.call(this, importer);
-
- importer.registerEventHandler('graph_ent',
- KernelFuncParser.prototype.traceKernelFuncEnterEvent.
- bind(this));
- importer.registerEventHandler('graph_ret',
- KernelFuncParser.prototype.traceKernelFuncReturnEvent.
- bind(this));
-
- this.model_ = importer.model_;
- this.ppids_ = {};
- }
-
- var TestExports = {};
-
- var funcEnterRE = new RegExp('func=(.+)');
- TestExports.funcEnterRE = funcEnterRE;
-
- KernelFuncParser.prototype = {
- __proto__: LinuxPerfParser.prototype,
-
- traceKernelFuncEnterEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var eventData = funcEnterRE.exec(eventBase.details);
- if (!eventData)
- return false;
-
- if (eventBase.tgid === undefined) {
- return false;
- }
-
- var tgid = parseInt(eventBase.tgid);
- var name = eventData[1];
- var thread = this.model_.getOrCreateProcess(tgid)
- .getOrCreateThread(pid);
- thread.name = eventBase.threadName;
-
- var slices = thread.kernelSliceGroup;
- if (!slices.isTimestampValidForBeginOrEnd(ts)) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Timestamps are moving backward.'
- });
- return false;
- }
-
- var slice = slices.beginSlice(null, name, ts, {});
-
- return true;
- },
-
- traceKernelFuncReturnEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- if (eventBase.tgid === undefined) {
- return false;
- }
-
- var tgid = parseInt(eventBase.tgid);
- var thread = this.model_.getOrCreateProcess(tgid)
- .getOrCreateThread(pid);
- thread.name = eventBase.threadName;
-
- var slices = thread.kernelSliceGroup;
- if (!slices.isTimestampValidForBeginOrEnd(ts)) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Timestamps are moving backward.'
- });
- return false;
- }
-
- if (slices.openSliceCount > 0) {
- slices.endSlice(ts);
- }
-
- return true;
- }
- };
-
- LinuxPerfParser.register(KernelFuncParser);
-
- return {
- KernelFuncParser: KernelFuncParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser_test.html
deleted file mode 100644
index 5d7dfd67526..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/kfunc_parser_test.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('kernelFunctionParser', function() {
- var lines = [
- 'Binder_2-127 ( 127) [001] .... 3431.906759: graph_ent: func=sys_write',
- 'Binder_2-127 ( 127) [001] .... 3431.906769: graph_ret: func=sys_write',
- 'Binder_2-127 ( 127) [001] .... 3431.906785: graph_ent: func=sys_write',
- 'Binder_2-127 ( 127) [001] ...1 3431.906798: tracing_mark_write: B|' +
- '127|dequeueBuffer',
- 'Binder_2-127 ( 127) [001] .... 3431.906802: graph_ret: func=sys_write',
- 'Binder_2-127 ( 127) [001] .... 3431.906842: graph_ent: func=sys_write',
- 'Binder_2-127 ( 127) [001] ...1 3431.906849: tracing_mark_write: E',
- 'Binder_2-127 ( 127) [001] .... 3431.906853: graph_ret: func=sys_write',
- 'Binder_2-127 ( 127) [001] .... 3431.906896: graph_ent: func=sys_write',
- 'Binder_2-127 ( 127) [001] .... 3431.906906: graph_ret: func=sys_write'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var process = m.processes[127];
- assert.isDefined(process);
-
- var thread = process.threads[127];
- assert.isDefined(thread);
-
- var slices = thread.sliceGroup.slices;
- assert.equal(thread.sliceGroup.length, 7);
-
- // Slice 0 is an un-split sys_write
- assert.equal(slices[0].title, 'sys_write');
-
- // Slices 1 & 3 are a split sys_write
- assert.equal(slices[1].title, 'sys_write');
- assert.equal(slices[2].title, 'dequeueBuffer');
- assert.equal(slices[3].title, 'sys_write (cont.)');
-
- // Slices 4 & 5 are a split sys_write with the dequeueBuffer in between
- assert.equal(slices[4].title, 'sys_write');
- assert.equal(slices[5].title, 'sys_write (cont.)');
-
- // Slice 6 is another un-split sys_write
- assert.equal(slices[6].title, 'sys_write');
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser.html
deleted file mode 100644
index 7cba16fcf6d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser.html
+++ /dev/null
@@ -1,568 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses Mali DDK/kernel events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses Mali DDK/kernel trace events.
- * @constructor
- */
- function MaliParser(importer) {
- Parser.call(this, importer);
-
- // kernel DVFS events
- importer.registerEventHandler('mali_dvfs_event',
- MaliParser.prototype.dvfsEventEvent.bind(this));
- importer.registerEventHandler('mali_dvfs_set_clock',
- MaliParser.prototype.dvfsSetClockEvent.bind(this));
- importer.registerEventHandler('mali_dvfs_set_voltage',
- MaliParser.prototype.dvfsSetVoltageEvent.bind(this));
-
- // kernel Mali hw counter events
- this.addJMCounter('mali_hwc_MESSAGES_SENT', 'Messages Sent');
- this.addJMCounter('mali_hwc_MESSAGES_RECEIVED', 'Messages Received');
- this.addJMCycles('mali_hwc_GPU_ACTIVE', 'GPU Active');
- this.addJMCycles('mali_hwc_IRQ_ACTIVE', 'IRQ Active');
-
- for (var i = 0; i < 7; i++) {
- var jobStr = 'JS' + i;
- var jobHWCStr = 'mali_hwc_' + jobStr;
- this.addJMCounter(jobHWCStr + '_JOBS', jobStr + ' Jobs');
- this.addJMCounter(jobHWCStr + '_TASKS', jobStr + ' Tasks');
- this.addJMCycles(jobHWCStr + '_ACTIVE', jobStr + ' Active');
- this.addJMCycles(jobHWCStr + '_WAIT_READ', jobStr + ' Wait Read');
- this.addJMCycles(jobHWCStr + '_WAIT_ISSUE', jobStr + ' Wait Issue');
- this.addJMCycles(jobHWCStr + '_WAIT_DEPEND', jobStr + ' Wait Depend');
- this.addJMCycles(jobHWCStr + '_WAIT_FINISH', jobStr + ' Wait Finish');
- }
-
- this.addTilerCounter('mali_hwc_TRIANGLES', 'Triangles');
- this.addTilerCounter('mali_hwc_QUADS', 'Quads');
- this.addTilerCounter('mali_hwc_POLYGONS', 'Polygons');
- this.addTilerCounter('mali_hwc_POINTS', 'Points');
- this.addTilerCounter('mali_hwc_LINES', 'Lines');
- this.addTilerCounter('mali_hwc_VCACHE_HIT', 'VCache Hit');
- this.addTilerCounter('mali_hwc_VCACHE_MISS', 'VCache Miss');
- this.addTilerCounter('mali_hwc_FRONT_FACING', 'Front Facing');
- this.addTilerCounter('mali_hwc_BACK_FACING', 'Back Facing');
- this.addTilerCounter('mali_hwc_PRIM_VISIBLE', 'Prim Visible');
- this.addTilerCounter('mali_hwc_PRIM_CULLED', 'Prim Culled');
- this.addTilerCounter('mali_hwc_PRIM_CLIPPED', 'Prim Clipped');
-
- this.addTilerCounter('mali_hwc_WRBUF_HIT', 'Wrbuf Hit');
- this.addTilerCounter('mali_hwc_WRBUF_MISS', 'Wrbuf Miss');
- this.addTilerCounter('mali_hwc_WRBUF_LINE', 'Wrbuf Line');
- this.addTilerCounter('mali_hwc_WRBUF_PARTIAL', 'Wrbuf Partial');
- this.addTilerCounter('mali_hwc_WRBUF_STALL', 'Wrbuf Stall');
-
- this.addTilerCycles('mali_hwc_ACTIVE', 'Tiler Active');
- this.addTilerCycles('mali_hwc_INDEX_WAIT', 'Index Wait');
- this.addTilerCycles('mali_hwc_INDEX_RANGE_WAIT', 'Index Range Wait');
- this.addTilerCycles('mali_hwc_VERTEX_WAIT', 'Vertex Wait');
- this.addTilerCycles('mali_hwc_PCACHE_WAIT', 'Pcache Wait');
- this.addTilerCycles('mali_hwc_WRBUF_WAIT', 'Wrbuf Wait');
- this.addTilerCycles('mali_hwc_BUS_READ', 'Bus Read');
- this.addTilerCycles('mali_hwc_BUS_WRITE', 'Bus Write');
-
- this.addTilerCycles('mali_hwc_TILER_UTLB_STALL', 'Tiler UTLB Stall');
- this.addTilerCycles('mali_hwc_TILER_UTLB_HIT', 'Tiler UTLB Hit');
-
- this.addFragCycles('mali_hwc_FRAG_ACTIVE', 'Active');
- /* NB: don't propagate spelling mistakes to labels */
- this.addFragCounter('mali_hwc_FRAG_PRIMATIVES', 'Primitives');
- this.addFragCounter('mali_hwc_FRAG_PRIMATIVES_DROPPED',
- 'Primitives Dropped');
- this.addFragCycles('mali_hwc_FRAG_CYCLE_DESC', 'Descriptor Processing');
- this.addFragCycles('mali_hwc_FRAG_CYCLES_PLR', 'PLR Processing??');
- this.addFragCycles('mali_hwc_FRAG_CYCLES_VERT', 'Vertex Processing');
- this.addFragCycles('mali_hwc_FRAG_CYCLES_TRISETUP', 'Triangle Setup');
- this.addFragCycles('mali_hwc_FRAG_CYCLES_RAST', 'Rasterization???');
- this.addFragCounter('mali_hwc_FRAG_THREADS', 'Threads');
- this.addFragCounter('mali_hwc_FRAG_DUMMY_THREADS', 'Dummy Threads');
- this.addFragCounter('mali_hwc_FRAG_QUADS_RAST', 'Quads Rast');
- this.addFragCounter('mali_hwc_FRAG_QUADS_EZS_TEST', 'Quads EZS Test');
- this.addFragCounter('mali_hwc_FRAG_QUADS_EZS_KILLED', 'Quads EZS Killed');
- this.addFragCounter('mali_hwc_FRAG_QUADS_LZS_TEST', 'Quads LZS Test');
- this.addFragCounter('mali_hwc_FRAG_QUADS_LZS_KILLED', 'Quads LZS Killed');
- this.addFragCycles('mali_hwc_FRAG_CYCLE_NO_TILE', 'No Tiles');
- this.addFragCounter('mali_hwc_FRAG_NUM_TILES', 'Tiles');
- this.addFragCounter('mali_hwc_FRAG_TRANS_ELIM', 'Transactions Eliminated');
-
- this.addComputeCycles('mali_hwc_COMPUTE_ACTIVE', 'Active');
- this.addComputeCounter('mali_hwc_COMPUTE_TASKS', 'Tasks');
- this.addComputeCounter('mali_hwc_COMPUTE_THREADS', 'Threads Started');
- this.addComputeCycles('mali_hwc_COMPUTE_CYCLES_DESC',
- 'Waiting for Descriptors');
-
- this.addTripipeCycles('mali_hwc_TRIPIPE_ACTIVE', 'Active');
-
- this.addArithCounter('mali_hwc_ARITH_WORDS', 'Instructions (/Pipes)');
- this.addArithCycles('mali_hwc_ARITH_CYCLES_REG',
- 'Reg scheduling stalls (/Pipes)');
- this.addArithCycles('mali_hwc_ARITH_CYCLES_L0',
- 'L0 cache miss stalls (/Pipes)');
- this.addArithCounter('mali_hwc_ARITH_FRAG_DEPEND',
- 'Frag dep check failures (/Pipes)');
-
- this.addLSCounter('mali_hwc_LS_WORDS', 'Instruction Words Completed');
- this.addLSCounter('mali_hwc_LS_ISSUES', 'Full Pipeline Issues');
- this.addLSCounter('mali_hwc_LS_RESTARTS', 'Restarts (unpairable insts)');
- this.addLSCounter('mali_hwc_LS_REISSUES_MISS',
- 'Pipeline reissue (cache miss/uTLB)');
- this.addLSCounter('mali_hwc_LS_REISSUES_VD',
- 'Pipeline reissue (varying data)');
- /* TODO(sleffler) fix kernel event typo */
- this.addLSCounter('mali_hwc_LS_REISSUE_ATTRIB_MISS',
- 'Pipeline reissue (attribute cache miss)');
- this.addLSCounter('mali_hwc_LS_REISSUE_NO_WB', 'Writeback not used');
-
- this.addTexCounter('mali_hwc_TEX_WORDS', 'Words');
- this.addTexCounter('mali_hwc_TEX_BUBBLES', 'Bubbles');
- this.addTexCounter('mali_hwc_TEX_WORDS_L0', 'Words L0');
- this.addTexCounter('mali_hwc_TEX_WORDS_DESC', 'Words Desc');
- this.addTexCounter('mali_hwc_TEX_THREADS', 'Threads');
- this.addTexCounter('mali_hwc_TEX_RECIRC_FMISS', 'Recirc due to Full Miss');
- this.addTexCounter('mali_hwc_TEX_RECIRC_DESC', 'Recirc due to Desc Miss');
- this.addTexCounter('mali_hwc_TEX_RECIRC_MULTI', 'Recirc due to Multipass');
- this.addTexCounter('mali_hwc_TEX_RECIRC_PMISS',
- 'Recirc due to Partial Cache Miss');
- this.addTexCounter('mali_hwc_TEX_RECIRC_CONF',
- 'Recirc due to Cache Conflict');
-
- this.addLSCCounter('mali_hwc_LSC_READ_HITS', 'Read Hits');
- this.addLSCCounter('mali_hwc_LSC_READ_MISSES', 'Read Misses');
- this.addLSCCounter('mali_hwc_LSC_WRITE_HITS', 'Write Hits');
- this.addLSCCounter('mali_hwc_LSC_WRITE_MISSES', 'Write Misses');
- this.addLSCCounter('mali_hwc_LSC_ATOMIC_HITS', 'Atomic Hits');
- this.addLSCCounter('mali_hwc_LSC_ATOMIC_MISSES', 'Atomic Misses');
- this.addLSCCounter('mali_hwc_LSC_LINE_FETCHES', 'Line Fetches');
- this.addLSCCounter('mali_hwc_LSC_DIRTY_LINE', 'Dirty Lines');
- this.addLSCCounter('mali_hwc_LSC_SNOOPS', 'Snoops');
-
- this.addAXICounter('mali_hwc_AXI_TLB_STALL', 'Address channel stall');
- this.addAXICounter('mali_hwc_AXI_TLB_MISS', 'Cache Miss');
- this.addAXICounter('mali_hwc_AXI_TLB_TRANSACTION', 'Transactions');
- this.addAXICounter('mali_hwc_LS_TLB_MISS', 'LS Cache Miss');
- this.addAXICounter('mali_hwc_LS_TLB_HIT', 'LS Cache Hit');
- this.addAXICounter('mali_hwc_AXI_BEATS_READ', 'Read Beats');
- this.addAXICounter('mali_hwc_AXI_BEATS_WRITE', 'Write Beats');
-
- this.addMMUCounter('mali_hwc_MMU_TABLE_WALK', 'Page Table Walks');
- this.addMMUCounter('mali_hwc_MMU_REPLAY_MISS',
- 'Cache Miss from Replay Buffer');
- this.addMMUCounter('mali_hwc_MMU_REPLAY_FULL', 'Replay Buffer Full');
- this.addMMUCounter('mali_hwc_MMU_NEW_MISS', 'Cache Miss on New Request');
- this.addMMUCounter('mali_hwc_MMU_HIT', 'Cache Hit');
-
- this.addMMUCycles('mali_hwc_UTLB_STALL', 'UTLB Stalled');
- this.addMMUCycles('mali_hwc_UTLB_REPLAY_MISS', 'UTLB Replay Miss');
- this.addMMUCycles('mali_hwc_UTLB_REPLAY_FULL', 'UTLB Replay Full');
- this.addMMUCycles('mali_hwc_UTLB_NEW_MISS', 'UTLB New Miss');
- this.addMMUCycles('mali_hwc_UTLB_HIT', 'UTLB Hit');
-
- this.addL2Counter('mali_hwc_L2_READ_BEATS', 'Read Beats');
- this.addL2Counter('mali_hwc_L2_WRITE_BEATS', 'Write Beats');
- this.addL2Counter('mali_hwc_L2_ANY_LOOKUP', 'Any Lookup');
- this.addL2Counter('mali_hwc_L2_READ_LOOKUP', 'Read Lookup');
- this.addL2Counter('mali_hwc_L2_SREAD_LOOKUP', 'Shareable Read Lookup');
- this.addL2Counter('mali_hwc_L2_READ_REPLAY', 'Read Replayed');
- this.addL2Counter('mali_hwc_L2_READ_SNOOP', 'Read Snoop');
- this.addL2Counter('mali_hwc_L2_READ_HIT', 'Read Cache Hit');
- this.addL2Counter('mali_hwc_L2_CLEAN_MISS', 'CleanUnique Miss');
- this.addL2Counter('mali_hwc_L2_WRITE_LOOKUP', 'Write Lookup');
- this.addL2Counter('mali_hwc_L2_SWRITE_LOOKUP', 'Shareable Write Lookup');
- this.addL2Counter('mali_hwc_L2_WRITE_REPLAY', 'Write Replayed');
- this.addL2Counter('mali_hwc_L2_WRITE_SNOOP', 'Write Snoop');
- this.addL2Counter('mali_hwc_L2_WRITE_HIT', 'Write Cache Hit');
- this.addL2Counter('mali_hwc_L2_EXT_READ_FULL', 'ExtRD with BIU Full');
- this.addL2Counter('mali_hwc_L2_EXT_READ_HALF', 'ExtRD with BIU >1/2 Full');
- this.addL2Counter('mali_hwc_L2_EXT_WRITE_FULL', 'ExtWR with BIU Full');
- this.addL2Counter('mali_hwc_L2_EXT_WRITE_HALF', 'ExtWR with BIU >1/2 Full');
-
- this.addL2Counter('mali_hwc_L2_EXT_READ', 'External Read (ExtRD)');
- this.addL2Counter('mali_hwc_L2_EXT_READ_LINE', 'ExtRD (linefill)');
- this.addL2Counter('mali_hwc_L2_EXT_WRITE', 'External Write (ExtWR)');
- this.addL2Counter('mali_hwc_L2_EXT_WRITE_LINE', 'ExtWR (linefill)');
- this.addL2Counter('mali_hwc_L2_EXT_WRITE_SMALL', 'ExtWR (burst size <64B)');
- this.addL2Counter('mali_hwc_L2_EXT_BARRIER', 'External Barrier');
- this.addL2Counter('mali_hwc_L2_EXT_AR_STALL', 'Address Read stalls');
- this.addL2Counter('mali_hwc_L2_EXT_R_BUF_FULL',
- 'Response Buffer full stalls');
- this.addL2Counter('mali_hwc_L2_EXT_RD_BUF_FULL',
- 'Read Data Buffer full stalls');
- this.addL2Counter('mali_hwc_L2_EXT_R_RAW', 'RAW hazard stalls');
- this.addL2Counter('mali_hwc_L2_EXT_W_STALL', 'Write Data stalls');
- this.addL2Counter('mali_hwc_L2_EXT_W_BUF_FULL', 'Write Data Buffer full');
- this.addL2Counter('mali_hwc_L2_EXT_R_W_HAZARD', 'WAW or WAR hazard stalls');
- this.addL2Counter('mali_hwc_L2_TAG_HAZARD', 'Tag hazard replays');
- this.addL2Cycles('mali_hwc_L2_SNOOP_FULL', 'Snoop buffer full');
- this.addL2Cycles('mali_hwc_L2_REPLAY_FULL', 'Replay buffer full');
-
- // DDK events (from X server)
- importer.registerEventHandler('tracing_mark_write:mali_driver',
- MaliParser.prototype.maliDDKEvent.bind(this));
-
- this.model_ = importer.model_;
- }
-
- MaliParser.prototype = {
- __proto__: Parser.prototype,
-
- maliDDKOpenSlice: function(pid, tid, ts, func, blockinfo) {
- var thread = this.importer.model_.getOrCreateProcess(pid)
- .getOrCreateThread(tid);
- var funcArgs = /^([\w\d_]*)(?:\(\))?:?\s*(.*)$/.exec(func);
- thread.sliceGroup.beginSlice('gpu-driver', funcArgs[1], ts,
- { 'args': funcArgs[2],
- 'blockinfo': blockinfo });
- },
-
- maliDDKCloseSlice: function(pid, tid, ts, args, blockinfo) {
- var thread = this.importer.model_.getOrCreateProcess(pid)
- .getOrCreateThread(tid);
- if (!thread.sliceGroup.openSliceCount) {
- // Discard unmatched ends.
- return;
- }
- thread.sliceGroup.endSlice(ts);
- },
-
- /**
- * Deduce the format of Mali perf events.
- *
- * @return {RegExp} the regular expression for parsing data when the format
- * is recognized; otherwise null.
- */
- autoDetectLineRE: function(line) {
- // Matches Mali perf events with thread info
- var lineREWithThread =
- /^\s*\(([\w\-]*)\)\s*(\w+):\s*([\w\\\/\.\-]*@\d*):?\s*(.*)$/;
- if (lineREWithThread.test(line))
- return lineREWithThread;
-
- // Matches old-style Mali perf events
- var lineRENoThread = /^s*()(\w+):\s*([\w\\\/.\-]*):?\s*(.*)$/;
- if (lineRENoThread.test(line))
- return lineRENoThread;
- return null;
- },
-
- lineRE: null,
-
- /**
- * Parses maliDDK events and sets up state in the importer.
- * events will come in pairs with a cros_trace_print_enter
- * like this (line broken here for formatting):
- *
- * tracing_mark_write: mali_driver: (mali-012345) cros_trace_print_enter: \
- * gles/src/texture/mali_gles_texture_slave.c@1505: gles2_texturep_upload
- *
- * and a cros_trace_print_exit like this:
- *
- * tracing_mark_write: mali_driver: (mali-012345) cros_trace_print_exit: \
- * gles/src/texture/mali_gles_texture_slave.c@1505:
- */
- maliDDKEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- if (this.lineRE === null) {
- this.lineRE = this.autoDetectLineRE(eventBase.details);
- if (this.lineRE === null)
- return false;
- }
- var maliEvent = this.lineRE.exec(eventBase.details);
- // Old-style Mali perf events have no thread id, so make one.
- var tid = (maliEvent[1] === '' ? 'mali' : maliEvent[1]);
- switch (maliEvent[2]) {
- case 'cros_trace_print_enter':
- this.maliDDKOpenSlice(pid, tid, ts, maliEvent[4],
- maliEvent[3]);
- break;
- case 'cros_trace_print_exit':
- this.maliDDKCloseSlice(pid, tid, ts, [], maliEvent[3]);
- }
- return true;
- },
-
- /*
- * Kernel event support.
- */
-
- dvfsSample: function(counterName, seriesName, ts, s) {
- var value = parseInt(s);
- var counter = this.model_.kernel.
- getOrCreateCounter('DVFS', counterName);
- if (counter.numSeries === 0) {
- counter.addSeries(new tr.model.CounterSeries(seriesName,
- ColorScheme.getColorIdForGeneralPurposeString(counter.name)));
- }
- counter.series.forEach(function(series) {
- series.addCounterSample(ts, value);
- });
- },
-
- dvfsEventEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /utilization=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- this.dvfsSample('DVFS Utilization', 'utilization', ts, event[1]);
- return true;
- },
-
- dvfsSetClockEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /frequency=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- this.dvfsSample('DVFS Frequency', 'frequency', ts, event[1]);
- return true;
- },
-
- dvfsSetVoltageEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /voltage=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- this.dvfsSample('DVFS Voltage', 'voltage', ts, event[1]);
- return true;
- },
-
- hwcSample: function(cat, counterName, seriesName, ts, eventBase) {
- var event = /val=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
- var value = parseInt(event[1]);
-
- var counter = this.model_.kernel.
- getOrCreateCounter(cat, counterName);
- if (counter.numSeries === 0) {
- counter.addSeries(new tr.model.CounterSeries(seriesName,
- ColorScheme.getColorIdForGeneralPurposeString(counter.name)));
- }
- counter.series.forEach(function(series) {
- series.addCounterSample(ts, value);
- });
- return true;
- },
-
- /*
- * Job Manager block counters.
- */
- jmSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:jm', 'JM: ' + ctrName, seriesName, ts,
- eventBase);
- },
- addJMCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.jmSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addJMCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.jmSample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Tiler block counters.
- */
- tilerSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:tiler', 'Tiler: ' + ctrName, seriesName,
- ts, eventBase);
- },
- addTilerCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.tilerSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addTilerCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.tilerSample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Fragment counters.
- */
- fragSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:fragment', 'Fragment: ' + ctrName,
- seriesName, ts, eventBase);
- },
- addFragCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.fragSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addFragCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.fragSample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Compute counters.
- */
- computeSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:compute', 'Compute: ' + ctrName,
- seriesName, ts, eventBase);
- },
- addComputeCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.computeSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addComputeCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.computeSample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Tripipe counters.
- */
- addTripipeCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.hwcSample('mali:shader', 'Tripipe: ' + hwcTitle, 'cycles',
- ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Arith counters.
- */
- arithSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:arith', 'Arith: ' + ctrName, seriesName, ts,
- eventBase);
- },
- addArithCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.arithSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addArithCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.arithSample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Load/Store counters.
- */
- addLSCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.hwcSample('mali:ls', 'LS: ' + hwcTitle, 'count', ts,
- eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * Texture counters.
- */
- textureSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:texture', 'Texture: ' + ctrName,
- seriesName, ts, eventBase);
- },
- addTexCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.textureSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * LSC counters.
- */
- addLSCCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.hwcSample('mali:lsc', 'LSC: ' + hwcTitle, 'count', ts,
- eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * TLB counters.
- */
- addAXICounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.hwcSample('mali:axi', 'AXI: ' + hwcTitle, 'count', ts,
- eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * MMU counters.
- */
- mmuSample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:mmu', 'MMU: ' + ctrName, seriesName, ts,
- eventBase);
- },
- addMMUCounter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.mmuSample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addMMUCycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.mmuSample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
-
- /*
- * L2 counters.
- */
- l2Sample: function(ctrName, seriesName, ts, eventBase) {
- return this.hwcSample('mali:l2', 'L2: ' + ctrName, seriesName, ts,
- eventBase);
- },
- addL2Counter: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.l2Sample(hwcTitle, 'count', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- },
- addL2Cycles: function(hwcEventName, hwcTitle) {
- function handler(eventName, cpuNumber, pid, ts, eventBase) {
- return this.l2Sample(hwcTitle, 'cycles', ts, eventBase);
- }
- this.importer.registerEventHandler(hwcEventName, handler.bind(this));
- }
- };
-
- Parser.register(MaliParser);
-
- return {
- MaliParser: MaliParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser_test.html
deleted file mode 100644
index be19c73896f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/mali_parser_test.html
+++ /dev/null
@@ -1,485 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('maliDDKImport', function() {
- var linesNoThread = [
- // Row 1 open
- ' chrome-1780 [001] ...1 28.562633: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'gles/src/dispatch/mali_gles_dispatch_entrypoints.c992: ' +
- 'glTexSubImage2D',
- // Row 2 open
- ' chrome-1780 [001] ...1 28.562655: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_api.c996: ' +
- 'gles_texture_tex_sub_image_2d',
- // Row 3 open
- ' chrome-1780 [001] ...1 28.562671: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_slave.c295: ' +
- 'gles_texturep_slave_map_master',
- // Row 3 close
- ' chrome-1780 [001] ...1 28.562684: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_slave.c295: ',
- // Row 3 open
- ' chrome-1780 [001] ...1 28.562700: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_slave.c1505: ' +
- 'gles2_texturep_upload_2d',
- // Row 4 open
- ' chrome-1780 [001] ...1 28.562726: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_slave.c1612: ' +
- 'gles2_texturep_upload_2d: pixel array: wait for dependencies',
- // Row 5 open
- ' chrome-1780 [001] ...1 28.562742: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c1693: ' +
- 'cobj_convert_pixels_to_surface',
- // Row 6 open
- ' chrome-1780 [001] ...1 28.562776: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c1461: ' +
- 'cobj_convert_pixels',
- // Row 7 open
- ' chrome-1780 [001] ...1 28.562791: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c1505: ' +
- 'cobj_convert_pixels: fast-path linear copy',
- // Row 8 open
- ' chrome-1780 [001] ...1 28.562808: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c1511: ' +
- 'cobj_convert_pixels: reorder-only',
- // Row 8 close
- ' chrome-1780 [001] ...1 28.563383: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c1511',
- // Row 7 close
- ' chrome-1780 [001] ...1 28.563397: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c1505',
- // Row 6 close
- ' chrome-1780 [001] ...1 28.563409: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c1461',
- // Row 5 close
- ' chrome-1780 [001] ...1 28.563438: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c1693',
- // Row 4 close
- ' chrome-1780 [001] ...1 28.563451: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_slave.c1612',
- // Row 3 close
- ' chrome-1780 [001] ...1 28.563462: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_slave.c1505',
- // Row 2 close
- ' chrome-1780 [001] ...1 28.563475: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_api.c996',
- // Row 1 close
- ' chrome-1780 [001] ...1 28.563486: tracing_mark_write: ' +
- 'mali_driver: cros_trace_print_exit: ' +
- 'gles/src/dispatch/mali_gles_dispatch_entrypoints.c992'
- ];
-
- var linesWithThread = [
- // Row 1 open
- ' chrome-1780 [001] ...1 28.562633: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'gles/src/dispatch/mali_gles_dispatch_entrypoints.c@992: ' +
- 'glTexSubImage2D',
- // Row 2 open
- ' chrome-1780 [001] ...1 28.562655: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_api.c@996: ' +
- 'gles_texture_tex_sub_image_2d',
- // Row 3 open
- ' chrome-1780 [001] ...1 28.562671: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_slave.c@295: ' +
- 'gles_texturep_slave_map_master',
- // Row 3 close
- ' chrome-1780 [001] ...1 28.562684: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_slave.c@295: ',
- // Row 3 open
- ' chrome-1780 [001] ...1 28.562700: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_slave.c@1505: ' +
- 'gles2_texturep_upload_2d',
- // Row 4 open
- ' chrome-1780 [001] ...1 28.562726: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'gles/src/texture/mali_gles_texture_slave.c@1612: ' +
- 'gles2_texturep_upload_2d: pixel array: wait for dependencies',
- // Row 5 open
- ' chrome-1780 [001] ...1 28.562742: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1693: ' +
- 'cobj_convert_pixels_to_surface',
- // Row 6 open
- ' chrome-1780 [001] ...1 28.562776: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1461: ' +
- 'cobj_convert_pixels',
- // Row 7 open
- ' chrome-1780 [001] ...1 28.562791: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1505: ' +
- 'cobj_convert_pixels: fast-path linear copy',
- // Row 8 open
- ' chrome-1780 [001] ...1 28.562808: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_enter: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1511: ' +
- 'cobj_convert_pixels: reorder-only',
- // Row 8 close
- ' chrome-1780 [001] ...1 28.563383: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1511',
- // Row 7 close
- ' chrome-1780 [001] ...1 28.563397: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1505',
- // Row 6 close
- ' chrome-1780 [001] ...1 28.563409: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1461',
- // Row 5 close
- ' chrome-1780 [001] ...1 28.563438: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'cobj/src/mali_cobj_surface_operations.c@1693',
- // Row 4 close
- ' chrome-1780 [001] ...1 28.563451: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_slave.c@1612',
- // Row 3 close
- ' chrome-1780 [001] ...1 28.563462: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_slave.c@1505',
- // Row 2 close
- ' chrome-1780 [001] ...1 28.563475: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'gles/src/texture/mali_gles_texture_api.c@996',
- // Row 1 close
- ' chrome-1780 [001] ...1 28.563486: tracing_mark_write: ' +
- 'mali_driver: (mali-1878934320) cros_trace_print_exit: ' +
- 'gles/src/dispatch/mali_gles_dispatch_entrypoints.c@992'
- ];
- var traceNoThread = newModel(linesNoThread.join('\n'));
- var traceWithThread = newModel(linesWithThread.join('\n'));
- assert.isFalse(traceNoThread.hasImportWarnings);
- assert.isFalse(traceWithThread.hasImportWarnings);
-
- var threadsNoThread = traceNoThread.getAllThreads();
- var threadsWithThread = traceWithThread.getAllThreads();
- assert.equal(threadsNoThread.length, 1);
- assert.equal(threadsWithThread.length, 1);
-
- var maliThreadNoThread = threadsNoThread[0];
- var maliThreadWithThread = threadsWithThread[0];
- assert.equal(maliThreadNoThread.tid, 'mali');
- assert.equal(maliThreadWithThread.tid, 'mali-1878934320');
- assert.equal(maliThreadNoThread.sliceGroup.length, 9);
- assert.equal(maliThreadWithThread.sliceGroup.length, 9);
- });
-
- test('DVFSFrequencyImport', function() {
- var lines = [
- ' kworker/u:0-5 [001] .... 1174.839552: mali_dvfs_set_clock: ' +
- 'frequency=266',
- ' kworker/u:0-5 [000] .... 1183.840486: mali_dvfs_set_clock: ' +
- 'frequency=400'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 1);
-
- var c0 = counters[0];
- assert.equal(c0.name, 'DVFS Frequency');
- assert.equal(c0.series[0].samples.length, 2);
- });
-
- test('DVFSVoltageImport', function() {
- var lines = [
- ' kworker/u:0-5 [001] .... 1174.839562: mali_dvfs_set_voltage: ' +
- 'voltage=937500',
- ' kworker/u:0-5 [000] .... 1183.840009: mali_dvfs_set_voltage: ' +
- 'voltage=1100000'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 1);
-
- var c0 = counters[0];
- assert.equal(c0.name, 'DVFS Voltage');
- assert.equal(c0.series[0].samples.length, 2);
- });
-
- test('DVFSUtilizationImport', function() {
- var lines = [
- ' kworker/u:0-5 [001] .... 1174.839552: mali_dvfs_event: ' +
- 'utilization=7',
- ' kworker/u:0-5 [000] .... 1183.840486: mali_dvfs_event: ' +
- 'utilization=37'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 1);
-
- var c0 = counters[0];
- assert.equal(c0.name, 'DVFS Utilization');
- assert.equal(c0.series[0].samples.length, 2);
- });
-
- test('maliHWCImport', function() {
- var lines = [
- ' kworker/u:0-5 [000] .... 78.896588: ' +
- 'mali_hwc_ACTIVE: val=238',
- ' kworker/u:0-5 [000] .... 79.046889: ' +
- 'mali_hwc_ARITH_CYCLES_L0: val=1967',
- ' kworker/u:0-5 [000] .... 79.046888: ' +
- 'mali_hwc_ARITH_CYCLES_REG: val=136',
- ' kworker/u:0-5 [000] .... 79.046890: ' +
- 'mali_hwc_ARITH_FRAG_DEPEND: val=19676',
- ' kworker/u:0-5 [000] .... 79.046886: ' +
- 'mali_hwc_ARITH_WORDS: val=255543',
- ' kworker/u:0-5 [000] .... 79.046920: ' +
- 'mali_hwc_AXI_BEATS_READ: val=257053',
- ' kworker/u:0-5 [000] .... 78.896594: ' +
- 'mali_hwc_AXI_TLB_STALL: val=1',
- ' kworker/u:0-5 [000] .... 78.946646: ' +
- 'mali_hwc_AXI_TLB_TRANSACTION: val=4',
- ' kworker/u:0-5 [000] .... 79.046853: ' +
- 'mali_hwc_BACK_FACING: val=104',
- ' kworker/u:0-5 [000] .... 79.046880: ' +
- 'mali_hwc_COMPUTE_ACTIVE: val=17462',
- ' kworker/u:0-5 [000] .... 79.046884: ' +
- 'mali_hwc_COMPUTE_CYCLES_DESC: val=3933',
- ' kworker/u:0-5 [000] .... 79.046881: ' +
- 'mali_hwc_COMPUTE_TASKS: val=15',
- ' kworker/u:0-5 [000] .... 79.046883: ' +
- 'mali_hwc_COMPUTE_THREADS: val=60',
- ' kworker/u:0-5 [000] .... 79.046860: ' +
- 'mali_hwc_FRAG_ACTIVE: val=690986',
- ' kworker/u:0-5 [000] .... 79.046864: ' +
- 'mali_hwc_FRAG_CYCLE_DESC: val=13980',
- ' kworker/u:0-5 [000] .... 79.046876: ' +
- 'mali_hwc_FRAG_CYCLE_NO_TILE: val=3539',
- ' kworker/u:0-5 [000] .... 79.046865: ' +
- 'mali_hwc_FRAG_CYCLES_PLR: val=1499',
- ' kworker/u:0-5 [000] .... 79.046869: ' +
- 'mali_hwc_FRAG_CYCLES_RAST: val=1999',
- ' kworker/u:0-5 [000] .... 79.046868: ' +
- 'mali_hwc_FRAG_CYCLES_TRISETUP: val=22353',
- ' kworker/u:0-5 [000] .... 79.046867: ' +
- 'mali_hwc_FRAG_CYCLES_VERT: val=20763',
- ' kworker/u:0-5 [000] .... 79.046872: ' +
- 'mali_hwc_FRAG_DUMMY_THREADS: val=1968',
- ' kworker/u:0-5 [000] .... 79.046877: ' +
- 'mali_hwc_FRAG_NUM_TILES: val=1840',
- ' kworker/u:0-5 [000] .... 79.046862: ' +
- 'mali_hwc_FRAG_PRIMATIVES: val=3752',
- ' kworker/u:0-5 [000] .... 79.046863: ' +
- 'mali_hwc_FRAG_PRIMATIVES_DROPPED: val=18',
- ' kworker/u:0-5 [000] .... 79.046874: ' +
- 'mali_hwc_FRAG_QUADS_EZS_TEST: val=117925',
- ' kworker/u:0-5 [000] .... 79.046873: ' +
- 'mali_hwc_FRAG_QUADS_RAST: val=117889',
- ' kworker/u:0-5 [000] .... 79.046870: ' +
- 'mali_hwc_FRAG_THREADS: val=471507',
- ' kworker/u:0-5 [000] .... 79.046879: ' +
- 'mali_hwc_FRAG_TRANS_ELIM: val=687',
- ' kworker/u:0-5 [000] .... 80.315162: ' +
- 'mali_hwc_FRONT_FACING: val=56',
- ' kworker/u:0-5 [000] .... 78.896582: ' +
- 'mali_hwc_GPU_ACTIVE: val=1316',
- ' kworker/u:0-5 [000] .... 78.896584: ' +
- 'mali_hwc_IRQ_ACTIVE: val=17',
- ' kworker/u:0-5 [000] .... 79.046834: ' +
- 'mali_hwc_JS0_ACTIVE: val=709444',
- ' kworker/u:0-5 [000] .... 79.046831: ' +
- 'mali_hwc_JS0_JOBS: val=2',
- ' kworker/u:0-5 [000] .... 79.046832: ' +
- 'mali_hwc_JS0_TASKS: val=7263',
- ' kworker/u:0-5 [000] .... 79.046836: ' +
- 'mali_hwc_JS0_WAIT_DEPEND: val=665876',
- ' kworker/u:0-5 [000] .... 79.046835: ' +
- 'mali_hwc_JS0_WAIT_ISSUE: val=910',
- ' kworker/u:0-5 [000] .... 79.046840: ' +
- 'mali_hwc_JS1_ACTIVE: val=153980',
- ' kworker/u:0-5 [000] .... 79.046838: ' +
- 'mali_hwc_JS1_JOBS: val=133',
- ' kworker/u:0-5 [000] .... 79.046839: ' +
- 'mali_hwc_JS1_TASKS: val=128',
- ' kworker/u:0-5 [000] .... 79.046843: ' +
- 'mali_hwc_JS1_WAIT_FINISH: val=74404',
- ' kworker/u:0-5 [000] .... 79.046842: ' +
- 'mali_hwc_JS1_WAIT_ISSUE: val=10146',
- ' kworker/u:0-5 [000] .... 78.896603: ' +
- 'mali_hwc_L2_ANY_LOOKUP: val=22',
- ' kworker/u:0-5 [000] .... 79.046942: ' +
- 'mali_hwc_L2_CLEAN_MISS: val=116',
- ' kworker/u:0-5 [000] .... 79.063515: ' +
- 'mali_hwc_L2_EXT_AR_STALL: val=9',
- ' kworker/u:0-5 [000] .... 78.963384: ' +
- 'mali_hwc_L2_EXT_BARRIER: val=1',
- ' kworker/u:0-5 [000] .... 79.063516: ' +
- 'mali_hwc_L2_EXT_R_BUF_FULL: val=43',
- ' kworker/u:0-5 [000] .... 78.896611: ' +
- 'mali_hwc_L2_EXT_READ: val=4',
- ' kworker/u:0-5 [000] .... 78.896612: ' +
- 'mali_hwc_L2_EXT_READ_LINE: val=4',
- ' kworker/u:0-5 [000] .... 79.046956: ' +
- 'mali_hwc_L2_EXT_R_RAW: val=1',
- ' kworker/u:0-5 [000] .... 79.063518: ' +
- 'mali_hwc_L2_EXT_R_W_HAZARD: val=15',
- ' kworker/u:0-5 [000] .... 78.963381: ' +
- 'mali_hwc_L2_EXT_WRITE: val=25',
- ' kworker/u:0-5 [000] .... 79.046952: ' +
- 'mali_hwc_L2_EXT_WRITE_LINE: val=63278',
- ' kworker/u:0-5 [000] .... 78.963382: ' +
- 'mali_hwc_L2_EXT_WRITE_SMALL: val=1',
- ' kworker/u:0-5 [000] .... 79.814532: ' +
- 'mali_hwc_L2_EXT_W_STALL: val=9',
- ' kworker/u:0-5 [000] .... 78.896602: ' +
- 'mali_hwc_L2_READ_BEATS: val=16',
- ' kworker/u:0-5 [000] .... 78.896607: ' +
- 'mali_hwc_L2_READ_HIT: val=11',
- ' kworker/u:0-5 [000] .... 78.896604: ' +
- 'mali_hwc_L2_READ_LOOKUP: val=19',
- ' kworker/u:0-5 [000] .... 78.896606: ' +
- 'mali_hwc_L2_READ_REPLAY: val=2',
- ' kworker/u:0-5 [000] .... 79.046940: ' +
- 'mali_hwc_L2_READ_SNOOP: val=24',
- ' kworker/u:0-5 [000] .... 79.046959: ' +
- 'mali_hwc_L2_REPLAY_FULL: val=6629',
- ' kworker/u:0-5 [000] .N.. 80.565684: ' +
- 'mali_hwc_L2_SNOOP_FULL: val=5',
- ' kworker/u:0-5 [000] .... 79.046937: ' +
- 'mali_hwc_L2_SREAD_LOOKUP: val=241',
- ' kworker/u:0-5 [000] .... 79.046944: ' +
- 'mali_hwc_L2_SWRITE_LOOKUP: val=133',
- ' kworker/u:0-5 [000] .... 78.896614: ' +
- 'mali_hwc_L2_TAG_HAZARD: val=4',
- ' kworker/u:0-5 [000] .... 78.963368: ' +
- 'mali_hwc_L2_WRITE_BEATS: val=96',
- ' kworker/u:0-5 [000] .... 79.046947: ' +
- 'mali_hwc_L2_WRITE_HIT: val=78265',
- ' kworker/u:0-5 [000] .... 78.896608: ' +
- 'mali_hwc_L2_WRITE_LOOKUP: val=3',
- ' kworker/u:0-5 [000] .... 79.046946: ' +
- 'mali_hwc_L2_WRITE_REPLAY: val=15879',
- ' kworker/u:0-5 [000] .... 79.046912: ' +
- 'mali_hwc_LSC_LINE_FETCHES: val=15',
- ' kworker/u:0-5 [000] .... 79.046909: ' +
- 'mali_hwc_LSC_READ_HITS: val=2961',
- ' kworker/u:0-5 [000] .... 79.046911: ' +
- 'mali_hwc_LSC_READ_MISSES: val=22',
- ' kworker/u:0-5 [000] .... 79.046914: ' +
- 'mali_hwc_LSC_SNOOPS: val=10',
- ' kworker/u:0-5 [000] .... 79.046893: ' +
- 'mali_hwc_LS_ISSUES: val=524219',
- ' kworker/u:0-5 [000] .... 79.046894: ' +
- 'mali_hwc_LS_REISSUES_MISS: val=439',
- ' kworker/u:0-5 [000] .... 79.046895: ' +
- 'mali_hwc_LS_REISSUES_VD: val=52007',
- ' kworker/u:0-5 [000] .... 79.046919: ' +
- 'mali_hwc_LS_TLB_HIT: val=3043',
- ' kworker/u:0-5 [000] .... 79.046918: ' +
- 'mali_hwc_LS_TLB_MISS: val=5',
- ' kworker/u:0-5 [000] .... 79.046891: ' +
- 'mali_hwc_LS_WORDS: val=471514',
- ' kworker/u:0-5 [000] .... 79.046925: ' +
- 'mali_hwc_MMU_HIT: val=771',
- ' kworker/u:0-5 [000] .... 79.046924: ' +
- 'mali_hwc_MMU_NEW_MISS: val=494',
- ' kworker/u:0-5 [000] .... 79.046922: ' +
- 'mali_hwc_MMU_REPLAY_MISS: val=841',
- ' kworker/u:0-5 [000] .... 79.046921: ' +
- 'mali_hwc_MMU_TABLE_WALK: val=3119',
- ' kworker/u:0-5 [000] .... 79.046848: ' +
- 'mali_hwc_POINTS: val=5',
- ' kworker/u:0-5 [000] .... 79.046856: ' +
- 'mali_hwc_PRIM_CLIPPED: val=70',
- ' kworker/u:0-5 [000] .... 79.046855: ' +
- 'mali_hwc_PRIM_CULLED: val=26',
- ' kworker/u:0-5 [000] .... 79.046854: ' +
- 'mali_hwc_PRIM_VISIBLE: val=109',
- ' kworker/u:0-5 [000] .... 79.046898: ' +
- 'mali_hwc_TEX_BUBBLES: val=24874',
- ' kworker/u:0-5 [000] .... 79.046905: ' +
- 'mali_hwc_TEX_RECIRC_DESC: val=5937',
- ' kworker/u:0-5 [000] .... 79.046904: ' +
- 'mali_hwc_TEX_RECIRC_FMISS: val=209450',
- ' kworker/u:0-5 [000] .... 78.896592: ' +
- 'mali_hwc_TEX_RECIRC_MULTI: val=238',
- ' kworker/u:0-5 [000] .... 79.046908: ' +
- 'mali_hwc_TEX_RECIRC_PMISS: val=9672',
- ' kworker/u:0-5 [000] .... 79.046903: ' +
- 'mali_hwc_TEX_THREADS: val=660900',
- ' kworker/u:0-5 [000] .... 79.046897: ' +
- 'mali_hwc_TEX_WORDS: val=471193',
- ' kworker/u:0-5 [000] .... 79.046901: ' +
- 'mali_hwc_TEX_WORDS_DESC: val=707',
- ' kworker/u:0-5 [000] .... 79.046900: ' +
- 'mali_hwc_TEX_WORDS_L0: val=32',
- ' kworker/u:0-5 [000] .... 79.046846: ' +
- 'mali_hwc_TRIANGLES: val=130',
- ' kworker/u:0-5 [000] .... 79.046885: ' +
- 'mali_hwc_TRIPIPE_ACTIVE: val=691001',
- ' kworker/u:0-5 [000] .... 78.896600: ' +
- 'mali_hwc_UTLB_NEW_MISS: val=6',
- ' kworker/u:0-5 [000] .... 78.896599: ' +
- 'mali_hwc_UTLB_REPLAY_FULL: val=248',
- ' kworker/u:0-5 [000] .... 78.896597: ' +
- 'mali_hwc_UTLB_REPLAY_MISS: val=1',
- ' kworker/u:0-5 [000] .... 78.896596: ' +
- 'mali_hwc_UTLB_STALL: val=1',
- ' kworker/u:0-5 [000] .... 79.046850: ' +
- 'mali_hwc_VCACHE_HIT: val=311',
- ' kworker/u:0-5 [000] .... 79.046851: ' +
- 'mali_hwc_VCACHE_MISS: val=70'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var counters = m.getAllCounters();
- assert.equal(counters.length, 103);
-
- // all counters should have 1 sample
- for (var tI = 0; tI < counters.length; tI++) {
- var counter = counters[tI];
- assert.equal(counter.series[0].samples.length, 1);
- }
- // TODO(sleffler) verify counter names? (not sure if it's worth the effort)
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser.html
deleted file mode 100644
index 3c4c7bbbacd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser.html
+++ /dev/null
@@ -1,155 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses drm driver events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux vmscan trace events.
- * @constructor
- */
- function MemReclaimParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('mm_vmscan_kswapd_wake',
- MemReclaimParser.prototype.kswapdWake.bind(this));
- importer.registerEventHandler('mm_vmscan_kswapd_sleep',
- MemReclaimParser.prototype.kswapdSleep.bind(this));
- importer.registerEventHandler('mm_vmscan_direct_reclaim_begin',
- MemReclaimParser.prototype.reclaimBegin.bind(this));
- importer.registerEventHandler('mm_vmscan_direct_reclaim_end',
- MemReclaimParser.prototype.reclaimEnd.bind(this));
- }
-
- // Matches the mm_vmscan_kswapd_wake record
- // mm_vmscan_kswapd_wake: nid=%d order=%d
- var kswapdWakeRE = /nid=(\d+) order=(\d+)/;
-
- // Matches the mm_vmscan_kswapd_sleep record
- // mm_vmscan_kswapd_sleep: order=%d
- var kswapdSleepRE = /nid=(\d+)/;
-
- // Matches the mm_vmscan_direct_reclaim_begin record
- // mm_vmscan_direct_reclaim_begin: order=%d may_writepage=%d gfp_flags=%s
- var reclaimBeginRE = /order=(\d+) may_writepage=\d+ gfp_flags=(.+)/;
-
- // Matches the mm_vmscan_direct_reclaim_end record
- // mm_vmscan_direct_reclaim_end: nr_reclaimed=%lu
- var reclaimEndRE = /nr_reclaimed=(\d+)/;
-
- MemReclaimParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parses memreclaim events and sets up state in the importer.
- */
- kswapdWake: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = kswapdWakeRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var tgid = parseInt(eventBase.tgid);
-
- var nid = parseInt(event[1]);
- var order = parseInt(event[2]);
-
- var kthread = this.importer.getOrCreateKernelThread(
- eventBase.threadName, tgid, pid);
-
- if (kthread.openSliceTS) {
- if (order > kthread.order) {
- kthread.order = order;
- }
- } else {
- kthread.openSliceTS = ts;
- kthread.order = order;
- }
- return true;
- },
-
- kswapdSleep: function(eventName, cpuNumber, pid, ts, eventBase) {
- var tgid = parseInt(eventBase.tgid);
-
- var kthread = this.importer.getOrCreateKernelThread(
- eventBase.threadName, tgid, pid);
-
- if (kthread.openSliceTS) {
-
- kthread.thread.sliceGroup.pushCompleteSlice(
- 'memreclaim', eventBase.threadName, kthread.openSliceTS,
- ts - kthread.openSliceTS, 0, 0,
- {
- order: kthread.order
- });
- }
- kthread.openSliceTS = undefined;
- kthread.order = undefined;
- return true;
- },
-
- reclaimBegin: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = reclaimBeginRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var order = parseInt(event[1]);
- var gfp = event[2];
- var tgid = parseInt(eventBase.tgid);
-
- var kthread = this.importer.getOrCreateKernelThread(
- eventBase.threadName, tgid, pid);
-
- kthread.openSliceTS = ts;
- kthread.order = order;
- kthread.gfp = gfp;
- return true;
- },
-
- reclaimEnd: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = reclaimEndRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var nrReclaimed = parseInt(event[1]);
- var tgid = parseInt(eventBase.tgid);
-
- var kthread = this.importer.getOrCreateKernelThread(
- eventBase.threadName, tgid, pid);
-
- if (kthread.openSliceTS !== undefined) {
- kthread.thread.sliceGroup.pushCompleteSlice('memreclaim',
- 'direct reclaim', kthread.openSliceTS, ts - kthread.openSliceTS,
- 0, 0,
- {
- order: kthread.order,
- gfp: kthread.gfp,
- nr_reclaimed: nrReclaimed
- });
- }
- kthread.openSliceTS = undefined;
- kthread.order = undefined;
- kthread.gfp = undefined;
- return true;
- }
-
- };
-
- Parser.register(MemReclaimParser);
-
- return {
- MemReclaimParser: MemReclaimParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser_test.html
deleted file mode 100644
index dcfb9992247..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/memreclaim_parser_test.html
+++ /dev/null
@@ -1,170 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('memreclaimImport', function() {
- var lines = [
- ' surfaceflinger-1155 ( 1155) [001] ...1 12839.528756: mm_vmscan_direct_reclaim_begin: order=0 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_ZERO|0x2', // @suppress longLineCheck
- ' surfaceflinger-1155 ( 1155) [001] ...1 12839.531950: mm_vmscan_direct_reclaim_end: nr_reclaimed=66', // @suppress longLineCheck
- ' kswapd0-33 ( 33) [001] ...1 12838.491407: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- ' kswapd0-33 ( 33) [001] ...1 12838.529770: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- ' kswapd0-33 ( 33) [001] ...1 12840.545737: mm_vmscan_kswapd_sleep: nid=0'// @suppress longLineCheck
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- assert.equal(m.processes['1155'].threads['1155'].sliceGroup.length, 1);
- assert.equal(m.processes['33'].threads['33'].sliceGroup.length, 1);
- });
-
- test('memreclaimDirectReclaim', function() {
- var lines = [
- 'RenderThread-9844 ( 9786) [001] ...1 1734.106078: mm_vmscan_direct_reclaim_begin: order=5 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|0x2', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.107619: mm_vmscan_direct_reclaim_end: nr_reclaimed=72', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.107738: mm_vmscan_direct_reclaim_begin: order=4 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|0x2', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.107844: mm_vmscan_direct_reclaim_end: nr_reclaimed=35', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.107891: mm_vmscan_direct_reclaim_begin: order=4 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|0x2', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.107945: mm_vmscan_direct_reclaim_end: nr_reclaimed=35', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.107990: mm_vmscan_direct_reclaim_begin: order=4 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|0x2', // @suppress longLineCheck
- 'RenderThread-9844 ( 9786) [001] ...1 1734.108062: mm_vmscan_direct_reclaim_end: nr_reclaimed=34', // @suppress longLineCheck
- 'Binder_8-1735 ( 1022) [001] ...1 1735.472240: mm_vmscan_direct_reclaim_begin: order=3 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|0x2', // @suppress longLineCheck
- 'Binder_8-1735 ( 1022) [001] ...1 1735.472849: mm_vmscan_direct_reclaim_end: nr_reclaimed=47', // @suppress longLineCheck
- 'Binder_8-1735 ( 1022) [001] ...1 1735.473002: mm_vmscan_direct_reclaim_begin: order=3 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|0x2', // @suppress longLineCheck
- 'Binder_8-1735 ( 1022) [001] ...1 1735.474859: mm_vmscan_direct_reclaim_end: nr_reclaimed=48', // @suppress longLineCheck
- 'touchFusion-88 ( 88) [000] ...1 1736.510656: mm_vmscan_direct_reclaim_begin: order=2 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_COMP|GFP_NOMEMALLOC|GFP_KMEMCG', // @suppress longLineCheck
- 'touchFusion-88 ( 88) [000] ...1 1736.517616: mm_vmscan_direct_reclaim_end: nr_reclaimed=34', // @suppress longLineCheck
- 'touchFusion-88 ( 88) [000] ...1 1736.527061: mm_vmscan_direct_reclaim_begin: order=2 may_writepage=1 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_COMP|GFP_NOMEMALLOC|GFP_KMEMCG', // @suppress longLineCheck
- 'touchFusion-88 ( 88) [000] ...1 1736.530857: mm_vmscan_direct_reclaim_end: nr_reclaimed=39'// @suppress longLineCheck
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
-
- assert.equal(threads.length, 3);
-
- var Binder8 = threads[0];
- var touchFusion = threads[1];
- var RenderThread = threads[2];
-
- /* make sure there are the expected amount of slices per thread */
- assert.equal(Binder8.sliceGroup.length, 2);
- assert.equal(touchFusion.sliceGroup.length, 2);
- assert.equal(RenderThread.sliceGroup.length, 4);
-
- /* make sure the slices have information to display to the
- * user when selected
- */
-
- var iterateMe = [Binder8, touchFusion, RenderThread];
- iterateMe.forEach(function(thread) {
- for (var i = 0; i < thread.sliceGroup.length; i++) {
- assert.equal(thread.sliceGroup.slices[i].args !== undefined, true);
- }
- });
- });
-
- test('memreclaimKswapd', function() {
- var lines = [
- 'kswapd0-48 ( 48) [001] ...1 1734.210437: mm_vmscan_kswapd_wake: nid=0 order=5', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.227291: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.237585: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.258698: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.269642: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.319484: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.344839: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.428425: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.429593: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.599419: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1734.696606: mm_vmscan_kswapd_sleep: nid=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1735.465745: mm_vmscan_kswapd_wake: nid=0 order=3', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1735.563917: mm_vmscan_kswapd_wake: nid=0 order=5', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1735.570555: mm_vmscan_kswapd_wake: nid=0 order=4', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1735.666658: mm_vmscan_kswapd_sleep: nid=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1736.508069: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1736.529293: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1736.696725: mm_vmscan_kswapd_sleep: nid=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1737.945426: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1737.988642: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.057237: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.144630: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.207546: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.221963: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.316889: mm_vmscan_kswapd_sleep: nid=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.712804: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.751103: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.773175: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.785068: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.789545: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1738.873675: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1738.899117: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1738.939214: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1738.990366: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1739.028269: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1739.036765: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1739.077631: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.094731: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.096757: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.160536: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.256638: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.264972: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1739.360137: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.368759: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.387082: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.455657: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.489058: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.507561: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.570247: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [001] ...1 1739.582975: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.678148: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.762025: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.799245: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.821950: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.894130: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1739.919775: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.026933: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.126608: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.150819: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.156101: mm_vmscan_kswapd_wake: nid=0 order=1', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.246626: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.357055: mm_vmscan_kswapd_sleep: nid=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.762705: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.772367: mm_vmscan_kswapd_wake: nid=0 order=2', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.783509: mm_vmscan_kswapd_wake: nid=0 order=0', // @suppress longLineCheck
- 'kswapd0-48 ( 48) [000] ...1 1740.876601: mm_vmscan_kswapd_sleep: nid=0'// @suppress longLineCheck
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 1);
-
- var thread = threads[0];
-
- assert.equal(thread.sliceGroup.length, 6);
-
- thread.sliceGroup.slices.forEach(function(slice) {
- assert.equal(slice.args !== undefined, true);
- });
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/parser.html
deleted file mode 100644
index dd64d06b69d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/parser.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/extension_registry.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for linux perf event parsers.
- *
- * The linux perf trace event importer depends on subclasses of
- * Parser to parse event data. Each subclass corresponds
- * to a group of trace events; e.g. SchedParser implements
- * parsing of sched:* kernel trace events. Parser subclasses must
- * call Parser.register to arrange to be instantiated
- * and their constructor must register their event handlers with the
- * importer. For example,
- *
- * var Parser = tr.e.importer.linux_perf.Parser;
- *
- * function WorkqueueParser(importer) {
- * Parser.call(this, importer);
- *
- * importer.registerEventHandler('workqueue_execute_start',
- * WorkqueueParser.prototype.executeStartEvent.bind(this));
- * importer.registerEventHandler('workqueue_execute_end',
- * WorkqueueParser.prototype.executeEndEvent.bind(this));
- * }
- *
- * Parser.register(WorkqueueParser);
- *
- * When a registered event name is found in the data stream the associated
- * event handler is invoked:
- *
- * executeStartEvent: function(eventName, cpuNumber, ts, eventBase)
- *
- * If the routine returns false the caller will generate an import error
- * saying there was a problem parsing it. Handlers can also emit import
- * messages using this.importer.model.importWarning. If this is done in lieu of
- * the generic import error it may be desirable for the handler to return
- * true.
- *
- * Trace events generated by writing to the trace_marker file are expected
- * to have a leading text marker followed by a ':'; e.g. the trace clock
- * synchronization event is:
- *
- * tracing_mark_write: trace_event_clock_sync: parent_ts=0
- *
- * To register an event handler for these events, prepend the marker with
- * 'tracing_mark_write:'; e.g.
- *
- * this.registerEventHandler('tracing_mark_write:trace_event_clock_sync',
- *
- * All subclasses should depend on importer.linux_perf.parser, e.g.
- *
- * tr.defineModule('importer.linux_perf.workqueue_parser')
- * .dependsOn('importer.linux_perf.parser')
- * .exportsTo('tracing', function()
- *
- * and be listed in the dependsOn of FTraceImporter. Beware that after adding a
- * new subclass you must run build/generate_about_tracing_contents.py to
- * regenerate tr.ui.e.about_tracing.*.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
- /**
- * Parses linux perf events.
- * @constructor
- */
- function Parser(importer) {
- this.importer = importer;
- this.model = importer.model;
- }
-
- Parser.prototype = {
- __proto__: Object.prototype
- };
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.mandatoryBaseClass = Parser;
- tr.b.decorateExtensionRegistry(Parser, options);
-
- return {
- Parser: Parser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser.html
deleted file mode 100644
index 228132173c3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser.html
+++ /dev/null
@@ -1,183 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses power events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux power trace events.
- * @constructor
- */
- function PowerParser(importer) {
- Parser.call(this, importer);
-
- // NB: old-style power events, deprecated
- importer.registerEventHandler('power_start',
- PowerParser.prototype.powerStartEvent.bind(this));
- importer.registerEventHandler('power_frequency',
- PowerParser.prototype.powerFrequencyEvent.bind(this));
-
- importer.registerEventHandler('cpu_frequency',
- PowerParser.prototype.cpuFrequencyEvent.bind(this));
- importer.registerEventHandler('cpu_frequency_limits',
- PowerParser.prototype.cpuFrequencyLimitsEvent.bind(this));
- importer.registerEventHandler('cpu_idle',
- PowerParser.prototype.cpuIdleEvent.bind(this));
- }
-
- PowerParser.prototype = {
- __proto__: Parser.prototype,
-
- cpuStateSlice: function(ts, targetCpuNumber, eventType, cpuState) {
- var targetCpu = this.importer.getOrCreateCpu(targetCpuNumber);
- var powerCounter;
- if (eventType !== '1') {
- this.importer.model.importWarning({
- type: 'parse_error',
- message: 'Don\'t understand power_start events of ' +
- 'type ' + eventType
- });
- return;
- }
- powerCounter = targetCpu.getOrCreateCounter('', 'C-State');
- if (powerCounter.numSeries === 0) {
- powerCounter.addSeries(new tr.model.CounterSeries('state',
- ColorScheme.getColorIdForGeneralPurposeString(
- powerCounter.name + '.' + 'state')));
- }
- powerCounter.series.forEach(function(series) {
- series.addCounterSample(ts, cpuState);
- });
- },
-
- cpuIdleSlice: function(ts, targetCpuNumber, cpuState) {
- var targetCpu = this.importer.getOrCreateCpu(targetCpuNumber);
- var powerCounter = targetCpu.getOrCreateCounter('', 'C-State');
- if (powerCounter.numSeries === 0) {
- powerCounter.addSeries(new tr.model.CounterSeries('state',
- ColorScheme.getColorIdForGeneralPurposeString(powerCounter.name)));
- }
- // NB: 4294967295/-1 means an exit from the current state
- var val = (cpuState !== 4294967295 ? cpuState + 1 : 0);
- powerCounter.series.forEach(function(series) {
- series.addCounterSample(ts, val);
- });
- },
-
- cpuFrequencySlice: function(ts, targetCpuNumber, powerState) {
- var targetCpu = this.importer.getOrCreateCpu(targetCpuNumber);
- var powerCounter =
- targetCpu.getOrCreateCounter('', 'Clock Frequency');
- if (powerCounter.numSeries === 0) {
- powerCounter.addSeries(new tr.model.CounterSeries('state',
- ColorScheme.getColorIdForGeneralPurposeString(
- powerCounter.name + '.' + 'state')));
- }
- powerCounter.series.forEach(function(series) {
- series.addCounterSample(ts, powerState);
- });
- },
-
- cpuFrequencyLimitsSlice: function(ts, targetCpuNumber, minFreq, maxFreq) {
- var targetCpu = this.importer.getOrCreateCpu(targetCpuNumber);
- var powerCounter =
- targetCpu.getOrCreateCounter('', 'Clock Frequency Limits');
- if (powerCounter.numSeries === 0) {
- powerCounter.addSeries(new tr.model.CounterSeries('Min Frequency',
- ColorScheme.getColorIdForGeneralPurposeString(
- powerCounter.name + '.' + 'Min Frequency')));
- powerCounter.addSeries(new tr.model.CounterSeries('Max Frequency',
- ColorScheme.getColorIdForGeneralPurposeString(
- powerCounter.name + '.' + 'Max Frequency')));
- }
- powerCounter.series.forEach(function(series) {
- if (series.name === 'Min Frequency')
- series.addCounterSample(ts, minFreq);
- if (series.name === 'Max Frequency')
- series.addCounterSample(ts, maxFreq);
- });
- },
-
- /**
- * Parses power events and sets up state in the importer.
- */
- powerStartEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /type=(\d+) state=(\d) cpu_id=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var targetCpuNumber = parseInt(event[3]);
- var cpuState = parseInt(event[2]);
- this.cpuStateSlice(ts, targetCpuNumber, event[1], cpuState);
- return true;
- },
-
- powerFrequencyEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /type=(\d+) state=(\d+) cpu_id=(\d+)/
- .exec(eventBase.details);
- if (!event)
- return false;
-
- var targetCpuNumber = parseInt(event[3]);
- var powerState = parseInt(event[2]);
- this.cpuFrequencySlice(ts, targetCpuNumber, powerState);
- return true;
- },
-
- cpuFrequencyEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /state=(\d+) cpu_id=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var targetCpuNumber = parseInt(event[2]);
- var powerState = parseInt(event[1]);
- this.cpuFrequencySlice(ts, targetCpuNumber, powerState);
- return true;
- },
-
- cpuFrequencyLimitsEvent: function(eventName, cpu, pid, ts, eventBase) {
- var event = /min=(\d+) max=(\d+) cpu_id=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var targetCpuNumber = parseInt(event[3]);
- var minFreq = parseInt(event[1]);
- var maxFreq = parseInt(event[2]);
- this.cpuFrequencyLimitsSlice(ts, targetCpuNumber, minFreq, maxFreq);
- return true;
- },
-
- cpuIdleEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /state=(\d+) cpu_id=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var targetCpuNumber = parseInt(event[2]);
- var cpuState = parseInt(event[1]);
- this.cpuIdleSlice(ts, targetCpuNumber, cpuState);
- return true;
- }
- };
-
- Parser.register(PowerParser);
-
- return {
- PowerParser: PowerParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser_test.html
deleted file mode 100644
index 9dae21dcc9d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/power_parser_test.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('powerFrequencyImport', function() {
- var lines = [
- ' kworker/0:3-6880 [000] 2784.783015: power_frequency: ' +
- 'type=2 state=1000000 cpu_id=0',
- ' kworker/1:2-7269 [001] 2784.788993: power_frequency: ' +
- 'type=2 state=800000 cpu_id=1',
- ' kworker/1:2-7269 [001] 2784.993120: power_frequency: ' +
- 'type=2 state=1300000 cpu_id=1'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c0 = m.kernel.cpus[0];
- assert.equal(c0.slices.length, 0);
- assert.equal(c0.counters['.Clock Frequency'].series[0].samples.length, 1);
-
- var c1 = m.kernel.cpus[1];
- assert.equal(c1.slices.length, 0);
- assert.equal(c1.counters['.Clock Frequency'].series[0].samples.length, 2);
- });
-
- test('cpuFrequencyImport', function() {
- var lines = [
- ' kworker/1:0-9665 [001] 15051.007301: cpu_frequency: ' +
- 'state=800000 cpu_id=1',
- ' kworker/1:0-9665 [001] 15051.010278: cpu_frequency: ' +
- 'state=1300000 cpu_id=1',
- ' kworker/0:2-7972 [000] 15051.010278: cpu_frequency: ' +
- 'state=1000000 cpu_id=0',
- ' kworker/0:2-7972 [000] 15051.020304: cpu_frequency: ' +
- 'state=800000 cpu_id=0'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c0 = m.kernel.cpus[0];
- assert.equal(c0.slices.length, 0);
- assert.equal(c0.counters['.Clock Frequency'].series[0].samples.length, 2);
-
- var c1 = m.kernel.cpus[1];
- assert.equal(c1.slices.length, 0);
- assert.equal(c1.counters['.Clock Frequency'].series[0].samples.length, 2);
- });
-
- test('cpuIdleImport', function() {
- var lines = [
- ' <idle>-0 [000] 15050.992883: cpu_idle: ' +
- 'state=1 cpu_id=0',
- ' <idle>-0 [000] 15050.993027: cpu_idle: ' +
- 'state=4294967295 cpu_id=0',
- ' <idle>-0 [001] 15050.993132: cpu_idle: ' +
- 'state=1 cpu_id=1',
- ' <idle>-0 [001] 15050.993276: cpu_idle: ' +
- 'state=4294967295 cpu_id=1',
- ' <idle>-0 [001] 15050.993279: cpu_idle: ' +
- 'state=3 cpu_id=1',
- ' <idle>-0 [001] 15050.993457: cpu_idle: ' +
- 'state=4294967295 cpu_id=1'
- ];
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var c0 = m.kernel.cpus[0];
- assert.equal(c0.slices.length, 0);
- assert.equal(c0.counters['.C-State'].series[0].samples.length, 2);
-
- var c1 = m.kernel.cpus[1];
- assert.equal(c1.slices.length, 0);
- assert.equal(c1.counters['.C-State'].series[0].samples.length, 4);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser.html
deleted file mode 100644
index 0c56720f51c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses regulator events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux regulator trace events.
- * @constructor
- */
- function RegulatorParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('regulator_enable',
- RegulatorParser.prototype.regulatorEnableEvent.bind(this));
- importer.registerEventHandler('regulator_enable_delay',
- RegulatorParser.prototype.regulatorEnableDelayEvent.bind(this));
- importer.registerEventHandler('regulator_enable_complete',
- RegulatorParser.prototype.regulatorEnableCompleteEvent.bind(this));
- importer.registerEventHandler('regulator_disable',
- RegulatorParser.prototype.regulatorDisableEvent.bind(this));
- importer.registerEventHandler('regulator_disable_complete',
- RegulatorParser.prototype.regulatorDisableCompleteEvent.bind(this));
- importer.registerEventHandler('regulator_set_voltage',
- RegulatorParser.prototype.regulatorSetVoltageEvent.bind(this));
- importer.registerEventHandler('regulator_set_voltage_complete',
- RegulatorParser.prototype.regulatorSetVoltageCompleteEvent.bind(this));
-
- this.model_ = importer.model_;
- }
-
- // Matches the regulator_enable record
- var regulatorEnableRE = /name=(.+)/;
-
- // Matches the regulator_disable record
- var regulatorDisableRE = /name=(.+)/;
-
- // Matches the regulator_set_voltage_complete record
- var regulatorSetVoltageCompleteRE = /name=(\S+), val=(\d+)/;
-
- RegulatorParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Get or create a counter with one series.
- */
- getCtr_: function(ctrName, valueName) {
- var ctr = this.model_.kernel
- .getOrCreateCounter(null, 'vreg ' + ctrName + ' ' + valueName);
- // Initialize the counter's series fields if needed.
- if (ctr.series[0] === undefined) {
- ctr.addSeries(new tr.model.CounterSeries(valueName,
- ColorScheme.getColorIdForGeneralPurposeString(
- ctrName + '.' + valueName)));
- }
- return ctr;
- },
-
- /**
- * Parses regulator events and sets up state in the importer.
- */
- regulatorEnableEvent: function(eventName, cpuNum, pid, ts, eventBase) {
- var event = regulatorEnableRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var name = event[1];
-
- var ctr = this.getCtr_(name, 'enabled');
- ctr.series[0].addCounterSample(ts, 1);
-
- return true;
- },
-
- regulatorEnableDelayEvent: function(eventName, cpuNum, pid, ts, eventBase) {
- return true;
- },
-
- regulatorEnableCompleteEvent: function(eventName, cpuNum, pid, ts,
- eventBase) {
- return true;
- },
-
- regulatorDisableEvent: function(eventName, cpuNum, pid, ts, eventBase) {
- var event = regulatorDisableRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var name = event[1];
-
- var ctr = this.getCtr_(name, 'enabled');
- ctr.series[0].addCounterSample(ts, 0);
-
- return true;
- },
-
- regulatorDisableCompleteEvent: function(eventName, cpuNum, pid, ts,
- eventBase) {
- return true;
- },
-
- regulatorSetVoltageEvent: function(eventName, cpuNum, pid, ts, eventBase) {
- return true;
- },
-
- regulatorSetVoltageCompleteEvent: function(eventName, cpuNum, pid, ts,
- eventBase) {
- var event = regulatorSetVoltageCompleteRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var name = event[1];
- var voltage = parseInt(event[2]);
-
- var ctr = this.getCtr_(name, 'voltage');
- ctr.series[0].addCounterSample(ts, voltage);
-
- return true;
- }
-
- };
-
- Parser.register(RegulatorParser);
-
- return {
- RegulatorParser: RegulatorParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser_test.html
deleted file mode 100644
index 328bf7c3161..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/regulator_parser_test.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('regulatorImport', function() {
- var lines = [
- ' kworker/0:2H-14312 [000] ...1 143713.787749: ' +
- 'regulator_set_voltage: name=krait0 (810000-1100000)',
- ' kworker/0:2H-14312 [000] ...1 143713.787778: ' +
- 'regulator_set_voltage_complete: name=krait0, val=810000',
- ' kworker/0:2H-14312 [000] ...1 143714.037871: ' +
- 'regulator_set_voltage: name=krait0 (800000-1100000)',
- ' kworker/0:2H-14312 [000] ...1 143714.037895: ' +
- 'regulator_set_voltage_complete: name=krait0, val=800000',
- 'kworker/0:1-30321 [000] ...1 144568.624596: ' +
- 'regulator_enable: name=8941_smbb_boost',
- 'kworker/0:1-30321 [000] ...1 144568.624715: ' +
- 'regulator_enable_delay: name=8941_smbb_boost',
- 'kworker/0:1-30321 [000] ...1 144568.624723: ' +
- 'regulator_enable_complete: name=8941_smbb_boost',
- 'kworker/0:1-30321 [000] ...1 144568.653546: ' +
- 'regulator_disable: name=8941_smbb_boost',
- 'kworker/0:1-30321 [000] ...1 144568.654785: ' +
- 'regulator_disable_complete: name=8941_smbb_boost'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- assert.property(m.kernel.counters, 'null.vreg krait0 voltage');
- assert.property(m.kernel.counters, 'null.vreg 8941_smbb_boost enabled');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser.html
deleted file mode 100644
index b3fa3788160..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-<link rel="import" href="/tracing/model/counter.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses scheduler events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux sched trace events.
- * @constructor
- */
- function SchedParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('sched_switch',
- SchedParser.prototype.schedSwitchEvent.bind(this));
- importer.registerEventHandler('sched_wakeup',
- SchedParser.prototype.schedWakeupEvent.bind(this));
- importer.registerEventHandler('sched_blocked_reason',
- SchedParser.prototype.schedBlockedEvent.bind(this));
- importer.registerEventHandler('sched_cpu_hotplug',
- SchedParser.prototype.schedCpuHotplugEvent.bind(this));
- }
-
- var TestExports = {};
-
- // Matches the sched_switch record
- var schedSwitchRE = new RegExp(
- 'prev_comm=(.+) prev_pid=(\\d+) prev_prio=(\\d+) ' +
- 'prev_state=(\\S\\+?|\\S\\|\\S) ==> ' +
- 'next_comm=(.+) next_pid=(\\d+) next_prio=(\\d+)');
-
- // Matches sched_blocked_reason record
- var schedBlockedRE = new RegExp('pid=(\\d+) iowait=(\\d) caller=(.+)');
- TestExports.schedSwitchRE = schedSwitchRE;
-
- // Matches the sched_wakeup record
- var schedWakeupRE =
- /comm=(.+) pid=(\d+) prio=(\d+) success=(\d+) target_cpu=(\d+)/;
- TestExports.schedWakeupRE = schedWakeupRE;
-
- SchedParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parses scheduler events and sets up state in the CPUs of the importer.
- */
- schedSwitchEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = schedSwitchRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var prevState = event[4];
- var nextComm = event[5];
- var nextPid = parseInt(event[6]);
- var nextPrio = parseInt(event[7]);
-
- var nextThread = this.importer.threadsByLinuxPid[nextPid];
- var nextName;
- if (nextThread)
- nextName = nextThread.userFriendlyName;
- else
- nextName = nextComm;
-
- var cpu = this.importer.getOrCreateCpu(cpuNumber);
- cpu.switchActiveThread(
- ts,
- {stateWhenDescheduled: prevState},
- nextPid,
- nextName,
- {
- comm: nextComm,
- tid: nextPid,
- prio: nextPrio
- });
-
- return true;
- },
-
- schedWakeupEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = schedWakeupRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var fromPid = pid;
- var comm = event[1];
- var pid = parseInt(event[2]);
- var prio = parseInt(event[3]);
- this.importer.markPidRunnable(ts, pid, comm, prio, fromPid);
- return true;
- },
-
- schedCpuHotplugEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = /cpu (\d+) (.+) error=(\d+)/.exec(eventBase.details);
- if (!event)
- return false;
-
- var cpuNumber = event[1];
- var state = event[2];
- var targetCpu = this.importer.getOrCreateCpu(cpuNumber);
-
- var powerCounter = targetCpu.getOrCreateCounter('', 'Cpu Hotplug');
- if (powerCounter.numSeries === 0) {
- powerCounter.addSeries(new tr.model.CounterSeries('State',
- tr.b.ColorScheme.getColorIdForGeneralPurposeString(
- powerCounter.name + '.' + 'State')));
- }
- powerCounter.series.forEach(function(series) {
- if (series.name === 'State')
- series.addCounterSample(ts, state.localeCompare('offline') ? 0 : 1);
- });
- return true;
- },
-
- schedBlockedEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = schedBlockedRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var pid = parseInt(event[1]);
- var iowait = parseInt(event[2]);
- var caller = event[3];
-
- this.importer.addPidBlockedReason(ts, pid, iowait, caller);
- return true;
- }
- };
-
- Parser.register(SchedParser);
-
- return {
- SchedParser: SchedParser,
- _SchedParserTestExports: TestExports
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser_test.html
deleted file mode 100644
index 435463e5b43..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sched_parser_test.html
+++ /dev/null
@@ -1,222 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('schedSwitchRE', function() {
- var re = tr.e.importer.linux_perf._SchedParserTestExports.schedSwitchRE;
- var x = re.exec('prev_comm=swapper prev_pid=0 prev_prio=120 prev_state=R ' +
- '==> next_comm=SurfaceFlinger next_pid=178 next_prio=112');
- assert.isNotNull(x);
- assert.equal(x[1], 'swapper');
- assert.equal(x[2], '0');
- assert.equal(x[3], '120');
- assert.equal(x[4], 'R');
- assert.equal(x[5], 'SurfaceFlinger');
- assert.equal(x[6], '178');
- assert.equal(x[7], '112');
-
- var x = re.exec('prev_comm=.android.chrome prev_pid=1562 prev_prio=120 prev_state=R ==> next_comm=Binder Thread # next_pid=195 next_prio=120'); // @suppress longLineCheck
- assert.isNotNull(x);
- assert.equal(x[1], '.android.chrome');
- assert.equal(x[5], 'Binder Thread #');
-
- var x = re.exec('prev_comm=Binder Thread # prev_pid=1562 prev_prio=120 prev_state=R ==> next_comm=.android.chrome next_pid=195 next_prio=120'); // @suppress longLineCheck
- assert.isNotNull(x);
- assert.equal(x[1], 'Binder Thread #');
- assert.equal(x[5], '.android.chrome');
-
- // explicit test for prev_state of D|W
- var x = re.exec('prev_comm=.android.chrome prev_pid=1562 prev_prio=120 ' +
- 'prev_state=D|W ==> next_comm=Binder Thread # next_pid=195 ' +
- 'next_prio=120');
- assert.isNotNull(x);
- assert.equal(x[4], 'D|W');
- });
-
- test('schedWakeupRE', function() {
- var re = tr.e.importer.linux_perf._SchedParserTestExports.schedWakeupRE;
- var x = re.exec(
- 'comm=SensorService pid=207 prio=112 success=1 target_cpu=000');
- assert.isNotNull(x);
- assert.equal(x[1], 'SensorService');
- assert.equal(x[2], '207');
- assert.equal(x[3], '112');
- assert.equal(x[4], '1');
- assert.equal(x[5], '000');
- });
-
- test('importOneSequenceWithSchedWakeUp', function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var lines = [
- 'ndroid.launcher-584 [001] d..3 12622.506890: sched_switch: prev_comm=ndroid.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D ==> next_comm=ndroid.launcher next_pid=584 next_prio=120', // @suppress longLineCheck
- 'ndroid.launcher-584 [001] d..4 12622.506936: sched_wakeup: comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001', // @suppress longLineCheck
- 'ndroid.launcher-584 [001] d..3 12622.506950: sched_switch: prev_comm=ndroid.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: B|128|queueBuffer', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ==> next_comm=ndroid.launcher next_pid=584 next_prio=120' // @suppress longLineCheck
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
- var timeSlices = thread.timeSlices;
- assert.equal(timeSlices.length, 4);
-
- var runningSlice = timeSlices[0];
- assert.equal(runningSlice.schedulingState, SCHEDULING_STATE.RUNNING);
- assert.closeTo(12622506.890, runningSlice.start, 1e-5);
- assert.closeTo(.918 - .890, runningSlice.duration, 1e-5);
-
- var sleepSlice = timeSlices[1];
- assert.equal(sleepSlice.schedulingState, SCHEDULING_STATE.UNINTR_SLEEP);
- assert.closeTo(12622506.918, sleepSlice.start, 1e-5);
- assert.closeTo(.936 - .918, sleepSlice.duration, 1e-5);
-
- var wakeupSlice = timeSlices[2];
- assert.equal(wakeupSlice.schedulingState, SCHEDULING_STATE.RUNNABLE);
- assert.closeTo(12622506.936, wakeupSlice.start, 1e-5);
- assert.closeTo(.950 - .936, wakeupSlice.duration, 1e-5);
- assert.equal(wakeupSlice.args['wakeup from tid'], 584);
-
- var runningSlice2 = timeSlices[3];
- assert.equal(runningSlice2.schedulingState, SCHEDULING_STATE.RUNNING);
- assert.closeTo(12622506.950, runningSlice2.start, 1e-5);
- assert.closeTo(7.253 - 6.950, runningSlice2.duration, 1e-5);
- });
-
- test('importWithUnknownSleepState', function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var lines = [
- 'ndroid.launcher-584 [001] d..3 12622.506890: sched_switch: prev_comm=ndroid.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=F|O ==> next_comm=ndroid.launcher next_pid=584 next_prio=120', // @suppress longLineCheck
- 'ndroid.launcher-584 [001] d..4 12622.506936: sched_wakeup: comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001', // @suppress longLineCheck
- 'ndroid.launcher-584 [001] d..3 12622.506950: sched_switch: prev_comm=ndroid.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: B|128|queueBuffer', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=F|O ==> next_comm=ndroid.launcher next_pid=584 next_prio=120' // @suppress longLineCheck
- ];
-
- var m;
- assert.doesNotThrow(function() {
- m = newModel(lines.join('\n'));
- });
- assert.isTrue(m.hasImportWarnings);
- assert.equal(m.importWarnings[0].message, 'Unrecognized sleep state: F|O');
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
- var timeSlices = thread.timeSlices;
-
- assert.equal(timeSlices[1].schedulingState, SCHEDULING_STATE.UNKNOWN);
- });
-
- test('importWithUninterruptibleSleep', function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var lines = [
- 'ndroid.launcher-584 [001] d..3 12622.506890: sched_switch: ' +
- 'prev_comm=ndroid.launcher prev_pid=584 ' +
- 'prev_prio=120 prev_state=R+ ' +
- '==> next_comm=Binder_1 next_pid=217 next_prio=120',
-
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: ' +
- 'prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D|K ' +
- '==> next_comm=ndroid.launcher next_pid=584 next_prio=120',
-
- 'ndroid.launcher-584 [001] d..4 12622.506936: sched_wakeup: ' +
- 'comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001',
-
- 'ndroid.launcher-584 [001] d..3 12622.506950: sched_switch: ' +
- 'prev_comm=ndroid.launcher prev_pid=584 ' +
- 'prev_prio=120 prev_state=R+ ' +
- '==> next_comm=Binder_1 next_pid=217 next_prio=120',
-
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: ' +
- 'B|128|queueBuffer',
-
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
-
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: ' +
- 'prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ' +
- '==> next_comm=ndroid.launcher next_pid=584 next_prio=120'
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
- var timeSlices = thread.timeSlices;
- assert.equal(timeSlices.length, 4);
-
- var wakeKillSlice = timeSlices[1];
- assert.equal(wakeKillSlice.schedulingState,
- SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL);
- assert.closeTo(12622506.918, wakeKillSlice.start, 1e-5);
- assert.closeTo(.936 - .918, wakeKillSlice.duration, 1e-5);
- });
-
- test('importWithUninterruptibleSleepAndBlockedReason', function() {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var lines = [
- 'ndroid.launcher-584 [001] d..3 12622.506890: sched_switch: ' +
- 'prev_comm=ndroid.launcher prev_pid=584 ' +
- 'prev_prio=120 prev_state=R+ ' +
- '==> next_comm=Binder_1 next_pid=217 next_prio=120',
-
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: ' +
- 'prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D|K ' +
- '==> next_comm=ndroid.launcher next_pid=584 next_prio=120',
-
- ' Binder_1-217 [001] d..3 12622.506930: sched_blocked_reason: ' +
- 'pid=217 iowait=1 caller=sleep_on_page_killable+0x10/0x4c',
-
- 'ndroid.launcher-584 [001] d..4 12622.506936: sched_wakeup: ' +
- 'comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001',
-
- 'ndroid.launcher-584 [001] d..3 12622.506950: sched_switch: ' +
- 'prev_comm=ndroid.launcher prev_pid=584 ' +
- 'prev_prio=120 prev_state=R+ ' +
- '==> next_comm=Binder_1 next_pid=217 next_prio=120',
-
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: ' +
- 'B|128|queueBuffer',
-
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
-
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: ' +
- 'prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ' +
- '==> next_comm=ndroid.launcher next_pid=584 next_prio=120'
- ];
-
- var m = newModel(lines.join('\n'));
- assert.isFalse(m.hasImportWarnings);
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
- var timeSlices = thread.timeSlices;
- assert.equal(timeSlices.length, 4);
-
- var wakeKillSlice = timeSlices[1];
- assert.equal(wakeKillSlice.schedulingState,
- SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO);
- assert.closeTo(12622506.918, wakeKillSlice.start, 1e-5);
- assert.closeTo(.936 - .918, wakeKillSlice.duration, 1e-5);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser.html
deleted file mode 100644
index e5e3228aa59..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses sync events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux sync trace events.
- * @constructor
- */
- function SyncParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler(
- 'sync_timeline',
- SyncParser.prototype.timelineEvent.bind(this));
- importer.registerEventHandler(
- 'sync_wait',
- SyncParser.prototype.syncWaitEvent.bind(this));
- importer.registerEventHandler(
- 'sync_pt',
- SyncParser.prototype.syncPtEvent.bind(this));
- this.model_ = importer.model_;
- }
-
- var syncTimelineRE = /name=(\S+) value=(\S*)/;
- var syncWaitRE = /(\S+) name=(\S+) state=(\d+)/;
- var syncPtRE = /name=(\S+) value=(\S*)/;
-
- SyncParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parses sync events and sets up state in the importer.
- */
- timelineEvent: function(eventName, cpuNumber, pid,
- ts, eventBase) {
- var event = syncTimelineRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var thread = this.importer.getOrCreatePseudoThread(event[1]);
-
- if (thread.lastActiveTs !== undefined) {
- var duration = ts - thread.lastActiveTs;
- var value = thread.lastActiveValue;
- if (value === undefined)
- value = ' ';
- var slice = new tr.model.ThreadSlice(
- '', value,
- ColorScheme.getColorIdForGeneralPurposeString(value),
- thread.lastActiveTs, {},
- duration);
- thread.thread.sliceGroup.pushSlice(slice);
- }
- thread.lastActiveTs = ts;
- thread.lastActiveValue = event[2];
- return true;
- },
-
- syncWaitEvent: function(eventName, cpuNumber, pid, ts,
- eventBase) {
- var event = syncWaitRE.exec(eventBase.details);
- if (!event)
- return false;
-
- if (eventBase.tgid === undefined) {
- return false;
- }
-
- var tgid = parseInt(eventBase.tgid);
- var thread = this.model_.getOrCreateProcess(tgid)
- .getOrCreateThread(pid);
- thread.name = eventBase.threadName;
- var slices = thread.kernelSliceGroup;
- if (!slices.isTimestampValidForBeginOrEnd(ts)) {
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Timestamps are moving backward.'
- });
- return false;
- }
-
- var name = 'fence_wait("' + event[2] + '")';
- if (event[1] === 'begin') {
- var slice = slices.beginSlice(null, name, ts, {
- 'Start state': event[3]
- });
- } else if (event[1] === 'end') {
- if (slices.openSliceCount > 0) {
- slices.endSlice(ts);
- }
- } else {
- return false;
- }
-
- return true;
- },
-
- syncPtEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- return !!syncPtRE.exec(eventBase.details);
- }
- };
-
- Parser.register(SyncParser);
-
- return {
- SyncParser: SyncParser
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser_test.html
deleted file mode 100644
index c56e2576f3a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/sync_parser_test.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('syncEventImport', function() {
- var lines = [
- 's3c-fb-92 ( 0) [000] ...1 7206.550061: sync_timeline: name=s3c-fb value=7094', // @suppress longLineCheck
- 'TimedEventQueue-2700 ( 0) [001] ...1 7206.569027: sync_wait: begin name=SurfaceView:6 state=1', // @suppress longLineCheck
- 'TimedEventQueue-2700 ( 0) [001] ...1 7206.569038: sync_pt: name=malitl_124_0x40b6406c value=7289', // @suppress longLineCheck
- 'TimedEventQueue-2700 ( 0) [001] ...1 7206.569056: sync_pt: name=exynos-gsc.0-src value=25', // @suppress longLineCheck
- 'TimedEventQueue-2700 ( 0) [001] ...1 7206.569068: sync_wait: end name=SurfaceView:6 state=1', // @suppress longLineCheck
- 'irq/128-s5p-mfc-62 ( 0) [000] d..3 7206.572402: sync_timeline: name=vb2 value=37', // @suppress longLineCheck
- 'irq/128-s5p-mfc-62 ( 0) [000] d..3 7206.572475: sync_timeline: name=vb2 value=33', // @suppress longLineCheck
- 'SurfaceFlinger-225 ( 0) [001] ...1 7206.584769: sync_timeline: name=malitl_124_0x40b6406c value=7290', // @suppress longLineCheck
- 'kworker/u:5-2269 ( 0) [000] ...1 7206.586745: sync_wait: begin name=display state=1', // @suppress longLineCheck
- 'kworker/u:5-2269 ( 0) [000] ...1 7206.586750: sync_pt: name=s3c-fb value=7093', // @suppress longLineCheck
- 'kworker/u:5-2269 ( 0) [000] ...1 7206.586760: sync_wait: end name=display state=1', // @suppress longLineCheck
- 's3c-fb-92 ( 0) [000] ...1 7206.587193: sync_wait: begin name=vb2 state=0', // @suppress longLineCheck
- 's3c-fb-92 ( 0) [000] ...1 7206.587198: sync_pt: name=exynos-gsc.0-dst value=27', // @suppress longLineCheck
- '<idle>-0 ( 0) [000] d.h4 7206.591133: sync_timeline: name=exynos-gsc.0-src value=27', // @suppress longLineCheck
- '<idle>-0 ( 0) [000] d.h4 7206.591152: sync_timeline: name=exynos-gsc.0-dst value=27', // @suppress longLineCheck
- 's3c-fb-92 ( 0) [000] ...1 7206.591244: sync_wait: end name=vb2 state=1' // @suppress longLineCheck
- ];
-
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- var threads = m.getAllThreads();
- assert.equal(threads.length, 4);
-
- var threads = m.findAllThreadsNamed('s3c-fb');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 1);
-
- var threads = m.findAllThreadsNamed('kworker/u:5');
- assert.equal(threads.length, 1);
- assert.equal(threads[0].sliceGroup.length, 1);
- assert.equal('fence_wait("display")',
- threads[0].sliceGroup.slices[0].title);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser.html
deleted file mode 100644
index b9579422ed0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/linux_perf/parser.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Parses workqueue events in the Linux event trace format.
- */
-tr.exportTo('tr.e.importer.linux_perf', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Parser = tr.e.importer.linux_perf.Parser;
-
- /**
- * Parses linux workqueue trace events.
- * @constructor
- */
- function WorkqueueParser(importer) {
- Parser.call(this, importer);
-
- importer.registerEventHandler('workqueue_execute_start',
- WorkqueueParser.prototype.executeStartEvent.bind(this));
- importer.registerEventHandler('workqueue_execute_end',
- WorkqueueParser.prototype.executeEndEvent.bind(this));
- importer.registerEventHandler('workqueue_queue_work',
- WorkqueueParser.prototype.executeQueueWork.bind(this));
- importer.registerEventHandler('workqueue_activate_work',
- WorkqueueParser.prototype.executeActivateWork.bind(this));
- }
-
- // Matches the workqueue_execute_start record
- // workqueue_execute_start: work struct c7a8a89c: function MISRWrapper
- var workqueueExecuteStartRE = /work struct (.+): function (\S+)/;
-
- // Matches the workqueue_execute_start record
- // workqueue_execute_end: work struct c7a8a89c
- var workqueueExecuteEndRE = /work struct (.+)/;
-
- WorkqueueParser.prototype = {
- __proto__: Parser.prototype,
-
- /**
- * Parses workqueue events and sets up state in the importer.
- */
- executeStartEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = workqueueExecuteStartRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var kthread = this.importer.getOrCreateKernelThread(eventBase.threadName,
- pid, pid);
- kthread.openSliceTS = ts;
- kthread.openSlice = event[2];
- return true;
- },
-
- executeEndEvent: function(eventName, cpuNumber, pid, ts, eventBase) {
- var event = workqueueExecuteEndRE.exec(eventBase.details);
- if (!event)
- return false;
-
- var kthread = this.importer.getOrCreateKernelThread(eventBase.threadName,
- pid, pid);
- if (kthread.openSlice) {
- var slice = new tr.model.ThreadSlice('', kthread.openSlice,
- ColorScheme.getColorIdForGeneralPurposeString(kthread.openSlice),
- kthread.openSliceTS,
- {},
- ts - kthread.openSliceTS);
-
- kthread.thread.sliceGroup.pushSlice(slice);
- }
- kthread.openSlice = undefined;
- return true;
- },
-
- executeQueueWork: function(eventName, cpuNumber, pid, ts, eventBase) {
- // TODO: Do something with this event?
- return true;
- },
-
- executeActivateWork: function(eventName, cpuNumber, pid, ts, eventBase) {
- // TODO: Do something with this event?
- return true;
- }
-
- };
-
- Parser.register(WorkqueueParser);
-
- return {
- WorkqueueParser: WorkqueueParser
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser_test.html
deleted file mode 100644
index dc3057b6a9b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/linux_perf/workqueue_parser_test.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('workQueueImport', function() {
- var lines = [
- ' kworker/0:3-6880 [000] 2784.771958: workqueue_execute_start: ' +
- 'work struct ffff8800a5083a20: function intel_unpin_work_fn',
- ' kworker/0:3-6880 [000] 2784.771966: workqueue_execute_end: ' +
- 'work struct ffff8800a5083a20',
- ' kworker/1:2-7269 [001] 2784.805966: workqueue_execute_start: ' +
- 'work struct ffff88014fb0f158: function do_dbs_timer',
- ' kworker/1:2-7269 [001] 2784.805975: workqueue_execute_end: ' +
- 'work struct ffff88014fb0f158'
- ];
- var m = tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- assert.isFalse(m.hasImportWarnings);
-
- assert.equal(m.processes['6880'].threads['6880'].sliceGroup.length, 1);
- assert.equal(m.processes['7269'].threads['7269'].sliceGroup.length, 1);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer.html
deleted file mode 100644
index dd0cf112a47..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/importer/simple_line_reader.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.importer', function() {
-
- function Trace2HTMLImporter(model, events) {
- this.importPriority = 0;
- }
-
- Trace2HTMLImporter.subtraces_ = [];
-
- function _extractEventsFromHTML(text) {
- // Clear the array before pushing data to it.
- Trace2HTMLImporter.subtraces_ = [];
-
- var r = new tr.importer.SimpleLineReader(text);
-
- // Try to find viewer-data...
- while (true) {
- if (!r.advanceToLineMatching(
- new RegExp('^<\s*script id="viewer-data" ' +
- 'type="(application\/json|text\/plain)">$')))
- break;
-
- r.beginSavingLines();
- if (!r.advanceToLineMatching(/^<\/\s*script>$/))
- return;
-
- var rawEvents = r.endSavingLinesAndGetResult();
-
- // Drop off first and last event as it contains the end script tag.
- rawEvents = rawEvents.slice(1, rawEvents.length - 1);
- var data64 = rawEvents.join('\n');
- var buffer = new ArrayBuffer(
- tr.b.Base64.getDecodedBufferLength(data64));
- var len = tr.b.Base64.DecodeToTypedArray(data64, new DataView(buffer));
- Trace2HTMLImporter.subtraces_.push(buffer.slice(0, len));
- }
- }
-
- function _canImportFromHTML(text) {
- if (!/^<!DOCTYPE html>/.test(text))
- return false;
-
- // Try to find viewer-data...
- _extractEventsFromHTML(text);
- if (Trace2HTMLImporter.subtraces_.length === 0)
- return false;
- return true;
- }
-
- Trace2HTMLImporter.canImport = function(events) {
- return _canImportFromHTML(events);
- };
-
- Trace2HTMLImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'Trace2HTMLImporter';
- },
-
- isTraceDataContainer: function() {
- return true;
- },
-
- extractSubtraces: function() {
- return Trace2HTMLImporter.subtraces_;
- },
-
- importEvents: function() {
- }
- };
-
-
- tr.importer.Importer.register(Trace2HTMLImporter);
-
-
- return {
- Trace2HTMLImporter: Trace2HTMLImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer_test.html
deleted file mode 100644
index 26eb0e4c87b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace2html_importer_test.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="improt" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/extras/importer/trace2html_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Base64 = tr.b.Base64;
-
- test('simple', function() {
- var htmlLines = [
- '<!DOCTYPE html>',
- '<script id="viewer-data" type="application/json">',
- Base64.btoa('hello'),
- '<\/script>',
- '<script id="viewer-data" type="text/plain">',
- Base64.btoa('world'),
- '<\/script>',
- '</html>'
- ];
- var htmlText = htmlLines.join('\n');
- assert.isTrue(tr.e.importer.Trace2HTMLImporter.canImport(htmlText));
-
- var m = new tr.Model();
- var imp = new tr.e.importer.Trace2HTMLImporter(m, htmlText);
- var subTracesAsBuffers = imp.extractSubtraces();
- var subTracesAsStrings = subTracesAsBuffers.map(function(buffer) {
- var str = '';
- var ary = new Uint8Array(buffer);
- for (var i = 0; i < ary.length; i++)
- str += String.fromCharCode(ary[i]);
- return str;
- });
- assert.deepEqual(subTracesAsStrings, ['hello', 'world']);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry.html
deleted file mode 100644
index 8216b613c16..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/source_info/js_source_info.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview TraceCodeEntry is a wrapper around the V8 CodeEntry that
- * extracts extra context information for each item. This includes things like
- * the source file, line and if the function is a native method or not.
- */
-tr.exportTo('tr.e.importer', function() {
- function TraceCodeEntry(address, size, name, scriptId) {
- this.id_ = tr.b.GUID.allocateSimple();
- this.address_ = address;
- this.size_ = size;
-
- // Stolen from DevTools TimelineJSProfileProcessor._buildCallFrame
- // Code states:
- // (empty) -> compiled
- // ~ -> optimizable
- // * -> optimized
- var rePrefix = /^(\w*:)?([*~]?)(.*)$/m;
- var tokens = rePrefix.exec(name);
- var prefix = tokens[1];
- var state = tokens[2];
- var body = tokens[3];
-
- if (state === '*') {
- state = tr.model.source_info.JSSourceState.OPTIMIZED;
- } else if (state === '~') {
- state = tr.model.source_info.JSSourceState.OPTIMIZABLE;
- } else if (state === '') {
- state = tr.model.source_info.JSSourceState.COMPILED;
- } else {
- console.warning('Unknown v8 code state ' + state);
- state = tr.model.source_info.JSSourceState.UNKNOWN;
- }
-
- var rawName;
- var rawUrl;
- if (prefix === 'Script:') {
- rawName = '';
- rawUrl = body;
- } else {
- var spacePos = body.lastIndexOf(' ');
- rawName = spacePos !== -1 ? body.substr(0, spacePos) : body;
- rawUrl = spacePos !== -1 ? body.substr(spacePos + 1) : '';
- }
-
- function splitLineAndColumn(url) {
- var lineColumnRegEx = /(?::(\d+))?(?::(\d+))?$/;
- var lineColumnMatch = lineColumnRegEx.exec(url);
- var lineNumber;
- var columnNumber;
-
- if (typeof(lineColumnMatch[1]) === 'string') {
- lineNumber = parseInt(lineColumnMatch[1], 10);
- // Immediately convert line and column to 0-based numbers.
- lineNumber = isNaN(lineNumber) ? undefined : lineNumber - 1;
- }
- if (typeof(lineColumnMatch[2]) === 'string') {
- columnNumber = parseInt(lineColumnMatch[2], 10);
- columnNumber = isNaN(columnNumber) ? undefined : columnNumber - 1;
- }
-
- return {
- url: url.substring(0, url.length - lineColumnMatch[0].length),
- lineNumber: lineNumber,
- columnNumber: columnNumber
- };
- }
-
- var nativeSuffix = ' native';
- var isNative = rawName.endsWith(nativeSuffix);
- this.name_ =
- isNative ? rawName.slice(0, -nativeSuffix.length) : rawName;
-
- var urlData = splitLineAndColumn(rawUrl);
- var url = urlData.url || '';
- var line = urlData.lineNumber || 0;
- var column = urlData.columnNumber || 0;
-
- this.sourceInfo_ = new tr.model.source_info.JSSourceInfo(
- url, line, column, isNative, scriptId, state);
- };
-
- TraceCodeEntry.prototype = {
- get id() {
- return this.id_;
- },
-
- get sourceInfo() {
- return this.sourceInfo_;
- },
-
- get name() {
- return this.name_;
- },
-
- set address(address) {
- this.address_ = address;
- },
-
- get address() {
- return this.address_;
- },
-
- set size(size) {
- this.size_ = size;
- },
-
- get size() {
- return this.size_;
- }
- };
-
- return {
- TraceCodeEntry: TraceCodeEntry
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry_test.html
deleted file mode 100644
index 917081c7fb7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_entry_test.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/trace_code_entry.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('lazy_compile_method', function() {
- var tce = new tr.e.importer.TraceCodeEntry(
- '0x123', 10, 'Handler:timeStamp', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'timeStamp');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, '');
- assert.equal(tce.sourceInfo.line, -1);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('non_lazy_compile_method', function() {
- var tce = new tr.e.importer.TraceCodeEntry(
- '0x123', 10, 'Handler:timeStamp', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'timeStamp');
- assert.equal(tce.sourceInfo.state, 'compiled');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, '');
- assert.equal(tce.sourceInfo.line, -1);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('native_matching', function() {
- var tce = new tr.e.importer.TraceCodeEntry('0x123', 10,
- 'LazyCompile:~IsAccessorDescriptor native v8natives.js:183', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'IsAccessorDescriptor');
- assert.equal(tce.sourceInfo.isNative, true);
- assert.equal(tce.sourceInfo.state, 'optimizable');
- assert.equal(tce.sourceInfo.file, 'v8natives.js');
- assert.equal(tce.sourceInfo.line, 182);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('strips_*_from_name', function() {
- var tce = new tr.e.importer.TraceCodeEntry('0x123', 10,
- 'LazyCompile:*IsAccessorDescriptor native v8natives.js:183', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'IsAccessorDescriptor');
- assert.equal(tce.sourceInfo.isNative, true);
- assert.equal(tce.sourceInfo.state, 'optimized');
- assert.equal(tce.sourceInfo.file, 'v8natives.js');
- assert.equal(tce.sourceInfo.line, 182);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('non_native_matching', function() {
- var tce = new tr.e.importer.TraceCodeEntry('0x123', 10,
- 'LazyCompile:~IsAccessorDescriptor v8natives.js:183', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'IsAccessorDescriptor');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, 'v8natives.js');
- assert.equal(tce.sourceInfo.line, 182);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('lazy_compile_without_script', function() {
- var tce = new tr.e.importer.TraceCodeEntry(
- '0x123', 10, 'LazyCompile:~Object', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'Object');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, '');
- assert.equal(tce.sourceInfo.line, -1);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('line_matching_without_script', function() {
- var tce = new tr.e.importer.TraceCodeEntry('0x123', 10,
- 'LazyCompile:~Object :220', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, 'Object');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, '');
- assert.equal(tce.sourceInfo.line, 219);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-
- test('unknown_method_name', function() {
- var tce = new tr.e.importer.TraceCodeEntry('0x123', 10, 'LazyCompile:', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, '');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, '');
- assert.equal(tce.sourceInfo.line, -1);
- assert.equal(tce.sourceInfo.scriptId, 12);
-
- var tce = new tr.e.importer.TraceCodeEntry(
- '0x123', 10, 'LazyCompile:~ :37', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, '');
- assert.equal(tce.sourceInfo.isNative, false);
- assert.equal(tce.sourceInfo.file, '');
- assert.equal(tce.sourceInfo.line, 36);
- assert.equal(tce.sourceInfo.scriptId, 12);
-
- var tce = new tr.e.importer.TraceCodeEntry('0x123', 10,
- 'LazyCompile:~ native liveedit.js:37:10', 12);
- assert.equal(tce.size, 10);
- assert.equal(tce.name, '');
- assert.equal(tce.sourceInfo.isNative, true);
- assert.equal(tce.sourceInfo.file, 'liveedit.js');
- assert.equal(tce.sourceInfo.line, 36);
- assert.equal(tce.sourceInfo.column, 9);
- assert.equal(tce.sourceInfo.scriptId, 12);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_map.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_map.html
deleted file mode 100644
index c677d2f5c86..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_code_map.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel='import' href='/tracing/extras/importer/trace_code_entry.html'>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.importer', function() {
- // This code is a tracification of:
- // devtools/front_end/timeline/TimelineJSProfile.js
- function TraceCodeMap() {
- this.banks_ = new Map();
- }
-
- TraceCodeMap.prototype = {
- addEntry: function(addressHex, size, name, scriptId) {
- var entry = new tr.e.importer.TraceCodeEntry(
- this.getAddress_(addressHex), size, name, scriptId);
-
- this.addEntry_(addressHex, entry);
- },
-
- moveEntry: function(oldAddressHex, newAddressHex, size) {
- var entry = this.getBank_(oldAddressHex)
- .removeEntry(this.getAddress_(oldAddressHex));
- if (!entry)
- return;
-
- entry.address = this.getAddress_(newAddressHex);
- entry.size = size;
- this.addEntry_(newAddressHex, entry);
- },
-
- lookupEntry: function(addressHex) {
- return this.getBank_(addressHex)
- .lookupEntry(this.getAddress_(addressHex));
- },
-
- addEntry_: function(addressHex, entry) {
- // FIXME: Handle bank spanning addresses ...
- this.getBank_(addressHex).addEntry(entry);
- },
-
- getAddress_: function(addressHex) {
- // 13 hex digits === 52 bits, double mantissa fits 53 bits.
- var bankSizeHexDigits = 13;
- addressHex = addressHex.slice(2); // cut 0x prefix.
- return parseInt(addressHex.slice(-bankSizeHexDigits), 16);
- },
-
- getBank_: function(addressHex) {
- addressHex = addressHex.slice(2); // cut 0x prefix.
-
- // 13 hex digits === 52 bits, double mantissa fits 53 bits.
- var bankSizeHexDigits = 13;
- var maxHexDigits = 16;
- var bankName = addressHex.slice(-maxHexDigits, -bankSizeHexDigits);
- var bank = this.banks_.get(bankName);
- if (!bank) {
- bank = new TraceCodeBank();
- this.banks_.set(bankName, bank);
- }
- return bank;
- }
- };
-
- function TraceCodeBank() {
- this.entries_ = [];
- }
-
- TraceCodeBank.prototype = {
- removeEntry: function(address) {
- // findLowIndexInSortedArray returns 1 for empty. Just handle the
- // empty list and bail early.
- if (this.entries_.length === 0)
- return undefined;
-
- var index = tr.b.findLowIndexInSortedArray(
- this.entries_, function(entry) { return entry.address; }, address);
- var entry = this.entries_[index];
- if (!entry || entry.address !== address)
- return undefined;
-
- this.entries_.splice(index, 1);
- return entry;
- },
-
- lookupEntry: function(address) {
- var index = tr.b.findHighIndexInSortedArray(
- this.entries_, function(e) { return address - e.address; }) - 1;
- var entry = this.entries_[index];
- return entry &&
- address < entry.address + entry.size ? entry : undefined;
- },
-
- addEntry: function(newEntry) {
- // findLowIndexInSortedArray returns 1 for empty list. Just push the
- // new address as it's the only item.
- if (this.entries_.length === 0)
- this.entries_.push(newEntry);
-
- var endAddress = newEntry.address + newEntry.size;
- var lastIndex = tr.b.findLowIndexInSortedArray(
- this.entries_, function(entry) { return entry.address; }, endAddress);
- var index;
- for (index = lastIndex - 1; index >= 0; --index) {
- var entry = this.entries_[index];
- var entryEndAddress = entry.address + entry.size;
- if (entryEndAddress <= newEntry.address)
- break;
- }
- ++index;
- this.entries_.splice(index, lastIndex - index, newEntry);
- }
- };
-
- return {
- TraceCodeMap: TraceCodeMap
- };
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer.html
deleted file mode 100644
index d3db68ef7fe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer.html
+++ /dev/null
@@ -1,3077 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_code_entry.html">
-<link rel="import" href="/tracing/extras/importer/trace_code_map.html">
-<link rel="import" href="/tracing/extras/importer/v8/codemap.html">
-<link rel="import" href="/tracing/importer/context_processor.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/comment_box_annotation.html">
-<link rel="import" href="/tracing/model/constants.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-<link rel="import" href="/tracing/model/flow_event.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/heap_dump.html">
-<link rel="import" href="/tracing/model/instant_event.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/rect_annotation.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import" href="/tracing/model/x_marker_annotation.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview TraceEventImporter imports TraceEvent-formatted data
- * into the provided model.
- */
-tr.exportTo('tr.e.importer', function() {
- var Base64 = tr.b.Base64;
- var deepCopy = tr.b.deepCopy;
- var ColorScheme = tr.b.ColorScheme;
-
- function getEventColor(event, opt_customName) {
- if (event.cname)
- return ColorScheme.getColorIdForReservedName(event.cname);
- else if (opt_customName || event.name) {
- return ColorScheme.getColorIdForGeneralPurposeString(
- opt_customName || event.name);
- }
- }
-
- var PRODUCER = 'producer';
- var CONSUMER = 'consumer';
- var STEP = 'step';
-
- var BACKGROUND = tr.model.ContainerMemoryDump.LevelOfDetail.BACKGROUND;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
- var MEMORY_DUMP_LEVEL_OF_DETAIL_ORDER = [undefined, BACKGROUND, LIGHT,
- DETAILED];
-
- var GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX = 'global/';
-
- var ASYNC_CLOCK_SYNC_EVENT_TITLE_PREFIX = 'ClockSyncEvent.';
-
- // Map from raw memory dump byte stat names to model byte stat names. See
- // //base/trace_event/process_memory_maps.cc in Chromium.
- var BYTE_STAT_NAME_MAP = {
- 'pc': 'privateCleanResident',
- 'pd': 'privateDirtyResident',
- 'sc': 'sharedCleanResident',
- 'sd': 'sharedDirtyResident',
- 'pss': 'proportionalResident',
- 'sw': 'swapped'
- };
-
- // See tr.model.MemoryAllocatorDump 'weak' field and
- // base::trace_event::MemoryAllocatorDump::Flags::WEAK in the Chromium
- // codebase.
- var WEAK_MEMORY_ALLOCATOR_DUMP_FLAG = 1 << 0;
-
- // Object type name patterns for various compilers.
- var OBJECT_TYPE_NAME_PATTERNS = [
- {
- // Clang.
- prefix: 'const char *WTF::getStringWithTypeName() [T = ',
- suffix: ']'
- },
- {
- // GCC.
- prefix: 'const char* WTF::getStringWithTypeName() [with T = ',
- suffix: ']'
- },
- {
- // Microsoft Visual C++
- prefix: 'const char *__cdecl WTF::getStringWithTypeName<',
- suffix: '>(void)'
- }
- ];
-
- // The list of fields on the trace that are known to contain subtraces.
- var SUBTRACE_FIELDS = new Set([
- 'powerTraceAsString',
- 'systemTraceEvents',
- ]);
-
- // The complete list of fields on the trace that should not be treated as
- // trace metadata.
- var NON_METADATA_FIELDS = new Set([
- 'samples',
- 'stackFrames',
- 'traceAnnotations',
- 'traceEvents'
- ]);
- // TODO(charliea): Replace this with the spread (...) operator in literal
- // above once v8 is updated to a sufficiently recent version (>M45).
- for (var subtraceField in SUBTRACE_FIELDS)
- NON_METADATA_FIELDS.add(subtraceField);
-
- function TraceEventImporter(model, eventData) {
- this.importPriority = 1;
- this.model_ = model;
- this.events_ = undefined;
- this.sampleEvents_ = undefined;
- this.stackFrameEvents_ = undefined;
- this.subtraces_ = [];
- this.eventsWereFromString_ = false;
- this.softwareMeasuredCpuCount_ = undefined;
-
-
- this.allAsyncEvents_ = [];
- this.allFlowEvents_ = [];
- this.allObjectEvents_ = [];
-
- this.contextProcessorPerThread = {};
-
- this.traceEventSampleStackFramesByName_ = {};
-
- this.v8ProcessCodeMaps_ = {};
- this.v8ProcessRootStackFrame_ = {};
- this.v8SamplingData_ = [];
-
- // For tracking async events that is used to create back-compat clock sync
- // event.
- this.asyncClockSyncStart_ = undefined;
- this.asyncClockSyncFinish_ = undefined;
-
- // Dump ID -> PID -> [process memory dump events].
- this.allMemoryDumpEvents_ = {};
-
- // PID -> Object type ID -> Object type name.
- this.objectTypeNameMap_ = {};
-
- // For old Chrome traces with no clock domain metadata, just use a
- // placeholder clock domain.
- this.clockDomainId_ = tr.model.ClockDomainId.UNKNOWN_CHROME_LEGACY;
- // A function able to transform timestamps in |clockDomainId| to timestamps
- // in the model clock domain.
- this.toModelTime_ = undefined;
-
- if (typeof(eventData) === 'string' || eventData instanceof String) {
- eventData = eventData.trim();
- // If the event data begins with a [, then we know it should end with a ].
- // The reason we check for this is because some tracing implementations
- // cannot guarantee that a ']' gets written to the trace file. So, we are
- // forgiving and if this is obviously the case, we fix it up before
- // throwing the string at JSON.parse.
- if (eventData[0] === '[') {
- eventData = eventData.replace(/\s*,\s*$/, '');
- if (eventData[eventData.length - 1] !== ']')
- eventData = eventData + ']';
- }
-
- this.events_ = JSON.parse(eventData);
- this.eventsWereFromString_ = true;
- } else {
- this.events_ = eventData;
- }
-
- this.traceAnnotations_ = this.events_.traceAnnotations;
-
- // Some trace_event implementations put the actual trace events
- // inside a container. E.g { ... , traceEvents: [ ] }
- // If we see that, just pull out the trace events.
- if (this.events_.traceEvents) {
- var container = this.events_;
- this.events_ = this.events_.traceEvents;
-
- // Some trace authors store subtraces as specific properties of the trace.
- for (var subtraceField of SUBTRACE_FIELDS)
- if (container[subtraceField])
- this.subtraces_.push(container[subtraceField]);
-
- // Sampling data.
- this.sampleEvents_ = container.samples;
- this.stackFrameEvents_ = container.stackFrames;
-
- // Some implementations specify displayTimeUnit
- if (container.displayTimeUnit) {
- var unitName = container.displayTimeUnit;
- var unit = tr.b.TimeDisplayModes[unitName];
- if (unit === undefined) {
- throw new Error('Unit ' + unitName + ' is not supported.');
- }
- this.model_.intrinsicTimeUnit = unit;
- }
-
- // Any other fields in the container should be treated as metadata.
- for (var fieldName in container) {
- if (NON_METADATA_FIELDS.has(fieldName))
- continue;
-
- this.model_.metadata.push(
- { name: fieldName, value: container[fieldName] });
-
- if (fieldName === 'metadata') {
- var metadata = container[fieldName];
- if (metadata['highres-ticks'])
- this.model_.isTimeHighResolution = metadata['highres-ticks'];
- if (metadata['clock-domain'])
- this.clockDomainId_ = metadata['clock-domain'];
- }
- }
- }
- }
-
- /**
- * @return {boolean} Whether obj is a TraceEvent array.
- */
- TraceEventImporter.canImport = function(eventData) {
- // May be encoded JSON. But we dont want to parse it fully yet.
- // Use a simple heuristic:
- // - eventData that starts with [ are probably trace_event
- // - eventData that starts with { are probably trace_event
- // May be encoded JSON. Treat files that start with { as importable by us.
- if (typeof(eventData) === 'string' || eventData instanceof String) {
- eventData = eventData.trim();
- return eventData[0] === '{' || eventData[0] === '[';
- }
-
- // Might just be an array of events
- if (eventData instanceof Array && eventData.length && eventData[0].ph)
- return true;
-
- // Might be an object with a traceEvents field in it.
- if (eventData.traceEvents) {
- if (eventData.traceEvents instanceof Array) {
- if (eventData.traceEvents.length && eventData.traceEvents[0].ph)
- return true;
- if (eventData.samples.length && eventData.stackFrames !== undefined)
- return true;
- }
- }
-
- return false;
- };
-
- TraceEventImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'TraceEventImporter';
- },
-
- extractSubtraces: function() {
- // Because subtraces can be quite large, we need to make sure that we
- // don't hold a reference to the memory.
- var subtraces = this.subtraces_;
- this.subtraces_ = [];
- return subtraces;
- },
-
- /**
- * Deep copying is only needed if the trace was given to us as events.
- */
- deepCopyIfNeeded_: function(obj) {
- if (obj === undefined)
- obj = {};
- if (this.eventsWereFromString_)
- return obj;
- return deepCopy(obj);
- },
-
- /**
- * Always perform deep copying.
- */
- deepCopyAlways_: function(obj) {
- if (obj === undefined)
- obj = {};
- return deepCopy(obj);
- },
-
- /**
- * Helper to process an async event.
- */
- processAsyncEvent: function(event) {
- var thread = this.model_.getOrCreateProcess(event.pid).
- getOrCreateThread(event.tid);
- this.allAsyncEvents_.push({
- sequenceNumber: this.allAsyncEvents_.length,
- event: event,
- thread: thread
- });
- },
-
- /**
- * Helper to process a flow event.
- */
- processFlowEvent: function(event, opt_slice) {
- var thread = this.model_.getOrCreateProcess(event.pid).
- getOrCreateThread(event.tid);
- this.allFlowEvents_.push({
- refGuid: tr.b.GUID.getLastSimpleGuid(),
- sequenceNumber: this.allFlowEvents_.length,
- event: event,
- slice: opt_slice, // slice for events that have flow info
- thread: thread
- });
- },
-
- /**
- * Helper that creates and adds samples to a Counter object based on
- * 'C' phase events.
- */
- processCounterEvent: function(event) {
- var ctrName;
- if (event.id !== undefined)
- ctrName = event.name + '[' + event.id + ']';
- else
- ctrName = event.name;
-
- var ctr = this.model_.getOrCreateProcess(event.pid)
- .getOrCreateCounter(event.cat, ctrName);
- var reservedColorId = event.cname ? getEventColor(event) : undefined;
-
- // Initialize the counter's series fields if needed.
- if (ctr.numSeries === 0) {
- for (var seriesName in event.args) {
- var colorId = reservedColorId ||
- getEventColor(event, ctr.name + '.' + seriesName);
- ctr.addSeries(new tr.model.CounterSeries(seriesName, colorId));
- }
-
- if (ctr.numSeries === 0) {
- this.model_.importWarning({
- type: 'counter_parse_error',
- message: 'Expected counter ' + event.name +
- ' to have at least one argument to use as a value.'
- });
-
- // Drop the counter.
- delete ctr.parent.counters[ctr.name];
- return;
- }
- }
-
- var ts = this.toModelTimeFromUs_(event.ts);
- ctr.series.forEach(function(series) {
- var val = event.args[series.name] ? event.args[series.name] : 0;
- series.addCounterSample(ts, val);
- });
- },
-
- scopedIdForEvent_: function(event) {
- return new tr.model.ScopedId(
- event.scope || tr.model.OBJECT_DEFAULT_SCOPE, event.id);
- },
-
- processObjectEvent: function(event) {
- var thread = this.model_.getOrCreateProcess(event.pid).
- getOrCreateThread(event.tid);
- this.allObjectEvents_.push({
- sequenceNumber: this.allObjectEvents_.length,
- event: event,
- thread: thread});
- if (thread.guid in this.contextProcessorPerThread) {
- var processor = this.contextProcessorPerThread[thread.guid];
- var scopedId = this.scopedIdForEvent_(event);
- if (event.ph === 'D')
- processor.destroyContext(scopedId);
- // The context processor maintains a cache of unique context objects and
- // active context sets to reduce memory usage. If an object is modified,
- // we should invalidate this cache, because otherwise context sets from
- // before and after the modification may erroneously point to the same
- // context snapshot (as both are the same set/object instances).
- processor.invalidateContextCacheForSnapshot(scopedId);
- }
- },
-
- processContextEvent: function(event) {
- var thread = this.model_.getOrCreateProcess(event.pid).
- getOrCreateThread(event.tid);
- if (!(thread.guid in this.contextProcessorPerThread)) {
- this.contextProcessorPerThread[thread.guid] =
- new tr.importer.ContextProcessor(this.model_);
- }
- var scopedId = this.scopedIdForEvent_(event);
- var contextType = event.name;
- var processor = this.contextProcessorPerThread[thread.guid];
- if (event.ph === '(') {
- processor.enterContext(contextType, scopedId);
- } else if (event.ph === ')') {
- processor.leaveContext(contextType, scopedId);
- } else {
- this.model_.importWarning({
- type: 'unknown_context_phase',
- message: 'Unknown context event phase: ' + event.ph + '.'
- });
- }
- },
-
- setContextsFromThread_: function(thread, slice) {
- if (thread.guid in this.contextProcessorPerThread) {
- slice.contexts =
- this.contextProcessorPerThread[thread.guid].activeContexts;
- }
- },
-
- processDurationEvent: function(event) {
- var thread = this.model_.getOrCreateProcess(event.pid)
- .getOrCreateThread(event.tid);
- var ts = this.toModelTimeFromUs_(event.ts);
- if (!thread.sliceGroup.isTimestampValidForBeginOrEnd(ts)) {
- this.model_.importWarning({
- type: 'duration_parse_error',
- message: 'Timestamps are moving backward.'
- });
- return;
- }
-
- if (event.ph === 'B') {
- var slice = thread.sliceGroup.beginSlice(
- event.cat, event.name, this.toModelTimeFromUs_(event.ts),
- this.deepCopyIfNeeded_(event.args),
- this.toModelTimeFromUs_(event.tts), event.argsStripped,
- getEventColor(event));
- slice.startStackFrame = this.getStackFrameForEvent_(event);
- this.setContextsFromThread_(thread, slice);
- } else if (event.ph === 'I' || event.ph === 'i' || event.ph === 'R') {
- if (event.s !== undefined && event.s !== 't')
- throw new Error('This should never happen');
-
- thread.sliceGroup.beginSlice(event.cat, event.name,
- this.toModelTimeFromUs_(event.ts),
- this.deepCopyIfNeeded_(event.args),
- this.toModelTimeFromUs_(event.tts),
- event.argsStripped,
- getEventColor(event));
- var slice = thread.sliceGroup.endSlice(
- this.toModelTimeFromUs_(event.ts),
- this.toModelTimeFromUs_(event.tts));
- slice.startStackFrame = this.getStackFrameForEvent_(event);
- slice.endStackFrame = undefined;
- } else {
- if (!thread.sliceGroup.openSliceCount) {
- this.model_.importWarning({
- type: 'duration_parse_error',
- message: 'E phase event without a matching B phase event.'
- });
- return;
- }
-
- var slice = thread.sliceGroup.endSlice(
- this.toModelTimeFromUs_(event.ts),
- this.toModelTimeFromUs_(event.tts),
- getEventColor(event));
- if (event.name && slice.title !== event.name) {
- this.model_.importWarning({
- type: 'title_match_error',
- message: 'Titles do not match. Title is ' +
- slice.title + ' in openSlice, and is ' +
- event.name + ' in endSlice'
- });
- }
- slice.endStackFrame = this.getStackFrameForEvent_(event);
-
- this.mergeArgsInto_(slice.args, event.args, slice.title);
- }
- },
-
- mergeArgsInto_: function(dstArgs, srcArgs, eventName) {
- for (var arg in srcArgs) {
- if (dstArgs[arg] !== undefined) {
- this.model_.importWarning({
- type: 'arg_merge_error',
- message: 'Different phases of ' + eventName +
- ' provided values for argument ' + arg + '.' +
- ' The last provided value will be used.'
- });
- }
- dstArgs[arg] = this.deepCopyIfNeeded_(srcArgs[arg]);
- }
- },
-
- processCompleteEvent: function(event) {
- // Preventing the overhead slices from making it into the model. This
- // only applies to legacy traces, as the overhead traces have been
- // removed from the chromium code.
- if (event.cat !== undefined &&
- event.cat.indexOf('trace_event_overhead') > -1)
- return undefined;
-
- var thread = this.model_.getOrCreateProcess(event.pid)
- .getOrCreateThread(event.tid);
-
- if (event.flow_out) {
- if (event.flow_in)
- event.flowPhase = STEP;
- else
- event.flowPhase = PRODUCER;
- } else if (event.flow_in) {
- event.flowPhase = CONSUMER;
- }
-
- var slice = thread.sliceGroup.pushCompleteSlice(event.cat, event.name,
-
- this.toModelTimeFromUs_(event.ts),
- this.maybeToModelTimeFromUs_(event.dur),
- this.maybeToModelTimeFromUs_(event.tts),
- this.maybeToModelTimeFromUs_(event.tdur),
- this.deepCopyIfNeeded_(event.args),
- event.argsStripped,
- getEventColor(event),
- event.bind_id);
- slice.startStackFrame = this.getStackFrameForEvent_(event);
- slice.endStackFrame = this.getStackFrameForEvent_(event, true);
- this.setContextsFromThread_(thread, slice);
-
- return slice;
- },
-
- processJitCodeEvent: function(event) {
- if (this.v8ProcessCodeMaps_[event.pid] === undefined)
- this.v8ProcessCodeMaps_[event.pid] = new tr.e.importer.TraceCodeMap();
- var map = this.v8ProcessCodeMaps_[event.pid];
-
- var data = event.args.data;
- // TODO(dsinclair): There are _a lot_ of JitCode events so I'm skipping
- // the display for now. Can revisit later if we want to show them.
- // Handle JitCodeMoved and JitCodeAdded event.
- if (event.name === 'JitCodeMoved')
- map.moveEntry(data.code_start, data.new_code_start, data.code_len);
- else // event.name === 'JitCodeAdded'
- map.addEntry(data.code_start, data.code_len, data.name, data.script_id);
- },
-
- processMetadataEvent: function(event) {
- // V8 JIT events are currently logged as phase 'M' so we need to
- // separate them out and handle specially.
- if (event.name === 'JitCodeAdded' || event.name === 'JitCodeMoved') {
- this.v8SamplingData_.push(event);
- return;
- }
-
- // The metadata events aren't useful without args.
- if (event.argsStripped)
- return;
-
- if (event.name === 'process_name') {
- var process = this.model_.getOrCreateProcess(event.pid);
- process.name = event.args.name;
- } else if (event.name === 'process_labels') {
- var process = this.model_.getOrCreateProcess(event.pid);
- var labels = event.args.labels.split(',');
- for (var i = 0; i < labels.length; i++)
- process.addLabelIfNeeded(labels[i]);
- } else if (event.name === 'process_sort_index') {
- var process = this.model_.getOrCreateProcess(event.pid);
- process.sortIndex = event.args.sort_index;
- } else if (event.name === 'thread_name') {
- var thread = this.model_.getOrCreateProcess(event.pid).
- getOrCreateThread(event.tid);
- thread.name = event.args.name;
- } else if (event.name === 'thread_sort_index') {
- var thread = this.model_.getOrCreateProcess(event.pid).
- getOrCreateThread(event.tid);
- thread.sortIndex = event.args.sort_index;
- } else if (event.name === 'num_cpus') {
- var n = event.args.number;
- // Not all render processes agree on the cpu count in trace_event. Some
- // processes will report 1, while others will report the actual cpu
- // count. To deal with this, take the max of what is reported.
- if (this.softwareMeasuredCpuCount_ !== undefined)
- n = Math.max(n, this.softwareMeasuredCpuCount_);
- this.softwareMeasuredCpuCount_ = n;
- } else if (event.name === 'stackFrames') {
- var stackFrames = event.args.stackFrames;
- if (stackFrames === undefined) {
- this.model_.importWarning({
- type: 'metadata_parse_error',
- message: 'No stack frames found in a \'' + event.name +
- '\' metadata event'
- });
- } else {
- this.importStackFrames_(stackFrames, 'p' + event.pid + ':');
- }
- } else if (event.name === 'typeNames') {
- var objectTypeNameMap = event.args.typeNames;
- if (objectTypeNameMap === undefined) {
- this.model_.importWarning({
- type: 'metadata_parse_error',
- message: 'No mapping from object type IDs to names found in a \'' +
- event.name + '\' metadata event'
- });
- } else {
- this.importObjectTypeNameMap_(objectTypeNameMap, event.pid);
- }
- } else if (event.name === 'TraceConfig') {
- this.model_.metadata.push(
- {name: 'TraceConfig', value: event.args.value});
- } else {
- this.model_.importWarning({
- type: 'metadata_parse_error',
- message: 'Unrecognized metadata name: ' + event.name
- });
- }
- },
-
- processInstantEvent: function(event) {
- // V8 JIT events were logged as phase 'I' in the old format,
- // so we need to separate them out and handle specially.
- if (event.name === 'JitCodeAdded' || event.name === 'JitCodeMoved') {
- this.v8SamplingData_.push(event);
- return;
- }
-
- // Thread-level instant events are treated as zero-duration slices.
- if (event.s === 't' || event.s === undefined) {
- this.processDurationEvent(event);
- return;
- }
-
- var constructor;
- switch (event.s) {
- case 'g':
- constructor = tr.model.GlobalInstantEvent;
- break;
- case 'p':
- constructor = tr.model.ProcessInstantEvent;
- break;
- default:
- this.model_.importWarning({
- type: 'instant_parse_error',
- message: 'I phase event with unknown "s" field value.'
- });
- return;
- }
-
- var instantEvent = new constructor(event.cat, event.name,
- getEventColor(event), this.toModelTimeFromUs_(event.ts),
- this.deepCopyIfNeeded_(event.args));
-
- switch (instantEvent.type) {
- case tr.model.InstantEventType.GLOBAL:
- this.model_.instantEvents.push(instantEvent);
- break;
-
- case tr.model.InstantEventType.PROCESS:
- var process = this.model_.getOrCreateProcess(event.pid);
- process.instantEvents.push(instantEvent);
- break;
-
- default:
- throw new Error('Unknown instant event type: ' + event.s);
- }
- },
-
- processV8Sample: function(event) {
- var data = event.args.data;
-
- // As-per DevTools, the backend sometimes creates bogus samples. Skip it.
- if (data.vm_state === 'js' && !data.stack.length)
- return;
-
- var rootStackFrame = this.v8ProcessRootStackFrame_[event.pid];
- if (!rootStackFrame) {
- rootStackFrame = new tr.model.StackFrame(
- undefined /* parent */, 'v8-root-stack-frame' /* id */,
- 'v8-root-stack-frame' /* title */, 0 /* colorId */);
- this.v8ProcessRootStackFrame_[event.pid] = rootStackFrame;
- }
-
- function findChildWithEntryID(stackFrame, entryID) {
- return tr.b.findFirstInArray(stackFrame.children, function(child) {
- return child.entryID === entryID;
- });
- }
-
- var model = this.model_;
- function addStackFrame(lastStackFrame, entry) {
- var childFrame = findChildWithEntryID(lastStackFrame, entry.id);
- if (childFrame)
- return childFrame;
-
- var frame = new tr.model.StackFrame(
- lastStackFrame, tr.b.GUID.allocateSimple(), entry.name,
- ColorScheme.getColorIdForGeneralPurposeString(entry.name),
- entry.sourceInfo);
-
- frame.entryID = entry.id;
- model.addStackFrame(frame);
- return frame;
- }
-
- var lastStackFrame = rootStackFrame;
-
- // There are several types of v8 sample events, gc, native, compiler, etc.
- // Some of these types have stacks and some don't, we handle those two
- // cases differently. For types that don't have any stack frames attached
- // we synthesize one based on the type of thing that's happening so when
- // we view all the samples we'll see something like 'external' or 'gc'
- // as a fraction of the time spent.
- if (data.stack.length > 0 && this.v8ProcessCodeMaps_[event.pid]) {
- var map = this.v8ProcessCodeMaps_[event.pid];
-
- // Stacks have the leaf node first, flip them around so the root
- // comes first.
- data.stack.reverse();
-
- for (var i = 0; i < data.stack.length; i++) {
- var entry = map.lookupEntry(data.stack[i]);
- if (entry === undefined) {
- entry = {
- id: 'unknown',
- name: 'unknown',
- sourceInfo: undefined
- };
- }
-
- lastStackFrame = addStackFrame(lastStackFrame, entry);
- }
- } else {
- var entry = {
- id: data.vm_state,
- name: data.vm_state,
- sourceInfo: undefined
- };
- lastStackFrame = addStackFrame(lastStackFrame, entry);
- }
-
- var thread = this.model_.getOrCreateProcess(event.pid)
- .getOrCreateThread(event.tid);
-
- var sample = new tr.model.Sample(
- undefined /* cpu */, thread, 'V8 Sample',
- this.toModelTimeFromUs_(event.ts), lastStackFrame, 1 /* weight */,
- this.deepCopyIfNeeded_(event.args));
- this.model_.samples.push(sample);
- },
-
- processTraceSampleEvent: function(event) {
- if (event.name === 'V8Sample') {
- this.v8SamplingData_.push(event);
- return;
- }
-
- var stackFrame = this.getStackFrameForEvent_(event);
- if (stackFrame === undefined) {
- stackFrame = this.traceEventSampleStackFramesByName_[
- event.name];
- }
- if (stackFrame === undefined) {
- var id = 'te-' + tr.b.GUID.allocateSimple();
- stackFrame = new tr.model.StackFrame(
- undefined, id, event.name,
- ColorScheme.getColorIdForGeneralPurposeString(event.name));
- this.model_.addStackFrame(stackFrame);
- this.traceEventSampleStackFramesByName_[event.name] = stackFrame;
- }
-
- var thread = this.model_.getOrCreateProcess(event.pid)
- .getOrCreateThread(event.tid);
-
- var sample = new tr.model.Sample(
- undefined, thread, 'Trace Event Sample',
- this.toModelTimeFromUs_(event.ts), stackFrame, 1,
- this.deepCopyIfNeeded_(event.args));
- this.setContextsFromThread_(thread, sample);
- this.model_.samples.push(sample);
- },
-
- processMemoryDumpEvent: function(event) {
- if (event.ph !== 'v')
- throw new Error('Invalid memory dump event phase "' + event.ph + '".');
-
- var dumpId = event.id;
- if (dumpId === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory dump event (phase \'' + event.ph +
- '\') without a dump ID.'
- });
- return;
- }
-
- var pid = event.pid;
- if (pid === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory dump event (phase\'' + event.ph + '\', dump ID \'' +
- dumpId + '\') without a PID.'
- });
- return;
- }
-
- // Dump ID -> PID -> [process memory dump events].
- var allEvents = this.allMemoryDumpEvents_;
-
- // PID -> [process memory dump events].
- var dumpIdEvents = allEvents[dumpId];
- if (dumpIdEvents === undefined)
- allEvents[dumpId] = dumpIdEvents = {};
-
- // [process memory dump events].
- var processEvents = dumpIdEvents[pid];
- if (processEvents === undefined)
- dumpIdEvents[pid] = processEvents = [];
-
- processEvents.push(event);
- },
-
- processClockSyncEvent: function(event) {
- if (event.ph !== 'c')
- throw new Error('Invalid clock sync event phase "' + event.ph + '".');
-
- var syncId = event.args.sync_id;
- if (syncId === undefined) {
- this.model_.importWarning({
- type: 'clock_sync_parse_error',
- message: 'Clock sync at time ' + event.ts + ' without an ID.'
- });
- return;
- }
-
- if (event.args && event.args.issue_ts !== undefined) {
- // When Chrome is the tracing controller and is the requester of the
- // clock sync, the clock sync event looks like:
- //
- // {
- // "args": {
- // "sync_id": "abc123",
- // "issue_ts": 12340
- // }
- // "ph": "c"
- // "ts": 12345
- // ...
- // }
- this.model_.clockSyncManager.addClockSyncMarker(
- this.clockDomainId_, syncId,
- tr.b.Unit.timestampFromUs(event.args.issue_ts),
- tr.b.Unit.timestampFromUs(event.ts));
- } else {
- // When Chrome is a tracing agent and is the recipient of the clock
- // sync request, the clock sync event looks like:
- //
- // {
- // "args": { "sync_id": "abc123" }
- // "ph": "c"
- // "ts": 12345
- // ...
- // }
- this.model_.clockSyncManager.addClockSyncMarker(
- this.clockDomainId_, syncId, tr.b.Unit.timestampFromUs(event.ts));
- }
- },
-
- // Because the order of Jit code events and V8 samples are not guaranteed,
- // We store them in an array, sort by timestamp, and then process them.
- processV8Events: function() {
- this.v8SamplingData_.sort(function(a, b) {
- if (a.ts !== b.ts)
- return a.ts - b.ts;
- if (a.ph === 'M' || a.ph === 'I')
- return -1;
- else if (b.ph === 'M' || b.ph === 'I')
- return 1;
- return 0;
- });
- var length = this.v8SamplingData_.length;
- for (var i = 0; i < length; ++i) {
- var event = this.v8SamplingData_[i];
- if (event.ph === 'M' || event.ph === 'I') {
- this.processJitCodeEvent(event);
- } else if (event.ph === 'P') {
- this.processV8Sample(event);
- }
- }
- },
-
- initBackcompatClockSyncEventTracker_: function(event) {
- if (event.name !== undefined &&
- event.name.startsWith(ASYNC_CLOCK_SYNC_EVENT_TITLE_PREFIX) &&
- event.ph === 'S')
- this.asyncClockSyncStart_ = event;
-
- if (event.name !== undefined &&
- event.name.startsWith(ASYNC_CLOCK_SYNC_EVENT_TITLE_PREFIX) &&
- event.ph === 'F')
- this.asyncClockSyncFinish_ = event;
- if (this.asyncClockSyncStart_ === undefined ||
- this.asyncClockSyncFinish_ === undefined)
- return;
-
- // Older version of Chrome doesn't support clock sync API, hence
- // telemetry get around it by marking the clock sync events with
- // console.time & console.timeEnd. When we encounter async events
- // with named started with 'ClockSyncEvent.' prefix, create a
- // synthetic clock sync events based on their timestamps.
- var syncId =
- this.asyncClockSyncStart_.name.substring(
- ASYNC_CLOCK_SYNC_EVENT_TITLE_PREFIX.length);
- if (syncId !==
- this.asyncClockSyncFinish_.name.substring(
- ASYNC_CLOCK_SYNC_EVENT_TITLE_PREFIX.length)) {
- throw new Error('Inconsistent clock sync id of async clock sync ' +
- 'events.');
- }
- var clockSyncEvent = {
- ph: 'c',
- args: {
- sync_id: syncId,
- issue_ts: this.asyncClockSyncStart_.ts
- },
- ts: this.asyncClockSyncFinish_.ts,
- };
- this.asyncClockSyncStart_ = undefined;
- this.asyncClockSyncFinish_ = undefined;
- return clockSyncEvent;
- },
-
- importClockSyncMarkers: function() {
- var asyncClockSyncStart, asyncClockSyncFinish;
- for (var i = 0; i < this.events_.length; i++) {
- var event = this.events_[i];
-
- var possibleBackCompatClockSyncEvent =
- this.initBackcompatClockSyncEventTracker_(event);
- if (possibleBackCompatClockSyncEvent)
- this.processClockSyncEvent(possibleBackCompatClockSyncEvent);
-
- if (event.ph !== 'c')
- continue;
-
- var eventSizeInBytes =
- this.model_.importOptions.trackDetailedModelStats ?
- JSON.stringify(event).length : undefined;
-
- this.model_.stats.willProcessBasicTraceEvent(
- 'clock_sync', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processClockSyncEvent(event);
- }
- },
-
- /**
- * Walks through the events_ list and outputs the structures discovered to
- * model_.
- */
- importEvents: function() {
- if (this.stackFrameEvents_)
- this.importStackFrames_(this.stackFrameEvents_, 'g');
-
- if (this.traceAnnotations_)
- this.importAnnotations_();
-
- var importOptions = this.model_.importOptions;
- var trackDetailedModelStats = importOptions.trackDetailedModelStats;
-
- var modelStats = this.model_.stats;
-
- var events = this.events_;
- for (var eI = 0; eI < events.length; eI++) {
- var event = events[eI];
-
- if (event.args === '__stripped__') {
- event.argsStripped = true;
- event.args = undefined;
- }
-
- var eventSizeInBytes;
- if (trackDetailedModelStats)
- eventSizeInBytes = JSON.stringify(event).length;
- else
- eventSizeInBytes = undefined;
-
- if (event.ph === 'B' || event.ph === 'E') {
- modelStats.willProcessBasicTraceEvent(
- 'begin_end (non-compact)', event.cat, event.name, event.ts,
- eventSizeInBytes);
- this.processDurationEvent(event);
-
- } else if (event.ph === 'X') {
- modelStats.willProcessBasicTraceEvent(
- 'begin_end (compact)', event.cat, event.name, event.ts,
- eventSizeInBytes);
- var slice = this.processCompleteEvent(event);
- // TODO(yuhaoz): If Chrome supports creating other events with flow,
- // we will need to call processFlowEvent for them also.
- // https://github.com/catapult-project/catapult/issues/1259
- if (slice !== undefined && event.bind_id !== undefined)
- this.processFlowEvent(event, slice);
-
- } else if (event.ph === 'b' || event.ph === 'e' || event.ph === 'n' ||
- event.ph === 'S' || event.ph === 'F' || event.ph === 'T' ||
- event.ph === 'p') {
- modelStats.willProcessBasicTraceEvent(
- 'async', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processAsyncEvent(event);
-
- // Note, I is historic. The instant event marker got changed, but we
- // want to support loading old trace files so we have both I and i.
- } else if (event.ph === 'I' || event.ph === 'i' || event.ph === 'R') {
- modelStats.willProcessBasicTraceEvent(
- 'instant', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processInstantEvent(event);
-
- } else if (event.ph === 'P') {
- modelStats.willProcessBasicTraceEvent(
- 'samples', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processTraceSampleEvent(event);
- } else if (event.ph === 'C') {
- modelStats.willProcessBasicTraceEvent(
- 'counters', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processCounterEvent(event);
- } else if (event.ph === 'M') {
- modelStats.willProcessBasicTraceEvent(
- 'metadata', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processMetadataEvent(event);
-
- } else if (event.ph === 'N' || event.ph === 'D' || event.ph === 'O') {
- modelStats.willProcessBasicTraceEvent(
- 'objects', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processObjectEvent(event);
-
- } else if (event.ph === 's' || event.ph === 't' || event.ph === 'f') {
- modelStats.willProcessBasicTraceEvent(
- 'flows', event.cat, event.name, event.ts, eventSizeInBytes);
- this.processFlowEvent(event);
-
- } else if (event.ph === 'v') {
- modelStats.willProcessBasicTraceEvent(
- 'memory_dumps', event.cat, event.name, event.ts,
- eventSizeInBytes);
- this.processMemoryDumpEvent(event);
-
- } else if (event.ph === '(' || event.ph === ')') {
- this.processContextEvent(event);
- } else if (event.ph === 'c') {
- // No-op. Clock sync events have already been processed in
- // importClockSyncMarkers().
- } else {
- modelStats.willProcessBasicTraceEvent(
- 'unknown', event.cat, event.name, event.ts, eventSizeInBytes);
- this.model_.importWarning({
- type: 'parse_error',
- message: 'Unrecognized event phase: ' +
- event.ph + ' (' + event.name + ')'
- });
- }
- }
- this.processV8Events();
-
- // Remove all the root stack frame children as they should
- // already be added.
- tr.b.iterItems(this.v8ProcessRootStackFrame_, function(name, frame) {
- frame.removeAllChildren();
- });
- },
-
- importStackFrames_: function(rawStackFrames, idPrefix) {
- var model = this.model_;
-
- for (var id in rawStackFrames) {
- var rawStackFrame = rawStackFrames[id];
- var fullId = idPrefix + id;
- var textForColor = rawStackFrame.category ?
- rawStackFrame.category : rawStackFrame.name;
- var stackFrame = new tr.model.StackFrame(
- undefined /* parentFrame */, fullId, rawStackFrame.name,
- ColorScheme.getColorIdForGeneralPurposeString(textForColor));
- model.addStackFrame(stackFrame);
- }
-
- for (var id in rawStackFrames) {
- var fullId = idPrefix + id;
- var stackFrame = model.stackFrames[fullId];
- if (stackFrame === undefined)
- throw new Error('Internal error');
-
- var rawStackFrame = rawStackFrames[id];
- var parentId = rawStackFrame.parent;
- var parentStackFrame;
- if (parentId === undefined) {
- parentStackFrame = undefined;
- } else {
- var parentFullId = idPrefix + parentId;
- parentStackFrame = model.stackFrames[parentFullId];
- if (parentStackFrame === undefined) {
- this.model_.importWarning({
- type: 'metadata_parse_error',
- message: 'Missing parent frame with ID ' + parentFullId +
- ' for stack frame \'' + stackFrame.name + '\' (ID ' + fullId +
- ').'
- });
- }
- }
- stackFrame.parentFrame = parentStackFrame;
- }
- },
-
- importObjectTypeNameMap_: function(rawObjectTypeNameMap, pid) {
- if (pid in this.objectTypeNameMap_) {
- this.model_.importWarning({
- type: 'metadata_parse_error',
- message: 'Mapping from object type IDs to names provided for pid=' +
- pid + ' multiple times.'
- });
- return;
- }
-
- var objectTypeNamePrefix = undefined;
- var objectTypeNameSuffix = undefined;
- var objectTypeNameMap = {};
- for (var objectTypeId in rawObjectTypeNameMap) {
- var rawObjectTypeName = rawObjectTypeNameMap[objectTypeId];
-
- // If we haven't figured out yet which compiler the object type names
- // come from, we try to do it now.
- if (objectTypeNamePrefix === undefined) {
- for (var i = 0; i < OBJECT_TYPE_NAME_PATTERNS.length; i++) {
- var pattern = OBJECT_TYPE_NAME_PATTERNS[i];
- if (rawObjectTypeName.startsWith(pattern.prefix) &&
- rawObjectTypeName.endsWith(pattern.suffix)) {
- objectTypeNamePrefix = pattern.prefix;
- objectTypeNameSuffix = pattern.suffix;
- break;
- }
- }
- }
-
- if (objectTypeNamePrefix !== undefined &&
- rawObjectTypeName.startsWith(objectTypeNamePrefix) &&
- rawObjectTypeName.endsWith(objectTypeNameSuffix)) {
- // With compiler-specific prefix and suffix (automatically annotated
- // object types).
- objectTypeNameMap[objectTypeId] = rawObjectTypeName.substring(
- objectTypeNamePrefix.length,
- rawObjectTypeName.length - objectTypeNameSuffix.length);
- } else {
- // Without compiler-specific prefix and suffix (manually annotated
- // object types and '[unknown]').
- objectTypeNameMap[objectTypeId] = rawObjectTypeName;
- }
- }
-
- this.objectTypeNameMap_[pid] = objectTypeNameMap;
- },
-
- importAnnotations_: function() {
- for (var id in this.traceAnnotations_) {
- var annotation = tr.model.Annotation.fromDictIfPossible(
- this.traceAnnotations_[id]);
- if (!annotation) {
- this.model_.importWarning({
- type: 'annotation_warning',
- message: 'Unrecognized traceAnnotation typeName \"' +
- this.traceAnnotations_[id].typeName + '\"'
- });
- continue;
- }
- this.model_.addAnnotation(annotation);
- }
- },
-
- /**
- * Called by the Model after all other importers have imported their
- * events.
- */
- finalizeImport: function() {
- if (this.softwareMeasuredCpuCount_ !== undefined) {
- this.model_.kernel.softwareMeasuredCpuCount =
- this.softwareMeasuredCpuCount_;
- }
- this.createAsyncSlices_();
- this.createFlowSlices_();
- this.createExplicitObjects_();
- this.createImplicitObjects_();
- this.createMemoryDumps_();
- },
-
- /* Events can have one or more stack frames associated with them, but
- * that frame might be encoded either as a stack trace of program counters,
- * or as a direct stack frame reference. This handles either case and
- * if found, returns the stackframe.
- */
- getStackFrameForEvent_: function(event, opt_lookForEndEvent) {
- var sf;
- var stack;
- if (opt_lookForEndEvent) {
- sf = event.esf;
- stack = event.estack;
- } else {
- sf = event.sf;
- stack = event.stack;
- }
- if (stack !== undefined && sf !== undefined) {
- this.model_.importWarning({
- type: 'stack_frame_and_stack_error',
- message: 'Event at ' + event.ts +
- ' cannot have both a stack and a stackframe.'
- });
- return undefined;
- }
-
- if (stack !== undefined)
- return this.model_.resolveStackToStackFrame_(event.pid, stack);
- if (sf === undefined)
- return undefined;
-
- var stackFrame = this.model_.stackFrames['g' + sf];
- if (stackFrame === undefined) {
- this.model_.importWarning({
- type: 'sample_import_error',
- message: 'No frame for ' + sf
- });
- return;
- }
- return stackFrame;
- },
-
- resolveStackToStackFrame_: function(pid, stack) {
- // TODO(alph,fmeawad): Add codemap resolution code here.
- return undefined;
- },
-
- importSampleData: function() {
- if (!this.sampleEvents_)
- return;
- var m = this.model_;
-
- // If this is the only importer, then fake-create the threads.
- var events = this.sampleEvents_;
- if (this.events_.length === 0) {
- for (var i = 0; i < events.length; i++) {
- var event = events[i];
- m.getOrCreateProcess(event.tid).getOrCreateThread(event.tid);
- }
- }
-
- var threadsByTid = {};
- m.getAllThreads().forEach(function(t) {
- threadsByTid[t.tid] = t;
- });
-
- for (var i = 0; i < events.length; i++) {
- var event = events[i];
- var thread = threadsByTid[event.tid];
- if (thread === undefined) {
- m.importWarning({
- type: 'sample_import_error',
- message: 'Thread ' + events.tid + 'not found'
- });
- continue;
- }
-
- var cpu;
- if (event.cpu !== undefined)
- cpu = m.kernel.getOrCreateCpu(event.cpu);
-
- var stackFrame = this.getStackFrameForEvent_(event);
-
- var sample = new tr.model.Sample(
- cpu, thread,
- event.name,
- this.toModelTimeFromUs_(event.ts),
- stackFrame,
- event.weight);
- m.samples.push(sample);
- }
- },
-
- createAsyncSlices_: function() {
- if (this.allAsyncEvents_.length === 0)
- return;
-
- this.allAsyncEvents_.sort(function(x, y) {
- var d = x.event.ts - y.event.ts;
- if (d !== 0)
- return d;
- return x.sequenceNumber - y.sequenceNumber;
- });
-
- var legacyEvents = [];
- // Group nestable async events by ID. Events with the same ID should
- // belong to the same parent async event.
- var nestableAsyncEventsByKey = {};
- var nestableMeasureAsyncEventsByKey = {};
- for (var i = 0; i < this.allAsyncEvents_.length; i++) {
- var asyncEventState = this.allAsyncEvents_[i];
- var event = asyncEventState.event;
- if (event.ph === 'S' || event.ph === 'F' || event.ph === 'T' ||
- event.ph === 'p') {
- legacyEvents.push(asyncEventState);
- continue;
- }
- if (event.cat === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Nestable async events (ph: b, e, or n) require a ' +
- 'cat parameter.'
- });
- continue;
- }
-
- if (event.name === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Nestable async events (ph: b, e, or n) require a ' +
- 'name parameter.'
- });
- continue;
- }
-
- if (event.id === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Nestable async events (ph: b, e, or n) require an ' +
- 'id parameter.'
- });
- continue;
- }
-
- if (event.cat === 'blink.user_timing') {
- var matched = /([^\/:]+):([^\/:]+)\/?(.*)/.exec(event.name);
- if (matched !== null) {
- var key = matched[1] + ':' + event.cat;
- event.args = JSON.parse(Base64.atob(matched[3]) || '{}');
- if (nestableMeasureAsyncEventsByKey[key] === undefined)
- nestableMeasureAsyncEventsByKey[key] = [];
- nestableMeasureAsyncEventsByKey[key].push(asyncEventState);
- continue;
- }
- }
-
- var key = event.cat + ':' + event.id;
- if (nestableAsyncEventsByKey[key] === undefined)
- nestableAsyncEventsByKey[key] = [];
- nestableAsyncEventsByKey[key].push(asyncEventState);
- }
- // Handle legacy async events.
- this.createLegacyAsyncSlices_(legacyEvents);
-
- // Parse nestable measure async events into AsyncSlices.
- this.createNestableAsyncSlices_(nestableMeasureAsyncEventsByKey);
-
- // Parse nestable async events into AsyncSlices.
- this.createNestableAsyncSlices_(nestableAsyncEventsByKey);
- },
-
- createLegacyAsyncSlices_: function(legacyEvents) {
- if (legacyEvents.length === 0)
- return;
-
- legacyEvents.sort(function(x, y) {
- var d = x.event.ts - y.event.ts;
- if (d !== 0)
- return d;
- return x.sequenceNumber - y.sequenceNumber;
- });
-
- var asyncEventStatesByNameThenID = {};
-
- for (var i = 0; i < legacyEvents.length; i++) {
- var asyncEventState = legacyEvents[i];
-
- var event = asyncEventState.event;
- var name = event.name;
- if (name === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Async events (ph: S, T, p, or F) require a name ' +
- ' parameter.'
- });
- continue;
- }
-
- var id = event.id;
- if (id === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Async events (ph: S, T, p, or F) require an id parameter.'
- });
- continue;
- }
-
- // TODO(simonjam): Add a synchronous tick on the appropriate thread.
-
- if (event.ph === 'S') {
- if (asyncEventStatesByNameThenID[name] === undefined)
- asyncEventStatesByNameThenID[name] = {};
- if (asyncEventStatesByNameThenID[name][id]) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'At ' + event.ts + ', a slice of the same id ' + id +
- ' was alrady open.'
- });
- continue;
- }
- asyncEventStatesByNameThenID[name][id] = [];
- asyncEventStatesByNameThenID[name][id].push(asyncEventState);
- } else {
- if (asyncEventStatesByNameThenID[name] === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'At ' + event.ts + ', no slice named ' + name +
- ' was open.'
- });
- continue;
- }
- if (asyncEventStatesByNameThenID[name][id] === undefined) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'At ' + event.ts + ', no slice named ' + name +
- ' with id=' + id + ' was open.'
- });
- continue;
- }
- var events = asyncEventStatesByNameThenID[name][id];
- events.push(asyncEventState);
-
- if (event.ph === 'F') {
- // Create a slice from start to end.
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor(
- events[0].event.cat,
- name);
- var slice = new asyncSliceConstructor(
- events[0].event.cat,
- name,
- getEventColor(events[0].event),
- this.toModelTimeFromUs_(events[0].event.ts),
- tr.b.concatenateObjects(events[0].event.args,
- events[events.length - 1].event.args),
- this.toModelTimeFromUs_(event.ts - events[0].event.ts),
- true, undefined, undefined, events[0].event.argsStripped);
- slice.startThread = events[0].thread;
- slice.endThread = asyncEventState.thread;
- slice.id = id;
-
- var stepType = events[1].event.ph;
- var isValid = true;
-
- // Create subSlices for each step. Skip the start and finish events,
- // which are always first and last respectively.
- for (var j = 1; j < events.length - 1; ++j) {
- if (events[j].event.ph === 'T' || events[j].event.ph === 'p') {
- isValid = this.assertStepTypeMatches_(stepType, events[j]);
- if (!isValid)
- break;
- }
-
- if (events[j].event.ph === 'S') {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'At ' + event.event.ts + ', a slice named ' +
- event.event.name + ' with id=' + event.event.id +
- ' had a step before the start event.'
- });
- continue;
- }
-
- if (events[j].event.ph === 'F') {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'At ' + event.event.ts + ', a slice named ' +
- event.event.name + ' with id=' + event.event.id +
- ' had a step after the finish event.'
- });
- continue;
- }
-
- var startIndex = j + (stepType === 'T' ? 0 : -1);
- var endIndex = startIndex + 1;
-
- var subName = events[j].event.name;
- if (!events[j].event.argsStripped &&
- (events[j].event.ph === 'T' || events[j].event.ph === 'p'))
- subName = subName + ':' + events[j].event.args.step;
-
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor(
- events[0].event.cat,
- subName);
- var subSlice = new asyncSliceConstructor(
- events[0].event.cat,
- subName,
- getEventColor(event, subName + j),
- this.toModelTimeFromUs_(events[startIndex].event.ts),
- this.deepCopyIfNeeded_(events[j].event.args),
- this.toModelTimeFromUs_(
- events[endIndex].event.ts - events[startIndex].event.ts),
- undefined, undefined,
- events[startIndex].event.argsStripped);
- subSlice.startThread = events[startIndex].thread;
- subSlice.endThread = events[endIndex].thread;
- subSlice.id = id;
-
- slice.subSlices.push(subSlice);
- }
-
- if (isValid) {
- // Add |slice| to the start-thread's asyncSlices.
- slice.startThread.asyncSliceGroup.push(slice);
- }
-
- delete asyncEventStatesByNameThenID[name][id];
- }
- }
- }
- },
-
- createNestableAsyncSlices_: function(nestableEventsByKey) {
- for (var key in nestableEventsByKey) {
- var eventStateEntries = nestableEventsByKey[key];
- // Stack of enclosing BEGIN events.
- var parentStack = [];
- for (var i = 0; i < eventStateEntries.length; ++i) {
- var eventStateEntry = eventStateEntries[i];
- // If this is the end of an event, match it to the start.
- if (eventStateEntry.event.ph === 'e') {
- // Walk up the parent stack to find the corresponding BEGIN for
- // this END.
- var parentIndex = -1;
- for (var k = parentStack.length - 1; k >= 0; --k) {
- if (parentStack[k].event.name === eventStateEntry.event.name) {
- parentIndex = k;
- break;
- }
- }
- if (parentIndex === -1) {
- // Unmatched end.
- eventStateEntry.finished = false;
- } else {
- parentStack[parentIndex].end = eventStateEntry;
- // Pop off all enclosing unmatched BEGINs util parentIndex.
- while (parentIndex < parentStack.length) {
- parentStack.pop();
- }
- }
- }
- // Inherit the current parent.
- if (parentStack.length > 0)
- eventStateEntry.parentEntry = parentStack[parentStack.length - 1];
- if (eventStateEntry.event.ph === 'b') {
- parentStack.push(eventStateEntry);
- }
- }
- var topLevelSlices = [];
- for (var i = 0; i < eventStateEntries.length; ++i) {
- var eventStateEntry = eventStateEntries[i];
- // Skip matched END, as its slice will be created when we
- // encounter its corresponding BEGIN.
- if (eventStateEntry.event.ph === 'e' &&
- eventStateEntry.finished === undefined) {
- continue;
- }
- var startState = undefined;
- var endState = undefined;
- var sliceArgs = eventStateEntry.event.args || {};
- var sliceError = undefined;
- if (eventStateEntry.event.ph === 'n') {
- startState = eventStateEntry;
- endState = eventStateEntry;
- } else if (eventStateEntry.event.ph === 'b') {
- if (eventStateEntry.end === undefined) {
- // Unmatched BEGIN. End it when last event with this ID ends.
- eventStateEntry.end =
- eventStateEntries[eventStateEntries.length - 1];
- sliceError =
- 'Slice has no matching END. End time has been adjusted.';
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Nestable async BEGIN event at ' +
- eventStateEntry.event.ts + ' with name=' +
- eventStateEntry.event.name +
- ' and id=' + eventStateEntry.event.id + ' was unmatched.'
- });
- } else {
- // Include args for both END and BEGIN for a matched pair.
- function concatenateArguments(args1, args2) {
- if (args1.params === undefined || args2.params === undefined)
- return tr.b.concatenateObjects(args1, args2);
- // Make an argument object to hold the combined params.
- var args3 = {};
- args3.params = tr.b.concatenateObjects(args1.params,
- args2.params);
- return tr.b.concatenateObjects(args1, args2, args3);
- }
- var endArgs = eventStateEntry.end.event.args || {};
- sliceArgs = concatenateArguments(sliceArgs, endArgs);
- }
- startState = eventStateEntry;
- endState = eventStateEntry.end;
- } else {
- // Unmatched END. Start it at the first event with this ID starts.
- sliceError =
- 'Slice has no matching BEGIN. Start time has been adjusted.';
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'Nestable async END event at ' +
- eventStateEntry.event.ts + ' with name=' +
- eventStateEntry.event.name +
- ' and id=' + eventStateEntry.event.id + ' was unmatched.'
- });
- startState = eventStateEntries[0];
- endState = eventStateEntry;
- }
-
- var isTopLevel = (eventStateEntry.parentEntry === undefined);
- var asyncSliceConstructor =
- tr.model.AsyncSlice.subTypes.getConstructor(
- eventStateEntry.event.cat,
- eventStateEntry.event.name);
-
- var threadStart = undefined;
- var threadDuration = undefined;
- if (startState.event.tts && startState.event.use_async_tts) {
- threadStart = this.toModelTimeFromUs_(startState.event.tts);
- if (endState.event.tts) {
- var threadEnd = this.toModelTimeFromUs_(endState.event.tts);
- threadDuration = threadEnd - threadStart;
- }
- }
-
- var slice = new asyncSliceConstructor(
- eventStateEntry.event.cat,
- eventStateEntry.event.name,
- getEventColor(endState.event),
- this.toModelTimeFromUs_(startState.event.ts),
- sliceArgs,
- this.toModelTimeFromUs_(endState.event.ts - startState.event.ts),
- isTopLevel,
- threadStart,
- threadDuration,
- startState.event.argsStripped);
-
- slice.startThread = startState.thread;
- slice.endThread = endState.thread;
-
- slice.startStackFrame = this.getStackFrameForEvent_(startState.event);
- slice.endStackFrame = this.getStackFrameForEvent_(endState.event);
-
- slice.id = key;
- if (sliceError !== undefined)
- slice.error = sliceError;
- eventStateEntry.slice = slice;
- // Add the slice to the topLevelSlices array if there is no parent.
- // Otherwise, add the slice to the subSlices of its parent.
- if (isTopLevel) {
- topLevelSlices.push(slice);
- } else if (eventStateEntry.parentEntry.slice !== undefined) {
- eventStateEntry.parentEntry.slice.subSlices.push(slice);
- }
- }
- for (var si = 0; si < topLevelSlices.length; si++) {
- topLevelSlices[si].startThread.asyncSliceGroup.push(
- topLevelSlices[si]);
- }
- }
- },
-
- assertStepTypeMatches_: function(stepType, event) {
- if (stepType !== event.event.ph) {
- this.model_.importWarning({
- type: 'async_slice_parse_error',
- message: 'At ' + event.event.ts + ', a slice named ' +
- event.event.name + ' with id=' + event.event.id +
- ' had both begin and end steps, which is not allowed.'
- });
- return false;
- }
- return true;
- },
-
- createFlowSlices_: function() {
- if (this.allFlowEvents_.length === 0)
- return;
-
- var that = this;
-
- function validateFlowEvent() {
- if (event.name === undefined) {
- that.model_.importWarning({
- type: 'flow_slice_parse_error',
- message: 'Flow events (ph: s, t or f) require a name parameter.'
- });
- return false;
- }
-
- // Support Flow API v1.
- if (event.ph === 's' || event.ph === 'f' || event.ph === 't') {
- if (event.id === undefined) {
- that.model_.importWarning({
- type: 'flow_slice_parse_error',
- message: 'Flow events (ph: s, t or f) require an id parameter.'
- });
- return false;
- }
- return true;
- }
-
- // Support Flow API v2.
- if (event.bind_id) {
- if (event.flow_in === undefined && event.flow_out === undefined) {
- that.model_.importWarning({
- type: 'flow_slice_parse_error',
- message: 'Flow producer or consumer require flow_in or flow_out.'
- });
- return false;
- }
- return true;
- }
-
- return false;
- }
-
- var createFlowEvent = function(thread, event, opt_slice) {
- var startSlice, flowId, flowStartTs;
-
- if (event.bind_id) {
- // Support Flow API v2.
- startSlice = opt_slice;
- flowId = event.bind_id;
- flowStartTs = this.toModelTimeFromUs_(event.ts + event.dur);
- } else {
- // Support Flow API v1.
- var ts = this.toModelTimeFromUs_(event.ts);
- startSlice = thread.sliceGroup.findSliceAtTs(ts);
- if (startSlice === undefined)
- return undefined;
- flowId = event.id;
- flowStartTs = ts;
- }
-
- var flowEvent = new tr.model.FlowEvent(
- event.cat,
- flowId,
- event.name,
- getEventColor(event),
- flowStartTs,
- that.deepCopyAlways_(event.args));
- flowEvent.startSlice = startSlice;
- flowEvent.startStackFrame = that.getStackFrameForEvent_(event);
- flowEvent.endStackFrame = undefined;
- startSlice.outFlowEvents.push(flowEvent);
- return flowEvent;
- }.bind(this);
-
- var finishFlowEventWith = function(
- flowEvent, thread, event, refGuid, bindToParent, opt_slice) {
- var endSlice;
-
- if (event.bind_id) {
- // Support Flow API v2.
- endSlice = opt_slice;
- } else {
- // Support Flow API v1.
- var ts = this.toModelTimeFromUs_(event.ts);
- if (bindToParent) {
- endSlice = thread.sliceGroup.findSliceAtTs(ts);
- } else {
- endSlice = thread.sliceGroup.findNextSliceAfter(ts, refGuid);
- }
- if (endSlice === undefined)
- return false;
- }
-
- endSlice.inFlowEvents.push(flowEvent);
- flowEvent.endSlice = endSlice;
- flowEvent.duration =
- this.toModelTimeFromUs_(event.ts) - flowEvent.start;
- flowEvent.endStackFrame = that.getStackFrameForEvent_(event);
- that.mergeArgsInto_(flowEvent.args, event.args, flowEvent.title);
- return true;
- }.bind(this);
-
- function processFlowConsumer(
- flowIdToEvent, sliceGuidToEvent, event, slice) {
- var flowEvent = flowIdToEvent[event.bind_id];
- if (flowEvent === undefined) {
- that.model_.importWarning({
- type: 'flow_slice_ordering_error',
- message: 'Flow consumer ' + event.bind_id + ' does not have ' +
- 'a flow producer'});
- return false;
- } else if (flowEvent.endSlice) {
- // One flow producer can have more than one flow consumers.
- // In this case, create a new flow event using the flow producer.
- var flowProducer = flowEvent.startSlice;
- flowEvent = createFlowEvent(undefined,
- sliceGuidToEvent[flowProducer.guid], flowProducer);
- }
-
- var ok = finishFlowEventWith(flowEvent, undefined, event,
- refGuid, undefined, slice);
- if (ok) {
- that.model_.flowEvents.push(flowEvent);
- } else {
- that.model_.importWarning({
- type: 'flow_slice_end_error',
- message: 'Flow consumer ' + event.bind_id + ' does not end ' +
- 'at an actual slice, so cannot be created.'});
- return false;
- }
-
- return true;
- }
-
- function processFlowProducer(flowIdToEvent, flowStatus, event, slice) {
- if (flowIdToEvent[event.bind_id] &&
- flowStatus[event.bind_id]) {
- // Can't open the same flow again while it's still open.
- // This is essentially the multi-producer case which we don't support
- that.model_.importWarning({
- type: 'flow_slice_start_error',
- message: 'Flow producer ' + event.bind_id + ' already seen'});
- return false;
- }
-
- var flowEvent = createFlowEvent(undefined, event, slice);
- if (!flowEvent) {
- that.model_.importWarning({
- type: 'flow_slice_start_error',
- message: 'Flow producer ' + event.bind_id + ' does not start' +
- 'a flow'});
- return false;
- }
- flowIdToEvent[event.bind_id] = flowEvent;
- }
-
- // Actual import.
- this.allFlowEvents_.sort(function(x, y) {
- var d = x.event.ts - y.event.ts;
- if (d !== 0)
- return d;
- return x.sequenceNumber - y.sequenceNumber;
- });
-
- var flowIdToEvent = {};
- var sliceGuidToEvent = {};
- var flowStatus = {}; // true: open; false: closed.
- for (var i = 0; i < this.allFlowEvents_.length; ++i) {
- var data = this.allFlowEvents_[i];
- var refGuid = data.refGuid;
- var event = data.event;
- var thread = data.thread;
- if (!validateFlowEvent(event))
- continue;
-
- // Support for Flow API v2.
- if (event.bind_id) {
- var slice = data.slice;
- sliceGuidToEvent[slice.guid] = event;
-
- if (event.flowPhase === PRODUCER) {
- if (!processFlowProducer(flowIdToEvent, flowStatus, event, slice))
- continue;
- flowStatus[event.bind_id] = true; // open the flow.
- }
- else {
- if (!processFlowConsumer(flowIdToEvent, sliceGuidToEvent,
- event, slice))
- continue;
- flowStatus[event.bind_id] = false; // close the flow.
-
- if (event.flowPhase === STEP) {
- if (!processFlowProducer(flowIdToEvent, flowStatus,
- event, slice))
- continue;
- flowStatus[event.bind_id] = true; // open the flow again.
- }
- }
- continue;
- }
-
- // Support for Flow API v1.
- var flowEvent;
- if (event.ph === 's') {
- if (flowIdToEvent[event.id]) {
- this.model_.importWarning({
- type: 'flow_slice_start_error',
- message: 'event id ' + event.id + ' already seen when ' +
- 'encountering start of flow event.'});
- continue;
- }
- flowEvent = createFlowEvent(thread, event);
- if (!flowEvent) {
- this.model_.importWarning({
- type: 'flow_slice_start_error',
- message: 'event id ' + event.id + ' does not start ' +
- 'at an actual slice, so cannot be created.'});
- continue;
- }
- flowIdToEvent[event.id] = flowEvent;
-
- } else if (event.ph === 't' || event.ph === 'f') {
- flowEvent = flowIdToEvent[event.id];
- if (flowEvent === undefined) {
- this.model_.importWarning({
- type: 'flow_slice_ordering_error',
- message: 'Found flow phase ' + event.ph + ' for id: ' + event.id +
- ' but no flow start found.'
- });
- continue;
- }
-
- var bindToParent = event.ph === 't';
-
- if (event.ph === 'f') {
- if (event.bp === undefined) {
- // TODO(yuhaoz): In flow V2, there is no notion of binding point.
- // Removal of binding point is tracked in
- // https://github.com/google/trace-viewer/issues/991.
- if (event.cat.indexOf('input') > -1)
- bindToParent = true;
- else if (event.cat.indexOf('ipc.flow') > -1)
- bindToParent = true;
- } else {
- if (event.bp !== 'e') {
- this.model_.importWarning({
- type: 'flow_slice_bind_point_error',
- message: 'Flow event with invalid binding point (event.bp).'
- });
- continue;
- }
- bindToParent = true;
- }
- }
-
- var ok = finishFlowEventWith(flowEvent, thread, event,
- refGuid, bindToParent);
- if (ok) {
- that.model_.flowEvents.push(flowEvent);
- } else {
- this.model_.importWarning({
- type: 'flow_slice_end_error',
- message: 'event id ' + event.id + ' does not end ' +
- 'at an actual slice, so cannot be created.'});
- }
- flowIdToEvent[event.id] = undefined;
-
- // If this is a step, then create another flow event.
- if (ok && event.ph === 't') {
- flowEvent = createFlowEvent(thread, event);
- flowIdToEvent[event.id] = flowEvent;
- }
- }
- }
- },
-
- /**
- * This function creates objects described via the N, D, and O phase
- * events.
- */
- createExplicitObjects_: function() {
- if (this.allObjectEvents_.length === 0)
- return;
-
- var processEvent = function(objectEventState) {
- var event = objectEventState.event;
- var scopedId = this.scopedIdForEvent_(event);
- var thread = objectEventState.thread;
- if (event.name === undefined) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: 'While processing ' + JSON.stringify(event) + ': ' +
- 'Object events require an name parameter.'
- });
- }
-
- if (scopedId.id === undefined) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: 'While processing ' + JSON.stringify(event) + ': ' +
- 'Object events require an id parameter.'
- });
- }
- var process = thread.parent;
- var ts = this.toModelTimeFromUs_(event.ts);
- var instance;
- if (event.ph === 'N') {
- try {
- instance = process.objects.idWasCreated(
- scopedId, event.cat, event.name, ts);
- } catch (e) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: 'While processing create of ' +
- scopedId + ' at ts=' + ts + ': ' + e
- });
- return;
- }
- } else if (event.ph === 'O') {
- if (event.args.snapshot === undefined) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: 'While processing ' + scopedId + ' at ts=' + ts + ': ' +
- 'Snapshots must have args: {snapshot: ...}'
- });
- return;
- }
- var snapshot;
- try {
- var args = this.deepCopyIfNeeded_(event.args.snapshot);
- var cat;
- if (args.cat) {
- cat = args.cat;
- delete args.cat;
- } else {
- cat = event.cat;
- }
-
- var baseTypename;
- if (args.base_type) {
- baseTypename = args.base_type;
- delete args.base_type;
- } else {
- baseTypename = undefined;
- }
- snapshot = process.objects.addSnapshot(
- scopedId, cat, event.name, ts, args, baseTypename);
- snapshot.snapshottedOnThread = thread;
- } catch (e) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: 'While processing snapshot of ' +
- scopedId + ' at ts=' + ts + ': ' + e
- });
- return;
- }
- instance = snapshot.objectInstance;
- } else if (event.ph === 'D') {
- try {
- process.objects.idWasDeleted(scopedId, event.cat, event.name, ts);
- var instanceMap = process.objects.getOrCreateInstanceMap_(scopedId);
- instance = instanceMap.lastInstance;
- } catch (e) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: 'While processing delete of ' +
- scopedId + ' at ts=' + ts + ': ' + e
- });
- return;
- }
- }
-
- if (instance)
- instance.colorId = getEventColor(event, instance.typeName);
- }.bind(this);
-
- this.allObjectEvents_.sort(function(x, y) {
- var d = x.event.ts - y.event.ts;
- if (d !== 0)
- return d;
- return x.sequenceNumber - y.sequenceNumber;
- });
-
- var allObjectEvents = this.allObjectEvents_;
- for (var i = 0; i < allObjectEvents.length; i++) {
- var objectEventState = allObjectEvents[i];
- try {
- processEvent.call(this, objectEventState);
- } catch (e) {
- this.model_.importWarning({
- type: 'object_parse_error',
- message: e.message
- });
- }
- }
- },
-
- createImplicitObjects_: function() {
- tr.b.iterItems(this.model_.processes, function(pid, process) {
- this.createImplicitObjectsForProcess_(process);
- }, this);
- },
-
- // Here, we collect all the snapshots that internally contain a
- // Javascript-level object inside their args list that has an "id" field,
- // and turn that into a snapshot of the instance referred to by id.
- createImplicitObjectsForProcess_: function(process) {
-
- function processField(referencingObject,
- referencingObjectFieldName,
- referencingObjectFieldValue,
- containingSnapshot) {
- if (!referencingObjectFieldValue)
- return;
-
- if (referencingObjectFieldValue instanceof
- tr.model.ObjectSnapshot)
- return null;
- if (referencingObjectFieldValue.id === undefined)
- return;
-
- var implicitSnapshot = referencingObjectFieldValue;
-
- var rawId = implicitSnapshot.id;
- var m = /(.+)\/(.+)/.exec(rawId);
- if (!m)
- throw new Error('Implicit snapshots must have names.');
- delete implicitSnapshot.id;
- var name = m[1];
- var id = m[2];
- var res;
-
- var cat;
- if (implicitSnapshot.cat !== undefined)
- cat = implicitSnapshot.cat;
- else
- cat = containingSnapshot.objectInstance.category;
-
- var baseTypename;
- if (implicitSnapshot.base_type)
- baseTypename = implicitSnapshot.base_type;
- else
- baseTypename = undefined;
-
- var scope = containingSnapshot.objectInstance.scopedId.scope;
-
- try {
- res = process.objects.addSnapshot(
- new tr.model.ScopedId(scope, id), cat,
- name, containingSnapshot.ts,
- implicitSnapshot, baseTypename);
- } catch (e) {
- this.model_.importWarning({
- type: 'object_snapshot_parse_error',
- message: 'While processing implicit snapshot of ' +
- rawId + ' at ts=' + containingSnapshot.ts + ': ' + e
- });
- return;
- }
- res.objectInstance.hasImplicitSnapshots = true;
- res.containingSnapshot = containingSnapshot;
- res.snapshottedOnThread = containingSnapshot.snapshottedOnThread;
- referencingObject[referencingObjectFieldName] = res;
- if (!(res instanceof tr.model.ObjectSnapshot))
- throw new Error('Created object must be instanceof snapshot');
- return res.args;
- }
-
- /**
- * Iterates over the fields in the object, calling func for every
- * field/value found.
- *
- * @return {object} If the function does not want the field's value to be
- * iterated, return null. If iteration of the field value is desired, then
- * return either undefined (if the field value did not change) or the new
- * field value if it was changed.
- */
- function iterObject(object, func, containingSnapshot, thisArg) {
- if (!(object instanceof Object))
- return;
-
- if (object instanceof Array) {
- for (var i = 0; i < object.length; i++) {
- var res = func.call(thisArg, object, i, object[i],
- containingSnapshot);
- if (res === null)
- continue;
- if (res)
- iterObject(res, func, containingSnapshot, thisArg);
- else
- iterObject(object[i], func, containingSnapshot, thisArg);
- }
- return;
- }
-
- for (var key in object) {
- var res = func.call(thisArg, object, key, object[key],
- containingSnapshot);
- if (res === null)
- continue;
- if (res)
- iterObject(res, func, containingSnapshot, thisArg);
- else
- iterObject(object[key], func, containingSnapshot, thisArg);
- }
- }
-
- // TODO(nduca): We may need to iterate the instances in sorted order by
- // creationTs.
- process.objects.iterObjectInstances(function(instance) {
- instance.snapshots.forEach(function(snapshot) {
- if (snapshot.args.id !== undefined)
- throw new Error('args cannot have an id field inside it');
- iterObject(snapshot.args, processField, snapshot, this);
- }, this);
- }, this);
- },
-
- createMemoryDumps_: function() {
- for (var dumpId in this.allMemoryDumpEvents_)
- this.createGlobalMemoryDump_(this.allMemoryDumpEvents_[dumpId], dumpId);
- },
-
- createGlobalMemoryDump_: function(dumpIdEvents, dumpId) {
- // 1. Create a GlobalMemoryDump for the provided process memory dump
- // the events, all of which have the same dump ID.
-
- // Calculate the range of the global memory dump.
- var globalRange = new tr.b.Range();
- for (var pid in dumpIdEvents) {
- var processEvents = dumpIdEvents[pid];
- for (var i = 0; i < processEvents.length; i++)
- globalRange.addValue(this.toModelTimeFromUs_(processEvents[i].ts));
- }
- if (globalRange.isEmpty)
- throw new Error('Internal error: Global memory dump without events');
-
- // Create the global memory dump.
- var globalMemoryDump = new tr.model.GlobalMemoryDump(
- this.model_, globalRange.min);
- globalMemoryDump.duration = globalRange.range;
- this.model_.globalMemoryDumps.push(globalMemoryDump);
-
- var globalMemoryAllocatorDumpsByFullName = {};
- var levelsOfDetail = {};
- var allMemoryAllocatorDumpsByGuid = {};
-
- // 2. Create a ProcessMemoryDump for each PID in the provided process
- // memory dump events. Everything except for edges between memory
- // allocator dumps is parsed from the process memory dump trace events at
- // this step.
- for (var pid in dumpIdEvents) {
- this.createProcessMemoryDump_(globalMemoryDump,
- globalMemoryAllocatorDumpsByFullName, levelsOfDetail,
- allMemoryAllocatorDumpsByGuid, dumpIdEvents[pid], pid, dumpId);
- }
-
- // 3. Set the level of detail and memory allocator dumps of the
- // GlobalMemoryDump, which come from the process memory dump trace
- // events parsed in the prebvious step.
- globalMemoryDump.levelOfDetail = levelsOfDetail.global;
-
- // Find the root allocator dumps and establish the parent links of
- // the global memory dump.
- globalMemoryDump.memoryAllocatorDumps =
- this.inferMemoryAllocatorDumpTree_(
- globalMemoryAllocatorDumpsByFullName);
-
- // 4. Finally, parse the edges between all memory allocator dumps within
- // the GlobalMemoryDump. This can only be done once all memory allocator
- // dumps have been parsed (i.e. it is necessary to iterate over the
- // process memory dump trace events once more).
- this.parseMemoryDumpAllocatorEdges_(allMemoryAllocatorDumpsByGuid,
- dumpIdEvents, dumpId);
- },
-
- createProcessMemoryDump_: function(globalMemoryDump,
- globalMemoryAllocatorDumpsByFullName, levelsOfDetail,
- allMemoryAllocatorDumpsByGuid, processEvents, pid, dumpId) {
- // Calculate the range of the process memory dump.
- var processRange = new tr.b.Range();
- for (var i = 0; i < processEvents.length; i++)
- processRange.addValue(this.toModelTimeFromUs_(processEvents[i].ts));
- if (processRange.isEmpty)
- throw new Error('Internal error: Process memory dump without events');
-
- // Create the process memory dump.
- var process = this.model_.getOrCreateProcess(pid);
- var processMemoryDump = new tr.model.ProcessMemoryDump(
- globalMemoryDump, process, processRange.min);
- processMemoryDump.duration = processRange.range;
- process.memoryDumps.push(processMemoryDump);
- globalMemoryDump.processMemoryDumps[pid] = processMemoryDump;
-
- var processMemoryAllocatorDumpsByFullName = {};
-
- // Parse all process memory dump trace events for the newly created
- // ProcessMemoryDump.
- for (var i = 0; i < processEvents.length; i++) {
- var processEvent = processEvents[i];
-
- var dumps = processEvent.args.dumps;
- if (dumps === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: '\'dumps\' field not found in a process memory dump' +
- ' event for PID=' + pid + ' and dump ID=' + dumpId + '.'
- });
- continue;
- }
-
- // Totals, VM regions, and heap dumps for the newly created
- // ProcessMemoryDump should be present in at most one event, so they
- // can be added to the ProcessMemoryDump immediately.
- this.parseMemoryDumpTotals_(processMemoryDump, dumps, pid, dumpId);
- this.parseMemoryDumpVmRegions_(processMemoryDump, dumps, pid, dumpId);
- this.parseMemoryDumpHeapDumps_(processMemoryDump, dumps, pid, dumpId);
-
- // All process memory dump trace events for the newly created
- // ProcessMemoryDump must be processed before level of detail and
- // allocator dumps can be added to it.
- this.parseMemoryDumpLevelOfDetail_(levelsOfDetail, dumps, pid,
- dumpId);
- this.parseMemoryDumpAllocatorDumps_(processMemoryDump, globalMemoryDump,
- processMemoryAllocatorDumpsByFullName,
- globalMemoryAllocatorDumpsByFullName,
- allMemoryAllocatorDumpsByGuid, dumps, pid, dumpId);
- }
-
- if (levelsOfDetail.process === undefined) {
- // Infer level of detail from the presence of VM regions in legacy
- // traces (where raw process memory dump events don't contain the
- // level_of_detail field). These traces will not have BACKGROUND mode.
- levelsOfDetail.process = processMemoryDump.vmRegions ? DETAILED : LIGHT;
- }
- if (!this.updateMemoryDumpLevelOfDetail_(
- levelsOfDetail, 'global', levelsOfDetail.process)) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'diffent levels of detail provided for global memory' +
- ' dump (dump ID=' + dumpId + ').'
- });
- }
- processMemoryDump.levelOfDetail = levelsOfDetail.process;
- delete levelsOfDetail.process; // Reused for all process dumps.
-
- // Find the root allocator dumps and establish the parent links of
- // the process memory dump.
- processMemoryDump.memoryAllocatorDumps =
- this.inferMemoryAllocatorDumpTree_(
- processMemoryAllocatorDumpsByFullName);
- },
-
- parseMemoryDumpTotals_: function(processMemoryDump, dumps, pid, dumpId) {
- var rawTotals = dumps.process_totals;
- if (rawTotals === undefined)
- return;
-
- if (processMemoryDump.totals !== undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Process totals provided multiple times for' +
- ' process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- return;
- }
-
- var totals = {};
- var platformSpecificTotals = undefined;
-
- for (var rawTotalName in rawTotals) {
- var rawTotalValue = rawTotals[rawTotalName];
- if (rawTotalValue === undefined)
- continue;
-
- // Total resident bytes.
- if (rawTotalName === 'resident_set_bytes') {
- totals.residentBytes = parseInt(rawTotalValue, 16);
- continue;
- }
-
- // Peak resident bytes.
- if (rawTotalName === 'peak_resident_set_bytes') {
- totals.peakResidentBytes = parseInt(rawTotalValue, 16);
- continue;
- }
- if (rawTotalName === 'is_peak_rss_resetable') {
- totals.arePeakResidentBytesResettable = !!rawTotalValue;
- continue;
- }
-
- // OS-specific totals (e.g. private resident on Mac).
- if (platformSpecificTotals === undefined) {
- platformSpecificTotals = {};
- totals.platformSpecific = platformSpecificTotals;
- }
- platformSpecificTotals[rawTotalName] = parseInt(rawTotalValue, 16);
- }
-
- // Either both peak_resident_set_bytes and is_peak_rss_resetable should
- // be present in the trace, or neither.
- if (totals.peakResidentBytes === undefined &&
- totals.arePeakResidentBytesResettable !== undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Optional field peak_resident_set_bytes found' +
- ' but is_peak_rss_resetable not found in' +
- ' process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- }
- if (totals.arePeakResidentBytesResettable !== undefined &&
- totals.peakResidentBytes === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Optional field is_peak_rss_resetable found' +
- ' but peak_resident_set_bytes not found in' +
- ' process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- }
-
- processMemoryDump.totals = totals;
- },
-
- parseMemoryDumpVmRegions_: function(processMemoryDump, dumps, pid, dumpId) {
- var rawProcessMmaps = dumps.process_mmaps;
- if (rawProcessMmaps === undefined)
- return;
-
- var rawVmRegions = rawProcessMmaps.vm_regions;
- if (rawVmRegions === undefined)
- return;
-
- if (processMemoryDump.vmRegions !== undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'VM regions provided multiple times for' +
- ' process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- return;
- }
-
- // See //base/trace_event/process_memory_maps.cc in Chromium.
- var vmRegions = new Array(rawVmRegions.length);
- for (var i = 0; i < rawVmRegions.length; i++) {
- var rawVmRegion = rawVmRegions[i];
-
- var byteStats = {};
- var rawByteStats = rawVmRegion.bs;
- for (var rawByteStatName in rawByteStats) {
- var rawByteStatValue = rawByteStats[rawByteStatName];
- if (rawByteStatValue === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Byte stat \'' + rawByteStatName + '\' of VM region ' +
- i + ' (' + rawVmRegion.mf + ') in process memory dump for ' +
- 'PID=' + pid + ' and dump ID=' + dumpId +
- ' does not have a value.'
- });
- continue;
- }
- var byteStatName = BYTE_STAT_NAME_MAP[rawByteStatName];
- if (byteStatName === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Unknown byte stat name \'' + rawByteStatName + '\' (' +
- rawByteStatValue + ') of VM region ' + i + ' (' +
- rawVmRegion.mf + ') in process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- continue;
- }
- byteStats[byteStatName] = parseInt(rawByteStatValue, 16);
- }
-
- vmRegions[i] = new tr.model.VMRegion(
- parseInt(rawVmRegion.sa, 16), // startAddress
- parseInt(rawVmRegion.sz, 16), // sizeInBytes
- rawVmRegion.pf, // protectionFlags
- rawVmRegion.mf, // mappedFile
- byteStats);
- }
-
- processMemoryDump.vmRegions =
- tr.model.VMRegionClassificationNode.fromRegions(vmRegions);
- },
-
- parseMemoryDumpHeapDumps_: function(processMemoryDump, dumps, pid, dumpId) {
- var rawHeapDumps = dumps.heaps;
- if (rawHeapDumps === undefined)
- return;
-
- if (processMemoryDump.heapDumps !== undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Heap dumps provided multiple times for' +
- ' process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- return;
- }
-
- var model = this.model_;
- var idPrefix = 'p' + pid + ':';
- var heapDumps = {};
-
- var objectTypeNameMap = this.objectTypeNameMap_[pid];
- if (objectTypeNameMap === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Missing mapping from object type IDs to names.'
- });
- }
-
- for (var allocatorName in rawHeapDumps) {
- var entries = rawHeapDumps[allocatorName].entries;
- if (entries === undefined || entries.length === 0) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'No heap entries in a ' + allocatorName +
- ' heap dump for PID=' + pid + ' and dump ID=' + dumpId + '.'
- });
- continue;
- }
-
- // The old format always starts with a {size: <total>} entry.
- // See https://goo.gl/WYStil
- // TODO(petrcermak): Remove support for the old format once the new
- // format has been around long enough.
- var isOldFormat = entries[0].bt === undefined;
- if (!isOldFormat && objectTypeNameMap === undefined) {
- // Mapping from object type IDs to names must be provided in the new
- // format.
- continue;
- }
-
- var heapDump = new tr.model.HeapDump(processMemoryDump, allocatorName);
-
- for (var i = 0; i < entries.length; i++) {
- var entry = entries[i];
- var leafStackFrameIndex = entry.bt;
- var leafStackFrame;
-
- // There are two possible mappings from leaf stack frame indices
- // (provided in the trace) to the corresponding stack frames
- // depending on the format.
- if (isOldFormat) {
- // Old format:
- // Undefined index -> / (root)
- // Defined index for /A/B -> /A/B/<self>
- if (leafStackFrameIndex === undefined) {
- leafStackFrame = undefined /* root */;
- } else {
- // Get the leaf stack frame corresponding to the provided index.
- var leafStackFrameId = idPrefix + leafStackFrameIndex;
- if (leafStackFrameIndex === '') {
- leafStackFrame = undefined /* root */;
- } else {
- leafStackFrame = model.stackFrames[leafStackFrameId];
- if (leafStackFrame === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Missing leaf stack frame (ID ' +
- leafStackFrameId + ') of heap entry ' + i + ' (size ' +
- size + ') in a ' + allocatorName +
- ' heap dump for PID=' + pid + '.'
- });
- continue;
- }
- }
-
- // Inject an artificial <self> leaf stack frame.
- leafStackFrameId += ':self';
- if (model.stackFrames[leafStackFrameId] !== undefined) {
- // The frame might already exist if there are multiple process
- // memory dumps (for the same process) in the trace.
- leafStackFrame = model.stackFrames[leafStackFrameId];
- } else {
- leafStackFrame = new tr.model.StackFrame(
- leafStackFrame, leafStackFrameId, '<self>',
- undefined /* colorId */);
- model.addStackFrame(leafStackFrame);
- }
- }
- } else {
- // New format:
- // Undefined index -> (invalid value)
- // Defined index for /A/B -> /A/B
- if (leafStackFrameIndex === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Missing stack frame ID of heap entry ' + i +
- ' (size ' + size + ') in a ' + allocatorName +
- ' heap dump for PID=' + pid + '.'
- });
- continue;
- }
-
- // Get the leaf stack frame corresponding to the provided index.
- var leafStackFrameId = idPrefix + leafStackFrameIndex;
- if (leafStackFrameIndex === '') {
- leafStackFrame = undefined /* root */;
- } else {
- leafStackFrame = model.stackFrames[leafStackFrameId];
- if (leafStackFrame === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Missing leaf stack frame (ID ' + leafStackFrameId +
- ') of heap entry ' + i + ' (size ' + size + ') in a ' +
- allocatorName + ' heap dump for PID=' + pid + '.'
- });
- continue;
- }
- }
- }
-
- var objectTypeId = entry.type;
- var objectTypeName;
- if (objectTypeId === undefined) {
- objectTypeName = undefined /* total over all types */;
- } else if (objectTypeNameMap === undefined) {
- // This can only happen when the old format is used.
- continue;
- } else {
- objectTypeName = objectTypeNameMap[objectTypeId];
- if (objectTypeName === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Missing object type name (ID ' + objectTypeId +
- ') of heap entry ' + i + ' (size ' + size + ') in a ' +
- allocatorName + ' heap dump for pid=' + pid + '.'
- });
- continue;
- }
- }
-
- var size = parseInt(entry.size, 16);
- var count = entry.count === undefined ? undefined :
- parseInt(entry.count, 16);
- heapDump.addEntry(leafStackFrame, objectTypeName, size, count);
- }
-
- // Throw away heap dumps with no entries. This can happen if all raw
- // entries in the trace are skipped for some reason (e.g. invalid leaf
- // stack frame ID).
- if (heapDump.entries.length > 0)
- heapDumps[allocatorName] = heapDump;
- }
-
- if (Object.keys(heapDumps).length > 0)
- processMemoryDump.heapDumps = heapDumps;
- },
-
- parseMemoryDumpLevelOfDetail_: function(levelsOfDetail, dumps, pid,
- dumpId) {
- var rawLevelOfDetail = dumps.level_of_detail;
- var level;
- switch (rawLevelOfDetail) {
- case 'background':
- level = BACKGROUND;
- break;
- case 'light':
- level = LIGHT;
- break;
- case 'detailed':
- level = DETAILED;
- break;
- case undefined:
- level = undefined;
- break;
- default:
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'unknown raw level of detail \'' + rawLevelOfDetail +
- '\' of process memory dump for PID=' + pid +
- ' and dump ID=' + dumpId + '.'
- });
- return;
- }
-
- if (!this.updateMemoryDumpLevelOfDetail_(
- levelsOfDetail, 'process', level)) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'diffent levels of detail provided for process memory' +
- ' dump for PID=' + pid + ' (dump ID=' + dumpId + ').'
- });
- }
- },
-
- updateMemoryDumpLevelOfDetail_: function(levelsOfDetail, scope, level) {
- // If all process memory dump events have the same level of detail (for
- // the particular 'process' or 'global' scope), return true.
- if (!(scope in levelsOfDetail) || level === levelsOfDetail[scope]) {
- levelsOfDetail[scope] = level;
- return true;
- }
-
- // If the process memory dump events have different levels of detail (for
- // the particular 'process' or 'global' scope), use the highest level and
- // return false.
- if (MEMORY_DUMP_LEVEL_OF_DETAIL_ORDER.indexOf(level) >
- MEMORY_DUMP_LEVEL_OF_DETAIL_ORDER.indexOf(levelsOfDetail[scope])) {
- levelsOfDetail[scope] = level;
- }
- return false;
- },
-
- parseMemoryDumpAllocatorDumps_: function(processMemoryDump,
- globalMemoryDump, processMemoryAllocatorDumpsByFullName,
- globalMemoryAllocatorDumpsByFullName, allMemoryAllocatorDumpsByGuid,
- dumps, pid, dumpId) {
- var rawAllocatorDumps = dumps.allocators;
- if (rawAllocatorDumps === undefined)
- return;
-
- // Construct the MemoryAllocatorDump objects without parent links
- // and add them to the processMemoryAllocatorDumpsByName and
- // globalMemoryAllocatorDumpsByName indices appropriately.
- for (var fullName in rawAllocatorDumps) {
- var rawAllocatorDump = rawAllocatorDumps[fullName];
-
- // Every memory allocator dump should have a GUID. If not, then
- // it cannot be associated with any edges.
- var guid = rawAllocatorDump.guid;
- if (guid === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory allocator dump ' + fullName + ' for PID=' + pid +
- ' and dump ID=' + dumpId + ' does not have a GUID.'
- });
- }
-
- // A memory allocator dump can have optional flags.
- var flags = rawAllocatorDump.flags || 0;
- var isWeakDump = !!(flags & WEAK_MEMORY_ALLOCATOR_DUMP_FLAG);
-
- // Determine if this is a global memory allocator dump (check if
- // it's prefixed with 'global/').
- var containerMemoryDump;
- var dstIndex;
- if (fullName.startsWith(GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX)) {
- // Global memory allocator dump.
- fullName = fullName.substring(
- GLOBAL_MEMORY_ALLOCATOR_DUMP_PREFIX.length);
- containerMemoryDump = globalMemoryDump;
- dstIndex = globalMemoryAllocatorDumpsByFullName;
- } else {
- // Process memory allocator dump.
- containerMemoryDump = processMemoryDump;
- dstIndex = processMemoryAllocatorDumpsByFullName;
- }
-
- // Construct or retrieve a memory allocator dump with the provided
- // GUID.
- var allocatorDump = allMemoryAllocatorDumpsByGuid[guid];
- if (allocatorDump === undefined) {
- if (fullName in dstIndex) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Multiple GUIDs provided for' +
- ' memory allocator dump ' + fullName + ': ' +
- dstIndex[fullName].guid + ', ' + guid + ' (ignored) for' +
- ' PID=' + pid + ' and dump ID=' + dumpId + '.'
- });
- continue;
- }
- allocatorDump = new tr.model.MemoryAllocatorDump(
- containerMemoryDump, fullName, guid);
- allocatorDump.weak = isWeakDump;
- dstIndex[fullName] = allocatorDump;
- if (guid !== undefined)
- allMemoryAllocatorDumpsByGuid[guid] = allocatorDump;
- } else {
- // A memory allocator dump with this GUID has already been
- // dumped (so we will only add new attributes). Check that it
- // belonged to the same process or was also global.
- if (allocatorDump.containerMemoryDump !== containerMemoryDump) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory allocator dump ' + fullName +
- ' (GUID=' + guid + ') for PID=' + pid + ' and dump ID=' +
- dumpId + ' dumped in different contexts.'
- });
- continue;
- }
- // Check that the names of the memory allocator dumps match.
- if (allocatorDump.fullName !== fullName) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory allocator dump with GUID=' + guid + ' for PID=' +
- pid + ' and dump ID=' + dumpId + ' has multiple names: ' +
- allocatorDump.fullName + ', ' + fullName + ' (ignored).'
- });
- continue;
- }
- if (!isWeakDump) {
- // A MemoryAllocatorDump is non-weak if at least one process dumped
- // it without WEAK_MEMORY_ALLOCATOR_DUMP_FLAG.
- allocatorDump.weak = false;
- }
- }
-
- // Add all new attributes to the memory allocator dump.
- var attributes = rawAllocatorDump.attrs;
- if (attributes === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory allocator dump ' + fullName + ' (GUID=' + guid +
- ') for PID=' + pid + ' and dump ID=' + dumpId +
- ' does not have attributes.'
- });
- attributes = {};
- }
-
- for (var attrName in attributes) {
- var attrArgs = attributes[attrName];
- var attrType = attrArgs.type;
- var attrValue = attrArgs.value;
-
- switch (attrType) {
- case 'scalar':
- if (attrName in allocatorDump.numerics) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Multiple values provided for scalar attribute ' +
- attrName + ' of memory allocator dump ' + fullName +
- ' (GUID=' + guid + ') for PID=' + pid + ' and dump ID=' +
- dumpId + '.'
- });
- break;
- }
- var unit = attrArgs.units === 'bytes' ?
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter :
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var value = parseInt(attrValue, 16);
- allocatorDump.addNumeric(attrName,
- new tr.v.ScalarNumeric(unit, value));
- break;
-
- case 'string':
- if (attrName in allocatorDump.diagnostics) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Multiple values provided for string attribute ' +
- attrName + ' of memory allocator dump ' + fullName +
- ' (GUID=' + guid + ') for PID=' + pid + ' and dump ID=' +
- dumpId + '.'
- });
- break;
- }
- allocatorDump.addDiagnostic(attrName, attrValue);
- break;
-
- default:
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Unknown type provided for attribute ' + attrName +
- ' of memory allocator dump ' + fullName + ' (GUID=' + guid +
- ') for PID=' + pid + ' and dump ID=' + dumpId + ': ' +
- attrType
- });
- break;
- }
- }
- }
- },
-
- inferMemoryAllocatorDumpTree_: function(memoryAllocatorDumpsByFullName) {
- var rootAllocatorDumps = [];
-
- var fullNames = Object.keys(memoryAllocatorDumpsByFullName);
- fullNames.sort();
- for (var i = 0; i < fullNames.length; i++) {
- var fullName = fullNames[i];
- var allocatorDump = memoryAllocatorDumpsByFullName[fullName];
-
- // This is a loop because we might need to build implicit
- // ancestors in case they were not present in the trace.
- while (true) {
- var lastSlashIndex = fullName.lastIndexOf('/');
- if (lastSlashIndex === -1) {
- // If the dump is a root, add it to the top-level
- // rootAllocatorDumps list.
- rootAllocatorDumps.push(allocatorDump);
- break;
- }
-
- // If the dump is not a root, find its parent.
- var parentFullName = fullName.substring(0, lastSlashIndex);
- var parentAllocatorDump =
- memoryAllocatorDumpsByFullName[parentFullName];
-
- // If the parent dump does not exist yet, we build an implicit
- // one and continue up the ancestor chain.
- var parentAlreadyExisted = true;
- if (parentAllocatorDump === undefined) {
- parentAlreadyExisted = false;
- parentAllocatorDump = new tr.model.MemoryAllocatorDump(
- allocatorDump.containerMemoryDump, parentFullName);
- if (allocatorDump.weak !== false) {
- // If we are inferring a parent dump (e.g. 'root/parent') of a
- // current dump (e.g. 'root/parent/current') which is weak (or
- // was also inferred and we don't know yet whether it's weak or
- // not), then we clear the weak flag on the parent dump because
- // we don't know yet whether it should be weak or non-weak:
- //
- // * We can't mark the parent as non-weak straightaway because
- // the parent might have no non-weak descendants (in which
- // case we want the inferred parent to be weak, so that it
- // would be later removed like the current dump).
- // * We can't mark the parent as weak immediately either. If we
- // did and later encounter a non-weak child of the parent
- // (e.g. 'root/parent/another_child'), then we couldn't
- // retroactively mark the inferred parent dump as non-weak
- // because we couldn't tell whether the parent dump was
- // dumped in the trace as weak (in which case it should stay
- // weak and be subsequently removed) or whether it was
- // inferred as weak (in which case it should be changed to
- // non-weak).
- //
- // Therefore, we defer marking the inferred parent as
- // weak/non-weak. If an inferred parent dump does not have any
- // non-weak child, it will be marked as weak at the end of this
- // method.
- //
- // Note that this should not be confused with the recursive
- // propagation of the weak flag from parent dumps to their
- // children and from owned dumps to their owners, which is
- // performed in GlobalMemoryDump.prototype.removeWeakDumps().
- parentAllocatorDump.weak = undefined;
- }
- memoryAllocatorDumpsByFullName[parentFullName] =
- parentAllocatorDump;
- }
-
- // Setup the parent <-> children relationships
- allocatorDump.parent = parentAllocatorDump;
- parentAllocatorDump.children.push(allocatorDump);
-
- // If the parent already existed, then its ancestors were/will be
- // constructed in another iteration of the forEach loop.
- if (parentAlreadyExisted) {
- if (!allocatorDump.weak) {
- // If the current dump is non-weak, then we must ensure that all
- // its inferred ancestors are also non-weak.
- while (parentAllocatorDump !== undefined &&
- parentAllocatorDump.weak === undefined) {
- parentAllocatorDump.weak = false;
- parentAllocatorDump = parentAllocatorDump.parent;
- }
- }
- break;
- }
-
- fullName = parentFullName;
- allocatorDump = parentAllocatorDump;
- }
- }
-
- // All inferred ancestor dumps that have a non-weak child have already
- // been marked as non-weak. We now mark the rest as weak.
- for (var fullName in memoryAllocatorDumpsByFullName) {
- var allocatorDump = memoryAllocatorDumpsByFullName[fullName];
- if (allocatorDump.weak === undefined)
- allocatorDump.weak = true;
- }
-
- return rootAllocatorDumps;
- },
-
- parseMemoryDumpAllocatorEdges_: function(allMemoryAllocatorDumpsByGuid,
- dumpIdEvents, dumpId) {
- for (var pid in dumpIdEvents) {
- var processEvents = dumpIdEvents[pid];
-
- for (var i = 0; i < processEvents.length; i++) {
- var processEvent = processEvents[i];
-
- var dumps = processEvent.args.dumps;
- if (dumps === undefined)
- continue;
-
- var rawEdges = dumps.allocators_graph;
- if (rawEdges === undefined)
- continue;
-
- for (var j = 0; j < rawEdges.length; j++) {
- var rawEdge = rawEdges[j];
-
- var sourceGuid = rawEdge.source;
- var sourceDump = allMemoryAllocatorDumpsByGuid[sourceGuid];
- if (sourceDump === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Edge for PID=' + pid + ' and dump ID=' + dumpId +
- ' is missing source memory allocator dump (GUID=' +
- sourceGuid + ').'
- });
- continue;
- }
-
- var targetGuid = rawEdge.target;
- var targetDump = allMemoryAllocatorDumpsByGuid[targetGuid];
- if (targetDump === undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Edge for PID=' + pid + ' and dump ID=' + dumpId +
- ' is missing target memory allocator dump (GUID=' +
- targetGuid + ').'
- });
- continue;
- }
-
- var importance = rawEdge.importance;
- var edge = new tr.model.MemoryAllocatorDumpLink(
- sourceDump, targetDump, importance);
-
- switch (rawEdge.type) {
- case 'ownership':
- if (sourceDump.owns !== undefined) {
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Memory allocator dump ' + sourceDump.fullName +
- ' (GUID=' + sourceGuid + ') already owns a memory' +
- ' allocator dump (' +
- sourceDump.owns.target.fullName + ').'
- });
- } else {
- sourceDump.owns = edge;
- targetDump.ownedBy.push(edge);
- }
- break;
-
- case 'retention':
- sourceDump.retains.push(edge);
- targetDump.retainedBy.push(edge);
- break;
-
- default:
- this.model_.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Invalid edge type: ' + rawEdge.type +
- ' (PID=' + pid + ', dump ID=' + dumpId +
- ', source=' + sourceGuid + ', target=' + targetGuid +
- ', importance=' + importance + ').'
- });
- }
- }
- }
- }
- },
-
- /**
- * Converts |ts| (in microseconds) to a timestamp in the model clock domain
- * (in milliseconds).
- */
- toModelTimeFromUs_: function(ts) {
- if (!this.toModelTime_) {
- this.toModelTime_ =
- this.model_.clockSyncManager.getModelTimeTransformer(
- this.clockDomainId_);
- }
-
- return this.toModelTime_(tr.b.Unit.timestampFromUs(ts));
- },
-
- /**
- * Converts |ts| (in microseconds) to a timestamp in the model clock domain
- * (in milliseconds). If |ts| is undefined, undefined is returned.
- */
- maybeToModelTimeFromUs_: function(ts) {
- if (ts === undefined)
- return undefined;
-
- return this.toModelTimeFromUs_(ts);
- }
- };
-
- tr.importer.Importer.register(TraceEventImporter);
-
- return {
- TraceEventImporter: TraceEventImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_perf_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_perf_test.html
deleted file mode 100644
index b7a7c57b3ae..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_perf_test.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var eventStrings = {};
-
- // @const
- var TEST_NAMES = ['simple_trace', 'lthi_cats'];
- // @const
- var TEST_FILES_PATHS = ['/test_data/simple_trace.json',
- '/test_data/lthi_cats.json.gz'];
-
- function getEvents(url) {
- if (url in eventStrings)
- return eventStrings[url];
- eventStrings[url] = tr.b.getSync(url);
- return eventStrings[url];
- }
-
- function timedPerfTestWithEvents(name, testFn, initialOptions) {
- if (initialOptions.setUp)
- throw new Error(
- 'Per-test setUp not supported. Trivial to fix if needed.');
-
- var options = {};
- for (var k in initialOptions)
- options[k] = initialOptions[k];
- options.setUp = function() {
- TEST_FILES_PATHS.forEach(
- function warmup(url) {
- getEvents(url);
- });
- };
- timedPerfTest(name, testFn, options);
- }
-
- var n110100 = [1, 10, 100];
- n110100.forEach(function(val) {
- timedPerfTestWithEvents(TEST_NAMES[0] + '_' + val, function() {
- var events = getEvents(TEST_FILES_PATHS[0]);
- var m = tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false,
- pruneContainers: false
- });
- }, {iterations: val});
- });
-
- timedPerfTestWithEvents(TEST_NAMES[1] + '_1', function() {
- var events = getEvents(TEST_FILES_PATHS[1]);
- var m = tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false,
- pruneContainers: false
- });
- }, {iterations: 1});
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_test.html
deleted file mode 100644
index 2c5d67e448a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/trace_event_importer_test.html
+++ /dev/null
@@ -1,5754 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/battor_importer.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/extras/measure/measure.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var findSliceNamed = tr.c.TestUtils.findSliceNamed;
- var ClockDomainId = tr.model.ClockDomainId;
- var ColorScheme = tr.b.ColorScheme;
- var MeasureAsyncSlice = tr.e.measure.MeasureAsyncSlice;
- var ScopedId = tr.model.ScopedId;
- var VMRegion = tr.model.VMRegion;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var checkDumpNumericsAndDiagnostics =
- tr.model.MemoryDumpTestUtils.checkDumpNumericsAndDiagnostics;
- var checkVMRegions = tr.model.MemoryDumpTestUtils.checkVMRegions;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
-
- function makeModel(events, opt_shift, opt_prune) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: opt_shift,
- pruneEmptyContainers: opt_prune
- });
- }
-
- function makeUnshiftedModel(events) {
- return makeModel(events, false);
- }
-
- function checkHeapEntry(entry, expectedDump, expectedSize, expectedTitles,
- expectedObjectTypeName, expectedCount) {
- assert.strictEqual(entry.heapDump, expectedDump);
- assert.strictEqual(entry.size, expectedSize);
- assert.strictEqual(entry.objectTypeName, expectedObjectTypeName);
- assert.strictEqual(entry.count, expectedCount);
- if (expectedTitles === undefined) {
- assert.isUndefined(entry.leafStackFrame);
- } else {
- assert.deepEqual(
- entry.leafStackFrame.getUserFriendlyStackTrace(), expectedTitles);
- }
- }
-
- function getFrame(heapEntry, distance) {
- var frame = heapEntry.leafStackFrame;
- for (; distance > 0; distance--)
- frame = frame.parentFrame;
- return frame;
- }
-
- test('canImportEmpty', function() {
- assert.isFalse(tr.e.importer.TraceEventImporter.canImport([]));
- assert.isFalse(tr.e.importer.TraceEventImporter.canImport(''));
- });
-
- test('basicSingleThreadNonnestedParsing', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', args: {}, pid: 52, ts: 629, cat: 'bar', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 631, cat: 'bar', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 2);
- assert.equal(t.tid, 53);
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.closeTo((560 - 520) / 1000, slice.duration, 1e-5);
- assert.equal(slice.subSlices.length, 0);
-
- slice = t.sliceGroup.slices[1];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'bar');
- assert.closeTo((629 - 520) / 1000, slice.start, 1e-5);
- assert.closeTo((631 - 629) / 1000, slice.duration, 1e-5);
- assert.equal(slice.subSlices.length, 0);
- });
-
- test('basicSingleThreadNonnestedParsingWithCpuDuration', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B', tts: 221}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E', tts: 259}, // @suppress longLineCheck
- {name: 'b', args: {}, pid: 52, ts: 629, cat: 'bar', tid: 53, ph: 'B', tts: 329}, // @suppress longLineCheck
- {name: 'b', args: {}, pid: 52, ts: 631, cat: 'bar', tid: 53, ph: 'E', tts: 331} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 2);
- assert.equal(t.tid, 53);
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.closeTo((560 - 520) / 1000, slice.duration, 1e-5);
- assert.closeTo((259 - 221) / 1000, slice.cpuDuration, 1e-5);
- assert.equal(slice.subSlices.length, 0);
-
- slice = t.sliceGroup.slices[1];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'bar');
- assert.closeTo((629 - 520) / 1000, slice.start, 1e-5);
- assert.closeTo((631 - 629) / 1000, slice.duration, 1e-5);
- assert.closeTo((331 - 329) / 1000, slice.cpuDuration, 1e-5);
- assert.equal(slice.subSlices.length, 0);
- });
-
- test('argumentDupeCreatesNonFailingImportError', function() {
- var events = [
- {name: 'a',
- args: {'x': 1},
- pid: 1,
- ts: 520,
- cat: 'foo',
- tid: 1,
- ph: 'B'},
- {name: 'a',
- args: {'x': 2},
- pid: 1,
- ts: 560,
- cat: 'foo',
- tid: 1,
- ph: 'E'}
- ];
-
- var m = makeModel(events);
- var t = m.processes[1].threads[1];
- var sA = findSliceNamed(t.sliceGroup, 'a');
-
- assert.equal(sA.args.x, 2);
- assert.isTrue(m.hasImportWarnings);
- assert.equal(1, m.importWarnings.length);
- });
-
- test('importMissingArgs', function() {
- var events = [
- {name: 'a', pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', pid: 52, ts: 629, cat: 'bar', tid: 53, ph: 'I'}
- ];
-
- // This should not throw an exception.
- makeModel(events);
- });
-
- test('importDoesNotChokeOnNulls', function() {
- var events = [
- {name: 'a', args: { foo: null }, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'}, // @suppress longLineCheck
- {name: 'a', pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- // This should not throw an exception.
- makeModel(events);
- });
-
- test('categoryBeginEndMismatchPrefersBegin', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'bar', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.tid, 53);
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- });
-
- test('beginEndNameMismatch', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(events);
- assert.isTrue(m.hasImportWarnings);
- assert.equal(m.importWarnings.length, 1);
- });
-
- test('nestedParsing', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, tts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 2, tts: 2, cat: 'bar', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 3, tts: 3, cat: 'bar', tid: 1, ph: 'E'},
- {name: 'a', args: {}, pid: 1, ts: 4, tts: 3, cat: 'foo', tid: 1, ph: 'E'}
- ];
- var m = makeModel(events, false);
- var t = m.processes[1].threads[1];
-
- var sA = findSliceNamed(t.sliceGroup, 'a');
- var sB = findSliceNamed(t.sliceGroup, 'b');
-
- assert.equal(sA.title, 'a');
- assert.equal(sA.category, 'foo');
- assert.equal(sA.start, 0.001);
- assert.equal(sA.duration, 0.003);
- assert.equal(sA.selfTime, 0.002);
- assert.equal(sA.cpuSelfTime, 0.001);
-
- assert.equal(sB.title, 'b');
- assert.equal(sB.category, 'bar');
- assert.equal(sB.start, 0.002);
- assert.equal(sB.duration, 0.001);
-
- assert.equal(1, sA.subSlices.length);
- assert.equal(sB, sA.subSlices[0]);
- assert.equal(sA, sB.parentSlice);
- });
-
- test('nestedParsingWithTwoSubSlices', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, tts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 2, tts: 2, cat: 'bar', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 3, tts: 3, cat: 'bar', tid: 1, ph: 'E'},
- {name: 'c', args: {}, pid: 1, ts: 5, tts: 5, cat: 'baz', tid: 1, ph: 'B'},
- {name: 'c', args: {}, pid: 1, ts: 7, tts: 6, cat: 'baz', tid: 1, ph: 'E'},
- {name: 'a', args: {}, pid: 1, ts: 8, tts: 8, cat: 'foo', tid: 1, ph: 'E'}
- ];
- var m = makeModel(events, false);
- var t = m.processes[1].threads[1];
-
- var sA = findSliceNamed(t.sliceGroup, 'a');
- var sB = findSliceNamed(t.sliceGroup, 'b');
- var sC = findSliceNamed(t.sliceGroup, 'c');
-
- assert.equal(sA.title, 'a');
- assert.equal(sA.category, 'foo');
- assert.equal(sA.start, 0.001);
- assert.equal(sA.duration, 0.007);
- assert.equal(sA.selfTime, 0.004);
- assert.equal(sA.cpuSelfTime, 0.005);
-
- assert.equal(sB.title, 'b');
- assert.equal(sB.category, 'bar');
- assert.equal(sB.start, 0.002);
- assert.equal(sB.duration, 0.001);
-
- assert.equal(sC.title, 'c');
- assert.equal(sC.category, 'baz');
- assert.equal(sC.start, 0.005);
- assert.equal(sC.duration, 0.002);
-
- assert.equal(sA.subSlices.length, 2);
- assert.equal(sA.subSlices[0], sB);
- assert.equal(sA.subSlices[1], sC);
- assert.equal(sB.parentSlice, sA);
- assert.equal(sC.parentSlice, sA);
- });
-
- test('nestedParsingWithDoubleNesting', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 2, cat: 'bar', tid: 1, ph: 'B'},
- {name: 'c', args: {}, pid: 1, ts: 3, cat: 'baz', tid: 1, ph: 'B'},
- {name: 'c', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 1, ph: 'E'},
- {name: 'b', args: {}, pid: 1, ts: 7, cat: 'bar', tid: 1, ph: 'E'},
- {name: 'a', args: {}, pid: 1, ts: 8, cat: 'foo', tid: 1, ph: 'E'}
- ];
- var m = makeModel(events, false);
- var t = m.processes[1].threads[1];
-
- var sA = findSliceNamed(t.sliceGroup, 'a');
- var sB = findSliceNamed(t.sliceGroup, 'b');
- var sC = findSliceNamed(t.sliceGroup, 'c');
-
- assert.equal(sA.title, 'a');
- assert.equal(sA.category, 'foo');
- assert.equal(sA.start, 0.001);
- assert.equal(sA.duration, 0.007);
- assert.equal(sA.selfTime, 0.002);
-
- assert.equal(sB.title, 'b');
- assert.equal(sB.category, 'bar');
- assert.equal(sB.start, 0.002);
- assert.equal(sB.duration, 0.005);
- assert.equal(sA.selfTime, 0.002);
-
- assert.equal(sC.title, 'c');
- assert.equal(sC.category, 'baz');
- assert.equal(sC.start, 0.003);
- assert.equal(sC.duration, 0.002);
-
- assert.equal(sA.subSlices.length, 1);
- assert.equal(sA.subSlices[0], sB);
- assert.equal(sB.parentSlice, sA);
-
- assert.equal(sB.subSlices.length, 1);
- assert.equal(sB.subSlices[0], sC);
- assert.equal(sC.parentSlice, sB);
- });
-
-
- test('autoclosing', function() {
- var events = [
- // Slice that doesn't finish.
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
-
- // Slice that does finish to give an 'end time' to make autoclosing work.
- {name: 'b', args: {}, pid: 1, ts: 1, cat: 'bar', tid: 2, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 2, cat: 'bar', tid: 2, ph: 'E'}
- ];
- var m = makeUnshiftedModel(events);
- var p = m.processes[1];
- var t1 = p.threads[1];
- var t2 = p.threads[2];
- assert.isTrue(t1.sliceGroup.slices[0].didNotFinish);
- assert.equal(t1.sliceGroup.slices[0].end, 0.001);
- });
-
- test('autoclosingLoneBegin', function() {
- var events = [
- // Slice that doesn't finish.
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'}
- ];
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.isTrue(slice.didNotFinish);
- assert.equal(slice.start, 0);
- assert.equal(slice.duration, 0);
- });
-
- test('autoclosingWithSubTasks', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'b1', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'b1', args: {}, pid: 1, ts: 3, cat: 'foo', tid: 1, ph: 'E'},
- {name: 'b2', args: {}, pid: 1, ts: 3, cat: 'foo', tid: 1, ph: 'B'}
- ];
- var m = makeModel(events, false);
- var t = m.processes[1].threads[1];
-
- var sA = findSliceNamed(t.sliceGroup, 'a');
- var sB1 = findSliceNamed(t.sliceGroup, 'b1');
- var sB2 = findSliceNamed(t.sliceGroup, 'b2');
-
- assert.equal(sA.end, 0.003);
- assert.equal(sB1.end, 0.003);
- assert.equal(sB2.end, 0.003);
- });
-
- test('autoclosingWithEventsOutsideBounds', function() {
- var events = [
- // Slice that begins before min and ends after max of the other threads.
- {name: 'a', args: {}, pid: 1, ts: 0, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 3, cat: 'foo', tid: 1, ph: 'B'},
-
- // Slice that does finish to give an 'end time' to establish a basis
- {name: 'c', args: {}, pid: 1, ts: 1, cat: 'bar', tid: 2, ph: 'B'},
- {name: 'c', args: {}, pid: 1, ts: 2, cat: 'bar', tid: 2, ph: 'E'}
- ];
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.sliceGroup.length, 2);
-
- var slice = findSliceNamed(t.sliceGroup, 'a');
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.equal(slice.duration, 0.003);
-
- var t2 = p.threads[2];
- var slice2 = findSliceNamed(t2.sliceGroup, 'c');
- assert.equal(slice2.title, 'c');
- assert.equal(slice2.category, 'bar');
- assert.equal(slice2.start, 0.001);
- assert.equal(slice2.duration, 0.001);
-
- assert.equal(m.bounds.min, 0.000);
- assert.equal(m.bounds.max, 0.003);
- });
-
- test('nestedAutoclosing', function() {
- var events = [
- // Tasks that don't finish.
- {name: 'a1', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'a2', args: {}, pid: 1, ts: 1.5, cat: 'foo', tid: 1, ph: 'B'},
-
- // Slice that does finish to give an 'end time' to make autoclosing work.
- {name: 'b', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 2, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 2, ph: 'E'}
- ];
- var m = makeUnshiftedModel(events, false);
- var t1 = m.processes[1].threads[1];
- var t2 = m.processes[1].threads[2];
-
- var sA1 = findSliceNamed(t1.sliceGroup, 'a1');
- var sA2 = findSliceNamed(t1.sliceGroup, 'a2');
- var sB = findSliceNamed(t2.sliceGroup, 'b');
-
- assert.equal(sA1.end, 0.0015);
- assert.equal(sA2.end, 0.0015);
- });
-
- test('taskColoring', function() {
- // The test below depends on hashing of 'a' !== 'b'. Fail early if that
- // assumption is incorrect.
- assert.notEqual(ColorScheme.getStringHash('a'),
- ColorScheme.getStringHash('b'));
-
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'E'},
- {name: 'b', args: {}, pid: 1, ts: 3, cat: 'bar', tid: 1, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 4, cat: 'bar', tid: 1, ph: 'E'},
- {name: 'a', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 1, ph: 'B'},
- {name: 'a', args: {}, pid: 1, ts: 6, cat: 'baz', tid: 1, ph: 'E'}
- ];
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- var a1 = t.sliceGroup.slices[0];
- assert.equal(a1.title, 'a');
- assert.equal(a1.category, 'foo');
- var b = t.sliceGroup.slices[1];
- assert.equal(b.title, 'b');
- assert.equal(b.category, 'bar');
- assert.notEqual(b.colorId, a1.colorId);
- var a2 = t.sliceGroup.slices[2];
- assert.equal(a2.title, 'a');
- assert.equal(a2.category, 'baz');
- assert.equal(a1.colorId, a2.colorId);
- });
-
- test('durationColorArgument', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B', cname: 'thread_state_unknown'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'E', cname: 'thread_state_unknown'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.sliceGroup.slices[0].colorId,
- ColorScheme.getColorIdForReservedName('thread_state_unknown'));
- });
-
- test('durationColorEnd', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B', cname: 'thread_state_sleeping'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'E', cname: 'thread_state_unknown'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.sliceGroup.slices[0].colorId,
- ColorScheme.getColorIdForReservedName('thread_state_unknown'));
- });
-
- test('completeColorArgument', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, dur: 1, cat: 'foo', tid: 1, ph: 'X', cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.sliceGroup.slices[0].colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('asyncColorArgument', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'b', id: 1, cname: 'generic_work'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'e', id: 1, cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.asyncSliceGroup.slices[0].colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('asyncColorEnd', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'b', id: 1, cname: 'thread_state_unknown'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'e', id: 1, cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.asyncSliceGroup.slices[0].colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('instantThreadColorArgument', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'I', id: 1, cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.sliceGroup.slices[0].colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('instantProcessColorArgument', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'I', id: 1, s: 'p', cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- assert.equal(p.instantEvents[0].colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('counterColorArgument', function() {
- var events = [
- {name: 'a', args: {'cats': 10}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'C', id: 1, cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- assert.equal(p.counters['foo.a[1]'].series[0].color,
- ColorScheme.getColorIdForReservedName('generic_work'));
- assert.equal(p.counters['foo.a[1]'].series.length, 1);
- });
-
- test('objectColorArgument', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'N', id: 1, cname: 'generic_work'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'O', id: 1, cname: 'generic_work'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 3, cat: 'foo', tid: 1, ph: 'D', id: 1, cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var i = p.objects.instanceMapsByScopedId_['ptr'][1].instances[0];
- assert.equal(i.colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('objectColorEnd', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'N', id: 1, cname: 'thread_state_sleeping'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'O', id: 1, cname: 'thread_state_unknown'}, // @suppress longLineCheck
- {name: 'a', args: {}, pid: 1, ts: 3, cat: 'foo', tid: 1, ph: 'D', id: 1, cname: 'generic_work'} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p = m.processes[1];
- var i = p.objects.instanceMapsByScopedId_['ptr'][1].instances[0];
- assert.equal(i.colorId,
- ColorScheme.getColorIdForReservedName('generic_work'));
- });
-
- test('multipleThreadParsing', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'E'},
- {name: 'b', args: {}, pid: 1, ts: 3, cat: 'bar', tid: 2, ph: 'B'},
- {name: 'b', args: {}, pid: 1, ts: 4, cat: 'bar', tid: 2, ph: 'E'}
- ];
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[1];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 2);
-
- // Check thread 1.
- var t = p.threads[1];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.tid, 1);
-
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.equal(slice.duration, (2 - 1) / 1000);
- assert.equal(slice.subSlices.length, 0);
-
- // Check thread 2.
- var t = p.threads[2];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.tid, 2);
-
- slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'bar');
- assert.equal(slice.start, (3 - 1) / 1000);
- assert.equal(slice.duration, (4 - 3) / 1000);
- assert.equal(slice.subSlices.length, 0);
- });
-
- test('multiplePidParsing', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'a', args: {}, pid: 1, ts: 2, cat: 'foo', tid: 1, ph: 'E'},
- {name: 'b', args: {}, pid: 2, ts: 3, cat: 'bar', tid: 2, ph: 'B'},
- {name: 'b', args: {}, pid: 2, ts: 4, cat: 'bar', tid: 2, ph: 'E'}
- ];
- var m = makeModel(events);
- assert.equal(m.numProcesses, 2);
- var p = m.processes[1];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
-
- // Check process 1 thread 1.
- var t = p.threads[1];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.tid, 1);
-
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.equal(slice.duration, (2 - 1) / 1000);
- assert.equal(slice.subSlices.length, 0);
-
- // Check process 2 thread 2.
- var p = m.processes[2];
- assert.isDefined(p);
- assert.equal(p.numThreads, 1);
- var t = p.threads[2];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.tid, 2);
-
- slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'bar');
- assert.equal(slice.start, (3 - 1) / 1000);
- assert.equal(slice.duration, (4 - 3) / 1000);
- assert.equal(slice.subSlices.length, 0);
-
- // Check getAllThreads.
- assert.deepEqual(m.getAllThreads(),
- [m.processes[1].threads[1], m.processes[2].threads[2]]);
- });
-
- // Process names.
- test('processNames', function() {
- var events = [
- {name: 'process_name', args: {name: 'SomeProcessName'},
- pid: 1, ts: 0, tid: 1, ph: 'M'},
- {name: 'process_name', args: {name: 'SomeProcessName'},
- pid: 2, ts: 0, tid: 1, ph: 'M'}
- ];
- var m = makeModel(events);
- assert.equal(m.processes[1].name, 'SomeProcessName');
- });
-
- // Process labels.
- test('processLabels', function() {
- var events = [
- {name: 'process_labels', args: {labels: 'foo,bar,bar,foo,baz'},
- pid: 1, ts: 0, tid: 1, ph: 'M'},
- {name: 'process_labels', args: {labels: 'baz'},
- pid: 2, ts: 0, tid: 1, ph: 'M'}
- ];
- var m = makeModel(events);
- assert.deepEqual(m.processes[1].labels, ['foo', 'bar', 'baz']);
- assert.deepEqual(m.processes[2].labels, ['baz']);
- });
-
- // Process sort index.
- test('processSortIndex', function() {
- var events = [
- {name: 'process_name', args: {name: 'First'},
- pid: 2, ts: 0, tid: 1, ph: 'M'},
- {name: 'process_name', args: {name: 'Second'},
- pid: 2, ts: 0, tid: 1, ph: 'M'},
- {name: 'process_sort_index', args: {sort_index: 1},
- pid: 1, ts: 0, tid: 1, ph: 'M'}
- ];
- var m = makeModel(events);
-
- // By name, p1 is before p2. But, its sort index overrides that.
- assert.isAbove(m.processes[1].compareTo(m.processes[2]), 0);
- });
-
- // Thread names.
- test('threadNames', function() {
- var events = [
- {name: 'thread_name', args: {name: 'Thread 1'},
- pid: 1, ts: 0, tid: 1, ph: 'M'},
- {name: 'thread_name', args: {name: 'Thread 2'},
- pid: 2, ts: 0, tid: 2, ph: 'M'}
- ];
- var m = makeModel(events, false, false);
- assert.equal(m.processes[1].threads[1].name, 'Thread 1');
- assert.equal(m.processes[2].threads[2].name, 'Thread 2');
- });
-
- // Thread sort index.
- test('threadSortIndex', function() {
- var events = [
- {name: 'thread_name', args: {name: 'Thread 1'},
- pid: 1, ts: 0, tid: 1, ph: 'M'},
- {name: 'thread_name', args: {name: 'Thread 2'},
- pid: 1, ts: 0, tid: 2, ph: 'M'},
- {name: 'thread_sort_index', args: {sort_index: 1},
- pid: 1, ts: 0, tid: 1, ph: 'M'}
- ];
- var m = makeModel(events, false, false);
-
- // By name, t1 is before t2. But, its sort index overrides that.
- var t1 = m.processes[1].threads[1];
- var t2 = m.processes[1].threads[2];
- assert.isAbove(t1.compareTo(t2), 0);
- });
-
- // CPU counts.
- test('cpuCounts', function() {
- var events = [
- {name: 'num_cpus', args: {number: 4},
- pid: 7, ts: 0, tid: 0, ph: 'M'},
- {name: 'num_cpus', args: {number: 4},
- pid: 14, ts: 0, tid: 0, ph: 'M'}
- ];
- var m = makeModel(events);
- assert.equal(m.kernel.softwareMeasuredCpuCount, 4);
- assert.equal(m.kernel.bestGuessAtCpuCount, 4);
- });
-
- test('cpuCountsWithSandboxBeingConfused', function() {
- var events = [
- {name: 'num_cpus', args: {number: 4},
- pid: 7, ts: 0, tid: 0, ph: 'M'},
- {name: 'num_cpus', args: {number: 1},
- pid: 14, ts: 0, tid: 0, ph: 'M'}
- ];
- var m = makeModel(events);
- assert.equal(m.kernel.softwareMeasuredCpuCount, 4);
- assert.equal(m.kernel.bestGuessAtCpuCount, 4);
- });
-
- test('parsingWhenEndComesFirst', function() {
- var events = [
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'E'},
- {name: 'a', args: {}, pid: 1, ts: 4, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'a', args: {}, pid: 1, ts: 5, cat: 'foo', tid: 1, ph: 'E'}
- ];
- var m = makeModel(events, false);
- var p = m.processes[1];
- var t = p.threads[1];
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.sliceGroup.slices[0].title, 'a');
- assert.equal(t.sliceGroup.slices[0].category, 'foo');
- assert.equal(t.sliceGroup.slices[0].start, 0.004);
- assert.equal(t.sliceGroup.slices[0].duration, 0.001);
- assert.isTrue(m.hasImportWarnings);
- assert.equal(m.importWarnings.length, 1);
- });
-
- test('immediateParsing', function() {
- var events = [
- // Need to include immediates inside a task so the timeline
- // recentering/zeroing doesn't clobber their timestamp.
- {name: 'a', args: {}, pid: 1, ts: 1, cat: 'foo', tid: 1, ph: 'B'},
- {name: 'immediate', args: {}, pid: 1, ts: 2, cat: 'bar', tid: 1, ph: 'I'},
- {name: 'slower', args: {}, pid: 1, ts: 4, cat: 'baz', tid: 1, ph: 'i'},
- {name: 'a', args: {}, pid: 1, ts: 4, cat: 'foo', tid: 1, ph: 'E'}
- ];
- var m = makeModel(events, false);
- var p = m.processes[1];
- var t = p.threads[1];
-
- assert.equal(t.sliceGroup.length, 3);
- assert.equal(t.sliceGroup.slices[0].start, 0.001);
- assert.equal(t.sliceGroup.slices[0].duration, 0.003);
- assert.equal(t.sliceGroup.slices[1].start, 0.002);
- assert.equal(t.sliceGroup.slices[1].duration, 0);
- assert.equal(t.sliceGroup.slices[2].start, 0.004);
-
- var slice = findSliceNamed(t.sliceGroup, 'a');
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.duration, 0.003);
-
- var immed = findSliceNamed(t.sliceGroup, 'immediate');
- assert.equal(immed.title, 'immediate');
- assert.equal(immed.category, 'bar');
- assert.equal(immed.start, 0.002);
- assert.equal(immed.duration, 0);
-
- var slower = findSliceNamed(t.sliceGroup, 'slower');
- assert.equal(slower.title, 'slower');
- assert.equal(slower.category, 'baz');
- assert.equal(slower.start, 0.004);
- assert.equal(slower.duration, 0);
- });
-
- test('simpleCounter', function() {
- var events = [
- {name: 'ctr', args: {'value': 0}, pid: 1, ts: 0, cat: 'foo', tid: 1,
- ph: 'C'},
- {name: 'ctr', args: {'value': 10}, pid: 1, ts: 10, cat: 'foo', tid: 1,
- ph: 'C'},
- {name: 'ctr', args: {'value': 0}, pid: 1, ts: 20, cat: 'foo', tid: 1,
- ph: 'C'}
-
- ];
- var m = makeModel(events);
- var p = m.processes[1];
- var ctr = m.processes[1].counters['foo.ctr'];
-
- assert.equal(ctr.name, 'ctr');
- assert.equal(ctr.category, 'foo');
- assert.equal(ctr.numSamples, 3);
- assert.equal(ctr.numSeries, 1);
-
- assert.equal(ctr.series[0].name, 'value');
- assert.equal(ctr.series[0].color,
- ColorScheme.getColorIdForGeneralPurposeString('ctr.value'));
-
- assert.deepEqual(ctr.timestamps, [0, 0.01, 0.02]);
-
- var samples = [];
- ctr.series[0].samples.forEach(function(sample) {
- samples.push(sample.value);
- });
- assert.deepEqual(samples, [0, 10, 0]);
-
- assert.deepEqual(ctr.totals, [0, 10, 0]);
- assert.equal(ctr.maxTotal, 10);
- });
-
- test('instanceCounter', function() {
- var events = [
- {name: 'ctr', args: {'value': 0}, pid: 1, ts: 0, cat: 'foo', tid: 1,
- ph: 'C', id: 0},
- {name: 'ctr', args: {'value': 10}, pid: 1, ts: 10, cat: 'foo', tid: 1,
- ph: 'C', id: 0},
- {name: 'ctr', args: {'value': 10}, pid: 1, ts: 10, cat: 'foo', tid: 1,
- ph: 'C', id: 1},
- {name: 'ctr', args: {'value': 20}, pid: 1, ts: 15, cat: 'foo', tid: 1,
- ph: 'C', id: 1},
- {name: 'ctr', args: {'value': 30}, pid: 1, ts: 20, cat: 'foo', tid: 1,
- ph: 'C', id: 1},
- {name: 'ctr', args: {'value': 40}, pid: 1, ts: 25, cat: 'bar', tid: 1,
- ph: 'C', id: 2}
- ];
- var m = makeModel(events);
- var p = m.processes[1];
- var ctr = m.processes[1].counters['foo.ctr[0]'];
- assert.equal(ctr.name, 'ctr[0]');
- assert.equal(ctr.category, 'foo');
- assert.equal(ctr.numSamples, 2);
- assert.equal(ctr.numSeries, 1);
-
- assert.deepEqual(ctr.timestamps, [0, 0.01]);
- var samples = [];
- ctr.series[0].samples.forEach(function(sample) {
- samples.push(sample.value);
- });
- assert.deepEqual(samples, [0, 10]);
-
- ctr = m.processes[1].counters['foo.ctr[1]'];
- assert.equal(ctr.name, 'ctr[1]');
- assert.equal(ctr.category, 'foo');
- assert.equal(ctr.numSamples, 3);
- assert.equal(ctr.numSeries, 1);
- assert.deepEqual(ctr.timestamps, [0.01, 0.015, 0.02]);
-
- samples = [];
- ctr.series[0].samples.forEach(function(sample) {
- samples.push(sample.value);
- });
- assert.deepEqual(samples, [10, 20, 30]);
-
- ctr = m.processes[1].counters['bar.ctr[2]'];
- assert.equal(ctr.name, 'ctr[2]');
- assert.equal(ctr.category, 'bar');
- assert.equal(ctr.numSamples, 1);
- assert.equal(ctr.numSeries, 1);
- assert.deepEqual(ctr.timestamps, [0.025]);
- var samples = [];
- ctr.series[0].samples.forEach(function(sample) {
- samples.push(sample.value);
- });
- assert.deepEqual(samples, [40]);
- });
-
- test('multiCounterUpdateBounds', function() {
- var ctr = new tr.model.Counter(undefined, 'testBasicCounter',
- '', 'testBasicCounter');
- var value1Series = new tr.model.CounterSeries(
- 'value1', 'testBasicCounter.value1');
- var value2Series = new tr.model.CounterSeries(
- 'value2', 'testBasicCounter.value2');
- ctr.addSeries(value1Series);
- ctr.addSeries(value2Series);
-
- value1Series.addCounterSample(0, 0);
- value1Series.addCounterSample(1, 1);
- value1Series.addCounterSample(2, 1);
- value1Series.addCounterSample(3, 2);
- value1Series.addCounterSample(4, 3);
- value1Series.addCounterSample(5, 1);
- value1Series.addCounterSample(6, 3);
- value1Series.addCounterSample(7, 3.1);
-
- value2Series.addCounterSample(0, 0);
- value2Series.addCounterSample(1, 0);
- value2Series.addCounterSample(2, 1);
- value2Series.addCounterSample(3, 1.1);
- value2Series.addCounterSample(4, 0);
- value2Series.addCounterSample(5, 7);
- value2Series.addCounterSample(6, 0);
- value2Series.addCounterSample(7, 0.5);
-
- ctr.updateBounds();
-
- assert.equal(ctr.bounds.min, 0);
- assert.equal(ctr.bounds.max, 7);
- assert.equal(ctr.maxTotal, 8);
- assert.deepEqual([0, 0,
- 1, 1,
- 1, 2,
- 2, 3.1,
- 3, 3,
- 1, 8,
- 3, 3,
- 3.1, 3.6], ctr.totals);
- });
-
- test('multiCounter', function() {
- var events = [
- {name: 'ctr', args: {'value1': 0, 'value2': 7}, pid: 1, ts: 0, cat: 'foo', tid: 1, ph: 'C'}, // @suppress longLineCheck
- {name: 'ctr', args: {'value1': 10, 'value2': 4}, pid: 1, ts: 10, cat: 'foo', tid: 1, ph: 'C'}, // @suppress longLineCheck
- {name: 'ctr', args: {'value1': 0, 'value2': 1 }, pid: 1, ts: 20, cat: 'foo', tid: 1, ph: 'C'} // @suppress longLineCheck
- ];
- var m = makeModel(events);
- var p = m.processes[1];
- var ctr = m.processes[1].counters['foo.ctr'];
- assert.equal(ctr.name, 'ctr');
-
- assert.equal(ctr.name, 'ctr');
- assert.equal(ctr.category, 'foo');
- assert.equal(ctr.numSamples, 3);
- assert.equal(ctr.numSeries, 2);
-
- assert.equal(ctr.series[0].name, 'value1');
- assert.equal(ctr.series[1].name, 'value2');
- assert.equal(ctr.series[0].color,
- ColorScheme.getColorIdForGeneralPurposeString('ctr.value1'));
- assert.equal(ctr.series[1].color,
- ColorScheme.getColorIdForGeneralPurposeString('ctr.value2'));
-
- assert.deepEqual(ctr.timestamps, [0, 0.01, 0.02]);
- var samples = [];
- ctr.series[0].samples.forEach(function(sample) {
- samples.push(sample.value);
- });
- assert.deepEqual(samples, [0, 10, 0]);
-
- var samples1 = [];
- ctr.series[1].samples.forEach(function(sample) {
- samples1.push(sample.value);
- });
- assert.deepEqual(samples1, [7, 4, 1]);
- assert.deepEqual([0, 7,
- 10, 14,
- 0, 1], ctr.totals);
- assert.equal(ctr.maxTotal, 14);
- });
-
- test('importObjectInsteadOfArray', function() {
- var events = { traceEvents: [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ] };
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- });
-
- test('importString', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(JSON.stringify(events));
- assert.equal(m.numProcesses, 1);
- });
-
- test('importStringWithLeadingSpaces', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(' ' + JSON.stringify(events));
- assert.equal(m.numProcesses, 1);
- });
-
- test('importStringWithTrailingNewLine', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(JSON.stringify(events) + '\n');
- assert.equal(m.numProcesses, 1);
- });
-
- test('importStringWithMissingCloseSquareBracket', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var tmp = JSON.stringify(events);
- assert.equal(tmp[tmp.length - 1], ']');
-
- // Drop off the trailing ]
- var dropped = tmp.substring(0, tmp.length - 1);
- var m = makeModel(dropped);
- assert.equal(m.numProcesses, 1);
- });
-
- test('importStringWithEndingCommaButMissingCloseSquareBracket', function() {
- var lines = [
- '[',
- '{"name": "a", "args": {}, "pid": 52, "ts": 524, "cat": "foo", "tid": 53, "ph": "B"},', // @suppress longLineCheck
- '{"name": "a", "args": {}, "pid": 52, "ts": 560, "cat": "foo", "tid": 53, "ph": "E"},' // @suppress longLineCheck
- ];
- var text = lines.join('\n');
-
- var m = makeModel(text);
- assert.equal(m.numProcesses, 1);
- assert.equal(m.processes[52].threads[53].sliceGroup.length, 1);
- });
-
- test('importStringWithMissingCloseSquareBracketAndNewline', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var tmp = JSON.stringify(events);
- assert.equal(tmp[tmp.length - 1], ']');
-
- // Drop off the trailing ] and add a newline
- var dropped = tmp.substring(0, tmp.length - 1);
- var m = makeModel(dropped + '\n');
- assert.equal(m.numProcesses, 1);
- });
-
- test('ImportStringEndingCommaButMissingCloseSquareBracketCRLF', function() {
- var lines = [
- '[',
- '{"name": "a", "args": {}, "pid": 52, "ts": 524, "cat": "foo", "tid": 53, "ph": "B"},', // @suppress longLineCheck
- '{"name": "a", "args": {}, "pid": 52, "ts": 560, "cat": "foo", "tid": 53, "ph": "E"},' // @suppress longLineCheck
- ];
- var text = lines.join('\r\n');
-
- var m = makeModel(text);
- assert.equal(m.numProcesses, 1);
- assert.equal(m.processes[52].threads[53].sliceGroup.length, 1);
- });
-
- test('importOldFormat', function() {
- var lines = [
- '[',
- '{"cat":"a","pid":9,"tid":8,"ts":194,"ph":"E","name":"I","args":{}},',
- '{"cat":"b","pid":9,"tid":8,"ts":194,"ph":"B","name":"I","args":{}}',
- ']'
- ];
- var text = lines.join('\n');
- var m = makeModel(text);
- assert.equal(m.numProcesses, 1);
- assert.equal(m.processes[9].threads[8].sliceGroup.length, 1);
- });
-
- test('startFinishOneSliceOneThread', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'cat', tid: 53,
- ph: 'F', id: 72},
- {name: 'a', pid: 52, ts: 524, cat: 'cat', tid: 53,
- ph: 'S', id: 72, args: {'foo': 'bar'}}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- assert.equal(t.asyncSliceGroup.slices[0].title, 'a');
- assert.equal(t.asyncSliceGroup.slices[0].category, 'cat');
- assert.isTrue(t.asyncSliceGroup.slices[0].isTopLevel);
- assert.equal(t.asyncSliceGroup.slices[0].id, 72);
- assert.equal(t.asyncSliceGroup.slices[0].args.foo, 'bar');
- assert.equal(t.asyncSliceGroup.slices[0].start, 0);
- assert.closeTo(
- (60 - 24) / 1000, t.asyncSliceGroup.slices[0].duration, 1e-5);
- assert.equal(t.asyncSliceGroup.slices[0].startThread, t);
- assert.equal(t.asyncSliceGroup.slices[0].endThread, t);
- });
-
- test('endArgsAddedToSlice', function() {
- var events = [
- {name: 'a', args: {x: 1}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {y: 2}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.length, 1);
- assert.equal(t.tid, 53);
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.equal(slice.subSlices.length, 0);
- assert.equal(slice.args['x'], 1);
- assert.equal(slice.args['y'], 2);
- });
-
- test('endArgOverrwritesOriginalArgValueIfDuplicated', function() {
- var events = [
- {name: 'b', args: {z: 3}, pid: 52, ts: 629, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {z: 4}, pid: 52, ts: 631, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'foo');
- assert.equal(slice.start, 0);
- assert.equal(slice.subSlices.length, 0);
- assert.equal(slice.args['z'], 4);
- });
-
- test('asyncEndArgsAddedToSlice', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'c', args: {y: 2}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'F', id: 72},
- {name: 'c', args: {x: 1}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'S', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'c');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
- assert.equal(parentSlice.args['x'], 1);
- assert.equal(parentSlice.args['y'], 2);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 0);
- });
-
- test('asyncEndArgOverwritesOriginalArgValueIfDuplicated', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'd', args: {z: 4}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'F', id: 72},
- {name: 'd', args: {z: 3}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'S', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'd');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
- assert.equal(parentSlice.args['z'], 4);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 0);
- });
-
- test('asyncStepsInOneThread', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'a', args: {z: 3}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'F', id: 72}, // @suppress longLineCheck
- {name: 'a', args: {step: 's1', y: 2}, pid: 52, ts: 548, cat: 'foo', tid: 53, ph: 'T', id: 72}, // @suppress longLineCheck
- {name: 'a', args: {x: 1}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'S', id: 72} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
- assert.equal(parentSlice.start, 0);
- assert.equal(parentSlice.args['x'], 1);
- assert.isUndefined(parentSlice.args['y']);
- assert.equal(parentSlice.args['z'], 3);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 1);
-
- var subSlice = parentSlice.subSlices[0];
- assert.equal(subSlice.title, 'a:s1');
- assert.equal(subSlice.category, 'foo');
- assert.isFalse(subSlice.isTopLevel);
- assert.closeTo((548 - 524) / 1000, subSlice.start, 1e-5);
- assert.closeTo((560 - 548) / 1000, subSlice.duration, 1e-5);
- assert.isUndefined(subSlice.args['x']);
- assert.equal(subSlice.args['y'], 2);
- assert.isUndefined(subSlice.args['z']);
- });
-
- test('asyncStepsMissingStart', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'a', args: {z: 3}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'F', id: 72},
- {name: 'a', args: {step: 's1', y: 2}, pid: 52, ts: 548, cat: 'foo',
- tid: 53, ph: 'T', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isUndefined(t);
- });
-
- test('asyncStepsMissingFinish', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'a', args: {step: 's1', y: 2}, pid: 52, ts: 548, cat: 'foo',
- tid: 53, ph: 'T', id: 72},
- {name: 'a', args: {z: 3}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'S', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isUndefined(t);
- });
-
- test('asyncStepEndEvent', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'a', args: {z: 3}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'F', id: 72},
- {name: 'a', args: {step: 's1', y: 2}, pid: 52, ts: 548, cat: 'foo',
- tid: 53, ph: 'p', id: 72},
- {name: 'a', args: {x: 1}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'S', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
- assert.equal(parentSlice.start, 0);
- assert.equal(parentSlice.args['x'], 1);
- assert.isUndefined(parentSlice.args['y']);
- assert.equal(parentSlice.args['z'], 3);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 1);
- var subSlice = parentSlice.subSlices[0];
- assert.equal(subSlice.title, 'a:s1');
- assert.equal(subSlice.category, 'foo');
- assert.isFalse(subSlice.isTopLevel);
- assert.equal(subSlice.start, 0);
- assert.closeTo((548 - 524) / 1000, subSlice.duration, 1e-5);
- assert.isUndefined(subSlice.args['x']);
- assert.equal(subSlice.args['y'], 2);
- assert.isUndefined(subSlice.args['z']);
- });
-
- test('asyncStepMismatch', function() {
- var events = [
- // Time is intentionally out of order.
- {name: 'a', args: {z: 3}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'F', id: 72},
- {name: 'a', args: {step: 's2'}, pid: 52, ts: 548, cat: 'foo', tid: 53,
- ph: 'T', id: 72},
- {name: 'a', args: {step: 's1'}, pid: 52, ts: 548, cat: 'foo', tid: 53,
- ph: 'p', id: 72},
- {name: 'a', args: {x: 1}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'S', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isUndefined(t);
- assert.isTrue(m.hasImportWarnings);
- });
-
- test('asyncSliceWithoutCPUDuration', function() {
- var events = [
- // Async slice without tts field.
- {name: 'a', args: {params: ''}, pid: 52, ts: 10, cat: 'foo', tid: 53,
- id: 72, ph: 'b'},
- {name: 'a', args: {params: ''}, pid: 52, ts: 20, cat: 'foo', tid: 53,
- id: 72, ph: 'e'},
- // Async slice with tts field but without use_async_tts marker field.
- {name: 'b', args: {params: ''}, pid: 52, ts: 30, cat: 'foo', tid: 53,
- id: 72, ph: 'b', tts: 30000},
- {name: 'b', args: {params: ''}, pid: 52, ts: 40, cat: 'foo', tid: 53,
- id: 72, ph: 'e', tts: 40000},
- // Async slice with tts field but with use_async_tts marker set to 0.
- {name: 'c', args: {params: ''}, pid: 52, ts: 50000, cat: 'foo', tid: 53,
- id: 72, ph: 'b', tts: 50000, use_async_tts: 0},
- {name: 'c', args: {params: ''}, pid: 52, ts: 60000, cat: 'foo', tid: 53,
- id: 72, ph: 'e', tts: 60000, use_async_tts: 0}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 3);
-
- var noTTSNoField = t.asyncSliceGroup.slices[0];
- assert.isUndefined(noTTSNoField.cpuStart);
- assert.isUndefined(noTTSNoField.cpuDuration);
-
- var TTSNoField = t.asyncSliceGroup.slices[1];
- assert.isUndefined(TTSNoField.cpuStart);
- assert.isUndefined(TTSNoField.cpuDuration);
-
- var TTSZeroField = t.asyncSliceGroup.slices[2];
- assert.isUndefined(TTSZeroField.cpuStart);
- assert.isUndefined(TTSZeroField.cpuDuration);
- });
-
- test('asyncSliceWithCPUDuration', function() {
- var events = [
- {name: 'a', args: {params: ''}, pid: 52, ts: 50000, cat: 'foo', tid: 53,
- id: 72, ph: 'b', tts: 100000, use_async_tts: 1},
- {name: 'a', args: {params: ''}, pid: 52, ts: 60000, cat: 'foo', tid: 53,
- id: 72, ph: 'e', tts: 105000, use_async_tts: 1}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
-
- var asyncSlice = t.asyncSliceGroup.slices[0];
- assert.isDefined(asyncSlice);
- assert.equal(asyncSlice.duration, 10);
- assert.equal(asyncSlice.cpuStart, 100);
- assert.equal(asyncSlice.cpuDuration, 5);
- });
-
- test('nestableAsyncBasic', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'b', args: {x: 1}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'b', args: {y: 2}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'a', args: {}, pid: 52, ts: 565, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 1);
- var subSlice = parentSlice.subSlices[0];
- assert.isFalse(subSlice.isTopLevel);
- // Arguments should include both BEGIN and END event.
- assert.equal(subSlice.args['x'], 1);
- assert.equal(subSlice.args['y'], 2);
- assert.sameMembers(subSlice.subSlices, []);
- });
-
-
- test('nestableAsyncNoArgs', function() {
- var events = [
- {name: 'name', pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'name', pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var slice = t.asyncSliceGroup.slices[0];
- assert.equal(slice.title, 'name');
- assert.equal(slice.category, 'foo');
- assert.isTrue(slice.isTopLevel);
-
- assert.isDefined(slice.subSlices);
- assert.equal(slice.subSlices.length, 0);
-
- assert.deepEqual(slice.args, {});
- });
-
- test('nestableAsyncCombinedParams', function() {
- var events = [
- {name: 'a', args: {x: 1, params: {p1: 'hello', p2: 123}},
- pid: 52, ts: 525, cat: 'foo', tid: 53, ph: 'b', id: 72},
- {name: 'a', args: {y: 2, params: {p3: 'hi'}}, pid: 52, ts: 560,
- cat: 'foo', tid: 53, ph: 'e', id: 72},
- {name: 'b', args: {params: {p4: 'foo'}},
- pid: 52, ts: 525, cat: 'foo', tid: 53, ph: 'b', id: 73},
- {name: 'b', args: {params: ''}, pid: 52, ts: 560,
- cat: 'foo', tid: 53, ph: 'e', id: 73},
- {name: 'c', args: {params: {p5: 'bar'}},
- pid: 52, ts: 525, cat: 'foo', tid: 53, ph: 'b', id: 74},
- {name: 'c', args: {}, pid: 52, ts: 560,
- cat: 'foo', tid: 53, ph: 'e', id: 74}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 3);
-
- var sliceA = t.asyncSliceGroup.slices[0];
- // Arguments should include both BEGIN and END event.
- assert.equal(sliceA.args['x'], 1);
- assert.equal(sliceA.args['y'], 2);
- var paramsA = sliceA.args['params'];
- assert.isDefined(paramsA);
- assert.equal(paramsA.p1, 'hello');
- assert.equal(paramsA.p2, 123);
- assert.equal(paramsA.p3, 'hi');
- assert.isTrue(sliceA.isTopLevel);
-
- var sliceB = t.asyncSliceGroup.slices[1];
- // Arguments should include both BEGIN and END event.
- var paramsB = sliceB.args['params'];
- assert.isDefined(paramsB);
- assert.equal(paramsB.p4, 'foo');
- assert.isTrue(sliceB.isTopLevel);
-
- var sliceC = t.asyncSliceGroup.slices[2];
- // Arguments should include both BEGIN and END event.
- var paramsC = sliceC.args['params'];
- assert.isDefined(paramsC);
- assert.equal(paramsC.p5, 'bar');
- assert.isTrue(sliceC.isTopLevel);
- });
-
- test('nestableAsyncManyLevels', function() {
- // There are 5 nested levels.
- var events = [
- {name: 'l1', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'l2', args: {}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'l3', args: {}, pid: 52, ts: 526, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'l4', args: {}, pid: 52, ts: 527, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'l5', args: {}, pid: 52, ts: 528, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'l5', args: {}, pid: 52, ts: 529, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'l4', args: {}, pid: 52, ts: 530, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'l3', args: {}, pid: 52, ts: 531, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'l2', args: {}, pid: 52, ts: 532, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'l1', args: {}, pid: 52, ts: 533, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- // Perfectly matched events should not produce a warning.
- assert.isFalse(m.hasImportWarnings);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
-
- var l1Slice = t.asyncSliceGroup.slices[0];
- assert.equal(l1Slice.title, 'l1');
- assert.closeTo(0, l1Slice.start, 1e-5);
- assert.closeTo(9 / 1000, l1Slice.duration, 1e-5);
- assert.isTrue(l1Slice.isTopLevel);
-
- assert.isDefined(l1Slice.subSlices);
- assert.equal(l1Slice.subSlices.length, 1);
- var l2Slice = l1Slice.subSlices[0];
- assert.equal(l2Slice.title, 'l2');
- assert.closeTo(1 / 1000, l2Slice.start, 1e-5);
- assert.closeTo(7 / 1000, l2Slice.duration, 1e-5);
- assert.isFalse(l2Slice.isTopLevel);
-
- assert.isDefined(l2Slice.subSlices);
- assert.equal(l2Slice.subSlices.length, 1);
- var l3Slice = l2Slice.subSlices[0];
- assert.equal(l3Slice.title, 'l3');
- assert.closeTo(2 / 1000, l3Slice.start, 1e-5);
- assert.closeTo(5 / 1000, l3Slice.duration, 1e-5);
- assert.isFalse(l3Slice.isTopLevel);
-
- assert.isDefined(l3Slice.subSlices);
- assert.equal(l3Slice.subSlices.length, 1);
- var l4Slice = l3Slice.subSlices[0];
- assert.equal(l4Slice.title, 'l4');
- assert.closeTo(3 / 1000, l4Slice.start, 1e-5);
- assert.closeTo(3 / 1000, l4Slice.duration, 1e-5);
- assert.isFalse(l4Slice.isTopLevel);
-
- assert.isDefined(l4Slice.subSlices);
- assert.equal(l4Slice.subSlices.length, 1);
- var l5Slice = l4Slice.subSlices[0];
- assert.equal(l5Slice.title, 'l5');
- assert.closeTo(4 / 1000, l5Slice.start, 1e-5);
- assert.closeTo(1 / 1000, l5Slice.duration, 1e-5);
- assert.isFalse(l5Slice.isTopLevel);
- });
-
- test('nestableAsyncInstantEvent', function() {
- var events = [
- {name: 'c', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'n', id: 71},
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'd', args: {}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'n', id: 72},
- {name: 'a', args: {}, pid: 52, ts: 565, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 2);
- var instantSlice = t.asyncSliceGroup.slices[0];
- assert.equal(instantSlice.title, 'c');
- assert.closeTo(0, instantSlice.start, 1e-5);
- assert.closeTo(0, instantSlice.duration, 1e-5);
- assert.sameMembers(instantSlice.subSlices, []);
- assert.isTrue(instantSlice.isTopLevel);
-
- var nestedSlice = t.asyncSliceGroup.slices[1];
- assert.equal(nestedSlice.title, 'a');
- assert.closeTo(0, nestedSlice.start, 1e-5);
- assert.closeTo((565 - 524) / 1000, nestedSlice.duration, 1e-5);
- assert.isTrue(nestedSlice.isTopLevel);
- assert.isDefined(nestedSlice.subSlices);
- assert.equal(nestedSlice.subSlices.length, 1);
- var nestedInstantSlice = nestedSlice.subSlices[0];
- assert.sameMembers(nestedInstantSlice.subSlices, []);
- assert.equal(nestedInstantSlice.title, 'd');
- assert.isFalse(nestedInstantSlice.isTopLevel);
- });
-
- test('nestableAsyncUnmatchedOuterBeginEvent', function() {
- var events = [
- {name: 'a', args: {x: 1}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'b', args: {}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'b', args: {y: 2}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- // Unmatched BEGIN should produce a warning.
- assert.isTrue(m.hasImportWarnings);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
- assert.closeTo(0, parentSlice.start, 0.0001);
- // Unmatched BEGIN event ends at the last event of that ID.
- assert.closeTo(36 / 1000, parentSlice.duration, 0.0001);
- // Arguments should include only include its arguments.
- assert.isUndefined(parentSlice.args['y']);
- assert.equal(parentSlice.args['x'], 1);
- assert.isDefined(parentSlice.error);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 1);
- var subSlice = parentSlice.subSlices[0];
- assert.isFalse(subSlice.isTopLevel);
- assert.closeTo(1 / 1000, subSlice.start, 1e-5);
- assert.closeTo(35 / 1000, subSlice.duration, 1e-5);
- assert.sameMembers(subSlice.subSlices, []);
- // Arguments should include those of the END event.
- assert.equal(subSlice.args['y'], 2);
- assert.sameMembers(subSlice.subSlices, []);
- });
-
- test('nestableAsyncUnmatchedInnerBeginEvent', function() {
- var events = [
- {name: 'a', args: {z: 3}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'c', args: {}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'n', id: 72},
- {name: 'b', args: {x: 1}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'a', args: {y: 2}, pid: 52, ts: 565, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- // Unmatched BEGIN should produce a warning.
- assert.isTrue(m.hasImportWarnings);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
- assert.closeTo(0, parentSlice.start, 1e-5);
- assert.closeTo(41 / 1000, parentSlice.duration, 1e-5);
- // Arguments should include both BEGIN and END event.
- assert.equal(parentSlice.args['y'], 2);
- assert.equal(parentSlice.args['z'], 3);
- assert.isUndefined(parentSlice.args['x']);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 2);
- var subSliceInstant = parentSlice.subSlices[0];
- var subSliceUnmatched = parentSlice.subSlices[1];
- assert.equal(subSliceInstant.title, 'c');
- assert.isFalse(subSliceInstant.isTopLevel);
- assert.equal(subSliceUnmatched.title, 'b');
- assert.isFalse(subSliceUnmatched.isTopLevel);
- // Unmatched BEGIN ends at the last event of that ID.
- assert.closeTo(1 / 1000, subSliceUnmatched.start, 1e-5);
- assert.closeTo(40 / 1000, subSliceUnmatched.duration, 1e-5);
- assert.sameMembers(subSliceUnmatched.subSlices, []);
- assert.equal(subSliceUnmatched.args['x'], 1);
- assert.isUndefined(subSliceUnmatched['y']);
- assert.isDefined(subSliceUnmatched.error);
- assert.closeTo(1 / 1000, subSliceInstant.start, 1e-5);
- assert.closeTo(0, subSliceInstant.duration, 1e-5);
- assert.sameMembers(subSliceInstant.subSlices, []);
- });
-
- test('nestableAsyncUnmatchedOuterEndEvent', function() {
- // Events are intentionally out-of-order.
- var events = [
- {name: 'b', args: {x: 1}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'b', args: {y: 2}, pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'a', args: {z: 3}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- // Unmatched END should produce a warning.
- assert.isTrue(m.hasImportWarnings);
- assert.equal(t.asyncSliceGroup.slices.length, 2);
- var unmatchedSlice = t.asyncSliceGroup.slices[0];
- var slice = t.asyncSliceGroup.slices[1];
- assert.equal(unmatchedSlice.title, 'a');
- assert.closeTo(0, unmatchedSlice.start, 1e-5);
- assert.isTrue(unmatchedSlice.isTopLevel);
- // Unmatched END event begins at the first event of that ID. In this
- // case, the first event happens to be the same unmatched event.
- assert.closeTo(0 / 1000, unmatchedSlice.duration, 1e-5);
- assert.isUndefined(unmatchedSlice.args['x']);
- assert.isUndefined(unmatchedSlice.args['y']);
- assert.equal(unmatchedSlice.args['z'], 3);
- assert.isDefined(unmatchedSlice.error);
- assert.sameMembers(unmatchedSlice.subSlices, []);
-
- assert.equal(slice.title, 'b');
- assert.isTrue(slice.isTopLevel);
- assert.closeTo(1 / 1000, slice.start, 1e-5);
- assert.closeTo(35 / 1000, slice.duration, 1e-5);
- // Arguments should include both BEGIN and END event.
- assert.equal(slice.args['x'], 1);
- assert.equal(slice.args['y'], 2);
- assert.sameMembers(slice.subSlices, []);
- });
-
- test('nestableAsyncUnmatchedInnerEndEvent', function() {
- var events = [
- {name: 'a', args: {x: 1}, pid: 52, ts: 524, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'c', args: {}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'n', id: 72},
- {name: 'b', args: {z: 3}, pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'e', id: 72},
- {name: 'a', args: {y: 2}, pid: 52, ts: 565, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- // Unmatched END should produce a warning.
- assert.isTrue(m.hasImportWarnings);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.isTrue(parentSlice.isTopLevel);
- assert.closeTo(0, parentSlice.start, 1e-5);
- assert.closeTo(41 / 1000, parentSlice.duration, 1e-5);
- // Arguments should include both BEGIN and END event.
- assert.equal(parentSlice.args['x'], 1);
- assert.equal(parentSlice.args['y'], 2);
-
- assert.isDefined(parentSlice.subSlices);
- assert.equal(parentSlice.subSlices.length, 2);
- var subSliceInstant = parentSlice.subSlices[0];
- var subSliceUnmatched = parentSlice.subSlices[1];
- assert.equal(subSliceInstant.title, 'c');
- assert.isFalse(subSliceInstant.isTopLevel);
- assert.equal(subSliceUnmatched.title, 'b');
- assert.isFalse(subSliceUnmatched.isTopLevel);
- // Unmatched END begins at the first event of that ID.
- assert.closeTo(0 / 1000, subSliceUnmatched.start, 1e-5);
- assert.closeTo(1 / 1000, subSliceUnmatched.duration, 1e-5);
- // Arguments should include both BEGIN and END event.
- assert.isUndefined(subSliceUnmatched.args['x']);
- assert.isUndefined(subSliceUnmatched.args['y']);
- assert.equal(subSliceUnmatched.args['z'], 3);
- assert.isDefined(subSliceUnmatched.error);
-
- assert.sameMembers(subSliceUnmatched.subSlices, []);
- assert.closeTo(1 / 1000, subSliceInstant.start, 1e-5);
- assert.closeTo(0, subSliceInstant.duration, 1e-5);
- assert.sameMembers(subSliceInstant.subSlices, []);
- });
-
- test('nestableAsyncSameIDDifferentCategory', function() {
- // Events with the same ID, but different categories should not be
- // considered as nested.
- var events = [
- {name: 'EVENT_A', args: {}, pid: 52, ts: 500, cat: 'foo', tid: 53,
- ph: 'b', id: 72},
- {name: 'EVENT_B', args: {y: 2}, pid: 52, ts: 550, cat: 'bar', tid: 53,
- ph: 'b', id: 72},
- {name: 'EVENT_B', args: {}, pid: 52, ts: 600, cat: 'bar', tid: 53,
- ph: 'e', id: 72},
- {name: 'EVENT_A', args: {x: 1}, pid: 52, ts: 650, cat: 'foo', tid: 53,
- ph: 'e', id: 72}
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 2);
- var eventASlice = t.asyncSliceGroup.slices[0];
- assert.equal(eventASlice.title, 'EVENT_A');
- assert.equal(eventASlice.category, 'foo');
- assert.equal(eventASlice.id, 'foo:72');
- assert.isTrue(eventASlice.isTopLevel);
- assert.equal(eventASlice.args['x'], 1);
- assert.sameMembers(eventASlice.subSlices, []);
-
- var eventBSlice = t.asyncSliceGroup.slices[1];
- assert.equal(eventBSlice.title, 'EVENT_B');
- assert.equal(eventBSlice.category, 'bar');
- assert.equal(eventBSlice.id, 'bar:72');
- assert.isTrue(eventBSlice.isTopLevel);
- assert.equal(eventBSlice.args['y'], 2);
- assert.sameMembers(eventBSlice.subSlices, []);
- });
-
- test('nestableAsyncStackFrame', function() {
- var events = {
- traceEvents: [
- {name: 'name', pid: 52, ts: 525, cat: 'foo', tid: 53,
- ph: 'b', id: 72, sf: 1},
- {name: 'name', pid: 52, ts: 560, cat: 'foo', tid: 53,
- ph: 'e', id: 72, sf: 7}
- ],
- stackFrames: {
- '1': {
- category: 'm1',
- name: 'main'
- },
- '7': {
- category: 'm2',
- name: 'frame7',
- parent: '1'
- }
- }
- };
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
- assert.isDefined(t);
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var slice = t.asyncSliceGroup.slices[0];
-
- assert.equal(slice.startStackFrame.title, 'main');
- assert.equal(slice.endStackFrame.title, 'frame7');
- });
-
- test('importSamples', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 548, cat: 'test', tid: 53, ph: 'P'},
- {name: 'b', args: {}, pid: 52, ts: 548, cat: 'test', tid: 53, ph: 'P'},
- {name: 'c', args: {}, pid: 52, ts: 558, cat: 'test', tid: 53, ph: 'P'},
- {name: 'a', args: {}, pid: 52, ts: 568, cat: 'test', tid: 53, ph: 'P'}
- ];
- var m = makeModel(events);
- var p = m.processes[52];
- assert.isDefined(p);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.samples_.length, 4);
- assert.equal(t.samples_[0].start, 0.0);
- assert.equal(t.samples_[1].start, 0.0);
- assert.closeTo(0.01, t.samples_[2].start, 1e-5);
- assert.equal(t.samples_[0].leafStackFrame.title, 'a');
- assert.equal(t.samples_[1].leafStackFrame.title, 'b');
- assert.equal(t.samples_[2].leafStackFrame.title, 'c');
- assert.equal(t.samples_[3].leafStackFrame, t.samples[0].leafStackFrame);
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('importSamplesWithStackFrames', function() {
- var eventData = {
- traceEvents: [
- { name: 'a', args: {}, pid: 1, ts: 0, cat: 'test', tid: 2, ph: 'P', sf: 7 } // @suppress longLineCheck
- ],
- stackFrames: {
- '1': {
- category: 'm1',
- name: 'main'
- },
- '7': {
- category: 'm2',
- name: 'frame7',
- parent: '1'
- }
- }
- };
-
- var m = makeModel(eventData);
-
- var p = m.processes[1];
- var t = p.threads[2];
-
- assert.equal(t.samples.length, 1);
- assert.equal(t.samples_[0].start, 0.0);
- assert.equal(t.samples_[0].leafStackFrame.title, 'frame7');
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('importSamplesMissingArgs', function() {
- var events = [
- {name: 'a', pid: 52, ts: 548, cat: 'test', tid: 53, ph: 'P'},
- {name: 'b', pid: 52, ts: 548, cat: 'test', tid: 53, ph: 'P'},
- {name: 'c', pid: 52, ts: 549, cat: 'test', tid: 53, ph: 'P'}
- ];
- var m = makeModel(events);
- var p = m.processes[52];
- assert.isDefined(p);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.isDefined(t);
- assert.equal(t.samples_.length, 3);
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('importV8Samples', function() {
- var eventData = {
- traceEvents: [
- { name: 'V8Sample', args: {data: {stack: ['0x2a574306061', '0x2a574306224'], vm_state: 'js'}}, pid: 1, ts: 4, cat: 'test', tid: 2, ph: 'P' }, // @suppress longLineCheck
- { name: 'V8Sample', args: {data: {stack: [], vm_state: 'gc'}}, pid: 1, ts: 6, cat: 'test', tid: 2, ph: 'P' }, // @suppress longLineCheck
- { name: 'JitCodeAdded', args: {data: {code_len: 2, name: 'LazyCompile:~foo http://example.com/bar.js:23', code_start: '0x2a574306060'}}, pid: 1, ts: 1, cat: 'test', tid: 2, ph: 'M' }, // @suppress longLineCheck
- { name: 'JitCodeAdded', args: {data: {code_len: 20, name: 'bar', code_start: '0x2a574306220'}}, pid: 1, ts: 2, cat: 'test', tid: 2, ph: 'M' }, // @suppress longLineCheck
- { name: 'JitCodeMoved', args: {data: {code_len: 2, old_code_start: '0x2a574306220', code_start: '0x2a574306222'}}, pid: 1, ts: 3, cat: 'test', tid: 2, ph: 'M' }, // @suppress longLineCheck
- { name: 'JitCodeAdded', args: {data: {code_len: 20, name: 'baz', code_start: '0xffffffff9f90a1a0'}}, pid: 1, ts: 4, cat: 'test', tid: 2, ph: 'M' } // @suppress longLineCheck
- ]
- };
-
- var m = makeModel(eventData);
- var p = m.processes[1];
- var t = p.threads[2];
-
- assert.isFalse(m.hasImportWarnings);
- assert.equal(t.samples.length, 2);
-
- var sample = t.samples_[0];
- assert.equal(sample.leafStackFrame.title,
- 'foo http://example.com/bar.js:22');
- assert.equal(sample.leafStackFrame.parentFrame.title, 'bar');
-
- var sample = t.samples_[1];
- assert.equal(sample.leafStackFrame.title, 'gc');
- });
-
- test('importOldFormatV8Samples', function() {
- var eventData = {
- traceEvents: [
- { name: 'JitCodeAdded', args: {data: {code_len: 2, name: 'LazyCompile:~foo http://example.com/bar.js:23', code_start: '0x2a574306060'}}, pid: 1, ts: 0, cat: 'test', tid: 2, ph: 'I' }, // @suppress longLineCheck
- { name: 'JitCodeAdded', args: {data: {code_len: 20, name: 'bar', code_start: '0x2a574306220'}}, pid: 1, ts: 0, cat: 'test', tid: 2, ph: 'I' }, // @suppress longLineCheck
- { name: 'JitCodeMoved', args: {data: {code_len: 2, old_code_start: '0x2a574306220', code_start: '0x2a574306222'}}, pid: 1, ts: 0, cat: 'test', tid: 2, ph: 'I' }, // @suppress longLineCheck
- { name: 'JitCodeAdded', args: {data: {code_len: 20, name: 'baz', code_start: '0xffffffff9f90a1a0'}}, pid: 1, ts: 0, cat: 'test', tid: 2, ph: 'I' }, // @suppress longLineCheck
- { name: 'V8Sample', args: {data: {stack: ['0x2a574306061', '0x2a574306224']}}, pid: 1, ts: 0, cat: 'test', tid: 2, ph: 'P' }, // @suppress longLineCheck
- { name: 'V8Sample', args: {data: {stack: [], vm_state: 'gc'}}, pid: 1, ts: 10, cat: 'test', tid: 2, ph: 'P' } // @suppress longLineCheck
- ]
- };
-
- var m = makeModel(eventData);
- var p = m.processes[1];
- var t = p.threads[2];
-
- assert.isFalse(m.hasImportWarnings);
- assert.equal(t.samples.length, 2);
-
- var sample = t.samples_[0];
- assert.equal(sample.leafStackFrame.title,
- 'foo http://example.com/bar.js:22');
- assert.equal(sample.leafStackFrame.parentFrame.title, 'bar');
-
- var sample = t.samples_[1];
- assert.equal(sample.leafStackFrame.title, 'gc');
- });
-
- test('importSimpleObject', function() {
- var events = [
- {ts: 10000, pid: 1, tid: 1, ph: 'N', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: {snapshot: 15}}, // @suppress longLineCheck
- {ts: 20000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: {snapshot: 20}}, // @suppress longLineCheck
- {ts: 50000, pid: 1, tid: 1, ph: 'D', cat: 'c', id: '0x1000', name: 'a', args: {}} // @suppress longLineCheck
- ];
- var m = makeModel(events, false);
- assert.equal(m.bounds.min, 10);
- assert.equal(m.bounds.max, 50);
- assert.isFalse(m.hasImportWarnings);
-
- var p = m.processes[1];
- assert.isDefined(p);
-
- var i10 = p.objects.getObjectInstanceAt(new ScopedId('ptr', '0x1000'), 10);
- assert.equal(i10.category, 'c');
- assert.equal(i10.creationTs, 10);
- assert.equal(i10.deletionTs, 50);
- assert.equal(i10.snapshots.length, 2);
-
- var s15 = i10.snapshots[0];
- assert.equal(s15.ts, 15);
- assert.equal(s15.args, 15);
-
- var s20 = i10.snapshots[1];
- assert.equal(s20.ts, 20);
- assert.equal(s20.args, 20);
- });
-
- test('importImplicitObjects', function() {
- var events = [
- {ts: 10000, pid: 1, tid: 1, ph: 'N', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a',
- args: { snapshot: [
- { id: 'subObject/0x1',
- foo: 1
- }
- ]}},
- {ts: 20000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a',
- args: { snapshot: [
- { id: 'subObject/0x1',
- foo: 2
- },
- { id: 'subObject/0x2',
- foo: 1
- }
- ]}}
- ];
-
- var m = makeModel(events, false);
- var p1 = m.processes[1];
-
- var iA = p1.objects.getObjectInstanceAt(new ScopedId('ptr', '0x1000'), 10);
- var subObjectInstances = p1.objects.getAllInstancesByTypeName()[
- 'subObject'];
-
- assert.equal(subObjectInstances.length, 2);
- var subObject1 = p1.objects.getObjectInstanceAt(
- new ScopedId('ptr', '0x1'), 15);
- assert.equal(subObject1.name, 'subObject');
- assert.equal(subObject1.creationTs, 15);
-
- assert.equal(subObject1.snapshots.length, 2);
- assert.equal(subObject1.snapshots[0].ts, 15);
- assert.equal(subObject1.snapshots[0].args.foo, 1);
- assert.equal(subObject1.snapshots[1].ts, 20);
- assert.equal(subObject1.snapshots[1].args.foo, 2);
-
- var subObject2 = p1.objects.getObjectInstanceAt(
- new ScopedId('ptr', '0x2'), 20);
- assert.equal(subObject2.name, 'subObject');
- assert.equal(subObject2.creationTs, 20);
- assert.equal(subObject2.snapshots.length, 1);
- assert.equal(subObject2.snapshots[0].ts, 20);
- });
-
- test('importImplicitObjectWithCategoryOverride', function() {
- var events = [
- {ts: 10000, pid: 1, tid: 1, ph: 'N', cat: 'cat', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'otherCat', id: '0x1000', name: 'a', // @suppress longLineCheck
- args: { snapshot: [
- { id: 'subObject/0x1',
- cat: 'cat',
- foo: 1
- }
- ]}}
- ];
-
- var m = makeModel(events);
- var p1 = m.processes[1];
-
- var iA = p1.objects.getObjectInstanceAt(new ScopedId('ptr', '0x1000'), 10);
- var subObjectInstances = p1.objects.getAllInstancesByTypeName()[
- 'subObject'];
-
- assert.equal(subObjectInstances.length, 1);
- });
-
- test('importImplicitObjectWithBaseTypeOverride', function() {
- var events = [
- {ts: 10000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'PictureLayerImpl', args: { // @suppress longLineCheck
- snapshot: {
- base_type: 'LayerImpl'
- }
- }},
- {ts: 50000, pid: 1, tid: 1, ph: 'D', cat: 'c', id: '0x1000', name: 'LayerImpl', args: {}} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p1 = m.processes[1];
- assert.equal(m.importWarnings.length, 0);
-
- var iA = p1.objects.getObjectInstanceAt(new ScopedId('ptr', '0x1000'), 10);
- assert.equal(iA.snapshots.length, 1);
- });
-
- test('importIDRefs', function() {
- var events = [
- // An object with two snapshots.
- {ts: 10000, pid: 1, tid: 1, ph: 'N', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: {snapshot: 15}}, // @suppress longLineCheck
- {ts: 20000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: {snapshot: 20}}, // @suppress longLineCheck
- {ts: 50000, pid: 1, tid: 1, ph: 'D', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
-
- // A slice that references the object.
- {ts: 17000, pid: 1, tid: 1, ph: 'B', cat: 'c', name: 'taskSlice', args: {my_object: {id_ref: '0x1000'}}}, // @suppress longLineCheck
- {ts: 17500, pid: 1, tid: 1, ph: 'E', cat: 'c', name: 'taskSlice', args: {}} // @suppress longLineCheck
- ];
-
- var m = makeModel(events, false);
- var p1 = m.processes[1];
-
- var iA = p1.objects.getObjectInstanceAt(new ScopedId('ptr', '0x1000'), 10);
- var s15 = iA.getSnapshotAt(15);
-
- var taskSlice = p1.threads[1].sliceGroup.slices[0];
- assert.equal(taskSlice.args.my_object, s15);
- });
-
- test('importIDRefsThatPointAtEachOther', function() {
- var events = [
- // An object.
- {ts: 10000, pid: 1, tid: 1, ph: 'N', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: { // @suppress longLineCheck
- snapshot: { x: {
- id: 'foo/0x1001',
- value: 'bar'
- }}}},
- {ts: 50000, pid: 1, tid: 1, ph: 'D', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
-
- // A slice that references the object.
- {ts: 17000, pid: 1, tid: 1, ph: 'B', cat: 'c', name: 'taskSlice', args: {my_object: {id_ref: '0x1001'}}}, // @suppress longLineCheck
- {ts: 17500, pid: 1, tid: 1, ph: 'E', cat: 'c', name: 'taskSlice', args: {}} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var p1 = m.processes[1];
-
- var iA = p1.objects.getObjectInstanceAt(new ScopedId('ptr', '0x1000'), 15);
- var iFoo = p1.objects.getObjectInstanceAt(
- new ScopedId('ptr', '0x1001'), 15);
- assert.isDefined(iA);
- assert.isDefined(iFoo);
-
- var a15 = iA.getSnapshotAt(15);
- var foo15 = iFoo.getSnapshotAt(15);
-
- var taskSlice = p1.threads[1].sliceGroup.slices[0];
- assert.equal(taskSlice.args.my_object, foo15);
- });
-
- test('importArrayWithIDs', function() {
- var events = [
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: { // @suppress longLineCheck
- snapshot: { x: [
- {id: 'foo/0x1001', value: 'bar1'},
- {id: 'foo/0x1002', value: 'bar2'},
- {id: 'foo/0x1003', value: 'bar3'}
- ]}}}
- ];
-
- var m = makeModel(events, false);
- var p1 = m.processes[1];
-
- var sA = p1.objects.getSnapshotAt(new ScopedId('ptr', '0x1000'), 15);
- assert.isTrue(sA.args.x instanceof Array);
- assert.equal(sA.args.x.length, 3);
- assert.isTrue(sA.args.x[0] instanceof tr.model.ObjectSnapshot);
- assert.isTrue(sA.args.x[1] instanceof tr.model.ObjectSnapshot);
- assert.isTrue(sA.args.x[2] instanceof tr.model.ObjectSnapshot);
- });
-
- test('importDoesNotMutateEventList', function() {
- var events = [
- // An object.
- {ts: 10000, pid: 1, tid: 1, ph: 'N', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
- {ts: 15000, pid: 1, tid: 1, ph: 'O', cat: 'c', id: '0x1000', name: 'a', args: { // @suppress longLineCheck
- snapshot: {foo: 15}}},
- {ts: 50000, pid: 1, tid: 1, ph: 'D', cat: 'c', id: '0x1000', name: 'a', args: {}}, // @suppress longLineCheck
-
- // A slice that references the object.
- {ts: 17000, pid: 1, tid: 1, ph: 'B', cat: 'c', name: 'taskSlice', args: {
- my_object: {id_ref: '0x1000'}}
- },
- {ts: 17500, pid: 1, tid: 1, ph: 'E', cat: 'c', name: 'taskSlice', args: {}} // @suppress longLineCheck
- ];
-
- // The A type family exists to mutate the args list provided to
- // snapshots.
- function ASnapshot() {
- tr.model.ObjectSnapshot.apply(this, arguments);
- this.args.foo = 7;
- }
- ASnapshot.prototype = {
- __proto__: tr.model.ObjectSnapshot.prototype
- };
-
- // Import event while the A types are registered, causing the
- // arguments of the snapshots to be mutated.
- var m;
- try {
- tr.model.ObjectSnapshot.subTypes.register(ASnapshot, {typeName: 'a'});
- m = makeModel(events);
- } finally {
- tr.model.ObjectSnapshot.subTypes.unregister(ASnapshot);
- }
- assert.isFalse(m.hasImportWarnings);
-
- // Verify that the events array wasn't modified.
- assert.deepEqual(
- events[1].args,
- {snapshot: {foo: 15}});
- assert.deepEqual(
- events[3].args,
- {my_object: {id_ref: '0x1000'}});
- });
-
- test('importFlowEvent', function() {
- var events = [
- { name: 'aSlice', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 547, ph: 'B', args: {} }, // @suppress longLineCheck
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {} }, // @suppress longLineCheck
- { id: 72, pid: 52, tid: 53, ts: 549, ph: 'E', args: {} }, // @suppress longLineCheck
-
- { name: 'bSlice', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 559, ph: 'B', args: {} }, // @suppress longLineCheck
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 560, ph: 't', args: {} }, // @suppress longLineCheck
- { id: 72, pid: 52, tid: 53, ts: 561, ph: 'E', args: {} }, // @suppress longLineCheck
-
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 580, ph: 'f', args: {} }, // @suppress longLineCheck
- { name: 'cSlice', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 581, ph: 'B', args: {} }, // @suppress longLineCheck
- { id: 72, pid: 52, tid: 53, ts: 582, ph: 'E', args: {} } // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
-
- assert.isDefined(t);
- assert.equal(m.flowEvents.length, 2);
- assert.equal(m.flowIntervalTree.size, 2);
-
- var f0 = m.flowEvents[0];
- assert.equal(f0.title, 'a');
- assert.equal(f0.category, 'foo');
- assert.equal(f0.id, 72);
- assert.closeTo(f0.start, 0.001, 1e-5);
- assert.closeTo(12 / 1000, f0.duration, 1e-5);
- assert.equal(f0.startSlice.title, 'aSlice');
- assert.equal(f0.endSlice.title, 'bSlice');
-
- // TODO(nduca): Replace this assertion with something better when
- // flow events don't create synthetic slices on their own.
- assert.isDefined(f0.startSlice);
- assert.isDefined(f0.endSlice);
-
- var f1 = m.flowEvents[1];
- assert.equal(f1.title, f0.title);
- assert.equal(f1.category, f0.category);
- assert.equal(f1.id, f0.id);
- assert.closeTo(20 / 1000, f1.duration, 1e-5);
-
- assert.equal(f1.startSlice.title, 'bSlice');
- assert.equal(f1.endSlice.title, 'cSlice');
-
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- assert.deepEqual(f1.startSlice.outFlowEvents, [f1]);
- assert.deepEqual(f1.endSlice.inFlowEvents, [f1]);
- });
-
- test('importOldFlowEventBindtoNext', function() {
- // Old trace format without event.bp, and event.cat doesn't contain input
- var events = [
- { name: 'slice1', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100}, // @suppress longLineCheck
- { name: 'flow', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {}}, // @suppress longLineCheck
-
- { name: 'flow', cat: 'foo', id: 72, pid: 70, tid: 71, ts: 580, ph: 'f', args: {}}, // @suppress longLineCheck
- { name: 'slice2', cat: 'foo', pid: 70, tid: 71, ts: 570, ph: 'X', args: {}, 'dur': 100}, // @suppress longLineCheck
- { name: 'slice3', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', args: {}, 'dur': 1000} // @suppress longLineCheck
-
- ];
-
- var m = makeModel(events, false, false);
- assert.equal(m.flowEvents.length, 1);
-
- var f0 = m.flowEvents[0];
-
- assert.equal(f0.title, 'flow');
- assert.equal(f0.category, 'foo');
- assert.equal(f0.id, 72);
- assert.equal(f0.start, .548);
- assert.closeTo(32 / 1000, f0.duration, 1e-5);
- assert.equal(f0.startSlice.title, 'slice1');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'slice3');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- });
-
- test('importOldInputFlowEventBindtoParent', function() {
- // Old trace format without event.bp, but event.cat contains input
- var events = [
- { name: 'slice1', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100}, // @suppress longLineCheck
- { name: 'flow', cat: 'input', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {}}, // @suppress longLineCheck
-
- { name: 'flow', cat: 'input', id: 72, pid: 70, tid: 71, ts: 580, ph: 'f', args: {}}, // @suppress longLineCheck
- { name: 'slice2', cat: 'foo', pid: 70, tid: 71, ts: 570, ph: 'X', args: {}, 'dur': 100}, // @suppress longLineCheck
- { name: 'slice3', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', args: {}, 'dur': 1000} // @suppress longLineCheck
-
- ];
-
- var m = makeModel(events, false, false);
- assert.equal(m.flowEvents.length, 1);
-
- var f0 = m.flowEvents[0];
-
- assert.equal(f0.title, 'flow');
- assert.equal(f0.category, 'input');
- assert.equal(f0.id, 72);
- assert.equal(f0.start, .548);
- assert.closeTo(32 / 1000, f0.duration, 1e-5);
- assert.equal(f0.startSlice.title, 'slice1');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'slice2');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- });
-
- test('importOldIPCFlowEventBindtoParent', function() {
- // Old trace format without event.bp, but event.cat contains ipc.flow
- var events = [
- { name: 'slice1', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100}, // @suppress longLineCheck
- { name: 'flow', cat: 'disabled-by-default-ipc.flow', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {}}, // @suppress longLineCheck
-
- { name: 'flow', cat: 'disabled-by-default-ipc.flow', id: 72, pid: 70, tid: 71, ts: 580, ph: 'f', args: {}}, // @suppress longLineCheck
- { name: 'slice2', cat: 'foo', pid: 70, tid: 71, ts: 570, ph: 'X', args: {}, 'dur': 100}, // @suppress longLineCheck
- { name: 'slice3', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', args: {}, 'dur': 1000} // @suppress longLineCheck
-
- ];
-
- var m = makeModel(events, false, false);
- assert.equal(m.flowEvents.length, 1);
-
- var f0 = m.flowEvents[0];
-
- assert.equal(f0.title, 'flow');
- assert.equal(f0.category, 'disabled-by-default-ipc.flow');
- assert.equal(f0.id, 72);
- assert.equal(f0.start, .548);
- assert.closeTo(32 / 1000, f0.duration, 1e-5);
- assert.equal(f0.startSlice.title, 'slice1');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'slice2');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- });
-
- test('importNewFlowEventBindtoParent', function() {
- // New trace format with event.bp
- var events = [
- { name: 'slice1', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100}, // @suppress longLineCheck
- { name: 'flow', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', bp: 'e', args: {}}, // @suppress longLineCheck
-
- { name: 'flow', cat: 'foo', id: 72, pid: 70, tid: 71, ts: 580, ph: 'f', bp: 'e', args: {}}, // @suppress longLineCheck
- { name: 'slice2', cat: 'foo', pid: 70, tid: 71, ts: 570, ph: 'X', args: {}, 'dur': 100}, // @suppress longLineCheck
- { name: 'slice3', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', args: {}, 'dur': 1000} // @suppress longLineCheck
-
- ];
-
- var m = makeModel(events, false, false);
- assert.equal(m.flowEvents.length, 1);
-
- var f0 = m.flowEvents[0];
-
- assert.equal(f0.title, 'flow');
- assert.equal(f0.category, 'foo');
- assert.equal(f0.id, 72);
- assert.equal(f0.start, .548);
- assert.closeTo(32 / 1000, f0.duration, 1e-5);
- assert.equal(f0.startSlice.title, 'slice1');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'slice2');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- });
-
- test('importNewFlowEventWithInvalidBindingPoint', function() {
- // New trace format with event.bp, which however !== 'e'
- var events = [
- { name: 'slice1', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100}, // @suppress longLineCheck
- { name: 'flow', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', bp: 'z', args: {}}, // @suppress longLineCheck
-
- { name: 'flow', cat: 'foo', id: 72, pid: 70, tid: 71, ts: 580, ph: 'f', bp: 'z', args: {}}, // @suppress longLineCheck
- { name: 'slice2', cat: 'foo', pid: 70, tid: 71, ts: 570, ph: 'X', args: {}, 'dur': 100}, // @suppress longLineCheck
- { name: 'slice3', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', args: {}, 'dur': 1000} // @suppress longLineCheck
-
- ];
-
- var m = makeModel(events);
-
- assert.equal(m.flowEvents.length, 0);
- });
-
- test('importFlowV2OnePair', function() {
- // Flow V2: one flow producer one flow consumer
- var events = [
- { name: 'producer', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100, bind_id: '0xaaa', flow_out: true}, // @suppress longLineCheck
- { name: 'consumer', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', 'dur': 1000, bind_id: '0xaaa', flow_in: true} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
-
- assert.equal(m.flowEvents.length, 1);
-
- var f0 = m.flowEvents[0];
-
- assert.equal(f0.startSlice.title, 'producer');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'consumer');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- });
-
- test('importFlowV2OneFlowStep', function() {
- // Flow V2: one flow producer one flow consumer
- var events = [
- { name: 'producer', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100, bind_id: '0xaaa', flow_out: true}, // @suppress longLineCheck
- { name: 'step', cat: 'foo', pid: 62, tid: 63, ts: 647, ph: 'X', 'dur': 100, bind_id: '0xaaa', flow_out: true, flow_in: true}, // @suppress longLineCheck
- { name: 'consumer', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', 'dur': 1000, bind_id: '0xaaa', args: { 'queue_duration': 0}, flow_in: true} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
-
- assert.equal(m.flowEvents.length, 2);
-
- var f0 = m.flowEvents[0];
- var f1 = m.flowEvents[1];
-
- assert.equal(f0.startSlice.title, 'producer');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'step');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
-
- assert.equal(f1.startSlice.title, 'step');
- assert.deepEqual(f1.startSlice.outFlowEvents, [f1]);
- assert.equal(f1.endSlice.title, 'consumer');
- assert.deepEqual(f1.endSlice.inFlowEvents, [f1]);
- });
-
- test('importFlowV2MultipleConsumers', function() {
- // Flow V2: one flow producer multiple flow consumers
- var events = [
- { name: 'producer', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100, bind_id: '0xaaa', flow_out: true}, // @suppress longLineCheck
- { name: 'consumer1', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', 'dur': 1000, bind_id: '0xaaa', flow_in: true}, // @suppress longLineCheck
- { name: 'consumer2', cat: 'foo', pid: 70, tid: 72, ts: 870, ph: 'X', 'dur': 1000, bind_id: '0xaaa', flow_in: true} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
-
- assert.equal(m.flowEvents.length, 2);
-
- var f0 = m.flowEvents[0];
- var f1 = m.flowEvents[1];
-
- assert.equal(f0.startSlice.title, 'producer');
- assert.equal(f1.startSlice.title, 'producer');
-
- assert.equal(f0.startSlice.outFlowEvents.length, 2);
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0, f1]);
- assert.deepEqual(f1.startSlice.outFlowEvents, [f0, f1]);
-
- assert.equal(f0.endSlice.title, 'consumer1');
- assert.equal(f1.endSlice.title, 'consumer2');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
- assert.deepEqual(f1.endSlice.inFlowEvents, [f1]);
- });
-
- test('importFlowV2MultipleProducers', function() {
- // Flow V2: multiple flow producers, which is not allowed
- var events = [
- { name: 'producer1', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100, bind_id: '0xaaa', flow_out: true}, // @suppress longLineCheck
- { name: 'producer2', cat: 'foo', pid: 52, tid: 54, ts: 567, ph: 'X', 'dur': 100, bind_id: '0xaaa', flow_out: true}, // @suppress longLineCheck
- { name: 'consumer', cat: 'foo', pid: 70, tid: 71, ts: 770, ph: 'X', 'dur': 1000, bind_id: '0xaaa', flow_in: true} // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
-
- assert.equal(m.flowEvents.length, 1);
- });
-
- // This test creates a flow event that stops on the same timestamp that
- // the 'X' event which it triggers begins.
- test('importFlowEventOverlaps', function() {
- var events = [
- { name: 'SomeTask', cat: 'foo', pid: 52, tid: 53, ts: 547, ph: 'X', 'dur': 100}, // @suppress longLineCheck
- { name: 'PostTask', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {}}, // @suppress longLineCheck
-
- { name: 'PostTask', cat: 'foo', id: 72, pid: 70, tid: 71, ts: 580, ph: 'f', args: { 'queue_duration': 0}}, // @suppress longLineCheck
- // Note that RunTask has the same time-stamp as PostTask 'f'
- { name: 'RunTask', cat: 'foo', pid: 70, tid: 71, ts: 580, ph: 'X', args: {'src_func': 'PostRunTask'}, 'dur': 1000} // @suppress longLineCheck
- ];
-
- var m = makeModel(events, false);
- var startT = m.processes[52].threads[53];
- var endT = m.processes[70].threads[71];
-
- assert.isDefined(startT);
- assert.equal(startT.sliceGroup.slices.length, 1);
-
- assert.isDefined(endT);
- assert.equal(endT.sliceGroup.slices.length, 1);
-
- assert.equal(m.flowEvents.length, 1);
-
- // f0 represents 's' to 'f'
- var f0 = m.flowEvents[0];
-
- assert.equal(f0.title, 'PostTask');
- assert.equal(f0.category, 'foo');
- assert.equal(f0.id, 72);
- assert.equal(f0.start, .548);
- assert.closeTo(32 / 1000, f0.duration, 1e-5);
- assert.equal(f0.startSlice.title, 'SomeTask');
- assert.deepEqual(f0.startSlice.outFlowEvents, [f0]);
- assert.equal(f0.endSlice.title, 'RunTask');
- assert.deepEqual(f0.endSlice.inFlowEvents, [f0]);
-
- // TODO(nduca): Add assertions about the flow slices, esp that they were
- // found correctly.
- });
-
- test('importOutOfOrderFlowEvent', function() {
- var events = [
- { name: 'SomeTask', cat: 'foo', pid: 52, tid: 53, ts: 548, ph: 'X', 'dur': 10}, // @suppress longLineCheck
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {} }, // @suppress longLineCheck
-
- { name: 'SomeTask', cat: 'foo', pid: 52, tid: 53, ts: 148, ph: 'X', 'dur': 10}, // @suppress longLineCheck
- { name: 'b', cat: 'foo', id: 73, pid: 52, tid: 53, ts: 148, ph: 's', args: {} }, // @suppress longLineCheck
-
- { name: 'b', cat: 'foo', id: 73, pid: 52, tid: 53, ts: 570, ph: 'f', args: {} }, // @suppress longLineCheck
- { name: 'SomeTask', cat: 'foo', pid: 52, tid: 53, ts: 571, ph: 'X', 'dur': 10}, // @suppress longLineCheck
-
- { name: 'SomeTask', cat: 'foo', pid: 52, tid: 53, ts: 560, ph: 'X', 'dur': 10}, // @suppress longLineCheck
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 560, ph: 't', args: {} }, // @suppress longLineCheck
-
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 580, ph: 'f', args: {} }, // @suppress longLineCheck
- { name: 'SomeTask', cat: 'foo', pid: 52, tid: 53, ts: 581, ph: 'X', 'dur': 10} // @suppress longLineCheck
- ];
-
- var expected = [0.4, 0.0, 0.412];
- var m = makeModel(events);
- assert.equal(m.flowIntervalTree.size, 3);
-
- var order = m.flowEvents.map(function(x) { return x.start });
- for (var i = 0; i < expected.length; ++i)
- assert.closeTo(expected[i], order[i], 1e-5);
- });
-
- test('importCompleteEvent', function() {
- var events = [
- { name: 'a', args: {}, pid: 52, ts: 629, dur: 1, cat: 'baz', tid: 53, ph: 'X' }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 52, ts: 730, dur: 20, cat: 'foo', tid: 53, ph: 'X' }, // @suppress longLineCheck
- { name: 'c', args: {}, pid: 52, ts: 740, cat: 'baz', tid: 53, ph: 'X' }
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.slices.length, 3);
- assert.equal(t.tid, 53);
-
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'baz');
- assert.closeTo(0, slice.start, 1e-5);
- assert.closeTo(1 / 1000, slice.duration, 1e-5);
- assert.equal(slice.subSlices.length, 0);
-
- slice = t.sliceGroup.slices[1];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'foo');
- assert.closeTo((730 - 629) / 1000, slice.start, 1e-5);
- assert.closeTo(20 / 1000, slice.duration, 1e-5);
- assert.equal(slice.subSlices.length, 1);
-
- slice = t.sliceGroup.slices[2];
- assert.equal(slice.title, 'c');
- assert.isTrue(slice.didNotFinish);
- assert.closeTo(10 / 1000, slice.duration, 1e-5);
- });
-
- test('importFlowEventsWithStackFrame', function() {
- var eventData = {
- traceEvents: [
- { name: 'aSlice', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 547, ph: 'B', args: {} }, // @suppress longLineCheck
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 548, ph: 's', args: {}, sf: 1 }, // @suppress longLineCheck
- { id: 72, pid: 52, tid: 53, ts: 549, ph: 'E', args: {} }, // @suppress longLineCheck
-
- { name: 'bSlice', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 559, ph: 'B', args: {} }, // @suppress longLineCheck
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 560, ph: 't', args: {}, sf: 2 }, // @suppress longLineCheck
- { id: 72, pid: 52, tid: 53, ts: 561, ph: 'E', args: {} }, // @suppress longLineCheck
-
- { name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 580, ph: 'f', args: {}, sf: 3 }, // @suppress longLineCheck
- { name: 'cSlice', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 581, ph: 'B', args: {} }, // @suppress longLineCheck
- { id: 72, pid: 52, tid: 53, ts: 582, ph: 'E', args: {} } // @suppress longLineCheck
- ],
- stackFrames: {
- '1': {
- category: 'm1',
- name: 'fn1'
- },
- '2': {
- category: 'm2',
- name: 'fn2'
- },
- '3': {
- category: 'm3',
- name: 'fn3'
- }
- }
- };
-
- var m = makeModel(eventData);
-
- assert.equal(m.flowEvents.length, 2);
-
- var f0 = m.flowEvents[0];
- assert.equal(f0.startStackFrame.title, 'fn1');
- assert.equal(f0.endStackFrame.title, 'fn2');
-
- var f1 = m.flowEvents[1];
- assert.equal(f1.startStackFrame.title, 'fn2');
- assert.equal(f1.endStackFrame.title, 'fn3');
- });
-
- test('importCompleteEventWithCpuDuration', function() {
- var events = [
- { name: 'a', args: {}, pid: 52, ts: 629, dur: 1, cat: 'baz', tid: 53, ph: 'X', tts: 12, tdur: 1 }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 52, ts: 730, dur: 20, cat: 'foo', tid: 53, ph: 'X', tts: 110, tdur: 16 }, // @suppress longLineCheck
- { name: 'c', args: {}, pid: 52, ts: 740, cat: 'baz', tid: 53, ph: 'X', tts: 115 } // @suppress longLineCheck
- ];
-
- var m = makeModel(events);
- assert.equal(m.numProcesses, 1);
- var p = m.processes[52];
- assert.isDefined(p);
-
- assert.equal(p.numThreads, 1);
- var t = p.threads[53];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.slices.length, 3);
- assert.equal(t.tid, 53);
-
- var slice = t.sliceGroup.slices[0];
- assert.equal(slice.title, 'a');
- assert.equal(slice.category, 'baz');
- assert.closeTo(0, slice.start, 1e-5);
- assert.closeTo(1 / 1000, slice.duration, 1e-5);
- assert.closeTo(12 / 1000, slice.cpuStart, 1e-5);
- assert.closeTo(1 / 1000, slice.cpuDuration, 1e-5);
- assert.equal(slice.subSlices.length, 0);
-
- slice = t.sliceGroup.slices[1];
- assert.equal(slice.title, 'b');
- assert.equal(slice.category, 'foo');
- assert.closeTo((730 - 629) / 1000, slice.start, 1e-5);
- assert.closeTo(20 / 1000, slice.duration, 1e-5);
- assert.closeTo(110 / 1000, slice.cpuStart, 1e-5);
- assert.closeTo(16 / 1000, slice.cpuDuration, 1e-5);
- assert.equal(slice.subSlices.length, 1);
-
- slice = t.sliceGroup.slices[2];
- assert.equal(slice.title, 'c');
- assert.isTrue(slice.didNotFinish);
- assert.closeTo(10 / 1000, slice.duration, 1e-5);
- });
-
- test('importNestedCompleteEventWithTightBounds', function() {
- var events = [
- { name: 'a', args: {}, pid: 52, ts: 244654227065, dur: 36075, cat: 'baz', tid: 53, ph: 'X' }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 52, ts: 244654227095, dur: 36045, cat: 'foo', tid: 53, ph: 'X' } // @suppress longLineCheck
- ];
-
- var m = makeModel(events, false);
- var t = m.processes[52].threads[53];
-
- var sA = findSliceNamed(t.sliceGroup, 'a');
- var sB = findSliceNamed(t.sliceGroup, 'b');
-
- assert.equal(sA.title, 'a');
- assert.equal(sA.category, 'baz');
- assert.equal(sA.start, 244654227.065);
- assert.equal(sA.duration, 36.075);
- assert.closeTo(0.03, sA.selfTime, 1e-5);
-
- assert.equal(sB.title, 'b');
- assert.equal(sB.category, 'foo');
- assert.equal(sB.start, 244654227.095);
- assert.equal(sB.duration, 36.045);
-
- assert.equal(sA.subSlices.length, 1);
- assert.equal(sA.subSlices[0], sB);
- assert.equal(sB.parentSlice, sA);
- });
-
-
- test('importCompleteEventWithStackFrame', function() {
- var eventData = {
- traceEvents: [
- { name: 'a', args: {}, pid: 1, ts: 0, dur: 1, cat: 'baz', tid: 2, ph: 'X', sf: 7 }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 1, ts: 5, dur: 1, cat: 'baz', tid: 2, ph: 'X', sf: 8, esf: 9 } // @suppress longLineCheck
- ],
- stackFrames: {
- '1': {
- category: 'm1',
- name: 'main'
- },
- '7': {
- category: 'm2',
- name: 'frame7',
- parent: '1'
- },
- '8': {
- category: 'm2',
- name: 'frame8',
- parent: '1'
- },
- '9': {
- category: 'm2',
- name: 'frame9',
- parent: '1'
- }
- }
- };
-
- var m = makeModel(eventData);
-
- var p = m.processes[1];
- var t = p.threads[2];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.slices.length, 2);
-
- var s0 = t.sliceGroup.slices[0];
- assert.equal(s0.startStackFrame.title, 'frame7');
- assert.isUndefined(s0.endStackFrame);
-
- var s1 = t.sliceGroup.slices[1];
- assert.equal(s1.startStackFrame.title, 'frame8');
- assert.equal(s1.endStackFrame.title, 'frame9');
- });
-
- test('importAsyncEventWithSameTimestamp', function() {
- var events = [];
- // Events are added with ts 0, 1, 1, 2, 2, 3, 3 ...500, 500, 1000
- // and use 'seq' to track the order of when the event is recorded.
- events.push({name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 0, ph: 'S', args: {'seq': 0}}); // @suppress longLineCheck
-
- for (var i = 1; i <= 1000; i++)
- events.push({name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: Math.round(i / 2) , ph: 'T', args: {'seq': i}}); // @suppress longLineCheck
-
- events.push({name: 'a', cat: 'foo', id: 72, pid: 52, tid: 53, ts: 1000, ph: 'F', args: {'seq': 1001}}); // @suppress longLineCheck
-
- var m = makeModel(events);
- var t = m.processes[52].threads[53];
-
- assert.equal(t.asyncSliceGroup.slices.length, 1);
- var parentSlice = t.asyncSliceGroup.slices[0];
- assert.equal(parentSlice.title, 'a');
- assert.equal(parentSlice.category, 'foo');
- assert.isTrue(parentSlice.isTopLevel);
-
- assert.isDefined(parentSlice.subSlices);
- var subSlices = parentSlice.subSlices;
- assert.equal(subSlices.length, 1000);
- // Slices should be sorted according to 'ts'. And if 'ts' is the same,
- // slices should keep the order that they were recorded.
- for (var i = 0; i < 1000; i++) {
- assert.equal(i + 1, subSlices[i].args['seq']);
- assert.isFalse(subSlices[i].isTopLevel);
- }
- });
-
- test('sampleDataSimple', function() {
- var events = {
- 'traceEvents': [],
- 'stackFrames': {
- '1': {
- 'category': 'mod',
- 'name': 'main'
- },
- '2': {
- 'category': 'mod',
- 'name': 'a',
- 'parent': 1
- },
- '3': {
- 'category': 'mod',
- 'name': 'a_sub',
- 'parent': 2
- },
- '4': {
- 'category': 'mod',
- 'name': 'b',
- 'parent': 1
- }
- },
- 'samples': [
- {
- 'cpu': 0, 'tid': 1, 'ts': 1000.0,
- 'name': 'cycles:HG', 'sf': 3, 'weight': 1
- },
- {
- 'cpu': 0, 'tid': 1, 'ts': 2000.0,
- 'name': 'cycles:HG', 'sf': 2, 'weight': 1
- },
- {
- 'cpu': 1, 'tid': 1, 'ts': 3000.0,
- 'name': 'cycles:HG', 'sf': 3, 'weight': 1
- }
- ]
- };
- var m = makeModel(events, false);
- assert.isDefined(m.kernel.cpus[0]);
- assert.equal(m.getAllThreads().length, 1);
-
- assert.equal(tr.b.dictionaryKeys(m.stackFrames).length, 4);
- assert.equal(m.samples.length, 3);
-
- var t1 = m.processes[1].threads[1];
- assert.equal(t1.samples.length, 3);
-
- var c0 = m.kernel.cpus[0];
- var c1 = m.kernel.cpus[1];
- assert.equal(c0.samples.length, 2);
- assert.equal(c1.samples.length, 1);
-
- assert.equal(m.samples[0].cpu, c0);
- assert.equal(m.samples[0].thread, t1);
- assert.equal(m.samples[0].title, 'cycles:HG');
- assert.equal(m.samples[0].start, 1);
- assert.deepEqual(
- ['a_sub', 'a', 'main'],
- m.samples[0].stackTrace.map(function(x) { return x.title; }));
- assert.equal(m.samples[0].weight, 1);
- });
-
- test('importMemoryDumps_verifyProcessAndGlobalMemoryDumpLinks', function() {
- var events = [
- // 2 process memory dump events.
- {
- name: 'a',
- pid: 42,
- ts: 10000,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '100'
- }
- }
- }
- },
- {
- name: 'b',
- pid: 43,
- ts: 11000,
- cat: 'test',
- tid: 54,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '200'
- }
- }
- }
- },
- // 1 process memory dump event.
- {
- name: 'd',
- pid: 42,
- ts: 13000,
- cat: 'test',
- tid: 56,
- ph: 'v',
- id: '0xfffffff12345678',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '300'
- }
- }
- }
- }
- ];
- var m = makeModel(events, false);
- var p1 = m.getProcess(42);
- var p2 = m.getProcess(43);
- assert.isDefined(p1);
- assert.isDefined(p2);
-
- // Check that Model and Process objects contain the right dumps.
- assert.equal(m.globalMemoryDumps.length, 2);
- assert.equal(p1.memoryDumps.length, 2);
- assert.equal(p2.memoryDumps.length, 1);
-
- assert.equal(m.globalMemoryDumps[0].start, 10);
- assert.equal(p1.memoryDumps[0].start, 10);
- assert.equal(p2.memoryDumps[0].start, 11);
- assert.equal(m.globalMemoryDumps[0].duration, 1);
- assert.equal(p1.memoryDumps[0].duration, 0);
- assert.equal(p2.memoryDumps[0].duration, 0);
-
- assert.equal(m.globalMemoryDumps[1].start, 13);
- assert.equal(p1.memoryDumps[1].start, 13);
- assert.equal(m.globalMemoryDumps[1].duration, 0);
- assert.equal(p1.memoryDumps[1].duration, 0);
-
- // Check that GlobalMemoryDump and ProcessMemoryDump objects are
- // interconnected correctly.
- assert.equal(p1.memoryDumps[0],
- m.globalMemoryDumps[0].processMemoryDumps[42]);
- assert.equal(p2.memoryDumps[0],
- m.globalMemoryDumps[0].processMemoryDumps[43]);
- assert.equal(p1.memoryDumps[0].globalMemoryDump, m.globalMemoryDumps[0]);
- assert.equal(p2.memoryDumps[0].globalMemoryDump, m.globalMemoryDumps[0]);
-
- assert.equal(p1.memoryDumps[1],
- m.globalMemoryDumps[1].processMemoryDumps[42]);
- assert.equal(p1.memoryDumps[1].globalMemoryDump, m.globalMemoryDumps[1]);
- });
-
- test('importMemoryDumps_totalResidentBytesOnly', function() {
- var events = [
- {
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0x01',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '1fffffffffffff'
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- assert.equal(d.totals.residentBytes, 9007199254740991);
- assert.isUndefined(d.totals.peakResidentBytes);
- assert.isUndefined(d.totals.arePeakResidentBytesResettable);
- assert.isUndefined(d.totals.platformSpecific);
- assert.isUndefined(d.mostRecentVmRegions);
- assert.lengthOf(d.memoryAllocatorDumps, 0);
- });
-
- test('importMemoryDumps_withPeakResidentBytes', function() {
- var events = [
- {
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0x01',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '1fffffffffffff',
- peak_resident_set_bytes: '2fffffffffffff',
- is_peak_rss_resetable: true
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- assert.equal(d.totals.residentBytes, 9007199254740991);
- assert.equal(d.totals.peakResidentBytes, 13510798882111488);
- assert.isTrue(d.totals.arePeakResidentBytesResettable);
- assert.isUndefined(d.totals.platformSpecific);
- assert.isUndefined(d.mostRecentVmRegions);
- assert.lengthOf(d.memoryAllocatorDumps, 0);
- });
-
- test('importMemoryDumps_platformSpecificTotals', function() {
- var events = [
- {
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0x01',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '1fffffffffffff',
- private_bytes: 'fffffffffffff',
- shared_bytes: '10000000000000'
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- assert.equal(d.totals.residentBytes, 9007199254740991);
- assert.isUndefined(d.totals.peakResidentBytes);
- assert.isUndefined(d.totals.arePeakResidentBytesResettable);
- assert.deepEqual(d.totals.platformSpecific,
- {private_bytes: 4503599627370495, shared_bytes: 4503599627370496});
- assert.isUndefined(d.mostRecentVmRegions);
- assert.lengthOf(d.memoryAllocatorDumps, 0);
- });
-
- test('importMemoryDumps_vmRegions', function() {
- var events = [
- {
- name: 'some_dump_name',
- pid: 42,
- ts: 10,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '000',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '0'
- },
- process_mmaps: {
- vm_regions: [
- {
- sa: 'f0',
- sz: '150',
- pf: 6,
- mf: '[stack:20310]',
- bs: {
- pss: '9e',
- pc: '40',
- pd: '20',
- sc: '100',
- sd: '0',
- sw: '50'
- }
- },
- {
- sa: '350',
- sz: '250',
- pf: 5,
- mf: '/dev/ashmem/dalvik',
- bs: {
- pss: 'cd',
- pd: 'cd',
- sc: undefined,
- sw: '0'
- }
- },
- {
- sa: '7ff10ff4b000',
- sz: '40000',
- pf: 134,
- mf: '/run/shm/.org.chromium.Chromium.sqqN11 (deleted)',
- bs: {
- pss: '40000',
- pc: '0',
- pd: '40000',
- sc: '0',
- sd: '0',
- sw: '0'
- }
- }
- ]
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- checkVMRegions(d.vmRegions, [
- {
- startAddress: 240,
- sizeInBytes: 336,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- mappedFile: '[stack:20310]',
- byteStats: {
- privateCleanResident: 64,
- privateDirtyResident: 32,
- sharedCleanResident: 256,
- sharedDirtyResident: 0,
- proportionalResident: 158,
- swapped: 80
- }
- },
- {
- startAddress: 848,
- sizeInBytes: 592,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- mappedFile: '/dev/ashmem/dalvik',
- byteStats: {
- proportionalResident: 205,
- privateDirtyResident: 205,
- swapped: 0
- }
- },
- {
- startAddress: 140673331539968,
- sizeInBytes: 262144,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE | VMRegion.PROTECTION_FLAG_MAYSHARE,
- mappedFile: '/run/shm/.org.chromium.Chromium.sqqN11 (deleted)',
- byteStats: {
- privateCleanResident: 0,
- privateDirtyResident: 262144,
- sharedCleanResident: 0,
- sharedDirtyResident: 0,
- proportionalResident: 262144,
- swapped: 0
- }
- }
- ]);
-
- assert.equal(d.totals.residentBytes, 0);
- assert.isUndefined(d.totals.peakResidentBytes);
- assert.isUndefined(d.totals.arePeakResidentBytesResettable);
- assert.isUndefined(d.totals.platformSpecific);
- assert.lengthOf(d.memoryAllocatorDumps, 0);
- });
-
- test('importMemoryDumps_explicitMemoryAllocatorDumps', function() {
- var events = [
- {
- name: 'a',
- pid: 42,
- ts: 10,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '100'
- },
- allocators: {
- 'oilpan': {
- guid: '1a',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '2f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '1000'},
- size: {type: 'scalar', units: 'bytes', value: '8000'}
- }
- },
- 'oilpan/heap1': {
- guid: '2b',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '3f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '3000'},
- size: {type: 'scalar', units: 'bytes', value: '4000'}
- }
- },
- 'oilpan/heap2': {
- guid: '3c',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '4f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '4000'},
- size: {type: 'scalar', units: 'bytes', value: '4000'}
- }
- },
- 'oilpan/heap2/bucket1': {
- // Deliberately missing GUID (to check that the importer does
- // not skip memory allocator dump without GUID).
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '1f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '2000'},
- size: {type: 'scalar', units: 'bytes', value: '2000'}
- }
- },
- 'v8': {
- guid: '5e',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '5f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '5000'},
- size: {type: 'scalar', units: 'bytes', value: '6000'}
- }
- }
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- assert.equal(d.memoryAllocatorDumps.length, 2);
-
- var oilpanRoot = d.getMemoryAllocatorDumpByFullName('oilpan');
- var v8Root = d.getMemoryAllocatorDumpByFullName('v8');
- assert.isDefined(oilpanRoot);
- assert.isDefined(v8Root);
- assert.include(d.memoryAllocatorDumps, oilpanRoot);
- assert.include(d.memoryAllocatorDumps, v8Root);
-
- checkDumpNumericsAndDiagnostics(oilpanRoot, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 47),
- 'size': 32768,
- 'effective_size': 32768,
- 'inner_size': 4096
- }, {});
- assert.equal(oilpanRoot.children.length, 2);
-
- var oilpanBucket1 = d.getMemoryAllocatorDumpByFullName(
- 'oilpan/heap2/bucket1');
- assert.isDefined(oilpanBucket1);
- assert.equal(oilpanBucket1.fullName, 'oilpan/heap2/bucket1');
- assert.equal(oilpanBucket1.name, 'bucket1');
- checkDumpNumericsAndDiagnostics(oilpanBucket1, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 31),
- 'size': 8192,
- 'effective_size': 8192,
- 'inner_size': 8192
- }, {});
- assert.equal(oilpanBucket1.children.length, 0);
-
- assert.isDefined(oilpanBucket1.parent);
- assert.equal(oilpanBucket1.parent.fullName, 'oilpan/heap2');
- assert.equal(oilpanBucket1.parent.name, 'heap2');
- assert.include(oilpanBucket1.parent.children, oilpanBucket1);
-
- assert.isDefined(oilpanBucket1.parent.parent);
- assert.strictEqual(oilpanBucket1.parent.parent, oilpanRoot);
-
- assert.equal(d.totals.residentBytes, 256);
- assert.isUndefined(d.totals.peakResidentBytes);
- assert.isUndefined(d.totals.arePeakResidentBytesResettable);
- assert.isUndefined(d.totals.platformSpecific);
- assert.isUndefined(d.mostRecentVmRegions);
- });
-
- test('importMemoryDumps_implicitMemoryAllocatorDumps', function() {
- var events = [
- {
- name: 'a',
- pid: 42,
- ts: 10,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '100'
- },
- allocators: {
- 'oilpan/heap1': {
- guid: '999',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '3f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '3000'},
- size: {type: 'scalar', units: 'bytes', value: '4000'}
- }
- },
- 'oilpan/heap2/bucket1': {
- guid: '888',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '1f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '2000'},
- size: {type: 'scalar', units: 'bytes', value: '2000'}
- }
- },
- 'v8': {
- guid: '777',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '5f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '5000'},
- size: {type: 'scalar', units: 'bytes', value: '6000'}
- }
- }
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- assert.equal(d.memoryAllocatorDumps.length, 2);
-
- var oilpanRoot = d.getMemoryAllocatorDumpByFullName('oilpan');
- var v8Root = d.getMemoryAllocatorDumpByFullName('v8');
- assert.isDefined(oilpanRoot);
- assert.isDefined(v8Root);
- assert.include(d.memoryAllocatorDumps, oilpanRoot);
- assert.include(d.memoryAllocatorDumps, v8Root);
-
- checkDumpNumericsAndDiagnostics(oilpanRoot, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 94),
- 'size': 24576,
- 'effective_size': 24576,
- 'inner_size': 20480
- }, {});
- assert.equal(oilpanRoot.children.length, 2);
-
- var oilpanBucket1 = d.getMemoryAllocatorDumpByFullName(
- 'oilpan/heap2/bucket1');
- assert.isDefined(oilpanBucket1);
- assert.equal(oilpanBucket1.fullName, 'oilpan/heap2/bucket1');
- assert.equal(oilpanBucket1.name, 'bucket1');
- checkDumpNumericsAndDiagnostics(oilpanBucket1, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 31),
- 'size': 8192,
- 'effective_size': 8192,
- 'inner_size': 8192
- }, {});
- assert.equal(oilpanBucket1.children.length, 0);
-
- assert.isDefined(oilpanBucket1.parent);
- assert.equal(oilpanBucket1.parent.fullName, 'oilpan/heap2');
- assert.equal(oilpanBucket1.parent.name, 'heap2');
- assert.include(oilpanBucket1.parent.children, oilpanBucket1);
-
- assert.isDefined(oilpanBucket1.parent.parent);
- assert.strictEqual(oilpanBucket1.parent.parent, oilpanRoot);
-
- assert.equal(d.totals.residentBytes, 256);
- assert.isUndefined(d.totals.peakResidentBytes);
- assert.isUndefined(d.totals.arePeakResidentBytesResettable);
- assert.isUndefined(d.totals.platformSpecific);
- assert.isUndefined(d.mostRecentVmRegions);
- });
-
- test('importMemoryDumps_globalMemoryAllocatorDumps', function() {
- var events = [
- {
- name: 'a',
- pid: 42,
- ts: 10,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '100'
- },
- allocators: {
- 'tile_manager/tile1': {
- guid: '21',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '3f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '3000'},
- size: {type: 'scalar', units: 'bytes', value: '4000'},
- weather: {type: 'string', units: '', value: 'rainy'}
- }
- },
- 'global/shared_bitmap_manager/bitmap2': {
- guid: '42',
- attrs: {
- objects_count: {
- type: 'scalar', units: 'objects', value: '1f'
- },
- inner_size: {type: 'scalar', units: 'bytes', value: '2000'},
- size: {type: 'scalar', units: 'bytes', value: '2000'},
- weather: {type: 'string', units: '', value: 'sunny'}
- }
- }
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var gmd = m.globalMemoryDumps[0];
- var pmd = p.memoryDumps[0];
-
- assert.isUndefined(gmd.totals);
- assert.equal(pmd.totals.residentBytes, 256);
- assert.isUndefined(pmd.totals.peakResidentBytes);
- assert.isUndefined(pmd.totals.arePeakResidentBytesResettable);
- assert.isUndefined(pmd.totals.platformSpecific);
-
- assert.isUndefined(gmd.mostRecentVmRegions);
- assert.isUndefined(pmd.mostRecentVmRegions);
-
- assert.equal(gmd.memoryAllocatorDumps.length, 1);
- assert.equal(pmd.memoryAllocatorDumps.length, 1);
-
- // Global memory allocator dumps.
- var sharedBitmapManager = gmd.getMemoryAllocatorDumpByFullName(
- 'shared_bitmap_manager');
- assert.isDefined(sharedBitmapManager);
- assert.include(gmd.memoryAllocatorDumps, sharedBitmapManager);
-
- checkDumpNumericsAndDiagnostics(sharedBitmapManager, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 31),
- 'size': 8192,
- 'effective_size': 8192,
- 'inner_size': 8192
- }, {});
- assert.lengthOf(sharedBitmapManager.children, 1);
-
- var bitmap2 = gmd.getMemoryAllocatorDumpByFullName(
- 'shared_bitmap_manager/bitmap2');
- assert.isDefined(bitmap2);
- assert.include(sharedBitmapManager.children, bitmap2);
- assert.strictEqual(bitmap2.parent, sharedBitmapManager);
-
- checkDumpNumericsAndDiagnostics(bitmap2, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 31),
- 'size': 8192,
- 'effective_size': 8192,
- 'inner_size': 8192
- }, { 'weather': 'sunny' });
- assert.lengthOf(bitmap2.children, 0);
-
- assert.isUndefined(gmd.getMemoryAllocatorDumpByFullName('tile_manager'));
- assert.isUndefined(
- gmd.getMemoryAllocatorDumpByFullName('tile_manager/tile1'));
-
- // Process memory allocator dumps.
- var tileManagerRoot = pmd.getMemoryAllocatorDumpByFullName('tile_manager');
- assert.isDefined(tileManagerRoot);
- assert.include(pmd.memoryAllocatorDumps, tileManagerRoot);
- assert.isUndefined(tileManagerRoot.parent);
-
- checkDumpNumericsAndDiagnostics(tileManagerRoot, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 63),
- 'size': 16384,
- 'effective_size': 16384,
- 'inner_size': 12288
- }, {});
- assert.lengthOf(tileManagerRoot.children, 1);
-
- var tile1 = pmd.getMemoryAllocatorDumpByFullName(
- 'tile_manager/tile1');
- assert.isDefined(tile1);
- assert.include(tileManagerRoot.children, tile1);
- assert.strictEqual(tile1.parent, tileManagerRoot);
-
- checkDumpNumericsAndDiagnostics(tile1, {
- 'objects_count': new ScalarNumeric(unitlessNumber_smallerIsBetter, 63),
- 'size': 16384,
- 'effective_size': 16384,
- 'inner_size': 12288
- }, { 'weather': 'rainy' });
- assert.lengthOf(tile1.children, 0);
-
- assert.isUndefined(
- pmd.getMemoryAllocatorDumpByFullName('shared_bitmap_manager'));
- assert.isUndefined(
- pmd.getMemoryAllocatorDumpByFullName('shared_bitmap_manager/bitmap2'));
- });
-
- test('importMemoryDumps_memoryAllocatorDumpEdges', function() {
- var events = [
- {
- name: 'browser',
- pid: 42,
- ts: 10,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '100'
- },
- allocators: {
- 'local': {
- guid: '3',
- attrs: {
- mood: {type: 'string', units: '', value: 'very good'}
- }
- },
- 'global/shared': {
- guid: '7',
- attrs: {
- color: {type: 'string', units: '', value: 'blue'}
- }
- }
- },
- allocators_graph: [
- {
- source: '3',
- target: '7',
- type: 'ownership',
- importance: 0
- }
- ]
- }
- }
- },
- {
- name: 'renderer',
- pid: 43,
- ts: 11,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '200'
- },
- allocators: {
- 'local': {
- guid: '4',
- attrs: {
- length: {type: 'scalar', units: 'bytes', value: '3'}
- }
- },
- 'global/shared': {
- guid: '7',
- attrs: {
- area: {type: 'scalar', units: 'sq ft', value: '9'}
- }
- }
- },
- allocators_graph: [
- {
- source: '4',
- target: '7',
- type: 'ownership',
- importance: 1
- }
- ]
- }
- }
- },
- {
- name: 'gpu',
- pid: 44,
- ts: 10.5,
- cat: 'test',
- tid: 53,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '300'
- },
- allocators: {
- 'local1': {
- guid: '5',
- attrs: {
- state: {type: 'string', units: '', value: 'ON'}
- }
- },
- 'local2': {
- guid: '6',
- attrs: {
- temperature: {type: 'scalar', units: 'C', value: '64'}
- }
- }
- },
- allocators_graph: [
- {
- source: '5',
- target: '7',
- type: 'ownership',
- importance: -1
- },
- {
- source: '6',
- target: '5',
- type: 'ownership',
- importance: 1
- },
- {
- source: '5',
- target: '4',
- type: 'retention'
- }
- ]
- }
- }
- }
- ];
- var model = makeModel(events);
- var browserProcess = model.getProcess(42);
- var rendererProcess = model.getProcess(43);
- var gpuProcess = model.getProcess(44);
-
- assert.lengthOf(model.globalMemoryDumps, 1);
- assert.lengthOf(browserProcess.memoryDumps, 1);
- assert.lengthOf(rendererProcess.memoryDumps, 1);
- assert.lengthOf(gpuProcess.memoryDumps, 1);
-
- var globalDump = model.globalMemoryDumps[0];
- var browserDump = browserProcess.memoryDumps[0];
- var rendererDump = rendererProcess.memoryDumps[0];
- var gpuDump = gpuProcess.memoryDumps[0];
-
- // Global memory allocator dump.
- assert.lengthOf(globalDump.memoryAllocatorDumps, 1);
-
- var globalDumpShared = globalDump.getMemoryAllocatorDumpByFullName(
- 'shared');
- assert.isDefined(globalDumpShared);
- assert.include(globalDump.memoryAllocatorDumps, globalDumpShared);
- checkDumpNumericsAndDiagnostics(globalDumpShared, {
- 'area': new ScalarNumeric(unitlessNumber_smallerIsBetter, 9)
- }, { 'color': 'blue' });
- assert.lengthOf(globalDumpShared.children, 0);
- assert.isUndefined(globalDumpShared.parent);
-
- assert.isUndefined(globalDumpShared.owns);
- assert.lengthOf(globalDumpShared.ownedBy, 3);
- assert.lengthOf(globalDumpShared.retains, 0);
- assert.lengthOf(globalDumpShared.retainedBy, 0);
-
- // Browser memory allocator dump.
- assert.lengthOf(browserDump.memoryAllocatorDumps, 1);
-
- var browserDumpLocal = browserDump.getMemoryAllocatorDumpByFullName(
- 'local');
- assert.isDefined(browserDumpLocal);
- assert.include(browserDump.memoryAllocatorDumps, browserDumpLocal);
- checkDumpNumericsAndDiagnostics(browserDumpLocal, {
- 'area': new ScalarNumeric(unitlessNumber_smallerIsBetter, 9)
- }, { 'color': 'blue', 'mood': 'very good' });
- assert.lengthOf(browserDumpLocal.children, 0);
- assert.isUndefined(browserDumpLocal.parent);
-
- assert.isDefined(browserDumpLocal.owns);
- assert.lengthOf(browserDumpLocal.ownedBy, 0);
- assert.lengthOf(browserDumpLocal.retains, 0);
- assert.lengthOf(browserDumpLocal.retainedBy, 0);
-
- var browserDumpLocalOwnsLink = browserDumpLocal.owns;
- assert.include(globalDumpShared.ownedBy, browserDumpLocalOwnsLink);
- assert.strictEqual(browserDumpLocalOwnsLink.source, browserDumpLocal);
- assert.strictEqual(browserDumpLocalOwnsLink.target, globalDumpShared);
- assert.equal(browserDumpLocalOwnsLink.importance, 0);
-
- // Renderer memory allocator dump.
- assert.lengthOf(rendererDump.memoryAllocatorDumps, 1);
-
- var rendererDumpLocal = rendererDump.getMemoryAllocatorDumpByFullName(
- 'local');
- assert.isDefined(rendererDumpLocal);
- assert.include(rendererDump.memoryAllocatorDumps, rendererDumpLocal);
- checkDumpNumericsAndDiagnostics(rendererDumpLocal, {
- 'area': new ScalarNumeric(unitlessNumber_smallerIsBetter, 9),
- 'length': 3
- }, { 'color': 'blue' });
- assert.lengthOf(rendererDumpLocal.children, 0);
- assert.isUndefined(rendererDumpLocal.parent);
-
- assert.isDefined(rendererDumpLocal.owns);
- assert.lengthOf(rendererDumpLocal.ownedBy, 0);
- assert.lengthOf(rendererDumpLocal.retains, 0);
- assert.lengthOf(rendererDumpLocal.retainedBy, 1);
-
- var rendererDumpLocalOwnsLink = rendererDumpLocal.owns;
- assert.include(globalDumpShared.ownedBy, rendererDumpLocalOwnsLink);
- assert.strictEqual(rendererDumpLocalOwnsLink.source, rendererDumpLocal);
- assert.strictEqual(rendererDumpLocalOwnsLink.target, globalDumpShared);
- assert.equal(rendererDumpLocalOwnsLink.importance, 1);
-
- // GPU memory allocator dumps.
- assert.lengthOf(gpuDump.memoryAllocatorDumps, 2);
-
- var gpuDumpLocal1 = gpuDump.getMemoryAllocatorDumpByFullName('local1');
- assert.isDefined(gpuDumpLocal1);
- assert.include(gpuDump.memoryAllocatorDumps, gpuDumpLocal1);
- checkDumpNumericsAndDiagnostics(gpuDumpLocal1, {
- 'area': new ScalarNumeric(unitlessNumber_smallerIsBetter, 9)
- }, { 'state': 'ON', 'color': 'blue' });
- assert.lengthOf(gpuDumpLocal1.children, 0);
- assert.isUndefined(gpuDumpLocal1.parent);
-
- assert.isDefined(gpuDumpLocal1.owns);
- assert.lengthOf(gpuDumpLocal1.ownedBy, 1);
- assert.lengthOf(gpuDumpLocal1.retains, 1);
- assert.lengthOf(gpuDumpLocal1.retainedBy, 0);
-
- var gpuDumpLocal1OwnsLink = gpuDumpLocal1.owns;
- assert.include(globalDumpShared.ownedBy, gpuDumpLocal1OwnsLink);
- assert.strictEqual(gpuDumpLocal1OwnsLink.source, gpuDumpLocal1);
- assert.strictEqual(gpuDumpLocal1OwnsLink.target, globalDumpShared);
- assert.equal(gpuDumpLocal1OwnsLink.importance, -1);
-
- var gpuDumpLocal1RetainsLink = gpuDumpLocal1.retains[0];
- assert.include(rendererDumpLocal.retainedBy, gpuDumpLocal1RetainsLink);
- assert.strictEqual(gpuDumpLocal1RetainsLink.source, gpuDumpLocal1);
- assert.strictEqual(gpuDumpLocal1RetainsLink.target, rendererDumpLocal);
- assert.isUndefined(gpuDumpLocal1RetainsLink.importance);
-
- var gpuDumpLocal2 = gpuDump.getMemoryAllocatorDumpByFullName('local2');
- assert.isDefined(gpuDumpLocal2);
- assert.include(gpuDump.memoryAllocatorDumps, gpuDumpLocal2);
- checkDumpNumericsAndDiagnostics(gpuDumpLocal2, {
- 'temperature': new ScalarNumeric(unitlessNumber_smallerIsBetter, 100)
- }, {});
- assert.lengthOf(gpuDumpLocal2.children, 0);
- assert.isUndefined(gpuDumpLocal2.parent);
-
- assert.isDefined(gpuDumpLocal2.owns);
- assert.lengthOf(gpuDumpLocal2.ownedBy, 0);
- assert.lengthOf(gpuDumpLocal2.retains, 0);
- assert.lengthOf(gpuDumpLocal2.retainedBy, 0);
-
- var gpuDumpLocal2OwnsLink = gpuDumpLocal2.owns;
- assert.include(gpuDumpLocal1.ownedBy, gpuDumpLocal2OwnsLink);
- assert.strictEqual(gpuDumpLocal2OwnsLink.source, gpuDumpLocal2);
- assert.strictEqual(gpuDumpLocal2OwnsLink.target, gpuDumpLocal1);
- assert.equal(gpuDumpLocal2OwnsLink.importance, 1);
- });
-
- test('importMemoryDumps_memoryAllocatorDumpsMissingFields', function() {
- var events = [
- {
- name: 'a',
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- allocators: {
- 'no_crash': {
- /* Missing GUID and attributes. */
- }
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
-
- assert.equal(d.memoryAllocatorDumps.length, 1);
- var noCrashRoot = d.getMemoryAllocatorDumpByFullName('no_crash');
- assert.lengthOf(noCrashRoot.children, 0);
- checkDumpNumericsAndDiagnostics(noCrashRoot, {}, {});
- assert.isUndefined(noCrashRoot.parent);
- assert.isUndefined(noCrashRoot.guid);
- });
-
- test('importMemoryDumps_weakMemoryAllocatorDumps', function() {
- var events = [
- {
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- allocators: {
- // Sinks for ownership edges (to check that the correct ownership
- // edges are removed).
- 'root_sink': { guid: '100', attrs: {} },
- 'root_sink/child_sink': { guid: '200', attrs: {} },
- 'root_sink/child_sink/descendant_sink': {
- guid: '300', attrs: {}
- },
-
- // Note: 'removed' in the name of a dump means that the dump will
- // be removed despite being non-weak (strong), e.g. due to one of
- // its ancestors being weak.
-
- // All descendants of a weak root dump should be removed.
- 'weak_root': { guid: '1', attrs: {}, flags: 1 },
- 'weak_root/removed_child': { guid: '2', attrs: {} },
- 'weak_root/inferred_removed_child/removed_descendant': {
- guid: '3', attrs: {}, flags: 0
- },
-
- // A strong root should be kept even if all its descendants are
- // weak.
- 'strong_root': { guid: '4', attrs: {}, flags: 0 },
- 'strong_root/weak_child': { guid: '5', attrs: {}, flags: 1 },
- 'strong_root/inferred_weak_child/weak_descendant': {
- guid: '6', attrs: {}, flags: 1
- },
-
- // All inferred ancestors of a weak descendant should be marked
- // weak and, consequently, removed (provided that they don't have
- // any non-weak descendants).
- 'inferred_weak_root/inferred_weak_child/weak_descendant': {
- guid: '7', attrs: {}, flags: 1
- },
-
- // An inferred dump should be marked non-weak if it has at least
- // one strong descendant.
- 'inferred_strong_root/child1_weak': {
- guid: '8', attrs: {}, flags: 1
- },
- 'inferred_strong_root/child2_strong': {
- guid: '9', attrs: {}
- },
- 'inferred_strong_root/child3_weak': {
- guid: '10', attrs: {}, flags: 1
- },
- 'inferred_strong_root2/inferred_strong_child/desc1_strong': {
- guid: '11', attrs: {}
- },
- 'inferred_strong_root2/inferred_strong_child/desc2_weak': {
- guid: '12', attrs: {}, flags: 1
- },
- 'inferred_strong_root2/inferred_strong_child/desc3_strong': {
- guid: '13', attrs: {}
- },
- 'inferred_strong_root2/weak_child': {
- guid: '14', attrs: {}, flags: 1
- },
-
- // A desdendant dump should be removed if it has a weak ancestor.
- 'strong_root2': { guid: '15', attrs: {} },
- 'strong_root2/weak_child': { guid: '16', attrs: {}, flags: 1 },
- 'strong_root2/weak_child/removed_descendant': {
- guid: '17', attrs: {}
- },
-
- // Check that "weakness" also propagates across ownership edges.
- 'removed_root': { guid: '18', attrs: {} },
- 'removed_root/removed_child': {
- guid: '19', attrs: {}
- },
- 'inferred_strong_root3/removed_child': {
- guid: '20', attrs: {}
- },
- },
- allocators_graph: [
- { source: '1', target: '100', type: 'ownership' },
- { source: '2', target: '200', type: 'ownership' },
- { source: '3', target: '300', type: 'ownership' },
-
- { source: '4', target: '100', type: 'ownership' }, // Kept.
- { source: '5', target: '200', type: 'ownership' },
- { source: '6', target: '300', type: 'ownership' },
-
- { source: '7', target: '300', type: 'ownership' },
-
- { source: '8', target: '200', type: 'ownership' },
- { source: '9', target: '200', type: 'ownership' }, // Kept.
- { source: '10', target: '200', type: 'ownership' },
- { source: '11', target: '300', type: 'ownership' }, // Kept.
- { source: '12', target: '300', type: 'ownership' },
- { source: '13', target: '300', type: 'ownership' }, // Kept.
- { source: '14', target: '200', type: 'ownership' },
-
- { source: '15', target: '100', type: 'ownership' }, // Kept.
- { source: '16', target: '200', type: 'ownership' },
- { source: '17', target: '300', type: 'ownership' },
-
- { source: '18', target: '3' /* not a sink */, type: 'ownership' },
- { source: '19', target: '200', type: 'ownership' },
- { source: '20', target: '19' /* not a sink */, type: 'ownership' }
- ]
- }
- }
- }
- ];
- var m = makeModel(events);
- var p = m.getProcess(42);
- var d = p.memoryDumps[0];
- var memoryAllocatorDumps = d.memoryAllocatorDumps;
- assert.lengthOf(memoryAllocatorDumps, 6);
-
- function checkDump(dump, expectedFullName, expectedGuid, expectedParent,
- expectedChildCount, expectedOwnsLink, expectedOwnedByLinkCount) {
- assert.strictEqual(dump.fullName, expectedFullName);
- assert.strictEqual(dump.guid, expectedGuid);
- assert.strictEqual(dump.parent, expectedParent);
- assert.lengthOf(dump.children, expectedChildCount);
- assert.strictEqual(dump.owns, expectedOwnsLink);
- assert.lengthOf(dump.ownedBy, expectedOwnedByLinkCount);
- assert.strictEqual(
- d.getMemoryAllocatorDumpByFullName(expectedFullName), dump);
- }
-
- function checkOwnsLink(ownerDump, expectedTarget) {
- assert.strictEqual(ownerDump.owns.source, ownerDump);
- assert.strictEqual(ownerDump.owns.target, expectedTarget);
- }
-
- // Check root_sink/* dumps.
- var rootSink = d.memoryAllocatorDumps[3];
- checkDump(rootSink, 'root_sink', '100', undefined, 1, undefined, 2);
- var childSink = rootSink.children[0];
- checkDump(childSink, 'root_sink/child_sink', '200', rootSink, 1, undefined,
- 1);
- var descendantSink = childSink.children[0];
- checkDump(descendantSink, 'root_sink/child_sink/descendant_sink', '300',
- childSink, 0, undefined, 2);
-
- // Check strong_root/* dumps.
- var strongRoot = d.memoryAllocatorDumps[4];
- checkDump(strongRoot, 'strong_root', '4', undefined, 0, rootSink.ownedBy[0],
- 0);
-
- // Check inferred_strong_root/* dumps.
- var inferredStrongRoot = d.memoryAllocatorDumps[0];
- checkDump(inferredStrongRoot, 'inferred_strong_root', undefined, undefined,
- 1, undefined, 0);
- var child2Strong = inferredStrongRoot.children[0];
- checkDump(child2Strong, 'inferred_strong_root/child2_strong', '9',
- inferredStrongRoot, 0, childSink.ownedBy[0], 0);
-
- // Check inferred_strong_root2/* dumps.
- var inferredStrongRoot2 = d.memoryAllocatorDumps[1];
- checkDump(inferredStrongRoot2, 'inferred_strong_root2', undefined,
- undefined, 1, undefined, 0);
- var inferredStrongChild = inferredStrongRoot2.children[0];
- checkDump(inferredStrongChild,
- 'inferred_strong_root2/inferred_strong_child', undefined,
- inferredStrongRoot2, 2, undefined, 0);
- var desc1Strong = inferredStrongChild.children[0];
- checkDump(desc1Strong,
- 'inferred_strong_root2/inferred_strong_child/desc1_strong', '11',
- inferredStrongChild, 0, descendantSink.ownedBy[0], 0);
- var desc3Strong = inferredStrongChild.children[1];
- checkDump(desc3Strong,
- 'inferred_strong_root2/inferred_strong_child/desc3_strong', '13',
- inferredStrongChild, 0, descendantSink.ownedBy[1], 0);
-
- // Check strong_root2/* dumps.
- var strongRoot2 = d.memoryAllocatorDumps[5];
- checkDump(strongRoot2, 'strong_root2', '15', undefined, 0,
- rootSink.ownedBy[1], 0);
-
- // Check inferred_strong_root3/* dumps.
- var inferredStrongRoot3 = d.memoryAllocatorDumps[2];
- checkDump(inferredStrongRoot3, 'inferred_strong_root3', undefined,
- undefined, 0, undefined, 0);
-
- // Check the links.
- checkOwnsLink(strongRoot, rootSink);
- checkOwnsLink(child2Strong, childSink);
- checkOwnsLink(desc1Strong, descendantSink);
- checkOwnsLink(desc3Strong, descendantSink);
- checkOwnsLink(strongRoot2, rootSink);
-
- // Check that the removed weak dumps are not indexed.
- [
- 'weak_root',
- 'weak_root/removed_child',
- 'weak_root/inferred_removed_child',
- 'weak_root/inferred_removed_child/removed_descendant',
- 'strong_root/weak_child',
- 'strong_root/inferred_weak_child/weak_descendant',
- 'inferred_weak_root',
- 'inferred_weak_root/inferred_weak_child',
- 'inferred_weak_root/inferred_weak_child/weak_descendant',
- 'inferred_strong_root/child1_weak',
- 'inferred_strong_root/child3_weak',
- 'inferred_strong_root2/inferred_strong_child/desc2_weak',
- 'inferred_strong_root2/weak_child',
- 'strong_root2/weak_child',
- 'strong_root2/removed_descendant',
- 'removed_root',
- 'removed_root/removed_child',
- 'inferred_strong_root3/removed_child'
- ].forEach(function(fullName) {
- assert.isUndefined(d.getMemoryAllocatorDumpByFullName(fullName));
- });
- });
-
- test('importMemoryDumps_levelsOfDetail', function() {
- function checkLevelsOfDetail(pmdSpecifications, expectedGlobalLevelOfDetail,
- expectedProcessLevelsOfDetail, expectedHasWarnings) {
- var events = [];
- pmdSpecifications.forEach(function(singlePmdSpecifications, pid) {
- singlePmdSpecifications.forEach(function(singlePmdSpecification) {
- var dumps = {};
- if (singlePmdSpecification.levelOfDetail !== undefined)
- dumps.level_of_detail = singlePmdSpecification.levelOfDetail;
- if (singlePmdSpecification.vmRegions) {
- dumps.process_mmaps = {
- vm_regions: [
- { sa: 'f0', sz: '150', pf: 6, mf: '[stack]', bs: { pss: 'ff'} }
- ]
- };
- }
- events.push({
- name: 'process_' + pid,
- pid: pid,
- ts: 10,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: dumps
- }
- });
- });
- });
- var model = makeModel(events);
-
- // Check GlobalMemoryDump level of detail.
- assert.lengthOf(model.globalMemoryDumps, 1);
- assert.strictEqual(model.globalMemoryDumps[0].levelOfDetail,
- expectedGlobalLevelOfDetail);
-
- // Check ProcessMemoryDumps levels of detail.
- assert.lengthOf(Object.keys(model.processes),
- expectedProcessLevelsOfDetail.length);
- for (var i = 0; i < expectedProcessLevelsOfDetail.length; i++) {
- var process = model.getProcess(i);
- assert.lengthOf(process.memoryDumps, 1);
- assert.strictEqual(process.memoryDumps[0].levelOfDetail,
- expectedProcessLevelsOfDetail[i]);
- }
-
- assert.strictEqual(model.hasImportWarnings, expectedHasWarnings);
- }
-
- // Legacy trace events (without levels of detail).
- checkLevelsOfDetail([[{}]], LIGHT, [LIGHT], false);
- checkLevelsOfDetail([[{ vmRegions: true }]], DETAILED, [DETAILED], false);
- checkLevelsOfDetail(
- [
- [{}] /* raw composable PMD1 events */,
- [{}, {}] /* raw composable PMD2 events */
- ],
- LIGHT /* expected GMD level of detail */,
- [LIGHT, LIGHT] /* expected PMD levels of detail */,
- false /* no warnings expected */);
- checkLevelsOfDetail(
- [
- [{}, { vmRegions: true }, {}],
- [{ vmRegions: true }, {}]
- ],
- DETAILED, [DETAILED, DETAILED], false);
-
- // Well-formed traces events (VM regions should be irrelevant).
- checkLevelsOfDetail(
- [
- [{ levelOfDetail: 'light'}],
- [{ levelOfDetail: 'light', vmRegions: true }]
- ],
- LIGHT, [LIGHT, LIGHT], false);
- checkLevelsOfDetail(
- [
- [
- { levelOfDetail: 'detailed' }, { levelOfDetail: 'detailed' }
- ],
- [
- { levelOfDetail: 'detailed', vmRegions: true }
- ],
- [
- { levelOfDetail: 'detailed' },
- { levelOfDetail: 'detailed', vmRegions: true },
- { levelOfDetail: 'detailed' }
- ]
- ],
- DETAILED, [DETAILED, DETAILED, DETAILED], false);
-
- // Not so well-formed trace events.
- checkLevelsOfDetail(
- [
- [{}, { levelOfDetail: 'detailed'}, {}]
- ],
- DETAILED, [DETAILED], true);
- checkLevelsOfDetail(
- [
- [{ levelOfDetail: 'light' }],
- [{}],
- [{ levelOfDetail: 'detailed' }],
- [{ levelOfDetail: 'light' }]],
- DETAILED, [LIGHT, LIGHT, DETAILED, LIGHT], true);
- checkLevelsOfDetail(
- [
- [{ levelOfDetail: 'light' }, { levelOfDetail: 'detailed' }],
- [{}],
- [{ levelOfDetail: 'light' }, {}]],
- DETAILED, [DETAILED, LIGHT, LIGHT], true);
- checkLevelsOfDetail(
- [
- [{ levelOfDetail: 'invalid' }, { levelOfDetail: 'light' }],
- [{ levelOfDetail: 'invalid' }]],
- LIGHT, [LIGHT, LIGHT], true);
- });
-
- test('importMemoryDumps_heapDumps_oldFormat', function() {
- var events = [ // Intentionally shuffled.
- {
- pid: 21,
- ts: 9,
- ph: 'v',
- id: '0123',
- args: {
- dumps: {
- heaps: {
- partition_alloc: {
- entries: [
- { size: '1000' },
- { bt: '0', size: 'abc' }
- ]
- }
- }
- }
- }
- },
- {
- pid: 42,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {
- '0': { name: 'MessageLoop::RunTask' },
- '1': { name: 'TimerBase::run', parent: '0' },
- 'TWO': { name: 'ScheduledAction::execute', 'parent': '1' },
- '3': { name: 'FunctionCall', parent: 'TWO' },
- '4': { name: 'UpdateLayoutTree', parent: '1' },
- '5': { name: 'MessageLoop::JogTask' }
- }
- }
- },
- {
- pid: 42,
- ph: 'M',
- name: 'typeNames',
- args: {
- typeNames: {
- // GCC.
- '22': '[unknown]',
- '23': 'testing::ManuallyAnnotatedMockClass',
- '24': 'const char* WTF::getStringWithTypeName() [with T = ' +
- 'blink::Event]',
- '25': 'blink::ContextLifecycleObserver*',
- '26': 'const char* WTF::getStringWithTypeName() [with T = ' +
- 'blink::WebFrame*]'
- }
- }
- },
- {
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0123',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '0'
- },
- heaps: {
- partition_alloc: {
- entries: [
- { type: '24', size: '2e6fc8' },
- { size: '5cdf91' },
- { type: '25', size: '1737e4' },
- { bt: '', size: '5b6cd6' },
- { bt: '4', size: '18f0' },
- { bt: '3', size: 'e3a8' }
- ]
- },
- malloc: {
- entries: [
- { size: '789' },
- { bt: '0', size: '123' },
- { bt: '5', size: '456' },
- { type: '25', size: 'cd' }
- ]
- }
- }
- }
- }
- },
- {
- pid: 21,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {
- // Intentionally in reverse order.
- '0': { name: 'FrameView::layout', parent: '1' },
- '1': { name: 'MessageLoop::RunTask' }
- }
- }
- },
- {
- pid: 21,
- ts: 12,
- ph: 'v',
- id: '0987',
- args: {
- dumps: {
- heaps: {
- partition_alloc: {
- entries: [
- { size: '2000' },
- { bt: '0', size: 'def' }
- ]
- }
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p1 = m.getProcess(21);
- var p2 = m.getProcess(42);
- assert.lengthOf(m.globalMemoryDumps, 2);
- assert.lengthOf(p1.memoryDumps, 2);
- assert.lengthOf(p2.memoryDumps, 1);
-
- // Stack frames.
- assert.deepEqual(
- tr.b.mapItems(m.stackFrames, function(id, f) { return f.title }),
- {
- 'p21:0': 'FrameView::layout',
- 'p21:0:self': '<self>',
- 'p21:1': 'MessageLoop::RunTask',
- 'p42::self': '<self>',
- 'p42:0': 'MessageLoop::RunTask',
- 'p42:0:self': '<self>',
- 'p42:1': 'TimerBase::run',
- 'p42:TWO': 'ScheduledAction::execute',
- 'p42:3': 'FunctionCall',
- 'p42:3:self': '<self>',
- 'p42:4': 'UpdateLayoutTree',
- 'p42:4:self': '<self>',
- 'p42:5': 'MessageLoop::JogTask',
- 'p42:5:self': '<self>'
- });
-
- // 1. Process 21, first dump.
- var pmd1 = p1.memoryDumps[0];
- var hds1 = pmd1.heapDumps;
- assert.sameMembers(Object.keys(hds1), ['partition_alloc']);
-
- var partitionAllocDump1 = hds1['partition_alloc'];
- assert.strictEqual(partitionAllocDump1.processMemoryDump, pmd1);
- assert.equal(partitionAllocDump1.allocatorName, 'partition_alloc');
- var partitionAllocEntries1 = partitionAllocDump1.entries;
- assert.lengthOf(partitionAllocEntries1, 2);
- checkHeapEntry(partitionAllocEntries1[0], partitionAllocDump1, 4096,
- undefined /* root */, undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries1[1], partitionAllocDump1, 2748,
- ['<self>', 'FrameView::layout', 'MessageLoop::RunTask']);
-
- // 2. Process 21, second dump.
- var pmd2 = p1.memoryDumps[1];
- var hds2 = pmd2.heapDumps;
- assert.sameMembers(Object.keys(hds2), ['partition_alloc']);
-
- var partitionAllocDump2 = hds2['partition_alloc'];
- assert.strictEqual(partitionAllocDump2.processMemoryDump, pmd2);
- assert.equal(partitionAllocDump2.allocatorName, 'partition_alloc');
- var partitionAllocEntries2 = partitionAllocDump2.entries;
- assert.lengthOf(partitionAllocEntries2, 2);
- checkHeapEntry(partitionAllocEntries2[0], partitionAllocDump2, 8192,
- undefined /* root */, undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries2[1], partitionAllocDump2, 3567,
- ['<self>', 'FrameView::layout', 'MessageLoop::RunTask'],
- undefined /* sum over all types */);
-
- // All heap dumps in Process 21 should use the same stack frames.
- assert.strictEqual(
- getFrame(partitionAllocEntries1[1], 0),
- getFrame(partitionAllocEntries2[1], 0));
-
- // 3. Process 42.
- var pmd3 = p2.memoryDumps[0];
- var hds3 = pmd3.heapDumps;
- assert.sameMembers(Object.keys(hds3), ['partition_alloc', 'malloc']);
-
- var partitionAllocDump3 = hds3['partition_alloc'];
- assert.strictEqual(partitionAllocDump3.processMemoryDump, pmd3);
- assert.equal(partitionAllocDump3.allocatorName, 'partition_alloc');
- var partitionAllocEntries3 = partitionAllocDump3.entries;
- assert.lengthOf(partitionAllocEntries3, 6);
- checkHeapEntry(partitionAllocEntries3[0], partitionAllocDump3, 3043272,
- undefined /* root */, 'blink::Event');
- checkHeapEntry(partitionAllocEntries3[1], partitionAllocDump3, 6086545,
- undefined /* root */, undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries3[2], partitionAllocDump3, 1521636,
- undefined /* root */, 'blink::ContextLifecycleObserver*');
- checkHeapEntry(partitionAllocEntries3[3], partitionAllocDump3, 5991638,
- ['<self>'], undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries3[4], partitionAllocDump3, 6384,
- ['<self>', 'UpdateLayoutTree', 'TimerBase::run',
- 'MessageLoop::RunTask'], undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries3[5], partitionAllocDump3, 58280,
- ['<self>', 'FunctionCall', 'ScheduledAction::execute', 'TimerBase::run',
- 'MessageLoop::RunTask'], undefined /* sum over all types */);
-
- var mallocDump3 = hds3['malloc'];
- assert.strictEqual(mallocDump3.processMemoryDump, pmd3);
- assert.equal(mallocDump3.allocatorName, 'malloc');
- var mallocEntries3 = mallocDump3.entries;
- assert.lengthOf(mallocEntries3, 4);
- checkHeapEntry(mallocEntries3[0], mallocDump3, 1929, undefined /* root */,
- undefined /* sum over all types */);
- checkHeapEntry(mallocEntries3[1], mallocDump3, 291,
- ['<self>', 'MessageLoop::RunTask'], undefined /* sum over all types */);
- checkHeapEntry(mallocEntries3[2], mallocDump3, 1110,
- ['<self>', 'MessageLoop::JogTask'], undefined /* sum over all types */);
- checkHeapEntry(mallocEntries3[3], mallocDump3, 205, undefined /* root */,
- 'blink::ContextLifecycleObserver*');
-
- // All heap dumps in Process 42 should use the same stack frames.
- assert.strictEqual(
- getFrame(partitionAllocEntries3[5], 3),
- getFrame(partitionAllocEntries3[4], 2));
- assert.strictEqual(
- getFrame(mallocEntries3[1], 1),
- getFrame(partitionAllocEntries3[4], 3));
- });
-
- test('importMemoryDumps_heapDumps_newFormat', function() {
- var events = [ // Intentionally shuffled.
- {
- pid: 21,
- ts: 9,
- ph: 'v',
- id: '0123',
- args: {
- dumps: {
- heaps: {
- partition_alloc: {
- entries: [
- { bt: '', type: '25', size: '1000' },
- { bt: 'A', size: 'abc' }
- ]
- }
- }
- }
- }
- },
- {
- pid: 42,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {
- '-1': { name: '<self>' },
- '0': { name: 'MessageLoop::RunTask' },
- '0.5': { name: '<self>', parent: '0' },
- '1': { name: 'TimerBase::run', parent: '0' },
- 'TWO': { name: 'ScheduledAction::execute', 'parent': '1' },
- '2.72': { name: '<self>', 'parent': 'TWO' },
- '3': { name: 'FunctionCall', parent: 'TWO' },
- '\u03C0': { name: '<self>', parent: '3' },
- '4': { name: 'UpdateLayoutTree', parent: '1' },
- 'FOUR-AND-A-BIT': { name: '<self>', parent: '4' },
- '5': { name: 'MessageLoop::JogTask' },
- 'NaN': { name: '<self>', parent: '5' }
- }
- }
- },
- {
- pid: 42,
- ph: 'M',
- name: 'typeNames',
- args: {
- typeNames: {
- // Clang.
- '22': '[unknown]',
- '23': 'testing::ManuallyAnnotatedMockClass',
- '24': 'const char *WTF::getStringWithTypeName() [T = ' +
- 'blink::Event]',
- '25': 'blink::ContextLifecycleObserver *',
- '26': 'const char *WTF::getStringWithTypeName() [T = ' +
- 'blink::WebFrame *]'
- }
- }
- },
- {
- pid: 42,
- ts: 10,
- ph: 'v',
- id: '0123',
- args: {
- dumps: {
- process_totals: {
- resident_set_bytes: '0'
- },
- heaps: {
- partition_alloc: {
- entries: [
- { bt: '' /* root */, size: '5cdf91' },
- { bt: '' /* root */, type: '24', size: '2e6fc8' },
- { bt: '' /* root */, type: '25', size: '1737e4' },
- { bt: '-1', type: '22', size: '5b6cd6' },
- { bt: 'FOUR-AND-A-BIT', size: '18f0', count: '100' },
- { bt: 'FOUR-AND-A-BIT', type: '26', size: 'c78' },
- { bt: '\u03C0', size: 'e3a8' }
- ]
- },
- malloc: {
- entries: [
- { bt: '', size: '789', count: '50' },
- { bt: '0.5', size: '123', count: '60' },
- { bt: 'NaN', size: '456', count: '70' },
- { bt: '3', type: '25', size: 'cd', count: '80' }
- ]
- }
- }
- }
- }
- },
- {
- pid: 21,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {
- // Intentionally in reverse order.
- 'A': { name: '<self>', parent: '0' },
- '0': { name: 'FrameView::layout', parent: '1' },
- '1': { name: 'MessageLoop::RunTask' }
- }
- }
- },
- {
- pid: 21,
- ts: 12,
- ph: 'v',
- id: '0987',
- args: {
- dumps: {
- heaps: {
- winheap: {
- entries: [] // Intentionally empty.
- },
- partition_alloc: {
- entries: [
- { bt: '', size: '2000' },
- { bt: 'A', type: '25', size: 'def' },
- { bt: '3' /* invalid */, size: 'aaa' },
- { bt: 'A', type: '24' /* invalid */, size: 'bbb' },
- { bt: '0', size: 'fff' }
- ]
- }
- }
- }
- }
- },
- {
- pid: 21,
- ph: 'M',
- name: 'typeNames',
- args: {
- typeNames: {
- // Microsoft Visual C++.
- '25': 'const char *__cdecl WTF::getStringWithTypeName<class ' +
- 'v8::FunctionCallbackInfo<class v8::Value>>(void)'
- }
- }
- },
- {
- pid: 63,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {} // Intentionally empty.
- }
- },
- {
- pid: 63,
- ph: 'M',
- name: 'typeNames',
- args: {
- typeNames: {} // Intentionally empty.
- }
- },
- {
- pid: 63,
- ts: 13,
- ph: 'v',
- id: '0987',
- args: {
- dumps: {
- heaps: {
- winheap: {
- entries: [
- { bt: '', size: '10000' }
- ]
- }
- }
- }
- }
- },
- {
- pid: 84,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {
- '5': { name: 'MessageLoop::WalkTask' }
- }
- }
- },
- {
- pid: 84,
- ph: 'M',
- name: 'typeNames',
- args: {
- typeNames: {
- '0': '[unknown]',
- '1': 'base::All',
- '3': 'content::Manually',
- '4': 'net::Annotated'
- }
- }
- },
- {
- pid: 84,
- ts: 14,
- ph: 'v',
- id: '0987',
- args: {
- dumps: {
- heaps: {
- malloc: {
- entries: [
- { bt: '5', type: '3', size: 'abcd' }
- ]
- }
- }
- }
- }
- }
- ];
- var m = makeModel(events);
- var p1 = m.getProcess(21);
- var p2 = m.getProcess(42);
- var p3 = m.getProcess(63);
- var p4 = m.getProcess(84);
- assert.lengthOf(m.globalMemoryDumps, 2);
- assert.lengthOf(p1.memoryDumps, 2);
- assert.lengthOf(p2.memoryDumps, 1);
- assert.lengthOf(p3.memoryDumps, 1);
- assert.lengthOf(p4.memoryDumps, 1);
-
- // Stack frames.
- assert.deepEqual(
- tr.b.mapItems(m.stackFrames, function(id, f) { return f.title }),
- {
- 'p21:0': 'FrameView::layout',
- 'p21:A': '<self>',
- 'p21:1': 'MessageLoop::RunTask',
- 'p42:-1': '<self>',
- 'p42:0': 'MessageLoop::RunTask',
- 'p42:0.5': '<self>',
- 'p42:1': 'TimerBase::run',
- 'p42:TWO': 'ScheduledAction::execute',
- 'p42:2.72': '<self>',
- 'p42:3': 'FunctionCall',
- 'p42:\u03C0': '<self>',
- 'p42:4': 'UpdateLayoutTree',
- 'p42:FOUR-AND-A-BIT': '<self>',
- 'p42:5': 'MessageLoop::JogTask',
- 'p42:NaN': '<self>',
- 'p84:5': 'MessageLoop::WalkTask'
- });
-
- // 1. Process 21, first dump.
- var pmd1 = p1.memoryDumps[0];
- var hds1 = pmd1.heapDumps;
- assert.sameMembers(Object.keys(hds1), ['partition_alloc']);
-
- var partitionAllocDump1 = hds1['partition_alloc'];
- assert.strictEqual(partitionAllocDump1.processMemoryDump, pmd1);
- assert.equal(partitionAllocDump1.allocatorName, 'partition_alloc');
- var partitionAllocEntries1 = partitionAllocDump1.entries;
- assert.lengthOf(partitionAllocEntries1, 2);
- checkHeapEntry(partitionAllocEntries1[0], partitionAllocDump1, 4096,
- undefined /* root */,
- 'class v8::FunctionCallbackInfo<class v8::Value>');
- checkHeapEntry(partitionAllocEntries1[1], partitionAllocDump1, 2748,
- ['<self>', 'FrameView::layout', 'MessageLoop::RunTask'],
- undefined /* sum over all types */);
-
- // 2. Process 21, second dump.
- var pmd2 = p1.memoryDumps[1];
- var hds2 = pmd2.heapDumps;
- assert.sameMembers(Object.keys(hds2), ['partition_alloc']);
-
- var partitionAllocDump2 = hds2['partition_alloc'];
- assert.strictEqual(partitionAllocDump2.processMemoryDump, pmd2);
- assert.equal(partitionAllocDump2.allocatorName, 'partition_alloc');
- var partitionAllocEntries2 = partitionAllocDump2.entries;
- assert.lengthOf(partitionAllocEntries2, 3);
- checkHeapEntry(partitionAllocEntries2[0], partitionAllocDump2, 8192,
- undefined /* root */, undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries2[1], partitionAllocDump2, 3567,
- ['<self>', 'FrameView::layout', 'MessageLoop::RunTask'],
- 'class v8::FunctionCallbackInfo<class v8::Value>');
- checkHeapEntry(partitionAllocEntries2[2], partitionAllocDump2, 4095,
- ['FrameView::layout', 'MessageLoop::RunTask'],
- undefined /* sum over all types */);
-
- // All heap dumps in Process 21 should use the same stack frames.
- assert.strictEqual(
- getFrame(partitionAllocEntries1[1], 0),
- getFrame(partitionAllocEntries2[1], 0));
- assert.strictEqual(
- getFrame(partitionAllocEntries2[2], 0),
- getFrame(partitionAllocEntries2[1], 1));
-
- // 3. Process 42.
- var pmd3 = p2.memoryDumps[0];
- var hds3 = pmd3.heapDumps;
- assert.sameMembers(Object.keys(hds3), ['partition_alloc', 'malloc']);
-
- var partitionAllocDump3 = hds3['partition_alloc'];
- assert.strictEqual(partitionAllocDump3.processMemoryDump, pmd3);
- assert.equal(partitionAllocDump3.allocatorName, 'partition_alloc');
- var partitionAllocEntries3 = partitionAllocDump3.entries;
- assert.lengthOf(partitionAllocEntries3, 7);
- checkHeapEntry(partitionAllocEntries3[0], partitionAllocDump3, 6086545,
- undefined /* root */, undefined /* sum over all types */);
- checkHeapEntry(partitionAllocEntries3[1], partitionAllocDump3, 3043272,
- undefined /* root */, 'blink::Event');
- checkHeapEntry(partitionAllocEntries3[2], partitionAllocDump3, 1521636,
- undefined /* root */, 'blink::ContextLifecycleObserver *');
- checkHeapEntry(partitionAllocEntries3[3], partitionAllocDump3, 5991638,
- ['<self>'], '[unknown]');
- checkHeapEntry(partitionAllocEntries3[4], partitionAllocDump3, 6384,
- ['<self>', 'UpdateLayoutTree', 'TimerBase::run',
- 'MessageLoop::RunTask'], undefined /* sum over all types */, 256);
- checkHeapEntry(partitionAllocEntries3[5], partitionAllocDump3, 3192,
- ['<self>', 'UpdateLayoutTree', 'TimerBase::run',
- 'MessageLoop::RunTask'], 'blink::WebFrame *');
- checkHeapEntry(partitionAllocEntries3[6], partitionAllocDump3, 58280,
- ['<self>', 'FunctionCall', 'ScheduledAction::execute', 'TimerBase::run',
- 'MessageLoop::RunTask'], undefined /* sum over all types */);
-
- var mallocDump3 = hds3['malloc'];
- assert.strictEqual(mallocDump3.processMemoryDump, pmd3);
- assert.equal(mallocDump3.allocatorName, 'malloc');
- var mallocEntries3 = mallocDump3.entries;
- assert.lengthOf(mallocEntries3, 4);
- checkHeapEntry(mallocEntries3[0], mallocDump3, 1929, undefined /* root */,
- undefined /* sum over all types */, 80);
- checkHeapEntry(mallocEntries3[1], mallocDump3, 291,
- ['<self>', 'MessageLoop::RunTask'], undefined /* sum over all types */,
- 96);
- checkHeapEntry(mallocEntries3[2], mallocDump3, 1110,
- ['<self>', 'MessageLoop::JogTask'], undefined /* sum over all types */,
- 112);
- checkHeapEntry(mallocEntries3[3], mallocDump3, 205,
- ['FunctionCall', 'ScheduledAction::execute', 'TimerBase::run',
- 'MessageLoop::RunTask'], 'blink::ContextLifecycleObserver *', 128);
-
- // All heap dumps in Process 42 should use the same stack frames.
- assert.strictEqual(
- getFrame(partitionAllocEntries3[5], 0),
- getFrame(partitionAllocEntries3[4], 0));
- assert.strictEqual(
- getFrame(partitionAllocEntries3[6], 3),
- getFrame(partitionAllocEntries3[4], 2));
- assert.strictEqual(
- getFrame(mallocEntries3[1], 1),
- getFrame(partitionAllocEntries3[4], 3));
- assert.strictEqual(
- getFrame(mallocEntries3[3], 0),
- getFrame(partitionAllocEntries3[6], 1));
-
- // 4. Process 63.
- var pmd4 = p3.memoryDumps[0];
- var hds4 = pmd4.heapDumps;
- assert.sameMembers(Object.keys(hds4), ['winheap']);
-
- var winheapDump = hds4['winheap'];
- assert.strictEqual(winheapDump.processMemoryDump, pmd4);
- assert.equal(winheapDump.allocatorName, 'winheap');
- var winheapEntries = winheapDump.entries;
- assert.lengthOf(winheapEntries, 1);
- checkHeapEntry(winheapEntries[0], winheapDump, 65536,
- undefined /* root */, undefined /* sum over all types */);
-
- // 5. Process 84.
- var pmd5 = p4.memoryDumps[0];
- var hds5 = pmd5.heapDumps;
- assert.sameMembers(Object.keys(hds5), ['malloc']);
-
- var mallocDump4 = hds5['malloc'];
- assert.strictEqual(mallocDump4.processMemoryDump, pmd5);
- assert.equal(mallocDump4.allocatorName, 'malloc');
- var mallocEntries4 = mallocDump4.entries;
- assert.lengthOf(mallocEntries4, 1);
- checkHeapEntry(mallocEntries4[0], mallocDump4, 43981,
- ['MessageLoop::WalkTask'], 'content::Manually');
- });
-
- test('importMemoryDumps_composableDumps', function() {
- // Split PMD1 over multiple PMD trace events, all of which should be merged
- // by the importer. Also inject some PMD trace events with different PIDs
- // or dump IDs, which should *not* be merged with the rest.
- var events = [
- { // Heap dumps.
- pid: 42,
- ts: 10000,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- level_of_detail: 'light',
- heaps: {
- partition_alloc: {
- entries: [
- { bt: '99', type: '888', size: '500' }
- ]
- }
- }
- }
- }
- },
- { // PMD2 with a different dump id (should not be merged).
- pid: 42,
- ts: 10003, // Same PID, so it will end up in the same process.
- ph: 'v',
- id: '0x0002',
- args: {
- dumps: {
- level_of_detail: 'detailed',
- allocators: {
- 'local1': {
- guid: '3',
- attrs: {
- A: {type: 'scalar', units: 'bytes', value: '0xBAD'}
- }
- },
- 'global/shared1': {
- guid: '4',
- attrs: {
- A: {type: 'string', units: '', value: 'brown'}
- }
- }
- },
- allocators_graph: [
- {
- source: '4',
- target: '3',
- type: 'ownership'
- }
- ]
- }
- }
- },
- { // Stack frames (required for heap dumps).
- pid: 42,
- ph: 'M',
- name: 'stackFrames',
- args: {
- stackFrames: {
- '99': { name: 'MessageLoop::RunTask' }
- }
- }
- },
- { // Allocator dumps.
- pid: 42,
- ts: 10001,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- level_of_detail: 'light',
- allocators: {
- 'local1': {
- guid: '3',
- attrs: {
- A: {type: 'string', units: '', value: 'blue'}
- }
- },
- 'global/shared1': {
- guid: '7',
- attrs: {
- A: {type: 'string', units: '', value: 'purple'}
- }
- },
- 'global/shared2': {
- guid: '8',
- attrs: {
- A: {type: 'string', units: '', value: 'cyan'}
- }
- }
- }
- }
- }
- },
- { // PMD3 with a different PID (should not be merged).
- pid: 68,
- ts: 9999,
- ph: 'v',
- id: '0x0001', // Same dump ID, so it will end up in the same GMD.
- args: {
- dumps: {
- process_mmaps: {
- vm_regions: [
- {
- sa: '350',
- sz: '250',
- pf: 5,
- mf: '/dev/ashmem/dalvik',
- bs: {
- pd: 'cd'
- }
- }
- ]
- }
- }
- }
- },
- { // VM regions.
- pid: 42,
- ts: 10005,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- level_of_detail: 'light',
- process_mmaps: {
- vm_regions: [
- {
- sa: 'f0',
- sz: '150',
- pf: 6,
- mf: '[stack:20310]',
- bs: {
- pss: '9e'
- }
- }
- ]
- }
- }
- }
- },
- { // Totals.
- pid: 42,
- ts: 10003,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- level_of_detail: 'light',
- process_totals: {
- resident_set_bytes: '100',
- private_bytes: '80' // OS-specific total.
- }
- }
- }
- },
- { // Allocator dump edges.
- pid: 42,
- ts: 10004,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- level_of_detail: 'light',
- allocators_graph: [
- {
- source: '4',
- target: '8',
- type: 'retention'
- }
- ]
- }
- }
- },
- { // Object type names (required for heap dumps).
- pid: 42,
- ph: 'M',
- name: 'typeNames',
- args: {
- typeNames: {
- // GCC.
- '888': 'const char* WTF::getStringWithTypeName() [with T = ' +
- 'cc::SurfaceFactory]'
- }
- }
- },
- { // Allocator dumps and dump edges (should be merged).
- pid: 42,
- ts: 10002,
- ph: 'v',
- id: '0x0001',
- args: {
- dumps: {
- level_of_detail: 'light',
- allocators: {
- 'local1': {
- guid: '3',
- attrs: {
- B: {type: 'string', units: '', value: 'red'}
- }
- },
- 'local2': {
- guid: '4',
- attrs: {
- B: {type: 'string', units: '', value: 'yellow'}
- }
- },
- 'global/shared1': {
- guid: '7',
- attrs: {
- B: {type: 'string', units: '', value: 'green'}
- }
- }
- },
- allocators_graph: [
- {
- source: '3',
- target: '7',
- type: 'ownership',
- importance: 1
- }
- ]
- }
- }
- }
- ];
- var m = makeModel(events, false);
-
- function checkDumpTime(dump, expectedStart, expectedDuration) {
- assert.closeTo(dump.start, expectedStart / 1000, 1e-5);
- assert.closeTo(dump.duration, expectedDuration / 1000, 1e-5);
- }
-
- function checkLinkCounts(allocatorDump, expectedHasOwns,
- expectedOwnedByCount, expectedRetainsCount, expectedRetainedByCount) {
- assert.strictEqual(allocatorDump.owns !== undefined, expectedHasOwns);
- assert.lengthOf(allocatorDump.ownedBy, expectedOwnedByCount);
- assert.lengthOf(allocatorDump.retains, expectedRetainsCount);
- assert.lengthOf(allocatorDump.retainedBy, expectedRetainedByCount);
- }
-
- // Check the overall structure of the model and memory dumps.
- assert.sameMembers(Object.keys(m.processes), ['42', '68']);
- assert.lengthOf(m.globalMemoryDumps, 2);
- var gmd1 = m.globalMemoryDumps[0];
- assert.strictEqual(gmd1.model, m);
- checkDumpTime(gmd1, 9999, 6);
- var gmd2 = m.globalMemoryDumps[1];
- assert.strictEqual(gmd2.model, m);
- checkDumpTime(gmd2, 10003, 0);
-
- var p1 = m.getProcess(42);
- assert.lengthOf(p1.memoryDumps, 2);
- var pmd1 = p1.memoryDumps[0];
- checkDumpTime(pmd1, 10000, 5);
- assert.strictEqual(pmd1.globalMemoryDump, gmd1);
- assert.strictEqual(pmd1.process, p1);
- var pmd2 = p1.memoryDumps[1];
- checkDumpTime(pmd2, 10003, 0);
- assert.strictEqual(pmd2.globalMemoryDump, gmd2);
- assert.strictEqual(pmd2.process, p1);
-
- var p2 = m.getProcess(68);
- assert.lengthOf(p2.memoryDumps, 1);
- var pmd3 = p2.memoryDumps[0];
- checkDumpTime(pmd3, 9999, 0);
- assert.strictEqual(pmd3.globalMemoryDump, gmd1);
- assert.strictEqual(pmd3.process, p2);
-
- assert.deepEqual(gmd1.processMemoryDumps, {42: pmd1, 68: pmd3});
- assert.deepEqual(gmd2.processMemoryDumps, {42: pmd2});
-
- // Check the composed dump.
- assert.strictEqual(pmd1.levelOfDetail, LIGHT);
-
- var totals = pmd1.totals;
- assert.strictEqual(totals.residentBytes, 256);
- assert.isUndefined(totals.peakResidentBytes);
- assert.isUndefined(totals.arePeakResidentBytesResettable);
- assert.deepEqual(totals.platformSpecific, {private_bytes: 128});
-
- var vmRegions = pmd1.vmRegions;
- checkVMRegions(vmRegions, [
- {
- mappedFile: '[stack:20310]',
- startAddress: 240,
- sizeInBytes: 336,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- byteStats: {
- proportionalResident: 158
- }
- }
- ]);
-
- var memoryAllocatorDumps = pmd1.memoryAllocatorDumps;
- assert.lengthOf(memoryAllocatorDumps, 2);
-
- var local1Dump = pmd1.getMemoryAllocatorDumpByFullName('local1');
- assert.strictEqual(memoryAllocatorDumps[0], local1Dump);
- assert.strictEqual(local1Dump.fullName, 'local1');
- assert.isUndefined(local1Dump.parent);
- assert.lengthOf(local1Dump.children, 0);
- checkDumpNumericsAndDiagnostics(local1Dump, {},
- { 'A': 'blue', 'B': 'red' });
- checkLinkCounts(local1Dump, true /* owns */, 0 /* owned by */,
- 0 /* retains */, 0 /* retained by */);
-
- var local2Dump = pmd1.getMemoryAllocatorDumpByFullName('local2');
- assert.strictEqual(memoryAllocatorDumps[1], local2Dump);
- assert.strictEqual(local2Dump.fullName, 'local2');
- assert.isUndefined(local2Dump.parent);
- assert.lengthOf(local2Dump.children, 0);
- checkDumpNumericsAndDiagnostics(local2Dump, {}, { 'B': 'yellow' });
- checkLinkCounts(local2Dump, false /* owns */, 0 /* owned by */,
- 1 /* retains */, 0 /* retained by */);
-
- var heapDumps = pmd1.heapDumps;
- assert.sameMembers(Object.keys(heapDumps), ['partition_alloc']);
- var heapDump = heapDumps['partition_alloc'];
- assert.strictEqual(heapDump.processMemoryDump, pmd1);
- assert.strictEqual(heapDump.allocatorName, 'partition_alloc');
- var entries = heapDump.entries;
- assert.lengthOf(entries, 1);
- assert.strictEqual(entries[0].heapDump, heapDump);
- assert.strictEqual(entries[0].leafStackFrame.title, 'MessageLoop::RunTask');
- assert.strictEqual(entries[0].objectTypeName, 'cc::SurfaceFactory');
- assert.strictEqual(entries[0].size, 1280);
-
- // Check the other dumps.
- assert.strictEqual(pmd2.levelOfDetail, DETAILED);
- assert.isUndefined(pmd2.vmRegions);
- assert.lengthOf(pmd2.memoryAllocatorDumps, 1);
- var otherLocal1Dump = pmd2.getMemoryAllocatorDumpByFullName('local1');
- assert.strictEqual(otherLocal1Dump, pmd2.memoryAllocatorDumps[0]);
- assert.strictEqual(otherLocal1Dump.fullName, 'local1');
- assert.isUndefined(otherLocal1Dump.parent);
- checkDumpNumericsAndDiagnostics(otherLocal1Dump, { 'A': 2989 }, {});
- assert.isUndefined(pmd2.heapDumps);
- checkLinkCounts(otherLocal1Dump, false /* owns */, 1 /* owned by */,
- 0 /* retains */, 0 /* retained by */);
-
- assert.strictEqual(pmd3.levelOfDetail, DETAILED);
- var otherVmRegions = pmd3.vmRegions;
- checkVMRegions(otherVmRegions, [
- {
- mappedFile: '/dev/ashmem/dalvik',
- startAddress: 848,
- sizeInBytes: 592,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- privateDirtyResident: 205
- }
- }
- ]);
- assert.lengthOf(pmd3.memoryAllocatorDumps, 0);
- assert.isUndefined(pmd3.heapDumps);
-
- // Check the global dumps.
- assert.lengthOf(gmd1.memoryAllocatorDumps, 2);
- var shared1Dump = gmd1.getMemoryAllocatorDumpByFullName('shared1');
- assert.strictEqual(shared1Dump, gmd1.memoryAllocatorDumps[0]);
- assert.strictEqual(shared1Dump.fullName, 'shared1');
- assert.isUndefined(shared1Dump.parent);
- checkDumpNumericsAndDiagnostics(shared1Dump, {},
- { 'A': 'purple', 'B': 'green' });
- checkLinkCounts(shared1Dump, false /* owns */, 1 /* owned by */,
- 0 /* retains */, 0 /* retained by */);
- var shared2Dump = gmd1.getMemoryAllocatorDumpByFullName('shared2');
- assert.strictEqual(shared2Dump, gmd1.memoryAllocatorDumps[1]);
- assert.strictEqual(shared2Dump.fullName, 'shared2');
- assert.isUndefined(shared2Dump.parent);
- checkDumpNumericsAndDiagnostics(shared2Dump, {}, { 'A': 'cyan' });
- checkLinkCounts(shared2Dump, false /* owns */, 0 /* owned by */,
- 0 /* retains */, 1 /* retained by */);
-
- assert.lengthOf(gmd2.memoryAllocatorDumps, 1);
- var otherShared1Dump = gmd2.getMemoryAllocatorDumpByFullName('shared1');
- assert.strictEqual(otherShared1Dump, gmd2.memoryAllocatorDumps[0]);
- assert.strictEqual(otherShared1Dump.fullName, 'shared1');
- assert.isUndefined(otherShared1Dump.parent);
- checkDumpNumericsAndDiagnostics(otherShared1Dump, {}, { 'A': 'brown' });
- checkLinkCounts(otherShared1Dump, true /* owns */, 0 /* owned by */,
- 0 /* retains */, 0 /* retained by */);
-
- // Check the edges.
- var ownershipLink = local1Dump.owns;
- assert.strictEqual(shared1Dump.ownedBy[0], ownershipLink);
- assert.strictEqual(ownershipLink.source, local1Dump);
- assert.strictEqual(ownershipLink.target, shared1Dump);
- assert.strictEqual(ownershipLink.importance, 1);
-
- var retentionLink = local2Dump.retains[0];
- assert.strictEqual(shared2Dump.retainedBy[0], retentionLink);
- assert.strictEqual(retentionLink.source, local2Dump);
- assert.strictEqual(retentionLink.target, shared2Dump);
- assert.isUndefined(retentionLink.importance);
-
- var otherOwnershipLink = otherShared1Dump.owns;
- assert.strictEqual(otherLocal1Dump.ownedBy[0], otherOwnershipLink);
- assert.strictEqual(otherOwnershipLink.source, otherShared1Dump);
- assert.strictEqual(otherOwnershipLink.target, otherLocal1Dump);
- assert.isUndefined(otherOwnershipLink.importance);
- });
-
- test('importThreadInstantSliceWithStackFrame', function() {
- var eventData = {
- traceEvents: [
- { name: 'a', args: {}, pid: 1, ts: 0, cat: 'baz', tid: 2, ph: 'I', s: 't', sf: 7 } // @suppress longLineCheck
- ],
- stackFrames: {
- '1': {
- category: 'm1',
- name: 'main'
- },
- '7': {
- category: 'm2',
- name: 'frame7',
- parent: '1'
- }
- }
- };
-
- var m = makeModel(eventData);
-
- var p = m.processes[1];
- var t = p.threads[2];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.slices.length, 1);
-
- var s0 = t.sliceGroup.slices[0];
- assert.equal(s0.startStackFrame.title, 'frame7');
- assert.isUndefined(s0.endStackFrame);
- });
-
- test('importDurationEventsWithStackFrames', function() {
- var eventData = {
- traceEvents: [
- { name: 'a', args: {}, pid: 1, ts: 0, cat: 'baz', tid: 2, ph: 'B', sf: 7 }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 2, ph: 'E', sf: 8 } // @suppress longLineCheck
- ],
- stackFrames: {
- '1': {
- category: 'm1',
- name: 'main'
- },
- '7': {
- category: 'm2',
- name: 'frame7',
- parent: '1'
- },
- '8': {
- category: 'm2',
- name: 'frame8',
- parent: '1'
- }
- }
- };
-
- var m = makeModel(eventData);
-
- var p = m.processes[1];
- var t = p.threads[2];
- assert.isDefined(t);
- assert.equal(t.sliceGroup.slices.length, 1);
-
- var s0 = t.sliceGroup.slices[0];
- assert.equal(s0.startStackFrame.title, 'frame7');
- assert.equal(s0.endStackFrame.title, 'frame8');
- });
-
- test('annotationParsing', function() {
- var yComponents1 = [{stableId: '52.53', yPercentOffset: 0.5},
- {stableId: '52', yPercentOffset: 0.3}];
- var yComponents2 = [{stableId: '52.53', yPercentOffset: 0.7},
- {stableId: '52', yPercentOffset: 0.4}];
- var location1 = new tr.model.Location(0.1, yComponents1);
- var location2 = new tr.model.Location(0.2, yComponents2);
-
- var eventData = { traceEvents: [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'}],
- traceAnnotations: [
- {typeName: 'xmarker', args: {timestamp: 12}},
- {typeName: 'rect', args: {
- start: location1.toDict(), end: location2.toDict()}},
- {typeName: 'comment_box', args: {text: 'test',
- location: location1.toDict()}}
- ]};
-
- var m = makeModel(eventData);
- var annotations = m.getAllAnnotations();
- assert.equal(annotations.length, 3);
-
- assert.isTrue(annotations[0] instanceof tr.model.XMarkerAnnotation);
- assert.equal(annotations[0].timestamp, 12);
-
- assert.isTrue(annotations[1] instanceof tr.model.RectAnnotation);
- assert.deepEqual(annotations[1].startLocation, location1);
- assert.deepEqual(annotations[1].endLocation, location2);
-
- assert.isTrue(
- annotations[2] instanceof tr.model.CommentBoxAnnotation);
- assert.equal(annotations[2].text, 'test');
- assert.deepEqual(annotations[2].location, location1);
- });
-
- test('importDisplayTimeUnit', function() {
- var eventData = {
- traceEvents: [],
- displayTimeUnit: 'ns'
- };
- var m = makeModel(JSON.stringify(eventData));
- assert.equal(m.intrinsicTimeUnit, tr.b.TimeDisplayModes.ns);
- });
-
- test('extractBattorSubTraces', function() {
- var battorLog = '# BattOr\n# voltage range [0.000000, 7196.484161] mV\n' +
- '#current range [11.898481, 2110.900916] mA\n' +
- '# sample_rate=10000Hz, gain=30.257143x\n' +
- '# filpot_pos=3, amppot_pos=35, timer_ovf=399, timer_div=4 ovs_bits=0\n' + // @suppress longLineCheck
- '0.0 1040.3 3984.2\n' +
- '0.1 1081.3 3987.8\n' +
- '0.2 1092.6 3987.8\n' +
- '0.3 1070.0 3987.8\n' +
- '0.4 1017.7 3994.8\n';
-
- var eventData = {
- traceEvents: [
- { name: 'a', args: {}, pid: 1, ts: 0, cat: 'baz', tid: 2, ph: 'B', sf: 7 }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 2, ph: 'E', sf: 8 } // @suppress longLineCheck
- ],
- powerTraceAsString: battorLog
- };
- var m = new tr.Model();
- var importer = new tr.e.importer.TraceEventImporter(m, eventData);
- var subTraces = importer.extractSubtraces();
- assert.isTrue(subTraces instanceof Array);
- assert.equal(subTraces.length, 1);
- assert.equal(subTraces[0], battorLog);
- });
-
- test('metadataParsing', function() {
- var metadataValue = {value: {}};
- var eventData = {
- traceEvents: [
- { name: 'a', args: {}, pid: 1, ts: 0, cat: 'baz', tid: 2, ph: 'B', sf: 7 }, // @suppress longLineCheck
- { name: 'b', args: {}, pid: 1, ts: 5, cat: 'baz', tid: 2, ph: 'E', sf: 8 } // @suppress longLineCheck
- ],
- metadata: metadataValue
- };
-
- var m = makeModel(eventData);
- assert.isTrue(m.metadata instanceof Array);
- assert.equal(m.metadata.length, 1);
- assert.equal(m.metadata[0].name, 'metadata');
- assert.equal(m.metadata[0].value, metadataValue);
- });
-
- test('importTraceConfigAsMetadata', function() {
- var traceConfigData = {
- enable_argument_filter: false,
- enable_sampling: false,
- enable_systrace: false,
- record_mode: 'record-until-full'
- };
-
- var eventData = {
- traceEvents: [
- { name: 'TraceConfig', args: { value: traceConfigData },
- pid: 2, ts: 0, tid: 1, ph: 'M', cat: '__metadata' },
- ],
- };
-
- var m = makeModel(eventData);
- assert.isTrue(m.metadata instanceof Array);
- assert.equal(m.metadata.length, 1);
- assert.equal(m.metadata[0].name, 'TraceConfig');
- assert.equal(m.metadata[0].value, traceConfigData);
- });
-
- test('importMarks', function() {
- var eventData = {
- traceEvents: [
- { name: 'mark1', args: {}, pid: 1, tid: 2, ts: 0, tts: 0, cat: 'blink.user_timing', ph: 'R' }, // @suppress longLineCheck
- { name: 'mark2', args: {}, pid: 1, tid: 2, ts: 10, tts: 10, cat: 'blink.user_timing', ph: 'R' } // @suppress longLineCheck
- ]
- };
-
- var m = makeModel(eventData);
-
- var p = m.processes[1];
- var t = p.threads[2];
- assert.lengthOf(t.sliceGroup.slices, 2);
-
- var s0 = t.sliceGroup.slices[0];
- assert.equal(s0.title, 'mark1');
- assert.equal(s0.start, 0);
-
- var s1 = t.sliceGroup.slices[1];
- assert.equal(s1.title, 'mark2');
- assert.equal(s1.start, .01);
- });
-
- test('createNestableAsyncSlicesForUserTimingWithoutArgs', function() {
- /**
- * Structure of this async slices
- *
- * Group A:
- *
- * |__________|
- * a1
- *
- * Group B:
- *
- * |______________________________|
- * b1
- * |__________||_|
- * b2 b4
- * |_|
- * b3
- **/
- var events = [
- {
- name: 'A:a1',
- args: {params: ''},
- pid: 1,
- ts: 100,
- cat: 'blink.user_timing',
- tid: 2,
- id: 3,
- ph: 'b'
- },
- {
- name: 'A:a1',
- args: {params: ''},
- pid: 1,
- ts: 110,
- cat: 'blink.user_timing',
- tid: 2,
- id: 3,
- ph: 'e'
- },
- {
- name: 'B:b1',
- args: {params: ''},
- pid: 1,
- ts: 120,
- cat: 'blink.user_timing',
- tid: 2,
- id: 4,
- ph: 'b'
- },
- {
- name: 'B:b2',
- args: {params: ''},
- pid: 1,
- ts: 130,
- cat: 'blink.user_timing',
- tid: 2,
- id: 5,
- ph: 'b'
- },
- {
- name: 'B:b3',
- args: {params: ''},
- pid: 1,
- ts: 131,
- cat: 'blink.user_timing',
- tid: 2,
- id: 5,
- ph: 'b'
- },
- {
- name: 'B:b3',
- args: {params: ''},
- pid: 1,
- ts: 132,
- cat: 'blink.user_timing',
- tid: 2,
- id: 5,
- ph: 'e'
- },
- {
- name: 'B:b2',
- args: {params: ''},
- pid: 1,
- ts: 140,
- cat: 'blink.user_timing',
- tid: 2,
- id: 5,
- ph: 'e'
- },
- {
- name: 'B:b4',
- args: {params: ''},
- pid: 1,
- ts: 141,
- cat: 'blink.user_timing',
- tid: 2,
- id: 5,
- ph: 'b'
- },
- {
- name: 'B:b4',
- args: {params: ''},
- pid: 1,
- ts: 142,
- cat: 'blink.user_timing',
- tid: 2,
- id: 5,
- ph: 'e'
- },
- {
- name: 'B:b1',
- args: {params: ''},
- pid: 1,
- ts: 150,
- cat: 'blink.user_timing',
- tid: 2,
- id: 4,
- ph: 'e'
- }
- ];
-
- var m = makeModel(events);
- assert(m.numProcesses, 1);
- var p = m.processes[1];
- assert.isDefined(p);
- assert.equal(p.numThreads, 1);
- var t = p.threads[2];
- var asyncSliceGroup = t.asyncSliceGroup;
- assert.equal(asyncSliceGroup.length, 2);
- for (var i = 0; i < asyncSliceGroup.length; ++i) {
- assert.isTrue(asyncSliceGroup.slices[i] instanceof MeasureAsyncSlice);
- }
-
- var groupA = asyncSliceGroup.slices[0];
- assert.equal(groupA.viewSubGroupTitle, 'A');
- assert.equal(groupA.title, 'a1');
- assert.equal(groupA.subSlices.length, 0);
- var groupB = asyncSliceGroup.slices[1];
- assert.equal(groupB.viewSubGroupTitle, 'B');
- assert.equal(groupB.title, 'b1');
- assert.equal(groupB.subSlices.length, 2);
- var groupBSubSlice1 = groupB.subSlices[0];
- assert.equal(groupBSubSlice1.viewSubGroupTitle, 'B');
- assert.equal(groupBSubSlice1.title, 'b2');
- assert.equal(groupBSubSlice1.subSlices.length, 1);
- assert.equal(groupBSubSlice1.subSlices[0].viewSubGroupTitle, 'B');
- assert.equal(groupBSubSlice1.subSlices[0].title, 'b3');
- assert.equal(groupBSubSlice1.subSlices[0].subSlices.length, 0);
- var groupBSubSlice2 = groupB.subSlices[1];
- assert.equal(groupBSubSlice2.viewSubGroupTitle, 'B');
- assert.equal(groupBSubSlice2.title, 'b4');
- assert.equal(groupBSubSlice2.subSlices.length, 0);
- });
-
- test('createNestableAsyncSlicesForUserTimingWithArgs', function() {
- /**
- * Structure of this async slices
- *
- * Group A:
- *
- * |__________| |__________|
- * a1 a2
- *
- * a1.args = {a: 1}
- * a2.args = {a: 2, b: 2}
- **/
- var events = [
- {
- name: 'A:a1/eyJhIjoxfQ==',
- args: {params: ''},
- pid: 1,
- ts: 100,
- cat: 'blink.user_timing',
- tid: 2,
- id: 3,
- ph: 'b'
- },
- {
- name: 'A:a1/eyJhIjoxfQ==',
- args: {params: ''},
- pid: 1,
- ts: 110,
- cat: 'blink.user_timing',
- tid: 2,
- id: 3,
- ph: 'e'
- },
- {
- name: 'A:a2/eyJhIjoyLCJiIjoyfQ==',
- args: {params: ''},
- pid: 1,
- ts: 120,
- cat: 'blink.user_timing',
- tid: 2,
- id: 4,
- ph: 'b'
- },
- {
- name: 'A:a2/eyJhIjoyLCJiIjoyfQ==',
- args: {params: ''},
- pid: 1,
- ts: 130,
- cat: 'blink.user_timing',
- tid: 2,
- id: 4,
- ph: 'e'
- }
- ];
-
- var m = makeModel(events);
- assert(m.numProcesses, 1);
- var p = m.processes[1];
- assert.isDefined(p);
- assert.equal(p.numThreads, 1);
- var t = p.threads[2];
- var asyncSliceGroup = t.asyncSliceGroup;
- assert.equal(asyncSliceGroup.length, 2);
- for (var i = 0; i < asyncSliceGroup.length; ++i) {
- assert.isTrue(asyncSliceGroup.slices[i] instanceof MeasureAsyncSlice);
- }
-
- var a1 = asyncSliceGroup.slices[0];
- assert.equal(a1.viewSubGroupTitle, 'A');
- assert.equal(a1.title, 'a1');
- assert.equal(a1.subSlices.length, 0);
- assert.deepEqual(a1.args, {a: 1});
- var a2 = asyncSliceGroup.slices[1];
- assert.equal(a2.viewSubGroupTitle, 'A');
- assert.equal(a2.title, 'a2');
- assert.equal(a2.subSlices.length, 0);
- assert.deepEqual(a2.args, {a: 2, b: 2});
- });
-
- test('UserTimingAsyncSlicesWithNormalAsyncSlices', function() {
- /**
- * Structure of user timing async slices
- *
- * Group A:
- *
- * |__________|
- * a1
- * |__|
- * a2
- *
- * B
- * |__|
- * B
- * C
- * |_|
- * C
- **/
- var events = [
- {
- name: 'A:a1', args: {params: ''}, pid: 1, ts: 1,
- cat: 'blink.user_timing', tid: 2, id: 3, ph: 'b'
- },
- {
- name: 'A:a1', args: {params: ''}, pid: 1, ts: 11,
- cat: 'blink.user_timing', tid: 2, id: 3, ph: 'e'
- },
- {
- name: 'A:a2', args: {params: ''}, pid: 1, ts: 2,
- cat: 'blink.user_timing', tid: 2, id: 4, ph: 'b'
- },
- {
- name: 'A:a2', args: {params: ''}, pid: 1, ts: 4,
- cat: 'blink.user_timing', tid: 2, id: 4, ph: 'e'
- },
- {
- name: 'B', args: {}, pid: 1, ts: 9, cat: 'foo',
- tid: 2, ph: 'b', id: 5
- },
- {
- name: 'B', args: {}, pid: 1, ts: 11, cat: 'foo',
- tid: 2, ph: 'e', id: 5
- },
- {
- name: 'C', args: {}, pid: 1, ts: 12, cat: 'foo',
- tid: 2, ph: 'b', id: 6
- },
- {
- name: 'C', args: {}, pid: 1, ts: 13, cat: 'foo',
- tid: 2, ph: 'e', id: 6
- }
- ];
-
- var m = makeModel(events);
- assert(m.numProcesses, 1);
- var p = m.processes[1];
- assert.isDefined(p);
- assert.equal(p.numThreads, 1);
- var t = p.threads[2];
- var asyncSliceGroup = t.asyncSliceGroup;
- assert.equal(asyncSliceGroup.length, 3);
- assert.isTrue(asyncSliceGroup.slices[0] instanceof MeasureAsyncSlice);
- assert.isFalse(asyncSliceGroup.slices[1] instanceof MeasureAsyncSlice);
- assert.isFalse(asyncSliceGroup.slices[2] instanceof MeasureAsyncSlice);
-
- var a1 = asyncSliceGroup.slices[0];
- assert.equal(a1.viewSubGroupTitle, 'A');
- assert.equal(a1.title, 'a1');
- assert.equal(a1.subSlices.length, 1);
- var a2 = a1.subSlices[0];
- assert.equal(a2.viewSubGroupTitle, 'A');
- assert.equal(a2.title, 'a2');
- assert.equal(a2.subSlices.length, 0);
- var B = asyncSliceGroup.slices[1];
- assert.equal(B.viewSubGroupTitle, 'B');
- assert.equal(B.title, 'B');
- assert.equal(B.subSlices.length, 0);
- var C = asyncSliceGroup.slices[2];
- assert.equal(C.viewSubGroupTitle, 'C');
- assert.equal(C.title, 'C');
- assert.equal(C.subSlices.length, 0);
- });
-
- test('clockSync_requesterWithoutMetadata', function() {
- var events = [{
- name: 'clock_sync', args: {sync_id: 'abc', issue_ts: 5000},
- pid: 1, ts: 15000, cat: '__metadata', tid: 2, ph: 'c'
- }];
-
- var io = new tr.importer.ImportOptions();
- var m = new tr.Model();
- var i = new tr.importer.Import(m, io);
-
- m.clockSyncManager.addClockSyncMarker(
- ClockDomainId.LINUX_FTRACE_GLOBAL, 'abc', 15);
-
- i.importTraces([events]);
-
- // The clock sync happened in UNKNOWN_CHROME_LEGACY at 10ms and in
- // LINUX_FTRACE_GLOBAL at 15ms. The transformer should shift the ftrace
- // timestamps back by 5ms.
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- ClockDomainId.UNKNOWN_CHROME_LEGACY)(5),
- 5);
- assert.strictEqual(
- m.clockSyncManager.getModelTimeTransformer(
- ClockDomainId.LINUX_FTRACE_GLOBAL)(15),
- 10);
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('clockSync_requesterWithMetadata', function() {
- var events = {
- traceEvents: [{
- name: 'clock_sync', args: {sync_id: 'abc', issue_ts: 5},
- pid: 1, ts: 15, cat: '__metadata', tid: 2, ph: 'c'
- }],
- metadata: {
- 'clock-domain': ClockDomainId.BATTOR
- }
- };
-
- var m = makeModel(events);
-
- // Make sure that our clock domain was chosen as the model.
- assert.equal(
- m.clockSyncManager.getModelTimeTransformer(ClockDomainId.BATTOR)(.005),
- .005);
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('clockSync_recipient', function() {
- var events = {
- traceEvents: [{
- name: 'clock_sync', args: {sync_id: 'abc'}, pid: 1, ts: 15000,
- cat: '__metadata', tid: 2, ph: 'c'
- }],
- metadata: {
- 'clock-domain': ClockDomainId.TELEMETRY
- }
- };
-
- var m = makeModel(events);
-
- m.clockSyncManager.addClockSyncMarker(
- ClockDomainId.LINUX_CLOCK_MONOTONIC, 'abc', 10);
-
- assert.equal(
- m.clockSyncManager.getModelTimeTransformer(
- ClockDomainId.TELEMETRY)(15),
- 10);
- assert.equal(
- m.clockSyncManager.getModelTimeTransformer(
- ClockDomainId.LINUX_CLOCK_MONOTONIC)(10),
- 10);
- });
-
- test('clockSync_missingSyncId', function() {
- var events = [{
- name: 'clock_sync', args: {issue_ts: 5},
- pid: 1, ts: 15, cat: '__metadata', tid: 2, ph: 'c'
- }];
-
- var m = makeModel(events);
-
- assert.isTrue(m.hasImportWarnings);
- });
-
- // TODO(nduca): one slice, two threads
- // TODO(nduca): one slice, two pids
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/codemap.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/codemap.html
deleted file mode 100644
index c33cf6d7558..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/codemap.html
+++ /dev/null
@@ -1,381 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/v8/splaytree.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Map addresses to dynamically created functions.
- */
-tr.exportTo('tr.e.importer.v8', function() {
- /**
- * Constructs a mapper that maps addresses into code entries.
- *
- * @constructor
- */
- function CodeMap() {
- /**
- * Dynamic code entries. Used for JIT compiled code.
- */
- this.dynamics_ = new tr.e.importer.v8.SplayTree();
-
- /**
- * Name generator for entries having duplicate names.
- */
- this.dynamicsNameGen_ = new tr.e.importer.v8.CodeMap.NameGenerator();
-
- /**
- * Static code entries. Used for statically compiled code.
- */
- this.statics_ = new tr.e.importer.v8.SplayTree();
-
- /**
- * Libraries entries. Used for the whole static code libraries.
- */
- this.libraries_ = new tr.e.importer.v8.SplayTree();
-
- /**
- * Map of memory pages occupied with static code.
- */
- this.pages_ = [];
- }
-
- /**
- * The number of alignment bits in a page address.
- */
- CodeMap.PAGE_ALIGNMENT = 12;
-
- /**
- * Page size in bytes.
- */
- CodeMap.PAGE_SIZE = 1 << CodeMap.PAGE_ALIGNMENT;
-
- /**
- * Adds a dynamic (i.e. moveable and discardable) code entry.
- *
- * @param {number} start The starting address.
- * @param {CodeMap.CodeEntry} codeEntry Code entry object.
- */
- CodeMap.prototype.addCode = function(start, codeEntry) {
- this.deleteAllCoveredNodes_(this.dynamics_, start, start + codeEntry.size);
- this.dynamics_.insert(start, codeEntry);
- };
-
- /**
- * Moves a dynamic code entry. Throws an exception if there is no dynamic
- * code entry with the specified starting address.
- *
- * @param {number} from The starting address of the entry being moved.
- * @param {number} to The destination address.
- */
- CodeMap.prototype.moveCode = function(from, to) {
- var removedNode = this.dynamics_.remove(from);
- this.deleteAllCoveredNodes_(this.dynamics_, to,
- to + removedNode.value.size);
- this.dynamics_.insert(to, removedNode.value);
- };
-
- /**
- * Discards a dynamic code entry. Throws an exception if there is no dynamic
- * code entry with the specified starting address.
- *
- * @param {number} start The starting address of the entry being deleted.
- */
- CodeMap.prototype.deleteCode = function(start) {
- var removedNode = this.dynamics_.remove(start);
- };
-
- /**
- * Adds a library entry.
- *
- * @param {number} start The starting address.
- * @param {CodeMap.CodeEntry} codeEntry Code entry object.
- */
- CodeMap.prototype.addLibrary = function(
- start, codeEntry) {
- this.markPages_(start, start + codeEntry.size);
- this.libraries_.insert(start, codeEntry);
- };
-
- /**
- * Adds a static code entry.
- *
- * @param {number} start The starting address.
- * @param {CodeMap.CodeEntry} codeEntry Code entry object.
- */
- CodeMap.prototype.addStaticCode = function(
- start, codeEntry) {
- this.statics_.insert(start, codeEntry);
- };
-
- /**
- * @private
- */
- CodeMap.prototype.markPages_ = function(start, end) {
- for (var addr = start; addr <= end;
- addr += CodeMap.PAGE_SIZE) {
- this.pages_[addr >>> CodeMap.PAGE_ALIGNMENT] = 1;
- }
- };
-
- /**
- * @private
- */
- CodeMap.prototype.deleteAllCoveredNodes_ = function(tree, start, end) {
- var toDelete = [];
- var addr = end - 1;
- while (addr >= start) {
- var node = tree.findGreatestLessThan(addr);
- if (!node) break;
- var start2 = node.key, end2 = start2 + node.value.size;
- if (start2 < end && start < end2) toDelete.push(start2);
- addr = start2 - 1;
- }
- for (var i = 0, l = toDelete.length; i < l; ++i) tree.remove(toDelete[i]);
- };
-
- /**
- * @private
- */
- CodeMap.prototype.isAddressBelongsTo_ = function(addr, node) {
- return addr >= node.key && addr < (node.key + node.value.size);
- };
-
- /**
- * @private
- */
- CodeMap.prototype.findInTree_ = function(tree, addr) {
- var node = tree.findGreatestLessThan(addr);
- return node && this.isAddressBelongsTo_(addr, node) ? node.value : null;
- };
-
- /**
- * Finds a code entry that contains the specified address in static libraries.
- *
- * @param {number} addr Address.
- */
- CodeMap.prototype.findEntryInLibraries = function(addr) {
- var pageAddr = addr >>> CodeMap.PAGE_ALIGNMENT;
- if (pageAddr in this.pages_)
- return this.findInTree_(this.libraries_, addr);
- return undefined;
- };
-
- /**
- * Finds a code entry that contains the specified address. Both static and
- * dynamic code entries are considered.
- *
- * @param {number} addr Address.
- */
- CodeMap.prototype.findEntry = function(addr) {
- var pageAddr = addr >>> CodeMap.PAGE_ALIGNMENT;
- if (pageAddr in this.pages_) {
- // Static code entries can contain "holes" of unnamed code.
- // In this case, the whole library is assigned to this address.
- return this.findInTree_(this.statics_, addr) ||
- this.findInTree_(this.libraries_, addr);
- }
- var min = this.dynamics_.findMin();
- var max = this.dynamics_.findMax();
- if (max !== null && addr < (max.key + max.value.size) && addr >= min.key) {
- var dynaEntry = this.findInTree_(this.dynamics_, addr);
- if (dynaEntry === null) return null;
- // Dedupe entry name.
- if (!dynaEntry.nameUpdated_) {
- dynaEntry.name = this.dynamicsNameGen_.getName(dynaEntry.name);
- dynaEntry.nameUpdated_ = true;
- }
- return dynaEntry;
- }
- return null;
- };
-
- /**
- * Returns a dynamic code entry using its starting address.
- *
- * @param {number} addr Address.
- */
- CodeMap.prototype.findDynamicEntryByStartAddress =
- function(addr) {
- var node = this.dynamics_.find(addr);
- return node ? node.value : null;
- };
-
- /**
- * Returns an array of all dynamic code entries.
- */
- CodeMap.prototype.getAllDynamicEntries = function() {
- return this.dynamics_.exportValues();
- };
-
- /**
- * Returns an array of pairs of all dynamic code entries and their addresses.
- */
- CodeMap.prototype.getAllDynamicEntriesWithAddresses = function() {
- return this.dynamics_.exportKeysAndValues();
- };
-
- /**
- * Returns an array of all static code entries.
- */
- CodeMap.prototype.getAllStaticEntries = function() {
- return this.statics_.exportValues();
- };
-
- /**
- * Returns an array of all libraries entries.
- */
- CodeMap.prototype.getAllLibrariesEntries = function() {
- return this.libraries_.exportValues();
- };
-
- /**
- * Enum for code state regarding its dynamic optimization.
- *
- * @enum {number}
- */
- CodeMap.CodeState = {
- COMPILED: 0,
- OPTIMIZABLE: 1,
- OPTIMIZED: 2
- };
-
- /**
- * Creates a code entry object.
- *
- * @param {number} size Code entry size in bytes.
- * @param {string=} opt_name Code entry name.
- * @constructor
- */
- CodeMap.CodeEntry = function(size, opt_name, opt_type) {
- this.id = tr.b.GUID.allocateSimple();
- this.size = size;
- this.name_ = opt_name || '';
- this.type = opt_type || '';
- this.nameUpdated_ = false;
- };
-
- CodeMap.CodeEntry.prototype = {
- __proto__: Object.prototype,
-
- get name() {
- return this.name_;
- },
-
- set name(value) {
- this.name_ = value;
- },
-
- toString: function() {
- this.name_ + ': ' + this.size.toString(16);
- }
- };
-
- CodeMap.CodeEntry.TYPE = {
- SHARED_LIB: 'SHARED_LIB',
- CPP: 'CPP'
- };
-
- /**
- * Creates a dynamic code entry.
- *
- * @param {number} size Code size.
- * @param {string} type Code type.
- * @param {CodeMap.FunctionEntry} func Shared function entry.
- * @param {CodeMap.CodeState} state Code optimization state.
- * @constructor
- */
- CodeMap.DynamicFuncCodeEntry = function(size, type, func, state) {
- CodeMap.CodeEntry.call(this, size, '', type);
- this.func = func;
- this.state = state;
- };
-
- CodeMap.DynamicFuncCodeEntry.STATE_PREFIX = ['', '~', '*'];
-
- CodeMap.DynamicFuncCodeEntry.prototype = {
- __proto__: CodeMap.CodeEntry.prototype,
-
- /**
- * Returns node name.
- */
- get name() {
- return CodeMap.DynamicFuncCodeEntry.STATE_PREFIX[this.state] +
- this.func.name;
- },
-
- set name(value) {
- this.name_ = value;
- },
-
- /**
- * Returns raw node name (without type decoration).
- */
- getRawName: function() {
- return this.func.getName();
- },
-
- isJSFunction: function() {
- return true;
- },
-
- toString: function() {
- return this.type + ': ' + this.name + ': ' + this.size.toString(16);
- }
- };
-
- /**
- * Creates a shared function object entry.
- *
- * @param {string} name Function name.
- * @constructor
- */
- CodeMap.FunctionEntry = function(name) {
- CodeMap.CodeEntry.call(this, 0, name);
- };
-
- CodeMap.FunctionEntry.prototype = {
- __proto__: CodeMap.CodeEntry.prototype,
-
- /**
- * Returns node name.
- */
- get name() {
- var name = this.name_;
- if (name.length === 0) {
- name = '<anonymous>';
- } else if (name.charAt(0) === ' ') {
- // An anonymous function with location: " aaa.js:10".
- name = '<anonymous>' + name;
- }
- return name;
- },
-
- set name(value) {
- this.name_ = value;
- }
- };
-
- CodeMap.NameGenerator = function() {
- this.knownNames_ = {};
- };
-
- CodeMap.NameGenerator.prototype.getName = function(name) {
- if (!(name in this.knownNames_)) {
- this.knownNames_[name] = 0;
- return name;
- }
- var count = ++this.knownNames_[name];
- return name + ' {' + count + '}';
- };
- return {
- CodeMap: CodeMap
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/log_reader.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/log_reader.html
deleted file mode 100644
index 5856237ed31..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/log_reader.html
+++ /dev/null
@@ -1,213 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Log Reader is used to process log file produced by V8.
- */
-tr.exportTo('tr.e.importer.v8', function() {
- /**
- * Creates a CSV lines parser.
- */
- function CsvParser() { }
-
- /**
- * A regex for matching a CSV field.
- * @private
- */
- CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/;
-
- /**
- * A regex for matching a double quote.
- * @private
- */
- CsvParser.DOUBLE_QUOTE_RE_ = /""/g;
-
- /**
- * Parses a line of CSV-encoded values. Returns an array of fields.
- *
- * @param {string} line Input line.
- */
- CsvParser.prototype.parseLine = function(line) {
- var fieldRe = CsvParser.CSV_FIELD_RE_;
- var doubleQuoteRe = CsvParser.DOUBLE_QUOTE_RE_;
- var pos = 0;
- var endPos = line.length;
- var fields = [];
- if (endPos > 0) {
- do {
- var fieldMatch = fieldRe.exec(line.substr(pos));
- if (typeof fieldMatch[1] === 'string') {
- var field = fieldMatch[1];
- pos += field.length + 3; // Skip comma and quotes.
- fields.push(field.replace(doubleQuoteRe, '"'));
- } else {
- // The second field pattern will match anything, thus
- // in the worst case the match will be an empty string.
- var field = fieldMatch[2];
- pos += field.length + 1; // Skip comma.
- fields.push(field);
- }
- } while (pos <= endPos);
- }
- return fields;
- };
-
- /**
- * Base class for processing log files.
- *
- * @param {Array.<Object>} dispatchTable A table used for parsing and
- * processing log records.
- *
- * @constructor
- */
- function LogReader(dispatchTable) {
- /**
- * @type {Array.<Object>}
- */
- this.dispatchTable_ = dispatchTable;
-
- /**
- * Current line.
- * @type {number}
- */
- this.lineNum_ = 0;
-
- /**
- * CSV lines parser.
- * @type {CsvParser}
- */
- this.csvParser_ = new CsvParser();
- }
-
- /**
- * Used for printing error messages.
- *
- * @param {string} str Error message.
- */
- LogReader.prototype.printError = function(str) {
- // Do nothing.
- };
-
- /**
- * Processes a portion of V8 profiler event log.
- *
- * @param {string} chunk A portion of log.
- */
- LogReader.prototype.processLogChunk = function(chunk) {
- this.processLog_(chunk.split('\n'));
- };
-
- /**
- * Processes a line of V8 profiler event log.
- *
- * @param {string} line A line of log.
- */
- LogReader.prototype.processLogLine = function(line) {
- this.processLog_([line]);
- };
-
- /**
- * Processes stack record.
- *
- * @param {number} pc Program counter.
- * @param {number} func JS Function.
- * @param {Array.<string>} stack String representation of a stack.
- * @return {Array.<number>} Processed stack.
- */
- LogReader.prototype.processStack = function(pc, func, stack) {
- var fullStack = func ? [pc, func] : [pc];
- var prevFrame = pc;
- for (var i = 0, n = stack.length; i < n; ++i) {
- var frame = stack[i];
- var firstChar = frame.charAt(0);
- if (firstChar === '+' || firstChar === '-') {
- // An offset from the previous frame.
- prevFrame += parseInt(frame, 16);
- fullStack.push(prevFrame);
- // Filter out possible 'overflow' string.
- } else if (firstChar !== 'o') {
- fullStack.push(parseInt(frame, 16));
- }
- }
- return fullStack;
- };
-
- /**
- * Returns whether a particular dispatch must be skipped.
- *
- * @param {!Object} dispatch Dispatch record.
- * @return {boolean} True if dispatch must be skipped.
- */
- LogReader.prototype.skipDispatch = function(dispatch) {
- return false;
- };
-
- /**
- * Does a dispatch of a log record.
- *
- * @param {Array.<string>} fields Log record.
- * @private
- */
- LogReader.prototype.dispatchLogRow_ = function(fields) {
- // Obtain the dispatch.
- var command = fields[0];
- if (!(command in this.dispatchTable_)) return;
-
- var dispatch = this.dispatchTable_[command];
-
- if (dispatch === null || this.skipDispatch(dispatch)) {
- return;
- }
-
- // Parse fields.
- var parsedFields = [];
- for (var i = 0; i < dispatch.parsers.length; ++i) {
- var parser = dispatch.parsers[i];
- if (parser === null) {
- parsedFields.push(fields[1 + i]);
- } else if (typeof parser === 'function') {
- parsedFields.push(parser(fields[1 + i]));
- } else {
- // var-args
- parsedFields.push(fields.slice(1 + i));
- break;
- }
- }
-
- // Run the processor.
- dispatch.processor.apply(this, parsedFields);
- };
-
- /**
- * Processes log lines.
- *
- * @param {Array.<string>} lines Log lines.
- * @private
- */
- LogReader.prototype.processLog_ = function(lines) {
- for (var i = 0, n = lines.length; i < n; ++i, ++this.lineNum_) {
- var line = lines[i];
- if (!line) {
- continue;
- }
- try {
- var fields = this.csvParser_.parseLine(line);
- this.dispatchLogRow_(fields);
- } catch (e) {
- this.printError('line ' + (this.lineNum_ + 1) + ': ' +
- (e.message || e));
- }
- }
- };
- return {
- LogReader: LogReader
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/splaytree.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/splaytree.html
deleted file mode 100644
index a3d7a244f75..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/splaytree.html
+++ /dev/null
@@ -1,306 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Splay tree used by CodeMap.
- */
-tr.exportTo('tr.e.importer.v8', function() {
- /**
- * Constructs a Splay tree. A splay tree is a self-balancing binary
- * search tree with the additional property that recently accessed
- * elements are quick to access again. It performs basic operations
- * such as insertion, look-up and removal in O(log(n)) amortized time.
- *
- * @constructor
- */
- function SplayTree() { }
-
- /**
- * Pointer to the root node of the tree.
- *
- * @type {SplayTree.Node}
- * @private
- */
- SplayTree.prototype.root_ = null;
-
- /**
- * @return {boolean} Whether the tree is empty.
- */
- SplayTree.prototype.isEmpty = function() {
- return !this.root_;
- };
-
- /**
- * Inserts a node into the tree with the specified key and value if
- * the tree does not already contain a node with the specified key. If
- * the value is inserted, it becomes the root of the tree.
- *
- * @param {number} key Key to insert into the tree.
- * @param {*} value Value to insert into the tree.
- */
- SplayTree.prototype.insert = function(key, value) {
- if (this.isEmpty()) {
- this.root_ = new SplayTree.Node(key, value);
- return;
- }
- // Splay on the key to move the last node on the search path for
- // the key to the root of the tree.
- this.splay_(key);
- if (this.root_.key === key) {
- return;
- }
- var node = new SplayTree.Node(key, value);
- if (key > this.root_.key) {
- node.left = this.root_;
- node.right = this.root_.right;
- this.root_.right = null;
- } else {
- node.right = this.root_;
- node.left = this.root_.left;
- this.root_.left = null;
- }
- this.root_ = node;
- };
-
-
- /**
- * Removes a node with the specified key from the tree if the tree
- * contains a node with this key. The removed node is returned. If the
- * key is not found, an exception is thrown.
- *
- * @param {number} key Key to find and remove from the tree.
- * @return {SplayTree.Node} The removed node.
- */
- SplayTree.prototype.remove = function(key) {
- if (this.isEmpty()) {
- throw Error('Key not found: ' + key);
- }
- this.splay_(key);
- if (this.root_.key !== key) {
- throw Error('Key not found: ' + key);
- }
- var removed = this.root_;
- if (!this.root_.left) {
- this.root_ = this.root_.right;
- } else {
- var right = this.root_.right;
- this.root_ = this.root_.left;
- // Splay to make sure that the new root has an empty right child.
- this.splay_(key);
- // Insert the original right child as the right child of the new
- // root.
- this.root_.right = right;
- }
- return removed;
- };
-
-
- /**
- * Returns the node having the specified key or null if the tree doesn't
- * contain a node with the specified key.
- *
- *
- * @param {number} key Key to find in the tree.
- * @return {SplayTree.Node} Node having the specified key.
- */
- SplayTree.prototype.find = function(key) {
- if (this.isEmpty()) {
- return null;
- }
- this.splay_(key);
- return this.root_.key === key ? this.root_ : null;
- };
-
- /**
- * @return {SplayTree.Node} Node having the minimum key value.
- */
- SplayTree.prototype.findMin = function() {
- if (this.isEmpty()) {
- return null;
- }
- var current = this.root_;
- while (current.left) {
- current = current.left;
- }
- return current;
- };
-
- /**
- * @return {SplayTree.Node} Node having the maximum key value.
- */
- SplayTree.prototype.findMax = function(opt_startNode) {
- if (this.isEmpty()) {
- return null;
- }
- var current = opt_startNode || this.root_;
- while (current.right) {
- current = current.right;
- }
- return current;
- };
-
- /**
- * @return {SplayTree.Node} Node having the maximum key value that
- * is less or equal to the specified key value.
- */
- SplayTree.prototype.findGreatestLessThan = function(key) {
- if (this.isEmpty()) {
- return null;
- }
- // Splay on the key to move the node with the given key or the last
- // node on the search path to the top of the tree.
- this.splay_(key);
- // Now the result is either the root node or the greatest node in
- // the left subtree.
- if (this.root_.key <= key) {
- return this.root_;
- } else if (this.root_.left) {
- return this.findMax(this.root_.left);
- } else {
- return null;
- }
- };
-
- /**
- * @return {Array<*>} An array containing all the values of tree's nodes
- * paired with keys.
- *
- */
- SplayTree.prototype.exportKeysAndValues = function() {
- var result = [];
- this.traverse_(function(node) { result.push([node.key, node.value]); });
- return result;
- };
-
- /**
- * @return {Array<*>} An array containing all the values of tree's nodes.
- */
- SplayTree.prototype.exportValues = function() {
- var result = [];
- this.traverse_(function(node) { result.push(node.value); });
- return result;
- };
-
- /**
- * Perform the splay operation for the given key. Moves the node with
- * the given key to the top of the tree. If no node has the given
- * key, the last node on the search path is moved to the top of the
- * tree. This is the simplified top-down splaying algorithm from:
- * "Self-adjusting Binary Search Trees" by Sleator and Tarjan
- *
- * @param {number} key Key to splay the tree on.
- * @private
- */
- SplayTree.prototype.splay_ = function(key) {
- if (this.isEmpty()) {
- return;
- }
- // Create a dummy node. The use of the dummy node is a bit
- // counter-intuitive: The right child of the dummy node will hold
- // the L tree of the algorithm. The left child of the dummy node
- // will hold the R tree of the algorithm. Using a dummy node, left
- // and right will always be nodes and we avoid special cases.
- var dummy, left, right;
- dummy = left = right = new SplayTree.Node(null, null);
- var current = this.root_;
- while (true) {
- if (key < current.key) {
- if (!current.left) {
- break;
- }
- if (key < current.left.key) {
- // Rotate right.
- var tmp = current.left;
- current.left = tmp.right;
- tmp.right = current;
- current = tmp;
- if (!current.left) {
- break;
- }
- }
- // Link right.
- right.left = current;
- right = current;
- current = current.left;
- } else if (key > current.key) {
- if (!current.right) {
- break;
- }
- if (key > current.right.key) {
- // Rotate left.
- var tmp = current.right;
- current.right = tmp.left;
- tmp.left = current;
- current = tmp;
- if (!current.right) {
- break;
- }
- }
- // Link left.
- left.right = current;
- left = current;
- current = current.right;
- } else {
- break;
- }
- }
- // Assemble.
- left.right = current.left;
- right.left = current.right;
- current.left = dummy.right;
- current.right = dummy.left;
- this.root_ = current;
- };
-
- /**
- * Performs a preorder traversal of the tree.
- *
- * @param {function(SplayTree.Node)} f Visitor function.
- * @private
- */
- SplayTree.prototype.traverse_ = function(f) {
- var nodesToVisit = [this.root_];
- while (nodesToVisit.length > 0) {
- var node = nodesToVisit.shift();
- if (node === null) {
- continue;
- }
- f(node);
- nodesToVisit.push(node.left);
- nodesToVisit.push(node.right);
- }
- };
-
- /**
- * Constructs a Splay tree node.
- *
- * @param {number} key Key.
- * @param {*} value Value.
- */
- SplayTree.Node = function(key, value) {
- this.key = key;
- this.value = value;
- };
-
- /**
- * @type {SplayTree.Node}
- */
- SplayTree.Node.prototype.left = null;
-
- /**
- * @type {SplayTree.Node}
- */
- SplayTree.Node.prototype.right = null;
-
- return {
- SplayTree: SplayTree
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer.html
deleted file mode 100644
index bcc9e77896f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer.html
+++ /dev/null
@@ -1,381 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/extras/importer/v8/codemap.html">
-<link rel="import" href="/tracing/extras/importer/v8/log_reader.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/slice.html">
-
-<script>
-
-'use strict';
-
-/**
- * @fileoverview V8LogImporter imports v8.log files into the provided model.
- */
-tr.exportTo('tr.e.importer.v8', function() {
- var CodeEntry = tr.e.importer.v8.CodeMap.CodeEntry;
- var CodeMap = tr.e.importer.v8.CodeMap;
- var ColorScheme = tr.b.ColorScheme;
- var DynamicFuncCodeEntry = tr.e.importer.v8.CodeMap.DynamicFuncCodeEntry;
- var FunctionEntry = tr.e.importer.v8.CodeMap.FunctionEntry;
-
- function V8LogImporter(model, eventData) {
- this.importPriority = 3;
- this.model_ = model;
-
- this.logData_ = eventData;
-
- this.code_map_ = new CodeMap();
- this.v8_timer_thread_ = undefined;
- this.v8_thread_ = undefined;
-
- this.root_stack_frame_ = new tr.model.StackFrame(
- undefined, 'v8-root-stack-frame', 'v8-root-stack-frame', 0);
-
- // We reconstruct the stack timeline from ticks.
- this.v8_stack_timeline_ = new Array();
- }
-
- var kV8BinarySuffixes = ['/d8', '/libv8.so'];
-
-
- var TimerEventDefaultArgs = {
- 'V8.Execute': { pause: false, no_execution: false},
- 'V8.External': { pause: false, no_execution: true},
- 'V8.CompileFullCode': { pause: true, no_execution: true},
- 'V8.RecompileSynchronous': { pause: true, no_execution: true},
- 'V8.RecompileParallel': { pause: false, no_execution: false},
- 'V8.CompileEval': { pause: true, no_execution: true},
- 'V8.Parse': { pause: true, no_execution: true},
- 'V8.PreParse': { pause: true, no_execution: true},
- 'V8.ParseLazy': { pause: true, no_execution: true},
- 'V8.GCScavenger': { pause: true, no_execution: true},
- 'V8.GCCompactor': { pause: true, no_execution: true},
- 'V8.GCContext': { pause: true, no_execution: true}
- };
-
- /**
- * @return {boolean} Whether obj is a V8 log string.
- */
- V8LogImporter.canImport = function(eventData) {
- if (typeof(eventData) !== 'string' && !(eventData instanceof String))
- return false;
-
- return eventData.substring(0, 11) === 'v8-version,' ||
- eventData.substring(0, 12) === 'timer-event,' ||
- eventData.substring(0, 5) === 'tick,' ||
- eventData.substring(0, 15) === 'shared-library,' ||
- eventData.substring(0, 9) === 'profiler,' ||
- eventData.substring(0, 14) === 'code-creation,';
- };
-
- V8LogImporter.prototype = {
-
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'V8LogImporter';
- },
-
- processTimerEvent_: function(name, startInUs, lengthInUs) {
- var args = TimerEventDefaultArgs[name];
- if (args === undefined) return;
- var startInMs = tr.b.convertUnit(startInUs,
- tr.b.UnitScale.Metric.MICRO, tr.b.UnitScale.Metric.MILLI);
- var lengthInMs = tr.b.convertUnit(lengthInUs,
- tr.b.UnitScale.Metric.MICRO, tr.b.UnitScale.Metric.MILLI);
- var colorId = ColorScheme.getColorIdForGeneralPurposeString(name);
- var slice = new tr.model.ThreadSlice('v8', name, colorId, startInMs,
- args, lengthInMs);
- this.v8_timer_thread_.sliceGroup.pushSlice(slice);
- },
-
- processTimerEventStart_: function(name, startInUs) {
- var args = TimerEventDefaultArgs[name];
- if (args === undefined) return;
- var startInMs = tr.b.convertUnit(startInUs,
- tr.b.UnitScale.Metric.MICRO, tr.b.UnitScale.Metric.MILLI);
- this.v8_timer_thread_.sliceGroup.beginSlice('v8', name, startInMs, args);
- },
-
- processTimerEventEnd_: function(name, endInUs) {
- var endInMs = tr.b.convertUnit(endInUs,
- tr.b.UnitScale.Metric.MICRO, tr.b.UnitScale.Metric.MILLI);
- this.v8_timer_thread_.sliceGroup.endSlice(endInMs);
- },
-
- processCodeCreateEvent_: function(type, kind, address, size, name,
- maybeFunc) {
- function parseState(s) {
- switch (s) {
- case '': return CodeMap.CodeState.COMPILED;
- case '~': return CodeMap.CodeState.OPTIMIZABLE;
- case '*': return CodeMap.CodeState.OPTIMIZED;
- }
- throw new Error('unknown code state: ' + s);
- }
-
- if (maybeFunc.length) {
- var funcAddr = parseInt(maybeFunc[0]);
- var state = parseState(maybeFunc[1]);
- var func = this.code_map_.findDynamicEntryByStartAddress(funcAddr);
- if (!func) {
- func = new FunctionEntry(name);
- func.kind = kind;
- this.code_map_.addCode(funcAddr, func);
- } else if (func.name !== name) {
- // Function object has been overwritten with a new one.
- func.name = name;
- }
- var entry = this.code_map_.findDynamicEntryByStartAddress(address);
- if (entry) {
- if (entry.size === size && entry.func === func) {
- // Entry state has changed.
- entry.state = state;
- }
- } else {
- entry = new DynamicFuncCodeEntry(size, type, func, state);
- entry.kind = kind;
- this.code_map_.addCode(address, entry);
- }
- } else {
- var codeEntry = new CodeEntry(size, name);
- codeEntry.kind = kind;
- this.code_map_.addCode(address, codeEntry);
- }
- },
-
- processCodeMoveEvent_: function(from, to) {
- this.code_map_.moveCode(from, to);
- },
-
- processCodeDeleteEvent_: function(address) {
- this.code_map_.deleteCode(address);
- },
-
- processSharedLibrary_: function(name, start, end) {
- var codeEntry = new CodeEntry(end - start, name,
- CodeEntry.TYPE.SHARED_LIB);
- codeEntry.kind = -3; // External code kind.
- for (var i = 0; i < kV8BinarySuffixes.length; i++) {
- var suffix = kV8BinarySuffixes[i];
- if (name.indexOf(suffix, name.length - suffix.length) >= 0) {
- codeEntry.kind = -1; // V8 runtime code kind.
- break;
- }
- }
- this.code_map_.addLibrary(start, codeEntry);
- },
-
- processCppSymbol_: function(address, size, name) {
- var codeEntry = new CodeEntry(size, name, CodeEntry.TYPE.CPP);
- codeEntry.kind = -1;
- this.code_map_.addStaticCode(address, codeEntry);
- },
-
- processTickEvent_: function(pc, startInUs, isExternalCallback,
- tosOrExternalCallback, vmstate, stack) {
-
- var startInMs = tr.b.convertUnit(startInUs,
- tr.b.UnitScale.Metric.MICRO, tr.b.UnitScale.Metric.MILLI);
-
- function findChildWithEntryID(stackFrame, entryID) {
- for (var i = 0; i < stackFrame.children.length; i++) {
- if (stackFrame.children[i].entryID === entryID)
- return stackFrame.children[i];
- }
- return undefined;
- }
-
- function processStack(pc, func, stack) {
- var fullStack = func ? [pc, func] : [pc];
- var prevFrame = pc;
- for (var i = 0, n = stack.length; i < n; ++i) {
- var frame = stack[i];
- var firstChar = frame.charAt(0);
- if (firstChar === '+' || firstChar === '-') {
- // An offset from the previous frame.
- prevFrame += parseInt(frame, 16);
- fullStack.push(prevFrame);
- // Filter out possible 'overflow' string.
- } else if (firstChar !== 'o') {
- fullStack.push(parseInt(frame, 16));
- }
- // Otherwise, they will be skipped.
- }
- return fullStack;
- }
-
- if (isExternalCallback) {
- // Don't use PC when in external callback code, as it can point
- // inside callback's code, and we will erroneously report
- // that a callback calls itself. Instead use tosOrExternalCallback,
- // as simply resetting PC will produce unaccounted ticks.
- pc = tosOrExternalCallback;
- tosOrExternalCallback = 0;
- } else if (tosOrExternalCallback) {
- // Find out, if top of stack was pointing inside a JS function
- // meaning that we have encountered a frameless invocation.
- var funcEntry = this.code_map_.findEntry(tosOrExternalCallback);
- if (!funcEntry || !funcEntry.isJSFunction || !funcEntry.isJSFunction())
- tosOrExternalCallback = 0;
- }
-
- var processedStack = processStack(pc, tosOrExternalCallback, stack);
- var lastStackFrame = this.root_stack_frame_;
- // v8 log stacks are inverted, leaf first and the root at the end.
- processedStack = processedStack.reverse();
- for (var i = 0, n = processedStack.length; i < n; i++) {
- var frame = processedStack[i];
- if (!frame)
- break;
- var entry = this.code_map_.findEntry(frame);
-
- if (!entry && i !== 0) {
- continue;
- }
-
- var sourceInfo = undefined;
- if (entry && entry.type === CodeEntry.TYPE.CPP) {
- var libEntry = this.code_map_.findEntryInLibraries(frame);
- if (libEntry)
- sourceInfo = libEntry.name;
- }
-
- var entryID = entry ? entry.id : 'Unknown';
- var childFrame = findChildWithEntryID(lastStackFrame, entryID);
- if (childFrame === undefined) {
- var entryName = entry ? entry.name : 'Unknown';
- lastStackFrame = new tr.model.StackFrame(
- lastStackFrame, 'v8sf-' + tr.b.GUID.allocateSimple(), entryName,
- ColorScheme.getColorIdForGeneralPurposeString(entryName),
- sourceInfo);
- lastStackFrame.entryID = entryID;
- this.model_.addStackFrame(lastStackFrame);
- } else {
- lastStackFrame = childFrame;
- }
- }
-
- if (lastStackFrame !== this.root_stack_frame_) {
- var sample = new tr.model.Sample(
- undefined, this.v8_thread_, 'V8 PC',
- startInMs, lastStackFrame, 1);
- this.model_.samples.push(sample);
- }
- },
-
- processDistortion_: function(distortionInPicoseconds) {
- // Do nothing.
- },
-
- processPlotRange_: function(start, end) {
- // Do nothing.
- },
-
- processV8Version_: function(major, minor, build, patch, candidate) {
- // Do nothing.
- },
-
- /**
- * Walks through the events_ list and outputs the structures discovered to
- * model_.
- */
- importEvents: function() {
- var logreader = new tr.e.importer.v8.LogReader(
- { 'timer-event' : {
- parsers: [null, parseInt, parseInt],
- processor: this.processTimerEvent_.bind(this)
- },
- 'shared-library': {
- parsers: [null, parseInt, parseInt],
- processor: this.processSharedLibrary_.bind(this)
- },
- 'timer-event-start' : {
- parsers: [null, parseInt],
- processor: this.processTimerEventStart_.bind(this)
- },
- 'timer-event-end' : {
- parsers: [null, parseInt],
- processor: this.processTimerEventEnd_.bind(this)
- },
- 'code-creation': {
- parsers: [null, parseInt, parseInt, parseInt, null, 'var-args'],
- processor: this.processCodeCreateEvent_.bind(this)
- },
- 'code-move': {
- parsers: [parseInt, parseInt],
- processor: this.processCodeMoveEvent_.bind(this)
- },
- 'code-delete': {
- parsers: [parseInt],
- processor: this.processCodeDeleteEvent_.bind(this)
- },
- 'cpp': {
- parsers: [parseInt, parseInt, null],
- processor: this.processCppSymbol_.bind(this)
- },
- 'tick': {
- parsers: [parseInt, parseInt, parseInt, parseInt, parseInt,
- 'var-args'],
- processor: this.processTickEvent_.bind(this)
- },
- 'distortion': {
- parsers: [parseInt],
- processor: this.processDistortion_.bind(this)
- },
- 'plot-range': {
- parsers: [parseInt, parseInt],
- processor: this.processPlotRange_.bind(this)
- },
- 'v8-version': {
- parsers: [parseInt, parseInt, parseInt, parseInt, parseInt],
- processor: this.processV8Version_.bind(this)
- }
- });
-
- this.v8_timer_thread_ =
- this.model_.getOrCreateProcess(-32).getOrCreateThread(1);
- this.v8_timer_thread_.name = 'V8 Timers';
- this.v8_thread_ =
- this.model_.getOrCreateProcess(-32).getOrCreateThread(2);
- this.v8_thread_.name = 'V8';
-
- var lines = this.logData_.split('\n');
- for (var i = 0; i < lines.length; i++) {
- logreader.processLogLine(lines[i]);
- }
-
- // The processing of samples adds all the root stack frame to
- // this.root_stack_frame_. But, we don't want that stack frame in the real
- // model. So get rid of it.
- this.root_stack_frame_.removeAllChildren();
-
- function addSlices(slices, thread) {
- for (var i = 0; i < slices.length; i++) {
- var duration = slices[i].end - slices[i].start;
- var slice = new tr.model.ThreadSlice('v8', slices[i].name,
- ColorScheme.getColorIdForGeneralPurposeString(slices[i].name),
- slices[i].start, {}, duration);
- thread.sliceGroup.pushSlice(slice);
- addSlices(slices[i].children, thread);
- }
- }
- addSlices(this.v8_stack_timeline_, this.v8_thread_);
- }
- };
-
- tr.importer.Importer.register(V8LogImporter);
-
- return {
- V8LogImporter: V8LogImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer_test.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer_test.html
deleted file mode 100644
index f4fb66f9d3b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/v8/v8_log_importer_test.html
+++ /dev/null
@@ -1,305 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/v8/v8_log_importer.html">
-
-<script>
-
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var V8LogImporter = tr.e.importer.v8.V8LogImporter;
-
- function newModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false
- });
- }
-
- test('tickEventInSharedLibrary', function() {
- var lines = [
- 'shared-library,"/usr/lib/libc++.1.dylib",0x99d8aae0,0x99dce729',
- 'tick,0x99d8aae4,12158,0,0x0,5'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var t = p.findAllThreadsNamed('V8')[0];
- assert.equal(t.samples.length, 1);
- assert.equal(t.samples[0].title, 'V8 PC');
- assert.equal(t.samples[0].start, 12158 / 1000);
- assert.equal(t.samples[0].leafStackFrame.title, '/usr/lib/libc++.1.dylib');
- });
-
- test('tickEventInGeneratedCode', function() {
- var lines = [
- 'shared-library,"/usr/lib/libc++.1.dylib",0x99d8aae0,0x99dce729',
- 'code-creation,Stub,2,0x5b60ce80,1259,"StringAddStub"',
- 'tick,0x5b60ce84,12158,0,0x0,5'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var threads = p.findAllThreadsNamed('V8');
- var t = threads[0];
- assert.equal(t.samples.length, 1);
- assert.equal(t.samples[0].leafStackFrame.title, 'StringAddStub');
- });
-
- test('tickEventInUknownCode', function() {
- var lines = [
- 'shared-library,"/usr/lib/libc++.1.dylib",0x99d8aae0,0x99dce729',
- 'code-creation,Stub,2,0x5b60ce80,1259,"StringAddStub"',
- 'tick,0x4,0xbff02f08,12158,0,0x0,5'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var threads = p.findAllThreadsNamed('V8');
- var t = threads[0];
- assert.equal(t.samples.length, 1);
- assert.equal(t.samples[0].leafStackFrame.title, 'Unknown');
- });
-
- test('tickEventWithStack', function() {
- var lines = [
- 'code-creation,LazyCompile,0,0x2905d0c0,1800,"InstantiateFunction native apinatives.js:26:29",0x56b19124,', // @suppress longLineCheck
- 'tick,0x7fc6fe34,528674,0,0x3,0,0x2905d304'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var t = p.findAllThreadsNamed('V8')[0];
- assert.equal(t.samples.length, 1);
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29'],
- t.samples[0].getUserFriendlyStackTrace());
- });
-
- test('twoTickEventsWithStack', function() {
- var lines = [
- 'code-creation,LazyCompile,0,0x2905d0c0,1800,"InstantiateFunction native apinatives.js:26:29",0x56b19124,', // @suppress longLineCheck
- 'tick,0x7fc6fe34,528674,0,0x3,0,0x2905d304',
- 'tick,0x7fd2a534,536213,0,0x81d8d080,0,0x2905d304'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var t = p.findAllThreadsNamed('V8')[0];
- assert.equal(t.samples.length, 2);
- assert.equal(t.samples[0].start, 528674 / 1000);
- assert.equal(t.samples[1].start, 536213 / 1000);
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29'],
- t.samples[0].getUserFriendlyStackTrace());
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29'],
- t.samples[1].getUserFriendlyStackTrace());
- assert.equal(t.samples[0].leafStackFrame,
- t.samples[1].leafStackFrame);
- });
-
- test('twoTickEventsWithTwoStackFrames', function() {
- var lines = [
- 'code-creation,LazyCompile,0,0x2904d560,876,"Instantiate native apinatives.js:9:21",0x56b190c8,~', // @suppress longLineCheck
- 'code-creation,LazyCompile,0,0x2905d0c0,1800,"InstantiateFunction native apinatives.js:26:29",0x56b19124,', // @suppress longLineCheck
- 'tick,0x7fc6fe34,528674,0,0x3,0,0x2905d304,0x2904d6e8',
- 'tick,0x7fd2a534,536213,0,0x81d8d080,0,0x2905d304,0x2904d6e8'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var t = p.findAllThreadsNamed('V8')[0];
- assert.equal(t.samples.length, 2);
-
- assert.equal(t.samples[0].start, 528674 / 1000);
- assert.equal(t.samples[1].start, 536213 / 1000);
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29',
- '~Instantiate native apinatives.js:9:21'],
- t.samples[0].getUserFriendlyStackTrace());
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29',
- '~Instantiate native apinatives.js:9:21'],
- t.samples[1].getUserFriendlyStackTrace());
-
- var childStackFrame = t.samples[0].leafStackFrame;
- assert.equal(childStackFrame, t.samples[1].leafStackFrame);
- assert.equal(childStackFrame.children.length, 0);
-
- var parentStackFrame = childStackFrame.parentFrame;
- assert.equal(parentStackFrame.children.length, 1);
- assert.equal(childStackFrame, parentStackFrame.children[0]);
-
- });
-
- test('threeTickEventsWithTwoStackFrames', function() {
- var lines = [
- 'code-creation,LazyCompile,0,0x2904d560,876,"Instantiate native apinatives.js:9:21",0x56b190c8,~', // @suppress longLineCheck
- 'code-creation,LazyCompile,0,0x2905d0c0,1800,"InstantiateFunction native apinatives.js:26:29",0x56b19124,', // @suppress longLineCheck
- 'tick,0x7fd7f75c,518328,0,0x81d86da8,2,0x2904d6e8',
- 'tick,0x7fc6fe34,528674,0,0x3,0,0x2905d304,0x2904d6e8',
- 'tick,0x7fd2a534,536213,0,0x81d8d080,0,0x2905d304,0x2904d6e8'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var threads = p.findAllThreadsNamed('V8');
-
- var t = threads[0];
- assert.equal(t.samples.length, 3);
- assert.equal(t.samples[0].start, 518328 / 1000);
- assert.equal(t.samples[1].start, 528674 / 1000);
- assert.equal(t.samples[2].start, 536213 / 1000);
- assert.deepEqual(
- ['~Instantiate native apinatives.js:9:21'],
- t.samples[0].getUserFriendlyStackTrace());
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29',
- '~Instantiate native apinatives.js:9:21'],
- t.samples[1].getUserFriendlyStackTrace());
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29',
- '~Instantiate native apinatives.js:9:21'],
- t.samples[2].getUserFriendlyStackTrace());
-
- var topLevelStackFrame = t.samples[0].leafStackFrame;
- var childStackFrame = t.samples[1].leafStackFrame;
- assert.equal(t.samples[2].leafStackFrame, childStackFrame);
- assert.equal(topLevelStackFrame, childStackFrame.parentFrame);
- assert.equal(topLevelStackFrame.children.length, 1);
- assert.equal(childStackFrame.children.length, 0);
- assert.equal(childStackFrame, topLevelStackFrame.children[0]);
- });
-
- test('twoSubStacks', function() {
- var lines = [
- 'code-creation,LazyCompile,0,0x2904d560,876,"Instantiate native apinatives.js:9:21",0x56b190c8,~', // @suppress longLineCheck
- 'code-creation,LazyCompile,0,0x2905d0c0,1800,"InstantiateFunction native apinatives.js:26:29",0x56b19124,', // @suppress longLineCheck
- 'tick,0x7fd7f75c,518328,0,0x81d86da8,2,0x2904d6e8',
- 'tick,0x7fc6fe34,528674,0,0x3,0,0x2905d304,0x2904d6e8',
- 'tick,0x7fd2a534,536213,0,0x81d8d080,0,0x2905d304,0x2904d6e8',
- 'code-creation,Script,0,0x2906a7c0,792,"http://www.google.com/",0x5b12fe50,~', // @suppress longLineCheck
- 'tick,0xb6f51d30,794049,0,0xb6f7b368,2,0x2906a914',
- 'tick,0xb6f51d30,799145,0,0xb6f7b368,0,0x2906a914'
- ];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var threads = p.findAllThreadsNamed('V8');
- var t = threads[0];
- assert.equal(t.samples.length, 5);
-
- assert.equal(t.samples[0].start, 518328 / 1000);
- assert.equal(t.samples[1].start, 528674 / 1000);
- assert.equal(t.samples[2].start, 536213 / 1000);
- assert.equal(t.samples[3].start, 794049 / 1000);
- assert.equal(t.samples[4].start, 799145 / 1000);
-
- assert.deepEqual(
- ['~Instantiate native apinatives.js:9:21'],
- t.samples[0].getUserFriendlyStackTrace());
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29',
- '~Instantiate native apinatives.js:9:21'],
- t.samples[1].getUserFriendlyStackTrace());
- assert.deepEqual(
- ['InstantiateFunction native apinatives.js:26:29',
- '~Instantiate native apinatives.js:9:21'],
- t.samples[2].getUserFriendlyStackTrace());
- assert.deepEqual(['~http://www.google.com/'],
- t.samples[3].getUserFriendlyStackTrace());
- assert.deepEqual(['~http://www.google.com/'],
- t.samples[4].getUserFriendlyStackTrace());
-
- var firsStackTopLevelStackFrame = t.samples[0].leafStackFrame;
- var firsStackChildStackFrame = t.samples[1].leafStackFrame;
- assert.equal(firsStackChildStackFrame, t.samples[2].leafStackFrame);
- assert.equal(firsStackTopLevelStackFrame,
- firsStackChildStackFrame.parentFrame);
- assert.equal(firsStackTopLevelStackFrame.children.length, 1);
- assert.equal(firsStackChildStackFrame.children.length, 0);
- assert.equal(firsStackChildStackFrame,
- firsStackTopLevelStackFrame.children[0]);
-
- var secondStackStackFrame = t.samples[3].leafStackFrame;
- assert.equal(secondStackStackFrame, t.samples[4].leafStackFrame);
- assert.equal(secondStackStackFrame.children.length, 0);
- assert.isUndefined(secondStackStackFrame.parentFrame);
- });
-
- test('timerEventSliceCreation', function() {
- var lines = ['timer-event,"V8.External",38189483,3'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var threads = p.findAllThreadsNamed('V8 Timers');
- assert.isDefined(threads);
- assert.equal(threads.length, 1);
- var t = threads[0];
- assert.equal(t.sliceGroup.length, 1);
- });
-
- test('processThreadCreation', function() {
- var lines = ['timer-event,"V8.External",38189483,3'];
- var m = newModel(lines.join('\n'));
- assert.isDefined(m);
- var p = m.processes[-32];
- assert.isDefined(p);
- var threads = p.findAllThreadsNamed('V8 Timers');
- assert.isDefined(threads);
- assert.equal(1, threads.length);
- var t = threads[0];
- assert.equal('V8 Timers', t.name);
- });
-
- test('canImport', function() {
- assert.isTrue(V8LogImporter.canImport(
- 'timer-event,"V8.External",38189483,3'));
- assert.isTrue(V8LogImporter.canImport('v8-version,4,3,66,0,0'));
- assert.isFalse(V8LogImporter.canImport(''));
- assert.isFalse(V8LogImporter.canImport([]));
- });
-
- test('CppSymbolsProcess', function() {
- var lines = [
- 'shared-library,"/usr/loca/v8/out/native/d8",0x00400000, 0x01860000',
- 'cpp,0x00600000,100,"v8::internal::Heap::AllocateByteArray"',
- 'cpp,0x00700000,100,"v8::internal::Utf8StringKey::AsHandle"',
- 'tick,0x00600010,121,0,0x0,5',
- 'tick,0x00700010,122,0,0x0,5',
- 'tick,0x00800010,123,0,0x0,5'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var t = p.findAllThreadsNamed('V8')[0];
- assert.equal(t.samples.length, 3);
- assert.equal(t.samples[0].leafStackFrame.title,
- 'v8::internal::Heap::AllocateByteArray /usr/loca/v8/out/native/d8'); // @suppress longLineCheck
- assert.equal(t.samples[1].leafStackFrame.title,
- 'v8::internal::Utf8StringKey::AsHandle /usr/loca/v8/out/native/d8'); // @suppress longLineCheck
- assert.equal(t.samples[2].leafStackFrame.title,
- '/usr/loca/v8/out/native/d8');
- });
-
- test('CppSymbolsWithJsStack', function() {
- var lines = [
- 'shared-library,"/usr/loca/v8/out/native/d8",0x00400000, 0x01860000',
- 'cpp,0x00600000,100,"v8::internal::Heap::AllocateByteArray"',
- 'cpp,0x00700000,100,"v8::internal::Utf8StringKey::AsHandle"',
- 'code-creation,LazyCompile,0,0x2905d0c0,1800,"InstantiateFunction native apinatives.js:26:29",0x56b19124,', // @suppress longLineCheck
- 'tick,0x00700010,1,0,0x3,0,0x2905d304',
- 'tick,0x00600010,3,0,0x3,0,0x2905d306',
- 'tick,0x00800010,5,0,0x3,0,0x2905d306',
- 'tick,0x01860010,5,0,0x3,0,0x2905d306'];
- var m = newModel(lines.join('\n'));
- var p = m.processes[-32];
- var t = p.findAllThreadsNamed('V8')[0];
- assert.equal(t.samples.length, 4);
- assert.deepEqual(t.samples[0].stackTrace.map(r => r.title), [
- 'v8::internal::Utf8StringKey::AsHandle /usr/loca/v8/out/native/d8',
- 'InstantiateFunction native apinatives.js:26:29'
- ]);
- assert.deepEqual(t.samples[1].stackTrace.map(r => r.title), [
- 'v8::internal::Heap::AllocateByteArray /usr/loca/v8/out/native/d8',
- 'InstantiateFunction native apinatives.js:26:29'
- ]);
- assert.deepEqual(t.samples[2].stackTrace.map(r => r.title), [
- '/usr/loca/v8/out/native/d8',
- 'InstantiateFunction native apinatives.js:26:29'
- ]);
- assert.deepEqual(t.samples[3].stackTrace.map(r => r.title), [
- 'InstantiateFunction native apinatives.js:26:29'
- ]);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/importer/zip_importer.html b/chromium/third_party/catapult/tracing/tracing/extras/importer/zip_importer.html
deleted file mode 100644
index 9f1a2aa95b0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/importer/zip_importer.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/importer/jszip.html">
-<link rel="import" href="/tracing/extras/importer/gzip_importer.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview ZipImporter inflates zip compressed data and passes it along
- * to an actual importer.
- */
-tr.exportTo('tr.e.importer', function() {
- function ZipImporter(model, eventData) {
- if (eventData instanceof ArrayBuffer)
- eventData = new Uint8Array(eventData);
- this.model_ = model;
- this.eventData_ = eventData;
- }
-
- /**
- * @param {eventData} string Possibly zip compressed data.
- * @return {boolean} Whether eventData looks like zip compressed data.
- */
- ZipImporter.canImport = function(eventData) {
- var header;
- if (eventData instanceof ArrayBuffer)
- header = new Uint8Array(eventData.slice(0, 2));
- else if (typeof(eventData) === 'string' || eventData instanceof String)
- header = [eventData.charCodeAt(0), eventData.charCodeAt(1)];
- else
- return false;
- return header[0] === 'P'.charCodeAt(0) && header[1] === 'K'.charCodeAt(0);
- };
-
- ZipImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'ZipImporter';
- },
-
- isTraceDataContainer: function() {
- return true;
- },
-
- extractSubtraces: function() {
- var zip = new JSZip(this.eventData_);
- var subtraces = [];
- for (var idx in zip.files)
- subtraces.push(zip.files[idx].asBinary());
- return subtraces;
- }
- };
-
- tr.importer.Importer.register(ZipImporter);
-
- return {
- ZipImporter: ZipImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/lean_config.html b/chromium/third_party/catapult/tracing/tracing/extras/lean_config.html
deleted file mode 100644
index b39e51073d9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/lean_config.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-The lean config is just enough to import uncompressed, trace-event-formatted
-json blobs.
--->
-
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/measure/measure.html b/chromium/third_party/catapult/tracing/tracing/extras/measure/measure.html
deleted file mode 100644
index 05836554eda..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/measure/measure.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/measure/measure_async_slice.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice.html b/chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice.html
deleted file mode 100644
index 7f951abd17e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/model/async_slice.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.measure', function() {
- var AsyncSlice = tr.model.AsyncSlice;
-
- function MeasureAsyncSlice() {
- this.groupTitle_ = 'Ungrouped Measure';
- var matched = /([^\/:]+):([^\/:]+)\/?(.*)/.exec(arguments[1]);
- if (matched !== null) {
- arguments[1] = matched[2];
- this.groupTitle_ = matched[1];
- }
- AsyncSlice.apply(this, arguments);
- }
-
- MeasureAsyncSlice.prototype = {
- __proto__: AsyncSlice.prototype,
-
- get viewSubGroupTitle() {
- return this.groupTitle_;
- },
-
- get title() {
- return this.title_;
- },
-
- set title(title) {
- this.title_ = title;
- }
- };
-
- AsyncSlice.subTypes.register(
- MeasureAsyncSlice,
- {
- categoryParts: ['blink.user_timing']
- });
-
- return {
- MeasureAsyncSlice: MeasureAsyncSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice_test.html b/chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice_test.html
deleted file mode 100644
index 6b534b91b85..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/measure/measure_async_slice_test.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/measure/measure.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AsyncSlice = tr.model.AsyncSlice;
- var MeasureAsyncSlice = tr.e.measure.MeasureAsyncSlice;
-
- test('basic', function() {
- var s = new MeasureAsyncSlice(
- 'blink.user_timing', 'createImports', 7, 0, {});
- s.duration = 100;
-
- assert.equal(AsyncSlice.subTypes.getConstructor(
- 'blink.user_timing', 'createImports'),
- MeasureAsyncSlice);
- assert.equal(s.viewSubGroupTitle, 'Ungrouped Measure');
- });
-
- test('import', function() {
- var events = [
- {name: 'createImports', args: {}, pid: 1, ts: 100,
- cat: 'blink.user_timing', tid: 2, ph: 'b', id: 71},
- {name: 'createImports', args: {}, pid: 1, ts: 200,
- cat: 'blink.user_timing', tid: 2, ph: 'e', id: 71}
- ];
- var m = tr.c.TestUtils.newModelWithEvents([events]);
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- assert.equal(t2.asyncSliceGroup.length, 1);
- assert.instanceOf(t2.asyncSliceGroup.slices[0], MeasureAsyncSlice);
- });
-
- test('groupMeasureAsyncSlice', function() {
- var events = [
- {name: 'createImports', args: {}, pid: 1, ts: 100,
- cat: 'blink.user_timing', tid: 2, ph: 'b', id: 71},
- {name: 'createImports', args: {}, pid: 1, ts: 200,
- cat: 'blink.user_timing', tid: 2, ph: 'e', id: 71},
- {name: 'runAutoClosers', args: {}, pid: 1, ts: 210,
- cat: 'blink.user_timing', tid: 2, ph: 'b', id: 72},
- {name: 'runAutoClosers', args: {}, pid: 1, ts: 310,
- cat: 'blink.user_timing', tid: 2, ph: 'e', id: 72}
- ];
- var m = tr.c.TestUtils.newModelWithEvents([events]);
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- assert.equal(t2.asyncSliceGroup.length, 2);
- assert.equal(t2.asyncSliceGroup.slices[0].title, 'createImports');
- assert.equal(t2.asyncSliceGroup.slices[1].title, 'runAutoClosers');
- assert.instanceOf(t2.asyncSliceGroup.slices[0], MeasureAsyncSlice);
- assert.instanceOf(t2.asyncSliceGroup.slices[1], MeasureAsyncSlice);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/net/net.html b/chromium/third_party/catapult/tracing/tracing/extras/net/net.html
deleted file mode 100644
index 3a246c930c0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/net/net.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/net/net_async_slice.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice.html b/chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice.html
deleted file mode 100644
index 948316da1ed..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/model/async_slice.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.net', function() {
- var AsyncSlice = tr.model.AsyncSlice;
-
- function NetAsyncSlice() {
- AsyncSlice.apply(this, arguments);
- this.url_ = undefined;
- this.byteCount_ = undefined;
- // Boolean variables indicating whether we have computed corresponding
- // fields. Computing these fields needs iteration through all sub-slices and
- // so recomputation will be costly.
- this.isTitleComputed_ = false;
- this.isUrlComputed_ = false;
- }
-
- NetAsyncSlice.prototype = {
- __proto__: AsyncSlice.prototype,
-
- get viewSubGroupTitle() {
- return 'NetLog';
- },
-
- get title() {
- if (this.isTitleComputed_ || !this.isTopLevel)
- return this.title_;
-
- if (this.url !== undefined && this.url.length > 0) {
- // Set the title so we do not have to recompute when it is redrawn.
- this.title_ = this.url;
- } else if (this.args !== undefined &&
- this.args.source_type !== undefined) {
- // We do not have a URL, use the source type as the title.
- this.title_ = this.args.source_type;
- }
- this.isTitleComputed_ = true;
- return this.title_;
- },
-
- set title(title) {
- this.title_ = title;
- },
-
- // A recursive helper function that gets the url param of a slice or its
- // nested subslices if there is one.
- get url() {
- if (this.isUrlComputed_)
- return this.url_;
- if (this.args !== undefined && this.args.params !== undefined &&
- this.args.params.url !== undefined) {
- this.url_ = this.args.params.url;
- } else if (this.subSlices !== undefined && this.subSlices.length > 0) {
- for (var i = 0; i < this.subSlices.length && ! this.url_; i++) {
- if (this.subSlices[i].url !== undefined)
- this.url_ = this.subSlices[i].url;
- }
- }
- this.isUrlComputed_ = true;
- return this.url_;
- },
-
- get byteCount() {
- if (this.byteCount_ !== undefined)
- return this.byteCount_;
-
- this.byteCount_ = 0;
- if ((this.originalTitle === 'URL_REQUEST_JOB_FILTERED_BYTES_READ' ||
- this.originalTitle === 'URL_REQUEST_JOB_BYTES_READ') &&
- this.args !== undefined && this.args.params !== undefined &&
- this.args.params.byte_count !== undefined) {
- this.byteCount_ = this.args.params.byte_count;
- }
- for (var i = 0; i < this.subSlices.length; i++) {
- this.byteCount_ += this.subSlices[i].byteCount;
- }
- return this.byteCount_;
- }
- };
-
- AsyncSlice.subTypes.register(
- NetAsyncSlice,
- {
- categoryParts: ['netlog', 'disabled-by-default-netlog']
- });
-
- return {
- NetAsyncSlice: NetAsyncSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice_test.html b/chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice_test.html
deleted file mode 100644
index e8a2bd750fa..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/net/net_async_slice_test.html
+++ /dev/null
@@ -1,194 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/extras/net/net.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AsyncSlice = tr.model.AsyncSlice;
- var NetAsyncSlice = tr.e.net.NetAsyncSlice;
-
- test('basic', function() {
- var s = new NetAsyncSlice('netlog', 'HTTP_STREAM_JOB', 7, 0, {});
- s.duration = 100;
-
- assert.equal(
- AsyncSlice.subTypes.getConstructor('netlog', 'HTTP_STREAM_JOB'),
- NetAsyncSlice);
- assert.equal(s.viewSubGroupTitle, 'NetLog');
- });
-
- test('import', function() {
- var events = [
- {name: 'HTTP_STREAM_JOB', args: {}, pid: 1, ts: 100, cat: 'netlog', tid: 2, ph: 'b', id: 71}, // @suppress longLineCheck
- {name: 'HTTP_STREAM_JOB', args: {}, pid: 1, ts: 200, cat: 'netlog', tid: 2, ph: 'e', id: 71} // @suppress longLineCheck
- ];
- var m = tr.c.TestUtils.newModelWithEvents([events]);
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- assert.equal(t2.asyncSliceGroup.length, 1);
- assert.instanceOf(t2.asyncSliceGroup.slices[0], NetAsyncSlice);
- });
-
- test('ExposeURLBasic', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1,
- {params: {url: 'https://google.com'},
- source_type: 'b'}, 0, true);
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- // URL is exposed as the title of the parent slice.
- assert.equal(slice.title, 'https://google.com');
- assert.equal(slice.url, 'https://google.com');
- });
-
- test('ExposeURLNested', function() {
- var slice = new NetAsyncSlice(
- '', 'a', 0, 1, {params: {}, source_type: 'HELLO'}, 1, true);
- var childSlice = new NetAsyncSlice('', 'b', 0, 1,
- {params: {url: 'http://test.url'}});
- slice.subSlices = [childSlice];
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- assert.isFalse(childSlice.isTopLevel);
- // URL is exposed as the title of the parent slice.
- assert.equal(slice.title, 'http://test.url');
- assert.equal(slice.title, 'http://test.url');
- assert.equal(childSlice.title, 'b');
- assert.equal(childSlice.url, 'http://test.url');
- });
-
- test('ExposeURLNestedNoURL', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1, {params: {}}, 1, true);
- var childSlice = new NetAsyncSlice('', 'b', 0, 1, {params: {}});
- slice.subSlices = [childSlice];
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- assert.isFalse(childSlice.isTopLevel);
- // URL is exposed as the title of the parent slice.
- assert.equal(slice.title, 'a');
- assert.equal(slice.url, undefined);
- assert.equal(childSlice.title, 'b');
- assert.equal(childSlice.url, undefined);
- });
-
- test('ExposeURLNestedBothChildrenHaveURL', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1, {params: {}}, 1, true);
- var childSlice1 = new NetAsyncSlice('', 'b', 0, 1,
- {params: {url: 'http://test.url.net'}});
- var childSlice2 = new NetAsyncSlice('', 'c', 0, 1,
- {params: {url: 'http://test.url.com'}});
- slice.subSlices = [childSlice1, childSlice2];
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- assert.isFalse(childSlice1.isTopLevel);
- assert.isFalse(childSlice2.isTopLevel);
- // Parent should take the first url param that it finds.
- assert.equal(slice.title, 'http://test.url.net');
- assert.equal(childSlice1.title, 'b');
- assert.equal(childSlice2.title, 'c');
- });
-
- test('ExposeURLNestedBothParentAndChildHaveURL', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1,
- {params: {url: 'parent123.url.com'}}, 1,
- true);
- var childSlice1 = new NetAsyncSlice('', 'b', 0, 1,
- {params: {url: 'http://test.url.net'}});
- var childSlice2 = new NetAsyncSlice('', 'c', 0, 1);
-
- slice.subSlices = [childSlice1, childSlice2];
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- assert.isFalse(childSlice1.isTopLevel);
- assert.isFalse(childSlice2.isTopLevel);
- // Parent should take its own url param if there is one.
- assert.equal(slice.title, 'parent123.url.com');
- assert.equal(childSlice1.title, 'b');
- assert.equal(childSlice2.title, 'c');
- });
-
- test('ExposeURLDoNotComputeUrlTwice', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1, {params: {}}, 1, true);
- var childSlice1 = new NetAsyncSlice('', 'b', 0, 1,
- {params: {url: 'http://test.url.net'}});
- var childSlice2 = new NetAsyncSlice('', 'c', 0, 1);
-
- slice.subSlices = [childSlice1, childSlice2];
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- assert.isFalse(childSlice1.isTopLevel);
- assert.isFalse(childSlice2.isTopLevel);
- // Parent should take its child's url param.
- assert.equal(slice.title, 'http://test.url.net');
- assert.equal(childSlice1.title, 'b');
- assert.equal(childSlice2.title, 'c');
- // Now if we change the url param of the child, the parent's title should
- // remain the same. We do not recompute.
- childSlice1.args.params.url = 'example.com';
- assert.equal(slice.title, 'http://test.url.net');
- assert.equal(childSlice1.title, 'b');
- assert.equal(childSlice2.title, 'c');
- });
-
- test('ExposeSourceTypeAsTitle', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1,
- {params: {}, source_type: 'UDP_SOCKET'}, 1,
- true);
- var childSlice1 = new NetAsyncSlice('', 'b', 0, 1,
- {params: {}, source_type: 'SOCKET'});
- var childSlice2 = new NetAsyncSlice('', 'c', 0, 1);
-
- slice.subSlices = [childSlice1, childSlice2];
- // Make sure isTopLevel is populated in the constructor.
- assert.isTrue(slice.isTopLevel);
- assert.isFalse(childSlice1.isTopLevel);
- assert.isFalse(childSlice2.isTopLevel);
- // Parent should take its own source_type.
- assert.equal(slice.title, 'UDP_SOCKET');
- assert.equal(childSlice1.title, 'b');
- assert.equal(childSlice2.title, 'c');
- });
-
- test('ByteCountBasic', function() {
- var slice = new NetAsyncSlice('', 'URL_REQUEST_JOB_BYTES_READ', 0, 1,
- {params: {byte_count: 12}}, 0, true);
- assert.equal(slice.byteCount, 12);
- });
-
- test('NoByteCount', function() {
- var slice = new NetAsyncSlice('', 'a', 0, 1, {}, 0, true);
- assert.equal(slice.byteCount, 0);
- });
-
- test('ByteCountNested', function() {
- var slice = new NetAsyncSlice('', 'URL_REQUEST_JOB_FILTERED_BYTES_READ',
- 0, 1, {params: {byte_count: 12}}, 0, true);
- var childSlice = new NetAsyncSlice('', 'URL_REQUEST_JOB_BYTES_READ', 0, 1,
- {params: {byte_count: 50}});
- slice.subSlices = [childSlice];
- assert.equal(slice.byteCount, 62);
- assert.equal(childSlice.byteCount, 50);
- });
-
- test('ByteCountTwoChildren', function() {
- var slice = new NetAsyncSlice('', 'URL_REQUEST_JOB_FILTERED_BYTES_READ',
- 0, 1, {params: {byte_count: 12}}, 0, true);
- var childSlice1 = new NetAsyncSlice('', 'URL_REQUEST_JOB_BYTES_READ', 0, 1,
- {params: {byte_count: 50}});
- var childSlice2 = new NetAsyncSlice('', 'URL_REQUEST_JOB_BYTES_READ', 0, 1,
- {params: {byte_count: 20}});
- slice.subSlices = [childSlice1, childSlice2];
- assert.equal(slice.byteCount, 82);
- assert.equal(childSlice1.byteCount, 50);
- assert.equal(childSlice2.byteCount, 20);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/system_stats/system_stats_snapshot.html b/chromium/third_party/catapult/tracing/tracing/extras/system_stats/system_stats_snapshot.html
deleted file mode 100644
index 46c7259d742..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/system_stats/system_stats_snapshot.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.system_stats', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * @constructor
- */
- function SystemStatsSnapshot(objectInstance, ts, args) {
- ObjectSnapshot.apply(this, arguments);
- this.objectInstance = objectInstance;
- this.ts = ts;
- this.args = args;
- this.stats = args;
- }
-
- SystemStatsSnapshot.prototype = {
- __proto__: ObjectSnapshot.prototype,
-
- initialize: function() {
- if (this.args.length === 0)
- throw new Error('No system stats snapshot data.');
- this.stats_ = this.args;
- },
-
- getStats: function() {
- return this.stats_;
- },
-
- setStats: function(stats) {
- this.stats_ = stats;
- }
- };
-
- ObjectSnapshot.subTypes.register(
- SystemStatsSnapshot,
- {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'});
-
- return {
- SystemStatsSnapshot: SystemStatsSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/systrace_config.html b/chromium/third_party/catapult/tracing/tracing/extras/systrace_config.html
deleted file mode 100644
index aac08d55927..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/systrace_config.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/android/android_auditor.html">
-<link rel="import" href="/tracing/extras/importer/android/event_log_importer.html">
-<link rel="import" href="/tracing/extras/importer/battor_importer.html">
-<link rel="import" href="/tracing/extras/importer/ddms_importer.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/extras/vsync/vsync_auditor.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/model.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/context.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/context.html
deleted file mode 100644
index 69334576c59..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/context.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function Context() {
- this.event = undefined;
- this.ancestors = [];
- }
-
- Context.prototype = {
- push: function(event) {
- var ctx = new Context();
- ctx.ancestors = this.ancestors.slice();
- ctx.ancestors.push(event);
- return ctx;
- },
-
- pop: function(event) {
- var ctx = new Context();
- ctx.event = this.ancestors[this.ancestors.length - 1];
- ctx.ancestors = this.ancestors.slice(0, this.ancestors.length - 1);
- return ctx;
- }
- };
-
- return {
- Context: Context
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter.html
deleted file mode 100644
index 17cf644aa70..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_object.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function Filter() {
- tr.c.ScriptingObject.call(this);
- }
-
- Filter.normalizeFilterExpression = function(filterExpression) {
- // Shortcut: naked strings and regexps can be used to match against slice
- // titles.
- if (filterExpression instanceof String ||
- typeof(filterExpression) === 'string' ||
- filterExpression instanceof RegExp) {
- var filter = new tr.e.tquery.FilterHasTitle(filterExpression);
- return filter;
- }
- return filterExpression;
- };
-
- Filter.prototype = {
- __proto__: tr.c.ScriptingObject.prototype,
-
- evaluate: function(context) {
- throw new Error('Not implemented');
- },
-
- matchValue_: function(value, expected) {
- if (expected instanceof RegExp)
- return expected.test(value);
- else if (expected instanceof Function)
- return expected(value);
- return value === expected;
- }
- };
-
- return {
- Filter: Filter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_all_of.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_all_of.html
deleted file mode 100644
index 07341d5b349..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_all_of.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterAllOf(opt_subExpressions) {
- tr.e.tquery.Filter.call(this);
- this.subExpressions = opt_subExpressions || [];
- }
-
- FilterAllOf.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- set subExpressions(exprs) {
- this.subExpressions_ = [];
- for (var i = 0; i < exprs.length; i++) {
- this.subExpressions_.push(
- tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));
- }
- },
-
- get subExpressions() {
- return this.subExpressions_;
- },
-
- evaluate: function(context) {
- if (!this.subExpressions.length)
- return true;
- for (var i = 0; i < this.subExpressions.length; i++) {
- if (!this.subExpressions[i].evaluate(context))
- return false;
- }
- return true;
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function() {
- var exprs = [];
- for (var i = 0; i < arguments.length; i++) {
- exprs.push(arguments[i]);
- }
- return new FilterAllOf(exprs);
- },
- {
- name: 'allOf'
- }
- );
- return {
- FilterAllOf: FilterAllOf
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_any_of.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_any_of.html
deleted file mode 100644
index 4118d40e3e5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_any_of.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-<link rel="import" href="/tracing/extras/tquery/filter_not.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterAnyOf(opt_subExpressions) {
- tr.e.tquery.Filter.call(this);
- this.subExpressions = opt_subExpressions || [];
- };
-
- FilterAnyOf.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- set subExpressions(exprs) {
- this.subExpressions_ = [];
- for (var i = 0; i < exprs.length; i++) {
- this.subExpressions_.push(
- tr.e.tquery.Filter.normalizeFilterExpression(exprs[i]));
- }
- },
-
- get subExpressions() {
- return this.subExpressions_;
- },
-
- evaluate: function(context) {
- if (!this.subExpressions.length)
- return true;
- for (var i = 0; i < this.subExpressions.length; i++) {
- if (this.subExpressions[i].evaluate(context))
- return true;
- }
- return false;
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function() {
- var exprs = Array.prototype.slice.call(arguments);
- return new FilterAnyOf(exprs);
- },
- {
- name: 'anyOf'
- }
- );
- tr.c.ScriptingObjectRegistry.register(
- function() {
- var exprs = Array.prototype.slice.call(arguments);
- return new tr.e.tquery.FilterNot(new FilterAnyOf(exprs));
- },
- {
- name: 'noneOf'
- }
- );
- return {
- FilterAnyOf: FilterAnyOf
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_ancestor.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_ancestor.html
deleted file mode 100644
index c8501c00123..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_ancestor.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterHasAncestor(opt_subExpression) {
- this.subExpression = opt_subExpression;
- };
-
- FilterHasAncestor.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- set subExpression(expr) {
- this.subExpression_ = tr.e.tquery.Filter.normalizeFilterExpression(expr);
- },
-
- get subExpression() {
- return this.subExpression_;
- },
-
- evaluate: function(context) {
- if (!this.subExpression)
- return context.ancestors.length > 0;
- while (context.ancestors.length) {
- context = context.pop();
- if (this.subExpression.evaluate(context))
- return true;
- }
- return false;
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function(subExpression) {
- return new FilterHasAncestor(subExpression);
- },
- {
- name: 'hasAncestor'
- }
- );
- return {
- FilterHasAncestor: FilterHasAncestor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_duration.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_duration.html
deleted file mode 100644
index dd9b3ad4d5b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_duration.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterHasDuration(minValueOrExpected, opt_maxValue) {
- if (minValueOrExpected !== undefined && opt_maxValue !== undefined) {
- this.minValue = minValueOrExpected;
- this.maxValue = opt_maxValue;
- } else {
- this.expected = minValueOrExpected;
- }
- };
-
- FilterHasDuration.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- evaluate: function(context) {
- if (context.event.duration === undefined)
- return false;
- if (this.minValue !== undefined && this.maxValue !== undefined) {
- return context.event.duration >= this.minValue &&
- context.event.duration <= this.maxValue;
- }
- return this.matchValue_(context.event.duration, this.expected);
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function(minValueOrExpected, opt_maxValue) {
- return new FilterHasDuration(minValueOrExpected, opt_maxValue);
- },
- {
- name: 'hasDuration'
- }
- );
- return {
- FilterHasDuration: FilterHasDuration
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_title.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_title.html
deleted file mode 100644
index b636da17726..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_has_title.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterHasTitle(expected) {
- tr.e.tquery.Filter.call(this);
- this.expected = expected;
- }
-
- FilterHasTitle.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- evaluate: function(context) {
- return this.matchValue_(context.event.title, this.expected);
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function(expected) {
- var filter = new tr.e.tquery.FilterHasTitle(expected);
- return filter;
- },
- {
- name: 'hasTitle'
- }
- );
-
- return {
- FilterHasTitle: FilterHasTitle
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_is_top_level.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_is_top_level.html
deleted file mode 100644
index 44c04e68edf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_is_top_level.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterIsTopLevel(opt_subExpression) {
- this.subExpression = opt_subExpression;
- }
-
- FilterIsTopLevel.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- set subExpression(expr) {
- this.subExpression_ = tr.e.tquery.Filter.normalizeFilterExpression(expr);
- },
-
- get subExpression() {
- return this.subExpression_;
- },
-
- evaluate: function(context) {
- if (context.ancestors.length > 0)
- return false;
- if (!this.subExpression)
- return true;
- return this.subExpression.evaluate(context);
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function(subExpression) {
- return new FilterIsTopLevel(subExpression);
- },
- {
- name: 'isTopLevel'
- }
- );
- return {
- FilterIsTopLevel: FilterIsTopLevel
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_not.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_not.html
deleted file mode 100644
index 64a4be9bb53..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/filter_not.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/extras/tquery/filter.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function FilterNot(subExpression) {
- tr.e.tquery.Filter.call(this);
- this.subExpression = subExpression;
- }
-
- FilterNot.prototype = {
- __proto__: tr.e.tquery.Filter.prototype,
-
- set subExpression(expr) {
- this.subExpression_ = tr.e.tquery.Filter.normalizeFilterExpression(expr);
- },
-
- get subExpression() {
- return this.subExpression_;
- },
-
- evaluate: function(context) {
- return !this.subExpression.evaluate(context);
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- function() {
- var exprs = Array.prototype.slice.call(arguments);
- if (exprs.length !== 1)
- throw new Error('not() must have exactly one subexpression');
- return new FilterNot(exprs[0]);
- },
- {
- name: 'not'
- }
- );
- return {
- FilterNot: FilterNot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery.html
deleted file mode 100644
index 5ea95d9a22f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery.html
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/core/scripting_object.html">
-<link rel="import" href="/tracing/extras/tquery/context.html">
-<link rel="import" href="/tracing/extras/tquery/filter_all_of.html">
-<link rel="import" href="/tracing/extras/tquery/filter_any_of.html">
-<link rel="import" href="/tracing/extras/tquery/filter_has_ancestor.html">
-<link rel="import" href="/tracing/extras/tquery/filter_has_duration.html">
-<link rel="import" href="/tracing/extras/tquery/filter_has_title.html">
-<link rel="import" href="/tracing/extras/tquery/filter_is_top_level.html">
-<link rel="import" href="/tracing/extras/tquery/filter_not.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.tquery', function() {
- function addEventTreeToSelection(selection, event) {
- selection.push(event);
- if (!event.subSlices)
- return;
- event.subSlices.forEach(
- addEventTreeToSelection.bind(undefined, selection));
- }
-
- function TQuery(model) {
- tr.c.ScriptingObject.call(this);
-
- this.model_ = model;
- this.parent_ = undefined;
- this.filterExpression_ = undefined;
- // Memoized filtering result.
- this.selection_ = undefined;
- };
-
- TQuery.prototype = {
- __proto__: tr.c.ScriptingObject.prototype,
-
- onModelChanged: function(model) {
- this.model_ = model;
- this.selection_ = undefined;
- },
-
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- // Append a new filter expression to this query and return a query node
- // that represents the result.
- filter: function(filterExpression) {
- var result = new TQuery(this.model_);
- result.parent_ = this;
- result.filterExpression_ =
- tr.e.tquery.Filter.normalizeFilterExpression(filterExpression);
- return result;
- },
-
- // Creates a graph of {Task} objects which will compute the selections for
- // this filter object and all of its parents. The return value is an object
- // with the following fields:
- // - rootTask: {Task} which should be executed to kick off processing for
- // the entire task graph.
- // - lastTask: The final {Task} of the graph. Can be used by the caller to
- // enqueue additional processing at the end.
- // - lastNode: The last filter object in the task. It's selection property
- // will contain the filtering result once |finalTask|
- // completes.
- createFilterTaskGraph_: function() {
- // List of nodes in order from the current one to the root.
- var nodes = [];
- var node = this;
- while (node !== undefined) {
- nodes.push(node);
- node = node.parent_;
- }
-
- var rootTask = new tr.b.Task();
- var lastTask = rootTask;
- for (var i = nodes.length - 1; i >= 0; i--) {
- var node = nodes[i];
- // Reuse any memoized result.
- if (node.selection_ !== undefined)
- continue;
- node.selection_ = new tr.model.EventSet();
- if (node.parent_ === undefined) {
- // If this is the root, start by collecting all objects from the
- // model.
- lastTask = lastTask.after(
- this.selectEverythingAsTask_(node.selection_));
- } else {
- // Otherwise execute the filter expression for this node and fill
- // in its selection.
- var prevNode = nodes[i + 1];
- lastTask = this.createFilterTaskForNode_(lastTask, node, prevNode);
- }
- }
- return {rootTask: rootTask, lastTask: lastTask, lastNode: node};
- },
-
- createFilterTaskForNode_: function(lastTask, node, prevNode) {
- return lastTask.after(function() {
- // TODO(skyostil): Break into subtasks.
- node.evaluateFilterExpression_(
- prevNode.selection_, node.selection_);
- }, this);
- },
-
- // Applies the result of a filter expression for a given event and all
- // of its subslices and adds the matching events to an output selection.
- evaluateFilterExpression_: function(inputSelection, outputSelection) {
- var seenEvents = {};
- inputSelection.forEach(function(event) {
- var context = new tr.e.tquery.Context();
- context.event = event;
- this.evaluateFilterExpressionForEvent_(
- context, inputSelection, outputSelection, seenEvents);
- }.bind(this));
- },
-
- evaluateFilterExpressionForEvent_: function(
- context, inputSelection, outputSelection, seenEvents) {
- var event = context.event;
- if (inputSelection.contains(event) && !seenEvents[event.guid]) {
- seenEvents[event.guid] = true;
- if (!this.filterExpression_ ||
- this.filterExpression_.evaluate(context))
- outputSelection.push(event);
- }
- if (!event.subSlices)
- return;
- context = context.push(event);
- for (var i = 0; i < event.subSlices.length; i++) {
- context.event = event.subSlices[i];
- this.evaluateFilterExpressionForEvent_(
- context, inputSelection, outputSelection, seenEvents);
- }
- },
-
- // Returns a task that fills the given selection with everything in the
- // model.
- selectEverythingAsTask_: function(selection) {
- var filterTask = new tr.b.Task();
- for (var container of this.model_.getDescendantEventContainers()) {
- filterTask.subTask(() => {
- for (var event of container.childEvents())
- addEventTreeToSelection(selection, event);
- }, this);
- }
- return filterTask;
- },
-
- // Returns a promise which will resolve into a {EventSet} representing the
- // result of this query.
- ready: function() {
- return new Promise(function(resolve, reject) {
- var graph = this.createFilterTaskGraph_();
- graph.lastTask = graph.lastTask.after(function() {
- resolve(this.selection_);
- }, this);
- tr.b.Task.RunWhenIdle(graph.rootTask);
- }.bind(this));
- },
-
- get selection() {
- if (this.selection_ === undefined) {
- var graph = this.createFilterTaskGraph_();
- tr.b.Task.RunSynchronously(graph.rootTask);
- }
- return this.selection_;
- }
- };
- tr.c.ScriptingObjectRegistry.register(
- new TQuery(),
- {
- name: '$t'
- }
- );
-
- return {
- TQuery: TQuery
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery_test.html b/chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery_test.html
deleted file mode 100644
index a9bd4733009..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/tquery/tquery_test.html
+++ /dev/null
@@ -1,243 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/tquery/tquery.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createTestModel(sliceCount) {
- var slices = [];
- for (var i = 0; i < sliceCount; i++)
- slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 2}));
- return createTestModelWithSlices(slices);
- }
-
- function createTestModelWithSlices(slices) {
- var model = new tr.Model();
- var cpu = model.kernel.getOrCreateCpu(1);
- for (var i = 0; i < slices.length; i++)
- cpu.slices.push(slices[i]);
- return model;
- }
-
- function getScriptObject(name) {
- var typeInfos = tr.c.ScriptingObjectRegistry.getAllRegisteredTypeInfos();
- for (var i = 0; i < typeInfos.length; i++) {
- if (typeInfos[i].metadata.name === name) {
- return typeInfos[i].constructor;
- }
- }
- }
-
- test('tqueryAsyncSelection', function() {
- var model = createTestModel(3);
- var tquery = new tr.e.tquery.TQuery(model);
-
- return tquery.ready().then(function(selection) {
- assert.equal(selection.length, 3);
- });
- });
-
- test('tquerySyncSelection', function() {
- var model = createTestModel(3);
- var tquery = new tr.e.tquery.TQuery(model);
-
- assert.equal(tquery.selection.length, 3);
-
- // Selection should get reset when the model changes.
- var model = createTestModel(5);
- tquery.onModelChanged(model);
- assert.equal(tquery.selection.length, 5);
- });
-
- test('tqueryPassThroughFiltering', function() {
- var model = new createTestModel(3);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter().filter().selection;
- assert.equal(result.length, 3);
- });
-
- test('tqueryFilterHasTitle', function() {
- var hasTitle = getScriptObject('hasTitle');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a'},
- {guid: 2, title: 'b'},
- {guid: 3, title: 'c'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(hasTitle('a')).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 1);
-
- var result = tquery.filter('b').selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 2);
-
- var result = tquery.filter(/^c$/).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 3);
- });
-
- test('tqueryFilterHasAncestor', function() {
- var hasAncestor = getScriptObject('hasAncestor');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a'},
- {guid: 2, title: 'b', subSlices: [{guid: 4}]},
- {guid: 3, title: 'c'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(hasAncestor('b')).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 4);
-
- var result = tquery.filter(hasAncestor()).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 4);
-
- var result = tquery.filter(hasAncestor('a')).selection;
- assert.equal(result.length, 0);
- });
-
- test('tqueryFilterAllOf', function() {
- var allOf = getScriptObject('allOf');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a1'},
- {guid: 2, title: 'b1'},
- {guid: 3, title: 'c1'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(allOf('a1')).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 1);
-
- var result = tquery.filter(allOf('a1', /1/)).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 1);
-
- var result = tquery.filter(allOf()).selection;
- assert.equal(result.length, 3);
- });
-
- test('tqueryFilterAnyOf', function() {
- var anyOf = getScriptObject('anyOf');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a'},
- {guid: 2, title: 'b'},
- {guid: 3, title: 'c'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(anyOf('a', 'b')).selection;
- assert.equal(result.length, 2);
- var nextGuid = 1;
- for (var event of result)
- assert.equal(event.guid, nextGuid++);
-
- var result = tquery.filter(anyOf('not there', 'a')).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 1);
-
- var result = tquery.filter(anyOf()).selection;
- assert.equal(result.length, 3);
- });
-
- test('tqueryFilterIsTopLevel', function() {
- var isTopLevel = getScriptObject('isTopLevel');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a'},
- {guid: 2, title: 'b', subSlices: [{guid: 4}]},
- {guid: 3, title: 'c'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(isTopLevel()).selection;
- assert.equal(result.length, 3);
- var nextGuid = 1;
- for (var event of result)
- assert.equal(event.guid, nextGuid++);
-
- var result = tquery.filter(isTopLevel('a')).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 1);
- });
-
- test('tqueryFilterHasDuration', function() {
- var hasDuration = getScriptObject('hasDuration');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a', duration: 1},
- {guid: 2, title: 'b', duration: 2},
- {guid: 3, title: 'c', duration: 3},
- {guid: 4, title: 'no duration'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(hasDuration(1.5, 2.5)).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 2);
-
- var result = tquery.filter(hasDuration(3, Infinity)).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 3);
-
- var result = tquery.filter(hasDuration(-1, 0)).selection;
- assert.equal(result.length, 0);
-
- var result = tquery.filter(hasDuration(function(d) {
- return d > 2;
- })).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 3);
- });
-
- test('tqueryFilterNot', function() {
- var not = getScriptObject('not');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a'},
- {guid: 2, title: 'b'},
- {guid: 3, title: 'c'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(not(/a/)).selection;
- assert.equal(result.length, 2);
- var nextGuid = 2;
- for (var event of result) {
- assert.equal(event.guid, nextGuid++);
- }
-
- // Test a not() without any subexpressions.
- assert.throws(function() { not(); });
-
- // Test a not() with too many subexpressions.
- assert.throws(function() { not(/a/, /b/); });
- });
-
- test('tqueryFilterNoneOf', function() {
- var noneOf = getScriptObject('noneOf');
- var model = createTestModelWithSlices([
- {guid: 1, title: 'a'},
- {guid: 2, title: 'b'},
- {guid: 3, title: 'c'}
- ]);
- var tquery = new tr.e.tquery.TQuery(model);
-
- var result = tquery.filter(noneOf(/a/, /b/)).selection;
- assert.equal(result.length, 1);
- assert.equal(tr.b.getOnlyElement(result).guid, 3);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/v8/v8_gc_stats_thread_slice.html b/chromium/third_party/catapult/tracing/tracing/extras/v8/v8_gc_stats_thread_slice.html
deleted file mode 100644
index 3de404f7f65..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/v8/v8_gc_stats_thread_slice.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.v8', function() {
- var ThreadSlice = tr.model.ThreadSlice;
-
- function V8GCStatsThreadSlice() {
- ThreadSlice.apply(this, arguments);
- this.liveObjects_ = JSON.parse(this.args['live']);
- delete this.args['live'];
- this.deadObjects_ = JSON.parse(this.args['dead']);
- delete this.args['dead'];
- }
-
- V8GCStatsThreadSlice.prototype = {
- __proto__: ThreadSlice.prototype,
-
- get liveObjects() {
- return this.liveObjects_;
- },
-
- get deadObjects() {
- return this.deadObjects_;
- }
- };
-
- ThreadSlice.subTypes.register(
- V8GCStatsThreadSlice,
- {
- categoryParts: ['disabled-by-default-v8.gc_stats'],
- name: 'v8 gc stats slice',
- pluralName: 'v8 gc stats slices'
- }
- );
-
- return {
- V8GCStatsThreadSlice: V8GCStatsThreadSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/v8/v8_thread_slice.html b/chromium/third_party/catapult/tracing/tracing/extras/v8/v8_thread_slice.html
deleted file mode 100644
index a0911d058b0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/v8/v8_thread_slice.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.e.v8', function() {
- var ThreadSlice = tr.model.ThreadSlice;
-
- function V8ThreadSlice() {
- ThreadSlice.apply(this, arguments);
- this.runtimeCallStats_ = undefined;
- }
-
- V8ThreadSlice.prototype = {
- __proto__: ThreadSlice.prototype,
-
- get runtimeCallStats() {
- if ('runtime-call-stats' in this.args) {
- this.runtimeCallStats_ = this.args['runtime-call-stats'];
- delete this.args['runtime-call-stats'];
- }
- return this.runtimeCallStats_;
- }
- };
-
- ThreadSlice.subTypes.register(
- V8ThreadSlice,
- {
- categoryParts: ['v8'],
- name: 'v8 slice',
- pluralName: 'v8 slices'
- }
- );
-
- return {
- V8ThreadSlice: V8ThreadSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/v8_config.html b/chromium/third_party/catapult/tracing/tracing/extras/v8_config.html
deleted file mode 100644
index b9ed173ba4f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/v8_config.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/v8/v8_thread_slice.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor.html b/chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor.html
deleted file mode 100644
index 2d450a953cc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/auditor.html">
-
-<script>
-'use strict';
-
-function filterDuplicateTimestamps(timestamps) {
- var dedupedTimestamps = [];
- var lastTs = 0;
- for (var ts of timestamps) {
- if (ts - lastTs >= 1) {
- dedupedTimestamps.push(ts);
- lastTs = ts;
- }
- }
- return dedupedTimestamps;
-}
-
-tr.exportTo('tr.e.audits', function() {
-
- var VSYNC_COUNTER_PRECISIONS = {
- // Android. Some versions have VSYNC split out into VSYNC-app and VSYNC-sf.
- // Requires "gfx" systrace category to be enabled.
- 'android.VSYNC-app': 15,
- 'android.VSYNC': 15
- };
-
- var VSYNC_SLICE_PRECISIONS = {
- // Android.
- 'RenderWidgetHostViewAndroid::OnVSync': 5,
- // Android. Very precise. Requires "gfx" systrace category to be enabled.
- 'VSYNC': 10,
- // Linux. Very precise. Requires "gpu" tracing category to be enabled.
- 'vblank': 10,
- // Mac. Derived from a Mac callback (CVDisplayLinkSetOutputCallback).
- 'DisplayLinkMac::GetVSyncParameters': 5
- };
-
- var BEGIN_FRAME_SLICE_PRECISION = {
- 'DisplayScheduler::BeginFrame': 10
- };
-
- /**
- * Auditor that analyzes the model and, if possible, adds data to it
- * indicating when vertical sync events took place.
- *
- * @constructor
- * @extends {tr.c.Auditor}
- */
- function VSyncAuditor(model) {
- tr.c.Auditor.call(this, model);
- };
-
- VSyncAuditor.prototype = {
- __proto__: tr.c.Auditor.prototype,
-
- runAnnotate: function() {
- this.model.device.vSyncTimestamps = this.findVSyncTimestamps(this.model);
- },
-
- /**
- * Returns an array of the most accurate VSync times available in the model.
- */
- findVSyncTimestamps: function(model) {
- var times = [];
-
- // Only keep the most precise VSync data.
- var maxPrecision = Number.NEGATIVE_INFINITY;
- var maxTitle = undefined;
-
- function useInstead(title, precisions) {
- var precision = precisions[title];
- if (precision === undefined)
- return false;
-
- if (title === maxTitle)
- return true;
-
- if (precision <= maxPrecision) {
- if (precision === maxPrecision) {
- console.warn('Encountered two different VSync events (' +
- maxTitle + ', ' + title + ') with the same precision, ' +
- 'ignoring the newer one (' + title + ')');
- }
- return false;
- }
- maxPrecision = precision;
- maxTitle = title;
- times = [];
-
- return true;
- }
-
- for (var pid in model.processes) {
- var process = model.processes[pid];
- // Traverse process counters.
- for (var cid in process.counters) {
- if (useInstead(cid, VSYNC_COUNTER_PRECISIONS)) {
- var counter = process.counters[cid];
- for (var i = 0; i < counter.series.length; i++) {
- var series = counter.series[i];
- Array.prototype.push.apply(times, series.timestamps);
- }
- }
- }
-
- // Traverse thread slices.
- for (var tid in process.threads) {
- var thread = process.threads[tid];
- for (var i = 0; i < thread.sliceGroup.slices.length; i++) {
- var slice = thread.sliceGroup.slices[i];
- if (useInstead(slice.title, VSYNC_SLICE_PRECISIONS))
- times.push(slice.start);
- // We need to check not only that we have a Scheduler::BeginFrame
- // event, but also that we have one that has a frame time associated
- // with it. Older versions of Scheduler::BeginFrame don't have one.
- else if (useInstead(slice.title, BEGIN_FRAME_SLICE_PRECISION) &&
- slice.args.args && slice.args.args.frame_time_us)
- times.push(slice.args.args.frame_time_us / 1000.0);
- }
- }
- }
- times.sort(function(x, y) { return x - y; });
- return filterDuplicateTimestamps(times);
- }
- };
-
- tr.c.Auditor.register(VSyncAuditor);
-
- return {
- VSyncAuditor: VSyncAuditor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor_test.html b/chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor_test.html
deleted file mode 100644
index 4672fe353eb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/extras/vsync/vsync_auditor_test.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/vsync/vsync_auditor.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var CounterSeries = tr.model.CounterSeries;
- var Model = tr.Model;
- var ThreadSlice = tr.model.ThreadSlice;
- var VSyncAuditor = tr.e.audits.VSyncAuditor;
-
- function testFindVSyncTimestamps(slices, counters, expectedTimes) {
- var model = buildModel(slices, counters);
- var auditor = new VSyncAuditor(model);
- assert.deepEqual(auditor.findVSyncTimestamps(model), expectedTimes);
- }
-
- function buildModel(slices, counters) {
- var model = new Model();
- var process = model.getOrCreateProcess(1);
- for (var i = 0; i < slices.length; i++) {
- var thread = process.getOrCreateThread(i);
- for (var j = 0; j < slices[i].length; j++)
- thread.sliceGroup.pushSlice(slices[i][j]);
- }
- for (var i = 0; i < counters.length; i++) {
- var counter = process.getOrCreateCounter(
- counters[i].category,
- counters[i].name);
- counter.addSeries(counters[i].series);
- }
- return model;
- }
-
- function buildSlice(title, time) {
- return new ThreadSlice('', title, 0, time, {});
- }
-
- function buildCounterSeries(name, timestamps) {
- var series = new CounterSeries(name, '');
- for (var i = 0; i < timestamps.length; i++)
- series.addCounterSample(timestamps[i], 1);
- return series;
- }
-
- test('findEmpty', function() {
- testFindVSyncTimestamps([], [], []);
- });
-
- test('findNoVsync', function() {
- testFindVSyncTimestamps([
- [buildSlice('MessageLoop::RunTask', 10),
- buildSlice('MessageLoop::RunTask', 20)],
- [buildSlice('MessageLoop::RunTask', 15)]
- ], [], []);
- });
-
- test('findOneVsync', function() {
- testFindVSyncTimestamps([[buildSlice('vblank', 42)]], [], [42]);
- });
-
- test('findMultipleVsyncs', function() {
- testFindVSyncTimestamps([
- [buildSlice('VSYNC', 1), buildSlice('MessageLoop::RunTask', 2)],
- [buildSlice('MessageLoop::RunTask', 3)],
- [buildSlice('MessageLoop::RunTask', 4), buildSlice('VSYNC', 5)],
- [buildSlice('VSYNC', 6), buildSlice('VSYNC', 7)]
- ], [], [1, 5, 6, 7]);
- });
-
- test('filterNearDuplicates', function() {
- testFindVSyncTimestamps([
- [buildSlice('VSYNC', 1), buildSlice('VSYNC', 1)],
- [buildSlice('VSYNC', 2), buildSlice('VSYNC', 2.1)],
- [buildSlice('VSYNC', 3), buildSlice('VSYNC', 4)],
- ], [], [1, 2, 3, 4]);
- });
-
- test('findMultipleAndroidVsyncs', function() {
- testFindVSyncTimestamps([
- [buildSlice('MessageLoop::RunTask', 2)],
- [buildSlice('MessageLoop::RunTask', 3)],
- [buildSlice('MessageLoop::RunTask', 4)]
- ],
- [
- {
- category: 'android',
- name: 'VSYNC-app',
- series: buildCounterSeries('VSYNC-app', [1, 5, 6, 7])
- }
- ], [1, 5, 6, 7]);
- });
-
- test('findUnsorted', function() {
- testFindVSyncTimestamps([
- [buildSlice('RenderWidgetHostViewAndroid::OnVSync', 4),
- buildSlice('MessageLoop::RunTask', 2)],
- [buildSlice('RenderWidgetHostViewAndroid::OnVSync', 1),
- buildSlice('RenderWidgetHostViewAndroid::OnVSync', 3)]
- ], [], [1, 3, 4]);
- });
-
- test('findDifferentPrecisions', function() {
- // vblank has higher precision than RenderWidgetHostViewAndroid::OnVSync.
- testFindVSyncTimestamps([
- [buildSlice('RenderWidgetHostViewAndroid::OnVSync', 1),
- buildSlice('vblank', 2),
- buildSlice('RenderWidgetHostViewAndroid::OnVSync', 3)]
- ], [], [2]);
- });
-
- test('findBeginFrame', function() {
- var title = 'DisplayScheduler::BeginFrame';
- testFindVSyncTimestamps([[
- new ThreadSlice('', title, 0, 2, { args: { frame_time_us: 1000 } }),
- new ThreadSlice('', title, 0, 4, { args: { frame_time_us: 3000 } })
- ]], [], [1, 3]);
- });
-
- test('findBeginFrame_noFrameTime', function() {
- var title = 'DisplayScheduler::BeginFrame';
- testFindVSyncTimestamps([[
- new ThreadSlice('', title, 0, 2, {}),
- new ThreadSlice('', title, 0, 4, { args: {} })
- ]], [], []);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/clock_sync_test.html b/chromium/third_party/catapult/tracing/tracing/importer/clock_sync_test.html
deleted file mode 100644
index 81fa36087e0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/clock_sync_test.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/battor_importer.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/clock_sync_manager.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview This file contains end-to-end clock sync tests that ensure
- * clock sync behavior works as expected across traces. There are too many
- * possible combinations of trace types to test all of them, but we aim to test
- * many of the important ones in this file.
- */
-tr.b.unittest.testSuite(function() {
- test('import_noClockDomains', function() {
- var m = tr.c.TestUtils.newModelWithEvents([]);
-
- assert.isFalse(m.hasImportWarnings);
- });
-
- test('import_traceEvent', function() {
- var trace = JSON.stringify({
- traceEvents: [
- {ts: 0, pid: 0, tid: 0, ph: 'i', cat: 'c', name: 'taskA', args: {}},
- {ts: 1000, pid: 0, tid: 0, ph: 'c', cat: 'metadata',
- args: { issue_ts: 500, sync_id: 'abc' }},
- {ts: 2000, pid: 0, tid: 0, ph: 'i', cat: 'c', name: 'taskA', args: {}}
- ]});
- var m = tr.c.TestUtils.newModelWithEvents([trace]);
-
- assert.isFalse(m.hasImportWarnings);
-
- assert.equal(m.processes[0].threads[0].sliceGroup.slices[0].start, 0);
- assert.equal(m.processes[0].threads[0].sliceGroup.slices[1].start, 2);
- });
-
-
- test('import_ftrace', function() {
- var ftrace =
- 'SurfaceFlinger-0 [001] ...1 0.001: 0: B|1|taskA\n' +
- ' chrome-3 [001] ...1 0.010: 0: trace_event_clock_sync: ' +
- 'parent_ts=0.020\n';
-
- var m = tr.c.TestUtils.newModelWithEvents([ftrace]);
-
- assert.isFalse(m.hasImportWarnings);
- assert.equal(m.processes[1].threads[0].sliceGroup.slices[0].start, 0);
- });
-
- test('import_traceEventWithNoClockDomainAndFtrace', function() {
- // Include a clock sync marker that indicates the LINUX_CLOCK_MONOTONIC time
- // of 20ms is equal to the LINUX_FTRACE_GLOBAL time of 10ms, effectively
- // shifting all ftrace timestamps forward by 10ms.
- var ftrace =
- 'SurfaceFlinger-0 [001] ...1 0.001: 0: B|1|taskA\n' +
- ' chrome-3 [001] ...1 0.010: 0: trace_event_clock_sync: ' +
- 'parent_ts=0.020\n';
-
- var trace = JSON.stringify({
- traceEvents: [
- {ts: 0, pid: 0, tid: 0, ph: 'i', cat: 'c', name: 'taskA', args: {}},
- {ts: 1000, pid: 0, tid: 0, ph: 'c', cat: 'metadata',
- args: { issue_ts: 500, sync_id: 'abc' }},
- {ts: 2000, pid: 0, tid: 0, ph: 'i', cat: 'c', name: 'taskA', args: {}}
- ],
- systemTraceEvents: ftrace
- });
- var m = tr.c.TestUtils.newModelWithEvents([trace]);
-
- assert.isFalse(m.hasImportWarnings);
-
- // Chrome events shouldn't be shifted.
- assert.equal(m.processes[0].threads[0].sliceGroup.slices[0].start, 0);
- assert.equal(m.processes[0].threads[0].sliceGroup.slices[1].start, 2);
-
- // Ftrace events should be shifted forward by 10ms.
- assert.equal(m.processes[1].threads[0].sliceGroup.slices[0].start, 11);
- });
-
- test('import_traceEventWithClockDomainAndFtrace', function() {
- // Include a clock sync marker that indicates the LINUX_CLOCK_MONOTONIC time
- // of 20ms is equal to the LINUX_FTRACE_GLOBAL time of 10ms, effectively
- // shifting all ftrace timestamps forward by 10ms.
- var ftrace =
- 'SurfaceFlinger-0 [001] ...1 0.001: 0: B|1|taskA\n' +
- ' chrome-3 [001] ...1 0.010: 0: trace_event_clock_sync: ' +
- 'parent_ts=0.020\n';
-
- var trace = JSON.stringify({
- traceEvents: [
- {ts: 0, pid: 0, tid: 0, ph: 'i', cat: 'c', name: 'taskA', args: {}},
- {ts: 1000, pid: 0, tid: 0, ph: 'c', cat: 'metadata',
- args: { issue_ts: 500, sync_id: 'abc' }},
- {ts: 2000, pid: 0, tid: 0, ph: 'i', cat: 'c', name: 'taskA', args: {}}
- ],
- metadata: {
- 'clock-domain': 'LINUX_CLOCK_MONOTONIC'
- },
- systemTraceEvents: ftrace
- });
- var m = tr.c.TestUtils.newModelWithEvents([trace]);
-
- assert.isFalse(m.hasImportWarnings);
-
- // Chrome events shouldn't be shifted.
- assert.equal(m.processes[0].threads[0].sliceGroup.slices[0].start, 0);
- assert.equal(m.processes[0].threads[0].sliceGroup.slices[1].start, 2);
-
- // Ftrace events should be shifted forward by 10ms.
- assert.equal(m.processes[1].threads[0].sliceGroup.slices[0].start, 11);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/context_processor.html b/chromium/third_party/catapult/tracing/tracing/importer/context_processor.html
deleted file mode 100644
index d7df00f3923..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/context_processor.html
+++ /dev/null
@@ -1,196 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- /**
- * The context processor consumes context events and maintains a set of
- * active contexts for a single thread.
- *
- * @constructor
- */
- function ContextProcessor(model) {
- this.model_ = model;
- this.activeContexts_ = [];
- this.stackPerType_ = {};
- // Cache of unique context objects.
- this.contextCache_ = {};
- // Cache of unique context object sets.
- this.contextSetCache_ = {};
- this.cachedEntryForActiveContexts_ = undefined;
- // All seen context object snapshots.
- this.seenSnapshots_ = {};
- };
-
- ContextProcessor.prototype = {
- enterContext: function(contextType, scopedId) {
- var newActiveContexts = [this.getOrCreateContext_(contextType, scopedId)];
- for (var oldContext of this.activeContexts_) {
- if (oldContext.type === contextType) {
- // If a previous context of the same type is active, it is removed
- // and pushed onto the stack for this type.
- this.pushContext_(oldContext);
- } else {
- // Otherwise the old context is it is still active.
- newActiveContexts.push(oldContext);
- }
- }
- this.activeContexts_ = newActiveContexts;
- this.cachedEntryForActiveContexts_ = undefined;
- },
-
- leaveContext: function(contextType, scopedId) {
- this.leaveContextImpl_(context =>
- context.type === contextType &&
- context.snapshot.scope === scopedId.scope &&
- context.snapshot.idRef === scopedId.id);
- },
-
- destroyContext: function(scopedId) {
- // Remove all matching contexts from stacks.
- tr.b.iterItems(this.stackPerType_, function(contextType, stack) {
- // Perform in-place filtering instead of Array.prototype.filter to
- // prevent creating a new array.
- var newLength = 0;
- for (var i = 0; i < stack.length; ++i) {
- if (stack[i].snapshot.scope !== scopedId.scope ||
- stack[i].snapshot.idRef !== scopedId.id) {
- stack[newLength++] = stack[i];
- }
- }
- stack.length = newLength;
- });
-
- // Remove all matching contexts from active context set.
- this.leaveContextImpl_(context =>
- context.snapshot.scope === scopedId.scope &&
- context.snapshot.idRef === scopedId.id);
- },
-
- leaveContextImpl_: function(predicate) {
- var newActiveContexts = [];
- for (var oldContext of this.activeContexts_) {
- if (predicate(oldContext)) {
- // If we left this context, remove it from the active set and
- // restore any previous context of the same type.
- var previousContext = this.popContext_(oldContext.type);
- if (previousContext)
- newActiveContexts.push(previousContext);
- } else {
- newActiveContexts.push(oldContext);
- }
- }
- this.activeContexts_ = newActiveContexts;
- this.cachedEntryForActiveContexts_ = undefined;
- },
-
- getOrCreateContext_: function(contextType, scopedId) {
- var context = {
- type: contextType,
- snapshot: {
- scope: scopedId.scope,
- idRef: scopedId.id
- }
- };
- var key = this.getContextKey_(context);
- if (key in this.contextCache_)
- return this.contextCache_[key];
- this.contextCache_[key] = context;
- var snapshotKey = this.getSnapshotKey_(scopedId);
- this.seenSnapshots_[snapshotKey] = true;
- return context;
- },
-
- pushContext_: function(context) {
- if (!(context.type in this.stackPerType_))
- this.stackPerType_[context.type] = [];
- this.stackPerType_[context.type].push(context);
- },
-
- popContext_: function(contextType) {
- if (!(contextType in this.stackPerType_))
- return undefined;
- return this.stackPerType_[contextType].pop();
- },
-
- getContextKey_: function(context) {
- return [
- context.type,
- context.snapshot.scope,
- context.snapshot.idRef
- ].join('\x00');
- },
-
- getSnapshotKey_: function(scopedId) {
- return [
- scopedId.scope,
- scopedId.idRef
- ].join('\x00');
- },
-
- get activeContexts() {
- // Keep a single instance for each unique set of active contexts to
- // reduce memory usage.
- if (this.cachedEntryForActiveContexts_ === undefined) {
- var key = [];
- for (var context of this.activeContexts_)
- key.push(this.getContextKey_(context));
- key.sort();
- key = key.join('\x00');
- if (key in this.contextSetCache_) {
- this.cachedEntryForActiveContexts_ = this.contextSetCache_[key];
- } else {
- this.activeContexts_.sort(function(a, b) {
- var keyA = this.getContextKey_(a);
- var keyB = this.getContextKey_(b);
- if (keyA < keyB)
- return -1;
- if (keyA > keyB)
- return 1;
- return 0;
- }.bind(this));
- this.contextSetCache_[key] = Object.freeze(this.activeContexts_);
- this.cachedEntryForActiveContexts_ = this.contextSetCache_[key];
- }
- }
- return this.cachedEntryForActiveContexts_;
- },
-
- invalidateContextCacheForSnapshot: function(scopedId) {
- var snapshotKey = this.getSnapshotKey_(scopedId);
- if (!(snapshotKey in this.seenSnapshots_))
- return;
- this.contextCache_ = {};
- this.contextSetCache_ = {};
- this.cachedEntryForActiveContexts_ = undefined;
- this.activeContexts_ = this.activeContexts_.map(function(context) {
- // Do not alter unrelated contexts.
- if (context.snapshot.scope !== scopedId.scope ||
- context.snapshot.idRef !== scopedId.id)
- return context;
- // Replace the invalidated context by a deep copy.
- return {
- type: context.type,
- snapshot: {
- scope: context.snapshot.scope,
- idRef: context.snapshot.idRef
- }
- };
- });
- this.seenSnapshots_ = {};
- },
- };
-
- return {
- ContextProcessor: ContextProcessor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/context_processor_test.html b/chromium/third_party/catapult/tracing/tracing/importer/context_processor_test.html
deleted file mode 100644
index 29a78114bd4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/context_processor_test.html
+++ /dev/null
@@ -1,273 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/importer/context_processor.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ContextProcessor = tr.importer.ContextProcessor;
-
- test('empty', function() {
- var processor = new ContextProcessor();
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('enterAndLeave', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
- processor.enterContext('type', id);
- assert.deepEqual(processor.activeContexts, [expectedContext]);
- processor.leaveContext('type', id);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('parallelContexts', function() {
- var processor = new ContextProcessor();
- var idA = new tr.model.ScopedId('ptr', 123);
- var idB = new tr.model.ScopedId('idx', 456);
- var expectedContextA = {type: 'A', snapshot: {scope: 'ptr', idRef: 123}};
- var expectedContextB = {type: 'B', snapshot: {scope: 'idx', idRef: 456}};
-
- // Entering and leaving in order.
- processor.enterContext('A', idA);
- assert.deepEqual(processor.activeContexts, [expectedContextA]);
- processor.enterContext('B', idB);
- assert.deepEqual(processor.activeContexts, [expectedContextA,
- expectedContextB]);
- processor.leaveContext('B', idB);
- assert.deepEqual(processor.activeContexts, [expectedContextA]);
- processor.leaveContext('A', idA);
- assert.deepEqual(processor.activeContexts, []);
-
- // Entering and leaving out of order.
- processor.enterContext('B', idB);
- assert.deepEqual(processor.activeContexts, [expectedContextB]);
- processor.enterContext('A', idA);
- assert.deepEqual(processor.activeContexts, [expectedContextA,
- expectedContextB]);
- processor.leaveContext('B', idB);
- assert.deepEqual(processor.activeContexts, [expectedContextA]);
- processor.leaveContext('A', idA);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('contextStack', function() {
- var processor = new ContextProcessor();
- var idA = new tr.model.ScopedId('ptr', 123);
- var idB = new tr.model.ScopedId('idx', 456);
- var expectedContextA = {
- type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
- var expectedContextB = {
- type: 'type', snapshot: {scope: 'idx', idRef: 456}};
-
- // Entering and leaving the same context type.
- processor.enterContext('type', idA);
- assert.deepEqual(processor.activeContexts, [expectedContextA]);
- processor.enterContext('type', idB);
- assert.deepEqual(processor.activeContexts, [expectedContextB]);
- processor.leaveContext('type', idB);
- assert.deepEqual(processor.activeContexts, [expectedContextA]);
- processor.leaveContext('type', idA);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('contextCached', function() {
- var processor = new ContextProcessor();
- var idA = new tr.model.ScopedId('ptr', 123);
- var idB = new tr.model.ScopedId('idx', 456);
- var expectedContextA = {
- type: 'A', snapshot: {scope: 'ptr', idRef: 123}};
- var expectedContextB = {
- type: 'B', snapshot: {scope: 'idx', idRef: 456}};
-
- processor.enterContext('A', idA);
- var firstSet = processor.activeContexts;
- processor.enterContext('B', idB);
- var secondSet = processor.activeContexts;
- processor.leaveContext('B', idB);
- processor.leaveContext('A', idA);
-
- assert.deepEqual(firstSet, [expectedContextA]);
- assert.deepEqual(secondSet, [expectedContextA, expectedContextB]);
-
- // Identical context objects should be the same instance.
- assert(Object.is(firstSet[0], secondSet[0]));
- });
-
- test('contextSetCached', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
-
- processor.enterContext('type', id);
- var firstSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- processor.enterContext('type', id);
- var secondSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- assert.deepEqual(firstSet, [expectedContext]);
- assert(Object.is(firstSet, secondSet));
- });
-
- test('contextSetIsOrdered', function() {
- var processor = new ContextProcessor();
- var idA = new tr.model.ScopedId('ptr', 123);
- var idB = new tr.model.ScopedId('idx', 456);
- var expectedContextA = {type: 'A', snapshot: {scope: 'ptr', idRef: 123}};
- var expectedContextB = {type: 'B', snapshot: {scope: 'idx', idRef: 456}};
-
- processor.enterContext('A', idA);
- processor.enterContext('B', idB);
- var firstSet = processor.activeContexts;
- processor.leaveContext('B', idB);
- processor.leaveContext('A', idA);
-
- processor.enterContext('B', idB);
- processor.enterContext('A', idA);
- var secondSet = processor.activeContexts;
- processor.leaveContext('A', idA);
- processor.leaveContext('B', idB);
-
- assert.deepEqual(firstSet, [expectedContextA, expectedContextB]);
- assert(Object.is(firstSet, secondSet));
- });
-
- test('contextSetIsFrozen', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- assert(Object.isFrozen(processor.activeContexts));
- processor.enterContext('type', id);
- assert(Object.isFrozen(processor.activeContexts));
- processor.leaveContext('type', id);
- assert(Object.isFrozen(processor.activeContexts));
- });
-
- test('cacheInvalidation', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
-
- processor.enterContext('type', id);
- var firstSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- processor.invalidateContextCacheForSnapshot(id);
-
- processor.enterContext('type', id);
- var secondSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- assert.deepEqual(firstSet, [expectedContext]);
- assert.deepEqual(secondSet, [expectedContext]);
- assert(!Object.is(firstSet, secondSet));
- assert(!Object.is(firstSet[0], secondSet[0]));
- assert(!Object.is(firstSet[0].snapshot, secondSet[0].snapshot));
- });
-
- test('cacheInvalidationOfAnActiveContext', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
-
- processor.enterContext('type', id);
- var firstSet = processor.activeContexts;
-
- processor.invalidateContextCacheForSnapshot(id);
-
- var secondSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- assert.deepEqual(firstSet, [expectedContext]);
- assert.deepEqual(secondSet, [expectedContext]);
- assert(!Object.is(firstSet, secondSet));
- assert(!Object.is(firstSet[0], secondSet[0]));
- assert(!Object.is(firstSet[0].snapshot, secondSet[0].snapshot));
- });
-
- test('cacheInvalidationForUnrelatedSnapshot', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- var unrelatedId = new tr.model.ScopedId('ofs', 789);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
-
- processor.enterContext('type', id);
- var firstSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- processor.invalidateContextCacheForSnapshot(unrelatedId);
-
- processor.enterContext('type', id);
- var secondSet = processor.activeContexts;
- processor.leaveContext('type', id);
-
- assert.deepEqual(firstSet, [expectedContext]);
- assert.deepEqual(secondSet, [expectedContext]);
- assert(Object.is(firstSet, secondSet));
- });
-
- test('destroyBasic', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
- processor.enterContext('type', id);
- assert.deepEqual(processor.activeContexts, [expectedContext]);
- processor.destroyContext(id);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('destroyActiveContextWithNonEmptyStack', function() {
- var processor = new ContextProcessor();
- var idA = new tr.model.ScopedId('ptr', 123);
- var idB = new tr.model.ScopedId('idx', 456);
- var expectedContext = {type: 'type', snapshot: {scope: 'ptr', idRef: 123}};
- processor.enterContext('type', idA);
- processor.enterContext('type', idB);
- processor.destroyContext(idB);
- assert.deepEqual(processor.activeContexts, [expectedContext]);
- processor.leaveContext('type', idA);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('destroyInactiveContextInStack', function() {
- var processor = new ContextProcessor();
- var idA = new tr.model.ScopedId('ptr', 123);
- var idB = new tr.model.ScopedId('idx', 456);
- var expectedContext = {type: 'type', snapshot: {scope: 'idx', idRef: 456}};
- processor.enterContext('type', idA);
- processor.enterContext('type', idB);
- processor.destroyContext(idA);
- assert.deepEqual(processor.activeContexts, [expectedContext]);
- processor.leaveContext('type', idB);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('destroyContextEnteredWithMultipleTypes', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- processor.enterContext('A', id);
- processor.enterContext('B', id);
- processor.destroyContext(id);
- assert.deepEqual(processor.activeContexts, []);
- });
-
- test('destroyReenteredContext', function() {
- var processor = new ContextProcessor();
- var id = new tr.model.ScopedId('ptr', 123);
- processor.enterContext('type', id);
- processor.enterContext('type', id);
- processor.destroyContext(id);
- assert.deepEqual(processor.activeContexts, []);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/empty_importer.html b/chromium/third_party/catapult/tracing/tracing/importer/empty_importer.html
deleted file mode 100644
index 028a7d427ec..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/empty_importer.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/importer/importer.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for trace data importers.
- */
-tr.exportTo('tr.importer', function() {
- /**
- * Importer for empty strings and arrays.
- * @constructor
- */
- function EmptyImporter(events) {
- this.importPriority = 0;
- }
-
- EmptyImporter.canImport = function(eventData) {
- if (eventData instanceof Array && eventData.length === 0)
- return true;
- if (typeof(eventData) === 'string' || eventData instanceof String) {
- return eventData.length === 0;
- }
- return false;
- };
-
- EmptyImporter.prototype = {
- __proto__: tr.importer.Importer.prototype,
-
- get importerName() {
- return 'EmptyImporter';
- }
- };
-
- tr.importer.Importer.register(EmptyImporter);
-
- return {
- EmptyImporter: EmptyImporter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/find_input_expectations.html b/chromium/third_party/catapult/tracing/tracing/importer/find_input_expectations.html
deleted file mode 100644
index 3f9245849ef..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/find_input_expectations.html
+++ /dev/null
@@ -1,1259 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import" href="/tracing/importer/proto_expectation.html">
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- var ProtoExpectation = tr.importer.ProtoExpectation;
- var INITIATOR_TYPE = tr.model.um.INITIATOR_TYPE;
- var INPUT_TYPE = tr.e.cc.INPUT_EVENT_TYPE_NAMES;
-
- var KEYBOARD_TYPE_NAMES = [
- INPUT_TYPE.CHAR,
- INPUT_TYPE.KEY_DOWN_RAW,
- INPUT_TYPE.KEY_DOWN,
- INPUT_TYPE.KEY_UP
- ];
- var MOUSE_RESPONSE_TYPE_NAMES = [
- INPUT_TYPE.CLICK,
- INPUT_TYPE.CONTEXT_MENU
- ];
- var MOUSE_WHEEL_TYPE_NAMES = [
- INPUT_TYPE.MOUSE_WHEEL
- ];
- var MOUSE_DRAG_TYPE_NAMES = [
- INPUT_TYPE.MOUSE_DOWN,
- INPUT_TYPE.MOUSE_MOVE,
- INPUT_TYPE.MOUSE_UP
- ];
- var TAP_TYPE_NAMES = [
- INPUT_TYPE.TAP,
- INPUT_TYPE.TAP_CANCEL,
- INPUT_TYPE.TAP_DOWN
- ];
- var PINCH_TYPE_NAMES = [
- INPUT_TYPE.PINCH_BEGIN,
- INPUT_TYPE.PINCH_END,
- INPUT_TYPE.PINCH_UPDATE
- ];
- var FLING_TYPE_NAMES = [
- INPUT_TYPE.FLING_CANCEL,
- INPUT_TYPE.FLING_START
- ];
- var TOUCH_TYPE_NAMES = [
- INPUT_TYPE.TOUCH_END,
- INPUT_TYPE.TOUCH_MOVE,
- INPUT_TYPE.TOUCH_START
- ];
- var SCROLL_TYPE_NAMES = [
- INPUT_TYPE.SCROLL_BEGIN,
- INPUT_TYPE.SCROLL_END,
- INPUT_TYPE.SCROLL_UPDATE
- ];
- var ALL_HANDLED_TYPE_NAMES = [].concat(
- KEYBOARD_TYPE_NAMES,
- MOUSE_RESPONSE_TYPE_NAMES,
- MOUSE_WHEEL_TYPE_NAMES,
- MOUSE_DRAG_TYPE_NAMES,
- PINCH_TYPE_NAMES,
- TAP_TYPE_NAMES,
- FLING_TYPE_NAMES,
- TOUCH_TYPE_NAMES,
- SCROLL_TYPE_NAMES
- );
-
- var RENDERER_FLING_TITLE = 'InputHandlerProxy::HandleGestureFling::started';
- var PLAYBACK_EVENT_TITLE = 'VideoPlayback';
-
- var CSS_ANIMATION_TITLE = 'Animation';
-
- /**
- * If there's less than this much time between the end of one event and the
- * start of the next, then they might be merged.
- * There was not enough thought given to this value, so if you have any slight
- * reason to change it, then please do so. It might also be good to split this
- * into multiple values.
- */
- var INPUT_MERGE_THRESHOLD_MS = 200;
- var ANIMATION_MERGE_THRESHOLD_MS = 32; // 2x 60FPS frames
-
- /**
- * If two MouseWheel events begin this close together, then they're an
- * Animation, not two responses.
- */
- var MOUSE_WHEEL_THRESHOLD_MS = 40;
-
- /**
- * If two MouseMoves are more than this far apart, then they're two Responses,
- * not Animation.
- */
- var MOUSE_MOVE_THRESHOLD_MS = 40;
-
- // TODO(benjhayden) Find a better home for this.
- function compareEvents(x, y) {
- if (x.start !== y.start)
- return x.start - y.start;
- if (x.end !== y.end)
- return x.end - y.end;
- if (x.guid && y.guid)
- return x.guid - y.guid;
- return 0;
- }
-
- function forEventTypesIn(events, typeNames, cb, opt_this) {
- events.forEach(function(event) {
- if (typeNames.indexOf(event.typeName) >= 0) {
- cb.call(opt_this, event);
- }
- });
- }
-
- function causedFrame(event) {
- return event.associatedEvents.some(
- x => x.title === tr.model.helpers.IMPL_RENDERING_STATS);
- }
-
- function getSortedFrameEventsByProcess(modelHelper) {
- var frameEventsByPid = {};
- tr.b.iterItems(modelHelper.rendererHelpers, function(pid, rendererHelper) {
- frameEventsByPid[pid] = rendererHelper.getFrameEventsInRange(
- tr.model.helpers.IMPL_FRAMETIME_TYPE, modelHelper.model.bounds);
- });
- return frameEventsByPid;
- }
-
- function getSortedInputEvents(modelHelper) {
- var inputEvents = [];
-
- var browserProcess = modelHelper.browserHelper.process;
- var mainThread = browserProcess.findAtMostOneThreadNamed(
- 'CrBrowserMain');
- for (var slice of mainThread.asyncSliceGroup.getDescendantEvents()) {
- if (!slice.isTopLevel)
- continue;
-
- if (!(slice instanceof tr.e.cc.InputLatencyAsyncSlice))
- continue;
-
- // TODO(beaudoin): This should never happen but it does. Investigate
- // the trace linked at in #1567 and remove that when it's fixed.
- if (isNaN(slice.start) ||
- isNaN(slice.duration) ||
- isNaN(slice.end))
- continue;
-
- inputEvents.push(slice);
- }
-
- return inputEvents.sort(compareEvents);
- }
-
- function findProtoExpectations(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- // This order is not important. Handlers are independent.
- var handlers = [
- handleKeyboardEvents,
- handleMouseResponseEvents,
- handleMouseWheelEvents,
- handleMouseDragEvents,
- handleTapResponseEvents,
- handlePinchEvents,
- handleFlingEvents,
- handleTouchEvents,
- handleScrollEvents,
- handleCSSAnimations,
- handleWebGLAnimations,
- handleVideoAnimations
- ];
- handlers.forEach(function(handler) {
- protoExpectations.push.apply(protoExpectations, handler(
- modelHelper, sortedInputEvents));
- });
- protoExpectations.sort(compareEvents);
- return protoExpectations;
- }
-
- /**
- * Every keyboard event is a Response.
- */
- function handleKeyboardEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- forEventTypesIn(sortedInputEvents, KEYBOARD_TYPE_NAMES, function(event) {
- var pe = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.KEYBOARD);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- });
- return protoExpectations;
- }
-
- /**
- * Some mouse events can be translated directly into Responses.
- */
- function handleMouseResponseEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- forEventTypesIn(
- sortedInputEvents, MOUSE_RESPONSE_TYPE_NAMES, function(event) {
- var pe = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.MOUSE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- });
- return protoExpectations;
- }
- /**
- * MouseWheel events are caused either by a physical wheel on a physical
- * mouse, or by a touch-drag gesture on a track-pad. The physical wheel
- * causes MouseWheel events that are much more spaced out, and have no
- * chance of hitting 60fps, so they are each turned into separate Response
- * IRs. The track-pad causes MouseWheel events that are much closer
- * together, and are expected to be 60fps, so the first event in a sequence
- * is turned into a Response, and the rest are merged into an Animation.
- * NB this threshold uses the two events' start times, unlike
- * ProtoExpectation.isNear, which compares the end time of the previous event
- * with the start time of the next.
- */
- function handleMouseWheelEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- var prevEvent_ = undefined;
- forEventTypesIn(
- sortedInputEvents, MOUSE_WHEEL_TYPE_NAMES, function(event) {
- // Switch prevEvent in one place so that we can early-return later.
- var prevEvent = prevEvent_;
- prevEvent_ = event;
-
- if (currentPE &&
- (prevEvent.start + MOUSE_WHEEL_THRESHOLD_MS) >= event.start) {
- if (currentPE.irType === ProtoExpectation.ANIMATION_TYPE) {
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,
- INITIATOR_TYPE.MOUSE_WHEEL);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- return;
- }
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.MOUSE_WHEEL);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- });
- return protoExpectations;
- }
-
- /**
- * Down events followed closely by Up events are click Responses, but the
- * Response doesn't start until the Up event.
- *
- * RRR
- * DDD UUU
- *
- * If there are any Move events in between a Down and an Up, then the Down
- * and the first Move are a Response, then the rest of the Moves are an
- * Animation:
- *
- * RRRRRRRAAAAAAAAAAAAAAAAAAAA
- * DDD MMM MMM MMM MMM MMM UUU
- */
- function handleMouseDragEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- var mouseDownEvent = undefined;
- forEventTypesIn(
- sortedInputEvents, MOUSE_DRAG_TYPE_NAMES, function(event) {
- switch (event.typeName) {
- case INPUT_TYPE.MOUSE_DOWN:
- if (causedFrame(event)) {
- var pe = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.MOUSE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- } else {
- // Responses typically don't start until the mouse up event.
- // Add this MouseDown to the Response that starts at the MouseUp.
- mouseDownEvent = event;
- }
- break;
-
- // There may be more than 100ms between the start of the mouse down
- // and the start of the mouse up. Chrome and the web don't start to
- // respond until the mouse up. ResponseIRs start deducting comfort
- // at 100ms duration. If more than that 100ms duration is burned
- // through while waiting for the user to release the
- // mouse button, then ResponseIR will unfairly start deducting
- // comfort before Chrome even has a mouse up to respond to.
- // It is technically possible for a site to afford one response on
- // mouse down and another on mouse up, but that is an edge case. The
- // vast majority of mouse downs are not responses.
-
- case INPUT_TYPE.MOUSE_MOVE:
- if (!causedFrame(event)) {
- // Ignore MouseMoves that do not affect the screen. They are not
- // part of an interaction record by definition.
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- } else if (!currentPE ||
- !currentPE.isNear(event, MOUSE_MOVE_THRESHOLD_MS)) {
- // The first MouseMove after a MouseDown or after a while is a
- // Response.
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.MOUSE);
- currentPE.pushEvent(event);
- if (mouseDownEvent) {
- currentPE.associatedEvents.push(mouseDownEvent);
- mouseDownEvent = undefined;
- }
- protoExpectations.push(currentPE);
- } else {
- // Merge this event into an Animation.
- if (currentPE.irType === ProtoExpectation.ANIMATION_TYPE) {
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.MOUSE);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- }
- break;
-
- case INPUT_TYPE.MOUSE_UP:
- if (!mouseDownEvent) {
- var pe = new ProtoExpectation(
- causedFrame(event) ? ProtoExpectation.RESPONSE_TYPE :
- ProtoExpectation.IGNORED_TYPE,
- INITIATOR_TYPE.MOUSE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- break;
- }
-
- if (currentPE) {
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.MOUSE);
- if (mouseDownEvent)
- currentPE.associatedEvents.push(mouseDownEvent);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- mouseDownEvent = undefined;
- currentPE = undefined;
- break;
- }
- });
- if (mouseDownEvent) {
- currentPE = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- currentPE.pushEvent(mouseDownEvent);
- protoExpectations.push(currentPE);
- }
- return protoExpectations;
- }
-
- /**
- * Solitary Tap events are simple Responses:
- *
- * RRR
- * TTT
- *
- * TapDowns are part of Responses.
- *
- * RRRRRRR
- * DDD TTT
- *
- * TapCancels are part of Responses, which seems strange. They always go
- * with scrolls, so they'll probably be merged with scroll Responses.
- * TapCancels can take a significant amount of time and account for a
- * significant amount of work, which should be grouped with the scroll IRs
- * if possible.
- *
- * RRRRRRR
- * DDD CCC
- **/
- function handleTapResponseEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- forEventTypesIn(sortedInputEvents, TAP_TYPE_NAMES, function(event) {
- switch (event.typeName) {
- case INPUT_TYPE.TAP_DOWN:
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.TAP);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- break;
-
- case INPUT_TYPE.TAP:
- if (currentPE) {
- currentPE.pushEvent(event);
- } else {
- // Sometimes we get Tap events with no TapDown, sometimes we get
- // TapDown events. Handle both.
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.TAP);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- currentPE = undefined;
- break;
-
- case INPUT_TYPE.TAP_CANCEL:
- if (!currentPE) {
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- break;
- }
-
- if (currentPE.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.TAP);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- currentPE = undefined;
- break;
- }
- });
- return protoExpectations;
- }
-
- /**
- * The PinchBegin and the first PinchUpdate comprise a Response, then the
- * rest of the PinchUpdates comprise an Animation.
- *
- * RRRRRRRAAAAAAAAAAAAAAAAAAAA
- * BBB UUU UUU UUU UUU UUU EEE
- */
- function handlePinchEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- var sawFirstUpdate = false;
- var modelBounds = modelHelper.model.bounds;
- forEventTypesIn(sortedInputEvents, PINCH_TYPE_NAMES, function(event) {
- switch (event.typeName) {
- case INPUT_TYPE.PINCH_BEGIN:
- if (currentPE &&
- currentPE.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
- currentPE.pushEvent(event);
- break;
- }
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.PINCH);
- currentPE.pushEvent(event);
- currentPE.isAnimationBegin = true;
- protoExpectations.push(currentPE);
- sawFirstUpdate = false;
- break;
-
- case INPUT_TYPE.PINCH_UPDATE:
- // Like ScrollUpdates, the Begin and the first Update constitute a
- // Response, then the rest of the Updates constitute an Animation
- // that begins when the Response ends. If the user pauses in the
- // middle of an extended pinch gesture, then multiple Animations
- // will be created.
- if (!currentPE ||
- ((currentPE.irType === ProtoExpectation.RESPONSE_TYPE) &&
- sawFirstUpdate) ||
- !currentPE.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.PINCH);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- } else {
- currentPE.pushEvent(event);
- sawFirstUpdate = true;
- }
- break;
-
- case INPUT_TYPE.PINCH_END:
- if (currentPE) {
- currentPE.pushEvent(event);
- } else {
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- }
- currentPE = undefined;
- break;
- }
- });
- return protoExpectations;
- }
-
- /**
- * Flings are defined by 3 types of events: FlingStart, FlingCancel, and the
- * renderer fling event. Flings do not begin with a Response. Flings end
- * either at the beginning of a FlingCancel, or at the end of the renderer
- * fling event.
- *
- * AAAAAAAAAAAAAAAAAAAAAAAAAA
- * SSS
- * RRRRRRRRRRRRRRRRRRRRRR
- *
- *
- * AAAAAAAAAAA
- * SSS CCC
- */
- function handleFlingEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
-
- function isRendererFling(event) {
- return event.title === RENDERER_FLING_TITLE;
- }
- var browserHelper = modelHelper.browserHelper;
- var flingEvents = browserHelper.getAllAsyncSlicesMatching(
- isRendererFling);
-
- forEventTypesIn(sortedInputEvents, FLING_TYPE_NAMES, function(event) {
- flingEvents.push(event);
- });
- flingEvents.sort(compareEvents);
-
- flingEvents.forEach(function(event) {
- if (event.title === RENDERER_FLING_TITLE) {
- if (currentPE) {
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.FLING);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- return;
- }
-
- switch (event.typeName) {
- case INPUT_TYPE.FLING_START:
- if (currentPE) {
- console.error('Another FlingStart? File a bug with this trace!');
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.FLING);
- currentPE.pushEvent(event);
- // Set end to an invalid value so that it can be noticed and fixed
- // later.
- currentPE.end = 0;
- protoExpectations.push(currentPE);
- }
- break;
-
- case INPUT_TYPE.FLING_CANCEL:
- if (currentPE) {
- currentPE.pushEvent(event);
- // FlingCancel events start when TouchStart events start, which is
- // typically when a Response starts. FlingCancel events end when
- // chrome acknowledges them, not when they update the screen. So
- // there might be one more frame during the FlingCancel, after
- // this Animation ends. That won't affect the scoring algorithms,
- // and it will make the IRs look more correct if they don't
- // overlap unnecessarily.
- currentPE.end = event.start;
- currentPE = undefined;
- } else {
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- }
- break;
- }
- });
- // If there was neither a FLING_CANCEL nor a renderer fling after the
- // FLING_START, then assume that it ends at the end of the model, so set
- // the end of currentPE to the end of the model.
- if (currentPE && !currentPE.end)
- currentPE.end = modelHelper.model.bounds.max;
- return protoExpectations;
- }
-
- /**
- * The TouchStart and the first TouchMove comprise a Response, then the
- * rest of the TouchMoves comprise an Animation.
- *
- * RRRRRRRAAAAAAAAAAAAAAAAAAAA
- * SSS MMM MMM MMM MMM MMM EEE
- *
- * If there are no TouchMove events in between a TouchStart and a TouchEnd,
- * then it's just a Response.
- *
- * RRRRRRR
- * SSS EEE
- */
- function handleTouchEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- var sawFirstMove = false;
- forEventTypesIn(sortedInputEvents, TOUCH_TYPE_NAMES, function(event) {
- switch (event.typeName) {
- case INPUT_TYPE.TOUCH_START:
- if (currentPE) {
- // NB: currentPE will probably be merged with something from
- // handlePinchEvents(). Multiple TouchStart events without an
- // intervening TouchEnd logically implies that multiple fingers
- // are on the screen, so this is probably a pinch gesture.
- currentPE.pushEvent(event);
- } else {
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.TOUCH);
- currentPE.pushEvent(event);
- currentPE.isAnimationBegin = true;
- protoExpectations.push(currentPE);
- sawFirstMove = false;
- }
- break;
-
- case INPUT_TYPE.TOUCH_MOVE:
- if (!currentPE) {
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.TOUCH);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- break;
- }
-
- // Like Scrolls and Pinches, the Response is defined to be the
- // TouchStart plus the first TouchMove, then the rest of the
- // TouchMoves constitute an Animation.
- if ((sawFirstMove &&
- (currentPE.irType === ProtoExpectation.RESPONSE_TYPE)) ||
- !currentPE.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
- // If there's already a touchmove in the currentPE or it's not
- // near event, then finish it and start a new animation.
- var prevEnd = currentPE.end;
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.TOUCH);
- currentPE.pushEvent(event);
- // It's possible for there to be a gap between TouchMoves, but
- // that doesn't mean that there should be an Idle IR there.
- currentPE.start = prevEnd;
- protoExpectations.push(currentPE);
- } else {
- currentPE.pushEvent(event);
- sawFirstMove = true;
- }
- break;
-
- case INPUT_TYPE.TOUCH_END:
- if (!currentPE) {
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- break;
- }
- if (currentPE.isNear(event, INPUT_MERGE_THRESHOLD_MS)) {
- currentPE.pushEvent(event);
- } else {
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- }
- currentPE = undefined;
- break;
- }
- });
- return protoExpectations;
- }
-
- /**
- * The first ScrollBegin and the first ScrollUpdate comprise a Response,
- * then the rest comprise an Animation.
- *
- * RRRRRRRAAAAAAAAAAAAAAAAAAAA
- * BBB UUU UUU UUU UUU UUU EEE
- */
- function handleScrollEvents(modelHelper, sortedInputEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- var sawFirstUpdate = false;
- forEventTypesIn(sortedInputEvents, SCROLL_TYPE_NAMES, function(event) {
- switch (event.typeName) {
- case INPUT_TYPE.SCROLL_BEGIN:
- // Always begin a new PE even if there already is one, unlike
- // PinchBegin.
- currentPE = new ProtoExpectation(
- ProtoExpectation.RESPONSE_TYPE, INITIATOR_TYPE.SCROLL);
- currentPE.pushEvent(event);
- currentPE.isAnimationBegin = true;
- protoExpectations.push(currentPE);
- sawFirstUpdate = false;
- break;
-
- case INPUT_TYPE.SCROLL_UPDATE:
- if (currentPE) {
- if (currentPE.isNear(event, INPUT_MERGE_THRESHOLD_MS) &&
- ((currentPE.irType === ProtoExpectation.ANIMATION_TYPE) ||
- !sawFirstUpdate)) {
- currentPE.pushEvent(event);
- sawFirstUpdate = true;
- } else {
- currentPE = new ProtoExpectation(ProtoExpectation.ANIMATION_TYPE,
- INITIATOR_TYPE.SCROLL);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- } else {
- // ScrollUpdate without ScrollBegin.
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.SCROLL);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- break;
-
- case INPUT_TYPE.SCROLL_END:
- if (!currentPE) {
- console.error('ScrollEnd without ScrollUpdate? ' +
- 'File a bug with this trace!');
- var pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE);
- pe.pushEvent(event);
- protoExpectations.push(pe);
- break;
- }
- currentPE.pushEvent(event);
- break;
- }
- });
- return protoExpectations;
- }
-
- /**
- * Returns proto expectations for video animation events.
- *
- * Video animations represent video playback, and are based on
- * VideoPlayback async events (going from the VideoFrameCompositor::Start
- * to VideoFrameCompositor::Stop calls)
- */
- function handleVideoAnimations(modelHelper, sortedInputEvents) {
- var events = [];
- for (var pid in modelHelper.rendererHelpers) {
- for (var asyncSlice of
- modelHelper.rendererHelpers[pid].mainThread.asyncSliceGroup.slices) {
- if (asyncSlice.title === PLAYBACK_EVENT_TITLE)
- events.push(asyncSlice);
- }
- }
-
- events.sort(tr.importer.compareEvents);
-
- var protoExpectations = [];
- for (var event of events) {
- var currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.VIDEO);
- currentPE.start = event.start;
- currentPE.end = event.end;
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
-
- return protoExpectations;
- }
-
- /**
- * CSS Animations are merged into AnimationExpectations when they intersect.
- */
- function handleCSSAnimations(modelHelper, sortedInputEvents) {
- // First find all the top-level CSS Animation async events.
- var animationEvents = modelHelper.browserHelper.
- getAllAsyncSlicesMatching(function(event) {
- return ((event.title === CSS_ANIMATION_TITLE) &&
- event.isTopLevel &&
- (event.duration > 0));
- });
-
-
- // Time ranges where animations are actually running will be collected here.
- // Each element will contain {min, max, animation}.
- var animationRanges = [];
-
- // This helper function will be called when a time range is found
- // during which the animation is actually running.
- function pushAnimationRange(start, end, animation) {
- var range = tr.b.Range.fromExplicitRange(start, end);
- range.animation = animation;
- animationRanges.push(range);
- }
-
- animationEvents.forEach(function(animation) {
- if (animation.subSlices.length === 0) {
- pushAnimationRange(animation.start, animation.end, animation);
- } else {
- // Now run a state machine over the animation's subSlices, which
- // indicate the animations running/paused/finished states, in order to
- // find ranges where the animation was actually running.
- var start = undefined;
- animation.subSlices.forEach(function(sub) {
- if ((sub.args.data.state === 'running') &&
- (start === undefined)) {
- // It's possible for the state to alternate between running and
- // pending, but the animation is still running in that case,
- // so only set start if the state is changing from one of the halted
- // states.
- start = sub.start;
- } else if ((sub.args.data.state === 'paused') ||
- (sub.args.data.state === 'idle') ||
- (sub.args.data.state === 'finished')) {
- if (start === undefined) {
- // An animation was already running when the trace started.
- // (Actually, it's possible that the animation was in the 'idle'
- // state when tracing started, but that should be rare, and will
- // be fixed when async events are buffered.)
- // http: //crbug.com/565627
- start = modelHelper.model.bounds.min;
- }
-
- pushAnimationRange(start, sub.start, animation);
- start = undefined;
- }
- });
-
- // An animation was still running when the
- // top-level animation event ended.
- if (start !== undefined)
- pushAnimationRange(start, animation.end, animation);
- }
- });
-
- // Now we have a set of time ranges when css animations were actually
- // running.
- // Leave merging intersecting animations to mergeIntersectingAnimations(),
- // after findFrameEventsForAnimations removes frame-less animations.
-
- return animationRanges.map(function(range) {
- var protoExpectation = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.CSS);
- protoExpectation.start = range.min;
- protoExpectation.end = range.max;
- protoExpectation.associatedEvents.push(range.animation);
- return protoExpectation;
- });
- }
-
- /**
- * Get all the events (prepareMailbox and serviceScriptedAnimations)
- * relevant to WebGL. Note that modelHelper is the helper object containing
- * the model, and mailboxEvents and animationEvents are arrays where the
- * events are being pushed into (DrawingBuffer::prepareMailbox events go
- * into mailboxEvents; PageAnimator::serviceScriptedAnimations events go
- * into animationEvents). The function does not return anything but
- * modifies mailboxEvents and animationEvents.
- */
- function findWebGLEvents(modelHelper, mailboxEvents, animationEvents) {
- for (var event of modelHelper.model.getDescendantEvents()) {
- if (event.title === 'DrawingBuffer::prepareMailbox')
- mailboxEvents.push(event);
- else if (event.title === 'PageAnimator::serviceScriptedAnimations')
- animationEvents.push(event);
- }
- }
-
- /**
- * Returns a list of events in mailboxEvents that have an event in
- * animationEvents close by (within ANIMATION_MERGE_THRESHOLD_MS).
- */
- function findMailboxEventsNearAnimationEvents(
- mailboxEvents, animationEvents) {
- if (animationEvents.length === 0)
- return [];
-
- mailboxEvents.sort(compareEvents);
- animationEvents.sort(compareEvents);
- var animationIterator = animationEvents[Symbol.iterator]();
- var animationEvent = animationIterator.next().value;
-
- var filteredEvents = [];
-
- // We iterate through the mailboxEvents. With each event, we check if
- // there is a animationEvent near it, and if so, add it to the result.
- for (var event of mailboxEvents) {
- // If the current animationEvent is too far before the mailboxEvent,
- // we advance until we get to the next animationEvent that is not too
- // far before the animationEvent.
- while (animationEvent &&
- (animationEvent.start < (
- event.start - ANIMATION_MERGE_THRESHOLD_MS)))
- animationEvent = animationIterator.next().value;
-
- // If there aren't any more animationEvents, then that means all the
- // remaining mailboxEvents are too far after the animationEvents, so
- // we can quit now.
- if (!animationEvent)
- break;
-
- // If there's a animationEvent close to the mailboxEvent, then we push
- // the current mailboxEvent onto the stack.
- if (animationEvent.start < (event.start + ANIMATION_MERGE_THRESHOLD_MS))
- filteredEvents.push(event);
- }
- return filteredEvents;
- }
-
- /**
- * Merge consecutive mailbox events into a ProtoExpectation. Note: Only
- * the drawingBuffer::prepareMailbox events will end up in the
- * associatedEvents. The PageAnimator::serviceScriptedAnimations events
- * will not end up in the associatedEvents.
- */
- function createProtoExpectationsFromMailboxEvents(mailboxEvents) {
- var protoExpectations = [];
- var currentPE = undefined;
- for (var event of mailboxEvents) {
- if (currentPE === undefined || !currentPE.isNear(
- event, ANIMATION_MERGE_THRESHOLD_MS)) {
- currentPE = new ProtoExpectation(
- ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.WEBGL);
- currentPE.pushEvent(event);
- protoExpectations.push(currentPE);
- }
- else {
- currentPE.pushEvent(event);
- }
- }
- return protoExpectations;
- }
-
- // WebGL animations are identified by the DrawingBuffer::prepareMailbox
- // and PageAnimator::serviceScriptedAnimations events (one of each per frame)
- // and consecutive frames are merged into the same animation.
- function handleWebGLAnimations(modelHelper, sortedInputEvents) {
- // Get the prepareMailbox and scriptedAnimation events.
- var prepareMailboxEvents = [];
- var scriptedAnimationEvents = [];
-
- findWebGLEvents(modelHelper, prepareMailboxEvents, scriptedAnimationEvents);
- var webGLMailboxEvents = findMailboxEventsNearAnimationEvents(
- prepareMailboxEvents, scriptedAnimationEvents);
-
- return createProtoExpectationsFromMailboxEvents(webGLMailboxEvents);
- }
-
-
- function postProcessProtoExpectations(modelHelper, protoExpectations) {
- // protoExpectations is input only. Returns a modified set of
- // ProtoExpectations. The order is important.
- protoExpectations = findFrameEventsForAnimations(
- modelHelper, protoExpectations);
- protoExpectations = mergeIntersectingResponses(protoExpectations);
- protoExpectations = mergeIntersectingAnimations(protoExpectations);
- protoExpectations = fixResponseAnimationStarts(protoExpectations);
- protoExpectations = fixTapResponseTouchAnimations(protoExpectations);
- return protoExpectations;
- }
-
- /**
- * TouchStarts happen at the same time as ScrollBegins.
- * It's easier to let multiple handlers create multiple overlapping
- * Responses and then merge them, rather than make the handlers aware of the
- * other handlers' PEs.
- *
- * For example:
- * RR
- * RRR -> RRRRR
- * RR
- *
- * protoExpectations is input only.
- * Returns a modified set of ProtoExpectations.
- */
- function mergeIntersectingResponses(protoExpectations) {
- var newPEs = [];
- while (protoExpectations.length) {
- var pe = protoExpectations.shift();
- newPEs.push(pe);
-
- // Only consider Responses for now.
- if (pe.irType !== ProtoExpectation.RESPONSE_TYPE)
- continue;
-
- for (var i = 0; i < protoExpectations.length; ++i) {
- var otherPE = protoExpectations[i];
-
- if (otherPE.irType !== pe.irType)
- continue;
-
- if (!otherPE.intersects(pe))
- continue;
-
- // Don't merge together Responses of the same type.
- // If handleTouchEvents wanted two of its Responses to be merged, then
- // it would have made them that way to begin with.
- var typeNames = pe.associatedEvents.map(function(event) {
- return event.typeName;
- });
- if (otherPE.containsTypeNames(typeNames))
- continue;
-
- pe.merge(otherPE);
- protoExpectations.splice(i, 1);
-
- // Don't skip the next otherPE!
- --i;
- }
- }
- return newPEs;
- }
-
- /**
- * An animation is simply an expectation of 60fps between start and end.
- * If two animations overlap, then merge them.
- *
- * For example:
- * AA
- * AAA -> AAAAA
- * AA
- *
- * protoExpectations is input only.
- * Returns a modified set of ProtoExpectations.
- */
- function mergeIntersectingAnimations(protoExpectations) {
- var newPEs = [];
- while (protoExpectations.length) {
- var pe = protoExpectations.shift();
- newPEs.push(pe);
-
- // Only consider Animations for now.
- if (pe.irType !== ProtoExpectation.ANIMATION_TYPE)
- continue;
-
- var isCSS = pe.containsSliceTitle(CSS_ANIMATION_TITLE);
- var isFling = pe.containsTypeNames([INPUT_TYPE.FLING_START]);
- var isVideo = pe.containsTypeNames([INITIATOR_TYPE.VIDEO]);
-
- for (var i = 0; i < protoExpectations.length; ++i) {
- var otherPE = protoExpectations[i];
-
- if (otherPE.irType !== pe.irType)
- continue;
-
- // Don't merge CSS Animations with any other types.
- if (isCSS !== otherPE.containsSliceTitle(CSS_ANIMATION_TITLE))
- continue;
-
- if (isCSS) {
- if (!pe.isNear(otherPE, ANIMATION_MERGE_THRESHOLD_MS))
- continue;
- } else if (!otherPE.intersects(pe)) {
- continue;
- }
-
- // Don't merge Fling Animations with any other types.
- if (isFling !== otherPE.containsTypeNames([INPUT_TYPE.FLING_START]))
- continue;
-
- // Don't merge Video Animations with any other types.
- if (isVideo !== otherPE.containsTypeNames([INITIATOR_TYPE.VIDEO]))
- continue;
-
- pe.merge(otherPE);
- protoExpectations.splice(i, 1);
- // Don't skip the next otherPE!
- --i;
- }
- }
- return newPEs;
- }
-
- /**
- * The ends of responses frequently overlap the starts of animations.
- * Fix the animations to reflect the fact that the user can only start to
- * expect 60fps after the response.
- *
- * For example:
- * RRR -> RRRAA
- * AAAA
- *
- * protoExpectations is input only.
- * Returns a modified set of ProtoExpectations.
- */
- function fixResponseAnimationStarts(protoExpectations) {
- protoExpectations.forEach(function(ape) {
- // Only consider animations for now.
- if (ape.irType !== ProtoExpectation.ANIMATION_TYPE)
- return;
-
- protoExpectations.forEach(function(rpe) {
- // Only consider responses for now.
- if (rpe.irType !== ProtoExpectation.RESPONSE_TYPE)
- return;
-
- // Only consider responses that end during the animation.
- if (!ape.containsTimestampInclusive(rpe.end))
- return;
-
- // Ignore Responses that are entirely contained by the animation.
- if (ape.containsTimestampInclusive(rpe.start))
- return;
-
- // Move the animation start to the response end.
- ape.start = rpe.end;
- });
- });
- return protoExpectations;
- }
-
- /**
- * Merge Tap Responses that overlap Touch-only Animations.
- * https: *github.com/catapult-project/catapult/issues/1431
- */
- function fixTapResponseTouchAnimations(protoExpectations) {
- function isTapResponse(pe) {
- return (pe.irType === ProtoExpectation.RESPONSE_TYPE) &&
- pe.containsTypeNames([INPUT_TYPE.TAP]);
- }
- function isTouchAnimation(pe) {
- return (pe.irType === ProtoExpectation.ANIMATION_TYPE) &&
- pe.containsTypeNames([INPUT_TYPE.TOUCH_MOVE]) &&
- !pe.containsTypeNames([
- INPUT_TYPE.SCROLL_UPDATE, INPUT_TYPE.PINCH_UPDATE]);
- }
- var newPEs = [];
- while (protoExpectations.length) {
- var pe = protoExpectations.shift();
- newPEs.push(pe);
-
- // protoExpectations are sorted by start time, and we don't know whether
- // the Tap Response or the Touch Animation will be first
- var peIsTapResponse = isTapResponse(pe);
- var peIsTouchAnimation = isTouchAnimation(pe);
- if (!peIsTapResponse && !peIsTouchAnimation)
- continue;
-
- for (var i = 0; i < protoExpectations.length; ++i) {
- var otherPE = protoExpectations[i];
-
- if (!otherPE.intersects(pe))
- continue;
-
- if (peIsTapResponse && !isTouchAnimation(otherPE))
- continue;
-
- if (peIsTouchAnimation && !isTapResponse(otherPE))
- continue;
-
- // pe might be the Touch Animation, but the merged ProtoExpectation
- // should be a Response.
- pe.irType = ProtoExpectation.RESPONSE_TYPE;
-
- pe.merge(otherPE);
- protoExpectations.splice(i, 1);
- // Don't skip the next otherPE!
- --i;
- }
- }
- return newPEs;
- }
-
- function findFrameEventsForAnimations(modelHelper, protoExpectations) {
- var newPEs = [];
- var frameEventsByPid = getSortedFrameEventsByProcess(modelHelper);
-
- for (var pe of protoExpectations) {
- if (pe.irType !== ProtoExpectation.ANIMATION_TYPE) {
- newPEs.push(pe);
- continue;
- }
-
- var frameEvents = [];
- // TODO(benjhayden): Use frame blame contexts here.
- for (var pid of Object.keys(modelHelper.rendererHelpers)) {
- var range = tr.b.Range.fromExplicitRange(pe.start, pe.end);
- frameEvents.push.apply(frameEvents,
- range.filterArray(frameEventsByPid[pid], e => e.start));
- }
-
- // If a tree falls in a forest...
- // If there were not actually any frames while the animation was
- // running, then it wasn't really an animation, now, was it?
- // Philosophy aside, the system_health Animation metrics fail hard if
- // there are no frames in an AnimationExpectation.
- // Since WebGL animations don't generate this type of frame event,
- // don't remove them if it's a WebGL animation.
- // TODO(alexandermont): Identify what the correct frame event to
- // use here is.
- if (frameEvents.length === 0 &&
- !(pe.initiatorType === INITIATOR_TYPE.WEBGL)) {
- pe.irType = ProtoExpectation.IGNORED_TYPE;
- newPEs.push(pe);
- continue;
- }
-
- pe.associatedEvents.addEventSet(frameEvents);
- newPEs.push(pe);
- }
-
- return newPEs;
- }
-
- /**
- * Check that none of the handlers accidentally ignored an input event.
- */
- function checkAllInputEventsHandled(sortedInputEvents, protoExpectations) {
- var handledEvents = [];
- protoExpectations.forEach(function(protoExpectation) {
- protoExpectation.associatedEvents.forEach(function(event) {
- // Ignore CSS Animations that might have multiple active ranges.
- if ((event.title === CSS_ANIMATION_TITLE) &&
- (event.subSlices.length > 0))
- return;
-
- if ((handledEvents.indexOf(event) >= 0) &&
- (event.title !== tr.model.helpers.IMPL_RENDERING_STATS)) {
- console.error('double-handled event', event.typeName,
- parseInt(event.start), parseInt(event.end), protoExpectation);
- return;
- }
- handledEvents.push(event);
- });
- });
-
- sortedInputEvents.forEach(function(event) {
- if (handledEvents.indexOf(event) < 0) {
- console.error('UNHANDLED INPUT EVENT!',
- event.typeName, parseInt(event.start), parseInt(event.end));
- }
- });
- }
-
- /**
- * Find ProtoExpectations, post-process them, convert them to real IRs.
- */
- function findInputExpectations(modelHelper) {
- var sortedInputEvents = getSortedInputEvents(modelHelper);
- var protoExpectations = findProtoExpectations(
- modelHelper, sortedInputEvents);
- protoExpectations = postProcessProtoExpectations(
- modelHelper, protoExpectations);
- checkAllInputEventsHandled(sortedInputEvents, protoExpectations);
-
- var irs = [];
- protoExpectations.forEach(function(protoExpectation) {
- var ir = protoExpectation.createInteractionRecord(modelHelper.model);
- if (ir)
- irs.push(ir);
- });
- return irs;
- }
-
- return {
- findInputExpectations: findInputExpectations,
- compareEvents: compareEvents,
- CSS_ANIMATION_TITLE: CSS_ANIMATION_TITLE,
- INITIATOR_TYPE: INITIATOR_TYPE
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/find_load_expectations.html b/chromium/third_party/catapult/tracing/tracing/importer/find_load_expectations.html
deleted file mode 100644
index c9135599c8c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/find_load_expectations.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/load_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- // This global instant event marks the start of a navigation.
- var NAVIGATION_START = 'NavigationTiming navigationStart';
-
- // This render-process instant event marks the first contentful paint in a
- // main frame.
- var FIRST_CONTENTFUL_PAINT_TITLE = 'firstContentfulPaint';
-
- function findLoadExpectations(modelHelper) {
- var events = [];
- for (var event of modelHelper.model.getDescendantEvents()) {
- if ((event.title === NAVIGATION_START) ||
- (event.title === FIRST_CONTENTFUL_PAINT_TITLE))
- events.push(event);
- }
- events.sort(tr.importer.compareEvents);
-
- var loads = [];
- var startEvent = undefined;
- // TODO(alexandermont): What's supposed to happen if there are two
- // NAVIGATION_STARTs with no FIRST_CONTENTFUL_PAINT_TITLE between
- // them? Are you supposed to just "lose" the first NAVIGATION_START,
- // like what's happening now?
- for (var event of events) {
- if (event.title === NAVIGATION_START) {
- startEvent = event;
- } else if (event.title === FIRST_CONTENTFUL_PAINT_TITLE) {
- if (startEvent) {
- loads.push(new tr.model.um.LoadExpectation(
- modelHelper.model, tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL,
- startEvent.start, event.start - startEvent.start));
- startEvent = undefined;
- }
- }
- }
-
- // If the trace ended between navigation start and first contentful paint,
- // then make a LoadExpectation that ends at the end of the trace.
- if (startEvent) {
- loads.push(new tr.model.um.LoadExpectation(
- modelHelper.model, tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL,
- startEvent.start, modelHelper.model.bounds.max - startEvent.start));
- }
-
- return loads;
- }
-
- return {
- findLoadExpectations: findLoadExpectations
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/find_startup_expectations.html b/chromium/third_party/catapult/tracing/tracing/importer/find_startup_expectations.html
deleted file mode 100644
index 01fc9d7153e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/find_startup_expectations.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/startup_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- function getAllFrameEvents(modelHelper) {
- var frameEvents = [];
- frameEvents.push.apply(frameEvents,
- modelHelper.browserHelper.getFrameEventsInRange(
- tr.model.helpers.IMPL_FRAMETIME_TYPE, modelHelper.model.bounds));
-
- tr.b.iterItems(modelHelper.rendererHelpers, function(pid, renderer) {
- frameEvents.push.apply(frameEvents, renderer.getFrameEventsInRange(
- tr.model.helpers.IMPL_FRAMETIME_TYPE, modelHelper.model.bounds));
- });
- return frameEvents.sort(tr.importer.compareEvents);
- }
-
- // If a thread contains a typical initialization slice, then the first event
- // on that thread is a startup event.
- function getStartupEvents(modelHelper) {
- function isStartupSlice(slice) {
- return slice.title === 'BrowserMainLoop::CreateThreads';
- }
- var events = modelHelper.browserHelper.getAllAsyncSlicesMatching(
- isStartupSlice);
- var deduper = new tr.model.EventSet();
- events.forEach(function(event) {
- var sliceGroup = event.parentContainer.sliceGroup;
- var slice = sliceGroup && sliceGroup.findFirstSlice();
- if (slice)
- deduper.push(slice);
- });
- return deduper.toArray();
- }
-
- // Match every event in |openingEvents| to the first following event from
- // |closingEvents| and return an array containing a load interaction record
- // for each pair.
- function findStartupExpectations(modelHelper) {
- var openingEvents = getStartupEvents(modelHelper);
- var closingEvents = getAllFrameEvents(modelHelper);
- var startups = [];
- openingEvents.forEach(function(openingEvent) {
- closingEvents.forEach(function(closingEvent) {
- // Ignore opening event that already have a closing event.
- if (openingEvent.closingEvent)
- return;
-
- // Ignore closing events that already belong to an opening event.
- if (closingEvent.openingEvent)
- return;
-
- // Ignore closing events before |openingEvent|.
- if (closingEvent.start <= openingEvent.start)
- return;
-
- // Ignore events from different threads.
- if (openingEvent.parentContainer.parent.pid !==
- closingEvent.parentContainer.parent.pid)
- return;
-
- // This is the first closing event for this opening event, record it.
- openingEvent.closingEvent = closingEvent;
- closingEvent.openingEvent = openingEvent;
- var se = new tr.model.um.StartupExpectation(
- modelHelper.model, openingEvent.start,
- closingEvent.end - openingEvent.start);
- se.associatedEvents.push(openingEvent);
- se.associatedEvents.push(closingEvent);
- startups.push(se);
- });
- });
- return startups;
- }
-
- return {
- findStartupExpectations: findStartupExpectations
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/import.html b/chromium/third_party/catapult/tracing/tracing/importer/import.html
deleted file mode 100644
index 7ee18d90d34..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/import.html
+++ /dev/null
@@ -1,396 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/timing.html">
-<link rel="import" href="/tracing/importer/empty_importer.html">
-<link rel="import" href="/tracing/importer/importer.html">
-<link rel="import" href="/tracing/importer/user_model_builder.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- var Timing = tr.b.Timing;
-
- function ImportOptions() {
- this.shiftWorldToZero = true;
- this.pruneEmptyContainers = true;
- this.showImportWarnings = true;
- this.trackDetailedModelStats = false;
-
- // Callback called after
- // importers run in which more data can be added to the model, before it is
- // finalized.
- this.customizeModelCallback = undefined;
-
- var auditorTypes = tr.c.Auditor.getAllRegisteredTypeInfos();
- this.auditorConstructors = auditorTypes.map(function(typeInfo) {
- return typeInfo.constructor;
- });
- }
-
- function Import(model, opt_options) {
- if (model === undefined)
- throw new Error('Must provide model to import into.');
-
- // TODO(dsinclair): Check the model is empty.
-
- this.importing_ = false;
- this.importOptions_ = opt_options || new ImportOptions();
-
- this.model_ = model;
- this.model_.importOptions = this.importOptions_;
- }
-
- Import.prototype = {
- __proto__: Object.prototype,
-
- /**
- * Imports the provided traces into the model. The eventData type
- * is undefined and will be passed to all the importers registered
- * via Importer.register. The first importer that returns true
- * for canImport(events) will be used to import the events.
- *
- * The primary trace is provided via the eventData variable. If multiple
- * traces are to be imported, specify the first one as events, and the
- * remainder in the opt_additionalEventData array.
- *
- * @param {Array} traces An array of eventData to be imported. Each
- * eventData should correspond to a single trace file and will be handled by
- * a separate importer.
- */
- importTraces: function(traces) {
- var progressMeter = {
- update: function(msg) {}
- };
-
- tr.b.Task.RunSynchronously(
- this.createImportTracesTask(progressMeter, traces));
- },
-
- /**
- * Imports a trace with the usual options from importTraces, but
- * does so using idle callbacks, putting up an import dialog
- * during the import process.
- */
- importTracesWithProgressDialog: function(traces) {
- if (tr.isHeadless)
- throw new Error('Cannot use this method in headless mode.');
-
- var overlay = tr.ui.b.Overlay();
- overlay.title = 'Importing...';
- overlay.userCanClose = false;
- overlay.msgEl = document.createElement('div');
- Polymer.dom(overlay).appendChild(overlay.msgEl);
- overlay.msgEl.style.margin = '20px';
- overlay.update = function(msg) {
- Polymer.dom(this.msgEl).textContent = msg;
- };
- overlay.visible = true;
-
- var promise =
- tr.b.Task.RunWhenIdle(this.createImportTracesTask(overlay, traces));
- promise.then(
- function() { overlay.visible = false; },
- function(err) { overlay.visible = false; }
- );
- return promise;
- },
-
- /**
- * Creates a task that will import the provided traces into the model,
- * updating the progressMeter as it goes. Parameters are as defined in
- * importTraces.
- */
- createImportTracesTask: function(progressMeter, traces) {
- if (this.importing_)
- throw new Error('Already importing.');
- this.importing_ = true;
-
- // Just some simple setup. It is useful to have a no-op first
- // task so that we can set up the lastTask = lastTask.after()
- // pattern that follows.
- var importTask = new tr.b.Task(function prepareImport() {
- progressMeter.update('I will now import your traces for you...');
- }, this);
- var lastTask = importTask;
-
- var importers = [];
-
- lastTask = lastTask.timedAfter('TraceImport', function createImports() {
- // Copy the traces array, we may mutate it.
- traces = traces.slice(0);
- progressMeter.update('Creating importers...');
- // Figure out which importers to use.
- for (var i = 0; i < traces.length; ++i)
- importers.push(this.createImporter_(traces[i]));
-
- // Some traces have other traces inside them. Before doing the full
- // import, ask the importer if it has any subtraces, and if so, create
- // importers for them, also.
- for (var i = 0; i < importers.length; i++) {
- var subtraces = importers[i].extractSubtraces();
- for (var j = 0; j < subtraces.length; j++) {
- try {
- traces.push(subtraces[j]);
- importers.push(this.createImporter_(subtraces[j]));
- } catch (error) {
- // TODO(kphanee): Log the subtrace file which has failed.
- console.warn(error.name + ': ' + error.message);
- continue;
- }
- }
- }
-
- if (traces.length && !this.hasEventDataDecoder_(importers)) {
- throw new Error(
- 'Could not find an importer for the provided eventData.');
- }
-
- // Sort them on priority. This ensures importing happens in a
- // predictable order, e.g. ftrace_importer before
- // trace_event_importer.
- importers.sort(function(x, y) {
- return x.importPriority - y.importPriority;
- });
- }, this);
-
- // We import clock sync markers before all other events. This is necessary
- // because we need the clock sync markers in order to know by how much we
- // need to shift the timestamps of other events.
- lastTask = lastTask.timedAfter('TraceImport',
- function importClockSyncMarkers(task) {
- importers.forEach(function(importer, index) {
- task.subTask(Timing.wrapNamedFunction(
- 'TraceImport', importer.importerName,
- function runImportClockSyncMarkersOnOneImporter() {
- progressMeter.update(
- 'Importing clock sync markers ' + (index + 1) + ' of ' +
- importers.length);
- importer.importClockSyncMarkers();
- }), this);
- }, this);
- }, this);
-
- // Run the import.
- lastTask = lastTask.timedAfter('TraceImport', function runImport(task) {
- importers.forEach(function(importer, index) {
- task.subTask(Timing.wrapNamedFunction(
- 'TraceImport', importer.importerName,
- function runImportEventsOnOneImporter() {
- progressMeter.update(
- 'Importing ' + (index + 1) + ' of ' + importers.length);
- importer.importEvents();
- }), this);
- }, this);
- }, this);
-
- // Run the cusomizeModelCallback if needed.
- if (this.importOptions_.customizeModelCallback) {
- lastTask = lastTask.timedAfter('TraceImport',
- function runCustomizeCallbacks(task) {
- this.importOptions_.customizeModelCallback(this.model_);
- }, this);
- }
-
- // Import sample data.
- lastTask = lastTask.timedAfter('TraceImport',
- function importSampleData(task) {
- importers.forEach(function(importer, index) {
- progressMeter.update(
- 'Importing sample data ' + (index + 1) + '/' + importers.length);
- importer.importSampleData();
- }, this);
- }, this);
-
- // Autoclose open slices and create subSlices.
- lastTask = lastTask.timedAfter('TraceImport', function runAutoclosers() {
- progressMeter.update('Autoclosing open slices...');
- this.model_.autoCloseOpenSlices();
- this.model_.createSubSlices();
- }, this);
-
- // Finalize import.
- lastTask = lastTask.timedAfter('TraceImport',
- function finalizeImport(task) {
- importers.forEach(function(importer, index) {
- progressMeter.update(
- 'Finalizing import ' + (index + 1) + '/' + importers.length);
- importer.finalizeImport();
- }, this);
- }, this);
-
- // Run preinit.
- lastTask = lastTask.timedAfter('TraceImport', function runPreinits() {
- progressMeter.update('Initializing objects (step 1/2)...');
- this.model_.preInitializeObjects();
- }, this);
-
- // Prune empty containers.
- if (this.importOptions_.pruneEmptyContainers) {
- lastTask = lastTask.timedAfter('TraceImport',
- function runPruneEmptyContainers() {
- progressMeter.update('Pruning empty containers...');
- this.model_.pruneEmptyContainers();
- }, this);
- }
-
- // Merge kernel and userland slices on each thread.
- lastTask = lastTask.timedAfter('TraceImport',
- function runMergeKernelWithuserland() {
- progressMeter.update('Merging kernel with userland...');
- this.model_.mergeKernelWithUserland();
- }, this);
-
- // Create auditors
- var auditors = [];
- lastTask = lastTask.timedAfter('TraceImport',
- function createAuditorsAndRunAnnotate() {
- progressMeter.update('Adding arbitrary data to model...');
- auditors = this.importOptions_.auditorConstructors.map(
- function(auditorConstructor) {
- return new auditorConstructor(this.model_);
- }, this);
- auditors.forEach(function(auditor) {
- auditor.runAnnotate();
- auditor.installUserFriendlyCategoryDriverIfNeeded();
- });
- }, this);
-
- lastTask = lastTask.timedAfter('TraceImport',
- function computeWorldBounds() {
- progressMeter.update('Computing final world bounds...');
- this.model_.computeWorldBounds(this.importOptions_.shiftWorldToZero);
- }, this);
-
- // Build the flow event interval tree.
- lastTask = lastTask.timedAfter('TraceImport',
- function buildFlowEventIntervalTree() {
- progressMeter.update('Building flow event map...');
- this.model_.buildFlowEventIntervalTree();
- }, this);
-
- // Join refs.
- lastTask = lastTask.timedAfter('TraceImport', function joinRefs() {
- progressMeter.update('Joining object refs...');
- this.model_.joinRefs();
- }, this);
-
- // Delete any undeleted objects.
- lastTask = lastTask.timedAfter('TraceImport',
- function cleanupUndeletedObjects() {
- progressMeter.update('Cleaning up undeleted objects...');
- this.model_.cleanupUndeletedObjects();
- }, this);
-
- // Sort global and process memory dumps.
- lastTask = lastTask.timedAfter('TraceImport', function sortMemoryDumps() {
- progressMeter.update('Sorting memory dumps...');
- this.model_.sortMemoryDumps();
- }, this);
-
- // Finalize memory dump graphs.
- lastTask = lastTask.timedAfter('TraceImport',
- function finalizeMemoryGraphs() {
- progressMeter.update('Finalizing memory dump graphs...');
- this.model_.finalizeMemoryGraphs();
- }, this);
-
- // Run initializers.
- lastTask = lastTask.timedAfter('TraceImport',
- function initializeObjects() {
- progressMeter.update('Initializing objects (step 2/2)...');
- this.model_.initializeObjects();
- }, this);
-
- // Build event indices mapping from an event id to all flow events.
- lastTask = lastTask.timedAfter('TraceImport',
- function buildEventIndices() {
- progressMeter.update('Building event indices...');
- this.model_.buildEventIndices();
- }, this);
-
- // Build the UserModel.
- lastTask = lastTask.timedAfter('TraceImport', function buildUserModel() {
- progressMeter.update('Building UserModel...');
- var userModelBuilder = new tr.importer.UserModelBuilder(this.model_);
- userModelBuilder.buildUserModel();
- }, this);
-
- // Sort Expectations.
- lastTask = lastTask.timedAfter('TraceImport',
- function sortExpectations() {
- progressMeter.update('Sorting user expectations...');
- this.model_.userModel.sortExpectations();
- }, this);
-
- // Run audits.
- lastTask = lastTask.timedAfter('TraceImport', function runAudits() {
- progressMeter.update('Running auditors...');
- auditors.forEach(function(auditor) {
- auditor.runAudit();
- });
- }, this);
-
- lastTask = lastTask.timedAfter('TraceImport', function sortAlerts() {
- progressMeter.update('Updating alerts...');
- this.model_.sortAlerts();
- }, this);
-
- lastTask = lastTask.timedAfter('TraceImport',
- function lastUpdateBounds() {
- progressMeter.update('Update bounds...');
- this.model_.updateBounds();
- }, this);
-
- lastTask = lastTask.timedAfter('TraceImport',
- function addModelWarnings() {
- progressMeter.update('Looking for warnings...');
- // Log an import warning if the clock is low resolution.
- if (!this.model_.isTimeHighResolution) {
- this.model_.importWarning({
- type: 'low_resolution_timer',
- message: 'Trace time is low resolution, trace may be unusable.',
- showToUser: true
- });
- }
- }, this);
-
- // Cleanup.
- lastTask.after(function() {
- this.importing_ = false;
- }, this);
- return importTask;
- },
-
- createImporter_: function(eventData) {
- var importerConstructor = tr.importer.Importer.findImporterFor(eventData);
- if (!importerConstructor) {
- throw new Error('Couldn\'t create an importer for the provided ' +
- 'eventData.');
- }
- return new importerConstructor(this.model_, eventData);
- },
-
- hasEventDataDecoder_: function(importers) {
- for (var i = 0; i < importers.length; ++i) {
- if (!importers[i].isTraceDataContainer())
- return true;
- }
-
- return false;
- }
- };
-
- return {
- ImportOptions: ImportOptions,
- Import: Import
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/import_test.html b/chromium/third_party/catapult/tracing/tracing/importer/import_test.html
deleted file mode 100644
index a6e11b73241..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/import_test.html
+++ /dev/null
@@ -1,216 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/extras/importer/zip_importer.html">
-<link rel="import" href="/tracing/extras/importer/v8/v8_log_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Base64 = tr.b.Base64;
-
- test('canImportEmpty', function() {
- var m = tr.c.TestUtils.newModelWithEvents([]);
- assert.isDefined(m.modelIndices);
- m = new tr.Model('');
- });
-
- test('canImportSubtraces', function() {
- var systraceLines = [
- 'SurfaceFlinger-2 [001] ...1 1000.0: 0: B|1|taskA',
- 'SurfaceFlinger-2 [001] ...1 2000.0: 0: E',
- ' chrome-3 [001] ...1 2000.0: 0: trace_event_clock_sync: ' +
- 'parent_ts=0'
- ];
- var traceEvents = [
- {ts: 1000, pid: 1, tid: 3, ph: 'B', cat: 'c', name: 'taskB', args: {
- my_object: {id_ref: '0x1000'}
- }},
- {ts: 2000, pid: 1, tid: 3, ph: 'E', cat: 'c', name: 'taskB', args: {}}
- ];
-
- var combined = JSON.stringify({
- traceEvents: traceEvents,
- systemTraceEvents: systraceLines.join('\n')
- });
-
- var m = tr.c.TestUtils.newModelWithEvents([combined]);
- assert.equal(tr.b.dictionaryValues(m.processes).length, 1);
-
- var p1 = m.processes[1];
- assert.isDefined(p1);
-
- var t2 = p1.threads[2];
- var t3 = p1.threads[3];
- assert.isDefined(t2);
- assert.isDefined(t3);
-
- assert.equal(1, 1, t2.sliceGroup.length);
- assert.equal(t2.sliceGroup.slices[0].title, 'taskA');
-
- assert.equal(t3.sliceGroup.length, 1);
- assert.equal(t3.sliceGroup.slices[0].title, 'taskB');
- });
-
- test('canImportCompressedSingleSubtrace', function() {
- var compressedTrace = Base64.atob(
- 'H4sIACKfFVUC/wsuLUpLTE51y8nMS08t0jVSUIg2MDCMV' +
- 'dDT0zNUMDQwMNAzsFIAIqcaw5qSxOJsR65gfDqMEDpcATiC61ZbAAAA');
- var m = tr.c.TestUtils.newModelWithEvents([compressedTrace]);
- assert.equal(1, tr.b.dictionaryValues(m.processes).length);
-
- var p1 = m.processes[1];
- assert.isDefined(p1);
-
- var t2 = p1.threads[2];
- assert.isDefined(t2);
-
- assert.equal(1, t2.sliceGroup.length, 1);
- assert.equal('taskA', t2.sliceGroup.slices[0].title);
- });
-
- test('canImportSubtracesRecursively', function() {
- var systraceLines = [
- 'SurfaceFlinger-2 [001] ...1 1000.0: 0: B|1|taskA',
- 'SurfaceFlinger-2 [001] ...1 2000.0: 0: E',
- ' chrome-3 [001] ...1 2000.0: 0: trace_event_clock_sync: ' +
- 'parent_ts=0'
- ];
- var outerTraceEvents = [
- {ts: 1000, pid: 1, tid: 3, ph: 'B', cat: 'c', name: 'taskB', args: {
- my_object: {id_ref: '0x1000'}
- }}
- ];
-
- var innerTraceEvents = [
- {ts: 2000, pid: 1, tid: 3, ph: 'E', cat: 'c', name: 'taskB', args: {}}
- ];
-
- var innerTrace = JSON.stringify({
- traceEvents: innerTraceEvents,
- systemTraceEvents: systraceLines.join('\n')
- });
-
- var outerTrace = JSON.stringify({
- traceEvents: outerTraceEvents,
- systemTraceEvents: innerTrace
- });
-
- var m = tr.c.TestUtils.newModelWithEvents([outerTrace]);
- assert.equal(tr.b.dictionaryValues(m.processes).length, 1);
-
- var p1 = m.processes[1];
- assert.isDefined(p1);
-
- var t2 = p1.threads[2];
- var t3 = p1.threads[3];
- assert.isDefined(t2);
- assert.isDefined(t3);
-
- assert.equal(1, 1, t2.sliceGroup.length);
- assert.equal(t2.sliceGroup.slices[0].title, 'taskA');
-
- assert.equal(t3.sliceGroup.length, 1);
- assert.equal(t3.sliceGroup.slices[0].title, 'taskB');
- });
-
- test('withImportFailure', function() {
- assert.throw(function() {
- tr.c.TestUtils.newModelWithEvents([malformed]);
- });
- });
-
- test('customizeCallback', function() {
- var m = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(m) {
- var browserProcess = m.getOrCreateProcess(1);
- var browserMain = browserProcess.getOrCreateThread(2);
- browserMain.sliceGroup.beginSlice('cat', 'Task', 0);
- browserMain.sliceGroup.beginSlice('cat', 'SubTask', 1);
- browserMain.sliceGroup.endSlice(9);
- browserMain.sliceGroup.endSlice(10);
- browserMain.sliceGroup.beginSlice('cat', 'Task', 20);
- browserMain.sliceGroup.endSlice(30);
- }
- });
- var t2 = m.processes[1].threads[2];
- assert.equal(t2.sliceGroup.length, 3);
- assert.equal(t2.sliceGroup.topLevelSlices.length, 2);
- });
-
- test('sortsSamples', function() {
- // The 184, 0 and 185 are the tick-times
- // and irrespective of the order
- // in which the lines appear in the trace,
- // the samples should always be sorted by sampling time.
- var m = tr.c.TestUtils.newModelWithEvents([
- 'tick,0x9a,184,0,0x0,5',
- 'tick,0x9b,0,0,0x0,5',
- 'tick,0x9c,185,0,0x0,5']);
- assert.equal(m.samples[0].start, 0);
- assert.equal(m.samples[1].start, 0.184);
- assert.equal(m.samples[2].start, 0.185);
- });
-
- test('sortsGlobalMemoryDumps', function() {
- var m = tr.c.TestUtils.newModelWithEvents([], {
- pruneContainers: false,
- customizeModelCallback: function(m) {
- m.globalMemoryDumps.push(new tr.model.GlobalMemoryDump(m, 1));
- m.globalMemoryDumps.push(new tr.model.GlobalMemoryDump(m, 5));
- m.globalMemoryDumps.push(new tr.model.GlobalMemoryDump(m, 3));
- }
- });
- assert.equal(m.globalMemoryDumps[0].start, 0);
- assert.equal(m.globalMemoryDumps[1].start, 2);
- assert.equal(m.globalMemoryDumps[2].start, 4);
- });
-
- test('finalizesProcessMemoryDumps', function() {
- var p;
- var m = tr.c.TestUtils.newModelWithEvents([], {
- pruneContainers: false,
- customizeModelCallback: function(m) {
- p = m.getOrCreateProcess(1);
-
- var g = new tr.model.GlobalMemoryDump(m, -1);
- m.globalMemoryDumps.push(g);
-
- var pmd1 = new tr.model.ProcessMemoryDump(g, p, 1);
- p.memoryDumps.push(pmd1);
-
- var pmd2 = new tr.model.ProcessMemoryDump(g, p, 5);
- p.memoryDumps.push(pmd2);
-
- var pmd3 = new tr.model.ProcessMemoryDump(g, p, 3);
- p.memoryDumps.push(pmd3);
- pmd3.vmRegions = [];
- }
- });
-
- // Check the sort order.
- assert.equal(p.memoryDumps[0].start, 2);
- assert.equal(p.memoryDumps[1].start, 4);
- assert.equal(p.memoryDumps[2].start, 6);
-
- // Check that the most recent VM regions are linked correctly.
- assert.isUndefined(p.memoryDumps[0].mostRecentVmRegions);
- assert.lengthOf(p.memoryDumps[1].mostRecentVmRegions, 0);
- assert.strictEqual(
- p.memoryDumps[1].mostRecentVmRegions,
- p.memoryDumps[2].mostRecentVmRegions);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/importer.html b/chromium/third_party/catapult/tracing/tracing/importer/importer.html
deleted file mode 100644
index b981c1be8bd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/importer.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/extension_registry.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Base class for trace data importers.
- */
-tr.exportTo('tr.importer', function() {
- function Importer() { }
-
- Importer.prototype = {
- __proto__: Object.prototype,
-
- get importerName() {
- return 'Importer';
- },
-
- /**
- * Called by the Model to check whether the importer type stores the actual
- * trace data or just holds it as container for further extraction.
- */
- isTraceDataContainer: function() {
- return false;
- },
-
- /**
- * Called by the Model to extract one or more subtraces from the event data.
- */
- extractSubtraces: function() {
- return [];
- },
-
- /**
- * Called to import clock sync markers into the Model.
- */
- importClockSyncMarkers: function() {
- },
-
- /**
- * Called to import events into the Model.
- */
- importEvents: function() {
- },
-
- /**
- * Called to import sample data into the Model.
- */
- importSampleData: function() {
- },
-
- /**
- * Called by the Model after all other importers have imported their
- * events.
- */
- finalizeImport: function() {
- }
- };
-
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.defaultMetadata = {};
- options.mandatoryBaseClass = Importer;
- tr.b.decorateExtensionRegistry(Importer, options);
-
- Importer.findImporterFor = function(eventData) {
- var typeInfo = Importer.findTypeInfoMatching(function(ti) {
- return ti.constructor.canImport(eventData);
- });
- if (typeInfo)
- return typeInfo.constructor;
- return undefined;
- };
-
- return {
- Importer: Importer
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/proto_expectation.html b/chromium/third_party/catapult/tracing/tracing/importer/proto_expectation.html
deleted file mode 100644
index 58fea74fc0c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/proto_expectation.html
+++ /dev/null
@@ -1,188 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/core/auditor.html">
-<link rel="import" href="/tracing/model/event_info.html">
-<link rel="import" href="/tracing/model/user_model/animation_expectation.html">
-<link rel="import" href="/tracing/model/user_model/response_expectation.html">
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- // This is an intermediate data format between InputLatencyAsyncSlices and
- // Response and Animation IRs.
- function ProtoExpectation(irType, initiatorType) {
- this.irType = irType;
- this.initiatorType = initiatorType;
- this.start = Infinity;
- this.end = -Infinity;
- this.associatedEvents = new tr.model.EventSet();
- this.isAnimationBegin = false;
- }
-
- ProtoExpectation.RESPONSE_TYPE = 'r';
- ProtoExpectation.ANIMATION_TYPE = 'a';
-
- // Explicitly ignore some input events to allow
- // UserModelBuilder.checkAllInputEventsHandled() to determine which events
- // were unintentionally ignored due to a bug.
- ProtoExpectation.IGNORED_TYPE = 'ignored';
-
- /**
- * Combine initiator titles by selecting the initiator title first in a
- * hard-coded hierarchy. Higher up in the hierarchy are more "specific"
- * initiator titles (e.g. a scroll is higher than a touch, because a
- * touch could mean many different things, of which a scroll is one)
- */
- var INITIATOR_HIERARCHY = [
- tr.model.um.INITIATOR_TYPE.PINCH,
- tr.model.um.INITIATOR_TYPE.FLING,
- tr.model.um.INITIATOR_TYPE.MOUSE_WHEEL,
- tr.model.um.INITIATOR_TYPE.SCROLL,
- tr.model.um.INITIATOR_TYPE.VIDEO,
- tr.model.um.INITIATOR_TYPE.WEBGL,
- tr.model.um.INITIATOR_TYPE.CSS,
- tr.model.um.INITIATOR_TYPE.MOUSE,
- tr.model.um.INITIATOR_TYPE.KEYBOARD,
- tr.model.um.INITIATOR_TYPE.TAP,
- tr.model.um.INITIATOR_TYPE.TOUCH
- ];
-
- function combineInitiatorTypes(title1, title2) {
- for (var item of INITIATOR_HIERARCHY)
- if (title1 === item || title2 === item) return item;
- console.error('Invalid titles in combineInitiatorTypes')
- return undefined;
- }
-
- ProtoExpectation.prototype = {
- get isValid() {
- return this.end > this.start;
- },
-
- // Return true if any associatedEvent's typeName is in typeNames.
- containsTypeNames: function(typeNames) {
- return this.associatedEvents.some(
- x => typeNames.indexOf(x.typeName) >= 0);
- },
-
- containsSliceTitle: function(title) {
- return this.associatedEvents.some(x => title === x.title);
- },
-
- createInteractionRecord: function(model) {
- if (!this.isValid) {
- console.error('Invalid ProtoExpectation: ' + this.debug() +
- ' File a bug with this trace!');
- return undefined;
- }
-
- var duration = this.end - this.start;
-
- var ir = undefined;
- switch (this.irType) {
- case ProtoExpectation.RESPONSE_TYPE:
- ir = new tr.model.um.ResponseExpectation(
- model, this.initiatorType, this.start, duration,
- this.isAnimationBegin);
- break;
- case ProtoExpectation.ANIMATION_TYPE:
- ir = new tr.model.um.AnimationExpectation(
- model, this.initiatorType, this.start, duration);
- break;
- }
- if (!ir)
- return undefined;
-
- ir.sourceEvents.addEventSet(this.associatedEvents);
-
- function pushAssociatedEvents(event) {
- ir.associatedEvents.push(event);
-
- // |event| is either an InputLatencyAsyncSlice (which collects all of
- // its associated events transitively) or a CSS Animation (which doesn't
- // have any associated events). So this does not need to recurse.
- if (event.associatedEvents)
- ir.associatedEvents.addEventSet(event.associatedEvents);
- }
-
- this.associatedEvents.forEach(function(event) {
- pushAssociatedEvents(event);
-
- // Old-style InputLatencyAsyncSlices have subSlices.
- if (event.subSlices)
- event.subSlices.forEach(pushAssociatedEvents);
- });
-
- return ir;
- },
-
- // Merge the other ProtoExpectation into this one.
- // The irTypes need not match: ignored ProtoExpectations might be merged
- // into overlapping ProtoExpectations, and Touch-only Animations are merged
- // into Tap Responses.
- merge: function(other) {
- this.initiatorType = combineInitiatorTypes(
- this.initiatorType, other.initiatorType)
-
- // Don't use pushEvent(), which would lose special start, end.
- this.associatedEvents.addEventSet(other.associatedEvents);
- this.start = Math.min(this.start, other.start);
- this.end = Math.max(this.end, other.end);
- if (other.isAnimationBegin)
- this.isAnimationBegin = true;
- },
-
- // Include |event| in this ProtoExpectation, expanding start/end to include
- // it.
- pushEvent: function(event) {
- // Usually, this method will be called while iterating over a list of
- // events sorted by start time, so this method won't usually change
- // this.start. However, this will sometimes be called for
- // ProtoExpectations created by previous handlers, in which case
- // event.start could possibly be before this.start.
- this.start = Math.min(this.start, event.start);
- this.end = Math.max(this.end, event.end);
- this.associatedEvents.push(event);
- },
-
- // Returns true if timestamp is contained in this ProtoExpectation.
- containsTimestampInclusive: function(timestamp) {
- return (this.start <= timestamp) && (timestamp <= this.end);
- },
-
- // Return true if the other event intersects this ProtoExpectation.
- intersects: function(other) {
- // http://stackoverflow.com/questions/325933
- return (other.start < this.end) && (other.end > this.start);
- },
-
- isNear: function(event, threshold) {
- return (this.end + threshold) > event.start;
- },
-
- // Return a string describing this ProtoExpectation for debugging.
- debug: function() {
- var debugString = this.irType + '(';
- debugString += parseInt(this.start) + ' ';
- debugString += parseInt(this.end);
- this.associatedEvents.forEach(function(event) {
- debugString += ' ' + event.typeName;
- });
- return debugString + ')';
- }
- };
-
- return {
- ProtoExpectation: ProtoExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/simple_line_reader.html b/chromium/third_party/catapult/tracing/tracing/importer/simple_line_reader.html
deleted file mode 100644
index cff446e2419..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/simple_line_reader.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- /**
- * @constructor
- */
- function SimpleLineReader(text) {
- this.lines_ = text.split('\n');
- this.curLine_ = 0;
-
- this.savedLines_ = undefined;
- }
-
- SimpleLineReader.prototype = {
- advanceToLineMatching: function(regex) {
- for (; this.curLine_ < this.lines_.length; this.curLine_++) {
- var line = this.lines_[this.curLine_];
- if (this.savedLines_ !== undefined)
- this.savedLines_.push(line);
- if (regex.test(line))
- return true;
- }
- return false;
- },
-
- get curLineNumber() {
- return this.curLine_;
- },
-
- beginSavingLines: function() {
- this.savedLines_ = [];
- },
-
- endSavingLinesAndGetResult: function() {
- var tmp = this.savedLines_;
- this.savedLines_ = undefined;
- return tmp;
- }
- };
-
- return {
- SimpleLineReader: SimpleLineReader
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/user_expectation_verifier.html b/chromium/third_party/catapult/tracing/tracing/importer/user_expectation_verifier.html
deleted file mode 100644
index 2bc8c9e0787..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/user_expectation_verifier.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/chrome_test_utils.html">
-<link rel="import" href="/tracing/importer/user_model_builder.html">
-
-<script>
-'use strict';
-tr.exportTo('tr.importer', function() {
- function compareEvents(x, y) {
- if (x.start !== y.start)
- return x.start - y.start;
- return x.guid - y.guid;
- }
-
- function UserExpectationVerifier() {
- this.customizeModelCallback_ = undefined;
- this.expectedIRs_ = undefined;
- }
-
- UserExpectationVerifier.prototype = {
- set customizeModelCallback(cmc) {
- this.customizeModelCallback_ = cmc;
- },
-
- // |irs| must be sorted by start time.
- set expectedIRs(irs) {
- this.expectedIRs_ = irs;
- },
-
- verify: function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(
- this.customizeModelCallback_);
-
- var failure = undefined;
- try {
- var i = 0;
- assert.lengthOf(model.userModel.expectations,
- this.expectedIRs_.length);
- var actualUEIterator = model.userModel.expectations[Symbol.iterator]();
- for (var expectedIR of this.expectedIRs_) {
- var actualUE = actualUEIterator.next();
- assert.equal(false, actualUE.done);
- var at = 'IRs[' + (i++) + '].';
- assert.equal(expectedIR.title, actualUE.value.title, at + 'title');
- if (expectedIR.name !== undefined)
- assert.equal(expectedIR.name, actualUE.value.name, at + 'name');
- assert.equal(expectedIR.start, actualUE.value.start, at + 'start');
- assert.equal(expectedIR.end, actualUE.value.end, at + 'end');
- assert.equal(expectedIR.eventCount,
- actualUE.value.associatedEvents.length, at + 'eventCount');
- if (actualUE instanceof tr.model.um.ResponseExpectation) {
- assert.equal(expectedIR.isAnimationBegin || false,
- actualUEs.isAnimationBegin, at + 'isAnimationBegin');
- }
- }
- } catch (caught) {
- failure = caught;
- for (var i = 0; i < model.userModel.expectations.length; ++i) {
- console.debug(i, model.userModel.expectations[i]);
- }
- }
-
- var debug = !tr.isHeadless && (
- location.search.split('&').indexOf('debug') >= 0);
- if (!failure && !debug)
- return;
-
- if (failure)
- throw failure;
- }
- };
-
- return {UserExpectationVerifier: UserExpectationVerifier};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/user_model_builder.html b/chromium/third_party/catapult/tracing/tracing/importer/user_model_builder.html
deleted file mode 100644
index 2ee0e452bf7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/user_model_builder.html
+++ /dev/null
@@ -1,231 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/core/auditor.html">
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import" href="/tracing/importer/find_input_expectations.html">
-<link rel="import" href="/tracing/importer/find_load_expectations.html">
-<link rel="import" href="/tracing/importer/find_startup_expectations.html">
-<link rel="import" href="/tracing/model/event_info.html">
-<link rel="import" href="/tracing/model/ir_coverage.html">
-<link rel="import" href="/tracing/model/user_model/idle_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.importer', function() {
- var INSIGNIFICANT_MS = 1;
-
- function UserModelBuilder(model) {
- this.model = model;
- this.modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- };
-
- UserModelBuilder.supportsModelHelper = function(modelHelper) {
- return modelHelper.browserHelper !== undefined;
- };
-
- UserModelBuilder.prototype = {
- buildUserModel: function() {
- if (!this.modelHelper || !this.modelHelper.browserHelper)
- return;
-
- var expectations = undefined;
- try {
- expectations = this.findUserExpectations();
- // There are not currently any known cases when this could throw.
- } catch (error) {
- this.model.importWarning({
- type: 'UserModelBuilder',
- message: error,
- showToUser: true
- });
- return;
- }
- expectations.forEach(function(expectation) {
- this.model.userModel.expectations.push(expectation);
- }, this);
-
- // TODO(benjhayden) Find Gestures here.
- },
-
- findUserExpectations: function() {
- var expectations = [];
- expectations.push.apply(expectations, tr.importer.findStartupExpectations(
- this.modelHelper));
- expectations.push.apply(expectations, tr.importer.findLoadExpectations(
- this.modelHelper));
- expectations.push.apply(expectations, tr.importer.findInputExpectations(
- this.modelHelper));
- // findIdleExpectations must be called last!
- expectations.push.apply(
- expectations, this.findIdleExpectations(expectations));
- this.collectUnassociatedEvents_(expectations);
- return expectations;
- },
-
- // Find all unassociated top-level ThreadSlices. If they start during an
- // Idle or Load IR, then add their entire hierarchy to that IR.
- collectUnassociatedEvents_: function(rirs) {
- var vacuumIRs = [];
- rirs.forEach(function(ir) {
- if (ir instanceof tr.model.um.IdleExpectation ||
- ir instanceof tr.model.um.LoadExpectation ||
- ir instanceof tr.model.um.StartupExpectation)
- vacuumIRs.push(ir);
- });
- if (vacuumIRs.length === 0)
- return;
-
- var allAssociatedEvents = tr.model.getAssociatedEvents(rirs);
- var unassociatedEvents = tr.model.getUnassociatedEvents(
- this.model, allAssociatedEvents);
-
- unassociatedEvents.forEach(function(event) {
- if (!(event instanceof tr.model.ThreadSlice))
- return;
-
- if (!event.isTopLevel)
- return;
-
- for (var iri = 0; iri < vacuumIRs.length; ++iri) {
- var ir = vacuumIRs[iri];
-
- if ((event.start >= ir.start) &&
- (event.start < ir.end)) {
- ir.associatedEvents.addEventSet(event.entireHierarchy);
- return;
- }
- }
- });
- },
-
- // Fill in the empty space between IRs with IdleIRs.
- findIdleExpectations: function(otherIRs) {
- if (this.model.bounds.isEmpty)
- return;
- var emptyRanges = tr.b.findEmptyRangesBetweenRanges(
- tr.b.convertEventsToRanges(otherIRs),
- this.model.bounds);
- var irs = [];
- var model = this.model;
- emptyRanges.forEach(function(range) {
- // Ignore insignificantly tiny idle ranges.
- if (range.max < (range.min + INSIGNIFICANT_MS))
- return;
- irs.push(new tr.model.um.IdleExpectation(
- model, range.min, range.max - range.min));
- });
- return irs;
- }
- };
-
- function createCustomizeModelLinesFromModel(model) {
- var modelLines = [];
- modelLines.push(' audits.addEvent(model.browserMain,');
- modelLines.push(' {title: \'model start\', start: 0, end: 1});');
-
- var typeNames = {};
- for (var typeName in tr.e.cc.INPUT_EVENT_TYPE_NAMES) {
- typeNames[tr.e.cc.INPUT_EVENT_TYPE_NAMES[typeName]] = typeName;
- }
-
- var modelEvents = new tr.model.EventSet();
- model.userModel.expectations.forEach(function(ir, index) {
- modelEvents.addEventSet(ir.sourceEvents);
- });
- modelEvents = modelEvents.toArray();
- modelEvents.sort(tr.importer.compareEvents);
-
- modelEvents.forEach(function(event) {
- var startAndEnd = 'start: ' + parseInt(event.start) + ', ' +
- 'end: ' + parseInt(event.end) + '});';
- if (event instanceof tr.e.cc.InputLatencyAsyncSlice) {
- modelLines.push(' audits.addInputEvent(model, INPUT_TYPE.' +
- typeNames[event.typeName] + ',');
- } else if (event.title === 'RenderFrameImpl::didCommitProvisionalLoad') {
- modelLines.push(' audits.addCommitLoadEvent(model,');
- } else if (event.title ===
- 'InputHandlerProxy::HandleGestureFling::started') {
- modelLines.push(' audits.addFlingAnimationEvent(model,');
- } else if (event.title === tr.model.helpers.IMPL_RENDERING_STATS) {
- modelLines.push(' audits.addFrameEvent(model,');
- } else if (event.title === tr.importer.CSS_ANIMATION_TITLE) {
- modelLines.push(' audits.addEvent(model.rendererMain, {');
- modelLines.push(' title: \'Animation\', ' + startAndEnd);
- return;
- } else {
- throw ('You must extend createCustomizeModelLinesFromModel()' +
- 'to support this event:\n' + event.title + '\n');
- }
- modelLines.push(' {' + startAndEnd);
- });
-
- modelLines.push(' audits.addEvent(model.browserMain,');
- modelLines.push(' {' +
- 'title: \'model end\', ' +
- 'start: ' + (parseInt(model.bounds.max) - 1) + ', ' +
- 'end: ' + parseInt(model.bounds.max) + '});');
- return modelLines;
- }
-
- function createExpectedIRLinesFromModel(model) {
- var expectedLines = [];
- var irCount = model.userModel.expectations.length;
- model.userModel.expectations.forEach(function(ir, index) {
- var irString = ' {';
- irString += 'title: \'' + ir.title + '\', ';
- irString += 'start: ' + parseInt(ir.start) + ', ';
- irString += 'end: ' + parseInt(ir.end) + ', ';
- irString += 'eventCount: ' + ir.sourceEvents.length;
- irString += '}';
- if (index < (irCount - 1))
- irString += ',';
- expectedLines.push(irString);
- });
- return expectedLines;
- }
-
- function createIRFinderTestCaseStringFromModel(model) {
- var filename = window.location.hash.substr(1);
- var testName = filename.substr(filename.lastIndexOf('/') + 1);
- testName = testName.substr(0, testName.indexOf('.'));
-
- // createCustomizeModelLinesFromModel() throws an error if there's an
- // unsupported event.
- try {
- var testLines = [];
- testLines.push(' /*');
- testLines.push(' This test was generated from');
- testLines.push(' ' + filename + '');
- testLines.push(' */');
- testLines.push(' test(\'' + testName + '\', function() {');
- testLines.push(' var verifier = new UserExpectationVerifier();');
- testLines.push(' verifier.customizeModelCallback = function(model) {');
- testLines.push.apply(testLines,
- createCustomizeModelLinesFromModel(model));
- testLines.push(' };');
- testLines.push(' verifier.expectedIRs = [');
- testLines.push.apply(testLines, createExpectedIRLinesFromModel(model));
- testLines.push(' ];');
- testLines.push(' verifier.verify();');
- testLines.push(' });');
- return testLines.join('\n');
- } catch (error) {
- return error;
- }
- }
-
- return {
- UserModelBuilder: UserModelBuilder,
- createIRFinderTestCaseStringFromModel: createIRFinderTestCaseStringFromModel
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/importer/user_model_builder_test.html b/chromium/third_party/catapult/tracing/tracing/importer/user_model_builder_test.html
deleted file mode 100644
index 97ec7cd981a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/importer/user_model_builder_test.html
+++ /dev/null
@@ -1,1177 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_test_utils.html">
-<link rel="import" href="/tracing/importer/user_expectation_verifier.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var INPUT_TYPE = tr.e.cc.INPUT_EVENT_TYPE_NAMES;
- var ChromeTestUtils = tr.e.chrome.ChromeTestUtils;
- var UserExpectationVerifier = tr.importer.UserExpectationVerifier;
-
- function addFrameEventForInput(model, event) {
- var frame = ChromeTestUtils.addFrameEvent(model,
- {start: event.start, end: event.end, isTopLevel: true});
- model.flowEvents.push(tr.c.TestUtils.newFlowEventEx({
- id: event.id,
- start: event.start,
- end: event.end,
- startSlice: frame,
- endSlice: frame
- }));
- }
-
- test('empty', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- };
- verifier.expectedIRs = [
- ];
- verifier.verify();
- });
-
- test('videoExpectations_gapInMiddle', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'VideoPlayback', start: 0, end: 100, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 10, end: 20});
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'VideoPlayback', start: 200, end: 300, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 210, end: 220});
- };
- verifier.expectedIRs = [
- {title: 'Video Animation', start: 0, end: 100, eventCount: 2},
- {title: 'Idle', start: 100, end: 200, eventCount: 0},
- {title: 'Video Animation', start: 200, end: 300, eventCount: 2},
- ];
- verifier.verify();
- });
-
- test('videoExpectations_overlapping', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'VideoPlayback', start: 0, end: 200, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 10, end: 20});
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'VideoPlayback', start: 100, end: 300, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 210, end: 220});
- };
- verifier.expectedIRs = [
- {title: 'Video Animation', start: 0, end: 300, eventCount: 4},
- ];
- verifier.verify();
- });
-
- test('videoExpectations_oneInTheOther', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'VideoPlayback', start: 0, end: 300, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 10, end: 20});
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'VideoPlayback', start: 100, end: 200, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 110, end: 120});
- };
- verifier.expectedIRs = [
- {title: 'Video Animation', start: 0, end: 300, eventCount: 4},
- ];
- verifier.verify();
- });
-
- test('slowMouseMoveResponses', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_DOWN, {start: 0, end: 10});
- var mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 10, end: 20, id: '0x100'});
- addFrameEventForInput(model, mouseMove);
-
- mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 70, end: 80, id: '0x101'});
- addFrameEventForInput(model, mouseMove);
-
- mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 130, end: 140, id: '0x102'});
- addFrameEventForInput(model, mouseMove);
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 10, eventCount: 0},
- {title: 'Mouse Response', start: 10, end: 20, eventCount: 4},
- {title: 'Idle', start: 20, end: 70, eventCount: 0},
- {title: 'Mouse Response', start: 70, end: 80, eventCount: 3},
- {title: 'Idle', start: 80, end: 130, eventCount: 0},
- {title: 'Mouse Response', start: 130, end: 140, eventCount: 3}
- ];
- verifier.verify();
- });
-
- test('mouseEventResponses', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- var mouseDown = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_DOWN, {start: 0, end: 50, id: '0x100'});
- addFrameEventForInput(model, mouseDown);
-
- var mouseUp = ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_UP,
- {start: 50, end: 100, id: '0x101'});
- addFrameEventForInput(model, mouseUp);
-
- var mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 200, end: 250, id: '0x102'});
- addFrameEventForInput(model, mouseMove);
- };
- verifier.expectedIRs = [
- {title: 'Mouse Response', start: 0, end: 50, eventCount: 3},
- {title: 'Mouse Response', start: 50, end: 100, eventCount: 3},
- {title: 'Idle', start: 100, end: 200, eventCount: 0},
- {title: 'Mouse Response', start: 200, end: 250, eventCount: 3}
- ];
- verifier.verify();
- });
-
- test('mouseEventsIgnored', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_MOVE,
- {start: 0, end: 50});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_DOWN,
- {start: 50, end: 100});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 100, eventCount: 0}
- ];
- verifier.verify();
- });
-
- test('unassociatedEvents', function() {
- // Unassociated ThreadSlices that start during an Idle should be associated
- // with it. Expect the Idle IR to have 2 associated events: both of the
- // ThreadSlices in the model.
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- var start = tr.c.TestUtils.newSliceEx(
- {title: 'model start', start: 0, end: 1, type: tr.model.ThreadSlice});
- start.isTopLevel = true;
- model.browserMain.sliceGroup.pushSlice(start);
-
- var end = tr.c.TestUtils.newSliceEx(
- {title: 'model end', start: 9, end: 10, type: tr.model.ThreadSlice});
- end.isTopLevel = true;
- model.browserMain.sliceGroup.pushSlice(end);
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 10, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('stillLoading', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 10});
- ChromeTestUtils.addNavigationStartEvent(model, {start: 10});
- ChromeTestUtils.addFrameEvent(model, {start: 19, end: 20});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 10, eventCount: 1},
- {title: 'Successful Load', start: 10, end: 20, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('overlappingIdleAndLoadCollectUnassociatedEvents', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 10});
- ChromeTestUtils.addNavigationStartEvent(model, {start: 10});
- ChromeTestUtils.addFirstContentfulPaintEvent(model, {start: 30});
- ChromeTestUtils.addFrameEvent(model, {start: 35, end: 40});
- // 3 Idle events.
- ChromeTestUtils.addRenderingEvent(model, {start: 5, end: 15});
- ChromeTestUtils.addRenderingEvent(model, {start: 11, end: 15});
- ChromeTestUtils.addRenderingEvent(model, {start: 13, end: 15});
- // 1 Idle event.
- ChromeTestUtils.addRenderingEvent(model, {start: 35, end: 36});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 10, eventCount: 4},
- {title: 'Successful Load', start: 10, end: 30, eventCount: 0},
- {title: 'Idle', start: 30, end: 40, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('flingFlingFling', function() {
- // This trace gave me so many different kinds of trouble that I'm just going
- // to copy it straight in here, without trying to clarify it at all.
- // measurmt-traces/mobile/cnet_fling_up_fling_down_motox_2013.json
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 10});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 919, end: 998});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_CANCEL,
- {start: 919, end: 1001});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_DOWN,
- {start: 919, end: 1001});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_CANCEL,
- {start: 974, end: 1020});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_BEGIN,
- {start: 974, end: 1020});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 974, end: 1040});
- ChromeTestUtils.addFrameEvent(model,
- {start: 1039, end: 1040, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 974, end: 1054});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 990, end: 1021});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 990, end: 1052});
- ChromeTestUtils.addFrameEvent(model,
- {start: 1051, end: 1052, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1006, end: 1021});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1022, end: 1036});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1022, end: 1052});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1038, end: 1049});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1038, end: 1068});
- ChromeTestUtils.addFrameEvent(model,
- {start: 1067, end: 1068, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 1046, end: 1050});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 1046, end: 1077});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 1432, end: 2238});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_CANCEL,
- {start: 1432, end: 2241});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1516, end: 2605});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_BEGIN,
- {start: 1532, end: 2274});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1532, end: 2294});
- ChromeTestUtils.addFrameEvent(model,
- {start: 2293, end: 2294, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1549, end: 2310});
- ChromeTestUtils.addFrameEvent(model,
- {start: 2309, end: 2310, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 1627, end: 2275});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 1627, end: 2310});
- ChromeTestUtils.addFrameEvent(model, {start: 2990, end: 3000});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 919, eventCount: 1},
- {title: 'Scroll Response', start: 919, end: 1054,
- eventCount: 6, isAnimationBegin: true},
- {title: 'Scroll Animation', start: 1054, end: 1068,
- eventCount: 11},
- {title: 'Fling Animation', start: 1054, end: 1432,
- eventCount: 4},
- {title: 'Scroll Response', start: 1432, end: 2605,
- eventCount: 5, isAnimationBegin: true},
- {title: 'Scroll Animation', start: 1549, end: 2310,
- eventCount: 3},
- {title: 'Fling Animation', start: 2605, end: 3000,
- eventCount: 4}
- ];
- verifier.verify();
- });
-
- test('keyboardEvents', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.KEY_DOWN_RAW,
- {start: 0, end: 45});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.CHAR,
- {start: 10, end: 50});
- };
- verifier.expectedIRs = [
- {title: 'Keyboard Response', start: 0, end: 50, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('mouseResponses', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.CLICK,
- {start: 0, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.CONTEXT_MENU,
- {start: 200, end: 300});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 400, end: 500});
- };
- verifier.expectedIRs = [
- {title: 'Mouse Response', start: 0, end: 100, eventCount: 1},
- {title: 'Idle', start: 100, end: 200, eventCount: 0},
- {title: 'Mouse Response', start: 200, end: 300, eventCount: 1},
- {title: 'Idle', start: 300, end: 400, eventCount: 0},
- {title: 'MouseWheel Response', start: 400, end: 500,
- eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('mouseWheelAnimation', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 0, end: 20});
- ChromeTestUtils.addFrameEvent(model,
- {start: 19, end: 20, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 16, end: 36});
- ChromeTestUtils.addFrameEvent(model,
- {start: 35, end: 36, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 55, end: 75});
- ChromeTestUtils.addFrameEvent(model,
- {start: 74, end: 75, isTopLevel: true});
-
- // This threshold uses both events' start times, not end...start.
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 100, end: 150});
- ChromeTestUtils.addFrameEvent(model,
- {start: 149, end: 150, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 141, end: 191});
- ChromeTestUtils.addFrameEvent(model,
- {start: 190, end: 191, isTopLevel: true});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_WHEEL,
- {start: 182, end: 200});
- ChromeTestUtils.addFrameEvent(model,
- {start: 199, end: 200, isTopLevel: true});
- };
- verifier.expectedIRs = [
- {title: 'MouseWheel Response', start: 0, end: 20, eventCount: 1},
- {title: 'MouseWheel Animation', start: 20, end: 75,
- eventCount: 5},
- {title: 'Idle', start: 75, end: 100, eventCount: 0},
- {title: 'MouseWheel Response', start: 100, end: 150,
- eventCount: 1},
- {title: 'MouseWheel Response', start: 141, end: 191,
- eventCount: 1},
- {title: 'MouseWheel Response', start: 182, end: 200,
- eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('mouseDownUpResponse', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_DOWN,
- {start: 0, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_UP,
- {start: 200, end: 210});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 200, eventCount: 0},
- {title: 'Mouse Response', start: 200, end: 210, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('ignoreLoneMouseMoves', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.MOUSE_MOVE,
- {start: 0, end: 100});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 100, eventCount: 0}
- ];
- verifier.verify();
- });
-
- test('mouseDrags', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_DOWN, {start: 0, end: 100});
- var mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 200, end: 215});
- addFrameEventForInput(model, mouseMove);
- mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 210, end: 220});
- addFrameEventForInput(model, mouseMove);
- mouseMove = ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.MOUSE_MOVE, {start: 221, end: 240});
- addFrameEventForInput(model, mouseMove);
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 200, eventCount: 0},
- {title: 'Mouse Response', start: 200, end: 215, eventCount: 4},
- {title: 'Mouse Animation', start: 215, end: 240, eventCount: 6}
- ];
- verifier.verify();
- });
-
- test('twoScrollsNoFling', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_BEGIN,
- {start: 0, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 20, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 40, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 60, end: 150});
- ChromeTestUtils.addFrameEvent(model, {start: 149, end: 150});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 70, end: 150});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_END,
- {start: 80, end: 150});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_BEGIN,
- {start: 300, end: 400});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 320, end: 400});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 330, end: 450});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 340, end: 450});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 350, end: 500});
- ChromeTestUtils.addFrameEvent(model, {start: 499, end: 500});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_END,
- {start: 360, end: 500});
- };
- verifier.expectedIRs = [
- {title: 'Scroll Response', start: 0, end: 100, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Scroll Animation', start: 100, end: 150, eventCount: 5},
- {title: 'Idle', start: 150, end: 300, eventCount: 0},
- {title: 'Scroll Response', start: 300, end: 400, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Scroll Animation', start: 400, end: 500, eventCount: 5}
- ];
- verifier.verify();
- });
-
- test('webGLAnimations_oneAnimation', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'DrawingBuffer::prepareMailbox', start: 0, end: 2}));
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 18, end: 19});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 20, end: 22});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 38, end: 39});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 40, end: 42});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 58, end: 59});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 60, end: 62});
- };
- verifier.expectedIRs = [
- {title: 'WebGL Animation', start: 0, end: 62, eventCount: 4},
- ];
- verifier.verify();
- });
-
- test('webGLAnimations_twoAnimations', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'DrawingBuffer::prepareMailbox', start: 0, end: 2}));
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 18, end: 19});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 20, end: 22});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 38, end: 39});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 40, end: 42});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 58, end: 59});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 60, end: 62});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 218, end: 19});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 220, end: 222});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 238, end: 39});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 240, end: 242});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 258, end: 59});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 260, end: 262});
- };
- verifier.expectedIRs = [
- {title: 'WebGL Animation', start: 0, end: 62, eventCount: 4},
- {title: 'Idle', start: 62, end: 220, eventCount: 0},
- {title: 'WebGL Animation', start: 220, end: 262, eventCount: 3}
- ];
- verifier.verify();
- });
-
- test('webGLAnimations_oneWithAnimationEventsOneWithout', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'DrawingBuffer::prepareMailbox', start: 0, end: 2}));
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 18, end: 19});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 20, end: 22});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 38, end: 39});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 40, end: 42});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 58, end: 59});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 60, end: 62});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 220, end: 222});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 240, end: 242});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 260, end: 262});
- };
- verifier.expectedIRs = [
- {title: 'WebGL Animation', start: 0, end: 62, eventCount: 4},
- {title: 'Idle', start: 62, end: 262, eventCount: 0},
- ];
- verifier.verify();
- });
-
- test('webGLAnimations_noAnimationEvents', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'DrawingBuffer::prepareMailbox', start: 0, end: 2}));
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 20, end: 22});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 40, end: 42});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 60, end: 62});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 220, end: 222});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 240, end: 242});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'DrawingBuffer::prepareMailbox', start: 260, end: 262});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 262, eventCount: 0},
- ];
- verifier.verify();
- });
-
- test('webGLAnimations_animationEventsOnly', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'PageAnimator::serviceScriptedAnimations',
- start: 0, end: 2}));
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 20, end: 22});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 40, end: 42});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 42, eventCount: 0},
- ];
- verifier.verify();
- });
-
- test('webGLAnimations_oneEvent', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'DrawingBuffer::prepareMailbox', start: 0, end: 2}));
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'PageAnimator::serviceScriptedAnimations',
- start: 4, end: 6});
- };
- verifier.expectedIRs = [
- {title: 'WebGL Animation', start: 0, end: 2, eventCount: 1},
- {title: 'Idle', start: 2, end: 6, eventCount: 0},
- ];
- verifier.verify();
- });
-
- test('cssAnimations', function() {
- // CSS Animations happen on the renderer process, not the browser process.
- // They are merged if they overlap.
- // They are merged with other kinds of animations.
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- model.rendererMain.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx(
- {title: 'Animation', start: 0, end: 130, isTopLevel: true}));
- ChromeTestUtils.addFrameEvent(model, {start: 10, end: 20});
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'Animation', start: 131, end: 200, isTopLevel: true});
- ChromeTestUtils.addFrameEvent(model, {start: 150, end: 160});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 150, end: 180});
- ChromeTestUtils.addFrameEvent(model, {start: 290, end: 300});
- };
- verifier.expectedIRs = [
- {title: 'CSS Animation', start: 0, end: 200, eventCount: 4},
- {title: 'Fling Animation', start: 150, end: 300, eventCount: 3}
- ];
- verifier.verify();
- });
-
- test('cssAnimationStatesRunningAtEnd', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- // If a top-level Animation async slice has state-change instant
- // events and the last one is a "running" event, then it will run
- // to the end of the top level event.
- var animationA = tr.c.TestUtils.newAsyncSliceEx(
- {title: 'Animation', start: 0, end: 500, isTopLevel: true});
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 100, args: {data: {state: 'running'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 200, args: {data: {state: 'idle'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 300, args: {data: {state: 'running'}}}));
- model.rendererMain.asyncSliceGroup.push(animationA);
- ChromeTestUtils.addFrameEvent(model, {start: 50, end: 60});
- ChromeTestUtils.addFrameEvent(model, {start: 150, end: 160});
- ChromeTestUtils.addFrameEvent(model, {start: 250, end: 260});
- ChromeTestUtils.addFrameEvent(model, {start: 350, end: 360});
- ChromeTestUtils.addFrameEvent(model, {start: 450, end: 460});
- // We include a frame event off the end of the top level animation slice
- // so we can test that it correctly stops the AnimationExpectation
- // at the end of the top-level event, not tne end of the whole trace,
- ChromeTestUtils.addFrameEvent(model, {start: 1050, end: 1060});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 100, eventCount: 1},
- {title: 'CSS Animation', start: 100, end: 200, eventCount: 5},
- {title: 'Idle', start: 200, end: 300, eventCount: 1},
- {title: 'CSS Animation', start: 300, end: 500, eventCount: 6},
- {title: 'Idle', start: 500, end: 1060, eventCount: 1},
- ];
- verifier.verify();
- });
-
- test('cssAnimationStates', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- // If a top-level Animation async slice does not have state-change instant
- // subSlices, then assume that the animation was running throughout the
- // async slice.
- ChromeTestUtils.addEvent(model.rendererMain, {
- title: 'Animation', start: 181, end: 250, isTopLevel: true});
- ChromeTestUtils.addFrameEvent(model, {start: 200, end: 240});
-
- // Animation ranges should be merged if there is less than 32ms dead time
- // between them.
-
- // If a top-level Animation async slice has state-change instant events,
- // then run a state machine to find the time ranges when the animation was
- // actually running.
-
- // This animation was running from 10-40 and 50-60.
- var animationA = tr.c.TestUtils.newAsyncSliceEx(
- {title: 'Animation', start: 50, end: 500, isTopLevel: true});
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 71, args: {data: {state: 'running'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 104, args: {data: {state: 'pending'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 137, args: {data: {state: 'running'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 150, args: {data: {state: 'paused'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 281, args: {data: {state: 'running'}}}));
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 350, args: {data: {state: 'idle'}}}));
- model.rendererMain.asyncSliceGroup.push(animationA);
- ChromeTestUtils.addFrameEvent(model, {start: 80, end: 90});
- ChromeTestUtils.addFrameEvent(model, {start: 290, end: 300});
-
- // An animation without a frame event isn't really an animation.
- var animationC = tr.c.TestUtils.newAsyncSliceEx(
- {title: 'Animation', start: 350, end: 382, isTopLevel: true});
- model.rendererMain.asyncSliceGroup.push(animationC);
- animationA.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 350, args: {data: {state: 'idle'}}}));
-
- // This animation was running from model.bounds.min-50 and
- // 70-model.bounds.max.
- var animationB = tr.c.TestUtils.newAsyncSliceEx(
- {title: 'Animation', start: 0, end: 500, isTopLevel: true});
- animationB.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 40, args: {data: {state: 'finished'}}}));
- animationB.subSlices.push(tr.c.TestUtils.newInstantEvent(
- {title: 'Animation', start: 382, args: {data: {state: 'running'}}}));
- model.rendererMain.asyncSliceGroup.push(animationB);
- ChromeTestUtils.addFrameEvent(model, {start: 10, end: 20});
- ChromeTestUtils.addFrameEvent(model, {start: 390, end: 400});
- };
- verifier.expectedIRs = [
- {title: 'CSS Animation', start: 0, end: 350, eventCount: 16},
- {title: 'Idle', start: 350, end: 382, eventCount: 0},
- {title: 'CSS Animation', start: 382, end: 500, eventCount: 4},
- ];
- verifier.verify();
- });
-
- test('flingThatIsntstopped', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 32, end: 100});
- ChromeTestUtils.addFlingAnimationEvent(model, {start: 38, end: 200});
- ChromeTestUtils.addFrameEvent(model, {start: 199, end: 200});
- ChromeTestUtils.addFrameEvent(model, {start: 290, end: 300});
- };
- verifier.expectedIRs = [
- {title: 'Fling Animation', start: 32, end: 200, eventCount: 3},
- {title: 'Idle', start: 200, end: 300, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('flingThatIsStopped', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 32, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_CANCEL,
- {start: 105, end: 150});
- ChromeTestUtils.addFrameEvent(model, {start: 104, end: 105});
- ChromeTestUtils.addFrameEvent(model, {start: 149, end: 150});
- };
- verifier.expectedIRs = [
- {title: 'Fling Animation', start: 32, end: 105, eventCount: 3},
- {title: 'Idle', start: 105, end: 150, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('flingFling', function() {
- // measurmt-traces/mobile/facebook_obama_scroll_dialog_box.html
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 0, end: 30});
- ChromeTestUtils.addFrameEvent(model, {start: 40, end: 41});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 100, end: 130});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_CANCEL,
- {start: 100, end: 130});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 110, end: 140});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 170, end: 180});
- ChromeTestUtils.addFrameEvent(model, {start: 150, end: 151});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 200, end: 210});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 200, end: 220});
- ChromeTestUtils.addFrameEvent(model, {start: 230, end: 240});
- };
- verifier.expectedIRs = [
- {title: 'Fling Animation', start: 0, end: 100, eventCount: 3},
- {title: 'Touch Response', start: 100, end: 140, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Touch Animation', start: 140, end: 210, eventCount: 3},
- {title: 'Fling Animation', start: 200, end: 240, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('load', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addNavigationStartEvent(model, {start: 0});
- ChromeTestUtils.addFirstContentfulPaintEvent(model, {start: 20});
- };
- verifier.expectedIRs = [
- {title: 'Successful Load', start: 0, end: 20, eventCount: 0}
- ];
- verifier.verify();
- });
-
- test('loadStartup', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addRenderingEvent(model, {start: 2, end: 3});
- ChromeTestUtils.addCreateThreadsEvent(model, {start: 5, end: 10});
- // Throw an second one in there, just to try to confuse the algo.
- ChromeTestUtils.addCreateThreadsEvent(model, {start: 25, end: 30});
- ChromeTestUtils.addFrameEvent(model, {start: 11, end: 20});
- };
- verifier.expectedIRs = [
- {title: 'Startup', start: 2, end: 20, eventCount: 3},
- {title: 'Idle', start: 20, end: 30, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('totalIdle', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 10});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 10, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('multipleIdles', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 1});
- ChromeTestUtils.addNavigationStartEvent(model, {start: 1});
- ChromeTestUtils.addFirstContentfulPaintEvent(model, {start: 4});
- ChromeTestUtils.addFrameEvent(model, {start: 12, end: 13});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 1, eventCount: 1},
- {title: 'Successful Load', start: 1, end: 4, eventCount: 0},
- {title: 'Idle', start: 4, end: 13, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('touchStartTouchEndTap', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 0, end: 10});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 200, end: 210});
- };
- verifier.expectedIRs = [
- {title: 'Touch Response', start: 0, end: 210, eventCount: 2,
- isAnimationBegin: true}
- ];
- verifier.verify();
- });
-
- test('touchMoveResponseAnimation', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 0, end: 10});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 50, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 70, end: 150});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 200, end: 300});
- ChromeTestUtils.addFrameEvent(model, {start: 299, end: 300});
- };
- verifier.expectedIRs = [
- {title: 'Touch Response', start: 0, end: 100, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Touch Animation', start: 100, end: 300, eventCount: 3}
- ];
- verifier.verify();
- });
-
- test('tapEvents', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP,
- {start: 0, end: 50});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_DOWN,
- {start: 300, end: 310});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP,
- {start: 320, end: 350});
- };
- verifier.expectedIRs = [
- {title: 'Tap Response', start: 0, end: 50, eventCount: 1},
- {title: 'Idle', start: 50, end: 300, eventCount: 0},
- {title: 'Tap Response', start: 300, end: 350, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('tapAndTapCancelResponses', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_DOWN,
- {start: 0, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_CANCEL,
- {start: 300, end: 350});
- };
- verifier.expectedIRs = [
- {title: 'Tap Response', start: 0, end: 100, eventCount: 1},
- {title: 'Idle', start: 100, end: 300, eventCount: 0},
- {title: 'Tap Response', start: 300, end: 350, eventCount: 1}
- ];
- verifier.verify();
- });
-
- test('tapCancelResponse', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_DOWN,
- {start: 0, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_CANCEL,
- {start: 150, end: 200});
- };
- verifier.expectedIRs = [
- {title: 'Tap Response', start: 0, end: 200, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('pinchResponseAnimation', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 10});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_BEGIN,
- {start: 100, end: 150});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_UPDATE,
- {start: 130, end: 160});
- ChromeTestUtils.addFrameEvent(model, {start: 159, end: 160});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_UPDATE,
- {start: 140, end: 200});
- ChromeTestUtils.addFrameEvent(model, {start: 199, end: 200});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_UPDATE,
- {start: 150, end: 205});
- ChromeTestUtils.addFrameEvent(model, {start: 204, end: 205});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_UPDATE,
- {start: 210, end: 220});
- ChromeTestUtils.addFrameEvent(model, {start: 219, end: 220});
- // pause > 200ms
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_UPDATE,
- {start: 421, end: 470});
- ChromeTestUtils.addFrameEvent(model, {start: 469, end: 470});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_END,
- {start: 460, end: 500});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 100, eventCount: 1},
- {title: 'Pinch Response', start: 100, end: 160, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Pinch Animation', start: 160, end: 220, eventCount: 7},
- {title: 'Idle', start: 220, end: 421, eventCount: 0},
- {title: 'Pinch Animation', start: 421, end: 500, eventCount: 3}
- ];
- verifier.verify();
- });
-
- test('tapThenScroll', function() {
- // measurmt-traces/mobile/google_io_instrument_strumming.json
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 0, end: 20});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 40, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 50, end: 120});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 80, end: 150});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 180, end: 200});
- ChromeTestUtils.addFrameEvent(model, {start: 199, end: 200});
- };
- verifier.expectedIRs = [
- {title: 'Touch Response', start: 0, end: 100, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Touch Response', start: 50, end: 150, eventCount: 2,
- isAnimationBegin: true},
- {title: 'Touch Animation', start: 150, end: 200, eventCount: 2}
- ];
- verifier.verify();
- });
-
- test('pinchFlingTapTouchEventsOverlap', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addFrameEvent(model, {start: 0, end: 10});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 20, end: 50});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_DOWN,
- {start: 20, end: 30});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_CANCEL,
- {start: 20, end: 50});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 60, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 60, end: 110});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_BEGIN,
- {start: 60, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_CANCEL,
- {start: 65, end: 75});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 70, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.PINCH_UPDATE,
- {start: 70, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 75, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 80, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 85, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_BEGIN,
- {start: 75, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 150, end: 200});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 150, end: 200});
- ChromeTestUtils.addFrameEvent(model, {start: 199, end: 200});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 180, end: 210});
- ChromeTestUtils.addFrameEvent(model, {start: 209, end: 210});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 190, end: 210});
- ChromeTestUtils.addFrameEvent(model, {start: 215, end: 220});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 20, eventCount: 1},
- {title: 'Pinch Response', start: 20, end: 110,
- eventCount: 9, isAnimationBegin: true},
- {title: 'Scroll Animation', start: 110, end: 210,
- eventCount: 7},
- {title: 'Fling Animation', start: 180, end: 220, eventCount: 4}
- ];
- verifier.verify();
- });
-
- test('scrollThenFling', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 0, end: 40});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 50, end: 100});
- ChromeTestUtils.addFrameEvent(model, {start: 99, end: 100});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 80, end: 100});
- ChromeTestUtils.addFrameEvent(model, {start: 190, end: 200});
- };
- verifier.expectedIRs = [
- {title: 'Scroll Animation', start: 0, end: 100, eventCount: 3},
- {title: 'Fling Animation', start: 80, end: 200, eventCount: 3}
- ];
- verifier.verify();
- });
-
- /*
- This test was generated from
- /test_data/measurmt-traces/mobile/fling_HN_to_rest.json
- */
- test('flingHNToRest', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addEvent(model.browserMain,
- {title: 'model start', start: 0, end: 1});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_START,
- {start: 1274, end: 1297});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_DOWN,
- {start: 1274, end: 1305});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1343, end: 1350});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1359, end: 1366});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP_CANCEL,
- {start: 1359, end: 1366});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_BEGIN,
- {start: 1359, end: 1367});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1359, end: 1387});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1375, end: 1385});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1375, end: 1416});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1389, end: 1404});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1389, end: 1429});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1405, end: 1418});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1405, end: 1449});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 1419, end: 1432});
- ChromeTestUtils.addFrameEvent(model, {start: 1431, end: 1432});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.SCROLL_UPDATE,
- {start: 1419, end: 1474});
- ChromeTestUtils.addFrameEvent(model, {start: 1473, end: 1474});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_END,
- {start: 1427, end: 1435});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.FLING_START,
- {start: 1427, end: 1474});
- ChromeTestUtils.addFlingAnimationEvent(model, {start: 1440, end: 2300});
- ChromeTestUtils.addEvent(model.browserMain,
- {title: 'model end', start: 3184, end: 3185});
- };
- verifier.expectedIRs = [
- {title: 'Idle', start: 0, end: 1274, eventCount: 0},
- {title: 'Scroll Response', start: 1274, end: 1387,
- eventCount: 6, isAnimationBegin: true},
- {title: 'Scroll Animation', start: 1387, end: 1474,
- eventCount: 12},
- {title: 'Fling Animation', start: 1427, end: 2300,
- eventCount: 4},
- {title: 'Idle', start: 2300, end: 3185, eventCount: 0}
- ];
- verifier.verify();
- });
-
- test('TapResponseOverlappingTouchAnimation', function() {
- var verifier = new UserExpectationVerifier();
- verifier.customizeModelCallback = function(model) {
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 0, end: 10});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 5, end: 15});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TOUCH_MOVE,
- {start: 10, end: 20});
- ChromeTestUtils.addFrameEvent(model, {start: 19, end: 20});
- ChromeTestUtils.addInputEvent(model, INPUT_TYPE.TAP,
- {start: 15, end: 100});
- };
- verifier.expectedIRs = [
- {title: 'Tap Response', start: 0, end: 100,
- eventCount: 5}
- ];
- verifier.verify();
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/index.js b/chromium/third_party/catapult/tracing/tracing/index.js
deleted file mode 100644
index e4f346ae140..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-'use strict';
-
-var fs = require('fs');
-var path = require('path');
-
-var catapultPath = fs.realpathSync(path.join(__dirname, '..', '..'));
-var catapultBuildPath = path.join(catapultPath, 'catapult_build');
-
-var node_bootstrap = require(path.join(catapultBuildPath, 'node_bootstrap.js'));
-
-HTMLImportsLoader.addArrayToSourcePath(
- node_bootstrap.getSourcePathsForProject('tracing'));
-
-// Go!
-HTMLImportsLoader.loadHTML('/tracing/importer/import.html');
-HTMLImportsLoader.loadHTML('/tracing/model/model.html');
-HTMLImportsLoader.loadHTML('/tracing/extras/full_config.html');
-
-// Make the tracing namespace the main tracing export.
-module.exports = global.tr;
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/__init__.py b/chromium/third_party/catapult/tracing/tracing/metrics/__init__.py
deleted file mode 100644
index cffcee63c42..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-
-
-_CATAPULT_DIR = os.path.abspath(os.path.join(
- os.path.dirname(os.path.abspath(__file__)), '..', '..', '..'))
-
-_PI_PATH = os.path.join(_CATAPULT_DIR, 'perf_insights')
-
-if _PI_PATH not in sys.path:
- sys.path.insert(1, _PI_PATH)
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/all_metrics.html b/chromium/third_party/catapult/tracing/tracing/metrics/all_metrics.html
deleted file mode 100644
index 7232c17fd62..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/all_metrics.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/blink/gc_metric.html">
-<link rel="import" href="/tracing/metrics/cpu_process_metric.html">
-<link rel="import" href="/tracing/metrics/sample_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/clock_sync_latency_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/hazard_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/loading_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/memory_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/power_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/responsiveness_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/system_health_metrics.html">
-<link rel="import" href="/tracing/metrics/system_health/webview_startup_metric.html">
-<link rel="import" href="/tracing/metrics/tracing_metric.html">
-<link rel="import" href="/tracing/metrics/v8/execution_metric.html">
-<link rel="import" href="/tracing/metrics/v8/gc_metric.html">
-<link rel="import" href="/tracing/metrics/v8/v8_metrics.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric.html
deleted file mode 100644
index ee76d0ca565..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric.html
+++ /dev/null
@@ -1,199 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/v8/utils.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.blink', function() {
- // Maps the Blink GC events in timeline to telemetry friendly names.
- var BLINK_GC_EVENTS = {
- 'BlinkGCMarking': 'blink-gc-marking',
- 'ThreadState::completeSweep': 'blink-gc-complete-sweep',
- 'ThreadState::performIdleLazySweep': 'blink-gc-idle-lazy-sweep'
- };
-
- function isBlinkGarbageCollectionEvent(event) {
- return event.title in BLINK_GC_EVENTS;
- }
-
- function blinkGarbageCollectionEventName(event) {
- return BLINK_GC_EVENTS[event.title];
- }
-
- function blinkGcMetric(values, model) {
- addDurationOfTopEvents(values, model);
- addTotalDurationOfTopEvents(values, model);
- addIdleTimesOfTopEvents(values, model);
- addTotalIdleTimesOfTopEvents(values, model);
- }
-
- tr.metrics.MetricRegistry.register(blinkGcMetric);
-
- var timeDurationInMs_smallerIsBetter =
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter;
- var percentage_biggerIsBetter =
- tr.b.Unit.byName.normalizedPercentage_biggerIsBetter;
-
- // 0.1 steps from 0 to 20 since it is the most common range.
- // Exponentially increasing steps from 20 to 200.
- var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 20, 200)
- .addExponentialBins(200, 100);
-
- function createNumericForTopEventTime(name) {
- var n = new tr.v.Histogram(name,
- timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- n.customizeSummaryOptions({
- avg: true,
- count: true,
- max: true,
- min: false,
- std: true,
- sum: true,
- percentile: [0.90]});
- return n;
- }
-
- function createNumericForIdleTime(name) {
- var n = new tr.v.Histogram(name,
- timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- n.customizeSummaryOptions({
- avg: true,
- count: false,
- max: true,
- min: false,
- std: false,
- sum: true,
- percentile: []
- });
- return n;
- }
-
- function createPercentage(name, numerator, denominator) {
- var histogram = new tr.v.Histogram(name, percentage_biggerIsBetter);
- if (denominator === 0)
- histogram.addSample(0);
- else
- histogram.addSample(numerator / denominator);
- return histogram;
- }
-
- /**
- * Example output:
- * - blink-gc-marking.
- */
- function addDurationOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isBlinkGarbageCollectionEvent,
- blinkGarbageCollectionEventName,
- function(name, events) {
- var cpuDuration = createNumericForTopEventTime(name);
- events.forEach(function(event) {
- cpuDuration.addSample(event.cpuDuration);
- });
- values.addHistogram(cpuDuration);
- }
- );
- }
-
- /**
- * Example output:
- * - blink-gc-total
- */
- function addTotalDurationOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isBlinkGarbageCollectionEvent,
- event => 'blink-gc-total',
- function(name, events) {
- var cpuDuration = createNumericForTopEventTime(name);
- events.forEach(function(event) {
- cpuDuration.addSample(event.cpuDuration);
- });
- values.addHistogram(cpuDuration);
- }
- );
- }
-
- /**
- * Example output:
- * - blink-gc-marking_idle_deadline_overrun,
- * - blink-gc-marking_outside_idle,
- * - blink-gc-marking_percentage_idle.
- */
- function addIdleTimesOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isBlinkGarbageCollectionEvent,
- blinkGarbageCollectionEventName,
- function(name, events) {
- addIdleTimes(values, model, name, events);
- }
- );
- }
-
- /**
- * Example output:
- * - blink-gc-total_idle_deadline_overrun,
- * - blink-gc-total_outside_idle,
- * - blink-gc-total_percentage_idle.
- */
- function addTotalIdleTimesOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isBlinkGarbageCollectionEvent,
- event => 'blink-gc-total',
- function(name, events) {
- addIdleTimes(values, model, name, events);
- }
- );
- }
-
- function addIdleTimes(values, model, name, events) {
- var cpuDuration = createNumericForIdleTime(name + '_cpu');
- var insideIdle = createNumericForIdleTime(name + '_inside_idle');
- var outsideIdle = createNumericForIdleTime(name + '_outside_idle');
- var idleDeadlineOverrun = createNumericForIdleTime(
- name + '_idle_deadline_overrun');
- events.forEach(function(event) {
- var idleTask = tr.metrics.v8.utils.findParent(
- event, tr.metrics.v8.utils.isIdleTask);
- var inside = 0;
- var overrun = 0;
- if (idleTask) {
- var allottedTime = idleTask['args']['allotted_time_ms'];
- if (event.duration > allottedTime) {
- overrun = event.duration - allottedTime;
- // Don't count time over the deadline as being inside idle time.
- // Since the deadline should be relative to wall clock we
- // compare allotted_time_ms with wall duration instead of thread
- // duration, and then assume the thread duration was inside idle
- // for the same percentage of time.
- inside = event.cpuDuration * allottedTime / event.duration;
- } else {
- inside = event.cpuDuration;
- }
- }
- cpuDuration.addSample(event.cpuDuration);
- insideIdle.addSample(inside);
- outsideIdle.addSample(event.cpuDuration - inside);
- idleDeadlineOverrun.addSample(overrun);
- });
- values.addHistogram(idleDeadlineOverrun);
- values.addHistogram(outsideIdle);
- var percentage = createPercentage(
- name + '_percentage_idle', insideIdle.sum, cpuDuration.sum);
- values.addHistogram(percentage);
- }
-
- return {
- blinkGcMetric: blinkGcMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric_test.html
deleted file mode 100644
index 9a9fb72b342..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/blink/gc_metric_test.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/blink/gc_metric.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function createModel(start, end, slices) {
- var opts = {
- customizeModelCallback: function(model) {
- var process = model.getOrCreateProcess(1);
- var thread = process.getOrCreateThread(2);
- var group = thread.sliceGroup;
- slices.forEach(function(slice) {
- group.pushSlice(tr.c.TestUtils.newSliceEx(slice));
- });
- group.createSubSlices();
- }
- };
- var model = tr.c.TestUtils.newModelWithEvents([], opts);
- return model;
- }
-
- function constructName(name, suffix) {
- return name + '_' + suffix;
- }
-
- function run(slices) {
- var values = new tr.v.ValueSet();
- var startTime = slices.reduce((acc, slice) => (Math.min(acc, slice.start)));
- var endTime = slices.reduce((acc, slice) => (Math.max(acc, slice.end)));
- var model = createModel(startTime - 1, endTime + 1, slices);
- tr.metrics.blink.blinkGcMetric(values, model);
- return values;
- }
-
- test('topEvents', function() {
- var events = {
- 'BlinkGCMarking': 'blink-gc-marking',
- 'ThreadState::completeSweep': 'blink-gc-complete-sweep',
- 'ThreadState::performIdleLazySweep': 'blink-gc-idle-lazy-sweep'
- };
- tr.b.iterItems(events, function(timelineName, telemetryName) {
- var slices = [
- {
- title: timelineName, args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed(telemetryName));
- assert.strictEqual(value.running.sum, 100);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 100);
- assert.strictEqual(value.running.max, 100);
- assert.closeTo(value.getApproximatePercentile(0.90), 100, 1);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- telemetryName + '_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- telemetryName + '_outside_idle'));
- assert.strictEqual(value.running.sum, 100);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 100);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- telemetryName + '_percentage_idle'));
- assert.strictEqual(value.average, 0);
- });
- });
-
- test('idleTimes', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'SingleThreadIdleTaskRunner::RunTask',
- args: {'allotted_time_ms' : 100}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'BlinkGCMarking', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed('blink-gc-marking'));
- assert.strictEqual(value.running.sum, 80);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 80);
- assert.strictEqual(value.running.max, 80);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-marking_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-marking_outside_idle'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-marking_percentage_idle'));
- assert.strictEqual(value.average, 1);
- });
-
- test('idleTimeOverrun', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'SingleThreadIdleTaskRunner::RunTask',
- args: {'allotted_time_ms' : 10}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'BlinkGCMarking', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed('blink-gc-marking'));
- assert.strictEqual(value.running.sum, 80);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 80);
- assert.strictEqual(value.running.max, 80);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-marking_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 70);
- assert.strictEqual(value.average, 70);
- assert.strictEqual(value.running.max, 70);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-marking_outside_idle'));
- assert.strictEqual(value.running.sum, 70);
- assert.strictEqual(value.average, 70);
- assert.strictEqual(value.running.max, 70);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-marking_percentage_idle'));
- assert.closeTo(value.average, 1 / 8, 1e-6);
- });
-
- test('total', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'BlinkGCMarking', args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'ThreadState::performIdleLazySweep', args: {}, start: 210,
- end: 290, cpuStart: 210, cpuEnd: 290
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed('blink-gc-total'));
- assert.strictEqual(value.running.sum, 180);
- assert.strictEqual(value.numValues, 2);
- assert.strictEqual(value.average, 90);
- assert.strictEqual(value.running.max, 100);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-total_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-total_outside_idle'));
- assert.strictEqual(value.running.sum, 180);
- assert.strictEqual(value.average, 90);
- assert.strictEqual(value.running.max, 100);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'blink-gc-total_percentage_idle'));
- assert.strictEqual(value.average, 0);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/buildbot_output_for_compare_samples_test.txt b/chromium/third_party/catapult/tracing/tracing/metrics/buildbot_output_for_compare_samples_test.txt
deleted file mode 100644
index a8d19745dae..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/buildbot_output_for_compare_samples_test.txt
+++ /dev/null
@@ -1,187 +0,0 @@
-IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
-own process. For debugging a test inside a debugger, use the
---gtest_filter=<your_test_name> flag along with
---single-process-tests.
-Using sharding settings from environment. This is shard 0/1
-Using 1 parallel jobs.
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D31.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_13273\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D31.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_13273\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D31.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_13273\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D31.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_13273\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D31.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_13273\test_results.xml" --test-launcher-print-test-stdio=always
-[ RUN ] IndexDataManagerPerfTest.Run
-*RESULT IndexDataManger_run: score= 281471 score
-[ OK ] IndexDataManagerPerfTest.Run (5008 ms)
-[1/37] IndexDataManagerPerfTest.Run (5008 ms)
-[ RUN ] BufferSubDataBenchmark.Run/d3d11_float4_every1
-*RESULT BufferSubData_d3d11_float4_every1: score= 232 score
-[ OK ] BufferSubDataBenchmark.Run/d3d11_float4_every1 (5117 ms)
-[2/37] BufferSubDataBenchmark.Run/d3d11_float4_every1 (5117 ms)
-[ RUN ] BufferSubDataBenchmark.Run/d3d9_float4_every1
-*RESULT BufferSubData_d3d9_float4_every1: score= 237 score
-[ OK ] BufferSubDataBenchmark.Run/d3d9_float4_every1 (5386 ms)
-[3/37] BufferSubDataBenchmark.Run/d3d9_float4_every1 (5386 ms)
-[ RUN ] BufferSubDataBenchmark.Run/gl_float4_every1
-*RESULT BufferSubData_gl_float4_every1: score= 245 score
-[ OK ] BufferSubDataBenchmark.Run/gl_float4_every1 (5195 ms)
-[4/37] BufferSubDataBenchmark.Run/gl_float4_every1 (5195 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/d3d9
-*RESULT DrawCallPerf_d3d9: score= 2993 score
-[ OK ] DrawCallPerfBenchmark.Run/d3d9 (10062 ms)
-[5/37] DrawCallPerfBenchmark.Run/d3d9 (10062 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/d3d9_null
-*RESULT DrawCallPerf_d3d9_null: score= 25046 score
-[ OK ] DrawCallPerfBenchmark.Run/d3d9_null (10047 ms)
-[6/37] DrawCallPerfBenchmark.Run/d3d9_null (10047 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/d3d11
-*RESULT DrawCallPerf_d3d11: score= 2741 score
-[ OK ] DrawCallPerfBenchmark.Run/d3d11 (10015 ms)
-[7/37] DrawCallPerfBenchmark.Run/d3d11 (10015 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/d3d11_null
-*RESULT DrawCallPerf_d3d11_null: score= 28607 score
-[ OK ] DrawCallPerfBenchmark.Run/d3d11_null (9999 ms)
-[8/37] DrawCallPerfBenchmark.Run/d3d11_null (9999 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/d3d11_render_to_texture_null
-*RESULT DrawCallPerf_d3d11_render_to_texture_null: score= 25868 score
-[ OK ] DrawCallPerfBenchmark.Run/d3d11_render_to_texture_null (10015 ms)
-[9/37] DrawCallPerfBenchmark.Run/d3d11_render_to_texture_null (10015 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/gl
-*RESULT DrawCallPerf_gl: score= 4123 score
-[ OK ] DrawCallPerfBenchmark.Run/gl (10031 ms)
-[10/37] DrawCallPerfBenchmark.Run/gl (10031 ms)
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D32.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_8457\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D32.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_8457\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D32.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_8457\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D32.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_8457\test_results.xml" --test-launcher-print-test-stdio=always
-[ RUN ] DrawCallPerfBenchmark.Run/gl_null
-*RESULT DrawCallPerf_gl_null: score= 189804 score
-[ OK ] DrawCallPerfBenchmark.Run/gl_null (10015 ms)
-[11/37] DrawCallPerfBenchmark.Run/gl_null (10015 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/gl_render_to_texture_null
-*RESULT DrawCallPerf_gl_render_to_texture_null: score= 189155 score
-[ OK ] DrawCallPerfBenchmark.Run/gl_render_to_texture_null (10031 ms)
-[12/37] DrawCallPerfBenchmark.Run/gl_render_to_texture_null (10031 ms)
-[ RUN ] DrawCallPerfBenchmark.Run/default_validation_only
-*RESULT DrawCallPerf_default_validation_only: score= 2690 score
-[ OK ] DrawCallPerfBenchmark.Run/default_validation_only (5023 ms)
-[13/37] DrawCallPerfBenchmark.Run/default_validation_only (5023 ms)
-[ RUN ] DynamicPromotionPerfTest.Run/d3d11
-*RESULT DynamicPromotion_d3d11: score= 39354 score
-[ OK ] DynamicPromotionPerfTest.Run/d3d11 (6552 ms)
-[14/37] DynamicPromotionPerfTest.Run/d3d11 (6552 ms)
-[ RUN ] DynamicPromotionPerfTest.Run/d3d9
-*RESULT DynamicPromotion_d3d9: score= 21060 score
-[ OK ] DynamicPromotionPerfTest.Run/d3d9 (5522 ms)
-[15/37] DynamicPromotionPerfTest.Run/d3d9 (5522 ms)
-[ RUN ] EGLInitializePerfTest.Run/ES2_D3D11
-*RESULT EGLInitialize_run: score= 155 score
-*RESULT EGLInitialize_run: LoadDLLs= 0.0000000000 ms
-*RESULT EGLInitialize_run: D3D11CreateDevice= 4.0051480051 ms
-*RESULT EGLInitialize_run: InitResources= 0.0000000000 ms
-[ OK ] EGLInitializePerfTest.Run/ES2_D3D11 (5008 ms)
-[16/37] EGLInitializePerfTest.Run/ES2_D3D11 (5008 ms)
-[ RUN ] IndexConversionPerfTest.Run/d3d11
-*RESULT IndexConversionPerfTest_d3d11: score= 5135 score
-[ OK ] IndexConversionPerfTest.Run/d3d11 (3166 ms)
-[17/37] IndexConversionPerfTest.Run/d3d11 (3166 ms)
-[ RUN ] IndexConversionPerfTest.Run/index_range_d3d11
-*RESULT IndexConversionPerfTest_index_range_d3d11: score= 68785 score
-[ OK ] IndexConversionPerfTest.Run/index_range_d3d11 (3011 ms)
-[18/37] IndexConversionPerfTest.Run/index_range_d3d11 (3011 ms)
-[ RUN ] InstancingPerfBenchmark.Run/d3d11
-*RESULT InstancingPerf_d3d11: score= 479 score
-[ OK ] InstancingPerfBenchmark.Run/d3d11 (10046 ms)
-[19/37] InstancingPerfBenchmark.Run/d3d11 (10046 ms)
-[ RUN ] InstancingPerfBenchmark.Run/d3d9
-*RESULT InstancingPerf_d3d9: score= 464 score
-[ OK ] InstancingPerfBenchmark.Run/d3d9 (10057 ms)
-[20/37] InstancingPerfBenchmark.Run/d3d9 (10057 ms)
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D44.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_12336\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D44.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_12336\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D44.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_12336\test_results.xml" --test-launcher-print-test-stdio=always
-[ RUN ] InstancingPerfBenchmark.Run/gl
-*RESULT InstancingPerf_gl: score= 427 score
-[ OK ] InstancingPerfBenchmark.Run/gl (10124 ms)
-[21/37] InstancingPerfBenchmark.Run/gl (10124 ms)
-[ RUN ] InterleavedAttributeDataBenchmark.Run/d3d11
-*RESULT InterleavedAttributeData_d3d11: score= 19 score
-[ OK ] InterleavedAttributeDataBenchmark.Run/d3d11 (5117 ms)
-[22/37] InterleavedAttributeDataBenchmark.Run/d3d11 (5117 ms)
-[ RUN ] InterleavedAttributeDataBenchmark.Run/d3d11_9_3
-*RESULT InterleavedAttributeData_d3d11: score= 25 score
-[ OK ] InterleavedAttributeDataBenchmark.Run/d3d11_9_3 (5225 ms)
-[23/37] InterleavedAttributeDataBenchmark.Run/d3d11_9_3 (5225 ms)
-[ RUN ] InterleavedAttributeDataBenchmark.Run/d3d9
-*RESULT InterleavedAttributeData_d3d9: score= 25 score
-[ OK ] InterleavedAttributeDataBenchmark.Run/d3d9 (5211 ms)
-[24/37] InterleavedAttributeDataBenchmark.Run/d3d9 (5211 ms)
-[ RUN ] InterleavedAttributeDataBenchmark.Run/gl
-*RESULT InterleavedAttributeData_gl: score= 25 score
-[ OK ] InterleavedAttributeDataBenchmark.Run/gl (5101 ms)
-[25/37] InterleavedAttributeDataBenchmark.Run/gl (5101 ms)
-[ RUN ] PointSpritesBenchmark.Run/d3d11_10_3px_3vars
-*RESULT PointSprites_d3d11_10_3px_3vars: score= 644 score
-[ OK ] PointSpritesBenchmark.Run/d3d11_10_3px_3vars (5023 ms)
-[26/37] PointSpritesBenchmark.Run/d3d11_10_3px_3vars (5023 ms)
-[ RUN ] PointSpritesBenchmark.Run/d3d9_10_3px_3vars
-*RESULT PointSprites_d3d9_10_3px_3vars: score= 730 score
-[ OK ] PointSpritesBenchmark.Run/d3d9_10_3px_3vars (5141 ms)
-[27/37] PointSpritesBenchmark.Run/d3d9_10_3px_3vars (5141 ms)
-[ RUN ] PointSpritesBenchmark.Run/gl_10_3px_3vars
-*RESULT PointSprites_gl_10_3px_3vars: score= 2159 score
-[ OK ] PointSpritesBenchmark.Run/gl_10_3px_3vars (5086 ms)
-[28/37] PointSpritesBenchmark.Run/gl_10_3px_3vars (5086 ms)
-[ RUN ] TexSubImageBenchmark.Run/d3d11
-*RESULT TexSubImage_d3d11: score= 294 score
-[ OK ] TexSubImageBenchmark.Run/d3d11 (5023 ms)
-[29/37] TexSubImageBenchmark.Run/d3d11 (5023 ms)
-[ RUN ] TexSubImageBenchmark.Run/d3d9
-*RESULT TexSubImage_d3d9: score= 298 score
-[ OK ] TexSubImageBenchmark.Run/d3d9 (5305 ms)
-[30/37] TexSubImageBenchmark.Run/d3d9 (5305 ms)
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D45.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_4706\test_results.xml" --test-launcher-print-test-stdio=always
-Still waiting for the following processes to finish:
- "C:\b\c\b\Win_7_ATI_GPU_Perf__2_\src\out\Release_x64\angle_perftests.exe" --gtest_flagfile="C:\Users\chrome-bot\AppData\Local\Temp\scoped_dir3192_23891\8D45.tmp" --single-process-tests --test-launcher-jobs=1 --test-launcher-output="C:\Users\CHROME~1\AppData\Local\Temp\3192_4706\test_results.xml" --test-launcher-print-test-stdio=always
-[ RUN ] TexSubImageBenchmark.Run/gl
-*RESULT TexSubImage_gl: score= 323 score
-[ OK ] TexSubImageBenchmark.Run/gl (5070 ms)
-[31/37] TexSubImageBenchmark.Run/gl (5070 ms)
-[ RUN ] TextureSamplingBenchmark.Run/d3d11_2samplers
-*RESULT TextureSampling_d3d11_2samplers: score= 128 score
-[ OK ] TextureSamplingBenchmark.Run/d3d11_2samplers (5070 ms)
-[32/37] TextureSamplingBenchmark.Run/d3d11_2samplers (5070 ms)
-[ RUN ] TextureSamplingBenchmark.Run/d3d9_2samplers
-*RESULT TextureSampling_d3d9_2samplers: score= 128 score
-[ OK ] TextureSamplingBenchmark.Run/d3d9_2samplers (5668 ms)
-[33/37] TextureSamplingBenchmark.Run/d3d9_2samplers (5668 ms)
-[ RUN ] TextureSamplingBenchmark.Run/gl_2samplers
-*RESULT TextureSampling_gl_2samplers: score= 136 score
-[ OK ] TextureSamplingBenchmark.Run/gl_2samplers (5054 ms)
-[34/37] TextureSamplingBenchmark.Run/gl_2samplers (5054 ms)
-[ RUN ] UniformsBenchmark.Run/d3d11_200_vertex_uniforms_200_fragment_uniforms
-*RESULT Uniforms_d3d11_200_vertex_uniforms_200_fragment_uniforms: score= 1797 score
-[ OK ] UniformsBenchmark.Run/d3d11_200_vertex_uniforms_200_fragment_uniforms (5195 ms)
-[35/37] UniformsBenchmark.Run/d3d11_200_vertex_uniforms_200_fragment_uniforms (5195 ms)
-[ RUN ] UniformsBenchmark.Run/d3d9_200_vertex_uniforms_200_fragment_uniforms
-*RESULT Uniforms_d3d9_200_vertex_uniforms_200_fragment_uniforms: score= 1912 score
-[ OK ] UniformsBenchmark.Run/d3d9_200_vertex_uniforms_200_fragment_uniforms (5223 ms)
-[36/37] UniformsBenchmark.Run/d3d9_200_vertex_uniforms_200_fragment_uniforms (5223 ms)
-[ RUN ] UniformsBenchmark.Run/gl_200_vertex_uniforms_200_fragment_uniforms
-*RESULT Uniforms_gl_200_vertex_uniforms_200_fragment_uniforms: score= 5509 score
-[ OK ] UniformsBenchmark.Run/gl_200_vertex_uniforms_200_fragment_uniforms (5070 ms)
-[37/37] UniformsBenchmark.Run/gl_200_vertex_uniforms_200_fragment_uniforms (5070 ms)
-SUCCESS: all tests passed.
-Tests took 243 seconds.
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples.py b/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples.py
deleted file mode 100644
index 6ce61c6e7fd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-
-import tracing_project
-import vinn
-
-FORMAT_TO_METHOD = {
- 'chartjson': 'compareCharts',
- 'valueset': 'compareValuesets',
- 'buildbot': 'compareBuildbotOutputs'
-}
-
-_COMPARE_SAMPLES_CMD_LINE = os.path.join(
- os.path.dirname(__file__), 'compare_samples_cmdline.html')
-
-
-def CompareSamples(sample_a, sample_b, metric, data_format='chartjson'):
- """Compare the values of a metric from two samples from benchmark output.
-
- Args:
- sample_a, sample_b (str): comma-separated lists of paths to the benchmark
- output.
- metric (str): Metric name in slash-separated format [2 or 3 part].
- data_format (str): The format the samples are in. Supported values are:
- 'chartjson', 'valueset', 'buildbot'.
- Returns:
- JSON encoded dict with the values parsed form the samples and the result of
- the hypothesis testing comparison of the samples under the 'result' key.
- Possible values for the result key are:
- 'NEED_MORE_DATA', 'REJECT' and 'FAIL_TO_REJECT'.
- Where the null hypothesis is that the samples belong to the same population.
- i.e. a 'REJECT' result would make it reasonable to conclude that
- there is a significant difference between the samples. (e.g. a perf
- regression).
- """
-
- method = FORMAT_TO_METHOD[data_format]
- project = tracing_project.TracingProject()
- all_source_paths = list(project.source_paths)
-
- def MakeAbsPaths(l):
- return ','.join(map(os.path.abspath, l.split(',')))
-
- return vinn.RunFile(
- _COMPARE_SAMPLES_CMD_LINE,
- source_paths=all_source_paths,
- js_args=[
- method,
- MakeAbsPaths(sample_a),
- MakeAbsPaths(sample_b),
- metric
- ])
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_cmdline.html b/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_cmdline.html
deleted file mode 100644
index 754267d9078..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_cmdline.html
+++ /dev/null
@@ -1,253 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-var escapeChars = s => s.replace(/[\:|=\/#&,]/g, '_');
-
-function findUnescapedKey(escaped, d) {
- for (var k of tr.b.dictionaryKeys(d)) {
- if (escapeChars(k) === escaped) {
- return k;
- }
- }
- throw new Error('did not find key ' + escaped + ' in ' +
- tr.b.dictionaryKeys(d));
-}
-
-function geoMeanFromHistogram(h) {
- if (!h.hasOwnProperty('buckets')) return 0.0;
- var count = 0;
- var sumOfLogs = 0;
- for (var bucket of h.buckets) {
- if (bucket.hasOwnProperty('high')) {
- bucket.mean = (bucket.low + bucket.high) / 2.0;
- } else {
- bucket.mean = bucket.low;
- }
-
- if (bucket.mean > 0) {
- sumOfLogs += Math.log(bucket.mean) * bucket.count;
- count += bucket.count;
- }
- }
- if (count === 0) return 0.0;
- return Math.exp(sumOfLogs / count);
-}
-
-function splitMetric(metricName) {
- var parts = metricName.split('/');
- var interactionName;
- var traceName = 'summary';
- var chartName = parts[0];
- if (parts.length === 3) {
- // parts[1] is the interactionName
- if (parts[1]) chartName = parts[1] + '@@' + chartName;
- traceName = parts[2];
- } else if (parts.length === 2) {
- if (chartName !== parts[1]) traceName = parts[1];
- } else throw new Error('Could not parse metric name.');
- return [chartName, traceName];
-}
-
-function valuesFromCharts(listOfCharts, metricName) {
- var allValues = [];
- var chartAndTrace = splitMetric(metricName);
- for (var charts of listOfCharts) {
- var chartName = findUnescapedKey(chartAndTrace[0], charts.charts);
- if (chartName) {
- var traceName = findUnescapedKey(
- chartAndTrace[1], charts.charts[chartName]);
- if (traceName) {
- if (charts.charts[chartName][traceName].type ===
- 'list_of_scalar_values')
- allValues.push(...charts.charts[chartName][traceName].values);
- if (charts.charts[chartName][traceName].type === 'histogram')
- allValues.push(
- geoMeanFromHistogram(charts.charts[chartName][traceName]));
- }
- }
- }
- return allValues;
-}
-
-function rawValuesByMetricName(valueSet, metricName) {
- var interactionRecord, valueName;
- var [itrPlusChart, story] = splitMetric(metricName);
- if (itrPlusChart.indexOf('@@') > -1) {
- [interactionRecord, valueName] = itrPlusChart.split('@@');
- } else if (itrPlusChart.indexOf('-') > -1) {
- [interactionRecord, ...valueName] = itrPlusChart.split('-');
- valueName = valueName.join('');
- } else valueName = itrPlusChart;
- var values = valueSet.getValuesNamed(valueName);
- if (!values || values.length === 0) {
- // If there was a dash in the chart name, but it wasn't an
- // interaction record.
- valueName = itrPlusChart;
- values = valueSet.getValuesNamed(valueName);
- interactionRecord = undefined;
- if (!values || values.length === 0) {
- throw new Error('No values with name ' + valueName);
- }
- }
- var filtered = [];
- for (var value of values) {
- if (value.name !== valueName) continue;
- var ii = tr.v.d.IterationInfo.getFromValue(value);
- if (interactionRecord) {
- var irParts = [];
- var keys = Object.keys(ii.storyGroupingKeys);
- keys.sort();
- for (var key of keys)
- irParts.push(ii.storyGroupingKeys[key]);
- if (interactionRecord === irParts.join('_') &&
- escapeChars(ii.storyDisplayName) ===
- escapeChars(story)) {
- filtered.push(value);
- }
- } else if (escapeChars(ii.storyDisplayName) ===
- escapeChars(story)) {
- filtered.push(value);
- }
- }
-
- var rawValues = [];
- for (var val of filtered) {
- if (val instanceof tr.v.Histogram) {
- rawValues = rawValues.concat(val.sampleValues);
- } else throw new Error('Only tr.v.Histogram values are supported');
- }
- return rawValues;
-}
-
-function parseFiles(files) {
- var results = [];
- for (var path of files) {
- var current = tr.b.getSync('file://' + path);
- results.push(JSON.parse(current));
- }
- return results;
-}
-
-var escapeForRegExp = s => s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
-
-var strFromRE = re => re.toString().split('/')[1];
-
-function valuesFromBuildbotOutput(out, metric) {
- if (!out)
- return [];
- var stringVals = [];
- var floatVals = [];
- var chartAndTrace = splitMetric(metric);
- var metricRE = escapeForRegExp(
- 'RESULT ' + chartAndTrace[0] + ': ' + chartAndTrace[1] + '=');
- var singleResultRE = new RegExp(metricRE +
- strFromRE(/\s*([-]?[\d\.]+)/), 'g');
- var multiResultsRE = new RegExp(metricRE +
- strFromRE(/\s*\[\s*([\d\., -]+)\s*\]/), 'g');
- var meanStdDevRE = new RegExp(metricRE +
- strFromRE(/\s*\{\s*([-]?\d*(?:\.\d*)?),\s*([-]?\d*(?:\.\d*)?)\}/), 'g');
- for (var line of out.split(/\r?\n/)) {
- var singleResultMatch = singleResultRE.exec(line);
- var multiResultsMatch = multiResultsRE.exec(line);
- var meanStdDevMatch = meanStdDevRE.exec(line);
- if (singleResultMatch && singleResultMatch.length > 1)
- stringVals.push(singleResultMatch[1]);
- else if (multiResultsMatch && multiResultsMatch.length > 1) {
- var values = multiResultsMatch[1].split(',');
- stringVals = stringVals.concat(values);
- } else if (meanStdDevMatch && meanStdDevMatch.length > 1)
- stringVals.push(meanStdDevMatch[1]);
- }
- for (var val of stringVals) {
- var f = parseFloat(val);
- if (!isNaN(f))
- floatVals.push(f);
- }
- return floatVals;
-}
-
-function parseMultipleBuildbotStreams(files, metric) {
- var allValues = [];
- for (var path of files) {
- try {
- var contents = tr.b.getSync('file://' + path);
- }
- catch (ex) {
- var err = new Error('Could not open' + path);
- err.name = 'File loading error';
- throw err;
- }
- allValues = allValues.concat(valuesFromBuildbotOutput(contents, metric));
- }
- return allValues;
-}
-
-var buildComparisonResultOutput = function(a, b) {
- return {
- sampleA: a,
- sampleB: b,
- result: tr.b.Statistics.mwu(
- a, b, tr.b.Statistics.DEFAULT_ALPHA,
- tr.b.Statistics.MAX_SUGGESTED_SAMPLE_SIZE)
- };
-};
-
-var SampleComparison = {
-
- compareBuildbotOutputs: function(
- buildbotOutputAPathList, buildbotOutputBPathList, metric) {
- var aPaths = buildbotOutputAPathList.split(',');
- var bPaths = buildbotOutputBPathList.split(',');
- var sampleA = parseMultipleBuildbotStreams(aPaths, metric);
- var sampleB = parseMultipleBuildbotStreams(bPaths, metric);
- return buildComparisonResultOutput(sampleA, sampleB);
- },
-
- compareValuesets: function(valueSetAPathList, valueSetBPathList, metric) {
- var aPaths = valueSetAPathList.split(',');
- var bPaths = valueSetBPathList.split(',');
- var valueSetA = new tr.v.ValueSet();
- var valueSetB = new tr.v.ValueSet();
- var dictsA = parseFiles(aPaths);
- var dictsB = parseFiles(bPaths);
- for (var d of dictsA)
- valueSetA.addValuesFromDicts(d);
- for (var d of dictsB)
- valueSetB.addValuesFromDicts(d);
-
- var sampleA = rawValuesByMetricName(valueSetA, metric);
- var sampleB = rawValuesByMetricName(valueSetB, metric);
- return buildComparisonResultOutput(sampleA, sampleB);
- },
-
- compareCharts: function(chartPathListA, chartPathListB, metric) {
- var aPaths = chartPathListA.split(',');
- var bPaths = chartPathListB.split(',');
- var chartsA = parseFiles(aPaths);
- var chartsB = parseFiles(bPaths);
- var sampleA = valuesFromCharts(chartsA, metric);
- var sampleB = valuesFromCharts(chartsB, metric);
- return buildComparisonResultOutput(sampleA, sampleB);
- }
-
-};
-
-if (tr.isHeadless) {
- var method, rest;
- [method, ...rest] = sys.argv.slice(1);
- if (SampleComparison[method])
- console.log(JSON.stringify(SampleComparison[method](...rest)));
-}
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_unittest.py b/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_unittest.py
deleted file mode 100644
index 730f7915d67..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/compare_samples_unittest.py
+++ /dev/null
@@ -1,225 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import json
-import math
-import os
-import random
-import tempfile
-import unittest
-
-from tracing.metrics import compare_samples
-
-
-REJECT = 'REJECT'
-FAIL_TO_REJECT = 'FAIL_TO_REJECT'
-NEED_MORE_DATA = 'NEED_MORE_DATA'
-
-
-def Mean(l):
- if len(l):
- return float(sum(l))/len(l)
- return 0
-
-
-class CompareSamplesUnittest(unittest.TestCase):
- def setUp(self):
- self._tempfiles = []
- self._tempdir = tempfile.mkdtemp()
-
- def tearDown(self):
- for tf in self._tempfiles:
- try:
- os.remove(tf)
- except OSError:
- pass
- try:
- os.rmdir(self._tempdir)
- except OSError:
- pass
-
- def NewJsonTempfile(self, jsonable_contents):
- f_handle, new_json_file = tempfile.mkstemp(
- suffix='.json',
- dir=self._tempdir,
- text=True)
- os.close(f_handle)
- self._tempfiles.append(new_json_file)
- with open(new_json_file, 'w') as f:
- json.dump(jsonable_contents, f)
- return new_json_file
-
- def MakeMultipleChartJSONHistograms(self, metric, seed, mu, sigma, n, m):
- result = []
- random.seed(seed)
- for _ in range(m):
- result.append(self.MakeChartJSONHistogram(metric, mu, sigma, n))
- return result
-
- def MakeChartJSONHistogram(self, metric, mu, sigma, n):
- """Creates a histogram for a normally distributed pseudo-random sample.
-
- This function creates a deterministic pseudo-random sample and stores it in
- chartjson histogram format to facilitate the testing of the sample
- comparison logic.
-
- For simplicity we use sqrt(n) buckets with equal widths.
-
- Args:
- metric (str pair): name of chart, name of the trace.
- seed (hashable obj): to make the sequences deterministic we seed the RNG.
- mu (float): desired mean for the sample
- sigma (float): desired standard deviation for the sample
- n (int): number of values to generate.
- """
- chart_name, trace_name = metric
- values = [random.gauss(mu, sigma) for _ in range(n)]
- bucket_count = int(math.ceil(math.sqrt(len(values))))
- width = (max(values) - min(values))/(bucket_count - 1)
- prev_bucket = min(values)
- buckets = []
- for _ in range(bucket_count):
- buckets.append({'low': prev_bucket,
- 'high': prev_bucket + width,
- 'count': 0})
- prev_bucket += width
- for value in values:
- for bucket in buckets:
- if value >= bucket['low'] and value < bucket['high']:
- bucket['count'] += 1
- break
- charts = {
- 'charts': {
- chart_name: {
- trace_name: {
- 'type': 'histogram',
- 'buckets': buckets
- }
- }
- }
- }
- return self.NewJsonTempfile(charts)
-
- def MakeChart(self, metric, seed, mu, sigma, n):
- """Creates a normally distributed pseudo-random sample. (continuous).
-
- This function creates a deterministic pseudo-random sample and stores it in
- chartjson format to facilitate the testing of the sample comparison logic.
-
- Args:
- metric (str pair): name of chart, name of the trace.
- seed (hashable obj): to make the sequences deterministic we seed the RNG.
- mu (float): desired mean for the sample
- sigma (float): desired standard deviation for the sample
- n (int): number of values to generate.
- """
- chart_name, trace_name = metric
- random.seed(seed)
- values = [random.gauss(mu, sigma) for _ in range(n)]
- charts = {
- 'charts': {
- chart_name: {
- trace_name: {
- 'type': 'list_of_scalar_values',
- 'values': values}
- }
- }
- }
- return self.NewJsonTempfile(charts)
-
- def testCompareClearRegression(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join([self.MakeChart(metric=metric, seed='lower',
- mu=10, sigma=1, n=10)])
- higher_values = ','.join([self.MakeChart(metric=metric, seed='higher',
- mu=20, sigma=2, n=10)])
- result = json.loads(compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric)).stdout)
- self.assertEqual(result['result']['significance'], REJECT)
-
- def testCompareUnlikelyRegressionWithMultipleRuns(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join([
- self.MakeChart(
- metric=metric, seed='lower%d' % i, mu=10, sigma=1, n=5)
- for i in range(4)])
- higher_values = ','.join([
- self.MakeChart(
- metric=metric, seed='higher%d' % i, mu=10.01, sigma=0.95, n=5)
- for i in range(4)])
- result = json.loads(compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric)).stdout)
- self.assertEqual(result['result']['significance'], FAIL_TO_REJECT)
-
- def testCompareInsufficientData(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join([self.MakeChart(metric=metric, seed='lower',
- mu=10, sigma=1, n=5)])
- higher_values = ','.join([self.MakeChart(metric=metric, seed='higher',
- mu=10.40, sigma=0.95, n=5)])
- result = json.loads(compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric)).stdout)
- self.assertEqual(result['result']['significance'], NEED_MORE_DATA)
-
- def testCompareMissingFile(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join([self.MakeChart(metric=metric, seed='lower',
- mu=10, sigma=1, n=5)])
- higher_values = '/path/does/not/exist.json'
- with self.assertRaises(RuntimeError):
- compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric))
-
- def testCompareMissingMetric(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join([self.MakeChart(metric=metric, seed='lower',
- mu=10, sigma=1, n=5)])
- higher_values = ','.join([self.MakeChart(metric=metric, seed='higher',
- mu=20, sigma=2, n=5)])
- metric = ('some_chart', 'missing_trace')
- with self.assertRaises(RuntimeError):
- compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric))
-
- def testCompareBadChart(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join([self.MakeChart(metric=metric, seed='lower',
- mu=10, sigma=1, n=5)])
- higher_values = self.NewJsonTempfile(['obviously', 'not', 'a', 'chart]'])
- with self.assertRaises(RuntimeError):
- compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric))
-
- def testCompareValuesets(self):
- vs = os.path.join(os.path.dirname(__file__),
- 'valueset_output_for_compare_samples_test.json')
- result = compare_samples.CompareSamples(
- vs, vs, 'timeToFirstContentfulPaint/pcv1-cold/'
- 'http___www.rambler.ru_', data_format='valueset')
- result = json.loads(result.stdout)
- self.assertEqual(result['result']['significance'], NEED_MORE_DATA)
- self.assertAlmostEqual(Mean(result['sampleA']), 75.3177999958396)
- self.assertAlmostEqual(Mean(result['sampleB']), 75.3177999958396)
-
- def testCompareBuildbotOutput(self):
- bb = os.path.join(os.path.dirname(__file__),
- 'buildbot_output_for_compare_samples_test.txt')
- result = compare_samples.CompareSamples(
- bb, bb, 'DrawCallPerf_gl/score',
- data_format='buildbot')
- result = json.loads(result.stdout)
- self.assertEqual(result['result']['significance'], NEED_MORE_DATA)
- self.assertEqual(Mean(result['sampleA']), 4123)
- self.assertEqual(Mean(result['sampleB']), 4123)
-
- def testCompareChartJsonHistogram(self):
- metric = ('some_chart', 'some_trace')
- lower_values = ','.join(self.MakeMultipleChartJSONHistograms(
- metric=metric, seed='lower', mu=10, sigma=1, n=100, m=10))
- higher_values = ','.join(self.MakeMultipleChartJSONHistograms(
- metric=metric, seed='higher', mu=20, sigma=2, n=100, m=10))
- result = json.loads(compare_samples.CompareSamples(
- lower_values, higher_values, '/'.join(metric)).stdout)
- self.assertEqual(result['result']['significance'], REJECT)
-
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric.html
deleted file mode 100644
index 2a0a9bae3c1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- function getCpuSnapshotsFromModel(model) {
- var snapshots = [];
- for (var pid in model.processes) {
- var snapshotInstances = model.processes[pid].objects.getAllInstancesNamed(
- 'CPUSnapshots');
- if (!snapshotInstances)
- continue;
- for (var object of snapshotInstances[0].snapshots)
- snapshots.push(object.args.processes);
- }
- return snapshots;
- }
-
- function getProcessSumsFromSnapshot(snapshot) {
- var processSums = new Map();
- for (var processData of snapshot) {
- var processName = processData.name;
- if (!(processSums.has(processName)))
- processSums.set(processName, {sum: 0.0, paths: new Set()});
- processSums.get(processName).sum += parseFloat(processData.pCpu);
- // The process path may be missing on Windows because of AccessDenied
- // error thrown by psutil package used by CPU tracing agent.
- if (processData.path)
- processSums.get(processName).paths.add(processData.path);
- }
- return processSums;
- }
-
- function buildNumericsFromSnapshots(snapshots) {
- var processNumerics = new Map();
- for (var snapshot of snapshots) {
- var processSums = getProcessSumsFromSnapshot(snapshot);
- for (var [processName, processData] of processSums.entries()) {
- if (!(processNumerics.has(processName))) {
- processNumerics.set(processName, {
- numeric: new tr.v.Histogram('cpu:percent:' + processName,
- tr.b.Unit.byName.normalizedPercentage_smallerIsBetter),
- paths: new Set()
- });
- }
- processNumerics.get(processName).numeric.addSample(
- processData.sum / 100.0);
- for (var path of processData.paths)
- processNumerics.get(processName).paths.add(path);
- }
- }
- return processNumerics;
- }
-
- function cpuProcessMetric(values, model) {
- var snapshots = getCpuSnapshotsFromModel(model);
- var processNumerics = buildNumericsFromSnapshots(snapshots);
- for (var [processName, processData] of processNumerics) {
- var numeric = processData.numeric;
- // Treat missing snapshots as zeros. A process is missing from a snapshots
- // when its CPU usage was below minimum threshold when the snapshot was
- // taken.
- var missingSnapshotCount = snapshots.length - numeric.numValues;
- for (var i = 0; i < missingSnapshotCount; i++)
- numeric.addSample(0);
- numeric.diagnostics.set('paths', new
- tr.v.d.Generic([...processData.paths]));
- values.addHistogram(numeric);
- }
- }
-
- tr.metrics.MetricRegistry.register(cpuProcessMetric);
-
- return {
- cpuProcessMetric: cpuProcessMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric_test.html
deleted file mode 100644
index a9e3dce210b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/cpu_process_metric_test.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/cpu_process_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function makeModel(events) {
- return tr.c.TestUtils.newModelWithEvents([events]);
- }
-
- test('cpuProcessMetric_noData', function() {
- var values = new tr.v.ValueSet();
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'}
- ];
- tr.metrics.sh.cpuProcessMetric(values, makeModel(events));
- assert.lengthOf(values.toArray(), 0);
- });
-
- test('cpuProcessMetric_singleSnapshots', function() {
- var values = new tr.v.ValueSet();
- var events = [
- {
- 'name': 'CPUSnapshots',
- 'args': {
- 'snapshot': {
- 'processes': [
- {'path': '/usr/sbin/crudd', 'pCpu': '99.0', 'pid': '13495',
- 'pMem': '0.0', 'name': 'crudd'},
- {'path': '/opt/chrome/chrome', 'pCpu': '0.8',
- 'pid': '29660', 'pMem': '0.9', 'name': 'chrome'},
- {'path': '/opt/chrome/chrome', 'pCpu': '0.3',
- 'pid': '29661', 'pMem': '0.9', 'name': 'chrome'}
- ]
- }
- },
- 'pid': 52, 'ts': '2226221225693.658', tid: 53,
- 'tid': undefined, 'ph': 'O', 'local': true, 'id': '0x1000'
- }
- ];
- tr.metrics.sh.cpuProcessMetric(values, makeModel(events));
- assert.lengthOf(values.getValuesNamed('cpu:percent:chrome'), 1);
- assert.lengthOf(values.getValuesNamed('cpu:percent:crudd'), 1);
- var chromeValue = values.getValuesNamed('cpu:percent:chrome')[0];
- var chromeStatistics = chromeValue.running;
- assert.strictEqual(chromeStatistics.count, 1);
- assert.closeTo(chromeStatistics.mean, 0.011, 1e-5);
- assert.closeTo(chromeStatistics.max, 0.011, 1e-5);
- assert.instanceOf(chromeValue.diagnostics.get('paths'), tr.v.d.Generic);
- assert.lengthOf(chromeValue.diagnostics.get('paths').value, 1);
- assert.strictEqual(chromeValue.diagnostics.get('paths').value[0],
- '/opt/chrome/chrome');
- });
-
- test('cpuProcessMetric_multipleSnapshots', function() {
- var values = new tr.v.ValueSet();
- var events = [
- {
- 'name': 'CPUSnapshots',
- 'args': {
- 'snapshot': {
- 'processes': [
- {'path': '/usr/sbin/crudd', 'pCpu': '99.0', 'pid': '13495',
- 'pMem': '0.0', 'name': 'crudd'},
- {'path': '/opt/chrome/chrome', 'pCpu': '0.8',
- 'pid': '29660', 'pMem': '0.9', 'name': 'chrome'}
- ]
- }
- },
- 'pid': 52, 'ts': '2226221225693.658', tid: 53,
- 'tid': undefined, 'ph': 'O', 'local': true, 'id': '0x1000'
- },
- {
- 'name': 'CPUSnapshots',
- 'args': {
- 'snapshot': {
- 'processes': [
- {'path': '/usr/sbin/crudd', 'pCpu': '1.3', 'pid': '13495',
- 'pMem': '0.0', 'name': 'crudd'},
- {'path': '/opt/chrome/chrome', 'pCpu': '0.6',
- 'pid': '29660', 'pMem': '0.9', 'name': 'chrome'},
- {'path': '/opt/chromium/chrome', 'pCpu': '0.1',
- 'pid': '29660', 'pMem': '0.9', 'name': 'chrome'},
- {'path': '/usr/sbin/mnp_logger', 'pCpu': '0.2', 'pid': '6543',
- 'pMem': '0.1', 'name': 'mnp_logger'}
- ]
- }
- },
- 'pid': 52, 'ts': '2226222262064.4473', tid: 53,
- 'tid': undefined, 'ph': 'O', 'local': true, 'id': '0x1000'
- }
- ];
- tr.metrics.sh.cpuProcessMetric(values, makeModel(events));
- assert.lengthOf(values.getValuesNamed('cpu:percent:chrome'), 1);
- assert.lengthOf(values.getValuesNamed('cpu:percent:crudd'), 1);
- assert.lengthOf(values.getValuesNamed('cpu:percent:mnp_logger'), 1);
- var chromeValue = values.getValuesNamed('cpu:percent:chrome')[0];
- var chromeStatistics = chromeValue.running;
- assert.strictEqual(chromeStatistics.count, 2);
- assert.closeTo(chromeStatistics.mean, 0.0075, 1e-5);
- assert.strictEqual(chromeStatistics.max, 0.008);
- assert.instanceOf(chromeValue.diagnostics.get('paths'), tr.v.d.Generic);
- assert.lengthOf(chromeValue.diagnostics.get('paths').value, 2);
- assert.strictEqual(chromeValue.diagnostics.get('paths').value[0],
- '/opt/chrome/chrome');
-
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/discover.py b/chromium/third_party/catapult/tracing/tracing/metrics/discover.py
deleted file mode 100644
index ef532c6d0df..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/discover.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import json
-import os
-
-import tracing_project
-import vinn
-
-
-_DISCOVER_CMD_LINE = os.path.join(
- os.path.dirname(__file__), 'discover_cmdline.html')
-
-
-def DiscoverMetrics(modules_to_load):
- """ Returns a list of registered metrics.
-
- Args:
- modules_to_load: a list of modules (string) to be loaded before discovering
- the registered metrics.
- """
- assert isinstance(modules_to_load, list)
- project = tracing_project.TracingProject()
- all_source_paths = list(project.source_paths)
-
- res = vinn.RunFile(
- _DISCOVER_CMD_LINE, source_paths=all_source_paths,
- js_args=modules_to_load)
-
- if res.returncode != 0:
- raise RuntimeError('Error running metrics_discover_cmdline: ' + res.stdout)
- else:
- return [str(m) for m in json.loads(res.stdout)]
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/discover_cmdline.html b/chromium/third_party/catapult/tracing/tracing/metrics/discover_cmdline.html
deleted file mode 100644
index 259738036db..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/discover_cmdline.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-
-<script>
-'use strict';
-
-function discoverMetrics(args) {
- for (var i = 0; i < args.length; i++) {
- var filename = args[i];
- HTMLImportsLoader.loadHTML(filename);
- }
-
- var metrics = tr.metrics.MetricRegistry.getAllRegisteredTypeInfos();
- var discoveredMetricNames = [];
- for (var i = 0; i < metrics.length; i++) {
- discoveredMetricNames.push(metrics[i].constructor.name);
- }
- console.log(JSON.stringify(discoveredMetricNames));
- return 0;
-}
-
-if (tr.isHeadless)
- quit(discoverMetrics(sys.argv.slice(1)));
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/discover_unittest.py b/chromium/third_party/catapult/tracing/tracing/metrics/discover_unittest.py
deleted file mode 100644
index 10b81b547c8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/discover_unittest.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from tracing.metrics import discover
-
-class MetricsDiscoverUnittest(unittest.TestCase):
- def testMetricsDiscoverEmpty(self):
- self.assertFalse(discover.DiscoverMetrics([]))
-
- def testMetricsDiscoverNonEmpty(self):
- self.assertEquals(['sampleMetric'], discover.DiscoverMetrics(
- ['/tracing/metrics/sample_metric.html']))
-
- def testMetricsDiscoverMultipleMetrics(self):
- self.assertGreater(
- len(discover.DiscoverMetrics(
- ['/tracing/metrics/all_metrics.html'])), 1)
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function.html b/chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function.html
deleted file mode 100644
index c841ab84494..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/all_metrics.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/mre/function_handle.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics', function() {
- /**
- * @param {!tr.model.Model} model
- * @param {!Object} options
- * @param {!Array.<string>} options.metrics
- * @return {!tr.v.ValueSet}
- */
- function runMetrics(model, options) {
- if (options === undefined)
- throw new Error('Options are required.');
-
- var metricNames = options.metrics;
- if (!metricNames)
- throw new Error('Metric names should be specified.');
-
- var values = new tr.v.ValueSet();
-
- for (var metricName of metricNames) {
- var metric = tr.metrics.MetricRegistry.findTypeInfoWithName(metricName);
- if (metric === undefined)
- throw new Error('"' + metricName + '" is not a registered metric.');
- metric.constructor(values, model, options);
- }
-
- return values;
- }
-
- /**
- * @param {!tr.v.ValueSet} values
- * @param {!tr.model.Model} model
- */
- function addIterationInfo(values, model) {
- var iterationInfo = new tr.v.d.IterationInfo();
- for (var metadata of model.metadata) {
- if (!metadata.value)
- continue;
-
- if (metadata.value['iteration-info'])
- iterationInfo.addInfo(metadata.value['iteration-info']);
-
- if (metadata.value['os-version'])
- iterationInfo.addInfo(metadata.value);
- }
- // Values can be separated from their ValueSet and mixed into ValueSets
- // with Values from other iterations, so add IterationInfo to each Value.
- values.map(v => iterationInfo.addToValue(v));
- }
-
- /**
- * @param {!tr.mre.MreResult} result
- * @param {!tr.model.Model} model
- * @param {!Object} options
- * @param {!Array.<string>} options.metrics
- */
- function metricMapFunction(result, model, options) {
- var values = runMetrics(model, options);
- addIterationInfo(values, model);
-
- result.addPair('histograms', values.valueDicts);
-
- var scalarDicts = [];
- for (var value of values) {
- for (var [statName, scalar] of value.statisticsScalars) {
- scalarDicts.push({
- name: value.name + '_' + statName,
- numeric: scalar.asDict(),
- description: value.description,
- });
- }
- }
- result.addPair('scalars', scalarDicts);
- }
-
- tr.mre.FunctionRegistry.register(metricMapFunction);
-
- return {
- metricMapFunction: metricMapFunction,
- runMetrics: runMetrics
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function_test.html
deleted file mode 100644
index 8e5048f3e13..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/metric_map_function_test.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/metric_map_function.html">
-<link rel="import" href="/tracing/metrics/sample_metric.html">
-<link rel="import" href="/tracing/mre/mre_result.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestUtils = tr.c.TestUtils;
- var ThreadSlice = tr.model.ThreadSlice;
-
- test('metricMapTest', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'E'}
- ];
- var m = TestUtils.newModelWithEvents(JSON.stringify(events), {
- shiftWorldToZero: false,
- pruneEmptyContainers: false,
- trackDetailedModelStats: true,
- customizeModelCallback: function(m) {
- var p1 = m.getOrCreateProcess(1);
- var t2 = p1.getOrCreateThread(2);
- t2.sliceGroup.pushSlice(TestUtils.newSliceEx({
- type: ThreadSlice,
- name: 'some_slice',
- start: 0, end: 10
- }));
- t2.sliceGroup.pushSlice(TestUtils.newSliceEx({
- type: ThreadSlice,
- name: 'some_slice',
- start: 20, end: 30
- }));
- }
- });
-
- assert.throw(function() {
- var result = new tr.mre.MreResult();
- tr.metrics.metricMapFunction(result, m, {});
- }, Error, 'Metric names should be specified.');
-
- assert.throw(function() {
- var result = new tr.mre.MreResult();
- tr.metrics.metricMapFunction(result, m, {'metrics': ['wrongMetric']});
- }, Error, '"wrongMetric" is not a registered metric.');
-
- var result = new tr.mre.MreResult();
- tr.metrics.metricMapFunction(result, m, {'metrics': ['sampleMetric']});
- assert.property(result.pairs, 'histograms');
- assert.equal(result.pairs.histograms.length, 1);
- assert.property(result.pairs, 'scalars');
- assert.equal(result.pairs.scalars.length, 6);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/metric_registry.html b/chromium/third_party/catapult/tracing/tracing/metrics/metric_registry.html
deleted file mode 100644
index d0f52ef71fc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/metric_registry.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/extension_registry.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics', function() {
-
- function MetricRegistry() {}
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.defaultMetadata = {};
- tr.b.decorateExtensionRegistry(MetricRegistry, options);
-
- MetricRegistry.addEventListener('will-register', function(e) {
- var metric = e.typeInfo.constructor;
- if (!(metric instanceof Function))
- throw new Error('Metrics must be functions');
-
- if (metric.length < 2) {
- throw new Error('Metrics take a ValueSet and a Model and ' +
- 'optionally an options dictionary');
- }
- });
-
- return {
- MetricRegistry: MetricRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/metric_registry_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/metric_registry_test.html
deleted file mode 100644
index 135f2518a8b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/metric_registry_test.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('FindMetricByName', function() {
- function sampleMetricA(values, model) {
- var n1 = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
- n1.addSample(1);
- values.addHistogram(n1);
- }
- tr.metrics.MetricRegistry.register(sampleMetricA);
-
- function sampleMetricB(values, model) {
- var n1 = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
- var n2 = new tr.v.Histogram('bar', tr.b.Unit.byName.count);
- n1.addSample(1);
- n2.addSample(2);
- values.addHistogram(n1);
- values.addHistogram(n2);
- }
- tr.metrics.MetricRegistry.register(sampleMetricB);
-
- function sampleMetricC(values, model) {
- var n1 = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
- var n2 = new tr.v.Histogram('bar', tr.b.Unit.byName.count);
- var n3 = new tr.v.Histogram('baz', tr.b.Unit.byName.count);
- n1.addSample(1);
- n2.addSample(2);
- n3.addSample(3);
- values.addHistogram(n1);
- values.addHistogram(n2);
- values.addHistogram(n3);
- }
- tr.metrics.MetricRegistry.register(sampleMetricC);
-
- var typeInfo = tr.metrics.MetricRegistry.findTypeInfoWithName(
- 'sampleMetricB');
- assert.strictEqual(typeInfo.constructor, sampleMetricB);
- });
-
- test('registerNonFunctionThrows', function() {
- assert.throws(function() {
- tr.metrics.MetricRegistry.register('not a function');
- });
-
- assert.throws(function() {
- tr.metrics.MetricRegistry.register(function() {});
- });
-
- assert.throws(function() {
- tr.metrics.MetricRegistry.register(function(a) {});
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/metric_runner.py b/chromium/third_party/catapult/tracing/tracing/metrics/metric_runner.py
deleted file mode 100644
index b691cc44f7d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/metric_runner.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import os
-
-from tracing.mre import function_handle
-from tracing.mre import gtest_progress_reporter
-from tracing.mre import map_runner
-from tracing.mre import file_handle
-from tracing.mre import job as job_module
-
-_METRIC_MAP_FUNCTION_FILENAME = 'metric_map_function.html'
-
-_METRIC_MAP_FUNCTION_NAME = 'metricMapFunction'
-
-def _GetMetricsDir():
- return os.path.dirname(os.path.abspath(__file__))
-
-def _GetMetricRunnerHandle(metrics):
- assert isinstance(metrics, list)
- for metric in metrics:
- assert isinstance(metric, basestring)
- metrics_dir = _GetMetricsDir()
- metric_mapper_path = os.path.join(metrics_dir, _METRIC_MAP_FUNCTION_FILENAME)
-
- modules_to_load = [function_handle.ModuleToLoad(filename=metric_mapper_path)]
- options = {'metrics': metrics}
- map_function_handle = function_handle.FunctionHandle(
- modules_to_load, _METRIC_MAP_FUNCTION_NAME, options)
-
- return job_module.Job(map_function_handle, None)
-
-def RunMetric(filename, metrics, extra_import_options=None):
- result = RunMetricOnTraces([filename], metrics, extra_import_options)
- return result[filename]
-
-def RunMetricOnTraces(filenames, metrics,
- extra_import_options=None):
- trace_handles = [
- file_handle.URLFileHandle(f, 'file://%s' % f) for f in filenames]
- job = _GetMetricRunnerHandle(metrics)
- runner = map_runner.MapRunner(
- trace_handles, job, extra_import_options=extra_import_options,
- progress_reporter=gtest_progress_reporter.GTestProgressReporter())
- map_results = runner.RunMapper()
- return map_results
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/sample_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/sample_metric.html
deleted file mode 100644
index 34e0c700c9c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/sample_metric.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics', function() {
- function sampleMetric(values, model) {
- var hist = new tr.v.Histogram(
- 'foo', tr.b.Unit.byName.sizeInBytes_smallerIsBetter);
- hist.addSample(9);
- hist.addSample(91, {bar: new tr.v.d.Generic({hello: 42})});
-
- for (var expectation of model.userModel.expectations) {
- if (expectation instanceof tr.model.um.ResponseExpectation) {
- } else if (expectation instanceof tr.model.um.AnimationExpectation) {
- } else if (expectation instanceof tr.model.um.IdleExpectation) {
- } else if (expectation instanceof tr.model.um.LoadExpectation) {
- }
- }
-
- var chromeHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
-
- tr.b.iterItems(model.processes, function(pid, process) {
- });
-
- values.addHistogram(hist);
- }
-
- tr.metrics.MetricRegistry.register(sampleMetric);
-
- return {
- sampleMetric: sampleMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric.html
deleted file mode 100644
index 8d3820e77d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- function syncIsComplete(markers) {
- return markers.length === 2;
- }
-
- function syncInvolvesTelemetry(markers) {
- for (var marker of markers)
- if (marker.domainId === tr.model.ClockDomainId.TELEMETRY)
- return true;
-
- return false;
- }
-
- function clockSyncLatencyMetric(values, model) {
- for (var markers of model.clockSyncManager.markersBySyncId.values()) {
- var latency = undefined;
- var targetDomain = undefined;
- if (!syncIsComplete(markers) || !syncInvolvesTelemetry(markers))
- continue;
-
- for (var marker of markers) {
- var domain = marker.domainId;
- if (domain === tr.model.ClockDomainId.TELEMETRY)
- latency = (marker.endTs - marker.startTs);
- else
- targetDomain = domain.toLowerCase();
- }
-
- var hist = new tr.v.Histogram('clock_sync_latency_' + targetDomain,
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createExponential(1e-3, 1e3, 30));
- hist.description = 'Clock sync latency for domain ' + targetDomain;
- hist.addSample(latency);
- values.addHistogram(hist);
- }
- }
-
- tr.metrics.MetricRegistry.register(clockSyncLatencyMetric);
-
- return {
- clockSyncLatencyMetric: clockSyncLatencyMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric_test.html
deleted file mode 100644
index bc1dd5103ab..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/clock_sync_latency_metric_test.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/system_health/clock_sync_latency_metric.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('clockSyncLatencyMetric', function() {
- var model = new tr.Model();
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.TELEMETRY, 'ID01', 1.0, 4.0);
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.TELEMETRY, 'ID02', 2.0, 8.0);
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.BATTOR, 'ID01', 2.5);
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.WIN_QPC, 'ID02', 5.0);
-
- var battorName = 'clock_sync_latency_' +
- tr.model.ClockDomainId.BATTOR.toLowerCase();
- var winQpcName = 'clock_sync_latency_' +
- tr.model.ClockDomainId.WIN_QPC.toLowerCase();
-
- var valueSet = new tr.v.ValueSet();
- tr.metrics.sh.clockSyncLatencyMetric(valueSet, model);
-
- var battorValue = undefined;
- var winQpcValue = undefined;
- for (var value of valueSet) {
- if (value.name === battorName)
- battorValue = value;
- else if (value.name === winQpcName)
- winQpcValue = value;
- }
-
- assert.isDefined(battorValue);
- assert.isDefined(winQpcValue);
- assert.closeTo(battorValue.average, 3.0, 1e-5);
- assert.closeTo(winQpcValue.average, 6.0, 1e-5);
- });
-
- test('clockSyncLatencyMetric_noTelemetry', function() {
- var model = new tr.Model();
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.TELEMETRY, 'ID01', 1.0, 4.0);
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.BATTOR, 'ID02', 2.5);
- model.clockSyncManager.addClockSyncMarker(
- tr.model.ClockDomainId.WIN_QPC, 'ID02', 5.0);
-
- var valueSet = new tr.v.ValueSet();
- tr.metrics.sh.clockSyncLatencyMetric(valueSet, model);
-
- assert.lengthOf(valueSet.valueDicts, 0);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric.html
deleted file mode 100644
index 3879154231b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- // Use a lower bound of 0.01 for the metric boundaries (when no CPU time
- // is consumed) and an upper bound of 50 (fifty cores are all active
- // for the entire time). We can't use zero exactly for the lower bound with an
- // exponential histogram.
- var CPU_TIME_PERCENTAGE_BOUNDARIES =
- tr.v.HistogramBinBoundaries.createExponential(0.01, 50, 200);
-
- /**
- * This metric measures total CPU time for Chrome processes, per second of
- * clock time.
- * This metric requires only the 'toplevel' tracing category.
- *
- * @param {!tr.v.ValueSet} values
- * @param {!tr.model.Model} model
- * @param {!Object=} opt_options
- */
- function cpuTimeMetric(values, model, opt_options) {
- var rangeOfInterest = model.bounds;
- if (opt_options && opt_options.rangeOfInterest)
- rangeOfInterest = opt_options.rangeOfInterest;
- var allProcessCpuTime = 0;
-
- for (var pid in model.processes) {
- var process = model.processes[pid];
- var processCpuTime = 0;
- for (var tid in process.threads) {
- var thread = process.threads[tid];
- var threadCpuTime = 0;
- thread.sliceGroup.topLevelSlices.forEach(function(slice) {
- if (slice.duration === 0)
- return;
- if (!slice.cpuDuration)
- return;
- var sliceRange = tr.b.Range.fromExplicitRange(slice.start, slice.end);
- var intersection = rangeOfInterest.findIntersection(sliceRange);
- var fractionOfSliceInsideRangeOfInterest =
- intersection.duration / slice.duration;
-
- // We assume that if a slice doesn't lie entirely inside the range of
- // interest, then the CPU time is evenly distributed inside of the
- // slice.
- threadCpuTime +=
- slice.cpuDuration * fractionOfSliceInsideRangeOfInterest;
- });
- processCpuTime += threadCpuTime;
- }
- allProcessCpuTime += processCpuTime;
- }
-
- // Normalize cpu time by clock time.
- var normalizedAllProcessCpuTime = 0;
- if (rangeOfInterest.duration > 0) {
- normalizedAllProcessCpuTime =
- allProcessCpuTime / rangeOfInterest.duration;
- }
-
- var unit = tr.b.Unit.byName.normalizedPercentage_smallerIsBetter;
- var cpuTimeHist = new tr.v.Histogram(
- 'cpu_time_percentage', unit, CPU_TIME_PERCENTAGE_BOUNDARIES);
- cpuTimeHist.description =
- 'Percent CPU utilization, normalized against a single core. Can be ' +
- 'greater than 100% if machine has multiple cores.';
- cpuTimeHist.addSample(normalizedAllProcessCpuTime);
- values.addHistogram(cpuTimeHist);
- }
-
- tr.metrics.MetricRegistry.register(cpuTimeMetric, {
- supportsRangeOfInterest: true
- });
-
- return {
- cpuTimeMetric: cpuTimeMetric,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric_test.html
deleted file mode 100644
index 65616512ea8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/cpu_time_metric_test.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/system_health/cpu_time_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function computeCpuTime(customizeModelCallback, opt_options) {
- var model = tr.c.TestUtils.newModel(function(model) {
- customizeModelCallback(model);
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.cpuTimeMetric(values, model, opt_options);
- return tr.b.getOnlyElement(values).average;
- }
-
- // There are two slices, each of length 50. The total bounds is 3000.
- // This yields total CPU time of 100ms, averaged over 3 seconds is 33ms.
- test('cpuTimeMetric_oneProcess', function() {
- var sliceDuration = 50;
- var totalDuration = 3000;
- var value = computeCpuTime(function(model) {
- model.rendererProcess = model.getOrCreateProcess(2);
- model.rendererMain = model.rendererProcess.getOrCreateThread(3);
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: sliceDuration,
- cpuStart: 0,
- cpuDuration: sliceDuration,
- }));
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: totalDuration - sliceDuration,
- duration: sliceDuration,
- cpuStart: totalDuration - sliceDuration,
- cpuDuration: sliceDuration,
- }));
- });
- assert.closeTo(value, 0.033, 0.001);
- });
-
- // Makes sure that rangeOfInterest works correctly.
- test('cpuTimeMetric_oneProcess_rangeOfInterest', function() {
- var sliceDuration = 50;
- var totalDuration = 3000;
- var rangeOfInterest = new tr.b.Range.fromExplicitRange(-10, 30);
- var options = {}
- options.rangeOfInterest = rangeOfInterest
- var value = computeCpuTime(function(model) {
- model.rendererProcess = model.getOrCreateProcess(2);
- model.rendererMain = model.rendererProcess.getOrCreateThread(3);
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: sliceDuration,
- cpuStart: 0,
- cpuDuration: sliceDuration,
- }));
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: totalDuration - sliceDuration,
- duration: sliceDuration,
- cpuStart: totalDuration - sliceDuration,
- cpuDuration: sliceDuration,
- }));
- }, options);
- assert.closeTo(value, 0.75, 0.001);
- });
-
- // Process 1: There are two slices, each of length 50. The total bounds is
- // 3000. Process 2: There is one slice of length 50.
- // This yields total CPU time of 150ms, averaged over 3 seconds is 50ms.
- test('cpuTimeMetric_twoProcesses', function() {
- var sliceDuration = 50;
- var totalDuration = 3000;
- var value = computeCpuTime(function(model) {
- model.rendererProcess = model.getOrCreateProcess(2);
- model.rendererMain = model.rendererProcess.getOrCreateThread(3);
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: sliceDuration,
- cpuStart: 0,
- cpuDuration: sliceDuration,
- }));
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: totalDuration - sliceDuration,
- duration: sliceDuration,
- cpuStart: totalDuration - sliceDuration,
- cpuDuration: sliceDuration,
- }));
-
- var otherProcess = model.getOrCreateProcess(3);
- var otherThread = otherProcess.getOrCreateThread(4);
- otherThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: sliceDuration,
- cpuStart: 0,
- cpuDuration: sliceDuration,
- }));
- });
- assert.closeTo(value, 0.05, 0.001);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric.html
deleted file mode 100644
index e8b6eeb2ba8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/long_tasks_metric.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- // The following math is easier if the units are seconds rather than ms,
- // so durations will be converted from ms to s.
- var MS_PER_S = 1000;
-
- // https://www.desmos.com/calculator/ysabhcc42g
- var RESPONSE_RISK =
- tr.b.Statistics.LogNormalDistribution.fromMedianAndDiminishingReturns(
- 100 / MS_PER_S, 50 / MS_PER_S);
-
- /**
- * This helper function computes the risk that a task of the given duration
- * would impact the responsiveness of a speculative input.
- *
- * @param {number} durationMs
- * @return {number} task hazard
- */
- function computeResponsivenessRisk(durationMs) {
- // Returns 0 when the risk of impacting responsiveness is minimal.
- // Returns 1 when it is maximal.
- // durationMs is the duration of a long task.
- // It is at least LONG_TASK_MS.
- // The FAST_RESPONSE_HISTOGRAM was designed to permit both a 50ms task
- // when a Scroll Response begins, plus 16ms latency between the task
- // and the first frame of the scroll, without impacting the responsiveness
- // score.
- // Add 16ms to durationMs to simulate the standard (maximum ideal) scroll
- // response latency, and use the FAST_RESPONSE_HISTOGRAM to punish every ms
- // that the long task exceeds LONG_TASK_MS.
-
- durationMs += 16;
-
- // This returns a normalized percentage that
- // represents the fraction of users that would be satisfied with a
- // Scroll Response that takes durationMs to respond.
- // The risk of impacting responsiveness is approximated as the long task's
- // impact on a hypothetical Scroll Response that starts when the long task
- // starts, and then takes the standard 16ms to respond after the long task
- // finishes.
- // We imagine a Scroll Response instead of a Load or another type of
- // Response because the Scroll Response carries the strictest expectation.
- // The risk of impacting responsiveness is framed as the fraction of users
- // that would be *un*satisifed with the responsiveness of that hypothetical
- // Scroll Response. The fraction of users who are unsatisfied with something
- // is equal to 1 - the fraction of users who are satisfied with it.
- return RESPONSE_RISK.computePercentile(durationMs / MS_PER_S);
- }
-
- /**
- * This weighting function is similar to tr.metrics.sh.perceptualBlend,
- * but this version is appropriate for SmallerIsBetter metrics, whereas
- * that version is for BiggerIsBetter metrics.
- * (This would not be necessary if hazard were reframed as a BiggerIsBetter
- * metric such as "input readiness".)
- * Also, that version assumes that the 'ary' will be UserExpectations, whereas
- * this version assumes that the 'ary' will be scores.
- *
- * @param {number} hazardScore
- * @return {number} weight
- */
- function perceptualBlendSmallerIsBetter(hazardScore) {
- return Math.exp(hazardScore);
- }
-
- /**
- * Compute and return the normalized score for the risk that a speculative
- * input's responsiveness would have been impacted by long tasks on the given
- * thread in the given range.
- *
- * @param {tr.model.Thread} thread
- * @param {tr.b.Range=} opt_range
- * @return {number} hazard
- */
- function computeHazardForLongTasksInRangeOnThread(thread, opt_range) {
- var taskHazardScores = [];
- tr.metrics.sh.iterateLongTopLevelTasksOnThreadInRange(
- thread, opt_range, function(task) {
- taskHazardScores.push(computeResponsivenessRisk(task.duration));
- });
- return tr.b.Statistics.weightedMean(
- taskHazardScores, perceptualBlendSmallerIsBetter);
- }
-
- /**
- * Compute and return the normalized score for the risk that a speculative
- * input's responsiveness would have been impacted by long tasks.
- *
- * @param {tr.model.Model} model The model.
- * @return {number} hazard
- */
- function computeHazardForLongTasks(model) {
- var threadHazardScores = [];
- tr.metrics.sh.iterateRendererMainThreads(model, function(thread) {
- threadHazardScores.push(computeHazardForLongTasksInRangeOnThread(
- thread));
- });
- return tr.b.Statistics.weightedMean(
- threadHazardScores, perceptualBlendSmallerIsBetter);
- }
-
- /**
- * This EXPERIMENTAL metric computes a scalar normalized score that
- * represents the risk that a speculative input's responsiveness would have
- * been impacted by long tasks.
- * This metric requires only the 'toplevel' tracing category.
- */
- function hazardMetric(values, model) {
- var overallHazard = computeHazardForLongTasks(model);
- if (overallHazard === undefined)
- overallHazard = 0;
-
- var hist = new tr.v.Histogram('hazard',
- tr.b.Unit.byName.normalizedPercentage_smallerIsBetter);
- hist.addSample(overallHazard);
- values.addHistogram(hist);
- }
-
- tr.metrics.MetricRegistry.register(hazardMetric);
-
- return {
- hazardMetric: hazardMetric,
- computeHazardForLongTasksInRangeOnThread:
- computeHazardForLongTasksInRangeOnThread,
- computeHazardForLongTasks: computeHazardForLongTasks,
- computeResponsivenessRisk: computeResponsivenessRisk
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric_test.html
deleted file mode 100644
index f89d10f4aa1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/hazard_metric_test.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import"
- href="/tracing/metrics/system_health/hazard_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function computeHazardValue(customizeModelCallback) {
- var model = tr.c.TestUtils.newModel(function(model) {
- model.rendererProcess = model.getOrCreateProcess(2);
- model.rendererMain = model.rendererProcess.getOrCreateThread(3);
- model.rendererMain.name = 'CrRendererMain';
-
- customizeModelCallback(model);
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.hazardMetric(values, model);
- return tr.b.getOnlyElement(values);
- }
-
- test('minimalHazard', function() {
- var duration = 50 + 1e-4;
- var value = computeHazardValue(function(model) {
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: duration
- }));
- });
- assert.notEqual(0, value.average);
- assert.closeTo(value.average, 0.1611, 1e-5);
- });
-
- test('maximalHazard', function() {
- var value = computeHazardValue(function(model) {
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: 2200
- }));
- });
- assert.closeTo(value.average, 1, 1e-5);
- });
-
- test('blendedHazards', function() {
- var value = computeHazardValue(function(model) {
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: 100
- }));
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: 200
- }));
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: 300
- }));
- model.rendererMain.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- isTopLevel: true,
- start: 0,
- duration: 400
- }));
- });
- assert.closeTo(0.92144, value.average, 1e-4);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric.html
deleted file mode 100644
index 2a680024dbf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric.html
+++ /dev/null
@@ -1,437 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/category_util.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/utils.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- var RESPONSIVENESS_THRESHOLD_MS = 50;
- var INTERACTIVE_WINDOW_SIZE_MS = 5 * 1000;
- var timeDurationInMs_smallerIsBetter =
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter;
- var RelatedEventSet = tr.v.d.RelatedEventSet;
-
- // TODO(ksakamoto): This should be a method of tr.model.Event or one of its
- // subclasses.
- function hasCategoryAndName(event, category, title) {
- return event.title === title && event.category &&
- tr.b.getCategoryParts(event.category).indexOf(category) !== -1;
- }
-
- function findTargetRendererHelper(chromeHelper) {
- var largestPid = -1;
- for (var pid in chromeHelper.rendererHelpers) {
- var rendererHelper = chromeHelper.rendererHelpers[pid];
- if (rendererHelper.isChromeTracingUI)
- continue;
- if (pid > largestPid)
- largestPid = pid;
- }
-
- if (largestPid === -1)
- return undefined;
-
- return chromeHelper.rendererHelpers[largestPid];
- }
-
- function createBreakdownDiagnostic(rendererHelper, start, end) {
- var breakdownDict = rendererHelper.generateTimeBreakdownTree(
- start, end);
-
- var breakdownDiagnostic = new tr.v.d.Breakdown();
- breakdownDiagnostic.colorScheme =
- tr.v.d.COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER;
-
- for (var label in breakdownDict) {
- breakdownDiagnostic.set(label, breakdownDict[label].total);
- }
- return breakdownDiagnostic;
- }
-
- /**
- * A utility class for finding navigationStart event for given frame and
- * timestamp.
- * @constructor
- */
- function NavigationStartFinder(rendererHelper) {
- this.navigationStartsForFrameId_ = {};
- for (var ev of rendererHelper.mainThread.sliceGroup.childEvents()) {
- if (!hasCategoryAndName(ev, 'blink.user_timing', 'navigationStart'))
- continue;
- var frameIdRef = ev.args['frame'];
- var list = this.navigationStartsForFrameId_[frameIdRef];
- if (list === undefined)
- this.navigationStartsForFrameId_[frameIdRef] = list = [];
- list.unshift(ev);
- }
- }
-
- NavigationStartFinder.prototype = {
- findNavigationStartEventForFrameBeforeTimestamp: function(frameIdRef, ts) {
- var list = this.navigationStartsForFrameId_[frameIdRef];
- if (list === undefined) {
- console.warn('No navigationStartEvent found for frame id "' +
- frameIdRef + '"');
- return undefined;
- }
- var eventBeforeTimestamp;
- for (var ev of list) {
- if (ev.start > ts)
- continue;
- if (eventBeforeTimestamp === undefined)
- eventBeforeTimestamp = ev;
- }
- if (eventBeforeTimestamp === undefined) {
- console.warn('Failed to find navigationStartEvent.');
- return undefined;
- }
- return eventBeforeTimestamp;
- }
- };
-
- var FIRST_PAINT_BOUNDARIES = tr.v.HistogramBinBoundaries
- .createLinear(0, 1e3, 20) // 50ms step to 1s
- .addLinearBins(3e3, 20) // 100ms step to 3s
- .addExponentialBins(20e3, 20);
-
- function createHistogram(name) {
- var histogram = new tr.v.Histogram(name,
- timeDurationInMs_smallerIsBetter, FIRST_PAINT_BOUNDARIES);
- histogram.customizeSummaryOptions({
- avg: true,
- count: false,
- max: true,
- min: true,
- std: true,
- sum: false,
- percentile: [0.90, 0.95, 0.99],
- });
- return histogram;
- }
-
- function findFrameLoaderSnapshotAt(rendererHelper, frameIdRef, ts) {
- var snapshot;
-
- var objects = rendererHelper.process.objects;
- var frameLoaderInstances = objects.instancesByTypeName_['FrameLoader'];
- if (frameLoaderInstances === undefined) {
- console.warn('Failed to find FrameLoader for frameId "' + frameIdRef +
- '" at ts ' + ts + ', the trace maybe incomplete or from an old' +
- 'Chrome.');
- return undefined;
- }
-
- var snapshot;
- for (var instance of frameLoaderInstances) {
- if (!instance.isAliveAt(ts))
- continue;
- var maybeSnapshot = instance.getSnapshotAt(ts);
- if (frameIdRef !== maybeSnapshot.args['frame']['id_ref'])
- continue;
- snapshot = maybeSnapshot;
- }
-
- return snapshot;
- }
-
- function findAllUserTimingEvents(rendererHelper, title) {
- var targetEvents = [];
-
- for (var ev of rendererHelper.process.getDescendantEvents()) {
- if (!hasCategoryAndName(ev, 'blink.user_timing', title))
- continue;
- targetEvents.push(ev);
- }
-
- return targetEvents;
- }
-
- function findFirstMeaningfulPaintCandidates(rendererHelper) {
- var isTelemetryInternalEvent =
- prepareTelemetryInternalEventPredicate(rendererHelper);
- var candidatesForFrameId = {};
- for (var ev of rendererHelper.process.getDescendantEvents()) {
- if (!hasCategoryAndName(ev, 'loading', 'firstMeaningfulPaintCandidate'))
- continue;
- if (isTelemetryInternalEvent(ev))
- continue;
- var frameIdRef = ev.args['frame'];
- if (frameIdRef === undefined)
- continue;
- var list = candidatesForFrameId[frameIdRef];
- if (list === undefined)
- candidatesForFrameId[frameIdRef] = list = [];
- list.push(ev);
- }
- return candidatesForFrameId;
- }
-
- function prepareTelemetryInternalEventPredicate(rendererHelper) {
- var ignoreRegions = [];
-
- var internalRegionStart;
- for (var slice of
- rendererHelper.mainThread.asyncSliceGroup.getDescendantEvents()) {
- if (!!slice.title.match(/^telemetry\.internal\.[^.]*\.start$/))
- internalRegionStart = slice.start;
- if (!!slice.title.match(/^telemetry\.internal\.[^.]*\.end$/)) {
- var timedEvent = new tr.model.TimedEvent(internalRegionStart);
- timedEvent.duration = slice.end - internalRegionStart;
- ignoreRegions.push(timedEvent);
- }
- }
-
- return function isTelemetryInternalEvent(slice) {
- for (var region of ignoreRegions)
- if (region.bounds(slice))
- return true;
- return false;
- }
- }
-
- var URL_BLACKLIST = [
- 'about:blank',
- // Chrome on Android creates main frames with the below URL for plugins.
- 'data:text/html,pluginplaceholderdata'
- ];
- function shouldIgnoreURL(url) {
- return URL_BLACKLIST.indexOf(url) >= 0;
- }
-
- var METRICS = [
- {
- valueName: 'timeToFirstContentfulPaint',
- title: 'firstContentfulPaint',
- description: 'time to first contentful paint'
- },
- {
- valueName: 'timeToOnload',
- title: 'loadEventStart',
- description: 'time to onload. ' +
- 'This is temporary metric used for PCv1/v2 sanity checking'
- }];
-
- function timeToFirstContentfulPaintMetric(values, model) {
- var chromeHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- var rendererHelper = findTargetRendererHelper(chromeHelper);
- var isTelemetryInternalEvent =
- prepareTelemetryInternalEventPredicate(rendererHelper);
- var navigationStartFinder = new NavigationStartFinder(rendererHelper);
-
- for (var metric of METRICS) {
- var histogram = createHistogram(metric.valueName);
- histogram.description = metric.description;
- var targetEvents = findAllUserTimingEvents(rendererHelper, metric.title);
- for (var ev of targetEvents) {
- if (isTelemetryInternalEvent(ev))
- continue;
- var frameIdRef = ev.args['frame'];
- var snapshot =
- findFrameLoaderSnapshotAt(rendererHelper, frameIdRef, ev.start);
- if (snapshot === undefined || !snapshot.args.isLoadingMainFrame)
- continue;
- var url = snapshot.args.documentLoaderURL;
- if (shouldIgnoreURL(url))
- continue;
- var navigationStartEvent = navigationStartFinder.
- findNavigationStartEventForFrameBeforeTimestamp(frameIdRef, ev.start);
- // Ignore layout w/o preceding navigationStart, as they are not
- // attributed to any time-to-X metric.
- if (navigationStartEvent === undefined)
- continue;
-
- var timeToEvent = ev.start - navigationStartEvent.start;
- histogram.addSample(timeToEvent, {url: new tr.v.d.Generic(url)});
- }
- values.addHistogram(histogram);
- }
- }
-
- function addTimeToInteractiveSampleToHistogram(histogram, rendererHelper,
- navigationStart, firstMeaningfulPaint, url) {
- if (shouldIgnoreURL(url))
- return;
- var navigationStartTime = navigationStart.start;
- var firstInteractive = Infinity;
- var firstInteractiveCandidate = firstMeaningfulPaint;
- var lastLongTaskEvent = undefined;
- // Find the first interactive point X after firstMeaningfulPaint so that
- // range [X, X + INTERACTIVE_WINDOW_SIZE_MS] contains no
- // 'TaskQueueManager::ProcessTaskFromWorkQueues' slice which takes more than
- // RESPONSIVENESS_THRESHOLD_MS.
- // For more details on why TaskQueueManager::ProcessTaskFromWorkQueue is
- // chosen as a proxy for all un-interruptable task on renderer thread, see
- // https://github.com/GoogleChrome/lighthouse/issues/489
- // TODO(nedn): replace this with just "var ev of rendererHelper..." once
- // canary binary is updated.
- // (https://github.com/catapult-project/catapult/issues/2586)
- for (var ev of [...rendererHelper.mainThread.sliceGroup.childEvents()]) {
- if (ev.start < firstInteractiveCandidate)
- continue;
- var interactiveDurationSoFar = ev.start - firstInteractiveCandidate;
- if (interactiveDurationSoFar >= INTERACTIVE_WINDOW_SIZE_MS) {
- firstInteractive = firstInteractiveCandidate;
- break;
- }
- if (ev.title === 'TaskQueueManager::ProcessTaskFromWorkQueue' &&
- ev.duration > RESPONSIVENESS_THRESHOLD_MS) {
- firstInteractiveCandidate = ev.end - 50;
- lastLongTaskEvent = ev;
- }
- }
- var breakdownDiagnostic = createBreakdownDiagnostic(
- rendererHelper, navigationStartTime, firstInteractive);
-
- var timeToFirstInteractive = firstInteractive - navigationStartTime;
- histogram.addSample(
- timeToFirstInteractive,
- {
- "Start": new RelatedEventSet(navigationStart),
- "Last long task": new RelatedEventSet(lastLongTaskEvent),
- "Navigation infos": new tr.v.d.Generic(
- {url: url, pid: rendererHelper.pid,
- start: navigationStartTime, interactive: firstInteractive}),
- "Breakdown of [navStart, Interactive]": breakdownDiagnostic,
- });
- }
-
- /**
- * Computes Time to first meaningful paint (TTFMP) & time to interactive (TTI)
- * from |model| and add it to |value|.
- *
- * First meaningful paint is the paint following the layout with the highest
- * "Layout Significance". The Layout Significance is computed inside Blink,
- * by FirstMeaningfulPaintDetector class. It logs
- * "firstMeaningfulPaintCandidate" event every time the Layout Significance
- * marks a record. TTFMP is the time between NavigationStart and the last
- * firstMeaningfulPaintCandidate event.
- *
- * Design doc: https://goo.gl/vpaxv6
- *
- * TTI is computed as the starting time of the timed window with size
- * INTERACTIVE_WINDOW_SIZE_MS that happens after FMP in which there is no
- * uninterruptable task on the main thread with size more than
- * RESPONSIVENESS_THRESHOLD_MS.
- *
- * Design doc: https://goo.gl/ISWndc
- */
- function timeToFirstMeaningfulPaintAndTimeToInteractiveMetrics(
- values, model) {
- var chromeHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- var rendererHelper = findTargetRendererHelper(chromeHelper);
- var navigationStartFinder = new NavigationStartFinder(rendererHelper);
- var firstMeaningfulPaintHistogram = createHistogram(
- 'timeToFirstMeaningfulPaint');
- firstMeaningfulPaintHistogram.description =
- 'time to first meaningful paint';
- var firstInteractiveHistogram = createHistogram('timeToFirstInteractive');
- firstInteractiveHistogram.description = 'time to first interactive';
-
- function addFirstMeaningfulPaintSampleToHistogram(
- frameIdRef, navigationStart, fmpMarkerEvent) {
- var snapshot = findFrameLoaderSnapshotAt(
- rendererHelper, frameIdRef, fmpMarkerEvent.start);
- if (snapshot === undefined || !snapshot.args.isLoadingMainFrame)
- return;
- var url = snapshot.args.documentLoaderURL;
- if (shouldIgnoreURL(url))
- return;
-
- var timeToFirstMeaningfulPaint =
- fmpMarkerEvent.start - navigationStart.start;
- var extraDiagnostic = {
- url: url,
- pid: rendererHelper.pid
- };
- var breakdownDiagnostic = createBreakdownDiagnostic(
- rendererHelper, navigationStart.start, fmpMarkerEvent.start);
- firstMeaningfulPaintHistogram.addSample(timeToFirstMeaningfulPaint,
- {
- "Breakdown of [navStart, FMP]": breakdownDiagnostic,
- "Start": new RelatedEventSet(navigationStart),
- "End": new RelatedEventSet(fmpMarkerEvent),
- "Navigation infos": new tr.v.d.Generic(
- {url: url, pid: rendererHelper.pid,
- start: navigationStart.start, fmp: fmpMarkerEvent.start}),
- });
- return {firstMeaningfulPaint: fmpMarkerEvent.start, url: url};
- }
-
- var candidatesForFrameId =
- findFirstMeaningfulPaintCandidates(rendererHelper);
-
- for (var frameIdRef in candidatesForFrameId) {
- var navigationStart;
- var lastCandidate;
-
- // Iterate over the FMP candidates, remembering the last one.
- for (var ev of candidatesForFrameId[frameIdRef]) {
- var navigationStartForThisCandidate = navigationStartFinder.
- findNavigationStartEventForFrameBeforeTimestamp(frameIdRef, ev.start);
- // Ignore candidate w/o preceding navigationStart, as they are not
- // attributed to any TTFMP.
- if (navigationStartForThisCandidate === undefined)
- continue;
-
- if (navigationStart !== navigationStartForThisCandidate) {
- // New navigation is found. Compute TTFMP for current navigation, and
- // reset the state variables.
- if (navigationStart !== undefined && lastCandidate !== undefined) {
- data = addFirstMeaningfulPaintSampleToHistogram(
- frameIdRef, navigationStart, lastCandidate);
- if (data !== undefined)
- addTimeToInteractiveSampleToHistogram(
- firstInteractiveHistogram, rendererHelper,
- navigationStart,
- data.firstMeaningfulPaint, data.url);
- }
- navigationStart = navigationStartForThisCandidate;
- }
- lastCandidate = ev;
- }
-
- // Emit TTFMP for the last navigation.
- if (lastCandidate !== undefined) {
- var data = addFirstMeaningfulPaintSampleToHistogram(
- frameIdRef, navigationStart, lastCandidate);
-
- if (data !== undefined)
- addTimeToInteractiveSampleToHistogram(
- firstInteractiveHistogram, rendererHelper, navigationStart,
- data.firstMeaningfulPaint, data.url);
- }
- }
-
- values.addHistogram(firstMeaningfulPaintHistogram);
- values.addHistogram(firstInteractiveHistogram);
- }
-
- function loadingMetric(values, model) {
- timeToFirstContentfulPaintMetric(values, model);
- timeToFirstMeaningfulPaintAndTimeToInteractiveMetrics(values, model);
- }
-
- tr.metrics.MetricRegistry.register(loadingMetric);
-
- return {
- loadingMetric: loadingMetric,
- RESPONSIVENESS_THRESHOLD_MS: RESPONSIVENESS_THRESHOLD_MS,
- INTERACTIVE_WINDOW_SIZE_MS: INTERACTIVE_WINDOW_SIZE_MS
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric_test.html
deleted file mode 100644
index 7e22de36550..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/loading_metric_test.html
+++ /dev/null
@@ -1,338 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/system_health/loading_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('timeToFirstContentfulPaint', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing,rail',
- title: 'firstContentfulPaint',
- start: 1000,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.loadingMetric(values, model);
- var numeric = tr.b.getOnlyElement(values.getValuesNamed(
- 'timeToFirstContentfulPaint'));
- assert.equal(1, numeric.running.count);
- assert.equal(800, numeric.running.mean);
- });
-
- test('timeToFirstContentfulPaintIgnoringWarmCache', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
-
- // warm cache navigation
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- mainThread.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx({
- cat: 'blink.console',
- title: 'telemetry.internal.warmCache.start',
- start: 250,
- duration: 0.0
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing,rail',
- title: 'firstContentfulPaint',
- start: 1000,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- mainThread.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSliceEx({
- cat: 'blink.console',
- title: 'telemetry.internal.warmCache.end',
- start: 1250,
- duration: 0.0
- }));
-
- // measurement navigation
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 2000,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 2100,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing,rail',
- title: 'firstContentfulPaint',
- start: 2400,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.loadingMetric(values, model);
- var numeric = tr.b.getOnlyElement(values.getValuesNamed(
- 'timeToFirstContentfulPaint'));
- assert.equal(1, numeric.running.count);
- assert.equal(400, numeric.running.mean);
- });
-
- test('timeToFirstMeaningfulPaint', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 600,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 1000,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.loadingMetric(values, model);
- var numeric = tr.b.getOnlyElement(values.getValuesNamed(
- 'timeToFirstMeaningfulPaint'));
- assert.equal(1, numeric.running.count);
- assert.equal(800, numeric.running.mean);
- });
-
- test('timeToInteractive', function() {
- // Our renderer thread would looks like
- //
- // * * [ main thread busy ] *
- // | | |
- // | | |
- // v v v
- // First navigation FMP TTI
- // 200 9200 15400
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1984);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 9180,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 9200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 9350,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 11150,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 12550,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 14950,
- duration: 500,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 22150,
- duration: 10,
- }));
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.loadingMetric(values, model);
- var numeric = tr.b.getOnlyElement(values.getValuesNamed(
- 'timeToFirstInteractive'));
- assert.equal(1, numeric.running.count);
- assert.equal(15200, numeric.running.mean);
- var binsWithSampleDiagnosticMaps = numeric.allBins.filter(
- bin => bin.diagnosticMaps.length > 0);
- var diagnostic = binsWithSampleDiagnosticMaps[0].diagnosticMaps[0].get(
- 'Navigation infos');
- assert.equal(diagnostic.value.start, 200);
- assert.equal(diagnostic.value.interactive, 15400);
- assert.equal(diagnostic.value.pid, 1984);
- });
-
- test('multiTimeToInteractive', function() {
- // Our renderer thread would looks like
- //
- // * * [ main thread busy ] * * *
- // | | | | |
- // | | | | |
- // v v v v v
- // 1st navigation 1st FMP 2nd nav 1st TTI 2nd FMP & TTI
- // 200 9200 12000 14500 16000
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1984);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 9180,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 9200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 9350,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 11150,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 12000,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 12550,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 14950,
- duration: 500,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 16000,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 29150,
- duration: 10,
- }));
- });
- var values = new tr.v.ValueSet();
- tr.metrics.sh.loadingMetric(values, model);
- var numeric = tr.b.getOnlyElement(values.getValuesNamed(
- 'timeToFirstInteractive'));
- assert.equal(2, numeric.running.count);
- assert.equal(4000, numeric.running.min);
- assert.equal(15200, numeric.running.max);
-});
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric.html
deleted file mode 100644
index afbf6f12959..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric.html
+++ /dev/null
@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- var LONG_TASK_MS = 50;
-
- // Anything longer than this should be so rare that its length beyond this is
- // uninteresting.
- var LONGEST_TASK_MS = 1000;
-
- /**
- * This helper function calls |cb| for each of the top-level tasks on the
- * given thread in the given range whose duration is longer than LONG_TASK_MS.
- *
- * @param {tr.model.Thread} thread
- * @param {tr.b.Range=} opt_range
- * @param {function()} cb
- * @param {Object=} opt_this
- */
- function iterateLongTopLevelTasksOnThreadInRange(
- thread, opt_range, cb, opt_this) {
- thread.sliceGroup.topLevelSlices.forEach(function(slice) {
- if (opt_range &&
- !opt_range.intersectsExplicitRangeInclusive(slice.start, slice.end))
- return;
-
- if (slice.duration < LONG_TASK_MS)
- return;
-
- cb.call(opt_this, slice);
- });
- }
-
- /**
- * This helper function calls |cb| for each of the main renderer threads in
- * the model.
- *
- * @param {tr.model.Model} model The model.
- * @param {function()} cb Callback.
- * @param {Object=} opt_this Context object.
- */
- function iterateRendererMainThreads(model, cb, opt_this) {
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- tr.b.dictionaryValues(modelHelper.rendererHelpers).forEach(
- function(rendererHelper) {
- if (!rendererHelper.mainThread)
- return;
- cb.call(opt_this, rendererHelper.mainThread);
- });
- }
-
- /**
- * This metric directly measures long tasks on renderer main threads.
- * This metric requires only the 'toplevel' tracing category.
- *
- * @param {!tr.v.ValueSet} values
- * @param {!tr.model.Model} model
- * @param {!Object=} opt_options
- */
- function longTasksMetric(values, model, opt_options) {
- var rangeOfInterest = opt_options ? opt_options.rangeOfInterest : undefined;
- var longTaskHist = new tr.v.Histogram('long tasks',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createLinear(
- LONG_TASK_MS, LONGEST_TASK_MS, 40));
- longTaskHist.description = 'durations of long tasks';
- var slices = new tr.model.EventSet();
- iterateRendererMainThreads(model, function(thread) {
- iterateLongTopLevelTasksOnThreadInRange(
- thread, rangeOfInterest, function(task) {
- longTaskHist.addSample(task.duration,
- {relatedEvents: new tr.v.d.RelatedEventSet([task])});
- slices.push(task);
- slices.addEventSet(task.descendentSlices);
- });
- });
- values.addHistogram(longTaskHist);
-
- var sampleForEvent = undefined;
- var breakdown = tr.v.d.RelatedHistogramBreakdown.buildFromEvents(
- values, 'long tasks ', slices,
- e => (model.getUserFriendlyCategoryFromEvent(e) || 'unknown'),
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, sampleForEvent,
- tr.v.HistogramBinBoundaries.createExponential(1, LONGEST_TASK_MS, 40));
- breakdown.colorScheme =
- tr.v.d.COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER;
- longTaskHist.diagnostics.set('category', breakdown);
- }
-
- tr.metrics.MetricRegistry.register(longTasksMetric, {
- supportsRangeOfInterest: true
- });
-
- return {
- longTasksMetric: longTasksMetric,
- iterateLongTopLevelTasksOnThreadInRange:
- iterateLongTopLevelTasksOnThreadInRange,
- iterateRendererMainThreads: iterateRendererMainThreads,
- LONG_TASK_MS: LONG_TASK_MS,
- LONGEST_TASK_MS: LONGEST_TASK_MS
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric_test.html
deleted file mode 100644
index 60872ad5c6f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/long_tasks_metric_test.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/metrics/system_health/long_tasks_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('longTasksMetric', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var proc = model.getOrCreateProcess(1);
- var thread = proc.getOrCreateThread(2);
- thread.name = 'CrRendererMain';
- var longTask = tr.c.TestUtils.newSliceEx({
- title: 'foo',
- start: 0,
- duration: 50,
- });
- thread.sliceGroup.pushSlice(longTask);
-
- thread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- title: 'UpdateLayerTree',
- start: 0,
- duration: 1,
- cpuStart: 0,
- cpuDuration: 1,
- }));
-
- thread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- title: 'minorGC',
- start: 1,
- duration: 1,
- cpuStart: 1,
- cpuDuration: 1,
- }));
-
- thread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- title: 'Decode Image',
- start: 2,
- duration: 1,
- cpuStart: 2,
- cpuDuration: 1,
- }));
-
- thread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- title: 'Layout',
- start: 3,
- duration: 1,
- cpuStart: 3,
- cpuDuration: 1,
- }));
-
- model.addUserFriendlyCategoryDriver(
- tr.e.chrome.ChromeUserFriendlyCategoryDriver);
- });
- var valueSet = new tr.v.ValueSet();
- tr.metrics.sh.longTasksMetric(valueSet, model);
- var longTaskHist = tr.b.getOnlyElement(
- valueSet.getValuesNamed('long tasks'));
- assert.strictEqual(1, longTaskHist.numValues);
- assert.strictEqual(1, longTaskHist.centralBins[0].count);
- assert.lengthOf(longTaskHist.centralBins[0].diagnosticMaps, 1);
- var events =
- longTaskHist.centralBins[0].diagnosticMaps[0].get('relatedEvents');
- assert.instanceOf(events, tr.v.d.RelatedEventSet);
- assert.strictEqual(tr.b.getOnlyElement(events).title,
- 'foo');
- var breakdown = longTaskHist.diagnostics.get('category');
- assert.instanceOf(breakdown, tr.v.d.RelatedHistogramBreakdown);
- assert.lengthOf(breakdown, 4);
-
- var hist = breakdown.get('layout');
- assert.instanceOf(hist, tr.v.Histogram);
- assert.strictEqual(tr.b.getOnlyElement(valueSet.getValuesNamed(hist.name)),
- hist);
- assert.strictEqual(0, hist.name.indexOf(longTaskHist.name));
- assert.strictEqual(1, hist.numValues);
- assert.strictEqual(1, hist.centralBins[0].count);
-
- hist = breakdown.get('gc');
- assert.instanceOf(hist, tr.v.Histogram);
- assert.strictEqual(tr.b.getOnlyElement(valueSet.getValuesNamed(hist.name)),
- hist);
- assert.strictEqual(0, hist.name.indexOf(longTaskHist.name));
- assert.strictEqual(1, hist.numValues);
- assert.strictEqual(1, hist.centralBins[0].count);
-
- hist = breakdown.get('composite');
- assert.instanceOf(hist, tr.v.Histogram);
- assert.strictEqual(tr.b.getOnlyElement(valueSet.getValuesNamed(hist.name)),
- hist);
- assert.strictEqual(0, hist.name.indexOf(longTaskHist.name));
- assert.strictEqual(1, hist.numValues);
- assert.strictEqual(1, hist.centralBins[0].count);
-
- hist = breakdown.get('imageDecode');
- assert.instanceOf(hist, tr.v.Histogram);
- assert.strictEqual(tr.b.getOnlyElement(valueSet.getValuesNamed(hist.name)),
- hist);
- assert.strictEqual(0, hist.name.indexOf(longTaskHist.name));
- assert.strictEqual(1, hist.numValues);
- assert.strictEqual(1, hist.centralBins[0].count);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric.html
deleted file mode 100644
index 42dcc01c452..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric.html
+++ /dev/null
@@ -1,1120 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/multi_dimensional_view.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- var BACKGROUND = tr.model.ContainerMemoryDump.LevelOfDetail.BACKGROUND;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var count_smallerIsBetter = tr.b.Unit.byName.count_smallerIsBetter;
- var DISPLAYED_SIZE_NUMERIC_NAME =
- tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME;
-
- var LEVEL_OF_DETAIL_NAMES = new Map();
- LEVEL_OF_DETAIL_NAMES.set(BACKGROUND, 'background');
- LEVEL_OF_DETAIL_NAMES.set(LIGHT, 'light');
- LEVEL_OF_DETAIL_NAMES.set(DETAILED, 'detailed');
-
- var BOUNDARIES_FOR_UNIT_MAP = new WeakMap();
- // For unitless numerics (process counts), we use 20 linearly scaled bins
- // from 0 to 20.
- BOUNDARIES_FOR_UNIT_MAP.set(count_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createLinear(0, 20, 20));
- // For size numerics (subsystem and vm stats), we use 1 bin from 0 B to
- // 1 KiB and 4*24 exponentially scaled bins from 1 KiB to 16 GiB (=2^24 KiB).
- BOUNDARIES_FOR_UNIT_MAP.set(sizeInBytes_smallerIsBetter,
- new tr.v.HistogramBinBoundaries(0)
- .addBinBoundary(1024 /* 1 KiB */)
- .addExponentialBins(16 * 1024 * 1024 * 1024 /* 16 GiB */, 4 * 24));
-
- function memoryMetric(values, model, opt_options) {
- var rangeOfInterest = opt_options ? opt_options.rangeOfInterest : undefined;
- var browserNameToGlobalDumps =
- splitGlobalDumpsByBrowserName(model, rangeOfInterest);
- addGeneralMemoryDumpValues(browserNameToGlobalDumps, values);
- addDetailedMemoryDumpValues(browserNameToGlobalDumps, values);
- addMemoryDumpCountValues(browserNameToGlobalDumps, values);
- }
-
- /**
- * Splits the global memory dumps in |model| by browser name.
- *
- * @param {!tr.Model} model The trace model from which the global dumps
- * should be extracted.
- * @param {!tr.b.Range=} opt_rangeOfInterest If proided, global memory dumps
- * that do not inclusively intersect the range will be skipped.
- * @return {!Map<string, !Array<!tr.model.GlobalMemoryDump>} A map from
- * browser names to the associated global memory dumps.
- */
- function splitGlobalDumpsByBrowserName(model, opt_rangeOfInterest) {
- var chromeModelHelper =
- model.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);
- var browserNameToGlobalDumps = new Map();
- var globalDumpToBrowserHelper = new WeakMap();
-
- // 1. For each browser process in the model, add its global memory dumps to
- // |browserNameToGlobalDumps|. |chromeModelHelper| can be undefined if
- // it fails to find any browser, renderer or GPU process (see
- // tr.model.helpers.ChromeModelHelper.supportsModel).
- if (chromeModelHelper) {
- chromeModelHelper.browserHelpers.forEach(function(helper) {
- // Retrieve the associated global memory dumps and check that they
- // haven't been classified as belonging to another browser process.
- var globalDumps = skipDumpsThatDoNotIntersectRange(
- helper.process.memoryDumps.map(d => d.globalMemoryDump),
- opt_rangeOfInterest);
- globalDumps.forEach(function(globalDump) {
- var existingHelper = globalDumpToBrowserHelper.get(globalDump);
- if (existingHelper !== undefined) {
- throw new Error('Memory dump ID clash across multiple browsers ' +
- 'with PIDs: ' + existingHelper.pid + ' and ' + helper.pid);
- }
- globalDumpToBrowserHelper.set(globalDump, helper);
- });
-
- makeKeyUniqueAndSet(browserNameToGlobalDumps,
- canonicalizeName(helper.browserName), globalDumps);
- });
- }
-
- // 2. If any global memory dump does not have any associated browser
- // process for some reason, associate it with an 'unknown_browser' browser
- // so that we don't lose the data.
- var unclassifiedGlobalDumps = skipDumpsThatDoNotIntersectRange(
- model.globalMemoryDumps.filter(g => !globalDumpToBrowserHelper.has(g)),
- opt_rangeOfInterest);
- if (unclassifiedGlobalDumps.length > 0) {
- makeKeyUniqueAndSet(
- browserNameToGlobalDumps, 'unknown_browser', unclassifiedGlobalDumps);
- }
-
- return browserNameToGlobalDumps;
- }
-
- function skipDumpsThatDoNotIntersectRange(dumps, opt_range) {
- if (!opt_range)
- return dumps;
- return dumps.filter(d => opt_range.intersectsExplicitRangeInclusive(
- d.start, d.end));
- }
-
- function canonicalizeName(name) {
- return name.toLowerCase().replace(' ', '_');
- }
-
- var USER_FRIENDLY_BROWSER_NAMES = {
- 'chrome': 'Chrome',
- 'webview': 'WebView',
- 'unknown_browser': 'an unknown browser'
- };
-
- /**
- * Convert a canonical browser name used in value names to a user-friendly
- * name used in value descriptions.
- *
- * Examples:
- *
- * CANONICAL BROWSER NAME -> USER-FRIENDLY NAME
- * chrome -> Chrome
- * unknown_browser -> an unknown browser
- * webview2 -> WebView(2)
- * unexpected -> 'unexpected' browser
- */
- function convertBrowserNameToUserFriendlyName(browserName) {
- for (var baseName in USER_FRIENDLY_BROWSER_NAMES) {
- if (!browserName.startsWith(baseName))
- continue;
- var userFriendlyBaseName = USER_FRIENDLY_BROWSER_NAMES[baseName];
- var suffix = browserName.substring(baseName.length);
- if (suffix.length === 0)
- return userFriendlyBaseName;
- else if (/^\d+$/.test(suffix))
- return userFriendlyBaseName + '(' + suffix + ')';
- }
- return '\'' + browserName + '\' browser';
- }
-
- function canonicalizeProcessName(rawProcessName) {
- if (!rawProcessName)
- return 'unknown_processes';
- var baseCanonicalName = canonicalizeName(rawProcessName);
- switch (baseCanonicalName) {
- case 'renderer':
- return 'renderer_processes'; // Intentionally plural.
- case 'browser':
- return 'browser_process';
- default:
- return baseCanonicalName;
- }
- }
-
- /**
- * Convert a canonical process name used in value names to a user-friendly
- * name used in value descriptions.
- */
- function convertProcessNameToUserFriendlyName(processName,
- opt_requirePlural) {
- switch (processName) {
- case 'browser_process':
- return opt_requirePlural ? 'browser processes' : 'the browser process';
- case 'renderer_processes':
- return 'renderer processes';
- case 'gpu_process':
- return opt_requirePlural ? 'GPU processes' : 'the GPU process';
- case 'ppapi_process':
- return opt_requirePlural ? 'PPAPI processes' : 'the PPAPI process';
- case 'all_processes':
- return 'all processes';
- case 'unknown_processes':
- return 'unknown processes';
- default:
- return '\'' + processName + '\' processes';
- }
- }
-
- /**
- * Function for adding entries with duplicate keys to a map without
- * overriding existing entries.
- *
- * This is achieved by appending numeric indices (2, 3, 4, ...) to duplicate
- * keys. Example:
- *
- * var map = new Map();
- * // map = Map {}.
- *
- * makeKeyUniqueAndSet(map, 'key', 'a');
- * // map = Map {"key" => "a"}.
- *
- * makeKeyUniqueAndSet(map, 'key', 'b');
- * // map = Map {"key" => "a", "key2" => "b"}.
- * ^^^^
- * makeKeyUniqueAndSet(map, 'key', 'c');
- * // map = Map {"key" => "a", "key2" => "b", "key3" => "c"}.
- * ^^^^ ^^^^
- */
- function makeKeyUniqueAndSet(map, key, value) {
- var uniqueKey = key;
- var nextIndex = 2;
- while (map.has(uniqueKey)) {
- uniqueKey = key + nextIndex;
- nextIndex++;
- }
- map.set(uniqueKey, value);
- }
-
- /**
- * Add general memory dump values calculated from all global memory dumps to
- * |values|. In particular, this function adds the following values:
- *
- * * PROCESS COUNTS
- * memory:{chrome, webview}:
- * {browser_process, renderer_processes, ..., all_processes}:
- * process_count
- * type: tr.v.Histogram (over all matching global memory dumps)
- * unit: count_smallerIsBetter
- *
- * * MEMORY USAGE REPORTED BY CHROME
- * memory:{chrome, webview}:
- * {browser_process, renderer_processes, ..., all_processes}:
- * reported_by_chrome[:{v8, malloc, ...}]:
- * {effective_size, allocated_objects_size, locked_size}
- * type: tr.v.Histogram (over all matching global memory dumps)
- * unit: sizeInBytes_smallerIsBetter
- */
- function addGeneralMemoryDumpValues(browserNameToGlobalDumps, values) {
- addMemoryDumpValues(browserNameToGlobalDumps,
- gmd => true /* process all global memory dumps */,
- function(processDump, addProcessScalar) {
- // Increment memory:<browser-name>:<process-name>:process_count value.
- addProcessScalar({
- source: 'process_count',
- property: PROCESS_COUNT,
- value: 1
- });
-
- if (processDump.totals !== undefined) {
- tr.b.iterItems({
- 'residentBytes': RESIDENT_SIZE,
- 'peakResidentBytes': PEAK_RESIDENT_SIZE
- }, function(totalName, property) {
- addProcessScalar({
- source: 'reported_by_os',
- property: property,
- component: ['system_memory'],
- value: processDump.totals[totalName]
- });
- });
- }
-
- // Add memory:<browser-name>:<process-name>:reported_by_chrome:...
- // values.
- if (processDump.memoryAllocatorDumps === undefined)
- return;
- processDump.memoryAllocatorDumps.forEach(function(rootAllocatorDump) {
- CHROME_VALUE_PROPERTIES.forEach(function(property) {
- addProcessScalar({
- source: 'reported_by_chrome',
- component: [rootAllocatorDump.name],
- property: property,
- value: rootAllocatorDump.numerics[property.name]
- });
- });
- // Some dump providers add allocated objects size as
- // "allocated_objects" child dump.
- if (rootAllocatorDump.numerics['allocated_objects_size'] ===
- undefined) {
- var allocatedObjectsDump =
- rootAllocatorDump.getDescendantDumpByFullName(
- 'allocated_objects');
- if (allocatedObjectsDump !== undefined) {
- addProcessScalar({
- source: 'reported_by_chrome',
- component: [rootAllocatorDump.name],
- property: ALLOCATED_OBJECTS_SIZE,
- value: allocatedObjectsDump.numerics['size']
- });
- }
- }
- });
-
- // Add memory:<browser-name>:<process-name>:reported_by_chrome:v8:
- // {heap, allocated_by_malloc}:...
- addV8MemoryDumpValues(processDump, addProcessScalar);
- },
- function(componentTree) {
- // Subtract memory:<browser-name>:<process-name>:reported_by_chrome:
- // tracing:<size-property> from memory:<browser-name>:<process-name>:
- // reported_by_chrome:<size-property> if applicable.
- var tracingNode = componentTree.children[1].get('tracing');
- if (tracingNode === undefined)
- return;
- for (var i = 0; i < componentTree.values.length; i++)
- componentTree.values[i].total -= tracingNode.values[i].total;
- }, values);
- }
-
- /**
- * Add memory dump values calculated from V8 components excluding
- * 'heap_spaces/other_spaces'.
- *
- * @param {!tr.model.ProcessMemoryDump} processDump The process memory dump.
- * @param {!function} addProcessScalar The callback for adding a scalar value.
- */
- function addV8MemoryDumpValues(processDump, addProcessScalar) {
- var v8Dump = processDump.getMemoryAllocatorDumpByFullName('v8');
- if (v8Dump === undefined)
- return;
- v8Dump.children.forEach(function(isolateDump) {
- // v8:allocated_by_malloc:...
- var mallocDump = isolateDump.getDescendantDumpByFullName('malloc');
- if (mallocDump !== undefined) {
- addV8ComponentValues(mallocDump, ['v8', 'allocated_by_malloc'],
- addProcessScalar);
- }
- // v8:heap:...
- var heapDump = isolateDump.getDescendantDumpByFullName('heap_spaces');
- if (heapDump !== undefined) {
- addV8ComponentValues(heapDump, ['v8', 'heap'], addProcessScalar);
- heapDump.children.forEach(function(spaceDump) {
- if (spaceDump.name === 'other_spaces')
- return;
- addV8ComponentValues(spaceDump, ['v8', 'heap', spaceDump.name],
- addProcessScalar);
- });
- }
- });
-
- // V8 generates bytecode when interpreting and code objects when
- // compiling the javascript. Total code size includes the size
- // of code and bytecode objects.
- addProcessScalar({
- source: 'reported_by_chrome',
- component: ['v8'],
- property: CODE_AND_METADATA_SIZE,
- value: v8Dump.numerics['code_and_metadata_size']
- });
- addProcessScalar({
- source: 'reported_by_chrome',
- component: ['v8'],
- property: CODE_AND_METADATA_SIZE,
- value: v8Dump.numerics['bytecode_and_metadata_size']
- });
- }
-
- /**
- * Add memory dump values calculated from the specified V8 component.
- *
- * @param {!tr.model.MemoryAllocatorDump} v8Dump The V8 memory dump.
- * @param {!Array<string>} componentPath The component path for reporting.
- * @param {!function} addProcessScalar The callback for adding a scalar value.
- */
- function addV8ComponentValues(componentDump, componentPath,
- addProcessScalar) {
- CHROME_VALUE_PROPERTIES.forEach(function(property) {
- addProcessScalar({
- source: 'reported_by_chrome',
- component: componentPath,
- property: property,
- value: componentDump.numerics[property.name]
- });
- });
- }
-
- var PROCESS_COUNT = {
- unit: count_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- if (componentPath.length > 0) {
- throw new Error('Unexpected process count non-empty component path: ' +
- componentPath.join(':'));
- }
- return 'total number of ' + convertProcessNameToUserFriendlyName(
- processName, true /* opt_requirePlural */);
- }
- };
-
- var EFFECTIVE_SIZE = {
- name: 'effective_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildChromeValueDescriptionPrefix(componentPath, processName, {
- userFriendlyPropertyName: 'effective size',
- componentPreposition: 'of'
- });
- }
- };
-
- var ALLOCATED_OBJECTS_SIZE = {
- name: 'allocated_objects_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildChromeValueDescriptionPrefix(componentPath, processName, {
- userFriendlyPropertyName: 'size of all objects allocated',
- totalUserFriendlyPropertyName: 'size of all allocated objects',
- componentPreposition: 'by'
- });
- }
- };
-
- var LOCKED_SIZE = {
- name: 'locked_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildChromeValueDescriptionPrefix(componentPath, processName, {
- userFriendlyPropertyName: 'locked (pinned) size',
- componentPreposition: 'of'
- });
- }
- };
-
- var PEAK_SIZE = {
- name: 'peak_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildChromeValueDescriptionPrefix(componentPath, processName, {
- userFriendlyPropertyName: 'peak size',
- componentPreposition: 'of'
- });
- }
- };
-
- var CODE_AND_METADATA_SIZE = {
- name: 'code_and_metadata_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildChromeValueDescriptionPrefix(componentPath, processName, {
- userFriendlyPropertyNamePrefix: 'size of',
- userFriendlyPropertyName: 'code and metadata'
- });
- }
- };
-
- var CHROME_VALUE_PROPERTIES = [
- EFFECTIVE_SIZE,
- ALLOCATED_OBJECTS_SIZE,
- LOCKED_SIZE,
- PEAK_SIZE
- ];
-
- /**
- * Build a description prefix for a memory:<browser-name>:<process-name>:
- * reported_by_chrome:... value.
- *
- * @param {!Array<string>} componentPath The underlying component path (e.g.
- * ['malloc']).
- * @param {string} processName The canonical name of the process.
- * @param {{
- * userFriendlyPropertyName: string,
- * userFriendlyPropertyNamePrefix: (string|undefined),
- * totalUserFriendlyPropertyName: (string|undefined),
- * componentPreposition: (string|undefined) }}
- * formatSpec Specification of how the property should be formatted.
- * @return {string} Prefix for the value's description (e.g.
- * 'effective size of malloc in the browser process').
- */
- function buildChromeValueDescriptionPrefix(
- componentPath, processName, formatSpec) {
- var nameParts = [];
- if (componentPath.length === 0) {
- nameParts.push('total');
- if (formatSpec.totalUserFriendlyPropertyName) {
- nameParts.push(formatSpec.totalUserFriendlyPropertyName);
- } else {
- if (formatSpec.userFriendlyPropertyNamePrefix)
- nameParts.push(formatSpec.userFriendlyPropertyNamePrefix);
- nameParts.push(formatSpec.userFriendlyPropertyName);
- }
- nameParts.push('reported by Chrome for');
- } else {
- if (formatSpec.componentPreposition === undefined) {
- // Use component name as an adjective
- // (e.g. 'size of V8 code and metadata').
- if (formatSpec.userFriendlyPropertyNamePrefix)
- nameParts.push(formatSpec.userFriendlyPropertyNamePrefix);
- nameParts.push(componentPath.join(':'));
- nameParts.push(formatSpec.userFriendlyPropertyName);
- } else {
- // Use component name as a noun with a preposition
- // (e.g. 'size of all objects allocated BY MALLOC').
- if (formatSpec.userFriendlyPropertyNamePrefix)
- nameParts.push(formatSpec.userFriendlyPropertyNamePrefix);
- nameParts.push(formatSpec.userFriendlyPropertyName);
- nameParts.push(formatSpec.componentPreposition);
- if (componentPath[componentPath.length - 1] === 'allocated_by_malloc') {
- nameParts.push('objects allocated by malloc for');
- nameParts.push(
- componentPath.slice(0, componentPath.length - 1).join(':'));
- } else {
- nameParts.push(componentPath.join(':'));
- }
- }
- nameParts.push('in');
- }
- nameParts.push(convertProcessNameToUserFriendlyName(processName));
- return nameParts.join(' ');
- }
-
- var RESIDENT_SIZE = {
- name: 'resident_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildOsValueDescriptionPrefix(componentPath, processName,
- 'resident set size (RSS)');
- }
- };
-
- var PEAK_RESIDENT_SIZE = {
- name: 'peak_resident_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildOsValueDescriptionPrefix(componentPath, processName,
- 'peak resident set size');
- }
- };
-
- var PROPORTIONAL_RESIDENT_SIZE = {
- name: 'proportional_resident_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildOsValueDescriptionPrefix(componentPath, processName,
- 'proportional resident size (PSS)');
- }
- };
-
- var PRIVATE_DIRTY_SIZE = {
- name: 'private_dirty_size',
- unit: sizeInBytes_smallerIsBetter,
- buildDescriptionPrefix: function(componentPath, processName) {
- return buildOsValueDescriptionPrefix(componentPath, processName,
- 'private dirty size');
- }
- };
-
- /**
- * Build a description prefix for a memory:<browser-name>:<process-name>:
- * reported_by_os:... value.
- *
- * @param {!Array<string>} componentPath The underlying component path (e.g.
- * ['system', 'java_heap']).
- * @param {string} processName The canonical name of the process.
- * @param {string} userFriendlyPropertyName User-friendly name of the
- * underlying property (e.g. 'private dirty size').
- * @return {string} Prefix for the value's description (e.g.
- * 'total private dirty size of the Java heal in the GPU process').
- */
- function buildOsValueDescriptionPrefix(
- componentPath, processName, userFriendlyPropertyName) {
- if (componentPath.length > 2) {
- throw new Error('OS value component path for \'' +
- userFriendlyPropertyName + '\' too long: ' + componentPath.join(':'));
- }
-
- var nameParts = [];
- if (componentPath.length < 2)
- nameParts.push('total');
-
- nameParts.push(userFriendlyPropertyName);
-
- if (componentPath.length > 0) {
- switch (componentPath[0]) {
- case 'system_memory':
- if (componentPath.length > 1) {
- var userFriendlyComponentName =
- SYSTEM_VALUE_COMPONENTS[componentPath[1]].userFriendlyName;
- if (userFriendlyComponentName === undefined) {
- throw new Error('System value sub-component for \'' +
- userFriendlyPropertyName + '\' unknown: ' +
- componentPath.join(':'));
- }
- nameParts.push('of', userFriendlyComponentName, 'in');
- } else {
- nameParts.push('of system memory (RAM) used by');
- }
- break;
-
- case 'gpu_memory':
- if (componentPath.length > 1) {
- nameParts.push('of the', componentPath[1]);
- nameParts.push('Android memtrack component in');
- } else {
- nameParts.push('of GPU memory (Android memtrack) used by');
- }
- break;
-
- default:
- throw new Error('OS value component for \'' +
- userFriendlyPropertyName + '\' unknown: ' +
- componentPath.join(':'));
- }
- } else {
- nameParts.push('reported by the OS for');
- }
-
- nameParts.push(convertProcessNameToUserFriendlyName(processName));
- return nameParts.join(' ');
- }
-
- /**
- * Add heavy memory dump values calculated from heavy global memory dumps to
- * |values|. In particular, this function adds the following values:
- *
- * * MEMORY USAGE REPORTED BY THE OS
- * memory:{chrome, webview}:
- * {browser_process, renderer_processes, ..., all_processes}:
- * reported_by_os:system_memory:[{ashmem, native_heap, java_heap}:]
- * {proportional_resident_size, private_dirty_size}
- * memory:{chrome, webview}:
- * {browser_process, renderer_processes, ..., all_processes}:
- * reported_by_os:gpu_memory:[{gl, graphics, ...}:]
- * proportional_resident_size
- * type: tr.v.Histogram (over matching heavy global memory dumps)
- * unit: sizeInBytes_smallerIsBetter
- *
- * * MEMORY USAGE REPORTED BY CHROME
- * memory:{chrome, webview}:
- * {browser_process, renderer_processes, ..., all_processes}:
- * reported_by_chrome:v8:code_and_metadata_size
- * type: tr.v.Histogram (over matching heavy global memory dumps)
- * unit: sizeInBytes_smallerIsBetter
- */
- function addDetailedMemoryDumpValues(browserNameToGlobalDumps, values) {
- addMemoryDumpValues(browserNameToGlobalDumps,
- g => g.levelOfDetail === DETAILED,
- function(processDump, addProcessScalar) {
- // Add memory:<browser-name>:<process-name>:reported_by_os:
- // system_memory:... values.
- tr.b.iterItems(
- SYSTEM_VALUE_COMPONENTS,
- function(componentName, componentSpec) {
- tr.b.iterItems({
- 'proportionalResident': PROPORTIONAL_RESIDENT_SIZE,
- 'privateDirtyResident': PRIVATE_DIRTY_SIZE
- }, function(byteStatName, property) {
- var node = getDescendantVmRegionClassificationNode(
- processDump.vmRegions,
- componentSpec.classificationPath);
- var componentPath = ['system_memory'];
- if (componentName)
- componentPath.push(componentName);
- addProcessScalar({
- source: 'reported_by_os',
- component: componentPath,
- property: property,
- value: node === undefined ?
- 0 : (node.byteStats[byteStatName] || 0)
- });
- });
- });
-
- // Add memory:<browser-name>:<process-name>:reported_by_os:
- // gpu_memory:... values.
- var memtrackDump = processDump.getMemoryAllocatorDumpByFullName(
- 'gpu/android_memtrack');
- if (memtrackDump !== undefined) {
- memtrackDump.children.forEach(function(memtrackChildDump) {
- addProcessScalar({
- source: 'reported_by_os',
- component: ['gpu_memory', memtrackChildDump.name],
- property: PROPORTIONAL_RESIDENT_SIZE,
- value: memtrackChildDump.numerics['memtrack_pss']
- });
- });
- }
- }, function(componentTree) {}, values);
- }
-
- // Specifications of components reported by the system.
- var SYSTEM_VALUE_COMPONENTS = {
- '': {
- classificationPath: [],
- },
- 'java_heap': {
- classificationPath: ['Android', 'Java runtime', 'Spaces'],
- userFriendlyName: 'the Java heap'
- },
- 'ashmem': {
- classificationPath: ['Android', 'Ashmem'],
- userFriendlyName: 'ashmem'
- },
- 'native_heap': {
- classificationPath: ['Native heap'],
- userFriendlyName: 'the native heap'
- }
- };
-
- /**
- * Get the descendant of a VM region classification |node| specified by the
- * given |path| of child node titles. If |node| is undefined or such a
- * descendant does not exist, this function returns undefined.
- */
- function getDescendantVmRegionClassificationNode(node, path) {
- for (var i = 0; i < path.length; i++) {
- if (node === undefined)
- break;
- node = tr.b.findFirstInArray(node.children, c => c.title === path[i]);
- }
- return node;
- }
-
- /**
- * Add global memory dump counts to |values|. In particular, this function
- * adds the following values:
- *
- * * DUMP COUNTS
- * memory:{chrome, webview}:all_processes:dump_count[:{light, detailed}]
- * type: tr.v.Histogram
- * unit: count_smallerIsBetter
- *
- * Note that unlike all other values generated by the memory metric, the
- * global memory dump counts are NOT instances of tr.v.Histogram
- * because it doesn't make sense to aggregate them (they are already counts
- * over all global dumps associated with the relevant browser).
- */
- function addMemoryDumpCountValues(browserNameToGlobalDumps, values) {
- browserNameToGlobalDumps.forEach(function(globalDumps, browserName) {
- var totalDumpCount = 0;
- var levelOfDetailNameToDumpCount = {};
- LEVEL_OF_DETAIL_NAMES.forEach(function(levelOfDetailName) {
- levelOfDetailNameToDumpCount[levelOfDetailName] = 0;
- });
-
- globalDumps.forEach(function(globalDump) {
- totalDumpCount++;
-
- // Increment the level-of-detail-specific dump count (if possible).
- var levelOfDetailName =
- LEVEL_OF_DETAIL_NAMES.get(globalDump.levelOfDetail);
- if (!(levelOfDetailName in levelOfDetailNameToDumpCount))
- return; // Unknown level of detail.
- levelOfDetailNameToDumpCount[levelOfDetailName]++;
- });
-
- // Add memory:<browser-name>:all_processes:dump_count[:<level>] values.
- reportMemoryDumpCountAsValue(browserName, undefined /* total */,
- totalDumpCount, values);
- tr.b.iterItems(levelOfDetailNameToDumpCount,
- function(levelOfDetailName, levelOfDetailDumpCount) {
- reportMemoryDumpCountAsValue(browserName, levelOfDetailName,
- levelOfDetailDumpCount, values);
- });
- });
- }
-
- /**
- * Add a tr.v.Histogram value to |values| reporting that the number of
- * |levelOfDetailName| memory dumps added by |browserName| was
- * |levelOfDetailCount|.
- */
- function reportMemoryDumpCountAsValue(
- browserName, levelOfDetailName, levelOfDetailDumpCount, values) {
- // Construct the name of the memory value.
- var nameParts = ['memory', browserName, 'all_processes', 'dump_count'];
- if (levelOfDetailName !== undefined)
- nameParts.push(levelOfDetailName);
- var name = nameParts.join(':');
-
- // Build the underlying histogram for the memory value.
- var histogram = new tr.v.Histogram(name, count_smallerIsBetter,
- BOUNDARIES_FOR_UNIT_MAP.get(count_smallerIsBetter));
- histogram.addSample(levelOfDetailDumpCount);
-
- // Build the options for the memory value.
- histogram.description = [
- 'total number of',
- levelOfDetailName || 'all',
- 'memory dumps added by',
- convertBrowserNameToUserFriendlyName(browserName),
- 'to the trace'
- ].join(' ');
-
- // Report the memory value.
- values.addHistogram(histogram);
- }
-
- /**
- * Add generic values extracted from process memory dumps and aggregated by
- * process name and component path into |values|.
- *
- * For each browser and set of global dumps in |browserNameToGlobalDumps|,
- * |customProcessDumpValueExtractor| is applied to every process memory dump
- * associated with the global memory dump. The second argument provided to the
- * callback is a function for adding extracted values:
- *
- * function sampleProcessDumpCallback(processDump, addProcessValue) {
- * ...
- * addProcessScalar({
- * source: 'reported_by_chrome',
- * component: ['system', 'native_heap'],
- * property: 'proportional_resident_size',
- * value: pssExtractedFromProcessDump2,
- * descriptionPrefixBuilder: function(componentPath) {
- * return 'PSS of ' + componentPath.join('/') + ' in';
- * }
- * });
- * ...
- * }
- *
- * For each global memory dump, the extracted values are summed by process
- * name (browser_process, renderer_processes, ..., all_processes) and
- * component path (e.g. gpu is a sum of gpu:gl, gpu:graphics, ...). The sums
- * are then aggregated over all global memory dumps associated with the given
- * browser. For example, assuming that |customProcessDumpValueExtractor|
- * extracts 'proportional_resident_size' values for component paths
- * ['X', 'A'], ['X', 'B'] and ['Y'] under the same 'source' from each process
- * memory dump, the following values will be reported (for Chrome):
- *
- * memory:chrome:browser_process:source:X:A:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:A in all 'browser' process dumps in global dump 1,
- * ...
- * sum of X:A in all 'browser' process dumps in global dump N
- * ]
- *
- * memory:chrome:browser_process:source:X:B:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:B in all 'browser' process dumps in global dump 1,
- * ...
- * sum of X:B in all 'browser' process dumps in global dump N
- * ]
- *
- * memory:chrome:browser_process:source:X:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:A+X:B in all 'browser' process dumps in global dump 1,
- * ...
- * sum of X:A+X:B in all 'browser' process dumps in global dump N
- * ]
- *
- * memory:chrome:browser_process:source:Y:proportional_resident_size :
- * Histogram aggregated over [
- * sum of Y in all 'browser' process dumps in global dump 1,
- * ...
- * sum of Y in all 'browser' process dumps in global dump N
- * ]
- *
- * memory:chrome:browser_process:source:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:A+X:B+Y in all 'browser' process dumps in global dump 1,
- * ...
- * sum of X:A+X:B+Y in all 'browser' process dumps in global dump N
- * ]
- *
- * ...
- *
- * memory:chrome:all_processes:source:X:A:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:A in all process dumps in global dump 1,
- * ...
- * sum of X:A in all process dumps in global dump N,
- * ]
- *
- * memory:chrome:all_processes:source:X:B:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:B in all process dumps in global dump 1,
- * ...
- * sum of X:B in all process dumps in global dump N,
- * ]
- *
- * memory:chrome:all_processes:source:X:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:A+X:B in all process dumps in global dump 1,
- * ...
- * sum of X:A+X:B in all process dumps in global dump N,
- * ]
- *
- * memory:chrome:all_processes:source:Y:proportional_resident_size :
- * Histogram aggregated over [
- * sum of Y in all process dumps in global dump 1,
- * ...
- * sum of Y in all process dumps in global dump N
- * ]
- *
- * memory:chrome:all_processes:source:proportional_resident_size :
- * Histogram aggregated over [
- * sum of X:A+X:B+Y in all process dumps in global dump 1,
- * ...
- * sum of X:A+X:B+Y in all process dumps in global dump N
- * ]
- *
- * where global dumps 1 to N are the global dumps associated with the given
- * browser.
- *
- * @param {!Map<string, !Array<!tr.model.GlobalMemoryDump>}
- * browserNameToGlobalDumps Map from browser names to arrays of global
- * memory dumps. The generic values will be extracted from the associated
- * process memory dumps.
- * @param {!function(!tr.model.GlobalMemoryDump): boolean}
- * customGlobalDumpFilter Predicate for filtering global memory dumps.
- * @param {!function(
- * !tr.model.ProcessMemoryDump,
- * !function(!{
- * source: string,
- * componentPath: (!Array<string>|undefined),
- * property: !{name: string, unit: !tr.b.Unit, buildDescriptionPrefix:
- * !function(!Array<string>, string): string},
- * value: (!tr.v.Histogram|number|undefined)
- * }))}
- * customProcessDumpValueExtractor Callback for extracting values from a
- * process memory dump.
- * @param {!function(!tr.b.MultiDimensionalViewNode)}
- * customComponentTreeModifier Callback applied to every component tree
- * wrt each process name.
- * @param {!tr.v.ValueSet} values List of values to which the
- * resulting aggregated values are added.
- */
- function addMemoryDumpValues(browserNameToGlobalDumps, customGlobalDumpFilter,
- customProcessDumpValueExtractor, customComponentTreeModifier,
- values) {
- browserNameToGlobalDumps.forEach(function(globalDumps, browserName) {
- var filteredGlobalDumps = globalDumps.filter(customGlobalDumpFilter);
- var sourceToPropertyToBuilder = extractDataFromGlobalDumps(
- filteredGlobalDumps, customProcessDumpValueExtractor);
- reportDataAsValues(sourceToPropertyToBuilder, browserName,
- customComponentTreeModifier, values);
- });
- }
-
- /**
- * For each global memory dump in |globalDumps|, calculate per-process-name
- * sums of values extracted by |customProcessDumpValueExtractor| from the
- * associated process memory dumps.
- *
- * This function returns the following nested map structure:
- *
- * Source name (Map key, e.g. 'reported_by_os')
- * -> Property (Map key, e.g. PROPORTIONAL_RESIDENT_SIZE)
- * -> processAndComponentTreeBuilder
- *
- * where |processAndComponentTreeBuilder| is a
- * tr.b.MultiDimensionalViewBuilder:
- *
- * Process name (0th dimension key, e.g. 'browser_process') x
- * Component path (1st dimension keys, e.g. ['system', 'native_heap'])
- * -> Sum of value over the processes (number).
- *
- * See addMemoryDumpValues for more details.
- */
- function extractDataFromGlobalDumps(
- globalDumps, customProcessDumpValueExtractor) {
- var sourceToPropertyToBuilder = new Map();
- var dumpCount = globalDumps.length;
- globalDumps.forEach(function(globalDump, dumpIndex) {
- tr.b.iterItems(globalDump.processMemoryDumps, function(_, processDump) {
- extractDataFromProcessDump(
- processDump, sourceToPropertyToBuilder, dumpIndex, dumpCount,
- customProcessDumpValueExtractor);
- });
- });
- return sourceToPropertyToBuilder;
- }
-
- function extractDataFromProcessDump(processDump, sourceToPropertyToBuilder,
- dumpIndex, dumpCount, customProcessDumpValueExtractor) {
- // Process name is typically 'browser', 'renderer', etc.
- var rawProcessName = processDump.process.name;
- var processNamePath = [canonicalizeProcessName(rawProcessName)];
-
- customProcessDumpValueExtractor(
- processDump,
- function addProcessScalar(spec) {
- if (spec.value === undefined)
- return;
-
- var component = spec.component || [];
- function createDetailsForErrorMessage() {
- return ['source=', spec.source, ', property=',
- spec.property.name || '(undefined)', ', component=',
- component.length === 0 ? '(empty)' : component.join(':'),
- ' in ', processDump.process.userFriendlyName].join('');
- }
-
- var value;
- if (spec.value instanceof tr.v.ScalarNumeric) {
- value = spec.value.value;
- if (spec.value.unit !== spec.property.unit) {
- throw new Error('ScalarNumeric unit for ' +
- createDetailsForErrorMessage() + ' (' +
- spec.value.unit.unitName +
- ') doesn\'t match the unit of the property (' +
- spec.property.unit.unitName + ')');
- }
- } else {
- value = spec.value;
- }
-
- var propertyToBuilder = sourceToPropertyToBuilder.get(spec.source);
- if (propertyToBuilder === undefined) {
- propertyToBuilder = new Map();
- sourceToPropertyToBuilder.set(spec.source, propertyToBuilder);
- }
-
- var builder = propertyToBuilder.get(spec.property);
- if (builder === undefined) {
- builder = new tr.b.MultiDimensionalViewBuilder(
- 2 /* dimensions (process name and component path) */,
- dumpCount /* valueCount */),
- propertyToBuilder.set(spec.property, builder);
- }
-
- var values = new Array(dumpCount);
- values[dumpIndex] = value;
-
- builder.addPath(
- [processNamePath, component] /* path */, values,
- tr.b.MultiDimensionalViewBuilder.ValueKind.TOTAL /* valueKind */);
- });
- }
-
- function reportDataAsValues(sourceToPropertyToBuilder, browserName,
- customComponentTreeModifier, values) {
- // For each source name (e.g. 'reported_by_os')...
- sourceToPropertyToBuilder.forEach(function(propertyToBuilder, sourceName) {
- // For each property (e.g. EFFECTIVE_SIZE)...
- propertyToBuilder.forEach(function(builders, property) {
- var tree = builders.buildTopDownTreeView();
-
- // Total over 'all' processes...
- customComponentTreeModifier(tree);
- reportComponentDataAsValues(browserName, sourceName,
- property, 'all_processes', [] /* componentPath */, tree, values);
-
- // For each process name (e.g. 'renderer')...
- tree.children[0].forEach(function(processTree, processName) {
- if (processTree.children[0].size > 0) {
- throw new Error('Multi-dimensional view node for source=' +
- sourceName + ', property=' +
- (propertyName === undefined ? '(undefined)' : propertyName) +
- ', process=' + processName +
- ' has children wrt the process name dimension');
- }
- customComponentTreeModifier(processTree);
- reportComponentDataAsValues(browserName, sourceName,
- property, processName, [] /* componentPath */, processTree,
- values);
- });
- });
- });
- }
-
- /**
- * For the given |browserName| (e.g. 'chrome'), |processName|
- * (e.g. 'gpu_process'), |property| (e.g. EFFECTIVE_SIZE), |componentPath|
- * (e.g. ['v8']), add a tr.v.Histogram with |unit| aggregating the total
- * values of the associated |componentNode| across all timestamps
- * (corresponding to global memory dumps associated with the given browser)
- * to |values|.
- *
- * See addMemoryDumpValues for more details.
- */
- function reportComponentDataAsValues(
- browserName, sourceName, property, processName, componentPath,
- componentNode, values) {
- // Construct the name of the memory value.
- var nameParts = ['memory', browserName, processName, sourceName].concat(
- componentPath);
- if (property.name !== undefined)
- nameParts.push(property.name);
- var name = nameParts.join(':');
-
- // Build the underlying numeric for the memory value.
- var numeric = buildMemoryNumericFromNode(name, componentNode,
- property.unit);
-
- // Build the options for the memory value.
- numeric.description = [
- property.buildDescriptionPrefix(componentPath, processName),
- 'in',
- convertBrowserNameToUserFriendlyName(browserName)
- ].join(' ');
-
- // Report the memory value.
- values.addHistogram(numeric);
-
- // Recursively report memory values for sub-components.
- var depth = componentPath.length;
- componentPath.push(undefined);
- componentNode.children[1].forEach(function(childNode, childName) {
- componentPath[depth] = childName;
- reportComponentDataAsValues(
- browserName, sourceName, property, processName, componentPath,
- childNode, values);
- });
- componentPath.pop();
- }
-
- /**
- * Create a memory tr.v.Histogram with |unit| and add all total values in
- * |node| to it.
- */
- function buildMemoryNumericFromNode(name, node, unit) {
- var histogram = new tr.v.Histogram(
- name, unit, BOUNDARIES_FOR_UNIT_MAP.get(unit));
- node.values.forEach(v => histogram.addSample(v.total));
- return histogram;
- }
-
- tr.metrics.MetricRegistry.register(memoryMetric, {
- supportsRangeOfInterest: true
- });
-
- return {
- memoryMetric: memoryMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric_test.html
deleted file mode 100644
index 64cd9a08394..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/memory_metric_test.html
+++ /dev/null
@@ -1,3261 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/system_health/memory_metric.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var BACKGROUND = tr.model.ContainerMemoryDump.LevelOfDetail.BACKGROUND;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
- var SIZE_DELTA = tr.model.MemoryDumpTestUtils.SIZE_DELTA;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addChildDump = tr.model.MemoryDumpTestUtils.addChildDump;
- var addOwnershipLink = tr.model.MemoryDumpTestUtils.addOwnershipLink;
- var count_smallerIsBetter = tr.b.Unit.byName.count_smallerIsBetter;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
-
- function memoryMetricTest(
- name, modelCallback, opt_options, expectedNumerics) {
- test(name, function() {
- // Create a model and a fake value list.
- var model = tr.c.TestUtils.newModel(modelCallback);
- var valueNameToValues = {};
- var fakeValueList = {
- addHistogram: function(value) {
- var values = valueNameToValues[value.name];
- if (values === undefined)
- valueNameToValues[value.name] = values = [];
- values.push(value);
- }
- };
-
- // Run the memory metric on the model.
- tr.metrics.sh.memoryMetric(fakeValueList, model, opt_options);
-
- // Check that the names of the added values match expectations.
- var actualValueNames = Object.keys(valueNameToValues).sort();
- var expectedValueNames = Object.keys(expectedNumerics).sort();
- assert.deepEqual(actualValueNames, expectedValueNames, {
- // Build the long error message lazily.
- toString: function() {
- var errorMessageParts = [];
- function addValueNamesToError(type, valueNames, otherValueNames) {
- var otherValueNamesSet = new Set(otherValueNames);
- errorMessageParts.push(type, ' value names:');
- if (valueNames.length === 0) {
- errorMessageParts.push('\n(empty)');
- } else {
- valueNames.forEach(function(valueName) {
- errorMessageParts.push('\n');
- if (!otherValueNamesSet.has(valueName))
- errorMessageParts.push('+++');
- errorMessageParts.push(valueName);
- });
- }
- }
- addValueNamesToError('Expected', expectedValueNames,
- actualValueNames);
- errorMessageParts.push('\n');
- addValueNamesToError('Actual', actualValueNames, expectedValueNames);
- return errorMessageParts.join('');
- }
- });
-
- // Check that the numeric values of the added values match expectations.
- tr.b.iterItems(valueNameToValues, function(valueName, actualValues) {
- assert.lengthOf(actualValues, 1,
- 'Multiple \'' + valueName + '\' values');
- var actualHistogram = actualValues[0];
- assert.instanceOf(actualHistogram, tr.v.Histogram);
-
- var expectedHistogram = expectedNumerics[valueName];
- assert.strictEqual(actualHistogram.unit, expectedHistogram.unit,
- 'Invalid \'' + valueName + '\' unit (expected: ' +
- expectedHistogram.unit.unitName, + ', actual: ' +
- actualHistogram.unit.unitName + ')');
-
- if (!(expectedHistogram.value instanceof Array))
- assert.fail('Test sanity check: expected value must be an array');
-
- assert.instanceOf(actualHistogram, tr.v.Histogram,
- 'Invalid \'' + valueName + '\' class');
- assert.strictEqual(actualHistogram.numValues,
- expectedHistogram.value.length,
- 'Invalid \'' + valueName + '\' Histogram numValues');
- assert.closeTo(actualHistogram.sum,
- expectedHistogram.value.reduce((a, b) => a + b, 0), SIZE_DELTA,
- 'Invalid \'' + valueName + '\' Histogram sum');
-
- // Check that the bin counts match.
- var binToCount = new Map();
- expectedHistogram.value.forEach(function(value) {
- var bin = actualHistogram.getBinForValue(value);
- binToCount.set(bin, (binToCount.get(bin) || 0) + 1);
- });
- actualHistogram.allBins.forEach(function(bin) {
- binToCount.set(bin, (binToCount.get(bin) || 0) - bin.count);
- });
- binToCount.forEach(function(count, bin) {
- assert.strictEqual(count, 0, 'Invalid \'' + valueName +
- '\' bin count for range ' + bin.min + '-' + bin.max);
- });
-
- // Check that the description matches expectations.
- assert.strictEqual(
- actualHistogram.description, expectedHistogram.description,
- 'Invalid \'' + valueName + '\' description');
- });
- });
- }
-
- function createProcessWithName(model, name) {
- var uniquePid =
- Math.max.apply(null, Object.keys(model.processes).concat([0])) + 1;
- var process = model.getOrCreateProcess(uniquePid);
- process.name = name;
- return process;
- }
-
- function createChromeBrowserProcess(model) {
- var process = createProcessWithName(model, 'Browser');
- process.getOrCreateThread(1).name = 'CrBrowserMain';
- return process;
- }
-
- function createWebViewProcess(model) {
- var process = createChromeBrowserProcess(model);
- process.getOrCreateThread(2).name = 'Chrome_InProcRendererThread';
- return process;
- }
-
- memoryMetricTest('noDumps_noBrowser', function(model) {
- createProcessWithName(model, 'Non-browser');
- }, undefined /* opt_options */, {
- /* no values */
- });
-
- memoryMetricTest('noDumps_chrome', function(model) {
- createChromeBrowserProcess(model);
- }, undefined /* opt_options */, {
- 'memory:chrome:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:light': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by Chrome ' +
- 'to the trace'
- },
- 'memory:chrome:all_processes:dump_count': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome to the ' +
- 'trace'
- }
- });
-
- memoryMetricTest('noDumps_multipleBrowsers', function(model) {
- createChromeBrowserProcess(model);
- createWebViewProcess(model);
- createProcessWithName(model, 'Non-browser');
- createChromeBrowserProcess(model);
- }, undefined /* opt_options */, {
- 'memory:chrome2:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome(2) ' +
- 'to the trace'
- },
- 'memory:chrome2:all_processes:dump_count:light': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome(2) to ' +
- 'the trace'
- },
- 'memory:chrome2:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by ' +
- 'Chrome(2) to the trace'
- },
- 'memory:chrome2:all_processes:dump_count': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome(2) to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:light': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by Chrome ' +
- 'to the trace'
- },
- 'memory:chrome:all_processes:dump_count': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome to the ' +
- 'trace'
- },
- 'memory:webview:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count:light': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by WebView to ' +
- 'the trace'
- },
- 'memory:webview:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by WebView to the ' +
- 'trace'
- }
- });
-
- memoryMetricTest('dumpCountsOnly_unknownBrowser', function(model) {
- addGlobalMemoryDump(model, {ts: 45, levelOfDetail: DETAILED});
- addGlobalMemoryDump(model, {ts: 65, levelOfDetail: BACKGROUND});
- addGlobalMemoryDump(model, {ts: 68, levelOfDetail: LIGHT});
- addGlobalMemoryDump(model, {ts: 89, levelOfDetail: DETAILED});
- }, undefined /* opt_options */, {
- 'memory:unknown_browser:all_processes:dump_count:detailed': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:background': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count': {
- value: [4],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by an unknown ' +
- 'browser to the trace'
- }
- });
-
- memoryMetricTest('dumpCountsOnly_webview', function(model) {
- var p = createWebViewProcess(model);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 45, levelOfDetail: LIGHT}), p, {ts: 45});
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 68, levelOfDetail: LIGHT}), p, {ts: 68});
- }, undefined /* opt_options */, {
- 'memory:webview:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count:light': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by WebView to ' +
- 'the trace'
- },
- 'memory:webview:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by WebView to the ' +
- 'trace'
- },
- 'memory:webview:all_processes:process_count': {
- value: [1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in WebView'
- },
- 'memory:webview:browser_process:process_count': {
- value: [1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in WebView'
- }
- });
-
- memoryMetricTest('generalValues_chrome', function(model) {
- var pBrowser = createChromeBrowserProcess(model);
- var pRendererA = createProcessWithName(model, 'Renderer');
- var pRendererB = createProcessWithName(model, 'Renderer');
- var pPpapi = createProcessWithName(model, 'PPAPI Process');
- var pUnknown = createProcessWithName(model, undefined);
-
- // Timestamp 1.
- var gmd1 = addGlobalMemoryDump(model, {ts: 20});
- var pmdBrowser1 = addProcessMemoryDump(gmd1, pBrowser, {ts: 19});
- pmdBrowser1.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser1, 'malloc', {numerics: {
- size: 8,
- allocated_objects_size: 4
- }})
- ];
- pmdBrowser1.totals = {
- residentBytes: 200,
- peakResidentBytes: 230
- };
- var pmdRendererA1 = addProcessMemoryDump(gmd1, pRendererA, {ts: 20});
- pmdRendererA1.memoryAllocatorDumps = (function() {
- var mallocDump =
- newAllocatorDump(pmdRendererA1, 'malloc', {numerics: {size: 16}});
- var partitionAllocDump =
- newAllocatorDump(pmdRendererA1, 'partition_alloc');
- var v8Dump = newAllocatorDump(pmdRendererA1, 'v8',
- {numerics: {code_and_metadata_size: 16}});
- addOwnershipLink(
- addChildDump(partitionAllocDump, 'allocated_objects',
- {numerics: {size: 32}}),
- addChildDump(partitionAllocDump, 'partitions',
- {numerics: {size: 24}}));
- return [mallocDump, partitionAllocDump, v8Dump];
- })();
- var pmdGpu1 = addProcessMemoryDump(gmd1, pPpapi, {ts: 21});
- pmdGpu1.memoryAllocatorDumps = [
- newAllocatorDump(pmdGpu1, 'gpu', {numerics: {
- size: 30,
- allocated_objects_size: 25
- }})
- ];
-
- // Timestamp 2.
- var gmd2 = addGlobalMemoryDump(model, {ts: 40});
- var pmdBrowser2 = addProcessMemoryDump(gmd2, pBrowser, {ts: 41});
- pmdBrowser2.memoryAllocatorDumps = (function() {
- var mallocDump = newAllocatorDump(pmdBrowser2, 'malloc',
- {numerics: {size: 120}});
- var tracingDump =
- newAllocatorDump(pmdBrowser2, 'tracing', {numerics: {size: 40}});
- return [mallocDump, tracingDump];
- })();
- var pmdRendererA2 = addProcessMemoryDump(gmd2, pRendererA, {ts: 39});
- pmdRendererA2.memoryAllocatorDumps = (function() {
- var partitionAllocDump =
- newAllocatorDump(pmdRendererA2, 'partition_alloc');
- addOwnershipLink(
- addChildDump(partitionAllocDump, 'allocated_objects',
- {numerics: {size: 320}}),
- addChildDump(partitionAllocDump, 'partitions',
- {numerics: {size: 240}}));
- var v8Dump = newAllocatorDump(pmdRendererA2, 'v8',
- {numerics: {size: 650}});
- var isolateDumpA = addChildDump(v8Dump, 'isolate_A');
- addChildDump(isolateDumpA, 'malloc', {numerics: {
- size: 1,
- peak_size: 2
- }});
- var heapDumpA = addChildDump(isolateDumpA, 'heap_spaces', {numerics: {
- size: 42,
- allocated_objects_size: 36
- }});
- addChildDump(heapDumpA, 'code_space', {numerics: {
- allocated_objects_size: 1,
- size: 2
- }});
- addChildDump(heapDumpA, 'large_object_space', {numerics: {
- allocated_objects_size: 3,
- size: 4
- }});
- addChildDump(heapDumpA, 'map_space', {numerics: {
- allocated_objects_size: 5,
- size: 6,
- }});
- addChildDump(heapDumpA, 'new_space', {numerics: {
- allocated_objects_size: 7,
- size: 8
- }});
- addChildDump(heapDumpA, 'old_space', {numerics: {
- allocated_objects_size: 9,
- size: 10
- }});
- addChildDump(heapDumpA, 'other_spaces', {numerics: {
- allocated_objects_size: 11,
- size: 12
- }});
- var isolateDumpB = addChildDump(v8Dump, 'isolate_B');
- addChildDump(isolateDumpB, 'malloc', {numerics: {
- size: 10,
- peak_size: 20
- }});
- var heapDumpB = addChildDump(isolateDumpB, 'heap_spaces', {numerics: {
- size: 12,
- allocated_objects_size: 6
- }});
- addChildDump(heapDumpB, 'code_space', {numerics: {
- allocated_objects_size: 1,
- size: 2
- }});
- addChildDump(heapDumpB, 'large_object_space', {numerics: {
- allocated_objects_size: 1,
- size: 2
- }});
- addChildDump(heapDumpB, 'map_space', {numerics: {
- allocated_objects_size: 1,
- size: 2,
- }});
- addChildDump(heapDumpB, 'new_space', {numerics: {
- allocated_objects_size: 1,
- size: 2
- }});
- addChildDump(heapDumpB, 'old_space', {numerics: {
- allocated_objects_size: 1,
- size: 2
- }});
- addChildDump(heapDumpB, 'other_spaces', {numerics: {
- allocated_objects_size: 1,
- size: 2
- }});
- var isolateDumpC = addChildDump(v8Dump, 'isolate_C');
- addChildDump(isolateDumpC, 'malloc', {numerics: {
- size: 100,
- }});
- addChildDump(isolateDumpC, 'heap_spaces', {numerics: {
- size: 2,
- allocated_objects_size: 1
- }});
- var isolateDumpD = addChildDump(v8Dump, 'isolate_D');
- addChildDump(isolateDumpD, 'malloc', {numerics: {
- peak_size: 200,
- }});
- return [partitionAllocDump, v8Dump];
- })();
- var pmdRendererB2 = addProcessMemoryDump(gmd2, pRendererB, {ts: 40});
- pmdRendererB2.memoryAllocatorDumps = [
- newAllocatorDump(pmdRendererB2, 'v8', {numerics: {
- size: 970,
- allocated_objects_size: 860,
- bytecode_and_metadata_size: 678
- }}),
- newAllocatorDump(pmdRendererB2, 'malloc',
- {numerics: {allocated_objects_size: 750}})
- ];
- var pmdUnknown = addProcessMemoryDump(gmd2, pUnknown, {ts: 42});
- pmdUnknown.memoryAllocatorDumps = [
- newAllocatorDump(pmdRendererB2, 'v8', {numerics: {size: 111}})
- ];
-
- // Timestamp 3.
- var gmd3 = addGlobalMemoryDump(model, {ts: 60});
- var pmdBrowser3 = addProcessMemoryDump(gmd3, pBrowser, {ts: 60});
- pmdBrowser3.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser3, 'malloc', {numerics: {
- size: 8000,
- allocated_objects_size: 4000
- }})
- ];
- var pmdRendererB3 = addProcessMemoryDump(gmd3, pRendererB, {ts: 61});
- // Intentionally pmdRendererB3.memoryAllocatorDumps undefined.
- var pmdGpu3 = addProcessMemoryDump(gmd3, pPpapi, {ts: 59});
- pmdGpu3.memoryAllocatorDumps = [
- newAllocatorDump(pmdGpu3, 'gpu', {numerics: {size: 300}})
- ];
-
- // Timestamp 4.
- var gmd4 = addGlobalMemoryDump(model, {ts: 80});
- var pmdBrowser4 = addProcessMemoryDump(gmd4, pBrowser, {ts: 81});
- pmdBrowser4.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser4, 'malloc', {numerics: {size: 80000}})
- ];
- var pmdRendererB4 = addProcessMemoryDump(gmd4, pRendererB, {ts: 79});
- pmdRendererB4.memoryAllocatorDumps = (function() {
- var v8Dump = newAllocatorDump(pmdRendererB4, 'v8', {numerics: {
- code_and_metadata_size: 21,
- bytecode_and_metadata_size: 35,
- size: 9e5
- }});
- var partitionAllocDump = newAllocatorDump(pmdRendererB4,
- 'partition_alloc', {numerics: {size: 5e5}});
- addOwnershipLink(partitionAllocDump, v8Dump);
- return [v8Dump, partitionAllocDump];
- })();
- var pmdGpu4 = addProcessMemoryDump(gmd4, pPpapi, {ts: 80});
- pmdGpu4.memoryAllocatorDumps = [
- newAllocatorDump(pmdGpu4, 'gpu',
- {numerics: {memtrack_pss: 666 /* ignored */}})
- ];
- }, undefined /* opt_options */, {
- 'memory:chrome:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:light': {
- value: [4],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by Chrome ' +
- 'to the trace'
- },
- 'memory:chrome:all_processes:dump_count': {
- value: [4],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome to the ' +
- 'trace'
- },
- 'memory:chrome:all_processes:process_count': {
- value: [3, 4, 3, 3],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:effective_size': {
- value: [30 + (8 + 16) + 32, (120 - 40) + 320 + (650 + 970) + 111,
- 300 + 8000, 80000 + 5e5 + 4e5],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:allocated_objects_size': {
- value: [25 + 4 + 32, (36 + 6 + 1) + 750 + 860 + 320 + 40, 4000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of all allocated objects reported by Chrome ' +
- 'for all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:peak_size':
- {
- value: [0, 2 + 20 + 200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak size reported by Chrome for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:resident_size': {
- value: [200, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total resident set size (RSS) reported by the OS for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:peak_resident_size': {
- value: [230, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak resident set size reported by the OS for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:resident_size': {
- value: [200, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total resident set size (RSS) of system memory (RAM) ' +
- 'used by all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:peak_resident_size':
- {
- value: [230, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak resident set size of system memory (RAM) ' +
- 'used by all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:gpu:effective_size': {
- value: [30, 0, 300, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of gpu in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:gpu:allocated_objects_size':
- {
- value: [25, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by gpu in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:malloc:effective_size': {
- value: [8 + 16, 120 - 40, 8000, 80000],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:malloc:allocated_objects_size':
- {
- value: [4, 40 + 750, 4000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by malloc in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:partition_alloc:allocated_objects_size':
- {
- value: [32, 320, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by partition_alloc in ' +
- 'all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:partition_alloc:effective_size':
- {
- value: [32, 320, 0, 5e5],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of partition_alloc in all processes ' +
- 'in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:tracing:effective_size': {
- value: [0, 40, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of tracing in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_by_malloc:effective_size':
- {
- value: [0, 1 + 10 + 100, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of objects allocated by malloc for v8 ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_by_malloc:peak_size':
- {
- value: [0, 2 + 20 + 200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of objects allocated by malloc for v8 ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:code_and_metadata_size':
- {
- value: [16, 678, 0, 21 + 35],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of code and metadata reported by Chrome ' +
- 'for all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:code_and_metadata_size':
- {
- value: [16, 678, 0, 21 + 35],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of v8 code and metadata in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:allocated_objects_size':
- {
- value: [0, 36 + 6 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:effective_size': {
- value: [0, 42 + 12 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:code_space:allocated_objects_size':
- {
- value: [0, 1 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:code_space ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:code_space:effective_size':
- {
- value: [0, 2 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:code_space in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:large_object_space:allocated_objects_size':
- {
- value: [0, 3 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by ' +
- 'v8:heap:large_object_space in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:large_object_space:effective_size':
- {
- value: [0, 4 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:large_object_space in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:map_space:allocated_objects_size':
- {
- value: [0, 5 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:map_space ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:map_space:effective_size':
- {
- value: [0, 6 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:map_space in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:new_space:allocated_objects_size':
- {
- value: [0, 7 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:new_space ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:new_space:effective_size':
- {
- value: [0, 8 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:new_space in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:old_space:allocated_objects_size':
- {
- value: [0, 9 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:old_space ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:heap:old_space:effective_size':
- {
- value: [0, 10 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:old_space in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:effective_size': {
- value: [0, 650 + 970 + 111, 0, 4e5],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_objects_size':
- {
- value: [0, (36 + 6 + 1) + 860, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8 in all processes ' +
- 'in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:v8:peak_size':
- {
- value: [0, 2 + 20 + 200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of v8 in all processes in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:peak_resident_size': {
- value: [230, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak resident set size reported by the OS for the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:peak_resident_size':
- {
- value: [230, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak resident set size of system memory (RAM) ' +
- 'used by the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:resident_size': {
- value: [200, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total resident set size (RSS) reported by the OS for the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:resident_size':
- {
- value: [200, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total resident set size (RSS) of system memory (RAM) ' +
- 'used by the browser process in Chrome'
- },
- 'memory:chrome:browser_process:process_count': {
- value: [1, 1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:effective_size': {
- value: [8, (120 - 40), 8000, 80000],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:allocated_objects_size': {
- value: [4 + 40, 0, 4000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of all allocated objects reported by Chrome ' +
- 'for the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:malloc:effective_size': {
- value: [8, 120 - 40, 8000, 80000],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:malloc:allocated_objects_size':
- {
- value: [4 + 40, 0, 4000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by malloc in the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:tracing:effective_size': {
- value: [0, 40, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of tracing in the browser process in Chrome'
- },
- 'memory:chrome:ppapi_process:process_count': {
- value: [1, 0, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of PPAPI processes in Chrome'
- },
- 'memory:chrome:ppapi_process:reported_by_chrome:effective_size': {
- value: [30, 0, 300, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the PPAPI ' +
- 'process in Chrome'
- },
- 'memory:chrome:ppapi_process:reported_by_chrome:allocated_objects_size': {
- value: [25, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of all allocated objects reported by Chrome ' +
- 'for the PPAPI process in Chrome'
- },
- 'memory:chrome:ppapi_process:reported_by_chrome:gpu:effective_size': {
- value: [30, 0, 300, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of gpu in the PPAPI process in Chrome'
- },
- 'memory:chrome:ppapi_process:reported_by_chrome:gpu:allocated_objects_size':
- {
- value: [25, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by gpu in the PPAPI ' +
- 'process in Chrome'
- },
- 'memory:chrome:renderer_processes:process_count': {
- value: [1, 2, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:effective_size': {
- value: [16 + 32, 320 + 650 + 970, 0, 5e5 + 4e5],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:allocated_objects_size':
- {
- value: [32, (36 + 6 + 1) + 750 + 860 + 320, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of all allocated objects reported by ' +
- 'Chrome for renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:peak_size':
- {
- value: [0, 2 + 20 + 200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak size reported by Chrome ' +
- 'for renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:malloc:effective_size':
- {
- value: [16, 0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in renderer processes in ' +
- 'Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:malloc:allocated_objects_size':
- {
- value: [0, 750, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by malloc in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:partition_alloc:allocated_objects_size':
- {
- value: [32, 320, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by partition_alloc in ' +
- 'renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:partition_alloc:effective_size':
- {
- value: [32, 320, 0, 5e5],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of partition_alloc in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_by_malloc:effective_size':
- {
- value: [0, 1 + 10 + 100, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of objects allocated by malloc for v8 ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_by_malloc:peak_size':
- {
- value: [0, 2 + 20 + 200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of objects allocated by malloc for v8 ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:allocated_objects_size':
- {
- value: [0, 36 + 6 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:code_and_metadata_size':
- {
- value: [16, 678, 0, 21 + 35],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of code and metadata reported by Chrome ' +
- 'for renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:code_and_metadata_size':
- {
- value: [16, 678, 0, 21 + 35],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of v8 code and metadata in renderer processes ' +
- 'in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:effective_size':
- {
- value: [0, 42 + 12 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap in renderer processes ' +
- 'in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:code_space:allocated_objects_size':
- {
- value: [0, 1 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:code_space ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:code_space:effective_size':
- {
- value: [0, 2 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:code_space in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:large_object_space:allocated_objects_size':
- {
- value: [0, 3 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by ' +
- 'v8:heap:large_object_space in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:large_object_space:effective_size':
- {
- value: [0, 4 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:large_object_space in ' +
- 'renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:map_space:allocated_objects_size':
- {
- value: [0, 5 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:map_space ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:map_space:effective_size':
- {
- value: [0, 6 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:map_space in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:new_space:allocated_objects_size':
- {
- value: [0, 7 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:new_space ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:new_space:effective_size':
- {
- value: [0, 8 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:new_space in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:old_space:allocated_objects_size':
- {
- value: [0, 9 + 1, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8:heap:old_space ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:heap:old_space:effective_size':
- {
- value: [0, 10 + 2, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8:heap:old_space in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:effective_size': {
- value: [0, 650 + 970, 0, 4e5],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_objects_size':
- {
- value: [0, (36 + 6 + 1) + 860, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8 in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:v8:peak_size':
- {
- value: [0, 2 + 20 + 200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of v8 in renderer processes in Chrome'
- },
- 'memory:chrome:unknown_processes:process_count': {
- value: [0, 1, 0, 0],
- unit: count_smallerIsBetter,
- description: 'total number of unknown processes in Chrome'
- },
- 'memory:chrome:unknown_processes:reported_by_chrome:effective_size': {
- value: [0, 111, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for unknown ' +
- 'processes in Chrome'
- },
- 'memory:chrome:unknown_processes:reported_by_chrome:v8:effective_size': {
- value: [0, 111, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in unknown processes in Chrome'
- },
- });
-
- memoryMetricTest('detailedValues_unknownBrowser', function(model) {
- var pBrowser = createProcessWithName(model, 'Browser');
- var pRendererA = createProcessWithName(model, 'Renderer');
- var pRendererB = createProcessWithName(model, 'Renderer');
- var pRendererC = createProcessWithName(model, 'Renderer');
- var pGpu = createProcessWithName(model, 'GPU Process');
-
- // Timestamp 1.
- var gmd1 = addGlobalMemoryDump(model, {ts: 10, levelOfDetail: DETAILED});
- var pmdBrowser1 = addProcessMemoryDump(gmd1, pBrowser, {ts: 9});
- pmdBrowser1.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 128, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 8})
- ]);
- var pmdRendererA1 = addProcessMemoryDump(gmd1, pRendererA, {ts: 10});
- pmdRendererA1.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xEF01, 256, 0, '[anon:libc_malloc]',
- {privateDirtyResident: 17})
- ]);
- var pmdRendererB1 = addProcessMemoryDump(gmd1, pRendererB, {ts: 11});
- pmdRendererB1.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0x2345, 512, 0, '[heap]',
- {proportionalResident: 67, privateDirtyResident: 34})
- ]);
- var pmdGpu1 = addProcessMemoryDump(gmd1, pGpu, {ts: 10});
- pmdGpu1.memoryAllocatorDumps = (function() {
- var gpuDump = newAllocatorDump(pmdGpu1, 'gpu');
- var memtrackDump = addChildDump(gpuDump, 'android_memtrack');
- addChildDump(memtrackDump, 'gl', {numerics: {memtrack_pss: 100}});
- addChildDump(memtrackDump, 'graphics', {numerics: {memtrack_pss: 200}});
- return [gpuDump];
- })();
-
- // Timestamp 2 (light global memory dump, so it should be skipped for
- // mmaps_* values).
- var gmd2 = addGlobalMemoryDump(model, {ts: 20, levelOfDetail: LIGHT});
- var pmdBrowser2 = addProcessMemoryDump(gmd2, pBrowser, {ts: 18});
- pmdBrowser2.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0x999, 999, 999, '/dev/ashmem/dalvik-main space',
- {proportionalResident: 999})
- ]);
- var pmdRendererB2 = addProcessMemoryDump(gmd2, pRendererB, {ts: 21});
- var pmdRendererC2 = addProcessMemoryDump(gmd2, pRendererC, {ts: 22});
- var pmdGpu2 = addProcessMemoryDump(gmd2, pGpu, {ts: 20});
- pmdGpu2.memoryAllocatorDumps = (function() {
- var gpuDump = newAllocatorDump(pmdGpu2, 'gpu');
- var memtrackDump = addChildDump(gpuDump, 'android_memtrack');
- addChildDump(memtrackDump, 'gl', {numerics: {memtrack_pss: 12345}});
- return [gpuDump];
- })();
-
- // Timestamp 3.
- var gmd3 = addGlobalMemoryDump(model, {ts: 30, levelOfDetail: DETAILED});
- var pmdBrowser3 = addProcessMemoryDump(gmd3, pBrowser, {ts: 30});
- pmdBrowser3.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 1024, 0, '/dev/ashmem/dalvik-non moving space',
- {proportionalResident: 3, privateDirtyResident: 80})
- ]);
- var pmdRendererA3 = addProcessMemoryDump(gmd3, pRendererA, {ts: 29});
- // Intentionally pmdRendererA3.vmRegions undefined.
- var pmdRendererC3 = addProcessMemoryDump(gmd3, pRendererC, {ts: 31});
- pmdRendererC3.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0x2345, 2048, 0, '/no/matching/category',
- {proportionalResident: 200}),
- new VMRegion(0x2345, 2048, 0, '/dev/ashmem', {proportionalResident: 500}),
- ]);
- var pmdGpu3 = addProcessMemoryDump(gmd3, pGpu, {ts: 30});
- pmdGpu3.memoryAllocatorDumps = (function() {
- var gpuDump = newAllocatorDump(pmdGpu3, 'gpu',
- {numerics: {memtrack_pss: 6000 /* ignored */}});
- var memtrackDump = addChildDump(gpuDump, 'android_memtrack',
- {numerics: {memtrack_pss: 5000 /* ignored */}});
- addChildDump(memtrackDump, 'gl', {numerics: {memtrack_pss: 3000}});
- addChildDump(memtrackDump, 'graphics', {numerics: {ignored: 2000}});
- addChildDump(memtrackDump, 'gfx', {numerics: {memtrack_pss: 1000}});
- return [gpuDump];
- })();
- pmdGpu3.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xCDCD, 4096, 0, '/dev/ashmem/dalvik-zygote space',
- {proportionalResident: 150, privateDirtyResident: 90})
- ]);
-
- // Timestamp 4.
- var gmd4 = addGlobalMemoryDump(model, {ts: 40, levelOfDetail: DETAILED});
- var pmdBrowser4 = addProcessMemoryDump(gmd4, pBrowser, {ts: 40});
- }, undefined /* opt_options */, {
- 'memory:unknown_browser:all_processes:dump_count:detailed': {
- value: [3],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count': {
- value: [4],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:process_count': {
- value: [4, 4, 4, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:gpu_memory:proportional_resident_size':
- {
- value: [100 + 200, 3000 + 1000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of GPU memory ' +
- '(Android memtrack) used by all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:gpu_memory:gfx:proportional_resident_size':
- {
- value: [0, 1000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the gfx Android ' +
- 'memtrack component in all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:gpu_memory:gl:proportional_resident_size':
- {
- value: [100, 3000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the gl Android ' +
- 'memtrack component in all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:gpu_memory:graphics:proportional_resident_size':
- {
- value: [200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the graphics ' +
- 'Android memtrack component in all processes in an unknown ' +
- 'browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:private_dirty_size': {
- value: [17 + 34 + 8, 80 + 90, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for all ' +
- 'processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:proportional_resident_size':
- {
- value: [67 + 100 + 200, 700 + 3 + 1000 + 150 + 3000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [17 + 34 + 8, 80 + 90, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [67, 700 + 3 + 150, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in all processes in an ' +
- 'unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 500, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in all ' +
- 'processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [8, 80 + 90, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in all processes ' +
- 'in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 3 + 150, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [17 + 34, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in all ' +
- 'processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [67, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in all processes in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:process_count': {
- value: [1, 1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:private_dirty_size':
- {
- value: [8, 80, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the ' +
- 'browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:proportional_resident_size':
- {
- value: [0, 3, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for the browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [8, 80, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 3, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the browser process ' +
- 'in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [8, 80, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the browser ' +
- 'process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 3, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the browser ' +
- 'process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the browser process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:process_count': {
- value: [1, 1, 1, 0],
- unit: count_smallerIsBetter,
- description: 'total number of GPU processes in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:proportional_resident_size':
- {
- value: [100 + 200, 3000 + 1000 + 150, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:private_dirty_size': {
- value: [0, 90, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the GPU ' +
- 'process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:gpu_memory:proportional_resident_size':
- {
- value: [100 + 200, 3000 + 1000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of GPU memory ' +
- '(Android memtrack) used by the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:gpu_memory:gfx:proportional_resident_size':
- {
- value: [0, 1000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the gfx Android ' +
- 'memtrack component in the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:gpu_memory:gl:proportional_resident_size':
- {
- value: [100, 3000, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the gl Android ' +
- 'memtrack component in the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:gpu_memory:graphics:proportional_resident_size':
- {
- value: [200, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the graphics ' +
- 'Android memtrack component in the GPU process in an unknown ' +
- 'browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [0, 90, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 150, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the GPU process in ' +
- 'an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [0, 90, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the GPU ' +
- 'process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 150, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the GPU ' +
- 'process in an unknown browser'
- },
- 'memory:unknown_browser:gpu_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the GPU process in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:process_count': {
- value: [2, 2, 2, 0],
- unit: count_smallerIsBetter,
- description: 'total number of renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:private_dirty_size':
- {
- value: [17 + 34, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for ' +
- 'renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:proportional_resident_size':
- {
- value: [67, 700, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [17 + 34, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [67, 700, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in renderer processes ' +
- 'in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 500, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in ' +
- 'renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in renderer ' +
- 'processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'renderer processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [17 + 34, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in renderer ' +
- 'processes in an unknown browser'
- },
- 'memory:unknown_browser:renderer_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [67, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in renderer processes in an unknown browser'
- }
- });
-
- memoryMetricTest('combined_chrome', function(model) {
- var pBrowser = createChromeBrowserProcess(model);
-
- // Timestamp 1.
- var gmd1 = addGlobalMemoryDump(model, {ts: 10, levelOfDetail: DETAILED});
- var pmdBrowser1 = addProcessMemoryDump(gmd1, pBrowser, {ts: 10});
- pmdBrowser1.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 128, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 100})
- ]);
-
- // Timestamp 2 (light global memory dump, so it should be skipped for
- // mmaps_* values).
- var gmd2 = addGlobalMemoryDump(model, {ts: 20, levelOfDetail: LIGHT});
- var pmdBrowser2 = addProcessMemoryDump(gmd2, pBrowser, {ts: 20});
- pmdBrowser2.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser2, 'malloc', {numerics: {size: 32}})
- ];
-
- // Timestamp 3.
- var gmd3 = addGlobalMemoryDump(model, {ts: 30, levelOfDetail: DETAILED});
- var pmdBrowser3 = addProcessMemoryDump(gmd3, pBrowser, {ts: 30});
- pmdBrowser3.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser3, 'malloc', {numerics: {size: 48}})
- ];
- pmdBrowser3.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 1024, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 150})
- ]);
- }, {} /* opt_options */, {
- 'memory:chrome:all_processes:dump_count:detailed': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by Chrome ' +
- 'to the trace'
- },
- 'memory:chrome:all_processes:dump_count': {
- value: [3],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome to the ' +
- 'trace'
- },
- 'memory:chrome:all_processes:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:effective_size': {
- value: [0, 32, 48],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:malloc:effective_size': {
- value: [0, 32, 48],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:private_dirty_size': {
- value: [100, 150],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:proportional_resident_size': {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [100, 150],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in all processes ' +
- 'in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [100, 150],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by all processes in Chrome'
- },
- 'memory:chrome:browser_process:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:effective_size': {
- value: [0, 32, 48],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:malloc:effective_size': {
- value: [0, 32, 48],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:private_dirty_size': {
- value: [100, 150],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:proportional_resident_size': {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the browser process ' +
- 'in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [100, 150],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [100, 150],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the browser process in Chrome'
- }
- });
-
- memoryMetricTest('combined_multipleBrowsers', function(model) {
- var pWebView = createWebViewProcess(model);
- var pChrome1 = createChromeBrowserProcess(model);
- var pRenderer1 = createProcessWithName(model, 'Renderer');
- var pGpu1 = createProcessWithName(model, 'GPU Process');
- var pUnknownBrowser = createProcessWithName(model, 'Browser');
- var pChrome2 = createChromeBrowserProcess(model);
- var pRenderer2 = createProcessWithName(model, 'Renderer');
-
- // Timestamp 1 (WebView).
- var gmd1 = addGlobalMemoryDump(model, {ts: 0, levelOfDetail: LIGHT});
- var pmdBrowser1 = addProcessMemoryDump(gmd1, pWebView, {ts: 0});
- pmdBrowser1.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser1, 'malloc', {numerics: {size: 2}}),
- newAllocatorDump(pmdBrowser1, 'v8', {numerics: {size: 4}})
- ];
-
- // Timestamp 2 (Chrome 1 + Renderer + GPU Process).
- var gmd2 = addGlobalMemoryDump(model, {ts: 10, levelOfDetail: DETAILED});
- var pmdBrowser2 = addProcessMemoryDump(gmd2, pChrome1, {ts: 12});
- pmdBrowser2.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 9999, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 8})
- ]);
- var pmdGpu2 = addProcessMemoryDump(gmd2, pGpu1, {ts: 8});
- pmdGpu2.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 9999, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 16})
- ]);
- var pmdRenderer2 = addProcessMemoryDump(gmd2, pRenderer1, {ts: 8});
- pmdRenderer2.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser2, 'malloc', {numerics: {size: 32}})
- ];
-
- // Timestamp 3 (Chrome 2).
- var gmd3 = addGlobalMemoryDump(model, {ts: 20, levelOfDetail: DETAILED});
- var pmdBrowser3 = addProcessMemoryDump(gmd3, pChrome2, {ts: 20});
- pmdBrowser3.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser3, 'malloc', {numerics: {size: 64}}),
- newAllocatorDump(pmdBrowser3, 'sqlite', {numerics: {size: 128}}),
- newAllocatorDump(pmdBrowser3, 'discardable', {numerics: {
- size: 8388608,
- locked_size: 4194304
- }})
- ];
- pmdBrowser3.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 99, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 256})
- ]);
-
- // Timestamp 4 (Chrome 2 + Renderer).
- var gmd4 = addGlobalMemoryDump(model, {ts: 30, levelOfDetail: LIGHT});
- var pmdBrowser4 = addProcessMemoryDump(gmd4, pChrome2, {ts: 28});
- pmdBrowser4.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser4, 'malloc', {numerics: {size: 512}}),
- newAllocatorDump(pmdBrowser3, 'discardable', {numerics: {size: 16777216}})
- ];
- var pmdRenderer4 = addProcessMemoryDump(gmd4, pRenderer2, {ts: 32});
- pmdRenderer4.memoryAllocatorDumps = [
- newAllocatorDump(pmdRenderer4, 'malloc', {numerics: {size: 1024}}),
- newAllocatorDump(pmdRenderer4, 'v8', {numerics: {size: 2048}})
- ];
-
- // Timestamp 5 (Unknown browser).
- var gmd5 = addGlobalMemoryDump(model, {ts: 40, levelOfDetail: LIGHT});
- var pmdBrowser5 = addProcessMemoryDump(gmd5, pUnknownBrowser, {ts: 40});
- pmdBrowser5.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser5, 'malloc', {numerics: {size: 4096}}),
- newAllocatorDump(pmdBrowser5, 'sqlite', {numerics: {size: 8192}}),
- ];
-
- // Timestamp 6 (WebView).
- var gmd6 = addGlobalMemoryDump(model, {ts: 50, levelOfDetail: DETAILED});
- var pmdBrowser6 = addProcessMemoryDump(gmd6, pWebView, {ts: 50});
- pmdBrowser6.memoryAllocatorDumps = (function() {
- var mallocDump = newAllocatorDump(pmdBrowser6, 'malloc',
- {numerics: {size: 16384}});
- var v8Dump = newAllocatorDump(pmdBrowser6, 'v8', {numerics: {
- allocated_objects_size: 32768,
- code_and_metadata_size: 33554432,
- size: 67108864
- }});
- var isolateDump = addChildDump(v8Dump, 'isolate');
- addChildDump(isolateDump, 'malloc', {numerics: {
- size: 1,
- peak_size: 2
- }});
- return [mallocDump, v8Dump];
- })();
- pmdBrowser6.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 99999, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 65536})
- ]);
-
- // Timestamp 7 (Chrome 1 + GPU Process).
- var gmd7 = addGlobalMemoryDump(model, {ts: 60, levelOfDetail: DETAILED});
- var pmdBrowser7 = addProcessMemoryDump(gmd7, pChrome1, {ts: 63});
- pmdBrowser7.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser4, 'malloc', {numerics: {size: 131072}}),
- newAllocatorDump(pmdBrowser4, 'sqlite', {numerics: {size: 262144}})
- ];
- pmdBrowser7.vmRegions = VMRegionClassificationNode.fromRegions([
- new VMRegion(0xABCD, 999999, 0, '/dev/ashmem/dalvik-non moving space',
- {privateDirtyResident: 524288})
- ]);
- var pmdGpu7 = addProcessMemoryDump(gmd7, pGpu1, {ts: 57});
- pmdGpu7.memoryAllocatorDumps = (function() {
- var gpuDump = newAllocatorDump(pmdGpu7, 'gpu',
- {numerics: {size: 1048576}});
- var memtrackDump = addChildDump(gpuDump, 'android_memtrack');
- addChildDump(memtrackDump, 'gl', {numerics: {memtrack_pss: 2097152}});
- return [gpuDump];
- })();
-
- // Timestamp 8 (Chrome 1).
- var gmd8 = addGlobalMemoryDump(model, {ts: 76, levelOfDetail: BACKGROUND});
- var pmdBrowser8 = addProcessMemoryDump(gmd8, pChrome1, {ts: 80});
- pmdBrowser8.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser5, 'malloc', {numerics: {size: 1024}}),
- newAllocatorDump(pmdBrowser5, 'sqlite', {numerics: {size: 2048}}),
- ];
-
- // Timestamp 9 (WebView).
- var gmd9 = addGlobalMemoryDump(model, {ts: 90, levelOfDetail: BACKGROUND});
- var pmdBrowser9 = addProcessMemoryDump(gmd9, pWebView, {ts: 90});
- pmdBrowser9.memoryAllocatorDumps = [
- newAllocatorDump(pmdBrowser5, 'v8', {numerics: {size: 4096}}),
- newAllocatorDump(pmdBrowser5, 'sqlite', {numerics: {size: 2048}}),
- ];
- }, undefined /* opt_options */, {
- // WebView (GMD1, GMD6).
- 'memory:webview:all_processes:dump_count:detailed': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by WebView to ' +
- 'the trace'
- },
- 'memory:webview:all_processes:dump_count:background': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count': {
- value: [3],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by WebView to the ' +
- 'trace'
- },
- 'memory:webview:all_processes:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:effective_size': {
- value: [4 + 2, 16384 + 67108864, 4096 + 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:code_and_metadata_size': {
- value: [0, 33554432, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of code and metadata reported by Chrome for ' +
- 'all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:allocated_objects_size': {
- value: [0, 32768, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of all allocated objects reported by Chrome ' +
- 'for all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:peak_size':
- {
- value: [0, 2, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak size reported by Chrome for all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:malloc:effective_size': {
- value: [2, 16384, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:sqlite:effective_size': {
- value: [0, 2048, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:v8:allocated_by_malloc:effective_size':
- {
- value: [0, 1, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of objects allocated by malloc for v8 ' +
- 'in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:v8:allocated_by_malloc:peak_size':
- {
- value: [0, 2, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of objects allocated by malloc for v8 ' +
- 'in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:v8:effective_size': {
- value: [4, 67108864, 4096],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:v8:code_and_metadata_size':
- {
- value: [0, 33554432, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of v8 code and metadata in all processes in ' +
- 'WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:v8:allocated_objects_size':
- {
- value: [0, 32768, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8 in all processes ' +
- 'in WebView'
- },
- 'memory:webview:all_processes:reported_by_chrome:v8:peak_size':
- {
- value: [0, 2, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of v8 in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:private_dirty_size': {
- value: [65536],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:proportional_resident_size': {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in all processes in ' +
- 'WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [65536],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in all processes ' +
- 'in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [65536],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by all processes in WebView'
- },
- 'memory:webview:browser_process:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:effective_size': {
- value: [4 + 2, 16384 + 67108864, 4096 + 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the browser ' +
- 'process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:allocated_objects_size':
- {
- value: [0, 32768, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of all allocated objects reported by ' +
- 'Chrome for the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:code_and_metadata_size':
- {
- value: [0, 33554432, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total size of code and metadata reported by Chrome ' +
- 'for the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:peak_size':
- {
- value: [0, 2, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total peak size reported by Chrome ' +
- 'for the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:malloc:effective_size': {
- value: [2, 16384, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:v8:allocated_by_malloc:effective_size':
- {
- value: [0, 1, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of objects allocated by malloc for v8 ' +
- 'in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:v8:allocated_by_malloc:peak_size':
- {
- value: [0, 2, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of objects allocated by malloc for v8 ' +
- 'in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:sqlite:effective_size': {
- value: [0, 0, 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:v8:effective_size': {
- value: [4, 67108864, 4096],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:v8:allocated_objects_size':
- {
- value: [0, 32768, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of all objects allocated by v8 in the browser ' +
- 'process in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:v8:code_and_metadata_size':
- {
- value: [0, 33554432, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'size of v8 code and metadata in the browser process ' +
- 'in WebView'
- },
- 'memory:webview:browser_process:reported_by_chrome:v8:peak_size':
- {
- value: [0, 2, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'peak size of v8 in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:private_dirty_size': {
- value: [65536],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the ' +
- 'browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the browser process ' +
- 'in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [65536],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the browser ' +
- 'process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the browser ' +
- 'process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [65536],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the browser process in WebView'
- },
-
- // Chrome 1 (GMD3, GMD4).
- 'memory:chrome:all_processes:reported_by_os:gpu_memory:gl:proportional_resident_size':
- {
- value: [0, 2097152],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the gl Android ' +
- 'memtrack component in all processes in Chrome'
- },
- 'memory:chrome:all_processes:dump_count:detailed': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:light': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:background': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by Chrome ' +
- 'to the trace'
- },
- 'memory:chrome:all_processes:dump_count': {
- value: [3],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome to the ' +
- 'trace'
- },
- 'memory:chrome:all_processes:process_count': {
- value: [3, 2, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:effective_size': {
- value: [32, 1048576 + 131072 + 262144, 1024 + 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:gpu:effective_size': {
- value: [0, 1048576, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of gpu in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:malloc:effective_size': {
- value: [32, 131072, 1024],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_chrome:sqlite:effective_size': {
- value: [0, 262144, 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:private_dirty_size': {
- value: [8 + 16, 524288],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:proportional_resident_size': {
- value: [0, 2097152],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:gpu_memory:proportional_resident_size':
- {
- value: [0, 2097152],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of GPU memory ' +
- '(Android memtrack) used by all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [8 + 16, 524288],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in all processes ' +
- 'in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in all ' +
- 'processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [8 + 16, 524288],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by all processes in Chrome'
- },
- 'memory:chrome:all_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by all processes in Chrome'
- },
- 'memory:chrome:browser_process:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:effective_size': {
- value: [0, 131072 + 262144, 1024 + 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:malloc:effective_size': {
- value: [0, 131072, 1024],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_chrome:sqlite:effective_size': {
- value: [0, 262144, 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:private_dirty_size': {
- value: [8, 524288],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:proportional_resident_size': {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the browser process ' +
- 'in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [8, 524288],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the browser ' +
- 'process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [8, 524288],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the browser process in Chrome'
- },
- 'memory:chrome:browser_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the browser process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_chrome:effective_size': {
- value: [0, 1048576, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the GPU ' +
- 'process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:gpu_memory:proportional_resident_size':
- {
- value: [0, 2097152],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of GPU memory ' +
- '(Android memtrack) used by the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:gpu_memory:gl:proportional_resident_size':
- {
- value: [0, 2097152],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the gl Android ' +
- 'memtrack component in the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:process_count': {
- value: [1, 1, 0],
- unit: count_smallerIsBetter,
- description: 'total number of GPU processes in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_chrome:gpu:effective_size': {
- value: [0, 1048576, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of gpu in the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:private_dirty_size': {
- value: [16, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the GPU ' +
- 'process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:proportional_resident_size': {
- value: [0, 2097152],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the GPU process in ' +
- 'Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [16, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the GPU ' +
- 'process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the GPU ' +
- 'process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [16, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the GPU process in Chrome'
- },
- 'memory:chrome:gpu_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the GPU process in Chrome'
- },
- 'memory:chrome:renderer_processes:process_count': {
- value: [1, 0, 0],
- unit: count_smallerIsBetter,
- description: 'total number of renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:effective_size': {
- value: [32, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_chrome:malloc:effective_size':
- {
- value: [32, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in renderer processes in ' +
- 'Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:private_dirty_size': {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in renderer processes ' +
- 'in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in ' +
- 'renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in renderer ' +
- 'processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by renderer processes in Chrome'
- },
- 'memory:chrome:renderer_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by renderer processes in Chrome'
- },
-
- // Chrome 2 (GMD2, GMD7).
- 'memory:chrome2:all_processes:dump_count:detailed': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome(2) ' +
- 'to the trace'
- },
- 'memory:chrome2:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome(2) to ' +
- 'the trace'
- },
- 'memory:chrome2:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by ' +
- 'Chrome(2) to the trace'
- },
- 'memory:chrome2:all_processes:dump_count': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome(2) to ' +
- 'the trace'
- },
- 'memory:chrome2:all_processes:process_count': {
- value: [1, 2],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:discardable:effective_size':
- {
- value: [8388608, 16777216],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of discardable in all processes in ' +
- 'Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:locked_size': {
- value: [4194304, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total locked (pinned) size reported by Chrome for all ' +
- 'processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:discardable:locked_size': {
- value: [4194304, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'locked (pinned) size of discardable in all processes in ' +
- 'Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:effective_size': {
- value: [64 + 8388608 + 128, 512 + 1024 + 2048 + 16777216],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for all ' +
- 'processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:malloc:effective_size': {
- value: [64, 512 + 1024],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:sqlite:effective_size': {
- value: [128, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_chrome:v8:effective_size': {
- value: [0, 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:private_dirty_size': {
- value: [256],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for all ' +
- 'processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:proportional_resident_size': {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in all processes in ' +
- 'Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in all ' +
- 'processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [256],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in all processes ' +
- 'in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in all ' +
- 'processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [256],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by all processes in Chrome(2)'
- },
- 'memory:chrome2:all_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by all processes in Chrome(2)'
- },
- 'memory:chrome2:browser_process:process_count': {
- value: [1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_chrome:effective_size': {
- value: [64 + 8388608 + 128, 512 + 16777216],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the browser ' +
- 'process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_chrome:locked_size': {
- value: [4194304, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total locked (pinned) size reported by Chrome for the ' +
- 'browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_chrome:malloc:effective_size': {
- value: [64, 512],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in the browser process in ' +
- 'Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_chrome:discardable:effective_size':
- {
- value: [8388608, 16777216],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of discardable in the browser process ' +
- 'in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_chrome:discardable:locked_size':
- {
- value: [4194304, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'locked (pinned) size of discardable in the browser ' +
- 'process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_chrome:sqlite:effective_size': {
- value: [128, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in the browser process in ' +
- 'Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:private_dirty_size': {
- value: [256],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the ' +
- 'browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for the browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the browser process ' +
- 'in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [256],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the browser ' +
- 'process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the browser ' +
- 'process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [256],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the browser process in Chrome(2)'
- },
- 'memory:chrome2:browser_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the browser process in Chrome(2)'
- },
- 'memory:chrome2:renderer_processes:process_count': {
- value: [0, 1],
- unit: count_smallerIsBetter,
- description: 'total number of renderer processes in Chrome(2)'
- },
- 'memory:chrome2:renderer_processes:reported_by_chrome:effective_size': {
- value: [0, 1024 + 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for renderer ' +
- 'processes in Chrome(2)'
- },
- 'memory:chrome2:renderer_processes:reported_by_chrome:malloc:effective_size':
- {
- value: [0, 1024],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in renderer processes in ' +
- 'Chrome(2)'
- },
- 'memory:chrome2:renderer_processes:reported_by_chrome:v8:effective_size': {
- value: [0, 2048],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of v8 in renderer processes in Chrome(2)'
- },
-
- // Unknown browser (GMD5).
- 'memory:unknown_browser:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:process_count': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_chrome:effective_size': {
- value: [4096 + 8192],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for all ' +
- 'processes in an unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_chrome:malloc:effective_size':
- {
- value: [4096],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in all processes in an ' +
- 'unknown browser'
- },
- 'memory:unknown_browser:all_processes:reported_by_chrome:sqlite:effective_size':
- {
- value: [8192],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in all processes in an ' +
- 'unknown browser'
- },
- 'memory:unknown_browser:browser_process:process_count': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_chrome:effective_size':
- {
- value: [4096 + 8192],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total effective size reported by Chrome for the ' +
- 'browser process in an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_chrome:malloc:effective_size':
- {
- value: [4096],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of malloc in the browser process in ' +
- 'an unknown browser'
- },
- 'memory:unknown_browser:browser_process:reported_by_chrome:sqlite:effective_size':
- {
- value: [8192],
- unit: sizeInBytes_smallerIsBetter,
- description: 'effective size of sqlite in the browser process in ' +
- 'an unknown browser'
- }
- });
-
- memoryMetricTest('rangeOfInterest', function(model) {
- var pChrome = createChromeBrowserProcess(model);
- var pWebView = createWebViewProcess(model);
-
- // Chrome: only the LIGHT dumps should be kept.
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 5, duration: 4, levelOfDetail: DETAILED}), pChrome);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 10, duration: 2, levelOfDetail: LIGHT}), pChrome);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 13, duration: 3, levelOfDetail: LIGHT}), pChrome);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 20, duration: 1, levelOfDetail: BACKGROUND}), pChrome);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 22, duration: 5, levelOfDetail: DETAILED}), pChrome);
-
- // WebView: only the DETAILED dumps should be kept.
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 4, duration: 1, levelOfDetail: LIGHT}), pWebView);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 5, duration: 5, levelOfDetail: DETAILED}), pWebView);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 10, duration: 0, levelOfDetail: DETAILED}), pWebView);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 11, duration: 7, levelOfDetail: BACKGROUND}), pWebView);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 19, duration: 2, levelOfDetail: DETAILED}), pWebView);
- addProcessMemoryDump(addGlobalMemoryDump(
- model, {ts: 21, duration: 5, levelOfDetail: LIGHT}), pWebView);
-
- // Unknown browser: only the LIGHT dump should be kept.
- addGlobalMemoryDump(model, {ts: 5, duration: 3, levelOfDetail: DETAILED});
- addGlobalMemoryDump(model, {ts: 9, duration: 12, levelOfDetail: LIGHT});
- addGlobalMemoryDump(model, {ts: 22, duration: 3, levelOfDetail: DETAILED});
- }, { /* opt_options */
- rangeOfInterest: tr.b.Range.fromExplicitRange(10, 20)
- }, {
- 'memory:chrome:all_processes:dump_count': {
- value: [3],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by Chrome to the ' +
- 'trace'
- },
- 'memory:chrome:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:light': {
- value: [2],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by Chrome to ' +
- 'the trace'
- },
- 'memory:chrome:all_processes:dump_count:background': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by Chrome ' +
- 'to the trace'
- },
- 'memory:chrome:all_processes:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in Chrome'
- },
- 'memory:chrome:browser_process:process_count': {
- value: [1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in Chrome'
- },
-
- 'memory:webview:all_processes:dump_count': {
- value: [4],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by WebView to the ' +
- 'trace'
- },
- 'memory:webview:all_processes:dump_count:detailed': {
- value: [3],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:dump_count:light': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by WebView to ' +
- 'the trace'
- },
- 'memory:webview:all_processes:dump_count:background': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by WebView ' +
- 'to the trace'
- },
- 'memory:webview:all_processes:process_count': {
- value: [1, 1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:private_dirty_size': {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:proportional_resident_size': {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by the ' +
- 'OS for all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in all processes in ' +
- 'WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in all processes ' +
- 'in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in all ' +
- 'processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by all processes in WebView'
- },
- 'memory:webview:all_processes:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by all processes in WebView'
- },
- 'memory:webview:browser_process:process_count': {
- value: [1, 1, 1, 1],
- unit: count_smallerIsBetter,
- description: 'total number of browser processes in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:private_dirty_size': {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size reported by the OS for the ' +
- 'browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) reported by ' +
- 'the OS for the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:ashmem:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of ashmem in the browser process ' +
- 'in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:ashmem:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of ashmem in the ' +
- 'browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:java_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the Java heap in the browser ' +
- 'process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:java_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the Java heap in ' +
- 'the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:native_heap:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'private dirty size of the native heap in the browser ' +
- 'process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:native_heap:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'proportional resident size (PSS) of the native heap ' +
- 'in the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:private_dirty_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total private dirty size of system memory (RAM) used ' +
- 'by the browser process in WebView'
- },
- 'memory:webview:browser_process:reported_by_os:system_memory:proportional_resident_size':
- {
- value: [0, 0, 0],
- unit: sizeInBytes_smallerIsBetter,
- description: 'total proportional resident size (PSS) of system ' +
- 'memory (RAM) used by the browser process in WebView'
- },
- 'memory:unknown_browser:all_processes:dump_count': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of all memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:detailed': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of detailed memory dumps added by an ' +
- 'unknown browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:light': {
- value: [1],
- unit: count_smallerIsBetter,
- description: 'total number of light memory dumps added by an unknown ' +
- 'browser to the trace'
- },
- 'memory:unknown_browser:all_processes:dump_count:background': {
- value: [0],
- unit: count_smallerIsBetter,
- description: 'total number of background memory dumps added by an ' +
- 'unknown browser to the trace'
- }
- });
-
- test('dumpIdBrowserClashThrows', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var pWebView = createWebViewProcess(model);
- var pChrome = createChromeBrowserProcess(model);
-
- var gmd = addGlobalMemoryDump(model, {ts: 10});
- addProcessMemoryDump(gmd, pWebView, {ts: 9});
- addProcessMemoryDump(gmd, pChrome, {ts: 11});
- });
- var values = new tr.v.ValueSet();
-
- assert.throws(function() {
- tr.metrics.sh.memoryMetric(values, model);
- }, 'Memory dump ID clash across multiple browsers with PIDs: 1 and 2');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric.html
deleted file mode 100644
index e61a491f30c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric.html
+++ /dev/null
@@ -1,293 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/importer/find_input_expectations.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/loading_metric.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
-
- // TODO(alexandermont): Per-frame power metric will be deprecated once
- // newer metrics come online.
- // Frame rate, used to divide power sample interval into frames
- // for purposes of per-frame power metric.
- var FRAMES_PER_SEC = 60;
- var FRAME_MS = tr.b.convertUnit(1.0 / FRAMES_PER_SEC,
- tr.b.UnitScale.Metric.NONE, tr.b.UnitScale.Metric.MILLI);
-
- /**
- * Returns power data for the specified interval in the form:
- * {
- * duration: durationInMs,
- * energy: energyInJ,
- * power: powerInW
- * }
- */
- function getPowerData_(model, start, end) {
- var durationInMs = end - start;
- var durationInS = tr.b.convertUnit(durationInMs,
- tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
- var energyInJ = model.device.powerSeries.getEnergyConsumedInJ(start, end);
- var powerInW = energyInJ / durationInS;
- return {duration: durationInMs, energy: energyInJ, power: powerInW};
- }
-
- // TODO(alexandermont): When LoadExpectation v1.0 is released,
- // update this function to use the new LoadExpectation rather
- // than calling loading_metric.html. If we set the end of the loading
- // RAIL stage to be the TTI, then we may not even need to treat the loading
- // events separately; we can just treat them like any other RAIL stage
- // (and the RAIL stage boundaries will be the intervals that we want.)
- /**
- * Returns the intervals of time between navigation event and time to
- * interactive.
- */
- function getNavigationTTIIntervals_(model) {
- var values = new tr.v.ValueSet();
- tr.metrics.sh.loadingMetric(values, model);
- var ttiValues = values.getValuesNamed('timeToFirstInteractive');
- var intervals = [];
- for (var bin of tr.b.getOnlyElement(ttiValues).allBins) {
- for (var diagnostics of bin.diagnosticMaps) {
- var breakdown = diagnostics.get('Navigation infos');
- intervals.push(tr.b.Range.fromExplicitRange(
- breakdown.value.start, breakdown.value.interactive));
- }
- }
- return intervals.sort((x, y) => x.min - y.min);
- }
-
- /**
- * Creates a histogram suitable for time data.
- */
- function makeTimeHistogram_(values, title, description) {
- var hist = new tr.v.Histogram(title + ':time',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter);
- hist.customizeSummaryOptions({
- avg: false,
- count: false,
- max: true,
- min: true,
- std: false,
- sum: true,
- });
- hist.description = 'Time spent in ' + description;
- values.addHistogram(hist);
- return hist;
- }
-
- /**
- * Creates a histogram suitable for energy data.
- */
- function makeEnergyHistogram_(values, title, description) {
- var hist = new tr.v.Histogram(title + ':energy',
- tr.b.Unit.byName.energyInJoules_smallerIsBetter);
- hist.customizeSummaryOptions({
- avg: false,
- count: false,
- max: true,
- min: true,
- std: false,
- sum: true,
- });
- hist.description = 'Energy consumed in ' + description;
- values.addHistogram(hist);
- return hist;
- }
-
- /**
- * Creates a histogram suitable for power data.
- */
- function makePowerHistogram_(values, title, description) {
- var hist = new tr.v.Histogram(title + ':power',
- tr.b.Unit.byName.powerInWatts_smallerIsBetter);
- hist.customizeSummaryOptions({
- avg: true,
- count: false,
- max: true,
- min: true,
- std: false,
- sum: false,
- });
- hist.description = 'Energy consumption rate in ' + description;
- values.addHistogram(hist);
- return hist;
- }
-
- /**
- * Stores the power data in data into the given histograms for time, energy,
- * and power. If a histogram is undefined then the corresponding type of
- * data is not stored.
- *
- * @param {!Object} data - Power data (obtained from getPowerData_)
- * @param {tr.v.Histogram} timeHist - Histogram to store time data.
- * @param {tr.v.Histogram} energyHist - Histogram to store energy data.
- * @param {tr.v.Histogram} powerHist - Histogram to store power data.
- */
- function storePowerData_(data, timeHist, energyHist, powerHist) {
- if (timeHist !== undefined)
- timeHist.addSample(data.duration);
- if (energyHist !== undefined)
- energyHist.addSample(data.energy);
- if (powerHist !== undefined)
- powerHist.addSample(data.power);
- }
-
- function createHistograms_(model, values) {
- var hists = {};
-
- // "Generic" RAIL stage metrics. These give time, energy, and power
- // for each RAIL stage, indexed by name. For instance, "Tap Animation"
- // is different from "Tap, Touch Animation". There is one histogram
- // for each RAIL stage name; if there are multiple RAIL stages with
- // the same name, these are different samples in the histogram.
- hists.railStageToTimeHist = new Map();
- hists.railStageToEnergyHist = new Map();
- hists.railStageToPowerHist = new Map();
-
- // Metrics for scrolling. A scroll stage is any stage with the
- // string "Scroll" in its name. For instance, "Scroll Response",
- // "Scroll Animation", and "Scroll, Touch Animation" are all
- // scroll stages. Histograms for scroll metrics contain one
- // sample for each scroll stage.
- hists.scrollTimeHist = makeTimeHistogram_(values, 'scroll','scrolling');
- hists.scrollEnergyHist = makeEnergyHistogram_(values, 'scroll','scrolling');
- hists.scrollPowerHist = makePowerHistogram_(values, 'scroll','scrolling');
-
- // Metrics for loading. Loading intervals are defined by the intervals
- // between navigation and TTI (time-to-interactive) given by
- // getNavigationTTIIntervals_. We also have a metric for the energy
- // consumed after load.
- hists.loadTimeHist = makeTimeHistogram_(values, 'load', 'page loads');
- hists.loadEnergyHist = makeEnergyHistogram_(values, 'load', 'page loads');
- hists.afterLoadTimeHist = makeTimeHistogram_(values, 'after_load',
- 'period after load');
- hists.afterLoadPowerHist = makePowerHistogram_(values, 'after_load',
- 'period after load');
-
- // Metrics for video. A video stage is any stage with the string "Video"
- // in its name. Histograms for video metrics contain one sample for each
- // video stage. Only power metrics are available for video stages.
- hists.videoPowerHist = makePowerHistogram_(values, 'video',
- 'video playback')
-
- // Frame based power metric.
- hists.frameEnergyHist = makeEnergyHistogram_(values, 'per_frame',
- 'each frame');
-
- for (var exp of model.userModel.expectations) {
- var currTitle = exp.title.toLowerCase().replace(' ', '_');
- // If we haven't seen a RAIL stage with this title before,
- // we have to create a new set of histograms for the "generic"
- // RAIL stage metrics.
- if (!hists.railStageToTimeHist.has(currTitle)) {
- var timeHist = makeTimeHistogram_(values, currTitle,
- 'RAIL stage ' + currTitle);
-
- var energyHist = makeEnergyHistogram_(values, currTitle,
- 'RAIL stage ' + currTitle);
-
- var powerHist = makePowerHistogram_(values, currTitle,
- 'RAIL stage ' + currTitle);
-
- hists.railStageToTimeHist.set(currTitle, timeHist);
- hists.railStageToEnergyHist.set(currTitle, energyHist);
- hists.railStageToPowerHist.set(currTitle, powerHist);
- }
- }
- return hists;
- }
-
- /**
- * Process a single interaction record (RAIL stage) for power metric
- * purposes. This function only keeps track of metrics that are based
- * on the start and end time of the RAIL stages.
- */
- function processInteractionRecord_(exp, model, hists) {
- var currTitle = exp.title.toLowerCase().replace(' ', '_');
- var data = getPowerData_(model, exp.start, exp.end);
-
- // Add the samples for the "generic" RAIL stage metrics.
- storePowerData_(data, hists.railStageToTimeHist.get(currTitle),
- hists.railStageToEnergyHist.get(currTitle),
- hists.railStageToPowerHist.get(currTitle));
-
- // If this is a scroll stage, add the sample for the scroll metrics.
- // TODO(alexandermont): Treat scroll responses different from
- // scroll animations?
- if (exp.initiatorType === tr.importer.INITIATOR_TYPE.SCROLL) {
- storePowerData_(data, hists.scrollTimeHist,
- hists.scrollEnergyHist, hists.scrollPowerHist);
- }
-
- // If this is a video stage, add the sample for the video metrics.
- if (exp.initiatorType === tr.importer.INITIATOR_TYPE.VIDEO)
- storePowerData_(data, undefined, undefined, hists.videoPowerHist)
- }
-
- /**
- * Compute the loading power metric from the model and put the results
- * in |hists|. Note that this is not in processInteractionRecord_ because
- * the loading metric intervals don't correspond exactly to the RAIL stages.
- */
- function computeLoadingMetric_(model, hists) {
- var intervals = getNavigationTTIIntervals_(model);
- var lastLoadTime = undefined;
- for (var interval of intervals) {
- var loadData = getPowerData_(model, interval.min, interval.max);
- storePowerData_(loadData, hists.loadTimeHist, hists.loadEnergyHist,
- undefined);
- lastLoadTime = (lastLoadTime === undefined ? interval.max :
- Math.max(lastLoadTime, interval.max));
- }
- if (lastLoadTime !== undefined) {
- var afterLoadData = getPowerData_(model, lastLoadTime, model.bounds.max);
- storePowerData_(afterLoadData, hists.afterLoadTimeHist,
- undefined, hists.afterLoadPowerHist);
- }
- }
-
- /**
- * Compute the per-frame power metrics and put the results in |hists|.
- */
- function computeFrameBasedPowerMetric_(model, hists) {
- model.device.powerSeries.updateBounds();
- var currentTime = model.device.powerSeries.bounds.min;
- while (currentTime < model.device.powerSeries.bounds.max) {
- var frameData = getPowerData_(model, currentTime, currentTime + FRAME_MS);
- hists.frameEnergyHist.addSample(frameData.energy);
- currentTime += FRAME_MS;
- }
- }
-
-
- function powerMetric(values, model) {
- if (!model.device.powerSeries)
- return;
-
- var hists = createHistograms_(model, values);
- for (var exp of model.userModel.expectations)
- processInteractionRecord_(exp, model, hists);
-
- // The following two metrics aren't based directly on the IR intervals,
- // and so need to be computed outside the processInteractionRecord_ loop.
- computeLoadingMetric_(model, hists);
- computeFrameBasedPowerMetric_(model, hists);
- }
-
- tr.metrics.MetricRegistry.register(powerMetric);
-
- return {
- powerMetric: powerMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric_test.html
deleted file mode 100644
index d89937a3bd7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/power_metric_test.html
+++ /dev/null
@@ -1,410 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/importer/find_input_expectations.html">
-<link rel="import" href="/tracing/metrics/system_health/power_metric.html">
-<link rel="import" href="/tracing/model/user_model/idle_expectation.html">
-<link rel="import" href="/tracing/model/user_model/load_expectation.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-function getMetricValueCount(values, name) {
- for (var value of values)
- if (value.name === name)
- return value.numValues;
-}
-
-function getMetricValueSum(values, name) {
- for (var value of values)
- if (value.name === name)
- return value.sum;
-}
-
-function getMetricValueAvg(values, name) {
- for (var value of values)
- if (value.name === name)
- return value.average;
-}
-
-tr.b.unittest.testSuite(function() {
- test('powerMetric_noPowerSeries', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- tr.metrics.sh.powerMetric(valueSet, model);
- assert.lengthOf(valueSet, 0);
- });
-
- test('powerMetric_generic_oneStageEachType', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 1000; i++) {
- model.device.powerSeries.addPowerSample(i.toString(), i.toString());
- }
- model.userModel.expectations.push(new tr.model.um.LoadExpectation(
- model, tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL, 0, 500));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 500, 500));
- tr.metrics.sh.powerMetric(valueSet, model);
-
- assert.equal(getMetricValueSum(valueSet,
- 'successful_load:time'), 500);
- assert.equal(getMetricValueSum(valueSet,
- 'idle:time'), 500);
- assert.closeTo(getMetricValueSum(valueSet,
- 'successful_load:energy'), 125, 0.5);
- assert.closeTo(getMetricValueSum(valueSet,
- 'idle:energy'), 375, 0.5);
- assert.closeTo(getMetricValueAvg(valueSet,
- 'successful_load:power'), 250, 0.5);
- assert.closeTo(getMetricValueAvg(valueSet,
- 'idle:power'), 750, 0.5);
- });
-
- test('powerMetric_generic_multipleStagesEachType', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 1000; i++) {
- model.device.powerSeries.addPowerSample(i.toString(), i.toString());
- }
- model.userModel.expectations.push(new tr.model.um.LoadExpectation(
- model, tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL, 0, 200));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 200, 300));
- model.userModel.expectations.push(new tr.model.um.LoadExpectation(
- model, tr.model.um.LOAD_SUBTYPE_NAMES.SUCCESSFUL, 500, 200));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 700, 300));
- tr.metrics.sh.powerMetric(valueSet, model);
-
- assert.equal(getMetricValueSum(valueSet,
- 'successful_load:time'), 400);
- assert.equal(getMetricValueSum(valueSet,
- 'idle:time'), 600);
- assert.closeTo(getMetricValueSum(valueSet,
- 'successful_load:energy'), 140, 0.5);
- assert.closeTo(getMetricValueSum(valueSet,
- 'idle:energy'), 360, 0.5);
- assert.closeTo(getMetricValueAvg(valueSet,
- 'successful_load:power'), 350, 0.5);
- assert.closeTo(getMetricValueAvg(valueSet,
- 'idle:power'), 600, 0.5);
- });
-
- test('powerMetric_loading_oneInterval', function() {
- // Interval of load is [200, 15400].
- // Trace goes until 22150.
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1984);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 9180,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'loading',
- title: 'firstMeaningfulPaintCandidate',
- start: 9200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 9350,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 11150,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 12550,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 14950,
- duration: 500,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 22150,
- duration: 10,
- }));
-
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 15400; i++)
- model.device.powerSeries.addPowerSample(i.toString(), '20');
- for (var i = 15401; i <= 22160; i++)
- model.device.powerSeries.addPowerSample(i.toString(), '10');
- });
-
- var valueSet = new tr.v.ValueSet();
- tr.metrics.sh.powerMetric(valueSet, model);
- // Energy for first load is 20 W * 15.2 s
- // (interval from 0.2 s to 15.4 s)
- assert.closeTo(
- getMetricValueAvg(valueSet, 'load:energy'), 304, 0.1);
- assert.closeTo(
- getMetricValueAvg(valueSet, 'load:time'), 15200, 0.1);
- assert.closeTo(
- getMetricValueAvg(valueSet, 'after_load:power'), 10, 0.01);
- assert.closeTo(
- getMetricValueAvg(valueSet, 'after_load:time'), 6760, 0.1);
- });
-
- test('powerMetric_loading_noMeaningfulPaint', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(1984);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink.user_timing',
- title: 'navigationStart',
- start: 200,
- duration: 0.0,
- args: {frame: '0xdeadbeef'}
- }));
- rendererProcess.objects.addSnapshot('ptr', 'loading', 'FrameLoader', 300,
- {isLoadingMainFrame: true, frame: {id_ref: '0xdeadbeef'},
- documentLoaderURL: 'http://example.com'});
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 9350,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 11150,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 12550,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 14950,
- duration: 500,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'toplevel',
- title: 'TaskQueueManager::ProcessTaskFromWorkQueue',
- start: 22150,
- duration: 10,
- }));
-
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 15400; i++)
- model.device.powerSeries.addPowerSample(i.toString(), '20');
- for (var i = 15401; i <= 22160; i++)
- model.device.powerSeries.addPowerSample(i.toString(), '10');
- });
-
- var valueSet = new tr.v.ValueSet();
- tr.metrics.sh.powerMetric(valueSet, model);
- // Energy for first load is 20 W * 15.2 s
- // (interval from 0.2 s to 15.4 s)
- assert.equal(getMetricValueCount(valueSet, 'after_load:power'), 0);
- });
-
- test('powerMetric_scroll_oneStageEachType', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 1000; i++) {
- model.device.powerSeries.addPowerSample(i.toString(), i.toString());
- }
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, tr.importer.INITIATOR_TYPE.SCROLL, 0, 500));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 500, 500));
- tr.metrics.sh.powerMetric(valueSet, model);
-
- assert.equal(getMetricValueSum(valueSet,
- 'scroll:time'), 500);
- assert.closeTo(getMetricValueSum(valueSet,
- 'scroll:energy'), 125, 0.5);
- assert.closeTo(getMetricValueAvg(valueSet,
- 'scroll:power'), 250, 0.5);
- });
-
- test('powerMetric_scroll_multipleStagesEachType', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 1000; i++) {
- model.device.powerSeries.addPowerSample(i.toString(), i.toString());
- }
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, tr.importer.INITIATOR_TYPE.SCROLL, 0, 200));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 200, 300));
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, tr.importer.INITIATOR_TYPE.SCROLL, 500, 200));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 700, 300));
- tr.metrics.sh.powerMetric(valueSet, model);
-
- assert.equal(getMetricValueSum(valueSet,
- 'scroll:time'), 400);
- assert.closeTo(getMetricValueSum(valueSet,
- 'scroll:energy'), 140, 0.5);
- assert.closeTo(getMetricValueAvg(valueSet,
- 'scroll:power'), 350, 0.5);
- });
-
- test('powerMetric_frameBased_multipleFrames', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, "Video", 1, 70));
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- // We want values in different frames, so they must go up by more than 16.66
- // milliseconds.
- model.device.powerSeries.addPowerSample('1', '.1');
- model.device.powerSeries.addPowerSample('2', '.1');
- model.device.powerSeries.addPowerSample('18', '.2');
- model.device.powerSeries.addPowerSample('36', '.3');
- model.device.powerSeries.addPowerSample('53', '.4');
- model.device.powerSeries.addPowerSample('70', '.5');
- tr.metrics.sh.powerMetric(valueSet, model);
- assert.closeTo(getMetricValueAvg(valueSet, 'per_frame:energy'),
- 0.00344, 1e-4)
- assert.closeTo(getMetricValueSum(valueSet, 'per_frame:energy'),
- 0.0172, 1e-4)
- });
-
- test('powerMetric_frameBased_oneFrame', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, "Video", 1, 6));
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- // We want values in the same frame, so they must go up by less than 16.66
- // milliseconds.
- model.device.powerSeries.addPowerSample('1', '.1');
- model.device.powerSeries.addPowerSample('2', '.1');
- model.device.powerSeries.addPowerSample('3', '.2');
- model.device.powerSeries.addPowerSample('4', '.3');
- model.device.powerSeries.addPowerSample('5', '.4');
- model.device.powerSeries.addPowerSample('6', '.5');
- tr.metrics.sh.powerMetric(valueSet, model);
- assert.closeTo(getMetricValueAvg(valueSet, 'per_frame:energy'),
- 0.0011, 1e-4)
- assert.closeTo(getMetricValueSum(valueSet, 'per_frame:energy'),
- 0.0011, 1e-4)
- });
-
- test('powerMetric_video_oneStageEachType', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain';
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 1000; i++) {
- model.device.powerSeries.addPowerSample(i.toString(), i.toString());
- }
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, "Video", 0, 500));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 500, 500));
- tr.metrics.sh.powerMetric(valueSet, model);
-
- assert.closeTo(getMetricValueAvg(valueSet, 'video:power'), 250, 0.5);
- });
-
- test('powerMetric_video_multipleStagesEachType', function() {
- var model = new tr.Model();
- var valueSet = new tr.v.ValueSet();
- var rendererProcess = model.getOrCreateProcess(1234);
- var mainThread = rendererProcess.getOrCreateThread(1);
- mainThread.name = 'CrRendererMain'
- model.device.powerSeries = new tr.model.PowerSeries(model.device);
- for (var i = 0; i <= 1000; i++) {
- model.device.powerSeries.addPowerSample(i.toString(), i.toString());
- }
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, tr.importer.INITIATOR_TYPE.VIDEO, 0, 200));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 200, 300));
- model.userModel.expectations.push(new tr.model.um.AnimationExpectation(
- model, tr.importer.INITIATOR_TYPE.VIDEO, 500, 200));
- model.userModel.expectations.push(new tr.model.um.IdleExpectation(
- model, 700, 300));
- tr.metrics.sh.powerMetric(valueSet, model);
-
- assert.closeTo(getMetricValueAvg(valueSet, 'video:power'), 350, 0.5);
- });
-
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric.html
deleted file mode 100644
index a8d08820aff..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric.html
+++ /dev/null
@@ -1,153 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/utils.html">
-<link rel="import" href="/tracing/model/user_model/animation_expectation.html">
-<link rel="import" href="/tracing/model/user_model/load_expectation.html">
-<link rel="import" href="/tracing/model/user_model/response_expectation.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- // In the case of Response, Load, and DiscreteAnimation IRs, Responsiveness is
- // derived from the time between when the user thinks they begin an interation
- // (expectedStart) and the time when the screen first changes to reflect the
- // interaction (actualEnd). There may be a delay between expectedStart and
- // when chrome first starts processing the interaction (actualStart) if the
- // main thread is busy. The user doesn't know when actualStart is, they only
- // know when expectedStart is. User responsiveness, by definition, considers
- // only what the user experiences, so "duration" is defined as actualEnd -
- // expectedStart.
-
- function computeAnimationThroughput(animationExpectation) {
- if (animationExpectation.frameEvents === undefined ||
- animationExpectation.frameEvents.length === 0)
- throw new Error('Animation missing frameEvents ' +
- animationExpectation.stableId);
-
- var durationInS = tr.b.convertUnit(animationExpectation.duration,
- tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
- return animationExpectation.frameEvents.length / durationInS;
- }
-
- function computeAnimationframeTimeDiscrepancy(animationExpectation) {
- if (animationExpectation.frameEvents === undefined ||
- animationExpectation.frameEvents.length === 0)
- throw new Error('Animation missing frameEvents ' +
- animationExpectation.stableId);
-
- var frameTimestamps = animationExpectation.frameEvents;
- frameTimestamps = frameTimestamps.toArray().map(function(event) {
- return event.start;
- });
-
- var absolute = true;
- return tr.b.Statistics.timestampsDiscrepancy(frameTimestamps, absolute);
- }
-
- /**
- * @param {!tr.v.ValueSet} values
- * @param {!tr.model.Model} model
- * @param {!Object=} opt_options
- */
- function responsivenessMetric(values, model, opt_options) {
- var responseNumeric = new tr.v.Histogram('response latency',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createLinear(100, 1e3, 50));
- var throughputNumeric = new tr.v.Histogram('animation throughput',
- tr.b.Unit.byName.unitlessNumber_biggerIsBetter,
- tr.v.HistogramBinBoundaries.createLinear(10, 60, 10));
- var frameTimeDiscrepancyNumeric = new tr.v.Histogram(
- 'animation frameTimeDiscrepancy',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createLinear(0, 1e3, 50).
- addExponentialBins(1e4, 10));
- var latencyNumeric = new tr.v.Histogram('animation latency',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createLinear(0, 300, 60));
-
- model.userModel.expectations.forEach(function(ue) {
- if (opt_options && opt_options.rangeOfInterest &&
- !opt_options.rangeOfInterest.intersectsExplicitRangeInclusive(
- ue.start, ue.end))
- return;
-
- var sampleDiagnosticMap = tr.v.d.DiagnosticMap.fromObject(
- {relatedEvents: new tr.v.d.RelatedEventSet([ue])});
-
- // Responsiveness is not defined for Idle or Startup expectations.
- if (ue instanceof tr.model.um.IdleExpectation) {
- return;
- } else if (ue instanceof tr.model.um.StartupExpectation) {
- return;
- } else if (ue instanceof tr.model.um.LoadExpectation) {
- // This is already covered by loadingMetric.
- } else if (ue instanceof tr.model.um.ResponseExpectation) {
- responseNumeric.addSample(ue.duration, sampleDiagnosticMap);
- } else if (ue instanceof tr.model.um.AnimationExpectation) {
- if (ue.frameEvents === undefined || ue.frameEvents.length === 0) {
- // Ignore animation stages that do not have associated frames:
- // https://github.com/catapult-project/catapult/issues/2446
- return;
- }
- var throughput = computeAnimationThroughput(ue);
- if (throughput === undefined)
- throw new Error('Missing throughput for ' +
- ue.stableId);
-
- throughputNumeric.addSample(throughput, sampleDiagnosticMap);
-
- var frameTimeDiscrepancy = computeAnimationframeTimeDiscrepancy(ue);
- if (frameTimeDiscrepancy === undefined)
- throw new Error('Missing frameTimeDiscrepancy for ' +
- ue.stableId);
-
- frameTimeDiscrepancyNumeric.addSample(
- frameTimeDiscrepancy, sampleDiagnosticMap);
-
- ue.associatedEvents.forEach(function(event) {
- if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice))
- return;
-
- latencyNumeric.addSample(event.duration, sampleDiagnosticMap);
- });
- } else {
- throw new Error('Unrecognized stage for ' + ue.stableId);
- }
- });
-
- [
- responseNumeric, throughputNumeric, frameTimeDiscrepancyNumeric,
- latencyNumeric
- ].forEach(function(numeric) {
- numeric.customizeSummaryOptions({
- avg: true,
- max: true,
- min: true,
- std: true
- });
- });
-
- values.addHistogram(responseNumeric);
- values.addHistogram(throughputNumeric);
- values.addHistogram(frameTimeDiscrepancyNumeric);
- values.addHistogram(latencyNumeric);
- }
-
- tr.metrics.MetricRegistry.register(responsivenessMetric, {
- supportsRangeOfInterest: true
- });
-
- return {
- responsivenessMetric: responsivenessMetric,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric_test.html
deleted file mode 100644
index ed2d3341805..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/responsiveness_metric_test.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/system_health/responsiveness_metric.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createModel(collectionOfFrameTimestamps) {
- var opts = {
- customizeModelCallback: function(model) {
- var thread = tr.c.TestUtils.newFakeThread();
- collectionOfFrameTimestamps.forEach(function(frameTimestamps) {
- frameTimestamps.sort((a, b) => a - b);
- var ue = new tr.model.um.AnimationExpectation(
- model, 'test', frameTimestamps[0],
- frameTimestamps[frameTimestamps.length - 1]);
- var group = new tr.model.SliceGroup(thread);
- frameTimestamps.forEach(function(time) {
- group.pushSlice(tr.c.TestUtils.newSliceEx({
- title: tr.model.helpers.IMPL_RENDERING_STATS,
- start: time,
- end: time,
- cpuStart: time,
- cpuEnd: time
- }));
- });
- group.createSubSlices();
- group.slices.forEach(function(slice) {
- ue.associatedEvents.push(slice);
- });
- model.userModel.expectations.push(ue);
- model.userModel.expectations.push(
- new tr.model.um.StartupExpectation(model, 0, 1));
- model.userModel.expectations.push(
- new tr.model.um.ResponseExpectation(model, 'test', 1, 1));
- });
- }
- };
- return tr.c.TestUtils.newModelWithEvents([], opts);
- }
-
- test('animationThroughputNoFrames', function() {
- var model = createModel([[]]);
- var valueList = new tr.v.ValueSet();
- tr.metrics.sh.responsivenessMetric(valueList, model);
- var value = tr.b.getOnlyElement(valueList.getValuesNamed(
- 'animation throughput'));
- assert.strictEqual(value.numValues, 0);
- });
-
- test('animationThroughputFramesAndNoFrames', function() {
- var model = createModel([[0, 100], []]);
- var valueList = new tr.v.ValueSet();
- tr.metrics.sh.responsivenessMetric(valueList, model);
- var value = tr.b.getOnlyElement(valueList.getValuesNamed(
- 'animation throughput'));
- assert.strictEqual(value.average, 20);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/system_health_metrics.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/system_health_metrics.html
deleted file mode 100644
index dfc2364a457..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/system_health_metrics.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/system_health/cpu_time_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/hazard_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/long_tasks_metric.html">
-<link rel="import" href="/tracing/metrics/system_health/power_metric.html"
-<link rel="import"
- href="/tracing/metrics/system_health/responsiveness_metric.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- function systemHealthMetrics(values, model) {
- tr.metrics.sh.responsivenessMetric(values, model);
- tr.metrics.sh.longTasksMetric(values, model);
- tr.metrics.sh.hazardMetric(values, model);
- tr.metrics.sh.powerMetric(values, model);
- tr.metrics.sh.cpuTimeMetric(values, model);
- }
-
- tr.metrics.MetricRegistry.register(systemHealthMetrics);
-
- return {
- systemHealthMetrics: systemHealthMetrics
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/utils.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/utils.html
deleted file mode 100644
index 64c8b8b4f49..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/utils.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- // Returns a weight for this score.
- // score should be a number between 0 and 1 inclusive.
- // This function is expected to be passed to tr.b.Statistics.weightedMean as
- // its weightCallback.
- function perceptualBlend(ir, index, score) {
- // Lower scores are exponentially more important than higher scores
- // due to the Peak-end rule.
- // Other than that general rule, there is no specific reasoning behind this
- // specific formula -- it is fairly arbitrary.
- return Math.exp(1 - score);
- }
-
- function filterExpectationsByRange(irs, opt_range) {
- var filteredExpectations = [];
- irs.forEach(function(ir) {
- if (!(ir instanceof tr.model.um.UserExpectation))
- return;
-
- if (!opt_range ||
- opt_range.intersectsExplicitRangeInclusive(ir.start, ir.end))
- filteredExpectations.push(ir);
- });
- return filteredExpectations;
- }
-
- return {
- perceptualBlend: perceptualBlend,
- filterExpectationsByRange: filterExpectationsByRange
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric.html
deleted file mode 100644
index 7d47baf0d9c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/utils.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.sh', function() {
- function webviewStartupMetric(values, model) {
- var startupWallHist = new tr.v.Histogram('webview_startup_wall_time',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter);
- startupWallHist.description = 'WebView startup wall time';
- var startupCPUHist = new tr.v.Histogram('webview_startup_cpu_time',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter);
- startupCPUHist.description = 'WebView startup CPU time';
- var loadWallHist = new tr.v.Histogram('webview_url_load_wall_time',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter);
- loadWallHist.description = 'WebView blank URL load wall time';
- var loadCPUHist = new tr.v.Histogram('webview_url_load_cpu_time',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter);
- loadCPUHist.description = 'WebView blank URL load CPU time';
-
- // TODO(alexandermont): Only iterate over the processes and threads that
- // could contain these events.
- for (var slice of model.getDescendantEvents()) {
- if (!(slice instanceof tr.model.ThreadSlice))
- continue;
-
- // WebViewStartupInterval is the title of the section of code that is
- // entered (via android.os.Trace.beginSection) when WebView is started
- // up. This value is defined in TelemetryActivity.java.
- if (slice.title === 'WebViewStartupInterval') {
- startupWallHist.addSample(slice.duration);
- startupCPUHist.addSample(slice.cpuDuration);
- }
-
- // WebViewBlankUrlLoadInterval is the title of the section of code
- // that is entered (via android.os.Trace.beginSection) when WebView
- // is started up. This value is defined in TelemetryActivity.java.
- if (slice.title === 'WebViewBlankUrlLoadInterval') {
- loadWallHist.addSample(slice.duration);
- loadCPUHist.addSample(slice.cpuDuration);
- }
- }
-
- values.addHistogram(startupWallHist);
- values.addHistogram(startupCPUHist);
- values.addHistogram(loadWallHist);
- values.addHistogram(loadCPUHist);
- }
-
- tr.metrics.MetricRegistry.register(webviewStartupMetric);
-
- return {
- webviewStartupMetric: webviewStartupMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric_test.html
deleted file mode 100644
index ace1b317e03..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/system_health/webview_startup_metric_test.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/system_health/webview_startup_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-function makeTestModel() {
- return tr.c.TestUtils.newModel(function(model) {
- var mainThread = model.getOrCreateProcess(1).getOrCreateThread(2);
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'webview',
- title: 'WebViewStartupInterval',
- start: 200,
- duration: 42.0,
- cpuStart: 150,
- cpuDuration: 32.0
- }));
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'webview',
- title: 'WebViewBlankUrlLoadInterval',
- start: 250,
- duration: 27.0,
- cpuStart: 190,
- cpuDuration: 17.0
- }));
- });
-}
-
-tr.b.unittest.testSuite(function() {
- test('webviewStartupMetric', function() {
- var values = new tr.v.ValueSet();
- tr.metrics.sh.webviewStartupMetric(values, makeTestModel());
- assert.closeTo(42, values.getValuesNamed(
- 'webview_startup_wall_time')[0].average, 1e-2);
- assert.closeTo(32, values.getValuesNamed(
- 'webview_startup_cpu_time')[0].average, 1e-2);
- assert.closeTo(27, values.getValuesNamed(
- 'webview_url_load_wall_time')[0].average, 1e-2);
- assert.closeTo(17, values.getValuesNamed(
- 'webview_url_load_cpu_time')[0].average, 1e-2);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
deleted file mode 100644
index c028524b339..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric.html
+++ /dev/null
@@ -1,203 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics', function() {
- var MEMORY_INFRA_TRACING_CATEGORY = 'disabled-by-default-memory-infra';
-
- var TIME_BOUNDARIES = tr.v.HistogramBinBoundaries.createExponential(
- 1e-3, 1e5, 30);
-
- var BYTE_BOUNDARIES = tr.v.HistogramBinBoundaries.createExponential(
- 1, 1e9, 30);
-
- var COUNT_BOUNDARIES = tr.v.HistogramBinBoundaries.createExponential(
- 1, 1e5, 30);
-
- function addTimeDurationValue(valueName, duration, allValues) {
- var hist = new tr.v.Histogram(valueName,
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TIME_BOUNDARIES);
- hist.addSample(duration);
- allValues.addHistogram(hist);
- }
-
- // Adds values specific to memory-infra dumps.
- function addMemoryInfraValues(values, model, categoryNamesToTotalEventSizes) {
- var memoryDumpCount = model.globalMemoryDumps.length;
- if (memoryDumpCount === 0)
- return;
-
- var totalOverhead = 0;
- var nonMemoryInfraThreadOverhead = 0;
- var overheadByProvider = {};
- tr.b.iterItems(model.processes, function(pid, process) {
- tr.b.iterItems(process.threads, function(tid, thread) {
- tr.b.iterItems(thread.sliceGroup.slices, (unusedSliceId, slice) => {
- if (slice.category !== MEMORY_INFRA_TRACING_CATEGORY)
- return;
- totalOverhead += slice.duration;
- if (thread.name !== 'MemoryInfra')
- nonMemoryInfraThreadOverhead += slice.duration;
- if (slice.args && slice.args['dump_provider.name']) {
- var providerName = slice.args['dump_provider.name'];
- var durationAndCount = overheadByProvider[providerName];
- if (durationAndCount === undefined) {
- overheadByProvider[providerName] = durationAndCount =
- {duration: 0, count: 0};
- }
- durationAndCount.duration += slice.duration;
- durationAndCount.count++;
- }
- });
- });
- });
-
- addTimeDurationValue(
- 'Average CPU overhead on all threads per memory-infra dump',
- totalOverhead / memoryDumpCount, values);
- addTimeDurationValue(
- 'Average CPU overhead on non-memory-infra threads per memory-infra ' +
- 'dump',
- nonMemoryInfraThreadOverhead / memoryDumpCount, values);
- tr.b.iterItems(overheadByProvider, function(providerName, overhead) {
- addTimeDurationValue(
- 'Average CPU overhead of ' + providerName + ' per OnMemoryDump call',
- overhead.duration / overhead.count, values);
- });
-
- var memoryInfraEventsSize =
- categoryNamesToTotalEventSizes.get(MEMORY_INFRA_TRACING_CATEGORY);
- var memoryInfraTraceBytesValue = new tr.v.Histogram(
- 'Total trace size of memory-infra dumps in bytes',
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
- memoryInfraTraceBytesValue.addSample(memoryInfraEventsSize);
- values.addHistogram(memoryInfraTraceBytesValue);
-
- var traceBytesPerDumpValue = new tr.v.Histogram(
- 'Average trace size of memory-infra dumps in bytes',
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
- traceBytesPerDumpValue.addSample(memoryInfraEventsSize / memoryDumpCount);
- values.addHistogram(traceBytesPerDumpValue);
- }
-
- function tracingMetric(values, model) {
- if (!model.stats.hasEventSizesinBytes) {
- throw new Error('Model stats does not have event size information. ' +
- 'Please enable ImportOptions.trackDetailedModelStats.');
- }
-
- var eventStats = model.stats.allTraceEventStatsInTimeIntervals;
- eventStats.sort(function(a, b) {
- return a.timeInterval - b.timeInterval;
- });
-
- var totalTraceBytes = eventStats.reduce((a, b) =>
- (a + b.totalEventSizeinBytes), 0);
-
- // We maintain a sliding window of records [start ... end-1] where end
- // increments each time through the loop, and we move start just far enough
- // to keep the window less than 1 second wide. Note that we need to compute
- // the number of time intervals (i.e. units that timeInterval is given in)
- // in one second to know how wide the sliding window should be.
- var maxEventCountPerSec = 0;
- var maxEventBytesPerSec = 0;
- var INTERVALS_PER_SEC = Math.floor(
- 1000 / model.stats.TIME_INTERVAL_SIZE_IN_MS);
-
- var runningEventNumPerSec = 0;
- var runningEventBytesPerSec = 0;
- var start = 0;
- var end = 0;
-
- while (end < eventStats.length) {
- // Slide the end marker forward. Moving the end marker from N
- // to N+1 adds eventStats[N] to the sliding window.
- runningEventNumPerSec += eventStats[end].numEvents;
- runningEventBytesPerSec += eventStats[end].totalEventSizeinBytes;
- end++;
-
- // Slide the start marker forward so that the time interval covered
- // by the window is less than 1 second wide.
- while ((eventStats[end - 1].timeInterval -
- eventStats[start].timeInterval) >= INTERVALS_PER_SEC) {
- runningEventNumPerSec -= eventStats[start].numEvents;
- runningEventBytesPerSec -= eventStats[start].totalEventSizeinBytes;
- start++;
- }
-
- // Update maximum values.
- maxEventCountPerSec = Math.max(maxEventCountPerSec,
- runningEventNumPerSec);
- maxEventBytesPerSec = Math.max(maxEventBytesPerSec,
- runningEventBytesPerSec);
-
- }
-
- var stats = model.stats.allTraceEventStats;
- var categoryNamesToTotalEventSizes = (
- stats.reduce((map, stat) => (
- map.set(stat.category,
- ((map.get(stat.category) || 0) +
- stat.totalEventSizeinBytes))), new Map()));
-
- // Determine the category with the highest total event size.
- var maxCatNameAndBytes = Array.from(
- categoryNamesToTotalEventSizes.entries()).reduce(
- (a, b) => (b[1] >= a[1]) ? b : a);
- var maxEventBytesPerCategory = maxCatNameAndBytes[1];
- var categoryWithMaxEventBytes = maxCatNameAndBytes[0];
-
- var maxEventCountPerSecValue = new tr.v.Histogram(
- 'Max number of events per second',
- tr.b.Unit.byName.count_smallerIsBetter, COUNT_BOUNDARIES);
- maxEventCountPerSecValue.addSample(maxEventCountPerSec);
-
- var maxEventBytesPerSecValue = new tr.v.Histogram(
- 'Max event size in bytes per second',
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
- maxEventBytesPerSecValue.addSample(maxEventBytesPerSec);
-
- var totalTraceBytesValue = new tr.v.Histogram('Total trace size in bytes',
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, BYTE_BOUNDARIES);
- totalTraceBytesValue.addSample(totalTraceBytes);
-
- var biggestCategory = {
- name: categoryWithMaxEventBytes,
- size_in_bytes: maxEventBytesPerCategory
- };
-
- totalTraceBytesValue.diagnostics.set(
- 'category_with_max_event_size', new tr.v.d.Generic(biggestCategory));
- values.addHistogram(totalTraceBytesValue);
-
- maxEventCountPerSecValue.diagnostics.set(
- 'category_with_max_event_size', new tr.v.d.Generic(biggestCategory));
- values.addHistogram(maxEventCountPerSecValue);
-
- maxEventBytesPerSecValue.diagnostics.set(
- 'category_with_max_event_size', new tr.v.d.Generic(biggestCategory));
- values.addHistogram(maxEventBytesPerSecValue);
-
- addMemoryInfraValues(values, model, categoryNamesToTotalEventSizes);
- }
-
- tr.metrics.MetricRegistry.register(tracingMetric);
-
- return {
- tracingMetric: tracingMetric,
- // For testing only:
- MEMORY_INFRA_TRACING_CATEGORY: MEMORY_INFRA_TRACING_CATEGORY
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric_test.html
deleted file mode 100644
index 2f123162dab..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/tracing_metric_test.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/tracing_metric.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function makeModel(events, opt_track) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- trackDetailedModelStats: opt_track
- });
- }
-
- function getEventStringSize(events, indices) {
- return indices.reduce(function(sum, index) {
- return sum + JSON.stringify(events[index]).length;
- }, 0);
- }
-
- function checkDurationValue(allValues, metricName, expected) {
- var value = tr.b.getOnlyElement(allValues.getValuesNamed(metricName));
- assert.closeTo(1000 * value.average, expected, 0.1);
- }
-
- test('hasEventSizesInBytes', function() {
- var allValues = new tr.v.ValueSet();
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'}
- ];
-
- var model = makeModel(JSON.stringify(events), false);
- assert.isFalse(model.importOptions.trackDetailedModelStats);
- assert.throws(function() {
- tr.metrics.tracingMetric(allValues, model);
- }, 'Please enable ImportOptions.trackDetailedModelStats.');
-
- model = makeModel(JSON.stringify(events), true);
- assert.isTrue(model.importOptions.trackDetailedModelStats);
- tr.metrics.tracingMetric(allValues, model);
- });
-
- test('totalTraceSize', function() {
- var allValues = new tr.v.ValueSet();
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'}
- ];
- var model = makeModel(JSON.stringify(events), true);
- tr.metrics.tracingMetric(allValues, model);
-
- var eventStringSize = getEventStringSize(events, [0, 1]);
- var value = tr.b.getOnlyElement(allValues.getValuesNamed(
- 'Total trace size in bytes'));
- assert.strictEqual(value.average, eventStringSize);
- });
-
- test('maxValuePerSec', function() {
- var ONE_SEC_IN_US = 1000000;
- var events = [
- {name: 'a', pid: 52, ts: 1, cat: 'foo', ph: 'B'},
- {name: 'a', pid: 52, ts: ONE_SEC_IN_US + 1, cat: 'foo', ph: 'B'},
- {name: 'a', pid: 52, ts: 2 * ONE_SEC_IN_US + 1, cat: 'foo', ph: 'B'},
- {name: 'a', pid: 52, ts: 2 * ONE_SEC_IN_US + 3, cat: 'foo', ph: 'B'},
- {name: 'a', pid: 52, ts: ONE_SEC_IN_US + 2, cat: 'foo', ph: 'B'},
- {name: 'a', pid: 52, ts: 2 * ONE_SEC_IN_US + 2, cat: 'foo', ph: 'B'}
- ];
- var model = makeModel(JSON.stringify(events), true);
- var allValues = new tr.v.ValueSet();
- tr.metrics.tracingMetric(allValues, model);
-
- var maxEventCountPerSec = 3;
- var value = tr.b.getOnlyElement(allValues.getValuesNamed(
- 'Max number of events per second'));
- assert.strictEqual(value.average, maxEventCountPerSec);
-
- var maxEventBytesPerSec = getEventStringSize(events, [2, 3, 5]);
- value = tr.b.getOnlyElement(allValues.getValuesNamed(
- 'Max event size in bytes per second'));
- assert.strictEqual(value.average, maxEventBytesPerSec);
- });
-
- test('diagnostics', function() {
- var allValues = new tr.v.ValueSet();
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 524, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 535, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'bb', args: {}, pid: 52, ts: 546, cat: 'bar', tid: 53, ph: 'E'},
- {name: 'a', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'bb', args: {}, pid: 52, ts: 578, cat: 'bar', tid: 53, ph: 'E'}
- ];
- var model = makeModel(JSON.stringify(events), true);
- tr.metrics.tracingMetric(allValues, model);
-
- for (var value of allValues) {
- var d = value.diagnostics.get('category_with_max_event_size').value;
- assert.strictEqual(d.name, 'foo');
- assert.strictEqual(d.size_in_bytes, getEventStringSize(
- events, [0, 1, 3]));
- }
- });
-
- test('testMemoryInfraTracingMetrics', function() {
- var MEMORY_INFRA_TRACING_CATEGORY =
- tr.metrics.MEMORY_INFRA_TRACING_CATEGORY;
- var allValues = new tr.v.ValueSet();
- var events = [
- {name: 'OnMemoryDump', pid: 1, ts: 510, tid: 1, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp1'}, dur: 4}, // @suppress longLineCheck
- {name: 'OnMemoryDump', pid: 1, ts: 520, tid: 7, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp2'}, dur: 15}, // @suppress longLineCheck
- {name: 'OnMemoryDump', pid: 1, ts: 530, tid: 7, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp3'}, dur: 5}, // @suppress longLineCheck
- {name: 'OnMemoryDump', pid: 2, ts: 510, tid: 2, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp1'}, dur: 9}, // @suppress longLineCheck
- {name: 'OnMemoryDump', pid: 2, ts: 520, tid: 8, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp2'}, dur: 17}, // @suppress longLineCheck
- {name: 'OnMemoryDump', pid: 2, ts: 530, tid: 8, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp3'}, dur: 7}, // @suppress longLineCheck
- {name: 'OnMemoryDump', pid: 2, ts: 540, tid: 3, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {'dump_provider.name': 'mdp4'}, dur: 8}, // @suppress longLineCheck
- {name: 'ProcessDumps', pid: 1, ts: 550, tid: 1, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {guid: 4}, dur: 8}, // @suppress longLineCheck
- {name: 'ProcessDumps', pid: 2, ts: 540, tid: 2, ph: 'X', cat: MEMORY_INFRA_TRACING_CATEGORY, args: {guid: 4}, dur: 18}, // @suppress longLineCheck
- {name: 'thread_name', pid: 1, ts: 0, tid: 1, ph: 'M', cat: '__metadata', args: {name: 'CrBrowsermain'}}, // @suppress longLineCheck
- {name: 'thread_name', pid: 1, ts: 0, tid: 7, ph: 'M', cat: '__metadata', args: {name: 'MemoryInfra'}}, // @suppress longLineCheck
- {name: 'thread_name', pid: 2, ts: 0, tid: 2, ph: 'M', cat: '__metadata', args: {name: 'CrRendererMain'}}, // @suppress longLineCheck
- {name: 'thread_name', pid: 2, ts: 0, tid: 8, ph: 'M', cat: '__metadata', args: {name: 'MemoryInfra'}}, // @suppress longLineCheck
- {name: 'thread_name', pid: 2, ts: 0, tid: 3, ph: 'M', cat: '__metadata', args: {name: 'Compositor'}} // @suppress longLineCheck
- ];
-
- var model = makeModel(JSON.stringify(events), true);
- tr.model.MemoryDumpTestUtils.addGlobalMemoryDump(model, {ts: 550});
- tr.metrics.tracingMetric(allValues, model);
-
- var memoryCategorySize = events.filter(
- slice => slice['cat'] === MEMORY_INFRA_TRACING_CATEGORY).reduce(
- (acc, slice) => acc + JSON.stringify(slice).length, 0);
- var totalSizeValue = tr.b.getOnlyElement(allValues.getValuesNamed(
- 'Total trace size of memory-infra dumps in bytes'));
- assert.strictEqual(totalSizeValue.average, memoryCategorySize);
- var sizePerDumpValue = tr.b.getOnlyElement(allValues.getValuesNamed(
- 'Average trace size of memory-infra dumps in bytes'));
- assert.strictEqual(sizePerDumpValue.average, memoryCategorySize);
-
- checkDurationValue(allValues,
- 'Average CPU overhead of mdp1 per OnMemoryDump call', 6.5);
- checkDurationValue(allValues,
- 'Average CPU overhead of mdp2 per OnMemoryDump call', 16);
- checkDurationValue(allValues,
- 'Average CPU overhead of mdp3 per OnMemoryDump call', 6);
- checkDurationValue(allValues,
- 'Average CPU overhead of mdp4 per OnMemoryDump call', 8);
- checkDurationValue(allValues,
- 'Average CPU overhead on non-memory-infra threads per memory-infra ' +
- 'dump',
- 47);
- checkDurationValue(allValues,
- 'Average CPU overhead on all threads per memory-infra dump', 91);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric.html
deleted file mode 100644
index 37a0f2f8f99..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.v8', function() {
- var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(4, 200, 100);
-
- function computeExecuteMetrics(values, model) {
- var cpuTotalExecution = new tr.v.Histogram('v8_execution_cpu_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuTotalExecution.description = 'cpu total time spent in script execution';
- var wallTotalExecution = new tr.v.Histogram('v8_execution_wall_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallTotalExecution.description =
- 'wall total time spent in script execution';
- var cpuSelfExecution = new tr.v.Histogram('v8_execution_cpu_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuSelfExecution.description = 'cpu self time spent in script execution';
- var wallSelfExecution = new tr.v.Histogram('v8_execution_wall_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallSelfExecution.description = 'wall self time spent in script execution';
-
- for (var e of model.findTopmostSlicesNamed('V8.Execute')) {
- cpuTotalExecution.addSample(e.cpuDuration);
- wallTotalExecution.addSample(e.duration);
- cpuSelfExecution.addSample(e.cpuSelfTime);
- wallSelfExecution.addSample(e.selfTime);
- }
-
- values.addHistogram(cpuTotalExecution);
- values.addHistogram(wallTotalExecution);
- values.addHistogram(cpuSelfExecution);
- values.addHistogram(wallSelfExecution);
- }
-
- function computeParseLazyMetrics(values, model) {
- var cpuSelfParseLazy = new tr.v.Histogram('v8_parse_lazy_cpu_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuSelfParseLazy.description =
- 'cpu self time spent performing lazy parsing';
- var wallSelfParseLazy = new tr.v.Histogram('v8_parse_lazy_wall_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallSelfParseLazy.description =
- 'wall self time spent performing lazy parsing';
-
- for (var e of model.findTopmostSlicesNamed('V8.ParseLazyMicroSeconds')) {
- cpuSelfParseLazy.addSample(e.cpuSelfTime);
- wallSelfParseLazy.addSample(e.selfTime);
- }
- for (var e of model.findTopmostSlicesNamed('V8.ParseLazy')) {
- cpuSelfParseLazy.addSample(e.cpuSelfTime);
- wallSelfParseLazy.addSample(e.selfTime);
- }
-
- values.addHistogram(cpuSelfParseLazy);
- values.addHistogram(wallSelfParseLazy);
- }
-
- function computeCompileFullCodeMetrics(values, model) {
- var cpuSelfCompileFullCode = new tr.v.Histogram(
- 'v8_compile_full_code_cpu_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuSelfCompileFullCode.description =
- 'cpu self time spent performing compiling full code';
- var wallSelfCompileFullCode = new tr.v.Histogram(
- 'v8_compile_full_code_wall_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallSelfCompileFullCode.description =
- 'wall self time spent performing compiling full code';
-
- for (var e of model.findTopmostSlicesNamed('V8.CompileFullCode')) {
- cpuSelfCompileFullCode.addSample(e.cpuSelfTime);
- wallSelfCompileFullCode.addSample(e.selfTime);
- }
-
- values.addHistogram(cpuSelfCompileFullCode);
- values.addHistogram(wallSelfCompileFullCode);
- }
-
- function computeCompileIgnitionMetrics(values, model) {
- var cpuSelfCompileIgnition = new tr.v.Histogram(
- 'v8_compile_ignition_cpu_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuSelfCompileIgnition.description =
- 'cpu self time spent in compile ignition';
- var wallSelfCompileIgnition = new tr.v.Histogram(
- 'v8_compile_ignition_wall_self',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallSelfCompileIgnition.description =
- 'wall self time spent in compile ignition';
-
- for (var e of model.findTopmostSlicesNamed('V8.CompileIgnition')) {
- cpuSelfCompileIgnition.addSample(e.cpuSelfTime);
- wallSelfCompileIgnition.addSample(e.selfTime);
- }
-
- values.addHistogram(cpuSelfCompileIgnition);
- values.addHistogram(wallSelfCompileIgnition);
- }
-
- function computeRecompileMetrics(values, model) {
- var cpuTotalRecompileSynchronous = new tr.v.Histogram(
- 'v8_recompile_synchronous_cpu_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuTotalRecompileSynchronous.description =
- 'cpu total time spent in synchronous recompilation';
- var wallTotalRecompileSynchronous = new tr.v.Histogram(
- 'v8_recompile_synchronous_wall_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallTotalRecompileSynchronous.description =
- 'wall total time spent in synchronous recompilation';
- var cpuTotalRecompileConcurrent = new tr.v.Histogram(
- 'v8_recompile_concurrent_cpu_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuTotalRecompileConcurrent.description =
- 'cpu total time spent in concurrent recompilation';
- var wallTotalRecompileConcurrent = new tr.v.Histogram(
- 'v8_recompile_concurrent_wall_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallTotalRecompileConcurrent.description =
- 'wall total time spent in concurrent recompilation';
- // TODO(eakuefner): Stop computing overall values once dash v2 is ready.
- // https://github.com/catapult-project/catapult/issues/2180
- var cpuTotalRecompileOverall = new tr.v.Histogram(
- 'v8_recompile_overall_cpu_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuTotalRecompileOverall.description =
- 'cpu total time spent in synchronous or concurrent recompilation';
- var wallTotalRecompileOverall = new tr.v.Histogram(
- 'v8_recompile_overall_wall_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallTotalRecompileOverall.description =
- 'wall total time spent in synchronous or concurrent recompilation';
-
- for (var e of model.findTopmostSlicesNamed('V8.RecompileSynchronous')) {
- cpuTotalRecompileSynchronous.addSample(e.cpuDuration);
- wallTotalRecompileSynchronous.addSample(e.duration);
- cpuTotalRecompileOverall.addSample(e.cpuDuration);
- wallTotalRecompileOverall.addSample(e.duration);
- }
-
- values.addHistogram(cpuTotalRecompileSynchronous);
- values.addHistogram(wallTotalRecompileSynchronous);
-
- for (var e of model.findTopmostSlicesNamed('V8.RecompileConcurrent')) {
- cpuTotalRecompileConcurrent.addSample(e.cpuDuration);
- wallTotalRecompileConcurrent.addSample(e.duration);
- cpuTotalRecompileOverall.addSample(e.cpuDuration);
- wallTotalRecompileOverall.addSample(e.duration);
- }
-
- values.addHistogram(cpuTotalRecompileConcurrent);
- values.addHistogram(wallTotalRecompileConcurrent);
- values.addHistogram(cpuTotalRecompileOverall);
- values.addHistogram(wallTotalRecompileOverall);
- }
-
- function computeOptimizeCodeMetrics(values, model) {
- var cpuTotalOptimizeCode = new tr.v.Histogram('v8_optimize_code_cpu_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuTotalOptimizeCode.description =
- 'cpu total time spent in code optimization';
- var wallTotalOptimizeCode = new tr.v.Histogram(
- 'v8_optimize_code_wall_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallTotalOptimizeCode.description =
- 'wall total time spent in code optimization';
-
- for (var e of model.findTopmostSlicesNamed('V8.OptimizeCode')) {
- cpuTotalOptimizeCode.addSample(e.cpuDuration);
- wallTotalOptimizeCode.addSample(e.duration);
- }
-
- values.addHistogram(cpuTotalOptimizeCode);
- values.addHistogram(wallTotalOptimizeCode);
- }
-
- function computeDeoptimizeCodeMetrics(values, model) {
- var cpuTotalDeoptimizeCode = new tr.v.Histogram(
- 'v8_deoptimize_code_cpu_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- cpuTotalDeoptimizeCode.description =
- 'cpu total time spent in code deoptimization';
- var wallTotalDeoptimizeCode = new tr.v.Histogram(
- 'v8_deoptimize_code_wall_total',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- wallTotalDeoptimizeCode.description =
- 'wall total time spent in code deoptimization';
-
- for (var e of model.findTopmostSlicesNamed('V8.DeoptimizeCode')) {
- cpuTotalDeoptimizeCode.addSample(e.cpuDuration);
- wallTotalDeoptimizeCode.addSample(e.duration);
- }
-
- values.addHistogram(cpuTotalDeoptimizeCode);
- values.addHistogram(wallTotalDeoptimizeCode);
- }
-
- function executionMetric(values, model) {
- computeExecuteMetrics(values, model);
- computeParseLazyMetrics(values, model);
- computeCompileIgnitionMetrics(values, model);
- computeCompileFullCodeMetrics(values, model);
- computeRecompileMetrics(values, model);
- computeOptimizeCodeMetrics(values, model);
- computeDeoptimizeCodeMetrics(values, model);
- }
-
- tr.metrics.MetricRegistry.register(executionMetric);
-
- return {
- executionMetric: executionMetric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric_test.html
deleted file mode 100644
index d582e5da3a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/execution_metric_test.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/v8/execution_metric.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('executionMetricBasic', function() {
- var model = tr.c.TestUtils.newModel();
- var values = new tr.v.ValueSet();
-
- tr.metrics.v8.executionMetric(values, model);
-
- [
- 'v8_execution_cpu_total',
- 'v8_execution_wall_total',
- 'v8_execution_cpu_self',
- 'v8_execution_wall_self',
- 'v8_parse_lazy_cpu_self',
- 'v8_parse_lazy_wall_self',
- 'v8_compile_full_code_cpu_self',
- 'v8_compile_full_code_wall_self',
- 'v8_compile_ignition_cpu_self',
- 'v8_compile_ignition_wall_self',
- 'v8_recompile_synchronous_cpu_total',
- 'v8_recompile_synchronous_wall_total',
- 'v8_recompile_concurrent_cpu_total',
- 'v8_recompile_concurrent_wall_total',
- 'v8_recompile_overall_cpu_total',
- 'v8_recompile_overall_wall_total',
- 'v8_optimize_code_cpu_total',
- 'v8_optimize_code_wall_total',
- 'v8_deoptimize_code_cpu_total',
- 'v8_deoptimize_code_wall_total',
- ].forEach(function(name) {
- assert.strictEqual(values.getValuesNamed(name).length, 1);
- });
- });
-
- test('noDoubleCounting', function() {
- var events = [
- {name: 'V8.Execute', args: {}, pid: 52, ts: 0, cat: 'foo', tid: 53,
- ph: 'B'},
- {name: 'V8.Execute', args: {}, pid: 52, ts: 100, cat: 'foo', tid: 53,
- ph: 'E'},
- {name: 'V8.Execute', args: {}, pid: 52, ts: 20, cat: 'foo', tid: 53,
- ph: 'B'},
- {name: 'V8.Execute', args: {}, pid: 52, ts: 40, cat: 'foo', tid: 53,
- ph: 'E'}
- ];
-
- var model = tr.c.TestUtils.newModelWithEvents(JSON.stringify(events), {
- shiftWorldToZero: false
- });
- var values = new tr.v.ValueSet();
- tr.metrics.v8.executionMetric(values, model);
-
- var value = values.getValuesNamed('v8_execution_wall_total')[0];
- assert.closeTo(value.running.sum, 0.1, 1e-5);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric.html
deleted file mode 100644
index 7a0c88f18cd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric.html
+++ /dev/null
@@ -1,338 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/v8/utils.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.v8', function() {
- // The time window size for mutator utilization computation.
- // It is equal to the duration of one frame corresponding to 60 FPS rendering.
- var TARGET_FPS = 60;
- var MS_PER_SECOND = 1000;
- var WINDOW_SIZE_MS = MS_PER_SECOND / TARGET_FPS;
-
- function gcMetric(values, model) {
- addDurationOfTopEvents(values, model);
- addTotalDurationOfTopEvents(values, model);
- addDurationOfSubEvents(values, model);
- addIdleTimesOfTopEvents(values, model);
- addTotalIdleTimesOfTopEvents(values, model);
- addPercentageInV8ExecuteOfTopEvents(values, model);
- addTotalPercentageInV8Execute(values, model);
- addV8ExecuteMutatorUtilization(values, model);
- }
-
- tr.metrics.MetricRegistry.register(gcMetric);
-
- var timeDurationInMs_smallerIsBetter =
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter;
- var percentage_biggerIsBetter =
- tr.b.Unit.byName.normalizedPercentage_biggerIsBetter;
- var percentage_smallerIsBetter =
- tr.b.Unit.byName.normalizedPercentage_smallerIsBetter;
-
- // 0.1 steps from 0 to 20 since it is the most common range.
- // Exponentially increasing steps from 20 to 200.
- var CUSTOM_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 20, 200)
- .addExponentialBins(200, 100);
-
- function createNumericForTopEventTime(name) {
- var n = new tr.v.Histogram(name,
- timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- n.customizeSummaryOptions({
- avg: true,
- count: true,
- max: true,
- min: false,
- std: true,
- sum: true,
- percentile: [0.90]});
- return n;
- }
-
- function createNumericForSubEventTime(name) {
- var n = new tr.v.Histogram(name,
- timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- n.customizeSummaryOptions({
- avg: true,
- count: false,
- max: true,
- min: false,
- std: false,
- sum: false,
- percentile: [0.90]
- });
- return n;
- }
-
- function createNumericForIdleTime(name) {
- var n = new tr.v.Histogram(name,
- timeDurationInMs_smallerIsBetter, CUSTOM_BOUNDARIES);
- n.customizeSummaryOptions({
- avg: true,
- count: false,
- max: true,
- min: false,
- std: false,
- sum: true,
- percentile: []
- });
- return n;
- }
-
- function createPercentage(name, numerator, denominator, unit) {
- var hist = new tr.v.Histogram(name, unit);
- if (denominator === 0)
- hist.addSample(0);
- else
- hist.addSample(numerator / denominator);
- hist.customizeSummaryOptions({
- avg: true,
- count: false,
- max: false,
- min: false,
- std: false,
- sum: false,
- percentile: []
- });
- return hist;
- }
-
- function isNotForcedTopGarbageCollectionEvent(event) {
- // We exclude garbage collection events forced by benchmark runner,
- // because they cannot happen in real world.
- return tr.metrics.v8.utils.isTopGarbageCollectionEvent(event) &&
- !tr.metrics.v8.utils.isForcedGarbageCollectionEvent(event);
- }
-
- function isNotForcedSubGarbageCollectionEvent(event) {
- // We exclude garbage collection events forced by benchmark runner,
- // because they cannot happen in real world.
- return tr.metrics.v8.utils.isSubGarbageCollectionEvent(event) &&
- !tr.metrics.v8.utils.isForcedGarbageCollectionEvent(event);
- }
-
- /**
- * Example output:
- * - v8-gc-full-mark-compactor.
- */
- function addDurationOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedTopGarbageCollectionEvent,
- tr.metrics.v8.utils.topGarbageCollectionEventName,
- function(name, events) {
- var cpuDuration = createNumericForTopEventTime(name);
- events.forEach(function(event) {
- cpuDuration.addSample(event.cpuDuration);
- });
- values.addHistogram(cpuDuration);
- }
- );
- }
-
- /**
- * Example output:
- * - v8-gc-total
- */
- function addTotalDurationOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedTopGarbageCollectionEvent,
- event => 'v8-gc-total',
- function(name, events) {
- var cpuDuration = createNumericForTopEventTime(name);
- events.forEach(function(event) {
- cpuDuration.addSample(event.cpuDuration);
- });
- values.addHistogram(cpuDuration);
- }
- );
- }
-
- /**
- * Example output:
- * - v8-gc-full-mark-compactor-evacuate.
- */
- function addDurationOfSubEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedSubGarbageCollectionEvent,
- tr.metrics.v8.utils.subGarbageCollectionEventName,
- function(name, events) {
- var cpuDuration = createNumericForSubEventTime(name);
- events.forEach(function(event) {
- cpuDuration.addSample(event.cpuDuration);
- });
- values.addHistogram(cpuDuration);
- }
- );
- }
-
- /**
- * Example output:
- * - v8-gc-full-mark-compactor_idle_deadline_overrun,
- * - v8-gc-full-mark-compactor_outside_idle,
- * - v8-gc-full-mark-compactor_percentage_idle.
- */
- function addIdleTimesOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedTopGarbageCollectionEvent,
- tr.metrics.v8.utils.topGarbageCollectionEventName,
- function(name, events) {
- addIdleTimes(values, model, name, events);
- }
- );
- }
-
- /**
- * Example output:
- * - v8-gc-total_idle_deadline_overrun,
- * - v8-gc-total_outside_idle,
- * - v8-gc-total_percentage_idle.
- */
- function addTotalIdleTimesOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedTopGarbageCollectionEvent,
- event => 'v8-gc-total',
- function(name, events) {
- addIdleTimes(values, model, name, events);
- }
- );
- }
-
- function addIdleTimes(values, model, name, events) {
- var cpuDuration = createNumericForIdleTime();
- var insideIdle = createNumericForIdleTime();
- var outsideIdle = createNumericForIdleTime(name + '_outside_idle');
- var idleDeadlineOverrun = createNumericForIdleTime(
- name + '_idle_deadline_overrun');
- events.forEach(function(event) {
- var idleTask = tr.metrics.v8.utils.findParent(
- event, tr.metrics.v8.utils.isIdleTask);
- var inside = 0;
- var overrun = 0;
- if (idleTask) {
- var allottedTime = idleTask['args']['allotted_time_ms'];
- if (event.duration > allottedTime) {
- overrun = event.duration - allottedTime;
- // Don't count time over the deadline as being inside idle time.
- // Since the deadline should be relative to wall clock we
- // compare allotted_time_ms with wall duration instead of thread
- // duration, and then assume the thread duration was inside idle
- // for the same percentage of time.
- inside = event.cpuDuration * allottedTime / event.duration;
- } else {
- inside = event.cpuDuration;
- }
- }
- cpuDuration.addSample(event.cpuDuration);
- insideIdle.addSample(inside);
- outsideIdle.addSample(event.cpuDuration - inside);
- idleDeadlineOverrun.addSample(overrun);
- });
- values.addHistogram(idleDeadlineOverrun);
- values.addHistogram(outsideIdle);
- var percentage = createPercentage(name + '_percentage_idle', insideIdle.sum,
- cpuDuration.sum,
- percentage_biggerIsBetter);
- values.addHistogram(percentage);
- }
-
-
- /**
- * Example output:
- * - v8-gc-full-mark-compactor_percentage_in_v8_execute.
- */
- function addPercentageInV8ExecuteOfTopEvents(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedTopGarbageCollectionEvent,
- tr.metrics.v8.utils.topGarbageCollectionEventName,
- function(name, events) {
- addPercentageInV8Execute(values, model, name, events);
- }
- );
- }
-
- /**
- * Example output:
- * - v8-gc-total_percentage_in_v8_execute.
- */
- function addTotalPercentageInV8Execute(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- isNotForcedTopGarbageCollectionEvent,
- event => 'v8-gc-total',
- function(name, events) {
- addPercentageInV8Execute(values, model, name, events);
- }
- );
- }
-
- function addPercentageInV8Execute(values, model, name, events) {
- var cpuDurationInV8Execute = 0;
- var cpuDurationTotal = 0;
- events.forEach(function(event) {
- var v8Execute = tr.metrics.v8.utils.findParent(
- event, tr.metrics.v8.utils.isV8ExecuteEvent);
- if (v8Execute) {
- cpuDurationInV8Execute += event.cpuDuration;
- }
- cpuDurationTotal += event.cpuDuration;
- });
- var percentage = createPercentage(
- name + '_percentage_in_v8_execute', cpuDurationInV8Execute,
- cpuDurationTotal, percentage_smallerIsBetter);
- values.addHistogram(percentage);
- }
-
- function addV8ExecuteMutatorUtilization(values, model) {
- tr.metrics.v8.utils.groupAndProcessEvents(model,
- tr.metrics.v8.utils.isTopV8ExecuteEvent,
- event => 'v8-execute',
- function(name, events) {
- events.sort((a, b) => a.start - b.start);
- var time = 0;
- var pauses = [];
- // Glue together the v8.execute events and adjust the GC pause
- // times accordingly.
- for (var topEvent of events) {
- for (var e of topEvent.enumerateAllDescendents()) {
- if (isNotForcedTopGarbageCollectionEvent(e)) {
- pauses.push({ start: e.start - topEvent.start + time,
- end: e.end - topEvent.start + time });
- }
- }
- time += topEvent.duration;
- }
- // Now we have one big v8.execute interval from 0 to |time| and
- // a list of GC pauses.
- var mutatorUtilization = tr.metrics.v8.utils.mutatorUtilization(
- 0, time, WINDOW_SIZE_MS, pauses);
- [0.90, 0.95, 0.99].forEach(function(percent) {
- var hist = new tr.v.Histogram(
- 'v8-execute-mutator-utilization_pct_0' + percent * 100,
- percentage_biggerIsBetter);
- hist.addSample(mutatorUtilization.percentile(1.0 - percent));
- values.addHistogram(hist);
- });
- var hist = new tr.v.Histogram(
- 'v8-execute-mutator-utilization_min', percentage_biggerIsBetter);
- hist.addSample(mutatorUtilization.min);
- values.addHistogram(hist);
- }
- );
- }
-
- return {
- gcMetric: gcMetric,
- WINDOW_SIZE_MS: WINDOW_SIZE_MS // For testing purposes only.
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric_test.html
deleted file mode 100644
index 1ae15e021fe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/gc_metric_test.html
+++ /dev/null
@@ -1,289 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/metrics/v8/gc_metric.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function createModel(start, end, slices) {
- var opts = {
- customizeModelCallback: function(model) {
- var process = model.getOrCreateProcess(1);
- var thread = process.getOrCreateThread(2);
- var group = thread.sliceGroup;
- slices.forEach(function(slice) {
- group.pushSlice(tr.c.TestUtils.newSliceEx(slice));
- });
- group.createSubSlices();
- }
- };
- var model = tr.c.TestUtils.newModelWithEvents([], opts);
- return model;
- }
-
- function constructName(name, suffix) {
- return name + '_' + suffix;
- }
-
- function run(slices) {
- var values = new tr.v.ValueSet();
- var startTime = slices.reduce((acc, slice) => (Math.min(acc, slice.start)));
- var endTime = slices.reduce((acc, slice) => (Math.max(acc, slice.end)));
- var model = createModel(startTime - 1, endTime + 1, slices);
- tr.metrics.v8.gcMetric(values, model);
- return values;
- }
-
- test('topEvents', function() {
- var events = {
- 'V8.GCCompactor': 'v8-gc-full-mark-compactor',
- 'V8.GCFinalizeMC': 'v8-gc-latency-mark-compactor',
- 'V8.GCFinalizeMCReduceMemory': 'v8-gc-memory-mark-compactor',
- 'V8.GCIncrementalMarking': 'v8-gc-incremental-step',
- 'V8.GCIncrementalMarkingFinalize': 'v8-gc-incremental-finalize',
- 'V8.GCIncrementalMarkingStart': 'v8-gc-incremental-start',
- 'V8.GCPhantomHandleProcessingCallback' : 'v8-gc-phantom-handle-callback',
- 'V8.GCScavenger': 'v8-gc-scavenger'
- };
- tr.b.iterItems(events, function(timelineName, telemetryName) {
- var slices = [
- {
- title: timelineName, args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed(telemetryName));
- assert.strictEqual(value.running.sum, 100);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 100);
- assert.strictEqual(value.running.max, 100);
- assert.closeTo(value.getApproximatePercentile(0.90), 100, 1);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- telemetryName + '_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- telemetryName + '_outside_idle'));
- assert.strictEqual(value.running.sum, 100);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 100);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- telemetryName + '_percentage_idle'));
- assert.strictEqual(value.average, 0);
- });
- });
-
- test('idleTimes', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'SingleThreadIdleTaskRunner::RunTask',
- args: {'allotted_time_ms' : 100}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor'));
- assert.strictEqual(value.running.sum, 80);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 80);
- assert.strictEqual(value.running.max, 80);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_outside_idle'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_percentage_idle'));
- assert.strictEqual(value.average, 1);
- });
-
- test('idleTimeOverrun', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'SingleThreadIdleTaskRunner::RunTask',
- args: {'allotted_time_ms' : 10}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor'));
- assert.strictEqual(value.running.sum, 80);
- assert.strictEqual(value.numValues, 1);
- assert.strictEqual(value.average, 80);
- assert.strictEqual(value.running.max, 80);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 70);
- assert.strictEqual(value.average, 70);
- assert.strictEqual(value.running.max, 70);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_outside_idle'));
- assert.strictEqual(value.running.sum, 70);
- assert.strictEqual(value.average, 70);
- assert.strictEqual(value.running.max, 70);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_percentage_idle'));
- assert.closeTo(value.average, 1 / 8, 1e-6);
- });
-
- test('subEvents', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GC_MC_MARK', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- },
- ];
- var actual = run(slices);
- var telemetryName = 'v8-gc-latency-mark-compactor-mark';
- var value = tr.b.getOnlyElement(actual.getValuesNamed(telemetryName));
- assert.strictEqual(value.average, 80);
- assert.strictEqual(value.running.max, 80);
- assert.closeTo(value.getApproximatePercentile(0.90), 80, 1);
- });
-
- test('total', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GCIncrementalMarking', args: {}, start: 210, end: 290,
- cpuStart: 210, cpuEnd: 290
- }
- ];
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed('v8-gc-total'));
- assert.strictEqual(value.running.sum, 180);
- assert.strictEqual(value.numValues, 2);
- assert.strictEqual(value.average, 90);
- assert.strictEqual(value.running.max, 100);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-total_idle_deadline_overrun'));
- assert.strictEqual(value.running.sum, 0);
- assert.strictEqual(value.average, 0);
- assert.strictEqual(value.running.max, 0);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-total_outside_idle'));
- assert.strictEqual(value.running.sum, 180);
- assert.strictEqual(value.average, 90);
- assert.strictEqual(value.running.max, 100);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-total_percentage_idle'));
- assert.strictEqual(value.average, 0);
- });
-
- test('percentageInV8Execute', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'V8.Execute',
- args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 110, end: 190,
- cpuStart: 110, cpuEnd: 190
- },
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 210, end: 220,
- cpuStart: 210, cpuEnd: 220
- }
- ];
- var actual = run(slices);
- var value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-gc-latency-mark-compactor_percentage_in_v8_execute'));
- assert.strictEqual(value.average,
- (190 - 110) / ((190 - 110) + (220 - 210)));
- });
-
- test('mutatorUtilization', function() {
- var values = new tr.v.ValueSet();
- var slices = [
- {
- title: 'V8.Execute', args: {}, start: 100, end: 200,
- cpuStart: 100, cpuEnd: 200
- },
- {
- title: 'V8.GCFinalizeMC', args: {}, start: 150, end: 160,
- cpuStart: 150, cpuEnd: 160
- },
- {
- title: 'V8.Execute', args: {}, start: 1000, end: 1200,
- cpuStart: 1000, cpuEnd: 1200
- },
- {
- title: 'V8.GCIncrementalMarking', args: {}, start: 1010, end: 1020,
- cpuStart: 1010, cpuEnd: 1020
- }
- ];
- var mutatorUtilization = tr.metrics.v8.utils.mutatorUtilization(
- 0, 300, tr.metrics.v8.WINDOW_SIZE_MS,
- [{start: 50, end: 60}, {start: 110, end: 120}]);
- var actual = run(slices);
-
- var value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-execute-mutator-utilization_pct_095'));
- assert.closeTo(value.average,
- mutatorUtilization.percentile(1 - 0.95), 1e-2);
-
- value = tr.b.getOnlyElement(actual.getValuesNamed(
- 'v8-execute-mutator-utilization_pct_099'));
- assert.closeTo(value.average,
- mutatorUtilization.percentile(1 - 0.99), 1e-2);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/utils.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/utils.html
deleted file mode 100644
index 36e2b70152a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/utils.html
+++ /dev/null
@@ -1,313 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/piecewise_linear_function.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.v8.utils', function() {
- // The title of the idle task event.
- var IDLE_TASK_EVENT = 'SingleThreadIdleTaskRunner::RunTask';
-
- // V8 execution event.
- var V8_EXECUTE = 'V8.Execute';
-
- // GC events start with this prefix.
- var GC_EVENT_PREFIX = 'V8.GC';
-
- // Special handling is required for full GCs inside low memory notification.
- var FULL_GC_EVENT = 'V8.GCCompactor';
-
- var LOW_MEMORY_EVENT = 'V8.GCLowMemoryNotification';
-
- var MAJOR_GC_EVENT = 'MajorGC';
- var MINOR_GC_EVENT = 'MinorGC';
-
- // Maps the top-level GC events in timeline to telemetry friendly names.
- var TOP_GC_EVENTS = {
- 'V8.GCCompactor': 'v8-gc-full-mark-compactor',
- 'V8.GCFinalizeMC': 'v8-gc-latency-mark-compactor',
- 'V8.GCFinalizeMCReduceMemory': 'v8-gc-memory-mark-compactor',
- 'V8.GCIncrementalMarking': 'v8-gc-incremental-step',
- 'V8.GCIncrementalMarkingFinalize': 'v8-gc-incremental-finalize',
- 'V8.GCIncrementalMarkingStart': 'v8-gc-incremental-start',
- 'V8.GCPhantomHandleProcessingCallback' : 'v8-gc-phantom-handle-callback',
- 'V8.GCScavenger': 'v8-gc-scavenger'
- };
-
- var LOW_MEMORY_MARK_COMPACTOR = 'v8-gc-low-memory-mark-compactor';
-
- /**
- * Finds the first parent of the |event| for which the |predicate| holds.
- */
- function findParent(event, predicate) {
- var parent = event.parentSlice;
- while (parent) {
- if (predicate(parent)) {
- return parent;
- }
- parent = parent.parentSlice;
- }
- return null;
- }
-
- function isIdleTask(event) {
- return event.title === IDLE_TASK_EVENT;
- }
-
- function isLowMemoryEvent(event) {
- return event.title === LOW_MEMORY_EVENT;
- }
-
- function isV8ExecuteEvent(event) {
- return event.title === V8_EXECUTE;
- }
-
- function isTopV8ExecuteEvent(event) {
- return isV8ExecuteEvent(event) && findParent(isV8ExecuteEvent) === null;
- }
-
- function isGarbageCollectionEvent(event) {
- // Low memory notification is handled specially because it contains
- // several full mark compact events.
- return event.title && event.title.startsWith(GC_EVENT_PREFIX) &&
- event.title !== LOW_MEMORY_EVENT;
- }
-
- function isTopGarbageCollectionEvent(event) {
- return event.title in TOP_GC_EVENTS;
- }
-
- function isForcedGarbageCollectionEvent(event) {
- return findParent(event, isLowMemoryEvent) !== null;
- }
-
- function isSubGarbageCollectionEvent(event) {
- // To reduce number of results, we return only the first level of GC
- // subevents. Some subevents are nested in MajorGC or MinorGC events, so
- // we have to check for it explicitly.
- return isGarbageCollectionEvent(event) &&
- event.parentSlice &&
- (isTopGarbageCollectionEvent(event.parentSlice) ||
- event.parentSlice.title === MAJOR_GC_EVENT ||
- event.parentSlice.title === MINOR_GC_EVENT);
- }
-
- function topGarbageCollectionEventName(event) {
- if (event.title === FULL_GC_EVENT) {
- // Full mark compact events inside a low memory notification
- // are counted as low memory mark compacts.
- if (findParent(event, isLowMemoryEvent)) {
- return LOW_MEMORY_MARK_COMPACTOR;
- }
- }
- return TOP_GC_EVENTS[event.title];
- }
-
- function subGarbageCollectionEventName(event) {
- var topEvent = findParent(event, isTopGarbageCollectionEvent);
- var prefix = topEvent ? topGarbageCollectionEventName(topEvent) : 'unknown';
- // Remove redundant prefixes and convert to lower case.
- var name = event.title.replace('V8.GC_MC_', '')
- .replace('V8.GC_SCAVENGER_', '')
- .replace('V8.GC_', '')
- .replace(/_/g, '-').toLowerCase();
- return prefix + '-' + name;
- }
-
- /**
- * Filters events using the |filterCallback|, then groups events by the user
- * the name computed using the |nameCallback|, and then invokes
- * the |processCallback| with the grouped events.
- * @param {Function} filterCallback Takes an event and returns a boolean.
- * @param {Function} nameCallback Takes event and returns a string.
- * @param {Function} processCallback Takes a name, and an array of events.
- */
- function groupAndProcessEvents(model, filterCallback,
- nameCallback, processCallback) {
- // Map: name -> [events].
- var nameToEvents = {};
- for (var event of model.getDescendantEvents()) {
- if (!filterCallback(event)) continue;
- var name = nameCallback(event);
- nameToEvents[name] = nameToEvents[name] || [];
- nameToEvents[name].push(event);
- }
- tr.b.iterItems(nameToEvents, function(name, events) {
- processCallback(name, events);
- });
- }
-
- /**
- * Given a list of intervals, returns a new list with all overalapping
- * intervals merged into a single interval.
- */
- function unionOfIntervals(intervals) {
- if (intervals.length === 0)
- return [];
- return tr.b.mergeRanges(
- intervals.map(x => ({min: x.start, max: x.end})), 1e-6,
- function(ranges) {
- return {
- start: ranges.reduce((acc, x) => Math.min(acc, x.min), ranges[0].min),
- end: ranges.reduce((acc, x) => Math.max(acc, x.max), ranges[0].max)
- };
- }
- );
- }
-
- /**
- * An end-point of a window that is sliding from left to right
- * over |points| starting from time |start|.
- * It is intended to be used only by the |mutatorUtilization| function.
- * @constructor
- */
- function WindowEndpoint(start, points) {
- this.points = points;
- // The index of the last passed point.
- this.lastIndex = -1;
- // The position of the end-point in the time line.
- this.position = start;
- // The distance until the next point.
- this.distanceUntilNextPoint = points[0].position - start;
- // The cumulative duration of GC pauses until this position.
- this.cummulativePause = 0;
- // The number of entered GC intervals.
- this.stackDepth = 0;
- }
-
- WindowEndpoint.prototype = {
- // Advance the end-point by the given |delta|.
- advance: function(delta) {
- var points = this.points;
- if (delta < this.distanceUntilNextPoint) {
- this.position += delta;
- this.cummulativePause += this.stackDepth > 0 ? delta : 0;
- this.distanceUntilNextPoint =
- points[this.lastIndex + 1].position - this.position;
- } else {
- this.position += this.distanceUntilNextPoint;
- this.cummulativePause +=
- this.stackDepth > 0 ? this.distanceUntilNextPoint : 0;
- this.distanceUntilNextPoint = 0;
- this.lastIndex++;
- if (this.lastIndex < points.length) {
- this.stackDepth += points[this.lastIndex].delta;
- if (this.lastIndex + 1 < points.length)
- this.distanceUntilNextPoint =
- points[this.lastIndex + 1].position - this.position;
- }
- }
- }
- };
-
- /**
- * Returns mutator utilization as a piecewise linear function.
- * Mutator utilization for a window size w is a function of time mu_w(t)
- * that shows how much time in [t, t+w] is left for the mutator relative
- * to the time window size.
- * More formally:
- * mu_w(t) = (w - total_time_spent_in_gc_in(t, t + w)) / w.
- * The range of mu_w(t) is [0..1].
- * See "A Parallel, Real-Time Garbage Collector" by Cheng et. al. for
- * more info [https://www.cs.cmu.edu/~guyb/papers/gc2001.pdf].
- *
- * All parameters must use the same time unit.
- * @param {number} start The start time of execution.
- * @param {number} end The end time of execution.
- * @param {number} timeWindow The size of the time window.
- * @param {!Array<!{start: number, end: number}>} intervals The list of
- * GC pauses.
- */
- function mutatorUtilization(start, end, timeWindow, intervals) {
- var mu = new tr.b.PiecewiseLinearFunction();
- // If the interval is smaller than the time window, then the function is
- // empty.
- if (end - start <= timeWindow)
- return mu;
- // If there are GC pauses then the mutator utilization is 1.0.
- if (intervals.length === 0) {
- mu.push(start, 1.0, end - timeWindow, 1.0);
- return mu;
- }
- intervals = unionOfIntervals(intervals);
- // Create a point for the start and the end of each interval.
- var points = [];
- intervals.forEach(function(interval) {
- points.push({position: interval.start, delta: 1});
- points.push({position: interval.end, delta: -1});
- });
- points.sort((a, b) => a.position - b.position);
- points.push({position: end, delta: 0});
- // The left and the right limit of the sliding window.
- var left = new WindowEndpoint(start, points);
- var right = new WindowEndpoint(start, points);
- // Advance the right end-point until we get the correct window size.
- while (right.position - left.position < timeWindow)
- right.advance(timeWindow - (right.position - left.position));
- while (right.lastIndex < points.length) {
- // Advance the window end-points by the largest possible amount
- // without jumping over a point.
- var distanceUntilNextPoint =
- Math.min(left.distanceUntilNextPoint, right.distanceUntilNextPoint);
- var position1 = left.position;
- var value1 = right.cummulativePause - left.cummulativePause;
- left.advance(distanceUntilNextPoint);
- right.advance(distanceUntilNextPoint);
- // Add a new mutator utilization segment only if it is non-trivial.
- if (distanceUntilNextPoint > 0) {
- var position2 = left.position;
- var value2 = right.cummulativePause - left.cummulativePause;
- mu.push(position1, 1.0 - value1 / timeWindow,
- position2, 1.0 - value2 / timeWindow);
- }
- }
- return mu;
- }
-
- function hasV8Stats(globalMemoryDump) {
- var v8stats = undefined;
- globalMemoryDump.iterateContainerDumps(function(dump) {
- v8stats = v8stats || dump.getMemoryAllocatorDumpByFullName('v8');
- });
- return !!v8stats;
- }
-
- function rangeForMemoryDumps(model) {
- var startOfFirstDumpWithV8 =
- model.globalMemoryDumps.filter(hasV8Stats).reduce(
- (start, dump) => Math.min(start, dump.start), Infinity);
- if (startOfFirstDumpWithV8 === Infinity)
- return new tr.b.Range(); // Empty range.
- return tr.b.Range.fromExplicitRange(startOfFirstDumpWithV8, Infinity);
- }
-
- return {
- findParent: findParent,
- groupAndProcessEvents: groupAndProcessEvents,
- isForcedGarbageCollectionEvent: isForcedGarbageCollectionEvent,
- isGarbageCollectionEvent: isGarbageCollectionEvent,
- isIdleTask: isIdleTask,
- isLowMemoryEvent: isLowMemoryEvent,
- isSubGarbageCollectionEvent: isSubGarbageCollectionEvent,
- isTopGarbageCollectionEvent: isTopGarbageCollectionEvent,
- isTopV8ExecuteEvent: isTopV8ExecuteEvent,
- isV8ExecuteEvent: isV8ExecuteEvent,
- mutatorUtilization: mutatorUtilization,
- subGarbageCollectionEventName: subGarbageCollectionEventName,
- topGarbageCollectionEventName: topGarbageCollectionEventName,
- rangeForMemoryDumps: rangeForMemoryDumps,
- unionOfIntervals: unionOfIntervals
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/utils_test.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/utils_test.html
deleted file mode 100644
index 775de11e702..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/utils_test.html
+++ /dev/null
@@ -1,176 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/metrics/v8/utils.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var unionOfIntervals = tr.metrics.v8.utils.unionOfIntervals;
-
- function interval(start, end) {
- return {start: start, end: end};
- }
-
- /**
- * Brute force computation of the mutator utilization.
- * The function steps from the start to the end and for each step
- * computes the mutator utilization.
- */
- function mutatorUtilizationSlow(start, end, timeWindow, intervals) {
- var STEP = 0.001;
- function timeToIndex(time) {
- return Math.floor((time - start) / STEP);
- };
- var N = timeToIndex(end) + 1;
- // bitmap[i] === true means that GC is active at time i.
- var bitmap = new Array(N);
- for (var i = 0; i < N; i++)
- bitmap[i] = false;
- intervals.forEach(function(interval) {
- var start = timeToIndex(interval.start);
- var end = timeToIndex(interval.end);
- for (var i = start; i < end; i++)
- bitmap[i] = true;
- });
- var pause = new Array(N);
- for (var i = 0; i < N; i++)
- pause[i] = (i > 0 ? pause[i - 1] : 0) + (bitmap[i] ? 1 : 0);
- var windowWidth = timeToIndex(timeWindow);
- var mu = new Array(Math.max(N - windowWidth, 0));
- for (var i = 0; i < mu.length; i++) {
- var value = pause[i + windowWidth] - pause[i];
- mu[i] = 1.0 - value / windowWidth;
- }
- mu.sort((a, b) => a - b);
- return {
- average: mu.reduce((acc, x) => (acc + x), 0) / mu.length,
- min: mu.reduce((acc, x) => Math.min(acc, x), 0),
- max: mu.reduce((acc, x) => Math.max(acc, x), 0),
- percentile: function(percent) {
- return mu[Math.floor(percent * (mu.length - 1))];
- }
- };
- }
-
- /**
- * Constructs PiecewiseLinearFunction from pieces.
- * @param {!Array<!{x1: number, y1: number, x2: number, y2: number}>} pieces
- * The list of pieces ordered by the x coordinate.
- */
- function createExpectedFunction(pieces) {
- var f = new tr.b.PiecewiseLinearFunction();
- pieces.forEach(function(p) {
- f.push(p.x1, p.y1, p.x2, p.y2);
- });
- return f;
- }
-
- test('unionOfIntervals', function() {
- var list, union;
- assert.deepEqual(unionOfIntervals([]), []);
- assert.deepEqual(unionOfIntervals([interval(1, 1)]), [interval(1, 1)]);
- assert.deepEqual(
- unionOfIntervals([interval(0, 1), interval(1, 2), interval(2, 3)]),
- [interval(0, 3)]);
- assert.deepEqual(
- unionOfIntervals([interval(0, 1), interval(1, 2), interval(3, 3)]),
- [interval(0, 2), interval(3, 3)]);
- assert.deepEqual(
- unionOfIntervals([interval(0, 10), interval(1, 2), interval(3, 3)]),
- [interval(0, 10)]);
- assert.deepEqual(
- unionOfIntervals([interval(0, 10), interval(1, 2), interval(3, 11)]),
- [interval(0, 11)]);
- assert.deepEqual(
- unionOfIntervals([interval(3, 10), interval(1, 2), interval(11, 11)]),
- [interval(1, 2), interval(3, 10), interval(11, 11)]);
- });
-
- test('basicMutatorUtilization', function() {
- assert.deepEqual(
- tr.metrics.v8.utils.mutatorUtilization(0, 40, 10, [interval(10, 20)]),
- createExpectedFunction([
- { x1: 0, y1: 1.0, x2: 10, y2: 0.0 },
- { x1: 10, y1: 0.0, x2: 20, y2: 1.0 },
- { x1: 20, y1: 1.0, x2: 30, y2: 1.0 }])
- );
- assert.deepEqual(
- tr.metrics.v8.utils.mutatorUtilization(0, 40, 10, [interval(10, 15)]),
- createExpectedFunction([
- { x1: 0, y1: 1.0, x2: 5, y2: 0.5 },
- { x1: 5, y1: 0.5, x2: 10, y2: 0.5 },
- { x1: 10, y1: 0.5, x2: 15, y2: 1.0 },
- { x1: 15, y1: 1.0, x2: 30, y2: 1.0 }])
- );
- assert.deepEqual(
- tr.metrics.v8.utils.mutatorUtilization(0, 60, 20,
- [interval(30, 35), interval(40, 45)]),
- createExpectedFunction([
- { x1: 0, y1: 1.0, x2: 10, y2: 1.0 },
- { x1: 10, y1: 1.0, x2: 15, y2: 0.75 },
- { x1: 15, y1: 0.75, x2: 20, y2: 0.75 },
- { x1: 20, y1: 0.75, x2: 25, y2: 0.5 },
- { x1: 25, y1: 0.5, x2: 30, y2: 0.5 },
- { x1: 30, y1: 0.5, x2: 35, y2: 0.75 },
- { x1: 35, y1: 0.75, x2: 40, y2: 0.75 }])
- );
- });
-
- test('mutatorUtilization', function() {
- var pauses, actual, expected;
- pauses = [interval(10, 20),
- interval(15, 23),
- interval(30, 31),
- interval(33, 34),
- interval(60, 61),
- interval(61, 63),
- interval(80, 88)];
- actual = tr.metrics.v8.utils.mutatorUtilization(0, 100, 7, pauses);
- expected = mutatorUtilizationSlow(0, 100, 7, pauses);
- assert.closeTo(expected.average, actual.average, 1e-3);
- assert.closeTo(expected.max, actual.max, 1e-3);
- assert.closeTo(expected.min, actual.min, 1e-3);
- assert.closeTo(expected.percentile(0.5), actual.percentile(0.5), 1e-3);
- assert.closeTo(expected.percentile(0.9), actual.percentile(0.9), 1e-3);
- });
-
- function addDumpWithAllocator(model, process, allocator, start) {
- var gmd = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump(
- model, {ts: start});
- var pmd = tr.model.MemoryDumpTestUtils.addProcessMemoryDump(gmd, process);
- pmd.memoryAllocatorDumps =
- [tr.model.MemoryDumpTestUtils.newAllocatorDump(pmd, allocator)];
- }
-
- test('rangeForMemoryDumps', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- addDumpWithAllocator(model, process, 'dummy', 10);
- addDumpWithAllocator(model, process, 'v8', 20);
- });
- var range = tr.metrics.v8.utils.rangeForMemoryDumps(model);
- assert.isFalse(range.isEmpty);
- assert.strictEqual(range.min, 20);
- assert.strictEqual(range.max, Infinity);
- });
-
- test('rangeForMemoryDumpsEmpty', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- addDumpWithAllocator(model, process, 'dummy', 10);
- addDumpWithAllocator(model, process, 'dummy', 20);
- });
- var range = tr.metrics.v8.utils.rangeForMemoryDumps(model);
- assert.isTrue(range.isEmpty);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/v8/v8_metrics.html b/chromium/third_party/catapult/tracing/tracing/metrics/v8/v8_metrics.html
deleted file mode 100644
index 59e4c49dd7f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/v8/v8_metrics.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/metrics/system_health/memory_metric.html">
-<link rel="import" href="/tracing/metrics/v8/execution_metric.html">
-<link rel="import" href="/tracing/metrics/v8/gc_metric.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.metrics.v8', function() {
- function v8AndMemoryMetrics(values, model) {
- tr.metrics.v8.executionMetric(values, model);
- tr.metrics.v8.gcMetric(values, model);
- tr.metrics.sh.memoryMetric(values, model,
- {rangeOfInterest: tr.metrics.v8.utils.rangeForMemoryDumps(model)});
- }
-
- tr.metrics.MetricRegistry.register(v8AndMemoryMetrics);
-
- return {
- v8AndMemoryMetrics: v8AndMemoryMetrics
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/metrics/valueset_output_for_compare_samples_test.json b/chromium/third_party/catapult/tracing/tracing/metrics/valueset_output_for_compare_samples_test.json
deleted file mode 100644
index 85ec04033fe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/metrics/valueset_output_for_compare_samples_test.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"sampleValues":[70.38199999928474],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":70.38199999928474,"max":70.38199999928474,"sum":70.38199999928474,"meanlogs":4.253937548643484,"variance":0,"mean":70.38199999928474},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b33442c5-4666-46b1-aa73-b726ff995caf","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[339.4839999973774],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":339.4839999973774,"max":339.4839999973774,"sum":339.4839999973774,"meanlogs":5.827426817750858,"variance":0,"mean":339.4839999973774},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"97c09fee-7599-4ba6-bffd-d82c7d38a8de","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[251.50699999928474],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":251.50699999928474,"max":251.50699999928474,"sum":251.50699999928474,"meanlogs":5.527470822151607,"variance":0,"mean":251.50699999928474},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1368.7138160020113,"stableId":"12281.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1620.220816001296,"stableId":"12281.1295.SliceGroup.1134","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":10.090408136743806,"other":241.41659186254103,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1368.7138160020113,"pid":12281,"fmp":1620.220816001296}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"fb9a13e6-01e8-4ffa-8a49-58d3d554175e","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[359.9989999961258],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":359.9989999961258,"max":359.9989999961258,"sum":359.9989999961258,"meanlogs":5.886101253657758,"variance":0,"mean":359.9989999961258},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1368.7138160020113,"stableId":"12281.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":68.534,"start":1710.178815998137,"stableId":"12281.1295.SliceGroup.1565","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1368.7138160020113,"pid":12281,"interactive":1728.712815998137}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":11.300027209535319,"other":348.69897278659045,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"bc6f6373-1243-4ee4-bf41-4ad4c2cc3a3b","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[71.0029999986291,32.31400000303984],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":32.31400000303984,"max":71.0029999986291,"sum":103.31700000166893,"meanlogs":3.869111351299595,"variance":748.4193603293527,"mean":51.658500000834465},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5a1f5cdd-8f05-4b8e-914e-b25ed8ed3446","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[89.73600000143051,412.53999999910593,28.776000000536442,168.152000002563],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":4,"min":28.776000000536442,"max":412.53999999910593,"sum":699.2040000036359,"meanlogs":4.750903808953008,"variance":85123.39617114076,"mean":174.80100000090897},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"f46ae39d-3321-4ac7-8917-8c5d02ceaa98","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[169.51699999719858,124.88199999928474],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":124.88199999928474,"max":169.51699999719858,"sum":294.3989999964833,"meanlogs":4.980161254103994,"variance":996.1416124068842,"mean":147.19949999824166},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":4115.824345007539,"stableId":"12298.1295.SliceGroup.2104","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":4240.7063450068235,"stableId":"12298.1295.SliceGroup.2481","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":12.713352381822483,"other":112.16864761746226,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":4115.824345007539,"pid":12298,"fmp":4240.7063450068235}}}]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1083.3763450086117,"stableId":"12298.1295.SliceGroup.43","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1252.8933450058103,"stableId":"12298.1295.SliceGroup.939","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":23.184204388645075,"other":146.33279560855354,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1083.3763450086117,"pid":12298,"fmp":1252.8933450058103}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"e151c66a-db91-4b8e-8a72-ed553961e7ed","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[3270.468000001848,238.02000000292082],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":238.02000000292082,"max":3270.468000001848,"sum":3508.4880000047688,"meanlogs":6.78252153834195,"variance":4597870.4363487465,"mean":1754.2440000023844},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":4115.824345007539,"stableId":"12298.1295.SliceGroup.2104","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":118.309,"start":4285.535345010459,"stableId":"12298.1295.SliceGroup.2896","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":4115.824345007539,"pid":12298,"interactive":4353.84434501046}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":13.61272462908967,"other":224.40727537383125,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1083.3763450086117,"stableId":"12298.1295.SliceGroup.43","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":118.309,"start":4285.535345010459,"stableId":"12298.1295.SliceGroup.2896","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1083.3763450086117,"pid":12298,"interactive":4353.84434501046}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":2407.6157246280027,"other":862.8522753738349,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"927f25d6-eb94-4838-9deb-514a8c8310e1","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[143.6650000065565],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":143.6650000065565,"max":143.6650000065565,"sum":143.6650000065565,"meanlogs":4.96748420048591,"variance":0,"mean":143.6650000065565},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"db5c1ae8-a3e1-4331-a298-021dd6921207","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[358.4480000063777],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":358.4480000063777,"max":358.4480000063777,"sum":358.4480000063777,"meanlogs":5.8817836007223665,"variance":0,"mean":358.4480000063777},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"56147d2a-21c4-43eb-9a7b-8f96d4f9460d","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[143.6740000024438],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":143.6740000024438,"max":143.6740000024438,"sum":143.6740000024438,"meanlogs":4.967546844233469,"variance":0,"mean":143.6740000024438},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1470.4746529981494,"stableId":"12328.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1614.1486530005932,"stableId":"12328.1295.SliceGroup.503","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":8.732362295842842,"other":134.94163770660091,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1470.4746529981494,"pid":12328,"fmp":1614.1486530005932}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"7e2001b7-7590-452b-9449-b37d497ef289","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[202.7290000022649],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":202.7290000022649,"max":202.7290000022649,"sum":202.7290000022649,"meanlogs":5.311870111810042,"variance":0,"mean":202.7290000022649},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1470.4746529981494,"stableId":"12328.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":54.897,"start":1668.3066530004144,"stableId":"12328.1295.SliceGroup.1339","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1470.4746529981494,"pid":12328,"interactive":1673.2036530004143}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":10.697713706017549,"other":192.03128629624717,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"18d559c1-f50a-482d-baf1-5e03a6aea4d5","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[162.48300000280142,50.48199999332428],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":50.48199999332428,"max":162.48300000280142,"sum":212.9649999961257,"meanlogs":4.5060951089485375,"variance":6272.112001561449,"mean":106.48249999806285},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"2be0298e-f59e-4b56-9a3a-10cd134b74ba","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[440.8449999988079,136.38299999386072],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":136.38299999386072,"max":440.8449999988079,"sum":577.2279999926686,"meanlogs":5.502080221952837,"variance":46348.55472350623,"mean":288.6139999963343},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"95a83409-8b7f-4869-946b-8d9320f7a714","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[162.50100000202656,50.4919999986887],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":50.4919999986887,"max":162.50100000202656,"sum":212.99300000071526,"meanlogs":4.506249531737064,"variance":6273.00804087387,"mean":106.49650000035763},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3776.59332100302,"stableId":"12344.1295.SliceGroup.2516","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3827.0853210017085,"stableId":"12344.1295.SliceGroup.2602","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.262581339684662,"other":43.22941865900404,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":3776.59332100302,"pid":12344,"fmp":3827.0853210017085}}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1062.3743209987879,"stableId":"12344.1295.SliceGroup.43","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1224.8753210008144,"stableId":"12344.1295.SliceGroup.486","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":22.093557667398244,"other":140.40744233462846,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1062.3743209987879,"pid":12344,"fmp":1224.8753210008144}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5811d8d6-3ac1-4376-be5c-7746fc6add13","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[287.0319999976159,50.4919999986887],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":50.4919999986887,"max":287.0319999976159,"sum":337.5239999963046,"meanlogs":4.790704307829166,"variance":27975.585799746244,"mean":168.7619999981523},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3776.59332100302,"stableId":"12344.1295.SliceGroup.2516","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":3776.59332100302,"pid":12344,"interactive":3827.0853210017085}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.262581339684662,"other":43.22941865900404,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1062.3743209987879,"stableId":"12344.1295.SliceGroup.43","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":64.592,"start":1334.8143209964037,"stableId":"12344.1295.SliceGroup.1314","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1062.3743209987879,"pid":12344,"interactive":1349.4063209964038}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":25.59417996654234,"other":261.437820031074,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"41f9d752-c102-4713-b3fe-b9d143078850","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[144.19200000166893],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":144.19200000166893,"max":144.19200000166893,"sum":144.19200000166893,"meanlogs":4.971145744821354,"variance":0,"mean":144.19200000166893},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ab7bac8a-6641-4891-95e6-c9f2700691c9","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[180.46000000089407],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":180.46000000089407,"max":180.46000000089407,"sum":180.46000000089407,"meanlogs":5.195509146571309,"variance":0,"mean":180.46000000089407},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a2060906-d772-4dce-855a-194b8750d68d","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[144.20500000566244],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":144.20500000566244,"max":144.20500000566244,"sum":144.20500000566244,"meanlogs":4.971235898352784,"variance":0,"mean":144.20500000566244},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1499.2115845009685,"stableId":"12371.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1643.416584506631,"stableId":"12371.1295.SliceGroup.491","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":12.871453827442304,"other":131.33354617822008,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1499.2115845009685,"pid":12371,"fmp":1643.416584506631}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3a38ff66-f077-4d69-9e62-460a4edd95e0","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[263.6500000003575],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":263.6500000003575,"max":263.6500000003575,"sum":263.6500000003575,"meanlogs":5.574622465977835,"variance":0,"mean":263.6500000003575},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1499.2115845009685,"stableId":"12371.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":132.216,"start":1680.645584501326,"stableId":"12371.1295.SliceGroup.688","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1499.2115845009685,"pid":12371,"interactive":1762.861584501326}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":19.351323453828954,"other":244.29867654652858,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"19f77af9-cdc6-49fa-909f-e92268cebb9f","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[157.93800000101328,53.311000004410744],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":53.311000004410744,"max":157.93800000101328,"sum":211.24900000542402,"meanlogs":4.519172619953633,"variance":5473.404564144534,"mean":105.62450000271201},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"1346938c-1bbd-49c1-9f50-48e27d782d33","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[205.67899999767542,14.987999998033047,97.43600000441074],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":3,"min":14.987999998033047,"max":205.67899999767542,"sum":318.1030000001192,"meanlogs":4.2042541113581375,"variance":18292.42574448572,"mean":106.03433333337307},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"0644db69-4a92-41bb-8c50-0bcbd84795b1","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[157.94799999892712,53.32000000029802],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":53.32000000029802,"max":157.94799999892712,"sum":211.26799999922514,"meanlogs":4.519288680121174,"variance":5473.509191856565,"mean":105.63399999961257},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3800.4072019979358,"stableId":"12477.1295.SliceGroup.1089","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3853.727201998234,"stableId":"12477.1295.SliceGroup.1275","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":11.907739235120454,"other":41.41226076517755,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":3800.4072019979358,"pid":12477,"fmp":3853.727201998234}}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1161.119202002883,"stableId":"12477.1295.SliceGroup.46","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1319.06720200181,"stableId":"12477.1295.SliceGroup.512","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":27.018283272946938,"other":130.92971672598026,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1161.119202002883,"pid":12477,"fmp":1319.06720200181}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"16472fe4-fbab-4fb6-8b7d-574addd88187","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[2761.1069999980928,121.81900000303995],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":121.81900000303995,"max":2761.1069999980928,"sum":2882.9260000011327,"meanlogs":6.362961650910026,"variance":3482920.573458943,"mean":1441.4630000005664},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3800.4072019979358,"stableId":"12477.1295.SliceGroup.1089","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":73.88,"start":3898.3462020009756,"stableId":"12477.1295.SliceGroup.1476","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":3800.4072019979358,"pid":12477,"interactive":3922.2262020009757}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":13.748215326475623,"other":108.07078467656432,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1161.119202002883,"stableId":"12477.1295.SliceGroup.46","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":73.88,"start":3898.3462020009756,"stableId":"12477.1295.SliceGroup.1476","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1161.119202002883,"pid":12477,"interactive":3922.2262020009757}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":2288.166215321516,"other":472.94078467656647,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"95811b85-f445-4462-9f7d-e12643d3966c","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[167.67499999701977],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":167.67499999701977,"max":167.67499999701977,"sum":167.67499999701977,"meanlogs":5.122027581968027,"variance":0,"mean":167.67499999701977},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"4252312b-dc07-49d0-8838-1a87f8c015eb","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[535.7069999948144],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":535.7069999948144,"max":535.7069999948144,"sum":535.7069999948144,"meanlogs":6.283587369806982,"variance":0,"mean":535.7069999948144},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"0a79bc9c-7fd4-4c51-8fa1-a1f50adf06b0","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[522.1279999986291],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":522.1279999986291,"max":522.1279999986291,"sum":522.1279999986291,"meanlogs":6.257912768548746,"variance":0,"mean":522.1279999986291},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1390.9719379991293,"stableId":"12502.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1913.0999379977584,"stableId":"12502.1295.SliceGroup.335","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":20.887765319936285,"other":501.2402346786927,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1390.9719379991293,"pid":12502,"fmp":1913.0999379977584}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ffcd41bb-8b86-4acc-a473-49146fa60f2d","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[865.292999997258],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":865.292999997258,"max":865.292999997258,"sum":865.292999997258,"meanlogs":6.763068177896923,"variance":0,"mean":865.292999997258},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1390.9719379991293,"stableId":"12502.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":220.912,"start":2085.3529379963875,"stableId":"12502.1295.SliceGroup.991","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1390.9719379991293,"pid":12502,"interactive":2256.2649379963873}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":25.97740895418478,"other":839.315591043073,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"63cc14d3-74d8-4260-a90c-ff90e2d13acc","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[187.2119999974966,60.483999997377396],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":60.483999997377396,"max":187.2119999974966,"sum":247.695999994874,"meanlogs":4.667310265873402,"variance":8029.992992015107,"mean":123.847999997437},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"90a57eed-c170-4f64-bdf6-d863d0394e45","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[576.9139999970794,133.43899999558926],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":133.43899999558926,"max":576.9139999970794,"sum":710.3529999926686,"meanlogs":5.6256688265726025,"variance":98335.03781316083,"mean":355.1764999963343},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c84d9c82-ee49-40a8-8765-fcd2fc79c9fb","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[562.7139999940991,125.57199999690056],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":125.57199999690056,"max":562.7139999940991,"sum":688.2859999909997,"meanlogs":5.582825402691217,"variance":95546.56408077538,"mean":344.14299999549985},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":4288.899080000818,"stableId":"12520.1295.SliceGroup.1821","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":4414.471079997718,"stableId":"12520.1295.SliceGroup.1970","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":32.31220147690038,"other":93.25979852000016,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":4288.899080000818,"pid":12520,"fmp":4414.471079997718}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1097.6900800019503,"stableId":"12520.1295.SliceGroup.42","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1660.4040799960494,"stableId":"12520.1295.SliceGroup.313","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":37.99864568807277,"other":524.7153543060263,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1097.6900800019503,"pid":12520,"fmp":1660.4040799960494}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"fa002527-5197-4488-9e94-fda46ed0a646","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[3566.1129999982713,374.9039999994038],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":374.9039999994038,"max":3566.1129999982713,"sum":3941.016999997675,"meanlogs":7.05295073964089,"variance":5091907.440836886,"mean":1970.5084999988376},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":4288.899080000818,"stableId":"12520.1295.SliceGroup.1821","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":201.669,"start":4512.134080000222,"stableId":"12520.1295.SliceGroup.2220","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":4288.899080000818,"pid":12520,"interactive":4663.803080000222}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":52.78322305895129,"other":322.1207769404524,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1097.6900800019503,"stableId":"12520.1295.SliceGroup.42","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":201.669,"start":4512.134080000222,"stableId":"12520.1295.SliceGroup.2220","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1097.6900800019503,"pid":12520,"interactive":4663.803080000222}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":2056.4012230578105,"other":1509.711776940458,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"35acf845-0ecd-43dd-9267-1e7feb018435","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[66.96399999409914],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":66.96399999409914,"max":66.96399999409914,"sum":66.96399999409914,"meanlogs":4.204155161465419,"variance":0,"mean":66.96399999409914},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ed9d9083-38e6-4ad2-85bf-411a1bd02f82","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[435.9099999964237],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":435.9099999964237,"max":435.9099999964237,"sum":435.9099999964237,"meanlogs":6.077435800014524,"variance":0,"mean":435.9099999964237},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"7735255f-4026-4db0-ae2f-994ba1c4ba38","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[158.4670000001788],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":158.4670000001788,"max":158.4670000001788,"sum":158.4670000001788,"meanlogs":5.065546369748696,"variance":0,"mean":158.4670000001788},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1460.03830049932,"stableId":"12548.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1618.5053004994988,"stableId":"12548.1295.SliceGroup.963","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":10.373592102044341,"other":148.0934078981346,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1460.03830049932,"pid":12548,"fmp":1618.5053004994988}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5a09e58b-1705-4bb8-92a8-685242de0ca6","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[384.72199999558916],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":384.72199999558916,"max":384.72199999558916,"sum":384.72199999558916,"meanlogs":5.952520995530414,"variance":0,"mean":384.72199999558916},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1460.03830049932,"stableId":"12548.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":97.908,"start":1796.8523004949093,"stableId":"12548.1295.SliceGroup.1457","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1460.03830049932,"pid":12548,"interactive":1844.7603004949092}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":11.979302491655005,"other":372.74269750393506,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a830d58f-e1a2-4598-9ca0-60fcf1e7fc7c","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[102.21299999952316,35.48499999940395],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":35.48499999940395,"max":102.21299999952316,"sum":137.69799999892712,"meanlogs":4.098084471600606,"variance":2226.3129920079546,"mean":68.84899999946356},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"d11771e4-d078-4129-a33d-5e451d999b92","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[186.46599999815226,430.2440000027418,14.380999997258186,183.84699999541044],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":4,"min":14.380999997258186,"max":430.2440000027418,"sum":814.9379999935627,"meanlogs":4.793153296774236,"variance":87855.01530352679,"mean":203.73449999839067},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":2,"diagnosticMaps":[{"url":{"type":"Generic","value":""}},{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a0c0bce4-4d12-49c9-87dc-a193d7d48876","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[102.24100000411272,127.07699999958277],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":102.24100000411272,"max":127.07699999958277,"sum":229.3180000036955,"meanlogs":4.736062986736041,"variance":308.4134478874941,"mean":114.65900000184774},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":2,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1114.3332275003195,"stableId":"12564.1295.SliceGroup.40","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1216.5742275044322,"stableId":"12564.1295.SliceGroup.287","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":23.83599263305738,"other":78.40500737105526,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1114.3332275003195,"pid":12564,"fmp":1216.5742275044322}}},{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3942.1702275052667,"stableId":"12564.1295.SliceGroup.2051","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":4069.2472275048494,"stableId":"12564.1295.SliceGroup.2433","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":16.567506653228094,"other":110.50949334635466,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":3942.1702275052667,"pid":12564,"fmp":4069.2472275048494}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"d9ef5cec-c73e-45dd-b946-fc1f09d521bf","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[3049.9940000008937,222.15699999594653],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":222.15699999594653,"max":3049.9940000008937,"sum":3272.1509999968403,"meanlogs":6.713139620747382,"variance":3998331.04929849,"mean":1636.0754999984201},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3942.1702275052667,"stableId":"12564.1295.SliceGroup.2051","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":84.284,"start":4130.043227501214,"stableId":"12564.1295.SliceGroup.2814","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":3942.1702275052667,"pid":12564,"interactive":4164.327227501213}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":17.668825556659385,"other":204.48817443928695,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1114.3332275003195,"stableId":"12564.1295.SliceGroup.40","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":84.284,"start":4130.043227501214,"stableId":"12564.1295.SliceGroup.2814","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1114.3332275003195,"pid":12564,"interactive":4164.327227501213}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":2254.5018255615896,"other":795.4921744392863,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3e4ae7c8-297d-41b8-88a2-cf0d1277c589","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[147.98200000077486],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":147.98200000077486,"max":147.98200000077486,"sum":147.98200000077486,"meanlogs":4.9970906447512204,"variance":0,"mean":147.98200000077486},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b52d9aed-3009-4335-99fb-cf593b66fe60","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[372.515999995172],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":372.515999995172,"max":372.515999995172,"sum":372.515999995172,"meanlogs":5.9202799899043335,"variance":0,"mean":372.515999995172},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"fcc41b33-ecb2-4d44-a729-12b33701dbe5","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[147.99099999666214],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":147.99099999666214,"max":147.99099999666214,"sum":147.99099999666214,"meanlogs":4.997151461081698,"variance":0,"mean":147.99099999666214},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1409.3311719968915,"stableId":"12591.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1557.3221719935536,"stableId":"12591.1295.SliceGroup.506","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":5.055772693341009,"other":142.93522730332108,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1409.3311719968915,"pid":12591,"fmp":1557.3221719935536}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"37ba9924-a9f2-449e-94af-730a35a765d4","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[215.67199999994045],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":215.67199999994045,"max":215.67199999994045,"sum":215.67199999994045,"meanlogs":5.373758735047611,"variance":0,"mean":215.67199999994045},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1409.3311719968915,"stableId":"12591.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":60.661,"start":1614.342171996832,"stableId":"12591.1295.SliceGroup.1339","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1409.3311719968915,"pid":12591,"interactive":1625.003171996832}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.151194885936373,"other":208.5208051140042,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"14acbb42-0527-47a8-8433-c0963175ed4a","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[151.07400000095367,48.9919999986887],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":48.9919999986887,"max":151.07400000095367,"sum":200.06599999964237,"meanlogs":4.454713401225837,"variance":5210.3673622312135,"mean":100.03299999982119},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3b3e9967-2d14-4a47-8e06-b9bc72dc6c6a","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[390.7719999998808,136.31400000303984],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":136.31400000303984,"max":390.7719999998808,"sum":527.0860000029206,"meanlogs":5.441542658874949,"variance":32374.436881196154,"mean":263.5430000014603},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a6efcebd-0b8a-4c0c-8e5b-ac177a3cc7c4","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[151.08600000292063,49],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":49,"max":151.08600000292063,"sum":200.08600000292063,"meanlogs":4.454834754622204,"variance":5210.7756982981555,"mean":100.04300000146031},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3781.6618789955974,"stableId":"12607.1295.SliceGroup.2473","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3830.6618789955974,"stableId":"12607.1295.SliceGroup.2563","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.278638092245469,"other":41.72136190775453,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":3781.6618789955974,"pid":12607,"fmp":3830.6618789955974}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1097.2128789946437,"stableId":"12607.1295.SliceGroup.43","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1248.2988789975643,"stableId":"12607.1295.SliceGroup.478","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":17.042867101963246,"other":134.04313290095735,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1097.2128789946437,"pid":12607,"fmp":1248.2988789975643}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"f481b5b5-8b41-45f2-b204-f7477499ddf5","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[236.0690000053644,49],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":49,"max":236.0690000053644,"sum":285.0690000053644,"meanlogs":4.677972216653847,"variance":17497.40538150351,"mean":142.5345000026822},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3781.6618789955974,"stableId":"12607.1295.SliceGroup.2473","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":3781.6618789955974,"pid":12607,"interactive":3830.6618789955974}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.278638092245469,"other":41.72136190775453,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1097.2128789946437,"stableId":"12607.1295.SliceGroup.43","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":64.309,"start":1318.972879000008,"stableId":"12607.1295.SliceGroup.1306","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1097.2128789946437,"pid":12607,"interactive":1333.281879000008}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":19.511697958034695,"other":216.55730204732936,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"764c1dba-ed02-4c82-8696-eac7a4fd13b1","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[144.32500000298023],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":144.32500000298023,"max":144.32500000298023,"sum":144.32500000298023,"meanlogs":4.972067700967647,"variance":0,"mean":144.32500000298023},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"78d3990c-65e5-4e6a-92fc-0e89b55b4d67","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[177.8180000036955],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":177.8180000036955,"max":177.8180000036955,"sum":177.8180000036955,"meanlogs":5.180760555321764,"variance":0,"mean":177.8180000036955},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c644d128-3393-4b01-b5e5-dfdff6c6599f","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[144.33500000089407],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":144.33500000089407,"max":144.33500000089407,"sum":144.33500000089407,"meanlogs":4.972136986618016,"variance":0,"mean":144.33500000089407},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1367.4031845033169,"stableId":"12634.1295.SliceGroup.30","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1511.738184504211,"stableId":"12634.1295.SliceGroup.480","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":13.636061310015075,"other":130.69893869087898,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1367.4031845033169,"pid":12634,"fmp":1511.738184504211}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"bbe92495-f924-49c4-8a41-d03e6c17ce27","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[258.3210000013114],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":258.3210000013114,"max":258.3210000013114,"sum":258.3210000013114,"meanlogs":5.554202997615148,"variance":0,"mean":258.3210000013114},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1367.4031845033169,"stableId":"12634.1295.SliceGroup.30","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":129.56300000000002,"start":1546.1611845046282,"stableId":"12634.1295.SliceGroup.677","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1367.4031845033169,"pid":12634,"interactive":1625.7241845046283}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":18.99433502986912,"other":239.3266649714422,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a4c6416c-cad4-4d5a-90b3-a6417e4e2164","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[172.46599999815226],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":172.46599999815226,"max":172.46599999815226,"sum":172.46599999815226,"meanlogs":5.150200115584382,"variance":0,"mean":172.46599999815226},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"977dc7ab-0759-42d5-bc39-ed93062f10f3","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[277.9209999963641,13.547000005841255,106.92300000041723],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":3,"min":13.547000005841255,"max":277.9209999963641,"sum":398.3910000026226,"meanlogs":4.301870323634383,"variance":35951.00174952996,"mean":132.7970000008742},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"9bc8e8f3-af09-4833-bc4a-faeef448a984","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[172.4780000001192],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":172.4780000001192,"max":172.4780000001192,"sum":172.4780000001192,"meanlogs":5.150269692106785,"variance":0,"mean":172.4780000001192},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1116.2510975077748,"stableId":"12650.1295.SliceGroup.43","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1288.729097507894,"stableId":"12650.1295.SliceGroup.513","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":39.16003215055435,"other":133.31796784956478,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1116.2510975077748,"pid":12650,"fmp":1288.729097507894}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"10e0fa26-2342-4c8f-bc84-ea6508b7e7b2","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[315.9119999968409],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":315.9119999968409,"max":315.9119999968409,"sum":315.9119999968409,"meanlogs":5.755463693781216,"variance":0,"mean":315.9119999968409},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1116.2510975077748,"stableId":"12650.1295.SliceGroup.43","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":86.20400000000001,"start":1395.9590975046158,"stableId":"12650.1295.SliceGroup.687","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1116.2510975077748,"pid":12650,"interactive":1432.1630975046157}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":104.45840612475396,"other":211.45359387208708,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5fc5661e-2e79-48af-8ccc-0a47e67b5d80","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[166.82799999415874],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":166.82799999415874,"max":166.82799999415874,"sum":166.82799999415874,"meanlogs":5.116963341509195,"variance":0,"mean":166.82799999415874},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"762a95c9-39d6-4258-92dc-d7c066ddaaa1","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[569.8699999973178],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":569.8699999973178,"max":569.8699999973178,"sum":569.8699999973178,"meanlogs":6.345408264636493,"variance":0,"mean":569.8699999973178},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"0322c0e4-a9f5-4b74-8908-679f3bdfc3d3","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[555.8559999987483],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":555.8559999987483,"max":555.8559999987483,"sum":555.8559999987483,"meanlogs":6.320509267898147,"variance":0,"mean":555.8559999987483},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1543.4436865001917,"stableId":"12676.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":2099.29968649894,"stableId":"12676.1295.SliceGroup.335","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":22.44348577871363,"other":533.4125142200343,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1543.4436865001917,"pid":12676,"fmp":2099.29968649894}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"e929a0a1-dfda-4370-bc44-1f0f2612a043","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[891.0729999937416],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":891.0729999937416,"max":891.0729999937416,"sum":891.0729999937416,"meanlogs":6.792426354522936,"variance":0,"mean":891.0729999937416},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1543.4436865001917,"stableId":"12676.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":215.418,"start":2269.098686493933,"stableId":"12676.1295.SliceGroup.1006","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1543.4436865001917,"pid":12676,"interactive":2434.5166864939333}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":34.29134416841775,"other":856.781655825323,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"24a1fc5a-bfe4-4765-8223-3caeb8bb41ed","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[578.1700000017881,60.00400000065565],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":60.00400000065565,"max":578.1700000017881,"sum":638.1740000024438,"meanlogs":5.2271395848779925,"variance":134248.00177858683,"mean":319.0870000012219},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"462e99a4-50a0-4962-b898-4879961c4ad2","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[593.2459999993443,133.67899999767542],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":133.67899999767542,"max":593.2459999993443,"sum":726.9249999970198,"meanlogs":5.64052527823161,"variance":105600.91374526698,"mean":363.4624999985099},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"823f398b-0073-4c64-bc84-3273a62cbfa7","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[578.1810000017285,128.55300000309944],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":128.55300000309944,"max":578.1810000017285,"sum":706.734000004828,"meanlogs":5.608114119565008,"variance":101082.6691913836,"mean":353.367000002414},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":4583.532423004508,"stableId":"12696.1295.SliceGroup.1861","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":4712.0854230076075,"stableId":"12696.1295.SliceGroup.2040","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":30.183027153543236,"other":98.36997284955618,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":4583.532423004508,"pid":12696,"fmp":4712.0854230076075}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1157.5914230048656,"stableId":"12696.1295.SliceGroup.43","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1735.7724230065942,"stableId":"12696.1295.SliceGroup.312","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":34.2369362395147,"other":543.9440637622141,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1157.5914230048656,"pid":12696,"fmp":1735.7724230065942}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5ea12131-0417-4098-a074-3c4d02aa6c92","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[3799.4540000008938,373.5130000012514],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":373.5130000012514,"max":3799.4540000008938,"sum":4172.967000002145,"meanlogs":7.08278273052068,"variance":5868535.867739275,"mean":2086.4835000010726},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474525015958,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":1}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":4583.532423004508,"stableId":"12696.1295.SliceGroup.1861","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":202.369,"start":4804.67642300576,"stableId":"12696.1295.SliceGroup.2261","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":4583.532423004508,"pid":12696,"interactive":4957.045423005759}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":50.593088758463324,"other":322.91991124278815,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1157.5914230048656,"stableId":"12696.1295.SliceGroup.43","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":202.369,"start":4804.67642300576,"stableId":"12696.1295.SliceGroup.2261","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1157.5914230048656,"pid":12696,"interactive":4957.045423005759}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"resource_loading":0,"layout":0,"script_execute":0,"overhead":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":2220.7960887580884,"other":1578.6579112428017,"gc":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ad6bcb41-68d6-40ca-acd2-cd7ee2db25fb","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[77.68599999696016],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":77.68599999696016,"max":77.68599999696016,"sum":77.68599999696016,"meanlogs":4.352675060919893,"variance":0,"mean":77.68599999696016},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"eedec467-e681-4371-b5f3-b91bb7442e43","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[465.0599999949336],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":465.0599999949336,"max":465.0599999949336,"sum":465.0599999949336,"meanlogs":6.142166429510581,"variance":0,"mean":465.0599999949336},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5cc69b27-e42f-46ca-9d65-6562dd3c67d4","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[187.1330000013113],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":187.1330000013113,"max":187.1330000013113,"sum":187.1330000013113,"meanlogs":5.2318195940039605,"variance":0,"mean":187.1330000013113},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1384.3658135160804,"stableId":"11801.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1571.4988135173917,"stableId":"11801.1295.SliceGroup.960","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":11.064142278283585,"other":176.06885772302763,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1384.3658135160804,"pid":11801,"fmp":1571.4988135173917}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"e58794bd-b491-4b70-9289-13bba25a6733","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[412.0879999979138],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":412.0879999979138,"max":412.0879999979138,"sum":412.0879999979138,"meanlogs":6.0212369187699,"variance":0,"mean":412.0879999979138},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1384.3658135160804,"stableId":"11801.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":106.703,"start":1739.7508135139942,"stableId":"11801.1295.SliceGroup.1463","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1384.3658135160804,"pid":11801,"interactive":1796.4538135139942}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":12.517328835374002,"other":399.5706711625395,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"7f42ce4b-95ed-4952-b859-122e8d85c6b0","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[100.5650000050664],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":100.5650000050664,"max":100.5650000050664,"sum":100.5650000050664,"meanlogs":4.610804284655564,"variance":0,"mean":100.5650000050664},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a3a02993-40a3-444f-be42-59f2f718fc54","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[169.01500000059605,419.5100000053644,19.10700000077486,165.83500000089407],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":4,"min":19.10700000077486,"max":419.5100000053644,"sum":773.4670000076294,"meanlogs":4.8075307275392785,"variance":82858.23497882795,"mean":193.36675000190735},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":2,"diagnosticMaps":[{"url":{"type":"Generic","value":""}},{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"35b6e4ba-1947-4e05-9e34-38c2093c725a","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[100.58900000154972],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":100.58900000154972,"max":100.58900000154972,"sum":100.58900000154972,"meanlogs":4.61104290776618,"variance":0,"mean":100.58900000154972},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1081.7041284888983,"stableId":"11818.1295.SliceGroup.44","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1182.293128490448,"stableId":"11818.1295.SliceGroup.288","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":21.356874769994135,"other":79.23212523155553,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1081.7041284888983,"pid":11818,"fmp":1182.293128490448}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"50dc4178-7d80-4bc0-8ccb-7e4330899006","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[2810.164000005782],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":2810.164000005782,"max":2810.164000005782,"sum":2810.164000005782,"meanlogs":7.94099812361612,"variance":0,"mean":2810.164000005782},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1081.7041284888983,"stableId":"11818.1295.SliceGroup.44","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":84.10600000000001,"start":3857.76212849468,"stableId":"11818.1295.SliceGroup.2255","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1081.7041284888983,"pid":11818,"interactive":3891.86812849468}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":2152.668743051542,"other":657.4952569542232,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"8c7fa4c7-11de-4047-b6c8-39c3c4414875","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[174.91499999910593],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":174.91499999910593,"max":174.91499999910593,"sum":174.91499999910593,"meanlogs":5.1643001416352945,"variance":0,"mean":174.91499999910593},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"30e7f300-20e2-474a-9ffd-55e7902b8d59","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[369.07200000435114],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":369.07200000435114,"max":369.07200000435114,"sum":369.07200000435114,"meanlogs":5.910991746969724,"variance":0,"mean":369.07200000435114},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b7a529e0-eed8-433d-8b39-6c70f26dad80","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[174.92500000447035],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":174.92500000447035,"max":174.92500000447035,"sum":174.92500000447035,"meanlogs":5.1643573106575165,"variance":0,"mean":174.92500000447035},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1627.5407289937139,"stableId":"11846.1295.SliceGroup.30","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1802.4657289981842,"stableId":"11846.1295.SliceGroup.517","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":35.66346513730498,"other":139.26153486716524,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1627.5407289937139,"pid":11846,"fmp":1802.4657289981842}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"14589394-eaee-443e-bfbb-fd065bd57472","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[240.3490000032782],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":240.3490000032782,"max":240.3490000032782,"sum":240.3490000032782,"meanlogs":5.482092033745827,"variance":0,"mean":240.3490000032782},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1627.5407289937139,"stableId":"11846.1295.SliceGroup.30","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":60.954,"start":1856.935728996992,"stableId":"11846.1295.SliceGroup.1363","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1627.5407289937139,"pid":11846,"interactive":1867.889728996992}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":37.658354569158234,"other":202.69064543412003,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"bdcb89ec-39f9-4b7a-b064-aafe20915fac","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[206.68400000035763],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":206.68400000035763,"max":206.68400000035763,"sum":206.68400000035763,"meanlogs":5.331191056823527,"variance":0,"mean":206.68400000035763},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"8bc232fa-f494-4f74-a4f2-f5e562c5e49e","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[438.89000000059605,126.21899999678135],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":2,"min":126.21899999678135,"max":438.89000000059605,"sum":565.1089999973774,"meanlogs":5.461133652813592,"variance":48881.577121692746,"mean":282.5544999986887},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c6591338-dcf5-472e-aef3-806599b463f2","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[206.7009999975562],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":206.7009999975562,"max":206.7009999975562,"sum":206.7009999975562,"meanlogs":5.331273304593563,"variance":0,"mean":206.7009999975562},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1121.4953815042973,"stableId":"11862.1295.SliceGroup.42","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1328.1963815018535,"stableId":"11862.1295.SliceGroup.512","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":16.210068882347453,"other":190.49093111520864,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1121.4953815042973,"pid":11862,"fmp":1328.1963815018535}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"4c23bf1b-51e9-4f32-8702-494e179ab17c","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[255.1739999962449],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":255.1739999962449,"max":255.1739999962449,"sum":255.1739999962449,"meanlogs":5.541945665387967,"variance":0,"mean":255.1739999962449},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1121.4953815042973,"stableId":"11862.1295.SliceGroup.42","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":51.731,"start":1374.9383815005422,"stableId":"11862.1295.SliceGroup.1301","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1121.4953815042973,"pid":11862,"interactive":1376.6693815005422}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":18.37495827799217,"other":236.79904171825237,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c4cc047b-71f8-4cb4-921b-e0d00cc358b1","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[122.69900000095367],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":122.69900000095367,"max":122.69900000095367,"sum":122.69900000095367,"meanlogs":4.809734201732177,"variance":0,"mean":122.69900000095367},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"51a96368-437c-4505-ac94-285ead995fe1","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[199.9919999986887],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":199.9919999986887,"max":199.9919999986887,"sum":199.9919999986887,"meanlogs":5.298277365741458,"variance":0,"mean":199.9919999986887},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ab585ae6-1adc-4fa3-9444-2af3eb77f372","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[122.70799999684095],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":122.70799999684095,"max":122.70799999684095,"sum":122.70799999684095,"meanlogs":4.809807549239717,"variance":0,"mean":122.70799999684095},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1649.0234330073,"stableId":"11889.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1771.7314330041409,"stableId":"11889.1295.SliceGroup.413","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":15.774498660011979,"other":106.93350133682905,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1649.0234330073,"pid":11889,"fmp":1771.7314330041409}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"56e26be1-7034-4cc4-98f3-44c2e8e5343b","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[283.91300000286105],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":283.91300000286105,"max":283.91300000286105,"sum":283.91300000286105,"meanlogs":5.648667853212036,"variance":0,"mean":283.91300000286105},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1649.0234330073,"stableId":"11889.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":132.941,"start":1849.995433010161,"stableId":"11889.1295.SliceGroup.678","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1649.0234330073,"pid":11889,"interactive":1932.936433010161}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":27.37620882922174,"other":256.5367911736394,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c594fad5-a8b0-4fba-a1ab-7aa3302663e1","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[114.8129999935627,53.56400000303984],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":2,"min":53.56400000303984,"max":114.8129999935627,"sum":168.37699999660254,"meanlogs":4.362090959263188,"variance":1875.7199999195348,"mean":84.18849999830127},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"1951659e-e599-460b-b791-77fc30cf2d2e","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[287.23200000077486,11.098999999463558,97.79399999976158],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":3,"min":11.098999999463558,"max":287.23200000077486,"sum":396.125,"meanlogs":4.216669497055796,"variance":39884.07085305326,"mean":132.04166666666666},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"e263a41d-0934-4f61-82cc-f4f6161b92c4","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[114.82999999821186,53.574000000953674],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":2,"min":53.574000000953674,"max":114.82999999821186,"sum":168.40399999916553,"meanlogs":4.362258324776731,"variance":1876.1487678320475,"mean":84.20199999958277},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3890.440709002316,"stableId":"11959.1295.SliceGroup.1184","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3944.0147090032697,"stableId":"11959.1295.SliceGroup.1373","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":11.239109167335922,"other":42.33489083361774,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":3890.440709002316,"pid":11959,"fmp":3944.0147090032697}}}]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1117.5747090056539,"stableId":"11959.1295.SliceGroup.46","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1232.4047090038657,"stableId":"11959.1295.SliceGroup.405","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":29.156049964359713,"other":85.67395003385212,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1117.5747090056539,"pid":11959,"fmp":1232.4047090038657}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3db245ed-cd1f-41b1-9e13-b029d2dc5c11","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[366.2449999960661,53.574000000953674],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":2,"min":53.574000000953674,"max":366.2449999960661,"sum":419.8189999970198,"meanlogs":4.942183192065576,"variance":48881.5771189718,"mean":209.9094999985099},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3890.440709002316,"stableId":"11959.1295.SliceGroup.1184","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":3890.440709002316,"pid":11959,"interactive":3944.0147090032697}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":11.239109167335922,"other":42.33489083361774,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1117.5747090056539,"stableId":"11959.1295.SliceGroup.46","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":128.019,"start":1405.80070900172,"stableId":"11959.1295.SliceGroup.696","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1117.5747090056539,"pid":11959,"interactive":1483.81970900172}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":125.301376659194,"other":240.94362333687243,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"43aadd24-f8c4-4b52-b202-dbc996fa54ca","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[168.3559999987483],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":168.3559999987483,"max":168.3559999987483,"sum":168.3559999987483,"meanlogs":5.126080785000198,"variance":0,"mean":168.3559999987483},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"f05b17f5-18e9-46fd-b98d-66ccbf2e1129","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[544.262000001967],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":544.262000001967,"max":544.262000001967,"sum":544.262000001967,"meanlogs":6.299430748566061,"variance":0,"mean":544.262000001967},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3442daea-e8d3-4747-8de5-726416b9e5ac","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[529.4430000036955],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":529.4430000036955,"max":529.4430000036955,"sum":529.4430000036955,"meanlogs":6.271825510528688,"variance":0,"mean":529.4430000036955},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1419.8980244919658,"stableId":"12034.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1949.3410244956613,"stableId":"12034.1295.SliceGroup.334","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":22.4746849734956,"other":506.96831503019973,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1419.8980244919658,"pid":12034,"fmp":1949.3410244956613}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"4bba85f2-5f6b-4da0-9503-5063b746a772","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[894.5890000020863],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":894.5890000020863,"max":894.5890000020863,"sum":894.5890000020863,"meanlogs":6.796364394927272,"variance":0,"mean":894.5890000020863},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1419.8980244919658,"stableId":"12034.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":243.97400000000002,"start":2120.513024494052,"stableId":"12034.1295.SliceGroup.1006","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1419.8980244919658,"pid":12034,"interactive":2314.487024494052}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":32.65236415117956,"other":861.9366358509064,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"679e1cbe-100a-4a96-9b35-71c1bc9db77d","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[222.60000000149012],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":222.60000000149012,"max":222.60000000149012,"sum":222.60000000149012,"meanlogs":5.405376438848139,"variance":0,"mean":222.60000000149012},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5f278d34-4c75-43d6-9537-f12e25025040","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[628.777999997139,120.972999997437],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":2,"min":120.972999997437,"max":628.777999997139,"sum":749.750999994576,"meanlogs":5.619672816700583,"variance":128932.95901234866,"mean":374.875499997288},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"1ec7888f-6846-4027-8141-b9a65bedad53","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[614.2700000032783],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":614.2700000032783,"max":614.2700000032783,"sum":614.2700000032783,"meanlogs":6.420434570909119,"variance":0,"mean":614.2700000032783},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1121.9041349887848,"stableId":"12050.1295.SliceGroup.58","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1736.174134992063,"stableId":"12050.1295.SliceGroup.328","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":35.0266396116469,"other":579.243360391631,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1121.9041349887848,"pid":12050,"fmp":1736.174134992063}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"fc72d305-2d9a-4508-83e4-4b943e0f2721","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[3669.2989999979136],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":0}},"running":{"count":1,"min":3669.2989999979136,"max":3669.2989999979136,"sum":3669.2989999979136,"meanlogs":8.207755914629276,"variance":0,"mean":3669.2989999979136},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1121.9041349887848,"stableId":"12050.1295.SliceGroup.58","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":242.78900000000002,"start":4598.414134986699,"stableId":"12050.1295.SliceGroup.2002","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1121.9041349887848,"pid":12050,"interactive":4791.203134986698}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":2166.647966922908,"other":1502.6510330749925,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"824e13f0-f90c-4a15-8a6c-57b34c1d44e7","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[69.78699999302626],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":69.78699999302626,"max":69.78699999302626,"sum":69.78699999302626,"meanlogs":4.245447745904042,"variance":0,"mean":69.78699999302626},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"271d4c2c-4109-408a-97d4-2f5c30cac487","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[415.89599999785423],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":415.89599999785423,"max":415.89599999785423,"sum":415.89599999785423,"meanlogs":6.0304352290008945,"variance":0,"mean":415.89599999785423},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"1521e9c3-d8e2-4e06-aeb8-c46f7a7f2d1b","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[159.195999994874],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":159.195999994874,"max":159.195999994874,"sum":159.195999994874,"meanlogs":5.0701361474342885,"variance":0,"mean":159.195999994874},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1389.7550839930773,"stableId":"12075.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1548.9510839879513,"stableId":"12075.1295.SliceGroup.964","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":11.0330303962687,"other":148.16296959860546,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1389.7550839930773,"pid":12075,"fmp":1548.9510839879513}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b7ecc4a1-5bf0-4dcc-8b93-020a011b108d","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[364.4669999930263],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":364.4669999930263,"max":364.4669999930263,"sum":364.4669999930263,"meanlogs":5.898436012351617,"variance":0,"mean":364.4669999930263},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1389.7550839930773,"stableId":"12075.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":79.805,"start":1724.4170839861035,"stableId":"12075.1295.SliceGroup.1456","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1389.7550839930773,"pid":12075,"interactive":1754.2220839861036}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":12.509548351717363,"other":351.95745164130926,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b2773bef-4a16-4f64-9bf7-910c94383ef7","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":0,"min":null,"max":null,"sum":0,"meanlogs":0,"variance":0},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"6d5ab1cb-2c80-4b22-8b6c-c65aaa4fe632","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[454.93900000303984],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":454.93900000303984,"max":454.93900000303984,"sum":454.93900000303984,"meanlogs":6.120163344035926,"variance":0,"mean":454.93900000303984},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"https://www.google.com/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5d1296a8-2aec-4e82-b42a-50bca3771857","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":0,"min":null,"max":null,"sum":0,"meanlogs":0,"variance":0},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"694e0579-ccdc-493b-a1e2-1c066ea6523c","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":0,"min":null,"max":null,"sum":0,"meanlogs":0,"variance":0},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"8de2f691-d191-4280-b17d-bd16aa25d51e","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[40.51300000399351],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":40.51300000399351,"max":40.51300000399351,"sum":40.51300000399351,"meanlogs":3.7016229103598723,"variance":0,"mean":40.51300000399351},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://does.not.exist/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c5f54f51-57ee-4a9a-b6b1-a8fd5028ff2e","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[23.75400000065565],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":23.75400000065565,"max":23.75400000065565,"sum":23.75400000065565,"meanlogs":3.16775093737965,"variance":0,"mean":23.75400000065565},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://does.not.exist/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"08e777d3-2c2f-4451-810e-b7286af27d10","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[40.51799999922514],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":40.51799999922514,"max":40.51799999922514,"sum":40.51799999922514,"meanlogs":3.701746319801636,"variance":0,"mean":40.51799999922514},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1169.6918735131621,"stableId":"12117.1295.SliceGroup.46","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1210.2098735123873,"stableId":"12117.1295.SliceGroup.106","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":15.933244660225771,"other":24.584755338999354,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://does.not.exist/","start":1169.6918735131621,"pid":12117,"fmp":1210.2098735123873}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"886977b1-35b3-420b-8548-8ee69e3e88d7","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[40.51799999922514],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":40.51799999922514,"max":40.51799999922514,"sum":40.51799999922514,"meanlogs":3.701746319801636,"variance":0,"mean":40.51799999922514},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1169.6918735131621,"stableId":"12117.1295.SliceGroup.46","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://does.not.exist/","start":1169.6918735131621,"pid":12117,"interactive":1210.2098735123873}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":15.933244660225771,"other":24.584755338999354,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"0f020488-607e-43e4-98fa-84cca1d27c78","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[298.8019999936223],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":298.8019999936223,"max":298.8019999936223,"sum":298.8019999936223,"meanlogs":5.699781146655345,"variance":0,"mean":298.8019999936223},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"52c10ad3-e609-46b2-a80a-6159d1713e2d","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[426.29800000041723,121.63100000470877],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":2,"min":121.63100000470877,"max":426.29800000041723,"sum":547.929000005126,"meanlogs":5.428065251760227,"variance":46410.99044319251,"mean":273.964500002563},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"65780f35-4ab5-4ef1-8cd9-dee88998e1a2","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[298.8119999989867],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":298.8119999989867,"max":298.8119999989867,"sum":298.8119999989867,"meanlogs":5.699814613091425,"variance":0,"mean":298.8119999989867},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1040.574086010456,"stableId":"12152.1295.SliceGroup.24","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1339.3860860094428,"stableId":"12152.1295.SliceGroup.1307","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":29.087569628639777,"other":269.72443037034697,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1040.574086010456,"pid":12152,"fmp":1339.3860860094428}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ea042da5-93b9-4ff2-bace-46e242a45229","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[298.8119999989867],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":298.8119999989867,"max":298.8119999989867,"sum":298.8119999989867,"meanlogs":5.699814613091425,"variance":0,"mean":298.8119999989867},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1040.574086010456,"stableId":"12152.1295.SliceGroup.24","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1040.574086010456,"pid":12152,"interactive":1339.3860860094428}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":29.087569628639777,"other":269.72443037034697,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"47b98085-eb79-4730-b3ee-f4399fa3093c","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[142.36299999803305],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":142.36299999803305,"max":142.36299999803305,"sum":142.36299999803305,"meanlogs":4.9583801337413425,"variance":0,"mean":142.36299999803305},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"0379dd81-e130-4ee1-8eb5-719bdf87213e","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[176.20499999821186],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":176.20499999821186,"max":176.20499999821186,"sum":176.20499999821186,"meanlogs":5.171648089933811,"variance":0,"mean":176.20499999821186},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b5e12f4a-5eda-4739-917e-855d222485ec","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[142.37299999594688],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":142.37299999594688,"max":142.37299999594688,"sum":142.37299999594688,"meanlogs":4.958450374230203,"variance":0,"mean":142.37299999594688},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1370.2897255048156,"stableId":"12179.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1512.6627255007625,"stableId":"12179.1295.SliceGroup.490","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":12.760391732384594,"other":129.61260826356238,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1370.2897255048156,"pid":12179,"fmp":1512.6627255007625}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"8c3a4afa-17d9-4908-bfdf-bbf704b33e04","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[261.44899999535073],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":261.44899999535073,"max":261.44899999535073,"sum":261.44899999535073,"meanlogs":5.5662392357859405,"variance":0,"mean":261.44899999535073},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1370.2897255048156,"stableId":"12179.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":134.091,"start":1547.6477255001664,"stableId":"12179.1295.SliceGroup.681","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1370.2897255048156,"pid":12179,"interactive":1631.7387255001663}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":19.44125065067645,"other":242.00774934467435,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"b8222f1c-f7c3-4a74-b650-3b42fbd7835b","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[181.58899999409914],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":181.58899999409914,"max":181.58899999409914,"sum":181.58899999409914,"meanlogs":5.201745891612873,"variance":0,"mean":181.58899999409914},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"93993d5f-8ba2-4ff8-9490-efef750bc4cb","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[237.9599999934435,13.302000001072884,93.10499999672174],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":3,"min":13.302000001072884,"max":237.9599999934435,"sum":344.3669999912381,"meanlogs":4.197914960244518,"variance":25940.90226430926,"mean":114.78899999707937},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"88b1d72e-730b-452a-9a02-f4c34086f56a","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[181.59999999403954],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":181.59999999403954,"max":181.59999999403954,"sum":181.59999999403954,"meanlogs":5.201806466134371,"variance":0,"mean":181.59999999403954},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1217.8226570189,"stableId":"12198.1295.SliceGroup.48","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1399.4226570129395,"stableId":"12198.1295.SliceGroup.501","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":23.386027997793608,"other":158.213971996246,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1217.8226570189,"pid":12198,"fmp":1399.4226570129395}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"88106d68-7701-41e1-ba5f-b76361adf148","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[341.4429999974966],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":341.4429999974966,"max":341.4429999974966,"sum":341.4429999974966,"meanlogs":5.833180754384233,"variance":0,"mean":341.4429999974966},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1217.8226570189,"stableId":"12198.1295.SliceGroup.48","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":152.106,"start":1457.1596570163965,"stableId":"12198.1295.SliceGroup.649","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1217.8226570189,"pid":12198,"interactive":1559.2656570163965}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":47.75107649629095,"other":293.69192350120557,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"25d84e46-88b8-4b60-99f0-5841777d0ef7","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[163.277000002563],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":163.277000002563,"max":163.277000002563,"sum":163.277000002563,"meanlogs":5.095448145002096,"variance":0,"mean":163.277000002563},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5a669333-f1ce-4b36-b22c-cea0bddfe712","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[544.1000000014901],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":544.1000000014901,"max":544.1000000014901,"sum":544.1000000014901,"meanlogs":6.299133053494618,"variance":0,"mean":544.1000000014901},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"5216b844-0d25-4a1c-931a-dea13dab73de","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[529.8669999986887],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":529.8669999986887,"max":529.8669999986887,"sum":529.8669999986887,"meanlogs":6.2726260316559035,"variance":0,"mean":529.8669999986887},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1348.7140690088272,"stableId":"12224.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1878.581069007516,"stableId":"12224.1295.SliceGroup.335","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":20.208694228752883,"other":509.65830576993596,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1348.7140690088272,"pid":12224,"fmp":1878.581069007516}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"30da3456-16db-4aff-bc7e-06d3fbd8a553","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[869.5389999971985],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":869.5389999971985,"max":869.5389999971985,"sum":869.5389999971985,"meanlogs":6.767963186149236,"variance":0,"mean":869.5389999971985},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1348.7140690088272,"stableId":"12224.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":221.897,"start":2046.3560690060258,"stableId":"12224.1295.SliceGroup.999","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","start":1348.7140690088272,"pid":12224,"interactive":2218.2530690060257}},"Breakdown of [navStart, Interactive]":{"type":"Breakdown","values":{"raster":0,"style":0,"layout":0,"resource_loading":0,"composite":0,"renderer_misc":0,"startup":0,"gpu":0,"parseHTML":0,"script_parse_and_compile":0,"record":0,"idle":28.608967267261757,"other":840.9300327299372,"overhead":0,"imageDecode":0,"input":0,"gc":0,"net":0,"iframe_creation":0,"v8_runtime":0,"script_execute":0},"colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3bf635b7-9e6c-4e7b-9bba-4a39b4f77538","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[],"name":"timeToFirstContentfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":0,"min":null,"max":null,"sum":0,"meanlogs":0,"variance":0},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3dc3efec-e910-4af6-8ae2-3038e4e4bab1","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[71.23400000482798],"name":"timeToOnload","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":1,"min":71.23400000482798,"max":71.23400000482798,"sum":71.23400000482798,"meanlogs":4.26597023259534,"variance":0,"mean":71.23400000482798},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"https://www.google.com/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"eca6cc37-2018-45ec-8a40-efd155c9b872","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[],"name":"timeToFirstMeaningfulPaint","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":0,"min":null,"max":null,"sum":0,"meanlogs":0,"variance":0},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"58e10848-0ce3-451e-82d4-6d394961c579","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[],"name":"timeToFirstInteractive","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"underflowBin":{"count":0,"diagnosticMaps":[]},"diagnostics":{"iteration":{"storyDisplayName":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","type":"IterationInfo","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524648636,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://news.google.co.in/nwshp?tab=in&amp;hl=hi","os-version":"10.11.6","storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"storyRepeatCounter":0,"storysetRepeatCounter":1}},"running":{"count":0,"min":null,"max":null,"sum":0,"meanlogs":0,"variance":0},"nanDiagnosticMaps":[],"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"numNans":0,"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"87e6abcf-e778-43fe-a3cf-354bd0d8965a","maxNumSampleValues":620,"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[91.76999999582767],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":91.76999999582767,"max":91.76999999582767,"sum":91.76999999582767,"meanlogs":4.519285446785457,"variance":0,"mean":91.76999999582767},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"f55f293c-c129-4116-9338-6fbf46f8778a","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[393.8420000001788],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":393.8420000001788,"max":393.8420000001788,"sum":393.8420000001788,"meanlogs":5.9759498136418525,"variance":0,"mean":393.8420000001788},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"36414695-8336-404d-9957-15876f65107b","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[302.79800000041723],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":302.79800000041723,"max":302.79800000041723,"sum":302.79800000041723,"meanlogs":5.7130659165230435,"variance":0,"mean":302.79800000041723},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1399.2109434902668,"stableId":"11524.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1702.008943490684,"stableId":"11524.1295.SliceGroup.1065","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":10.000295067814552,"other":292.7977049326023,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1399.2109434902668,"pid":11524,"fmp":1702.008943490684}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"9349a7d0-2b9b-4a0e-ae74-5a9269f66052","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[450.0000000002385],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":450.0000000002385,"max":450.0000000002385,"sum":450.0000000002385,"meanlogs":6.109247582764896,"variance":0,"mean":450.0000000002385},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1399.2109434902668,"stableId":"11524.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":101.419,"start":1797.7919434905052,"stableId":"11524.1295.SliceGroup.1570","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1399.2109434902668,"pid":11524,"interactive":1849.2109434905053}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":11.984595887104554,"other":438.01540411313397,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3d99e6cf-e3a1-4e01-b389-70ac422997fd","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[74.5190000012517,30.71400000154972],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":30.71400000154972,"max":74.5190000012517,"sum":105.23300000280142,"meanlogs":3.867886351598893,"variance":959.4390124869451,"mean":52.61650000140071},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"82f292bf-c943-49dd-88ed-40327a5bfd8f","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[192.18899999558926,438.2550000026822,20.133000001311302,183.03100000321865],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":4,"min":20.133000001311302,"max":438.2550000026822,"sum":833.6080000028014,"meanlogs":4.888323998227515,"variance":89184.16698071898,"mean":208.40200000070035},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":2,"diagnosticMaps":[{"url":{"type":"Generic","value":""}},{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://www.rambler.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"a68015f9-43e0-4952-b768-42113e7f4675","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[346.3640000000596,125.46599999815226],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":125.46599999815226,"max":346.3640000000596,"sum":471.82999999821186,"meanlogs":5.339762525354377,"variance":24397.963202421328,"mean":235.91499999910593},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3836.9993580058217,"stableId":"11543.1295.SliceGroup.2043","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3962.465358003974,"stableId":"11543.1295.SliceGroup.2430","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":12.847765894453762,"other":112.61823410369858,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":3836.9993580058217,"pid":11543,"fmp":3962.465358003974}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1068.3513580039144,"stableId":"11543.1295.SliceGroup.44","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1414.715358003974,"stableId":"11543.1295.SliceGroup.1053","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":22.816260139662713,"other":323.5477398603962,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1068.3513580039144,"pid":11543,"fmp":1414.715358003974}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ff027f53-5b4f-40a6-a072-cfbb0af7c703","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[2985.265000003159,216.61700000125165],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":216.61700000125165,"max":2985.265000003159,"sum":3201.8820000044107,"meanlogs":6.68978730814373,"variance":3832705.873957281,"mean":1600.9410000022053},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://www.rambler.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://www.rambler.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3836.9993580058217,"stableId":"11543.1295.SliceGroup.2043","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":80.098,"start":4023.5183580070734,"stableId":"11543.1295.SliceGroup.2801","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":3836.9993580058217,"pid":11543,"interactive":4053.6163580070734}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":13.945964882021752,"other":202.67103511922988,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1068.3513580039144,"stableId":"11543.1295.SliceGroup.44","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":80.098,"start":4023.5183580070734,"stableId":"11543.1295.SliceGroup.2801","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://www.rambler.ru/","start":1068.3513580039144,"pid":11543,"interactive":4053.6163580070734}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":2198.677964883916,"other":786.5870351192285,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"7fe01972-287f-49cd-a271-e0b5669ed4c8","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[143.5839999988675],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":143.5839999988675,"max":143.5839999988675,"sum":143.5839999988675,"meanlogs":4.966920229785686,"variance":0,"mean":143.5839999988675},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3c51c7f7-3ad8-46b3-a1b1-287fe27f0f28","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[366.18100000172853],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":366.18100000172853,"max":366.18100000172853,"sum":366.18100000172853,"meanlogs":5.903127746682823,"variance":0,"mean":366.18100000172853},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"e251e203-763e-4c53-b607-7b89aec26b04","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[143.59300000220537],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":143.59300000220537,"max":143.59300000220537,"sum":143.59300000220537,"meanlogs":4.966982908923226,"variance":0,"mean":143.59300000220537},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1377.9881389960647,"stableId":"11570.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1521.58113899827,"stableId":"11570.1295.SliceGroup.506","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":5.0385919601041245,"other":138.55440804210127,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1377.9881389960647,"pid":11570,"fmp":1521.58113899827}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"adf13e4d-17e6-498f-9c44-ee663ef8d7dc","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[203.03299999994033],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":203.03299999994033,"max":203.03299999994033,"sum":203.03299999994033,"meanlogs":5.313368527406147,"variance":0,"mean":203.03299999994033},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1377.9881389960647,"stableId":"11570.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":57.522,"start":1573.499138996005,"stableId":"11570.1295.SliceGroup.1336","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1377.9881389960647,"pid":11570,"interactive":1581.021138996005}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":6.9609152478100595,"other":196.07208475213042,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"1a0bf9b4-53ae-4439-a85b-0b3d6e907372","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[160.35500000417233,49.66799999773502],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":49.66799999773502,"max":160.35500000417233,"sum":210.02300000190735,"meanlogs":4.491375484988935,"variance":6125.805985212525,"mean":105.01150000095367},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"6987aa7b-0bbc-413e-980c-e8081f55784c","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[418.5,140.77799999713898],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":140.77799999713898,"max":418.5,"sum":559.277999997139,"meanlogs":5.491930535712423,"variance":38564.75464279457,"mean":279.6389999985695},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://apeha.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"3bd8066b-59aa-44dd-8301-e375b6e032a7","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[160.37399999797344,49.677000001072884],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":49.677000001072884,"max":160.37399999797344,"sum":210.05099999904633,"meanlogs":4.491525318433982,"variance":6126.912904156901,"mean":105.02549999952316},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3754.2288999930024,"stableId":"11594.1295.SliceGroup.2485","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3803.9058999940753,"stableId":"11594.1295.SliceGroup.2573","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.273713895046988,"other":42.40328610602589,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":3754.2288999930024,"pid":11594,"fmp":3803.9058999940753}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1083.3048999905586,"stableId":"11594.1295.SliceGroup.44","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1243.678899988532,"stableId":"11594.1295.SliceGroup.485","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":23.603434336051507,"other":136.77056566192178,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1083.3048999905586,"pid":11594,"fmp":1243.678899988532}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"2f1d27ce-6656-4acd-b611-0e2e4560abdf","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[251.40000000381474,49.677000001072884],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":49.677000001072884,"max":251.40000000381474,"sum":301.0770000048876,"meanlogs":4.7162936727606874,"variance":20346.084365053095,"mean":150.5385000024438},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://apeha.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://apeha.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3754.2288999930024,"stableId":"11594.1295.SliceGroup.2485","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":3754.2288999930024,"pid":11594,"interactive":3803.9058999940753}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":7.273713895046988,"other":42.40328610602589,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1083.3048999905586,"stableId":"11594.1295.SliceGroup.44","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":68.729,"start":1315.9758999943733,"stableId":"11594.1295.SliceGroup.1319","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://apeha.ru/","start":1083.3048999905586,"pid":11594,"interactive":1334.7048999943734}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":26.261816736083382,"other":225.13818326773122,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"ce22ee68-69f6-413b-b912-d454cca2527d","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[120.01399999856949],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":120.01399999856949,"max":120.01399999856949,"sum":120.01399999856949,"meanlogs":4.787608402631767,"variance":0,"mean":120.01399999856949},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"f0b0220f-0b23-44ae-a298-87913643634f","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[189.93800000101328],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":189.93800000101328,"max":189.93800000101328,"sum":189.93800000101328,"meanlogs":5.246697703123765,"variance":0,"mean":189.93800000101328},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"1134d02b-3f7a-4c30-8897-371b8854cfcf","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[120.027000002563],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":120.027000002563,"max":120.027000002563,"sum":120.027000002563,"meanlogs":4.787716717494696,"variance":0,"mean":120.027000002563},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1368.4696565046906,"stableId":"11709.1295.SliceGroup.29","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1488.4966565072536,"stableId":"11709.1295.SliceGroup.422","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":16.75176154054231,"other":103.27523846202068,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1368.4696565046906,"pid":11709,"fmp":1488.4966565072536}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"c817f5c1-ed3b-4d33-aa06-8cb471548215","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[274.29599999749666],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":1,"min":274.29599999749666,"max":274.29599999749666,"sum":274.29599999749666,"meanlogs":5.6142078152542805,"variance":0,"mean":274.29599999749666},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-cold"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1368.4696565046906,"stableId":"11709.1295.SliceGroup.29","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":133.334,"start":1559.4316565021873,"stableId":"11709.1295.SliceGroup.681","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1368.4696565046906,"pid":11709,"interactive":1642.7656565021873}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":25.363932376368666,"other":248.93206762112794,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"532ab408-0adf-4438-9c84-ca0b87a98656","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"},{"sampleValues":[114.11800000071526,51.260999999940395],"name":"timeToFirstContentfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":51.260999999940395,"max":114.11800000071526,"sum":165.37900000065565,"meanlogs":4.337081614959615,"variance":1975.5012245487053,"mean":82.68950000032783},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"45371f21-459d-4239-b9c4-53cba703d900","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first contentful paint"},{"sampleValues":[322.7669999971986,10.686999998986721,95.79699999839067],"name":"timeToOnload","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":3,"min":10.686999998986721,"max":322.7669999971986,"sum":429.250999994576,"meanlogs":4.2360633731184985,"variance":52051.006466080435,"mean":143.08366666485867},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":""}}]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"url":{"type":"Generic","value":"http://narod.yandex.ru/"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"8b058e8c-9b9e-4580-aa5a-506bb0efb8df","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to onload. This is temporary metric used for PCv1/v2 sanity checking"},{"sampleValues":[114.1359999999404,51.270000003278255],"name":"timeToFirstMeaningfulPaint","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":51.270000003278255,"max":114.1359999999404,"sum":165.40600000321865,"meanlogs":4.337248252835771,"variance":1976.0669777901621,"mean":82.70300000160933},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3847.1875955089927,"stableId":"11725.1295.SliceGroup.1137","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":3898.457595512271,"stableId":"11725.1295.SliceGroup.1323","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":11.035189883442381,"other":40.23481011983586,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":3847.1875955089927,"pid":11725,"fmp":3898.457595512271}}}]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1096.4645955115557,"stableId":"11725.1295.SliceGroup.42","title":"navigationStart"}]},"End":{"type":"RelatedEventSet","events":[{"duration":0,"start":1210.600595511496,"stableId":"11725.1295.SliceGroup.382","title":"firstMeaningfulPaintCandidate"}]},"Breakdown of [navStart, FMP]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":30.155908505765325,"other":83.98009149417503,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1096.4645955115557,"pid":11725,"fmp":1210.600595511496}}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"79e75b8b-e4c4-477e-91a9-504c98d4ba2c","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first meaningful paint"},{"sampleValues":[376.03599999529115,51.270000003278255],"name":"timeToFirstInteractive","underflowBin":{"count":0,"diagnosticMaps":[]},"maxNumSampleValues":620,"nanDiagnosticMaps":[],"numNans":0,"running":{"count":2,"min":51.270000003278255,"max":376.03599999529115,"sum":427.3059999985694,"meanlogs":4.933395334667272,"variance":52736.47737540606,"mean":213.6529999992847},"binBoundaries":[0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700,2800,2900,3000,3298.5015444623446,3626.704146273491,3987.5630759303654,4384.327654865776,4820.570513667911,5300.2197615077475,5827.594356441047,6407.442995073611,7044.9868717682475,7745.966692414835,8516.694366094736,9364.109840092413,10295.843590019953,11320.285327741181,12446.65954576957,13685.108578372636,15046.783927299006,16543.94667446232,18190.077885738872,20000],"diagnostics":{"iteration":{"storyDisplayName":"http://narod.yandex.ru/","benchmarkName":"page_cycler_v2.intl_hi_ru","benchmarkStartMs":1474524317911,"label":"","product-version":"Chrome/54.0.2840.34","storyUrl":"http://narod.yandex.ru/","os-version":"10.11.6","storyRepeatCounter":0,"storyGroupingKeys":{"cache_temperature":"pcv1-warm"},"type":"IterationInfo","storysetRepeatCounter":0}},"centralBins":[{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":3847.1875955089927,"stableId":"11725.1295.SliceGroup.1137","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":3847.1875955089927,"pid":11725,"interactive":3898.457595512271}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":11.035189883442381,"other":40.23481011983586,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":1,"diagnosticMaps":[{"Start":{"type":"RelatedEventSet","events":[{"duration":0,"start":1096.4645955115557,"stableId":"11725.1295.SliceGroup.42","title":"navigationStart"}]},"Last long task":{"type":"RelatedEventSet","events":[{"duration":102.042,"start":1420.458595506847,"stableId":"11725.1295.SliceGroup.689","title":"TaskQueueManager::ProcessTaskFromWorkQueue"}]},"Navigation infos":{"type":"Generic","value":{"url":"http://narod.yandex.ru/","start":1096.4645955115557,"pid":11725,"interactive":1472.5005955068468}},"Breakdown of [navStart, Interactive]":{"values":{"raster":0,"style":0,"layout":0,"script_execute":0,"resource_loading":0,"composite":0,"startup":0,"v8_runtime":0,"script_parse_and_compile":0,"record":0,"idle":138.6426490469707,"other":237.3933509483208,"overhead":0,"imageDecode":0,"input":0,"gpu":0,"net":0,"iframe_creation":0,"renderer_misc":0,"gc":0,"parseHTML":0},"type":"Breakdown","colorScheme":"ChromeUserFriendlyCategory"}}]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]},{"count":0,"diagnosticMaps":[]}],"guid":"212d4bea-88d7-47ce-a695-5e1fb4c7460f","summaryOptions":{"std":true,"count":false,"min":true,"max":true,"sum":false,"percentile":[0.9,0.95,0.99],"nans":false,"avg":true,"geometricMean":false},"overflowBin":{"count":0,"diagnosticMaps":[]},"unit":"ms_smallerIsBetter","description":"time to first interactive"}]
diff --git a/chromium/third_party/catapult/tracing/tracing/model/activity.html b/chromium/third_party/catapult/tracing/tracing/model/activity.html
deleted file mode 100644
index c86edab2ea1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/activity.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/color_scheme.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Class representing a user activity that is running
- * in the process.
- * On the Android platform, activities are mapped to Android Activities
- * running in the foreground of the process.
- * On Windows/OS X this could for example represent
- * the currently active window of the process.
- */
-tr.exportTo('tr.model', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- /**
- * @constructor
- * @param {String} name Name of the activity
- * @param {String} category Category of the activities
- * @param {String} range The time range where the activity was running
- * @param {String} args Additional arguments
- */
- function Activity(name, category, range, args) {
- tr.model.TimedEvent.call(this, range.min);
- this.title = name;
- this.category = category;
- this.colorId = ColorScheme.getColorIdForGeneralPurposeString(name);
- this.duration = range.duration;
- this.args = args;
- this.name = name;
- };
-
- Activity.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- shiftTimestampsForward: function(amount) {
- this.start += amount;
- },
-
- addBoundsToRange: function(range) {
- range.addValue(this.start);
- range.addValue(this.end);
- }
- };
- return {
- Activity: Activity
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/alert.html b/chromium/third_party/catapult/tracing/tracing/model/alert.html
deleted file mode 100644
index 9fd5147806c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/alert.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_info.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- function Alert(info, start, opt_associatedEvents, opt_args) {
- tr.model.TimedEvent.call(this, start);
- this.info = info;
- this.args = opt_args || {};
- this.associatedEvents = new tr.model.EventSet(opt_associatedEvents);
- this.associatedEvents.forEach(function(event) {
- event.addAssociatedAlert(this);
- }, this);
- }
-
- Alert.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- get title() {
- return this.info.title;
- },
-
- get colorId() {
- return this.info.colorId;
- },
-
- get userFriendlyName() {
- return 'Alert ' + this.title + ' at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.start);
- }
- };
-
- tr.model.EventRegistry.register(
- Alert,
- {
- name: 'alert',
- pluralName: 'alerts'
- });
-
- return {
- Alert: Alert
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/annotation.html b/chromium/third_party/catapult/tracing/tracing/model/annotation.html
deleted file mode 100644
index cea718342cb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/annotation.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-<link rel="import" href="/tracing/base/guid.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- /**
- * Annotation is a base class that represents all annotation objects that
- * can be drawn on the timeline.
- *
- * @constructor
- */
- function Annotation() {
- this.guid_ = tr.b.GUID.allocateSimple();
- this.view_ = undefined;
- };
-
- Annotation.fromDictIfPossible = function(args) {
- if (args.typeName === undefined)
- throw new Error('Missing typeName argument');
-
- var typeInfo = Annotation.findTypeInfoMatching(function(typeInfo) {
- return typeInfo.metadata.typeName === args.typeName;
- });
-
- if (typeInfo === undefined)
- return undefined;
-
- return typeInfo.constructor.fromDict(args);
- };
-
- Annotation.fromDict = function() {
- throw new Error('Not implemented');
- };
-
- Annotation.prototype = {
- get guid() {
- return this.guid_;
- },
-
- // Invoked by trace model when this annotation is removed.
- onRemove: function() {
- },
-
- toDict: function() {
- throw new Error('Not implemented');
- },
-
- getOrCreateView: function(viewport) {
- if (!this.view_)
- this.view_ = this.createView_(viewport);
- return this.view_;
- },
-
- createView_: function() {
- throw new Error('Not implemented');
- }
- };
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b. BASIC_REGISTRY_MODE);
- tr.b.decorateExtensionRegistry(Annotation, options);
-
- Annotation.addEventListener('will-register', function(e) {
- if (!e.typeInfo.constructor.hasOwnProperty('fromDict'))
- throw new Error('Must have fromDict method');
-
- if (!e.typeInfo.metadata.typeName)
- throw new Error('Registered Annotations must provide typeName');
- });
-
- return {
- Annotation: Annotation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/annotation_test.html b/chromium/third_party/catapult/tracing/tracing/model/annotation_test.html
deleted file mode 100644
index a5b6c3e6fea..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/annotation_test.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/location.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/comment_box_annotation.html">
-<link rel="import" href="/tracing/model/rect_annotation.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/x_marker_annotation.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- test('rectAnnotation', function() {
- var fakeYComponents1 = [{stableId: '1.2', yPercentOffset: 0.3}];
- var fakeYComponents2 = [{stableId: '1.2', yPercentOffset: 0.9}];
- var start = new tr.model.Location(50, fakeYComponents1);
- var end = new tr.model.Location(100, fakeYComponents2);
- var rectAnnotation = new tr.model.RectAnnotation(start, end);
- assert.equal(rectAnnotation.startLocation, start);
- assert.equal(rectAnnotation.endLocation, end);
- });
-
- test('xMarkerAnnotation', function() {
- var xMarkerAnnotation = new tr.model.XMarkerAnnotation(90);
- assert.equal(xMarkerAnnotation.timestamp, 90);
- });
-
- test('commentBoxAnnotation', function() {
- var fakeYComponents = [{stableId: '1.2', yPercentOffset: 0.5}];
- var location = new tr.model.Location(120, fakeYComponents);
- var text = 'abc';
- var commentBoxAnnotation =
- new tr.model.CommentBoxAnnotation(location, text);
- assert.equal(commentBoxAnnotation.location, location);
- assert.equal(commentBoxAnnotation.text, text);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/async_slice.html b/chromium/third_party/catapult/tracing/tracing/model/async_slice.html
deleted file mode 100644
index 2eb6c57184c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/async_slice.html
+++ /dev/null
@@ -1,151 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the AsyncSlice class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * A AsyncSlice represents an interval of time during which an
- * asynchronous operation is in progress. An AsyncSlice consumes no CPU time
- * itself and so is only associated with Threads at its start and end point.
- *
- * @constructor
- */
- function AsyncSlice(category, title, colorId, start, args, duration,
- opt_isTopLevel, opt_cpuStart, opt_cpuDuration,
- opt_argsStripped) {
- tr.model.TimedEvent.call(this, start);
-
- this.category = category || '';
- // We keep the original title from the trace file in originalTitle since
- // some sub-classes, e.g. NetAsyncSlice, change the title field.
- this.originalTitle = title;
- this.title = title;
- this.colorId = colorId;
- this.args = args;
- this.startStackFrame = undefined;
- this.endStackFrame = undefined;
- this.didNotFinish = false;
- this.important = false;
- this.subSlices = [];
- this.parentContainer_ = undefined;
-
- this.id = undefined;
- this.startThread = undefined;
- this.endThread = undefined;
- this.cpuStart = undefined;
- this.cpuDuration = undefined;
- this.argsStripped = false;
-
- this.startStackFrame = undefined;
- this.endStackFrame = undefined;
-
- this.duration = duration;
-
- // isTopLevel is set at import because only NESTABLE_ASYNC events might not
- // be topLevel. All legacy async events are toplevel by definition.
- this.isTopLevel = (opt_isTopLevel === true);
-
- if (opt_cpuStart !== undefined)
- this.cpuStart = opt_cpuStart;
-
- if (opt_cpuDuration !== undefined)
- this.cpuDuration = opt_cpuDuration;
-
- if (opt_argsStripped !== undefined)
- this.argsStripped = opt_argsStripped;
- }
-
- AsyncSlice.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- get analysisTypeName() {
- return this.title;
- },
-
- get parentContainer() {
- return this.parentContainer_;
- },
-
- set parentContainer(parentContainer) {
- this.parentContainer_ = parentContainer;
- for (var i = 0; i < this.subSlices.length; i++) {
- var subSlice = this.subSlices[i];
- if (subSlice.parentContainer === undefined)
- subSlice.parentContainer = parentContainer;
- }
- },
-
- get viewSubGroupTitle() {
- return this.title;
- },
-
- get userFriendlyName() {
- return 'Async slice ' + this.title + ' at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.start);
- },
-
- get stableId() {
- var parentAsyncSliceGroup = this.parentContainer.asyncSliceGroup;
- return parentAsyncSliceGroup.stableId + '.' +
- parentAsyncSliceGroup.slices.indexOf(this);
- },
-
- findTopmostSlicesRelativeToThisSlice: function*(eventPredicate, opt_this) {
- if (eventPredicate(this)) {
- yield this;
- return;
- }
- for (var s of this.subSlices)
- yield * s.findTopmostSlicesRelativeToThisSlice(eventPredicate);
- },
-
- findDescendentSlice: function(targetTitle) {
- if (!this.subSlices)
- return undefined;
-
- for (var i = 0; i < this.subSlices.length; i++) {
- if (this.subSlices[i].title === targetTitle)
- return this.subSlices[i];
- var slice = this.subSlices[i].findDescendentSlice(targetTitle);
- if (slice) return slice;
- }
- return undefined;
- },
-
- enumerateAllDescendents: function*() {
- for (var slice of this.subSlices)
- yield slice;
- for (var slice of this.subSlices)
- yield * slice.enumerateAllDescendents();
- },
-
- compareTo: function(that) {
- return this.title.localeCompare(that.title);
- }
- };
-
- tr.model.EventRegistry.register(
- AsyncSlice,
- {
- name: 'asyncSlice',
- pluralName: 'asyncSlices'
- });
-
-
- return {
- AsyncSlice: AsyncSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/async_slice_group.html b/chromium/third_party/catapult/tracing/tracing/model/async_slice_group.html
deleted file mode 100644
index 926864103c0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/async_slice_group.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/async_slice.html">
-<link rel="import" href="/tracing/model/event_container.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the AsyncSliceGroup class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * A group of AsyncSlices associated with a thread.
- * @constructor
- * @extends {tr.model.EventContainer}
- */
- function AsyncSliceGroup(parentContainer, opt_name) {
- tr.model.EventContainer.call(this);
- this.parentContainer_ = parentContainer;
- this.slices = [];
- this.name_ = opt_name;
- this.viewSubGroups_ = undefined;
- }
-
- AsyncSliceGroup.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get parentContainer() {
- return this.parentContainer_;
- },
-
- get model() {
- return this.parentContainer_.parent.model;
- },
-
- get stableId() {
- return this.parentContainer_.stableId + '.AsyncSliceGroup';
- },
-
- getSettingsKey: function() {
- if (!this.name_)
- return undefined;
- var parentKey = this.parentContainer_.getSettingsKey();
- if (!parentKey)
- return undefined;
- return parentKey + '.' + this.name_;
- },
-
- /**
- * Helper function that pushes the provided slice onto the slices array.
- */
- push: function(slice) {
- slice.parentContainer = this.parentContainer;
- this.slices.push(slice);
- return slice;
- },
-
- /**
- * @return {Number} The number of slices in this group.
- */
- get length() {
- return this.slices.length;
- },
-
- /**
- * Shifts all the timestamps inside this group forward by the amount
- * specified, including all nested subSlices if there are any.
- */
- shiftTimestampsForward: function(amount) {
- for (var sI = 0; sI < this.slices.length; sI++) {
- var slice = this.slices[sI];
- slice.start = (slice.start + amount);
- // Shift all nested subSlices recursively.
- var shiftSubSlices = function(subSlices) {
- if (subSlices === undefined || subSlices.length === 0)
- return;
- for (var sJ = 0; sJ < subSlices.length; sJ++) {
- subSlices[sJ].start += amount;
- shiftSubSlices(subSlices[sJ].subSlices);
- }
- };
- shiftSubSlices(slice.subSlices);
- }
- },
-
- /**
- * Updates the bounds for this group based on the slices it contains.
- */
- updateBounds: function() {
- this.bounds.reset();
- for (var i = 0; i < this.slices.length; i++) {
- this.bounds.addValue(this.slices[i].start);
- this.bounds.addValue(this.slices[i].end);
- }
- },
-
- /**
- * Gets the sub-groups in this A-S-G defined by the group titles.
- *
- * @return {Array} An array of AsyncSliceGroups where each group has
- * slices that started on the same thread.
- */
- get viewSubGroups() {
- if (this.viewSubGroups_ === undefined) {
- var prefix = '';
- if (this.name !== undefined)
- prefix = this.name + '.';
- else
- prefix = '';
-
- var subGroupsByTitle = {};
- for (var i = 0; i < this.slices.length; ++i) {
- var slice = this.slices[i];
- var subGroupTitle = slice.viewSubGroupTitle;
- if (!subGroupsByTitle[subGroupTitle]) {
- subGroupsByTitle[subGroupTitle] = new AsyncSliceGroup(
- this.parentContainer_, prefix + subGroupTitle);
- }
- subGroupsByTitle[subGroupTitle].push(slice);
- }
- this.viewSubGroups_ = tr.b.dictionaryValues(subGroupsByTitle);
- this.viewSubGroups_.sort(function(a, b) {
- return a.slices[0].compareTo(b.slices[0]);
- });
- }
- return this.viewSubGroups_;
- },
-
- findTopmostSlicesInThisContainer: function*(eventPredicate, opt_this) {
- for (var slice of this.slices) {
- if (slice.isTopLevel) {
- yield * slice.findTopmostSlicesRelativeToThisSlice(
- eventPredicate, opt_this);
- }
- }
- },
-
- childEvents: function*() {
- // Async slices normally don't have sub-slices, and when they do,
- // the sub-slice is specific to the type of async slice. Thus,
- // it is not expected for sub-slices to themselves have sub-sub-slices,
- // which is why we don't recurse into the sub-slices here.
- for (var slice of this.slices) {
- yield slice;
- if (slice.subSlices)
- yield * slice.subSlices;
- }
- },
-
- childEventContainers: function*() {
- }
- };
-
- return {
- AsyncSliceGroup: AsyncSliceGroup
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/async_slice_group_test.html b/chromium/third_party/catapult/tracing/tracing/model/async_slice_group_test.html
deleted file mode 100644
index 7306ca8a1bc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/async_slice_group_test.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Process = tr.model.Process;
- var Thread = tr.model.Thread;
- var AsyncSlice = tr.model.AsyncSlice;
- var AsyncSliceGroup = tr.model.AsyncSliceGroup;
- var newAsyncSlice = tr.c.TestUtils.newAsyncSlice;
- var newAsyncSliceEx = tr.c.TestUtils.newAsyncSliceEx;
- var newModel = tr.c.TestUtils.newModel;
-
- test('asyncSliceGroupBounds_Empty', function() {
- var thread = {};
- var g = new AsyncSliceGroup(thread);
- g.updateBounds();
- assert.isTrue(g.bounds.isEmpty);
- });
-
- test('asyncSliceGroupBounds_Basic', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
- g.push(newAsyncSlice(0, 1, t1, t1));
- g.push(newAsyncSlice(1, 1.5, t1, t1));
- assert.equal(g.length, 2);
- g.updateBounds();
- assert.equal(g.bounds.min, 0);
- assert.equal(g.bounds.max, 2.5);
- });
-
- test('asyncSliceGroupStableId', function() {
- var model = new tr.Model();
- var process = model.getOrCreateProcess(123);
- var thread = process.getOrCreateThread(456);
- var group = new AsyncSliceGroup(thread);
-
- assert.equal(process.stableId, 123);
- assert.equal(thread.stableId, '123.456');
- assert.equal(group.stableId, '123.456.AsyncSliceGroup');
- });
-
- test('asyncSliceParentContainerSetAtPush', function() {
- var m = newModel(function(m) {
- m.process = m.getOrCreateProcess(123);
- m.thread = m.process.getOrCreateThread(456);
- m.group = new AsyncSliceGroup(m.thread);
-
- m.sA = m.group.push(newAsyncSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- });
-
- assert.deepEqual(m.sA.parentContainer, m.thread);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/async_slice_test.html b/chromium/third_party/catapult/tracing/tracing/model/async_slice_test.html
deleted file mode 100644
index 3fadbcb0844..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/async_slice_test.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AsyncSlice = tr.model.AsyncSlice;
- var Process = tr.model.Process;
- var Thread = tr.model.Thread;
- var newAsyncSlice = tr.c.TestUtils.newAsyncSlice;
- var newAsyncSliceEx = tr.c.TestUtils.newAsyncSliceEx;
- var newFakeThread = tr.c.TestUtils.newFakeThread;
-
- test('stableId', function() {
- var thread = newFakeThread();
- var group = thread.asyncSliceGroup;
-
- var sA = group.push(newAsyncSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.push(newAsyncSliceEx(
- { title: 'sB', start: 10.0, duration: 20.0 }));
- var sC = group.push(newAsyncSliceEx(
- { title: 'sC', start: 20.0, duration: 30.0 }));
-
- assert.equal(group.stableId + '.0', sA.stableId);
- assert.equal(group.stableId + '.1', sB.stableId);
- assert.equal(group.stableId + '.2', sC.stableId);
- });
-
- test('setParentContainerForSubSlices', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var asyncSlice = newAsyncSlice(0, 10, t1, t1);
- var subSlice1 = newAsyncSlice(1, 5, t1, t1);
- var subSlice2 = newAsyncSlice(6, 9, t1, t1);
- var subSlice3 = newAsyncSlice(2, 3, t1, t1);
- subSlice1.subSlices.push(subSlice3);
- asyncSlice.subSlices.push(subSlice1);
- asyncSlice.subSlices.push(subSlice2);
- asyncSlice.parentContainer = t1;
- assert.equal(asyncSlice.subSlices.length, 2);
- assert.equal(subSlice1.subSlices.length, 1);
- assert.deepEqual(asyncSlice.parentContainer, t1);
- assert.deepEqual(subSlice1.parentContainer, t1);
- assert.deepEqual(subSlice2.parentContainer, t1);
- assert.deepEqual(subSlice3.parentContainer, t1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager.html b/chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager.html
deleted file mode 100644
index 82531ce46a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager.html
+++ /dev/null
@@ -1,427 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var ClockDomainId = {
- BATTOR: 'BATTOR',
-
- // NOTE: Exists for backwards compatibility with old Chrome traces which
- // didn't explicitly specify the clock being used.
- UNKNOWN_CHROME_LEGACY: 'UNKNOWN_CHROME_LEGACY',
-
- LINUX_CLOCK_MONOTONIC: 'LINUX_CLOCK_MONOTONIC',
- LINUX_FTRACE_GLOBAL: 'LINUX_FTRACE_GLOBAL',
- MAC_MACH_ABSOLUTE_TIME: 'MAC_MACH_ABSOLUTE_TIME',
- WIN_ROLLOVER_PROTECTED_TIME_GET_TIME:
- 'WIN_ROLLOVER_PROTECTED_TIME_GET_TIME',
- WIN_QPC: 'WIN_QPC',
-
- // "Telemetry" isn't really a clock domain because Telemetry actually
- // can use one of several clock domains, just like Chrome. However,
- // because there's a chance that Telemetry is running off of the same
- // clock as Chrome (e.g. LINUX_CLOCK_MONOTONIC) but on a separate device
- // (i.e. on a host computer with Chrome running on an attached phone),
- // there's a chance that Chrome and Telemetry will erroneously get put into
- // the same clock domain. The solution for this is that clock domains should
- // actually be some (unique_device_id, clock_id) tuple. For now, though,
- // we'll hack around this by putting Telemetry into its own clock domain.
- TELEMETRY: 'TELEMETRY'
- };
-
- var POSSIBLE_CHROME_CLOCK_DOMAINS = new Set([
- ClockDomainId.UNKNOWN_CHROME_LEGACY,
- ClockDomainId.LINUX_CLOCK_MONOTONIC,
- ClockDomainId.MAC_MACH_ABSOLUTE_TIME,
- ClockDomainId.WIN_ROLLOVER_PROTECTED_TIME_GET_TIME,
- ClockDomainId.WIN_QPC
- ]);
-
- // The number of milliseconds above which the BattOr sync is no longer
- // considered "fast", and it's more accurate to use the sync start timestamp
- // instead of the normal sync timestamp due to a bug in the Chrome serial code
- // making serial reads too slow.
- var BATTOR_FAST_SYNC_THRESHOLD_MS = 3;
-
- /**
- * A ClockSyncManager holds clock sync markers and uses them to shift
- * timestamps from agents' clock domains onto the model's clock domain.
- *
- * In this context, a "clock domain" is a single perspective on the passage
- * of time. A single computer can have multiple clock domains because it
- * can have multiple methods of retrieving a timestamp (e.g.
- * clock_gettime(CLOCK_MONOTONIC) and clock_gettime(CLOCK_REALTIME) on Linux).
- * Another common reason for multiple clock domains within a single trace
- * is that traces can span devices (e.g. a laptop collecting a Chrome trace
- * can have its power consumption recorded by a second device and the two
- * traces can be viewed alongside each other).
- *
- * For more information on how to synchronize multiple time domains using this
- * method, see: http://bit.ly/1OVkqju.
- *
- * @constructor
- */
- function ClockSyncManager() {
- // A set of all domains seen by the ClockSyncManager.
- this.domainsSeen_ = new Set();
- this.markersBySyncId_ = new Map();
- // transformerMapByDomainId_[fromDomainId][toDomainId] returns the function
- // that converts timestamps in the "from" domain to timestamps in the "to"
- // domain.
- this.transformerMapByDomainId_ = {};
- }
-
- ClockSyncManager.prototype = {
- /**
- * Adds a clock sync marker to the list of known markers.
- *
- * @param {string} domainId The clock domain that the marker is in.
- * @param {string} syncId The identifier shared by both sides of the clock
- * sync marker.
- * @param {number} startTs The time (in ms) at which the sync started.
- * @param {number=} opt_endTs The time (in ms) at which the sync ended. If
- * unspecified, it's assumed to be the same as the start,
- * indicating an instantaneous sync.
- */
- addClockSyncMarker: function(domainId, syncId, startTs, opt_endTs) {
- this.onDomainSeen_(domainId);
-
- if (tr.b.dictionaryValues(ClockDomainId).indexOf(domainId) < 0) {
- throw new Error('"' + domainId + '" is not in the list of known ' +
- 'clock domain IDs.');
- }
-
- if (this.modelDomainId_) {
- throw new Error('Cannot add new clock sync markers after getting ' +
- 'a model time transformer.');
- }
-
- var marker = new ClockSyncMarker(domainId, startTs, opt_endTs);
-
- if (!this.markersBySyncId_.has(syncId)) {
- this.markersBySyncId_.set(syncId, [marker]);
- return;
- }
-
- var markers = this.markersBySyncId_.get(syncId);
-
- if (markers.length === 2) {
- throw new Error('Clock sync with ID "' + syncId + '" is already ' +
- 'complete - cannot add a third clock sync marker to it.');
- }
-
- if (markers[0].domainId === domainId)
- throw new Error('A clock domain cannot sync with itself.');
-
- markers.push(marker);
- this.onSyncCompleted_(markers[0], marker);
- },
-
- // TODO(charliea): Remove this once the clockSyncMetric is no longer using
- // it.
- get markersBySyncId() {
- return this.markersBySyncId_;
- },
-
- /** @return {Set<String>} The string IDs of the domains seen so far. */
- get domainsSeen() {
- return this.domainsSeen_;
- },
-
- /**
- * Returns a function that, given a timestamp in the domain with |domainId|,
- * returns a timestamp in the model's clock domain.
- *
- * NOTE: All clock sync markers should be added before calling this function
- * for the first time. This is because the first time that this function is
- * called, a model clock domain is selected. This clock domain must have
- * syncs connecting it with all other clock domains. If multiple clock
- * domains are viable candidates, the one with the clock domain ID that is
- * the first alphabetically is selected.
- */
- getModelTimeTransformer: function(domainId) {
- return this.getModelTimeTransformerRaw_(domainId).fn;
- },
-
- /**
- * Returns the error associated with the transformation given by
- * |getModelTimeTransformer(domainId)|.
- */
- getModelTimeTransformerError: function(domainId) {
- return this.getModelTimeTransformerRaw_(domainId).error;
- },
-
- getModelTimeTransformerRaw_: function(domainId) {
- this.onDomainSeen_(domainId);
-
- if (!this.modelDomainId_)
- this.selectModelDomainId_();
-
- var transformer =
- this.getTransformerBetween_(domainId, this.modelDomainId_);
- if (!transformer) {
- throw new Error('No clock sync markers exist pairing clock domain "' +
- domainId + '" ' + 'with model clock domain "' +
- this.modelDomainId_ + '".');
- }
-
- return transformer;
- },
-
- /**
- * Returns a function that, given a timestamp in the "from" domain, returns
- * a timestamp in the "to" domain.
- */
- getTransformerBetween_: function(fromDomainId, toDomainId) {
- // Do a breadth-first search from the "from" domain until we reach the
- // "to" domain.
- var visitedDomainIds = new Set();
- // Keep a queue of nodes to visit, starting with the "from" domain.
- var queue = [{
- domainId: fromDomainId,
- transformer: Transformer.IDENTITY
- }];
-
- while (queue.length > 0) {
- // NOTE: Using a priority queue here would theoretically be much more
- // efficient, but the actual performance difference is negligible given
- // how few clock domains we have in a trace.
- queue.sort((domain1, domain2) =>
- domain1.transformer.error - domain2.transformer.error);
-
- var current = queue.shift();
-
- if (current.domainId === toDomainId)
- return current.transformer;
-
- if (visitedDomainIds.has(current.domainId))
- continue;
- visitedDomainIds.add(current.domainId);
-
- var outgoingTransformers =
- this.transformerMapByDomainId_[current.domainId];
-
- if (!outgoingTransformers)
- continue;
-
- // Add all nodes that are directly connected to this one to the queue.
- for (var outgoingDomainId in outgoingTransformers) {
- // We have two transformers: one to get us from the "from" domain to
- // the current domain, and another to get us from the current domain
- // to the next domain. By composing those two transformers, we can
- // create one that gets us from the "from" domain to the next domain.
- var toNextDomainTransformer = outgoingTransformers[outgoingDomainId];
- var toCurrentDomainTransformer = current.transformer;
-
- queue.push({
- domainId: outgoingDomainId,
- transformer: Transformer.compose(
- toNextDomainTransformer, toCurrentDomainTransformer)
- });
- }
- }
-
- return undefined;
- },
-
- /**
- * Selects the domain to use as the model domain from among the domains
- * with registered markers.
- *
- * This is necessary because some common domain must be chosen before all
- * timestamps can be shifted onto the same domain.
- *
- * For the time being, preference is given to Chrome clock domains. If no
- * Chrome clock domain is present, the first clock domain alphabetically
- * is selected.
- */
- selectModelDomainId_: function() {
- this.ensureAllDomainsAreConnected_();
-
- // While we're migrating to the new clock sync system, we have to make
- // sure to prefer the Chrome clock domain because legacy clock sync
- // mechanisms assume that's the case.
- for (var chromeDomainId of POSSIBLE_CHROME_CLOCK_DOMAINS) {
- if (this.domainsSeen_.has(chromeDomainId)) {
- this.modelDomainId_ = chromeDomainId;
- return;
- }
- }
-
- var domainsSeenArray = Array.from(this.domainsSeen_);
- domainsSeenArray.sort();
- this.modelDomainId_ = domainsSeenArray[0];
- },
-
- /** Throws an error if all domains are not connected. */
- ensureAllDomainsAreConnected_: function() {
- // NOTE: this is a ridiculously inefficient way to do this. Given how few
- // clock domains we're likely to have, this shouldn't be a problem.
- var firstDomainId = undefined;
- for (var domainId of this.domainsSeen_) {
- if (!firstDomainId) {
- firstDomainId = domainId;
- continue;
- }
-
- if (!this.getTransformerBetween_(firstDomainId, domainId)) {
- throw new Error('Unable to select a master clock domain because no ' +
- 'path can be found from "' + firstDomainId + '" to "' + domainId +
- '".');
- }
- }
-
- return true;
- },
-
- /** Observer called each time that a clock domain is seen. */
- onDomainSeen_: function(domainId) {
- if (domainId === ClockDomainId.UNKNOWN_CHROME_LEGACY &&
- !this.domainsSeen_.has(ClockDomainId.UNKNOWN_CHROME_LEGACY)) {
- // UNKNOWN_CHROME_LEGACY was just seen for the first time: collapse it
- // and the other Chrome clock domains into one.
- //
- // This makes sure that we don't have two separate clock sync graphs:
- // one attached to UNKNOWN_CHROME_LEGACY and the other attached to the
- // real Chrome clock domain.
- for (var chromeDomainId of POSSIBLE_CHROME_CLOCK_DOMAINS) {
- if (chromeDomainId === ClockDomainId.UNKNOWN_CHROME_LEGACY)
- continue;
-
- this.collapseDomains_(
- ClockDomainId.UNKNOWN_CHROME_LEGACY, chromeDomainId);
- }
- }
-
- this.domainsSeen_.add(domainId);
- },
-
- /**
- * Observer called when a complete sync is made involving |marker1| and
- * |marker2|.
- */
- onSyncCompleted_: function(marker1, marker2) {
- var forwardTransformer = Transformer.fromMarkers(marker1, marker2);
- var backwardTransformer = Transformer.fromMarkers(marker2, marker1);
-
- var existingTransformer =
- this.getOrCreateTransformerMap_(marker1.domainId)[marker2.domainId];
- if (!existingTransformer ||
- forwardTransformer.error < existingTransformer.error) {
- this.getOrCreateTransformerMap_(marker1.domainId)[marker2.domainId] =
- forwardTransformer;
- this.getOrCreateTransformerMap_(marker2.domainId)[marker1.domainId] =
- backwardTransformer;
- }
- },
-
- /** Makes timestamps in the two clock domains interchangeable. */
- collapseDomains_: function(domain1Id, domain2Id) {
- this.getOrCreateTransformerMap_(domain1Id)[domain2Id] =
- this.getOrCreateTransformerMap_(domain2Id)[domain1Id] =
- Transformer.IDENTITY;
- },
-
- /**
- * Returns (and creates if it doesn't exist) the transformer map describing
- * how to transform timestamps between directly connected clock domains.
- */
- getOrCreateTransformerMap_: function(domainId) {
- if (!this.transformerMapByDomainId_[domainId])
- this.transformerMapByDomainId_[domainId] = {};
-
- return this.transformerMapByDomainId_[domainId];
- }
- };
-
- /**
- * A ClockSyncMarker is an internal entity that represents a marker in a
- * trace log indicating that a clock sync happened at a specified time.
- *
- * If no end timestamp argument is specified in the constructor, it's assumed
- * that the end timestamp is the same as the start (i.e. the clock sync
- * was instantaneous).
- */
- function ClockSyncMarker(domainId, startTs, opt_endTs) {
- this.domainId = domainId;
- this.startTs = startTs;
- this.endTs = opt_endTs === undefined ? startTs : opt_endTs;
- }
-
- ClockSyncMarker.prototype = {
- get duration() { return this.endTs - this.startTs; },
- get ts() { return this.startTs + this.duration / 2; }
- };
-
- /**
- * A Transformer encapsulates information about how to turn timestamps in one
- * clock domain into timestamps in another. It also stores additional data
- * about the maximum error involved in doing so.
- */
- function Transformer(fn, error) {
- this.fn = fn;
- this.error = error;
- }
-
- Transformer.IDENTITY = new Transformer(tr.b.identity, 0);
-
- /**
- * Given two transformers, creates a third that's a composition of the two.
- *
- * @param {function(Number): Number} aToB A function capable of converting a
- * timestamp from domain A to domain B.
- * @param {function(Number): Number} bToC A function capable of converting a
- * timestamp from domain B to domain C.
- *
- * @return {function(Number): Number} A function capable of converting a
- * timestamp from domain A to domain C.
- */
- Transformer.compose = function(aToB, bToC) {
- return new Transformer(
- (ts) => bToC.fn(aToB.fn(ts)), aToB.error + bToC.error);
- };
-
- /**
- * Returns a function that, given a timestamp in |fromMarker|'s domain,
- * returns a timestamp in |toMarker|'s domain.
- */
- Transformer.fromMarkers = function(fromMarker, toMarker) {
- var fromTs = fromMarker.ts, toTs = toMarker.ts;
-
- // TODO(charliea): Usually, we estimate that the clock sync marker is
- // issued by the agent exactly in the middle of the controller's start and
- // end timestamps. However, there's currently a bug in the Chrome serial
- // code that's making the clock sync ack for BattOr take much longer to
- // read than it should (by about 8ms). This is causing the above estimate
- // of the controller's sync timestamp to be off by a substantial enough
- // amount that it makes traces hard to read. For now, make an exception
- // for BattOr and just use the controller's start timestamp as the sync
- // time. In the medium term, we should fix the Chrome serial code in order
- // to remove this special logic and get an even more accurate estimate.
- if (fromMarker.domainId === ClockDomainId.BATTOR &&
- toMarker.duration > BATTOR_FAST_SYNC_THRESHOLD_MS) {
- toTs = toMarker.startTs;
- } else if (toMarker.domainId === ClockDomainId.BATTOR &&
- fromMarker.duration > BATTOR_FAST_SYNC_THRESHOLD_MS) {
- fromTs = fromMarker.startTs;
- }
-
- var tsShift = toTs - fromTs;
- return new Transformer(
- (ts) => ts + tsShift, fromMarker.duration + toMarker.duration);
- };
-
- return {
- ClockDomainId: ClockDomainId,
- ClockSyncManager: ClockSyncManager
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager_test.html b/chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager_test.html
deleted file mode 100644
index f8826420517..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/clock_sync_manager_test.html
+++ /dev/null
@@ -1,380 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/clock_sync_manager.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var ClockDomainId = tr.model.ClockDomainId;
- var ClockSyncManager = tr.model.ClockSyncManager;
-
- var testOptions = {
- setUp: function() {
- // Add a few testing clock domains to the list of permissible domains.
- ClockDomainId.DOMAIN_1 = 'DOMAIN1';
- ClockDomainId.DOMAIN_2 = 'DOMAIN2';
- ClockDomainId.DOMAIN_3 = 'DOMAIN3';
- ClockDomainId.DOMAIN_4 = 'DOMAIN4';
- ClockDomainId.DOMAIN_5 = 'DOMAIN5';
- },
-
- tearDown: function() {
- delete ClockDomainId.DOMAIN_1;
- delete ClockDomainId.DOMAIN_2;
- delete ClockDomainId.DOMAIN_3;
- delete ClockDomainId.DOMAIN_4;
- delete ClockDomainId.DOMAIN_5;
- }
- };
-
- test('addClockSyncMarker_throwsWithUnknownDomain', function() {
- var mgr = new ClockSyncManager();
-
- assert.throws(function() {
- mgr.addClockSyncMarker('unknown', 'sync1', 100, 200);
- }, '"unknown" is not in the list of known clock domain IDs.');
- }, testOptions);
-
-
- test('addClockSyncMarker_throwsWhenSelfSyncing', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100, 200);
-
- assert.throws(function() {
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 200, 300);
- }, 'A clock domain cannot sync with itself.');
- }, testOptions);
-
- test('addClockSyncMarker_throwsWhenAddingThirdSyncMarkerToSync', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 100);
-
- assert.throws(function() {
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_3, 'sync1', 100);
- }, 'Clock sync with ID "sync1" is already complete - cannot add a third ' +
- 'clock sync marker to it.');
- }, testOptions);
-
- test('addClockSyncMarker_throwsAfterGetModelTimeTransformer', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 100);
-
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1);
-
- assert.throws(function() {
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 100);
- }, 'Cannot add new clock sync markers after getting a model time ' +
- 'transformer.');
- }, testOptions);
-
- test('getModelTimeTransformer_noMarkers', function() {
- var mgr = new ClockSyncManager();
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 100);
- }, testOptions);
-
- test('getModelTimeTransformer_noMarkersSecondDomainThrows', function() {
- var mgr = new ClockSyncManager();
-
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1);
-
- assert.throws(function() {
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2);
- }, 'No clock sync markers exist pairing clock domain "DOMAIN2" with model' +
- ' clock domain "DOMAIN1".');
- }, testOptions);
-
- test('getModelTimeTransformer_noMarkersChromeLegacyFirst', function() {
- var mgr = new ClockSyncManager();
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(100),
- 100);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.LINUX_CLOCK_MONOTONIC)(100),
- 100);
- }, testOptions);
-
- test('getModelTimeTransformer_noMarkersChromeLegacySecond', function() {
- var mgr = new ClockSyncManager();
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.LINUX_CLOCK_MONOTONIC)(100),
- 100);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(100),
- 100);
- }, testOptions);
-
- test('getModelTimeTransformer_oneMarker', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 100);
- }, testOptions);
-
- test('getModelTimeTransformer_oneCompleteSync', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(350), 100);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 100);
- }, testOptions);
-
- test('getModelTimeTransformer_oneCompleteSyncWithChromeLegacyBefore',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.UNKNOWN_CHROME_LEGACY, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.LINUX_CLOCK_MONOTONIC)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_oneCompleteSyncWithChromeLegacyAfter',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.LINUX_CLOCK_MONOTONIC, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.LINUX_CLOCK_MONOTONIC)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_twoCompleteSyncs', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 350);
-
- var tx = mgr.getTransformerBetween_('DOMAIN1', 'DOMAIN3');
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync2', 200);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_3, 'sync2', 250);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(350), 100);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 100);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_3)(250), 200);
- }, testOptions);
-
- test('getModelTimeTransformer_twoSyncMarkersWithEndTs', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100, 200);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(350), 150);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(150), 150);
- }, testOptions);
-
- test('getModelTimeTransformer_indirectlyConnectedGraph',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 200);
-
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 200);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_3, 'sync2', 300);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 100);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_3)(300), 100);
- }, testOptions);
-
- test('getModelTimeTransformer_usesPathWithLeastError', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync2', 100, 150);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 100);
-
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100, 200);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 100);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(125), 125);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(100), 125);
- }, testOptions);
-
- // NOTE: This is the same test as the above, but reversed to ensure that
- // the result didn't stem from some ordering coincidence.
- test('getModelTimeTransformer_usesPathWithLeastErrorReverse', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100, 150);
-
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync2', 100, 200);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(125), 125);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(100), 125);
- }, testOptions);
-
- test('getModelTimeTransformer_battorSyncUsesNormalTimestampWhenFast',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100, 102);
- mgr.addClockSyncMarker(ClockDomainId.BATTOR, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(101),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_battorSyncUsesChromeLegacyStartTsWhenTooSlow',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100, 200);
- mgr.addClockSyncMarker(ClockDomainId.BATTOR, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_prefersChromeLegacyDomain', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.UNKNOWN_CHROME_LEGACY, 'sync1', 350);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100),
- 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_collapsesUnknownChromeLegacyDomainLinux',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.UNKNOWN_CHROME_LEGACY, 'sync1', 350);
-
- mgr.addClockSyncMarker(ClockDomainId.LINUX_CLOCK_MONOTONIC, 'sync2', 350);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 450);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(450), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.LINUX_CLOCK_MONOTONIC)(350),
- 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_collapsesUnknownChromeLegacyDomainMac',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.UNKNOWN_CHROME_LEGACY, 'sync1', 350);
-
- mgr.addClockSyncMarker(ClockDomainId.MAC_MACH_ABSOLUTE_TIME, 'sync2', 350);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 450);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(450), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.MAC_MACH_ABSOLUTE_TIME)(350),
- 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_collapsesUnknownChromeLegacyDomainWinLoRes',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.UNKNOWN_CHROME_LEGACY, 'sync1', 350);
-
- mgr.addClockSyncMarker(
- ClockDomainId.WIN_ROLLOVER_PROTECTED_TIME_GET_TIME, 'sync2', 350);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 450);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(450), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(
- ClockDomainId.WIN_ROLLOVER_PROTECTED_TIME_GET_TIME)(350),
- 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_collapsesChromeLegacyDomainWinHiRes',
- function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.UNKNOWN_CHROME_LEGACY, 'sync1', 350);
-
- mgr.addClockSyncMarker(ClockDomainId.WIN_QPC, 'sync2', 350);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync2', 450);
-
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_1)(100), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_2)(450), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.WIN_QPC)(350), 350);
- assert.strictEqual(
- mgr.getModelTimeTransformer(ClockDomainId.UNKNOWN_CHROME_LEGACY)(350),
- 350);
- }, testOptions);
-
- test('getModelTimeTransformer_throwsWithTwoDistinctGraphs', function() {
- var mgr = new ClockSyncManager();
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync1', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_2, 'sync1', 100);
-
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_1, 'sync2', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_3, 'sync2', 100);
-
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_4, 'sync3', 100);
- mgr.addClockSyncMarker(ClockDomainId.DOMAIN_5, 'sync3', 100);
-
- assert.throws(function() {
- mgr.getModelTimeTransformer(ClockDomainId.DOMAIN_5);
- }, 'Unable to select a master clock domain because no path can be found ' +
- 'from "DOMAIN1" to "DOMAIN4"');
- }, testOptions);
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/comment_box_annotation.html b/chromium/third_party/catapult/tracing/tracing/model/comment_box_annotation.html
deleted file mode 100644
index 5c76b8d9fc6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/comment_box_annotation.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/location.html">
-<link rel="import" href="/tracing/model/annotation.html">
-<link rel="import" href="/tracing/model/rect_annotation.html">
-<link rel="import" href="/tracing/ui/annotations/comment_box_annotation_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- function CommentBoxAnnotation(location, text) {
- tr.model.Annotation.apply(this, arguments);
-
- this.location = location;
- this.text = text;
- }
-
- CommentBoxAnnotation.fromDict = function(dict) {
- var args = dict.args;
- var location =
- new tr.model.Location(args.location.xWorld, args.location.yComponents);
- return new tr.model.CommentBoxAnnotation(location, args.text);
- };
-
- CommentBoxAnnotation.prototype = {
- __proto__: tr.model.Annotation.prototype,
-
- onRemove: function() {
- this.view_.removeTextArea();
- },
-
- toDict: function() {
- return {
- typeName: 'comment_box',
- args: {
- text: this.text,
- location: this.location.toDict()
- }
- };
- },
-
- createView_: function(viewport) {
- return new tr.ui.annotations.CommentBoxAnnotationView(viewport, this);
- }
- };
-
- tr.model.Annotation.register(
- CommentBoxAnnotation, {typeName: 'comment_box'});
-
- return {
- CommentBoxAnnotation: CommentBoxAnnotation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/compound_event_selection_state.html b/chromium/third_party/catapult/tracing/tracing/model/compound_event_selection_state.html
deleted file mode 100644
index bf35ab5c131..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/compound_event_selection_state.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- /**
- * Indicates how much of a compound-event is selected [if any].
- *
- * The CompoundEventSelectionState enum is used with events that are
- * directly selectable, but also have associated events, too, that can be
- * selected. In this situation, there are a variety of different
- * selected states other than just "yes, no". This enum encodes those
- * various possible states.
- */
- var CompoundEventSelectionState = {
- // Basic bit states.
- NOT_SELECTED: 0,
- EVENT_SELECTED: 0x1,
- SOME_ASSOCIATED_EVENTS_SELECTED: 0x2,
- ALL_ASSOCIATED_EVENTS_SELECTED: 0x4,
-
- // Common combinations.
- EVENT_AND_SOME_ASSOCIATED_SELECTED: 0x1 | 0x2,
- EVENT_AND_ALL_ASSOCIATED_SELECTED: 0x1 | 0x4
- };
-
- return {
- CompoundEventSelectionState: CompoundEventSelectionState
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/constants.html b/chromium/third_party/catapult/tracing/tracing/model/constants.html
deleted file mode 100644
index 3c1ec4ff24b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/constants.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- return {
- // Since the PID of the browser process is not known to the child processes,
- // we let them use "pid_ref = -1" to reference an object created in the
- // browser process.
- BROWSER_PROCESS_PID_REF: -1,
-
- // The default scope of object events, when not explicitly specified.
- OBJECT_DEFAULT_SCOPE: 'ptr'
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/container_memory_dump.html b/chromium/third_party/catapult/tracing/tracing/model/container_memory_dump.html
deleted file mode 100644
index 355deb4bb5e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/container_memory_dump.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the ContainerMemoryDump class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * The ContainerMemoryDump represents an abstract container memory dump.
- * @constructor
- */
- function ContainerMemoryDump(start) {
- tr.model.TimedEvent.call(this, start);
-
- this.levelOfDetail = undefined;
-
- this.memoryAllocatorDumps_ = undefined;
- this.memoryAllocatorDumpsByFullName_ = undefined;
- };
-
- /**
- * Memory dump level of detail. See base::trace_event::MemoryDumpLevelOfDetail
- * in the Chromium repository.
- *
- * @enum
- */
- ContainerMemoryDump.LevelOfDetail = {
- BACKGROUND: 0,
- LIGHT: 1,
- DETAILED: 2
- };
-
- ContainerMemoryDump.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- shiftTimestampsForward: function(amount) {
- this.start += amount;
- },
-
- get memoryAllocatorDumps() {
- return this.memoryAllocatorDumps_;
- },
-
- set memoryAllocatorDumps(memoryAllocatorDumps) {
- this.memoryAllocatorDumps_ = memoryAllocatorDumps;
- this.forceRebuildingMemoryAllocatorDumpByFullNameIndex();
- },
-
- getMemoryAllocatorDumpByFullName: function(fullName) {
- if (this.memoryAllocatorDumps_ === undefined)
- return undefined;
-
- // Lazily generate the index if necessary.
- if (this.memoryAllocatorDumpsByFullName_ === undefined) {
- var index = {};
- function addDumpsToIndex(dumps) {
- dumps.forEach(function(dump) {
- index[dump.fullName] = dump;
- addDumpsToIndex(dump.children);
- });
- };
- addDumpsToIndex(this.memoryAllocatorDumps_);
- this.memoryAllocatorDumpsByFullName_ = index;
- }
-
- return this.memoryAllocatorDumpsByFullName_[fullName];
- },
-
- forceRebuildingMemoryAllocatorDumpByFullNameIndex: function() {
- // Clear the index and generate it lazily.
- this.memoryAllocatorDumpsByFullName_ = undefined;
- },
-
- iterateRootAllocatorDumps: function(fn, opt_this) {
- if (this.memoryAllocatorDumps === undefined)
- return;
- this.memoryAllocatorDumps.forEach(fn, opt_this || this);
- }
- };
-
- return {
- ContainerMemoryDump: ContainerMemoryDump
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/container_memory_dump_test.html b/chromium/third_party/catapult/tracing/tracing/model/container_memory_dump_test.html
deleted file mode 100644
index ff3585c41eb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/container_memory_dump_test.html
+++ /dev/null
@@ -1,177 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ContainerMemoryDump = tr.model.ContainerMemoryDump;
- var MemoryAllocatorDump = tr.model.MemoryAllocatorDump;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addChildDump = tr.model.MemoryDumpTestUtils.addChildDump;
-
- test('memoryAllocatorDumps_undefined', function() {
- var md = new ContainerMemoryDump(42);
-
- assert.isUndefined(md.memoryAllocatorDumps);
- assert.isUndefined(md.getMemoryAllocatorDumpByFullName('malloc'));
- });
-
- test('memoryAllocatorDumps_zero', function() {
- var md = new ContainerMemoryDump(42);
- md.memoryAllocatorDumps = [];
-
- assert.lengthOf(md.memoryAllocatorDumps, 0);
- assert.isUndefined(md.getMemoryAllocatorDumpByFullName('malloc'));
- });
-
- test('memoryAllocatorDumps_flat', function() {
- var md = new ContainerMemoryDump(42);
-
- var oilpanDump = newAllocatorDump(md, 'oilpan', {
- size: 1024,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 7),
- inner_size: 768
- });
- var v8Dump = newAllocatorDump(md, 'v8', {
- size: 2048,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 15),
- inner_size: 1999
- });
- md.memoryAllocatorDumps = [oilpanDump, v8Dump];
-
- assert.lengthOf(md.memoryAllocatorDumps, 2);
- assert.equal(md.memoryAllocatorDumps[0], oilpanDump);
- assert.equal(md.memoryAllocatorDumps[1], v8Dump);
-
- assert.equal(md.getMemoryAllocatorDumpByFullName('oilpan'), oilpanDump);
- assert.equal(md.getMemoryAllocatorDumpByFullName('v8'), v8Dump);
- assert.isUndefined(md.getMemoryAllocatorDumpByFullName('malloc'));
- });
-
- test('memoryAllocatorDumps_nested', function() {
- var md = new ContainerMemoryDump(42);
-
- var oilpanDump = newAllocatorDump(md, 'oilpan', {
- size: 1024,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 7),
- inner_size: 768
- });
-
- var oilpanBucket1Dump = addChildDump(oilpanDump, 'bucket1', {
- size: 512,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 3),
- inner_size: 256
- });
-
- var oilpanBucket2Dump = addChildDump(oilpanDump, 'bucket2', {
- size: 512,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 4),
- inner_size: 512
- });
-
- var oilpanBucket2StringsDump = addChildDump(oilpanBucket2Dump, 'strings', {
- size: 512,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 4),
- inner_size: 512
- });
-
- var v8Dump = newAllocatorDump(md, 'v8', {
- size: 2048,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 15),
- inner_size: 1999
- });
-
- md.memoryAllocatorDumps = [oilpanDump, v8Dump];
-
- assert.lengthOf(md.memoryAllocatorDumps, 2);
- assert.equal(md.memoryAllocatorDumps[0], oilpanDump);
- assert.equal(md.memoryAllocatorDumps[1], v8Dump);
-
- assert.equal(md.getMemoryAllocatorDumpByFullName('oilpan'), oilpanDump);
- assert.equal(md.getMemoryAllocatorDumpByFullName('oilpan/bucket1'),
- oilpanBucket1Dump);
- assert.equal(md.getMemoryAllocatorDumpByFullName('oilpan/bucket2'),
- oilpanBucket2Dump);
- assert.equal(md.getMemoryAllocatorDumpByFullName('oilpan/bucket2/strings'),
- oilpanBucket2StringsDump);
- assert.equal(md.getMemoryAllocatorDumpByFullName('v8'), v8Dump);
- assert.isUndefined(md.getMemoryAllocatorDumpByFullName('malloc'));
- });
-
- test('iterateRootAllocatorDumps', function() {
- var containerDump = new ContainerMemoryDump(42);
-
- var oilpanDump = new MemoryAllocatorDump(containerDump, 'oilpan');
- var v8Dump = new MemoryAllocatorDump(containerDump, 'v8');
- addChildDump(v8Dump, 'heaps');
-
- containerDump.memoryAllocatorDumps = [oilpanDump, v8Dump];
-
- var visitedAllocatorDumps = [];
- containerDump.iterateRootAllocatorDumps(
- function(dump) { this.visitedAllocatorDumps.push(dump); },
- { visitedAllocatorDumps: visitedAllocatorDumps });
- assert.sameMembers(visitedAllocatorDumps, [oilpanDump, v8Dump]);
- });
-
- test('forceRebuildingMemoryAllocatorDumpByFullNameIndex', function() {
- var containerDump = new ContainerMemoryDump(42);
-
- var v8Dump = new MemoryAllocatorDump(containerDump, 'v8');
- var v8HeapsDump = addChildDump(v8Dump, 'heaps');
- var v8HeapSmallDump = addChildDump(v8HeapsDump, 'S');
-
- // Setting the memory allocator dumps should update the index properly.
- containerDump.memoryAllocatorDumps = [v8Dump];
- assert.strictEqual(
- containerDump.getMemoryAllocatorDumpByFullName('v8'), v8Dump);
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps'), v8HeapsDump);
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps/S'), v8HeapSmallDump);
-
- // Add a second grandchild (v8/heaps/L).
- var v8HeapLargeDump = addChildDump(v8HeapsDump, 'L');
-
- // Setting the memory allocator dumps again should update the index
- // properly again.
- containerDump.memoryAllocatorDumps = [v8Dump];
- assert.strictEqual(
- containerDump.getMemoryAllocatorDumpByFullName('v8'), v8Dump);
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps'), v8HeapsDump);
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps/S'), v8HeapSmallDump);
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps/L'), v8HeapLargeDump);
-
- // Remove the first grandchild (v8/heaps/S).
- v8HeapsDump.children.splice(0, 1);
-
- // Force rebuilding the index and check that it was updated properly.
- containerDump.forceRebuildingMemoryAllocatorDumpByFullNameIndex();
- assert.strictEqual(
- containerDump.getMemoryAllocatorDumpByFullName('v8'), v8Dump);
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps'), v8HeapsDump);
- assert.isUndefined(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps/S'));
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- 'v8/heaps/L'), v8HeapLargeDump);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/counter.html b/chromium/third_party/catapult/tracing/tracing/model/counter.html
deleted file mode 100644
index 116afa05cc6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/counter.html
+++ /dev/null
@@ -1,195 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-<link rel="import" href="/tracing/model/event_container.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- /**
- * A container holding all series of a given type of measurement.
- *
- * As an example, if we're measuring the throughput of data sent over several
- * USB connections, the throughput of each cable might be added as a separate
- * series to a single counter.
- *
- * @constructor
- * @extends {EventContainer}
- */
- function Counter(parent, id, category, name) {
- tr.model.EventContainer.call(this);
-
- this.parent_ = parent;
- this.id_ = id;
- this.category_ = category || '';
- this.name_ = name;
-
- this.series_ = [];
- this.totals = [];
- }
-
- Counter.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get parent() {
- return this.parent_;
- },
-
- get id() {
- return this.id_;
- },
-
- get category() {
- return this.category_;
- },
-
- get name() {
- return this.name_;
- },
-
- childEvents: function*() {
- },
-
- childEventContainers: function*() {
- yield * this.series;
- },
-
- set timestamps(arg) {
- throw new Error('Bad counter API. No cookie.');
- },
-
- set seriesNames(arg) {
- throw new Error('Bad counter API. No cookie.');
- },
-
- set seriesColors(arg) {
- throw new Error('Bad counter API. No cookie.');
- },
-
- set samples(arg) {
- throw new Error('Bad counter API. No cookie.');
- },
-
- addSeries: function(series) {
- series.counter = this;
- series.seriesIndex = this.series_.length;
- this.series_.push(series);
- return series;
- },
-
- getSeries: function(idx) {
- return this.series_[idx];
- },
-
- get series() {
- return this.series_;
- },
-
- get numSeries() {
- return this.series_.length;
- },
-
- get numSamples() {
- if (this.series_.length === 0)
- return 0;
- return this.series_[0].length;
- },
-
- get timestamps() {
- if (this.series_.length === 0)
- return [];
- return this.series_[0].timestamps;
- },
-
- /**
- * Obtains min, max, avg, values, start, and end for different series for
- * a given counter
- * getSampleStatistics([0,1])
- * The statistics objects that this returns are an array of objects, one
- * object for each series for the counter in the form:
- * {min: minVal, max: maxVal, avg: avgVal, start: startVal, end: endVal}
- *
- * @param {Array.<Number>} Indices to summarize.
- * @return {Object} An array of statistics. Each element in the array
- * has data for one of the series in the selected counter.
- */
- getSampleStatistics: function(sampleIndices) {
- sampleIndices.sort();
-
- var ret = [];
- this.series_.forEach(function(series) {
- ret.push(series.getStatistics(sampleIndices));
- });
- return ret;
- },
-
- /**
- * Shifts all the timestamps inside this counter forward by the amount
- * specified.
- */
- shiftTimestampsForward: function(amount) {
- for (var i = 0; i < this.series_.length; ++i)
- this.series_[i].shiftTimestampsForward(amount);
- },
-
- /**
- * Updates the bounds for this counter based on the samples it contains.
- */
- updateBounds: function() {
- this.totals = [];
- this.maxTotal = 0;
- this.bounds.reset();
-
- if (this.series_.length === 0)
- return;
-
- var firstSeries = this.series_[0];
- var lastSeries = this.series_[this.series_.length - 1];
-
- this.bounds.addValue(firstSeries.getTimestamp(0));
- this.bounds.addValue(lastSeries.getTimestamp(lastSeries.length - 1));
-
- var numSeries = this.numSeries;
- this.maxTotal = -Infinity;
-
- // Sum the samples at each timestamp.
- // Note, this assumes that all series have all timestamps.
- for (var i = 0; i < firstSeries.length; ++i) {
- var total = 0;
- this.series_.forEach(function(series) {
- total += series.getSample(i).value;
- this.totals.push(total);
- }.bind(this));
-
- this.maxTotal = Math.max(total, this.maxTotal);
- }
- }
- };
-
- /**
- * Comparison between counters that orders by parent.compareTo, then name.
- */
- Counter.compare = function(x, y) {
- var tmp = x.parent.compareTo(y.parent);
- if (tmp !== 0)
- return tmp;
- var tmp = x.name.localeCompare(y.name);
- if (tmp === 0)
- return x.tid - y.tid;
- return tmp;
- };
-
- return {
- Counter: Counter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/counter_sample.html b/chromium/third_party/catapult/tracing/tracing/model/counter_sample.html
deleted file mode 100644
index db3882e84c4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/counter_sample.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_registry.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- /**
- * The value of a given measurement at a given time.
- *
- * As an example, if we're measuring the throughput of data sent over a USB
- * connection, each counter sample might represent the instantaneous
- * throughput of the connection at a given time.
- *
- * @constructor
- * @extends {Event}
- */
- function CounterSample(series, timestamp, value) {
- tr.model.Event.call(this);
- this.series_ = series;
- this.timestamp_ = timestamp;
- this.value_ = value;
- }
-
- CounterSample.groupByTimestamp = function(samples) {
- var samplesByTimestamp = tr.b.group(samples, function(sample) {
- return sample.timestamp;
- });
-
- var timestamps = tr.b.dictionaryKeys(samplesByTimestamp);
- timestamps.sort();
- var groups = [];
- for (var i = 0; i < timestamps.length; i++) {
- var ts = timestamps[i];
- var group = samplesByTimestamp[ts];
- group.sort(function(x, y) {
- return x.series.seriesIndex - y.series.seriesIndex;
- });
- groups.push(group);
- }
- return groups;
- };
-
- CounterSample.prototype = {
- __proto__: tr.model.Event.prototype,
-
- get series() {
- return this.series_;
- },
-
- get timestamp() {
- return this.timestamp_;
- },
-
- get value() {
- return this.value_;
- },
-
- set timestamp(timestamp) {
- this.timestamp_ = timestamp;
- },
-
- addBoundsToRange: function(range) {
- range.addValue(this.timestamp);
- },
-
- getSampleIndex: function() {
- return tr.b.findLowIndexInSortedArray(
- this.series.timestamps,
- function(x) { return x; },
- this.timestamp_);
- },
-
- get userFriendlyName() {
- return 'Counter sample from ' + this.series_.title + ' at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.timestamp);
- }
- };
-
-
- tr.model.EventRegistry.register(
- CounterSample,
- {
- name: 'counterSample',
- pluralName: 'counterSamples'
- });
-
- return {
- CounterSample: CounterSample
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/counter_sample_test.html b/chromium/third_party/catapult/tracing/tracing/model/counter_sample_test.html
deleted file mode 100644
index 2697a552554..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/counter_sample_test.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/counter.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Counter = tr.model.Counter;
- var CounterSeries = tr.model.CounterSeries;
- var CounterSample = tr.model.CounterSample;
-
- test('groupByTimestamp', function() {
- var counter = new Counter();
- var slice0 = counter.addSeries(new CounterSeries('x', 0));
- var slice1 = counter.addSeries(new CounterSeries('y', 1));
-
- var slice0Sample0 = slice0.addCounterSample(0, 100);
- var slice0Sample1 = slice1.addCounterSample(0, 200);
- var slice1Sample0 = slice0.addCounterSample(1, 100);
- var slice1Sample1 = slice1.addCounterSample(1, 200);
-
- var groups = CounterSample.groupByTimestamp([slice0Sample1, slice0Sample0,
- slice1Sample1, slice1Sample0]);
- assert.equal(groups.length, 2);
- assert.deepEqual(groups[0], [slice0Sample0, slice0Sample1]);
- assert.deepEqual(groups[1], [slice1Sample0, slice1Sample1]);
- });
-
- test('getSampleIndex', function() {
- var ctr = new Counter(null, 0, '', 'myCounter');
- var slice0 = new CounterSeries('a', 0);
- ctr.addSeries(slice0);
-
- var slice0Sample0 = slice0.addCounterSample(0, 0);
- var slice0Sample1 = slice0.addCounterSample(1, 100);
- assert.equal(slice0Sample0.getSampleIndex(), 0);
- assert.equal(slice0Sample1.getSampleIndex(), 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/counter_series.html b/chromium/third_party/catapult/tracing/tracing/model/counter_series.html
deleted file mode 100644
index 80ad2e167dc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/counter_series.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/counter_sample.html">
-<link rel="import" href="/tracing/model/event_container.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var CounterSample = tr.model.CounterSample;
-
- /**
- * A container holding all samples of a given measurement over time.
- *
- * As an example, a counter series might measure the throughput of data sent
- * over a USB connection, with each sample representing the instantaneous
- * throughput of the connection.
- *
- * @constructor
- * @extends {EventContainer}
- */
- function CounterSeries(name, color) {
- tr.model.EventContainer.call(this);
-
- this.name_ = name;
- this.color_ = color;
-
- this.timestamps_ = [];
- this.samples_ = [];
-
- // Set by counter.addSeries
- this.counter = undefined;
- this.seriesIndex = undefined;
- }
-
- CounterSeries.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get length() {
- return this.timestamps_.length;
- },
-
- get name() {
- return this.name_;
- },
-
- get color() {
- return this.color_;
- },
-
- get samples() {
- return this.samples_;
- },
-
- get timestamps() {
- return this.timestamps_;
- },
-
- getSample: function(idx) {
- return this.samples_[idx];
- },
-
- getTimestamp: function(idx) {
- return this.timestamps_[idx];
- },
-
- addCounterSample: function(ts, val) {
- var sample = new CounterSample(this, ts, val);
- this.addSample(sample);
- return sample;
- },
-
- addSample: function(sample) {
- this.timestamps_.push(sample.timestamp);
- this.samples_.push(sample);
- },
-
- getStatistics: function(sampleIndices) {
- var sum = 0;
- var min = Number.MAX_VALUE;
- var max = -Number.MAX_VALUE;
-
- for (var i = 0; i < sampleIndices.length; ++i) {
- var sample = this.getSample(sampleIndices[i]).value;
-
- sum += sample;
- min = Math.min(sample, min);
- max = Math.max(sample, max);
- }
-
- return {
- min: min,
- max: max,
- avg: (sum / sampleIndices.length),
- start: this.getSample(sampleIndices[0]).value,
- end: this.getSample(sampleIndices.length - 1).value
- };
- },
-
- shiftTimestampsForward: function(amount) {
- for (var i = 0; i < this.timestamps_.length; ++i) {
- this.timestamps_[i] += amount;
- this.samples_[i].timestamp = this.timestamps_[i];
- }
- },
-
- childEvents: function*() {
- yield * this.samples_;
- },
-
- childEventContainers: function*() {
- }
- };
-
- return {
- CounterSeries: CounterSeries
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/counter_test.html b/chromium/third_party/catapult/tracing/tracing/model/counter_test.html
deleted file mode 100644
index e5ff4f56b32..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/counter_test.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/counter.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Counter = tr.model.Counter;
- var CounterSeries = tr.model.CounterSeries;
- var CounterSample = tr.model.CounterSample;
-
- var createCounterWithTwoSeries = function() {
- var ctr = new Counter(null, 0, '', 'myCounter');
- var aSeries = new CounterSeries('a', 0);
- var bSeries = new CounterSeries('b', 0);
- ctr.addSeries(aSeries);
- ctr.addSeries(bSeries);
-
- aSeries.addCounterSample(0, 5);
- aSeries.addCounterSample(1, 6);
- aSeries.addCounterSample(2, 5);
- aSeries.addCounterSample(3, 7);
-
- bSeries.addCounterSample(0, 10);
- bSeries.addCounterSample(1, 15);
- bSeries.addCounterSample(2, 12);
- bSeries.addCounterSample(3, 16);
-
- return ctr;
- };
-
- test('getSampleStatisticsWithSingleSelection', function() {
- var ctr = createCounterWithTwoSeries();
- var ret = ctr.getSampleStatistics([0]);
-
- assert.equal(ret[0].min, 5);
- assert.equal(ret[0].max, 5);
- assert.equal(ret[0].avg, 5);
- assert.equal(ret[0].start, 5);
- assert.equal(ret[0].end, 5);
-
- assert.equal(ret[1].min, 10);
- assert.equal(ret[1].max, 10);
- assert.equal(ret[1].avg, 10);
- assert.equal(ret[1].start, 10);
- assert.equal(ret[1].end, 10);
- });
-
- test('getSampleStatisticsWithMultipleSelections', function() {
- var ctr = createCounterWithTwoSeries();
- var ret = ctr.getSampleStatistics([0, 1]);
-
- assert.equal(ret[0].min, 5);
- assert.equal(ret[0].max, 6);
- assert.equal(ret[0].avg, (5 + 6) / 2);
- assert.equal(ret[0].start, 5);
- assert.equal(ret[0].end, 6);
-
- assert.equal(ret[1].min, 10);
- assert.equal(ret[1].max, 15);
- assert.equal(ret[1].avg, (10 + 15) / 2);
- assert.equal(ret[1].start, 10);
- assert.equal(ret[1].end, 15);
- });
-
- test('getSampleStatisticsWithOutofOrderIndices', function() {
- var ctr = createCounterWithTwoSeries();
- var ret = ctr.getSampleStatistics([1, 0]);
-
- assert.equal(ret[0].min, 5);
- assert.equal(ret[0].max, 6);
- assert.equal(ret[0].avg, (5 + 6) / 2);
- assert.equal(ret[0].start, 5);
- assert.equal(ret[0].end, 6);
-
- assert.equal(ret[1].min, 10);
- assert.equal(ret[1].max, 15);
- assert.equal(ret[1].avg, (10 + 15) / 2);
- assert.equal(ret[1].start, 10);
- assert.equal(ret[1].end, 15);
- });
-
- test('getSampleStatisticsWithAllSelections', function() {
- var ctr = createCounterWithTwoSeries();
- var ret = ctr.getSampleStatistics([1, 0, 2, 3]);
-
- assert.equal(ret[0].min, 5);
- assert.equal(ret[0].max, 7);
- assert.equal(ret[0].avg, (5 + 6 + 5 + 7) / 4);
- assert.equal(ret[0].start, 5);
- assert.equal(ret[0].end, 7);
-
- assert.equal(ret[1].min, 10);
- assert.equal(ret[1].max, 16);
- assert.equal(ret[1].avg, (10 + 15 + 12 + 16) / 4);
- assert.equal(ret[1].start, 10);
- assert.equal(ret[1].end, 16);
- });
-
- test('testCounterSortRemainInOrder', function() {
- var model = new tr.Model();
- var process = new tr.model.Process(model, 4);
- var ctr1 = new Counter(process, 0, '', 'a');
- var ctr2 = new Counter(process, 0, '', 'b');
-
- var array = [ ctr1, ctr2 ];
- array.sort(tr.model.Counter.compare);
-
- assert.equal(array[0], ctr1);
- assert.equal(array[1], ctr2);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/cpu.html b/chromium/third_party/catapult/tracing/tracing/model/cpu.html
deleted file mode 100644
index 61f4d40d54a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/cpu.html
+++ /dev/null
@@ -1,272 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/counter.html">
-<link rel="import" href="/tracing/model/cpu_slice.html">
-<link rel="import" href="/tracing/model/process_base.html">
-<link rel="import" href="/tracing/model/thread_time_slice.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Cpu class.
- */
-tr.exportTo('tr.model', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var Counter = tr.model.Counter;
- var CpuSlice = tr.model.CpuSlice;
-
- /**
- * The Cpu represents a Cpu from the kernel's point of view.
- * @constructor
- */
- function Cpu(kernel, number) {
- if (kernel === undefined || number === undefined)
- throw new Error('Missing arguments');
- this.kernel = kernel;
- this.cpuNumber = number;
- this.slices = [];
- this.counters = {};
- this.bounds_ = new tr.b.Range();
- this.samples_ = undefined; // Set during createSubSlices
-
- // Start timestamp of the last active thread.
- this.lastActiveTimestamp_ = undefined;
-
- // Identifier of the last active thread. On Linux, it's a pid while on
- // Windows it's a thread id.
- this.lastActiveThread_ = undefined;
-
- // Name and arguments of the last active thread.
- this.lastActiveName_ = undefined;
- this.lastActiveArgs_ = undefined;
- }
-
- Cpu.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get samples() {
- return this.samples_;
- },
-
- get userFriendlyName() {
- return 'CPU ' + this.cpuNumber;
- },
-
- findTopmostSlicesInThisContainer: function*(eventPredicate, opt_this) {
- // All CpuSlices are toplevel since CpuSlices do not nest.
- for (var s of this.slices) {
- yield * s.findTopmostSlicesRelativeToThisSlice(
- eventPredicate, opt_this);
- }
- },
-
- childEvents: function*() {
- yield * this.slices;
-
- if (this.samples_)
- yield * this.samples_;
- },
-
- childEventContainers: function*() {
- yield * tr.b.dictionaryValues(this.counters);
- },
-
- /**
- * @return {Counter} The counter on this CPU with the given category/name
- * combination, creating it if it doesn't exist.
- */
- getOrCreateCounter: function(cat, name) {
- var id = cat + '.' + name;
- if (!this.counters[id])
- this.counters[id] = new Counter(this, id, cat, name);
- return this.counters[id];
- },
-
- /**
- * @return {Counter} the counter on this CPU with the given category/name
- * combination, or undefined if it doesn't exist.
- */
- getCounter: function(cat, name) {
- var id = cat + '.' + name;
- if (!this.counters[id])
- return undefined;
- return this.counters[id];
- },
-
- /**
- * Shifts all the timestamps inside this CPU forward by the amount
- * specified.
- */
- shiftTimestampsForward: function(amount) {
- for (var sI = 0; sI < this.slices.length; sI++)
- this.slices[sI].start = (this.slices[sI].start + amount);
- for (var id in this.counters)
- this.counters[id].shiftTimestampsForward(amount);
- },
-
- /**
- * Updates the range based on the current slices attached to the cpu.
- */
- updateBounds: function() {
- this.bounds_.reset();
- if (this.slices.length) {
- this.bounds_.addValue(this.slices[0].start);
- this.bounds_.addValue(this.slices[this.slices.length - 1].end);
- }
- for (var id in this.counters) {
- this.counters[id].updateBounds();
- this.bounds_.addRange(this.counters[id].bounds);
- }
- if (this.samples_ && this.samples_.length) {
- this.bounds_.addValue(this.samples_[0].start);
- this.bounds_.addValue(
- this.samples_[this.samples_.length - 1].end);
- }
- },
-
- createSubSlices: function() {
- this.samples_ = this.kernel.model.samples.filter(function(sample) {
- return sample.cpu === this;
- }, this);
- },
-
- addCategoriesToDict: function(categoriesDict) {
- for (var i = 0; i < this.slices.length; i++)
- categoriesDict[this.slices[i].category] = true;
- for (var id in this.counters)
- categoriesDict[this.counters[id].category] = true;
- for (var i = 0; i < this.samples_.length; i++)
- categoriesDict[this.samples_[i].category] = true;
- },
-
-
-
- /*
- * Returns the index of the slice in the CPU's slices, or undefined.
- */
- indexOf: function(cpuSlice) {
- var i = tr.b.findLowIndexInSortedArray(
- this.slices,
- function(slice) { return slice.start; },
- cpuSlice.start);
- if (this.slices[i] !== cpuSlice)
- return undefined;
- return i;
- },
-
- /**
- * Closes the thread running on the CPU. |endTimestamp| is the timestamp
- * at which the thread was unscheduled. |args| is merged with the arguments
- * specified when the thread was initially scheduled.
- */
- closeActiveThread: function(endTimestamp, args) {
- // Don't generate a slice if the last active thread is the idle task.
- if (this.lastActiveThread_ === undefined || this.lastActiveThread_ === 0)
- return;
-
- if (endTimestamp < this.lastActiveTimestamp_) {
- throw new Error('The end timestamp of a thread running on CPU ' +
- this.cpuNumber + ' is before its start timestamp.');
- }
-
- // Merge |args| with |this.lastActiveArgs_|. If a key is in both
- // dictionaries, the value from |args| is used.
- for (var key in args) {
- this.lastActiveArgs_[key] = args[key];
- }
-
- var duration = endTimestamp - this.lastActiveTimestamp_;
- var slice = new tr.model.CpuSlice(
- '', this.lastActiveName_,
- ColorScheme.getColorIdForGeneralPurposeString(this.lastActiveName_),
- this.lastActiveTimestamp_,
- this.lastActiveArgs_,
- duration);
- slice.cpu = this;
- this.slices.push(slice);
-
- // Clear the last state.
- this.lastActiveTimestamp_ = undefined;
- this.lastActiveThread_ = undefined;
- this.lastActiveName_ = undefined;
- this.lastActiveArgs_ = undefined;
- },
-
- switchActiveThread: function(timestamp, oldThreadArgs, newThreadId,
- newThreadName, newThreadArgs) {
- // Close the previous active thread and generate a slice.
- this.closeActiveThread(timestamp, oldThreadArgs);
-
- // Keep track of the new thread.
- this.lastActiveTimestamp_ = timestamp;
- this.lastActiveThread_ = newThreadId;
- this.lastActiveName_ = newThreadName;
- this.lastActiveArgs_ = newThreadArgs;
- },
-
- /**
- * Returns the frequency statistics for this CPU;
- * the returned object contains the frequencies as keys,
- * and the duration at this frequency in milliseconds as the value,
- * for the range that was specified.
- */
- getFreqStatsForRange: function(range) {
- var stats = {};
-
- function addStatsForFreq(freqSample, index) {
- // Counters don't have an explicit end or duration;
- // calculate the end by looking at the starting point
- // of the next value in the series, or if that doesn't
- // exist, assume this frequency is held until the end.
- var freqEnd = (index < freqSample.series_.length - 1) ?
- freqSample.series_.samples_[index + 1].timestamp : range.max;
-
- var freqRange = tr.b.Range.fromExplicitRange(freqSample.timestamp,
- freqEnd);
- var intersection = freqRange.findIntersection(range);
- if (!(freqSample.value in stats))
- stats[freqSample.value] = 0;
- stats[freqSample.value] += intersection.duration;
- }
-
- var freqCounter = this.getCounter('', 'Clock Frequency');
- if (freqCounter !== undefined) {
- var freqSeries = freqCounter.getSeries(0);
- if (!freqSeries)
- return;
-
- tr.b.iterateOverIntersectingIntervals(freqSeries.samples_,
- function(x) { return x.timestamp; },
- function(x, index) { return index < freqSeries.length - 1 ?
- freqSeries.samples_[index + 1].timestamp :
- range.max; },
- range.min,
- range.max,
- addStatsForFreq);
- }
-
- return stats;
- }
- };
-
- /**
- * Comparison between processes that orders by cpuNumber.
- */
- Cpu.compare = function(x, y) {
- return x.cpuNumber - y.cpuNumber;
- };
-
-
- return {
- Cpu: Cpu
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/cpu_slice.html b/chromium/third_party/catapult/tracing/tracing/model/cpu_slice.html
deleted file mode 100644
index c999e00bc56..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/cpu_slice.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/thread_time_slice.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the CpuSlice class.
- */
-tr.exportTo('tr.model', function() {
-
- var Slice = tr.model.Slice;
-
- /**
- * A CpuSlice represents a slice of time on a CPU.
- *
- * @constructor
- */
- function CpuSlice(cat, title, colorId, start, args, opt_duration) {
- Slice.apply(this, arguments);
- this.threadThatWasRunning = undefined;
- this.cpu = undefined;
- }
-
- CpuSlice.prototype = {
- __proto__: Slice.prototype,
-
- get analysisTypeName() {
- return 'tr.ui.analysis.CpuSlice';
- },
-
- getAssociatedTimeslice: function() {
- if (!this.threadThatWasRunning)
- return undefined;
- var timeSlices = this.threadThatWasRunning.timeSlices;
- for (var i = 0; i < timeSlices.length; i++) {
- var timeSlice = timeSlices[i];
- if (timeSlice.start !== this.start)
- continue;
- if (timeSlice.duration !== this.duration)
- continue;
- return timeSlice;
- }
- return undefined;
- }
- };
-
- tr.model.EventRegistry.register(
- CpuSlice,
- {
- name: 'cpuSlice',
- pluralName: 'cpuSlices'
- });
-
- return {
- CpuSlice: CpuSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/cpu_test.html b/chromium/third_party/catapult/tracing/tracing/model/cpu_test.html
deleted file mode 100644
index 74c8e135fbe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/cpu_test.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ColorScheme = tr.b.ColorScheme;
- var Cpu = tr.model.Cpu;
- var newThreadSlice = tr.c.TestUtils.newThreadSlice;
-
- test('cpuBounds_Empty', function() {
- var cpu = new Cpu({}, 1);
- cpu.updateBounds();
- assert.isUndefined(cpu.bounds.min);
- assert.isUndefined(cpu.bounds.max);
- });
-
- test('cpuBounds_OneSlice', function() {
- var cpu = new Cpu({}, 1);
- cpu.slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 3}));
- cpu.updateBounds();
- assert.equal(cpu.bounds.min, 1);
- assert.equal(cpu.bounds.max, 4);
- });
-
- test('getOrCreateCounter', function() {
- var cpu = new Cpu({}, 1);
- var ctrBar = cpu.getOrCreateCounter('foo', 'bar');
- var ctrBar2 = cpu.getOrCreateCounter('foo', 'bar');
- assert.equal(ctrBar, ctrBar2);
- });
-
- test('shiftTimestampsForward', function() {
- var cpu = new Cpu({}, 1);
- var ctr = cpu.getOrCreateCounter('foo', 'bar');
- cpu.slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 3}));
- var shiftCount = 0;
- ctr.shiftTimestampsForward = function(ts) {
- if (ts === 0.32)
- shiftCount++;
- };
- cpu.slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 3}));
- cpu.shiftTimestampsForward(0.32);
- assert.equal(1, shiftCount);
- assert.equal(cpu.slices[0].start, 1.32);
- });
-
-
- function newCpuSliceNamed(cpu, name, start, duration, opt_thread) {
- var s = new tr.model.CpuSlice(
- 'cat', name, 0, start, {}, duration);
- s.cpu = cpu;
- if (opt_thread)
- s.threadThatWasRunning = opt_thread;
- return s;
- }
-
- test('getTimesliceForCpuSlice', function() {
- var m = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var cpu = m.kernel.getOrCreateCpu(1);
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- t2.timeSlices = [newThreadSlice(t2, SCHEDULING_STATE.RUNNING, 0, 10, cpu),
- newThreadSlice(t2, SCHEDULING_STATE.SLEEPING, 10, 10),
- newThreadSlice(t2, SCHEDULING_STATE.RUNNING, 20, 10, cpu)];
- cpu.slices = [newCpuSliceNamed(cpu, 'x', 0, 10, t2),
- newCpuSliceNamed(cpu, 'x', 20, 10, t2)];
- assert.equal(cpu.slices[0].getAssociatedTimeslice(), t2.timeSlices[0]);
- assert.equal(cpu.slices[1].getAssociatedTimeslice(), t2.timeSlices[2]);
-
- assert.equal(t2.timeSlices[0].getAssociatedCpuSlice(), cpu.slices[0]);
- assert.isUndefined(t2.timeSlices[1].getAssociatedCpuSlice());
- assert.equal(t2.timeSlices[2].getAssociatedCpuSlice(), cpu.slices[1]);
-
- assert.equal(cpu.indexOf(cpu.slices[0]), 0);
- assert.equal(cpu.indexOf(cpu.slices[1]), 1);
-
- assert.equal(t2.indexOfTimeSlice(t2.timeSlices[0]), 0);
- assert.equal(t2.indexOfTimeSlice(t2.timeSlices[1]), 1);
- assert.equal(t2.indexOfTimeSlice(t2.timeSlices[2]), 2);
- });
-
- test('putToSleepFor', function() {
- var m = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var cpu = m.kernel.getOrCreateCpu(1);
-
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var t3 = m.getOrCreateProcess(1).getOrCreateThread(3);
- t2.timeSlices = [newThreadSlice(t2, SCHEDULING_STATE.RUNNING, 0, 10, cpu),
- newThreadSlice(t2, SCHEDULING_STATE.SLEEPING, 10, 10),
- newThreadSlice(t2, SCHEDULING_STATE.RUNNING, 20, 10, cpu)];
- t3.timeSlices = [newThreadSlice(t3, SCHEDULING_STATE.RUNNING, 10, 5, cpu)];
- cpu.slices = [newCpuSliceNamed(cpu, 'x', 0, 10, t2),
- newCpuSliceNamed(cpu, 'x', 10, 5, t3),
- newCpuSliceNamed(cpu, 'x', 20, 10, t2)];
-
- // At timeslice 0, the thread is running.
- assert.isUndefined(t2.timeSlices[0].getCpuSliceThatTookCpu());
-
- // t2 lost the cpu to t3 at t=10
- assert.equal(
- cpu.slices[1],
- t2.timeSlices[1].getCpuSliceThatTookCpu());
- });
-
- test('putToSleepForNothing', function() {
- var m = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var cpu = m.kernel.getOrCreateCpu(1);
-
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var t3 = m.getOrCreateProcess(1).getOrCreateThread(3);
- t2.timeSlices = [newThreadSlice(t2, SCHEDULING_STATE.RUNNING, 0, 10, cpu),
- newThreadSlice(t2, SCHEDULING_STATE.SLEEPING, 10, 10),
- newThreadSlice(t2, SCHEDULING_STATE.RUNNING, 20, 10, cpu)];
- t3.timeSlices = [newThreadSlice(t3, SCHEDULING_STATE.RUNNING, 15, 5, cpu)];
- cpu.slices = [newCpuSliceNamed(cpu, 'x', 0, 10, t2),
- newCpuSliceNamed(cpu, 'x', 15, 5, t3),
- newCpuSliceNamed(cpu, 'x', 20, 10, t2)];
- assert.isUndefined(t2.timeSlices[1].getCpuSliceThatTookCpu());
- });
-
- test('switchActiveThread', function() {
- var m = new tr.Model();
- var cpu = m.kernel.getOrCreateCpu(1);
-
- cpu.switchActiveThread(5, {}, 0, 'idle thread', {});
- cpu.switchActiveThread(10, {}, 1, 'thread one', {a: 1});
- cpu.switchActiveThread(15, {b: 2}, 2, 'thread two', {c: 3});
- cpu.switchActiveThread(30, {c: 4, d: 5}, 3, 'thread three', {e: 6});
- cpu.closeActiveThread(40, {f: 7});
- cpu.switchActiveThread(50, {}, 4, 'thread four', {g: 8});
- cpu.switchActiveThread(60, {}, 1, 'thread one', {});
- cpu.closeActiveThread(70, {});
-
- assert.equal(cpu.slices.length, 5);
-
- assert.equal(cpu.slices[0].title, 'thread one');
- assert.equal(cpu.slices[0].start, 10);
- assert.equal(cpu.slices[0].duration, 5);
- assert.equal(Object.keys(cpu.slices[0].args).length, 2);
- assert.equal(cpu.slices[0].args.a, 1);
- assert.equal(cpu.slices[0].args.b, 2);
-
- assert.equal(cpu.slices[1].title, 'thread two');
- assert.equal(cpu.slices[1].start, 15);
- assert.equal(cpu.slices[1].duration, 15);
- assert.equal(Object.keys(cpu.slices[1].args).length, 2);
- assert.equal(cpu.slices[1].args.c, 4);
- assert.equal(cpu.slices[1].args.d, 5);
-
- assert.equal(cpu.slices[2].title, 'thread three');
- assert.equal(cpu.slices[2].start, 30);
- assert.equal(cpu.slices[2].duration, 10);
- assert.equal(Object.keys(cpu.slices[2].args).length, 2);
- assert.equal(cpu.slices[2].args.e, 6);
- assert.equal(cpu.slices[2].args.f, 7);
-
- assert.equal(cpu.slices[3].title, 'thread four');
- assert.equal(cpu.slices[3].start, 50);
- assert.equal(cpu.slices[3].duration, 10);
- assert.equal(Object.keys(cpu.slices[3].args).length, 1);
- assert.equal(cpu.slices[3].args.g, 8);
-
- assert.equal(cpu.slices[4].title, 'thread one');
- assert.equal(cpu.slices[4].start, 60);
- assert.equal(cpu.slices[4].duration, 10);
- assert.equal(Object.keys(cpu.slices[4].args).length, 0);
- });
-
- test('getFrequencyStats', function() {
- var m = new tr.Model();
- var cpu = m.kernel.getOrCreateCpu(1);
- var powerCounter = cpu.getOrCreateCounter('', 'Clock Frequency');
- var series = powerCounter.addSeries(new tr.model.CounterSeries('state',
- ColorScheme.getColorIdForGeneralPurposeString('test')));
-
- series.addCounterSample(0, 100000);
- series.addCounterSample(20, 300000);
- series.addCounterSample(30, 100000);
- series.addCounterSample(80, 500000);
- series.addCounterSample(100, 300000);
-
- var range = tr.b.Range.fromExplicitRange(10, 90);
- var stats = cpu.getFreqStatsForRange(range);
- assert.equal(stats[100000], 60);
- assert.equal(stats[300000], 10);
- assert.equal(stats[500000], 10);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/device.html b/chromium/third_party/catapult/tracing/tracing/model/device.html
deleted file mode 100644
index cbb1b2aa91a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/device.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/event_container.html">
-<link rel="import" href="/tracing/model/power_series.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Device class.
- */
-tr.exportTo('tr.model', function() {
-
- /**
- * Device represents the device-level objects in the model.
- * @constructor
- * @extends {tr.model.EventContainer}
- */
- function Device(model) {
- if (!model)
- throw new Error('Must provide a model.');
-
- tr.model.EventContainer.call(this);
-
- this.powerSeries_ = undefined;
- this.vSyncTimestamps_ = [];
- };
-
- Device.compare = function(x, y) {
- return x.guid - y.guid;
- };
-
- Device.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- compareTo: function(that) {
- return Device.compare(this, that);
- },
-
- get userFriendlyName() {
- return 'Device';
- },
-
- get userFriendlyDetails() {
- return 'Device';
- },
-
- get stableId() {
- return 'Device';
- },
-
- getSettingsKey: function() {
- return 'device';
- },
-
- get powerSeries() {
- return this.powerSeries_;
- },
-
- set powerSeries(powerSeries) {
- this.powerSeries_ = powerSeries;
- },
-
- get vSyncTimestamps() {
- return this.vSyncTimestamps_;
- },
-
- set vSyncTimestamps(value) {
- this.vSyncTimestamps_ = value;
- },
-
- updateBounds: function() {
- this.bounds.reset();
- for (var child of this.childEventContainers()) {
- child.updateBounds();
- this.bounds.addRange(child.bounds);
- }
- },
-
- shiftTimestampsForward: function(amount) {
- for (var child of this.childEventContainers()) {
- child.shiftTimestampsForward(amount);
- }
-
- for (var i = 0; i < this.vSyncTimestamps_.length; i++)
- this.vSyncTimestamps_[i] += amount;
- },
-
- addCategoriesToDict: function(categoriesDict) {
- },
-
- childEventContainers: function*() {
- if (this.powerSeries_)
- yield this.powerSeries_;
- }
- };
-
- return {
- Device: Device
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/device_test.html b/chromium/third_party/catapult/tracing/tracing/model/device_test.html
deleted file mode 100644
index 5457e65a1ff..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/device_test.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/device.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var Device = tr.model.Device;
- var Model = tr.Model;
- var PowerSeries = tr.model.PowerSeries;
-
- test('updateBounds', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
-
- // Verify that the bounds match the lowest and highest timestamps.
- device.powerSeries.addPowerSample(100, 5);
- device.powerSeries.addPowerSample(200, 5);
- device.updateBounds();
-
- assert.equal(device.bounds.min, 100);
- assert.equal(device.bounds.max, 200);
-
- // Add a new sample and verify that the bounds change.
- device.powerSeries.addPowerSample(700, 5);
- device.updateBounds();
-
- assert.equal(device.bounds.min, 100);
- assert.equal(device.bounds.max, 700);
- });
-
- test('shiftTimestampsForward', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
-
- device.powerSeries.addPowerSample(100, 2);
- device.powerSeries.addPowerSample(200, 2);
- device.shiftTimestampsForward(2);
-
- assert.equal(device.powerSeries.samples[0].start, 102);
- assert.equal(device.powerSeries.samples[1].start, 202);
- });
-
- test('childEventContainers_noPowerSeries', function() {
- var device = new Device(new Model());
- var childEventContainers = [];
- for (var container of device.childEventContainers())
- childEventContainers.push(container);
- assert.deepEqual(childEventContainers, []);
- });
-
- test('childEventContainers_powerSeries', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
- var childEventContainers = [];
- for (var container of device.childEventContainers())
- childEventContainers.push(container);
- assert.deepEqual(childEventContainers, [device.powerSeries]);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event.html b/chromium/third_party/catapult/tracing/tracing/model/event.html
deleted file mode 100644
index 9695c8207ed..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/selectable_item.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Event class.
- */
-tr.exportTo('tr.model', function() {
- var SelectableItem = tr.model.SelectableItem;
- var SelectionState = tr.model.SelectionState;
- var IMMUTABLE_EMPTY_SET = tr.model.EventSet.IMMUTABLE_EMPTY_SET;
-
- /**
- * An Event is the base type for any non-container, selectable piece
- * of data in the trace model.
- *
- * @constructor
- * @extends {SelectableItem}
- */
- function Event() {
- SelectableItem.call(this, this /* modelItem */);
- this.guid_ = tr.b.GUID.allocateSimple();
- this.selectionState = SelectionState.NONE;
- this.info = undefined;
- }
-
- Event.prototype = {
- __proto__: SelectableItem.prototype,
-
- get guid() {
- return this.guid_;
- },
-
- get stableId() {
- return undefined;
- },
-
- get range() {
- var range = new tr.b.Range();
- this.addBoundsToRange(range);
- return range;
- },
-
- // Empty by default. Lazily initialized on an instance in
- // addAssociatedAlert(). See #1930.
- associatedAlerts: IMMUTABLE_EMPTY_SET,
-
- addAssociatedAlert: function(alert) {
- if (this.associatedAlerts === IMMUTABLE_EMPTY_SET)
- this.associatedAlerts = new tr.model.EventSet();
- this.associatedAlerts.push(alert);
- },
-
- // Adds the range of timestamps for this event to the specified range.
- // If this is not overridden in subclass, it means that type of event
- // doesn't have timestamps.
- addBoundsToRange: function(range) {}
- };
-
- return {
- Event: Event
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event_container.html b/chromium/third_party/catapult/tracing/tracing/model/event_container.html
deleted file mode 100644
index 48b5d943d37..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event_container.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- /**
- * EventContainer is a base class for any class in the trace model that
- * contains child events or child EventContainers.
- *
- * For all EventContainers, updateBounds() must be called after modifying the
- * container's events if an up-to-date bounds is expected.
- *
- * @constructor
- */
- function EventContainer() {
- this.guid_ = tr.b.GUID.allocateSimple();
- this.important = true;
- this.bounds_ = new tr.b.Range();
- }
-
- EventContainer.prototype = {
- get guid() {
- return this.guid_;
- },
-
- /**
- * @return {String} A stable and unique identifier that describes this
- * container's position in the event tree relative to the root. If an event
- * container 'B' is a child to another event container 'A', then container
- * B's stable ID would be 'A.B'.
- */
- get stableId() {
- throw new Error('Not implemented');
- },
-
- /**
- * Returns the bounds of the event container, which describe the range
- * of timestamps for all ancestor events.
- */
- get bounds() {
- return this.bounds_;
- },
-
- // TODO(charliea): A default implementation of this method could likely be
- // provided that iterates throuch getDescendantEvents.
- /**
- * Updates the bounds of the event container. After updating, this.bounds
- * will describe the range of timestamps of all ancestor events.
- */
- updateBounds: function() {
- throw new Error('Not implemented');
- },
-
- // TODO(charliea): A default implementation of this method could likely be
- // provided that iterates through getDescendantEvents.
- /**
- * Shifts the timestamps for ancestor events by 'amount' milliseconds.
- */
- shiftTimestampsForward: function(amount) {
- throw new Error('Not implemented');
- },
-
-
- /**
- * Returns an iterable of all child events.
- */
- childEvents: function*() {
- },
-
- /**
- * Returns an iterable of all events in this and descendant
- * event containers.
- */
- getDescendantEvents: function*() {
- yield * this.childEvents();
- for (var container of this.childEventContainers())
- yield * container.getDescendantEvents();
- },
-
- /**
- * Returns an iterable of all child event containers.
- */
- childEventContainers: function*() {
- },
-
- /**
- * Returns an iterable containing this and all descendant event containers.
- */
- getDescendantEventContainers: function*() {
- yield this;
- for (var container of this.childEventContainers())
- yield * container.getDescendantEventContainers();
- },
-
- /**
- * Finds topmost slices in this container (see docstring for
- * findTopmostSlices).
- */
- findTopmostSlicesInThisContainer: function*(eventPredicate, opt_this) {
- },
-
- /**
- * The findTopmostSlices* series of helpers find all topmost slices
- * satisfying the given predicates.
- *
- * As an example, suppose we are trying to find slices named 'C', with the
- * following thread:
- *
- * -> |---C---| |-----D-----|
- * |-C-| |---C---| <-
- *
- * findTopmostSlices would locate the pointed-to Cs, because the bottom C on
- * the left is not the topmost C, and the right one is, even though it is
- * not itself a top-level slice.
- */
- findTopmostSlices: function*(eventPredicate) {
- for (var ec of this.getDescendantEventContainers())
- yield * ec.findTopmostSlicesInThisContainer(eventPredicate);
- },
-
- findTopmostSlicesNamed: function*(name) {
- yield * this.findTopmostSlices(e => e.title === name);
- }
- };
-
- return {
- EventContainer: EventContainer
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event_info.html b/chromium/third_party/catapult/tracing/tracing/model/event_info.html
deleted file mode 100644
index 5c3ff53c813..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event_info.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/color_scheme.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- /**
- * EventInfo is an annotation added to Events in order to document
- * what they represent, and override their title/colorId values.
- *
- * TODO(ccraik): eventually support more complex structure/paragraphs.
- *
- * @param {string} title A user-visible title for the event.
- * @param {string} description A user-visible description of the event.
- * @param {Array} docLinks A list of Objects, each of the form
- * {label: str, textContent: str, href: str}
- *
- * @constructor
- */
- function EventInfo(title, description, docLinks) {
- this.title = title;
- this.description = description;
- this.docLinks = docLinks;
- this.colorId = ColorScheme.getColorIdForGeneralPurposeString(title);
- }
-
- return {
- EventInfo: EventInfo
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event_registry.html b/chromium/third_party/catapult/tracing/tracing/model/event_registry.html
deleted file mode 100644
index ae5ec61dc33..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event_registry.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the EventRegistry class.
- */
-tr.exportTo('tr.model', function() {
- // Create the type registry.
- function EventRegistry() {
- }
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- tr.b.decorateExtensionRegistry(EventRegistry, options);
-
- // Enforce all options objects have the right fields.
- EventRegistry.addEventListener('will-register', function(e) {
- var metadata = e.typeInfo.metadata;
- if (metadata.name === undefined)
- throw new Error('Registered events must provide name metadata');
- if (metadata.pluralName === undefined)
- throw new Error('Registered events must provide pluralName metadata');
-
- // Add a subtype registry to every event so that all events can be
- // extended
- if (metadata.subTypes === undefined) {
- metadata.subTypes = {};
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = e.typeInfo.constructor;
- options.defaultConstructor = e.typeInfo.constructor;
- tr.b.decorateExtensionRegistry(metadata.subTypes, options);
- } else {
- if (!metadata.subTypes.register)
- throw new Error('metadata.subTypes must be an extension registry.');
- }
-
- e.typeInfo.constructor.subTypes = metadata.subTypes;
- });
-
- // Helper: lookup Events indexed by type name.
- var eventsByTypeName = undefined;
- EventRegistry.getEventTypeInfoByTypeName = function(typeName) {
- if (eventsByTypeName === undefined) {
- eventsByTypeName = {};
- EventRegistry.getAllRegisteredTypeInfos().forEach(function(typeInfo) {
- eventsByTypeName[typeInfo.metadata.name] = typeInfo;
- });
- }
- return eventsByTypeName[typeName];
- };
-
- // Ensure eventsByTypeName stays current.
- EventRegistry.addEventListener('registry-changed', function() {
- eventsByTypeName = undefined;
- });
-
- function convertCamelCaseToTitleCase(name) {
- var result = name.replace(/[A-Z]/g, ' $&');
- result = result.charAt(0).toUpperCase() + result.slice(1);
- return result;
- }
-
- EventRegistry.getUserFriendlySingularName = function(typeName) {
- var typeInfo = EventRegistry.getEventTypeInfoByTypeName(typeName);
- var str = typeInfo.metadata.name;
- return convertCamelCaseToTitleCase(str);
- };
-
- EventRegistry.getUserFriendlyPluralName = function(typeName) {
- var typeInfo = EventRegistry.getEventTypeInfoByTypeName(typeName);
- var str = typeInfo.metadata.pluralName;
- return convertCamelCaseToTitleCase(str);
- };
-
- return {
- EventRegistry: EventRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event_set.html b/chromium/third_party/catapult/tracing/tracing/model/event_set.html
deleted file mode 100644
index 344f524fa02..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event_set.html
+++ /dev/null
@@ -1,277 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/event_registry.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- var EventRegistry = tr.model.EventRegistry;
-
- var RequestSelectionChangeEvent = tr.b.Event.bind(
- undefined, 'requestSelectionChange', true, false);
-
- /**
- * Represents a event set within a and its associated set of tracks.
- * @constructor
- */
- function EventSet(opt_events) {
- this.bounds_ = new tr.b.Range();
- this.events_ = new Set();
-
- if (opt_events) {
- if (opt_events instanceof Array) {
- for (var event of opt_events)
- this.push(event);
- } else if (opt_events instanceof EventSet) {
- this.addEventSet(opt_events);
- } else {
- this.push(opt_events);
- }
- }
- }
-
- EventSet.prototype = {
- __proto__: Object.prototype,
-
- get bounds() {
- return this.bounds_;
- },
-
- get duration() {
- if (this.bounds_.isEmpty)
- return 0;
- return this.bounds_.max - this.bounds_.min;
- },
-
- get length() {
- return this.events_.size;
- },
-
- get guid() {
- return this.guid_;
- },
-
- *[Symbol.iterator]() {
- for (var event of this.events_)
- yield event;
- },
-
- clear: function() {
- this.bounds_ = new tr.b.Range();
- this.events_.clear();
- },
-
- // push pushes only unique events.
- // If an event has been already pushed, do nothing.
- push: function(event) {
- if (event.guid === undefined)
- throw new Error('Event must have a GUID');
-
- if (!this.events_.has(event)) {
- this.events_.add(event);
- // Some uses of eventSet, particularly in tests, have Events as objects
- // that don't have addBoundsToRange as a function. Thus we need to
- // handle this case.
- if (event.addBoundsToRange)
- if (this.bounds_ !== undefined)
- event.addBoundsToRange(this.bounds_);
- }
-
- return event;
- },
-
- contains: function(event) {
- if (this.events_.has(event))
- return event;
- else
- return undefined;
- },
-
- addEventSet: function(eventSet) {
- for (var event of eventSet)
- this.push(event);
- },
-
- intersectionIsEmpty: function(otherEventSet) {
- return !this.some(event => otherEventSet.contains(event));
- },
-
- equals: function(that) {
- if (this.length !== that.length)
- return false;
- return this.every(event => that.contains(event));
- },
-
- sortEvents: function(compare) {
- // Convert to array, then sort, then convert back
- var ary = this.toArray();
- ary.sort(compare);
-
- this.clear();
- for (var event of ary)
- this.push(event);
- },
-
- getEventsOrganizedByBaseType: function(opt_pruneEmpty) {
- var allTypeInfos = EventRegistry.getAllRegisteredTypeInfos();
-
- var events = this.getEventsOrganizedByCallback(function(event) {
- var maxEventIndex = -1;
- var maxEventTypeInfo = undefined;
-
- allTypeInfos.forEach(function(eventTypeInfo, eventIndex) {
- if (!(event instanceof eventTypeInfo.constructor))
- return;
- if (eventIndex > maxEventIndex) {
- maxEventIndex = eventIndex;
- maxEventTypeInfo = eventTypeInfo;
- }
- });
-
- if (maxEventIndex === -1) {
- console.log(event);
- throw new Error('Unrecognized event type');
- }
-
- return maxEventTypeInfo.metadata.name;
- });
-
- if (!opt_pruneEmpty) {
- allTypeInfos.forEach(function(eventTypeInfo) {
- if (events[eventTypeInfo.metadata.name] === undefined)
- events[eventTypeInfo.metadata.name] = new EventSet();
- });
- }
-
- return events;
- },
-
- getEventsOrganizedByTitle: function() {
- return this.getEventsOrganizedByCallback(function(event) {
- if (event.title === undefined)
- throw new Error('An event didn\'t have a title!');
- return event.title;
- });
- },
-
- /**
- * @param {!function(!tr.model.Event):string} cb
- * @param {*=} opt_this
- * @return {!Object}
- */
- getEventsOrganizedByCallback: function(cb, opt_this) {
- var groupedEvents = tr.b.group(this, cb, opt_this || this);
- return tr.b.mapItems(groupedEvents, (_, events) => new EventSet(events));
- },
-
- enumEventsOfType: function(type, func) {
- for (var event of this)
- if (event instanceof type)
- func(event);
- },
-
- get userFriendlyName() {
- if (this.length === 0) {
- throw new Error('Empty event set');
- }
-
- var eventsByBaseType = this.getEventsOrganizedByBaseType(true);
- var eventTypeName = tr.b.dictionaryKeys(eventsByBaseType)[0];
-
- if (this.length === 1) {
- var tmp = EventRegistry.getUserFriendlySingularName(eventTypeName);
- return tr.b.getOnlyElement(this.events_).userFriendlyName;
- }
-
- var numEventTypes = tr.b.dictionaryLength(eventsByBaseType);
- if (numEventTypes !== 1) {
- return this.length + ' events of various types';
- }
-
- var tmp = EventRegistry.getUserFriendlyPluralName(eventTypeName);
- return this.length + ' ' + tmp;
- },
-
- filter: function(fn, opt_this) {
- var res = new EventSet();
- for (var event of this)
- if (fn.call(opt_this, event))
- res.push(event);
-
- return res;
- },
-
- toArray: function() {
- var ary = [];
- for (var event of this)
- ary.push(event);
- return ary;
- },
-
- forEach: function(fn, opt_this) {
- for (var event of this)
- fn.call(opt_this, event);
- },
-
- map: function(fn, opt_this) {
- var res = [];
- for (var event of this)
- res.push(fn.call(opt_this, event));
- return res;
- },
-
- every: function(fn, opt_this) {
- for (var event of this)
- if (!fn.call(opt_this, event))
- return false;
- return true;
- },
-
- some: function(fn, opt_this) {
- for (var event of this)
- if (fn.call(opt_this, event))
- return true;
- return false;
- },
-
- asDict: function() {
- var stableIds = [];
- for (var event of this)
- stableIds.push(event.stableId);
- return {'events': stableIds};
- },
-
- asSet: function() {
- return this.events_;
- }
- };
-
- EventSet.IMMUTABLE_EMPTY_SET = (function() {
- var s = new EventSet();
- s.push = function() {
- throw new Error('Cannot push to an immutable event set');
- };
- s.addEventSet = function() {
- throw new Error('Cannot add to an immutable event set');
- };
- Object.freeze(s);
- return s;
- })();
-
- return {
- EventSet: EventSet,
- RequestSelectionChangeEvent: RequestSelectionChangeEvent
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event_set_test.html b/chromium/third_party/catapult/tracing/tracing/model/event_set_test.html
deleted file mode 100644
index b584c23cf33..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event_set_test.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newModel = tr.c.TestUtils.newModel;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('eventSetObject', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 5, {}, 1));
-
- var eventSet = new tr.model.EventSet();
- eventSet.push(t1.sliceGroup.slices[0]);
-
- assert.equal(eventSet.bounds.min, 1);
- assert.equal(eventSet.bounds.max, 4);
- assert.deepEqual(eventSet, new tr.model.EventSet(
- t1.sliceGroup.slices[0]));
-
- eventSet.push(t1.sliceGroup.slices[1]);
- assert.equal(eventSet.bounds.min, 1);
- assert.equal(eventSet.bounds.max, 6);
- assert.deepEqual(eventSet, new tr.model.EventSet(
- [t1.sliceGroup.slices[0], t1.sliceGroup.slices[1]]));
-
- eventSet.clear();
- assert.equal(eventSet.length, 0);
- });
-
- test('iteration', function() {
- var eventSet = new tr.model.EventSet([{guid: 1}, {guid: 2}, {guid: 3}]);
-
- var expectedId = 1;
- for (var event of eventSet)
- assert.equal(event.guid, expectedId++);
- });
-
- test('uniqueContents', function() {
- var sample1 = {guid: 1};
- var sample2 = {guid: 2};
-
- var eventSet = new tr.model.EventSet();
-
- eventSet.push(sample1);
- eventSet.push(sample2);
- assert.equal(eventSet.length, 2);
-
- eventSet.push(sample1);
- assert.equal(eventSet.length, 2);
- });
-
- test('userFriendlyNameSingular', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- var selection = new tr.model.EventSet(t1.sliceGroup.slices[0]);
- assert.isDefined(selection.userFriendlyName);
- });
-
- test('userFriendlyNamePlural', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 2, {}, 3));
- var eventSet = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[1]
- ]);
- assert.isDefined(eventSet.userFriendlyName);
- });
-
- test('userFriendlyNameMixedPlural', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 2, {}, 3));
-
- var i10 = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'name', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
-
- var eventSet = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- s10
- ]);
- assert.isDefined(eventSet.userFriendlyName);
- });
-
- test('groupEventsByTitle', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 2, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'b', 0, 3, {}, 3));
- var eventSet = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[2]
- ]);
-
- var eventsByTitle = eventSet.getEventsOrganizedByTitle();
- assert.equal(2, tr.b.dictionaryLength(eventsByTitle));
- assert.sameMembers(eventsByTitle['a'].toArray(),
- [t1.sliceGroup.slices[0], t1.sliceGroup.slices[1]]);
- assert.sameMembers(eventsByTitle['b'].toArray(),
- [t1.sliceGroup.slices[2]]);
- });
-
- test('groupEventsByCallback', function() {
- var a1 = new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3);
- var a2 = new tr.model.ThreadSlice('', 'a', 0, 2, {}, 3);
- var b1 = new tr.model.ThreadSlice('', 'b', 0, 1, {}, 3);
- var eventSet = new tr.model.EventSet([a1, a2, b1]);
- function getEventKey(event) {
- return 's' + event.start;
- }
- var eventsByCallback = eventSet.getEventsOrganizedByCallback(getEventKey);
- assert.equal(2, tr.b.dictionaryLength(eventsByCallback));
- assert.sameMembers(eventsByCallback.s1.toArray(), [a1, b1]);
- assert.sameMembers(eventsByCallback.s2.toArray(), [a2]);
- });
-
- test('groupEventsByBaseType', function() {
- var a = new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3);
- var b = new tr.model.ThreadSlice('', 'b', 0, 1, {}, 3);
- var c = new tr.model.AsyncSlice('', 'c', 0, 1, {}, 3);
- var eventSet = new tr.model.EventSet([a, b, c]);
- var eventsByBaseType = eventSet.getEventsOrganizedByBaseType(true);
- assert.equal(2, tr.b.dictionaryLength(eventsByBaseType));
- assert.sameMembers(eventsByBaseType.slice.toArray(), [a, b]);
- assert.sameMembers(eventsByBaseType.asyncSlice.toArray(), [c]);
-
- var eventsByBaseType = eventSet.getEventsOrganizedByBaseType(false);
- assert.isTrue(2 < tr.b.dictionaryLength(eventsByBaseType));
- assert.sameMembers(eventsByBaseType.slice.toArray(), [a, b]);
- assert.sameMembers(eventsByBaseType.asyncSlice.toArray(), [c]);
- for (var baseType in eventsByBaseType) {
- if (baseType !== 'slice' && baseType !== 'asyncSlice')
- assert.equal(0, eventsByBaseType[baseType].length);
- }
- });
-
- test('intersectionIsEmpty1', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 2, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'b', 0, 3, {}, 3));
-
- var set1 = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[2]
- ]);
- var set2 = new tr.model.EventSet([
- t1.sliceGroup.slices[2]
- ]);
- assert.isFalse(set1.intersectionIsEmpty(set2));
- });
-
- test('intersectionIsNonEmpty2', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 2, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'b', 0, 3, {}, 3));
-
- var set1 = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[1]
- ]);
- var set2 = new tr.model.EventSet([
- t1.sliceGroup.slices[2]
- ]);
- assert.isTrue(set1.intersectionIsEmpty(set2));
- });
-
- test('equals', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'b', 0, 2, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'c', 0, 3, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'd', 0, 4, {}, 5));
-
- var eventSet1 = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[2]
- ]);
- var eventSet2 = new tr.model.EventSet([
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[2]
- ]);
- var eventSet3 = new tr.model.EventSet([
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[3]
- ]);
- var eventSet4 = new tr.model.EventSet([
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[0]
- ]);
- assert.isTrue(eventSet1.equals(eventSet2));
- assert.isFalse(eventSet1.equals(eventSet3));
- assert.isFalse(eventSet1.equals(eventSet4));
- });
-
- test('filter', function() {
- var m = newModel(function(m) {
-
- var p = m.getOrCreateProcess(1);
- var t = p.getOrCreateThread(1);
-
- m.s0 = t.sliceGroup.pushSlice(newSliceEx(
- { title: 's0', start: 0.0, duration: 1.0 }));
- m.s1 = t.sliceGroup.pushSlice(newSliceEx(
- { title: 's1', start: 0.0, duration: 1.0 }));
- m.s2 = t.sliceGroup.pushSlice(newSliceEx(
- { title: 's2', start: 0.0, duration: 1.0 }));
-
- m.eventSet = new tr.model.EventSet([m.s0, m.s1, m.s2]);
- });
-
- var res = m.eventSet.filter(function(slice) {
- return slice.title === 's0';
- });
-
- assert.isTrue(res.equals(new tr.model.EventSet([m.s0])));
- });
-
- test('toArray', function() {
- var samples = [
- {guid: 1},
- {guid: 2}
- ];
- var eventSet = new tr.model.EventSet(samples);
-
- assert.deepEqual(eventSet.toArray(), samples);
- });
-
- test('asDict', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'b', 0, 2, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'c', 0, 3, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'd', 0, 4, {}, 5));
-
- var eventSet = new tr.model.EventSet([
- t1.sliceGroup.slices[0],
- t1.sliceGroup.slices[1],
- t1.sliceGroup.slices[2]
- ]);
-
- assert.deepEqual(
- {'events':
- ['1.1.SliceGroup.0', '1.1.SliceGroup.1', '1.1.SliceGroup.2']},
- eventSet.asDict());
- });
-
- test('immutableEmptySet', function() {
- var s = tr.model.EventSet.IMMUTABLE_EMPTY_SET;
- assert.lengthOf(s, 0);
- assert.isTrue(s.bounds.isEmpty);
-
- // Check that the iteration methods still work correctly.
- function throwOnCall() {
- throw new Error('This function should never be called!!!');
- }
- assert.deepEqual(s.map(throwOnCall), []);
- s.forEach(throwOnCall);
-
- // Check that the set is indeed immutable.
- assert.throws(function() { s[0] = b; });
- assert.throws(function() { s.push(b); });
- assert.throws(function() { s.addEventSet(new tr.model.EventSet()); });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/event_test.html b/chromium/third_party/catapult/tracing/tracing/model/event_test.html
deleted file mode 100644
index 0d0deca55af..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/event_test.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/alert.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_info.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Alert = tr.model.Alert;
- var Event = tr.model.Event;
- var EventInfo = tr.model.EventInfo;
- var EventSet = tr.model.EventSet;
- var ImmutableEventSet = tr.model.ImmutableEventSet;
-
- test('checkModelItem', function() {
- var event = new Event;
- assert.equal(event.modelItem, event);
- });
-
- test('checkAssociatedAlerts', function() {
- var event = new Event();
- assert.strictEqual(event.associatedAlerts, EventSet.IMMUTABLE_EMPTY_SET);
- assert.sameMembers(event.associatedAlerts.toArray(), []);
-
- var info1 = new EventInfo('Critical', 'Critical alert!!!', []);
- var alert1 = new Alert(info1, 7);
- event.addAssociatedAlert(alert1);
- assert.instanceOf(event.associatedAlerts, EventSet);
- assert.sameMembers(event.associatedAlerts.toArray(), [alert1]);
-
- var info2 = new EventInfo('Warning', 'Warning alert???', []);
- var alert2 = new Alert(info2, 42);
- event.addAssociatedAlert(alert2);
- assert.instanceOf(event.associatedAlerts, EventSet);
- assert.sameMembers(event.associatedAlerts.toArray(), [alert1, alert2]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/flow_event.html b/chromium/third_party/catapult/tracing/tracing/model/flow_event.html
deleted file mode 100644
index f54c94fdc61..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/flow_event.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Flow class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * A Flow represents an interval of time plus parameters associated
- * with that interval.
- *
- * @constructor
- */
- function FlowEvent(category, id, title, colorId, start, args, opt_duration) {
- tr.model.TimedEvent.call(this, start);
-
- this.category = category || '';
- this.title = title;
- this.colorId = colorId;
- this.start = start;
- this.args = args;
-
- this.id = id;
-
- this.startSlice = undefined;
- this.endSlice = undefined;
-
- this.startStackFrame = undefined;
- this.endStackFrame = undefined;
-
- if (opt_duration !== undefined)
- this.duration = opt_duration;
- }
-
- FlowEvent.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- get userFriendlyName() {
- return 'Flow event named ' + this.title + ' at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.timestamp);
- }
- };
-
- tr.model.EventRegistry.register(
- FlowEvent,
- {
- name: 'flowEvent',
- pluralName: 'flowEvents'
- });
-
- return {
- FlowEvent: FlowEvent
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/frame.html b/chromium/third_party/catapult/tracing/tracing/model/frame.html
deleted file mode 100644
index 99b3124727e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/frame.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Class describing rendered frames.
- *
- * Because a frame is produced by multiple threads, it does not inherit from
- * TimedEvent, and has no duration.
- */
-tr.exportTo('tr.model', function() {
- var ColorScheme = tr.b.ColorScheme;
- var Statistics = tr.b.Statistics;
-
- var FRAME_PERF_CLASS = {
- GOOD: 'good',
- BAD: 'bad',
- TERRIBLE: 'terrible',
- NEUTRAL: 'generic_work'
- };
-
- /**
- * @constructor
- * @param {Array} associatedEvents Selection of events composing the frame.
- * @param {Array} threadTimeRanges Array of {thread, start, end}
- * for each thread, describing the critical path of the frame.
- */
- function Frame(associatedEvents, threadTimeRanges, opt_args) {
- tr.model.Event.call(this);
-
- this.threadTimeRanges = threadTimeRanges;
- this.associatedEvents = new tr.model.EventSet(associatedEvents);
- this.args = opt_args || {};
-
- this.title = 'Frame';
- this.start = Statistics.min(
- threadTimeRanges, function(x) { return x.start; });
- this.end = Statistics.max(
- threadTimeRanges, function(x) { return x.end; });
- this.totalDuration = Statistics.sum(
- threadTimeRanges, function(x) { return x.end - x.start; });
-
- this.perfClass = FRAME_PERF_CLASS.NEUTRAL;
- };
-
- Frame.prototype = {
- __proto__: tr.model.Event.prototype,
-
- set perfClass(perfClass) {
- this.colorId = ColorScheme.getColorIdForReservedName(perfClass);
- this.perfClass_ = perfClass;
- },
-
- get perfClass() {
- return this.perfClass_;
- },
-
- shiftTimestampsForward: function(amount) {
- this.start += amount;
- this.end += amount;
-
- for (var i = 0; i < this.threadTimeRanges.length; i++) {
- this.threadTimeRanges[i].start += amount;
- this.threadTimeRanges[i].end += amount;
- }
- },
-
- addBoundsToRange: function(range) {
- range.addValue(this.start);
- range.addValue(this.end);
- }
- };
-
- tr.model.EventRegistry.register(
- Frame,
- {
- name: 'frame',
- pluralName: 'frames'
- });
-
- return {
- Frame: Frame,
- FRAME_PERF_CLASS: FRAME_PERF_CLASS
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/global_memory_dump.html b/chromium/third_party/catapult/tracing/tracing/model/global_memory_dump.html
deleted file mode 100644
index 6b8c618f0f8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/global_memory_dump.html
+++ /dev/null
@@ -1,868 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/event_registry.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the GlobalMemoryDump class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * The GlobalMemoryDump represents a simultaneous memory dump of all
- * processes.
- * @constructor
- */
- function GlobalMemoryDump(model, start) {
- tr.model.ContainerMemoryDump.call(this, start);
- this.model = model;
- this.processMemoryDumps = {};
- }
-
- // Size numeric names.
- var SIZE_NUMERIC_NAME = tr.model.MemoryAllocatorDump.SIZE_NUMERIC_NAME;
- var EFFECTIVE_SIZE_NUMERIC_NAME =
- tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME;
-
- // Size numeric info types.
- var MemoryAllocatorDumpInfoType = tr.model.MemoryAllocatorDumpInfoType;
- var PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN;
- var PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER;
-
- // TODO(petrcermak): Move this to tracing/base/iteration_helpers.html.
- function inPlaceFilter(array, predicate, opt_this) {
- opt_this = opt_this || this;
- var nextPosition = 0;
- for (var i = 0; i < array.length; i++) {
- if (!predicate.call(opt_this, array[i], i))
- continue;
- if (nextPosition < i)
- array[nextPosition] = array[i]; // Move elements only if necessary.
- nextPosition++;
- }
-
- if (nextPosition < array.length)
- array.length = nextPosition; // Truncate the array only if necessary.
- }
-
- function getSize(dump) {
- var numeric = dump.numerics[SIZE_NUMERIC_NAME];
- if (numeric === undefined)
- return 0;
- return numeric.value;
- }
-
- function hasSize(dump) {
- return dump.numerics[SIZE_NUMERIC_NAME] !== undefined;
- }
-
- function optional(value, defaultValue) {
- if (value === undefined)
- return defaultValue;
- return value;
- }
-
- GlobalMemoryDump.prototype = {
- __proto__: tr.model.ContainerMemoryDump.prototype,
-
- get userFriendlyName() {
- return 'Global memory dump at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.start);
- },
-
- get containerName() {
- return 'global space';
- },
-
- finalizeGraph: function() {
- // 1. Transitively remove weak memory allocator dumps and all their
- // owners and descendants from the model. This must be performed before
- // any other steps.
- this.removeWeakDumps();
-
- // 2. Add ownership links from tracing MADs to descendants of malloc or
- // winheap MADs so that tracing would be automatically discounted from
- // them later (step 3).
- this.setUpTracingOverheadOwnership();
-
- // 3. Aggregate all other numerics of all MADs (*excluding* sizes and
- // effective sizes) and propagate numerics from global MADs to their
- // owners (*including* sizes and effective sizes). This step must be
- // carried out before the sizes of all MADs are calculated (step 3).
- // Otherwise, the propagated sizes of all MADs would not be aggregated.
- this.aggregateNumerics();
-
- // 4. Calculate the sizes of all memory allocator dumps (MADs). This step
- // requires that the memory allocator dump graph has been finalized (step
- // 1) and numerics were propagated from global MADs (step 2). Subsequent
- // modifications of the graph will most likely break the calculation
- // invariants.
- this.calculateSizes();
-
- // 5. Calculate the effective sizes of all MADs. This step requires that
- // the sizes of all MADs have already been calculated (step 3).
- this.calculateEffectiveSizes();
-
- // 6. Discount tracing from VM regions stats. This steps requires that
- // resident sizes (step 2) and sizes (step 3) of the tracing MADs have
- // already been calculated.
- this.discountTracingOverheadFromVmRegions();
-
- // 7. The above steps (especially steps 1 and 3) can create new memory
- // allocator dumps, so we force rebuilding the memory allocator dump
- // indices of all container memory dumps.
- this.forceRebuildingMemoryAllocatorDumpByFullNameIndices();
- },
-
- removeWeakDumps: function() {
- // Mark all transitive owners and children of weak memory allocator dumps
- // as weak.
- this.traverseAllocatorDumpsInDepthFirstPreOrder(function(dump) {
- if (dump.weak)
- return;
- if ((dump.owns !== undefined && dump.owns.target.weak) ||
- (dump.parent !== undefined && dump.parent.weak)) {
- dump.weak = true;
- }
- });
-
- function removeWeakDumpsFromListRecursively(dumps) {
- inPlaceFilter(dumps, function(dump) {
- if (dump.weak) {
- // The dump is weak, so remove it. This will implicitly remove all
- // its descendants, which are also weak due to the initial marking
- // step.
- return false;
- }
-
- // This dump is non-weak, so keep it. Recursively remove its weak
- // descendants and ownership links from weak dumps instead.
- removeWeakDumpsFromListRecursively(dump.children);
- inPlaceFilter(dump.ownedBy, function(ownershipLink) {
- return !ownershipLink.source.weak;
- });
-
- return true;
- });
- }
-
- this.iterateContainerDumps(function(containerDump) {
- var memoryAllocatorDumps = containerDump.memoryAllocatorDumps;
- if (memoryAllocatorDumps !== undefined)
- removeWeakDumpsFromListRecursively(memoryAllocatorDumps);
- });
- },
-
- /**
- * Calculate the size of all memory allocator dumps in the dump graph.
- *
- * The size refers to the allocated size of a (sub)component. It is a
- * natural extension of the optional size numeric provided by
- * MemoryAllocatorDump(s):
- *
- * - If a MAD provides a size numeric, then its size is assumed to be
- * equal to it.
- * - If a MAD does not provide a size numeric, then its size is assumed
- * to be the maximum of (1) the size of the largest owner of the MAD
- * and (2) the aggregated size of the MAD's children.
- *
- * Metric motivation: "How big is a (sub)system?"
- *
- * Please refer to the Memory Dump Graph Metric Calculation design document
- * for more details (https://goo.gl/fKg0dt).
- */
- calculateSizes: function() {
- this.traverseAllocatorDumpsInDepthFirstPostOrder(
- this.calculateMemoryAllocatorDumpSize_.bind(this));
- },
-
- /**
- * Calculate the size of the given MemoryAllocatorDump. This method assumes
- * that the size of both the children and owners of the dump has already
- * been calculated.
- */
- calculateMemoryAllocatorDumpSize_: function(dump) {
- // This flag becomes true if the size numeric of the current dump should
- // be defined, i.e. if (1) the current dump's size numeric is defined,
- // (2) the size of at least one of its children is defined or (3) the
- // size of at least one of its owners is defined.
- var shouldDefineSize = false;
-
- // This helper function returns the value of the size numeric of the
- // given dependent memory allocator dump. If the numeric is defined, the
- // shouldDefineSize flag above is also set to true (because condition
- // (2) or (3) is satisfied). Otherwise, zero is returned (and the flag is
- // left unchanged).
- function getDependencySize(dependencyDump) {
- var numeric = dependencyDump.numerics[SIZE_NUMERIC_NAME];
- if (numeric === undefined)
- return 0;
- shouldDefineSize = true;
- return numeric.value;
- }
-
- // 1. Get the size provided by the dump. If present, define a function
- // for checking dependent size consistency (a dump must always be bigger
- // than all its children aggregated together and/or its largest owner).
- var sizeNumeric = dump.numerics[SIZE_NUMERIC_NAME];
- var size = 0;
- var checkDependencySizeIsConsistent = function() { /* no-op */ };
- if (sizeNumeric !== undefined) {
- size = sizeNumeric.value;
- shouldDefineSize = true;
- if (sizeNumeric.unit !== tr.b.Unit.byName.sizeInBytes_smallerIsBetter) {
- this.model.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Invalid unit of \'size\' numeric of memory allocator ' +
- 'dump ' + dump.quantifiedName + ': ' +
- sizeNumeric.unit.unitName + '.'
- });
- }
- checkDependencySizeIsConsistent = function(
- dependencySize, dependencyInfoType, dependencyName) {
- if (size >= dependencySize)
- return;
- this.model.importWarning({
- type: 'memory_dump_parse_error',
- message: 'Size provided by memory allocator dump \'' +
- dump.fullName + '\'' +
- tr.b.Unit.byName.sizeInBytes.format(size) +
- ') is less than ' + dependencyName + ' (' +
- tr.b.Unit.byName.sizeInBytes.format(dependencySize) + ').'
- });
- dump.infos.push({
- type: dependencyInfoType,
- providedSize: size,
- dependencySize: dependencySize
- });
- }.bind(this);
- }
-
- // 2. Aggregate size of children. The recursive function traverses all
- // descendants and ensures that double-counting due to ownership within a
- // subsystem is avoided.
- var aggregatedChildrenSize = 0;
- // Owned child dump name -> (Owner child dump name -> overlapping size).
- var allOverlaps = {};
- dump.children.forEach(function(childDump) {
- function aggregateDescendantDump(descendantDump) {
- // Don't count this descendant dump if it owns another descendant of
- // the current dump (would cause double-counting).
- var ownedDumpLink = descendantDump.owns;
- if (ownedDumpLink !== undefined &&
- ownedDumpLink.target.isDescendantOf(dump)) {
- // If the target owned dump is a descendant of a *different* child
- // of the the current dump (i.e. not childDump), then we remember
- // the ownership so that we could explain why the size of the
- // current dump is not equal to the sum of its children.
- var ownedChildDump = ownedDumpLink.target;
- while (ownedChildDump.parent !== dump)
- ownedChildDump = ownedChildDump.parent;
- if (childDump !== ownedChildDump) {
- var ownedBySiblingSize = getDependencySize(descendantDump);
- if (ownedBySiblingSize > 0) {
- var previousTotalOwnedBySiblingSize =
- ownedChildDump.ownedBySiblingSizes.get(childDump) || 0;
- var updatedTotalOwnedBySiblingSize =
- previousTotalOwnedBySiblingSize + ownedBySiblingSize;
- ownedChildDump.ownedBySiblingSizes.set(
- childDump, updatedTotalOwnedBySiblingSize);
- }
- }
- return;
- }
-
- // If this descendant dump is a leaf node, add its size to the
- // aggregated size.
- if (descendantDump.children.length === 0) {
- aggregatedChildrenSize += getDependencySize(descendantDump);
- return;
- }
-
- // If this descendant dump is an intermediate node, recurse down into
- // its children. Note that the dump's size is NOT added because it is
- // an aggregate of its children (would cause double-counting).
- descendantDump.children.forEach(aggregateDescendantDump);
- }
- aggregateDescendantDump(childDump);
- });
- checkDependencySizeIsConsistent(
- aggregatedChildrenSize,
- PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN,
- 'the aggregated size of its children');
-
- // 3. Calculate the largest owner size.
- var largestOwnerSize = 0;
- dump.ownedBy.forEach(function(ownershipLink) {
- var owner = ownershipLink.source;
- var ownerSize = getDependencySize(owner);
- largestOwnerSize = Math.max(largestOwnerSize, ownerSize);
- });
- checkDependencySizeIsConsistent(
- largestOwnerSize,
- PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER,
- 'the size of its largest owner');
-
- // If neither the dump nor any of its dependencies (children and owners)
- // provide a size, do NOT add a zero size numeric.
- if (!shouldDefineSize) {
- // The rest of the pipeline relies on size being either a valid
- // ScalarNumeric, or undefined.
- delete dump.numerics[SIZE_NUMERIC_NAME];
- return;
- }
-
- // A dump must always be bigger than all its children aggregated
- // together and/or its largest owner.
- size = Math.max(size, aggregatedChildrenSize, largestOwnerSize);
-
- dump.numerics[SIZE_NUMERIC_NAME] = new tr.v.ScalarNumeric(
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, size);
-
- // Add a virtual child to make up for extra size of the dump with
- // respect to its children (if applicable).
- if (aggregatedChildrenSize < size &&
- dump.children !== undefined && dump.children.length > 0) {
- var virtualChild = new tr.model.MemoryAllocatorDump(
- dump.containerMemoryDump, dump.fullName + '/<unspecified>');
- virtualChild.parent = dump;
- dump.children.unshift(virtualChild);
- virtualChild.numerics[SIZE_NUMERIC_NAME] = new tr.v.ScalarNumeric(
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter,
- size - aggregatedChildrenSize);
- }
- },
-
- /**
- * Calculate the effective size of all memory allocator dumps in the dump
- * graph.
- *
- * The effective size refers to the amount of memory a particular component
- * is using/consuming. In other words, every (reported) byte of used memory
- * is uniquely attributed to exactly one component. Consequently, unlike
- * size, effective size is cumulative, i.e. the sum of the effective sizes
- * of (top-level) components is equal to the total amount of (reported)
- * used memory.
- *
- * Metric motivation: "How much memory does a (sub)system use?" or "For how
- * much memory should a (sub)system be 'charged'?"
- *
- * Please refer to the Memory Dump Graph Metric Calculation design document
- * for more details (https://goo.gl/fKg0dt).
- *
- * This method assumes that the size of all contained memory allocator
- * dumps has already been calculated [see calculateSizes()].
- */
- calculateEffectiveSizes: function() {
- // 1. Calculate not-owned and not-owning sub-sizes of all MADs
- // (depth-first post-order traversal).
- this.traverseAllocatorDumpsInDepthFirstPostOrder(
- this.calculateDumpSubSizes_.bind(this));
-
- // 2. Calculate owned and owning coefficients of owned and owner MADs
- // respectively (arbitrary traversal).
- this.traverseAllocatorDumpsInDepthFirstPostOrder(
- this.calculateDumpOwnershipCoefficient_.bind(this));
-
- // 3. Calculate cumulative owned and owning coefficients of all MADs
- // (depth-first pre-order traversal).
- this.traverseAllocatorDumpsInDepthFirstPreOrder(
- this.calculateDumpCumulativeOwnershipCoefficient_.bind(this));
-
- // 4. Calculate the effective sizes of all MADs (depth-first post-order
- // traversal).
- this.traverseAllocatorDumpsInDepthFirstPostOrder(
- this.calculateDumpEffectiveSize_.bind(this));
- },
-
- /**
- * Calculate not-owned and not-owning sub-sizes of a memory allocator dump
- * from its children's (sub-)sizes.
- *
- * Not-owned sub-size refers to the aggregated memory of all children which
- * is not owned by other MADs. Conversely, not-owning sub-size is the
- * aggregated memory of all children which do not own another MAD. The
- * diagram below illustrates these two concepts:
- *
- * ROOT 1 ROOT 2
- * size: 4 size: 5
- * not-owned sub-size: 4 not-owned sub-size: 1 (!)
- * not-owning sub-size: 0 (!) not-owning sub-size: 5
- *
- * ^ ^
- * | |
- *
- * PARENT 1 ===== owns =====> PARENT 2
- * size: 4 size: 5
- * not-owned sub-size: 4 not-owned sub-size: 5
- * not-owning sub-size: 4 not-owning sub-size: 5
- *
- * ^ ^
- * | |
- *
- * CHILD 1 CHILD 2
- * size [given]: 4 size [given]: 5
- * not-owned sub-size: 4 not-owned sub-size: 5
- * not-owning sub-size: 4 not-owning sub-size: 5
- *
- * This method assumes that (1) the size of the dump, its children, and its
- * owners [see calculateSizes()] and (2) the not-owned and not-owning
- * sub-sizes of both the children and owners of the dump have already been
- * calculated [depth-first post-order traversal].
- */
- calculateDumpSubSizes_: function(dump) {
- // Completely skip dumps with undefined size.
- if (!hasSize(dump))
- return;
-
- // If the dump is a leaf node, then both sub-sizes are equal to the size.
- if (dump.children === undefined || dump.children.length === 0) {
- var size = getSize(dump);
- dump.notOwningSubSize_ = size;
- dump.notOwnedSubSize_ = size;
- return;
- }
-
- // Calculate this dump's not-owning sub-size by summing up the not-owning
- // sub-sizes of children MADs which do not own another MAD.
- var notOwningSubSize = 0;
- dump.children.forEach(function(childDump) {
- if (childDump.owns !== undefined)
- return;
- notOwningSubSize += optional(childDump.notOwningSubSize_, 0);
- });
- dump.notOwningSubSize_ = notOwningSubSize;
-
- // Calculate this dump's not-owned sub-size.
- var notOwnedSubSize = 0;
- dump.children.forEach(function(childDump) {
- // If the child dump is not owned, then add its not-owned sub-size.
- if (childDump.ownedBy.length === 0) {
- notOwnedSubSize += optional(childDump.notOwnedSubSize_, 0);
- return;
- }
- // If the child dump is owned, then add the difference between its size
- // and the largest owner.
- var largestChildOwnerSize = 0;
- childDump.ownedBy.forEach(function(ownershipLink) {
- largestChildOwnerSize = Math.max(
- largestChildOwnerSize, getSize(ownershipLink.source));
- });
- notOwnedSubSize += getSize(childDump) - largestChildOwnerSize;
- });
- dump.notOwnedSubSize_ = notOwnedSubSize;
- },
-
- /**
- * Calculate owned and owning coefficients of a memory allocator dump and
- * its owners.
- *
- * The owning coefficient refers to the proportion of a dump's not-owning
- * sub-size which is attributed to the dump (only relevant to owning MADs).
- * Conversely, the owned coefficient is the proportion of a dump's
- * not-owned sub-size, which is attributed to it (only relevant to owned
- * MADs).
- *
- * The not-owned size of the owned dump is split among its owners in the
- * order of the ownership importance as demonstrated by the following
- * example:
- *
- * memory allocator dumps
- * OWNED OWNER1 OWNER2 OWNER3 OWNER4
- * not-owned sub-size [given] 10 - - - -
- * not-owning sub-size [given] - 6 7 5 8
- * importance [given] - 2 2 1 0
- * attributed not-owned sub-size 2 - - - -
- * attributed not-owning sub-size - 3 4 0 1
- * owned coefficient 2/10 - - - -
- * owning coefficient - 3/6 4/7 0/5 1/8
- *
- * Explanation: Firstly, 6 bytes are split equally among OWNER1 and OWNER2
- * (highest importance). OWNER2 owns one more byte, so its attributed
- * not-owning sub-size is 6/2 + 1 = 4 bytes. OWNER3 is attributed no size
- * because it is smaller than the owners with higher priority. However,
- * OWNER4 is larger, so it's attributed the difference 8 - 7 = 1 byte.
- * Finally, 2 bytes remain unattributed and are hence kept in the OWNED
- * dump as attributed not-owned sub-size. The coefficients are then
- * directly calculated as fractions of the sub-sizes and corresponding
- * attributed sub-sizes.
- *
- * Note that we always assume that all ownerships of a dump overlap (e.g.
- * OWNER3 is subsumed by both OWNER1 and OWNER2). Hence, the table could
- * be alternatively represented as follows:
- *
- * owned memory range
- * 0 1 2 3 4 5 6 7 8 9 10
- * Priority 2 | OWNER1 + OWNER2 (split) | OWNER2 |
- * Priority 1 | (already attributed) |
- * Priority 0 | - - - (already attributed) - - - | OWNER4 |
- * Remainder | - - - - - (already attributed) - - - - - - | OWNED |
- *
- * This method assumes that (1) the size of the dump [see calculateSizes()]
- * and (2) the not-owned size of the dump and not-owning sub-sizes of its
- * owners [see the first step of calculateEffectiveSizes()] have already
- * been calculated. Note that the method doesn't make any assumptions about
- * the order in which dumps are visited.
- */
- calculateDumpOwnershipCoefficient_: function(dump) {
- // Completely skip dumps with undefined size.
- if (!hasSize(dump))
- return;
-
- // We only need to consider owned dumps.
- if (dump.ownedBy.length === 0)
- return;
-
- // Sort the owners in decreasing order of ownership importance and
- // increasing order of not-owning sub-size (in case of equal importance).
- var owners = dump.ownedBy.map(function(ownershipLink) {
- return {
- dump: ownershipLink.source,
- importance: optional(ownershipLink.importance, 0),
- notOwningSubSize: optional(ownershipLink.source.notOwningSubSize_, 0)
- };
- });
- owners.sort(function(a, b) {
- if (a.importance === b.importance)
- return a.notOwningSubSize - b.notOwningSubSize;
- return b.importance - a.importance;
- });
-
- // Loop over the list of owners and distribute the owned dump's not-owned
- // sub-size among them according to their ownership importance and
- // not-owning sub-size.
- var currentImportanceStartPos = 0;
- var alreadyAttributedSubSize = 0;
- while (currentImportanceStartPos < owners.length) {
- var currentImportance = owners[currentImportanceStartPos].importance;
-
- // Find the position of the first owner with lower priority.
- var nextImportanceStartPos = currentImportanceStartPos + 1;
- while (nextImportanceStartPos < owners.length &&
- owners[nextImportanceStartPos].importance ===
- currentImportance) {
- nextImportanceStartPos++;
- }
-
- // Visit the owners with the same importance in increasing order of
- // not-owned sub-size, split the owned memory among them appropriately,
- // and calculate their owning coefficients.
- var attributedNotOwningSubSize = 0;
- for (var pos = currentImportanceStartPos; pos < nextImportanceStartPos;
- pos++) {
- var owner = owners[pos];
- var notOwningSubSize = owner.notOwningSubSize;
- if (notOwningSubSize > alreadyAttributedSubSize) {
- attributedNotOwningSubSize +=
- (notOwningSubSize - alreadyAttributedSubSize) /
- (nextImportanceStartPos - pos);
- alreadyAttributedSubSize = notOwningSubSize;
- }
-
- var owningCoefficient = 0;
- if (notOwningSubSize !== 0)
- owningCoefficient = attributedNotOwningSubSize / notOwningSubSize;
- owner.dump.owningCoefficient_ = owningCoefficient;
- }
-
- currentImportanceStartPos = nextImportanceStartPos;
- }
-
- // Attribute the remainder of the owned dump's not-owned sub-size to
- // the dump itself and calculate its owned coefficient.
- var notOwnedSubSize = optional(dump.notOwnedSubSize_, 0);
- var remainderSubSize = notOwnedSubSize - alreadyAttributedSubSize;
- var ownedCoefficient = 0;
- if (notOwnedSubSize !== 0)
- ownedCoefficient = remainderSubSize / notOwnedSubSize;
- dump.ownedCoefficient_ = ownedCoefficient;
- },
-
- /**
- * Calculate cumulative owned and owning coefficients of a memory allocator
- * dump from its (non-cumulative) owned and owning coefficients and the
- * cumulative coefficients of its parent and/or owned dump.
- *
- * The cumulative coefficients represent the total effect of all
- * (non-strict) ancestor ownerships on a memory allocator dump. The
- * cumulative owned coefficient of a MAD can be calculated simply as:
- *
- * cumulativeOwnedC(M) = ownedC(M) * cumulativeOwnedC(parent(M))
- *
- * This reflects the assumption that if a parent of a child MAD is
- * (partially) owned, then the parent's owner also indirectly owns (a part
- * of) the child MAD.
- *
- * The cumulative owning coefficient of a MAD depends on whether the MAD
- * owns another dump:
- *
- * [if M doesn't own another MAD]
- * / cumulativeOwningC(parent(M))
- * cumulativeOwningC(M) =
- * \ [if M owns another MAD]
- * owningC(M) * cumulativeOwningC(owned(M))
- *
- * The reasoning behind the first case is similar to the one for cumulative
- * owned coefficient above. The only difference is that we don't need to
- * include the dump's (non-cumulative) owning coefficient because it is
- * implicitly 1.
- *
- * The formula for the second case is derived as follows: Since the MAD
- * owns another dump, its memory is not included in its parent's not-owning
- * sub-size and hence shouldn't be affected by the parent's corresponding
- * cumulative coefficient. Instead, the MAD indirectly owns everything
- * owned by its owned dump (and so it should be affected by the
- * corresponding coefficient).
- *
- * Note that undefined coefficients (and coefficients of non-existent
- * dumps) are implicitly assumed to be 1.
- *
- * This method assumes that (1) the size of the dump [see calculateSizes()],
- * (2) the (non-cumulative) owned and owning coefficients of the dump [see
- * the second step of calculateEffectiveSizes()], and (3) the cumulative
- * coefficients of the dump's parent and owned MADs (if present)
- * [depth-first pre-order traversal] have already been calculated.
- */
- calculateDumpCumulativeOwnershipCoefficient_: function(dump) {
- // Completely skip dumps with undefined size.
- if (!hasSize(dump))
- return;
-
- var cumulativeOwnedCoefficient = optional(dump.ownedCoefficient_, 1);
- var parent = dump.parent;
- if (dump.parent !== undefined)
- cumulativeOwnedCoefficient *= dump.parent.cumulativeOwnedCoefficient_;
- dump.cumulativeOwnedCoefficient_ = cumulativeOwnedCoefficient;
-
- var cumulativeOwningCoefficient;
- if (dump.owns !== undefined) {
- cumulativeOwningCoefficient = dump.owningCoefficient_ *
- dump.owns.target.cumulativeOwningCoefficient_;
- } else if (dump.parent !== undefined) {
- cumulativeOwningCoefficient = dump.parent.cumulativeOwningCoefficient_;
- } else {
- cumulativeOwningCoefficient = 1;
- }
- dump.cumulativeOwningCoefficient_ = cumulativeOwningCoefficient;
- },
-
- /**
- * Calculate the effective size of a memory allocator dump.
- *
- * In order to simplify the (already complex) calculation, we use the fact
- * that effective size is cumulative (unlike regular size), i.e. the
- * effective size of a non-leaf node is equal to the sum of effective sizes
- * of its children. The effective size of a leaf MAD is calculated as:
- *
- * effectiveSize(M) = size(M) * cumulativeOwningC(M) * cumulativeOwnedC(M)
- *
- * This method assumes that (1) the size of the dump and its children [see
- * calculateSizes()] and (2) the cumulative owning and owned coefficients
- * of the dump (if it's a leaf node) [see the third step of
- * calculateEffectiveSizes()] or the effective sizes of its children (if
- * it's a non-leaf node) [depth-first post-order traversal] have already
- * been calculated.
- */
- calculateDumpEffectiveSize_: function(dump) {
- // Completely skip dumps with undefined size. As a result, each dump will
- // have defined effective size if and only if it has defined size.
- if (!hasSize(dump)) {
- // The rest of the pipeline relies on effective size being either a
- // valid ScalarNumeric, or undefined.
- delete dump.numerics[EFFECTIVE_SIZE_NUMERIC_NAME];
- return;
- }
-
- var effectiveSize;
- if (dump.children === undefined || dump.children.length === 0) {
- // Leaf dump.
- effectiveSize = getSize(dump) * dump.cumulativeOwningCoefficient_ *
- dump.cumulativeOwnedCoefficient_;
- } else {
- // Non-leaf dump.
- effectiveSize = 0;
- dump.children.forEach(function(childDump) {
- if (!hasSize(childDump))
- return;
- effectiveSize +=
- childDump.numerics[EFFECTIVE_SIZE_NUMERIC_NAME].value;
- });
- }
- dump.numerics[EFFECTIVE_SIZE_NUMERIC_NAME] = new tr.v.ScalarNumeric(
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, effectiveSize);
- },
-
- aggregateNumerics: function() {
- // 1. Aggregate numerics in this global memory dump.
- this.iterateRootAllocatorDumps(function(dump) {
- dump.aggregateNumericsRecursively(this.model);
- });
-
- // 2. Propagate numerics and diagnostics from global memory allocator
- // dumps to their owners.
- this.iterateRootAllocatorDumps(
- this.propagateNumericsAndDiagnosticsRecursively);
-
- // 3. Aggregate numerics in the associated process memory dumps.
- tr.b.iterItems(this.processMemoryDumps, function(pid, processMemoryDump) {
- processMemoryDump.iterateRootAllocatorDumps(function(dump) {
- dump.aggregateNumericsRecursively(this.model);
- }, this);
- }, this);
- },
-
- propagateNumericsAndDiagnosticsRecursively: function(globalAllocatorDump) {
- ['numerics', 'diagnostics'].forEach(function(field) {
- tr.b.iterItems(globalAllocatorDump[field], function(name, value) {
- globalAllocatorDump.ownedBy.forEach(function(ownershipLink) {
- var processAllocatorDump = ownershipLink.source;
- if (processAllocatorDump[field][name] !== undefined) {
- // Numerics and diagnostics provided by process memory allocator
- // dumps themselves have precedence over numerics and diagnostics
- // propagated from global memory allocator dumps.
- return;
- }
- processAllocatorDump[field][name] = value;
- });
- });
- });
-
- // Recursively propagate numerics from all child memory allocator dumps.
- globalAllocatorDump.children.forEach(
- this.propagateNumericsAndDiagnosticsRecursively, this);
- },
-
- setUpTracingOverheadOwnership: function() {
- tr.b.iterItems(this.processMemoryDumps, function(pid, dump) {
- dump.setUpTracingOverheadOwnership(this.model);
- }, this);
- },
-
- discountTracingOverheadFromVmRegions: function() {
- // TODO(petrcermak): Consider factoring out all the finalization code and
- // constants to a single file.
- tr.b.iterItems(this.processMemoryDumps, function(pid, dump) {
- dump.discountTracingOverheadFromVmRegions(this.model);
- }, this);
- },
-
- forceRebuildingMemoryAllocatorDumpByFullNameIndices: function() {
- this.iterateContainerDumps(function(containerDump) {
- containerDump.forceRebuildingMemoryAllocatorDumpByFullNameIndex();
- });
- },
-
- iterateContainerDumps: function(fn) {
- fn.call(this, this);
- tr.b.iterItems(this.processMemoryDumps, function(pid, processDump) {
- fn.call(this, processDump);
- }, this);
- },
-
- iterateAllRootAllocatorDumps: function(fn) {
- this.iterateContainerDumps(function(containerDump) {
- containerDump.iterateRootAllocatorDumps(fn, this);
- });
- },
-
- /**
- * Traverse the memory dump graph in a depth first post-order, i.e.
- * children and owners of a memory allocator dump are visited before the
- * dump itself. This method will throw an exception if the graph contains
- * a cycle.
- */
- traverseAllocatorDumpsInDepthFirstPostOrder: function(fn) {
- var visitedDumps = new WeakSet();
- var openDumps = new WeakSet();
-
- function visit(dump) {
- if (visitedDumps.has(dump))
- return;
-
- if (openDumps.has(dump))
- throw new Error(dump.userFriendlyName + ' contains a cycle');
- openDumps.add(dump);
-
- // Visit owners before the dumps they own.
- dump.ownedBy.forEach(function(ownershipLink) {
- visit.call(this, ownershipLink.source);
- }, this);
-
- // Visit children before parents.
- dump.children.forEach(visit, this);
-
- // Actually visit the current memory allocator dump.
- fn.call(this, dump);
- visitedDumps.add(dump);
-
- openDumps.delete(dump);
- }
-
- this.iterateAllRootAllocatorDumps(visit);
- },
-
- /**
- * Traverse the memory dump graph in a depth first pre-order, i.e.
- * children and owners of a memory allocator dump are visited after the
- * dump itself. This method will not visit some dumps if the graph contains
- * a cycle.
- */
- traverseAllocatorDumpsInDepthFirstPreOrder: function(fn) {
- var visitedDumps = new WeakSet();
-
- function visit(dump) {
- if (visitedDumps.has(dump))
- return;
-
- // If this dumps owns another dump which hasn't been visited yet, then
- // wait for this dump to be visited later.
- if (dump.owns !== undefined && !visitedDumps.has(dump.owns.target))
- return;
-
- // If this dump's parent hasn't been visited yet, then wait for this
- // dump to be visited later.
- if (dump.parent !== undefined && !visitedDumps.has(dump.parent))
- return;
-
- // Actually visit the current memory allocator dump.
- fn.call(this, dump);
- visitedDumps.add(dump);
-
- // Visit owners after the dumps they own.
- dump.ownedBy.forEach(function(ownershipLink) {
- visit.call(this, ownershipLink.source);
- }, this);
-
- // Visit children after parents.
- dump.children.forEach(visit, this);
- }
-
- this.iterateAllRootAllocatorDumps(visit);
- }
- };
-
- tr.model.EventRegistry.register(
- GlobalMemoryDump,
- {
- name: 'globalMemoryDump',
- pluralName: 'globalMemoryDumps'
- });
-
- return {
- GlobalMemoryDump: GlobalMemoryDump
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/global_memory_dump_test.html b/chromium/third_party/catapult/tracing/tracing/model/global_memory_dump_test.html
deleted file mode 100644
index edab7779513..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/global_memory_dump_test.html
+++ /dev/null
@@ -1,3943 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
- var MemoryAllocatorDump = tr.model.MemoryAllocatorDump;
- var MemoryAllocatorDumpLink = tr.model.MemoryAllocatorDumpLink;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addChildDump = tr.model.MemoryDumpTestUtils.addChildDump;
- var addOwnershipLink = tr.model.MemoryDumpTestUtils.addOwnershipLink;
- var checkDumpNumericsAndDiagnostics =
- tr.model.MemoryDumpTestUtils.checkDumpNumericsAndDiagnostics;
- var SIZE_DELTA = tr.model.MemoryDumpTestUtils.SIZE_DELTA;
- var MemoryAllocatorDumpInfoType = tr.model.MemoryAllocatorDumpInfoType;
- var PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN;
- var PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER;
-
- function buildArgPusher(array) {
- return function(arg) { array.push(arg); };
- }
-
- function assertEqualUniqueMembers(actualArray, expectedArray) {
- assert.lengthOf(actualArray, expectedArray.length);
- assert.sameMembers(actualArray, expectedArray);
- }
-
- function assertUndefinedNumeric(dump, numericName) {
- var numeric = dump.numerics[numericName];
- assert.isUndefined(numeric, 'expected numeric \'' + numericName +
- '\' of memory allocator dump \'' + dump.fullName + '\' in ' +
- dump.containerMemoryDump.userFriendlyName + ' to be undefined');
- }
-
- function assertDefinedNumeric(dump, numericName, expectedUnit, expectedValue,
- opt_delta) {
- var numeric = dump.numerics[numericName];
- var errorMessagePrefix = 'expected numeric \'' + numericName +
- '\' of memory allocator dump \'' + dump.fullName + '\' in ' +
- dump.containerMemoryDump.userFriendlyName + ' to ';
-
- assert.instanceOf(numeric, ScalarNumeric,
- errorMessagePrefix + 'be an instance of ScalarNumeric');
- assert.equal(numeric.unit, expectedUnit,
- errorMessagePrefix + 'have unit \'' + expectedUnit.unitName +
- '\' but got \'' + numeric.unit.unitName + '\' instead');
-
- var valueErrorMessage = errorMessagePrefix + 'have value \'' +
- expectedValue + '\' but got \'' + numeric.value + '\'';
- if (opt_delta !== undefined) {
- assert.closeTo(
- numeric.value, expectedValue, opt_delta, valueErrorMessage);
- } else {
- assert.equal(numeric.value, expectedValue, valueErrorMessage);
- }
- }
-
- function assertSizeNumeric(dump, sizeName, expectedValue) {
- if (expectedValue === undefined) {
- assertUndefinedNumeric(dump, sizeName);
- } else {
- assertDefinedNumeric(dump, sizeName, sizeInBytes_smallerIsBetter,
- expectedValue, SIZE_DELTA);
- }
- }
-
- function assertDumpSizes(dump, expectedSize, expectedEffectiveSize,
- opt_expectedInfos, opt_expectedOwnedBySiblingSizes) {
- // Check the 'size' numeric.
- assertSizeNumeric(dump, 'size', expectedSize);
-
- // Check the 'effective_size' numeric.
- assertSizeNumeric(dump, 'effective_size', expectedEffectiveSize);
-
- // Check the 'infos' list.
- var expectedInfos = opt_expectedInfos || [];
- var actualInfos = dump.infos;
- assert.lengthOf(actualInfos, expectedInfos.length,
- 'expected memory allocator dump \'' + dump.fullName + '\' in ' +
- dump.containerMemoryDump.userFriendlyName + ' to have ' +
- expectedInfos.length + ' infos but got ' + actualInfos.length);
- for (var k = 0; k < actualInfos.length; k++) {
- assert.deepEqual(actualInfos[k], expectedInfos[k],
- 'info ' + k + ' of memory allocator dump \'' + dump.fullName +
- '\' in ' + dump.containerMemoryDump.userFriendlyName +
- ' doesn\'t match the expected info');
- }
-
- // Checked the 'ownedBySiblingSizes' map.
- var expectedOwnedBySiblingSizes = opt_expectedOwnedBySiblingSizes || {};
- var actualOwnedBySiblingSizes = {};
- for (var siblingDump of dump.ownedBySiblingSizes.keys()) {
- assert.strictEqual(siblingDump.parent, dump.parent);
- actualOwnedBySiblingSizes[siblingDump.name] =
- dump.ownedBySiblingSizes.get(siblingDump);
- }
- assert.deepEqual(actualOwnedBySiblingSizes, expectedOwnedBySiblingSizes,
- 'ownedBySiblingSizes of memory allocator dump \'' + dump.fullName +
- '\' in ' + dump.containerMemoryDump.userFriendlyName +
- ' doesn\'t contain the expected values');
- }
-
- function createContainerDumps(processMemoryDumpCount, opt_model) {
- var model = opt_model;
- if (model === undefined)
- model = new Model();
-
- var gmd = new GlobalMemoryDump(model, 0);
- model.globalMemoryDumps.push(gmd);
-
- var pmds = [];
- for (var i = 0; i < processMemoryDumpCount; i++) {
- var process = model.getOrCreateProcess(i);
- var pmd = new ProcessMemoryDump(gmd, process, 0);
- gmd.processMemoryDumps[i] = pmd;
- process.memoryDumps.push(pmd);
- pmds.push(pmd);
- }
-
- return [gmd].concat(pmds);
- }
-
- /**
- * Build container memory dumps from tree recipes. This function returns
- * a list containing a global memory dump and zero or more process memory
- * dumps constructed from the provided function argument as follows:
- *
- * allTreeRecipes (argument):
- *
- * [
- * [tree recipe GA, tree recipe GB, ...],
- * [tree recipe P1A, tree recipe P1B, ...],
- * [tree recipe P2A, tree recipe P2B ...],
- * ...
- * ]
- *
- * return value:
- *
- * [
- * GlobalMemoryDump with root MemoryAllocatorDump(s) [GA, GB, ...],
- * ProcessMemoryDump with root MemoryAllocatorDump(s) [P1A, P1B, ...],
- * ProcessMemoryDump with root MemoryAllocatorDump(s) [P2A, P2B, ...],
- * ...
- * ]
- *
- * where a tree recipe is an object (a recursive data structure) with the
- * following fields:
- *
- * name: Name of the resulting MAD.
- * guid: GUID of the resulting MAD (can be undefined).
- * owns: GUID of another MAD owned by the resulting MAD (no owned MAD if
- * undefined).
- * importance: Importance of the above ownership (can be undefined).
- * size: Value of the 'size' numeric of the resulting MAD (no 'size'
- * numeric if undefined).
- * numerics: Extra numerics of the resulting MAD (dictionary).
- * diagnostics: Extra diagnostics of the resulting MAD (dictionary).
- * weak: Whether the resulting MAD should be weak (undefined implies
- * non-weak).
- * children: List of tree recipes for child MADs (no children if undefined).
- * skip_build: If this optional property is set to true, this function will
- * skip the corresponding tree recipe node and will not create a MAD
- * for it (not allowed in root recipes).
- *
- * Other fields (most importantly 'expected_size') of a tree recipe are
- * ignored by this function.
- */
- function buildDumpTrees(allTreeRecipes, opt_model) {
- assert.isAbove(allTreeRecipes.length, 0);
-
- var ownerDumps = {}; // owned GUID -> {dump: owner, importance: optional}.
- var ownableDumps = {}; // ownable GUID -> ownable dump.
-
- function buildAndAddDumpTrees(containerDump, treeRecipes) {
- if (treeRecipes === undefined)
- return;
-
- function buildDumpTreeRecursively(treeRecipe, namePrefix) {
- var skipBuild = treeRecipe['skip_build'];
- var name = treeRecipe['name'];
- var guid = treeRecipe['guid'];
- var owns = treeRecipe['owns'];
- var size = treeRecipe['size'];
- var numerics = treeRecipe['numerics'];
- var diagnostics = treeRecipe['diagnostics'];
- var importance = treeRecipe['importance'];
- var weak = treeRecipe['weak'];
-
- assert.notStrictEqual(skipBuild, true);
- assert.isDefined(name);
-
- var fullName = namePrefix + name;
- var dump = new MemoryAllocatorDump(containerDump, fullName, guid);
-
- if (size !== undefined) {
- dump.addNumeric(
- 'size', new ScalarNumeric(sizeInBytes_smallerIsBetter, size));
- }
- if (guid !== undefined) {
- assert.notProperty(guid, ownableDumps);
- ownableDumps[guid] = dump;
- }
- if (owns !== undefined) {
- if (!(owns in ownerDumps))
- ownerDumps[owns] = [];
- ownerDumps[owns].push({dump: dump, importance: importance});
- } else {
- assert.isUndefined(importance); // Test sanity check.
- }
-
- if (treeRecipe.children !== undefined) {
- treeRecipe.children.forEach(function(childTreeRecipe) {
- // Virtual children are added during size calculation.
- if (childTreeRecipe['skip_build'] === true)
- return;
- var childDump =
- buildDumpTreeRecursively(childTreeRecipe, fullName + '/');
- childDump.parent = dump;
- dump.children.push(childDump);
- });
- }
-
- if (numerics !== undefined)
- tr.b.iterItems(numerics, dump.addNumeric, dump);
- if (diagnostics !== undefined)
- tr.b.iterItems(diagnostics, dump.addDiagnostic, dump);
-
- if (weak)
- dump.weak = true;
-
- return dump;
- }
-
- var memoryAllocatorDumps = treeRecipes.map(function(treeRecipe) {
- return buildDumpTreeRecursively(treeRecipe, '');
- });
- containerDump.memoryAllocatorDumps = memoryAllocatorDumps;
- }
-
- // Recursively build memory allocator dump trees for all container dumps.
- var containerDumps = createContainerDumps(
- allTreeRecipes.length - 1, opt_model);
- for (var i = 0; i < allTreeRecipes.length; i++)
- buildAndAddDumpTrees(containerDumps[i], allTreeRecipes[i]);
-
- // Hook up ownership links.
- tr.b.iterItems(ownerDumps, function(ownedGuid, ownershipInfos) {
- var ownedDump = ownableDumps[ownedGuid];
- assert.isDefined(ownedDump, 'Tree recipes don\'t contain a memory ' +
- 'allocator dump with guid \'' + ownedGuid + '\'');
-
- ownershipInfos.forEach(function(ownershipInfo) {
- addOwnershipLink(
- ownershipInfo.dump, ownedDump, ownershipInfo.importance);
- });
- });
-
- return containerDumps;
- }
-
- // Check that the buildDumpTrees testing helper method above builds a
- // hierarchy of container and memory allocator dumps from tree recipes
- // correctly.
- test('testSanityCheck_buildDumpTrees', function() {
- var containerDumps = buildDumpTrees([
- [ // GMD.
- {
- 'name': 'globalSharedDump1',
- 'size': 123
- },
- {
- 'name': 'globalSharedDump2',
- 'subsystem_size': 999,
- 'owns': 7,
- 'importance': -1
- }
- ],
- undefined, // PMD1.
- [ // PMD2.
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'isolate1',
- 'guid': 7,
- 'weak': true
- },
- {
- 'name': 'isolate2',
- 'skip_build': true
- },
- {
- 'name': 'isolate3',
- 'size': 54,
- 'guid': 60,
- 'children': [
- {
- 'name': 'obj1',
- 'size': 89,
- 'guid': 3
- },
- {
- 'name': 'obj2',
- 'owns': 3,
- 'weak': true
- },
- {
- 'name': 'obj3',
- 'owns': 3,
- 'importance': 2
- }
- ]
- }
- ]
- }
- ]
- ]);
- assert.lengthOf(containerDumps, 3);
- var gmd = containerDumps[0];
- var pmd1 = containerDumps[1];
- var pmd2 = containerDumps[2];
-
- function checkDump(dump, expectedGuid, expectedFullName, expectedParent,
- expectedChildrenCount, expectedSize, expectedIsOwner,
- expectedOwnersCount, expectedContainerDump, opt_expectedWeak) {
- assert.isDefined(dump);
- assert.instanceOf(dump, MemoryAllocatorDump);
- assert.strictEqual(dump.guid, expectedGuid);
- assert.strictEqual(dump.fullName, expectedFullName);
- assert.strictEqual(dump.parent, expectedParent);
- assert.lengthOf(dump.children, expectedChildrenCount);
-
- assertSizeNumeric(dump, 'size', expectedSize);
- assertSizeNumeric(dump, 'subsystem_size', undefined);
-
- if (expectedIsOwner)
- assert.isDefined(dump.owns);
- else
- assert.isUndefined(dump.owns);
- assert.lengthOf(dump.ownedBy, expectedOwnersCount);
-
- assert.strictEqual(dump.containerMemoryDump, expectedContainerDump);
- assert.strictEqual(expectedContainerDump.getMemoryAllocatorDumpByFullName(
- expectedFullName), dump);
- assert.strictEqual(dump.weak, !!opt_expectedWeak);
- }
-
- function checkOwnershipLink(expectedSourceDump, expectedTargetDump,
- expectedImportance) {
- var link = expectedSourceDump.owns;
- assert.isDefined(link);
- assert.instanceOf(link, MemoryAllocatorDumpLink);
- assert.strictEqual(link.source, expectedSourceDump);
- assert.strictEqual(link.target, expectedTargetDump);
- assert.strictEqual(link.importance, expectedImportance);
- assert.include(expectedTargetDump.ownedBy, link);
- }
-
- // GMD memory allocator dumps.
- assert.lengthOf(gmd.memoryAllocatorDumps, 2);
- var globalSharedDump1 = gmd.memoryAllocatorDumps[0];
- checkDump(globalSharedDump1, undefined, 'globalSharedDump1', undefined, 0,
- 123, false, 0, gmd);
- var globalSharedDump2 = gmd.memoryAllocatorDumps[1];
- checkDump(globalSharedDump2, undefined, 'globalSharedDump2', undefined, 0,
- undefined, true, 0, gmd);
-
- // PMD1 memory allocator dumps.
- assert.isUndefined(pmd1.memoryAllocatorDumps);
-
- // PMD2 memory allocator dumps.
- assert.lengthOf(pmd2.memoryAllocatorDumps, 1);
- var v8Dump = pmd2.memoryAllocatorDumps[0];
- checkDump(v8Dump, undefined, 'v8', undefined, 2, undefined, false, 0,
- pmd2);
- var isolate1Dump = v8Dump.children[0];
- checkDump(isolate1Dump, 7, 'v8/isolate1', v8Dump, 0, undefined, false, 1,
- pmd2, true /* weak dump */);
- var isolate3Dump = v8Dump.children[1];
- checkDump(isolate3Dump, 60, 'v8/isolate3', v8Dump, 3, 54, false, 0, pmd2);
- var obj1Dump = isolate3Dump.children[0];
- checkDump(obj1Dump, 3, 'v8/isolate3/obj1', isolate3Dump, 0, 89, false, 2,
- pmd2);
- var obj2Dump = isolate3Dump.children[1];
- checkDump(obj2Dump, undefined, 'v8/isolate3/obj2', isolate3Dump, 0,
- undefined, true, 0, pmd2, true /* weak dump */);
- var obj3Dump = isolate3Dump.children[2];
- checkDump(obj3Dump, undefined, 'v8/isolate3/obj3', isolate3Dump, 0,
- undefined, true, 0, pmd2);
-
- // Ownership links.
- checkOwnershipLink(globalSharedDump2, isolate1Dump, -1);
- checkOwnershipLink(obj2Dump, obj1Dump, undefined);
- checkOwnershipLink(obj3Dump, obj1Dump, 2);
- });
-
- /**
- * Check that container memory dumps have the expected structure with sizes
- * as described by tree recipes. The fields of a tree recipe are used by this
- * function to check the properties of a MemoryAllocatorDump as follows (see
- * the buildDumpTrees documentation for more details about the structure of
- * tree recipes):
- *
- * name: Expected name of the MAD.
- * expected_removed: If provided and true, it is expected that there is no
- * dump for the recipe.
- * expected_size: Expected value of the 'size' numeric of the MAD (no
- * 'size' numeric expected if undefined).
- * expected_effective_size: Expected value of the 'effective_size'
- * numeric of the MAD (no 'effective_size' numeric expected if
- * undefined).
- * expected_infos: List of expected MAD infos (zero infos expected if
- * undefined).
- * weak: Whether the MAD is expected to be weak (non-weak if undefined).
- * owns: Expected GUID of the dump owned by the MAD.
- * importance: Expected importance of the owhership from this MAD.
- * expected_owned_by_links_count: Expected number of 'ownedBy' links of the
- * MAD.
- * children: List of tree recipes for child MADs (no children expected if
- * undefined).
- *
- * Other fields of a tree recipe (including 'skip_build') are ignored by this
- * function.
- */
- function checkDumpTrees(containerDumps, allTreeRecipes) {
- assert.lengthOf(containerDumps, allTreeRecipes.length);
-
- for (var i = 0; i < containerDumps.length; i++) {
- var containerDump = containerDumps[i];
- var treeRecipes = allTreeRecipes[i];
-
- var memoryAllocatorDumps = containerDump.memoryAllocatorDumps;
- if (treeRecipes === undefined) {
- assert.isUndefined(memoryAllocatorDumps,
- 'expected undefined memory allocator dumps in ' +
- containerDump.userFriendlyName);
- continue;
- }
-
- var expectedTreeRecipes = treeRecipes.filter(function(treeRecipe) {
- return !treeRecipe['expected_removed'];
- });
-
- assert.isDefined(memoryAllocatorDumps,
- 'expected defined memory allocator dumps in ' +
- containerDump.userFriendlyName);
- assert.lengthOf(memoryAllocatorDumps, expectedTreeRecipes.length,
- 'expected ' + expectedTreeRecipes.length + ' root memory allocator ' +
- 'dumps but got ' + memoryAllocatorDumps.length + ' in ' +
- containerDump.userFriendlyName);
-
- function checkDumpTree(dump, treeRecipe, expectedParent, namePrefix) {
- // Test sanity check.
- assert.isFalse(!!treeRecipe['expected_removed']);
-
- // Check full name, parent, and container dump.
- var expectedFullName = namePrefix + treeRecipe['name'];
- var quantifiedName = dump.quantifiedName;
- assert.equal(dump.fullName, expectedFullName,
- quantifiedName + ' has invalid full name');
- assert.strictEqual(dump.parent, expectedParent,
- quantifiedName + ' has invalid parent');
- assert.strictEqual(dump.containerMemoryDump, containerDump,
- quantifiedName + ' has invalid container memory dump');
- assert.strictEqual(containerDump.getMemoryAllocatorDumpByFullName(
- expectedFullName), dump, quantifiedName +
- 'is not indexed in its container memory dump');
-
- // Check the guid of the dump.
- assert.strictEqual(dump.guid, treeRecipe['guid'],
- quantifiedName + ' has invalid guid');
-
- // Check that the 'weak' flag is correct.
- assert.strictEqual(dump.weak, !!treeRecipe['weak'],
- quantifiedName + ' has invalid weak flag');
-
- // Check that sizes were calculated correctly.
- assertDumpSizes(dump,
- treeRecipe['expected_size'],
- treeRecipe['expected_effective_size'],
- treeRecipe['expected_infos'],
- treeRecipe['expected_owned_by_sibling_sizes']);
-
- // Check that the 'owns' link is correct.
- if (treeRecipe['owns'] === undefined) {
- assert.isUndefined(dump.owns,
- quantifiedName + ' was expected not to own another dump');
- } else {
- var ownershipLink = dump.owns;
- assert.isDefined(dump.owns, quantifiedName +
- ' was expected to have an \'owns\' link');
- assert.strictEqual(ownershipLink.source, dump,
- 'the \'owns\' link of ' + quantifiedName + ' has invalid source');
- var expectedImportance = treeRecipe['importance'];
- assert.strictEqual(ownershipLink.importance, expectedImportance,
- 'expected the importance of the \'owns\' link of ' +
- quantifiedName + ' to be ' + expectedImportance +
- ' but got ' + ownershipLink.importance);
- var ownedDump = ownershipLink.target;
- assert.strictEqual(ownedDump.guid, treeRecipe['owns'],
- 'the \'owns\' link of ' + quantifiedName +
- ' has an invalid target');
- assert.include(ownedDump.ownedBy, ownershipLink,
- 'the target of the \'owns\' link of ' + quantifiedName +
- ' doesn\'t have the link in its \'ownedBy\' list');
- }
-
- // Check that the number of 'ownedBy' links is correct.
- var expectedOwnedByLinksCount =
- treeRecipe['expected_owned_by_links_count'];
- if (expectedOwnedByLinksCount !== undefined) {
- assert.lengthOf(dump.ownedBy, expectedOwnedByLinksCount,
- 'expected ' + quantifiedName + ' to have ' +
- expectedOwnedByLinksCount + ' \'ownedBy\' links but got ' +
- dump.ownedBy.length);
- }
-
- // Check children recursively.
- var actualChildren = dump.children;
- var expectedChildren = (treeRecipe.children || []).filter(
- function(childRecipe) {
- return !childRecipe['expected_removed'];
- });
- assert.lengthOf(actualChildren, expectedChildren.length,
- 'expected ' + quantifiedName + ' to have ' +
- expectedChildren.length + ' children but got ' +
- actualChildren.length);
- for (var k = 0; k < actualChildren.length; k++) {
- checkDumpTree(actualChildren[k], expectedChildren[k], dump,
- expectedFullName + '/');
- }
- }
-
- for (var j = 0; j < memoryAllocatorDumps.length; j++) {
- checkDumpTree(
- memoryAllocatorDumps[j], expectedTreeRecipes[j], undefined, '');
- }
- }
- }
-
- // Check that the checkDumpTrees testing helper method above actually
- // performs the expected checks. Since it will be used heavily throughout
- // this file (where it is expected to pass), we only need to verify that it
- // does indeed fail in several cases where it should.
- test('testSanityCheck_checkDumpTrees_invalidName', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var v8Dump = new MemoryAllocatorDump(gmd, 'v8');
- var heapsDump =
- new MemoryAllocatorDump(gmd, 'heaps'); // Should be 'v8/heaps'.
- v8Dump.children.push(heapsDump);
- heapsDump.parent = v8Dump;
- gmd.memoryAllocatorDumps = [v8Dump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'heaps'
- }
- ]
- }
- ]
- ]);
- }, /'heaps'.*invalid full name/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidGuid', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- gmd.memoryAllocatorDumps = [new MemoryAllocatorDump(gmd, 'v8', 42)];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'v8',
- 'guid': 43 // This should be 42.
- }
- ]
- ]);
- }, /'v8'.*\binvalid guid\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidStructure', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var rootDump = new MemoryAllocatorDump(gmd, 'root');
- addChildDump(rootDump, 'child1');
- gmd.memoryAllocatorDumps = [rootDump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'child1'
- },
- {
- // This child is not present in the dump.
- 'name': 'child2',
- 'skip_build': true
- }
- ]
- }
- ]
- ]);
- }, /expected.*\b2\b.*children.*got.*\b1\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidParentLink', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var rootDump = new MemoryAllocatorDump(gmd, 'root');
- var parentDump = addChildDump(rootDump, 'parent');
- var childDump = addChildDump(parentDump, 'child');
- childDump.parent = rootDump; // This should correctly be parentDump.
- gmd.memoryAllocatorDumps = [rootDump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child'
- }
- ]
- }
- ]
- }
- ]
- ]);
- }, 'invalid parent');
- });
-
- test('testSanityCheck_checkDumpTrees_invalidSize', function() {
- var containerDumps = createContainerDumps(1);
- var gmd = containerDumps[0];
- var pmd = containerDumps[1];
- var rootDump = newAllocatorDump(pmd, 'root', {numerics: {size: 100}});
- addChildDump(rootDump, 'parent', {numerics: {size: 49}});
- pmd.memoryAllocatorDumps = [rootDump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- undefined,
- [
- {
- 'name': 'root',
- 'expected_size': 100,
- 'children': [
- {
- 'name': 'parent',
- 'expected_size': 50 // This should be 49.
- }
- ]
- }
- ]
- ]);
- }, /expected.*'size'.*value.*\b50\b.*got.*\b49\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidEffectiveSize', function() {
- var containerDumps = createContainerDumps(1);
- var gmd = containerDumps[0];
- var pmd = containerDumps[1];
- var rootDump = newAllocatorDump(pmd, 'root',
- {numerics: {effective_size: 99}});
- addChildDump(rootDump, 'parent', {numerics: {effective_size: 50}});
- pmd.memoryAllocatorDumps = [rootDump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- undefined,
- [
- {
- 'name': 'root',
- 'expected_effective_size': 100, // This should be 99.
- 'children': [
- {
- 'name': 'parent',
- 'expected_effective_size': 50
- }
- ]
- }
- ]
- ]);
- }, /expected.*'effective_size'.*value.*\b100\b.*got.*\b99\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidInfoCount', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- gmd.memoryAllocatorDumps = [
- newAllocatorDump(gmd, 'v8', {numerics: {size: 50}})
- ];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'v8',
- 'expected_size': 50,
- 'expected_infos': [
- {
- type: PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN,
- providedSize: 50,
- dependencySize: 60
- }
- ]
- }
- ]
- ]);
- }, /expected.*'v8'.*\b1 infos\b.*\bgot\b.*\b0\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidInfo', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var v8Dump = newAllocatorDump(gmd, 'v8', {numerics: {size: 50}});
- v8Dump.infos.push({
- type: PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN,
- providedSize: 40,
- dependencySize: 50
- });
- gmd.memoryAllocatorDumps = [v8Dump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'v8',
- 'expected_size': 50,
- 'expected_infos': [
- {
- // Should be PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN below.
- type: PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER,
- providedSize: 40,
- dependencySize: 50
- }
- ]
- }
- ]
- ]);
- }, /\binfo 0\b.*'v8'.*\bexpected\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidOwnedBySiblingSizes', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var v8Dump = new MemoryAllocatorDump(gmd, 'v8');
- addChildDump(v8Dump, 'child1', {guid: 42});
- addChildDump(v8Dump, 'child2');
- gmd.memoryAllocatorDumps = [v8Dump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'child1',
- 'guid': 42
- },
- {
- 'name': 'child2',
- 'expected_owned_by_sibling_sizes': {
- 'child1': 40 // This should be 30.
- }
- }
- ]
- }
- ]
- ]);
- }, /\bownedBySiblingSizes\b.*'v8\/child2'.*\bexpected\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidWeakFlag',
- function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var parentDump = new MemoryAllocatorDump(gmd, 'parent');
- var childDump = addChildDump(parentDump, 'child');
- childDump.weak = true;
- gmd.memoryAllocatorDumps = [parentDump];
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child',
- // Missing "'weak': true".
- }
- ]
- }
- ]
- ]);
- }, /'parent\/child'.*\binvalid weak flag\b/);
-
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'parent',
- 'weak': true, // This should be false (or not provided).
- 'children': [
- {
- 'name': 'child',
- 'weak': true
- }
- ]
- }
- ]
- ]);
- }, /'parent'.*\binvalid weak flag\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_dumpNotRemoved', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
- var parentDump = new MemoryAllocatorDump(gmd, 'parent');
- for (var i = 1; i <= 3; i++)
- addChildDump(parentDump, 'child' + i);
- var otherDump = new MemoryAllocatorDump(gmd, 'other');
- gmd.memoryAllocatorDumps = [parentDump, otherDump];
-
- // Child MAD not removed.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child1',
- },
- {
- 'name': 'child2',
- 'expected_removed': true
- },
- {
- 'name': 'child3',
- }
- ]
- },
- {
- 'name': 'other'
- }
- ]
- ]);
- }, /\bexpected\b.*'parent'.*\b2 children\b.*\bgot 3\b/);
-
- // Root MAD not removed.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child1',
- },
- {
- 'name': 'child2'
- },
- {
- 'name': 'child3',
- }
- ]
- },
- {
- 'name': 'other',
- 'expected_removed': true
- }
- ]
- ]);
- }, /\bexpected\b.*\b1 root memory allocator dumps\b.*\bgot 2\b/);
- });
-
- test('testSanityCheck_checkDumpTrees_invalidOwnership', function() {
- var containerDumps = createContainerDumps(1);
- var gmd = containerDumps[0];
- var pmd1 = containerDumps[1];
- var ownedDump = new MemoryAllocatorDump(gmd, 'owned', 42);
- var ownerDump1 = new MemoryAllocatorDump(pmd1, 'owner1');
- var link1 = addOwnershipLink(ownerDump1, ownedDump);
- var ownerDump2 = new MemoryAllocatorDump(pmd1, 'owner2');
- var link2 = addOwnershipLink(ownerDump2, ownedDump, 3);
- var nonOwnerDump = new MemoryAllocatorDump(pmd1, 'non-owner', 90);
- gmd.memoryAllocatorDumps = [ownedDump];
- pmd1.memoryAllocatorDumps = [ownerDump1, ownerDump2, nonOwnerDump];
-
- // Missing 'owns' link.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42
- }
- ],
- [
- {
- 'name': 'owner1',
- 'owns': 42
- },
- {
- 'name': 'owner2',
- 'importance': 3,
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90,
- 'owns': 42 // This should not be here.
- }
- ]
- ]);
- }, /'non-owner'.*\bwas expected to have\b.*'owns' link\b/);
-
- // Extra 'owns' link.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42
- }
- ],
- [
- {
- 'name': 'owner1'
- // Missing: "'owns': 42".
- },
- {
- 'name': 'owner2',
- 'importance': 3,
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90
- }
- ]
- ]);
- }, /'owner1'.*\bwas expected not to own\b/);
-
- // Invalid ownership importance.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42
- }
- ],
- [
- {
- 'name': 'owner1',
- 'owns': 42
- },
- {
- 'name': 'owner2',
- 'importance': 2, // This should be 3.
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90
- }
- ]
- ]);
- }, /\bexpected\b.*\bimportance\b.*'owner2'.*\b2 but got 3\b/);
-
- // Invalid ownership target.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42
- }
- ],
- [
- {
- 'name': 'owner1',
- 'owns': 90 // This should be 42.
- },
- {
- 'name': 'owner2',
- 'importance': 3,
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90
- }
- ]
- ]);
- }, /'owner1'.*\binvalid target\b/);
-
- // Invalid 'ownedBy' ownership links count.
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42,
- 'expected_owned_by_links_count': 3 // This should be 2.
- }
- ],
- [
- {
- 'name': 'owner1',
- 'owns': 42
- },
- {
- 'name': 'owner2',
- 'importance': 3,
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90
- }
- ]
- ]);
- }, /'owned'.*\bhave 3 'ownedBy' links\b.*\bgot 2\b/);
-
- // Invalid ownership source.
- link1.source = ownerDump2;
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42
- }
- ],
- [
- {
- 'name': 'owner1',
- 'owns': 42
- },
- {
- 'name': 'owner2',
- 'importance': 3,
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90
- }
- ]
- ]);
- }, /'owns' link\b.*'owner1'.*\binvalid source\b/);
- link1.source = ownerDump1;
-
- // Ownership link not in target's 'ownedBy' list.
- ownedDump.ownedBy.pop();
- assert.throws(function() {
- checkDumpTrees(containerDumps, [
- [
- {
- 'name': 'owned',
- 'guid': 42
- }
- ],
- [
- {
- 'name': 'owner1',
- 'owns': 42
- },
- {
- 'name': 'owner2',
- 'importance': 3,
- 'owns': 42
- },
- {
- 'name': 'non-owner',
- 'guid': 90
- }
- ]
- ]);
- }, /\btarget of\b.*'owner2'.*'ownedBy' list\b/);
- ownedDump.ownedBy.push(link2);
- });
-
- /**
- * Build container memory dumps from tree recipes, let the resulting
- * GlobalMemoryDump calculate sizes and effective sizes, and then check that
- * the augmented container memory dumps have the expected structure with
- * correct sizes and effective sizes (as described by the same tree recipes).
- *
- * See the documentation for buildDumpTrees and checkDumpTrees for more
- * details about the structure of tree recipes.
- */
- function testSizesCalculation(allTreeRecipes) {
- var m = new Model();
- var io = new tr.importer.ImportOptions();
- io.showImportWarnings = false;
- m.importOptions = io;
-
- var containerDumps = buildDumpTrees(allTreeRecipes, m);
- var gmd = containerDumps[0];
- gmd.calculateSizes();
- gmd.calculateEffectiveSizes();
- gmd.forceRebuildingMemoryAllocatorDumpByFullNameIndices();
- checkDumpTrees(containerDumps, allTreeRecipes);
- }
-
- // Check that the testSizesCalculation testing helper method above
- // actually performs the expected checks. Since it will be used heavily
- // throughout this file (where it is expected to pass), we only need to
- // verify that it does indeed fail when it should.
- test('testSanityCheck_testSizesCalculation', function() {
- assert.throws(function() {
- testSizesCalculation([
- [],
- undefined,
- [
- {
- 'name': 'winheap'
- },
- {
- 'name': 'malloc',
- 'expected_size': 100,
- 'children': [
- {
- 'name': 'allocated_objects',
- 'size': 100,
- 'expected_size': 100
- },
- {
- 'name': 'extra',
- 'size': 20,
- 'expected_size': 20
- }
- ]
- }
- ]
- ]);
- }, /expected.*'size'.*value.*\b100\b.*got.*\b120\b/);
- });
-
- function calculationTest(caseName, treeRecipes) {
- test('calculateSizes_' + caseName, function() {
- testSizesCalculation(treeRecipes);
- });
- }
-
- /**
- * Build container memory dumps from tree recipes, let the resulting
- * GlobalMemoryDump remove weak memory dumps, and then check that the updated
- * container memory dumps have the expected structure (as described by the
- * same tree recipes).
- *
- * See the documentation for buildDumpTrees and checkDumpTrees for more
- * details about the structure of tree recipes.
- */
- function testWeakDumpRemoval(allTreeRecipes) {
- var m = new tr.Model();
- var io = new tr.importer.ImportOptions();
- io.showImportWarnings = false;
- m.importOptions = io;
-
- var containerDumps = buildDumpTrees(allTreeRecipes, m);
- var gmd = containerDumps[0];
- gmd.removeWeakDumps();
- gmd.forceRebuildingMemoryAllocatorDumpByFullNameIndices();
- checkDumpTrees(containerDumps, allTreeRecipes);
- }
-
- // Similarly to testSanityCheck_testSizesCalculation, check that the
- // testWeakDumpRemoval testing helper method above actually performs the
- // expected checks.
- test('testSanityCheck_testWeakDumpRemoval', function() {
- assert.throws(function() {
- testWeakDumpRemoval([
- [],
- undefined,
- [
- {
- 'name': 'winheap'
- },
- {
- 'name': 'malloc',
- 'children': [
- {
- 'name': 'allocated_objects'
- },
- {
- 'name': 'directly_weak',
- 'guid': 42,
- 'weak': true,
- 'expected_removed': true
- },
- {
- 'name': 'indirectly_weak',
- 'owns': 42
- // Missing: "'expected_removed': true".
- }
- ]
- }
- ]
- ]);
- }, /expected.*'malloc'.*\b2 children\b.*\bgot 1\b/);
- });
-
- function weakDumpRemovalTest(caseName, treeRecipes) {
- test('removeWeakDumps_' + caseName, function() {
- testWeakDumpRemoval(treeRecipes);
- });
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // Actual tests begin here.
- /////////////////////////////////////////////////////////////////////////////
-
- test('iterateContainerDumps_withoutProcessMemoryDumps', function() {
- var containerDumps = createContainerDumps(0);
- var gmd = containerDumps[0];
-
- var visitedContainerDumps = [];
- gmd.iterateContainerDumps(buildArgPusher(visitedContainerDumps));
- assertEqualUniqueMembers(visitedContainerDumps, containerDumps);
- });
-
- test('iterateContainerDumps_withProcessMemoryDumps', function() {
- var containerDumps = createContainerDumps(2);
- var gmd = containerDumps[0];
-
- var visitedContainerDumps = [];
- gmd.iterateContainerDumps(buildArgPusher(visitedContainerDumps));
- assertEqualUniqueMembers(visitedContainerDumps, containerDumps);
- });
-
- test('iterateAllRootAllocatorDumps', function() {
- var containerDumps = buildDumpTrees([
- [ // GMD.
- {
- 'name': 'globalSharedDump1'
- },
- {
- 'name': 'globalSharedDump2'
- }
- ],
- [ // PMD.
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'isolate'
- }
- ]
- }
- ]
- ]);
- var gmd = containerDumps[0];
- var pmd = containerDumps[1];
-
- var visitedAllocatorDumps = [];
- gmd.iterateAllRootAllocatorDumps(buildArgPusher(visitedAllocatorDumps));
- assertEqualUniqueMembers(visitedAllocatorDumps, [
- gmd.getMemoryAllocatorDumpByFullName('globalSharedDump1'),
- gmd.getMemoryAllocatorDumpByFullName('globalSharedDump2'),
- pmd.getMemoryAllocatorDumpByFullName('v8')
- ]);
- });
-
- test('traverseAllocatorDumpsInDepthFirstOrder_oneTreeWithoutOwners',
- function() {
- var containerDumps = buildDumpTrees([
- [ // GMD.
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child1'
- },
- {
- 'name': 'child2'
- }
- ]
- }
- ]
- }
- ]
- ]);
- var gmd = containerDumps[0];
-
- // Post-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPostOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, [
- gmd.getMemoryAllocatorDumpByFullName('root/parent/child1'),
- gmd.getMemoryAllocatorDumpByFullName('root/parent/child2'),
- gmd.getMemoryAllocatorDumpByFullName('root/parent'),
- gmd.getMemoryAllocatorDumpByFullName('root')
- ]);
-
- // Pre-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPreOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, [
- gmd.getMemoryAllocatorDumpByFullName('root'),
- gmd.getMemoryAllocatorDumpByFullName('root/parent'),
- gmd.getMemoryAllocatorDumpByFullName('root/parent/child1'),
- gmd.getMemoryAllocatorDumpByFullName('root/parent/child2')
- ]);
- });
-
- test('traverseAllocatorDumpsInDepthFirstOrder_oneTreeWithOwners',
- function() {
- var containerDumps = buildDumpTrees([
- [], // GMD.
- [ // PMD.
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child1',
- 'owns': 0
- },
- {
- 'name': 'child2',
- 'guid': 0
- },
- {
- 'name': 'child3',
- 'owns': 0
- }
- ]
- }
- ]
- }
- ]
- ]);
- var gmd = containerDumps[0];
- var pmd = containerDumps[1];
-
- // Post-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPostOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, [
- pmd.getMemoryAllocatorDumpByFullName('root/parent/child1'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent/child3'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent/child2'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent'),
- pmd.getMemoryAllocatorDumpByFullName('root')
- ]);
-
- // Pre-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPreOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, [
- pmd.getMemoryAllocatorDumpByFullName('root'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent/child2'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent/child1'),
- pmd.getMemoryAllocatorDumpByFullName('root/parent/child3')
- ]);
- });
-
- test('traverseAllocatorDumpsInDepthFirstOrder_multipleTrees', function() {
- var containerDumps = buildDumpTrees([
- [ // GMD.
- {
- 'name': 'shared',
- 'children': [
- {
- 'name': 'pool1',
- 'guid': 1
- },
- {
- 'name': 'pool2',
- 'owns': 3
- }
- ]
- }
- ],
- [ // PMD.
- {
- 'name': 'oilpan',
- 'children': [
- {
- 'name': 'objects'
- },
- {
- 'name': 'heaps',
- 'owns': 1,
- 'children': [
- {
- 'name': 'small',
- 'guid': 2
- },
- {
- 'name': 'large'
- }
- ]
- }
- ]
- },
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'isolate1',
- 'owns': 2
- },
- {
- 'name': 'isolate2',
- 'guid': 3
- }
- ]
- }
- ]
- ]);
- var gmd = containerDumps[0];
- var pmd = containerDumps[1];
-
- // Post-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPostOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, [
- pmd.getMemoryAllocatorDumpByFullName('v8/isolate1'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/heaps/small'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/heaps/large'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/heaps'),
- gmd.getMemoryAllocatorDumpByFullName('shared/pool1'),
- gmd.getMemoryAllocatorDumpByFullName('shared/pool2'),
- gmd.getMemoryAllocatorDumpByFullName('shared'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/objects'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan'),
- pmd.getMemoryAllocatorDumpByFullName('v8/isolate2'),
- pmd.getMemoryAllocatorDumpByFullName('v8')
- ]);
-
- // Pre-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPreOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, [
- gmd.getMemoryAllocatorDumpByFullName('shared'),
- gmd.getMemoryAllocatorDumpByFullName('shared/pool1'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/objects'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/heaps'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/heaps/small'),
- pmd.getMemoryAllocatorDumpByFullName('oilpan/heaps/large'),
- pmd.getMemoryAllocatorDumpByFullName('v8'),
- pmd.getMemoryAllocatorDumpByFullName('v8/isolate1'),
- pmd.getMemoryAllocatorDumpByFullName('v8/isolate2'),
- gmd.getMemoryAllocatorDumpByFullName('shared/pool2')
- ]);
- });
-
- test('traverseAllocatorDumpsInDepthFirstPostOrder_cycle', function() {
- var containerDumps = buildDumpTrees([
- [ // GMD.
- {
- 'name': 'shared',
- 'owns': 2,
- 'children': [
- {
- 'name': 'pool',
- 'guid': 1
- }
- ]
- }
- ],
- [ // PMD.
- {
- 'name': 'oilpan',
- 'owns': 1,
- 'children': [
- {
- 'name': 'objects',
- 'guid': 2
- }
- ]
- }
- ]
- ]);
- var gmd = containerDumps[0];
-
- // Post-order.
- assert.throws(function() {
- gmd.traverseAllocatorDumpsInDepthFirstPostOrder(function() {});
- }, /contains.*cycle/);
-
- // Pre-order.
- var visitedAllocatorDumps = [];
- gmd.traverseAllocatorDumpsInDepthFirstPreOrder(
- buildArgPusher(visitedAllocatorDumps));
- assert.deepEqual(visitedAllocatorDumps, []);
- });
-
- // Just check that the method doesn't crash upon encountering empty and/or
- // undefined memory allocator dumps.
- calculationTest('noDumps', [
- undefined, // GMD.
- [], // PMD1.
- undefined // PMD2.
- ]);
-
- calculationTest('flatDumps', [
- [ // GMD.
- {
- 'name': 'shared',
- 'size': 1024,
- 'expected_size': 1024,
- 'expected_effective_size': 1024
- }
- ],
- [ // PMD.
- {
- 'name': 'gpu'
- }
- ]
- ]);
-
- calculationTest('zeroSizes', [
- [ // GMD.
- {
- 'name': 'shared',
- 'size': 0,
- 'expected_size': 0,
- 'expected_effective_size': 0
- }
- ],
- [ // PMD1.
- {
- 'name': 'gpu',
- 'expected_size': 0,
- 'expected_effective_size': 0,
- 'children': [
- {
- 'name': 'zero',
- 'size': 0,
- 'expected_size': 0,
- 'expected_effective_size': 0
- }
- ]
- }
- ],
- [ // PMD2.
- {
- 'name': 'gpu',
- 'expected_size': 0,
- 'expected_effective_size': 0,
- 'children': [
- {
- 'name': 'zero',
- 'size': 0,
- 'expected_size': 0,
- 'expected_effective_size': 0
- },
- {
- 'name': 'undefined'
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_allSizesUndefined', [
- [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'child1'
- },
- {
- 'name': 'child2'
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_parentSizeUndefined', [
- [
- {
- 'name': 'parent',
- 'expected_size': 384,
- 'expected_effective_size': 384,
- 'children': [
- {
- 'name': 'child1',
- 'size': 128,
- 'expected_size': 128,
- 'expected_effective_size': 128
- },
- {
- 'name': 'child2',
- 'size': 256,
- 'expected_size': 256,
- 'expected_effective_size': 256
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_parentSizeDefined_childrenAddUp', [
- [
- {
- 'name': 'parent',
- 'size': 0,
- 'expected_size': 0,
- 'expected_effective_size': 0,
- 'children': [
- {
- 'name': 'child1'
- },
- {
- 'name': 'child2'
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_parentSizeDefined_childrenDontAddUp', [
- [
- {
- 'name': 'parent',
- 'size': 2048,
- 'expected_size': 2048,
- 'expected_effective_size': 2048,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 2048,
- 'expected_effective_size': 2048
- },
- {
- 'name': 'child1'
- },
- {
- 'name': 'child2'
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_oneChildSizeUndefined_childrenAddUp', [
- [
- {
- 'name': 'parent',
- 'size': 4096,
- 'expected_size': 4096,
- 'expected_effective_size': 4096,
- 'children': [
- {
- 'name': 'child1'
- },
- {
- 'name': 'child2',
- 'size': 4096,
- 'expected_size': 4096,
- 'expected_effective_size': 4096
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_oneChildSizeUndefined_childrenDontAddUp', [
- [
- {
- 'name': 'parent',
- 'size': 6144,
- 'expected_size': 6144,
- 'expected_effective_size': 6144,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 2048,
- 'expected_effective_size': 2048
- },
- {
- 'name': 'child1'
- },
- {
- 'name': 'child2',
- 'size': 4096,
- 'expected_size': 4096,
- 'expected_effective_size': 4096
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_allSizesDefined_childrenAddUp', [
- [
- {
- 'name': 'parent',
- 'size': 100,
- 'expected_size': 100,
- 'expected_effective_size': 100,
- 'children': [
- {
- 'name': 'child1',
- 'size': 70,
- 'expected_size': 70,
- 'expected_effective_size': 70
- },
- {
- 'name': 'child2',
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_allSizesDefined_childrenDontUp', [
- [
- {
- 'name': 'parent',
- 'size': 150,
- 'expected_size': 150,
- 'expected_effective_size': 150,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 50,
- 'expected_effective_size': 50
- },
- {
- 'name': 'child1',
- 'size': 70,
- 'expected_size': 70,
- 'expected_effective_size': 70
- },
- {
- 'name': 'child2',
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_oneChildSizeDefined', [
- [
- {
- 'name': 'parent',
- 'expected_size': 49,
- 'expected_effective_size': 49,
- 'children': [
- {
- 'name': 'child1',
- 'size': 49,
- 'expected_size': 49,
- 'expected_effective_size': 49
- },
- {
- 'name': 'child2'
- }
- ]
- }
- ]
- ]);
-
- calculationTest('children_multipleLevels', [
- [], // GMD.
- [ // PMD.
- {
- 'name': 'v8',
- 'expected_size': 36,
- 'expected_effective_size': 36,
- 'children': [
- {
- 'name': 'isolate1',
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 10,
- 'children': [
- {
- 'skip_build': true,
- 'name': '<unspecified>',
- 'expected_size': 3,
- 'expected_effective_size': 3
- },
- {
- 'name': 'objects',
- 'size': 3,
- 'expected_size': 3,
- 'expected_effective_size': 3
- },
- {
- 'name': 'heaps',
- 'size': 4,
- 'expected_size': 4,
- 'expected_effective_size': 4
- }
- ]
- },
- {
- 'name': 'isolate2',
- 'size': 12,
- 'expected_size': 12,
- 'expected_effective_size': 12,
- 'children': [
- {
- 'name': 'objects',
- 'size': 5,
- 'expected_size': 5,
- 'expected_effective_size': 5
- },
- {
- 'name': 'heaps',
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 7
- }
- ]
- },
- {
- 'name': 'isolate3',
- 'expected_size': 14,
- 'expected_effective_size': 14,
- 'children': [
- {
- 'name': 'objects',
- 'size': 14,
- 'expected_size': 14,
- 'expected_effective_size': 14
- },
- {
- 'name': 'heaps'
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- calculationTest('owners_allSizesUndefined', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'owns': 7,
- 'importance': 1
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_ownedSizeDefined', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'size': 15,
- 'expected_size': 15,
- 'expected_effective_size': 15,
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'owns': 7
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_ownedSizeUndefined', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'expected_size': 9,
- 'expected_effective_size': 0,
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'size': 5,
- 'expected_size': 5,
- 'expected_effective_size': 2.5,
- 'owns': 7
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'size': 9,
- 'expected_size': 9,
- 'expected_effective_size': 6.5,
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_oneOwnerSizeDefined', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'expected_size': 16,
- 'expected_effective_size': 0,
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'size': 16,
- 'expected_size': 16,
- 'expected_effective_size': 16,
- 'owns': 7
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_oneOwnerSizeUndefined', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 2,
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'owns': 7
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'size': 18,
- 'expected_size': 18,
- 'expected_effective_size': 18,
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_allSizesDefined', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'size': 60,
- 'expected_size': 60,
- 'expected_effective_size': 31,
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'size': 29,
- 'expected_size': 29,
- 'expected_effective_size': 19.5,
- 'owns': 7
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'size': 19,
- 'expected_size': 19,
- 'expected_effective_size': 9.5,
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_hierarchy', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'expected_size': 50,
- 'expected_effective_size': 0,
- 'guid': 7
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile',
- 'expected_size': 50,
- 'expected_effective_size': 0,
- 'owns': 7,
- 'guid': 0
- },
- {
- 'name': 'object1',
- 'size': 30,
- 'owns': 0,
- 'expected_size': 30,
- 'expected_effective_size': 9
- },
- {
- 'name': 'object2',
- 'owns': 0
- },
- {
- 'name': 'object3',
- 'size': 50,
- 'owns': 0,
- 'expected_size': 50,
- 'expected_effective_size': 21
- }
- ],
- [ // PMD2.
- {
- 'name': 'chunk',
- 'size': 40,
- 'expected_size': 40,
- 'expected_effective_size': 20,
- 'owns': 7
- }
- ]
- ]);
-
- calculationTest('owners_withChildren', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'guid': 7,
- 'expected_size': 48,
- 'expected_effective_size': 17,
- 'children': [
- {
- 'name': 'subbitmap1',
- 'size': 32,
- 'expected_size': 32,
- 'expected_effective_size': 17 * (32 / 48)
- },
- {
- 'name': 'subbitmap2',
- 'size': 16,
- 'expected_size': 16,
- 'expected_effective_size': 17 * (16 / 48)
- }
- ]
- }
- ],
- [ // PMD.
- {
- 'name': 'tile',
- 'expected_size': 31,
- 'expected_effective_size': 0,
- 'guid': 8,
- 'owns': 7,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 7,
- 'expected_effective_size': 0
- },
- {
- 'name': 'subtile',
- 'size': 24,
- 'expected_size': 24,
- 'expected_effective_size': 0
- }
- ]
- },
- {
- 'name': 'cc',
- 'owns': 8,
- 'size': 31,
- 'expected_size': 31,
- 'expected_effective_size': 31
- }
- ]
- ]);
-
- calculationTest('owners_withParents', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'size': 96,
- 'expected_size': 96,
- 'expected_effective_size': 32,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 32,
- 'expected_effective_size': 32
- },
- {
- 'name': 'subbitmap',
- 'guid': 2,
- 'expected_size': 64,
- 'expected_effective_size': 0
- }
- ]
- }
- ],
- [ // PMD.
- {
- 'name': 'tile',
- 'expected_size': 64,
- 'expected_effective_size': 0,
- 'children': [
- {
- 'name': 'subtile',
- 'guid': 1,
- 'owns': 2,
- 'expected_size': 64,
- 'expected_effective_size': 0
- }
- ]
- },
- {
- 'name': 'cc',
- 'owns': 1,
- 'size': 64,
- 'expected_size': 64,
- 'expected_effective_size': 64
- }
- ]
- ]);
-
- calculationTest('owners_multipleLevels', [
- [ // GMD.
- {
- 'name': 'bitmap',
- 'size': 96,
- 'expected_size': 96,
- 'expected_effective_size': 32,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 32,
- 'expected_effective_size': 32
- },
- {
- 'name': 'subbitmap',
- 'guid': 2,
- 'expected_size': 64,
- 'expected_effective_size': 0
- }
- ]
- }
- ],
- [ // PMD.
- {
- 'name': 'tile',
- 'expected_size': 64,
- 'expected_effective_size': 0,
- 'owns': 2,
- 'children': [
- {
- 'name': 'subtile',
- 'guid': 1,
- 'expected_size': 64,
- 'expected_effective_size': 0
- }
- ]
- },
- {
- 'name': 'cc',
- 'owns': 1,
- 'size': 64,
- 'expected_size': 64,
- 'expected_effective_size': 64
- }
- ]
- ]);
-
- calculationTest('views_allSizesUndefined', [
- [
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'v8/heaps',
- 'guid': 1
- },
- {
- 'name': 'v8/objects',
- 'owns': 1
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_ownedSizeDefined', [
- [
- {
- 'name': 'v8',
- 'expected_size': 10,
- 'expected_effective_size': 10,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 10
- },
- {
- 'name': 'objects',
- 'owns': 1
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_ownerSizeDefined', [
- [
- {
- 'name': 'v8',
- 'expected_size': 20,
- 'expected_effective_size': 20,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 1,
- 'expected_size': 20,
- 'expected_effective_size': 0,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 20
- }
- },
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 20
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_parentSizeUndefined', [
- [
- {
- 'name': 'v8',
- 'expected_size': 30,
- 'expected_effective_size': 30,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 10,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 20
- }
- },
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 20
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_ownerSizeUndefined_childrenAddUp', [
- [
- {
- 'name': 'v8',
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30
- },
- {
- 'name': 'objects',
- 'owns': 1
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_ownerSizeUndefined_childrenDontAddUp', [
- [
- {
- 'name': 'v8',
- 'size': 40,
- 'expected_size': 40,
- 'expected_effective_size': 40,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 10,
- 'expected_effective_size': 10
- },
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30
- },
- {
- 'name': 'objects',
- 'owns': 1
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_ownedSizeUndefined_childrenAddUp', [
- [
- {
- 'name': 'v8',
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 1,
- 'expected_size': 30,
- 'expected_effective_size': 0,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 30
- }
- },
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_ownedSizeUndefined_childrenDontAddUp', [
- [
- {
- 'name': 'v8',
- 'size': 40,
- 'expected_size': 40,
- 'expected_effective_size': 40,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 10,
- 'expected_effective_size': 10
- },
- {
- 'name': 'heaps',
- 'guid': 1,
- 'expected_size': 30,
- 'expected_effective_size': 0,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 30
- }
- },
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_allSizesDefined_childrenAddUp', [
- [
- {
- 'name': 'v8',
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 30,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 16,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 14
- }
- },
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 14,
- 'expected_size': 14,
- 'expected_effective_size': 14
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_allSizesDefined_childrenDontAddUp', [
- [
- {
- 'name': 'v8',
- 'size': 35,
- 'expected_size': 35,
- 'expected_effective_size': 35,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 5,
- 'expected_effective_size': 5
- },
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 30,
- 'expected_size': 30,
- 'expected_effective_size': 16,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 14
- }
- },
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 14,
- 'expected_size': 14,
- 'expected_effective_size': 14
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_deep', [
- [
- {
- 'name': 'root',
- 'expected_size': 17,
- 'expected_effective_size': 17,
- 'children': [
- {
- 'name': 'parent1',
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 5,
- 'expected_owned_by_sibling_sizes': {
- 'parent2': 5
- },
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 2,
- 'expected_effective_size': 2
- },
- {
- 'name': 'child',
- 'guid': 1,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 3
- }
- ]
- },
- {
- 'name': 'parent2',
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 5,
- 'expected_owned_by_sibling_sizes': {
- 'parent3': 3
- },
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 3,
- 'expected_effective_size': 3
- },
- {
- 'name': 'child',
- 'guid': 2,
- 'owns': 1,
- 'size': 5,
- 'expected_size': 5,
- 'expected_effective_size': 2
- }
- ]
- },
- {
- 'name': 'parent3',
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 7,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 4,
- 'expected_effective_size': 4
- },
- {
- 'name': 'child',
- 'owns': 2,
- 'size': 3,
- 'expected_size': 3,
- 'expected_effective_size': 3
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- calculationTest('views_nested', [
- [
- {
- 'name': 'system',
- 'expected_size': 7,
- 'expected_effective_size': 7,
- 'children': [
- {
- 'name': 'subsystem-A',
- 'owns': 15,
- 'expected_size': 5,
- 'expected_effective_size': 5,
- 'children': [
- {
- 'name': 'objects',
- 'owns': 30,
- 'size': 3,
- 'expected_size': 3,
- 'expected_effective_size': 3
- },
- {
- 'name': 'heaps',
- 'guid': 30,
- 'size': 5,
- 'expected_size': 5,
- 'expected_effective_size': 2,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 3
- }
- }
- ]
- },
- {
- 'name': 'subsystem-B',
- 'guid': 15,
- 'expected_size': 7,
- 'expected_effective_size': 2,
- 'expected_owned_by_sibling_sizes': {
- 'subsystem-A': 5
- },
- 'children': [
- {
- 'name': 'objects',
- 'owns': 40,
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 2
- },
- {
- 'name': 'heaps',
- 'guid': 40,
- 'expected_size': 7,
- 'expected_effective_size': 0,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 7
- }
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- calculationTest('importance_equal', [
- [ // GMD (both importances undefined and equal sizes).
- {
- 'name': 'owned',
- 'guid': 1,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 4
- },
- {
- 'name': 'owner1',
- 'owns': 1,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 3
- },
- {
- 'name': 'owner2',
- 'owns': 1,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 3
- }
- ],
- [ // PMD1 (only one importance defined and different sizes).
- {
- 'name': 'owned',
- 'guid': 2,
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 5
- },
- {
- 'name': 'owner1',
- 'owns': 2,
- 'importance': 0,
- 'size': 15,
- 'expected_size': 15,
- 'expected_effective_size': 10 / 2 + 5
- },
- {
- 'name': 'owner2',
- 'owns': 2,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 10 / 2
- }
- ],
- [ // PMD2 (all importances defined and different sizes).
- {
- 'name': 'owned',
- 'guid': 3,
- 'size': 15,
- 'expected_size': 15,
- 'expected_effective_size': 5
- },
- {
- 'name': 'owner1',
- 'owns': 3,
- 'importance': 3,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 8 / 3
- },
- {
- 'name': 'owner2',
- 'owns': 3,
- 'importance': 3,
- 'size': 9,
- 'expected_size': 9,
- 'expected_effective_size': 8 / 3 + 1 / 2
- },
- {
- 'name': 'owner3',
- 'owns': 3,
- 'importance': 3,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 8 / 3 + 1 / 2 + 1
- }
- ]
- ]);
-
- calculationTest('importance_notEqual', [
- [ // GMD (one importance undefined and equal sizes).
- {
- 'name': 'owned',
- 'guid': 1,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 4
- },
- {
- 'name': 'owner1',
- 'owns': 1,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 0
- },
- {
- 'name': 'owner2',
- 'owns': 1,
- 'importance': 1,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 6
- }
- ],
- [ // PMD1 (one importance undefined and different sizes).
- {
- 'name': 'owned',
- 'guid': 2,
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 4
- },
- {
- 'name': 'owner1',
- 'owns': 2,
- 'importance': -1,
- 'size': 16,
- 'expected_size': 16,
- 'expected_effective_size': 6
- },
- {
- 'name': 'owner2',
- 'owns': 2,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 10
- }
- ],
- [ // PMD2 (all importances defined and different sizes).
- {
- 'name': 'owned',
- 'guid': 3,
- 'size': 15,
- 'expected_size': 15,
- 'expected_effective_size': 5
- },
- {
- 'name': 'owner1',
- 'owns': 3,
- 'importance': 4,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 8
- },
- {
- 'name': 'owner2',
- 'owns': 3,
- 'importance': 3,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 0
- },
- {
- 'name': 'owner3',
- 'owns': 3,
- 'importance': 2,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 2
- }
- ]
- ]);
-
- // Example taken from GlobalMemoryDump.calculateDumpOwnershipCoefficient_()
- // documentation.
- calculationTest('importance_manyOwners', [
- [ // GMD.
- {
- 'name': 'owned',
- 'guid': 4,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 2
- }
- ],
- [ // PMD1.
- {
- 'name': 'owner1',
- 'owns': 4,
- 'importance': 2,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 6 / 2
- }
- ],
- [ // PMD2.
- {
- 'name': 'some_parent',
- 'expected_size': 7,
- 'expected_effective_size': 6 / 2 + 1,
- 'children': [
- {
- 'name': 'owner2',
- 'owns': 4,
- 'importance': 2,
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 6 / 2 + 1
- }
- ]
- }
- ],
- [ // PMD3.
- {
- 'name': 'owner3',
- 'owns': 4,
- 'importance': 1,
- 'size': 5,
- 'expected_size': 5,
- 'expected_effective_size': 0
- },
- {
- 'name': 'owner4',
- 'owns': 4,
- 'importance': 0,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 1
- }
- ]
- ]);
-
- calculationTest('importance_chainOwnerships', [
- [ // GMD.
- {
- 'name': 'owned',
- 'guid': 5,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 2
- }
- ],
- [ // PMD1.
- {
- 'name': 'owner1',
- 'owns': 5,
- 'importance': 2,
- 'guid': 6,
- 'size': 6,
- 'expected_size': 6,
- 'expected_effective_size': 2
- },
- {
- 'name': 'subowner1',
- 'owns': 6,
- 'size': 4,
- 'expected_size': 4,
- 'expected_effective_size': 4
- }
- ],
- [ // PMD2.
- {
- 'name': 'owner2',
- 'owns': 5,
- 'importance': 1,
- 'guid': 8,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 2 - 2 / 4
- },
- {
- 'name': 'subowner2',
- 'owns': 8,
- 'size': 2,
- 'expected_size': 2,
- 'expected_effective_size': 2 / 4
- }
- ]
- ]);
-
- calculationTest('importance_nested', [
- [
- {
- 'name': 'grey',
- 'guid': 15,
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 6
- },
- {
- 'name': 'blue',
- 'guid': 18,
- 'owns': 15,
- 'importance': 1,
- 'size': 14,
- 'expected_size': 14,
- 'expected_effective_size': 1
- },
- {
- 'name': 'purple',
- 'owns': 15,
- 'importance': 2,
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 7
- },
- {
- 'name': 'yellow',
- 'owns': 21,
- 'importance': 3,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 3
- },
- {
- 'name': 'red',
- 'guid': 21,
- 'owns': 18,
- 'size': 12,
- 'expected_size': 12,
- 'expected_effective_size': 1
- },
- {
- 'name': 'green',
- 'owns': 21,
- 'importance': 3,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 2
- }
- ]
- ]);
-
- calculationTest('importance_singleRefinement', [
- [
- {
- 'name': 'v8',
- 'expected_size': 13,
- 'expected_effective_size': 13,
- 'children': [
- {
- 'name': 'objects',
- 'owns': 1,
- 'size': 11,
- 'expected_size': 11,
- 'expected_effective_size': 11,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 4,
- 'expected_effective_size': 4
- },
- {
- 'name': 'object1',
- 'owns': 2,
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 7
- }
- ]
- },
- {
- 'name': 'heaps',
- 'guid': 1,
- 'size': 13,
- 'expected_size': 13,
- 'expected_effective_size': 2,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 11
- },
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 3,
- 'expected_effective_size': 1
- },
- {
- 'name': 'heap1',
- 'guid': 2,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 1,
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- calculationTest('importance_sharedRefinement', [
- [ // GMD.
- {
- 'name': 'shared_bitmap',
- 'guid': 0,
- 'size': 23,
- 'expected_size': 23,
- 'expected_effective_size': 5,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 13,
- 'expected_effective_size': 13 * 5 / (13 + 3)
- },
- {
- 'name': 'bitmap0x7',
- 'guid': 999,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 3 * 5 / (13 + 3),
- }
- ]
- }
- ],
- [ // PMD1.
- {
- 'name': 'tile_manager',
- 'owns': 0,
- 'importance': 2,
- 'size': 12,
- 'expected_size': 12,
- 'expected_effective_size': 5 + 2,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 5,
- 'expected_effective_size': 5
- },
- {
- 'name': 'tile42',
- 'owns': 999,
- 'importance': 1,
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 2,
- }
- ]
- }
- ],
- [ // PMD2.
- {
- 'name': 'gpu',
- 'owns': 0,
- 'importance': 1,
- 'size': 16,
- 'expected_size': 16,
- 'expected_effective_size': 6 + 5,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 11,
- 'expected_effective_size': 6
- },
- {
- 'name': 'chunk-3.14',
- 'owns': 999,
- 'importance': 2,
- 'size': 5,
- 'expected_size': 5,
- 'expected_effective_size': 5,
- }
- ]
- }
- ]
- ]);
-
- // Example taken from https://goo.gl/fKg0dt.
- calculationTest('documentationExample', [
- [ // GMD, Global (shared) memory.
- {
- 'name': 'unknown',
- 'guid': 2,
- 'expected_size': 16,
- 'expected_effective_size': 0,
- }
- ],
- [ // PMD1, Browser process.
- {
- 'name': 'sharedbitmap',
- 'size': 17,
- 'expected_size': 17,
- 'expected_effective_size': 9,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 1,
- 'expected_effective_size': 1
- },
- {
- 'name': '0x7',
- 'size': 16,
- 'expected_size': 16,
- 'expected_effective_size': 8,
- 'owns': 2,
- 'importance': 1,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 16,
- 'expected_effective_size': 8
- },
- {
- 'name': 'y'
- }
- ]
- }
- ]
- }
- ],
- [ // PMD2, Renderer process.
- {
- 'name': 'v8',
- 'expected_size': 13,
- 'expected_effective_size': 13,
- 'children': [
- {
- 'name': 'heaps',
- 'guid': 100,
- 'expected_size': 12,
- 'expected_effective_size': 3,
- 'expected_owned_by_sibling_sizes': {
- 'objects': 9
- },
- 'children': [
- {
- 'name': '1',
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 2,
- 'owns': 2,
- 'importance': 2
- },
- {
- 'name': '2',
- 'expected_size': 4,
- 'expected_effective_size': 1,
- 'size': 4
- }
- ]
- },
- {
- 'name': 'objects',
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 10,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 1,
- 'expected_effective_size': 1
- },
- {
- 'name': 'strings',
- 'size': 9,
- 'expected_size': 9,
- 'expected_effective_size': 9,
- 'owns': 100
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- // This should never happen. Nevertheless, this test checks that we can
- // handle invalid sizes (parent dump being smaller than its aggregated
- // children and owned dump being smaller than its largest owner) gracefully.
- calculationTest('invalidSizes', [
- [
- {
- 'name': 'root1',
- 'size': 24,
- 'expected_size': 24,
- 'expected_effective_size': 4,
- 'children': [
- {
- 'name': '<unspecified>',
- 'skip_build': true,
- 'expected_size': 4,
- 'expected_effective_size': 4
- },
- {
- 'name': 'parent',
- 'guid': 2,
- 'size': 17, // Invalid: child has larger size.
- 'expected_size': 20,
- 'expected_infos': [
- {
- type: PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN,
- providedSize: 17,
- dependencySize: 20
- },
- {
- type: PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER,
- providedSize: 17,
- dependencySize: 18
- }
- ],
- 'expected_effective_size': 0,
- 'children': [
- {
- 'name': 'child',
- 'guid': 1,
- 'size': 10, // Invalid: owner has larger size.
- 'expected_size': 20,
- 'expected_infos': [
- {
- type: PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER,
- providedSize: 10,
- dependencySize: 20
- }
- ],
- 'expected_effective_size': 0,
- }
- ]
- }
- ]
- },
- {
- 'name': 'root2',
- 'owns': 1,
- 'size': 20,
- 'expected_size': 20,
- 'expected_effective_size': 20
- },
- {
- 'name': 'root3',
- 'owns': 2,
- 'importance': -1,
- 'size': 18,
- 'expected_size': 18,
- 'expected_effective_size': 18
- }
- ]
- ]);
-
- calculationTest('multipleInfos', [
- [
- {
- 'name': 'root',
- 'expected_size': 10,
- 'expected_effective_size': 10,
- 'children': [
- {
- 'name': 'parent1',
- 'size': 5,
- 'expected_size': 10,
- 'expected_infos': [
- {
- type: PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN,
- providedSize: 5,
- dependencySize: 10
- }
- ],
- 'expected_effective_size': 1,
- 'expected_owned_by_sibling_sizes': {
- 'parent2': 17,
- 'parent3': 7
- },
- 'children': [
- {
- 'name': 'child',
- 'guid': 3,
- 'size': 10,
- 'expected_size': 10,
- 'expected_effective_size': 1,
- }
- ]
- },
- {
- 'name': 'parent2',
- // NOTE(petrcermak): The expected size here is a little strange
- // because the children both own the same dump (namely
- // root/parent1/child). It would, therefore, probably make more
- // sense for the calculated size to be 9. Since this is an unlikely
- // case and would complicate the (already complex) size
- // calculation, we will now keep the algorithm as is.
- 'expected_size': 17,
- 'expected_effective_size': 14 / 3 + 2,
- 'children': [
- {
- 'name': 'child1',
- 'owns': 3,
- 'size': 9,
- 'expected_size': 9,
- 'expected_effective_size': 7 / 3 + 1 / 2 + 1,
- },
- {
- 'name': 'child2',
- 'owns': 3,
- 'size': 8,
- 'expected_size': 8,
- 'expected_effective_size': 7 / 3 + 1 / 2,
- }
- ]
- },
- {
- 'name': 'parent3',
- 'size': 7,
- 'expected_size': 7,
- 'expected_effective_size': 7 / 3,
- 'owns': 3
- }
- ]
- }
- ]
- ]);
-
- // Check that size calculation is NOT preceded by numeric aggregation, which
- // would recursively sum up size numerics.
- test('finalizeGraph_aggregation', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- buildDumpTrees([
- undefined, // GMD.
- [ // PMD.
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'owner_child',
- 'owns': 9,
- 'size': 7
- },
- {
- 'name': 'owned_child',
- 'guid': 9,
- 'size': 20
- }
- ]
- }
- ]
- ], model);
- });
- var pmd = model.getProcess(0).memoryDumps[0];
-
- var rootDump = pmd.getMemoryAllocatorDumpByFullName('root');
- assertDumpSizes(rootDump, 20, 20);
-
- var ownerChildDump = pmd.getMemoryAllocatorDumpByFullName(
- 'root/owner_child');
- assertDumpSizes(ownerChildDump, 7, 7);
-
- var ownedChildDump = pmd.getMemoryAllocatorDumpByFullName(
- 'root/owned_child');
- assertDumpSizes(ownedChildDump, 20, 13, [] /* expectedInfos */,
- {'owner_child': 7} /* expectedOwnedBySiblingSizes */);
- });
-
- // Check that numeric and diagnostics propagation and aggregation are
- // performed in the correct order.
- test('finalizeGraph_propagation', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- buildDumpTrees([
- [ // GMD.
- {
- 'name': 'owned_root',
- 'guid': 1,
- 'size': 10,
- 'diagnostics': {
- 'url': 'https://hello.world.com:42'
- },
- 'children': [
- {
- 'name': 'owned_child1',
- 'numerics': {
- 'summed': new ScalarNumeric(sizeInBytes_smallerIsBetter, 12)
- },
- 'diagnostics': {
- 'url2': 'http://not.aggregated.to/owned/parent/dump'
- }
- },
- {
- 'name': 'owned_child2',
- 'numerics': {
- 'summed': new ScalarNumeric(sizeInBytes_smallerIsBetter, 15)
- }
- }
- ]
- }
- ],
- [ // PMD.
- {
- 'name': 'direct_owner',
- 'owns': 1,
- 'guid': 2,
- 'diagnostics': {
- 'url': 'file://not_overriden.html'
- }
- },
- {
- 'name': 'parent_owner',
- 'children': [
- {
- 'name': 'child_owner',
- 'owns': 1
- },
- {
- 'name': 'sibling',
- 'size': 5,
- 'numerics': {
- 'summed': new ScalarNumeric(sizeInBytes_smallerIsBetter, 13)
- }
- }
- ]
- },
- {
- 'name': 'precedent_owner',
- 'owns': 1,
- 'numerics': {
- 'summed': new ScalarNumeric(sizeInBytes_smallerIsBetter, 0)
- }
- },
- {
- 'name': 'indirect_owner',
- 'owns': 2
- }
- ]
- ], model);
- });
- var pmd = model.getProcess(0).memoryDumps[0];
-
- checkDumpNumericsAndDiagnostics(
- pmd.getMemoryAllocatorDumpByFullName('direct_owner'),
- {
- size: 10,
- effective_size: 3.3333,
- summed: 27
- },
- {
- url: 'file://not_overriden.html'
- });
- checkDumpNumericsAndDiagnostics(
- pmd.getMemoryAllocatorDumpByFullName('parent_owner/child_owner'),
- {
- size: 10,
- effective_size: 3.3333,
- summed: 27
- },
- {
- url: 'https://hello.world.com:42'
- });
- checkDumpNumericsAndDiagnostics(
- pmd.getMemoryAllocatorDumpByFullName('parent_owner'),
- {
- size: 15,
- effective_size: 8.3333,
- summed: 40
- }, {});
- checkDumpNumericsAndDiagnostics(
- pmd.getMemoryAllocatorDumpByFullName('precedent_owner'),
- {
- size: 10,
- effective_size: 3.3333,
- summed: 0
- },
- {
- url: 'https://hello.world.com:42'
- });
- checkDumpNumericsAndDiagnostics(
- pmd.getMemoryAllocatorDumpByFullName('indirect_owner'), {}, {});
- });
-
- // Check that weak dumps are removed before size size calculation.
- test('finalizeGraph_weakDumpRemoval', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- buildDumpTrees([
- undefined, // GMD.
- [ // PMD.
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'directly_weak_child',
- 'weak': true,
- 'guid': 5,
- 'owns': 10,
- 'size': 100
- },
- {
- 'name': 'strong_child',
- 'guid': 10,
- 'size': 120
- },
- {
- 'name': 'indirectly_weak_child',
- 'owns': 5,
- 'size': 70
- },
- {
- 'name': 'separate_weak_child',
- 'weak': true,
- 'size': 300
- }
- ]
- }
- ]
- ], model);
- });
- var pmd = model.getProcess(0).memoryDumps[0];
-
- var rootDump = pmd.getMemoryAllocatorDumpByFullName('root');
- assertDumpSizes(rootDump, 120, 120);
- assert.lengthOf(rootDump.children, 1);
-
- var strongChildDump = pmd.getMemoryAllocatorDumpByFullName(
- 'root/strong_child');
- assertDumpSizes(strongChildDump, 120, 120);
- assert.lengthOf(strongChildDump.ownedBy, 0);
-
- assert.isUndefined(pmd.getMemoryAllocatorDumpByFullName(
- 'root/directly_weak_child'));
- assert.isUndefined(pmd.getMemoryAllocatorDumpByFullName(
- 'root/indirectly_weak_child'));
- assert.isUndefined(pmd.getMemoryAllocatorDumpByFullName(
- 'root/separate_weak_child'));
- });
-
- test('indicesUpdatedCorrectly', function() {
- var gmd, rootDump, childDump;
- var model = tr.c.TestUtils.newModel(function(model) {
- gmd = new GlobalMemoryDump(model, 10);
- model.globalMemoryDumps.push(gmd);
-
- rootDump = newAllocatorDump(gmd, 'root', {numerics: {size: 64}});
- childDump = addChildDump(rootDump, 'child', {numerics: {size: 48}});
-
- gmd.memoryAllocatorDumps = [rootDump];
-
- // Before model is finalized.
- assert.strictEqual(
- gmd.getMemoryAllocatorDumpByFullName('root'), rootDump);
- assert.strictEqual(
- gmd.getMemoryAllocatorDumpByFullName('root/child'), childDump);
- assert.isUndefined(
- gmd.getMemoryAllocatorDumpByFullName('root/<unspecified>'));
- });
-
- // Test sanity check.
- assert.isDefined(gmd);
- assert.isDefined(rootDump);
- assert.isDefined(childDump);
-
- // After model is finalized.
- assert.strictEqual(gmd.getMemoryAllocatorDumpByFullName('root'), rootDump);
- assert.strictEqual(
- gmd.getMemoryAllocatorDumpByFullName('root/child'), childDump);
- var unspecifiedDump =
- gmd.getMemoryAllocatorDumpByFullName('root/<unspecified>');
- assert.strictEqual(unspecifiedDump.fullName, 'root/<unspecified>');
- assert.strictEqual(unspecifiedDump.parent, rootDump);
- assert.strictEqual(rootDump.children[0], unspecifiedDump);
- });
-
- weakDumpRemovalTest('allDumpsNonWeak', [
- [ // GMD.
- {
- 'name': 'malloc',
- 'children': [
- {
- 'name': 'allocated_objects',
- 'children': [
- {
- 'name': 'obj42',
- 'guid': 5,
- 'expected_owned_by_links_count': 2
- }
- ]
- }
- ]
- }
- ],
- undefined, // PMD1.
- [ // PMD2.
- {
- 'name': 'oilpan'
- },
- {
- 'name': 'v8',
- 'children': [
- {
- 'name': 'heaps',
- 'children': [
- {
- 'name': 'S',
- 'owns': 5
- },
- {
- 'name': 'L',
- 'owns': 5
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- weakDumpRemovalTest('weakRootDump', [
- [], // GMD.
- [ // PMD1.
- {
- 'name': 'strong1'
- },
- {
- 'name': 'weak',
- 'weak': true,
- 'expected_removed': true
- },
- {
- 'name': 'strong2'
- }
- ]
- ]);
-
- weakDumpRemovalTest('weakChildDump', [
- [ // GMD.
- {
- 'name': 'root',
- 'children': [
- {
- 'name': 'parent',
- 'children': [
- {
- 'name': 'strong1'
- },
- {
- 'name': 'weak',
- 'weak': true,
- 'expected_removed': true,
- 'children': [
- {
- 'name': 'implicitly-removed'
- }
- ]
- },
- {
- 'name': 'strong2'
- }
- ]
- }
- ]
- }
- ]
- ]);
-
- weakDumpRemovalTest('transitiveOwnerRemoval', [
- [ // GMD.
- {
- 'name': 'not-removed-strong-dump',
- 'guid': 0,
- 'expected_owned_by_links_count': 1
- },
- {
- 'name': 'weak-owned-dump',
- 'guid': 1,
- 'owns': 0,
- 'weak': true,
- 'expected_removed': true
- }
- ],
- [ // PMD1.
- {
- 'name': 'direct-owner-dump',
- 'guid': 2,
- 'owns': 1,
- 'expected_removed': true
- },
- {
- 'name': 'also-not-removed-strong-dump',
- 'owns': 0
- }
- ],
- [ // PMD2.
- {
- 'name': 'indirect-owner-dump',
- 'owns': 2,
- 'expected_removed': true
- }
- ]
- ]);
-
- weakDumpRemovalTest('transitiveDescendantRemoval', [
- [ // GMD.
- {
- 'name': 'A',
- 'owns': 10,
- // A =owns=> B -child-of-> C -> D => E -> F -> G (weak).
- 'expected_removed': true
- },
- {
- 'name': 'D',
- 'owns': 5,
- 'expected_removed': true, // D =owns=> E -child-of-> F -> G (weak).
- 'children': [
- {
- 'name': 'C',
- 'children': [
- {
- 'name': 'B',
- 'guid': 10
- }
- ]
- }
- ]
- }
- ],
- undefined, // PMD1.
- [ // PMD2.
- {
- 'name': 'first-retained-dump',
- 'children': [
- {
- 'name': 'G',
- 'weak': true,
- 'expected_removed': true,
- 'children': [
- {
- 'name': 'F',
- 'children': [
- {
- 'name': 'E',
- 'guid': 5
- }
- ]
- },
- {
- 'name': 'H',
- 'children': [
- {
- 'name': 'I',
- 'children': [
- {
- 'name': 'J',
- 'owns': 2
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ],
- [ // PMD3.
- {
- 'name': 'second-retained-dump',
- 'guid': 2,
- // The only owner (J) is removed because J -child-of-> I -> H ->
- // G (weak).
- 'expected_owned_by_links_count': 0
- }
- ]
- ]);
-
- weakDumpRemovalTest('subownerships', [
- [ // GMD.
- {
- 'name': 'root1',
- 'owns': 20,
- 'expected_removed': true, // root1 =owns=> root2 (weak).
- 'children': [
- {
- 'name': 'child1',
- 'owns': 2
- }
- ]
- },
- {
- 'name': 'root2',
- 'guid': 20,
- 'owns': 30,
- 'weak': true,
- 'expected_removed': true,
- 'children': [
- {
- 'name': 'child2',
- 'guid': 2,
- 'owns': 3
- }
- ]
- },
- {
- 'name': 'root3',
- 'guid': 30,
- 'owns': 40,
- 'expected_owned_by_links_count': 0,
- 'children': [
- {
- 'name': 'child3',
- 'guid': 3,
- 'owns': 4,
- 'weak': true,
- 'expected_removed': true
- }
- ]
- }
- ],
- [ // PMD1.
- {
- 'name': 'root4',
- 'guid': 40,
- 'expected_owned_by_links_count': 1,
- 'children': [
- {
- 'name': 'child4',
- 'guid': 4,
- 'expected_owned_by_links_count': 0
- }
- ]
- }
- ],
- [ // PMD2.
- {
- 'name': 'root5',
- 'owns': 60,
- 'expected_removed': true, // root5 =owns=> root6 => root7 (weak).
- 'children': [
- {
- 'name': 'child5',
- 'owns': 6
- }
- ]
- },
- {
- 'name': 'root6',
- 'guid': 60,
- 'owns': 70,
- 'expected_removed': true, // root6 =owns=> root7 (weak).
- 'children': [
- {
- 'name': 'child6',
- 'guid': 6,
- 'owns': 7
- }
- ]
- },
- {
- 'name': 'root7',
- 'guid': 70,
- 'owns': 40,
- 'weak': true,
- 'expected_removed': true,
- 'children': [
- {
- 'name': 'child7',
- 'guid': 7,
- 'owns': 4
- }
- ]
- }
- ]
- ]);
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/heap_dump.html b/chromium/third_party/catapult/tracing/tracing/model/heap_dump.html
deleted file mode 100644
index d3f4a29dbef..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/heap_dump.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- /**
- * HeapEntry represents a single value describing the state of the heap of an
- * allocator in a single process.
- *
- * An entry specifies how much space (e.g. 19 MiB) was allocated in a
- * particular context, which consists of a codepath (e.g. drawQuad <- draw <-
- * MessageLoop::RunTask) and an object type (e.g. HTMLImportLoader).
- *
- * @{constructor}
- */
- function HeapEntry(heapDump, leafStackFrame, objectTypeName, size, count) {
- this.heapDump = heapDump;
-
- // The leaf stack frame of the associated backtrace (e.g. drawQuad for the
- // drawQuad <- draw <- MessageLoop::RunTask backtrace). If undefined, the
- // backtrace is empty.
- this.leafStackFrame = leafStackFrame;
-
- // The name of the allocated object type (e.g. 'HTMLImportLoader'). If
- // undefined, the entry represents the sum over all object types.
- this.objectTypeName = objectTypeName;
-
- this.size = size;
- this.count = count;
- }
-
- /**
- * HeapDump represents a dump of the heap of an allocator in a single process
- * at a particular timestamp.
- *
- * @{constructor}
- */
- function HeapDump(processMemoryDump, allocatorName) {
- this.processMemoryDump = processMemoryDump;
- this.allocatorName = allocatorName;
- this.entries = [];
- }
-
- HeapDump.prototype = {
- addEntry: function(leafStackFrame, objectTypeName, size, count) {
- var entry = new HeapEntry(
- this, leafStackFrame, objectTypeName, size, count);
- this.entries.push(entry);
- return entry;
- }
- };
-
- return {
- HeapEntry: HeapEntry,
- HeapDump: HeapDump
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/heap_dump_test.html b/chromium/third_party/catapult/tracing/tracing/model/heap_dump_test.html
deleted file mode 100644
index cb3170ad85e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/heap_dump_test.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/heap_dump.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/stack_frame.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
- var StackFrame = tr.model.StackFrame;
- var HeapEntry = tr.model.HeapEntry;
- var HeapDump = tr.model.HeapDump;
-
- test('heapDumps', function() {
- var model = new tr.Model();
- var process = model.getOrCreateProcess(89);
- var gmd = new GlobalMemoryDump(model, 42);
- model.globalMemoryDumps.push(gmd);
- var pmd = new ProcessMemoryDump(gmd, process, 42);
- process.memoryDumps.push(pmd);
-
- var rootFrame = new StackFrame(
- undefined, tr.b.GUID.allocateSimple(), undefined);
- var childFrame = new StackFrame(
- rootFrame, tr.b.GUID.allocateSimple(), 'draw');
- rootFrame.addChild(childFrame);
-
- var dump = new HeapDump(pmd);
- assert.strictEqual(dump.processMemoryDump, pmd);
- assert.lengthOf(dump.entries, 0);
-
- var entry1 = dump.addEntry(childFrame, 'HTMLImportLoader', 1024, undefined);
- assert.strictEqual(entry1.heapDump, dump);
- assert.strictEqual(entry1.leafStackFrame, childFrame);
- assert.strictEqual(entry1.objectTypeName, 'HTMLImportLoader');
- assert.strictEqual(entry1.size, 1024);
- assert.isUndefined(entry1.count);
-
- var entry2 = dump.addEntry(undefined, undefined, 1048576, 42);
- assert.strictEqual(entry2.heapDump, dump);
- assert.isUndefined(entry2.leafStackFrame);
- assert.isUndefined(entry2.objectTypeName);
- assert.strictEqual(entry2.size, 1048576);
- assert.strictEqual(entry2.count, 42);
-
- assert.deepEqual(dump.entries, [entry1, entry2]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_app.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/android_app.html
deleted file mode 100644
index fcd545bfbd5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_app.html
+++ /dev/null
@@ -1,341 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/model/frame.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Class for managing android-specific model meta data,
- * such as rendering apps, and frames rendered.
- */
-tr.exportTo('tr.model.helpers', function() {
- var Frame = tr.model.Frame;
- var Statistics = tr.b.Statistics;
-
- var UI_DRAW_TYPE = {
- NONE: 'none',
- LEGACY: 'legacy',
- MARSHMALLOW: 'marshmallow'
- };
-
- var UI_THREAD_DRAW_NAMES = {
- 'performTraversals': UI_DRAW_TYPE.LEGACY,
- 'Choreographer#doFrame': UI_DRAW_TYPE.MARSHMALLOW
- };
-
- var RENDER_THREAD_DRAW_NAME = 'DrawFrame';
- var RENDER_THREAD_INDEP_DRAW_NAME = 'doFrame';
- var RENDER_THREAD_QUEUE_NAME = 'queueBuffer';
- var RENDER_THREAD_SWAP_NAME = 'eglSwapBuffers';
- var THREAD_SYNC_NAME = 'syncFrameState';
-
- function getSlicesForThreadTimeRanges(threadTimeRanges) {
- var ret = [];
- threadTimeRanges.forEach(function(threadTimeRange) {
- var slices = [];
-
- threadTimeRange.thread.sliceGroup.iterSlicesInTimeRange(
- function(slice) { slices.push(slice); },
- threadTimeRange.start, threadTimeRange.end);
- ret.push.apply(ret, slices);
- });
- return ret;
- }
-
- function makeFrame(threadTimeRanges, surfaceFlinger) {
- var args = {};
- if (surfaceFlinger && surfaceFlinger.hasVsyncs) {
- var start = Statistics.min(threadTimeRanges,
- function(threadTimeRanges) { return threadTimeRanges.start; });
- args['deadline'] = surfaceFlinger.getFrameDeadline(start);
- args['frameKickoff'] = surfaceFlinger.getFrameKickoff(start);
- }
- var events = getSlicesForThreadTimeRanges(threadTimeRanges);
- return new Frame(events, threadTimeRanges, args);
- }
-
- function findOverlappingDrawFrame(renderThread, uiDrawSlice) {
- if (!renderThread)
- return undefined;
-
- // of all top level renderthread slices, find the one that has a 'sync'
- // within the uiDrawSlice
- var overlappingDrawFrame;
- var slices = tr.b.iterateOverIntersectingIntervals(
- renderThread.sliceGroup.slices,
- function(range) { return range.start },
- function(range) { return range.end },
- uiDrawSlice.start,
- uiDrawSlice.end,
- function(rtDrawSlice) {
- if (rtDrawSlice.title === RENDER_THREAD_DRAW_NAME) {
- var rtSyncSlice = rtDrawSlice.findDescendentSlice(THREAD_SYNC_NAME);
- if (rtSyncSlice &&
- rtSyncSlice.start >= uiDrawSlice.start &&
- rtSyncSlice.end <= uiDrawSlice.end) {
- // sync observed which overlaps ui draw. This means the RT draw
- // corresponds to the UI draw
- overlappingDrawFrame = rtDrawSlice;
- }
- }
- });
- return overlappingDrawFrame;
- }
-
- /**
- * Builds an array of {start, end} ranges grouping common work of a frame
- * that occurs just before performTraversals().
- *
- * Only necessary before Choreographer#doFrame tracing existed.
- */
- function getPreTraversalWorkRanges(uiThread) {
- if (!uiThread)
- return [];
-
- // gather all frame work that occurs outside of performTraversals
- var preFrameEvents = [];
- uiThread.sliceGroup.slices.forEach(function(slice) {
- if (slice.title === 'obtainView' ||
- slice.title === 'setupListItem' ||
- slice.title === 'deliverInputEvent' ||
- slice.title === 'RV Scroll')
- preFrameEvents.push(slice);
- });
- uiThread.asyncSliceGroup.slices.forEach(function(slice) {
- if (slice.title === 'deliverInputEvent')
- preFrameEvents.push(slice);
- });
-
- return tr.b.mergeRanges(
- tr.b.convertEventsToRanges(preFrameEvents),
- 3,
- function(events) {
- return {
- start: events[0].min,
- end: events[events.length - 1].max
- };
- });
- }
-
- function getFrameStartTime(traversalStart, preTraversalWorkRanges) {
- var preTraversalWorkRange = tr.b.findClosestIntervalInSortedIntervals(
- preTraversalWorkRanges,
- function(range) { return range.start },
- function(range) { return range.end },
- traversalStart,
- 3);
-
- if (preTraversalWorkRange)
- return preTraversalWorkRange.start;
- return traversalStart;
- }
-
- function getRtFrameEndTime(rtDrawSlice) {
- // First try and get time that frame is queued:
- var rtQueueSlice = rtDrawSlice.findDescendentSlice(
- RENDER_THREAD_QUEUE_NAME);
- if (rtQueueSlice) {
- return rtQueueSlice.end;
- }
- // failing that, end of swapbuffers:
- var rtSwapSlice = rtDrawSlice.findDescendentSlice(RENDER_THREAD_SWAP_NAME);
- if (rtSwapSlice) {
- return rtSwapSlice.end;
- }
- // failing that, end of renderthread frame trace
- return rtDrawSlice.end;
- }
-
- function getUiThreadDrivenFrames(app) {
- if (!app.uiThread)
- return [];
-
- var preTraversalWorkRanges = [];
- if (app.uiDrawType === UI_DRAW_TYPE.LEGACY)
- preTraversalWorkRanges = getPreTraversalWorkRanges(app.uiThread);
-
- var frames = [];
- app.uiThread.sliceGroup.slices.forEach(function(slice) {
- if (!(slice.title in UI_THREAD_DRAW_NAMES)) {
- return;
- }
-
- var threadTimeRanges = [];
- var uiThreadTimeRange = {
- thread: app.uiThread,
- start: getFrameStartTime(slice.start, preTraversalWorkRanges),
- end: slice.end
- };
- threadTimeRanges.push(uiThreadTimeRange);
-
- // on SDK 21+ devices with RenderThread,
- // account for time taken on RenderThread
- var rtDrawSlice = findOverlappingDrawFrame(
- app.renderThread, slice);
- if (rtDrawSlice) {
- var rtSyncSlice = rtDrawSlice.findDescendentSlice(THREAD_SYNC_NAME);
- if (rtSyncSlice) {
- // Generally, the UI thread is only on the critical path
- // until the start of sync.
- uiThreadTimeRange.end = Math.min(uiThreadTimeRange.end,
- rtSyncSlice.start);
- }
-
- threadTimeRanges.push({
- thread: app.renderThread,
- start: rtDrawSlice.start,
- end: getRtFrameEndTime(rtDrawSlice)
- });
- }
- frames.push(makeFrame(threadTimeRanges, app.surfaceFlinger));
- });
- return frames;
- }
-
- function getRenderThreadDrivenFrames(app) {
- if (!app.renderThread)
- return [];
-
- var frames = [];
- app.renderThread.sliceGroup.getSlicesOfName(RENDER_THREAD_INDEP_DRAW_NAME)
- .forEach(function(slice) {
- var threadTimeRanges = [{
- thread: app.renderThread,
- start: slice.start,
- end: slice.end
- }];
- frames.push(makeFrame(threadTimeRanges, app.surfaceFlinger));
- });
- return frames;
- }
-
- function getUiDrawType(uiThread) {
- if (!uiThread)
- return UI_DRAW_TYPE.NONE;
-
- var slices = uiThread.sliceGroup.slices;
- for (var i = 0; i < slices.length; i++) {
- if (slices[i].title in UI_THREAD_DRAW_NAMES) {
- return UI_THREAD_DRAW_NAMES[slices[i].title];
- }
- }
- return UI_DRAW_TYPE.NONE;
- }
-
- function getInputSamples(process) {
- var samples = undefined;
- for (var counterName in process.counters) {
- if (/^android\.aq\:pending/.test(counterName) &&
- process.counters[counterName].numSeries === 1) {
- samples = process.counters[counterName].series[0].samples;
- break;
- }
- }
-
- if (!samples)
- return [];
-
- // output rising edges only, since those are user inputs
- var inputSamples = [];
- var lastValue = 0;
- samples.forEach(function(sample) {
- if (sample.value > lastValue) {
- inputSamples.push(sample);
- }
- lastValue = sample.value;
- });
- return inputSamples;
- }
-
- function getAnimationAsyncSlices(uiThread) {
- if (!uiThread)
- return [];
-
- var slices = [];
- for (var slice of uiThread.asyncSliceGroup.getDescendantEvents()) {
- if (/^animator\:/.test(slice.title))
- slices.push(slice);
- }
- return slices;
- }
-
- /**
- * Model for Android App specific data.
- * @constructor
- */
- function AndroidApp(process, uiThread, renderThread, surfaceFlinger,
- uiDrawType) {
- this.process = process;
- this.uiThread = uiThread;
- this.renderThread = renderThread;
- this.surfaceFlinger = surfaceFlinger;
- this.uiDrawType = uiDrawType;
-
- this.frames_ = undefined;
- this.inputs_ = undefined;
- }
-
- AndroidApp.createForProcessIfPossible = function(process, surfaceFlinger) {
- var uiThread = process.getThread(process.pid);
- var uiDrawType = getUiDrawType(uiThread);
- if (uiDrawType === UI_DRAW_TYPE.NONE) {
- uiThread = undefined;
- }
- var renderThreads = process.findAllThreadsNamed('RenderThread');
- var renderThread = (renderThreads.length === 1 ?
- renderThreads[0] : undefined);
-
- if (uiThread || renderThread) {
- return new AndroidApp(process, uiThread, renderThread, surfaceFlinger,
- uiDrawType);
- }
- };
-
- AndroidApp.prototype = {
- /**
- * Returns a list of all frames in the trace for the app,
- * constructed on first query.
- */
- getFrames: function() {
- if (!this.frames_) {
- var uiFrames = getUiThreadDrivenFrames(this);
- var rtFrames = getRenderThreadDrivenFrames(this);
- this.frames_ = uiFrames.concat(rtFrames);
-
- // merge frames by sorting by end timestamp
- this.frames_.sort(function(a, b) { a.end - b.end });
- }
- return this.frames_;
- },
-
- /**
- * Returns list of CounterSamples for each input event enqueued to the app.
- */
- getInputSamples: function() {
- if (!this.inputs_) {
- this.inputs_ = getInputSamples(this.process);
- }
- return this.inputs_;
- },
-
- getAnimationAsyncSlices: function() {
- if (!this.animations_) {
- this.animations_ = getAnimationAsyncSlices(this.uiThread);
- }
- return this.animations_;
- }
- };
-
- return {
- AndroidApp: AndroidApp
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper.html
deleted file mode 100644
index c0b3d5ce5bb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/core/auditor.html">
-<link rel="import" href="/tracing/model/helpers/android_app.html">
-<link rel="import" href="/tracing/model/helpers/android_surface_flinger.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Class for managing android-specific model meta data,
- * such as rendering apps, frames rendered, and SurfaceFlinger.
- */
-tr.exportTo('tr.model.helpers', function() {
- var AndroidApp = tr.model.helpers.AndroidApp;
- var AndroidSurfaceFlinger = tr.model.helpers.AndroidSurfaceFlinger;
-
- var IMPORTANT_SURFACE_FLINGER_SLICES = {
- 'doComposition' : true,
- 'updateTexImage' : true,
- 'postFramebuffer' : true
- };
- var IMPORTANT_UI_THREAD_SLICES = {
- 'Choreographer#doFrame' : true,
- 'performTraversals' : true,
- 'deliverInputEvent' : true
- };
- var IMPORTANT_RENDER_THREAD_SLICES = {
- 'doFrame' : true
- };
-
- function iterateImportantThreadSlices(thread, important, callback) {
- if (!thread)
- return;
-
- thread.sliceGroup.slices.forEach(function(slice) {
- if (slice.title in important)
- callback(slice);
- });
- }
-
- /**
- * Model for Android-specific data.
- * @constructor
- */
- function AndroidModelHelper(model) {
- this.model = model;
- this.apps = [];
- this.surfaceFlinger = undefined;
-
- var processes = model.getAllProcesses();
- for (var i = 0; i < processes.length && !this.surfaceFlinger; i++) {
- this.surfaceFlinger =
- AndroidSurfaceFlinger.createForProcessIfPossible(processes[i]);
- }
-
- model.getAllProcesses().forEach(function(process) {
- var app = AndroidApp.createForProcessIfPossible(
- process, this.surfaceFlinger);
- if (app)
- this.apps.push(app);
- }, this);
- };
-
- AndroidModelHelper.guid = tr.b.GUID.allocateSimple();
-
- AndroidModelHelper.supportsModel = function(model) {
- return true;
- };
-
- AndroidModelHelper.prototype = {
- iterateImportantSlices: function(callback) {
- if (this.surfaceFlinger) {
- iterateImportantThreadSlices(
- this.surfaceFlinger.thread,
- IMPORTANT_SURFACE_FLINGER_SLICES,
- callback);
- }
-
- this.apps.forEach(function(app) {
- iterateImportantThreadSlices(
- app.uiThread,
- IMPORTANT_UI_THREAD_SLICES,
- callback);
- iterateImportantThreadSlices(
- app.renderThread,
- IMPORTANT_RENDER_THREAD_SLICES,
- callback);
- });
- }
- };
-
- return {
- AndroidModelHelper: AndroidModelHelper
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper_test.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper_test.html
deleted file mode 100644
index 9d9de28ed46..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_model_helper_test.html
+++ /dev/null
@@ -1,266 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/android/android_auditor.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AndroidModelHelper = tr.model.helpers.AndroidModelHelper;
- var newAsyncSliceNamed = tr.c.TestUtils.newAsyncSliceNamed;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newCounterNamed = tr.c.TestUtils.newCounterNamed;
- var newCounterSeries = tr.c.TestUtils.newCounterSeries;
-
- function createSurfaceFlinger(model, vsyncCallback) {
- if (model.getProcess(2))
- throw new Error('process already exists');
-
- var sfProcess = model.getOrCreateProcess(2);
- var sfThread = sfProcess.getOrCreateThread(2); // main thread, tid = pid
- sfThread.name = '/system/bin/surfaceflinger';
-
- // ensure slicegroup has data
- sfThread.sliceGroup.pushSlice(newSliceEx({
- title: 'doComposition',
- start: 8,
- duration: 2
- }));
-
- vsyncCallback(sfProcess);
- }
-
- function createSurfaceFlingerWithVsync(model) {
- createSurfaceFlinger(model, function(sfProcess) {
- var counter = sfProcess.getOrCreateCounter('android', 'VSYNC');
- var series = newCounterSeries();
- for (var i = 0; i <= 10; i++) {
- series.addCounterSample(i * 10, i % 2);
- }
- counter.addSeries(series);
- });
- }
-
- /*
- * List of customizeModelCallbacks which produce different 80ms frames,
- * each starting at 10ms, and with a single important slice
- */
- var SINGLE_FRAME_CUSTOM_MODELS = [
- function(model) {
- // UI thread only
- var uiThread = model.getOrCreateProcess(120).getOrCreateThread(120);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 10, duration: 80}));
-
- model.uiThread = uiThread;
- },
-
- function(model) {
- // RenderThread only
- var renderThread = model.getOrCreateProcess(120).getOrCreateThread(200);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'doFrame', start: 10, duration: 80}));
-
- model.renderThread = renderThread;
- },
-
- function(model) {
- var uiThread = model.getOrCreateProcess(120).getOrCreateThread(120);
-
- // UI thread time - 19 (from 10 to 29, ignored after)
- uiThread.asyncSliceGroup.push(
- newAsyncSliceNamed('deliverInputEvent', 10, 9, uiThread, uiThread));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 20, duration: 110}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'draw', start: 20, duration: 108}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'Record View#draw()', start: 20, duration: 8}));
-
- // RenderThread time - 61 (from 29 to 90, ignored after)
- var renderThread = model.getOrCreateProcess(120).getOrCreateThread(200);
- renderThread.name = 'RenderThread';
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'DrawFrame', start: 29, duration: 70}));
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'syncFrameState', start: 29, duration: 1}));
- renderThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'queueBuffer', start: 89, duration: 1}));
-
- model.uiThread = uiThread;
- model.renderThread = renderThread;
- }
- ];
-
- test('getThreads', function() {
- SINGLE_FRAME_CUSTOM_MODELS.forEach(function(customizeModelCallback) {
- var model = tr.c.TestUtils.newModel(customizeModelCallback);
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- assert.equal(helper.apps[0].uiThread, model.uiThread);
- assert.equal(helper.apps[0].renderThread, model.renderThread);
- });
- });
-
- test('iterateImportantSlices', function() {
- SINGLE_FRAME_CUSTOM_MODELS.forEach(function(customizeModelCallback) {
- var model = tr.c.TestUtils.newModel(customizeModelCallback);
- var helper = model.getOrCreateHelper(AndroidModelHelper);
-
- var seen = 0;
- helper.iterateImportantSlices(function(importantSlice) {
- assert.isTrue(importantSlice instanceof tr.model.Slice);
- seen++;
- });
- assert.equal(seen, 1);
- });
- });
-
- test('getFrames', function() {
- SINGLE_FRAME_CUSTOM_MODELS.forEach(function(customizeModelCallback) {
- var model = tr.c.TestUtils.newModel(customizeModelCallback);
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- assert.equal(helper.apps.length, 1);
-
- var frames = helper.apps[0].getFrames();
- assert.equal(frames.length, 1);
- assert.closeTo(frames[0].totalDuration, 80, 1e-5);
-
- assert.closeTo(frames[0].start, 10, 1e-5);
- assert.closeTo(frames[0].end, 90, 1e-5);
- });
- });
-
- test('surfaceFlingerVsyncs', function() {
- var model = tr.c.TestUtils.newModel(createSurfaceFlingerWithVsync);
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- assert.isTrue(helper.surfaceFlinger.hasVsyncs);
-
- // test querying the vsyncs
- assert.closeTo(helper.surfaceFlinger.getFrameKickoff(5), 0, 1e-5);
- assert.closeTo(helper.surfaceFlinger.getFrameDeadline(95), 100, 1e-5);
-
- assert.closeTo(helper.surfaceFlinger.getFrameKickoff(10), 10, 1e-5);
- assert.closeTo(helper.surfaceFlinger.getFrameDeadline(90), 100, 1e-5);
-
- // test undefined behavior outside of vsyncs.
- assert.isUndefined(helper.surfaceFlinger.getFrameKickoff(-5));
- assert.isUndefined(helper.surfaceFlinger.getFrameDeadline(105));
- });
-
- test('surfaceFlingerShiftedVsyncs', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- createSurfaceFlinger(model, function(sfProcess) {
- var appSeries = newCounterSeries();
- var sfSeries = newCounterSeries();
- for (var i = 0; i <= 10; i++) {
- // SF vsync is 4ms after app
- appSeries.addCounterSample(i * 16, i % 2);
- sfSeries.addCounterSample(i * 16 + 4, i % 2);
- }
- sfProcess.getOrCreateCounter('android', 'VSYNC-sf')
- .addSeries(sfSeries);
- sfProcess.getOrCreateCounter('android', 'VSYNC-app')
- .addSeries(appSeries);
- });
- });
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- assert.isTrue(helper.surfaceFlinger.hasVsyncs);
-
- // test querying the vsyncs - Frames should have 20ms window
- assert.closeTo(helper.surfaceFlinger.getFrameKickoff(0), 0, 1e-5);
- assert.closeTo(helper.surfaceFlinger.getFrameDeadline(0), 20, 1e-5);
-
- assert.closeTo(helper.surfaceFlinger.getFrameKickoff(16), 16, 1e-5);
- assert.closeTo(helper.surfaceFlinger.getFrameDeadline(16), 36, 1e-5);
-
- // test undefined behavior outside of vsyncs.
- assert.isUndefined(helper.surfaceFlinger.getFrameKickoff(-5));
- assert.isUndefined(helper.surfaceFlinger.getFrameDeadline(165));
- });
-
- test('frameVsyncInterop', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- // app - 3 good, 3 bad frames
- var uiThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 1, duration: 8}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 10, duration: 8}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 20, duration: 8}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 31, duration: 11}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 45, duration: 6}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 60, duration: 20}));
-
- // surface flinger - vsync every 10ms
- createSurfaceFlingerWithVsync(model);
- });
- var helper = model.getOrCreateHelper(AndroidModelHelper);
-
- var frames = helper.apps[0].getFrames();
- assert.equal(frames.length, 6);
- for (var i = 0; i < 6; i++) {
- var shouldMissDeadline = i >= 3;
- var missedDeadline = frames[i].args['deadline'] < frames[i].end;
- assert.equal(shouldMissDeadline, missedDeadline);
- }
- });
-
- test('appInputs', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(120);
- var uiThread = process.getOrCreateThread(120);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 20, duration: 4}));
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 40, duration: 4}));
-
- var counter = process.getOrCreateCounter('android', 'aq:pending:foo');
- var series = newCounterSeries();
- series.addCounterSample(10, 1);
- series.addCounterSample(20, 0);
- series.addCounterSample(30, 1);
- series.addCounterSample(40, 2);
- series.addCounterSample(50, 0);
- counter.addSeries(series);
- });
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- assert.equal(helper.apps.length, 1);
-
- var inputSamples = helper.apps[0].getInputSamples();
- assert.equal(inputSamples.length, 3);
- assert.equal(inputSamples[0].timestamp, 10);
- assert.equal(inputSamples[1].timestamp, 30);
- assert.equal(inputSamples[2].timestamp, 40);
- });
-
- test('appAnimations', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(120);
- var uiThread = process.getOrCreateThread(120);
- uiThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'performTraversals', start: 10, duration: 10}));
- uiThread.asyncSliceGroup.push(newAsyncSliceNamed('animator:foo', 0, 10,
- uiThread, uiThread));
- });
- var helper = model.getOrCreateHelper(AndroidModelHelper);
- assert.equal(helper.apps.length, 1);
-
- var animations = helper.apps[0].getAnimationAsyncSlices();
- assert.equal(animations.length, 1);
- assert.equal(animations[0].start, 0);
- assert.equal(animations[0].end, 10);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_surface_flinger.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/android_surface_flinger.html
deleted file mode 100644
index 2a71afec94b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/android_surface_flinger.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Class for representing SurfaceFlinger process and its Vsyncs.
- */
-tr.exportTo('tr.model.helpers', function() {
- var findLowIndexInSortedArray = tr.b.findLowIndexInSortedArray;
-
- var VSYNC_SF_NAME = 'android.VSYNC-sf';
- var VSYNC_APP_NAME = 'android.VSYNC-app';
- var VSYNC_FALLBACK_NAME = 'android.VSYNC';
-
- // when sampling vsync, push samples back by this much to ensure
- // frame start samples *between* vsyncs
- var TIMESTAMP_FUDGE_MS = 0.01;
-
- function getVsyncTimestamps(process, counterName) {
-
- var vsync = process.counters[counterName];
- if (!vsync)
- vsync = process.counters[VSYNC_FALLBACK_NAME];
-
- if (vsync && vsync.numSeries === 1 && vsync.numSamples > 1)
- return vsync.series[0].timestamps;
- return undefined;
- }
-
- /**
- * Model for SurfaceFlinger specific data.
- * @constructor
- */
- function AndroidSurfaceFlinger(process, thread) {
- this.process = process;
- this.thread = thread;
-
- this.appVsync_ = undefined;
- this.sfVsync_ = undefined;
-
- this.appVsyncTimestamps_ = getVsyncTimestamps(process, VSYNC_APP_NAME);
- this.sfVsyncTimestamps_ = getVsyncTimestamps(process, VSYNC_SF_NAME);
-
- // separation of vsync of app vs sf - assume app has at least window of 5ms
- this.deadlineDelayMs_ =
- this.appVsyncTimestamps_ !== this.sfVsyncTimestamps_ ?
- 5 : TIMESTAMP_FUDGE_MS;
- }
-
- AndroidSurfaceFlinger.createForProcessIfPossible = function(process) {
- var mainThread = process.getThread(process.pid);
-
- // newer versions - main thread, lowercase name, preceeding forward slash
- if (mainThread && mainThread.name &&
- /surfaceflinger/.test(mainThread.name))
- return new AndroidSurfaceFlinger(process, mainThread);
-
- // older versions - another thread is named SurfaceFlinger
- var primaryThreads = process.findAllThreadsNamed('SurfaceFlinger');
- if (primaryThreads.length === 1)
- return new AndroidSurfaceFlinger(process, primaryThreads[0]);
- return undefined;
- };
-
- AndroidSurfaceFlinger.prototype = {
- get hasVsyncs() {
- return !!this.appVsyncTimestamps_ && !!this.sfVsyncTimestamps_;
- },
-
- getFrameKickoff: function(timestamp) {
- if (!this.hasVsyncs)
- throw new Error('cannot query vsync info without vsyncs');
-
- var firstGreaterIndex =
- findLowIndexInSortedArray(this.appVsyncTimestamps_,
- function(x) { return x; },
- timestamp + TIMESTAMP_FUDGE_MS);
-
- if (firstGreaterIndex < 1)
- return undefined;
- return this.appVsyncTimestamps_[firstGreaterIndex - 1];
- },
-
- getFrameDeadline: function(timestamp) {
- if (!this.hasVsyncs)
- throw new Error('cannot query vsync info without vsyncs');
-
- var firstGreaterIndex =
- findLowIndexInSortedArray(this.sfVsyncTimestamps_,
- function(x) { return x; },
- timestamp + this.deadlineDelayMs_);
- if (firstGreaterIndex >= this.sfVsyncTimestamps_.length)
- return undefined;
- return this.sfVsyncTimestamps_[firstGreaterIndex];
- }
- };
-
- return {
- AndroidSurfaceFlinger: AndroidSurfaceFlinger
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper.html
deleted file mode 100644
index d958d69f4d1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/helpers/chrome_process_helper.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Utilities for accessing trace data about the Chrome browser.
- */
-tr.exportTo('tr.model.helpers', function() {
- function ChromeBrowserHelper(modelHelper, process) {
- tr.model.helpers.ChromeProcessHelper.call(this, modelHelper, process);
- this.mainThread_ = process.findAtMostOneThreadNamed('CrBrowserMain');
- if (!process.name)
- process.name = ChromeBrowserHelper.PROCESS_NAME;
- }
-
- ChromeBrowserHelper.PROCESS_NAME = 'Browser';
-
- ChromeBrowserHelper.isBrowserProcess = function(process) {
- return !!process.findAtMostOneThreadNamed('CrBrowserMain');
- };
-
- ChromeBrowserHelper.prototype = {
- __proto__: tr.model.helpers.ChromeProcessHelper.prototype,
-
- // TODO(petrcermak): Pass browser name in a metadata event (see
- // crbug.com/605088).
- get browserName() {
- var hasInProcessRendererThread = this.process.findAllThreadsNamed(
- 'Chrome_InProcRendererThread').length > 0;
- return hasInProcessRendererThread ? 'webview' : 'chrome';
- },
-
- get rendererHelpers() {
- return this.modelHelper.rendererHelpers;
- },
-
- getLoadingEventsInRange: function(rangeOfInterest) {
- return this.getAllAsyncSlicesMatching(function(slice) {
- return slice.title.indexOf('WebContentsImpl Loading') === 0 &&
- rangeOfInterest.intersectsExplicitRangeInclusive(
- slice.start, slice.end);
- });
- },
-
- getCommitProvisionalLoadEventsInRange: function(rangeOfInterest) {
- return this.getAllAsyncSlicesMatching(function(slice) {
- return slice.title === 'RenderFrameImpl::didCommitProvisionalLoad' &&
- rangeOfInterest.intersectsExplicitRangeInclusive(
- slice.start, slice.end);
- });
- },
-
- get hasLatencyEvents() {
- var hasLatency = false;
- for (var thread of this.modelHelper.model.getAllThreads())
- for (var event of thread.getDescendantEvents()) {
- if (!event.isTopLevel)
- continue;
- if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice))
- continue;
- hasLatency = true;
- }
- return hasLatency;
- },
-
- getLatencyEventsInRange: function(rangeOfInterest) {
- return this.getAllAsyncSlicesMatching(function(slice) {
- return (slice.title.indexOf('InputLatency') === 0) &&
- rangeOfInterest.intersectsExplicitRangeInclusive(
- slice.start, slice.end);
- });
- },
-
- getAllAsyncSlicesMatching: function(pred, opt_this) {
- var events = [];
- this.iterAllThreads(function(thread) {
- for (var slice of thread.getDescendantEvents())
- if (pred.call(opt_this, slice))
- events.push(slice);
- });
- return events;
- },
-
- getAllNetworkEventsInRange: function(rangeOfInterest) {
- var networkEvents = [];
- this.modelHelper.model.getAllThreads().forEach(function(thread) {
- thread.asyncSliceGroup.slices.forEach(function(slice) {
- var match = false;
- if (slice.category === 'net' || // old-style URLRequest/Resource
- slice.category === 'disabled-by-default-netlog' ||
- slice.category === 'netlog') {
- match = true;
- }
-
- if (!match)
- return;
-
- if (rangeOfInterest.intersectsExplicitRangeInclusive(
- slice.start, slice.end))
- networkEvents.push(slice);
- });
- });
- return networkEvents;
- },
-
- iterAllThreads: function(func, opt_this) {
- tr.b.iterItems(this.process.threads, function(tid, thread) {
- func.call(opt_this, thread);
- });
-
- tr.b.iterItems(this.rendererHelpers, function(pid, rendererHelper) {
- var rendererProcess = rendererHelper.process;
- tr.b.iterItems(rendererProcess.threads, function(tid, thread) {
- func.call(opt_this, thread);
- });
- }, this);
- }
- };
-
- return {
- ChromeBrowserHelper: ChromeBrowserHelper
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper_test.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper_test.html
deleted file mode 100644
index eba20ad50af..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_browser_helper_test.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/helpers/chrome_browser_helper.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var INPUT_TYPE = tr.e.cc.INPUT_EVENT_TYPE_NAMES;
-
- function getRange(min, max) {
- var range = new tr.b.Range();
- range.min = min;
- range.max = max;
- return range;
- }
-
- test('LoadingEvent', function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(function() { });
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- tr.e.chrome.ChromeTestUtils.addLoadingEvent(model, {start: 1, end: 10});
- assert.equal(1, modelHelper.browserHelper.getLoadingEventsInRange(
- getRange(0, 100)).length);
- });
-
- test('ProvisionalLoadEvent', function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(function() { });
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- tr.e.chrome.ChromeTestUtils.addCommitLoadEvent(model, {start: 1, end: 10});
- assert.equal(1,
- modelHelper.browserHelper.getCommitProvisionalLoadEventsInRange(
- getRange(0, 100)).length);
- });
-
- test('LatencyEvent', function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(function() { });
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- tr.e.chrome.ChromeTestUtils.addInputEvent(
- model, INPUT_TYPE.UNKNOWN, {start: 1, end: 10});
- assert.equal(1, modelHelper.browserHelper.getLatencyEventsInRange(
- getRange(0, 100)).length);
- });
-
- test('NetworkEvent', function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(function() { });
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- tr.e.chrome.ChromeTestUtils.addNetworkEvent(model, {start: 1, end: 10});
- assert.equal(1, modelHelper.browserHelper.getAllNetworkEventsInRange(
- getRange(0, 100)).length);
- });
-
- test('browserName_chrome', function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(function() { });
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- assert.strictEqual(modelHelper.browserHelper.browserName, 'chrome');
- });
-
- test('browserName_webview', function() {
- var model = tr.e.chrome.ChromeTestUtils.newChromeModel(function() { });
- model.browserProcess.getOrCreateThread(42).name =
- 'Chrome_InProcRendererThread';
- var modelHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- assert.strictEqual(modelHelper.browserHelper.browserName, 'webview');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_gpu_helper.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_gpu_helper.html
deleted file mode 100644
index 0683fde1b53..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_gpu_helper.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/model/helpers/chrome_process_helper.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Utilities for accessing the Chrome GPU Process.
- */
-tr.exportTo('tr.model.helpers', function() {
- function ChromeGpuHelper(modelHelper, process) {
- tr.model.helpers.ChromeProcessHelper.call(this, modelHelper, process);
- this.mainThread_ = process.findAtMostOneThreadNamed('CrGpuMain');
- if (!process.name)
- process.name = ChromeGpuHelper.PROCESS_NAME;
- };
-
- ChromeGpuHelper.PROCESS_NAME = 'GPU Process';
-
- ChromeGpuHelper.isGpuProcess = function(process) {
- // In some android builds the GPU thread is not in a separate process.
- if (process.findAtMostOneThreadNamed('CrBrowserMain') ||
- process.findAtMostOneThreadNamed('CrRendererMain'))
- return false;
- return process.findAtMostOneThreadNamed('CrGpuMain');
- };
-
- ChromeGpuHelper.prototype = {
- __proto__: tr.model.helpers.ChromeProcessHelper.prototype,
-
- get mainThread() {
- return this.mainThread_;
- }
- };
-
- return {
- ChromeGpuHelper: ChromeGpuHelper
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper.html
deleted file mode 100644
index d8276068b1e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/helpers/chrome_browser_helper.html">
-<link rel="import" href="/tracing/model/helpers/chrome_gpu_helper.html">
-<link rel="import" href="/tracing/model/helpers/chrome_renderer_helper.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Utilities for accessing trace data about the Chrome browser.
- */
-tr.exportTo('tr.model.helpers', function() {
- function findChromeBrowserProcesses(model) {
- return model.getAllProcesses(
- tr.model.helpers.ChromeBrowserHelper.isBrowserProcess);
- }
-
- function findChromeRenderProcesses(model) {
- return model.getAllProcesses(
- tr.model.helpers.ChromeRendererHelper.isRenderProcess);
- }
-
- function findChromeGpuProcess(model) {
- var gpuProcesses = model.getAllProcesses(
- tr.model.helpers.ChromeGpuHelper.isGpuProcess);
- if (gpuProcesses.length !== 1)
- return undefined;
- return gpuProcesses[0];
- }
-
- /**
- * @constructor
- */
- function ChromeModelHelper(model) {
- this.model_ = model;
-
- // Find browserHelpers.
- var browserProcesses = findChromeBrowserProcesses(model);
- this.browserHelpers_ = browserProcesses.map(
- p => new tr.model.helpers.ChromeBrowserHelper(this, p));
-
- // Find gpuHelper.
- var gpuProcess = findChromeGpuProcess(model);
- if (gpuProcess) {
- this.gpuHelper_ = new tr.model.helpers.ChromeGpuHelper(
- this, gpuProcess);
- } else {
- this.gpuHelper_ = undefined;
- }
-
- // Find rendererHelpers.
- var rendererProcesses_ = findChromeRenderProcesses(model);
-
- this.rendererHelpers_ = {};
- rendererProcesses_.forEach(function(renderProcess) {
- var rendererHelper = new tr.model.helpers.ChromeRendererHelper(
- this, renderProcess);
- this.rendererHelpers_[rendererHelper.pid] = rendererHelper;
- }, this);
- }
-
- ChromeModelHelper.guid = tr.b.GUID.allocateSimple();
-
- ChromeModelHelper.supportsModel = function(model) {
- if (findChromeBrowserProcesses(model).length)
- return true;
- if (findChromeRenderProcesses(model).length)
- return true;
- return false;
- };
-
- ChromeModelHelper.prototype = {
- get pid() {
- throw new Error('woah');
- },
-
- get process() {
- throw new Error('woah');
- },
-
- get model() {
- return this.model_;
- },
-
- // TODO: Make all users of ChromeModelHelper support multiple browsers and
- // remove this getter (see #2119).
- get browserProcess() {
- if (this.browserHelper === undefined)
- return undefined;
- return this.browserHelper.process;
- },
-
- // TODO: Make all users of ChromeModelHelper support multiple browsers and
- // remove this getter (see #2119).
- get browserHelper() {
- return this.browserHelpers_[0];
- },
-
- get browserHelpers() {
- return this.browserHelpers_;
- },
-
- get gpuHelper() {
- return this.gpuHelper_;
- },
-
- get rendererHelpers() {
- return this.rendererHelpers_;
- },
-
-
- /**
- * Returns renderer with largest pid that is not chrome tracing ui.
- *
- * This is a very hacky approach to find the "target" renderer in metrics
- * calculation. Often in telemetry tests we are only interested in
- * calculating metrics for the page opened by the automated testing system,
- * but currently in tbmv2 there is no way to reliably single out this
- * renderer. One useful heuristic is that the page telemetry opens is opened
- * after all the other renderers in chrome were opened, and therefore has
- * the largest pid.
- *
- * TODO(dproy): Remove this when loading_metric supports all renderers.
- * https://github.com/catapult-project/catapult/issues/2820
- */
- get rendererWithLargestPid() {
- var largestPid = -1;
- for (var pid in this.rendererHelpers) {
- var rendererHelper = this.rendererHelpers[pid];
- if (rendererHelper.isChromeTracingUI) continue;
- if (pid > largestPid) largestPid = pid;
- }
-
- if (largestPid === -1) return undefined;
-
- return this.rendererHelpers[largestPid];
- }
- };
-
- return {
- ChromeModelHelper: ChromeModelHelper
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper_test.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper_test.html
deleted file mode 100644
index 5a4071cbb8c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_model_helper_test.html
+++ /dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/helpers/chrome_browser_helper.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newAsyncSliceEx = tr.c.TestUtils.newAsyncSliceEx;
-
- test('getLatencyData', function() {
- var m = tr.e.chrome.ChromeTestUtils.newChromeModel(function(m) {
- m.browserMain.asyncSliceGroup.push(newAsyncSliceEx({
- title: 'InputLatency::GestureScrollUpdate',
- cat: 'benchmark',
- start: 0,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- args: {
- data: {
- INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT: {'time' : 0},
- INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT: {time: 10}
- }
- }
- }));
- });
-
- var modelHelper = m.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);
- var latencyEvents = modelHelper.browserHelper.getLatencyEventsInRange(
- m.bounds);
- assert.equal(latencyEvents.length, 1);
- });
-
- test('getFrametime', function() {
- var frameTs;
- var events = [];
- // Browser process 3507
- events.push({'cat' : '__metadata', 'pid' : 3507, 'tid' : 3507, 'ts' : 0, 'ph' : 'M', 'name' : 'thread_name', 'args' : {'name' : 'CrBrowserMain'}}); // @suppress longLineCheck
-
- // Renderer process 3508
- events.push({'cat' : '__metadata', 'pid' : 3508, 'tid' : 3508, 'ts' : 0, 'ph' : 'M', 'name' : 'thread_name', 'args' : {'name' : 'CrRendererMain'}}); // @suppress longLineCheck
- // Compositor thread 3510
- events.push({'cat' : '__metadata', 'pid' : 3508, 'tid' : 3510, 'ts' : 0, 'ph' : 'M', 'name' : 'thread_name', 'args' : {'name' : 'Compositor'}}); // @suppress longLineCheck
-
- // Renderer process 3509
- events.push({'cat' : '__metadata', 'pid' : 3509, 'tid' : 3509, 'ts' : 0, 'ph' : 'M', 'name' : 'thread_name', 'args' : {'name' : 'CrRendererMain'}}); // @suppress longLineCheck
-
- // Compositor thread 3511
- events.push({'cat' : '__metadata', 'pid' : 3509, 'tid' : 3511, 'ts' : 0, 'ph' : 'M', 'name' : 'thread_name', 'args' : {'name' : 'Compositor'}}); // @suppress longLineCheck
-
- frameTs = 0;
- // Add impl rendering stats for browser process 3507
- for (var i = 0; i < 10; i++) {
- events.push({'cat' : 'benchmark', 'pid' : 3507, 'tid' : 3507, 'ts' : frameTs, 'ph' : 'i', 'name' : 'BenchmarkInstrumentation::ImplThreadRenderingStats', 's' : 't'}); // @suppress longLineCheck
- frameTs += 16000 + 1000 * (i % 2);
- }
-
- frameTs = 0;
- // Add main rendering stats for renderer process 3508
- for (var i = 0; i < 10; i++) {
- events.push({'cat' : 'benchmark', 'pid' : 3508, 'tid' : 3508, 'ts' : frameTs, 'ph' : 'i', 'name' : 'BenchmarkInstrumentation::MainThreadRenderingStats', 's' : 't'}); // @suppress longLineCheck
- frameTs += 16000 + 1000 * (i % 2);
- }
- events.push({'cat' : 'benchmark', 'pid' : 3508, 'tid' : 3510, 'ts' : 1600, 'ph' : 'i', 'name' : 'KeepAlive', 's' : 't'}); // @suppress longLineCheck
-
- frameTs = 0;
- // Add impl and main rendering stats for renderer process 3509
- for (var i = 0; i < 10; i++) {
- events.push({'cat' : 'benchmark', 'pid' : 3509, 'tid' : 3511, 'ts' : frameTs, 'ph' : 'i', 'name' : 'BenchmarkInstrumentation::ImplThreadRenderingStats', 's' : 't'}); // @suppress longLineCheck
- events.push({'cat' : 'benchmark', 'pid' : 3509, 'tid' : 3509, 'ts' : frameTs, 'ph' : 'i', 'name' : 'BenchmarkInstrumentation::MainThreadRenderingStats', 's' : 't'}); // @suppress longLineCheck
- frameTs += 16000 + 1000 * (i % 2);
- }
-
- var m = tr.c.TestUtils.newModelWithEvents([events]);
- var modelHelper = m.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);
-
- // Testing browser impl and main rendering stats.
- var frameEvents = modelHelper.browserHelper.getFrameEventsInRange(
- tr.model.helpers.IMPL_FRAMETIME_TYPE, m.bounds);
- var frametimeData = tr.model.helpers.getFrametimeDataFromEvents(
- frameEvents);
- assert.equal(frametimeData.length, 9);
- for (var i = 0; i < frametimeData.length; i++) {
- assert.equal(frametimeData[i].frametime, 16 + i % 2);
- }
- // No main rendering stats.
- frameEvents = modelHelper.browserHelper.getFrameEventsInRange(
- tr.model.helpers.MAIN_FRAMETIME_TYPE, m.bounds);
- assert.equal(frameEvents.length, 0);
-
-
- // Testing renderer 3508 impl and main rendering stats.
- frameEvents = modelHelper.rendererHelpers[3508].getFrameEventsInRange(
- tr.model.helpers.MAIN_FRAMETIME_TYPE, m.bounds);
- frametimeData = tr.model.helpers.getFrametimeDataFromEvents(frameEvents);
- assert.equal(frametimeData.length, 9);
- for (var i = 0; i < frametimeData.length; i++) {
- assert.equal(frametimeData[i].frametime, 16 + i % 2);
- }
-
- // No impl rendering stats.
- frameEvents = modelHelper.rendererHelpers[3508].getFrameEventsInRange(
- tr.model.helpers.IMPL_FRAMETIME_TYPE, m.bounds);
- assert.equal(frameEvents.length, 0);
-
-
- // Testing renderer 3509 impl and main rendering stats.
- frameEvents = modelHelper.rendererHelpers[3509].getFrameEventsInRange(
- tr.model.helpers.IMPL_FRAMETIME_TYPE, m.bounds);
- frametimeData = tr.model.helpers.getFrametimeDataFromEvents(frameEvents);
- assert.equal(frametimeData.length, 9);
- for (var i = 0; i < frametimeData.length; i++) {
- assert.equal(frametimeData[i].frametime, 16 + i % 2);
- }
-
- frameEvents = modelHelper.rendererHelpers[3509].getFrameEventsInRange(
- tr.model.helpers.MAIN_FRAMETIME_TYPE, m.bounds);
- frametimeData = tr.model.helpers.getFrametimeDataFromEvents(frameEvents);
- assert.equal(frametimeData.length, 9);
- for (var i = 0; i < frametimeData.length; i++) {
- assert.equal(frametimeData[i].frametime, 16 + i % 2);
- }
-
- });
-
- test('multipleBrowsers', function() {
- var m = tr.c.TestUtils.newModel(function(model) {
- var browserProcess1 = model.getOrCreateProcess(1);
- browserProcess1.getOrCreateThread(2).name = 'CrBrowserMain';
-
- var browserProcess2 = model.getOrCreateProcess(3);
- browserProcess2.getOrCreateThread(4);
- browserProcess2.getOrCreateThread(5).name = 'CrBrowserMain';
-
- var nonBrowserProcess = model.getOrCreateProcess(6);
- nonBrowserProcess.getOrCreateThread(7);
-
- var browserProcess3 = model.getOrCreateProcess(8);
- browserProcess3.getOrCreateThread(9).name = 'CrBrowserMain';
- browserProcess3.getOrCreateThread(10);
- });
-
- var modelHelper = m.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);
- var browserHelpers = modelHelper.browserHelpers;
-
- // Check that the correct processes were marked as Chrome browser processes.
- assert.sameMembers(browserHelpers.map(h => h.process.pid), [1, 3, 8]);
-
- // Check that the browser helpers have the correct structure.
- browserHelpers.forEach(function(helper) {
- assert.instanceOf(helper, tr.model.helpers.ChromeBrowserHelper);
- assert.strictEqual(helper.modelHelper, modelHelper);
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_process_helper.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_process_helper.html
deleted file mode 100644
index 7c31f100451..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_process_helper.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Utilities for accessing trace data about the Chrome browser.
- */
-tr.exportTo('tr.model.helpers', function() {
- var MAIN_FRAMETIME_TYPE = 'main_frametime_type';
- var IMPL_FRAMETIME_TYPE = 'impl_frametime_type';
-
- var MAIN_RENDERING_STATS =
- 'BenchmarkInstrumentation::MainThreadRenderingStats';
- var IMPL_RENDERING_STATS =
- 'BenchmarkInstrumentation::ImplThreadRenderingStats';
-
-
- function getSlicesIntersectingRange(rangeOfInterest, slices) {
- var slicesInFilterRange = [];
- for (var i = 0; i < slices.length; i++) {
- var slice = slices[i];
- if (rangeOfInterest.intersectsExplicitRangeInclusive(
- slice.start, slice.end))
- slicesInFilterRange.push(slice);
- }
- return slicesInFilterRange;
- }
-
-
- function ChromeProcessHelper(modelHelper, process) {
- this.modelHelper = modelHelper;
- this.process = process;
- }
-
- ChromeProcessHelper.prototype = {
- get pid() {
- return this.process.pid;
- },
-
- getFrameEventsInRange: function(frametimeType, range) {
- var titleToGet = (frametimeType === MAIN_FRAMETIME_TYPE ?
- MAIN_RENDERING_STATS : IMPL_RENDERING_STATS);
-
- var frameEvents = [];
- for (var event of this.process.getDescendantEvents())
- if (event.title === titleToGet)
- if (range.intersectsExplicitRangeInclusive(event.start, event.end))
- frameEvents.push(event);
-
- frameEvents.sort(function(a, b) {return a.start - b.start});
- return frameEvents;
- }
- };
-
- function getFrametimeDataFromEvents(frameEvents) {
- var frametimeData = [];
- for (var i = 1; i < frameEvents.length; i++) {
- var diff = frameEvents[i].start - frameEvents[i - 1].start;
- frametimeData.push({
- 'x': frameEvents[i].start,
- 'frametime': diff
- });
- }
- return frametimeData;
- }
-
- return {
- ChromeProcessHelper: ChromeProcessHelper,
-
- MAIN_FRAMETIME_TYPE: MAIN_FRAMETIME_TYPE,
- IMPL_FRAMETIME_TYPE: IMPL_FRAMETIME_TYPE,
- MAIN_RENDERING_STATS: MAIN_RENDERING_STATS,
- IMPL_RENDERING_STATS: IMPL_RENDERING_STATS,
-
- getSlicesIntersectingRange: getSlicesIntersectingRange,
- getFrametimeDataFromEvents: getFrametimeDataFromEvents
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper.html
deleted file mode 100644
index d12c303f801..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/model/helpers/chrome_process_helper.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.helpers', function() {
- function ChromeRendererHelper(modelHelper, process) {
- tr.model.helpers.ChromeProcessHelper.call(this, modelHelper, process);
- this.mainThread_ = process.findAtMostOneThreadNamed('CrRendererMain');
- this.compositorThread_ = process.findAtMostOneThreadNamed('Compositor');
- this.rasterWorkerThreads_ = process.findAllThreadsMatching(function(t) {
- if (t.name === undefined)
- return false;
- if (t.name.indexOf('CompositorTileWorker') === 0)
- return true;
- if (t.name.indexOf('CompositorRasterWorker') === 0)
- return true;
- return false;
- });
-
- this.isChromeTracingUI_ =
- process.labels !== undefined &&
- process.labels.length === 1 &&
- process.labels[0] === 'chrome://tracing';
- if (!process.name)
- process.name = ChromeRendererHelper.PROCESS_NAME;
- }
-
- ChromeRendererHelper.PROCESS_NAME = 'Renderer';
-
- // Returns true if there is either a main thread or a compositor thread.
- ChromeRendererHelper.isRenderProcess = function(process) {
- if (process.findAtMostOneThreadNamed('CrRendererMain'))
- return true;
- if (process.findAtMostOneThreadNamed('Compositor'))
- return true;
- return false;
- };
-
- ChromeRendererHelper.prototype = {
- __proto__: tr.model.helpers.ChromeProcessHelper.prototype,
-
- // May be undefined.
- get mainThread() {
- return this.mainThread_;
- },
-
- // May be undefined.
- get compositorThread() {
- return this.compositorThread_;
- },
-
- // May be empty.
- get rasterWorkerThreads() {
- return this.rasterWorkerThreads_;
- },
-
- get isChromeTracingUI() {
- return this.isChromeTracingUI_;
- },
-
- /**
- * Generate a breakdown that attributes where time goes between |start| &
- * |end| on renderer thread.
- *
- * @param {number} start
- * @param {number} end
- * @return {Object} A time breakdown object whose every key is a chrome
- * userfriendly title & values are an object that show the total spent
- * between |start| & |end|, and the list of event labels of the group and
- * their total time between |start| & |end|.
- *
- * Example:
- * {layout: {
- * total: 100,
- * events: {'FrameView::performPreLayoutTasks': 20,..}},
- * v8_runtime: {
- * total: 500,
- * events: {'String::NewExternalTwoByte': 0.5,..}},
- * ...
- * }
- *
- *
- */
- generateTimeBreakdownTree: function(start, end) {
- if (this.mainThread === null)
- return;
- var breakdownMap = {};
- var range = tr.b.Range.fromExplicitRange(start, end);
- for (var title of
- tr.e.chrome.ChromeUserFriendlyCategoryDriver.ALL_TITLES) {
- breakdownMap[title] = {total: 0, events: {}};
- }
- breakdownMap['idle'] = {total: 0, events: {}};
- var totalIdleTime = end - start;
- for (var event of this.mainThread.getDescendantEvents()) {
- if (!range.intersectsExplicitRangeExclusive(event.start, event.end))
- continue;
- if (event.selfTime === undefined)
- continue;
- var title =
- tr.e.chrome.ChromeUserFriendlyCategoryDriver.fromEvent(event);
- var wallTimeIntersectionRatio = 0;
- if (event.duration > 0) {
- wallTimeIntersectionRatio =
- range.findExplicitIntersectionDuration(event.start, event.end) /
- event.duration;
- }
- var v8Runtime = event.args['runtime-call-stat'];
- if (v8Runtime !== undefined) {
- try {
- var v8RuntimeObject = JSON.parse(v8Runtime);
- for (var runtimeCall in v8RuntimeObject) {
- if (v8RuntimeObject[runtimeCall].length === 2) {
- if (breakdownMap['v8_runtime'].events[runtimeCall] ===
- undefined) {
- breakdownMap['v8_runtime'].events[runtimeCall] = 0;
- }
- // V8 Runtime Call Stats data is in us, while the
- // breakdown tree timing is in ms.
- var runtimeTime = v8RuntimeObject[runtimeCall][1] *
- wallTimeIntersectionRatio / 1000;
- breakdownMap['v8_runtime'].total += runtimeTime;
- breakdownMap['v8_runtime'].events[runtimeCall] +=
- runtimeTime;
- }
- }
- } catch (e) {
- console.warn(e);
- }
- }
- // [ Slice 1 ] [ Slice 2 ] [ Slice 3 ]
- // [ Slice 4 ] [ Slice 5 ]
- // [ Slice 6 ] |
- // | |
- // | |
- // v v
- // start end
- //
- // For the case where the |start| or |end| overlapped with some existing
- // slice (see above diagram), we approximate the overlapped self-time
- // by multiplying the ratio of overlapped wall time to the self-time.
- // There should be way to compute the exact number, but in practice,
- // this should rarely happen, and when it does, the overlapped range
- // is relative small so that using approximation here should be good
- // enough.
- var approximatedSelfTimeContribution =
- event.selfTime * wallTimeIntersectionRatio;
- breakdownMap[title].total += approximatedSelfTimeContribution;
- if (breakdownMap[title].events[event.title] === undefined)
- breakdownMap[title].events[event.title] = 0;
- breakdownMap[title].events[event.title] +=
- approximatedSelfTimeContribution;
- totalIdleTime -= approximatedSelfTimeContribution;
- }
- breakdownMap['idle'].total = totalIdleTime;
- return breakdownMap;
- }
-
- };
-
- return {
- ChromeRendererHelper: ChromeRendererHelper
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper_test.html b/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper_test.html
deleted file mode 100644
index c92125b809c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/helpers/chrome_renderer_helper_test.html
+++ /dev/null
@@ -1,156 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var rendererPid = 12345;
- var model = tr.c.TestUtils.newModel(function(model) {
- var rendererProcess = model.getOrCreateProcess(rendererPid);
- var mainThread = rendererProcess.getOrCreateThread(2);
- mainThread.name = 'CrRendererMain';
-
- // Our main thread looks like:
- //
- // [ parseHTML ] [ layout ] [ V8.Exec ]
- // | [ V8.Exec ] | | | | [ layout ] |
- // | | | | | | | | | |
- // | | | | | | | | | |
- // v v v v v v v v v v
- // Ts: 200 250 300 400 450 550 570 600 620 650
-
- // Add layout categories
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink',
- title: 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser',
- start: 200,
- duration: 200,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'devtools.timeline',
- title: 'Script',
- start: 250,
- duration: 50,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'v8',
- title: 'V8.Execute',
- start: 250,
- duration: 50,
- args: {'runtime-call-stat': '{"ICMiss": [3, 150], "GC": [10, 60]}'},
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink',
- title: 'FrameView::layout',
- start: 450,
- duration: 100,
- }));
-
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'v8',
- title: 'V8.Execute',
- start: 570,
- duration: 80,
- args: {'runtime-call-stat': '{"DeOptimize": [1, 42], "GC": [3, 50]}'},
- }));
- mainThread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({
- cat: 'blink',
- title: 'WebViewImpl::layout',
- start: 600,
- duration: 20,
- }));
- });
-
- var chromeHelper = model.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
-
- var rendererHelper = chromeHelper.rendererHelpers[rendererPid];
-
- test('testTimeBreakdownNoIntersectingBoundary', function() {
- var breakdownTree = rendererHelper.generateTimeBreakdownTree(0, 1000);
- assert.deepEqual({
- total: 150,
- events: {
- 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser': 150
- }
- }, breakdownTree['parseHTML']);
- assert.deepEqual({
- total: 120,
- events: {
- 'FrameView::layout': 100,
- 'WebViewImpl::layout': 20,
- }
- }, breakdownTree['layout']);
- assert.deepEqual({
- total: 110,
- events: {
- 'V8.Execute': 110,
- }
- }, breakdownTree['script_execute']);
- assert.deepEqual({
- total: 0.302,
- events: {
- 'DeOptimize': 0.042,
- 'GC': 0.11,
- 'ICMiss': 0.15,
- }
- }, breakdownTree['v8_runtime']);
- });
-
- test('testTimeBreakdownIntersectingBoundary', function() {
-
- // Our main thread looks like:
- //
- // [ parseHTML ] [ layout ] [ V8.Exec ]
- // | [ V8.Exec ] | | | | [ layout ] |
- // | | | | | | | | | |
- // | | | | | | | | | |
- // v v v v v v v v v v
- // Ts: 200 250 300 400 450 550 570 600 620 650
- // | |
- // 275 610
-
- var breakdownTree = rendererHelper.generateTimeBreakdownTree(275, 610);
- assert.deepEqual({
- total: 93.75,
- events: {
- 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser': 93.75
- }
- }, breakdownTree['parseHTML']);
- assert.deepEqual({
- total: 110,
- events: {
- 'FrameView::layout': 100,
- 'WebViewImpl::layout': 10,
- }
- }, breakdownTree['layout']);
- assert.deepEqual({
- total: 55,
- events: {
- 'V8.Execute': 55,
- }
- }, breakdownTree['script_execute']);
- assert.deepEqual({
- total: 0.151,
- events: {
- 'DeOptimize': 0.021,
- 'GC': 0.055,
- 'ICMiss': 0.075,
- }
- }, breakdownTree['v8_runtime']);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/instant_event.html b/chromium/third_party/catapult/tracing/tracing/model/instant_event.html
deleted file mode 100644
index 2f8d4b09efc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/instant_event.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var InstantEventType = {
- GLOBAL: 1,
- PROCESS: 2
- };
-
- /**
- * An InstantEvent is a zero-duration event.
- *
- * @constructor
- */
- function InstantEvent(category, title, colorId, start, args) {
- tr.model.TimedEvent.call(this, start);
-
- this.category = category || '';
- this.title = title;
- this.colorId = colorId;
- this.args = args;
-
- this.type = undefined;
- }
-
- InstantEvent.prototype = {
- __proto__: tr.model.TimedEvent.prototype
- };
-
- /**
- * A GlobalInstantEvent is a zero-duration event that's not tied to any
- * particular process.
- *
- * An example is a trace event that's issued when a new USB device is plugged
- * into the machine.
- *
- * @constructor
- */
- function GlobalInstantEvent(category, title, colorId, start, args) {
- InstantEvent.apply(this, arguments);
- this.type = InstantEventType.GLOBAL;
- }
-
- GlobalInstantEvent.prototype = {
- __proto__: InstantEvent.prototype,
- get userFriendlyName() {
- return 'Global instant event ' + this.title + ' @ ' +
- tr.b.Unit.byName.timeStampInMs.format(start);
- }
- };
-
- /**
- * A ProcessInstantEvent is a zero-duration event that's tied to a
- * particular process.
- *
- * An example is a trace event that's issued when a kill signal is received.
- *
- * @constructor
- */
- function ProcessInstantEvent(category, title, colorId, start, args) {
- InstantEvent.apply(this, arguments);
- this.type = InstantEventType.PROCESS;
- }
-
- ProcessInstantEvent.prototype = {
- __proto__: InstantEvent.prototype,
-
- get userFriendlyName() {
- return 'Process-level instant event ' + this.title + ' @ ' +
- tr.b.Unit.byName.timeStampInMs.format(start);
- }
- };
-
- tr.model.EventRegistry.register(
- InstantEvent,
- {
- name: 'instantEvent',
- pluralName: 'instantEvents'
- });
-
- return {
- GlobalInstantEvent: GlobalInstantEvent,
- ProcessInstantEvent: ProcessInstantEvent,
-
- InstantEventType: InstantEventType,
- InstantEvent: InstantEvent
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/interaction_record_test.html b/chromium/third_party/catapult/tracing/tracing/model/interaction_record_test.html
deleted file mode 100644
index 1302f6517b6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/interaction_record_test.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/user_model/stub_expectation.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestUtils = tr.c.TestUtils;
- var CompoundEventSelectionState = tr.model.CompoundEventSelectionState;
-
- function createModel(opt_customizeModelCallback) {
- return TestUtils.newModel(function(model) {
- model.p1 = model.getOrCreateProcess(1);
- model.t2 = model.p1.getOrCreateThread(2);
-
- model.s1 = model.t2.sliceGroup.pushSlice(TestUtils.newSliceEx({
- title: 'a', start: 10, end: 20
- }));
- model.s2 = model.t2.sliceGroup.pushSlice(TestUtils.newSliceEx({
- title: 'b', start: 20, end: 30
- }));
-
- model.ir1 = new tr.model.um.StubExpectation({
- parentModel: model,
- start: 100, end: 200,
- typeName: 'Response',
- normalizedEfficiency: 1.,
- normalizedUserComfort: 0.0
- });
- model.userModel.expectations.push(model.ir1);
- model.ir1.associatedEvents.push(model.s1);
- model.ir1.associatedEvents.push(model.s2);
-
- if (opt_customizeModelCallback)
- opt_customizeModelCallback(model);
- });
- }
- test('notSelected', function() {
- var model = createModel();
-
- var sel = new tr.model.EventSet();
-
- assert.equal(CompoundEventSelectionState.NOT_SELECTED,
- model.ir1.computeCompoundEvenSelectionState(sel));
- });
-
- test('directSelected', function() {
- var model = createModel();
-
- var sel = new tr.model.EventSet();
- sel.push(model.ir1);
-
- assert.equal(CompoundEventSelectionState.EVENT_SELECTED,
- model.ir1.computeCompoundEvenSelectionState(sel));
- });
-
- test('directAndSomeAssociatedSelected', function() {
- var model = createModel();
-
- var sel = new tr.model.EventSet();
- sel.push(model.ir1);
- sel.push(model.s1);
-
- assert.equal(
- CompoundEventSelectionState.EVENT_AND_SOME_ASSOCIATED_SELECTED,
- model.ir1.computeCompoundEvenSelectionState(sel));
-
- });
-
- test('allAssociatedEventsSelected', function() {
- var model = createModel();
-
- var sel = new tr.model.EventSet();
- sel.push(model.s1);
- sel.push(model.s2);
-
- assert.equal(CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED,
- model.ir1.computeCompoundEvenSelectionState(sel));
- });
-
- test('directAndAllAssociated', function() {
- var model = createModel();
-
- var sel = new tr.model.EventSet();
- sel.push(model.ir1);
- sel.push(model.s1);
- sel.push(model.s2);
-
- assert.equal(CompoundEventSelectionState.EVENT_AND_ALL_ASSOCIATED_SELECTED,
- model.ir1.computeCompoundEvenSelectionState(sel));
- });
-
- test('stableId', function() {
- var model = TestUtils.newModel();
-
- var ir1 = model.userModel.expectations.push(
- TestUtils.newInteractionRecord(model, 0, 10));
- var ir2 = model.userModel.expectations.push(
- TestUtils.newInteractionRecord(model, 10, 10));
- var ir3 = model.userModel.expectations.push(
- TestUtils.newInteractionRecord(model, 20, 10));
-
- assert.equal('UserExpectation.' + ir1.guid, ir1.stableId);
- assert.equal('UserExpectation.' + ir2.guid, ir2.stableId);
- assert.equal('UserExpectation.' + ir3.guid, ir3.stableId);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/ir_coverage.html b/chromium/third_party/catapult/tracing/tracing/model/ir_coverage.html
deleted file mode 100644
index 80cdd387a3c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/ir_coverage.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- function getAssociatedEvents(irs) {
- var allAssociatedEvents = new tr.model.EventSet();
- irs.forEach(function(ir) {
- ir.associatedEvents.forEach(function(event) {
- // FlowEvents don't have parentContainers or cpuDurations, and it's
- // annoying to highlight them.
- if (event instanceof tr.model.FlowEvent)
- return;
- allAssociatedEvents.push(event);
- });
- });
- return allAssociatedEvents;
- }
-
- function getUnassociatedEvents(model, associatedEvents) {
- var unassociatedEvents = new tr.model.EventSet();
- // The set of unassociated events contains only events that are not in
- // the set of associated events.
- // Only add event to the set of unassociated events if it is not in
- // the set of associated events.
- for (var proc of model.getAllProcesses())
- for (var thread of tr.b.dictionaryValues(proc.threads))
- for (var event of thread.sliceGroup.getDescendantEvents())
- if (!associatedEvents.contains(event))
- unassociatedEvents.push(event);
- return unassociatedEvents;
- }
-
- function getTotalCpuDuration(events) {
- var cpuMs = 0;
- events.forEach(function(event) {
- // Add up events' cpu self time if they have any.
- if (event.cpuSelfTime)
- cpuMs += event.cpuSelfTime;
- });
- return cpuMs;
- }
-
- function getIRCoverageFromModel(model) {
- var associatedEvents = getAssociatedEvents(model.userModel.expectations);
-
- if (!associatedEvents.length)
- return undefined;
-
- var unassociatedEvents = getUnassociatedEvents(
- model, associatedEvents);
-
- var associatedCpuMs = getTotalCpuDuration(associatedEvents);
- var unassociatedCpuMs = getTotalCpuDuration(unassociatedEvents);
-
- var totalEventCount = associatedEvents.length + unassociatedEvents.length;
- var totalCpuMs = associatedCpuMs + unassociatedCpuMs;
- var coveredEventsCpuTimeRatio = undefined;
- if (totalCpuMs !== 0)
- coveredEventsCpuTimeRatio = associatedCpuMs / totalCpuMs;
-
- return {
- associatedEventsCount: associatedEvents.length,
- unassociatedEventsCount: unassociatedEvents.length,
- associatedEventsCpuTimeMs: associatedCpuMs,
- unassociatedEventsCpuTimeMs: unassociatedCpuMs,
- coveredEventsCountRatio: associatedEvents.length / totalEventCount,
- coveredEventsCpuTimeRatio: coveredEventsCpuTimeRatio
- };
- }
-
- return {
- getIRCoverageFromModel: getIRCoverageFromModel,
- getAssociatedEvents: getAssociatedEvents,
- getUnassociatedEvents: getUnassociatedEvents
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/ir_coverage_test.html b/chromium/third_party/catapult/tracing/tracing/model/ir_coverage_test.html
deleted file mode 100644
index e8a1637e60d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/ir_coverage_test.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/ir_coverage.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- function createModel() {
- return tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- var thread = process.getOrCreateThread(2);
- var s0 = thread.sliceGroup.pushSlice(newSliceEx(
- {title: 's0', start: 0.0, duration: 1.0}));
- s0.isTopLevel = true;
- var unassociatedEvent = thread.sliceGroup.pushSlice(newSliceEx(
- {title: 's1', start: 6.0, duration: 1.0}));
- unassociatedEvent.isTopLevel = true;
- var s2 = thread.sliceGroup.pushSlice(newSliceEx(
- {title: 's2', start: 2.0, duration: 1.0}));
- s2.isTopLevel = true;
- var f0 = tr.c.TestUtils.newFlowEventEx({
- title: 'test1',
- start: 0,
- end: 10,
- startSlice: s0,
- endSlice: s2,
- id: '0x100'
- });
- model.flowEvents.push(f0);
- var as1 = tr.c.TestUtils.newAsyncSliceEx({
- title: 'InputLatency::GestureTap',
- cat: 'benchmark,latencyInfo',
- start: 2,
- end: 10,
- id: '0x100',
- isTopLevel: true,
- startThread: thread
- });
- thread.asyncSliceGroup.push(as1);
- var ir = new tr.model.um.StubExpectation(
- {parentModel: model, start: 0, duration: 7});
- ir.associatedEvents.push(as1);
- ir.associatedEvents.push(s0);
- ir.associatedEvents.push(s2);
- ir.associatedEvents.push(f0);
- model.userModel.expectations.push(ir);
- });
- }
-
- test('computeCoverage', function() {
- var model = createModel();
- for (var event of model.getDescendantEvents()) {
- if (event.title === 's0' || event.title === 's2') {
- event.cpuSelfTime = 0.4;
- } else if (event.title === 's1') {
- event.cpuSelfTime = 0.8;
- }
- }
-
- var coverage = tr.model.getIRCoverageFromModel(model);
- assert.equal(3, coverage.associatedEventsCount);
- assert.equal(1, coverage.unassociatedEventsCount);
- assert.closeTo(0.75, coverage.coveredEventsCountRatio, 1e-3);
- assert.closeTo(0.8, coverage.associatedEventsCpuTimeMs, 1e-3);
- assert.closeTo(0.8, coverage.unassociatedEventsCpuTimeMs, 1e-3);
- assert.closeTo(0.5, coverage.coveredEventsCpuTimeRatio, 1e-3);
- });
-
- test('zeroCPU', function() {
- var model = createModel();
- var coverage = tr.model.getIRCoverageFromModel(model);
- assert.equal(3, coverage.associatedEventsCount);
- assert.equal(1, coverage.unassociatedEventsCount);
- assert.closeTo(0.75, coverage.coveredEventsCountRatio, 1e-3);
- assert.closeTo(0.0, coverage.associatedEventsCpuTimeMs, 1e-3);
- assert.closeTo(0.0, coverage.unassociatedEventsCpuTimeMs, 1e-3);
- assert.equal(undefined, coverage.coveredEventsCpuTimeRatio, 1e-3);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/kernel.html b/chromium/third_party/catapult/tracing/tracing/model/kernel.html
deleted file mode 100644
index bf8aed5916e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/kernel.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/cpu.html">
-<link rel="import" href="/tracing/model/process_base.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Process class.
- */
-tr.exportTo('tr.model', function() {
- var Cpu = tr.model.Cpu;
- var ProcessBase = tr.model.ProcessBase;
-
- /**
- * The Kernel represents kernel-level objects in the model.
- * @constructor
- */
- function Kernel(model) {
- ProcessBase.call(this, model);
-
- this.cpus = {};
- this.softwareMeasuredCpuCount_ = undefined;
- };
-
- /**
- * Comparison between kernels is pretty meaningless.
- */
- Kernel.compare = function(x, y) {
- return 0;
- };
-
- Kernel.prototype = {
- __proto__: ProcessBase.prototype,
-
- compareTo: function(that) {
- return Kernel.compare(this, that);
- },
-
- get userFriendlyName() {
- return 'Kernel';
- },
-
- get userFriendlyDetails() {
- return 'Kernel';
- },
-
- get stableId() {
- return 'Kernel';
- },
-
- /**
- * @return {Cpu} Gets a specific Cpu or creates one if
- * it does not exist.
- */
- getOrCreateCpu: function(cpuNumber) {
- if (!this.cpus[cpuNumber])
- this.cpus[cpuNumber] = new Cpu(this, cpuNumber);
- return this.cpus[cpuNumber];
- },
-
- get softwareMeasuredCpuCount() {
- return this.softwareMeasuredCpuCount_;
- },
-
- set softwareMeasuredCpuCount(softwareMeasuredCpuCount) {
- if (this.softwareMeasuredCpuCount_ !== undefined &&
- this.softwareMeasuredCpuCount_ !== softwareMeasuredCpuCount) {
- throw new Error(
- 'Cannot change the softwareMeasuredCpuCount once it is set');
- }
-
- this.softwareMeasuredCpuCount_ = softwareMeasuredCpuCount;
- },
-
- /**
- * Estimates how many cpus are in the system, for use in system load
- * estimation.
- *
- * If kernel trace was provided, uses that data. Otherwise, uses the
- * software measured cpu count.
- */
- get bestGuessAtCpuCount() {
- var realCpuCount = tr.b.dictionaryLength(this.cpus);
- if (realCpuCount !== 0)
- return realCpuCount;
- return this.softwareMeasuredCpuCount;
- },
-
- updateBounds: function() {
- ProcessBase.prototype.updateBounds.call(this);
- for (var cpuNumber in this.cpus) {
- var cpu = this.cpus[cpuNumber];
- cpu.updateBounds();
- this.bounds.addRange(cpu.bounds);
- }
- },
-
- createSubSlices: function() {
- ProcessBase.prototype.createSubSlices.call(this);
- for (var cpuNumber in this.cpus) {
- var cpu = this.cpus[cpuNumber];
- cpu.createSubSlices();
- }
- },
-
- addCategoriesToDict: function(categoriesDict) {
- ProcessBase.prototype.addCategoriesToDict.call(this, categoriesDict);
- for (var cpuNumber in this.cpus)
- this.cpus[cpuNumber].addCategoriesToDict(categoriesDict);
- },
-
- getSettingsKey: function() {
- return 'kernel';
- },
-
- childEventContainers: function*() {
- yield * ProcessBase.prototype.childEventContainers.call(this);
- yield * tr.b.dictionaryValues(this.cpus);
- },
- };
-
- return {
- Kernel: Kernel
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/kernel_test.html b/chromium/third_party/catapult/tracing/tracing/model/kernel_test.html
deleted file mode 100644
index c4ca0ca8e72..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/kernel_test.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/kernel.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function newModel(events, callback) {
- return tr.c.TestUtils.newModelWithEvents([events], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: callback
- });
- }
-
- test('bestGuessAtCpuCountWithNoData', function() {
- var m = newModel([]);
- assert.isUndefined(m.kernel.bestGuessAtCpuCount);
- });
-
- test('bestGuessAtCpuCountWithCpuData', function() {
- var m = newModel([], function(m) {
- var c1 = m.kernel.getOrCreateCpu(1);
- var c2 = m.kernel.getOrCreateCpu(2);
- });
- assert.equal(m.kernel.bestGuessAtCpuCount, 2);
- });
-
- test('bestGuessAtCpuCountWithSoftwareCpuCount', function() {
- var m = newModel([], function(m) {
- m.kernel.softwareMeasuredCpuCount = 2;
- });
- assert.equal(m.kernel.bestGuessAtCpuCount, 2);
- });
-
- test('kernelStableId', function() {
- var model = newModel([]);
- assert.equal(model.kernel.stableId, 'Kernel');
- });
-
- test('kernelTimeShifting', function() {
- var m = newModel([]);
- var ctr1 = m.kernel.getOrCreateCounter('cat', 'ctr1');
- var series1 = new tr.model.CounterSeries('a', 0);
- series1.addCounterSample(100, 5);
- series1.addCounterSample(200, 5);
- ctr1.addSeries(series1);
-
- var ctr2 = m.kernel.getOrCreateCpu(1).getOrCreateCounter('cat', 'ctr2');
- var series2 = new tr.model.CounterSeries('b', 0);
- series2.addCounterSample(300, 5);
- series2.addCounterSample(400, 5);
- ctr2.addSeries(series2);
-
- m.kernel.shiftTimestampsForward(2);
-
- assert.equal(ctr1.series[0].samples[0].timestamp, 102);
- assert.equal(ctr1.series[0].samples[1].timestamp, 202);
-
- assert.equal(ctr2.series[0].samples[0].timestamp, 302);
- assert.equal(ctr2.series[0].samples[1].timestamp, 402);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/location.html b/chromium/third_party/catapult/tracing/tracing/model/location.html
deleted file mode 100644
index 8654157172d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/location.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- /**
- * YComponent is a class that handles storing the stableId and the percentage
- * offset in the y direction of all tracks within a specific viewX and viewY
- * coordinate.
- * @constructor
- */
- function YComponent(stableId, yPercentOffset) {
- this.stableId = stableId;
- this.yPercentOffset = yPercentOffset;
- }
-
- YComponent.prototype = {
- toDict: function() {
- return {
- stableId: this.stableId,
- yPercentOffset: this.yPercentOffset
- };
- }
- };
-
- /**
- * Location is a class that represents a spatial location on the timeline
- * that is specified by percent offsets within tracks rather than specific
- * points.
- *
- * @constructor
- */
- function Location(xWorld, yComponents) {
- this.xWorld_ = xWorld;
- this.yComponents_ = yComponents;
- }
-
- /**
- * Returns a new Location given by x and y coordinates with respect to
- * the timeline's drawing canvas.
- */
- Location.fromViewCoordinates = function(viewport, viewX, viewY) {
- var dt = viewport.currentDisplayTransform;
- var xWorld = dt.xViewToWorld(viewX);
- var yComponents = [];
-
- // Since we're given coordinates within the timeline canvas, we need to
- // convert them to document coordinates to get the element.
- var elem = document.elementFromPoint(
- viewX + viewport.modelTrackContainer.canvas.offsetLeft,
- viewY + viewport.modelTrackContainer.canvas.offsetTop);
- // Build yComponents by calculating percentage offset with respect to
- // each parent track.
- while (elem instanceof tr.ui.tracks.Track) {
- if (elem.eventContainer) {
- var boundRect = elem.getBoundingClientRect();
- var yPercentOffset = (viewY - boundRect.top) / boundRect.height;
- yComponents.push(
- new YComponent(elem.eventContainer.stableId, yPercentOffset));
- }
- elem = elem.parentElement;
- }
-
- if (yComponents.length === 0)
- return;
- return new Location(xWorld, yComponents);
- }
-
- Location.fromStableIdAndTimestamp = function(viewport, stableId, ts) {
- var xWorld = ts;
- var yComponents = [];
-
- // The y components' percentage offsets will be calculated with respect to
- // the boundingRect's top of containing track.
- var containerToTrack = viewport.containerToTrackMap;
- var elem = containerToTrack.getTrackByStableId(stableId);
- if (!elem)
- return;
-
- var firstY = elem.getBoundingClientRect().top;
- while (elem instanceof tr.ui.tracks.Track) {
- if (elem.eventContainer) {
- var boundRect = elem.getBoundingClientRect();
- var yPercentOffset = (firstY - boundRect.top) / boundRect.height;
- yComponents.push(
- new YComponent(elem.eventContainer.stableId, yPercentOffset));
- }
- elem = elem.parentElement;
- }
-
- if (yComponents.length === 0)
- return;
- return new Location(xWorld, yComponents);
- }
-
- Location.prototype = {
-
- get xWorld() {
- return this.xWorld_;
- },
-
- /**
- * Returns the first valid containing track based on the
- * internal yComponents.
- */
- getContainingTrack: function(viewport) {
- var containerToTrack = viewport.containerToTrackMap;
- for (var i in this.yComponents_) {
- var yComponent = this.yComponents_[i];
- var track = containerToTrack.getTrackByStableId(yComponent.stableId);
- if (track !== undefined)
- return track;
- }
- },
-
- /**
- * Calculates and returns x and y coordinates of the current location with
- * respect to the timeline's canvas.
- */
- toViewCoordinates: function(viewport) {
- var dt = viewport.currentDisplayTransform;
- var containerToTrack = viewport.containerToTrackMap;
- var viewX = dt.xWorldToView(this.xWorld_);
-
- var viewY = -1;
- for (var index in this.yComponents_) {
- var yComponent = this.yComponents_[index];
- var track = containerToTrack.getTrackByStableId(yComponent.stableId);
- if (track !== undefined) {
- var boundRect = track.getBoundingClientRect();
- viewY = yComponent.yPercentOffset * boundRect.height + boundRect.top;
- break;
- }
- }
-
- return {
- viewX: viewX,
- viewY: viewY
- };
- },
-
- toDict: function() {
- return {
- xWorld: this.xWorld_,
- yComponents: this.yComponents_
- };
- }
- };
-
- return {
- Location: Location
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump.html b/chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump.html
deleted file mode 100644
index 65ecfa9b554..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump.html
+++ /dev/null
@@ -1,221 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the MemoryAllocatorDump class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * @constructor
- */
- function MemoryAllocatorDump(containerMemoryDump, fullName, opt_guid) {
- this.fullName = fullName;
- this.parent = undefined;
- this.children = [];
-
- // String -> ScalarNumeric.
- this.numerics = {};
-
- // String -> string.
- this.diagnostics = {};
-
- // The associated container memory dump.
- this.containerMemoryDump = containerMemoryDump;
-
- // Ownership relationship between memory allocator dumps.
- this.owns = undefined;
- this.ownedBy = [];
-
- // Map from sibling dumps (other children of this dump's parent) to the
- // proportion of this dump's size which they (or their descendants) own.
- this.ownedBySiblingSizes = new Map();
-
- // Retention relationship between memory allocator dumps.
- this.retains = [];
- this.retainedBy = [];
-
- // Weak memory allocator dumps are removed from the model after import in
- // tr.model.GlobalMemoryDump.removeWeakDumps(). See
- // base::trace_event::MemoryAllocatorDump::Flags::WEAK in the Chromium
- // codebase.
- this.weak = false;
-
- // A list of information about the memory allocator dump (e.g. about how
- // its fields were calculated). Each item should be an object with
- // a mandatory 'type' property and type-specific extra arguments (see
- // MemoryAllocatorDumpInfoType).
- this.infos = [];
-
- // For debugging purposes.
- this.guid = opt_guid;
- }
-
- /**
- * Size numeric names. Please refer to the Memory Dump Graph Metric
- * Calculation design document for more details (https://goo.gl/fKg0dt).
- */
- MemoryAllocatorDump.SIZE_NUMERIC_NAME = 'size';
- MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME = 'effective_size';
- MemoryAllocatorDump.RESIDENT_SIZE_NUMERIC_NAME = 'resident_size';
- MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME =
- MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME;
-
- MemoryAllocatorDump.prototype = {
- get name() {
- return this.fullName.substring(this.fullName.lastIndexOf('/') + 1);
- },
-
- get quantifiedName() {
- return '\'' + this.fullName + '\' in ' +
- this.containerMemoryDump.containerName;
- },
-
- getDescendantDumpByFullName: function(fullName) {
- return this.containerMemoryDump.getMemoryAllocatorDumpByFullName(
- this.fullName + '/' + fullName);
- },
-
- isDescendantOf: function(otherDump) {
- var dump = this;
- while (dump !== undefined) {
- if (dump === otherDump)
- return true;
- dump = dump.parent;
- }
- return false;
- },
-
- addNumeric: function(name, numeric) {
- if (!(numeric instanceof tr.v.ScalarNumeric))
- throw new Error('Numeric value must be an instance of ScalarNumeric.');
- if (name in this.numerics)
- throw new Error('Duplicate numeric name: ' + name + '.');
- this.numerics[name] = numeric;
- },
-
- addDiagnostic: function(name, text) {
- if (typeof text !== 'string')
- throw new Error('Diagnostic text must be a string.');
- if (name in this.diagnostics)
- throw new Error('Duplicate diagnostic name: ' + name + '.');
- this.diagnostics[name] = text;
- },
-
- aggregateNumericsRecursively: function(opt_model) {
- var numericNames = new Set();
-
- // Aggregate descendants's numerics recursively and gather children's
- // numeric names.
- this.children.forEach(function(child) {
- child.aggregateNumericsRecursively(opt_model);
- tr.b.iterItems(child.numerics, numericNames.add, numericNames);
- }, this);
-
- // Aggregate children's numerics.
- numericNames.forEach(function(numericName) {
- if (numericName === MemoryAllocatorDump.SIZE_NUMERIC_NAME ||
- numericName === MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME ||
- this.numerics[numericName] !== undefined) {
- // Don't aggregate size and effective size numerics. These are
- // calculated in GlobalMemoryDump.prototype.calculateSizes() and
- // GlobalMemoryDump.prototype.calculateEffectiveSizes respectively.
- // Also don't aggregate numerics that the parent already has.
- return;
- }
-
- this.numerics[numericName] = MemoryAllocatorDump.aggregateNumerics(
- this.children.map(function(child) {
- return child.numerics[numericName];
- }), opt_model);
- }, this);
- }
- };
-
- // TODO(petrcermak): Consider moving this to tr.v.Histogram.
- MemoryAllocatorDump.aggregateNumerics = function(numerics, opt_model) {
- var shouldLogWarning = !!opt_model;
- var aggregatedUnit = undefined;
- var aggregatedValue = 0;
-
- // Aggregate the units and sum up the values of the numerics.
- numerics.forEach(function(numeric) {
- if (numeric === undefined)
- return;
-
- var unit = numeric.unit;
- if (aggregatedUnit === undefined) {
- aggregatedUnit = unit;
- } else if (aggregatedUnit !== unit) {
- if (shouldLogWarning) {
- opt_model.importWarning({
- type: 'numeric_parse_error',
- message: 'Multiple units provided for numeric: \'' +
- aggregatedUnit.unitName + '\' and \'' + unit.unitName + '\'.'
- });
- shouldLogWarning = false; // Don't log multiple warnings.
- }
- // Use the most generic unit when the numerics don't agree (best
- // effort).
- aggregatedUnit = tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- }
-
- aggregatedValue += numeric.value;
- }, this);
-
- if (aggregatedUnit === undefined)
- return undefined;
-
- return new tr.v.ScalarNumeric(aggregatedUnit, aggregatedValue);
- };
-
- /**
- * @constructor
- */
- function MemoryAllocatorDumpLink(source, target, opt_importance) {
- this.source = source;
- this.target = target;
- this.importance = opt_importance;
- this.size = undefined;
- }
-
- /**
- * Types of size numeric information.
- *
- * @enum
- */
- var MemoryAllocatorDumpInfoType = {
- // The provided size of a MemoryAllocatorDump was less than the aggregated
- // size of its children.
- //
- // Mandatory extra args:
- // * providedSize: The inconsistent provided size.
- // * dependencySize: The aggregated size of the children.
- PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN: 0,
-
- // The provided size of a MemoryAllocatorDump was less than the size of its
- // largest owner.
- //
- // Mandatory extra args:
- // * providedSize: The inconsistent provided size.
- // * dependencySize: The size of the largest owner.
- PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER: 1
- };
-
- return {
- MemoryAllocatorDump: MemoryAllocatorDump,
- MemoryAllocatorDumpLink: MemoryAllocatorDumpLink,
- MemoryAllocatorDumpInfoType: MemoryAllocatorDumpInfoType
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump_test.html b/chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump_test.html
deleted file mode 100644
index 47df6ec9068..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/memory_allocator_dump_test.html
+++ /dev/null
@@ -1,220 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ContainerMemoryDump = tr.model.ContainerMemoryDump;
- var MemoryAllocatorDump = tr.model.MemoryAllocatorDump;
- var MemoryAllocatorDumpLink = tr.model.MemoryAllocatorDumpLink;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var sizeInBytes = tr.b.Unit.byName.sizeInBytes;
- var powerInWatts = tr.b.Unit.byName.powerInWatts;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addChildDump = tr.model.MemoryDumpTestUtils.addChildDump;
- var checkDumpNumericsAndDiagnostics =
- tr.model.MemoryDumpTestUtils.checkDumpNumericsAndDiagnostics;
-
- test('memoryAllocatorDump_instantiate', function() {
- var containerDump = new ContainerMemoryDump(42);
- containerDump.containerName = 'super dump';
- var dump = new MemoryAllocatorDump(containerDump, 'v8/objects/object7');
-
- assert.equal(dump.name, 'object7');
- assert.equal(dump.fullName, 'v8/objects/object7');
- assert.strictEqual(dump.containerMemoryDump, containerDump);
- assert.equal(dump.quantifiedName, '\'v8/objects/object7\' in super dump');
- });
-
- test('memoryAllocatorDumps_aggregateNumericsRecursively', function() {
- var md = new ContainerMemoryDump(42);
-
- var oilpanDump = newAllocatorDump(md, 'oilpan', {numerics: {
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 7)
- }});
-
- addChildDump(oilpanDump, 'bucket1', {numerics: {
- size: 512,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 3),
- inner_size: 256,
- outer_size: 1024
- }});
-
- var oilpanBucket2Dump = addChildDump(oilpanDump, 'bucket2');
-
- var oilpanBucket2StringsDump = addChildDump(oilpanBucket2Dump, 'strings', {
- numerics: {
- size: 512,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 4),
- inner_size: 512,
- outer_size: 2048
- }
- });
-
- oilpanDump.aggregateNumericsRecursively();
-
- // oilpan has *some* numerics aggregated.
- checkDumpNumericsAndDiagnostics(oilpanDump, {
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 7),
- inner_size: 768,
- outer_size: 3072
- }, {});
-
- // oilpan/bucket2 has *all* numerics aggregated (except for size).
- checkDumpNumericsAndDiagnostics(oilpanBucket2Dump, {
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 4),
- inner_size: 512,
- outer_size: 2048
- }, {});
-
- // oilpan/bucket2/strings has *no* numerics aggregated.
- checkDumpNumericsAndDiagnostics(oilpanBucket2StringsDump, {
- size: 512,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 4),
- inner_size: 512,
- outer_size: 2048
- }, {});
- });
-
- test('memoryAllocatorDump_aggregateNumerics', function() {
- function checkAggregateNumerics(numerics, expectedValue, expectedUnit,
- opt_expectedWarningCount) {
- function checkResult(result) {
- if (expectedValue === undefined) {
- assert.isUndefined(result);
- assert.isUndefined(expectedUnit); // Test sanity check.
- } else {
- assert.instanceOf(result, ScalarNumeric);
- assert.strictEqual(result.value, expectedValue);
- assert.strictEqual(result.unit, expectedUnit);
- }
- }
-
- // Without model parameter.
- var result1 = MemoryAllocatorDump.aggregateNumerics(numerics);
- checkResult(result1);
-
- // With model parameter.
- var mockModel = {
- warnings: [],
- importWarning: function(warning) {
- this.warnings.push(warning);
- }
- };
- var result2 = MemoryAllocatorDump.aggregateNumerics(numerics, mockModel);
- checkResult(result2);
- assert.lengthOf(mockModel.warnings, opt_expectedWarningCount || 0);
- }
-
- // No defined numerics.
- checkAggregateNumerics([], undefined);
- checkAggregateNumerics([undefined], undefined);
- checkAggregateNumerics([undefined, undefined], undefined);
-
- // Consistent units.
- checkAggregateNumerics(
- [new ScalarNumeric(unitlessNumber_smallerIsBetter, 10)],
- 10, unitlessNumber_smallerIsBetter);
- checkAggregateNumerics(
- [new ScalarNumeric(sizeInBytes, 10),
- new ScalarNumeric(sizeInBytes, 20),
- new ScalarNumeric(sizeInBytes, 40)],
- 70, sizeInBytes);
- checkAggregateNumerics(
- [undefined,
- new ScalarNumeric(sizeInBytes, 16),
- undefined,
- new ScalarNumeric(sizeInBytes, 32),
- undefined],
- 48, sizeInBytes);
-
- // Inconsistent units.
- checkAggregateNumerics(
- [new ScalarNumeric(sizeInBytes, 10),
- new ScalarNumeric(powerInWatts, 20)],
- 30, unitlessNumber_smallerIsBetter, 1 /* opt_expectedWarningCount */);
- checkAggregateNumerics(
- [undefined,
- new ScalarNumeric(powerInWatts, 16),
- undefined,
- new ScalarNumeric(unitlessNumber_smallerIsBetter, 32),
- undefined,
- new ScalarNumeric(sizeInBytes, 64),
- undefined],
- 112, unitlessNumber_smallerIsBetter, 1 /* opt_expectedWarningCount */);
- });
-
- test('memoryAllocatorDumps_isDescendantOf', function() {
- var md = new ContainerMemoryDump(42);
-
- var v8Dump = new MemoryAllocatorDump(md, 'v8');
- var v8HeapsDump = addChildDump(v8Dump, 'heaps');
- var v8ObjectsDump = addChildDump(v8Dump, 'objects');
- var v8Object1Dump = addChildDump(v8ObjectsDump, 'obj1');
- var v8Object2Dump = addChildDump(v8ObjectsDump, 'obj2');
-
- var oilpanDump = new MemoryAllocatorDump(md, 'oilpan');
-
- assert.isTrue(v8Dump.isDescendantOf(v8Dump));
- assert.isTrue(v8HeapsDump.isDescendantOf(v8Dump));
- assert.isTrue(v8ObjectsDump.isDescendantOf(v8Dump));
- assert.isTrue(v8Object1Dump.isDescendantOf(v8Dump));
- assert.isTrue(v8Object2Dump.isDescendantOf(v8Dump));
- assert.isTrue(v8ObjectsDump.isDescendantOf(v8ObjectsDump));
- assert.isTrue(v8Object1Dump.isDescendantOf(v8ObjectsDump));
- assert.isTrue(v8Object2Dump.isDescendantOf(v8ObjectsDump));
- assert.isTrue(oilpanDump.isDescendantOf(oilpanDump));
-
- assert.isFalse(v8Dump.isDescendantOf(oilpanDump));
- assert.isFalse(v8Dump.isDescendantOf(v8HeapsDump));
- assert.isFalse(v8Dump.isDescendantOf(v8ObjectsDump));
- assert.isFalse(v8Dump.isDescendantOf(v8Object1Dump));
- assert.isFalse(v8Dump.isDescendantOf(v8Object2Dump));
- assert.isFalse(v8Object1Dump.isDescendantOf(v8Object2Dump));
- assert.isFalse(v8Object2Dump.isDescendantOf(v8Object1Dump));
- });
-
- test('memoryAllocatorDumps_getDescendantDumpByFullName', function() {
- var containerDump = new ContainerMemoryDump(42);
-
- var gpuDump = new MemoryAllocatorDump(containerDump, 'gpu');
- containerDump.memoryAllocatorDumps = [gpuDump];
-
- var memtrackDump = addChildDump(gpuDump, 'android_memtrack');
- var glDump = addChildDump(memtrackDump, 'gl');
- var gfxDump = addChildDump(memtrackDump, 'gfx');
- var tileDump = addChildDump(gfxDump, 'tile');
-
- assert.strictEqual(gpuDump.getDescendantDumpByFullName(
- 'android_memtrack'), memtrackDump);
- assert.strictEqual(gpuDump.getDescendantDumpByFullName(
- 'android_memtrack/gfx/tile'), tileDump);
- assert.strictEqual(memtrackDump.getDescendantDumpByFullName('gl'), glDump);
- assert.strictEqual(memtrackDump.getDescendantDumpByFullName(
- 'gfx/tile'), tileDump);
- });
-
- test('memoryAllocatorDumpLink_instantiate', function() {
- var d1 = new MemoryAllocatorDump('v8/isolate1');
- var d2 = new MemoryAllocatorDump('oilpan/document1');
- var link = new MemoryAllocatorDumpLink(d1, d2, 3);
-
- assert.strictEqual(link.source, d1);
- assert.strictEqual(link.target, d2);
- assert.strictEqual(link.importance, 3);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/memory_dump_test_utils.html b/chromium/third_party/catapult/tracing/tracing/model/memory_dump_test_utils.html
deleted file mode 100644
index eaad055b4d3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/memory_dump_test_utils.html
+++ /dev/null
@@ -1,215 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper functions for tests involving memory dumps.
- */
-tr.exportTo('tr.model', function() {
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
- var MemoryAllocatorDump = tr.model.MemoryAllocatorDump;
- var MemoryAllocatorDumpLink = tr.model.MemoryAllocatorDumpLink;
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
-
- function castToScalarNumeric(value) {
- if (typeof value === 'number')
- return new ScalarNumeric(sizeInBytes_smallerIsBetter, value);
- assert.instanceOf(value, ScalarNumeric);
- return value;
- }
-
- function getOption(opt_options, key, opt_defaultValue) {
- if (opt_options && (key in opt_options))
- return opt_options[key];
- else
- return opt_defaultValue;
- }
-
- function MemoryDumpTestUtils() {
- throw new Error('Static class');
- }
-
- MemoryDumpTestUtils.SIZE_DELTA = 0.0001;
-
- /**
- * Create a new global memory dump and add it to a model.
- *
- * @param {!tr.Model} model The trace model to which the new global dump
- * should be added.
- * @param {!{
- * ts: (number|undefined),
- * duration: (number|undefined),
- * levelOfDetail: (!tr.model.ContainerMemoryDump.LevelOfDetail|undefined)
- * }=} opt_options Options for creating the new global dump.
- * @return {!tr.model.GlobalMemoryDump} The newly created global memory dump.
- */
- MemoryDumpTestUtils.addGlobalMemoryDump = function(model, opt_options) {
- var timestamp = getOption(opt_options, 'ts', 0);
- var gmd = new GlobalMemoryDump(model, timestamp);
- gmd.levelOfDetail = getOption(opt_options, 'levelOfDetail', LIGHT);
- gmd.duration = getOption(opt_options, 'duration', 0);
- model.globalMemoryDumps.push(gmd);
- return gmd;
- };
-
- /**
- * Create a new process memory dump and add it to a global memory dump.
- *
- * @param {!tr.model.GlobalMemoryDump} gmd The global dump to which the new
- * process dump should be added.
- * @param {!tr.model.Process} pmd The process associated with the process
- * dump.
- * @param {!{
- * ts: (number|undefined)
- * }=} opt_options Options for creating the new process dump.
- * @return {!tr.model.ProcessMemoryDump} The newly created process memory
- * dump.
- */
- MemoryDumpTestUtils.addProcessMemoryDump =
- function(gmd, process, opt_options) {
- var timestamp = getOption(opt_options, 'ts', gmd.start);
- var pmd = new ProcessMemoryDump(gmd, process, timestamp);
- process.memoryDumps.push(pmd);
- if (process.pid in gmd.processMemoryDumps) {
- // Test sanity check.
- throw new Error('Process memory dump for process with pid=' +
- process.pid + ' has already been provided');
- }
- gmd.processMemoryDumps[process.pid] = pmd;
- return pmd;
- };
-
- /**
- * Create a new memory allocator dump.
- *
- * @param {!tr.model.ContainerMemoryDump} containerDump The container dump
- * associated with the new allocator dump.
- * @param {string} fullName The full name of the new allocator dump
- * (including ancestors).
- * @param {!{
- * guid: (number|undefined),
- * numerics: (!Object<string, (number|!tr.v.ScalarNumeric)>|undefined)
- * }=} opt_options Options for creating the new allocator dump.
- * @return {!tr.model.MemoryAllocatorDump} The newly created memory allocator
- * dump.
- */
- MemoryDumpTestUtils.newAllocatorDump = function(
- containerDump, fullName, opt_options) {
- var dump = new MemoryAllocatorDump(containerDump, fullName,
- getOption(opt_options, 'guid'));
- var numerics = getOption(opt_options, 'numerics');
- if (numerics) {
- tr.b.iterItems(numerics, function(numericName, value) {
- dump.addNumeric(numericName, castToScalarNumeric(value));
- });
- }
- return dump;
- };
-
- /**
- * Create a new child memory allocator dump and add it to a parent memory
- * allocator dump.
- *
- * @param {!tr.model.MemoryAllocatorDump} parentDump The parent allocator
- * dump.
- * @param {string} name The name of the child allocator dump (excluding
- * ancestors).
- * @param {!{
- * guid: (number|undefined),
- * numerics: (!Object<string, (number|!tr.v.ScalarNumeric)>|undefined)
- * }=} opt_options Options for creating the child allocator dump.
- * @return {!tr.model.MemoryAllocatorDump} The newly created child memory
- * allocator dump.
- */
- MemoryDumpTestUtils.addChildDump = function(parentDump, name, opt_options) {
- var childDump = MemoryDumpTestUtils.newAllocatorDump(
- parentDump.containerMemoryDump, parentDump.fullName + '/' + name,
- opt_options);
- childDump.parent = parentDump;
- parentDump.children.push(childDump);
- return childDump;
- };
-
- MemoryDumpTestUtils.addOwnershipLink = function(
- ownerDump, ownedDump, opt_importance) {
- assert.isUndefined(ownerDump.owns); // Sanity check.
- var ownershipLink =
- new MemoryAllocatorDumpLink(ownerDump, ownedDump, opt_importance);
- ownerDump.owns = ownershipLink;
- ownedDump.ownedBy.push(ownershipLink);
- return ownershipLink;
- };
-
- MemoryDumpTestUtils.checkDumpNumericsAndDiagnostics =
- function(dump, expectedNumerics, expectedDiagnostics) {
- var actualNumerics = dump.numerics;
- assert.sameMembers(
- Object.keys(actualNumerics), Object.keys(expectedNumerics));
- for (var numericName in actualNumerics) {
- var actualNumeric = actualNumerics[numericName];
- var expectedNumeric = castToScalarNumeric(expectedNumerics[numericName]);
- assert.instanceOf(actualNumeric, tr.v.ScalarNumeric);
- assert.strictEqual(actualNumeric.unit, expectedNumeric.unit);
- assert.closeTo(actualNumeric.value, expectedNumeric.value,
- MemoryDumpTestUtils.SIZE_DELTA);
- }
-
- assert.deepEqual(dump.diagnostics, expectedDiagnostics);
- };
-
- MemoryDumpTestUtils.checkVMRegions = function(vmRegions, expectedRegions) {
- if (vmRegions instanceof VMRegionClassificationNode)
- vmRegions = vmRegions.allRegionsForTesting;
-
- var expectedRegionsMap = new Map();
- expectedRegions.forEach(function(region) {
- if (!(region instanceof VMRegion))
- region = VMRegion.fromDict(region);
- expectedRegionsMap.set(region.uniqueIdWithinProcess, region);
- });
- var actualRegionsMap = new Map();
- vmRegions.forEach(function(region) {
- actualRegionsMap.set(region.uniqueIdWithinProcess, region);
- });
-
- assert.strictEqual(actualRegionsMap.size, expectedRegionsMap.size);
- for (var id of expectedRegionsMap.keys()) {
- var expectedRegion = expectedRegionsMap.get(id);
- var actualRegion = actualRegionsMap.get(id);
-
- assert.instanceOf(actualRegion, VMRegion);
- assert.strictEqual(actualRegion.startAddress,
- expectedRegion.startAddress);
- assert.strictEqual(actualRegion.sizeInBytes, expectedRegion.sizeInBytes);
- assert.strictEqual(actualRegion.protectionFlags,
- expectedRegion.protectionFlags);
- assert.strictEqual(actualRegion.mappedFile, expectedRegion.mappedFile);
- assert.deepEqual(actualRegion.byteStats, expectedRegion.byteStats);
- }
- };
-
- return {
- MemoryDumpTestUtils: MemoryDumpTestUtils
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model.html b/chromium/third_party/catapult/tracing/tracing/model/model.html
deleted file mode 100644
index 81a279b47a8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model.html
+++ /dev/null
@@ -1,650 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/interval_tree.html">
-<link rel="import" href="/tracing/base/quad.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/auditor.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/alert.html">
-<link rel="import" href="/tracing/model/clock_sync_manager.html">
-<link rel="import" href="/tracing/model/constants.html">
-<link rel="import" href="/tracing/model/device.html">
-<link rel="import" href="/tracing/model/flow_event.html">
-<link rel="import" href="/tracing/model/frame.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/instant_event.html">
-<link rel="import" href="/tracing/model/kernel.html">
-<link rel="import" href="/tracing/model/model_indices.html">
-<link rel="import" href="/tracing/model/model_stats.html">
-<link rel="import" href="/tracing/model/object_snapshot.html">
-<link rel="import" href="/tracing/model/process.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/sample.html">
-<link rel="import" href="/tracing/model/stack_frame.html">
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-<link rel="import" href="/tracing/model/user_model/user_model.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Model is a parsed representation of the
- * TraceEvents obtained from base/trace_event in which the begin-end
- * tokens are converted into a hierarchy of processes, threads,
- * subrows, and slices.
- *
- * The building block of the model is a slice. A slice is roughly
- * equivalent to function call executing on a specific thread. As a
- * result, slices may have one or more subslices.
- *
- * A thread contains one or more subrows of slices. Row 0 corresponds to
- * the "root" slices, e.g. the topmost slices. Row 1 contains slices that
- * are nested 1 deep in the stack, and so on. We use these subrows to draw
- * nesting tasks.
- *
- */
-tr.exportTo('tr', function() {
- var Process = tr.model.Process;
- var Device = tr.model.Device;
- var Kernel = tr.model.Kernel;
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var GlobalInstantEvent = tr.model.GlobalInstantEvent;
- var FlowEvent = tr.model.FlowEvent;
- var Alert = tr.model.Alert;
- var Sample = tr.model.Sample;
-
- /**
- * @constructor
- */
- function Model() {
- tr.model.EventContainer.call(this);
- tr.b.EventTarget.decorate(this);
-
- this.timestampShiftToZeroAmount_ = 0;
-
- this.faviconHue = 'blue'; // Should be a key from favicons.html
-
- this.device = new Device(this);
- this.kernel = new Kernel(this);
- this.processes = {};
- this.metadata = [];
- this.categories = [];
- this.instantEvents = [];
- this.flowEvents = [];
- this.clockSyncManager = new tr.model.ClockSyncManager();
- this.intrinsicTimeUnit_ = undefined;
-
- this.stackFrames = {};
- this.samples = [];
-
- this.alerts = [];
- this.userModel = new tr.model.um.UserModel(this);
-
- this.flowIntervalTree = new tr.b.IntervalTree((f) => f.start, (f) => f.end);
- this.globalMemoryDumps = [];
-
- this.userFriendlyCategoryDrivers_ = [];
-
- this.annotationsByGuid_ = {};
- this.modelIndices = undefined;
-
- this.stats = new tr.model.ModelStats();
-
- this.importWarnings_ = [];
- this.reportedImportWarnings_ = {};
-
- this.isTimeHighResolution_ = true;
-
- this.patchupsToApply_ = [];
-
- this.doesHelperGUIDSupportThisModel_ = {};
- this.helpersByConstructorGUID_ = {};
- this.eventsByStableId_ = undefined;
- }
-
- Model.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- getEventByStableId: function(stableId) {
- if (this.eventsByStableId_ === undefined) {
- this.eventsByStableId_ = {};
- for (var event of this.getDescendantEvents()) {
- this.eventsByStableId_[event.stableId] = event;
- }
- }
- return this.eventsByStableId_[stableId];
- },
-
- getOrCreateHelper: function(constructor) {
- if (!constructor.guid)
- throw new Error('Helper constructors must have GUIDs');
-
- if (this.helpersByConstructorGUID_[constructor.guid] === undefined) {
- if (this.doesHelperGUIDSupportThisModel_[constructor.guid] ===
- undefined) {
- this.doesHelperGUIDSupportThisModel_[constructor.guid] =
- constructor.supportsModel(this);
- }
-
- if (!this.doesHelperGUIDSupportThisModel_[constructor.guid])
- return undefined;
-
- this.helpersByConstructorGUID_[constructor.guid] = new constructor(
- this);
- }
- return this.helpersByConstructorGUID_[constructor.guid];
- },
-
- childEvents: function*() {
- yield * this.globalMemoryDumps;
- yield * this.instantEvents;
- yield * this.flowEvents;
- yield * this.alerts;
- yield * this.samples;
- },
-
- childEventContainers: function*() {
- yield this.userModel;
- yield this.device;
- yield this.kernel;
- yield * tr.b.dictionaryValues(this.processes);
- },
-
- /**
- * Some objects in the model can persist their state in ModelSettings.
- *
- * This iterates through them.
- */
- iterateAllPersistableObjects: function(callback) {
- this.kernel.iterateAllPersistableObjects(callback);
- for (var pid in this.processes)
- this.processes[pid].iterateAllPersistableObjects(callback);
- },
-
- updateBounds: function() {
- this.bounds.reset();
- var bounds = this.bounds;
- for (var ec of this.childEventContainers()) {
- ec.updateBounds();
- bounds.addRange(ec.bounds);
- }
- for (var event of this.childEvents())
- event.addBoundsToRange(bounds);
- },
-
- shiftWorldToZero: function() {
- var shiftAmount = -this.bounds.min;
- this.timestampShiftToZeroAmount_ = shiftAmount;
- for (var ec of this.childEventContainers())
- ec.shiftTimestampsForward(shiftAmount);
-
- for (var event of this.childEvents())
- event.start += shiftAmount;
- this.updateBounds();
- },
-
- convertTimestampToModelTime: function(sourceClockDomainName, ts) {
- if (sourceClockDomainName !== 'traceEventClock')
- throw new Error('Only traceEventClock is supported.');
- return tr.b.Unit.timestampFromUs(ts) +
- this.timestampShiftToZeroAmount_;
- },
-
- get numProcesses() {
- var n = 0;
- for (var p in this.processes)
- n++;
- return n;
- },
-
- /**
- * @return {Process} Gets a TimelineProcess for a specified pid. Returns
- * undefined if the process doesn't exist.
- */
- getProcess: function(pid) {
- return this.processes[pid];
- },
-
- /**
- * @return {Process} Gets a TimelineProcess for a specified pid or
- * creates one if it does not exist.
- */
- getOrCreateProcess: function(pid) {
- if (!this.processes[pid])
- this.processes[pid] = new Process(this, pid);
- return this.processes[pid];
- },
-
- addStackFrame: function(stackFrame) {
- if (this.stackFrames[stackFrame.id])
- throw new Error('Stack frame already exists');
- this.stackFrames[stackFrame.id] = stackFrame;
- return stackFrame;
- },
-
- /**
- * Generates the set of categories from the slices and counters.
- */
- updateCategories_: function() {
- var categoriesDict = {};
- this.userModel.addCategoriesToDict(categoriesDict);
- this.device.addCategoriesToDict(categoriesDict);
- this.kernel.addCategoriesToDict(categoriesDict);
- for (var pid in this.processes)
- this.processes[pid].addCategoriesToDict(categoriesDict);
-
- this.categories = [];
- for (var category in categoriesDict)
- if (category !== '')
- this.categories.push(category);
- },
-
- getAllThreads: function() {
- var threads = [];
- for (var tid in this.kernel.threads) {
- threads.push(process.threads[tid]);
- }
- for (var pid in this.processes) {
- var process = this.processes[pid];
- for (var tid in process.threads) {
- threads.push(process.threads[tid]);
- }
- }
- return threads;
- },
-
- /**
- * @param {(!function(!tr.model.Process): boolean)=} opt_predicate Optional
- * predicate for filtering the returned processes. If undefined, all
- * process in the model will be returned.
- * @return {!Array<!tr.model.Process>} An array of processes in the model.
- */
- getAllProcesses: function(opt_predicate) {
- var processes = [];
- for (var pid in this.processes) {
- var process = this.processes[pid];
- if (opt_predicate === undefined || opt_predicate(process))
- processes.push(process);
- }
- return processes;
- },
-
- /**
- * @return {Array} An array of all the counters in the model.
- */
- getAllCounters: function() {
- var counters = [];
- counters.push.apply(
- counters, tr.b.dictionaryValues(this.device.counters));
- counters.push.apply(
- counters, tr.b.dictionaryValues(this.kernel.counters));
- for (var pid in this.processes) {
- var process = this.processes[pid];
- for (var tid in process.counters) {
- counters.push(process.counters[tid]);
- }
- }
- return counters;
- },
-
- getAnnotationByGUID: function(guid) {
- return this.annotationsByGuid_[guid];
- },
-
- addAnnotation: function(annotation) {
- if (!annotation.guid)
- throw new Error('Annotation with undefined guid given');
-
- this.annotationsByGuid_[annotation.guid] = annotation;
- tr.b.dispatchSimpleEvent(this, 'annotationChange');
- },
-
- removeAnnotation: function(annotation) {
- this.annotationsByGuid_[annotation.guid].onRemove();
- delete this.annotationsByGuid_[annotation.guid];
- tr.b.dispatchSimpleEvent(this, 'annotationChange');
- },
-
- getAllAnnotations: function() {
- return tr.b.dictionaryValues(this.annotationsByGuid_);
- },
-
- addUserFriendlyCategoryDriver: function(ufcd) {
- this.userFriendlyCategoryDrivers_.push(ufcd);
- },
-
- /**
- * Gets the user friendly category string from an event.
- *
- * Returns undefined if none is known.
- */
- getUserFriendlyCategoryFromEvent: function(event) {
- for (var i = 0; i < this.userFriendlyCategoryDrivers_.length; i++) {
- var ufc = this.userFriendlyCategoryDrivers_[i].fromEvent(event);
- if (ufc !== undefined)
- return ufc;
- }
- return undefined;
- },
-
- /**
- * @param {String} The name of the thread to find.
- * @return {Array} An array of all the matched threads.
- */
- findAllThreadsNamed: function(name) {
- var namedThreads = [];
- namedThreads.push.apply(
- namedThreads,
- this.kernel.findAllThreadsNamed(name));
- for (var pid in this.processes) {
- namedThreads.push.apply(
- namedThreads,
- this.processes[pid].findAllThreadsNamed(name));
- }
- return namedThreads;
- },
-
- get importOptions() {
- return this.importOptions_;
- },
-
- set importOptions(options) {
- this.importOptions_ = options;
- },
-
- /**
- * Returns a time unit that is used to format values and determines the
- * precision of the timestamp values.
- */
- get intrinsicTimeUnit() {
- if (this.intrinsicTimeUnit_ === undefined)
- return tr.b.TimeDisplayModes.ms;
- return this.intrinsicTimeUnit_;
- },
-
- set intrinsicTimeUnit(value) {
- if (this.intrinsicTimeUnit_ === value)
- return;
- if (this.intrinsicTimeUnit_ !== undefined)
- throw new Error('Intrinsic time unit already set');
- this.intrinsicTimeUnit_ = value;
- },
-
- get isTimeHighResolution() {
- return this.isTimeHighResolution_;
- },
-
- set isTimeHighResolution(value) {
- this.isTimeHighResolution_ = value;
- },
-
- /**
- * Returns a link to a trace data file that this model was imported from.
- * This is NOT the URL of a site being traced, but instead an indicator of
- * where the data is stored.
- */
- get canonicalUrl() {
- return this.canonicalUrl_;
- },
-
- set canonicalUrl(value) {
- if (this.canonicalUrl_ === value)
- return;
- if (this.canonicalUrl_ !== undefined)
- throw new Error('canonicalUrl already set');
- this.canonicalUrl_ = value;
- },
-
- /**
- * Saves a warning that happened during import.
- *
- * Warnings are typically logged to the console, and optionally, the
- * more critical ones are shown to the user.
- *
- * @param {Object} data The import warning data. Data must provide two
- * accessors: type, message. The types are used to determine if we
- * should output the message, we'll only output one message of each type.
- * The message is the actual warning content.
- */
- importWarning: function(data) {
- data.showToUser = !!data.showToUser;
-
- this.importWarnings_.push(data);
-
- // Only log each warning type once. We may want to add some kind of
- // flag to allow reporting all importer warnings.
- if (this.reportedImportWarnings_[data.type] === true)
- return;
-
- if (this.importOptions_.showImportWarnings)
- console.warn(data.message);
-
- this.reportedImportWarnings_[data.type] = true;
- },
-
- get hasImportWarnings() {
- return (this.importWarnings_.length > 0);
- },
-
- get importWarnings() {
- return this.importWarnings_;
- },
-
- get importWarningsThatShouldBeShownToUser() {
- return this.importWarnings_.filter(function(warning) {
- return warning.showToUser;
- });
- },
-
- autoCloseOpenSlices: function() {
- // Sort the samples.
- this.samples.sort(function(x, y) {
- return x.start - y.start;
- });
-
- this.updateBounds();
- this.kernel.autoCloseOpenSlices();
- for (var pid in this.processes)
- this.processes[pid].autoCloseOpenSlices();
- },
-
- createSubSlices: function() {
- this.kernel.createSubSlices();
- for (var pid in this.processes)
- this.processes[pid].createSubSlices();
- },
-
- preInitializeObjects: function() {
- for (var pid in this.processes)
- this.processes[pid].preInitializeObjects();
- },
-
- initializeObjects: function() {
- for (var pid in this.processes)
- this.processes[pid].initializeObjects();
- },
-
- pruneEmptyContainers: function() {
- this.kernel.pruneEmptyContainers();
- for (var pid in this.processes)
- this.processes[pid].pruneEmptyContainers();
- },
-
- mergeKernelWithUserland: function() {
- for (var pid in this.processes)
- this.processes[pid].mergeKernelWithUserland();
- },
-
- computeWorldBounds: function(shiftWorldToZero) {
- this.updateBounds();
- this.updateCategories_();
-
- if (shiftWorldToZero)
- this.shiftWorldToZero();
- },
-
- buildFlowEventIntervalTree: function() {
- for (var i = 0; i < this.flowEvents.length; ++i) {
- var flowEvent = this.flowEvents[i];
- this.flowIntervalTree.insert(flowEvent);
- }
- this.flowIntervalTree.updateHighValues();
- },
-
- cleanupUndeletedObjects: function() {
- for (var pid in this.processes)
- this.processes[pid].autoDeleteObjects(this.bounds.max);
- },
-
- sortMemoryDumps: function() {
- this.globalMemoryDumps.sort(function(x, y) {
- return x.start - y.start;
- });
-
- for (var pid in this.processes)
- this.processes[pid].sortMemoryDumps();
- },
-
- finalizeMemoryGraphs: function() {
- this.globalMemoryDumps.forEach(function(dump) {
- dump.finalizeGraph();
- });
- },
-
- buildEventIndices: function() {
- this.modelIndices = new tr.model.ModelIndices(this);
- },
-
- sortAlerts: function() {
- this.alerts.sort(function(x, y) {
- return x.start - y.start;
- });
- },
-
- applyObjectRefPatchups: function() {
- // Change all the fields pointing at id_refs to their real values.
- var unresolved = [];
- this.patchupsToApply_.forEach(function(patchup) {
- if (patchup.pidRef in this.processes) {
- var snapshot = this.processes[patchup.pidRef].objects.getSnapshotAt(
- patchup.scopedId, patchup.ts);
- if (snapshot) {
- patchup.object[patchup.field] = snapshot;
- snapshot.referencedAt(patchup.item, patchup.object, patchup.field);
- return;
- }
- }
- unresolved.push(patchup);
- }, this);
- this.patchupsToApply_ = unresolved;
- },
-
- replacePIDRefsInPatchups: function(oldPidRef, newPidRef) {
- this.patchupsToApply_.forEach(function(patchup) {
- if (patchup.pidRef === oldPidRef) {
- patchup.pidRef = newPidRef;
- }
- });
- },
-
- /**
- * Called by the model to join references between objects, after final model
- * bounds have been computed.
- */
- joinRefs: function() {
- this.joinObjectRefs_();
- this.applyObjectRefPatchups();
- },
-
- joinObjectRefs_: function() {
- tr.b.iterItems(this.processes, function(pid, process) {
- this.joinObjectRefsForProcess_(pid, process);
- }, this);
- },
-
- joinObjectRefsForProcess_: function(pid, process) {
- // Iterate the world, looking for id_refs
- tr.b.iterItems(process.threads, function(tid, thread) {
- thread.asyncSliceGroup.slices.forEach(function(item) {
- this.searchItemForIDRefs_(pid, 'start', item);
- }, this);
- thread.sliceGroup.slices.forEach(function(item) {
- this.searchItemForIDRefs_(pid, 'start', item);
- }, this);
- }, this);
- process.objects.iterObjectInstances(function(instance) {
- instance.snapshots.forEach(function(item) {
- this.searchItemForIDRefs_(pid, 'ts', item);
- }, this);
- }, this);
- },
-
- searchItemForIDRefs_: function(pid, itemTimestampField, item) {
- if (!item.args && !item.contexts)
- return;
- var patchupsToApply = this.patchupsToApply_;
-
- function handleField(object, fieldName, fieldValue) {
- if (!fieldValue || (!fieldValue.id_ref && !fieldValue.idRef))
- return;
-
- var scope = fieldValue.scope || tr.model.OBJECT_DEFAULT_SCOPE;
- var idRef = fieldValue.id_ref || fieldValue.idRef;
- var scopedId = new tr.model.ScopedId(scope, idRef);
- var pidRef = fieldValue.pid_ref || fieldValue.pidRef || pid;
- var ts = item[itemTimestampField];
- // We have to delay the actual change to the new value until after all
- // refs have been located. Otherwise, we could end up recursing in
- // ways we definitely didn't intend.
- patchupsToApply.push({
- item: item,
- object: object,
- field: fieldName,
- pidRef: pidRef,
- scopedId: scopedId,
- ts: ts});
- }
- function iterObjectFieldsRecursively(object) {
- if (!(object instanceof Object))
- return;
-
- if ((object instanceof tr.model.ObjectSnapshot) ||
- (object instanceof Float32Array) ||
- (object instanceof tr.b.Quad))
- return;
-
- if (object instanceof Array) {
- for (var i = 0; i < object.length; i++) {
- handleField(object, i, object[i]);
- iterObjectFieldsRecursively(object[i]);
- }
- return;
- }
-
- for (var key in object) {
- var value = object[key];
- handleField(object, key, value);
- iterObjectFieldsRecursively(value);
- }
- }
-
- iterObjectFieldsRecursively(item.args);
- iterObjectFieldsRecursively(item.contexts);
- }
- };
-
- return {
- Model: Model
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_indices.html b/chromium/third_party/catapult/tracing/tracing/model/model_indices.html
deleted file mode 100644
index 5a132f8fecf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_indices.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Event Index class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * A Event Index maps an id to all the events that have that particular id
- *
- * @constructor
- */
- function ModelIndices(model) {
- // For now the only indices we construct are for flowEvents
- this.flowEventsById_ = {};
- model.flowEvents.forEach(function(fe) {
- if (fe.id !== undefined) {
- if (!this.flowEventsById_.hasOwnProperty(fe.id)) {
- this.flowEventsById_[fe.id] = new Array();
- }
- this.flowEventsById_[fe.id].push(fe);
- }
- }, this);
- }
-
- ModelIndices.prototype = {
- addEventWithId: function(id, event) {
- if (!this.flowEventsById_.hasOwnProperty(id)) {
- this.flowEventsById_[id] = new Array();
- }
- this.flowEventsById_[id].push(event);
- },
-
- getFlowEventsWithId: function(id) {
- if (!this.flowEventsById_.hasOwnProperty(id))
- return [];
- return this.flowEventsById_[id];
- }
- };
-
- return {
- ModelIndices: ModelIndices
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_indices_test.html b/chromium/third_party/catapult/tracing/tracing/model/model_indices_test.html
deleted file mode 100644
index 750e0b02390..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_indices_test.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newFlowEventEx = tr.c.TestUtils.newFlowEventEx;
- var newModel = tr.c.TestUtils.newModel;
-
- test('getCorrectModelIndices', function() {
- var m = newModel(function(m) {
- m.f1 = newFlowEventEx({
- 'title': 'test1',
- start: 0,
- end: 10,
- id: '0x100'
- });
-
- m.f2 = newFlowEventEx({
- 'title': 'test2',
- start: 0,
- end: 10,
- id: '0x100'
- });
-
- m.flowEvents.push(m.f1);
- m.flowEvents.push(m.f2);
- });
-
- assert.isDefined(m.modelIndices);
- var modelIndices = m.modelIndices;
- assert.equal(modelIndices.getFlowEventsWithId('0x100').length, 2);
- assert.equal(modelIndices.getFlowEventsWithId('0x100')[0].id, '0x100');
- assert.equal(modelIndices.getFlowEventsWithId('0x101').length, 0);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_settings.html b/chromium/third_party/catapult/tracing/tracing/model/model_settings.html
deleted file mode 100644
index fbe69d60b66..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_settings.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/settings.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var Settings = tr.b.Settings;
-
- /**
- * A way to persist settings specific to parts of a trace model.
- *
- * This object should not be persisted because it builds up internal data
- * structures that map model objects to settings keys. It should thus be
- * created for the duration of whatever interaction(s) you're going to do with
- * model settings, and then discarded.
- *
- * This system works on a notion of an object key: for an object's key, it
- * considers all the other keys in the model. If it is unique, then the key is
- * persisted to tr.b.Settings. However, if it is not unique, then the
- * setting is stored on the object itself. Thus, objects with unique keys will
- * be persisted across page reloads, whereas objects with nonunique keys will
- * not.
- */
- function ModelSettings(model) {
- this.model = model;
- this.objectsByKey_ = [];
- this.nonuniqueKeys_ = [];
- this.buildObjectsByKeyMap_();
- this.removeNonuniqueKeysFromSettings_();
- this.ephemeralSettingsByGUID_ = {};
- }
-
- ModelSettings.prototype = {
- buildObjectsByKeyMap_: function() {
- var objects = [];
- this.model.iterateAllPersistableObjects(function(o) {
- objects.push(o);
- });
-
- var objectsByKey = {};
- var NONUNIQUE_KEY = 'nonuniqueKey';
- for (var i = 0; i < objects.length; i++) {
- var object = objects[i];
- var objectKey = object.getSettingsKey();
- if (!objectKey)
- continue;
- if (objectsByKey[objectKey] === undefined) {
- objectsByKey[objectKey] = object;
- continue;
- }
- objectsByKey[objectKey] = NONUNIQUE_KEY;
- }
-
- var nonuniqueKeys = {};
- tr.b.dictionaryKeys(objectsByKey).forEach(function(objectKey) {
- if (objectsByKey[objectKey] !== NONUNIQUE_KEY)
- return;
- delete objectsByKey[objectKey];
- nonuniqueKeys[objectKey] = true;
- });
-
- this.nonuniqueKeys = nonuniqueKeys;
- this.objectsByKey_ = objectsByKey;
- },
-
- removeNonuniqueKeysFromSettings_: function() {
- var settings = Settings.get('trace_model_settings', {});
- var settingsChanged = false;
- tr.b.dictionaryKeys(settings).forEach(function(objectKey) {
- if (!this.nonuniqueKeys[objectKey])
- return;
- settingsChanged = true;
- delete settings[objectKey];
- }, this);
- if (settingsChanged)
- Settings.set('trace_model_settings', settings);
- },
-
- hasUniqueSettingKey: function(object) {
- var objectKey = object.getSettingsKey();
- if (!objectKey)
- return false;
- return this.objectsByKey_[objectKey] !== undefined;
- },
-
- getSettingFor: function(object, objectLevelKey, defaultValue) {
- var objectKey = object.getSettingsKey();
- if (!objectKey || !this.objectsByKey_[objectKey]) {
- var settings = this.getEphemeralSettingsFor_(object);
- var ephemeralValue = settings[objectLevelKey];
- if (ephemeralValue !== undefined)
- return ephemeralValue;
- return defaultValue;
- }
-
- var settings = Settings.get('trace_model_settings', {});
- if (!settings[objectKey])
- settings[objectKey] = {};
- var value = settings[objectKey][objectLevelKey];
- if (value !== undefined)
- return value;
- return defaultValue;
- },
-
- setSettingFor: function(object, objectLevelKey, value) {
- var objectKey = object.getSettingsKey();
- if (!objectKey || !this.objectsByKey_[objectKey]) {
- this.getEphemeralSettingsFor_(object)[objectLevelKey] = value;
- return;
- }
-
- var settings = Settings.get('trace_model_settings', {});
- if (!settings[objectKey])
- settings[objectKey] = {};
- if (settings[objectKey][objectLevelKey] === value)
- return;
- settings[objectKey][objectLevelKey] = value;
- Settings.set('trace_model_settings', settings);
- },
-
- getEphemeralSettingsFor_: function(object) {
- if (object.guid === undefined)
- throw new Error('Only objects with GUIDs can be persisted');
- if (this.ephemeralSettingsByGUID_[object.guid] === undefined)
- this.ephemeralSettingsByGUID_[object.guid] = {};
- return this.ephemeralSettingsByGUID_[object.guid];
- }
- };
-
- return {
- ModelSettings: ModelSettings
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_settings_test.html b/chromium/third_party/catapult/tracing/tracing/model/model_settings_test.html
deleted file mode 100644
index 3b7b58ee107..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_settings_test.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/model_settings.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('process_name_uniqueness_0', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var settings = new tr.model.ModelSettings(model);
- assert.isFalse(settings.hasUniqueSettingKey(p1));
- });
-
- test('process_name_uniqueness_1', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- p1.name = 'Browser';
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.hasUniqueSettingKey(p1));
- });
-
- test('process_name_uniqueness_2', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var p2 = model.getOrCreateProcess(2);
- p1.name = 'Renderer';
- p2.name = 'Renderer';
- var settings = new tr.model.ModelSettings(model);
- assert.isFalse(settings.hasUniqueSettingKey(p1));
- assert.isFalse(settings.hasUniqueSettingKey(p2));
- });
-
- test('process_name_uniqueness_3', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var p2 = model.getOrCreateProcess(2);
- p1.name = 'Renderer';
- p1.labels.push('Google Search');
- p2.name = 'Renderer';
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.hasUniqueSettingKey(p1));
- assert.isTrue(settings.hasUniqueSettingKey(p2));
- });
-
- test('thread_name_uniqueness_0', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var p2 = model.getOrCreateProcess(2);
- var t1 = p1.getOrCreateThread(1);
- var t2 = p2.getOrCreateThread(2);
- p1.name = 'Browser';
- p2.name = 'Renderer';
- t1.name = 'Main';
- t2.name = 'Main';
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.hasUniqueSettingKey(t1));
- assert.isTrue(settings.hasUniqueSettingKey(t2));
- });
-
- test('thread_name_uniqueness_1', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var p2 = model.getOrCreateProcess(2);
- var t1 = p1.getOrCreateThread(1);
- var t2 = p2.getOrCreateThread(2);
- p1.name = 'Renderer';
- p2.name = 'Renderer';
- t1.name = 'Main';
- t2.name = 'Main';
- var settings = new tr.model.ModelSettings(model);
- assert.isFalse(settings.hasUniqueSettingKey(t1));
- assert.isFalse(settings.hasUniqueSettingKey(t2));
- });
-
- test('process_persistence_when_not_unique', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.getSettingFor(p1, 'true_by_default', true));
-
- settings.setSettingFor(p1, 'true_by_default', false);
- assert.isFalse(settings.getSettingFor(p1, 'true_by_default', true));
-
- // Now, clobber the model, and verify that it didn't persist.
- model = new tr.Model();
- p1 = model.getOrCreateProcess(1);
- settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.getSettingFor(p1, 'true_by_default', true));
- });
-
- test('process_persistence_when_not_unique_with_name', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- p1.name = 'Browser';
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.getSettingFor(p1, 'true_by_default', true));
-
- settings.setSettingFor(p1, 'true_by_default', false);
- assert.isFalse(settings.getSettingFor(p1, 'true_by_default', true));
-
- // Now, clobber the model, and verify that it persisted.
- model = new tr.Model();
- p1 = model.getOrCreateProcess(1);
- p1.name = 'Browser';
- settings = new tr.model.ModelSettings(model);
- assert.isFalse(settings.getSettingFor(p1, 'true_by_default', true));
- });
-
- test('thread_persistence_when_not_unique', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var p2 = model.getOrCreateProcess(2);
- var t1 = p1.getOrCreateThread(1);
- var t2 = p2.getOrCreateThread(2);
- p1.name = 'Renderer';
- p2.name = 'Renderer';
- t1.name = 'Main';
- t2.name = 'Main';
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.getSettingFor(t1, 'true_by_default', true));
-
- settings.setSettingFor(t1, 'true_by_default', false);
- assert.isFalse(settings.getSettingFor(t1, 'true_by_default', true));
-
- // Now, clobber the model, and verify that it persisted.
- model = new tr.Model();
- p1 = model.getOrCreateProcess(1);
- p2 = model.getOrCreateProcess(2);
- t1 = p1.getOrCreateThread(1);
- t2 = p2.getOrCreateThread(2);
- p1.name = 'Renderer';
- p2.name = 'Renderer';
- t1.name = 'Main';
- t2.name = 'Main';
- settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.getSettingFor(t1, 'true_by_default', true));
- });
-
- test('thread_persistence_when_unique', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var p2 = model.getOrCreateProcess(2);
- var t1 = p1.getOrCreateThread(1);
- var t2 = p2.getOrCreateThread(2);
- p1.name = 'Browser';
- p2.name = 'Renderer';
- t1.name = 'Main';
- t2.name = 'Main';
- var settings = new tr.model.ModelSettings(model);
- assert.isTrue(settings.getSettingFor(t1, 'true_by_default', true));
-
- settings.setSettingFor(t1, 'true_by_default', false);
- assert.isFalse(settings.getSettingFor(t1, 'true_by_default', true));
-
- // Now, clobber the model, and verify that it persisted.
- model = new tr.Model();
- p1 = model.getOrCreateProcess(1);
- p2 = model.getOrCreateProcess(2);
- t1 = p1.getOrCreateThread(1);
- t2 = p2.getOrCreateThread(2);
- p1.name = 'Browser';
- p2.name = 'Renderer';
- t1.name = 'Main';
- t2.name = 'Main';
- settings = new tr.model.ModelSettings(model);
- assert.isFalse(settings.getSettingFor(t1, 'true_by_default', true));
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_stats.html b/chromium/third_party/catapult/tracing/tracing/model/model_stats.html
deleted file mode 100644
index 8a3f1d4056d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_stats.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- /**
- * @constructor
- */
- function ModelStats() {
- this.traceEventCountsByKey_ = new Map();
- this.allTraceEventStats_ = [];
-
- this.traceEventStatsInTimeIntervals_ = new Map();
- this.allTraceEventStatsInTimeIntervals_ = [];
-
- this.hasEventSizesinBytes_ = false;
- }
-
- ModelStats.prototype = {
- TIME_INTERVAL_SIZE_IN_MS: 100,
-
- willProcessBasicTraceEvent: function(phase, category, title, ts,
- opt_eventSizeinBytes) {
- var key = phase + '/' + category + '/' + title;
- var eventStats = this.traceEventCountsByKey_.get(key);
- if (eventStats === undefined) {
- eventStats = {
- phase: phase,
- category: category,
- title: title,
- numEvents: 0,
- totalEventSizeinBytes: 0
- };
- this.traceEventCountsByKey_.set(key, eventStats);
- this.allTraceEventStats_.push(eventStats);
- }
- eventStats.numEvents++;
-
- var timeIntervalKey = Math.floor(
- tr.b.Unit.timestampFromUs(ts) / this.TIME_INTERVAL_SIZE_IN_MS);
- var eventStatsByTimeInverval =
- this.traceEventStatsInTimeIntervals_.get(timeIntervalKey);
- if (eventStatsByTimeInverval === undefined) {
- eventStatsByTimeInverval = {
- timeInterval: timeIntervalKey,
- numEvents: 0,
- totalEventSizeinBytes: 0
- };
- this.traceEventStatsInTimeIntervals_.set(timeIntervalKey,
- eventStatsByTimeInverval);
- this.allTraceEventStatsInTimeIntervals_.push(eventStatsByTimeInverval);
- }
- eventStatsByTimeInverval.numEvents++;
-
- if (opt_eventSizeinBytes !== undefined) {
- this.hasEventSizesinBytes_ = true;
- eventStats.totalEventSizeinBytes += opt_eventSizeinBytes;
- eventStatsByTimeInverval.totalEventSizeinBytes += opt_eventSizeinBytes;
- }
- },
-
- get allTraceEventStats() {
- return this.allTraceEventStats_;
- },
-
- get allTraceEventStatsInTimeIntervals() {
- return this.allTraceEventStatsInTimeIntervals_;
- },
-
- get hasEventSizesinBytes() {
- return this.hasEventSizesinBytes_;
- }
- };
-
- return {
- ModelStats: ModelStats
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_stats_test.html b/chromium/third_party/catapult/tracing/tracing/model/model_stats_test.html
deleted file mode 100644
index 2a5631820b1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_stats_test.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/model/model_stats.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ModelStats = tr.model.ModelStats;
-
- test('getTraceEventStatsByCategory', function() {
- var modelStats = new ModelStats();
- modelStats.willProcessBasicTraceEvent('X', 'cat1', 'title1');
- modelStats.willProcessBasicTraceEvent('X', 'cat1', 'title1');
- modelStats.willProcessBasicTraceEvent('X', 'cat2', 'title3');
-
- assert.equal(modelStats.allTraceEventStats.length, 2);
- assert.equal(
- modelStats.traceEventCountsByKey_.get('X/cat1/title1').numEvents,
- 2);
- assert.equal(
- modelStats.traceEventCountsByKey_.get('X/cat2/title3').numEvents,
- 1);
- });
-
- test('getTraceEventStatsInTimeIntervals', function() {
- var modelStats = new ModelStats();
- var timeIntervalSizeInUs = modelStats.TIME_INTERVAL_SIZE_IN_MS * 1000;
- modelStats.willProcessBasicTraceEvent('X', 'cat1', 'title1', 1, 1);
- modelStats.willProcessBasicTraceEvent(
- 'X', 'cat1', 'title1', timeIntervalSizeInUs + 1, 2);
- modelStats.willProcessBasicTraceEvent(
- 'X', 'cat1', 'title1', 2 * timeIntervalSizeInUs + 1, 3);
- modelStats.willProcessBasicTraceEvent(
- 'X', 'cat2', 'title3', 2 * timeIntervalSizeInUs + 2, 4);
-
- assert.strictEqual(modelStats.allTraceEventStatsInTimeIntervals.length, 3);
- assert.strictEqual(
- modelStats.traceEventStatsInTimeIntervals_.get(0).numEvents, 1);
- assert.strictEqual(
- modelStats.traceEventStatsInTimeIntervals_.get(1).numEvents, 1);
- assert.strictEqual(
- modelStats.traceEventStatsInTimeIntervals_.get(2).numEvents, 2);
-
- assert.isTrue(modelStats.hasEventSizesinBytes);
- assert.strictEqual(
- modelStats.traceEventStatsInTimeIntervals_.get(0).totalEventSizeinBytes,
- 1);
- assert.strictEqual(
- modelStats.traceEventStatsInTimeIntervals_.get(1).totalEventSizeinBytes,
- 2);
- assert.strictEqual(
- modelStats.traceEventStatsInTimeIntervals_.get(2).totalEventSizeinBytes,
- 7);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/model_test.html b/chromium/third_party/catapult/tracing/tracing/model/model_test.html
deleted file mode 100644
index 88e9d1ae36f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/model_test.html
+++ /dev/null
@@ -1,341 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/annotation.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ThreadSlice = tr.model.ThreadSlice;
- var TitleOrCategoryFilter = tr.c.TitleOrCategoryFilter;
- var Frame = tr.model.Frame;
-
- var createModelWithOneOfEverything = function() {
- var m = new tr.Model();
- var cpu = m.kernel.getOrCreateCpu(1);
- cpu.slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 3}));
-
- var p = m.getOrCreateProcess(1);
- var t = p.getOrCreateThread(1);
- var slice = new ThreadSlice('', 'a', 0, 1, {}, 4);
- t.sliceGroup.pushSlice(slice);
- t.asyncSliceGroup.push(tr.c.TestUtils.newAsyncSlice(0, 1, t, t));
-
- var c = p.getOrCreateCounter('', 'ProcessCounter');
- var aSeries = new tr.model.CounterSeries('a', 0);
- var bSeries = new tr.model.CounterSeries('b', 0);
- c.addSeries(aSeries);
- c.addSeries(bSeries);
-
- aSeries.addCounterSample(0, 5);
- aSeries.addCounterSample(1, 6);
- aSeries.addCounterSample(2, 5);
- aSeries.addCounterSample(3, 7);
-
- bSeries.addCounterSample(0, 10);
- bSeries.addCounterSample(1, 15);
- bSeries.addCounterSample(2, 12);
- bSeries.addCounterSample(3, 16);
-
- var c1 = cpu.getOrCreateCounter('', 'CpuCounter');
- var aSeries = new tr.model.CounterSeries('a', 0);
- var bSeries = new tr.model.CounterSeries('b', 0);
- c1.addSeries(aSeries);
- c1.addSeries(bSeries);
-
- aSeries.addCounterSample(0, 5);
- aSeries.addCounterSample(1, 6);
- aSeries.addCounterSample(2, 5);
- aSeries.addCounterSample(3, 7);
-
- bSeries.addCounterSample(0, 10);
- bSeries.addCounterSample(1, 15);
- bSeries.addCounterSample(2, 12);
- bSeries.addCounterSample(3, 16);
-
- var frame1 = new Frame([slice], [{thread: t, start: 1, end: 5}]);
- p.frames.push.apply(p.frames, frame1);
-
- var gd = new tr.model.GlobalMemoryDump(m, 2);
- var pd = new tr.model.ProcessMemoryDump(gd, p, 2);
- gd.processMemoryDumps[1] = pd;
- m.globalMemoryDumps.push(gd);
- p.memoryDumps.push(pd);
-
- m.updateBounds();
-
- return m;
- };
-
- test('helper', function() {
- function Helper(model) {
- this.model = model;
- }
- Helper.guid = tr.b.GUID.allocateSimple();
- Helper.supportsModel = function(model) {
- return true;
- };
-
- var m = new tr.Model();
- var h = m.getOrCreateHelper(Helper);
- assert.isTrue(h instanceof Helper);
- assert.isTrue(h === m.getOrCreateHelper(Helper));
-
- function UnsupportedHelper(model) {
- this.model = model;
- }
- UnsupportedHelper.guid = tr.b.GUID.allocateSimple();
- UnsupportedHelper.supportsModel = function(model) {
- return false;
- };
-
- assert.isUndefined(m.getOrCreateHelper(UnsupportedHelper));
- // Try again to test doesHelperGUIDSupportThisModel_ .
- assert.isUndefined(m.getOrCreateHelper(UnsupportedHelper));
- });
-
- test('modelBounds_EmptyModel', function() {
- var m = new tr.Model();
- m.updateBounds();
- assert.isUndefined(m.bounds.min);
- assert.isUndefined(m.bounds.max);
- });
-
- test('modelBounds_OneEmptyThread', function() {
- var m = new tr.Model();
- var t = m.getOrCreateProcess(1).getOrCreateThread(1);
- m.updateBounds();
- assert.isUndefined(m.bounds.min);
- assert.isUndefined(m.bounds.max);
- });
-
- test('modelBounds_OneThread', function() {
- var m = new tr.Model();
- var t = m.getOrCreateProcess(1).getOrCreateThread(1);
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3));
- m.updateBounds();
- assert.equal(m.bounds.min, 1);
- assert.equal(m.bounds.max, 4);
- });
-
- test('modelBounds_OneThreadAndOneEmptyThread', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(1);
- t1.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3));
- var t2 = m.getOrCreateProcess(1).getOrCreateThread(1);
- m.updateBounds();
- assert.equal(m.bounds.min, 1);
- assert.equal(m.bounds.max, 4);
- });
-
- test('modelBounds_OneCpu', function() {
- var m = new tr.Model();
- var cpu = m.kernel.getOrCreateCpu(1);
- cpu.slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 3}));
- m.updateBounds();
- assert.equal(m.bounds.min, 1);
- assert.equal(m.bounds.max, 4);
- });
-
- test('modelBounds_OneCpuOneThread', function() {
- var m = new tr.Model();
- var cpu = m.kernel.getOrCreateCpu(1);
- cpu.slices.push(tr.c.TestUtils.newSliceEx({start: 1, duration: 3}));
-
- var t = m.getOrCreateProcess(1).getOrCreateThread(1);
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 4));
-
- m.updateBounds();
- assert.equal(m.bounds.min, 1);
- assert.equal(m.bounds.max, 5);
- });
-
- test('modelBounds_GlobalMemoryDumps', function() {
- var m = new tr.Model();
- m.globalMemoryDumps.push(new tr.model.GlobalMemoryDump(m, 1));
- m.globalMemoryDumps.push(new tr.model.GlobalMemoryDump(m, 3));
- m.globalMemoryDumps.push(new tr.model.GlobalMemoryDump(m, 5));
-
- m.updateBounds();
- assert.equal(m.bounds.min, 1);
- assert.equal(m.bounds.max, 5);
- });
-
- test('modelBounds_ProcessMemoryDumps', function() {
- var m = new tr.Model();
- var p = m.getOrCreateProcess(1);
- var gd = new tr.model.GlobalMemoryDump(m, -1);
- p.memoryDumps.push(new tr.model.ProcessMemoryDump(gd, m, 1));
- p.memoryDumps.push(new tr.model.ProcessMemoryDump(gd, m, 3));
- p.memoryDumps.push(new tr.model.ProcessMemoryDump(gd, m, 5));
-
- m.updateBounds();
- assert.equal(m.bounds.min, 1);
- assert.equal(m.bounds.max, 5);
- });
-
-
- test('modelConvertsTimestampToModelTime', function() {
- var m = new tr.Model();
- var traceEvents = [
- {ts: 1000, pid: 1, tid: 1, ph: 'B', cat: 'a', name: 'taskA', args: {}},
- {ts: 2000, pid: 1, tid: 1, ph: 'E', cat: 'a', name: 'taskA', args: {}}
- ];
- var i = new tr.importer.Import(m);
- i.importTraces([traceEvents]);
- assert.equal(m.convertTimestampToModelTime('traceEventClock', 1000), 0);
- assert.equal(m.convertTimestampToModelTime('traceEventClock', 2000), 1);
- });
-
- test('TitleOrCategoryFilter', function() {
- var s0 = tr.c.TestUtils.newSliceEx({start: 1, duration: 3});
- assert.isTrue(new TitleOrCategoryFilter('a').matchSlice(s0));
- assert.isFalse(new TitleOrCategoryFilter('x').matchSlice(s0));
-
- var s1 = tr.c.TestUtils.newSliceEx({title: 'ba', start: 1, duration: 3});
- assert.isTrue(new TitleOrCategoryFilter('a').matchSlice(s1));
- assert.isTrue(new TitleOrCategoryFilter('ba').matchSlice(s1));
- assert.isFalse(new TitleOrCategoryFilter('x').matchSlice(s1));
- });
-
- test('model_findAllThreadsNamed', function() {
- var m = new tr.Model();
- var t = m.getOrCreateProcess(1).getOrCreateThread(1);
- t.name = 'CrBrowserMain';
-
- m.updateBounds();
- var f = m.findAllThreadsNamed('CrBrowserMain');
- assert.deepEqual([t], f);
- f = m.findAllThreadsNamed('NoSuchThread');
- assert.equal(f.length, 0);
- });
-
- test('model_updateCategories', function() {
- var m = new tr.Model();
- var t = m.getOrCreateProcess(1).getOrCreateThread(1);
- t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3));
- t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3));
- t.sliceGroup.pushSlice(new ThreadSlice('categoryB', 'a', 0, 1, {}, 3));
- t.sliceGroup.pushSlice(new ThreadSlice('categoryA', 'a', 0, 1, {}, 3));
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3));
- m.updateCategories_();
- assert.deepEqual(['categoryA', 'categoryB'], m.categories);
- });
-
- test('getEventByStableId', function() {
- var m = new tr.Model();
- var p = m.getOrCreateProcess(0);
- var t = p.getOrCreateThread(1);
- var slice = tr.c.TestUtils.newSliceEx({start: 0, duration: 10});
- t.sliceGroup.pushSlice(slice);
- var ue = tr.c.TestUtils.newInteractionRecord(m, 0, 10);
- m.userModel.expectations.push(ue);
- var gie = tr.c.TestUtils.newInstantEvent({
- title: 'gie',
- start: 0,
- colorId: 0
- });
- m.instantEvents.push(gie);
-
- assert.strictEqual(slice, m.getEventByStableId(slice.stableId));
- assert.strictEqual(ue, m.getEventByStableId(ue.stableId));
- assert.strictEqual(gie, m.getEventByStableId(gie.stableId));
- });
-
- test('model_annotationAddRemove', function() {
- var m = new tr.Model();
- var a1 = new tr.model.Annotation();
- var a2 = new tr.model.Annotation();
-
- assert.equal(m.getAllAnnotations().length, 0);
- m.addAnnotation(a1);
- assert.equal(m.getAllAnnotations().length, 1);
- m.addAnnotation(a2);
- assert.equal(m.getAllAnnotations().length, 2);
-
- assert.equal(m.getAnnotationByGUID(a1.guid), a1);
- assert.equal(m.getAnnotationByGUID(a2.guid), a2);
-
- m.removeAnnotation(a1);
- assert.isUndefined(m.getAnnotationByGUID(a1.guid));
- assert.equal(m.getAnnotationByGUID(a2.guid), a2);
- assert.equal(m.getAllAnnotations().length, 1);
- });
-
- test('model_intrinsicTimeUnit', function() {
- var unit = tr.b.TimeDisplayModes;
- var m = new tr.Model();
-
- // by default it should be milliseconds
- assert.equal(m.intrinsicTimeUnit, unit.ms);
-
- m.intrinsicTimeUnit = unit.ns;
- assert.equal(m.intrinsicTimeUnit, unit.ns);
- // should be able to set to the same
- m.intrinsicTimeUnit = unit.ns;
- assert.equal(m.intrinsicTimeUnit, unit.ns);
- // should not be able to change it after fixing it
- assert.throw(function() { m.intrinsicTimeUnit = unit.ms; });
- assert.equal(m.intrinsicTimeUnit, unit.ns);
- });
-
- test('model_getAllProcesses', function() {
- var m = new tr.Model();
- var p1 = m.getOrCreateProcess(1);
- var p2 = m.getOrCreateProcess(2);
- var p3 = m.getOrCreateProcess(3);
- var p4 = m.getOrCreateProcess(4);
- var p5 = m.getOrCreateProcess(5);
-
- assert.sameMembers(m.getAllProcesses(), [p1, p2, p3, p4, p5]);
- assert.sameMembers(m.getAllProcesses(p => true), [p1, p2, p3, p4, p5]);
- assert.sameMembers(m.getAllProcesses(p => false), []);
- assert.sameMembers(m.getAllProcesses(p => p.pid % 2 === 0), [p2, p4]);
- });
-
- test('model_joinRefs', function() {
- function RefCountingSnapshot() {
- tr.model.ObjectSnapshot.apply(this, arguments);
- this.refCount = 0;
- }
-
- RefCountingSnapshot.prototype = {
- __proto__: tr.model.ObjectSnapshot.prototype,
-
- referencedAt: function() {
- ++this.refCount;
- }
- };
-
- var typeName = 'RefCountingSnapshot';
- tr.model.ObjectSnapshot.subTypes.register(
- RefCountingSnapshot,
- {typeName: typeName});
-
- var m = new tr.Model();
- var p = m.getOrCreateProcess(1);
- var s1 = p.objects.addSnapshot(new tr.model.ScopedId(typeName, '0x1'),
- 'cat', typeName, 1000, {});
- var s2 = p.objects.addSnapshot(new tr.model.ScopedId(typeName, '0x2'),
- 'cat', typeName, 2000, {
- myRef: {
- scope: typeName,
- id_ref: '0x1'
- }
- });
- m.joinRefs();
- assert.equal(s1.refCount, 1);
- assert.equal(s2.refCount, 0);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/object_collection.html b/chromium/third_party/catapult/tracing/tracing/model/object_collection.html
deleted file mode 100644
index 4055a202489..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/object_collection.html
+++ /dev/null
@@ -1,233 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/model/event_container.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-<link rel="import" href="/tracing/model/time_to_object_instance_map.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the ObjectCollection class.
- */
-tr.exportTo('tr.model', function() {
- var ObjectInstance = tr.model.ObjectInstance;
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * A collection of object instances and their snapshots, accessible by id and
- * time, or by object name.
- *
- * @constructor
- */
- function ObjectCollection(parent) {
- tr.model.EventContainer.call(this);
- this.parent = parent;
- // scope -> {id -> TimeToObjectInstanceMap}
- this.instanceMapsByScopedId_ = {};
- this.instancesByTypeName_ = {};
- this.createObjectInstance_ = this.createObjectInstance_.bind(this);
- }
-
- ObjectCollection.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- childEvents: function*() {
- for (var instance of this.getAllObjectInstances()) {
- yield instance;
- yield * instance.snapshots;
- }
- },
-
- createObjectInstance_: function(
- parent, scopedId, category, name, creationTs, opt_baseTypeName) {
- var constructor = tr.model.ObjectInstance.subTypes.getConstructor(
- category, name);
- var instance = new constructor(
- parent, scopedId, category, name, creationTs, opt_baseTypeName);
- var typeName = instance.typeName;
- var instancesOfTypeName = this.instancesByTypeName_[typeName];
- if (!instancesOfTypeName) {
- instancesOfTypeName = [];
- this.instancesByTypeName_[typeName] = instancesOfTypeName;
- }
- instancesOfTypeName.push(instance);
- return instance;
- },
-
- getOrCreateInstanceMap_: function(scopedId) {
- var dict;
- if (scopedId.scope in this.instanceMapsByScopedId_) {
- dict = this.instanceMapsByScopedId_[scopedId.scope];
- } else {
- dict = {};
- this.instanceMapsByScopedId_[scopedId.scope] = dict;
- }
- var instanceMap = dict[scopedId.id];
- if (instanceMap)
- return instanceMap;
- instanceMap = new tr.model.TimeToObjectInstanceMap(
- this.createObjectInstance_, this.parent, scopedId);
- dict[scopedId.id] = instanceMap;
- return instanceMap;
- },
-
- idWasCreated: function(scopedId, category, name, ts) {
- var instanceMap = this.getOrCreateInstanceMap_(scopedId);
- return instanceMap.idWasCreated(category, name, ts);
- },
-
- addSnapshot: function(
- scopedId, category, name, ts, args, opt_baseTypeName) {
- var instanceMap = this.getOrCreateInstanceMap_(scopedId);
- var snapshot = instanceMap.addSnapshot(
- category, name, ts, args, opt_baseTypeName);
- if (snapshot.objectInstance.category !== category) {
- var msg = 'Added snapshot name=' + name + ' with cat=' + category +
- ' impossible. It instance was created/snapshotted with cat=' +
- snapshot.objectInstance.category + ' name=' +
- snapshot.objectInstance.name;
- throw new Error(msg);
- }
- if (opt_baseTypeName &&
- snapshot.objectInstance.baseTypeName !== opt_baseTypeName) {
- throw new Error('Could not add snapshot with baseTypeName=' +
- opt_baseTypeName + '. It ' +
- 'was previously created with name=' +
- snapshot.objectInstance.baseTypeName);
- }
- if (snapshot.objectInstance.name !== name) {
- throw new Error('Could not add snapshot with name=' + name + '. It ' +
- 'was previously created with name=' +
- snapshot.objectInstance.name);
- }
- return snapshot;
- },
-
- idWasDeleted: function(scopedId, category, name, ts) {
- var instanceMap = this.getOrCreateInstanceMap_(scopedId);
- var deletedInstance = instanceMap.idWasDeleted(category, name, ts);
- if (!deletedInstance)
- return;
- if (deletedInstance.category !== category) {
- var msg = 'Deleting object ' + deletedInstance.name +
- ' with a different category ' +
- 'than when it was created. It previous had cat=' +
- deletedInstance.category + ' but the delete command ' +
- 'had cat=' + category;
- throw new Error(msg);
- }
- if (deletedInstance.baseTypeName !== name) {
- throw new Error('Deletion requested for name=' +
- name + ' could not proceed: ' +
- 'An existing object with baseTypeName=' +
- deletedInstance.baseTypeName + ' existed.');
- }
- },
-
- autoDeleteObjects: function(maxTimestamp) {
- tr.b.iterItems(this.instanceMapsByScopedId_, function(scope, imapById) {
- tr.b.iterItems(imapById, function(id, i2imap) {
- var lastInstance = i2imap.lastInstance;
- if (lastInstance.deletionTs !== Number.MAX_VALUE)
- return;
- i2imap.idWasDeleted(
- lastInstance.category, lastInstance.name, maxTimestamp);
- // idWasDeleted will cause lastInstance.deletionTsWasExplicit to be
- // set to true. Unset it here.
- lastInstance.deletionTsWasExplicit = false;
- });
- });
- },
-
- getObjectInstanceAt: function(scopedId, ts) {
- var instanceMap;
- if (scopedId.scope in this.instanceMapsByScopedId_)
- instanceMap = this.instanceMapsByScopedId_[scopedId.scope][scopedId.id];
- if (!instanceMap)
- return undefined;
- return instanceMap.getInstanceAt(ts);
- },
-
- getSnapshotAt: function(scopedId, ts) {
- var instance = this.getObjectInstanceAt(scopedId, ts);
- if (!instance)
- return undefined;
- return instance.getSnapshotAt(ts);
- },
-
- iterObjectInstances: function(iter, opt_this) {
- opt_this = opt_this || this;
- tr.b.iterItems(this.instanceMapsByScopedId_, function(scope, imapById) {
- tr.b.iterItems(imapById, function(id, i2imap) {
- i2imap.instances.forEach(iter, opt_this);
- });
- });
- },
-
- getAllObjectInstances: function() {
- var instances = [];
- this.iterObjectInstances(function(i) { instances.push(i); });
- return instances;
- },
-
- getAllInstancesNamed: function(name) {
- return this.instancesByTypeName_[name];
- },
-
- getAllInstancesByTypeName: function() {
- return this.instancesByTypeName_;
- },
-
- preInitializeAllObjects: function() {
- this.iterObjectInstances(function(instance) {
- instance.preInitialize();
- });
- },
-
- initializeAllObjects: function() {
- this.iterObjectInstances(function(instance) {
- instance.initialize();
- });
- },
-
- initializeInstances: function() {
- this.iterObjectInstances(function(instance) {
- instance.initialize();
- });
- },
-
- updateBounds: function() {
- this.bounds.reset();
- this.iterObjectInstances(function(instance) {
- instance.updateBounds();
- this.bounds.addRange(instance.bounds);
- }, this);
- },
-
- shiftTimestampsForward: function(amount) {
- this.iterObjectInstances(function(instance) {
- instance.shiftTimestampsForward(amount);
- });
- },
-
- addCategoriesToDict: function(categoriesDict) {
- this.iterObjectInstances(function(instance) {
- categoriesDict[instance.category] = true;
- });
- }
- };
-
- return {
- ObjectCollection: ObjectCollection
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/object_collection_test.html b/chromium/third_party/catapult/tracing/tracing/model/object_collection_test.html
deleted file mode 100644
index 953b535db49..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/object_collection_test.html
+++ /dev/null
@@ -1,231 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/object_collection.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestObjectInstance = function(
- parent, scopedId, category, name, creationTs) {
- tr.model.ObjectInstance.call(
- this, parent, scopedId, category, name, creationTs);
- };
-
- TestObjectInstance.prototype = {
- __proto__: tr.model.ObjectInstance.prototype
- };
-
- test('objectInstanceSubtype', function() {
- // Register that TestObjects are bound to TestObjectInstance.
- tr.model.ObjectInstance.subTypes.register(
- TestObjectInstance,
- {typeName: 'TestObject'});
-
- try {
- var collection = new tr.model.ObjectCollection({ });
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasCreated(
- scopedId, 'tr.e.cc', 'Frame', 10);
- collection.idWasDeleted(
- scopedId, 'tr.e.cc', 'Frame', 15);
- collection.idWasCreated(
- scopedId, 'skia', 'TestObject', 20);
- collection.idWasDeleted(
- scopedId, 'skia', 'TestObject', 25);
-
- var testFrame = collection.getObjectInstanceAt(scopedId, 10);
- assert.instanceOf(testFrame, tr.model.ObjectInstance);
- assert.notInstanceOf(testFrame, TestObjectInstance);
-
- var testObject = collection.getObjectInstanceAt(scopedId, 20);
- assert.instanceOf(testObject, tr.model.ObjectInstance);
- assert.instanceOf(testObject, TestObjectInstance);
- } finally {
- tr.model.ObjectInstance.subTypes.unregister(TestObjectInstance);
- }
- });
-
- test('twoSnapshots', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasCreated(
- scopedId, 'cat', 'Frame', 10);
- collection.addSnapshot(
- scopedId, 'cat', 'Frame', 10, {foo: 1});
- collection.addSnapshot(
- scopedId, 'cat', 'Frame', 20, {foo: 2});
-
- collection.updateBounds();
- assert.equal(collection.bounds.min, 10);
- assert.equal(collection.bounds.max, 20);
-
- var s0 = collection.getSnapshotAt(scopedId, 1);
- assert.isUndefined(s0);
-
- var s1 = collection.getSnapshotAt(scopedId, 10);
- assert.equal(s1.args.foo, 1);
-
- var s2 = collection.getSnapshotAt(scopedId, 15);
- assert.equal(s2.args.foo, 1);
- assert.equal(s1, s2);
-
- var s3 = collection.getSnapshotAt(scopedId, 20);
- assert.equal(s3.args.foo, 2);
- assert.equal(s1.object, s3.object);
-
- var s4 = collection.getSnapshotAt(scopedId, 25);
- assert.equal(s4, s3);
- });
-
- test('twoObjectsSharingOneID', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasCreated(
- scopedId, 'tr.e.cc', 'Frame', 10);
- collection.idWasDeleted(
- scopedId, 'tr.e.cc', 'Frame', 15);
- collection.idWasCreated(
- scopedId, 'skia', 'Picture', 20);
- collection.idWasDeleted(
- scopedId, 'skia', 'Picture', 25);
-
- var frame = collection.getObjectInstanceAt(scopedId, 10);
- assert.equal(frame.category, 'tr.e.cc');
- assert.equal(frame.name, 'Frame');
-
- var picture = collection.getObjectInstanceAt(scopedId, 20);
- assert.equal(picture.category, 'skia');
- assert.equal(picture.name, 'Picture');
-
- var typeNames = tr.b.dictionaryKeys(collection.getAllInstancesByTypeName());
- typeNames.sort();
- assert.deepEqual(
- ['Frame', 'Picture'],
- typeNames);
- assert.deepEqual(
- [frame],
- collection.getAllInstancesByTypeName()['Frame']);
- assert.deepEqual(
- [picture],
- collection.getAllInstancesByTypeName()['Picture']);
- });
-
- test('createSnapDelete', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasCreated(
- scopedId, 'cat', 'Frame', 10);
- collection.addSnapshot(
- scopedId, 'cat', 'Frame', 10, {foo: 1});
- collection.idWasDeleted(
- scopedId, 'cat', 'Frame', 15);
-
- collection.updateBounds();
- assert.equal(collection.bounds.min, 10);
- assert.equal(collection.bounds.max, 15);
-
- var s10 = collection.getSnapshotAt(scopedId, 10);
- var i10 = s10.objectInstance;
- assert.equal(i10.creationTs, 10);
- assert.equal(i10.deletionTs, 15);
- });
-
- test('boundsOnUndeletedObject', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasCreated(
- scopedId, 'cat', 'Frame', 10);
- collection.addSnapshot(
- scopedId, 'cat', 'Frame', 15, {foo: 1});
-
- collection.updateBounds();
- assert.equal(10, collection.bounds.min);
- assert.equal(15, collection.bounds.max);
- });
-
- test('snapshotWithCustomBaseTypeThenDelete', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- var s10 = collection.addSnapshot(
- scopedId, 'cat', 'cc::PictureLayerImpl', 10, {}, 'cc::LayerImpl');
- collection.idWasDeleted(
- scopedId, 'cat', 'cc::LayerImpl', 15);
- collection.updateBounds();
- assert.equal(10, collection.bounds.min);
- assert.equal(15, collection.bounds.max);
- assert.equal(s10.objectInstance.name, 'cc::PictureLayerImpl');
- assert.equal(s10.objectInstance.baseTypeName, 'cc::LayerImpl');
- });
-
- test('newWithSnapshotThatChangesBaseType', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- var i10 = collection.idWasCreated(
- scopedId, 'cat', 'cc::LayerImpl', 10);
- var s15 = collection.addSnapshot(
- scopedId, 'cat', 'cc::PictureLayerImpl', 15, {}, 'cc::LayerImpl');
- collection.updateBounds();
- assert.equal(10, collection.bounds.min);
- assert.equal(15, collection.bounds.max);
- assert.equal(s15.objectInstance, i10);
- assert.equal(i10.name, 'cc::PictureLayerImpl');
- assert.equal(i10.baseTypeName, 'cc::LayerImpl');
- });
-
- test('deleteThenSnapshotWithCustomBase', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasDeleted(
- scopedId, 'cat', 'cc::LayerImpl', 10);
- var s15 = collection.addSnapshot(
- scopedId, 'cat', 'cc::PictureLayerImpl', 15, {}, 'cc::LayerImpl');
- collection.updateBounds();
- assert.equal(10, collection.bounds.min);
- assert.equal(15, collection.bounds.max);
- assert.equal(s15.objectInstance.name, 'cc::PictureLayerImpl');
- });
-
- test('autoDelete', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId = new tr.model.ScopedId('ptr', '0x1000');
- collection.idWasCreated(
- scopedId, 'cat', 'Frame', 10);
- collection.addSnapshot(
- scopedId, 'cat', 'Frame', 10, {foo: 1});
- collection.autoDeleteObjects(15);
-
- var s10 = collection.getSnapshotAt(scopedId, 10);
- var i10 = s10.objectInstance;
- assert.equal(15, i10.deletionTs);
- });
-
- test('differentScopes', function() {
- var collection = new tr.model.ObjectCollection({});
- var scopedId1 = new tr.model.ScopedId('ptr', '0x1000');
- var scopedId2 = new tr.model.ScopedId('cc', '0x1000');
- collection.idWasCreated(
- scopedId1, 'cat', 'ptr::object', 10);
- collection.idWasDeleted(
- scopedId1, 'cat', 'ptr::object', 15);
- collection.idWasCreated(
- scopedId2, 'cat', 'cc::object', 10);
- collection.idWasDeleted(
- scopedId2, 'cat', 'cc::object', 15);
-
- var instance = collection.getObjectInstanceAt(scopedId1, 10);
- assert.equal(instance.name, 'ptr::object');
-
- var instance = collection.getObjectInstanceAt(scopedId2, 10);
- assert.equal(instance.name, 'cc::object');
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/object_instance.html b/chromium/third_party/catapult/tracing/tracing/model/object_instance.html
deleted file mode 100644
index 7dcd853f949..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/object_instance.html
+++ /dev/null
@@ -1,197 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/object_snapshot.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the ObjectSnapshot and ObjectHistory classes.
- */
-tr.exportTo('tr.model', function() {
- var ObjectSnapshot = tr.model.ObjectSnapshot;
-
- /**
- * An object with a specific id, whose state has been snapshotted several
- * times.
- *
- * @constructor
- */
- function ObjectInstance(
- parent, scopedId, category, name, creationTs, opt_baseTypeName) {
- tr.model.Event.call(this);
- this.parent = parent;
- this.scopedId = scopedId;
- this.category = category;
- this.baseTypeName = opt_baseTypeName ? opt_baseTypeName : name;
- this.name = name;
- this.creationTs = creationTs;
- this.creationTsWasExplicit = false;
- this.deletionTs = Number.MAX_VALUE;
- this.deletionTsWasExplicit = false;
- this.colorId = 0;
- this.bounds = new tr.b.Range();
- this.snapshots = [];
- this.hasImplicitSnapshots = false;
- }
-
- ObjectInstance.prototype = {
- __proto__: tr.model.Event.prototype,
-
- get typeName() {
- return this.name;
- },
-
- addBoundsToRange: function(range) {
- range.addRange(this.bounds);
- },
-
- addSnapshot: function(ts, args, opt_name, opt_baseTypeName) {
- if (ts < this.creationTs)
- throw new Error('Snapshots must be >= instance.creationTs');
- if (ts >= this.deletionTs)
- throw new Error('Snapshots cannot be added after ' +
- 'an objects deletion timestamp.');
-
- var lastSnapshot;
- if (this.snapshots.length > 0) {
- lastSnapshot = this.snapshots[this.snapshots.length - 1];
- if (lastSnapshot.ts === ts)
- throw new Error('Snapshots already exists at this time!');
- if (ts < lastSnapshot.ts) {
- throw new Error(
- 'Snapshots must be added in increasing timestamp order');
- }
- }
-
- // Update baseTypeName if needed.
- if (opt_name &&
- (this.name !== opt_name)) {
- if (!opt_baseTypeName)
- throw new Error('Must provide base type name for name update');
- if (this.baseTypeName !== opt_baseTypeName)
- throw new Error('Cannot update type name: base types dont match');
- this.name = opt_name;
- }
-
- var snapshotConstructor =
- tr.model.ObjectSnapshot.subTypes.getConstructor(
- this.category, this.name);
- var snapshot = new snapshotConstructor(this, ts, args);
- this.snapshots.push(snapshot);
- return snapshot;
- },
-
- wasDeleted: function(ts) {
- var lastSnapshot;
- if (this.snapshots.length > 0) {
- lastSnapshot = this.snapshots[this.snapshots.length - 1];
- if (lastSnapshot.ts > ts)
- throw new Error(
- 'Instance cannot be deleted at ts=' +
- ts + '. A snapshot exists that is older.');
- }
- this.deletionTs = ts;
- this.deletionTsWasExplicit = true;
- },
-
- /**
- * See ObjectSnapshot constructor notes on object initialization.
- */
- preInitialize: function() {
- for (var i = 0; i < this.snapshots.length; i++)
- this.snapshots[i].preInitialize();
- },
-
- /**
- * See ObjectSnapshot constructor notes on object initialization.
- */
- initialize: function() {
- for (var i = 0; i < this.snapshots.length; i++)
- this.snapshots[i].initialize();
- },
-
- isAliveAt: function(ts) {
- if (ts < this.creationTs && this.creationTsWasExplicit)
- return false;
- if (ts > this.deletionTs)
- return false;
-
- return true;
- },
-
- getSnapshotAt: function(ts) {
- if (ts < this.creationTs) {
- if (this.creationTsWasExplicit)
- throw new Error('ts must be within lifetime of this instance');
- return this.snapshots[0];
- }
- if (ts > this.deletionTs)
- throw new Error('ts must be within lifetime of this instance');
-
- var snapshots = this.snapshots;
- var i = tr.b.findIndexInSortedIntervals(
- snapshots,
- function(snapshot) { return snapshot.ts; },
- function(snapshot, i) {
- if (i === snapshots.length - 1)
- return snapshots[i].objectInstance.deletionTs;
- return snapshots[i + 1].ts - snapshots[i].ts;
- },
- ts);
- if (i < 0) {
- // Note, this is a little bit sketchy: this lets early ts point at the
- // first snapshot, even before it is taken. We do this because raster
- // tasks usually post before their tile snapshots are dumped. This may
- // be a good line of code to re-visit if we start seeing strange and
- // confusing object references showing up in the traces.
- return this.snapshots[0];
- }
- if (i >= this.snapshots.length)
- return this.snapshots[this.snapshots.length - 1];
- return this.snapshots[i];
- },
-
- updateBounds: function() {
- this.bounds.reset();
- this.bounds.addValue(this.creationTs);
- if (this.deletionTs !== Number.MAX_VALUE)
- this.bounds.addValue(this.deletionTs);
- else if (this.snapshots.length > 0)
- this.bounds.addValue(this.snapshots[this.snapshots.length - 1].ts);
- },
-
- shiftTimestampsForward: function(amount) {
- this.creationTs += amount;
- if (this.deletionTs !== Number.MAX_VALUE)
- this.deletionTs += amount;
- this.snapshots.forEach(function(snapshot) {
- snapshot.ts += amount;
- });
- },
-
- get userFriendlyName() {
- return this.typeName + ' object ' + this.scopedId;
- }
- };
-
- tr.model.EventRegistry.register(
- ObjectInstance,
- {
- name: 'objectInstance',
- pluralName: 'objectInstances'
- });
-
- return {
- ObjectInstance: ObjectInstance
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/object_instance_test.html b/chromium/third_party/catapult/tracing/tracing/model/object_instance_test.html
deleted file mode 100644
index fa02cff3945..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/object_instance_test.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('getSnapshotAtWithImplicitCreation', function() {
- var instance = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'n', 10);
- var s10 = instance.addSnapshot(10, 'a');
- instance.addSnapshot(40, 'b');
- instance.wasDeleted(60);
-
- var s1 = instance.getSnapshotAt(1);
- assert.equal(s1, s10);
-
- var s10 = instance.getSnapshotAt(10);
- assert.equal(s10.args, 'a');
- assert.equal(instance.getSnapshotAt(15), s10);
-
- var s40 = instance.getSnapshotAt(40);
- assert.equal(s40.args, 'b');
- assert.equal(instance.getSnapshotAt(50), s40);
- assert.equal(instance.getSnapshotAt(59.9), s40);
- });
-
- test('getSnapshotAtWithExplicitCreation', function() {
- var instance = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'n', 10);
- instance.creationTsWasExplicit = true;
- instance.addSnapshot(10, 'a');
- instance.wasDeleted(60);
-
- assert.throws(function() {
- instance.getSnapshotAt(1);
- });
-
- var s10 = instance.getSnapshotAt(10);
- assert.equal(s10.args, 'a');
- assert.equal(instance.getSnapshotAt(15), s10);
- });
-
- test('getSnapshotBeforeFirstSnapshot', function() {
- var instance = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'n', 10);
- var s15 = instance.addSnapshot(15, 'a');
- instance.wasDeleted(40);
-
- assert.equal(instance.getSnapshotAt(10), s15);
- });
-
- test('getSnapshotAfterLastSnapshot', function() {
- var instance = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'n', 10);
- var s15 = instance.addSnapshot(15, 'a');
- instance.wasDeleted(40);
-
- assert.equal(instance.getSnapshotAt(20), s15);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/object_snapshot.html b/chromium/third_party/catapult/tracing/tracing/model/object_snapshot.html
deleted file mode 100644
index 0bf19e6548d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/object_snapshot.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- /**
- * A snapshot of an object instance, at a given moment in time.
- *
- * Initialization of snapshots and instances is three phased:
- *
- * 1. Instances and snapshots are constructed. This happens during event
- * importing. Little should be done here, because the object's data
- * are still being used by the importer to reconstruct object references.
- *
- * 2. Instances and snapshtos are preinitialized. This happens after implicit
- * objects have been found, but before any references have been found and
- * switched to direct references. Thus, every snapshot stands on its own.
- * This is a good time to do global field renaming and type conversion,
- * e.g. recognizing domain-specific types and converting from C++ naming
- * convention to JS.
- *
- * 3. Instances and snapshtos are initialized. At this point, {id_ref:
- * '0x1000'} fields have been converted to snapshot references. This is a
- * good time to generic initialization steps and argument verification.
- *
- * @constructor
- */
- function ObjectSnapshot(objectInstance, ts, args) {
- tr.model.Event.call(this);
- this.objectInstance = objectInstance;
- this.ts = ts;
- this.args = args;
- }
-
- ObjectSnapshot.prototype = {
- __proto__: tr.model.Event.prototype,
-
- /**
- * See ObjectSnapshot constructor notes on object initialization.
- */
- preInitialize: function() {
- },
-
- /**
- * See ObjectSnapshot constructor notes on object initialization.
- */
- initialize: function() {
- },
-
- /**
- * Called when an object reference is resolved as this ObjectSnapshot.
- * @param {Object} item The event (async slice, slice or object) containing
- * the resolved reference.
- * @param {Object} object The object directly containing the reference.
- * @param {String} field The field name of the reference in |object|.
- */
- referencedAt: function(item, object, field) {
- },
-
- addBoundsToRange: function(range) {
- range.addValue(this.ts);
- },
-
- get userFriendlyName() {
- return 'Snapshot of ' +
- this.objectInstance.typeName + ' ' +
- this.objectInstance.id + ' @ ' +
- tr.b.Unit.byName.timeStampInMs.format(this.ts);
- }
- };
-
- tr.model.EventRegistry.register(
- ObjectSnapshot,
- {
- name: 'objectSnapshot',
- pluralName: 'objectSnapshots'
- });
-
- return {
- ObjectSnapshot: ObjectSnapshot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/object_snapshot_test.html b/chromium/third_party/catapult/tracing/tracing/model/object_snapshot_test.html
deleted file mode 100644
index 7e7a4b01a31..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/object_snapshot_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/object_instance.html">
-<link rel="import" href="/tracing/model/object_snapshot.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('snapshotTypeRegistry', function() {
- function MySnapshot() {
- tr.model.ObjectSnapshot.apply(this, arguments);
- this.myFoo = this.args.foo;
- }
-
- MySnapshot.prototype = {
- __proto__: tr.model.ObjectSnapshot.prototype
- };
-
- var instance = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'MySnapshot', 10);
- try {
- tr.model.ObjectSnapshot.subTypes.register(
- MySnapshot,
- {typeName: 'MySnapshot'});
- var snapshot = instance.addSnapshot(15, {foo: 'bar'});
- assert.instanceOf(snapshot, MySnapshot);
- assert.equal(snapshot.myFoo, 'bar');
- } finally {
- tr.model.ObjectSnapshot.subTypes.unregister(MySnapshot);
- }
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/power_sample.html b/chromium/third_party/catapult/tracing/tracing/model/power_sample.html
deleted file mode 100644
index d4809c1d1d9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/power_sample.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_registry.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- var Event = tr.model.Event;
- var EventRegistry = tr.model.EventRegistry;
-
- /**
- * A sample that contains a power measurement (in W).
- *
- * @constructor
- * @extends {Event}
- */
- function PowerSample(series, start, powerInW) {
- Event.call(this);
-
- this.series_ = series;
- this.start_ = start;
- this.powerInW_ = powerInW;
- }
-
- PowerSample.prototype = {
- __proto__: Event.prototype,
-
- get series() {
- return this.series_;
- },
-
- get start() {
- return this.start_;
- },
-
- set start(value) {
- this.start_ = value;
- },
-
- get powerInW() {
- return this.powerInW_;
- },
-
- set powerInW(value) {
- this.powerInW_ = value;
- },
-
- addBoundsToRange: function(range) {
- range.addValue(this.start);
- }
- };
-
- EventRegistry.register(
- PowerSample,
- {
- name: 'powerSample',
- pluralName: 'powerSamples'
- });
-
- return {
- PowerSample: PowerSample
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/power_sample_test.html b/chromium/third_party/catapult/tracing/tracing/model/power_sample_test.html
deleted file mode 100644
index d90fb374c5e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/power_sample_test.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_sample.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var PowerSample = tr.model.PowerSample;
-
- test('powerSample', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var sample1 = new PowerSample(series, 0.0, 1000.0);
- var sample2 = new PowerSample(series, 1.0, 2000.0);
-
- assert.equal(sample1.series, series);
- assert.equal(sample1.start, 0.0);
- assert.equal(sample1.powerInW, 1000.0);
-
- assert.equal(sample2.series, series);
- assert.equal(sample2.start, 1.0);
- assert.equal(sample2.powerInW, 2000.0);
- });
-
- test('addBoundsToRange', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var sample1 = new PowerSample(series, 0.0, 1000.0);
- var sample2 = new PowerSample(series, 1.0, 2000.0);
-
- var range = new tr.b.Range();
- sample1.addBoundsToRange(range);
-
- assert.equal(range.min, 0);
- assert.equal(range.max, 0);
-
- sample2.addBoundsToRange(range);
-
- assert.equal(range.min, 0);
- assert.equal(range.max, 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/power_series.html b/chromium/third_party/catapult/tracing/tracing/model/power_series.html
deleted file mode 100644
index e5442415978..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/power_series.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/model/event_container.html">
-<link rel="import" href="/tracing/model/power_sample.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- var PowerSample = tr.model.PowerSample;
-
- /**
- * A container holding a time series of power samples.
- *
- * @constructor
- * @extends {EventContainer}
- */
- function PowerSeries(device) {
- tr.model.EventContainer.call(this);
-
- this.device_ = device;
- this.samples_ = [];
- }
-
- PowerSeries.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get device() {
- return this.device_;
- },
-
- get samples() {
- return this.samples_;
- },
-
- get stableId() {
- return this.device_.stableId + '.PowerSeries';
- },
-
- /**
- * Adds a power sample to the series and returns it.
- *
- * Note: Samples must be added in chronological order.
- */
- addPowerSample: function(ts, val) {
- var sample = new PowerSample(this, ts, val);
- this.samples_.push(sample);
- return sample;
- },
-
- /**
- * Returns the total energy (in Joules) consumed between the specified
- * start and end timestamps (in milliseconds).
- */
- getEnergyConsumedInJ: function(start, end) {
- var measurementRange = tr.b.Range.fromExplicitRange(start, end);
-
- var energyConsumedInJ = 0;
- var startIndex = tr.b.findLowIndexInSortedArray(
- this.samples, x => x.start, start) - 1;
- var endIndex = tr.b.findLowIndexInSortedArray(
- this.samples, x => x.start, end);
-
- if (startIndex < 0)
- startIndex = 0;
-
- for (var i = startIndex; i < endIndex; i++) {
- var sample = this.samples[i];
- var nextSample = this.samples[i + 1];
-
- var sampleRange = new tr.b.Range();
- sampleRange.addValue(sample.start);
- sampleRange.addValue(nextSample ? nextSample.start : sample.start);
-
- var intersectionRangeInMs = measurementRange.findIntersection(
- sampleRange);
-
- var durationInS = tr.b.convertUnit(intersectionRangeInMs.duration,
- tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
-
- energyConsumedInJ += durationInS * sample.powerInW;
- }
-
- return energyConsumedInJ;
- },
-
- getSamplesWithinRange: function(start, end) {
- var startIndex = tr.b.findLowIndexInSortedArray(
- this.samples, x => x.start, start);
- var endIndex = tr.b.findLowIndexInSortedArray(
- this.samples, x => x.start, end);
- return this.samples.slice(startIndex, endIndex);
- },
-
- shiftTimestampsForward: function(amount) {
- for (var i = 0; i < this.samples_.length; ++i)
- this.samples_[i].start += amount;
- },
-
- updateBounds: function() {
- this.bounds.reset();
-
- if (this.samples_.length === 0)
- return;
-
- this.bounds.addValue(this.samples_[0].start);
- this.bounds.addValue(this.samples_[this.samples_.length - 1].start);
- },
-
- childEvents: function*() {
- yield * this.samples_;
- },
- };
-
- return {
- PowerSeries: PowerSeries
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/power_series_test.html b/chromium/third_party/catapult/tracing/tracing/model/power_series_test.html
deleted file mode 100644
index 10bb85ff030..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/power_series_test.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/device.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var Model = tr.Model;
- var PowerSeries = tr.model.PowerSeries;
-
- test('stableId', function() {
- var device = { stableId: 'test' };
- var series = new PowerSeries(device);
-
- assert.equal(series.stableId, 'test.PowerSeries');
- });
-
- test('device', function() {
- var device = new tr.model.Device(new Model());
- var series = new PowerSeries(device);
-
- assert.equal(series.device, device);
- });
-
- test('addPowerSample', function() {
- var series = new PowerSeries(new Model().device);
-
- assert.equal(series.samples.length, 0);
-
- var sample1 = series.addPowerSample(0, 1);
- var sample2 = series.addPowerSample(1, 2);
-
- assert.deepEqual(series.samples, [sample1, sample2]);
- });
-
- test('getEnergyConsumed_oneInterval', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 2);
-
- assert.equal(series.getEnergyConsumedInJ(0, 1000), 1);
- });
-
- test('getEnergyConsumed_twoIntervals', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 2);
- series.addPowerSample(2000, 2);
-
- assert.equal(series.getEnergyConsumedInJ(0, 2000), 3);
- });
-
- test('getEnergyConsumed_oneSample', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(1000, 1);
-
- assert.equal(series.getEnergyConsumedInJ(0, 2000), 0);
- });
-
- test('getEnergyConsumed_samplesAfterStart', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(1000, 1);
- series.addPowerSample(2000, 2);
-
- assert.equal(series.getEnergyConsumedInJ(0, 2000), 1);
- });
-
- test('getEnergyConsumed_extraSamplesBeforeStart', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(0, 10);
- series.addPowerSample(1000, 1);
- series.addPowerSample(2000, 1);
- series.addPowerSample(3000, 1);
-
- assert.equal(series.getEnergyConsumedInJ(2000, 4000), 1);
- });
-
- test('getEnergyConsumed_extraSamplesAfterEnd', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 1);
- series.addPowerSample(2000, 1);
- series.addPowerSample(3000, 10);
-
- assert.equal(series.getEnergyConsumedInJ(0, 2000), 2);
- });
-
- test('shiftTimestampsForward', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
-
- series.shiftTimestampsForward(2);
-
- assert.equal(series.samples[0].start, 2);
- assert.equal(series.samples[1].start, 3);
-
- series.shiftTimestampsForward(-4);
-
- assert.equal(series.samples[0].start, -2);
- assert.equal(series.samples[1].start, -1);
- });
-
-
- test('updateBounds', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.updateBounds();
-
- assert.equal(series.bounds.min, 0);
- assert.equal(series.bounds.max, 1);
-
- series.addPowerSample(4, 3);
- series.updateBounds();
-
- assert.equal(series.bounds.min, 0);
- assert.equal(series.bounds.max, 4);
- });
-
- test('childEvents_empty', function() {
- var series = new PowerSeries(new Model().device);
- var eventsInSeries = [];
- for (var event of series.childEvents())
- eventsInSeries.push(event);
- assert.deepEqual(eventsInSeries, []);
- });
-
- test('childEvents_nonempty', function() {
- var series = new PowerSeries(new Model().device);
- var sample1 = series.addPowerSample(0, 1);
- var sample2 = series.addPowerSample(1, 2);
- var eventsInSeries = [];
- for (var event of series.childEvents())
- eventsInSeries.push(event);
- assert.deepEqual(eventsInSeries, [sample1, sample2]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/process.html b/chromium/third_party/catapult/tracing/tracing/model/process.html
deleted file mode 100644
index f46986cbd23..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/process.html
+++ /dev/null
@@ -1,159 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/process_base.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Process class.
- */
-tr.exportTo('tr.model', function() {
- var ProcessBase = tr.model.ProcessBase;
- var ProcessInstantEvent = tr.model.ProcessInstantEvent;
- var Frame = tr.model.Frame;
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
-
- /**
- * The Process represents a single userland process in the
- * trace.
- * @constructor
- */
- function Process(model, pid) {
- if (model === undefined)
- throw new Error('model must be provided');
- if (pid === undefined)
- throw new Error('pid must be provided');
- tr.model.ProcessBase.call(this, model);
- this.pid = pid;
- this.name = undefined;
- this.labels = [];
- this.instantEvents = [];
- this.memoryDumps = [];
- this.frames = [];
- this.activities = [];
- };
-
- /**
- * Comparison between processes that orders by pid.
- */
- Process.compare = function(x, y) {
- var tmp = tr.model.ProcessBase.compare(x, y);
- if (tmp)
- return tmp;
-
- tmp = tr.b.comparePossiblyUndefinedValues(
- x.name, y.name,
- function(x, y) { return x.localeCompare(y); });
- if (tmp)
- return tmp;
-
- tmp = tr.b.compareArrays(x.labels, y.labels,
- function(x, y) { return x.localeCompare(y); });
- if (tmp)
- return tmp;
-
- return x.pid - y.pid;
- };
-
- Process.prototype = {
- __proto__: tr.model.ProcessBase.prototype,
-
- get stableId() {
- return this.pid;
- },
-
- compareTo: function(that) {
- return Process.compare(this, that);
- },
-
- childEvents: function*() {
- yield * ProcessBase.prototype.childEvents.call(this);
- yield * this.instantEvents;
- yield * this.frames;
- yield * this.memoryDumps;
- },
-
- addLabelIfNeeded: function(labelName) {
- for (var i = 0; i < this.labels.length; i++) {
- if (this.labels[i] === labelName)
- return;
- }
- this.labels.push(labelName);
- },
-
- get userFriendlyName() {
- var res;
- if (this.name)
- res = this.name + ' (pid ' + this.pid + ')';
- else
- res = 'Process ' + this.pid;
- if (this.labels.length)
- res += ': ' + this.labels.join(', ');
- return res;
- },
-
- get userFriendlyDetails() {
- if (this.name)
- return this.name + ' (pid ' + this.pid + ')';
- return 'pid: ' + this.pid;
- },
-
- getSettingsKey: function() {
- if (!this.name)
- return undefined;
- if (!this.labels.length)
- return 'processes.' + this.name;
- return 'processes.' + this.name + '.' + this.labels.join('.');
- },
-
- shiftTimestampsForward: function(amount) {
- for (var i = 0; i < this.instantEvents.length; i++)
- this.instantEvents[i].start += amount;
-
- for (var i = 0; i < this.frames.length; i++)
- this.frames[i].shiftTimestampsForward(amount);
-
- for (var i = 0; i < this.memoryDumps.length; i++)
- this.memoryDumps[i].shiftTimestampsForward(amount);
-
- for (var i = 0; i < this.activities.length; i++)
- this.activities[i].shiftTimestampsForward(amount);
-
- tr.model.ProcessBase.prototype
- .shiftTimestampsForward.apply(this, arguments);
- },
-
- updateBounds: function() {
- tr.model.ProcessBase.prototype.updateBounds.apply(this);
-
- for (var i = 0; i < this.frames.length; i++)
- this.frames[i].addBoundsToRange(this.bounds);
-
- for (var i = 0; i < this.memoryDumps.length; i++)
- this.memoryDumps[i].addBoundsToRange(this.bounds);
-
- for (var i = 0; i < this.activities.length; i++)
- this.activities[i].addBoundsToRange(this.bounds);
- },
-
- sortMemoryDumps: function() {
- this.memoryDumps.sort(function(x, y) {
- return x.start - y.start;
- });
- tr.model.ProcessMemoryDump.hookUpMostRecentVmRegionsLinks(
- this.memoryDumps);
- }
- };
-
- return {
- Process: Process
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/process_base.html b/chromium/third_party/catapult/tracing/tracing/model/process_base.html
deleted file mode 100644
index 92aa673090f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/process_base.html
+++ /dev/null
@@ -1,236 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/counter.html">
-<link rel="import" href="/tracing/model/event_container.html">
-<link rel="import" href="/tracing/model/object_collection.html">
-<link rel="import" href="/tracing/model/thread.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the ProcessBase class.
- */
-tr.exportTo('tr.model', function() {
-
- var Thread = tr.model.Thread;
- var Counter = tr.model.Counter;
-
- /**
- * The ProcessBase is a partial base class, upon which Kernel
- * and Process are built.
- *
- * @constructor
- * @extends {tr.model.EventContainer}
- */
- function ProcessBase(model) {
- if (!model)
- throw new Error('Must provide a model');
- tr.model.EventContainer.call(this);
- this.model = model;
- this.threads = {};
- this.counters = {};
- this.objects = new tr.model.ObjectCollection(this);
- this.sortIndex = 0;
- };
-
- ProcessBase.compare = function(x, y) {
- return x.sortIndex - y.sortIndex;
- };
-
- ProcessBase.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get stableId() {
- throw new Error('Not implemented');
- },
-
- childEventContainers: function*() {
- yield * tr.b.dictionaryValues(this.threads);
- yield * tr.b.dictionaryValues(this.counters);
- yield this.objects;
- },
-
- iterateAllPersistableObjects: function(cb) {
- cb(this);
- for (var tid in this.threads)
- this.threads[tid].iterateAllPersistableObjects(cb);
- },
-
- /**
- * Gets the number of threads in this process.
- */
- get numThreads() {
- var n = 0;
- for (var p in this.threads) {
- n++;
- }
- return n;
- },
-
- /**
- * Shifts all the timestamps inside this process forward by the amount
- * specified.
- */
- shiftTimestampsForward: function(amount) {
- for (var child of this.childEventContainers())
- child.shiftTimestampsForward(amount);
- },
-
- /**
- * Closes any open slices.
- */
- autoCloseOpenSlices: function() {
- for (var tid in this.threads) {
- var thread = this.threads[tid];
- thread.autoCloseOpenSlices();
- }
- },
-
- autoDeleteObjects: function(maxTimestamp) {
- this.objects.autoDeleteObjects(maxTimestamp);
- },
-
- /**
- * Called by the model after finalizing imports,
- * but before joining refs.
- */
- preInitializeObjects: function() {
- this.objects.preInitializeAllObjects();
- },
-
- /**
- * Called by the model after joining refs.
- */
- initializeObjects: function() {
- this.objects.initializeAllObjects();
- },
-
- /**
- * Merge slices from the kernel with those from userland for each thread.
- */
- mergeKernelWithUserland: function() {
- for (var tid in this.threads) {
- var thread = this.threads[tid];
- thread.mergeKernelWithUserland();
- }
- },
-
- updateBounds: function() {
- this.bounds.reset();
- for (var tid in this.threads) {
- this.threads[tid].updateBounds();
- this.bounds.addRange(this.threads[tid].bounds);
- }
- for (var id in this.counters) {
- this.counters[id].updateBounds();
- this.bounds.addRange(this.counters[id].bounds);
- }
- this.objects.updateBounds();
- this.bounds.addRange(this.objects.bounds);
- },
-
- addCategoriesToDict: function(categoriesDict) {
- for (var tid in this.threads)
- this.threads[tid].addCategoriesToDict(categoriesDict);
- for (var id in this.counters)
- categoriesDict[this.counters[id].category] = true;
- this.objects.addCategoriesToDict(categoriesDict);
- },
-
- findAllThreadsMatching: function(predicate, opt_this) {
- var threads = [];
- for (var tid in this.threads) {
- var thread = this.threads[tid];
- if (predicate.call(opt_this, thread))
- threads.push(thread);
- }
- return threads;
- },
-
- /**
- * @param {String} The name of the thread to find.
- * @return {Array} An array of all the matched threads.
- */
- findAllThreadsNamed: function(name) {
- var threads = this.findAllThreadsMatching(function(thread) {
- if (!thread.name)
- return false;
- return thread.name === name;
- });
- return threads;
- },
-
- findAtMostOneThreadNamed: function(name) {
- var threads = this.findAllThreadsNamed(name);
- if (threads.length === 0)
- return undefined;
- if (threads.length > 1)
- throw new Error('Expected no more than one ' + name);
- return threads[0];
- },
-
- /**
- * Removes threads from the process that are fully empty.
- */
- pruneEmptyContainers: function() {
- var threadsToKeep = {};
- for (var tid in this.threads) {
- var thread = this.threads[tid];
- if (!thread.isEmpty)
- threadsToKeep[tid] = thread;
- }
- this.threads = threadsToKeep;
- },
-
- /**
- * @return {TimelineThread} The thread identified by tid on this process,
- * or undefined if it doesn't exist.
- */
- getThread: function(tid) {
- return this.threads[tid];
- },
-
- /**
- * @return {TimelineThread} The thread identified by tid on this process,
- * creating it if it doesn't exist.
- */
- getOrCreateThread: function(tid) {
- if (!this.threads[tid])
- this.threads[tid] = new Thread(this, tid);
- return this.threads[tid];
- },
-
- /**
- * @return {Counter} The counter on this process with the given
- * category/name combination, creating it if it doesn't exist.
- */
- getOrCreateCounter: function(cat, name) {
- var id = cat + '.' + name;
- if (!this.counters[id])
- this.counters[id] = new Counter(this, id, cat, name);
- return this.counters[id];
- },
-
- getSettingsKey: function() {
- throw new Error('Not implemented');
- },
-
- createSubSlices: function() {
- for (var tid in this.threads)
- this.threads[tid].createSubSlices();
- }
- };
-
- return {
- ProcessBase: ProcessBase
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/process_memory_dump.html b/chromium/third_party/catapult/tracing/tracing/model/process_memory_dump.html
deleted file mode 100644
index 7f806bcf6dc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/process_memory_dump.html
+++ /dev/null
@@ -1,244 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the ProcessMemoryDump class.
- */
-tr.exportTo('tr.model', function() {
-
- // Names of MemoryAllocatorDump(s) from which tracing overhead should be
- // discounted.
- var DISCOUNTED_ALLOCATOR_NAMES = ['winheap', 'malloc'];
-
- // The path to where the tracing overhead dump should be added to the
- // winheap/malloc allocator dump tree.
- var TRACING_OVERHEAD_PATH = ['allocated_objects', 'tracing_overhead'];
-
- var SIZE_NUMERIC_NAME = tr.model.MemoryAllocatorDump.SIZE_NUMERIC_NAME;
- var RESIDENT_SIZE_NUMERIC_NAME =
- tr.model.MemoryAllocatorDump.RESIDENT_SIZE_NUMERIC_NAME;
-
- function getSizeNumericValue(dump, sizeNumericName) {
- var sizeNumeric = dump.numerics[sizeNumericName];
- if (sizeNumeric === undefined)
- return 0;
- return sizeNumeric.value;
- }
-
- /**
- * The ProcessMemoryDump represents a memory dump of a single process.
- * @constructor
- */
- function ProcessMemoryDump(globalMemoryDump, process, start) {
- tr.model.ContainerMemoryDump.call(this, start);
- this.process = process;
- this.globalMemoryDump = globalMemoryDump;
-
- // Process memory totals (optional object) with the following fields (also
- // optional):
- // - residentBytes: Total resident bytes (number)
- // - peakResidentBytes: Peak resident bytes (number)
- // - arePeakResidentBytesResettable: Flag whether peak resident bytes are
- // resettable (boolean)
- // - platformSpecific: Map from OS-specific total names (string) to sizes
- // (number)
- this.totals = undefined;
-
- this.vmRegions = undefined;
-
- // Map from allocator names to heap dumps.
- this.heapDumps = undefined;
-
- this.tracingOverheadOwnershipSetUp_ = false;
- this.tracingOverheadDiscountedFromVmRegions_ = false;
- }
-
- ProcessMemoryDump.prototype = {
- __proto__: tr.model.ContainerMemoryDump.prototype,
-
- get userFriendlyName() {
- return 'Process memory dump at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.start);
- },
-
- get containerName() {
- return this.process.userFriendlyName;
- },
-
- get processMemoryDumps() {
- var dumps = {};
- dumps[this.process.pid] = this;
- return dumps;
- },
-
- get hasOwnVmRegions() {
- return this.vmRegions !== undefined;
- },
-
- setUpTracingOverheadOwnership: function(opt_model) {
- // Make sure that calling this method twice won't lead to
- // 'double-discounting'.
- if (this.tracingOverheadOwnershipSetUp_)
- return;
- this.tracingOverheadOwnershipSetUp_ = true;
-
- var tracingDump = this.getMemoryAllocatorDumpByFullName('tracing');
- if (tracingDump === undefined || tracingDump.owns !== undefined) {
- // The tracing dump either doesn't exist, or it already owns another
- // dump.
- return;
- }
-
- if (tracingDump.owns !== undefined)
- return;
-
- // Add an ownership link from tracing to
- // malloc/allocated_objects/tracing_overhead or
- // winheap/allocated_objects/tracing_overhead.
- var hasDiscountedFromAllocatorDumps = DISCOUNTED_ALLOCATOR_NAMES.some(
- function(allocatorName) {
- // First check if the allocator root exists.
- var allocatorDump = this.getMemoryAllocatorDumpByFullName(
- allocatorName);
- if (allocatorDump === undefined)
- return false; // Allocator doesn't exist, try another one.
-
- var nextPathIndex = 0;
- var currentDump = allocatorDump;
- var currentFullName = allocatorName;
-
- // Descend from the root towards tracing_overhead as long as the dumps
- // on the path exist.
- for (; nextPathIndex < TRACING_OVERHEAD_PATH.length; nextPathIndex++) {
- var childFullName = currentFullName + '/' +
- TRACING_OVERHEAD_PATH[nextPathIndex];
- var childDump = this.getMemoryAllocatorDumpByFullName(
- childFullName);
- if (childDump === undefined)
- break;
-
- currentDump = childDump;
- currentFullName = childFullName;
- }
-
- // Create the missing descendant dumps on the path from the root
- // towards tracing_overhead.
- for (; nextPathIndex < TRACING_OVERHEAD_PATH.length; nextPathIndex++) {
- var childFullName = currentFullName + '/' +
- TRACING_OVERHEAD_PATH[nextPathIndex];
- var childDump = new tr.model.MemoryAllocatorDump(
- currentDump.containerMemoryDump, childFullName);
- childDump.parent = currentDump;
- currentDump.children.push(childDump);
-
- currentFullName = childFullName;
- currentDump = childDump;
- }
-
- // Add the ownership link.
- var ownershipLink =
- new tr.model.MemoryAllocatorDumpLink(tracingDump, currentDump);
- tracingDump.owns = ownershipLink;
- currentDump.ownedBy.push(ownershipLink);
- return true;
- }, this);
-
- // Force rebuilding the memory allocator dump index (if we've just added
- // a new memory allocator dump).
- if (hasDiscountedFromAllocatorDumps)
- this.forceRebuildingMemoryAllocatorDumpByFullNameIndex();
- },
-
- discountTracingOverheadFromVmRegions: function(opt_model) {
- // Make sure that calling this method twice won't lead to
- // 'double-discounting'.
- if (this.tracingOverheadDiscountedFromVmRegions_)
- return;
- this.tracingOverheadDiscountedFromVmRegions_ = true;
-
- var tracingDump = this.getMemoryAllocatorDumpByFullName('tracing');
- if (tracingDump === undefined)
- return;
-
- var discountedSize =
- getSizeNumericValue(tracingDump, SIZE_NUMERIC_NAME);
- var discountedResidentSize =
- getSizeNumericValue(tracingDump, RESIDENT_SIZE_NUMERIC_NAME);
-
- if (discountedSize <= 0 && discountedResidentSize <= 0)
- return;
-
- // Subtract the tracing size from the totals.
- if (this.totals !== undefined) {
- if (this.totals.residentBytes !== undefined)
- this.totals.residentBytes -= discountedResidentSize;
- if (this.totals.peakResidentBytes !== undefined)
- this.totals.peakResidentBytes -= discountedResidentSize;
- }
-
- // Subtract the tracing size from VM regions. More precisely, subtract
- // tracing resident_size from byte stats (private dirty and PSS) and
- // tracing size from virtual size by injecting a fake VM region with
- // negative values.
- if (this.vmRegions !== undefined) {
- var hasSizeInBytes = this.vmRegions.sizeInBytes !== undefined;
- var hasPrivateDirtyResident =
- this.vmRegions.byteStats.privateDirtyResident !== undefined;
- var hasProportionalResident =
- this.vmRegions.byteStats.proportionalResident !== undefined;
-
- if ((hasSizeInBytes && discountedSize > 0) ||
- ((hasPrivateDirtyResident || hasProportionalResident) &&
- discountedResidentSize > 0)) {
- var byteStats = {};
- if (hasPrivateDirtyResident)
- byteStats.privateDirtyResident = -discountedResidentSize;
- if (hasProportionalResident)
- byteStats.proportionalResident = -discountedResidentSize;
- this.vmRegions.addRegion(tr.model.VMRegion.fromDict({
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: hasSizeInBytes ? -discountedSize : undefined,
- byteStats: byteStats
- }));
- }
- }
- }
- };
-
- ProcessMemoryDump.hookUpMostRecentVmRegionsLinks = function(processDumps) {
- var mostRecentVmRegions = undefined;
-
- processDumps.forEach(function(processDump) {
- // Update the most recent VM regions from the current dump.
- if (processDump.vmRegions !== undefined)
- mostRecentVmRegions = processDump.vmRegions;
-
- // Set the most recent VM regions of the current dump.
- processDump.mostRecentVmRegions = mostRecentVmRegions;
- });
- };
-
- tr.model.EventRegistry.register(
- ProcessMemoryDump,
- {
- name: 'processMemoryDump',
- pluralName: 'processMemoryDumps'
- });
-
- return {
- ProcessMemoryDump: ProcessMemoryDump
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/process_memory_dump_test.html b/chromium/third_party/catapult/tracing/tracing/model/process_memory_dump_test.html
deleted file mode 100644
index c8d6d4864d9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/process_memory_dump_test.html
+++ /dev/null
@@ -1,560 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addChildDump = tr.model.MemoryDumpTestUtils.addChildDump;
- var addOwnershipLink = tr.model.MemoryDumpTestUtils.addOwnershipLink;
- var checkDumpNumericsAndDiagnostics =
- tr.model.MemoryDumpTestUtils.checkDumpNumericsAndDiagnostics;
- var checkVMRegions = tr.model.MemoryDumpTestUtils.checkVMRegions;
-
- function createClassificationNode(opt_sizeInBytes, opt_byteStats) {
- var node = new VMRegionClassificationNode();
- if (opt_sizeInBytes !== undefined || opt_byteStats !== undefined) {
- node.addRegion(VMRegion.fromDict({
- mappedFile: 'mock.so',
- sizeInBytes: opt_sizeInBytes,
- byteStats: opt_byteStats
- }));
- }
- return node;
- }
-
- function createProcessMemoryDump(timestamp, model) {
- var gmd = new GlobalMemoryDump(model, timestamp);
- model.globalMemoryDumps.push(gmd);
- var p = model.getOrCreateProcess(123);
- var pmd = new ProcessMemoryDump(gmd, p, timestamp + 1);
- gmd.processMemoryDumps[123] = pmd;
- p.memoryDumps.push(pmd);
- return pmd;
- }
-
- function createFinalizedProcessMemoryDump(timestamp, opt_createdCallback) {
- return createFinalizedProcessMemoryDumps([timestamp], function(pmds) {
- if (opt_createdCallback !== undefined)
- opt_createdCallback(pmds[0]);
- })[0];
- }
-
- function createFinalizedProcessMemoryDumps(timestamps, createdCallback) {
- var model = tr.c.TestUtils.newModel(function(model) {
- var pmds = timestamps.map(function(timestamp) {
- return createProcessMemoryDump(timestamp, model);
- });
- createdCallback(pmds);
- });
- var pmds = model.getProcess(123).memoryDumps;
- assert.lengthOf(pmds, timestamps.length);
- return pmds;
- }
-
- test('processMemoryDumps', function() {
- var pmd = createFinalizedProcessMemoryDump(42);
- var pmds = pmd.processMemoryDumps;
- assert.lengthOf(Object.keys(pmds), 1);
- assert.strictEqual(pmds[123], pmd);
- });
-
- test('hookUpMostRecentVmRegionsLinks_emptyArray', function() {
- var dumps = [];
- ProcessMemoryDump.hookUpMostRecentVmRegionsLinks(dumps);
- assert.lengthOf(dumps, 0);
- });
-
- test('hookUpMostRecentVmRegionsLinks_nonEmptyArray', function() {
- var m = new tr.Model();
-
- // A dump with no VM regions or allocator dumps.
- var dump1 = createProcessMemoryDump(1, m);
-
- // A dump with VM regions and malloc and Oilpan allocator dumps.
- var dump2 = createProcessMemoryDump(2, m);
- dump2.vmRegions = createClassificationNode();
- dump2.memoryAllocatorDumps = [
- newAllocatorDump(dump2, 'oilpan', {numerics: {
- size: 1024,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 7),
- inner_size: 768
- }}),
- newAllocatorDump(dump2, 'v8', {numerics: {
- size: 2048,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 15),
- inner_size: 1999
- }})
- ];
-
- // A dump with malloc and V8 allocator dumps.
- var dump3 = createProcessMemoryDump(3, m);
- dump3.memoryAllocatorDumps = [
- newAllocatorDump(dump3, 'malloc', {numerics: {
- size: 1024,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 7),
- inner_size: 768
- }}),
- newAllocatorDump(dump3, 'v8', {numerics: {
- size: 2048,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 15),
- inner_size: 1999
- }})
- ];
-
- // A dump with VM regions.
- var dump4 = createProcessMemoryDump(4, m);
- dump4.vmRegions = createClassificationNode();
-
- var dumps = [dump1, dump2, dump3, dump4];
- ProcessMemoryDump.hookUpMostRecentVmRegionsLinks(dumps);
-
- assert.lengthOf(dumps, 4);
-
- assert.equal(dumps[0], dump1);
- assert.isUndefined(dump1.mostRecentVmRegions);
-
- assert.equal(dumps[1], dump2);
- assert.equal(dump2.mostRecentVmRegions, dump2.vmRegions);
-
- assert.equal(dumps[2], dump3);
- assert.equal(dump3.mostRecentVmRegions, dump2.vmRegions);
-
- assert.equal(dumps[3], dump4);
- assert.equal(dump4.mostRecentVmRegions, dump4.vmRegions);
- });
-
- test('checkDiscountTracingOverhead_undefinedFields', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.memoryAllocatorDumps = [
- newAllocatorDump(pmd, 'v8', {numerics: {size: 2048}}),
- newAllocatorDump(pmd, 'tracing', {numerics: {size: 1024}})
- ];
- });
-
- assert.isUndefined(pmd.totals);
- assert.isUndefined(pmd.vmRegions);
-
- var v8Dump = pmd.getMemoryAllocatorDumpByFullName('v8');
- checkDumpNumericsAndDiagnostics(v8Dump, {
- size: 2048,
- effective_size: 2048
- }, {});
-
- var tracingDump = pmd.getMemoryAllocatorDumpByFullName('tracing');
- checkDumpNumericsAndDiagnostics(tracingDump, {
- size: 1024,
- effective_size: 1024
- }, {});
- });
-
- test('checkDiscountTracingOverhead_definedFields', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.totals = {residentBytes: 10240};
- pmd.vmRegions = createClassificationNode(6000, {
- privateDirtyResident: 4096,
- proportionalResident: 5120,
- swapped: 1536
- });
-
- var mallocDump = newAllocatorDump(pmd, 'malloc',
- {numerics: {size: 3072}});
- addChildDump(mallocDump, 'allocated_objects', {numerics: {size: 2560}});
-
- var tracingDump = newAllocatorDump(
- pmd, 'tracing', {numerics: {size: 1024, resident_size: 1000}});
-
- pmd.memoryAllocatorDumps = [mallocDump, tracingDump];
- });
-
- assert.equal(pmd.totals.residentBytes, 9240);
- assert.isUndefined(pmd.totals.peakResidentBytes);
-
- var vmRegions = pmd.vmRegions;
- assert.strictEqual(vmRegions.sizeInBytes, 4976);
- assert.deepEqual(vmRegions.byteStats, {
- privateDirtyResident: 3096,
- proportionalResident: 4120,
- swapped: 1536
- });
-
- checkVMRegions(vmRegions, [
- {
- mappedFile: 'mock.so',
- sizeInBytes: 6000,
- byteStats: {
- privateDirtyResident: 4096,
- proportionalResident: 5120,
- swapped: 1536
- }
- },
- {
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: -1024,
- byteStats: {
- privateDirtyResident: -1000,
- proportionalResident: -1000
- }
- }
- ]);
-
- var mallocDump = pmd.getMemoryAllocatorDumpByFullName('malloc');
- checkDumpNumericsAndDiagnostics(mallocDump, {
- size: 3072,
- effective_size: 2048
- }, {});
- assert.lengthOf(
- mallocDump.children, 2 /* 'allocated_objects' and '<unspecified>' */);
-
- var allocatedObjectsDump = pmd.getMemoryAllocatorDumpByFullName(
- 'malloc/allocated_objects');
- checkDumpNumericsAndDiagnostics(allocatedObjectsDump, {
- size: 2560,
- effective_size: 1536
- }, {});
- assert.lengthOf(
- allocatedObjectsDump.children,
- 2 /* 'tracing_overhead' and '<unspecified>' */);
-
- var discountDump = pmd.getMemoryAllocatorDumpByFullName(
- 'malloc/allocated_objects/tracing_overhead');
- assert.strictEqual(discountDump.parent, allocatedObjectsDump);
- assert.include(allocatedObjectsDump.children, discountDump);
- checkDumpNumericsAndDiagnostics(discountDump, {
- size: 1024,
- effective_size: 0
- }, {});
-
- var tracingDump = pmd.getMemoryAllocatorDumpByFullName('tracing');
- checkDumpNumericsAndDiagnostics(tracingDump, {
- size: 1024,
- effective_size: 1024,
- resident_size: 1000
- }, {});
- assert.strictEqual(tracingDump.owns.target, discountDump);
- });
-
- test('checkDiscountTracingOverhead_winheap', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.memoryAllocatorDumps = [
- newAllocatorDump(pmd, 'tracing', {numerics: {size: 2048}}),
- newAllocatorDump(pmd, 'winheap', {numerics: {size: 5120}})
- ];
- });
-
- assert.isUndefined(pmd.totals);
- assert.isUndefined(pmd.vmRegions);
-
- var winheapDump = pmd.getMemoryAllocatorDumpByFullName('winheap');
- checkDumpNumericsAndDiagnostics(winheapDump, {
- size: 5120,
- effective_size: 3072
- }, {});
- assert.lengthOf(winheapDump.children,
- 2 /* 'allocated_objects' and '<unspecified>' */);
-
- var allocatedObjectsDump = pmd.getMemoryAllocatorDumpByFullName(
- 'winheap/allocated_objects');
- checkDumpNumericsAndDiagnostics(allocatedObjectsDump, {
- size: 2048,
- effective_size: 0
- }, {});
- assert.lengthOf(
- allocatedObjectsDump.children, 1 /* 'tracing_overhead' */);
-
- var discountDump = pmd.getMemoryAllocatorDumpByFullName(
- 'winheap/allocated_objects/tracing_overhead');
- assert.strictEqual(discountDump.parent, allocatedObjectsDump);
- assert.include(allocatedObjectsDump.children, discountDump);
- checkDumpNumericsAndDiagnostics(discountDump, {
- size: 2048,
- effective_size: 0
- }, {});
-
- var tracingDump = pmd.getMemoryAllocatorDumpByFullName('tracing');
- checkDumpNumericsAndDiagnostics(tracingDump, {
- size: 2048,
- effective_size: 2048
- }, {});
- assert.strictEqual(tracingDump.owns.target, discountDump);
- });
-
- test('checkDiscountTracingOverhead_withMostRecentVmRegionsLinks', function() {
- var pmds = createFinalizedProcessMemoryDumps([42, 90], function(pmds) {
- pmds[0].totals = {residentBytes: 1000, peakResidentBytes: 2000};
- pmds[0].vmRegions = createClassificationNode(6000, {
- privateDirtyResident: 4096
- });
- pmds[0].memoryAllocatorDumps = [
- newAllocatorDump(pmds[0], 'tracing',
- {numerics: {size: 300, resident_size: 100}})
- ];
-
- pmds[1].totals = {peakResidentBytes: 3000};
- pmds[1].memoryAllocatorDumps = [
- newAllocatorDump(pmds[0], 'tracing', {numerics: {resident_size: 200}})
- ];
- });
-
- // First PMD: Both total resident and private dirty resident size should be
- // reduced by 100. Virtual size should be reduced by 300.
- assert.strictEqual(pmds[0].totals.residentBytes, 900);
- assert.strictEqual(pmds[0].totals.peakResidentBytes, 1900);
- assert.strictEqual(pmds[0].vmRegions.sizeInBytes, 5700);
- assert.deepEqual(pmds[0].vmRegions.byteStats, {
- privateDirtyResident: 3996
- });
- checkVMRegions(pmds[0].vmRegions, [
- {
- mappedFile: 'mock.so',
- sizeInBytes: 6000,
- byteStats: {
- privateDirtyResident: 4096,
- }
- },
- {
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: -300,
- byteStats: {
- privateDirtyResident: -100
- }
- }
- ]);
- assert.strictEqual(pmds[0].mostRecentVmRegions, pmds[0].vmRegions);
-
- // Second PMD: Total resident size should be reduced by 200, whereas private
- // dirty resident size should be reduced by 100 (because it comes from
- // the VM regions in the first dump). Similarly, virtual size should be
- // reduced by 300.
- assert.isUndefined(pmds[1].totals.residentBytes);
- assert.equal(pmds[1].totals.peakResidentBytes, 2800);
- assert.isUndefined(pmds[1].vmRegions);
- assert.strictEqual(pmds[1].mostRecentVmRegions, pmds[0].vmRegions);
- });
-
- test('checkDiscountTracingOverhead_allDiscountedVmRegionFields', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.vmRegions = createClassificationNode(10000, {
- privateDirtyResident: 4096,
- proportionalResident: 8192,
- swapped: 1536
- });
- pmd.memoryAllocatorDumps = [
- newAllocatorDump(pmd, 'tracing',
- {numerics: {size: 1000, resident_size: 1024}})
- ];
- });
-
- var vmRegions = pmd.vmRegions;
- assert.strictEqual(vmRegions.sizeInBytes, 9000);
- assert.deepEqual(vmRegions.byteStats, {
- privateDirtyResident: 3072,
- proportionalResident: 7168,
- swapped: 1536
- });
- checkVMRegions(vmRegions, [
- {
- mappedFile: 'mock.so',
- sizeInBytes: 10000,
- byteStats: {
- privateDirtyResident: 4096,
- proportionalResident: 8192,
- swapped: 1536
- }
- },
- {
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: -1000,
- byteStats: {
- privateDirtyResident: -1024,
- proportionalResident: -1024
- }
- }
- ]);
- });
-
- test('checkDiscountTracingOverhead_twoDiscountedVmRegionField', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.vmRegions = createClassificationNode(10000, {
- privateDirtyResident: 4096,
- swapped: 1536
- });
- pmd.memoryAllocatorDumps = [
- newAllocatorDump(pmd, 'tracing',
- {numerics: {size: 1000, resident_size: 1024}})
- ];
- });
-
- var vmRegions = pmd.vmRegions;
- assert.strictEqual(vmRegions.sizeInBytes, 9000);
- assert.deepEqual(vmRegions.byteStats, {
- privateDirtyResident: 3072,
- swapped: 1536
- });
- checkVMRegions(vmRegions, [
- {
- mappedFile: 'mock.so',
- sizeInBytes: 10000,
- byteStats: {
- privateDirtyResident: 4096,
- swapped: 1536
- }
- },
- {
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: -1000,
- byteStats: {
- privateDirtyResident: -1024
- }
- }
- ]);
- });
-
- test('checkDiscountTracingOverhead_oneDiscountedVmRegionField', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.vmRegions = createClassificationNode(10000);
- pmd.memoryAllocatorDumps = [
- newAllocatorDump(pmd, 'tracing',
- {numerics: {size: 1000, resident_size: 1024}})
- ];
- });
-
- var vmRegions = pmd.vmRegions;
- assert.strictEqual(vmRegions.sizeInBytes, 9000);
- assert.deepEqual(vmRegions.byteStats, {});
- checkVMRegions(vmRegions, [
- {
- mappedFile: 'mock.so',
- sizeInBytes: 10000
- },
- {
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: -1000
- }
- ]);
- });
-
- test('checkDiscountTracingOverhead_noDiscountedVmRegionFields', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.vmRegions = createClassificationNode(undefined, {
- swapped: 1536
- });
- pmd.memoryAllocatorDumps = [
- newAllocatorDump(pmd, 'tracing',
- {numerics: {size: 1000, resident_size: 1024}})
- ];
- });
-
- var vmRegions = pmd.vmRegions;
- assert.isUndefined(vmRegions.sizeInBytes);
- assert.deepEqual(vmRegions.byteStats, {
- swapped: 1536
- });
- checkVMRegions(vmRegions, [
- {
- mappedFile: 'mock.so',
- byteStats: {
- swapped: 1536
- }
- }
- ]);
- });
-
- test('checkDiscountTracingOverhead_existingLink', function() {
- var pmd = createFinalizedProcessMemoryDump(42, function(pmd) {
- pmd.totals = {residentBytes: 10240};
-
- pmd.vmRegions = createClassificationNode(6000, {
- privateDirtyResident: 4096,
- swapped: 1536,
- proportionalResident: 5120
- });
-
- var mallocDump = newAllocatorDump(pmd, 'malloc',
- {numerics: {size: 3072}});
- var tracingDump = newAllocatorDump(pmd, 'tracing',
- {numerics: {size: 1024, resident_size: 1000}});
- var ownedDump = newAllocatorDump(pmd, 'owned');
-
- // The code for discounting tracing overhead should *not* override an
- // existing ownership.
- addOwnershipLink(tracingDump, ownedDump);
-
- pmd.memoryAllocatorDumps = [mallocDump, tracingDump, ownedDump];
- });
-
- assert.strictEqual(pmd.totals.residentBytes, 9240);
- assert.isUndefined(pmd.totals.peakResidentBytes);
-
- var vmRegions = pmd.vmRegions;
- assert.strictEqual(vmRegions.sizeInBytes, 4976);
- assert.deepEqual(vmRegions.byteStats, {
- privateDirtyResident: 3096,
- proportionalResident: 4120,
- swapped: 1536
- });
- checkVMRegions(vmRegions, [
- {
- mappedFile: 'mock.so',
- sizeInBytes: 6000,
- byteStats: {
- privateDirtyResident: 4096,
- proportionalResident: 5120,
- swapped: 1536
- }
- },
- {
- mappedFile: '[discounted tracing overhead]',
- sizeInBytes: -1024,
- byteStats: {
- privateDirtyResident: -1000,
- proportionalResident: -1000
- }
- }
- ]);
-
- var mallocDump = pmd.getMemoryAllocatorDumpByFullName('malloc');
- checkDumpNumericsAndDiagnostics(mallocDump, {
- size: 3072,
- effective_size: 3072
- }, {});
- assert.lengthOf(mallocDump.children, 0);
-
- var ownedDump = pmd.getMemoryAllocatorDumpByFullName('owned');
- checkDumpNumericsAndDiagnostics(ownedDump, {
- size: 1024,
- effective_size: 0
- }, {});
- assert.lengthOf(ownedDump.children, 0);
-
- var tracingDump = pmd.getMemoryAllocatorDumpByFullName('tracing');
- checkDumpNumericsAndDiagnostics(tracingDump, {
- size: 1024,
- effective_size: 1024,
- resident_size: 1000
- }, {});
- assert.strictEqual(tracingDump.owns.target, ownedDump);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/process_test.html b/chromium/third_party/catapult/tracing/tracing/model/process_test.html
deleted file mode 100644
index 449decbf3ea..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/process_test.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/frame.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/instant_event.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('getOrCreateCounter', function() {
- var model = new tr.Model();
- var process = new tr.model.Process(model, 7);
- var ctrBar = process.getOrCreateCounter('foo', 'bar');
- var ctrBar2 = process.getOrCreateCounter('foo', 'bar');
- assert.equal(ctrBar2, ctrBar);
- });
-
- test('shiftTimestampsForward', function() {
- var model = new tr.Model();
- var process = new tr.model.Process(model, 7);
- var ctr = process.getOrCreateCounter('foo', 'bar');
- var thread = process.getOrCreateThread(1);
-
- var instantEvent = new tr.model.InstantEvent('cat', 'event1', 1, 100);
- process.instantEvents.push(instantEvent);
-
- var slice = new tr.model.ThreadSlice('', 'a', 0, 1, {}, 4);
- var frame =
- new tr.model.Frame([slice], [{thread: thread, start: 100, end: 200}]);
- process.frames.push(frame);
-
- var memoryDump = new tr.model.GlobalMemoryDump(model, 100);
- process.memoryDumps.push(memoryDump);
-
- var shiftCount = 0;
- thread.shiftTimestampsForward = function(ts) {
- if (ts === 0.32)
- shiftCount++;
- };
- ctr.shiftTimestampsForward = function(ts) {
- if (ts === 0.32)
- shiftCount++;
- };
-
- process.shiftTimestampsForward(0.32);
- assert.equal(shiftCount, 2);
- assert.equal(instantEvent.start, 100.32);
- assert.equal(frame.start, 100.32);
- assert.equal(frame.end, 200.32);
- assert.equal(memoryDump.start, 100.32);
- });
-
- test('compareOnPID', function() {
- var model = new tr.Model();
- var p1 = new tr.model.Process(model, 1);
- p1.name = 'Renderer';
-
- var model = new tr.Model();
- var p2 = new tr.model.Process(model, 2);
- p2.name = 'Renderer';
-
- assert.isBelow(p1.compareTo(p2), 0);
- });
-
- test('compareOnSortIndex', function() {
- var model = new tr.Model();
- var p1 = new tr.model.Process(model, 1);
- p1.name = 'Renderer';
- p1.sortIndex = 1;
-
- var p2 = new tr.model.Process(model, 2);
- p2.name = 'Renderer';
-
- assert.isAbove(p1.compareTo(p2), 0);
- });
-
- test('compareOnName', function() {
- var model = new tr.Model();
- var p1 = new tr.model.Process(model, 1);
- p1.name = 'Browser';
-
- var p2 = new tr.model.Process(model, 2);
- p2.name = 'Renderer';
-
- assert.isBelow(p1.compareTo(p2), 0);
- });
-
- test('compareOnLabels', function() {
- var model = new tr.Model();
- var p1 = new tr.model.Process(model, 1);
- p1.name = 'Renderer';
- p1.labels = ['a'];
-
- var p2 = new tr.model.Process(model, 2);
- p2.name = 'Renderer';
- p2.labels = ['b'];
-
- assert.isBelow(p1.compareTo(p2), 0);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item.html b/chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item.html
deleted file mode 100644
index e9f3d92cfa4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/selectable_item.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var SelectableItem = tr.model.SelectableItem;
- var SelectionState = tr.model.SelectionState;
-
- /**
- * A ProxySelectableItem is a selectable item which is not a model item itself
- * but instead acts as a proxy for a model item.
- *
- * @constructor
- * @extends {SelectableItem}
- */
- function ProxySelectableItem(modelItem) {
- SelectableItem.call(this, modelItem);
- };
-
- ProxySelectableItem.prototype = {
- __proto__: SelectableItem.prototype,
-
- get selectionState() {
- var modelItem = this.modelItem_;
- if (modelItem === undefined)
- return SelectionState.NONE;
- return modelItem.selectionState;
- }
- };
-
- return {
- ProxySelectableItem: ProxySelectableItem
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item_test.html b/chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item_test.html
deleted file mode 100644
index 8b5710b2d72..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/proxy_selectable_item_test.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/proxy_selectable_item.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ProxySelectableItem = tr.model.ProxySelectableItem;
- var SelectionState = tr.model.SelectionState;
-
- test('checkSelectionState_undefinedModelItem', function() {
- var proxyItem = new ProxySelectableItem(undefined);
- assert.isFalse(proxyItem.selected);
- assert.equal(proxyItem.selectionState, SelectionState.NONE);
- });
-
- test('checkSelectionState_definedModelItem', function() {
- // Start with a selected model event.
- var modelItem = {selectionState: SelectionState.SELECTED};
- var proxyItem = new ProxySelectableItem(modelItem);
- assert.isTrue(proxyItem.selected);
- assert.equal(proxyItem.selectionState, SelectionState.SELECTED);
-
- // Change the selection state of the model event to highlighted.
- modelItem.selectionState = SelectionState.HIGHLIGHTED;
- assert.isFalse(proxyItem.selected);
- assert.equal(proxyItem.selectionState, SelectionState.HIGHLIGHTED);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/rect_annotation.html b/chromium/third_party/catapult/tracing/tracing/model/rect_annotation.html
deleted file mode 100644
index a87f7667ee1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/rect_annotation.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/location.html">
-<link rel="import" href="/tracing/model/annotation.html">
-<link rel="import" href="/tracing/ui/annotations/rect_annotation_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- function RectAnnotation(start, end) {
- tr.model.Annotation.apply(this, arguments);
-
- this.startLocation_ = start; // Location of top-left corner.
- this.endLocation_ = end; // Location of bottom-right corner.
- this.fillStyle = 'rgba(255, 180, 0, 0.3)';
- }
-
- RectAnnotation.fromDict = function(dict) {
- var args = dict.args;
- var startLoc =
- new tr.model.Location(args.start.xWorld, args.start.yComponents);
- var endLoc =
- new tr.model.Location(args.end.xWorld, args.end.yComponents);
- return new tr.model.RectAnnotation(startLoc, endLoc);
- }
-
- RectAnnotation.prototype = {
- __proto__: tr.model.Annotation.prototype,
-
- get startLocation() {
- return this.startLocation_;
- },
-
- get endLocation() {
- return this.endLocation_;
- },
-
- toDict: function() {
- return {
- typeName: 'rect',
- args: {
- start: this.startLocation.toDict(),
- end: this.endLocation.toDict()
- }
- };
- },
-
- createView_: function(viewport) {
- return new tr.ui.annotations.RectAnnotationView(viewport, this);
- }
- };
-
- tr.model.Annotation.register(RectAnnotation, {typeName: 'rect'});
-
- return {
- RectAnnotation: RectAnnotation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/sample.html b/chromium/third_party/catapult/tracing/tracing/model/sample.html
deleted file mode 100644
index 48435cfbcf9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/sample.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Sample class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * A Sample represents a sample taken at an instant in time, plus its stack
- * frame and parameters associated with that sample.
- *
- * @constructor
- */
- function Sample(cpu, thread, title, start, leafStackFrame,
- opt_weight, opt_args) {
- tr.model.TimedEvent.call(this, start);
-
- this.title = title;
- this.cpu = cpu;
- this.thread = thread;
- this.leafStackFrame = leafStackFrame;
- this.weight = opt_weight;
- this.args = opt_args || {};
- }
-
- Sample.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- get colorId() {
- return this.leafStackFrame.colorId;
- },
-
- get stackTrace() {
- return this.leafStackFrame.stackTrace;
- },
-
- getUserFriendlyStackTrace: function() {
- return this.leafStackFrame.getUserFriendlyStackTrace();
- },
-
- get userFriendlyName() {
- return 'Sample at ' + tr.b.Unit.byName.timeStampInMs.format(this.start);
- }
- };
-
- tr.model.EventRegistry.register(
- Sample,
- {
- name: 'sample',
- pluralName: 'samples'
- });
-
- return {
- Sample: Sample
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/sample_test.html b/chromium/third_party/catapult/tracing/tracing/model/sample_test.html
deleted file mode 100644
index 392b55b8475..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/sample_test.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Sample = tr.model.Sample;
- var StackFrame = tr.model.StackFrame;
- var Thread = tr.model.Thread;
-
- test('sampleStackTrace', function() {
- var thread = tr.c.TestUtils.newFakeThread();
-
- var model = new tr.Model();
- var fABC = tr.c.TestUtils.newStackTrace(model, ['a', 'b', 'c']);
-
- var s = new Sample(undefined, thread, 'instructions_retired',
- 10, fABC, 10);
- var stackTrace = s.stackTrace;
- var stackTraceNames = stackTrace.map(function(f) { return f.title; });
- assert.deepEqual(
- stackTraceNames,
- ['c', 'b', 'a']);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/scoped_id.html b/chromium/third_party/catapult/tracing/tracing/model/scoped_id.html
deleted file mode 100644
index 652d6f0a7d3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/scoped_id.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/model/constants.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- function ScopedId(scope, id) {
- if (scope === undefined) {
- throw new Error('Scope should be defined. Use \'' +
- tr.model.OBJECT_DEFAULT_SCOPE +
- '\' as the default scope.');
- }
- this.scope = scope;
- this.id = id;
- }
-
- ScopedId.prototype = {
- toString: function() {
- return '{scope: ' + this.scope + ', id: ' + this.id + '}';
- }
- };
-
- return {
- ScopedId: ScopedId
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/selectable_item.html b/chromium/third_party/catapult/tracing/tracing/model/selectable_item.html
deleted file mode 100644
index 25ee56dd2d5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/selectable_item.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the SelectableItem class.
- */
-tr.exportTo('tr.model', function() {
- var SelectionState = tr.model.SelectionState;
-
- /**
- * A SelectableItem is the abstract base class for any non-container data that
- * has an associated model item in the trace model (possibly itself).
- *
- * Subclasses must provide a selectionState property (or getter).
- *
- * @constructor
- */
- function SelectableItem(modelItem) {
- this.modelItem_ = modelItem;
- }
-
- SelectableItem.prototype = {
- get modelItem() {
- return this.modelItem_;
- },
-
- get selected() {
- return this.selectionState === SelectionState.SELECTED;
- },
-
- addToSelection: function(selection) {
- var modelItem = this.modelItem_;
- if (!modelItem)
- return;
- selection.push(modelItem);
- },
-
- addToTrackMap: function(eventToTrackMap, track) {
- var modelItem = this.modelItem_;
- if (!modelItem)
- return;
- eventToTrackMap.addEvent(modelItem, track);
- }
- };
-
- return {
- SelectableItem: SelectableItem
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/selectable_item_test.html b/chromium/third_party/catapult/tracing/tracing/model/selectable_item_test.html
deleted file mode 100644
index c808f3bee23..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/selectable_item_test.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/selectable_item.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/tracks/event_to_track_map.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Event = tr.model.Event;
- var EventToTrackMap = tr.ui.tracks.EventToTrackMap;
- var SelectableItem = tr.model.SelectableItem;
- var SelectionState = tr.model.SelectionState;
-
- test('checkModelItem', function() {
- var selectableItem1 = new SelectableItem(undefined);
- assert.isUndefined(selectableItem1.modelItem);
-
- var event = new Event();
- var selectableItem2 = new SelectableItem(event);
- assert.equal(selectableItem2.modelItem, event);
- });
-
- test('checkSelected', function() {
- var selectableItem = new SelectableItem(undefined);
-
- selectableItem.selectionState = SelectionState.NONE;
- assert.isFalse(selectableItem.selected);
-
- selectableItem.selectionState = SelectionState.SELECTED;
- assert.isTrue(selectableItem.selected);
-
- selectableItem.selectionState = SelectionState.HIGHLIGHTED;
- assert.isFalse(selectableItem.selected);
- });
-
- test('checkAddToSelection_undefinedModelItem', function() {
- var selectableItem = new SelectableItem(undefined);
- var selection = [];
- selectableItem.addToSelection(selection);
- assert.lengthOf(selection, 0);
- });
-
- test('checkAddToSelection_definedModelItem', function() {
- var event = new Event();
- var selectableItem = new SelectableItem(event);
- var selection = [];
- selectableItem.addToSelection(selection);
- assert.lengthOf(selection, 1);
- assert.equal(selection[0], event);
- });
-
- test('checkAddToTrackMap_undefinedModelItem', function() {
- var selectableItem = new SelectableItem(undefined);
- var eventToTrackMap = new EventToTrackMap();
- var track = {};
- selectableItem.addToTrackMap(eventToTrackMap, track);
- assert.lengthOf(Object.keys(eventToTrackMap), 0);
- });
-
- test('checkAddToTrackMap_definedModelItem', function() {
- var event = new Event();
- var selectableItem = new SelectableItem(event);
- var eventToTrackMap = new EventToTrackMap();
- var track = {};
- selectableItem.addToTrackMap(eventToTrackMap, track);
- assert.lengthOf(Object.keys(eventToTrackMap), 1);
- assert.equal(eventToTrackMap[event.guid], track);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/selection_state.html b/chromium/third_party/catapult/tracing/tracing/model/selection_state.html
deleted file mode 100644
index c49abfde4a5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/selection_state.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/color_scheme.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the SelectionState class.
- */
-tr.exportTo('tr.model', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- /**
- * Describes the level of visual highlighting to apply to an event when shown.
- *
- * color_scheme.html defines N variations off of a base color palette,
- * one for each selection state, all concatenated into one flat array. To
- * pick the final colorId for a given variations, the SelectionState is
- * multiplied by the number of base colors.
- *
- * Thus, the values here must be kept in sync with color_scheme's palette
- * layout.
- */
- var SelectionState = {
- NONE: 0,
-
- // Legacy names.
- SELECTED: ColorScheme.properties.brightenedOffsets[0],
- HIGHLIGHTED: ColorScheme.properties.brightenedOffsets[1],
- DIMMED: ColorScheme.properties.dimmedOffsets[0],
-
- // Modern names.
- BRIGHTENED0: ColorScheme.properties.brightenedOffsets[0],
- BRIGHTENED1: ColorScheme.properties.brightenedOffsets[1],
- BRIGHTENED2: ColorScheme.properties.brightenedOffsets[2],
-
- DIMMED0: ColorScheme.properties.dimmedOffsets[0],
- DIMMED1: ColorScheme.properties.dimmedOffsets[1],
- DIMMED2: ColorScheme.properties.dimmedOffsets[2]
- };
-
- var brighteningLevels = [
- SelectionState.NONE,
- SelectionState.BRIGHTENED0,
- SelectionState.BRIGHTENED1,
- SelectionState.BRIGHTENED2
- ];
- SelectionState.getFromBrighteningLevel = function(level) {
- return brighteningLevels[level];
- }
-
- var dimmingLevels = [
- SelectionState.DIMMED0,
- SelectionState.DIMMED1,
- SelectionState.DIMMED2
- ];
- SelectionState.getFromDimmingLevel = function(level) {
- return dimmingLevels[level];
- }
-
- return {
- SelectionState: SelectionState
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/slice.html b/chromium/third_party/catapult/tracing/tracing/model/slice.html
deleted file mode 100644
index 28d43c19993..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/slice.html
+++ /dev/null
@@ -1,291 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Slice class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * A Slice represents an interval of time plus parameters associated
- * with that interval.
- *
- * @constructor
- */
- function Slice(category, title, colorId, start, args, opt_duration,
- opt_cpuStart, opt_cpuDuration, opt_argsStripped,
- opt_bindId) {
- if (new.target) {
- throw new Error("Can't instantiate pure virtual class Slice");
- }
- tr.model.TimedEvent.call(this, start);
-
- this.category = category || '';
- this.title = title;
- this.colorId = colorId;
- this.args = args;
- this.startStackFrame = undefined;
- this.endStackFrame = undefined;
- this.didNotFinish = false;
- this.inFlowEvents = [];
- this.outFlowEvents = [];
- this.subSlices = [];
- this.selfTime = undefined;
- this.cpuSelfTime = undefined;
- this.important = false;
- this.parentContainer = undefined;
- this.argsStripped = false;
-
- this.bind_id_ = opt_bindId;
-
- // parentSlice and isTopLevel will be set by SliceGroup.
- this.parentSlice = undefined;
- this.isTopLevel = false;
- // After SliceGroup processes Slices, isTopLevel should be equivalent to
- // !parentSlice.
-
- if (opt_duration !== undefined)
- this.duration = opt_duration;
-
- if (opt_cpuStart !== undefined)
- this.cpuStart = opt_cpuStart;
-
- if (opt_cpuDuration !== undefined)
- this.cpuDuration = opt_cpuDuration;
-
- if (opt_argsStripped !== undefined)
- this.argsStripped = true;
- }
-
- Slice.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
-
- get analysisTypeName() {
- return this.title;
- },
-
- get userFriendlyName() {
- return 'Slice ' + this.title + ' at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.start);
- },
-
- get stableId() {
- var parentSliceGroup = this.parentContainer.sliceGroup;
- return parentSliceGroup.stableId + '.' +
- parentSliceGroup.slices.indexOf(this);
- },
-
- findDescendentSlice: function(targetTitle) {
- if (!this.subSlices)
- return undefined;
-
- for (var i = 0; i < this.subSlices.length; i++) {
- if (this.subSlices[i].title === targetTitle)
- return this.subSlices[i];
- var slice = this.subSlices[i].findDescendentSlice(targetTitle);
- if (slice) return slice;
- }
- return undefined;
- },
-
- get mostTopLevelSlice() {
- var curSlice = this;
- while (curSlice.parentSlice)
- curSlice = curSlice.parentSlice;
-
- return curSlice;
- },
-
- getProcess: function() {
- var thread = this.parentContainer;
- if (thread && thread.getProcess)
- return thread.getProcess();
- return undefined;
- },
-
- get model() {
- var process = this.getProcess();
- if (process !== undefined)
- return this.getProcess().model;
- return undefined;
- },
-
- /**
- * Finds all topmost slices relative to this slice.
- *
- * Slices may have multiple direct descendants which satisfy
- * |eventPredicate|, and in this case, all of them are topmost as long as
- * this slice does not satisfy the predicate.
- *
- * For instance, suppose we are passing a predicate that checks whether
- * events titles begin with 'C'.
- * C1.findTopmostSlicesRelativeToThisSlice() returns C1 in this example:
- * [ C1 ]
- * [ C2 ]
- *
- * and D.findTopmostSlicesRelativeToThisSlice() returns C1 and C2 in this
- * example:
- * [ D ]
- * [C1] [C2]
- */
- findTopmostSlicesRelativeToThisSlice: function*(eventPredicate) {
- if (eventPredicate(this)) {
- yield this;
- return;
- }
- for (var s of this.subSlices)
- yield * s.findTopmostSlicesRelativeToThisSlice(eventPredicate);
- },
-
- /**
- * Obtains all subsequent slices of this slice.
- *
- * Subsequent slices are slices that get executed after a particular
- * slice, i.e., all the functions that are called after the current one.
- *
- * For instance, E.iterateAllSubsequentSlices() in the following example:
- * [ A ]
- * [ B][ D ][ G ]
- * [C] [E][F] [H]
- * will pass F, G, then H to the provided callback.
- *
- * The reason we need subsequent slices of a particular slice is that
- * when there is flow event goes into, e.g., E, we only want to highlight
- * E's subsequent slices to indicate the execution order.
- *
- * The idea to calculate the subsequent slices of slice E is to view
- * the slice group as a tree where the top-level slice A is the root node.
- * The preorder depth-first-search (DFS) order is naturally equivalent
- * to the function call order. We just need to perform a DFS, and start
- * recording the slices after we see the occurance of E.
- */
- iterateAllSubsequentSlices: function(callback, opt_this) {
- var parentStack = [];
- var started = false;
-
- // get the root node and push it to the DFS stack
- var topmostSlice = this.mostTopLevelSlice;
- parentStack.push(topmostSlice);
-
- // Using the stack to perform DFS
- while (parentStack.length !== 0) {
- var curSlice = parentStack.pop();
-
- if (started)
- callback.call(opt_this, curSlice);
- else
- started = (curSlice.guid === this.guid);
-
- for (var i = curSlice.subSlices.length - 1; i >= 0; i--) {
- parentStack.push(curSlice.subSlices[i]);
- }
- }
- },
-
- get subsequentSlices() {
- var res = [];
-
- this.iterateAllSubsequentSlices(function(subseqSlice) {
- res.push(subseqSlice);
- });
-
- return res;
- },
-
- /**
- * Obtains the parents of a slice, from the most immediate to the root.
- *
- * For instance, E.enumerateAllAncestors() in the following example:
- * [ A ]
- * [ B][ D ][ G ]
- * [C] [E][F] [H]
- * will yield D, then A, in the order from the leaves to the root.
- */
- enumerateAllAncestors: function*() {
- var curSlice = this;
-
- while (curSlice.parentSlice) {
- curSlice = curSlice.parentSlice;
- yield curSlice;
- }
- },
-
- get ancestorSlices() {
- var res = [];
- for (var slice of this.enumerateAllAncestors())
- res.push(slice);
- return res;
- },
-
- iterateEntireHierarchy: function(callback, opt_this) {
- var mostTopLevelSlice = this.mostTopLevelSlice;
- callback.call(opt_this, mostTopLevelSlice);
- mostTopLevelSlice.iterateAllSubsequentSlices(callback, opt_this);
- },
-
- get entireHierarchy() {
- var res = [];
-
- this.iterateEntireHierarchy(function(slice) {
- res.push(slice);
- });
-
- return res;
- },
-
- /**
- * Returns this slice, and its ancestor and subsequent slices.
- *
- * For instance, E.ancestorAndSubsequentSlices in the following example:
- * [ A ]
- * [ B][ D ][ G ]
- * [C] [E][F] [H]
- * will return E, D, A, F, G, and H, where E is itself, D and A are
- * E's ancestors, and F, G, and H are subsequent slices of E
- */
- get ancestorAndSubsequentSlices() {
- var res = [];
-
- res.push(this);
-
- for (var aSlice of this.enumerateAllAncestors())
- res.push(aSlice);
-
- this.iterateAllSubsequentSlices(function(sSlice) {
- res.push(sSlice);
- });
-
- return res;
- },
-
- enumerateAllDescendents: function*() {
- for (var slice of this.subSlices)
- yield slice;
- for (var slice of this.subSlices)
- yield * slice.enumerateAllDescendents();
- },
-
- get descendentSlices() {
- var res = [];
- for (var slice of this.enumerateAllDescendents())
- res.push(slice);
- return res;
- }
-
- };
-
- return {
- Slice: Slice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/slice_group.html b/chromium/third_party/catapult/tracing/tracing/model/slice_group.html
deleted file mode 100644
index bdecceecf58..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/slice_group.html
+++ /dev/null
@@ -1,673 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/event_container.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the SliceGroup class.
- */
-tr.exportTo('tr.model', function() {
- var ColorScheme = tr.b.ColorScheme;
- var ThreadSlice = tr.model.ThreadSlice;
-
- function getSliceLo(s) {
- return s.start;
- }
-
- function getSliceHi(s) {
- return s.end;
- }
-
- /**
- * A group of Slices, plus code to create them from B/E events, as
- * well as arrange them into subRows.
- *
- * Do not mutate the slices array directly. Modify it only by
- * SliceGroup mutation methods.
- *
- * @constructor
- * @param {function(new:Slice, category, title, colorId, start, args)=}
- * opt_sliceConstructor The constructor to use when creating slices.
- * @extends {tr.model.EventContainer}
- */
- function SliceGroup(parentContainer, opt_sliceConstructor, opt_name) {
- tr.model.EventContainer.call(this);
-
- this.parentContainer_ = parentContainer;
-
- var sliceConstructor = opt_sliceConstructor || ThreadSlice;
- this.sliceConstructor = sliceConstructor;
- this.sliceConstructorSubTypes = this.sliceConstructor.subTypes;
- if (!this.sliceConstructorSubTypes)
- throw new Error('opt_sliceConstructor must have a subtype registry.');
-
- this.openPartialSlices_ = [];
-
- this.slices = [];
- this.topLevelSlices = [];
- this.haveTopLevelSlicesBeenBuilt = false;
- this.name_ = opt_name;
-
- if (this.model === undefined)
- throw new Error('SliceGroup must have model defined.');
- }
-
- SliceGroup.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get parentContainer() {
- return this.parentContainer_;
- },
-
- get model() {
- return this.parentContainer_.model;
- },
-
- get stableId() {
- return this.parentContainer_.stableId + '.SliceGroup';
- },
-
- getSettingsKey: function() {
- if (!this.name_)
- return undefined;
- var parentKey = this.parentContainer_.getSettingsKey();
- if (!parentKey)
- return undefined;
- return parentKey + '.' + this.name;
- },
-
- /**
- * @return {Number} The number of slices in this group.
- */
- get length() {
- return this.slices.length;
- },
-
- /**
- * Helper function that pushes the provided slice onto the slices array.
- * @param {Slice} slice The slice to be added to the slices array.
- */
- pushSlice: function(slice) {
- this.haveTopLevelSlicesBeenBuilt = false;
- slice.parentContainer = this.parentContainer_;
- this.slices.push(slice);
- return slice;
- },
-
- /**
- * Helper function that pushes the provided slices onto the slices array.
- * @param {Array.<Slice>} slices An array of slices to be added.
- */
- pushSlices: function(slices) {
- this.haveTopLevelSlicesBeenBuilt = false;
- slices.forEach(function(slice) {
- slice.parentContainer = this.parentContainer_;
- this.slices.push(slice);
- }, this);
- },
-
- /**
- * Opens a new slice in the group's slices.
- *
- * Calls to beginSlice and
- * endSlice must be made with non-monotonically-decreasing timestamps.
- *
- * @param {String} category Category name of the slice to add.
- * @param {String} title Title of the slice to add.
- * @param {Number} ts The timetsamp of the slice, in milliseconds.
- * @param {Object.<string, Object>=} opt_args Arguments associated with
- * the slice.
- * @param {Number=} opt_colorId The color of the slice, defined by
- * its palette id (see base/color_scheme.html).
- */
- beginSlice: function(category, title, ts, opt_args, opt_tts,
- opt_argsStripped, opt_colorId) {
- if (this.openPartialSlices_.length) {
- var prevSlice = this.openPartialSlices_[
- this.openPartialSlices_.length - 1];
- if (ts < prevSlice.start)
- throw new Error('Slices must be added in increasing timestamp order');
- }
-
- var colorId = opt_colorId ||
- ColorScheme.getColorIdForGeneralPurposeString(title);
- var sliceConstructorSubTypes = this.sliceConstructorSubTypes;
- var sliceType = sliceConstructorSubTypes.getConstructor(category, title);
- var slice = new sliceType(category, title, colorId, ts,
- opt_args ? opt_args : {}, null,
- opt_tts, undefined,
- opt_argsStripped);
- this.openPartialSlices_.push(slice);
- slice.didNotFinish = true;
- this.pushSlice(slice);
-
- return slice;
- },
-
- isTimestampValidForBeginOrEnd: function(ts) {
- if (!this.openPartialSlices_.length)
- return true;
- var top = this.openPartialSlices_[this.openPartialSlices_.length - 1];
- return ts >= top.start;
- },
-
- /**
- * @return {Number} The number of beginSlices for which an endSlice has not
- * been issued.
- */
- get openSliceCount() {
- return this.openPartialSlices_.length;
- },
-
- get mostRecentlyOpenedPartialSlice() {
- if (!this.openPartialSlices_.length)
- return undefined;
- return this.openPartialSlices_[this.openPartialSlices_.length - 1];
- },
-
- /**
- * Ends the last begun slice in this group and pushes it onto the slice
- * array.
- *
- * @param {Number} ts Timestamp when the slice ended
- * @param {Number=} opt_colorId The color of the slice, defined by
- * its palette id (see base/color_scheme.html).
- * @return {Slice} slice.
- */
- endSlice: function(ts, opt_tts, opt_colorId) {
- if (!this.openSliceCount)
- throw new Error('endSlice called without an open slice');
-
- var slice = this.openPartialSlices_[this.openSliceCount - 1];
- this.openPartialSlices_.splice(this.openSliceCount - 1, 1);
- if (ts < slice.start)
- throw new Error('Slice ' + slice.title +
- ' end time is before its start.');
-
- slice.duration = ts - slice.start;
- slice.didNotFinish = false;
- slice.colorId = opt_colorId || slice.colorId;
-
- if (opt_tts && slice.cpuStart !== undefined)
- slice.cpuDuration = opt_tts - slice.cpuStart;
-
- return slice;
- },
-
- /**
- * Push a complete event as a Slice into the slice list.
- * The timestamp can be in any order.
- *
- * @param {String} category Category name of the slice to add.
- * @param {String} title Title of the slice to add.
- * @param {Number} ts The timetsamp of the slice, in milliseconds.
- * @param {Number} duration The duration of the slice, in milliseconds.
- * @param {Object.<string, Object>=} opt_args Arguments associated with
- * the slice.
- * @param {Number=} opt_colorId The color of the slice, as defined by
- * its palette id (see base/color_scheme.html).
- */
- pushCompleteSlice: function(category, title, ts, duration, tts,
- cpuDuration, opt_args, opt_argsStripped,
- opt_colorId, opt_bindId) {
- var colorId = opt_colorId ||
- ColorScheme.getColorIdForGeneralPurposeString(title);
- var sliceConstructorSubTypes = this.sliceConstructorSubTypes;
- var sliceType = sliceConstructorSubTypes.getConstructor(category, title);
- var slice = new sliceType(category, title, colorId, ts,
- opt_args ? opt_args : {},
- duration, tts, cpuDuration,
- opt_argsStripped, opt_bindId);
- if (duration === undefined)
- slice.didNotFinish = true;
- this.pushSlice(slice);
- return slice;
- },
-
- /**
- * Closes any open slices.
- * @param {Number=} opt_maxTimestamp The end time to use for the closed
- * slices. If not provided,
- * the max timestamp for this slice is provided.
- */
- autoCloseOpenSlices: function() {
- this.updateBounds();
- var maxTimestamp = this.bounds.max;
- for (var sI = 0; sI < this.slices.length; sI++) {
- var slice = this.slices[sI];
- if (slice.didNotFinish)
- slice.duration = maxTimestamp - slice.start;
- }
- this.openPartialSlices_ = [];
- },
-
- /**
- * Shifts all the timestamps inside this group forward by the amount
- * specified.
- */
- shiftTimestampsForward: function(amount) {
- for (var sI = 0; sI < this.slices.length; sI++) {
- var slice = this.slices[sI];
- slice.start = (slice.start + amount);
- }
- },
-
- /**
- * Updates the bounds for this group based on the slices it contains.
- */
- updateBounds: function() {
- this.bounds.reset();
- for (var i = 0; i < this.slices.length; i++) {
- this.bounds.addValue(this.slices[i].start);
- this.bounds.addValue(this.slices[i].end);
- }
- },
-
- copySlice: function(slice) {
- var sliceConstructorSubTypes = this.sliceConstructorSubTypes;
- var sliceType = sliceConstructorSubTypes.getConstructor(slice.category,
- slice.title);
- var newSlice = new sliceType(slice.category, slice.title,
- slice.colorId, slice.start,
- slice.args, slice.duration, slice.cpuStart, slice.cpuDuration);
- newSlice.didNotFinish = slice.didNotFinish;
- return newSlice;
- },
-
- findTopmostSlicesInThisContainer: function*(eventPredicate, opt_this) {
- if (!this.haveTopLevelSlicesBeenBuilt)
- throw new Error('Nope');
-
- for (var s of this.topLevelSlices)
- yield * s.findTopmostSlicesRelativeToThisSlice(eventPredicate);
- },
-
- childEvents: function*() {
- yield * this.slices;
- },
-
- childEventContainers: function*() {
- },
-
- getSlicesOfName: function(title) {
- var slices = [];
- for (var i = 0; i < this.slices.length; i++) {
- if (this.slices[i].title === title) {
- slices.push(this.slices[i]);
- }
- }
- return slices;
- },
-
- iterSlicesInTimeRange: function(callback, start, end) {
- var ret = [];
- tr.b.iterateOverIntersectingIntervals(
- this.topLevelSlices,
- function(s) { return s.start; },
- function(s) { return s.duration; },
- start,
- end,
- function(topLevelSlice) {
- callback(topLevelSlice);
- for (var slice of topLevelSlice.enumerateAllDescendents())
- callback(slice);
- });
- return ret;
- },
-
- findFirstSlice: function() {
- if (!this.haveTopLevelSlicesBeenBuilt)
- throw new Error('Nope');
- if (0 === this.slices.length)
- return undefined;
- return this.slices[0];
- },
-
- findSliceAtTs: function(ts) {
- if (!this.haveTopLevelSlicesBeenBuilt)
- throw new Error('Nope');
- var i = tr.b.findIndexInSortedClosedIntervals(
- this.topLevelSlices,
- getSliceLo, getSliceHi,
- ts);
- if (i === -1 || i === this.topLevelSlices.length)
- return undefined;
-
- var curSlice = this.topLevelSlices[i];
-
- // Now recurse on slice looking for subSlice of given ts.
- while (true) {
- var i = tr.b.findIndexInSortedClosedIntervals(
- curSlice.subSlices,
- getSliceLo, getSliceHi,
- ts);
- if (i === -1 || i === curSlice.subSlices.length)
- return curSlice;
- curSlice = curSlice.subSlices[i];
- }
- },
-
- findNextSliceAfter: function(ts, refGuid) {
- var i = tr.b.findLowIndexInSortedArray(
- this.slices, getSliceLo, ts);
- if (i === this.slices.length)
- return undefined;
- for (; i < this.slices.length; i++) {
- var slice = this.slices[i];
- if (slice.start > ts)
- return slice;
- if (slice.guid <= refGuid)
- continue;
- return slice;
- }
- return undefined;
- },
-
- /**
- * Construct subSlices for this group.
- * Populate the group topLevelSlices, parent slices get a subSlices[],
- * a selfThreadTime and a selfTime, child slices get a parentSlice
- * reference.
- */
- createSubSlices: function() {
- this.haveTopLevelSlicesBeenBuilt = true;
- this.createSubSlicesImpl_();
- if (this.parentContainer.timeSlices)
- this.addCpuTimeToSubslices_(this.parentContainer.timeSlices);
- this.slices.forEach(function(slice) {
- var selfTime = slice.duration;
- for (var i = 0; i < slice.subSlices.length; i++)
- selfTime -= slice.subSlices[i].duration;
- slice.selfTime = selfTime;
-
- if (slice.cpuDuration === undefined)
- return;
-
- var cpuSelfTime = slice.cpuDuration;
- for (var i = 0; i < slice.subSlices.length; i++) {
- if (slice.subSlices[i].cpuDuration !== undefined)
- cpuSelfTime -= slice.subSlices[i].cpuDuration;
- }
- slice.cpuSelfTime = cpuSelfTime;
- });
- },
- createSubSlicesImpl_: function() {
- var precisionUnit = this.model.intrinsicTimeUnit;
-
-
- // Note that this doesn't check whether |child| should be added to
- // |parent|'s descendant slices instead of |parent| directly.
- function addSliceIfBounds(parent, child) {
- if (parent.bounds(child, precisionUnit)) {
- child.parentSlice = parent;
- if (parent.subSlices === undefined)
- parent.subSlices = [];
- parent.subSlices.push(child);
- return true;
- }
- return false;
- }
-
- if (!this.slices.length)
- return;
-
- var ops = [];
- for (var i = 0; i < this.slices.length; i++) {
- if (this.slices[i].subSlices)
- this.slices[i].subSlices.splice(0,
- this.slices[i].subSlices.length);
- ops.push(i);
- }
-
- var originalSlices = this.slices;
- ops.sort(function(ix, iy) {
- var x = originalSlices[ix];
- var y = originalSlices[iy];
- if (x.start !== y.start)
- return x.start - y.start;
-
- // Elements get inserted into the slices array in order of when the
- // slices start. Because slices must be properly nested, we break
- // start-time ties by assuming that the elements appearing earlier
- // in the slices array (and thus ending earlier) start earlier.
- return ix - iy;
- });
-
- var slices = new Array(this.slices.length);
- for (var i = 0; i < ops.length; i++) {
- slices[i] = originalSlices[ops[i]];
- }
-
- // Actually build the subrows.
- var rootSlice = slices[0];
- this.topLevelSlices = [];
- this.topLevelSlices.push(rootSlice);
- rootSlice.isTopLevel = true;
- for (var i = 1; i < slices.length; i++) {
- var slice = slices[i];
- while (rootSlice !== undefined &&
- (!addSliceIfBounds(rootSlice, slice))) {
- rootSlice = rootSlice.parentSlice;
- }
- if (rootSlice === undefined) {
- this.topLevelSlices.push(slice);
- slice.isTopLevel = true;
- }
- rootSlice = slice;
- }
-
- // Keep the slices in sorted form.
- this.slices = slices;
- },
- addCpuTimeToSubslices_: function(timeSlices) {
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var sliceIdx = 0;
- timeSlices.forEach(function(timeSlice) {
- if (timeSlice.schedulingState === SCHEDULING_STATE.RUNNING) {
- while (sliceIdx < this.topLevelSlices.length) {
- if (this.addCpuTimeToSubslice_(this.topLevelSlices[sliceIdx],
- timeSlice)) {
- // The current top-level slice and children are fully
- // accounted for, proceed to next top-level slice.
- sliceIdx++;
- } else {
- // The current top-level runs beyond the time slice, break out
- // so we can potentially add more time slices to it
- break;
- }
- }
- }
- }, this);
- },
- /* Add run-time of this timeSlice to the passed in slice
- * and all of it's children (recursively).
- * Returns whether the slice ends before or at the end of the
- * time slice, signaling we are done with this slice.
- */
- addCpuTimeToSubslice_: function(slice, timeSlice) {
- // Make sure they overlap
- if (slice.start > timeSlice.end || slice.end < timeSlice.start)
- return slice.end <= timeSlice.end;
-
- // Compute actual overlap
- var duration = timeSlice.duration;
- if (slice.start > timeSlice.start)
- duration -= slice.start - timeSlice.start;
- if (timeSlice.end > slice.end)
- duration -= timeSlice.end - slice.end;
-
- if (slice.cpuDuration) {
- slice.cpuDuration += duration;
- } else {
- slice.cpuDuration = duration;
- }
-
- for (var i = 0; i < slice.subSlices.length; i++) {
- this.addCpuTimeToSubslice_(slice.subSlices[i], timeSlice);
- }
-
- return slice.end <= timeSlice.end;
- }
- };
-
- /**
- * Merge two slice groups.
- *
- * If the two groups do not nest properly some of the slices of groupB will
- * be split to accomodate the improper nesting. This is done to accomodate
- * combined kernel and userland call stacks on Android. Because userland
- * tracing is done by writing to the trace_marker file, the kernel calls
- * that get invoked as part of that write may not be properly nested with
- * the userland call trace. For example the following sequence may occur:
- *
- * kernel enter sys_write (the write to trace_marker)
- * user enter some_function
- * kernel exit sys_write
- * ...
- * kernel enter sys_write (the write to trace_marker)
- * user exit some_function
- * kernel exit sys_write
- *
- * This is handled by splitting the sys_write call into two slices as
- * follows:
- *
- * | sys_write | some_function | sys_write (cont.) |
- * | sys_write (cont.) | | sys_write |
- *
- * The colorId of both parts of the split slices are kept the same, and the
- * " (cont.)" suffix is appended to the later parts of a split slice.
- *
- * The two input SliceGroups are not modified by this, and the merged
- * SliceGroup will contain a copy of each of the input groups' slices (those
- * copies may be split).
- */
- SliceGroup.merge = function(groupA, groupB) {
- // This is implemented by traversing the two slice groups in reverse
- // order. The slices in each group are sorted by ascending end-time, so
- // we must do the traversal from back to front in order to maintain the
- // sorting.
- //
- // We traverse the two groups simultaneously, merging as we go. At each
- // iteration we choose the group from which to take the next slice based
- // on which group's next slice has the greater end-time. During this
- // traversal we maintain a stack of currently "open" slices for each input
- // group. A slice is considered "open" from the time it gets reached in
- // our input group traversal to the time we reach an slice in this
- // traversal with an end-time before the start time of the "open" slice.
- //
- // Each time a slice from groupA is opened or closed (events corresponding
- // to the end-time and start-time of the input slice, respectively) we
- // split all of the currently open slices from groupB.
-
- if (groupA.openPartialSlices_.length > 0)
- throw new Error('groupA has open partial slices');
-
- if (groupB.openPartialSlices_.length > 0)
- throw new Error('groupB has open partial slices');
-
- if (groupA.parentContainer !== groupB.parentContainer)
- throw new Error('Different parent threads. Cannot merge');
-
- if (groupA.sliceConstructor !== groupB.sliceConstructor)
- throw new Error('Different slice constructors. Cannot merge');
-
- var result = new SliceGroup(groupA.parentContainer,
- groupA.sliceConstructor,
- groupA.name_);
-
- var slicesA = groupA.slices;
- var slicesB = groupB.slices;
- var idxA = 0;
- var idxB = 0;
- var openA = [];
- var openB = [];
-
- var splitOpenSlices = function(when) {
- for (var i = 0; i < openB.length; i++) {
- var oldSlice = openB[i];
- var oldEnd = oldSlice.end;
- if (when < oldSlice.start || oldEnd < when) {
- throw new Error('slice should not be split');
- }
-
- var newSlice = result.copySlice(oldSlice);
- newSlice.start = when;
- newSlice.duration = oldEnd - when;
- if (newSlice.title.indexOf(' (cont.)') === -1)
- newSlice.title += ' (cont.)';
- oldSlice.duration = when - oldSlice.start;
- openB[i] = newSlice;
- result.pushSlice(newSlice);
- }
- };
-
- var closeOpenSlices = function(upTo) {
- while (openA.length > 0 || openB.length > 0) {
- var nextA = openA[openA.length - 1];
- var nextB = openB[openB.length - 1];
- var endA = nextA && nextA.end;
- var endB = nextB && nextB.end;
-
- if ((endA === undefined || endA > upTo) &&
- (endB === undefined || endB > upTo)) {
- return;
- }
-
- if (endB === undefined || endA < endB) {
- splitOpenSlices(endA);
- openA.pop();
- } else {
- openB.pop();
- }
- }
- };
-
- while (idxA < slicesA.length || idxB < slicesB.length) {
- var sA = slicesA[idxA];
- var sB = slicesB[idxB];
- var nextSlice, isFromB;
-
- if (sA === undefined || (sB !== undefined && sA.start > sB.start)) {
- nextSlice = result.copySlice(sB);
- isFromB = true;
- idxB++;
- } else {
- nextSlice = result.copySlice(sA);
- isFromB = false;
- idxA++;
- }
-
- closeOpenSlices(nextSlice.start);
-
- result.pushSlice(nextSlice);
-
- if (isFromB) {
- openB.push(nextSlice);
- } else {
- splitOpenSlices(nextSlice.start);
- openA.push(nextSlice);
- }
- }
-
- closeOpenSlices();
-
- return result;
- };
-
- return {
- SliceGroup: SliceGroup
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/slice_group_test.html b/chromium/third_party/catapult/tracing/tracing/model/slice_group_test.html
deleted file mode 100644
index f6aaa7eb5dc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/slice_group_test.html
+++ /dev/null
@@ -1,888 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Slice = tr.model.Slice;
- var SliceGroup = tr.model.SliceGroup;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newThreadSlice = tr.c.TestUtils.newThreadSlice;
- var newModel = tr.c.TestUtils.newModel;
- var newFakeThread = tr.c.TestUtils.newFakeThread;
-
- test('basicBeginEnd', function() {
- var group = new SliceGroup(newFakeThread());
- assert.equal(group.openSliceCount, 0);
- var sliceA = group.beginSlice('', 'a', 1, {a: 1});
- assert.equal(group.openSliceCount, 1);
- assert.equal(sliceA.title, 'a');
- assert.equal(sliceA.start, 1);
- assert.equal(sliceA.args.a, 1);
-
- var sliceB = group.endSlice(3);
- assert.equal(sliceA, sliceB);
- assert.equal(sliceB.duration, 2);
- });
-
- test('subSlicesBuilderBasic', function() {
- var group = new SliceGroup(newFakeThread());
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 2}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 2);
- assert.deepEqual(group.topLevelSlices, [sA, sB]);
- assert.equal(group.findSliceAtTs(0), undefined);
- assert.equal(group.findSliceAtTs(1), sA);
- assert.equal(group.findSliceAtTs(3), sA);
- assert.equal(group.findSliceAtTs(3.1), sB);
- assert.equal(group.findSliceAtTs(4), sB);
- assert.equal(group.findSliceAtTs(5), undefined);
- });
-
- test('subSlicesBuilderBasic2', function() {
- var group = new SliceGroup(newFakeThread());
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 4}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 1);
- assert.deepEqual(group.topLevelSlices, [sA]);
-
- assert.equal(sA.subSlices.length, 1);
- assert.deepEqual(sA.subSlices, [sB]);
- assert.equal(sA.selfTime, 3);
-
- assert.equal(sA, sB.parentSlice);
- assert.isTrue(sA.isTopLevel);
- assert.isFalse(sB.isTopLevel);
- });
-
- test('subSlicesBuilderNestedExactly', function() {
- var group = new SliceGroup(newFakeThread());
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1, duration: 4}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 4}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 1);
- assert.deepEqual(group.topLevelSlices, [sB]);
-
- assert.equal(sB.subSlices.length, 1);
- assert.deepEqual(sB.subSlices, [sA]);
- assert.equal(sB.selfTime, 0);
-
- assert.equal(sB, sA.parentSlice);
- assert.isTrue(sB.isTopLevel);
- assert.isFalse(sA.isTopLevel);
-
- assert.equal(group.findSliceAtTs(0), undefined);
- assert.equal(group.findSliceAtTs(1), sA);
- assert.equal(group.findSliceAtTs(2), sA);
- assert.equal(group.findSliceAtTs(5), sA);
- assert.equal(group.findSliceAtTs(6), undefined);
- });
-
- test('subSlicesBuilderInstantEvents', function() {
- var group = new SliceGroup(newFakeThread());
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 0}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 2, duration: 0}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 2);
- assert.deepEqual(group.topLevelSlices, [sA, sB]);
- assert.equal(group.findSliceAtTs(1), sA);
- assert.equal(group.findSliceAtTs(1.5), undefined);
- assert.equal(group.findSliceAtTs(2), sB);
- });
-
- test('subSlicesBuilderTwoInstantEvents', function() {
- var group = new SliceGroup(newFakeThread());
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 0}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1, duration: 0}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 1);
- assert.deepEqual(group.topLevelSlices, [sA]);
-
- assert.equal(sA.subSlices.length, 1);
- assert.deepEqual(sA.subSlices, [sB]);
- assert.equal(sA.selfTime, 0);
-
- assert.equal(sA, sB.parentSlice);
- assert.isTrue(sA.isTopLevel);
- assert.isFalse(sB.isTopLevel);
- assert.equal(group.findSliceAtTs(1), sB);
- assert.equal(group.findSliceAtTs(1.0001), undefined);
- });
-
- test('subSlicesBuilderOutOfOrderAddition', function() {
- var group = new SliceGroup(newFakeThread());
-
- // Pattern being tested:
- // [ a ][ b ]
- // Where insertion is done backward.
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 2}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 2);
- assert.deepEqual(group.topLevelSlices, [sA, sB]);
- assert.isTrue(sA.isTopLevel);
- assert.isTrue(sB.isTopLevel);
- assert.equal(group.findSliceAtTs(3), sA);
- });
-
- test('subRowBuilderOutOfOrderAddition2', function() {
- var group = new SliceGroup(newFakeThread());
-
- // Pattern being tested:
- // [ a ]
- // [ b ]
- // Where insertion is done backward.
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 5}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 1);
- assert.deepEqual(group.topLevelSlices, [sA]);
-
- assert.equal(sA.subSlices.length, 1);
- assert.deepEqual(sA.subSlices, [sB]);
- assert.equal(sA.selfTime, 4);
-
- assert.equal(sA, sB.parentSlice);
- assert.isTrue(sA.isTopLevel);
- assert.isFalse(sB.isTopLevel);
- assert.equal(group.findSliceAtTs(1.5), sA);
- assert.equal(group.findSliceAtTs(3), sB);
- assert.equal(group.findSliceAtTs(3.5), sB);
- assert.equal(group.findSliceAtTs(4), sB);
- assert.equal(group.findSliceAtTs(4.5), sA);
- });
-
- test('subSlicesBuilderOnNestedZeroLength', function() {
- var group = new SliceGroup(newFakeThread());
-
- // Pattern being tested:
- // [ a ]
- // [ b1 ] []<- b2 where b2.duration = 0 and b2.end === a.end.
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB1 = group.pushSlice(newSliceEx({title: 'b1', start: 1, duration: 2}));
- var sB2 = group.pushSlice(newSliceEx({title: 'b2', start: 4, duration: 0}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 1);
- assert.deepEqual(group.topLevelSlices, [sA]);
-
- assert.equal(sA.subSlices.length, 2);
- assert.deepEqual(sA.subSlices, [sB1, sB2]);
- assert.equal(sA.selfTime, 1);
-
- assert.equal(sA, sB1.parentSlice);
- assert.equal(sA, sB2.parentSlice);
- assert.equal(group.findSliceAtTs(1), sB1);
- assert.equal(group.findSliceAtTs(4), sB2);
- });
-
- test('subSlicesBuilderOnGroup1', function() {
- var group = new SliceGroup(newFakeThread());
-
- // Pattern being tested:
- // [ a ] [ c ]
- // [ b ]
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1.5, duration: 1}));
- var sC = group.pushSlice(newSliceEx({title: 'c', start: 5, duration: 0}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 2);
- assert.deepEqual(group.topLevelSlices, [sA, sC]);
-
- assert.equal(sA.subSlices.length, 1);
- assert.deepEqual(sA.subSlices, [sB]);
- assert.equal(sA.selfTime, 2);
-
- assert.equal(sA, sB.parentSlice);
- assert.equal(group.findSliceAtTs(1), sA);
- assert.equal(group.findSliceAtTs(2), sB);
- assert.equal(group.findSliceAtTs(3), sA);
- assert.equal(group.findSliceAtTs(4.5), undefined);
- assert.equal(group.findSliceAtTs(5), sC);
- });
-
- test('subSlicesBuilderOnGroup2', function() {
- var group = new SliceGroup(newFakeThread());
-
- // Pattern being tested:
- // [ a ] [ d ]
- // [ b ]
- // [ c ]
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1.5, duration: 1}));
- var sC = group.pushSlice(newSliceEx(
- {title: 'c', start: 1.75, duration: 0.5}));
- var sD = group.pushSlice(newSliceEx(
- {title: 'd', start: 5, duration: 0.25}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 2);
- assert.deepEqual(group.topLevelSlices, [sA, sD]);
-
- assert.equal(sA.subSlices.length, 1);
- assert.deepEqual(sA.subSlices, [sB]);
- assert.equal(sA.selfTime, 2);
-
- assert.equal(sA, sB.parentSlice);
- assert.equal(sB.subSlices.length, 1);
- assert.deepEqual(sB.subSlices, [sC]);
- assert.equal(sB.selfTime, 0.5);
-
- assert.equal(sB, sC.parentSlice);
- assert.equal(group.findSliceAtTs(2), sC);
- });
-
- test('findFirstSlice', function() {
- var group = new SliceGroup(newFakeThread());
- // Pattern being tested:
- // [ a ] [ d ]
- // [b] [ c ] where b is dur=0
- var sC = group.pushSlice(newSliceEx({title: 'c', start: 2, end: 3}));
- var sD = group.pushSlice(newSliceEx({title: 'd', start: 5, end: 6}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, end: 4}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1, end: 1}));
-
- assert.throws(group.findFirstSlice);
-
- group.createSubSlices();
-
- assert.equal(group.findFirstSlice(), sA);
- });
-
- test('findNextSliceAfterBasic', function() {
- var group = new SliceGroup(newFakeThread());
- // Pattern being tested:
- // [ a ] [ d ]
- // [b] [ c ] where b is dur=0
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, end: 4}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1, end: 1}));
- var sC = group.pushSlice(newSliceEx({title: 'c', start: 2, end: 3}));
- var sD = group.pushSlice(newSliceEx({title: 'd', start: 5, end: 6}));
-
- group.createSubSlices();
-
- assert.equal(group.findNextSliceAfter(0, 0), sA);
- assert.equal(group.findNextSliceAfter(1, sA.guid), sB);
- assert.equal(group.findNextSliceAfter(1, sB.guid), sC);
- assert.equal(group.findNextSliceAfter(2, sC.guid), sD);
- assert.equal(group.findNextSliceAfter(6, 0), undefined);
- });
-
- test('subSlicesBuilderTolerateFPInaccuracy', function() {
- var group = new SliceGroup(newFakeThread());
-
- // Pattern being tested:
- // [ a ]
- // [ b ] where b.end contains a tiny FP calculation error.
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB = group.pushSlice(newSliceEx(
- {title: 'b', start: 1, duration: 3.0000000001}));
-
- group.createSubSlices();
-
- assert.equal(group.topLevelSlices.length, 1);
- assert.deepEqual(group.topLevelSlices, [sA]);
-
- assert.equal(sA.subSlices.length, 1);
- assert.deepEqual(sA.subSlices, [sB]);
- assert.equal(sA, sB.parentSlice);
- assert.equal(group.findSliceAtTs(1), sB);
- assert.equal(group.findSliceAtTs(3), sB);
- });
-
- test('basicMerge', function() {
- function TestSlice(
- cat, title, colorId, start, args, opt_duration,
- opt_cpuStart, opt_cpuDuration) {
- Slice.call(this, cat, title, colorId, start, args, opt_duration,
- opt_cpuStart, opt_cpuDuration);
- }
- TestSlice.prototype = {
- __proto__: Slice.prototype
- };
- TestSlice.subTypes = {
- getConstructor: function(category, title) {
- return TestSlice;
- }
- };
-
- var thread = newFakeThread();
- var a = new SliceGroup(thread, TestSlice);
- var b = new SliceGroup(thread, TestSlice);
- a.beginSlice('', 'one', 1);
- a.endSlice(2);
- b.beginSlice('', 'two', 3);
- b.endSlice(5);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 2);
-
- assert.equal(m.slices[0].title, 'one');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 1);
-
- assert.equal(m.slices[1].title, 'two');
- assert.equal(m.slices[1].start, 3);
- assert.equal(m.slices[1].duration, 2);
-
- // ensure constructor merged correctly
- assert.equal(m.sliceConstructor, TestSlice);
- });
-
- test('nestedMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 1);
- a.endSlice(4);
- b.beginSlice('', 'two', 2);
- b.endSlice(3);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 2);
-
- assert.equal(m.slices[0].title, 'one');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 3);
-
- assert.equal(m.slices[1].title, 'two');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 1);
- });
-
- test('startSplitMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 2);
- a.endSlice(4);
- b.beginSlice('', 'two', 1);
- b.endSlice(3);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 3);
-
- assert.equal(m.slices[0].title, 'two');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 1);
-
- assert.equal(m.slices[1].title, 'one');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 2);
-
- assert.equal(m.slices[2].title, 'two (cont.)');
- assert.equal(m.slices[2].start, 2);
- assert.equal(m.slices[2].duration, 1);
- });
-
- test('startSplitTwoMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 3);
- a.endSlice(6);
- b.beginSlice('', 'two', 1);
- b.beginSlice('', 'three', 2);
- b.endSlice(4);
- b.endSlice(5);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 5);
-
- assert.equal(m.slices[0].title, 'two');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 2);
-
- assert.equal(m.slices[1].title, 'three');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 1);
-
- assert.equal(m.slices[2].title, 'one');
- assert.equal(m.slices[2].start, 3);
- assert.equal(m.slices[2].duration, 3);
-
- assert.equal(m.slices[3].title, 'two (cont.)');
- assert.equal(m.slices[3].start, 3);
- assert.equal(m.slices[3].duration, 2);
-
- assert.equal(m.slices[4].title, 'three (cont.)');
- assert.equal(m.slices[4].start, 3);
- assert.equal(m.slices[4].duration, 1);
- });
-
- test('startSplitTwiceMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 2);
- a.beginSlice('', 'two', 3);
- a.endSlice(5);
- a.endSlice(6);
- b.beginSlice('', 'three', 1);
- b.endSlice(4);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 5);
-
- assert.equal(m.slices[0].title, 'three');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 1);
-
- assert.equal(m.slices[1].title, 'one');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 4);
-
- assert.equal(m.slices[2].title, 'three (cont.)');
- assert.equal(m.slices[2].start, 2);
- assert.equal(m.slices[2].duration, 1);
-
- assert.equal(m.slices[3].title, 'two');
- assert.equal(m.slices[3].start, 3);
- assert.equal(m.slices[3].duration, 2);
-
- assert.equal(m.slices[4].title, 'three (cont.)');
- assert.equal(m.slices[4].start, 3);
- assert.equal(m.slices[4].duration, 1);
- });
-
- test('endSplitMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 1);
- a.endSlice(3);
- b.beginSlice('', 'two', 2);
- b.endSlice(4);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 3);
-
- assert.equal(m.slices[0].title, 'one');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 2);
-
- assert.equal(m.slices[1].title, 'two');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 1);
-
- assert.equal(m.slices[2].title, 'two (cont.)');
- assert.equal(m.slices[2].start, 3);
- assert.equal(m.slices[2].duration, 1);
- });
-
- test('endSplitTwoMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 1);
- a.endSlice(4);
- b.beginSlice('', 'two', 2);
- b.beginSlice('', 'three', 3);
- b.endSlice(5);
- b.endSlice(6);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 5);
-
- assert.equal(m.slices[0].title, 'one');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 3);
-
- assert.equal(m.slices[1].title, 'two');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 2);
-
- assert.equal(m.slices[2].title, 'three');
- assert.equal(m.slices[2].start, 3);
- assert.equal(m.slices[2].duration, 1);
-
- assert.equal(m.slices[3].title, 'two (cont.)');
- assert.equal(m.slices[3].start, 4);
- assert.equal(m.slices[3].duration, 2);
-
- assert.equal(m.slices[4].title, 'three (cont.)');
- assert.equal(m.slices[4].start, 4);
- assert.equal(m.slices[4].duration, 1);
- });
-
- test('endSplitTwiceMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 1);
- a.beginSlice('', 'two', 2);
- a.endSlice(4);
- a.endSlice(5);
- b.beginSlice('', 'three', 3);
- b.endSlice(6);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 5);
-
- assert.equal(m.slices[0].title, 'one');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 4);
-
- assert.equal(m.slices[1].title, 'two');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 2);
-
- assert.equal(m.slices[2].title, 'three');
- assert.equal(m.slices[2].start, 3);
- assert.equal(m.slices[2].duration, 1);
-
- assert.equal(m.slices[3].title, 'three (cont.)');
- assert.equal(m.slices[3].start, 4);
- assert.equal(m.slices[3].duration, 1);
-
- assert.equal(m.slices[4].title, 'three (cont.)');
- assert.equal(m.slices[4].start, 5);
- assert.equal(m.slices[4].duration, 1);
- });
-
- // Input:
- // A: | one | | two |
- //
- // B: | three |
- //
- // Output:
- // | one | three | two |
- // | three | | three |
- test('splitTwiceMerge', function() {
- var thread = newFakeThread();
- var a = new SliceGroup(thread);
- var b = new SliceGroup(thread);
- a.beginSlice('', 'one', 1);
- a.endSlice(3);
- a.beginSlice('', 'two', 4);
- a.endSlice(6);
- b.beginSlice('', 'three', 2);
- b.endSlice(5);
-
- var m = SliceGroup.merge(a, b);
- assert.equal(m.slices.length, 5);
-
- assert.equal(m.slices[0].title, 'one');
- assert.equal(m.slices[0].start, 1);
- assert.equal(m.slices[0].duration, 2);
-
- assert.equal(m.slices[1].title, 'three');
- assert.equal(m.slices[1].start, 2);
- assert.equal(m.slices[1].duration, 1);
-
- assert.equal(m.slices[2].title, 'three (cont.)');
- assert.equal(m.slices[2].start, 3);
- assert.equal(m.slices[2].duration, 1);
-
- assert.equal(m.slices[3].title, 'two');
- assert.equal(m.slices[3].start, 4);
- assert.equal(m.slices[3].duration, 2);
-
- assert.equal(m.slices[4].title, 'three (cont.)');
- assert.equal(m.slices[4].start, 4);
- assert.equal(m.slices[4].duration, 1);
- });
-
- test('bounds', function() {
- var group = new SliceGroup(newFakeThread());
- group.updateBounds();
- assert.isUndefined(group.bounds.min);
- assert.isUndefined(group.bounds.max);
-
- group.pushSlice(newSliceEx({start: 1, duration: 3}));
- group.pushSlice(newSliceEx({start: 7, duration: 2}));
- group.updateBounds();
- assert.equal(group.bounds.min, 1);
- assert.equal(group.bounds.max, 9);
- });
-
- test('boundsWithPartial', function() {
- var group = new SliceGroup(newFakeThread());
- group.beginSlice('', 'a', 7);
- group.updateBounds();
- assert.equal(group.bounds.min, 7);
- assert.equal(group.bounds.max, 7);
- });
-
- test('boundsWithTwoPartials', function() {
- var group = new SliceGroup(newFakeThread());
- group.beginSlice('', 'a', 0);
- group.beginSlice('', 'a', 1);
- group.updateBounds();
- assert.equal(group.bounds.min, 0);
- assert.equal(group.bounds.max, 1);
- });
-
- test('boundsWithBothPartialAndRegular', function() {
- var group = new SliceGroup(newFakeThread());
- group.updateBounds();
- assert.isUndefined(group.bounds.min);
- assert.isUndefined(group.bounds.max);
-
- group.pushSlice(newSliceEx({start: 1, duration: 3}));
- group.beginSlice('', 'a', 7);
- group.updateBounds();
- assert.equal(group.bounds.min, 1);
- assert.equal(group.bounds.max, 7);
- });
-
- test('autocloserBasic', function() {
- var group = new SliceGroup(newFakeThread());
- assert.equal(0, group.openSliceCount);
-
- group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 0.5}));
-
- group.beginSlice('', 'b', 2);
- group.beginSlice('', 'c', 2.5);
- group.endSlice(3);
-
- group.autoCloseOpenSlices();
- group.updateBounds();
-
- assert.equal(group.bounds.min, 1);
- assert.equal(group.bounds.max, 3);
- assert.equal(group.slices.length, 3);
-
- assert.equal(group.slices[0].title, 'a');
- assert.isFalse(group.slices[0].didNotFinish);
-
- assert.equal(group.slices[1].title, 'b');
- assert.isTrue(group.slices[1].didNotFinish);
- assert.equal(group.slices[1].duration, 1);
-
- assert.equal(group.slices[2].title, 'c');
- assert.isFalse(group.slices[2].didNotFinish);
- });
-
- test('autocloserWithSubTasks', function() {
- var group = new SliceGroup(newFakeThread());
- assert.equal(0, group.openSliceCount);
-
- group.beginSlice('', 'a', 1);
- group.beginSlice('', 'b1', 2);
- group.endSlice(3);
- group.beginSlice('', 'b2', 3);
-
- group.autoCloseOpenSlices();
- assert.equal(group.slices.length, 3);
-
- assert.equal(group.slices[0].title, 'a');
- assert.isTrue(group.slices[0].didNotFinish);
- assert.equal(group.slices[0].duration, 2);
-
- assert.equal(group.slices[1].title, 'b1');
- assert.isFalse(group.slices[1].didNotFinish);
- assert.equal(group.slices[1].duration, 1);
-
- assert.equal(group.slices[2].title, 'b2');
- assert.isTrue(group.slices[2].didNotFinish);
- assert.equal(group.slices[2].duration, 0);
- });
-
- test('autocloseCompleteSlice', function() {
- var group = new SliceGroup(newFakeThread());
-
- group.pushCompleteSlice('', 'a', 1, undefined);
- group.pushCompleteSlice('', 'b', 2, 3);
-
- group.autoCloseOpenSlices();
- assert.equal(group.slices.length, 2);
-
- assert.equal(group.slices[0].title, 'a');
- assert.isTrue(group.slices[0].didNotFinish);
- assert.equal(group.slices[0].duration, 4);
-
- assert.equal(group.slices[1].title, 'b');
- assert.isFalse(group.slices[1].didNotFinish);
- assert.equal(group.slices[1].duration, 3);
- });
-
- test('sliceGroupStableId', function() {
- var model = new tr.Model();
- var process = model.getOrCreateProcess(123);
- var thread = process.getOrCreateThread(456);
- var group = new SliceGroup(thread);
-
- assert.equal(process.stableId, 123);
- assert.equal(thread.stableId, '123.456');
- assert.equal(group.stableId, '123.456.SliceGroup');
- });
-
- test('getSlicesOfName', function() {
- var group = new SliceGroup(newFakeThread());
- var expected = [];
-
- for (var i = 0; i < 10; i++) {
- var aSlice = newSliceEx({title: 'a', start: i, duration: i + 1});
- group.pushSlice(aSlice);
- group.pushSlice(newSliceEx({title: 'b', start: i + 1, duration: i + 2}));
- expected.push(aSlice);
- }
-
- assert.deepEqual(group.getSlicesOfName('a'), expected);
- });
-
- test('iterSlicesInTimeRange', function() {
- var group = new SliceGroup(newFakeThread());
- var expected = [];
-
- for (var i = 0; i < 10; i++) {
- var slice = newSliceEx({title: 'a', start: i, duration: 1});
- group.pushSlice(slice);
- if (4 <= i && i <= 7)
- expected.push(slice);
- }
- group.createSubSlices();
-
- var observed = [];
- group.iterSlicesInTimeRange(function(slice) { observed.push(slice); },
- 4.5, 7.5);
- assert.deepEqual(observed, expected);
- });
-
- test('computeCpuDurationNoOverlap', function() {
- var model = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var process = model.getOrCreateProcess(123);
- var t = process.getOrCreateThread(456);
- t.timeSlices = [newThreadSlice(t, SCHEDULING_STATE.RUNNING, 20, 20),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 40, 10),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 50, 10)];
- var group = new SliceGroup(t);
- group.pushSlice(newSliceEx({title: 'draw', start: 0, duration: 20}));
- group.pushSlice(newSliceEx({title: 'render', start: 60, duration: 20}));
- group.createSubSlices();
- assert.equal(group.slices[0].cpuDuration, 0);
- assert.equal(group.slices[1].cpuDuration, 0);
- });
-
- test('computeCpuDurationPartialOverlap', function() {
- var model = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var process = model.getOrCreateProcess(123);
- var t = process.getOrCreateThread(456);
- t.timeSlices = [newThreadSlice(t, SCHEDULING_STATE.RUNNING, 20, 20),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 40, 10),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 50, 10)];
- var group = new SliceGroup(t);
- group.pushSlice(newSliceEx({title: 'draw', start: 10, duration: 30}));
- group.pushSlice(newSliceEx({title: 'render', start: 50, duration: 20}));
- group.createSubSlices();
- assert.equal(group.slices[0].cpuDuration, 20);
- assert.equal(group.slices[1].cpuDuration, 10);
- });
-
- test('computeCpuDurationFullOverlap', function() {
- var model = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var process = model.getOrCreateProcess(123);
- var t = process.getOrCreateThread(456);
- t.timeSlices = [newThreadSlice(t, SCHEDULING_STATE.RUNNING, 20, 20),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 40, 10),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 50, 20)];
- var group = new SliceGroup(t);
- group.pushSlice(newSliceEx({title: 'draw', start: 20, duration: 30}));
- group.pushSlice(newSliceEx({title: 'render', start: 50, duration: 20}));
- group.createSubSlices();
- assert.equal(group.slices[0].cpuDuration, 20);
- assert.equal(group.slices[1].cpuDuration, 20);
- });
-
- test('computeCpuSelfDurationWithSubslices', function() {
- var model = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var process = model.getOrCreateProcess(123);
- var t = process.getOrCreateThread(456);
- t.timeSlices = [newThreadSlice(t, SCHEDULING_STATE.RUNNING, 20, 20),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 40, 10),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 50, 20)];
- var group = new SliceGroup(t);
- group.pushSlice(newSliceEx({title: 'draw', start: 20, duration: 30}));
- group.pushSlice(newSliceEx({title: 'render', start: 21, duration: 8}));
- group.pushSlice(newSliceEx({title: 'flush', start: 29, duration: 11}));
- group.createSubSlices();
- assert.equal(group.slices[0].cpuDuration, 20);
- assert.equal(group.slices[0].cpuSelfTime, 1);
- assert.equal(group.slices[1].cpuDuration, 8);
- assert.equal(group.slices[1].cpuSelfTime, 8);
- assert.equal(group.slices[2].cpuDuration, 11);
- assert.equal(group.slices[2].cpuSelfTime, 11);
- });
-
- test('computeCpuDurationSmallTimeslices', function() {
- var model = new tr.Model();
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var process = model.getOrCreateProcess(123);
- var t = process.getOrCreateThread(456);
- t.timeSlices = [newThreadSlice(t, SCHEDULING_STATE.RUNNING, 20, 1),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 21, 1),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 22, 1),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 23, 1),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 24, 1),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 25, 1),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 26, 1),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 27, 1),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 28, 1),
- newThreadSlice(t, SCHEDULING_STATE.SLEEPING, 29, 1),
- newThreadSlice(t, SCHEDULING_STATE.RUNNING, 30, 1)];
- var group = new SliceGroup(t);
- group.pushSlice(newSliceEx(
- {title: 'draw', start: 20, duration: 11})); // 20,[22,24,26,28],30
- group.pushSlice(newSliceEx(
- {title: 'render', start: 22, duration: 8})); // 22,[24, 26, 28]
- group.pushSlice(newSliceEx(
- {title: 'flush', start: 24, duration: 6})); // 24, 26, 28
- group.createSubSlices();
- assert.equal(group.slices[0].cpuDuration, 6);
- assert.equal(group.slices[0].cpuSelfTime, 2);
- assert.equal(group.slices[1].cpuDuration, 4);
- assert.equal(group.slices[1].cpuSelfTime, 1);
- assert.equal(group.slices[2].cpuDuration, 3);
- assert.equal(group.slices[2].cpuSelfTime, 3);
- });
-
- test('sliceParentContainerSetAtPush', function() {
- var m = newModel(function(m) {
- m.process = m.getOrCreateProcess(123);
- m.thread = m.process.getOrCreateThread(456);
- m.group = new SliceGroup(m.thread);
-
- m.sA = m.group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
-
- m.group.createSubSlices();
- });
-
- assert.deepEqual(m.sA.parentContainer, m.thread);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/slice_test.html b/chromium/third_party/catapult/tracing/tracing/model/slice_test.html
deleted file mode 100644
index 64cfba6e4c2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/slice_test.html
+++ /dev/null
@@ -1,237 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Slice = tr.model.Slice;
- var SliceGroup = tr.model.SliceGroup;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newFakeThread = tr.c.TestUtils.newFakeThread;
-
- test('findDescendentSlice', function() {
- var group = new SliceGroup(newFakeThread());
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- assert.deepEqual(sB, sA.findDescendentSlice('sB'));
- assert.deepEqual(sC, sA.findDescendentSlice('sC'));
- assert.isUndefined(sA.findDescendentSlice('sD'));
- });
-
- test('findTopmostSlicesRelativeToThisSliceBaseCase', function() {
- var PREDICATE = slice => slice.title.startsWith('sC');
-
- var group = new SliceGroup(newFakeThread());
-
- var sC1 = group.pushSlice(newSliceEx(
- { title: 'sC1', start: 0.0, duration: 10.0 }));
- var sC2 = group.pushSlice(newSliceEx(
- { title: 'sC2', start: 0.0, duration: 4.0 }));
-
- group.createSubSlices();
-
- var foundSlices = [];
- for (var slice of sC1.findTopmostSlicesRelativeToThisSlice(PREDICATE))
- foundSlices.push(slice);
-
- assert.deepEqual([sC1], foundSlices);
- });
-
- test('findTopmostSlicesRelativeToThisSliceRecursive', function() {
- var PREDICATE = slice => slice.title.startsWith('sC');
-
- var group = new SliceGroup(newFakeThread());
-
- var sD = group.pushSlice(newSliceEx(
- { title: 'sD', start: 0.0, duration: 10.0 }));
- var sC1 = group.pushSlice(newSliceEx(
- { title: 'sC1', start: 0.0, duration: 4.0 }));
- var sC2 = group.pushSlice(newSliceEx(
- { title: 'sC2', start: 6.0, duration: 3.0 }));
-
- group.createSubSlices();
-
- var foundSlices = [];
- for (var slice of sD.findTopmostSlicesRelativeToThisSlice(PREDICATE))
- foundSlices.push(slice);
- assert.deepEqual([sC1, sC2], foundSlices);
- });
-
- test('enumerateAllDescendents', function() {
- var group = new SliceGroup(newFakeThread());
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- assert.deepEqual(sA.descendentSlices, [sB, sC]);
- assert.deepEqual(sC.descendentSlices, []);
- });
-
- test('mostTopLevelSlice', function() {
- var group = new SliceGroup(newFakeThread());
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- assert.equal(sA.mostTopLevelSlice, sA);
- assert.equal(sB.mostTopLevelSlice, sA);
- assert.equal(sC.mostTopLevelSlice, sA);
- });
-
- test('enumerateAllAncestors', function() {
- var group = new SliceGroup(newFakeThread());
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- // Note that we iterate ancestors from the leaves to the root
- assert.deepEqual(sC.ancestorSlices, [sB, sA]);
- assert.deepEqual(sA.ancestorSlices, []);
- });
-
- test('iterateAllSubsequentSlices', function() {
- var group = new SliceGroup(newFakeThread());
-
- // [ A ]
- // [ B ][ D ][F]
- // [C] [E]
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
- var sD = group.pushSlice(newSliceEx(
- { title: 'sD', start: 5.0, duration: 2.0 }));
- var sE = group.pushSlice(newSliceEx(
- { title: 'sE', start: 5.0, duration: 1.0 }));
- var sF = group.pushSlice(newSliceEx(
- { title: 'sF', start: 8.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- assert.deepEqual(sA.subsequentSlices, [sB, sC, sD, sE, sF]);
- assert.deepEqual(sD.subsequentSlices, [sE, sF]);
- assert.deepEqual(sF.subsequentSlices, []);
- });
-
- test('ancestorAndSubsequentSlices', function() {
- var group = new SliceGroup(newFakeThread());
-
- // [ A ]
- // [ B ][ D ][F]
- // [C] [E]
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
- var sD = group.pushSlice(newSliceEx(
- { title: 'sD', start: 5.0, duration: 2.0 }));
- var sE = group.pushSlice(newSliceEx(
- { title: 'sE', start: 5.0, duration: 1.0 }));
- var sF = group.pushSlice(newSliceEx(
- { title: 'sF', start: 8.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- assert.deepEqual(sD.ancestorAndSubsequentSlices, [sD, sA, sE, sF]);
- });
-
- test('entireHierarchy', function() {
- var group = new SliceGroup(newFakeThread());
-
- // [ A ]
- // [ B ][ D ][F]
- // [C] [E]
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 0.0, duration: 4.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 0.0, duration: 2.0 }));
- var sD = group.pushSlice(newSliceEx(
- { title: 'sD', start: 5.0, duration: 2.0 }));
- var sE = group.pushSlice(newSliceEx(
- { title: 'sE', start: 5.0, duration: 1.0 }));
- var sF = group.pushSlice(newSliceEx(
- { title: 'sF', start: 8.0, duration: 2.0 }));
-
- group.createSubSlices();
-
- assert.deepEqual(sD.entireHierarchy, [sA, sB, sC, sD, sE, sF]);
- });
-
- test('stableId', function() {
- var thread = newFakeThread();
- var group = thread.sliceGroup;
-
- var sA = group.pushSlice(newSliceEx(
- { title: 'sA', start: 0.0, duration: 10.0 }));
- var sB = group.pushSlice(newSliceEx(
- { title: 'sB', start: 10.0, duration: 20.0 }));
- var sC = group.pushSlice(newSliceEx(
- { title: 'sC', start: 20.0, duration: 30.0 }));
-
- assert.equal(group.stableId + '.0', sA.stableId);
- assert.equal(group.stableId + '.1', sB.stableId);
- assert.equal(group.stableId + '.2', sC.stableId);
- });
-
- test('cantInstantiateDirectly', function() {
- assert.throws(function() {
- new Slice('', 'Test', 0, 0, { });
- });
- });
-
- test('canInstantiateSubclasses', function() {
- function TestSlice() {
- Slice.call(this, '', 'Test', 0, 0, { });
- }
- TestSlice.prototype = {
- __proto__: Slice.prototype
- };
- assert.doesNotThrow(function() {
- new TestSlice();
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/source_info/js_source_info.html b/chromium/third_party/catapult/tracing/tracing/model/source_info/js_source_info.html
deleted file mode 100644
index bb4370e2c63..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/source_info/js_source_info.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/source_info/source_info.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.source_info', function() {
- function JSSourceInfo(file, line, column, isNative, scriptId, state) {
- tr.model.source_info.SourceInfo.call(this, file, line, column);
-
- this.isNative_ = isNative;
- this.scriptId_ = scriptId;
- this.state_ = state;
- }
-
- JSSourceInfo.prototype = {
- __proto__: tr.model.source_info.SourceInfo.prototype,
-
- get state() {
- return this.state_;
- },
-
- get isNative() {
- return this.isNative_;
- },
-
- get scriptId() {
- return this.scriptId_;
- },
-
- toString: function() {
- var str = this.isNative_ ? '[native v8] ' : '';
- return str +
- tr.model.source_info.SourceInfo.prototype.toString.call(this);
- }
- };
-
- return {
- JSSourceInfo: JSSourceInfo,
- JSSourceState: {
- COMPILED: 'compiled',
- OPTIMIZABLE: 'optimizable',
- OPTIMIZED: 'optimized',
- UNKNOWN: 'unknown'
- }
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/source_info/source_info.html b/chromium/third_party/catapult/tracing/tracing/model/source_info/source_info.html
deleted file mode 100644
index 19e36dfc1d8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/source_info/source_info.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.source_info', function() {
- function SourceInfo(file, opt_line, opt_column) {
- this.file_ = file;
- this.line_ = opt_line || -1;
- this.column_ = opt_column || -1;
- }
-
- SourceInfo.prototype = {
- get file() {
- return this.file_;
- },
-
- get line() {
- return this.line_;
- },
-
- get column() {
- return this.column_;
- },
-
- get domain() {
- if (!this.file_)
- return undefined;
- var domain = this.file_.match(/(.*:\/\/[^:\/]*)/i);
- return domain ? domain[1] : undefined;
- },
-
- toString: function() {
- var str = '';
-
- if (this.file_)
- str += this.file_;
- if (this.line_ > 0)
- str += ':' + this.line_;
- if (this.column_ > 0)
- str += ':' + this.column_;
- return str;
- }
- };
-
- return {
- SourceInfo: SourceInfo
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/source_info/source_info_test.html b/chromium/third_party/catapult/tracing/tracing/model/source_info/source_info_test.html
deleted file mode 100644
index 344dba0fb54..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/source_info/source_info_test.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/source_info/source_info.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('domain', function() {
- var urlDomains = {
- 'http://www.google.com': 'http://www.google.com',
- 'http://www.google.com/bla': 'http://www.google.com',
- 'http://www.google.com:1234': 'http://www.google.com',
- 'bad url': undefined
- };
- for (var url in urlDomains) {
- var sourceInfo = new tr.model.source_info.SourceInfo(url);
- assert.equal(urlDomains[url], sourceInfo.domain);
- }
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/stack_frame.html b/chromium/third_party/catapult/tracing/tracing/model/stack_frame.html
deleted file mode 100644
index 1bc48c95070..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/stack_frame.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- function StackFrame(parentFrame, id, title, colorId, opt_sourceInfo) {
- if (id === undefined)
- throw new Error('id must be given');
- this.parentFrame_ = parentFrame;
- this.id = id;
- this.title_ = title;
- this.colorId = colorId;
- this.children = [];
- this.sourceInfo_ = opt_sourceInfo;
-
- if (this.parentFrame_)
- this.parentFrame_.addChild(this);
- }
-
- StackFrame.prototype = {
- get parentFrame() {
- return this.parentFrame_;
- },
-
- get title() {
- if (this.sourceInfo_) {
- var src = this.sourceInfo_.toString();
- return this.title_ + (src === '' ? '' : ' ' + src);
- }
- return this.title_;
- },
-
- /**
- * Attempts to find the domain of the origin of the script either from this
- * stack trace or from its ancestors.
- */
- get domain() {
- var result = 'unknown';
- if (this.sourceInfo_ && this.sourceInfo_.domain)
- result = this.sourceInfo_.domain;
- if (result === 'unknown' && this.parentFrame)
- result = this.parentFrame.domain;
- return result;
- },
-
- get sourceInfo() {
- return this.sourceInfo_;
- },
-
- set parentFrame(parentFrame) {
- if (this.parentFrame_)
- Polymer.dom(this.parentFrame_).removeChild(this);
- this.parentFrame_ = parentFrame;
- if (this.parentFrame_)
- this.parentFrame_.addChild(this);
- },
-
- addChild: function(child) {
- this.children.push(child);
- },
-
- removeChild: function(child) {
- var i = this.children.indexOf(child.id);
- if (i === -1)
- throw new Error('omg');
- this.children.splice(i, 1);
- },
-
- removeAllChildren: function() {
- for (var i = 0; i < this.children.length; i++)
- this.children[i].parentFrame_ = undefined;
- this.children.splice(0, this.children.length);
- },
-
- /**
- * Returns stackFrames where the most specific frame is first.
- */
- get stackTrace() {
- var stack = [];
- var cur = this;
- while (cur) {
- stack.push(cur);
- cur = cur.parentFrame;
- }
- return stack;
- },
-
- getUserFriendlyStackTrace: function() {
- return this.stackTrace.map(function(x) { return x.title; });
- }
- };
-
- return {
- StackFrame: StackFrame
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/stack_frame_test.html b/chromium/third_party/catapult/tracing/tracing/model/stack_frame_test.html
deleted file mode 100644
index 1fee75ace26..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/stack_frame_test.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/source_info/source_info.html">
-<link rel="import" href="/tracing/model/stack_frame.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('domain', function() {
- var stackFrame1 = new tr.model.StackFrame(undefined, 1, '1', 1);
- assert.equal('unknown', stackFrame1.domain);
-
- var sourceInfo = new tr.model.source_info.SourceInfo(
- 'http://www.google.com:1234');
- var stackFrame2 = new tr.model.StackFrame(
- stackFrame1, 2, '2', 2, sourceInfo);
- assert.equal('http://www.google.com', stackFrame2.domain);
-
- var stackFrame3 = new tr.model.StackFrame(stackFrame2, 3, '3', 3);
- assert.equal('http://www.google.com', stackFrame3.domain);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/thread.html b/chromium/third_party/catapult/tracing/tracing/model/thread.html
deleted file mode 100644
index b34add1ed95..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/thread.html
+++ /dev/null
@@ -1,333 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/async_slice_group.html">
-<link rel="import" href="/tracing/model/event_container.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Thread class.
- */
-tr.exportTo('tr.model', function() {
- var AsyncSlice = tr.model.AsyncSlice;
- var AsyncSliceGroup = tr.model.AsyncSliceGroup;
- var SliceGroup = tr.model.SliceGroup;
- var ThreadSlice = tr.model.ThreadSlice;
- var ThreadTimeSlice = tr.model.ThreadTimeSlice;
-
- /**
- * A Thread stores all the trace events collected for a particular
- * thread. We organize the synchronous slices on a thread by "subrows," where
- * subrow 0 has all the root slices, subrow 1 those nested 1 deep, and so on.
- * The asynchronous slices are stored in an AsyncSliceGroup object.
- *
- * The slices stored on a Thread should be instances of
- * ThreadSlice.
- *
- * @constructor
- * @extends {tr.model.EventContainer}
- */
- function Thread(parent, tid) {
- if (!parent)
- throw new Error('Parent must be provided.');
-
- tr.model.EventContainer.call(this);
- this.parent = parent;
- this.sortIndex = 0;
- this.tid = tid;
- this.name = undefined;
- this.samples_ = undefined; // Set during createSubSlices
-
- var that = this;
-
- this.sliceGroup = new SliceGroup(this, ThreadSlice, 'slices');
- this.timeSlices = undefined;
- this.kernelSliceGroup = new SliceGroup(
- this, ThreadSlice, 'kernel-slices');
- this.asyncSliceGroup = new AsyncSliceGroup(this, 'async-slices');
- }
-
- Thread.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get model() {
- return this.parent.model;
- },
-
- get stableId() {
- return this.parent.stableId + '.' + this.tid;
- },
-
- compareTo: function(that) {
- return Thread.compare(this, that);
- },
-
- childEventContainers: function*() {
- if (this.sliceGroup.length)
- yield this.sliceGroup;
- if (this.kernelSliceGroup.length)
- yield this.kernelSliceGroup;
- if (this.asyncSliceGroup.length)
- yield this.asyncSliceGroup;
- },
-
- childEvents: function*() {
- if (this.timeSlices)
- yield * this.timeSlices;
- },
-
- iterateAllPersistableObjects: function(cb) {
- cb(this);
- if (this.sliceGroup.length)
- cb(this.sliceGroup);
- this.asyncSliceGroup.viewSubGroups.forEach(cb);
- },
-
- /**
- * Shifts all the timestamps inside this thread forward by the amount
- * specified.
- */
- shiftTimestampsForward: function(amount) {
- this.sliceGroup.shiftTimestampsForward(amount);
-
- if (this.timeSlices) {
- for (var i = 0; i < this.timeSlices.length; i++) {
- var slice = this.timeSlices[i];
- slice.start += amount;
- }
- }
-
- this.kernelSliceGroup.shiftTimestampsForward(amount);
- this.asyncSliceGroup.shiftTimestampsForward(amount);
- },
-
- /**
- * Determines whether this thread is empty. If true, it usually implies
- * that it should be pruned from the model.
- */
- get isEmpty() {
- if (this.sliceGroup.length)
- return false;
- if (this.sliceGroup.openSliceCount)
- return false;
- if (this.timeSlices && this.timeSlices.length)
- return false;
- if (this.kernelSliceGroup.length)
- return false;
- if (this.asyncSliceGroup.length)
- return false;
- if (this.samples_.length)
- return false;
- return true;
- },
-
- /**
- * Updates the bounds based on the
- * current objects associated with the thread.
- */
- updateBounds: function() {
- this.bounds.reset();
-
- this.sliceGroup.updateBounds();
- this.bounds.addRange(this.sliceGroup.bounds);
-
- this.kernelSliceGroup.updateBounds();
- this.bounds.addRange(this.kernelSliceGroup.bounds);
-
- this.asyncSliceGroup.updateBounds();
- this.bounds.addRange(this.asyncSliceGroup.bounds);
-
- if (this.timeSlices && this.timeSlices.length) {
- this.bounds.addValue(this.timeSlices[0].start);
- this.bounds.addValue(
- this.timeSlices[this.timeSlices.length - 1].end);
- }
-
- if (this.samples_ && this.samples_.length) {
- this.bounds.addValue(this.samples_[0].start);
- this.bounds.addValue(
- this.samples_[this.samples_.length - 1].end);
- }
- },
-
- addCategoriesToDict: function(categoriesDict) {
- for (var i = 0; i < this.sliceGroup.length; i++)
- categoriesDict[this.sliceGroup.slices[i].category] = true;
- for (var i = 0; i < this.kernelSliceGroup.length; i++)
- categoriesDict[this.kernelSliceGroup.slices[i].category] = true;
- for (var i = 0; i < this.asyncSliceGroup.length; i++)
- categoriesDict[this.asyncSliceGroup.slices[i].category] = true;
- if (this.samples_) {
- for (var i = 0; i < this.samples_.length; i++)
- categoriesDict[this.samples_[i].category] = true;
- }
- },
-
- autoCloseOpenSlices: function() {
- this.sliceGroup.autoCloseOpenSlices();
- this.kernelSliceGroup.autoCloseOpenSlices();
- },
-
- mergeKernelWithUserland: function() {
- if (this.kernelSliceGroup.length > 0) {
- var newSlices = SliceGroup.merge(
- this.sliceGroup, this.kernelSliceGroup);
- this.sliceGroup.slices = newSlices.slices;
- this.kernelSliceGroup = new SliceGroup(this);
- this.updateBounds();
- }
- },
-
- createSubSlices: function() {
- this.sliceGroup.createSubSlices();
- this.samples_ = this.parent.model.samples.filter(function(sample) {
- return sample.thread === this;
- }, this);
- },
-
- /**
- * @return {String} A user-friendly name for this thread.
- */
- get userFriendlyName() {
- return this.name || this.tid;
- },
-
- /**
- * @return {String} User friendly details about this thread.
- */
- get userFriendlyDetails() {
- return 'tid: ' + this.tid +
- (this.name ? ', name: ' + this.name : '');
- },
-
- getSettingsKey: function() {
- if (!this.name)
- return undefined;
- var parentKey = this.parent.getSettingsKey();
- if (!parentKey)
- return undefined;
- return parentKey + '.' + this.name;
- },
-
- getProcess: function() {
- return this.parent;
- },
-
- /*
- * Returns the index of the slice in the timeSlices array, or undefined.
- */
- indexOfTimeSlice: function(timeSlice) {
- var i = tr.b.findLowIndexInSortedArray(
- this.timeSlices,
- function(slice) { return slice.start; },
- timeSlice.start);
- if (this.timeSlices[i] !== timeSlice)
- return undefined;
- return i;
- },
-
- /*
- * Returns an object with the CPU number used as keys,
- * and the value of each key object is the amount of milliseconds spent
- * running on this CPU.
- * Additionally, stats.total contains the total time
- * spent running on all CPUs.
- */
- getCpuStatsForRange: function(range) {
- var stats = {};
- stats.total = 0;
-
- if (!this.timeSlices)
- return stats;
-
- function addStatsForSlice(threadTimeSlice) {
- var freqRange = tr.b.Range.fromExplicitRange(threadTimeSlice.start,
- threadTimeSlice.end);
- var intersection = freqRange.findIntersection(range);
-
- if (threadTimeSlice.schedulingState ===
- tr.model.SCHEDULING_STATE.RUNNING) {
- var cpu = threadTimeSlice.cpuOnWhichThreadWasRunning;
- if (!(cpu.cpuNumber in stats))
- stats[cpu.cpuNumber] = 0;
-
- stats[cpu.cpuNumber] += intersection.duration;
- stats.total += intersection.duration;
- }
- }
-
- tr.b.iterateOverIntersectingIntervals(this.timeSlices,
- function(x) { return x.start; },
- function(x) { return x.end; },
- range.min,
- range.max,
- addStatsForSlice);
- return stats;
- },
-
- getSchedulingStatsForRange: function(start, end) {
- var stats = {};
-
- if (!this.timeSlices) return stats;
-
- function addStatsForSlice(threadTimeSlice) {
- var overlapStart = Math.max(threadTimeSlice.start, start);
- var overlapEnd = Math.min(threadTimeSlice.end, end);
- var schedulingState = threadTimeSlice.schedulingState;
-
- if (!(schedulingState in stats))
- stats[schedulingState] = 0;
- stats[schedulingState] += overlapEnd - overlapStart;
- }
-
- tr.b.iterateOverIntersectingIntervals(this.timeSlices,
- function(x) { return x.start; },
- function(x) { return x.end; },
- start,
- end,
- addStatsForSlice);
- return stats;
- },
-
- get samples() {
- return this.samples_;
- }
- };
-
- /**
- * Comparison between threads that orders first by parent.compareTo,
- * then by names, then by tid.
- */
- Thread.compare = function(x, y) {
- var tmp = x.parent.compareTo(y.parent);
- if (tmp)
- return tmp;
-
- tmp = x.sortIndex - y.sortIndex;
- if (tmp)
- return tmp;
-
- tmp = tr.b.comparePossiblyUndefinedValues(
- x.name, y.name,
- function(x, y) { return x.localeCompare(y); });
- if (tmp)
- return tmp;
-
- return x.tid - y.tid;
- };
-
- return {
- Thread: Thread
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/thread_slice.html b/chromium/third_party/catapult/tracing/tracing/model/thread_slice.html
deleted file mode 100644
index 49672bb86b7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/thread_slice.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/slice.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the Thread class.
- */
-tr.exportTo('tr.model', function() {
- var Slice = tr.model.Slice;
-
- /**
- * A ThreadSlice represents an interval of time on a thread resource
- * with associated nesting slice information.
- *
- * ThreadSlices are typically associated with a specific trace event pair on a
- * specific thread.
- * For example,
- * TRACE_EVENT_BEGIN1("x","myArg", 7) at time=0.1ms
- * TRACE_EVENT_END0() at time=0.3ms
- * This results in a single slice from 0.1 with duration 0.2 on a
- * specific thread.
- *
- * @constructor
- */
- function ThreadSlice(cat, title, colorId, start, args, opt_duration,
- opt_cpuStart, opt_cpuDuration, opt_argsStripped,
- opt_bindId) {
- Slice.call(this, cat, title, colorId, start, args, opt_duration,
- opt_cpuStart, opt_cpuDuration, opt_argsStripped, opt_bindId);
- // Do not modify this directly.
- // subSlices is configured by SliceGroup.rebuildSubRows_.
- this.subSlices = [];
- }
-
- ThreadSlice.prototype = {
- __proto__: Slice.prototype,
-
- get overlappingSamples() {
- var samples = new tr.model.EventSet();
- if (!this.parentContainer || !this.parentContainer.samples)
- return samples;
- this.parentContainer.samples.forEach(function(sample) {
- if (this.start <= sample.start && sample.start <= this.end)
- samples.push(sample);
- }, this);
- return samples;
- }
- };
-
- tr.model.EventRegistry.register(
- ThreadSlice,
- {
- name: 'slice',
- pluralName: 'slices'
- });
-
- return {
- ThreadSlice: ThreadSlice
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/thread_slice_test.html b/chromium/third_party/catapult/tracing/tracing/model/thread_slice_test.html
deleted file mode 100644
index d621859a4ee..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/thread_slice_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ThreadSlice = tr.model.ThreadSlice;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newFakeThread = tr.c.TestUtils.newFakeThread;
-
- test('getOverlappingSamples', function() {
- var model = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
- m.samples.push(
- new tr.model.Sample(null, m.t1, 'a_1', 1),
- new tr.model.Sample(null, m.t1, 'a_2', 2),
- new tr.model.Sample(null, m.t1, 'a_3', 3),
- new tr.model.Sample(null, m.t1, 'b', 5)
- );
- });
- var threadSlice = newSliceEx({title: 'a', start: 0, end: 4,
- type: tr.model.ThreadSlice});
- threadSlice.parentContainer = model;
- var samplesIter = threadSlice.overlappingSamples[Symbol.iterator]();
- assert.equal(samplesIter.next().value.title, 'a_1');
- assert.equal(samplesIter.next().value.title, 'a_2');
- assert.equal(samplesIter.next().value.title, 'a_3');
- assert.equal(samplesIter.next().done, true);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/thread_test.html b/chromium/third_party/catapult/tracing/tracing/model/thread_test.html
deleted file mode 100644
index 4b5ebd613ac..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/thread_test.html
+++ /dev/null
@@ -1,183 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ThreadSlice = tr.model.ThreadSlice;
- var Process = tr.model.Process;
- var Thread = tr.model.Thread;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newAsyncSlice = tr.c.TestUtils.newAsyncSlice;
- var newThreadSlice = tr.c.TestUtils.newThreadSlice;
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
-
- test('threadBounds_Empty', function() {
- var model = new tr.Model();
- var t = new Thread(new Process(model, 7), 1);
- t.updateBounds();
- assert.isUndefined(t.bounds.min);
- assert.isUndefined(t.bounds.max);
- });
-
- test('threadBounds_SubRow', function() {
- var model = new tr.Model();
- var t = new Thread(new Process(model, 7), 1);
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3));
- t.updateBounds();
- assert.equal(t.bounds.min, 1);
- assert.equal(t.bounds.max, 4);
- });
-
- test('threadBounds_AsyncSliceGroup', function() {
- var model = new tr.Model();
- var t = new Thread(new Process(model, 7), 1);
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 3));
- t.asyncSliceGroup.push(newAsyncSlice(0.1, 5, t, t));
- t.updateBounds();
- assert.equal(t.bounds.min, 0.1);
- assert.equal(t.bounds.max, 5.1);
- });
-
- test('threadBounds_Cpu', function() {
- var model = new tr.Model();
- var t = new Thread(new Process(model, 7), 1);
- t.timeSlices = [newSliceEx({title: 'x', start: 0, duration: 1})];
- t.updateBounds();
- assert.equal(t.bounds.min, 0);
- assert.equal(t.bounds.max, 1);
- });
-
- test('shiftTimestampsForwardWithCpu', function() {
- var model = new tr.Model();
- var t = new Thread(new Process(model, 7), 1);
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 0, {}, 3));
- t.asyncSliceGroup.push(newAsyncSlice(0, 5, t, t));
- t.timeSlices = [newSliceEx({title: 'x', start: 0, duration: 1})];
-
- var shiftCount = 0;
- t.asyncSliceGroup.shiftTimestampsForward = function(ts) {
- if (ts === 0.32)
- shiftCount++;
- };
-
- t.shiftTimestampsForward(0.32);
-
- assert.equal(shiftCount, 1);
- assert.equal(t.sliceGroup.slices[0].start, 0.32);
- assert.equal(t.timeSlices[0].start, 0.32);
- });
-
- test('shiftTimestampsForwardWithoutCpu', function() {
- var model = new tr.Model();
- var t = new Thread(new Process(model, 7), 1);
- t.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 0, {}, 3));
- t.asyncSliceGroup.push(newAsyncSlice(0, 5, t, t));
-
- var shiftCount = 0;
- t.asyncSliceGroup.shiftTimestampsForward = function(ts) {
- if (ts === 0.32)
- shiftCount++;
- };
-
- t.shiftTimestampsForward(0.32);
-
- assert.equal(shiftCount, 1);
- assert.equal(t.sliceGroup.slices[0].start, 0.32);
- });
-
- test('getSchedulingStatsForRange', function() {
- var scheduledThread = undefined;
- var unscheduledThread = undefined;
- var model = tr.c.TestUtils.newModel(function(model) {
- unscheduledThread = model.getOrCreateProcess(1).getOrCreateThread(1);
- unscheduledThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'work', start: 0, duration: 20}));
-
- scheduledThread = model.getOrCreateProcess(2).getOrCreateThread(2);
- scheduledThread.sliceGroup.pushSlice(newSliceEx(
- {title: 'work', start: 0, duration: 20}));
- scheduledThread.timeSlices = [
- newThreadSlice(scheduledThread, SCHEDULING_STATE.RUNNING, 0, 3),
- newThreadSlice(scheduledThread, SCHEDULING_STATE.RUNNABLE, 3, 5),
- newThreadSlice(scheduledThread, SCHEDULING_STATE.RUNNING, 8, 2),
- newThreadSlice(scheduledThread, SCHEDULING_STATE.SLEEPING, 10, 10)
- ];
- });
-
- // thread without scheduling states
- var stats = unscheduledThread.getSchedulingStatsForRange(0, 20);
- assert.deepEqual(stats, {});
-
- // no scheduling info
- var stats = scheduledThread.getSchedulingStatsForRange(50, 100);
- assert.deepEqual(stats, {});
-
- // simple query
- var stats = scheduledThread.getSchedulingStatsForRange(0, 3);
- var expected = {};
- expected[SCHEDULING_STATE.RUNNING] = 3;
- assert.deepEqual(stats, expected);
-
- // aggregation
- var stats = scheduledThread.getSchedulingStatsForRange(0, 20);
- var expected = {};
- expected[SCHEDULING_STATE.RUNNING] = 5;
- expected[SCHEDULING_STATE.RUNNABLE] = 5;
- expected[SCHEDULING_STATE.SLEEPING] = 10;
- assert.deepEqual(stats, expected);
- });
-
- test('getCpuStatsForRange', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var cpu0 = model.kernel.getOrCreateCpu(0);
- var cpu1 = model.kernel.getOrCreateCpu(1);
- var thread = model.getOrCreateProcess(1).getOrCreateThread(1);
- thread.timeSlices = [
- newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 0, 3, cpu0),
- newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 8, 2, cpu1),
- newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 20, 5, cpu1)
- ];
- var range = tr.b.Range.fromExplicitRange(1, 22);
- var stats = thread.getCpuStatsForRange(range);
- assert.deepEqual(stats, {
- 0: 2,
- 1: 4,
- total: 6
- });
- });
- });
-
- test('getCpuStatsForRange_excludesNotRunningThreads', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var cpu0 = model.kernel.getOrCreateCpu(0);
- var cpu1 = model.kernel.getOrCreateCpu(1);
- var thread = model.getOrCreateProcess(1).getOrCreateThread(1);
- thread.timeSlices = [
- newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 0, 8, cpu0),
- newThreadSlice(thread, SCHEDULING_STATE.RUNNABLE, 8, 3),
- newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 11, 4, cpu1),
- newThreadSlice(thread, SCHEDULING_STATE.SLEEPING, 15, 10),
- newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 25, 10, cpu1)
- ];
- var range = tr.b.Range.fromExplicitRange(1, 26);
- var stats = thread.getCpuStatsForRange(range);
- assert.deepEqual(stats, {
- 0: 7,
- 1: 5,
- total: 12
- });
- });
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/thread_time_slice.html b/chromium/third_party/catapult/tracing/tracing/model/thread_time_slice.html
deleted file mode 100644
index 9b5a86bf6c6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/thread_time_slice.html
+++ /dev/null
@@ -1,159 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/slice.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- var Slice = tr.model.Slice;
-
-
- var SCHEDULING_STATE = {
- DEBUG: 'Debug',
- EXIT_DEAD: 'Exit Dead',
- RUNNABLE: 'Runnable',
- RUNNING: 'Running',
- SLEEPING: 'Sleeping',
- STOPPED: 'Stopped',
- TASK_DEAD: 'Task Dead',
- UNINTR_SLEEP: 'Uninterruptible Sleep',
- UNINTR_SLEEP_WAKE_KILL: 'Uninterruptible Sleep | WakeKill',
- UNINTR_SLEEP_WAKING: 'Uninterruptible Sleep | Waking',
- UNINTR_SLEEP_IO: 'Uninterruptible Sleep - Block I/O',
- UNINTR_SLEEP_WAKE_KILL_IO: 'Uninterruptible Sleep | WakeKill - Block I/O',
- UNINTR_SLEEP_WAKING_IO: 'Uninterruptible Sleep | Waking - Block I/O',
- UNKNOWN: 'UNKNOWN',
- WAKE_KILL: 'Wakekill',
- WAKING: 'Waking',
- ZOMBIE: 'Zombie'
- };
-
- /**
- * A ThreadTimeSlice is a slice of time on a specific thread where that thread
- * was running on a specific CPU, or in a specific sleep state.
- *
- * As a thread switches moves through its life, it sometimes goes to sleep and
- * can't run. Other times, its runnable but isn't actually assigned to a CPU.
- * Finally, sometimes it gets put on a CPU to actually execute. Each of these
- * states is represented by a ThreadTimeSlice:
- *
- * Sleeping or runnable: cpuOnWhichThreadWasRunning is undefined
- * Running: cpuOnWhichThreadWasRunning is set.
- *
- * @constructor
- */
- function ThreadTimeSlice(thread, schedulingState, cat,
- start, args, opt_duration) {
- Slice.call(this, cat, schedulingState,
- this.getColorForState_(schedulingState),
- start, args, opt_duration);
- this.thread = thread;
- this.schedulingState = schedulingState;
- this.cpuOnWhichThreadWasRunning = undefined;
- }
-
- ThreadTimeSlice.prototype = {
- __proto__: Slice.prototype,
-
- getColorForState_: function(state) {
- var getColorIdForReservedName =
- tr.b.ColorScheme.getColorIdForReservedName;
-
- switch (state) {
- case SCHEDULING_STATE.RUNNABLE:
- return getColorIdForReservedName('thread_state_runnable');
- case SCHEDULING_STATE.RUNNING:
- return getColorIdForReservedName('thread_state_running');
- case SCHEDULING_STATE.SLEEPING:
- return getColorIdForReservedName('thread_state_sleeping');
- case SCHEDULING_STATE.DEBUG:
- case SCHEDULING_STATE.EXIT_DEAD:
- case SCHEDULING_STATE.STOPPED:
- case SCHEDULING_STATE.TASK_DEAD:
- case SCHEDULING_STATE.UNINTR_SLEEP:
- case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL:
- case SCHEDULING_STATE.UNINTR_SLEEP_WAKING:
- case SCHEDULING_STATE.UNKNOWN:
- case SCHEDULING_STATE.WAKE_KILL:
- case SCHEDULING_STATE.WAKING:
- case SCHEDULING_STATE.ZOMBIE:
- return getColorIdForReservedName('thread_state_uninterruptible');
- case SCHEDULING_STATE.UNINTR_SLEEP_IO:
- case SCHEDULING_STATE.UNINTR_SLEEP_WAKE_KILL_IO:
- case SCHEDULING_STATE.UNINTR_SLEEP_WAKING_IO:
- return getColorIdForReservedName('thread_state_iowait');
- default:
- return getColorIdForReservedName('thread_state_unknown');
- }
- },
-
- get analysisTypeName() {
- return 'tr.ui.analysis.ThreadTimeSlice';
- },
-
- getAssociatedCpuSlice: function() {
- if (!this.cpuOnWhichThreadWasRunning)
- return undefined;
- var cpuSlices = this.cpuOnWhichThreadWasRunning.slices;
- for (var i = 0; i < cpuSlices.length; i++) {
- var cpuSlice = cpuSlices[i];
- if (cpuSlice.start !== this.start)
- continue;
- if (cpuSlice.duration !== this.duration)
- continue;
- return cpuSlice;
- }
- return undefined;
- },
-
- getCpuSliceThatTookCpu: function() {
- if (this.cpuOnWhichThreadWasRunning)
- return undefined;
- var curIndex = this.thread.indexOfTimeSlice(this);
- var cpuSliceWhenLastRunning;
- while (curIndex >= 0) {
- var curSlice = this.thread.timeSlices[curIndex];
- if (!curSlice.cpuOnWhichThreadWasRunning) {
- curIndex--;
- continue;
- }
- cpuSliceWhenLastRunning = curSlice.getAssociatedCpuSlice();
- break;
- }
- if (!cpuSliceWhenLastRunning)
- return undefined;
-
- var cpu = cpuSliceWhenLastRunning.cpu;
- var indexOfSliceOnCpuWhenLastRunning =
- cpu.indexOf(cpuSliceWhenLastRunning);
- var nextRunningSlice = cpu.slices[indexOfSliceOnCpuWhenLastRunning + 1];
- if (!nextRunningSlice)
- return undefined;
- if (Math.abs(nextRunningSlice.start - cpuSliceWhenLastRunning.end) <
- 0.00001)
- return nextRunningSlice;
- return undefined;
- }
- };
-
- tr.model.EventRegistry.register(
- ThreadTimeSlice,
- {
- name: 'threadTimeSlice',
- pluralName: 'threadTimeSlices'
- });
-
-
- return {
- ThreadTimeSlice: ThreadTimeSlice,
- SCHEDULING_STATE: SCHEDULING_STATE
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map.html b/chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map.html
deleted file mode 100644
index 5b54daa1028..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map.html
+++ /dev/null
@@ -1,194 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the TimeToObjectInstanceMap class.
- */
-tr.exportTo('tr.model', function() {
- /**
- * Tracks all the instances associated with a given ID over its lifetime.
- *
- * A scoped id can be used multiple times throughout a trace, referring to
- * different objects at different times. This data structure does the
- * bookkeeping to figure out what ObjectInstance is referred to at a given
- * timestamp.
- *
- * @constructor
- */
- function TimeToObjectInstanceMap(
- createObjectInstanceFunction, parent, scopedId) {
- this.createObjectInstanceFunction_ = createObjectInstanceFunction;
- this.parent = parent;
- this.scopedId = scopedId;
- this.instances = [];
- }
-
- TimeToObjectInstanceMap.prototype = {
- idWasCreated: function(category, name, ts) {
- if (this.instances.length === 0) {
- this.instances.push(this.createObjectInstanceFunction_(
- this.parent, this.scopedId, category, name, ts));
- this.instances[0].creationTsWasExplicit = true;
- return this.instances[0];
- }
-
- var lastInstance = this.instances[this.instances.length - 1];
- if (ts < lastInstance.deletionTs) {
- throw new Error('Mutation of the TimeToObjectInstanceMap must be ' +
- 'done in ascending timestamp order.');
- }
- lastInstance = this.createObjectInstanceFunction_(
- this.parent, this.scopedId, category, name, ts);
- lastInstance.creationTsWasExplicit = true;
- this.instances.push(lastInstance);
- return lastInstance;
- },
-
- addSnapshot: function(category, name, ts, args, opt_baseTypeName) {
- if (this.instances.length === 0) {
- this.instances.push(this.createObjectInstanceFunction_(
- this.parent, this.scopedId, category, name, ts, opt_baseTypeName));
- }
-
- var i = tr.b.findIndexInSortedIntervals(
- this.instances,
- function(inst) { return inst.creationTs; },
- function(inst) { return inst.deletionTs - inst.creationTs; },
- ts);
-
- var instance;
- if (i < 0) {
- instance = this.instances[0];
- if (ts > instance.deletionTs ||
- instance.creationTsWasExplicit) {
- throw new Error(
- 'At the provided timestamp, no instance was still alive');
- }
-
- if (instance.snapshots.length !== 0) {
- throw new Error(
- 'Cannot shift creationTs forward, ' +
- 'snapshots have been added. First snap was at ts=' +
- instance.snapshots[0].ts + ' and creationTs was ' +
- instance.creationTs);
- }
- instance.creationTs = ts;
- } else if (i >= this.instances.length) {
- instance = this.instances[this.instances.length - 1];
- if (ts >= instance.deletionTs) {
- // The snap is added after our oldest and deleted instance. This means
- // that this is a new implicit instance.
- instance = this.createObjectInstanceFunction_(
- this.parent, this.scopedId, category, name, ts, opt_baseTypeName);
- this.instances.push(instance);
- } else {
- // If the ts is before the last objects deletion time, then the caller
- // is trying to add a snapshot when there may have been an instance
- // alive. In that case, try to move an instance's creationTs to
- // include this ts, provided that it has an implicit creationTs.
-
- // Search backward from the right for an instance that was definitely
- // deleted before this ts. Any time an instance is found that has a
- // moveable creationTs
- var lastValidIndex;
- for (var i = this.instances.length - 1; i >= 0; i--) {
- var tmp = this.instances[i];
- if (ts >= tmp.deletionTs)
- break;
- if (tmp.creationTsWasExplicit === false &&
- tmp.snapshots.length === 0)
- lastValidIndex = i;
- }
- if (lastValidIndex === undefined) {
- throw new Error(
- 'Cannot add snapshot. No instance was alive that was mutable.');
- }
- instance = this.instances[lastValidIndex];
- instance.creationTs = ts;
- }
- } else {
- instance = this.instances[i];
- }
-
- return instance.addSnapshot(ts, args, name, opt_baseTypeName);
- },
-
- get lastInstance() {
- if (this.instances.length === 0)
- return undefined;
- return this.instances[this.instances.length - 1];
- },
-
- idWasDeleted: function(category, name, ts) {
- if (this.instances.length === 0) {
- this.instances.push(this.createObjectInstanceFunction_(
- this.parent, this.scopedId, category, name, ts));
- }
- var lastInstance = this.instances[this.instances.length - 1];
- if (ts < lastInstance.creationTs)
- throw new Error('Cannot delete an id before it was created');
- if (lastInstance.deletionTs === Number.MAX_VALUE) {
- lastInstance.wasDeleted(ts);
- return lastInstance;
- }
-
- if (ts < lastInstance.deletionTs)
- throw new Error('id was already deleted earlier.');
-
- // A new instance was deleted with no snapshots in-between.
- // Create an instance then kill it.
- lastInstance = this.createObjectInstanceFunction_(
- this.parent, this.scopedId, category, name, ts);
- this.instances.push(lastInstance);
- lastInstance.wasDeleted(ts);
- return lastInstance;
- },
-
- getInstanceAt: function(ts) {
- var i = tr.b.findIndexInSortedIntervals(
- this.instances,
- function(inst) { return inst.creationTs; },
- function(inst) { return inst.deletionTs - inst.creationTs; },
- ts);
- if (i < 0) {
- if (this.instances[0].creationTsWasExplicit)
- return undefined;
- return this.instances[0];
- } else if (i >= this.instances.length) {
- return undefined;
- }
- return this.instances[i];
- },
-
- logToConsole: function() {
- for (var i = 0; i < this.instances.length; i++) {
- var instance = this.instances[i];
- var cEF = '';
- var dEF = '';
- if (instance.creationTsWasExplicit)
- cEF = '(explicitC)';
- if (instance.deletionTsWasExplicit)
- dEF = '(explicit)';
- console.log(instance.creationTs, cEF,
- instance.deletionTs, dEF,
- instance.category,
- instance.name,
- instance.snapshots.length + ' snapshots');
- }
- }
- };
-
- return {
- TimeToObjectInstanceMap: TimeToObjectInstanceMap
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map_test.html b/chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map_test.html
deleted file mode 100644
index bcda0a2ea3b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/time_to_object_instance_map_test.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/time_to_object_instance_map.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var createObjectInstance = function(parent, id, category, name, creationTs) {
- return new tr.model.ObjectInstance(
- parent, id, category, name, creationTs);
- };
-
- test('timeToObjectInstanceMap', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- m.addSnapshot('cat', 'name', 10, 'a1');
- m.addSnapshot('cat', 'name', 20, 'a2');
- m.idWasDeleted('cat', 'name', 30);
- m.addSnapshot('cat', 'name', 40, 'b');
-
- assert.equal(m.instances.length, 2);
-
- var i0 = m.getInstanceAt(0);
- var i10 = m.getInstanceAt(10);
- assert.equal(i0, i10);
-
- assert.isDefined(i10);
- assert.equal(i10.snapshots.length, 2);
- assert.equal(i10.snapshots[0].args, 'a1');
- assert.equal(i10.snapshots[1].args, 'a2');
-
- assert.equal(i10.deletionTs, 30);
-
- var i15 = m.getInstanceAt(15);
- assert.equal(i15, i10);
-
- var i20 = m.getInstanceAt(20);
- assert.equal(i20, i10);
-
- var i30 = m.getInstanceAt(30);
- assert.isUndefined(i30);
-
- var i35 = m.getInstanceAt(35);
- assert.isUndefined(i35);
-
- var i40 = m.getInstanceAt(40);
- assert.isDefined(i40);
- assert.notEqual(i40, i10);
- assert.equal(i40.snapshots.length, 1);
- assert.equal(i40.creationTs, 40);
- assert.equal(i40.deletionTs, Number.MAX_VALUE);
-
- var i41 = m.getInstanceAt(41);
- assert.equal(i40, i41);
- });
-
- test('timeToObjectInstanceMapsBoundsLogic', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- m.addSnapshot('cat', 'name', 10, 'a1');
- m.addSnapshot('cat', 'name', 20, 'a2');
- m.idWasDeleted('cat', 'name', 30);
- m.addSnapshot('cat', 'name', 40, 'b');
- m.addSnapshot('cat', 'name', 41, 'b');
-
- m.instances.forEach(function(i) { i.updateBounds(); });
-
- var iA = m.getInstanceAt(10);
- assert.equal(iA.bounds.min, 10);
- assert.equal(iA.bounds.max, 30);
-
- var iB = m.getInstanceAt(40);
- assert.equal(iB.bounds.min, 40);
- assert.equal(iB.bounds.max, 41);
- });
-
- test('earlySnapshot', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- var i10 = m.idWasCreated('cat', 'name', 10, 'a1');
- m.idWasDeleted('cat', 'name', 20);
-
- assert.throws(function() {
- m.addSnapshot('cat', 'name', 5, 'a1');
- });
- assert.equal(i10.creationTs, 10);
- assert.equal(i10.deletionTs, 20);
- });
-
- test('earlySnapshotWithImplicitCreate', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- var i10 = m.idWasDeleted('cat', 'name', 20);
- m.addSnapshot('cat', 'name', 5, 'a1');
- assert.equal(i10.creationTs, 5);
- assert.equal(i10.deletionTs, 20);
- });
-
- test('getInstanceBeforeCreationImplicitCreate', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- var i10 = m.idWasCreated('cat', 'name', 10, 'a1');
- m.idWasDeleted('cat', 'name', 20);
- assert.isUndefined(m.getInstanceAt(5));
- });
-
- test('getInstanceBeforeCreationImplicitCreateWithSnapshot', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- var s5 = m.addSnapshot('cat', 'name', 5, 'a1');
- var i10 = m.idWasDeleted('cat', 'name', 20);
- assert.equal(m.getInstanceAt(5), i10);
- });
-
- test('successiveDeletions', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- var i20 = m.idWasDeleted('cat', 'name', 20);
- var i30 = m.idWasDeleted('cat', 'name', 30);
- var i40 = m.idWasDeleted('cat', 'name', 40);
- assert.equal(i20.creationTs, 20);
- assert.isFalse(i20.creationTsWasExplicit);
- assert.equal(i20.deletionTs, 20);
- assert.isTrue(i20.deletionTsWasExplicit);
-
- assert.equal(i30.creationTs, 30);
- assert.isFalse(i30.creationTsWasExplicit);
- assert.equal(i30.deletionTs, 30);
- assert.isTrue(i30.deletionTsWasExplicit);
-
-
- assert.equal(i40.creationTs, 40);
- assert.isFalse(i40.creationTsWasExplicit);
- assert.equal(i40.deletionTs, 40);
- assert.isTrue(i40.deletionTsWasExplicit);
- });
-
- test('snapshotAfterDeletion', function() {
- var m = new tr.model.TimeToObjectInstanceMap(
- createObjectInstance, {}, 7);
- var i10 = m.idWasCreated('cat', 'name', 10, 'a1');
- m.idWasDeleted('cat', 'name', 20);
-
- var s25 = m.addSnapshot('cat', 'name', 25, 'a1');
- var i25 = s25.objectInstance;
-
- assert.equal(i10.creationTs, 10);
- assert.equal(i10.deletionTs, 20);
- assert.notEqual(i25, i10);
- assert.equal(i25.creationTs, 25);
- assert.equal(i25.deletionTs, Number.MAX_VALUE);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/model/timed_event.html b/chromium/third_party/catapult/tracing/tracing/model/timed_event.html
deleted file mode 100644
index 11347fe4cc6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/timed_event.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/model/event.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
- /**
- * TimedEvent is a base type for any entity in the trace model with a specific
- * start and duration.
- *
- * @constructor
- */
- function TimedEvent(start) {
- tr.model.Event.call(this);
- this.start = start;
- this.duration = 0;
- this.cpuStart = undefined;
- this.cpuDuration = undefined;
- // The set of contexts this event belongs to (order is unimportant). This
- // array should never be modified.
- this.contexts = Object.freeze([]);
- }
-
- TimedEvent.prototype = {
- __proto__: tr.model.Event.prototype,
-
- get end() {
- return this.start + this.duration;
- },
-
- addBoundsToRange: function(range) {
- range.addValue(this.start);
- range.addValue(this.end);
- },
-
- // TODO(charliea): Can this be implemented in terms of Event.range()?
- // Returns true if 'that' TimedEvent is fully contained within 'this' timed
- // event.
- bounds: function(that, opt_precisionUnit) {
- if (opt_precisionUnit === undefined)
- opt_precisionUnit = tr.b.TimeDisplayModes.ms;
-
- var startsBefore = opt_precisionUnit.roundedLess(that.start, this.start);
- var endsAfter = opt_precisionUnit.roundedLess(this.end, that.end);
- return !startsBefore && !endsAfter;
- }
- };
-
- return {
- TimedEvent: TimedEvent
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/timed_event_test.html b/chromium/third_party/catapult/tracing/tracing/model/timed_event_test.html
deleted file mode 100644
index 5659b71d9a2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/timed_event_test.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('bounds_startPrecision', function() {
- var unit = tr.b.TimeDisplayModes;
-
- var outer = new tr.model.TimedEvent(10.0001);
- outer.duration = 0.9999;
- var inner = new tr.model.TimedEvent(10.0000);
- inner.duration = 1.0000;
-
- assert.isTrue(outer.bounds(inner));
- assert.isTrue(outer.bounds(inner, unit.ms));
-
- assert.isFalse(outer.bounds(inner, unit.ns));
- });
-
- test('bounds_endPrecision', function() {
- var unit = tr.b.TimeDisplayModes;
-
- var outer = new tr.model.TimedEvent(10.0000);
- outer.duration = 0.9999;
- var inner = new tr.model.TimedEvent(10.0000);
- inner.duration = 1.0000;
-
- assert.isTrue(outer.bounds(inner));
- assert.isTrue(outer.bounds(inner, unit.ms));
-
- assert.isFalse(outer.bounds(inner, unit.ns));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/animation_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/animation_expectation.html
deleted file mode 100644
index 2ba066b25a0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/animation_expectation.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- function AnimationExpectation(
- parentModel, initiatorTitle, start, duration) {
- tr.model.um.UserExpectation.call(
- this, parentModel, initiatorTitle, start, duration);
- this.frameEvents_ = undefined;
- }
-
- AnimationExpectation.prototype = {
- __proto__: tr.model.um.UserExpectation.prototype,
- constructor: AnimationExpectation,
-
- get frameEvents() {
- if (this.frameEvents_)
- return this.frameEvents_;
-
- this.frameEvents_ = new tr.model.EventSet();
-
- this.associatedEvents.forEach(function(event) {
- if (event.title === tr.model.helpers.IMPL_RENDERING_STATS)
- this.frameEvents_.push(event);
- }, this);
-
- return this.frameEvents_;
- }
- };
-
- tr.model.um.UserExpectation.subTypes.register(AnimationExpectation, {
- stageTitle: 'Animation',
- colorId: tr.b.ColorScheme.getColorIdForReservedName('rail_animation')
- });
-
- return {
- AnimationExpectation: AnimationExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/idle_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/idle_expectation.html
deleted file mode 100644
index 0438be4990d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/idle_expectation.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- function IdleExpectation(parentModel, start, duration) {
- var initiatorTitle = '';
- tr.model.um.UserExpectation.call(
- this, parentModel, initiatorTitle, start, duration);
- }
-
- IdleExpectation.prototype = {
- __proto__: tr.model.um.UserExpectation.prototype,
- constructor: IdleExpectation
- };
-
- tr.model.um.UserExpectation.subTypes.register(IdleExpectation, {
- stageTitle: 'Idle',
- colorId: tr.b.ColorScheme.getColorIdForReservedName('rail_idle')
- });
-
- return {
- IdleExpectation: IdleExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/load_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/load_expectation.html
deleted file mode 100644
index a40bdfa9be0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/load_expectation.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- var LOAD_SUBTYPE_NAMES = {
- SUCCESSFUL: 'Successful',
- FAILED: 'Failed',
- };
-
- var DOES_LOAD_SUBTYPE_NAME_EXIST = {};
- for (var key in LOAD_SUBTYPE_NAMES) {
- DOES_LOAD_SUBTYPE_NAME_EXIST[LOAD_SUBTYPE_NAMES[key]] = true;;
- }
-
- function LoadExpectation(parentModel, initiatorTitle, start, duration) {
- if (!DOES_LOAD_SUBTYPE_NAME_EXIST[initiatorTitle])
- throw new Error(initiatorTitle + ' is not in LOAD_SUBTYPE_NAMES');
-
- tr.model.um.UserExpectation.call(
- this, parentModel, initiatorTitle, start, duration);
-
- // |renderProcess| is the renderer process that contains the loading
- // RenderFrame.
- this.renderProcess = undefined;
-
- // |renderMainThread| is the CrRendererMain thread in the |renderProcess|
- // that contains the loading RenderFrame.
- this.renderMainThread = undefined;
-
- // |routingId| identifies the loading RenderFrame within the renderer
- // process.
- this.routingId = undefined;
-
- // |parentRoutingId| identifies the RenderFrame that created and contains
- // the loading RenderFrame.
- this.parentRoutingId = undefined;
-
- // |loadFinishedEvent|, if present, signals that this is a main frame.
- this.loadFinishedEvent = undefined;
-
- // Startup LoadIRs do not have renderProcess, routingId, or
- // parentRoutingId. Maybe RenderLoadIR should be a separate class?
- }
-
- LoadExpectation.prototype = {
- __proto__: tr.model.um.UserExpectation.prototype,
- constructor: LoadExpectation
- };
-
- tr.model.um.UserExpectation.subTypes.register(LoadExpectation, {
- stageTitle: 'Load',
- colorId: tr.b.ColorScheme.getColorIdForReservedName('rail_load')
- });
-
- return {
- LOAD_SUBTYPE_NAMES: LOAD_SUBTYPE_NAMES,
- LoadExpectation: LoadExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/response_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/response_expectation.html
deleted file mode 100644
index 9ebe9da4b7f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/response_expectation.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- function ResponseExpectation(
- parentModel, initiatorTitle, start, duration, opt_isAnimationBegin) {
- tr.model.um.UserExpectation.call(
- this, parentModel, initiatorTitle, start, duration);
- this.isAnimationBegin = opt_isAnimationBegin || false;
- }
-
- ResponseExpectation.prototype = {
- __proto__: tr.model.um.UserExpectation.prototype,
- constructor: ResponseExpectation
- };
-
- tr.model.um.UserExpectation.subTypes.register(ResponseExpectation, {
- stageTitle: 'Response',
- colorId: tr.b.ColorScheme.getColorIdForReservedName('rail_response')
- });
-
- return {
- ResponseExpectation: ResponseExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/startup_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/startup_expectation.html
deleted file mode 100644
index 6228046844f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/startup_expectation.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- function StartupExpectation(parentModel, start, duration) {
- tr.model.um.UserExpectation.call(
- this, parentModel, '', start, duration);
- }
-
- StartupExpectation.prototype = {
- __proto__: tr.model.um.UserExpectation.prototype,
- constructor: StartupExpectation
- };
-
- tr.model.um.UserExpectation.subTypes.register(StartupExpectation, {
- stageTitle: 'Startup',
- colorId: tr.b.ColorScheme.getColorIdForReservedName('startup')
- });
-
- return {
- StartupExpectation: StartupExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/stub_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/stub_expectation.html
deleted file mode 100644
index d5445817e18..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/stub_expectation.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/user_model/user_expectation.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Stub version of UserExpectation for testing.
- */
-tr.exportTo('tr.model.um', function() {
- function StubExpectation(args) {
- this.stageTitle_ = args.stageTitle || 'Idle';
- this.initiatorTitle_ = args.initiatorTitle || '';
-
- this.title_ = args.title;
- if (!this.title_) {
- var defaultTitle = [];
- if (this.initiatorTitle_)
- defaultTitle.push(this.initiatorTitle_);
- if (this.stageTitle_)
- defaultTitle.push(this.stageTitle_);
- this.title_ = defaultTitle.join(' ') || 'title';
- }
-
- this.normalizedUserComfort_ = args.normalizedUserComfort || 0;
- this.normalizedEfficiency_ = args.normalizedEfficiency || 0;
-
- var sd = tr.c.TestUtils.getStartAndDurationFromDict(args);
-
- tr.model.um.UserExpectation.call(
- this, args.parentModel, this.initiatorTitle, sd.start, sd.duration);
-
- // Must be set after base class call.
- this.colorId_ = args.colorId || 0;
-
- if (args.associatedEvents) {
- args.associatedEvents.forEach(function(event) {
- this.associatedEvents.push(event);
- }, this);
- }
- }
-
- StubExpectation.prototype = {
- __proto__: tr.model.um.UserExpectation.prototype,
-
- get colorId() {
- return this.colorId_;
- },
-
- get title() {
- return this.title_;
- },
-
- get stageTitle() {
- return this.stageTitle_;
- },
-
- get initiatorTitle() {
- return this.initiatorTitle_;
- }
- };
-
- return {
- StubExpectation: StubExpectation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/user_expectation.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/user_expectation.html
deleted file mode 100644
index 8f40ae0234c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/user_expectation.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range_utils.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/compound_event_selection_state.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/timed_event.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- var CompoundEventSelectionState = tr.model.CompoundEventSelectionState;
-
- function UserExpectation(parentModel, initiatorType, start, duration) {
- tr.model.TimedEvent.call(this, start);
- this.associatedEvents = new tr.model.EventSet();
- this.duration = duration;
- this.initiatorType_ = initiatorType;
- this.parentModel = parentModel;
- this.typeInfo_ = undefined;
-
- // sourceEvents are the ones that caused the UserModelBuilder to create this
- // UserExpectation.
- this.sourceEvents = new tr.model.EventSet();
- }
-
- // Strings used to name IRs.
- var INITIATOR_TYPE = {
- KEYBOARD: 'Keyboard',
- MOUSE: 'Mouse',
- MOUSE_WHEEL: 'MouseWheel',
- TAP: 'Tap',
- PINCH: 'Pinch',
- FLING: 'Fling',
- TOUCH: 'Touch',
- SCROLL: 'Scroll',
- CSS: 'CSS',
- WEBGL: 'WebGL',
- VIDEO: 'Video'
- };
-
- UserExpectation.prototype = {
- __proto__: tr.model.TimedEvent.prototype,
-
- computeCompoundEvenSelectionState: function(selection) {
- var cess = CompoundEventSelectionState.NOT_SELECTED;
- if (selection.contains(this))
- cess |= CompoundEventSelectionState.EVENT_SELECTED;
-
- if (this.associatedEvents.intersectionIsEmpty(selection))
- return cess;
-
- var allContained = this.associatedEvents.every(function(event) {
- return selection.contains(event);
- });
-
- if (allContained)
- cess |= CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED;
- else
- cess |= CompoundEventSelectionState.SOME_ASSOCIATED_EVENTS_SELECTED;
- return cess;
- },
-
- // Returns samples which are overlapping with V8.Execute
- get associatedSamples() {
- var samples = new tr.model.EventSet();
- this.associatedEvents.forEach(function(event) {
- if (event instanceof tr.model.ThreadSlice)
- samples.addEventSet(event.overlappingSamples);
- });
- return samples;
- },
-
- get userFriendlyName() {
- return this.title + ' User Expectation at ' +
- tr.b.Unit.byName.timeStampInMs.format(this.start);
- },
-
- get stableId() {
- return ('UserExpectation.' + this.guid);
- },
-
- get typeInfo() {
- if (!this.typeInfo_) {
- this.typeInfo_ = UserExpectation.subTypes.findTypeInfo(
- this.constructor);
- }
-
- // If you set Subclass.prototype = {}, then you must explicitly specify
- // constructor in that prototype object!
- // http://javascript.info/tutorial/constructor
-
- if (!this.typeInfo_)
- throw new Error('Unregistered UserExpectation');
-
- return this.typeInfo_;
- },
-
- get colorId() {
- return this.typeInfo.metadata.colorId;
- },
-
- get stageTitle() {
- return this.typeInfo.metadata.stageTitle;
- },
-
- get initiatorType() {
- return this.initiatorType_;
- },
-
- get title() {
- if (!this.initiatorType)
- return this.stageTitle;
-
- return this.initiatorType + ' ' + this.stageTitle;
- },
-
- /**
- * Returns the sum of the number of CPU ms spent by this UserExpectation.
- */
- get totalCpuMs() {
- var cpuMs = 0;
- this.associatedEvents.forEach(function(event) {
- if (event.cpuSelfTime)
- cpuMs += event.cpuSelfTime;
- });
- return cpuMs;
- }
- };
-
- var subTypes = {};
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- tr.b.decorateExtensionRegistry(subTypes, options);
-
- subTypes.addEventListener('will-register', function(e) {
- var metadata = e.typeInfo.metadata;
-
- if (metadata.stageTitle === undefined) {
- throw new Error('Registered UserExpectations must provide ' +
- 'stageTitle');
- }
-
- if (metadata.colorId === undefined) {
- throw new Error('Registered UserExpectations must provide ' +
- 'colorId');
- }
- });
-
- tr.model.EventRegistry.register(
- UserExpectation,
- {
- name: 'userExpectation',
- pluralName: 'userExpectations',
- subTypes: subTypes
- });
-
- return {
- UserExpectation: UserExpectation,
- INITIATOR_TYPE: INITIATOR_TYPE
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/user_model/user_model.html b/chromium/third_party/catapult/tracing/tracing/model/user_model/user_model.html
deleted file mode 100644
index 07d73f3e5e0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/user_model/user_model.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_container.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model.um', function() {
- function UserModel(parentModel) {
- tr.model.EventContainer.call(this);
- this.parentModel_ = parentModel;
- this.expectations_ = new tr.model.EventSet();
- }
-
- UserModel.prototype = {
- __proto__: tr.model.EventContainer.prototype,
-
- get stableId() {
- return 'UserModel';
- },
-
- get parentModel() {
- return this.parentModel_;
- },
-
- sortExpectations: function() {
- this.expectations_.sortEvents((x, y) => (x.start - y.start));
- },
-
- get expectations() {
- return this.expectations_;
- },
-
- shiftTimestampsForward: function(amount) {
- },
-
- addCategoriesToDict: function(categoriesDict) {
- },
-
- childEvents: function*() {
- yield * this.expectations;
- },
-
- childEventContainers: function*() {
- },
-
- updateBounds: function() {
- this.bounds.reset();
- this.expectations.forEach(function(expectation) {
- expectation.addBoundsToRange(this.bounds);
- }, this);
- }
- };
-
- return {
- UserModel: UserModel
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/vm_region.html b/chromium/third_party/catapult/tracing/tracing/model/vm_region.html
deleted file mode 100644
index 45ce7f37206..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/vm_region.html
+++ /dev/null
@@ -1,389 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides classes for representing and classifying VM regions.
- *
- * See https://goo.gl/5SSPv0 for more details.
- */
-tr.exportTo('tr.model', function() {
-
- /**
- * A single virtual memory region (also called a memory map).
- *
- * @constructor
- */
- function VMRegion(startAddress, sizeInBytes, protectionFlags,
- mappedFile, byteStats) {
- this.startAddress = startAddress;
- this.sizeInBytes = sizeInBytes;
- this.protectionFlags = protectionFlags;
- this.mappedFile = mappedFile || '';
- this.byteStats = byteStats || {};
- };
-
- VMRegion.PROTECTION_FLAG_READ = 4;
- VMRegion.PROTECTION_FLAG_WRITE = 2;
- VMRegion.PROTECTION_FLAG_EXECUTE = 1;
- VMRegion.PROTECTION_FLAG_MAYSHARE = 128;
-
- VMRegion.prototype = {
- get uniqueIdWithinProcess() {
- // This value is assumed to be unique within a process.
- return this.mappedFile + '#' + this.startAddress;
- },
-
- get protectionFlagsToString() {
- if (this.protectionFlags === undefined)
- return undefined;
- return (
- (this.protectionFlags & VMRegion.PROTECTION_FLAG_READ ? 'r' : '-') +
- (this.protectionFlags & VMRegion.PROTECTION_FLAG_WRITE ? 'w' : '-') +
- (this.protectionFlags & VMRegion.PROTECTION_FLAG_EXECUTE ?
- 'x' : '-') +
- (this.protectionFlags & VMRegion.PROTECTION_FLAG_MAYSHARE ? 's' : 'p')
- );
- }
- };
-
- VMRegion.fromDict = function(dict) {
- return new VMRegion(
- dict.startAddress,
- dict.sizeInBytes,
- dict.protectionFlags,
- dict.mappedFile,
- dict.byteStats);
- };
-
- /**
- * Node in a VM region classification tree.
- *
- * Note: Most users of this class should use the
- * VMRegionClassificationNode.fromRegions static method instead of this
- * constructor because it leads to better performance due to fewer memory
- * allocations.
- *
- * @constructor
- */
- function VMRegionClassificationNode(opt_rule) {
- this.rule_ = opt_rule || VMRegionClassificationNode.CLASSIFICATION_RULES;
-
- // True iff this node or any of its descendant classification nodes has at
- // least one classified VM region.
- this.hasRegions = false;
-
- // Total virtual size and byte stats of all regions matching this node's
- // rule (including its sub-rules).
- this.sizeInBytes = undefined;
- this.byteStats = {};
-
- // Array of child classification nodes if this is an intermediate node.
- this.children_ = undefined;
-
- // Array of VM regions. If this is an intermediate node, then the regions
- // are cached for lazy tree construction (i.e. its child classification
- // nodes yet have to be built).
- this.regions_ = [];
- }
-
- /**
- * Rules for classifying memory maps.
- *
- * These rules are derived from core/jni/android_os_Debug.cpp in Android.
- */
- VMRegionClassificationNode.CLASSIFICATION_RULES = {
- name: 'Total',
- children: [
- {
- name: 'Android',
- file: /^\/dev\/ashmem(?!\/libc malloc)/,
- children: [
- {
- name: 'Java runtime',
- file: /^\/dev\/ashmem\/dalvik-/,
- children: [
- {
- name: 'Spaces',
- file: /\/dalvik-(alloc|main|large object|non moving|zygote) space/, // @suppress longLineCheck
- children: [
- {
- name: 'Normal',
- file: /\/dalvik-(alloc|main)/
- },
- {
- name: 'Large',
- file: /\/dalvik-large object/
- },
- {
- name: 'Zygote',
- file: /\/dalvik-zygote/
- },
- {
- name: 'Non-moving',
- file: /\/dalvik-non moving/
- }
- ]
- },
- {
- name: 'Linear Alloc',
- file: /\/dalvik-LinearAlloc/
- },
- {
- name: 'Indirect Reference Table',
- file: /\/dalvik-indirect.ref/
- },
- {
- name: 'Cache',
- file: /\/dalvik-jit-code-cache/
- },
- {
- name: 'Accounting'
- }
- ]
- },
- {
- name: 'Cursor',
- file: /\/CursorWindow/
- },
- {
- name: 'Ashmem'
- }
- ]
- },
- {
- name: 'Native heap',
- file: /^((\[heap\])|(\[anon:)|(\/dev\/ashmem\/libc malloc)|(\[discounted tracing overhead\])|$)/ // @suppress longLineCheck
- },
- {
- name: 'Stack',
- file: /^\[stack/
- },
- {
- name: 'Files',
- file: /\.((((jar)|(apk)|(ttf)|(odex)|(oat)|(art))$)|(dex)|(so))/,
- children: [
- {
- name: 'so',
- file: /\.so/
- },
- {
- name: 'jar',
- file: /\.jar$/
- },
- {
- name: 'apk',
- file: /\.apk$/
- },
- {
- name: 'ttf',
- file: /\.ttf$/
- },
- {
- name: 'dex',
- file: /\.((dex)|(odex$))/
- },
- {
- name: 'oat',
- file: /\.oat$/
- },
- {
- name: 'art',
- file: /\.art$/
- }
- ]
- },
- {
- name: 'Devices',
- file: /(^\/dev\/)|(anon_inode:dmabuf)/,
- children: [
- {
- name: 'GPU',
- file: /\/((nv)|(mali)|(kgsl))/
- },
- {
- name: 'DMA',
- file: /anon_inode:dmabuf/
- }
- ]
- }
- ]
- };
- VMRegionClassificationNode.OTHER_RULE = { name: 'Other' };
-
- VMRegionClassificationNode.fromRegions = function(regions, opt_rules) {
- var tree = new VMRegionClassificationNode(opt_rules);
- tree.regions_ = regions;
- for (var i = 0; i < regions.length; i++)
- tree.addStatsFromRegion_(regions[i]);
- return tree;
- };
-
- VMRegionClassificationNode.prototype = {
- get title() {
- return this.rule_.name;
- },
-
- get children() {
- if (this.isLeafNode)
- return undefined; // Leaf nodes don't have children (by definition).
- if (this.children_ === undefined)
- this.buildTree_(); // Lazily classify VM regions.
- return this.children_;
- },
-
- get regions() {
- if (!this.isLeafNode) {
- // Intermediate nodes only temporarily cache VM regions for lazy tree
- // construction.
- return undefined;
- }
- return this.regions_;
- },
-
- get allRegionsForTesting() {
- if (this.regions_ !== undefined) {
- if (this.children_ !== undefined) {
- throw new Error('Internal error: a VM region classification node ' +
- 'cannot have both regions and children');
- }
- // Leaf node (or caching internal node).
- return this.regions_;
- }
-
- // Intermediate node.
- var regions = [];
- this.children_.forEach(function(childNode) {
- regions = regions.concat(childNode.allRegionsForTesting);
- });
- return regions;
- },
-
- get isLeafNode() {
- var children = this.rule_.children;
- return children === undefined || children.length === 0;
- },
-
- addRegion: function(region) {
- this.addRegionRecursively_(region, true /* addStatsToThisNode */);
- },
-
- someRegion: function(fn, opt_this) {
- if (this.regions_ !== undefined) {
- // Leaf node (or caching internal node).
- return this.regions_.some(fn, opt_this);
- }
-
- // Intermediate node.
- return this.children_.some(function(childNode) {
- return childNode.someRegion(fn, opt_this);
- });
- },
-
- addRegionRecursively_: function(region, addStatsToThisNode) {
- if (addStatsToThisNode)
- this.addStatsFromRegion_(region);
-
- if (this.regions_ !== undefined) {
- if (this.children_ !== undefined) {
- throw new Error('Internal error: a VM region classification node ' +
- 'cannot have both regions and children');
- }
- // Leaf node or an intermediate node caching VM regions (add the
- // region to this node and don't classify further).
- this.regions_.push(region);
- return;
- }
-
- // Non-leaf rule (classify region row further down the tree).
- function regionRowMatchesChildNide(child) {
- var fileRegExp = child.rule_.file;
- if (fileRegExp === undefined)
- return true;
- return fileRegExp.test(region.mappedFile);
- }
-
- var matchedChild = tr.b.findFirstInArray(
- this.children_, regionRowMatchesChildNide);
- if (matchedChild === undefined) {
- // Region belongs to the 'Other' node (created lazily).
- if (this.children_.length !== this.rule_.children.length)
- throw new Error('Internal error');
- matchedChild = new VMRegionClassificationNode(
- VMRegionClassificationNode.OTHER_RULE);
- this.children_.push(matchedChild);
- }
-
- matchedChild.addRegionRecursively_(region, true);
- },
-
- buildTree_: function() {
- var cachedRegions = this.regions_;
- this.regions_ = undefined;
-
- this.buildChildNodesRecursively_();
- for (var i = 0; i < cachedRegions.length; i++) {
- // Note that we don't add the VM region's stats to this node because
- // they have already been added to it.
- this.addRegionRecursively_(
- cachedRegions[i], false /* addStatsToThisNode */);
- }
- },
-
- buildChildNodesRecursively_: function() {
- if (this.children_ !== undefined) {
- throw new Error(
- 'Internal error: Classification node already has children');
- }
- if (this.regions_ !== undefined && this.regions_.length !== 0) {
- throw new Error(
- 'Internal error: Classification node should have no regions');
- }
-
- if (this.isLeafNode)
- return; // Leaf node: Nothing to do.
-
- // Intermediate node: Clear regions and build children recursively.
- this.regions_ = undefined;
- this.children_ = this.rule_.children.map(function(childRule) {
- var child = new VMRegionClassificationNode(childRule);
- child.buildChildNodesRecursively_();
- return child;
- });
- },
-
- addStatsFromRegion_: function(region) {
- this.hasRegions = true;
-
- // Aggregate virtual size.
- var regionSizeInBytes = region.sizeInBytes;
- if (regionSizeInBytes !== undefined)
- this.sizeInBytes = (this.sizeInBytes || 0) + regionSizeInBytes;
-
- // Aggregate byte stats.
- var thisByteStats = this.byteStats;
- var regionByteStats = region.byteStats;
- for (var byteStatName in regionByteStats) {
- var regionByteStatValue = regionByteStats[byteStatName];
- if (regionByteStatValue === undefined)
- continue;
- thisByteStats[byteStatName] =
- (thisByteStats[byteStatName] || 0) + regionByteStatValue;
- }
- }
- };
-
- return {
- VMRegion: VMRegion,
- VMRegionClassificationNode: VMRegionClassificationNode
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/vm_region_test.html b/chromium/third_party/catapult/tracing/tracing/model/vm_region_test.html
deleted file mode 100644
index a57c0e9d039..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/vm_region_test.html
+++ /dev/null
@@ -1,1071 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var checkVMRegions = tr.model.MemoryDumpTestUtils.checkVMRegions;
-
- function checkProtectionFlagsToString(protectionFlags, expectedString) {
- var vmRegion = VMRegion.fromDict({
- startAddress: 256,
- sizeInBytes: 336,
- protectionFlags: protectionFlags,
- mappedFile: '[stack:20310]',
- byteStats: {
- privateDirtyResident: 96,
- swapped: 144,
- proportionalResident: 158
- }
- });
- assert.strictEqual(vmRegion.protectionFlagsToString, expectedString);
- }
-
- var TEST_RULES = {
- name: 'Root',
- children: [
- {
- name: 'Words',
- file: /^[a-zA-Z]/,
- children: [
- {
- name: 'A-D',
- file: /^[a-dA-D]/
- },
- {
- name: 'E-H',
- file: /^[e-hE-H]/
- }
- ]
- },
- {
- name: 'Digits',
- file: /\d$/,
- children: []
- }
- ]
- };
-
- // Constant representing the expectation that the children of a
- // VMRegionClassificationNode have not been built yet.
- var CHILDREN_NOT_BUILT_YET = {};
-
- function checkTree(node, expectedStructure) {
- assert.strictEqual(node.title, expectedStructure.title);
- assert.strictEqual(node.hasRegions, expectedStructure.hasRegions);
- assert.strictEqual(node.sizeInBytes, expectedStructure.sizeInBytes);
- assert.deepEqual(node.byteStats, expectedStructure.byteStats || {});
- assert.strictEqual(node.isLeafNode, expectedStructure.isLeafNode);
-
- var actualRegions = node.regions;
- var expectedRegions = expectedStructure.regions;
- if (expectedRegions === undefined) {
- assert.isUndefined(actualRegions);
- } else {
- assert.instanceOf(actualRegions, Array);
- checkVMRegions(actualRegions, expectedRegions);
- }
-
- var expectedChildren = expectedStructure.children;
- if (expectedChildren === CHILDREN_NOT_BUILT_YET) {
- assert.isUndefined(node.children_);
- } else if (expectedChildren === undefined) {
- assert.isUndefined(node.children);
- } else {
- var actualChildrenMap = new Map();
- node.children.forEach(function(childNode) {
- actualChildrenMap.set(childNode.title, childNode);
- });
- var expectedChildrenMap = new Map();
- expectedChildren.forEach(function(childNode) {
- expectedChildrenMap.set(childNode.title, childNode);
- });
- assert.strictEqual(actualChildrenMap.size, expectedChildrenMap.size);
- for (var title of expectedChildrenMap.keys()) {
- checkTree(actualChildrenMap.get(title),
- expectedChildrenMap.get(title));
- }
- }
- }
-
- function checkClassificationRules(mappedFile, expectedPath) {
- var region = VMRegion.fromDict({
- mappedFile: mappedFile,
- sizeInBytes: 16,
- byteStats: {
- privateDirtyResident: 7
- }
- });
- var node = VMRegionClassificationNode.fromRegions([region]);
- expectedPath.forEach(function(title) {
- node = tr.b.findFirstInArray(node.children, function(childNode) {
- return childNode.title === title;
- });
- });
- assert.deepEqual(node.regions, [region]);
- }
-
- test('vmRegion_protectionFlagsToString', function() {
- checkProtectionFlagsToString(undefined, undefined);
- checkProtectionFlagsToString(0, '---p');
- checkProtectionFlagsToString(VMRegion.PROTECTION_FLAG_READ, 'r--p');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_MAYSHARE,
- 'r--s');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_EXECUTE,
- 'r-xp');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_WRITE,
- 'rw-p');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_WRITE |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- 'rwxp');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_WRITE |
- VMRegion.PROTECTION_FLAG_MAYSHARE,
- 'rw-s');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_EXECUTE |
- VMRegion.PROTECTION_FLAG_MAYSHARE,
- 'r-xs');
- checkProtectionFlagsToString(
- VMRegion.PROTECTION_FLAG_READ | VMRegion.PROTECTION_FLAG_WRITE |
- VMRegion.PROTECTION_FLAG_EXECUTE |
- VMRegion.PROTECTION_FLAG_MAYSHARE,
- 'rwxs');
- });
-
- // The add(After|Before)Build tests below check that the classification tree
- // has the correct structure regardless of the ordering of adding regions and
- // the lazy construction.
-
- test('vmRegionClassificationNode_constructor_addAfterBuild', function() {
- var rootNode = new VMRegionClassificationNode(TEST_RULES);
-
- // Check the root node and verify that the full tree structure has *not*
- // been constructed yet.
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: false,
- isLeafNode: false,
- children: CHILDREN_NOT_BUILT_YET
- });
-
- // Reading the children of the root node *should* trigger building the
- // full tree.
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: false,
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: false,
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- }
- ]
- });
-
- // Add VM regions to the tree *after* it has been fully built.
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: 'W2', // Root/Words/Other.
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }));
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '__42', // Root/Digits.
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }));
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32 + 33,
- privateDirtyResident: 77,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'Other',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: 'W2',
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }
- ]
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }
- ]
- }
- ]
- });
- });
-
- test('vmRegionClassificationNode_constructor_addBeforeBuild', function() {
- var rootNode = new VMRegionClassificationNode(TEST_RULES);
-
- // Add regions to the tree *before* it has been fully built. This should
- // *not* trigger building the full tree (but the total sizeInBytes and
- // byteStats should be updated accordingly).
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '__42', // Root/Digits.
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }));
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: 'W2', // Root/Words/Other.
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }));
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32 + 33,
- privateDirtyResident: 77,
- swapped: 64
- },
- isLeafNode: false,
- children: CHILDREN_NOT_BUILT_YET
- });
-
- // Reading the children of the root node should trigger building the full
- // tree.
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32 + 33,
- privateDirtyResident: 77,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'Other',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: 'W2',
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }
- ]
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }
- ]
- }
- ]
- });
-
- // Add more VM regions *after* the tree has been fully built.
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '%invalid%', // Root/Other.
- sizeInBytes: 123
- }));
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '__43', // Root/Digits.
- byteStats: {
- swapped: 19
- }
- }));
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: 'free', // Root/Words/E-H.
- sizeInBytes: undefined
- }));
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 16 + 123,
- byteStats: {
- proportionalResident: 32 + 33,
- privateDirtyResident: 77,
- swapped: 64 + 19,
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: true,
- isLeafNode: true,
- regions: [
- {
- mappedFile: 'free'
- }
- ]
- },
- {
- title: 'Other',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: 'W2',
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }
- ]
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77,
- swapped: 19
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- },
- {
- mappedFile: '__43',
- byteStats: {
- swapped: 19
- }
- }
- ]
- },
- {
- title: 'Other',
- hasRegions: true,
- sizeInBytes: 123,
- isLeafNode: true,
- regions: [
- {
- mappedFile: '%invalid%',
- sizeInBytes: 123
- }
- ]
- }
- ]
- });
- });
-
- test('vmRegionClassificationNode_fromRegions_addAfterBuild', function() {
- // Construct the root node from a list of regions. This should *not*
- // trigger building the full tree (but the total sizeInBytes and byteStats
- // should be updated accordingly).
- var rootNode = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- mappedFile: '__42', // Root/Digits.
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }),
- VMRegion.fromDict({
- mappedFile: '__43', // Root/Digits.
- byteStats: {
- swapped: 19
- }
- })
- ], TEST_RULES);
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77,
- swapped: 19
- },
- isLeafNode: false,
- children: CHILDREN_NOT_BUILT_YET
- });
-
- // Reading the children of the root node should trigger building the full
- // tree.
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77,
- swapped: 19
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: false,
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77,
- swapped: 19
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- },
- {
- mappedFile: '__43',
- byteStats: {
- swapped: 19
- }
- }
- ]
- }
- ]
- });
-
- // Add more VM regions *after* the tree has been fully built.
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: 'W2', // Root/Words/Other.
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }));
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32 + 33,
- privateDirtyResident: 77,
- swapped: 19 + 64,
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'Other',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: 'W2',
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }
- ]
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77,
- swapped: 19
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- },
- {
- mappedFile: '__43',
- byteStats: {
- swapped: 19
- }
- }
- ]
- }
- ]
- });
- });
-
- test('vmRegionClassificationNode_fromRegions_addBeforeBuild', function() {
- // Construct the root node from a list of regions and then add another
- // region. This should *not* trigger building the full tree (but the total
- // sizeInBytes and byteStats should be updated accordingly).
- var rootNode = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- mappedFile: '__42', // Root/Digits.
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }),
- VMRegion.fromDict({
- mappedFile: '__43', // Root/Digits.
- byteStats: {
- swapped: 19
- }
- })
- ], TEST_RULES);
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '__42', // Root/Digits.
- startAddress: 2048, // Necessary to distinguish from the first region.
- sizeInBytes: 1000,
- byteStats: {
- privateDirtyResident: 500
- }
- }));
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 1000,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77 + 500,
- swapped: 19
- },
- isLeafNode: false,
- children: CHILDREN_NOT_BUILT_YET
- });
-
- // Reading the children of the root node should trigger building the full
- // tree.
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 1000,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77 + 500,
- swapped: 19
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: false,
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- sizeInBytes: 1000,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77 + 500,
- swapped: 19
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- },
- {
- mappedFile: '__43',
- byteStats: {
- swapped: 19
- }
- },
- {
- mappedFile: '__42',
- startAddress: 2048,
- sizeInBytes: 1000,
- byteStats: {
- privateDirtyResident: 500
- }
- }
- ]
- }
- ]
- });
-
- // Add more VM regions *after* the tree has been fully built.
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: 'W2', // Root/Words/Other.
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }));
- checkTree(rootNode, {
- title: 'Root',
- hasRegions: true,
- sizeInBytes: 1000 + 16,
- byteStats: {
- proportionalResident: 32 + 33,
- privateDirtyResident: 500 + 77,
- swapped: 19 + 64,
- },
- isLeafNode: false,
- children: [
- {
- title: 'Words',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: false,
- children: [
- {
- title: 'A-D',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'E-H',
- hasRegions: false,
- isLeafNode: true,
- regions: []
- },
- {
- title: 'Other',
- hasRegions: true,
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: 'W2',
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }
- ]
- }
- ]
- },
- {
- title: 'Digits',
- hasRegions: true,
- sizeInBytes: 1000,
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 500 + 77,
- swapped: 19
- },
- isLeafNode: true,
- regions: [
- {
- mappedFile: '__42',
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- },
- {
- mappedFile: '__43',
- byteStats: {
- swapped: 19
- }
- },
- {
- mappedFile: '__42',
- startAddress: 2048,
- sizeInBytes: 1000,
- byteStats: {
- privateDirtyResident: 500
- }
- }
- ]
- }
- ]
- });
- });
-
- test('vmRegionClassificationNode_someRegion', function() {
- var rootNode = new VMRegionClassificationNode(TEST_RULES);
-
- // There are no regions in the tree, so the method should always return
- // false.
- assert.isFalse(rootNode.someRegion(function(region) {
- throw new Error('There are no regions in the tree!!!');
- }));
-
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: 'W2', // Root/Words/Other.
- sizeInBytes: 16,
- byteStats: {
- proportionalResident: 32,
- swapped: 64
- }
- }));
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '__42', // Root/Digits.
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }));
- rootNode.addRegion(VMRegion.fromDict({
- mappedFile: '__43', // Root/Digits.
- byteStats: {
- proportionalResident: 33,
- privateDirtyResident: 77
- }
- }));
-
- function checkSomeRegion() {
- // Find the order in which the regions are traversed and checked that all
- // regions were visited.
- var visitedRegionMappedFiles = [];
- assert.isFalse(rootNode.someRegion(function(region) {
- visitedRegionMappedFiles.push(region.mappedFile);
- return false;
- }));
- assert.lengthOf(visitedRegionMappedFiles, 3);
- assert.sameMembers(visitedRegionMappedFiles, ['W2', '__42', '__43']);
-
- // Assuming the traversal order is deterministic, we check that once the
- // callback returns true, no further regions are visited.
- visitedRegionMappedFiles.forEach(
- function(mappedFileToMatch, index) {
- var visitedRegionMappedFiles2 = [];
- assert.isTrue(rootNode.someRegion(function(region) {
- this.files.push(region.mappedFile);
- return region.mappedFile === mappedFileToMatch;
- }, { files: visitedRegionMappedFiles2 } /* opt_this */));
- assert.deepEqual(visitedRegionMappedFiles2,
- visitedRegionMappedFiles.slice(0, index + 1));
- });
- }
-
- // Before lazy construction (single node with a flat list of regions).
- checkSomeRegion();
- assert.isUndefined(rootNode.children_);
-
- // After lazy construction (tree of nodes with lists of regions).
- assert.isDefined(rootNode.children); // Force building the tree.
- assert.isDefined(rootNode.children_);
- checkSomeRegion();
- });
-
- test('classificationRules', function() {
- checkClassificationRules('/dev/ashmem/dalvik-main space (deleted)',
- ['Android', 'Java runtime', 'Spaces', 'Normal']);
- checkClassificationRules('/dev/ashmem/dalvik-non moving space',
- ['Android', 'Java runtime', 'Spaces', 'Non-moving']);
- checkClassificationRules('/dev/ashmem/dalvik-zygote space (deleted)',
- ['Android', 'Java runtime', 'Spaces', 'Zygote']);
- checkClassificationRules('/dev/ashmem/dalvik-allocation stack (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules(
- '/dev/ashmem/dalvik-allocspace main rosalloc space 1 live-bitmap 2',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules(
- '/dev/ashmem/dalvik-allocspace non moving space live-bitmap 4',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules('/dev/ashmem/dalvik-allocspace zygote / ' +
- 'non moving space live-bitmap 0 (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules('/dev/ashmem/dalvik-card table (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules('/dev/ashmem/dalvik-large live objects (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules('/dev/ashmem/dalvik-live stack (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules(
- '/dev/ashmem/dalvik-mark sweep sweep array free buffer (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules('/dev/ashmem/dalvik-rosalloc page map (deleted)',
- ['Android', 'Java runtime', 'Accounting']);
- checkClassificationRules('/dev/ashmem/dalvik-indirect ref table (deleted)',
- ['Android', 'Java runtime', 'Indirect Reference Table']);
- checkClassificationRules('/dev/ashmem/dalvik-LinearAlloc (deleted)',
- ['Android', 'Java runtime', 'Linear Alloc']);
- checkClassificationRules('/dev/ashmem/dalvik-jit-code-cache (deleted)',
- ['Android', 'Java runtime', 'Cache']);
- checkClassificationRules('/dev/ashmem/CursorWindow (deleted)',
- ['Android', 'Cursor']);
- checkClassificationRules('/dev/ashmem (deleted)', ['Android', 'Ashmem']);
- checkClassificationRules('/dev/ashmem/GFXStats-10082',
- ['Android', 'Ashmem']);
-
- checkClassificationRules('[stack:23164]', ['Stack']);
- checkClassificationRules('[stack]', ['Stack']);
-
- checkClassificationRules('[discounted tracing overhead]', ['Native heap']);
- checkClassificationRules('', ['Native heap']);
- checkClassificationRules('[heap]', ['Native heap']);
- checkClassificationRules('[anon:libc_malloc]', ['Native heap']);
- checkClassificationRules('[anon:thread signal stack]', ['Native heap']);
- checkClassificationRules('/dev/ashmem/libc malloc (deleted)',
- ['Native heap']);
-
- checkClassificationRules('/usr/lib/nvidia-340/libGL.so.331.79',
- ['Files', 'so']);
- checkClassificationRules('/usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.505',
- ['Files', 'so']);
- checkClassificationRules('/data/data/com.google.android.apps.chrome/' +
- 'app_chrome/RELRO:libchrome.so (deleted)', ['Files', 'so']);
- checkClassificationRules(
- '/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf',
- ['Files', 'ttf']);
- checkClassificationRules(
- '/data/app/com.google.android.apps.chrome-2/base.apk',
- ['Files', 'apk']);
- checkClassificationRules(
- '/data/app/com.google.android.apps.chrome-2/lib/arm/libchrome.so',
- ['Files', 'so']);
- checkClassificationRules(
- '/data/app/com.google.android.apps.chrome-2/oat/arm/base.odex',
- ['Files', 'dex']);
- checkClassificationRules(
- '/data/dalvik-cache/arm/system@framework@boot.art', ['Files', 'art']);
- checkClassificationRules(
- '/data/dalvik-cache/arm/system@framework@boot.oat', ['Files', 'oat']);
-
- checkClassificationRules('/dev/nvidia0', ['Devices', 'GPU']);
- checkClassificationRules('/dev/kgsl-3d0', ['Devices', 'GPU']);
- checkClassificationRules('anon_inode:dmabuf', ['Devices', 'DMA']);
- checkClassificationRules('/dev/binder', ['Devices', 'Other']);
-
- checkClassificationRules('/src/out/Release/chrome', ['Other']);
- checkClassificationRules('/tmp/gluY4SVp (deleted)', ['Other']);
- checkClassificationRules('/src/out/Release/resources.pak', ['Other']);
- checkClassificationRules('[vdso]', ['Other']);
- checkClassificationRules('[vsyscall]', ['Other']);
- checkClassificationRules('[vectors]', ['Other']);
- checkClassificationRules('[vvar]', ['Other']);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/model/x_marker_annotation.html b/chromium/third_party/catapult/tracing/tracing/model/x_marker_annotation.html
deleted file mode 100644
index a5bd1e346e2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/model/x_marker_annotation.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/annotation.html">
-<link rel="import" href="/tracing/ui/annotations/x_marker_annotation_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.model', function() {
-
- function XMarkerAnnotation(timestamp) {
- tr.model.Annotation.apply(this, arguments);
-
- this.timestamp = timestamp;
- this.strokeStyle = 'rgba(0, 0, 255, 0.5)';
- }
-
- XMarkerAnnotation.fromDict = function(dict) {
- return new XMarkerAnnotation(dict.args.timestamp);
- }
-
- XMarkerAnnotation.prototype = {
- __proto__: tr.model.Annotation.prototype,
-
- toDict: function() {
- return {
- typeName: 'xmarker',
- args: {
- timestamp: this.timestamp
- }
- };
- },
-
- createView_: function(viewport) {
- return new tr.ui.annotations.XMarkerAnnotationView(viewport, this);
- }
- };
-
- tr.model.Annotation.register(
- XMarkerAnnotation, {typeName: 'xmarker'});
-
- return {
- XMarkerAnnotation: XMarkerAnnotation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/__init__.py b/chromium/third_party/catapult/tracing/tracing/mre/__init__.py
deleted file mode 100644
index 50b23dff631..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/cloud_storage.py b/chromium/third_party/catapult/tracing/tracing/mre/cloud_storage.py
deleted file mode 100644
index 877ddaa0645..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/cloud_storage.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import os
-import subprocess
-import sys
-
-_GSUTIL_PATH = os.path.abspath(
- os.path.join(
- os.path.dirname(__file__),
- '..', '..', 'third_party', 'gsutil', 'gsutil'))
-
-
-class CloudStorageError(Exception):
-
- @staticmethod
- def _GetConfigInstructions():
- command = _GSUTIL_PATH
- return ('To configure your credentials:\n'
- ' 1. Run "%s config" and follow its instructions.\n'
- ' 2. If you have a @google.com account, use that account.\n'
- ' 3. For the project-id, just enter 0.' % command)
-
-
-class PermissionError(CloudStorageError):
-
- def __init__(self):
- super(PermissionError, self).__init__(
- 'Attempted to access a file from Cloud Storage but you don\'t '
- 'have permission. ' + self._GetConfigInstructions())
-
-
-class CredentialsError(CloudStorageError):
-
- def __init__(self):
- super(CredentialsError, self).__init__(
- 'Attempted to access a file from Cloud Storage but you have no '
- 'configured credentials. ' + self._GetConfigInstructions())
-
-
-class NotFoundError(CloudStorageError):
- pass
-
-
-class ServerError(CloudStorageError):
- pass
-
-
-def Copy(src, dst):
- # TODO(simonhatch): switch to use py_utils.cloud_storage.
- args = [sys.executable, _GSUTIL_PATH, 'cp', src, dst]
- gsutil = subprocess.Popen(args, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- _, stderr = gsutil.communicate()
-
- if gsutil.returncode:
- if stderr.startswith((
- 'You are attempting to access protected data with no configured',
- 'Failure: No handler was ready to authenticate.')):
- raise CredentialsError()
- if ('status=403' in stderr or 'status 403' in stderr or
- '403 Forbidden' in stderr):
- raise PermissionError()
- if (stderr.startswith('InvalidUriError') or 'No such object' in stderr or
- 'No URLs matched' in stderr or
- 'One or more URLs matched no' in stderr):
- raise NotFoundError(stderr)
- if '500 Internal Server Error' in stderr:
- raise ServerError(stderr)
- raise CloudStorageError(stderr)
- return gsutil.returncode
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/corpus_driver.py b/chromium/third_party/catapult/tracing/tracing/mre/corpus_driver.py
deleted file mode 100644
index 28bb8a208b7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/corpus_driver.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-class CorpusDriver(object):
-
- def GetTraceHandles(self):
- raise NotImplementedError()
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/corpus_driver_cmdline.py b/chromium/third_party/catapult/tracing/tracing/mre/corpus_driver_cmdline.py
deleted file mode 100644
index 06d70ba8f68..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/corpus_driver_cmdline.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-from tracing.mre import local_directory_corpus_driver
-
-
-_CORPUS_DRIVERS = {
- 'local-directory': {
- 'description': 'Use traces from a local directory.',
- 'class': local_directory_corpus_driver.LocalDirectoryCorpusDriver
- }
-}
-_CORPUS_DRIVER_DEFAULT = 'local-directory'
-
-
-def GetCorpusDriver(parser, args):
- # With parse_known_args, optional arguments aren't guaranteed to be there so
- # we need to check if it's there, and use the default otherwise.
- corpus = _CORPUS_DRIVER_DEFAULT
-
- cls = _CORPUS_DRIVERS[corpus]['class']
- init_args = cls.CheckAndCreateInitArguments(parser, args)
- return cls(**init_args)
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/failure.html b/chromium/third_party/catapult/tracing/tracing/mre/failure.html
deleted file mode 100644
index 39b8460e49e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/failure.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
- function Failure(job, functionHandleString, traceCanonicalUrl,
- failureTypeName, description, stack) {
- this.job = job;
- this.functionHandleString = functionHandleString;
- this.traceCanonicalUrl = traceCanonicalUrl;
- this.failureTypeName = failureTypeName;
- this.description = description;
- this.stack = stack;
- }
-
- Failure.prototype = {
- asDict: function() {
- // TODO(eakuefner): Serialize job once reduction is implemented.
- return {
- function_handle_string: this.functionHandleString,
- trace_canonical_url: this.traceCanonicalUrl,
- type: this.failureTypeName,
- description: this.description,
- stack: this.stack
- };
- }
- };
-
- Failure.fromDict = function(failureDict) {
- return new Failure(undefined, failureDict.function_handle_string,
- failureDict.trace_canonical_url, failureDict.type,
- failureDict.description, failureDict.stack);
- };
-
- return {
- Failure: Failure
- };
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/failure.py b/chromium/third_party/catapult/tracing/tracing/mre/failure.py
deleted file mode 100644
index 8c0713e1d8b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/failure.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from tracing.mre import job as job_module
-
-
-class Failure(object):
-
- def __init__(self, job, function_handle_string, trace_canonical_url,
- failure_type_name, description, stack):
- assert isinstance(job, job_module.Job)
-
- self.job = job
- self.function_handle_string = function_handle_string
- self.trace_canonical_url = trace_canonical_url
- self.failure_type_name = failure_type_name
- self.description = description
- self.stack = stack
-
- def __str__(self):
- return (
- 'Failure for job %s with function handle %s and trace handle %s:\n'
- 'of type %s wtih description %s. Stack:\n\n%s' % (
- self.job.guid, self.function_handle_string,
- self.trace_canonical_url, self.failure_type_name,
- self.description, self.stack))
-
- def AsDict(self):
- return {
- 'job_guid': str(self.job.guid),
- 'function_handle_string': self.function_handle_string,
- 'trace_canonical_url': self.trace_canonical_url,
- 'type': self.failure_type_name,
- 'description': self.description,
- 'stack': self.stack
- }
-
- @staticmethod
- def FromDict(failure_dict, job, failure_names_to_constructors=None):
- if failure_names_to_constructors is None:
- failure_names_to_constructors = {}
- failure_type_name = failure_dict['type']
- if failure_type_name in failure_names_to_constructors:
- cls = failure_names_to_constructors[failure_type_name]
- else:
- cls = Failure
-
- return cls(job,
- failure_dict['function_handle_string'],
- failure_dict['trace_canonical_url'],
- failure_type_name, failure_dict['description'],
- failure_dict['stack'])
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/failure_test.html b/chromium/third_party/catapult/tracing/tracing/mre/failure_test.html
deleted file mode 100644
index 6a76da0a0b7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/failure_test.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/mre/failure.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('failureAsDictTest', function() {
- var failure = new tr.mre.Failure(undefined, 'foo.html:Foo',
- 'file://foo.html', 'err', 'desc', 'stack');
-
- assert.deepEqual(failure.asDict(), {
- function_handle_string: 'foo.html:Foo',
- trace_canonical_url: 'file://foo.html',
- type: 'err',
- description: 'desc',
- stack: 'stack'
- });
- });
-
- test('failureFromDictTest', function() {
- var failureDict = {
- function_handle_string: 'foo.html:Foo',
- trace_canonical_url: 'file://foo.html',
- type: 'err',
- description: 'desc',
- stack: 'stack'
- };
-
- var failure = tr.mre.Failure.fromDict(failureDict);
-
- assert.equal(failure.functionHandleString, 'foo.html:Foo');
- assert.equal(failure.traceCanonicalUrl, 'file://foo.html');
- assert.equal(failure.failureTypeName, 'err');
- assert.equal(failure.description, 'desc');
- assert.equal(failure.stack, 'stack');
- });
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/failure_unittest.py b/chromium/third_party/catapult/tracing/tracing/mre/failure_unittest.py
deleted file mode 100644
index 1140b17aa66..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/failure_unittest.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from tracing.mre import function_handle
-from tracing.mre import failure as failure_module
-from tracing.mre import job as job_module
-
-
-def _SingleFileFunctionHandle(filename, function_name, guid):
- return function_handle.FunctionHandle(
- modules_to_load=[function_handle.ModuleToLoad(filename=filename)],
- function_name=function_name, guid=guid)
-
-
-class FailureTests(unittest.TestCase):
-
- def testAsDict(self):
- map_function_handle = _SingleFileFunctionHandle('foo.html', 'Foo', '2')
- job = job_module.Job(map_function_handle, '1')
- failure = failure_module.Failure(job, 'foo.html:Foo',
- 'file://foo.html',
- 'err', 'desc', 'stack')
-
- self.assertEquals(failure.AsDict(), {
- 'job_guid': '1',
- 'function_handle_string': 'foo.html:Foo',
- 'trace_canonical_url': 'file://foo.html',
- 'type': 'err',
- 'description': 'desc',
- 'stack': 'stack'
- })
-
- def testFromDict(self):
- map_function_handle = _SingleFileFunctionHandle('foo.html', 'Foo', '2')
- job = job_module.Job(map_function_handle, '1')
-
- failure_dict = {
- 'job_guid': '1',
- 'function_handle_string': 'foo.html:Foo',
- 'trace_canonical_url': 'file://foo.html',
- 'type': 'err',
- 'description': 'desc',
- 'stack': 'stack'
- }
-
- failure = failure_module.Failure.FromDict(failure_dict, job)
-
- self.assertEquals(failure.job.guid, '1')
- self.assertEquals(failure.function_handle_string, 'foo.html:Foo')
- self.assertEquals(failure.trace_canonical_url, 'file://foo.html')
- self.assertEquals(failure.failure_type_name, 'err')
- self.assertEquals(failure.description, 'desc')
- self.assertEquals(failure.stack, 'stack')
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/file_handle.html b/chromium/third_party/catapult/tracing/tracing/mre/file_handle.html
deleted file mode 100644
index 85c1dd18abf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/file_handle.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/extras/full_config.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/model.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
- function FileHandle(canonicalUrl) {
- this.canonicalUrl_ = canonicalUrl;
- }
-
- FileHandle.prototype = {
- get canonicalUrl() { return this.canonicalUrl_; },
-
- asDict: function() {
- var d = {
- canonical_url: this.canonicalUrl_
- };
-
- this._asDictInto(d);
- if (d.type === undefined)
- throw new Error('_asDictInto must set type field');
- },
-
- load: function() {
- throw new Error('Not implemented');
- }
- };
-
- FileHandle.fromDict = function(handleDict) {
- if (handleDict.type === 'url')
- return URLFileHandle.fromDict(handleDict);
- if (handleDict.type === 'in-memory')
- return InMemoryFileHandle.fromDict(handleDict);
-
- throw new Error('Not implemented: fromDict for ' + handleDict.type);
- };
-
-
- function URLFileHandle(canonicalUrl, urlToLoad) {
- // TODO(eakuefner): assert startswith file://
- FileHandle.call(this, canonicalUrl);
- this.urlToLoad = urlToLoad;
- }
-
- URLFileHandle.prototype = {
- __proto__: FileHandle.prototype,
-
- _asDictInto: function(handleDict) {
- handleDict.urlToLoad = this.urlToLoad;
- handleDict.type = 'url';
- },
-
- load: function() {
- try {
- return tr.b.getSync(this.urlToLoad);
- } catch (ex) {
- var err = new Error('Could not open ' + this.urlToLoad);
- err.name = 'FileLoadingError';
- throw err;
- }
- }
- };
-
-
- URLFileHandle.fromDict = function(handleDict) {
- return new URLFileHandle(handleDict.canonical_url, handleDict.url_to_load);
- };
-
- function InMemoryFileHandle(fileData, canonicalUrl) {
- FileHandle.call(this, canonicalUrl);
- this.fileData = fileData;
- }
-
- InMemoryFileHandle.prototype = {
- __proto__: FileHandle.prototype,
-
- _asDictInto: function(handleDict) {
- handleDict.data = this.fileData;
- handleDict.type = 'in-memory';
- },
-
- load: function() {
- return this.fileData;
- }
- };
-
- InMemoryFileHandle.fromDict = function(handleDict) {
- return new InMemoryFileHandle(
- handleDict.data, handleDict.canonical_url);
- };
-
- return {
- FileHandle: FileHandle,
- URLFileHandle: URLFileHandle,
- InMemoryFileHandle: InMemoryFileHandle,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/file_handle.py b/chromium/third_party/catapult/tracing/tracing/mre/file_handle.py
deleted file mode 100644
index e89b2f348f0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/file_handle.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import contextlib
-import os
-import tempfile
-
-from tracing.mre import cloud_storage
-
-
-class FilePreparationError(Exception):
- """Raised if something goes wrong while preparing a file for processing."""
-
-
-class FileHandle(object):
- def __init__(self, canonical_url):
- self._canonical_url = canonical_url
-
- @property
- def canonical_url(self):
- return self._canonical_url
-
- @contextlib.contextmanager
- def PrepareFileForProcessing(self):
- """Ensure that the URL to the file will be acessible during processing.
-
- This function must do any pre-work to ensure that mappers will
- be able to read from the URL contained in the file handle.
-
- Raises:
- FilePreparationError: If something went wrong while preparing the file.
- """
- yield self._WillProcess()
- self._DidProcess()
-
- def _WillProcess(self):
- raise NotImplementedError()
-
- def _DidProcess(self):
- raise NotImplementedError()
-
-
-class URLFileHandle(FileHandle):
- def __init__(self, canonical_url, url_to_load):
- super(URLFileHandle, self).__init__(canonical_url)
-
- self._url_to_load = url_to_load
-
- def AsDict(self):
- return {
- 'type': 'url',
- 'canonical_url': self._canonical_url,
- 'url_to_load': self._url_to_load
- }
-
- def _WillProcess(self):
- return self
-
- def _DidProcess(self):
- pass
-
-
-class GCSFileHandle(FileHandle):
- def __init__(self, canonical_url, cache_directory):
- super(GCSFileHandle, self).__init__(canonical_url)
- file_name = canonical_url.split('/')[-1]
- self.cache_file = os.path.join(
- cache_directory, file_name + '.gz')
-
- def _WillProcess(self):
- if not os.path.exists(self.cache_file):
- try:
- cloud_storage.Copy(self.canonical_url, self.cache_file)
- except cloud_storage.CloudStorageError:
- return None
- return URLFileHandle(self.canonical_url, 'file://' + self.cache_file)
-
- def _DidProcess(self):
- pass
-
-
-class InMemoryFileHandle(FileHandle):
- def __init__(self, canonical_url, data):
- super(InMemoryFileHandle, self).__init__(canonical_url)
-
- self.data = data
- self._temp_file_path = None
-
- def _WillProcess(self):
- temp_file = tempfile.NamedTemporaryFile(delete=False)
- temp_file.write(self.data)
- temp_file.close()
- self._temp_file_path = temp_file.name
-
- return URLFileHandle(self.canonical_url, 'file://' + self._temp_file_path)
-
- def _DidProcess(self):
- os.remove(self._temp_file_path)
- self._temp_file_path = None
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/function_handle.html b/chromium/third_party/catapult/tracing/tracing/mre/function_handle.html
deleted file mode 100644
index b02889aff06..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/function_handle.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
-
- var FunctionRegistry = {
- allFunctions_: [],
- allFunctionsByName_: {},
- get allFunctions() { return this.allFunctions_; },
- get allFunctionsByName() { return this.allFunctionsByName_; }
- };
-
- FunctionRegistry.getFunction = function(name) {
- return this.allFunctionsByName_[name];
- };
-
- FunctionRegistry.register = function(func) {
- if (func.name === '')
- throw new Error('Registered functions must not be anonymous');
- if (this.allFunctionsByName[func.name] !== undefined)
- throw new Error('Function named ' + func.name + 'is already registered.');
- this.allFunctionsByName[func.name] = func;
- this.allFunctions.push(func);
- };
-
- function ModuleToLoad(href, filename) {
- if ((href !== undefined) ? (filename !== undefined) :
- (filename === undefined)) {
- throw new Error('ModuleToLoad must specify exactly one of href or ' +
- 'filename');
- }
- this.href = href;
- this.filename = filename;
- }
-
- ModuleToLoad.prototype = {
- asDict: function() {
- if (this.href !== undefined)
- return {'href': this.href};
- return {'filename': this.filename};
- },
-
- toString: function() {
- if (this.href !== undefined)
- return 'ModuleToLoad(href="' + this.href + '")';
- return 'ModuleToLoad(filename="' + this.filename + '")';
- }
- };
-
- ModuleToLoad.fromDict = function(moduleDict) {
- return new ModuleToLoad(moduleDict.href, moduleDict.filename);
- };
-
- function FunctionHandle(modulesToLoad, functionName, opt_options) {
- if (!(modulesToLoad instanceof Array))
- throw new Error('modulesToLoad in FunctionHandle must be an array');
- if (typeof(functionName) !== 'string')
- throw new Error('functionName in FunctionHandle must be a string');
- this.modulesToLoad = modulesToLoad;
- this.functionName = functionName;
- this.options_ = opt_options;
- };
-
- FunctionHandle.prototype = {
- get options() {
- return this.options_;
- },
-
- asDict: function() {
- return {
- 'modules_to_load': this.modulesToLoad.map(
- function(m) {return m.asDict();}),
- 'function_name': this.functionName,
- 'options': this.options_
- };
- },
-
- asUserFriendlyString: function() {
- var parts = this.modulesToLoad.map(function(mtl) {return mtl.filename});
- parts.push(this.functionName);
- parts.push(JSON.stringify(this.options_));
- return parts.join(',');
- },
-
- hasHrefs: function() {
- for (var module in this.modulesToLoad) {
- if (this.modulesToLoad[module].href !== undefined) {
- return true;
- }
- }
- return false;
- },
-
- load: function() {
- if (this.hasHrefs()) {
- var err = new Error(
- 'FunctionHandle named ' + this.functionName +
- ' specifies hrefs, which cannot be loaded.');
- err.name = 'FunctionLoadingError';
- throw err;
- }
-
- for (var module in this.modulesToLoad) {
- var filename = this.modulesToLoad[module].filename;
- try {
- HTMLImportsLoader.loadHTMLFile(filename);
- } catch (err) {
- err.name = 'FunctionLoadingError';
- throw err;
- }
- }
-
- var func = FunctionRegistry.getFunction(this.functionName);
- if (func === undefined) {
- var err = new Error(
- 'No registered function named ' + this.functionName);
- err.name = 'FunctionNotDefinedError';
- throw err;
- }
-
- return func;
- },
-
- toString: function() {
- var modulesToLoadStr = this.modulesToLoad.map(function(module) {
- return module.toString();
- });
- return 'FunctionHandle(modulesToLoad=[' + modulesToLoadStr + '], ' +
- 'functionName="' + this.functionName + '", options="' +
- JSON.stringify(this.options_) + '")';
- }
- };
-
- FunctionHandle.loadFromFilename_ = function(filename) {
- try {
- var numFunctionsBefore = FunctionRegistry.allFunctions.length;
- HTMLImportsLoader.loadHTMLFile(filename);
- } catch (err) {
- err.name = 'FunctionLoadingError';
- throw err;
- }
-
- // Verify a new function was registered.
- var numFunctionsNow = FunctionRegistry.allFunctions.length;
- if (numFunctionsNow !== (numFunctionsBefore + 1)) {
- var err = new Error(filename + " didn't call FunctionRegistry.register");
- err.name = 'FunctionNotDefinedError';
- throw err;
- }
-
- return FunctionRegistry.allFunctions[numFunctionsNow - 1];
- };
-
- FunctionHandle.fromDict = function(handleDict) {
- var options = handleDict.options;
- if (handleDict.modules_to_load !== undefined) {
- var modulesToLoad = handleDict.modules_to_load.map(function(module) {
- return ModuleToLoad.fromDict(module);
- });
- }
- return new FunctionHandle(modulesToLoad, handleDict.function_name, options);
- };
-
- return {
- FunctionHandle: FunctionHandle,
- ModuleToLoad: ModuleToLoad,
- FunctionRegistry: FunctionRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/function_handle.py b/chromium/third_party/catapult/tracing/tracing/mre/function_handle.py
deleted file mode 100644
index 1efa5d647a9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/function_handle.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import uuid
-
-
-class AbspathInvalidError(Exception):
- """Raised if an abspath cannot be sanitized based on an app's source paths."""
-
-
-class UserFriendlyStringInvalidError(Exception):
- """Raised if a user friendly string cannot be parsed."""
-
-
-class ModuleToLoad(object):
-
- def __init__(self, href=None, filename=None):
- if bool(href) == bool(filename):
- raise Exception('ModuleToLoad must specify exactly one of href and '
- 'filename.')
- self.href = href
- self.filename = filename
-
- def __repr__(self):
- if self.href:
- return 'ModuleToLoad(href="%s")' % self.href
- return 'ModuleToLoad(filename="%s")' % self.filename
-
- def AsDict(self):
- if self.href:
- return {'href': self.href}
- return {'filename': self.filename}
-
- @staticmethod
- def FromDict(module_dict):
- return ModuleToLoad(module_dict.get('href'), module_dict.get('filename'))
-
-
-class FunctionHandle(object):
-
- def __init__(self, modules_to_load=None, function_name=None,
- options=None, guid=uuid.uuid4()):
- self.modules_to_load = modules_to_load
- self.function_name = function_name
- self.options = options
- self._guid = guid
-
- def __repr__(self):
- return 'FunctionHandle(modules_to_load=[%s], function_name="%s")' % (
- ', '.join([str(module) for module in self.modules_to_load]),
- self.function_name)
-
- @property
- def guid(self):
- return self._guid
-
- @property
- def has_hrefs(self):
- return any(module.href for module in self.modules_to_load)
-
- def AsDict(self):
- handle_dict = {
- 'function_name': self.function_name
- }
-
- if self.modules_to_load is not None:
- handle_dict['modules_to_load'] = [module.AsDict() for module in
- self.modules_to_load]
- if self.options is not None:
- handle_dict['options'] = self.options
-
- return handle_dict
-
- def ConvertHrefsToAbsFilenames(self, app):
- """Converts hrefs to absolute filenames in the context of |app|.
-
- In an app-serving context, functions must only reside in files which the app
- is serving, in order to prevent directory traversal attacks. In addition, we
- rely on paths being absolute when actually executing functions.
-
- Args:
- app: A dev server instance requesting abspath conversion.
-
- Returns:
- A new FunctionHandle instance with no hrefs.
-
- Raises:
- AbspathInvalidError: If there is no source path with which a given abspath
- shares a common prefix.
- """
- new_modules_to_load = []
- for module in self.modules_to_load:
- if module.href:
- abspath = app.GetAbsFilenameForHref(module.href)
- else:
- assert os.path.abspath(module.filename) == module.filename
- abspath = module.filename
-
- if not abspath:
- raise AbspathInvalidError('Filename %s invalid', abspath)
-
- new_modules_to_load.append(ModuleToLoad(filename=abspath))
-
- return FunctionHandle(modules_to_load=new_modules_to_load,
- function_name=self.function_name)
-
- @staticmethod
- def FromDict(handle_dict):
- if handle_dict.get('modules_to_load') is not None:
- modules_to_load = [ModuleToLoad.FromDict(module_dict) for module_dict in
- handle_dict['modules_to_load']]
- else:
- modules_to_load = []
- options = handle_dict.get('options')
- return FunctionHandle(modules_to_load=modules_to_load,
- function_name=handle_dict['function_name'],
- options=options)
-
- def AsUserFriendlyString(self, app):
- parts = [module.filename for module in
- self.ConvertHrefsToAbsFilenames(app).modules_to_load]
- parts.append(self.function_name)
-
- return ':'.join(parts)
-
- @staticmethod
- def FromUserFriendlyString(user_str):
- parts = user_str.split(':')
- if len(parts) < 2:
- raise UserFriendlyStringInvalidError(
- 'Tried to deserialize string with less than two parts: ' + user_str)
-
- modules_to_load = [ModuleToLoad(filename=name) for name in parts[:-1]]
-
- return FunctionHandle(modules_to_load=modules_to_load,
- function_name=parts[-1])
-
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/function_handle_test.html b/chromium/third_party/catapult/tracing/tracing/mre/function_handle_test.html
deleted file mode 100644
index df917cc1728..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/function_handle_test.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/mre/function_handle.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('moduleToLoadExactlyOneHrefOrFilename', function() {
- assert.throws(function() {tr.mre.ModuleToLoad('foo', 'foo')});
- assert.throws(tr.mre.ModuleToLoad);
- });
-
- test('moduleToLoadAsDictTest', function() {
- var mtl0 = new tr.mre.ModuleToLoad('/foo');
- var mtl1 = new tr.mre.ModuleToLoad(undefined, 'foo.html');
-
- assert.deepEqual(mtl0.asDict(), {'href': '/foo'});
- assert.deepEqual(mtl1.asDict(), {'filename': 'foo.html'});
- });
-
- test('moduleToLoadFromDictTest', function() {
- var moduleDict0 = {
- href: '/foo'
- };
- var moduleDict1 = {
- filename: 'foo.html'
- };
-
- var mtl0 = tr.mre.ModuleToLoad.fromDict(moduleDict0);
- var mtl1 = tr.mre.ModuleToLoad.fromDict(moduleDict1);
-
- assert.equal(mtl0.href, '/foo');
- assert.isUndefined(mtl0.filename);
- assert.equal(mtl1.filename, 'foo.html');
- assert.isUndefined(mtl1.href);
- });
-
- test('moduleToLoadToStringTest', function() {
- var mtl0 = new tr.mre.ModuleToLoad('/foo');
- var mtl1 = new tr.mre.ModuleToLoad(undefined, 'foo.html');
-
- assert.equal(
- mtl0.toString(),
- 'ModuleToLoad(href="/foo")');
- assert.equal(
- mtl1.toString(),
- 'ModuleToLoad(filename="foo.html")');
- });
-
- test('modulesToLoadMustBeArrayTest', function() {
- assert.throws(tr.mre.FunctionHandle);
- });
-
- test('functionNameMustBeStringTest', function() {
- assert.throws(function() {tr.mre.FunctionHandle([], 3);});
- });
-
- test('asDictTest', function() {
- var module = new tr.mre.ModuleToLoad('/foo');
- var handle = new tr.mre.FunctionHandle([module], 'Bar', {'a': 'b'});
-
- assert.deepEqual(handle.asDict(), {
- modules_to_load: [{href: '/foo'}],
- function_name: 'Bar',
- options: {'a': 'b'}
- });
- });
-
- test('fromDictTest', function() {
- var handleDict = {
- modules_to_load: [{href: '/foo'}],
- function_name: 'Bar'
- };
-
- var handle = tr.mre.FunctionHandle.fromDict(handleDict);
-
- assert.equal(handle.modulesToLoad.length, 1);
- assert.equal(handle.modulesToLoad[0].href, '/foo');
- assert.equal(handle.functionName, 'Bar');
- });
-
- test('hasHrefsTest', function() {
- var module0 = new tr.mre.ModuleToLoad('/foo');
- var handle0 = new tr.mre.FunctionHandle([module0], 'Bar');
- var module1 = new tr.mre.ModuleToLoad(undefined, 'foo.html');
- var handle1 = new tr.mre.FunctionHandle([module1], 'Bar');
-
- assert.isTrue(handle0.hasHrefs());
- assert.isFalse(handle1.hasHrefs());
- });
-
- test('loadFailsWithHrefs', function() {
- var module = new tr.mre.ModuleToLoad('/foo');
- var handle = new tr.mre.FunctionHandle([module], 'railMapFunction');
-
- assert.throws(handle.load);
- });
-
- test('loadFailsUnregistered', function() {
- var handle = new tr.mre.FunctionHandle([], 'Bar');
-
- assert.throws(handle.load);
- });
-
- test('toStringTest', function() {
- var module = new tr.mre.ModuleToLoad('/foo');
- var handle = new tr.mre.FunctionHandle([module], 'Bar', {'a': 'b'});
-
- assert.equal(
- handle.toString(),
- 'FunctionHandle(modulesToLoad=[ModuleToLoad(href="/foo")], ' +
- 'functionName="Bar", options="{"a":"b"}")');
- });
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/function_handle_unittest.py b/chromium/third_party/catapult/tracing/tracing/mre/function_handle_unittest.py
deleted file mode 100644
index d3bf71dfe66..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/function_handle_unittest.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from tracing.mre import function_handle
-
-
-class ModuleToLoadTests(unittest.TestCase):
-
- def testExactlyOneHrefOrFilename(self):
- with self.assertRaises(Exception):
- function_handle.ModuleToLoad()
-
- with self.assertRaises(Exception):
- function_handle.ModuleToLoad('foo', 'foo')
-
- def testRepr(self):
- mtl0 = function_handle.ModuleToLoad(href='/foo')
- mtl1 = function_handle.ModuleToLoad(filename='foo.html')
-
- self.assertEquals(str(mtl0), 'ModuleToLoad(href="/foo")')
- self.assertEquals(str(mtl1), 'ModuleToLoad(filename="foo.html")')
-
- def testAsDict(self):
- mtl0 = function_handle.ModuleToLoad(href='/foo')
- mtl1 = function_handle.ModuleToLoad(filename='foo.html')
-
- self.assertEquals(mtl0.AsDict(), {
- 'href': '/foo'
- })
-
- self.assertEquals(mtl1.AsDict(), {
- 'filename': 'foo.html'
- })
-
- def testFromDict(self):
- module_dict0 = {
- 'href': '/foo'
- }
-
- module_dict1 = {
- 'filename': 'foo.html'
- }
-
- mtl0 = function_handle.ModuleToLoad.FromDict(module_dict0)
- mtl1 = function_handle.ModuleToLoad.FromDict(module_dict1)
-
- self.assertEquals(mtl0.href, '/foo')
- self.assertIsNone(mtl0.filename)
- self.assertEquals(mtl1.filename, 'foo.html')
- self.assertIsNone(mtl1.href)
-
-
-class FunctionHandleTests(unittest.TestCase):
-
- def testRepr(self):
- module = function_handle.ModuleToLoad(href='/foo')
- handle = function_handle.FunctionHandle([module], 'Bar')
-
- self.assertEquals(
- str(handle),
- 'FunctionHandle(modules_to_load=[ModuleToLoad(href="/foo")], '
- 'function_name="Bar")')
-
- def testAsDict(self):
- module = function_handle.ModuleToLoad(href='/foo')
- handle = function_handle.FunctionHandle([module], 'Bar')
-
- self.assertEquals(
- handle.AsDict(), {
- 'modules_to_load': [{'href': '/foo'}],
- 'function_name': 'Bar'
- })
-
- def testFromDict(self):
- handle_dict = {
- 'modules_to_load': [{'href': '/foo'}],
- 'function_name': 'Bar'
- }
-
- handle = function_handle.FunctionHandle.FromDict(handle_dict)
- self.assertEquals(len(handle.modules_to_load), 1)
- self.assertEquals(handle.modules_to_load[0].href, '/foo')
- self.assertEquals(handle.function_name, 'Bar')
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/gtest_progress_reporter.py b/chromium/third_party/catapult/tracing/tracing/mre/gtest_progress_reporter.py
deleted file mode 100644
index e59ff699bc6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/gtest_progress_reporter.py
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import time
-import sys
-
-from tracing.mre import progress_reporter
-
-
-class GTestRunReporter(progress_reporter.RunReporter):
-
- def __init__(self, canonical_url, output_stream, timestamp):
- super(GTestRunReporter, self).__init__(canonical_url)
- self._output_stream = output_stream
- self._timestamp = timestamp
-
- def _GetMs(self):
- assert self._timestamp is not None, 'Did not call WillRun.'
- return (time.time() - self._timestamp) * 1000
-
- def DidAddFailure(self, failure):
- super(GTestRunReporter, self).DidAddFailure(failure)
- print >> self._output_stream, failure.stack
- self._output_stream.flush()
-
- def DidRun(self, run_failed):
- super(GTestRunReporter, self).DidRun(run_failed)
- if run_failed:
- print >> self._output_stream, '[ FAILED ] %s (%0.f ms)' % (
- self.canonical_url, self._GetMs())
- else:
- print >> self._output_stream, '[ OK ] %s (%0.f ms)' % (
- self.canonical_url, self._GetMs())
- self._output_stream.flush()
-
-
-class GTestProgressReporter(progress_reporter.ProgressReporter):
- """A progress reporter that outputs the progress report in gtest style.
-
- Be careful each print should only handle one string. Otherwise, the output
- might be interrupted by Chrome logging, and the output interpretation might
- be incorrect. For example:
- print >> self._output_stream, "[ OK ]", testname
- should be written as
- print >> self._output_stream, "[ OK ] %s" % testname
- """
-
- def __init__(self, output_stream=sys.stdout):
- super(GTestProgressReporter, self).__init__()
- self._output_stream = output_stream
-
- def WillRun(self, canonical_url):
- super(GTestProgressReporter, self).WillRun(canonical_url)
- print >> self._output_stream, '[ RUN ] %s' % (canonical_url)
- self._output_stream.flush()
- return GTestRunReporter(canonical_url, self._output_stream, time.time())
-
- def DidFinishAllRuns(self, result_list):
- super(GTestProgressReporter, self).DidFinishAllRuns(result_list)
- successful_runs = 0
- failed_canonical_urls = []
- failed_runs = 0
- for run in result_list:
- if len(run.failures) != 0:
- failed_runs += 1
- for f in run.failures:
- failed_canonical_urls.append(f.trace_canonical_url)
- else:
- successful_runs += 1
-
- unit = 'test' if successful_runs == 1 else 'tests'
- print >> self._output_stream, '[ PASSED ] %d %s.' % (
- (successful_runs, unit))
- if len(failed_canonical_urls) > 0:
- unit = 'test' if len(failed_canonical_urls) == 1 else 'tests'
- print >> self._output_stream, '[ FAILED ] %d %s, listed below:' % (
- (failed_runs, unit))
- for failed_canonical_url in failed_canonical_urls:
- print >> self._output_stream, '[ FAILED ] %s' % (
- failed_canonical_url)
- print >> self._output_stream
- count = len(failed_canonical_urls)
- unit = 'TEST' if count == 1 else 'TESTS'
- print >> self._output_stream, '%d FAILED %s' % (count, unit)
- print >> self._output_stream
-
- self._output_stream.flush()
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/job.html b/chromium/third_party/catapult/tracing/tracing/mre/job.html
deleted file mode 100644
index b92dad0c75d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/job.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/mre/function_handle.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
-
- function Job(mapFunctionHandle, opt_guid) {
- this.mapFunctionHandle_ = mapFunctionHandle;
- if (opt_guid === undefined)
- this.guid_ = tr.b.GUID.allocateSimple();
- else
- this.guid_ = opt_guid;
- }
-
- Job.prototype = {
- get mapFunctionHandle() { return this.mapFunctionHandle_; },
- get guid() { return this.guid_; },
-
- asDict: function() {
- return {
- map_function_handle: this.mapFunctionHandle_.asDict(),
- guid: this.guid_.toString()
- };
- }
- };
-
- Job.fromDict = function(jobDict) {
- var mapFunctionHandle = null;
- if (jobDict.map_function_handle !== null) {
- mapFunctionHandle = tr.mre.FunctionHandle.fromDict(
- jobDict.map_function_handle);
- }
-
- return new Job(mapFunctionHandle, jobDict.guid);
- };
-
- return {
- Job: Job
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/job.py b/chromium/third_party/catapult/tracing/tracing/mre/job.py
deleted file mode 100644
index 1c3a978c83c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/job.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import uuid
-
-from tracing.mre import function_handle
-
-
-class Job(object):
-
- def __init__(self, map_function_handle, guid=uuid.uuid4()):
- assert map_function_handle is not None
-
- self._map_function_handle = map_function_handle
- self._guid = guid
-
- @property
- def guid(self):
- return self._guid
-
- @property
- def map_function_handle(self):
- return self._map_function_handle
-
- def AsDict(self):
- values_dict = {
- 'map_function_handle': self._map_function_handle.AsDict(),
- 'guid': str(self._guid)
- }
- return values_dict
-
- @staticmethod
- def FromDict(job_dict):
- return Job(
- function_handle.FunctionHandle.FromDict(
- job_dict['map_function_handle']))
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/json_output_formatter.py b/chromium/third_party/catapult/tracing/tracing/mre/json_output_formatter.py
deleted file mode 100644
index aafc8838de3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/json_output_formatter.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import json
-
-from tracing.mre import output_formatter
-
-
-class JSONOutputFormatter(output_formatter.OutputFormatter):
-
- def __init__(self, output_file):
- # TODO(nduca): Resolve output_file here vs output_stream in base class.
- super(JSONOutputFormatter, self).__init__(output_file)
- self.output_file = output_file
-
- def Format(self, result_list):
- d = [result.AsDict() for result in result_list]
- json.dump(d, self.output_file, indent=2)
- if hasattr(self.output_file, 'flush'):
- self.output_file.flush()
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/local_directory_corpus_driver.py b/chromium/third_party/catapult/tracing/tracing/mre/local_directory_corpus_driver.py
deleted file mode 100644
index c156f7311d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/local_directory_corpus_driver.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import os
-
-from tracing.mre import corpus_driver
-from tracing.mre import file_handle
-
-
-def _GetFilesIn(basedir):
- data_files = []
- for dirpath, dirnames, filenames in os.walk(basedir, followlinks=True):
- new_dirnames = [d for d in dirnames if not d.startswith('.')]
- del dirnames[:]
- dirnames += new_dirnames
- for f in filenames:
- if f.startswith('.'):
- continue
- if f == 'README.md':
- continue
- full_f = os.path.join(dirpath, f)
- rel_f = os.path.relpath(full_f, basedir)
- data_files.append(rel_f)
-
- data_files.sort()
- return data_files
-
-
-def _DefaultUrlResover(abspath):
- return 'file:///%s' % abspath
-
-
-class LocalDirectoryCorpusDriver(corpus_driver.CorpusDriver):
-
- def __init__(self, trace_directory, url_resolver=_DefaultUrlResover):
- self.directory = trace_directory
- self.url_resolver = url_resolver
-
- @staticmethod
- def CheckAndCreateInitArguments(parser, args):
- trace_dir = os.path.abspath(os.path.expanduser(args.trace_directory))
- if not os.path.exists(trace_dir):
- parser.error('Trace directory does not exist')
- return None
- return {'trace_directory': trace_dir}
-
- @staticmethod
- def AddArguments(parser):
- parser.add_argument(
- '--trace_directory',
- help='Local directory containing traces to process.')
-
- def GetTraceHandles(self):
- trace_handles = []
-
- files = _GetFilesIn(self.directory)
- for rel_filename in files:
- filename = os.path.join(self.directory, rel_filename)
-
- url = self.url_resolver(filename)
- if url is None:
- url = _DefaultUrlResover(filename)
-
- th = file_handle.URLFileHandle(url, 'file://' + filename)
- trace_handles.append(th)
-
- return trace_handles
-
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_runner.py b/chromium/third_party/catapult/tracing/tracing/mre/map_runner.py
deleted file mode 100644
index 5b3deca8ab8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_runner.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import multiprocessing
-import sys
-
-from tracing.mre import map_single_trace
-from tracing.mre import threaded_work_queue
-from tracing.mre import gtest_progress_reporter
-
-AUTO_JOB_COUNT = -1
-
-
-class MapError(Exception):
-
- def __init__(self, *args):
- super(MapError, self).__init__(*args)
- self.canonical_url = None
-
-
-class MapRunner(object):
- def __init__(self, trace_handles, job,
- stop_on_error=False, progress_reporter=None,
- jobs=AUTO_JOB_COUNT,
- output_formatters=None,
- extra_import_options=None):
- self._job = job
- self._stop_on_error = stop_on_error
- self._failed_canonical_url_to_dump = None
- if progress_reporter is None:
- self._progress_reporter = gtest_progress_reporter.GTestProgressReporter(
- sys.stdout)
- else:
- self._progress_reporter = progress_reporter
- self._output_formatters = output_formatters or []
- self._extra_import_options = extra_import_options
-
- self._trace_handles = trace_handles
- self._num_traces_merged_into_results = 0
- self._map_results = None
- self._map_results_file = None
-
- if jobs == AUTO_JOB_COUNT:
- jobs = multiprocessing.cpu_count()
- self._wq = threaded_work_queue.ThreadedWorkQueue(num_threads=jobs)
-
- def _ProcessOneTrace(self, trace_handle):
- canonical_url = trace_handle.canonical_url
- run_reporter = self._progress_reporter.WillRun(canonical_url)
- result = map_single_trace.MapSingleTrace(
- trace_handle,
- self._job,
- extra_import_options=self._extra_import_options)
-
- had_failure = len(result.failures) > 0
-
- for f in result.failures:
- run_reporter.DidAddFailure(f)
- run_reporter.DidRun(had_failure)
-
- self._wq.PostMainThreadTask(
- self._MergeResultIntoMaster, result, trace_handle)
-
- def _MergeResultIntoMaster(self, result, trace_handle):
- self._map_results[trace_handle.canonical_url] = result
-
- had_failure = len(result.failures) > 0
- if self._stop_on_error and had_failure:
- err = MapError("Mapping error")
- self._AbortMappingDueStopOnError(err)
- raise err
-
- self._num_traces_merged_into_results += 1
- if self._num_traces_merged_into_results == len(self._trace_handles):
- self._wq.PostMainThreadTask(self._AllMappingDone)
-
- def _AbortMappingDueStopOnError(self, err):
- self._wq.Stop(err)
-
- def _AllMappingDone(self):
- self._wq.Stop()
-
- def RunMapper(self):
- self._map_results = {}
-
- if not self._trace_handles:
- err = MapError("No trace handles specified.")
- raise err
-
- if self._job.map_function_handle:
- for trace_handle in self._trace_handles:
- self._wq.PostAnyThreadTask(self._ProcessOneTrace, trace_handle)
-
- self._wq.Run()
-
- return self._map_results
-
- def Run(self):
- results_by_trace = self.RunMapper()
- results = results_by_trace.values()
-
- for of in self._output_formatters:
- of.Format(results)
-
- return results
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.html b/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.html
deleted file mode 100644
index 6dea20fb5a9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/extras/full_config.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/mre/failure.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
-
- var Failure = tr.mre.Failure;
-
- function runAndConvertErrorsToFailures(result, job,
- traceHandle, cb, opt_this) {
- try {
- cb.call(opt_this);
- } catch (e) {
- var err = tr.b.normalizeException(e);
- // TODO(eakuefner): Set job once reduction is implemented.
- result.addFailure(new Failure(
- job, job.mapFunctionHandle.asUserFriendlyString(),
- traceHandle.canonicalUrl, err.typeName, err.message, err.stack));
- }
- }
-
- function mapSingleTrace(result, model, options, mapFunction) {
- // Map the function.
- var numPairsBeforeMapping = tr.b.dictionaryLength(result.pairs);
- var numFailuresBeforeMapping = result.failures.length;
- try {
- mapFunction(result, model, options);
- } catch (ex) {
- ex.name = 'MapFunctionError';
- throw ex;
- }
-
- var addedPairs = (tr.b.dictionaryLength(result.pairs) >
- numPairsBeforeMapping);
- var addedFailures = result.failures.length > numFailuresBeforeMapping;
- if (!(addedPairs || addedFailures)) {
- var err = new Error('Mapper did not add any results!');
- err.name = 'NoResultsAddedError';
- throw err;
- }
- }
-
- return {
- mapSingleTrace: mapSingleTrace,
- runAndConvertErrorsToFailures: runAndConvertErrorsToFailures
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.py b/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.py
deleted file mode 100644
index 2bbde42170f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace.py
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import json
-import os
-import re
-import sys
-import tempfile
-import types
-
-import tracing_project
-import vinn
-
-from tracing.mre import failure
-from tracing.mre import mre_result
-
-_MAP_SINGLE_TRACE_CMDLINE_PATH = os.path.join(
- tracing_project.TracingProject.tracing_src_path, 'mre',
- 'map_single_trace_cmdline.html')
-
-class TemporaryMapScript(object):
- def __init__(self, js):
- temp_file = tempfile.NamedTemporaryFile(delete=False)
- temp_file.write("""
-<!DOCTYPE html>
-<script>
-%s
-</script>
-""" % js)
- temp_file.close()
- self._filename = temp_file.name
-
- def __enter__(self):
- return self
-
- def __exit__(self, *args, **kwargs):
- os.remove(self._filename)
- self._filename = None
-
- @property
- def filename(self):
- return self._filename
-
-
-class FunctionLoadingFailure(failure.Failure):
- pass
-
-class FunctionNotDefinedFailure(failure.Failure):
- pass
-
-class MapFunctionFailure(failure.Failure):
- pass
-
-class FileLoadingFailure(failure.Failure):
- pass
-
-class TraceImportFailure(failure.Failure):
- pass
-
-class NoResultsAddedFailure(failure.Failure):
- pass
-
-class InternalMapError(Exception):
- pass
-
-_FAILURE_NAME_TO_FAILURE_CONSTRUCTOR = {
- 'FileLoadingError': FileLoadingFailure,
- 'FunctionLoadingError': FunctionLoadingFailure,
- 'FunctionNotDefinedError': FunctionNotDefinedFailure,
- 'TraceImportError': TraceImportFailure,
- 'MapFunctionError': MapFunctionFailure,
- 'NoResultsAddedError': NoResultsAddedFailure
-}
-
-
-def MapSingleTrace(trace_handle,
- job,
- extra_import_options=None):
- assert (type(extra_import_options) is types.NoneType or
- type(extra_import_options) is types.DictType), (
- 'extra_import_options should be a dict or None.')
- project = tracing_project.TracingProject()
-
- all_source_paths = list(project.source_paths)
- all_source_paths.append(project.trace_processor_root_path)
-
- result = mre_result.MreResult()
-
- with trace_handle.PrepareFileForProcessing() as prepared_trace_handle:
- js_args = [
- json.dumps(prepared_trace_handle.AsDict()),
- json.dumps(job.AsDict()),
- ]
- if extra_import_options:
- js_args.append(json.dumps(extra_import_options))
-
- res = vinn.RunFile(
- _MAP_SINGLE_TRACE_CMDLINE_PATH,
- source_paths=all_source_paths,
- js_args=js_args,
- # Use 8gb heap space to make sure we don't OOM'ed on big trace.
- v8_args=['--max-old-space-size=8192'])
-
- if res.returncode != 0:
- sys.stderr.write(res.stdout)
- result.AddFailure(failure.Failure(
- job,
- trace_handle.canonical_url,
- 'Error', 'vinn runtime error while mapping trace.',
- 'vinn runtime error while mapping trace.', 'Unknown stack'))
- return result
-
- for line in res.stdout.split('\n'):
- m = re.match('^MRE_RESULT: (.+)', line, re.DOTALL)
- if m:
- found_dict = json.loads(m.group(1))
- failures = [
- failure.Failure.FromDict(f, job, _FAILURE_NAME_TO_FAILURE_CONSTRUCTOR)
- for f in found_dict['failures']]
-
- for f in failures:
- result.AddFailure(f)
-
- for k, v in found_dict['pairs'].iteritems():
- result.AddPair(k, v)
-
- else:
- if len(line) > 0:
- sys.stderr.write(line)
- sys.stderr.write('\n')
-
- if not (len(result.pairs) or len(result.failures)):
- raise InternalMapError('Internal error: No results were produced!')
-
- return result
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_cmdline.html b/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_cmdline.html
deleted file mode 100644
index 175835eeb36..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_cmdline.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/mre/failure.html">
-<link rel="import" href="/tracing/mre/file_handle.html">
-<link rel="import" href="/tracing/mre/function_handle.html">
-<link rel="import" href="/tracing/mre/job.html">
-<link rel="import" href="/tracing/mre/map_single_trace.html">
-<link rel="import" href="/tracing/mre/mre_result.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
-
- var Failure = tr.mre.Failure;
-
- function createModelFromTraceData(traceData,
- canonicalUrl,
- opt_extraImportOptions) {
- var model = new tr.Model();
- try {
- var importOptions = new tr.importer.ImportOptions();
- importOptions.pruneEmptyContainers = false;
- importOptions.showImportWarnings = false;
- if (opt_extraImportOptions !== undefined) {
- for (var property in opt_extraImportOptions) {
- if (opt_extraImportOptions.hasOwnProperty(property)) {
- importOptions[property] = opt_extraImportOptions[property];
- }
- }
- }
-
- var i = new tr.importer.Import(model, importOptions);
- i.importTraces([traceData]);
- } catch (ex) {
- ex.name = 'TraceImportError';
- throw ex;
- }
-
- model.canonicalUrl = canonicalUrl;
-
- return model;
- }
-
- function mapSingleTraceWithResult(options) {
- var result = new tr.mre.MreResult();
-
- tr.mre.runAndConvertErrorsToFailures(
- result, options.job, options.traceHandle,
- function() {
- var mapFunction = options.job.mapFunctionHandle.load();
- var traceData = options.traceHandle.load();
- var model = createModelFromTraceData(
- traceData, options.traceHandle.canonicalUrl,
- options.extraImportOptions);
- var opt_options = options.job.mapFunctionHandle.options;
- tr.mre.mapSingleTrace(result, model, opt_options, mapFunction);
- });
- return result;
- }
-
- function mapSingleTraceMain(args) {
- if (args.length !== 2 && args.length !== 3)
- throw new Error('Must provide two or three arguments.');
-
- var options = {
- traceHandle: tr.mre.FileHandle.fromDict(JSON.parse(args[0])),
- job: tr.mre.Job.fromDict(JSON.parse(args[1])),
- extraImportOptions: args.length === 3 ? JSON.parse(args[2]) : undefined
- };
-
- var result = mapSingleTraceWithResult(options);
-
- console.log('MRE_RESULT: ' + JSON.stringify(result.asDict()));
- return 0;
- }
-
- return {
- mapSingleTraceMain: mapSingleTraceMain,
- mapSingleTraceWithResult: mapSingleTraceWithResult
- };
-});
-
-if (tr.isHeadless)
- quit(tr.mre.mapSingleTraceMain(sys.argv.slice(1)));
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_unittest.py b/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_unittest.py
deleted file mode 100644
index 44744aa6b89..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_single_trace_unittest.py
+++ /dev/null
@@ -1,208 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import json
-import unittest
-
-from tracing.mre import function_handle
-from tracing.mre import map_single_trace
-from tracing.mre import file_handle
-from tracing.mre import failure
-from tracing.mre import job as job_module
-
-
-def _Handle(filename):
- module = function_handle.ModuleToLoad(filename=filename)
- map_handle = function_handle.FunctionHandle(
- modules_to_load=[module], function_name='MyMapFunction')
- return job_module.Job(map_handle, None)
-
-
-class MapSingleTraceTests(unittest.TestCase):
-
- def testPassingMapScript(self):
- events = [
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'a', 'cat': 'c',
- 'ts': 0, 'dur': 10, 'args': {}},
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'b', 'cat': 'c',
- 'ts': 3, 'dur': 5, 'args': {}}
- ]
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', json.dumps(events))
-
- with map_single_trace.TemporaryMapScript("""
- tr.mre.FunctionRegistry.register(
- function MyMapFunction(result, model) {
- var canonicalUrl = model.canonicalUrl;
- result.addPair('result', {
- numProcesses: model.getAllProcesses().length
- });
- });
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertFalse(result.failures)
- r = result.pairs['result']
- self.assertEquals(r['numProcesses'], 1)
-
-
- def testProcessingGiantTrace(self):
- # Populate a string trace of 2 million events.
- trace_events = ['[']
- for i in xrange(2000000):
- trace_events.append(
- '{"pid": 1, "tid": %i, "ph": "X", "name": "a", "cat": "c",'
- '"ts": %i, "dur": 1, "args": {}},' % (i % 5, 2 * i))
- trace_events.append('{}]')
- trace_data = ''.join(trace_events)
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', trace_data)
-
- with map_single_trace.TemporaryMapScript("""
- tr.mre.FunctionRegistry.register(
- function MyMapFunction(result, model) {
- var canonicalUrl = model.canonicalUrl;
- var numEvents = 0;
- for (var e of model.getProcess(1).getDescendantEvents()) {
- numEvents++;
- }
- result.addPair('result', {
- numEvents: numEvents
- });
- });
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertFalse(result.failures,
- msg='\n'.join(str(f) for f in result.failures))
- r = result.pairs['result']
- self.assertEquals(r['numEvents'], 2000000)
-
-
-
- def testTraceDidntImport(self):
- trace_string = 'This is intentionally not a trace-formatted string.'
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', trace_string)
-
- with map_single_trace.TemporaryMapScript("""
- tr.mre.FunctionRegistry.register(
- function MyMapFunction(results, model) {
- });
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertEquals(len(result.failures), 1)
- self.assertEquals(len(result.pairs), 0)
- f = result.failures[0]
- self.assertIsInstance(f, map_single_trace.TraceImportFailure)
-
- def testMapFunctionThatThrows(self):
- events = [
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'a', 'cat': 'c',
- 'ts': 0, 'dur': 10, 'args': {}},
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'b', 'cat': 'c',
- 'ts': 3, 'dur': 5, 'args': {}}
- ]
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', json.dumps(events))
-
- with map_single_trace.TemporaryMapScript("""
- tr.mre.FunctionRegistry.register(
- function MyMapFunction(results, model) {
- throw new Error('Expected error');
- });
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertEquals(len(result.failures), 1)
- self.assertEquals(len(result.pairs), 0)
- f = result.failures[0]
- self.assertIsInstance(f, map_single_trace.MapFunctionFailure)
-
- def testMapperWithLoadError(self):
- events = [
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'a', 'cat': 'c',
- 'ts': 0, 'dur': 10, 'args': {}},
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'b', 'cat': 'c',
- 'ts': 3, 'dur': 5, 'args': {}}
- ]
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', json.dumps(events))
-
- with map_single_trace.TemporaryMapScript("""
- throw new Error('Expected load error');
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertEquals(len(result.failures), 1)
- self.assertEquals(len(result.pairs), 0)
- f = result.failures[0]
- self.assertIsInstance(f, map_single_trace.FunctionLoadingFailure)
-
- def testMapperWithUnexpectedError(self):
- events = [
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'a', 'cat': 'c',
- 'ts': 0, 'dur': 10, 'args': {}},
- ]
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', json.dumps(events))
-
- with map_single_trace.TemporaryMapScript("""
- quit(100);
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertEquals(len(result.failures), 1)
- self.assertEquals(len(result.pairs), 0)
- f = result.failures[0]
- self.assertIsInstance(f, failure.Failure)
-
- def testNoMapper(self):
- events = [
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'a', 'cat': 'c',
- 'ts': 0, 'dur': 10, 'args': {}},
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'b', 'cat': 'c',
- 'ts': 3, 'dur': 5, 'args': {}}
- ]
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', json.dumps(events))
-
- with map_single_trace.TemporaryMapScript("""
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertEquals(len(result.failures), 1)
- self.assertEquals(len(result.pairs), 0)
- f = result.failures[0]
- self.assertIsInstance(f, map_single_trace.FunctionNotDefinedFailure)
-
- def testMapperDoesntAddValues(self):
- events = [
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'a', 'cat': 'c',
- 'ts': 0, 'dur': 10, 'args': {}},
- {'pid': 1, 'tid': 2, 'ph': 'X', 'name': 'b', 'cat': 'c',
- 'ts': 3, 'dur': 5, 'args': {}}
- ]
- trace_handle = file_handle.InMemoryFileHandle(
- '/a.json', json.dumps(events))
-
- with map_single_trace.TemporaryMapScript("""
- tr.mre.FunctionRegistry.register(
- function MyMapFunction(results, model) {
- });
- """) as map_script:
- result = map_single_trace.MapSingleTrace(trace_handle,
- _Handle(map_script.filename))
-
- self.assertEquals(len(result.failures), 1)
- self.assertEquals(len(result.pairs), 0)
- f = result.failures[0]
- self.assertIsInstance(f, map_single_trace.NoResultsAddedFailure)
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_traces.py b/chromium/third_party/catapult/tracing/tracing/mre/map_traces.py
deleted file mode 100644
index 749e7acab39..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_traces.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import argparse
-import sys
-
-from tracing.mre import corpus_driver_cmdline
-from tracing.mre import map_runner
-from tracing.mre import function_handle
-from tracing.mre import job as job_module
-from tracing.mre import json_output_formatter
-
-
-def Main(argv):
- parser = argparse.ArgumentParser(
- description='Bulk trace processing')
- parser.add_argument('--map_function_handle')
- parser.add_argument('-j', '--jobs', type=int,
- default=map_runner.AUTO_JOB_COUNT)
- parser.add_argument('-o', '--output-file')
- parser.add_argument('-s', '--stop-on-error',
- action='store_true')
-
- if len(sys.argv) == 1:
- parser.print_help()
- sys.exit(0)
-
- args = parser.parse_args(argv[1:])
-
- corpus_driver = corpus_driver_cmdline.GetCorpusDriver(parser, args)
-
- if args.output_file:
- ofile = open(args.output_file, 'w')
- else:
- ofile = sys.stdout
-
- output_formatter = json_output_formatter.JSONOutputFormatter(ofile)
-
- try:
- map_handle = None
- if args.map_function_handle:
- map_handle = function_handle.FunctionHandle.FromUserFriendlyString(
- args.map_function_handle)
- job = job_module.Job(map_handle)
- except function_handle.UserFriendlyStringInvalidError:
- error_lines = [
- 'The map_traces command-line API has changed! You must now specify the',
- 'filenames to load and the map function name, separated by :. For '
- 'example, a mapper in',
- 'foo.html called Foo would be written as foo.html:Foo .'
- ]
- parser.error('\n'.join(error_lines))
-
- try:
- trace_handles = corpus_driver.GetTraceHandles()
- runner = map_runner.MapRunner(trace_handles, job,
- stop_on_error=args.stop_on_error,
- jobs=args.jobs,
- output_formatters=[output_formatter])
- results = runner.Run()
- if not any(result.failures for result in results):
- return 0
- else:
- return 255
- finally:
- if ofile != sys.stdout:
- ofile.close()
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/map_traces_handler.py b/chromium/third_party/catapult/tracing/tracing/mre/map_traces_handler.py
deleted file mode 100644
index ea9b0b6d533..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/map_traces_handler.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import webapp2
-
-
-def MapTrace(trace_corpus_driver): # pylint: disable=unused-argument
- pass
-
-
-class MapTracesHandler(webapp2.RequestHandler):
-
- def post(self, *args, **kwargs): # pylint: disable=unused-argument
- pass
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/mre_result.html b/chromium/third_party/catapult/tracing/tracing/mre/mre_result.html
deleted file mode 100644
index e4f37cb53ed..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/mre_result.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/mre/failure.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
- class MreResult {
- constructor(failures, pairs) {
- if (failures === undefined)
- failures = [];
- if (pairs === undefined)
- pairs = {};
- this.failures = failures;
- this.pairs = pairs;
- }
-
- addFailure(failure) {
- this.failures.push(failure);
- }
-
- addPair(key, value) {
- if (key in this.pairs)
- throw new Error('Key ' + key + ' already exists in result.');
- this.pairs[key] = value;
- }
-
- asDict() {
- var d = {
- pairs: this.pairs
- };
-
- if (this.failures)
- d.failures = this.failures.map(function(f) {return f.asDict();});
-
- return d;
- }
-
- hadFailures() {
- return this.failures.length > 0;
- }
-
- static fromDict(resultDict) {
- if (resultDict.failures !== undefined)
- var failures = resultDict.failures.map(tr.mre.Failure.fromDict);
- var pairs = resultDict.pairs;
- return new MreResult(failures, pairs);
- }
- };
-
- return {
- MreResult: MreResult
- };
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/mre_result.py b/chromium/third_party/catapult/tracing/tracing/mre/mre_result.py
deleted file mode 100644
index f3d128e23a8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/mre_result.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from tracing.mre import failure as failure_module
-
-class DuplicateKeyError(Exception):
- """Raised if an attempt is made to set a key more than once."""
-
-
-class MreResult(object):
-
- def __init__(self, failures=None, pairs=None):
- if failures is None:
- failures = []
- if pairs is None:
- pairs = {}
- self._failures = failures
- self._pairs = pairs
-
- @property
- def failures(self):
- return self._failures
-
- @property
- def pairs(self):
- return self._pairs
-
- def AsDict(self):
- d = {
- 'pairs': self._pairs
- }
-
- if self.failures:
- d['failures'] = [failure.AsDict() for failure in self._failures]
-
- return d
-
- def AddFailure(self, failure):
- if not isinstance(failure, failure_module.Failure):
- raise ValueError('Attempted to add %s as Failure', failure)
-
- self._failures.append(failure)
-
- def AddPair(self, key, value):
- if key in self._pairs:
- raise DuplicateKeyError('Key ' + key + 'already exists in result.')
- self._pairs[key] = value
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/mre_result_test.html b/chromium/third_party/catapult/tracing/tracing/mre/mre_result_test.html
deleted file mode 100644
index 6fb94ea9d0e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/mre_result_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/mre/failure.html">
-<link rel="import" href="/tracing/mre/mre_result.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('mreResultAsDictTest', function() {
- var result = new tr.mre.MreResult();
-
- var failure = new tr.mre.Failure('1', '2', '3', 'err', 'desc', 'stack');
- result.addFailure(failure);
-
- result.addPair('foo', 'bar');
-
- var resultDict = result.asDict();
-
- assert.deepEqual(resultDict.failures, [failure.asDict()]);
- assert.deepEqual(resultDict.pairs, {foo: 'bar'});
- });
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/mre_result_unittest.py b/chromium/third_party/catapult/tracing/tracing/mre/mre_result_unittest.py
deleted file mode 100644
index 2bdb5a8f19a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/mre_result_unittest.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from tracing.mre import function_handle
-from tracing.mre import map_single_trace
-from tracing.mre import failure as failure_module
-from tracing.mre import job as job_module
-from tracing.mre import mre_result
-
-
-class MreResultTests(unittest.TestCase):
-
- def testAsDict(self):
- result = mre_result.MreResult()
-
- with map_single_trace.TemporaryMapScript("""
- tr.mre.FunctionRegistry.register(
- function MyMapFunction(result, model) {
- var canonicalUrl = model.canonicalUrl;
- result.addPair('result', {
- numProcesses: model.getAllProcesses().length
- });
- });
- """) as map_script:
-
- module = function_handle.ModuleToLoad(filename=map_script.filename)
- map_handle = function_handle.FunctionHandle(
- modules_to_load=[module], function_name='MyMapFunction')
- job = job_module.Job(map_handle, None)
- failure = failure_module.Failure(job, '2', '3', 'err', 'desc', 'stack')
- result.AddFailure(failure)
-
- result.AddPair('foo', 'bar')
-
- result_dict = result.AsDict()
-
- self.assertEquals(result_dict['failures'], [failure.AsDict()])
- self.assertEquals(result_dict['pairs'], {'foo': 'bar'})
-
- def testAddingNonFailure(self):
- result = mre_result.MreResult()
- with self.assertRaises(ValueError):
- result.AddFailure('foo')
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/output_formatter.py b/chromium/third_party/catapult/tracing/tracing/mre/output_formatter.py
deleted file mode 100644
index 5a4be13acce..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/output_formatter.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Derived from telemetry OutputFormatter. Should stay close in architecture
-# to telemetry OutputFormatter.
-
-
-class OutputFormatter(object):
-
- def __init__(self, output_stream):
- self._output_stream = output_stream
-
- def Format(self, results):
- raise NotImplementedError()
-
- @property
- def output_stream(self):
- return self._output_stream
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/progress_reporter.py b/chromium/third_party/catapult/tracing/tracing/mre/progress_reporter.py
deleted file mode 100644
index b33d744da13..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/progress_reporter.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-class RunReporter(object):
-
- def __init__(self, canonical_url):
- self.canonical_url = canonical_url
-
- def DidAddFailure(self, failure):
- pass
-
- def DidRun(self, run_failed):
- pass
-
-
-# Derived from telemetry ProgressReporter. Should stay close in architecture
-# to telemetry ProgressReporter.
-class ProgressReporter(object):
-
- def WillRun(self, canonical_url):
- return RunReporter(canonical_url)
-
- # TODO(eakuefner): Implement reduction, make this not take a result list.
- def DidFinishAllRuns(self, result_list):
- pass
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html b/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html
deleted file mode 100644
index 85640090811..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/mre/failure.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
-
- function reduceMapResults(jobResults, key, mapResults, reduceFunction) {
- try {
- var result = reduceFunction(key, mapResults);
- jobResults.addPair(key, result);
- } catch (ex) {
- ex.name = 'ReduceFunctionError';
- throw ex;
- }
- }
-
- return {
- reduceMapResults: reduceMapResults
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results_cmdline.html b/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results_cmdline.html
deleted file mode 100644
index 1a99fcad758..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/reduce_map_results_cmdline.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/mre/file_handle.html">
-<link rel="import" href="/tracing/mre/job.html">
-<link rel="import" href="/tracing/mre/mre_result.html">
-<link rel="import" href="/tracing/mre/reduce_map_results.html">
-<link rel="import" href="/tracing/mre/run_and_convert_errors_to_failures.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
-
- function jsonReplacer(key, value) {
- if (value instanceof tr.v.Histogram) {
- return value.asDict();
- }
- return value;
- }
-
- function reduceMapResultsMain(args) {
- if (args.length !== 3)
- throw new Error('Must provide three arguments');
-
- var options = {
- key: args[0],
- fileHandle: tr.mre.FileHandle.fromDict(JSON.parse(args[1])),
- job: tr.mre.Job.fromDict(JSON.parse(args[2]))
- };
-
- var mapResultsLoaded = options.fileHandle.load();
- var mapResults = JSON.parse(mapResultsLoaded);
-
- var jobResults = new tr.mre.MreResult();
-
- tr.mre.runAndConvertErrorsToFailures(
- jobResults, options.job, options.job.reduceFunctionHandle,
- undefined,
- function() {
- var reduceFunction = options.job.reduceFunctionHandle.load();
- tr.mre.reduceMapResults(jobResults, options.key, mapResults.pairs,
- reduceFunction);
- });
-
- if (Object.keys(jobResults.pairs).length !== 0)
- console.log('JOB_RESULTS: ' + JSON.stringify(jobResults.pairs,
- jsonReplacer));
- jobResults.failures.forEach(function(failure) {
- console.log('JOB_FAILURE: ' + JSON.stringify(failure.asDict()));
- });
- return 0;
- }
-
- return {
- reduceMapResultsMain: reduceMapResultsMain
- };
-});
-
-
-if (tr.isHeadless)
- quit(tr.mre.reduceMapResultsMain(sys.argv.slice(1)));
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/run_and_convert_errors_to_failures.html b/chromium/third_party/catapult/tracing/tracing/mre/run_and_convert_errors_to_failures.html
deleted file mode 100644
index 6f7f4db9fbf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/run_and_convert_errors_to_failures.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/mre/failure.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.mre', function() {
- function runAndConvertErrorsToFailures(results, job, functionHandle,
- traceHandle, cb, opt_this) {
- try {
- cb.call(opt_this);
- } catch (e) {
- var err = tr.b.normalizeException(e);
- results.addFailure(new tr.mre.Failure(
- job, functionHandle, traceHandle, err.typeName,
- err.message, err.stack));
- }
- }
-
- return {
- runAndConvertErrorsToFailures: runAndConvertErrorsToFailures
- };
-});
-
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue.py b/chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue.py
deleted file mode 100644
index 5bd29c46e32..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue.py
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import threading
-import traceback
-import Queue
-
-
-class ThreadedWorkQueue(object):
-
- def __init__(self, num_threads):
- self._num_threads = num_threads
-
- self._main_thread_tasks = None
- self._any_thread_tasks = None
-
- self._running = False
- self._stop = False
- self._stop_result = None
-
- self.Reset()
-
- @property
- def is_running(self):
- return self._running
-
- def Run(self):
- if self.is_running:
- raise Exception('Already running')
-
- self._running = True
- self._stop = False
- self._stop_result = None
-
- if self._num_threads == 1:
- self._RunSingleThreaded()
- else:
- self._RunMultiThreaded()
-
- self._main_thread_tasks = Queue.Queue()
- self._any_thread_tasks = Queue.Queue()
-
- r = self._stop_result
- self._stop_result = None
- self._running = False
-
- return r
-
- def Stop(self, stop_result=None):
- if not self.is_running:
- raise Exception('Not running')
-
- if self._stop:
- return False
- self._stop_result = stop_result
- self._stop = True
- return True
-
- def Reset(self):
- assert not self.is_running
- self._main_thread_tasks = Queue.Queue()
- self._any_thread_tasks = Queue.Queue()
-
- def PostMainThreadTask(self, cb, *args, **kwargs):
- def RunTask():
- cb(*args, **kwargs)
- self._main_thread_tasks.put(RunTask)
-
- def PostAnyThreadTask(self, cb, *args, **kwargs):
- def RunTask():
- cb(*args, **kwargs)
- self._any_thread_tasks.put(RunTask)
-
- def _TryToRunOneTask(self, queue, block=False):
- if block:
- try:
- task = queue.get(True, 0.1)
- except Queue.Empty:
- return
- else:
- if queue.empty():
- return
- task = queue.get()
-
- try:
- task()
- except KeyboardInterrupt as ex:
- raise ex
- except Exception: # pylint: disable=broad-except
- traceback.print_exc()
- finally:
- queue.task_done()
-
- def _RunSingleThreaded(self):
- while True:
- if self._stop:
- break
- self._TryToRunOneTask(self._any_thread_tasks)
- self._TryToRunOneTask(self._main_thread_tasks)
-
- def _RunMultiThreaded(self):
- threads = []
- for _ in range(self._num_threads):
- t = threading.Thread(target=self._ThreadMain)
- t.setDaemon(True)
- t.start()
- threads.append(t)
-
- while True:
- if self._stop:
- break
- self._TryToRunOneTask(self._main_thread_tasks)
-
- for t in threads:
- t.join()
-
- def _ThreadMain(self):
- while True:
- if self._stop:
- break
- self._TryToRunOneTask(self._any_thread_tasks, block=True)
diff --git a/chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue_unittest.py b/chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue_unittest.py
deleted file mode 100644
index 6e93744540a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/mre/threaded_work_queue_unittest.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import unittest
-
-from tracing.mre import threaded_work_queue
-
-
-class ThreadedWorkQueueTests(unittest.TestCase):
-
- def testSingleThreaded(self):
- wq = threaded_work_queue.ThreadedWorkQueue(num_threads=1)
- self._RunSimpleDecrementingTest(wq)
-
- def testMultiThreaded(self):
- wq = threaded_work_queue.ThreadedWorkQueue(num_threads=4)
- self._RunSimpleDecrementingTest(wq)
-
- def _RunSimpleDecrementingTest(self, wq):
-
- remaining = [10]
-
- def Decrement():
- remaining[0] -= 1
- if remaining[0]:
- wq.PostMainThreadTask(Done)
-
- def Done():
- wq.Stop(314)
-
- wq.PostAnyThreadTask(Decrement)
- res = wq.Run()
- self.assertEquals(res, 314)
diff --git a/chromium/third_party/catapult/tracing/tracing/results2_template.html b/chromium/third_party/catapult/tracing/tracing/results2_template.html
deleted file mode 100644
index 3d9d0f157af..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/results2_template.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
-
-<link rel="import" href="/tracing/value/ui/value_set_view.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<style>
-#value-set-json {
- display: none;
-}
-</style>
-
-<script>
-'use strict';
-
-document.addEventListener('DOMContentLoaded', function() {
- var valueSetJson = document.getElementById('value-set-json');
- var values = new tr.v.ValueSet();
- values.addValuesFromDicts(JSON.parse(valueSetJson.textContent));
- valueSetJson.parentNode.removeChild(valueSetJson);
- document.getElementById('values').values = values;
-});
-</script>
-
-<tr-v-ui-value-set-view id="values"></tr-v-ui-value-set-view>
-
-<div id="value-set-json"></div>
diff --git a/chromium/third_party/catapult/tracing/tracing/results_renderer.py b/chromium/third_party/catapult/tracing/tracing/results_renderer.py
deleted file mode 100644
index 3c0c53502b9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/results_renderer.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import json
-import logging
-import re
-
-import tracing_project
-from py_vulcanize import generate
-
-
-_JSON_TAG = '<div id="value-set-json">%s</div>'
-
-
-def ReadExistingResults(output_stream):
- output_stream.seek(0)
- results_html = output_stream.read()
- if not results_html:
- return []
- m = re.search(_JSON_TAG % '(.*?)', results_html, re.MULTILINE
- | re.DOTALL)
- if not m:
- logging.warn('Failed to extract previous results from HTML output')
- return []
- return json.loads(m.group(1))
-
-
-def RenderHTMLView(values, output_stream, reset_results=False):
- if not reset_results:
- values += ReadExistingResults(output_stream)
- vulcanizer = tracing_project.TracingProject().CreateVulcanizer()
- load_sequence = vulcanizer.CalcLoadSequenceForModuleNames(
- ['tracing.results2_template'])
- html = generate.GenerateStandaloneHTMLAsString(load_sequence)
- html = html.replace(_JSON_TAG % '',
- _JSON_TAG % json.dumps(values, separators=(',', ':')))
- output_stream.seek(0)
- output_stream.write(html)
- output_stream.truncate()
diff --git a/chromium/third_party/catapult/tracing/tracing/results_renderer_unittest.py b/chromium/third_party/catapult/tracing/tracing/results_renderer_unittest.py
deleted file mode 100644
index c1d85350e01..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/results_renderer_unittest.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import codecs
-import StringIO
-import json
-import unittest
-import os
-import tempfile
-
-from tracing import results_renderer
-
-
-# Wrap string IO with a .name property so that it behaves more like a file.
-class StringIOFile(StringIO.StringIO):
- name = 'fake_output_file'
-
-
-class ResultsRendererTest(unittest.TestCase):
-
- def setUp(self):
- tmp = tempfile.NamedTemporaryFile(delete=False)
- tmp.close()
- self.output_file = tmp.name
- self.output_stream = codecs.open(self.output_file,
- mode='r+',
- encoding='utf-8')
-
- def GetOutputFileContent(self):
- self.output_stream.seek(0)
- return self.output_stream.read()
-
- def tearDown(self):
- self.output_stream.close()
- os.remove(self.output_file)
-
- def testBasic(self):
- value0 = {'foo': 0}
- value0_json = json.dumps(value0, separators=(',', ':'))
-
- results_renderer.RenderHTMLView([], self.output_stream, False)
- self.assertEquals([],
- results_renderer.ReadExistingResults(self.output_stream))
- results_renderer.RenderHTMLView([value0], self.output_stream, False)
- self.assertEquals(
- sorted([value0]),
- sorted(results_renderer.ReadExistingResults(self.output_stream)))
- self.assertIn(value0_json, self.GetOutputFileContent())
-
- def testExistingResults(self):
- value0 = {'foo': 0}
- value0_json = json.dumps(value0, separators=(',', ':'))
-
- value1 = {'bar': 1}
- value1_json = json.dumps(value1, separators=(',', ':'))
-
- results_renderer.RenderHTMLView([value0], self.output_stream, False)
- results_renderer.RenderHTMLView([value1], self.output_stream, False)
- self.assertEquals(
- sorted([value0, value1]),
- sorted(results_renderer.ReadExistingResults(self.output_stream)))
- self.assertIn(value0_json, self.GetOutputFileContent())
- self.assertIn(value1_json, self.GetOutputFileContent())
-
- def testExistingResultsReset(self):
- value0 = {'foo': 0}
- value0_json = json.dumps(value0, separators=(',', ':'))
-
- value1 = {'bar': 1}
- value1_json = json.dumps(value1, separators=(',', ':'))
-
- results_renderer.RenderHTMLView([value0], self.output_stream, False)
- results_renderer.RenderHTMLView([value1], self.output_stream, True)
- self.assertEquals(
- sorted([value1]),
- sorted(results_renderer.ReadExistingResults(self.output_stream)))
- self.assertNotIn(value0_json, self.GetOutputFileContent())
- self.assertIn(value1_json, self.GetOutputFileContent())
diff --git a/chromium/third_party/catapult/tracing/tracing/tests.html b/chromium/third_party/catapult/tracing/tracing/tests.html
deleted file mode 100644
index 7924c0d039d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/tests.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<head>
- <title>Trace-Viewer Tests: loading...</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
- <link rel="shortcut icon" href="data:image/x-icon;base64,"
- type="image/x-icon">
-
- <link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
- <link rel="import" href="/tracing/base/unittest/interactive_test_runner.html">
- <style>
- html, body {
- box-sizing: border-box;
- width: 100%;
- height: 100%;
- overflow: hidden;
- margin: 0px;
- }
- </style>
-</head>
-<body>
- <script>
- 'use strict';
-
- window.addEventListener('load', function() {
- tr.b.unittest.loadAndRunTests({
- title: 'All Trace-Viewer Tests',
- getAllSuiteRelPathsAsync: function() {
- return tr.b.getAsync('/tracing/tests').then(function(json) {
- return JSON.parse(json).test_relpaths;
- }).catch(function(e) {
- throw e;
- });
- },
- testLinks: [
- {linkPath: '/tracing_examples/skia_debugger.html',
- title: 'Skia Debugger'},
- {linkPath: '/tracing_examples/trace_viewer.html',
- title: 'Trace File Viewer'}
- ]
- });
- });
- </script>
-</body>
-</html>
diff --git a/chromium/third_party/catapult/tracing/tracing/trace2html.html b/chromium/third_party/catapult/tracing/tracing/trace2html.html
deleted file mode 100644
index 4b410cb040e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/trace2html.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/ui/base/base.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
-<script>
-'use strict';
-
-var g_timelineViewEl;
-
-(function() {
- var styleEl = document.createElement('style');
- var lines = [
- 'html, body {',
- ' box-sizing: border-box;',
- ' overflow: hidden;',
- ' margin: 0px;',
- ' padding: 0;',
- ' width: 100%;',
- ' height: 100%;',
- '}',
- 'tr-ui-timeline-view {',
- ' width: 100%;',
- ' height: 100%;',
- '}',
- 'tr-ui-timeline-view:focus {',
- ' outline: none;',
- '}'
- ];
- Polymer.dom(styleEl).textContent = lines.join('\n');
- Polymer.dom(document.head).appendChild(styleEl);
-})();
-
-document.addEventListener('DOMContentLoaded', function() {
- var container = document.createElement('track-view-container');
- container.id = 'track_view_container';
-
- g_timelineViewEl = document.createElement('tr-ui-timeline-view');
- Polymer.dom(g_timelineViewEl).appendChild(container);
-
- Polymer.dom(document.body).appendChild(g_timelineViewEl);
-
- var traces = [];
- var viewerDataScripts = Polymer.dom(document).querySelectorAll(
- '#viewer-data');
- for (var i = 0; i < viewerDataScripts.length; i++) {
- var text = Polymer.dom(viewerDataScripts[i]).textContent;
- // Trim leading newlines off the text. They happen during writing.
- while (text[0] === '\n')
- text = text.substring(1);
- traces.push(tr.b.Base64.atob(text));
- }
-
- var m = new tr.Model();
- var i = new tr.importer.Import(m);
- var p = i.importTracesWithProgressDialog(traces);
- p.then(
- function() {
- g_timelineViewEl.model = m;
- g_timelineViewEl.updateDocumentFavicon();
- g_timelineViewEl.globalMode = true;
- g_timelineViewEl.viewTitle = document.title;
- },
- function(err) {
- var overlay = new tr.ui.b.Overlay();
- Polymer.dom(overlay).textContent = tr.b.normalizeException(err).message;
- overlay.title = 'Import error';
- overlay.visible = true;
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view.html
deleted file mode 100644
index 0d2cfecf43a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view.html
+++ /dev/null
@@ -1,180 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id='tr-ui-a-alert-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table">
- </tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-alert-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.currentSelection_ = undefined;
- this.$.table.tableColumns = [
- {
- title: 'Label',
- value: function(row) { return row.name; },
- width: '150px'
- },
- {
- title: 'Value',
- width: '100%',
- value: function(row) { return row.value; }
- }
- ];
- this.$.table.showHeader = false;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- getRowsForSingleAlert_: function(alert) {
- var rows = [];
-
- // Arguments
- for (var argName in alert.args) {
- var argView =
- document.createElement('tr-ui-a-generic-object-view');
- argView.object = alert.args[argName];
- rows.push({ name: argName, value: argView });
- }
-
- // Associated events
- if (alert.associatedEvents.length) {
- alert.associatedEvents.forEach(function(event, i) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(
- new tr.model.EventSet(event), event.title);
-
- var valueString = '';
- if (event instanceof tr.model.TimedEvent)
- valueString = 'took ' + event.duration.toFixed(2) + 'ms';
-
- rows.push({
- name: linkEl,
- value: valueString
- });
- });
- }
-
- // Description
- var descriptionEl = tr.ui.b.createDiv({
- textContent: alert.info.description,
- maxWidth: '300px'
- });
- rows.push({
- name: 'Description',
- value: descriptionEl
- });
-
- // Additional Reading Links
- if (alert.info.docLinks) {
- alert.info.docLinks.forEach(function(linkObject) {
- var linkEl = document.createElement('a');
- linkEl.target = '_blank';
- linkEl.href = linkObject.href;
- Polymer.dom(linkEl).textContent = Polymer.dom(linkObject).textContent;
- rows.push({
- name: linkObject.label,
- value: linkEl
- });
- });
- }
- return rows;
- },
-
- getRowsForAlerts_: function(alerts) {
- if (alerts.length === 1) {
- var rows = [{
- name: 'Alert',
- value: tr.b.getOnlyElement(alerts).title
- }];
- var detailRows = this.getRowsForSingleAlert_(tr.b.getOnlyElement(alerts));
- rows.push.apply(rows, detailRows);
- return rows;
- } else {
- return alerts.map(function(alert) {
- return {
- name: 'Alert',
- value: alert.title,
- isExpanded: alerts.size < 10, // This is somewhat arbitrary for now.
- subRows: this.getRowsForSingleAlert_(alert)
- };
- }, this);
- }
- },
-
- updateContents_: function() {
- if (this.currentSelection_ === undefined) {
- this.$.table.rows = [];
- this.$.table.rebuild();
- return;
- }
-
- var alerts = this.currentSelection_;
- this.$.table.tableRows = this.getRowsForAlerts_(alerts);
- this.$.table.rebuild();
- },
-
- get relatedEventsToHighlight() {
- if (!this.currentSelection_)
- return undefined;
- var result = new tr.model.EventSet();
- for (var event of this.currentSelection_)
- result.addEventSet(event.associatedEvents);
- return result;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-alert-sub-view',
- tr.model.Alert,
- {
- multi: false,
- title: 'Alert',
- });
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-alert-sub-view',
- tr.model.Alert,
- {
- multi: true,
- title: 'Alerts',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view_test.html
deleted file mode 100644
index cc2a1b668ae..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/alert_sub_view_test.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('instantiate', function() {
- var slice = newSliceEx({title: 'b', start: 0, duration: 0.002});
-
- var alertInfo = new tr.model.EventInfo(
- 'alertInfo', 'Critical alert',
- [{
- label: 'Project Page',
- textContent: 'Trace-Viewer Github Project',
- href: 'https://github.com/google/trace-viewer/'
- }]);
-
- var alert = new tr.model.Alert(alertInfo, 5, [slice]);
- assert.equal(1, alert.associatedEvents.length);
-
- var subView = document.createElement('tr-ui-a-alert-sub-view');
- subView.selection = new tr.model.EventSet(alert);
- assert.isTrue(
- subView.relatedEventsToHighlight.equals(alert.associatedEvents));
- this.addHTMLOutput(subView);
-
- var table = tr.b.findDeepElementMatching(
- subView, 'tr-ui-b-table');
-
- var rows = table.tableRows;
- var columns = table.tableColumns;
- assert.lengthOf(rows, 4);
- assert.lengthOf(columns, 2);
- });
-
- test('instantiate_twoAlertsWithRelatedEvents', function() {
- var slice1 = newSliceEx({title: 'b', start: 0, duration: 0.002});
- var slice2 = newSliceEx({title: 'b', start: 1, duration: 0.002});
-
- var alertInfo1 = new tr.model.EventInfo(
- 'alertInfo1', 'Critical alert',
- [{
- label: 'Project Page',
- textContent: 'Trace-Viewer Github Project',
- href: 'https://github.com/google/trace-viewer/'
- }]);
-
- var alertInfo2 = new tr.model.EventInfo(
- 'alertInfo2', 'Critical alert',
- [{
- label: 'Google Homepage',
- textContent: 'Google Search Page',
- href: 'http://www.google.com'
- }]);
-
- var alert1 = new tr.model.Alert(alertInfo1, 5, [slice1]);
- var alert2 = new tr.model.Alert(alertInfo2, 5, [slice2]);
-
- var subView = document.createElement('tr-ui-a-alert-sub-view');
- subView.selection = new tr.model.EventSet([alert1, alert2]);
- assert.isTrue(subView.relatedEventsToHighlight.equals(
- new tr.model.EventSet([
- tr.b.getOnlyElement(alert1.associatedEvents),
- tr.b.getOnlyElement(alert2.associatedEvents)
- ])));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link.html
deleted file mode 100644
index a0fd79af567..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-
-<dom-module id='tr-ui-a-analysis-link'>
- <template>
- <style>
- :host {
- display: inline;
- cursor: pointer;
- cursor: pointer;
- white-space: nowrap;
- }
- a {
- text-decoration: underline;
- }
- </style>
- <a href="{{href}}" on-click="onClicked_" on-mouseenter="onMouseEnter_" on-mouseleave="onMouseLeave_"><content></content></a>
-
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-analysis-link',
-
- properties: {
- href: {
- type: String
- }
- },
-
- listeners: {
- 'click': 'onClicked_',
- 'mouseenter': 'onMouseEnter_',
- 'mouseleave': 'onMouseLeave_'
- },
-
- ready: function() {
- this.selection_ = undefined;
- },
-
- attached: function() {
- // Save an instance of the controller since it's going to be used in
- // detached() where it can no longer be obtained.
- this.controller_ =
- tr.c.BrushingStateController.getControllerForElement(this);
- },
-
- detached: function() {
- // Reset highlights.
- this.clearHighlight_();
- this.controller_ = undefined;
- },
-
- set color(c) {
- this.style.color = c;
- },
-
- /**
- * @return {*|function():*}
- */
- get selection() {
- return this.selection_;
- },
-
- /**
- * |selection| can be anything except a function, or else a function that
- * can return anything.
- *
- * In the context of trace_viewer, |selection| is typically an EventSet,
- * whose events will be highlighted by trace_viewer when this link is
- * clicked or mouse-entered.
- *
- * If |selection| is not a function, then it will be dispatched to this
- * link's embedder via a RequestSelectionChangeEvent when this link is
- * clicked or mouse-entered.
- *
- * If |selection| is a function, then it will be called when this link is
- * clicked or mouse-entered, and its result will be dispatched to this
- * link's embedder via a RequestSelectionChangeEvent.
- *
- * @param {*|function():*} selection
- */
- set selection(selection) {
- this.selection_ = selection;
- Polymer.dom(this).textContent = selection.userFriendlyName;
- },
-
- setSelectionAndContent: function(selection, opt_textContent) {
- this.selection_ = selection;
- if (opt_textContent)
- Polymer.dom(this).textContent = opt_textContent;
- },
-
- /**
- * If |selection| is a function, call it and return the result.
- * Otherwise return |selection| directly.
- *
- * @return {*}
- */
- getCurrentSelection_: function() {
- // Gets the current selection, invoking the selection function if needed.
- if (typeof this.selection_ === 'function')
- return this.selection_();
- return this.selection_;
- },
-
- setHighlight_: function(opt_eventSet) {
- if (this.controller_)
- this.controller_.changeAnalysisLinkHoveredEvents(opt_eventSet);
- },
-
- clearHighlight_: function(opt_eventSet) {
- this.setHighlight_();
- },
-
- onClicked_: function(clickEvent) {
- if (!this.selection_)
- return;
-
- clickEvent.stopPropagation();
-
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = this.getCurrentSelection_();
- this.dispatchEvent(event);
- },
-
- onMouseEnter_: function() {
- this.setHighlight_(this.getCurrentSelection_());
- },
-
- onMouseLeave_: function() {
- this.clearHighlight_();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link_test.html
deleted file mode 100644
index 9245acb3ee9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_link_test.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('testBasic', function() {
- var link = document.createElement('tr-ui-a-analysis-link');
-
- var i10 = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'name', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
-
- link.selection = new tr.model.EventSet(s10);
- this.addHTMLOutput(link);
-
- var didRSC = false;
- link.addEventListener('requestSelectionChange', function(e) {
- didRSC = true;
- assert.isTrue(e.selection.equals(new tr.model.EventSet(s10)));
- });
- link.click();
- assert.isTrue(didRSC);
- });
-
- test('testGeneratorVersion', function() {
- var link = document.createElement('tr-ui-a-analysis-link');
-
- var i10 = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'name', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
-
- function selectionGenerator() {
- return new tr.model.EventSet(s10);
- }
- selectionGenerator.userFriendlyName = 'hello world';
- link.selection = selectionGenerator;
- this.addHTMLOutput(link);
-
- var didRSC = false;
- link.addEventListener('requestSelectionChange', function(e) {
- assert.isTrue(e.selection.equals(new tr.model.EventSet(s10)));
- didRSC = true;
- });
- link.click();
- assert.isTrue(didRSC);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view.html
deleted file mode 100644
index 66bae5772d4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view.html
+++ /dev/null
@@ -1,266 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<!--
-@fileoverview Polymer element for various analysis sub-views.
--->
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var AnalysisSubView = {
- set tabLabel(label) {
- Polymer.dom(this).setAttribute('tab-label', label);
- },
-
- get tabLabel() {
- return this.getAttribute('tab-label');
- },
-
- get requiresTallView() {
- return false;
- },
-
- get relatedEventsToHighlight() {
- return undefined;
- },
-
- /**
- * Each element extending this one must implement
- * a 'selection' property.
- */
- set selection(selection) {
- throw new Error('Not implemented!');
- },
-
- get selection() {
- throw new Error('Not implemented!');
- }
- };
-
- // Basic registry.
- var allTypeInfosByEventProto = new Map();
- var onlyRootTypeInfosByEventProto = undefined;
- var eventProtoToRootTypeInfoMap = undefined;
-
- function AnalysisSubViewTypeInfo(eventConstructor, options) {
- if (options.multi === undefined)
- throw new Error('missing field: multi');
- if (options.title === undefined)
- throw new Error('missing field: title');
- this.eventConstructor = eventConstructor;
-
- this.singleTagName = undefined;
- this.singleTitle = undefined;
-
- this.multiTagName = undefined;
- this.multiTitle = undefined;
-
- // This is computed by rebuildRootSubViewTypeInfos, so don't muck with it!
- this.childrenTypeInfos_ = undefined;
- };
-
- AnalysisSubViewTypeInfo.prototype = {
- get childrenTypeInfos() {
- return this.childrenTypeInfos_;
- },
-
- resetchildrenTypeInfos: function() {
- this.childrenTypeInfos_ = [];
- }
- };
-
- AnalysisSubView.register = function(tagName, eventConstructor, options) {
- var typeInfo = allTypeInfosByEventProto.get(eventConstructor.prototype);
- if (typeInfo === undefined) {
- typeInfo = new AnalysisSubViewTypeInfo(eventConstructor, options);
- allTypeInfosByEventProto.set(typeInfo.eventConstructor.prototype,
- typeInfo);
-
- onlyRootTypeInfosByEventProto = undefined;
- }
-
- if (!options.multi) {
- if (typeInfo.singleTagName !== undefined)
- throw new Error('SingleTagName already set');
- typeInfo.singleTagName = tagName;
- typeInfo.singleTitle = options.title;
- } else {
- if (typeInfo.multiTagName !== undefined)
- throw new Error('MultiTagName already set');
- typeInfo.multiTagName = tagName;
- typeInfo.multiTitle = options.title;
- }
- return typeInfo;
- };
-
- function rebuildRootSubViewTypeInfos() {
- onlyRootTypeInfosByEventProto = new Map();
- allTypeInfosByEventProto.forEach(function(typeInfo) {
- typeInfo.resetchildrenTypeInfos();
- });
-
- // Find all root typeInfos.
- allTypeInfosByEventProto.forEach(function(typeInfo, eventProto) {
- var eventPrototype = typeInfo.eventConstructor.prototype;
-
- var lastEventProto = eventPrototype;
- var curEventProto = eventPrototype.__proto__;
- while (true) {
- if (!allTypeInfosByEventProto.has(curEventProto)) {
- var rootTypeInfo = allTypeInfosByEventProto.get(lastEventProto);
- var rootEventProto = lastEventProto;
-
- var isNew = onlyRootTypeInfosByEventProto.has(rootEventProto);
- onlyRootTypeInfosByEventProto.set(rootEventProto,
- rootTypeInfo);
- break;
- }
-
- lastEventProto = curEventProto;
- curEventProto = curEventProto.__proto__;
- }
- });
-
- // Build the childrenTypeInfos array.
- allTypeInfosByEventProto.forEach(function(typeInfo, eventProto) {
- var eventPrototype = typeInfo.eventConstructor.prototype;
- var parentEventProto = eventPrototype.__proto__;
- var parentTypeInfo = allTypeInfosByEventProto.get(parentEventProto);
- if (!parentTypeInfo)
- return;
- parentTypeInfo.childrenTypeInfos.push(typeInfo);
- });
-
- // Build the eventProto to rootTypeInfo map.
- eventProtoToRootTypeInfoMap = new Map();
- allTypeInfosByEventProto.forEach(function(typeInfo, eventProto) {
- var eventPrototype = typeInfo.eventConstructor.prototype;
-
- var curEventProto = eventPrototype;
- while (true) {
- if (onlyRootTypeInfosByEventProto.has(curEventProto)) {
- var rootTypeInfo = onlyRootTypeInfosByEventProto.get(
- curEventProto);
- eventProtoToRootTypeInfoMap.set(eventPrototype,
- rootTypeInfo);
- break;
- }
- curEventProto = curEventProto.__proto__;
- }
- });
- }
-
- function findLowestTypeInfoForEvents(thisTypeInfo, events) {
- if (events.length === 0)
- return thisTypeInfo;
- var event0 = tr.b.getFirstElement(events);
-
- var candidateSubTypeInfo;
- for (var i = 0; i < thisTypeInfo.childrenTypeInfos.length; i++) {
- var childTypeInfo = thisTypeInfo.childrenTypeInfos[i];
- if (event0 instanceof childTypeInfo.eventConstructor) {
- candidateSubTypeInfo = childTypeInfo;
- break;
- }
- }
- if (!candidateSubTypeInfo)
- return thisTypeInfo;
-
- // Validate that all the other events are instances of the candidate type.
- var allMatch = true;
- for (var event of events) {
- if (event instanceof candidateSubTypeInfo.eventConstructor)
- continue;
- allMatch = false;
- break;
- }
-
- if (!allMatch) {
- return thisTypeInfo;
- }
-
- return findLowestTypeInfoForEvents(candidateSubTypeInfo, events);
- }
-
- var primaryEventProtoToTypeInfoMap = new Map();
- function getRootTypeInfoForEvent(event) {
- var curProto = event.__proto__;
- var typeInfo = primaryEventProtoToTypeInfoMap.get(curProto);
- if (typeInfo)
- return typeInfo;
- return getRootTypeInfoForEventSlow(event);
- }
-
- function getRootTypeInfoForEventSlow(event) {
- var typeInfo;
- var curProto = event.__proto__;
- while (true) {
- if (curProto === Object.prototype)
- throw new Error('No view registered for ' + event.toString());
- typeInfo = onlyRootTypeInfosByEventProto.get(curProto);
- if (typeInfo) {
- primaryEventProtoToTypeInfoMap.set(event.__proto__, typeInfo);
- return typeInfo;
- }
- curProto = curProto.__proto__;
- }
- }
-
- AnalysisSubView.getEventsOrganizedByTypeInfo = function(selection) {
- if (onlyRootTypeInfosByEventProto === undefined)
- rebuildRootSubViewTypeInfos();
-
- // Base grouping.
- var eventsByRootTypeInfo = tr.b.groupIntoMap(
- selection,
- function(event) {
- return getRootTypeInfoForEvent(event);
- },
- this, tr.model.EventSet);
-
- // Now, try to lower the typeinfo to the most specific type that still
- // encompasses the event group.
- //
- // For instance, if we have 3 ThreadSlices, and all three are V8 slices,
- // then we can convert this to use the V8Slices's typeinfos. But, if one
- // of those slices was not a V8Slice, then we must still use
- // ThreadSlice.
- //
- // The reason for this is for the confusion that might arise from the
- // alternative. Suppose you click on a set of mixed slices, we want to show
- // you the most correct information, and let you navigate to . If we instead
- // showed you a V8 slices tab, and a Slices tab, we present the user with an
- // ambiguity: is the V8 slice also in the Slices tab? Or is it not? Better,
- // we think, to just only ever show an event in one place at a time, and
- // avoid the possible confusion.
- var eventsByLowestTypeInfo = new Map();
- eventsByRootTypeInfo.forEach(function(events, typeInfo) {
- var lowestTypeInfo = findLowestTypeInfoForEvents(typeInfo, events);
- eventsByLowestTypeInfo.set(lowestTypeInfo, events);
- });
-
- return eventsByLowestTypeInfo;
- };
-
- return {
- AnalysisSubView: AnalysisSubView,
- AnalysisSubViewTypeInfo: AnalysisSubViewTypeInfo
- };
-});
-
-// Dummy element for testing
-Polymer({
- is: 'tr-ui-a-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView]
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view_test.html
deleted file mode 100644
index dfe8e30d96c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_sub_view_test.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('subViewThrowsNotImplementedErrors', function() {
- var subView = document.createElement('tr-ui-a-sub-view');
-
- assert.throw(function() {
- subView.selection = new tr.model.EventSet();
- }, 'Not implemented!');
-
- assert.throw(function() {
- var viewSelection = subView.selection;
- }, 'Not implemented!');
-
- subView.tabLabel = 'Tab Label';
- assert.equal(subView.getAttribute('tab-label'), 'Tab Label');
- assert.equal(subView.tabLabel, 'Tab Label');
-
- subView.tabLabel = 'New Label';
- assert.equal(subView.getAttribute('tab-label'), 'New Label');
- assert.equal(subView.tabLabel, 'New Label');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view.html
deleted file mode 100644
index f5a8a387a08..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/alert_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/container_memory_dump_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/counter_sample_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_async_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_cpu_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_flow_event_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_frame_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/multi_instant_event_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_object_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_power_sample_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_sample_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_thread_slice_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/multi_thread_time_slice_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/multi_user_expectation_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_async_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_cpu_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_flow_event_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_frame_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_instant_event_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_object_instance_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_object_snapshot_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_power_sample_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_sample_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_thread_slice_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_thread_time_slice_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/single_user_expectation_sub_view.html">
-<link rel="import" href="/tracing/ui/base/tab_view.html">
-
-<!--
-@fileoverview A component used to display an analysis of a selection,
-using custom elements specialized for different event types.
--->
-<dom-module id='tr-ui-a-analysis-view'>
- <template>
- <style>
- :host {
- background-color: white;
- display: flex;
- flex-direction: column;
- height: 275px;
- overflow: auto;
- }
-
- :host(.tall-mode) {
- height: 525px;
- }
- </style>
- <content></content>
- </template>
-</dom-module>
-<script>
-'use strict';
-(function() {
- var EventRegistry = tr.model.EventRegistry;
-
- /** Returns the label that goes next to the list of tabs. */
- function getTabStripLabel(numEvents) {
- if (numEvents === 0)
- return 'Nothing selected. Tap stuff.';
- else if (numEvents === 1)
- return '1 item selected.';
- return numEvents + ' items selected.';
- }
-
- function createSubView(subViewTypeInfo, selection) {
- var tagName;
- if (selection.length === 1)
- tagName = subViewTypeInfo.singleTagName;
- else
- tagName = subViewTypeInfo.multiTagName;
-
- if (tagName === undefined) {
- throw new Error('No view registered for ' +
- subViewTypeInfo.eventConstructor.name);
- }
- var subView = document.createElement(tagName);
-
- var title;
- if (selection.length === 1)
- title = subViewTypeInfo.singleTitle;
- else
- title = subViewTypeInfo.multiTitle;
- title += ' (' + selection.length + ')';
- subView.tabLabel = title;
-
- subView.selection = selection;
- return subView;
- }
-
- Polymer({
- is: 'tr-ui-a-analysis-view',
-
- ready: function() {
- this.brushingStateController_ = undefined;
- this.lastSelection_ = undefined;
- this.tabView_ = document.createElement('tr-ui-b-tab-view');
- this.tabView_.addEventListener(
- 'selected-tab-change', this.onSelectedSubViewChanged_.bind(this));
-
- Polymer.dom(this).appendChild(this.tabView_);
- },
-
- set tallMode(value) {
- Polymer.dom(this).classList.toggle('tall-mode', value);
- },
-
- get tallMode() {
- return Polymer.dom(this).classList.contains('tall-mode');
- },
-
- get tabView() {
- return this.tabView_;
- },
-
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- set brushingStateController(brushingStateController) {
- if (this.brushingStateController_) {
- this.brushingStateController_.removeEventListener(
- 'change', this.onSelectionChanged_.bind(this));
- }
-
- this.brushingStateController_ = brushingStateController;
- if (this.brushingStateController) {
- this.brushingStateController_.addEventListener(
- 'change', this.onSelectionChanged_.bind(this));
- }
-
- // The new brushing controller may have a different selection than the
- // last one, so we have to refresh the subview.
- this.onSelectionChanged_();
- },
-
- get selection() {
- return this.brushingStateController_.selection;
- },
-
- onSelectionChanged_: function(e) {
- if (this.lastSelection_ && this.selection.equals(this.lastSelection_))
- return;
- this.lastSelection_ = this.selection;
-
- this.tallMode = false;
-
- this.tabView_.label = getTabStripLabel(this.selection.length);
- var eventsByBaseTypeName =
- this.selection.getEventsOrganizedByBaseType(true);
-
- var ASV = tr.ui.analysis.AnalysisSubView;
- var eventsByTagName = ASV.getEventsOrganizedByTypeInfo(this.selection);
- var newSubViews = [];
- eventsByTagName.forEach(function(events, typeInfo) {
- newSubViews.push(createSubView(typeInfo, events));
- });
-
- this.tabView_.resetSubViews(newSubViews);
- },
-
- onSelectedSubViewChanged_: function() {
- var selectedSubView = this.tabView_.selectedSubView;
-
- if (!selectedSubView) {
- this.tallMode = false;
- this.maybeChangeRelatedEvents_(undefined);
- return;
- }
-
- this.tallMode = selectedSubView.requiresTallView;
- this.maybeChangeRelatedEvents_(selectedSubView.relatedEventsToHighlight);
- },
-
- /** Changes the highlighted related events if possible. */
- maybeChangeRelatedEvents_: function(events) {
- if (this.brushingStateController)
- this.brushingStateController.changeAnalysisViewRelatedEvents(events);
- }
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view_test.html
deleted file mode 100644
index 7f88d256ab5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/analysis_view_test.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/counter.html">
-<link rel="import" href="/tracing/model/counter_sample.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/user_model/stub_expectation.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-<link rel="import" href="/tracing/ui/extras/full_config.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var BrushingStateController = tr.c.BrushingStateController;
- var Model = tr.Model;
- var Counter = tr.model.Counter;
- var CounterSeries = tr.model.CounterSeries;
- var CounterSample = tr.model.CounterSample;
- var newThreadSlice = tr.c.TestUtils.newThreadSlice;
- var SCHEDULING_STATE = tr.model.SCHEDULING_STATE;
- var StubExpectation = tr.model.um.StubExpectation;
-
- function assertEventSet(actualEventSet, expectedEvents) {
- var expectedEventSet = new EventSet(expectedEvents);
- assert.isTrue(actualEventSet.equals(expectedEventSet),
- 'EventSet objects are not equal');
- }
-
- function checkTab(tab, expectedTagName, expectedSelectionEvents) {
- assert.equal(tab.tagName, expectedTagName.toUpperCase());
- assertEventSet(tab.selection, expectedSelectionEvents);
- }
-
- test('selectedTabChange', function() {
- // Set up the model.
- var model = new Model();
- var process = model.getOrCreateProcess(1);
-
- var counter = process.getOrCreateCounter('universe', 'planets');
- var series = counter.addSeries(new CounterSeries('x', 0));
- var sample1 = series.addCounterSample(0, 100);
- var sample2 = series.addCounterSample(1, 90);
- var sample3 = series.addCounterSample(2, 80);
-
- var thread = process.getOrCreateThread(2);
- var slice1 = newThreadSlice(thread, SCHEDULING_STATE.RUNNING, 0, 1);
- var slice2 = newThreadSlice(thread, SCHEDULING_STATE.SLEEPING, 1, 2.718);
- thread.timeSlices = [slice1, slice2];
-
- var record1 = new StubExpectation(
- {parentModel: model, initiatorTitle: 'r1', start: 200, duration: 300});
- record1.associatedEvents.push(sample1);
- record1.associatedEvents.push(slice1);
- var record2 = new StubExpectation(
- {parentModel: model, initiatorTitle: 'r2', start: 600, duration: 100});
- record2.associatedEvents.push(sample2);
- record2.associatedEvents.push(sample3);
- record2.associatedEvents.push(slice1);
-
- // Set up the analysis views and brushing state controller.
- var analysisView = document.createElement('tr-ui-a-analysis-view');
- this.addHTMLOutput(analysisView);
- var tabView = analysisView.tabView;
- var controller = new BrushingStateController(undefined);
- analysisView.brushingStateController = controller;
-
- function checkSelectedTab(expectedSelectedTab, expectedRelatedEvents) {
- assert.strictEqual(tabView.selectedSubView, expectedSelectedTab);
- assertEventSet(controller.currentBrushingState.analysisViewRelatedEvents,
- expectedRelatedEvents);
- }
-
- // 1. Empty selection (implicit).
- assert.lengthOf(tabView.tabs, 0);
- checkSelectedTab(undefined, []);
-
- // 2. Event selection: two samples and one thread slice.
- controller.changeSelectionFromRequestSelectionChangeEvent(
- new EventSet([sample1, slice1, sample2]));
- assert.lengthOf(tabView.tabs, 2);
- var sampleTab2 = tabView.tabs[0];
- checkTab(sampleTab2,
- 'tr-ui-a-counter-sample-sub-view',
- [sample1, sample2]);
- var singleThreadSliceTab2 = tabView.tabs[1];
- checkTab(singleThreadSliceTab2,
- 'tr-ui-a-single-thread-time-slice-sub-view',
- [slice1]);
- // First tab should be selected.
- checkSelectedTab(sampleTab2, []);
-
- // 3. Tab selection: single thread slice tab.
- tabView.selectedSubView = singleThreadSliceTab2;
- checkSelectedTab(singleThreadSliceTab2, []);
-
- // 4. Event selection: one sample, two thread slices, and one
- // user expectation.
- controller.changeSelectionFromRequestSelectionChangeEvent(
- new EventSet([slice1, slice2, sample3, record1]));
- assert.lengthOf(tabView.tabs, 3);
- var sampleTab4 = tabView.tabs[1];
- checkTab(sampleTab4,
- 'tr-ui-a-counter-sample-sub-view',
- [sample3]);
- var singleRecordTab4 = tabView.tabs[2];
- checkTab(singleRecordTab4,
- 'tr-ui-a-single-user-expectation-sub-view',
- [record1]);
- var multiThreadSliceTab4 = tabView.tabs[0];
- checkTab(multiThreadSliceTab4,
- 'tr-ui-a-multi-thread-time-slice-sub-view',
- [slice1, slice2]);
- // Remember selected tab (even though the tab was destroyed).
- checkSelectedTab(multiThreadSliceTab4, []);
-
- // 5. Tab selection: single user expectation tab.
- tabView.selectedSubView = singleRecordTab4;
- checkSelectedTab(singleRecordTab4, [sample1, slice1]);
-
- // 6. Event selection: one user expectation.
- controller.changeSelectionFromRequestSelectionChangeEvent(
- new EventSet([record2]));
- assert.lengthOf(tabView.tabs, 1);
- var singleRecordTab6 = tabView.tabs[0];
- checkTab(singleRecordTab6,
- 'tr-ui-a-single-user-expectation-sub-view',
- [record2]);
- // Remember selected tab.
- checkSelectedTab(singleRecordTab6, [sample2, sample3, slice1]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view.html
deleted file mode 100644
index ba55bd7739c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_header_pane.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane_view.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-container-memory-dump-sub-view'>
- <template>
- <style>
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
- <div id="content"></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- Polymer({
- is: 'tr-ui-a-container-memory-dump-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- set selection(selection) {
- if (selection === undefined) {
- this.currentSelection_ = undefined;
- this.dumpsByContainerName_ = undefined;
- this.updateContents_();
- return;
- }
-
- // Check that the selection contains only container memory dumps.
- selection.forEach(function(event) {
- if (!(event instanceof tr.model.ContainerMemoryDump)) {
- throw new Error(
- 'Memory dump sub-view only supports container memory dumps');
- }
- });
- this.currentSelection_ = selection;
-
- // Group the selected memory dumps by container name and sort them
- // chronologically.
- this.dumpsByContainerName_ = tr.b.group(this.currentSelection_.toArray(),
- function(dump) {
- return dump.containerName;
- });
- tr.b.iterItems(this.dumpsByContainerName_,
- function(containerName, dumps) {
- dumps.sort(function(a, b) { return a.start - b.start; });
- });
-
- this.updateContents_();
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- get requiresTallView() {
- return true;
- },
-
- updateContents_: function() {
- Polymer.dom(this.$.content).textContent = '';
-
- if (this.dumpsByContainerName_ === undefined)
- return;
-
- var containerNames = Object.keys(this.dumpsByContainerName_);
- if (containerNames.length === 0)
- return;
-
- if (containerNames.length > 1)
- this.buildViewForMultipleContainerNames_();
- else
- this.buildViewForSingleContainerName_();
- },
-
- buildViewForSingleContainerName_: function() {
- var containerMemoryDumps =
- tr.b.dictionaryValues(this.dumpsByContainerName_)[0];
- var dumpView = this.ownerDocument.createElement(
- 'tr-ui-a-stacked-pane-view');
- Polymer.dom(this.$.content).appendChild(dumpView);
- dumpView.setPaneBuilder(function() {
- var headerPane = document.createElement(
- 'tr-ui-a-memory-dump-header-pane');
- headerPane.containerMemoryDumps = containerMemoryDumps;
- return headerPane;
- });
- },
-
- buildViewForMultipleContainerNames_: function() {
- // TODO(petrcermak): Provide a more sophisticated view for this case.
- var ownerDocument = this.ownerDocument;
-
- var rows = tr.b.dictionaryValues(tr.b.mapItems(this.dumpsByContainerName_,
- function(containerName, dumps) {
- return {
- containerName: containerName,
- subRows: dumps,
- isExpanded: true
- };
- }));
- rows.sort(function(a, b) {
- return a.containerName.localeCompare(b.containerName);
- });
-
- var columns = [
- {
- title: 'Dump',
-
- value: function(row) {
- if (row.subRows === undefined)
- return this.singleDumpValue_(row);
- else
- return this.groupedDumpValue_(row);
- },
-
- singleDumpValue_: function(row) {
- var linkEl = ownerDocument.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(new tr.model.EventSet([row]));
- Polymer.dom(linkEl).appendChild(tr.v.ui.createScalarSpan(
- row.start, {
- unit: tr.b.Unit.byName.timeStampInMs,
- ownerDocument: ownerDocument
- }));
- return linkEl;
- },
-
- groupedDumpValue_: function(row) {
- var linkEl = ownerDocument.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(new tr.model.EventSet(row.subRows));
- Polymer.dom(linkEl).appendChild(tr.ui.b.createSpan({
- ownerDocument: ownerDocument,
- textContent: row.subRows.length + ' memory dump' +
- (row.subRows.length === 1 ? '' : 's') + ' in '
- }));
- Polymer.dom(linkEl).appendChild(tr.ui.b.createSpan({
- ownerDocument: ownerDocument,
- textContent: row.containerName,
- bold: true
- }));
- return linkEl;
- }
- }
- ];
-
- var table = this.ownerDocument.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.showHeader = false;
- table.rebuild();
- Polymer.dom(this.$.content).appendChild(table);
- }
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-container-memory-dump-sub-view',
- tr.model.GlobalMemoryDump,
- {
- multi: false,
- title: 'Global Memory Dump',
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-container-memory-dump-sub-view',
- tr.model.GlobalMemoryDump,
- {
- multi: true,
- title: 'Global Memory Dumps',
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-container-memory-dump-sub-view',
- tr.model.ProcessMemoryDump,
- {
- multi: false,
- title: 'Process Memory Dump',
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-container-memory-dump-sub-view',
- tr.model.ProcessMemoryDump,
- {
- multi: true,
- title: 'Process Memory Dumps',
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view_test.html
deleted file mode 100644
index 05004a84f99..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/container_memory_dump_sub_view_test.html
+++ /dev/null
@@ -1,349 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import"
- href="/tracing/ui/analysis/container_memory_dump_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var extractVmRegions = tr.ui.analysis.extractVmRegions;
- var extractMemoryAllocatorDumps = tr.ui.analysis.extractMemoryAllocatorDumps;
- var extractHeapDumps = tr.ui.analysis.extractHeapDumps;
-
- function createViewWithSelection(selection, opt_parentElement) {
- var viewEl = document.createElement(
- 'tr-ui-a-container-memory-dump-sub-view');
- if (opt_parentElement)
- Polymer.dom(opt_parentElement).appendChild(viewEl);
- if (selection === undefined) {
- viewEl.selection = undefined;
- } else {
- // Rotate the list of selected dumps to check that the sub-view sorts
- // them properly.
- var length = selection.length;
- viewEl.selection = new tr.model.EventSet(
- selection.slice(length / 2, length).concat(
- selection.slice(0, length / 2)));
- }
- return viewEl;
- }
-
- function createAndCheckContainerMemoryDumpView(
- test, containerMemoryDumps, detailsCheckCallback, opt_parentElement) {
- var viewEl =
- createViewWithSelection(containerMemoryDumps, opt_parentElement);
- if (!opt_parentElement)
- test.addHTMLOutput(viewEl);
-
- // The view should contain a stacked pane view with memory dump header and
- // overview panes.
- var stackedPaneViewEl = tr.b.findDeepElementMatching(
- viewEl, 'tr-ui-a-stacked-pane-view');
- var headerPaneEl = tr.b.findDeepElementMatching(
- stackedPaneViewEl, 'tr-ui-a-memory-dump-header-pane');
- var overviewPaneEl = tr.b.findDeepElementMatching(
- stackedPaneViewEl, 'tr-ui-a-memory-dump-overview-pane');
-
- // Check that the header pane and overview pane are correctly set up.
- var processMemoryDumps = containerMemoryDumps.map(function(containerDump) {
- return containerDump.processMemoryDumps;
- });
- assert.deepEqual(
- tr.b.asArray(headerPaneEl.containerMemoryDumps), containerMemoryDumps);
- assert.deepEqual(overviewPaneEl.processMemoryDumps, processMemoryDumps);
- assert.strictEqual(
- overviewPaneEl.aggregationMode, headerPaneEl.aggregationMode);
-
- // Get the overview pane table to drive the details pane checks.
- var overviewTableEl = tr.b.findDeepElementMatching(
- overviewPaneEl, 'tr-ui-b-table');
-
- function checkVmRegionsPane(pid) {
- var detailsPaneEl = tr.b.findDeepElementMatching(
- stackedPaneViewEl, 'tr-ui-a-memory-dump-vm-regions-details-pane');
- if (pid === undefined) {
- assert.isUndefined(detailsPaneEl);
- } else {
- assert.deepEqual(tr.b.asArray(detailsPaneEl.vmRegions),
- extractVmRegions(processMemoryDumps, pid));
- assert.strictEqual(
- detailsPaneEl.aggregationMode, headerPaneEl.aggregationMode);
- }
- }
-
- function checkAllocatorPane(pid, allocatorName, withHeapDetailsPane) {
- var allocatorDetailsPaneEl = tr.b.findDeepElementMatching(
- stackedPaneViewEl, 'tr-ui-a-memory-dump-allocator-details-pane');
- if (pid === undefined) {
- assert.isUndefined(allocatorDetailsPaneEl);
- assert.isUndefined(allocatorName); // Test sanity check.
- assert.isUndefined(withHeapDetailsPane); // Test sanity check.
- return;
- }
-
- assert.deepEqual(
- tr.b.asArray(allocatorDetailsPaneEl.memoryAllocatorDumps),
- extractMemoryAllocatorDumps(processMemoryDumps, pid, allocatorName));
- assert.strictEqual(
- allocatorDetailsPaneEl.aggregationMode, headerPaneEl.aggregationMode);
-
- var heapDetailsPaneEl = tr.b.findDeepElementMatching(
- stackedPaneViewEl, 'tr-ui-a-memory-dump-heap-details-pane');
- if (!withHeapDetailsPane) {
- assert.isUndefined(heapDetailsPaneEl);
- return;
- }
-
- assert.deepEqual(tr.b.asArray(heapDetailsPaneEl.heapDumps),
- extractHeapDumps(processMemoryDumps, pid, allocatorName));
- assert.strictEqual(
- heapDetailsPaneEl.aggregationMode, headerPaneEl.aggregationMode);
- }
-
- detailsCheckCallback(
- overviewTableEl, checkVmRegionsPane, checkAllocatorPane);
- }
-
- test('instantiate_empty', function() {
- // All these views should be completely empty.
- var unsetViewEl = document.createElement(
- 'tr-ui-a-container-memory-dump-sub-view');
- this.addHTMLOutput(unsetViewEl);
- assert.equal(unsetViewEl.getBoundingClientRect().width, 0);
- assert.equal(unsetViewEl.getBoundingClientRect().height, 0);
-
- var undefinedViewEl = createViewWithSelection(undefined);
- this.addHTMLOutput(undefinedViewEl);
- assert.equal(undefinedViewEl.getBoundingClientRect().width, 0);
- assert.equal(undefinedViewEl.getBoundingClientRect().height, 0);
-
- var emptyViewEl = createViewWithSelection([]);
- this.addHTMLOutput(emptyViewEl);
- assert.equal(emptyViewEl.getBoundingClientRect().width, 0);
- assert.equal(emptyViewEl.getBoundingClientRect().height, 0);
- });
-
- test('instantiate_singleGlobalMemoryDump', function() {
- createAndCheckContainerMemoryDumpView(this,
- [tr.ui.analysis.createSingleTestGlobalMemoryDump()],
- function(overviewTableEl, checkVmRegionsPane, checkAllocatorPane) {
- // Nothing should be selected initially.
- assert.isUndefined(overviewTableEl.selectedTableRow);
- assert.isUndefined(overviewTableEl.selectedColumnIndex);
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Total resident of Process 1.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[0];
- overviewTableEl.selectedColumnIndex = 1;
- checkVmRegionsPane(1 /* PID */);
- checkAllocatorPane(undefined);
-
- // PSS of process 4.
- overviewTableEl.selectedColumnIndex = 3;
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[2];
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Malloc of process 2.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[1];
- overviewTableEl.selectedColumnIndex = 9;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'malloc',
- false /* no heap details pane */);
- });
- });
-
- test('instantiate_multipleGlobalMemoryDumps', function() {
- createAndCheckContainerMemoryDumpView(this,
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps(),
- function(overviewTableEl, checkVmRegionsPane, checkAllocatorPane) {
- // Nothing should be selected initially.
- assert.isUndefined(overviewTableEl.selectedTableRow);
- assert.isUndefined(overviewTableEl.selectedColumnIndex);
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Blink of Process 1.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[0];
- overviewTableEl.selectedColumnIndex = 7;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Peak total resident of Process 4.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[3];
- overviewTableEl.selectedColumnIndex = 2;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // V8 of Process 3.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[2];
- overviewTableEl.selectedColumnIndex = 11;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(3 /* PID */, 'v8', true /* heap details pane */);
- });
- });
-
- test('instantiate_singleProcessMemoryDump', function() {
- createAndCheckContainerMemoryDumpView(this,
- [tr.ui.analysis.createSingleTestProcessMemoryDump()],
- function(overviewTableEl, checkVmRegionsPane, checkAllocatorPane) {
- // Nothing should be selected initially.
- assert.isUndefined(overviewTableEl.selectedTableRow);
- assert.isUndefined(overviewTableEl.selectedColumnIndex);
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Tracing of Process 2.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[0];
- overviewTableEl.selectedColumnIndex = 12;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'tracing',
- false /* no heap details pane */);
-
- // Blink of Process 2.
- overviewTableEl.selectedColumnIndex = 7;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'blink',
- false /* no heap details pane */);
-
- // Total resident of Process 2.
- overviewTableEl.selectedColumnIndex = 1;
- checkVmRegionsPane(2 /* PID */);
- checkAllocatorPane(undefined);
- });
- });
-
- test('instantiate_multipleProcessMemoryDumps', function() {
- createAndCheckContainerMemoryDumpView(this,
- tr.ui.analysis.createMultipleTestProcessMemoryDumps(),
- function(overviewTableEl, checkVmRegionsPane, checkAllocatorPane) {
- // Nothing should be selected initially.
- assert.isUndefined(overviewTableEl.selectedTableRow);
- assert.isUndefined(overviewTableEl.selectedColumnIndex);
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Tracing of Process 2.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[0];
- overviewTableEl.selectedColumnIndex = 12;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'tracing',
- false /* no heap details pane */);
-
- // V8 of Process 2.
- overviewTableEl.selectedColumnIndex = 11;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'v8',
- false /* no heap details pane */);
-
- // PSS of Process 2.
- overviewTableEl.selectedColumnIndex = 3;
- checkVmRegionsPane(2 /* PID */);
- checkAllocatorPane(undefined);
- });
- });
-
- test('memory', function() {
- var containerEl = document.createElement('div');
- containerEl.brushingStateController =
- new tr.c.BrushingStateController(undefined);
-
- // Create the first container memory view.
- createAndCheckContainerMemoryDumpView(this,
- [tr.ui.analysis.createSingleTestProcessMemoryDump()],
- function(overviewTableEl, checkVmRegionsPane, checkAllocatorPane) {
- // Nothing should be selected initially.
- assert.isUndefined(overviewTableEl.selectedTableRow);
- assert.isUndefined(overviewTableEl.selectedColumnIndex);
- checkVmRegionsPane(undefined);
- checkAllocatorPane(undefined);
-
- // Select V8 of Process 2.
- overviewTableEl.selectedTableRow = overviewTableEl.tableRows[0];
- overviewTableEl.selectedColumnIndex = 11;
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'v8',
- false /* no heap details pane */);
- }, containerEl);
-
- // Destroy the first container memory view.
- Polymer.dom(containerEl).textContent = '';
-
- // Create the second container memory view.
- createAndCheckContainerMemoryDumpView(this,
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps(),
- function(overviewTableEl, checkVmRegionsPane, checkAllocatorPane) {
- // V8 of Process 2 should still be selected (even though the selection
- // changed).
- assert.strictEqual(
- overviewTableEl.selectedTableRow, overviewTableEl.tableRows[1]);
- assert.equal(overviewTableEl.selectedColumnIndex, 11);
- checkVmRegionsPane(undefined);
- checkAllocatorPane(2 /* PID */, 'v8',
- false /* no heap details pane */);
- }, containerEl);
- });
-
- test('instantiate_differentProcessMemoryDumps', function() {
- var globalMemoryDumps =
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps();
- // 2 dumps in Process 1, 3 dumps in Process 2, and 1 dump in Process 4
- // (intentionally shuffled to check sorting).
- var differentProcessDumps = [
- globalMemoryDumps[1].processMemoryDumps[2],
- globalMemoryDumps[0].processMemoryDumps[1],
- globalMemoryDumps[0].processMemoryDumps[2],
- globalMemoryDumps[1].processMemoryDumps[4],
- globalMemoryDumps[1].processMemoryDumps[1],
- globalMemoryDumps[2].processMemoryDumps[2]
- ];
-
- var viewEl = createViewWithSelection(differentProcessDumps);
- this.addHTMLOutput(viewEl);
-
- var tableEl = tr.b.findDeepElementMatching(viewEl, 'tr-ui-b-table');
- assert.lengthOf(tableEl.tableRows, 3);
- assert.lengthOf(tableEl.tableColumns, 1);
- var rows = tableEl.tableRows;
- var col = tableEl.tableColumns[0];
-
- assert.equal(Polymer.dom(col.value(rows[0])).textContent,
- '2 memory dumps in Process 1');
- assert.equal(Polymer.dom(col.value(rows[1])).textContent,
- '3 memory dumps in Process 2');
- assert.equal(Polymer.dom(col.value(rows[2])).textContent,
- '1 memory dump in Process 4');
-
- // Check that the analysis link is associated with the right dumps.
- assert.isTrue(col.value(rows[1]).selection.equals(new tr.model.EventSet([
- globalMemoryDumps[0].processMemoryDumps[2],
- globalMemoryDumps[1].processMemoryDumps[2],
- globalMemoryDumps[2].processMemoryDumps[2]
- ])));
-
- assert.lengthOf(rows[1].subRows, 3);
- var subRow = rows[1].subRows[0];
-
- // Check the timestamp.
- assert.equal(col.value(subRow).children[0].value, 42);
-
- // Check that the analysis link is associated with the right dump.
- assert.isTrue(col.value(subRow).selection.equals(
- new tr.model.EventSet(globalMemoryDumps[0].processMemoryDumps[2])));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view.html
deleted file mode 100644
index db03cdb4e30..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-a-counter-sample-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id='table'></tr-ui-b-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-(function() {
- var COUNTER_SAMPLE_TABLE_COLUMNS = [
- {
- title: 'Counter',
- width: '150px',
- value: function(row) { return row.counter; }
- },
- {
- title: 'Series',
- width: '150px',
- value: function(row) { return row.series; }
- },
- {
- title: 'Time',
- width: '150px',
- value: function(row) { return row.start; }
- },
- {
- title: 'Value',
- width: '100%',
- value: function(row) { return row.value; }
- }
- ];
-
- Polymer({
- is: 'tr-ui-a-counter-sample-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.currentSelection_ = undefined;
- this.$.table.tableColumns = COUNTER_SAMPLE_TABLE_COLUMNS;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- updateContents_: function() {
- this.$.table.tableRows =
- this.selection ? this.getRows_(this.selection.toArray()) : [];
- this.$.table.rebuild();
- },
-
- /**
- * Returns the table rows for the specified samples.
- *
- * We print each counter/series combination the first time that it
- * appears. For subsequent samples in each series, we omit the counter
- * and series name. This makes it easy to scan to find the next series.
- *
- * Each series can be collapsed. In the expanded state, all samples
- * are shown. In the collapsed state, only the first sample is displayed.
- */
- getRows_: function(samples) {
- var samplesByCounter = tr.b.group(samples, function(sample) {
- return sample.series.counter.guid;
- });
-
- var rows = [];
- tr.b.iterItems(samplesByCounter, function(unused, counterSamples) {
- var samplesBySeries = tr.b.group(counterSamples, function(sample) {
- return sample.series.guid;
- });
-
- tr.b.iterItems(samplesBySeries, function(unused, seriesSamples) {
- var seriesRows = this.getRowsForSamples_(seriesSamples);
- seriesRows[0].counter = seriesSamples[0].series.counter.name;
- seriesRows[0].series = seriesSamples[0].series.name;
-
- if (seriesRows.length > 1) {
- seriesRows[0].subRows = seriesRows.slice(1);
- seriesRows[0].isExpanded = true;
- }
-
- rows.push(seriesRows[0]);
- }, this);
- }, this);
-
- return rows;
- },
-
- getRowsForSamples_: function(samples) {
- return samples.map(function(sample) {
- return {
- start: sample.timestamp,
- value: sample.value
- };
- });
- }
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-counter-sample-sub-view',
- tr.model.CounterSample,
- {
- multi: false,
- title: 'Counter Sample',
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-counter-sample-sub-view',
- tr.model.CounterSample,
- {
- multi: true,
- title: 'Counter Samples',
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view_test.html
deleted file mode 100644
index 4edec830945..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/counter_sample_sub_view_test.html
+++ /dev/null
@@ -1,172 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/counter.html">
-<link rel="import" href="/tracing/model/counter_series.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/counter_sample_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var Counter = tr.model.Counter;
- var CounterSeries = tr.model.CounterSeries;
- var EventSet = tr.model.EventSet;
-
- test('instantiate_undefinedSelection', function() {
- var analysisEl = document.createElement('tr-ui-a-counter-sample-sub-view');
- analysisEl.selection = new EventSet(undefined);
-
- assert.lengthOf(analysisEl.$.table.tableRows, 0);
- });
-
- test('instantiate_oneCounterOneSeries', function() {
- var series = new CounterSeries('series1', 0);
- series.addCounterSample(0, 0);
- series.addCounterSample(1, 10);
-
- var counter = new Counter(null, 0, 'cat', 'ctr1');
- counter.addSeries(series);
-
- var analysisEl = document.createElement('tr-ui-a-counter-sample-sub-view');
- analysisEl.selection = new EventSet(series.samples);
- this.addHTMLOutput(analysisEl);
-
- // The first sample should be listed as a collapsible header row for the
- // series.
- var rows = analysisEl.$.table.tableRows;
- assert.lengthOf(rows, 1);
- assert.isTrue(rows[0].isExpanded);
- assert.equal(rows[0].counter, 'ctr1');
- assert.equal(rows[0].series, 'series1');
- assert.equal(rows[0].start, 0);
- assert.equal(rows[0].value, 0);
-
- // The second sample should be listed as a subrow of the first.
- var subRows = rows[0].subRows;
- assert.lengthOf(subRows, 1);
- assert.isUndefined(subRows[0].counter);
- assert.isUndefined(subRows[0].series);
- assert.equal(subRows[0].start, 1);
- assert.equal(subRows[0].value, 10);
- });
-
- test('instantiate_singleSampleDoesntHaveSubrows', function() {
- var series = new CounterSeries('series1', 0);
- series.addCounterSample(0, 0);
-
- var counter = new Counter(null, 0, 'cat', 'ctr1');
- counter.addSeries(series);
-
- var analysisEl = document.createElement('tr-ui-a-counter-sample-sub-view');
- analysisEl.selection = new EventSet(series.samples);
- this.addHTMLOutput(analysisEl);
-
- // The first sample should be listed as a collapsible header row for the
- // series.
- var rows = analysisEl.$.table.tableRows;
- assert.lengthOf(rows, 1);
- assert.equal(rows[0].counter, 'ctr1');
- assert.equal(rows[0].series, 'series1');
- assert.equal(rows[0].start, 0);
- assert.equal(rows[0].value, 0);
- assert.isUndefined(rows[0].subRows);
- });
-
- test('instantiate_oneCounterTwoSeries', function() {
- var series1 = new CounterSeries('series1', 0);
- series1.addCounterSample(1, 10);
- series1.addCounterSample(2, 20);
-
- var series2 = new CounterSeries('series2', 0);
- series2.addCounterSample(3, 30);
-
- var counter = new Counter(null, 0, 'cat', 'ctr1');
- counter.addSeries(series1);
- counter.addSeries(series2);
-
- var analysisEl = document.createElement('tr-ui-a-counter-sample-sub-view');
- analysisEl.selection =
- new EventSet(series1.samples.concat(series2.samples));
- this.addHTMLOutput(analysisEl);
-
- // The first samples should be listed as collapsible header rows for the
- // series.
- var rows = analysisEl.$.table.tableRows;
- assert.lengthOf(rows, 2);
- assert.equal(rows[0].counter, 'ctr1');
- assert.equal(rows[0].series, 'series1');
- assert.equal(rows[0].start, 1);
- assert.equal(rows[0].value, 10);
-
- assert.equal(rows[1].counter, 'ctr1');
- assert.equal(rows[1].series, 'series2');
- assert.equal(rows[1].start, 3);
- assert.equal(rows[1].value, 30);
-
- // The subsequent samples should be listed as subrows of the first.
- var subRows1 = rows[0].subRows;
- assert.lengthOf(subRows1, 1);
- assert.isUndefined(subRows1[0].counter);
- assert.isUndefined(subRows1[0].series);
- assert.equal(subRows1[0].start, 2);
- assert.equal(subRows1[0].value, 20);
-
- assert.isUndefined(rows[1].subRows);
- });
-
- test('instantiate_twoCountersTwoSeries', function() {
- var series1 = new CounterSeries('series1', 0);
- series1.addCounterSample(1, 10);
-
- var series2 = new CounterSeries('series2', 0);
- series2.addCounterSample(2, 20);
-
- var counter1 = new Counter(null, 0, 'cat', 'ctr1');
- var counter2 = new Counter(null, 0, 'cat', 'ctr2');
- counter1.addSeries(series1);
- counter2.addSeries(series2);
-
- var analysisEl = document.createElement('tr-ui-a-counter-sample-sub-view');
- analysisEl.selection =
- new EventSet(series1.samples.concat(series2.samples));
- this.addHTMLOutput(analysisEl);
-
- // Each sample should be a header row with no subrows.
- var rows = analysisEl.$.table.tableRows;
- assert.lengthOf(rows, 2);
- assert.equal(rows[0].counter, 'ctr1');
- assert.equal(rows[0].series, 'series1');
- assert.equal(rows[0].start, 1);
- assert.equal(rows[0].value, 10);
- assert.isUndefined(rows[0].subRows);
-
- assert.equal(rows[1].counter, 'ctr2');
- assert.equal(rows[1].series, 'series2');
- assert.equal(rows[1].start, 2);
- assert.equal(rows[1].value, 20);
- assert.isUndefined(rows[1].subRows);
- });
-
- test('instantiate_contentsClearedEachSelection', function() {
- var series = new CounterSeries('series1', 0);
- series.addCounterSample(0, 0);
-
- var counter = new Counter(null, 0, 'cat', 'ctr1');
- counter.addSeries(series);
-
- var analysisEl = document.createElement('tr-ui-a-counter-sample-sub-view');
- analysisEl.selection = new EventSet(series.samples);
- analysisEl.selection = new EventSet(series.samples);
- this.addHTMLOutput(analysisEl);
-
- assert.lengthOf(analysisEl.$.table.tableRows, 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier.html
deleted file mode 100644
index 3895af57ea1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- var FLOW_IN = 0x1;
- var FLOW_OUT = 0x2;
- var FLOW_IN_OUT = FLOW_IN | FLOW_OUT;
-
- function FlowClassifier() {
- this.numEvents_ = 0;
- this.eventsByGUID_ = {};
- }
-
- FlowClassifier.prototype = {
- getFS_: function(event) {
- var fs = this.eventsByGUID_[event.guid];
- if (fs === undefined) {
- this.numEvents_++;
- fs = {
- state: 0,
- event: event
- };
- this.eventsByGUID_[event.guid] = fs;
- }
- return fs;
- },
-
- addInFlow: function(event) {
- var fs = this.getFS_(event);
- fs.state |= FLOW_IN;
- return event;
- },
-
- addOutFlow: function(event) {
- var fs = this.getFS_(event);
- fs.state |= FLOW_OUT;
- return event;
- },
-
- hasEvents: function() {
- return this.numEvents_ > 0;
- },
-
- get inFlowEvents() {
- var selection = new tr.model.EventSet();
- for (var guid in this.eventsByGUID_) {
- var fs = this.eventsByGUID_[guid];
- if (fs.state === FLOW_IN)
- selection.push(fs.event);
- }
- return selection;
- },
-
- get outFlowEvents() {
- var selection = new tr.model.EventSet();
- for (var guid in this.eventsByGUID_) {
- var fs = this.eventsByGUID_[guid];
- if (fs.state === FLOW_OUT)
- selection.push(fs.event);
- }
- return selection;
- },
-
- get internalFlowEvents() {
- var selection = new tr.model.EventSet();
- for (var guid in this.eventsByGUID_) {
- var fs = this.eventsByGUID_[guid];
- if (fs.state === FLOW_IN_OUT)
- selection.push(fs.event);
- }
- return selection;
- }
- };
-
- return {
- FlowClassifier: FlowClassifier
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier_test.html
deleted file mode 100644
index 63ea528e2e0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/flow_classifier_test.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/flow_classifier.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newFlowEventEx = tr.c.TestUtils.newFlowEventEx;
-
- test('basic', function() {
- var a = newFlowEventEx({
- 'title': 'a', start: 0, end: 10 });
- var b = newFlowEventEx({
- 'title': 'b', start: 10, end: 20 });
- var c = newFlowEventEx({
- 'title': 'c', start: 20, end: 25 });
- var d = newFlowEventEx({
- 'title': 'd', start: 30, end: 35 });
-
- var fc = new tr.ui.analysis.FlowClassifier();
- fc.addInFlow(a);
-
- fc.addInFlow(b);
- fc.addOutFlow(b);
-
- fc.addInFlow(c);
- fc.addOutFlow(c);
-
- fc.addOutFlow(d);
-
- function asSortedArray(selection) {
- var events = tr.b.asArray(selection);
- events.sort(function(a, b) {
- return a.guid - b.guid;
- });
- return events;
- }
-
- assert.deepEqual(tr.b.asArray(fc.inFlowEvents), [a]);
- assert.deepEqual(tr.b.asArray(fc.outFlowEvents), [d]);
- assert.deepEqual(tr.b.asArray(fc.internalFlowEvents), [b, c]);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart.html
deleted file mode 100644
index e86e76f8180..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/line_chart.html">
-
-<!--
-@fileoverview A line chart showing milliseconds since the start of the frame on
-the x-axis and power consumption on the y-axis. Each frame is shown as a
-separate line in the chart. Vertical sync events are used as the start of each
-frame.
-
-This chart aims to help users understand the shape of the power consumption
-curve over the course of a frame or set of frames.
--->
-<dom-module id='tr-ui-a-frame-power-usage-chart'>
- <template>
- <div id="content"></div>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-var EventSet = tr.model.EventSet;
-
-var CHART_TITLE = 'Power (W) by ms since vertical sync';
-// TODO(charliea): Find out how to make this specifiable via CSS.
-var CHART_WIDTH_FRACTION_OF_BODY = 0.5;
-
-Polymer({
- is: 'tr-ui-a-frame-power-usage-chart',
-
- ready: function() {
- this.chart_ = undefined;
- this.samples_ = new EventSet();
- this.vSyncTimestamps_ = [];
- },
-
- get chart() {
- return this.chart_;
- },
-
- get samples() {
- return this.samples_;
- },
-
- get vSyncTimestamps() {
- return this.vSyncTimestamps_;
- },
-
- /**
- * Sets the data that powers the chart. Vsync timestamps must be in
- * chronological order.
- */
- setData: function(samples, vSyncTimestamps) {
- this.samples_ = (samples === undefined) ? new EventSet() : samples;
- this.vSyncTimestamps_ =
- (vSyncTimestamps === undefined) ? [] : vSyncTimestamps;
- this.updateContents_();
- },
-
- updateContents_: function() {
- this.clearChart_();
-
- var data = this.getDataForLineChart_();
-
- if (data.length === 0)
- return;
-
- this.chart_ = this.createChart_(data);
- Polymer.dom(this.$.content).appendChild(this.chart_);
- },
-
- createChart_: function(data) {
- var chart = new tr.ui.b.LineChart();
- var width = document.body.clientWidth * CHART_WIDTH_FRACTION_OF_BODY;
- chart.setSize({width: width, height: chart.height});
- chart.chartTitle = CHART_TITLE;
- chart.data = data;
-
- return chart;
- },
-
- clearChart_: function() {
- var content = this.$.content;
- while (Polymer.dom(content).firstChild)
- Polymer.dom(content).removeChild(Polymer.dom(content).firstChild);
-
- this.chart_ = undefined;
- },
-
- // TODO(charliea): Limit the ms since vsync to the median frame length. The
- // vertical syncs are not 100% regular and highlighting any sample that's
- // in one of these 'vertical sync lulls' makes the x-axis have a much larger
- // scale than it should, effectively squishing the other samples into the
- // left side of the chart.
- /**
- * Returns an array of data points for the chart. Each element in the array
- * is of the form { x: <ms since vsync>, f<frame#>: <power in mW> }.
- */
- getDataForLineChart_: function() {
- var sortedSamples = this.sortSamplesByTimestampAscending_(this.samples);
- var vSyncTimestamps = this.vSyncTimestamps.slice();
-
- var lastVSyncTimestamp = undefined;
- var points = [];
-
- // For each power sample, find and record the frame number that it belongs
- // to as well as the amount of time elapsed since that frame began.
- var frameNumber = 0;
- sortedSamples.forEach(function(sample) {
- while (vSyncTimestamps.length > 0 && vSyncTimestamps[0] <= sample.start) {
- lastVSyncTimestamp = vSyncTimestamps.shift();
- frameNumber++;
- }
-
- // If no vertical sync occurred before the power sample, don't use the
- // power sample.
- if (lastVSyncTimestamp === undefined)
- return;
-
- var point = { x: sample.start - lastVSyncTimestamp };
- point['f' + frameNumber] = sample.powerInW;
- points.push(point);
- });
-
- return points;
- },
-
- sortSamplesByTimestampAscending_: function(samples) {
- return samples.toArray().sort(function(smpl1, smpl2) {
- return smpl1.start - smpl2.start;
- });
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_perf_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_perf_test.html
deleted file mode 100644
index bf8e8619ac5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_perf_test.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_sample.html">
-<link rel="import" href="/tracing/model/power_series.html">
-<link rel="import" href="/tracing/ui/analysis/frame_power_usage_chart.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function instantiateManyFrames() {
- var model = new tr.Model();
- var numFrames = 200;
- var samplesPerFrame = 200;
-
- // Set up the test data.
- var series = new tr.model.PowerSeries(model.device);
- var vsyncTimestamps = [];
- for (var i = 0; i < numFrames; i++) {
- vsyncTimestamps.push(i * samplesPerFrame);
- for (var j = 0; j < samplesPerFrame; j++)
- series.addPowerSample(vsyncTimestamps[i] + j, j);
- }
- var samples = series.samples;
-
- // Display the chart.
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(samples), vsyncTimestamps);
- this.addHTMLOutput(chart);
- }
-
- timedPerfTest('frame_power_usage_chart', instantiateManyFrames, {
- iterations: 1
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_test.html
deleted file mode 100644
index e65a90b2295..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/frame_power_usage_chart_test.html
+++ /dev/null
@@ -1,267 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_sample.html">
-<link rel="import" href="/tracing/model/power_series.html">
-<link rel="import" href="/tracing/ui/analysis/frame_power_usage_chart.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_noSamples', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(undefined, [0]);
-
- assert.isUndefined(chart.chart);
- });
-
- test('instantiate_noVSyncs', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), []);
-
- assert.isUndefined(chart.chart);
- });
-
- test('instantiate_noSamplesOrVSyncs', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(undefined, []);
-
- assert.isUndefined(chart.chart);
- });
-
- test('instantiate_oneFrame', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [0];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- this.addHTMLOutput(chart);
-
- var expectedChartData = [
- { x: 0, f1: 1 },
- { x: 1, f1: 2 },
- { x: 2, f1: 3 },
- { x: 3, f1: 2 }
- ];
- assert.sameDeepMembers(chart.chart.data, expectedChartData);
- });
-
- test('instantiate_twoFrames', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [0, 4];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
- series.addPowerSample(4, 2);
- series.addPowerSample(5, 3);
- series.addPowerSample(6, 4);
- series.addPowerSample(7, 3);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- this.addHTMLOutput(chart);
-
- var expectedChartData = [
- { x: 0, f1: 1 },
- { x: 1, f1: 2 },
- { x: 2, f1: 3 },
- { x: 3, f1: 2 },
- { x: 0, f2: 2 },
- { x: 1, f2: 3 },
- { x: 2, f2: 4 },
- { x: 3, f2: 3 }
- ];
- assert.sameDeepMembers(chart.chart.data, expectedChartData);
- });
-
- test('instantiate_twoFramesDifferentXValues', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- // Power samples taken at 0, 1, 2, and 3s after frame start.
- var vSyncTimestamps = [0, 4];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
- // Power samples taken at 0.5, 1.5, 2.5, and 3.5s after frame start.
- series.addPowerSample(4.5, 2);
- series.addPowerSample(5.5, 3);
- series.addPowerSample(6.5, 4);
- series.addPowerSample(7.5, 3);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- this.addHTMLOutput(chart);
-
- var expectedChartData = [
- { x: 0, f1: 1 },
- { x: 1, f1: 2 },
- { x: 2, f1: 3 },
- { x: 3, f1: 2 },
- { x: 0.5, f2: 2 },
- { x: 1.5, f2: 3 },
- { x: 2.5, f2: 4 },
- { x: 3.5, f2: 3 }
- ];
- assert.sameDeepMembers(chart.chart.data, expectedChartData);
- });
-
- test('instantiate_samplesBeforeFirstVSync', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [4];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
- series.addPowerSample(4, 2);
- series.addPowerSample(5, 3);
- series.addPowerSample(6, 4);
- series.addPowerSample(7, 3);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- this.addHTMLOutput(chart);
-
- var expectedChartData = [
- { x: 0, f1: 2 },
- { x: 1, f1: 3 },
- { x: 2, f1: 4 },
- { x: 3, f1: 3 }
- ];
- assert.sameDeepMembers(chart.chart.data, expectedChartData);
- });
-
- test('instantiate_allSamplesBeforeFirstVSync', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [4];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- var expectedChartData = [
- { x: 0, f1: 2 },
- { x: 1, f1: 3 },
- { x: 2, f1: 4 },
- { x: 3, f1: 3 }
- ];
- assert.isUndefined(chart.chart);
- });
-
- test('instantiate_vSyncsAfterLastPowerSample', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [0, 4, 8, 12];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
- series.addPowerSample(4, 2);
- series.addPowerSample(5, 3);
- series.addPowerSample(6, 4);
- series.addPowerSample(7, 3);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- this.addHTMLOutput(chart);
-
- var expectedChartData = [
- { x: 0, f1: 1 },
- { x: 1, f1: 2 },
- { x: 2, f1: 3 },
- { x: 3, f1: 2 },
- { x: 0, f2: 2 },
- { x: 1, f2: 3 },
- { x: 2, f2: 4 },
- { x: 3, f2: 3 }
- ];
- assert.sameDeepMembers(chart.chart.data, expectedChartData);
- });
-
- test('instantiate_onlyVSyncAfterLastPowerSample', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [8];
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
- series.addPowerSample(4, 2);
- series.addPowerSample(5, 3);
- series.addPowerSample(6, 4);
- series.addPowerSample(7, 3);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- assert.isUndefined(chart.chart);
- });
-
-
- test('instantiate_samplesNotInChronologicalOrder', function() {
- var series = new tr.model.PowerSeries(new tr.Model().device);
-
- var vSyncTimestamps = [0, 4];
- series.addPowerSample(4, 2);
- series.addPowerSample(5, 3);
- series.addPowerSample(6, 4);
- series.addPowerSample(7, 3);
- series.addPowerSample(0, 1);
- series.addPowerSample(1, 2);
- series.addPowerSample(2, 3);
- series.addPowerSample(3, 2);
-
- var chart = document.createElement('tr-ui-a-frame-power-usage-chart');
- chart.setData(new tr.model.EventSet(series.samples), vSyncTimestamps);
-
- this.addHTMLOutput(chart);
-
- var expectedChartData = [
- { x: 0, f1: 1 },
- { x: 1, f1: 2 },
- { x: 2, f1: 3 },
- { x: 3, f1: 2 },
- { x: 0, f2: 2 },
- { x: 1, f2: 3 },
- { x: 2, f2: 4 },
- { x: 3, f2: 3 }
- ];
- assert.sameDeepMembers(chart.chart.data, expectedChartData);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view.html
deleted file mode 100644
index 14797a9aa38..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view.html
+++ /dev/null
@@ -1,347 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-<link rel="import" href="/tracing/model/object_snapshot.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/value/numeric.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-generic-object-view'>
- <template>
- <style>
- :host {
- display: block;
- font-family: monospace;
- }
- </style>
- <div id="content">
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-var URL_REGEX = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/; // eslint-disable-line max-len
-
-function isTable(object) {
- if (!(object instanceof Array) ||
- (object.length < 2)) return false;
- for (var colName in object[0]) {
- if (typeof colName !== 'string') return false;
- }
- for (var i = 0; i < object.length; ++i) {
- if (!(object[i] instanceof Object)) return false;
- for (var colName in object[i]) {
- if (i && (object[0][colName] === undefined)) return false;
- var cellType = typeof object[i][colName];
- if (cellType !== 'string' && cellType !== 'number') return false;
- }
- if (i) {
- for (var colName in object[0]) {
- if (object[i][colName] === undefined) return false;
- }
- }
- }
- return true;
-}
-
-Polymer({
- is: 'tr-ui-a-generic-object-view',
-
- ready: function() {
- this.object_ = undefined;
- },
-
- get object() {
- return this.object_;
- },
-
- set object(object) {
- this.object_ = object;
- this.updateContents_();
- },
-
- updateContents_: function() {
- Polymer.dom(this.$.content).textContent = '';
- this.appendElementsForType_('', this.object_, 0, 0, 5, '');
- },
-
- appendElementsForType_: function(
- label, object, indent, depth, maxDepth, suffix) {
- if (depth > maxDepth) {
- this.appendSimpleText_(
- label, indent, '<recursion limit reached>', suffix);
- return;
- }
-
- if (object === undefined) {
- this.appendSimpleText_(label, indent, 'undefined', suffix);
- return;
- }
-
- if (object === null) {
- this.appendSimpleText_(label, indent, 'null', suffix);
- return;
- }
-
- if (!(object instanceof Object)) {
- var type = typeof object;
- if (type === 'string') {
- var objectReplaced = false;
- if ((object[0] === '{' && object[object.length - 1] === '}') ||
- (object[0] === '[' && object[object.length - 1] === ']')) {
- try {
- object = JSON.parse(object);
- objectReplaced = true;
- } catch (e) {
- }
- }
- if (!objectReplaced) {
- if (object.indexOf('\n') !== -1) {
- var lines = object.split('\n');
- lines.forEach(function(line, i) {
- var text, ioff, ll, ss;
- if (i === 0) {
- text = '"' + line;
- ioff = 0;
- ll = label;
- ss = '';
- } else if (i < lines.length - 1) {
- text = line;
- ioff = 1;
- ll = '';
- ss = '';
- } else {
- text = line + '"';
- ioff = 1;
- ll = '';
- ss = suffix;
- }
-
- var el = this.appendSimpleText_(
- ll, indent + ioff * label.length + ioff, text, ss);
- el.style.whiteSpace = 'pre';
- return el;
- }, this);
- return;
- } else if (object.match(URL_REGEX)) {
- var link = document.createElement('a');
- link.href = object;
- link.textContent = object;
- this.appendElementWithLabel_(label, indent, link, suffix);
- return;
- } else {
- this.appendSimpleText_(
- label, indent, '"' + object + '"', suffix);
- return;
- }
- }
- else {
- /* Fall through to the flow below */
- }
- } else {
- return this.appendSimpleText_(label, indent, object, suffix);
- }
- }
-
- if (object instanceof tr.model.ObjectSnapshot) {
- var link = document.createElement('tr-ui-a-analysis-link');
- link.selection = new tr.model.EventSet(object);
- this.appendElementWithLabel_(label, indent, link, suffix);
- return;
- }
-
- if (object instanceof tr.model.ObjectInstance) {
- var link = document.createElement('tr-ui-a-analysis-link');
- link.selection = new tr.model.EventSet(object);
- this.appendElementWithLabel_(label, indent, link, suffix);
- return;
- }
-
- if (object instanceof tr.b.Rect) {
- this.appendSimpleText_(label, indent, object.toString(), suffix);
- return;
- }
-
- if (object instanceof tr.v.ScalarNumeric) {
- var el = this.ownerDocument.createElement('tr-v-ui-scalar-span');
- el.value = object;
- this.appendElementWithLabel_(label, indent, el, suffix);
- return;
- }
-
- if (object instanceof Array) {
- this.appendElementsForArray_(
- label, object, indent, depth, maxDepth, suffix);
- return;
- }
-
- this.appendElementsForObject_(
- label, object, indent, depth, maxDepth, suffix);
- },
-
- appendElementsForArray_: function(
- label, object, indent, depth, maxDepth, suffix) {
- if (object.length === 0) {
- this.appendSimpleText_(label, indent, '[]', suffix);
- return;
- }
-
- if (isTable(object)) {
- var table = document.createElement('tr-ui-b-table');
- var columns = [];
- tr.b.iterItems(object[0], function(colName) {
- var allStrings = true;
- var allNumbers = true;
- for (var i = 0; i < object.length; ++i) {
- if (typeof(object[i][colName]) !== 'string')
- allStrings = false;
-
- if (typeof(object[i][colName]) !== 'number')
- allNumbers = false;
-
- if (!allStrings && !allNumbers)
- break;
- }
-
- var column = {title: colName};
- column.value = function(row) {
- return row[colName];
- };
-
- if (allStrings) {
- column.cmp = function(x, y) {
- return x[colName].localeCompare(y[colName]);
- };
- } else if (allNumbers) {
- column.cmp = function(x, y) {
- return x[colName] - y[colName];
- };
- }
- columns.push(column);
- });
- table.tableColumns = columns;
- table.tableRows = object;
- this.appendElementWithLabel_(label, indent, table, suffix);
- table.rebuild();
- return;
- }
-
- this.appendElementsForType_(
- label + '[',
- object[0],
- indent, depth + 1, maxDepth,
- object.length > 1 ? ',' : ']' + suffix);
- for (var i = 1; i < object.length; i++) {
- this.appendElementsForType_(
- '',
- object[i],
- indent + label.length + 1, depth + 1, maxDepth,
- i < object.length - 1 ? ',' : ']' + suffix);
- }
- return;
- },
-
- appendElementsForObject_: function(
- label, object, indent, depth, maxDepth, suffix) {
- var keys = tr.b.dictionaryKeys(object);
- if (keys.length === 0) {
- this.appendSimpleText_(label, indent, '{}', suffix);
- return;
- }
-
- this.appendElementsForType_(
- label + '{' + keys[0] + ': ',
- object[keys[0]],
- indent, depth, maxDepth,
- keys.length > 1 ? ',' : '}' + suffix);
- for (var i = 1; i < keys.length; i++) {
- this.appendElementsForType_(
- keys[i] + ': ',
- object[keys[i]],
- indent + label.length + 1, depth + 1, maxDepth,
- i < keys.length - 1 ? ',' : '}' + suffix);
- }
- },
-
- appendElementWithLabel_: function(label, indent, dataElement, suffix) {
- var row = document.createElement('div');
-
- var indentSpan = document.createElement('span');
- indentSpan.style.whiteSpace = 'pre';
- for (var i = 0; i < indent; i++)
- Polymer.dom(indentSpan).textContent += ' ';
- Polymer.dom(row).appendChild(indentSpan);
-
- var labelSpan = document.createElement('span');
- Polymer.dom(labelSpan).textContent = label;
- Polymer.dom(row).appendChild(labelSpan);
-
- Polymer.dom(row).appendChild(dataElement);
- var suffixSpan = document.createElement('span');
- Polymer.dom(suffixSpan).textContent = suffix;
- Polymer.dom(row).appendChild(suffixSpan);
-
- row.dataElement = dataElement;
- Polymer.dom(this.$.content).appendChild(row);
- },
-
- appendSimpleText_: function(label, indent, text, suffix) {
- var el = this.ownerDocument.createElement('span');
- Polymer.dom(el).textContent = text;
- this.appendElementWithLabel_(label, indent, el, suffix);
- return el;
- }
-});
-</script>
-
-<dom-module id='tr-ui-a-generic-object-view-with-label'>
- <template>
- <style>
- :host {
- display: block;
- }
- </style>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-generic-object-view-with-label',
-
- ready: function() {
- this.labelEl_ = document.createElement('div');
- this.genericObjectView_ =
- document.createElement('tr-ui-a-generic-object-view');
- Polymer.dom(this.root).appendChild(this.labelEl_);
- Polymer.dom(this.root).appendChild(this.genericObjectView_);
- },
-
- get label() {
- return Polymer.dom(this.labelEl_).textContent;
- },
-
- set label(label) {
- Polymer.dom(this.labelEl_).textContent = label;
- },
-
- get object() {
- return this.genericObjectView_.object;
- },
-
- set object(object) {
- this.genericObjectView_.object = object;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view_test.html
deleted file mode 100644
index 64b0e04a2fc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/generic_object_view_test.html
+++ /dev/null
@@ -1,216 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/object_instance.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('undefinedValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = undefined;
- assert.equal(Polymer.dom(view.$.content).textContent, 'undefined');
- });
-
- test('nullValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = null;
- assert.equal(Polymer.dom(view.$.content).textContent, 'null');
- });
-
- test('stringValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = 'string value';
- assert.equal(Polymer.dom(view.$.content).textContent, '"string value"');
- });
-
- test('multiLineStringValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = 'i am a\n string value\ni have\n various indents';
- this.addHTMLOutput(view);
- var c = view.$.content;
- });
-
- test('multiLineStringValueInsideObject', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = {key: 'i am a\n string value\ni have\n various indents',
- value: 'simple'};
- this.addHTMLOutput(view);
- var c = view.$.content;
-
- });
-
- test('jsonObjectStringValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = '{"x": 1}';
- assert.equal(view.$.content.children.length, 1);
- assert.equal(view.$.content.children[0].children.length, 4);
- });
-
- test('jsonArrayStringValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = '[1,2,3]';
- assert.equal(view.$.content.children.length, 3);
- });
-
- test('booleanValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = false;
- assert.equal(Polymer.dom(view.$.content).textContent, 'false');
- });
-
- test('numberValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = 3.14159;
- assert.equal(Polymer.dom(view.$.content).textContent, '3.14159');
- });
-
- test('objectSnapshotValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
-
- var i10 = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'name', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
-
- view.object = s10;
- this.addHTMLOutput(view);
- assert.strictEqual(view.$.content.children[0].dataElement.tagName,
- 'TR-UI-A-ANALYSIS-LINK');
- });
-
- test('objectInstanceValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
-
- var i10 = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'name', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
-
- view.object = i10;
- assert.strictEqual(view.$.content.children[0].dataElement.tagName,
- 'TR-UI-A-ANALYSIS-LINK');
- });
-
- test('instantiate_emptyArrayValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [];
- this.addHTMLOutput(view);
- });
-
- test('instantiate_twoValueArrayValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [1, 2];
- this.addHTMLOutput(view);
- });
-
- test('instantiate_twoValueBArrayValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [1, {x: 1}];
- this.addHTMLOutput(view);
- });
-
- test('instantiate_arrayValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [1, 2, 'three'];
- this.addHTMLOutput(view);
- });
-
- test('instantiate_arrayWithSimpleObjectValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [{simple: 'object'}];
- this.addHTMLOutput(view);
- });
-
- test('instantiate_arrayWithComplexObjectValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [{col0: 'object', col1: 0},
- {col2: 'Object', col3: 1}];
- this.addHTMLOutput(view);
- assert.equal(undefined, tr.b.findDeepElementMatching(
- view.$.content, 'table'));
- });
-
- test('instantiate_arrayWithDeepObjectValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [{key: {deep: 'object values make isTable() return false'}}];
- this.addHTMLOutput(view);
- assert.equal(undefined, tr.b.findDeepElementMatching(
- view.$.content, 'table'));
- });
-
- test('jsonTableValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = [
- {col0: 'object', col1: 0, col2: 'foo'},
- {col0: 'Object', col1: 1, col2: 42}
- ];
- this.addHTMLOutput(view);
-
- var table = tr.b.findDeepElementMatching(view.$.content, 'tr-ui-b-table');
- assert.equal('col0', table.tableColumns[0].title);
- assert.equal('col1', table.tableColumns[1].title);
- assert.equal('object', table.tableColumns[0].value(table.tableRows[0]));
- assert.equal('Object', table.tableColumns[0].value(table.tableRows[1]));
- assert.equal(0, table.tableColumns[1].value(table.tableRows[0]));
- assert.equal(1, table.tableColumns[1].value(table.tableRows[1]));
- assert.isDefined(table.tableColumns[0].cmp);
- assert.isDefined(table.tableColumns[1].cmp);
- assert.isUndefined(table.tableColumns[2].cmp);
- });
-
- test('instantiate_objectValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = {
- 'entry_one': 'entry_one_value',
- 'entry_two': 2,
- 'entry_three': [3, 4, 5]
- };
- this.addHTMLOutput(view);
- });
-
- test('timeDurationValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object =
- new tr.v.ScalarNumeric(tr.b.Unit.byName.timeDurationInMs, 3);
- assert.isDefined(tr.b.findDeepElementMatching(
- view.$.content, 'tr-v-ui-scalar-span'));
- });
-
- test('timeStampValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object = new tr.v.ScalarNumeric(tr.b.Unit.byName.timeStampInMs, 3);
- assert.isDefined(tr.b.findDeepElementMatching(
- view.$.content, 'tr-v-ui-scalar-span'));
- });
-
- test('scalarValue', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- view.object =
- new tr.v.ScalarNumeric(tr.b.Unit.byName.normalizedPercentage, .3);
- var m = tr.b.findDeepElementMatching(
- view.$.content, 'tr-v-ui-scalar-span');
- assert.isDefined(m);
- assert.equal(m.value, .3);
- assert.equal(m.unit, tr.b.Unit.byName.normalizedPercentage);
- });
-
- test('httpLink', function() {
- var view = document.createElement('tr-ui-a-generic-object-view');
- var url = 'https://google.com/chrome';
- view.object = {a: url};
- this.addHTMLOutput(view);
- var a = tr.b.findDeepElementMatching(view.$.content, 'a');
- assert.isDefined(a);
- assert.strictEqual(url, a.href);
- assert.strictEqual(url, a.textContent);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane.html
deleted file mode 100644
index e410eaca58d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane.html
+++ /dev/null
@@ -1,862 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_heap_details_pane.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-
-<dom-module id='tr-ui-a-memory-dump-allocator-details-pane'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- #label {
- flex: 0 0 auto;
- padding: 8px;
-
- background-color: #eee;
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
-
- font-size: 15px;
- font-weight: bold;
- }
-
- #contents {
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- }
-
- #info_text {
- padding: 8px;
- color: #666;
- font-style: italic;
- text-align: center;
- }
-
- #table {
- display: none; /* Hide until memory allocator dumps are set. */
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <div id="label">Component details</div>
- <div id="contents">
- <div id="info_text">No memory allocator dump selected</div>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- // Constant representing the context in suballocation rows.
- var SUBALLOCATION_CONTEXT = true;
-
- // Size numeric info types.
- var MemoryAllocatorDumpInfoType = tr.model.MemoryAllocatorDumpInfoType;
- var PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN;
- var PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER;
-
- // Unicode symbols used for memory cell info icons and messages.
- var LEFTWARDS_OPEN_HEADED_ARROW = String.fromCharCode(0x21FD);
- var RIGHTWARDS_OPEN_HEADED_ARROW = String.fromCharCode(0x21FE);
- var EN_DASH = String.fromCharCode(0x2013);
- var CIRCLED_LATIN_SMALL_LETTER_I = String.fromCharCode(0x24D8);
-
- /** @constructor */
- function AllocatorDumpNameColumn() {
- tr.ui.analysis.TitleColumn.call(this, 'Component');
- }
-
- AllocatorDumpNameColumn.prototype = {
- __proto__: tr.ui.analysis.TitleColumn.prototype,
-
- formatTitle: function(row) {
- if (!row.suballocation)
- return row.title;
- return tr.ui.b.createSpan({
- textContent: row.title,
- italic: true,
- tooltip: row.fullNames === undefined ?
- undefined : row.fullNames.join(', ')
- });
- }
- };
-
- /**
- * Retrieve the entry associated with a given name from a map and increment
- * its count.
- *
- * If there is no entry associated with the name, a new entry is created, the
- * creation callback is called, the entry's count is incremented (from 0 to
- * 1) and the newly created entry is returned.
- */
- function getAndUpdateEntry(map, name, createdCallback) {
- var entry = map.get(name);
- if (entry === undefined) {
- entry = {count: 0};
- createdCallback(entry);
- map.set(name, entry);
- }
- entry.count++;
- return entry;
- }
-
- /**
- * Helper class for building size and effective size column info messages.
- *
- * @constructor
- */
- function SizeInfoMessageBuilder() {
- this.parts_ = [];
- this.indent_ = 0;
- }
-
- SizeInfoMessageBuilder.prototype = {
- append: function(/* arguments */) {
- this.parts_.push.apply(
- this.parts_, Array.prototype.slice.apply(arguments));
- },
-
- /**
- * Append the entries of a map to the message according to the following
- * rules:
- *
- * 1. If the map is empty, append emptyText to the message (if provided).
- * Examples:
- *
- * emptyText=undefined
- * Hello, World! ====================> Hello, World!
- *
- * emptyText='empty'
- * The bottle is ====================> The bottle is empty
- *
- * 2. If the map contains a single entry, append a space and call
- * itemCallback on the entry (which is in turn expected to append a
- * message for the entry). Example:
- *
- * Please do not ====================> Please do not [item-message]
- *
- * 3. If the map contains multiple entries, append them as a list
- * with itemCallback called on each entry. If hasPluralSuffix is true,
- * 's' will be appended to the message before the list. Examples:
- *
- * hasPluralSuffix=false
- * I need to buy ====================> I need to buy:
- * - [item1-message]
- * - [item2-message]
- * [...]
- * - [itemN-message]
- *
- * hasPluralSuffix=true
- * Suspected CL ====================> Suspected CLs:
- * - [item1-message]
- * - [item2-message]
- * [...]
- * - [itemN-message]
- */
- appendMap: function(
- map, hasPluralSuffix, emptyText, itemCallback, opt_this) {
- opt_this = opt_this || this;
- if (map.size === 0) {
- if (emptyText)
- this.append(emptyText);
- } else if (map.size === 1) {
- this.parts_.push(' ');
- var key = map.keys().next().value;
- itemCallback.call(opt_this, key, map.get(key));
- } else {
- if (hasPluralSuffix)
- this.parts_.push('s');
- this.parts_.push(':');
- this.indent_++;
- for (var key of map.keys()) {
- this.parts_.push('\n', ' '.repeat(3 * (this.indent_ - 1)), ' - ');
- itemCallback.call(opt_this, key, map.get(key));
- }
- this.indent_--;
- }
- },
-
- appendImportanceRange: function(range) {
- this.append(' (importance: ');
- if (range.min === range.max)
- this.append(range.min);
- else
- this.append(range.min, EN_DASH, range.max);
- this.append(')');
- },
-
- appendSizeIfDefined: function(size) {
- if (size !== undefined)
- this.append(' (', tr.b.Unit.byName.sizeInBytes.format(size), ')');
- },
-
- appendSomeTimestampsQuantifier: function() {
- this.append(
- ' ', tr.ui.analysis.MemoryColumn.SOME_TIMESTAMPS_INFO_QUANTIFIER);
- },
-
- build: function() {
- return this.parts_.join('');
- }
- };
-
- /** @constructor */
- function EffectiveSizeColumn(name, cellPath, aggregationMode) {
- tr.ui.analysis.DetailsNumericMemoryColumn.call(
- this, name, cellPath, aggregationMode);
- }
-
- EffectiveSizeColumn.prototype = {
- __proto__: tr.ui.analysis.DetailsNumericMemoryColumn.prototype,
-
- addInfos: function(numerics, memoryAllocatorDumps, infos) {
- if (memoryAllocatorDumps === undefined)
- return;
-
- // Quantified name of an owner dump (of the given dump) -> {count,
- // importanceRange}.
- var ownerNameToEntry = new Map();
-
- // Quantified name of an owned dump (by the given dump) -> {count,
- // importanceRange, sharerNameToEntry}, where sharerNameToEntry is a map
- // from quantified names of other owners of the owned dump to {count,
- // importanceRange}.
- var ownedNameToEntry = new Map();
-
- for (var i = 0; i < numerics.length; i++) {
- if (numerics[i] === undefined)
- continue;
- var dump = memoryAllocatorDumps[i];
- if (dump === SUBALLOCATION_CONTEXT)
- return; // No ownership of suballocation internal rows.
-
- // Gather owners of this dump.
- dump.ownedBy.forEach(function(ownerLink) {
- var ownerDump = ownerLink.source;
- this.getAndUpdateOwnershipEntry_(
- ownerNameToEntry, ownerDump, ownerLink);
- }, this);
-
- // Gather dumps owned by this dump and other owner dumps sharing them
- // (with this dump).
- var ownedLink = dump.owns;
- if (ownedLink !== undefined) {
- var ownedDump = ownedLink.target;
- var ownedEntry = this.getAndUpdateOwnershipEntry_(ownedNameToEntry,
- ownedDump, ownedLink, true /* opt_withSharerNameToEntry */);
- var sharerNameToEntry = ownedEntry.sharerNameToEntry;
- ownedDump.ownedBy.forEach(function(sharerLink) {
- var sharerDump = sharerLink.source;
- if (sharerDump === dump)
- return;
- this.getAndUpdateOwnershipEntry_(
- sharerNameToEntry, sharerDump, sharerLink);
- }, this);
- }
- }
-
- // Emit a single info listing all owners of this dump.
- if (ownerNameToEntry.size > 0) {
- var messageBuilder = new SizeInfoMessageBuilder();
- messageBuilder.append('shared by');
- messageBuilder.appendMap(
- ownerNameToEntry,
- false /* hasPluralSuffix */,
- undefined /* emptyText */,
- function(ownerName, ownerEntry) {
- messageBuilder.append(ownerName);
- if (ownerEntry.count < numerics.length)
- messageBuilder.appendSomeTimestampsQuantifier();
- messageBuilder.appendImportanceRange(ownerEntry.importanceRange);
- }, this);
- infos.push({
- message: messageBuilder.build(),
- icon: LEFTWARDS_OPEN_HEADED_ARROW,
- color: 'green'
- });
- }
-
- // Emit a single info listing all dumps owned by this dump together
- // with list(s) of other owner dumps sharing them with this dump.
- if (ownedNameToEntry.size > 0) {
- var messageBuilder = new SizeInfoMessageBuilder();
- messageBuilder.append('shares');
- messageBuilder.appendMap(
- ownedNameToEntry,
- false /* hasPluralSuffix */,
- undefined /* emptyText */,
- function(ownedName, ownedEntry) {
- messageBuilder.append(ownedName);
- var ownedCount = ownedEntry.count;
- if (ownedCount < numerics.length)
- messageBuilder.appendSomeTimestampsQuantifier();
- messageBuilder.appendImportanceRange(ownedEntry.importanceRange);
- messageBuilder.append(' with');
- messageBuilder.appendMap(
- ownedEntry.sharerNameToEntry,
- false /* hasPluralSuffix */,
- ' no other dumps',
- function(sharerName, sharerEntry) {
- messageBuilder.append(sharerName);
- if (sharerEntry.count < ownedCount)
- messageBuilder.appendSomeTimestampsQuantifier();
- messageBuilder.appendImportanceRange(
- sharerEntry.importanceRange);
- }, this);
- }, this);
- infos.push({
- message: messageBuilder.build(),
- icon: RIGHTWARDS_OPEN_HEADED_ARROW,
- color: 'green'
- });
- }
- },
-
- getAndUpdateOwnershipEntry_: function(
- map, dump, link, opt_withSharerNameToEntry) {
- var entry = getAndUpdateEntry(map, dump.quantifiedName,
- function(newEntry) {
- newEntry.importanceRange = new tr.b.Range();
- if (opt_withSharerNameToEntry)
- newEntry.sharerNameToEntry = new Map();
- });
- entry.importanceRange.addValue(link.importance || 0);
- return entry;
- }
- };
-
- /** @constructor */
- function SizeColumn(name, cellPath, aggregationMode) {
- tr.ui.analysis.DetailsNumericMemoryColumn.call(
- this, name, cellPath, aggregationMode);
- }
-
- SizeColumn.prototype = {
- __proto__: tr.ui.analysis.DetailsNumericMemoryColumn.prototype,
-
- addInfos: function(numerics, memoryAllocatorDumps, infos) {
- if (memoryAllocatorDumps === undefined)
- return;
- this.addOverlapInfo_(numerics, memoryAllocatorDumps, infos);
- this.addProvidedSizeWarningInfos_(numerics, memoryAllocatorDumps, infos);
- },
-
- addOverlapInfo_: function(numerics, memoryAllocatorDumps, infos) {
- // Sibling allocator dump name -> {count, size}. The latter field (size)
- // is omitted in multi-selection mode.
- var siblingNameToEntry = new Map();
- for (var i = 0; i < numerics.length; i++) {
- if (numerics[i] === undefined)
- continue;
- var dump = memoryAllocatorDumps[i];
- if (dump === SUBALLOCATION_CONTEXT)
- return; // No ownership of suballocation internal rows.
- var ownedBySiblingSizes = dump.ownedBySiblingSizes;
- for (var siblingDump of ownedBySiblingSizes.keys()) {
- var siblingName = siblingDump.name;
- getAndUpdateEntry(siblingNameToEntry, siblingName,
- function(newEntry) {
- if (numerics.length === 1 /* single-selection mode */)
- newEntry.size = ownedBySiblingSizes.get(siblingDump);
- });
- }
- }
-
- // Emit a single info describing all overlaps with siblings (if
- // applicable).
- if (siblingNameToEntry.size > 0) {
- var messageBuilder = new SizeInfoMessageBuilder();
- messageBuilder.append('overlaps with its sibling');
- messageBuilder.appendMap(
- siblingNameToEntry,
- true /* hasPluralSuffix */,
- undefined /* emptyText */,
- function(siblingName, siblingEntry) {
- messageBuilder.append('\'', siblingName, '\'');
- messageBuilder.appendSizeIfDefined(siblingEntry.size);
- if (siblingEntry.count < numerics.length)
- messageBuilder.appendSomeTimestampsQuantifier();
- }, this);
- infos.push({
- message: messageBuilder.build(),
- icon: CIRCLED_LATIN_SMALL_LETTER_I,
- color: 'blue'
- });
- }
- },
-
- addProvidedSizeWarningInfos_: function(numerics, memoryAllocatorDumps,
- infos) {
- // Info type (see MemoryAllocatorDumpInfoType) -> {count, providedSize,
- // dependencySize}. The latter two fields (providedSize and
- // dependencySize) are omitted in multi-selection mode.
- var infoTypeToEntry = new Map();
- for (var i = 0; i < numerics.length; i++) {
- if (numerics[i] === undefined)
- continue;
- var dump = memoryAllocatorDumps[i];
- if (dump === SUBALLOCATION_CONTEXT)
- return; // Suballocation internal rows have no provided size.
- dump.infos.forEach(function(dumpInfo) {
- getAndUpdateEntry(infoTypeToEntry, dumpInfo.type, function(newEntry) {
- if (numerics.length === 1 /* single-selection mode */) {
- newEntry.providedSize = dumpInfo.providedSize;
- newEntry.dependencySize = dumpInfo.dependencySize;
- }
- });
- });
- }
-
- // Emit a warning info for every info type.
- for (var infoType of infoTypeToEntry.keys()) {
- var entry = infoTypeToEntry.get(infoType);
- var messageBuilder = new SizeInfoMessageBuilder();
- messageBuilder.append('provided size');
- messageBuilder.appendSizeIfDefined(entry.providedSize);
- var dependencyName;
- switch (infoType) {
- case PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN:
- dependencyName = 'the aggregated size of the children';
- break;
- case PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER:
- dependencyName = 'the size of the largest owner';
- break;
- default:
- dependencyName = 'an unknown dependency';
- break;
- }
- messageBuilder.append(' was less than ', dependencyName);
- messageBuilder.appendSizeIfDefined(entry.dependencySize);
- if (entry.count < numerics.length)
- messageBuilder.appendSomeTimestampsQuantifier();
- infos.push(tr.ui.analysis.createWarningInfo(messageBuilder.build()));
- }
- }
- };
-
- var NUMERIC_COLUMN_RULES = [
- {
- condition: tr.model.MemoryAllocatorDump.EFFECTIVE_SIZE_NUMERIC_NAME,
- importance: 10,
- columnConstructor: EffectiveSizeColumn
- },
- {
- condition: tr.model.MemoryAllocatorDump.SIZE_NUMERIC_NAME,
- importance: 9,
- columnConstructor: SizeColumn
- },
- {
- condition: 'page_size',
- importance: 0,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: /size/,
- importance: 5,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- // All other columns.
- importance: 0,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- }
- ];
-
- var DIAGNOSTIC_COLUMN_RULES = [
- {
- importance: 0,
- columnConstructor: tr.ui.analysis.StringMemoryColumn
- }
- ];
-
- Polymer({
- is: 'tr-ui-a-memory-dump-allocator-details-pane',
- behaviors: [tr.ui.analysis.StackedPane],
-
- created: function() {
- this.memoryAllocatorDumps_ = undefined;
- this.heapDumps_ = undefined;
- this.aggregationMode_ = undefined;
- },
-
- ready: function() {
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- },
-
- /**
- * Sets the memory allocator dumps and schedules rebuilding the pane.
- *
- * The provided value should be a chronological list of memory allocator
- * dumps. All dumps are assumed to belong to the same process and have
- * the same full name. Example:
- *
- * [
- * tr.model.MemoryAllocatorDump {}, // MAD at timestamp 1.
- * undefined, // MAD not provided at timestamp 2.
- * tr.model.MemoryAllocatorDump {}, // MAD at timestamp 3.
- * ]
- */
- set memoryAllocatorDumps(memoryAllocatorDumps) {
- this.memoryAllocatorDumps_ = memoryAllocatorDumps;
- this.scheduleRebuild_();
- },
-
- get memoryAllocatorDumps() {
- return this.memoryAllocatorDumps_;
- },
-
- // TODO(petrcermak): Don't plumb the heap dumps through the allocator
- // details pane. Maybe add support for multiple child panes to stacked pane
- // (view) instead.
- set heapDumps(heapDumps) {
- this.heapDumps_ = heapDumps;
- this.scheduleRebuild_();
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.scheduleRebuild_();
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- onRebuild_: function() {
- if (this.memoryAllocatorDumps_ === undefined ||
- this.memoryAllocatorDumps_.length === 0) {
- // Show the info text (hide the table).
- this.$.info_text.style.display = 'block';
- this.$.table.style.display = 'none';
-
- this.$.table.clear();
- this.$.table.rebuild();
-
- // Hide the heap details pane (if applicable).
- this.childPaneBuilder = undefined;
- return;
- }
-
- // Show the table (hide the info text).
- this.$.info_text.style.display = 'none';
- this.$.table.style.display = 'block';
-
- var rows = this.createRows_();
- var columns = this.createColumns_(rows);
- rows.forEach(function(rootRow) {
- tr.ui.analysis.aggregateTableRowCellsRecursively(rootRow, columns,
- function(contexts) {
- // Only aggregate suballocation rows (numerics of regular rows
- // corresponding to MADs have already been aggregated by the
- // model in MemoryAllocatorDump.aggregateNumericsRecursively).
- return contexts !== undefined && contexts.some(function(context) {
- return context === SUBALLOCATION_CONTEXT;
- });
- });
- });
-
- this.$.table.tableRows = rows;
- this.$.table.tableColumns = columns;
- this.$.table.rebuild();
- tr.ui.analysis.expandTableRowsRecursively(this.$.table);
-
- // Show/hide the heap details pane.
- if (this.heapDumps_ === undefined) {
- this.childPaneBuilder = undefined;
- } else {
- this.childPaneBuilder = function() {
- var pane =
- document.createElement('tr-ui-a-memory-dump-heap-details-pane');
- pane.heapDumps = this.heapDumps_;
- pane.aggregationMode = this.aggregationMode_;
- return pane;
- }.bind(this);
- }
- },
-
- createRows_: function() {
- return [
- this.createAllocatorRowRecursively_(this.memoryAllocatorDumps_)
- ];
- },
-
- createAllocatorRowRecursively_: function(dumps) {
- // Get the name of the memory allocator dumps. We can use any defined
- // dump in dumps since they all have the same name.
- var definedDump = tr.b.findFirstInArray(dumps);
- var title = definedDump.name;
- var fullName = definedDump.fullName;
-
- // Transform a chronological list of memory allocator dumps into two
- // dictionaries of cells (where each cell contains a chronological list
- // of the values of one of its numerics or diagnostics).
- var numericCells = tr.ui.analysis.createCells(dumps, function(dump) {
- return dump.numerics;
- });
- var diagnosticCells = tr.ui.analysis.createCells(dumps, function(dump) {
- return dump.diagnostics;
- });
-
- // Determine whether the memory allocator dump is a suballocation. A
- // dump is assumed to be a suballocation if (1) its name starts with
- // two underscores, (2) it has an owner from within the same process at
- // some timestamp, and (3) it is undefined, has no owners, or has the
- // same owner (and no other owners) at all other timestamps.
- var suballocatedBy = undefined;
- if (title.startsWith('__')) {
- for (var i = 0; i < dumps.length; i++) {
- var dump = dumps[i];
- if (dump === undefined || dump.ownedBy.length === 0) {
- // Ignore timestamps where the dump is undefined or doesn't
- // have any owner.
- continue;
- }
- var ownerDump = dump.ownedBy[0].source;
- if (dump.ownedBy.length > 1 ||
- dump.children.length > 0 ||
- ownerDump.containerMemoryDump !== dump.containerMemoryDump) {
- // If the dump has (1) any children, (2) multiple owners, or
- // (3) its owner is in a different process (otherwise, the
- // modified title would be ambiguous), then it's not considered
- // to be a suballocation.
- suballocatedBy = undefined;
- break;
- }
- if (suballocatedBy === undefined) {
- suballocatedBy = ownerDump.fullName;
- } else if (suballocatedBy !== ownerDump.fullName) {
- // The full name of the owner dump changed over time, so this
- // dump is not a suballocation.
- suballocatedBy = undefined;
- break;
- }
- }
- }
-
- var row = {
- title: title,
- fullNames: [fullName],
- contexts: dumps,
- numericCells: numericCells,
- diagnosticCells: diagnosticCells,
- suballocatedBy: suballocatedBy
- };
-
- // Child memory dump name (dict key) -> Timestamp (list index) ->
- // Child dump.
- var childDumpNameToDumps = tr.b.invertArrayOfDicts(dumps,
- function(dump) {
- return tr.b.arrayToDict(dump.children, function(child) {
- return child.name;
- });
- });
-
- // Recursively create sub-rows for children (if applicable).
- var subRows = [];
- var suballocationClassificationRootNode = undefined;
- tr.b.iterItems(childDumpNameToDumps, function(childName, childDumps) {
- var childRow = this.createAllocatorRowRecursively_(childDumps);
- if (childRow.suballocatedBy === undefined) {
- // Not a suballocation row: just append it.
- subRows.push(childRow);
- } else {
- // Suballocation row: classify it in a tree of suballocations.
- suballocationClassificationRootNode =
- this.classifySuballocationRow_(
- childRow, suballocationClassificationRootNode);
- }
- }, this);
-
- // Build the tree of suballocations (if applicable).
- if (suballocationClassificationRootNode !== undefined) {
- var suballocationRow = this.createSuballocationRowRecursively_(
- 'suballocations', suballocationClassificationRootNode);
- subRows.push(suballocationRow);
- }
-
- if (subRows.length > 0)
- row.subRows = subRows;
-
- return row;
- },
-
- classifySuballocationRow_: function(suballocationRow, rootNode) {
- if (rootNode === undefined) {
- rootNode = {
- children: {},
- row: undefined
- };
- }
-
- var suballocationLevels = suballocationRow.suballocatedBy.split('/');
- var currentNode = rootNode;
- for (var i = 0; i < suballocationLevels.length; i++) {
- var suballocationLevel = suballocationLevels[i];
- var nextNode = currentNode.children[suballocationLevel];
- if (nextNode === undefined) {
- currentNode.children[suballocationLevel] = nextNode = {
- children: {},
- row: undefined
- };
- }
- var currentNode = nextNode;
- }
-
- var existingRow = currentNode.row;
- if (existingRow !== undefined) {
- // On rare occasions it can happen that one dump (e.g. sqlite) owns
- // different suballocations at different timestamps (e.g.
- // malloc/allocated_objects/_7d35 and malloc/allocated_objects/_511e).
- // When this happens, we merge the two suballocations into a single row
- // (malloc/allocated_objects/suballocations/sqlite).
- for (var i = 0; i < suballocationRow.contexts.length; i++) {
- var newContext = suballocationRow.contexts[i];
- if (newContext === undefined)
- continue;
-
- if (existingRow.contexts[i] !== undefined)
- throw new Error('Multiple suballocations with the same owner name');
-
- existingRow.contexts[i] = newContext;
- ['numericCells', 'diagnosticCells'].forEach(function(cellKey) {
- var suballocationCells = suballocationRow[cellKey];
- if (suballocationCells === undefined)
- return;
- tr.b.iterItems(suballocationCells, function(cellName, cell) {
- if (cell === undefined)
- return;
- var fields = cell.fields;
- if (fields === undefined)
- return;
- var field = fields[i];
- if (field === undefined)
- return;
- var existingCells = existingRow[cellKey];
- if (existingCells === undefined) {
- existingCells = {};
- existingRow[cellKey] = existingCells;
- }
- var existingCell = existingCells[cellName];
- if (existingCell === undefined) {
- existingCell = new tr.ui.analysis.MemoryCell(
- new Array(fields.length));
- existingCells[cellName] = existingCell;
- }
- existingCell.fields[i] = field;
- });
- });
- }
- existingRow.fullNames.push.apply(
- existingRow.fullNames, suballocationRow.fullNames);
- } else {
- currentNode.row = suballocationRow;
- }
-
- return rootNode;
- },
-
- createSuballocationRowRecursively_: function(name, node) {
- var childCount = Object.keys(node.children).length;
- if (childCount === 0) {
- if (node.row === undefined)
- throw new Error('Suballocation node must have a row or children');
- // Leaf row of the suballocation tree: Change the row's title from
- // '__MEANINGLESSHASH' to the name of the suballocation owner.
- var row = node.row;
- row.title = name;
- row.suballocation = true;
- return row;
- }
-
- // Internal row of the suballocation tree: Recursively create its
- // sub-rows.
- var subRows = tr.b.dictionaryValues(tr.b.mapItems(
- node.children, this.createSuballocationRowRecursively_, this));
-
- if (node.row !== undefined) {
- // Very unlikely case: Both an ancestor (e.g. 'skia') and one of its
- // descendants (e.g. 'skia/sk_glyph_cache') both suballocate from the
- // same MemoryAllocatorDump (e.g. 'malloc/allocated_objects'). In
- // this case, the suballocation from the ancestor must be mapped to
- // 'malloc/allocated_objects/suballocations/skia/<unspecified>' so
- // that 'malloc/allocated_objects/suballocations/skia' could
- // aggregate the numerics of the two suballocations properly.
- var row = node.row;
- row.title = '<unspecified>';
- row.suballocation = true;
- subRows.unshift(row);
- }
-
- // An internal row of the suballocation tree is assumed to be defined
- // at a given timestamp if at least one of its sub-rows is defined at
- // the timestamp.
- var contexts = new Array(subRows[0].contexts.length);
- for (var i = 0; i < subRows.length; i++) {
- subRows[i].contexts.forEach(function(subContext, index) {
- if (subContext !== undefined)
- contexts[index] = SUBALLOCATION_CONTEXT;
- });
- }
-
- return {
- title: name,
- suballocation: true,
- contexts: contexts,
- subRows: subRows
- };
- },
-
- createColumns_: function(rows) {
- var titleColumn = new AllocatorDumpNameColumn();
- titleColumn.width = '200px';
-
- var numericColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'numericCells',
- aggregationMode: this.aggregationMode_,
- rules: NUMERIC_COLUMN_RULES
- });
- var diagnosticColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'diagnosticCells',
- aggregationMode: this.aggregationMode_,
- rules: DIAGNOSTIC_COLUMN_RULES
- });
- var fieldColumns = numericColumns.concat(diagnosticColumns);
- tr.ui.analysis.MemoryColumn.spaceEqually(fieldColumns);
-
- var columns = [titleColumn].concat(fieldColumns);
- return columns;
- }
- });
-
- return {
- // All exports are for testing only.
- SUBALLOCATION_CONTEXT: SUBALLOCATION_CONTEXT,
- AllocatorDumpNameColumn: AllocatorDumpNameColumn,
- EffectiveSizeColumn: EffectiveSizeColumn,
- SizeColumn: SizeColumn
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html
deleted file mode 100644
index 7c6a8ba4203..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html
+++ /dev/null
@@ -1,1243 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/heap_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_allocator_details_pane.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var MemoryAllocatorDump = tr.model.MemoryAllocatorDump;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var HeapDump = tr.model.HeapDump;
- var AggregationMode = tr.ui.analysis.MemoryColumn.AggregationMode;
- var checkNumericFields = tr.ui.analysis.checkNumericFields;
- var checkSizeNumericFields = tr.ui.analysis.checkSizeNumericFields;
- var checkStringFields = tr.ui.analysis.checkStringFields;
- var checkColumnInfosAndColor = tr.ui.analysis.checkColumnInfosAndColor;
- var checkColumns = tr.ui.analysis.checkColumns;
- var isElementDisplayed = tr.ui.analysis.isElementDisplayed;
- var AllocatorDumpNameColumn = tr.ui.analysis.AllocatorDumpNameColumn;
- var EffectiveSizeColumn = tr.ui.analysis.EffectiveSizeColumn;
- var SizeColumn = tr.ui.analysis.SizeColumn;
- var StringMemoryColumn = tr.ui.analysis.StringMemoryColumn;
- var NumericMemoryColumn = tr.ui.analysis.NumericMemoryColumn;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addChildDump = tr.model.MemoryDumpTestUtils.addChildDump;
- var addOwnershipLink = tr.model.MemoryDumpTestUtils.addOwnershipLink;
-
- var SUBALLOCATION_CONTEXT = tr.ui.analysis.SUBALLOCATION_CONTEXT;
- var MemoryAllocatorDumpInfoType = tr.model.MemoryAllocatorDumpInfoType;
- var PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_AGGREGATED_CHILDREN;
- var PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER =
- MemoryAllocatorDumpInfoType.PROVIDED_SIZE_LESS_THAN_LARGEST_OWNER;
-
- function addRootDumps(containerMemoryDump, rootNames, addedCallback) {
- // Test sanity check.
- assert.isUndefined(containerMemoryDump.memoryAllocatorDumps);
-
- var rootDumps = rootNames.map(function(rootName) {
- return new MemoryAllocatorDump(containerMemoryDump, rootName);
- });
- addedCallback.apply(null, rootDumps);
- containerMemoryDump.memoryAllocatorDumps = rootDumps;
- }
-
- function newSuballocationDump(ownerDump, parentDump, name, size) {
- var suballocationDump = addChildDump(parentDump, name,
- {numerics: {size: size}});
- if (ownerDump !== undefined)
- addOwnershipLink(ownerDump, suballocationDump);
- return suballocationDump;
- }
-
- function createProcessMemoryDumps() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
-
- // First timestamp.
- var gmd1 = addGlobalMemoryDump(model, {ts: -10});
- var pmd1 = addProcessMemoryDump(gmd1, process, {ts: -11});
- pmd1.memoryAllocatorDumps = (function() {
- var v8Dump = newAllocatorDump(pmd1, 'v8', {numerics: {
- size: 1073741824 /* 1 GiB */,
- inner_size: 2097152 /* 2 MiB */,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 204)
- }});
-
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 805306368 /* 768 MiB */}});
- addChildDump(v8HeapsDump, 'heap42',
- {numerics: {size: 804782080 /* 767.5 MiB */}});
-
- var v8ObjectsDump = addChildDump(v8Dump, 'objects');
- v8ObjectsDump.addDiagnostic('url', 'http://example.com');
- addChildDump(v8ObjectsDump, 'foo',
- {numerics: {size: 1022976 /* 999 KiB */}});
- addChildDump(v8ObjectsDump, 'bar',
- {numerics: {size: 1024000 /* 1000 KiB */}});
-
- var oilpanDump = newAllocatorDump(pmd1, 'oilpan',
- {numerics: {size: 125829120 /* 120 MiB */}});
- newSuballocationDump(
- oilpanDump, v8Dump, '__99BEAD', 150994944 /* 144 MiB */);
-
- var oilpanSubDump = addChildDump(oilpanDump, 'animals');
-
- var oilpanSubDump1 = addChildDump(oilpanSubDump, 'cow',
- {numerics: {size: 33554432 /* 32 MiB */}});
- newSuballocationDump(
- oilpanSubDump1, v8Dump, '__42BEEF', 67108864 /* 64 MiB */);
-
- var oilpanSubDump2 = addChildDump(oilpanSubDump, 'chicken',
- {numerics: {size: 16777216 /* 16 MiB */}});
- newSuballocationDump(
- oilpanSubDump2, v8Dump, '__68DEAD', 33554432 /* 32 MiB */);
-
- var skiaDump = newAllocatorDump(pmd1, 'skia',
- {numerics: {size: 8388608 /* 8 MiB */}});
- var suballocationDump = newSuballocationDump(
- skiaDump, v8Dump, '__15FADE', 16777216 /* 16 MiB */);
-
- var ccDump = newAllocatorDump(pmd1, 'cc',
- {numerics: {size: 4194304 /* 4 MiB */}});
- newSuballocationDump(
- ccDump, v8Dump, '__12FEED', 5242880 /* 5 MiB */).addDiagnostic(
- 'url', 'localhost:1234');
-
- return [v8Dump, oilpanDump, skiaDump, ccDump];
- })();
-
- // Second timestamp.
- var gmd2 = addGlobalMemoryDump(model, {ts: 10});
- var pmd2 = addProcessMemoryDump(gmd2, process, {ts: 11});
- pmd2.memoryAllocatorDumps = (function() {
- var v8Dump = newAllocatorDump(pmd2, 'v8', {numerics: {
- size: 1073741824 /* 1 GiB */,
- inner_size: 2097152 /* 2 MiB */,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 204)
- }});
-
- var v8ObjectsDump = addChildDump(v8Dump, 'objects');
- v8ObjectsDump.addDiagnostic('url', 'http://sample.net');
- addChildDump(v8ObjectsDump, 'foo',
- {numerics: {size: 1020928 /* 997 KiB */}});
- addChildDump(v8ObjectsDump, 'bar',
- {numerics: {size: 1026048 /* 1002 KiB */}});
-
- newSuballocationDump(
- undefined, v8Dump, '__99BEAD', 268435456 /* 256 MiB */);
-
- var ccDump = newAllocatorDump(pmd2, 'cc',
- {numerics: {size: 7340032 /* 7 MiB */}});
- newSuballocationDump(
- ccDump, v8Dump, '__13DEED', 11534336 /* 11 MiB */).addDiagnostic(
- 'url', 'localhost:5678');
-
- return [v8Dump, ccDump];
- })();
- });
-
- return model.processes[1].memoryDumps;
- }
-
- function createSizeFields(values) {
- return values.map(function(value) {
- if (value === undefined)
- return undefined;
- return new ScalarNumeric(sizeInBytes_smallerIsBetter, value);
- });
- }
-
- var EXPECTED_COLUMNS = [
- { title: 'Component', type: AllocatorDumpNameColumn, noAggregation: true },
- { title: 'effective_size', type: EffectiveSizeColumn },
- { title: 'size', type: SizeColumn },
- { title: 'inner_size', type: NumericMemoryColumn },
- { title: 'objects_count', type: NumericMemoryColumn },
- { title: 'url', type: StringMemoryColumn }
- ];
-
- function checkRow(columns, row, expectations) {
- var formattedTitle = columns[0].formatTitle(row);
- var expectedTitle = expectations.title;
- if (typeof expectedTitle === 'function')
- expectedTitle(formattedTitle);
- else
- assert.equal(formattedTitle, expectedTitle);
-
- checkSizeNumericFields(row, columns[1], expectations.size);
- checkSizeNumericFields(row, columns[2], expectations.effective_size);
- checkSizeNumericFields(row, columns[3], expectations.inner_size);
- checkNumericFields(row, columns[4], expectations.objects_count,
- unitlessNumber_smallerIsBetter);
- checkStringFields(row, columns[5], expectations.url);
-
- var expectedSubRowCount = expectations.sub_row_count;
- if (expectedSubRowCount === undefined)
- assert.isUndefined(row.subRows);
- else
- assert.lengthOf(row.subRows, expectedSubRowCount);
-
- var expectedContexts = expectations.contexts;
- if (expectedContexts === undefined)
- assert.isUndefined(row.contexts);
- else
- assert.deepEqual(tr.b.asArray(row.contexts), expectedContexts);
- }
-
- function buildProcessMemoryDumps(count, preFinalizeDumpsCallback) {
- var pmds = new Array(count);
- tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- for (var i = 0; i < count; i++) {
- var timestamp = 10 + i;
- var gmd = addGlobalMemoryDump(model, {ts: timestamp});
- pmds[i] = addProcessMemoryDump(gmd, process, {ts: timestamp});
- }
- preFinalizeDumpsCallback(pmds);
- });
- return pmds;
- }
-
- function getAllocatorDumps(pmds, fullName) {
- return pmds.map(function(pmd) {
- if (pmd === undefined)
- return undefined;
- return pmd.getMemoryAllocatorDumpByFullName(fullName);
- });
- }
-
- function checkAllocatorPaneColumnInfosAndColor(
- column, dumps, numericName, expectedInfos) {
- var numerics = dumps.map(function(dump) {
- if (dump === undefined)
- return undefined;
- return dump.numerics[numericName];
- });
- checkColumnInfosAndColor(
- column, numerics, dumps, expectedInfos, undefined /* no color */);
- }
-
- test('instantiate_empty', function() {
- tr.ui.analysis.createAndCheckEmptyPanes(this,
- 'tr-ui-a-memory-dump-allocator-details-pane', 'memoryAllocatorDumps',
- function(viewEl) {
- // Check that the info text is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.info_text));
- assert.isFalse(isElementDisplayed(viewEl.$.table));
- });
- });
-
- test('instantiate_single', function() {
- var processMemoryDumps = createProcessMemoryDumps().slice(0, 1);
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-allocator-details-pane');
- viewEl.memoryAllocatorDumps = getAllocatorDumps(processMemoryDumps, 'v8');
- viewEl.rebuild();
- assert.deepEqual(viewEl.requestedChildPanes, [undefined]);
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, undefined /* no aggregation */);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
-
- // Check the rows of the table.
- var rootRow = rows[0];
- checkRow(columns, rootRow, {
- title: 'v8',
- size: [942619648],
- effective_size: [1081031680],
- inner_size: [2097152],
- objects_count: [204],
- sub_row_count: 3,
- contexts: getAllocatorDumps(processMemoryDumps, 'v8'),
- });
-
- var heapsSubRow = rootRow.subRows[0];
- checkRow(columns, heapsSubRow, {
- title: 'heaps',
- size: [805306368],
- effective_size: [805306368],
- sub_row_count: 2,
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/heaps'),
- });
-
- var heapsUnspecifiedSubRow = heapsSubRow.subRows[0];
- checkRow(columns, heapsUnspecifiedSubRow, {
- title: '<unspecified>',
- size: [524288],
- effective_size: [524288],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/heaps/<unspecified>'),
- });
-
- var suballocationsSubRow = rootRow.subRows[2];
- checkRow(columns, suballocationsSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'suballocations');
- assert.equal(formattedTitle.title, '');
- },
- size: [135266304],
- effective_size: [273678336],
- sub_row_count: 3,
- contexts: [SUBALLOCATION_CONTEXT],
- });
-
- var oilpanSuballocationSubRow = suballocationsSubRow.subRows[0];
- checkRow(columns, oilpanSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'oilpan');
- assert.equal(formattedTitle.title, '');
- },
- size: [125829120],
- effective_size: [251658240],
- sub_row_count: 2,
- contexts: [SUBALLOCATION_CONTEXT],
- });
-
- var oilpanUnspecifiedSuballocationSubRow =
- oilpanSuballocationSubRow.subRows[0];
- checkRow(columns, oilpanUnspecifiedSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, '<unspecified>');
- assert.equal(formattedTitle.title, 'v8/__99BEAD');
- },
- size: [75497472],
- effective_size: [150994944],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__99BEAD'),
- });
-
- var oilpanAnimalsSuballocationSubRow = oilpanSuballocationSubRow.subRows[1];
- checkRow(columns, oilpanAnimalsSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'animals');
- assert.equal(formattedTitle.title, '');
- },
- size: [50331648],
- effective_size: [100663296],
- sub_row_count: 2,
- contexts: [SUBALLOCATION_CONTEXT],
- });
-
- var oilpanCowSuballocationSubRow =
- oilpanAnimalsSuballocationSubRow.subRows[0];
- checkRow(columns, oilpanCowSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'cow');
- assert.equal(formattedTitle.title, 'v8/__42BEEF');
- },
- size: [33554432],
- effective_size: [67108864],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__42BEEF'),
- });
-
- var skiaSuballocationSubRow = suballocationsSubRow.subRows[1];
- checkRow(columns, skiaSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'skia');
- assert.equal(formattedTitle.title, 'v8/__15FADE');
- },
- size: [8388608],
- effective_size: [16777216],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__15FADE'),
- });
-
- var ccSuballocationSubRow = suballocationsSubRow.subRows[2];
- checkRow(columns, ccSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'cc');
- assert.equal(formattedTitle.title, 'v8/__12FEED');
- },
- size: [1048576],
- effective_size: [5242880],
- url: ['localhost:1234'],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__12FEED')
- });
- });
-
- test('instantiate_multipleDiff', function() {
- var processMemoryDumps = createProcessMemoryDumps();
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-allocator-details-pane');
- viewEl.memoryAllocatorDumps = getAllocatorDumps(processMemoryDumps, 'v8');
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- assert.deepEqual(viewEl.requestedChildPanes, [undefined]);
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.DIFF);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
-
- // Check the rows of the table.
- var rootRow = rows[0];
- checkRow(columns, rootRow, {
- title: 'v8',
- size: [942619648, 1066401792],
- effective_size: [1081031680, 1073741824],
- inner_size: [2097152, 2097152],
- objects_count: [204, 204],
- sub_row_count: 4,
- contexts: getAllocatorDumps(processMemoryDumps, 'v8'),
- });
-
- var heapsSubRow = rootRow.subRows[0];
- checkRow(columns, heapsSubRow, {
- title: 'heaps',
- size: [805306368, undefined],
- effective_size: [805306368, undefined],
- sub_row_count: 2,
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/heaps'),
- });
-
- var heapsUnspecifiedSubRow = heapsSubRow.subRows[0];
- checkRow(columns, heapsUnspecifiedSubRow, {
- title: '<unspecified>',
- size: [524288, undefined],
- effective_size: [524288, undefined],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/heaps/<unspecified>'),
- });
-
- var unspecifiedSubRow = rootRow.subRows[2];
- checkRow(columns, unspecifiedSubRow, {
- title: '<unspecified>',
- size: [undefined, 791725056],
- effective_size: [undefined, 791725056],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/<unspecified>'),
- });
-
- var suballocationsSubRow = rootRow.subRows[3];
- checkRow(columns, suballocationsSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'suballocations');
- assert.equal(formattedTitle.title, '');
- },
- size: [135266304, 272629760],
- effective_size: [273678336, 279969792],
- sub_row_count: 3,
- contexts: [SUBALLOCATION_CONTEXT, SUBALLOCATION_CONTEXT],
- });
-
- var oilpanSuballocationSubRow = suballocationsSubRow.subRows[0];
- checkRow(columns, oilpanSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'oilpan');
- assert.equal(formattedTitle.title, '');
- },
- size: [125829120, 268435456],
- effective_size: [251658240, 268435456],
- sub_row_count: 2,
- contexts: [SUBALLOCATION_CONTEXT, SUBALLOCATION_CONTEXT],
- });
-
- var oilpanUnspecifiedSuballocationSubRow =
- oilpanSuballocationSubRow.subRows[0];
- checkRow(columns, oilpanUnspecifiedSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, '<unspecified>');
- assert.equal(formattedTitle.title, 'v8/__99BEAD');
- },
- size: [75497472, 268435456],
- effective_size: [150994944, 268435456],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__99BEAD'),
- });
-
- var oilpanAnimalsSuballocationSubRow = oilpanSuballocationSubRow.subRows[1];
- checkRow(columns, oilpanAnimalsSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'animals');
- assert.equal(formattedTitle.title, '');
- },
- size: [50331648, undefined],
- effective_size: [100663296, undefined],
- sub_row_count: 2,
- contexts: [SUBALLOCATION_CONTEXT, undefined],
- });
-
- var oilpanCowSuballocationSubRow =
- oilpanAnimalsSuballocationSubRow.subRows[0];
- checkRow(columns, oilpanCowSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'cow');
- assert.equal(formattedTitle.title, 'v8/__42BEEF');
- },
- size: [33554432, undefined],
- effective_size: [67108864, undefined],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__42BEEF'),
- });
-
- var skiaSuballocationSubRow = suballocationsSubRow.subRows[1];
- checkRow(columns, skiaSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'skia');
- assert.equal(formattedTitle.title, 'v8/__15FADE');
- },
- size: [8388608, undefined],
- effective_size: [16777216, undefined],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/__15FADE'),
- });
-
- var ccSuballocationSubRow = suballocationsSubRow.subRows[2];
- checkRow(columns, ccSuballocationSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'cc');
- assert.equal(formattedTitle.title, 'v8/__12FEED, v8/__13DEED');
- },
- size: [1048576, 4194304],
- effective_size: [5242880, 11534336],
- url: ['localhost:1234', 'localhost:5678'],
- contexts: [
- processMemoryDumps[0].getMemoryAllocatorDumpByFullName('v8/__12FEED'),
- processMemoryDumps[1].getMemoryAllocatorDumpByFullName('v8/__13DEED')
- ]
- });
- });
-
- test('instantiate_multipleMax', function() {
- var processMemoryDumps = createProcessMemoryDumps();
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-allocator-details-pane');
- viewEl.memoryAllocatorDumps = getAllocatorDumps(processMemoryDumps, 'v8');
- viewEl.aggregationMode = AggregationMode.MAX;
- viewEl.rebuild();
- assert.deepEqual(viewEl.requestedChildPanes, [undefined]);
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- // Just check that the aggregation mode was propagated to the columns.
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.MAX);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
- });
-
- test('instantiate_multipleWithUndefined', function() {
- var processMemoryDumps = createProcessMemoryDumps();
- processMemoryDumps.splice(1, 0, undefined);
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-allocator-details-pane');
- viewEl.memoryAllocatorDumps = getAllocatorDumps(processMemoryDumps, 'v8');
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- assert.deepEqual(viewEl.requestedChildPanes, [undefined]);
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.DIFF);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
-
- // Check only a few rows of the table.
- var rootRow = rows[0];
- checkRow(columns, rootRow, {
- title: 'v8',
- size: [942619648, undefined, 1066401792],
- effective_size: [1081031680, undefined, 1073741824],
- inner_size: [2097152, undefined, 2097152],
- objects_count: [204, undefined, 204],
- sub_row_count: 4,
- contexts: getAllocatorDumps(processMemoryDumps, 'v8'),
- });
-
- var unspecifiedSubRow = rootRow.subRows[2];
- checkRow(columns, unspecifiedSubRow, {
- title: '<unspecified>',
- size: [undefined, undefined, 791725056],
- effective_size: [undefined, undefined, 791725056],
- contexts: getAllocatorDumps(processMemoryDumps, 'v8/<unspecified>'),
- });
-
- var suballocationsSubRow = rootRow.subRows[3];
- checkRow(columns, suballocationsSubRow, {
- title: function(formattedTitle) {
- assert.equal(Polymer.dom(formattedTitle).textContent, 'suballocations');
- assert.equal(formattedTitle.title, '');
- },
- size: [135266304, undefined, 272629760],
- effective_size: [273678336, undefined, 279969792],
- sub_row_count: 3,
- contexts: [SUBALLOCATION_CONTEXT, undefined, SUBALLOCATION_CONTEXT],
- });
- });
-
- test('heapDumpsPassThrough', function() {
- var processMemoryDumps = createProcessMemoryDumps();
- var heapDumps = processMemoryDumps.map(function(dump) {
- if (dump === undefined)
- return undefined;
- return new HeapDump(dump, 'v8');
- });
-
- // Start by creating a component details pane without any heap dumps.
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-allocator-details-pane');
- viewEl.memoryAllocatorDumps = getAllocatorDumps(processMemoryDumps, 'v8');
- viewEl.aggregationMode = AggregationMode.MAX;
- viewEl.rebuild();
-
- assert.lengthOf(viewEl.requestedChildPanes, 1);
- assert.isUndefined(viewEl.requestedChildPanes[0]);
-
- // Set the heap dumps. This should trigger creating a heap details pane.
- viewEl.heapDumps = heapDumps;
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
-
- assert.lengthOf(viewEl.requestedChildPanes, 2);
- assert.strictEqual(viewEl.requestedChildPanes[1].tagName,
- 'TR-UI-A-MEMORY-DUMP-HEAP-DETAILS-PANE');
- assert.strictEqual(viewEl.requestedChildPanes[1].heapDumps, heapDumps);
- assert.strictEqual(viewEl.requestedChildPanes[1].aggregationMode,
- AggregationMode.DIFF);
-
- // Unset the heap dumps. This should trigger removing the heap details pane.
- viewEl.heapDumps = undefined;
- viewEl.rebuild();
-
- assert.lengthOf(viewEl.requestedChildPanes, 3);
- assert.isUndefined(viewEl.requestedChildPanes[2]);
- });
-
- test('allocatorDumpNameColumn', function() {
- var c = new AllocatorDumpNameColumn();
-
- // Regular row.
- assert.strictEqual(c.formatTitle({title: 'Regular row'}), 'Regular row');
-
- // Sub-allocation row.
- var row = c.formatTitle({title: 'Suballocation row', suballocation: true});
- assert.strictEqual(Polymer.dom(row).textContent, 'Suballocation row');
- assert.strictEqual(row.style.fontStyle, 'italic');
- });
-
- test('effectiveSizeColumn_noContext', function() {
- var c = new EffectiveSizeColumn('Effective Size', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
-
- // Single selection.
- checkColumnInfosAndColor(c,
- createSizeFields([128]),
- undefined /* no context */,
- [] /* no infos */,
- undefined /* no color */);
-
- // Multi-selection.
- checkColumnInfosAndColor(c,
- createSizeFields([128, 256, undefined, 64]),
- undefined /* no context */,
- [] /* no infos */,
- undefined /* no color */);
- });
-
- test('effectiveSizeColumn_suballocationContext', function() {
- var c = new EffectiveSizeColumn('Effective Size', 'bytes', tr.b.identity,
- AggregationMode.MAX);
-
- // Single selection.
- checkColumnInfosAndColor(c,
- createSizeFields([128]),
- [SUBALLOCATION_CONTEXT],
- [] /* no infos */,
- undefined /* no color */);
-
- // Multi-selection.
- checkColumnInfosAndColor(c,
- createSizeFields([undefined, 256, undefined, 64]),
- [undefined, SUBALLOCATION_CONTEXT, SUBALLOCATION_CONTEXT,
- SUBALLOCATION_CONTEXT],
- [] /* no infos */,
- undefined /* no color */);
- });
-
- test('effectiveSizeColumn_dumpContext_noOwnership', function() {
- var c = new EffectiveSizeColumn('Effective Size', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
- var pmds = buildProcessMemoryDumps(4 /* count */, function(pmds) {
- addRootDumps(pmds[0], ['v8'], function(v8Dump) {
- addChildDump(v8Dump, 'heaps', {numerics: {size: 64}});
- });
- addRootDumps(pmds[2], ['v8'], function(v8Dump) {
- addChildDump(v8Dump, 'heaps', {numerics: {size: 128}});
- });
- addRootDumps(pmds[3], ['v8'], function(v8Dump) {});
- });
- var v8HeapsDumps = getAllocatorDumps(pmds, 'v8/heaps');
-
- // Single selection.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapsDumps[0]],
- 'effective_size',
- [] /* no infos */);
-
- // Multi-selection, all dumps defined.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapsDumps[0], v8HeapsDumps[2]],
- 'effective_size',
- [] /* no infos */);
-
- // Multi-selection, some dumps missing.
- checkAllocatorPaneColumnInfosAndColor(c,
- v8HeapsDumps,
- 'effective_size',
- [] /* no infos */);
- });
-
- test('effectiveSizeColumn_dumpContext_singleOwnership', function() {
- var c = new EffectiveSizeColumn('Effective Size', 'bytes', tr.b.identity,
- AggregationMode.MAX);
- var pmds = buildProcessMemoryDumps(5 /* count */, function(pmds) {
- addRootDumps(pmds[0], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- var oilpanObjectsDump =
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- addOwnershipLink(v8HeapsDump, oilpanObjectsDump);
- });
- addRootDumps(pmds[1], ['v8'], function(v8Dump) {
- addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- // Missing oilpan/objects dump.
- });
- addRootDumps(pmds[2], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- // Missing v8/heaps dump.
- });
- addRootDumps(pmds[3], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- // Missing ownership link.
- });
- addRootDumps(pmds[4], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- var oilpanObjectsDump =
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- addOwnershipLink(v8HeapsDump, oilpanObjectsDump, 2);
- });
- });
- var v8HeapsDump = getAllocatorDumps(pmds, 'v8/heaps');
- var oilpanObjectsDump = getAllocatorDumps(pmds, 'oilpan/objects');
-
- // Single selection.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapsDump[0]],
- 'effective_size',
- [
- {
- icon: '\u21FE',
- message: 'shares \'oilpan/objects\' in Process 1 (importance: 0) ' +
- 'with no other dumps',
- color: 'green'
- }
- ]);
- checkAllocatorPaneColumnInfosAndColor(c,
- [oilpanObjectsDump[4]],
- 'effective_size',
- [
- {
- icon: '\u21FD',
- message: 'shared by \'v8/heaps\' in Process 1 (importance: 2)',
- color: 'green'
- }
- ]);
-
- // Multi-selection, all dumps defined.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapsDump[0], v8HeapsDump[4]],
- 'effective_size',
- [
- {
- icon: '\u21FE',
- message: 'shares \'oilpan/objects\' in Process 1 (importance: ' +
- '0\u20132) with no other dumps',
- color: 'green'
- }
- ]);
- checkAllocatorPaneColumnInfosAndColor(c,
- [oilpanObjectsDump[0], oilpanObjectsDump[4]],
- 'effective_size',
- [
- {
- icon: '\u21FD',
- message: 'shared by \'v8/heaps\' in Process 1 (importance: ' +
- '0\u20132)',
- color: 'green'
- }
- ]);
-
- // Multi-selection, some dumps missing.
- checkAllocatorPaneColumnInfosAndColor(c,
- v8HeapsDump,
- 'effective_size',
- [
- {
- icon: '\u21FE',
- message: 'shares \'oilpan/objects\' in Process 1 at some ' +
- 'selected timestamps (importance: 0\u20132) with no other ' +
- 'dumps',
- color: 'green'
- }
- ]);
- checkAllocatorPaneColumnInfosAndColor(c,
- oilpanObjectsDump,
- 'effective_size',
- [
- {
- icon: '\u21FD',
- message: 'shared by \'v8/heaps\' in Process 1 at some selected ' +
- 'timestamps (importance: 0\u20132)',
- color: 'green'
- }
- ]);
- });
-
- test('effectiveSizeColumn_dumpContext_multipleOwnerships', function() {
- var c = new EffectiveSizeColumn('Effective Size', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
- var pmds = buildProcessMemoryDumps(6 /* count */, function(pmds) {
- addRootDumps(pmds[0], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- var v8QueuesDump = addChildDump(v8Dump, 'queues',
- {numerics: {size: 8}});
- var oilpanObjectsDump =
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- addOwnershipLink(v8HeapsDump, oilpanObjectsDump);
- addOwnershipLink(v8QueuesDump, oilpanObjectsDump, 1);
- });
- addRootDumps(pmds[1], ['v8'], function(v8Dump) {});
- addRootDumps(pmds[2], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- var v8QueuesDump = addChildDump(v8Dump, 'queues',
- {numerics: {size: 8}});
- var v8PilesDump = addChildDump(v8Dump, 'piles', {numerics: {size: 48}});
- var oilpanObjectsDump =
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- addOwnershipLink(v8HeapsDump, oilpanObjectsDump, 2);
- addOwnershipLink(v8QueuesDump, oilpanObjectsDump, 1);
- addOwnershipLink(v8PilesDump, oilpanObjectsDump);
- });
- addRootDumps(pmds[3], ['v8', 'blink'], function(v8Dump, blinkDump) {
- var blinkHandlesDump = addChildDump(blinkDump, 'handles',
- {numerics: {size: 32}});
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 64}});
- var blinkObjectsDump = addChildDump(blinkDump, 'objects',
- {numerics: {size: 32}});
- addOwnershipLink(blinkHandlesDump, v8HeapsDump, -273);
- addOwnershipLink(v8HeapsDump, blinkObjectsDump, 3);
- });
- addRootDumps(pmds[4], ['v8', 'gpu'], function(v8Dump, gpuDump) {
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 64}});
- var gpuTile1Dump = addChildDump(gpuDump, 'tile1',
- {numerics: {size: 100}});
- var gpuTile2Dump = addChildDump(gpuDump, 'tile2',
- {numerics: {size: 99}});
- addOwnershipLink(v8HeapsDump, gpuTile1Dump, 3);
- addOwnershipLink(gpuTile2Dump, gpuTile1Dump, -1);
- });
- addRootDumps(pmds[5], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- var v8HeapsDump = addChildDump(v8Dump, 'heaps', {numerics: {size: 32}});
- var v8QueuesDump = addChildDump(v8Dump, 'queues',
- {numerics: {size: 8}});
- var v8PilesDump = addChildDump(v8Dump, 'piles', {numerics: {size: 48}});
- var oilpanObjectsDump =
- addChildDump(oilpanDump, 'objects', {numerics: {size: 64}});
- addOwnershipLink(v8HeapsDump, oilpanObjectsDump, 1);
- addOwnershipLink(v8QueuesDump, oilpanObjectsDump, 1);
- addOwnershipLink(v8PilesDump, oilpanObjectsDump, 7);
- });
- });
- var v8HeapsDump = getAllocatorDumps(pmds, 'v8/heaps');
- var oilpanObjectsDump = getAllocatorDumps(pmds, 'oilpan/objects');
- var gpuTile1Dump = getAllocatorDumps(pmds, 'gpu/tile1');
-
- // Single selection.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapsDump[4]],
- 'effective_size',
- [
- {
- icon: '\u21FE',
- message: 'shares \'gpu/tile1\' in Process 1 (importance: 3) with ' +
- '\'gpu/tile2\' in Process 1 (importance: -1)',
- color: 'green'
- }
- ]);
- checkAllocatorPaneColumnInfosAndColor(c,
- [gpuTile1Dump[4]],
- 'effective_size',
- [
- {
- icon: '\u21FD',
- message: 'shared by:\n' +
- ' - \'v8/heaps\' in Process 1 (importance: 3)\n' +
- ' - \'gpu/tile2\' in Process 1 (importance: -1)',
- color: 'green'
- }
- ]);
-
- // Multi-selection, all dumps defined.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapsDump[2], v8HeapsDump[5]],
- 'effective_size',
- [
- {
- icon: '\u21FE',
- message: 'shares \'oilpan/objects\' in Process 1 (importance: ' +
- '1\u20132) with:\n' +
- ' - \'v8/queues\' in Process 1 (importance: 1)\n' +
- ' - \'v8/piles\' in Process 1 (importance: 0\u20137)',
- color: 'green'
- }
- ]);
- checkAllocatorPaneColumnInfosAndColor(c,
- [oilpanObjectsDump[2], oilpanObjectsDump[5]],
- 'effective_size',
- [
- {
- icon: '\u21FD',
- message: 'shared by:\n' +
- ' - \'v8/heaps\' in Process 1 (importance: 1\u20132)\n' +
- ' - \'v8/queues\' in Process 1 (importance: 1)\n' +
- ' - \'v8/piles\' in Process 1 (importance: 0\u20137)',
- color: 'green'
- }
- ]);
-
- // Multi-selection, some dumps missing.
- checkAllocatorPaneColumnInfosAndColor(c,
- v8HeapsDump,
- 'effective_size',
- [ // v8/objects is both owned (first info) and an owner (second info).
- {
- icon: '\u21FD',
- message: 'shared by \'blink/handles\' in Process 1 at some ' +
- 'selected timestamps (importance: -273)',
- color: 'green'
- },
- {
- icon: '\u21FE',
- message: 'shares:\n' +
- ' - \'oilpan/objects\' in Process 1 at some selected ' +
- 'timestamps (importance: 0\u20132) with:\n' +
- ' - \'v8/queues\' in Process 1 (importance: 1)\n' +
- ' - \'v8/piles\' in Process 1 at some selected ' +
- 'timestamps (importance: 0\u20137)\n' +
- ' - \'blink/objects\' in Process 1 at some selected ' +
- 'timestamps (importance: 3) with no other dumps\n' +
- ' - \'gpu/tile1\' in Process 1 at some selected timestamps ' +
- '(importance: 3) with \'gpu/tile2\' in Process 1 ' +
- '(importance: -1)',
- color: 'green'
- }
- ]);
- checkAllocatorPaneColumnInfosAndColor(c,
- oilpanObjectsDump,
- 'effective_size',
- [
- {
- icon: '\u21FD',
- message: 'shared by:\n' +
- ' - \'v8/heaps\' in Process 1 at some selected timestamps ' +
- '(importance: 0\u20132)\n' +
- ' - \'v8/queues\' in Process 1 at some selected timestamps ' +
- '(importance: 1)\n' +
- ' - \'v8/piles\' in Process 1 at some selected timestamps ' +
- '(importance: 0\u20137)',
- color: 'green'
- }
- ]);
- });
-
- test('sizeColumn_noContext', function() {
- var c = new SizeColumn('Size', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
-
- // Single selection.
- checkColumnInfosAndColor(c,
- createSizeFields([128]),
- undefined /* no context */,
- [] /* no infos */,
- undefined /* no color */);
-
- // Multi-selection.
- checkColumnInfosAndColor(c,
- createSizeFields([128, 256, undefined, 64]),
- undefined /* no context */,
- [] /* no infos */,
- undefined /* no color */);
- });
-
- test('sizeColumn_suballocationContext', function() {
- var c = new SizeColumn('Size', 'bytes', tr.b.identity, AggregationMode.MAX);
-
- // Single selection.
- checkColumnInfosAndColor(c,
- createSizeFields([128]),
- [SUBALLOCATION_CONTEXT],
- [] /* no infos */,
- undefined /* no color */);
-
- // Multi-selection.
- checkColumnInfosAndColor(c,
- createSizeFields([undefined, 256, undefined, 64]),
- [undefined, SUBALLOCATION_CONTEXT, undefined, SUBALLOCATION_CONTEXT],
- [] /* no infos */,
- undefined /* no color */);
- });
-
- test('sizeColumn_dumpContext', function() {
- var c = new SizeColumn('Size', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
- var pmds = buildProcessMemoryDumps(7 /* count */, function(pmds) {
- addRootDumps(pmds[0], ['v8'], function(v8Dump) {
- // Single direct overlap (v8/objects -> v8/heaps).
- var v8ObjectsDump = addChildDump(v8Dump, 'objects',
- {numerics: {size: 1536}});
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 2048}});
- addOwnershipLink(v8ObjectsDump, v8HeapsDump);
- });
- // pmd[1] intentionally skipped.
- addRootDumps(pmds[2], ['v8'], function(v8Dump, oilpanDump) {
- // Single direct overlap with inconsistent owned dump size.
- var v8ObjectsDump = addChildDump(v8Dump, 'objects',
- {numerics: {size: 3072}});
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 2048}});
- addOwnershipLink(v8ObjectsDump, v8HeapsDump);
- });
- addRootDumps(pmds[3], ['v8'], function(v8Dump) {
- // Single indirect overlap (v8/objects/X -> v8/heaps/42).
- var v8ObjectsDump = addChildDump(v8Dump, 'objects',
- {numerics: {size: 1536}});
- var v8ObjectsXDump = addChildDump(v8ObjectsDump, 'X',
- {numerics: {size: 512}});
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 2048}});
- var v8Heaps42Dump = addChildDump(v8HeapsDump, '42',
- {numerics: {size: 1024}});
- addOwnershipLink(v8ObjectsXDump, v8Heaps42Dump);
- });
- addRootDumps(pmds[4], ['v8'], function(v8Dump) {
- // Multiple overlaps.
- var v8ObjectsDump = addChildDump(v8Dump, 'objects',
- {numerics: {size: 1024}});
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 2048}});
-
- var v8ObjectsXDump = addChildDump(v8ObjectsDump, 'X',
- {numerics: {size: 512}});
- var v8Heaps42Dump = addChildDump(v8HeapsDump, '42',
- {numerics: {size: 1280}});
- addOwnershipLink(v8ObjectsXDump, v8Heaps42Dump);
-
- var v8ObjectsYDump = addChildDump(v8ObjectsDump, 'Y',
- {numerics: {size: 128}});
- var v8Heaps90Dump = addChildDump(v8HeapsDump, '90',
- {numerics: {size: 256}});
- addOwnershipLink(v8ObjectsYDump, v8Heaps90Dump);
-
- var v8BlocksDump = addChildDump(v8Dump, 'blocks',
- {numerics: {size: 768}});
- addOwnershipLink(v8BlocksDump, v8Heaps42Dump);
- });
- addRootDumps(pmds[5], ['v8'], function(v8Dump) {
- // No overlaps, inconsistent parent size.
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 2048}});
- addChildDump(v8HeapsDump, '42', {numerics: {size: 1536}});
- addChildDump(v8HeapsDump, '90', {numerics: {size: 615}});
- });
- addRootDumps(pmds[6], ['v8', 'oilpan'], function(v8Dump, oilpanDump) {
- // No overlaps, inconsistent parent and owned dump size.
- var v8HeapsDump = addChildDump(v8Dump, 'heaps',
- {numerics: {size: 2048}});
- addChildDump(v8HeapsDump, '42', {numerics: {size: 1536}});
- addChildDump(v8HeapsDump, '90', {numerics: {size: 615}});
- var oilpanObjectsDump =
- addChildDump(oilpanDump, 'objects', {numerics: {size: 3072}});
- addOwnershipLink(oilpanObjectsDump, v8HeapsDump);
- });
- });
- var v8HeapDumps = getAllocatorDumps(pmds, 'v8/heaps');
-
- // Single selection, single overlap.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[0]],
- 'size',
- [
- {
- icon: '\u24D8',
- message: 'overlaps with its sibling \'objects\' (1.5 KiB)',
- color: 'blue'
- }
- ]);
-
- // Single selection, multiple overlaps.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[4]],
- 'size',
- [
- {
- icon: '\u24D8',
- message: 'overlaps with its siblings:\n' +
- ' - \'objects\' (640.0 B)\n' +
- ' - \'blocks\' (768.0 B)',
- color: 'blue'
- }
- ]);
-
- // Single selection, warnings with no overlaps.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[6]],
- 'size',
- [
- {
- icon: '\u26A0',
- message: 'provided size (2.0 KiB) was less than the aggregated ' +
- 'size of the children (2.1 KiB)',
- color: 'red'
- },
- {
- icon: '\u26A0',
- message: 'provided size (2.0 KiB) was less than the size of the ' +
- 'largest owner (3.0 KiB)',
- color: 'red'
- }
- ]);
-
- // Single selection, single overlap with a warning.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[2]],
- 'size',
- [
- {
- icon: '\u24D8',
- message: 'overlaps with its sibling \'objects\' (3.0 KiB)',
- color: 'blue'
- },
- {
- icon: '\u26A0',
- message: 'provided size (2.0 KiB) was less than the size of the ' +
- 'largest owner (3.0 KiB)',
- color: 'red'
- }
- ]);
-
- // Multi-selection, single overlap.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[0], v8HeapDumps[3]],
- 'size',
- [
- {
- icon: '\u24D8',
- message: 'overlaps with its sibling \'objects\'',
- color: 'blue'
- }
- ]);
-
- // Multi-selection, multiple overlaps.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[0], v8HeapDumps[4]],
- 'size',
- [
- {
- icon: '\u24D8',
- message: 'overlaps with its siblings:\n' +
- ' - \'objects\'\n' +
- ' - \'blocks\' at some selected timestamps',
- color: 'blue'
- }
- ]);
-
- // Multi-selection, warnings with no overlaps.
- checkAllocatorPaneColumnInfosAndColor(c,
- [v8HeapDumps[5], v8HeapDumps[6]],
- 'size',
- [
- {
- icon: '\u26A0',
- message: 'provided size was less than the aggregated ' +
- 'size of the children',
- color: 'red'
- },
- {
- icon: '\u26A0',
- message: 'provided size was less than the size of the largest ' +
- 'owner at some selected timestamps',
- color: 'red'
- }
- ]);
-
- // Multi-selection, multiple overlaps with warnings.
- checkAllocatorPaneColumnInfosAndColor(c,
- v8HeapDumps,
- 'size',
- [
- {
- icon: '\u24D8',
- message: 'overlaps with its siblings:\n' +
- ' - \'objects\' at some selected timestamps\n' +
- ' - \'blocks\' at some selected timestamps',
- color: 'blue'
- },
- {
- icon: '\u26A0',
- message: 'provided size was less than the size of the largest ' +
- 'owner at some selected timestamps',
- color: 'red'
- },
- {
- icon: '\u26A0',
- message: 'provided size was less than the aggregated size of ' +
- 'the children at some selected timestamps',
- color: 'red'
- }
- ]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane.html
deleted file mode 100644
index 3033295062f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane.html
+++ /dev/null
@@ -1,176 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_overview_pane.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<dom-module id='tr-ui-a-memory-dump-header-pane'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- align-items: center;
-
- background-color: #d0d0d0;
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
- }
-
- #label {
- flex: 1 1 auto;
- padding: 6px;
- font-size: 15px;
- }
-
- #aggregation_mode_container {
- display: none;
- flex: 0 0 auto;
- padding: 5px;
- font-size: 15px;
- }
- </style>
- </tr-ui-b-view-specific-brushing-state>
- <div id="label"></div>
- <div id="aggregation_mode_container">
- <span>Metric aggregation:</span>
- <!-- Aggregation mode selector (added in Polymer.ready()) -->
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- Polymer({
- is: 'tr-ui-a-memory-dump-header-pane',
- behaviors: [tr.ui.analysis.StackedPane],
-
- created: function() {
- this.containerMemoryDumps_ = undefined;
- },
-
- ready: function() {
- Polymer.dom(this.$.aggregation_mode_container).appendChild(
- tr.ui.b.createSelector(this, 'aggregationMode',
- 'memoryDumpHeaderPane.aggregationMode',
- tr.ui.analysis.MemoryColumn.AggregationMode.DIFF, [
- {
- label: 'Diff',
- value: tr.ui.analysis.MemoryColumn.AggregationMode.DIFF
- },
- {
- label: 'Max',
- value: tr.ui.analysis.MemoryColumn.AggregationMode.MAX
- }
- ]));
- },
-
- /**
- * Sets the container memory dumps and schedules rebuilding the pane.
- *
- * The provided value should be a chronologically sorted list of
- * ContainerMemoryDump objects. All of the dumps must be associated with
- * the same container (i.e. containerMemoryDumps must be either a list of
- * ProcessMemoryDump(s) belonging to the same process, or a list of
- * GlobalMemoryDump(s)). Example:
- *
- * [
- * tr.model.ProcessMemoryDump {}, // PMD at timestamp 1.
- * tr.model.ProcessMemoryDump {}, // PMD at timestamp 2.
- * tr.model.ProcessMemoryDump {} // PMD at timestamp 3.
- * ]
- */
- set containerMemoryDumps(containerMemoryDumps) {
- this.containerMemoryDumps_ = containerMemoryDumps;
- this.scheduleRebuild_();
- },
-
- get containerMemoryDumps() {
- return this.containerMemoryDumps_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.scheduleRebuild_();
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- onRebuild_: function() {
- this.updateLabel_();
- this.updateAggregationModeSelector_();
- this.changeChildPane_();
- },
-
- updateLabel_: function() {
- Polymer.dom(this.$.label).textContent = '';
-
- if (this.containerMemoryDumps_ === undefined ||
- this.containerMemoryDumps_.length <= 0) {
- Polymer.dom(this.$.label).textContent = 'No memory dumps selected';
- return;
- }
-
- var containerDumpCount = this.containerMemoryDumps_.length;
- var isMultiSelection = containerDumpCount > 1;
-
- Polymer.dom(this.$.label).appendChild(document.createTextNode(
- 'Selected ' + containerDumpCount + ' memory dump' +
- (isMultiSelection ? 's' : '') +
- ' in ' + this.containerMemoryDumps_[0].containerName + ' at '));
- // TODO(petrcermak): Use <tr-v-ui-scalar-span> once it can be displayed
- // inline. See https://github.com/catapult-project/catapult/issues/1371.
- Polymer.dom(this.$.label).appendChild(document.createTextNode(
- tr.b.Unit.byName.timeStampInMs.format(
- this.containerMemoryDumps_[0].start)));
- if (isMultiSelection) {
- var ELLIPSIS = String.fromCharCode(8230);
- Polymer.dom(this.$.label).appendChild(
- document.createTextNode(ELLIPSIS));
- Polymer.dom(this.$.label).appendChild(document.createTextNode(
- tr.b.Unit.byName.timeStampInMs.format(
- this.containerMemoryDumps_[containerDumpCount - 1].start)));
- }
- },
-
- updateAggregationModeSelector_: function() {
- var displayStyle;
- if (this.containerMemoryDumps_ === undefined ||
- this.containerMemoryDumps_.length <= 1)
- displayStyle = 'none';
- else
- displayStyle = 'initial';
- this.$.aggregation_mode_container.style.display = displayStyle;
- },
-
- changeChildPane_: function() {
- this.childPaneBuilder = function() {
- if (this.containerMemoryDumps_ === undefined ||
- this.containerMemoryDumps_.length <= 0)
- return undefined;
-
- var overviewPane = document.createElement(
- 'tr-ui-a-memory-dump-overview-pane');
- overviewPane.processMemoryDumps = this.containerMemoryDumps_.map(
- function(containerDump) {
- return containerDump.processMemoryDumps;
- });
- overviewPane.aggregationMode = this.aggregationMode;
- return overviewPane;
- }.bind(this);
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane_test.html
deleted file mode 100644
index 8bdf26243af..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_header_pane_test.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/memory_dump_header_pane.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AggregationMode = tr.ui.analysis.MemoryColumn.AggregationMode;
- var isElementDisplayed = tr.ui.analysis.isElementDisplayed;
-
- function createAndCheckMemoryDumpHeaderPane(test, containerMemoryDumps,
- expectedLabelText, expectedChildPaneRequested, expectedSelectorVisible) {
- var viewEl =
- tr.ui.analysis.createTestPane('tr-ui-a-memory-dump-header-pane');
- viewEl.containerMemoryDumps = containerMemoryDumps;
- viewEl.rebuild();
- test.addHTMLOutput(viewEl);
- checkMemoryDumpHeaderPane(viewEl, containerMemoryDumps, expectedLabelText,
- expectedChildPaneRequested, expectedSelectorVisible);
- }
-
- function checkMemoryDumpHeaderPane(viewEl, containerMemoryDumps,
- expectedLabelText, expectedChildPaneRequested, expectedSelectorVisible) {
- // The default aggregation mode is DIFF.
- assert.equal(viewEl.aggregationMode, AggregationMode.DIFF);
-
- // Check the text in the label.
- assert.equal(Polymer.dom(viewEl.$.label).textContent, expectedLabelText);
-
- // Check the visibility of aggregation mode selector.
- var aggregationModeContainerVisible =
- isElementDisplayed(viewEl.$.aggregation_mode_container);
- var childPanes = viewEl.requestedChildPanes;
-
- // Check the requested child panes.
- if (containerMemoryDumps === undefined ||
- containerMemoryDumps.length === 0) {
- assert.isTrue(!expectedSelectorVisible); // Test sanity check.
- assert.isFalse(aggregationModeContainerVisible);
- assert.lengthOf(childPanes, 1);
- assert.isUndefined(childPanes[0]);
- return;
- }
-
- var expectedProcessMemoryDumps = containerMemoryDumps.map(
- function(containerMemoryDump) {
- return containerMemoryDump.processMemoryDumps;
- });
- function checkLastChildPane(expectedChildPaneCount) {
- assert.lengthOf(childPanes, expectedChildPaneCount);
- var lastChildPane = childPanes[expectedChildPaneCount - 1];
- assert.equal(lastChildPane.tagName, 'TR-UI-A-MEMORY-DUMP-OVERVIEW-PANE');
- assert.deepEqual(lastChildPane.processMemoryDumps,
- expectedProcessMemoryDumps);
- assert.equal(lastChildPane.aggregationMode, viewEl.aggregationMode);
- }
-
- checkLastChildPane(1);
-
- // Check the behavior of aggregation mode selector (if visible).
- if (!expectedSelectorVisible) {
- assert.isFalse(aggregationModeContainerVisible);
- return;
- }
-
- assert.isTrue(aggregationModeContainerVisible);
- var selector = tr.b.findDeepElementMatching(viewEl, 'select');
-
- selector.selectedValue = AggregationMode.MAX;
- viewEl.rebuild();
- assert.equal(viewEl.aggregationMode, AggregationMode.MAX);
- checkLastChildPane(2);
-
- selector.selectedValue = AggregationMode.DIFF;
- viewEl.rebuild();
- assert.equal(viewEl.aggregationMode, AggregationMode.DIFF);
- checkLastChildPane(3);
- }
-
- test('instantiate_empty', function() {
- tr.ui.analysis.createAndCheckEmptyPanes(this,
- 'tr-ui-a-memory-dump-header-pane', 'containerMemoryDumps',
- function(viewEl) {
- checkMemoryDumpHeaderPane(viewEl, [], 'No memory dumps selected',
- false /* no child pane requested */,
- false /* aggregation mode selector hidden */);
- });
- });
-
- test('instantiate_singleGlobalMemoryDump', function() {
- createAndCheckMemoryDumpHeaderPane(this,
- [tr.ui.analysis.createSingleTestGlobalMemoryDump()],
- 'Selected 1 memory dump in global space at 68.000 ms',
- true /* child pane requested */,
- false /* aggregation mode selector hidden */);
- });
-
- test('instantiate_multipleGlobalMemoryDumps', function() {
- createAndCheckMemoryDumpHeaderPane(this,
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps(),
- 'Selected 3 memory dumps in global space at 42.000 ms\u2026100.000 ms',
- true /* child pane requested */,
- true /* aggregation selector visible */);
- });
-
- test('instantiate_singleProcessMemoryDump', function() {
- createAndCheckMemoryDumpHeaderPane(this,
- [tr.ui.analysis.createSingleTestProcessMemoryDump()],
- 'Selected 1 memory dump in Process 2 at 69.000 ms',
- true /* child pane requested */,
- false /* aggregation mode selector hidden */);
- });
-
- test('instantiate_multipleProcessMemoryDumps', function() {
- createAndCheckMemoryDumpHeaderPane(this,
- tr.ui.analysis.createMultipleTestProcessMemoryDumps(),
- 'Selected 3 memory dumps in Process 2 at 42.000 ms\u2026102.000 ms',
- true /* child pane requested */,
- true /* aggregation selector visible */);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html
deleted file mode 100644
index 90f796799a5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html
+++ /dev/null
@@ -1,276 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_heap_details_util.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/analysis/rebuildable_behavior.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/tab_view.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_context_controller.html">
-
-<dom-module id='tr-ui-a-memory-dump-heap-details-breakdown-view'>
- <template>
- <tr-ui-b-tab-view id="tabs"></tr-ui-b-tab-view>
- </template>
-</dom-module>
-
-<dom-module id='tr-ui-a-memory-dump-heap-details-breakdown-view-tab'>
- <template>
- <tr-v-ui-scalar-context-controller></tr-v-ui-scalar-context-controller>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- /** @constructor */
- function EmptyFillerColumn() {}
-
- EmptyFillerColumn.prototype = {
- title: '',
-
- value: function() {
- return '';
- },
- };
-
- Polymer({
- is: 'tr-ui-a-memory-dump-heap-details-breakdown-view',
- behaviors: [tr.ui.analysis.RebuildableBehavior],
-
- created: function() {
- this.displayedNode_ = undefined;
- this.dimensionToTab_ = new Map();
- },
-
- ready: function() {
- this.scheduleRebuild_();
- this.root.addEventListener('keydown', this.onKeyDown_.bind(this), true);
- },
-
- get displayedNode() {
- return this.displayedNode_;
- },
-
- set displayedNode(node) {
- this.displayedNode_ = node;
- this.scheduleRebuild_();
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- for (var tab of this.$.tabs.tabs)
- tab.aggregationMode = aggregationMode;
- },
-
- onRebuild_: function() {
- var previouslySelectedTab = this.$.tabs.selectedSubView;
- var previouslySelectedTabFocused = false;
- var previouslySelectedDimension = undefined;
- if (previouslySelectedTab) {
- previouslySelectedTabFocused = previouslySelectedTab.isFocused;
- previouslySelectedDimension = previouslySelectedTab.dimension;
- }
-
- for (var tab of this.$.tabs.tabs) {
- tab.nodes = undefined;
- }
- this.$.tabs.clearSubViews();
-
- if (this.displayedNode_ === undefined) {
- this.$.tabs.label = 'No heap node provided.';
- return;
- }
-
- for (var [dimension, children] of this.displayedNode_.childNodes) {
- if (!this.dimensionToTab_.has(dimension)) {
- this.dimensionToTab_.set(dimension, document.createElement(
- 'tr-ui-a-memory-dump-heap-details-breakdown-view-tab'));
- }
- var tab = this.dimensionToTab_.get(dimension);
- tab.aggregationMode = this.aggregationMode_;
- tab.dimension = dimension;
- tab.nodes = children;
- this.$.tabs.addSubView(tab);
- tab.rebuild();
- if (dimension === previouslySelectedDimension) {
- this.$.tabs.selectedSubView = tab;
- if (previouslySelectedTabFocused)
- tab.focus();
- }
- }
-
- if (this.$.tabs.tabs.length > 0)
- this.$.tabs.label = 'Break selected node further by:';
- else
- this.$.tabs.label = 'Selected node cannot be broken down any further.';
- },
-
- onKeyDown_: function(keyEvent) {
- if (!this.displayedNode_)
- return;
-
- var keyHandled = false;
- switch (keyEvent.keyCode) {
- case 8: // Backspace.
- if (!this.displayedNode_.parentNode)
- break;
-
- // Enter the parent node upon pressing backspace.
- var viewEvent = new tr.b.Event('enter-node');
- viewEvent.node = this.displayedNode_.parentNode;
- this.dispatchEvent(viewEvent);
- keyHandled = true;
- break;
-
- case 37: // Left arrow.
- case 39: // Right arrow.
- var wasFocused = this.$.tabs.selectedSubView.isFocused;
- keyHandled = keyEvent.keyCode === 37 ?
- this.$.tabs.selectPreviousTabIfPossible() :
- this.$.tabs.selectNextTabIfPossible();
- if (wasFocused && keyHandled)
- this.$.tabs.selectedSubView.focus(); // Restore focus to new tab.
- }
-
- if (!keyHandled)
- return;
- keyEvent.stopPropagation();
- keyEvent.preventDefault();
- }
- });
-
- Polymer({
- is: 'tr-ui-a-memory-dump-heap-details-breakdown-view-tab',
- behaviors: [tr.ui.analysis.RebuildableBehavior],
-
- created: function() {
- this.dimension_ = undefined;
- this.nodes_ = undefined;
- this.aggregationMode_ = undefined;
- },
-
- ready: function() {
- this.$.table.addEventListener('step-into', function(tableEvent) {
- var viewEvent = new tr.b.Event('enter-node');
- viewEvent.node = tableEvent.tableRow;
- this.dispatchEvent(viewEvent);
- }.bind(this));
- },
-
- get dimension() {
- return this.dimension_;
- },
-
- set dimension(dimension) {
- this.dimension_ = dimension;
- this.scheduleRebuild_();
- },
-
- get nodes() {
- return this.nodes_;
- },
-
- set nodes(nodes) {
- this.nodes_ = nodes;
- this.scheduleRebuild_();
- },
-
- get dimensionLabel_() {
- if (this.dimension_ === undefined)
- return '(undefined)'
- return this.dimension_.label;
- },
-
- get tabLabel() {
- var nodeCount = 0;
- if (this.nodes_)
- nodeCount = this.nodes_.length;
- return this.dimensionLabel_ + ' (' + nodeCount + ')';
- },
-
- get tabIcon() {
- if (this.dimension_ === undefined ||
- this.dimension_ === tr.ui.analysis.HeapDetailsRowDimension.ROOT) {
- return undefined;
- }
- return {
- text: this.dimension_.symbol,
- style: 'color: ' + tr.b.ColorScheme.getColorForReservedNameAsString(
- this.dimension_.color) + ';'
- };
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.scheduleRebuild_();
- },
-
- focus: function() {
- this.$.table.focus();
- },
-
- blur: function() {
- this.$.table.blur();
- },
-
- get isFocused() {
- return this.$.table.isFocused;
- },
-
- onRebuild_: function() {
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- this.$.table.emptyValue = 'Cannot break down by ' +
- this.dimensionLabel_.toLowerCase() + ' any further.';
- var rows = this.nodes_ || [];
- this.$.table.tableRows = rows;
- this.$.table.tableColumns = this.createColumns_(rows);
- if (this.$.table.sortColumnIndex === undefined) {
- this.$.table.sortColumnIndex = 0;
- this.$.table.sortDescending = false;
- }
- this.$.table.rebuild();
- },
-
- createColumns_: function(rows) {
- var titleColumn = new tr.ui.analysis.HeapDetailsTitleColumn(
- this.dimensionLabel_);
- titleColumn.width = '200px';
-
- var numericColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'cells',
- aggregationMode: this.aggregationMode_,
- rules: tr.ui.analysis.HEAP_DETAILS_COLUMN_RULES,
- shouldSetContextGroup: true
- });
- if (numericColumns.length === 0) {
- numericColumns.push(new EmptyFillerColumn());
- }
- tr.ui.analysis.MemoryColumn.spaceEqually(numericColumns);
-
- var columns = [titleColumn].concat(numericColumns);
- return columns;
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane.html
deleted file mode 100644
index 7b53e66ab5c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane.html
+++ /dev/null
@@ -1,438 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/multi_dimensional_view.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_heap_details_breakdown_view.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_heap_details_path_view.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_heap_details_util.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/base/info_bar.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<dom-module id='tr-ui-a-memory-dump-heap-details-pane'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- #header {
- flex: 0 0 auto;
- display: flex;
- flex-direction: row;
- align-items: center;
-
- background-color: #eee;
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
- }
-
- #label {
- flex: 1 1 auto;
- padding: 8px;
- font-size: 15px;
- font-weight: bold;
- }
-
- #view_mode_container {
- display: none;
- flex: 0 0 auto;
- padding: 5px;
- font-size: 15px;
- }
-
- #contents {
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- }
-
- #info_text {
- padding: 8px;
- color: #666;
- font-style: italic;
- text-align: center;
- }
-
- #split_view {
- display: none; /* Hide until memory allocator dumps are set. */
- flex: 1 0 auto;
- align-self: stretch;
- flex-direction: row;
- }
-
- #path_view {
- width: 50%;
- }
-
- #breakdown_view {
- flex: 1 1 auto;
- width: 0;
- }
-
- #path_view, #breakdown_view {
- overflow-x: auto; /* Show scrollbar if necessary. */
- }
- </style>
- <div id="header">
- <div id="label">Heap details</div>
- <div id="view_mode_container">
- <span>View mode:</span>
- <!-- View mode selector (added in Polymer.ready()) -->
- </div>
- </div>
- <div id="contents">
- <tr-ui-b-info-bar id="info_bar" class="info-bar-hidden">
- </tr-ui-b-info-bar>
-
- <div id="info_text">No heap dump selected</div>
-
- <div id="split_view">
- <tr-ui-a-memory-dump-heap-details-path-view id="path_view">
- </tr-ui-a-memory-dump-heap-details-path-view>
- <tr-ui-b-drag-handle id="drag_handle"></tr-ui-b-drag-handle>
- <tr-ui-a-memory-dump-heap-details-breakdown-view id="breakdown_view">
- </tr-ui-a-memory-dump-heap-details-breakdown-view>
- </div>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var count_smallerIsBetter = tr.b.Unit.byName.count_smallerIsBetter;
- var MultiDimensionalViewBuilder = tr.b.MultiDimensionalViewBuilder;
- var TotalState = tr.b.MultiDimensionalViewNode.TotalState;
-
- /** @{constructor} */
- function HeapDumpTreeNode(
- stackFrameNodes, dimension, title, heavyView, parentNode) {
- this.dimension = dimension;
- this.title = title;
- this.parentNode = parentNode;
-
- this.heavyView_ = heavyView;
- this.stackFrameNodes_ = stackFrameNodes;
- this.lazyCells_ = undefined;
- this.lazyChildNodes_ = undefined;
- }
-
- HeapDumpTreeNode.prototype = {
- get minDisplayedTotalState_() {
- if (this.heavyView_) {
- // Show lower-bound and exact values in heavy views.
- return TotalState.LOWER_BOUND;
- } else {
- // Show only exact values in tree view.
- return TotalState.EXACT;
- }
- },
-
- get childNodes() {
- if (!this.lazyChildNodes_) {
- this.lazyChildNodes_ = new Map();
- this.addDimensionChildNodes_(
- tr.ui.analysis.HeapDetailsRowDimension.STACK_FRAME, 0);
- this.addDimensionChildNodes_(
- tr.ui.analysis.HeapDetailsRowDimension.OBJECT_TYPE, 1);
- this.releaseStackFrameNodesIfPossible_();
- }
- return this.lazyChildNodes_;
- },
-
- get cells() {
- if (!this.lazyCells_) {
- this.addCells_();
- this.releaseStackFrameNodesIfPossible_();
- }
- return this.lazyCells_;
- },
-
- releaseStackFrameNodesIfPossible_: function() {
- if (this.lazyCells_ && this.lazyChildNodes_) {
- // Don't unnecessarily hold a reference to the stack frame nodes when
- // we don't need them anymore.
- this.stackFrameNodes_ = undefined;
- }
- },
-
- addDimensionChildNodes_: function(dimension, dimensionIndex) {
- // Child title -> Timestamp (list index) -> Child
- // MultiDimensionalViewNode.
- var dimensionChildTitleToStackFrameNodes = tr.b.invertArrayOfDicts(
- this.stackFrameNodes_,
- node => this.convertStackFrameNodeDimensionToChildDict_(
- node, dimensionIndex));
-
- // Child title (list index) -> Child HeapDumpTreeNode.
- var dimensionChildNodes = [];
- tr.b.iterItems(dimensionChildTitleToStackFrameNodes,
- function(childTitle, childStackFrameNodes) {
- dimensionChildNodes.push(new HeapDumpTreeNode(childStackFrameNodes,
- dimension, childTitle, this.heavyView_, this));
- }, this);
- this.lazyChildNodes_.set(dimension, dimensionChildNodes);
- },
-
- convertStackFrameNodeDimensionToChildDict_: function(
- stackFrameNode, dimensionIndex) {
- var childDict = {};
-
- var displayedChildrenTotalSize = 0;
- var displayedChildrenTotalCount = 0;
- var hasDisplayedChildren = false;
- var allDisplayedChildrenHaveDisplayedCounts = true;
- for (var child of stackFrameNode.children[dimensionIndex].values()) {
- if (child.values[0].totalState < this.minDisplayedTotalState_)
- continue;
- if (child.values[1].totalState < this.minDisplayedTotalState_)
- allDisplayedChildrenHaveDisplayedCounts = false;
- childDict[child.title[dimensionIndex]] = child;
- displayedChildrenTotalSize += child.values[0].total;
- displayedChildrenTotalCount += child.values[1].total;
- hasDisplayedChildren = true;
- }
-
- var nodeTotalSize = stackFrameNode.values[0].total;
- var nodeTotalCount = stackFrameNode.values[1].total;
-
- // Add '<other>' node if necessary in tree-view.
- var hasUnclassifiedSizeOrCount =
- displayedChildrenTotalSize < nodeTotalSize ||
- displayedChildrenTotalCount < nodeTotalCount;
- if (!this.heavyView_ && hasUnclassifiedSizeOrCount &&
- hasDisplayedChildren) {
- var otherTitle = stackFrameNode.title.slice();
- otherTitle[dimensionIndex] = '<other>';
- var otherNode = new tr.b.MultiDimensionalViewNode(otherTitle, 2);
- childDict[otherTitle[dimensionIndex]] = otherNode;
-
- // '<other>' node size.
- otherNode.values[0].total = nodeTotalSize - displayedChildrenTotalSize;
- otherNode.values[0].totalState = this.minDisplayedTotalState_;
-
- // '<other>' node allocation count.
- otherNode.values[1].total =
- nodeTotalCount - displayedChildrenTotalCount;
- // Don't show allocation count of the '<other>' node if there is a
- // displayed child node that did NOT display allocation count.
- otherNode.values[1].totalState =
- allDisplayedChildrenHaveDisplayedCounts ?
- this.minDisplayedTotalState_ : TotalState.NOT_PROVIDED;
- }
-
- return childDict;
- },
-
- addCells_: function() {
- // Transform a chronological list of heap stack frame tree nodes into a
- // dictionary of cells (where each cell contains a chronological list
- // of the values of its numeric).
- this.lazyCells_ = tr.ui.analysis.createCells(this.stackFrameNodes_,
- function(stackFrameNode) {
- var size = stackFrameNode.values[0].total;
- var numerics = {
- 'Size': new ScalarNumeric(sizeInBytes_smallerIsBetter, size)
- };
- var countValue = stackFrameNode.values[1];
- if (countValue.totalState >= this.minDisplayedTotalState_) {
- var count = countValue.total;
- numerics['Count'] = new ScalarNumeric(
- count_smallerIsBetter, count);
- numerics['Average size per allocation'] = new ScalarNumeric(
- sizeInBytes_smallerIsBetter, count === 0 ? 0 : size / count);
- }
- return numerics;
- }, this);
- }
- };
-
- Polymer({
- is: 'tr-ui-a-memory-dump-heap-details-pane',
- behaviors: [tr.ui.analysis.StackedPane],
-
- created: function() {
- this.heapDumps_ = undefined;
- this.viewMode_ = undefined;
- this.aggregationMode_ = undefined;
- },
-
- ready: function() {
- this.$.info_bar.message = 'Note: Values displayed in the heavy view ' +
- 'are lower bounds (except for the root).';
-
- Polymer.dom(this.$.view_mode_container).appendChild(
- tr.ui.b.createSelector(
- this, 'viewMode', 'memoryDumpHeapDetailsPane.viewMode',
- MultiDimensionalViewBuilder.ViewType.TOP_DOWN_TREE_VIEW,
- [
- {
- label: 'Top-down (Tree)',
- value: MultiDimensionalViewBuilder.ViewType.TOP_DOWN_TREE_VIEW
- },
- {
- label: 'Top-down (Heavy)',
- value:
- MultiDimensionalViewBuilder.ViewType.TOP_DOWN_HEAVY_VIEW
- },
- {
- label: 'Bottom-up (Heavy)',
- value:
- MultiDimensionalViewBuilder.ViewType.BOTTOM_UP_HEAVY_VIEW
- }
- ]));
-
- this.$.drag_handle.target = this.$.path_view;
- this.$.drag_handle.horizontal = false;
-
- // If the user selects a node in the path view, show its children in the
- // breakdown view.
- this.$.path_view.addEventListener('selected-node-changed', (function(e) {
- this.$.breakdown_view.displayedNode = this.$.path_view.selectedNode;
- }).bind(this));
-
- // If the user double-clicks on a node in the breakdown view, select the
- // node in the path view.
- this.$.breakdown_view.addEventListener('enter-node', (function(e) {
- this.$.path_view.selectedNode = e.node;
- }).bind(this));
- },
-
- /**
- * Sets the heap dumps and schedules rebuilding the pane.
- *
- * The provided value should be a chronological list of heap dumps. All
- * dumps are assumed to belong to the same process and belong to the same
- * allocator. Example:
- *
- * [
- * tr.model.HeapDump {}, // Heap dump at timestamp 1.
- * undefined, // Heap dump not provided at timestamp 2.
- * tr.model.HeapDump {}, // Heap dump at timestamp 3.
- * ]
- */
- set heapDumps(heapDumps) {
- this.heapDumps_ = heapDumps;
- this.scheduleRebuild_();
- },
-
- get heapDumps() {
- return this.heapDumps_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.$.path_view.aggregationMode = aggregationMode;
- this.$.breakdown_view.aggregationMode = aggregationMode;
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- set viewMode(viewMode) {
- this.viewMode_ = viewMode;
- this.scheduleRebuild_();
- },
-
- get viewMode() {
- return this.viewMode_;
- },
-
- get heavyView() {
- switch (this.viewMode) {
- case MultiDimensionalViewBuilder.ViewType.TOP_DOWN_HEAVY_VIEW:
- case MultiDimensionalViewBuilder.ViewType.BOTTOM_UP_HEAVY_VIEW:
- return true;
- default:
- return false;
- }
- },
-
- onRebuild_: function() {
- if (this.heapDumps_ === undefined ||
- this.heapDumps_.length === 0) {
- // Show the info text (hide the table and the view mode selector).
- this.$.info_text.style.display = 'block';
- this.$.split_view.style.display = 'none';
- this.$.view_mode_container.style.display = 'none';
- this.$.info_bar.visible = false;
- this.$.path_view.selectedNode = undefined;
- return;
- }
-
- // Show the table and the view mode selector (hide the info text).
- this.$.info_text.style.display = 'none';
- this.$.split_view.style.display = 'flex';
- this.$.view_mode_container.style.display = 'block';
-
- // Show the info bar if in heavy view mode.
- this.$.info_bar.visible = this.heavyView;
-
- this.$.path_view.selectedNode = this.createHeapTree_();
- this.$.path_view.rebuild();
- this.$.breakdown_view.rebuild();
- },
-
- createHeapTree_: function() {
- var definedHeapDump = tr.b.findFirstInArray(this.heapDumps_);
- if (definedHeapDump === undefined)
- return undefined;
-
- // The title of the root node is the name of the allocator.
- var rootRowTitle = definedHeapDump.allocatorName;
-
- var stackFrameTrees = this.createStackFrameTrees_(this.heapDumps_);
-
- return new HeapDumpTreeNode(stackFrameTrees,
- tr.ui.analysis.HeapDetailsRowDimension.ROOT, rootRowTitle,
- this.heavyView);
- },
-
- createStackFrameTrees_: function(heapDumps) {
- return heapDumps.map(function(heapDump) {
- if (heapDump === undefined)
- return undefined;
-
- var builder = new MultiDimensionalViewBuilder(
- 2 /* dimensions (stack frames, object type) */,
- 2 /* valueCount (size, count) */);
-
- // Build the heap tree.
- heapDump.entries.forEach(function(entry) {
- var leafStackFrame = entry.leafStackFrame;
- var stackTracePath = leafStackFrame === undefined ?
- [] : leafStackFrame.getUserFriendlyStackTrace().reverse();
-
- var objectTypeName = entry.objectTypeName;
- var objectTypeNamePath = objectTypeName === undefined ?
- [] : [objectTypeName];
-
- builder.addPath([stackTracePath, objectTypeNamePath],
- [entry.size, entry.count],
- MultiDimensionalViewBuilder.ValueKind.TOTAL);
- }, this);
-
- return builder.buildView(this.viewMode);
- }, this);
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane_test.html
deleted file mode 100644
index 3fdd677213c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_pane_test.html
+++ /dev/null
@@ -1,3999 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel='import' href='/tracing/base/iteration_helpers.html'>
-<link rel='import' href='/tracing/base/multi_dimensional_view.html'>
-<link rel='import' href='/tracing/base/unit.html'>
-<link rel='import' href='/tracing/core/test_utils.html'>
-<link rel='import' href='/tracing/model/heap_dump.html'>
-<link rel='import' href='/tracing/model/memory_dump_test_utils.html'>
-<link rel='import'
- href='/tracing/ui/analysis/memory_dump_heap_details_pane.html'>
-<link rel='import'
- href='/tracing/ui/analysis/memory_dump_sub_view_test_utils.html'>
-<link rel='import' href='/tracing/ui/analysis/memory_dump_sub_view_util.html'>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ViewType = tr.b.MultiDimensionalViewBuilder.ViewType;
- var TOP_DOWN_TREE_VIEW = ViewType.TOP_DOWN_TREE_VIEW;
- var TOP_DOWN_HEAVY_VIEW = ViewType.TOP_DOWN_HEAVY_VIEW;
- var BOTTOM_UP_HEAVY_VIEW = ViewType.BOTTOM_UP_HEAVY_VIEW;
- var HeapDump = tr.model.HeapDump;
- var HeapDetailsRowDimension = tr.ui.analysis.HeapDetailsRowDimension;
- var ROOT = HeapDetailsRowDimension.ROOT;
- var STACK_FRAME = HeapDetailsRowDimension.STACK_FRAME;
- var OBJECT_TYPE = HeapDetailsRowDimension.OBJECT_TYPE;
- var TitleColumn = tr.ui.analysis.TitleColumn;
- var NumericMemoryColumn = tr.ui.analysis.NumericMemoryColumn;
- var AggregationMode = tr.ui.analysis.MemoryColumn.AggregationMode;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var checkColumns = tr.ui.analysis.checkColumns;
- var checkNumericFields = tr.ui.analysis.checkNumericFields;
- var checkSizeNumericFields = tr.ui.analysis.checkSizeNumericFields;
- var isElementDisplayed = tr.ui.analysis.isElementDisplayed;
- var count_smallerIsBetter = tr.b.Unit.byName.count_smallerIsBetter;
-
- function createHeapDumps(withCount) {
- var model = new tr.Model();
- var process = model.getOrCreateProcess(1);
-
- function addHeapEntry(heapDump, stackFrames, objectTypeName, size, count) {
- var leafStackFrame = stackFrames === undefined ? undefined :
- tr.c.TestUtils.newStackTrace(model, stackFrames);
- heapDump.addEntry(leafStackFrame, objectTypeName, size,
- withCount ? count : undefined);
- }
-
- // First timestamp.
- var gmd1 = addGlobalMemoryDump(model, {ts: -10});
- var pmd1 = addProcessMemoryDump(gmd1, process, {ts: -11});
- var hd1 = new HeapDump(pmd1, 'partition_alloc');
-
- addHeapEntry(hd1, undefined /* sum over all traces */,
- undefined /* sum over all types */, 4194304 /* 4 MiB */, 1000);
- addHeapEntry(hd1, undefined /* sum over all traces */, 'v8::Context',
- 1048576 /* 1 MiB */, 200);
- addHeapEntry(hd1, undefined /* sum over all traces */, 'blink::Node',
- 331776 /* 324 KiB */, 10);
- addHeapEntry(hd1, ['MessageLoop::RunTask'],
- undefined /* sum over all types */, 4194304 /* 4 MiB */, 1000);
- addHeapEntry(hd1, ['MessageLoop::RunTask'], 'v8::Context',
- 1048576 /* 1 MiB */, 200);
-
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall'],
- undefined /* sum over all types */, 1406976 /* 1.3 MiB */, 299);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall'],
- 'blink::Node', 331776 /* 324 KiB */, 10);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall'], 'v8::Context',
- 1024000 /* 1000 KiB */, 176);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall', '<self>'],
- undefined /* sum over all types */, 102400 /* 100 KiB */, 30);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall', 'V8.Execute'],
- 'v8::Context', 716800 /* 700 KiB */, 100);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall', 'V8.Execute'],
- undefined /* sum over all types */, 1048576 /* 1 MiB */, 101);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall', 'FunctionCall'],
- undefined /* sum over all types */,
- 153600 /* 150 KiB, lower than the actual sum (should be ignored) */,
- 25 /* the allocation count should, however, NOT be ignored */);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'FunctionCall', 'FunctionCall'],
- 'v8::Context', 153600 /* 150 KiB */, 15);
-
- // The following entry should not appear in the tree-view because there is
- // no entry for its parent stack frame.
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'MissingParent', 'FunctionCall'],
- undefined /* sum over all types */, 10 /* 10 B */, 2);
-
- // The following entry should not appear in the tree-view because there is
- // no sum over all types (for the given stack trace). However, it will lead
- // to a visible increase of the (incorrectly provided) sum over all types
- // of MessageLoop::RunTask -> FunctionCall -> FunctionCall by 50 KiB.
- addHeapEntry(hd1,
- ['MessageLoop::RunTask', 'FunctionCall', 'FunctionCall',
- 'FunctionCall'],
- 'MissingSumOverAllTypes', 51200 /* 50 KiB */, 9);
-
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'V8.Execute'],
- undefined /* sum over all types */, 2404352 /* 2.3 MiB */, 399);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall'],
- undefined /* sum over all types */, 2404352 /* 2.3 MiB */, 399);
- addHeapEntry(hd1, ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall'],
- 'v8::Context', 20480 /* 20 KiB */, 6);
- addHeapEntry(hd1,
- ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', '<self>'],
- 'v8::Context', 15360 /* 15 KiB */, 5);
- addHeapEntry(hd1,
- ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', 'V8.Execute'],
- undefined /* sum over all types */, 2097152 /* 2 MiB */, 99);
- addHeapEntry(hd1,
- ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', 'V8.Execute',
- 'V8.Execute'],
- undefined /* sum over all types */, 2097152 /* 2 MiB */, 99);
- addHeapEntry(hd1,
- ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', '<self>'],
- undefined /* sum over all types */, 307200 /* 300 KiB */, 300);
-
- // Second timestamp.
- var gmd2 = addGlobalMemoryDump(model, {ts: 10});
- var pmd2 = addProcessMemoryDump(gmd2, process, {ts: 11});
- var hd2 = new HeapDump(pmd2, 'partition_alloc');
-
- addHeapEntry(hd2, undefined /* sum over all traces */,
- undefined /* sum over all types */,
- 3145728 /* 3 MiB, lower than the actual sum (should be ignored) */,
- 900 /* the allocation count should, however, NOT be ignored */);
- addHeapEntry(hd2, undefined /* sum over all traces */,
- 'v8::Context', 1258291 /* 1.2 MiB */, 520);
- addHeapEntry(hd2, undefined /* sum over all traces */,
- 'blink::Node', 1048576 /* 1 MiB */, 5);
- addHeapEntry(hd2, ['<self>'], undefined /* sum over all types */,
- 131072 /* 128 KiB */, 16);
- addHeapEntry(hd2, ['<self>'], 'v8::Context', 131072 /* 128 KiB */, 16);
- addHeapEntry(hd2, ['MessageLoop::RunTask'],
- undefined /* sum over all types */, 4823449 /* 4.6 MiB */, 884);
- addHeapEntry(hd2, ['MessageLoop::RunTask'], 'v8::Context',
- 1127219 /* 1.1 MiB */, 317);
-
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall'],
- undefined /* sum over all types */, 2170880 /* 2.1 MiB */, 600);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall'], 'v8::Context',
- 1024000 /* 1000 KiB */, 500);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall'], 'blink::Node',
- 819200 /* 800 KiB */, 4);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall', 'V8.Execute'],
- undefined /* sum over all types */, 1572864 /* 1.5 MiB */, 270);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall', 'V8.Execute'],
- 'v8::Context', 614400 /* 600 KiB */, 123);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall', 'V8.Execute'],
- 'blink::Node', 819200 /* 800 KiB */, 4);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall', 'FunctionCall'],
- undefined /* sum over all types */, 204800 /* 200 KiB */, 313);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall', 'FunctionCall'],
- 'v8::Context', 122880 /* 120 KiB */, 270);
- addHeapEntry(hd2,
- ['MessageLoop::RunTask', 'FunctionCall', 'FunctionCall',
- 'FunctionCall'],
- undefined /* sum over all types */, 204800 /* 200 KiB */, 313);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'FunctionCall', '<self>'],
- undefined /* sum over all types */, 393216 /* 384 KiB */, 17);
-
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'V8.Execute'],
- undefined /* sum over all types */, 2621440 /* 2.5 MiB */, 199);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall'],
- undefined /* sum over all types */, 2621440 /* 2.5 MiB */, 199);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall'],
- 'v8::Context', 20480 /* 20 KiB */, 4);
- addHeapEntry(hd2, ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall'],
- 'WTF::StringImpl', 126362 /* 123.4 KiB */, 56);
- addHeapEntry(hd2,
- ['MessageLoop::RunTask', 'V8.Execute', 'FunctionCall', 'V8.Execute'],
- undefined /* sum over all types */, 2516582 /* 2.4 MiB */, 158);
-
- return [hd1, hd2];
- }
-
- function checkDisplayedElements(viewEl, displayExpectations) {
- assert.strictEqual(isElementDisplayed(viewEl.$.info_text),
- displayExpectations.infoText);
- assert.strictEqual(isElementDisplayed(viewEl.$.info_bar),
- displayExpectations.infoBar);
- assert.strictEqual(isElementDisplayed(viewEl.$.split_view),
- displayExpectations.tableAndSplitView);
- assert.strictEqual(isElementDisplayed(viewEl.$.view_mode_container),
- displayExpectations.tableAndSplitView);
- }
-
- var EXPECTED_COLUMNS_WITHOUT_COUNT = [
- { title: 'Current path', type: TitleColumn, noAggregation: true },
- { title: 'Size', type: NumericMemoryColumn }
- ];
-
- var EXPECTED_COLUMNS_WITH_COUNT = EXPECTED_COLUMNS_WITHOUT_COUNT.concat([
- { title: 'Count', type: NumericMemoryColumn },
- { title: 'Average size per allocation', type: NumericMemoryColumn }
- ]);
-
- var EXPECTED_CELLS = ['Size', 'Count', 'Average size per allocation'];
-
- function checkNode(node, expectedNodeStructure, expectedParentNode) {
- assert.strictEqual(node.title, expectedNodeStructure.title);
- assert.strictEqual(node.dimension, expectedNodeStructure.dimension);
- assert.strictEqual(node.parentNode, expectedParentNode);
-
- // Check that there AREN'T any cells that we are NOT expecting.
- var cells = node.cells;
- assert.includeMembers(EXPECTED_CELLS, Object.keys(cells));
-
- var sizeCell = cells['Size'];
- var sizeFields = sizeCell ? sizeCell.fields : undefined;
- checkSizeNumericFields(sizeFields, undefined, expectedNodeStructure.size);
-
- var countCell = cells['Count'];
- var countFields = countCell ? countCell.fields : undefined;
- checkNumericFields(countFields, undefined, expectedNodeStructure.count,
- count_smallerIsBetter);
-
- var averageSizeCell = cells['Average size per allocation'];
- var averageSizeFields = averageSizeCell ? averageSizeCell.fields :
- undefined;
- checkSizeNumericFields(averageSizeFields, undefined,
- expectedNodeStructure.averageSize);
-
- assert.strictEqual(node.childNodes.size, 2);
-
- // If |expectedNodeStructure.children| is undefined, check that there are
- // no child nodes.
- if (!expectedNodeStructure.children) {
- assert.lengthOf(node.childNodes.get(STACK_FRAME), 0);
- assert.lengthOf(node.childNodes.get(OBJECT_TYPE), 0);
- return;
- }
-
- // If |expectedNodeStructure.children| is just a number, check total number
- // of child nodes.
- if (typeof expectedNodeStructure.children === 'number') {
- assert.strictEqual(expectedNodeStructure.children,
- node.childNodes.get(STACK_FRAME).length +
- node.childNodes.get(OBJECT_TYPE).length);
- return;
- }
-
- // Check child nodes wrt both dimensions.
- checkNodes(node.childNodes.get(STACK_FRAME),
- expectedNodeStructure.children.filter(c => c.dimension === STACK_FRAME),
- node);
- checkNodes(node.childNodes.get(OBJECT_TYPE),
- expectedNodeStructure.children.filter(c => c.dimension === OBJECT_TYPE),
- node);
- }
-
- function checkNodes(nodes, expectedStructure, expectedParentNode) {
- assert.lengthOf(nodes, expectedStructure.length);
- for (var i = 0; i < expectedStructure.length; i++) {
- checkNode(nodes[i], expectedStructure[i], expectedParentNode);
- }
- }
-
- function checkSplitView(viewEl, expectedConfig, expectedStructure) {
- checkDisplayedElements(viewEl, {
- infoText: false,
- tableAndSplitView: true,
- infoBar: !!expectedConfig.expectedInfoBarDisplayed
- });
-
- // Both the split view and breakdown view should be displaying the same
- // node.
- var selectedNode = viewEl.$.path_view.selectedNode;
- assert.strictEqual(viewEl.$.breakdown_view.displayedNode, selectedNode);
- checkNodes([selectedNode], expectedStructure,
- undefined /* expectedParentNode */);
-
- // TODO: Add proper tests for tr-ui-a-memory-dump-heap-details-path-view
- // and tr-ui-a-memory-dump-heap-details-breakdown-view.
- var expectedColumns = expectedConfig.expectedCountColumns ?
- EXPECTED_COLUMNS_WITH_COUNT : EXPECTED_COLUMNS_WITHOUT_COUNT;
- checkColumns(viewEl.$.path_view.$.table.tableColumns, expectedColumns,
- expectedConfig.expectedAggregationMode);
- }
-
- function changeView(viewEl, viewType) {
- tr.b.findDeepElementMatching(viewEl, 'select').selectedValue = viewType;
- viewEl.rebuild();
- }
-
- test('instantiate_empty', function() {
- tr.ui.analysis.createAndCheckEmptyPanes(this,
- 'tr-ui-a-memory-dump-heap-details-pane', 'heapDumps',
- function(viewEl) {
- // Check that the info text is shown.
- checkDisplayedElements(viewEl, {
- infoText: true,
- tableAndSplitView: false,
- infoBar: false
- });
- });
- });
-
- test('instantiate_noEntries', function() {
- var heapDumps = createHeapDumps(false).slice(0, 1);
- heapDumps[0].entries = [];
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-heap-details-pane');
- viewEl.heapDumps = heapDumps;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Top-down tree view (default).
- checkSplitView(viewEl,
- { /* empty expectedConfig */ },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [0],
- defined: [true]
- }
- ]);
-
- changeView(viewEl, TOP_DOWN_HEAVY_VIEW);
- checkSplitView(viewEl,
- { expectedInfoBarDisplayed: true },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [0],
- defined: [true]
- }
- ]);
-
- changeView(viewEl, BOTTOM_UP_HEAVY_VIEW);
- checkSplitView(viewEl,
- { expectedInfoBarDisplayed: true },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [0],
- defined: [true]
- }
- ]);
-
- changeView(viewEl, TOP_DOWN_TREE_VIEW);
- });
-
- test('instantiate_single', function() {
- var heapDumps = createHeapDumps(false).slice(0, 1);
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-heap-details-pane');
- viewEl.heapDumps = heapDumps;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Top-down tree view (default).
- checkSplitView(viewEl,
- { /* empty expectedConfig */ },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [4194304],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1406976],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [102400],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [331776],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600 + 51200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [51200],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [51200],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1024000],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [51200],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [307200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [291840],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [5120],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [2383872],
- defined: [true],
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [382976],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [24576],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [3145728],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [24576],
- defined: [true],
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [2813952],
- defined: [true],
- }
- ]
- }
- ]);
-
- changeView(viewEl, BOTTOM_UP_HEAVY_VIEW);
- checkSplitView(viewEl,
- { expectedInfoBarDisplayed: true },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [4194304],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576],
- defined: [true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [3811338],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1406976],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1024000],
- defined: [true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [204800],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [204800],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600],
- defined: [true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [153600],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MissingParent',
- size: [10],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [10],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [20480],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [331776],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1044480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1024000],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [153600],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [20480],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [409600],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [409600],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [102400],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [307200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [307200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [15360],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [15360],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [15360],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [3452928],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [3145728],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [2097152],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [716800],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [2097152],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [737280],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [716800],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [716800],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [20480],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MissingParent',
- size: [10],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [10],
- defined: [true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1048576],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1044480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1024000],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [153600],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [20480],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [15360],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [15360],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [737280],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [716800],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [716800],
- defined: [true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [20480],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [331776],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [331776],
- defined: [true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]);
-
- changeView(viewEl, TOP_DOWN_HEAVY_VIEW);
- checkSplitView(viewEl,
- { expectedInfoBarDisplayed: true }, [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [4194304],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1406976],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [102400],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600 + 51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1024000],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MissingParent',
- size: [10],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [10],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [307200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1406976 + 10 + 2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [102400 + 307200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [1048576 + 2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600 + 51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1024000 + 20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [102400 + 307200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [1048576 + 2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2404352],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [307200],
- defined: [true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152],
- defined: [true],
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800 + 20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MissingParent',
- size: [10],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [10],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1048576],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000 + 20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800 + 20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [331776],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776],
- defined: [true],
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776],
- defined: [true],
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200],
- defined: [true],
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]);
- });
-
- test('instantiate_multipleDiff', function() {
- var heapDumps = createHeapDumps(true /* with allocation counts */);
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-heap-details-pane');
- viewEl.heapDumps = heapDumps;
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- changeView(viewEl, TOP_DOWN_HEAVY_VIEW);
- checkSplitView(viewEl,
- {
- expectedAggregationMode: AggregationMode.DIFF,
- expectedInfoBarDisplayed: true,
- expectedCountColumns: true
- },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304, 4954521],
- count: [1000, 900],
- averageSize: [4194304 / 1000, 4954521 / 900],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [4194304, 4823449],
- count: [1000, 884],
- averageSize: [4194304 / 1000, 4823449 / 884],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1406976, 2170880],
- count: [299, 600],
- averageSize: [1406976 / 299, 2170880 / 600],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [102400, 393216],
- count: [30, 17],
- averageSize: [102400 / 30, 393216 / 17],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [1048576, 1572864],
- count: [101, 270],
- averageSize: [1048576 / 101, 1572864 / 270],
- defined: [true, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [204800, 204800],
- count: [25, 313],
- averageSize: [204800 / 25, 204800 / 313],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, 204800],
- count: [9, 313],
- averageSize: [51200 / 9, 204800 / 313],
- defined: [true, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1024000, 1024000],
- count: [176, 500],
- averageSize: [1024000 / 176, 1024000 / 500],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MissingParent',
- size: [10, undefined],
- count: [2, undefined],
- averageSize: [10 / 2, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [10, undefined],
- count: [2, undefined],
- averageSize: [10 / 2, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2404352, 2621440],
- count: [399, 199],
- averageSize: [2404352 / 399, 2621440 / 199],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2404352, 2621440],
- count: [399, 199],
- averageSize: [2404352 / 399, 2621440 / 199],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [307200, undefined],
- count: [300, undefined],
- averageSize: [307200 / 300, undefined],
- defined: [true, false],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, 2516582],
- count: [99, 158],
- averageSize: [2097152 / 99, 2516582 / 158],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, undefined],
- count: [99, undefined],
- averageSize: [2097152 / 99, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576, 1127219],
- count: [200, 504],
- averageSize: [1048576 / 200, 1127219 / 504],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000, 1024000],
- count: [176, 500],
- averageSize: [1024000 / 176, 1024000 / 500],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [3811338, 4792320],
- count: [700, 799],
- averageSize: [3811338 / 700, 4792320 / 799],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [409600, 393216],
- count: [330, 17],
- averageSize: [409600 / 330, 393216 / 17],
- defined: [true, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [3145728, 4089446],
- count: [200, 428],
- averageSize: [3145728 / 200, 4089446 / 428],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, undefined],
- count: [99, undefined],
- averageSize: [2097152 / 99, undefined],
- defined: [true, false]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [204800, 204800],
- count: [25, 313],
- averageSize: [204800 / 25, 204800 / 313],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, 204800],
- count: [9, 313],
- averageSize: [51200 / 9, 204800 / 313],
- defined: [true, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1044480, 1044480],
- count: [182, 504],
- averageSize: [1044480 / 182, 1044480 / 504],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [409600, 524288],
- count: [330, 33],
- averageSize: [409600 / 330, 524288 / 33],
- defined: [true, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360, 131072],
- count: [5, 16],
- averageSize: [15360 / 5, 131072 / 16],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [3452928, 4194304],
- count: [500, 469],
- averageSize: [3452928 / 500, 4194304 / 469],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2404352, 2621440],
- count: [399, 199],
- averageSize: [2404352 / 399, 2621440 / 199],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [307200, undefined],
- count: [300, undefined],
- averageSize: [307200 / 300, undefined],
- defined: [true, false],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, 2516582],
- count: [99, 158],
- averageSize: [2097152 / 99, 2516582 / 158],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, undefined],
- count: [99, undefined],
- averageSize: [2097152 / 99, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, undefined],
- count: [99, undefined],
- averageSize: [2097152 / 99, undefined],
- defined: [true, false]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [737280, 634880],
- count: [106, 127],
- averageSize: [737280 / 106, 634880 / 127],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'MissingParent',
- size: [10, undefined],
- count: [2, undefined],
- averageSize: [10 / 2, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [10, undefined],
- count: [2, undefined],
- averageSize: [10 / 2, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576, 1258291],
- count: [200, 520],
- averageSize: [1048576 / 200, 1258291 / 520],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1048576, 1127219],
- count: [200, 504],
- averageSize: [1048576 / 200, 1127219 / 504],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000, 1024000],
- count: [176, 500],
- averageSize: [1024000 / 176, 1024000 / 500],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1044480, 1044480],
- count: [182, 504],
- averageSize: [1044480 / 182, 1044480 / 504],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, 131072],
- count: [5, 16],
- averageSize: [15360 / 5, 131072 / 16],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [737280, 634880],
- count: [106, 127],
- averageSize: [737280 / 106, 634880 / 127],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776, 1048576],
- count: [10, 5],
- averageSize: [331776 / 10, 1048576 / 5],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'MissingSumOverAllTypes',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [51200, undefined],
- count: [9, undefined],
- averageSize: [51200 / 9, undefined],
- defined: [true, false]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- }
- ]
- }
- ]
- }
- ]);
-
- changeView(viewEl, TOP_DOWN_TREE_VIEW);
- checkSplitView(viewEl,
- {
- expectedAggregationMode: AggregationMode.DIFF,
- expectedCountColumns: true
- },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304, 4954521],
- count: [1000, 900],
- averageSize: [4194304 / 1000, 4954521 / 900],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [4194304, 4823449],
- count: [1000, 884],
- averageSize: [4194304 / 1000, 4823449 / 884],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1406976, 2170880],
- count: [299, 600],
- averageSize: [1406976 / 299, 2170880 / 600],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [102400, 393216],
- count: [30, 17],
- averageSize: [102400 / 30, 393216 / 17],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [1048576, 1572864],
- count: [101, 270],
- averageSize: [1048576 / 101, 1572864 / 270],
- defined: [true, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [331776, 139264],
- count: [1, 143],
- averageSize: [331776 / 1, 139264 / 143],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [204800, 204800],
- count: [25, 313],
- averageSize: [204800 / 25, 204800 / 313],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [undefined, 204800],
- count: [undefined, 313],
- averageSize: [undefined, 204800 / 313],
- defined: [false, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [51200, 81920],
- count: [10, 43],
- averageSize: [51200 / 10, 81920 / 43],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [51200, undefined],
- count: [143, undefined],
- averageSize: [51200 / 143, undefined],
- defined: [true, false]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776, 819200],
- count: [10, 4],
- averageSize: [331776 / 10, 819200 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [undefined, 819200],
- count: [undefined, 4],
- averageSize: [undefined, 819200 / 4],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1024000, 1024000],
- count: [176, 500],
- averageSize: [1024000 / 176, 1024000 / 500],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [153600, 286720],
- count: [61, 107],
- averageSize: [153600 / 61, 286720 / 107],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [51200, 327680],
- count: [113, 96],
- averageSize: [51200 / 113, 327680 / 96],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2404352, 2621440],
- count: [399, 199],
- averageSize: [2404352 / 399, 2621440 / 199],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [2404352, 2621440],
- count: [399, 199],
- averageSize: [2404352 / 399, 2621440 / 199],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [307200, undefined],
- count: [300, undefined],
- averageSize: [307200 / 300, undefined],
- defined: [true, false],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [291840, undefined],
- count: [295, undefined],
- averageSize: [291840 / 295, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, 2516582],
- count: [99, 158],
- averageSize: [2097152 / 99, 2516582 / 158],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [2097152, undefined],
- count: [99, undefined],
- averageSize: [2097152 / 99, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [undefined, 104858],
- count: [undefined, 41],
- averageSize: [undefined, 104858 / 41],
- defined: [false, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [20480, 20480],
- count: [6, 4],
- averageSize: [20480 / 6, 20480 / 4],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [15360, undefined],
- count: [5, undefined],
- averageSize: [15360 / 5, undefined],
- defined: [true, false]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [5120, undefined],
- count: [1, undefined],
- averageSize: [5120 / 1, undefined],
- defined: [true, false]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [2383872, 2474598],
- count: [393, 139],
- averageSize: [2383872 / 393, 2474598 / 139],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'WTF::StringImpl',
- size: [undefined, 126362],
- count: [undefined, 56],
- averageSize: [undefined, 126362 / 56],
- defined: [false, true]
- }
- ]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [382976, 31129],
- count: [302, 85],
- averageSize: [382976 / 302, 31129 / 85],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576, 1127219],
- count: [200, 504],
- averageSize: [1048576 / 200, 1127219 / 504],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000, 1024000],
- count: [176, 500],
- averageSize: [1024000 / 176, 1024000 / 500],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [153600, 286720],
- count: [61, 107],
- averageSize: [153600 / 61, 286720 / 107],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [24576, 103219],
- count: [24, 4],
- averageSize: [24576 / 24, 103219 / 4],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [3145728, 3696230],
- count: [800, 380],
- averageSize: [3145728 / 800, 3696230 / 380],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [undefined, 131072],
- count: [undefined, 16],
- averageSize: [undefined, 131072 / 16],
- defined: [false, true],
- children: [
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [undefined, 131072],
- count: [undefined, 16],
- averageSize: [undefined, 131072 / 16],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'v8::Context',
- size: [1048576, 1258291],
- count: [200, 520],
- averageSize: [1048576 / 200, 1258291 / 520],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'MessageLoop::RunTask',
- size: [1048576, 1127219],
- count: [200, 504],
- averageSize: [1048576 / 200, 1127219 / 504],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [1024000, 1024000],
- count: [176, 500],
- averageSize: [1024000 / 176, 1024000 / 500],
- defined: [true, true],
- children: [
- {
- dimension: STACK_FRAME,
- title: 'V8.Execute',
- size: [716800, 614400],
- count: [100, 123],
- averageSize: [716800 / 100, 614400 / 123],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: 'FunctionCall',
- size: [153600, 122880],
- count: [15, 270],
- averageSize: [153600 / 15, 122880 / 270],
- defined: [true, true]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [153600, 286720],
- count: [61, 107],
- averageSize: [153600 / 61, 286720 / 107],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<other>',
- size: [24576, 103219],
- count: [24, 4],
- averageSize: [24576 / 24, 103219 / 4],
- defined: [true, true]
- }
- ]
- },
- {
- dimension: STACK_FRAME,
- title: '<self>',
- size: [undefined, 131072],
- count: [undefined, 16],
- averageSize: [undefined, 131072 / 16],
- defined: [false, true]
- }
- ]
- },
- {
- dimension: OBJECT_TYPE,
- title: 'blink::Node',
- size: [331776, 1048576],
- count: [10, 5],
- averageSize: [331776 / 10, 1048576 / 5],
- defined: [true, true]
- },
- {
- dimension: OBJECT_TYPE,
- title: '<other>',
- size: [2813952, 2647654],
- count: [790, 375],
- averageSize: [2813952 / 790, 2647654 / 375],
- defined: [true, true]
- }
- ]
- }
- ]);
- });
-
- test('instantiate_multipleMax', function() {
- var heapDumps = createHeapDumps(false);
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-heap-details-pane');
- viewEl.heapDumps = heapDumps;
- viewEl.aggregationMode = AggregationMode.MAX;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- changeView(viewEl, TOP_DOWN_HEAVY_VIEW);
- checkSplitView(viewEl,
- {
- expectedAggregationMode: AggregationMode.MAX,
- expectedInfoBarDisplayed: true
- },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304, 4954521],
- defined: [true, true],
- children: 9 // No need to check the full structure again.
- }
- ]);
- });
-
- test('instantiate_multipleWithUndefined', function() {
- var heapDumps = createHeapDumps(false);
- heapDumps.splice(1, 0, undefined);
-
- var viewEl = tr.ui.analysis.createTestPane(
- 'tr-ui-a-memory-dump-heap-details-pane');
- viewEl.heapDumps = heapDumps;
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Top-down tree view (default).
- checkSplitView(viewEl,
- { expectedAggregationMode: AggregationMode.DIFF },
- [
- {
- dimension: ROOT,
- title: 'partition_alloc',
- size: [4194304, undefined, 4954521],
- defined: [true, false, true],
- children: 5 // No need to check the full structure again.
- }
- ]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_path_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_path_view.html
deleted file mode 100644
index de5e473049b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_path_view.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_heap_details_util.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/analysis/rebuildable_behavior.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_context_controller.html">
-
-<dom-module id='tr-ui-a-memory-dump-heap-details-path-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- </style>
- <tr-v-ui-scalar-context-controller></tr-v-ui-scalar-context-controller>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var DOWNWARDS_ARROW_WITH_TIP_RIGHTWARDS = String.fromCharCode(0x21B3);
-
- function HeapDetailsPathColumn(title) {
- tr.ui.analysis.HeapDetailsTitleColumn.call(this, title);
- }
-
- HeapDetailsPathColumn.prototype = {
- __proto__: tr.ui.analysis.HeapDetailsTitleColumn.prototype,
-
- formatTitle: function(row) {
- var title = tr.ui.analysis.HeapDetailsTitleColumn.prototype.
- formatTitle.call(this, row);
- if (row.dimension === tr.ui.analysis.HeapDetailsRowDimension.ROOT)
- return title;
-
- var arrowEl = document.createElement('span');
- Polymer.dom(arrowEl).textContent = DOWNWARDS_ARROW_WITH_TIP_RIGHTWARDS;
- arrowEl.style.paddingRight = '2px';
- arrowEl.style.fontWeight = 'bold';
- arrowEl.style.color = tr.b.ColorScheme.getColorForReservedNameAsString(
- 'heap_dump_child_node_arrow');
-
- var rowEl = document.createElement('span');
- Polymer.dom(rowEl).appendChild(arrowEl);
- Polymer.dom(rowEl).appendChild(tr.ui.b.asHTMLOrTextNode(title));
- return rowEl;
- }
- }
-
- Polymer({
- is: 'tr-ui-a-memory-dump-heap-details-path-view',
- behaviors: [tr.ui.analysis.RebuildableBehavior],
-
- created: function() {
- this.selectedNode_ = undefined;
- this.aggregationMode_ = undefined;
- },
-
- ready: function() {
- this.$.table.addEventListener('selection-changed', function(event) {
- this.selectedNode_ = this.$.table.selectedTableRow;
- this.didSelectedNodeChange_();
- }.bind(this));
- },
-
- didSelectedNodeChange_: function() {
- this.dispatchEvent(new tr.b.Event('selected-node-changed'));
- },
-
- get selectedNode() {
- return this.selectedNode_;
- },
-
- set selectedNode(node) {
- this.selectedNode_ = node;
- this.didSelectedNodeChange_();
- this.scheduleRebuild_();
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.scheduleRebuild_();
- },
-
- onRebuild_: function() {
- if (this.selectedNode_ === undefined) {
- this.$.table.clear();
- return;
- }
-
- if (this.$.table.tableRows.includes(this.selectedNode_)) {
- this.$.table.selectedTableRow = this.selectedNode_;
- return;
- }
-
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- this.$.table.userCanModifySortOrder = false;
- var rows = this.createRows_(this.selectedNode_);
- this.$.table.tableRows = rows;
- this.$.table.tableColumns = this.createColumns_(rows);
- this.$.table.selectedTableRow = rows[rows.length - 1];
- },
-
- createRows_: function(node) {
- var rows = [];
- while (node) {
- rows.push(node);
- node = node.parentNode;
- }
- rows.reverse();
- return rows;
- },
-
- createColumns_: function(rows) {
- var titleColumn = new HeapDetailsPathColumn('Current path');
- titleColumn.width = '200px';
-
- var numericColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'cells',
- aggregationMode: this.aggregationMode_,
- rules: tr.ui.analysis.HEAP_DETAILS_COLUMN_RULES,
- shouldSetContextGroup: true
- });
- tr.ui.analysis.MemoryColumn.spaceEqually(numericColumns);
-
- return [titleColumn].concat(numericColumns);
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_util.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_util.html
deleted file mode 100644
index d0c33aca21a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_heap_details_util.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var LATIN_SMALL_LETTER_F_WITH_HOOK = String.fromCharCode(0x0192);
- var CIRCLED_LATIN_CAPITAL_LETTER_T = String.fromCharCode(0x24C9);
-
- /** @{enum} */
- var HeapDetailsRowDimension = {
- ROOT: {},
- STACK_FRAME: {
- label: 'Stack frame',
- symbol: LATIN_SMALL_LETTER_F_WITH_HOOK,
- color: 'heap_dump_stack_frame'
- },
- OBJECT_TYPE: {
- label: 'Object type',
- symbol: CIRCLED_LATIN_CAPITAL_LETTER_T,
- color: 'heap_dump_object_type'
- }
- };
-
- /** @{constructor} */
- function HeapDetailsTitleColumn(title) {
- tr.ui.analysis.TitleColumn.call(this, title);
- }
-
- HeapDetailsTitleColumn.prototype = {
- __proto__: tr.ui.analysis.TitleColumn.prototype,
-
- formatTitle: function(row) {
- if (row.dimension === HeapDetailsRowDimension.ROOT)
- return row.title;
-
- var symbolEl = document.createElement('span');
- Polymer.dom(symbolEl).textContent = row.dimension.symbol;
- symbolEl.title = row.dimension.label;
- symbolEl.style.color = tr.b.ColorScheme.getColorForReservedNameAsString(
- row.dimension.color);
- symbolEl.style.paddingRight = '4px';
- symbolEl.style.cursor = 'help';
- symbolEl.style.fontWeight = 'bold';
-
- var titleEl = document.createElement('span');
- Polymer.dom(titleEl).appendChild(symbolEl);
- Polymer.dom(titleEl).appendChild(document.createTextNode(row.title));
-
- return titleEl;
- }
- };
-
- /** @constructor */
- function AllocationCountColumn(name, cellPath, aggregationMode) {
- tr.ui.analysis.DetailsNumericMemoryColumn.call(
- this, name, cellPath, aggregationMode);
- }
-
- AllocationCountColumn.prototype = {
- __proto__: tr.ui.analysis.DetailsNumericMemoryColumn.prototype,
-
- getFormattingContext: function(unit) {
- return { minimumFractionDigits: 0 };
- }
- };
-
- var HEAP_DETAILS_COLUMN_RULES = [
- {
- condition: 'Size',
- importance: 3,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Count',
- importance: 2,
- columnConstructor: AllocationCountColumn
- },
- {
- condition: 'Average size per allocation',
- importance: 1,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- importance: 0,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- }
- ];
-
- return {
- HeapDetailsRowDimension: HeapDetailsRowDimension,
- HeapDetailsTitleColumn: HeapDetailsTitleColumn,
- AllocationCountColumn: AllocationCountColumn,
- HEAP_DETAILS_COLUMN_RULES: HEAP_DETAILS_COLUMN_RULES
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane.html
deleted file mode 100644
index 31118444e36..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane.html
+++ /dev/null
@@ -1,765 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_allocator_details_pane.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_vm_regions_details_pane.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-<link rel="import" href="/tracing/ui/base/color_legend.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/view_specific_brushing_state.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<dom-module id='tr-ui-a-memory-dump-overview-pane'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- #label {
- flex: 0 0 auto;
- padding: 8px;
-
- background-color: #eee;
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
-
- font-size: 15px;
- font-weight: bold;
- }
-
- #contents {
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- overflow: auto;
- }
-
- #info_text {
- padding: 8px;
- color: #666;
- font-style: italic;
- text-align: center;
- }
-
- #table {
- display: none; /* Hide until memory dumps are set. */
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-view-specific-brushing-state id="state"
- view-id="analysis.memory_dump_overview_pane">
- </tr-ui-b-view-specific-brushing-state>
- <div id="label">Overview</div>
- <div id="contents">
- <div id="info_text">No memory memory dumps selected</div>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
-
- var PLATFORM_SPECIFIC_TOTAL_NAME_SUFFIX = '_bytes';
-
- var DISPLAYED_SIZE_NUMERIC_NAME =
- tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME;
- var SOME_TIMESTAMPS_INFO_QUANTIFIER =
- tr.ui.analysis.MemoryColumn.SOME_TIMESTAMPS_INFO_QUANTIFIER;
-
- // Unicode symbols used for memory cell info icons and messages.
- var RIGHTWARDS_ARROW_WITH_HOOK = String.fromCharCode(0x21AA);
- var RIGHTWARDS_ARROW_FROM_BAR = String.fromCharCode(0x21A6);
- var GREATER_THAN_OR_EQUAL_TO = String.fromCharCode(0x2265);
- var UNMARRIED_PARTNERSHIP_SYMBOL = String.fromCharCode(0x26AF);
- var TRIGRAM_FOR_HEAVEN = String.fromCharCode(0x2630);
-
- // TODO(petrcermak): Move this to iteration_helpers.html.
- function lazyMap(list, fn, opt_this) {
- opt_this = opt_this || this;
- var result = undefined;
- list.forEach(function(item, index) {
- var value = fn.call(opt_this, item, index);
- if (value === undefined)
- return;
- if (result === undefined)
- result = new Array(list.length);
- result[index] = value;
- });
- return result;
- }
-
- /** @constructor */
- function ProcessNameColumn() {
- tr.ui.analysis.TitleColumn.call(this, 'Process');
- }
-
- ProcessNameColumn.prototype = {
- __proto__: tr.ui.analysis.TitleColumn.prototype,
-
- formatTitle: function(row) {
- if (row.contexts === undefined)
- return row.title; // Total row.
- var titleEl = document.createElement('tr-ui-b-color-legend');
- titleEl.label = row.title;
- return titleEl;
- }
- };
-
- /** @constructor */
- function UsedMemoryColumn(name, cellPath, aggregationMode) {
- tr.ui.analysis.NumericMemoryColumn.call(
- this, name, cellPath, aggregationMode);
- }
-
- UsedMemoryColumn.COLOR =
- ColorScheme.getColorForReservedNameAsString('used_memory_column');
- UsedMemoryColumn.OLDER_COLOR =
- ColorScheme.getColorForReservedNameAsString('older_used_memory_column');
-
- UsedMemoryColumn.prototype = {
- __proto__: tr.ui.analysis.NumericMemoryColumn.prototype,
-
- get title() {
- return tr.ui.b.createSpan({
- textContent: this.name,
- color: UsedMemoryColumn.COLOR
- });
- },
-
- getFormattingContext: function(unit) {
- return { unitPrefix: tr.b.UnitScale.Binary.MEBI };
- },
-
- color: function(numerics, processMemoryDumps) {
- return UsedMemoryColumn.COLOR;
- },
-
- getChildPaneBuilder: function(processMemoryDumps) {
- if (processMemoryDumps === undefined)
- return undefined;
-
- var vmRegions = lazyMap(processMemoryDumps, function(pmd) {
- if (pmd === undefined)
- return undefined;
- return pmd.mostRecentVmRegions;
- });
- if (vmRegions === undefined)
- return undefined;
-
- return function() {
- var pane = document.createElement(
- 'tr-ui-a-memory-dump-vm-regions-details-pane');
- pane.vmRegions = vmRegions;
- pane.aggregationMode = this.aggregationMode;
- return pane;
- }.bind(this);
- }
- };
-
- /** @constructor */
- function PeakMemoryColumn(name, cellPath, aggregationMode) {
- UsedMemoryColumn.call(this, name, cellPath, aggregationMode);
- }
-
- PeakMemoryColumn.prototype = {
- __proto__: UsedMemoryColumn.prototype,
-
- addInfos: function(numerics, processMemoryDumps, infos) {
- if (processMemoryDumps === undefined)
- return; // Total row.
-
- var resettableValueCount = 0;
- var nonResettableValueCount = 0;
- for (var i = 0; i < numerics.length; i++) {
- if (numerics[i] === undefined)
- continue;
- if (processMemoryDumps[i].arePeakResidentBytesResettable)
- resettableValueCount++;
- else
- nonResettableValueCount++;
- }
-
- if (resettableValueCount > 0 && nonResettableValueCount > 0) {
- infos.push(tr.ui.analysis.createWarningInfo('Both resettable and ' +
- 'non-resettable peak RSS values were provided by the process'));
- } else if (resettableValueCount > 0) {
- infos.push({
- icon: RIGHTWARDS_ARROW_WITH_HOOK,
- message: 'Peak RSS since previous memory dump.'
- });
- } else {
- infos.push({
- icon: RIGHTWARDS_ARROW_FROM_BAR,
- message: 'Peak RSS since process startup. Finer grained ' +
- 'peaks require a Linux kernel version ' +
- GREATER_THAN_OR_EQUAL_TO + ' 4.0.'
- });
- }
- }
- };
-
- /** @constructor */
- function ByteStatColumn(name, cellPath, aggregationMode) {
- UsedMemoryColumn.call(this, name, cellPath, aggregationMode);
- }
-
- ByteStatColumn.prototype = {
- __proto__: UsedMemoryColumn.prototype,
-
- color: function(numerics, processMemoryDumps) {
- if (processMemoryDumps === undefined)
- return UsedMemoryColumn.COLOR; // Total row.
-
- var allOlderValues = processMemoryDumps.every(
- function(processMemoryDump) {
- if (processMemoryDump === undefined)
- return true;
- return !processMemoryDump.hasOwnVmRegions;
- });
-
- // Show the cell in lighter blue if all values were older (i.e. none of
- // the defined process memory dumps had own VM regions).
- if (allOlderValues)
- return UsedMemoryColumn.OLDER_COLOR;
- else
- return UsedMemoryColumn.COLOR;
- },
-
- addInfos: function(numerics, processMemoryDumps, infos) {
- if (processMemoryDumps === undefined)
- return; // Total row.
-
- var olderValueCount = 0;
- for (var i = 0; i < numerics.length; i++) {
- var processMemoryDump = processMemoryDumps[i];
- if (processMemoryDump !== undefined &&
- !processMemoryDump.hasOwnVmRegions) {
- olderValueCount++;
- }
- }
-
- if (olderValueCount === 0)
- return; // There are no older values.
-
- var infoQuantifier = olderValueCount < numerics.length ?
- ' ' + SOME_TIMESTAMPS_INFO_QUANTIFIER /* some values are older */ :
- '' /* all values are older */;
-
- // Emit an info if there was at least one older value (i.e. at least one
- // defined process memory dump did not have own VM regions).
- infos.push({
- message: 'Older value' + infoQuantifier +
- ' (only heavy (purple) memory dumps contain memory maps).',
- icon: UNMARRIED_PARTNERSHIP_SYMBOL
- });
- }
- };
-
- // Rules for constructing and sorting used memory columns.
- UsedMemoryColumn.RULES = [
- {
- condition: 'Total resident',
- importance: 10,
- columnConstructor: UsedMemoryColumn
- },
- {
- condition: 'Peak total resident',
- importance: 9,
- columnConstructor: PeakMemoryColumn
- },
- {
- condition: 'PSS',
- importance: 8,
- columnConstructor: ByteStatColumn
- },
- {
- condition: 'Private dirty',
- importance: 7,
- columnConstructor: ByteStatColumn
- },
- {
- condition: 'Swapped',
- importance: 6,
- columnConstructor: ByteStatColumn
- },
- {
- // All other columns.
- importance: 0,
- columnConstructor: UsedMemoryColumn
- }
- ];
-
- // Map from ProcessMemoryDump totals fields to column names.
- UsedMemoryColumn.TOTALS_MAP = {
- 'residentBytes': 'Total resident',
- 'peakResidentBytes': 'Peak total resident'
- };
-
- // Map from VMRegionByteStats field names to column names.
- UsedMemoryColumn.BYTE_STAT_MAP = {
- 'proportionalResident': 'PSS',
- 'privateDirtyResident': 'Private dirty',
- 'swapped': 'Swapped'
- };
-
- /** @constructor */
- function AllocatorColumn(name, cellPath, aggregationMode) {
- tr.ui.analysis.NumericMemoryColumn.call(
- this, name, cellPath, aggregationMode);
- }
-
- AllocatorColumn.prototype = {
- __proto__: tr.ui.analysis.NumericMemoryColumn.prototype,
-
- get title() {
- var titleEl = document.createElement('tr-ui-b-color-legend');
- titleEl.label = this.name;
- return titleEl;
- },
-
- getFormattingContext: function(unit) {
- return { unitPrefix: tr.b.UnitScale.Binary.MEBI };
- },
-
- addInfos: function(numerics, processMemoryDumps, infos) {
- if (processMemoryDumps === undefined)
- return;
-
- var heapDumpCount = 0;
- var missingSizeCount = 0;
-
- for (var i = 0; i < processMemoryDumps.length; i++) {
- var processMemoryDump = processMemoryDumps[i];
- if (processMemoryDump === undefined)
- continue;
-
- var heapDumps = processMemoryDump.heapDumps;
- if (heapDumps !== undefined && heapDumps[this.name] !== undefined)
- heapDumpCount++;
- var allocatorDump =
- processMemoryDump.getMemoryAllocatorDumpByFullName(this.name);
-
- if (allocatorDump !== undefined &&
- allocatorDump.numerics[DISPLAYED_SIZE_NUMERIC_NAME] === undefined) {
- missingSizeCount++;
- }
- }
-
- // Emit a heap dump info if at least one of the process memory dumps has
- // a heap dump associated with this allocator.
- if (heapDumpCount > 0) {
- var infoQuantifier = heapDumpCount < numerics.length ?
- ' ' + SOME_TIMESTAMPS_INFO_QUANTIFIER : '';
- infos.push({
- message: 'Heap dump provided' + infoQuantifier + '.',
- icon: TRIGRAM_FOR_HEAVEN
- });
- }
-
- // Emit a warning if this allocator did not provide size in at least one
- // of the process memory dumps.
- if (missingSizeCount > 0) {
- var infoQuantifier = missingSizeCount < numerics.length ?
- ' ' + SOME_TIMESTAMPS_INFO_QUANTIFIER : '';
- infos.push(tr.ui.analysis.createWarningInfo(
- 'Size was not provided' + infoQuantifier + '.'));
- }
- },
-
- getChildPaneBuilder: function(processMemoryDumps) {
- if (processMemoryDumps === undefined)
- return undefined;
-
- var memoryAllocatorDumps = lazyMap(processMemoryDumps, function(pmd) {
- if (pmd === undefined)
- return undefined;
- return pmd.getMemoryAllocatorDumpByFullName(this.name);
- }, this);
- if (memoryAllocatorDumps === undefined)
- return undefined;
-
- var heapDumps = lazyMap(processMemoryDumps, function(pmd) {
- if (pmd === undefined || pmd.heapDumps === undefined)
- return undefined;
- return pmd.heapDumps[this.name];
- }, this);
-
- return function() {
- var pane = document.createElement(
- 'tr-ui-a-memory-dump-allocator-details-pane');
- pane.memoryAllocatorDumps = memoryAllocatorDumps;
- pane.heapDumps = heapDumps;
- pane.aggregationMode = this.aggregationMode;
- return pane;
- }.bind(this);
- }
- };
-
- /** @constructor */
- function TracingColumn(name, cellPath, aggregationMode) {
- AllocatorColumn.call(this, name, cellPath, aggregationMode);
- }
-
- TracingColumn.COLOR =
- ColorScheme.getColorForReservedNameAsString('tracing_memory_column');
-
- TracingColumn.prototype = {
- __proto__: AllocatorColumn.prototype,
-
- get title() {
- return tr.ui.b.createSpan({
- textContent: this.name,
- color: TracingColumn.COLOR
- });
- },
-
- color: function(numerics, processMemoryDumps) {
- return TracingColumn.COLOR;
- }
- };
-
- // Rules for constructing and sorting allocator columns.
- AllocatorColumn.RULES = [
- {
- condition: 'tracing',
- importance: 0,
- columnConstructor: TracingColumn
- },
- {
- // All other columns.
- importance: 1,
- columnConstructor: AllocatorColumn
- }
- ];
-
- Polymer({
- is: 'tr-ui-a-memory-dump-overview-pane',
- behaviors: [tr.ui.analysis.StackedPane],
-
- created: function() {
- this.processMemoryDumps_ = undefined;
- this.aggregationMode_ = undefined;
- },
-
- ready: function() {
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.CELL;
- this.$.table.addEventListener('selection-changed',
- function(tableEvent) {
- tableEvent.stopPropagation();
- this.changeChildPane_();
- }.bind(this));
- },
-
- /**
- * Sets the process memory dumps and schedules rebuilding the pane.
- *
- * The provided value should be a chronological list of dictionaries
- * mapping process IDs to process memory dumps. Example:
- *
- * [
- * {
- * // PMDs at timestamp 1.
- * 42: tr.model.ProcessMemoryDump {}
- * },
- * {
- * // PMDs at timestamp 2.
- * 42: tr.model.ProcessMemoryDump {},
- * 89: tr.model.ProcessMemoryDump {}
- * }
- * ]
- */
- set processMemoryDumps(processMemoryDumps) {
- this.processMemoryDumps_ = processMemoryDumps;
- this.scheduleRebuild_();
- },
-
- get processMemoryDumps() {
- return this.processMemoryDumps_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.scheduleRebuild_();
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- get selectedMemoryCell() {
- if (this.processMemoryDumps_ === undefined ||
- this.processMemoryDumps_.length === 0) {
- return undefined;
- }
-
- var selectedTableRow = this.$.table.selectedTableRow;
- if (!selectedTableRow)
- return undefined;
-
- var selectedColumnIndex = this.$.table.selectedColumnIndex;
- if (selectedColumnIndex === undefined)
- return undefined;
-
- var selectedColumn = this.$.table.tableColumns[selectedColumnIndex];
- var selectedMemoryCell = selectedColumn.cell(selectedTableRow);
- return selectedMemoryCell;
- },
-
- changeChildPane_: function() {
- this.storeSelection_();
- this.childPaneBuilder = this.determineChildPaneBuilderFromSelection_();
- },
-
- determineChildPaneBuilderFromSelection_: function() {
- if (this.processMemoryDumps_ === undefined ||
- this.processMemoryDumps_.length === 0) {
- return undefined;
- }
-
- var selectedTableRow = this.$.table.selectedTableRow;
- if (!selectedTableRow)
- return undefined;
-
- var selectedColumnIndex = this.$.table.selectedColumnIndex;
- if (selectedColumnIndex === undefined)
- return undefined;
- var selectedColumn = this.$.table.tableColumns[selectedColumnIndex];
-
- return selectedColumn.getChildPaneBuilder(selectedTableRow.contexts);
- },
-
- onRebuild_: function() {
- if (this.processMemoryDumps_ === undefined ||
- this.processMemoryDumps_.length === 0) {
- // Show the info text (hide the table).
- this.$.info_text.style.display = 'block';
- this.$.table.style.display = 'none';
-
- this.$.table.clear();
- this.$.table.rebuild();
- return;
- }
-
- // Show the table (hide the info text).
- this.$.info_text.style.display = 'none';
- this.$.table.style.display = 'block';
-
- var rows = this.createRows_();
- var columns = this.createColumns_(rows);
- var footerRows = this.createFooterRows_(rows, columns);
-
- this.$.table.tableRows = rows;
- this.$.table.footerRows = footerRows;
- this.$.table.tableColumns = columns;
- this.$.table.rebuild();
-
- this.restoreSelection_();
- },
-
- createRows_: function() {
- // Timestamp (list index) -> Process ID (dict key) -> PMD.
- var timeToPidToProcessMemoryDump = this.processMemoryDumps_;
-
- // Process ID (dict key) -> Timestamp (list index) -> PMD or undefined.
- var pidToTimeToProcessMemoryDump = tr.b.invertArrayOfDicts(
- timeToPidToProcessMemoryDump);
-
- // Process (list index) -> Component (dict key) -> Cell.
- return tr.b.dictionaryValues(tr.b.mapItems(
- pidToTimeToProcessMemoryDump, function(pid, timeToDump) {
- // Get the process associated with the dumps. We can use any defined
- // process memory dump in timeToDump since they all have the same pid.
- var process = tr.b.findFirstInArray(timeToDump).process;
-
- // Used memory (total resident, PSS, ...).
- var usedMemoryCells = tr.ui.analysis.createCells(timeToDump,
- function(dump) {
- var sizes = {};
-
- var totals = dump.totals;
- if (totals !== undefined) {
- // Common totals.
- tr.b.iterItems(UsedMemoryColumn.TOTALS_MAP,
- function(totalName, cellName) {
- var total = totals[totalName];
- if (total === undefined)
- return;
- sizes[cellName] = new ScalarNumeric(
- sizeInBytes_smallerIsBetter, total);
- });
-
- // Platform-specific totals (e.g. private resident on Mac).
- var platformSpecific = totals.platformSpecific;
- if (platformSpecific !== undefined) {
- tr.b.iterItems(platformSpecific, function(name, size) {
- // Change raw OS-specific total name to a user-friendly
- // column title (e.g. 'private_bytes' -> 'Private').
- if (name.endsWith(PLATFORM_SPECIFIC_TOTAL_NAME_SUFFIX)) {
- name = name.substring(0, name.length -
- PLATFORM_SPECIFIC_TOTAL_NAME_SUFFIX.length);
- }
- name = name.replace('_', ' ').trim();
- name = name.charAt(0).toUpperCase() + name.slice(1);
- sizes[name] = new ScalarNumeric(
- sizeInBytes_smallerIsBetter, size);
- });
- }
- }
-
- // VM regions byte stats.
- var vmRegions = dump.mostRecentVmRegions;
- if (vmRegions !== undefined) {
- tr.b.iterItems(UsedMemoryColumn.BYTE_STAT_MAP,
- function(byteStatName, cellName) {
- var byteStat = vmRegions.byteStats[byteStatName];
- if (byteStat === undefined)
- return;
- sizes[cellName] = new ScalarNumeric(
- sizeInBytes_smallerIsBetter, byteStat);
- });
- }
-
- return sizes;
- });
-
- // Allocator memory (v8, oilpan, ...).
- var allocatorCells = tr.ui.analysis.createCells(timeToDump,
- function(dump) {
- var memoryAllocatorDumps = dump.memoryAllocatorDumps;
- if (memoryAllocatorDumps === undefined)
- return undefined;
- var sizes = {};
- memoryAllocatorDumps.forEach(function(allocatorDump) {
- var rootDisplayedSizeNumeric = allocatorDump.numerics[
- DISPLAYED_SIZE_NUMERIC_NAME];
- if (rootDisplayedSizeNumeric === undefined) {
- rootDisplayedSizeNumeric =
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 0);
- }
- sizes[allocatorDump.fullName] = rootDisplayedSizeNumeric;
- });
- return sizes;
- });
-
- return {
- title: process.userFriendlyName,
- contexts: timeToDump,
- usedMemoryCells: usedMemoryCells,
- allocatorCells: allocatorCells
- };
- }));
- },
-
- createFooterRows_: function(rows, columns) {
- // Add a 'Total' row if there are at least two process memory dumps.
- if (rows.length <= 1)
- return [];
-
- var totalRow = {title: 'Total'};
- tr.ui.analysis.aggregateTableRowCells(totalRow, rows, columns);
-
- return [totalRow];
- },
-
- createColumns_: function(rows) {
- var titleColumn = new ProcessNameColumn();
- titleColumn.width = '200px';
-
- var usedMemorySizeColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'usedMemoryCells',
- aggregationMode: this.aggregationMode_,
- rules: UsedMemoryColumn.RULES
- });
-
- var allocatorSizeColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'allocatorCells',
- aggregationMode: this.aggregationMode_,
- rules: AllocatorColumn.RULES
- });
-
- var sizeColumns = usedMemorySizeColumns.concat(allocatorSizeColumns);
- tr.ui.analysis.MemoryColumn.spaceEqually(sizeColumns);
-
- var columns = [titleColumn].concat(sizeColumns);
- return columns;
- },
-
- storeSelection_: function() {
- var selectedRowTitle;
- var selectedRow = this.$.table.selectedTableRow;
- if (selectedRow !== undefined)
- selectedRowTitle = selectedRow.title;
-
- var selectedColumnName;
- var selectedColumnIndex = this.$.table.selectedColumnIndex;
- if (selectedColumnIndex !== undefined) {
- var selectedColumn = this.$.table.tableColumns[selectedColumnIndex];
- selectedColumnName = selectedColumn.name;
- }
-
- this.$.state.set(
- {rowTitle: selectedRowTitle, columnName: selectedColumnName});
- },
-
- restoreSelection_: function() {
- var settings = this.$.state.get();
- if (settings === undefined || settings.rowTitle === undefined ||
- settings.columnName === undefined)
- return;
-
- var selectedColumnName = settings.columnName;
- var selectedColumnIndex = tr.b.findFirstIndexInArray(
- this.$.table.tableColumns, function(column) {
- return column.name === selectedColumnName;
- });
- if (selectedColumnIndex < 0)
- return;
-
- var selectedRowTitle = settings.rowTitle;
- var selectedRow = tr.b.findFirstInArray(this.$.table.tableRows,
- function(row) {
- return row.title === selectedRowTitle;
- });
- if (selectedRow === undefined)
- return;
-
- this.$.table.selectedTableRow = selectedRow;
- this.$.table.selectedColumnIndex = selectedColumnIndex;
- }
- });
-
- return {
- // All exports are for testing only.
- ProcessNameColumn: ProcessNameColumn,
- UsedMemoryColumn: UsedMemoryColumn,
- PeakMemoryColumn: PeakMemoryColumn,
- ByteStatColumn: ByteStatColumn,
- AllocatorColumn: AllocatorColumn,
- TracingColumn: TracingColumn
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane_test.html
deleted file mode 100644
index f4bfbfb68f3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_overview_pane_test.html
+++ /dev/null
@@ -1,812 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/heap_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_overview_pane.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var MemoryAllocatorDump = tr.model.MemoryAllocatorDump;
- var HeapDump = tr.model.HeapDump;
- var AggregationMode = tr.ui.analysis.MemoryColumn.AggregationMode;
- var checkSizeNumericFields = tr.ui.analysis.checkSizeNumericFields;
- var checkColor = tr.ui.analysis.checkColor;
- var checkColumns = tr.ui.analysis.checkColumns;
- var checkColumnInfosAndColor = tr.ui.analysis.checkColumnInfosAndColor;
- var convertToProcessMemoryDumps = tr.ui.analysis.convertToProcessMemoryDumps;
- var extractProcessMemoryDumps = tr.ui.analysis.extractProcessMemoryDumps;
- var extractVmRegions = tr.ui.analysis.extractVmRegions;
- var extractMemoryAllocatorDumps = tr.ui.analysis.extractMemoryAllocatorDumps;
- var isElementDisplayed = tr.ui.analysis.isElementDisplayed;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var ProcessNameColumn = tr.ui.analysis.ProcessNameColumn;
- var UsedMemoryColumn = tr.ui.analysis.UsedMemoryColumn;
- var PeakMemoryColumn = tr.ui.analysis.PeakMemoryColumn;
- var ByteStatColumn = tr.ui.analysis.ByteStatColumn;
- var AllocatorColumn = tr.ui.analysis.AllocatorColumn;
- var TracingColumn = tr.ui.analysis.TracingColumn;
-
- function spanMatcher(expectedTitle) {
- return function(actualTitle) {
- assert.instanceOf(actualTitle, HTMLElement);
- assert.strictEqual(actualTitle.tagName, 'SPAN');
- assert.strictEqual(Polymer.dom(actualTitle).textContent, expectedTitle);
- };
- }
-
- function colorLegendMatcher(expectedTitle) {
- return function(actualTitle) {
- assert.instanceOf(actualTitle, HTMLElement);
- assert.strictEqual(actualTitle.tagName, 'TR-UI-B-COLOR-LEGEND');
- assert.strictEqual(actualTitle.label, expectedTitle);
- };
- }
-
- var EXPECTED_COLUMNS = [
- { title: 'Process', type: ProcessNameColumn, noAggregation: true },
- { title: spanMatcher('Total resident'), type: UsedMemoryColumn },
- { title: spanMatcher('Peak total resident'), type: PeakMemoryColumn },
- { title: spanMatcher('PSS'), type: ByteStatColumn },
- { title: spanMatcher('Private dirty'), type: ByteStatColumn },
- { title: spanMatcher('Swapped'), type: ByteStatColumn },
- { title: spanMatcher('Private'), type: UsedMemoryColumn },
- { title: colorLegendMatcher('blink'), type: AllocatorColumn },
- { title: colorLegendMatcher('gpu'), type: AllocatorColumn },
- { title: colorLegendMatcher('malloc'), type: AllocatorColumn },
- { title: colorLegendMatcher('oilpan'), type: AllocatorColumn },
- { title: colorLegendMatcher('v8'), type: AllocatorColumn },
- { title: spanMatcher('tracing'), type: TracingColumn }
- ];
-
- function checkRow(columns, row, expectedTitle, expectedSizes,
- expectedContexts) {
- // Check title.
- var formattedTitle = columns[0].formatTitle(row);
- if (typeof expectedTitle === 'function')
- expectedTitle(formattedTitle);
- else
- assert.strictEqual(formattedTitle, expectedTitle);
-
- // Check all sizes. The first assert below is a test sanity check.
- assert.lengthOf(expectedSizes, columns.length - 1 /* all except title */);
- for (var i = 0; i < expectedSizes.length; i++)
- checkSizeNumericFields(row, columns[i + 1], expectedSizes[i]);
-
- // There should be no row nesting on the overview pane.
- assert.isUndefined(row.subRows);
-
- if (expectedContexts)
- assert.deepEqual(tr.b.asArray(row.contexts), expectedContexts);
- else
- assert.isUndefined(row.contexts);
- }
-
- function checkRows(columns, actualRows, expectedRows) {
- if (expectedRows === undefined) {
- assert.isUndefined(actualRows);
- return;
- }
- assert.lengthOf(actualRows, expectedRows.length);
- for (var i = 0; i < expectedRows.length; i++) {
- var actualRow = actualRows[i];
- var expectedRow = expectedRows[i];
- checkRow(columns, actualRow, expectedRow.title, expectedRow.sizes,
- expectedRow.contexts);
- }
- }
-
- function checkSpanWithColor(span, expectedText, expectedColorReservedName) {
- assert.strictEqual(span.tagName, 'SPAN');
- assert.strictEqual(Polymer.dom(span).textContent, expectedText);
- checkColor(span.style.color, expectedColorReservedName);
- }
-
- function checkColorLegend(legend, expectedLabel) {
- assert.strictEqual(legend.tagName, 'TR-UI-B-COLOR-LEGEND');
- assert.strictEqual(legend.label, expectedLabel);
- }
-
- function createAndCheckMemoryDumpOverviewPane(
- test, processMemoryDumps, expectedRows, expectedFooterRows,
- aggregationMode) {
- var viewEl =
- tr.ui.analysis.createTestPane('tr-ui-a-memory-dump-overview-pane');
- viewEl.processMemoryDumps = processMemoryDumps;
- viewEl.aggregationMode = aggregationMode;
- viewEl.rebuild();
- test.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- assert.isUndefined(viewEl.createChildPane());
-
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, aggregationMode);
- var rows = table.tableRows;
-
- checkRows(columns, table.tableRows, expectedRows);
- checkRows(columns, table.footerRows, expectedFooterRows);
- }
-
- var FIELD = 1 << 0;
- var DUMP = 1 << 1;
-
- function checkOverviewColumnInfosAndColor(column, fieldAndDumpMask,
- dumpCreatedCallback, expectedInfos, expectedColorReservedName) {
- var fields = fieldAndDumpMask.map(function(mask, index) {
- return mask & FIELD ?
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 1024 + 32 * index) :
- undefined;
- });
-
- var contexts;
- if (dumpCreatedCallback === undefined) {
- contexts = undefined;
- } else {
- tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- fieldAndDumpMask.forEach(function(mask, i) {
- var timestamp = 10 + i;
- var gmd = addGlobalMemoryDump(model, {ts: timestamp});
- if (mask & DUMP) {
- var pmd = addProcessMemoryDump(gmd, process, {ts: timestamp});
- dumpCreatedCallback(pmd, mask);
- }
- });
- contexts = model.globalMemoryDumps.map(function(gmd) {
- return gmd.processMemoryDumps[1];
- });
- });
- }
-
- checkColumnInfosAndColor(
- column, fields, contexts, expectedInfos, expectedColorReservedName);
- }
-
- test('instantiate_empty', function() {
- tr.ui.analysis.createAndCheckEmptyPanes(this,
- 'tr-ui-a-memory-dump-overview-pane', 'processMemoryDumps',
- function(viewEl) {
- // Check that the info text is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.info_text));
- assert.isFalse(isElementDisplayed(viewEl.$.table));
- });
- });
-
- test('instantiate_singleGlobalMemoryDump', function() {
- var processMemoryDumps = convertToProcessMemoryDumps(
- [tr.ui.analysis.createSingleTestGlobalMemoryDump()]);
- createAndCheckMemoryDumpOverviewPane(this,
- processMemoryDumps,
- [ // Table rows.
- {
- title: colorLegendMatcher('Process 1'),
- sizes: [[29884416], undefined, [9437184], [5767168], undefined,
- undefined, undefined, undefined, [7340032], undefined,
- undefined, [2097152]],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 1)
- },
- {
- title: colorLegendMatcher('Process 2'),
- sizes: [[17825792], [39845888], [18350080], [0], [32], [8912896],
- [7340032], [0], [1048576], [1], [5242880], [1572864]],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 2)
- },
- {
- title: colorLegendMatcher('Process 4'),
- sizes: [undefined, [17825792], undefined, undefined, undefined,
- undefined, undefined, undefined, undefined, undefined,
- undefined, undefined],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 4)
- }
- ],
- [ // Footer rows.
- {
- title: 'Total',
- sizes: [[47710208], [57671680], [27787264], [5767168], [32],
- [8912896], [7340032], [0], [8388608], [1], [5242880],
- [3670016]],
- contexts: undefined
- }
- ],
- undefined /* no aggregation */);
- });
-
- test('instantiate_multipleGlobalMemoryDumps', function() {
- var processMemoryDumps = convertToProcessMemoryDumps(
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps());
- createAndCheckMemoryDumpOverviewPane(this,
- processMemoryDumps,
- [ // Table rows.
- {
- title: colorLegendMatcher('Process 1'),
- sizes: [[31457280, 29884416, undefined], undefined,
- [10485760, 9437184, undefined], [8388608, 5767168, undefined],
- undefined, undefined, undefined, undefined,
- [undefined, 7340032, undefined], undefined, undefined,
- [undefined, 2097152, undefined]],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 1)
- },
- {
- title: colorLegendMatcher('Process 2'),
- sizes: [[19398656, 17825792, 15728640],
- [40370176, 39845888, 40894464], [18350080, 18350080, 18350080],
- [0, 0, -2621440], [32, 32, 64], [10485760, 8912896, 7340032],
- [undefined, 7340032, 6291456], [undefined, 0, 1048576],
- [2097152, 1048576, 786432], [undefined, 1, undefined],
- [5242880, 5242880, 5767168], [1048576, 1572864, 2097152]],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 2)
- },
- {
- title: colorLegendMatcher('Process 3'),
- sizes: [undefined, undefined, undefined, undefined, undefined,
- undefined, undefined, undefined, undefined,
- [2147483648, undefined, 1073741824],
- [1073741824, undefined, 2147483648], undefined],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 3)
- },
- {
- title: colorLegendMatcher('Process 4'),
- sizes: [undefined, [undefined, 17825792, 17825792], undefined,
- undefined, undefined, undefined, undefined, undefined,
- undefined, undefined, undefined, undefined],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 4)
- }
- ],
- [ // Footer rows.
- {
- title: 'Total',
- sizes: [[50855936, 47710208, 15728640],
- [40370176, 57671680, 58720256], [28835840, 27787264, 18350080],
- [8388608, 5767168, -2621440], [32, 32, 64],
- [10485760, 8912896, 7340032], [undefined, 7340032, 6291456],
- [undefined, 0, 1048576], [2097152, 8388608, 786432],
- [2147483648, 1, 1073741824], [1078984704, 5242880, 2153250816],
- [1048576, 3670016, 2097152]],
- contexts: undefined
- }
- ],
- AggregationMode.DIFF);
- });
-
- test('instantiate_singleProcessMemoryDump', function() {
- var processMemoryDumps = convertToProcessMemoryDumps(
- [tr.ui.analysis.createSingleTestProcessMemoryDump()]);
- createAndCheckMemoryDumpOverviewPane(this,
- processMemoryDumps,
- [ // Table rows.
- {
- title: colorLegendMatcher('Process 2'),
- sizes: [[17825792], [39845888], [18350080], [0], [32], [8912896],
- [7340032], [0], [1048576], [1], [5242880], [1572864]],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 2)
- }
- ],
- [] /* footer rows */,
- undefined /* no aggregation */);
- });
-
- test('instantiate_multipleProcessMemoryDumps', function() {
- var processMemoryDumps = convertToProcessMemoryDumps(
- tr.ui.analysis.createMultipleTestProcessMemoryDumps());
- createAndCheckMemoryDumpOverviewPane(this,
- processMemoryDumps,
- [ // Table rows.
- {
- title: colorLegendMatcher('Process 2'),
- sizes: [[19398656, 17825792, 15728640],
- [40370176, 39845888, 40894464], [18350080, 18350080, 18350080],
- [0, 0, -2621440], [32, 32, 64], [10485760, 8912896, 7340032],
- [undefined, 7340032, 6291456], [undefined, 0, 1048576],
- [2097152, 1048576, 786432], [undefined, 1, undefined],
- [5242880, 5242880, 5767168], [1048576, 1572864, 2097152]],
- contexts: extractProcessMemoryDumps(processMemoryDumps, 2)
- }
- ],
- [] /* footer rows */,
- AggregationMode.MAX);
- });
-
- test('selection', function() {
- var processMemoryDumps = convertToProcessMemoryDumps(
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps());
-
- var viewEl =
- tr.ui.analysis.createTestPane('tr-ui-a-memory-dump-overview-pane');
- viewEl.processMemoryDumps = processMemoryDumps;
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- var table = viewEl.$.table;
-
- // Simulate clicking on the 'malloc' cell of the second process.
- table.selectedTableRow = table.tableRows[1];
- table.selectedColumnIndex = 9;
- assert.lengthOf(viewEl.requestedChildPanes, 2);
- var lastChildPane = viewEl.requestedChildPanes[1];
- assert.equal(
- lastChildPane.tagName, 'TR-UI-A-MEMORY-DUMP-ALLOCATOR-DETAILS-PANE');
- assert.strictEqual(lastChildPane.aggregationMode, AggregationMode.DIFF);
- assert.deepEqual(lastChildPane.memoryAllocatorDumps,
- extractMemoryAllocatorDumps(processMemoryDumps, 2, 'malloc'));
-
- // Simulate clicking on the 'Oilpan' cell of the second process.
- table.selectedColumnIndex = 10;
- assert.lengthOf(viewEl.requestedChildPanes, 3);
- var lastChildPane = viewEl.requestedChildPanes[2];
- assert.isUndefined(viewEl.lastChildPane);
- });
-
- test('memory', function() {
- var processMemoryDumps = convertToProcessMemoryDumps(
- tr.ui.analysis.createMultipleTestGlobalMemoryDumps());
- var containerEl = document.createElement('div');
- containerEl.brushingStateController =
- new tr.c.BrushingStateController(undefined);
-
- function simulateView(pids, aggregationMode,
- expectedSelectedCellFieldValues, expectedSelectedRowTitle,
- expectedSelectedColumnIndex, callback) {
- var viewEl =
- tr.ui.analysis.createTestPane('tr-ui-a-memory-dump-overview-pane');
- var table = viewEl.$.table;
- Polymer.dom(containerEl).textContent = '';
- Polymer.dom(containerEl).appendChild(viewEl);
-
- var displayedProcessMemoryDumps = processMemoryDumps.map(
- function(memoryDumps) {
- return tr.b.filterItems(memoryDumps, function(pid, pmd) {
- return pids.indexOf(pmd.process.pid) !== -1;
- });
- });
- viewEl.processMemoryDumps = displayedProcessMemoryDumps;
- viewEl.aggregationMode = aggregationMode;
- viewEl.rebuild();
-
- if (expectedSelectedCellFieldValues === undefined) {
- assert.isUndefined(viewEl.childPaneBuilder);
- } else {
- checkSizeNumericFields(table.selectedTableRow,
- table.tableColumns[table.selectedColumnIndex],
- expectedSelectedCellFieldValues);
- }
-
- assert.strictEqual(
- table.selectedColumnIndex, expectedSelectedColumnIndex);
- if (expectedSelectedRowTitle === undefined)
- assert.isUndefined(table.selectedTableRow);
- else
- assert.equal(table.selectedTableRow.title, expectedSelectedRowTitle);
-
- callback(viewEl, viewEl.$.table);
- }
-
- simulateView(
- [1, 2, 3, 4], // All processes.
- AggregationMode.DIFF,
- undefined, undefined, undefined, // No cell should be selected.
- function(view, table) {
- assert.isUndefined(view.createChildPane());
-
- // Select the 'PSS' column of the second process.
- table.selectedTableRow = table.tableRows[1];
- table.selectedColumnIndex = 3;
- });
-
- simulateView(
- [2, 3],
- AggregationMode.MAX,
- [18350080, 18350080, 18350080], 'Process 2', 3, /* PSS */
- function(view, table) {
- var childPane = view.createChildPane();
- assert.equal(
- childPane.tagName, 'TR-UI-A-MEMORY-DUMP-VM-REGIONS-DETAILS-PANE');
- assert.deepEqual(tr.b.asArray(childPane.vmRegions),
- extractVmRegions(processMemoryDumps, 2));
- assert.strictEqual(childPane.aggregationMode, AggregationMode.MAX);
- });
-
- simulateView(
- [3],
- undefined, /* No aggregation */
- undefined, undefined, undefined, // No cell selected.
- function(view, table) {
- assert.isUndefined(view.createChildPane());
- });
-
- simulateView(
- [1, 2, 3, 4],
- AggregationMode.DIFF,
- [18350080, 18350080, 18350080], 'Process 2', 3, /* PSS */
- function(view, table) {
- var childPane = view.createChildPane();
- assert.equal(
- childPane.tagName, 'TR-UI-A-MEMORY-DUMP-VM-REGIONS-DETAILS-PANE');
- assert.deepEqual(tr.b.asArray(childPane.vmRegions),
- extractVmRegions(processMemoryDumps, 2));
- assert.strictEqual(childPane.aggregationMode, AggregationMode.DIFF);
-
- // Select the 'v8' column of the first process (empty cell).
- table.selectedTableRow = table.tableRows[0];
- table.selectedColumnIndex = 10;
- });
-
- simulateView(
- [1],
- undefined, /* No aggregation */
- undefined, undefined, undefined, // No cell should selected.
- function(view, table) {
- assert.isUndefined(view.createChildPane());
-
- // Select 'Total resident' column of the first process.
- table.selectedTableRow = table.tableRows[0];
- table.selectedColumnIndex = 1;
- });
-
- simulateView(
- [1, 2, 3, 4],
- AggregationMode.MAX,
- [31457280, 29884416, undefined], 'Process 1', 1, /* Total resident */
- function(view, table) {
- var childPane = view.createChildPane();
- assert.equal(
- childPane.tagName, 'TR-UI-A-MEMORY-DUMP-VM-REGIONS-DETAILS-PANE');
- assert.deepEqual(tr.b.asArray(childPane.vmRegions),
- extractVmRegions(processMemoryDumps, 1));
- assert.strictEqual(childPane.aggregationMode, AggregationMode.MAX);
- });
- });
-
- test('processNameColumn_formatTitle', function() {
- var c = new ProcessNameColumn();
-
- // With context (total row).
- assert.strictEqual(c.formatTitle({
- title: 'Total',
- usedMemoryCells: {}
- }), 'Total');
-
- // Without context (process row).
- var title = c.formatTitle({
- title: 'Process 1',
- usedMemoryCells: {},
- contexts: [tr.ui.analysis.createSingleTestProcessMemoryDump()]
- });
- checkColorLegend(title, 'Process 1');
- });
-
- test('usedMemoryColumn', function() {
- var c = new UsedMemoryColumn('Private', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
- checkSpanWithColor(c.title, 'Private',
- 'used_memory_column' /* blue (column title) */);
- checkColor(c.color(undefined /* contexts */),
- 'used_memory_column' /* blue (column cells) */);
- });
-
- test('peakMemoryColumn', function() {
- var c = new PeakMemoryColumn('Peak', 'bytes', tr.b.identity,
- AggregationMode.MAX);
- checkSpanWithColor(c.title, 'Peak',
- 'used_memory_column' /* blue (column title) */);
- checkColor(c.color(undefined) /* contexts */,
- 'used_memory_column' /* blue (column cells) */);
-
- var RESETTABLE_PEAK = 1 << 2;
- var NON_RESETTABLE_PEAK = 1 << 3;
- function checkPeakColumnInfosAndColor(fieldAndDumpMask, expectedInfos) {
- checkOverviewColumnInfosAndColor(c,
- fieldAndDumpMask,
- function(pmd, mask) {
- if (mask & RESETTABLE_PEAK) {
- assert.strictEqual(
- mask & NON_RESETTABLE_PEAK, 0); // Test sanity check.
- pmd.arePeakResidentBytesResettable = true;
- } else if (mask & NON_RESETTABLE_PEAK) {
- pmd.arePeakResidentBytesResettable = false;
- }
- },
- expectedInfos,
- 'used_memory_column');
- }
-
- // No context.
- checkOverviewColumnInfosAndColor(c,
- [FIELD],
- undefined /* no context */,
- [] /* no infos */,
- 'used_memory_column' /* blue color */);
- checkOverviewColumnInfosAndColor(c,
- [FIELD, FIELD, 0, FIELD],
- undefined /* no context */,
- [] /* no infos */,
- 'used_memory_column' /* blue color */);
-
- // All resettable.
- var EXPECTED_RESETTABLE_INFO = {
- icon: '\u21AA',
- message: 'Peak RSS since previous memory dump.'
- };
- checkPeakColumnInfosAndColor([
- FIELD | DUMP | RESETTABLE_PEAK
- ], [EXPECTED_RESETTABLE_INFO]);
- checkPeakColumnInfosAndColor([
- FIELD | DUMP | RESETTABLE_PEAK,
- DUMP /* ignored because there's no field */,
- 0,
- FIELD | DUMP | RESETTABLE_PEAK
- ], [EXPECTED_RESETTABLE_INFO]);
-
- // All non-resettable.
- var EXPECTED_NON_RESETTABLE_INFO = {
- icon: '\u21A6',
- message: 'Peak RSS since process startup. Finer grained peaks require ' +
- 'a Linux kernel version \u2265 4.0.'
- };
- checkPeakColumnInfosAndColor([
- FIELD | DUMP | NON_RESETTABLE_PEAK
- ], [EXPECTED_NON_RESETTABLE_INFO]);
- checkPeakColumnInfosAndColor([
- 0,
- DUMP | RESETTABLE_PEAK /* ignored because there's no field */,
- FIELD | DUMP | NON_RESETTABLE_PEAK,
- FIELD | DUMP | NON_RESETTABLE_PEAK
- ], [EXPECTED_NON_RESETTABLE_INFO]);
-
- // Combination (warning).
- var EXPECTED_COMBINATION_INFO = {
- icon: '\u26A0',
- message: 'Both resettable and non-resettable peak RSS values were ' +
- 'provided by the process',
- color: 'red'
- };
- checkPeakColumnInfosAndColor([
- FIELD | DUMP | NON_RESETTABLE_PEAK,
- 0,
- FIELD | DUMP | RESETTABLE_PEAK,
- 0
- ], [EXPECTED_COMBINATION_INFO]);
- });
-
- test('byteStatColumn', function() {
- var c = new ByteStatColumn('Stat', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
- checkSpanWithColor(c.title, 'Stat',
- 'used_memory_column' /* blue (column title) */);
-
- var HAS_OWN_VM_REGIONS = 1 << 2;
- function checkByteStatColumnInfosAndColor(
- fieldAndDumpMask, expectedInfos, expectedIsOlderColor) {
- checkOverviewColumnInfosAndColor(c,
- fieldAndDumpMask,
- function(pmd, mask) {
- if (mask & HAS_OWN_VM_REGIONS)
- pmd.vmRegions = [];
- },
- expectedInfos,
- expectedIsOlderColor ?
- 'older_used_memory_column' /* light blue */ :
- 'used_memory_column' /* blue color */);
- }
-
- var EXPECTED_ALL_OLDER_VALUES = {
- icon: '\u26AF',
- message: 'Older value (only heavy (purple) memory dumps contain ' +
- 'memory maps).'
- };
- var EXPECTED_SOME_OLDER_VALUES = {
- icon: '\u26AF',
- message: 'Older value at some selected timestamps (only heavy ' +
- '(purple) memory dumps contain memory maps).'
- };
-
- // No context.
- checkOverviewColumnInfosAndColor(c,
- [FIELD],
- undefined /* no context */,
- [] /* no infos */,
- 'used_memory_column' /* blue color */);
- checkOverviewColumnInfosAndColor(c,
- [FIELD, FIELD, 0, FIELD],
- undefined /* no context */,
- [] /* no infos */,
- 'used_memory_column' /* blue color */);
-
- // All process memory dumps have own VM regions.
- checkByteStatColumnInfosAndColor([
- FIELD | DUMP | HAS_OWN_VM_REGIONS
- ], [] /* no infos */, false /* blue color */);
- checkByteStatColumnInfosAndColor([
- FIELD | DUMP | HAS_OWN_VM_REGIONS,
- FIELD | DUMP | HAS_OWN_VM_REGIONS,
- 0,
- FIELD | DUMP | HAS_OWN_VM_REGIONS
- ], [] /* no infos */, false /* blue color */);
-
- // No process memory dumps have own VM regions.
- checkByteStatColumnInfosAndColor([
- FIELD | DUMP
- ], [EXPECTED_ALL_OLDER_VALUES], true /* light blue */);
- checkByteStatColumnInfosAndColor([
- FIELD | DUMP,
- FIELD | DUMP
- ], [EXPECTED_ALL_OLDER_VALUES], true /* light blue */);
-
- // Some process memory dumps don't have own VM regions.
- checkByteStatColumnInfosAndColor([
- FIELD | DUMP,
- 0,
- FIELD | DUMP
- ], [EXPECTED_SOME_OLDER_VALUES], true /* light blue */);
- checkByteStatColumnInfosAndColor([
- FIELD | DUMP | HAS_OWN_VM_REGIONS,
- FIELD | DUMP,
- FIELD | DUMP | HAS_OWN_VM_REGIONS
- ], [EXPECTED_SOME_OLDER_VALUES], false /* blue */);
- });
-
- test('allocatorColumn', function() {
- var c = new AllocatorColumn('Allocator', 'bytes', tr.b.identity,
- AggregationMode.MAX);
- checkColorLegend(c.title, 'Allocator');
- checkColor(c.color(undefined /* contexts */),
- undefined /* no color (column cells) */);
-
- var HAS_HEAP_DUMPS = 1 << 2;
- var HAS_ALLOCATOR_HEAP_DUMP = 1 << 3;
- var MISSING_SIZE = 1 << 4;
- function checkAllocatorColumnInfosAndColor(fieldAndDumpMask,
- expectedInfos) {
- checkOverviewColumnInfosAndColor(c,
- fieldAndDumpMask,
- function(pmd, mask) {
- if (mask & HAS_HEAP_DUMPS)
- pmd.heapDumps = {};
- if (mask & HAS_ALLOCATOR_HEAP_DUMP)
- pmd.heapDumps['Allocator'] = new HeapDump(pmd, 'Allocator');
- var mad = new MemoryAllocatorDump(pmd, 'Allocator');
- if (!(mask & MISSING_SIZE)) {
- mad.addNumeric('size',
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 7));
- }
- pmd.memoryAllocatorDumps = [mad];
- },
- expectedInfos,
- undefined /* no color */);
- }
-
- // No context.
- checkOverviewColumnInfosAndColor(c,
- [FIELD],
- undefined /* no context */,
- [] /* no infos */,
- undefined /* no color */);
- checkOverviewColumnInfosAndColor(c,
- [FIELD, FIELD, 0, FIELD],
- undefined /* no context */,
- [] /* no infos */,
- undefined /* no color */);
-
- // No infos.
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP
- ], [] /* no infos */);
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP,
- FIELD | DUMP | HAS_HEAP_DUMPS,
- 0,
- FIELD | DUMP
- ], [] /* infos */);
-
- var EXPECTED_ALL_HAVE_ALLOCATOR_HEAP_DUMP = {
- icon: '\u2630',
- message: 'Heap dump provided.'
- };
- var EXPECTED_SOME_HAVE_ALLOCATOR_HEAP_DUMP = {
- icon: '\u2630',
- message: 'Heap dump provided at some selected timestamps.'
- };
-
- // All process memory dumps have heap dumps.
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP
- ], [EXPECTED_ALL_HAVE_ALLOCATOR_HEAP_DUMP]);
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP,
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP,
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP
- ], [EXPECTED_ALL_HAVE_ALLOCATOR_HEAP_DUMP]);
-
- // Some process memory dumps have heap dumps.
- checkAllocatorColumnInfosAndColor([
- 0,
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP
- ], [EXPECTED_SOME_HAVE_ALLOCATOR_HEAP_DUMP]);
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP,
- FIELD | DUMP | HAS_HEAP_DUMPS,
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP
- ], [EXPECTED_SOME_HAVE_ALLOCATOR_HEAP_DUMP]);
-
- var EXPECTED_ALL_MISSING_SIZE = {
- icon: '\u26A0',
- message: 'Size was not provided.',
- color: 'red'
- };
- var EXPECTED_SOME_MISSING_SIZE = {
- icon: '\u26A0',
- message: 'Size was not provided at some selected timestamps.',
- color: 'red'
- };
-
- // All process memory dumps are missing allocator size.
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | MISSING_SIZE
- ], [EXPECTED_ALL_MISSING_SIZE]);
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | MISSING_SIZE,
- FIELD | DUMP | MISSING_SIZE,
- FIELD | DUMP | MISSING_SIZE
- ], [EXPECTED_ALL_MISSING_SIZE]);
-
- // Some process memory dumps use Android memtrack PSS fallback.
- checkAllocatorColumnInfosAndColor([
- 0,
- FIELD | DUMP | MISSING_SIZE
- ], [EXPECTED_SOME_MISSING_SIZE]);
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | MISSING_SIZE,
- FIELD | DUMP,
- FIELD | DUMP | MISSING_SIZE
- ], [EXPECTED_SOME_MISSING_SIZE]);
-
- // Combination of heap dump and memtrack fallback infos.
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | MISSING_SIZE | HAS_HEAP_DUMPS |
- HAS_ALLOCATOR_HEAP_DUMP
- ], [
- EXPECTED_ALL_HAVE_ALLOCATOR_HEAP_DUMP,
- EXPECTED_ALL_MISSING_SIZE
- ]);
- checkAllocatorColumnInfosAndColor([
- FIELD | DUMP | HAS_HEAP_DUMPS | HAS_ALLOCATOR_HEAP_DUMP,
- FIELD | DUMP,
- FIELD | DUMP | MISSING_SIZE
- ], [
- EXPECTED_SOME_HAVE_ALLOCATOR_HEAP_DUMP,
- EXPECTED_SOME_MISSING_SIZE
- ]);
- });
-
- test('tracingColumn', function() {
- var c = new TracingColumn('Tracing', 'bytes', tr.b.identity,
- AggregationMode.DIFF);
- checkSpanWithColor(c.title, 'Tracing',
- 'tracing_memory_column' /* expected column title gray color */);
- checkColor(c.color(undefined /* contexts */),
- 'tracing_memory_column' /* expected column cells gray color */);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_test_utils.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_test_utils.html
deleted file mode 100644
index 57c2dafc1c6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_test_utils.html
+++ /dev/null
@@ -1,587 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color.html">
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/heap_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper functions for memory dump analysis sub-view tests.
- */
-tr.exportTo('tr.ui.analysis', function() {
- var Color = tr.b.Color;
- var ColorScheme = tr.b.ColorScheme;
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
- var HeapDump = tr.model.HeapDump;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addOwnershipLink = tr.model.MemoryDumpTestUtils.addOwnershipLink;
-
- function createMultipleTestGlobalMemoryDumps() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var pA = model.getOrCreateProcess(1);
- var pB = model.getOrCreateProcess(2);
- var pC = model.getOrCreateProcess(3);
- var pD = model.getOrCreateProcess(4);
-
- // ======================================================================
- // First timestamp.
- // ======================================================================
- var gmd1 = addGlobalMemoryDump(model, {ts: 42});
-
- // Totals and VM regions.
- var pmd1A = addProcessMemoryDump(gmd1, pA, {ts: 41});
- pmd1A.totals = {residentBytes: 31457280 /* 30 MiB */};
- pmd1A.vmRegions = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- startAddress: 1024,
- sizeInBytes: 20971520, /* 20 MiB */
- protectionFlags: VMRegion.PROTECTION_FLAG_READ,
- mappedFile: '[stack]',
- byteStats: {
- privateDirtyResident: 8388608, /* 8 MiB */
- sharedCleanResident: 12582912, /* 12 MiB */
- proportionalResident: 10485760 /* 10 MiB */
- }
- })
- ]);
-
- // Everything.
- var pmd1B = addProcessMemoryDump(gmd1, pB, {ts: 42});
- pmd1B.totals = {
- residentBytes: 20971520, /* 20 MiB */
- peakResidentBytes: 41943040, /* 40 MiB */
- arePeakResidentBytesResettable: false,
- platformSpecific: {
- private_bytes: 10485760 /* 10 MiB */
- }
- };
- pmd1B.vmRegions = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- startAddress: 256,
- sizeInBytes: 6000,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- mappedFile: '[stack:20310]',
- byteStats: {
- proportionalResident: 15728640, /* 15 MiB */
- privateDirtyResident: 1572864, /* 1.5 MiB */
- swapped: 32 /* 32 B */
- }
- }),
- VMRegion.fromDict({
- startAddress: 100000,
- sizeInBytes: 4096,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ,
- mappedFile: '/usr/lib/libwtf.so',
- byteStats: {
- proportionalResident: 4194304, /* 4 MiB */
- privateDirtyResident: 0,
- swapped: 0 /* 32 B */
- }
- })
- ]);
- pmd1B.memoryAllocatorDumps = [
- newAllocatorDump(pmd1B, 'malloc',
- {numerics: {size: 3145728 /* 3 MiB */}}),
- newAllocatorDump(pmd1B, 'v8', {numerics: {size: 5242880 /* 5 MiB */}}),
- newAllocatorDump(pmd1B, 'tracing', {numerics: {
- size: 1048576 /* 1 MiB */,
- resident_size: 1572864 /* 1.5 MiB */
- }})
- ];
-
- // Allocator dumps only.
- var pmd1C = addProcessMemoryDump(gmd1, pC, {ts: 43});
- pmd1C.memoryAllocatorDumps = (function() {
- var oilpanDump = newAllocatorDump(pmd1C, 'oilpan', {numerics: {
- size: 3221225472 /* 3 GiB */,
- inner_size: 5242880 /* 5 MiB */,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 2015)
- }});
- var v8Dump = newAllocatorDump(pmd1C, 'v8', {numerics: {
- size: 1073741824 /* 1 GiB */,
- inner_size: 2097152 /* 2 MiB */,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 204)
- }});
-
- addOwnershipLink(v8Dump, oilpanDump);
-
- return [oilpanDump, v8Dump];
- })();
- pmd1C.heapDumps = {
- 'v8': (function() {
- var v8HeapDump = new HeapDump(pmd1C, 'v8');
- v8HeapDump.addEntry(
- tr.c.TestUtils.newStackTrace(model,
- ['V8.Execute', 'UpdateLayoutTree']),
- undefined /* sum over all object types */,
- 536870912 /* 512 MiB */);
- return v8HeapDump;
- })()
- };
-
- // ======================================================================
- // Second timestamp.
- // ======================================================================
- var gmd2 = addGlobalMemoryDump(model, {ts: 68});
-
- // Everything.
- var pmd2A = addProcessMemoryDump(gmd2, pA, {ts: 67});
- pmd2A.totals = {residentBytes: 32505856 /* 31 MiB */};
- pmd2A.vmRegions = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- startAddress: 1024,
- sizeInBytes: 20971520, /* 20 MiB */
- protectionFlags: VMRegion.PROTECTION_FLAG_READ,
- mappedFile: '[stack]',
- byteStats: {
- privateDirtyResident: 8388608, /* 8 MiB */
- sharedCleanResident: 11534336, /* 11 MiB */
- proportionalResident: 11534336 /* 11 MiB */
- }
- }),
- VMRegion.fromDict({
- startAddress: 104857600,
- sizeInBytes: 5242880, /* 5 MiB */
- protectionFlags: VMRegion.PROTECTION_FLAG_EXECUTE,
- mappedFile: '/usr/bin/google-chrome',
- byteStats: {
- privateDirtyResident: 0,
- sharedCleanResident: 4194304, /* 4 MiB */
- proportionalResident: 524288 /* 512 KiB */
- }
- })
- ]);
- pmd2A.memoryAllocatorDumps = [
- newAllocatorDump(pmd2A, 'malloc', {numerics: {
- size: 9437184 /* 9 MiB */
- }}),
- newAllocatorDump(pmd2A, 'tracing', {numerics: {
- size: 2097152 /* 2 MiB */,
- resident_size: 2621440 /* 2.5 MiB */
- }})
- ];
-
- // Totals and allocator dumps only.
- var pmd2B = addProcessMemoryDump(gmd2, pB, {ts: 69});
- pmd2B.totals = {
- residentBytes: 19922944, /* 19 MiB */
- peakResidentBytes: 41943040, /* 40 MiB */
- arePeakResidentBytesResettable: false,
- platformSpecific: {
- private_bytes: 8912896 /* 8.5 MiB */
- }
- };
- pmd2B.memoryAllocatorDumps = [
- newAllocatorDump(pmd2B, 'malloc', {numerics: {
- size: 2621440 /* 2.5 MiB */
- }}),
- newAllocatorDump(pmd2B, 'v8', {numerics: {
- size: 5242880 /* 5 MiB */
- }}),
- newAllocatorDump(pmd2B, 'blink', {numerics: {
- size: 7340032 /* 7 MiB */
- }}),
- newAllocatorDump(pmd2B, 'oilpan', {numerics: {size: 1}}),
- newAllocatorDump(pmd2B, 'tracing', {numerics: {
- size: 1572864 /* 1.5 MiB */,
- resident_size: 2097152 /* 2 MiB */
- }}),
- newAllocatorDump(pmd2B, 'gpu', {numerics: {
- memtrack_pss: 524288 /* 512 KiB */
- }})
- ];
-
- // Resettable peak total size only.
- var pmd2D = addProcessMemoryDump(gmd2, pD, {ts: 71});
- pmd2D.totals = {
- peakResidentBytes: 17825792, /* 17 MiB */
- arePeakResidentBytesResettable: true
- };
-
- // ======================================================================
- // Third timestamp.
- // ======================================================================
- var gmd3 = addGlobalMemoryDump(model, {ts: 100});
-
- // Everything.
- var pmd3B = addProcessMemoryDump(gmd3, pB, {ts: 102});
- pmd3B.totals = {
- residentBytes: 18874368, /* 18 MiB */
- peakResidentBytes: 44040192, /* 42 MiB */
- arePeakResidentBytesResettable: false,
- platformSpecific: {
- private_bytes: 7340032 /* 7 MiB */
- }
- };
- pmd3B.vmRegions = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- startAddress: 256,
- sizeInBytes: 6000,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- mappedFile: '[stack:20310]',
- byteStats: {
- proportionalResident: 21495808, /* 20.5 MiB */
- privateDirtyResident: 524288, /* 0.5 MiB */
- swapped: 64 /* 32 B */
- }
- })
- ]);
- pmd3B.memoryAllocatorDumps = [
- newAllocatorDump(pmd3B, 'malloc', {numerics: {
- size: 2883584 /* 2.75 MiB */
- }}),
- newAllocatorDump(pmd3B, 'v8', {numerics: {
- size: 5767168 /* 5.5 MiB */
- }}),
- newAllocatorDump(pmd3B, 'blink', {numerics: {
- size: 6291456 /* 7 MiB */
- }}),
- newAllocatorDump(pmd3B, 'tracing', {numerics: {
- size: 2097152 /* 2 MiB */,
- resident_size: 3145728 /* 3 MiB */
- }}),
- newAllocatorDump(pmd3C, 'gpu', {numerics: {
- size: 1048576 /* 1 MiB */,
- memtrack_pss: 786432 /* 768 KiB */
- }})
- ];
-
- // Allocator dumps only.
- var pmd3C = addProcessMemoryDump(gmd3, pC, {ts: 100});
- pmd3C.memoryAllocatorDumps = (function() {
- var oilpanDump = newAllocatorDump(pmd3C, 'oilpan', {numerics: {
- size: 3221225472 /* 3 GiB */,
- inner_size: 5242880 /* 5 MiB */,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 2015)
- }});
- var v8Dump = newAllocatorDump(pmd3C, 'v8', {numerics: {
- size: 2147483648 /* 2 GiB */,
- inner_size: 2097152 /* 2 MiB */,
- objects_count: new ScalarNumeric(unitlessNumber_smallerIsBetter, 204)
- }});
-
- addOwnershipLink(v8Dump, oilpanDump);
-
- return [oilpanDump, v8Dump];
- })();
- pmd3C.heapDumps = {
- 'v8': (function() {
- var v8HeapDump = new HeapDump(pmd1C, 'v8');
- v8HeapDump.addEntry(
- tr.c.TestUtils.newStackTrace(model,
- ['V8.Execute', 'UpdateLayoutTree']),
- undefined /* sum over all object types */,
- 268435456 /* 256 MiB */);
- v8HeapDump.addEntry(
- tr.c.TestUtils.newStackTrace(model,
- ['V8.Execute', 'FrameView::layout']),
- undefined /* sum over all object types */,
- 134217728 /* 128 MiB */);
- return v8HeapDump;
- })()
- };
-
- // Resettable peak total size only.
- var pmd3D = addProcessMemoryDump(gmd3, pD, {ts: 99});
- pmd3D.totals = {
- peakResidentBytes: 17825792, /* 17 MiB */
- arePeakResidentBytesResettable: true
- };
- });
-
- return model.globalMemoryDumps;
- }
-
- function createSingleTestGlobalMemoryDump() {
- return createMultipleTestGlobalMemoryDumps()[1];
- }
-
- function createMultipleTestProcessMemoryDumps() {
- return createMultipleTestGlobalMemoryDumps().map(function(gmd) {
- return gmd.processMemoryDumps[2];
- });
- }
-
- function createSingleTestProcessMemoryDump() {
- return createMultipleTestProcessMemoryDumps()[1];
- }
-
- function checkNumericFields(row, column, expectedValues, expectedUnit) {
- var fields;
- if (column === undefined)
- fields = row;
- else
- fields = column.fields(row);
-
- if (expectedValues === undefined) {
- assert.isUndefined(fields);
- return;
- }
-
- assert.lengthOf(fields, expectedValues.length);
- for (var i = 0; i < fields.length; i++) {
- var field = fields[i];
- var expectedValue = expectedValues[i];
- if (expectedValue === undefined) {
- assert.isUndefined(field);
- } else {
- assert.isDefined(expectedUnit); // Test sanity check.
- assert.instanceOf(field, ScalarNumeric);
- assert.equal(field.value, expectedValue);
- assert.equal(field.unit, expectedUnit);
- }
- }
- }
-
- function checkSizeNumericFields(row, column, expectedValues) {
- checkNumericFields(row, column, expectedValues,
- sizeInBytes_smallerIsBetter);
- }
-
- function checkStringFields(row, column, expectedStrings) {
- var fields = column.fields(row);
-
- if (expectedStrings === undefined) {
- assert.isUndefined(fields);
- return;
- }
-
- assert.deepEqual(tr.b.asArray(fields), expectedStrings);
- }
-
- /**
- * Check the titles, types and aggregation modes of a list of columns.
- * expectedColumns is a list of dictionaries with the following fields:
- *
- * - title: Either the expected title (string), or a matcher for it
- * (function that accepts the actual title as its argument).
- * - type: The expected class of the column.
- * - noAggregation: If true, the column is expected to have no aggregation
- * mode (regardless of expectedAggregationMode).
- */
- function checkColumns(columns, expectedColumns, expectedAggregationMode) {
- assert.lengthOf(columns, expectedColumns.length);
- for (var i = 0; i < expectedColumns.length; i++) {
- var actualColumn = columns[i];
- var expectedColumn = expectedColumns[i];
- var expectedTitle = expectedColumn.title;
- if (typeof expectedTitle === 'function')
- expectedTitle(actualColumn.title); // Custom title matcher.
- else
- assert.strictEqual(actualColumn.title, expectedTitle); // String title.
- assert.instanceOf(actualColumn, expectedColumn.type);
- assert.strictEqual(actualColumn.aggregationMode,
- expectedColumn.noAggregation ? undefined : expectedAggregationMode);
- }
- }
-
- function checkColumnInfosAndColor(
- column, fields, contexts, expectedInfos, expectedColorReservedName) {
- // Test sanity checks.
- assert.isDefined(fields);
- if (contexts !== undefined)
- assert.lengthOf(contexts, fields.length);
-
- // Check infos.
- var infos = [];
- column.addInfos(fields, contexts, infos);
- assert.lengthOf(infos, expectedInfos.length);
- for (var i = 0; i < expectedInfos.length; i++)
- assert.deepEqual(infos[i], expectedInfos[i]);
-
- // Check color.
- var actualColor = typeof column.color === 'function' ?
- column.color(fields, contexts) :
- column.color;
- checkColor(actualColor, expectedColorReservedName);
- }
-
- function checkColor(actualColorString, expectedColorReservedName) {
- if (expectedColorReservedName === undefined) {
- assert.isUndefined(actualColorString);
- return;
- }
-
- var actualColor = Color.fromString(actualColorString);
- var expectedColor = ColorScheme.colors[
- ColorScheme.getColorIdForReservedName(expectedColorReservedName)];
- assert.deepEqual(actualColor, expectedColor);
- }
-
- function createAndCheckEmptyPanes(
- test, paneTagName, propertyName, opt_callback) {
- // Unset property.
- var unsetViewEl = createTestPane(paneTagName);
- unsetViewEl.rebuild();
- assert.isUndefined(unsetViewEl.createChildPane());
- test.addHTMLOutput(unsetViewEl);
-
- // Undefined property.
- var undefinedViewEl = createTestPane(paneTagName);
- undefinedViewEl[propertyName] = undefined;
- undefinedViewEl.rebuild();
- assert.isUndefined(undefinedViewEl.createChildPane());
- test.addHTMLOutput(undefinedViewEl);
-
- // Empty property.
- var emptyViewEl = createTestPane(paneTagName);
- emptyViewEl[propertyName] = [];
- emptyViewEl.rebuild();
- assert.isUndefined(undefinedViewEl.createChildPane());
- test.addHTMLOutput(emptyViewEl);
-
- // Check that all the panes have the same dimensions.
- var unsetBounds = unsetViewEl.getBoundingClientRect();
- var undefinedBounds = undefinedViewEl.getBoundingClientRect();
- var emptyBounds = emptyViewEl.getBoundingClientRect();
- assert.equal(undefinedBounds.width, unsetBounds.width);
- assert.equal(emptyBounds.width, unsetBounds.width);
- assert.equal(undefinedBounds.height, unsetBounds.height);
- assert.equal(emptyBounds.height, unsetBounds.height);
-
- // Custom checks (if provided).
- if (opt_callback) {
- opt_callback(unsetViewEl);
- opt_callback(undefinedViewEl);
- opt_callback(emptyViewEl);
- }
- }
-
- function createTestPane(tagName) {
- var paneEl = document.createElement(tagName);
-
- // Store a list of requested child panes (for inspection in tests).
- paneEl.requestedChildPanes = [];
- paneEl.addEventListener('request-child-pane-change', function() {
- paneEl.requestedChildPanes.push(paneEl.createChildPane());
- });
-
- paneEl.createChildPane = function() {
- var childPaneBuilder = this.childPaneBuilder;
- if (childPaneBuilder === undefined)
- return undefined;
- return childPaneBuilder();
- };
-
- return paneEl;
- }
-
- // TODO(petrcermak): Consider moving this to tracing/ui/base/dom_helpers.html.
- function isElementDisplayed(element) {
- var style = getComputedStyle(element);
- var displayed = style['display'];
- if (displayed === undefined)
- return true;
- return displayed.indexOf('none') === -1;
- }
-
- /**
- * Convert a list of ContainerMemoryDump(s) to a list of dictionaries of the
- * underlying ProcessMemoryDump(s).
- */
- function convertToProcessMemoryDumps(containerMemoryDumps) {
- return containerMemoryDumps.map(function(containerMemoryDump) {
- return containerMemoryDump.processMemoryDumps;
- });
- }
-
- /**
- * Extract a chronological list of ProcessMemoryDump(s) (for a given process)
- * from a chronological list of dictionaries of ProcessMemoryDump(s).
- */
- function extractProcessMemoryDumps(processMemoryDumps, pid) {
- return processMemoryDumps.map(function(memoryDumps) {
- return memoryDumps[pid];
- });
- }
-
- /**
- * Extract a chronological list of lists of VMRegion(s) (for a given process)
- * from a chronological list of dictionaries of ProcessMemoryDump(s).
- */
- function extractVmRegions(processMemoryDumps, pid) {
- return processMemoryDumps.map(function(memoryDumps) {
- var processMemoryDump = memoryDumps[pid];
- if (processMemoryDump === undefined)
- return undefined;
- return processMemoryDump.mostRecentVmRegions;
- });
- }
-
- /**
- * Extract a chronological list of MemoryAllocatorDump(s) (for a given
- * process and allocator name) from a chronological list of dictionaries of
- * ProcessMemoryDump(s).
- */
- function extractMemoryAllocatorDumps(processMemoryDumps, pid, allocatorName) {
- return processMemoryDumps.map(function(memoryDumps) {
- var processMemoryDump = memoryDumps[pid];
- if (processMemoryDump === undefined)
- return undefined;
- return processMemoryDump.getMemoryAllocatorDumpByFullName(allocatorName);
- });
- }
-
- /**
- * Extract a chronological list of HeapDump(s) (for a given process and
- * allocator name) from a chronological list of dictionaries of
- * ProcessMemoryDump(s).
- */
- function extractHeapDumps(processMemoryDumps, pid, allocatorName) {
- return processMemoryDumps.map(function(memoryDumps) {
- var processMemoryDump = memoryDumps[pid];
- if (processMemoryDump === undefined ||
- processMemoryDump.heapDumps === undefined)
- return undefined;
- return processMemoryDump.heapDumps[allocatorName];
- });
- }
-
- return {
- createSingleTestGlobalMemoryDump: createSingleTestGlobalMemoryDump,
- createMultipleTestGlobalMemoryDumps: createMultipleTestGlobalMemoryDumps,
- createSingleTestProcessMemoryDump: createSingleTestProcessMemoryDump,
- createMultipleTestProcessMemoryDumps: createMultipleTestProcessMemoryDumps,
- checkNumericFields: checkNumericFields,
- checkSizeNumericFields: checkSizeNumericFields,
- checkStringFields: checkStringFields,
- checkColumns: checkColumns,
- checkColumnInfosAndColor: checkColumnInfosAndColor,
- checkColor: checkColor,
- createAndCheckEmptyPanes: createAndCheckEmptyPanes,
- createTestPane: createTestPane,
- isElementDisplayed: isElementDisplayed,
- convertToProcessMemoryDumps: convertToProcessMemoryDumps,
- extractProcessMemoryDumps: extractProcessMemoryDumps,
- extractVmRegions: extractVmRegions,
- extractMemoryAllocatorDumps: extractMemoryAllocatorDumps,
- extractHeapDumps: extractHeapDumps
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util.html
deleted file mode 100644
index 1dc7c2f5f26..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util.html
+++ /dev/null
@@ -1,911 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/numeric.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper code for memory dump sub-views.
- */
-tr.exportTo('tr.ui.analysis', function() {
-
- var NO_BREAK_SPACE = String.fromCharCode(160);
- var RIGHTWARDS_ARROW = String.fromCharCode(8594);
-
- var COLLATOR = new Intl.Collator(undefined, {numeric: true});
-
- /**
- * A table column for displaying memory dump row titles.
- *
- * @constructor
- */
- function TitleColumn(title) {
- this.title = title;
- }
-
- TitleColumn.prototype = {
- supportsCellSelection: false,
-
- /**
- * Get the title associated with a given row.
- *
- * This method will decorate the title with color and '+++'/'---' prefix if
- * appropriate (as determined by the optional row.contexts field).
- * Examples:
- *
- * +----------------------+-----------------+--------+--------+
- * | Contexts provided at | Interpretation | Prefix | Color |
- * +----------------------+-----------------+--------+--------+
- * | 1111111111 | always present | | |
- * | 0000111111 | added | +++ | red |
- * | 1111111000 | deleted | --- | green |
- * | 1100111111* | flaky | | purple |
- * | 0001001111 | added + flaky | +++ | purple |
- * | 1111100010 | deleted + flaky | --- | purple |
- * +----------------------+-----------------+--------+--------+
- *
- * *) This means that, given a selection of 10 memory dumps, a particular
- * row (e.g. a process) was present in the first 2 and last 6 of them
- * (but not in the third and fourth dump).
- *
- * This method should therefore NOT be overriden by subclasses. The
- * formatTitle method should be overriden instead when necessary.
- */
- value: function(row) {
- var formattedTitle = this.formatTitle(row);
-
- var contexts = row.contexts;
- if (contexts === undefined || contexts.length === 0)
- return formattedTitle;
-
- // Determine if the row was provided in the first and last row and how
- // many times it changed between being provided and not provided.
- var firstContext = contexts[0];
- var lastContext = contexts[contexts.length - 1];
- var changeDefinedContextCount = 0;
- for (var i = 1; i < contexts.length; i++) {
- if ((contexts[i] === undefined) !== (contexts[i - 1] === undefined))
- changeDefinedContextCount++;
- }
-
- // Determine the color and prefix of the title.
- var color = undefined;
- var prefix = undefined;
- if (!firstContext && lastContext) {
- // The row was added.
- color = 'red';
- prefix = '+++';
- } else if (firstContext && !lastContext) {
- // The row was removed.
- color = 'green';
- prefix = '---';
- }
- if (changeDefinedContextCount > 1) {
- // The row was flaky (added/removed more than once).
- color = 'purple';
- }
-
- if (color === undefined && prefix === undefined)
- return formattedTitle;
-
- var titleEl = document.createElement('span');
- if (prefix !== undefined) {
- var prefixEl = tr.ui.b.createSpan({textContent: prefix});
- // Enforce same width of '+++' and '---'.
- prefixEl.style.fontFamily = 'monospace';
- Polymer.dom(titleEl).appendChild(prefixEl);
- Polymer.dom(titleEl).appendChild(
- tr.ui.b.asHTMLOrTextNode(NO_BREAK_SPACE));
- }
- if (color !== undefined)
- titleEl.style.color = color;
- Polymer.dom(titleEl).appendChild(
- tr.ui.b.asHTMLOrTextNode(formattedTitle));
- return titleEl;
- },
-
- /**
- * Format the title associated with a given row. This method is intended to
- * be overriden by subclasses.
- */
- formatTitle: function(row) {
- return row.title;
- },
-
- cmp: function(rowA, rowB) {
- return COLLATOR.compare(rowA.title, rowB.title);
- }
- };
-
- /**
- * Abstract table column for displaying memory dump data.
- *
- * @constructor
- */
- function MemoryColumn(name, cellPath, aggregationMode) {
- this.name = name;
- this.cellPath = cellPath;
- this.shouldSetContextGroup = false;
-
- // See MemoryColumn.AggregationMode enum in this file.
- this.aggregationMode = aggregationMode;
- }
-
- /**
- * Construct columns from cells in a hierarchy of rows and a list of rules.
- *
- * The list of rules contains objects with three fields:
- *
- * condition: Optional string or regular expression matched against the
- * name of a cell. If omitted, the rule will match any cell.
- * importance: Mandatory number which determines the final order of the
- * columns. The column with the highest importance will be first in the
- * returned array.
- * columnConstructor: Mandatory memory column constructor.
- *
- * Example:
- *
- * var importanceRules = [
- * {
- * condition: 'page_size',
- * columnConstructor: NumericMemoryColumn,
- * importance: 8
- * },
- * {
- * condition: /size/,
- * columnConstructor: CustomNumericMemoryColumn,
- * importance: 10
- * },
- * {
- * // No condition: matches all columns.
- * columnConstructor: NumericMemoryColumn,
- * importance: 9
- * }
- * ];
- *
- * Given a name of a cell, the corresponding column constructor and
- * importance are determined by the first rule whose condition matches the
- * column's name. For example, given a cell with name 'inner_size', the
- * corresponding column will be constructed using CustomNumericMemoryColumn
- * and its importance (for sorting purposes) will be 10 (second rule).
- *
- * After columns are constructed for all cell names, they are sorted in
- * descending order of importance and the resulting list is returned. In the
- * example above, the constructed columns will be sorted into three groups as
- * follows:
- *
- * [most important, left in the resulting table]
- * 1. columns whose name contains 'size' excluding 'page_size' because it
- * would have already matched the first rule (Note that string matches
- * must be exact so a column named 'page_size2' would not match the
- * first rule and would therefore belong to this group).
- * 2. columns whose name does not contain 'size'.
- * 3. columns whose name is 'page_size'.
- * [least important, right in the resulting table]
- *
- * where columns will be sorted alphabetically within each group.
- *
- * @param {!Array.<!Object>} rows
- * @param {!Object} config
- * @param {string} config.cellKey
- * @param {!MemoryColumn.AggregationMode=} config.aggregationMode
- * @param {!Array.<!{
- * condition: (string|!RegExp)=,
- * importance: number,
- * columnConstructor: !function(new: MemoryColumn, ...)=,
- * shouldSetContextGroup: boolean=
- * }>} config.rules
- */
- MemoryColumn.fromRows = function(rows, config) {
- // Recursively find the names of all cells of the rows (and their sub-rows).
- var cellNames = new Set();
- function gatherCellNames(rows) {
- rows.forEach(function(row) {
- if (row === undefined)
- return;
- var fieldCells = row[config.cellKey];
- if (fieldCells !== undefined) {
- tr.b.iterItems(fieldCells, function(fieldName, fieldCell) {
- if (fieldCell === undefined || fieldCell.fields === undefined)
- return;
- cellNames.add(fieldName);
- });
- }
- var subRows = row.subRows;
- if (subRows !== undefined)
- gatherCellNames(subRows);
- });
- }
- gatherCellNames(rows);
-
- // Based on the provided list of rules, construct the columns and calculate
- // their importance.
- var positions = [];
- cellNames.forEach(function(cellName) {
- var cellPath = [config.cellKey, cellName];
- var matchingRule = MemoryColumn.findMatchingRule(cellName, config.rules);
- var constructor = matchingRule.columnConstructor;
- var column = new constructor(cellName, cellPath, config.aggregationMode);
- column.shouldSetContextGroup = !!config.shouldSetContextGroup;
- positions.push({
- importance: matchingRule.importance,
- column: column
- });
- });
-
- positions.sort(function(a, b) {
- // Sort columns with the same importance alphabetically.
- if (a.importance === b.importance)
- return COLLATOR.compare(a.column.name, b.column.name);
-
- // Sort columns in descending order of importance.
- return b.importance - a.importance;
- });
-
- return positions.map(function(position) { return position.column });
- };
-
- MemoryColumn.spaceEqually = function(columns) {
- var columnWidth = (100 / columns.length).toFixed(3) + '%';
- columns.forEach(function(column) {
- column.width = columnWidth;
- });
- };
-
- MemoryColumn.findMatchingRule = function(name, rules) {
- for (var i = 0; i < rules.length; i++) {
- var rule = rules[i];
- if (MemoryColumn.nameMatchesCondition(name, rule.condition))
- return rule;
- }
- return undefined;
- };
-
- MemoryColumn.nameMatchesCondition = function(name, condition) {
- // Rules without conditions match all columns.
- if (condition === undefined)
- return true;
-
- // String conditions must match the column name exactly.
- if (typeof(condition) === 'string')
- return name === condition;
-
- // If the condition is not a string, assume it is a RegExp.
- return condition.test(name);
- };
-
- /** @enum */
- MemoryColumn.AggregationMode = {
- DIFF: 0,
- MAX: 1
- };
-
- MemoryColumn.SOME_TIMESTAMPS_INFO_QUANTIFIER = 'at some selected timestamps';
-
- MemoryColumn.prototype = {
- get title() {
- return this.name;
- },
-
- cell: function(row) {
- var cell = row;
- var cellPath = this.cellPath;
- for (var i = 0; i < cellPath.length; i++) {
- if (cell === undefined)
- return undefined;
- cell = cell[cellPath[i]];
- }
- return cell;
- },
-
- aggregateCells: function(row, subRows) {
- // No generic aggregation.
- },
-
- fields: function(row) {
- var cell = this.cell(row);
- if (cell === undefined)
- return undefined;
- return cell.fields;
- },
-
- /**
- * Format a cell associated with this column from the given row. This
- * method is not intended to be overriden.
- */
- value: function(row) {
- var fields = this.fields(row);
- if (this.hasAllRelevantFieldsUndefined(fields))
- return '';
-
- // Determine the color and infos of the resulting element.
- var contexts = row.contexts;
- var color = this.color(fields, contexts);
- var infos = [];
- this.addInfos(fields, contexts, infos);
-
- // Format the actual fields.
- var formattedFields = this.formatFields(fields);
-
- // If no color is specified and there are no infos, there is no need to
- // wrap the value in a span element.#
- if ((color === undefined || formattedFields === '') && infos.length === 0)
- return formattedFields;
-
- var fieldEl = document.createElement('span');
- fieldEl.style.display = 'flex';
- fieldEl.style.alignItems = 'center';
- fieldEl.style.justifyContent = 'flex-end';
- Polymer.dom(fieldEl).appendChild(
- tr.ui.b.asHTMLOrTextNode(formattedFields));
-
- // Add info icons with tooltips.
- infos.forEach(function(info) {
- var infoEl = document.createElement('span');
- infoEl.style.paddingLeft = '4px';
- infoEl.style.cursor = 'help';
- infoEl.style.fontWeight = 'bold';
- Polymer.dom(infoEl).textContent = info.icon;
- if (info.color !== undefined)
- infoEl.style.color = info.color;
- infoEl.title = info.message;
- Polymer.dom(fieldEl).appendChild(infoEl);
- }, this);
-
- // Set the color of the element.
- if (color !== undefined)
- fieldEl.style.color = color;
-
- return fieldEl;
- },
-
- /**
- * Returns true iff all fields of a row which are relevant for the current
- * aggregation mode (e.g. first and last field for diff mode) are undefined.
- */
- hasAllRelevantFieldsUndefined: function(fields) {
- if (fields === undefined)
- return true;
-
- switch (this.aggregationMode) {
- case MemoryColumn.AggregationMode.DIFF:
- // Only the first and last field are relevant.
- return fields[0] === undefined &&
- fields[fields.length - 1] === undefined;
-
- case MemoryColumn.AggregationMode.MAX:
- default:
- // All fields are relevant.
- return fields.every(function(field) { return field === undefined; });
- }
- },
-
- /**
- * Get the color of the given fields formatted by this column. At least one
- * field relevant for the current aggregation mode is guaranteed to be
- * defined.
- */
- color: function(fields, contexts) {
- return undefined;
- },
-
- /**
- * Format an arbitrary number of fields. At least one field relevant for
- * the current aggregation mode is guaranteed to be defined.
- */
- formatFields: function(fields) {
- if (fields.length === 1)
- return this.formatSingleField(fields[0]);
- else
- return this.formatMultipleFields(fields);
- },
-
- /**
- * Format a single defined field.
- *
- * This method is intended to be overriden by field type specific columns
- * (e.g. show '1.0 KiB' instead of '1024' for ScalarNumeric(s) representing
- * bytes).
- */
- formatSingleField: function(field) {
- throw new Error('Not implemented');
- },
-
- /**
- * Format multiple fields. At least one field relevant for the current
- * aggregation mode is guaranteed to be defined.
- *
- * The aggregation mode specializations of this method (e.g.
- * formatMultipleFieldsDiff) are intended to be overriden by field type
- * specific columns.
- */
- formatMultipleFields: function(fields) {
- switch (this.aggregationMode) {
- case MemoryColumn.AggregationMode.DIFF:
- return this.formatMultipleFieldsDiff(
- fields[0], fields[fields.length - 1]);
-
- case MemoryColumn.AggregationMode.MAX:
- return this.formatMultipleFieldsMax(fields);
-
- default:
- return tr.ui.b.createSpan({
- textContent: '(unsupported aggregation mode)',
- italic: true
- });
- }
- },
-
- formatMultipleFieldsDiff: function(firstField, lastField) {
- throw new Error('Not implemented');
- },
-
- formatMultipleFieldsMax: function(fields) {
- return this.formatSingleField(this.getMaxField(fields));
- },
-
- cmp: function(rowA, rowB) {
- var fieldsA = this.fields(rowA);
- var fieldsB = this.fields(rowB);
-
- // Sanity check.
- if (fieldsA !== undefined && fieldsB !== undefined &&
- fieldsA.length !== fieldsB.length)
- throw new Error('Different number of fields');
-
- // Handle empty fields.
- var undefinedA = this.hasAllRelevantFieldsUndefined(fieldsA);
- var undefinedB = this.hasAllRelevantFieldsUndefined(fieldsB);
- if (undefinedA && undefinedB)
- return 0;
- if (undefinedA)
- return -1;
- if (undefinedB)
- return 1;
-
- return this.compareFields(fieldsA, fieldsB);
- },
-
- /**
- * Compare a pair of single or multiple fields. At least one field relevant
- * for the current aggregation mode is guaranteed to be defined in each of
- * the two lists.
- */
- compareFields: function(fieldsA, fieldsB) {
- if (fieldsA.length === 1)
- return this.compareSingleFields(fieldsA[0], fieldsB[0]);
- else
- return this.compareMultipleFields(fieldsA, fieldsB);
- },
-
- /**
- * Compare a pair of single defined fields.
- *
- * This method is intended to be overriden by field type specific columns.
- */
- compareSingleFields: function(fieldA, fieldB) {
- throw new Error('Not implemented');
- },
-
- /**
- * Compare a pair of multiple fields. At least one field relevant for the
- * current aggregation mode is guaranteed to be defined in each of the two
- * lists.
- *
- * The aggregation mode specializations of this method (e.g.
- * compareMultipleFieldsDiff) are intended to be overriden by field type
- * specific columns.
- */
- compareMultipleFields: function(fieldsA, fieldsB) {
- switch (this.aggregationMode) {
- case MemoryColumn.AggregationMode.DIFF:
- return this.compareMultipleFieldsDiff(
- fieldsA[0], fieldsA[fieldsA.length - 1],
- fieldsB[0], fieldsB[fieldsB.length - 1]);
-
- case MemoryColumn.AggregationMode.MAX:
- return this.compareMultipleFieldsMax(fieldsA, fieldsB);
-
- default:
- return 0;
- }
- },
-
- compareMultipleFieldsDiff: function(firstFieldA, lastFieldA, firstFieldB,
- lastFieldB) {
- throw new Error('Not implemented');
- },
-
- compareMultipleFieldsMax: function(fieldsA, fieldsB) {
- return this.compareSingleFields(
- this.getMaxField(fieldsA), this.getMaxField(fieldsB));
- },
-
- getMaxField: function(fields) {
- return fields.reduce(function(accumulator, field) {
- if (field === undefined)
- return accumulator;
- if (accumulator === undefined ||
- this.compareSingleFields(field, accumulator) > 0) {
- return field;
- }
- return accumulator;
- }.bind(this), undefined);
- },
-
- addInfos: function(fields, contexts, infos) {
- // No generic infos.
- },
-
- getImportance: function(importanceRules) {
- if (importanceRules.length === 0)
- return 0;
-
- // Find the first matching rule.
- var matchingRule =
- MemoryColumn.findMatchingRule(this.name, importanceRules);
- if (matchingRule !== undefined)
- return matchingRule.importance;
-
- // No matching rule. Return lower importance than all rules.
- var minImportance = importanceRules[0].importance;
- for (var i = 1; i < importanceRules.length; i++)
- minImportance = Math.min(minImportance, importanceRules[i].importance);
- return minImportance - 1;
- }
- };
-
- /**
- * @constructor
- */
- function StringMemoryColumn(name, cellPath, aggregationMode) {
- MemoryColumn.call(this, name, cellPath, aggregationMode);
- }
-
- StringMemoryColumn.prototype = {
- __proto__: MemoryColumn.prototype,
-
- formatSingleField: function(string) {
- return string;
- },
-
- formatMultipleFieldsDiff: function(firstString, lastString) {
- if (firstString === undefined) {
- // String was added ("+NEW_VALUE" in red).
- var spanEl = tr.ui.b.createSpan({color: 'red'});
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode('+'));
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode(
- this.formatSingleField(lastString)));
- return spanEl;
- } else if (lastString === undefined) {
- // String was removed ("-OLD_VALUE" in green).
- var spanEl = tr.ui.b.createSpan({color: 'green'});
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode('-'));
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode(
- this.formatSingleField(firstString)));
- return spanEl;
- } else if (firstString === lastString) {
- // String didn't change ("VALUE" with unchanged color).
- return this.formatSingleField(firstString);
- } else {
- // String changed ("OLD_VALUE -> NEW_VALUE" in orange).
- var spanEl = tr.ui.b.createSpan({color: 'DarkOrange'});
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode(
- this.formatSingleField(firstString)));
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode(
- ' ' + RIGHTWARDS_ARROW + ' '));
- Polymer.dom(spanEl).appendChild(tr.ui.b.asHTMLOrTextNode(
- this.formatSingleField(lastString)));
- return spanEl;
- }
- },
-
- compareSingleFields: function(stringA, stringB) {
- return COLLATOR.compare(stringA, stringB);
- },
-
- compareMultipleFieldsDiff: function(firstStringA, lastStringA, firstStringB,
- lastStringB) {
- // If one of the strings was added (and the other one wasn't), mark the
- // corresponding diff as greater.
- if (firstStringA === undefined && firstStringB !== undefined)
- return 1;
- if (firstStringA !== undefined && firstStringB === undefined)
- return -1;
-
- // If both strings were added, compare the last values (greater last
- // value implies greater diff).
- if (firstStringA === undefined && firstStringB === undefined)
- return this.compareSingleFields(lastStringA, lastStringB);
-
- // If one of the strings was removed (and the other one wasn't), mark the
- // corresponding diff as lower.
- if (lastStringA === undefined && lastStringB !== undefined)
- return -1;
- if (lastStringA !== undefined && lastStringB === undefined)
- return 1;
-
- // If both strings were removed, compare the first values (greater first
- // value implies smaller (!) diff).
- if (lastStringA === undefined && lastStringB === undefined)
- return this.compareSingleFields(firstStringB, firstStringA);
-
- var areStringsAEqual = firstStringA === lastStringA;
- var areStringsBEqual = firstStringB === lastStringB;
-
- // Consider diffs of strings that did not change to be smaller than diffs
- // of strings that did change.
- if (areStringsAEqual && areStringsBEqual)
- return 0;
- if (areStringsAEqual)
- return -1;
- if (areStringsBEqual)
- return 1;
-
- // Both strings changed. We are unable to determine the ordering of the
- // diffs.
- return 0;
- }
- };
-
- /**
- * @constructor
- */
- function NumericMemoryColumn(name, cellPath, aggregationMode) {
- MemoryColumn.call(this, name, cellPath, aggregationMode);
- }
-
- // Avoid tiny positive/negative diffs (displayed in the UI as '+0.0 B' and
- // '-0.0 B') due to imprecise floating-point arithmetic by treating all diffs
- // within the (-DIFF_EPSILON, DIFF_EPSILON) range as zeros.
- NumericMemoryColumn.DIFF_EPSILON = 0.0001;
-
- NumericMemoryColumn.prototype = {
- __proto__: MemoryColumn.prototype,
-
- align: tr.ui.b.TableFormat.ColumnAlignment.RIGHT,
-
- aggregateCells: function(row, subRows) {
- var subRowCells = subRows.map(this.cell, this);
-
- // Determine if there is at least one defined numeric in the sub-row
- // cells and the timestamp count.
- var hasDefinedSubRowNumeric = false;
- var timestampCount = undefined;
- subRowCells.forEach(function(subRowCell) {
- if (subRowCell === undefined)
- return;
-
- var subRowNumerics = subRowCell.fields;
- if (subRowNumerics === undefined)
- return;
-
- if (timestampCount === undefined)
- timestampCount = subRowNumerics.length;
- else if (timestampCount !== subRowNumerics.length)
- throw new Error('Sub-rows have different numbers of timestamps');
-
- if (hasDefinedSubRowNumeric)
- return; // Avoid unnecessary traversals of the numerics.
- hasDefinedSubRowNumeric = subRowNumerics.some(function(numeric) {
- return numeric !== undefined;
- });
- });
- if (!hasDefinedSubRowNumeric)
- return; // No numeric to aggregate.
-
- // Get or create the row cell.
- var cellPath = this.cellPath;
- var rowCell = row;
- for (var i = 0; i < cellPath.length; i++) {
- var nextStepName = cellPath[i];
- var nextStep = rowCell[nextStepName];
- if (nextStep === undefined) {
- if (i < cellPath.length - 1)
- nextStep = {};
- else
- nextStep = new MemoryCell(undefined);
- rowCell[nextStepName] = nextStep;
- }
- rowCell = nextStep;
- }
- if (rowCell.fields === undefined) {
- rowCell.fields = new Array(timestampCount);
- } else if (rowCell.fields.length !== timestampCount) {
- throw new Error(
- 'Row has a different number of timestamps than sub-rows');
- }
-
- for (var i = 0; i < timestampCount; i++) {
- if (rowCell.fields[i] !== undefined)
- continue;
- rowCell.fields[i] = tr.model.MemoryAllocatorDump.aggregateNumerics(
- subRowCells.map(function(subRowCell) {
- if (subRowCell === undefined || subRowCell.fields === undefined)
- return undefined;
- return subRowCell.fields[i];
- }));
- }
- },
-
- formatSingleField: function(numeric) {
- var formattingContext = this.getFormattingContext(numeric.unit);
- var contextGroup = this.shouldSetContextGroup ? this.name : undefined;
- var config = undefined;
- if (formattingContext || contextGroup) {
- config = {
- context: formattingContext,
- contextGroup: contextGroup
- };
- }
- return tr.v.ui.createScalarSpan(numeric, config);
- },
-
- getFormattingContext: function(unit) {
- return undefined;
- },
-
- formatMultipleFieldsDiff: function(firstNumeric, lastNumeric) {
- return this.formatSingleField(
- this.getDiffField_(firstNumeric, lastNumeric));
- },
-
- compareSingleFields: function(numericA, numericB) {
- return numericA.value - numericB.value;
- },
-
- compareMultipleFieldsDiff: function(firstNumericA, lastNumericA,
- firstNumericB, lastNumericB) {
- return this.getDiffFieldValue_(firstNumericA, lastNumericA) -
- this.getDiffFieldValue_(firstNumericB, lastNumericB);
- },
-
- getDiffField_: function(firstNumeric, lastNumeric) {
- var definedNumeric = firstNumeric || lastNumeric;
- return new tr.v.ScalarNumeric(definedNumeric.unit.correspondingDeltaUnit,
- this.getDiffFieldValue_(firstNumeric, lastNumeric));
- },
-
- getDiffFieldValue_: function(firstNumeric, lastNumeric) {
- var firstValue = firstNumeric === undefined ? 0 : firstNumeric.value;
- var lastValue = lastNumeric === undefined ? 0 : lastNumeric.value;
- var diff = lastValue - firstValue;
- return Math.abs(diff) < NumericMemoryColumn.DIFF_EPSILON ? 0 : diff;
- }
- };
-
- /**
- * @constructor
- */
- function MemoryCell(fields) {
- this.fields = fields;
- }
-
- MemoryCell.extractFields = function(cell) {
- if (cell === undefined)
- return undefined;
- return cell.fields;
- };
-
- /** Limit for the number of sub-rows for recursive table row expansion. */
- var RECURSIVE_EXPANSION_MAX_VISIBLE_ROW_COUNT = 10;
-
- function expandTableRowsRecursively(table) {
- var currentLevelRows = table.tableRows;
- var totalVisibleRowCount = currentLevelRows.length;
-
- while (currentLevelRows.length > 0) {
- // Calculate the total number of sub-rows on the current level.
- var nextLevelRowCount = 0;
- currentLevelRows.forEach(function(currentLevelRow) {
- var subRows = currentLevelRow.subRows;
- if (subRows === undefined || subRows.length === 0)
- return;
- nextLevelRowCount += subRows.length;
- });
-
- // Determine whether expanding all rows on the current level would cause
- // the total number of visible rows go over the limit.
- if (totalVisibleRowCount + nextLevelRowCount >
- RECURSIVE_EXPANSION_MAX_VISIBLE_ROW_COUNT) {
- break;
- }
-
- // Expand all rows on the current level and gather their sub-rows.
- var nextLevelRows = new Array(nextLevelRowCount);
- var nextLevelRowIndex = 0;
- currentLevelRows.forEach(function(currentLevelRow) {
- var subRows = currentLevelRow.subRows;
- if (subRows === undefined || subRows.length === 0)
- return;
- table.setExpandedForTableRow(currentLevelRow, true);
- subRows.forEach(function(subRow) {
- nextLevelRows[nextLevelRowIndex++] = subRow;
- });
- });
-
- // Update the total number of visible rows and progress to the next level.
- totalVisibleRowCount += nextLevelRowCount;
- currentLevelRows = nextLevelRows;
- }
- }
-
- function aggregateTableRowCellsRecursively(row, columns, opt_predicate) {
- var subRows = row.subRows;
- if (subRows === undefined || subRows.length === 0)
- return;
-
- subRows.forEach(function(subRow) {
- aggregateTableRowCellsRecursively(subRow, columns, opt_predicate);
- });
-
- if (opt_predicate === undefined || opt_predicate(row.contexts))
- aggregateTableRowCells(row, subRows, columns);
- }
-
- function aggregateTableRowCells(row, subRows, columns) {
- columns.forEach(function(column) {
- if (!(column instanceof MemoryColumn))
- return;
- column.aggregateCells(row, subRows);
- });
- }
-
- function createCells(timeToValues, valueFieldsGetter, opt_this) {
- opt_this = opt_this || this;
- var fieldNameToFields = tr.b.invertArrayOfDicts(
- timeToValues, valueFieldsGetter, opt_this);
- return tr.b.mapItems(fieldNameToFields, function(fieldName, fields) {
- return new tr.ui.analysis.MemoryCell(fields);
- });
- }
-
- function createWarningInfo(message) {
- return {
- message: message,
- icon: String.fromCharCode(9888),
- color: 'red'
- };
- }
-
- // TODO(petrcermak): Use a context manager instead
- // (https://github.com/catapult-project/catapult/issues/2420).
- function DetailsNumericMemoryColumn(name, cellPath, aggregationMode) {
- NumericMemoryColumn.call(this, name, cellPath, aggregationMode);
- }
-
- DetailsNumericMemoryColumn.prototype = {
- __proto__: NumericMemoryColumn.prototype,
-
- getFormattingContext: function(unit) {
- if (unit.baseUnit === tr.b.Unit.byName.sizeInBytes)
- return { unitPrefix: tr.b.UnitScale.Binary.KIBI };
- return undefined;
- }
- };
-
- return {
- TitleColumn: TitleColumn,
- MemoryColumn: MemoryColumn,
- StringMemoryColumn: StringMemoryColumn,
- NumericMemoryColumn: NumericMemoryColumn,
- MemoryCell: MemoryCell,
- expandTableRowsRecursively: expandTableRowsRecursively,
- aggregateTableRowCellsRecursively: aggregateTableRowCellsRecursively,
- aggregateTableRowCells: aggregateTableRowCells,
- createCells: createCells,
- createWarningInfo: createWarningInfo,
- DetailsNumericMemoryColumn: DetailsNumericMemoryColumn
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util_test.html
deleted file mode 100644
index 538a996d686..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_sub_view_util_test.html
+++ /dev/null
@@ -1,1235 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TitleColumn = tr.ui.analysis.TitleColumn;
- var MemoryColumn = tr.ui.analysis.MemoryColumn;
- var AggregationMode = MemoryColumn.AggregationMode;
- var StringMemoryColumn = tr.ui.analysis.StringMemoryColumn;
- var NumericMemoryColumn = tr.ui.analysis.NumericMemoryColumn;
- var MemoryCell = tr.ui.analysis.MemoryCell;
- var expandTableRowsRecursively = tr.ui.analysis.expandTableRowsRecursively;
- var aggregateTableRowCells = tr.ui.analysis.aggregateTableRowCells;
- var aggregateTableRowCellsRecursively =
- tr.ui.analysis.aggregateTableRowCellsRecursively;
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
- var checkSizeNumericFields = tr.ui.analysis.checkSizeNumericFields;
- var checkNumericFields = tr.ui.analysis.checkNumericFields;
- var checkStringFields = tr.ui.analysis.checkStringFields;
- var createCells = tr.ui.analysis.createCells;
- var createWarningInfo = tr.ui.analysis.createWarningInfo;
-
- function checkPercent(string, expectedPercent) {
- assert.equal(Number(string.slice(0, -1)), expectedPercent);
- assert.equal(string.slice(-1), '%');
- }
-
- function checkMemoryColumnFieldFormat(test, column, fields,
- expectedTextContent, opt_expectedColor) {
- var value = column.formatMultipleFields(fields);
- if (expectedTextContent === undefined) {
- assert.strictEqual(value, '');
- assert.isUndefined(opt_expectedColor); // Test sanity check.
- return;
- }
-
- var node = tr.ui.b.asHTMLOrTextNode(value);
- var spanEl = document.createElement('span');
- Polymer.dom(spanEl).appendChild(node);
- test.addHTMLOutput(spanEl);
-
- assert.strictEqual(Polymer.dom(node).textContent, expectedTextContent);
- if (opt_expectedColor === undefined)
- assert.notInstanceOf(node, HTMLElement);
- else
- assert.strictEqual(node.style.color, opt_expectedColor);
- }
-
- function checkCompareFieldsEqual(column, fieldValuesA, fieldValuesB) {
- assert.strictEqual(column.compareFields(fieldValuesA, fieldValuesB), 0);
- }
-
- function checkCompareFieldsLess(column, fieldValuesA, fieldValuesB) {
- assert.isBelow(column.compareFields(fieldValuesA, fieldValuesB), 0);
- assert.isAbove(column.compareFields(fieldValuesB, fieldValuesA), 0);
- }
-
- function checkNumericMemoryColumnFieldFormat(test, column, fieldValues, unit,
- expectedValue) {
- var value = column.formatMultipleFields(
- buildScalarCell(unit, fieldValues).fields);
- if (expectedValue === undefined) {
- assert.equal(value, '');
- assert.isUndefined(expectedUnits); // Test sanity check.
- return;
- }
-
- test.addHTMLOutput(value);
- assert.equal(value.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.equal(value.value, expectedValue);
- assert.equal(value.unit, unit);
- }
-
- function buildScalarCell(unit, values) {
- return new MemoryCell(values.map(function(value) {
- if (value === undefined)
- return undefined;
- return new ScalarNumeric(unit, value);
- }));
- }
-
- function buildTestRows() {
- return [
- {
- title: 'Row 1',
- fields: {
- 'cpu_temperature': new MemoryCell(['below zero', 'absolute zero'])
- },
- subRows: [
- {
- title: 'Row 1A',
- fields: {
- 'page_size': buildScalarCell(sizeInBytes_smallerIsBetter,
- [1024, 1025])
- }
- },
- {
- title: 'Row 1B',
- fields: {
- 'page_size': buildScalarCell(sizeInBytes_smallerIsBetter,
- [512, 513]),
- 'mixed': new MemoryCell(['0.01', '0.10']),
- 'mixed2': new MemoryCell([
- new ScalarNumeric(tr.b.Unit.byName.powerInWatts, 2.43e18),
- new ScalarNumeric(tr.b.Unit.byName.powerInWatts, 0.5433)
- ])
- }
- }
- ]
- },
- {
- title: 'Row 2',
- fields: {
- 'cpu_temperature': undefined,
- 'mixed': buildScalarCell(tr.b.Unit.byName.timeDurationInMs,
- [0.99, 0.999])
- }
- }
- ];
- }
-
- function checkCellValue(
- test, value, expectedText, expectedColor, opt_expectedInfos) {
- var expectedInfos = opt_expectedInfos || [];
- assert.lengthOf(Polymer.dom(value).childNodes, 1 + expectedInfos.length);
- assert.strictEqual(value.style.color, expectedColor);
- if (typeof expectedText === 'string')
- assert.strictEqual(
- Polymer.dom(Polymer.dom(value).childNodes[0]).textContent,
- expectedText);
- else
- expectedText(Polymer.dom(value).childNodes[0]);
- for (var i = 0; i < expectedInfos.length; i++) {
- var expectedInfo = expectedInfos[i];
- var infoEl = Polymer.dom(value).childNodes[i + 1];
- assert.strictEqual(Polymer.dom(infoEl).textContent, expectedInfo.icon);
- assert.strictEqual(infoEl.title, expectedInfo.message);
- assert.strictEqual(infoEl.style.color, expectedInfo.color || '');
- }
- test.addHTMLOutput(value);
- }
-
- function sizeSpanMatcher(
- expectedValue, opt_expectedIsDelta, opt_expectedContext) {
- return function(element) {
- assert.strictEqual(element.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(element.value, expectedValue);
- assert.strictEqual(element.unit, opt_expectedIsDelta ?
- tr.b.Unit.byName.sizeInBytesDelta_smallerIsBetter :
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter);
- assert.deepEqual(element.context, opt_expectedContext);
- };
- }
-
- test('checkTitleColumn_value', function() {
- var column = new TitleColumn('column_title');
- assert.equal(column.title, 'column_title');
- assert.isFalse(column.supportsCellSelection);
-
- var row = {title: 'undefined', contexts: undefined};
- assert.equal(column.formatTitle(row), 'undefined');
- assert.equal(column.value(row), 'undefined');
-
- var row = {title: 'constant', contexts: [{}, {}, {}, {}]};
- assert.equal(column.formatTitle(row), 'constant');
- assert.equal(column.value(row), 'constant');
-
- var row = {title: 'added', contexts: [undefined, undefined, undefined, {}]};
- assert.equal(column.formatTitle(row), 'added');
- var value = column.value(row);
- assert.equal(Polymer.dom(value).textContent, '+++\u00A0added');
- assert.equal(value.style.color, 'red');
-
- var row = {title: 'removed', contexts: [true, true, undefined, undefined]};
- assert.equal(column.formatTitle(row), 'removed');
- var value = column.value(row);
- assert.equal(Polymer.dom(value).textContent, '---\u00A0removed');
- assert.equal(value.style.color, 'green');
-
- var row = {title: 'flaky', contexts: [true, undefined, true, true]};
- assert.equal(column.formatTitle(row), 'flaky');
- var value = column.value(row);
- assert.equal(Polymer.dom(value).textContent, 'flaky');
- assert.equal(value.style.color, 'purple');
-
- var row =
- {title: 'added-flaky', contexts: [undefined, {}, undefined, true]};
- assert.equal(column.formatTitle(row), 'added-flaky');
- var value = column.value(row);
- assert.equal(Polymer.dom(value).textContent, '+++\u00A0added-flaky');
- assert.equal(value.style.color, 'purple');
-
- var row =
- {title: 'removed-flaky', contexts: [true, undefined, {}, undefined]};
- assert.equal(column.formatTitle(row), 'removed-flaky');
- var value = column.value(row);
- assert.equal(Polymer.dom(value).textContent, '---\u00A0removed-flaky');
- assert.equal(value.style.color, 'purple');
- });
-
- test('checkTitleColumn_cmp', function() {
- var column = new TitleColumn('column_title');
-
- assert.isBelow(column.cmp({title: 'a'}, {title: 'b'}), 0);
- assert.equal(column.cmp({title: 'cc'}, {title: 'cc'}), 0);
- assert.isAbove(column.cmp({title: '10'}, {title: '2'}), 0);
- });
-
- test('checkMemoryColumn_fromRows', function() {
- function MockColumn0() {
- MemoryColumn.apply(this, arguments);
- }
- MockColumn0.prototype = {
- __proto__: MemoryColumn.prototype,
- get title() { return 'MockColumn0'; }
- };
-
- function MockColumn1() {
- MemoryColumn.apply(this, arguments);
- }
- MockColumn1.prototype = {
- __proto__: MemoryColumn.prototype,
- get title() { return 'MockColumn1'; }
- };
-
- function MockColumn2() {
- MemoryColumn.apply(this, arguments);
- }
- MockColumn2.prototype = {
- __proto__: MemoryColumn.prototype,
- get title() { return 'MockColumn2'; }
- };
-
- var rules = [
- {
- condition: /size/,
- importance: 10,
- columnConstructor: MockColumn0
- },
- {
- condition: 'cpu_temperature',
- importance: 0,
- columnConstructor: MockColumn1
- },
- {
- condition: 'unmatched',
- importance: -1,
- get columnConstructor() {
- throw new Error('The constructor should never be retrieved');
- }
- },
- {
- importance: 1,
- columnConstructor: MockColumn2
- }
- ];
-
- var rows = buildTestRows();
- var columns = MemoryColumn.fromRows(rows, {
- cellKey: 'fields',
- aggregationMode: AggregationMode.MAX,
- rules: rules,
- shouldSetContextGroup: true
- });
- assert.lengthOf(columns, 4);
-
- var pageSizeColumn = columns[0];
- assert.strictEqual(pageSizeColumn.name, 'page_size');
- assert.strictEqual(pageSizeColumn.title, 'MockColumn0');
- assert.strictEqual(pageSizeColumn.aggregationMode, AggregationMode.MAX);
- assert.strictEqual(pageSizeColumn.cell({fields: {page_size: 'large'}}),
- 'large');
- assert.isTrue(pageSizeColumn.shouldSetContextGroup);
- assert.instanceOf(pageSizeColumn, MockColumn0);
-
- var mixedColumn = columns[1];
- assert.strictEqual(mixedColumn.name, 'mixed');
- assert.strictEqual(mixedColumn.title, 'MockColumn2');
- assert.strictEqual(mixedColumn.aggregationMode, AggregationMode.MAX);
- assert.strictEqual(mixedColumn.cell({fields: {mixed: 89}}), 89);
- assert.isTrue(mixedColumn.shouldSetContextGroup);
- assert.instanceOf(mixedColumn, MockColumn2);
-
- var mixed2Column = columns[2];
- assert.strictEqual(mixed2Column.name, 'mixed2');
- assert.strictEqual(mixed2Column.title, 'MockColumn2');
- assert.strictEqual(mixed2Column.aggregationMode, AggregationMode.MAX);
- assert.strictEqual(mixed2Column.cell({fields: {mixed2: 'invalid'}}),
- 'invalid');
- assert.isTrue(mixed2Column.shouldSetContextGroup);
- assert.instanceOf(mixed2Column, MockColumn2);
-
- var cpuTemperatureColumn = columns[3];
- assert.strictEqual(cpuTemperatureColumn.name, 'cpu_temperature');
- assert.strictEqual(cpuTemperatureColumn.title, 'MockColumn1');
- assert.strictEqual(cpuTemperatureColumn.aggregationMode,
- AggregationMode.MAX);
- assert.strictEqual(
- cpuTemperatureColumn.cell({fields: {cpu_temperature: 42}}), 42);
- assert.isTrue(cpuTemperatureColumn.shouldSetContextGroup);
- assert.instanceOf(cpuTemperatureColumn, MockColumn1);
- });
-
- test('checkMemoryColumn_spaceEqually', function() {
- // Zero columns.
- var columns = [];
- MemoryColumn.spaceEqually(columns);
-
- // One column.
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; }
- }
- ];
- MemoryColumn.spaceEqually(columns);
- checkPercent(columns[0].width, 100);
-
- // Two columns.
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; }
- },
- {
- title: 'Second Column',
- value: function(row) { return row.firstData; }
- }
- ];
- MemoryColumn.spaceEqually(columns);
- checkPercent(columns[0].width, 50);
- checkPercent(columns[1].width, 50);
- });
-
- test('checkMemoryColumn_instantiate', function() {
- var c = new MemoryColumn('test_column', ['x'], AggregationMode.MAX);
- assert.equal(c.name, 'test_column');
- assert.equal(c.title, 'test_column');
- assert.equal(c.cell({x: 95}), 95);
- assert.isUndefined(c.width);
- assert.isUndefined(c.color());
- });
-
- test('checkMemoryColumn_cell', function() {
- var c = new MemoryColumn('test_column', ['a', 'b'], AggregationMode.MAX);
- var cell = new MemoryCell(undefined);
-
- assert.isUndefined(c.cell(undefined));
- assert.isUndefined(c.cell({b: cell}));
- assert.isUndefined(c.cell({a: {c: cell}}));
- assert.strictEqual(c.cell({a: {b: cell, c: 42}}), cell);
- });
-
- test('checkMemoryColumn_fields', function() {
- var c = new MemoryColumn('test_column', ['x'],
- AggregationMode.MAX);
-
- // Undefined cell or field inside cell.
- assert.isUndefined(c.fields({}));
- assert.isUndefined(c.fields({x: new MemoryCell(undefined)}));
-
- // Defined field(s) inside cell.
- var field1 = new ScalarNumeric(tr.b.Unit.byName.powerInWatts, 1013.25);
- var field2 = new ScalarNumeric(tr.b.Unit.byName.powerInWatts, 1065);
- var row1 = {x: new MemoryCell([field1])};
- var row2 = {x: new MemoryCell([field1, field2])};
- assert.deepEqual(c.fields(row1), [field1]);
- assert.deepEqual(c.fields(row2), [field1, field2]);
- });
-
- test('checkMemoryColumn_hasAllRelevantFieldsUndefined', function() {
- // Single field.
- var c1 = new MemoryColumn('single_column', ['x'],
- undefined /* aggregation mode */);
- assert.isTrue(c1.hasAllRelevantFieldsUndefined([undefined]));
- assert.isFalse(c1.hasAllRelevantFieldsUndefined(
- [new ScalarNumeric(sizeInBytes_smallerIsBetter, 16)]));
-
- // Multiple fields, diff aggregation mode.
- var c2 = new MemoryColumn('diff_column', ['x'],
- AggregationMode.DIFF);
- assert.isTrue(c2.hasAllRelevantFieldsUndefined([undefined, undefined]));
- assert.isTrue(c2.hasAllRelevantFieldsUndefined(
- [undefined, undefined, undefined]));
- assert.isTrue(c2.hasAllRelevantFieldsUndefined(
- [undefined, new ScalarNumeric(sizeInBytes_smallerIsBetter, 16),
- undefined]));
- assert.isFalse(c2.hasAllRelevantFieldsUndefined(
- [undefined, new ScalarNumeric(sizeInBytes_smallerIsBetter, 32)]));
- assert.isFalse(c2.hasAllRelevantFieldsUndefined(
- [new ScalarNumeric(sizeInBytes_smallerIsBetter, 32), undefined,
- undefined]));
- assert.isFalse(c2.hasAllRelevantFieldsUndefined([
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 16),
- undefined,
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 32)]));
-
- // Multiple fields, max aggregation mode.
- var c3 = new MemoryColumn('max_column', ['x'],
- AggregationMode.MAX);
- assert.isTrue(c3.hasAllRelevantFieldsUndefined([undefined, undefined]));
- assert.isTrue(c3.hasAllRelevantFieldsUndefined(
- [undefined, undefined, undefined]));
- assert.isFalse(c3.hasAllRelevantFieldsUndefined(
- [undefined, new ScalarNumeric(sizeInBytes_smallerIsBetter, 16),
- undefined]));
- assert.isFalse(c3.hasAllRelevantFieldsUndefined(
- [undefined, new ScalarNumeric(sizeInBytes_smallerIsBetter, 32)]));
- assert.isFalse(c3.hasAllRelevantFieldsUndefined([
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 32),
- undefined,
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 16)]));
- });
-
- test('checkMemoryColumn_value_allFieldsUndefined', function() {
- var c1 = new MemoryColumn('no_color', ['x'],
- AggregationMode.MAX);
- var c2 = new MemoryColumn('color', ['x'],
- AggregationMode.DIFF);
- Object.defineProperty(c2, 'color', {
- get: function() {
- throw new Error('The color should never be retrieved');
- }
- });
-
- // Infos should be completely ignored.
- c1.addInfos = c2.addInfos = function() {
- throw new Error('This method should never be called');
- };
-
- [c1, c2].forEach(function(c) {
- assert.equal(c.value({}), '');
- assert.equal(c.value({x: new MemoryCell(undefined)}), '');
- assert.equal(c.value({x: new MemoryCell([undefined])}), '');
- assert.equal(c.value({x: new MemoryCell([undefined, undefined])}), '');
- });
-
- // Diff should only take into account the first and last field value.
- assert.equal(c2.value({x: new MemoryCell(
- [undefined, new ScalarNumeric(sizeInBytes_smallerIsBetter, 16),
- undefined])}), '');
- });
-
- test('checkMemoryColumn_getImportance', function() {
- var c = new NumericMemoryColumn('test_column', ['x']);
-
- var rules1 = [];
- assert.equal(c.getImportance(rules1), 0);
-
- var rules2 = [
- {
- condition: 'test',
- importance: 4
- },
- {
- condition: /test$/,
- importance: 2
- }
- ];
- assert.equal(c.getImportance(rules2), 1);
-
- var rules3 = [
- {
- condition: 'test_column',
- importance: 10
- },
- {
- importance: 5
- }
- ];
- assert.equal(c.getImportance(rules3), 10);
-
- var rules4 = [
- {
- condition: 'test_column2',
- importance: 8
- },
- {
- condition: /column/,
- importance: 12
- }
- ];
- assert.equal(c.getImportance(rules4), 12);
- });
-
- test('checkMemoryColumn_nameMatchesCondition', function() {
- var c = new NumericMemoryColumn('test_column', ['x']);
-
- assert.isTrue(MemoryColumn.nameMatchesCondition('test_column', undefined));
-
- assert.isFalse(MemoryColumn.nameMatchesCondition('test_column', 'test'));
- assert.isTrue(
- MemoryColumn.nameMatchesCondition('test_column', 'test_column'));
- assert.isFalse(
- MemoryColumn.nameMatchesCondition('test_column', 'test_column2'));
-
- assert.isTrue(MemoryColumn.nameMatchesCondition('test_column', /test/));
- assert.isTrue(
- MemoryColumn.nameMatchesCondition('test_column', /^[^_]*_[^_]*$/));
- assert.isFalse(MemoryColumn.nameMatchesCondition('test_column', /test$/));
- });
-
- test('checkStringMemoryColumn_value_singleField', function() {
- var c = new StringMemoryColumn('', ['x'], AggregationMode.MAX);
- c.color = function(fields, contexts) {
- if (fields[0] < '0')
- return 'green';
- else if (contexts && contexts[0] % 2 === 0)
- return 'red';
- else
- return undefined;
- };
-
- var infos1 = [{ icon: '\u{1F648}', message: 'Some info', color: 'blue' }];
- var infos2 = [
- { icon: '\u{1F649}', message: 'Start', color: 'cyan' },
- { icon: '\u{1F64A}', message: 'Stop' }
- ];
- c.addInfos = function(fields, contexts, infos) {
- if (fields[0] < '0')
- infos.push.apply(infos, infos1);
- else if (contexts && contexts[0] % 2 === 0)
- infos.push.apply(infos, infos2);
- };
-
- var row = {x: new MemoryCell(['123'])};
- assert.strictEqual(c.value(row), '123');
-
- var row = {x: new MemoryCell(['-123']), contexts: [undefined]};
- checkCellValue(this, c.value(row), '-123', 'green', infos1);
-
- var row = {x: new MemoryCell(['123']), contexts: [42]};
- checkCellValue(this, c.value(row), '123', 'red', infos2);
- });
-
- test('checkStringMemoryColumn_value_multipleFields', function() {
- var c1 = new StringMemoryColumn('test_column1', ['x'],
- undefined /* aggregation mode */);
- var c2 = new StringMemoryColumn('test_column2', ['x'],
- AggregationMode.DIFF);
- c2.color = function(fields, contexts) {
- return '#009999';
- };
- var c3 = new StringMemoryColumn('test_column3', ['x'],
- AggregationMode.MAX);
- c3.color = function(fields, contexts) {
- if (fields[0] < '0')
- return 'green';
- else if (contexts && contexts[contexts.length - 1] % 2 === 0)
- return 'red';
- else
- return undefined;
- };
-
- var infos1 = [{ icon: '\u{1F648}', message: 'Some info', color: 'blue' }];
- var infos2 = [
- { icon: '\u{1F649}', message: 'Start', color: 'cyan' },
- { icon: '\u{1F64A}', message: 'Stop' }
- ];
- c1.addInfos = c2.addInfos = c3.addInfos =
- function(fields, contexts, infos) {
- if (fields[0] < '0')
- infos.push.apply(infos, infos1);
- else if (contexts && contexts[contexts.length - 1] % 2 === 0)
- infos.push.apply(infos, infos2);
- };
-
- var row = {x: new MemoryCell(['123', '456'])};
- checkCellValue(this, c1.value(row), '(unsupported aggregation mode)', '');
- checkCellValue(this, c2.value(row), '123 \u2192 456', 'rgb(0, 153, 153)');
- assert.strictEqual(c3.value(row), '456');
-
- var row = {
- x: new MemoryCell(['-123', undefined, '+123']),
- contexts: [12, 14, undefined]
- };
- checkCellValue(this, c1.value(row), '(unsupported aggregation mode)', '',
- infos1);
- checkCellValue(this, c2.value(row), '-123 \u2192 +123', 'rgb(0, 153, 153)',
- infos1);
- checkCellValue(this, c3.value(row), '+123', 'green', infos1);
-
- var row = {
- x: new MemoryCell(['123', undefined, '456']),
- contexts: [31, 7, -2]
- };
- checkCellValue(this, c1.value(row), '(unsupported aggregation mode)', '',
- infos2);
- checkCellValue(this, c2.value(row), '123 \u2192 456', 'rgb(0, 153, 153)',
- infos2);
- checkCellValue(this, c3.value(row), '456', 'red', infos2);
- });
-
- test('checkStringMemoryColumn_formatSingleField', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- undefined /* aggregation mode */);
-
- assert.equal(c.formatSingleField('1024'), '1024');
- assert.equal(c.formatSingleField('~10'), '~10');
- });
-
- test('checkStringMemoryColumn_formatMultipleFields_diff', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- AggregationMode.DIFF);
-
- // Added value.
- checkMemoryColumnFieldFormat(this, c, [undefined, 'few'], '+few', 'red');
- checkMemoryColumnFieldFormat(this, c, [undefined, 64, 32], '+32', 'red');
-
- // Removed value.
- checkMemoryColumnFieldFormat(this, c, ['00', undefined], '-00', 'green');
- checkMemoryColumnFieldFormat(this, c, [1, undefined, 2, undefined], '-1',
- 'green');
-
- // Identical values.
- checkMemoryColumnFieldFormat(this, c, ['Unchanged', 'Unchanged'],
- 'Unchanged', undefined /* unchanged color (not an HTML element) */);
- checkMemoryColumnFieldFormat(this, c, [16, 32, undefined, 64, 16], '16',
- undefined /* unchanged color (not an HTML element) */);
-
- // Different values.
- checkMemoryColumnFieldFormat(this, c, ['A', 'C', undefined, 'C', 'B'],
- 'A \u2192 B', 'darkorange');
- checkMemoryColumnFieldFormat(this, c, [16, undefined, 64], '16 \u2192 64',
- 'darkorange');
- });
-
- test('checkStringMemoryColumn_formatMultipleFields_max', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- AggregationMode.MAX);
-
- // Different values.
- checkMemoryColumnFieldFormat(this, c, ['A', 'B', 'A'], 'B',
- undefined /* unchanged color (not an HTML element) */);
- checkMemoryColumnFieldFormat(this, c, [16, 16, undefined, 17], '17',
- undefined /* unchanged color (not an HTML element) */);
-
- // Identical values.
- checkMemoryColumnFieldFormat(this, c, ['X', 'X'], 'X',
- undefined /* unchanged color (not an HTML element) */);
- checkMemoryColumnFieldFormat(this, c, [7, undefined, 7, undefined, 7], '7',
- undefined /* unchanged color (not an HTML element) */);
- });
-
- test('checkStringMemoryColumn_compareSingleFields', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- undefined /* aggregation mode */);
-
- assert.isBelow(c.compareSingleFields(
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 2),
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 10)), 0);
- assert.equal(c.compareSingleFields('equal', 'equal'), 0);
- assert.isAbove(c.compareSingleFields('100', '99'), 0);
- });
-
- test('checkStringMemoryColumn_compareMultipleFields_diff', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- AggregationMode.DIFF);
-
- // One field was added.
- checkCompareFieldsLess(c, [-10, 10], [undefined, 5]);
- checkCompareFieldsLess(c,
- [-100, undefined, undefined], [undefined, 4, 5]);
- checkCompareFieldsLess(c,
- [1, 2, 3, 4], [undefined, 'x', undefined, 'y']);
-
- // Both fields were added.
- checkCompareFieldsEqual(c,
- [undefined, 'C', undefined, 'A'], [undefined, 'B', 'D', 'A']);
- checkCompareFieldsLess(c, [undefined, 1], [undefined, 2]);
- checkCompareFieldsLess(c, [undefined, 6, 3], [undefined, 5, 4]);
-
- // One field was removed (neither was added).
- checkCompareFieldsLess(c, ['B', undefined], ['A', 'A']);
- checkCompareFieldsLess(c,
- [5, undefined, undefined], [undefined, -5, -10]);
-
- // Both fields were removed (neither was added)
- checkCompareFieldsEqual(c, ['T', 'A', undefined, undefined],
- ['T', 'B', 'C', undefined]);
- checkCompareFieldsLess(c, [5, undefined], [4, undefined]);
-
- // Neither field was added or removed.
- checkCompareFieldsLess(c, ['BB', 'BB'], ['AA', 'CC']);
- checkCompareFieldsEqual(c, [7, 8, 9], [6, 9, 10]);
- checkCompareFieldsEqual(c, [5, undefined, 5], [4, 3, 4]);
- });
-
- test('checkStringMemoryColumn_compareMultipleFields_max', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- AggregationMode.MAX);
-
- // At least one field has multiple values.
- checkCompareFieldsEqual(c, [0, 1, 3], [1, 3, 2]);
- checkCompareFieldsLess(c, ['4', undefined, '4'], ['3', '4', '5']);
- checkCompareFieldsLess(c, [3, 3, 3], [9, undefined, 10]);
-
- // Both fields have single values.
- checkCompareFieldsEqual(c,
- [undefined, 'ttt', undefined], ['ttt', 'ttt', undefined]);
- checkCompareFieldsLess(c, [undefined, -1, undefined], [-2, -2, -2]);
- checkCompareFieldsLess(c, ['Q', 'Q', undefined], ['X', undefined, 'X']);
- });
-
- test('checkStringMemoryColumn_cmp', function() {
- var c = new StringMemoryColumn('test_column', ['x'],
- AggregationMode.DIFF);
-
- // Cell (or the associated field) undefined in one or both rows.
- assert.equal(c.cmp({}, {y: new MemoryCell([undefined])}), 0);
- assert.equal(c.cmp({x: new MemoryCell(undefined)}, {}), 0);
- assert.equal(c.cmp({x: new MemoryCell([undefined, undefined])}, {}), 0);
- assert.isAbove(c.cmp({x: new MemoryCell(['negative'])}, {}), 0);
- assert.isAbove(c.cmp({x: new MemoryCell(['negative'])},
- {x: new MemoryCell([undefined])}), 0);
- assert.isBelow(c.cmp({}, {x: new MemoryCell(['positive'])}), 0);
- assert.isBelow(c.cmp({x: new MemoryCell(undefined)},
- {x: new MemoryCell(['positive'])}), 0);
-
- // Single field.
- assert.equal(c.cmp({x: new MemoryCell(['equal'])},
- {x: new MemoryCell(['equal'])}), 0);
- assert.isAbove(c.cmp({x: new MemoryCell(['bigger'])},
- {x: new MemoryCell(['BIG'])}), 0);
- assert.isBelow(c.cmp({x: new MemoryCell(['small'])},
- {x: new MemoryCell(['smaLL'])}), 0);
-
- // Multiple fields.
- assert.isBelow(c.cmp(
- {x: new MemoryCell(['MemoryColumn', 'supports*', undefined])},
- {x: new MemoryCell(['comparing', 'multiple', 'values :-)'])}), 0);
- });
-
- test('checkNumericMemoryColumn_value', function() {
- var c = new NumericMemoryColumn('test_column', ['x'],
- AggregationMode.DIFF);
- c.color = function(fields, contexts) {
- return '#009999';
- };
- var infos1 = [createWarningInfo('Attention!')];
- c.addInfos = function(fields, contexts, infos) {
- infos.push.apply(infos, infos1);
- };
-
- // Undefined field values.
- var row = {x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [undefined, 1, undefined])};
- assert.equal(c.value(row), '');
-
- // Single field value.
- var row = {x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [5.4975581e13 /* 50 TiB */])};
- checkCellValue(this, c.value(row), sizeSpanMatcher(5.4975581e13),
- 'rgb(0, 153, 153)', infos1);
-
- // Multiple field values.
- var row = {
- x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [5.4975581e13 /* 50 TiB */, undefined, 2.1990233e13 /* 20 TiB */])
- };
- checkCellValue(this, c.value(row),
- sizeSpanMatcher(-3.2985348e13, true /* opt_expectedIsDelta */),
- 'rgb(0, 153, 153)', infos1);
-
- // With custom formatting context.
- c.getFormattingContext = function(unit) {
- assert.strictEqual(unit,
- tr.b.Unit.byName.sizeInBytesDelta_smallerIsBetter);
- return { minimumFractionDigits: 2 };
- };
- checkCellValue(this, c.value(row),
- sizeSpanMatcher(-3.2985348e13, true /* opt_expectedIsDelta */,
- { minimumFractionDigits: 2 }),
- 'rgb(0, 153, 153)', infos1);
- });
-
- test('checkNumericMemoryColumn_formatSingleField', function() {
- var c = new NumericMemoryColumn('non_bytes_column', ['x'],
- undefined /* aggregation mode */);
- var value = c.formatSingleField(new ScalarNumeric(
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter, 123));
- assert.strictEqual(value.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(value.value, 123);
- assert.strictEqual(value.unit,
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter);
- assert.isUndefined(value.contextGroup);
- this.addHTMLOutput(value);
-
- var c = new NumericMemoryColumn('bytes_column', ['x'],
- undefined /* aggregation mode */);
- c.shouldSetContextGroup = true;
- var value = c.formatSingleField(new ScalarNumeric(
- sizeInBytes_smallerIsBetter, 456));
- assert.strictEqual(value.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(value.value, 456);
- assert.strictEqual(value.unit,
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter);
- assert.strictEqual(value.contextGroup, 'bytes_column');
- this.addHTMLOutput(value);
- });
-
- test('checkNumericMemoryColumn_formatMultipleFields_diff',
- function() {
- var c = new NumericMemoryColumn('non_bytes_column', ['x'],
- AggregationMode.DIFF);
- checkNumericMemoryColumnFieldFormat(this, c, [1, 2, 3],
- tr.b.Unit.byName.unitlessNumberDelta_smallerIsBetter, 2);
- checkNumericMemoryColumnFieldFormat(this, c, [10, undefined],
- tr.b.Unit.byName.unitlessNumberDelta_smallerIsBetter, -10);
- checkNumericMemoryColumnFieldFormat(this, c, [undefined, 60, 0],
- tr.b.Unit.byName.unitlessNumberDelta_smallerIsBetter, 0);
- checkNumericMemoryColumnFieldFormat(
- this, c, [2.71828, 2.71829] /* diff within epsilon */,
- tr.b.Unit.byName.unitlessNumberDelta_smallerIsBetter, 0);
-
- var c = new NumericMemoryColumn('bytes_column', ['x'],
- AggregationMode.DIFF);
- checkNumericMemoryColumnFieldFormat(this, c, [1, 2, 3],
- tr.b.Unit.byName.sizeInBytesDelta_smallerIsBetter, 2);
- checkNumericMemoryColumnFieldFormat(this, c, [10, undefined],
- tr.b.Unit.byName.sizeInBytesDelta_smallerIsBetter, -10);
- checkNumericMemoryColumnFieldFormat(this, c, [undefined, 60, 0],
- tr.b.Unit.byName.sizeInBytesDelta_smallerIsBetter, 0);
- checkNumericMemoryColumnFieldFormat(
- this, c, [1.41421, 1.41422] /* diff within epsilon */,
- tr.b.Unit.byName.sizeInBytesDelta_smallerIsBetter, 0);
- });
-
- test('checkNumericMemoryColumn_formatMultipleFields_max',
- function() {
- var c = new NumericMemoryColumn('non_bytes_column', ['x'],
- AggregationMode.MAX);
- checkNumericMemoryColumnFieldFormat(this, c, [1, 2, 3],
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter, 3);
- checkNumericMemoryColumnFieldFormat(this, c, [10, undefined],
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter, 10);
- checkNumericMemoryColumnFieldFormat(this, c, [undefined, 60, 0],
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter, 60);
- checkNumericMemoryColumnFieldFormat(this, c, [undefined, 10, 20, undefined],
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter, 20);
-
- var c = new NumericMemoryColumn('bytes_column', ['x'],
- AggregationMode.MAX);
- checkNumericMemoryColumnFieldFormat(this, c, [1, 2, 3],
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, 3);
- checkNumericMemoryColumnFieldFormat(this, c, [10, undefined],
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, 10);
- checkNumericMemoryColumnFieldFormat(this, c, [undefined, 60, 0],
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, 60);
- checkNumericMemoryColumnFieldFormat(this, c, [undefined, 10, 20, undefined],
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter, 20);
- });
-
- test('checkNumericMemoryColumn_cmp', function() {
- var c = new NumericMemoryColumn('test_column', ['x'],
- AggregationMode.DIFF);
-
- // Undefined field values.
- assert.isAbove(c.cmp({x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [-9999999999])},
- {x: undefined}), 0);
- assert.isBelow(c.cmp({x: new MemoryCell(undefined)},
- {x: buildScalarCell(sizeInBytes_smallerIsBetter, [748, 749])}), 0);
- assert.equal(c.cmp({},
- {x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [undefined, undefined])}), 0);
-
- // Single field value.
- assert.isBelow(c.cmp(
- {x: buildScalarCell(sizeInBytes_smallerIsBetter, [16384])},
- {x: buildScalarCell(sizeInBytes_smallerIsBetter, [32768])}), 0);
-
- // Multiple field values.
- assert.equal(c.cmp(
- {x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [999, undefined, 1001])},
- {x: buildScalarCell(sizeInBytes_smallerIsBetter,
- [undefined, 5, 2])}), 0);
- });
-
- test('checkNumericMemoryColumn_compareSingleFields', function() {
- var c = new NumericMemoryColumn('test_column', ['x'],
- undefined /* aggregation mode */);
-
- assert.isBelow(c.compareSingleFields(
- new ScalarNumeric(
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, 99),
- new ScalarNumeric(
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, 100)), 0);
- assert.equal(c.compareSingleFields(
- new ScalarNumeric(tr.b.Unit.byName.unitlessNumber, 0xEEE),
- new ScalarNumeric(tr.b.Unit.byName.unitlessNumber, 0xEEE)), 0);
- assert.isAbove(c.compareSingleFields(
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 10),
- new ScalarNumeric(sizeInBytes_smallerIsBetter, 2)), 0);
- });
-
- test('checkNumericMemoryColumn_compareMultipleFields_diff', function() {
- var c = new NumericMemoryColumn('test_column', ['x'],
- AggregationMode.DIFF);
-
- assert.isBelow(c.compareMultipleFields(
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [10000, 10001, 10002] /* diff +2 */).fields,
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [5, 7, 8] /* diff +3 */).fields), 0);
- assert.equal(c.compareMultipleFields(
- buildScalarCell(tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- [4, undefined] /* diff -4 */).fields,
- buildScalarCell(tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- [999, 995] /* diff -4 */).fields), 0);
- assert.isAbove(c.compareMultipleFields(
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [10, undefined, 12] /* diff +2 */).fields,
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [11, 50, 12] /* diff +1 */).fields), 0);
- assert.equal(c.compareMultipleFields(
- buildScalarCell(tr.b.Unit.byName.powerInWatts_smallerIsBetter,
- [17, undefined, 17] /* diff 0 */).fields,
- buildScalarCell(tr.b.Unit.byName.powerInWatts_smallerIsBetter,
- [undefined, 100, undefined] /* diff 0 */).fields), 0);
- assert.equal(c.compareMultipleFields(
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [3.14159, undefined, 3.14160] /* diff within epsilon */).fields,
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [100, 100, 100] /* diff 0 */).fields), 0);
- });
-
- test('checkNumericMemoryColumn_compareMultipleFields_max', function() {
- var c = new NumericMemoryColumn('test_column', ['x'],
- AggregationMode.MAX);
-
- assert.isBelow(c.compareMultipleFields(
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [10, undefined, 12]).fields,
- buildScalarCell(sizeInBytes_smallerIsBetter, [11, 50, 12]).fields), 0);
- assert.equal(c.compareMultipleFields(
- buildScalarCell(tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- [999, undefined, -8888]).fields,
- buildScalarCell(tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- [undefined, 999, undefined]).fields), 0);
- assert.isAbove(c.compareMultipleFields(
- buildScalarCell(sizeInBytes_smallerIsBetter,
- [10000, 10001, 10002]).fields,
- buildScalarCell(sizeInBytes_smallerIsBetter, [5, 7, 8]).fields), 0);
- assert.isBelow(c.compareMultipleFields(
- buildScalarCell(tr.b.Unit.byName.powerInWatts_smallerIsBetter,
- [17, undefined, 17]).fields,
- buildScalarCell(tr.b.Unit.byName.powerInWatts_smallerIsBetter,
- [undefined, 100, undefined]).fields), 0);
- });
-
- test('checkNumericMemoryColumn_getDiffFieldValue', function() {
- var c = new NumericMemoryColumn('test_column', ['x'],
- AggregationMode.MAX);
- function checkDiffValue(first, last, expectedDiffValue) {
- var actualDiffValue = c.getDiffFieldValue_(
- first === undefined ? undefined :
- new ScalarNumeric(sizeInBytes_smallerIsBetter, first),
- last === undefined ? undefined :
- new ScalarNumeric(sizeInBytes_smallerIsBetter, last));
- assert.closeTo(actualDiffValue, expectedDiffValue, 1e-8);
- }
-
- // Diff outside epsilon range.
- checkDiffValue(0, 0.0002, 0.0002);
- checkDiffValue(undefined, 0.0003, 0.0003);
- checkDiffValue(0.3334, 0.3332, -0.0002);
- checkDiffValue(0.0005, undefined, -0.0005);
-
- // Diff inside epsilon range.
- checkDiffValue(5, 5.00009, 0);
- checkDiffValue(undefined, 0.0000888, 0);
- checkDiffValue(0.29999, 0.3, 0);
- checkDiffValue(0.00009, undefined, 0);
- checkDiffValue(0.777777, 0.777777, 0);
- checkDiffValue(undefined, undefined, 0);
- });
-
- test('checkExpandTableRowsRecursively', function() {
- var columns = [
- {
- title: 'Single column',
- value: function(row) { return row.data; },
- width: '100px'
- }
- ];
-
- var rows = [
- {
- data: 'allocated',
- subRows: [
- {
- data: 'v8',
- subRows: []
- },
- {
- data: 'oilpan',
- subRows: [
- {
- data: 'still_visible',
- subRows: [
- {
- data: 'not_visible_any_more'
- }
- ]
- },
- {
- data: 'also_visible'
- }
- ]
- }
- ]
- },
- {
- data: 'no_sub_rows'
- },
- {
- data: 'fragmentation',
- subRows: [
- {
- data: 'internal'
- },
- {
- data: 'external',
- subRows: [
- {
- data: 'unexpanded'
- }
- ]
- }
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- expandTableRowsRecursively(table);
-
- function isExpanded(row) { return table.getExpandedForTableRow(row); }
-
- // Level 0 (3 rows) should be expanded (except for nodes which have no
- // sub-rows).
- assert.isTrue(isExpanded(rows[0] /* allocated */));
- assert.isFalse(isExpanded(rows[1] /* no_sub_rows */));
- assert.isTrue(isExpanded(rows[2] /* overhead */));
-
- // Level 1 (4 rows) should be expanded (except for nodes which have no
- // sub-rows).
- assert.isFalse(isExpanded(rows[0].subRows[0] /* allocated/v8 */));
- assert.isTrue(isExpanded(rows[0].subRows[1] /* allocated/oilpan */));
- assert.isFalse(isExpanded(rows[2].subRows[0] /* fragmentation/internal */));
- assert.isTrue(isExpanded(rows[2].subRows[1] /* fragmentation/external */));
-
- // Level 2 (3 rows) should not be expanded any more.
- assert.isFalse(isExpanded(
- rows[0].subRows[1].subRows[0] /* allocated/oilpan/still_visible */));
- assert.isFalse(isExpanded(
- rows[0].subRows[1].subRows[1] /* allocated/oilpan/also_visible */));
- assert.isFalse(isExpanded(
- rows[2].subRows[1].subRows[0] /* fragmentation/external/unexpanded */));
- });
-
- test('checkMemoryCell_extractFields', function() {
- assert.isUndefined(MemoryCell.extractFields(undefined));
-
- assert.isUndefined(MemoryCell.extractFields(new MemoryCell(undefined)));
-
- var fields = [new ScalarNumeric(sizeInBytes_smallerIsBetter, 1024)];
- assert.strictEqual(
- MemoryCell.extractFields(new MemoryCell(fields)), fields);
- });
-
- test('checkAggregateTableRowCellsRecursively', function() {
- var row = {
- testCells: {
- a: buildScalarCell(sizeInBytes_smallerIsBetter, [17])
- },
- subRows: [
- {
- // Intentionally no testCells.
- subRows: [
- {
- testCells: {
- b: buildScalarCell(sizeInBytes_smallerIsBetter, [103]),
- c: new MemoryCell(['should-not-propagate-upwards']),
- d: buildScalarCell(sizeInBytes_smallerIsBetter, [-200])
- }
- // Intentionally no subRows.
- },
- {
- testCells: {},
- subRows: []
- }
- ],
- contexts: ['skip-row-when-using-predicate']
- },
- {
- testCells: {
- b: buildScalarCell(sizeInBytes_smallerIsBetter, [20]),
- a: buildScalarCell(sizeInBytes_smallerIsBetter, [13]),
- e: buildScalarCell(sizeInBytes_smallerIsBetter, [-300])
- },
- contexts: ['don\'t-skip']
- }
- ]
- };
-
- // Without a predicate.
- var ca = new NumericMemoryColumn('column_a', ['testCells', 'a']);
- var cb = new NumericMemoryColumn('column_b', ['testCells', 'b']);
- var cc = new StringMemoryColumn('column_c', ['testCells', 'c']);
- aggregateTableRowCellsRecursively(row, [ca, cb, cc]);
- checkSizeNumericFields(row, ca, [17]);
- checkSizeNumericFields(row, cb, [123]);
- checkStringFields(row, cc, undefined);
-
- // With a predicate.
- var cd = new NumericMemoryColumn('column_d', ['testCells', 'd']);
- var ce = new NumericMemoryColumn('column_e', ['testCells', 'e']);
- aggregateTableRowCellsRecursively(row, [cd, ce], function(contexts) {
- return contexts === undefined || !contexts[0].startsWith('skip');
- });
- checkSizeNumericFields(row, cd, undefined);
- checkSizeNumericFields(row, ce, [-300]);
- });
-
- test('checkAggregateTableRowCells', function() {
- var row = {
- // Intentionally no testCells.
- otherCells: {
- a: buildScalarCell(tr.b.Unit.byName.unitlessNumber,
- [5, undefined, undefined])
- }
- };
- var subRows = [
- {
- testCells: {
- a: buildScalarCell(sizeInBytes_smallerIsBetter, [1, 9])
- },
- subRows: [
- {
- testCells: {
- c: buildScalarCell(sizeInBytes_smallerIsBetter, [13])
- }
- }
- ]
- },
- {
- testCells: {
- a: buildScalarCell(sizeInBytes_smallerIsBetter, [2, 17]),
- b: buildScalarCell(sizeInBytes_smallerIsBetter, [5])
- },
- otherCells: {
- a: buildScalarCell(tr.b.Unit.byName.unitlessNumber,
- [153, undefined, 257]),
- b: new MemoryCell(['field-should-not-propagate-upwards', ''])
- }
- }
- ];
-
- var cta = new NumericMemoryColumn('column_test_a', ['testCells', 'a']);
- var ctb = new NumericMemoryColumn('column_test_b', ['testCells', 'b']);
- var ctc = new NumericMemoryColumn('column_test_c', ['testCells', 'c']);
- var coa = new NumericMemoryColumn('column_other_a', ['otherCells', 'a']);
- var cob = new StringMemoryColumn('column_other_b', ['otherCells', 'b']);
-
- aggregateTableRowCells(row, subRows, [cta, ctb, ctc, coa, cob]);
-
- checkSizeNumericFields(row, cta, [3, 26]);
- checkSizeNumericFields(row, ctb, [5]);
- checkSizeNumericFields(row, ctc, undefined);
-
- checkNumericFields(row, coa, [5, undefined, 257],
- tr.b.Unit.byName.unitlessNumber);
- checkStringFields(row, cob, undefined);
- });
-
- test('checkCreateCells', function() {
- var values = [
- {
- a: 9,
- b: 314
- },
- {
- b: 159,
- c: undefined
- },
- undefined,
- {
- b: 265,
- d: 0
- }
- ];
-
- var mockColumn = new MemoryColumn('', [], undefined);
-
- var cells = createCells(values, function(dict) {
- var fields = {};
- tr.b.iterItems(dict, function(key, value) {
- if (value === undefined)
- return;
- fields[key] = new ScalarNumeric(sizeInBytes_smallerIsBetter, value);
- });
- return fields;
- });
- assert.deepEqual(Object.keys(cells), ['a', 'b', 'd']);
- checkSizeNumericFields(
- cells.a, mockColumn, [9, undefined, undefined, undefined]);
- checkSizeNumericFields(cells.b, mockColumn, [314, 159, undefined, 265]);
- checkSizeNumericFields(
- cells.d, mockColumn, [undefined, undefined, undefined, 0]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane.html
deleted file mode 100644
index fe7af81eb27..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane.html
+++ /dev/null
@@ -1,388 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<dom-module id='tr-ui-a-memory-dump-vm-regions-details-pane'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- #label {
- flex: 0 0 auto;
- padding: 8px;
-
- background-color: #eee;
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
-
- font-size: 15px;
- font-weight: bold;
- }
-
- #contents {
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- }
-
- #info_text {
- padding: 8px;
- color: #666;
- font-style: italic;
- text-align: center;
- }
-
- #table {
- display: none; /* Hide until memory dumps are set. */
- flex: 1 0 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <div id="label">Memory maps</div>
- <div id="contents">
- <div id="info_text">No memory maps selected</div>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var ScalarNumeric = tr.v.ScalarNumeric;
- var sizeInBytes_smallerIsBetter =
- tr.b.Unit.byName.sizeInBytes_smallerIsBetter;
-
- var CONSTANT_COLUMN_RULES = [
- {
- condition: 'Start address',
- importance: 0,
- columnConstructor: tr.ui.analysis.StringMemoryColumn
- }
- ];
-
- var VARIABLE_COLUMN_RULES = [
- {
- condition: 'Virtual size',
- importance: 7,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Protection flags',
- importance: 6,
- columnConstructor: tr.ui.analysis.StringMemoryColumn
- },
- {
- condition: 'PSS',
- importance: 5,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Private dirty',
- importance: 4,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Private clean',
- importance: 3,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Shared dirty',
- importance: 2,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Shared clean',
- importance: 1,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- },
- {
- condition: 'Swapped',
- importance: 0,
- columnConstructor: tr.ui.analysis.DetailsNumericMemoryColumn
- }
- ];
-
- var BYTE_STAT_COLUMN_MAP = {
- 'proportionalResident': 'PSS',
- 'privateDirtyResident': 'Private dirty',
- 'privateCleanResident': 'Private clean',
- 'sharedDirtyResident': 'Shared dirty',
- 'sharedCleanResident': 'Shared clean',
- 'swapped': 'Swapped'
- };
-
- function hexString(address, is64BitAddress) {
- if (address === undefined)
- return undefined;
- var hexPadding = is64BitAddress ? '0000000000000000' : '00000000';
- return (hexPadding + address.toString(16)).substr(-hexPadding.length);
- }
-
- function pruneEmptyRuleRows(row) {
- if (row.subRows === undefined || row.subRows.length === 0)
- return;
-
- // Either all sub-rows are rule rows, or all sub-rows are VM region rows.
- if (row.subRows[0].rule === undefined) {
- // VM region rows: Early out to avoid filtering a large array for
- // performance reasons (no sub-rows would be removed, but the whole array
- // would be unnecessarily copied to a new array).
- return;
- }
-
- row.subRows.forEach(pruneEmptyRuleRows);
- row.subRows = row.subRows.filter(function(subRow) {
- return subRow.subRows.length > 0;
- });
- }
-
- Polymer({
- is: 'tr-ui-a-memory-dump-vm-regions-details-pane',
- behaviors: [tr.ui.analysis.StackedPane],
-
- created: function() {
- this.vmRegions_ = undefined;
- this.aggregationMode_ = undefined;
- },
-
- ready: function() {
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- },
-
- /**
- * Sets the VM regions and schedules rebuilding the pane.
- *
- * The provided value should be a chronological list of lists of VM
- * regions. All VM regions are assumed to belong to the same process.
- * Example:
- *
- * [
- * [
- * // VM regions at timestamp 1.
- * tr.model.VMRegion {},
- * tr.model.VMRegion {},
- * tr.model.VMRegion {}
- * ],
- * undefined, // No VM regions provided at timestamp 2.
- * [
- * // VM regions at timestamp 3.
- * tr.model.VMRegion {},
- * tr.model.VMRegion {}
- * ]
- * ]
- */
- set vmRegions(vmRegions) {
- this.vmRegions_ = vmRegions;
- this.scheduleRebuild_();
- },
-
- get vmRegions() {
- return this.vmRegions_;
- },
-
- set aggregationMode(aggregationMode) {
- this.aggregationMode_ = aggregationMode;
- this.scheduleRebuild_();
- },
-
- get aggregationMode() {
- return this.aggregationMode_;
- },
-
- onRebuild_: function() {
- if (this.vmRegions_ === undefined || this.vmRegions_.length === 0) {
- // Show the info text (hide the table).
- this.$.info_text.style.display = 'block';
- this.$.table.style.display = 'none';
-
- this.$.table.clear();
- this.$.table.rebuild();
- return;
- }
-
- // Show the table (hide the info text).
- this.$.info_text.style.display = 'none';
- this.$.table.style.display = 'block';
-
- var rows = this.createRows_(this.vmRegions_);
- var columns = this.createColumns_(rows);
-
- // Note: There is no need to aggregate fields of the VM regions because
- // the classification tree already takes care of that.
-
- this.$.table.tableRows = rows;
- this.$.table.tableColumns = columns;
-
- // TODO(petrcermak): This can be quite slow. Consider doing this somehow
- // asynchronously.
- this.$.table.rebuild();
-
- tr.ui.analysis.expandTableRowsRecursively(this.$.table);
- },
-
- createRows_: function(timeToVmRegionTree) {
- // Determine if any start address is outside the 32-bit range.
- var is64BitAddress = timeToVmRegionTree.some(function(vmRegionTree) {
- if (vmRegionTree === undefined)
- return false;
- return vmRegionTree.someRegion(function(region) {
- if (region.startAddress === undefined)
- return false;
- return region.startAddress >= 4294967296 /* 2^32 */;
- });
- });
-
- return [
- this.createClassificationNodeRow(timeToVmRegionTree, is64BitAddress)
- ];
- },
-
- createClassificationNodeRow: function(timeToNode, is64BitAddress) {
- // Get any defined classification node so that we can extract the
- // properties which don't change over time.
- var definedNode = tr.b.findFirstInArray(timeToNode);
-
- // Child node ID (list index) -> Timestamp (list index) ->
- // VM region classification node.
- var childNodeIdToTimeToNode = tr.b.dictionaryValues(
- tr.b.invertArrayOfDicts(timeToNode, function(node) {
- var children = node.children;
- if (children === undefined)
- return undefined;
- var childMap = {};
- children.forEach(function(childNode) {
- if (!childNode.hasRegions)
- return;
- childMap[childNode.title] = childNode;
- });
- return childMap;
- }));
- var childNodeSubRows = childNodeIdToTimeToNode.map(
- function(timeToChildNode) {
- return this.createClassificationNodeRow(
- timeToChildNode, is64BitAddress);
- }, this);
-
- // Region ID (list index) -> Timestamp (list index) -> VM region.
- var regionIdToTimeToRegion = tr.b.dictionaryValues(
- tr.b.invertArrayOfDicts(timeToNode, function(node) {
- var regions = node.regions;
- if (regions === undefined)
- return undefined;
- return tr.b.arrayToDict(regions, function(region) {
- return region.uniqueIdWithinProcess;
- });
- }));
- var regionSubRows = regionIdToTimeToRegion.map(function(timeToRegion) {
- return this.createRegionRow_(timeToRegion, is64BitAddress);
- }, this);
-
- var subRows = childNodeSubRows.concat(regionSubRows);
-
- return {
- title: definedNode.title,
- contexts: timeToNode,
- variableCells: this.createVariableCells_(timeToNode),
- subRows: subRows
- };
- },
-
- createRegionRow_: function(timeToRegion, is64BitAddress) {
- // Get any defined VM region so that we can extract the properties which
- // don't change over time.
- var definedRegion = tr.b.findFirstInArray(timeToRegion);
-
- return {
- title: definedRegion.mappedFile,
- contexts: timeToRegion,
- constantCells: this.createConstantCells_(definedRegion, is64BitAddress),
- variableCells: this.createVariableCells_(timeToRegion)
- };
- },
-
- /**
- * Create cells for VM region properties which DON'T change over time.
- *
- * Note that there are currently no such properties of classification nodes.
- */
- createConstantCells_: function(definedRegion, is64BitAddress) {
- return tr.ui.analysis.createCells([definedRegion], function(region) {
- var startAddress = region.startAddress;
- if (startAddress === undefined)
- return undefined;
- return { 'Start address': hexString(startAddress, is64BitAddress) };
- });
- },
-
- /**
- * Create cells for VM region (classification node) properties which DO
- * change over time.
- */
- createVariableCells_: function(timeToRegion) {
- return tr.ui.analysis.createCells(timeToRegion, function(region) {
- var fields = {};
-
- var sizeInBytes = region.sizeInBytes;
- if (sizeInBytes !== undefined) {
- fields['Virtual size'] = new ScalarNumeric(
- sizeInBytes_smallerIsBetter, sizeInBytes);
- }
- var protectionFlags = region.protectionFlagsToString;
- if (protectionFlags !== undefined)
- fields['Protection flags'] = protectionFlags;
-
- tr.b.iterItems(BYTE_STAT_COLUMN_MAP,
- function(byteStatName, columnName) {
- var byteStat = region.byteStats[byteStatName];
- if (byteStat === undefined)
- return;
- fields[columnName] = new ScalarNumeric(
- sizeInBytes_smallerIsBetter, byteStat);
- });
-
- return fields;
- });
- },
-
- createColumns_: function(rows) {
- var titleColumn = new tr.ui.analysis.TitleColumn('Mapped file');
- titleColumn.width = '200px';
-
- var constantColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'constantCells',
- aggregationMode: undefined,
- rules: CONSTANT_COLUMN_RULES
- });
- var variableColumns = tr.ui.analysis.MemoryColumn.fromRows(rows, {
- cellKey: 'variableCells',
- aggregationMode: this.aggregationMode_,
- rules: VARIABLE_COLUMN_RULES
- });
- var fieldColumns = constantColumns.concat(variableColumns);
- tr.ui.analysis.MemoryColumn.spaceEqually(fieldColumns);
-
- var columns = [titleColumn].concat(fieldColumns);
- return columns;
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane_test.html
deleted file mode 100644
index abfd3b5c81e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/memory_dump_vm_regions_details_pane_test.html
+++ /dev/null
@@ -1,490 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
-<link rel="import" href="/tracing/ui/analysis/memory_dump_sub_view_util.html">
-<link rel="import"
- href="/tracing/ui/analysis/memory_dump_vm_regions_details_pane.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var TitleColumn = tr.ui.analysis.TitleColumn;
- var StringMemoryColumn = tr.ui.analysis.StringMemoryColumn;
- var NumericMemoryColumn = tr.ui.analysis.NumericMemoryColumn;
- var AggregationMode = tr.ui.analysis.MemoryColumn.AggregationMode;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var checkSizeNumericFields = tr.ui.analysis.checkSizeNumericFields;
- var checkStringFields = tr.ui.analysis.checkStringFields;
- var checkColumns = tr.ui.analysis.checkColumns;
- var isElementDisplayed = tr.ui.analysis.isElementDisplayed;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
-
- function createVMRegions() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
-
- // First timestamp.
- var gmd1 = addGlobalMemoryDump(model, {ts: 42, levelOfDetail: DETAILED});
- var pmd1 = addProcessMemoryDump(gmd1, process, {ts: 42});
- pmd1.vmRegions = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- mappedFile: '/lib/chrome.so',
- startAddress: 65536,
- sizeInBytes: 536870912,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 8192
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0',
- startAddress: 140296983150592,
- sizeInBytes: 2097152,
- protectionFlags: 0,
- byteStats: {
- proportionalResident: 0
- }
- }),
- VMRegion.fromDict({
- startAddress: 10995116277760,
- sizeInBytes: 2147483648,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- byteStats: {
- privateDirtyResident: 0,
- swapped: 0
- }
- }),
- VMRegion.fromDict({
- startAddress: 12094627905536,
- sizeInBytes: 2147483648,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- byteStats: {
- privateDirtyResident: 0,
- swapped: 0
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/dev/ashmem/dalvik-zygote space',
- startAddress: 13194139533312,
- sizeInBytes: 100,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 100,
- privateDirtyResident: 0,
- swapped: 0
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/dev/ashmem/libc malloc',
- startAddress: 14293651161088,
- sizeInBytes: 200,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 200,
- privateDirtyResident: 96,
- swapped: 0
- }
- })
- ]);
-
- // This is here so that we could test that tracing is discounted from the
- // 'Native heap' category.
- pmd1.memoryAllocatorDumps = [
- newAllocatorDump(pmd1, 'tracing',
- {numerics: {size: 500, resident_size: 32}})
- ];
-
- // Second timestamp.
- var gmd2 = addGlobalMemoryDump(model, {ts: 42, levelOfDetail: DETAILED});
- var pmd2 = addProcessMemoryDump(gmd2, process, {ts: 42});
- pmd2.vmRegions = VMRegionClassificationNode.fromRegions([
- VMRegion.fromDict({
- mappedFile: '/lib/chrome.so',
- startAddress: 65536,
- sizeInBytes: 536870912,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 9216
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/lib/chrome.so',
- startAddress: 140296983150592,
- sizeInBytes: 536870912,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 10240
- }
- }),
- VMRegion.fromDict({
- startAddress: 10995116277760,
- sizeInBytes: 2147483648,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- byteStats: {
- privateDirtyResident: 0,
- swapped: 32
- }
- }),
- VMRegion.fromDict({
- startAddress: 12094627905536,
- sizeInBytes: 2147483648,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_WRITE,
- byteStats: {
- privateDirtyResident: 0,
- swapped: 0
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/dev/ashmem/dalvik-zygote space',
- startAddress: 13194139533312,
- sizeInBytes: 100,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 0,
- privateDirtyResident: 100,
- swapped: 0
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/dev/ashmem/libc malloc',
- startAddress: 14293651161088,
- sizeInBytes: 200,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ |
- VMRegion.PROTECTION_FLAG_EXECUTE,
- byteStats: {
- proportionalResident: 100,
- privateDirtyResident: 96,
- swapped: 0
- }
- }),
- VMRegion.fromDict({
- mappedFile: '/usr/share/fonts/DejaVuSansMono.ttf',
- startAddress: 140121259503616,
- sizeInBytes: 335872,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ,
- byteStats: {
- proportionalResident: 22528
- }
- }),
- VMRegion.fromDict({
- mappedFile: 'another-map',
- startAddress: 52583094233905872,
- sizeInBytes: 1,
- byteStats: {
- proportionalResident: 1,
- privateDirtyResident: 1,
- swapped: 1
- }
- })
- ]);
- });
-
- return model.processes[1].memoryDumps.map(function(pmd) {
- return pmd.mostRecentVmRegions;
- });
- }
-
- var EXPECTED_COLUMNS = [
- { title: 'Mapped file', type: TitleColumn, noAggregation: true },
- { title: 'Start address', type: StringMemoryColumn, noAggregation: true },
- { title: 'Virtual size', type: NumericMemoryColumn },
- { title: 'Protection flags', type: StringMemoryColumn },
- { title: 'PSS', type: NumericMemoryColumn },
- { title: 'Private dirty', type: NumericMemoryColumn },
- { title: 'Swapped', type: NumericMemoryColumn }
- ];
-
- function checkRow(columns, row, expectedTitle, expectedStartAddress,
- expectedVirtualSize, expectedProtectionFlags,
- expectedProportionalResidentValues, expectedPrivateDirtyResidentValues,
- expectedSwappedValues, expectedSubRowCount, expectedContexts) {
- assert.equal(columns[0].formatTitle(row), expectedTitle);
- checkStringFields(row, columns[1], expectedStartAddress);
- checkSizeNumericFields(row, columns[2], expectedVirtualSize);
- checkStringFields(row, columns[3], expectedProtectionFlags);
- checkSizeNumericFields(row, columns[4], expectedProportionalResidentValues);
- checkSizeNumericFields(row, columns[5], expectedPrivateDirtyResidentValues);
- checkSizeNumericFields(row, columns[6], expectedSwappedValues);
-
- if (expectedSubRowCount === undefined)
- assert.isUndefined(row.subRows);
- else
- assert.lengthOf(row.subRows, expectedSubRowCount);
-
- if (typeof expectedContexts === 'function')
- expectedContexts(row.contexts);
- else if (expectedContexts !== undefined)
- assert.deepEqual(tr.b.asArray(row.contexts), expectedContexts);
- else
- assert.isUndefined(row.contexts);
- }
-
- function genericMatcher(callback, defined) {
- return function(actualValues) {
- assert.lengthOf(actualValues, defined.length);
- for (var i = 0; i < defined.length; i++) {
- var actualValue = actualValues[i];
- if (defined[i])
- callback(actualValue);
- else
- assert.isUndefined(actualValue);
- }
- }
- }
-
- function vmRegionsMatcher(expectedMappedFile, expectedStartAddress, defined) {
- return genericMatcher(function(actualRegion) {
- assert.instanceOf(actualRegion, VMRegion);
- assert.strictEqual(actualRegion.mappedFile, expectedMappedFile);
- assert.strictEqual(actualRegion.startAddress, expectedStartAddress);
- }, defined);
- }
-
- function classificationNodesMatcher(expectedTitle, defined) {
- return genericMatcher(function(actualNode) {
- assert.instanceOf(actualNode, VMRegionClassificationNode);
- assert.strictEqual(actualNode.title, expectedTitle);
- }, defined);
- }
-
- test('instantiate_empty', function() {
- tr.ui.analysis.createAndCheckEmptyPanes(this,
- 'tr-ui-a-memory-dump-vm-regions-details-pane', 'vmRegions',
- function(viewEl) {
- // Check that the info text is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.info_text));
- assert.isFalse(isElementDisplayed(viewEl.$.table));
- });
- });
-
- test('instantiate_single', function() {
- var vmRegions = createVMRegions().slice(0, 1);
-
- var viewEl = document.createElement(
- 'tr-ui-a-memory-dump-vm-regions-details-pane');
- viewEl.vmRegions = vmRegions;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, undefined /* no aggregation */);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
-
- // Check the rows of the table.
- var totalRow = rows[0];
- checkRow(columns, totalRow, 'Total', undefined, [4833935160], undefined,
- [8460], [64], [0], 3, vmRegions);
-
- var androidRow = totalRow.subRows[0];
- checkRow(columns, androidRow, 'Android', undefined, [100], undefined,
- [100], [0], [0], 1, classificationNodesMatcher('Android', [true]));
-
- var javaRuntimeRow = androidRow.subRows[0];
- checkRow(columns, javaRuntimeRow, 'Java runtime', undefined, [100],
- undefined, [100], [0], [0], 1,
- classificationNodesMatcher('Java runtime', [true]));
-
- var spacesRow = javaRuntimeRow.subRows[0];
- checkRow(columns, spacesRow, 'Spaces', undefined, [100], undefined, [100],
- [0], [0], 1, classificationNodesMatcher('Spaces', [true]));
-
- var nativeHeapRow = totalRow.subRows[1];
- checkRow(columns, nativeHeapRow, 'Native heap', undefined, [4294966996],
- undefined, [168], [64], [0], 4,
- classificationNodesMatcher('Native heap', [true]));
-
- var discountedTracingOverheadRow = nativeHeapRow.subRows[3];
- checkRow(columns, discountedTracingOverheadRow,
- '[discounted tracing overhead]', undefined, [-500], undefined, [-32],
- [-32], undefined, undefined,
- vmRegionsMatcher('[discounted tracing overhead]', undefined, [true]));
-
- var filesRow = totalRow.subRows[2];
- checkRow(columns, filesRow, 'Files', undefined, [538968064], undefined,
- [8192], undefined, undefined, 1,
- classificationNodesMatcher('Files', [true]));
-
- var soRow = filesRow.subRows[0];
- checkRow(columns, soRow, 'so', undefined, [538968064], undefined,
- [8192], undefined, undefined, 2,
- classificationNodesMatcher('so', [true]));
-
- var mmapChromeRow = soRow.subRows[0];
- checkRow(columns, mmapChromeRow, '/lib/chrome.so', ['0000000000010000'],
- [536870912], ['r-xp'], [8192], undefined, undefined, undefined,
- vmRegionsMatcher('/lib/chrome.so', 65536, [true]));
-
- var mmapLibX11Row = soRow.subRows[1];
- checkRow(columns, mmapLibX11Row,
- '/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0', ['00007f996fd80000'],
- [2097152], ['---p'], [0], undefined, undefined, undefined,
- vmRegionsMatcher('/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0',
- 140296983150592, [true]));
- });
-
- test('instantiate_multipleDiff', function() {
- var vmRegions = createVMRegions();
-
- var viewEl = document.createElement(
- 'tr-ui-a-memory-dump-vm-regions-details-pane');
- viewEl.vmRegions = vmRegions;
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.DIFF);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
-
- // Check the rows of the table.
- var totalRow = rows[0];
- checkRow(columns, totalRow, 'Total', undefined, [4833935160, 5369045293],
- undefined, [8460, 42085], [64, 197], [0, 33], 4, vmRegions);
-
- var androidRow = totalRow.subRows[0];
- checkRow(columns, androidRow, 'Android', undefined, [100, 100], undefined,
- [100, 0], [0, 100], [0, 0], 1,
- classificationNodesMatcher('Android', [true, true]));
-
- var javaRuntimeRow = androidRow.subRows[0];
- checkRow(columns, javaRuntimeRow, 'Java runtime', undefined, [100, 100],
- undefined, [100, 0], [0, 100], [0, 0], 1,
- classificationNodesMatcher('Java runtime', [true, true]));
-
- var spacesRow = javaRuntimeRow.subRows[0];
- checkRow(columns, spacesRow, 'Spaces', undefined, [100, 100], undefined,
- [100, 0], [0, 100], [0, 0], 1,
- classificationNodesMatcher('Spaces', [true, true]));
-
- var nativeHeapRow = totalRow.subRows[1];
- checkRow(columns, nativeHeapRow, 'Native heap', undefined,
- [4294966996, 4294967496], undefined, [168, 100], [64, 96], [0, 32], 4,
- classificationNodesMatcher('Native heap', [true, true]));
-
- var discountedTracingOverheadRow = nativeHeapRow.subRows[3];
- checkRow(columns, discountedTracingOverheadRow,
- '[discounted tracing overhead]', undefined, [-500, undefined],
- undefined, [-32, undefined], [-32, undefined], undefined, undefined,
- vmRegionsMatcher('[discounted tracing overhead]', undefined,
- [true, false]));
-
- var filesRow = totalRow.subRows[2];
- checkRow(columns, filesRow, 'Files', undefined, [538968064, 1074077696],
- undefined, [8192, 41984], undefined, undefined, 2,
- classificationNodesMatcher('Files', [true, true]));
-
- var soRow = filesRow.subRows[0];
- checkRow(columns, soRow, 'so', undefined, [538968064, 1073741824],
- undefined, [8192, 19456], undefined, undefined, 3,
- classificationNodesMatcher('so', [true, true]));
-
- var mmapChromeRow = soRow.subRows[0];
- checkRow(columns, mmapChromeRow, '/lib/chrome.so', ['0000000000010000'],
- [536870912, 536870912], ['r-xp', 'r-xp'], [8192, 9216], undefined,
- undefined, undefined,
- vmRegionsMatcher('/lib/chrome.so', 65536, [true, true]));
-
- var mmapLibX11Row = soRow.subRows[1];
- checkRow(columns, mmapLibX11Row,
- '/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0', ['00007f996fd80000'],
- [2097152, undefined], ['---p', undefined], [0, undefined], undefined,
- undefined, undefined,
- vmRegionsMatcher('/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0',
- 140296983150592, [true, false]));
-
- var otherRow = totalRow.subRows[3];
- checkRow(columns, otherRow, 'Other', undefined, [undefined, 1], undefined,
- [undefined, 1], [undefined, 1], [undefined, 1], 1,
- classificationNodesMatcher('Other', [false, true]));
-
- var anotherMapRow = otherRow.subRows[0];
- checkRow(columns, anotherMapRow, 'another-map', ['00bad00bad00bad0'],
- [undefined, 1], undefined, [undefined, 1], [undefined, 1],
- [undefined, 1], undefined,
- vmRegionsMatcher('another-map', 52583094233905872, [false, true]));
- });
-
- test('instantiate_multipleMax', function() {
- var vmRegions = createVMRegions();
-
- var viewEl = document.createElement(
- 'tr-ui-a-memory-dump-vm-regions-details-pane');
- viewEl.vmRegions = vmRegions;
- viewEl.aggregationMode = AggregationMode.MAX;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- // Just check that the aggregation mode was propagated to the columns.
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.MAX);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
- });
-
- test('instantiate_multipleWithUndefined', function() {
- var vmRegions = createVMRegions();
- vmRegions.splice(1, 0, undefined);
-
- var viewEl = document.createElement(
- 'tr-ui-a-memory-dump-vm-regions-details-pane');
- viewEl.vmRegions = vmRegions;
- viewEl.aggregationMode = AggregationMode.DIFF;
- viewEl.rebuild();
- this.addHTMLOutput(viewEl);
-
- // Check that the table is shown.
- assert.isTrue(isElementDisplayed(viewEl.$.table));
- assert.isFalse(isElementDisplayed(viewEl.$.info_text));
-
- // Just check that the table has the right shape.
- var table = viewEl.$.table;
- var columns = table.tableColumns;
- checkColumns(columns, EXPECTED_COLUMNS, AggregationMode.DIFF);
- var rows = table.tableRows;
- assert.lengthOf(rows, 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view.html
deleted file mode 100644
index d97043e9ef3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/related_events.html">
-
-<dom-module id='tr-ui-a-multi-async-slice-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #container {
- display: flex;
- flex: 1 1 auto;
- }
- #events {
- margin-left: 8px;
- flex: 0 1 200px;
- }
- </style>
- <div id="container">
- <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
- <div id="events">
- <tr-ui-a-related-events id="relatedEvents"></tr-ui-a-related-events>
- </div>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-async-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.content.selection = selection;
- this.$.relatedEvents.setRelatedEvents(selection);
- if (this.$.relatedEvents.hasRelatedEvents()) {
- this.$.relatedEvents.style.display = '';
- } else {
- this.$.relatedEvents.style.display = 'none';
- }
- },
-
- get relatedEventsToHighlight() {
- if (!this.$.content.selection)
- return undefined;
- var selection = new tr.model.EventSet();
- this.$.content.selection.forEach(function(asyncEvent) {
- if (!asyncEvent.associatedEvents)
- return;
- asyncEvent.associatedEvents.forEach(function(event) {
- selection.push(event);
- });
- });
- if (selection.length)
- return selection;
- return undefined;
- }
-});
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-async-slice-sub-view',
- tr.model.AsyncSlice,
- {
- multi: true,
- title: 'Async Slices',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view_test.html
deleted file mode 100644
index f3db7675156..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_async_slice_sub_view_test.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/multi_async_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newAsyncSliceEx = tr.c.TestUtils.newAsyncSliceEx;
-
- test('instantiate', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.asyncSliceGroup.push(newAsyncSliceEx({
- title: 'a',
- start: 10,
- end: 20,
- startThread: t1,
- endThread: t1
- }));
- t1.asyncSliceGroup.push(newAsyncSliceEx({
- title: 'b',
- start: 25,
- end: 40,
- startThread: t1,
- endThread: t1
- }));
-
- var selection = new tr.model.EventSet();
- selection.push(t1.asyncSliceGroup.slices[0]);
- selection.push(t1.asyncSliceGroup.slices[1]);
-
- var viewEl = document.createElement('tr-ui-a-multi-async-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view.html
deleted file mode 100644
index ee061a58271..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-
-<dom-module id='tr-ui-a-multi-cpu-slice-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #content {
- flex: 1 1 auto;
- }
- </style>
- <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-cpu-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.$.content.eventsHaveSubRows = false;
- },
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.content.setSelectionWithoutErrorChecks(selection);
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-cpu-slice-sub-view',
- tr.model.CpuSlice,
- {
- multi: true,
- title: 'CPU Slices',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view_test.html
deleted file mode 100644
index b0f8eb266a2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_cpu_slice_sub_view_test.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/multi_cpu_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createBasicModel() {
- var lines = [
- 'Android.launcher-584 [001] d..3 12622.506890: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D ==> next_comm=Android.launcher next_pid=584 next_prio=120', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..4 12622.506936: sched_wakeup: comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..3 12622.506950: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: B|128|queueBuffer', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ==> next_comm=Android.launcher next_pid=584 next_prio=120' // @suppress longLineCheck
- ];
-
- return tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- }
-
- test('instantiate', function() {
- var m = createBasicModel();
- var cpu = m.kernel.cpus[1];
- assert.isDefined(cpu);
-
- var selection = new tr.model.EventSet();
- selection.push(cpu.slices[0]);
- selection.push(cpu.slices[1]);
-
- var viewEl = document.createElement('tr-ui-a-multi-cpu-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view.html
deleted file mode 100644
index c134f16c57c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_summary_table.html">
-<link rel="import" href="/tracing/ui/analysis/selection_summary_table.html">
-<link rel="import" href="/tracing/ui/base/radio_picker.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/value/diagnostics/scalar.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<dom-module id='tr-ui-a-multi-event-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- overflow: auto;
- }
- #content {
- display: flex;
- flex-direction: column;
- flex: 0 1 auto;
- align-self: stretch;
- }
- #content > * {
- flex: 0 0 auto;
- align-self: stretch;
- }
- #histogramContainer {
- display: flex;
- }
-
- tr-ui-a-multi-event-summary-table {
- border-bottom: 1px solid #aaa;
- }
-
- tr-ui-a-selection-summary-table {
- margin-top: 1.25em;
- border-top: 1px solid #aaa;
- background-color: #eee;
- font-weight: bold;
- margin-bottom: 1.25em;
- border-bottom: 1px solid #aaa;
- }
- </style>
- <div id="content">
- <tr-ui-a-multi-event-summary-table id="eventSummaryTable">
- </tr-ui-a-multi-event-summary-table>
- <tr-ui-a-selection-summary-table id="selectionSummaryTable">
- </tr-ui-a-selection-summary-table>
- <tr-ui-b-radio-picker id="radioPicker">
- </tr-ui-b-radio-picker>
- <div id="histogramContainer">
- <tr-v-ui-histogram-span id="histogramSpan">
- </tr-v-ui-histogram-span>
- </div>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- var EVENT_FIELD = [
- {key: 'start', label: 'Start'},
- {key: 'cpuDuration', label: 'CPU Duration'},
- {key: 'duration', label: 'Duration'},
- {key: 'cpuSelfTime', label: 'CPU Self Time'},
- {key: 'selfTime', label: 'Self Time'}
- ];
-
- function buildDiagnostics_(slice, selectedKey) {
- var diagnostics = {};
- for (var item of EVENT_FIELD) {
- var fieldName = item.key;
- if (fieldName === selectedKey || slice[fieldName] === undefined)
- continue;
- diagnostics[fieldName] = new tr.v.d.Scalar(new tr.v.ScalarNumeric(
- tr.b.Unit.byName.timeDurationInMs, slice[fieldName]));
- }
- diagnostics['args'] = new tr.v.d.Generic(slice.args);
- diagnostics['event'] = new tr.v.d.RelatedEventSet(slice);
- return diagnostics;
- }
-
- Polymer({
- is: 'tr-ui-a-multi-event-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- this.eventsHaveDuration_ = true;
- this.eventsHaveSubRows_ = true;
- },
-
- ready: function() {
- this.$.radioPicker.style.display = 'none';
- this.$.radioPicker.items = EVENT_FIELD;
- this.$.radioPicker.select('cpuSelfTime');
- this.$.radioPicker.addEventListener('change', function(e) {
- this.$.histogramSpan.histogram =
- this.buildHistogram_(e.target.selectedKey);
- }.bind(this));
-
- this.$.histogramSpan.chartWidth = 400;
- this.$.histogramContainer.style.display = 'none';
- },
-
- set selection(selection) {
- if (selection.length <= 1)
- throw new Error('Only supports multiple items');
- this.setSelectionWithoutErrorChecks(selection);
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- setSelectionWithoutErrorChecks: function(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- get eventsHaveDuration() {
- return this.eventsHaveDuration_;
- },
-
- set eventsHaveDuration(eventsHaveDuration) {
- this.eventsHaveDuration_ = eventsHaveDuration;
- this.updateContents_();
- },
-
- get eventsHaveSubRows() {
- return this.eventsHaveSubRows_;
- },
-
- set eventsHaveSubRows(eventsHaveSubRows) {
- this.eventsHaveSubRows_ = eventsHaveSubRows;
- this.updateContents_();
- },
-
- buildHistogram_: function(selectedKey) {
- var leftBoundary = Number.MAX_VALUE;
- var rightBoundary = tr.b.Statistics.percentile(
- this.currentSelection_, 0.95,
- function(value) {
- leftBoundary = Math.min(leftBoundary, value[selectedKey]);
- return value[selectedKey];
- });
-
- if (leftBoundary === rightBoundary) rightBoundary += 1;
- var histogram = new tr.v.Histogram(
- '',
- tr.b.Unit.byName.timeDurationInMs,
- tr.v.HistogramBinBoundaries.createLinear(
- leftBoundary, rightBoundary,
- Math.ceil(Math.sqrt(this.currentSelection_.length))));
- histogram.customizeSummaryOptions({sum: false});
- for (var slice of this.currentSelection_) {
- histogram.addSample(slice[selectedKey],
- buildDiagnostics_(slice, selectedKey));
- }
-
- return histogram;
- },
-
- updateContents_: function() {
- var selection = this.currentSelection_;
-
- if (!selection)
- return;
-
- var eventsByTitle = selection.getEventsOrganizedByTitle();
- var numTitles = tr.b.dictionaryLength(eventsByTitle);
-
- this.$.eventSummaryTable.configure({
- showTotals: numTitles > 1,
- eventsByTitle: eventsByTitle,
- eventsHaveDuration: this.eventsHaveDuration_,
- eventsHaveSubRows: this.eventsHaveSubRows_
- });
-
- this.$.selectionSummaryTable.selection = this.currentSelection_;
-
- if (numTitles === 1) {
- this.$.radioPicker.style.display = 'block';
- this.$.histogramSpan.histogram =
- this.buildHistogram_(this.$.radioPicker.selectedKey);
- this.$.histogramContainer.style.display = 'flex';
- } else {
- this.$.radioPicker.style.display = 'none';
- this.$.histogramContainer.style.display = 'none';
- }
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view_test.html
deleted file mode 100644
index c47543d1dac..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_sub_view_test.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var Thread = tr.model.Thread;
- var EventSet = tr.model.EventSet;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('differentTitles', function() {
- var model = new Model();
- var t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- t53.sliceGroup.pushSlice(newSliceEx(
- {title: 'a', start: 0.0, duration: 0.04}));
- t53.sliceGroup.pushSlice(newSliceEx(
- {title: 'a', start: 0.12, duration: 0.06}));
- t53.sliceGroup.pushSlice(newSliceEx(
- {title: 'aa', start: 0.5, duration: 0.5}));
- t53.sliceGroup.createSubSlices();
-
- var t53track = {};
- t53track.thread = t53;
-
- var selection = new EventSet();
- selection.push(t53.sliceGroup.slices[0]);
- selection.push(t53.sliceGroup.slices[1]);
- selection.push(t53.sliceGroup.slices[2]);
-
- var viewEl = document.createElement('tr-ui-a-multi-event-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
-
- var summaryTableEl = tr.b.findDeepElementMatching(
- viewEl, 'tr-ui-a-multi-event-summary-table');
- assert.isTrue(summaryTableEl.showTotals);
- assert.equal(tr.b.dictionaryLength(summaryTableEl.eventsByTitle), 2);
-
- var selectionSummaryTableEl = tr.b.findDeepElementMatching(
- viewEl, 'tr-ui-a-selection-summary-table');
- assert.equal(selectionSummaryTableEl.selection, selection);
-
- var radioPickerEl =
- tr.b.findDeepElementMatching(viewEl, 'tr-ui-b-radio-picker');
- assert.equal(radioPickerEl.style.display, 'none');
- });
-
- test('sameTitles', function() {
- var model = new Model();
- var t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- t53.sliceGroup.pushSlice(newSliceEx(
- {title: 'c', start: 0.0, duration: 0.04}));
- t53.sliceGroup.pushSlice(newSliceEx(
- {title: 'c', start: 0.12, duration: 0.06}));
- t53.sliceGroup.createSubSlices();
-
- var t53track = {};
- t53track.thread = t53;
-
- var selection = new EventSet();
- selection.push(t53.sliceGroup.slices[0]);
- selection.push(t53.sliceGroup.slices[1]);
-
- var viewEl = document.createElement('tr-ui-a-multi-event-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
-
- var summaryTableEl = tr.b.findDeepElementMatching(
- viewEl, 'tr-ui-a-multi-event-summary-table');
- assert.isFalse(summaryTableEl.showTotals);
- assert.equal(tr.b.dictionaryLength(summaryTableEl.eventsByTitle), 1);
-
- var selectionSummaryTableEl = tr.b.findDeepElementMatching(
- viewEl, 'tr-ui-a-selection-summary-table');
- assert.equal(selectionSummaryTableEl.selection, selection);
-
- var radioPickerEl =
- tr.b.findDeepElementMatching(viewEl, 'tr-ui-b-radio-picker');
- assert.equal(radioPickerEl.style.display, 'block');
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary.html
deleted file mode 100644
index 9b03bf7e090..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/statistics.html">
-
-<script>
-'use strict';
-tr.exportTo('tr.ui.analysis', function() {
- function MultiEventSummary(title, events) {
- this.title = title;
- this.duration_ = undefined;
- this.selfTime_ = undefined;
- this.events_ = events;
-
- this.cpuTimesComputed_ = false;
- this.cpuSelfTime_ = undefined;
- this.cpuDuration_ = undefined;
-
- this.maxDuration_ = undefined;
- this.maxCpuDuration_ = undefined;
- this.maxSelfTime_ = undefined;
- this.maxCpuSelfTime_ = undefined;
-
- this.untotallableArgs_ = [];
- this.totalledArgs_ = undefined;
- }
- MultiEventSummary.prototype = {
-
- set title(title) {
- if (title === 'Totals')
- this.totalsRow = true;
- this.title_ = title;
- },
-
- get title() {
- return this.title_;
- },
-
- get duration() {
- if (this.duration_ === undefined) {
- this.duration_ = tr.b.Statistics.sum(
- this.events_, function(event) {
- return event.duration;
- });
- }
- return this.duration_;
- },
-
- get cpuSelfTime() {
- this.computeCpuTimesIfNeeded_();
- return this.cpuSelfTime_;
- },
-
- get cpuDuration() {
- this.computeCpuTimesIfNeeded_();
- return this.cpuDuration_;
- },
-
- computeCpuTimesIfNeeded_: function() {
- if (this.cpuTimesComputed_)
- return;
- this.cpuTimesComputed_ = true;
-
- var cpuSelfTime = 0;
- var cpuDuration = 0;
- var hasCpuData = false;
- for (var event of this.events_) {
- if (event.cpuDuration !== undefined) {
- cpuDuration += event.cpuDuration;
- hasCpuData = true;
- }
-
- if (event.cpuSelfTime !== undefined) {
- cpuSelfTime += event.cpuSelfTime;
- hasCpuData = true;
- }
- }
- if (hasCpuData) {
- this.cpuDuration_ = cpuDuration;
- this.cpuSelfTime_ = cpuSelfTime;
- }
- },
-
- get selfTime() {
- if (this.selfTime_ === undefined) {
- this.selfTime_ = 0;
- for (var event of this.events_)
- if (event.selfTime !== undefined)
- this.selfTime_ += event.selfTime;
- }
- return this.selfTime_;
- },
-
- get events() {
- return this.events_;
- },
-
- get numEvents() {
- return this.events_.length;
- },
-
- get numAlerts() {
- if (this.numAlerts_ === undefined) {
- this.numAlerts_ = tr.b.Statistics.sum(this.events_, function(event) {
- return event.associatedAlerts.length;
- });
- }
- return this.numAlerts_;
- },
-
- get untotallableArgs() {
- this.updateArgsIfNeeded_();
- return this.untotallableArgs_;
- },
-
- get totalledArgs() {
- this.updateArgsIfNeeded_();
- return this.totalledArgs_;
- },
-
-
- get maxDuration() {
- if (this.maxDuration_ === undefined) {
- this.maxDuration_ = tr.b.Statistics.max(
- this.events_, function(event) {
- return event.duration;
- });
- }
- return this.maxDuration_;
- },
-
-
- get maxCpuDuration() {
- if (this.maxCpuDuration_ === undefined) {
- this.maxCpuDuration_ = tr.b.Statistics.max(
- this.events_, function(event) {
- return event.cpuDuration;
- });
- }
- return this.maxCpuDuration_;
- },
-
-
- get maxSelfTime() {
- if (this.maxSelfTime_ === undefined) {
- this.maxSelfTime_ = tr.b.Statistics.max(
- this.events_, function(event) {
- return event.selfTime;
- });
- }
- return this.maxSelfTime_;
- },
-
-
- get maxCpuSelfTime() {
- if (this.maxCpuSelfTime_ === undefined) {
- this.maxCpuSelfTime_ = tr.b.Statistics.max(
- this.events_, function(event) {
- return event.cpuSelfTime;
- });
- }
- return this.maxCpuSelfTime_;
- },
-
-
- updateArgsIfNeeded_: function() {
- if (this.totalledArgs_ !== undefined)
- return;
-
- var untotallableArgs = {};
- var totalledArgs = {};
- for (var event of this.events_) {
- for (var argName in event.args) {
- var argVal = event.args[argName];
- var type = typeof argVal;
- if (type !== 'number') {
- untotallableArgs[argName] = true;
- delete totalledArgs[argName];
- continue;
- }
- if (untotallableArgs[argName]) {
- continue;
- }
-
- if (totalledArgs[argName] === undefined)
- totalledArgs[argName] = 0;
- totalledArgs[argName] += argVal;
- }
- }
- this.untotallableArgs_ = tr.b.dictionaryKeys(untotallableArgs);
- this.totalledArgs_ = totalledArgs;
- }
- };
-
- return {
- MultiEventSummary: MultiEventSummary
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table.html
deleted file mode 100644
index 290ce0cfcb4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table.html
+++ /dev/null
@@ -1,351 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_summary.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-multi-event-summary-table'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table">
- </tr-ui-b-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-event-summary-table',
-
- ready: function() {
- this.showTotals_ = false;
- this.eventsHaveDuration_ = true;
- this.eventsHaveSubRows_ = true;
- this.eventsByTitle_ = undefined;
- },
-
- updateTableColumns_: function(rows, maxValues) {
- var hasCpuData = false;
- var hasAlerts = false;
- rows.forEach(function(row) {
- if (row.cpuDuration !== undefined)
- hasCpuData = true;
- if (row.cpuSelfTime !== undefined)
- hasCpuData = true;
- if (row.numAlerts)
- hasAlerts = true;
- });
-
- var ownerDocument = this.ownerDocument;
-
- var columns = [];
-
- columns.push({
- title: 'Name',
- value: function(row) {
- if (row.title === 'Totals')
- return 'Totals';
-
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(function() {
- return new tr.model.EventSet(row.events);
- }, row.title);
- return linkEl;
- },
- width: '350px',
- cmp: function(rowA, rowB) {
- return rowA.title.localeCompare(rowB.title);
- }
- });
- if (this.eventsHaveDuration_) {
- columns.push({
- title: 'Wall Duration',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.duration, {
- unit: tr.b.Unit.byName.timeDurationInMs,
- customContextRange: row.totalsRow ? undefined :
- tr.b.Range.fromExplicitRange(0, maxValues.duration),
- ownerDocument: ownerDocument,
- rightAlign: true
- });
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- return rowA.duration - rowB.duration;
- }
- });
- }
-
- if (this.eventsHaveDuration_ && hasCpuData) {
- columns.push({
- title: 'CPU Duration',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.cpuDuration, {
- unit: tr.b.Unit.byName.timeDurationInMs,
- customContextRange: row.totalsRow ? undefined :
- tr.b.Range.fromExplicitRange(0, maxValues.cpuDuration),
- ownerDocument: ownerDocument,
- rightAlign: true
- });
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- return rowA.cpuDuration - rowB.cpuDuration;
- }
- });
- }
-
- if (this.eventsHaveSubRows_ && this.eventsHaveDuration_) {
- columns.push({
- title: 'Self time',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.selfTime, {
- unit: tr.b.Unit.byName.timeDurationInMs,
- customContextRange: row.totalsRow ? undefined :
- tr.b.Range.fromExplicitRange(0, maxValues.selfTime),
- ownerDocument: ownerDocument,
- rightAlign: true
- });
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- return rowA.selfTime - rowB.selfTime;
- }
- });
- }
-
- if (this.eventsHaveSubRows_ && this.eventsHaveDuration_ && hasCpuData) {
- columns.push({
- title: 'CPU Self Time',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.cpuSelfTime, {
- unit: tr.b.Unit.byName.timeDurationInMs,
- customContextRange: row.totalsRow ? undefined :
- tr.b.Range.fromExplicitRange(0, maxValues.cpuSelfTime),
- ownerDocument: ownerDocument,
- rightAlign: true
- });
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- return rowA.cpuSelfTime - rowB.cpuSelfTime;
- }
- });
- }
-
- if (this.eventsHaveDuration_) {
- columns.push({
- title: 'Average ' + (hasCpuData ? 'CPU' : 'Wall') + ' Duration',
- value: function(row) {
- var totalDuration = hasCpuData ? row.cpuDuration : row.duration;
- return tr.v.ui.createScalarSpan(totalDuration / row.numEvents, {
- unit: tr.b.Unit.byName.timeDurationInMs,
- customContextRange: row.totalsRow ? undefined :
- tr.b.Range.fromExplicitRange(0, maxValues.duration),
- ownerDocument: ownerDocument,
- rightAlign: true
- });
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- if (hasCpuData) {
- return rowA.cpuDuration / rowA.numEvents -
- rowB.cpuDuration / rowB.numEvents;
- } else {
- return rowA.duration / rowA.numEvents -
- rowB.duration / rowB.numEvents;
- }
- }
- });
- }
-
- columns.push({
- title: 'Occurrences',
- value: function(row) {
- return row.numEvents;
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- return rowA.numEvents - rowB.numEvents;
- }
- });
-
- var alertsColumnIndex;
- if (hasAlerts) {
- columns.push({
- title: 'Num Alerts',
- value: function(row) {
- return row.numAlerts;
- },
- width: '<upated further down>',
- cmp: function(rowA, rowB) {
- return rowA.numAlerts - rowB.numAlerts;
- }
- });
- alertsColumnIndex = columns.length - 1;
- }
- var colWidthPercentage;
- if (columns.length === 1)
- colWidthPercentage = '100%';
- else
- colWidthPercentage = (100 / (columns.length - 1)).toFixed(3) + '%';
-
- for (var i = 1; i < columns.length; i++)
- columns[i].width = colWidthPercentage;
-
- this.$.table.tableColumns = columns;
-
- if (hasAlerts) {
- this.$.table.sortColumnIndex = alertsColumnIndex;
- this.$.table.sortDescending = true;
- }
- },
-
- configure: function(config) {
- if (config.eventsByTitle === undefined)
- throw new Error('Required: eventsByTitle');
-
- if (config.showTotals !== undefined)
- this.showTotals_ = config.showTotals;
- else
- this.showTotals_ = true;
-
- if (config.eventsHaveDuration !== undefined)
- this.eventsHaveDuration_ = config.eventsHaveDuration;
- else
- this.eventsHaveDuration_ = true;
-
- if (config.eventsHaveSubRows !== undefined)
- this.eventsHaveSubRows_ = config.eventsHaveSubRows;
- else
- this.eventsHaveSubRows_ = true;
-
- this.eventsByTitle_ = config.eventsByTitle;
- this.updateContents_();
- },
-
- get showTotals() {
- return this.showTotals_;
- },
-
- set showTotals(showTotals) {
- this.showTotals_ = showTotals;
- this.updateContents_();
- },
-
- get eventsHaveDuration() {
- return this.eventsHaveDuration_;
- },
-
- set eventsHaveDuration(eventsHaveDuration) {
- this.eventsHaveDuration_ = eventsHaveDuration;
- this.updateContents_();
- },
-
- get eventsHaveSubRows() {
- return this.eventsHaveSubRows_;
- },
-
- set eventsHaveSubRows(eventsHaveSubRows) {
- this.eventsHaveSubRows_ = eventsHaveSubRows;
- this.updateContents_();
- },
-
- get eventsByTitle() {
- return this.eventsByTitle_;
- },
-
- set eventsByTitle(eventsByTitle) {
- this.eventsByTitle_ = eventsByTitle;
- this.updateContents_();
- },
-
- get selectionBounds() {
- return this.selectionBounds_;
- },
-
- set selectionBounds(selectionBounds) {
- this.selectionBounds_ = selectionBounds;
- this.updateContents_();
- },
-
- updateContents_: function() {
- var eventsByTitle;
- if (this.eventsByTitle_ !== undefined)
- eventsByTitle = this.eventsByTitle_;
- else
- eventsByTitle = [];
-
- var allEvents = new tr.model.EventSet();
- var rows = [];
- tr.b.iterItems(
- eventsByTitle,
- function(title, eventsOfSingleTitle) {
- for (var event of allEvents)
- allEvents.push(event);
- var row = new tr.ui.analysis.MultiEventSummary(
- title, eventsOfSingleTitle);
- rows.push(row);
- });
-
- this.updateTableColumns_(rows);
- this.$.table.tableRows = rows;
-
- var maxValues = {
- duration: undefined,
- selfTime: undefined,
- cpuSelfTime: undefined,
- cpuDuration: undefined
- };
-
- if (this.eventsHaveDuration) {
- for (var column in maxValues) {
- maxValues[column] = tr.b.Statistics.max(rows, function(event) {
- return event[column];
- });
- }
- }
-
- var footerRows = [];
-
- if (this.showTotals_) {
- var multiEventSummary = new tr.ui.analysis.MultiEventSummary(
- 'Totals', allEvents);
- footerRows.push(multiEventSummary);
- }
-
-
- this.updateTableColumns_(rows, maxValues);
- this.$.table.tableRows = rows;
-
- // TODO(selection bounds).
-
- // TODO(sorting)
-
- this.$.table.footerRows = footerRows;
- this.$.table.rebuild();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table_test.html
deleted file mode 100644
index 97898aeed6a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_table_test.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_summary_table.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var EventSet = tr.model.EventSet;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('basicNoCpu', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
- tsg.pushSlice(newSliceEx({title: 'a', start: 0, duration: 0.5}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 1, duration: 0.5}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 2, duration: 0.5}));
- tsg.createSubSlices();
-
- var threadTrack = {};
- threadTrack.thread = thread;
-
- var selection = new EventSet(tsg.slices);
-
- var viewEl = document.createElement('tr-ui-a-multi-event-summary-table');
- viewEl.configure({
- showTotals: true,
- eventsHaveDuration: true,
- eventsByTitle: selection.getEventsOrganizedByTitle()
- });
- this.addHTMLOutput(viewEl);
- });
-
- test('basicWithCpu', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
- tsg.pushSlice(newSliceEx({title: 'a', start: 0, end: 3,
- cpuStart: 0, cpuEnd: 3}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 1, end: 2,
- cpuStart: 1, cpuEnd: 1.75}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 4, end: 5,
- cpuStart: 3, cpuEnd: 3.75}));
- tsg.createSubSlices();
-
- var threadTrack = {};
- threadTrack.thread = thread;
-
- var selection = new EventSet(tsg.slices);
-
- var viewEl = document.createElement('tr-ui-a-multi-event-summary-table');
- viewEl.configure({
- showTotals: true,
- eventsHaveDuration: true,
- eventsByTitle: selection.getEventsOrganizedByTitle()
- });
- this.addHTMLOutput(viewEl);
- });
-
- test('noSelfTimeNoSubRows', function() {
- var model = new Model();
-
- var fe1 = new tr.model.FlowEvent('cat', 1234, 'title', 7, 10, {});
- var fe2 = new tr.model.FlowEvent('cat', 1234, 'title', 8, 20, {});
-
- // Make reading some properties an explosion, as a way to ensure that they
- // aren't read. Note that 'duration' is read since it is used by the
- // EventSet to get the range.
- var failProp = {
- get: function() {
- throw new Error('Should not be called');
- }
- };
- Object.defineProperty(fe1, 'subRows', failProp);
- Object.defineProperty(fe2, 'subRows', failProp);
-
- Object.defineProperty(fe1, 'selfTime', failProp);
- Object.defineProperty(fe2, 'selfTime', failProp);
-
- model.flowEvents.push(fe1);
- model.flowEvents.push(fe2);
-
- var selection = new EventSet([fe1, fe2]);
-
- var viewEl = document.createElement('tr-ui-a-multi-event-summary-table');
- viewEl.configure({
- showTotals: true,
- eventsHaveDuration: false,
- eventsHaveSubRows: false,
- eventsByTitle: selection.getEventsOrganizedByTitle()
- });
- this.addHTMLOutput(viewEl);
- });
-
- // TODO(nduca): Tooltippish stuff.
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_test.html
deleted file mode 100644
index 5f7782b1438..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_event_summary_test.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_summary.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('summaryRowNoCpu', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
-
- tsg.pushSlice(newSliceEx({title: 'a', start: 0, end: 3}));
- tsg.pushSlice(newSliceEx({title: 'bb', start: 1, end: 2}));
- tsg.pushSlice(newSliceEx({title: 'bb', start: 4, end: 5}));
- tsg.createSubSlices();
-
- var row = new tr.ui.analysis.MultiEventSummary('x', tsg.slices.slice(0));
- assert.equal(row.duration, 5);
- assert.equal(row.selfTime, 4);
- assert.isUndefined(row.cpuDuration);
- assert.isUndefined(row.cpuSelfTime);
- });
-
- test('summaryRowWithCpu', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
-
- tsg.pushSlice(newSliceEx({title: 'a', start: 0, end: 3,
- cpuStart: 0, cpuEnd: 3}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 1, end: 2,
- cpuStart: 1, cpuEnd: 1.75}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 4, end: 5,
- cpuStart: 3, cpuEnd: 3.75}));
- tsg.createSubSlices();
-
- var row = new tr.ui.analysis.MultiEventSummary('x', tsg.slices.slice(0));
- assert.equal(row.duration, 5);
- assert.equal(row.selfTime, 4);
- assert.equal(row.cpuDuration, 4.5);
- assert.equal(row.cpuSelfTime, 3.75);
- assert.equal(row.maxDuration, 3);
- assert.equal(row.maxSelfTime, 2);
- assert.equal(row.maxCpuDuration, 3);
- assert.equal(row.maxCpuSelfTime, 2.25);
- });
-
- test('summaryRowNonSlice', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
-
- var fe1 = new tr.model.FlowEvent('cat', 1234, 'title', 7, 10, {});
- var fe2 = new tr.model.FlowEvent('cat', 1234, 'title', 8, 20, {});
- model.flowEvents.push(fe1);
- model.flowEvents.push(fe2);
-
- var row = new tr.ui.analysis.MultiEventSummary('a', [fe1, fe2]);
- assert.equal(row.duration, 0);
- assert.equal(row.selfTime, 0);
- assert.isUndefined(row.cpuDuration);
- assert.isUndefined(row.cpuSelfTime);
- assert.equal(row.maxDuration, 0);
- });
-
- test('summaryNumAlerts', function() {
- var slice = newSliceEx({title: 'b', start: 0, duration: 0.002});
-
- var ALERT_INFO_1 = new tr.model.EventInfo(
- 'Alert 1', 'Critical alert');
-
- var alert = new tr.model.Alert(ALERT_INFO_1, 5, [slice]);
-
- var row = new tr.ui.analysis.MultiEventSummary('a', [slice]);
- assert.equal(row.numAlerts, 1);
- });
-
- test('argSummary', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
-
- tsg.pushSlice(newSliceEx({title: 'a', start: 0, end: 3,
- args: {value1: 3, value2: 'x', value3: 1}}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 1, end: 2,
- args: {value1: 3, value2: 'y', value3: 2}}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 4, end: 5,
- args: {value1: 3, value2: 'z', value3: 'x'}}));
- tsg.createSubSlices();
-
- var row = new tr.ui.analysis.MultiEventSummary('x', tsg.slices.slice(0));
- assert.deepEqual(row.totalledArgs, {value1: 9});
- assert.deepEqual(row.untotallableArgs, ['value2', 'value3']);
- assert.equal(row.maxDuration, 3);
- assert.equal(row.maxSelfTime, 2);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view.html
deleted file mode 100644
index 14946562497..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-
-<dom-module id='tr-ui-a-multi-flow-event-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- }
- </style>
- <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-flow-event-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.$.content.eventsHaveDuration = false;
- this.$.content.eventsHaveSubRows = false;
- },
-
- set selection(selection) {
- this.$.content.selection = selection;
- },
-
- get selection() {
- return this.$.content.selection;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-flow-event-sub-view',
- tr.model.FlowEvent,
- {
- multi: true,
- title: 'Flow Events',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view_test.html
deleted file mode 100644
index 6a95a25d524..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_flow_event_sub_view_test.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var EventSet = tr.model.EventSet;
-
- test('analyzeSelectionWithSingleEvent', function() {
- var model = new Model();
-
- var fe1 = new tr.model.FlowEvent('cat', 1234, 'title', 7, 10, {});
- var fe2 = new tr.model.FlowEvent('cat', 1234, 'title', 8, 20, {});
- model.flowEvents.push(fe1);
- model.flowEvents.push(fe2);
-
- var selection = new EventSet();
- selection.push(fe1);
- selection.push(fe2);
- assert.equal(selection.length, 2);
-
- var subView = document.createElement('tr-ui-a-multi-flow-event-sub-view');
- subView.selection = selection;
-
- this.addHTMLOutput(subView);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_frame_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_frame_sub_view.html
deleted file mode 100644
index dd526e655b0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_frame_sub_view.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-frame-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- set selection(selection) {
- Polymer.dom(this).textContent = '';
- var realView = document.createElement('tr-ui-a-multi-event-sub-view');
- realView.eventsHaveDuration = false;
- realView.eventsHaveSubRows = false;
-
- Polymer.dom(this).appendChild(realView);
- realView.setSelectionWithoutErrorChecks(selection);
-
- this.currentSelection_ = selection;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- get relatedEventsToHighlight() {
- if (!this.currentSelection_)
- return undefined;
- var selection = new tr.model.EventSet();
- this.currentSelection_.forEach(function(frameEvent) {
- frameEvent.associatedEvents.forEach(function(event) {
- selection.push(event);
- });
- });
- return selection;
- }
-});
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-frame-sub-view',
- tr.model.Frame,
- {
- multi: true,
- title: 'Frames',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view.html
deleted file mode 100644
index 9701827e709..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-
-<dom-module id='tr-ui-a-multi-instant-event-sub-view'>
- <template>
- <style>
- :host {
- display: block;
- }
- </style>
- <div id='content'></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-instant-event-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- set selection(selection) {
- Polymer.dom(this.$.content).textContent = '';
- var realView = document.createElement('tr-ui-a-multi-event-sub-view');
- realView.eventsHaveDuration = false;
- realView.eventsHaveSubRows = false;
-
- Polymer.dom(this.$.content).appendChild(realView);
- realView.setSelectionWithoutErrorChecks(selection);
-
- this.currentSelection_ = selection;
- },
-
- get selection() {
- return this.currentSelection_;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view_test.html
deleted file mode 100644
index ba70217fe79..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_instant_event_sub_view_test.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var EventSet = tr.model.EventSet;
-
- test('analyzeSelectionWithSingleEvent', function() {
- var model = new Model();
- var p52 = model.getOrCreateProcess(52);
- var t53 = p52.getOrCreateThread(53);
-
- var ie1 = new tr.model.ProcessInstantEvent('cat', 'title', 7, 10, {});
- var ie2 = new tr.model.ProcessInstantEvent('cat', 'title', 7, 20, {});
- p52.instantEvents.push(ie1);
- p52.instantEvents.push(ie2);
-
-
- var selection = new EventSet();
- selection.push(ie1);
- selection.push(ie2);
- assert.equal(selection.length, 2);
-
- var subView =
- document.createElement('tr-ui-a-multi-instant-event-sub-view');
- subView.selection = selection;
-
- this.addHTMLOutput(subView);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view.html
deleted file mode 100644
index d95ab8ba29b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-multi-object-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="content"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-object-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- ready: function() {
- this.$.content.showHeader = false;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
-
- var objectEvents = tr.b.asArray(selection).sort(
- tr.b.Range.compareByMinTimes);
-
- var timeSpanConfig = {
- unit: tr.b.Unit.byName.timeStampInMs,
- ownerDocument: this.ownerDocument
- };
- var table = this.$.content;
- table.tableColumns = [
- {
- title: 'First',
- value: function(event) {
- if (event instanceof tr.model.ObjectSnapshot)
- return tr.v.ui.createScalarSpan(event.ts, timeSpanConfig);
-
- var spanEl = document.createElement('span');
- Polymer.dom(spanEl).appendChild(tr.v.ui.createScalarSpan(
- event.creationTs, timeSpanConfig));
- Polymer.dom(spanEl).appendChild(tr.ui.b.createSpan({
- textContent: '-',
- marginLeft: '4px',
- marginRight: '4px'
- }));
- if (event.deletionTs !== Number.MAX_VALUE) {
- Polymer.dom(spanEl).appendChild(tr.v.ui.createScalarSpan(
- event.deletionTs, timeSpanConfig));
- }
- return spanEl;
- },
- width: '200px'
- },
- {
- title: 'Second',
- value: function(event) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(function() {
- return new tr.model.EventSet(event);
- }, event.userFriendlyName);
- return linkEl;
- },
- width: '100%'
- }
- ];
- table.tableRows = objectEvents;
- table.rebuild();
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-object-sub-view',
- tr.model.ObjectInstance,
- {
- multi: true,
- title: 'Object Instances',
- });
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-object-sub-view',
- tr.model.ObjectSnapshot,
- {
- multi: true,
- title: 'Object Snapshots',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view_test.html
deleted file mode 100644
index bcc58afd230..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_object_sub_view_test.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var ObjectInstance = tr.model.ObjectInstance;
-
- test('instantiate_analysisWithObjects', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var objects = p1.objects;
- var i10 = objects.idWasCreated(
- '0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 10);
- var s10 = objects.addSnapshot('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 10,
- 'snapshot-1');
- var s25 = objects.addSnapshot('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 25,
- 'snapshot-2');
- var s40 = objects.addSnapshot('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 40,
- 'snapshot-3');
- objects.idWasDeleted('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 45);
-
- var track = {};
- var selection = new EventSet();
- selection.push(i10);
- selection.push(s10);
- selection.push(s25);
- selection.push(s40);
-
- var analysisEl = document.createElement('tr-ui-a-multi-object-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view.html
deleted file mode 100644
index 2c7b8773f19..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/frame_power_usage_chart.html">
-<link rel="import" href="/tracing/ui/analysis/power_sample_summary_table.html">
-
-<dom-module id='tr-ui-a-multi-power-sample-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- }
- #tables {
- display: flex;
- flex-direction: column;
- width: 50%;
- }
- #chart {
- width: 50%;
- }
- </style>
- <div id="tables">
- <tr-ui-a-power-sample-summary-table id="summaryTable">
- </tr-ui-a-power-sample-summary-table>
- </div>
- <tr-ui-a-frame-power-usage-chart id="chart">
- </tr-ui-a-frame-power-usage-chart>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-// TODO(charliea): Add a dropdown that allows the user to select which type of
-// power sample analysis view they want (e.g. table of samples, graph).
-Polymer({
- is: 'tr-ui-a-multi-power-sample-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.currentSelection_ = undefined;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- updateContents_: function() {
- var samples = this.selection;
- var vSyncTimestamps = (!samples ? [] :
- tr.b.getFirstElement(samples).series.device.vSyncTimestamps);
-
- this.$.summaryTable.samples = samples;
- this.$.chart.setData(this.selection, vSyncTimestamps);
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-power-sample-sub-view',
- tr.model.PowerSample,
- {
- multi: true,
- title: 'Power Samples',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view_test.html
deleted file mode 100644
index d22083b29db..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_power_sample_sub_view_test.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-<link rel="import" href="/tracing/ui/analysis/multi_power_sample_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_noSamplesOrVSyncs', function() {
- var viewEl = document.createElement('tr-ui-a-multi-power-sample-sub-view');
- viewEl.selection = undefined;
- this.addHTMLOutput(viewEl);
- });
-
- test('instantiate_noVSyncs', function() {
- var model = new tr.Model();
- var series = new tr.model.PowerSeries(model.device);
-
- model.device.vSyncTimestamps = [];
- series.addPowerSample(1, 1);
- series.addPowerSample(2, 2);
- series.addPowerSample(3, 3);
- series.addPowerSample(4, 2);
-
- var view = document.createElement('tr-ui-a-multi-power-sample-sub-view');
- var eventSet = new tr.model.EventSet(series.samples);
- view.selection = eventSet;
-
- this.addHTMLOutput(view);
-
- assert.deepEqual(view.$.chart.samples, eventSet);
- assert.sameDeepMembers(view.$.chart.vSyncTimestamps, []);
- });
-
- test('instantiate', function() {
- var model = new tr.Model();
- var series = new tr.model.PowerSeries(model.device);
-
- model.device.vSyncTimestamps = [0];
- series.addPowerSample(1, 1);
- series.addPowerSample(2, 2);
- series.addPowerSample(3, 3);
- series.addPowerSample(4, 2);
-
- var view = document.createElement('tr-ui-a-multi-power-sample-sub-view');
- var eventSet = new tr.model.EventSet(series.samples);
- view.selection = eventSet;
-
- this.addHTMLOutput(view);
-
- assert.deepEqual(view.$.chart.samples, eventSet);
- assert.sameDeepMembers(view.$.chart.vSyncTimestamps, [0]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view.html
deleted file mode 100644
index 4b515be4459..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view.html
+++ /dev/null
@@ -1,286 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/multi_dimensional_view.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-multi-sample-sub-view'>
- <template>
- <style>
- :host { display: block; }
- #control {
- background-color: #e6e6e6;
- background-image: -webkit-gradient(linear, 0 0, 0 100%,
- from(#E5E5E5), to(#D1D1D1));
- flex: 0 0 auto;
- overflow-x: auto;
- }
- #control::-webkit-scrollbar { height: 0px; }
- #control {
- font-size: 12px;
- display: flex;
- flex-direction: row;
- align-items: stretch;
- margin: 1px;
- margin-right: 2px;
- }
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
- <div id="control">
- Sample View Option
- </div>
- <tr-ui-b-table id="table">
- </tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-(function() {
- var MultiDimensionalViewBuilder = tr.b.MultiDimensionalViewBuilder;
- var SAMPLE_TYPE = {
- COMPILER: 'compiler',
- EXTERNAL: 'external',
- GC: 'gc',
- NATIVEV8: '[native v8]',
- OTHER: 'other',
- UNKNOWN: 'unknown'
- };
-
- Polymer({
- is: 'tr-ui-a-multi-sample-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.viewOption_ = undefined;
- this.selection_ = undefined;
- },
-
- ready: function() {
- var viewSelector = tr.ui.b.createSelector(
- this, 'viewOption', 'tracing.ui.analysis.multi_sample_sub_view',
- MultiDimensionalViewBuilder.ViewType.TOP_DOWN_TREE_VIEW,
- [
- {
- label: 'Top-down (Tree)',
- value: MultiDimensionalViewBuilder.ViewType.TOP_DOWN_TREE_VIEW
- },
- {
- label: 'Top-down (Heavy)',
- value: MultiDimensionalViewBuilder.ViewType.TOP_DOWN_HEAVY_VIEW
- },
- {
- label: 'Bottom-up (Heavy)',
- value: MultiDimensionalViewBuilder.ViewType.BOTTOM_UP_HEAVY_VIEW
- }
- ]);
- Polymer.dom(this.$.control).appendChild(viewSelector);
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- this.selection_ = selection;
- this.updateContents_();
- },
-
- get viewOption() {
- return this.viewOption_;
- },
-
- set viewOption(viewOption) {
- this.viewOption_ = viewOption;
- this.updateContents_();
- },
-
- createSamplingSummary_: function(selection, viewOption) {
- var builder = new MultiDimensionalViewBuilder(
- 1 /* dimensions */, 1 /* valueCount */);
- var samples = selection.filter(function(event) {
- return event instanceof tr.model.Sample;
- });
-
- samples.forEach(function(sample) {
- builder.addPath([sample.getUserFriendlyStackTrace().reverse()],
- [1], MultiDimensionalViewBuilder.ValueKind.SELF);
- });
-
- return builder.buildView(viewOption);
- },
-
- // Constructs function name and file name of sample
- // if it is compiler, external, gc, other, or unknown.
- processTypedSampleRow_: function(row) {
- var title = row.title[0];
- switch (title) {
- case SAMPLE_TYPE.COMPILER:
- case SAMPLE_TYPE.EXTERNAL:
- case SAMPLE_TYPE.GC:
- case SAMPLE_TYPE.OTHER:
- row.functionName = title;
- row.fileName = 'N/A';
- return true;
- case SAMPLE_TYPE.UNKNOWN:
- row.functionName = SAMPLE_TYPE.UNKNOWN;
- row.fileName = SAMPLE_TYPE.UNKNOWN;
- return true;
- default:
- return false;
- }
- },
-
- // Constructs function name and file name of native v8 sample.
- processNativeV8SampleRow_: function(row) {
- var title = row.title[0];
- if (!title.includes(SAMPLE_TYPE.NATIVEV8))
- return false;
- var arr = title.split(SAMPLE_TYPE.NATIVEV8);
- row.functionName = arr[0].trim();
- if (row.functionName === '')
- row.functionName = '(anonymous function)';
- row.fileName = SAMPLE_TYPE.NATIVEV8;
- var fileNameSuffix = arr[1].trim();
- if (fileNameSuffix !== '')
- row.fileName += ' ' + fileNameSuffix;
- return true;
- },
-
- // Constructs function name and file name for sample.
- processGeneralSampleRow_: function(row) {
- var title = row.title[0];
- var idx = title.lastIndexOf(' ');
- if (idx === -1) {
- row.functionName = title;
- row.fileName = 'unknown';
- return;
- }
- var prefix = title.substr(0, idx);
- var suffix = title.substr(idx + 1);
- if (suffix.startsWith('v8/')) {
- row.functionName = suffix;
- row.fileName = 'unknown';
- } else if (suffix === '') {
- row.functionName = prefix;
- row.fileName = 'unknown';
- } else if (prefix === '') {
- row.functionName = '(anonymous function)';
- row.fileName = suffix.substr(suffix.lastIndexOf('/') + 1);
- } else {
- row.functionName = prefix;
- row.fileName = suffix.substr(suffix.lastIndexOf('/') + 1);
- }
- },
-
- processSampleRows_: function(rows) {
- rows.forEach(function(row) {
- if (!this.processTypedSampleRow_(row) &&
- !this.processNativeV8SampleRow_(row))
- this.processGeneralSampleRow_(row);
- this.processSampleRows_(row.subRows);
- }, this);
- },
-
- updateContents_: function() {
- if (this.selection === undefined) {
- this.$.table.tableColumns = [];
- this.$.table.tableRows = [];
- this.$.table.rebuild();
- return;
- }
-
- var samplingData = this.createSamplingSummary_(
- this.selection, this.viewOption);
- var total = samplingData.values[0].total;
- var columns = [
- this.createPercentColumn_('Total', total),
- this.createSamplesColumn_('Total'),
- this.createPercentColumn_('Self', total),
- this.createSamplesColumn_('Self'),
- {
- title: 'Function Name',
- value: function(row) { return row.functionName; },
- width: '150px',
- cmp: function(a, b) {
- return a.functionName.localeCompare(b.functionName);
- },
- showExpandButtons: true
- },
- {
- title: 'Location',
- value: function(row) { return row.fileName; },
- width: '250px',
- cmp: function(a, b) {
- return a.fileName.localeCompare(b.fileName);
- }
- }
- ];
-
- this.processSampleRows_(samplingData.subRows);
- this.$.table.tableColumns = columns;
- this.$.table.sortColumnIndex = 1 /* Total samples */;
- this.$.table.sortDescending = true;
- this.$.table.tableRows = samplingData.subRows;
- this.$.table.rebuild();
- },
-
- createPercentColumn_: function(title, samplingDataTotal) {
- var field = title.toLowerCase();
- return {
- title: title + ' percent',
- value: function(row) {
- return tr.v.ui.createScalarSpan(
- row.values[0][field] / samplingDataTotal, {
- customContextRange: tr.b.Range.PERCENT_RANGE,
- unit: tr.b.Unit.byName.normalizedPercentage,
- context: { minimumFractionDigits: 2, maximumFractionDigits: 2 },
- rightAlign: true
- });
- },
- width: '60px',
- cmp: function(a, b) {
- return a.values[0][field] - b.values[0][field];
- }
- };
- },
-
- createSamplesColumn_: function(title) {
- var field = title.toLowerCase();
- return {
- title: title + ' samples',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.values[0][field], {
- unit: tr.b.Unit.byName.unitlessNumber,
- context: { maximumFractionDigits: 0 },
- rightAlign: true
- });
- },
- width: '60px',
- cmp: function(a, b) {
- return a.values[0][field] - b.values[0][field];
- }
- };
- }
- });
-
- tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-sample-sub-view',
- tr.model.Sample,
- {
- multi: true,
- title: 'Samples',
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view_test.html
deleted file mode 100644
index 4eca3673357..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_sample_sub_view_test.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/multi_sample_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSampleNamed = tr.c.TestUtils.newSampleNamed;
-
- function instantiateWithTraces(traces) {
- var t53;
- var m = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(model) {
- t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- traces.forEach(function(trace, index) {
- model.samples.push(
- newSampleNamed(t53, 'X', 'cat', trace, index * 0.02));
- });
- }
- });
-
- var t53track = {};
- t53track.thread = t53;
-
- var selection = new tr.model.EventSet();
- for (var i = 0; i < t53.samples.length; i++)
- selection.push(t53.samples[i]);
-
- var view = document.createElement('tr-ui-a-multi-sample-sub-view');
- view.style.height = '500px';
- this.addHTMLOutput(view);
- view.selection = selection;
- return view;
- }
-
- test('instantiate_flat', function() {
- instantiateWithTraces.call(this, [
- ['BBB'],
- ['AAA'],
- ['AAA'],
- ['Sleeping'],
- ['BBB'],
- ['AAA'],
- ['CCC'],
- ['Sleeping']
- ]);
- });
-
- test('instantiate_nested', function() {
- instantiateWithTraces.call(this, [
- ['AAA', 'BBB'],
- ['AAA', 'BBB', 'CCC'],
- ['AAA', 'BBB'],
- ['BBB', 'AAA', 'BBB'],
- ['BBB', 'AAA', 'BBB'],
- ['BBB', 'AAA', 'BBB']
- ]);
- });
-
- test('processSampleRows', function() {
- var view = instantiateWithTraces.call(this, [
- ['gc'],
- ['external'],
- ['compiler'],
- ['other'],
- ['unknown'],
- [' [native v8] promise.js:1'],
- ['dispatch [native v8] promise.js:2'],
- ['onDispatch http://google.com/a.js:1'],
- [' http://google.com/a.js:2'],
- ['f '],
- ['v8/LoadTime'],
- ['f']
- ]);
- var rows = view.$.table.tableRows;
-
- assert.deepEqual(rows.map(r => r.functionName), [
- 'gc',
- 'external',
- 'compiler',
- 'other',
- 'unknown',
- '(anonymous function)',
- 'dispatch',
- 'onDispatch',
- '(anonymous function)',
- 'f',
- 'v8/LoadTime',
- 'f'
- ]);
-
- assert.deepEqual(rows.map(r => r.fileName), [
- 'N/A',
- 'N/A',
- 'N/A',
- 'N/A',
- 'unknown',
- '[native v8] promise.js:1',
- '[native v8] promise.js:2',
- 'a.js:1',
- 'a.js:2',
- 'unknown',
- 'unknown',
- 'unknown'
- ]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view.html
deleted file mode 100644
index 08e41c64d37..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/related_events.html">
-
-<dom-module id='tr-ui-a-multi-thread-slice-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #content {
- display: flex;
- flex: 1 1 auto;
- }
- #content > tr-ui-a-related-events {
- margin-left: 8px;
- flex: 0 1 200px;
- }
- </style>
- <div id="content"></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-thread-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.selection_ = undefined;
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- this.selection_ = selection;
-
- // TODO(nduca): This is a gross hack for cc Frame Viewer, but its only
- // the frame viewer that needs this feature, so ~shrug~.
- // We check for its presence so that we do not have a hard dependency
- // on frame viewer.
- if (tr.isExported('tr.ui.e.chrome.cc.RasterTaskSelection')) {
- if (tr.ui.e.chrome.cc.RasterTaskSelection.supports(selection)) {
- var ltvSelection = new tr.ui.e.chrome.cc.RasterTaskSelection(
- selection);
-
- var ltv = new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView();
- ltv.objectSnapshot = ltvSelection.containingSnapshot;
- ltv.selection = ltvSelection;
- ltv.extraHighlightsByLayerId = ltvSelection.extraHighlightsByLayerId;
-
- Polymer.dom(this.$.content).textContent = '';
- Polymer.dom(this.$.content).appendChild(ltv);
-
- this.requiresTallView_ = true;
- return;
- }
- }
-
- Polymer.dom(this.$.content).textContent = '';
-
- var mesv = document.createElement('tr-ui-a-multi-event-sub-view');
- mesv.selection = selection;
- Polymer.dom(this.$.content).appendChild(mesv);
-
- var relatedEvents = document.createElement('tr-ui-a-related-events');
- relatedEvents.setRelatedEvents(selection);
-
- if (relatedEvents.hasRelatedEvents()) {
- Polymer.dom(this.$.content).appendChild(relatedEvents);
- }
- },
-
- get requiresTallView() {
- if (this.$.content.children.length === 0)
- return false;
- var childTagName = this.$.content.children[0].tagName;
- if (childTagName === 'TR-UI-A-MULTI-EVENT-SUB-VIEW')
- return false;
-
- // Using raster task view.
- return true;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-thread-slice-sub-view',
- tr.model.ThreadSlice,
- {
- multi: true,
- title: 'Slices',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view_test.html
deleted file mode 100644
index ce8e070aa3e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_slice_sub_view_test.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-<link rel="import" href="/tracing/ui/analysis/multi_thread_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newFlowEventEx = tr.c.TestUtils.newFlowEventEx;
-
- test('instantiate', function() {
- var model = new tr.Model();
- var t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- t53.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0.0, duration: 0.5,
- type: tr.model.ThreadSlice}));
- t53.sliceGroup.pushSlice(
- newSliceEx({title: 'b', start: 1.0, duration: 2,
- type: tr.model.ThreadSlice}));
- t53.sliceGroup.createSubSlices();
-
- var selection = new tr.model.EventSet();
- selection.push(t53.sliceGroup.slices[0]);
- selection.push(t53.sliceGroup.slices[1]);
-
- var viewEl = document.createElement('tr-ui-a-multi-thread-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-
- test('withFlows', function() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
-
- m.t2 = m.p1.getOrCreateThread(2);
- m.t3 = m.p1.getOrCreateThread(3);
- m.t4 = m.p1.getOrCreateThread(4);
-
- m.sA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0, end: 5,
- type: tr.model.ThreadSlice}));
- m.sB = m.t3.sliceGroup.pushSlice(
- newSliceEx({title: 'b', start: 10, end: 15,
- type: tr.model.ThreadSlice}));
- m.sC = m.t4.sliceGroup.pushSlice(
- newSliceEx({title: 'c', start: 20, end: 20,
- type: tr.model.ThreadSlice}));
-
- m.t2.createSubSlices();
- m.t3.createSubSlices();
- m.t4.createSubSlices();
-
- m.f1 = newFlowEventEx({
- 'title': 'flowish', start: 0, end: 10,
- startSlice: m.sA,
- endSlice: m.sB
- });
- m.f2 = newFlowEventEx({
- 'title': 'flowish', start: 15, end: 21,
- startSlice: m.sB,
- endSlice: m.sC
- });
- });
-
- var selection = new tr.model.EventSet();
- selection.push(m.sA);
- selection.push(m.sB);
- selection.push(m.sC);
-
- var viewEl = document.createElement('tr-ui-a-multi-thread-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view.html
deleted file mode 100644
index 31bd29e3567..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-
-<dom-module id='tr-ui-a-multi-thread-time-slice-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #content {
- flex: 1 1 auto;
- }
- </style>
- <tr-ui-a-multi-event-sub-view id="content"></tr-ui-a-multi-event-sub-view>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-thread-time-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.$.content.eventsHaveSubRows = false;
- },
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.content.setSelectionWithoutErrorChecks(selection);
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-thread-time-slice-sub-view',
- tr.model.ThreadTimeSlice,
- {
- multi: true,
- title: 'Thread Timeslices',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view_test.html
deleted file mode 100644
index a0b88c033c9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_thread_time_slice_sub_view_test.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/multi_thread_time_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createBasicModel() {
- var lines = [
- 'Android.launcher-584 [001] d..3 12622.506890: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D ==> next_comm=Android.launcher next_pid=584 next_prio=120', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..4 12622.506936: sched_wakeup: comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..3 12622.506950: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: B|128|queueBuffer', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ==> next_comm=Android.launcher next_pid=584 next_prio=120' // @suppress longLineCheck
- ];
-
- return tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- }
-
- test('instantiate', function() {
- var m = createBasicModel();
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
-
- var selection = new tr.model.EventSet();
- selection.push(thread.timeSlices[0]);
- selection.push(thread.timeSlices[1]);
-
- var viewEl = document.createElement(
- 'tr-ui-a-multi-thread-time-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_user_expectation_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_user_expectation_sub_view.html
deleted file mode 100644
index 0caf158532c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/multi_user_expectation_sub_view.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_event_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/user_expectation_related_samples_table.html">
-
-<dom-module id='tr-ui-a-multi-user-expectation-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex: 1 1 auto;
- }
- #events {
- margin-left: 8px;
- flex: 0 1 200px;
- }
- </style>
- <tr-ui-a-multi-event-sub-view id="realView"></tr-ui-a-multi-event-sub-view>
- <div id="events">
- <tr-ui-a-user-expectation-related-samples-table id="relatedSamples"></tr-ui-a-user-expectation-related-samples-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-multi-interaction-record-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.$.realView.setSelectionWithoutErrorChecks(selection);
-
- this.currentSelection_ = selection;
-
- this.$.relatedSamples.selection = selection;
- if (this.$.relatedSamples.hasRelatedSamples())
- this.$.events.style.display = '';
- else
- this.$.events.style.display = 'none';
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- get relatedEventsToHighlight() {
- if (!this.currentSelection_)
- return undefined;
- var selection = new tr.model.EventSet();
- this.currentSelection_.forEach(function(ir) {
- ir.associatedEvents.forEach(function(event) {
- selection.push(event);
- });
- });
- return selection;
- }
-});
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-user-expectation-sub-view',
- tr.model.um.UserExpectation,
- {
- multi: true,
- title: 'User Expectations',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/object_instance_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/object_instance_view.html
deleted file mode 100644
index e07e2e4ea95..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/object_instance_view.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- var ObjectInstanceView = tr.ui.b.define('object-instance-view');
-
- ObjectInstanceView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.objectInstance_ = undefined;
- },
-
- get requiresTallView() {
- return true;
- },
-
- set modelEvent(obj) {
- this.objectInstance = obj;
- },
-
- get modelEvent() {
- return this.objectInstance;
- },
-
- get objectInstance() {
- return this.objectInstance_;
- },
-
- set objectInstance(i) {
- this.objectInstance_ = i;
- this.updateContents();
- },
-
- updateContents: function() {
- throw new Error('Not implemented');
- }
- };
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = ObjectInstanceView;
- options.defaultMetadata = {
- showInTrackView: true
- };
- tr.b.decorateExtensionRegistry(ObjectInstanceView, options);
-
- return {
- ObjectInstanceView: ObjectInstanceView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/object_snapshot_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/object_snapshot_view.html
deleted file mode 100644
index 4363e9fb466..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/object_snapshot_view.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- var ObjectSnapshotView = tr.ui.b.define('object-snapshot-view');
-
- ObjectSnapshotView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.objectSnapshot_ = undefined;
- },
-
- get requiresTallView() {
- return true;
- },
-
- set modelEvent(obj) {
- this.objectSnapshot = obj;
- },
-
- get modelEvent() {
- return this.objectSnapshot;
- },
-
- get objectSnapshot() {
- return this.objectSnapshot_;
- },
-
- set objectSnapshot(i) {
- this.objectSnapshot_ = i;
- this.updateContents();
- },
-
- updateContents: function() {
- throw new Error('Not implemented');
- }
- };
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- options.mandatoryBaseClass = ObjectSnapshotView;
- options.defaultMetadata = {
- showInstances: true,
- showInTrackView: true
- };
- tr.b.decorateExtensionRegistry(ObjectSnapshotView, options);
-
- return {
- ObjectSnapshotView: ObjectSnapshotView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table.html
deleted file mode 100644
index 6325bd8a691..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-a-power-sample-summary-table'>
- <template>
- <style>
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-power-sample-summary-table',
-
- ready: function() {
- this.$.table.tableColumns = [
- {
- title: 'Min power',
- width: '100px',
- value: function(row) {
- return tr.b.Unit.byName.powerInWatts.format(row.min);
- }
- },
- {
- title: 'Max power',
- width: '100px',
- value: function(row) {
- return tr.b.Unit.byName.powerInWatts.format(row.max);
- }
- },
- {
- title: 'Time-weighted average',
- width: '100px',
- value: function(row) {
- return tr.b.Unit.byName.powerInWatts.format(
- row.timeWeightedAverageInW);
- }
- },
- {
- title: 'Energy consumed',
- width: '100px',
- value: function(row) {
- return tr.b.Unit.byName.energyInJoules.format(row.energyConsumedInJ);
- }
- },
- {
- title: 'Sample count',
- width: '100%',
- value: function(row) { return row.sampleCount; }
- }
- ];
- this.samples = new tr.model.EventSet();
- },
-
- get samples() {
- return this.samples_;
- },
-
- set samples(samples) {
- if (samples === this.samples)
- return;
-
- this.samples_ =
- (samples === undefined) ? new tr.model.EventSet() : samples;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.samples.length === 0) {
- this.$.table.tableRows = [];
- } else {
- this.$.table.tableRows = [{
- min: this.getMin(),
- max: this.getMax(),
- timeWeightedAverageInW: this.getTimeWeightedAverageInW(),
- energyConsumedInJ: this.getEnergyConsumedInJ(),
- sampleCount: this.samples.length
- }];
- }
-
- this.$.table.rebuild();
- },
-
- getMin: function() {
- return Math.min.apply(null, this.samples.map(function(sample) {
- return sample.powerInW;
- }));
- },
-
- getMax: function() {
- return Math.max.apply(null, this.samples.map(function(sample) {
- return sample.powerInW;
- }));
- },
-
- /**
- * Returns a time-weighted average of the power consumption (Watts)
- * in between the first sample (inclusive) and last sample (exclusive).
- */
- getTimeWeightedAverageInW: function() {
- var energyConsumedInJ = this.getEnergyConsumedInJ();
-
- if (energyConsumedInJ === 'N/A')
- return 'N/A';
-
- var durationInS = tr.b.convertUnit(this.samples.bounds.duration,
- tr.b.UnitScale.Metric.MILLI, tr.b.UnitScale.Metric.NONE);
-
- return energyConsumedInJ / durationInS;
- },
-
-
- getEnergyConsumedInJ: function() {
- if (this.samples.length < 2)
- return 'N/A';
-
- var bounds = this.samples.bounds;
- var series = tr.b.getFirstElement(this.samples).series;
- return series.getEnergyConsumedInJ(bounds.min, bounds.max);
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table_test.html
deleted file mode 100644
index 151a36459ea..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/power_sample_summary_table_test.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-<link rel="import" href="/tracing/ui/analysis/power_sample_summary_table.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var EventSet = tr.model.EventSet;
- var Model = tr.Model;
- var PowerSeries = tr.model.PowerSeries;
-
- test('instantiate', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 2);
- series.addPowerSample(2000, 3);
- series.addPowerSample(3000, 4);
-
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = new EventSet(series.samples);
-
- this.addHTMLOutput(table);
- });
-
- test('setSamples_undefinedPowerSamples', function() {
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = undefined;
-
- assert.lengthOf(table.$.table.tableRows, 0);
- });
-
- test('setSamples_noPowerSamples', function() {
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = new EventSet([]);
-
- assert.lengthOf(table.$.table.tableRows, 0);
- });
-
- test('setSamples_onePowerSample', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
-
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = new EventSet(series.samples);
-
- assert.lengthOf(table.$.table.tableRows, 1);
- assert.equal(table.$.table.tableRows[0].min, 1);
- assert.equal(table.$.table.tableRows[0].max, 1);
- assert.equal(table.$.table.tableRows[0].timeWeightedAverageInW, 'N/A');
- assert.equal(table.$.table.tableRows[0].energyConsumedInJ, 'N/A');
- assert.equal(table.$.table.tableRows[0].sampleCount, 1);
- });
-
- test('setSamples_twoPowerSamples', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 2);
-
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = new EventSet(series.samples);
-
- assert.lengthOf(table.$.table.tableRows, 1);
- assert.equal(table.$.table.tableRows[0].min, 1);
- assert.equal(table.$.table.tableRows[0].max, 2);
- assert.equal(table.$.table.tableRows[0].timeWeightedAverageInW, 1);
- assert.equal(table.$.table.tableRows[0].energyConsumedInJ, 1);
- assert.equal(table.$.table.tableRows[0].sampleCount, 2);
- });
-
- test('setSamples_threePowerSamples', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 2);
- series.addPowerSample(2000, 3);
-
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = new EventSet(series.samples);
-
- assert.lengthOf(table.$.table.tableRows, 1);
- assert.equal(table.$.table.tableRows[0].min, 1);
- assert.equal(table.$.table.tableRows[0].max, 3);
- assert.equal(table.$.table.tableRows[0].timeWeightedAverageInW, 1.5);
- assert.equal(table.$.table.tableRows[0].energyConsumedInJ, 3);
- assert.equal(table.$.table.tableRows[0].sampleCount, 3);
- });
-
- test('setSamples_columnsInitialized', function() {
- var series = new PowerSeries(new Model().device);
-
- series.addPowerSample(0, 1);
- series.addPowerSample(1000, 2);
- series.addPowerSample(2000, 3);
-
- var table = document.createElement('tr-ui-a-power-sample-summary-table');
- table.samples = new EventSet(series.samples);
-
- var row = table.$.table.tableRows[0];
- var columns = table.$.table.tableColumns;
-
- assert.lengthOf(columns, 5);
-
- assert.equal(columns[0].title, 'Min power');
- assert.equal(columns[0].width, '100px');
- assert.equal(columns[0].value(row), '1.000 W');
-
- assert.equal(columns[1].title, 'Max power');
- assert.equal(columns[1].width, '100px');
- assert.equal(columns[1].value(row), '3.000 W');
-
- assert.equal(columns[2].title, 'Time-weighted average');
- assert.equal(columns[2].width, '100px');
- assert.equal(columns[2].value(row), '1.500 W');
-
- assert.equal(columns[3].title, 'Energy consumed');
- assert.equal(columns[3].width, '100px');
- assert.equal(columns[3].value(row), '3.000 J');
-
- assert.equal(columns[4].title, 'Sample count');
- assert.equal(columns[4].width, '100%');
- assert.equal(columns[4].value(row), 3);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior.html
deleted file mode 100644
index 65cf075a003..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/raf.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var RebuildableBehavior = {
- rebuild: function() {
- /**
- * Rebuild the pane if necessary.
- *
- * This method is not intended to be overriden by subclasses. Please
- * override scheduleRebuild_() instead.
- */
- if (!this.paneDirty_) {
- // Avoid rebuilding unnecessarily as it breaks things like table
- // selection.
- return;
- }
-
- this.paneDirty_ = false;
- this.onRebuild_();
- },
-
- /**
- * Mark the UI state of the pane as dirty and schedule a rebuild.
- *
- * This method is intended to be called by subclasses.
- */
- scheduleRebuild_: function() {
- if (this.paneDirty_)
- return;
- this.paneDirty_ = true;
- tr.b.requestAnimationFrame(this.rebuild.bind(this));
- },
-
- /**
- * Called when the pane is dirty and a rebuild is triggered.
- *
- * This method is intended to be overriden by subclasses (instead of
- * directly overriding rebuild()).
- */
- onRebuild_: function() {
- }
- };
-
- return {
- RebuildableBehavior: RebuildableBehavior
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior_test.html
deleted file mode 100644
index 4b7ed3a164f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/rebuildable_behavior_test.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/rebuildable_behavior.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- Polymer({
- is: 'tr-ui-analysis-rebuildable-test-element',
- behaviors: [tr.ui.analysis.RebuildableBehavior]
- });
-
- test('rebuild', function() {
- var el = document.createElement('tr-ui-analysis-rebuildable-test-element');
- var didFireOnRebuild;
- el.onRebuild_ = function() {
- assert.strictEqual(this, el);
- didFireOnRebuild = true;
- };
-
- function checkManualRebuild(expectedDidFireOnRebuild) {
- didFireOnRebuild = false;
- el.rebuild();
- assert.strictEqual(didFireOnRebuild, expectedDidFireOnRebuild);
- }
-
- function checkRAFRebuild(expectedDidFireOnRebuild) {
- didFireOnRebuild = false;
- tr.b.forcePendingRAFTasksToRun();
- assert.strictEqual(didFireOnRebuild, expectedDidFireOnRebuild);
- }
-
- // No rebuilds should occur when not scheduled.
- checkManualRebuild(false);
- checkRAFRebuild(false);
-
- // Single rebuild should occur when scheduled once.
- el.scheduleRebuild_();
- checkManualRebuild(true);
- checkManualRebuild(false);
-
- el.scheduleRebuild_();
- checkRAFRebuild(true);
- checkRAFRebuild(false);
-
- // Only a single rebuild should occur even when scheduled multiple times.
- el.scheduleRebuild_();
- el.scheduleRebuild_();
- checkManualRebuild(true);
- checkRAFRebuild(false);
- checkManualRebuild(false);
-
- el.scheduleRebuild_();
- el.scheduleRebuild_();
- checkRAFRebuild(true);
- checkRAFRebuild(false);
- checkManualRebuild(false);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events.html
deleted file mode 100644
index 142887260ad..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events.html
+++ /dev/null
@@ -1,324 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/flow_classifier.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-a-related-events'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-function* getEventInFlowEvents(event) {
- if (!event.inFlowEvents)
- return;
- yield * event.inFlowEvents;
-}
-
-function* getEventOutFlowEvents(event) {
- if (!event.outFlowEvents)
- return;
- yield * event.outFlowEvents;
-}
-
-function* getEventAncestors(event) {
- if (!event.enumerateAllAncestors)
- return;
- yield * event.enumerateAllAncestors();
-}
-
-function* getEventDescendents(event) {
- if (!event.enumerateAllDescendents)
- return;
- yield * event.enumerateAllDescendents();
-}
-
-Polymer({
- is: 'tr-ui-a-related-events',
-
- ready: function() {
- this.eventGroups_ = [];
- this.cancelFunctions_ = [];
-
- this.$.table.tableColumns = [
- {
- title: 'Event(s)',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.type;
- if (row.tooltip)
- typeEl.title = row.tooltip;
- return typeEl;
- },
- width: '150px'
- },
- {
- title: 'Link',
- width: '100%',
- value: function(row) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- if (row.name)
- linkEl.setSelectionAndContent(row.selection, row.name);
- else
- linkEl.selection = row.selection;
- return linkEl;
- }
- }
- ];
- },
-
- hasRelatedEvents: function() {
- return (this.eventGroups_ && this.eventGroups_.length > 0);
- },
-
- setRelatedEvents: function(eventSet) {
- this.cancelAllTasks_();
- this.eventGroups_ = [];
- this.addRuntimeCallStats_(eventSet);
- this.addV8GCObjectStats_(eventSet);
- this.addV8Slices_(eventSet);
- this.addConnectedFlows_(eventSet);
- this.addConnectedEvents_(eventSet);
- this.addOverlappingSamples_(eventSet);
- this.updateContents_();
- },
-
- addConnectedFlows_: function(eventSet) {
- var classifier = new tr.ui.analysis.FlowClassifier();
- eventSet.forEach(function(slice) {
- if (slice.inFlowEvents) {
- slice.inFlowEvents.forEach(function(flow) {
- classifier.addInFlow(flow);
- });
- }
- if (slice.outFlowEvents) {
- slice.outFlowEvents.forEach(function(flow) {
- classifier.addOutFlow(flow);
- });
- }
- });
- if (!classifier.hasEvents())
- return;
-
- var addToEventGroups = function(type, flowEvent) {
- this.eventGroups_.push({
- type: type,
- selection: new tr.model.EventSet(flowEvent),
- name: flowEvent.title
- });
- };
-
- classifier.inFlowEvents.forEach(
- addToEventGroups.bind(this, 'Incoming flow'));
- classifier.outFlowEvents.forEach(
- addToEventGroups.bind(this, 'Outgoing flow'));
- classifier.internalFlowEvents.forEach(
- addToEventGroups.bind(this, 'Internal flow'));
- },
-
- cancelAllTasks_: function() {
- this.cancelFunctions_.forEach(function(cancelFunction) {
- cancelFunction();
- });
- this.cancelFunctions_ = [];
- },
-
- addConnectedEvents_: function(eventSet) {
- this.cancelFunctions_.push(this.createEventsLinkIfNeeded_(
- 'Preceding events',
- 'Add all events that have led to the selected one(s), connected by ' +
- 'flow arrows or by call stack.',
- eventSet,
- function*(event) {
- yield * getEventInFlowEvents(event);
- yield * getEventAncestors(event);
- if (event.startSlice)
- yield event.startSlice;
- }.bind(this)));
- this.cancelFunctions_.push(this.createEventsLinkIfNeeded_(
- 'Following events',
- 'Add all events that have been caused by the selected one(s), ' +
- 'connected by flow arrows or by call stack.',
- eventSet,
- function*(event) {
- yield * getEventOutFlowEvents(event);
- yield * getEventDescendents(event);
- if (event.endSlice)
- yield event.endSlice;
- }.bind(this)));
- this.cancelFunctions_.push(this.createEventsLinkIfNeeded_(
- 'All connected events',
- 'Add all events connected to the selected one(s) by flow arrows or ' +
- 'by call stack.',
- eventSet,
- function*(event) {
- yield * getEventInFlowEvents(event);
- yield * getEventOutFlowEvents(event);
- yield * getEventAncestors(event);
- yield * getEventDescendents(event);
- if (event.startSlice)
- yield event.startSlice;
- if (event.endSlice)
- yield event.endSlice;
- }.bind(this)));
- },
-
- createEventsLinkIfNeeded_: function(title, tooltip, events, connectedFn) {
- events = new tr.model.EventSet(events);
- var eventsToProcess = new Set(events);
- // for (var event of events)
- // eventsToProcess.add(event);
- var wasChanged = false;
- var task;
- var isCanceled = false;
- function addEventsUntilTimeout() {
- if (isCanceled)
- return;
- // Let's grant ourselves a budget of 8 ms. If time runs out, then
- // create another task to do the rest.
- var timeout = window.performance.now() + 8;
- // TODO(alexandermont): Don't check window.performance.now
- // every iteration.
- while (eventsToProcess.size > 0 &&
- window.performance.now() <= timeout) {
- // Get the next event.
- var nextEvent = tr.b.getFirstElement(eventsToProcess);
- eventsToProcess.delete(nextEvent);
-
- // Add the connected events to the list.
- for (var eventToAdd of connectedFn(nextEvent)) {
- if (!events.contains(eventToAdd)) {
- events.push(eventToAdd);
- eventsToProcess.add(eventToAdd);
- wasChanged = true;
- }
- }
- }
- if (eventsToProcess.size > 0) {
- // There are still events to process, but we ran out of time. Post
- // more work for later.
- var newTask = new tr.b.Task(
- addEventsUntilTimeout.bind(this), this);
- task.after(newTask);
- task = newTask;
- return;
- }
- // Went through all events, add the link.
- if (!wasChanged)
- return;
- this.eventGroups_.push({
- type: title,
- tooltip: tooltip,
- selection: events
- });
- this.updateContents_();
- }
- function cancelTask() {
- isCanceled = true;
- }
- task = new tr.b.Task(addEventsUntilTimeout.bind(this), this);
- tr.b.Task.RunWhenIdle(task);
- return cancelTask;
- },
-
- addOverlappingSamples_: function(eventSet) {
- var samples = new tr.model.EventSet;
- for (var slice of eventSet) {
- if (!slice.parentContainer || !slice.parentContainer.samples)
- continue;
- var candidates = slice.parentContainer.samples;
- var range = tr.b.Range.fromExplicitRange(
- slice.start, slice.start + slice.duration);
- var filteredSamples = range.filterArray(
- candidates, function(value) {return value.start;});
- for (var sample of filteredSamples)
- samples.push(sample);
- }
- if (samples.length > 0) {
- this.eventGroups_.push({
- type: 'Overlapping samples',
- tooltip: 'All samples overlapping the selected slice(s).',
- selection: samples
- });
- }
- },
-
- addV8Slices_: function(eventSet) {
- var v8Slices = new tr.model.EventSet;
- for (var slice of eventSet) {
- if (slice.category === 'v8')
- v8Slices.push(slice);
- }
- if (v8Slices.length > 0) {
- this.eventGroups_.push({
- type: 'V8 Slices',
- tooltip: 'All V8 slices in the selected slice(s).',
- selection: v8Slices
- });
- }
- },
-
- addRuntimeCallStats_: function(eventSet) {
- var slices = new tr.model.EventSet;
- for (var slice of eventSet) {
- if (slice.category === 'v8' && slice.runtimeCallStats)
- slices.push(slice);
- }
- if (slices.length > 0) {
- this.eventGroups_.push({
- type: 'Runtime call stats table',
- // eslint-disable-next-line
- tooltip: 'All V8 slices containing runtime call stats table in the selected slice(s).',
- selection: slices
- });
- }
- },
-
- addV8GCObjectStats_: function(eventSet) {
- var slices = new tr.model.EventSet;
- for (var slice of eventSet) {
- if (slice.title === 'V8.GC_Objects_Stats')
- slices.push(slice);
- }
- if (slices.length > 0) {
- this.eventGroups_.push({
- type: 'V8 GC stats table',
- tooltip: 'All V8 GC statistics slices in the selected set.',
- selection: slices
- });
- }
- },
-
- updateContents_: function() {
- var table = this.$.table;
- if (this.eventGroups_ === undefined)
- table.tableRows = [];
- else
- table.tableRows = this.eventGroups_.slice();
- table.rebuild();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events_test.html
deleted file mode 100644
index d7b0107c145..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/related_events_test.html
+++ /dev/null
@@ -1,217 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/sample.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-<link rel="import" href="/tracing/ui/analysis/related_events.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newFlowEventEx = tr.c.TestUtils.newFlowEventEx;
-
- function createModel() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
-
- m.t2 = m.p1.getOrCreateThread(2);
- m.t3 = m.p1.getOrCreateThread(3);
- m.t4 = m.p1.getOrCreateThread(4);
-
- // Setup samples and slices in this way:
- // 0 5 10 15 20
- // _____________________________
- // t2 *
- // [ a ][ ]aa
- // -----------------------------
- // t3 * * * * *
- // * *
- // [ b ]
- // [bb]
- // []bbb
- // -----------------------------
- // t4 |c
- // -----------------------------
- m.samples.push(
- new tr.model.Sample(null, m.t3, 'b10_1', 10),
- new tr.model.Sample(null, m.t3, 'b7', 7),
- new tr.model.Sample(null, m.t3, 'b12', 12),
- new tr.model.Sample(null, m.t3, 'b20', 20),
- new tr.model.Sample(null, m.t3, 'b10_2', 10),
- new tr.model.Sample(null, m.t3, 'b15_1', 15),
- new tr.model.Sample(null, m.t3, 'b15_2', 15),
- new tr.model.Sample(null, m.t2, 'a12', 12)
- );
-
- m.sA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0, end: 5,
- type: tr.model.ThreadSlice}));
- m.sAA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'aa', start: 6, end: 8,
- type: tr.model.ThreadSlice}));
- m.sB = m.t3.sliceGroup.pushSlice(
- newSliceEx({title: 'b', start: 10, end: 15,
- type: tr.model.ThreadSlice}));
- m.sBB = m.t3.sliceGroup.pushSlice(
- newSliceEx({title: 'bb', start: 11, end: 14,
- type: tr.model.ThreadSlice}));
- m.sBBB = m.t3.sliceGroup.pushSlice(
- newSliceEx({title: 'bbb', start: 12, end: 13,
- type: tr.model.ThreadSlice}));
- m.sC = m.t4.sliceGroup.pushSlice(
- newSliceEx({title: 'c', start: 20, end: 20,
- type: tr.model.ThreadSlice}));
-
- m.t2.createSubSlices();
- m.t3.createSubSlices();
- m.t4.createSubSlices();
-
- // Add flow events.
- m.f0 = newFlowEventEx({
- 'title': 'a_aa', start: 5, end: 6,
- startSlice: m.sA,
- endSlice: m.sAA
- });
- m.f1 = newFlowEventEx({
- 'title': 'a_b', start: 0, end: 10,
- startSlice: m.sA,
- endSlice: m.sB
- });
- m.f2 = newFlowEventEx({
- 'title': 'b_bbb', start: 10, end: 12,
- startSlice: m.sB,
- endSlice: m.sBBB
- });
- m.f3 = newFlowEventEx({
- 'title': 'bbb_c', start: 13, end: 20,
- startSlice: m.sBBB,
- endSlice: m.sC
- });
- });
- return m;
- };
-
- test('instantiate', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-a-related-events');
- var selection = new tr.model.EventSet(
- [m.sA, m.f0, m.sAA, m.f1, m.sB, m.f2, m.sBB, m.sBBB, m.f3, m.sC]);
- viewEl.setRelatedEvents(selection);
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
-
- // Check that the element handles multiple setRelatedEvents calls correctly.
- assert.lengthOf(viewEl.$.table.tableRows, 5);
- viewEl.setRelatedEvents(selection);
- assert.lengthOf(viewEl.$.table.tableRows, 5);
- });
-
- test('validateFlows', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-a-related-events');
- viewEl.setRelatedEvents(new tr.model.EventSet([m.sB, m.sBB, m.sBBB]));
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
-
- var inFlows, outFlows, internalFlows;
- viewEl.$.table.tableRows.forEach(function(row) {
- if (row.type === 'Incoming flow') {
- assert.isUndefined(inFlows);
- inFlows = row.selection;
- }
- if (row.type === 'Outgoing flow') {
- assert.isUndefined(outFlows);
- outFlows = row.selection;
- }
- if (row.type === 'Internal flow') {
- assert.isUndefined(internalFlows);
- internalFlows = row.selection;
- }
- });
- assert.equal(inFlows.length, 1);
- assert.equal(tr.b.getOnlyElement(inFlows).title, 'a_b');
- assert.equal(outFlows.length, 1);
- assert.equal(tr.b.getOnlyElement(outFlows).title, 'bbb_c');
- assert.equal(internalFlows.length, 1);
- assert.equal(tr.b.getOnlyElement(internalFlows).title, 'b_bbb');
- });
-
- test('validateConnectedEvents', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-a-related-events');
- viewEl.setRelatedEvents(new tr.model.EventSet([m.sBB]));
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
-
- var precedingEvents, followingEvents, allEvents;
- viewEl.$.table.tableRows.forEach(function(row) {
- if (row.type === 'Preceding events') {
- assert.isUndefined(precedingEvents);
- precedingEvents = row.selection;
- }
- if (row.type === 'Following events') {
- assert.isUndefined(followingEvents);
- followingEvents = row.selection;
- }
- if (row.type === 'All connected events') {
- assert.isUndefined(allEvents);
- allEvents = row.selection;
- }
- });
-
- var precedingTitles = precedingEvents.map(function(e) {
- return e.title;
- });
- assert.sameMembers(precedingTitles, ['a', 'a_b', 'b', 'bb']);
-
- var followingTitles = followingEvents.map(function(e) {
- return e.title;
- });
- assert.sameMembers(followingTitles, ['bb', 'bbb', 'bbb_c', 'c']);
-
- var allTitles = allEvents.map(function(e) {
- return e.title;
- });
- assert.sameMembers(allTitles,
- ['a', 'a_aa', 'aa', 'a_b', 'b', 'bb', 'bbb', 'b_bbb', 'bbb_c', 'c']);
- });
-
- test('validateOverlappingSamples', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-a-related-events');
- viewEl.setRelatedEvents(new tr.model.EventSet([m.sB]));
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
-
- var overlappingSamples;
- viewEl.$.table.tableRows.forEach(function(row) {
- if (row.type === 'Overlapping samples') {
- assert.isUndefined(overlappingSamples);
- overlappingSamples = row.selection;
- }
- });
-
- var samplesTitles = overlappingSamples.map(function(e) {
- return e.title;
- });
- assert.sameMembers(samplesTitles,
- ['b10_1', 'b10_2', 'b12', 'b15_1', 'b15_2']);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table.html
deleted file mode 100644
index f4f2b62af06..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-selection-summary-table'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table">
- </tr-ui-b-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-selection-summary-table',
- created: function() {
- this.selection_ = new tr.b.Range();
- },
-
- ready: function() {
- this.$.table.showHeader = false;
- this.$.table.tableColumns = [
- {
- title: 'Name',
- value: function(row) { return row.title; },
- width: '350px'
- },
- {
- title: 'Value',
- width: '100%',
- value: function(row) {
- return row.value;
- }
- }
- ];
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- this.selection_ = selection;
- this.updateContents_();
- },
-
- updateContents_: function() {
- var selection = this.selection_;
- var rows = [];
- var hasRange;
- if (this.selection_ && (!selection.bounds.isEmpty))
- hasRange = true;
- else
- hasRange = false;
-
- rows.push({
- title: 'Selection start',
- value: hasRange ? tr.v.ui.createScalarSpan(
- selection.bounds.min, {
- unit: tr.b.Unit.byName.timeStampInMs,
- ownerDocument: this.ownerDocument
- }) : '<empty>'
- });
- rows.push({
- title: 'Selection extent',
- value: hasRange ? tr.v.ui.createScalarSpan(
- selection.bounds.range, {
- unit: tr.b.Unit.byName.timeDurationInMs,
- ownerDocument: this.ownerDocument
- }) : '<empty>'
- });
-
- this.$.table.tableRows = rows;
- this.$.table.rebuild();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table_test.html
deleted file mode 100644
index d8332b5a17e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/selection_summary_table_test.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/selection_summary_table.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var EventSet = tr.model.EventSet;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('noSelection', function() {
- var summaryTable =
- document.createElement('tr-ui-a-selection-summary-table');
- summaryTable.selection = undefined;
- this.addHTMLOutput(summaryTable);
-
- var tableEl = tr.b.findDeepElementMatching(
- summaryTable, 'tr-ui-b-table');
- assert.equal(tableEl.tableRows[0].value, '<empty>');
- assert.equal(tableEl.tableRows[1].value, '<empty>');
- });
-
- test('emptySelection', function() {
- var summaryTable =
- document.createElement('tr-ui-a-selection-summary-table');
- var selection = new EventSet();
- summaryTable.selection = selection;
- this.addHTMLOutput(summaryTable);
-
- var tableEl = tr.b.findDeepElementMatching(
- summaryTable, 'tr-ui-b-table');
- assert.equal(tableEl.tableRows[0].value, '<empty>');
- assert.equal(tableEl.tableRows[1].value, '<empty>');
- });
-
- test('selection', function() {
- var model = new Model();
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- var tsg = thread.sliceGroup;
-
- tsg.pushSlice(newSliceEx({title: 'a', start: 0, end: 3}));
- tsg.pushSlice(newSliceEx({title: 'b', start: 1, end: 2}));
-
- var selection = new EventSet();
- selection.push(tsg.slices[0]);
- selection.push(tsg.slices[1]);
-
- var summaryTable =
- document.createElement('tr-ui-a-selection-summary-table');
- summaryTable.selection = selection;
- this.addHTMLOutput(summaryTable);
-
- var tableEl = tr.b.findDeepElementMatching(
- summaryTable, 'tr-ui-b-table');
- assert.equal(tableEl.tableRows[0].value.value, 0);
- assert.strictEqual(tableEl.tableRows[0].value.unit,
- tr.b.Unit.byName.timeStampInMs);
- assert.equal(tableEl.tableRows[1].value.value, 3);
- assert.strictEqual(tableEl.tableRows[1].value.unit,
- tr.b.Unit.byName.timeDurationInMs);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view.html
deleted file mode 100644
index b2238040827..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/related_events.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-
-<dom-module id='tr-ui-a-single-async-slice-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- }
- #events {
- display:flex;
- flex-direction: column;
- }
- </style>
- <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
- <div id="events">
- <tr-ui-a-related-events id="relatedEvents"></tr-ui-a-related-events>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-async-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- if (selection.length !== 1)
- throw new Error('Only supports single slices');
- this.$.content.setSelectionWithoutErrorChecks(selection);
- this.$.relatedEvents.setRelatedEvents(selection);
- if (this.$.relatedEvents.hasRelatedEvents()) {
- this.$.relatedEvents.style.display = '';
- } else {
- this.$.relatedEvents.style.display = 'none';
- }
- },
-
- getEventRows_: function(event) {
- // TODO(nduca): Figure out if there is a cleaner way to do this.
- var rows = this.__proto__.__proto__.getEventRows_(event);
-
- // Put the ID up top.
- rows.splice(0, 0, {
- name: 'ID',
- value: event.id
- });
- return rows;
- },
-
- get relatedEventsToHighlight() {
- if (!this.currentSelection_)
- return undefined;
- return tr.b.getOnlyElement(this.currentSelection_).associatedEvents;
- }
-});
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-async-slice-sub-view',
- tr.model.AsyncSlice,
- {
- multi: false,
- title: 'Async Slice',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view_test.html
deleted file mode 100644
index cc83a239bab..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_async_slice_sub_view_test.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_async_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newAsyncSliceEx = tr.c.TestUtils.newAsyncSliceEx;
-
- test('instantiate', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.asyncSliceGroup.push(newAsyncSliceEx({
- id: 31415,
- title: 'a',
- start: 10,
- duration: 20,
- startThread: t1,
- endThread: t1
- }));
-
- var selection = new tr.model.EventSet();
- selection.push(t1.asyncSliceGroup.slices[0]);
-
- var viewEl = document.createElement('tr-ui-a-single-async-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view.html
deleted file mode 100644
index a4f98dd255f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-single-cpu-slice-sub-view'>
- <template>
- <style>
- table {
- border-collapse: collapse;
- border-width: 0;
- margin-bottom: 25px;
- width: 100%;
- }
-
- table tr > td:first-child {
- padding-left: 2px;
- }
-
- table tr > td {
- padding: 2px 4px 2px 4px;
- vertical-align: text-top;
- width: 150px;
- }
-
- table td td {
- padding: 0 0 0 0;
- width: auto;
- }
- tr {
- vertical-align: top;
- }
-
- tr:nth-child(2n+0) {
- background-color: #e2e2e2;
- }
- </style>
- <table>
- <tr>
- <td>Running process:</td><td id="process-name"></td>
- </tr>
- <tr>
- <td>Running thread:</td><td id="thread-name"></td>
- </tr>
- <tr>
- <td>Start:</td>
- <td>
- <tr-v-ui-scalar-span id="start">
- </tr-v-ui-scalar-span>
- </td>
- </tr>
- <tr>
- <td>Duration:</td>
- <td>
- <tr-v-ui-scalar-span id="duration">
- </tr-v-ui-scalar-span>
- </td>
- </tr>
- <tr>
- <td>Active slices:</td><td id="running-thread"></td>
- </tr>
- <tr>
- <td>Args:</td>
- <td>
- <tr-ui-a-generic-object-view id="args">
- </tr-ui-a-generic-object-view>
- </td>
- </tr>
- </table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-cpu-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- var cpuSlice = tr.b.getOnlyElement(selection);
- if (!(cpuSlice instanceof tr.model.CpuSlice))
- throw new Error('Only supports thread time slices');
-
- this.currentSelection_ = selection;
-
- var thread = cpuSlice.threadThatWasRunning;
-
- var root = Polymer.dom(this.root);
- if (thread) {
- Polymer.dom(root.querySelector('#process-name')).textContent =
- thread.parent.userFriendlyName;
- Polymer.dom(root.querySelector('#thread-name')).textContent =
- thread.userFriendlyName;
- } else {
- root.querySelector('#process-name').parentElement.style.display =
- 'none';
- Polymer.dom(root.querySelector('#thread-name')).textContent =
- cpuSlice.title;
- }
-
- root.querySelector('#start').setValueAndUnit(
- cpuSlice.start, tr.b.Unit.byName.timeStampInMs);
- root.querySelector('#duration').setValueAndUnit(
- cpuSlice.duration, tr.b.Unit.byName.timeDurationInMs);
-
- var runningThreadEl = root.querySelector('#running-thread');
-
- var timeSlice = cpuSlice.getAssociatedTimeslice();
- if (!timeSlice) {
- runningThreadEl.parentElement.style.display = 'none';
- } else {
- var threadLink = document.createElement('tr-ui-a-analysis-link');
- threadLink.selection = new tr.model.EventSet(timeSlice);
- Polymer.dom(threadLink).textContent = 'Click to select';
- runningThreadEl.parentElement.style.display = '';
- Polymer.dom(runningThreadEl).textContent = '';
- Polymer.dom(runningThreadEl).appendChild(threadLink);
- }
-
- root.querySelector('#args').object = cpuSlice.args;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-cpu-slice-sub-view',
- tr.model.CpuSlice,
- {
- multi: false,
- title: 'CPU Slice',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view_test.html
deleted file mode 100644
index e3170dccb51..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_cpu_slice_sub_view_test.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_cpu_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createBasicModel() {
- var lines = [
- 'Android.launcher-584 [001] d..3 12622.506890: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D ==> next_comm=Android.launcher next_pid=584 next_prio=120', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..4 12622.506936: sched_wakeup: comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..3 12622.506950: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: B|128|queueBuffer', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ==> next_comm=Android.launcher next_pid=584 next_prio=120' // @suppress longLineCheck
- ];
-
- return tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- }
-
- test('cpuSliceView_withCpuSliceOnExistingThread', function() {
- var m = createBasicModel();
-
- var cpu = m.kernel.cpus[1];
- assert.isDefined(cpu);
- var cpuSlice = cpu.slices[0];
- assert.equal('Binder_1', cpuSlice.title);
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
- assert.isDefined(thread);
- assert.equal(cpuSlice.threadThatWasRunning, thread);
-
- var view = document.createElement('tr-ui-a-single-cpu-slice-sub-view');
- var selection = new tr.model.EventSet();
- selection.push(cpuSlice);
- view.selection = selection;
- this.addHTMLOutput(view);
-
- // Clicking the analysis link should focus the Binder1's timeslice.
- var didSelectionChangeHappen = false;
- view.addEventListener('requestSelectionChange', function(e) {
- assert.isTrue(e.selection.equals(
- new tr.model.EventSet(thread.timeSlices[0])));
- didSelectionChangeHappen = true;
- });
- Polymer.dom(view.root).querySelector('tr-ui-a-analysis-link').click();
- assert.isTrue(didSelectionChangeHappen);
- });
-
- test('cpuSliceViewWithCpuSliceOnMissingThread', function() {
- var m = createBasicModel();
-
- var cpu = m.kernel.cpus[1];
- assert.isDefined(cpu);
- var cpuSlice = cpu.slices[1];
- assert.equal('Android.launcher', cpuSlice.title);
- assert.isUndefined(cpuSlice.thread);
-
- var selection = new tr.model.EventSet();
- selection.push(cpuSlice);
-
- var view = document.createElement('tr-ui-a-single-cpu-slice-sub-view');
- view.selection = selection;
- this.addHTMLOutput(view);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view.html
deleted file mode 100644
index 55a5b0d1927..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view.html
+++ /dev/null
@@ -1,342 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/analysis/stack_frame.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-single-event-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table">
- </tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-event-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- properties: {
- isFlow: {
- type: Boolean,
- value: false
- }
- },
-
- ready: function() {
- this.currentSelection_ = undefined;
- this.$.table.tableColumns = [
- {
- title: 'Label',
- value: function(row) { return row.name; },
- width: '150px'
- },
- {
- title: 'Value',
- width: '100%',
- value: function(row) { return row.value; }
- }
- ];
- this.$.table.showHeader = false;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- if (selection.length !== 1)
- throw new Error('Only supports single slices');
- this.setSelectionWithoutErrorChecks(selection);
- },
-
- setSelectionWithoutErrorChecks: function(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- getFlowEventRows_: function(event) {
- // TODO(nduca): Figure out if there is a cleaner way to do this.
-
- var rows = this.getEventRowsHelper_(event);
- // var rows = this.__proto__.__proto__.getEventRows_(event);
-
- // Put the ID up top.
- rows.splice(0, 0, {
- name: 'ID',
- value: event.id
- });
-
- function createLinkTo(slice) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(function() {
- return new tr.model.EventSet(slice);
- });
- Polymer.dom(linkEl).textContent = slice.userFriendlyName;
- return linkEl;
- }
-
- rows.push({
- name: 'From',
- value: createLinkTo(event.startSlice)
- });
- rows.push({
- name: 'To',
- value: createLinkTo(event.endSlice)
- });
- return rows;
- },
-
- getEventRowsHelper_: function(event) {
- var rows = [];
-
- if (event.error)
- rows.push({ name: 'Error', value: event.error });
-
- if (event.title)
- rows.push({ name: 'Title', value: event.title });
-
- if (event.category)
- rows.push({ name: 'Category', value: event.category });
-
- if (event.model !== undefined) {
- var ufc = event.model.getUserFriendlyCategoryFromEvent(event);
- if (ufc !== undefined)
- rows.push({ name: 'User Friendly Category', value: ufc });
- }
-
- if (event.name)
- rows.push({ name: 'Name', value: event.name });
-
- rows.push({
- name: 'Start',
- value: tr.v.ui.createScalarSpan(event.start, {
- unit: tr.b.Unit.byName.timeStampInMs
- })
- });
-
- if (event.duration) {
- rows.push({
- name: 'Wall Duration',
- value: tr.v.ui.createScalarSpan(event.duration, {
- unit: tr.b.Unit.byName.timeDurationInMs
- })
- });
- }
-
- if (event.cpuDuration) {
- rows.push({
- name: 'CPU Duration',
- value: tr.v.ui.createScalarSpan(event.cpuDuration, {
- unit: tr.b.Unit.byName.timeDurationInMs
- })
- });
- }
-
- if (event.subSlices !== undefined && event.subSlices.length !== 0) {
- if (event.selfTime) {
- rows.push({
- name: 'Self Time',
- value: tr.v.ui.createScalarSpan(event.selfTime, {
- unit: tr.b.Unit.byName.timeDurationInMs
- })
- });
- }
-
- if (event.cpuSelfTime) {
- var cpuSelfTimeEl = tr.v.ui.createScalarSpan(event.cpuSelfTime, {
- unit: tr.b.Unit.byName.timeDurationInMs
- });
- if (event.cpuSelfTime > event.selfTime) {
- cpuSelfTimeEl.warning =
- ' Note that CPU Self Time is larger than Self Time. ' +
- 'This is a known limitation of this system, which occurs ' +
- 'due to several subslices, rounding issues, and imprecise ' +
- 'time at which we get cpu- and real-time.';
- }
- rows.push({ name: 'CPU Self Time', value: cpuSelfTimeEl });
- }
- }
-
- if (event.durationInUserTime) {
- rows.push({
- name: 'Duration (U)',
- value: tr.v.ui.createScalarSpan(event.durationInUserTime, {
- unit: tr.b.Unit.byName.timeDurationInMs
- })
- });
- }
-
- function createStackFrameEl(sf) {
- var sfEl = document.createElement('tr-ui-a-stack-frame');
- sfEl.stackFrame = sf;
- return sfEl;
- }
- if (event.startStackFrame && event.endStackFrame) {
- if (event.startStackFrame === event.endStackFrame) {
- rows.push({name: 'Start+End Stack Trace',
- value: createStackFrameEl(event.startStackFrame)});
-
- } else {
- rows.push({ name: 'Start Stack Trace',
- value: createStackFrameEl(event.startStackFrame)});
- rows.push({ name: 'End Stack Trace',
- value: createStackFrameEl(event.endStackFrame)});
- }
- } else if (event.startStackFrame) {
- rows.push({ name: 'Start Stack Trace',
- value: createStackFrameEl(event.startStackFrame)});
-
- } else if (event.endStackFrame) {
- rows.push({ name: 'End Stack Trace',
- value: createStackFrameEl(event.endStackFrame)});
- }
-
- if (event.info) {
- var descriptionEl = tr.ui.b.createDiv({
- textContent: event.info.description,
- maxWidth: '300px'
- });
- rows.push({
- name: 'Description',
- value: descriptionEl
- });
-
-
- if (event.info.docLinks) {
- event.info.docLinks.forEach(function(linkObject) {
- var linkEl = document.createElement('a');
- linkEl.target = '_blank';
- linkEl.href = linkObject.href;
- Polymer.dom(linkEl).textContent = Polymer.dom(linkObject).textContent;
- rows.push({
- name: linkObject.label,
- value: linkEl
- });
- });
- }
- }
-
- if (event.associatedAlerts.length) {
- var alertSubRows = [];
- event.associatedAlerts.forEach(function(alert) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(function() {
- return new tr.model.EventSet(alert);
- }, alert.info.description);
- alertSubRows.push({
- name: alert.title,
- value: linkEl
- });
- });
-
- rows.push({
- name: 'Alerts', value: '',
- isExpanded: true, subRows: alertSubRows
- });
- }
- return rows;
- },
-
- getEventRows_: function(event) {
-
- if (this.isFlow)
- return this.getFlowEventRows_(event);
-
- return this.getEventRowsHelper_(event);
- },
-
- addArgsToRows_: function(rows, args) {
- var n = 0;
- for (var argName in args) {
- n += 1;
- }
- if (n > 0) {
- var subRows = [];
- for (var argName in args) {
- n += 1;
- }
- if (n > 0) {
- var subRows = [];
- for (var argName in args) {
- var argView =
- document.createElement('tr-ui-a-generic-object-view');
- argView.object = args[argName];
- subRows.push({name: argName, value: argView});
- }
- rows.push({
- name: 'Args',
- value: '',
- isExpanded: true,
- subRows: subRows
- });
- }
- }
- },
-
- addContextsToRows_: function(rows, contexts) {
- if (contexts.length) {
- var subRows = contexts.map(function(context) {
- var contextView =
- document.createElement('tr-ui-a-generic-object-view');
- contextView.object = context;
- return {name: 'Context', value: contextView};
- });
- rows.push({
- name: 'Contexts',
- value: '',
- isExpanded: true,
- subRows: subRows
- });
- }
- },
-
- updateContents_: function() {
- if (this.currentSelection_ === undefined) {
- this.$.table.rows = [];
- this.$.table.rebuild();
- return;
- }
-
- var event = tr.b.getOnlyElement(this.currentSelection_);
-
- var rows = this.getEventRows_(event);
- if (event.argsStripped)
- rows.push({ name: 'Args', value: 'Stripped' });
- else
- this.addArgsToRows_(rows, event.args);
- this.addContextsToRows_(rows, event.contexts);
-
- var customizeRowsEvent = new tr.b.Event('customize-rows');
- customizeRowsEvent.rows = rows;
- this.dispatchEvent(customizeRowsEvent);
-
- this.$.table.tableRows = rows;
- this.$.table.rebuild();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view_test.html
deleted file mode 100644
index 0a3d481a2d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_event_sub_view_test.html
+++ /dev/null
@@ -1,263 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var Thread = tr.model.Thread;
- var EventSet = tr.model.EventSet;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- function createSelection(customizeThreadCallback) {
- var model = tr.c.TestUtils.newModelWithEvents([], {
- customizeModelCallback: function(model) {
- var t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- customizeThreadCallback(t53, model);
- }
- });
-
- var t53 = model.processes[52].threads[53];
- var t53track = {};
- t53track.thread = t53;
-
- var selection = new EventSet();
- selection.push(t53.sliceGroup.slices[0]);
- assert.equal(selection.length, 1);
-
- return selection;
- }
-
- function createSelectionWithSingleSlice(opt_options) {
- var options = opt_options || {};
- return createSelection(function(t53, model) {
- if (options.withStartStackFrame || options.withEndStackFrame) {
- var fA = tr.c.TestUtils.newStackTrace(model, ['a1', 'a2']);
- var fB = tr.c.TestUtils.newStackTrace(model, ['b1', 'b2']);
- }
-
- var slice = newSliceEx({title: 'b', start: 0, duration: 0.002});
- slice.category = options.withCategory ? 'foo' : '';
-
- if (options.withStartStackFrame)
- slice.startStackFrame = options.withStartStackFrame === 'a' ? fA : fB;
-
- if (options.withEndStackFrame)
- slice.endStackFrame = options.withEndStackFrame === 'a' ? fA : fB;
-
- t53.sliceGroup.pushSlice(slice);
- });
- }
-
- test('instantiate_withSingleSlice', function() {
- var selection = createSelectionWithSingleSlice();
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
- });
-
- test('alerts', function() {
- var slice = newSliceEx({title: 'b', start: 0, duration: 0.002});
-
- var ALERT_INFO_1 = new tr.model.EventInfo(
- 'Alert 1', 'Critical alert');
-
- var alert = new tr.model.Alert(ALERT_INFO_1, 5, [slice]);
-
- var selection = new EventSet();
- selection.push(slice);
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
- });
-
- test('instantiate_withSingleSliceWithArg', function() {
- var selection = createSelection(function(t53) {
- var slice = newSliceEx({title: 'my_slice', start: 0, duration: 1.0});
- slice.args = {
- 'complex': {
- 'b': '2 as a string',
- 'c': [3, 4, 5]
- }
- };
- t53.sliceGroup.pushSlice(slice);
- });
-
- var subView = document.createElement('tr-ui-a-single-event-sub-view');
- subView.selection = selection;
- this.addHTMLOutput(subView);
-
- var gov = tr.b.findDeepElementMatching(subView,
- 'tr-ui-a-generic-object-view');
- assert.isDefined(gov);
- });
-
-
- test('instantiate_withSingleSliceCategory', function() {
- var selection = createSelectionWithSingleSlice({withCategory: true});
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
- });
-
- test('instantiate_withSingleStartStackFrame', function() {
- var selection = createSelectionWithSingleSlice(
- {withStartStackFrame: 'a'});
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
-
- var e = tr.b.findDeepElementWithTextContent(
- analysisEl, /Start Stack Trace/);
- assert.isDefined(e);
- assert.isDefined(Polymer.dom(e).nextSibling.children[0].stackFrame);
- });
-
- test('instantiate_withSingleEndStackFrame', function() {
- var selection = createSelectionWithSingleSlice(
- {withEndStackFrame: 'b'});
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
-
- var e = tr.b.findDeepElementWithTextContent(
- analysisEl, /End Stack Trace/);
- assert.isDefined(e);
- assert.isDefined(Polymer.dom(e).nextSibling.children[0].stackFrame);
- assert.equal(Polymer.dom(e).nextSibling.children[0].stackFrame.title, 'b2');
- });
-
- test('instantiate_withDifferentStartAndEndStackFrames', function() {
- var selection = createSelectionWithSingleSlice(
- {withStartStackFrame: 'a',
- withEndStackFrame: 'b'});
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
-
- var eA = tr.b.findDeepElementWithTextContent(
- analysisEl, /Start Stack Trace/);
- assert.isDefined(eA);
- assert.isDefined(Polymer.dom(eA).nextSibling.children[0].stackFrame);
- assert.equal(
- Polymer.dom(eA).nextSibling.children[0].stackFrame.title, 'a2');
-
- var eB = tr.b.findDeepElementWithTextContent(
- analysisEl, /End Stack Trace/);
- assert.isDefined(eB);
- assert.isDefined(Polymer.dom(eB).nextSibling.children[0].stackFrame);
- assert.equal(
- Polymer.dom(eB).nextSibling.children[0].stackFrame.title, 'b2');
- });
-
- test('instantiate_withSameStartAndEndStackFrames', function() {
- var selection = createSelectionWithSingleSlice(
- {withStartStackFrame: 'a',
- withEndStackFrame: 'a'});
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
-
- var e = tr.b.findDeepElementWithTextContent(
- analysisEl, /Start\+End Stack Trace/);
- assert.isDefined(e);
- assert.isDefined(Polymer.dom(e).nextSibling.children[0].stackFrame);
- assert.equal(Polymer.dom(e).nextSibling.children[0].stackFrame.title, 'a2');
- });
-
- test('analyzeSelectionWithSingleSlice', function() {
- var selection = createSelectionWithSingleSlice();
- var subView = document.createElement('tr-ui-a-single-event-sub-view');
- subView.selection = selection;
- this.addHTMLOutput(subView);
-
- var table = tr.b.findDeepElementMatching(
- subView, 'tr-ui-b-table');
- assert.equal(table.tableRows.length, 3);
- assert.equal(table.tableRows[0].value, 'b');
- assert.equal(table.tableRows[1].value.value, 0);
- assert.strictEqual(table.tableRows[1].value.unit,
- tr.b.Unit.byName.timeStampInMs);
- assert.equal(table.tableRows[2].value.value, 0.002);
- assert.strictEqual(table.tableRows[2].value.unit,
- tr.b.Unit.byName.timeDurationInMs);
- });
-
- test('analyzeSelectionWithSingleSliceCategory', function() {
- var selection = createSelectionWithSingleSlice({withCategory: true});
-
- var subView = document.createElement('tr-ui-a-single-event-sub-view');
- subView.selection = selection;
- this.addHTMLOutput(subView);
-
- var table = tr.b.findDeepElementMatching(
- subView, 'tr-ui-b-table');
- assert.equal(table.tableRows.length, 4);
- assert.equal(table.tableRows[0].value, 'b');
- assert.equal(table.tableRows[1].value, 'foo');
- assert.equal(table.tableRows[2].value.value, 0);
- assert.strictEqual(table.tableRows[2].value.unit,
- tr.b.Unit.byName.timeStampInMs);
- assert.equal(table.tableRows[3].value.value, 0.002);
- assert.strictEqual(table.tableRows[3].value.unit,
- tr.b.Unit.byName.timeDurationInMs);
- });
-
- test('instantiate_withSingleSliceContainingIDRef', function() {
- var model = new Model();
- var p1 = model.getOrCreateProcess(1);
- var myObjectSlice = p1.objects.addSnapshot(
- '0x1000', 'cat', 'my_object', 0);
-
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(newSliceEx({title: 'b', start: 0, duration: 2}));
- t1.sliceGroup.slices[0].args.my_object = myObjectSlice;
-
- var t1track = {};
- t1track.thread = t1;
-
- var selection = new EventSet();
- selection.push(t1.sliceGroup.slices[0]);
- assert.equal(selection.length, 1);
-
- var subView = document.createElement('tr-ui-a-single-event-sub-view');
- subView.selection = selection;
- this.addHTMLOutput(subView);
-
- var analysisLink = tr.b.findDeepElementMatching(subView,
- 'tr-ui-a-analysis-link');
- assert.isDefined(analysisLink);
- });
-
- test('instantiate_withSingleSliceContainingInfo', function() {
- var slice = newSliceEx({title: 'b', start: 0, duration: 1});
- slice.info = new tr.model.EventInfo(
- 'Info title', 'Description');
-
- var selection = new EventSet();
- selection.push(slice);
-
- var analysisEl = document.createElement('tr-ui-a-single-event-sub-view');
- analysisEl.selection = selection;
- this.addHTMLOutput(analysisEl);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view.html
deleted file mode 100644
index ae6497b7c69..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-
-<dom-module id="tr-ui-a-single-flow-event-sub-view">
- <template>
- <style>
- :host {
- display: block;
- }
- </style>
- <tr-ui-a-single-event-sub-view id="singleEventSubView">
- </tr-ui-a-single-event-sub-view>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-function createAnalysisLinkTo(event) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(
- new tr.model.EventSet(event), event.userFriendlyName);
- return linkEl;
-}
-
-Polymer({
- is: 'tr-ui-a-single-flow-event-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- listeners: {
- 'singleEventSubView.customize-rows': 'onCustomizeRows_'
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.$.singleEventSubView.setSelectionWithoutErrorChecks(selection);
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- /**
- * Event handler for an event that's fired after the single event sub view has
- * finished row construction. This hook gives us the opportunity to customize
- * the rows present in the sub view.
- */
- onCustomizeRows_: function(e) {
- var event = tr.b.getOnlyElement(this.currentSelection_);
- var rows = e.rows;
-
- rows.unshift({
- name: 'ID',
- value: event.id
- });
- rows.push({
- name: 'From',
- value: createAnalysisLinkTo(event.startSlice)
- });
- rows.push({
- name: 'To',
- value: createAnalysisLinkTo(event.endSlice)
- });
- }
-});
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-flow-event-sub-view',
- tr.model.FlowEvent,
- {
- multi: false,
- title: 'Flow Event',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view_test.html
deleted file mode 100644
index b4125fae2ac..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_flow_event_sub_view_test.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var EventSet = tr.model.EventSet;
- var TestUtils = tr.c.TestUtils;
-
- test('analyzeSelectionWithSingleEvent', function() {
- var model = TestUtils.newModel(function(model) {
- model.p1 = model.getOrCreateProcess(1);
- model.t2 = model.p1.getOrCreateThread(model.p1);
- model.sA = model.t2.sliceGroup.pushSlice(TestUtils.newSliceEx({
- title: 'a', start: 0, end: 2
- }));
- model.sB = model.t2.sliceGroup.pushSlice(TestUtils.newSliceEx({
- title: 'b', start: 9, end: 11
- }));
- model.fe = TestUtils.newFlowEventEx({
- cat: 'cat',
- id: 1234,
- title: 'MyFlow',
- start: 1,
- end: 10,
- startSlice: model.sA,
- endSlice: model.sB
- });
- model.flowEvents.push(model.fe);
- });
-
- var selection = new EventSet();
- selection.push(model.fe);
- assert.equal(selection.length, 1);
-
- var subView = document.createElement('tr-ui-a-single-event-sub-view');
- subView.isFlow = true;
- subView.selection = selection;
- this.addHTMLOutput(subView);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_frame_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_frame_sub_view.html
deleted file mode 100644
index 8edcaa5203a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_frame_sub_view.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/analysis/alert_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-
-<dom-module id='tr-ui-a-single-frame-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- #asv {
- flex: 0 0 auto;
- align-self: stretch;
- }
- </style>
- <tr-ui-a-alert-sub-view id="asv">
- </tr-ui-a-alert-sub-view>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-frame-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.currentSelection_ = undefined;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.$.asv.selection = tr.b.getOnlyElement(selection).associatedAlerts;
- },
-
- get relatedEventsToHighlight() {
- if (!this.currentSelection_)
- return undefined;
- return tr.b.getOnlyElement(this.currentSelection_).associatedEvents;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-frame-sub-view',
- tr.model.Frame,
- {
- multi: false,
- title: 'Frame',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view.html
deleted file mode 100644
index 84972063550..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-
-<dom-module id='tr-ui-a-single-instant-event-sub-view'>
- <template>
- <style>
- :host {
- display: block;
- }
- </style>
- <div id='content'></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-instant-event-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- set selection(selection) {
- Polymer.dom(this.$.content).textContent = '';
- var realView = document.createElement('tr-ui-a-single-event-sub-view');
- realView.setSelectionWithoutErrorChecks(selection);
-
- Polymer.dom(this.$.content).appendChild(realView);
-
- this.currentSelection_ = selection;
- },
-
- get selection() {
- return this.currentSelection_;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-instant-event-sub-view',
- tr.model.InstantEvent,
- {
- multi: false,
- title: 'Instant Event',
- });
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-multi-instant-event-sub-view',
- tr.model.InstantEvent,
- {
- multi: true,
- title: 'Instant Events',
- });
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view_test.html
deleted file mode 100644
index f796164669f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_instant_event_sub_view_test.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var Thread = tr.model.Thread;
- var EventSet = tr.model.EventSet;
-
- test('analyzeSelectionWithSingleEvent', function() {
- var model = new Model();
- var p52 = model.getOrCreateProcess(52);
- var t53 = p52.getOrCreateThread(53);
-
- var ie = new tr.model.ProcessInstantEvent('cat', 'title', 7, 10, {});
- ie.duration = 20;
- p52.instantEvents.push(ie);
-
-
- var selection = new EventSet();
- selection.push(ie);
- assert.equal(selection.length, 1);
-
- var subView = document.createElement(
- 'tr-ui-a-single-instant-event-sub-view');
- subView.selection = selection;
-
- this.addHTMLOutput(subView);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view.html
deleted file mode 100644
index c450bbcc9e9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_instance_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-
-<dom-module id='tr-ui-a-single-object-instance-sub-view'>
- <template>
- <style>
- :host {
- display: block;
- }
-
- #snapshots > * {
- display: block;
- }
-
- :host {
- overflow: auto;
- display: block;
- }
-
- * {
- -webkit-user-select: text;
- }
-
- .title {
- border-bottom: 1px solid rgb(128, 128, 128);
- font-size: 110%;
- font-weight: bold;
- }
-
- td, th {
- font-family: monospace;
- vertical-align: top;
- }
- </style>
- <div id='content'></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-object-instance-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- get requiresTallView() {
- if (this.$.content.children.length === 0)
- return false;
- if (this.$.content.children[0] instanceof
- tr.ui.analysis.ObjectInstanceView)
- return this.$.content.children[0].requiresTallView;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- var instance = tr.b.getOnlyElement(selection);
- if (!(instance instanceof tr.model.ObjectInstance))
- throw new Error('Only supports object instances');
-
- Polymer.dom(this.$.content).textContent = '';
- this.currentSelection_ = selection;
-
- var typeInfo = tr.ui.analysis.ObjectInstanceView.getTypeInfo(
- instance.category, instance.typeName);
- if (typeInfo) {
- var customView = new typeInfo.constructor();
- Polymer.dom(this.$.content).appendChild(customView);
- customView.modelEvent = instance;
- } else {
- this.appendGenericAnalysis_(instance);
- }
- },
-
- appendGenericAnalysis_: function(instance) {
- var html = '';
- html += '<div class="title">' +
- instance.typeName + ' ' +
- instance.id + '</div>\n';
- html += '<table>';
- html += '<tr>';
- html += '<tr><td>creationTs:</td><td>' +
- instance.creationTs + '</td></tr>\n';
- if (instance.deletionTs !== Number.MAX_VALUE) {
- html += '<tr><td>deletionTs:</td><td>' +
- instance.deletionTs + '</td></tr>\n';
- } else {
- html += '<tr><td>deletionTs:</td><td>not deleted</td></tr>\n';
- }
- html += '<tr><td>snapshots:</td><td id="snapshots"></td></tr>\n';
- html += '</table>';
- Polymer.dom(this.$.content).innerHTML = html;
- var snapshotsEl = Polymer.dom(this.$.content).querySelector('#snapshots');
- instance.snapshots.forEach(function(snapshot) {
- var snapshotLink = document.createElement('tr-ui-a-analysis-link');
- snapshotLink.selection = new tr.model.EventSet(snapshot);
- Polymer.dom(snapshotsEl).appendChild(snapshotLink);
- });
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-object-instance-sub-view',
- tr.model.ObjectInstance,
- {
- multi: false,
- title: 'Object Instance',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view_test.html
deleted file mode 100644
index 93114f6f98d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_instance_sub_view_test.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_object_instance_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ObjectInstance = tr.model.ObjectInstance;
-
- test('analyzeSelectionWithObjectInstanceUnknownType', function() {
- var i10 = new ObjectInstance({}, '0x1000', 'cat', 'someUnhandledName', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
- var s20 = i10.addSnapshot(20, {foo: 2});
-
- var selection = new tr.model.EventSet();
- selection.push(i10);
-
- var view =
- document.createElement('tr-ui-a-single-object-instance-sub-view');
- view.selection = selection;
- this.addHTMLOutput(view);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view.html
deleted file mode 100644
index e3b39130326..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_instance_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-single-object-snapshot-sub-view'>
- <template>
- <style>
- #args {
- white-space: pre;
- }
-
- :host {
- overflow: auto;
- display: flex;
- }
-
- ::content * {
- -webkit-user-select: text;
- }
-
- ::content .title {
- border-bottom: 1px solid rgb(128, 128, 128);
- font-size: 110%;
- font-weight: bold;
- }
-
- ::content td, th {
- font-family: monospace;
- vertical-align: top;
- }
- </style>
- <content></content>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-object-snapshot-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- get requiresTallView() {
- if (this.children.length === 0)
- return false;
- if (this.children[0] instanceof tr.ui.analysis.ObjectSnapshotView)
- return this.children[0].requiresTallView;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- var snapshot = tr.b.getOnlyElement(selection);
- if (!(snapshot instanceof tr.model.ObjectSnapshot))
- throw new Error('Only supports object instances');
-
- Polymer.dom(this).textContent = '';
- this.currentSelection_ = selection;
-
- var typeInfo = tr.ui.analysis.ObjectSnapshotView.getTypeInfo(
- snapshot.objectInstance.category, snapshot.objectInstance.typeName);
- if (typeInfo) {
- var customView = new typeInfo.constructor();
- Polymer.dom(this).appendChild(customView);
- customView.modelEvent = snapshot;
- } else {
- this.appendGenericAnalysis_(snapshot);
- }
- },
-
- appendGenericAnalysis_: function(snapshot) {
- var instance = snapshot.objectInstance;
-
- Polymer.dom(this).textContent = '';
-
- var titleEl = document.createElement('div');
- Polymer.dom(titleEl).classList.add('title');
- Polymer.dom(titleEl).appendChild(document.createTextNode('Snapshot of '));
- Polymer.dom(this).appendChild(titleEl);
-
- var instanceLinkEl = document.createElement('tr-ui-a-analysis-link');
- instanceLinkEl.selection = new tr.model.EventSet(instance);
- Polymer.dom(titleEl).appendChild(instanceLinkEl);
-
- Polymer.dom(titleEl).appendChild(document.createTextNode(' @ '));
-
- Polymer.dom(titleEl).appendChild(tr.v.ui.createScalarSpan(snapshot.ts, {
- unit: tr.b.Unit.byName.timeStampInMs,
- ownerDocument: this.ownerDocument
- }));
-
- var tableEl = document.createElement('table');
- Polymer.dom(this).appendChild(tableEl);
-
- var rowEl = document.createElement('tr');
- Polymer.dom(tableEl).appendChild(rowEl);
-
- var labelEl = document.createElement('td');
- Polymer.dom(labelEl).textContent = 'args:';
- Polymer.dom(rowEl).appendChild(labelEl);
-
- var argsEl = document.createElement('td');
- argsEl.id = 'args';
- Polymer.dom(rowEl).appendChild(argsEl);
-
- var objectViewEl = document.createElement('tr-ui-a-generic-object-view');
- objectViewEl.object = snapshot.args;
- Polymer.dom(argsEl).appendChild(objectViewEl);
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-object-snapshot-sub-view',
- tr.model.ObjectSnapshot,
- {
- multi: false,
- title: 'Object Snapshot',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view_test.html
deleted file mode 100644
index d6e73abbc9a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_object_snapshot_sub_view_test.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_object_snapshot_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_snapshotView', function() {
- var i10 = new tr.model.ObjectInstance(
- {}, '0x1000', 'cat', 'name', 10);
- var s10 = i10.addSnapshot(10, {foo: 1});
- i10.updateBounds();
-
- var selection = new tr.model.EventSet();
- selection.push(s10);
-
- var view =
- document.createElement('tr-ui-a-single-object-snapshot-sub-view');
- view.selection = selection;
- this.addHTMLOutput(view);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view.html
deleted file mode 100644
index 9be2ec3fac3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view.html
+++ /dev/null
@@ -1,120 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-power-sample-table'>
- <template>
- <style>
- :host {
- display: flex;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-power-sample-table',
-
- ready: function() {
- this.$.table.tableColumns = [
- {
- title: 'Time',
- width: '100px',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.start, {
- unit: tr.b.Unit.byName.timeStampInMs
- });
- }
- },
- {
- title: 'Power',
- width: '100%',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.powerInW, {
- unit: tr.b.Unit.byName.powerInWatts
- });
- }
- }
- ];
- this.sample = undefined;
- },
-
- get sample() {
- return this.sample_;
- },
-
- set sample(sample) {
- this.sample_ = sample;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.sample === undefined)
- this.$.table.tableRows = [];
- else
- this.$.table.tableRows = [this.sample];
- this.$.table.rebuild();
- }
-});
-</script>
-
-<dom-module id='tr-ui-a-single-power-sample-sub-view'>
- <template>
- <style>
- :host { display: block; }
- </style>
- <tr-ui-a-power-sample-table id="samplesTable">
- </tr-ui-a-power-sample-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-power-sample-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- ready: function() {
- this.currentSelection_ = undefined;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.selection.length !== 1)
- throw 'Cannot pass multiple samples to sample table.';
- this.$.samplesTable.sample = tr.b.getOnlyElement(this.selection);
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-power-sample-sub-view',
- tr.model.PowerSample,
- {
- multi: false,
- title: 'Power Sample',
- });
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view_test.html
deleted file mode 100644
index 2b97e613a93..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_power_sample_sub_view_test.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-<link rel="import" href="/tracing/ui/analysis/single_power_sample_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var model = new tr.Model();
- var series = new tr.model.PowerSeries(model.device);
- series.addPowerSample(1, 1);
-
- var view = document.createElement('tr-ui-a-single-power-sample-sub-view');
- view.selection = new tr.model.EventSet(series.samples);
-
- this.addHTMLOutput(view);
- });
-
- test('setSelection', function() {
- var model = new tr.Model();
- var series = new tr.model.PowerSeries(model.device);
- series.addPowerSample(1, 1);
-
- var view = document.createElement('tr-ui-a-single-power-sample-sub-view');
- var eventSet = new tr.model.EventSet(series.samples);
- view.selection = eventSet;
-
- assert.deepEqual(view.$.samplesTable.sample,
- tr.b.getOnlyElement(series.samples));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view.html
deleted file mode 100644
index bcd0919e460..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/stack_frame.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-single-sample-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="content"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-sample-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- ready: function() {
- this.$.content.tableColumns = [
- {
- title: 'FirstColumn',
- value: function(row) { return row.title; },
- width: '250px'
- },
- {
- title: 'SecondColumn',
- value: function(row) { return row.value; },
- width: '100%'
- }
- ];
- this.$.content.showHeader = false;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.currentSelection_ = selection;
-
- if (this.currentSelection_ === undefined) {
- this.$.content.tableRows = [];
- return;
- }
-
- var sample = tr.b.getOnlyElement(this.currentSelection_);
- var table = this.$.content;
- var rows = [];
-
- rows.push({
- title: 'Title',
- value: sample.title
- });
-
- rows.push({
- title: 'Sample time',
- value: tr.v.ui.createScalarSpan(sample.start, {
- unit: tr.b.Unit.byName.timeStampInMs,
- ownerDocument: this.ownerDocument
- })
- });
-
- var sfEl = document.createElement('tr-ui-a-stack-frame');
- sfEl.stackFrame = sample.leafStackFrame;
- rows.push({
- title: 'Stack trace',
- value: sfEl
- });
- table.tableRows = rows;
- table.rebuild();
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-sample-sub-view',
- tr.model.Sample,
- {
- multi: false,
- title: 'Sample',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view_test.html
deleted file mode 100644
index 802bc99aa34..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_sample_sub_view_test.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_sample_sub_view.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var EventSet = tr.model.EventSet;
- var newSampleNamed = tr.c.TestUtils.newSampleNamed;
-
- test('instantiate_withSingleSample', function() {
- var t53;
- var model = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(model) {
- t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- model.samples.push(newSampleNamed(t53, 'X', 'my-category',
- ['a', 'b', 'c'], 0.184));
- }
- });
-
- var t53track = {};
- t53track.thread = t53;
-
- var selection = new EventSet();
-
- assert.equal(selection.length, 0);
- selection.push(t53.samples[0]);
- assert.equal(selection.length, 1);
-
- var view = document.createElement('tr-ui-a-single-sample-sub-view');
- view.selection = selection;
- this.addHTMLOutput(view);
-
- var table = tr.b.findDeepElementMatching(
- view, 'tr-ui-b-table');
-
- var rows = table.tableRows;
- assert.equal(rows.length, 3);
-
- assert.equal(rows[0].value, 'X');
- assert.equal(rows[1].value.value, 0.184);
- assert.strictEqual(rows[1].value.unit, tr.b.Unit.byName.timeStampInMs);
- assert.equal(rows[2].value.stackFrame, t53.samples[0].leafStackFrame);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view.html
deleted file mode 100644
index d934bedd3b6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/related_events.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-
-<dom-module id='tr-ui-a-single-thread-slice-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- }
- #events {
- display: flex;
- flex-direction: column;
- }
-
- </style>
- <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
- <div id="events">
- <tr-ui-a-related-events id="relatedEvents">
- </tr-ui-a-related-events>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-thread-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.content.selection = selection;
- this.$.relatedEvents.setRelatedEvents(selection);
- if (this.$.relatedEvents.hasRelatedEvents())
- this.$.relatedEvents.style.display = '';
- else
- this.$.relatedEvents.style.display = 'none';
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-thread-slice-sub-view',
- tr.model.ThreadSlice,
- {
- multi: false,
- title: 'Slice',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view_test.html
deleted file mode 100644
index 7cce4d0d9b8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_slice_sub_view_test.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-<link rel="import" href="/tracing/ui/analysis/single_thread_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var newFlowEventEx = tr.c.TestUtils.newFlowEventEx;
-
- test('instantiate', function() {
- var model = new tr.Model();
- var t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
- t53.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0.0, duration: 0.5}));
- t53.sliceGroup.createSubSlices();
-
- var selection = new tr.model.EventSet();
- selection.push(t53.sliceGroup.slices[0]);
-
- var viewEl = document.createElement('tr-ui-a-single-thread-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-
- test('instantiateWithFlowEvent', function() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
-
- m.t2 = m.p1.getOrCreateThread(2);
- m.t3 = m.p1.getOrCreateThread(3);
- m.t4 = m.p1.getOrCreateThread(4);
-
- m.sA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0, end: 5,
- type: tr.model.ThreadSlice}));
- m.sB = m.t3.sliceGroup.pushSlice(
- newSliceEx({title: 'b', start: 10, end: 15,
- type: tr.model.ThreadSlice}));
- m.sC = m.t4.sliceGroup.pushSlice(
- newSliceEx({title: 'c', start: 20, end: 20,
- type: tr.model.ThreadSlice}));
-
- m.t2.createSubSlices();
- m.t3.createSubSlices();
- m.t4.createSubSlices();
-
- m.f1 = newFlowEventEx({
- 'title': 'flowish', start: 0, end: 10,
- startSlice: m.sA,
- endSlice: m.sB
- });
- m.f2 = newFlowEventEx({
- 'title': 'flowish', start: 15, end: 21,
- startSlice: m.sB,
- endSlice: m.sC
- });
- });
-
- var selection = new tr.model.EventSet();
- selection.push(m.sA);
-
- var viewEl = document.createElement('tr-ui-a-single-thread-slice-sub-view');
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html
deleted file mode 100644
index 11574b892bf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view.html
+++ /dev/null
@@ -1,186 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-a-single-thread-time-slice-sub-view'>
- <template>
- <style>
- table {
- border-collapse: collapse;
- border-width: 0;
- margin-bottom: 25px;
- width: 100%;
- }
-
- table tr > td:first-child {
- padding-left: 2px;
- }
-
- table tr > td {
- padding: 2px 4px 2px 4px;
- vertical-align: text-top;
- width: 150px;
- }
-
- table td td {
- padding: 0 0 0 0;
- width: auto;
- }
- tr {
- vertical-align: top;
- }
-
- tr:nth-child(2n+0) {
- background-color: #e2e2e2;
- }
- </style>
- <table>
- <tr>
- <td>Running process:</td><td id="process-name"></td>
- </tr>
- <tr>
- <td>Running thread:</td><td id="thread-name"></td>
- </tr>
- <tr>
- <td>State:</td>
- <td><b><span id="state"></span></b></td>
- </tr>
- <tr>
- <td>Start:</td>
- <td>
- <tr-v-ui-scalar-span id="start">
- </tr-v-ui-scalar-span>
- </td>
- </tr>
- <tr>
- <td>Duration:</td>
- <td>
- <tr-v-ui-scalar-span id="duration">
- </tr-v-ui-scalar-span>
- </td>
- </tr>
-
- <tr>
- <td>On CPU:</td><td id="on-cpu"></td>
- </tr>
-
- <tr>
- <td>Running instead:</td><td id="running-instead"></td>
- </tr>
-
- <tr>
- <td>Args:</td><td id="args"></td>
- </tr>
- </table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-thread-time-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- var timeSlice = tr.b.getOnlyElement(selection);
-
- if (!(timeSlice instanceof tr.model.ThreadTimeSlice))
- throw new Error('Only supports thread time slices');
-
- this.currentSelection_ = selection;
-
- var thread = timeSlice.thread;
-
- var root = Polymer.dom(this.root);
- Polymer.dom(root.querySelector('#state')).textContent =
- timeSlice.title;
- var stateColor = tr.b.ColorScheme.colorsAsStrings[timeSlice.colorId];
- root.querySelector('#state').style.backgroundColor = stateColor;
-
- Polymer.dom(root.querySelector('#process-name')).textContent =
- thread.parent.userFriendlyName;
- Polymer.dom(root.querySelector('#thread-name')).textContent =
- thread.userFriendlyName;
-
- root.querySelector('#start').setValueAndUnit(
- timeSlice.start, tr.b.Unit.byName.timeStampInMs);
- root.querySelector('#duration').setValueAndUnit(
- timeSlice.duration, tr.b.Unit.byName.timeDurationInMs);
-
- var onCpuEl = root.querySelector('#on-cpu');
- Polymer.dom(onCpuEl).textContent = '';
- var runningInsteadEl = root.querySelector('#running-instead');
- if (timeSlice.cpuOnWhichThreadWasRunning) {
- Polymer.dom(runningInsteadEl.parentElement).removeChild(runningInsteadEl);
-
- var cpuLink = document.createElement('tr-ui-a-analysis-link');
- cpuLink.selection = new tr.model.EventSet(
- timeSlice.getAssociatedCpuSlice());
- Polymer.dom(cpuLink).textContent =
- timeSlice.cpuOnWhichThreadWasRunning.userFriendlyName;
- Polymer.dom(onCpuEl).appendChild(cpuLink);
- } else {
- Polymer.dom(onCpuEl.parentElement).removeChild(onCpuEl);
-
- var cpuSliceThatTookCpu = timeSlice.getCpuSliceThatTookCpu();
- if (cpuSliceThatTookCpu) {
- var cpuLink = document.createElement('tr-ui-a-analysis-link');
- cpuLink.selection = new tr.model.EventSet(cpuSliceThatTookCpu);
- if (cpuSliceThatTookCpu.thread)
- Polymer.dom(cpuLink).textContent =
- cpuSliceThatTookCpu.thread.userFriendlyName;
- else
- Polymer.dom(cpuLink).textContent = cpuSliceThatTookCpu.title;
- Polymer.dom(runningInsteadEl).appendChild(cpuLink);
- } else {
- Polymer.dom(runningInsteadEl.parentElement).removeChild(
- runningInsteadEl);
- }
- }
-
- var argsEl = root.querySelector('#args');
- if (tr.b.dictionaryKeys(timeSlice.args).length > 0) {
- var argsView =
- document.createElement('tr-ui-a-generic-object-view');
- argsView.object = timeSlice.args;
-
- argsEl.parentElement.style.display = '';
- Polymer.dom(argsEl).textContent = '';
- Polymer.dom(argsEl).appendChild(argsView);
- } else {
- argsEl.parentElement.style.display = 'none';
- }
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-thread-time-slice-sub-view',
- tr.model.ThreadTimeSlice,
- {
- multi: false,
- title: 'Thread Timeslice',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view_test.html
deleted file mode 100644
index f2b0faff015..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_thread_time_slice_sub_view_test.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/linux_perf/ftrace_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/single_thread_time_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createBasicModel() {
- var lines = [
- 'Android.launcher-584 [001] d..3 12622.506890: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] d..3 12622.506918: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=D ==> next_comm=Android.launcher next_pid=584 next_prio=120', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..4 12622.506936: sched_wakeup: comm=Binder_1 pid=217 prio=120 success=1 target_cpu=001', // @suppress longLineCheck
- 'Android.launcher-584 [001] d..3 12622.506950: sched_switch: prev_comm=Android.launcher prev_pid=584 prev_prio=120 prev_state=R+ ==> next_comm=Binder_1 next_pid=217 next_prio=120', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507057: tracing_mark_write: B|128|queueBuffer', // @suppress longLineCheck
- ' Binder_1-217 [001] ...1 12622.507175: tracing_mark_write: E',
- ' Binder_1-217 [001] d..3 12622.507253: sched_switch: prev_comm=Binder_1 prev_pid=217 prev_prio=120 prev_state=S ==> next_comm=Android.launcher next_pid=584 next_prio=120' // @suppress longLineCheck
- ];
-
- return tr.c.TestUtils.newModelWithEvents([lines.join('\n')], {
- shiftWorldToZero: false
- });
- }
-
- test('runningSlice', function() {
- var m = createBasicModel();
-
- var cpu = m.kernel.cpus[1];
- var binderSlice = cpu.slices[0];
- assert.equal(binderSlice.title, 'Binder_1');
- var launcherSlice = cpu.slices[1];
- assert.equal(launcherSlice.title, 'Android.launcher');
-
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
-
- var view = document.createElement(
- 'tr-ui-a-single-thread-time-slice-sub-view');
- var selection = new tr.model.EventSet();
- selection.push(thread.timeSlices[0]);
- view.selection = selection;
- this.addHTMLOutput(view);
-
- // Clicking the analysis link should focus the Binder1's timeslice.
- var didSelectionChangeHappen = false;
- view.addEventListener('requestSelectionChange', function(e) {
- assert.isTrue(e.selection.equals(new tr.model.EventSet(binderSlice)));
- didSelectionChangeHappen = true;
- });
- Polymer.dom(view.root).querySelector('tr-ui-a-analysis-link').click();
- assert.isTrue(didSelectionChangeHappen);
- });
-
- test('sleepingSlice', function() {
- var m = createBasicModel();
-
- var cpu = m.kernel.cpus[1];
- var binderSlice = cpu.slices[0];
- assert.equal(binderSlice.title, 'Binder_1');
- var launcherSlice = cpu.slices[1];
- assert.equal(launcherSlice.title, 'Android.launcher');
-
-
- var thread = m.findAllThreadsNamed('Binder_1')[0];
-
- var view = document.createElement(
- 'tr-ui-a-single-thread-time-slice-sub-view');
- var selection = new tr.model.EventSet();
- selection.push(thread.timeSlices[1]);
- view.selection = selection;
- this.addHTMLOutput(view);
-
- // Clicking the analysis link should focus the Android.launcher slice
- var didSelectionChangeHappen = false;
- view.addEventListener('requestSelectionChange', function(e) {
- assert.isTrue(e.selection.equals(new tr.model.EventSet(launcherSlice)));
- didSelectionChangeHappen = true;
- });
- Polymer.dom(view.root).querySelector('tr-ui-a-analysis-link').click();
- assert.isTrue(didSelectionChangeHappen);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_user_expectation_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_user_expectation_sub_view.html
deleted file mode 100644
index 4c332b0f761..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/single_user_expectation_sub_view.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-<link rel="import"
- href="/tracing/ui/analysis/user_expectation_related_samples_table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<dom-module id='tr-ui-a-single-user-expectation-sub-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- }
- #events {
- display: flex;
- flex-direction: column;
- }
- </style>
- <tr-ui-a-single-event-sub-view id="realView"></tr-ui-a-single-event-sub-view>
- <div id="events">
- <tr-ui-a-user-expectation-related-samples-table id="relatedSamples"></tr-ui-a-user-expectation-related-samples-table>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-single-user-expectation-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- created: function() {
- this.currentSelection_ = undefined;
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- set selection(selection) {
- this.$.realView.addEventListener('customize-rows',
- this.onCustomizeRows_.bind(this));
-
- this.currentSelection_ = selection;
- this.$.realView.setSelectionWithoutErrorChecks(selection);
-
- this.$.relatedSamples.selection = selection;
- if (this.$.relatedSamples.hasRelatedSamples())
- this.$.events.style.display = '';
- else
- this.$.events.style.display = 'none';
- },
-
- get relatedEventsToHighlight() {
- if (!this.currentSelection_)
- return undefined;
- return tr.b.getOnlyElement(this.currentSelection_).associatedEvents;
- },
-
- onCustomizeRows_: function(event) {
- var ue = tr.b.getOnlyElement(this.selection);
-
- if (ue.rawCpuMs) {
- event.rows.push({
- name: 'Total CPU',
- value: tr.v.ui.createScalarSpan(ue.totalCpuMs, {
- unit: tr.b.Unit.byName.timeDurationInMs
- })
- });
- }
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-single-user-expectation-sub-view',
- tr.model.um.UserExpectation,
- {
- multi: false,
- title: 'User Expectation',
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame.html
deleted file mode 100644
index 27533e3131c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-a-stack-frame'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- align-items: center;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-stack-frame',
-
- ready: function() {
- this.stackFrame_ = undefined;
- this.$.table.tableColumns = [];
- this.$.table.showHeader = true;
- },
-
- get stackFrame() {
- return this.stackFrame_;
- },
-
- set stackFrame(stackFrame) {
- var table = this.$.table;
-
- this.stackFrame_ = stackFrame;
- if (stackFrame === undefined) {
- table.tableColumns = [];
- table.tableRows = [];
- table.rebuild();
- return;
- }
-
- var hasName = false;
- var hasTitle = false;
-
- table.tableRows = stackFrame.stackTrace;
- table.tableRows.forEach(function(row) {
- hasName |= row.name !== undefined;
- hasTitle |= row.title !== undefined;
- });
-
- var cols = [];
- if (hasName) {
- cols.push({
- title: 'Name',
- value: function(row) { return row.name; }
- });
- }
-
- if (hasTitle) {
- cols.push({
- title: 'Title',
- value: function(row) { return row.title; }
- });
- }
-
- table.tableColumns = cols;
- table.rebuild();
- },
-
- tableForTesting: function() {
- return this.$.table;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame_test.html
deleted file mode 100644
index 91ee0e3bd57..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stack_frame_test.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/analysis/stack_frame.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var model = new tr.Model();
- var fA = tr.c.TestUtils.newStackTrace(model, ['a1', 'a2', 'a3']);
-
- var stackFrameView = document.createElement('tr-ui-a-stack-frame');
- stackFrameView.stackFrame = fA;
- this.addHTMLOutput(stackFrameView);
- });
-
- test('clearingStackFrame', function() {
- var model = new tr.Model();
- var fA = tr.c.TestUtils.newStackTrace(model, ['a1', 'a2', 'a3']);
-
- var stackFrameView = document.createElement('tr-ui-a-stack-frame');
- stackFrameView.stackFrame = fA;
- stackFrameView.stackFrame = undefined;
-
- assert.isUndefined(stackFrameView.stackFrame);
- assert.lengthOf(stackFrameView.$.table.$.body.children, 0);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane.html
deleted file mode 100644
index a6446b64c4c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/rebuildable_behavior.html">
-
-<!--
-@fileoverview Analysis view stacked pane. See the stacked pane view element
-(tr-ui-a-stacked-pane-view) documentation for more details.
--->
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
-
- var StackedPaneImpl = {
- /**
- * Request changing the child pane of this pane in the associated stacked
- * pane view. If the assigned builder is undefined, request removing the
- * current child pane.
- *
- * Note that setting this property before appended() is called will have no
- * effect (as there will be no listener attached to the pane).
- *
- * This method is intended to be called by subclasses.
- */
- set childPaneBuilder(childPaneBuilder) {
- this.childPaneBuilder_ = childPaneBuilder;
- this.dispatchEvent(new tr.b.Event('request-child-pane-change'));
- },
-
- get childPaneBuilder() {
- return this.childPaneBuilder_;
- },
-
- /**
- * Called right after the pane is appended to a pane view.
- *
- * This method triggers an immediate rebuild by default. Subclasses are
- * free to change this behavior (e.g. if a pane has lots of data to display,
- * it might decide to defer rebuilding in order not to cause jank).
- */
- appended: function() {
- this.rebuild();
- }
- };
-
- var StackedPane = [tr.ui.analysis.RebuildableBehavior, StackedPaneImpl];
-
- return {
- StackedPane: StackedPane
- };
-});
-
-Polymer({
- is: 'tr-ui-a-stacked-pane',
- behaviors: [tr.ui.analysis.StackedPane]
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_test.html
deleted file mode 100644
index a4c8d5213dc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_test.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('changeChildPane', function() {
- var pane = document.createElement('tr-ui-a-stacked-pane');
- var didFireEvent;
- pane.addEventListener('request-child-pane-change', function() {
- didFireEvent = true;
- });
-
- didFireEvent = false;
- pane.childPaneBuilder = undefined;
- assert.isTrue(didFireEvent);
-
- didFireEvent = false;
- pane.childPaneBuilder = function() {
- return undefined;
- };
- assert.isTrue(didFireEvent);
-
- didFireEvent = false;
- pane.childPaneBuilder = function() {
- return document.createElement('tr-ui-a-stacked-pane');
- };
- assert.isTrue(didFireEvent);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view.html
deleted file mode 100644
index fe0ebf9bd90..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<!--
-@fileoverview Analysis view container which displays vertically stacked panes.
-The panes represent a hierarchy where a child pane contains the details of the
-current selection in its parent pane. The container provides simple primitives
-for panes to request changing their child pane:
-
- +=<tr-ui-a-stacked-pane-view>=+ +=<tr-ui-a-stacked-pane-view>=+
- |+.<tr-ui-a-stacked-pane>....+| |+.<tr-ui-a-stacked-pane>....+|
- |: Pane 1 +| ===========> |: Pane 1 +|
- |+...........................+| Pane 1 |+...........................+|
- |+.<tr-ui-a-stacked-pane>....+| requests |+.<tr-ui-a-stacked-pane>....+|
- |: Pane 2 (detail of Pane 1) +| child pane |: Pane 4 (detail of Pane 1) +|
- |+...........................+| change (e.g. |+...........................+|
- |+.<tr-ui-a-stacked-pane>....+| selection +=============================+
- |: Pane 3 (detail of Pane 2) +| changed)
- |+...........................+|
- +=============================+
-
-Note that the actual UI provided by tr-ui-a-stacked-pane-view and
-tr-ui-a-stacked-pane is merely a wrapper container with flex box vertical
-stacking. No other visual features (such as pane spacing or borders) is
-provided by either element.
-
-The stacked pane element (tr-ui-a-stacked-pane) is defined in a separate file.
-
-Sample use case:
-
- Create an empty stacked pane view and add it to the DOM:
-
- var paneView = document.createElement('tr-ui-a-stacked-pane-view');
- Polymer.dom(someParentView).appendChild(paneView);
-
- Define one or more pane subclasses:
-
- TODO(polymer): Write this documentation
- <polymer-element name="some-pane-1" extends="tr-ui-a-stacked-pane">
- ...
- </polymer-element>
-
- Set the top-level pane (by providing a builder function):
-
- paneView.setPaneBuilder(function() {
- var topPane = document.createElement('some-pane-1');
- pane.someProperty = someValue;
- return topPane;
- });
-
- Show a child pane with details upon user interaction (these methods should be
- in the definition of the pane subclass Polymer element):
-
- ready: function() {
- this.$.table.addEventListener(
- 'selection-changed', this.changeChildPane_.bind(this));
- }
-
- changeChildPane_: function() {
- this.childPaneBuilder = function() {
- var selectedRow = this.$.table.selectedTableRow;
- var detailsPane = document.createElement('some-pane-2');
- detailsPane.someProperty = selectedRow;
- return detailsPane;
- }.bind(this);
- }
--->
-<dom-module id='tr-ui-a-stacked-pane-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- #pane_container > * {
- flex: 0 0 auto;
- }
- </style>
- <div id="pane_container">
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-stacked-pane-view',
-
- /**
- * Add a pane to the stacked pane view. This method performs two operations:
- *
- * 1. Remove existing descendant panes
- * If the optional parent pane is provided, all its current descendant
- * panes are removed. Otherwise, all panes are removed from the view.
- *
- * 2. Build and add new pane
- * If a pane builder is provided and returns a pane, the new pane is
- * appended to the view (after the provided parent, or at the top).
- */
- setPaneBuilder: function(paneBuilder, opt_parentPane) {
- var paneContainer = this.$.pane_container;
-
- // If the parent pane is provided, it must be an HTML element and a child
- // of the pane container.
- if (opt_parentPane) {
- if (!(opt_parentPane instanceof HTMLElement))
- throw new Error('Parent pane must be an HTML element');
- if (opt_parentPane.parentElement !== paneContainer)
- throw new Error('Parent pane must be a child of the pane container');
- }
-
- // Remove all descendants of the parent pane (or all panes if no parent
- // pane was specified) in reverse order.
- while (Polymer.dom(paneContainer).lastElementChild !== null &&
- Polymer.dom(paneContainer).lastElementChild !== opt_parentPane) {
- var removedPane = Polymer.dom(this.$.pane_container).lastElementChild;
- var listener = this.listeners_.get(removedPane);
- if (listener === undefined)
- throw new Error('No listener associated with pane');
- this.listeners_.delete(removedPane);
- removedPane.removeEventListener(
- 'request-child-pane-change', listener);
- Polymer.dom(paneContainer).removeChild(removedPane);
- }
-
- if (opt_parentPane && opt_parentPane.parentElement !== paneContainer)
- throw new Error('Parent pane was removed from the pane container');
-
- // This check is performed here (and not at the beginning of the method)
- // because undefined pane builder means that the parent pane requested
- // having no child pane (e.g. when selection is cleared).
- if (!paneBuilder)
- return;
-
- var pane = paneBuilder();
- if (!pane)
- return;
-
- if (!(pane instanceof HTMLElement))
- throw new Error('Pane must be an HTML element');
-
- // Listen for child pane change requests from the newly added pane.
- var listener = function(event) {
- this.setPaneBuilder(pane.childPaneBuilder, pane);
- }.bind(this);
- if (!this.listeners_) {
- // Instead of initializing the listeners map in a created() callback,
- // we do it lazily here so that subclasses could provide their own
- // created() callback (Polymer currently doesn't allow calling overriden
- // superclass methods in strict mode).
- this.listeners_ = new WeakMap();
- }
- this.listeners_.set(pane, listener);
- pane.addEventListener('request-child-pane-change', listener);
-
- Polymer.dom(paneContainer).appendChild(pane);
- pane.appended();
- },
-
- /**
- * Request rebuilding all panes in the view. The panes are rebuilt from the
- * top to the bottom (so that parent panes could request changing their
- * child panes when they're being rebuilt and the newly constructed child
- * panes would be rebuilt as well).
- */
- rebuild: function() {
- var currentPane = Polymer.dom(this.$.pane_container).firstElementChild;
- while (currentPane) {
- currentPane.rebuild();
- currentPane = currentPane.nextElementSibling;
- }
- },
-
- // For testing purposes.
- get panesForTesting() {
- var panes = [];
- var currentChild = Polymer.dom(this.$.pane_container).firstElementChild;
- while (currentChild) {
- panes.push(currentChild);
- currentChild = currentChild.nextElementSibling;
- }
- return panes;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view_test.html
deleted file mode 100644
index 0f3a5e29e60..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stacked_pane_view_test.html
+++ /dev/null
@@ -1,203 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/stacked_pane.html">
-<link rel="import" href="/tracing/ui/analysis/stacked_pane_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createPaneView() {
- return document.createElement('tr-ui-a-stacked-pane-view');
- }
-
- function createPane(paneId, opt_rebuildPaneCallback, opt_appendedCallback) {
- var paneEl = document.createElement('tr-ui-a-stacked-pane');
- paneEl.paneId = paneId;
-
- var divEl = document.createElement('div');
- Polymer.dom(divEl).textContent = 'Pane ' + paneId;
- divEl.style.width = '400px';
- divEl.style.background = '#ccc';
- divEl.style.textAlign = 'center';
- Polymer.dom(paneEl).appendChild(divEl);
-
- if (opt_rebuildPaneCallback)
- paneEl.onRebuild_ = opt_rebuildPaneCallback;
-
- if (opt_appendedCallback)
- paneEl.appended = opt_appendedCallback;
-
- return paneEl;
- }
-
- function createPaneBuilder(paneId, opt_rebuildPaneCallback,
- opt_appendedCallback) {
- return createPane.bind(
- undefined, paneId, opt_rebuildPaneCallback, opt_appendedCallback);
- }
-
- function assertPanes(paneView, expectedPaneIds) {
- var actualPaneIds = paneView.panesForTesting.map(function(pane) {
- return pane.paneId;
- });
- assert.deepEqual(actualPaneIds, expectedPaneIds);
- }
-
- test('instantiate_empty', function() {
- var viewEl = createPaneView();
- viewEl.rebuild();
- assertPanes(viewEl, []);
- // Don't add the pane to HTML output because it has zero height.
- });
-
- test('instantiate_singlePane', function() {
- var viewEl = createPaneView();
-
- viewEl.setPaneBuilder(createPaneBuilder(1));
- viewEl.rebuild();
-
- assertPanes(viewEl, [1]);
- this.addHTMLOutput(viewEl);
- });
-
- test('instantiate_multiplePanes', function() {
- var viewEl = createPaneView();
-
- viewEl.setPaneBuilder(createPaneBuilder(1));
- viewEl.setPaneBuilder(createPaneBuilder(2), viewEl.panesForTesting[0]);
- viewEl.setPaneBuilder(createPaneBuilder(3), viewEl.panesForTesting[1]);
-
- assertPanes(viewEl, [1, 2, 3]);
- this.addHTMLOutput(viewEl);
- });
-
- test('changePanes', function() {
- var viewEl = createPaneView();
-
- viewEl.setPaneBuilder(createPaneBuilder(1));
- assertPanes(viewEl, [1]);
-
- viewEl.setPaneBuilder(null);
- assertPanes(viewEl, []);
-
- viewEl.setPaneBuilder(createPaneBuilder(2));
- assertPanes(viewEl, [2]);
-
- viewEl.setPaneBuilder(createPaneBuilder(3), viewEl.panesForTesting[0]);
- assertPanes(viewEl, [2, 3]);
-
- viewEl.setPaneBuilder(createPaneBuilder(4), viewEl.panesForTesting[0]);
- assertPanes(viewEl, [2, 4]);
-
- viewEl.setPaneBuilder(createPaneBuilder(5), viewEl.panesForTesting[1]);
- assertPanes(viewEl, [2, 4, 5]);
-
- viewEl.setPaneBuilder(createPaneBuilder(6), viewEl.panesForTesting[2]);
- assertPanes(viewEl, [2, 4, 5, 6]);
-
- viewEl.setPaneBuilder(createPaneBuilder(7), viewEl.panesForTesting[1]);
- assertPanes(viewEl, [2, 4, 7]);
-
- this.addHTMLOutput(viewEl);
- });
-
- test('childPanes', function() {
- var viewEl = createPaneView();
-
- viewEl.setPaneBuilder(createPaneBuilder(1));
- assertPanes(viewEl, [1]);
-
- // Pane 1 requests a child pane 2.
- var pane1 = viewEl.panesForTesting[0];
- pane1.childPaneBuilder = createPaneBuilder(2);
- assertPanes(viewEl, [1, 2]);
-
- // Pane 2 requests removing its child pane (nothing happens).
- var pane2 = viewEl.panesForTesting[1];
- pane2.childPaneBuilder = undefined;
- assertPanes(viewEl, [1, 2]);
-
- // Pane 2 requests a child pane 3.
- pane2.childPaneBuilder = createPaneBuilder(3);
- assertPanes(viewEl, [1, 2, 3]);
-
- // Pane 2 requests a child pane 4 (its previous child pane 3 is removed).
- pane2.childPaneBuilder = createPaneBuilder(4);
- assertPanes(viewEl, [1, 2, 4]);
-
- // Pane 1 requests removing its child pane (panes 2 and 4 are removed).
- pane1.childPaneBuilder = undefined;
- assertPanes(viewEl, [1]);
-
- // Check that removed panes cannot affect the pane view.
- pane2.childPaneBuilder = createPaneBuilder(5);
- assertPanes(viewEl, [1]);
-
- // Pane 1 requests a child pane 6 (check that everything still works).
- pane1.childPaneBuilder = createPaneBuilder(6);
- assertPanes(viewEl, [1, 6]);
-
- // Change the top pane to pane 7.
- viewEl.setPaneBuilder(createPaneBuilder(7));
- assertPanes(viewEl, [7]);
-
- // Check that removed panes cannot affect the pane view.
- pane1.childPaneBuilder = createPaneBuilder(5);
- assertPanes(viewEl, [7]);
- });
-
- test('rebuild', function() {
- var viewEl = createPaneView();
-
- var rebuiltPaneIds = [];
- var rebuildPaneCallback = function() {
- rebuiltPaneIds.push(this.paneId);
- };
-
- viewEl.setPaneBuilder(createPaneBuilder(1, rebuildPaneCallback));
- viewEl.setPaneBuilder(createPaneBuilder(2, rebuildPaneCallback),
- viewEl.panesForTesting[0]);
- viewEl.setPaneBuilder(createPaneBuilder(3, rebuildPaneCallback),
- viewEl.panesForTesting[1]);
-
- // Rebuild isn't triggered.
- assert.deepEqual(rebuiltPaneIds, []);
-
- // Rebuild is triggered, but it isn't necessary (all panes are clean).
- viewEl.rebuild();
- assert.deepEqual(rebuiltPaneIds, []);
-
- // All panes are now marked as dirty, but rebuild isn't triggered (it was
- // only scheduled).
- viewEl.panesForTesting.forEach(function(pane) {
- pane.scheduleRebuild_();
- });
- assert.deepEqual(rebuiltPaneIds, []);
-
- // Finally, rebuild was triggered and the panes are dirty.
- viewEl.rebuild();
- assert.deepEqual(rebuiltPaneIds, [1, 2, 3]);
-
- // Make sure that panes are clean after the previous rebuild.
- viewEl.rebuild();
- assert.deepEqual(rebuiltPaneIds, [1, 2, 3]);
- });
-
- test('appended', function() {
- var viewEl = createPaneView();
- var didFireAppended;
-
- didFireAppended = false;
- viewEl.setPaneBuilder(createPaneBuilder(1, undefined, function() {
- didFireAppended = true;
- }));
- assert.isTrue(didFireAppended);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stub_analysis_table.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/stub_analysis_table.html
deleted file mode 100644
index b606d1736a1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/stub_analysis_table.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- function StubAnalysisTable() {
- this.ownerDocument_ = document;
- this.nodes_ = [];
- }
-
- StubAnalysisTable.prototype = {
- __proto__: Object.protoype,
-
- get ownerDocument() {
- return this.ownerDocument_;
- },
-
- appendChild: function(node) {
- if (node.tagName === 'TFOOT' || node.tagName === 'THEAD' ||
- node.tagName === 'TBODY') {
- node.__proto__ = StubAnalysisTable.prototype;
- node.nodes_ = [];
- node.ownerDocument_ = document;
- }
- this.nodes_.push(node);
- },
-
- get lastNode() {
- return this.nodes_.pop();
- },
-
- get nodeCount() {
- return this.nodes_.length;
- }
- };
-
- return {
- StubAnalysisTable: StubAnalysisTable
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table.html
deleted file mode 100644
index b9cc593b5a4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-a-user-expectation-related-samples-table'>
- <template>
- <style>
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-a-user-expectation-related-samples-table',
-
- ready: function() {
- this.samples_ = [];
- this.$.table.tableColumns = [
- {
- title: 'Event(s)',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.type;
- if (row.tooltip)
- typeEl.title = row.tooltip;
- return typeEl;
- },
- width: '150px'
- },
- {
- title: 'Link',
- width: '100%',
- value: function(row) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- if (row.name)
- linkEl.setSelectionAndContent(row.selection, row.name);
- else
- linkEl.selection = row.selection;
- return linkEl;
- }
- }
- ];
- },
-
- hasRelatedSamples: function() {
- return (this.samples_ && this.samples_.length > 0);
- },
-
- set selection(eventSet) {
- this.samples_ = [];
- var samples = new tr.model.EventSet;
- eventSet.forEach(function(ue) {
- samples.addEventSet(ue.associatedSamples);
- }.bind(this));
-
- if (samples.length > 0) {
- this.samples_.push({
- type: 'Overlapping samples',
- tooltip: 'All samples overlapping the selected user expectation(s).',
- selection: samples
- });
- }
- this.updateContents_();
- },
-
- updateContents_: function() {
- var table = this.$.table;
- if (this.samples_ && this.samples_.length > 0)
- table.tableRows = this.samples_.slice();
- else
- table.tableRows = [];
- table.rebuild();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table_test.html b/chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table_test.html
deleted file mode 100644
index eab3be89046..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/analysis/user_expectation_related_samples_table_test.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/sample.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-<link rel="import"
- href="/tracing/ui/analysis/user_expectation_related_samples_table.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createModel() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
- var s1 = new tr.model.Sample(null, m.t2, 'a_1', 1);
- var s2 = new tr.model.Sample(null, m.t2, 'a_2', 2);
- var s3 = new tr.model.Sample(null, m.t2, 'a_3', 3);
- var s4 = new tr.model.Sample(null, m.t2, 'a_4', 4);
- var s5 = new tr.model.Sample(null, m.t2, 'a_5', 5);
- var s6 = new tr.model.Sample(null, m.t2, 'a_6', 6);
- m.samples.push(s1, s2, s3, s4, s5, s6);
- m.ve = new tr.c.TestUtils.newSliceEx(
- {title: 'V8.Execute', start: 0, end: 4, type: tr.model.ThreadSlice});
- m.t2.sliceGroup.pushSlice(m.ve);
- m.up = new tr.c.TestUtils.newInteractionRecord(m, 0, 4);
- m.up.associatedEvents.push(m.ve);
- m.userModel.expectations.push(m.up);
- });
- return m;
- }
-
- test('overlappingSamples', function() {
- var m = createModel();
-
- var viewEl = document.createElement(
- 'tr-ui-a-user-expectation-related-samples-table');
- viewEl.selection = new tr.model.EventSet([m.up]);
-
- var overlappingSamples;
- viewEl.$.table.tableRows.forEach(function(row) {
- if (row.type === 'Overlapping samples') {
- assert.isUndefined(overlappingSamples);
- overlappingSamples = row.selection;
- }
- });
-
- var samplesTitles = overlappingSamples.map(function(e) {
- return e.title;
- });
- assert.sameMembers(samplesTitles,
- ['a_1', 'a_2', 'a_3', 'a_4']);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view.html b/chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view.html
deleted file mode 100644
index 6edaff2e046..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.annotations', function() {
- /**
- * A base class for all annotation views.
- * @constructor
- */
- function AnnotationView(viewport, annotation) {
- }
-
- AnnotationView.prototype = {
- draw: function(ctx) {
- throw new Error('Not implemented');
- }
- };
-
- return {
- AnnotationView: AnnotationView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view_test.html
deleted file mode 100644
index 5ff3f314655..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/annotations/annotation_view_test.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/comment_box_annotation.html">
-<link rel="import" href="/tracing/model/location.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/rect_annotation.html">
-<link rel="import" href="/tracing/model/x_marker_annotation.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function createPopulatedTimeline() {
- var model = new tr.Model();
- var process = model.getOrCreateProcess(1);
- var thread = process.getOrCreateThread(2);
- thread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {title: 'a', start: 80, duration: 50}));
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- var vp = new tr.ui.TimelineViewport(timeline);
- timeline.model = model;
- timeline.style.maxHeight = '600px';
-
- return timeline;
- }
-
- test('rectAnnotation', function() {
- var fakeYComponents1 = [{stableId: '1.2', yPercentOffset: 0.3}];
- var fakeYComponents2 = [{stableId: '1.2', yPercentOffset: 0.9}];
- var start = new tr.model.Location(50, fakeYComponents1);
- var end = new tr.model.Location(100, fakeYComponents2);
- var rectAnnotation = new tr.model.RectAnnotation(start, end);
-
- var timeline = createPopulatedTimeline();
- timeline.model.addAnnotation(rectAnnotation);
- this.addHTMLOutput(timeline);
- });
-
- test('xMarkerAnnotation', function() {
- var xMarkerAnnotation = new tr.model.XMarkerAnnotation(90);
-
- var timeline = createPopulatedTimeline();
- var model = timeline.model;
- timeline.model.addAnnotation(xMarkerAnnotation);
- this.addHTMLOutput(timeline);
- });
-
- test('commentBoxAnnotation', function() {
- var fakeYComponents = [{stableId: '1.2', yPercentOffset: 0.5}];
- var location = new tr.model.Location(120, fakeYComponents);
- var text = 'abc';
- var commentBoxAnnotation =
- new tr.model.CommentBoxAnnotation(location, text);
-
- var timeline = createPopulatedTimeline();
- timeline.model.addAnnotation(commentBoxAnnotation);
- this.addHTMLOutput(timeline);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/annotations/comment_box_annotation_view.html b/chromium/third_party/catapult/tracing/tracing/ui/annotations/comment_box_annotation_view.html
deleted file mode 100644
index 30be91ba622..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/annotations/comment_box_annotation_view.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/annotations/annotation_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.annotations', function() {
- /**
- * A view of a comment box consisting of a textarea and a line to the
- * actual location.
- * @extends {AnnotationView}
- * @constructor
- */
- function CommentBoxAnnotationView(viewport, annotation) {
- this.viewport_ = viewport;
- this.annotation_ = annotation;
- this.textArea_ = undefined;
-
- this.styleWidth = 250;
- this.styleHeight = 50;
- this.fontSize = 10;
- this.rightOffset = 50;
- this.topOffset = 25;
- }
-
- CommentBoxAnnotationView.prototype = {
- __proto__: tr.ui.annotations.AnnotationView.prototype,
-
- removeTextArea: function() {
- Polymer.dom(Polymer.dom(this.textArea_).parentNode).removeChild(
- this.textArea_);
- },
-
- draw: function(ctx) {
- var coords = this.annotation_.location.toViewCoordinates(this.viewport_);
- if (coords.viewX < 0) {
- if (this.textArea_)
- this.textArea_.style.visibility = 'hidden';
- return;
- }
-
- // Set up textarea element.
- if (!this.textArea_) {
- this.textArea_ = document.createElement('textarea');
- this.textArea_.style.position = 'absolute';
- this.textArea_.readOnly = true;
- this.textArea_.value = this.annotation_.text;
- // Set the z-index so that this is shown on top of canvas.
- this.textArea_.style.zIndex = 1;
- Polymer.dom(Polymer.dom(ctx.canvas).parentNode)
- .appendChild(this.textArea_);
- }
-
- this.textArea_.style.width = this.styleWidth + 'px';
- this.textArea_.style.height = this.styleHeight + 'px';
- this.textArea_.style.fontSize = this.fontSize + 'px';
- this.textArea_.style.visibility = 'visible';
-
- // Update positions to latest coordinate.
- this.textArea_.style.left =
- coords.viewX + ctx.canvas.getBoundingClientRect().left +
- this.rightOffset + 'px';
- this.textArea_.style.top =
- coords.viewY - ctx.canvas.getBoundingClientRect().top -
- this.topOffset + 'px';
-
- // Draw pointer line from offset to actual location.
- ctx.strokeStyle = 'rgb(0, 0, 0)';
- ctx.lineWidth = 2;
- ctx.beginPath();
- tr.ui.b.drawLine(ctx, coords.viewX,
- coords.viewY - ctx.canvas.getBoundingClientRect().top,
- coords.viewX + this.rightOffset,
- coords.viewY - this.topOffset -
- ctx.canvas.getBoundingClientRect().top);
- ctx.stroke();
- }
- };
-
- return {
- CommentBoxAnnotationView: CommentBoxAnnotationView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/annotations/rect_annotation_view.html b/chromium/third_party/catapult/tracing/tracing/ui/annotations/rect_annotation_view.html
deleted file mode 100644
index 780f0268b3e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/annotations/rect_annotation_view.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/annotations/annotation_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.annotations', function() {
- /**
- * A view responsible for drawing a single highlight rectangle box on
- * the timeline.
- * @extends {AnnotationView}
- * @constructor
- */
- function RectAnnotationView(viewport, annotation) {
- this.viewport_ = viewport;
- this.annotation_ = annotation;
- }
-
- RectAnnotationView.prototype = {
- __proto__: tr.ui.annotations.AnnotationView.prototype,
-
- draw: function(ctx) {
- var dt = this.viewport_.currentDisplayTransform;
- var startCoords =
- this.annotation_.startLocation.toViewCoordinates(this.viewport_);
- var endCoords =
- this.annotation_.endLocation.toViewCoordinates(this.viewport_);
-
- // Prevent drawing into the ruler track by clamping the initial Y
- // point and the rect's Y size.
- var startY = startCoords.viewY - ctx.canvas.getBoundingClientRect().top;
- var sizeY = endCoords.viewY - startCoords.viewY;
- if (startY + sizeY < 0) {
- // In this case sizeY is negative. If final Y is negative,
- // overwrite startY so that the rectangle ends at y=0.
- startY = sizeY;
- } else if (startY < 0) {
- startY = 0;
- }
-
- ctx.fillStyle = this.annotation_.fillStyle;
- ctx.fillRect(startCoords.viewX, startY,
- endCoords.viewX - startCoords.viewX, sizeY);
- }
- };
-
- return {
- RectAnnotationView: RectAnnotationView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/annotations/x_marker_annotation_view.html b/chromium/third_party/catapult/tracing/tracing/ui/annotations/x_marker_annotation_view.html
deleted file mode 100644
index ec6a9e1cc21..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/annotations/x_marker_annotation_view.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/annotations/annotation_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.annotations', function() {
- /**
- * A view that draws a vertical line on the timeline at a specific timestamp.
- * @extends {AnnotationView}
- * @constructor
- */
- function XMarkerAnnotationView(viewport, annotation) {
- this.viewport_ = viewport;
- this.annotation_ = annotation;
- }
-
- XMarkerAnnotationView.prototype = {
- __proto__: tr.ui.annotations.AnnotationView.prototype,
-
- draw: function(ctx) {
- var dt = this.viewport_.currentDisplayTransform;
- var viewX = dt.xWorldToView(this.annotation_.timestamp);
-
- ctx.beginPath();
- tr.ui.b.drawLine(ctx, viewX, 0, viewX, ctx.canvas.height);
- ctx.strokeStyle = this.annotation_.strokeStyle;
- ctx.stroke();
- }
- };
-
- return {
- XMarkerAnnotationView: XMarkerAnnotationView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/animation.html b/chromium/third_party/catapult/tracing/tracing/ui/base/animation.html
deleted file mode 100644
index e0dce339240..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/animation.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- /**
- * Represents a procedural animation that can be run by an
- * tr.ui.b.AnimationController.
- *
- * @constructor
- */
- function Animation() {
- }
-
- Animation.prototype = {
-
- /**
- * Called when an animation has been queued after a running animation.
- *
- * @return {boolean} True if the animation can take on the responsibilities
- * of the running animation. If true, takeOverFor will be called on the
- * animation.
- *
- * This can be used to build animations that accelerate as pairs of them are
- * queued.
- */
- canTakeOverFor: function(existingAnimation) {
- throw new Error('Not implemented');
- },
-
- /**
- * Called to take over responsiblities of an existingAnimation.
- *
- * At this point, the existingAnimation has been ticked one last time, then
- * stopped. This animation will be started after this returns and has the
- * job of finishing(or transitioning away from) the effect the existing
- * animation was trying to accomplish.
- */
- takeOverFor: function(existingAnimation, newStartTimestamp, target) {
- throw new Error('Not implemented');
- },
-
- start: function(timestamp, target) {
- throw new Error('Not implemented');
- },
-
- /**
- * Called when an animation is stopped before it finishes. The animation can
- * do what it wants here, usually nothing.
- *
- * @param {Number} timestamp When the animation was stopped.
- * @param {Object} target The object being animated. May be undefined, take
- * care.
- * @param {boolean} willBeTakenOverByAnotherAnimation Whether this animation
- * is going to be handed to another animation's takeOverFor function.
- */
- didStopEarly: function(timestamp, target,
- willBeTakenOverByAnotherAnimation) {
- },
-
- /**
- * @return {boolean} true if the animation is finished.
- */
- tick: function(timestamp, target) {
- throw new Error('Not implemented');
- }
- };
-
- return {
- Animation: Animation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller.html b/chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller.html
deleted file mode 100644
index 4b94bd456e9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/ui/base/animation.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- /**
- * Manages execution, queueing and blending of tr.ui.b.Animations against
- * a single target.
- *
- * Targets must have a cloneAnimationState() method that returns all the
- * animatable states of that target.
- *
- * @constructor
- * @extends {tr.b.EventTarget}
- */
- function AnimationController() {
- tr.b.EventTarget.call(this);
-
- this.target_ = undefined;
-
- this.activeAnimation_ = undefined;
-
- this.tickScheduled_ = false;
- }
-
- AnimationController.prototype = {
- __proto__: tr.b.EventTarget.prototype,
-
- get target() {
- return this.target_;
- },
-
- set target(target) {
- if (this.activeAnimation_)
- throw new Error('Cannot change target while animation is running.');
- if (target.cloneAnimationState === undefined ||
- typeof target.cloneAnimationState !== 'function')
- throw new Error('target must have a cloneAnimationState function');
-
- this.target_ = target;
- },
-
- get activeAnimation() {
- return this.activeAnimation_;
- },
-
- get hasActiveAnimation() {
- return !!this.activeAnimation_;
- },
-
- queueAnimation: function(animation, opt_now) {
- if (this.target_ === undefined)
- throw new Error('Cannot queue animations without a target');
-
- var now;
- if (opt_now !== undefined)
- now = opt_now;
- else
- now = window.performance.now();
-
- if (this.activeAnimation_) {
- // Must tick the animation before stopping it case its about to stop,
- // and to update the target with its final sets of edits up to this
- // point.
- var done = this.activeAnimation_.tick(now, this.target_);
- if (done)
- this.activeAnimation_ = undefined;
- }
-
- if (this.activeAnimation_) {
- if (animation.canTakeOverFor(this.activeAnimation_)) {
- this.activeAnimation_.didStopEarly(now, this.target_, true);
- animation.takeOverFor(this.activeAnimation_, now, this.target_);
- } else {
- this.activeAnimation_.didStopEarly(now, this.target_, false);
- }
- }
- this.activeAnimation_ = animation;
- this.activeAnimation_.start(now, this.target_);
-
- if (this.tickScheduled_)
- return;
- this.tickScheduled_ = true;
- tr.b.requestAnimationFrame(this.tickActiveAnimation_, this);
- },
-
- cancelActiveAnimation: function(opt_now) {
- if (!this.activeAnimation_)
- return;
- var now;
- if (opt_now !== undefined)
- now = opt_now;
- else
- now = window.performance.now();
- this.activeAnimation_.didStopEarly(now, this.target_, false);
- this.activeAnimation_ = undefined;
- },
-
- tickActiveAnimation_: function(frameBeginTime) {
- this.tickScheduled_ = false;
- if (!this.activeAnimation_)
- return;
-
- if (this.target_ === undefined) {
- this.activeAnimation_.didStopEarly(frameBeginTime, this.target_, false);
- return;
- }
-
- var oldTargetState = this.target_.cloneAnimationState();
-
- var done = this.activeAnimation_.tick(frameBeginTime, this.target_);
- if (done)
- this.activeAnimation_ = undefined;
-
- if (this.activeAnimation_) {
- this.tickScheduled_ = true;
- tr.b.requestAnimationFrame(this.tickActiveAnimation_, this);
- }
-
- if (oldTargetState) {
- var e = new tr.b.Event('didtick');
- e.oldTargetState = oldTargetState;
- this.dispatchEvent(e, false, false);
- }
- }
- };
-
- return {
- AnimationController: AnimationController
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller_test.html
deleted file mode 100644
index a830a5902dd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/animation_controller_test.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/ui/base/animation_controller.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function SimpleAnimation(options) {
- this.stopTime = options.stopTime;
-
- this.startCalled = false;
- this.didStopEarlyCalled = false;
- this.wasTakenOver = false;
- this.tickCount = 0;
- }
-
- SimpleAnimation.prototype = {
- __proto__: tr.ui.b.Animation.prototype,
-
- canTakeOverFor: function(existingAnimation) {
- return false;
- },
-
- takeOverFor: function(existingAnimation, newStartTimestamp, target) {
- throw new Error('Not implemented');
- },
-
- start: function(timestamp, target) {
- this.startCalled = true;
- },
-
- didStopEarly: function(timestamp, target, willBeTakenOver) {
- this.didStopEarlyCalled = true;
- this.wasTakenOver = willBeTakenOver;
- },
-
- /**
- * @return {boolean} true if the animation is finished.
- */
- tick: function(timestamp, target) {
- this.tickCount++;
- return timestamp >= this.stopTime;
- }
- };
-
- test('cancel', function() {
- var target = {
- x: 0,
- cloneAnimationState: function() { return {x: this.x}; }
- };
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
-
- var animation = new SimpleAnimation({stopTime: 100});
- controller.queueAnimation(animation);
-
- tr.b.forcePendingRAFTasksToRun(0);
- assert.equal(animation.tickCount, 1);
- controller.cancelActiveAnimation();
- assert.isFalse(controller.hasActiveAnimation);
- assert.isTrue(animation.didStopEarlyCalled);
- });
-
- test('simple', function() {
- var target = {
- x: 0,
- cloneAnimationState: function() { return {x: this.x}; }
- };
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
-
- var animation = new SimpleAnimation({stopTime: 100});
- controller.queueAnimation(animation);
-
- tr.b.forcePendingRAFTasksToRun(0);
- assert.equal(animation.tickCount, 1);
- assert.isTrue(controller.hasActiveAnimation);
-
- tr.b.forcePendingRAFTasksToRun(100);
- assert.equal(animation.tickCount, 2);
- assert.isFalse(controller.hasActiveAnimation);
- });
-
- test('queueTwo', function() {
- // Clear all pending rafs so if something is lingering it will blow up here.
- tr.b.forcePendingRAFTasksToRun(0);
-
- var target = {
- x: 0,
- cloneAnimationState: function() { return {x: this.x}; }
- };
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
-
- var a1 = new SimpleAnimation({stopTime: 100});
- var a2 = new SimpleAnimation({stopTime: 100});
- controller.queueAnimation(a1, 0);
- assert.isTrue(a1.startCalled);
- controller.queueAnimation(a2, 50);
- assert.isTrue(a1.didStopEarlyCalled);
- assert.isTrue(a2.startCalled);
-
- tr.b.forcePendingRAFTasksToRun(150);
- assert.isFalse(controller.hasActiveAnimation);
- assert.isAbove(a2.tickCount, 0);
- });
-
- /**
- * @constructor
- */
- function AnimationThatCanTakeOverForSimpleAnimation() {
- this.takeOverForAnimation = undefined;
- }
-
- AnimationThatCanTakeOverForSimpleAnimation.prototype = {
- __proto__: tr.ui.b.Animation.prototype,
-
-
- canTakeOverFor: function(existingAnimation) {
- return existingAnimation instanceof SimpleAnimation;
- },
-
- takeOverFor: function(existingAnimation, newStartTimestamp, target) {
- this.takeOverForAnimation = existingAnimation;
- },
-
- start: function(timestamp, target) {
- this.startCalled = true;
- }
- };
-
- test('takeOver', function() {
- var target = {
- x: 0,
- cloneAnimationState: function() { return {x: this.x}; }
- };
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
-
- var a1 = new SimpleAnimation({stopTime: 100});
- var a2 = new AnimationThatCanTakeOverForSimpleAnimation();
- controller.queueAnimation(a1, 0);
- assert.isTrue(a1.startCalled);
- assert.equal(a1.tickCount, 0);
- controller.queueAnimation(a2, 10);
- assert.isTrue(a1.didStopEarlyCalled);
- assert.isTrue(a1.wasTakenOver);
- assert.equal(a1.tickCount, 1);
-
- assert.equal(a1, a2.takeOverForAnimation);
- assert.isTrue(a2.startCalled);
-
- controller.cancelActiveAnimation();
- assert.isFalse(controller.hasActiveAnimation);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart.html
deleted file mode 100644
index 67ec5382c09..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart.html
+++ /dev/null
@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/column_chart.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ColumnChart = tr.ui.b.ColumnChart;
-
- // @constructor
- var BarChart = tr.ui.b.define('bar-chart', ColumnChart);
-
- BarChart.prototype = {
- __proto__: ColumnChart.prototype,
-
- decorate: function() {
- ColumnChart.prototype.decorate.call(this);
- Polymer.dom(this).classList.add('bar-chart');
- this.verticalScale_ = undefined;
- this.horizontalScale_ = undefined;
- },
-
- updateScales_: function() {
- ColumnChart.prototype.updateScales_.call(this);
- this.yScale_.range([this.chartAreaSize.width, 0]);
- this.xScale_.range([0, this.chartAreaSize.height]);
- this.verticalScale_ = this.isYLogScale_ ? d3.scale.log(10) :
- d3.scale.linear();
- this.verticalScale_.domain(this.xScale_.domain());
- this.verticalScale_.range([this.chartAreaSize.height, 0]);
- this.horizontalScale_ = d3.scale.linear();
- this.horizontalScale_.domain(this.yScale_.domain());
- this.horizontalScale_.range([0, this.chartAreaSize.width]);
- },
-
- drawBrush_: function(brushRectsSel) {
- brushRectsSel
- .attr('x', 0)
- .attr('width', this.chartAreaSize.width)
- .attr('y', function(d) {
- return this.verticalScale_(d.max);
- }.bind(this))
- .attr('height', function(d) {
- return this.verticalScale_(d.min) - this.verticalScale_(d.max);
- }.bind(this));
- },
-
- getDataPointAtChartPoint_: function(chartPoint) {
- var flippedPoint = {
- x: this.chartAreaSize.height - chartPoint.y,
- y: this.chartAreaSize.width - chartPoint.x
- };
- return ColumnChart.prototype.getDataPointAtChartPoint_.call(
- this, flippedPoint);
- },
-
- drawXAxis_: function(xAxis) {
- xAxis.attr('transform', 'translate(0,' + this.chartAreaSize.height + ')')
- .call(d3.svg.axis()
- .scale(this.horizontalScale_)
- .orient('bottom'));
- },
-
- drawYAxis_: function(yAxis) {
- var axisModifier = d3.svg.axis()
- .scale(this.verticalScale_)
- .orient('left');
- yAxis.call(axisModifier);
- },
-
- drawHoverValueBox_: function(rect) {
- var seriesKeys = [...this.seriesByKey_.keys()];
- var chartAreaSel = d3.select(this.chartAreaElement);
- chartAreaSel.selectAll('.hover').remove();
- var keyWidthPx = 0;
- var keyHeightPx = 0;
- if (seriesKeys.length > 1) {
- keyWidthPx = tr.ui.b.getSVGTextWidth(
- this.chartAreaElement, rect.key) + 5;
- keyHeightPx = 16;
- }
- var valueWidthPx = tr.ui.b.getSVGTextWidth(
- this.chartAreaElement, rect.value) + 5;
- var valueHeightPx = 16;
- var hoverWidthPx = Math.max(keyWidthPx, valueWidthPx);
- var hoverTopPx = rect.topPx + (rect.heightPx / 2);
- var hoverLeftPx = rect.leftPx + rect.widthPx - hoverWidthPx;
- chartAreaSel
- .append('rect')
- .attr('class', 'hover')
- .attr('fill', 'white')
- .attr('x', hoverLeftPx)
- .attr('y', hoverTopPx)
- .attr('width', hoverWidthPx)
- .attr('height', keyHeightPx + valueHeightPx);
- if (seriesKeys.length > 1) {
- chartAreaSel
- .append('text')
- .attr('class', 'hover')
- .attr('fill', rect.color)
- .attr('x', hoverLeftPx + 2)
- .attr('y', hoverTopPx + keyHeightPx - 3)
- .text(rect.key);
- }
-
- chartAreaSel
- .append('text')
- .attr('class', 'hover')
- .attr('fill', rect.color)
- .attr('x', hoverLeftPx + 2)
- .attr('y', hoverTopPx + keyHeightPx + valueHeightPx - 3)
- .text(rect.value);
- },
-
- drawRect_: function(rect, sel) {
- // Flip |rect| around |y=x|.
- var colRect = {
- key: rect.key,
- value: rect.value,
- color: rect.color,
- topPx: this.chartAreaSize.height - rect.leftPx - rect.widthPx,
- leftPx: this.chartAreaSize.width - rect.topPx - rect.heightPx,
- widthPx: rect.heightPx,
- heightPx: rect.widthPx,
- };
- ColumnChart.prototype.drawRect_.call(this, colRect, sel);
- }
- };
-
- return {
- BarChart: BarChart
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart_test.html
deleted file mode 100644
index ff991993c15..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/bar_chart_test.html
+++ /dev/null
@@ -1,243 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/bar_chart.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiation_singleSeries', function() {
- var chart = new tr.ui.b.BarChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 100},
- {x: 20, value: 110},
- {x: 30, value: 100},
- {x: 40, value: 50}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_singleDatum', function() {
- var chart = new tr.ui.b.BarChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 0, value: 100},
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_stacked', function() {
- var chart = new tr.ui.b.BarChart();
- chart.isStacked = true;
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'title';
- var data = [
- {x: 10, foo: 10, bar: 5, qux: 7},
- {x: 20, foo: 11, bar: 6, qux: 3},
- {x: 30, foo: 10, bar: 4, qux: 8},
- {x: 40, foo: 5, bar: 1, qux: 2}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_singleSeries_yLogScale', function() {
- var chart = new tr.ui.b.BarChart();
- chart.isYLogScale = true;
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 100},
- {x: 20, value: 10},
- {x: 30, value: 1},
- {x: 40, value: 0.1},
- {x: 50, value: 0.01},
- {x: 60, value: 0.001}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('undefined', function() {
- var chart = new tr.ui.b.BarChart();
- assert.throws(function() {
- chart.data = undefined;
- });
- });
-
- test('instantiation_twoSeries', function() {
- var chart = new tr.ui.b.BarChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 100, beta: 50},
- {x: 20, alpha: 110, beta: 75},
- {x: 30, alpha: 100, beta: 125},
- {x: 40, alpha: 50, beta: 125}
- ];
- chart.data = data;
-
- var r = new tr.b.Range();
- r.addValue(20);
- r.addValue(40);
- chart.brushedRange = r;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSeries_yLogScale', function() {
- var chart = new tr.ui.b.BarChart();
- chart.isYLogScale = true;
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 100, beta: 50},
- {x: 20, alpha: 110, beta: 75},
- {x: 30, alpha: 100, beta: 125},
- {x: 40, alpha: 50, beta: 125}
- ];
- chart.data = data;
-
- var r = new tr.b.Range();
- r.addValue(20);
- r.addValue(40);
- chart.brushedRange = r;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueSparse', function() {
- var chart = new tr.ui.b.BarChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 20, beta: undefined},
- {x: 20, alpha: undefined, beta: 10},
- {x: 30, alpha: 10, beta: undefined},
- {x: 45, alpha: undefined, beta: 20},
- {x: 50, alpha: 25, beta: 30}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueNotSparse', function() {
- var chart = new tr.ui.b.BarChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 20, beta: 40},
- {x: 20, alpha: undefined, beta: 10},
- {x: 30, alpha: 10, beta: undefined},
- {x: 45, alpha: undefined, beta: 20},
- {x: 50, alpha: 30, beta: undefined}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('brushRangeFromIndices', function() {
- var chart = new tr.ui.b.BarChart();
- var data = [
- {x: 10, value: 50},
- {x: 30, value: 60},
- {x: 70, value: 70},
- {x: 80, value: 80},
- {x: 120, value: 90}
- ];
- chart.data = data;
- var r = new tr.b.Range();
-
- // Range min should be 10.
- r = chart.computeBrushRangeFromIndices(-2, 1);
- assert.equal(r.min, 10);
-
- // Range max should be 120.
- r = chart.computeBrushRangeFromIndices(3, 10);
- assert.equal(r.max, 120);
-
- // Range should be [10, 120]
- r = chart.computeBrushRangeFromIndices(-2, 10);
- assert.equal(r.min, 10);
- assert.equal(r.max, 120);
-
- // Range should be [20, 100]
- r = chart.computeBrushRangeFromIndices(1, 3);
- assert.equal(r.min, 20);
- assert.equal(r.max, 100);
- });
-
- test('instantiation_interactiveBrushing', function() {
- var chart = new tr.ui.b.BarChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 50},
- {x: 20, value: 60},
- {x: 30, value: 80},
- {x: 40, value: 20},
- {x: 50, value: 30},
- {x: 60, value: 20},
- {x: 70, value: 15},
- {x: 80, value: 20}
- ];
- chart.data = data;
-
- var mouseDownX = undefined;
- var curMouseX = undefined;
-
- function updateBrushedRange() {
- if (mouseDownX === undefined || (mouseDownX === curMouseX)) {
- chart.brushedRange = new tr.b.Range();
- return;
- }
- var r = new tr.b.Range();
- r.min = Math.min(mouseDownX, curMouseX);
- r.max = Math.max(mouseDownX, curMouseX);
- chart.brushedRange = r;
- }
-
- chart.addEventListener('item-mousedown', function(e) {
- mouseDownX = e.x;
- curMouseX = e.x;
- updateBrushedRange();
- });
- chart.addEventListener('item-mousemove', function(e) {
- if (e.button === undefined)
- return;
- curMouseX = e.x;
- updateBrushedRange();
- });
- chart.addEventListener('item-mouseup', function(e) {
- curMouseX = e.x;
- updateBrushedRange();
- });
- this.addHTMLOutput(chart);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/base.html b/chromium/third_party/catapult/tracing/tracing/ui/base/base.html
deleted file mode 100644
index e0ca9e23c6b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/base.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/polymer_preload.html" data-suppress-import-order>
-
-<!--
-Polymer is imported through third-party HTML files, which means that we have to
-manually list all recursive imports.
--->
-<link rel="import" href="/components/polymer/polymer-micro.html" data-suppress-import-order>
-<link rel="import" href="/components/polymer/polymer-mini.html" data-suppress-import-order>
-<link rel="import" href="/components/polymer/polymer.html" data-suppress-import-order>
-
-<link rel="import" href="/tracing/ui/base/polymer_postload.html" data-suppress-import-order>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/camera.html b/chromium/third_party/catapult/tracing/tracing/ui/base/camera.html
deleted file mode 100644
index 2cef0b9f394..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/camera.html
+++ /dev/null
@@ -1,349 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
-
- var constants = {
- DEFAULT_SCALE: 0.5,
- DEFAULT_EYE_DISTANCE: 10000,
- MINIMUM_DISTANCE: 1000,
- MAXIMUM_DISTANCE: 100000,
- FOV: 15,
- RESCALE_TIMEOUT_MS: 200,
- MAXIMUM_TILT: 80,
- SETTINGS_NAMESPACE: 'tr.ui_camera'
- };
-
-
- var Camera = tr.ui.b.define('camera');
-
- Camera.prototype = {
- __proto__: HTMLUnknownElement.prototype,
-
- decorate: function(eventSource) {
- this.eventSource_ = eventSource;
-
- this.eventSource_.addEventListener('beginpan',
- this.onPanBegin_.bind(this));
- this.eventSource_.addEventListener('updatepan',
- this.onPanUpdate_.bind(this));
- this.eventSource_.addEventListener('endpan',
- this.onPanEnd_.bind(this));
-
- this.eventSource_.addEventListener('beginzoom',
- this.onZoomBegin_.bind(this));
- this.eventSource_.addEventListener('updatezoom',
- this.onZoomUpdate_.bind(this));
- this.eventSource_.addEventListener('endzoom',
- this.onZoomEnd_.bind(this));
-
- this.eventSource_.addEventListener('beginrotate',
- this.onRotateBegin_.bind(this));
- this.eventSource_.addEventListener('updaterotate',
- this.onRotateUpdate_.bind(this));
- this.eventSource_.addEventListener('endrotate',
- this.onRotateEnd_.bind(this));
-
- this.eye_ = [0, 0, constants.DEFAULT_EYE_DISTANCE];
- this.gazeTarget_ = [0, 0, 0];
- this.rotation_ = [0, 0];
-
- this.pixelRatio_ = window.devicePixelRatio || 1;
- },
-
-
- get modelViewMatrix() {
- var mvMatrix = mat4.create();
-
- mat4.lookAt(mvMatrix, this.eye_, this.gazeTarget_, [0, 1, 0]);
- return mvMatrix;
- },
-
- get projectionMatrix() {
- var rect =
- tr.ui.b.windowRectForElement(this.canvas_).
- scaleSize(this.pixelRatio_);
-
- var aspectRatio = rect.width / rect.height;
- var matrix = mat4.create();
- mat4.perspective(
- matrix, tr.b.deg2rad(constants.FOV), aspectRatio, 1, 100000);
-
- return matrix;
- },
-
- set canvas(c) {
- this.canvas_ = c;
- },
-
- set deviceRect(rect) {
- this.deviceRect_ = rect;
- },
-
- get stackingDistanceDampening() {
- var gazeVector = [
- this.gazeTarget_[0] - this.eye_[0],
- this.gazeTarget_[1] - this.eye_[1],
- this.gazeTarget_[2] - this.eye_[2]];
- vec3.normalize(gazeVector, gazeVector);
- return 1 + gazeVector[2];
- },
-
- loadCameraFromSettings: function(settings) {
- this.eye_ = settings.get(
- 'eye', this.eye_, constants.SETTINGS_NAMESPACE);
- this.gazeTarget_ = settings.get(
- 'gaze_target', this.gazeTarget_, constants.SETTINGS_NAMESPACE);
- this.rotation_ = settings.get(
- 'rotation', this.rotation_, constants.SETTINGS_NAMESPACE);
-
- this.dispatchRenderEvent_();
- },
-
- saveCameraToSettings: function(settings) {
- settings.set(
- 'eye', this.eye_, constants.SETTINGS_NAMESPACE);
- settings.set(
- 'gaze_target', this.gazeTarget_, constants.SETTINGS_NAMESPACE);
- settings.set(
- 'rotation', this.rotation_, constants.SETTINGS_NAMESPACE);
- },
-
- resetCamera: function() {
- this.eye_ = [0, 0, constants.DEFAULT_EYE_DISTANCE];
- this.gazeTarget_ = [0, 0, 0];
- this.rotation_ = [0, 0];
-
- var settings = tr.b.SessionSettings();
- var keys = settings.keys(constants.SETTINGS_NAMESPACE);
- if (keys.length !== 0) {
- this.loadCameraFromSettings(settings);
- return;
- }
-
- if (this.deviceRect_) {
- var rect = tr.ui.b.windowRectForElement(this.canvas_).
- scaleSize(this.pixelRatio_);
-
- this.eye_[0] = this.deviceRect_.width / 2;
- this.eye_[1] = this.deviceRect_.height / 2;
-
- this.gazeTarget_[0] = this.deviceRect_.width / 2;
- this.gazeTarget_[1] = this.deviceRect_.height / 2;
- }
-
- this.saveCameraToSettings(settings);
- this.dispatchRenderEvent_();
- },
-
- updatePanByDelta: function(delta) {
- var rect =
- tr.ui.b.windowRectForElement(this.canvas_).
- scaleSize(this.pixelRatio_);
-
- // Get the eye vector, since we'll be adjusting gazeTarget.
- var eyeVector = [
- this.eye_[0] - this.gazeTarget_[0],
- this.eye_[1] - this.gazeTarget_[1],
- this.eye_[2] - this.gazeTarget_[2]];
- var length = vec3.length(eyeVector);
- vec3.normalize(eyeVector, eyeVector);
-
- var halfFov = constants.FOV / 2;
- var multiplier =
- 2.0 * length * Math.tan(tr.b.deg2rad(halfFov)) / rect.height;
-
- // Get the up and right vectors.
- var up = [0, 1, 0];
- var rotMatrix = mat4.create();
- mat4.rotate(
- rotMatrix, rotMatrix, tr.b.deg2rad(this.rotation_[1]), [0, 1, 0]);
- mat4.rotate(
- rotMatrix, rotMatrix, tr.b.deg2rad(this.rotation_[0]), [1, 0, 0]);
- vec3.transformMat4(up, up, rotMatrix);
-
- var right = [0, 0, 0];
- vec3.cross(right, eyeVector, up);
- vec3.normalize(right, right);
-
- // Update the gaze target.
- for (var i = 0; i < 3; ++i) {
- this.gazeTarget_[i] +=
- delta[0] * multiplier * right[i] - delta[1] * multiplier * up[i];
-
- this.eye_[i] = this.gazeTarget_[i] + length * eyeVector[i];
- }
-
- // If we have some z offset, we need to reposition gazeTarget
- // to be on the plane z = 0 with normal [0, 0, 1].
- if (Math.abs(this.gazeTarget_[2]) > 1e-6) {
- var gazeVector = [-eyeVector[0], -eyeVector[1], -eyeVector[2]];
- var newLength = tr.b.clamp(
- -this.eye_[2] / gazeVector[2],
- constants.MINIMUM_DISTANCE,
- constants.MAXIMUM_DISTANCE);
-
- for (var i = 0; i < 3; ++i)
- this.gazeTarget_[i] = this.eye_[i] + newLength * gazeVector[i];
- }
-
- this.saveCameraToSettings(tr.b.SessionSettings());
- this.dispatchRenderEvent_();
- },
-
- updateZoomByDelta: function(delta) {
- var deltaY = delta[1];
- deltaY = tr.b.clamp(deltaY, -50, 50);
- var scale = 1.0 - deltaY / 100.0;
-
- var eyeVector = [0, 0, 0];
- vec3.subtract(eyeVector, this.eye_, this.gazeTarget_);
-
- var length = vec3.length(eyeVector);
-
- // Clamp the length to allowed values by changing the scale.
- if (length * scale < constants.MINIMUM_DISTANCE)
- scale = constants.MINIMUM_DISTANCE / length;
- else if (length * scale > constants.MAXIMUM_DISTANCE)
- scale = constants.MAXIMUM_DISTANCE / length;
-
- vec3.scale(eyeVector, eyeVector, scale);
- vec3.add(this.eye_, this.gazeTarget_, eyeVector);
-
- this.saveCameraToSettings(tr.b.SessionSettings());
- this.dispatchRenderEvent_();
- },
-
- updateRotateByDelta: function(delta) {
- delta[0] *= 0.5;
- delta[1] *= 0.5;
-
- if (Math.abs(this.rotation_[0] + delta[1]) > constants.MAXIMUM_TILT)
- return;
- if (Math.abs(this.rotation_[1] - delta[0]) > constants.MAXIMUM_TILT)
- return;
-
- var eyeVector = [0, 0, 0, 0];
- vec3.subtract(eyeVector, this.eye_, this.gazeTarget_);
-
- // Undo the current rotation.
- var rotMatrix = mat4.create();
- mat4.rotate(
- rotMatrix, rotMatrix, -tr.b.deg2rad(this.rotation_[0]), [1, 0, 0]);
- mat4.rotate(
- rotMatrix, rotMatrix, -tr.b.deg2rad(this.rotation_[1]), [0, 1, 0]);
- vec4.transformMat4(eyeVector, eyeVector, rotMatrix);
-
- // Update rotation values.
- this.rotation_[0] += delta[1];
- this.rotation_[1] -= delta[0];
-
- // Redo the new rotation.
- mat4.identity(rotMatrix);
- mat4.rotate(
- rotMatrix, rotMatrix, tr.b.deg2rad(this.rotation_[1]), [0, 1, 0]);
- mat4.rotate(
- rotMatrix, rotMatrix, tr.b.deg2rad(this.rotation_[0]), [1, 0, 0]);
- vec4.transformMat4(eyeVector, eyeVector, rotMatrix);
-
- vec3.add(this.eye_, this.gazeTarget_, eyeVector);
-
- this.saveCameraToSettings(tr.b.SessionSettings());
- this.dispatchRenderEvent_();
- },
-
-
- // Event callbacks.
- onPanBegin_: function(e) {
- this.panning_ = true;
- this.lastMousePosition_ = this.getMousePosition_(e);
- },
-
- onPanUpdate_: function(e) {
- if (!this.panning_)
- return;
-
- var delta = this.getMouseDelta_(e, this.lastMousePosition_);
- this.lastMousePosition_ = this.getMousePosition_(e);
- this.updatePanByDelta(delta);
- },
-
- onPanEnd_: function(e) {
- this.panning_ = false;
- },
-
- onZoomBegin_: function(e) {
- this.zooming_ = true;
-
- var p = this.getMousePosition_(e);
-
- this.lastMousePosition_ = p;
- this.zoomPoint_ = p;
- },
-
- onZoomUpdate_: function(e) {
- if (!this.zooming_)
- return;
-
- var delta = this.getMouseDelta_(e, this.lastMousePosition_);
- this.lastMousePosition_ = this.getMousePosition_(e);
- this.updateZoomByDelta(delta);
- },
-
- onZoomEnd_: function(e) {
- this.zooming_ = false;
- this.zoomPoint_ = undefined;
- },
-
- onRotateBegin_: function(e) {
- this.rotating_ = true;
- this.lastMousePosition_ = this.getMousePosition_(e);
- },
-
- onRotateUpdate_: function(e) {
- if (!this.rotating_)
- return;
-
- var delta = this.getMouseDelta_(e, this.lastMousePosition_);
- this.lastMousePosition_ = this.getMousePosition_(e);
- this.updateRotateByDelta(delta);
- },
-
- onRotateEnd_: function(e) {
- this.rotating_ = false;
- },
-
-
- // Misc helper functions.
- getMousePosition_: function(e) {
- var rect = tr.ui.b.windowRectForElement(this.canvas_);
- return [(e.clientX - rect.x) * this.pixelRatio_,
- (e.clientY - rect.y) * this.pixelRatio_];
- },
-
- getMouseDelta_: function(e, p) {
- var newP = this.getMousePosition_(e);
- return [newP[0] - p[0], newP[1] - p[1]];
- },
-
- dispatchRenderEvent_: function() {
- tr.b.dispatchSimpleEvent(this, 'renderrequired', false, false);
- }
- };
-
- return {
- Camera: Camera
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/camera_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/camera_test.html
deleted file mode 100644
index 8a11663eeda..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/camera_test.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/base/quad.html">
-<link rel="import" href="/tracing/base/bbox2.html">
-<link rel="import" href="/tracing/ui/base/quad_stack_view.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function createQuads() {
- var quads = [
- tr.b.Quad.fromXYWH(-500, -500, 30, 30), // 4 corners
- tr.b.Quad.fromXYWH(-500, 470, 30, 30),
- tr.b.Quad.fromXYWH(470, -500, 30, 30),
- tr.b.Quad.fromXYWH(470, 470, 30, 30),
- tr.b.Quad.fromXYWH(-250, -250, 250, 250), // crosshairs
- tr.b.Quad.fromXYWH(0, -250, 250, 250), // crosshairs
- tr.b.Quad.fromXYWH(-250, 0, 250, 250), // crosshairs
- tr.b.Quad.fromXYWH(0, 0, 250, 250) // crosshairs
- ];
- quads[0].stackingGroupId = 0;
- quads[1].stackingGroupId = 0;
- quads[2].stackingGroupId = 0;
- quads[3].stackingGroupId = 0;
- quads[4].stackingGroupId = 1;
- quads[5].stackingGroupId = 1;
- quads[6].stackingGroupId = 1;
- quads[7].stackingGroupId = 1;
- return quads;
- }
-
- function createQuadStackView(testFramework) {
- var quads = createQuads();
- var view = new tr.ui.b.QuadStackView();
- // simulate the constraints of the layer-tree-view
- view.style.height = '400px';
- view.style.width = '800px';
- view.deviceRect = tr.b.Rect.fromXYWH(-250, -250, 500, 500);
- view.quads = quads;
-
- testFramework.addHTMLOutput(view);
- return view;
- }
-
- test('initialState', function() {
- var view = createQuadStackView(this);
-
- var viewRect =
- view.getBoundingClientRect();
- assert.equal(viewRect.height, 400);
- assert.equal(viewRect.width, 800);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base.html b/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base.html
deleted file mode 100644
index e57daf3ac6c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base.html
+++ /dev/null
@@ -1,488 +0,0 @@
- <!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-<link rel="import" href="/tracing/ui/base/d3.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id="tr-ui-b-chart-legend-key">
- <template>
- <style>
- #checkbox {
- margin: 0;
- visibility: hidden;
- vertical-align: text-top;
- }
- #label, #link {
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- display: inline-block;
- }
- </style>
-
- <input type=checkbox id="checkbox" checked>
- <tr-ui-a-analysis-link id="link"></tr-ui-a-analysis-link>
- <label id="label"></label>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- function getSVGTextWidth(parentNode, text) {
- var textNode = document.createElementNS(
- 'http://www.w3.org/2000/svg', 'text');
- textNode.setAttributeNS(null, 'x', 0);
- textNode.setAttributeNS(null, 'y', 0);
- textNode.setAttributeNS(null, 'fill', 'black');
- textNode.appendChild(document.createTextNode(text));
- parentNode.appendChild(textNode);
- var widthPx = textNode.getComputedTextLength();
- parentNode.removeChild(textNode);
- return widthPx;
- }
-
- return {
- getSVGTextWidth: getSVGTextWidth
- };
-});
-
-Polymer({
- is: 'tr-ui-b-chart-legend-key',
-
- ready: function() {
- this.$.checkbox.addEventListener(
- 'change', this.onCheckboxChange_.bind(this));
- },
-
- /**
- * Dispatch an event when the checkbox is toggled.
- * The checkbox is visible when optional is set to true.
- */
- onCheckboxChange_: function() {
- tr.b.dispatchSimpleEvent(this, tr.ui.b.DataSeriesEnableChangeEventType,
- true, false,
- {key: Polymer.dom(this).textContent, enabled: this.enabled});
- },
-
- set textContent(t) {
- Polymer.dom(this.$.label).textContent = t;
- Polymer.dom(this.$.link).textContent = t;
- this.updateContents_();
- },
-
- set width(w) {
- w -= 20; // reserve 20px for the checkbox
- this.$.link.style.width = w + 'px';
- this.$.label.style.width = w + 'px';
- },
-
- get textContent() {
- return Polymer.dom(this.$.label).textContent;
- },
-
- /**
- * When a legend-key is "optional", then its checkbox is visible to allow
- * the user to enable/disable the data series for the key.
- *
- * @param {boolean} optional
- */
- set optional(optional) {
- this.$.checkbox.style.visibility = optional ? 'visible' : 'hidden';
- },
-
- get optional() {
- return this.$.checkbox.style.visibility === 'visible';
- },
-
- set enabled(enabled) {
- this.$.checkbox.checked = enabled ? 'checked' : '';
- },
-
- get enabled() {
- return this.$.checkbox.checked;
- },
-
- set color(c) {
- this.$.label.style.color = c;
- this.$.link.color = c;
- },
-
- /**
- * When target is defined, label is hidden and link is shown.
- * When the link is clicked, then a RequestSelectionChangeEvent is
- * dispatched containing the target.
- * When target is undefined, label is shown and link is hidden, so that the
- * link is not clickable.
- */
- set target(target) {
- this.$.link.setSelectionAndContent(
- target, Polymer.dom(this.$.label).textContent);
- this.updateContents_();
- },
-
- get target() {
- return this.$.link.selection;
- },
-
- updateContents_: function() {
- this.$.link.style.display = this.target ? '' : 'none';
- this.$.label.style.display = this.target ? 'none' : '';
- this.$.label.htmlFor = this.optional ? 'checkbox' : '';
- }
-});
-</script>
-
-<style>
- * /deep/ .chart-base #title {
- font-size: 16pt;
- }
-
- * /deep/ .chart-base {
- -webkit-user-select: none;
- cursor: default;
- }
-
- * /deep/ .chart-base .axis path,
- * /deep/ .chart-base .axis line {
- fill: none;
- shape-rendering: crispEdges;
- stroke: #000;
- }
-
- * /deep/ .chart-base .legend body {
- margin: 0;
- }
-</style>
-
-<template id="chart-base-template">
- <svg> <!-- svg tag is dropped by ChartBase.decorate. -->
- <g xmlns="http://www.w3.org/2000/svg" id="chart-area">
- <g class="x axis"></g>
- <g class="y axis"></g>
- <text id="title"></text>
- </g>
- </svg>
-</template>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var DataSeriesEnableChangeEventType = 'data-series-enabled-change';
-
- var THIS_DOC = document.currentScript.ownerDocument;
-
- var svgNS = 'http://www.w3.org/2000/svg';
- var ColorScheme = tr.b.ColorScheme;
-
- function getColorOfKey(key, selected) {
- var id = ColorScheme.getColorIdForGeneralPurposeString(key);
- if (selected)
- id += ColorScheme.properties.brightenedOffsets[0];
- return ColorScheme.colorsAsStrings[id];
- }
-
- function DataSeries(key) {
- this.key_ = key;
- this.target_ = undefined;
- this.optional_ = false;
- this.enabled_ = true;
- this.color_ = getColorOfKey(key, false);
- this.highlightedColor_ = getColorOfKey(key, true);
- }
-
- DataSeries.prototype = {
- get key() {
- return this.key_;
- },
-
- get color() {
- return this.color_;
- },
-
- set color(c) {
- this.color_ = c;
- },
-
- get highlightedColor() {
- return this.highlightedColor_;
- },
-
- set highlightedColor(c) {
- this.highlightedColor_ = c;
- },
-
- get optional() {
- return this.optional_;
- },
-
- set optional(optional) {
- this.optional_ = optional;
- },
-
- get enabled() {
- return this.enabled_;
- },
-
- set enabled(enabled) {
- // If the caller is disabling a data series, but it wasn't optional, then
- // force it to be optional.
- if (!this.optional && !enabled)
- this.optional = true;
- this.enabled_ = enabled;
- },
-
- get target() {
- return this.target_;
- },
-
- set target(t) {
- this.target_ = t;
- }
- };
-
- /**
- * A virtual base class for basic charts that provides X and Y axes, if
- * needed, a title, and legend.
- *
- * @constructor
- */
- var ChartBase = tr.ui.b.define('svg', undefined, svgNS);
-
- ChartBase.prototype = {
- __proto__: HTMLUnknownElement.prototype,
-
- getDataSeries: function(key) {
- if (!this.seriesByKey_.has(key))
- this.seriesByKey_.set(key, new DataSeries(key));
- return this.seriesByKey_.get(key);
- },
-
- decorate: function() {
- Polymer.dom(this).classList.add('chart-base');
- this.chartTitle_ = undefined;
- this.seriesByKey_ = new Map();
- this.width_ = 400;
- this.height_ = 300;
- this.margin = {top: 20, right: 72, bottom: 30, left: 50};
- this.hideLegend_ = false;
-
- // This should use tr.ui.b.instantiateTemplate. However, creating
- // svg-namespaced elements inside a template isn't possible. Thus, this
- // hack.
- var template =
- Polymer.dom(THIS_DOC).querySelector('#chart-base-template');
- var svgEl = Polymer.dom(template.content).querySelector('svg');
- for (var i = 0; i < Polymer.dom(svgEl).children.length; i++)
- Polymer.dom(this).appendChild(
- Polymer.dom(svgEl.children[i]).cloneNode(true));
-
- // svg likes to take over width & height properties for some reason. This
- // works around it.
- Object.defineProperty(
- this, 'width', {
- get: function() {
- return this.width_;
- },
- set: function(width) {
- this.width_ = width;
- this.updateContents_();
- }
- });
- Object.defineProperty(
- this, 'height', {
- get: function() {
- return this.height_;
- },
- set: function(height) {
- this.height_ = height;
- this.updateContents_();
- }
- });
- this.addEventListener(DataSeriesEnableChangeEventType,
- this.onDataSeriesEnableChange_.bind(this));
- },
-
- get hideLegend() {
- return this.hideLegend_;
- },
-
- set hideLegend(h) {
- this.hideLegend_ = h;
- this.updateContents_();
- },
-
- isSeriesEnabled: function(key) {
- return this.getDataSeries(key).enabled;
- },
-
- onDataSeriesEnableChange_: function(event) {
- this.getDataSeries(event.key).enabled = event.enabled;
- this.updateContents_();
- },
-
- get chartTitle() {
- return this.chartTitle_;
- },
-
- set chartTitle(chartTitle) {
- if (chartTitle && !this.chartTitle_)
- this.margin.top += this.titleMarginPx;
- else if (this.chartTitle_ && !chartTitle)
- this.margin.top -= this.titleMarginPx;
-
- this.chartTitle_ = chartTitle;
- this.updateContents_();
- },
-
- get titleMarginPx() {
- return 20;
- },
-
- get chartAreaElement() {
- return Polymer.dom(this).querySelector('#chart-area');
- },
-
- setSize: function(size) {
- this.width_ = size.width;
- this.height_ = size.height;
- this.updateContents_();
- },
-
- get chartAreaSize() {
- return {
- width: this.width_ - this.margin.left - this.margin.right,
- height: this.height_ - this.margin.top - this.margin.bottom
- };
- },
-
- updateScales_: function() {
- throw new Error('Not implemented');
- },
-
- updateContents_: function() {
- var thisSel = d3.select(this);
- thisSel.attr('width', this.width_);
- thisSel.attr('height', this.height_);
-
- var chartAreaSel = d3.select(this.chartAreaElement);
- chartAreaSel.attr('transform',
- 'translate(' + this.margin.left + ',' + this.margin.top + ')');
-
- this.updateScales_();
- this.updateTitle_(chartAreaSel);
- this.updateLegend_();
- },
-
- updateTitle_: function(chartAreaSel) {
- var titleSel = chartAreaSel.select('#title');
- if (!this.chartTitle_) {
- titleSel.style('display', 'none');
- return;
- }
- var width = this.chartAreaSize.width;
- titleSel.attr('transform', 'translate(' + width * 0.5 + ',-5)')
- .style('display', undefined)
- .style('text-anchor', 'middle')
- .attr('class', 'title')
- .attr('width', width)
- .text(this.chartTitle_);
- },
-
- updateLegend_: function() {
- var chartAreaSel = d3.select(this.chartAreaElement);
- chartAreaSel.selectAll('.legend').remove();
- if (this.hideLegend)
- return;
-
- var series = [...this.seriesByKey_.values()].reverse();
- var legendEntriesSel = chartAreaSel.selectAll('.legend').data(series);
-
- var width = this.margin.right - 2;
- legendEntriesSel.enter()
- .append('foreignObject')
- .attr('class', 'legend')
- .attr('x', this.chartAreaSize.width + 2)
- .attr('width', width)
- .attr('height', 18)
- .attr('transform', function(series, i) {
- return 'translate(0,' + i * 18 + ')';
- })
- .append('xhtml:body')
- .append('tr-ui-b-chart-legend-key')
- .property('color', function(series) {
- if (this.currentHighlightedLegendKey === series.key)
- return series.highlightedColor;
- return series.color;
- }.bind(this))
- .property('width', width)
- .property('target', function(series) { return series.target; })
- .property('optional', function(series) { return series.optional; })
- .property('enabled', function(series) { return series.enabled; })
- .text(function(series) { return series.key; });
- legendEntriesSel.exit().remove();
- },
-
- get highlightedLegendKey() {
- return this.highlightedLegendKey_;
- },
-
- set highlightedLegendKey(highlightedLegendKey) {
- this.highlightedLegendKey_ = highlightedLegendKey;
- this.updateHighlight_();
- },
-
- get currentHighlightedLegendKey() {
- if (this.tempHighlightedLegendKey_)
- return this.tempHighlightedLegendKey_;
- return this.highlightedLegendKey_;
- },
-
- pushTempHighlightedLegendKey: function(key) {
- if (this.tempHighlightedLegendKey_)
- throw new Error('push cannot nest');
- this.tempHighlightedLegendKey_ = key;
- this.updateHighlight_();
- },
-
- popTempHighlightedLegendKey: function(key) {
- if (this.tempHighlightedLegendKey_ !== key)
- throw new Error('pop cannot happen');
- this.tempHighlightedLegendKey_ = undefined;
- this.updateHighlight_();
- },
-
- updateHighlight_: function() {
- // Update label colors.
- var chartAreaSel = d3.select(this.chartAreaElement);
- var legendEntriesSel = chartAreaSel.selectAll('.legend');
-
- var that = this;
- legendEntriesSel.each(function(key) {
- var dataSeries = that.getDataSeries(key);
- if (key === that.currentHighlightedLegendKey) {
- this.style.fill = dataSeries.highlightedColor;
- this.style.fontWeight = 'bold';
- } else {
- this.style.fill = dataSeries.color;
- this.style.fontWeight = '';
- }
- });
- }
- };
-
- return {
- DataSeriesEnableChangeEventType: DataSeriesEnableChangeEventType,
- getColorOfKey: getColorOfKey,
- ChartBase: ChartBase
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d.html b/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d.html
deleted file mode 100644
index 566c4dcd26f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d.html
+++ /dev/null
@@ -1,464 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/ui/base/chart_base.html">
-<link rel="import" href="/tracing/ui/base/mouse_tracker.html">
-
-<style>
- * /deep/ .chart-base-2d.updating-brushing-state #brushes > * {
- fill: rgb(103, 199, 165)
- }
-
- * /deep/ .chart-base-2d #brushes {
- fill: rgb(213, 236, 229)
- }
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ChartBase = tr.ui.b.ChartBase;
- var ChartBase2D = tr.ui.b.define('chart-base-2d', ChartBase);
-
- ChartBase2D.prototype = {
- __proto__: ChartBase.prototype,
-
- decorate: function() {
- ChartBase.prototype.decorate.call(this);
- Polymer.dom(this).classList.add('chart-base-2d');
- this.xScale_ = d3.scale.linear();
- this.yScale_ = d3.scale.linear();
- this.isYLogScale_ = false;
- this.yLogScaleMin_ = undefined;
- this.dataRange_ = new tr.b.Range();
- this.hideXAxis_ = false;
- this.hideYAxis_ = false;
- this.data_ = [];
- this.xAxisLabel_ = '';
- this.yAxisLabel_ = '';
-
- d3.select(this.chartAreaElement)
- .append('g')
- .attr('id', 'brushes');
- d3.select(this.chartAreaElement)
- .append('g')
- .attr('id', 'series');
-
- this.addEventListener('mousedown', this.onMouseDown_.bind(this));
- },
-
- get xAxisLabel() {
- return this.xAxisLabel_;
- },
-
- set xAxisLabel(label) {
- this.xAxisLabel_ = label;
- },
-
- get yAxisLabel() {
- return this.yAxisLabel_;
- },
-
- set yAxisLabel(label) {
- this.yAxisLabel_ = label;
- },
-
- get hideXAxis() {
- return this.hideXAxis_;
- },
-
- set hideXAxis(h) {
- this.hideXAxis_ = h;
- this.updateContents_();
- },
-
- get hideYAxis() {
- return this.hideYAxis_;
- },
-
- set hideYAxis(h) {
- this.hideYAxis_ = h;
- this.updateContents_();
- },
-
- get data() {
- return this.data_;
- },
-
- /**
- * Sets the data array for the object
- *
- * @param {Array} data The data. Each element must be an object, with at
- * least an x property. All other properties become series names in the
- * chart. The data can be sparse (i.e. every x value does not have to
- * contain data for every series).
- */
- set data(data) {
- if (data === undefined)
- throw new Error('data must be an Array');
-
- this.data_ = data;
- this.updateSeriesKeys_();
- this.updateDataRange_();
- this.updateContents_();
- },
-
- set isYLogScale(logScale) {
- if (logScale)
- this.yScale_ = d3.scale.log(10);
- else
- this.yScale_ = d3.scale.linear();
- this.isYLogScale_ = logScale;
- },
-
- getYScaleMin_: function() {
- return this.isYLogScale_ ? this.yLogScaleMin_ : 0;
- },
-
- getYScaleDomain_: function(minValue, maxValue) {
- if (this.isYLogScale_)
- return [this.getYScaleMin_(), maxValue];
- return [Math.min(minValue, this.getYScaleMin_()), maxValue];
- },
-
- getSampleWidth_: function(data, index, leftSide) {
- var leftIndex, rightIndex;
- if (leftSide) {
- leftIndex = Math.max(index - 1, 0);
- rightIndex = index;
- } else {
- leftIndex = index;
- rightIndex = Math.min(index + 1, data.length - 1);
- }
- var leftWidth = this.getXForDatum_(data[index], index) -
- this.getXForDatum_(data[leftIndex], leftIndex);
- var rightWidth = this.getXForDatum_(data[rightIndex], rightIndex) -
- this.getXForDatum_(data[index], index);
- return leftWidth * 0.5 + rightWidth * 0.5;
- },
-
- updateSeriesKeys_: function() {
- // Don't clear seriesByKey_; the caller might have put state in it using
- // getDataSeries() before setting data.
- this.data_.forEach(function(datum) {
- Object.keys(datum).forEach(function(key) {
- if (this.isDatumFieldSeries_(key))
- this.getDataSeries(key);
- }, this);
- }, this);
- },
-
- isDatumFieldSeries_: function(fieldName) {
- throw new Error('Not implemented');
- },
-
- getXForDatum_: function(datum, index) {
- throw new Error('Not implemented');
- },
-
- updateScales_: function() {
- if (this.data_.length === 0)
- return;
-
- var width = this.chartAreaSize.width;
- var height = this.chartAreaSize.height;
-
- // X.
- this.xScale_.range([0, width]);
- this.xScale_.domain(d3.extent(this.data_, this.getXForDatum_.bind(this)));
-
- // Y.
- var yRange = new tr.b.Range();
- for (var i = 0; i < this.data_.length; i++) {
- for (var key in this.data_[i]) {
- if (!isNaN(Math.max(this.data_[i][key])))
- yRange.addValue(this.data_[i][key]);
- }
- }
-
- this.yScale_.range([height, 0]);
- this.yScale_.domain([yRange.min, yRange.max]);
- },
-
- updateBrushContents_: function(brushSel) {
- brushSel.selectAll('*').remove();
- },
-
- updateXAxis_: function(xAxis) {
- xAxis.selectAll('*').remove();
- xAxis[0][0].style.opacity = 0;
- if (this.hideXAxis)
- return;
-
- this.drawXAxis_(xAxis);
-
- var label = xAxis.append('text').attr('class', 'label');
-
- tr.b.requestAnimationFrame(() => {
- this.drawXAxisTicks_(xAxis);
- this.drawXAxisLabel_(label);
- });
- },
-
- drawXAxis_: function(xAxis) {
- xAxis.attr('transform', 'translate(0,' + this.chartAreaSize.height + ')')
- .call(d3.svg.axis()
- .scale(this.xScale_)
- .orient('bottom'));
- },
-
- drawXAxisLabel_: function(label) {
- label
- .attr('x', this.chartAreaSize.width + 16)
- .attr('y', 8)
- .text(this.xAxisLabel);
- },
-
- drawXAxisTicks_: function(xAxis) {
- var previousRight = undefined;
- xAxis.selectAll('.tick')[0].forEach(function(tick) {
- var currentLeft = tick.transform.baseVal[0].matrix.e;
- if ((previousRight === undefined) ||
- (currentLeft > (previousRight + 3))) {
- var currentWidth = tick.getBBox().width;
- previousRight = currentLeft + currentWidth;
- } else {
- tick.style.opacity = 0;
- }
- });
- xAxis[0][0].style.opacity = 1;
- },
-
- updateDataRange_: function() {
- var dataBySeriesKey = this.getDataBySeriesKey_();
- this.dataRange_.reset();
- tr.b.iterItems(dataBySeriesKey, function(series, values) {
- for (var i = 0; i < values.length; i++) {
- this.dataRange_.addValue(values[i][series]);
- }
- }, this);
-
- // Choose the closest power of 10, rounded down, as the smallest tick
- // to display.
- this.yLogScaleMin_ = undefined;
- if (this.dataRange_.min !== undefined) {
- var minValue = this.dataRange_.min;
- if (minValue === 0)
- minValue = 1;
-
- var onePowerLess = Math.floor(
- Math.log(minValue) / Math.log(10)) - 1;
- this.yLogScaleMin_ = Math.pow(10, onePowerLess);
- }
- },
-
- updateYAxis_: function(yAxis) {
- yAxis.selectAll('*').remove();
- yAxis[0][0].style.opacity = 0;
- if (this.hideYAxis)
- return;
-
- this.drawYAxis_(yAxis);
-
- var label = yAxis.append('text').attr('class', 'label');
-
- tr.b.requestAnimationFrame(() => {
- this.drawYAxisTicks_(yAxis);
- this.drawYAxisLabel_(label);
- });
- },
-
- drawYAxis_: function(yAxis) {
- var axisModifier = d3.svg.axis()
- .scale(this.yScale_)
- .orient('left');
-
- if (this.isYLogScale_) {
- if (this.yLogScaleMin_ === undefined)
- return;
- var minValue = this.dataRange_.min;
- if (minValue === 0)
- minValue = 1;
-
- var largestPower = Math.ceil(
- Math.log(this.dataRange_.max) / Math.log(10)) + 1;
- var smallestPower = Math.floor(
- Math.log(minValue) / Math.log(10));
- var tickValues = [];
- for (var i = smallestPower; i < largestPower; i++) {
- tickValues.push(Math.pow(10, i));
- }
-
- axisModifier = axisModifier
- .tickValues(tickValues)
- .tickFormat(function(d) {
- return d;
- });
- }
-
- yAxis.call(axisModifier);
- },
-
- drawYAxisLabel_: function(label) {
- var labelWidthPx = Math.ceil(tr.ui.b.getSVGTextWidth(
- this.chartAreaElement, this.yAxisLabel));
- label
- .attr('x', -labelWidthPx)
- .attr('y', -8)
- .text(this.yAxisLabel);
- },
-
- drawYAxisTicks_: function(yAxis) {
- var previousTop = undefined;
- var leftMargin = 0;
- yAxis.selectAll('.tick')[0].forEach(function(tick) {
- var bbox = tick.getBBox();
- leftMargin = Math.max(leftMargin, bbox.width);
- var currentTop = tick.transform.baseVal[0].matrix.f;
- var currentBottom = currentTop + bbox.height;
- if ((previousTop === undefined) ||
- (previousTop > (currentBottom + 3))) {
- previousTop = currentTop;
- } else {
- tick.style.opacity = 0;
- }
- });
-
- leftMargin = parseInt(Math.ceil(leftMargin));
- if (leftMargin > this.margin.left) {
- this.margin.left = leftMargin;
- this.updateContents_();
- } else {
- yAxis[0][0].style.opacity = 1;
- }
- },
-
- updateContents_: function() {
- ChartBase.prototype.updateContents_.call(this);
- var chartAreaSel = d3.select(this.chartAreaElement);
- this.updateXAxis_(chartAreaSel.select('.x.axis'));
- this.updateYAxis_(chartAreaSel.select('.y.axis'));
- this.updateBrushContents_(chartAreaSel.select('#brushes'));
- this.updateDataContents_(chartAreaSel.select('#series'));
- },
-
- updateDataContents_: function(seriesSel) {
- throw new Error('Not implemented');
- },
-
- /**
- * Returns a map of series key to the data for that series.
- *
- * Example:
- * // returns {y: [{x: 1, y: 1}, {x: 3, y: 3}], z: [{x: 2, z: 2}]}
- * this.data_ = [{x: 1, y: 1}, {x: 2, z: 2}, {x: 3, y: 3}];
- * this.getDataBySeriesKey_();
- * @return {Object} A map of series data by series key.
- */
- getDataBySeriesKey_: function() {
- var dataBySeriesKey = {};
- for (var [key, series] of this.seriesByKey_) {
- dataBySeriesKey[key] = [];
- }
-
- this.data_.forEach(function(multiSeriesDatum, index) {
- var x = this.getXForDatum_(multiSeriesDatum, index);
-
- d3.keys(multiSeriesDatum).forEach(function(seriesKey) {
- // Skip 'x' - it's not a series
- if (seriesKey === 'x')
- return;
-
- if (multiSeriesDatum[seriesKey] === undefined)
- return;
-
- if (!this.isDatumFieldSeries_(seriesKey))
- return;
-
- var singleSeriesDatum = {x: x};
- singleSeriesDatum[seriesKey] = multiSeriesDatum[seriesKey];
- dataBySeriesKey[seriesKey].push(singleSeriesDatum);
- }, this);
- }, this);
-
- return dataBySeriesKey;
- },
-
- getChartPointAtClientPoint_: function(clientPoint) {
- var rect = this.getBoundingClientRect();
- return {
- x: clientPoint.x - rect.left - this.margin.left,
- y: clientPoint.y - rect.top - this.margin.top
- };
- },
-
- getDataPointAtChartPoint_: function(chartPoint) {
- return {
- x: tr.b.clamp(this.xScale_.invert(chartPoint.x),
- this.xScale_.domain()[0], this.xScale_.domain()[1]),
- y: tr.b.clamp(this.yScale_.invert(chartPoint.y),
- this.yScale_.domain()[0], this.yScale_.domain()[1])
- };
- },
-
- getDataPointAtClientPoint_: function(clientX, clientY) {
- var chartPoint = this.getChartPointAtClientPoint_(
- {x: clientX, y: clientY});
- return this.getDataPointAtChartPoint_(chartPoint);
- },
-
- prepareDataEvent_: function(mouseEvent, dataEvent) {
- var dataPoint = this.getDataPointAtClientPoint_(
- mouseEvent.clientX, mouseEvent.clientY);
- dataEvent.x = dataPoint.x;
- dataEvent.y = dataPoint.y;
- },
-
- onMouseDown_: function(mouseEvent) {
- tr.ui.b.trackMouseMovesUntilMouseUp(
- this.onMouseMove_.bind(this, mouseEvent.button),
- this.onMouseUp_.bind(this, mouseEvent.button));
- mouseEvent.preventDefault();
- mouseEvent.stopPropagation();
- var dataEvent = new tr.b.Event('item-mousedown');
- dataEvent.button = mouseEvent.button;
- Polymer.dom(this).classList.add('updating-brushing-state');
- this.prepareDataEvent_(mouseEvent, dataEvent);
- this.dispatchEvent(dataEvent);
- },
-
- onMouseMove_: function(button, mouseEvent) {
- if (mouseEvent.buttons !== undefined) {
- mouseEvent.preventDefault();
- mouseEvent.stopPropagation();
- }
- var dataEvent = new tr.b.Event('item-mousemove');
- dataEvent.button = button;
- this.prepareDataEvent_(mouseEvent, dataEvent);
- this.dispatchEvent(dataEvent);
- },
-
- onMouseUp_: function(button, mouseEvent) {
- mouseEvent.preventDefault();
- mouseEvent.stopPropagation();
- var dataEvent = new tr.b.Event('item-mouseup');
- dataEvent.button = button;
- this.prepareDataEvent_(mouseEvent, dataEvent);
- this.dispatchEvent(dataEvent);
- Polymer.dom(this).classList.remove('updating-brushing-state');
- }
- };
-
- return {
- ChartBase2D: ChartBase2D
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d_brushable_x.html b/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d_brushable_x.html
deleted file mode 100644
index 5d2f799945e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/chart_base_2d_brushable_x.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/chart_base_2d.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ChartBase2D = tr.ui.b.ChartBase2D;
- var ChartBase2DBrushX = tr.ui.b.define('chart-base-2d-brush-1d', ChartBase2D);
-
- ChartBase2DBrushX.prototype = {
- __proto__: ChartBase2D.prototype,
-
- decorate: function() {
- ChartBase2D.prototype.decorate.call(this);
- this.brushedRange_ = new tr.b.Range();
- },
-
- // Note: range can only be set, not retrieved. It needs to be immutable
- // or else odd data binding effects will result.
- set brushedRange(range) {
- this.brushedRange_.reset();
- this.brushedRange_.addRange(range);
- this.updateContents_();
- },
-
- computeBrushRangeFromIndices: function(indexA, indexB) {
- indexA = tr.b.clamp(indexA, 0, this.data_.length - 1);
- indexB = tr.b.clamp(indexB, 0, this.data_.length - 1);
- var leftIndex = Math.min(indexA, indexB);
- var rightIndex = Math.max(indexA, indexB);
-
- var r = new tr.b.Range();
- r.addValue(this.getXForDatum_(this.data_[leftIndex], leftIndex) -
- this.getSampleWidth_(this.data_, leftIndex, true));
- r.addValue(this.getXForDatum_(this.data_[rightIndex], rightIndex) +
- this.getSampleWidth_(this.data_, rightIndex, false));
- return r;
- },
-
- getDataIndex_: function(dataX) {
- if (!this.data_)
- return undefined;
- var bisect = d3.bisector(this.getXForDatum_.bind(this)).right;
- return bisect(this.data_, dataX) - 1;
- },
-
- prepareDataEvent_: function(mouseEvent, dataEvent) {
- ChartBase2D.prototype.prepareDataEvent_.call(
- this, mouseEvent, dataEvent);
- dataEvent.index = this.getDataIndex_(dataEvent.x);
- if (dataEvent.index !== undefined)
- dataEvent.data = this.data_[dataEvent.index];
- },
-
- updateBrushContents_: function(brushSel) {
- brushSel.selectAll('*').remove();
- var brushes = this.brushedRange_.isEmpty ? [] : [this.brushedRange_];
- var brushRectsSel = brushSel.selectAll('rect').data(brushes);
- brushRectsSel.enter().append('rect');
- brushRectsSel.exit().remove();
- this.drawBrush_(brushRectsSel);
- },
-
- drawBrush_: function(brushRectsSel) {
- brushRectsSel
- .attr('x', function(d) {
- return this.xScale_(d.min);
- }.bind(this))
- .attr('y', 0)
- .attr('width', function(d) {
- return this.xScale_(d.max) - this.xScale_(d.min);
- }.bind(this))
- .attr('height', this.chartAreaSize.height);
- }
- };
-
- return {
- ChartBase2DBrushX: ChartBase2DBrushX
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox.html b/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox.html
deleted file mode 100644
index 06469f68170..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id='tr-ui-b-checkbox'>
- <template>
- <style>
- .inline {
- display: inline-block;
- }
- </style>
-
- <input type="checkbox" id="checkbox" class="inline"/>
- <div id="label" class="inline"></div>
- </template>
- <script>
- 'use strict';
-
- Polymer({
- is: 'tr-ui-b-checkbox',
-
- created: function() {
- this.needsInit_ = true;
- this.defaultCheckedValue_ = undefined;
- this.settingsKey_ = undefined;
- this.label_ = undefined;
- this.checked_ = false;
- this.is_ready_ = false;
- },
-
- ready: function() {
- this.is_ready_ = true;
- this.$.checkbox.addEventListener('click', function() {
- this.checked = this.$.checkbox.checked;
- }.bind(this));
- this.maybeUpdateElements_();
- },
-
- maybeUpdateElements_: function() {
- if (!this.is_ready_)
- return;
- this.$.label.innerText = this.label_;
- this.$.checkbox.checked = this.checked_;
- },
-
- get defaultCheckedValue() {
- return this.defaultCheckedValue_;
- },
-
- set defaultCheckedValue(defaultCheckedValue) {
- if (!this.needsInit_)
- throw new Error('Already initialized.');
- this.defaultCheckedValue_ = defaultCheckedValue;
- this.maybeInit_();
- },
-
- get settingsKey() {
- return this.settingsKey_;
- },
-
- set settingsKey(settingsKey) {
- if (!this.needsInit_)
- throw new Error('Already initialized.');
- this.settingsKey_ = settingsKey;
- this.maybeInit_();
- },
-
- maybeInit_: function() {
- if (!this.needsInit_)
- return;
- if (this.settingsKey_ === undefined)
- return;
- if (this.defaultCheckedValue_ === undefined)
- return;
- this.needsInit_ = false;
- this.checked = tr.b.Settings.get(
- this.settingsKey_, this.defaultCheckedValue_);
- },
-
- get label() {
- return this.label_;
- },
-
- set label(label) {
- this.label_ = label;
- this.maybeUpdateElements_();
- },
-
- get checked() {
- return this.checked_;
- },
-
- set checked(checked) {
- this.checked_ = checked;
- this.maybeUpdateElements_();
- tr.b.Settings.set(this.settingsKey_, this.checked_);
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker.html b/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker.html
deleted file mode 100644
index 5b5d242b96b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/checkbox.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id='tr-ui-b-checkbox-picker'>
- <template>
- <style>
- #container {
- display: flex;
- flex-direction: column;
- }
- </style>
-
- <div id="container">
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-checkbox-picker',
- created: function() {
- this.needsInit_ = true;
- this.settingsKey_ = undefined;
- this.is_ready_ = false;
- this.checkboxes_ = undefined;
- },
-
- ready: function() {
- this.is_ready_ = true;
- this.maybeInit_();
- this.maybeRenderCheckboxes_();
- },
-
- get settingsKey() {
- return this.settingsKey_;
- },
-
- set settingsKey(settingsKey) {
- if (!this.needsInit_)
- throw new Error('Already initialized.');
- this.settingsKey_ = settingsKey;
- this.maybeInit_();
- },
-
- maybeInit_: function() {
- if (!this.needsInit_)
- return;
- if (this.settingsKey_ === undefined)
- return;
- if (this.checkboxes_ === undefined)
- return;
-
- this.needsInit_ = false;
-
- for (var key in this.checkboxes_) {
- this.checkboxes_[key].defaultCheckedValue = false;
- this.checkboxes_[key].settingsKey = this.settingsKey_ + key;
- }
- },
-
- set items(items) {
- this.checkboxes_ = {};
- items.forEach(function(e) {
- if (e.key in this.checkboxes_)
- throw new Error(e.key + ' already exists');
- var checkboxEl = document.createElement('tr-ui-b-checkbox');
- checkboxEl.label = e.label;
- this.checkboxes_[e.key] = checkboxEl;
- }.bind(this));
- this.maybeInit_();
- this.maybeRenderCheckboxes_();
- },
-
- maybeRenderCheckboxes_: function() {
- if (!this.is_ready_)
- return;
- if (this.checkboxes_ === undefined)
- return;
- for (var key in this.checkboxes_)
- Polymer.dom(this.$.container).appendChild(this.checkboxes_[key]);
- },
-
- selectCheckbox: function(key) {
- if (!(key in this.checkboxes_))
- throw new Error(key + ' does not exists');
- this.checkboxes_[key].checked = true;
- },
-
- unselectCheckbox: function(key) {
- if (!(key in this.checkboxes_))
- throw new Error(key + ' does not exists');
- this.checkboxes_[key].checked = false;
- },
-
- get checkedKeys() {
- return Object.keys(this.checkboxes_).filter(function(k) {
- return this.checkboxes_[k].checked;
- }.bind(this));
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker_test.html
deleted file mode 100644
index 674696d898b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_picker_test.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/checkbox_picker.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basicAllCheckboxUnchecked', function() {
- var cp = document.createElement('tr-ui-b-checkbox-picker');
- cp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Boeing', label: 'I want to fly'}
- ];
- this.addHTMLOutput(cp);
- assert.deepEqual(cp.checkedKeys, []);
- });
-
- test('basicSomeCheckboxChecked', function() {
- var cp = document.createElement('tr-ui-b-checkbox-picker');
- cp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- {key: 'Tesla', label: 'I want to drive electric car'},
- ];
-
- cp.selectCheckbox('Toyota');
- cp.selectCheckbox('Tesla');
- this.addHTMLOutput(cp);
- assert.deepEqual(cp.checkedKeys.sort(), ['Tesla', 'Toyota']);
- cp.unselectCheckbox('Toyota');
- assert.deepEqual(cp.checkedKeys, ['Tesla']);
- });
-
- test('duplicateKeys', function() {
- var cp = document.createElement('tr-ui-b-checkbox-picker');
- assert.throws(function() {
- cp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- {key: 'Toyota', label: 'I want to drive electric car'},
- ];
- });
- });
-
- test('selectAndUnselectNonExistingKey', function() {
- var cp = document.createElement('tr-ui-b-checkbox-picker');
- cp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- ];
- assert.throws(function() {
- cp.selectCheckbox('Lamborghini');
- });
- assert.throws(function() {
- cp.unselectCheckbox('Roll Royce');
- });
- });
-
- test('testPersistentStateOneSetSettingsKeyBeforeSettingItems', function() {
- var container1 = tr.ui.b.createDiv({textContent: 'Checkbox Picker One'});
- container1.style.border = 'solid';
- var cp = document.createElement('tr-ui-b-checkbox-picker');
- cp.settingsKey = 'checkbox-picker-test-one';
- cp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- {key: 'Tesla', label: 'I want to drive electric car'},
- ];
- cp.selectCheckbox('Toyota');
- cp.selectCheckbox('Tesla');
- Polymer.dom(container1).appendChild(cp);
- this.addHTMLOutput(container1);
- cp.unselectCheckbox('Tesla');
- assert.deepEqual(cp.checkedKeys, ['Toyota']);
-
- this.addHTMLOutput(document.createElement('br'));
-
- var container2 = tr.ui.b.createDiv(
- {textContent:
- 'Checkbox Picker Two (Same settingsKey as Checkbox Picker One)'});
- container2.style.border = 'solid #0000FF';
- var cp2 = document.createElement('tr-ui-b-checkbox-picker');
- cp2.settingsKey = 'checkbox-picker-test-one';
- cp2.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- {key: 'Tesla', label: 'I want to drive electric car'},
- ];
- Polymer.dom(container2).appendChild(cp2);
- this.addHTMLOutput(container2);
- assert.deepEqual(cp2.checkedKeys, ['Toyota']);
- });
-
- test('testPersistentStateTwoSetSettingsKeyAfterSettingItems', function() {
- var container1 = tr.ui.b.createDiv({textContent: 'Checkbox Picker One'});
- container1.style.border = 'solid';
- var cp = document.createElement('tr-ui-b-checkbox-picker');
- cp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- {key: 'Tesla', label: 'I want to drive electric car'},
- ];
- cp.settingsKey = 'checkbox-picker-test-one';
- cp.selectCheckbox('Toyota');
- cp.selectCheckbox('Tesla');
- Polymer.dom(container1).appendChild(cp);
- this.addHTMLOutput(container1);
- assert.deepEqual(cp.checkedKeys.sort(), ['Tesla', 'Toyota']);
-
- this.addHTMLOutput(document.createElement('br'));
-
- var container2 = tr.ui.b.createDiv(
- {textContent:
- 'Checkbox Picker Two (Same settingsKey as Checkbox Picker One)'});
- container2.style.border = 'solid #0000FF';
- var cp2 = document.createElement('tr-ui-b-checkbox-picker');
- cp2.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Honda', label: 'I want to drive Honda'},
- {key: 'Tesla', label: 'I want to drive electric car'},
- ];
- Polymer.dom(container2).appendChild(cp2);
- this.addHTMLOutput(container2);
- cp2.settingsKey = 'checkbox-picker-test-one';
- assert.deepEqual(cp2.checkedKeys.sort(), ['Tesla', 'Toyota']);
-
- });
-
-
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_test.html
deleted file mode 100644
index 16f0223110a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/checkbox_test.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/checkbox.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basicUnchecked', function() {
- var checkbox = document.createElement('tr-ui-b-checkbox');
- checkbox.label = 'Yo like pizza?';
- this.addHTMLOutput(checkbox);
- assert.equal(checkbox.label, 'Yo like pizza?');
- assert.isFalse(checkbox.checked);
- });
-
- test('basicChecked', function() {
- var checkbox = document.createElement('tr-ui-b-checkbox');
- checkbox.label = 'Yo like cookie?';
- checkbox.checked = true;
- this.addHTMLOutput(checkbox);
- assert.equal(checkbox.label, 'Yo like cookie?');
- assert.isTrue(checkbox.checked);
- });
-
- test('testPersistentStateOneSetSettingsKeyBeforeAddToDom', function() {
- var checkbox = document.createElement('tr-ui-b-checkbox');
- checkbox.settingsKey = 'checkbox-basic-test-one';
- checkbox.label = 'I like sushi';
- checkbox.defaultCheckedValue = false;
- this.addHTMLOutput(checkbox);
- assert.isFalse(checkbox.checked);
- checkbox.checked = true;
-
- var checkbox2 = document.createElement('tr-ui-b-checkbox');
- checkbox2.label = 'I like sushi';
- checkbox2.defaultCheckedValue = false;
- checkbox2.settingsKey = 'checkbox-basic-test-one';
- this.addHTMLOutput(checkbox2);
- assert.isTrue(checkbox2.checked);
- });
-
- test('testPersistentStateTwoSetSettingsKeyAfterAddToDom', function() {
- var checkbox = document.createElement('tr-ui-b-checkbox');
- this.addHTMLOutput(checkbox);
- checkbox.label = 'I like Ramen';
- checkbox.settingsKey = 'checkbox-basic-test-two';
- checkbox.defaultCheckedValue = false;
- assert.isFalse(checkbox.checked);
- checkbox.checked = true;
-
- var checkbox2 = document.createElement('tr-ui-b-checkbox');
- this.addHTMLOutput(checkbox2);
- checkbox2.label = 'I like Ramen';
- checkbox2.defaultCheckedValue = false;
- checkbox2.settingsKey = 'checkbox-basic-test-two';
- assert.isTrue(checkbox2.checked);
- });
-
-
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/color_legend.html b/chromium/third_party/catapult/tracing/tracing/ui/base/color_legend.html
deleted file mode 100644
index 791440def9e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/color_legend.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/model/compound_event_selection_state.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<!--
-@fileoverview A component used to display a label and a color square.
-
-The colored square is typically filled with the color associated with
-that label, using the getColorId* methods from base/color_scheme.
--->
-<dom-module id='tr-ui-b-color-legend'>
- <template>
- <style>
- :host {
- display: inline-block;
- }
-
- #square {
- font-size: 150%; /* Make the square bigger. */
- line-height: 0%; /* Prevent the square from increasing legend height. */
- }
- </style>
- <span id="square"></span>
- <span id="label"></span>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-color-legend',
-
- ready: function() {
- var blackSquareCharCode = 9632;
- this.$.square.innerText = String.fromCharCode(blackSquareCharCode);
- this.label_ = undefined;
-
- this.compoundEventSelectionState_ =
- tr.model.CompoundEventSelectionState.NOT_SELECTED;
- },
-
- set compoundEventSelectionState(compoundEventSelectionState) {
- this.compoundEventSelectionState_ = compoundEventSelectionState;
- // TODO(nduca): Adjust appearance based on associated state.
- },
-
- get label() {
- return this.label_;
- },
-
- set label(label) {
- if (label === undefined) {
- this.setLabelAndColorId(undefined, undefined);
- return;
- }
-
- var colorId = tr.b.ColorScheme.getColorIdForGeneralPurposeString(
- label);
- this.setLabelAndColorId(label, colorId);
- },
-
- setLabelAndColorId: function(label, colorId) {
- this.label_ = label;
-
- Polymer.dom(this.$.label).textContent = '';
- Polymer.dom(this.$.label).appendChild(tr.ui.b.asHTMLOrTextNode(label));
-
- if (colorId === undefined)
- this.$.square.style.color = 'initial';
- else
- this.$.square.style.color = tr.b.ColorScheme.colorsAsStrings[colorId];
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/color_legend_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/color_legend_test.html
deleted file mode 100644
index fbe802d6a8f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/color_legend_test.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/color_legend.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var CompoundEventSelectionState = tr.model.CompoundEventSelectionState;
-
- function checkSquareColor(colorLegend, expectedColor) {
- assert.equal(getComputedStyle(colorLegend.$.square).color, expectedColor);
- }
-
- test('noLabelSet', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(0, 0, 0)');
- });
-
- test('undefinedLabel', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = undefined;
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(0, 0, 0)');
- });
-
- test('emptyLabel', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = '';
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(122, 98, 135)');
- });
-
- test('nonEmptyLabel', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'Frequency';
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(83, 150, 97)');
- });
-
- test('longLabel', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'Total memory usage';
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(96, 128, 137)');
- });
-
- test('directlySetColorId', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.setLabelAndColorId('hello_world', 7 /* colorId */);
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(111, 145, 88)');
- });
-
- test('directlyProvidedLabelElement', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.setLabelAndColorId(
- tr.ui.b.createSpan({textContent: 'hello',
- className: 'hello-span'}),
- 7 /* colorId */);
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(111, 145, 88)');
- });
-
- test('cessObjectSelected', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'Object selected';
- colorLegend.compoundEventSelectionState =
- CompoundEventSelectionState.EVENT_SELECTED;
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(143, 72, 161)');
- });
-
- test('cessSomeAssociatedObjectsSelected', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'Some associated objects selected';
- colorLegend.compoundEventSelectionState =
- CompoundEventSelectionState.SOME_ASSOCIATED_EVENTS_SELECTED;
-
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(159, 74, 86)');
- });
-
- test('cessAllAssociatedObjectsSelected', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'All associated objects selected';
- colorLegend.compoundEventSelectionState =
- CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED;
-
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(112, 91, 142)');
- });
-
- test('cessObjectAndSomeAssociatedObjectsSelected', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'Object and some associated objects selected';
- colorLegend.compoundEventSelectionState =
- CompoundEventSelectionState.EVENT_AND_SOME_ASSOCIATED_SELECTED;
-
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(83, 150, 97)');
- });
-
- test('cessObjectAndAllAssociatedObjectsSelected', function() {
- var colorLegend = document.createElement('tr-ui-b-color-legend');
- colorLegend.label = 'Object and all associated objects selected';
- colorLegend.compoundEventSelectionState =
- CompoundEventSelectionState.EVENT_AND_ALL_ASSOCIATED_SELECTED;
-
- this.addHTMLOutput(colorLegend);
- checkSquareColor(colorLegend, 'rgb(87, 109, 147)');
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/column_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/base/column_chart.html
deleted file mode 100644
index 74141d47b08..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/column_chart.html
+++ /dev/null
@@ -1,248 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/chart_base_2d_brushable_x.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ColorScheme = tr.b.ColorScheme;
- var ChartBase2DBrushX = tr.ui.b.ChartBase2DBrushX;
-
- // @constructor
- var ColumnChart = tr.ui.b.define('column-chart', ChartBase2DBrushX);
-
- ColumnChart.prototype = {
- __proto__: ChartBase2DBrushX.prototype,
-
- decorate: function() {
- ChartBase2DBrushX.prototype.decorate.call(this);
- Polymer.dom(this).classList.add('column-chart');
-
- // ColumnChart allows bars to have arbitrary, non-uniform widths. Bars
- // need not all be the same width. The width of each bar is automatically
- // computed from the bar's x-coordinate and that of the next bar, which
- // can not define the width of the last bar. This is the width (in the
- // xScale's domain (as opposed to the xScale's range (which is measured in
- // pixels))) of the last bar. When there are at least 2 bars, this is
- // computed as the average width of the bars. When there is a single bar,
- // this must default to a non-zero number so that the width of the only
- // bar will not be zero.
- this.xCushion_ = 1;
-
- this.isStacked_ = false;
- },
-
- set isStacked(stacked) {
- this.isStacked_ = true;
- this.updateContents_();
- },
-
- get isStacked() {
- return this.isStacked_;
- },
-
- isDatumFieldSeries_: function(fieldName) {
- return fieldName !== 'x';
- },
-
- getXForDatum_: function(datum, index) {
- return datum.x;
- },
-
- updateScales_: function() {
- if (this.data_.length === 0)
- return;
-
- var xDifferences = 0;
- var currentX = undefined;
- var previousX = undefined;
- var yRange = new tr.b.Range();
- this.data_.forEach(function(datum, index) {
- previousX = currentX;
- currentX = this.getXForDatum_(datum, index);
- if (previousX !== undefined) {
- xDifferences += currentX - previousX;
- }
-
- for (var [key, series] of this.seriesByKey_) {
- // Allow for sparse data
- if (datum[key] !== undefined)
- yRange.addValue(datum[key]);
- }
- }, this);
-
- // X.
- // Leave a cushion on the right so that the last rect doesn't
- // exceed the chart boundaries. The last rect's width is set to the
- // average width of the rects, which is chart.width / data.length.
- var width = this.chartAreaSize.width;
- this.xScale_.range([0, width]);
- var domain = d3.extent(this.data_, this.getXForDatum_.bind(this));
- if (this.data_.length > 1)
- this.xCushion_ = xDifferences / (this.data_.length - 1);
- this.xScale_.domain([domain[0], domain[1] + this.xCushion_]);
-
- // Y.
- this.yScale_.range([this.chartAreaSize.height, 0]);
- this.yScale_.domain(this.getYScaleDomain_(yRange.min, yRange.max));
- },
-
- getYScaleDomain_: function(minValue, maxValue) {
- if (!this.isStacked) {
- return ChartBase2DBrushX.prototype.getYScaleDomain_.call(
- this, minValue, maxValue);
- }
-
- var range = new tr.b.Range();
- range.addValue(0);
- this.data_.forEach(function(datum, index) {
- var sum = 0;
- for (var [key, series] of this.seriesByKey_) {
- if (datum[key] === undefined)
- continue;
- sum += datum[key];
- }
- range.addValue(sum);
- }, this);
- return [range.min, range.max];
- },
-
- getStackedRectsForDatum_: function(datum, index) {
- var stacks = [];
- var bottom = this.yScale_.range()[0];
- var sum = 0;
- for (var [key, series] of this.seriesByKey_) {
- if (datum[key] === undefined || !this.isSeriesEnabled(key))
- continue;
- sum += datum[key];
- var heightPx = bottom - this.yScale_(sum);
- bottom -= heightPx;
- stacks.push({
- key: key,
- value: datum[key],
- color: this.getDataSeries(key).color,
- heightPx: heightPx,
- topPx: bottom
- });
- }
- return stacks;
- },
-
- getRectsForDatum_: function(datum, index) {
- if (this.isStacked)
- return this.getStackedRectsForDatum_(datum, index);
-
- var stacks = [];
- for (var [key, series] of this.seriesByKey_) {
- if (datum[key] === undefined || !this.isSeriesEnabled(key))
- continue;
- var topPx = this.yScale_(Math.max(datum[key], this.getYScaleMin_()));
- stacks.push({
- key: key,
- value: datum[key],
- topPx: topPx,
- heightPx: this.yScale_.range()[0] - topPx,
- color: this.getDataSeries(key).color
- });
- }
- stacks.sort(function(a, b) {
- return b.topPx - a.topPx;
- });
- return stacks;
- },
-
- drawHoverValueBox_: function(rect) {
- var seriesKeys = [...this.seriesByKey_.keys()];
- var chartAreaSel = d3.select(this.chartAreaElement);
- chartAreaSel.selectAll('.hover').remove();
- var keyWidthPx = 0;
- var keyHeightPx = 0;
- if (seriesKeys.length > 1) {
- keyWidthPx = tr.ui.b.getSVGTextWidth(
- this.chartAreaElement, rect.key) + 5;
- keyHeightPx = 16;
- }
- var valueWidthPx = tr.ui.b.getSVGTextWidth(
- this.chartAreaElement, rect.value) + 5;
- var valueHeightPx = 16;
- var hoverLeftPx = rect.leftPx + (rect.widthPx / 2);
-
- chartAreaSel
- .append('rect')
- .attr('class', 'hover')
- .attr('fill', 'white')
- .attr('x', hoverLeftPx)
- .attr('y', rect.topPx)
- .attr('width', Math.max(keyWidthPx, valueWidthPx))
- .attr('height', keyHeightPx + valueHeightPx);
-
- if (seriesKeys.length > 1) {
- chartAreaSel
- .append('text')
- .attr('class', 'hover')
- .attr('fill', rect.color)
- .attr('x', hoverLeftPx + 2)
- .attr('y', rect.topPx + keyHeightPx - 3)
- .text(rect.key);
- }
-
- chartAreaSel
- .append('text')
- .attr('class', 'hover')
- .attr('fill', rect.color)
- .attr('x', hoverLeftPx + 2)
- .attr('y', rect.topPx + keyHeightPx + valueHeightPx - 3)
- .text(rect.value);
- },
-
- clearHoverValueBox_: function() {
- d3.select(this.chartAreaElement).selectAll('.hover').remove();
- },
-
- drawRect_: function(rect, sel) {
- sel.append('rect')
- .attr('fill', rect.color)
- .attr('x', rect.leftPx)
- .attr('y', rect.topPx)
- .attr('width', rect.widthPx)
- .attr('height', rect.heightPx)
- .on('mouseenter', this.drawHoverValueBox_.bind(this, rect))
- .on('mouseleave', this.clearHoverValueBox_.bind(this));
- },
-
- updateDataContents_: function(dataSel) {
- dataSel.selectAll('*').remove();
- var chartAreaSel = d3.select(this.chartAreaElement);
- var seriesKeys = [...this.seriesByKey_.keys()];
- var rectsSel = dataSel.selectAll('path').data(seriesKeys);
- this.data_.forEach(function(datum, index) {
- var currentX = this.getXForDatum_(datum, index);
- var width = undefined;
- if (index < (this.data_.length - 1)) {
- var nextX = this.getXForDatum_(this.data_[index + 1], index + 1);
- width = nextX - currentX;
- } else {
- width = this.xCushion_;
- }
- for (var rect of this.getRectsForDatum_(datum, index)) {
- rect.leftPx = this.xScale_(currentX);
- rect.rightPx = this.xScale_(currentX + width);
- rect.widthPx = rect.rightPx - rect.leftPx;
- this.drawRect_(rect, rectsSel.enter());
- }
- }, this);
- rectsSel.exit().remove();
- }
- };
-
- return {
- ColumnChart: ColumnChart,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/column_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/column_chart_test.html
deleted file mode 100644
index d8a961350a4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/column_chart_test.html
+++ /dev/null
@@ -1,295 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/column_chart.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('chartLegendKey', function() {
- var key = document.createElement('tr-ui-b-chart-legend-key');
- key.textContent = 'Lorem ipsum dolor sit amet';
- key.color = 'red';
- this.addHTMLOutput(key);
-
- key = document.createElement('tr-ui-b-chart-legend-key');
- key.textContent = 'ipsum dolor sit amet';
- key.target = 'orange ipsum';
- key.color = 'orange';
- this.addHTMLOutput(key);
- key.addEventListener('requestSelectionChange', function(e) {
- console.debug(e);
- });
-
- key = document.createElement('tr-ui-b-chart-legend-key');
- key.target = 'brown dolor';
- key.color = 'brown';
- key.textContent = 'dolor sit amet';
- this.addHTMLOutput(key);
- key.addEventListener('requestSelectionChange', function(e) {
- console.debug(e);
- });
- });
-
- test('instantiation_legendTargets', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.getDataSeries('lorem_ipsum').target = 'lorem_ipsumTarget';
- chart.getDataSeries('qux').target = 'quxTarget';
- chart.getDataSeries('lorem_ipsum').optional = true;
- chart.getDataSeries('bar').optional = true;
- chart.isStacked = true;
- chart.hideXAxis = true;
- chart.width = 140;
- chart.height = 200;
- chart.chartTitle = 'title';
- chart.data = [{x: 0, foo: 3, lorem_ipsum: 5, bar: 1, qux: 2}];
- this.addHTMLOutput(chart);
- chart.addEventListener('requestSelectionChange', function(e) {
- console.debug(e);
- });
-
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(
- chart, function(element) {
- return element.tagName === 'TR-UI-B-CHART-LEGEND-KEY' &&
- element.textContent === 'lorem_ipsum' &&
- element.target === 'lorem_ipsumTarget';
- }));
- });
-
- test('instantiation_singleSeries', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.xAxisLabel = 'ms';
- chart.yAxisLabel = '#';
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 100},
- {x: 20, value: 110},
- {x: 30, value: 100},
- {x: 40, value: 50}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_singleDatum', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 0, value: 100},
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_stacked', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.isStacked = true;
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'title';
- var data = [
- {x: 10, foo: 10, bar: 5, qux: 7},
- {x: 20, foo: 11, bar: 6, qux: 3},
- {x: 30, foo: 10, bar: 4, qux: 8},
- {x: 40, foo: 5, bar: 1, qux: 2}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_singleSeries_yLogScale', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.isYLogScale = true;
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 100},
- {x: 20, value: 10},
- {x: 30, value: 1},
- {x: 40, value: 0.1},
- {x: 50, value: 0.01},
- {x: 60, value: 0.001}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('undefined', function() {
- var chart = new tr.ui.b.ColumnChart();
- assert.throws(function() {
- chart.data = undefined;
- });
- });
-
- test('instantiation_twoSeries', function() {
- var chart = new tr.ui.b.ColumnChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 100, beta: 50},
- {x: 20, alpha: 110, beta: 75},
- {x: 30, alpha: 100, beta: 125},
- {x: 40, alpha: 50, beta: 125}
- ];
- chart.data = data;
-
- var r = new tr.b.Range();
- r.addValue(20);
- r.addValue(40);
- chart.brushedRange = r;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSeries_yLogScale', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.isYLogScale = true;
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 100, beta: 50},
- {x: 20, alpha: 110, beta: 75},
- {x: 30, alpha: 100, beta: 125},
- {x: 40, alpha: 50, beta: 125}
- ];
- chart.data = data;
-
- var r = new tr.b.Range();
- r.addValue(20);
- r.addValue(40);
- chart.brushedRange = r;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueSparse', function() {
- var chart = new tr.ui.b.ColumnChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 20, beta: undefined},
- {x: 20, alpha: undefined, beta: 10},
- {x: 30, alpha: 10, beta: undefined},
- {x: 45, alpha: undefined, beta: 20},
- {x: 50, alpha: 25, beta: 30}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueNotSparse', function() {
- var chart = new tr.ui.b.ColumnChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 20, beta: 40},
- {x: 20, alpha: undefined, beta: 10},
- {x: 30, alpha: 10, beta: undefined},
- {x: 45, alpha: undefined, beta: 20},
- {x: 50, alpha: 30, beta: undefined}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('brushRangeFromIndices', function() {
- var chart = new tr.ui.b.ColumnChart();
- var data = [
- {x: 10, value: 50},
- {x: 30, value: 60},
- {x: 70, value: 70},
- {x: 80, value: 80},
- {x: 120, value: 90}
- ];
- chart.data = data;
- var r = new tr.b.Range();
-
- // Range min should be 10.
- r = chart.computeBrushRangeFromIndices(-2, 1);
- assert.equal(r.min, 10);
-
- // Range max should be 120.
- r = chart.computeBrushRangeFromIndices(3, 10);
- assert.equal(r.max, 120);
-
- // Range should be [10, 120]
- r = chart.computeBrushRangeFromIndices(-2, 10);
- assert.equal(r.min, 10);
- assert.equal(r.max, 120);
-
- // Range should be [20, 100]
- r = chart.computeBrushRangeFromIndices(1, 3);
- assert.equal(r.min, 20);
- assert.equal(r.max, 100);
- });
-
- test('instantiation_interactiveBrushing', function() {
- var chart = new tr.ui.b.ColumnChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 50},
- {x: 20, value: 60},
- {x: 30, value: 80},
- {x: 40, value: 20},
- {x: 50, value: 30},
- {x: 60, value: 20},
- {x: 70, value: 15},
- {x: 80, value: 20}
- ];
- chart.data = data;
-
- var mouseDownX = undefined;
- var curMouseX = undefined;
-
- function updateBrushedRange() {
- if (mouseDownX === undefined || (mouseDownX === curMouseX)) {
- chart.brushedRange = new tr.b.Range();
- return;
- }
- var r = new tr.b.Range();
- r.min = Math.min(mouseDownX, curMouseX);
- r.max = Math.max(mouseDownX, curMouseX);
- chart.brushedRange = r;
- }
-
- chart.addEventListener('item-mousedown', function(e) {
- mouseDownX = e.x;
- curMouseX = e.x;
- updateBrushedRange();
- });
- chart.addEventListener('item-mousemove', function(e) {
- if (e.button === undefined)
- return;
- curMouseX = e.x;
- updateBrushedRange();
- });
- chart.addEventListener('item-mouseup', function(e) {
- curMouseX = e.x;
- updateBrushedRange();
- });
- this.addHTMLOutput(chart);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/constants.html b/chromium/third_party/catapult/tracing/tracing/ui/base/constants.html
deleted file mode 100644
index 1a412656369..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/constants.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var constants = {
- HEADING_WIDTH: 250
- };
-
- return {
- constants: constants
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children.html b/chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children.html
deleted file mode 100644
index 870f266b9aa..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Container that decorates its children.
- */
-tr.exportTo('tr.ui.b', function() {
- /**
- * @constructor
- */
- var ContainerThatDecoratesItsChildren = tr.ui.b.define('div');
-
- ContainerThatDecoratesItsChildren.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.observer_ = new WebKitMutationObserver(this.didMutate_.bind(this));
- this.observer_.observe(this, { childList: true });
-
- // textContent is a variable on regular HTMLElements. However, we want to
- // hook and prevent writes to it.
- Object.defineProperty(
- this, 'textContent',
- { get: undefined, set: this.onSetTextContent_});
- },
-
- appendChild: function(x) {
- HTMLDivElement.prototype.appendChild.call(this, x);
- this.didMutate_(this.observer_.takeRecords());
- },
-
- insertBefore: function(x, y) {
- HTMLDivElement.prototype.insertBefore.call(this, x, y);
- this.didMutate_(this.observer_.takeRecords());
- },
-
- removeChild: function(x) {
- HTMLDivElement.prototype.removeChild.call(this, x);
- this.didMutate_(this.observer_.takeRecords());
- },
-
- replaceChild: function(x, y) {
- HTMLDivElement.prototype.replaceChild.call(this, x, y);
- this.didMutate_(this.observer_.takeRecords());
- },
-
- onSetTextContent_: function(textContent) {
- if (textContent !== '')
- throw new Error('textContent can only be set to \'\'.');
- this.clear();
- },
-
- clear: function() {
- while (Polymer.dom(this).lastChild)
- HTMLDivElement.prototype.removeChild.call(
- this, Polymer.dom(this).lastChild);
- this.didMutate_(this.observer_.takeRecords());
- },
-
- didMutate_: function(records) {
- this.beginDecorating_();
- for (var i = 0; i < records.length; i++) {
- var addedNodes = records[i].addedNodes;
- if (addedNodes) {
- for (var j = 0; j < addedNodes.length; j++)
- this.decorateChild_(addedNodes[j]);
- }
- var removedNodes = records[i].removedNodes;
- if (removedNodes) {
- for (var j = 0; j < removedNodes.length; j++) {
- this.undecorateChild_(removedNodes[j]);
- }
- }
- }
- this.doneDecoratingForNow_();
- },
-
- decorateChild_: function(child) {
- throw new Error('Not implemented');
- },
-
- undecorateChild_: function(child) {
- throw new Error('Not implemented');
- },
-
- beginDecorating_: function() {
- },
-
- doneDecoratingForNow_: function() {
- }
- };
-
- return {
- ContainerThatDecoratesItsChildren: ContainerThatDecoratesItsChildren
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children_test.html
deleted file mode 100644
index 23e53eab9d0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/container_that_decorates_its_children_test.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/container_that_decorates_its_children.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- function createChild() {
- var span = document.createElement('span');
- span.decorated = false;
- return span;
- }
-
- /**
- * @constructor
- */
- var SimpleContainer = tr.ui.b.define(
- 'simple-container', tr.ui.b.ContainerThatDecoratesItsChildren);
-
- SimpleContainer.prototype = {
- __proto__: tr.ui.b.ContainerThatDecoratesItsChildren.prototype,
-
- decorateChild_: function(child) {
- assert.isFalse(child.decorated);
- child.decorated = true;
- },
-
- undecorateChild_: function(child) {
- assert.isTrue(child.decorated);
- child.decorated = false;
- }
- };
-
- test('add', function() {
- var container = new SimpleContainer();
- Polymer.dom(container).appendChild(createChild());
- Polymer.dom(container).appendChild(createChild());
- Polymer.dom(container).appendChild(createChild());
- assert.isTrue(container.children[0].decorated);
- assert.isTrue(container.children[1].decorated);
- assert.isTrue(container.children[2].decorated);
- });
-
- test('clearUsingTextContent', function() {
- var c0 = createChild();
- var container = new SimpleContainer();
- Polymer.dom(container).appendChild(c0);
- Polymer.dom(container).textContent = '';
- assert.isFalse(c0.decorated);
- });
-
- test('clear', function() {
- var c0 = createChild();
- var container = new SimpleContainer();
- Polymer.dom(container).appendChild(c0);
- container.clear();
- assert.isFalse(c0.decorated);
- });
-
- test('insertNewBefore', function() {
- var c0 = createChild();
- var c1 = createChild();
- var container = new SimpleContainer();
- Polymer.dom(container).appendChild(c1);
- Polymer.dom(container).insertBefore(c0, c1);
- assert.isTrue(c0.decorated);
- assert.isTrue(c1.decorated);
- });
-
- test('insertExistingBefore', function() {
- var c0 = createChild();
- var c1 = createChild();
- var container = new SimpleContainer();
- Polymer.dom(container).appendChild(c1);
- Polymer.dom(container).appendChild(c0);
- Polymer.dom(container).insertBefore(c0, c1);
- assert.isTrue(c0.decorated);
- assert.isTrue(c1.decorated);
- });
-
- test('testReplace', function() {
- var c0 = createChild();
- var c1 = createChild();
- var container = new SimpleContainer();
- Polymer.dom(container).appendChild(c0);
- Polymer.dom(container).replaceChild(c1, c0);
- assert.isFalse(c0.decorated);
- assert.isTrue(c1.decorated);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/d3.html b/chromium/third_party/catapult/tracing/tracing/ui/base/d3.html
deleted file mode 100644
index bce0554c512..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/d3.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<script src="/tracing/ui/base/d3_preload.js"></script>
-<script src="/d3.min.js"></script>
-<script src="/tracing/ui/base/d3_postload.js"></script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/d3_postload.js b/chromium/third_party/catapult/tracing/tracing/ui/base/d3_postload.js
deleted file mode 100644
index 94cefdb15f9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/d3_postload.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Copyright (c) 2014 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-'use strict';
-
-(function(window) {
- window.define = undefined;
-}).call(this, this);
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/d3_preload.js b/chromium/third_party/catapult/tracing/tracing/ui/base/d3_preload.js
deleted file mode 100644
index 57548f1d175..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/d3_preload.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Copyright (c) 2014 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-'use strict';
-
-(function(window) {
- window.define = function(x) {
- window.d3 = x;
- };
- window.define.amd = true;
-})(this);
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils.html b/chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils.html
deleted file mode 100644
index f715938d86c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-
-'use strict';
-
-tr.exportTo('tr.b', function() {
- function _iterateElementDeeplyImpl(element, cb, thisArg, includeElement) {
- if (includeElement && cb.call(thisArg, element))
- return true;
-
- if (element.root &&
- element.root !== element &&
- _iterateElementDeeplyImpl(element.root, cb, thisArg, false)) {
- // Some elements, most notably Polymer template dom-repeat='...'
- // elements, are their own shadow root. Make sure that we avoid infinite
- // recursion by avoiding these elements.
- return true;
- }
- var children = Polymer.dom(element).children;
- for (var i = 0; i < children.length; i++)
- if (_iterateElementDeeplyImpl(children[i], cb, thisArg, true))
- return true;
-
- return false;
- }
-
- function iterateElementDeeply(element, cb, thisArg) {
- _iterateElementDeeplyImpl(element, cb, thisArg, false);
- }
-
- function findDeepElementMatchingPredicate(element, predicate) {
- var foundElement = undefined;
- function matches(element) {
- var match = predicate(element);
- if (!match)
- return false;
- foundElement = element;
- return true;
- }
- iterateElementDeeply(element, matches);
- return foundElement;
- }
-
- function findDeepElementsMatchingPredicate(element, predicate) {
- var foundElements = [];
- function matches(element) {
- var match = predicate(element);
- if (match) {
- foundElements.push(element);
- }
- return false;
- }
- iterateElementDeeply(element, matches);
- return foundElements;
- }
-
- function findDeepElementMatching(element, selector) {
- return findDeepElementMatchingPredicate(element, function(element) {
- return element.matches(selector);
- });
- }
- function findDeepElementsMatching(element, selector) {
- return findDeepElementsMatchingPredicate(element, function(element) {
- return element.matches(selector);
- });
- }
- function findDeepElementWithTextContent(element, re) {
- return findDeepElementMatchingPredicate(element, function(element) {
- if (element.children.length !== 0)
- return false;
- return re.test(Polymer.dom(element).textContent);
- });
- }
- return {
- iterateElementDeeply: iterateElementDeeply,
- findDeepElementMatching: findDeepElementMatching,
- findDeepElementsMatching: findDeepElementsMatching,
- findDeepElementMatchingPredicate: findDeepElementMatchingPredicate,
- findDeepElementsMatchingPredicate: findDeepElementsMatchingPredicate,
- findDeepElementWithTextContent: findDeepElementWithTextContent
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils_test.html
deleted file mode 100644
index 38156654ef0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/deep_utils_test.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-
-<dom-module id='tr-ui-b-deep-utils-test-a'>
- <template>
- <div></div>
- </template>
-</dom-module>
-<dom-module id='tr-ui-b-deep-utils-test-b'>
- <template>
- <div></div>
- </template>
-</dom-module>
-<dom-module id='tr-ui-b-deep-utils-test-c'>
- <template>
- <tr-ui-b-deep-utils-test-b class='x'></tr-ui-b-deep-utils-test-b>
- <tr-ui-b-deep-utils-test-a class='x'></tr-ui-b-deep-utils-test-a>
- <tr-ui-b-deep-utils-test-a class='x'></tr-ui-b-deep-utils-test-a>
- </template>
-</dom-module>
-<dom-module id='tr-ui-b-deep-utils-test-d'>
- <template>
- <tr-ui-b-deep-utils-test-c></tr-ui-b-deep-utils-test-c>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-deep-utils-test-a'
-});
-
-Polymer({
- is: 'tr-ui-b-deep-utils-test-b'
-});
-
-Polymer({
- is: 'tr-ui-b-deep-utils-test-c'
-});
-
-Polymer({
- is: 'tr-ui-b-deep-utils-test-d'
-});
-
-tr.b.unittest.testSuite(function() {
- test('testFindDeepElementMatching', function() {
- var d = document.createElement('tr-ui-b-deep-utils-test-d');
-
- var b = tr.b.findDeepElementMatching(d, 'tr-ui-b-deep-utils-test-b.x');
- assert.isDefined(b);
- assert.equal(b.tagName, 'TR-UI-B-DEEP-UTILS-TEST-B');
- });
-
- test('testFindDeepElementsMatching', function() {
- var d = document.createElement('tr-ui-b-deep-utils-test-d');
-
- var a = tr.b.findDeepElementsMatching(d, 'tr-ui-b-deep-utils-test-a.x');
- assert.isDefined(a);
- assert.equal(a[0].tagName, 'TR-UI-B-DEEP-UTILS-TEST-A');
- assert.equal(a[1].tagName, 'TR-UI-B-DEEP-UTILS-TEST-A');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers.html b/chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers.html
deleted file mode 100644
index b2ced31ed2a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers.html
+++ /dev/null
@@ -1,346 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<style>
-* /deep/ .labeled-checkbox {
- display: flex;
- white-space: nowrap;
-}
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
-
- function createSpan(opt_dictionary) {
- var ownerDocument = document;
- if (opt_dictionary && opt_dictionary.ownerDocument)
- ownerDocument = opt_dictionary.ownerDocument;
- var spanEl = ownerDocument.createElement('span');
- if (opt_dictionary) {
- if (opt_dictionary.className)
- spanEl.className = opt_dictionary.className;
- if (opt_dictionary.textContent) {
- Polymer.dom(spanEl).textContent =
- opt_dictionary.textContent;
- }
- if (opt_dictionary.tooltip)
- spanEl.title = opt_dictionary.tooltip;
- if (opt_dictionary.parent)
- Polymer.dom(opt_dictionary.parent).appendChild(spanEl);
- if (opt_dictionary.bold)
- spanEl.style.fontWeight = 'bold';
- if (opt_dictionary.italic)
- spanEl.style.fontStyle = 'italic';
- if (opt_dictionary.marginLeft)
- spanEl.style.marginLeft = opt_dictionary.marginLeft;
- if (opt_dictionary.marginRight)
- spanEl.style.marginRight = opt_dictionary.marginRight;
- if (opt_dictionary.backgroundColor)
- spanEl.style.backgroundColor = opt_dictionary.backgroundColor;
- if (opt_dictionary.color)
- spanEl.style.color = opt_dictionary.color;
- }
- return spanEl;
- }
-
- function createDiv(opt_dictionary) {
- var divEl = document.createElement('div');
- if (opt_dictionary) {
- if (opt_dictionary.className)
- divEl.className = opt_dictionary.className;
- if (opt_dictionary.parent)
- Polymer.dom(opt_dictionary.parent).appendChild(divEl);
- if (opt_dictionary.textContent)
- Polymer.dom(divEl).textContent =
- opt_dictionary.textContent;
- if (opt_dictionary.maxWidth)
- divEl.style.maxWidth = opt_dictionary.maxWidth;
- }
- return divEl;
- }
-
- function createScopedStyle(styleContent) {
- var styleEl = document.createElement('style');
- styleEl.scoped = true;
- Polymer.dom(styleEl).innerHTML = styleContent;
- return styleEl;
- }
-
- function valuesEqual(a, b) {
- if (a instanceof Array && b instanceof Array)
- return a.length === b.length && JSON.stringify(a) === JSON.stringify(b);
- return a === b;
- }
-
- function createSelector(
- targetEl, targetElProperty,
- settingsKey, defaultValue,
- items, opt_namespace) {
- var defaultValueIndex;
- for (var i = 0; i < items.length; i++) {
- var item = items[i];
- if (valuesEqual(item.value, defaultValue)) {
- defaultValueIndex = i;
- break;
- }
- }
- if (defaultValueIndex === undefined)
- throw new Error('defaultValue must be in the items list');
-
- var selectorEl = document.createElement('select');
- selectorEl.addEventListener('change', onChange);
- for (var i = 0; i < items.length; i++) {
- var item = items[i];
- var optionEl = document.createElement('option');
- Polymer.dom(optionEl).textContent = item.label;
- optionEl.targetPropertyValue = item.value;
- optionEl.item = item;
- Polymer.dom(selectorEl).appendChild(optionEl);
- }
- function onChange(e) {
- var value = selectorEl.selectedOptions[0].targetPropertyValue;
- tr.b.Settings.set(settingsKey, value, opt_namespace);
- targetEl[targetElProperty] = value;
- }
- var oldSetter = targetEl.__lookupSetter__('selectedIndex');
- selectorEl.__defineGetter__('selectedValue', function(v) {
- return selectorEl.children[selectorEl.selectedIndex].targetPropertyValue;
- });
- selectorEl.__defineGetter__('selectedItem', function(v) {
- return selectorEl.children[selectorEl.selectedIndex].item;
- });
- selectorEl.__defineSetter__('selectedValue', function(v) {
- for (var i = 0; i < selectorEl.children.length; i++) {
- var value = selectorEl.children[i].targetPropertyValue;
- if (valuesEqual(value, v)) {
- var changed = selectorEl.selectedIndex !== i;
- if (changed) {
- selectorEl.selectedIndex = i;
- onChange();
- }
- return;
- }
- }
- throw new Error('Not a valid value');
- });
-
- var initialValue = tr.b.Settings.get(
- settingsKey, defaultValue, opt_namespace);
- var didSet = false;
- for (var i = 0; i < selectorEl.children.length; i++) {
- if (valuesEqual(selectorEl.children[i].targetPropertyValue,
- initialValue)) {
- didSet = true;
- targetEl[targetElProperty] = initialValue;
- selectorEl.selectedIndex = i;
- break;
- }
- }
- if (!didSet) {
- selectorEl.selectedIndex = defaultValueIndex;
- targetEl[targetElProperty] = defaultValue;
- }
-
- return selectorEl;
- }
-
- function createEditCategorySpan(optionGroupEl, targetEl) {
- var spanEl = createSpan({className: 'edit-categories'});
- Polymer.dom(spanEl).textContent = 'Edit categories';
- Polymer.dom(spanEl).classList.add('labeled-option');
-
- spanEl.addEventListener('click', function() {
- targetEl.onClickEditCategories();
- });
- return spanEl;
- }
-
- function createOptionGroup(targetEl, targetElProperty,
- settingsKey, defaultValue,
- items) {
- function onChange() {
- var value = [];
- if (this.value.length)
- value = this.value.split(',');
- tr.b.Settings.set(settingsKey, value);
- targetEl[targetElProperty] = value;
- }
-
- var optionGroupEl = createSpan({className: 'labeled-option-group'});
- var initialValue = tr.b.Settings.get(settingsKey, defaultValue);
- for (var i = 0; i < items.length; ++i) {
- var item = items[i];
- var id = 'category-preset-' + item.label.replace(/ /g, '-');
-
- var radioEl = document.createElement('input');
- radioEl.type = 'radio';
- Polymer.dom(radioEl).setAttribute('id', id);
- Polymer.dom(radioEl).setAttribute('name', 'category-presets-group');
- Polymer.dom(radioEl).setAttribute('value', item.value);
- radioEl.addEventListener('change', onChange.bind(radioEl, targetEl,
- targetElProperty,
- settingsKey));
- if (valuesEqual(initialValue, item.value))
- radioEl.checked = true;
-
- var labelEl = document.createElement('label');
- Polymer.dom(labelEl).textContent = item.label;
- Polymer.dom(labelEl).setAttribute('for', id);
-
- var spanEl = createSpan({className: 'labeled-option'});
- Polymer.dom(spanEl).appendChild(radioEl);
- Polymer.dom(spanEl).appendChild(labelEl);
-
- spanEl.__defineSetter__('checked', function(opt_bool) {
- var changed = radioEl.checked !== (!!opt_bool);
- if (!changed)
- return;
-
- radioEl.checked = !!opt_bool;
- onChange();
- });
- spanEl.__defineGetter__('checked', function() {
- return radioEl.checked;
- });
-
- Polymer.dom(optionGroupEl).appendChild(spanEl);
- }
- Polymer.dom(optionGroupEl).appendChild(
- createEditCategorySpan(optionGroupEl, targetEl));
- // Since this option group element is not yet added to the tree,
- // querySelector will fail during updateEditCategoriesStatus_ call.
- // Hence, creating the element with the 'expanded' classlist category
- // added, if last selected value was 'Manual' selection.
- if (!initialValue.length)
- Polymer.dom(optionGroupEl).classList.add('categories-expanded');
- targetEl[targetElProperty] = initialValue;
-
- return optionGroupEl;
- }
-
- var nextCheckboxId = 1;
- function createCheckBox(targetEl, targetElProperty,
- settingsKey, defaultValue,
- label, opt_changeCb) {
- var buttonEl = document.createElement('input');
- buttonEl.type = 'checkbox';
-
- var initialValue = defaultValue;
- if (settingsKey !== undefined) {
- initialValue = tr.b.Settings.get(settingsKey, defaultValue);
- buttonEl.checked = !!initialValue;
- }
- if (targetEl)
- targetEl[targetElProperty] = initialValue;
-
- function onChange() {
- if (settingsKey !== undefined) {
- tr.b.Settings.set(settingsKey, buttonEl.checked);
- }
- if (targetEl)
- targetEl[targetElProperty] = buttonEl.checked;
- if (opt_changeCb)
- opt_changeCb.call();
- }
-
- buttonEl.addEventListener('change', onChange);
-
- var id = '#checkbox-' + nextCheckboxId++;
-
- var spanEl = createSpan({className: 'labeled-checkbox'});
- Polymer.dom(buttonEl).setAttribute('id', id);
-
- var labelEl = document.createElement('label');
- Polymer.dom(labelEl).textContent = label;
- Polymer.dom(labelEl).setAttribute('for', id);
- Polymer.dom(spanEl).appendChild(buttonEl);
- Polymer.dom(spanEl).appendChild(labelEl);
-
- spanEl.__defineSetter__('checked', function(opt_bool) {
- var changed = buttonEl.checked !== (!!opt_bool);
- if (!changed)
- return;
-
- buttonEl.checked = !!opt_bool;
- onChange();
- });
- spanEl.__defineGetter__('checked', function() {
- return buttonEl.checked;
- });
-
- return spanEl;
- }
-
- /**
- * @param {!string} label
- * @param {function()=} opt_callback
- * @param {*=} opt_this
- */
- function createButton(label, opt_callback, opt_this) {
- var buttonEl = document.createElement('input');
- buttonEl.type = 'button';
- buttonEl.value = label;
-
- function onClick() {
- opt_callback.call(opt_this || buttonEl);
- }
-
- if (opt_callback)
- buttonEl.addEventListener('click', onClick);
-
- return buttonEl;
- }
-
- function createTextInput(
- targetEl, targetElProperty, settingsKey, defaultValue) {
- var initialValue = tr.b.Settings.get(settingsKey, defaultValue);
- var el = document.createElement('input');
- el.type = 'text';
- function onChange(e) {
- tr.b.Settings.set(settingsKey, el.value);
- targetEl[targetElProperty] = el.value;
- }
- el.addEventListener('input', onChange);
- el.value = initialValue;
- targetEl[targetElProperty] = initialValue;
-
- return el;
- }
-
- function isElementAttachedToDocument(el) {
- var cur = el;
- while (Polymer.dom(cur).parentNode)
- cur = Polymer.dom(cur).parentNode;
- return (cur === el.ownerDocument || cur.nodeName === '#document-fragment');
- }
-
- function asHTMLOrTextNode(value, opt_ownerDocument) {
- if (value instanceof Node)
- return value;
- var ownerDocument = opt_ownerDocument || document;
- return ownerDocument.createTextNode(value);
- }
-
- return {
- createSpan: createSpan,
- createDiv: createDiv,
- createScopedStyle: createScopedStyle,
- createSelector: createSelector,
- createOptionGroup: createOptionGroup,
- createCheckBox: createCheckBox,
- createButton: createButton,
- createTextInput: createTextInput,
- isElementAttachedToDocument: isElementAttachedToDocument,
- asHTMLOrTextNode: asHTMLOrTextNode
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers_test.html
deleted file mode 100644
index 61ca370c5be..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/dom_helpers_test.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- test('simpleSpanAndDiv', function() {
- var divEl = tr.ui.b.createDiv({
- className: 'a-div-class', parent: document.body
- });
- var testText = 'some span text';
- var spanEl = tr.ui.b.createSpan({
- className: 'a-span-class',
- textContent: testText,
- parent: divEl
- });
- var eltInDocument = Polymer.dom(document)
- .querySelector('.a-div-class>.a-span-class');
- assert.equal(Polymer.dom(eltInDocument).textContent, testText);
- Polymer.dom(eltInDocument.parentElement).removeChild(eltInDocument);
- });
-
- test('createSpan_ownerDocument', function() {
- var spanEl = tr.ui.b.createSpan({
- className: 'a-span-class',
- bold: true,
- ownerDocument: THIS_DOC
- });
- assert.strictEqual(spanEl.ownerDocument, THIS_DOC);
- });
-
- test('checkboxFromDefaults', function() {
- var target = {foo: undefined};
- var cb = tr.ui.b.createCheckBox(target, 'foo', 'myCheckBox', false, 'Foo');
- assert.isFalse(target.foo);
- });
-
- test('checkboxFromSettings', function() {
- tr.b.Settings.set('myCheckBox', true);
- var target = {foo: undefined};
- var cb = tr.ui.b.createCheckBox(target, 'foo', 'myCheckBox', false, 'Foo');
- assert.isTrue(target.foo);
- });
-
- test('checkboxChanged', function() {
- var target = {foo: undefined};
- var cb = tr.ui.b.createCheckBox(target, 'foo', 'myCheckBox', false, 'Foo');
- cb.checked = true;
-
- assert.isTrue(tr.b.Settings.get('myCheckBox', undefined));
- assert.isTrue(target.foo);
- });
-
- test('selectorSettingsAlreaySet', function() {
- tr.b.Settings.set('myScale', 0.25);
-
- var target = {
- scale: 314
- };
- var sel = tr.ui.b.createSelector(
- target, 'scale',
- 'myScale', 0.375,
- [{label: '6.25%', value: 0.0625},
- {label: '12.5%', value: 0.125},
- {label: '25%', value: 0.25},
- {label: '37.5%', value: 0.375},
- {label: '50%', value: 0.5},
- {label: '75%', value: 0.75},
- {label: '100%', value: 1},
- {label: '200%', value: 2}
- ]);
- assert.equal(target.scale, 0.25);
- assert.equal(sel.selectedIndex, 2);
- });
-
- test('selectorSettingsDefault', function() {
- var target = {
- scale: 314
- };
- var sel = tr.ui.b.createSelector(
- target, 'scale',
- 'myScale', 0.375,
- [{label: '6.25%', value: 0.0625},
- {label: '12.5%', value: 0.125},
- {label: '25%', value: 0.25},
- {label: '37.5%', value: 0.375},
- {label: '50%', value: 0.5},
- {label: '75%', value: 0.75},
- {label: '100%', value: 1},
- {label: '200%', value: 2}
- ]);
- assert.equal(target.scale, 0.375);
- assert.equal(sel.selectedIndex, 3);
- });
-
- test('selectorSettingsChanged', function() {
- var target = {
- scale: 314
- };
- var sel = tr.ui.b.createSelector(
- target, 'scale',
- 'myScale', 0.375,
- [{label: '6.25%', value: 0.0625},
- {label: '12.5%', value: 0.125},
- {label: '25%', value: 0.25},
- {label: '37.5%', value: 0.375},
- {label: '50%', value: 0.5},
- {label: '75%', value: 0.75},
- {label: '100%', value: 1},
- {label: '200%', value: 2}
- ]);
- assert.equal(sel.selectedValue, 0.375);
- sel.selectedValue = 0.75;
- assert.equal(target.scale, 0.75);
- assert.equal(sel.selectedValue, 0.75);
- assert.equal(undefined), 0.75, tr.b.Settings.get('myScale');
- });
-
- test('asHTMLOrTextNode_string', function() {
- // Default owner document.
- var node = tr.ui.b.asHTMLOrTextNode('Hello, World!');
- assert.instanceOf(node, Node);
- assert.equal(Polymer.dom(node).textContent, 'Hello, World!');
- assert.strictEqual(node.ownerDocument, document);
-
- // Custom owner document.
- var node = tr.ui.b.asHTMLOrTextNode('Bye, World!', THIS_DOC);
- assert.instanceOf(node, Node);
- assert.equal(Polymer.dom(node).textContent, 'Bye, World!');
- assert.strictEqual(node.ownerDocument, THIS_DOC);
- });
-
- test('asHTMLOrTextNode_node', function() {
- // Node object. Owner document should NOT be modified.
- var node = document.createTextNode('Hi', THIS_DOC);
- assert.strictEqual(tr.ui.b.asHTMLOrTextNode(node), node);
- assert.strictEqual(node.ownerDocument, document);
-
- // HTMLElement object. Owner document should NOT be modified.
- var node = THIS_DOC.createElement('div');
- assert.strictEqual(tr.ui.b.asHTMLOrTextNode(node), node);
- assert.strictEqual(node.ownerDocument, THIS_DOC);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle.html b/chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle.html
deleted file mode 100644
index 405f9538f35..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle.html
+++ /dev/null
@@ -1,186 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id="tr-ui-b-drag-handle">
- <template>
- <style>
- :host {
- -webkit-user-select: none;
- box-sizing: border-box;
- display: block;
- }
-
- :host(.horizontal-drag-handle) {
- background-image: -webkit-gradient(linear,
- 0 0, 0 100%,
- from(#E5E5E5),
- to(#D1D1D1));
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
- cursor: ns-resize;
- flex: 0 0 auto;
- height: 7px;
- position: relative;
- }
-
- :host(.vertical-drag-handle) {
- background-image: -webkit-gradient(linear,
- 0 0, 100% 0,
- from(#E5E5E5),
- to(#D1D1D1));
- border-left: 1px solid white;
- border-right: 1px solid #8e8e8e;
- cursor: ew-resize;
- flex: 0 0 auto;
- position: relative;
- width: 7px;
- }
- </style>
- <div></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-drag-handle',
-
- created: function() {
- this.lastMousePos_ = 0;
- this.onMouseMove_ = this.onMouseMove_.bind(this);
- this.onMouseUp_ = this.onMouseUp_.bind(this);
- this.addEventListener('mousedown', this.onMouseDown_);
- this.target_ = undefined;
- this.horizontal = true;
- this.observer_ = new WebKitMutationObserver(
- this.didTargetMutate_.bind(this));
- this.targetSizesByModeKey_ = {};
- },
-
- get modeKey_() {
- return this.target_.className === '' ? '.' : this.target_.className;
- },
-
- get target() {
- return this.target_;
- },
-
- set target(target) {
- this.observer_.disconnect();
- this.target_ = target;
- if (!this.target_)
- return;
- this.observer_.observe(this.target_, {
- attributes: true,
- attributeFilter: ['class']
- });
- },
-
- get horizontal() {
- return this.horizontal_;
- },
-
- set horizontal(h) {
- this.horizontal_ = h;
- if (this.horizontal_)
- this.className = 'horizontal-drag-handle';
- else
- this.className = 'vertical-drag-handle';
- },
-
- get vertical() {
- return !this.horizontal_;
- },
-
- set vertical(v) {
- this.horizontal = !v;
- },
-
- forceMutationObserverFlush_: function() {
- var records = this.observer_.takeRecords();
- if (records.length)
- this.didTargetMutate_(records);
- },
-
- didTargetMutate_: function(e) {
- var modeSize = this.targetSizesByModeKey_[this.modeKey_];
- if (modeSize !== undefined) {
- this.setTargetSize_(modeSize);
- return;
- }
-
- // If we hadn't previously sized the target, then just remove any manual
- // sizing that we applied.
- this.target_.style[this.targetStyleKey_] = '';
- },
-
- get targetStyleKey_() {
- return this.horizontal_ ? 'height' : 'width';
- },
-
- getTargetSize_: function() {
- // If style is not set, start off with computed height.
- var targetStyleKey = this.targetStyleKey_;
- if (!this.target_.style[targetStyleKey]) {
- this.target_.style[targetStyleKey] =
- window.getComputedStyle(this.target_)[targetStyleKey];
- }
- var size = parseInt(this.target_.style[targetStyleKey]);
- this.targetSizesByModeKey_[this.modeKey_] = size;
- return size;
- },
-
- setTargetSize_: function(s) {
- this.target_.style[this.targetStyleKey_] = s + 'px';
- this.targetSizesByModeKey_[this.modeKey_] = s;
- tr.b.dispatchSimpleEvent(this, 'drag-handle-resize', true, false);
- },
-
- applyDelta_: function(delta) {
- // Apply new size to the container.
- var curSize = this.getTargetSize_();
- var newSize;
- if (this.target_ === this.nextElementSibling) {
- newSize = curSize + delta;
- } else {
- newSize = curSize - delta;
- }
- this.setTargetSize_(newSize);
- },
-
- onMouseMove_: function(e) {
- // Compute the difference in height position.
- var curMousePos = this.horizontal_ ? e.clientY : e.clientX;
- var delta = this.lastMousePos_ - curMousePos;
-
- this.applyDelta_(delta);
-
- this.lastMousePos_ = curMousePos;
- e.preventDefault();
- return true;
- },
-
- onMouseDown_: function(e) {
- if (!this.target_)
- return;
- this.forceMutationObserverFlush_();
- this.lastMousePos_ = this.horizontal_ ? e.clientY : e.clientX;
- document.addEventListener('mousemove', this.onMouseMove_);
- document.addEventListener('mouseup', this.onMouseUp_);
- e.preventDefault();
- return true;
- },
-
- onMouseUp_: function(e) {
- document.removeEventListener('mousemove', this.onMouseMove_);
- document.removeEventListener('mouseup', this.onMouseUp_);
- e.preventDefault();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle_test.html
deleted file mode 100644
index 0d5ab850564..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/drag_handle_test.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var createDragHandle = function() {
- var el = document.createElement('div');
- el.style.border = '1px solid black';
- el.style.width = '200px';
- el.style.height = '200px';
- el.style.display = 'flex';
- el.style.flexDirection = 'column';
-
- var upperEl = document.createElement('div');
- upperEl.style.flex = '1 1 auto';
- upperEl.style.minHeight = '0';
-
- var lowerEl = document.createElement('div');
- lowerEl.style.height = '100px';
-
- var dragHandle = document.createElement('tr-ui-b-drag-handle');
- dragHandle.target = lowerEl;
-
- Polymer.dom(el).appendChild(upperEl);
- Polymer.dom(el).appendChild(dragHandle);
- Polymer.dom(el).appendChild(lowerEl);
- el.upperEl = upperEl;
- el.dragHandle = dragHandle;
- el.lowerEl = lowerEl;
-
- el.getLowerElHeight = function() {
- return parseInt(getComputedStyle(this.lowerEl).height);
- };
- return el;
- };
-
- test('instantiate', function() {
- this.addHTMLOutput(createDragHandle());
- });
-
- test('applyDelta', function() {
- var el = createDragHandle();
- this.addHTMLOutput(el);
-
- var dragHandle = el.dragHandle;
- var oldHeight = el.getLowerElHeight();
- dragHandle.applyDelta_(10);
- assert.equal(el.getLowerElHeight(), oldHeight + 10);
- });
-
- test('classNameMutation', function() {
- var el = createDragHandle();
-
- var styleEl = document.createElement('style');
- Polymer.dom(styleEl).textContent =
- '.mode-a { height: 100px; } .mode-b { height: 50px; }';
- Polymer.dom(document.head).appendChild(styleEl);
-
- this.addHTMLOutput(el);
-
- try {
- var dragHandle = el.dragHandle;
- el.lowerEl.className = 'mode-a';
- assert.equal(el.getLowerElHeight(), 100);
-
- dragHandle.applyDelta_(10);
- assert.equal(el.getLowerElHeight(), 110);
-
- // Change the class, which should restore the layout
- // to the default sizing for mode-b
- el.lowerEl.className = 'mode-b';
- dragHandle.forceMutationObserverFlush_();
- assert.equal(el.getLowerElHeight(), 50);
-
- dragHandle.applyDelta_(10);
- assert.equal(el.getLowerElHeight(), 60);
-
- // Restore the class-a, which should restore the layout
- // to sizing when we were changed.
- el.lowerEl.className = 'mode-a';
- dragHandle.forceMutationObserverFlush_();
- assert.equal(el.getLowerElHeight(), 110);
- } finally {
- Polymer.dom(document.head).removeChild(styleEl);
- }
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/draw_helpers.html b/chromium/third_party/catapult/tracing/tracing/ui/base/draw_helpers.html
deleted file mode 100644
index 89b9d5dab96..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/draw_helpers.html
+++ /dev/null
@@ -1,419 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/ui/base/elided_cache.html">
-<link rel="import" href="/tracing/ui/base/event_presenter.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides various helper methods for drawing to a provided
- * canvas.
- */
-tr.exportTo('tr.ui.b', function() {
- var elidedTitleCache = new tr.ui.b.ElidedTitleCache();
- var ColorScheme = tr.b.ColorScheme;
- var colorsAsStrings = ColorScheme.colorsAsStrings;
-
- var EventPresenter = tr.ui.b.EventPresenter;
- var blackColorId = ColorScheme.getColorIdForReservedName('black');
-
- /**
- * This value is used to allow for consistent style UI elements.
- * Thread time visualisation uses a smaller rectangle that has this height.
- * @const
- */
- var THIN_SLICE_HEIGHT = 4;
-
- /**
- * This value is used to for performance considerations when drawing large
- * zoomed out traces that feature cpu time in the slices. If the waiting
- * width is less than the threshold, we only draw the rectangle as a solid.
- * @const
- */
- var SLICE_WAITING_WIDTH_DRAW_THRESHOLD = 3;
-
- /**
- * If the slice has mostly been waiting to be scheduled on the cpu, the
- * wall clock will be far greater than the cpu clock. Draw the slice
- * only as an idle slice, if the active width is not thicker than the
- * threshold.
- * @const
- */
- var SLICE_ACTIVE_WIDTH_DRAW_THRESHOLD = 1;
-
- /**
- * Should we elide text on trace labels?
- * Without eliding, text that is too wide isn't drawn at all.
- * Disable if you feel this causes a performance problem.
- * This is a default value that can be overridden in tracks for testing.
- * @const
- */
- var SHOULD_ELIDE_TEXT = true;
-
- /**
- * Draw the define line into |ctx|.
- *
- * @param {Context} ctx The context to draw into.
- * @param {float} x1 The start x position of the line.
- * @param {float} y1 The start y position of the line.
- * @param {float} x2 The end x position of the line.
- * @param {float} y2 The end y position of the line.
- */
- function drawLine(ctx, x1, y1, x2, y2) {
- ctx.moveTo(x1, y1);
- ctx.lineTo(x2, y2);
- }
-
- /**
- * Draw the defined triangle into |ctx|.
- *
- * @param {Context} ctx The context to draw into.
- * @param {float} x1 The first corner x.
- * @param {float} y1 The first corner y.
- * @param {float} x2 The second corner x.
- * @param {float} y2 The second corner y.
- * @param {float} x3 The third corner x.
- * @param {float} y3 The third corner y.
- */
- function drawTriangle(ctx, x1, y1, x2, y2, x3, y3) {
- ctx.beginPath();
- ctx.moveTo(x1, y1);
- ctx.lineTo(x2, y2);
- ctx.lineTo(x3, y3);
- ctx.closePath();
- }
-
- /**
- * Draw an arrow into |ctx|.
- *
- * @param {Context} ctx The context to draw into.
- * @param {float} x1 The shaft x.
- * @param {float} y1 The shaft y.
- * @param {float} x2 The head x.
- * @param {float} y2 The head y.
- * @param {float} arrowLength The length of the head.
- * @param {float} arrowWidth The width of the head.
- */
- function drawArrow(ctx, x1, y1, x2, y2, arrowLength, arrowWidth) {
- var dx = x2 - x1;
- var dy = y2 - y1;
- var len = Math.sqrt(dx * dx + dy * dy);
- var perc = (len - arrowLength) / len;
- var bx = x1 + perc * dx;
- var by = y1 + perc * dy;
- var ux = dx / len;
- var uy = dy / len;
- var ax = uy * arrowWidth;
- var ay = -ux * arrowWidth;
-
- ctx.beginPath();
- drawLine(ctx, x1, y1, x2, y2);
- ctx.stroke();
-
- drawTriangle(ctx,
- bx + ax, by + ay,
- x2, y2,
- bx - ax, by - ay);
- ctx.fill();
- }
-
- /**
- * Draw the provided slices to the screen.
- *
- * Each of the elements in |slices| must provide the follow methods:
- * * start
- * * duration
- * * colorId
- * * selected
- *
- * @param {Context} ctx The canvas context.
- * @param {TimelineDrawTransform} dt The draw transform.
- * @param {float} viewLWorld The left most point of the world viewport.
- * @param {float} viewRWorld The right most point of the world viewport.
- * @param {float} viewHeight The height of the viewport.
- * @param {Array} slices The slices to draw.
- * @param {bool} async Whether the slices are drawn with async style.
- */
- function drawSlices(ctx, dt, viewLWorld, viewRWorld, viewHeight, slices,
- async) {
- var pixelRatio = window.devicePixelRatio || 1;
- var pixWidth = dt.xViewVectorToWorld(1);
- var height = viewHeight * pixelRatio;
-
- var darkRectHeight = THIN_SLICE_HEIGHT * pixelRatio;
-
- // Not enough space for both colors, use light color only.
- if (height < darkRectHeight)
- darkRectHeight = 0;
-
- var lightRectHeight = height - darkRectHeight;
-
- // Begin rendering in world space.
- ctx.save();
- dt.applyTransformToCanvas(ctx);
-
- var rect = new tr.ui.b.FastRectRenderer(
- ctx, 2 * pixWidth, 2 * pixWidth, colorsAsStrings);
- rect.setYandH(0, height);
-
- var lowSlice = tr.b.findLowIndexInSortedArray(
- slices,
- function(slice) { return slice.start + slice.duration; },
- viewLWorld);
-
- var hadTopLevel = false;
-
- for (var i = lowSlice; i < slices.length; ++i) {
- var slice = slices[i];
- var x = slice.start;
- if (x > viewRWorld)
- break;
-
- var w = pixWidth;
- if (slice.duration > 0) {
- w = Math.max(slice.duration, 0.000001);
- if (w < pixWidth)
- w = pixWidth;
- }
-
- var colorId = EventPresenter.getSliceColorId(slice);
- var alpha = EventPresenter.getSliceAlpha(slice, async);
- var lightAlpha = alpha * 0.70;
-
- if (async && slice.isTopLevel) {
- rect.setYandH(3, height - 3);
- hadTopLevel = true;
- } else {
- rect.setYandH(0, height);
- }
-
- // If cpuDuration is available, draw rectangles proportional to the
- // amount of cpu time taken.
- if (!slice.cpuDuration) {
- // No cpuDuration available, draw using only one alpha.
- rect.fillRect(x, w, colorId, alpha);
- continue;
- }
-
- var activeWidth = w * (slice.cpuDuration / slice.duration);
- var waitingWidth = w - activeWidth;
-
- // Check if we have enough screen space to draw the whole slice, with
- // both color tones.
- //
- // Truncate the activeWidth to 0 if it is less than 'threshold' pixels.
- if (activeWidth < SLICE_ACTIVE_WIDTH_DRAW_THRESHOLD * pixWidth) {
- activeWidth = 0;
- waitingWidth = w;
- }
-
- // Truncate the waitingWidth to 0 if it is less than 'threshold' pixels.
- if (waitingWidth < SLICE_WAITING_WIDTH_DRAW_THRESHOLD * pixWidth) {
- activeWidth = w;
- waitingWidth = 0;
- }
-
- // We now draw the two rectangles making up the event slice.
- // NOTE: The if statements are necessary for performance considerations.
- // We do not want to force draws, if the width of the rectangle is 0.
- //
- // First draw the solid color, representing the 'active' part.
- if (activeWidth > 0) {
- rect.fillRect(x, activeWidth, colorId, alpha);
- }
-
- // Next draw the two toned 'idle' part.
- // NOTE: Substracting pixWidth and drawing one extra pixel is done to
- // prevent drawing artifacts. Without it, the two parts of the slice,
- // ('active' and 'idle') may appear split apart.
- if (waitingWidth > 0) {
- // First draw the light toned top part.
- rect.setYandH(0, lightRectHeight);
- rect.fillRect(x + activeWidth - pixWidth,
- waitingWidth + pixWidth, colorId, lightAlpha);
- // Then the solid bottom half.
- rect.setYandH(lightRectHeight, darkRectHeight);
- rect.fillRect(x + activeWidth - pixWidth,
- waitingWidth + pixWidth, colorId, alpha);
- // Reset for the next slice.
- rect.setYandH(0, height);
- }
- }
- rect.flush();
-
- if (async && hadTopLevel) {
- // Draw a top border over async slices in order to visually separate
- // them from events above it.
- // See https://github.com/google/trace-viewer/issues/725.
- rect.setYandH(2, 1);
- for (var i = lowSlice; i < slices.length; ++i) {
- var slice = slices[i];
- var x = slice.start;
- if (x > viewRWorld)
- break;
-
- if (!slice.isTopLevel)
- continue;
-
- var w = pixWidth;
- if (slice.duration > 0) {
- w = Math.max(slice.duration, 0.000001);
- if (w < pixWidth)
- w = pixWidth;
- }
-
- rect.fillRect(x, w, blackColorId, 0.7);
- }
- rect.flush();
- }
-
- ctx.restore();
- }
-
- /**
- * Draw the provided instant slices as lines to the screen.
- *
- * Each of the elements in |slices| must provide the follow methods:
- * * start
- * * duration with value of 0.
- * * colorId
- * * selected
- *
- * @param {Context} ctx The canvas context.
- * @param {TimelineDrawTransform} dt The draw transform.
- * @param {float} viewLWorld The left most point of the world viewport.
- * @param {float} viewRWorld The right most point of the world viewport.
- * @param {float} viewHeight The height of the viewport.
- * @param {Array} slices The slices to draw.
- * @param {Numer} lineWidthInPixels The width of the lines.
- */
- function drawInstantSlicesAsLines(
- ctx, dt, viewLWorld, viewRWorld, viewHeight, slices, lineWidthInPixels) {
- var pixelRatio = window.devicePixelRatio || 1;
- var height = viewHeight * pixelRatio;
-
- var pixWidth = dt.xViewVectorToWorld(1);
-
- // Begin rendering in world space.
- ctx.save();
- ctx.lineWidth = pixWidth * lineWidthInPixels * pixelRatio;
- dt.applyTransformToCanvas(ctx);
- ctx.beginPath();
-
- var lowSlice = tr.b.findLowIndexInSortedArray(
- slices,
- function(slice) { return slice.start; },
- viewLWorld);
-
- for (var i = lowSlice; i < slices.length; ++i) {
- var slice = slices[i];
- var x = slice.start;
- if (x > viewRWorld)
- break;
-
- ctx.strokeStyle = EventPresenter.getInstantSliceColor(slice);
-
- ctx.beginPath();
- ctx.moveTo(x, 0);
- ctx.lineTo(x, height);
- ctx.stroke();
- }
- ctx.restore();
- }
-
- /**
- * Draws the labels for the given slices.
- *
- * The |slices| array must contain objects with the following API:
- * * start
- * * duration
- * * title
- * * didNotFinish (optional)
- *
- * @param {Context} ctx The graphics context.
- * @param {TimelineDrawTransform} dt The draw transform.
- * @param {float} viewLWorld The left most point of the world viewport.
- * @param {float} viewRWorld The right most point of the world viewport.
- * @param {Array} slices The slices to label.
- * @param {bool} async Whether the slice labels are drawn with async style.
- * @param {float} fontSize The font size.
- * @param {float} yOffset The font offset.
- */
- function drawLabels(ctx, dt, viewLWorld, viewRWorld, slices, async,
- fontSize, yOffset) {
- var pixelRatio = window.devicePixelRatio || 1;
- var pixWidth = dt.xViewVectorToWorld(1);
-
- ctx.save();
-
- ctx.textAlign = 'center';
- ctx.textBaseline = 'top';
- ctx.font = (fontSize * pixelRatio) + 'px sans-serif';
-
- if (async)
- ctx.font = 'italic ' + ctx.font;
-
- var cY = yOffset * pixelRatio;
-
- var lowSlice = tr.b.findLowIndexInSortedArray(
- slices,
- function(slice) { return slice.start + slice.duration; },
- viewLWorld);
-
- // Don't render text until until it is 20px wide
- var quickDiscardThresshold = pixWidth * 20;
- for (var i = lowSlice; i < slices.length; ++i) {
- var slice = slices[i];
- if (slice.start > viewRWorld)
- break;
-
- if (slice.duration <= quickDiscardThresshold)
- continue;
-
- var title = slice.title +
- (slice.didNotFinish ? ' (Did Not Finish)' : '');
-
- var drawnTitle = title;
- var drawnWidth = elidedTitleCache.labelWidth(ctx, drawnTitle);
- var fullLabelWidth = elidedTitleCache.labelWidthWorld(
- ctx, drawnTitle, pixWidth);
- if (SHOULD_ELIDE_TEXT && fullLabelWidth > slice.duration) {
- var elidedValues = elidedTitleCache.get(
- ctx, pixWidth,
- drawnTitle, drawnWidth,
- slice.duration);
- drawnTitle = elidedValues.string;
- drawnWidth = elidedValues.width;
- }
-
- if (drawnWidth * pixWidth < slice.duration) {
- ctx.fillStyle = EventPresenter.getTextColor(slice);
- var cX = dt.xWorldToView(slice.start + 0.5 * slice.duration);
- ctx.fillText(drawnTitle, cX, cY, drawnWidth);
- }
- }
- ctx.restore();
- }
-
- return {
- drawSlices: drawSlices,
- drawInstantSlicesAsLines: drawInstantSlicesAsLines,
- drawLabels: drawLabels,
-
- drawLine: drawLine,
- drawTriangle: drawTriangle,
- drawArrow: drawArrow,
-
- elidedTitleCache_: elidedTitleCache,
-
- THIN_SLICE_HEIGHT: THIN_SLICE_HEIGHT
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/dropdown.html b/chromium/third_party/catapult/tracing/tracing/ui/base/dropdown.html
deleted file mode 100644
index 5c2f4dfe170..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/dropdown.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<dom-module id='tr-ui-b-dropdown'>
- <template>
- <style>
- :host {
- position: relative;
- display: flex;
- }
- #outer {
- display: flex;
- flex: 0 0 auto;
- padding: 1px 4px 1px 4px;
- -webkit-user-select: none;
- cursor: default;
- }
-
- #state {
- display: flex;
- flex: 0 0 auto;
- margin-left: 2px;
- margin-right: 0px;
- flex: 0 0 auto;
- }
-
- #icon {
- display: flex;
- flex: 0 0 auto;
- flex: 0 0 auto;
- }
- dialog {
- position: absolute;
- padding: 0;
- border: 0;
- margin: 0;
- }
- dialog::backdrop {
- background: rgba(0,0,0,.05);
- }
-
- #dialog-frame {
- background-color: #fff;
- display: flex;
- flex-direction: column;
- flex: 1 1 auto;
- padding: 6px;
- border: 1px solid black;
- -webkit-user-select: none;
- cursor: default;
- }
- </style>
- <tr-ui-b-toolbar-button id="outer"
- on-keydown="onOuterKeyDown_"
- on-click="onOuterClick_">
- <div id="icon">&#9881;</div>
- <div id="state">&#9662;</div>
- </tr-ui-b-toolbar-button>
- <dialog id="dialog"
- on-click="onDialogClick_"
- on-cancel="onDialogCancel_">
- <div id="dialog-frame">
- <content></content>
- </div>
- </dialog>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-dropdown',
-
- ready: function() {
- this.$.outer.tabIndex = 0;
- },
-
- get iconElement() {
- return this.$.icon;
- },
-
- onOuterKeyDown_: function(e) {
- if (e.keyCode === ' '.charCodeAt(0)) {
- this.toggle_();
- e.preventDefault();
- e.stopPropagation();
- }
- },
-
- onOuterClick_: function(e) {
- var or = this.$.outer.getBoundingClientRect();
- var inside = true;
- inside &= e.clientX >= or.left;
- inside &= e.clientX < or.right;
- inside &= e.clientY >= or.top;
- inside &= e.clientY < or.bottom;
- if (!inside)
- return;
-
- e.preventDefault();
- this.toggle_();
- },
-
- toggle_: function() {
- if (!this.isOpen)
- this.show();
- else
- this.close();
- },
-
- show: function() {
- if (this.isOpen)
- return;
-
- Polymer.dom(this.$.outer).classList.add('open');
-
- var ddr = this.$.outer.getBoundingClientRect();
- var rW = Math.max(ddr.width, 150);
- this.$.dialog.style.minWidth = rW + 'px';
- this.$.dialog.showModal();
-
- var ddw = this.$.outer.getBoundingClientRect().width;
- var w = this.$.dialog.getBoundingClientRect().width;
- this.$.dialog.style.top = ddr.bottom - 1 + 'px';
- this.$.dialog.style.left = ddr.left + 'px';
- },
-
- onDialogClick_: function(e) {
- if (!this.isOpen)
- return;
- if (e.srcElement !== this.$.dialog)
- return;
- e.preventDefault();
- this.close();
- },
-
- onDialogCancel_: function(e) {
- e.preventDefault();
- this.close();
- },
-
- close: function() {
- if (!this.isOpen)
- return;
- this.$.dialog.close();
- Polymer.dom(this.$.outer).classList.remove('open');
- this.$.outer.focus();
- },
-
- get isOpen() {
- return this.$.dialog.hasAttribute('open');
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/dropdown_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/dropdown_test.html
deleted file mode 100644
index 3d6ebb41cf3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/dropdown_test.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/dropdown.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var dd = document.createElement('tr-ui-b-dropdown');
- dd.style.marginLeft = '50px';
- dd.style.width = '50px';
- Polymer.dom(dd.iconElement).textContent =
- 'Settings ' + String.fromCharCode(0x2699);
-
- Polymer.dom(dd).appendChild(tr.ui.b.createDiv({textContent: 'item 1'}));
- Polymer.dom(dd).appendChild(
- tr.ui.b.createDiv({textContent: 'item 2 longer'}));
- Polymer.dom(dd).appendChild(
- tr.ui.b.createDiv({textContent: 'item 3'}));
-
- var container = tr.ui.b.createDiv();
- container.style.height = '100px';
- Polymer.dom(container).appendChild(dd);
- Polymer.dom(container).appendChild(
- tr.ui.b.createDiv({textContent: 'some text'}));
- Polymer.dom(container).appendChild(
- tr.ui.b.createDiv({textContent: 'some more text'}));
- Polymer.dom(container).appendChild(
- tr.ui.b.createDiv({textContent: 'more text'}));
- this.addHTMLOutput(container);
-
- dd.show();
- dd.close();
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/elided_cache.html b/chromium/third_party/catapult/tracing/tracing/ui/base/elided_cache.html
deleted file mode 100644
index 556123b44f4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/elided_cache.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides a caching layer for elided text values.
- */
-tr.exportTo('tr.ui.b', function() {
- /**
- * Cache for elided strings.
- * Moved from the ElidedTitleCache protoype to a "global" for speed
- * (variable reference is 100x faster).
- * key: String we wish to elide.
- * value: Another dict whose key is width
- * and value is an ElidedStringWidthPair.
- */
- var elidedTitleCacheDict = new Map();
- var elidedTitleCache = new ElidedTitleCache();
-
- /**
- * A cache for elided strings.
- * @constructor
- */
- function ElidedTitleCache() {
- // TODO(jrg): possibly obsoleted with the elided string cache.
- // Consider removing.
- this.textWidthMap = new Map();
- }
-
- ElidedTitleCache.prototype = {
- /**
- * Return elided text.
- *
- * @param {ctx} Context The graphics context.
- * @param {pixWidth} Pixel width.
- * @param {title} Original title text.
- * @param {width} Drawn width in world coords.
- * @param {sliceDuration} Where the title must fit (in world coords).
- * @return {ElidedStringWidthPair} Elided string and width.
- */
- get: function(ctx, pixWidth, title, width, sliceDuration) {
- var elidedDict = elidedTitleCacheDict.get(title);
- if (!elidedDict) {
- elidedDict = new Map();
- elidedTitleCacheDict.set(title, elidedDict);
- }
-
- var elidedDictForPixWidth = elidedDict.get(pixWidth);
- if (!elidedDictForPixWidth) {
- elidedDict.set(pixWidth, new Map());
- elidedDictForPixWidth = elidedDict.get(pixWidth);
- }
-
- var stringWidthPair = elidedDictForPixWidth.get(sliceDuration);
- if (stringWidthPair === undefined) {
- var newtitle = title;
- var elided = false;
- while (this.labelWidthWorld(ctx, newtitle, pixWidth) > sliceDuration) {
- if (newtitle.length * 0.75 < 1)
- break;
- newtitle = newtitle.substring(0, newtitle.length * 0.75);
- elided = true;
- }
-
- if (elided && newtitle.length > 3)
- newtitle = newtitle.substring(0, newtitle.length - 3) + '...';
-
- stringWidthPair = new ElidedStringWidthPair(
- newtitle, this.labelWidth(ctx, newtitle));
- elidedDictForPixWidth.set(sliceDuration, stringWidthPair);
- }
- return stringWidthPair;
- },
-
- quickMeasureText_: function(ctx, text) {
- var w = this.textWidthMap.get(text);
- if (!w) {
- w = ctx.measureText(text).width;
- this.textWidthMap.set(text, w);
- }
- return w;
- },
-
- labelWidth: function(ctx, title) {
- return this.quickMeasureText_(ctx, title) + 2;
- },
-
- labelWidthWorld: function(ctx, title, pixWidth) {
- return this.labelWidth(ctx, title) * pixWidth;
- }
- };
-
- /**
- * A pair representing an elided string and world-coordinate width
- * to draw it.
- * @constructor
- */
- function ElidedStringWidthPair(string, width) {
- this.string = string;
- this.width = width;
- }
-
- return {
- ElidedTitleCache: ElidedTitleCache
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/event_presenter.html b/chromium/third_party/catapult/tracing/tracing/ui/base/event_presenter.html
deleted file mode 100644
index 68497381687..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/event_presenter.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides color scheme related functions.
- */
-tr.exportTo('tr.ui.b', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- var colors = ColorScheme.colors;
- var colorsAsStrings = ColorScheme.colorsAsStrings;
- var numColorsPerVariant = ColorScheme.properties.numColorsPerVariant;
-
- var SelectionState = tr.model.SelectionState;
-
- /**
- * Provides methods to get view values for events.
- */
- var EventPresenter = {
- getSelectableItemColorAsString: function(item) {
- var colorId = item.colorId + this.getColorIdOffset_(item);
- return colorsAsStrings[colorId];
- },
-
- getColorIdOffset_: function(event) {
- return event.selectionState;
- },
-
- getTextColor: function(event) {
- if (event.selectionState === SelectionState.DIMMED)
- return 'rgb(60,60,60)';
- return 'rgb(0,0,0)';
- },
-
- getSliceColorId: function(slice) {
- return slice.colorId + this.getColorIdOffset_(slice);
- },
-
- getSliceAlpha: function(slice, async) {
- var alpha = 1;
- if (async)
- alpha *= 0.3;
- return alpha;
- },
-
- getInstantSliceColor: function(instant) {
- var colorId = instant.colorId + this.getColorIdOffset_(instant);
- return colors[colorId].toStringWithAlphaOverride(1.0);
- },
-
- getObjectInstanceColor: function(instance) {
- var colorId = instance.colorId + this.getColorIdOffset_(instance);
- return colors[colorId].toStringWithAlphaOverride(0.25);
- },
-
- getObjectSnapshotColor: function(snapshot) {
- var colorId =
- snapshot.objectInstance.colorId + this.getColorIdOffset_(snapshot);
- return colors[colorId];
- },
-
- getCounterSeriesColor: function(colorId, selectionState,
- opt_alphaMultiplier) {
- var event = {selectionState: selectionState};
- var c = colors[colorId + this.getColorIdOffset_(event)];
- return c.toStringWithAlphaOverride(
- opt_alphaMultiplier !== undefined ? opt_alphaMultiplier : 1.0);
- },
-
- getBarSnapshotColor: function(snapshot, offset) {
- var colorId =
- (snapshot.objectInstance.colorId + offset) %
- numColorsPerVariant;
- colorId += this.getColorIdOffset_(snapshot);
- return colors[colorId].toStringWithAlphaOverride(1.0);
- }
- };
-
- return {
- EventPresenter: EventPresenter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/fast_rect_renderer.html b/chromium/third_party/catapult/tracing/tracing/ui/base/fast_rect_renderer.html
deleted file mode 100644
index 1729596fc95..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/fast_rect_renderer.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides a mechanism for drawing massive numbers of
- * colored rectangles into a canvas in an efficient manner, provided
- * they are drawn left to right with fixed y and height throughout.
- *
- * The basic idea used here is to fuse subpixel rectangles together so that
- * we never issue a canvas fillRect for them. It turns out Javascript can
- * do this quite efficiently, compared to asking Canvas2D to do the same.
- *
- * A few extra things are done by this class in the name of speed:
- * - Viewport culling: off-viewport rectangles are discarded.
- *
- * - The actual discarding operation is done in world space,
- * e.g. pre-transform.
- *
- * - Rather than expending compute cycles trying to figure out an average
- * color for fused rectangles from css strings, you instead draw using
- * palletized colors. The fused rect color is choosen from the rectangle with
- * the higher alpha value, if equal the max pallete index encountered.
- *
- * Make sure to flush the trackRenderer before finishing drawing in order
- * to commit any queued drawing operations.
- */
-tr.exportTo('tr.ui.b', function() {
-
- /**
- * Creates a fast rect renderer with a specific set of culling rules
- * and color pallette.
- * @param {GraphicsContext2D} ctx Canvas2D drawing context.
- * @param {number} minRectSize Only rectangles with width < minRectSize are
- * considered for merging.
- * @param {number} maxMergeDist Controls how many successive small rectangles
- * can be merged together before issuing a rectangle.
- * @param {Array} pallette The color pallete for drawing. Pallette slots
- * should map to valid Canvas fillStyle strings.
- *
- * @constructor
- */
- function FastRectRenderer(ctx, minRectSize, maxMergeDist, pallette) {
- this.ctx_ = ctx;
- this.minRectSize_ = minRectSize;
- this.maxMergeDist_ = maxMergeDist;
- this.pallette_ = pallette;
- }
-
- FastRectRenderer.prototype = {
- y_: 0,
- h_: 0,
- merging_: false,
- mergeStartX_: 0,
- mergeCurRight_: 0,
- mergedColorId_: 0,
- mergedAlpha_: 0,
-
- /**
- * Changes the y position and height for subsequent fillRect
- * calls. x and width are specifieid on the fillRect calls.
- */
- setYandH: function(y, h) {
- if (this.y_ === y &&
- this.h_ === h)
- return;
- this.flush();
- this.y_ = y;
- this.h_ = h;
- },
-
- /**
- * Fills rectangle at the specified location, if visible. If the
- * rectangle is subpixel, it will be merged with adjacent rectangles.
- * The drawing operation may not take effect until flush is called.
- * @param {number} colorId The color of this rectangle, as an index
- * in the renderer's color pallete.
- * @param {number} alpha The opacity of the rectangle as 0.0-1.0 number.
- */
- fillRect: function(x, w, colorId, alpha) {
- var r = x + w;
- if (w < this.minRectSize_) {
- if (r - this.mergeStartX_ > this.maxMergeDist_)
- this.flush();
- if (!this.merging_) {
- this.merging_ = true;
- this.mergeStartX_ = x;
- this.mergeCurRight_ = r;
- this.mergedColorId_ = colorId;
- this.mergedAlpha_ = alpha;
- } else {
- this.mergeCurRight_ = r;
-
- if (this.mergedAlpha_ < alpha ||
- (this.mergedAlpha_ === alpha && this.mergedColorId_ < colorId)) {
- this.mergedAlpha_ = alpha;
- this.mergedColorId_ = colorId;
- }
- }
- } else {
- if (this.merging_)
- this.flush();
- this.ctx_.fillStyle = this.pallette_[colorId];
- this.ctx_.globalAlpha = alpha;
- this.ctx_.fillRect(x, this.y_, w, this.h_);
- }
- },
-
- /**
- * Commits any pending fillRect operations to the underlying graphics
- * context.
- */
- flush: function() {
- if (this.merging_) {
- this.ctx_.fillStyle = this.pallette_[this.mergedColorId_];
- this.ctx_.globalAlpha = this.mergedAlpha_;
- this.ctx_.fillRect(this.mergeStartX_, this.y_,
- this.mergeCurRight_ - this.mergeStartX_, this.h_);
- this.merging_ = false;
- }
- }
- };
-
- return {
- FastRectRenderer: FastRectRenderer
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/favicons.html b/chromium/third_party/catapult/tracing/tracing/ui/base/favicons.html
deleted file mode 100644
index 866591644aa..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/favicons.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-tr.exportTo('tr.ui.b', function() {
- var FaviconsByHue = {
- blue: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAC4CAYAAABQMybHAAAlrklEQVR4Ae2dCXwdVb3H5265yc3SpEk3ukEXCqVUBLT4Wm19oFKtaN0fKijy9CMguPBarIJsIiA8qsjTh7SllAoFeVBaEARkLV1ooXtL0yRdkqZp9u3uy/v/5uY/OZm75y659+acdnLOnP385zv/+58zZ2YMinTplIAhzsoDceaT2RKUQLwHIMFqh0V2ll0kn4XA6byv9/Vw834kX19e7keRQCzhRyk6bJJYRvD1YTXuhRdeqDj77LPPtNls400mU7HRaCzFFggEVJ/iSqhsicFgKIXUKL6bvB6fz9fj9/u7Kb4bPjaK67Xb7Q0HDhw49IUvfKEd2XUb7WpxHIYvXRgJ8AELkzRso1gmKrwkBfjG7373u5Zly5ZNKS8vn2G1Ws80m83YphPI0wnQUemQFp0IzQR9tdfrxXbI5XId6ujo+PCuu+6qXbNmjYfa9NMmngDoBmt+hIe944M53AUhwqwCvXTp0qJrr732opKSkk8XFhZ+imC+gIAryAZB0QnlJuB3OJ3Ot3p6el5/6KGHttxzzz0O6pse+GEP+3AGnKE2EhgG0tAFt99++4WkoT9tsVgW0DaH4guzAeg4+uD0eDxbaXuDNPzrt9xyy3bS8G4qB8BF6OOoKr+yDDfAB0B91VVXFf72t7+9lLT05QUFBZfQoYWtnA+ux+12v0ra/W+/+tWvXlq5cqWTBjUsYR8OgDPU8KGtjR9++OHHx4wZ8+2ioqKv0X4lbfnsWh0Ox9+bmprWzpgxYxsNFBpd1Op5bcbkM+AMtgr11q1bTz/zzDP/gy4Qv02zGtPzmehIY6MZmmq6UF176NChJ+bMmXOkD3QR9khFczY+HwEXwTbV1NTMI229FCYIXSTm43gTho8uUgMwYUir3zN16tR3qAIfbXkJej4dcIxF1dbkm44ePfqZqqqqpTT7MZf2pYsgAZqN2dTS0nLP5MmTX6EsDDrDHqFU7kTnA+Aa2BMmTDBv2bLliyNHjlxCZsgFuXMYhr6nZL7saGtru/eiiy7aUF9f76UeAfKcBz2XAUffVbgJbAuB/Y3KysoldONl5tDjkrs9oBtL+1tbWwH6UwS6/mZSzg0sVwHXTJG9e/deOGXKlOWksS/MOelncYdJo2+vra396axZs7ZTN0XTJYt7Hdq1XANc1dg0DNOqVatGLl68+DZa/3E1XTwCeOn6JLCly6ncU9+mNLnBZRLOYPAHHI5H2l5/8TdHbl3SRjUx6DkztZgrgKOfDLf5xIkT36moqLiLzJG0rAFJAomsKDp1W51S74IZnSIX8DcrXV3LlK/Oe5xqZPsckGc96LkAOPpowrZ79+5ZNK31BzkzQtKI4qxvV0dJTSLJ592kHKu7QfnPxXupFmhzbFkNeTb/tGsae/bs2Va6wr/lrLPO2izhTgLQZIuaaMp1yvTNyvNbb1HomFB1ZtrAUNYqymztGMNt2rhx44T58+evohs1n0r2+AyX8mnT4KIAvZ63lA82f1/55TX1FJ21tnk2As4zJObq6urP0BTgCmlri2TFDmcEcHQDtnlz4w+Uyz+Hm0Rsm2PuPGtcNpkomtZesGBBYXNz8210d+05CXfWsBLaEQNd5I+e8JyyYettCh0zyoBrpawyWbJFg2twv/jiixPnzZu3mhZFzQ2VqIyJRwIZ0+BiZzyeTcqebVcqS350nKKzxmTJBsDRB3WWZN++fXPpps060tpVouxkODEJDAng6GIg0KI0Hv+mcsXnN9FeVsyyDLWJwnCbadXfomnTpm2UcCcGc1blNhiqlNMmblT+9soi6hdmWKC4hlSJDiXgaBsCsNDKvysnTpz4JIWLaJMupyVgKFLGjHtSefrNK2kYFtpwjIeMs6FqWIOb7kr+Yty4cX+m2+0446XLBwkESHuPrPqz8uymX9BwhhTyoQBchZseQiigdcj30grAO+SDCPlAtW4MeLikdMQdyvqt9yp0rCl1SDR5pgFX4V64cGERvdhmRWlp6XU6scjdfJNAcfF1ysqNK5Q5C2F+ZhzyTF4AqHCPGjXKSjdwHqUHfr+ab8cyW8YzZLMo0QTgcj2jfO/S7ynNzS7KxtOI0UqkJC1TGlyFm3pccPDgwfsk3Ck5drlVidX6VWXFxvvAAG0Z0+SZAJzhtjQ2Ni6ld5D8KLeOjOxtyiRgK/6R8uy7S6m+jF14phtwmEBow3L8+PGr6FnJm1MmLFlRbkqgtOxm5am3rgITtIGNtJrJ6QQcHcdPkYUuKL9MsybLKSydlICijKxcrjz+0pdJFKzJ0wZ5ugBnuM27du2aT7ffV9JUIGCXTkqAJEAsjJ2wQlm1fj7tpPWOZzoAB9yo1/zSSy/NoLdJraMwFsdLJyUgSqBQGX/GOuX+FTMoEpCDmZRr8nQBbqIHgovnzp27mtaWlImjkmEpAU0CYGPmR1crF19cTHH4hU854KmuECcMOmo9derUAyNGjLiawtJlWAJZOQ8eTQb27keUyz7xM8qS8jnyVGpwNk0s+/fv/4qEO9oRlWkDJGArvVpZ89JXKC7lMyupApzhNm/YsGH6GWec8eCAAcgdKYFYEhhz2oPK3X+ZTtlSao+nEnDzxWRL0eNmj0q7O9bRlOkhEoA9ft6cR5WPq/Y4IE+J+ZyKSjS7m56jvK+srEzeqQw5epmNyDkbXBRPT8//Kl++6EaKSok9nqwG10yTHTt2fJpWB0q4xYMlw4lLoJhu5z/y3KepYEpMlWQBV7U3mSXFNN99H71YPfEByRJSAqIEwND4yfcpFyzgqcOkGE2mMGtvy2OPPXY9vZjnTLGfMiwlMGgJWCxnKktv/QmVT3pWZbCAM9zmxx9//IzRo0fj0STppARSJ4HykTcqN//3GVRhUqZKMoCrC6no6Zy7yTSxpW5ksiYpAZKA0WhTPj73dxRKakHWYABn7W3Zs2cPvjH5eXlApATSIoGi4i8oK56/tA9ysAr2EnKDARxlzJdddlkJ3dC5N6HWZGYpgUQlMH7SvbRWpYSKsamSUA2JAs7a2/ynP/3pOvrc9eSEWpOZpQQSlYDZPFn54a/xcDoDnpAWTxRw5DfRJ7DL6HUPP060rzK/lMCgJFA+8sfKZd/CqlRc9yXEbCKZWXtbli1b9gN6EX3loDorC0kJJCoBk6lS+ebVP6BiCU8bJgI48ppxU2fs2LHXJNpHmV9KICkJVFZdo3zsY7j5w6ZKXNXFCzhrb/PDDz/8HbK9x8ZVu8wkJZAqCZjNY5Wf3vkdqo4Bj8sWjxdw5DPRt3KKTjvtNNxhkk5KIPMSqBz1E2Xq7ITekBUP4Ky9LevWrfsGae9JmR+ZbFFKgCRgLpik3HL3NygUty0eD+Cq9h4/fnwBbTdIQUsJDKkERo+9QSkr47ubMfmNlQHaG5v56aef/ndaUDVtSAcnG5cSMFumKXc/fDGYpI35jCiXeADH3KOZ7lp+Sy6HjShHmZApCWA57dgJ3wKTtIFNQB7RxQIc6abLL7+cniEesTBiLTJBSiCTEiguWah8/isjqEkAHpXhaIk4M5BuXrp06ZfoOUtcvUonJTD0EjCaipSvff9L1JGYU4bRAEeaCjh9P+fr0jwZ+uMqe9AnAZgpo0Z/nfYY8IgcR0qA9sZmeuCBBybZbLZ/66taelIC2SEBKzF5zTJMWbMdDl5DXDTAVe29aNGib5D2jpQvpEIZISWQEQkYicm5C0QtnjDg6uwJPY72tYx0WDYiJZCoBMorGXDW4iE1hNPMOBMQb1qzZs0MmvueHlJKRmS1BCZYYZoOA2exTFd+dT/eTsuzKSFaPJwkNMDPO++8+fLiMvdA+Z8JJcqPN+9RGnocoZ0PBELjFF2cbjdYIEykvq4wWehd4APb05dBari4gaWCe/p8AT+uFOdT4j7aoJTB7oAGowFurqqqmicBV5QPmgLKX3b7lVbHANmRLLPVVSjnGT6hzFRa44dHHEqIHhQThXC8+YQiqQ66K9rnvakoD1O9DPiAJvSAo8vYjMXFxWZ6U9VFA3IP052fv+5VGntzBW4+SCYl4KtQ/L3tpCBJ0+WpC/hKLgKrvb29DDj41Q4WIvUOcaZHH310lslkGqlPHI77uQd38CgZTBbSVBVKXk+CGYwjS758/ywwS1sIz/oI1uCmmTNnflKaJ7l/OmuQG3migQ9xnvg0W2gaN/2TfYDzoLQDFw5wVYOT/T1XAq7JKacDKuS2csVg1B/unB6W2nkwaiiumEs7rMEBueZEG5zpN9Gt+QKyv+douWQg5yXAkPvtHYO78MxiCZisJXNsVRML7C3HndRN5li1w/WnNPaNDz744Ll0ZpRm8Zhk1wYhAYacjPJBlM7eIgHFUFryxZvPpR6q/Io9DavBJ0yYcJY0T0Qx5U84CDnNrtjb82dQZHqZysefRQPaRltEDc4JRlr7PS1/Ri9HopeAwWRWjLYKQiF/NLnBWgpmocGZY3XYoomCBOybaPXgNKnBVfnk7R8V8qLyvIAcrBoLiqaCXdoYcvXYMeB8KmPfSIBPUVPln7yWQD/kjEEOD7fABsBVfvtGoTIdYoOPHDnSXFhYODmHhyq7noAEgpCPUPyOTiql3QBMoIbsyGo0F04uInYdbW3RTZRbb711AnXZmh3dlr3IhAQYcpooz0RzaWmDTk1r0YLrwS4GwRaJuoMGmXrjOeecI5fHQiLDzKmQF9ILXFXIGYfc8q2jZ4JdBlyFnE9ZHolx1KhR8gJzmMHNw9Ugz8U7nrijWToyZCZFtMEBu7GoqGgiD1j6w08CKuTWUsXv6s65O56GApVdlWM+cnoNbqB3D+JzEdINYwkw5DlnkxvNYJetEdVEETU4Ioy0RLZEzoEPY7r7hh6EvIQ0eQ/FZP/sCpilPgNwKG0VbgyFdzTqCXC8ZFw6KQEAoxgLS3NoPbkR7GosIyxqcBxSgwQcYpCOJWDAOnIrKUbS5AH9M5GcKUt8OiEZcK1HbIMjQiVfAq7JRgb6JADIDQR5tpuuAaMGuGaisAbXIiTgkutwEujX5L2UnJ02uSEIOHdfZVpqcBaH9GNKIKjJQ6yAmOUylYHsa+6cprBZg3MfpA3OkpB+WAkENXmxEnDbs2+e3KABrvU9RINTih56LbMMSAlAAqomL7BRQFOU2SGYgMouOqV1jGHWIrxer50+8iofV8uOQ5a1vVA1OUEecOPtWdlhkxsUH/2saE5lmufBtVifz4erCOmkBGJKIKjJ8V0ETT/GLJPODAG/X8+uOg+O0087BaHB09kJWXd+SSCoyYuUgIceaB/qeXL/AA2uci3a4JB8QGrw/AIwE6NRNbmlcMht8oBftT40ZY2xsw2OsJogAYcopEtUAqomt5Am9w6dJg8ENPNagzysBs/2W7KJCl/mz4wE8OYsg3loNLnKbNAG1+DGqFmDI1LdpA2eGRjytRX19XAEecDr6kMqcyM1BNTrR41ltCxqcAYc6yOlkxIYtASCmhyP9WZ2doVmUXhtL1hWHWtw3lccDkcb1H22L6zROiwDWSmBoCa39mnyDHSRmPV7nG36lliDs1r3t7e31+kzyX0pgcFIQNPkGbrj6be3gV287Z95Vk0U7MCpkdXV1bXyIjMoEPk3eQmokJsKglOIAD1tm6J4Wo7UMsd9PQ+wBse+CvgzzzwjAe+TjvRSIwGGnB4qS02F4WohE8W58zk94CGzKP6XX3652+VyNdN6lFHh6pFxUgKDkQAgDygWxeDzDKZ47DJeV3PvvtfpVQChJgoKs80C+8Xf09NzRJopEIt0qZQAIFfou0GpXoUIVv0uxxHqq8ov+cxzyDShmsFut9elcmCyLikBloAKuZEm71Jsi/vdKrMi4GqTbIMz8cjgw0yK1OB8SKSfagkMgDwVlZMGDzg6oJR9tIFh5lmzwdEMR/pPnjxZiwjppATSJQHVJg/QRaffm3wT9Gvg624GswPgRsXhNLh//fr1u2nRFYCXTkogbRJQbybCXEl2diXgCzh2bthNFQHwAZAz4BgEgEaijz4C29zZ2VkjzRSIRbp0SiAIOT7MgCnExDeyThS/s7uma+vaZqpANFHUbusBZ8i9ra2tWyXgqozknzRLQIMcF56JOiLc19O6lYrB1hmgvVGVCDj2VQ1Ovq+mpmaLBBwikS4TElAhx7vJE55dIWhb6rZQH6G9WYNrXRYBh/ZmDe5buXLlVj85LacMSAmkWQIa5Im0Q4x2bXkUGpzhZo7VWsIBrp4JGzZsaCc7/KDU4olIW+ZNVgL9kMe2x4P2d+dB+86X8NFP1uARAUffWIPDnvHSdOE2CTjEIl0mJRCEPA57nAj3dzXj468qr+SzDa51V9TgiGTAcTZ4yQ7fLAHXZCUDGZSABnlUm5wgba3dDFZpE00Uraf6Bx5YveNM8C5fvnzbJZdc4iwuLqYH7Yavq+ytURq70rRIKIvEGlmZAYswDjZCRBchLUJ0ULeGqYzaQL8AfEj/PA5nz8u/Zw3O2ntAC+EAR0bVnnn33Xe7Gxsb35gyZcqlxhR9mGj/oU7liWfrlPZOd5jRZGfUbK9bmUnPGIYIeEB3B8i1PyUKBHTo+vPFEYrcfpR6orYfR6NZmiUQ8Cs9XU1vbDiyEysI2f5myLVe6wFHAqSlanDyPTt37nz+9NNPTxngv/3DHqW5lV4tkGPO67ErPi+9pgw/mYAGfjyO8zJo+vL6dH2dmc6vb1/fP31/9Pn1+7HK69P15fXt9eUP+LxKR/OB5yk7flrFOfABNehtcCSKgHuvu+66t2n5bGtk7TGgvpg7uQg3BmW22BSTGa8pIwehx+s4L3wxzOXFOM4j+sjHecSwmEcMi3nEsJhHDIt5ENY75IXjMhxWI+P4E6u8Pp3bYV/fHsWDRb/f1Vq3b9XblBzxAhNFowEOte+hlYWO+vr6f6QKcDSaq06F3FQYdeUEow9fDGfLmMU+ieFI/RPziOFU5Y9UT/T4gOJ2tP/D7e7Bmz+hwcNeYKKOcIAjHiaKZqa8+uqr6+l9KYgf9g6QG/sgxwHXbxAQgyCG9fmGal/skxiO1B8xjxhOVf5I9USLV8j+7mjd/Rz1RzRPwGuIiwQ4zBScFaDas3Tp0r0dHR2HpRYPyo8hD+7Jv5mUABj0eeyHjx58Yh+1y4CDVTAb4qIBzpCjEjfNiW+Qd+775dcPeTRdI9NCf+OSlQl98M3RvAFM0sbmCVhNCHAcSah8TYuvXr16PT2MjAql65OAapPjXXzRnP4iCnk5Llw5ToMvhsPlzYU4cQxiOFLfxTxiuC+/3+/xNB9/cz3tito7rHmCIpE0ONJwRrAd7l61alXjkSNHXpBaHKLpd5hZMfELJ3FA9Buy8oESw/p8vC/mEcOcnmu+OAYxHGkcYh4xTPlx38DtaHnhZP3rjZQEDR5xehBF4eIFXDVT1q5d+whp8YhnS7DK4fdXhdyEd/FJl04J+ANef3PDpkeoDTZPkgIcfR2gxe+7776aY8eO/VNq8dDD2A95sjamLE8/eSTggRsuLj2Otn821D5fQ4lxaW8cpWgaHOnQ1pqZQmHXU0899VePxxPWoEeB4ewYchwadhzmw4V4jhPDnJ6oL9YhhuOtRywjhuMtr88n1iGGOZ8YJ4Y5PZKv+H2BthOb/0pl8F5mEfCoFkUswNEHVICLTdVMufPOOw+QFn9TanGIJtTBHjeSucIHCjkQZsfhSOmcL14/2fqSLa/vZ6z6YqXr68M+1p24nK1vHq3++wHaZfMETEaFG2XjARzaWgOcwq4XX3zxYdLiKC9dGAkw5Pqf2czso0OMkRhGXG5u9N5vpb3p/YdpAKy9AR+YjGlJxAs4a3GcPa4lS5bsOnHixGapxUkaEVwQcnqrasYdw80wowMcl/HOJN0gtLfb1bH5yMHHd1FlDDhr75QAjk6yFsdVKyB3bty48UE5owLRRHYa5JgSY8dhniZDPMeJYU5P1BfrEMOR6hHzIBzLcV8j1aePR31cRgxzPjFODPel+xWvv6N5x4OUhCWoYA8MxqW9KV9cJgryAXBocQbcdeONN+6kd4k/J9eoQDyRnQq5se+Fk3yg2UcxDvcdULUmjotcbeQULhtvffr8XC6Sj5a5TORe9KdwXq5PXz5KOn0WUHH2nnyudt/qnVSMtXfMqcH+xuMHHGVYi6sXm2jwpptuWk4PJrfLNSqiSEPDGuShSTImggTUNSdee/uxA2uXUxaGO27bm6uNxwbnvKzF8fOABp2vvfZa89atW/8oLzhZRJF9zVyJnEWmCBKgb14qPZ01f2xv3o03VsE8AXNx295cVSKAo4yoxVXIFy9e/Aw91rZLXnCySCP7Jpo+NNLnPMQvHXAYfjz/UDuXEcNcVowTw5yeal9sQwxHakfMI4bF/HhiyuPq2LV/293PUB6GO2HtjfoHA7g4o4LGnWvWrLnL6XT6pKkCkUZ3gNxAL4HnA4rcCMfrOG+k8rHS420n3nyJthcrPxgK+D2+5oa37qI+qHyRj4vLhLU3xpAo4CjDgOOMUrX4HXfcse/AgQPr6I20SJcuhgQYcvVijS++pN938RpQHD0n1h378Cms99Zrb7CXkBsM4GiAIVenDGnfccMNNzzU0tLSKE2V+OSvmiuYXZFOkwDmvD2e7saa/X99iCLxOBoAF7W3ljfewGABZ1ucpw2d7733XusTTzxxE33+xCNNlfjED3vcqELON2WGr0+WCS03cXtaTmy6qbutppUkyHAnNO+tl/xgAUc9DLmmxWnacAeB/hDdANK3I/cjSCAIebi3d0QokKfRZHcrvZ01D9XtW72DhqjX3mBtUC5ZwGGqaFqcws5LL7109dGjR9+WN4DiPx7DHXLc0HE5Wt7es/m21WCob4PiTOimTjiJJwM46gPg2PiCE2ee/Wc/+9lvyB5vkvY4SSNO12+uxFkgT7LB7vZ6uptq9678DQ3JThsYggkAppgvCg7OJQs4WkUnMH2CMw6dc9ANoJNPPvnkL8ke90p7nCQSpzPS9CFscryHbzhsEEvA7/a2NLzzy46WXSdpV+WH/KQuLFEvu1QAzrY4mypqJ+lVE9u3bdv2Z9jjEnIWd2wfkBsM+W+T9813093K6j/X7l+9nSQjwp3UhaUo5VQAjvoY8gGmysKFC1fSgqxX3G6ckNLFKwEVcu3rY/k5swK729Hb9Mqed29fSXLRmyawCAZ9YSnKOVWAo06GHDTjQgGdti9atOjXdNH5noScpJGAU00VI74+ln+OXv2gOJ0t7x3cduevaXQqJ+TztGDK4IbkUg24aI+rkNNXIrquuOKKG+kBiYNyURZEHr/LR8j99OFXt6v94KH377/R4WjtImkAcBFuMJQS7Q1Jp0NFoHNiBw0Eube2tnbT/PnzFzz3UtMIA76mJV1cEjAYcIhInLgTkuMOZonH3XW8dvdff9zZur+JhtNLGwMO8zal2hviSgfgqBduAOhki7u6u7u3NHWO+yxNidkk5EEhxfM3CHmfSHN0zQq98Fjxunta6w+v+9GphneO0Wj0cKdUc7Nc0wW4qG608AcffNBrMlvfLx0x5XMGo7lAQs6HIbbfLytNnLELZUkOrO2mF2b2nDz64rX1hzccpG7p4YbmBuApd+kCHB3lI8G+2vnOlr0dBYVV+4tKxl1MswWW/gOX8rHlXYUsq+C8ChaeZv8/vOqYvo5hb2l48+d1+9fiNrwId8rmuyMd7HQCLrYJyDXQ20/tOGUxF+6wlU1aYDQWFPGBEwvIcHgJ9MtKE2f4jFkQq9rcnu72xrp//OTIgccx181wY8477XBDBJkGXAO9o2VPm+JzbioZMXWewVRQ2n/g0C3poklgoKyyc57cTxeUXnfHCVrXfU1D7fr9NJ4e2gA4w530OpNoMuK0TAGO9ljlaJB3tVd3u1yNb5ZVzPy40Wyt7L+Y4u5JP5IE+iFnsUbKmfl4zHN7nG3VdXtWXNvU8GYd9QBgZxxujDyTgKM9OAZc9e1dDY6ejoOvl1fNnm0yFY1TaApR/QhoMK/8G0UCGuQGEmUWKHK83jhA89z0gvoPDu1cfn1b864T1H29WZIRzc1iyzTgA+CmTqj7Lkeru6156xsVoy+cQk+fn44DJyHnQxTd1yBXRRk9bzpTsSrQ7/MoLvvJN/a/d9uSno5jLdQew40bOVghmFG4Md5MA4424UJA97rtvub6f71VPupcq9lSNttgNBLj8oZQUFzR/w6UU+ZVOeD2eV2B3u7ax/a9e/PvXI7OTuqxCDcuKDMON6Q2VICjbYacJ/jpHYte/8mjr35gtVUdLCwaPYfmyunDlFKbQ1ixXBByiDRzTl0RGPBiPXd7S8Pbyw68d+/TdAz5YlK8QzkkcEMSQwk42mfI4Wugt53c3uB0nHyttHz6THo4dywOnjRZIK7ojiHPxOw4lg4EYJI4mnfW7V95ff3h9bupd9DarLlhkohTgZk9+/pElS2AA27eVOjt3fW9p4699kr5qFkmc0HZR6TJ0nfEYngDzZUYmQeZrN6ZhEnSeXj1nk2/vr2nsw5vn4LGZrj1i6cG2VLyxYYacIyAz2zW4hro9HPnO3nstZ2FhZX7Cm1j5tCDAEWkyqU2j3HctV+7FJvjWE+CWRKvt6utpeGtX+7f/vv/6zNJGG7McfPFZNpuv8cY/oDkbAAcHRIhF0FXw21N2084HfWv2UonjaHPhEwJaikJ+oAjqdvRINfFD2ZXfSILF5I+Fz2kUP/akT0rlhyv2bCX6mKNDcD1N3CgqIbc4RzPJof+YOoEJx7eioNPl+FDlHSxqdgQnj77h5+oGPeJXxQUlE3Cg7qZ+EmmdnPWYYYjGRec/nMrbnfnsbaT2+6v2f3wZqoPJghDzVOAvNwVDbLCSqbplJTNNsAxKP5hBeR4OBGfSQDkDHpRYWFFyYzzf/Gd4oqpV5JGt+IZxlRqLGorr1zwmdjEmOMZEp/X4erpqFld/f4Djzud7ZghgabGBrDZ1sYsCa/lTqwhKphOly0min6MLCT42KAV2Kbzeb1Ob9Pxf+32utteLSqZOJ4++jRJmi16Efbv95/8rDsi++pzFX3mCM1kvXPkw7X/Vbd31eskc3H6D9pbhBvHJ7mfiv7upjSUjRpcHCD6xyYLa3PW6DBbVM0+4/yffKq88iPXmq0jJuOdf/J2vyjC/nBQk/fviyHRzva6u462N+96qHrng29RHtbUrLUx9cc3bljpsEISq8yKcLYDzkIC5Aw6bHNAzva5CrnZbC6c/pHrLykbefYVZmv5NAk6iy66PwBsV8fhrrYDj1Xv+uOr9GYyBpt9ntcWbe2s1NriiHMFcPSZtTlAhzZn0AE4ww7fOuP86z45ovLcKyzWkecEL0RN0kYnwYguaGP78MJLetl8277O1j2Pffj+n96mPAAZG8BmHxobYPMdSYCdtVqb+qa5XAKcO40+49qBQYc2Z42uAk77qj919tUfqxh1wZXWosrz6cEKslxQbPhOLwZNFKz4I7D9broL2fp+e/OO1TW7H3mPBMNgi75ojgBqvpCkYG64XAQckkW/sYlmCzQ6Ty2KoBeccc53Z5eP/uiXrIWjFpjNRTaD+no0FM1/2DWo6cIRb3D1eh12l7P5jY5TH6yv27cGt9cBsQg1wtDWvIl2dk5obeq75nIVcB4AQ86gs+nCoLNmV7V8YcnY4ikzvr3ANuKMz1mLqi4k0E3q+7nVu6OoIn+cOv9NUyJ4+ACfBKG3t263d9a9XPvh2jecPSdxg4a1M4BmyBlqnvaD1s4ZcyTc0ct1wHlMetBhi7CNziYM+6qmrzrtwtHjJi/6rK1k/OfoiblpAJ1hz0XNzpoai6AANTafu/uwvafh5cajG//ZcmL7KZIJA8xwiz7SoK1ZY+c02DQO1eUL4OJ4grZH0E6HRmetDsAZetE3T5q6eHr5mPPmWQurzjcXls8i0K20VFcx4iWYeA9JFpoyA4CmJatYI0JQu7zOjr0uZ8v7HU073zlW82w1dR7aGPAC5nA+0llj8z2HnDNFaAxhXb4BzoMMUtlvo0Ojs1bXA69qdEqHby4sLLeOm7p4Vln5tAsshRXnFxSMOJseirbgAhXPjAZvmrDYgn7/jRRuPjV+EGLUxbzRBSKWqdJ7RnChGKBPftAt9AMeZ/v7XR2HdzTWPLvX6eyAycFQA2jeGHBOY23NGhuNcEMUzA/HRyo/RhM6ChF0aHbRVhe1O0POceybiovH28ZNW/SR4pJJ55oLiieZzLZJJottPFY2BoHHWnWAT1Wr0owkUn18JJYoHv9xUQiQNd/roJfnNPi89mNed++x3p5jexoPb9zV29uAu4qAlDUx+ww2fI6Dz0CL9nWkzlD23HZ6qef2aKL3HmNl84VBZ83OQEfyOR98lDWOnjB3dFnFOZOttjGTLIWlk81m20RaMlBpUEw2Ay2QoRPARg1SffQXF7F9vtpFaOEgxbSrhuhDAV57gBZ+BBSf3e9ztXq99uMeZ/dRl73pWFf7vqOn6jfBhmYoRe0rwhsuLOZlu5p9tTv5/Gc4Ac7HEWMWN4ZW9AE6Q83Q8z6fHKKvQq+r10DmjrmoZEKx1Ta6yGItK7aYy7AiUvF4u+weV1evy37K4eip7yWzAmBCi4obwwyfta7oI8xAM8TYF/NwWbHevNXWNPYQNxwBF4Uggo4wg8q+CL0IuAg350Ec18H1oi0xjH3RMXiI4zBrVwZcDyxDy1DzPudnn+tjX2x32IQhfOmCEmBZMJDwGXQxLMYBbqSxz5AjDg4+b7wPH9DBMXz6fUCKOEAs+gwv+0gTw9jHBsd+cG+Y/uUDMUyHH3XYLBsGNJIvQq3PgwbEesQGGUDRR1i/Mez6eHEf9WJfOp0EWPi6aLkbQQIsLwYZ2aLFiekRqhwAJkPK8KJMtLhIdcr4PgnwwZECSU4Cejnq91G7Po7BFVvWx+n3xbwyHIcE/h9VLWRYHWXC/QAAAABJRU5ErkJggg==', // @suppress longLineCheck
-
- green: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAC4CAYAAABQMybHAAAltklEQVR4Ae2dCXQcxZnHR3NoNDp8SD7kU7bxFXCchBhMYoLNmhCcOBBykGw2gYTkPV6AhGXD2sTZJQcJG3jsgw3hscuCsTEsOAQW1sbY+MAHxpYtHzI+5EOy5UMStnWPZkZzab9/j75WTWt6NKO5Z6r82lVdXV1d9e/ffPq6uro7zyBDIhXIi7DyngjLyWJRKhDpCYiy2pwoztrpxSwCb+d1bayFm9f1Yu3+cj2MAgOJH2bXnNnEGiHWppW8d999d/inPvWp6YWFheNMJlOR0WgswdLT06PElFdM+xbn5eWVQDXK76TI7vP57H6/v5PyOxFjobwuh8Nx4dixYye+9rWvtaK4ZqFVNY/TiGUIoQCfsBCbcjaLNVHgJRUQG3/4wx9ali1bNmXYsGEzrFbrdLPZjGUagTyNAB2ZCLXoh3CJoD/p9XqxnOju7j7R1tZ2/LHHHqtbtWqVh47pp0X8AaAZbPmRzvnAJzPXhRBhVoBeunSp7b777ruuuLj4xoKCghsI5s8TcPnpIBT9oNwE/D6Xy7Xdbrd/8Oyzz+5+/PHHndQ2LfA5D3suA85QGwmMPLLQ+b///e/nkIW+0WKxLKBlLuUXpAPQEbTB5fF4KmnZShb+g0ceeaSKLLyb9gPgIvQRVJVdRXIN8CCo77777oI//vGPt5CV/n5+fv5NdGrhK2dDsLvd7k1k3f/n17/+9frly5e7qFM5CXsuAM5QI4a1Nh4/fvza0aNH/4PNZvs2rZfRks2h2el0/u2TTz55dcaMGXuoo7DoolXPajcmmwFnsBWoKysrJ02fPv3v6QLxH2hUY1o2E63XNxqhOUkXqq+eOHHitblz557pBV2EXW/XjM3PRsBFsE21tbXXk7VeCheELhKzsb9Rw0cXqT1wYciqP37FFVd8SBX4aMlK0LPphKMvirWm2FRfX//lESNGLKXRj3m0LoOOAjQas/Py5cuPV1RUbKQiDDrDrrNX5mRnA+Aq2OPHjzfv3r3766WlpUvIDfl85pyG1LeU3Jd9LS0tT1x33XVrzp8/76UWAfKMBz2TAUfbFbgJbAuBfUdZWdkSuvFyZepxydwW0I2lo83NzQD9rwS69mZSxnUsUwFXXZHDhw/PmTJlytNksedknPpp3GCy6FV1dXX/OGvWrCpqpui6pHGr+zct0wBXLDZ1w/TSSy+V3n777b+j+R8/pYtHAC9DrwIO9xHD5c5XDF5fS0ya0MWo3+nwvrBx47nfLLlvKypj0DNmaDFTAEc7GW5zQ0PDD4YPH/4YuSMJmQMSExVpsPPxhjsMHt/FuLWkp8dwqb3dt2zhnD2vUKXsnwPytAc9EwBHG01YDh06NIuGtf5DjoyQGmHC4XMLwmwd/Caft2fnmXr3A3d8Zf9hqgXWHEtaQ57Of9pViz179mwrXeE/MnPmzF0S7sEDGuueJnPevCuusO76sPq6R2bPHm2l+sy0gKG0NZTp2jCG27R27drx8+fPf4lu1NwQ6wnKlf0TZcFF/bwe//Z9uxw/vvfuj89Tftr65ukIOI+QmE+ePPllGgJ8UfraIloDp5MBOFoB37zxQvdPvr5gP24SsW+OsfO0CenkoqhWe8GCBQWXLl36Hd1de1vCnTas9GtIXp5h5LgJ1re3H7z2dwsWjMTUYlwrpZXLki4WXIV73bp1E66//vqVNClK3mLvh1RkGcmy4GJr3B7/zkOVXXfd86PD5yg/bVyWdAAcbVBGSY4cOTKPbtqsJqs9QhRPpqNTIBWAo4U0l+1yw1nXd29duH8nrabFKEuqXRSG20yz/hZPnTp1rYQ7OpjTqTRNUhwxtsK69t3tcxZTuzDCAsOVUiOaSsBxbAhgoZl/d02YMOF1SttokSGDFSCabeVj819/v3LOXdQNCy04xynjLFUHVuGmu5K/HDNmzHN0ux2/eBmyQoEe84gRluc2V13zS+pOSiFPBeAK3PQQQj7NQ36CZgA+Kh9EyAqqgzpBQ4h5w4aZH6URlidwrmljSix5sgFX4F60aJGNXmzzYklJyf1BqsiVrFOgqNh0/5ubJr24aFEp3M+kQ57MCwAF7pEjR1rpBs4KeuD3W1l3NtOkQ6kaRQnXfZfL/+Y3bqz7Ed3f6KZyPIwYbpe4bEuWBVfgphbn19TUPCnhjsu5y6hKCgqM33pr4+QnwQAtSbPkyQCc4bY0NjYupXeQ3JNRZ0Y2Nm4KFBab7tlSdc1SqjBpF56JBhwuEI5hOXfu3N30rOS/xk0tWVFGKjB0mPlfN1bOuRtM0AI2EuomJxJwNBx/iix0QfkNupJ+mtIySAUMpSPyn16z5fPfICnYkicM8kQBznCbq6ur59Pt9+U0FAjYZZAK4J6+aczE/BffWn/1fJIjoXc8EwE44Ea95vXr18+gt0mtpjQmx8sgFVAVIEgKJkzJX/2fq66aQZmAHMzE3ZInCnATPRBcNG/evJU0t2SI2iuZkAoIChiNeUM+O6d45cLbxxVRNv7Cxx3weFeIHwwaar148eJTQ4cO/SmlZUiyAuk4Dh5Ogs5O3wsLPrfnQSoT9zHyeFpw/FhQn+Xo0aPflHCHO6Vym6hASYnpp29v+dw3wQ4tYChuhjdegDPc5jVr1kybPHnyM2IHZFoqMJAC48Zbn/nzi1dNo3Jx9cfjCbh54cKFRfS42Qrpdw90OuV2rQLwx6/9QvGKhQsVfxyQx8WKx6MS/EgUv5vmGTw5ZMgQeadSe/aSvJ5pPrgoj73D91/zr97zEOXFxR+P1YKrrsm+fftupNmBEm7xbMl01AoUlRjvWb1u9o20Y1xclVgBV6w3uSVFNN79JL3LLuoOyR2kAqICYKhisu3JBQvG8tBhTIzGsjNbb8vLL7/8C3oxz3SxoTItFRisAhaLcfqyP435Oe0f86jKYAFnuM2vvPLK5FGjRuHRJBmkAnFToLTM8tCfnpk5mSqMyVWJBXBcWFro6Zw/0Z+Vwrj1TFYkFSAFwNQX5w/5N0rGNCFrMICz9bZ8/PHH+MbkV+UZkQokQoGiQtPX/rb+M7f0Qg5WwV5UYTCAYx/zrbfeWkw3dJ6I6miysFQgSgXGV9ieWHjrqGLajV2VqGqIFnC23ua//OUv99PnriuiOposLBWIUgGLJa9iya8q8HA6Ax6VFY8WcJQ30Sewh9DrHn4WZVtlcanAoBQYXmr62fe+NwGzUnHdFxWz0RRm621ZtmzZT+hF9GWDaq3cSSoQpQImU17ZnfeO+gntFvWwYTSAo6wZN3XKy8vvjbKNsrhUICYFykZa7r1mwUjc/GFXJaL6IgWcrbf5+eef/wH53uUR1S4LSQXipIDZklf+m99N/AFVx4BH5ItHCjjKmehbObaxY8fiDpMMUoGkK0BW/OezZxdH9YasSABn621ZvXr1HWS9Jya9Z/KAUgFSID8/b+KjT02/g5IR++KRAK5Y73HjxuXT8oBUWiqQSgVGlVseoCnZfHdzQH4HKgDrjcX8xhtv/B1NqJqays7JY0sFLPl5U59bVbEQTNLCfOoKEwngGHs0013L78npsLo6yg1JUgAMjhlb8D0wSQvYBOS6YSDAsd30/e9/n54hHrpItxa5QSqQRAWKh5gWffWbY4bSIQF4WIbDbcQvA9vNS5cuvY2es8TVqwxSgZQrYDQabHffU34bNWTAIcNwgGObAjh9P+c70j1J+XmVDehVACyOLs//Dq0y4Loc621g59301FNPTSwsLPyiVFcqkE4K2ArzvvjPv52GIWv2w0P64uEAV6z34sWL76BfjF65dOqzbEsOKQAm5/9diWjFowZcGT2hx9G+nUO6ya5mkAL0WBsDzla8X+tDWWa+uDStWrVqBo19T+u3l8xIawUsplFp3b54NY7mik/703/MxNtpeTSlnxWHk64NKuCf/exn58uLS6086b8+3Pqg4WDNHw0O5yf9Gkuf9+sX6N3twXmaVWwMkUWv+Q7eLVShHk1mv310Kg9Vrt/h/PStQoN/PlVxhBYYa7AbVCwc4PQxzxHXS8ANhkZ7jaGq8W8Gh6ed9MuM4C2ebrD7Jhp6CIJsDr481/UGw4nnqY8MeFB3tYDjF6BY8KKiIjO9qeq6oNI5urL+1L8bOt2XM673PrPf4OjwZDXk/p6e68BqV1cXAx5kxUP54MgzrVixYpbJZCrNuLOagAZnItyQwWQ2GgppXlKeEec8OwON75V+/YErZlHv2A8P6qieBTddeeWVX5LuSZBWGbnCkDs7PQa/PyO7EL7RZI5HTCj+EhXaTwt7IKpfprXgintCBU3kf8+TgIfXNlO2AnJbicVAt7izLoBR2xDLPOoYW/CgP1eiBWf6TXRrPp/877lZp0YOd4ghhyUPNUKRydJYbaa5IyYU5l8+53BRP5hjxYprf9NYNz7zzDOfpl9GSSZ3Wra9vwIMORm9rArUn5Kbfzzt09QphV+xcyEt+Pjx42dK90SUKXvSDDksedYEwnrYyIKZ1J89tOhacN5gpLnfU7Om87Ij/RRgyLPJiFlsZjALC84cK/1GBgdswLqJZg9OzabOcwdl3KcAIC8oNuMtrn2ZGZpCHyxW0xXU/H4Xmgw49xLrRgJ8Sob2VTY7CgVUyLNgnLwXcIXfXgkUpvv54KWlpeaCgoKKKHSSRTNYAQXyIrPB1eXVzOLIrE5ZrcaK0lKbuaXFCbDZYCsuCfcEmcbf/va34ym2cqaMs18BhjyTZ/3TmKB17ncngV1Y8X6AM/XGq65SPsaZ/WdV9jBIAUBuLSSfnPFgIjIoHj2pCFO7xR6oFpy7YRw5cqS8wAw69bmz0gc5cMiwQE0uKrH0G0kRfXDFQbfZbBMyrGuyuXFUQIGc3p/Q7fSRT65O6YjjERJXVX6hCewqHPNRsILAFjyP3j2Iz0XIkMMKBCA3ZdwQosloBLsqyziFogXHBiNNkS3OhrFRdE6GwSsAyPPJkrvJkmeCHVeYNeUBcPbBlc7ziko9AY6XjMsgFVDmkysXnqAjAwIN54NdlWWkRQuOLuRJwCGDDKyA0ZRnsNrM5JOn/zi5yZzHgHPz1VEUZCjkS8BVbWSiVwGGXCEkjVUxGlXA1b85bMHVDAl4Gp/BFDaNIXe7vGk7uEL+iOheK0zzKAqkkxY8hQBlwqEBeX4BJmilZ2uNRuX6UeGYW8gWnNelD85KyDikAgy5uzv9xslNRvUiU217PwtOW7TQq4VlQioABRTIrTQzNc1MeU9eD9gNacHVPzper9dBH3mVj6tJlsMqwJB7yJKnyzg5vTXAITRaYZrHwdV8n8/Xpa7IhFQgjAKAnOZhp83gSo/foGVXGQfHD1D9EcKCh+mT3CQVCFKAIfe6yZKrFAUVSdqK39cjsqtwLfrgaEiPtOBJOx9ZcyBAbs7H3JUUd8mnWPCgn5l4QalskICn+CRl6OEVyMld8brp9VkpMuU9fj+7KCrkIS14v9fpZqjostnJVYDuJJIlJ6RSYMrBrK9HAVyFG71nC45MZZE+eHKhyLajMeQ+jz/phtzvy4MPrrIMbUULzoDbs0102Z/kKgDITRZj0g253+8Huwy40mm24KoCTqezBeZezglXJZGJQSgAyA0EOSx5MgLcfp+7p0V7LLbgTL2/tbX1tLaQXJcKDEYBtuSD2Xcw+zg6u8EuflHMs+KiYAVByTx58mSdvMgMCCL/j12BpEFO9Laed9Yxx70t72ELjnUF8DfffFMC3quOjOKjAEOeyMEVfOyqevtFLeD9RlH8GzZs6Ozu7r5E81FGxqd7shapAI1mwCen5zz93sT45H5Pz6UTey52ktb9XBTor1jv3o1+u91+RropkEWGeCoAyI0EebyHV8Bqt8t7htoKuEMCjn4AcqWAw+E4jQwZpALxVkCBnG7tK5DDZ4nT4nb5wawIuNJ09sFFC+7DSIq04PE+tbI+VoAhj5dPjiHCbrsXgNNTGMEWXBwHVyFvamqq48bIWCqQCAUAeQ8ZcJoBGHP1+KF0NHvALCw4c6zUG8qC+995551DNOkq9iPH3HRZQTYrgJuJmKQVa6CvOffUfNhwiOoRXRSFXwYcx0AGCvjoI7CX2tvba6WbAllkSKQCsUKuXGB2eWsr37twidopuihKs7WAM+Te5ubmSgl4Ik+trJsVYMgHMz0E/ndXm6eS6qI3E+m7KHwsxYLTiq+2tna3BJxlkXGiFQDceDe5EiMd6UIPzLU0OneD2d4FDKtBz4L7li9fXkmzs4IKq3vJhFQgAQow5NFUTYT696w5DwsuuieK/416QgGu/BLWrFnTSn54jbTi0cgty8aqgAo5rj0HWHB7vtvhqTnyUVMrlWYLDrhDAo62YQOsNvwZLw0X7pGAkxIyJFWBgHsy8CHhf9tb3Pj4q8IrxWBXhRs1iBYc6ww4fg1e8sN3ScAhiwzJVoAhJ1dc/2YnNaq5oWsXRQBcdFHU5oo3epAJwBly79NPP73npptuchUVFRWoe+RgwnXRZmh3YBQqu4OuMQuyiX0a6GQHCuhs1D1GX7VBKVhp7APgtfvSS4dcm1bUsQVn6x105FCAo6Diz3z00UedjY2NW6dMmXKL0ag19kHtiHil9nyj4b2dVYaOLvEVFhHvnpKCXs9XDUa3m44dpF1QW7TiB23UWdHdR+cw8DlDBlCgE/S30A5h9tOpLubsaG/r6JWnJ+gNrtbmrRdO7sYMQva/GXK1nVrAsQGaoCDMvufgwYP/N2nSpLgB/sJb6w0tHWhTZgV3t4teidBNjYbkkEhPem2/uCyjpt1fu127f7LLa4+vbZ+2Pdry2vWB9tdu1+6vPV6gvN/vMzTUHv8/Ku2hBaz2gxs1hTLLqIEB995///07aPpss661QS1RhEyEG93LtxbQKxH4+7gQPdLAZRGLad5fzOMyYoxyXEZMi2XEtFhGTItlxLRYBmltQFkE3ofTSmYE/w20v3Y7H4dj7fECrorP42mu2rZhB23VvcDEnuEAh9n30MxC5/nz59+LF+A4aKaGAOT5wbxpO6M9X9jOedqyqVjntujxo21Tostrjxfheldnx3tuu91JxWHBQ15goqpQgCMfFpytuGfTpk3v0PtSkJ/zAZBbLL2QMyRiDIUYCjEtlkllWmyTmNZrk1hGTMervF49YfL99JbNpvrat6k5onsCXvsFPcDhpuBXofjhS5cuPdzW1nZKWvGAfhaGvJ+cMiPRCoBBj8t16tCOTUfoWAw4WAWz/UKoi0wUQmGGHJW4aUx8TVlZ2YP0DR9sz/kAyBG8HsgjQ7IUAOD2jvY1dDwMa0F8hjsk4HoWHO2FyVet+MqVK9+hh5Hl2YQyvQGQm/PJXQkXcKcCge9YcFrJDPFftOVDVJFWWdH2Z4Dy9PpjT92R/e9QH8EiPAwwGtI9oXxdHxzb8ItgP9z90ksvNZ45c+ZdOf8K0vQFC42sKJAzwNoYRfmkiWltOV4Xy4hp3p5psdgHMa3XD7GMmKbyALKrs/3dMx8faKQkLDgAB6MhrTflRww4fi3uV1999QWy4rq/FlSYi0GB3GLJxa4ntc9+r9d/5tjHL9BB2T2JCXA0PsiKP/nkk7Vnz559X1rx/ueVIQ9z8a+OJMsygYGmaHTAXVdnZ+f7x/bsqO0FfEC4cZbC+eDYDmutuimU7v7rX//63x6PR/dPAnbK1QDITcoQYq/fDSHwp5hjMR3I7b9d70+3Xj7XPdj6Yt1f266B6htou7a+3nW6c9lTf/Lwf9PuuJ0suidhPYqBAEdzUAEcecVN+cMf/nCMrPg2acUhTf9goYtOk5ncFT5RKII0B07rbedykcax1hfr/tp2DlTfQNu19dE6Rk4c9o5th3d+cIxW2T0Je3HJ1UQCOKy1Cjilu9etW/c8WXGuQ8YaBVTINflydXAK+H007+TUyedpb7begA9MDuhJRAo4W3H8erqXLFlS3dDQsEtacVJDJ0jIdYSJMhvW29nVuevAtvXVtCsDztY7LoCjSWzF4dgDctfatWufkSMqkEY/AHIzja5gLjMHTgcm9AfyOQ9lOM3bo43FOsS0Xj1iGaQHCtG2D/XxPmKa2yPmiWne3uP3+Zvqjj9D21y0gD0wGJH1pnIDXmSiDAIAD7rYfOihhw7Su8TflnNUFH10/zPTRafJbFZOMp9ojrETp/mEinm6lYbZEG192vLcDr042vZp69fuH247psR2tDS/XbVl/UHaj613RKMnLFEkLgqXZSuuXGzigA8//PDT9GByK/6MyKCvAEOuX0Ju0SoAprzd3a3VO9Y/TdsY7oh9b64vWsDZF8cBXZs3b75UWVn5Z3nByXLqxwHI5c0gfYWCt8B6Nzde+HPj6dN4VhDuCZiL2Pfm2qIBHPuIVlyB/Pbbb3+THmurlhecLKl+DH9cHULkYuyfI45kwX68j5jmfcU8Mc3b4x2LxxDTescRy4hpoTwezXN1dVVvfeuVN6kIwx219Ub1gwGcrbhysYkGrFq16jGXy+WTrgokDR8UyE00iZNPKIojHWngsnr7D7Q90uNEWi7a4w1QHgz5vF5f3ZEDj1ETADdfXEZtvdGFaAHHPgw4flGKFX/00UePHDt2bDW9kRbbZRhAAYYcWMslWAMDPcxgb768mm7qYL631nqDvajCYADHARhytuLOBx544NnLly83SlclMv0BuZFGV2ToU6CH4HY7nI37Nr/3LOXicTSt9e4rHGFqsICzL66Oi+/du7f5tddee5g+f+KRrkpk6pvplr4CObsbORwDKBpy9pyuqX74YkN9M60y3FGNe2uVHyzgqIchV604DRvuI9CfpRtA2uPIdR0FFMjlU1L0pQcvjZo0PHvggw37SCqt9QZrgwqxAg5XRbXilHbdcsstK+vr63fIG0CRnw+GPFf9cbpbaejqaNuxZfXylWCod+G7lmAsJYDjDOLgWPiCE788x4MPPvgb8sc/kf44qRFhCECeez45/O5up/OTqo3v/oakwuvOwBBcADDFfFFycCEWC85HRCMwfIJfHBrnpBtATa+//vqvyB/3Sn+cFIkw4Ja+URxCzHKfHGaZ/tJ76SmdX9FrIJpoVeGHYrDEw4KUHHyIB+BoJxrDrorSSHrVRNWePXuegz8uIY/8BCmQG7P/zQVgAn735aYLz+3fsq6KFBLhjunCUlQ7HoCjPoY8yFVZtGjRcpqQtdGtvLhSPKxMh1MgYMkBefZ65TRJ0NDZ1rpxy2vLl1NHta4JDCaYijnEC3A0hCHnURU02rF48eJ/oYvOvRLy6M6ViVwVoymepye64yeytI8sd1dH+94tb6z4FzDSu/CwYNzgRh/iqSAAF/1xNNhBX4nouPPOOx+iByRq5KQsSB55YMizyRXHiEm3vbNm99o3HnJ2dHSQGgBchBsMxcV6Q+lEOHtonNjAPILcW1dXt3P+/PkLPth/eGgePqclQ0QK4L3synvBs2BKMmYIuhz2c/s2rf1ZY33tJyRAFy0MONzbuFpvCJwIwFEvQhDo5It3d3Z27naYCm6mGXWFPNE9UFT+H04B/vhAgPHM9Mv9fvpglNPZfGjnpntOHzl0lvqrhTuulpv1TBTgogVX0wcOHOiix7j2Dx899is0HJYvIefTMHCc1/uFjUwckcL9EHphpv34gY/uq9nzUU0IuGG5AXjcQ6IAR0MZbI6VxjfV17UVlQw5OqR0xEKah2GRkEd+TlXIIW2GGHK86tjtcjnqjx74pwNb38dteNFyx228W0/FRAIuHhOQq6BfqD1+0WIp2Dds1KgFNCRmkz65KFX4tAp5Bvjk8LndDkfriQN7fn5g6waMdTPcGPNOONxQMtmAq6DTnasWn8e1s7R8wvVkyEv4xKFRMoRXQDUIiiGnz16n4b8eGud2d9kbqnd+cC+9bu0o9chOCwBnuHEzJyF+N9WrhmQBjgOyBVchv9xwobOro3XbqPGTrjVZLGV8MaW2TiZ0FQhATlKyqrolk78B49z0HsGT+zatua/uyMHT1AKAnXS40fNkAo7jITDgStx++aKz+cLZD8onTZ1NryEeA59c+uUBoQb6X4UcBdPAJ8dwJt5CRTMDD+xY88YvGs+caqCWad2SpFhu1i7ZgAfBTY1Q1umdz+7zp45uHXfFjCn0AstJeUYJOZ+ggWLVXUmxKcesQHqWkm6/t2zd+saKJW0Xmy5T2xlu3MjBDMGkwg3tkg04jonQD3S60vbVVh/cPmbyFGu+rXA2+eRkyGGWZBhIAdYpYMST75H30Bg3fcqlp62p4eWNry7/N3rVWju1WYQbF5RJhxu6pQpwHJsh5wsN+nit13+quupA4ZChNSVDh881mkw0wiKtOcQaKEAnCJrMoMwIpJESj6Orlaa8Ltv2v6++QeeQLybFO5QpgRtapBJwHJ8hR6yCfuFUzQX6U7d5RPn4K8kvL5cuC6QaOKiQJ8EfJ2/bgItJR3vbwb1b1v3iaOX2Q9RCWG223HBJxKHAZP/+FMHSBXDAzYsCPV18dp06eGBjecVkk7Ww6DPSZVHO14D/sbsyYMEYCuDOpNfj7mlpOL9yw6oXf996sQFvn4LFZri1k6diOFpsu6YacLSef9lsxVXQ6c+d79ShqoN05/NI0TByWYxwWWjAQPrmYc96nz7xNeWBhxRofNvpbDl7rPpX2/73f97qdUkYboxx88Vkwm6/h+28ZmM6AI4miZCLoCvp86eON9ibWzYPHVk+mlyWKXBZMC7WdyI1vZKrvdqwrLEJArAxSoJvgna0XNpctXntkqOVHx6mWtliA3DtDRwYqpQHkJJOAe3BXFr88PCmSist+OKqjZZCpK+55bYvVEy78pcFRcUT8eRL3zAZbZWhnwIAM5bAw3/dXfaz9SeO/vve99fsovrggjDUPATI011xwPj8smJpeO++6QY4mhUwzwHI8Zg5vrQKyBl0W0FJSfENt/39D0pHj73LYrVayXWR1pwE0guBGYjRMaeOkNBDtc1NDSs/XLP6FVdnJ0ZIYKmxAGz2tTFKwnO5ozsQ7ZjIkC4uiraPLBJiLLAK7NP5vG63t/bQvkMOR8emoWWjx9Fr0CZKt0UrYd96nyvHtkM/xhwudkfsra0fHtz6/j/v2/zuB6S5OPwH6y3CjfMT25+KvubGNZWOFlzsINrHLgtbc7bocFsUyz7vq9+6oXzK9PsKCgsraE6L4rb0nVSxutxOByx5aA3Yz/aRn+1yOOobT598dte6N7dTabbUbLUx9Mc3btjosEEKXXkKc9MdcJYGkDPo8M0BOfvnCuRms7lg7uJv31Q+ruJOa1HxVLzcEv65BJ0lDB0z2LiAJD/7VNOF+pcr1/5tE72uhMHmmMe1RV87La222NNMARxtZmsO0GHNGXQAzrAjtn5x0Te/VD556p0FxSVX4Y1RmIorQSdlhKCAjfFsL1lse+eRptOnXv7ovbd2UBGAjAVgcwyLDbD5jiTATlurTW1TQyYBzo1Gm3HtwKDDmrNFVwCndSW+5uavXzNu8oy7CocMuRpfVgi8hiF3hxcDLgpm/GFilMfg6OjYf+H08ZU0MrKXNGOwxVh0RwA1X0hSMjNCJgIOZdFuLKLbAovOQ4si6PlXz7959tipM28rKhm2wGzNL8TrGHLlopShxoQo3Fr3drsdXZ1tWxtO1byzf9v7uL0OiEWokYa15kX0szPCalPb1ZCpgHMHGHIGnV0XBp0tu2Lli4eNKPrc/C8vKC0v/0phybA5NI5uogldivuSbePpGAkB3JifjU+CODrbqlqamjYc2LZxq73tMm7QsHUG0Aw5Q83DfrDaGeOOMBRinOmAc1+0oPONInZfxFix9BOmXjVq+py5Nw8rG/kVmp47lV+XFvDVM8+NUS11H9R0S91xqq350oYTVZXvnzt15CKJxQAz3GKMbbDWbLEzGmwRDE5nQ8ygIwbksOhs1QE54NbG5qu+cMO0cZOmXW8bMvTqgsLiWQS7FW95hc+ersAHA+1XXmRJlrqbXqxz2NnRvv/CmZMfHtm1/ST1F9YY8ALmUDG2s8WGC5IVYFM/lJAtFpz7wzH6xbADdF4AuBZ4xaJTvrKtoLjYOuvaL80qGzPx8wVDSq622Yo/ZTSbLLhbqjwzqsxPp9JKCMiXqBGaAMQ4UMD1xU0Y8jsMmM2HJ9ZpLprH6bQfc3V07m9uPLvv8J4dh112O1wOhhpA88KA8za21myxldqpfFaFbAWcT5IIOvx00VcXrTtDznkcm4aWlRXOuGbeZ4aXjfm0xVYwMT/fOtFsLRhnwsMYyvCjUQG/76KVD62NtVIHoNWWUiAmoHFRCJAVX5pi+oKdk+zzBbe7+6zH6Trb2tz48fG9O6vbm5txVxGQsiXmmMFGzHmIGWjRvw7dGCqc6UGreqb3J1z70VcAzjFbddGVYbC1sVhW+aFUzPzMqNETJ1YUDyubaLUVVeRbrRNMFnOZyWguzAvAj9fToZ6AmwPLjxUKCk1EMltoir30OJOjhyD2+b0On8fb7O7uPtft7Kq3tzWf/eTs2fr6mmr40AylaH1FeEOlxbLsfnCstCeb/2PNs7mP2r6hz+ICeNmycwwwGWqGnde5jBgjjUWsN4/cHfPQ0lFF9PidzVpUWFRgK8KMSIPL2eXo7qLRuvZWZ3vLxS5yKwAmuwgcM8yI2eqKMdIMNEOMdbEM78t1ckzFciPkIuDimQ0CkjYwqByL8IuAY7u4jcujPqS5XkoGpbEuBhE4TrN1ZcC1wDK0DDWvc3mOuT6OxePmTDrXARdPNGvBcCLWgsvrDDEgRzmOOT9UXTgW5wM6BIZPuw5IkQeIxZjh5RjbxDTWsSBwHFjL0f9Z8BztfthuszaIwy0i1NpyOIBYj3hABlCMkdYuDLs2X1xHvViXQaMAi6/Jlqs6CrBeDDKKhcsTt+tUGQQmQ8rwYp9weXp1yvxeBfjkSEFiU0Cro3YdtWvzGFzxyNo87bpYVqYjUOD/AZrbm7Ts1rpFAAAAAElFTkSuQmCC', // @suppress longLineCheck
-
- red: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALgAAAC4CAYAAABQMybHAAAk/0lEQVR4Ae2dCZxUxZ3Hq8/pnhkGmOEQuQS5VCTxWHEDBlyNkciakMMkxujGuOvHO24IKCae0UQlKwmyroocoqtozGpA4oFiVAQU5IaRcchwDsPczNF39/5/b+bfVL/p7ume6bur+DyqXt31r2//5//q1XvPIJRLpgQMMVYeiDGfyhanBGKdgDirzYvsLLtIPguB0/lc7+vh5vNIvr68Oo8ige6EH6Vo3iSxjODrw1rcm2++2f+MM84YV1hYONRkMhUZjcY+OAKBgOZTXDGVLTYYDH0gNYpvIa/V5/O1+v3+FopvgY+D4tra29uP7N27d98VV1zRiOy6g06DcRyGr1wYCfCEhUnK2yiWiQYvSQG+8ac//all3rx5o/v16ze+oKBgnNlsxjGWQB5LgA5MhrToh1BL0Fd4vV4c+1wu176mpqYvHnnkkf0rVqzwUJt+OuQfALrBmh/hvHc8mfkuCBlmDei5c+fab7nllguLi4svttlsXyeYzyPgrJkgKPpBuQn4LU6n88PW1tZ1ixYt2vjoo486qG964PMe9nwGnKE2EhgG0tDWBx988HzS0BdbLJbpdEymeFsmAB1DH5wej2cTHR+Qhl937733biYN76ZyAFyGPoaqcitLvgEeAvX1119ve/jhhy8nLX211Wq9lKYWtnIuuFa3272WtPv/3nPPPW8tWbLESYPKS9jzAXCGGj60tfGLL764YPDgwT+x2+3fp/MyOnLZ1Tscjj/X1NS8OH78+E9poNDoslbPaTMmlwFnsDWoN23adNq4ceN+TBeIP6FVjbG5THSksdEKTQVdqL64b9++lyZPnlzVCboMe6SiWRufi4DLYJsqKyunkraeCxOELhJzcbxxw0cXqQGYMKTVHz399NM/pgp8dOQk6Lk04RiLpq3JNx04cOAbAwYMmEurH1PoXLkIEqDVmPV1dXWPjhw58l3KwqAz7BFKZU90LgAeBHvYsGHmjRs3/mtpaekcMkPOy55pSH9PyXzZ0tDQ8NiFF1646vDhw17qESDPetCzGXD0XYObwLYQ2FeVlZXNoRsvZ6Yfl+ztAd1Y2lNfXw/QXyHQ9TeTsm5g2Qp40BTZtWvX+aNHj15AGvv8rJN+BneYNPrm/fv3/2LixImbqZuy6ZLBve7atWwDXNPYNAzT0qVLS2fNmvUA7f+4gS4eAbxynRIwHN8ozDseFQZHTW9l4m/3BBa/8nnDfT97vKqBKmPQs2ZpMVsARz8ZbvPRo0ev6d+//yNkjiRlD0hvqUh3ecsrpwtD2+GEdcMfELUNbWLewNniBaqU7XNAnvGgZwPg6KMJx44dOybSstYf1coISSOKsy4tiJLa8ySPX6wvrxN3TLpX7KJaoM1xZDTkmfynPaixJ02aVEBX+PdOmDBhg4K754D2tqTFKKacPVhsOPEnce+kSQK/IjMdYChjFWWmdozhNq1evXrYtGnTltKNmq/3doLypXyyNLgsP49XfPhOpfjZzCcEbKGMtc0zEXBeITFXVFR8g5YAn1O2toxW9+FUAI5ewDY/UC9+PvrXAjeJ2DbH2nnGuEwyUYJae/r06bba2toH6O7a6wrujGGlS0eMBjFw1ADxetMT4oHpZ2lbi3GtlFEmS6Zo8CDca9asGT516tTltClK3WLvglRsEanS4HJvXF6x/v0vxHXfWigOUXzGmCyZADj6oK2S7N69ewrdtFlJWnuALDwVjk8C6QAcPSSTpa6iTvxwwm/EejrNiFWWdJsoDLeZdv3NHDNmzGoFd3wwZ1JuMlkGjBsoVlf9TsykfmGFBYorrUo0nYCjbQjAQjv/rhs+fPjLFLbToVwWS4Boto/sL14++ri4joZhoQNznDbO0tVwEG66K/nLIUOGPEW32/GLVy43JGAeUiKeqvsv8UsaTlohTwfgGtz0EIKV9iE/RjsAH1IPIuQG1SGjCAhDWaF4qHmBeGzwYIG3EaRFk6cacA3uGTNm2OnFNs/16dPn1hChqJOck0CJTdxaeY94bsZkzfxMOeSpvADQ4B44cGAB3cBZRg/8fi/nZjNDBpSuVZRow3d4xGsjHxT/VlsrXJSPlxGjFUlIWqo0uAY39dhaXl4+X8GdkLnLqkrsFvE90uTzwQAdKdPkqQCc4bZUV1fPpXeQ3JhVM6M6mzAJ9LGJG+v/IOZShSm78Ew24DCB0Ibl0KFD19Ozkr9JmLRURVkpgdIi8Zvqx8X1YIIOsJFUMzmZgKPj+FNkoQvK79CqyQIKK6ckIE4pEQsqHxbfIVGwJk8a5MkCnOE2b9++fRrdfl9CS4GAXTklATwiYRpVJp7bfb+YRuJI6h3PZAAOuFGv+a233hpPb5NaSeHkPGJCFSuXnRIgSGwTBomVb/2nGE8jAORgJuGaPFmAm+iB4KIpU6Ysp70lJdk5BarXyZaA0ShKLh4tls+6QBRRW/gLn3DAE10hfjDoaMHx48ef6Nu37w0UVi7FEsjEdfBoImh2iMX97hR3Up6Er5EnUoPjx4L6LHv27PmugjvalKo0WQJ97eKGLx8U3wU7dIChhCneRAHOcJtXrVo1dtSoUQvlAaiwkkB3EqAngxauuk2MpXwJtccTCbj5kksuKaLHzZYpu7u76VTpegnAHr9svFh2yQTNHgfkCdHiiagEPxLN7qbnKOeXlJSoO5X62UvxebbZ4LJ4yB5/muzx2RSXEHu8txo8aJps2bLlYtodqOCWZ0uF45YA7T68cfu94mIqmBBTpbeAa9qbzJIiWu+eTy9Wj3tAqoCSgCwBIETr4/OnjwsuHfaK0d4UZu1tef7552+nF/OMkzuqwkoCPZWA1SzGvXS9uI3K93pVpaeAM9zmF154YdSgQYPwaJJySgIJk8DgvmL2C/8hRlGFvTJVegM4Liwt9HTO78k0KUzYyFRFSgIkATJVCq88S/yOgr3akNUTwFl7W3bu3IlvTH5LzYiSQDIk0KdAXEEbsi7vhBysgr24XE8ARxnzlVdeWUw3dB6LqzWVWUkgTgmMHSgeu3Ky9oFeNlXiqiFewFl7m5988slb6XPXI+NqTWVWEohTAhaTGPnMLIGH0xnwuLR4vIAjv4k+gV1Cr3u4Kc6+quxKAj2SwIA+4qbrpwjsSsV1X1zMxpOZtbdl3rx5P6cX0Zf1qLeqkJJAnBIwmUTZ/TPFz6lY3MuG8QCOvGbc1DnllFNujrOPKruSQK8kQG/Kuple0Yx942yqxFRfrICz9jY/88wz15DtfUpMtatMSgIJkoDZJE5Z9mNxDVXHgMdki8cKOPKZ6Fs59lNPPRV3mJRTEki5BIb0FbdNOj2+N2TFAjhrb8vKlSuvIu09IuUjUw0qCZAErBYx4i/XiasoGLMtHgvgmvYeOnSolY47lKSVBNIpgWH9xR0lJcG7m93y210GaG8c5ldfffVfaEPVmHQOTrWtJEAbsca8f7O4BEzSwXxGFEwsgGPt0Ux3LX+ktsNGlKNKSJEEsJ121CDxIzBJB9gE5BFdd4Aj3XT11VfTM8R9Z0SsRSUoCaRQAn0LxIyrvyb6UpMAPCrD0RLxy0C6ee7cud+m5yzV50VIGMqlXwL0/Kb9nsvEt6kn3S4ZRgMcaRrg9P2cHyjzJP0Tq3rQIQGYKSP6iR/QGQMekeNICdDeOExPPPHEiMLCwq91VK3+VxLIDAkUWcXXnrhaYMma7XDw2sVFA1zT3jNnzryKtHekfF0qVBFKAqmQABFpnDUxRIvHDbi2ekKPo30/FR1WbSgJxCuBwcVBwFmLd6kinGbGLwHxphUrVoynte+xXUqpiIyWQKBoWEb3L1GdozXxsS/9u/Z2Wl5N6aLFYaTrXRDwr371q9PUxaVePJl/3nzef4uaN28S7hNHunQ2EOgSRa/r1rkuEXild1enr6unecJVHktd9OlwaOJp1LPddEApg92QotEANw8YMGCqApwktmen8K9cIURTI8kv810BdXGI72JR73LR9+ND5jvzOx9nD80u11QhVj1DxRjwkBr0gOMXoGnwoqIiM72p6sKQ3Hl64nv0fhGoPZ5Vo8ff7P5+v2jw+Eil5S7kfQKBC8FqW1sbAx6ixRGpd4gzLVu2bKLJZCrVJ+bjebbBzXNkoTsipfRQo0HTWRybWz7BWvqHkYMn0qjYDg8ZoB5w1uCmM8888yJlnoTIKitPGHIj3R3hyc0lHwCPLbRdRB4A56EF5yoc4Igzkf09RQEelFNWBwB5f3okJhfnE2MqNZumgFk6wC4gDzoZcKbfRLfmrWR/Tw7mUoGsl0Ao5DzVueEXmUyThxcW8heUeVDanMmAIwLnxoULF55Nv4w+Wg71X85IgCE3AoEccjScPr8ZderZNCSNX3lo8ioKk28aNmzYhFz8cyYPPF/DHZAbRKPXmzNrK6B6qM0ygbxP6WCOtaUjWYNzgpH2fo/JVwDyYdxmUuH9zWZN3eXKePuYjGAWPDPH2tD0GhwZTLR7cIzS4Jp8cvY/QN6PIG/KAU0OVouMxtPBLh0MuTZ3rMFBPRzOjQT4aO1M/ZfTEmDIc8Emt5s0wDV+OydNY5oBR5ym2ktLS802m21kTs+sGlxQAoC8r4nMFZp9DQAGIct8m9EwstRuh0XCw9DGqAfceP/992MrGrYzKJcnEjgJOdjIUhcQBbcPHQx2wXRwIGyDM/XGs846S22PzdI57k23AXkJmbAnfNm5dwUAn1mkbe3+ohNwRAVYgwcBHzhwoLrA7A0pWVxWg5xe5Wo8qQCzZjQAuNRs7rKSwhocAwHsRrvdPhwnyuWnBAB5H9LkLZomzy4ZFJmNYFfjmHuu1+AGevdgMScqPz8loEGuafLsGr/ZYAC7bI3A1x6751EgwkhbZIvVGjiLJH99QF5Mmrw1SzQ5mKVFcAAOpa3BjdnjkyD1BDheMq6ckoDQNDntQsQSYjY4ghzsBllGWLbBMQaDAhxiUI4lYCLNWEzmiqbJM/zBIKvByIBz9zUNzica+QpwFofyWQIMObGe0c4kAgx4sKeswYMRCvCMnsO0dY4hb/P5M/YZT7NJ0+AsI41pXkVBJCKUicLiUX4XCQDyIhNWyYP6sEuedEZE0+DcLwU4S0L5YSXAkLdrmjxslrRFGmOxwal3bLakraOq4cyWACAv1DR5ZvWTVlHArmaJcM/YRAn+zfF6ve2cqHwlgUgSYMi7rDNTASYs1b7PH5DZ1Zjm/gXH4fP52oInKqAkEEUCgJz2YWeMRU6Xv3p2NZWO1c3gCqfS4FFmVCV1kQBD7qS3aKX7LXE+v1/W4BrXbKJwxwNKg7MolB+rBAC5jd69Ql5anS8goMGDyhqdkS8otQQFeFrnKGsb1zQ5Qa5p8jSNwm8ImihByMNq8EC6/9akSUCq2d5JAK+H0zR576rpUWkwSyuXETW4Zq9QzQFlg/dIvqpQpwQYche9vDvVb7X1BgRs8CDL6JKswbUEAry1s6/KUxLokQQAeQFtQUz1HU96FzrYZcC1vss2uBbhcDgaoO7VnvAeza0q1CmBDsiFcPlTIxJQ7aTXoetbYw3O1PsbGxv/oc+kzpUEeiKBk5q8J6XjL9Pk9YBd/KSYZ81EwQmcFllRUbFfXWR2CET933sJAHKrZq4k9w4nelrldOwnLwg3wqzBka4lvPbaawpwSEO5hEkgCHkS18kB72v1zXrAg+vgTL3/7bffbnG5XLVms3lgwkaoKsp7CQByC0nBo+nRxIvD7ffXrjve1EI1dzFR0FoQcGRobW2tUmYKxKJcIiWgQU6gJ1qRg9U2X6CK+gq4wwKOcQByLUN7e/s/EKGckkCiJQDI6fUOCd9x2O7zgVkZcK3rbIPLGtyHlRSlwRM9tao+loAMOcf1xge8TT4vAPfREaLB5XXwIOTHjh3b35sGVVklge4kAMhhqngTsC0E9dR6fGA2BG70IZwG97/xxhs7aNMVgFdOSSBpEsDNxA5zpXdWuY/MjVW1zTuoowA8BHIGHIMA0Ej00Udga5ubmyuVmQKxKJdMCQByE/ENfd6Tf6C2xR+ofPFITS31UzZRtG7rAWfIvfX19ZsU4MmcWlU3SyAIeQ8UOYCt93g3keelI0R7o34ZcJxrGpx8X2Vl5UYFOESiXCokAMgBI3lxHTDkqxyujVQU2ps1eLDLMuD4MbAG9y1ZsmSTn1wwpwooCSRZAgx5PM3Qg3L+JTX10OAMN3OsVRMOcO2XsGrVqkayw8uVFo9H3CpvbyXAkMNa6e7AQ6DNXl/5W8fqGyk7a/CIgKNvrMFhz3hpufBTBTjEolwqJQDIAXd3DrDWuj34+KvGK/lsgweLyhockQw4fg1essM3KMCDslKBFEqAIY+mxdGdynbPBvIAuGyiIElz8o0eRLB6xy/Bu2DBgk8vvfRSZ1FRkU3Lnaf/VRaVCM/xmpwffSRlBijCuUjxyBsxLUJCpMfbkB39AvD6/jn8fufjh46wBmftHdJCOMCRUbNnPvnkk5bq6uoPRo8efbmRnphOhGvbWiGO/c9fhaeuORHVpaQOt+8rwlmCb7uHyC6k7UgpUctEKBStTEijnSf6iZfzRGhCyxJvO3K96Q7T42mi2nnig21N5dhByPY3Qx7snh5wJEAmmgYn37Nt27a/nnbaaQkDfP+dTwp3dT3aySrn9HtEu9+r2YYQUCw2IgbIeRk0lOO4cOmIk12q88ttI8x9jdR/fX79eXfl9en68pHG7w34xW5nzV8pv4cOeQ08pIpwahltMuDeW2+99SPaPlsfTUuE1NjNSTbCjSEVGS2i0NihD2KFG+U4L3w5jDQ4OY7zyL6cRw7LeeSwnEcOy3nksJwHYb1DXjguw2EtMob/uiuvT+d22Ne3h3iw6Az46he37PyITiNeYKJsNMCh9j20s9Bx+PDhvyUKcDSarQ6Q2wnyaNf4nMa3nTFWjsuEcXNfYu1fsvP3RCbQwLU+598a3W4HBaHBw15gou5wgCMeGpy1uGft2rVv0OskEJ/3DpDbjCYNWoZE9iEghkIOy3nSGZb7JIcj9UnOI4cTlT9SPdHiAeZ2Z93r5MnmCaK7uEiA40eCXwWo9sydO3dXU1PTl0qLd8iPIe84U/+nUgJgsC3g+XJJ8+7d1C4DDlbBbBcX7iITmZCZIUclbloTX1VWVnYnfcMH6XnvADmcKwDZKpcqCUBN13jbVpHnpoPNE+a1SzciaXBkRF1BLb58+fI36GFkVKhcpwQ0Td7lS4xKPMmUgFv4PG+3HXmD2pC1d1jzBP2IBjh+FSgIM8W9dOnS6qqqqjfV/iuShuSwsmJTkEsSSV4Qa9+1Pseb77ZWVVMr0OBgE4yC1bAuVsA1M+XFF19cTFo84q8lbAt5EKkgT80kuwMB/7q2I4upNTZPegU4eh2ixefPn1958ODBd5QW7zqhDHm0q3+V1nMJkPIW9f72d149UVHZCXi3cGOWomlwpENbB80UCrteeeWVZz0eT8Q/CSiUr64DciwhnnQcjnbjArk5PV6fy3KL+va6q6+35fX1d1dfd+n6+vjcL/yBjx3Vz1J5Fx2yeRLVougOcPQHFeBiUzNTfvvb3+4lLf53pcUhmq4ON4IKDB2QY3Lg2JfDPHFyHMLxOq67p/X1try+v93V1126vj6cd9jezr+vaCrfS6dsnoDJqHCjbCyAQ1sHAaewa82aNc+QFkd55cJIQA85w5cKH91hiORwKtpOVhs+4nij89gzNB7W3oAPTHZrScQKOGtx/Hpcc+bM2X706NENSouTNCI4QG4lTZ5qx3AzbGif41Ldl0S0B+1d73dtWNy4ezvVx4Cz9k4I4Ogna3EY9oDcuXr16oVqRQWiiexOavKTiOEyC44vtzisRXbGcxznicfnsrHWp8/P5SL5+v531zd9/fry3aV7aOVkk+P4QsrnpAPsgcGYtDfli8lEQT4ADi3OgLtmz569jd4l/rraowLxRHY2TZPjY6kd/5CTJ1kOR0qPXHP4FK471vr0+blcJF/uc/gehMbq69eXj5buoy2xR31trz/duGMblWPtHdPqCfciFhOF87IW1y420eBdd921gB5MblR7VFhE4X2GPHyqig0ngY49J97GxU27FlA6wx2z7c11xgs42+Jo0Pnee+/Vbtq06U/qgpPFGdkH5FhdUS42CeD5qb2exj997qzFG6tgnoC5mG1vbiUewFFG1uIa5LNmzXqNHmvbri44WaSR/QLaZstLiJyLrXP4sRwox2XkMJeV4+Qwpyfal9uQw5HakfPIYTk/tHej37X9vuMbX6M8DHfc2hv19wRw1uLaxSY6sGLFikecTifegYg6lYsiAUCO1RWeUGRFOFbHeSOV7y491nZizRdve93lB0Nu+qD8O22HH6E+AG6+uIxbe2MM8QKOMgw4flGaFn/ooYd27927dyW9kRbpynUjgSDkeP+HOkJkEKBfwCF/68oXmvdgv7dee4O9uFxPAEcDDDlrcccdd9yxqK6urlqZKrHJH5BbeqRfYqs/G3NhzftEwF39ZNPORdR/PI6m195xD6ungLMtzsuGzs8++6z+pZdeuos+f0JLl8pUiWUmGHL82c73A69hcwm/5/3WQ3eVOxrw2gWGO651b73cewo46mHIg1qclg23EOiL6AaQvh11HkECgNysNDltdPKLfe6GRU837d5CotJr7x5rzN4CDlMlqMUp7Lz88suXHzhw4CN1AygC0WGi8x1y3NCp8To++lXN+uVgqPPgu5ZgLC2AY6rQOA6+4MQvr/3OO++8j+zxGmWPkzRidJq5YuiNvomxoQzLBru72e+pWdS46z7qWjsdYAgmAJhivijYM5cIiaITWD7BLw6dc9ANoGMvv/zy3WSP0zeGevzjo6ryy2H50EKQR7pNnmvx0MvugN/7vuPw3Vucx47RbGv8kA+WeFmwVxAkAnAQjM6wqaJ1kl41sfnTTz99Cva4gjz2OQLk+DBTrjswAbt7r6fhqacbdm6m8cpw9+rCUpZdIgBHfQx5iKkyY8aMJbQh6123Gz9I5WKVwElNnrurK16C+4i39d05NeuXkFz0pgkUZkL+9CcKcMwdQw6acaGATrfPnDnz13TR+ZmCnKQRh4OpYs5Rm9yjXVS2f3ZX3YZfk0g0TsjnZcGEwQ1xJxpw2R7XIKevRJy49tprZ9MDEuVqUxZEHrtjyHNpjRwrJvU+R/nDjZtn13scJ0gaAFyGGwwlRHtD0snY3obOyR00EOTe/fv3r582bdr0pmXv9MVXbpWLTQImklWHQGWRxlY203IB7kaf69CC5p037XDU4osCbXQw4DBvE6q9Mf5kAI564UJAJ1vc1dLSsnFUZctltKOuUEHeIaRY/gfkcBBotq6k+KnzJwKe+mUnym9c13roIA1FD3dCNTfkBZcswGV1Ewxv3bq1rcBk+Xycpd836c+vVUHeMQmx/M+yCgozlkIZkoe2mYrWgKf19ROVt/y55cty6pYebmhuAJ5wlyzA0VGeC/a1zm9z1jaVme17hluKL6HVAgtPXMJHloMVsqxCBJrh4+yA292+tv3Ifz7btAu34WW4E7beHUkMyQRcbhNzEpyXTY5jx+kJly2jrSXTSZPbeeLkAiocXgIsq6Aww2fLiFjY3Cf8nsbX2/bf9mzjLqx1M9xY80463BBCqgEPgr7VWdvQbvCuH28tnUo2eR+eOHRKuegSCMqKTHOY55l44F0mDQHn0eXNX9z8yomKPTSiVjoAOMONmzlJsbup3qBLFeBokJVOEPJyV2PLUW/738+2DbjAZjCV8cVUsHcqEFECgDwoyIi50pOAde46n6NiYePuW9a2HfgH9QJgpxxujD6VgKM9OJ4XzT/gOeHY7W5Yd65t0CS70TRE24nRuWrQkV39H0kCDHmmrK1gZnH7/ZjXsfWRhs23b3HUHKW+682SlGhullmqAQ+Bmzqhndd6He5PHDUfTC48ZXShwXyagpynp3ufzRUIMp0OuwLpWUq6/d72wd21G+fsdzfVUX8YbtzIwQ7BlMINeaQacLQJ1wX0Fr/b9zfnwQ/PKxhUUGKyTjIJo4Enr6OI+j+SBGQ5YcU81Qfgdga8gQpP0/O/qP/4d41eB77yK8ONC8qUww15pQtwtM2Q84VGwEsbyN9srdo60FRYPsRin2wxmOzYS4AHc5WLLoGT5kr0fIlMxY5AvL+k2e9ufK/98Lz7aje9SnPIF5PyHcq0wI2xphNwtM+Qww+CvsFRfaTa2/beuILSM+0G0ynKZIGounephJxNkhpf+7aFjTtvp5WSHdRDaG3W3DBJ5KVAzHHKXaYADrj50KCv8rS0rXFUvXtOwSBTX5P1K8pkiY0NNleSSRNu3sAkKfc0L7+j9sMH97ua8fYpaGyGW795KrbOJyFXugHHkHgu4DPkmjanP3e+Na1V2waa7buHmAsn0/ZRu7YXQ5ksUVE4adIlducKcU0mCW7euBvWOo7c/UDtxr90miQMN9a4+WIyabffow5el5gJgKNLMuQy6Fp4g+PY0cNksoyylgymz4SM7nioS9nmurkMOT0JeUh0j05ga/toiuj78OKQr/W9RY3b57x64stdVBlrbACuv4EDJZV2l2lXb+gPrivxw8OXVgvosNFhp6MQ4TvKzvnni+yn/rLUaB2BJ1/4TzKlKRdGArCVe+PY1m70uw9+7Kz+wx/rt26g+mCCMNS8BMjbXbW/vr1pM5FlMw1wjA19wgHI8SVmKx2AnEG39zfbiu8vu+CasdZ+19HHWAvM2ESqzBYSUXgHDRwv5rxC0ub3uCrI1n6w/tMXGr1OrJBAU+MA2GxrY5WE93LH2xQVTZ7LFBNFP0IWEnwc0Aps0/mcfq/3rbYDO+r9zrUjLMVDaePWCGW26EV48px//Kw5ovl4wxSbI/Ty+Y+fa97zq0WNO9aRzOXlP2hvGW7MT0aYJCdH3RHCWDPZoX9ssrA2Z40Os0XT7HMGnP/1C2yDbulrtI7E64nx7lae1EweXKr7Bq0cybGd7SI7m9a1D3zmqln0WN3nH1J+1tSstbH0xzduWOlErjhSgymKz3TAWQyAnEGHbQ7I2T7XIDebzba7+p1z6STbgGv7GwvGKNBZdNF9GWx6J/eXO5x1z/++aetaejMZg80+r2vLtnZGam15xNkCOPrM2hygQ5sz6ACcYYdf8Kuy8y86zz7g2jKj7SwFOkkkjJPBJlNv9xZH3fOP12/+iLICZBwAm31obIDNdyQBdsZqbepb0GUT4Nxp9BnXDgw6tDlrdA1wOtf828rO+afJtkHXDTLZz7XiNQxUBIXz1XwB1KASa9n0Rilx3Of4fJPz+PKF9Vs/o2gGW/ZlcwRQ84UkBbPDZSPgkKzGKfmy2QKNzkuLMujWG0rPmnRhwZBvDzbbp9sN5kLAni8XpQy1n9AG1I6At51edPnBRlf1G4sbduP2OiCWoUYY2poP2c7OCq1NfQ+6bAWcB4D+A3IGnU0XBp01u6blh5qLi27od8b0Mdb+3xxosp9PoJvwch3Anmvr6Vi/BtRegprA9tX6HJu/dDe+vbhp7wf0RincoGHtDKAZcoaal/2gtbPGHKG+dnHZDjgPSA86TBi20dmEYV/T9FMKTx00q3j0ZSOsfb5ZYrCO0UyYLNbssqbuhBpfS/jyoLvl7f9r3f/O+vajx0kmDDDDLftIg7ZmjZ3VYNM4NJcrgMvjgTbHuAA5NDprdQDO0Mu++Yf9xo2dXDB4Kmn1c/uZCibShWkBPi+CR+gy1ZSRgcbmJzxJQ0t8riafaxdp6883uWo+Xtm0r4LGDG0MeAFzOB/prLFhguQE2DQOzeUa4PK4WKsDdD4Ath54TaNTvJbWz2wr+FHfsRMnWErPG2iyndvfVHAGwW7BBSqA7/jX0QwLL1kXrYAYjg1f+LhMBNC4UCSoPfSmqL21Pufn5Z6GLS83V+xq8jphcjDUAJoPBpzTWFuzxu6ongrkkuM5yqUxyWPB+Bh0va0ua3eGnOPYNw21FRX+oHDcV06zlpxdQvtfCg2mEYVGy1CrMNpZw7Mvwy93AmG9oBlafT6GGPYzQGbfLfyOdr/nSHvAd5B28x2scp/Y+Wr7vu1HnG24qwhIWROzz2DD5zj4DLRsX0fqDmXPbqeXe3aPJnrvGXT2WavLpgyDrfflvNoP5eLiYYMmWctGDjEVj+hrtowsMliG01cayugppEK6k2qnbWCFlNGMxhh81vRsXkAbgywizUuvWWinW+QOT8DX7vL76tsCnkPNXs+Bal/rwR3u+gPrWg/DhmYoZe0rwxsuLOdl84P96BLLgdR8Apynq4O5DqWKMOAFtLIPwBlqhp3P9Xk14DvrCKmbzB3zSGtx0RBjob2fuaCoj8GKHZGiJeBub/K62qr97Y4D7tY2MisAZofyPukzzPBZ68o+wgw0Q4xzOQ+X1ddN2fLD5SPg8syGAEkJMqx6kGXA9WlcDvUhzPWiLTmMc9kxeIjjMGtXBlwPLEPLUPM552ef62NfbjdvwhC+ch0SYFkwkPD14PI5QwzokY99jg9XF1rheEAHx/DpzwEp4gCx7DO87CNNDuMcBxz7HWd5+j8LPE+HH3XYLBv40Q4Zan0+NCDXIzfIAMo+wvqDYdfHy+eoF+fK6STAwtdFq9MIEmB5McjIFi1OTo9QZQiYDCnDizLR4iLVqeI7JcCTowTSOwno5ag/R+36OAZXblkfpz+X86pwDBL4fwN/IZwMBwH5AAAAAElFTkSuQmCC', // @suppress longLineCheck
-
- yellow: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALcAAAC4CAYAAAChOH1KAAAlaElEQVR4Ae2dCZhUxbXHTy+zL8ywDDsSVhEVJQoCkoSIIr4kvohLxO2ZfC8an0mQrCQm+uJ7qHkv5hE/xSQaNokBogkxigaUuLDIpsiOMA4MOwyz7zPd7/yLOZfqnu7p7umeXut83+2qW7du3apTv3v63Lr31rWRkUhowOZViPc6Nutpbq/8WPVO8173sYtJ6kgDusI7yme2nYdTdIZQj0NH1vrgwYNtc+bMyb344otzCgsL87KysnLT0tKym5ub6+rr62vKy8urd+7cWfv444/XlJSUAGSB2VfoKw3HM9KBBqQzOsiSspsEXgmhCMTtDGT2TTfdNDwvL28kQzvC6XSOcDgcQ2w2Wzfenme323M5nuN2uwPql/O5OF+dy+Wq4X2rOV7Z2tpa3NLSsp9Pgv3V1dX7XnnllU/4RKnj7S5edNARl4WjRnQNBFS+njnJ4wKxHtp37NgxpG/fvlPY6l7CAI/kZTgv/YMBN1L64hPAzcAf5eUTXvax9d9x/PjxtZdcckkxH0OAF8gljNThE7acVIdbQLZzDyJuX7du3YChQ4dOycnJ+QJb5M+zFR4Qr73L1v4IW/h3amtr/3nw4MG1kyZNOsJ1FdglBOwpKakItwfQTz31VN4dd9wxnd2LL7J1/hzDPCxRSWDYD7BVf5fdmbeXLl26avbs2dXcFsCdkqCnCtwCNEL7gAEDnBs2bPh8QUHBnenp6TdyWi4vySY1TU1NKysqKl6cMGHCO0eOHGnhBuqQJ71FT3a4FczcqQgdu3btGtWvX787MzMzv8YWun+y0eyvPWzRjzY0NPzp2LFjL44ePXoP52vlRbfo/nZN6PRkhdvyoX/7299245GNe9iHvoMvBC9P6N6KQOX5gvRD9tGX8gjMovvuu6+SixRrjjCpJJngRluwAGz78uXLu0+dOvXbDPW3eL2QFyOeGihnyOevWbPm6VtvvfUsbwLcAnpSuCzJALcH1KtXr+4zduzYWbm5uf/OnZWMvrQnouGv1bD8ftu2bf937bXXnmgDPCkgT3S4lZXmDrGvX79+0EUXXTSbRz3u5fXM8Ps85Upo4FGWBbt3735q4sSJh7n1YskRJqQkKtyoN8B2vPzyyz2uueaaX2RnZ9/NN1bSE7IX4qjSfMOoqa6ubvFbb7318xkzZpRx1XDxKZY8jmoauCqJBjfqi8WB4bzNmzf/W/fu3R/j9R6Bm5o6OWyuErK1fMiKwuhfJ8VNZWUVtT/77MTHFrYNI8oIS8L444kEt7ggju3bt182bNiweXwHcXwnuy5pdwPYzrofMdiR8SaaW9wffFLc+N3RE/7xEStNrHhkCu/iXkgEuFFHBfb8+fMLb7vttkf4YvGb7II4u1g3CVm8vXEpORtfiGzdbbaWmpqW3724ou4/v/WDj8u5cMAd965KvMMt1tp56NCh24qKip7gmy99IttzyVWao3ERYekKcbnpxKmy5h/3HbVpGZcvdzzj1ooDnngUnHQOLI8++mhBZWXlC3369FlowI5tV9lt1KdPz7SFdaUTXnj00REF0kccxqWRjMdKWWBv2rTpUn7YfwnfWRwZ225NnKN3peXWtdDion0799TedfkXPvqY0+GLywWnni2m8Xiz3KgPLLbz6NGj3xgzZsw7BuyY8uH34E47jRxzUc47J/eN/wb6ixf0W1zxFC+VEWvtnDt3biE/ybagZ8+ez7CysngxEqcasNkoq6i785m6w1ctmDt3GB5xEMjjwiOIh0qgDjjJMG49hp9ae5Gt9fA47c+4r1a03BJvRbS43J/s3FN3R5ubIhebMR0Tj7XlFoudtm/fvmsuvfTSNQZsb2wSY91ptw0fMzrnrYObr7iGa5zGC9yUmBrPWMItYGOY7xZ+W/wvrIw8XowkqAa4Q/M+MzjjL0d2jL+FmxBzFyVWcOO4OLPT+AH6b/ELuAs5bp4LYSUkujDg6f37Ohee3ncVHjUWCx4TzmJxUAE7/eTJk4/06NHjKb7bGIt6JDpH8Vt/N9l7dnc8dfaTcY9wJWG0YjKSEm2oFNh80ZhRVlb2NL/D+KP47SFTs3A1UFiQ9qOakglPjx7dKyMWgEcTbgX2+PHjs3j6hCX8fMjXw1We2T/+NZCTY//65jeGLRk/vjuGdaNqwaN1NavA5salnz179jl+9evO+O+WxKxhrIYCA2mrtq71xdwLNt7P+Zp4kacLA+0W1vZoWG4BO4197McM2GH1V8LunJPtuLP84FWPcQOidpHZ1XCjfCxppaWl32Ef+6GE7R1T8bA1UJDveOjUnvHfAQ+8CBthl+uvgK6EGy6PAru4uPj23r17z/VXCZOeOhro1cs5t3T7uNu5xQJ4l7nGXQU3KqzGsfmF0+v79+8/P5oTR6YOKgnYUjfZ+vdLm7/vg7HXtwEOTroE8K6AWyy2kx9ZHTdkyJAlbY1IwJ4wVe4KDTAgacMHZy3Z9vbl47h83MkEhxEHvCvgRpnOefPmFfF49lLMU83rRowGPDRgs1POpRdlLZ33xJAi3iCAe+QJdyXSZ4sCmyuVwY+truA5RKaFW0Gzf2gaiNehQH+tqKt3vZkzaAOeRWnkRZ4m9Jc9pPRIWm6cKMrPPnz48HcN2CH1Q8pmzs6yTzux+8rvsgJkiDBiBjdScAvY8LOv4hd58UyBEaOBoDRQ1DPtEfa/r+LMEX2SMFJwoxzHE0880Yv97AXsZ6OSRowGgtIAeLl0VNaCJx4d0ot3wL9/RLiMxF8AKgKY4WcvY3dkOseNxEgDieZz62qqq29dlTNo422cFhH/O9wzBCeHgptfOHjAgK13lYmHqoHsLMf0ozvHPcD7yehJWMY3HLgtsBcvXnwB34F8ONTGmPxGA94a6FuU9vDiZy6+gNPDBjxcuNXoyA033PA4+01mLmzvnjLrIWuA36jP/dcb8h7nHcMePeks3JbV3rp167X8sVF8NMmI0UBENJCXa7/xo3fGXsuFhWW9Ows39nNed911uRdeeOEvI9IiU4jRgKaBi0Zk/vK663rDGxDAta3BRTsDt2W1n3/++Vk8jfDQ4A5lchkNBK+BNKdt6OJfD5rFewjcIV9chgq3BTZ/UGkY36wxz2cH318mZ4ga4Js7Dy1fMHpYZwHvDNzqIpI/1fEkX0Sab8+E2GEme/AasNltmdO/kP8k79Gpi8tQ4Las9rvvvjuBXxe7LvhqmpxGA53TQE6O7bp1r4+RW/PgNWj3JFS4ldXmW+zfY6vdudqavYwGQtAAOONb89/nXUK23sHCbVnt119//TKelmFqCPUzWY0GwtJAbq596j9eueQyLiSki8tQ4IbVdl555ZWzOTRmO6zuMjuHpgGbbfxlOeAOcIPDoPgLBm7LavM3H0fl5+d/KbSKmdxGA+FrID/P/qWXXxw1iksK2noHC7ey2pMnT8bQXzD7hN8aU4LRgIcGbPYpV3UDf0Fb70CgitV2LFq0aAhb7RkexzMrRgNR1ADPezJj0fyLhvAhYWzBbofuSbBwO6dOnfogX7miUCNGAzHRAA+cOP5lSt6DfPCgXJNg4HawO5LDs0XdFJMWmYMaDWgaKChw3DR5ck/MqBDwwrIjuMUlwTQN0/lzHvjuoBGjgZhqwG6ngmfnDsTbXgGtd0dwY5u6kBwwYMCt5qZNTPvUHLxNA+BwYP/0W3lVLiz9MuxvA6w2FsecOXN68fPaX2wr2wRGAzHXQF6O44tzZlsvEwur7erVEdzY5rz77rtv5s9S49anEaOBuNCA3W5L+/rt3W/mynTomnQEt3JJ+JvrmA3IiNFAXGmgX1FawC+m+YJbzLxjyZIlI/mNdtzTN2I0EFcayMqyXfbS7y4cyZWSURNw6yH+4MYOjokTJ95iLiQ99BX3K271Tx331Qy7guBy0vg8WG/FKoft4IbP4i3IpPztwsLCz3tvNOvxrYEW23iqKPs9VxKfnUlc4fncPSrvtUpYb2lygU+/frc33JZLcs899xSwS3KpxxFSdMVWv4dsle+Qzd0c9xqAGevm/AJVVBSTy+ViCDwhQQN8JLVLc1P7/bz39VXOuTye+/rK5zvNcz+U1ZG4XO5Lb5teWbBs1QHMUCXsWoV4w42yYLUd99133yQ2/dBVSoutbhc5997MmkscS4hOK2hxU1mlb7h9daj3f7r3uq99Yp3GJ67jnqktk5atopVcF3Dr0UnecKNNCu5+/fpNNv42m4PyN8jWdDTW/Rjy8TF22yPLTWeriFyWLQu5mLjeAbD26eaezMHfeQG3SLJaiwRdsK7g5icAJ+kbUjVuc+OziYkpPD0Cdc/nDk0EM9xJFedn2ybyrvizEnatknS4oQIsjlmzZvXMzs6+0MplIgmrAQHcwT0tHZxMYXaGe9QDX03vCW55kaap/vIFt33mzJlXt2VUmcxPYmsAgBfmsWkD4Nz9SbbYvnq1G7yC5Q7hRgYH35W82vjbiQ20d+11wL23JfI6OO1TSIBbXBMArsTbciu4eU4Sc1dSNJREoQKcZ9+DBY+U4F8AIv8GEleJUfrJyiTw2g5uGS0R2hXcPL79mSjVyxwmyhpwwkXJdVNFTeRGUQRwNEXiEkajedkZBF4FblUN/nHr5zDi9p/85Cd92NSzh2YkWTUAwAtgwcWkJXhD+UTKm3VLWh9uhmJYmiNwo5lY7Pw8yXDZaMLk1YAArkZRuOdhaRN5mXSxDdyCZ2FZrUgPKrj55s1QczEpKknuEIB347cRYcGFiEQMUf++3V1DubcEbtVx7Sw3v3UzLLm71LRO14AADqudyJKbaQO3ArdqjQ434naeB3CIsdyJ3M2h110Aj+QoSui16Pwe4DUnm4ZwCYphDhXcGC2Rcxahg0dKkMlIimkAgOdnu6mqzvdTg/Gujqx0G7jFiInFM0iHIME+atSo9MzMzAEqxfyknAbOAc4gMBWJdnGZke4eMOozmengmBcFuA63bdq0aYV4jDDletU02NIAAM/LOge3lZgYEceUMa2FXFWAbcEtKzaen4RHP42kugYE8M6Mg8uFqVh+6FLSfOlVtnU2v+yHcFCRG/xaPOt3KG29evUyN2989UAKpgHwXH4evKZee0A6SD0IsMgucQl9FaFvk7iEgfLr27vnucGvwK38E9lu42FAY7lFGyYkZcGz2YkFLgkg+TkOsdyqtjJaomjnZ7gN3AnQidGsosOhWXDrHZdo1iC4YwHgzEzfbglKsBm4g1NkquUSwGsb4neYEG5MTjp5WG6P0RIeBswxN3BSDd3g2gvAc/irox35wsGV1DW5UK/0DDemNlZeCI5ijQkikT91jY1GjAZ8asAX4AI7Qj3us4BOJOpl6nFfRaU77AI3Ntv00RK+gDBw+1KaSTuvgXOAu6mOZwqRuUcEOuSSuITn9+x8TC9L4hLqpTqdynIjCdbbc+6t1tbWFiQaMRroSAMAnF/MpXoA3lHGKG9rddk8+BWfG9WwNTU11fqaoSjKdTSHSwANAPCsjDYTGQf1xb9IYzPVclWU1UaVdLipoaEBG40YDQSlAR1wuYrzDlGQRZuPUmWb937+1r3L0/fnuQM9+NXhdhu4fWjfJHWoAQtwocwrtyQHC6vX7u1WvctDBkmrb7YBbstTErhVQl1dHb82asRoIDQNAHA8j+frIi+0ksLLzRe5wq/iGaMlQrq7oqLCw6yHdyizdypp4JwFd1MDzz4noyjRbD9OrMpaD8vtlqFAAO4uLy8X8qNZL3OsJNEAf6uGLfg5wKPdJMBdXuMCv4plHF/cElWX06dPV5vREqUK89NJDZwDPPouCv4tTpVTtV5tgVvRvnv37hoDt64eE++MBgB4Bs+hDGvqvaA8pIlIXPIhXdIkjx7KNskvIa4q9xyyA24Py40ViHvlypXVPNbNMzobMRoITwMW4F7FeMOJzZKmxwVa71DPg7hIczNVvba+SdwSJFszTgntbh4xKTHWW1RmwnA0AMDTYcG5kK5ccAXLIyUlfBiLY9Rb3BLEscFVW1tbghUjRgOR0IAFuOaKRKJc7zJqG2wlnObiRTwRBbfQjg0uHg781Fhu1oSRiGkAgKfxuJy3ixGpdVS0qtb9KQeKYQ4V02K5BXA3j5gUI7MRo4FIakAAj2SZelmnKuggr1scYxvg1hNaecTkoLHcUI2RSGtAAI+UxZZyUM89h1wwyviamcWzWG5sVyZ94cKFn/L3CxE3YjQQcQ0AcCfPjAMwIyVMq2vhasenXJ5iWMoVuIV2165duxp4xOSYZDCh0UCkNaADLtY3nLC+yXZs14EmfsPTuqAEz9ZoiQU3p7XW1NQY1wTaMdJlGsC7urDg4Qpc6JoGN/xtuCSw3MKyB9xi0l0nTpzYbPzucNVu9g+kAQE8lDFwlOnh0TDKJ8tsmznZ4pfjHpYb+yABGVq3bNmywbjdUImRrtYAAHeE4IML2HJC4OvIW/e3buB66pZbVbudz41MP/3pT3fziwvmNnxX96wpX2kAgHd2ZtnGFqr68QuO3eCWF59uCQ5iWe7q6uqms2fPbjWuCdRiJBoaEMBDORb4LKugLYwrvmGuw62KEcuNFQtujrccO3bsAwO30pH5iZIGBPBgR05QrWNltk0c4K33gHADcGRq2bBhw3rjd7MmjERVAwAccAcj8LfX7Wxdz3kFbvCLRYleDOIYnOEX9tWca93OnDmznmd+7aFypuiP48jjhMVIdDUQjNdQVecuK7iheSLXrJIXPO7KM6ko46wAl9fMOE0Rj0Q1YsJhC8O9mT+Vfb09Ub8EhFaFKc2taVReYRmDMEszu4eigY4Ad7HZPnyKMAQoVtvjYhLH0eHGusCNHVr27du3euDAgRGF21axm2zH1pLN3Yzjxb3YG89Qel02PzIM3bUXf9jjtSdf4i8def3s4veFW39l+StHHaODjaGW5zd/R8fw08pQy2ppddOuva2rGVPFKrdN4EYzlehuCRKwDuB5Pk/KGzlyZM/169e/z5/vi8gXFwC28x9fZrDh1ieOVNW7cBcscSqcAjWtbXRXf/l/K6/ed6rpDDcXr5fh9jtAtzrKl+XGRtDXzJa77siRI6tHjBhxUyRcE9vhV8lWe4SLTizJR3XZLtRiwMlIzDWAx/qOn6HV+04Rf1iQ4AKAV3Brgc1x6/Y74iIw71hwFjTxqMlKniBTtoUV2lyJS0c+f+GLJzc3EgcaYI+EthyilVwVAAVOhVmP2unj3LJBLLfyZe6///5NVVVVRzty7mXHZA8BeC6PJcF3M0tsdADbzF94OPq9P5OMb4NTsdweCPqDWwCHyW8uKSl5zcB9Tm95fDWSg8FSIzHRAC48SyvoNT64YpNDARvMeogvuJEBZh474axo5ikf/trM784bOacBATzYO2kmH1t5/quLxNLCCK/aSX8Fl7yI1Qav7cQf3DgLLL/7ySefLC4rK9turPd5/QHwbOODn1dIFGKw2uW1tP3/3qZiPpzub7ez2qhOMHDj7GjasWPHSy1qSBG7GYEGlAVnwI3/HR0dtLK53XWCXmLVC9hgE0Y4JLg5v9oBO8L8N82cOfM1nvah1FhvqOa85BoLfl4ZXRiD1a6sp9L7lil/G3CDS79goyr+LDe24Wyw/G5+9axh+/btf4jUsCAOkCwigEfCpzRl+PbN8ZDUzhP0h5oadbNG97d9Wm2wFQhuAVxZ729+85t/raysPGmsd/vTEoBn8dRhRiKvAWW1G+jk7OXqQlKstt9REqlBR3AjD8w+CgHcjUePHq3duXPnImO9WRs+xFhw31Y33H8jWO29J2jR0Qr1QSc8+QcewSX49CuB4IblRgHqopLDxm9/+9sr+E2dMmO9fesUY+DGgvvWTWdSYbVrmqjsxytpBfjjRS4mO/S3caxAcCOPWG8FOD9vUrVnz54XjfWGanyLAG5GUcIfRcFzJPtP0ov7jhPe6RWwA1pt9EwwcIv1Vn4379M4Z86cl9h6VxrrDRX6FgW4GQf3rZwgU2G1qxup8ud/V8N/YrXBYUCrjUMEAzfyifVWvvfGjRvLN2/e/LS5awnV+Bfc5MnCOHiE7s6lWjktTN22Unp6awmVs5aD9rWlR4KF29t6N8yYMWMFT96z07xnKar0HQLwTDOK4ls5HaTCHTlVTTvvWqR8bTyrLaMkQVltFB0s3MjrYb358yL1y5Ytm8vzm7iMewL1+BcB3PjgwfnguMPC85G4Xt5Gc3nShnrWbMhWG70RCtztrPfDDz/88f79+/9sLi79gy1bBHBZN6F/DeA2+4Ez9OdfvE4fc65OWW2UHgrcyC/WG38ROJsavv/97/+Gb8ufNdYb6ulY4H/DRUk13zmU9kKDlY109sd/pd9wFGDLhWRQIyTYXyRUuGG9cRAMC+Kg9e+9914ZX2D+mt0UXjUSSAMAPMP75b5AO6XQ9iama0sJ/XrjQSrjZotLAt7AHfgLWkKFGwUL4GrkhNfr+eJyJd+93Gbck+D0LoCHYtFSIS/uRJ6oom23v6BeIROwwVnIYKMnOgs33BPrriXHG+bNm/cIv45WY0ZPoNbAIoAHznk+By5IIXJhKnGV2JYuaXpe2R4o1PfR4/720/PocX/5O0rH6EhlA9U88096hPPp7gg4A28hWW0cqzNwYz/xvS3r/dxzzx1cvXr1L3j0hOfZCLkeKDPlBP43XBSAEcwCBQlEelz21dP0uGwPFOr76HF/++l59Li//P7S20ZHaO0++sXv31cfbvK22uAtZOks3DgQDijWG2da/V133fXm3r17l5ubO1BPcALA01PcB29mp4OnaVj+jcX0JmsNYMsIiVjt4JTplSscuGGeAbhYb1So7pZbbvnV8ePH9xr/20vTHaxaFpxNWyr41nob4WefrKG9dy6kX4EfXsQlAVfgq9NuQAS+SsKHPy829rt5gquWDydMmPCVjIyMdMzaKWI/8S5hMdJeA+r7MNyN6GwR0Zy/v/NIp+O4ckw9LsfR0/S4bA81xAx1VQ1U+8s19K1/7qVjXGYtL7Dc8oCUpg0cMTQJx3LjSDi4t3tSN3/+fPjfjxn/O7TOyGAXJQ2f0ODdsEAkPLfWtb9yLH/HD7Q9lNrhsqyBnY639tJjv39X+dlitQXssKw26hIu3ChDABf3BGdeHfvfq/jR2BVm/BsqCl4E8OD3SMycGM/ec4JW3LuYVnELADa4wb2TsN0RLkNJJOBGQTjLMBbpAfj06dOfLC4uft8ADhUFLwAcF5m6b5pMcVxAlpyl9298jp5krXiDDY7AU9gSKbhREVhwffSkjt+3rLn55pt/WFpa+rEZQQmtrwA3XJRkE4B9pJw+/trz9MPKOjVhvLc7Ao4iIpGGW/xv/L2o0ZMDBw5U8HyDD/HjscUteEDXSNAaEMCTxWrjgaiT1VT84Ev00IFTVMGKELDBiwz7RQzurrYNqqKHDh1q4tvzGyZfmHVNbsUHufz5byNBasDRZn7kvpiuOokj9LXgEJJHj/vKK/kk7Ex+7KOLlIUQdyBP19CJOa/Q/W/soSOchJERwB1RP5vLs6Qr4PZ55vHFZb2r1b1lXNHRa/muXKYB3OqDgBFfgOvg+CtAz6PHuyo/jqEvOA7WYbF5GrSKX71NDyzaQAc4SYb88O+O67SI+dlcliVdATcKB+CyyMFsH+w6WsnTAO+8pD9dx4CnGcBFNYFDAVwfBw+8V+xzAGyeKar+D+vpu798k7ZzjWCtxR3Rh/0iXtmugluvqECO0MbPD5zpmUs7RvamKQx4Rgp/S0rXUVBxAVwpkk1ivPviAPtsPVUv2Uizfvaq+jgToBarDbBhsdGcLpFowo0GqIas3kOnud0fjBlAk/nWc450Wpe0MMkKFV3BB9ddgHiLtzC27GOfmvcWPTj3DfqIuwFQY4ErolvshIab22KdnWiIasyGYqrkZwreu/ICmsivYBVIpyGzkY41IP92cpHZce7ob23icY/jVXToZ3+jB55fR59wDfCNSN1iR3xkxFcro2G55bhyhlqAf3yEanccp7WfG05j+XszRQAcf7VGAmsgHgHHyQawedqzXQ8up/949WNrVEQHO2J3IANpKZpwS10EbhV+eoYaV++lt68dRaPyM2mAAVzUFDgUwJEz1v436oBb6p+W0cZbX6CHNn1KpzkJUMPP1h+GYo/U+ifnaNdJtOHWwZZGus/UUMufPqS114+mfvkZNNxpLHjQPS6Ax9JFwRh2Hdtjnqzy9WnP0k9Ky9QNmpiCDQVGG27pNB1yxF31jeT63Xu07ooLqLx3N7oy3UFO6TjZyYS+NaAPqUbbgquhvkZq5FGwX13/ND3L/YgPnsLH9jXch76OmsQKbjRQQd0WWrAv30r7bXbaOLIPXZHppG7GTQmOBQ/AeZeuHj1B7/HEOXSikg4/vZZmzV5Ba/mwsNbiX8uoiNygQR9HVWIJtzQUjYaLYrkp6w5QOfvhb04aSn3YDx9m3BRRVcehAN7VFCk3hAfz9p6kN29fQD9Y+REd4poJ2GKx9TuPXV0ln4qJNdxotPeiQD9dTc3sprw39gI60zufxsFNkb9cny0xiUoDMtrUFTTBr1e30huo8e399D/TfkPPcj9V8oF1/1qeFRGLHbOeiTXcaLj0g1hvPXSv2EqfuG20bngRXc43fAod/H8rHRgzrcX5gS39tOlKjEI4IcDGmzPHKql43ts0i7/g+y6rQe44yoiIgC19GFNNwTWLF0FdcLJh4cf1Cd/p5Q9SqyW7ex7lLL2X7vjsILq3WyZ/vIBzWZ3ImYy01wDch3AFUOMZbJ5TpH7rYVrAs64uPVvtYan1N2hgrbGIwQr38GHtHw+WW28AlCKLnP0IW+ubyLX0A9pxqIzWXNib+vLk7oPlYtNArqvwfDwcvYgLUsu2eP9pemfOSvrBwyvpHe4HuCAyGgKwvZ/siwuwoYV4styojwieYsaCGT14dj1lxfl7YZYlz3j2drr6Xy6m2T3zqD+PqpAZNmTt+BGAiiVYgcWHC8L3H46+toOeenAZvc/7wuUAzAI01vVnRCLwP8ElRlDiFW40EXUTwAVyAG4tA3tR3oI76J4xA+mOvHTKgKtiIIfq2kswcANquCDVTdTIj0YsvXcpLSo9rcatYZ31RaDmU8Aa5Wp/0BinxDPcUA3qhwXuEwCHLw5LbgGO+MyraNCDk+nuEb1pOrsr6TyyYiBnxXiLP8ABNW6dswvStP8UrXrmPVr8x410mPfXgUYcUGOID1CLbx3CfwLvFUWJd7hFFagnrLhALq4KLjoF9IyvXkb9Zk+lmSOK6Cv8XfZMfl7cQC4a9BECatyIqW6gBob6b0+toT/+5SM1OQ5cDgEbcd0FAdRwQeIWaq6bkkSBG5VFXQVyWHFxVQC4QK7iU4ZTr4e/RLeN7kdfzcugXAU57xnOBRYfIykE1htv8yioG6lm1zH6y3/9nZat/UQ96CQgA2yJ+3JB4h5sdFYiwS1wCeDe/jjAFosOa57+2c9Q4X9/mW4Z3Zdm8J3OQszJJ3c7Uwl0AI0Fkw80sFPBU5iV7zpOL//0VVqx9VP1pTAALEAjrltq8asTwlpz3S1JRLil8gI5XBUs8MdlfFwgV8AX5lHW4zfSxCsG0vUDu9NEfnY8Xax5Ml+Awu0QK13bRE2lZ2n9llJ6g4f11pdXW4+h6hYacfjUcus8YVwQrnM7SWS40RjUXyAXn1wgB+ACucTTxw2mbj+cRlNH9aZp/QroYobcpmZ3QkFcUiJbdLHQ8Bnw0gC7Hu5jFbRzDz8Dwi/nrtlUom6VwzLLIhYa6zrUsNJiqRPCBeH6tpNEh1sa5AtyfXQFcAN6gVydAHdNoAF3j6PpQ3rQlIIcGoxRFoCubg5x5niHXYcZz3wAaIx6VNRSSXEZrV28iVYt2UBHuCkCrkCNdT0O10OsdMJDzW1Rkixw6+0R0MVd0V0WuQgV0MXKO798CRV9bRxdMbQHje3TjS7n0Za+cF0wdq7DjgPFwroDZIgCmkPAjDHpttGO4/zo6YcHy2jbnzbRlld30CnOAmB1qAVoPR1Ay4IjyMLRxJdkg1vvEbQNroq4KwI7ABeovUNsQz7nzHHU78YxdMWQnjSWn0q8LDuNemIObVyQAnbrwpQzQ3Tg9fi5rYF/BV7klLgijX9wIQiYEeKtcn7r5czJKvqo+AxtW7mdtvxxkxq+E+urwytwSyh5BGgu0XI/AlcywXIkM9zSFWLJBXSEFsQcB+BYF+glriBvS7dPGU6FUy+iwcOKaFBRPg3qlkUD89NpIFv4fmzdnQAez1OLK6POLK91bBPLq0IGFxd8AjHSsN5mlVt4/PlYVROV8qQ2paeq6DDPr3d4zW4q4WE7fAsdYAJWAVbiANk7DpiRJjAjVIflMGkFfZAqgrbqC+AF6Ahl8QU20mS7vo86WXIzyfm1K6jfZQNpQEEm5fP0w1lZaZTNw47Z7L9ns4XPZl8+i61+NsOdwQA3svWtY9+4ni1xHfvJdTw8V1fPS2Mz1Vc0UNVHpXTkT1voWE2DB5AAFFCK1RVgBWR9Xc8j+wjMEnJRyS2pBLfekzrkiCtQOdThFaB9wS0nhYRShne5so5jIy4CwCACmncolhWQCpwIJS7wAmyJ+8rrXS5nTx3RFZ46rfZsqQCohwK7Hgr4HaXpZUgcR9PjWBfo9LikIRSQBWZ93V8a0vUyJI5jpKRA6UY8NSAgeoeAGmmBQu/9UDrSvAXwQQRCPRRQA4X6PhI/V6r59al0oxZPDQisSPUVlzQ9lLx6iLi3AEiIHgqk3qHk886rCjA/7TWADjESugZ0vUncO5RSJV3W9VBAlTRZ9w6xXdIkrwkDaKAjxQfY1WwOoIFQdGvADaDMzmz+f6SMYEX4z7hMAAAAAElFTkSuQmCC' // @suppress longLineCheck
- };
-
- return {
- FaviconsByHue: FaviconsByHue
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/file.html b/chromium/third_party/catapult/tracing/tracing/ui/base/file.html
deleted file mode 100644
index 5c99f4604e9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/file.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- function readFile(fileBlob) {
- return new Promise(function(resolve, reject) {
- var reader = new FileReader();
- var filename = fileBlob.name;
- reader.onload = function(data) {
- resolve(data.target.result);
- };
- reader.onerror = function(err) {
- reject(err);
- };
-
- var isBinary = filename.endsWith('.gz') || filename.endsWith('.zip');
- if (isBinary)
- reader.readAsArrayBuffer(fileBlob);
- else
- reader.readAsText(fileBlob);
- });
- }
- return {
- readFile: readFile
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table.html b/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table.html
deleted file mode 100644
index a0e52e85697..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table.html
+++ /dev/null
@@ -1,230 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-b-grouping-table'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #table {
- flex: 1 1 auto;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
-
- function Row(title, data, groupingKeyFuncs, rowStatsConstructor) {
- this.title = title;
- this.data_ = data;
- if (groupingKeyFuncs === undefined)
- groupingKeyFuncs = [];
- this.groupingKeyFuncs_ = groupingKeyFuncs;
- this.rowStatsConstructor_ = rowStatsConstructor;
-
- this.subRowsBuilt_ = false;
- this.subRows_ = undefined;
-
- this.rowStats_ = undefined;
- }
-
- Row.prototype = {
- getCurrentGroupingKeyFunc_: function() {
- if (this.groupingKeyFuncs_.length === 0)
- return undefined;
- return this.groupingKeyFuncs_[0];
- },
-
- get data() {
- return this.data_;
- },
-
- get rowStats() {
- if (this.rowStats_ === undefined) {
- this.rowStats_ = new this.rowStatsConstructor_(this);
- }
- return this.rowStats_;
- },
-
- rebuildSubRowsIfNeeded_: function() {
- if (this.subRowsBuilt_)
- return;
- this.subRowsBuilt_ = true;
-
- var groupingKeyFunc = this.getCurrentGroupingKeyFunc_();
- if (groupingKeyFunc === undefined) {
- this.subRows_ = undefined;
- return;
- }
-
- var dataByKey = {};
- var hasValues = false;
- this.data_.forEach(function(datum) {
- var key = groupingKeyFunc(datum);
- hasValues = hasValues || (key !== undefined);
- if (dataByKey[key] === undefined)
- dataByKey[key] = [];
- dataByKey[key].push(datum);
- });
- if (!hasValues) {
- this.subRows_ = undefined;
- return;
- }
-
- this.subRows_ = [];
- for (var key in dataByKey) {
- var row = new Row(key,
- dataByKey[key],
- this.groupingKeyFuncs_.slice(1),
- this.rowStatsConstructor_);
- this.subRows_.push(row);
- }
- },
-
- get isExpanded() {
- return (this.subRows &&
- (this.subRows.length > 0) &&
- (this.subRows.length < 5));
- },
-
- get subRows() {
- this.rebuildSubRowsIfNeeded_();
- return this.subRows_;
- }
- };
-
- Polymer({
- is: 'tr-ui-b-grouping-table',
-
- created: function() {
- this.dataToGroup_ = undefined;
- this.groupBy_ = undefined;
- this.rowStatsConstructor_ = undefined;
- },
-
- get tableColumns() {
- return this.$.table.tableColumns;
- },
-
- set tableColumns(tableColumns) {
- this.$.table.tableColumns = tableColumns;
- },
-
- get tableRows() {
- return this.$.table.tableRows;
- },
-
- get sortColumnIndex() {
- return this.$.table.sortColumnIndex;
- },
-
- set sortColumnIndex(sortColumnIndex) {
- this.$.table.sortColumnIndex = sortColumnIndex;
- },
-
- get sortDescending() {
- return this.$.table.sortDescending;
- },
-
- set sortDescending(sortDescending) {
- this.$.table.sortDescending = sortDescending;
- },
-
- get selectionMode() {
- return this.$.table.selectionMode;
- },
-
- set selectionMode(selectionMode) {
- this.$.table.selectionMode = selectionMode;
- },
-
- get rowHighlightStyle() {
- return this.$.table.rowHighlightStyle;
- },
-
- set rowHighlightStyle(rowHighlightStyle) {
- this.$.table.rowHighlightStyle = rowHighlightStyle;
- },
-
- get cellHighlightStyle() {
- return this.$.table.cellHighlightStyle;
- },
-
- set cellHighlightStyle(cellHighlightStyle) {
- this.$.table.cellHighlightStyle = cellHighlightStyle;
- },
-
- get selectedColumnIndex() {
- return this.$.table.selectedColumnIndex;
- },
-
- set selectedColumnIndex(selectedColumnIndex) {
- this.$.table.selectedColumnIndex = selectedColumnIndex;
- },
-
- get selectedTableRow() {
- return this.$.table.selectedTableRow;
- },
-
- set selectedTableRow(selectedTableRow) {
- this.$.table.selectedTableRow = selectedTableRow;
- },
-
- get groupBy() {
- return this.groupBy_;
- },
-
- set groupBy(groupBy) {
- this.groupBy_ = groupBy;
- this.updateContents_();
- },
-
- get dataToGroup() {
- return this.dataToGroup_;
- },
-
- set dataToGroup(dataToGroup) {
- this.dataToGroup_ = dataToGroup;
- this.updateContents_();
- },
-
- get rowStatsConstructor() {
- return this.rowStatsConstructor_;
- },
-
- set rowStatsConstructor(rowStatsConstructor) {
- this.rowStatsConstructor_ = rowStatsConstructor;
- this.updateContents_();
- },
-
- rebuild: function() {
- this.$.table.rebuild();
- },
-
- updateContents_: function() {
- var groupBy = this.groupBy_ || [];
- var dataToGroup = this.dataToGroup_ || [];
- var rowStatsConstructor = this.rowStatsConstructor_ || function() {};
-
- var superRow = new Row('', dataToGroup, groupBy,
- rowStatsConstructor);
- this.$.table.tableRows = superRow.subRows || [];
- }
- });
-
- return {
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker.html b/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker.html
deleted file mode 100644
index ad24d1b6b7e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker.html
+++ /dev/null
@@ -1,414 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/dropdown.html">
-
-<dom-module id='tr-ui-b-grouping-table-groupby-picker'>
- <template>
- <style>
- :host {
- display: flex;
- align-items: center;
- }
-
- :host(:not([vertical])), :host(:not([vertical])) groups {
- flex-direction: row;
- }
-
- :host([vertical]), :host([vertical]) groups {
- flex-direction: column;
- }
-
- groups {
- -webkit-user-select: none;
- display: flex;
- }
-
- possible-group {
- display: span;
- padding-right: 10px;
- padding-left: 10px;
- }
- </style>
-
- <groups id="groups"></groups>
- <tr-ui-b-dropdown id="add_group"></tr-ui-b-dropdown>
- </template>
-</dom-module>
-
-<dom-module id="tr-ui-b-grouping-table-groupby-picker-group">
- <template>
- <style>
- :host {
- white-space: nowrap;
- border: 3px solid white;
- background-color: #dddddd;
- cursor: move;
- }
-
- :host(:not([vertical])) {
- display: inline;
- }
-
- :host([vertical]) {
- display: block;
- }
-
- :host(:not([vertical]).drop-before) {
- border-left: 3px solid black;
- }
-
- :host([vertical].drop-before) {
- border-top: 3px solid black;
- }
-
- :host(:not([vertical]).drop-after) {
- border-right: 3px solid black;
- }
-
- :host([vertical].drop-after) {
- border-bottom: 3px solid black;
- }
-
- :host([dragging]) {
- opacity: 0.5;
- }
-
- #remove {
- visibility: hidden;
- padding-left: 3px;
- width: 20px;
- height: 20px;
- cursor: auto;
- }
-
- #key {
- padding-right: 3px;
- }
- </style>
-
- <!-- TODO(eakuefner): Use an iron-icon here once
- https://github.com/catapult-project/catapult/issues/2772 is fixed. -->
- <span id="remove" on-click="remove_">&times;</span>
- <span id="key"></span>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- Polymer({
- is: 'tr-ui-b-grouping-table-groupby-picker-group',
-
- created: function() {
- this.picker_ = undefined;
- this.group_ = undefined;
- },
-
- ready: function() {
- this.setAttribute('draggable', true);
- this.addEventListener('mouseover', this.onMouseOver_.bind(this));
- this.addEventListener('mouseleave', this.onMouseLeave_.bind(this));
- this.addEventListener('dragstart', this.onDragStart_.bind(this));
- this.addEventListener('dragover', this.onDragOver_.bind(this));
- },
-
- set group(g) {
- this.group_ = g;
- this.$.key.textContent = g.label;
- },
-
- get key() {
- return this.group_.key;
- },
-
- get picker() {
- return this.picker_;
- },
-
- set picker(picker) {
- this.picker_ = picker;
- this.vertical = picker.vertical;
- },
-
- // TODO(benjhayden): Use data-binding?
- get vertical() {
- return this.getAttribute('vertical');
- },
-
- set vertical(vertical) {
- if (vertical)
- this.setAttribute('vertical', true);
- else
- this.removeAttribute('vertical');
- },
-
- onMouseOver_: function(event) {
- this.$.remove.style.visibility = 'visible';
- },
-
- onMouseLeave_: function(event) {
- this.$.remove.style.visibility = 'hidden';
- },
-
- onDragStart_: function(event) {
- event.dataTransfer.effectAllowed = 'move';
- this.setAttribute('dragging', true);
- },
-
- onDragOver_: function(event) {
- event.preventDefault(); // Allows us to drop.
- event.dataTransfer.dropEffect = 'move';
-
- this.picker.clearDragIndicators_();
- if (this.picker.shouldDropBefore_(this, event)) {
- this.classList.add('drop-before');
- if (this.previousElementSibling)
- this.previousElementSibling.classList.add('drop-after');
- } else {
- this.classList.add('drop-after');
- if (this.nextElementSibling)
- this.nextElementSibling.classList.add('drop-before');
- }
- return false;
- },
-
- remove_: function(event) {
- var newKeys = this.picker.currentGroupKeys.slice();
- newKeys.splice(newKeys.indexOf(this.key), 1);
- this.picker.currentGroupKeys = newKeys;
- }
- });
-
- Polymer({
- is: 'tr-ui-b-grouping-table-groupby-picker',
-
- created: function() {
- this.currentGroupKeys_ = undefined;
- this.defaultGroupKeys_ = undefined;
- this.possibleGroups_ = [];
- this.settingsKey_ = [];
- },
-
- ready: function() {
- Polymer.dom(this.$.add_group.iconElement).textContent = 'Add another...';
- this.addEventListener('dragend', this.onDragEnd_.bind(this));
- this.addEventListener('drop', this.onDrop_.bind(this));
- },
-
- get defaultGroupKeys() {
- return this.defaultGroupKeys_;
- },
-
- set vertical(vertical) {
- if (vertical)
- this.setAttribute('vertical', true);
- else
- this.removeAttribute('vertical');
-
- for (var groupEl of this.$.groups.childNodes)
- groupEl.vertical = vertical;
- },
-
- get vertical() {
- return this.getAttribute('vertical');
- },
-
- set defaultGroupKeys(defaultGroupKeys) {
- this.defaultGroupKeys_ = defaultGroupKeys;
- this.maybeInit_();
- },
-
- get possibleGroups() {
- return this.possibleGroups_;
- },
-
- set possibleGroups(possibleGroups) {
- this.possibleGroups_ = possibleGroups;
- this.maybeInit_();
- },
-
- get settingsKey() {
- return this.settingsKey_;
- },
-
- set settingsKey(settingsKey) {
- this.settingsKey_ = settingsKey;
- this.maybeInit_();
- },
-
- maybeInit_: function() {
- if (!this.settingsKey_ ||
- !this.defaultGroupKeys_ ||
- !this.possibleGroups_) {
- return;
- }
-
- this.currentGroupKeys = tr.b.Settings.get(
- this.settingsKey_, this.defaultGroupKeys_);
- },
-
- get currentGroupKeys() {
- return this.currentGroupKeys_;
- },
-
- get currentGroups() {
- var groupsByKey = {};
- for (var group of this.possibleGroups_)
- groupsByKey[group.key] = group;
- return this.currentGroupKeys.map(groupKey => groupsByKey[groupKey]);
- },
-
- set currentGroupKeys(currentGroupKeys) {
- if (this.currentGroupKeys_ === currentGroupKeys)
- return;
-
- if (!(currentGroupKeys instanceof Array))
- throw new Error('Must be array');
-
- var availableGroupKeys = new Set();
- for (var group of this.possibleGroups_)
- availableGroupKeys.add(group.key);
- this.currentGroupKeys_ = currentGroupKeys.filter(
- k => availableGroupKeys.has(k));
- this.updateGroups_();
-
- tr.b.Settings.set(
- this.settingsKey_, this.currentGroupKeys_);
-
- this.dispatchEvent(new tr.b.Event('current-groups-changed'));
- },
-
- /**
- * @return {undefined|Element}
- */
- get draggingGroupElement() {
- for (var group of this.$.groups.children)
- if (group.getAttribute('dragging'))
- return group;
- return undefined;
- },
-
- shouldDropBefore_: function(groupEl, event) {
- var dragBoxRect = this.draggingGroupElement.getBoundingClientRect();
- var dropBoxRect = groupEl.getBoundingClientRect();
- // compare horizontally if drag and drop overlap vertically
- var dragVertRange = tr.b.Range.fromExplicitRange(
- dragBoxRect.top, dragBoxRect.bottom);
- var dropVertRange = tr.b.Range.fromExplicitRange(
- dropBoxRect.top, dropBoxRect.bottom);
- if (dragVertRange.intersectsRangeInclusive(dropVertRange))
- return event.clientX < ((dropBoxRect.left + dropBoxRect.right) / 2);
- return event.clientY < ((dropBoxRect.top + dropBoxRect.bottom) / 2);
- },
-
- clearDragIndicators_: function() {
- for (var groupEl of this.$.groups.children) {
- groupEl.classList.remove('drop-before');
- groupEl.classList.remove('drop-after');
- }
- },
-
- onDragEnd_: function(event) {
- this.clearDragIndicators_();
- for (var groupEl of this.$.groups.children)
- groupEl.removeAttribute('dragging');
- },
-
- onDrop_: function(event) {
- event.stopPropagation(); // stops the browser from redirecting.
-
- var draggingGroupEl = this.draggingGroupElement;
- var dropBeforeEl = undefined;
- var dropAfterEl = undefined;
- for (var groupEl of this.$.groups.children) {
- if (groupEl.classList.contains('drop-before')) {
- dropBeforeEl = groupEl;
- break;
- }
- if (groupEl.classList.contains('drop-after')) {
- dropAfterEl = groupEl;
- break;
- }
- }
-
- if (!dropBeforeEl && !dropAfterEl)
- return;
-
- this.$.groups.removeChild(draggingGroupEl);
- var lastGroupEl = this.$.groups.children[
- this.$.groups.children.length - 1];
-
- if (dropBeforeEl)
- this.$.groups.insertBefore(draggingGroupEl, dropBeforeEl);
- else if (dropAfterEl === lastGroupEl)
- this.$.groups.appendChild(draggingGroupEl);
- else
- this.$.groups.insertBefore(draggingGroupEl, dropAfterEl.nextSibling);
-
- var currentGroupKeys = [];
- for (var group of this.$.groups.children)
- currentGroupKeys.push(group.key);
- this.currentGroupKeys = currentGroupKeys;
- return false;
- },
-
- updateGroups_: function() {
- Polymer.dom(this.$.groups).textContent = '';
- Polymer.dom(this.$.add_group).textContent = '';
-
- var unusedGroups = {};
- var groupsByKey = {};
- for (var group of this.possibleGroups_) {
- unusedGroups[group.key] = group;
- groupsByKey[group.key] = group;
- }
-
- for (var key of this.currentGroupKeys_)
- delete unusedGroups[key];
-
- // Create groups.
- for (var key of this.currentGroupKeys_) {
- var group = groupsByKey[key];
- var groupEl = document.createElement(
- 'tr-ui-b-grouping-table-groupby-picker-group');
- groupEl.picker = this;
- groupEl.group = group;
- Polymer.dom(this.$.groups).appendChild(groupEl);
- }
-
- // Adjust dropdown.
- tr.b.iterItems(unusedGroups, function(key, group) {
- var groupEl = document.createElement('possible-group');
- Polymer.dom(groupEl).textContent = group.label;
- groupEl.addEventListener('click', function() {
- var newKeys = this.currentGroupKeys.slice();
- newKeys.push(key);
- this.currentGroupKeys = newKeys;
- this.$.add_group.close();
- }.bind(this));
- Polymer.dom(this.$.add_group).appendChild(groupEl);
- }, this);
-
- // Hide dropdown if needed.
- if (tr.b.dictionaryLength(unusedGroups) === 0) {
- this.$.add_group.style.display = 'none';
- } else {
- this.$.add_group.style.display = '';
- }
- }
- });
-
- return {
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker_test.html
deleted file mode 100644
index 1bbbc4f2057..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/grouping_table_groupby_picker_test.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/grouping_table_groupby_picker.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var picker = document.createElement(
- 'tr-ui-b-grouping-table-groupby-picker');
- picker.settingsKey = 'basic-test';
- picker.possibleGroups = [
- {key: 'a', label: 'A'},
- {key: 'b', label: 'B'},
- {key: 'c', label: 'C'},
- {key: 'd', label: 'D'},
- {key: 'e', label: 'E'}
- ];
- picker.defaultGroupKeys = ['a', 'b', 'd'];
- this.addHTMLOutput(picker);
- });
-
- test('allGroupsAdded', function() {
- var picker = document.createElement(
- 'tr-ui-b-grouping-table-groupby-picker');
- picker.settingsKey = 'basic-test';
- picker.possibleGroups = [
- {key: 'a', label: 'A'},
- {key: 'b', label: 'B'},
- {key: 'c', label: 'C'},
- {key: 'd', label: 'D'},
- {key: 'e', label: 'E'}
- ];
- picker.defaultGroupKeys = ['a', 'b', 'c', 'd', 'e'];
- this.addHTMLOutput(picker);
- });
-
- test('noGroupsAdded', function() {
- var picker = document.createElement(
- 'tr-ui-b-grouping-table-groupby-picker');
- picker.settingsKey = 'basic-test';
- picker.possibleGroups = [
- {key: 'a', label: 'A'},
- {key: 'b', label: 'B'},
- {key: 'c', label: 'C'},
- {key: 'd', label: 'D'},
- {key: 'e', label: 'E'}
- ];
- picker.defaultGroupKeys = [];
- this.addHTMLOutput(picker);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/heading.html b/chromium/third_party/catapult/tracing/tracing/ui/base/heading.html
deleted file mode 100644
index b83e46c9d47..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/heading.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel='import' href='/tracing/ui/base/constants.html'>
-
-<dom-module id='tr-ui-heading'>
- <template>
- <style>
- :host {
- background-color: rgb(243, 245, 247);
- border-right: 1px solid #8e8e8e;
- display: block;
- height: 100%;
- margin: 0;
- padding: 0 5px 0 0;
- }
-
- heading {
- display: block;
- overflow-x: hidden;
- text-align: left;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- #arrow {
- -webkit-flex: 0 0 auto;
- font-family: sans-serif;
- margin-left: 5px;
- margin-right: 5px;
- width: 8px;
- }
-
- #link, #heading_content {
- display: none;
- }
- </style>
- <heading id='heading' on-click='onHeadingDivClicked_'>
- <span id='arrow'></span>
- <span id='heading_content'></span>
- <tr-ui-a-analysis-link id='link'></tr-ui-a-analysis-link>
- </heading>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-heading',
-
- DOWN_ARROW: String.fromCharCode(0x25BE),
- RIGHT_ARROW: String.fromCharCode(0x25B8),
-
- ready: function(viewport) {
- // Minus 6 === 1px border + 5px padding right.
- this.style.width = (tr.ui.b.constants.HEADING_WIDTH - 6) + 'px';
-
- this.heading_ = '';
- this.expanded_ = true;
- this.arrowVisible_ = false;
- this.selectionGenerator_ = undefined;
-
- this.updateContents_();
- },
-
- get heading() {
- return this.heading_;
- },
-
- set heading(text) {
- if (this.heading_ === text)
- return;
-
- this.heading_ = text;
- this.updateContents_();
- },
-
- set arrowVisible(val) {
- if (this.arrowVisible_ === val)
- return;
-
- this.arrowVisible_ = !!val;
- this.updateContents_();
- },
-
- set tooltip(text) {
- this.$.heading.title = text;
- },
-
- set selectionGenerator(generator) {
- if (this.selectionGenerator_ === generator)
- return;
-
- this.selectionGenerator_ = generator;
- this.updateContents_();
- },
-
- get expanded() {
- return this.expanded_;
- },
-
- set expanded(expanded) {
- if (this.expanded_ === expanded)
- return;
-
- this.expanded_ = !!expanded;
- this.updateContents_();
- },
-
- onHeadingDivClicked_: function() {
- this.dispatchEvent(new tr.b.Event('heading-clicked', true));
- },
-
- updateContents_: function() {
- if (this.arrowVisible_) {
- this.$.arrow.style.display = '';
- } else {
- this.$.arrow.style.display = 'none';
- this.$.heading.style.display = this.expanded_ ? '' : 'none';
- }
-
- if (this.arrowVisible_) {
- Polymer.dom(this.$.arrow).textContent =
- this.expanded_ ? this.DOWN_ARROW : this.RIGHT_ARROW;
- }
-
- this.$.link.style.display = 'none';
- this.$.heading_content.style.display = 'none';
-
- if (this.selectionGenerator_) {
- this.$.link.style.display = 'inline-block';
- this.$.link.selection = this.selectionGenerator_;
- Polymer.dom(this.$.link).textContent = this.heading_;
- } else {
- this.$.heading_content.style.display = 'inline-block';
- Polymer.dom(this.$.heading_content).textContent = this.heading_;
- }
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/hot_key.html b/chromium/third_party/catapult/tracing/tracing/ui/base/hot_key.html
deleted file mode 100644
index 699b41a8e0a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/hot_key.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/guid.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- function HotKey(dict) {
- if (dict.eventType === undefined)
- throw new Error('eventType must be given');
- if (dict.keyCode === undefined && dict.keyCodes === undefined)
- throw new Error('keyCode or keyCodes must be given');
- if (dict.keyCode !== undefined && dict.keyCodes !== undefined)
- throw new Error('Only keyCode or keyCodes can be given');
- if (dict.callback === undefined)
- throw new Error('callback must be given');
-
- this.eventType_ = dict.eventType;
- this.keyCodes_ = [];
-
- if (dict.keyCode)
- this.pushKeyCode_(dict.keyCode);
- else if (dict.keyCodes) {
- dict.keyCodes.forEach(this.pushKeyCode_, this);
- }
-
- this.useCapture_ = !!dict.useCapture;
- this.callback_ = dict.callback;
- this.thisArg_ = dict.thisArg !== undefined ? dict.thisArg : undefined;
-
- this.helpText_ = dict.helpText !== undefined ? dict.helpText : undefined;
- }
-
- HotKey.prototype = {
- get eventType() {
- return this.eventType_;
- },
-
- get keyCodes() {
- return this.keyCodes_;
- },
-
- get helpText() {
- return this.helpText_;
- },
-
- call: function(e) {
- this.callback_.call(this.thisArg_, e);
- },
-
- pushKeyCode_: function(keyCode) {
- this.keyCodes_.push(keyCode);
- }
- };
-
- return {
- HotKey: HotKey
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller.html b/chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller.html
deleted file mode 100644
index 38b7967a17a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller.html
+++ /dev/null
@@ -1,302 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/ui/base/hot_key.html">
-
-<dom-module id='tv-ui-b-hotkey-controller'>
- <template>
- <div></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tv-ui-b-hotkey-controller',
-
- created: function() {
- this.isAttached_ = false;
- this.globalMode_ = false;
- this.slavedToParentController_ = undefined;
- this.curHost_ = undefined;
- this.childControllers_ = [];
-
- this.bubblingKeyDownHotKeys_ = {};
- this.capturingKeyDownHotKeys_ = {};
- this.bubblingKeyPressHotKeys_ = {};
- this.capturingKeyPressHotKeys_ = {};
-
- this.onBubblingKeyDown_ = this.onKey_.bind(this, false);
- this.onCapturingKeyDown_ = this.onKey_.bind(this, true);
- this.onBubblingKeyPress_ = this.onKey_.bind(this, false);
- this.onCapturingKeyPress_ = this.onKey_.bind(this, true);
- },
-
- attached: function() {
- this.isAttached_ = true;
-
- var host = this.findHost_();
- if (host.__hotkeyController)
- throw new Error('Multiple hotkey controllers attached to this host');
-
- host.__hotkeyController = this;
- this.curHost_ = host;
-
- var parentElement;
- if (host.parentElement)
- parentElement = host.parentElement;
- else
- parentElement = Polymer.dom(host).parentNode.host;
- var parentController = tr.b.getHotkeyControllerForElement(
- parentElement);
-
- if (parentController) {
- this.slavedToParentController_ = parentController;
- parentController.addChildController_(this);
- return;
- }
-
- host.addEventListener('keydown', this.onBubblingKeyDown_, false);
- host.addEventListener('keydown', this.onCapturingKeyDown_, true);
- host.addEventListener('keypress', this.onBubblingKeyPress_, false);
- host.addEventListener('keypress', this.onCapturingKeyPress_, true);
- },
-
- detached: function() {
- this.isAttached_ = false;
-
- var host = this.curHost_;
- if (!host)
- return;
-
- delete host.__hotkeyController;
- this.curHost_ = undefined;
-
- if (this.slavedToParentController_) {
- this.slavedToParentController_.removeChildController_(this);
- this.slavedToParentController_ = undefined;
- return;
- }
-
- host.removeEventListener('keydown', this.onBubblingKeyDown_, false);
- host.removeEventListener('keydown', this.onCapturingKeyDown_, true);
- host.removeEventListener('keypress', this.onBubblingKeyPress_, false);
- host.removeEventListener('keypress', this.onCapturingKeyPress_, true);
- },
-
- addChildController_: function(controller) {
- var i = this.childControllers_.indexOf(controller);
- if (i !== -1)
- throw new Error('Controller already registered');
- this.childControllers_.push(controller);
- },
-
- removeChildController_: function(controller) {
- var i = this.childControllers_.indexOf(controller);
- if (i === -1)
- throw new Error('Controller not registered');
- this.childControllers_.splice(i, 1);
- return controller;
- },
-
- getKeyMapForEventType_: function(eventType, useCapture) {
- if (eventType === 'keydown') {
- if (!useCapture)
- return this.bubblingKeyDownHotKeys_;
- else
- return this.capturingKeyDownHotKeys_;
- } else if (eventType === 'keypress') {
- if (!useCapture)
- return this.bubblingKeyPressHotKeys_;
- else
- return this.capturingKeyPressHotKeys_;
- } else {
- throw new Error('Unsupported key event');
- }
- },
-
- addHotKey: function(hotKey) {
- if (!(hotKey instanceof tr.ui.b.HotKey))
- throw new Error('hotKey must be a tr.ui.b.HotKey');
-
- var keyMap = this.getKeyMapForEventType_(
- hotKey.eventType, hotKey.useCapture);
-
- for (var i = 0; i < hotKey.keyCodes.length; i++) {
- var keyCode = hotKey.keyCodes[i];
- if (keyMap[keyCode])
- throw new Error('Key is already bound for keyCode=' + keyCode);
- }
-
- for (var i = 0; i < hotKey.keyCodes.length; i++) {
- var keyCode = hotKey.keyCodes[i];
- keyMap[keyCode] = hotKey;
- }
- return hotKey;
- },
-
- removeHotKey: function(hotKey) {
- if (!(hotKey instanceof tr.ui.b.HotKey))
- throw new Error('hotKey must be a tr.ui.b.HotKey');
-
- var keyMap = this.getKeyMapForEventType_(
- hotKey.eventType, hotKey.useCapture);
-
- for (var i = 0; i < hotKey.keyCodes.length; i++) {
- var keyCode = hotKey.keyCodes[i];
- if (!keyMap[keyCode])
- throw new Error('Key is not bound for keyCode=' + keyCode);
- keyMap[keyCode] = hotKey;
- }
- for (var i = 0; i < hotKey.keyCodes.length; i++) {
- var keyCode = hotKey.keyCodes[i];
- delete keyMap[keyCode];
- }
- return hotKey;
- },
-
- get globalMode() {
- return this.globalMode_;
- },
-
- set globalMode(globalMode) {
- var wasAttached = this.isAttached_;
- if (wasAttached)
- this.detached();
- this.globalMode_ = !!globalMode;
- if (wasAttached)
- this.attached();
- },
-
- get topmostConroller_() {
- if (this.slavedToParentController_)
- return this.slavedToParentController_.topmostConroller_;
- return this;
- },
-
- childRequestsGeneralFocus: function(child) {
- var topmost = this.topmostConroller_;
- if (topmost.curHost_) {
- if (topmost.curHost_.hasAttribute('tabIndex')) {
- topmost.curHost_.focus();
- } else {
- if (document.activeElement)
- document.activeElement.blur();
- }
- } else {
- if (document.activeElement)
- document.activeElement.blur();
- }
- },
-
- childRequestsBlur: function(child) {
- child.blur();
-
- var topmost = this.topmostConroller_;
- if (topmost.curHost_) {
- topmost.curHost_.focus();
- }
- },
-
- findHost_: function() {
- if (this.globalMode_) {
- return document.body;
- } else {
- if (this.parentElement)
- return this.parentElement;
-
- var node = this;
- while (Polymer.dom(node).parentNode) {
- node = Polymer.dom(node).parentNode;
- }
- return node.host;
- }
- },
-
- appendMatchingHotKeysTo_: function(matchedHotKeys,
- useCapture, e) {
- var localKeyMap = this.getKeyMapForEventType_(e.type, useCapture);
- var localHotKey = localKeyMap[e.keyCode];
- if (localHotKey)
- matchedHotKeys.push(localHotKey);
-
- for (var i = 0; i < this.childControllers_.length; i++) {
- var controller = this.childControllers_[i];
- controller.appendMatchingHotKeysTo_(matchedHotKeys,
- useCapture, e);
- }
- },
-
- onKey_: function(useCapture, e) {
- // Keys dispatched to INPUT elements still bubble, even when they're
- // handled. So, skip any events that targeted the input element.
- if (!useCapture && e.path[0].tagName === 'INPUT')
- return;
-
- var sortedControllers;
-
- var matchedHotKeys = [];
- this.appendMatchingHotKeysTo_(matchedHotKeys, useCapture, e);
-
- if (matchedHotKeys.length === 0)
- return false;
-
- if (matchedHotKeys.length > 1) {
- // TODO(nduca): To do support for coddling hotKeys, we need to
- // sort the listeners by their capturing/bubbling order and then pick
- // the one that would topologically win the tie, per DOM dispatch rules.
- throw new Error('More than one hotKey is currently unsupported');
- }
-
-
- var hotKey = matchedHotKeys[0];
-
- var prevented = 0;
- prevented |= hotKey.call(e);
-
- // We want to return false if preventDefaulted, or one of the handlers
- // return false. But otherwise, we want to return undefiend.
- return !prevented && e.defaultPrevented;
- }
-});
-</script>
-<script>
-'use strict';
-tr.exportTo('tr.b', function() {
-
- function getHotkeyControllerForElement(refElement) {
- var curElement = refElement;
- while (curElement) {
- if (curElement.tagName === 'tv-ui-b-hotkey-controller')
- return curElement;
-
- if (curElement.__hotkeyController)
- return curElement.__hotkeyController;
-
- if (curElement.parentElement) {
- curElement = curElement.parentElement;
- continue;
- }
-
- // Probably inside a shadow
- curElement = findHost(curElement);
- }
- return undefined;
- }
-
- function findHost(initialNode) {
- var node = initialNode;
- while (Polymer.dom(node).parentNode) {
- node = Polymer.dom(node).parentNode;
- }
- return node.host;
- }
-
- return {
- getHotkeyControllerForElement: getHotkeyControllerForElement
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller_test.html
deleted file mode 100644
index 2ef4c5bb737..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/hotkey_controller_test.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var KeyEventManager = tr.b.KeyEventManager;
-
- function newKeyEvent(eventType, dict) {
- var e = new tr.b.Event(eventType, true, true);
- if (dict.keyCode === undefined)
- throw new Error('keyCode required');
- e.keyCode = dict.keyCode;
- return e;
- }
-
- test('simpleHotkeyManager', function() {
- var rootElement = document.createElement('div');
- Polymer.dom(document.body).appendChild(rootElement);
- try {
- var elementShadow = rootElement.createShadowRoot();
-
- var hkc = document.createElement('tv-ui-b-hotkey-controller');
- Polymer.dom(elementShadow).appendChild(hkc);
-
- var subElement = document.createElement('div');
- Polymer.dom(elementShadow).appendChild(subElement);
-
- assert.equal(tr.b.getHotkeyControllerForElement(subElement), hkc);
-
- var didGetCalled = false;
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keydown',
- keyCode: 73, useCapture: true,
- callback: function() {
- didGetCalled = true;
- }
- }));
-
- // Ensure it is called when events target the root element.
- var e = newKeyEvent('keydown', {keyCode: 73});
- rootElement.dispatchEvent(e);
- assert.isTrue(didGetCalled);
-
- // Ensure it is still called when we target the sub element.
- didGetCalled = false;
- var e = newKeyEvent('keydown', {keyCode: 73});
- subElement.dispatchEvent(e);
- assert.isTrue(didGetCalled);
-
- } finally {
- Polymer.dom(document.body).removeChild(rootElement);
- }
- });
-
- test('nestedHotkeyController', function() {
- var rootElement = document.createElement('div');
- Polymer.dom(document.body).appendChild(rootElement);
- try {
- var elementShadow = rootElement.createShadowRoot();
-
- var hkc = document.createElement('tv-ui-b-hotkey-controller');
- Polymer.dom(elementShadow).appendChild(hkc);
-
- var subElement = document.createElement('div');
- Polymer.dom(elementShadow).appendChild(subElement);
- assert.equal(tr.b.getHotkeyControllerForElement(elementShadow), hkc);
-
- var subHKC = document.createElement('tv-ui-b-hotkey-controller');
- Polymer.dom(subElement).appendChild(subHKC);
-
- assert.equal(tr.b.getHotkeyControllerForElement(subElement), subHKC);
-
- var didGetCalled = false;
- subHKC.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keydown',
- keyCode: 73, useCapture: true,
- callback: function() {
- didGetCalled = true;
- }
- }));
-
- // Ensure it is called when events target the root element.
- var e = newKeyEvent('keydown', {keyCode: 73});
- rootElement.dispatchEvent(e);
- assert.isTrue(didGetCalled);
- } finally {
- Polymer.dom(document.body).removeChild(rootElement);
- }
- });
-
- test('inputInsideHKC', function() {
- var rootElement = document.createElement('div');
- Polymer.dom(document.body).appendChild(rootElement);
- try {
- var elementShadow = rootElement.createShadowRoot();
-
- var hkc = document.createElement('tv-ui-b-hotkey-controller');
- Polymer.dom(elementShadow).appendChild(hkc);
-
- var inputEl = document.createElement('input');
- Polymer.dom(elementShadow).appendChild(inputEl);
-
- var didGetCalled = false;
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- keyCode: 'a'.charCodeAt(0), useCapture: false,
- callback: function() {
- didGetCalled = true;
- }
- }));
-
- // Ensure it is called when events target the root element.
- didGetCalled = false;
- var e = newKeyEvent('keypress', {keyCode: 'a'.charCodeAt(0)});
- rootElement.dispatchEvent(e);
- assert.isTrue(didGetCalled);
-
- // Handler should NOT be called when events target the input element.
- didGetCalled = false;
- var e = newKeyEvent('keypress', {keyCode: 'a'.charCodeAt(0)});
- inputEl.dispatchEvent(e);
- assert.isFalse(didGetCalled);
- } finally {
- Polymer.dom(document.body).removeChild(rootElement);
- }
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar.html b/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar.html
deleted file mode 100644
index 6ad1bdbbfde..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id='tr-ui-b-info-bar'>
- <template>
- <style>
- :host {
- align-items: center;
- flex: 0 0 auto;
- background-color: rgb(252, 235, 162);
- border-bottom: 1px solid #A3A3A3;
- border-left: 1px solid white;
- border-right: 1px solid #A3A3A3;
- border-top: 1px solid white;
- display: flex;
- height: 26px;
- padding: 0 3px 0 3px;
- }
-
- :host(.info-bar-hidden) {
- display: none;
- }
-
- #message { flex: 1 1 auto; }
- </style>
-
- <span id='message'></span>
- <span id='buttons'></span>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-info-bar',
-
- ready: function() {
- this.messageEl_ = this.$.message;
- this.buttonsEl_ = this.$.buttons;
-
- this.message = '';
- this.visible = false;
- },
-
- get message() {
- return Polymer.dom(this.messageEl_).textContent;
- },
-
- set message(message) {
- Polymer.dom(this.messageEl_).textContent = message;
- },
-
- get visible() {
- return !Polymer.dom(this).classList.contains('info-bar-hidden');
- },
-
- set visible(visible) {
- if (visible)
- Polymer.dom(this).classList.remove('info-bar-hidden');
- else
- Polymer.dom(this).classList.add('info-bar-hidden');
- },
-
- removeAllButtons: function() {
- Polymer.dom(this.buttonsEl_).textContent = '';
- },
-
- addButton: function(text, clickCallback) {
- var button = document.createElement('button');
- Polymer.dom(button).textContent = text;
- button.addEventListener('click', clickCallback);
- Polymer.dom(this.buttonsEl_).appendChild(button);
- return button;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group.html b/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group.html
deleted file mode 100644
index af82995de01..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel='import' href='/tracing/ui/base/info_bar.html'>
-
-<dom-module id='tr-ui-b-info-bar-group'>
- <template>
- <style>
- :host {
- flex: 0 0 auto;
- flex-direction: column;
- display: flex;
- }
- </style>
- <div id='messages'></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-b-info-bar-group',
-
- ready: function() {
- this.messages_ = [];
- },
-
- clearMessages: function() {
- this.messages_ = [];
- this.updateContents_();
- },
-
- addMessage: function(text, opt_buttons) {
- opt_buttons = opt_buttons || [];
- for (var i = 0; i < opt_buttons.length; i++) {
- if (opt_buttons[i].buttonText === undefined)
- throw new Error('buttonText must be provided');
- if (opt_buttons[i].onClick === undefined)
- throw new Error('onClick must be provided');
- }
-
- this.messages_.push({
- text: text,
- buttons: opt_buttons || []
- });
- this.updateContents_();
- },
-
- updateContents_: function() {
- Polymer.dom(this.$.messages).textContent = '';
- this.messages_.forEach(function(message) {
- var bar = document.createElement('tr-ui-b-info-bar');
- bar.message = message.text;
- bar.visible = true;
-
- message.buttons.forEach(function(button) {
- bar.addButton(button.buttonText, button.onClick);
- }, this);
-
- Polymer.dom(this.$.messages).appendChild(bar);
- }, this);
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group_test.html
deleted file mode 100644
index 5600d4043a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_group_test.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/info_bar_group.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('group-instantiate', function() {
- var infoBarGroup = document.createElement('tr-ui-b-info-bar-group');
- infoBarGroup.addMessage(
- 'Message 1',
- [{buttonText: 'ok', onClick: function() {}}]);
- infoBarGroup.addMessage(
- 'Message 2',
- [{buttonText: 'button 2', onClick: function() {}}]);
- this.addHTMLOutput(infoBarGroup);
- });
-
- test('group-populate-then-clear', function() {
- var infoBarGroup = document.createElement('tr-ui-b-info-bar-group');
- infoBarGroup.addMessage(
- 'Message 1',
- [{buttonText: 'ok', onClick: function() {}}]);
- infoBarGroup.addMessage(
- 'Message 2',
- [{buttonText: 'button 2', onClick: function() {}}]);
- infoBarGroup.clearMessages();
- assert.equal(infoBarGroup.children.length, 0);
- });
-
- test('group-populate-clear-repopulate', function() {
- var infoBarGroup = document.createElement('tr-ui-b-info-bar-group');
- infoBarGroup.addMessage(
- 'Message 1',
- [{buttonText: 'ok', onClick: function() {}}]);
- infoBarGroup.addMessage(
- 'Message 2',
- [{buttonText: 'button 2', onClick: function() {}}]);
- infoBarGroup.clearMessages();
- infoBarGroup.addMessage(
- 'Message 1',
- [{buttonText: 'ok', onClick: function() {}}]);
- this.addHTMLOutput(infoBarGroup);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_test.html
deleted file mode 100644
index fffec0f8d4b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/info_bar_test.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/info_bar.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var infoBar = document.createElement('tr-ui-b-info-bar');
- infoBar.message = 'This is an info';
- infoBar.visible = true;
- this.addHTMLOutput(infoBar);
- });
-
- test('buttons', function() {
- var infoBar = document.createElement('tr-ui-b-info-bar');
- infoBar.visible = true;
- infoBar.message = 'This is an info bar with buttons';
- var didClick = false;
- var button = infoBar.addButton('More info...', function() {
- didClick = true;
- });
- button.click();
- assert.isTrue(didClick);
- this.addHTMLOutput(infoBar);
- });
-
- test('hiding', function() {
- var infoBar = document.createElement('tr-ui-b-info-bar');
- infoBar.message = 'This is an info bar';
- infoBar.visible = true;
- this.addHTMLOutput(infoBar);
-
- assert.equal(getComputedStyle(infoBar)['display'], 'flex');
-
- infoBar.visible = false;
- assert.equal(getComputedStyle(infoBar)['display'], 'none');
-
- infoBar.visible = true;
- assert.equal(getComputedStyle(infoBar)['display'], 'flex');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.css b/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.css
deleted file mode 100644
index e2c945b8be3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.css
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Copyright 2014 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ .line-chart .line {
- fill: none;
- stroke-width: 1.5px;
-}
-
-* /deep/ .line-chart #brushes > rect {
- fill: rgb(192, 192, 192);
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.html
deleted file mode 100644
index 00acef33a19..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/chart_base_2d_brushable_x.html">
-
-<link rel="stylesheet" href="/tracing/ui/base/line_chart.css">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ChartBase2DBrushX = tr.ui.b.ChartBase2DBrushX;
-
- /**
- * @constructor
- */
- var LineChart = tr.ui.b.define('line-chart', ChartBase2DBrushX);
-
- LineChart.prototype = {
- __proto__: ChartBase2DBrushX.prototype,
-
- decorate: function() {
- ChartBase2DBrushX.prototype.decorate.call(this);
- Polymer.dom(this).classList.add('line-chart');
- },
-
- isDatumFieldSeries_: function(fieldName) {
- return fieldName !== 'x';
- },
-
- getXForDatum_: function(datum, index) {
- return datum.x;
- },
-
- updateDataContents_: function(dataSel) {
- dataSel.selectAll('*').remove();
- var dataBySeriesKey = this.getDataBySeriesKey_();
- var seriesKeys = [...this.seriesByKey_.keys()];
- var pathsSel = dataSel.selectAll('path').data(seriesKeys);
- pathsSel.enter()
- .append('path')
- .attr('class', 'line')
- .style('stroke', function(key) {
- return this.getDataSeries(key).color;
- }.bind(this))
- .attr('d', function(key) {
- var line = d3.svg.line()
- .x(function(d) { return this.xScale_(d.x); }.bind(this))
- .y(function(d) { return this.yScale_(d[key]); }.bind(this));
- return line(dataBySeriesKey[key]);
- }.bind(this));
- pathsSel.exit().remove();
- }
- };
-
- return {
- LineChart: LineChart
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart_test.html
deleted file mode 100644
index eee61c646f8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/line_chart_test.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/line_chart.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiation_singleSeries', function() {
- var chart = new tr.ui.b.LineChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, y: 100},
- {x: 20, y: 110},
- {x: 30, y: 100},
- {x: 40, y: 50}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSeries', function() {
- var chart = new tr.ui.b.LineChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 100, beta: 50},
- {x: 20, alpha: 110, beta: 75},
- {x: 30, alpha: 100, beta: 125},
- {x: 40, alpha: 50, beta: 125}
- ];
- chart.data = data;
-
- var r = new tr.b.Range();
- r.addValue(20);
- r.addValue(40);
- chart.brushedRange = r;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueSparse', function() {
- var chart = new tr.ui.b.LineChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 20, beta: undefined},
- {x: 20, alpha: undefined, beta: 10},
- {x: 30, alpha: 10, beta: undefined},
- {x: 45, alpha: undefined, beta: 20},
- {x: 50, alpha: 30, beta: 30}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueNotSparse', function() {
- var chart = new tr.ui.b.LineChart();
-
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, alpha: 20, beta: 40},
- {x: 20, alpha: undefined, beta: 10},
- {x: 30, alpha: 10, beta: undefined},
- {x: 45, alpha: undefined, beta: 20},
- {x: 50, alpha: 30, beta: undefined}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('brushRangeFromIndices', function() {
- var chart = new tr.ui.b.LineChart();
- var data = [
- {x: 10, value: 50},
- {x: 30, value: 60},
- {x: 70, value: 70},
- {x: 80, value: 80},
- {x: 120, value: 90}
- ];
- chart.data = data;
- var r = new tr.b.Range();
-
- // Range min should be 10.
- r = chart.computeBrushRangeFromIndices(-2, 1);
- assert.equal(r.min, 10);
-
- // Range max should be 120.
- r = chart.computeBrushRangeFromIndices(3, 10);
- assert.equal(r.max, 120);
-
- // Range should be [10, 120]
- r = chart.computeBrushRangeFromIndices(-2, 10);
- assert.equal(r.min, 10);
- assert.equal(r.max, 120);
-
- // Range should be [20, 100]
- r = chart.computeBrushRangeFromIndices(1, 3);
- assert.equal(r.min, 20);
- assert.equal(r.max, 100);
- });
-
- test('instantiation_interactiveBrushing', function() {
- var chart = new tr.ui.b.LineChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, value: 50},
- {x: 20, value: 60},
- {x: 30, value: 80},
- {x: 40, value: 20},
- {x: 50, value: 30},
- {x: 60, value: 20},
- {x: 70, value: 15},
- {x: 80, value: 20}
- ];
- chart.data = data;
-
- var mouseDownIndex = undefined;
- var curMouseIndex = undefined;
-
- function updateBrushedRange() {
- if (mouseDownIndex === undefined) {
- chart.brushedRange = new tr.b.Range();
- return;
- }
- chart.brushedRange = chart.computeBrushRangeFromIndices(
- mouseDownIndex, curMouseIndex);
- }
-
- chart.addEventListener('item-mousedown', function(e) {
- mouseDownIndex = e.index;
- curMouseIndex = e.index;
- updateBrushedRange();
- });
- chart.addEventListener('item-mousemove', function(e) {
- if (e.button === undefined)
- return;
- curMouseIndex = e.index;
- updateBrushedRange();
- });
- chart.addEventListener('item-mouseup', function(e) {
- curMouseIndex = e.index;
- updateBrushedRange();
- });
- this.addHTMLOutput(chart);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.css b/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.css
deleted file mode 100644
index 78319f3d8db..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ x-list-and-associated-view {
- -webkit-flex-direction: row;
- display: -webkit-flex;
-}
-
-* /deep/ x-list-and-associated-view > .x-list-view {
- min-width: 100px;
-}
-
-* /deep/ x-list-and-associated-view > :nth-child(2) {
- -webkit-flex: 1;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.html b/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.html
deleted file mode 100644
index 2898344a87e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view.html
+++ /dev/null
@@ -1,138 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/base/list_and_associated_view.css">
-
-<link rel="import" href="/tracing/ui/base/list_view.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview A list of things, and a viewer for the currently selected
- * thing.
- */
-tr.exportTo('tr.ui.b', function() {
-
- /**
- * @constructor
- */
- var ListAndAssociatedView = tr.ui.b.define('x-list-and-associated-view');
- ListAndAssociatedView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.list_ = undefined;
- this.listProperty_ = undefined;
- this.view_ = undefined;
- this.viewProperty_ = undefined;
- this.listView_ = new tr.ui.b.ListView();
- this.listView_.addEventListener('selection-changed',
- this.onSelectionChanged_.bind(this));
- this.placeholder_ = document.createElement('div');
- Polymer.dom(this).appendChild(this.listView_);
- Polymer.dom(this).appendChild(this.placeholder_);
- },
-
- get listView() {
- return this.listView_;
- },
-
- get list() {
- return this.list_;
- },
-
- set list(list) {
- this.list_ = list;
- this.updateChildren_();
- },
-
- get listProperty() {
- return this.listProperty_;
- },
-
- set listProperty(listProperty) {
- this.listProperty_ = listProperty;
- this.updateChildren_();
- },
-
- get view() {
- return this.view_;
- },
-
- set view(view) {
- this.view_ = view;
- this.updateChildren_();
- },
-
- get viewProperty() {
- return this.viewProperty_;
- },
-
- set viewProperty(viewProperty) {
- this.viewProperty_ = viewProperty;
- this.updateChildren_();
- },
-
- updateChildren_: function() {
- var complete = this.list_ &&
- this.listProperty_ &&
- this.view_ &&
- this.viewProperty_;
- if (!complete) {
- this.replaceChild(this.placeholder_,
- this.children[1]);
- return;
- }
-
- for (var i = 0; i < this.list_.length; i++) {
- var itemEl;
- if (i >= this.listView_.children.length) {
- itemEl = document.createElement('div');
- Polymer.dom(this.listView_).appendChild(itemEl);
- } else {
- itemEl = this.listView_.children[i];
- }
- itemEl.item = this.list_[i];
- var getter = this.list_[i].__lookupGetter__(this.listProperty_);
- if (getter)
- Polymer.dom(itemEl).textContent = getter.call(this.list_[i]);
- else
- Polymer.dom(itemEl).textContent = this.list_[i][this.listProperty_];
- }
-
- if (this.children[1] === this.placeholder_) {
- this.replaceChild(this.view_,
- this.children[1]);
- }
- if (this.listView_.children.length &&
- !this.listView_.selectedElement)
- this.listView_.selectedElement = this.listView_.children[0];
- },
-
- onSelectionChanged_: function(e) {
- var setter = this.view_.__lookupSetter__(this.viewProperty_);
- if (!setter) {
- var prop = this.viewProperty_;
- setter = function(value) { this[prop] = value; };
- }
- if (this.listView_.selectedElement) {
- setter.call(this.view_,
- this.listView_.selectedElement.item);
- } else {
- setter.call(this.view_,
- undefined);
- }
- }
- };
-
- return {
- ListAndAssociatedView: ListAndAssociatedView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view_test.html
deleted file mode 100644
index 28d95ca64fc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/list_and_associated_view_test.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/list_and_associated_view.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ListAndAssociatedView = tr.ui.b.ListAndAssociatedView;
-
- var SimpleView = tr.ui.b.define('div');
- SimpleView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.item_ = undefined;
- },
-
- set item(item) {
- this.item_ = item;
- },
- get item() {
- return this.item_;
- }
- };
-
- test('listViewNamingWithField', function() {
- var lav = new ListAndAssociatedView();
- var list = [
- {x: '1'},
- {x: '2'},
- {x: '3'}
- ];
- var view = new SimpleView();
-
- lav.list = list;
- lav.listProperty = 'x';
- lav.view = view;
- lav.viewProperty = 'item';
-
- var lavListView = lav.listView;
- assert.equal(lavListView.children.length, 3);
- assert.equal(Polymer.dom(lavListView.children[0]).textContent, '1');
- });
-
- test('listViewNamingWithProperty', function() {
- var lav = new ListAndAssociatedView();
-
- function X(x) {
- this.x = x;
- }
- X.prototype = {
- get title() {
- return this.x;
- }
- };
-
- var list = [
- new X('1'),
- new X('2'),
- new X('3')
- ];
- var view = new SimpleView();
-
- lav.list = list;
- lav.listProperty = 'title';
- lav.view = view;
- lav.viewProperty = 'item';
-
- var lavListView = lav.listView;
- assert.equal(lavListView.children.length, 3);
- assert.equal(Polymer.dom(lavListView.children[0]).textContent, '1');
- });
-
- test('selectionChangesView', function() {
- var lav = new ListAndAssociatedView();
- var list = [
- {x: '1'},
- {x: '2'},
- {x: '3'}
- ];
- var view = new SimpleView();
-
- lav.list = list;
- lav.listProperty = 'x';
- lav.view = view;
- lav.viewProperty = 'item';
- var lavListView = lav.listView;
-
- assert.equal(list[0], view.item);
- lavListView.children[1].selected = true;
- assert.equal(list[1], view.item);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/list_view.css b/chromium/third_party/catapult/tracing/tracing/ui/base/list_view.css
deleted file mode 100644
index 0a9ef18ed67..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/list_view.css
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ .x-list-view {
- -webkit-user-select: none;
- display: block;
-}
-* /deep/ .x-list-view:focus {
- outline: none;
-}
-
-* /deep/ .x-list-view * {
- -webkit-user-select: none;
-}
-
-* /deep/ .x-list-view > .list-item {
- padding: 2px 4px 2px 4px;
-}
-
-* /deep/ .x-list-view:focus > .list-item[selected] {
- background-color: rgb(171, 217, 202);
- outline: 1px dotted rgba(0,0,0,0.1);
- outline-offset: 0;
-}
-
-* /deep/ .x-list-view > .list-item[selected] {
- background-color: rgb(103, 199, 165);
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/list_view.html b/chromium/third_party/catapult/tracing/tracing/ui/base/list_view.html
deleted file mode 100644
index c50c4637758..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/list_view.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/base/list_view.css">
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/ui/base/container_that_decorates_its_children.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Simple list view.
- */
-tr.exportTo('tr.ui.b', function() {
- /**
- * @constructor
- */
- var ListView = tr.ui.b.define(
- 'x-list-view', tr.ui.b.ContainerThatDecoratesItsChildren);
-
- ListView.prototype = {
- __proto__: tr.ui.b.ContainerThatDecoratesItsChildren.prototype,
-
- decorate: function() {
- tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);
-
- Polymer.dom(this).classList.add('x-list-view');
- this.onItemClicked_ = this.onItemClicked_.bind(this);
- this.onKeyDown_ = this.onKeyDown_.bind(this);
- this.tabIndex = 0;
- this.addEventListener('keydown', this.onKeyDown_);
-
- this.selectionChanged_ = false;
- },
-
- decorateChild_: function(item) {
- Polymer.dom(item).classList.add('list-item');
- item.addEventListener('click', this.onItemClicked_, true);
-
- var listView = this;
- Object.defineProperty(
- item,
- 'selected', {
- configurable: true,
- set: function(value) {
- var oldSelection = listView.selectedElement;
- if (oldSelection && oldSelection !== this && value)
- Polymer.dom(listView.selectedElement).removeAttribute(
- 'selected');
- if (value)
- Polymer.dom(this).setAttribute('selected', 'selected');
- else
- Polymer.dom(this).removeAttribute('selected');
- var newSelection = listView.selectedElement;
- if (newSelection !== oldSelection)
- tr.b.dispatchSimpleEvent(listView, 'selection-changed', false);
- },
- get: function() {
- return this.hasAttribute('selected');
- }
- });
- },
-
- undecorateChild_: function(item) {
- this.selectionChanged_ |= item.selected;
-
- Polymer.dom(item).classList.remove('list-item');
- item.removeEventListener('click', this.onItemClicked_);
- delete item.selected;
- },
-
- beginDecorating_: function() {
- this.selectionChanged_ = false;
- },
-
- doneDecoratingForNow_: function() {
- if (this.selectionChanged_)
- tr.b.dispatchSimpleEvent(this, 'selection-changed', false);
- },
-
- get selectedElement() {
- var el = Polymer.dom(this).querySelector('.list-item[selected]');
- if (!el)
- return undefined;
- return el;
- },
-
- set selectedElement(el) {
- if (!el) {
- if (this.selectedElement)
- this.selectedElement.selected = false;
- return;
- }
-
- if (el.parentElement !== this)
- throw new Error(
- 'Can only select elements that are children of this list view');
- el.selected = true;
- },
-
- getElementByIndex: function(index) {
- return Polymer.dom(this)
- .querySelector('.list-item:nth-child(' + index + ')');
- },
-
- clear: function() {
- var changed = this.selectedElement !== undefined;
- tr.ui.b.ContainerThatDecoratesItsChildren.prototype.clear.call(this);
- if (changed)
- tr.b.dispatchSimpleEvent(this, 'selection-changed', false);
- },
-
- onItemClicked_: function(e) {
- var currentSelectedElement = this.selectedElement;
- if (currentSelectedElement)
- Polymer.dom(currentSelectedElement).removeAttribute('selected');
- var element = e.target;
- while (element.parentElement !== this)
- element = element.parentElement;
- if (element !== currentSelectedElement)
- Polymer.dom(element).setAttribute('selected', 'selected');
- tr.b.dispatchSimpleEvent(this, 'selection-changed', false);
- },
-
- onKeyDown_: function(e) {
- if (this.selectedElement === undefined)
- return;
-
- if (e.keyCode === 38) { // Up arrow.
- var prev = Polymer.dom(this.selectedElement).previousSibling;
- if (prev) {
- prev.selected = true;
- tr.ui.b.scrollIntoViewIfNeeded(prev);
- e.preventDefault();
- return true;
- }
- } else if (e.keyCode === 40) { // Down arrow.
- var next = Polymer.dom(this.selectedElement).nextSibling;
- if (next) {
- next.selected = true;
- tr.ui.b.scrollIntoViewIfNeeded(next);
- e.preventDefault();
- return true;
- }
- }
- },
-
- addItem: function(textContent) {
- var item = document.createElement('div');
- Polymer.dom(item).textContent = textContent;
- Polymer.dom(this).appendChild(item);
- return item;
- }
-
- };
-
- return {
- ListView: ListView
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/list_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/list_view_test.html
deleted file mode 100644
index 4f068437088..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/list_view_test.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/list_view.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ListView = tr.ui.b.ListView;
-
- test('instantiate', function() {
- var view = new ListView();
- var i1 = view.addItem('item 1');
- var i2 = view.addItem('item 2');
- var i3 = view.addItem('item 3');
- this.addHTMLOutput(view);
- });
-
- test('programmaticSelection', function() {
- var view = new ListView();
- var i1 = view.addItem('item 1');
- var i2 = view.addItem('item 2');
- var i3 = view.addItem('item 3');
-
- i2.selected = true;
- assert.isTrue(i2.hasAttribute('selected'));
- i3.selected = true;
- assert.isFalse(i2.hasAttribute('selected'));
- assert.isTrue(i3.hasAttribute('selected'));
- });
-
- test('clickSelection', function() {
- var view = new ListView();
- var didFireSelectionChange = false;
- view.addEventListener('selection-changed', function() {
- didFireSelectionChange = true;
- });
- var i1 = view.addItem('item 1');
- var i2 = view.addItem('item 2');
- var i3 = view.addItem('item 3');
-
- didFireSelectionChange = false;
- i2.click();
- assert.isTrue(didFireSelectionChange);
- assert.equal(view.selectedElement, i2);
-
- didFireSelectionChange = false;
- i3.click();
- assert.isTrue(didFireSelectionChange);
- assert.equal(view.selectedElement, i3);
-
- // Click the same target again.
- didFireSelectionChange = false;
- i3.click();
- assert.isTrue(didFireSelectionChange);
- assert.isUndefined(view.selectedElement);
-
- didFireSelectionChange = false;
- i1.click();
- assert.isTrue(didFireSelectionChange);
- assert.equal(view.selectedElement, i1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon.html b/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon.html
deleted file mode 100644
index f400a99656e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/base/mouse_modes.html">
-
-<dom-module id='tr-ui-b-mouse-mode-icon'>
- <template>
- <style>
- :host {
- display: block;
- background-image: url(../images/ui-states.png);
- width: 27px;
- height: 30px;
- }
- :host.active {
- cursor: auto;
- }
- </style>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-mouse-mode-icon',
-
- properties: {
- modeName: {
- type: String,
- reflectToAttribute: true,
- observer: 'modeNameChanged'
- },
- },
-
- created: function() {
- this.active_ = false;
- this.acceleratorKey_ = undefined;
- },
-
- ready: function() {
- this.updateContents_();
- },
-
- get mode() {
- return tr.ui.b.MOUSE_SELECTOR_MODE[this.modeName];
- },
-
- set mode(mode) {
- var modeInfo = tr.ui.b.MOUSE_SELECTOR_MODE_INFOS[mode];
- var modeName = tr.b.findFirstKeyInDictMatching(
- tr.ui.b.MOUSE_SELECTOR_MODE,
- function(modeName, candidateMode) {
- return candidateMode === mode;
- });
- if (modeName === undefined)
- throw new Error('Unknown mode');
- this.modeName = modeName;
- },
-
- modeNameChanged: function() {
- this.updateContents_();
- },
-
- get active() {
- return this.active_;
- },
-
- set active(active) {
- this.active_ = !!active;
- if (this.active_)
- Polymer.dom(this).classList.add('active');
- else
- Polymer.dom(this).classList.remove('active');
- this.updateContents_();
- },
-
- get acceleratorKey() {
- return this.acceleratorKey_;
- },
-
- set acceleratorKey(acceleratorKey) {
- this.acceleratorKey_ = acceleratorKey;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.modeName === undefined)
- return;
-
- var mode = this.mode;
- if (mode === undefined)
- throw new Error('Invalid mode');
-
- var modeInfo = tr.ui.b.MOUSE_SELECTOR_MODE_INFOS[mode];
- if (!modeInfo)
- throw new Error('Invalid mode');
-
- var title = modeInfo.title;
- if (this.acceleratorKey_)
- title = title + ' (' + this.acceleratorKey_ + ')';
- this.title = title;
-
- var bp;
- if (this.active_)
- bp = modeInfo.activeBackgroundPosition;
- else
- bp = modeInfo.defaultBackgroundPosition;
- this.style.backgroundPosition = bp;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon_test.html
deleted file mode 100644
index 1be3baf48a8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_icon_test.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_icon.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var MOUSE_SELECTOR_MODE = tr.ui.b.MOUSE_SELECTOR_MODE;
-
- test('inactive', function() {
- var icon = document.createElement('tr-ui-b-mouse-mode-icon');
- icon.mode = MOUSE_SELECTOR_MODE.SELECTION;
- assert.equal(icon.modeName, 'SELECTION');
- icon.acceleratorKey = 'a';
- this.addHTMLOutput(icon);
- });
-
- test('active', function() {
- var icon = document.createElement('tr-ui-b-mouse-mode-icon');
- icon.mode = MOUSE_SELECTOR_MODE.SELECTION;
- assert.equal(icon.modeName, 'SELECTION');
- icon.active = true;
- this.addHTMLOutput(icon);
- });
-
- test('modeNameSetter', function() {
- var icon = document.createElement('tr-ui-b-mouse-mode-icon');
- Polymer.dom(icon).setAttribute('mode-name', 'SELECTION');
- this.addHTMLOutput(icon);
-
- return Promise.resolve().then(function() {
- assert.equal(icon.mode, 1);
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector.html b/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector.html
deleted file mode 100644
index 3570826ac99..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector.html
+++ /dev/null
@@ -1,575 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_icon.html">
-<link rel="import" href="/tracing/ui/base/mouse_modes.html">
-<link rel="import" href="/tracing/ui/base/mouse_tracker.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<dom-module id='tr-ui-b-mouse-mode-selector'>
- <template>
- <style>
- :host {
-
- -webkit-user-drag: element;
- -webkit-user-select: none;
-
- background: #DDD;
- border: 1px solid #BBB;
- border-radius: 4px;
- box-shadow: 0 1px 2px rgba(0,0,0,0.2);
- left: calc(100% - 120px);
- position: absolute;
- top: 100px;
- user-select: none;
- width: 29px;
- z-index: 20;
- }
-
- .drag-handle {
- background: url(../images/ui-states.png) 2px 3px no-repeat;
- background-repeat: no-repeat;
- border-bottom: 1px solid #BCBCBC;
- cursor: move;
- display: block;
- height: 13px;
- width: 27px;
- }
-
- .tool-button {
- background-position: center center;
- background-repeat: no-repeat;
- border-bottom: 1px solid #BCBCBC;
- border-top: 1px solid #F1F1F1;
- cursor: pointer;
- }
-
- .buttons > .tool-button:last-child {
- border-bottom: none;
- }
-
- </style>
- <div class="drag-handle"></div>
- <div class="buttons">
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var MOUSE_SELECTOR_MODE = tr.ui.b.MOUSE_SELECTOR_MODE;
- var MOUSE_SELECTOR_MODE_INFOS = tr.ui.b.MOUSE_SELECTOR_MODE_INFOS;
-
-
- var MIN_MOUSE_SELECTION_DISTANCE = 4;
-
- var MODIFIER = {
- SHIFT: 0x1,
- SPACE: 0x2,
- CMD_OR_CTRL: 0x4
- };
-
- function isCmdOrCtrlPressed(event) {
- if (tr.isMac)
- return event.metaKey;
- else
- return event.ctrlKey;
- }
-
- /**
- * Provides a panel for switching the interaction mode of the mouse.
- * It handles the user interaction and dispatches events for the various
- * modes.
- */
- Polymer({
- is: 'tr-ui-b-mouse-mode-selector',
-
- created: function() {
- this.supportedModeMask_ = MOUSE_SELECTOR_MODE.ALL_MODES;
-
- this.initialRelativeMouseDownPos_ = {x: 0, y: 0};
-
- this.defaultMode_ = MOUSE_SELECTOR_MODE.PANSCAN;
- this.settingsKey_ = undefined;
- this.mousePos_ = {x: 0, y: 0};
- this.mouseDownPos_ = {x: 0, y: 0};
-
- this.onMouseDown_ = this.onMouseDown_.bind(this);
- this.onMouseMove_ = this.onMouseMove_.bind(this);
- this.onMouseUp_ = this.onMouseUp_.bind(this);
-
- this.onKeyDown_ = this.onKeyDown_.bind(this);
- this.onKeyUp_ = this.onKeyUp_.bind(this);
-
- this.mode_ = undefined;
- this.modeToKeyCodeMap_ = {};
- this.modifierToModeMap_ = {};
-
- this.targetElement_ = undefined;
- this.modeBeforeAlternativeModeActivated_ = null;
-
- this.isInteracting_ = false;
- this.isClick_ = false;
- },
-
- ready: function() {
- this.buttonsEl_ = Polymer.dom(this.root).querySelector('.buttons');
- this.dragHandleEl_ = Polymer.dom(this.root).querySelector(
- '.drag-handle');
- this.supportedModeMask = MOUSE_SELECTOR_MODE.ALL_MODES;
-
- this.dragHandleEl_.addEventListener('mousedown',
- this.onDragHandleMouseDown_.bind(this));
-
- this.buttonsEl_.addEventListener('mouseup', this.onButtonMouseUp_);
- this.buttonsEl_.addEventListener('mousedown', this.onButtonMouseDown_);
- this.buttonsEl_.addEventListener('click', this.onButtonPress_.bind(this));
- },
-
- attached: function() {
- document.addEventListener('keydown', this.onKeyDown_);
- document.addEventListener('keyup', this.onKeyUp_);
- },
-
- detached: function() {
- document.removeEventListener('keydown', this.onKeyDown_);
- document.removeEventListener('keyup', this.onKeyUp_);
- },
-
- get targetElement() {
- return this.targetElement_;
- },
-
- set targetElement(target) {
- if (this.targetElement_)
- this.targetElement_.removeEventListener('mousedown', this.onMouseDown_);
- this.targetElement_ = target;
- if (this.targetElement_)
- this.targetElement_.addEventListener('mousedown', this.onMouseDown_);
- },
-
- get defaultMode() {
- return this.defaultMode_;
- },
-
- set defaultMode(defaultMode) {
- this.defaultMode_ = defaultMode;
- },
-
- get settingsKey() {
- return this.settingsKey_;
- },
-
- set settingsKey(settingsKey) {
- this.settingsKey_ = settingsKey;
- if (!this.settingsKey_)
- return;
-
- var mode = tr.b.Settings.get(this.settingsKey_ + '.mode', undefined);
- // Modes changed from 1,2,3,4 to 0x1, 0x2, 0x4, 0x8. Fix any stray
- // settings to the best of our abilities.
- if (MOUSE_SELECTOR_MODE_INFOS[mode] === undefined)
- mode = undefined;
-
- // Restoring settings against unsupported modes should just go back to the
- // default mode.
- if ((mode & this.supportedModeMask_) === 0)
- mode = undefined;
-
- if (!mode)
- mode = this.defaultMode_;
- this.mode = mode;
-
- var pos = tr.b.Settings.get(this.settingsKey_ + '.pos', undefined);
- if (pos)
- this.pos = pos;
- },
-
- get supportedModeMask() {
- return this.supportedModeMask_;
- },
-
- /**
- * Sets the supported modes. Should be an OR-ing of MOUSE_SELECTOR_MODE
- * values.
- */
- set supportedModeMask(supportedModeMask) {
- if (this.mode && (supportedModeMask & this.mode) === 0)
- throw new Error('supportedModeMask must include current mode.');
-
- function createButtonForMode(mode) {
- return button;
- }
-
- this.supportedModeMask_ = supportedModeMask;
- Polymer.dom(this.buttonsEl_).textContent = '';
- for (var modeName in MOUSE_SELECTOR_MODE) {
- if (modeName === 'ALL_MODES')
- continue;
- var mode = MOUSE_SELECTOR_MODE[modeName];
- if ((this.supportedModeMask_ & mode) === 0)
- continue;
-
- var button = document.createElement('tr-ui-b-mouse-mode-icon');
- button.mode = mode;
- Polymer.dom(button).classList.add('tool-button');
-
- Polymer.dom(this.buttonsEl_).appendChild(button);
- }
- },
-
- getButtonForMode_: function(mode) {
- for (var i = 0; i < this.buttonsEl_.children.length; i++) {
- var buttonEl = this.buttonsEl_.children[i];
- if (buttonEl.mode === mode)
- return buttonEl;
- }
- return undefined;
- },
-
- get mode() {
- return this.currentMode_;
- },
-
- set mode(newMode) {
- if (newMode !== undefined) {
- if (typeof newMode !== 'number')
- throw new Error('Mode must be a number');
- if ((newMode & this.supportedModeMask_) === 0)
- throw new Error('Cannot switch to this mode, it is not supported');
- if (MOUSE_SELECTOR_MODE_INFOS[newMode] === undefined)
- throw new Error('Unrecognized mode');
- }
-
- var modeInfo;
-
- if (this.currentMode_ === newMode)
- return;
-
- if (this.currentMode_) {
- var buttonEl = this.getButtonForMode_(this.currentMode_);
- if (buttonEl)
- buttonEl.active = false;
-
- // End event.
- if (this.isInteracting_) {
-
- var mouseEvent = this.createEvent_(
- MOUSE_SELECTOR_MODE_INFOS[this.mode].eventNames.end);
- this.dispatchEvent(mouseEvent);
- }
-
- // Exit event.
- modeInfo = MOUSE_SELECTOR_MODE_INFOS[this.currentMode_];
- tr.b.dispatchSimpleEvent(this, modeInfo.eventNames.exit, true);
- }
-
- this.currentMode_ = newMode;
-
- if (this.currentMode_) {
- var buttonEl = this.getButtonForMode_(this.currentMode_);
- if (buttonEl)
- buttonEl.active = true;
-
- // Entering a new mode resets mouse down pos.
- this.mouseDownPos_.x = this.mousePos_.x;
- this.mouseDownPos_.y = this.mousePos_.y;
-
- // Enter event.
- modeInfo = MOUSE_SELECTOR_MODE_INFOS[this.currentMode_];
- if (!this.isInAlternativeMode_)
- tr.b.dispatchSimpleEvent(this, modeInfo.eventNames.enter, true);
-
- // Begin event.
- if (this.isInteracting_) {
- var mouseEvent = this.createEvent_(
- MOUSE_SELECTOR_MODE_INFOS[this.mode].eventNames.begin);
- this.dispatchEvent(mouseEvent);
- }
-
-
- }
-
- if (this.settingsKey_ && !this.isInAlternativeMode_)
- tr.b.Settings.set(this.settingsKey_ + '.mode', this.mode);
- },
-
- setKeyCodeForMode: function(mode, keyCode) {
- if ((mode & this.supportedModeMask_) === 0)
- throw new Error('Mode not supported');
- this.modeToKeyCodeMap_[mode] = keyCode;
-
- if (!this.buttonsEl_)
- return;
-
- var buttonEl = this.getButtonForMode_(mode);
- if (buttonEl)
- buttonEl.acceleratorKey = String.fromCharCode(keyCode);
- },
-
- setCurrentMousePosFromEvent_: function(e) {
- this.mousePos_.x = e.clientX;
- this.mousePos_.y = e.clientY;
- },
-
- createEvent_: function(eventName, sourceEvent) {
- var event = new tr.b.Event(eventName, true);
- event.clientX = this.mousePos_.x;
- event.clientY = this.mousePos_.y;
- event.deltaX = this.mousePos_.x - this.mouseDownPos_.x;
- event.deltaY = this.mousePos_.y - this.mouseDownPos_.y;
- event.mouseDownX = this.mouseDownPos_.x;
- event.mouseDownY = this.mouseDownPos_.y;
- event.didPreventDefault = false;
- event.preventDefault = function() {
- event.didPreventDefault = true;
- if (sourceEvent)
- sourceEvent.preventDefault();
- };
- event.stopPropagation = function() {
- sourceEvent.stopPropagation();
- };
- event.stopImmediatePropagation = function() {
- throw new Error('Not implemented');
- };
- return event;
- },
-
- onMouseDown_: function(e) {
- if (e.button !== 0)
- return;
- this.setCurrentMousePosFromEvent_(e);
- var mouseEvent = this.createEvent_(
- MOUSE_SELECTOR_MODE_INFOS[this.mode].eventNames.begin, e);
- if (this.mode === MOUSE_SELECTOR_MODE.SELECTION)
- mouseEvent.appendSelection = isCmdOrCtrlPressed(e);
- this.dispatchEvent(mouseEvent);
- this.isInteracting_ = true;
- this.isClick_ = true;
- tr.ui.b.trackMouseMovesUntilMouseUp(this.onMouseMove_, this.onMouseUp_);
- },
-
- onMouseMove_: function(e) {
- this.setCurrentMousePosFromEvent_(e);
-
- var mouseEvent = this.createEvent_(
- MOUSE_SELECTOR_MODE_INFOS[this.mode].eventNames.update, e);
- this.dispatchEvent(mouseEvent);
-
- if (this.isInteracting_)
- this.checkIsClick_(e);
- },
-
- onMouseUp_: function(e) {
- if (e.button !== 0)
- return;
-
- var mouseEvent = this.createEvent_(
- MOUSE_SELECTOR_MODE_INFOS[this.mode].eventNames.end, e);
- mouseEvent.isClick = this.isClick_;
- this.dispatchEvent(mouseEvent);
-
- if (this.isClick_ && !mouseEvent.didPreventDefault)
- this.dispatchClickEvents_(e);
-
- this.isInteracting_ = false;
- this.updateAlternativeModeState_(e);
- },
-
- onButtonMouseDown_: function(e) {
- e.preventDefault();
- e.stopImmediatePropagation();
- },
-
- onButtonMouseUp_: function(e) {
- e.preventDefault();
- e.stopImmediatePropagation();
- },
-
- onButtonPress_: function(e) {
- this.modeBeforeAlternativeModeActivated_ = undefined;
- this.mode = e.target.mode;
- e.preventDefault();
- },
-
- onKeyDown_: function(e) {
- // Keys dispatched to INPUT elements still bubble, even when they're
- // handled. So, skip any events that targeted the input element.
- if (e.path[0].tagName === 'INPUT')
- return;
-
- if (e.keyCode === ' '.charCodeAt(0))
- this.spacePressed_ = true;
- this.updateAlternativeModeState_(e);
- },
-
- onKeyUp_: function(e) {
- // Keys dispatched to INPUT elements still bubble, even when they're
- // handled. So, skip any events that targeted the input element.
- if (e.path[0].tagName === 'INPUT')
- return;
-
- if (e.keyCode === ' '.charCodeAt(0))
- this.spacePressed_ = false;
-
- var didHandleKey = false;
- tr.b.iterItems(this.modeToKeyCodeMap_, function(modeStr, keyCode) {
- if (e.keyCode === keyCode) {
- this.modeBeforeAlternativeModeActivated_ = undefined;
- var mode = parseInt(modeStr);
- this.mode = mode;
- didHandleKey = true;
- }
- }, this);
-
- if (didHandleKey) {
- e.preventDefault();
- e.stopPropagation();
- return;
- }
- this.updateAlternativeModeState_(e);
- },
-
- updateAlternativeModeState_: function(e) {
- var shiftPressed = e.shiftKey;
- var spacePressed = this.spacePressed_;
- var cmdOrCtrlPressed = isCmdOrCtrlPressed(e);
-
- // Figure out the new mode
- var smm = this.supportedModeMask_;
- var newMode;
- var isNewModeAnAlternativeMode = false;
- if (shiftPressed &&
- (this.modifierToModeMap_[MODIFIER.SHIFT] & smm) !== 0) {
- newMode = this.modifierToModeMap_[MODIFIER.SHIFT];
- isNewModeAnAlternativeMode = true;
- } else if (spacePressed &&
- (this.modifierToModeMap_[MODIFIER.SPACE] & smm) !== 0) {
- newMode = this.modifierToModeMap_[MODIFIER.SPACE];
- isNewModeAnAlternativeMode = true;
- } else if (cmdOrCtrlPressed &&
- (this.modifierToModeMap_[MODIFIER.CMD_OR_CTRL] & smm) !== 0) {
- newMode = this.modifierToModeMap_[MODIFIER.CMD_OR_CTRL];
- isNewModeAnAlternativeMode = true;
- } else {
- // Go to the old mode, if there is one.
- if (this.isInAlternativeMode_) {
- newMode = this.modeBeforeAlternativeModeActivated_;
- isNewModeAnAlternativeMode = false;
- } else {
- newMode = undefined;
- }
- }
-
- // Maybe a mode change isn't needed.
- if (this.mode === newMode || newMode === undefined)
- return;
-
- // Okay, we're changing.
- if (isNewModeAnAlternativeMode)
- this.modeBeforeAlternativeModeActivated_ = this.mode;
- this.mode = newMode;
- },
-
- get isInAlternativeMode_() {
- return !!this.modeBeforeAlternativeModeActivated_;
- },
-
- setModifierForAlternateMode: function(mode, modifier) {
- this.modifierToModeMap_[modifier] = mode;
- },
-
- get pos() {
- return {
- x: parseInt(this.style.left),
- y: parseInt(this.style.top)
- };
- },
-
- set pos(pos) {
- pos = this.constrainPositionToBounds_(pos);
-
- this.style.left = pos.x + 'px';
- this.style.top = pos.y + 'px';
-
- if (this.settingsKey_)
- tr.b.Settings.set(this.settingsKey_ + '.pos', this.pos);
- },
-
- constrainPositionToBounds_: function(pos) {
- var parent = this.offsetParent || document.body;
- var parentRect = tr.ui.b.windowRectForElement(parent);
-
- var top = 0;
- var bottom = parentRect.height - this.offsetHeight;
- var left = 0;
- var right = parentRect.width - this.offsetWidth;
-
- var res = {};
- res.x = Math.max(pos.x, left);
- res.x = Math.min(res.x, right);
-
- res.y = Math.max(pos.y, top);
- res.y = Math.min(res.y, bottom);
- return res;
- },
-
- onDragHandleMouseDown_: function(e) {
- e.preventDefault();
- e.stopImmediatePropagation();
-
- var mouseDownPos = {
- x: e.clientX - this.offsetLeft,
- y: e.clientY - this.offsetTop
- };
- tr.ui.b.trackMouseMovesUntilMouseUp(function(e) {
- var pos = {};
- pos.x = e.clientX - mouseDownPos.x;
- pos.y = e.clientY - mouseDownPos.y;
- this.pos = pos;
- }.bind(this));
- },
-
- checkIsClick_: function(e) {
- if (!this.isInteracting_ || !this.isClick_)
- return;
-
- var deltaX = this.mousePos_.x - this.mouseDownPos_.x;
- var deltaY = this.mousePos_.y - this.mouseDownPos_.y;
- var minDist = MIN_MOUSE_SELECTION_DISTANCE;
-
- if (deltaX * deltaX + deltaY * deltaY > minDist * minDist)
- this.isClick_ = false;
- },
-
- dispatchClickEvents_: function(e) {
- if (!this.isClick_)
- return;
-
- var modeInfo = MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION];
- var eventNames = modeInfo.eventNames;
-
- var mouseEvent = this.createEvent_(eventNames.begin);
- mouseEvent.appendSelection = isCmdOrCtrlPressed(e);
- this.dispatchEvent(mouseEvent);
-
- mouseEvent = this.createEvent_(eventNames.end);
- this.dispatchEvent(mouseEvent);
- }
- });
-
- return {
- MIN_MOUSE_SELECTION_DISTANCE: MIN_MOUSE_SELECTION_DISTANCE,
- MODIFIER: MODIFIER
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector_test.html
deleted file mode 100644
index 56719d76bd6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_mode_selector_test.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_selector.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var MOUSE_SELECTOR_MODE = tr.ui.b.MOUSE_SELECTOR_MODE;
- test('instantiate', function() {
- var sel = document.createElement('tr-ui-b-mouse-mode-selector');
- sel.supportedModeMask =
- MOUSE_SELECTOR_MODE.SELECTION |
- MOUSE_SELECTOR_MODE.PANSCAN;
- this.addHTMLOutput(sel);
- });
-
- test('changeMaskWithUnsupportedMode', function() {
- var sel = document.createElement('tr-ui-b-mouse-mode-selector');
- sel.mode = MOUSE_SELECTOR_MODE.SELECTION;
- assert.throw(function() {
- sel.supportedModeMask = MOUSE_SELECTOR_MODE.ZOOM;
- });
- });
-
- test('modePersists', function() {
- var sel1 = document.createElement('tr-ui-b-mouse-mode-selector');
- sel1.defaultMode_ = MOUSE_SELECTOR_MODE.ZOOM;
- sel1.settingsKey = 'foo';
- assert.equal(sel1.mode, MOUSE_SELECTOR_MODE.ZOOM);
-
- sel1.mode = MOUSE_SELECTOR_MODE.PANSCAN;
-
- var sel2 = document.createElement('tr-ui-b-mouse-mode-selector');
- sel2.settingsKey = 'foo';
- assert.equal(sel2.mode, MOUSE_SELECTOR_MODE.PANSCAN);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_modes.html b/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_modes.html
deleted file mode 100644
index 9387ef2ce68..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_modes.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var MOUSE_SELECTOR_MODE = {};
- MOUSE_SELECTOR_MODE.SELECTION = 0x1;
- MOUSE_SELECTOR_MODE.PANSCAN = 0x2;
- MOUSE_SELECTOR_MODE.ZOOM = 0x4;
- MOUSE_SELECTOR_MODE.TIMING = 0x8;
- MOUSE_SELECTOR_MODE.ROTATE = 0x10;
- MOUSE_SELECTOR_MODE.ALL_MODES = 0x1F;
-
- var MOUSE_SELECTOR_MODE_INFOS = {};
- MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.PANSCAN] = {
- mode: MOUSE_SELECTOR_MODE.PANSCAN,
- title: 'pan',
- eventNames: {
- enter: 'enterpan',
- begin: 'beginpan',
- update: 'updatepan',
- end: 'endpan',
- exit: 'exitpan'
- },
- activeBackgroundPosition: '-30px -10px',
- defaultBackgroundPosition: '0 -10px'
- };
- MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.SELECTION] = {
- mode: MOUSE_SELECTOR_MODE.SELECTION,
- title: 'selection',
- eventNames: {
- enter: 'enterselection',
- begin: 'beginselection',
- update: 'updateselection',
- end: 'endselection',
- exit: 'exitselection'
- },
- activeBackgroundPosition: '-30px -40px',
- defaultBackgroundPosition: '0 -40px'
- };
-
- MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ZOOM] = {
- mode: MOUSE_SELECTOR_MODE.ZOOM,
- title: 'zoom',
- eventNames: {
- enter: 'enterzoom',
- begin: 'beginzoom',
- update: 'updatezoom',
- end: 'endzoom',
- exit: 'exitzoom'
- },
- activeBackgroundPosition: '-30px -70px',
- defaultBackgroundPosition: '0 -70px'
- };
- MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.TIMING] = {
- mode: MOUSE_SELECTOR_MODE.TIMING,
- title: 'timing',
- eventNames: {
- enter: 'entertiming',
- begin: 'begintiming',
- update: 'updatetiming',
- end: 'endtiming',
- exit: 'exittiming'
- },
- activeBackgroundPosition: '-30px -100px',
- defaultBackgroundPosition: '0 -100px'
- };
- MOUSE_SELECTOR_MODE_INFOS[MOUSE_SELECTOR_MODE.ROTATE] = {
- mode: MOUSE_SELECTOR_MODE.ROTATE,
- title: 'rotate',
- eventNames: {
- enter: 'enterrotate',
- begin: 'beginrotate',
- update: 'updaterotate',
- end: 'endrotate',
- exit: 'exitrotate'
- },
- activeBackgroundPosition: '-30px -130px',
- defaultBackgroundPosition: '0 -130px'
- };
-
- return {
- MOUSE_SELECTOR_MODE_INFOS: MOUSE_SELECTOR_MODE_INFOS,
- MOUSE_SELECTOR_MODE: MOUSE_SELECTOR_MODE
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_tracker.html b/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_tracker.html
deleted file mode 100644
index 3ee8c77b49b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/mouse_tracker.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-/**
- * @fileoverview A Mouse-event abtraction that waits for
- * mousedown, then watches for subsequent mousemove events
- * until the next mouseup event, then waits again.
- * State changes are signaled with
- * 'mouse-tracker-start' : mousedown and tracking
- * 'mouse-tracker-move' : mouse move
- * 'mouse-tracker-end' : mouseup and not tracking.
- */
-
-tr.exportTo('tr.ui.b', function() {
-
- /**
- * @constructor
- * @param {HTMLElement} targetElement will recv events 'mouse-tracker-start',
- * 'mouse-tracker-move', 'mouse-tracker-end'.
- */
- function MouseTracker(opt_targetElement) {
- this.onMouseDown_ = this.onMouseDown_.bind(this);
- this.onMouseMove_ = this.onMouseMove_.bind(this);
- this.onMouseUp_ = this.onMouseUp_.bind(this);
-
- this.targetElement = opt_targetElement;
- }
-
- MouseTracker.prototype = {
-
- get targetElement() {
- return this.targetElement_;
- },
-
- set targetElement(targetElement) {
- if (this.targetElement_)
- this.targetElement_.removeEventListener('mousedown', this.onMouseDown_);
- this.targetElement_ = targetElement;
- if (this.targetElement_)
- this.targetElement_.addEventListener('mousedown', this.onMouseDown_);
- },
-
- onMouseDown_: function(e) {
- if (e.button !== 0)
- return true;
-
- e = this.remakeEvent_(e, 'mouse-tracker-start');
- this.targetElement_.dispatchEvent(e);
- document.addEventListener('mousemove', this.onMouseMove_);
- document.addEventListener('mouseup', this.onMouseUp_);
- this.targetElement_.addEventListener('blur', this.onMouseUp_);
- this.savePreviousUserSelect_ = document.body.style['-webkit-user-select'];
- document.body.style['-webkit-user-select'] = 'none';
- e.preventDefault();
- return true;
- },
-
- onMouseMove_: function(e) {
- e = this.remakeEvent_(e, 'mouse-tracker-move');
- this.targetElement_.dispatchEvent(e);
- },
-
- onMouseUp_: function(e) {
- document.removeEventListener('mousemove', this.onMouseMove_);
- document.removeEventListener('mouseup', this.onMouseUp_);
- this.targetElement_.removeEventListener('blur', this.onMouseUp_);
- document.body.style['-webkit-user-select'] =
- this.savePreviousUserSelect_;
- e = this.remakeEvent_(e, 'mouse-tracker-end');
- this.targetElement_.dispatchEvent(e);
- },
-
- remakeEvent_: function(e, newType) {
- var remade = new tr.b.Event(newType, true, true);
- remade.x = e.x;
- remade.y = e.y;
- remade.offsetX = e.offsetX;
- remade.offsetY = e.offsetY;
- remade.clientX = e.clientX;
- remade.clientY = e.clientY;
- return remade;
- }
-
- };
-
- function trackMouseMovesUntilMouseUp(mouseMoveHandler,
- opt_mouseUpHandler, opt_keyUpHandler) {
- function cleanupAndDispatchToMouseUp(e) {
- document.removeEventListener('mousemove', mouseMoveHandler);
- if (opt_keyUpHandler)
- document.removeEventListener('keyup', opt_keyUpHandler);
- document.removeEventListener('mouseup', cleanupAndDispatchToMouseUp);
- if (opt_mouseUpHandler)
- opt_mouseUpHandler(e);
- }
- document.addEventListener('mousemove', mouseMoveHandler);
- if (opt_keyUpHandler)
- document.addEventListener('keyup', opt_keyUpHandler);
- document.addEventListener('mouseup', cleanupAndDispatchToMouseUp);
- }
-
- return {
- MouseTracker: MouseTracker,
- trackMouseMovesUntilMouseUp: trackMouseMovesUntilMouseUp
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart.html
deleted file mode 100644
index 4a6503e4f44..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/ui/base/column_chart.html">
-<link rel="import" href="/tracing/ui/base/d3.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ColumnChart = tr.ui.b.ColumnChart;
-
- // @constructor
- var NameBarChart = tr.ui.b.define('name-bar-chart', ColumnChart);
-
- NameBarChart.prototype = {
- __proto__: ColumnChart.prototype,
-
- decorate: function() {
- ColumnChart.prototype.decorate.call(this);
- Polymer.dom(this).classList.remove('bar-chart');
- Polymer.dom(this).classList.add('name-bar-chart');
- },
-
- isDatumFieldSeries_: function(fieldName) {
- return fieldName !== 'x';
- },
-
- getXForDatum_: function(datum, index) {
- return index;
- },
-
- updateXAxis_: function(xAxis) {
- xAxis.selectAll('*').remove();
- var y = this.chartAreaSize.height + 10;
- var nameTexts = xAxis.selectAll('text')
- .data(this.data_);
- nameTexts
- .enter()
- .append('text')
- .attr('transform', function(d, index) {
- var cx = this.xScale_(index);
- // If you change the angle, then check the Math.cos() below.
- return 'rotate(45 ' + cx + ' ' + y + ')';
- }.bind(this))
- .attr('x', function(d, index) {
- return this.xScale_(index);
- }.bind(this))
- .attr('y', function(d) {
- return y;
- }.bind(this))
- .text(function(d, index) {
- return d.x;
- }.bind(this));
- nameTexts.exit().remove();
-
- // If the nameTexts extend past the bottom of the chart, then increase
- // this.bottomMargin_ and re-render.
- // TODO(benjhayden): Refactor with the code that is very similar to this
- // in chart_base_2d.
- var bottomMargin = this.margin.bottom;
- tr.b.requestAnimationFrame(function() {
- nameTexts[0].forEach(function(t) {
- var box = t.getBBox();
- // When the text is rotated, its height is the hypotenuse
- // of a small triangle H, and its width is the hypotenuse of a larger
- // triangle W. The bottomMargin must be equal to a side of H plus a
- // side of W.
- var h = Math.cos(Math.PI / 4) * (box.height + box.width);
- bottomMargin = Math.max(bottomMargin, h);
- }, this);
-
- bottomMargin = parseInt(Math.ceil(bottomMargin));
- if (bottomMargin > this.margin.bottom) {
- this.margin.bottom = bottomMargin;
- this.updateContents_();
- }
- }, this);
- }
- };
-
- return {
- NameBarChart: NameBarChart
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart_test.html
deleted file mode 100644
index 341a5a8fcb7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/name_bar_chart_test.html
+++ /dev/null
@@ -1,172 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/name_bar_chart.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiation_singleSeries', function() {
- var chart = new tr.ui.b.NameBarChart();
- chart.width = 200;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 'apple', value: 100},
- {x: 'ball', value: 110},
- {x: 'cat', value: 100},
- {x: 'dog', value: 50}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('undefined', function() {
- var chart = new tr.ui.b.NameBarChart();
- assert.throws(function() {
- chart.data = undefined;
- });
- });
-
- test('instantiation_twoSeries', function() {
- var chart = new tr.ui.b.NameBarChart();
-
- chart.width = 200;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 'apple', alpha: 100, beta: 50},
- {x: 'ball', alpha: 110, beta: 75},
- {x: 'cat', alpha: 100, beta: 125},
- {x: 'dog', alpha: 50, beta: 125}
- ];
- chart.data = data;
-
- var r = new tr.b.Range();
- r.addValue(20);
- r.addValue(40);
- chart.brushedRange = r;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueSparse', function() {
- var chart = new tr.ui.b.NameBarChart();
-
- chart.width = 200;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 'apple', alpha: 20, beta: undefined},
- {x: 'ball', alpha: undefined, beta: 10},
- {x: 'cat', alpha: 10, beta: undefined},
- {x: 'dog', alpha: undefined, beta: 20},
- {x: 'echo', alpha: 30, beta: 30}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_twoSparseSeriesWithFirstValueNotSparse', function() {
- var chart = new tr.ui.b.NameBarChart();
-
- chart.width = 200;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 'apple', alpha: 20, beta: 40},
- {x: 'ball', alpha: undefined, beta: 10},
- {x: 'cat', alpha: 10, beta: undefined},
- {x: 'dog', alpha: undefined, beta: 20},
- {x: 'echo', alpha: 30, beta: undefined}
- ];
- chart.data = data;
-
- this.addHTMLOutput(chart);
- });
-
- test('brushRangeFromIndices', function() {
- var chart = new tr.ui.b.NameBarChart();
- var data = [
- {x: 'apple', value: 50},
- {x: 'ball', value: 60},
- {x: 'cat', value: 70},
- {x: 'dog', value: 80},
- {x: 'echo', value: 90}
- ];
- chart.data = data;
- var r = new tr.b.Range();
-
- // Range min should be 10.
- r = chart.computeBrushRangeFromIndices(-2, 1);
- assert.equal(r.min, 0);
-
- // Range max should be 120.
- r = chart.computeBrushRangeFromIndices(3, 10);
- assert.equal(r.max, 4);
-
- // Range should be [10, 120]
- r = chart.computeBrushRangeFromIndices(-2, 10);
- assert.equal(r.min, 0);
- assert.equal(r.max, 4);
-
- // Range should be [20, 100]
- r = chart.computeBrushRangeFromIndices(1, 3);
- assert.equal(r.min, 0.5);
- assert.equal(r.max, 3.5);
- });
-
- test('instantiation_interactiveBrushing', function() {
- var chart = new tr.ui.b.NameBarChart();
- chart.width = 300;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 'apple', value: 50},
- {x: 'ball', value: 60},
- {x: 'cat', value: 80},
- {x: 'dog', value: 20},
- {x: 'echo', value: 30},
- {x: 'fortune', value: 20},
- {x: 'gpu', value: 15},
- {x: 'happy', value: 20}
- ];
- chart.data = data;
-
- var mouseDownIndex = undefined;
- var currentMouseIndex = undefined;
-
- function updateBrushedRange() {
- var r = new tr.b.Range();
- r.min = Math.max(0, Math.min(mouseDownIndex, currentMouseIndex));
- r.max = Math.min(data.length, Math.max(mouseDownIndex,
- currentMouseIndex) + 1);
- chart.brushedRange = r;
- }
-
- chart.addEventListener('item-mousedown', function(e) {
- mouseDownIndex = e.index;
- currentMouseIndex = e.index;
- updateBrushedRange();
- });
- chart.addEventListener('item-mousemove', function(e) {
- if (e.button === undefined)
- return;
- currentMouseIndex = e.index;
- updateBrushedRange();
- });
- chart.addEventListener('item-mouseup', function(e) {
- currentMouseIndex = e.index;
- updateBrushedRange();
- });
- this.addHTMLOutput(chart);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/overlay.html b/chromium/third_party/catapult/tracing/tracing/ui/base/overlay.html
deleted file mode 100644
index 911c68afbee..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/overlay.html
+++ /dev/null
@@ -1,348 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<template id="overlay-template">
- <style>
- overlay-mask {
- left: 0;
- padding: 8px;
- position: absolute;
- top: 0;
- z-index: 1000;
- font-family: sans-serif;
- -webkit-justify-content: center;
- background: rgba(0, 0, 0, 0.8);
- display: -webkit-flex;
- height: 100%;
- left: 0;
- position: fixed;
- top: 0;
- width: 100%;
- }
- overlay-mask:focus {
- outline: none;
- }
- overlay-vertical-centering-container {
- -webkit-justify-content: center;
- -webkit-flex-direction: column;
- display: -webkit-flex;
- }
- overlay-frame {
- z-index: 1100;
- background: rgb(255, 255, 255);
- border: 1px solid #ccc;
- margin: 75px;
- display: -webkit-flex;
- -webkit-flex-direction: column;
- min-height: 0;
- }
- title-bar {
- -webkit-align-items: center;
- -webkit-flex-direction: row;
- border-bottom: 1px solid #ccc;
- background-color: #ddd;
- display: -webkit-flex;
- padding: 5px;
- -webkit-flex: 0 0 auto;
- }
- title {
- display: inline;
- font-weight: bold;
- -webkit-box-flex: 1;
- -webkit-flex: 1 1 auto;
- }
- close-button {
- -webkit-align-self: flex-end;
- border: 1px solid #eee;
- background-color: #999;
- font-size: 10pt;
- font-weight: bold;
- padding: 2px;
- text-align: center;
- width: 16px;
- }
- close-button:hover {
- background-color: #ddd;
- border-color: black;
- cursor: pointer;
- }
- overlay-content {
- display: -webkit-flex;
- -webkit-flex: 1 1 auto;
- -webkit-flex-direction: column;
- overflow-y: auto;
- padding: 10px;
- min-width: 300px;
- min-height: 0;
- }
- button-bar {
- -webkit-align-items: baseline;
- border-top: 1px solid #ccc;
- display: -webkit-flex;
- -webkit-flex: 0 0 auto;
- -webkit-flex-direction: row-reverse;
- padding: 4px;
- }
- </style>
-
- <overlay-mask>
- <overlay-vertical-centering-container>
- <overlay-frame>
- <title-bar>
- <title></title>
- <close-button>&#x2715</close-button>
- </title-bar>
- <overlay-content>
- <content></content>
- </overlay-content>
- <button-bar></button-bar>
- </overlay-frame>
- </overlay-vertical-centering-container>
- </overlay-mask>
-</template>
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Implements an element that is hidden by default, but
- * when shown, dims and (attempts to) disable the main document.
- *
- * You can turn any div into an overlay. Note that while an
- * overlay element is shown, its parent is changed. Hiding the overlay
- * restores its original parentage.
- *
- */
-tr.exportTo('tr.ui.b', function() {
- if (tr.isHeadless)
- return {};
-
- var THIS_DOC = document.currentScript.ownerDocument;
-
- /**
- * Creates a new overlay element. It will not be visible until shown.
- * @constructor
- * @extends {HTMLDivElement}
- */
- var Overlay = tr.ui.b.define('overlay');
-
- Overlay.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- /**
- * Initializes the overlay element.
- */
- decorate: function() {
- Polymer.dom(this).classList.add('overlay');
-
- this.parentEl_ = this.ownerDocument.body;
-
- this.visible_ = false;
- this.userCanClose_ = true;
-
- this.onKeyDown_ = this.onKeyDown_.bind(this);
- this.onClick_ = this.onClick_.bind(this);
- this.onFocusIn_ = this.onFocusIn_.bind(this);
- this.onDocumentClick_ = this.onDocumentClick_.bind(this);
- this.onClose_ = this.onClose_.bind(this);
-
- this.addEventListener('visible-change',
- tr.ui.b.Overlay.prototype.onVisibleChange_.bind(this), true);
-
- // Setup the shadow root
- var createShadowRoot = this.createShadowRoot ||
- this.webkitCreateShadowRoot;
- this.shadow_ = createShadowRoot.call(this);
- Polymer.dom(this.shadow_).appendChild(
- tr.ui.b.instantiateTemplate('#overlay-template', THIS_DOC));
-
- this.closeBtn_ = Polymer.dom(this.shadow_).querySelector('close-button');
- this.closeBtn_.addEventListener('click', this.onClose_);
-
- Polymer.dom(this.shadow_)
- .querySelector('overlay-frame')
- .addEventListener('click', this.onClick_);
-
- this.observer_ = new WebKitMutationObserver(
- this.didButtonBarMutate_.bind(this));
- this.observer_.observe(
- Polymer.dom(this.shadow_).querySelector('button-bar'),
- { childList: true });
-
- // title is a variable on regular HTMLElements. However, we want to
- // use it for something more useful.
- Object.defineProperty(
- this, 'title', {
- get: function() {
- return Polymer.dom(Polymer.dom(this.shadow_)
- .querySelector('title')).textContent;
- },
- set: function(title) {
- Polymer.dom(Polymer.dom(this.shadow_).querySelector('title'))
- .textContent = title;
- }
- });
- },
-
- set userCanClose(userCanClose) {
- this.userCanClose_ = userCanClose;
- this.closeBtn_.style.display =
- userCanClose ? 'block' : 'none';
- },
-
- get buttons() {
- return Polymer.dom(this.shadow_).querySelector('button-bar');
- },
-
- get visible() {
- return this.visible_;
- },
-
- set visible(newValue) {
- if (this.visible_ === newValue)
- return;
-
- this.visible_ = newValue;
- var e = new tr.b.Event('visible-change');
- this.dispatchEvent(e);
- },
-
- onVisibleChange_: function() {
- this.visible_ ? this.show_() : this.hide_();
- },
-
- show_: function() {
- Polymer.dom(this.parentEl_).appendChild(this);
-
- if (this.userCanClose_) {
- this.addEventListener('keydown', this.onKeyDown_.bind(this));
- this.addEventListener('click', this.onDocumentClick_.bind(this));
- this.closeBtn_.addEventListener('click', this.onClose_);
- }
-
- this.parentEl_.addEventListener('focusin', this.onFocusIn_);
- this.tabIndex = 0;
-
- // Focus the first thing we find that makes sense. (Skip the close button
- // as it doesn't make sense as the first thing to focus.)
- var focusEl = undefined;
- var elList =
- Polymer.dom(this).querySelectorAll('button, input, list, select, a');
- if (elList.length > 0) {
- if (elList[0] === this.closeBtn_) {
- if (elList.length > 1)
- focusEl = elList[1];
- } else {
- focusEl = elList[0];
- }
- }
- if (focusEl === undefined)
- focusEl = this;
- focusEl.focus();
- },
-
- hide_: function() {
- Polymer.dom(this.parentEl_).removeChild(this);
-
- this.parentEl_.removeEventListener('focusin', this.onFocusIn_);
-
- if (this.closeBtn_)
- this.closeBtn_.removeEventListener('click', this.onClose_);
-
- document.removeEventListener('keydown', this.onKeyDown_);
- document.removeEventListener('click', this.onDocumentClick_);
- },
-
- onClose_: function(e) {
- this.visible = false;
- if ((e.type !== 'keydown') ||
- (e.type === 'keydown' && e.keyCode === 27))
- e.stopPropagation();
- e.preventDefault();
- tr.b.dispatchSimpleEvent(this, 'closeclick');
- },
-
- onFocusIn_: function(e) {
- if (e.target === this)
- return;
-
- window.setTimeout(function() { this.focus(); }, 0);
- e.preventDefault();
- e.stopPropagation();
- },
-
- didButtonBarMutate_: function(e) {
- var hasButtons = this.buttons.children.length > 0;
- if (hasButtons) {
- Polymer.dom(this.shadow_).querySelector('button-bar').style.display =
- undefined;
- } else {
- Polymer.dom(this.shadow_).querySelector('button-bar').style.display =
- 'none';
- }
- },
-
- onKeyDown_: function(e) {
- // Disallow shift-tab back to another element.
- if (e.keyCode === 9 && // tab
- e.shiftKey &&
- e.target === this) {
- e.preventDefault();
- return;
- }
-
- if (e.keyCode !== 27) // escape
- return;
-
- this.onClose_(e);
- },
-
- onClick_: function(e) {
- e.stopPropagation();
- },
-
- onDocumentClick_: function(e) {
- if (!this.userCanClose_)
- return;
-
- this.onClose_(e);
- }
- };
-
- Overlay.showError = function(msg, opt_err) {
- var o = new Overlay();
- o.title = 'Error';
- Polymer.dom(o).textContent = msg;
- if (opt_err) {
- var e = tr.b.normalizeException(opt_err);
-
- var stackDiv = document.createElement('pre');
- Polymer.dom(stackDiv).textContent = e.stack;
- stackDiv.style.paddingLeft = '8px';
- stackDiv.style.margin = 0;
- Polymer.dom(o).appendChild(stackDiv);
- }
- var b = document.createElement('button');
- Polymer.dom(b).textContent = 'OK';
- b.addEventListener('click', function() {
- o.visible = false;
- });
- Polymer.dom(o.buttons).appendChild(b);
- o.visible = true;
- return o;
- };
-
- return {
- Overlay: Overlay
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/overlay_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/overlay_test.html
deleted file mode 100644
index caf03dab11f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/overlay_test.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function addShowButtonForDialog(dlg) {
- var btn = document.createElement('button');
- Polymer.dom(btn).textContent = 'Launch Overlay';
- btn.addEventListener('click', function(e) {
- dlg.visible = true;
- e.stopPropagation();
- });
-
- this.addHTMLOutput(btn);
- }
-
- function makeButton(title) {
- var btn = document.createElement('button');
- Polymer.dom(btn).textContent = title;
- return btn;
- }
-
- function makeCloseButton(dlg) {
- var btn = makeButton('close');
- btn.addEventListener('click', function(e) {
- dlg.onClose_(e);
- });
- return btn;
- }
-
- test('instantiate', function() {
- var dlg = new tr.ui.b.Overlay();
- Polymer.dom(dlg).classList.add('example-overlay');
- dlg.title = 'ExampleOverlay';
- Polymer.dom(dlg).innerHTML = 'hello';
- Polymer.dom(dlg.buttons).appendChild(makeButton('i am a button'));
- Polymer.dom(dlg.buttons).appendChild(makeCloseButton(dlg));
- Polymer.dom(dlg.buttons).appendChild(tr.ui.b.createSpan(
- {textContent: 'i am a span'}));
- addShowButtonForDialog.call(this, dlg);
- });
-
- test('instantiate_noButtons', function() {
- var dlg = new tr.ui.b.Overlay();
- Polymer.dom(dlg).classList.add('example-overlay');
- dlg.title = 'ExampleOverlay';
- Polymer.dom(dlg).innerHTML = 'hello';
- addShowButtonForDialog.call(this, dlg);
- });
-
- test('instantiate_disableUserClose', function() {
- var dlg = new tr.ui.b.Overlay();
- Polymer.dom(dlg).classList.add('example-overlay');
- dlg.userCanClose = false;
- dlg.title = 'Unclosable';
- Polymer.dom(dlg).innerHTML = 'This has no close X button.';
- Polymer.dom(dlg.buttons).appendChild(makeCloseButton(dlg));
- addShowButtonForDialog.call(this, dlg);
- });
-
- test('instantiateTall', function() {
- var dlg = new tr.ui.b.Overlay();
- dlg.title = 'TallContent';
- var contentEl = document.createElement('div');
- contentEl.style.overflowY = 'auto';
- Polymer.dom(dlg).appendChild(contentEl);
-
- for (var i = 0; i < 1000; i++) {
- var el = document.createElement('div');
- Polymer.dom(el).textContent = 'line ' + i;
- Polymer.dom(contentEl).appendChild(el);
- }
-
-
- Polymer.dom(dlg.buttons).appendChild(makeButton('i am a button'));
- addShowButtonForDialog.call(this, dlg);
- });
-
- test('instantiateTallWithManyDirectChildren', function() {
- var dlg = new tr.ui.b.Overlay();
- dlg.title = 'TallContent';
- for (var i = 0; i < 100; i++) {
- var el = document.createElement('div');
- el.style.webkitFlex = '1 0 auto';
- Polymer.dom(el).textContent = 'line ' + i;
- Polymer.dom(dlg).appendChild(el);
- }
-
- Polymer.dom(dlg.buttons).appendChild(makeButton('i am a button'));
- addShowButtonForDialog.call(this, dlg);
- });
-
- test('closeclickEvent', function() {
- var dlg = new tr.ui.b.Overlay();
- dlg.title = 'Test closeclick event';
- var closeBtn = makeCloseButton(dlg);
- Polymer.dom(dlg.buttons).appendChild(closeBtn);
-
- var closeClicked = false;
- dlg.addEventListener('closeclick', function() {
- closeClicked = true;
- });
-
- return new Promise(function(resolve, reject) {
- function pressClose() {
- closeBtn.click();
- if (closeClicked)
- resolve();
- else
- reject(new Error('closeclick event is not dispatched'));
- }
- dlg.visible = true;
- setTimeout(pressClose, 60);
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.css b/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.css
deleted file mode 100644
index e6dc135bf12..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Copyright 2014 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-* /deep/ .pie-chart .arc-text {
- font-size: 8pt;
-}
-
-* /deep/ .pie-chart .label {
- font-size: 10pt;
-}
-
-* /deep/ .pie-chart polyline {
- fill: none;
- stroke: black;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.html
deleted file mode 100644
index 36418c41473..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart.html
+++ /dev/null
@@ -1,275 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/ui/base/chart_base.html">
-<link rel="import" href="/tracing/ui/base/d3.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="stylesheet" href="/tracing/ui/base/pie_chart.css">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ChartBase = tr.ui.b.ChartBase;
-
- var MIN_RADIUS = 100;
-
- /**
- * @constructor
- */
- var PieChart = tr.ui.b.define('pie-chart', ChartBase);
-
- PieChart.prototype = {
- __proto__: ChartBase.prototype,
-
- decorate: function() {
- ChartBase.prototype.decorate.call(this);
- Polymer.dom(this).classList.add('pie-chart');
-
- this.data_ = undefined;
-
- var chartAreaSel = d3.select(this.chartAreaElement);
- var pieGroupSel = chartAreaSel.append('g')
- .attr('class', 'pie-group');
- this.pieGroup_ = pieGroupSel.node();
-
- this.pathsGroup_ = pieGroupSel.append('g')
- .attr('class', 'paths')
- .node();
- this.labelsGroup_ = pieGroupSel.append('g')
- .attr('class', 'labels')
- .node();
- this.linesGroup_ = pieGroupSel.append('g')
- .attr('class', 'lines')
- .node();
- },
-
- get data() {
- return this.data_;
- },
-
- get titleMarginPx() {
- return 40;
- },
-
- /**
- * @param {Array} data Data for the chart, where each element in the array
- * must be of the form {label: str, value: number}.
- */
- set data(data) {
- if (data !== undefined) {
- // Figure out the label values in the data set. E.g. from
- // [{label: 'a', ...}, {label: 'b', ...}]
- // we would commpute ['a', 'y']. These become the series keys.
- // Don't clear seriesByKey_; the caller might have put state in it using
- // getDataSeries() before setting data.
- var seenSeriesKeys = {};
- data.forEach(function(d) {
- var k = d.label;
- if (seenSeriesKeys[k])
- throw new Error('Label ' + k + ' has been used already');
- this.getDataSeries(k);
- seenSeriesKeys[k] = true;
- }, this);
- }
- this.data_ = data;
- this.updateContents_();
- },
-
- getMinSize: function() {
- this.updateContents_();
-
- var labelSel = d3.select(this.labelsGroup_).selectAll('.label');
- var maxLabelWidth = -Number.MAX_VALUE;
- var leftTextHeightSum = 0;
- var rightTextHeightSum = 0;
- labelSel.each(function(l) {
- var r = this.getBoundingClientRect();
- maxLabelWidth = Math.max(maxLabelWidth, r.width + 32);
- if (this.style.textAnchor === 'end') {
- leftTextHeightSum += r.height;
- } else {
- rightTextHeightSum += r.height;
- }
- });
-
- var titleWidth = Polymer.dom(this).querySelector(
- '#title').getBoundingClientRect().width;
- var margin = this.margin;
- var marginWidth = margin.left + margin.right;
- var marginHeight = margin.top + margin.bottom;
- return {
- width: Math.max(2 * MIN_RADIUS + 2 * maxLabelWidth,
- titleWidth * 1.1) + marginWidth,
- height: marginHeight + Math.max(2 * MIN_RADIUS,
- leftTextHeightSum,
- rightTextHeightSum) * 1.25
- };
- },
-
- updateScales_: function(width, height) {
- if (this.data_ === undefined)
- return;
- },
-
- updateContents_: function() {
- ChartBase.prototype.updateContents_.call(this);
- if (!this.data_)
- return;
-
- var width = this.chartAreaSize.width;
- var height = this.chartAreaSize.height;
- var radius = Math.max(MIN_RADIUS, Math.min(width, height * 0.95) / 2);
-
- d3.select(this.pieGroup_).attr(
- 'transform',
- 'translate(' + width / 2 + ',' + height / 2 + ')');
-
- // Bind the pie layout to its data
- var pieLayout = d3.layout.pie()
- .value(function(d) { return d.value; })
- .sort(null);
-
- var piePathsSel = d3.select(this.pathsGroup_)
- .datum(this.data_)
- .selectAll('path')
- .data(pieLayout);
-
- function midAngle(d) {
- return d.startAngle + (d.endAngle - d.startAngle) / 2;
- }
-
- var pathsArc = d3.svg.arc()
- .innerRadius(0)
- .outerRadius(radius - 30);
-
- var valueLabelArc = d3.svg.arc()
- .innerRadius(radius - 100)
- .outerRadius(radius - 30);
-
- var lineBeginArc = d3.svg.arc()
- .innerRadius(radius - 50)
- .outerRadius(radius - 50);
-
- var lineEndArc = d3.svg.arc()
- .innerRadius(radius)
- .outerRadius(radius);
-
- // Paths.
- piePathsSel.enter().append('path')
- .attr('class', 'arc')
- .attr('fill', function(d, i) {
- var origData = this.data_[i];
- var dataSeries = this.getDataSeries(origData.label);
- if (origData.label === this.currentHighlightedLegendKey)
- return dataSeries.highlightedColor;
- return dataSeries.color;
- }.bind(this))
- .attr('d', pathsArc)
- .on('click', function(d, i) {
- var origData = this.data_[i];
- var event = new tr.b.Event('item-click');
- event.data = origData;
- event.index = i;
- this.dispatchEvent(event);
- d3.event.stopPropagation();
- }.bind(this))
- .on('mouseenter', function(d, i) {
- var origData = this.data_[i];
- this.pushTempHighlightedLegendKey(origData.label);
- }.bind(this))
- .on('mouseleave', function(d, i) {
- var origData = this.data_[i];
- this.popTempHighlightedLegendKey(origData.label);
- }.bind(this));
-
- // Value labels.
- piePathsSel.enter().append('text')
- .attr('class', 'arc-text')
- .attr('transform', function(d) {
- return 'translate(' + valueLabelArc.centroid(d) + ')';
- })
- .attr('dy', '.35em')
- .style('text-anchor', 'middle')
- .on('mouseenter', function(d, i) {
- var origData = this.data_[i];
- this.pushTempHighlightedLegendKey(origData.label);
- }.bind(this))
- .on('mouseleave', function(d, i) {
- var origData = this.data_[i];
- this.popTempHighlightedLegendKey(origData.label);
- }.bind(this))
- .text(function(d, i) {
- var origData = this.data_[i];
- if (origData.valueText === undefined)
- return '';
-
- if (d.endAngle - d.startAngle < 0.4)
- return '';
- return origData.valueText;
- }.bind(this));
-
- piePathsSel.exit().remove();
-
- // Labels.
- var labelSel = d3.select(this.labelsGroup_).selectAll('.label')
- .data(pieLayout(this.data_));
- labelSel.enter()
- .append('text')
- .attr('class', 'label')
- .attr('dy', '.35em');
-
- labelSel.text(function(d) {
- if (d.data.label.length > 40)
- return d.data.label.substr(0, 40) + '...';
- return d.data.label;
- });
- labelSel.attr('transform', function(d) {
- var pos = lineEndArc.centroid(d);
- pos[0] = radius * (midAngle(d) < Math.PI ? 1 : -1);
- return 'translate(' + pos + ')';
- });
- labelSel.style('text-anchor', function(d) {
- return midAngle(d) < Math.PI ? 'start' : 'end';
- });
-
- // Lines.
- var lineSel = d3.select(this.linesGroup_).selectAll('.line')
- .data(pieLayout(this.data_));
- lineSel.enter()
- .append('polyline')
- .attr('class', 'line')
- .attr('dy', '.35em');
- lineSel.attr('points', function(d) {
- var pos = lineEndArc.centroid(d);
- pos[0] = radius * 0.95 * (midAngle(d) < Math.PI ? 1 : -1);
- return [lineBeginArc.centroid(d), lineEndArc.centroid(d), pos];
- });
- },
-
- updateHighlight_: function() {
- ChartBase.prototype.updateHighlight_.call(this);
- // Update color of pie segments.
- var pathsGroupSel = d3.select(this.pathsGroup_);
- var that = this;
- pathsGroupSel.selectAll('.arc').each(function(d, i) {
- var origData = that.data_[i];
- var dataSeries = that.getDataSeries(origData.label);
- if (origData.label === that.currentHighlightedLegendKey)
- this.style.fill = dataSeries.highlightedColor;
- else
- this.style.fill = dataSeries.color;
- });
- }
- };
-
- return {
- PieChart: PieChart
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart_test.html
deleted file mode 100644
index 854c872055e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/pie_chart_test.html
+++ /dev/null
@@ -1,207 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/pie_chart.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('simple', function() {
- var chart = new tr.ui.b.PieChart();
- chart.width = 400;
- chart.height = 200;
- assert.equal(chart.getAttribute('width'), '400');
- assert.equal(chart.getAttribute('height'), '200');
- chart.chartTitle = 'Chart title';
- var data = [
- {label: 'a', value: 100},
- {label: 'b', value: 200},
- {label: 'c', value: 300}
- ];
- chart.data = data;
- chart.highlightedLegendKey = 'a';
- chart.pushTempHighlightedLegendKey('b');
- chart.highlightedLegendKey = 'c';
- assert.equal(chart.currentHighlightedLegendKey, 'b');
- chart.popTempHighlightedLegendKey('b');
- assert.equal(chart.highlightedLegendKey, 'c');
- this.addHTMLOutput(chart);
- });
-
- test('withValueText', function() {
- var chart = new tr.ui.b.PieChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {label: 'a', value: 100, valueText: '100ms'},
- {label: 'b', value: 200, valueText: '200ms'},
- {label: 'c', value: 300, valueText: '300ms'}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('clickEvent', function() {
- var chart = new tr.ui.b.PieChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {label: 'a', value: 100, foo: 42},
- {label: 'b', value: 200, foo: 43}
- ];
- chart.data = data;
-
- var didGetClick = false;
- chart.addEventListener('item-click', function(event) {
- assert.equal(event.index, 1);
- assert.equal(event.data.foo, 43);
- didGetClick = true;
- });
-
- var arc0 = Polymer.dom(chart).querySelectorAll('.paths > path')[1];
- tr.b.dispatchSimpleEvent(arc0, 'click');
- assert.isTrue(didGetClick);
- });
-
- test('lotsOfValues', function() {
- var chart = new tr.ui.b.PieChart();
- chart.chartTitle = 'Chart title';
- var data = [
- {label: 'a', value: 100},
- {label: 'bb', value: 200},
- {label: 'cccc', value: 300},
- {label: 'dd', value: 50},
- {label: 'eeeee', value: 250},
- {label: 'fffffff', value: 120},
- {label: 'ggg', value: 90},
- {label: 'hhhh', value: 175},
- {label: 'toolongiiiiiiiiiiiiiiiiiiiiiiiii', value: 325},
- {label: 'jjjjjj', value: 140},
- {label: 'kkkkkkkkk', value: 170},
- {label: 'lll', value: 220}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
-
- var minSize = chart.getMinSize();
- chart.setSize(chart.getMinSize());
- });
-
- test('denseValues', function() {
- var chart = new tr.ui.b.PieChart();
- chart.chartTitle = 'Chart title';
- var data = [
- {
- valueText: '2.855ms',
- value: 2.854999999999997,
- label: '156959'
- },
- {
- valueText: '9.949ms',
- value: 9.948999999999998,
- label: '16131'
- },
- {
- valueText: '42.314ms',
- value: 42.314000000000725,
- label: '51511'
- },
- {
- valueText: '31.069ms',
- value: 31.06900000000028,
- label: 'AudioOutputDevice'
- },
- {
- valueText: '1.418ms',
- value: 1.418,
- label: 'BrowserBlockingWorker2/50951'
- },
- {
- valueText: '0.044ms',
- value: 0.044,
- label: 'BrowserBlockingWorker3/50695'
- },
- {
- valueText: '18.526ms',
- value: 18.52599999999993,
- label: 'Chrome_ChildIOThread'
- },
- {
- valueText: '2.888ms',
- value: 2.888,
- label: 'Chrome_FileThread'
- },
- {
- valueText: '0.067ms',
- value: 0.067,
- label: 'Chrome_HistoryThread'
- },
- {
- valueText: '25.421ms',
- value: 25.421000000000046,
- label: 'Chrome_IOThread'
- },
- {
- valueText: '0.019ms',
- value: 0.019,
- label: 'Chrome_ProcessLauncherThread'
- },
- {
- valueText: '643.088ms',
- value: 643.087999999995,
- label: 'Compositor'
- },
- {
- valueText: '4.05ms',
- value: 4.049999999999973,
- label: 'CompositorRasterWorker1/22031'
- },
- {
- valueText: '50.04ms',
- value: 50.040000000000106,
- label: 'CrBrowserMain'
- },
- {
- valueText: '1256.513ms',
- value: 1256.5130000000042,
- label: 'CrGpuMain'
- },
- {
- valueText: '5502.195ms',
- value: 5502.19499999999,
- label: 'CrRendererMain'
- },
- {
- valueText: '15.553ms',
- value: 15.552999999999862,
- label: 'FFmpegDemuxer'
- },
- {
- valueText: '63.706ms',
- value: 63.706000000001524,
- label: 'Media'
- },
- {
- valueText: '2.742ms',
- value: 2.7419999999999987,
- label: 'PowerSaveBlocker'
- },
- {
- valueText: '0.115ms',
- value: 0.11500000000000005,
- label: 'Watchdog'
- }
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
-
- var minSize = chart.getMinSize();
- chart.setSize(chart.getMinSize());
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/polymer_postload.html b/chromium/third_party/catapult/tracing/tracing/ui/base/polymer_postload.html
deleted file mode 100644
index fc93631bb88..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/polymer_postload.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<script>
-'use strict';
-
-if (!Polymer.Settings.useNativeShadow) {
- tr.b.showPanic('Polymer error', 'base only works in shadow mode');
-}
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/polymer_preload.html b/chromium/third_party/catapult/tracing/tracing/ui/base/polymer_preload.html
deleted file mode 100644
index 8860b5befec..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/polymer_preload.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<script>
-'use strict';
-
-// Force Polymer into native shadowDom mode
-if (window.Polymer)
- throw new Error('Cannot proceed. Polymer already present.');
-window.Polymer = {};
-window.Polymer.dom = 'shadow';
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/quad_stack_view.html b/chromium/third_party/catapult/tracing/tracing/ui/base/quad_stack_view.html
deleted file mode 100644
index bb43d8bbce7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/quad_stack_view.html
+++ /dev/null
@@ -1,689 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/bbox2.html">
-<link rel="import" href="/tracing/base/math.html">
-<link rel="import" href="/tracing/base/quad.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/rect.html">
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/ui/base/camera.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_selector.html">
-<link rel="import" href="/tracing/ui/base/mouse_tracker.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<style>
-* /deep/ quad-stack-view {
- display: block;
- float: left;
- height: 100%;
- overflow: hidden;
- position: relative; /* For the absolute positioned mouse-mode-selector */
- width: 100%;
-}
-
-* /deep/ quad-stack-view > #header {
- position: absolute;
- font-size: 70%;
- top: 10px;
- left: 10px;
- width: 800px;
-}
-* /deep/ quad-stack-view > #stacking-distance-slider {
- position: absolute;
- font-size: 70%;
- top: 10px;
- right: 10px;
-}
-
-* /deep/ quad-stack-view > #chrome-left {
- background-image: url('../images/chrome-left.png');
- display: none;
-}
-
-* /deep/ quad-stack-view > #chrome-mid {
- background-image: url('../images/chrome-mid.png');
- display: none;
-}
-
-* /deep/ quad-stack-view > #chrome-right {
- background-image: url('../images/chrome-right.png');
- display: none;
-}
-</style>
-
-<template id='quad-stack-view-template'>
- <div id="header"></div>
- <input id="stacking-distance-slider" type="range" min=1 max=400 step=1>
- </input>
- <canvas id='canvas'></canvas>
- <img id='chrome-left'/>
- <img id='chrome-mid'/>
- <img id='chrome-right'/>
-</template>
-
-<script>
-'use strict';
-
-/**
- * @fileoverview QuadStackView controls the content and viewing angle a
- * QuadStack.
- */
-tr.exportTo('tr.ui.b', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- var constants = {};
- constants.IMAGE_LOAD_RETRY_TIME_MS = 500;
- constants.SUBDIVISION_MINIMUM = 1;
- constants.SUBDIVISION_RECURSION_DEPTH = 3;
- constants.SUBDIVISION_DEPTH_THRESHOLD = 100;
- constants.FAR_PLANE_DISTANCE = 10000;
-
- // Care of bckenney@ via
- // http://extremelysatisfactorytotalitarianism.com/blog/?p=2120
- function drawTexturedTriangle(ctx, img, p0, p1, p2, t0, t1, t2) {
- var tmpP0 = [p0[0], p0[1]];
- var tmpP1 = [p1[0], p1[1]];
- var tmpP2 = [p2[0], p2[1]];
- var tmpT0 = [t0[0], t0[1]];
- var tmpT1 = [t1[0], t1[1]];
- var tmpT2 = [t2[0], t2[1]];
-
- ctx.beginPath();
- ctx.moveTo(tmpP0[0], tmpP0[1]);
- ctx.lineTo(tmpP1[0], tmpP1[1]);
- ctx.lineTo(tmpP2[0], tmpP2[1]);
- ctx.closePath();
-
- tmpP1[0] -= tmpP0[0];
- tmpP1[1] -= tmpP0[1];
- tmpP2[0] -= tmpP0[0];
- tmpP2[1] -= tmpP0[1];
-
- tmpT1[0] -= tmpT0[0];
- tmpT1[1] -= tmpT0[1];
- tmpT2[0] -= tmpT0[0];
- tmpT2[1] -= tmpT0[1];
-
- var det = 1 / (tmpT1[0] * tmpT2[1] - tmpT2[0] * tmpT1[1]),
-
- // linear transformation
- a = (tmpT2[1] * tmpP1[0] - tmpT1[1] * tmpP2[0]) * det,
- b = (tmpT2[1] * tmpP1[1] - tmpT1[1] * tmpP2[1]) * det,
- c = (tmpT1[0] * tmpP2[0] - tmpT2[0] * tmpP1[0]) * det,
- d = (tmpT1[0] * tmpP2[1] - tmpT2[0] * tmpP1[1]) * det,
-
- // translation
- e = tmpP0[0] - a * tmpT0[0] - c * tmpT0[1],
- f = tmpP0[1] - b * tmpT0[0] - d * tmpT0[1];
-
- ctx.save();
- ctx.transform(a, b, c, d, e, f);
- ctx.clip();
- ctx.drawImage(img, 0, 0);
- ctx.restore();
- }
-
- function drawTriangleSub(
- ctx, img, p0, p1, p2, t0, t1, t2, opt_recursionDepth) {
- var depth = opt_recursionDepth || 0;
-
- // We may subdivide if we are not at the limit of recursion.
- var subdivisionIndex = 0;
- if (depth < constants.SUBDIVISION_MINIMUM) {
- subdivisionIndex = 7;
- } else if (depth < constants.SUBDIVISION_RECURSION_DEPTH) {
- if (Math.abs(p0[2] - p1[2]) > constants.SUBDIVISION_DEPTH_THRESHOLD)
- subdivisionIndex += 1;
- if (Math.abs(p0[2] - p2[2]) > constants.SUBDIVISION_DEPTH_THRESHOLD)
- subdivisionIndex += 2;
- if (Math.abs(p1[2] - p2[2]) > constants.SUBDIVISION_DEPTH_THRESHOLD)
- subdivisionIndex += 4;
- }
-
- // These need to be created every time, since temporaries
- // outside of the scope will be rewritten in recursion.
- var p01 = vec4.create();
- var p02 = vec4.create();
- var p12 = vec4.create();
- var t01 = vec2.create();
- var t02 = vec2.create();
- var t12 = vec2.create();
-
- // Calculate the position before w-divide.
- for (var i = 0; i < 2; ++i) {
- p0[i] *= p0[2];
- p1[i] *= p1[2];
- p2[i] *= p2[2];
- }
-
- // Interpolate the 3d position.
- for (var i = 0; i < 4; ++i) {
- p01[i] = (p0[i] + p1[i]) / 2;
- p02[i] = (p0[i] + p2[i]) / 2;
- p12[i] = (p1[i] + p2[i]) / 2;
- }
-
- // Re-apply w-divide to the original points and the interpolated ones.
- for (var i = 0; i < 2; ++i) {
- p0[i] /= p0[2];
- p1[i] /= p1[2];
- p2[i] /= p2[2];
-
- p01[i] /= p01[2];
- p02[i] /= p02[2];
- p12[i] /= p12[2];
- }
-
- // Interpolate the texture coordinates.
- for (var i = 0; i < 2; ++i) {
- t01[i] = (t0[i] + t1[i]) / 2;
- t02[i] = (t0[i] + t2[i]) / 2;
- t12[i] = (t1[i] + t2[i]) / 2;
- }
-
- // Based on the index, we subdivide the triangle differently.
- // Assuming the triangle is p0, p1, p2 and points between i j
- // are represented as pij (that is, a point between p2 and p0
- // is p02, etc), then the new triangles are defined by
- // the 3rd 4th and 5th arguments into the function.
- switch (subdivisionIndex) {
- case 1:
- drawTriangleSub(ctx, img, p0, p01, p2, t0, t01, t2, depth + 1);
- drawTriangleSub(ctx, img, p01, p1, p2, t01, t1, t2, depth + 1);
- break;
- case 2:
- drawTriangleSub(ctx, img, p0, p1, p02, t0, t1, t02, depth + 1);
- drawTriangleSub(ctx, img, p1, p02, p2, t1, t02, t2, depth + 1);
- break;
- case 3:
- drawTriangleSub(ctx, img, p0, p01, p02, t0, t01, t02, depth + 1);
- drawTriangleSub(ctx, img, p02, p01, p2, t02, t01, t2, depth + 1);
- drawTriangleSub(ctx, img, p01, p1, p2, t01, t1, t2, depth + 1);
- break;
- case 4:
- drawTriangleSub(ctx, img, p0, p12, p2, t0, t12, t2, depth + 1);
- drawTriangleSub(ctx, img, p0, p1, p12, t0, t1, t12, depth + 1);
- break;
- case 5:
- drawTriangleSub(ctx, img, p0, p01, p2, t0, t01, t2, depth + 1);
- drawTriangleSub(ctx, img, p2, p01, p12, t2, t01, t12, depth + 1);
- drawTriangleSub(ctx, img, p01, p1, p12, t01, t1, t12, depth + 1);
- break;
- case 6:
- drawTriangleSub(ctx, img, p0, p12, p02, t0, t12, t02, depth + 1);
- drawTriangleSub(ctx, img, p0, p1, p12, t0, t1, t12, depth + 1);
- drawTriangleSub(ctx, img, p02, p12, p2, t02, t12, t2, depth + 1);
- break;
- case 7:
- drawTriangleSub(ctx, img, p0, p01, p02, t0, t01, t02, depth + 1);
- drawTriangleSub(ctx, img, p01, p12, p02, t01, t12, t02, depth + 1);
- drawTriangleSub(ctx, img, p01, p1, p12, t01, t1, t12, depth + 1);
- drawTriangleSub(ctx, img, p02, p12, p2, t02, t12, t2, depth + 1);
- break;
- default:
- // In the 0 case and all other cases, we simply draw the triangle.
- drawTexturedTriangle(ctx, img, p0, p1, p2, t0, t1, t2);
- break;
- }
- }
-
- // Created to avoid creating garbage when doing bulk transforms.
- var tmpVec4 = vec4.create();
- function transform(transformed, point, matrix, viewport) {
- vec4.set(tmpVec4, point[0], point[1], 0, 1);
- vec4.transformMat4(tmpVec4, tmpVec4, matrix);
-
- var w = tmpVec4[3];
- if (w < 1e-6) w = 1e-6;
-
- transformed[0] = ((tmpVec4[0] / w) + 1) * viewport.width / 2;
- transformed[1] = ((tmpVec4[1] / w) + 1) * viewport.height / 2;
- transformed[2] = w;
- }
-
- function drawProjectedQuadBackgroundToContext(
- quad, p1, p2, p3, p4, ctx, quadCanvas) {
- if (quad.imageData) {
- quadCanvas.width = quad.imageData.width;
- quadCanvas.height = quad.imageData.height;
- quadCanvas.getContext('2d').putImageData(quad.imageData, 0, 0);
- var quadBBox = new tr.b.BBox2();
- quadBBox.addQuad(quad);
- var iw = quadCanvas.width;
- var ih = quadCanvas.height;
- drawTriangleSub(
- ctx, quadCanvas,
- p1, p2, p4,
- [0, 0], [iw, 0], [0, ih]);
- drawTriangleSub(
- ctx, quadCanvas,
- p2, p3, p4,
- [iw, 0], [iw, ih], [0, ih]);
- }
-
- if (quad.backgroundColor) {
- ctx.fillStyle = quad.backgroundColor;
- ctx.beginPath();
- ctx.moveTo(p1[0], p1[1]);
- ctx.lineTo(p2[0], p2[1]);
- ctx.lineTo(p3[0], p3[1]);
- ctx.lineTo(p4[0], p4[1]);
- ctx.closePath();
- ctx.fill();
- }
- }
-
- function drawProjectedQuadOutlineToContext(
- quad, p1, p2, p3, p4, ctx, quadCanvas) {
- ctx.beginPath();
- ctx.moveTo(p1[0], p1[1]);
- ctx.lineTo(p2[0], p2[1]);
- ctx.lineTo(p3[0], p3[1]);
- ctx.lineTo(p4[0], p4[1]);
- ctx.closePath();
- ctx.save();
- if (quad.borderColor)
- ctx.strokeStyle = quad.borderColor;
- else
- ctx.strokeStyle = 'rgb(128,128,128)';
-
- if (quad.shadowOffset) {
- ctx.shadowColor = 'rgb(0, 0, 0)';
- ctx.shadowOffsetX = quad.shadowOffset[0];
- ctx.shadowOffsetY = quad.shadowOffset[1];
- if (quad.shadowBlur)
- ctx.shadowBlur = quad.shadowBlur;
- }
-
- if (quad.borderWidth)
- ctx.lineWidth = quad.borderWidth;
- else
- ctx.lineWidth = 1;
-
- ctx.stroke();
- ctx.restore();
- }
-
- function drawProjectedQuadSelectionOutlineToContext(
- quad, p1, p2, p3, p4, ctx, quadCanvas) {
- if (!quad.upperBorderColor)
- return;
-
- ctx.lineWidth = 8;
- ctx.strokeStyle = quad.upperBorderColor;
-
- ctx.beginPath();
- ctx.moveTo(p1[0], p1[1]);
- ctx.lineTo(p2[0], p2[1]);
- ctx.lineTo(p3[0], p3[1]);
- ctx.lineTo(p4[0], p4[1]);
- ctx.closePath();
- ctx.stroke();
- }
-
- function drawProjectedQuadToContext(
- passNumber, quad, p1, p2, p3, p4, ctx, quadCanvas) {
- if (passNumber === 0) {
- drawProjectedQuadBackgroundToContext(
- quad, p1, p2, p3, p4, ctx, quadCanvas);
- } else if (passNumber === 1) {
- drawProjectedQuadOutlineToContext(
- quad, p1, p2, p3, p4, ctx, quadCanvas);
- } else if (passNumber === 2) {
- drawProjectedQuadSelectionOutlineToContext(
- quad, p1, p2, p3, p4, ctx, quadCanvas);
- } else {
- throw new Error('Invalid pass number');
- }
- }
-
- var tmpP1 = vec3.create();
- var tmpP2 = vec3.create();
- var tmpP3 = vec3.create();
- var tmpP4 = vec3.create();
- function transformAndProcessQuads(
- matrix, viewport, quads, numPasses, handleQuadFunc, opt_arg1, opt_arg2) {
-
- for (var passNumber = 0; passNumber < numPasses; passNumber++) {
- for (var i = 0; i < quads.length; i++) {
- var quad = quads[i];
- transform(tmpP1, quad.p1, matrix, viewport);
- transform(tmpP2, quad.p2, matrix, viewport);
- transform(tmpP3, quad.p3, matrix, viewport);
- transform(tmpP4, quad.p4, matrix, viewport);
- handleQuadFunc(passNumber, quad,
- tmpP1, tmpP2, tmpP3, tmpP4,
- opt_arg1, opt_arg2);
- }
- }
- }
-
- /**
- * @constructor
- */
- var QuadStackView = tr.ui.b.define('quad-stack-view');
-
- QuadStackView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.className = 'quad-stack-view';
-
- var node = tr.ui.b.instantiateTemplate('#quad-stack-view-template',
- THIS_DOC);
- Polymer.dom(this).appendChild(node);
- this.updateHeaderVisibility_();
- this.canvas_ = Polymer.dom(this).querySelector('#canvas');
- this.chromeImages_ = {
- left: Polymer.dom(this).querySelector('#chrome-left'),
- mid: Polymer.dom(this).querySelector('#chrome-mid'),
- right: Polymer.dom(this).querySelector('#chrome-right')
- };
-
- var stackingDistanceSlider = Polymer.dom(this).querySelector(
- '#stacking-distance-slider');
- stackingDistanceSlider.value = tr.b.Settings.get(
- 'quadStackView.stackingDistance', 45);
- stackingDistanceSlider.addEventListener(
- 'change', this.onStackingDistanceChange_.bind(this));
- stackingDistanceSlider.addEventListener(
- 'input', this.onStackingDistanceChange_.bind(this));
-
- this.trackMouse_();
-
- this.camera_ = new tr.ui.b.Camera(this.mouseModeSelector_);
- this.camera_.addEventListener('renderrequired',
- this.onRenderRequired_.bind(this));
- this.cameraWasReset_ = false;
- this.camera_.canvas = this.canvas_;
-
- this.viewportRect_ = tr.b.Rect.fromXYWH(0, 0, 0, 0);
-
- this.pixelRatio_ = window.devicePixelRatio || 1;
- },
-
- updateHeaderVisibility_: function() {
- if (this.headerText)
- Polymer.dom(this).querySelector('#header').style.display = '';
- else
- Polymer.dom(this).querySelector('#header').style.display = 'none';
- },
-
- get headerText() {
- return Polymer.dom(this).querySelector('#header').textContent;
- },
-
- set headerText(headerText) {
- Polymer.dom(this).querySelector('#header').textContent = headerText;
- this.updateHeaderVisibility_();
- },
-
- onStackingDistanceChange_: function(e) {
- tr.b.Settings.set('quadStackView.stackingDistance',
- this.stackingDistance);
- this.scheduleRender();
- e.stopPropagation();
- },
-
- get stackingDistance() {
- return Polymer.dom(this).querySelector('#stacking-distance-slider').value;
- },
-
- get mouseModeSelector() {
- return this.mouseModeSelector_;
- },
-
- get camera() {
- return this.camera_;
- },
-
- set quads(q) {
- this.quads_ = q;
- this.scheduleRender();
- },
-
- set deviceRect(rect) {
- if (!rect || rect.equalTo(this.deviceRect_))
- return;
-
- this.deviceRect_ = rect;
- this.camera_.deviceRect = rect;
- this.chromeQuad_ = undefined;
- },
-
- resize: function() {
- if (!this.offsetParent)
- return true;
-
- var width = parseInt(window.getComputedStyle(this.offsetParent).width);
- var height = parseInt(window.getComputedStyle(this.offsetParent).height);
- var rect = tr.b.Rect.fromXYWH(0, 0, width, height);
-
- if (rect.equalTo(this.viewportRect_))
- return false;
-
- this.viewportRect_ = rect;
- this.style.width = width + 'px';
- this.style.height = height + 'px';
- this.canvas_.style.width = width + 'px';
- this.canvas_.style.height = height + 'px';
- this.canvas_.width = this.pixelRatio_ * width;
- this.canvas_.height = this.pixelRatio_ * height;
- if (!this.cameraWasReset_) {
- this.camera_.resetCamera();
- this.cameraWasReset_ = true;
- }
- return true;
- },
-
- readyToDraw: function() {
- // If src isn't set yet, set it to ensure we can use
- // the image to draw onto a canvas.
- if (!this.chromeImages_.left.src) {
- var leftContent =
- window.getComputedStyle(this.chromeImages_.left).backgroundImage;
- leftContent = tr.ui.b.extractUrlString(leftContent);
-
- var midContent =
- window.getComputedStyle(this.chromeImages_.mid).backgroundImage;
- midContent = tr.ui.b.extractUrlString(midContent);
-
- var rightContent =
- window.getComputedStyle(this.chromeImages_.right).backgroundImage;
- rightContent = tr.ui.b.extractUrlString(rightContent);
-
- this.chromeImages_.left.src = leftContent;
- this.chromeImages_.mid.src = midContent;
- this.chromeImages_.right.src = rightContent;
- }
-
- // If all of the images are loaded (height > 0), then
- // we are ready to draw.
- return (this.chromeImages_.left.height > 0) &&
- (this.chromeImages_.mid.height > 0) &&
- (this.chromeImages_.right.height > 0);
- },
-
- get chromeQuad() {
- if (this.chromeQuad_)
- return this.chromeQuad_;
-
- // Draw the chrome border into a separate canvas.
- var chromeCanvas = document.createElement('canvas');
- var offsetY = this.chromeImages_.left.height;
-
- chromeCanvas.width = this.deviceRect_.width;
- chromeCanvas.height = this.deviceRect_.height + offsetY;
-
- var leftWidth = this.chromeImages_.left.width;
- var midWidth = this.chromeImages_.mid.width;
- var rightWidth = this.chromeImages_.right.width;
-
- var chromeCtx = chromeCanvas.getContext('2d');
- chromeCtx.drawImage(this.chromeImages_.left, 0, 0);
-
- chromeCtx.save();
- chromeCtx.translate(leftWidth, 0);
-
- // Calculate the scale of the mid image.
- var s = (this.deviceRect_.width - leftWidth - rightWidth) / midWidth;
- chromeCtx.scale(s, 1);
-
- chromeCtx.drawImage(this.chromeImages_.mid, 0, 0);
- chromeCtx.restore();
-
- chromeCtx.drawImage(
- this.chromeImages_.right, leftWidth + s * midWidth, 0);
-
- // Construct the quad.
- var chromeRect = tr.b.Rect.fromXYWH(
- this.deviceRect_.x,
- this.deviceRect_.y - offsetY,
- this.deviceRect_.width,
- this.deviceRect_.height + offsetY);
- var chromeQuad = tr.b.Quad.fromRect(chromeRect);
- chromeQuad.stackingGroupId = this.maxStackingGroupId_ + 1;
- chromeQuad.imageData = chromeCtx.getImageData(
- 0, 0, chromeCanvas.width, chromeCanvas.height);
- chromeQuad.shadowOffset = [0, 0];
- chromeQuad.shadowBlur = 5;
- chromeQuad.borderWidth = 3;
- this.chromeQuad_ = chromeQuad;
- return this.chromeQuad_;
- },
-
- scheduleRender: function() {
- if (this.redrawScheduled_)
- return false;
- this.redrawScheduled_ = true;
- tr.b.requestAnimationFrame(this.render, this);
- },
-
- onRenderRequired_: function(e) {
- this.scheduleRender();
- },
-
- stackTransformAndProcessQuads_: function(
- numPasses, handleQuadFunc, includeChromeQuad, opt_arg1, opt_arg2) {
- var mv = this.camera_.modelViewMatrix;
- var p = this.camera_.projectionMatrix;
-
- var viewport = tr.b.Rect.fromXYWH(
- 0, 0, this.canvas_.width, this.canvas_.height);
-
- // Calculate the quad stacks.
- var quadStacks = [];
- for (var i = 0; i < this.quads_.length; ++i) {
- var quad = this.quads_[i];
- var stackingId = quad.stackingGroupId || 0;
- while (stackingId >= quadStacks.length)
- quadStacks.push([]);
-
- quadStacks[stackingId].push(quad);
- }
-
- var mvp = mat4.create();
- this.maxStackingGroupId_ = quadStacks.length;
- var effectiveStackingDistance =
- this.stackingDistance * this.camera_.stackingDistanceDampening;
-
- // Draw the quad stacks, raising each subsequent level.
- mat4.multiply(mvp, p, mv);
- for (var i = 0; i < quadStacks.length; ++i) {
- transformAndProcessQuads(mvp, viewport, quadStacks[i],
- numPasses, handleQuadFunc,
- opt_arg1, opt_arg2);
-
- mat4.translate(mv, mv, [0, 0, effectiveStackingDistance]);
- mat4.multiply(mvp, p, mv);
- }
-
- if (includeChromeQuad && this.deviceRect_) {
- transformAndProcessQuads(mvp, viewport, [this.chromeQuad],
- numPasses, drawProjectedQuadToContext,
- opt_arg1, opt_arg2);
- }
- },
-
- render: function() {
- this.redrawScheduled_ = false;
-
- if (!this.readyToDraw()) {
- setTimeout(this.scheduleRender.bind(this),
- constants.IMAGE_LOAD_RETRY_TIME_MS);
- return;
- }
-
- if (!this.quads_)
- return;
-
- var canvasCtx = this.canvas_.getContext('2d');
- if (!this.resize())
- canvasCtx.clearRect(0, 0, this.canvas_.width, this.canvas_.height);
-
- var quadCanvas = document.createElement('canvas');
- this.stackTransformAndProcessQuads_(
- 3, drawProjectedQuadToContext, true,
- canvasCtx, quadCanvas);
- quadCanvas.width = 0; // Hack: Frees the quadCanvas' resources.
- },
-
- trackMouse_: function() {
- this.mouseModeSelector_ = document.createElement(
- 'tr-ui-b-mouse-mode-selector');
- this.mouseModeSelector_.targetElement = this.canvas_;
- this.mouseModeSelector_.supportedModeMask =
- tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION |
- tr.ui.b.MOUSE_SELECTOR_MODE.PANSCAN |
- tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM |
- tr.ui.b.MOUSE_SELECTOR_MODE.ROTATE;
- this.mouseModeSelector_.mode = tr.ui.b.MOUSE_SELECTOR_MODE.PANSCAN;
- this.mouseModeSelector_.pos = {x: 0, y: 100};
- Polymer.dom(this).appendChild(this.mouseModeSelector_);
- this.mouseModeSelector_.settingsKey =
- 'quadStackView.mouseModeSelector';
-
- this.mouseModeSelector_.setModifierForAlternateMode(
- tr.ui.b.MOUSE_SELECTOR_MODE.ROTATE, tr.ui.b.MODIFIER.SHIFT);
- this.mouseModeSelector_.setModifierForAlternateMode(
- tr.ui.b.MOUSE_SELECTOR_MODE.PANSCAN, tr.ui.b.MODIFIER.SPACE);
- this.mouseModeSelector_.setModifierForAlternateMode(
- tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM, tr.ui.b.MODIFIER.CMD_OR_CTRL);
-
- this.mouseModeSelector_.addEventListener('updateselection',
- this.onSelectionUpdate_.bind(this));
- this.mouseModeSelector_.addEventListener('endselection',
- this.onSelectionUpdate_.bind(this));
- },
-
- extractRelativeMousePosition_: function(e) {
- var br = this.canvas_.getBoundingClientRect();
- return [
- this.pixelRatio_ * (e.clientX - this.canvas_.offsetLeft - br.left),
- this.pixelRatio_ * (e.clientY - this.canvas_.offsetTop - br.top)
- ];
- },
-
- onSelectionUpdate_: function(e) {
- var mousePos = this.extractRelativeMousePosition_(e);
- var res = [];
- function handleQuad(passNumber, quad, p1, p2, p3, p4) {
- if (tr.b.pointInImplicitQuad(mousePos, p1, p2, p3, p4))
- res.push(quad);
- }
- this.stackTransformAndProcessQuads_(1, handleQuad, false);
- var e = new tr.b.Event('selectionchange');
- e.quads = res;
- this.dispatchEvent(e);
- }
- };
-
- return {
- QuadStackView: QuadStackView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker.html b/chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker.html
deleted file mode 100644
index ceb82527cad..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id='tr-ui-b-radio-picker'>
- <template>
- <style>
- :host([vertical]) #container {
- flex-direction: column;
- }
- :host(:not[vertical]) #container {
- flex-direction: row;
- }
- #container {
- display: flex;
- }
- #container > div {
- padding-left: 1em;
- padding-bottom: 0.5em;
- }
- </style>
- <div id="container"></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-radio-picker',
-
- created: function() {
- this.needsInit_ = true;
- this.settingsKey_ = undefined;
- this.isReady_ = false;
- this.radioButtons_ = undefined;
- // Keeping track of which key is selected. This member should only be set
- // set inside select() method to make sure that logical state & the UI
- // state is consistent.
- this.selectedKey_ = undefined;
- },
-
- ready: function() {
- this.isReady_ = true;
- this.maybeInit_();
- this.maybeRenderRadioButtons_();
- },
-
- get vertical() {
- return this.getAttribute('vertical');
- },
-
- set vertical(vertical) {
- if (vertical)
- this.setAttribute('vertical', true);
- else
- this.removeAttribute('vertical');
- },
-
- get settingsKey() {
- return this.settingsKey_;
- },
-
- set settingsKey(settingsKey) {
- if (!this.needsInit_)
- throw new Error('Already initialized.');
- this.settingsKey_ = settingsKey;
- this.maybeInit_();
- },
-
- maybeInit_: function() {
- if (!this.needsInit_)
- return;
- if (this.settingsKey_ === undefined)
- return;
- this.needsInit_ = false;
- this.select(tr.b.Settings.get(this.settingsKey_));
- },
-
- set items(items) {
- this.radioButtons_ = {};
- items.forEach(function(e) {
- if (e.key in this.radioButtons_)
- throw new Error(e.key + ' already exists');
- var radioButton = document.createElement('div');
- var input = document.createElement('input');
- var label = document.createElement('div');
- input.type = 'radio';
- input.addEventListener('click', function() {
- this.select(e.key);
- }.bind(this));
- Polymer.dom(label).innerHTML = e.label;
- label.style.display = 'inline';
- Polymer.dom(radioButton).appendChild(input);
- Polymer.dom(radioButton).appendChild(label);
- this.radioButtons_[e.key] = input;
- }.bind(this));
-
- this.maybeInit_();
- this.maybeRenderRadioButtons_();
- },
-
- maybeRenderRadioButtons_: function() {
- if (!this.isReady_)
- return;
- if (this.radioButtons_ === undefined)
- return;
- for (var key in this.radioButtons_)
- Polymer.dom(this.$.container).appendChild(
- this.radioButtons_[key].parentElement);
- if (this.selectedKey_ !== undefined)
- this.select(this.selectedKey_);
- },
-
- select: function(key) {
- if (key === undefined || key === this.selectedKey_)
- return;
- if (this.radioButtons_ === undefined) {
- this.selectedKey_ = key;
- return;
- }
- if (!(key in this.radioButtons_))
- throw new Error(key + ' does not exists');
- // Unselect the previous radio, update the key & select the new one.
- if (this.selectedKey_ !== undefined)
- this.radioButtons_[this.selectedKey_].checked = false;
- this.selectedKey_ = key;
- tr.b.Settings.set(this.settingsKey_, this.selectedKey_);
- if (this.selectedKey_ !== undefined)
- this.radioButtons_[this.selectedKey_].checked = true;
-
- this.dispatchEvent(new tr.b.Event('change', false));
- },
-
- get selectedKey() {
- return this.selectedKey_;
- },
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker_test.html
deleted file mode 100644
index 8d29c269796..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/radio_picker_test.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/radio_picker.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var rp = document.createElement('tr-ui-b-radio-picker');
- rp.items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Boeing', label: 'I want to fly'},
- {key: 'Submarine', label: 'I want to swim'}
- ];
- this.addHTMLOutput(rp);
- assert.equal(rp.selectedKey, undefined);
- rp.select('Toyota');
- assert.equal(rp.selectedKey, 'Toyota');
- });
-
- test('persistentState_setSelectedKeyAfterSettingItems', function() {
- var items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Boeing', label: 'I want to fly'},
- {key: 'Submarine', label: 'I want to swim'}
- ];
- var container1 = tr.ui.b.createDiv({textContent: 'Radio Picker One'});
- container1.style.border = 'solid';
- var rp = document.createElement('tr-ui-b-radio-picker');
- rp.items = items;
- rp.settingsKey = 'radio-picker-test-one';
- Polymer.dom(container1).appendChild(rp);
- this.addHTMLOutput(container1);
- assert.equal(rp.selectedKey, undefined);
- rp.select('Toyota');
- assert.equal(rp.selectedKey, 'Toyota');
-
- var container2 = tr.ui.b.createDiv({
- textContent: 'Radio Picker Two (same settingKey as Radio Picker One)'});
- container2.style.border = 'solid';
- var rp2 = document.createElement('tr-ui-b-radio-picker');
- rp2.items = items;
- rp2.settingsKey = 'radio-picker-test-one';
- Polymer.dom(container2).appendChild(rp2);
- this.addHTMLOutput(container2);
-
- assert.equal(rp2.selectedKey, 'Toyota');
- });
-
- test('persistentState_setSelectedKeyBeforeSettingItems', function() {
- var items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Boeing', label: 'I want to fly'},
- {key: 'Submarine', label: 'I want to swim'}
- ];
- var container1 = tr.ui.b.createDiv({textContent: 'Radio Picker One'});
- container1.style.border = 'solid';
- var rp = document.createElement('tr-ui-b-radio-picker');
- rp.settingsKey = 'radio-picker-test-two';
- rp.items = items;
- Polymer.dom(container1).appendChild(rp);
- this.addHTMLOutput(container1);
- assert.equal(rp.selectedKey, undefined);
- rp.select('Boeing');
- assert.equal(rp.selectedKey, 'Boeing');
-
- var container2 = tr.ui.b.createDiv({
- textContent: 'Radio Picker Two (same settingKey as Radio Picker One)'});
- container2.style.border = 'solid';
- var rp2 = document.createElement('tr-ui-b-radio-picker');
- rp2.settingsKey = 'radio-picker-test-two';
- Polymer.dom(container2).appendChild(rp2);
- this.addHTMLOutput(container2);
- rp2.items = items;
-
- assert.equal(rp2.selectedKey, 'Boeing');
- });
-
- test('changeEventFired', function() {
- var items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Boeing', label: 'I want to fly'},
- {key: 'Submarine', label: 'I want to swim'}
- ];
- var rp = document.createElement('tr-ui-b-radio-picker');
- rp.items = items;
- this.addHTMLOutput(rp);
- rp.select('Boeing');
- assert.equal(rp.selectedKey, 'Boeing');
- var fired = false;
- rp.addEventListener('change', function(e) {
- fired = true;
- assert.equal('Toyota', e.target.selectedKey);
- });
- rp.select('Toyota');
- assert.isTrue(fired);
- });
-
- test('verticalAttribute', function() {
- var items = [
- {key: 'Toyota', label: 'I want to drive Toyota'},
- {key: 'Boeing', label: 'I want to fly'},
- {key: 'Submarine', label: 'I want to swim'}
- ];
- var rp = document.createElement('tr-ui-b-radio-picker');
- rp.items = items;
- this.addHTMLOutput(rp);
- assert.isNull(rp.getAttribute('vertical'));
- rp.vertical = true;
- assert.equal(rp.getAttribute('vertical'), 'true');
- rp.vertical = false;
- assert.isNull(rp.getAttribute('vertical'));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor.html b/chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor.html
deleted file mode 100644
index 6eb63b79bc1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<script src="/css-element-queries/src/ResizeSensor.js"></script>
-
-<!--
-@fileoverview A container that senses when its size changes.
--->
-<dom-module id='tr-ui-b-resize-sensor'>
- <template>
- <style>
- :host {
- display: flex;
- flex: 1 1 auto;
- }
- </style>
- <div id="container">
- <content></content>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-(function() {
- Polymer({
- is: 'tr-ui-b-resize-sensor',
-
- attached: function() {
- // ResizeSensor only works if it's rooted in a document when it's
- // created, so wait until the tr-ui-b-resize-sensor is attached to the
- // DOM before creating the ResizeSensor.
- this.sensor_ = new ResizeSensor(this.$.container,
- this.onResize_.bind(this));
- // ResizeSensor appends a div to this.$.container. That div must be a
- // direct sibling of <content>.
- // ResizeSensor's first argument must be a Node, so it cannot be
- // this.root.
- },
-
- onResize_: function() {
- this.dispatchEvent(new tr.b.Event('resize', false, false));
- }
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor_test.html
deleted file mode 100644
index aa4132bf54e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/resize_sensor_test.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/ui/base/resize_sensor.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function forceLayout(element) {
- element.offsetHeight;
- }
-
- test('instantiate', function() {
- var sensor = document.createElement('tr-ui-b-resize-sensor');
- Polymer.dom(sensor).appendChild(document.createTextNode('hello'));
-
- var resizeCount = 0;
- function onResize(event) {
- resizeCount += 1;
- }
-
- this.addHTMLOutput(sensor);
- forceLayout(sensor);
- sensor.addEventListener('resize', onResize);
-
- // Trigger a resize:
- sensor.style.fontSize = '20pt';
- forceLayout(sensor);
-
- // The event doesn't fire synchronously, so return a Promise that will
- // resolve whenever the test is done.
- return new Promise(function(resolve, reject) {
- // The resize event fires when the sensor is re-laid-out.
- // Use requestAnimationFrame to wait until after the sensor is
- // re-laid-out.
- // This doesn't work if the page becomes invisible.
- window.requestAnimationFrame(function() {
- assert.equal(1, resizeCount);
- sensor.removeEventListener('resize', onResize);
- sensor.style.fontSize = '12pt';
- forceLayout(sensor);
- window.requestAnimationFrame(function() {
- assert.equal(1, resizeCount);
- resolve();
- });
- });
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart.html b/chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart.html
deleted file mode 100644
index 4996f69684b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/ui/base/chart_base_2d.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var ChartBase2D = tr.ui.b.ChartBase2D;
-
- // @constructor
- var ScatterChart = tr.ui.b.define('scatter-chart', ChartBase2D);
-
- // @constructor
- ScatterChart.Dot = function(x, y, radius, color, breadcrumb) {
- this.x = x;
- this.y = y;
- this.radius = radius;
- this.color = color;
- this.breadcrumb = breadcrumb;
- };
-
- ScatterChart.prototype = {
- __proto__: ChartBase2D.prototype,
-
- decorate: function() {
- ChartBase2D.prototype.decorate.call(this);
- Polymer.dom(this).classList.add('scatter-chart');
-
- this.brushedXRange_ = new tr.b.Range();
- this.brushedYRange_ = new tr.b.Range();
- },
-
- setBrushedRanges: function(xRange, yRange) {
- this.brushedXRange_.reset();
- this.brushedYRange_.reset();
- if (!xRange.isEmpty && !yRange.isEmpty) {
- this.brushedXRange_.addRange(xRange);
- this.brushedYRange_.addRange(yRange);
- }
- this.updateContents_();
- },
-
- updateBrushContents_: function(brushSel) {
- brushSel.selectAll('*').remove();
- var brushes = [];
- if (!this.brushedXRange_.isEmpty && !this.brushedYRange_.isEmpty)
- brushes.push({});
- var brushRectsSel = brushSel.selectAll('rect').data(brushes);
- brushRectsSel.enter().append('rect');
- brushRectsSel.exit().remove();
- brushRectsSel
- .attr('x', function(d) {
- return this.xScale_(this.brushedXRange_.min);
- }.bind(this))
- .attr('y', function(d) {
- return this.yScale_(this.brushedYRange_.max);
- }.bind(this))
- .attr('width', function(d) {
- return this.xScale_(this.brushedXRange_.max) -
- this.xScale_(this.brushedXRange_.min);
- }.bind(this))
- .attr('height', function(d) {
- return this.yScale_(this.brushedYRange_.min) -
- this.yScale_(this.brushedYRange_.max);
- }.bind(this));
- },
-
- setDataFromCallbacks: function(data, getX, getY, getRadius, getColor) {
- this.data = data.map(function(datum) {
- return new ScatterChart.Dot(getX(datum),
- getY(datum),
- getRadius(datum),
- getColor(datum),
- datum);
- });
- },
-
- isDatumFieldSeries_: function(fieldName) {
- return fieldName === 'y';
- },
-
- getXForDatum_: function(datum, index) {
- return datum.x;
- },
-
- updateDataContents_: function(dataSel) {
- dataSel.selectAll('*').remove();
- var dotsSel = dataSel.selectAll('circle')
- .data(this.data_)
- .enter()
- .append('circle');
- dotsSel.attr('cx', function(datum) {
- return this.xScale_(datum.x);
- }.bind(this))
- .attr('cy', function(datum) {
- return this.yScale_(datum.y);
- }.bind(this))
- .attr('r', function(datum) {
- return tr.b.clamp(datum.radius, 2, 10);
- }.bind(this))
- .attr('fill', function(datum) {
- return datum.color;
- }.bind(this));
- }
- };
-
- return {
- ScatterChart: ScatterChart
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart_test.html
deleted file mode 100644
index 6b9243fa02f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/scatter_chart_test.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/scatter_chart.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiation_singleSeries', function() {
- var chart = new tr.ui.b.ScatterChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, y: 100, radius: 2, color: 'red'},
- {x: 20, y: 110, radius: 10, color: 'red'},
- {x: 30, y: 100, radius: 10, color: 'red'},
- {x: 40, y: 50, radius: 10, color: 'red'}
- ];
- chart.data = data;
- this.addHTMLOutput(chart);
- });
-
- test('instantiation_interactiveBrushing', function() {
- var chart = new tr.ui.b.ScatterChart();
- chart.width = 400;
- chart.height = 200;
- chart.chartTitle = 'Chart title';
- var data = [
- {x: 10, y: 50, radius: 2, color: 'blue'},
- {x: 20, y: 60, radius: 3, color: 'red'},
- {x: 30, y: 80, radius: 4, color: 'orange'},
- {x: 40, y: 20, radius: 5, color: 'purple'},
- {x: 50, y: 30, radius: 6, color: 'yellow'},
- {x: 60, y: 20, radius: 7, color: 'green'},
- {x: 70, y: 15, radius: 8, color: 'blue'},
- {x: 80, y: 20, radius: 9, color: 'red'}
- ];
- chart.data = data;
-
- var mouseDown = undefined;
-
- function updateBrushedRange(e) {
- var xRange = new tr.b.Range();
- xRange.addValue(mouseDown.x);
- xRange.addValue(e.x);
- var yRange = new tr.b.Range();
- yRange.addValue(mouseDown.y);
- yRange.addValue(e.y);
- chart.setBrushedRanges(xRange, yRange);
- }
-
- chart.addEventListener('item-mousedown', function(e) {
- mouseDown = e;
- });
- chart.addEventListener('item-mousemove', function(e) {
- updateBrushedRange(e);
- });
- chart.addEventListener('item-mouseup', function(e) {
- updateBrushedRange(e);
- mouseDown = undefined;
- });
- this.addHTMLOutput(chart);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/tab_view.html b/chromium/third_party/catapult/tracing/tracing/ui/base/tab_view.html
deleted file mode 100644
index 0818c83f91f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/tab_view.html
+++ /dev/null
@@ -1,269 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<!--
-@fileoverview A view that allows the user to control which single tab is
-displayed.
-
-We follow a fairly standard web convention of backing our tabs with hidden radio
-buttons but visible radio button labels (the tabs themselves) which toggle the
-input element when clicked. Using hidden radio buttons makes sense, as both tabs
-and radio buttons are input elements that allow user selection through clicking
-and limit users to having one option selected at a time.
--->
-<dom-module id='tr-ui-b-tab-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- #selection_description, #tabs {
- font-size: 12px;
- }
-
- #selection_description {
- display: inline-block;
- font-weight: bold;
- margin: 9px 0px 4px 20px;
- }
-
- #tabs {
- flex: 0 0 auto;
- border-top: 1px solid #8e8e8e;
- border-bottom: 1px solid #8e8e8e;
- background-color: #ececec;
- overflow: hidden;
- margin: 0;
- }
-
- #tabs input[type=radio] {
- display: none;
- }
-
- #tabs tab label {
- cursor: pointer;
- display: inline-block;
- border: 1px solid #ececec;
- margin: 5px 0px 0px 15px;
- padding: 3px 10px 3px 10px;
- }
-
- #tabs tab label span {
- font-weight: bold;
- }
-
- #tabs:focus input[type=radio]:checked ~ label {
- outline: dotted 1px #8e8e8e;
- outline-offset: -2px;
- }
-
- #tabs input[type=radio]:checked ~ label {
- background-color: white;
- border: 1px solid #8e8e8e;
- border-bottom: 1px solid white;
- }
-
- #subView {
- flex: 1 1 auto;
- overflow: auto;
- }
- </style>
- <div id='tabs' hidden="[[tabsHidden]]">
- <label id=selection_description>[[label_]]</label>
- <template is=dom-repeat items=[[subViews_]]>
- <tab>
- <input type=radio name=tabs id$=[[computeRadioId_(item)]]
- on-change='onTabChanged_'
- checked$='[[isChecked_(item)]]' />
- <label for$=[[computeRadioId_(item)]]>
- <template is=dom-if if=[[item.tabIcon]]>
- <span style$='[[item.tabIcon.style]]'>[[item.tabIcon.text]]</span>
- </template>
- [[item.tabLabel]]
- </label>
- </tab>
- </template>
- </div>
- <div id='subView'></div>
- <content>
- </content>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-tab-view',
-
- properties: {
- label_: {
- type: String,
- value: () => ''
- },
- selectedSubView_: Object,
- subViews_: {
- type: Array,
- value: () => []
- },
- tabsHidden: {
- type: Boolean,
- value: false,
- observer: 'tabsHiddenChanged_'
- }
- },
-
- ready: function() {
- this.$.tabs.addEventListener('keydown', this.onKeyDown_.bind(this), true);
- this.updateFocusability_();
- },
-
- set label(newLabel) {
- this.set('label_', newLabel);
- },
-
- get tabs() {
- return this.get('subViews_');
- },
-
- get selectedSubView() {
- return this.selectedSubView_;
- },
-
- set selectedSubView(subView) {
- if (subView === this.selectedSubView_)
- return;
-
- if (this.selectedSubView_) {
- Polymer.dom(this.$.subView).removeChild(this.selectedSubView_);
- var oldInput = this.root.getElementById(this.computeRadioId_(
- this.selectedSubView_));
- if (oldInput) {
- oldInput.checked = false;
- }
- }
-
- this.set('selectedSubView_', subView);
-
- if (subView) {
- Polymer.dom(this.$.subView).appendChild(subView);
- var newInput = this.root.getElementById(this.computeRadioId_(subView));
- if (newInput) {
- newInput.checked = true;
- }
- }
-
- this.fire('selected-tab-change');
- },
-
- clearSubViews: function() {
- this.splice('subViews_', 0, this.subViews_.length);
- this.selectedSubView = undefined;
- this.updateFocusability_();
- },
-
- addSubView: function(subView) {
- this.push('subViews_', subView);
- if (!this.selectedSubView_)
- this.selectedSubView = subView;
-
- this.updateFocusability_();
- },
-
- resetSubViews: function(subViews) {
- this.splice('subViews_', 0, this.subViews_.length);
- if (subViews.length) {
- for (var subView of subViews)
- this.push('subViews_', subView);
- this.selectedSubView = subViews[0];
- }
- else {
- this.selectedSubView = undefined;
- }
- this.updateFocusability_();
- },
-
- onTabChanged_: function(event) {
- this.selectedSubView = event.model.item;
- },
-
- isChecked_: function(subView) {
- return this.selectedSubView_ === subView;
- },
-
- tabsHiddenChanged_: function() {
- this.updateFocusability_();
- },
-
- onKeyDown_: function(e) {
- if (this.tabsHidden)
- return;
-
- var keyHandled = false;
- switch (e.keyCode) {
- // Arrow left.
- case 37:
- keyHandled = this.selectPreviousTabIfPossible();
- break;
-
- // Arrow right.
- case 39:
- keyHandled = this.selectNextTabIfPossible();
- break;
- }
-
- if (!keyHandled)
- return;
- e.stopPropagation();
- e.preventDefault();
- },
-
- selectNextTabIfPossible: function() {
- return this.selectTabByOffsetIfPossible_(1);
- },
-
- selectPreviousTabIfPossible: function() {
- return this.selectTabByOffsetIfPossible_(-1);
- },
-
- selectTabByOffsetIfPossible_: function(offset) {
- if (!this.selectedSubView_)
- return false;
- var currentIndex = this.subViews_.indexOf(this.selectedSubView_);
- var newSubView = this.tabs[currentIndex + offset];
- if (!newSubView)
- return false;
- this.selectedSubView = newSubView;
- return true;
- },
-
- shouldBeFocusable_: function() {
- return !this.tabsHidden && this.subViews_.length > 0;
- },
-
- updateFocusability_: function() {
- if (this.shouldBeFocusable_()) {
- Polymer.dom(this.$.tabs).setAttribute('tabindex', 0);
- } else {
- Polymer.dom(this.$.tabs).removeAttribute('tabindex');
- }
- },
-
- computeRadioId_: function(subView) {
- // We can't just use the tagName as the radio's ID because there are
- // instances where a single subview type can handle multiple event types,
- // and thus might be present multiple times in a single tab view. In order
- // to avoid the case where we might have two tabs with the same ID, we
- // uniquify this ID by appending the tab's label with all spaces replaced
- // by dashes (because spaces aren't allowed in HTML IDs).
- return subView.tagName + '-' + subView.tabLabel.replace(/ /g, '-');
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/tab_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/tab_view_test.html
deleted file mode 100644
index a7be3802cb8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/tab_view_test.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/power_series.html">
-<link rel="import" href="/tracing/ui/analysis/alert_sub_view.html">
-<link rel="import" href="/tracing/ui/analysis/multi_power_sample_sub_view.html">
-<link rel="import" href="/tracing/ui/base/tab_view.html">
-
-<dom-module id='tr-ui-b-tab-view-test-non-sub-view'>
- <template>
- <div></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-var nonSubViewBehavior = {};
-
-Polymer({
- is: 'tr-ui-b-tab-view-test-non-sub-view',
- behaviors: [nonSubViewBehavior]
-});
-
-tr.b.unittest.testSuite(function() {
- function createPowerSampleSubView() {
- var model = tr.c.TestUtils.newModel(function(m) {
- m.device.powerSeries = new tr.model.PowerSeries(m.device);
-
- m.device.vSyncTimestamps = [0];
- m.device.powerSeries.addPowerSample(1, 1);
- m.device.powerSeries.addPowerSample(2, 2);
- m.device.powerSeries.addPowerSample(3, 3);
- m.device.powerSeries.addPowerSample(4, 2);
- });
-
- var subView = document.createElement('tr-ui-a-multi-power-sample-sub-view');
- subView.selection = new tr.model.EventSet(model.device.powerSeries.samples);
- subView.tabLabel = 'Power samples';
- return subView;
- }
-
- function createAlertSubView() {
- var slice = tr.c.TestUtils.newSliceEx(
- {title: 'b', start: 0, duration: 0.002});
- var alertInfo = new tr.model.EventInfo(
- 'Alert 1', 'Critical alert',
- [{
- label: 'Example',
- textContent: 'Example page',
- href: 'http://www.example.com'
- }]);
-
- var alert = new tr.model.Alert(alertInfo, 5, [slice]);
- var subView = document.createElement('tr-ui-a-alert-sub-view');
- subView.selection = new tr.model.EventSet(alert);
- subView.tabLabel = 'Alerts';
- subView.tabIcon = { text: '\u26A0', style: 'color: red;' };
-
- return subView;
- }
-
- test('instantiate_noTabs', function() {
- var tabView = document.createElement('tr-ui-b-tab-view');
- tabView.label = 'No items selected.';
- this.addHTMLOutput(tabView);
- });
-
- test('instantiate_oneTab', function() {
- var tabView = document.createElement('tr-ui-b-tab-view');
- tabView.label = '1 item selected.';
- tabView.addSubView(createPowerSampleSubView());
- this.addHTMLOutput(tabView);
- });
-
- test('instantiate_twoTabs', function() {
- var tabView = document.createElement('tr-ui-b-tab-view');
- tabView.label = '3 items selected.';
- tabView.addSubView(createPowerSampleSubView());
- tabView.addSubView(createAlertSubView());
- this.addHTMLOutput(tabView);
- });
-
- test('clearSubViews_selectedSubViewNullAfter', function() {
- var tabView = document.createElement('tr-ui-b-tab-view');
- tabView.label = '3 items selected.';
- tabView.addSubView(createPowerSampleSubView());
- tabView.addSubView(createAlertSubView());
-
- tabView.clearSubViews();
-
- assert.isUndefined(tabView.selectedSubView);
- });
-
- test('changeSelectedSubView', function() {
- var selectedTabChangeEventCount = 0;
- var tabView = document.createElement('tr-ui-b-tab-view');
- tabView.addEventListener('selected-tab-change', function() {
- selectedTabChangeEventCount++;
- });
-
- assert.isUndefined(tabView.selectedSubView);
- assert.strictEqual(selectedTabChangeEventCount, 0);
-
- var view1 = createPowerSampleSubView();
- tabView.addSubView(view1);
- assert.strictEqual(tabView.selectedSubView, view1);
- assert.strictEqual(selectedTabChangeEventCount, 1);
-
- var view2 = createAlertSubView();
- tabView.addSubView(view2);
- assert.strictEqual(tabView.selectedSubView, view1);
- assert.strictEqual(selectedTabChangeEventCount, 1);
-
- tabView.selectedSubView = view2;
- assert.strictEqual(tabView.selectedSubView, view2);
- assert.strictEqual(selectedTabChangeEventCount, 2);
- })
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/table.html b/chromium/third_party/catapult/tracing/tracing/ui/base/table.html
deleted file mode 100644
index 91b00cb9d65..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/table.html
+++ /dev/null
@@ -1,1753 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<!--
-@fileoverview A container that constructs a table-like container.
--->
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
-
- var TableFormat = {};
-
- TableFormat.SelectionMode = {
- // Selection disabled.
- // Default highlight: none.
- NONE: 0,
-
- // Row selection mode.
- // Default highlight: dark row.
- ROW: 1,
-
- // Cell selection mode.
- // Default highlight: dark cell and light row.
- CELL: 2
- };
-
- TableFormat.HighlightStyle = {
- // Highlight depends on the current selection mode.
- DEFAULT: 0,
-
- // No highlight.
- NONE: 1,
-
- // Light highlight.
- LIGHT: 2,
-
- // Dark highlight.
- DARK: 3
- };
-
- TableFormat.ColumnAlignment = {
- LEFT: 0 /* default */,
- RIGHT: 1
- };
-
- return {
- TableFormat: TableFormat
- };
-});
-</script>
-
-<dom-module id="tr-ui-b-table">
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
-
- table {
- flex: 1 1 auto;
- align-self: stretch;
- border-collapse: separate;
- border-spacing: 0;
- border-width: 0;
- -webkit-user-select: initial;
- }
-
- tr > td {
- padding: 2px 4px 2px 4px;
- vertical-align: top;
- }
-
- table > tbody:focus {
- outline: none;
- }
- table > tbody:focus[selection-mode="row"] > tr[selected],
- table > tbody:focus[selection-mode="cell"] > tr > td[selected],
- table > tbody:focus > tr.empty-row > td {
- outline: 1px dotted #666666;
- outline-offset: -1px;
- }
-
- button.toggle-button {
- height: 15px;
- line-height: 60%;
- vertical-align: middle;
- width: 100%;
- }
-
- button > * {
- height: 15px;
- vertical-align: middle;
- }
-
- td.button-column {
- width: 30px;
- }
-
- table > thead > tr > td.sensitive:hover {
- background-color: #fcfcfc;
- }
-
- table > thead > tr > td {
- font-weight: bold;
- text-align: left;
-
- background-color: #eee;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-
- border-top: 1px solid #ffffff;
- border-bottom: 1px solid #aaa;
- }
-
- table > tfoot {
- background-color: #eee;
- font-weight: bold;
- }
-
- /* Light row and cell highlight. */
- table > tbody[row-highlight-style="light"] > tr[selected],
- table > tbody[cell-highlight-style="light"] > tr > td[selected] {
- background-color: rgb(213, 236, 229); /* light turquoise */
- }
- table > tbody[row-highlight-style="light"] >
- tr:not(.empty-row):not([selected]):hover,
- table > tbody[cell-highlight-style="light"] >
- tr:not(.empty-row):not([selected]) > td:hover {
- background-color: #f6f6f6; /* light grey */
- }
-
- /* Dark row and cell highlight. */
- table > tbody[row-highlight-style="dark"] > tr[selected],
- table > tbody[cell-highlight-style="dark"] > tr > td[selected] {
- background-color: rgb(103, 199, 165); /* turquoise */
- }
- table > tbody[row-highlight-style="dark"] >
- tr:not(.empty-row):not([selected]):hover,
- table > tbody[cell-highlight-style="dark"] >
- tr:not(.empty-row):not([selected]) > td:hover {
- background-color: #e6e6e6; /* grey */
- }
- table > tbody[row-highlight-style="dark"] > tr:hover[selected],
- table > tbody[cell-highlight-style="dark"] > tr[selected] > td:hover {
- background-color: rgb(171, 217, 202); /* semi-light turquoise */
- }
-
- table > colgroup > col[selected] {
- background-color: #e6e6e6; /* grey */
- }
-
- table > tbody > tr.empty-row > td {
- color: #666;
- font-style: italic;
- text-align: center;
- }
-
- table > tbody.has-footer > tr:last-child > td {
- border-bottom: 1px solid #aaa;
- }
-
- table > tfoot > tr:first-child > td {
- border-top: 1px solid #ffffff;
- }
-
- :host([zebra]) table tbody tr:nth-child(even) {
- background-color: #f4f4f4;
- }
-
- expand-button {
- -webkit-user-select: none;
- cursor: pointer;
- margin-right: 3px;
- font-size: smaller;
- }
-
- expand-button.button-expanded {
- transform: rotate(90deg);
- }
- </style>
- <table>
- <colgroup id="cols">
- </colgroup>
- <thead id="head">
- </thead>
- <tbody id="body">
- </tbody>
- <tfoot id="foot">
- </tfoot>
- </table>
- </template>
-</dom-module>
-<script>
-'use strict';
-(function() {
- var RIGHT_ARROW = String.fromCharCode(0x25b6);
- var UNSORTED_ARROW = String.fromCharCode(0x25BF);
- var ASCENDING_ARROW = String.fromCharCode(0x25B4);
- var DESCENDING_ARROW = String.fromCharCode(0x25BE);
-
- var SelectionMode = tr.ui.b.TableFormat.SelectionMode;
- var HighlightStyle = tr.ui.b.TableFormat.HighlightStyle;
- var ColumnAlignment = tr.ui.b.TableFormat.ColumnAlignment;
-
- Polymer({
- is: 'tr-ui-b-table',
-
- created: function() {
- this.selectionMode_ = SelectionMode.NONE;
- this.rowHighlightStyle_ = HighlightStyle.DEFAULT;
- this.cellHighlightStyle_ = HighlightStyle.DEFAULT;
- this.selectedTableRowInfo_ = undefined;
- this.selectedColumnIndex_ = undefined;
-
- this.tableColumns_ = [];
- this.tableRows_ = [];
- this.tableRowsInfo_ = new WeakMap();
- this.tableFooterRows_ = [];
- this.tableFooterRowsInfo_ = new WeakMap();
- this.sortColumnIndex_ = undefined;
- this.sortDescending_ = false;
- this.columnsWithExpandButtons_ = [];
- this.headerCells_ = [];
- this.showHeader_ = true;
- this.emptyValue_ = undefined;
- this.subRowsPropertyName_ = 'subRows';
- this.customizeTableRowCallback_ = undefined;
- this.defaultExpansionStateCallback_ = undefined;
- this.userCanModifySortOrder_ = true;
- },
-
- ready: function() {
- this.$.body.addEventListener(
- 'keydown', this.onKeyDown_.bind(this), true);
- this.$.body.addEventListener(
- 'focus', this.onFocus_.bind(this), true);
- },
-
- clear: function() {
- this.selectionMode_ = SelectionMode.NONE;
- this.rowHighlightStyle_ = HighlightStyle.DEFAULT;
- this.cellHighlightStyle_ = HighlightStyle.DEFAULT;
- this.selectedTableRowInfo_ = undefined;
- this.selectedColumnIndex_ = undefined;
-
- Polymer.dom(this).textContent = '';
- this.tableColumns_ = [];
- this.tableRows_ = [];
- this.tableRowsInfo_ = new WeakMap();
- this.tableFooterRows_ = [];
- this.tableFooterRowsInfo_ = new WeakMap();
- this.sortColumnIndex_ = undefined;
- this.sortDescending_ = false;
- this.columnsWithExpandButtons_ = [];
- this.headerCells_ = [];
- this.showHeader_ = true;
- this.emptyValue_ = undefined;
- this.subRowsPropertyName_ = 'subRows';
- this.defaultExpansionStateCallback_ = undefined;
- this.userCanModifySortOrder_ = true;
- },
-
- set zebra(zebra) {
- if (zebra) {
- this.setAttribute('zebra', true);
- } else {
- this.removeAttribute('zebra');
- }
- },
-
- get zebra() {
- return this.getAttribute('zebra');
- },
-
- get showHeader() {
- return this.showHeader_;
- },
-
- set showHeader(showHeader) {
- this.showHeader_ = showHeader;
- this.scheduleRebuildHeaders_();
- },
-
- set subRowsPropertyName(name) {
- this.subRowsPropertyName_ = name;
- },
-
- /**
- * This callback will be called whenever a body row is built
- * for a userRow that has subRows and does not have an explicit
- * isExpanded field.
- * The callback should return true if the row should be expanded,
- * or false if the row should be collapsed.
- * @param {function(userRow, parentUserRow): boolean} cb The callback.
- */
- set defaultExpansionStateCallback(cb) {
- this.defaultExpansionStateCallback_ = cb;
- this.scheduleRebuildBody_();
- },
-
- /**
- * This callback will be called whenever a body row is built.
- * The callback's return value is ignored.
- * @param {function(userRow, trElement)} cb The callback.
- */
- set customizeTableRowCallback(cb) {
- this.customizeTableRowCallback_ = cb;
- this.scheduleRebuildBody_();
- },
-
- get emptyValue() {
- return this.emptyValue_;
- },
-
- set emptyValue(emptyValue) {
- var previousEmptyValue = this.emptyValue_;
- this.emptyValue_ = emptyValue;
- if (this.tableRows_.length === 0 && emptyValue !== previousEmptyValue)
- this.scheduleRebuildBody_();
- },
-
- /**
- * Data objects should have the following fields:
- * mandatory: title, value
- * optional: width {string}, cmp {function}, colSpan {number},
- * showExpandButtons {boolean},
- * align {tr.ui.b.TableFormat.ColumnAlignment}
- *
- * @param {Array} columns An array of data objects.
- */
- set tableColumns(columns) {
- // Figure out the columns with expand buttons...
- var columnsWithExpandButtons = [];
- for (var i = 0; i < columns.length; i++) {
- if (columns[i].showExpandButtons)
- columnsWithExpandButtons.push(i);
- }
- if (columnsWithExpandButtons.length === 0) {
- // First column if none have specified.
- columnsWithExpandButtons = [0];
- }
-
- // Sanity check columns.
- for (var i = 0; i < columns.length; i++) {
- var colInfo = columns[i];
- if (colInfo.width === undefined)
- continue;
-
- var hasExpandButton = columnsWithExpandButtons.indexOf(i) !== -1;
-
- var w = colInfo.width;
- if (w) {
- if (/\d+px/.test(w)) {
- continue;
- } else if (/\d+%/.test(w)) {
- if (hasExpandButton) {
- throw new Error('Columns cannot be %-sized and host ' +
- ' an expand button');
- }
- } else {
- throw new Error('Unrecognized width string');
- }
- }
- }
-
- // Try to preserve the user's sort choice.
- // This is a 'best-effort' attempt, for example we compare columns by
- // thier titles which can be HTML nodes in which case we might consider
- // them different even if they look the same to the user.
- var sortIndex = undefined;
- var currentSortColumn = this.tableColumns[this.sortColumnIndex_];
- if (currentSortColumn) {
- for (var [i, column] of columns.entries()) {
- if (currentSortColumn.title === column.title) {
- sortIndex = i;
- break;
- }
- }
- }
-
- // Commit the change.
- this.tableColumns_ = columns;
- this.headerCells_ = [];
- this.columnsWithExpandButtons_ = columnsWithExpandButtons;
- this.scheduleRebuildHeaders_();
- this.sortColumnIndex = sortIndex;
-
- // Blow away the table rows, too.
- this.tableRows = this.tableRows_;
- },
-
- get tableColumns() {
- return this.tableColumns_;
- },
-
- /**
- * @param {Array} rows An array of 'row' objects with the following
- * fields:
- * optional: subRows An array of objects that have the same 'row'
- * structure. Set subRowsPropertyName to use an
- * alternative field name.
- */
- set tableRows(rows) {
- this.selectedTableRowInfo_ = undefined;
- this.selectedColumnIndex_ = undefined;
- this.tableRows_ = rows;
- this.tableRowsInfo_ = new WeakMap();
- this.scheduleRebuildBody_();
- },
-
- get tableRows() {
- return this.tableRows_;
- },
-
- set footerRows(rows) {
- this.tableFooterRows_ = rows;
- this.tableFooterRowsInfo_ = new WeakMap();
- this.scheduleRebuildFooter_();
- },
-
- get footerRows() {
- return this.tableFooterRows_;
- },
-
- get userCanModifySortOrder() {
- return this.userCanModifySortOrder_;
- },
-
- set userCanModifySortOrder(userCanModifySortOrder) {
- var newUserCanModifySortOrder = !!userCanModifySortOrder;
- if (newUserCanModifySortOrder === this.userCanModifySortOrder_)
- return
-
- this.userCanModifySortOrder_ = newUserCanModifySortOrder;
- this.scheduleRebuildHeaders_();
- },
-
- set sortColumnIndex(number) {
- if (number === this.sortColumnIndex_)
- return;
-
- if (number !== undefined) {
- if (this.tableColumns_.length <= number)
- throw new Error('Column number ' + number + ' is out of bounds.');
- if (!this.tableColumns_[number].cmp)
- throw new Error('Column ' + number + ' does not have a comparator.');
- }
-
- this.sortColumnIndex_ = number;
- this.updateHeaderArrows_();
- this.scheduleRebuildBody_();
- this.dispatchSortingChangedEvent_();
- },
-
- get sortColumnIndex() {
- return this.sortColumnIndex_;
- },
-
- set sortDescending(value) {
- var newValue = !!value;
-
- if (newValue !== this.sortDescending_) {
- this.sortDescending_ = newValue;
- this.updateHeaderArrows_();
- this.scheduleRebuildBody_();
- this.dispatchSortingChangedEvent_();
- }
- },
-
- get sortDescending() {
- return this.sortDescending_;
- },
-
- updateHeaderArrows_: function() {
- for (var i = 0; i < this.headerCells_.length; i++) {
- var headerCell = this.headerCells_[i];
- var isColumnCurrentlySorted = i === this.sortColumnIndex_;
- if (!this.tableColumns_[i].cmp ||
- (!this.userCanModifySortOrder_ && !isColumnCurrentlySorted)) {
- headerCell.sideContent = '';
- continue;
- }
- if (!isColumnCurrentlySorted) {
- headerCell.sideContent = UNSORTED_ARROW;
- headerCell.sideContentDisabled = false;
- continue;
- }
- headerCell.sideContent = this.sortDescending_ ?
- DESCENDING_ARROW : ASCENDING_ARROW;
- headerCell.sideContentDisabled = !this.userCanModifySortOrder_;
- }
- },
-
- generateHeaderColumns_: function() {
- var selectedTableColumnIndex = this.selectedTableColumnIndex;
- Polymer.dom(this.$.cols).textContent = '';
- for (var i = 0; i < this.tableColumns_.length; ++i) {
- var colElement = document.createElement('col');
- if (i === selectedTableColumnIndex) {
- colElement.setAttribute('selected', true);
- }
- Polymer.dom(this.$.cols).appendChild(colElement);
- }
-
- this.headerCells_ = [];
- Polymer.dom(this.$.head).textContent = '';
- if (!this.showHeader_)
- return;
-
- var tr = this.appendNewElement_(this.$.head, 'tr');
- for (var i = 0; i < this.tableColumns_.length; i++) {
- var td = this.appendNewElement_(tr, 'td');
-
- var headerCell = document.createElement('tr-ui-b-table-header-cell');
- headerCell.column = this.tableColumns_[i];
-
- // If the table can be sorted by this column and the user can modify
- // the sort order, attach a tap callback to the column.
- if (this.tableColumns_[i].cmp) {
- var isColumnCurrentlySorted = i === this.sortColumnIndex_;
- if (isColumnCurrentlySorted) {
- headerCell.sideContent = this.sortDescending_ ?
- DESCENDING_ARROW : ASCENDING_ARROW;
- if (!this.userCanModifySortOrder_)
- headerCell.sideContentDisabled = true;
- }
- if (this.userCanModifySortOrder_) {
- Polymer.dom(td).classList.add('sensitive');
- if (!isColumnCurrentlySorted)
- headerCell.sideContent = UNSORTED_ARROW;
- headerCell.tapCallback = this.createSortCallback_(i);
- }
- }
-
- Polymer.dom(td).appendChild(headerCell);
- this.headerCells_.push(headerCell);
- }
- },
-
- applySizes_: function() {
- if (this.tableRows_.length === 0 && !this.showHeader)
- return;
- var rowToRemoveSizing;
- var rowToSize;
- if (this.showHeader) {
- rowToSize = Polymer.dom(this.$.head).children[0];
- rowToRemoveSizing = Polymer.dom(this.$.body).children[0];
- } else {
- rowToSize = Polymer.dom(this.$.body).children[0];
- rowToRemoveSizing = Polymer.dom(this.$.head).children[0];
- }
- for (var i = 0; i < this.tableColumns_.length; i++) {
- if (rowToRemoveSizing && Polymer.dom(rowToRemoveSizing).children[i]) {
- var tdToRemoveSizing = Polymer.dom(rowToRemoveSizing).children[i];
- tdToRemoveSizing.style.minWidth = '';
- tdToRemoveSizing.style.width = '';
- }
-
- // Apply sizing.
- var td = Polymer.dom(rowToSize).children[i];
-
- var delta;
- if (this.columnsWithExpandButtons_.indexOf(i) !== -1) {
- td.style.paddingLeft = this.basicIndentation_ + 'px';
- delta = this.basicIndentation_ + 'px';
- } else {
- delta = undefined;
- }
-
- function calc(base, delta) {
- if (delta)
- return 'calc(' + base + ' - ' + delta + ')';
- else
- return base;
- }
-
- var w = this.tableColumns_[i].width;
- if (w) {
- if (/\d+px/.test(w)) {
- td.style.minWidth = calc(w, delta);
- } else if (/\d+%/.test(w)) {
- td.style.width = w;
- } else {
- throw new Error('Unrecognized width string: ' + w);
- }
- }
- }
- },
-
- createSortCallback_: function(columnNumber) {
- return function() {
- if (!this.userCanModifySortOrder_)
- return;
- var previousIndex = this.sortColumnIndex;
- this.sortColumnIndex = columnNumber;
- if (previousIndex !== columnNumber)
- this.sortDescending = false;
- else
- this.sortDescending = !this.sortDescending;
- }.bind(this);
- },
-
- generateTableRowNodes_: function(tableSection, userRows, rowInfoMap,
- indentation, lastAddedRow,
- parentRowInfo) {
- if (this.sortColumnIndex_ !== undefined &&
- tableSection === this.$.body) {
- userRows = userRows.slice(); // Don't mess with the input data.
- userRows.sort(function(rowA, rowB) {
- var c = this.tableColumns_[this.sortColumnIndex_].cmp(
- rowA, rowB);
- if (this.sortDescending_)
- c = -c;
- return c;
- }.bind(this));
- }
-
- for (var i = 0; i < userRows.length; i++) {
- var userRow = userRows[i];
- var rowInfo = this.getOrCreateRowInfoFor_(rowInfoMap, userRow,
- parentRowInfo);
- var htmlNode = this.getHTMLNodeForRowInfo_(
- tableSection, rowInfo, rowInfoMap, indentation);
-
- if (lastAddedRow === undefined) {
- // Put first into the table.
- Polymer.dom(tableSection).insertBefore(
- htmlNode, Polymer.dom(tableSection).firstChild);
- } else {
- // This is shorthand for insertAfter(htmlNode, lastAdded).
- var nextSiblingOfLastAdded = Polymer.dom(lastAddedRow).nextSibling;
- Polymer.dom(tableSection).insertBefore(
- htmlNode, nextSiblingOfLastAdded);
- }
-
- lastAddedRow = htmlNode;
- if (!rowInfo.isExpanded)
- continue;
-
- // Append subrows now.
- lastAddedRow = this.generateTableRowNodes_(
- tableSection, userRow[this.subRowsPropertyName_], rowInfoMap,
- indentation + 1, lastAddedRow, rowInfo);
- }
- return lastAddedRow;
- },
-
- getOrCreateRowInfoFor_: function(rowInfoMap, userRow, parentRowInfo) {
- var rowInfo = undefined;
-
- if (rowInfoMap.has(userRow)) {
- rowInfo = rowInfoMap.get(userRow);
- } else {
- rowInfo = {
- userRow: userRow,
- htmlNode: undefined,
- parentRowInfo: parentRowInfo
- };
- rowInfoMap.set(userRow, rowInfo);
- }
-
- // Recompute isExpanded in case defaultExpansionStateCallback_ has
- // changed.
- rowInfo.isExpanded = this.getExpandedForUserRow_(userRow);
-
- return rowInfo;
- },
-
- customizeTableRow_: function(userRow, trElement) {
- if (!this.customizeTableRowCallback_)
- return;
- this.customizeTableRowCallback_(userRow, trElement);
- },
-
- get basicIndentation_() {
- var px = parseInt(getComputedStyle(this).fontSize) || 16;
- return px - 2;
- },
-
- getHTMLNodeForRowInfo_: function(tableSection, rowInfo,
- rowInfoMap, indentation) {
- if (rowInfo.htmlNode) {
- this.customizeTableRow_(rowInfo.userRow, rowInfo.htmlNode);
- return rowInfo.htmlNode;
- }
-
- var INDENT_SPACE = indentation * 16;
- var INDENT_SPACE_NO_BUTTON = indentation * 16 + this.basicIndentation_;
- var trElement = this.ownerDocument.createElement('tr');
- rowInfo.htmlNode = trElement;
- rowInfo.indentation = indentation;
- trElement.rowInfo = rowInfo;
- this.customizeTableRow_(rowInfo.userRow, trElement);
-
- var isBodyRow = tableSection === this.$.body;
- var isExpandableRow = rowInfo.userRow[this.subRowsPropertyName_] &&
- rowInfo.userRow[this.subRowsPropertyName_].length;
-
- for (var i = 0; i < this.tableColumns_.length;) {
- var td = this.appendNewElement_(trElement, 'td');
- td.columnIndex = i;
-
- var column = this.tableColumns_[i];
- var value = column.value(rowInfo.userRow);
- var colSpan = column.colSpan ? column.colSpan : 1;
- td.style.colSpan = colSpan;
-
- switch (column.align) {
- case undefined:
- case ColumnAlignment.LEFT:
- break;
-
- case ColumnAlignment.RIGHT:
- td.style.textAlign = 'right';
- break;
-
- default:
- throw new Error('Invalid alignment of column at index=' + i +
- ': ' + column.align);
- }
-
- if (this.doesColumnIndexSupportSelection(i))
- Polymer.dom(td).classList.add('supports-selection');
-
- if (this.columnsWithExpandButtons_.indexOf(i) !== -1) {
- if (rowInfo.userRow[this.subRowsPropertyName_] &&
- rowInfo.userRow[this.subRowsPropertyName_].length > 0) {
- td.style.paddingLeft = INDENT_SPACE + 'px';
- td.style.display = 'flex';
- var expandButton = this.appendNewElement_(td, 'expand-button');
- Polymer.dom(expandButton).textContent = RIGHT_ARROW;
- if (rowInfo.isExpanded)
- Polymer.dom(expandButton).classList.add('button-expanded');
- } else {
- td.style.paddingLeft = INDENT_SPACE_NO_BUTTON + 'px';
- }
- }
-
- if (value !== undefined) {
- Polymer.dom(td).appendChild(
- tr.ui.b.asHTMLOrTextNode(value, this.ownerDocument));
- }
-
- // Add a click handler for selection and row expansion (if applicable).
- if (isBodyRow || isExpandableRow) {
- td.addEventListener('click', function(i, e) {
- e.stopPropagation();
- if (e.target.tagName === 'EXPAND-BUTTON') {
- this.setExpandedForUserRow_(
- tableSection, rowInfoMap,
- rowInfo.userRow, !rowInfo.isExpanded);
- return;
- }
-
- // If the row/cell can be selected and it's not selected yet,
- // select it.
- if (isBodyRow && this.selectionMode_ !== SelectionMode.NONE) {
- var shouldSelect = false;
- var shouldFocus = false;
- switch (this.selectionMode_) {
- case SelectionMode.ROW:
- shouldSelect = this.selectedTableRowInfo_ !== rowInfo;
- shouldFocus = true;
- break;
- case SelectionMode.CELL:
- if (this.doesColumnIndexSupportSelection(i)) {
- shouldSelect = this.selectedTableRowInfo_ !== rowInfo ||
- this.selectedColumnIndex_ !== i;
- shouldFocus = true;
- }
- break;
- default:
- throw new Error('Invalid selection mode ' +
- this.selectionMode_);
- }
- if (shouldFocus) {
- this.focus();
- }
- if (shouldSelect) {
- this.didTableRowInfoGetClicked_(rowInfo, i);
- return;
- }
- }
-
- // Otherwise, if the row is expandable, expand/collapse it.
- if (isExpandableRow) {
- this.setExpandedForUserRow_(tableSection, rowInfoMap,
- rowInfo.userRow, !rowInfo.isExpanded);
- }
- }.bind(this, i));
- }
-
- td.addEventListener('mousedown', function(e) {
- // Prevent automatically focusing on the table upon clicking on the
- // table. Explicitly focus on it when appropriate (upon clicking on a
- // selectable row/cell) instead.
- e.preventDefault();
- });
-
- // Add a double-click handler for stepping into a row/cell (if
- // applicable).
- if (isBodyRow) {
- td.addEventListener('dblclick', function(i, e) {
- e.stopPropagation();
- this.dispatchStepIntoEvent_(rowInfo, i);
- }.bind(this, i));
- }
-
- i += colSpan;
- }
-
- return rowInfo.htmlNode;
- },
-
- removeSubNodes_: function(tableSection, rowInfo, rowInfoMap) {
- if (rowInfo.userRow[this.subRowsPropertyName_] === undefined)
- return;
- for (var i = 0;
- i < rowInfo.userRow[this.subRowsPropertyName_].length; i++) {
- var subRow = rowInfo.userRow[this.subRowsPropertyName_][i];
- var subRowInfo = rowInfoMap.get(subRow);
- if (!subRowInfo)
- continue;
-
- var subNode = subRowInfo.htmlNode;
- if (subNode && Polymer.dom(subNode).parentNode === tableSection) {
- Polymer.dom(tableSection).removeChild(subNode);
- this.removeSubNodes_(tableSection, subRowInfo, rowInfoMap);
- }
- }
- },
-
- scheduleRebuildHeaders_: function() {
- this.headerDirty_ = true;
- this.scheduleRebuild_();
- },
-
- scheduleRebuildBody_: function() {
- this.bodyDirty_ = true;
- this.scheduleRebuild_();
- },
-
- scheduleRebuildFooter_: function() {
- this.footerDirty_ = true;
- this.scheduleRebuild_();
- },
-
- scheduleRebuild_: function() {
- if (this.rebuildPending_)
- return;
- this.rebuildPending_ = true;
- setTimeout(function() {
- this.rebuildPending_ = false;
- this.rebuild();
- }.bind(this), 0);
- },
-
- rebuildIfNeeded_: function() {
- this.rebuild();
- },
-
- rebuild: function() {
- var wasBodyOrHeaderDirty = this.headerDirty_ || this.bodyDirty_;
-
- if (this.headerDirty_) {
- this.generateHeaderColumns_();
- this.headerDirty_ = false;
- }
- if (this.bodyDirty_) {
- Polymer.dom(this.$.body).textContent = '';
- this.generateTableRowNodes_(
- this.$.body,
- this.tableRows_, this.tableRowsInfo_, 0,
- undefined, undefined);
- if (this.tableRows_.length === 0 && this.emptyValue_ !== undefined) {
- var trElement = this.ownerDocument.createElement('tr');
- Polymer.dom(this.$.body).appendChild(trElement);
- Polymer.dom(trElement).classList.add('empty-row');
- var td = this.ownerDocument.createElement('td');
- Polymer.dom(trElement).appendChild(td);
- td.colSpan = this.tableColumns_.length;
- var emptyValue = this.emptyValue_;
- Polymer.dom(td).appendChild(
- tr.ui.b.asHTMLOrTextNode(emptyValue, this.ownerDocument));
- }
- this.bodyDirty_ = false;
- }
-
- if (wasBodyOrHeaderDirty)
- this.applySizes_();
-
- if (this.footerDirty_) {
- Polymer.dom(this.$.foot).textContent = '';
- this.generateTableRowNodes_(
- this.$.foot,
- this.tableFooterRows_, this.tableFooterRowsInfo_, 0,
- undefined, undefined);
- if (this.tableFooterRowsInfo_.length) {
- Polymer.dom(this.$.body).classList.add('has-footer');
- } else {
- Polymer.dom(this.$.body).classList.remove('has-footer');
- }
- this.footerDirty_ = false;
- }
- },
-
- appendNewElement_: function(parent, tagName) {
- var element = parent.ownerDocument.createElement(tagName);
- Polymer.dom(parent).appendChild(element);
- return element;
- },
-
- getExpandedForTableRow: function(userRow) {
- this.rebuildIfNeeded_();
- var rowInfo = this.tableRowsInfo_.get(userRow);
- if (rowInfo === undefined)
- throw new Error('Row has not been seen, must expand its parents');
- return rowInfo.isExpanded;
- },
-
- getExpandedForUserRow_: function(userRow) {
- if (userRow[this.subRowsPropertyName_] === undefined)
- return false;
- if (userRow[this.subRowsPropertyName_].length === 0)
- return false;
- if (userRow.isExpanded)
- return true;
- if ((userRow.isExpanded !== undefined) &&
- (userRow.isExpanded === false))
- return false;
-
- var rowInfo = this.tableRowsInfo_.get(userRow);
- if (rowInfo && rowInfo.isExpanded)
- return true;
-
- if (this.defaultExpansionStateCallback_ === undefined)
- return false;
-
- var parentUserRow = undefined;
- if (rowInfo && rowInfo.parentRowInfo)
- parentUserRow = rowInfo.parentRowInfo.userRow;
-
- return this.defaultExpansionStateCallback_(
- userRow, parentUserRow);
- },
-
- setExpandedForTableRow: function(userRow, expanded) {
- this.rebuildIfNeeded_();
- var rowInfo = this.tableRowsInfo_.get(userRow);
- if (rowInfo === undefined)
- throw new Error('Row has not been seen, must expand its parents');
- return this.setExpandedForUserRow_(this.$.body, this.tableRowsInfo_,
- userRow, expanded);
- },
-
- setExpandedForUserRow_: function(tableSection, rowInfoMap,
- userRow, expanded) {
- this.rebuildIfNeeded_();
-
- var rowInfo = rowInfoMap.get(userRow);
- if (rowInfo === undefined)
- throw new Error('Row has not been seen, must expand its parents');
-
- rowInfo.isExpanded = !!expanded;
- // If no node, then nothing further needs doing.
- if (rowInfo.htmlNode === undefined)
- return;
-
- // If its detached, then nothing needs doing.
- if (rowInfo.htmlNode.parentElement !== tableSection)
- return;
-
- // Otherwise, rebuild.
- var expandButton =
- Polymer.dom(rowInfo.htmlNode).querySelector('expand-button');
- if (rowInfo.isExpanded) {
- Polymer.dom(expandButton).classList.add('button-expanded');
- var lastAddedRow = rowInfo.htmlNode;
- if (rowInfo.userRow[this.subRowsPropertyName_]) {
- this.generateTableRowNodes_(
- tableSection,
- rowInfo.userRow[this.subRowsPropertyName_], rowInfoMap,
- rowInfo.indentation + 1,
- lastAddedRow, rowInfo);
- }
- } else {
- Polymer.dom(expandButton).classList.remove('button-expanded');
- this.removeSubNodes_(tableSection, rowInfo, rowInfoMap);
- }
-
- this.maybeUpdateSelectedRow_();
- },
-
- get selectionMode() {
- return this.selectionMode_;
- },
-
- set selectionMode(selectionMode) {
- if (!tr.b.dictionaryContainsValue(SelectionMode, selectionMode))
- throw new Error('Invalid selection mode ' + selectionMode);
- this.rebuildIfNeeded_();
- this.selectionMode_ = selectionMode;
- this.didSelectionStateChange_();
- },
-
- get rowHighlightStyle() {
- return this.rowHighlightStyle_;
- },
-
- set rowHighlightStyle(rowHighlightStyle) {
- if (!tr.b.dictionaryContainsValue(HighlightStyle, rowHighlightStyle))
- throw new Error('Invalid row highlight style ' + rowHighlightStyle);
- this.rebuildIfNeeded_();
- this.rowHighlightStyle_ = rowHighlightStyle;
- this.didSelectionStateChange_();
- },
-
- get resolvedRowHighlightStyle() {
- if (this.rowHighlightStyle_ !== HighlightStyle.DEFAULT)
- return this.rowHighlightStyle_;
- switch (this.selectionMode_) {
- case SelectionMode.NONE:
- return HighlightStyle.NONE;
- case SelectionMode.ROW:
- return HighlightStyle.DARK;
- case SelectionMode.CELL:
- return HighlightStyle.LIGHT;
- default:
- throw new Error('Invalid selection mode ' + selectionMode);
- }
- },
-
- get cellHighlightStyle() {
- return this.cellHighlightStyle_;
- },
-
- set cellHighlightStyle(cellHighlightStyle) {
- if (!tr.b.dictionaryContainsValue(HighlightStyle, cellHighlightStyle))
- throw new Error('Invalid cell highlight style ' + cellHighlightStyle);
- this.rebuildIfNeeded_();
- this.cellHighlightStyle_ = cellHighlightStyle;
- this.didSelectionStateChange_();
- },
-
- get resolvedCellHighlightStyle() {
- if (this.cellHighlightStyle_ !== HighlightStyle.DEFAULT)
- return this.cellHighlightStyle_;
- switch (this.selectionMode_) {
- case SelectionMode.NONE:
- case SelectionMode.ROW:
- return HighlightStyle.NONE;
- case SelectionMode.CELL:
- return HighlightStyle.DARK;
- default:
- throw new Error('Invalid selection mode ' + selectionMode);
- }
- },
-
- setHighlightStyle_: function(highlightAttribute, resolvedHighlightStyle) {
- switch (resolvedHighlightStyle) {
- case HighlightStyle.NONE:
- Polymer.dom(this.$.body).removeAttribute(highlightAttribute);
- break;
- case HighlightStyle.LIGHT:
- Polymer.dom(this.$.body).setAttribute(highlightAttribute, 'light');
- break;
- case HighlightStyle.DARK:
- Polymer.dom(this.$.body).setAttribute(highlightAttribute, 'dark');
- break;
- default:
- throw new Error('Invalid resolved highlight style ' +
- resolvedHighlightStyle);
- }
- },
-
- didSelectionStateChange_: function() {
- this.setHighlightStyle_('row-highlight-style',
- this.resolvedRowHighlightStyle);
- this.setHighlightStyle_('cell-highlight-style',
- this.resolvedCellHighlightStyle);
-
- this.removeSelectedState_();
-
- switch (this.selectionMode_) {
- case SelectionMode.ROW:
- // TODO: Replace this.selectionMode_ with a proper Polymer attribute.
- Polymer.dom(this.$.body).setAttribute('selection-mode', 'row');
- Polymer.dom(this.$.body).setAttribute('tabindex', 0);
- this.selectedColumnIndex_ = undefined;
- break;
- case SelectionMode.CELL:
- Polymer.dom(this.$.body).setAttribute('selection-mode', 'cell');
- Polymer.dom(this.$.body).setAttribute('tabindex', 0);
- if (this.selectedTableRowInfo_ &&
- this.selectedColumnIndex_ === undefined) {
- var i = this.getFirstSelectableColumnIndex_();
- if (i === -1) {
- // No column is selectable.
- this.selectedTableRowInfo_ = undefined;
- } else {
- this.selectedColumnIndex_ = i;
- }
- }
- break;
- case SelectionMode.NONE:
- Polymer.dom(this.$.body).removeAttribute('selection-mode');
- Polymer.dom(this.$.body).removeAttribute('tabindex');
- this.$.body.blur(); // Remove focus (if applicable).
- this.selectedTableRowInfo_ = undefined;
- this.selectedColumnIndex_ = undefined;
- break;
- default:
- throw new Error('Invalid selection mode ' + this.selectionMode_);
- }
-
- this.maybeUpdateSelectedRow_();
- },
-
- maybeUpdateSelectedRow_: function() {
- if (this.selectedTableRowInfo_ === undefined)
- return;
-
- // selectedUserRow may not be visible
- function isVisible(rowInfo) {
- if (!rowInfo.htmlNode)
- return false;
- return !!rowInfo.htmlNode.parentElement;
- }
- if (isVisible(this.selectedTableRowInfo_)) {
- this.updateSelectedState_();
- return;
- }
-
- this.removeSelectedState_();
- var curRowInfo = this.selectedTableRowInfo_;
- while (curRowInfo && !isVisible(curRowInfo))
- curRowInfo = curRowInfo.parentRowInfo;
-
- this.selectedTableRowInfo_ = curRowInfo;
- if (this.selectedTableRowInfo_)
- this.updateSelectedState_();
- else
- this.selectedColumnIndex_ = undefined;
- },
-
- didTableRowInfoGetClicked_: function(rowInfo, columnIndex) {
- switch (this.selectionMode_) {
- case SelectionMode.NONE:
- return;
-
- case SelectionMode.CELL:
- if (!this.doesColumnIndexSupportSelection(columnIndex))
- return;
- if (this.selectedColumnIndex !== columnIndex)
- this.selectedColumnIndex = columnIndex;
- // Fall through.
-
- case SelectionMode.ROW:
- if (this.selectedTableRowInfo_ !== rowInfo)
- this.selectedTableRow = rowInfo.userRow;
- }
- },
-
- dispatchStepIntoEvent_: function(rowInfo, columnIndex) {
- var e = new tr.b.Event('step-into');
- e.tableRow = rowInfo.userRow;
- e.tableColumn = this.tableColumns_[columnIndex];
- e.columnIndex = columnIndex;
- this.dispatchEvent(e);
- },
-
- /**
- * If the selectionMode is CELL and a cell is selected,
- * return an object containing the row, column, and value of the selected
- * cell.
- *
- * @return {undefined|!Object}
- */
- get selectedCell() {
- var row = this.selectedTableRow;
- var columnIndex = this.selectedColumnIndex;
- if (row === undefined || columnIndex === undefined ||
- this.tableColumns_.length <= columnIndex)
- return undefined;
- var column = this.tableColumns_[columnIndex];
- return {
- row: row,
- column: column,
- value: column.value(row)
- };
- },
-
- /**
- * If a column is selected, return the object describing the selected
- * column.
- *
- * Columns can be selected independently of rows and cells. So it is
- * possible to select column 0 and cell [0,0], or column 1 and cell [0,0],
- * for example. See |selectedCell| for how to access the selected cell when
- * the selectionMode is CELL.
- *
- * |selectedTableColumn| is entirely independent of |selectedColumnIndex|.
- * When the table selectionMode is CELL, use |selectedTableRow| and
- * |selectedColumnIndex| to find the selected cell.
- * When one or more columns have |selectable:true|, then use
- * |selectedTableColumn| to find the selected column, which may be either
- * the same as or different from |selectedColumnIndex|, if a cell is also
- * selected.
- *
- * @return {number|undefined}
- */
- get selectedTableColumnIndex() {
- var cols = Polymer.dom(this.$.cols).children;
- for (var i = 0; i < cols.length; ++i) {
- if (cols[i].getAttribute('selected')) {
- return i;
- }
- }
- return undefined;
- },
-
- /**
- * @param {number|undefined} index
- */
- set selectedTableColumnIndex(selectedIndex) {
- var cols = Polymer.dom(this.$.cols).children;
- for (var i = 0; i < cols.length; ++i) {
- if (i === selectedIndex)
- cols[i].setAttribute('selected', true);
- else
- cols[i].removeAttribute('selected');
- }
- },
-
- get selectedTableRow() {
- if (!this.selectedTableRowInfo_)
- return undefined;
- return this.selectedTableRowInfo_.userRow;
- },
-
- set selectedTableRow(userRow) {
- this.rebuildIfNeeded_();
- if (this.selectionMode_ === SelectionMode.NONE)
- throw new Error('Selection is off.');
-
- var rowInfo;
- if (userRow === undefined) {
- rowInfo = undefined;
- } else {
- rowInfo = this.tableRowsInfo_.get(userRow);
- if (!rowInfo)
- throw new Error('Row has not been seen, must expand its parents.');
- }
-
- var e = this.prepareToChangeSelection_();
-
- if (!rowInfo) {
- this.selectedColumnIndex_ = undefined;
- } else {
- switch (this.selectionMode_) {
- case SelectionMode.ROW:
- this.selectedColumnIndex_ = undefined;
- break;
-
- case SelectionMode.CELL:
- if (this.selectedColumnIndex_ === undefined) {
- var i = this.getFirstSelectableColumnIndex_();
- if (i === -1)
- throw new Error('Cannot find a selectable column.');
- this.selectedColumnIndex_ = i;
- }
- break;
-
- default:
- throw new Error('Invalid selection mode ' + this.selectionMode_);
- }
- }
-
- this.selectedTableRowInfo_ = rowInfo;
- this.updateSelectedState_();
- this.dispatchEvent(e);
- },
-
- prepareToChangeSelection_: function() {
- var e = new tr.b.Event('selection-changed');
- var previousSelectedRowInfo = this.selectedTableRowInfo_;
- if (previousSelectedRowInfo)
- e.previousSelectedTableRow = previousSelectedRowInfo.userRow;
- else
- e.previousSelectedTableRow = undefined;
-
- this.removeSelectedState_();
-
- return e;
- },
-
- removeSelectedState_: function() {
- this.setSelectedState_(false);
- },
-
- updateSelectedState_: function() {
- this.setSelectedState_(true);
- },
-
- setSelectedState_: function(select) {
- if (this.selectedTableRowInfo_ === undefined)
- return;
-
- // Row selection.
- var rowNode = this.selectedTableRowInfo_.htmlNode;
- if (select)
- Polymer.dom(rowNode).setAttribute('selected', true);
- else
- Polymer.dom(rowNode).removeAttribute('selected');
-
- // Cell selection (if applicable).
- var cellNode = Polymer.dom(rowNode).children[this.selectedColumnIndex_];
- if (!cellNode)
- return;
- if (select)
- Polymer.dom(cellNode).setAttribute('selected', true);
- else
- Polymer.dom(cellNode).removeAttribute('selected');
- },
-
- doesColumnIndexSupportSelection: function(columnIndex) {
- var columnInfo = this.tableColumns_[columnIndex];
- var scs = columnInfo.supportsCellSelection;
- if (scs === false)
- return false;
- return true;
- },
-
- getFirstSelectableColumnIndex_: function() {
- for (var i = 0; i < this.tableColumns_.length; i++) {
- if (this.doesColumnIndexSupportSelection(i))
- return i;
- }
- return -1;
- },
-
- getSelectableNodeGivenTableRowNode_: function(htmlNode) {
- switch (this.selectionMode_) {
- case SelectionMode.ROW:
- return htmlNode;
-
- case SelectionMode.CELL:
- return Polymer.dom(htmlNode).children[this.selectedColumnIndex_];
-
- default:
- throw new Error('Invalid selection mode ' + this.selectionMode_);
- }
- },
-
- get selectedColumnIndex() {
- if (this.selectionMode_ !== SelectionMode.CELL)
- return undefined;
- return this.selectedColumnIndex_;
- },
-
- set selectedColumnIndex(selectedColumnIndex) {
- this.rebuildIfNeeded_();
- if (this.selectionMode_ === SelectionMode.NONE)
- throw new Error('Selection is off.');
- if (selectedColumnIndex < 0 ||
- selectedColumnIndex >= this.tableColumns_.length)
- throw new Error('Invalid index');
- if (!this.doesColumnIndexSupportSelection(selectedColumnIndex))
- throw new Error('Selection is not supported on this column');
-
- var e = this.prepareToChangeSelection_();
- if (this.selectedColumnIndex_ === undefined) {
- this.selectedTableRowInfo_ = undefined;
- } else if (!this.selectedTableRowInfo_) {
- if (this.tableRows_.length === 0)
- throw new Error('No available row to be selected');
- this.selectedTableRowInfo_ =
- this.tableRowsInfo_.get(this.tableRows_[0]);
- }
- this.selectedColumnIndex_ = selectedColumnIndex;
- this.updateSelectedState_();
- this.dispatchEvent(e);
- },
-
- onKeyDown_: function(e) {
- if (this.selectionMode_ === SelectionMode.NONE)
- return;
-
- var CODE_TO_COMMAND_NAMES = {
- 13: 'ENTER',
- 32: 'SPACE',
- 37: 'ARROW_LEFT',
- 38: 'ARROW_UP',
- 39: 'ARROW_RIGHT',
- 40: 'ARROW_DOWN'
- };
- var cmdName = CODE_TO_COMMAND_NAMES[e.keyCode];
- if (cmdName === undefined)
- return;
-
- e.stopPropagation();
- e.preventDefault();
- this.performKeyCommand_(cmdName);
- },
-
- onFocus_: function(e) {
- if (this.selectionMode_ === SelectionMode.NONE ||
- this.selectedTableRowInfo_ ||
- this.tableRows_.length === 0) {
- return;
- }
-
- if (this.selectionMode_ === SelectionMode.CELL &&
- this.getFirstSelectableColumnIndex_() === -1) {
- // If there are no selectable columns in cell selection mode, don't do
- // anything.
- return;
- }
-
- this.selectedTableRow = this.tableRows_[0];
- },
-
- focus: function() {
- this.$.body.focus();
- },
-
- blur: function() {
- this.$.body.blur();
- },
-
- get isFocused() {
- return this.root.activeElement === this.$.body;
- },
-
- performKeyCommand_: function(cmdName) {
- this.rebuildIfNeeded_();
-
- switch (cmdName) {
- case 'ARROW_UP':
- this.selectPreviousOrFirstRowIfPossible_();
- return;
-
- case 'ARROW_DOWN':
- this.selectNextOrFirstRowIfPossible_();
- return;
-
- case 'ARROW_RIGHT':
- switch (this.selectionMode_) {
- case SelectionMode.NONE:
- return; // No action.
- case SelectionMode.ROW:
- this.expandRowAndSelectChildRowIfPossible_();
- return;
- case SelectionMode.CELL:
- this.selectNextSelectableCellToTheRightIfPossible_();
- return;
- default:
- throw new Error('Invalid selection mode ' + this.selectionMode_);
- }
-
- case 'ARROW_LEFT':
- switch (this.selectionMode_) {
- case SelectionMode.NONE:
- return; // No action.
- case SelectionMode.ROW:
- this.collapseRowOrSelectParentRowIfPossible_();
- return;
- case SelectionMode.CELL:
- this.selectNextSelectableCellToTheLeftIfPossible_();
- return;
- default:
- throw new Error('Invalid selection mode ' + this.selectionMode_);
- }
-
- case 'SPACE':
- this.toggleRowExpansionStateIfPossible_();
- return;
-
- case 'ENTER':
- this.stepIntoSelectionIfPossible_();
- return;
-
- default:
- throw new Error('Unrecognized command ' + cmdName);
- }
- },
-
- selectPreviousOrFirstRowIfPossible_: function() {
- var prev = this.selectedTableRowInfo_ ?
- this.selectedTableRowInfo_.htmlNode.previousElementSibling :
- this.$.body.firstChild;
- if (!prev)
- return;
- if (this.selectionMode_ === SelectionMode.CELL &&
- this.getFirstSelectableColumnIndex_() === -1) {
- // If there are no selectable columns in cell selection mode, don't do
- // anything.
- return;
- }
- tr.ui.b.scrollIntoViewIfNeeded(prev);
- this.selectedTableRow = prev.rowInfo.userRow;
- },
-
- selectNextOrFirstRowIfPossible_: function() {
- this.getFirstSelectableColumnIndex_
- var next = this.selectedTableRowInfo_ ?
- this.selectedTableRowInfo_.htmlNode.nextElementSibling :
- this.$.body.firstChild;
- if (!next)
- return;
- if (this.selectionMode_ === SelectionMode.CELL &&
- this.getFirstSelectableColumnIndex_() === -1) {
- // If there are no selectable columns in cell selection mode, don't do
- // anything.
- return;
- }
- tr.ui.b.scrollIntoViewIfNeeded(next);
- this.selectedTableRow = next.rowInfo.userRow;
- },
-
- expandRowAndSelectChildRowIfPossible_: function() {
- var selectedRowInfo = this.selectedTableRowInfo_;
- if (!selectedRowInfo ||
- selectedRowInfo.userRow[this.subRowsPropertyName_] === undefined ||
- selectedRowInfo.userRow[this.subRowsPropertyName_].length === 0) {
- return;
- }
- if (!selectedRowInfo.isExpanded)
- this.setExpandedForTableRow(selectedRowInfo.userRow, true);
- this.selectedTableRow =
- selectedRowInfo.htmlNode.nextElementSibling.rowInfo.userRow;
- },
-
- collapseRowOrSelectParentRowIfPossible_: function() {
- var selectedRowInfo = this.selectedTableRowInfo_;
- if (!selectedRowInfo)
- return;
- if (selectedRowInfo.isExpanded) {
- // If the node is expanded, collapse it.
- this.setExpandedForTableRow(selectedRowInfo.userRow, false);
- } else {
- // If the node is not expanded, select its parent.
- var parentRowInfo = selectedRowInfo.parentRowInfo;
- if (parentRowInfo)
- this.selectedTableRow = parentRowInfo.userRow;
- }
- },
-
- selectNextSelectableCellToTheRightIfPossible_: function() {
- if (!this.selectedTableRowInfo_ ||
- this.selectedColumnIndex_ === undefined) {
- return;
- }
- for (var i = this.selectedColumnIndex_ + 1; i < this.tableColumns_.length;
- i++) {
- if (this.doesColumnIndexSupportSelection(i)) {
- this.selectedColumnIndex = i;
- return;
- }
- }
- },
-
- selectNextSelectableCellToTheLeftIfPossible_: function() {
- if (!this.selectedTableRowInfo_ ||
- this.selectedColumnIndex_ === undefined) {
- return;
- }
- for (var i = this.selectedColumnIndex_ - 1; i >= 0; i--) {
- if (this.doesColumnIndexSupportSelection(i)) {
- this.selectedColumnIndex = i;
- return;
- }
- }
- },
-
- toggleRowExpansionStateIfPossible_: function() {
- var selectedRowInfo = this.selectedTableRowInfo_;
- if (!selectedRowInfo ||
- selectedRowInfo.userRow[this.subRowsPropertyName_] === undefined ||
- selectedRowInfo.userRow[this.subRowsPropertyName_].length === 0) {
- return;
- }
- this.setExpandedForTableRow(selectedRowInfo.userRow,
- !selectedRowInfo.isExpanded);
- },
-
- stepIntoSelectionIfPossible_: function() {
- if (!this.selectedTableRowInfo_)
- return;
- this.dispatchStepIntoEvent_(this.selectedTableRowInfo_,
- this.selectedColumnIndex_);
- },
-
- dispatchSortingChangedEvent_: function() {
- var e = new tr.b.Event('sort-column-changed');
- e.sortColumnIndex = this.sortColumnIndex_;
- e.sortDescending = this.sortDescending_;
- this.dispatchEvent(e);
- }
- });
-})();
-</script>
-
-<dom-module id="tr-ui-b-table-header-cell">
- <template>
- <style>
- :host {
- -webkit-user-select: none;
- display: flex;
- }
-
- span {
- flex: 0 1 auto;
- }
-
- #side {
- -webkit-user-select: none;
- flex: 0 0 auto;
- padding-left: 2px;
- padding-right: 2px;
- vertical-align: top;
- font-size: 15px;
- font-family: sans-serif;
- line-height: 85%;
- margin-left: 5px;
- }
-
- #side.disabled {
- color: rgb(140, 140, 140);
- }
-
- #title:empty, #side:empty {
- display: none;
- }
- </style>
-
- <span id="title"></span>
- <span id="side"></span>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-var ColumnAlignment = tr.ui.b.TableFormat.ColumnAlignment;
-
-Polymer({
- is: 'tr-ui-b-table-header-cell',
-
- created: function() {
- this.tapCallback_ = undefined;
- this.cellTitle_ = '';
- this.align_ = undefined;
- this.selectable_ = false;
- this.column_ = undefined;
- },
-
- ready: function() {
- this.addEventListener('click', this.onTap_.bind(this));
- },
-
- set column(column) {
- this.column_ = column;
- this.align = column.align;
- this.cellTitle = column.title;
- },
-
- get column() {
- return this.column_;
- },
-
- set cellTitle(value) {
- this.cellTitle_ = value;
-
- var titleNode = tr.ui.b.asHTMLOrTextNode(
- this.cellTitle_, this.ownerDocument);
-
- this.$.title.innerText = '';
-
- Polymer.dom(this.$.title).appendChild(titleNode);
- },
-
- get cellTitle() {
- return this.cellTitle_;
- },
-
- set align(align) {
- switch (align) {
- case undefined:
- case ColumnAlignment.LEFT:
- this.style.justifyContent = '';
- break;
-
- case ColumnAlignment.RIGHT:
- this.style.justifyContent = 'flex-end';
- break;
-
- default:
- throw new Error('Invalid alignment of column (title=\'' +
- this.cellTitle_ + '\'): ' + align);
- }
- this.align_ = align;
- },
-
- get align() {
- return this.align_;
- },
-
- clearSideContent: function() {
- Polymer.dom(this.$.side).textContent = '';
- },
-
- set sideContent(content) {
- Polymer.dom(this.$.side).textContent = content;
- this.$.side.style.display = content ? 'inline' : 'none';
- },
-
- get sideContent() {
- return Polymer.dom(this.$.side).textContent;
- },
-
- set sideContentDisabled(sideContentDisabled) {
- this.$.side.classList.toggle('disabled', sideContentDisabled);
- },
-
- get sideContentDisabled() {
- return this.$.side.classList.contains('disabled');
- },
-
- set tapCallback(callback) {
- this.style.cursor = 'pointer';
- this.tapCallback_ = callback;
- },
-
- get tapCallback() {
- return this.tapCallback_;
- },
-
- onTap_: function() {
- if (this.tapCallback_)
- this.tapCallback_();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/table_header_cell.html b/chromium/third_party/catapult/tracing/tracing/ui/base/table_header_cell.html
deleted file mode 100644
index d822c251262..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/table_header_cell.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<dom-module id='tr-ui-b-table-header-cell'>
- <template>
- <style>
- :host {
- -webkit-user-select: none;
- display: flex;
- }
-
- span {
- flex: 0 1 auto;
- }
-
- side-element {
- -webkit-user-select: none;
- flex: 1 0 auto;
- padding-left: 4px;
- vertical-align: top;
- font-size: 15px;
- font-family: sans-serif;
- display: inline;
- line-height: 85%;
- }
- </style>
-
- <span id="title"></span><side-element id="side"></side-element>
- </template>
-</dom-module>
- <script>
- 'use strict';
-
- Polymer({
- is: 'tr-ui-b-table-header-cell',
-
- listeners: {
- 'tap': 'onTap_'
- },
-
- created: function() {
- this.tapCallback_ = undefined;
- this.cellTitle_ = '';
- },
-
- set cellTitle(value) {
- this.cellTitle_ = value;
-
- var titleNode =
- tr.ui.b.asHTMLOrTextNode(this.cellTitle_, this.ownerDocument);
-
- this.$.title.innerText = '';
- Polymer.dom(this.$.title).appendChild(titleNode);
- },
-
- get cellTitle() {
- return this.cellTitle_;
- },
-
- clearSideContent: function() {
- Polymer.dom(this.$.side).textContent = '';
- },
-
- set sideContent(content) {
- Polymer.dom(this.$.side).textContent = content;
- },
-
- get sideContent() {
- return Polymer.dom(this.$.side).textContent;
- },
-
- set tapCallback(callback) {
- this.style.cursor = 'pointer';
- this.tapCallback_ = callback;
- },
-
- get tapCallback() {
- return this.tapCallback_;
- },
-
- onTap_: function() {
- if (this.tapCallback_)
- this.tapCallback_();
- }
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/table_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/table_test.html
deleted file mode 100644
index 8778646c562..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/table_test.html
+++ /dev/null
@@ -1,2084 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var THIS_DOC = document.currentScript.ownerDocument;
- var SelectionMode = tr.ui.b.TableFormat.SelectionMode;
- var HighlightStyle = tr.ui.b.TableFormat.HighlightStyle;
- var ColumnAlignment = tr.ui.b.TableFormat.ColumnAlignment;
-
- function isSelected(element) {
- if (!element.hasAttribute('selected'))
- return false;
- return element.getAttribute('selected') === 'true';
- }
-
- function simulateDoubleClick(element) {
- // See https://developer.mozilla.org/en/docs/Web/API/MouseEvent#Example.
- var event = new MouseEvent('dblclick', {
- bubbles: true,
- cancelable: true,
- view: window
- });
- return element.dispatchEvent(event);
- }
-
- test('instantiateEmptyTable_withoutEmptyValue', function() {
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '300px'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; }
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = [];
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- // Check that the width of the first column was set correctly (despite no
- // body rows).
- var firstColumnHeader = table.$.head.children[0].children[0];
- assert.closeTo(firstColumnHeader.offsetWidth, 300, 20);
-
- // Check that the first column has a non-empty header.
- var firstColumnTitle = tr.b.findDeepElementMatchingPredicate(
- firstColumnHeader, function(element) {
- return Polymer.dom(element).textContent === 'First Column';
- });
- assert.isDefined(firstColumnTitle);
-
- // Check that empty value was not appended.
- assert.lengthOf(table.$.body.children, 0);
- });
-
- test('instantiateEmptyTable_withEmptyValue', function() {
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '300px'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; }
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = [];
- table.emptyValue = 'This table is left intentionally empty';
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- // Check that the width of the first column was set correctly (despite no
- // body rows).
- var firstColumnHeader = table.$.head.children[0].children[0];
- assert.closeTo(firstColumnHeader.offsetWidth, 300, 20);
-
- // Check that empty value was appended.
- assert.lengthOf(table.$.body.children, 1);
- });
-
- test('instantiateNestedTableNoNests', function() {
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '200px'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; }
- }
- ];
-
- var rows = [
- {
- firstData: 'A1',
- secondData: 'A2'
- },
- {
- firstData: 'B1',
- secondData: 'B2'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.emptyValue = 'THIS SHOULD NOT BE VISIBLE!!!';
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- // Check that empty value was not appended.
- assert.lengthOf(table.$.body.children, 2);
- });
-
- test('sequentialRebuildsBehaveSanely', function() {
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '200px'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; }
- }
- ];
-
- var rows = [
- {
- firstData: 'A1',
- secondData: 'A2'
- },
- {
- firstData: 'B1',
- secondData: 'B2'
- }
- ];
- var footerRows = [
- {
- firstData: 'A1',
- secondData: 'A2'
- },
- {
- firstData: 'B1',
- secondData: 'B2'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.footerRows = footerRows;
- table.rebuild();
- table.rebuild();
- assert.equal(table.$.body.children.length, 2);
- assert.equal(table.$.foot.children.length, 2);
-
- this.addHTMLOutput(table);
- });
-
- test('instantiateNestedTableWithNests', function() {
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '250px'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; },
- width: '50%'
- }
- ];
-
- var rows = [
- {
- firstData: 'A1',
- secondData: 'A2',
- subRows: [
- {
- firstData: 'Sub1 A1',
- secondData: 'Sub1 A2'
- },
- {
- firstData: 'Sub2 A1',
- secondData: 'Sub2 A2',
- subRows: [
- {
- firstData: 'SubSub1 A1',
- secondData: 'SubSub1 A2'
- },
- {
- firstData: 'SubSub2 A1',
- secondData: 'SubSub2 A2'
- }
- ]
- },
- {
- firstData: 'Sub3 A1',
- secondData: 'Sub3 A2'
- }
- ]
- },
- {
- firstData: 'B1',
- secondData: 'B2'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
- });
-
- test('instantiateSortingCallbacksWithNests', function() {
- var table = document.createElement('tr-ui-b-table');
-
- var columns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '50%'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; },
- width: '250px',
- cmp: function(rowA, rowB) {
- return rowA.secondData.toString().localeCompare(
- rowB.secondData.toString());
- },
- showExpandButtons: true
- }
- ];
-
- var rows = [
- {
- firstData: 'A1',
- secondData: 'A2',
- subRows: [
- {
- firstData: 'Sub1 A1',
- secondData: 'Sub1 A2'
- },
- {
- firstData: 'Sub2 A1',
- secondData: 'Sub2 A2',
- subRows: [
- {
- firstData: 'SubSub1 A1',
- secondData: 'SubSub1 A2'
- },
- {
- firstData: 'SubSub2 A1',
- secondData: 'SubSub2 A2'
- }
- ]
- },
- {
- firstData: 'Sub3 A1',
- secondData: 'Sub3 A2'
- }
- ]
- },
- {
- firstData: 'B1',
- secondData: 'B2'
- }
- ];
-
- var footerRows = [
- {
- firstData: 'F1',
- secondData: 'F2',
- subRows: [
- {
- firstData: 'Sub1F1',
- secondData: 'Sub1F2'
- },
- {
- firstData: 'Sub2F1',
- secondData: 'Sub2F2',
- subRows: [
- {
- firstData: 'SubSub1F1',
- secondData: 'SubSub1F2'
- },
- {
- firstData: 'SubSub2F1',
- secondData: 'SubSub2F2'
- }
- ]
- },
- {
- firstData: 'Sub3F1',
- secondData: 'Sub3F2'
- }
- ]
- },
- {
- firstData: 'F\'1',
- secondData: 'F\'2'
- }
-
- ];
-
- table.tableColumns = columns;
- table.tableRows = rows;
- table.footerRows = footerRows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- var button = THIS_DOC.createElement('button');
- Polymer.dom(button).textContent = 'Sort By Col 0';
- button.addEventListener('click', function() {
- table.sortDescending = !table.sortDescending;
- table.sortColumnIndex = 0;
- });
- table.rebuild();
-
- this.addHTMLOutput(button);
- });
-
-
- test('instantiateNestedTableAlreadyExpanded', function() {
- var columns = [
- {
- title: 'a',
- value: function(row) { return row.a; },
- width: '150px'
- },
- {
- title: 'a',
- value: function(row) { return row.b; },
- width: '50%'
- }
- ];
-
- var rows = [
- {
- a: 'aToplevel',
- b: 'bToplevel',
- isExpanded: true,
- subRows: [
- {
- a: 'a1',
- b: 'b1'
- }
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
- this.addHTMLOutput(table);
-
- var a1El = tr.b.findDeepElementMatchingPredicate(table, function(element) {
- return Polymer.dom(element).textContent === 'a1';
- });
- assert.isDefined(a1El);
-
- var bToplevelEl = tr.b.findDeepElementMatchingPredicate(
- table,
- function(element) {
- return Polymer.dom(element).textContent === 'bToplevel';
- });
- assert.isDefined(bToplevelEl);
- var expandButton = Polymer.dom(bToplevelEl.parentElement)
- .querySelector('expand-button');
- assert.isTrue(Polymer.dom(expandButton).classList.contains(
- 'button-expanded'));
- });
-
-
- test('subRowsThatAreRetrievedOnDemand', function() {
- var columns = [
- {
- title: 'a',
- value: function(row) { return row.a; },
- width: '150px'
- }
- ];
-
- var rows = [
- {
- a: 'row1',
- subRows: [
- {
- b: 'row1.1',
- get subRows() {
- throw new Error('Shold not be called');
- }
- }
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
- this.addHTMLOutput(table);
- });
-
-
- test('instantiateTableWithHiddenHeader', function() {
- var columns = [
- {
- title: 'a',
- value: function(row) { return row.a; },
- width: '150px'
- },
- {
- title: 'a',
- value: function(row) { return row.b; },
- width: '50%'
- }
- ];
-
- var rows = [
- {
- a: 'aToplevel',
- b: 'bToplevel'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.showHeader = false;
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
- this.addHTMLOutput(table);
-
- var tHead = table.$.head;
- assert.equal(table.$.head.children.length, 0);
- assert.equal(0, tHead.getBoundingClientRect().height);
-
- table.showHeader = true;
- table.rebuild();
- table.showHeader = false;
- table.rebuild();
- assert.equal(table.$.head.children.length, 0);
- });
-
-
- test('sortColumnsNotPossibleOnPercentSizedColumns', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px'
- },
- {
- title: 'Value',
- value: function(row) { return row.b; },
- width: '100%',
- showExpandButtons: true
- }
- ];
-
- var table1 = document.createElement('tr-ui-b-table');
- table1.showHeader = true;
-
- assert.throws(function() {
- table1.tableColumns = columns;
- });
- });
-
- test('twoTablesFirstColumnMatching', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px'
- },
- {
- title: 'Value',
- value: function(row) { return row.b; },
- width: '100%'
- }
- ];
-
- var table1 = document.createElement('tr-ui-b-table');
- table1.showHeader = true;
- table1.tableColumns = columns;
- table1.tableRows = [
- {
- a: 'first',
- b: 'row'
- }
- ];
- table1.rebuild();
- this.addHTMLOutput(table1);
-
- var table2 = document.createElement('tr-ui-b-table');
- table2.showHeader = false;
- table2.tableColumns = columns;
- table2.tableRows = [
- {
- a: 'second',
- b: 'row'
- }
- ];
- table2.rebuild();
- this.addHTMLOutput(table2);
-
- var h1FirstCol = table1.$.head.children[0].children[0];
- var h2FirstCol = table2.$.body.children[0].children[0];
- assert.equal(h1FirstCol.getBoundingClientRect().width,
- h2FirstCol.getBoundingClientRect().width);
- });
-
- test('programmaticSorting', function() {
- var table = document.createElement('tr-ui-b-table');
-
- var columns = [
- {
- title: 'Column',
- value: function(row) { return row.value; },
- cmp: function(rowA, rowB) {
- return rowA.value.toString().localeCompare(
- rowB.value.toString());
- }
- }
- ];
-
- var rows = [
- {
- value: 'A1',
- subRows: [
- {
- value: 'A1.1'
- },
- {
- value: 'A1.2',
- subRows: [
- {
- value: 'A1.2.1'
- },
- {
- value: 'A1.2.2'
- }
- ]
- },
- {
- value: 'A1.3'
- }
- ]
- },
- {
- value: 'A2'
- }
- ];
-
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- table.sortDescending = true;
- table.sortColumnIndex = 0;
- table.rebuild();
- var r0 = table.$.body.children[0];
- assert.equal(r0.rowInfo.userRow, rows[1]);
-
- var r1 = table.$.body.children[1];
- assert.equal(r1.rowInfo.userRow, rows[0]);
- });
-
- test('sortDispatchesEvent', function() {
- var table = document.createElement('tr-ui-b-table');
- var columns = [
- {
- title: 'Column 0',
- value: function(row) { return row.value0; },
- cmp: function(rowA, rowB) { return rowA.value0 - rowB.value0; }
- },
- {
- title: 'Column 1',
- value: function(row) { return row.value1; },
- cmp: function(rowA, rowB) { return rowA.value1 - rowB.value1; }
- }
- ];
-
- var sortColumnIndex = undefined;
- var sortDescending = undefined;
- var numListenerCalls = 0;
- table.tableColumns = columns;
- table.addEventListener('sort-column-changed', function(e) {
- sortColumnIndex = e.sortColumnIndex;
- sortDescending = e.sortDescending;
- numListenerCalls++;
- });
- table.rebuild();
-
- table.sortColumnIndex = 0;
- assert.equal(sortColumnIndex, 0);
- assert.equal(numListenerCalls, 1);
-
- table.sortDescending = true;
- assert.equal(sortColumnIndex, 0);
- assert.isTrue(sortDescending);
- assert.equal(numListenerCalls, 2);
-
- table.sortColumnIndex = 1;
- table.sortDescending = false;
- assert.equal(sortColumnIndex, 1);
- assert.isFalse(sortDescending);
- assert.equal(numListenerCalls, 4);
-
- table.sortColumnIndex = undefined;
- assert.equal(sortColumnIndex, undefined);
- assert.equal(numListenerCalls, 5);
- });
-
- test('sortingAfterExpand', function() {
- var table = document.createElement('tr-ui-b-table');
-
- var columns = [
- {
- title: 'Column',
- value: function(row) { return row.value; },
- cmp: function(rowA, rowB) {
- return rowA.value.toString().localeCompare(
- rowB.value.toString());
- }
- }
- ];
-
- var rows = [
- {
- value: 'A1',
- isExpanded: true,
- subRows: [
- {
- value: 'A1.1'
- },
- {
- value: 'A1.2',
- subRows: [
- {
- value: 'A1.2.1'
- },
- {
- value: 'A1.2.2'
- }
- ]
- },
- {
- value: 'A1.3'
- }
- ]
- },
- {
- value: 'A2'
- }
- ];
-
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- table.sortDescending = true;
- table.sortColumnIndex = 0;
- table.rebuild();
- var r0 = table.$.body.children[0];
- assert.equal(r0.rowInfo.userRow, rows[1]);
-
- var r1 = table.$.body.children[1];
- assert.equal(r1.rowInfo.userRow, rows[0]);
-
- var r2 = table.$.body.children[2];
- assert.equal(r2.rowInfo.userRow, rows[0].subRows[2]);
-
- assert.isFalse(table.$.body.hasAttribute('tabindex'));
- });
-
- function createSimpleOneColumnNestedTable() {
- var table = document.createElement('tr-ui-b-table');
-
- var columns = [
- {
- title: 'Column',
- value: function(row) { return row.value; },
- cmp: function(rowA, rowB) {
- return rowA.value.toString().localeCompare(
- rowB.value.toString());
- }
- }
- ];
-
- var rows = [
- {
- value: 'A1',
- subRows: [
- {
- value: 'A1.1'
- },
- {
- value: 'A1.2',
- subRows: [
- {
- value: 'A1.2.1'
- },
- {
- value: 'A1.2.2'
- }
- ]
- },
- {
- value: 'A1.3'
- }
- ]
- },
- {
- value: 'A2'
- }
- ];
-
- table.tableColumns = columns;
- table.tableRows = rows;
- return table;
- }
-
- function createMultiColumnNestedTable() {
- var table = document.createElement('tr-ui-b-table');
-
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.value; },
- cmp: function(rowA, rowB) {
- return rowA.value.toString().localeCompare(
- rowB.value.toString());
- },
- width: '150px',
- supportsCellSelection: false
- },
- {
- title: 'A',
- value: function(row) { return row.a; },
- width: '25%'
- },
- {
- title: 'B',
- value: function(row) { return row.b; },
- width: '25%'
- },
- {
- title: 'C',
- value: function(row) { return row.c; },
- width: '25%',
- supportsCellSelection: false
- },
- {
- title: 'D',
- value: function(row) { return row.d; },
- width: '25%'
- }
- ];
-
- var rows = [
- {
- value: 'R1',
- a: 1, b: 2, c: 3, d: 4,
- subRows: [
- {
- value: 'R1.1',
- a: 2, b: 3, c: 4, d: 1,
- },
- {
- value: 'R1.2',
- a: 3, b: 4, c: 1, d: 2,
- }
- ]
- },
- {
- value: 'R2',
- a: 3, b: 4, c: 1, d: 2
- }
- ];
-
- table.tableColumns = columns;
- table.tableRows = rows;
- return table;
- }
-
- test('expandAfterRebuild', function() {
- var table = createSimpleOneColumnNestedTable();
- table.rebuild();
- var rows = table.tableRows;
-
- this.addHTMLOutput(table);
-
- table.rebuild();
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
- table.setExpandedForTableRow(rows[0], true);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- var r1 = table.$.body.children[1];
- assert.equal(r1.rowInfo.userRow, rows[0].subRows[0]);
- });
-
- test('tableSelection', function() {
- var table = createMultiColumnNestedTable();
- var rows = table.tableRows;
-
- table.selectionMode = SelectionMode.ROW;
- table.selectedTableRow = rows[0];
- assert.isUndefined(table.selectedColumnIndex);
-
- table.setExpandedForTableRow(rows[0], true);
- table.selectedTableRow = rows[0].subRows[1];
- assert.strictEqual(table.selectedTableRow, rows[0].subRows[1]);
- assert.isUndefined(table.selectedColumnIndex);
-
- table.selectionMode = SelectionMode.CELL;
- assert.strictEqual(table.selectedTableRow, rows[0].subRows[1]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- table.setExpandedForTableRow(rows[0], false);
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- table.selectionMode = SelectionMode.NONE;
- assert.strictEqual(table.selectedTableRow, undefined);
-
- table.selectionMode = SelectionMode.ROW;
- table.setExpandedForTableRow(rows[0].subRows[1], true);
- this.addHTMLOutput(table);
-
- assert.isTrue(table.$.body.hasAttribute('tabindex'));
- });
-
-
- test('keyMovement_rows', function() {
- var table = createSimpleOneColumnNestedTable();
- table.selectionMode = SelectionMode.ROW;
- this.addHTMLOutput(table);
-
- var rows = table.tableRows;
- table.selectedTableRow = rows[0];
-
- table.performKeyCommand_('ARROW_DOWN');
- assert.equal(table.selectedTableRow, rows[1]);
-
- table.performKeyCommand_('ARROW_UP');
- assert.equal(table.selectedTableRow, rows[0]);
-
- // Enter on collapsed row should expand.
- table.selectedTableRow = rows[0];
- table.performKeyCommand_('SPACE');
- assert.equal(table.selectedTableRow, rows[0]);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('SPACE');
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- // Arrow right on collapsed row should expand.
- table.selectedTableRow = rows[0];
- table.performKeyCommand_('ARROW_RIGHT');
- assert.equal(table.selectedTableRow, rows[0].subRows[0]);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_DOWN');
- assert.equal(table.selectedTableRow, rows[0].subRows[1]);
-
- // Arrow left on collapsed item should select parent.
- table.performKeyCommand_('ARROW_LEFT');
- assert.equal(table.selectedTableRow, rows[0]);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
- // Arrow left on parent should collapse its children.
- table.performKeyCommand_('ARROW_LEFT');
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- // Arrow right on expanded row should select first child.
- table.selectedTableRow = rows[0];
- table.setExpandedForTableRow(rows[0], true);
- table.performKeyCommand_('ARROW_RIGHT');
- assert.equal(table.selectedTableRow, rows[0].subRows[0]);
-
- // Arrow right on a non-expandable row should do nothing.
- table.selectedTableRow = rows[1];
- assert.equal(table.selectedTableRow, rows[1]);
- table.performKeyCommand_('ARROW_RIGHT');
- assert.equal(table.selectedTableRow, rows[1]);
- assert.isFalse(table.getExpandedForTableRow(rows[1]));
- });
-
- test('keyMovement_cells', function() {
- var table = createMultiColumnNestedTable();
- table.selectionMode = SelectionMode.CELL;
- this.addHTMLOutput(table);
-
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- var rows = table.tableRows;
- table.selectedTableRow = rows[1];
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- table.performKeyCommand_('ARROW_LEFT');
- assert.strictEqual(table.selectedTableRow, rows[1]);
- // No-op (leftmost selectable cell already selected).
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- table.performKeyCommand_('ARROW_UP');
- // No-op (top row already selected).
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- table.performKeyCommand_('ARROW_UP');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- table.performKeyCommand_('ARROW_RIGHT');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 2);
- // Right arrow should NOT expand nested rows in cell selection mode.
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_RIGHT');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 4);
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_RIGHT');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- // No-op (rightmost selectable cell already selected).
- assert.strictEqual(table.selectedColumnIndex, 4);
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('SPACE');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 4);
- // Space on collapsed row should expand it.
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_DOWN');
- assert.strictEqual(table.selectedTableRow, rows[0].subRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 4);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_LEFT');
- // Left arrow should NOT move to parent row.
- assert.strictEqual(table.selectedTableRow, rows[0].subRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 2);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_LEFT');
- assert.strictEqual(table.selectedTableRow, rows[0].subRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_LEFT');
- assert.strictEqual(table.selectedTableRow, rows[0].subRows[0]);
- // No-op (leftmost selectable cell already selected).
- assert.strictEqual(table.selectedColumnIndex, 1);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_UP');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_LEFT');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- // No-op (leftmost selectable cell already selected).
- assert.strictEqual(table.selectedColumnIndex, 1);
- // Left arrow should NOT collapse nested rows in cell selection mode.
- assert.isTrue(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('SPACE');
- assert.strictEqual(table.selectedTableRow, rows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
- // Space on expanded row should collapse it.
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_DOWN');
- assert.strictEqual(table.selectedTableRow, rows[1]);
- assert.strictEqual(table.selectedColumnIndex, 1);
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
-
- table.performKeyCommand_('ARROW_DOWN');
- // No-op (bottom row already selected).
- assert.strictEqual(table.selectedTableRow, rows[1]);
- assert.strictEqual(table.selectedColumnIndex, 1);
- assert.isFalse(table.getExpandedForTableRow(rows[0]));
- });
-
- test('focus_empty', function() {
- var table = createSimpleOneColumnNestedTable();
- table.tableRows = [];
- table.emptyValue = 'This table is left intentionally empty';
- this.addHTMLOutput(table);
-
- assert.isFalse(table.$.body.hasAttribute('tabindex'));
- assert.isFalse(table.isFocused);
-
- for (var selectionMode of [SelectionMode.ROW, SelectionMode.CELL]) {
- table.selectionMode = selectionMode;
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually focus.
- table.focus();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually unfocus.
- table.blur();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually focus again.
- table.focus();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Unfocus via removing selection mode.
- table.selectionMode = SelectionMode.NONE;
- assert.isFalse(table.$.body.hasAttribute('tabindex'));
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
- }
-
- // Re-enable selection mode (for interactive testing).
- table.selectionMode = SelectionMode.ROW;
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
- });
-
- test('focus_rows', function() {
- var table = createSimpleOneColumnNestedTable();
- table.selectionMode = SelectionMode.ROW;
- this.addHTMLOutput(table);
-
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually focus.
- table.focus();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually unfocus.
- table.blur();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Trigger focus via clicking.
- table.$.body.children[1].children[0].click();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[1]);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Unfocus via removing selection mode.
- table.selectionMode = SelectionMode.NONE;
- assert.isFalse(table.$.body.hasAttribute('tabindex'));
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Re-enable selection mode.
- table.selectionMode = SelectionMode.ROW;
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Programatically select row (should NOT steal focus).
- table.selectedTableRow = table.tableRows[0];
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Trigger focus on the already selected row by clicking.
- table.$.body.children[0].children[0].click();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.isUndefined(table.selectedColumnIndex);
- });
-
- test('focus_cells', function() {
- var table = createMultiColumnNestedTable();
- table.selectionMode = SelectionMode.CELL;
- this.addHTMLOutput(table);
-
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually focus.
- table.focus();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- // Manually unfocus.
- table.blur();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- // Trigger focus via clicking.
- table.$.body.children[1].children[4].click();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[1]);
- assert.strictEqual(table.selectedColumnIndex, 4);
-
- // Unfocus via removing selection mode.
- table.selectionMode = SelectionMode.NONE;
- assert.isFalse(table.$.body.hasAttribute('tabindex'));
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Re-enable selection mode.
- table.selectionMode = SelectionMode.CELL;
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Clicking on an unselectable cell should NOT trigger focus.
- table.$.body.children[1].children[0].click();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Programatically select cell (should NOT steal focus).
- table.selectedTableRow = table.tableRows[0];
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
-
- // Trigger focus on the already selected cell by clicking.
- table.$.body.children[0].children[1].click();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.strictEqual(table.selectedTableRow, table.tableRows[0]);
- assert.strictEqual(table.selectedColumnIndex, 1);
- });
-
- test('focus_allCellsUnselectable', function() {
- var table = createMultiColumnNestedTable();
- table.selectionMode = SelectionMode.CELL;
- for (var c of table.tableColumns)
- c.supportsCellSelection = false;
- table.tableColumns = table.tableColumns;
- this.addHTMLOutput(table);
-
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isFalse(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Manually focus (no automatic selection).
- table.focus();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
-
- // Trigger focus via clicking (no selection).
- table.$.body.children[1].children[2].click();
- assert.strictEqual(table.$.body.getAttribute('tabindex'), '0');
- assert.isTrue(table.isFocused);
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
- });
-
- test('RightArrowKeyWhenTableSorted', function() {
- var table = createSimpleOneColumnNestedTable();
- table.selectionMode = SelectionMode.ROW;
- this.addHTMLOutput(table);
- table.sortDescending = true;
- table.sortColumnIndex = 0;
- table.rebuild();
- var rows = table.tableRows;
-
- // Arrow right should select the first child showing up on the viewer,
- // rather than first child in sub rows since sorted.
- table.selectedTableRow = rows[0];
- table.performKeyCommand_('ARROW_RIGHT');
- assert.equal(table.selectedTableRow, rows[0].subRows[2]);
- });
-
- test('reduceNumberOfColumnsAfterRebuild', function() {
- // Create a table with two columns.
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '100px'
- },
- {
- title: 'Second Column',
- value: function(row) { return row.secondData; },
- width: '100px'
- }
- ];
-
- // Build the table.
- table.rebuild();
-
- // Check that reducing the number of columns doesn't throw an exception.
- table.tableColumns = [
- {
- title: 'First Column',
- value: function(row) { return row.firstData; },
- width: '200px'
- }
- ];
- });
-
- test('rowHighlightDark', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px',
- supportsCellSelection: false
- },
- {
- title: 'Col1',
- value: function(row) { return row.b; },
- width: '33%'
- },
- {
- title: 'Col2',
- value: function(row) { return row.b * 2; },
- width: '33%'
- },
- {
- title: 'Col3',
- value: function(row) { return row.b * 3; },
- width: '33%'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.showHeader = true;
- table.rowHighlightStyle = HighlightStyle.DARK;
- table.tableColumns = columns;
- table.tableRows = [
- {
- a: 'first',
- b: '1'
- },
- {
- a: 'second',
- b: '2'
- }
- ];
- table.rebuild();
- this.addHTMLOutput(table);
- });
-
- test('cellHighlightLight', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px',
- supportsCellSelection: false
- },
- {
- title: 'Col1',
- value: function(row) { return row.b; },
- width: '33%'
- },
- {
- title: 'Col2',
- value: function(row) { return row.b * 2; },
- width: '33%'
- },
- {
- title: 'Col3',
- value: function(row) { return row.b * 3; },
- width: '33%'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.showHeader = true;
- table.cellHighlightStyle = HighlightStyle.LIGHT;
- table.tableColumns = columns;
- table.tableRows = [
- {
- a: 'first',
- b: '1'
- },
- {
- a: 'second',
- b: '2'
- }
- ];
- table.rebuild();
- this.addHTMLOutput(table);
- });
-
- test('cellSelectionBasic', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px',
- supportsCellSelection: false
- },
- {
- title: 'Col1',
- value: function(row) { return row.b; },
- width: '33%'
- },
- {
- title: 'Col2',
- value: function(row) { return row.b * 2; },
- width: '33%'
- },
- {
- title: 'Col3',
- value: function(row) { return row.b * 3; },
- width: '33%'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.showHeader = true;
- table.selectionMode = SelectionMode.CELL;
- table.rowHighlightStyle = HighlightStyle.NONE;
- table.tableColumns = columns;
- table.tableRows = [
- {
- a: 'first',
- b: '1'
- },
- {
- a: 'second',
- b: '2'
- }
- ];
- table.rebuild();
- this.addHTMLOutput(table);
-
- table.selectedTableRow = table.tableRows[0];
- assert.equal(table.selectedColumnIndex, 1);
- var selectedCell = table.selectedCell;
- assert.strictEqual(selectedCell.row, table.tableRows[0]);
- assert.strictEqual(selectedCell.column, columns[1]);
- assert.strictEqual(selectedCell.value, '1');
-
- table.performKeyCommand_('ARROW_DOWN');
- table.performKeyCommand_('ARROW_RIGHT');
- table.performKeyCommand_('ARROW_RIGHT');
- table.performKeyCommand_('ARROW_LEFT');
- assert.equal(table.selectedTableRow, table.tableRows[1]);
- assert.equal(table.selectedColumnIndex, 2);
- selectedCell = table.selectedCell;
- assert.strictEqual(selectedCell.row, table.tableRows[1]);
- assert.strictEqual(selectedCell.column, columns[2]);
- assert.strictEqual(selectedCell.value, 4);
-
- table.selectedTableRow = undefined;
- assert.isUndefined(table.selectedTableRow);
- assert.isUndefined(table.selectedColumnIndex);
- assert.isUndefined(table.selectedColumnIndex);
- assert.isUndefined(table.selectedCell);
- });
-
- test('cellSelectionNested', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px',
- supportsCellSelection: false
- },
- {
- title: 'Value',
- value: function(row) { return row.b; },
- width: '150px'
- }
- ];
-
- var rows = [
- {
- a: 'parent',
- b: '1',
- subRows: [
- {
- a: 'child',
- b: '2'
- }
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.showHeader = true;
- table.selectionMode = SelectionMode.CELL;
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
- this.addHTMLOutput(table);
-
- // Expand the parent row.
- table.setExpandedForTableRow(rows[0], true);
-
- // Select the second cell in the child row.
- table.selectedTableRow = rows[0].subRows[0];
- assert.isFalse(isSelected(table.$.body.children[0]));
- assert.isFalse(isSelected(table.$.body.children[0].children[1]));
- assert.isTrue(isSelected(table.$.body.children[1]));
- assert.isTrue(isSelected(table.$.body.children[1].children[1]));
-
- // Fold the parent row. The second cell in the parent row should be
- // automatically selected.
- table.setExpandedForTableRow(rows[0], false);
- assert.isTrue(isSelected(table.$.body.children[0]));
- assert.isTrue(isSelected(table.$.body.children[0].children[1]));
-
- // Expand the parent row again. Only the second cell of the parent row
- // should still be selected.
- table.setExpandedForTableRow(rows[0], true);
- assert.isTrue(isSelected(table.$.body.children[0]));
- assert.isTrue(isSelected(table.$.body.children[0].children[1]));
- assert.isFalse(isSelected(table.$.body.children[1]));
- assert.isFalse(isSelected(table.$.body.children[1].children[1]));
- });
-
- test('resolvedHighlightStyle', function() {
- var table = document.createElement('tr-ui-b-table');
-
- // Undefined selection mode.
- assert.strictEqual(table.resolvedRowHighlightStyle, HighlightStyle.NONE);
- assert.strictEqual(table.resolvedCellHighlightStyle, HighlightStyle.NONE);
-
- // Row selection mode.
- table.selectionMode = SelectionMode.ROW;
- assert.strictEqual(table.resolvedRowHighlightStyle, HighlightStyle.DARK);
- assert.strictEqual(table.resolvedCellHighlightStyle, HighlightStyle.NONE);
-
- // Cell selection mode.
- table.selectionMode = SelectionMode.CELL;
- assert.strictEqual(table.resolvedRowHighlightStyle, HighlightStyle.LIGHT);
- assert.strictEqual(table.resolvedCellHighlightStyle, HighlightStyle.DARK);
-
- // Explicit row highlight style.
- table.rowHighlightStyle = HighlightStyle.NONE;
- assert.strictEqual(table.resolvedRowHighlightStyle, HighlightStyle.NONE);
- assert.strictEqual(table.resolvedCellHighlightStyle, HighlightStyle.DARK);
-
- // Explicit row and cell highlight styles.
- table.cellHighlightStyle = HighlightStyle.LIGHT;
- assert.strictEqual(table.resolvedRowHighlightStyle, HighlightStyle.NONE);
- assert.strictEqual(table.resolvedCellHighlightStyle, HighlightStyle.LIGHT);
-
- // Back to default highlight styles.
- table.cellHighlightStyle = HighlightStyle.DEFAULT;
- table.rowHighlightStyle = HighlightStyle.DEFAULT;
- assert.strictEqual(table.resolvedRowHighlightStyle, HighlightStyle.LIGHT);
- assert.strictEqual(table.resolvedCellHighlightStyle, HighlightStyle.DARK);
- });
-
- test('headersWithHtmlElements', function() {
- var firstColumnTitle = document.createTextNode('First Column');
- var secondColumnTitle = document.createElement('span');
- secondColumnTitle.innerText = 'Second Column';
- secondColumnTitle.style.color = 'blue';
-
- var columns = [
- {
- title: firstColumnTitle,
- value: function(row) { return row.firstData; },
- width: '200px'
- },
- {
- title: secondColumnTitle,
- value: function(row) { return row.secondData; }
- }
- ];
-
- var rows = [
- {
- firstData: 'A1',
- secondData: 'A2'
- },
- {
- firstData: 'B1',
- secondData: 'B2'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- var firstColumnHeader = table.$.head.children[0].children[0].children[0];
- var secondColumnHeader = table.$.head.children[0].children[1].children[0];
- assert.equal(Polymer.dom(firstColumnHeader.cellTitle).textContent,
- 'First Column');
- assert.equal(Polymer.dom(secondColumnHeader.cellTitle).textContent,
- 'Second Column');
- });
-
- test('align', function() {
- var columns = [
- {
- title: 'a',
- align: ColumnAlignment.RIGHT,
- value: function(row) {
- return row.a;
- }
- }
- ];
- var rows = [{a: 1}, {a: 'long-row-so-that-alignment-would-be-visible'}];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- assert.strictEqual(
- table.$.body.children[0].children[0].style.textAlign, 'right');
- });
-
- test('subRowsPropertyName', function() {
- var columns = [
- {
- title: 'a',
- value: function(row) {
- return row.a;
- }
- }
- ];
- var rows = [
- {
- a: 1,
- isExpanded: true,
- children: [
- {a: 2}
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.subRowsPropertyName = 'children';
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- assert.equal(
- 2, Polymer.dom(table.$.body.children[1].children[0]).textContent);
- });
-
- test('shouldNotRenderUndefined', function() {
- var columns = [
- {
- title: 'Column',
- value: function(row) { return row.firstData; }
- }
- ];
-
- var rows = [
- {
- firstData: undefined,
- secondData: 'A2'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- // check that we don't have 'undefined' anywhere
- assert.isTrue(Polymer.dom(table.$.body).innerHTML.indexOf('undefined') < 0);
- });
-
- test('customizeTableRowCallback', function() {
- var columns = [
- {
- title: 'Column',
- value: function(row) { return row.data; }
- }
- ];
-
- var rows = [
- {
- data: 'data'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- var callbackCalled = false;
- table.tableColumns = columns;
- table.tableRows = rows;
- table.customizeTableRowCallback = function(userRow, trElement) {
- callbackCalled = (userRow === rows[0]);
- };
- table.rebuild();
- assert.isTrue(callbackCalled);
-
- this.addHTMLOutput(table);
-
- // The callback can also be set after the table is first built.
- table.customizeTableRowCallback = function(userRow, trElement) {
- callbackCalled = (userRow === rows[0]);
- };
-
- // Setting the customize callback should set the body dirty.
- assert.isTrue(table.bodyDirty_);
-
- callbackCalled = false;
-
- // Don't bother waiting for the timeout.
- table.rebuild();
-
- assert.isTrue(callbackCalled);
- });
-
- test('selectionEdgeCases', function() {
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = [
- {
- title: 'Column',
- value: function(row) { return row.data; },
- supportsCellSelection: false
- }
- ];
- table.tableRows = [{ data: 'body row' }];
- table.footerRows = [{ data: 'footer row' }];
- table.selectionMode = SelectionMode.ROW;
- this.addHTMLOutput(table);
-
- // Clicking on the body row should *not* throw an exception (despite the
- // column not supporting cell selection).
- table.$.body.children[0].children[0].click();
-
- // Clicking on the footer row should *not* throw an exception (despite
- // footer rows not being selectable in general).
- table.$.foot.children[0].children[0].click();
- });
-
- test('defaultExpansionStateCallback', function() {
- var columns = [
- {
- title: 'Name',
- value: function(row) { return row.name; }
- },
- {
- title: 'Value',
- value: function(row) { return row.value; }
- }
- ];
-
- var rows = [
- {
- name: 'A',
- value: 10,
- subRows: [
- {
- name: 'B',
- value: 8,
- subRows: [
- {
- name: 'C',
- value: 4
- },
- {
- name: 'D',
- value: 4
- }
- ]
- },
- {
- name: 'E',
- value: 2,
- subRows: [
- {
- name: 'F',
- value: 1
- },
- {
- name: 'G',
- value: 1
- }
- ]
- }
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- var cRow = tr.b.findDeepElementMatchingPredicate(
- table, function(element) {
- return Polymer.dom(element).textContent === 'C';
- });
- assert.equal(cRow, undefined);
-
- var callbackCalled = false;
- table.defaultExpansionStateCallback = function(row, parentRow) {
- callbackCalled = true;
-
- if (parentRow === undefined)
- return true;
-
- if (row.value >= (parentRow.value * 0.8))
- return true;
-
- return false;
- };
-
- // Setting the callback should set the body dirty.
- assert.isTrue(table.bodyDirty_);
- assert.isFalse(callbackCalled);
-
- table.rebuild();
-
- assert.isTrue(callbackCalled);
- cRow = tr.b.findDeepElementMatchingPredicate(table, function(element) {
- return Polymer.dom(element).textContent === 'C';
- });
- assert.isDefined(cRow);
- });
-
- test('sortExpanded', function() {
- var columns = [
- {
- title: 'Name',
- value: function(row) { return row.name; }
- },
- {
- title: 'Value',
- value: function(row) { return row.value; },
- cmp: function(x, y) { return x.value - y.value; }
- }
- ];
-
- var rows = [
- {
- name: 'A',
- value: 10,
- subRows: [
- {
- name: 'B',
- value: 8
- },
- {
- name: 'C',
- value: 4
- },
- ]
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- function isB(row) {
- return row.textContent === 'B';
- }
-
- // Check that 'A' row is not expanded.
- assert.isUndefined(tr.b.findDeepElementMatchingPredicate(table, isB));
-
- // Expand 'A' row.
- table.setExpandedForTableRow(rows[0], true);
-
- // Check that 'A' is expanded.
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(table, isB));
-
- // Sort by value.
- table.sortColumnIndex = 1;
-
- // Rebuild the table synchronously instead of waiting for scheduleRebuild_'s
- // setTimeout(0).
- table.rebuild();
-
- // Check that 'A' is still expanded.
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(table, isB));
- });
-
- test('shouldPreserveSortWhenColumnsChange', function() {
- var name = {
- title: 'Name',
- value: function(row) { return row.name; },
- };
-
- var count = {
- title: 'Count',
- value: function(row) { return row.count; },
- cmp: (rowA, rowB) => rowA.a - rowB.a,
- };
-
- var otherCount = {
- title: 'Count',
- value: function(row) { return row.count; },
- cmp: (rowA, rowB) => rowA.a - rowB.a,
- };
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = [count];
- table.sortColumnIndex = 0;
- table.sortDescending = true;
- table.rebuild();
-
- this.addHTMLOutput(table);
-
- table.tableColumns = [name, count];
- table.rebuild();
- assert.strictEqual(1, table.sortColumnIndex);
- assert.isTrue(table.sortDescending);
-
- table.sortDescending = false;
- table.tableColumns = [otherCount, name];
- table.rebuild();
- assert.strictEqual(0, table.sortColumnIndex);
- assert.isFalse(table.sortDescending);
-
- table.tableColumns = [name];
- table.rebuild();
- assert.isUndefined(table.sortColumnIndex);
- });
-
- test('userCanModifySortOrder', function() {
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = [
- {
- title: 'Name',
- value: row => row.name
- },
- {
- title: 'colA',
- value: row => row.a,
- cmp: (rowA, rowB) => rowA.a - rowB.a
- },
- {
- title: 'colB',
- value: row => row.b,
- cmp: (rowA, rowB) => rowA.b - rowB.b
- }
- ];
- table.tableRows = [
- {name: 'A', a: 42, b: 0},
- {name: 'B', a: 89, b: 100},
- {name: 'C', a: 65, b: -273.15}
- ];
- table.userCanModifySortOrder = false;
- table.sortColumnIndex = 2;
- table.sortDescending = true;
- table.rebuild();
- this.addHTMLOutput(table);
-
- var toggleButton = document.createElement('button');
- Polymer.dom(toggleButton).textContent =
- 'Toggle table.userCanModifySortOrder';
- toggleButton.addEventListener('click', function() {
- table.userCanModifySortOrder = !table.userCanModifySortOrder;
- });
- this.addHTMLOutput(toggleButton);
-
- var unsetButton = document.createElement('button');
- Polymer.dom(unsetButton).textContent = 'Unset sort order';
- unsetButton.addEventListener('click', function() {
- table.sortColumnIndex = undefined;
- });
- this.addHTMLOutput(unsetButton);
- });
-
- test('columnSelection', function() {
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = [
- {
- title: 'Name',
- value: (row) => row.name
- },
- {
- title: 'colA',
- selectable: true,
- value: (row) => row.a,
- cmp: (rowA, rowB) => rowA.a - rowB.a
- },
- {
- title: 'colB',
- selectable: true,
- value: (row) => row.b,
- cmp: (rowA, rowB) => rowA.b - rowB.b
- }
- ];
- table.tableRows = [
- {name: 'foo', a: 42, b: -42},
- {name: 'bar', a: 57, b: 133}
- ];
- table.rebuild();
- table.selectionMode = SelectionMode.CELL;
- this.addHTMLOutput(table);
-
- table.selectedTableColumnIndex = 1;
- var cols = tr.b.findDeepElementMatchingPredicate(table,
- e => e.tagName === 'COLGROUP').children;
- assert.isNull(cols[0].getAttribute('selected'));
- assert.strictEqual(cols[1].getAttribute('selected'), 'true');
- assert.isNull(cols[2].getAttribute('selected'));
- assert.strictEqual(1, table.selectedTableColumnIndex);
-
- table.selectedTableColumnIndex = undefined;
- cols = tr.b.findDeepElementMatchingPredicate(table,
- e => e.tagName === 'COLGROUP').children;
- assert.isNull(cols[0].getAttribute('selected'));
- assert.isNull(cols[1].getAttribute('selected'));
- assert.isNull(cols[2].getAttribute('selected'));
- assert.isUndefined(table.selectedTableColumnIndex);
-
- table.selectedTableColumnIndex = 2;
- cols = tr.b.findDeepElementMatchingPredicate(table,
- e => e.tagName === 'COLGROUP').children;
- assert.isNull(cols[0].getAttribute('selected'));
- assert.isNull(cols[1].getAttribute('selected'));
- assert.strictEqual(cols[2].getAttribute('selected'), 'true');
- assert.strictEqual(2, table.selectedTableColumnIndex);
- });
-
- test('stepInto', function() {
- var columns = [
- {
- title: 'Title',
- value: function(row) { return row.a; },
- width: '150px',
- supportsCellSelection: false
- },
- {
- title: 'Col1',
- value: function(row) { return row.b; },
- width: '33%'
- },
- {
- title: 'Col2',
- value: function(row) { return row.b * 2; },
- width: '33%'
- },
- {
- title: 'Col3',
- value: function(row) { return row.b * 3; },
- width: '33%'
- }
- ];
- var rows = [
- {
- a: 'first',
- b: '1'
- },
- {
- a: 'second',
- b: '2'
- }
- ];
-
- var table = document.createElement('tr-ui-b-table');
-
- var firedStepIntoEvents = [];
- table.addEventListener('step-into', e => firedStepIntoEvents.push(e));
-
- table.cellHighlightStyle = HighlightStyle.DARK;
- table.tableColumns = columns;
- table.tableRows = rows;
- table.rebuild();
- this.addHTMLOutput(table);
-
- assert.lengthOf(firedStepIntoEvents, 0);
-
- // Double click.
- simulateDoubleClick(table.$.body.children[0].children[1]);
- assert.lengthOf(firedStepIntoEvents, 1);
- assert.strictEqual(firedStepIntoEvents[0].tableRow, rows[0]);
- assert.strictEqual(firedStepIntoEvents[0].tableColumn, columns[1]);
- assert.strictEqual(firedStepIntoEvents[0].columnIndex, 1);
-
- simulateDoubleClick(table.$.body.children[1].children[3]);
- assert.lengthOf(firedStepIntoEvents, 2);
- assert.strictEqual(firedStepIntoEvents[1].tableRow, rows[1]);
- assert.strictEqual(firedStepIntoEvents[1].tableColumn, columns[3]);
- assert.strictEqual(firedStepIntoEvents[1].columnIndex, 3);
-
- // Shift+Enter in cell selection mode.
- table.selectionMode = SelectionMode.CELL;
- table.selectedTableRow = rows[0];
- table.selectedColumnIndex = 2;
- table.performKeyCommand_('ENTER');
- assert.lengthOf(firedStepIntoEvents, 3);
- assert.strictEqual(firedStepIntoEvents[2].tableRow, rows[0]);
- assert.strictEqual(firedStepIntoEvents[2].tableColumn, columns[2]);
- assert.strictEqual(firedStepIntoEvents[2].columnIndex, 2);
-
- // Shift+Enter in row selection mode.
- table.selectionMode = SelectionMode.ROW;
- table.selectedTableRow = rows[1];
- table.performKeyCommand_('ENTER');
- assert.lengthOf(firedStepIntoEvents, 4);
- assert.strictEqual(firedStepIntoEvents[3].tableRow, rows[1]);
- assert.isUndefined(firedStepIntoEvents[3].tableColumn);
- assert.isUndefined(firedStepIntoEvents[3].columnIndex);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool.html b/chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool.html
deleted file mode 100644
index 85ca3e440ab..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool.html
+++ /dev/null
@@ -1,322 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/slice.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the TimingTool class.
- */
-tr.exportTo('tr.ui.b', function() {
-
- /**
- * Tool for taking time measurements in the TimelineTrackView using
- * Viewportmarkers.
- * @constructor
- */
- function TimingTool(viewport, targetElement) {
- this.viewport_ = viewport;
-
- // Prepare the event handlers to be added and removed repeatedly.
- this.onMouseMove_ = this.onMouseMove_.bind(this);
- this.onDblClick_ = this.onDblClick_.bind(this);
- this.targetElement_ = targetElement;
-
- // Valid only during mousedown.
- this.isMovingLeftEdge_ = false;
- }
-
- TimingTool.prototype = {
-
- onEnterTiming: function(e) {
- this.targetElement_.addEventListener('mousemove', this.onMouseMove_);
- this.targetElement_.addEventListener('dblclick', this.onDblClick_);
- },
-
- onBeginTiming: function(e) {
- if (!this.isTouchPointInsideTrackBounds_(e.clientX, e.clientY))
- return;
-
- var pt = this.getSnappedToEventPosition_(e);
- this.mouseDownAt_(pt.x, pt.y);
-
- this.updateSnapIndicators_(pt);
- },
-
- updateSnapIndicators_: function(pt) {
- if (!pt.snapped)
- return;
- var ir = this.viewport_.interestRange;
- if (ir.min === pt.x)
- ir.leftSnapIndicator = new tr.ui.SnapIndicator(pt.y, pt.height);
- if (ir.max === pt.x)
- ir.rightSnapIndicator = new tr.ui.SnapIndicator(pt.y, pt.height);
- },
-
- onUpdateTiming: function(e) {
- var pt = this.getSnappedToEventPosition_(e);
- this.mouseMoveAt_(pt.x, pt.y, true);
- this.updateSnapIndicators_(pt);
- },
-
- onEndTiming: function(e) {
- this.mouseUp_();
- },
-
- onExitTiming: function(e) {
- this.targetElement_.removeEventListener('mousemove', this.onMouseMove_);
- this.targetElement_.removeEventListener('dblclick', this.onDblClick_);
- },
-
- onMouseMove_: function(e) {
- if (e.button)
- return;
- var worldX = this.getWorldXFromEvent_(e);
- this.mouseMoveAt_(worldX, e.clientY, false);
- },
-
- onDblClick_: function(e) {
- // TODO(nduca): Implement dobuleclicking.
- console.error('not implemented');
- },
-
- ////////////////////////////////////////////////////////////////////////////
-
- isTouchPointInsideTrackBounds_: function(clientX, clientY) {
- if (!this.viewport_ ||
- !this.viewport_.modelTrackContainer ||
- !this.viewport_.modelTrackContainer.canvas)
- return false;
-
- var canvas = this.viewport_.modelTrackContainer.canvas;
- var canvasRect = canvas.getBoundingClientRect();
- if (clientX >= canvasRect.left && clientX <= canvasRect.right &&
- clientY >= canvasRect.top && clientY <= canvasRect.bottom)
- return true;
-
- return false;
- },
-
- mouseDownAt_: function(worldX, y) {
- var ir = this.viewport_.interestRange;
- var dt = this.viewport_.currentDisplayTransform;
-
- var pixelRatio = window.devicePixelRatio || 1;
- var nearnessThresholdWorld = dt.xViewVectorToWorld(6 * pixelRatio);
-
- if (ir.isEmpty) {
- ir.setMinAndMax(worldX, worldX);
- ir.rightSelected = true;
- this.isMovingLeftEdge_ = false;
- return;
- }
-
-
- // Left edge test.
- if (Math.abs(worldX - ir.min) < nearnessThresholdWorld) {
- ir.leftSelected = true;
- ir.min = worldX;
- this.isMovingLeftEdge_ = true;
- return;
- }
-
- // Right edge test.
- if (Math.abs(worldX - ir.max) < nearnessThresholdWorld) {
- ir.rightSelected = true;
- ir.max = worldX;
- this.isMovingLeftEdge_ = false;
- return;
- }
-
- ir.setMinAndMax(worldX, worldX);
- ir.rightSelected = true;
- this.isMovingLeftEdge_ = false;
- },
-
- mouseMoveAt_: function(worldX, y, mouseDown) {
- var ir = this.viewport_.interestRange;
-
- if (mouseDown) {
- this.updateMovingEdge_(worldX);
- return;
- }
-
- var ir = this.viewport_.interestRange;
- var dt = this.viewport_.currentDisplayTransform;
-
- var pixelRatio = window.devicePixelRatio || 1;
- var nearnessThresholdWorld = dt.xViewVectorToWorld(6 * pixelRatio);
-
- // Left edge test.
- if (Math.abs(worldX - ir.min) < nearnessThresholdWorld) {
- ir.leftSelected = true;
- ir.rightSelected = false;
- return;
- }
-
- // Right edge test.
- if (Math.abs(worldX - ir.max) < nearnessThresholdWorld) {
- ir.leftSelected = false;
- ir.rightSelected = true;
- return;
- }
-
- ir.leftSelected = false;
- ir.rightSelected = false;
- return;
- },
-
- updateMovingEdge_: function(newWorldX) {
- var ir = this.viewport_.interestRange;
- var a = ir.min;
- var b = ir.max;
- if (this.isMovingLeftEdge_)
- a = newWorldX;
- else
- b = newWorldX;
-
- if (a <= b)
- ir.setMinAndMax(a, b);
- else
- ir.setMinAndMax(b, a);
-
- if (ir.min === newWorldX) {
- this.isMovingLeftEdge_ = true;
- ir.leftSelected = true;
- ir.rightSelected = false;
- } else {
- this.isMovingLeftEdge_ = false;
- ir.leftSelected = false;
- ir.rightSelected = true;
- }
- },
-
- mouseUp_: function() {
- var dt = this.viewport_.currentDisplayTransform;
- var ir = this.viewport_.interestRange;
-
- ir.leftSelected = false;
- ir.rightSelected = false;
-
- var pixelRatio = window.devicePixelRatio || 1;
- var minWidthValue = dt.xViewVectorToWorld(2 * pixelRatio);
- if (ir.range < minWidthValue)
- ir.reset();
- },
-
- getWorldXFromEvent_: function(e) {
- var pixelRatio = window.devicePixelRatio || 1;
- var canvas = this.viewport_.modelTrackContainer.canvas;
- var worldOffset = canvas.getBoundingClientRect().left;
- var viewX = (e.clientX - worldOffset) * pixelRatio;
- return this.viewport_.currentDisplayTransform.xViewToWorld(viewX);
- },
-
-
- /**
- * Get the closest position of an event within a vertical range of the mouse
- * position if possible, otherwise use the position of the mouse pointer.
- * @param {MouseEvent} e Mouse event with the current mouse coordinates.
- * @return {
- * {Number} x, The x coordinate in world space.
- * {Number} y, The y coordinate in world space.
- * {Number} height, The height of the event.
- * {boolean} snapped Whether the coordinates are from a snapped event or
- * the mouse position.
- * }
- */
- getSnappedToEventPosition_: function(e) {
- var pixelRatio = window.devicePixelRatio || 1;
- var EVENT_SNAP_RANGE = 16 * pixelRatio;
-
- var modelTrackContainer = this.viewport_.modelTrackContainer;
- var modelTrackContainerRect = modelTrackContainer.getBoundingClientRect();
-
- var viewport = this.viewport_;
- var dt = viewport.currentDisplayTransform;
- var worldMaxDist = dt.xViewVectorToWorld(EVENT_SNAP_RANGE);
-
- var worldX = this.getWorldXFromEvent_(e);
- var mouseY = e.clientY;
-
- var selection = new tr.model.EventSet();
-
- // Look at the track under mouse position first for better performance.
- modelTrackContainer.addClosestEventToSelection(
- worldX, worldMaxDist, mouseY, mouseY, selection);
-
- // Look at all tracks visible on screen.
- if (!selection.length) {
- modelTrackContainer.addClosestEventToSelection(
- worldX, worldMaxDist,
- modelTrackContainerRect.top, modelTrackContainerRect.bottom,
- selection);
- }
-
- var minDistX = worldMaxDist;
- var minDistY = Infinity;
- var pixWidth = dt.xViewVectorToWorld(1);
-
- // Create result object with the mouse coordinates.
- var result = {
- x: worldX,
- y: mouseY - modelTrackContainerRect.top,
- height: 0,
- snapped: false
- };
-
- var eventBounds = new tr.b.Range();
- for (var event of selection) {
- var track = viewport.trackForEvent(event);
- var trackRect = track.getBoundingClientRect();
-
- eventBounds.reset();
- event.addBoundsToRange(eventBounds);
- var eventX;
- if (Math.abs(eventBounds.min - worldX) <
- Math.abs(eventBounds.max - worldX)) {
- eventX = eventBounds.min;
- } else {
- eventX = eventBounds.max;
- }
-
- var distX = eventX - worldX;
-
- var eventY = trackRect.top;
- var eventHeight = trackRect.height;
- var distY = Math.abs(eventY + eventHeight / 2 - mouseY);
-
- // Prefer events with a closer y position if their x difference is below
- // the width of a pixel.
- if ((distX <= minDistX || Math.abs(distX - minDistX) < pixWidth) &&
- distY < minDistY) {
- minDistX = distX;
- minDistY = distY;
-
- // Retrieve the event position from the hit.
- result.x = eventX;
- result.y = eventY +
- modelTrackContainer.scrollTop - modelTrackContainerRect.top;
- result.height = eventHeight;
- result.snapped = true;
- }
- }
-
- return result;
- }
- };
-
- return {
- TimingTool: TimingTool
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool_test.html
deleted file mode 100644
index 91e630b945a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/timing_tool_test.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/base/timing_tool.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function create100PxWideViewportInto10WideWorld() {
- var vp = new tr.ui.TimelineViewport(document.createElement('div'));
- var tempDisplayTransform = new tr.ui.TimelineDisplayTransform();
- tempDisplayTransform.xSetWorldBounds(0, 10, 100);
- vp.setDisplayTransformImmediately(tempDisplayTransform);
-
- assert.equal(vp.currentDisplayTransform.xViewToWorld(0), 0);
- assert.equal(vp.currentDisplayTransform.xViewToWorld(100), 10);
-
- return vp;
- }
-
- test('dragLeftInterestRegion', function() {
- var vp = create100PxWideViewportInto10WideWorld();
- vp.interestRange.min = 1;
- vp.interestRange.max = 9;
- var tool = new tr.ui.b.TimingTool(vp);
-
- tool.mouseDownAt_(1.1, 0);
- assert.isTrue(vp.interestRange.leftSelected);
- tool.mouseMoveAt_(1.5, 0, true);
- assert.equal(vp.interestRange.min, 1.5);
- tool.mouseUp_();
- assert.equal(vp.interestRange.min, 1.5);
- assert.isFalse(vp.interestRange.leftSelected);
- });
-
- test('dragRightInterestRegion', function() {
- var vp = create100PxWideViewportInto10WideWorld();
- vp.interestRange.min = 1;
- vp.interestRange.max = 9;
- var tool = new tr.ui.b.TimingTool(vp);
-
- tool.mouseDownAt_(9.1, 0);
- assert.isTrue(vp.interestRange.rightSelected);
- tool.mouseMoveAt_(8, 0, true);
- assert.equal(vp.interestRange.max, 8);
- tool.mouseUp_();
- assert.equal(vp.interestRange.max, 8);
- assert.isFalse(vp.interestRange.leftSelected);
- });
-
- test('dragInNewSpace', function() {
- var vp = create100PxWideViewportInto10WideWorld();
- vp.interestRange.min = 1;
- vp.interestRange.max = 9;
- var tool = new tr.ui.b.TimingTool(vp);
-
- tool.mouseDownAt_(5, 0);
- assert.isTrue(vp.interestRange.rightSelected);
- assert.equal(vp.interestRange.min, 5);
- assert.equal(vp.interestRange.max, 5);
- tool.mouseMoveAt_(4, 0, true);
- assert.equal(vp.interestRange.min, 4);
- assert.equal(vp.interestRange.max, 5);
- assert.isTrue(vp.interestRange.leftSelected);
- tool.mouseUp_();
- assert.equal(vp.interestRange.min, 4);
- assert.isFalse(vp.interestRange.leftSelected);
- assert.isFalse(vp.interestRange.rightSelected);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/tool_button.css b/chromium/third_party/catapult/tracing/tracing/ui/base/tool_button.css
deleted file mode 100644
index 1c5ae4170c0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/tool_button.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ .tool-button {
- background-position: center center;
- background-repeat: no-repeat;
- border-bottom: 1px solid #BCBCBC;
- border-top: 1px solid #F1F1F1;
- cursor: pointer;
- height: 30px;
-}
-
-* /deep/ .tool-button.active {
- cursor: auto;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button.html b/chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button.html
deleted file mode 100644
index 74b7774255a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-</script>
-<dom-module id='tr-ui-b-toolbar-button'>
- <template>
- <style>
- :host {
- display: flex;
- background-color: #f8f8f8;
- border: 1px solid rgba(0, 0, 0, 0.5);
- color: rgba(0,0,0,0.8);
- justify-content: center;
- align-self: stretch;
- min-width: 23px;
- }
-
- :host(:hover) {
- background-color: rgba(255, 255, 255, 1.0);
- border-color: rgba(0, 0, 0, 0.8);
- box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
- color: rgba(0, 0, 0, 1);
- }
-
- #aligner {
- display: flex;
- flex: 0 0 auto;
- align-self: center;
- }
- </style>
- <div id="aligner">
- <content></content>
- </div>
- </template>
-</dom-module>
-<script>
- 'use strict';
- Polymer({ is: 'tr-ui-b-toolbar-button' });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button_test.html
deleted file mode 100644
index 25d2dfe85a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/toolbar_button_test.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/toolbar_button.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('tallWithTextContent', function() {
- var el = document.createElement('tr-ui-b-toolbar-button');
- el.style.width = '100px';
- el.style.height = '40px';
-
- Polymer.dom(el).textContent = 'blahblah';
-
- this.addHTMLOutput(el);
- });
-
- test('tallWithInnerSpan', function() {
- var el = document.createElement('tr-ui-b-toolbar-button');
- el.style.width = '100px';
- el.style.height = '40px';
-
- Polymer.dom(el).appendChild(tr.ui.b.createSpan({textContent: 'blahblah'}));
-
- this.addHTMLOutput(el);
- });
-
- test('puny', function() {
- var el = document.createElement('tr-ui-b-toolbar-button');
- Polymer.dom(el).textContent = 'M';
- this.addHTMLOutput(el);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/ui.html b/chromium/third_party/catapult/tracing/tracing/ui/base/ui.html
deleted file mode 100644
index 8e27b45ecea..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/ui.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
-
- /**
- * Decorates elements as an instance of a class.
- * @param {string|!Element} source The way to find the element(s) to decorate.
- * If this is a string then {@code querySeletorAll} is used to find the
- * elements to decorate.
- * @param {!Function} constr The constructor to decorate with. The constr
- * needs to have a {@code decorate} function.
- */
- function decorate(source, constr) {
- var elements;
- if (typeof source === 'string')
- elements = Polymer.dom(tr.doc).querySelectorAll(source);
- else
- elements = [source];
-
- for (var i = 0, el; el = elements[i]; i++) {
- if (!(el instanceof constr))
- constr.decorate(el);
- }
- }
-
- /**
- * Defines a tracing UI component, a function that can be called to construct
- * the component.
- *
- * tr class:
- * var List = tr.ui.b.define('list');
- * List.prototype = {
- * __proto__: HTMLUListElement.prototype,
- * decorate: function() {
- * ...
- * },
- * ...
- * };
- *
- * Derived class:
- * var CustomList = tr.ui.b.define('custom-list', List);
- * CustomList.prototype = {
- * __proto__: List.prototype,
- * decorate: function() {
- * ...
- * },
- * ...
- * };
- *
- * @param {string} className The className of the newly created subtype. If
- * subclassing by passing in opt_parentConstructor, this is used for
- * debugging. If not subclassing, then it is the tag name that will be
- * created by the component.
-
- * @param {function=} opt_parentConstructor The parent class for this new
- * element, if subclassing is desired. If provided, the parent class must
- * be also a function created by tr.ui.b.define.
- *
- * @param {string=} opt_tagNS The namespace in which to create the base
- * element. Has no meaning when opt_parentConstructor is passed and must
- * either be undefined or the same namespace as the parent class.
- *
- * @return {function(Object=):Element} The newly created component
- * constructor.
- */
- function define(className, opt_parentConstructor, opt_tagNS) {
- if (typeof className === 'function') {
- throw new Error('Passing functions as className is deprecated. Please ' +
- 'use (className, opt_parentConstructor) to subclass');
- }
-
- var className = className.toLowerCase();
- if (opt_parentConstructor && !opt_parentConstructor.tagName)
- throw new Error('opt_parentConstructor was not ' +
- 'created by tr.ui.b.define');
-
- // Walk up the parent constructors until we can find the type of tag
- // to create.
- var tagName = className;
- var tagNS = undefined;
- if (opt_parentConstructor) {
- if (opt_tagNS)
- throw new Error('Must not specify tagNS if parentConstructor is given');
- var parent = opt_parentConstructor;
- while (parent && parent.tagName) {
- tagName = parent.tagName;
- tagNS = parent.tagNS;
- parent = parent.parentConstructor;
- }
- } else {
- tagNS = opt_tagNS;
- }
-
- /**
- * Creates a new UI element constructor.
- * Arguments passed to the constuctor are provided to the decorate method.
- * You will need to call the parent elements decorate method from within
- * your decorate method and pass any required parameters.
- * @constructor
- */
- function f() {
- if (opt_parentConstructor &&
- f.prototype.__proto__ !== opt_parentConstructor.prototype) {
- throw new Error(
- className + ' prototye\'s __proto__ field is messed up. ' +
- 'It MUST be the prototype of ' + opt_parentConstructor.tagName);
- }
-
- var el;
- if (tagNS === undefined)
- el = tr.doc.createElement(tagName);
- else
- el = tr.doc.createElementNS(tagNS, tagName);
- f.decorate.call(this, el, arguments);
- return el;
- }
-
- /**
- * Decorates an element as a UI element class.
- * @param {!Element} el The element to decorate.
- */
- f.decorate = function(el) {
- el.__proto__ = f.prototype;
- el.decorate.apply(el, arguments[1]);
- el.constructor = f;
- };
-
- f.className = className;
- f.tagName = tagName;
- f.tagNS = tagNS;
- f.parentConstructor = (opt_parentConstructor ? opt_parentConstructor :
- undefined);
- f.toString = function() {
- if (!f.parentConstructor)
- return f.tagName;
- return f.parentConstructor.toString() + '::' + f.className;
- };
-
- return f;
- }
-
- function elementIsChildOf(el, potentialParent) {
- if (el === potentialParent)
- return false;
-
- var cur = el;
- while (Polymer.dom(cur).parentNode) {
- if (cur === potentialParent)
- return true;
- cur = Polymer.dom(cur).parentNode;
- }
- return false;
- }
-
- return {
- decorate: decorate,
- define: define,
- elementIsChildOf: elementIsChildOf
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/ui_state.html b/chromium/third_party/catapult/tracing/tracing/ui/base/ui_state.html
deleted file mode 100644
index eb515ddf15c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/ui_state.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/location.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var Location = tr.model.Location;
-
- /**
- * UIState is a class that represents the current state of the timeline by
- * the Location of the point of interest and the current scaleX of the
- * timeline.
- *
- * @constructor
- */
- function UIState(location, scaleX) {
- this.location_ = location;
- this.scaleX_ = scaleX;
- };
-
- /**
- * Accepts a UIState string in the format of (timestamp)@(stableID)x(scaleX)
- * Returns undefined if string is not in this format, or throws an Error if
- * variables in a syntactically-correct stateString does not produce a valid
- * UIState. Otherwise returns a constructed UIState instance.
- */
- UIState.fromUserFriendlyString = function(model, viewport, stateString) {
- var navByFinderPattern = /^(-?\d+(\.\d+)?)@(.+)x(\d+(\.\d+)?)$/g;
- var match = navByFinderPattern.exec(stateString);
- if (!match)
- return;
-
- var timestamp = parseFloat(match[1]);
- var stableId = match[3];
- var scaleX = parseFloat(match[4]);
-
- if (scaleX <= 0)
- throw new Error('Invalid ScaleX value in UI State string.');
-
- if (!viewport.containerToTrackMap.getTrackByStableId(stableId))
- throw new Error('Invalid StableID given in UI State String.');
-
- var loc = tr.model.Location.fromStableIdAndTimestamp(
- viewport, stableId, timestamp);
- return new UIState(loc, scaleX);
- }
-
- UIState.prototype = {
-
- get location() {
- return this.location_;
- },
-
- get scaleX() {
- return this.scaleX_;
- },
-
- toUserFriendlyString: function(viewport) {
- var timestamp = this.location_.xWorld;
- var stableId =
- this.location_.getContainingTrack(viewport).eventContainer.stableId;
- var scaleX = this.scaleX_;
- return timestamp.toFixed(5) + '@' + stableId + 'x' + scaleX.toFixed(5);
- },
-
- toDict: function() {
- return {
- location: this.location_.toDict(),
- scaleX: this.scaleX_
- };
- }
- };
-
- return {
- UIState: UIState
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/ui_state_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/ui_state_test.html
deleted file mode 100644
index 91ee74eda1a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/ui_state_test.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-<link rel="import" href="/tracing/ui/base/ui_state.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var UIState = tr.ui.b.UIState;
-
- function FakeModel() {
- this.processes = { 1: { threads: { 2: { stableId: '1.2' } } } };
- }
-
- // FakeTrack needs to be an instance of tr.ui.tracks.Track because a
- // location is constructed in terms of Track instances.
- function FakeTrack() { }
- FakeTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- get eventContainer() {
- return { stableId: '1.2' };
- },
-
- getBoundingClientRect: function() {
- return { top: 5, height: 2 };
- },
-
- get parentElement() {
- return null;
- }
- };
-
- function FakeViewPort() {
- this.containerToTrackMap = {
- // "1.2" is the only valid stableId this test function accepts.
- getTrackByStableId: function(stableId) {
- if (stableId === '1.2')
- return new FakeTrack;
- return undefined;
- }
- };
- }
-
- test('invalidStableId', function() {
- var model = new FakeModel;
- var vp = new FakeViewPort;
- assert.throws(function() {
- UIState.fromUserFriendlyString(model, vp, '15@1.3x6');
- });
- assert.throws(function() {
- UIState.fromUserFriendlyString(model, vp, '15@2.2x6');
- });
- assert.throws(function() {
- UIState.fromUserFriendlyString(model, vp, '505@1.x5');
- });
- });
-
- test('invalidScaleX', function() {
- var model = new FakeModel;
- var vp = new FakeViewPort;
- assert.isUndefined(UIState.fromUserFriendlyString(model, vp, '1@1.2x-1'));
- assert.throws(function() {
- UIState.fromUserFriendlyString(model, vp, '1@1.2x0');
- });
- });
-
- test('invalidSyntax', function() {
- var model = new FakeModel;
- var vp = new FakeViewPort;
- assert.isUndefined(UIState.fromUserFriendlyString(model, vp, '5'));
- assert.isUndefined(UIState.fromUserFriendlyString(model, vp, '5@x5'));
- assert.isUndefined(UIState.fromUserFriendlyString(model, vp, 'ab@1.2x5'));
- });
-
- test('validString', function() {
- var model = new FakeModel;
- var vp = new FakeViewPort;
- var str = '-50125.51231@1.2x1.12345';
- var uiState = UIState.fromUserFriendlyString(model, vp, str);
-
- assert.isDefined(uiState);
- assert.equal(uiState.location.xWorld, -50125.51231);
- assert.equal(
- uiState.location.getContainingTrack(vp).eventContainer.stableId,
- '1.2');
- assert.equal(uiState.scaleX, 1.12345);
-
- assert.equal(uiState.toUserFriendlyString(vp), str);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/ui_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/ui_test.html
deleted file mode 100644
index 4cace3aa243..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/ui_test.html
+++ /dev/null
@@ -1,245 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestElement = tr.ui.b.define('div');
- TestElement.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- if (!this.decorateCallCount)
- this.decorateCallCount = 0;
- this.decorateCallCount++;
- }
- };
-
- var Base = tr.ui.b.define('div');
- Base.prototype = {
- __proto__: HTMLDivElement.prototype,
- decorate: function() {
- this.decoratedAsBase = true;
- },
- set baseProperty(v) {
- this.basePropertySet = v;
- }
- };
-
- test('decorateOnceViaNew', function() {
- var testElement = new TestElement();
- assert.equal(testElement.decorateCallCount, 1);
- });
-
- test('decorateOnceDirectly', function() {
- var testElement = document.createElement('div');
- tr.ui.b.decorate(testElement, TestElement);
- assert.equal(testElement.decorateCallCount, 1);
- });
-
- test('componentToString', function() {
- assert.equal(Base.toString(), 'div');
-
- var Sub = tr.ui.b.define('Sub', Base);
- assert.equal(Sub.toString(), 'div::sub');
-
- var SubSub = tr.ui.b.define('Marine', Sub);
- assert.equal(SubSub.toString(), 'div::sub::marine');
- });
-
- test('basicDefines', function() {
- var baseInstance = new Base();
- assert.instanceOf(baseInstance, Base);
- assert.isTrue(baseInstance.decoratedAsBase);
-
- assert.equal(baseInstance.constructor, Base);
- assert.equal(baseInstance.constructor.toString(), 'div');
-
- baseInstance.basePropertySet = 7;
- assert.equal(baseInstance.basePropertySet, 7);
- });
-
- test('subclassing', function() {
- var Sub = tr.ui.b.define('sub', Base);
- Sub.prototype = {
- __proto__: Base.prototype,
- decorate: function() {
- this.decoratedAsSub = true;
- }
- };
-
- var subInstance = new Sub();
- assert.instanceOf(subInstance, Sub);
- assert.isTrue(subInstance.decoratedAsSub);
-
- assert.instanceOf(subInstance, Base);
- assert.isUndefined(subInstance.decoratedAsBase);
-
- assert.equal(subInstance.constructor, Sub);
- assert.equal(subInstance.constructor.toString(), 'div::sub');
-
- subInstance.baseProperty = true;
- assert.isTrue(subInstance.basePropertySet);
- });
-
- var NoArgs = tr.ui.b.define('div');
- NoArgs.prototype = {
- __proto__: HTMLDivElement.prototype,
- decorate: function() {
- this.noArgsDecorated_ = true;
- },
- get noArgsDecorated() {
- return this.noArgsDecorated_;
- }
- };
-
- var Args = tr.ui.b.define('args', NoArgs);
- Args.prototype = {
- __proto__: NoArgs.prototype,
- decorate: function(first) {
- this.first_ = first;
- this.argsDecorated_ = true;
- },
- get first() {
- return this.first_;
- },
- get argsDecorated() {
- return this.argsDecorated_;
- }
- };
-
- var ArgsChild = tr.ui.b.define('args-child', Args);
- ArgsChild.prototype = {
- __proto__: Args.prototype,
- decorate: function(_, second) {
- this.second_ = second;
- this.argsChildDecorated_ = true;
- },
- get second() {
- return this.second_;
- },
- get decorated() {
- return this.decorated_;
- },
- get argsChildDecorated() {
- return this.argsChildDecorated_ = true;
- }
- };
-
- var ArgsDecoratingChild = tr.ui.b.define('args-decorating-child', Args);
- ArgsDecoratingChild.prototype = {
- __proto__: Args.prototype,
- decorate: function(first, second) {
- Args.prototype.decorate.call(this, first);
- this.second_ = second;
- this.argsDecoratingChildDecorated_ = true;
- },
- get second() {
- return this.second_;
- },
- get decorated() {
- return this.decorated_;
- },
- get argsDecoratingChildDecorated() {
- return this.argsChildDecorated_ = true;
- }
- };
-
- test('decorate_noArguments', function() {
- var noArgs;
- assert.doesNotThrow(function() {
- noArgs = new NoArgs();
- });
- assert.isTrue(noArgs.noArgsDecorated);
- });
-
- test('decorate_arguments', function() {
- var args = new Args('this is first');
- assert.equal(args.first, 'this is first');
- assert.isTrue(args.argsDecorated);
- assert.isUndefined(args.noArgsDecorated);
- });
-
- test('decorate_subclassArguments', function() {
- var argsChild = new ArgsChild('this is first', 'and second');
- assert.isUndefined(argsChild.first);
- assert.equal(argsChild.second, 'and second');
-
- assert.isTrue(argsChild.argsChildDecorated);
- assert.isUndefined(argsChild.argsDecorated);
- assert.isUndefined(argsChild.noArgsDecorated);
- });
-
- test('decorate_subClassCallsParentDecorate', function() {
- var argsDecoratingChild = new ArgsDecoratingChild(
- 'this is first', 'and second');
- assert.equal(argsDecoratingChild.first, 'this is first');
- assert.equal(argsDecoratingChild.second, 'and second');
- assert.isTrue(argsDecoratingChild.argsDecoratingChildDecorated);
- assert.isTrue(argsDecoratingChild.argsDecorated);
- assert.isUndefined(argsDecoratingChild.noArgsDecorated);
- });
-
- test('defineWithNamespace', function() {
- var svgNS = 'http://www.w3.org/2000/svg';
- var cls = tr.ui.b.define('svg', undefined, svgNS);
- cls.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- Polymer.dom(this).setAttribute('width', 200);
- Polymer.dom(this).setAttribute('height', 200);
- Polymer.dom(this).setAttribute('viewPort', '0 0 200 200');
- var rectEl = document.createElementNS(svgNS, 'rect');
- Polymer.dom(rectEl).setAttribute('x', 10);
- Polymer.dom(rectEl).setAttribute('y', 10);
- Polymer.dom(rectEl).setAttribute('width', 180);
- Polymer.dom(rectEl).setAttribute('height', 180);
- Polymer.dom(this).appendChild(rectEl);
- }
- };
- var el = new cls();
- assert.equal(el.tagName, 'svg');
- assert.equal(el.namespaceURI, svgNS);
- this.addHTMLOutput(el);
- });
-
- test('defineSubclassWithNamespace', function() {
- var svgNS = 'http://www.w3.org/2000/svg';
- var cls = tr.ui.b.define('svg', undefined, svgNS);
- cls.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- Polymer.dom(this).setAttribute('width', 200);
- Polymer.dom(this).setAttribute('height', 200);
- Polymer.dom(this).setAttribute('viewPort', '0 0 200 200');
- var rectEl = document.createElementNS(svgNS, 'rect');
- Polymer.dom(rectEl).setAttribute('x', 10);
- Polymer.dom(rectEl).setAttribute('y', 10);
- Polymer.dom(rectEl).setAttribute('width', 180);
- Polymer.dom(rectEl).setAttribute('height', 180);
- Polymer.dom(this).appendChild(rectEl);
- }
- };
-
- var subCls = tr.ui.b.define('sub', cls);
- subCls.prototype = {
- __proto__: cls.prototype
- };
- assert.equal(subCls.toString(), 'svg::sub');
-
- var el = new subCls();
- this.addHTMLOutput(el);
- assert.equal(el.tagName, 'svg');
- assert.equal(el.namespaceURI, svgNS);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/utils.html b/chromium/third_party/catapult/tracing/tracing/ui/base/utils.html
deleted file mode 100644
index cdb9ab36570..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/utils.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/rect.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- function instantiateTemplate(selector, doc) {
- doc = doc || document;
- var el = Polymer.dom(doc).querySelector(selector);
- if (!el)
- throw new Error('Element not found');
- return doc.importNode(el.content, true);
-// return el.createInstance();
- }
-
- function windowRectForElement(element) {
- var position = [element.offsetLeft, element.offsetTop];
- var size = [element.offsetWidth, element.offsetHeight];
- var node = element.offsetParent;
- while (node) {
- position[0] += node.offsetLeft;
- position[1] += node.offsetTop;
- node = node.offsetParent;
- }
- return tr.b.Rect.fromXYWH(position[0], position[1], size[0], size[1]);
- }
-
- function scrollIntoViewIfNeeded(el) {
- var pr = el.parentElement.getBoundingClientRect();
- var cr = el.getBoundingClientRect();
- if (cr.top < pr.top) {
- el.scrollIntoView(true);
- } else if (cr.bottom > pr.bottom) {
- el.scrollIntoView(false);
- }
- }
-
- function extractUrlString(url) {
- var extracted = url.replace(/url\((.*)\)/, '$1');
-
- // In newer versions of chrome, the contents of url() will be quoted. Remove
- // these quotes as well. If quotes are not present, match will fail and this
- // becomes a no-op.
- extracted = extracted.replace(/\"(.*)\"/, '$1');
-
- return extracted;
- }
-
- function toThreeDigitLocaleString(value) {
- return value.toLocaleString(
- undefined, {minimumFractionDigits: 3, maximumFractionDigits: 3});
- }
-
- /**
- * Returns true if |name| is the name of an unknown HTML element. Registered
- * polymer elements are known, so this returns false. Typos of registered
- * polymer element names are unknown, so this returns true for typos.
- *
- * @return {boolean}
- */
- function isUnknownElementName(name) {
- return document.createElement(name) instanceof HTMLUnknownElement;
- }
-
- return {
- isUnknownElementName: isUnknownElementName,
- toThreeDigitLocaleString: toThreeDigitLocaleString,
- instantiateTemplate: instantiateTemplate,
- windowRectForElement: windowRectForElement,
- scrollIntoViewIfNeeded: scrollIntoViewIfNeeded,
- extractUrlString: extractUrlString
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/base/utils_test.html b/chromium/third_party/catapult/tracing/tracing/ui/base/utils_test.html
deleted file mode 100644
index f24cd2be811..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/base/utils_test.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<dom-module id='instantiate-template-polymer-element-test'>
- <template></template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'instantiate-template-polymer-element-test',
- testProperty: 'Test'
-});
-</script>
-<template id="instantiate-template-polymer-test">
- <instantiate-template-polymer-element-test>
- </instantiate-template-polymer-element-test>
-</template>
-
-<template id="multiple-template-test">
- <template>
- <instantiate-template-polymer-element-test>
- </instantiate-template-polymer-element-test>
- <span test-attribute='TestAttribute'>Foo</span>
- </template>
- <instantiate-template-polymer-element-test>
- </instantiate-template-polymer-element-test>
-</template>
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- test('instantiateTemplatePolymer', function() {
- var e = tr.ui.b.instantiateTemplate(
- '#instantiate-template-polymer-test',
- THIS_DOC);
- assert.equal(e.children.length, 1);
- assert.equal(e.children[0].testProperty, 'Test');
- });
-
- test('instantiateTemplateMultipleTemplates', function() {
- var outerElement = tr.ui.b.instantiateTemplate(
- '#multiple-template-test',
- THIS_DOC);
- assert.equal(outerElement.children.length, 2);
- assert.equal(outerElement.children[1].testProperty, 'Test');
-
- // Make sure we can still instantiate inner templates, if we need them.
- var innerElement = THIS_DOC.importNode(
- outerElement.children[0].content, true);
- assert.equal(innerElement.children.length, 2);
- assert.equal(innerElement.children[0].testProperty, 'Test');
- assert.equal(
- innerElement.children[1].getAttribute('test-attribute'),
- 'TestAttribute');
- assert.equal(Polymer.dom(innerElement.children[1]).textContent, 'Foo');
- });
-
- test('extractUrlStringAcceptsBothVersions', function() {
- var oldStyleUrl = 'url(content)';
- var newStyleUrl = 'url("content")';
- var expectedResult = 'content';
-
- assert.equal(tr.ui.b.extractUrlString(oldStyleUrl), expectedResult);
- assert.equal(tr.ui.b.extractUrlString(newStyleUrl), expectedResult);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state.html b/chromium/third_party/catapult/tracing/tracing/ui/brushing_state.html
deleted file mode 100644
index 371cfafefa3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state.html
+++ /dev/null
@@ -1,257 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.b', function() {
- var EventSet = tr.model.EventSet;
- var SelectionState = tr.model.SelectionState;
-
- function BrushingState() {
- this.guid_ = tr.b.GUID.allocateSimple();
- this.selection_ = new EventSet();
- this.findMatches_ = new EventSet();
- this.analysisViewRelatedEvents_ = new EventSet();
- this.analysisLinkHoveredEvents_ = new EventSet();
- this.appliedToModel_ = undefined;
- this.viewSpecificBrushingStates_ = {};
- }
- BrushingState.prototype = {
- get guid() {
- return this.guid_;
- },
-
- clone: function() {
- var that = new BrushingState();
- that.selection_ = this.selection_;
- that.findMatches_ = this.findMatches_;
- that.analysisViewRelatedEvents_ = this.analysisViewRelatedEvents_;
- that.analysisLinkHoveredEvents_ = this.analysisLinkHoveredEvents_;
- that.viewSpecificBrushingStates_ = this.viewSpecificBrushingStates_;
-
- return that;
- },
-
- equals: function(that) {
- if (!this.selection_.equals(that.selection_))
- return false;
- if (!this.findMatches_.equals(that.findMatches_))
- return false;
- if (!this.analysisViewRelatedEvents_.equals(
- that.analysisViewRelatedEvents_)) {
- return false;
- }
- if (!this.analysisLinkHoveredEvents_.equals(
- that.analysisLinkHoveredEvents_)) {
- return false;
- }
- // We currently do not take the view-specific brushing states into
- // account. If we did, every change of the view-specific brushing state
- // of any view would cause a redraw of the whole UI (see the
- // BrushingStateController.currentBrushingState setter).
- return true;
- },
-
- get selectionOfInterest() {
- if (this.selection_.length)
- return this.selection_;
-
- if (this.highlight_.length)
- return this.highlight_;
-
- if (this.analysisViewRelatedEvents_.length)
- return this.analysisViewRelatedEvents_;
-
- if (this.analysisLinkHoveredEvents_.length)
- return this.analysisLinkHoveredEvents_;
-
- return this.selection_;
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- if (this.appliedToModel_)
- throw new Error('Cannot mutate this state right now');
- if (selection === undefined)
- selection = new EventSet();
- this.selection_ = selection;
- },
-
- get findMatches() {
- return this.findMatches_;
- },
-
- set findMatches(findMatches) {
- if (this.appliedToModel_)
- throw new Error('Cannot mutate this state right now');
- if (findMatches === undefined)
- findMatches = new EventSet();
- this.findMatches_ = findMatches;
- },
-
- get analysisViewRelatedEvents() {
- return this.analysisViewRelatedEvents_;
- },
-
- set analysisViewRelatedEvents(analysisViewRelatedEvents) {
- if (this.appliedToModel_)
- throw new Error('Cannot mutate this state right now');
- if (analysisViewRelatedEvents === undefined)
- analysisViewRelatedEvents = new EventSet();
- this.analysisViewRelatedEvents_ = analysisViewRelatedEvents;
- },
-
- get analysisLinkHoveredEvents() {
- return this.analysisLinkHoveredEvents_;
- },
-
- set analysisLinkHoveredEvents(analysisLinkHoveredEvents) {
- if (this.appliedToModel_)
- throw new Error('Cannot mutate this state right now');
- if (analysisLinkHoveredEvents === undefined)
- analysisLinkHoveredEvents = new EventSet();
- this.analysisLinkHoveredEvents_ = analysisLinkHoveredEvents;
- },
-
- get isAppliedToModel() {
- return this.appliedToModel_ !== undefined;
- },
-
- get viewSpecificBrushingStates() {
- return this.viewSpecificBrushingStates_;
- },
-
- set viewSpecificBrushingStates(viewSpecificBrushingStates) {
- this.viewSpecificBrushingStates_ = viewSpecificBrushingStates;
- },
-
- get dimmedEvents_() {
- var dimmedEvents = new EventSet();
- dimmedEvents.addEventSet(this.findMatches);
- dimmedEvents.addEventSet(this.analysisViewRelatedEvents_);
- return dimmedEvents;
- },
-
- get brightenedEvents_() {
- var brightenedEvents = new EventSet();
- brightenedEvents.addEventSet(this.selection_);
- brightenedEvents.addEventSet(this.analysisLinkHoveredEvents_);
- return brightenedEvents;
- },
-
- /**
- * This function sets the SelectionStates according to these rules:
- *
- * - Events in ONE of findMatches or analysisViewRelatedEvents
- * are set to SelectionState.BRIGHTENED0.
- * - Events in BOTH of findMatches and analysisViewRelatedEvents
- * are set to SelectionState.BRIGHTENED1.
- * - Events in ONE of selection or analysisLinkHoveredEvents
- * are set to SelectionState.DIMMED1.
- * - Events in BOTH selection and analysisLinkHoveredEvents
- * are set to SelectionState.DIMMED2.
- * - Events not in any of the above are set to SelectionState.NONE
- * if there are no events in selection or analysisLinkHoveredEvents
- * (i.e. model is "default bright") or SelectionState.DIMMED0 (i.e.
- * model is "default dimmed").
- *
- * It is up to the caller to assure that all of the SelectionStates
- * are the same before calling this function. Normally,
- * this is done by calling unapplyFromModelSelectionState on the
- * old brushing state first.
- */
- applyToEventSelectionStates: function(model) {
- this.appliedToModel_ = model;
-
- var dimmedEvents = this.dimmedEvents_;
-
- // It's possible for this to get called with an undefined model pointer.
- // If so, skip adjusting the defaults.
- if (model) {
- var newDefaultState = (
- dimmedEvents.length ? SelectionState.DIMMED0 : SelectionState.NONE);
-
- // Since all the states are the same, we can get the current default
- // state by looking at the first element.
- var currentDefaultState = tr.b.getFirstElement(
- model.getDescendantEvents()).selectionState;
-
- // If the default state was changed, then we have to iterate through
- // and reset all the events to the new default state.
- if (currentDefaultState !== newDefaultState)
- for (var e of model.getDescendantEvents())
- e.selectionState = newDefaultState;
- }
-
- // Now we apply the other rules above.
- var score;
- for (var e of dimmedEvents) {
- score = 0;
- if (this.findMatches_.contains(e))
- score++;
- if (this.analysisViewRelatedEvents_.contains(e))
- score++;
- e.selectionState = SelectionState.getFromDimmingLevel(score);
- }
-
- for (var e of this.brightenedEvents_) {
- score = 0;
- if (this.selection_.contains(e))
- score++;
- if (this.analysisLinkHoveredEvents_.contains(e))
- score++;
- e.selectionState = SelectionState.getFromBrighteningLevel(score);
- }
-
- },
-
- transferModelOwnershipToClone: function(that) {
- if (!this.appliedToModel_)
- throw new Error('Not applied');
- // Assumes this.equals(that).
- that.appliedToModel_ = this.appliedToModel_;
- this.appliedToModel_ = undefined;
- },
-
- /**
- * Unapplies this brushing state from the model selection state.
- * Resets all the SelectionStates to their default value (DIMMED0 or NONE)
- * and returns the default selection states. The caller should store this
- * value and pass it into applyFromModelSelectionStat when that is called.
- */
- unapplyFromEventSelectionStates: function() {
- if (!this.appliedToModel_)
- throw new Error('Not applied');
- var model = this.appliedToModel_;
- this.appliedToModel_ = undefined;
-
- var dimmedEvents = this.dimmedEvents_;
- var defaultState = (
- dimmedEvents.length ? SelectionState.DIMMED0 : SelectionState.NONE);
-
- for (var e of this.brightenedEvents_)
- e.selectionState = defaultState;
- for (var e of dimmedEvents)
- e.selectionState = defaultState;
- return defaultState;
- }
- };
-
- return {
- BrushingState: BrushingState
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller.html b/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller.html
deleted file mode 100644
index faa01567f4a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller.html
+++ /dev/null
@@ -1,304 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/base/ui_state.html">
-<link rel="import" href="/tracing/ui/brushing_state.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.c', function() {
- var BrushingState = tr.ui.b.BrushingState;
- var EventSet = tr.model.EventSet;
- var SelectionState = tr.model.SelectionState;
- var Viewport = tr.ui.TimelineViewport;
-
- function BrushingStateController(timelineView) {
- tr.b.EventTarget.call(this);
-
- this.timelineView_ = timelineView;
- this.currentBrushingState_ = new BrushingState();
-
- this.onPopState_ = this.onPopState_.bind(this);
- this.historyEnabled_ = false;
- this.selections_ = {};
- }
-
- BrushingStateController.prototype = {
- __proto__: tr.b.EventTarget.prototype,
-
- dispatchChangeEvent_: function() {
- var e = new tr.b.Event('change', false, false);
- this.dispatchEvent(e);
- },
-
- get model() {
- if (!this.timelineView_)
- return undefined;
- return this.timelineView_.model;
- },
-
- get trackView() {
- if (!this.timelineView_)
- return undefined;
- return this.timelineView_.trackView;
- },
-
- get viewport() {
- if (!this.timelineView_)
- return undefined;
- if (!this.timelineView_.trackView)
- return undefined;
- return this.timelineView_.trackView.viewport;
- },
-
- /* History system */
- get historyEnabled() {
- return this.historyEnabled_;
- },
-
- set historyEnabled(historyEnabled) {
- this.historyEnabled_ = !!historyEnabled;
- if (historyEnabled)
- window.addEventListener('popstate', this.onPopState_);
- else
- window.removeEventListener('popstate', this.onPopState_);
- },
-
- modelWillChange: function() {
- if (this.currentBrushingState_.isAppliedToModel)
- this.currentBrushingState_.unapplyFromEventSelectionStates();
- },
-
- modelDidChange: function() {
- this.selections_ = {};
-
- this.currentBrushingState_ = new BrushingState();
- this.currentBrushingState_.applyToEventSelectionStates(this.model);
-
- var e = new tr.b.Event('model-changed', false, false);
- this.dispatchEvent(e);
-
- this.dispatchChangeEvent_();
- },
-
- onUserInitiatedSelectionChange_: function() {
- var selection = this.selection;
- if (this.historyEnabled) {
- // Save the selection so that when back button is pressed,
- // it could be retrieved.
- this.selections_[selection.guid] = selection;
- var state = {
- selection_guid: selection.guid
- };
-
- window.history.pushState(state, document.title);
- }
- },
-
- onPopState_: function(e) {
- if (e.state === null)
- return;
-
- var selection = this.selections_[e.state.selection_guid];
- if (selection) {
- var newState = this.currentBrushingState_.clone();
- newState.selection = selection;
- this.currentBrushingState = newState;
- }
- e.stopPropagation();
- },
-
- get selection() {
- return this.currentBrushingState_.selection;
- },
- get findMatches() {
- return this.currentBrushingState_.findMatches;
- },
-
- get selectionOfInterest() {
- return this.currentBrushingState_.selectionOfInterest;
- },
-
- get currentBrushingState() {
- return this.currentBrushingState_;
- },
-
- set currentBrushingState(newBrushingState) {
- if (newBrushingState.isAppliedToModel)
- throw new Error('Cannot apply this state, it is applied');
-
- // This function uses value-equality on the states so that state can
- // changed to a clone of itself without causing a change event, while
- // still having the actual state object change to the new clone.
- var hasValueChanged = !this.currentBrushingState_.equals(
- newBrushingState);
-
- if (newBrushingState !== this.currentBrushingState_ && !hasValueChanged) {
- if (this.currentBrushingState_.isAppliedToModel) {
- this.currentBrushingState_.transferModelOwnershipToClone(
- newBrushingState);
- }
- this.currentBrushingState_ = newBrushingState;
- return;
- }
-
- if (this.currentBrushingState_.isAppliedToModel)
- this.currentBrushingState_.unapplyFromEventSelectionStates();
-
- this.currentBrushingState_ = newBrushingState;
-
- this.currentBrushingState_.applyToEventSelectionStates(this.model);
-
- this.dispatchChangeEvent_();
- },
-
- /**
- * @param {Filter} filter The filter to use for finding matches.
- * @param {Selection} selection The selection to add matches to.
- * @return {Task} which performs the filtering.
- */
- addAllEventsMatchingFilterToSelectionAsTask: function(filter, selection) {
- var timelineView = this.timelineView_.trackView;
- if (!timelineView)
- return new tr.b.Task();
- return timelineView.addAllEventsMatchingFilterToSelectionAsTask(
- filter, selection);
- },
-
- findTextChangedTo: function(allPossibleMatches) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.findMatches = allPossibleMatches;
- this.currentBrushingState = newBrushingState;
- },
-
- findFocusChangedTo: function(currentFocus) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.selection = currentFocus;
- this.currentBrushingState = newBrushingState;
-
- this.onUserInitiatedSelectionChange_();
- },
-
- findTextCleared: function() {
- if (this.xNavStringMarker_ !== undefined) {
- this.model.removeAnnotation(this.xNavStringMarker_);
- this.xNavStringMarker_ = undefined;
- }
-
- if (this.guideLineAnnotation_ !== undefined) {
- this.model.removeAnnotation(this.guideLineAnnotation_);
- this.guideLineAnnotation_ = undefined;
- }
-
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.selection = new EventSet();
- newBrushingState.findMatches = new EventSet();
- this.currentBrushingState = newBrushingState;
-
- this.onUserInitiatedSelectionChange_();
- },
-
- uiStateFromString: function(string) {
- return tr.ui.b.UIState.fromUserFriendlyString(
- this.model, this.viewport, string);
- },
-
- navToPosition: function(uiState, showNavLine) {
- this.trackView.navToPosition(uiState, showNavLine);
- },
-
- changeSelectionFromTimeline: function(selection) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.selection = selection;
- newBrushingState.findMatches = new EventSet();
- this.currentBrushingState = newBrushingState;
-
- this.onUserInitiatedSelectionChange_();
- },
-
- showScriptControlSelection: function(selection) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.selection = selection;
- newBrushingState.findMatches = new EventSet();
- this.currentBrushingState = newBrushingState;
- },
-
- changeSelectionFromRequestSelectionChangeEvent: function(selection) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.selection = selection;
- newBrushingState.findMatches = new EventSet();
- this.currentBrushingState = newBrushingState;
-
- this.onUserInitiatedSelectionChange_();
- },
-
- changeAnalysisViewRelatedEvents: function(eventSet) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.analysisViewRelatedEvents = eventSet;
- this.currentBrushingState = newBrushingState;
- },
-
- changeAnalysisLinkHoveredEvents: function(eventSet) {
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.analysisLinkHoveredEvents = eventSet;
- this.currentBrushingState = newBrushingState;
- },
-
- getViewSpecificBrushingState: function(viewId) {
- return this.currentBrushingState.viewSpecificBrushingStates[viewId];
- },
-
- changeViewSpecificBrushingState: function(viewId, newState) {
- var oldStates = this.currentBrushingState_.viewSpecificBrushingStates;
- var newStates = {};
- for (var id in oldStates)
- newStates[id] = oldStates[id];
- if (newState === undefined)
- delete newStates[viewId];
- else
- newStates[viewId] = newState;
-
- var newBrushingState = this.currentBrushingState_.clone();
- newBrushingState.viewSpecificBrushingStates = newStates;
- this.currentBrushingState = newBrushingState;
- }
- };
-
- BrushingStateController.getControllerForElement = function(element) {
- if (tr.isHeadless)
- throw new Error('Unsupported');
- var currentElement = element;
- while (currentElement) {
- if (currentElement.brushingStateController)
- return currentElement.brushingStateController;
-
- // Walk up the DOM.
- if (currentElement.parentElement) {
- currentElement = currentElement.parentElement;
- continue;
- }
-
- // Possibly inside a shadow DOM.
- var currentNode = currentElement;
- while (Polymer.dom(currentNode).parentNode)
- currentNode = Polymer.dom(currentNode).parentNode;
- currentElement = currentNode.host;
- }
- return undefined;
- };
-
- return {
- BrushingStateController: BrushingStateController
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller_test.html b/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller_test.html
deleted file mode 100644
index b8a8b0d63fd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_controller_test.html
+++ /dev/null
@@ -1,204 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- var EventSet = tr.model.EventSet;
- var SelectionState = tr.model.SelectionState;
- var Task = tr.b.Task;
-
- function newSimpleFakeTimelineView() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
-
- m.sA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0, end: 5}));
- m.sB = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'b', start: 10, end: 15}));
- m.sC = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'c', start: 20, end: 20}));
- });
-
- // Fake timeline view. So fake its ... just wow.
- var timelineView = {
- model: m
- };
- return timelineView;
- }
-
- function doesCauseChangeToFire(brushingStateController, cb, opt_this) {
- var didFire = false;
- function didFireCb() {
- didFire = true;
- };
- brushingStateController.addEventListener('change', didFireCb);
- cb.call(opt_this);
- brushingStateController.removeEventListener('change', didFireCb);
- return didFire;
- }
-
- test('simpleStateChanges', function() {
- var timelineView = newSimpleFakeTimelineView();
- var brushingStateController =
- new tr.c.BrushingStateController(timelineView);
- var m = timelineView.model;
-
- // Setting empty brushing state doesn't cause change event. This behavior
- // is triggered when the user tries to search for something when no trace
- // has been loaded yet in chrome://tracing.
- var bs0 = new tr.ui.b.BrushingState();
- assert.isFalse(doesCauseChangeToFire(
- brushingStateController,
- function() {
- brushingStateController.currentBrushingState = bs0;
- }));
- assert.isFalse(bs0.isAppliedToModel);
- assert.strictEqual(brushingStateController.currentBrushingState, bs0);
-
- // Setting causes change.
- var bs1 = new tr.ui.b.BrushingState();
- bs1.selection = new EventSet([m.sA]);
- assert.isTrue(doesCauseChangeToFire(
- brushingStateController,
- function() {
- brushingStateController.currentBrushingState = bs1;
- }));
- assert.isTrue(bs1.isAppliedToModel);
-
- // Setting value equivalent doesn't cause change event.
- var bs2 = bs1.clone();
- assert.isFalse(doesCauseChangeToFire(
- brushingStateController,
- function() {
- brushingStateController.currentBrushingState = bs2;
- }));
- assert.equal(brushingStateController.currentBrushingState, bs2);
- assert.isTrue(
- brushingStateController.currentBrushingState.isAppliedToModel);
-
- // Setting to something different unapplies the old bs.
- var bs3 = new tr.ui.b.BrushingState();
- bs3.findMatches = new EventSet([m.sA, m.sB]);
- brushingStateController.currentBrushingState = bs3;
- assert.isTrue(bs3.isAppliedToModel);
- assert.isFalse(bs2.isAppliedToModel);
- });
-
- test('modelCausesStateChange', function() {
- var timelineView = newSimpleFakeTimelineView();
- var brushingStateController =
- new tr.c.BrushingStateController(timelineView);
-
- var m1 = timelineView.model;
-
- var bs1 = new tr.ui.b.BrushingState();
- bs1.selection = new EventSet([m1.sA]);
-
- // Change the model.
- var m2 = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
-
- m.sA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0, end: 5}));
- });
- assert.isTrue(doesCauseChangeToFire(
- brushingStateController,
- function() {
- brushingStateController.modelWillChange();
- timelineView.model = m2;
- brushingStateController.modelDidChange();
- }));
- assert.equal(
- brushingStateController.currentBrushingState.selection.length, 0);
- });
-
- function addChildDiv(element) {
- var child = element.ownerDocument.createElement('div');
- Polymer.dom(element).appendChild(child);
- return child;
- }
-
- function addShadowChildDiv(element) {
- var shadowRoot = element.createShadowRoot();
- return addChildDiv(shadowRoot);
- }
-
- if (!tr.isHeadless) {
- test('getControllerForElement_none', function() {
- var element = document.createElement('div');
-
- assert.isUndefined(
- tr.c.BrushingStateController.getControllerForElement(element));
- });
-
- test('getControllerForElement_self', function() {
- var controller = new tr.c.BrushingStateController(undefined);
- var element = document.createElement('div');
- element.brushingStateController = controller;
-
- assert.strictEqual(
- tr.c.BrushingStateController.getControllerForElement(element),
- controller);
- });
-
- test('getControllerForElement_ancestor', function() {
- var controller = new tr.c.BrushingStateController(undefined);
- var ancestor = document.createElement('div');
- ancestor.brushingStateController = controller;
-
- var element = addChildDiv(addChildDiv(addChildDiv(ancestor)));
- assert.strictEqual(
- tr.c.BrushingStateController.getControllerForElement(element),
- controller);
- });
-
- test('getControllerForElement_host', function() {
- var controller = new tr.c.BrushingStateController(undefined);
- var host = document.createElement('div');
- host.brushingStateController = controller;
-
- var element = addShadowChildDiv(host);
- assert.strictEqual(
- tr.c.BrushingStateController.getControllerForElement(element),
- controller);
- });
-
- test('getControllerForElement_hierarchy', function() {
- var controller1 = new tr.c.BrushingStateController(undefined);
- var root = document.createElement('div');
- root.brushingStateController = controller1;
-
- var controller2 = new tr.c.BrushingStateController(undefined);
- var child = addChildDiv(root);
- child.brushingStateController = controller2;
-
- var controller3 = new tr.c.BrushingStateController(undefined);
- var shadowChild = addShadowChildDiv(child);
- shadowChild.brushingStateController = controller3;
-
- var element = addChildDiv(addChildDiv(addShadowChildDiv(
- addChildDiv(addChildDiv(addShadowChildDiv(
- addChildDiv(shadowChild)))))));
- assert.strictEqual(
- tr.c.BrushingStateController.getControllerForElement(element),
- controller3);
- });
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_test.html b/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_test.html
deleted file mode 100644
index 25606f6cb6b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/brushing_state_test.html
+++ /dev/null
@@ -1,123 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- var EventSet = tr.model.EventSet;
- var SelectionState = tr.model.SelectionState;
-
- function newSimpleModel() {
- return tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
-
- m.sA = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'a', start: 0, end: 5}));
- m.sB = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'b', start: 10, end: 15}));
- m.sC = m.t2.sliceGroup.pushSlice(
- newSliceEx({title: 'c', start: 20, end: 20}));
- });
- }
-
- test('brushingStateSimple', function() {
- var m = newSimpleModel();
-
- var bs = new tr.ui.b.BrushingState();
- bs.selection = new EventSet([m.sA]);
-
- bs.applyToEventSelectionStates(m);
- assert.equal(m.sA.selectionState, SelectionState.SELECTED);
- bs.unapplyFromEventSelectionStates();
- assert.equal(m.sA.selectionState, SelectionState.NONE);
- });
-
-
- test('selectionAndAnalysisHover', function() {
- var m = newSimpleModel();
-
- var bs = new tr.ui.b.BrushingState();
- bs.selection = new EventSet([m.sA]);
- bs.analysisLinkHoveredEvents = new EventSet([m.sA, m.sB]);
-
- bs.applyToEventSelectionStates(m);
- assert.equal(m.sA.selectionState, SelectionState.BRIGHTENED1);
- assert.equal(m.sB.selectionState, SelectionState.BRIGHTENED0);
- bs.unapplyFromEventSelectionStates();
- assert.equal(m.sA.selectionState, SelectionState.NONE);
- });
-
- test('brushingStateWithFindMatches', function() {
- var m = newSimpleModel();
-
- var bs = new tr.ui.b.BrushingState();
- bs.selection = new EventSet([m.sA]);
- bs.findMatches = new EventSet([m.sA, m.sB]);
-
- bs.applyToEventSelectionStates(m);
- assert.equal(m.sA.selectionState, SelectionState.BRIGHTENED0);
- assert.equal(m.sB.selectionState, SelectionState.DIMMED1);
- assert.equal(m.sC.selectionState, SelectionState.DIMMED0);
- bs.unapplyFromEventSelectionStates();
- assert.equal(m.sA.selectionState, SelectionState.DIMMED0);
- assert.equal(m.sB.selectionState, SelectionState.DIMMED0);
- assert.equal(m.sC.selectionState, SelectionState.DIMMED0);
- });
-
- test('brushingTransfer', function() {
- var m = newSimpleModel();
-
- var bs = new tr.ui.b.BrushingState();
- bs.selection = new EventSet([m.sA]);
-
- var bs2 = bs.clone();
-
- bs.applyToEventSelectionStates(m);
- assert.equal(m.sA.selectionState, SelectionState.SELECTED);
- bs.transferModelOwnershipToClone(bs2);
- assert.isFalse(bs.isAppliedToModel);
- assert.isTrue(bs2.isAppliedToModel);
-
- bs2.unapplyFromEventSelectionStates();
- assert.equal(m.sA.selectionState, SelectionState.NONE);
- assert.equal(m.sB.selectionState, SelectionState.NONE);
- assert.equal(m.sC.selectionState, SelectionState.NONE);
- });
-
- test('equality', function() {
- var m = newSimpleModel();
-
- var bs = new tr.ui.b.BrushingState();
- bs.selection = new EventSet([m.sA]);
- bs.findMatches = new EventSet([m.sB]);
- bs.applyToEventSelectionStates = new EventSet([m.sC]);
-
- // Clone equality, but with shared refs.
- var bs2 = bs.clone();
- assert.isTrue(bs.equals(bs2));
-
- // Same value, different refs.
- bs2.selection = new EventSet([m.sA]);
- assert.isTrue(bs.equals(bs2));
-
- // Different actual values.
- bs2.selection = new EventSet([m.sB]);
- assert.isFalse(bs.equals(bs2));
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/about_tracing.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/about_tracing.html
deleted file mode 100644
index 8e579d90921..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/about_tracing.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
-
-<link rel="stylesheet" href="/tracing/ui/extras/about_tracing/common.css">
-<link rel="import" href="/tracing/ui/extras/about_tracing/profiling_view.html">
-<link rel="import" href="/tracing/ui/extras/full_config.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.about_tracing', function() {
- window.profilingView = undefined; // Made global for debugging purposes only.
-
- document.addEventListener('DOMContentLoaded', function() {
- window.profilingView = new tr.ui.e.about_tracing.ProfilingView();
- profilingView.timelineView.globalMode = true;
- Polymer.dom(document.body).appendChild(profilingView);
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/common.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/common.css
deleted file mode 100644
index 1ffb5f72e74..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/common.css
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-html,
-body {
- height: 100%;
-}
-
-body {
- -webkit-flex-direction: column;
- display: -webkit-flex;
- margin: 0;
- padding: 0;
-}
-
-body > x-profiling-view {
- -webkit-flex: 1 1 auto;
- min-height: 0;
-}
-
-body > x-profiling-view > x-timeline-view:focus {
- outline: 0
-}
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_connection.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_connection.html
deleted file mode 100644
index bc2ba6e472c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_connection.html
+++ /dev/null
@@ -1,125 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-
-'use strict';
-
-/**
- * Contains connection code that inspector's embedding framework calls on
- * tracing, and that tracing can use to talk to inspector.
- */
-tr.exportTo('tr.ui.e.about_tracing', function() {
- // Interface used by inspector when it hands data to us from the backend.
- window.DevToolsAPI = {
- setToolbarColors: function() { },
- addExtensions: function() { },
- setInspectedPageId: function() { },
-
- dispatchMessage: function(payload) {
- throw new Error('Should have been patched by InspectorConnection');
- }
- };
- // Temporary until inspector backend switches to DevToolsAPI.
- window.InspectorFrontendAPI = window.DevToolsAPI;
-
- /**
- * @constructor
- */
- function InspectorConnection() {
- if (InspectorConnection.instance)
- throw new Error('Singleton');
-
- this.nextRequestId_ = 1;
- this.pendingRequestResolversId_ = {};
-
- this.notificationListenersByMethodName_ = {};
- DevToolsAPI.dispatchMessage = this.dispatchMessage_.bind(this);
- }
-
- InspectorConnection.prototype = {
- req: function(method, params) {
- var id = this.nextRequestId_++;
- var msg = JSON.stringify({
- id: id,
- method: method,
- params: params
- });
- var devtoolsMessageStr = JSON.stringify(
- {'id': id, 'method': 'dispatchProtocolMessage', 'params': [msg]});
- DevToolsHost.sendMessageToEmbedder(devtoolsMessageStr);
-
- return new Promise(function(resolve, reject) {
- this.pendingRequestResolversId_[id] = {
- resolve: resolve,
- reject: reject
- };
- }.bind(this));
- },
-
- setNotificationListener: function(method, listener) {
- this.notificationListenersByMethodName_[method] = listener;
- },
-
- dispatchMessage_: function(payload) {
- var isStringPayload = typeof payload === 'string';
- // Special handling for Tracing.dataCollected because it is high
- // bandwidth.
- var isDataCollectedMessage = isStringPayload ?
- payload.indexOf('"method": "Tracing.dataCollected"') !== -1 :
- payload.method === 'Tracing.dataCollected';
- if (isDataCollectedMessage) {
- var listener = this.notificationListenersByMethodName_[
- 'Tracing.dataCollected'];
- if (listener) {
- // FIXME(loislo): trace viewer should be able to process
- // raw message object because string based version a few times
- // slower on the browser side.
- // see https://codereview.chromium.org/784513002.
- listener(isStringPayload ? payload : JSON.stringify(payload));
- return;
- }
- }
-
- var message = isStringPayload ? JSON.parse(payload) : payload;
- if (message.id) {
- var resolver = this.pendingRequestResolversId_[message.id];
- if (resolver === undefined) {
- console.log('Unrecognized ack', message);
- return;
- }
- if (message.error) {
- resolver.reject(message.error);
- return;
- }
- resolver.resolve(message.result);
- return;
- }
-
- if (message['method']) {
- var listener = this.notificationListenersByMethodName_[message.method];
- if (listener === undefined) {
- console.log('Unhandled ', message.method);
- return;
- }
- listener(message.params);
- return;
- }
- console.log('Unknown dispatchMessage: ', payload);
- }
- };
-
- if (window.DevToolsHost)
- InspectorConnection.instance = new InspectorConnection();
- else
- InspectorConnection.instance = undefined;
-
- return {
- InspectorConnection: InspectorConnection
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html
deleted file mode 100644
index 86c3e596054..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html
+++ /dev/null
@@ -1,187 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/tracing_controller_client.html">
-<link rel="import" href="/tracing/ui/extras/about_tracing/inspector_connection.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.about_tracing', function() {
- function createResolvedPromise(data) {
- var promise = new Promise(function(resolve, reject) {
- if (data)
- resolve(data);
- else
- resolve();
- });
- return promise;
- }
-
- function appendTraceChunksTo(chunks, messageString) {
- if (typeof messageString !== 'string')
- throw new Error('Invalid data');
- var re = /"params":\s*\{\s*"value":\s*\[([^]+)\]\s*\}\s*\}/;
- var m = re.exec(messageString);
- if (!m)
- throw new Error('Malformed response');
-
- if (chunks.length > 1)
- chunks.push(',');
- chunks.push(m[1]);
- }
-
- /**
- * Controls tracing using the inspector's FrontendAgentHost APIs.
- *
- * @constructor
- */
- function InspectorTracingControllerClient() {
- this.recording_ = false;
- this.bufferUsage_ = 0;
- this.conn_ = tr.ui.e.about_tracing.InspectorConnection.instance;
- this.currentTraceTextChunks_ = undefined;
- }
-
- InspectorTracingControllerClient.prototype = {
- __proto__: tr.ui.e.about_tracing.TracingControllerClient.prototype,
-
- beginMonitoring: function(monitoringOptions) {
- throw new Error('Not implemented');
- },
-
- endMonitoring: function() {
- throw new Error('Not implemented');
- },
-
- captureMonitoring: function() {
- throw new Error('Not implemented');
- },
-
- getMonitoringStatus: function() {
- return createResolvedPromise({
- isMonitoring: false,
- categoryFilter: '',
- useSystemTracing: false,
- useContinuousTracing: false,
- useSampling: false
- });
- },
-
- getCategories: function() {
- var res = this.conn_.req('Tracing.getCategories', {});
- return res.then(function(result) {
- return result.categories;
- }, function(err) {
- return [];
- });
- },
-
- beginRecording: function(recordingOptions) {
- if (this.recording_)
- throw new Error('Already recording');
- this.recording_ = 'starting';
- var res = this.conn_.req(
- 'Tracing.start',
- {
- categories: recordingOptions.categoryFilter,
- options:
- [recordingOptions.tracingRecordMode,
- (recordingOptions.useSampling ? 'enable-sampling' : '')
- ].join(','),
- bufferUsageReportingInterval: 1000
- });
- res = res.then(
- function ok() {
- this.conn_.setNotificationListener(
- 'Tracing.bufferUsage',
- this.onBufferUsageUpdateFromInspector_.bind(this));
- this.recording_ = true;
- }.bind(this),
- function error() {
- this.recording_ = false;
- }.bind(this));
- return res;
- },
-
- onBufferUsageUpdateFromInspector_: function(params) {
- this.bufferUsage_ = params.value || params.percentFull;
- },
-
- beginGetBufferPercentFull: function() {
- var that = this;
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- resolve(that.bufferUsage_);
- }, 100);
- });
- },
-
- onDataCollected_: function(messageString) {
- appendTraceChunksTo(this.currentTraceTextChunks_, messageString);
- },
-
- endRecording: function() {
- if (this.recording_ === false)
- return createResolvedPromise();
-
- if (this.recording_ !== true)
- throw new Error('Cannot end');
-
- this.currentTraceTextChunks_ = ['['];
- this.conn_.setNotificationListener(
- 'Tracing.dataCollected', this.onDataCollected_.bind(this));
-
- var clearListeners = function() {
- this.conn_.setNotificationListener(
- 'Tracing.bufferUsage', undefined);
- this.conn_.setNotificationListener(
- 'Tracing.tracingComplete', undefined);
- this.conn_.setNotificationListener(
- 'Tracing.dataCollected', undefined);
- }.bind(this);
-
- this.recording_ = 'stopping';
- return new Promise(function(resolve, reject) {
- function tracingComplete() {
- clearListeners();
- this.recording_ = false;
- this.currentTraceTextChunks_.push(']');
- var traceText = this.currentTraceTextChunks_.join('');
- this.currentTraceTextChunks_ = undefined;
- resolve(traceText);
- }
-
- function tracingFailed(err) {
- clearListeners();
- this.recording_ = false;
- reject(err);
- }
-
- this.conn_.setNotificationListener(
- 'Tracing.tracingComplete', tracingComplete.bind(this));
- this.conn_.req('Tracing.end', {}).then(
- function end() {
- // Nothing happens here. We're really waiting for
- // Tracing.tracingComplete.
- }.bind(this),
- tracingFailed.bind(this));
- }.bind(this));
- },
-
- defaultTraceName: function() {
- return 'trace.json';
- }
- };
-
- return {
- InspectorTracingControllerClient: InspectorTracingControllerClient,
- appendTraceChunksTo: appendTraceChunksTo
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client_test.html
deleted file mode 100644
index bbff78a9855..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client_test.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('beginRecording_sendCategoriesAndOptions', function() {
- var controller =
- new tr.ui.e.about_tracing.InspectorTracingControllerClient();
- controller.conn_ = new (function() {
- this.req = function(method, params) {
- var msg = JSON.stringify({
- id: 1,
- method: method,
- params: params
- });
- return new (function() {
- this.msg = msg;
- this.then = function(m1, m2) {
- return this;
- };
- })();
- };
- this.setNotificationListener = function(method, listener) {
- };
- })();
-
- var recordingOptions = {
- categoryFilter: JSON.stringify(['a', 'b', 'c']),
- useSystemTracing: false,
- tracingRecordMode: 'test-mode',
- useSampling: true
- };
-
- var result = JSON.parse(controller.beginRecording(recordingOptions).msg);
- assert.equal(result.params.categories, JSON.stringify(['a', 'b', 'c']));
- var options = result.params.options.split(',');
- var tracingRecordTestMode = false;
- var sampleFlag = false;
- for (var s in options) {
- if (options[s] === 'test-mode') tracingRecordTestMode = true;
- else if (options[s] === 'enable-sampling') sampleFlag = true;
- else assert.equal(options[s], '');
- }
- assert.isTrue(tracingRecordTestMode);
- assert.isTrue(sampleFlag);
- });
-
- test('oldFormat', function() {
- var chunks = [];
- tr.ui.e.about_tracing.appendTraceChunksTo(chunks, '"{ "method": "Tracing.dataCollected", "params": { "value": [ {"cat":"__metadata","pid":28871,"tid":0,"ts":0,"ph":"M","name":"num_cpus","args":{"number":4}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_sort_index","args":{"sort_index":-5}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_name","args":{"name":"Renderer"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_labels","args":{"labels":"JS Bin"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_sort_index","args":{"sort_index":-1}},{"cat":"__metadata","pid":28871,"tid":28917,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Compositor"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"cat":"__metadata","pid":28871,"tid":28919,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CompositorRasterWorker1/28919"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CrRendererMain"}},{"cat":"ipc,toplevel","pid":28871,"tid":28911,"ts":22000084746,"ph":"X","name":"ChannelReader::DispatchInputData","args":{"class":64,"line":25},"tdur":0,"tts":1853064},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"overhead","args":{"average_overhead":0.015}} ] } }"'); // @suppress longLineCheck
- assert.equal(chunks.length, 1);
- JSON.parse('[' + chunks.join('') + ']');
- });
-
- test('newFormat', function() {
- var chunks = [];
- tr.ui.e.about_tracing.appendTraceChunksTo(chunks, '"{ "method": "Tracing.dataCollected", "params": { "value": [{"cat":"__metadata","pid":28871,"tid":0,"ts":0,"ph":"M","name":"num_cpus","args":{"number":4}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_sort_index","args":{"sort_index":-5}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_name","args":{"name":"Renderer"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"process_labels","args":{"labels":"JS Bin"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_sort_index","args":{"sort_index":-1}},{"cat":"__metadata","pid":28871,"tid":28917,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Compositor"}},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"cat":"__metadata","pid":28871,"tid":28919,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CompositorRasterWorker1/28919"}},{"cat":"__metadata","pid":28871,"tid":28908,"ts":0,"ph":"M","name":"thread_name","args":{"name":"CrRendererMain"}},{"cat":"ipc,toplevel","pid":28871,"tid":28911,"ts":22000084746,"ph":"X","name":"ChannelReader::DispatchInputData","args":{"class":64,"line":25},"tdur":0,"tts":1853064},{"cat":"__metadata","pid":28871,"tid":28911,"ts":0,"ph":"M","name":"overhead","args":{"average_overhead":0.015}}] } }"'); // @suppress longLineCheck
- assert.equal(chunks.length, 1);
- JSON.parse('[' + chunks.join('') + ']');
- });
-
- test('stringAndObjectPayload', function() {
- var connection = new tr.ui.e.about_tracing.InspectorConnection();
- connection.setNotificationListener('Tracing.dataCollected',
- function(message) {
- assert.typeOf(message, 'string');
- JSON.parse(message);
- }
- );
- connection.dispatchMessage_('{ "method": "Tracing.dataCollected", "params": { "value": [] } }'); // @suppress longLineCheck
- connection.dispatchMessage_({'method': 'Tracing.dataCollected', 'params': {'value': [] } }); // @suppress longLineCheck
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html
deleted file mode 100644
index a88122ff636..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/tracing_controller_client.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.about_tracing', function() {
- function MockTracingControllerClient() {
- this.requests = [];
- this.nextRequestIndex = 0;
- this.allowLooping = false;
- }
-
- MockTracingControllerClient.prototype = {
- __proto__: tr.ui.e.about_tracing.TracingControllerClient.prototype,
-
- expectRequest: function(method, generateResponse) {
- var generateResponseCb;
- if (typeof generateResponse === 'function') {
- generateResponseCb = generateResponse;
- } else {
- generateResponseCb = function() {
- return generateResponse;
- };
- }
-
- this.requests.push({
- method: method,
- generateResponseCb: generateResponseCb});
- },
-
- _request: function(method, args) {
- return new Promise(function(resolve) {
- var requestIndex = this.nextRequestIndex;
- if (requestIndex >= this.requests.length)
- throw new Error('Unhandled request');
- if (!this.allowLooping) {
- this.nextRequestIndex++;
- } else {
- this.nextRequestIndex = (this.nextRequestIndex + 1) %
- this.requests.length;
- }
-
- var req = this.requests[requestIndex];
- assert.equal(method, req.method);
- var resp = req.generateResponseCb(args);
- resolve(resp);
- }.bind(this));
- },
-
- assertAllRequestsHandled: function() {
- if (this.allowLooping)
- throw new Error('Incompatible with allowLooping');
- assert.equal(this.requests.length, this.nextRequestIndex);
- },
-
- getCategories: function() {
- return this._request('getCategories');
- },
-
- beginRecording: function(recordingOptions) {
- return this._request('beginRecording', recordingOptions);
- },
-
- beginGetBufferPercentFull: function() {
- return this._request('beginGetBufferPercentFull');
- },
-
- endRecording: function() {
- return this._request('endRecording');
- }
- };
-
- return {
- MockTracingControllerClient: MockTracingControllerClient
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view.html
deleted file mode 100644
index 58d4e913e34..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view.html
+++ /dev/null
@@ -1,371 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/ui/base/file.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/base/info_bar_group.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html">
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/record_controller.html">
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/xhr_based_tracing_controller_client.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
-
-<style>
-x-profiling-view {
- -webkit-flex-direction: column;
- display: -webkit-flex;
- padding: 0;
-}
-
-x-profiling-view .controls #save-button {
- margin-left: 64px !important;
-}
-
-x-profiling-view > tr-ui-timeline-view {
- -webkit-flex: 1 1 auto;
- min-height: 0;
-}
-
-.report-id-message {
- -webkit-user-select: text;
-}
-
-x-timeline-view-buttons {
- display: flex;
- align-items: center;
-}
-</style>
-
-<template id="profiling-view-template">
- <tr-ui-b-info-bar-group></tr-ui-b-info-bar-group>
- <x-timeline-view-buttons>
- <button id="record-button">Record</button>
- <button id="save-button">Save</button>
- <button id="load-button">Load</button>
- </x-timeline-view-buttons>
- <tr-ui-timeline-view>
- <track-view-container id='track_view_container'></track-view-container>
- </tr-ui-timeline-view>
-</template>
-
-<script>
-'use strict';
-
-/**
- * @fileoverview ProfilingView glues the View control to
- * TracingController.
- */
-tr.exportTo('tr.ui.e.about_tracing', function() {
- /**
- * ProfilingView
- * @constructor
- * @extends {HTMLDivElement}
- */
- var ProfilingView = tr.ui.b.define('x-profiling-view');
- var THIS_DOC = document.currentScript.ownerDocument;
-
- ProfilingView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function(tracingControllerClient) {
- Polymer.dom(this).appendChild(
- tr.ui.b.instantiateTemplate('#profiling-view-template', THIS_DOC));
-
- this.timelineView_ =
- Polymer.dom(this).querySelector('tr-ui-timeline-view');
- this.infoBarGroup_ =
- Polymer.dom(this).querySelector('tr-ui-b-info-bar-group');
-
- // Detach the buttons. We will reattach them to the timeline view.
- // TODO(nduca): Make timeline-view have a content select="x-buttons"
- // that pulls in any buttons.
- this.recordButton_ = Polymer.dom(this).querySelector('#record-button');
- this.loadButton_ = Polymer.dom(this).querySelector('#load-button');
- this.saveButton_ = Polymer.dom(this).querySelector('#save-button');
-
- var buttons = Polymer.dom(this).querySelector('x-timeline-view-buttons');
- Polymer.dom(buttons.parentElement).removeChild(buttons);
- Polymer.dom(this.timelineView_.leftControls).appendChild(buttons);
- this.initButtons_();
-
- this.timelineView_.hotkeyController.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- keyCode: 'r'.charCodeAt(0),
- callback: function(e) {
- this.beginRecording();
- event.stopPropagation();
- },
- thisArg: this
- }));
-
- this.initDragAndDrop_();
-
- if (tracingControllerClient) {
- this.tracingControllerClient_ = tracingControllerClient;
- } else if (window.DevToolsHost !== undefined) {
- this.tracingControllerClient_ =
- new tr.ui.e.about_tracing.InspectorTracingControllerClient();
- } else {
- this.tracingControllerClient_ =
- new tr.ui.e.about_tracing.XhrBasedTracingControllerClient();
- }
-
- this.isRecording_ = false;
- this.activeTrace_ = undefined;
-
- this.updateTracingControllerSpecificState_();
- },
-
- // Detach all document event listeners. Without this the tests can get
- // confused as the element may still be listening when the next test runs.
- detach_: function() {
- this.detachDragAndDrop_();
- },
-
- get isRecording() {
- return this.isRecording_;
- },
-
- set tracingControllerClient(tracingControllerClient) {
- this.tracingControllerClient_ = tracingControllerClient;
- this.updateTracingControllerSpecificState_();
- },
-
- updateTracingControllerSpecificState_: function() {
- var isInspector = this.tracingControllerClient_ instanceof
- tr.ui.e.about_tracing.InspectorTracingControllerClient;
-
- if (isInspector) {
- this.infoBarGroup_.addMessage(
- 'This about:tracing is connected to a remote device...',
- [{buttonText: 'Wow!', onClick: function() {}}]);
- }
- },
-
- beginRecording: function() {
- if (this.isRecording_)
- throw new Error('Already recording');
- this.isRecording_ = true;
- var resultPromise = tr.ui.e.about_tracing.beginRecording(
- this.tracingControllerClient_);
- resultPromise.then(
- function(data) {
- this.isRecording_ = false;
- var traceName = tr.ui.e.about_tracing.defaultTraceName(
- this.tracingControllerClient_);
- this.setActiveTrace(traceName, data, false);
- }.bind(this),
- function(err) {
- this.isRecording_ = false;
- if (err instanceof tr.ui.e.about_tracing.UserCancelledError)
- return;
- tr.ui.b.Overlay.showError('Error while recording', err);
- }.bind(this));
- return resultPromise;
- },
-
- get timelineView() {
- return this.timelineView_;
- },
-
- ///////////////////////////////////////////////////////////////////////////
-
- clearActiveTrace: function() {
- this.saveButton_.disabled = true;
- this.activeTrace_ = undefined;
- },
-
- setActiveTrace: function(filename, data) {
- this.activeTrace_ = {
- filename: filename,
- data: data
- };
-
- this.infoBarGroup_.clearMessages();
- this.updateTracingControllerSpecificState_();
- this.saveButton_.disabled = false;
- this.timelineView_.viewTitle = filename;
-
- var m = new tr.Model();
- var i = new tr.importer.Import(m);
- var p = i.importTracesWithProgressDialog([data]);
- p.then(
- function() {
- this.timelineView_.model = m;
- this.timelineView_.updateDocumentFavicon();
- }.bind(this),
- function(err) {
- tr.ui.b.Overlay.showError('While importing: ', err);
- }.bind(this));
- },
-
- ///////////////////////////////////////////////////////////////////////////
-
- initButtons_: function() {
- this.recordButton_.addEventListener(
- 'click', function(event) {
- event.stopPropagation();
- this.beginRecording();
- }.bind(this));
-
- this.loadButton_.addEventListener(
- 'click', function(event) {
- event.stopPropagation();
- this.onLoadClicked_();
- }.bind(this));
-
- this.saveButton_.addEventListener('click',
- this.onSaveClicked_.bind(this));
- this.saveButton_.disabled = true;
- },
-
- requestFilename_: function() {
-
- // unsafe filename patterns:
- var illegalRe = /[\/\?<>\\:\*\|":]/g;
- var controlRe = /[\x00-\x1f\x80-\x9f]/g;
- var reservedRe = /^\.+$/;
-
- var filename;
- var defaultName = this.activeTrace_.filename;
- var fileExtension = '.json';
- var fileRegex = /\.json$/;
- if (/[.]gz$/.test(defaultName)) {
- fileExtension += '.gz';
- fileRegex = /\.json\.gz$/;
- } else if (/[.]zip$/.test(defaultName)) {
- fileExtension = '.zip';
- fileRegex = /\.zip$/;
- }
-
- var custom = prompt('Filename? (' + fileExtension +
- ' appended) Or leave blank:');
- if (custom === null)
- return undefined;
-
- var name;
- if (custom) {
- name = ' ' + custom;
- } else {
- var date = new Date();
- var dateText = ' ' + date.toDateString() +
- ' ' + date.toLocaleTimeString();
- name = dateText;
- }
-
- filename = defaultName.replace(fileRegex, name) + fileExtension;
-
- return filename
- .replace(illegalRe, '.')
- .replace(controlRe, '\u2022')
- .replace(reservedRe, '')
- .replace(/\s+/g, '_');
- },
-
- onSaveClicked_: function() {
- // Create a blob URL from the binary array.
- var blob = new Blob([this.activeTrace_.data],
- {type: 'application/octet-binary'});
- var blobUrl = window.webkitURL.createObjectURL(blob);
-
- // Create a link and click on it. BEST API EVAR!
- var link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
- link.href = blobUrl;
- var filename = this.requestFilename_();
- if (filename) {
- link.download = filename;
- link.click();
- }
- },
-
- onLoadClicked_: function() {
- var inputElement = document.createElement('input');
- inputElement.type = 'file';
- inputElement.multiple = false;
-
- var changeFired = false;
- inputElement.addEventListener(
- 'change',
- function(e) {
- if (changeFired)
- return;
- changeFired = true;
-
- var file = inputElement.files[0];
- tr.ui.b.readFile(file).then(
- function(data) {
- this.setActiveTrace(file.name, data);
- }.bind(this),
- function(err) {
- tr.ui.b.Overlay.showError('Error while loading file: ' + err);
- });
- }.bind(this), false);
- inputElement.click();
- },
-
- ///////////////////////////////////////////////////////////////////////////
-
- initDragAndDrop_: function() {
- this.dropHandler_ = this.dropHandler_.bind(this);
- this.ignoreDragEvent_ = this.ignoreDragEvent_.bind(this);
- document.addEventListener('dragstart', this.ignoreDragEvent_, false);
- document.addEventListener('dragend', this.ignoreDragEvent_, false);
- document.addEventListener('dragenter', this.ignoreDragEvent_, false);
- document.addEventListener('dragleave', this.ignoreDragEvent_, false);
- document.addEventListener('dragover', this.ignoreDragEvent_, false);
- document.addEventListener('drop', this.dropHandler_, false);
- },
-
- detachDragAndDrop_: function() {
- document.removeEventListener('dragstart', this.ignoreDragEvent_);
- document.removeEventListener('dragend', this.ignoreDragEvent_);
- document.removeEventListener('dragenter', this.ignoreDragEvent_);
- document.removeEventListener('dragleave', this.ignoreDragEvent_);
- document.removeEventListener('dragover', this.ignoreDragEvent_);
- document.removeEventListener('drop', this.dropHandler_);
- },
-
- ignoreDragEvent_: function(e) {
- e.preventDefault();
- return false;
- },
-
- dropHandler_: function(e) {
- if (this.isAnyDialogUp_)
- return;
-
- e.stopPropagation();
- e.preventDefault();
-
- var files = e.dataTransfer.files;
- if (files.length !== 1) {
- tr.ui.b.Overlay.showError('1 file supported at a time.');
- return;
- }
-
- tr.ui.b.readFile(files[0]).then(
- function(data) {
- this.setActiveTrace(files[0].name, data);
- }.bind(this),
- function(err) {
- tr.ui.b.Overlay.showError('Error while loading file: ' + err);
- });
- return false;
- }
- };
-
- return {
- ProfilingView: ProfilingView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view_test.html
deleted file mode 100644
index 457d074fe24..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/profiling_view_test.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/ui/extras/about_tracing/profiling_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Base64 = tr.b.Base64;
- var testData = [
- {name: 'a', args: {}, pid: 52, ts: 15000, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 19000, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', args: {}, pid: 52, ts: 32000, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 54000, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- var monitoringOptions = {
- isMonitoring: false,
- categoryFilter: '*',
- useSystemTracing: false,
- useContinuousTracing: false,
- useSampling: false
- };
-
- var ProfilingView = tr.ui.e.about_tracing.ProfilingView;
-
- test('recording', function() {
- var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
- mock.allowLooping = true;
- mock.expectRequest('endRecording', function() {
- return '';
- });
- mock.expectRequest('getCategories', function() {
- return ['a', 'b', 'c'];
- });
- mock.expectRequest('beginRecording', function(data) {
- return '';
- });
- mock.expectRequest('endRecording', function(data) {
- return JSON.stringify(testData);
- });
-
- var view = new ProfilingView(mock);
- view.style.height = '400px';
- view.style.border = '1px solid black';
- this.addHTMLOutput(view);
-
- return new Promise(function(resolve, reject) {
- var recordingPromise = view.beginRecording();
-
- var didAbort = false;
- function pressRecord() {
- if (didAbort)
- return;
- recordingPromise.selectionDlg.clickRecordButton();
- setTimeout(pressStop, 60);
- }
- function pressStop() {
- recordingPromise.progressDlg.clickStopButton();
- }
- setTimeout(pressRecord, 60);
- recordingPromise.then(
- function() {
- resolve();
- },
- function(err) {
- didAbort = true;
- reject(err);
- });
- });
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller.html
deleted file mode 100644
index a72ddfeba07..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/extras/about_tracing/record_selection_dialog.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.about_tracing', function() {
- function beginRecording(tracingControllerClient) {
- var finalPromiseResolver;
- var finalPromise = new Promise(function(resolve, reject) {
- finalPromiseResolver = {
- resolve: resolve,
- reject: reject
- };
- });
- finalPromise.selectionDlg = undefined;
- finalPromise.progressDlg = undefined;
-
- function beginRecordingError(err) {
- finalPromiseResolver.reject(err);
- }
-
- // Step 0: End recording. This is necessary when the user reloads the
- // about:tracing page when we are recording. Window.onbeforeunload is not
- // reliable to end recording on reload.
- endRecording(tracingControllerClient).then(
- getCategories,
- getCategories); // Ignore error.
-
- // But just in case, bind onbeforeunload anyway.
- window.onbeforeunload = function(e) {
- endRecording(tracingControllerClient);
- };
-
- // Step 1: Get categories.
- function getCategories() {
- var p = tracingControllerClient.getCategories().then(
- showTracingDialog,
- beginRecordingError);
- p.catch(function(err) {
- beginRecordingError(err);
- });
- }
-
- // Step 2: Show tracing dialog.
- var selectionDlg;
- function showTracingDialog(categories) {
- selectionDlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- selectionDlg.categories = categories;
- selectionDlg.settings_key =
- 'tr.ui.e.about_tracing.record_selection_dialog';
- selectionDlg.addEventListener('recordclick', startTracing);
- selectionDlg.addEventListener('closeclick', cancelRecording);
- selectionDlg.visible = true;
-
- finalPromise.selectionDlg = selectionDlg;
- }
-
- function cancelRecording() {
- finalPromise.selectionDlg = undefined;
- finalPromiseResolver.reject(new UserCancelledError());
- }
-
- // Step 2: Do the actual tracing dialog.
- var progressDlg;
- var bufferPercentFullDiv;
- function startTracing() {
- progressDlg = new tr.ui.b.Overlay();
- Polymer.dom(progressDlg).textContent = 'Recording...';
- progressDlg.userCanClose = false;
-
- bufferPercentFullDiv = document.createElement('div');
- Polymer.dom(progressDlg).appendChild(bufferPercentFullDiv);
-
- var stopButton = document.createElement('button');
- Polymer.dom(stopButton).textContent = 'Stop';
- progressDlg.clickStopButton = function() {
- stopButton.click();
- };
- Polymer.dom(progressDlg).appendChild(stopButton);
-
- var recordingOptions = {
- categoryFilter: selectionDlg.categoryFilter(),
- useSystemTracing: selectionDlg.useSystemTracing,
- tracingRecordMode: selectionDlg.tracingRecordMode,
- useSampling: selectionDlg.useSampling
- };
-
-
- var requestPromise = tracingControllerClient.beginRecording(
- recordingOptions);
- requestPromise.then(
- function() {
- progressDlg.visible = true;
- stopButton.focus();
- updateBufferPercentFull('0');
- },
- recordFailed);
-
- stopButton.addEventListener('click', function() {
- // TODO(chrishenry): Currently, this only dismiss the progress
- // dialog when tracingComplete event is received. When performing
- // remote debugging, the tracingComplete event may be delayed
- // considerable. We should indicate to user that we are waiting
- // for tracingComplete event instead of being unresponsive. (For
- // now, I disable the "stop" button, since clicking on the button
- // again now cause exception.)
- var recordingPromise = endRecording(tracingControllerClient);
- recordingPromise.then(
- recordFinished,
- recordFailed);
- stopButton.disabled = true;
- bufferPercentFullDiv = undefined;
- });
- finalPromise.progressDlg = progressDlg;
- }
-
- function recordFinished(tracedData) {
- progressDlg.visible = false;
- finalPromise.progressDlg = undefined;
- finalPromiseResolver.resolve(tracedData);
- }
-
- function recordFailed(err) {
- progressDlg.visible = false;
- finalPromise.progressDlg = undefined;
- finalPromiseResolver.reject(err);
- }
-
- function getBufferPercentFull() {
- if (!bufferPercentFullDiv)
- return;
-
- tracingControllerClient.beginGetBufferPercentFull().then(
- updateBufferPercentFull);
- }
-
- function updateBufferPercentFull(percentFull) {
- if (!bufferPercentFullDiv)
- return;
-
- percentFull = Math.round(100 * parseFloat(percentFull));
- var newText = 'Buffer usage: ' + percentFull + '%';
- if (Polymer.dom(bufferPercentFullDiv).textContent !== newText)
- Polymer.dom(bufferPercentFullDiv).textContent = newText;
-
- window.setTimeout(getBufferPercentFull, 500);
- }
-
- // Thats it! We're done.
- return finalPromise;
- }
-
- function endRecording(tracingControllerClient) {
- return tracingControllerClient.endRecording();
- }
-
- function defaultTraceName(tracingControllerClient) {
- return tracingControllerClient.defaultTraceName();
- }
-
- function UserCancelledError() {
- Error.apply(this, arguments);
- }
- UserCancelledError.prototype = {
- __proto__: Error.prototype
- };
-
- return {
- beginRecording: beginRecording,
- UserCancelledError: UserCancelledError,
- defaultTraceName: defaultTraceName
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller_test.html
deleted file mode 100644
index 69c9cc8173d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_controller_test.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/mock_tracing_controller_client.html">
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/record_controller.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var testData = [
- {name: 'a', args: {}, pid: 52, ts: 15000, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'a', args: {}, pid: 52, ts: 19000, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', args: {}, pid: 52, ts: 32000, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 54000, cat: 'foo', tid: 53, ph: 'E'}
- ];
-
- test('fullRecording', function() {
- return new Promise(function(resolve, reject) {
- var mock = new tr.ui.e.about_tracing.MockTracingControllerClient();
- mock.expectRequest('endRecording', function() {
- return '';
- });
- mock.expectRequest('getCategories', function() {
- setTimeout(function() {
- recordingPromise.selectionDlg.clickRecordButton();
- }, 20);
- return ['a', 'b', 'c'];
- });
- mock.expectRequest('beginRecording', function(recordingOptions) {
- assert.typeOf(recordingOptions.categoryFilter, 'string');
- assert.typeOf(recordingOptions.useSystemTracing, 'boolean');
- assert.typeOf(recordingOptions.useSampling, 'boolean');
- assert.typeOf(recordingOptions.tracingRecordMode, 'string');
- setTimeout(function() {
- recordingPromise.progressDlg.clickStopButton();
- }, 10);
- return '';
- });
- mock.expectRequest('endRecording', function(data) {
- return JSON.stringify(testData);
- });
-
- var recordingPromise = tr.ui.e.about_tracing.beginRecording(mock);
-
- return recordingPromise.then(
- function(data) {
- mock.assertAllRequestsHandled();
- var testDataString = JSON.stringify(testData);
- assert.equal(data, testDataString);
- resolve();
- },
- function(error) {
- reject('This should never be reached');
- });
- });
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html
deleted file mode 100644
index 71a333bf60d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog.html
+++ /dev/null
@@ -1,691 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/info_bar_group.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<template id="record-selection-dialog-template">
- <style>
- .categories-column-view {
- display: -webkit-flex;
- -webkit-flex-direction: column;
- font-family: sans-serif;
- max-width: 640px;
- min-height: 0;
- min-width: 0;
- opacity: 1;
- transition: max-height 1s ease, max-width 1s ease, opacity 1s ease;
- will-change: opacity;
- }
-
- .categories-column-view-hidden {
- max-height: 0;
- max-width: 0;
- opacity: 0;
- overflow: hidden;
- display: none;
- }
-
- .categories-selection {
- display: -webkit-flex;
- -webkit-flex-direction: row;
- }
-
- .category-presets {
- padding: 4px;
- }
-
- .category-description {
- color: #aaa;
- font-size: small;
- max-height: 1em;
- opacity: 1;
- padding-left: 4px;
- padding-right: 4px;
- text-align: right;
- transition: max-height 1s ease, opacity 1s ease;
- will-change: opacity;
- }
-
- .category-description-hidden {
- max-height: 0;
- opacity: 0;
- }
-
- .default-enabled-categories,
- .default-disabled-categories {
- -webkit-flex: 1 1 auto;
- display: -webkit-flex;
- -webkit-flex-direction: column;
- padding: 4px;
- width: 300px;
- }
-
- .default-enabled-categories > div,
- .default-disabled-categories > div {
- padding: 4px;
- }
-
- .tracing-modes {
- -webkit-flex: 1 0 auto;
- display: -webkit-flex;
- -webkit-flex-direction: reverse;
- padding: 4px;
- border-bottom: 2px solid #ddd;
- border-top: 2px solid #ddd;
- }
-
- .default-disabled-categories {
- border-left: 2px solid #ddd;
- }
-
- .warning-default-disabled-categories {
- display: inline-block;
- font-weight: bold;
- text-align: center;
- color: #BD2E2E;
- width: 2.0ex;
- height: 2.0ex;
- border-radius: 2.0ex;
- border: 1px solid #BD2E2E;
- }
-
- .categories {
- font-size: 80%;
- padding: 10px;
- -webkit-flex: 1 1 auto;
- }
-
- .group-selectors {
- font-size: 80%;
- border-bottom: 1px solid #ddd;
- padding-bottom: 6px;
- -webkit-flex: 0 0 auto;
- }
-
- .group-selectors button {
- padding: 1px;
- }
-
- .record-selection-dialog .labeled-option-group {
- -webkit-flex: 0 0 auto;
- -webkit-flex-direction: column;
- display: -webkit-flex;
- }
-
- .record-selection-dialog .labeled-option {
- border-top: 5px solid white;
- border-bottom: 5px solid white;
- }
-
- .record-selection-dialog .edit-categories {
- padding-left: 6px;
- }
-
- .record-selection-dialog .edit-categories:after {
- padding-left: 15px;
- font-size: 125%;
- }
-
- .record-selection-dialog .labeled-option-group:not(.categories-expanded)
- .edit-categories:after {
- content: '\25B8'; /* Right triangle */
- }
-
- .record-selection-dialog .labeled-option-group.categories-expanded
- .edit-categories:after {
- content: '\25BE'; /* Down triangle */
- }
-
- </style>
-
- <div class="record-selection-dialog">
- <tr-ui-b-info-bar-group></tr-ui-b-info-bar-group>
- <div class="category-presets">
- </div>
- <div class="category-description"></div>
- <div class="categories-column-view">
- <div class="tracing-modes"></div>
- <div class="categories-selection">
- <div class="default-enabled-categories">
- <div>Record&nbsp;Categories</div>
- <div class="group-selectors">
- Select
- <button class="all-btn">All</button>
- <button class="none-btn">None</button>
- </div>
- <div class="categories"></div>
- </div>
- <div class="default-disabled-categories">
- <div>Disabled&nbsp;by&nbsp;Default&nbsp;Categories
- <a class="warning-default-disabled-categories">!</a>
- </div>
- <div class="group-selectors">
- Select
- <button class="all-btn">All</button>
- <button class="none-btn">None</button>
- </div>
- <div class="categories"></div>
- </div>
- </div>
- </div>
- </div>
-</template>
-
-<script>
-'use strict';
-
-/**
- * @fileoverview RecordSelectionDialog presents the available categories
- * to be enabled/disabled during tr.c.
- */
-tr.exportTo('tr.ui.e.about_tracing', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
- var RecordSelectionDialog = tr.ui.b.define('div');
-
- var DEFAULT_PRESETS = [
- {title: 'Web developer',
- categoryFilter: ['blink', 'cc', 'netlog', 'renderer.scheduler',
- 'toplevel', 'v8']},
- {title: 'Input latency',
- categoryFilter: ['benchmark', 'input', 'evdev', 'renderer.scheduler',
- 'toplevel']},
- {title: 'Rendering',
- categoryFilter: ['blink', 'cc', 'gpu', 'toplevel']},
- {title: 'Javascript and rendering',
- categoryFilter: ['blink', 'cc', 'gpu', 'renderer.scheduler', 'v8',
- 'toplevel']},
- {title: 'Frame Viewer',
- categoryFilter: ['blink', 'cc', 'gpu', 'renderer.scheduler', 'v8',
- 'toplevel',
- 'disabled-by-default-cc.debug',
- 'disabled-by-default-cc.debug.picture',
- 'disabled-by-default-cc.debug.display_items']},
- {title: 'Manually select settings',
- categoryFilter: []}
- ];
- var RECORDING_MODES = [
- {'label': 'Record until full',
- 'value': 'record-until-full'},
- {'label': 'Record continuously',
- 'value': 'record-continuously'},
- {'label': 'Record as much as possible',
- 'value': 'record-as-much-as-possible'}];
- var DEFAULT_RECORD_MODE = 'record-until-full';
- var DEFAULT_CONTINUOUS_TRACING = true;
- var DEFAULT_SYSTEM_TRACING = true;
- var DEFAULT_SAMPLING_TRACING = false;
-
- RecordSelectionDialog.prototype = {
- __proto__: tr.ui.b.Overlay.prototype,
-
- decorate: function() {
- tr.ui.b.Overlay.prototype.decorate.call(this);
- this.title = 'Record a new trace...';
-
- Polymer.dom(this).classList.add('record-dialog-overlay');
-
- var node =
- tr.ui.b.instantiateTemplate('#record-selection-dialog-template',
- THIS_DOC);
- Polymer.dom(this).appendChild(node);
-
- this.recordButtonEl_ = document.createElement('button');
- Polymer.dom(this.recordButtonEl_).textContent = 'Record';
- this.recordButtonEl_.addEventListener(
- 'click',
- this.onRecordButtonClicked_.bind(this));
- this.recordButtonEl_.style.fontSize = '110%';
- Polymer.dom(this.buttons).appendChild(this.recordButtonEl_);
-
- this.categoriesView_ = Polymer.dom(this).querySelector(
- '.categories-column-view');
- this.presetsEl_ = Polymer.dom(this).querySelector('.category-presets');
- Polymer.dom(this.presetsEl_).appendChild(tr.ui.b.createOptionGroup(
- this, 'currentlyChosenPreset',
- 'about_tracing.record_selection_dialog_preset',
- DEFAULT_PRESETS[0].categoryFilter,
- DEFAULT_PRESETS.map(function(p) {
- return { label: p.title, value: p.categoryFilter };
- })));
-
- this.tracingRecordModeSltr_ = tr.ui.b.createSelector(
- this, 'tracingRecordMode',
- 'recordSelectionDialog.tracingRecordMode',
- DEFAULT_RECORD_MODE, RECORDING_MODES);
-
- this.systemTracingBn_ = tr.ui.b.createCheckBox(
- undefined, undefined,
- 'recordSelectionDialog.useSystemTracing', DEFAULT_SYSTEM_TRACING,
- 'System tracing');
- this.samplingTracingBn_ = tr.ui.b.createCheckBox(
- undefined, undefined,
- 'recordSelectionDialog.useSampling', DEFAULT_SAMPLING_TRACING,
- 'State sampling');
- this.tracingModesContainerEl_ = Polymer.dom(this).querySelector(
- '.tracing-modes');
- Polymer.dom(this.tracingModesContainerEl_).appendChild(
- this.tracingRecordModeSltr_);
- Polymer.dom(this.tracingModesContainerEl_).appendChild(
- this.systemTracingBn_);
- Polymer.dom(this.tracingModesContainerEl_).appendChild(
- this.samplingTracingBn_);
-
- this.enabledCategoriesContainerEl_ =
- Polymer.dom(this).querySelector(
- '.default-enabled-categories .categories');
-
- this.disabledCategoriesContainerEl_ =
- Polymer.dom(this).querySelector(
- '.default-disabled-categories .categories');
-
- this.createGroupSelectButtons_(
- Polymer.dom(this).querySelector('.default-enabled-categories'));
- this.createGroupSelectButtons_(
- Polymer.dom(this).querySelector('.default-disabled-categories'));
- this.createDefaultDisabledWarningDialog_(
- Polymer.dom(this).querySelector(
- '.warning-default-disabled-categories'));
- this.editCategoriesOpened_ = false;
-
- // TODO(chrishenry): When used with tr.ui.b.Overlay (such as in
- // chrome://tracing, this does not yet look quite right due to
- // the 10px overlay content padding (but it's good enough).
- this.infoBarGroup_ = Polymer.dom(this).querySelector(
- 'tr-ui-b-info-bar-group');
-
- this.addEventListener('visible-change', this.onVisibleChange_.bind(this));
- },
-
- set supportsSystemTracing(s) {
- if (s) {
- this.systemTracingBn_.style.display = undefined;
- } else {
- this.systemTracingBn_.style.display = 'none';
- this.useSystemTracing = false;
- }
- },
-
- get tracingRecordMode() {
- return this.tracingRecordModeSltr_.selectedValue;
- },
- set tracingRecordMode(value) {
- this.tracingRecordMode_ = value;
- },
-
- get useSystemTracing() {
- return this.systemTracingBn_.checked;
- },
- set useSystemTracing(value) {
- this.systemTracingBn_.checked = !!value;
- },
-
- get useSampling() {
- return this.samplingTracingBn_.checked;
- },
- set useSampling(value) {
- this.samplingTracingBn_.checked = !!value;
- },
-
- set categories(c) {
- if (!(c instanceof Array))
- throw new Error('categories must be an array');
- this.categories_ = c;
-
- for (var i = 0; i < this.categories_.length; i++) {
- var split = this.categories_[i].split(',');
- this.categories_[i] = split.shift();
- if (split.length > 0)
- this.categories_ = this.categories_.concat(split);
- }
- },
-
- set settings_key(k) {
- this.settings_key_ = k;
- },
-
- set settings(s) {
- throw new Error('Dont use this!');
- },
-
- usingPreset_: function() {
- return this.currentlyChosenPreset_.length > 0;
- },
-
- get currentlyChosenPreset() {
- return this.currentlyChosenPreset_;
- },
-
- set currentlyChosenPreset(preset) {
- if (!(preset instanceof Array))
- throw new Error('RecordSelectionDialog.currentlyChosenPreset:' +
- ' preset must be an array.');
- this.currentlyChosenPreset_ = preset;
-
- if (this.usingPreset_()) {
- this.changeEditCategoriesState_(false);
- } else {
- this.updateCategoryColumnView_(true);
- this.changeEditCategoriesState_(true);
- }
- this.updateManualSelectionView_();
- this.updatePresetDescription_();
- },
-
- updateManualSelectionView_: function() {
- var classList = Polymer.dom(this.categoriesView_).classList;
- if (!this.usingPreset_()) {
- classList.remove('categories-column-view-hidden');
- } else {
- if (this.editCategoriesOpened_)
- classList.remove('categories-column-view-hidden');
- else
- classList.add('categories-column-view-hidden');
- }
- },
-
- updateCategoryColumnView_: function(shouldReadFromSettings) {
- var categorySet = Polymer.dom(this).querySelectorAll('.categories');
- for (var i = 0; i < categorySet.length; ++i) {
- var categoryGroup = categorySet[i].children;
- for (var j = 0; j < categoryGroup.length; ++j) {
- var categoryEl = categoryGroup[j].children[0];
- categoryEl.checked = shouldReadFromSettings ?
- tr.b.Settings.get(categoryEl.value, false, this.settings_key_) :
- false;
- }
- }
- },
-
- onClickEditCategories: function() {
- if (!this.usingPreset_())
- return;
-
- if (!this.editCategoriesOpened_) {
- this.updateCategoryColumnView_(false);
- for (var i = 0; i < this.currentlyChosenPreset_.length; ++i) {
- var categoryEl = this.querySelector('#' +
- this.currentlyChosenPreset_[i]);
- if (!categoryEl)
- continue;
- categoryEl.checked = true;
- }
- }
-
- this.changeEditCategoriesState_(!this.editCategoriesOpened_);
- this.updateManualSelectionView_();
- this.recordButtonEl_.focus();
- },
-
- changeEditCategoriesState_: function(editCategoriesState) {
- var presetOptionsGroup = Polymer.dom(this).querySelector(
- '.labeled-option-group');
- if (!presetOptionsGroup)
- return;
-
- this.editCategoriesOpened_ = editCategoriesState;
- if (this.editCategoriesOpened_)
- Polymer.dom(presetOptionsGroup).classList.add('categories-expanded');
- else
- Polymer.dom(presetOptionsGroup).classList.remove(
- 'categories-expanded');
- },
-
- updatePresetDescription_: function() {
- var description = Polymer.dom(this).querySelector(
- '.category-description');
- if (this.usingPreset_()) {
- description.innerText = this.currentlyChosenPreset_;
- Polymer.dom(description).classList.remove(
- 'category-description-hidden');
- } else {
- description.innerText = '';
- if (!Polymer.dom(description).classList.contains(
- 'category-description-hidden'))
- Polymer.dom(description).classList.add('category-description-hidden');
- }
- },
-
- categoryFilter: function() {
- if (this.usingPreset_()) {
- var categories = [];
- var allCategories = this.allCategories_();
- for (var category in allCategories) {
- var disabled = category.indexOf('disabled-by-default-') === 0;
- if (this.currentlyChosenPreset_.indexOf(category) >= 0) {
- if (disabled)
- categories.push(category);
- } else {
- if (!disabled)
- categories.push('-' + category);
- }
- }
- return categories.join(',');
- }
-
- var categories = this.unselectedCategories_();
- var categoriesLength = categories.length;
- var negatedCategories = [];
- for (var i = 0; i < categoriesLength; ++i) {
- // Skip any category with a , as it will cause issues when we negate.
- // Both sides should have been added as separate categories, these can
- // only come from settings.
- if (categories[i].match(/,/))
- continue;
- negatedCategories.push('-' + categories[i]);
- }
- categories = negatedCategories.join(',');
-
- var disabledCategories = this.enabledDisabledByDefaultCategories_();
- disabledCategories = disabledCategories.join(',');
-
- var results = [];
- if (categories !== '')
- results.push(categories);
- if (disabledCategories !== '')
- results.push(disabledCategories);
- return results.join(',');
- },
-
- clickRecordButton: function() {
- this.recordButtonEl_.click();
- },
-
- onRecordButtonClicked_: function() {
- this.visible = false;
- tr.b.dispatchSimpleEvent(this, 'recordclick');
- return false;
- },
-
- collectInputs_: function(inputs, isChecked) {
- var inputsLength = inputs.length;
- var categories = [];
- for (var i = 0; i < inputsLength; ++i) {
- var input = inputs[i];
- if (input.checked === isChecked)
- categories.push(input.value);
- }
- return categories;
- },
-
- unselectedCategories_: function() {
- var inputs =
- Polymer.dom(this.enabledCategoriesContainerEl_).querySelectorAll(
- 'input');
- return this.collectInputs_(inputs, false);
- },
-
- enabledDisabledByDefaultCategories_: function() {
- var inputs =
- Polymer.dom(this.disabledCategoriesContainerEl_).querySelectorAll(
- 'input');
- return this.collectInputs_(inputs, true);
- },
-
- onVisibleChange_: function() {
- if (this.visible)
- this.updateForm_();
- },
-
- buildInputs_: function(inputs, checkedDefault, parent) {
- var inputsLength = inputs.length;
- for (var i = 0; i < inputsLength; i++) {
- var category = inputs[i];
-
- var inputEl = document.createElement('input');
- inputEl.type = 'checkbox';
- inputEl.id = category;
- inputEl.value = category;
-
- inputEl.checked = tr.b.Settings.get(
- category, checkedDefault, this.settings_key_);
- inputEl.onclick = this.updateSetting_.bind(this);
-
- var labelEl = document.createElement('label');
- Polymer.dom(labelEl).textContent =
- category.replace('disabled-by-default-', '');
- Polymer.dom(labelEl).setAttribute('for', category);
-
- var divEl = document.createElement('div');
- Polymer.dom(divEl).appendChild(inputEl);
- Polymer.dom(divEl).appendChild(labelEl);
-
- Polymer.dom(parent).appendChild(divEl);
- }
- },
-
- allCategories_: function() {
- // Dedup the categories. We may have things in settings that are also
- // returned when we query the category list.
- var categorySet = {};
- var allCategories =
- this.categories_.concat(tr.b.Settings.keys(this.settings_key_));
- var allCategoriesLength = allCategories.length;
- for (var i = 0; i < allCategoriesLength; ++i)
- categorySet[allCategories[i]] = true;
- return categorySet;
- },
-
- updateForm_: function() {
- function ignoreCaseCompare(a, b) {
- return a.toLowerCase().localeCompare(b.toLowerCase());
- }
-
- // Clear old categories
- Polymer.dom(this.enabledCategoriesContainerEl_).innerHTML = '';
- Polymer.dom(this.disabledCategoriesContainerEl_).innerHTML = '';
-
- this.recordButtonEl_.focus();
-
- var allCategories = this.allCategories_();
- var categories = [];
- var disabledCategories = [];
- for (var category in allCategories) {
- if (category.indexOf('disabled-by-default-') === 0)
- disabledCategories.push(category);
- else
- categories.push(category);
- }
- disabledCategories = disabledCategories.sort(ignoreCaseCompare);
- categories = categories.sort(ignoreCaseCompare);
-
- if (this.categories_.length === 0) {
- this.infoBarGroup_.addMessage(
- 'No categories found; recording will use default categories.');
- }
-
- this.buildInputs_(categories, true, this.enabledCategoriesContainerEl_);
-
- if (disabledCategories.length > 0) {
- this.disabledCategoriesContainerEl_.hidden = false;
- this.buildInputs_(disabledCategories, false,
- this.disabledCategoriesContainerEl_);
- }
- },
-
- updateSetting_: function(e) {
- var checkbox = e.target;
- tr.b.Settings.set(checkbox.value, checkbox.checked, this.settings_key_);
-
- // Change the current record mode to 'Manually select settings' from
- // preset mode if and only if currently user is in preset record mode
- // and user selects/deselects any category in 'Edit Categories' mode.
- if (this.usingPreset_()) {
- this.currentlyChosenPreset_ = [] /* manually select settings */;
- var categoryEl = this.querySelector(
- '#category-preset-Manually-select-settings');
- categoryEl.checked = true;
- var description = Polymer.dom(this).querySelector(
- '.category-description');
- description.innerText = '';
- Polymer.dom(description).classList.add('category-description-hidden');
- }
- },
-
- createGroupSelectButtons_: function(parent) {
- var flipInputs = function(dir) {
- var inputs = Polymer.dom(parent).querySelectorAll('input');
- for (var i = 0; i < inputs.length; i++) {
- if (inputs[i].checked === dir)
- continue;
- // click() is used so the settings will be correclty stored. Setting
- // checked does not trigger the onclick (or onchange) callback.
- inputs[i].click();
- }
- };
-
- var allBtn = Polymer.dom(parent).querySelector('.all-btn');
- allBtn.onclick = function(evt) {
- flipInputs(true);
- evt.preventDefault();
- };
-
- var noneBtn = Polymer.dom(parent).querySelector('.none-btn');
- noneBtn.onclick = function(evt) {
- flipInputs(false);
- evt.preventDefault();
- };
- },
-
- setWarningDialogOverlayText_: function(messages) {
- var contentDiv = document.createElement('div');
-
- for (var i = 0; i < messages.length; ++i) {
- var messageDiv = document.createElement('div');
- Polymer.dom(messageDiv).textContent = messages[i];
- Polymer.dom(contentDiv).appendChild(messageDiv);
- }
- Polymer.dom(this.warningOverlay_).textContent = '';
- Polymer.dom(this.warningOverlay_).appendChild(contentDiv);
- },
-
- createDefaultDisabledWarningDialog_: function(warningLink) {
- function onClickHandler(evt) {
- this.warningOverlay_ = tr.ui.b.Overlay();
- this.warningOverlay_.parentEl_ = this;
- this.warningOverlay_.title = 'Warning...';
- this.warningOverlay_.userCanClose = true;
- this.warningOverlay_.visible = true;
-
- this.setWarningDialogOverlayText_([
- 'Enabling the default disabled categories may have',
- 'performance and memory impact while tr.c.'
- ]);
-
- evt.preventDefault();
- }
- warningLink.onclick = onClickHandler.bind(this);
- }
- };
-
- return {
- RecordSelectionDialog: RecordSelectionDialog
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog_test.html
deleted file mode 100644
index 7dfc4e0a7cf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/record_selection_dialog_test.html
+++ /dev/null
@@ -1,391 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/extras/about_tracing/record_selection_dialog.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantitate', function() {
- var showButton = document.createElement('button');
- Polymer.dom(showButton).textContent = 'Show record selection dialog';
- this.addHTMLOutput(showButton);
-
- showButton.addEventListener('click', function(e) {
- e.stopPropagation();
-
- var categories = [];
- for (var i = 0; i < 30; i++)
- categories.push('cat-' + i);
- for (var i = 0; i < 20; i++)
- categories.push('disabled-by-default-cat-' + i);
- categories.push(
- 'really-really-really-really-really-really-very-loong-cat');
- categories.push('first,second,third');
- categories.push('cc,disabled-by-default-cc.debug');
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = categories;
- dlg.settings_key = 'key';
- dlg.visible = true;
- });
- });
-
- test('recordSelectionDialog_splitCategories', function() {
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories =
- ['cc,disabled-by-default-one,cc.debug', 'two,three', 'three'];
- dlg.settings_key = 'key';
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
-
- var expected =
- ['"cc"', '"cc.debug"', '"disabled-by-default-one"', '"three"', '"two"'];
-
- var labels = Polymer.dom(dlg).querySelectorAll('.categories input');
- var results = [];
- for (var i = 0; i < labels.length; i++) {
- results.push('"' + labels[i].value + '"');
- }
- results = results.sort();
-
- assert.deepEqual(results, expected);
- });
-
- test('recordSelectionDialog_UpdateForm_NoSettings', function() {
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one', 'two', 'three'];
- dlg.settings_key = 'key';
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
-
- var checkboxes = Polymer.dom(dlg).querySelectorAll('.categories input');
- assert.equal(checkboxes.length, 3);
- assert.equal(checkboxes[0].id, 'three');
- assert.equal(checkboxes[0].value, 'three');
- assert.isTrue(checkboxes[0].checked);
- assert.equal(checkboxes[1].id, 'two');
- assert.equal(checkboxes[1].value, 'two');
- assert.isTrue(checkboxes[1].checked);
- assert.equal(checkboxes[2].id, 'disabled-by-default-one');
- assert.equal(checkboxes[2].value, 'disabled-by-default-one');
- assert.isFalse(checkboxes[2].checked);
-
- assert.equal(dlg.categoryFilter(), '');
-
- var labels = Polymer.dom(dlg).querySelectorAll('.categories label');
- assert.equal(labels.length, 3);
- assert.equal(Polymer.dom(labels[0]).textContent, 'three');
- assert.equal(Polymer.dom(labels[1]).textContent, 'two');
- assert.equal(Polymer.dom(labels[2]).textContent, 'one');
- });
-
- test('recordSelectionDialog_UpdateForm_Settings', function() {
- tr.b.Settings.set('two', true, 'categories');
- tr.b.Settings.set('three', false, 'categories');
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one'];
- dlg.settings_key = 'categories';
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
-
- var checkboxes = Polymer.dom(dlg).querySelectorAll('.categories input');
- assert.equal(checkboxes.length, 3);
- assert.equal(checkboxes[0].id, 'three');
- assert.equal(checkboxes[0].value, 'three');
- assert.isFalse(checkboxes[0].checked);
- assert.equal(checkboxes[1].id, 'two');
- assert.equal(checkboxes[1].value, 'two');
- assert.isTrue(checkboxes[1].checked);
- assert.equal(checkboxes[2].id, 'disabled-by-default-one');
- assert.equal(checkboxes[2].value, 'disabled-by-default-one');
- assert.isFalse(checkboxes[2].checked);
-
- assert.equal(dlg.categoryFilter(), '-three');
-
- var labels = Polymer.dom(dlg).querySelectorAll('.categories label');
- assert.equal(labels.length, 3);
- assert.equal(Polymer.dom(labels[0]).textContent, 'three');
- assert.equal(Polymer.dom(labels[1]).textContent, 'two');
- assert.equal(Polymer.dom(labels[2]).textContent, 'one');
- });
-
- test('recordSelectionDialog_UpdateForm_DisabledByDefault', function() {
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-bar', 'baz'];
- dlg.settings_key = 'categories';
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
-
- assert.equal(dlg.categoryFilter(), '');
-
- var inputs =
- Polymer.dom(dlg).querySelector('input#disabled-by-default-bar').click();
-
- assert.equal(dlg.categoryFilter(), 'disabled-by-default-bar');
-
- assert.isFalse(
- tr.b.Settings.get('disabled-by-default-foo', false, 'categories'));
- });
-
- test('selectAll', function() {
- tr.b.Settings.set('two', true, 'categories');
- tr.b.Settings.set('three', false, 'categories');
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one'];
- dlg.settings_key = 'categories';
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
- });
-
- test('selectNone', function() {
- tr.b.Settings.set('two', true, 'categories');
- tr.b.Settings.set('three', false, 'categories');
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one'];
- dlg.settings_key = 'categories';
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
-
- // Enables the three option, two already enabled.
- Polymer.dom(dlg).querySelector('.default-enabled-categories .all-btn')
- .click();
- assert.equal(dlg.categoryFilter(), '');
- assert.isTrue(tr.b.Settings.get('three', false, 'categories'));
-
- // Disables three and two.
- Polymer.dom(dlg).querySelector('.default-enabled-categories .none-btn')
- .click();
- assert.equal(dlg.categoryFilter(), '-three,-two');
- assert.isFalse(tr.b.Settings.get('two', false, 'categories'));
- assert.isFalse(tr.b.Settings.get('three', false, 'categories'));
-
- // Turn categories back on so they can be ignored.
- Polymer.dom(dlg).querySelector('.default-enabled-categories .all-btn')
- .click();
-
- // Enables disabled category.
- Polymer.dom(dlg).querySelector('.default-disabled-categories .all-btn')
- .click();
- assert.equal(dlg.categoryFilter(), 'disabled-by-default-one');
- assert.isTrue(
- tr.b.Settings.get('disabled-by-default-one', false, 'categories'));
-
- // Turn disabled by default back off.
- Polymer.dom(dlg).querySelector('.default-disabled-categories .none-btn')
- .click();
- assert.equal(dlg.categoryFilter(), '');
- assert.isFalse(
- tr.b.Settings.get('disabled-by-default-one', false, 'categories'));
- });
-
- test('recordSelectionDialog_noPreset', function() {
- tr.b.Settings.set('about_tracing.record_selection_dialog_preset', []);
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- assert.isFalse(dlg.usingPreset_());
- });
-
- test('recordSelectionDialog_defaultPreset', function() {
- tr.b.Settings.set('two', true, 'categories');
- tr.b.Settings.set('three', false, 'categories');
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one'];
- dlg.settings_key = 'categories';
- // Note: currentlyChosenPreset is not set here, so the default is used.
- dlg.updateForm_();
-
- // Make sure the default filter is returned.
- assert.equal(dlg.categoryFilter(), '-three,-two');
-
- // Make sure the default tracing types are returned.
- assert.equal(dlg.tracingRecordMode, 'record-until-full');
- assert.isTrue(dlg.useSystemTracing);
- assert.isFalse(dlg.useSampling);
-
- // Make sure the manual settings are not visible.
- var classList = Polymer.dom(dlg.categoriesView_).classList;
- assert.isTrue(classList.contains('categories-column-view-hidden'));
-
- // Verify manual settings do not modify the checkboxes.
- var checkboxes = Polymer.dom(dlg).querySelectorAll('.categories input');
- assert.equal(checkboxes.length, 3);
- assert.equal(checkboxes[0].id, 'three');
- assert.equal(checkboxes[0].value, 'three');
- assert.isFalse(checkboxes[0].checked);
- assert.equal(checkboxes[1].id, 'two');
- assert.equal(checkboxes[1].value, 'two');
- assert.isTrue(checkboxes[1].checked);
- assert.equal(checkboxes[2].id, 'disabled-by-default-one');
- assert.equal(checkboxes[2].value, 'disabled-by-default-one');
- assert.isFalse(checkboxes[2].checked);
- });
-
- test('recordSelectionDialog_editPreset', function() {
- function createDialog() {
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['one', 'two', 'disabled-by-default-three'];
- dlg.settings_key = 'categories';
- // Note: currentlyChosenPreset is not set here, so the default is used.
- dlg.updateForm_();
- return dlg;
- }
-
- // After the dialog is created, it should be using the default preset.
- var dlg = createDialog();
- assert.strictEqual(dlg.categoryFilter(), '-one,-two');
- assert.isTrue(dlg.usingPreset_());
- assert.isFalse(
- dlg.querySelector('#category-preset-Manually-select-settings').checked);
-
- // After clicking on "Edit Categories", the default preset should still be
- // used.
- dlg.onClickEditCategories();
- assert.strictEqual(dlg.categoryFilter(), '-one,-two');
- assert.isTrue(dlg.usingPreset_());
- assert.isFalse(
- dlg.querySelector('#category-preset-Manually-select-settings').checked);
-
- // After clicking on category checkbox(es), the mode should be changed to
- // "Manually select settings".
- Array.prototype.forEach.call(dlg.querySelectorAll('.categories input'),
- checkbox => checkbox.click());
- assert.strictEqual(dlg.categoryFilter(), 'disabled-by-default-three');
- assert.isFalse(dlg.usingPreset_());
- assert.isTrue(
- dlg.querySelector('#category-preset-Manually-select-settings').checked);
-
- // After the dialog is opened again, it should be using the default preset.
- // More importantly, the default preset should NOT be modified.
- dlg = createDialog();
- assert.strictEqual(dlg.categoryFilter(), '-one,-two');
- assert.isTrue(dlg.usingPreset_());
- assert.isFalse(
- dlg.querySelector('#category-preset-Manually-select-settings').checked);
- });
-
- test('recordSelectionDialog_changePresets', function() {
- tr.b.Settings.set('two', true, 'categories');
- tr.b.Settings.set('three', false, 'categories');
- tr.b.Settings.set('disabled-by-default-cc.debug', true, 'categories');
- tr.b.Settings.set('recordSelectionDialog.tracingRecordMode',
- 'record-as-much-as-possible');
- tr.b.Settings.set('recordSelectionDialog.useSystemTracing', true);
- tr.b.Settings.set('recordSelectionDialog.useSampling', false);
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one'];
- dlg.settings_key = 'categories';
- // Note: currentlyChosenPreset is not set here, so the default is used.
- dlg.updateForm_();
-
- // Preset mode is on.
- assert.isTrue(dlg.usingPreset_());
-
- // Make sure the default filter is returned.
- assert.equal(dlg.categoryFilter(),
- '-three,-two');
-
- // Make sure the default tracing types are returned.
- assert.equal(dlg.tracingRecordMode, 'record-as-much-as-possible');
- assert.isTrue(dlg.useSystemTracing);
- assert.isFalse(dlg.useSampling);
-
- // Make sure the manual settings are not visible.
- var classList = Polymer.dom(dlg.categoriesView_).classList;
- assert.isTrue(classList.contains('categories-column-view-hidden'));
-
- // Switch to manual settings and verify the default values are not returned.
- dlg.currentlyChosenPreset = [];
-
- // Preset mode is off.
- assert.isFalse(dlg.usingPreset_());
-
- // Make sure the default filter is returned.
- assert.equal(dlg.categoryFilter(), '-three,disabled-by-default-cc.debug');
-
- // Make sure the tracing types set by catalog are returned.
- assert.equal(dlg.tracingRecordMode, 'record-as-much-as-possible');
- assert.isTrue(dlg.useSystemTracing);
- assert.isFalse(dlg.useSampling);
- assert.isFalse(classList.contains('categories-column-view-hidden'));
-
- // Switch to the graphics, rendering, and rasterization preset.
- dlg.currentlyChosenPreset = ['blink', 'cc', 'renderer',
- 'disabled-by-default-cc.debug'];
- assert.equal(dlg.categoryFilter(),
- 'disabled-by-default-cc.debug,-three,-two');
- });
-
- test('recordSelectionDialog_savedPreset', function() {
- tr.b.Settings.set('two', true, 'categories');
- tr.b.Settings.set('three', false, 'categories');
- tr.b.Settings.set('recordSelectionDialog.tracingRecordMode',
- 'record-continuously');
- tr.b.Settings.set('recordSelectionDialog.useSystemTracing', true);
- tr.b.Settings.set('recordSelectionDialog.useSampling', true);
- tr.b.Settings.set('tr.ui.e.about_tracing.record_selection_dialog_preset',
- ['blink', 'cc', 'renderer', 'cc.debug']);
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.categories = ['disabled-by-default-one'];
- dlg.settings_key = 'categories';
- dlg.updateForm_();
-
- // Make sure the correct filter is returned.
- assert.equal(dlg.categoryFilter(), '-three,-two');
-
- // Make sure the correct tracing types are returned.
- assert.equal(dlg.tracingRecordMode, 'record-continuously');
- assert.isTrue(dlg.useSystemTracing);
- assert.isTrue(dlg.useSampling);
-
- // Make sure the manual settings are not visible.
- var classList = Polymer.dom(dlg.categoriesView_).classList;
- assert.isTrue(classList.contains('categories-column-view-hidden'));
-
- // Switch to manual settings and verify the default values are not returned.
- dlg.currentlyChosenPreset = [];
- assert.equal(dlg.categoryFilter(), '-three');
- assert.equal(dlg.tracingRecordMode, 'record-continuously');
- assert.isTrue(dlg.useSystemTracing);
- assert.isTrue(dlg.useSampling);
- assert.isFalse(classList.contains('categories-column-view-hidden'));
- });
-
- test('recordSelectionDialog_categoryFilters', function() {
- tr.b.Settings.set('default1', true, 'categories');
- tr.b.Settings.set('disabled1', false, 'categories');
- tr.b.Settings.set('disabled-by-default-cc.disabled2', false, 'categories');
- tr.b.Settings.set('input', true, 'categories');
- tr.b.Settings.set('blink', true, 'categories');
- tr.b.Settings.set('cc', false, 'categories');
- tr.b.Settings.set('disabled-by-default-cc.debug', true, 'categories');
-
- var dlg = new tr.ui.e.about_tracing.RecordSelectionDialog();
- dlg.settings_key = 'categories';
- dlg.categories = [];
- dlg.currentlyChosenPreset = [];
- dlg.updateForm_();
-
- assert.equal(dlg.categoryFilter(),
- '-cc,-disabled1,disabled-by-default-cc.debug');
-
- // Switch to the graphics, rendering, and rasterization preset.
- dlg.currentlyChosenPreset = ['blink', 'cc', 'renderer',
- 'disabled-by-default-cc.debug'];
- assert.equal(dlg.categoryFilter(),
- '-default1,disabled-by-default-cc.debug,-disabled1,-input');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/tracing_controller_client.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/tracing_controller_client.html
deleted file mode 100644
index 8c34b00e859..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/tracing_controller_client.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.about_tracing', function() {
- /**
- * Communicates with content/browser/tracing_controller_impl.cc
- *
- * @constructor
- */
- function TracingControllerClient() { }
-
- TracingControllerClient.prototype = {
- beginMonitoring: function(monitoringOptions) { },
- endMonitoring: function() { },
- captureMonitoring: function() { },
- getMonitoringStatus: function() { },
- getCategories: function() { },
- beginRecording: function(recordingOptions) { },
- beginGetBufferPercentFull: function() { },
- endRecording: function() { },
- defaultTraceName: function() { }
- };
-
- return {
- TracingControllerClient: TracingControllerClient
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/xhr_based_tracing_controller_client.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/xhr_based_tracing_controller_client.html
deleted file mode 100644
index a33e614813e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/about_tracing/xhr_based_tracing_controller_client.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import"
- href="/tracing/ui/extras/about_tracing/tracing_controller_client.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.about_tracing', function() {
- var Base64 = tr.b.Base64;
-
- function beginXhr(method, path, data) {
- if (data === undefined)
- data = null;
- return new Promise(function(resolve, reject) {
- var req = new XMLHttpRequest();
- if (method !== 'POST' && data !== null)
- throw new Error('Non-POST should have data==null');
- req.open(method, path, true);
- req.onreadystatechange = function(e) {
- if (req.readyState === 4) {
- window.setTimeout(function() {
- if (req.status === 200 && req.responseText !== '##ERROR##') {
- resolve(req.responseText);
- } else {
- reject(new Error('Error occured at ' + path));
- }
- }, 0);
- }
- };
- req.send(data);
- });
- }
-
- /**
- * @constructor
- */
- function XhrBasedTracingControllerClient() { }
-
- XhrBasedTracingControllerClient.prototype = {
- __proto__: tr.ui.e.about_tracing.TracingControllerClient.prototype,
-
- beginMonitoring: function(monitoringOptions) {
- var monitoringOptionsB64 = Base64.btoa(JSON.stringify(monitoringOptions));
- return beginXhr('GET', '/json/begin_monitoring?' + monitoringOptionsB64);
- },
-
- endMonitoring: function() {
- return beginXhr('GET', '/json/end_monitoring');
- },
-
- captureMonitoring: function() {
- return beginXhr('GET', '/json/capture_monitoring_compressed').then(
- function(data) {
- var decodedSize = Base64.getDecodedBufferLength(data);
- var buffer = new ArrayBuffer(decodedSize);
- Base64.DecodeToTypedArray(data, new DataView(buffer));
- return buffer;
- }
- );
- },
-
- getMonitoringStatus: function() {
- return beginXhr('GET', '/json/get_monitoring_status').then(
- function(monitoringOptionsB64) {
- return JSON.parse(Base64.atob(monitoringOptionsB64));
- });
- },
-
- getCategories: function() {
- return beginXhr('GET', '/json/categories').then(
- function(json) {
- return JSON.parse(json);
- });
- },
-
- beginRecording: function(recordingOptions) {
- var recordingOptionsB64 = Base64.btoa(JSON.stringify(recordingOptions));
- return beginXhr('GET', '/json/begin_recording?' +
- recordingOptionsB64);
- },
-
- beginGetBufferPercentFull: function() {
- return beginXhr('GET', '/json/get_buffer_percent_full');
- },
-
- endRecording: function() {
- return beginXhr('GET', '/json/end_recording_compressed').then(
- function(data) {
- var decodedSize = Base64.getDecodedBufferLength(data);
- var buffer = new ArrayBuffer(decodedSize);
- Base64.DecodeToTypedArray(data, new DataView(buffer));
- return buffer;
- }
- );
- },
-
- defaultTraceName: function() {
- return 'trace.json.gz';
- }
- };
-
- return {
- XhrBasedTracingControllerClient: XhrBasedTracingControllerClient
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/cc.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/cc.html
deleted file mode 100644
index 79ba7e593c0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/cc.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/cc.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/display_item_list_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_selection.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/tile_view.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html
deleted file mode 100644
index 37403d8f7fd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html
+++ /dev/null
@@ -1,476 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/base/info_bar.html">
-<link rel="import" href="/tracing/ui/base/list_view.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_selector.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/display_item_list_item.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_ops_list_view.html">
-
-<template id="tr-ui-e-chrome-cc-display-item-debugger-template">
- <style>
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger {
- -webkit-flex: 1 1 auto;
- display: -webkit-flex;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel {
- -webkit-flex-direction: column;
- display: -webkit-flex;
- min-width: 300px;
- overflow-y: auto;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
- display-item-info {
- -webkit-flex: 1 1 auto;
- padding-top: 2px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
- display-item-info .title {
- font-weight: bold;
- margin-left: 5px;
- margin-right: 5px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
- display-item-info .export {
- margin: 5px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > tr-ui-b-drag-handle {
- -webkit-flex: 0 0 auto;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel {
- -webkit-flex: 1 1 auto;
- display: -webkit-flex;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > left-panel >
- display-item-info > header {
- border-bottom: 1px solid #555;
- }
-
- /*************************************************/
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
- tr-ui-e-chrome-cc-picture-ops-list-view.hasPictureOps {
- display: block;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
- tr-ui-b-drag-handle.hasPictureOps {
- display: block;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
- tr-ui-e-chrome-cc-picture-ops-list-view {
- display: none;
- overflow-y: auto;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger > right-panel >
- tr-ui-b-drag-handle {
- display: none;
- }
-
- * /deep/ tr-ui-e-chrome-cc-display-item-debugger raster-area {
- -webkit-flex: 1 1 auto;
- background-color: #ddd;
- min-height: 200px;
- min-width: 200px;
- overflow-y: auto;
- padding-left: 5px;
- }
- </style>
-
- <left-panel>
- <display-item-info>
- <header>
- <span class='title'>Display Item List</span>
- <span class='size'></span>
- <div class='export'>
- <input class='dlfilename' type='text' value='displayitemlist.json' />
- <button class='dlexport'>Export display item list</button>
- </div>
- <div class='export'>
- <input class='skpfilename' type='text' value='skpicture.skp' />
- <button class='skpexport'>Export list as SkPicture</button>
- </div>
- </header>
- </display-item-info>
- </left-panel>
- <right-panel>
- <raster-area><canvas></canvas></raster-area>
- </right-panel>
-</template>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- /**
- * DisplayItemDebugger is a view of a DisplayItemListSnapshot for inspecting
- * a display item list and the pictures within it.
- *
- * @constructor
- */
- var DisplayItemDebugger = tr.ui.b.define(
- 'tr-ui-e-chrome-cc-display-item-debugger');
-
- DisplayItemDebugger.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- var node = tr.ui.b.instantiateTemplate(
- '#tr-ui-e-chrome-cc-display-item-debugger-template', THIS_DOC);
-
- Polymer.dom(this).appendChild(node);
-
- this.pictureAsImageData_ = undefined;
- this.zoomScaleValue_ = 1;
-
- this.sizeInfo_ = Polymer.dom(this).querySelector('.size');
- this.rasterArea_ = Polymer.dom(this).querySelector('raster-area');
- this.rasterCanvas_ =
- Polymer.dom(this.rasterArea_).querySelector('canvas');
- this.rasterCtx_ = this.rasterCanvas_.getContext('2d');
-
- this.trackMouse_();
-
- this.displayItemInfo_ =
- Polymer.dom(this).querySelector('display-item-info');
- this.displayItemInfo_.addEventListener(
- 'click', this.onDisplayItemInfoClick_.bind(this), false);
-
- this.displayItemListView_ = new tr.ui.b.ListView();
- this.displayItemListView_.addEventListener('selection-changed',
- this.onDisplayItemListSelection_.bind(this));
- Polymer.dom(this.displayItemInfo_).appendChild(this.displayItemListView_);
-
- this.displayListFilename_ =
- Polymer.dom(this).querySelector('.dlfilename');
- this.displayListExportButton_ =
- Polymer.dom(this).querySelector('.dlexport');
- this.displayListExportButton_.addEventListener(
- 'click', this.onExportDisplayListClicked_.bind(this));
-
- this.skpFilename_ = Polymer.dom(this).querySelector('.skpfilename');
- this.skpExportButton_ = Polymer.dom(this).querySelector('.skpexport');
- this.skpExportButton_.addEventListener(
- 'click', this.onExportSkPictureClicked_.bind(this));
-
- var leftPanel = Polymer.dom(this).querySelector('left-panel');
-
- var middleDragHandle = document.createElement('tr-ui-b-drag-handle');
- middleDragHandle.horizontal = false;
- middleDragHandle.target = leftPanel;
-
- var rightPanel = Polymer.dom(this).querySelector('right-panel');
-
- this.infoBar_ = document.createElement('tr-ui-b-info-bar');
- Polymer.dom(this.rasterArea_).insertBefore(
- this.infoBar_, this.rasterCanvas_);
-
- Polymer.dom(this).insertBefore(middleDragHandle, rightPanel);
-
- this.picture_ = undefined;
-
- this.pictureOpsListView_ = new tr.ui.e.chrome.cc.PictureOpsListView();
- Polymer.dom(rightPanel).insertBefore(
- this.pictureOpsListView_, this.rasterArea_);
-
- this.pictureOpsListDragHandle_ =
- document.createElement('tr-ui-b-drag-handle');
- this.pictureOpsListDragHandle_.horizontal = false;
- this.pictureOpsListDragHandle_.target = this.pictureOpsListView_;
- Polymer.dom(rightPanel).insertBefore(
- this.pictureOpsListDragHandle_, this.rasterArea_);
- },
-
- get picture() {
- return this.picture_;
- },
-
- set displayItemList(displayItemList) {
- this.displayItemList_ = displayItemList;
- this.picture = this.displayItemList_;
-
- this.displayItemListView_.clear();
- this.displayItemList_.items.forEach(function(item) {
- var listItem = document.createElement(
- 'tr-ui-e-chrome-cc-display-item-list-item');
- listItem.data = item;
- Polymer.dom(this.displayItemListView_).appendChild(listItem);
- }.bind(this));
- },
-
- set picture(picture) {
- this.picture_ = picture;
-
- // Hide the ops list if we are showing the "main" display item list.
- var showOpsList = picture && picture !== this.displayItemList_;
- this.updateDrawOpsList_(showOpsList);
-
- if (picture) {
- var size = this.getRasterCanvasSize_();
- this.rasterCanvas_.width = size.width;
- this.rasterCanvas_.height = size.height;
- }
-
- var bounds = this.rasterArea_.getBoundingClientRect();
- var selectorBounds = this.mouseModeSelector_.getBoundingClientRect();
- this.mouseModeSelector_.pos = {
- x: (bounds.right - selectorBounds.width - 10),
- y: bounds.top
- };
-
- this.rasterize_();
-
- this.scheduleUpdateContents_();
- },
-
- getRasterCanvasSize_: function() {
- var style = window.getComputedStyle(this.rasterArea_);
- var width = parseInt(style.width);
- var height = parseInt(style.height);
- if (this.picture_) {
- width = Math.max(width, this.picture_.layerRect.width);
- height = Math.max(height, this.picture_.layerRect.height);
- }
-
- return {
- width: width,
- height: height
- };
- },
-
- scheduleUpdateContents_: function() {
- if (this.updateContentsPending_)
- return;
- this.updateContentsPending_ = true;
- tr.b.requestAnimationFrameInThisFrameIfPossible(
- this.updateContents_.bind(this)
- );
- },
-
- updateContents_: function() {
- this.updateContentsPending_ = false;
-
- if (this.picture_) {
- Polymer.dom(this.sizeInfo_).textContent = '(' +
- this.picture_.layerRect.width + ' x ' +
- this.picture_.layerRect.height + ')';
- }
-
- // Return if picture hasn't finished rasterizing.
- if (!this.pictureAsImageData_)
- return;
-
- this.infoBar_.visible = false;
- this.infoBar_.removeAllButtons();
- if (this.pictureAsImageData_.error) {
- this.infoBar_.message = 'Cannot rasterize...';
- this.infoBar_.addButton('More info...', function(e) {
- var overlay = new tr.ui.b.Overlay();
- Polymer.dom(overlay).textContent = this.pictureAsImageData_.error;
- overlay.visible = true;
- e.stopPropagation();
- return false;
- }.bind(this));
- this.infoBar_.visible = true;
- }
-
- this.drawPicture_();
- },
-
- drawPicture_: function() {
- var size = this.getRasterCanvasSize_();
- if (size.width !== this.rasterCanvas_.width)
- this.rasterCanvas_.width = size.width;
- if (size.height !== this.rasterCanvas_.height)
- this.rasterCanvas_.height = size.height;
-
- this.rasterCtx_.clearRect(0, 0, size.width, size.height);
-
- if (!this.picture_ || !this.pictureAsImageData_.imageData)
- return;
-
- var imgCanvas = this.pictureAsImageData_.asCanvas();
- var w = imgCanvas.width;
- var h = imgCanvas.height;
- this.rasterCtx_.drawImage(imgCanvas, 0, 0, w, h,
- 0, 0, w * this.zoomScaleValue_,
- h * this.zoomScaleValue_);
- },
-
- rasterize_: function() {
- if (this.picture_) {
- this.picture_.rasterize(
- {
- showOverdraw: false
- },
- this.onRasterComplete_.bind(this));
- }
- },
-
- onRasterComplete_: function(pictureAsImageData) {
- this.pictureAsImageData_ = pictureAsImageData;
- this.scheduleUpdateContents_();
- },
-
- onDisplayItemListSelection_: function(e) {
- var selected = this.displayItemListView_.selectedElement;
-
- if (!selected) {
- this.picture = this.displayItemList_;
- return;
- }
-
- var index = Array.prototype.indexOf.call(
- this.displayItemListView_.children, selected);
- var displayItem = this.displayItemList_.items[index];
- if (displayItem && displayItem.skp64)
- this.picture = new tr.e.cc.Picture(
- displayItem.skp64, this.displayItemList_.layerRect);
- else
- this.picture = undefined;
- },
-
- onDisplayItemInfoClick_: function(e) {
- if (e && e.target === this.displayItemInfo_) {
- this.displayItemListView_.selectedElement = undefined;
- }
- },
-
- updateDrawOpsList_: function(showOpsList) {
- if (showOpsList) {
- this.pictureOpsListView_.picture = this.picture_;
- if (this.pictureOpsListView_.numOps > 0) {
- Polymer.dom(this.pictureOpsListView_).classList.add('hasPictureOps');
- Polymer.dom(this.pictureOpsListDragHandle_).classList.add(
- 'hasPictureOps');
- }
- } else {
- Polymer.dom(this.pictureOpsListView_).classList.remove('hasPictureOps');
- Polymer.dom(this.pictureOpsListDragHandle_).classList.remove(
- 'hasPictureOps');
- }
- },
-
- trackMouse_: function() {
- this.mouseModeSelector_ = document.createElement(
- 'tr-ui-b-mouse-mode-selector');
- this.mouseModeSelector_.targetElement = this.rasterArea_;
- Polymer.dom(this.rasterArea_).appendChild(this.mouseModeSelector_);
-
- this.mouseModeSelector_.supportedModeMask =
- tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;
- this.mouseModeSelector_.mode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;
- this.mouseModeSelector_.defaultMode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;
- this.mouseModeSelector_.settingsKey = 'pictureDebugger.mouseModeSelector';
-
- this.mouseModeSelector_.addEventListener('beginzoom',
- this.onBeginZoom_.bind(this));
- this.mouseModeSelector_.addEventListener('updatezoom',
- this.onUpdateZoom_.bind(this));
- this.mouseModeSelector_.addEventListener('endzoom',
- this.onEndZoom_.bind(this));
- },
-
- onBeginZoom_: function(e) {
- this.isZooming_ = true;
-
- this.lastMouseViewPos_ = this.extractRelativeMousePosition_(e);
-
- e.preventDefault();
- },
-
- onUpdateZoom_: function(e) {
- if (!this.isZooming_)
- return;
-
- var currentMouseViewPos = this.extractRelativeMousePosition_(e);
-
- // Take the distance the mouse has moved and we want to zoom at about
- // 1/1000th of that speed. 0.01 feels jumpy. This could possibly be tuned
- // more if people feel it's too slow.
- this.zoomScaleValue_ +=
- ((this.lastMouseViewPos_.y - currentMouseViewPos.y) * 0.001);
- this.zoomScaleValue_ = Math.max(this.zoomScaleValue_, 0.1);
-
- this.drawPicture_();
-
- this.lastMouseViewPos_ = currentMouseViewPos;
- },
-
- onEndZoom_: function(e) {
- this.lastMouseViewPos_ = undefined;
- this.isZooming_ = false;
- e.preventDefault();
- },
-
- extractRelativeMousePosition_: function(e) {
- return {
- x: e.clientX - this.rasterArea_.offsetLeft,
- y: e.clientY - this.rasterArea_.offsetTop
- };
- },
-
- saveFile_: function(filename, rawData) {
- if (!rawData)
- return;
-
- // Convert this String into an Uint8Array
- var length = rawData.length;
- var arrayBuffer = new ArrayBuffer(length);
- var uint8Array = new Uint8Array(arrayBuffer);
- for (var c = 0; c < length; c++)
- uint8Array[c] = rawData.charCodeAt(c);
-
- // Create a blob URL from the binary array.
- var blob = new Blob([uint8Array], {type: 'application/octet-binary'});
- var blobUrl = window.URL.createObjectURL(blob);
-
- // Create a link and click on it.
- var link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
- link.href = blobUrl;
- link.download = filename;
- var event = document.createEvent('MouseEvents');
- event.initMouseEvent(
- 'click', true, false, window, 0, 0, 0, 0, 0,
- false, false, false, false, 0, null);
- link.dispatchEvent(event);
- },
-
- onExportDisplayListClicked_: function() {
- var rawData = JSON.stringify(this.displayItemList_.items);
- this.saveFile_(this.displayListFilename_.value, rawData);
- },
-
- onExportSkPictureClicked_: function() {
- var rawData = tr.b.Base64.atob(this.picture_.getBase64SkpData());
- this.saveFile_(this.skpFilename_.value, rawData);
- }
- };
-
- return {
- DisplayItemDebugger: DisplayItemDebugger
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger_test.html
deleted file mode 100644
index 91ea9ea4304..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_debugger_test.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/display_item_list.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/display_item_debugger.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var displayItemList = new tr.e.cc.DisplayItemListSnapshot(
- {id: '31415'},
- 10,
- {
- 'params': {
- 'layer_rect': [-15, -15, 46, 833],
- 'items': [
- 'BeginClipDisplayItem',
- 'EndClipDisplayItem'
- ]
- },
- 'skp64': '[another skia picture in base64]'});
- displayItemList.preInitialize();
- displayItemList.initialize();
-
- var dbg = new tr.ui.e.chrome.cc.DisplayItemDebugger();
- this.addHTMLOutput(dbg);
- assert.isUndefined(dbg.displayItemList_);
- assert.isUndefined(dbg.picture_);
- dbg.displayItemList = displayItemList;
- assert.isDefined(dbg.displayItemList_);
- assert.isDefined(dbg.picture_);
- assert.equal(dbg.displayItemList_.items.length, 2);
- dbg.style.border = '1px solid black';
- });
-
- test('selections', function() {
- var displayItemList = new tr.e.cc.DisplayItemListSnapshot(
- {id: '31415'},
- 10,
- {
- 'params': {
- 'layer_rect': [-15, -15, 46, 833],
- 'items': [
- 'BeginClipDisplayItem',
- 'TransformDisplayItem',
- {'name': 'DrawingDisplayItem', 'skp64': '[skia picture in base64]'},
- 'EndTransformDisplayItem',
- 'EndClipDisplayItem'
- ]
- },
- 'skp64': '[another skia picture in base64]'});
- displayItemList.preInitialize();
- displayItemList.initialize();
-
- var dbg = new tr.ui.e.chrome.cc.DisplayItemDebugger();
- this.addHTMLOutput(dbg);
- dbg.displayItemList = displayItemList;
- assert.isDefined(dbg.displayItemList_);
- assert.isDefined(dbg.picture_);
- assert.equal(dbg.displayItemList_.items.length, 5);
-
- var initialPicture = dbg.picture_;
- assert.isAbove(initialPicture.guid, 0);
-
- // Select the drawing display item and make sure the picture updates.
- var listView = dbg.displayItemListView_;
- listView.selectedElement = listView.getElementByIndex(3);
- var updatedPicture = dbg.picture_;
- assert.isAbove(updatedPicture.guid, 0);
- assert.notEqual(initialPicture.guid, updatedPicture.guid);
-
- // Select the TransformDisplayItem and make sure the picture is blank.
- listView.selectedElement = listView.getElementByIndex(2);
- assert.isUndefined(dbg.picture_);
-
- // Deselect a list item and make sure the picture is reset to the original.
- listView.selectedElement = undefined;
- updatedPicture = dbg.picture_;
- assert.isAbove(updatedPicture.guid, 0);
- assert.equal(initialPicture.guid, updatedPicture.guid);
-
- dbg.style.border = '1px solid black';
- });
-
- test('export', function() {
- var displayItemList = new tr.e.cc.DisplayItemListSnapshot(
- {id: '31415'},
- 10,
- {
- 'params': {
- 'layer_rect': [-15, -15, 46, 833],
- 'items': [
- 'BeginClipDisplayItem',
- 'EndClipDisplayItem'
- ]
- },
- 'skp64': 'c2twaWN0dXJl'});
- displayItemList.preInitialize();
- displayItemList.initialize();
-
- var dbg = new tr.ui.e.chrome.cc.DisplayItemDebugger();
- this.addHTMLOutput(dbg);
- dbg.displayItemList = displayItemList;
-
- var onSaveDisplayListCalled = false;
- dbg.saveFile_ = function(filename, rawData) {
- onSaveDisplayListCalled = true;
- assert.equal(filename, 'displayitemlist.json');
- assert.equal(rawData, '["BeginClipDisplayItem","EndClipDisplayItem"]');
- };
- dbg.onExportDisplayListClicked_();
- assert(onSaveDisplayListCalled);
-
- var onSaveSkPictureCalled = false;
- dbg.saveFile_ = function(filename, rawData) {
- onSaveSkPictureCalled = true;
- assert.equal(filename, 'skpicture.skp');
- assert.equal(rawData, 'skpicture');
- };
- dbg.onExportSkPictureClicked_();
- assert(onSaveSkPictureCalled);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_item.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_item.html
deleted file mode 100644
index 696489f33d6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_item.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-An element displaying basic information about a display item in a list view.
--->
-<dom-module id='tr-ui-e-chrome-cc-display-item-list-item'>
- <template>
- <style>
- :host {
- border-bottom: 1px solid #555;
- display: block;
- font-size: 12px;
- padding: 3px 5px;
- }
-
- :host(:hover) {
- background-color: #f0f0f0;
- cursor: pointer;
- }
-
- .header {
- font-weight: bold;
- margin: 2px 0;
- }
-
- .header > .extra {
- background-color: #777;
- border-radius: 4px;
- color: white;
- margin: 0 6px;
- text-decoration: none;
- padding: 2px 4px;
- }
-
- .raw-details {
- white-space: pre-wrap;
- }
-
- .details > dl {
- margin: 0;
- }
-
- :host(:not([selected])) .details {
- display: none;
- }
- </style>
- <div class="header">
- {{name}}
- <template is="dom-if" if="{{_computeIf(richDetails)}}">
- <a class="extra" href$="{{_computeHref(richDetails)}}"
- download="drawing.skp" on-click="{{stopPropagation}}">SKP</a>
- </template>
- </div>
- <div class="details">
- <template if="{{rawDetails}}">
- <div class="raw-details">{{rawDetails}}</div>
- </template>
- <template is="dom-if" if="{{richDetails}}" bind="{{richDetails}}">
- <dl>
- <template is="dom-if" if="{{cullRect}}" bind="{{cullRect}}">
- <dt>Cull rect</dt>
- <dd>{{x}},{{y}} {{width}}&times;{{height}}</dd>
- </template>
- <template is="dom-if" if="{{visualRect}}" bind="{{visualRect}}">
- <dt>Visual rect</dt>
- <dd>{{x}},{{y}} {{width}}&times;{{height}}</dd>
- </template>
- </dl>
- </template>
- </div>
- </template>
-<script>
-'use strict';
-(function() {
- // Extracts the "type" and "details" parts of the unstructured (plaintext)
- // display item format, even if the details span multiple lines.
- // For example, given "FooDisplayItem type=hello\nworld", produces
- // "FooDisplayItem" as the first capture and "type=hello\nworld" as the
- // second. Either capture could be the empty string, but this regex will
- // still successfully match.
- var DETAILS_SPLIT_REGEX = /^(\S*)\s*([\S\s]*)$/;
-
- Polymer({
- is: 'tr-ui-e-chrome-cc-display-item-list-item',
-
- created: function() {
- // TODO(charliea): Why is setAttribute necessary here but not below? We
- // should reach out to the Polymer team to figure out.
- Polymer.dom(this).setAttribute('name', '');
- Polymer.dom(this).setAttribute('rawDetails', '');
- Polymer.dom(this).setAttribute('richDetails', undefined);
- Polymer.dom(this).setAttribute('data_', undefined);
- },
-
- get data() {
- return this.data_;
- },
-
- set data(data) {
- this.data_ = data;
-
- if (!data) {
- this.name = 'DATA MISSING';
- this.rawDetails = '';
- this.richDetails = undefined;
- } else if (typeof data === 'string') {
- var match = data.match(DETAILS_SPLIT_REGEX);
- this.name = match[1];
- this.rawDetails = match[2];
- this.richDetails = undefined;
- } else {
- this.name = data.name;
- this.rawDetails = '';
- this.richDetails = data;
- }
- },
-
- stopPropagation: function(e) {
- e.stopPropagation();
- },
-
- _computeIf: function(richDetails) {
- return richDetails && richDetails.skp64;
- },
-
- _computeHref: function(richDetails) {
- return 'data:application/octet-stream;base64,' + richDetails.skp64;
- }
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.css
deleted file mode 100644
index 2265f4a1bfc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ .tr-ui-e-chrome-cc-display-item-list-view {
- -webkit-flex: 1 1 auto !important;
- display: -webkit-flex;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.html
deleted file mode 100644
index c4f9c6b0152..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/display_item_list_view.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/display_item_list_view.css">
-
-<link rel="import" href="/tracing/extras/chrome/cc/display_item_list.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/display_item_debugger.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- /*
- * Displays a display item snapshot in a human readable form.
- * @constructor
- */
- var DisplayItemSnapshotView = tr.ui.b.define(
- 'tr-ui-e-chrome-cc-display-item-list-view',
- tr.ui.analysis.ObjectSnapshotView);
-
- DisplayItemSnapshotView.prototype = {
- __proto__: tr.ui.analysis.ObjectSnapshotView.prototype,
-
- decorate: function() {
- Polymer.dom(this).classList.add(
- 'tr-ui-e-chrome-cc-display-item-list-view');
- this.displayItemDebugger_ = new tr.ui.e.chrome.cc.DisplayItemDebugger();
- Polymer.dom(this).appendChild(this.displayItemDebugger_);
- },
-
- updateContents: function() {
- if (this.objectSnapshot_ && this.displayItemDebugger_)
- this.displayItemDebugger_.displayItemList = this.objectSnapshot_;
- }
- };
-
- tr.ui.analysis.ObjectSnapshotView.register(
- DisplayItemSnapshotView,
- {
- typeNames: ['cc::DisplayItemList'],
- showInstances: false
- });
-
- return {
- DisplayItemSnapshotView: DisplayItemSnapshotView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.png b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.png
deleted file mode 100644
index a2b7710d3c4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.svg b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.svg
deleted file mode 100644
index 00531ac68d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/images/input-event.svg
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="744.09448819"
- height="1052.3622047"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="New document 1">
- <defs
- id="defs4">
- <filter
- inkscape:collect="always"
- id="filter3791">
- <feGaussianBlur
- inkscape:collect="always"
- stdDeviation="2.7246316"
- id="feGaussianBlur3793" />
- </filter>
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="2.8"
- inkscape:cx="195.13782"
- inkscape:cy="982.30556"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1215"
- inkscape:window-height="860"
- inkscape:window-x="2219"
- inkscape:window-y="113"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g3882"
- style="opacity:0.5"
- inkscape:export-filename="/tmp/input-event.png"
- inkscape:export-xdpi="82.07"
- inkscape:export-ydpi="82.07">
- <path
- transform="matrix(1.0152631,0,0,1.0152631,-0.71357503,0.46150497)"
- sodipodi:type="arc"
- style="opacity:0.50934604000000006;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3791);enable-background:accumulate"
- id="path3755"
- sodipodi:cx="177.78685"
- sodipodi:cy="100.79848"
- sodipodi:rx="42.426407"
- sodipodi:ry="42.426407"
- d="m 220.21326,100.79848 a 42.426407,42.426407 0 1 1 -84.85282,0 42.426407,42.426407 0 1 1 84.85282,0 z" />
- <path
- transform="translate(-2,-2)"
- d="m 220.21326,100.79848 a 42.426407,42.426407 0 1 1 -84.85282,0 42.426407,42.426407 0 1 1 84.85282,0 z"
- sodipodi:ry="42.426407"
- sodipodi:rx="42.426407"
- sodipodi:cy="100.79848"
- sodipodi:cx="177.78685"
- id="path2985"
- style="color:#000000;fill:#d4d4d4;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc" />
- <path
- inkscape:connector-curvature="0"
- id="path3853"
- d="m 175.28125,96.03125 0,8.46875 1,0 0,-8.46875 -1,0 z"
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
- <path
- inkscape:connector-curvature="0"
- id="path3859"
- d="m 171.53125,99.75 0,1 8.46875,0 0,-1 -8.46875,0 z"
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
- </g>
- <path
- transform="matrix(1.2923213,0,0,1.2923213,-53.970887,-31.465544)"
- d="m 220.21326,100.79848 a 42.426407,42.426407 0 1 1 -84.85282,0 42.426407,42.426407 0 1 1 84.85282,0 z"
- sodipodi:ry="42.426407"
- sodipodi:rx="42.426407"
- sodipodi:cy="100.79848"
- sodipodi:cx="177.78685"
- id="path3867"
- style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- sodipodi:type="arc"
- inkscape:export-filename="/tmp/input-event.png"
- inkscape:export-xdpi="82.07"
- inkscape:export-ydpi="82.07" />
- </g>
-</svg>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.css
deleted file mode 100644
index 8841b4da953..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ tr-ui-e-chrome-cc-layer-picker {
- -webkit-flex-direction: column;
- display: -webkit-flex;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-picker > top-controls {
- -webkit-flex: 0 0 auto;
- background-image: -webkit-gradient(linear,
- 0 0, 100% 0,
- from(#E5E5E5),
- to(#D1D1D1));
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
- display: inline;
- font-size: 14px;
- padding-left: 2px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-picker > top-controls input[type='checkbox'] {
- vertical-align: -2px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-picker > .x-list-view {
- -webkit-flex: 1 1 auto;
- font-family: monospace;
- overflow: auto;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-picker > tr-ui-a-generic-object-view {
- -webkit-flex: 0 0 auto;
- height: 200px;
- overflow: auto;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-picker > tr-ui-a-generic-object-view * {
- -webkit-user-select: text !important;
- cursor: text;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.html
deleted file mode 100644
index c02e129d3b5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_picker.html
+++ /dev/null
@@ -1,326 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/layer_picker.css">
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/extras/chrome/cc/constants.html">
-<link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html">
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/base/list_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var constants = tr.e.cc.constants;
- var RENDER_PASS_QUADS =
- Math.max(constants.ACTIVE_TREE, constants.PENDING_TREE) + 1;
-
- /**
- * @constructor
- */
- var LayerPicker = tr.ui.b.define('tr-ui-e-chrome-cc-layer-picker');
-
- LayerPicker.prototype = {
- __proto__: HTMLUnknownElement.prototype,
-
- decorate: function() {
- this.lthi_ = undefined;
- this.controls_ = document.createElement('top-controls');
- this.renderPassQuads_ = false;
-
-
- this.itemList_ = new tr.ui.b.ListView();
- Polymer.dom(this).appendChild(this.controls_);
-
- Polymer.dom(this).appendChild(this.itemList_);
-
- this.itemList_.addEventListener(
- 'selection-changed', this.onItemSelectionChanged_.bind(this));
-
- Polymer.dom(this.controls_).appendChild(tr.ui.b.createSelector(
- this, 'whichTree',
- 'layerPicker.whichTree', constants.ACTIVE_TREE,
- [{label: 'Active tree', value: constants.ACTIVE_TREE},
- {label: 'Pending tree', value: constants.PENDING_TREE},
- {label: 'Render pass quads', value: RENDER_PASS_QUADS}]));
-
- this.showPureTransformLayers_ = false;
- var showPureTransformLayers = tr.ui.b.createCheckBox(
- this, 'showPureTransformLayers',
- 'layerPicker.showPureTransformLayers', false,
- 'Transform layers');
- Polymer.dom(showPureTransformLayers).classList.add(
- 'show-transform-layers');
- showPureTransformLayers.title =
- 'When checked, pure transform layers are shown';
- Polymer.dom(this.controls_).appendChild(showPureTransformLayers);
- },
-
- get lthiSnapshot() {
- return this.lthiSnapshot_;
- },
-
- set lthiSnapshot(lthiSnapshot) {
- this.lthiSnapshot_ = lthiSnapshot;
- this.updateContents_();
- },
-
- get whichTree() {
- return this.renderPassQuads_ ? constants.ACTIVE_TREE : this.whichTree_;
- },
-
- set whichTree(whichTree) {
- this.whichTree_ = whichTree;
- this.renderPassQuads_ = (whichTree === RENDER_PASS_QUADS);
- this.updateContents_();
- tr.b.dispatchSimpleEvent(this, 'selection-change', false);
- },
-
- get layerTreeImpl() {
- if (this.lthiSnapshot === undefined)
- return undefined;
- return this.lthiSnapshot.getTree(this.whichTree);
- },
-
- get isRenderPassQuads() {
- return this.renderPassQuads_;
- },
-
- get showPureTransformLayers() {
- return this.showPureTransformLayers_;
- },
-
- set showPureTransformLayers(show) {
- if (this.showPureTransformLayers_ === show)
- return;
- this.showPureTransformLayers_ = show;
- this.updateContents_();
- },
-
- getRenderPassInfos_: function() {
- if (!this.lthiSnapshot_)
- return [];
-
- var renderPassInfo = [];
- if (!this.lthiSnapshot_.args.frame ||
- !this.lthiSnapshot_.args.frame.renderPasses)
- return renderPassInfo;
-
- var renderPasses = this.lthiSnapshot_.args.frame.renderPasses;
- for (var i = 0; i < renderPasses.length; ++i) {
- var info = {renderPass: renderPasses[i],
- depth: 0,
- id: i,
- name: 'cc::RenderPass'};
- renderPassInfo.push(info);
- }
- return renderPassInfo;
- },
-
- getLayerInfos_: function() {
- if (!this.lthiSnapshot_)
- return [];
-
- var tree = this.lthiSnapshot_.getTree(this.whichTree_);
- if (!tree)
- return [];
-
- var layerInfos = [];
-
- var showPureTransformLayers = this.showPureTransformLayers_;
-
- function isPureTransformLayer(layer) {
- if (layer.args.compositingReasons &&
- layer.args.compositingReasons.length !== 1 &&
- layer.args.compositingReasons[0] !== 'No reasons given')
- return false;
-
- if (layer.args.drawsContent)
- return false;
-
- return true;
- }
- var visitedLayers = {};
- function visitLayer(layer, depth, isMask, isReplica) {
- if (visitedLayers[layer.layerId])
- return;
- visitedLayers[layer.layerId] = true;
- var info = {layer: layer,
- depth: depth};
-
- if (layer.args.drawsContent)
- info.name = layer.objectInstance.name;
- else
- info.name = 'cc::LayerImpl';
-
- if (layer.usingGpuRasterization)
- info.name += ' (G)';
-
- info.isMaskLayer = isMask;
- info.replicaLayer = isReplica;
-
- if (showPureTransformLayers || !isPureTransformLayer(layer))
- layerInfos.push(info);
-
- }
- tree.iterLayers(visitLayer);
- return layerInfos;
- },
-
- updateContents_: function() {
- if (this.renderPassQuads_)
- this.updateRenderPassContents_();
- else
- this.updateLayerContents_();
- },
-
- updateRenderPassContents_: function() {
- this.itemList_.clear();
-
- var selectedRenderPassId;
- if (this.selection_ && this.selection_.associatedRenderPassId)
- selectedRenderPassId = this.selection_.associatedRenderPassId;
-
- var renderPassInfos = this.getRenderPassInfos_();
- renderPassInfos.forEach(function(renderPassInfo) {
- var renderPass = renderPassInfo.renderPass;
- var id = renderPassInfo.id;
-
- var item = this.createElementWithDepth_(renderPassInfo.depth);
- var labelEl = Polymer.dom(item).appendChild(tr.ui.b.createSpan());
-
- Polymer.dom(labelEl).textContent = renderPassInfo.name + ' ' + id;
- item.renderPass = renderPass;
- item.renderPassId = id;
- Polymer.dom(this.itemList_).appendChild(item);
-
- if (id === selectedRenderPassId) {
- renderPass.selectionState =
- tr.model.SelectionState.SELECTED;
- }
- }, this);
- },
-
- updateLayerContents_: function() {
- this.changingItemSelection_ = true;
- try {
- this.itemList_.clear();
-
- var selectedLayerId;
- if (this.selection_ && this.selection_.associatedLayerId)
- selectedLayerId = this.selection_.associatedLayerId;
-
- var layerInfos = this.getLayerInfos_();
- layerInfos.forEach(function(layerInfo) {
- var layer = layerInfo.layer;
- var id = layer.layerId;
-
- var item = this.createElementWithDepth_(layerInfo.depth);
- var labelEl = Polymer.dom(item).appendChild(tr.ui.b.createSpan());
-
- Polymer.dom(labelEl).textContent = layerInfo.name + ' ' + id;
-
- var notesEl = Polymer.dom(item).appendChild(tr.ui.b.createSpan());
- if (layerInfo.isMaskLayer)
- Polymer.dom(notesEl).textContent += '(mask)';
- if (layerInfo.isReplicaLayer)
- Polymer.dom(notesEl).textContent += '(replica)';
-
- if ((layer.gpuMemoryUsageInBytes !== undefined) &&
- (layer.gpuMemoryUsageInBytes > 0)) {
- var gpuUsageStr = tr.b.Unit.byName.sizeInBytes.format(
- layer.gpuMemoryUsageInBytes);
- Polymer.dom(notesEl).textContent += ' (' + gpuUsageStr + ' MiB)';
- }
-
- item.layer = layer;
- Polymer.dom(this.itemList_).appendChild(item);
-
- if (layer.layerId === selectedLayerId) {
- layer.selectionState = tr.model.SelectionState.SELECTED;
- item.selected = true;
- }
- }, this);
- } finally {
- this.changingItemSelection_ = false;
- }
- },
-
- createElementWithDepth_: function(depth) {
- var item = document.createElement('div');
-
- var indentEl = Polymer.dom(item).appendChild(tr.ui.b.createSpan());
- indentEl.style.whiteSpace = 'pre';
- for (var i = 0; i < depth; i++) {
- Polymer.dom(indentEl).textContent =
- Polymer.dom(indentEl).textContent + ' ';
- }
- return item;
- },
-
- onItemSelectionChanged_: function(e) {
- if (this.changingItemSelection_)
- return;
- if (this.renderPassQuads_)
- this.onRenderPassSelected_(e);
- else
- this.onLayerSelected_(e);
- tr.b.dispatchSimpleEvent(this, 'selection-change', false);
- },
-
- onRenderPassSelected_: function(e) {
- var selectedRenderPass;
- var selectedRenderPassId;
- if (this.itemList_.selectedElement) {
- selectedRenderPass = this.itemList_.selectedElement.renderPass;
- selectedRenderPassId =
- this.itemList_.selectedElement.renderPassId;
- }
-
- if (selectedRenderPass) {
- this.selection_ = new tr.ui.e.chrome.cc.RenderPassSelection(
- selectedRenderPass, selectedRenderPassId);
- } else {
- this.selection_ = undefined;
- }
- },
-
- onLayerSelected_: function(e) {
- var selectedLayer;
- if (this.itemList_.selectedElement)
- selectedLayer = this.itemList_.selectedElement.layer;
-
- if (selectedLayer)
- this.selection_ = new tr.ui.e.chrome.cc.LayerSelection(selectedLayer);
- else
- this.selection_ = undefined;
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- if (this.selection_ === selection)
- return;
- this.selection_ = selection;
- this.updateContents_();
- }
- };
-
- return {
- LayerPicker: LayerPicker
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.css
deleted file mode 100644
index 3f5069a7cc8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ .tr-ui-e-chrome-cc-lthi-s-view {
- -webkit-flex: 1 1 auto !important;
- -webkit-flex-direction: row;
- display: -webkit-flex;
-}
-
-* /deep/ .tr-ui-e-chrome-cc-lthi-s-view > tr-ui-e-chrome-cc-layer-picker {
- -webkit-flex: 1 1 auto;
-}
-
-* /deep/ .tr-ui-e-chrome-cc-lthi-s-view > tr-ui-b-drag-handle {
- -webkit-flex: 0 0 auto;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html
deleted file mode 100644
index 97a8bfe75e9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet"
- href="/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.css">
-
-<link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html">
-<link rel="import" href="/tracing/extras/chrome/cc/tile.html">
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_picker.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- /*
- * Displays a LayerTreeHostImpl snapshot in a human readable form.
- * @constructor
- */
- var LayerTreeHostImplSnapshotView = tr.ui.b.define(
- 'tr-ui-e-chrome-cc-layer-tree-host-impl-snapshot-view',
- tr.ui.analysis.ObjectSnapshotView);
-
- LayerTreeHostImplSnapshotView.prototype = {
- __proto__: tr.ui.analysis.ObjectSnapshotView.prototype,
-
- decorate: function() {
- Polymer.dom(this).classList.add('tr-ui-e-chrome-cc-lthi-s-view');
-
- this.selection_ = undefined;
-
- this.layerPicker_ = new tr.ui.e.chrome.cc.LayerPicker();
- this.layerPicker_.addEventListener(
- 'selection-change',
- this.onLayerPickerSelectionChanged_.bind(this));
-
- this.layerView_ = new tr.ui.e.chrome.cc.LayerView();
- this.layerView_.addEventListener(
- 'selection-change',
- this.onLayerViewSelectionChanged_.bind(this));
- this.dragHandle_ = document.createElement('tr-ui-b-drag-handle');
- this.dragHandle_.horizontal = false;
- this.dragHandle_.target = this.layerView_;
-
- Polymer.dom(this).appendChild(this.layerPicker_);
- Polymer.dom(this).appendChild(this.dragHandle_);
- Polymer.dom(this).appendChild(this.layerView_);
-
- // Make sure we have the current values from layerView_ and layerPicker_,
- // since those might have been created before we added the listener.
- this.onLayerViewSelectionChanged_();
- this.onLayerPickerSelectionChanged_();
-
- },
-
- get objectSnapshot() {
- return this.objectSnapshot_;
- },
-
- set objectSnapshot(objectSnapshot) {
- this.objectSnapshot_ = objectSnapshot;
-
- var lthi = this.objectSnapshot;
- var layerTreeImpl;
- if (lthi)
- layerTreeImpl = lthi.getTree(this.layerPicker_.whichTree);
-
- this.layerPicker_.lthiSnapshot = lthi;
- this.layerView_.layerTreeImpl = layerTreeImpl;
- this.layerView_.regenerateContent();
-
- if (!this.selection_)
- return;
- this.selection = this.selection_.findEquivalent(lthi);
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- if (this.selection_ === selection)
- return;
- this.selection_ = selection;
- this.layerPicker_.selection = selection;
- this.layerView_.selection = selection;
- tr.b.dispatchSimpleEvent(this, 'cc-selection-change');
- },
-
- onLayerPickerSelectionChanged_: function() {
- this.selection_ = this.layerPicker_.selection;
- this.layerView_.selection = this.selection;
- this.layerView_.layerTreeImpl = this.layerPicker_.layerTreeImpl;
- this.layerView_.isRenderPassQuads = this.layerPicker_.isRenderPassQuads;
- this.layerView_.regenerateContent();
- tr.b.dispatchSimpleEvent(this, 'cc-selection-change');
- },
-
- onLayerViewSelectionChanged_: function() {
- this.selection_ = this.layerView_.selection;
- this.layerPicker_.selection = this.selection;
- tr.b.dispatchSimpleEvent(this, 'cc-selection-change');
- },
-
- get extraHighlightsByLayerId() {
- return this.layerView_.extraHighlightsByLayerId;
- },
-
- set extraHighlightsByLayerId(extraHighlightsByLayerId) {
- this.layerView_.extraHighlightsByLayerId = extraHighlightsByLayerId;
- }
- };
-
- tr.ui.analysis.ObjectSnapshotView.register(
- LayerTreeHostImplSnapshotView, {typeName: 'cc::LayerTreeHostImpl'});
-
- return {
- LayerTreeHostImplSnapshotView: LayerTreeHostImplSnapshotView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view_test.html
deleted file mode 100644
index b06765aa91d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view_test.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/extras/chrome/cc/raster_task.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
- var snapshot = instance.snapshots[0];
-
- var view = new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView();
- view.style.width = '900px';
- view.style.height = '400px';
- view.objectSnapshot = snapshot;
-
- this.addHTMLOutput(view);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html
deleted file mode 100644
index 100741e8bb1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html
+++ /dev/null
@@ -1,1200 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color.html">
-<link rel="import" href="/tracing/base/quad.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/extras/chrome/cc/debug_colors.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/extras/chrome/cc/render_pass.html">
-<link rel="import" href="/tracing/extras/chrome/cc/tile.html">
-<link rel="import" href="/tracing/extras/chrome/cc/util.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/info_bar.html">
-<link rel="import" href="/tracing/ui/base/quad_stack_view.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-
-<style>
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view {
- position: relative;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > top-controls {
- -webkit-flex: 0 0 auto;
- background-image: -webkit-gradient(linear,
- 0 0, 100% 0,
- from(#E5E5E5),
- to(#D1D1D1));
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
- display: flex;
- flex-flow: row wrap;
- flex-direction: row;
- font-size: 14px;
- padding-left: 2px;
- overflow: hidden;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view >
- top-controls input[type='checkbox'] {
- vertical-align: -2px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > .what-rasterized {
- color: -webkit-link;
- cursor: pointer;
- text-decoration: underline;
- position: absolute;
- bottom: 10px;
- left: 10px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-tree-quad-stack-view > #input-event {
- background-image: url('./images/input-event.png');
- display: none;
-}
-</style>
-
-<template id='tr-ui-e-chrome-cc-layer-tree-quad-stack-view-template'>
- <img id='input-event'/>
-</template>
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Graphical view of LayerTreeImpl, with controls for
- * type of layer content shown and info bar for content-loading warnings.
- */
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- var THIS_DOC = document.currentScript.ownerDocument;
- var TILE_HEATMAP_TYPE = {};
- TILE_HEATMAP_TYPE.NONE = 'none';
- TILE_HEATMAP_TYPE.SCHEDULED_PRIORITY = 'scheduledPriority';
- TILE_HEATMAP_TYPE.USING_GPU_MEMORY = 'usingGpuMemory';
-
- var cc = tr.ui.e.chrome.cc;
-
- function createTileRectsSelectorBaseOptions() {
- return [{label: 'None', value: 'none'},
- {label: 'Coverage Rects', value: 'coverage'}];
- }
-
-
- /**
- * @constructor
- */
- var LayerTreeQuadStackView =
- tr.ui.b.define('tr-ui-e-chrome-cc-layer-tree-quad-stack-view');
-
- LayerTreeQuadStackView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.isRenderPassQuads_ = false;
- this.pictureAsImageData_ = {}; // Maps picture.guid to PictureAsImageData.
- this.messages_ = [];
- this.controls_ = document.createElement('top-controls');
- this.infoBar_ = document.createElement('tr-ui-b-info-bar');
- this.quadStackView_ = new tr.ui.b.QuadStackView();
- this.quadStackView_.addEventListener(
- 'selectionchange', this.onQuadStackViewSelectionChange_.bind(this));
- this.extraHighlightsByLayerId_ = undefined;
- this.inputEventImageData_ = undefined;
-
- var m = tr.ui.b.MOUSE_SELECTOR_MODE;
- var mms = this.quadStackView_.mouseModeSelector;
- mms.settingsKey = 'tr.e.cc.layerTreeQuadStackView.mouseModeSelector';
- mms.setKeyCodeForMode(m.SELECTION, 'Z'.charCodeAt(0));
- mms.setKeyCodeForMode(m.PANSCAN, 'X'.charCodeAt(0));
- mms.setKeyCodeForMode(m.ZOOM, 'C'.charCodeAt(0));
- mms.setKeyCodeForMode(m.ROTATE, 'V'.charCodeAt(0));
-
- var node = tr.ui.b.instantiateTemplate(
- '#tr-ui-e-chrome-cc-layer-tree-quad-stack-view-template', THIS_DOC);
- Polymer.dom(this).appendChild(node);
- Polymer.dom(this).appendChild(this.controls_);
- Polymer.dom(this).appendChild(this.infoBar_);
- Polymer.dom(this).appendChild(this.quadStackView_);
-
- this.tileRectsSelector_ = tr.ui.b.createSelector(
- this, 'howToShowTiles',
- 'layerView.howToShowTiles', 'none',
- createTileRectsSelectorBaseOptions());
- Polymer.dom(this.controls_).appendChild(this.tileRectsSelector_);
-
- var tileHeatmapText = tr.ui.b.createSpan({
- textContent: 'Tile heatmap:'
- });
- Polymer.dom(this.controls_).appendChild(tileHeatmapText);
-
- var tileHeatmapSelector = tr.ui.b.createSelector(
- this, 'tileHeatmapType',
- 'layerView.tileHeatmapType', TILE_HEATMAP_TYPE.NONE,
- [{label: 'None',
- value: TILE_HEATMAP_TYPE.NONE},
- {label: 'Scheduled Priority',
- value: TILE_HEATMAP_TYPE.SCHEDULED_PRIORITY},
- {label: 'Is using GPU memory',
- value: TILE_HEATMAP_TYPE.USING_GPU_MEMORY}
- ]);
- Polymer.dom(this.controls_).appendChild(tileHeatmapSelector);
-
- var showOtherLayersCheckbox = tr.ui.b.createCheckBox(
- this, 'showOtherLayers',
- 'layerView.showOtherLayers', true,
- 'Other layers/passes');
- showOtherLayersCheckbox.title =
- 'When checked, show all layers, selected or not.';
- Polymer.dom(this.controls_).appendChild(showOtherLayersCheckbox);
-
- var showInvalidationsCheckbox = tr.ui.b.createCheckBox(
- this, 'showInvalidations',
- 'layerView.showInvalidations', true,
- 'Invalidations');
- showInvalidationsCheckbox.title =
- 'When checked, compositing invalidations are highlighted in red';
- Polymer.dom(this.controls_).appendChild(showInvalidationsCheckbox);
-
- var showUnrecordedRegionCheckbox = tr.ui.b.createCheckBox(
- this, 'showUnrecordedRegion',
- 'layerView.showUnrecordedRegion', true,
- 'Unrecorded area');
- showUnrecordedRegionCheckbox.title =
- 'When checked, unrecorded areas are highlighted in yellow';
- Polymer.dom(this.controls_).appendChild(showUnrecordedRegionCheckbox);
-
- var showBottlenecksCheckbox = tr.ui.b.createCheckBox(
- this, 'showBottlenecks',
- 'layerView.showBottlenecks', true,
- 'Bottlenecks');
- showBottlenecksCheckbox.title =
- 'When checked, scroll bottlenecks are highlighted';
- Polymer.dom(this.controls_).appendChild(showBottlenecksCheckbox);
-
- var showLayoutRectsCheckbox = tr.ui.b.createCheckBox(
- this, 'showLayoutRects',
- 'layerView.showLayoutRects', false,
- 'Layout rects');
- showLayoutRectsCheckbox.title =
- 'When checked, shows rects for regions where layout happened';
- Polymer.dom(this.controls_).appendChild(showLayoutRectsCheckbox);
-
- var showContentsCheckbox = tr.ui.b.createCheckBox(
- this, 'showContents',
- 'layerView.showContents', true,
- 'Contents');
- showContentsCheckbox.title =
- 'When checked, show the rendered contents inside the layer outlines';
- Polymer.dom(this.controls_).appendChild(showContentsCheckbox);
-
- var showAnimationBoundsCheckbox = tr.ui.b.createCheckBox(
- this, 'showAnimationBounds',
- 'layerView.showAnimationBounds', false,
- 'Animation Bounds');
- showAnimationBoundsCheckbox.title = 'When checked, show a border around' +
- ' a layer showing the extent of its animation.';
- Polymer.dom(this.controls_).appendChild(showAnimationBoundsCheckbox);
-
- var showInputEventsCheckbox = tr.ui.b.createCheckBox(
- this, 'showInputEvents',
- 'layerView.showInputEvents', true,
- 'Input events');
- showInputEventsCheckbox.title = 'When checked, input events are ' +
- 'displayed as circles.';
- Polymer.dom(this.controls_).appendChild(showInputEventsCheckbox);
-
- this.whatRasterizedLink_ = document.createElement('a');
- Polymer.dom(this.whatRasterizedLink_).classList.add('what-rasterized');
- Polymer.dom(this.whatRasterizedLink_).textContent = 'What rasterized?';
- this.whatRasterizedLink_.addEventListener(
- 'click', this.onWhatRasterizedLinkClicked_.bind(this));
- Polymer.dom(this).appendChild(this.whatRasterizedLink_);
- },
-
- get layerTreeImpl() {
- return this.layerTreeImpl_;
- },
-
- set isRenderPassQuads(newValue) {
- this.isRenderPassQuads_ = newValue;
- },
-
- set layerTreeImpl(layerTreeImpl) {
- if (this.layerTreeImpl_ === layerTreeImpl)
- return;
-
- // FIXME(pdr): We may want to clear pictureAsImageData_ here to save
- // memory at the cost of performance. Note that
- // pictureAsImageData_ will be cleared when this is
- // destructed, but this view might live for several
- // layerTreeImpls.
- this.layerTreeImpl_ = layerTreeImpl;
- this.selection = undefined;
- },
-
- get extraHighlightsByLayerId() {
- return this.extraHighlightsByLayerId_;
- },
-
- set extraHighlightsByLayerId(extraHighlightsByLayerId) {
- this.extraHighlightsByLayerId_ = extraHighlightsByLayerId;
- this.scheduleUpdateContents_();
- },
-
- get showOtherLayers() {
- return this.showOtherLayers_;
- },
-
- set showOtherLayers(show) {
- this.showOtherLayers_ = show;
- this.updateContents_();
- },
-
- get showAnimationBounds() {
- return this.showAnimationBounds_;
- },
-
- set showAnimationBounds(show) {
- this.showAnimationBounds_ = show;
- this.updateContents_();
- },
-
- get showInputEvents() {
- return this.showInputEvents_;
- },
-
- set showInputEvents(show) {
- this.showInputEvents_ = show;
- this.updateContents_();
- },
-
- get showContents() {
- return this.showContents_;
- },
-
- set showContents(show) {
- this.showContents_ = show;
- this.updateContents_();
- },
-
- get showInvalidations() {
- return this.showInvalidations_;
- },
-
- set showInvalidations(show) {
- this.showInvalidations_ = show;
- this.updateContents_();
- },
-
- get showUnrecordedRegion() {
- return this.showUnrecordedRegion_;
- },
-
- set showUnrecordedRegion(show) {
- this.showUnrecordedRegion_ = show;
- this.updateContents_();
- },
-
- get showBottlenecks() {
- return this.showBottlenecks_;
- },
-
- set showBottlenecks(show) {
- this.showBottlenecks_ = show;
- this.updateContents_();
- },
-
- get showLayoutRects() {
- return this.showLayoutRects_;
- },
-
- set showLayoutRects(show) {
- this.showLayoutRects_ = show;
- this.updateContents_();
- },
-
- get howToShowTiles() {
- return this.howToShowTiles_;
- },
-
- set howToShowTiles(val) {
- // Make sure val is something we expect.
- console.assert(
- (val === 'none') ||
- (val === 'coverage') ||
- !isNaN(parseFloat(val)));
-
- this.howToShowTiles_ = val;
- this.updateContents_();
- },
-
- get tileHeatmapType() {
- return this.tileHeatmapType_;
- },
-
- set tileHeatmapType(val) {
- this.tileHeatmapType_ = val;
- this.updateContents_();
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- if (this.selection === selection)
- return;
- this.selection_ = selection;
- tr.b.dispatchSimpleEvent(this, 'selection-change');
- this.updateContents_();
- },
-
- regenerateContent: function() {
- this.updateTilesSelector_();
- this.updateContents_();
- },
-
- loadDataForImageElement_: function(image, callback) {
- var imageContent = window.getComputedStyle(image).backgroundImage;
- image.src = tr.ui.b.extractUrlString(imageContent);
- image.onload = function() {
- var canvas = document.createElement('canvas');
- var ctx = canvas.getContext('2d');
- canvas.width = image.width;
- canvas.height = image.height;
- ctx.drawImage(image, 0, 0);
- var imageData = ctx.getImageData(
- 0, 0, canvas.width, canvas.height);
- callback(imageData);
- };
- },
-
- onQuadStackViewSelectionChange_: function(e) {
- var selectableQuads = e.quads.filter(function(q) {
- return q.selectionToSetIfClicked !== undefined;
- });
- if (selectableQuads.length === 0) {
- this.selection = undefined;
- return;
- }
-
- // Sort the quads low to high on stackingGroupId.
- selectableQuads.sort(function(x, y) {
- var z = x.stackingGroupId - y.stackingGroupId;
- if (z !== 0)
- return z;
- return x.selectionToSetIfClicked.specicifity -
- y.selectionToSetIfClicked.specicifity;
- });
-
- // TODO(nduca): Support selecting N things at once.
- var quadToSelect = selectableQuads[selectableQuads.length - 1];
- this.selection = quadToSelect.selectionToSetIfClicked;
- },
-
- scheduleUpdateContents_: function() {
- if (this.updateContentsPending_)
- return;
- this.updateContentsPending_ = true;
- tr.b.requestAnimationFrameInThisFrameIfPossible(
- this.updateContents_, this);
- },
-
- updateContents_: function() {
- if (!this.layerTreeImpl_) {
- this.quadStackView_.headerText = 'No tree';
- this.quadStackView_.quads = [];
- return;
- }
-
-
- var status = this.computePictureLoadingStatus_();
- if (!status.picturesComplete)
- return;
-
- var lthi = this.layerTreeImpl_.layerTreeHostImpl;
- var lthiInstance = lthi.objectInstance;
- var worldViewportRect = tr.b.Rect.fromXYWH(
- 0, 0,
- lthi.deviceViewportSize.width, lthi.deviceViewportSize.height);
- this.quadStackView_.deviceRect = worldViewportRect;
- if (this.isRenderPassQuads_)
- this.quadStackView_.quads = this.generateRenderPassQuads();
- else
- this.quadStackView_.quads = this.generateLayerQuads();
-
- this.updateWhatRasterizedLinkState_();
-
- var message = '';
- if (lthi.tilesHaveGpuMemoryUsageInfo) {
- var thisTreeUsageInBytes = this.layerTreeImpl_.gpuMemoryUsageInBytes;
- var otherTreeUsageInBytes = lthi.gpuMemoryUsageInBytes -
- thisTreeUsageInBytes;
- message += tr.b.convertUnit(thisTreeUsageInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB on this tree';
- if (otherTreeUsageInBytes) {
- message += ', ' + tr.b.convertUnit(otherTreeUsageInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB on the other tree';
- }
- } else {
- if (this.layerTreeImpl_) {
- var thisTreeUsageInBytes = this.layerTreeImpl_.gpuMemoryUsageInBytes;
- message += tr.b.convertUnit(thisTreeUsageInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB on this tree';
-
- if (this.layerTreeImpl_.otherTree) {
- // Older Chromes don't report enough data to know how much memory is
- // being used across both trees. We know the memory consumed by each
- // tree, but there is resource sharing *between the trees* so we
- // can't simply sum up the per-tree costs. We need either the total
- // plus one tree, to guess the unique on the other tree, etc. Newer
- // chromes report memory per tile, which allows LTHI to compute the
- // total tile memory usage, letting us figure things out properly.
- message += ', ??? MiB on other tree. ';
- }
- }
- }
-
- if (lthi.args.tileManagerBasicState) {
- var tmgs = lthi.args.tileManagerBasicState.globalState;
- message += ' (softMax=' +
- tr.b.convertUnit(tmgs.softMemoryLimitInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB, hardMax=' +
- tr.b.convertUnit(tmgs.hardMemoryLimitInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB, ' +
- tmgs.memoryLimitPolicy + ')';
-
- } else {
- // Old Chromes do not have a globalState on the LTHI dump.
- // But they do issue a DidManage event wiht the globalstate. Find that
- // event so that we show some global state.
- var thread = lthi.snapshottedOnThread;
- var didManageTilesSlices = thread.sliceGroup.slices.filter(function(s) {
- if (s.category !== 'tr.e.cc')
- return false;
- if (s.title !== 'DidManage')
- return false;
- if (s.end > lthi.ts)
- return false;
- return true;
- });
- didManageTilesSlices.sort(function(x, y) {
- return x.end - y.end;
- });
- if (didManageTilesSlices.length > 0) {
- var newest = didManageTilesSlices[didManageTilesSlices.length - 1];
- var tmgs = newest.args.state.global_state;
- message += ' (softMax=' +
- tr.b.convertUnit(tmgs.softMemoryLimitInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB, hardMax=' +
- tr.b.convertUnit(tmgs.hardMemoryLimitInBytes,
- tr.b.UnitScale.Binary.NONE,
- tr.b.UnitScale.Binary.MEBI).toFixed(1) + ' MiB, ' +
- tmgs.memoryLimitPolicy + ')';
- }
- }
-
- if (this.layerTreeImpl_.otherTree)
- message += ' (Another tree exists)';
-
-
- if (message.length)
- this.quadStackView_.headerText = message;
- else
- this.quadStackView_.headerText = undefined;
-
- this.updateInfoBar_(status.messages);
- },
-
- updateTilesSelector_: function() {
- var data = createTileRectsSelectorBaseOptions();
-
- if (this.layerTreeImpl_) {
- // First get all of the scales information from LTHI.
- var lthi = this.layerTreeImpl_.layerTreeHostImpl;
- var scaleNames = lthi.getContentsScaleNames();
- for (var scale in scaleNames) {
- data.push({
- label: 'Scale ' + scale + ' (' + scaleNames[scale] + ')',
- value: scale
- });
- }
- }
-
- // Then create a new selector and replace the old one.
- var newSelector = tr.ui.b.createSelector(
- this, 'howToShowTiles',
- 'layerView.howToShowTiles', 'none',
- data);
- this.controls_.replaceChild(newSelector, this.tileRectsSelector_);
- this.tileRectsSelector_ = newSelector;
- },
-
- computePictureLoadingStatus_: function() {
- // Figure out if we can draw the quads yet. While we're at it, figure out
- // if we have any warnings we need to show.
- var layers = this.layers;
- var status = {
- messages: [],
- picturesComplete: true
- };
- if (this.showContents) {
- var hasPendingRasterizeImage = false;
- var firstPictureError = undefined;
- var hasMissingLayerRect = false;
- var hasUnresolvedPictureRef = false;
- for (var i = 0; i < layers.length; i++) {
- var layer = layers[i];
- for (var ir = 0; ir < layer.pictures.length; ++ir) {
- var picture = layer.pictures[ir];
-
- if (picture.idRef) {
- hasUnresolvedPictureRef = true;
- continue;
- }
- if (!picture.layerRect) {
- hasMissingLayerRect = true;
- continue;
- }
-
- var pictureAsImageData = this.pictureAsImageData_[picture.guid];
- if (!pictureAsImageData) {
- hasPendingRasterizeImage = true;
- this.pictureAsImageData_[picture.guid] =
- tr.e.cc.PictureAsImageData.Pending(this);
- picture.rasterize(
- {stopIndex: undefined},
- function(pictureImageData) {
- var picture_ = pictureImageData.picture;
- this.pictureAsImageData_[picture_.guid] = pictureImageData;
- this.scheduleUpdateContents_();
- }.bind(this));
- continue;
- }
- if (pictureAsImageData.isPending()) {
- hasPendingRasterizeImage = true;
- continue;
- }
- if (pictureAsImageData.error) {
- if (!firstPictureError)
- firstPictureError = pictureAsImageData.error;
- break;
- }
- }
- }
- if (hasPendingRasterizeImage) {
- status.picturesComplete = false;
- } else {
- if (hasUnresolvedPictureRef) {
- status.messages.push({
- header: 'Missing picture',
- details: 'Your trace didnt have pictures for every layer. ' +
- 'Old chrome versions had this problem'});
- }
- if (hasMissingLayerRect) {
- status.messages.push({
- header: 'Missing layer rect',
- details: 'Your trace may be corrupt or from a very old ' +
- 'Chrome revision.'});
- }
- if (firstPictureError) {
- status.messages.push({
- header: 'Cannot rasterize',
- details: firstPictureError});
- }
- }
- }
- if (this.showInputEvents && this.layerTreeImpl.tracedInputLatencies &&
- this.inputEventImageData_ === undefined) {
- var image = Polymer.dom(this).querySelector('#input-event');
- if (!image.src) {
- this.loadDataForImageElement_(image, function(imageData) {
- this.inputEventImageData_ = imageData;
- this.updateContentsPending_ = false;
- this.scheduleUpdateContents_();
- }.bind(this));
- }
- status.picturesComplete = false;
- }
- return status;
- },
-
- get selectedRenderPass() {
- if (this.selection)
- return this.selection.renderPass_;
- },
-
- get selectedLayer() {
- if (this.selection) {
- var selectedLayerId = this.selection.associatedLayerId;
- return this.layerTreeImpl_.findLayerWithId(selectedLayerId);
- }
- },
-
- get renderPasses() {
- var renderPasses =
- this.layerTreeImpl.layerTreeHostImpl.args.frame.renderPasses;
- if (!this.showOtherLayers) {
- var selectedRenderPass = this.selectedRenderPass;
- if (selectedRenderPass)
- renderPasses = [selectedRenderPass];
- }
- return renderPasses;
- },
-
- get layers() {
- var layers = this.layerTreeImpl.renderSurfaceLayerList;
- if (!this.showOtherLayers) {
- var selectedLayer = this.selectedLayer;
- if (selectedLayer)
- layers = [selectedLayer];
- }
- return layers;
- },
-
- appendImageQuads_: function(quads, layer, layerQuad) {
- // Generate image quads for the layer
- for (var ir = 0; ir < layer.pictures.length; ++ir) {
- var picture = layer.pictures[ir];
- if (!picture.layerRect)
- continue;
-
- var unitRect = picture.layerRect.asUVRectInside(layer.bounds);
- var iq = layerQuad.projectUnitRect(unitRect);
-
- var pictureData = this.pictureAsImageData_[picture.guid];
- if (this.showContents && pictureData && pictureData.imageData) {
- iq.imageData = pictureData.imageData;
- iq.borderColor = 'rgba(0,0,0,0)';
- } else {
- iq.imageData = undefined;
- }
-
- iq.stackingGroupId = layerQuad.stackingGroupId;
- quads.push(iq);
- }
- },
-
- appendAnimationQuads_: function(quads, layer, layerQuad) {
- if (!layer.animationBoundsRect)
- return;
-
- var rect = layer.animationBoundsRect;
- var abq = tr.b.Quad.fromRect(rect);
-
- abq.backgroundColor = 'rgba(164,191,48,0.5)';
- abq.borderColor = 'rgba(205,255,0,0.75)';
- abq.borderWidth = 3.0;
- abq.stackingGroupId = layerQuad.stackingGroupId;
- abq.selectionToSetIfClicked = new cc.AnimationRectSelection(
- layer, rect);
- quads.push(abq);
- },
-
- appendInvalidationQuads_: function(quads, layer, layerQuad) {
- if (layer.layerTreeImpl.hasSourceFrameBeenDrawnBefore)
- return;
-
- // Generate the invalidation rect quads.
- for (var ir = 0; ir < layer.annotatedInvalidation.rects.length; ir++) {
- var rect = layer.annotatedInvalidation.rects[ir];
- var unitRect = rect.asUVRectInside(layer.bounds);
- var iq = layerQuad.projectUnitRect(unitRect);
- iq.backgroundColor = 'rgba(0, 255, 0, 0.1)';
- if (rect.reason === 'renderer insertion')
- iq.backgroundColor = 'rgba(0, 255, 128, 0.1)';
- iq.borderColor = 'rgba(0, 255, 0, 1)';
- iq.stackingGroupId = layerQuad.stackingGroupId;
- iq.selectionToSetIfClicked = new cc.LayerRectSelection(
- layer, 'Invalidation rect (' + rect.reason + ')', rect, rect);
- quads.push(iq);
- }
-
- // Show unannotated invalidation rect quads if no annotated rects are
- // available.
- if (layer.annotatedInvalidation.rects.length === 0) {
- for (var ir = 0; ir < layer.invalidation.rects.length; ir++) {
- var rect = layer.invalidation.rects[ir];
- var unitRect = rect.asUVRectInside(layer.bounds);
- var iq = layerQuad.projectUnitRect(unitRect);
- iq.backgroundColor = 'rgba(0, 255, 0, 0.1)';
- iq.borderColor = 'rgba(0, 255, 0, 1)';
- iq.stackingGroupId = layerQuad.stackingGroupId;
- iq.selectionToSetIfClicked = new cc.LayerRectSelection(
- layer, 'Invalidation rect', rect, rect);
- quads.push(iq);
- }
- }
- },
-
- appendUnrecordedRegionQuads_: function(quads, layer, layerQuad) {
- // Generate the unrecorded region quads.
- for (var ir = 0; ir < layer.unrecordedRegion.rects.length; ir++) {
- var rect = layer.unrecordedRegion.rects[ir];
- var unitRect = rect.asUVRectInside(layer.bounds);
- var iq = layerQuad.projectUnitRect(unitRect);
- iq.backgroundColor = 'rgba(240, 230, 140, 0.3)';
- iq.borderColor = 'rgba(240, 230, 140, 1)';
- iq.stackingGroupId = layerQuad.stackingGroupId;
- iq.selectionToSetIfClicked = new cc.LayerRectSelection(
- layer, 'Unrecorded area', rect, rect);
- quads.push(iq);
- }
- },
-
- appendBottleneckQuads_: function(quads, layer, layerQuad, stackingGroupId) {
- function processRegion(region, label, borderColor) {
- var backgroundColor = borderColor.clone();
- backgroundColor.a = 0.4 * (borderColor.a || 1.0);
-
- if (!region || !region.rects)
- return;
-
- for (var ir = 0; ir < region.rects.length; ir++) {
- var rect = region.rects[ir];
- var unitRect = rect.asUVRectInside(layer.bounds);
- var iq = layerQuad.projectUnitRect(unitRect);
- iq.backgroundColor = backgroundColor.toString();
- iq.borderColor = borderColor.toString();
- iq.borderWidth = 4.0;
- iq.stackingGroupId = stackingGroupId;
- iq.selectionToSetIfClicked = new cc.LayerRectSelection(
- layer, label, rect, rect);
- quads.push(iq);
- }
- }
-
- processRegion(layer.touchEventHandlerRegion, 'Touch listener',
- tr.b.Color.fromString('rgb(228, 226, 27)'));
- processRegion(layer.wheelEventHandlerRegion, 'Wheel listener',
- tr.b.Color.fromString('rgb(176, 205, 29)'));
- processRegion(layer.nonFastScrollableRegion, 'Repaints on scroll',
- tr.b.Color.fromString('rgb(213, 134, 32)'));
- },
-
- appendTileCoverageRectQuads_: function(
- quads, layer, layerQuad, heatmapType) {
- if (!layer.tileCoverageRects)
- return;
-
- var tiles = [];
- for (var ct = 0; ct < layer.tileCoverageRects.length; ++ct) {
- var tile = layer.tileCoverageRects[ct].tile;
- if (tile !== undefined)
- tiles.push(tile);
- }
-
- var lthi = this.layerTreeImpl_.layerTreeHostImpl;
- var minMax =
- this.getMinMaxForHeatmap_(lthi.activeTiles, heatmapType);
- var heatmapResult =
- this.computeHeatmapColors_(tiles, minMax, heatmapType);
- var heatIndex = 0;
-
- for (var ct = 0; ct < layer.tileCoverageRects.length; ++ct) {
- var rect = layer.tileCoverageRects[ct].geometryRect;
- rect = rect.scale(1.0 / layer.geometryContentsScale);
-
- var tile = layer.tileCoverageRects[ct].tile;
-
- var unitRect = rect.asUVRectInside(layer.bounds);
- var quad = layerQuad.projectUnitRect(unitRect);
-
- quad.backgroundColor = 'rgba(0, 0, 0, 0)';
- quad.stackingGroupId = layerQuad.stackingGroupId;
- var type = tr.e.cc.tileTypes.missing;
- if (tile) {
- type = tile.getTypeForLayer(layer);
- quad.backgroundColor = heatmapResult[heatIndex].color;
- ++heatIndex;
- }
-
- quad.borderColor = tr.e.cc.tileBorder[type].color;
- quad.borderWidth = tr.e.cc.tileBorder[type].width;
- var label;
- if (tile)
- label = 'coverageRect';
- else
- label = 'checkerboard coverageRect';
- quad.selectionToSetIfClicked = new cc.LayerRectSelection(
- layer, label, rect, layer.tileCoverageRects[ct]);
-
- quads.push(quad);
- }
- },
-
- appendLayoutRectQuads_: function(quads, layer, layerQuad) {
- if (!layer.layoutRects) {
- return;
- }
-
- for (var ct = 0; ct < layer.layoutRects.length; ++ct) {
- var rect = layer.layoutRects[ct].geometryRect;
- rect = rect.scale(1.0 / layer.geometryContentsScale);
-
- var unitRect = rect.asUVRectInside(layer.bounds);
- var quad = layerQuad.projectUnitRect(unitRect);
-
- quad.backgroundColor = 'rgba(0, 0, 0, 0)';
- quad.stackingGroupId = layerQuad.stackingGroupId;
-
- quad.borderColor = 'rgba(0, 0, 200, 0.7)';
- quad.borderWidth = 2;
- var label;
- label = 'Layout rect';
- quad.selectionToSetIfClicked = new cc.LayerRectSelection(
- layer, label, rect);
-
- quads.push(quad);
- }
- },
-
- getValueForHeatmap_: function(tile, heatmapType) {
- if (heatmapType === TILE_HEATMAP_TYPE.SCHEDULED_PRIORITY) {
- return tile.scheduledPriority === 0 ?
- undefined :
- tile.scheduledPriority;
- } else if (heatmapType === TILE_HEATMAP_TYPE.USING_GPU_MEMORY) {
- if (tile.isSolidColor)
- return 0.5;
- return tile.isUsingGpuMemory ? 0 : 1;
- }
- },
-
- getMinMaxForHeatmap_: function(tiles, heatmapType) {
- var range = new tr.b.Range();
- if (heatmapType === TILE_HEATMAP_TYPE.USING_GPU_MEMORY) {
- range.addValue(0);
- range.addValue(1);
- return range;
- }
-
- for (var i = 0; i < tiles.length; ++i) {
- var value = this.getValueForHeatmap_(tiles[i], heatmapType);
- if (value === undefined)
- continue;
- range.addValue(value);
- }
- if (range.range === 0)
- range.addValue(1);
- return range;
- },
-
- computeHeatmapColors_: function(tiles, minMax, heatmapType) {
- var min = minMax.min;
- var max = minMax.max;
-
- var color = function(value) {
- var hue = 120 * (1 - (value - min) / (max - min));
- if (hue < 0)
- hue = 0;
- return 'hsla(' + hue + ', 100%, 50%, 0.5)';
- };
-
- var values = [];
- for (var i = 0; i < tiles.length; ++i) {
- var tile = tiles[i];
- var value = this.getValueForHeatmap_(tile, heatmapType);
- var res = {
- value: value,
- color: value !== undefined ? color(value) : undefined
- };
- values.push(res);
- }
-
- return values;
- },
-
- appendTilesWithScaleQuads_: function(
- quads, layer, layerQuad, scale, heatmapType) {
- var lthi = this.layerTreeImpl_.layerTreeHostImpl;
-
- var tiles = [];
- for (var i = 0; i < lthi.activeTiles.length; ++i) {
- var tile = lthi.activeTiles[i];
-
- if (Math.abs(tile.contentsScale - scale) > 1e-6)
- continue;
-
- // TODO(vmpstr): Make the stiching of tiles and layers a part of
- // tile construction (issue 346)
- if (layer.layerId !== tile.layerId)
- continue;
-
- tiles.push(tile);
- }
-
- var minMax =
- this.getMinMaxForHeatmap_(lthi.activeTiles, heatmapType);
- var heatmapResult =
- this.computeHeatmapColors_(tiles, minMax, heatmapType);
-
- for (var i = 0; i < tiles.length; ++i) {
- var tile = tiles[i];
- var rect = tile.layerRect;
- if (!tile.layerRect)
- continue;
- var unitRect = rect.asUVRectInside(layer.bounds);
- var quad = layerQuad.projectUnitRect(unitRect);
-
- quad.backgroundColor = 'rgba(0, 0, 0, 0)';
- quad.stackingGroupId = layerQuad.stackingGroupId;
-
- var type = tile.getTypeForLayer(layer);
- quad.borderColor = tr.e.cc.tileBorder[type].color;
- quad.borderWidth = tr.e.cc.tileBorder[type].width;
-
- quad.backgroundColor = heatmapResult[i].color;
- var data = {
- tileType: type
- };
- if (heatmapType !== TILE_HEATMAP_TYPE.NONE)
- data[heatmapType] = heatmapResult[i].value;
- quad.selectionToSetIfClicked = new cc.TileSelection(tile, data);
- quads.push(quad);
- }
- },
-
- appendHighlightQuadsForLayer_: function(
- quads, layer, layerQuad, highlights) {
- highlights.forEach(function(highlight) {
- var rect = highlight.rect;
-
- var unitRect = rect.asUVRectInside(layer.bounds);
- var quad = layerQuad.projectUnitRect(unitRect);
-
- var colorId = ColorScheme.getColorIdForGeneralPurposeString(
- highlight.colorKey);
- colorId += ColorScheme.properties.brightenedOffsets[0];
-
- var color = ColorScheme.colors[colorId];
-
- var quadForDrawing = quad.clone();
- quadForDrawing.backgroundColor = color.withAlpha(0.5).toString();
- quadForDrawing.borderColor = color.withAlpha(1.0).darken().toString();
- quadForDrawing.stackingGroupId = layerQuad.stackingGroupId;
- quads.push(quadForDrawing);
-
- }, this);
- },
-
- generateRenderPassQuads: function() {
- if (!this.layerTreeImpl.layerTreeHostImpl.args.frame)
- return [];
- var renderPasses = this.renderPasses;
- if (!renderPasses)
- return [];
-
- var quads = [];
- for (var i = 0; i < renderPasses.length; ++i) {
- var quadList = renderPasses[i].quadList;
- for (var j = 0; j < quadList.length; ++j) {
- var drawQuad = quadList[j];
- var quad = drawQuad.rectAsTargetSpaceQuad.clone();
- quad.borderColor = 'rgb(170, 204, 238)';
- quad.borderWidth = 2;
- quad.stackingGroupId = i;
- quads.push(quad);
- }
- }
- return quads;
- },
-
- generateLayerQuads: function() {
- this.updateContentsPending_ = false;
-
- // Generate the quads for the view.
- var layers = this.layers;
- var quads = [];
- var nextStackingGroupId = 0;
- var alreadyVisitedLayerIds = {};
-
-
- var selectionHighlightsByLayerId;
- if (this.selection)
- selectionHighlightsByLayerId = this.selection.highlightsByLayerId;
- else
- selectionHighlightsByLayerId = {};
-
- var extraHighlightsByLayerId = this.extraHighlightsByLayerId || {};
-
- for (var i = 1; i <= layers.length; i++) {
- // Generate quads back-to-front.
- var layer = layers[layers.length - i];
- alreadyVisitedLayerIds[layer.layerId] = true;
- if (layer.objectInstance.name === 'cc::NinePatchLayerImpl')
- continue;
-
- var layerQuad = layer.layerQuad.clone();
- if (layer.usingGpuRasterization) {
- var pixelRatio = window.devicePixelRatio || 1;
- layerQuad.borderWidth = 2.0 * pixelRatio;
- layerQuad.borderColor = 'rgba(154,205,50,0.75)';
- } else {
- layerQuad.borderColor = 'rgba(0,0,0,0.75)';
- }
- layerQuad.stackingGroupId = nextStackingGroupId++;
- layerQuad.selectionToSetIfClicked = new cc.LayerSelection(layer);
- layerQuad.layer = layer;
- if (this.showOtherLayers && this.selectedLayer === layer)
- layerQuad.upperBorderColor = 'rgb(156,189,45)';
-
- if (this.showAnimationBounds)
- this.appendAnimationQuads_(quads, layer, layerQuad);
-
- this.appendImageQuads_(quads, layer, layerQuad);
- quads.push(layerQuad);
-
-
- if (this.showInvalidations)
- this.appendInvalidationQuads_(quads, layer, layerQuad);
- if (this.showUnrecordedRegion)
- this.appendUnrecordedRegionQuads_(quads, layer, layerQuad);
- if (this.showBottlenecks)
- this.appendBottleneckQuads_(quads, layer, layerQuad,
- layerQuad.stackingGroupId);
- if (this.showLayoutRects)
- this.appendLayoutRectQuads_(quads, layer, layerQuad);
-
- if (this.howToShowTiles === 'coverage') {
- this.appendTileCoverageRectQuads_(
- quads, layer, layerQuad, this.tileHeatmapType);
- } else if (this.howToShowTiles !== 'none') {
- this.appendTilesWithScaleQuads_(
- quads, layer, layerQuad,
- this.howToShowTiles, this.tileHeatmapType);
- }
-
- var highlights;
- highlights = extraHighlightsByLayerId[layer.layerId];
- if (highlights) {
- this.appendHighlightQuadsForLayer_(
- quads, layer, layerQuad, highlights);
- }
-
- highlights = selectionHighlightsByLayerId[layer.layerId];
- if (highlights) {
- this.appendHighlightQuadsForLayer_(
- quads, layer, layerQuad, highlights);
- }
- }
-
- this.layerTreeImpl.iterLayers(function(layer, depth, isMask, isReplica) {
- if (!this.showOtherLayers && this.selectedLayer !== layer)
- return;
- if (alreadyVisitedLayerIds[layer.layerId])
- return;
- var layerQuad = layer.layerQuad;
- var stackingGroupId = nextStackingGroupId++;
- if (this.showBottlenecks)
- this.appendBottleneckQuads_(quads, layer, layerQuad, stackingGroupId);
- }, this);
-
- var tracedInputLatencies = this.layerTreeImpl.tracedInputLatencies;
- if (this.showInputEvents && tracedInputLatencies) {
- for (var i = 0; i < tracedInputLatencies.length; i++) {
- var coordinatesArray = tracedInputLatencies[i].args.data.coordinates;
- for (var j = 0; j < coordinatesArray.length; j++) {
- var inputQuad = tr.b.Quad.fromXYWH(
- coordinatesArray[j].x - 25,
- coordinatesArray[j].y - 25,
- 50,
- 50);
- inputQuad.borderColor = 'rgba(0, 0, 0, 0)';
- inputQuad.imageData = this.inputEventImageData_;
- quads.push(inputQuad);
- }
- }
- }
-
- return quads;
- },
-
- updateInfoBar_: function(infoBarMessages) {
- if (infoBarMessages.length) {
- this.infoBar_.removeAllButtons();
- this.infoBar_.message = 'Some problems were encountered...';
- this.infoBar_.addButton('More info...', function(e) {
- var overlay = new tr.ui.b.Overlay();
- Polymer.dom(overlay).textContent = '';
- infoBarMessages.forEach(function(message) {
- var title = document.createElement('h3');
- Polymer.dom(title).textContent = message.header;
-
- var details = document.createElement('div');
- Polymer.dom(details).textContent = message.details;
-
- Polymer.dom(overlay).appendChild(title);
- Polymer.dom(overlay).appendChild(details);
- });
- overlay.visible = true;
-
- e.stopPropagation();
- return false;
- });
- this.infoBar_.visible = true;
- } else {
- this.infoBar_.removeAllButtons();
- this.infoBar_.message = '';
- this.infoBar_.visible = false;
- }
- },
-
- getWhatRasterized_: function() {
- var lthi = this.layerTreeImpl_.layerTreeHostImpl;
- var renderProcess = lthi.objectInstance.parent;
- var tasks = [];
- for (var event of renderProcess.getDescendantEvents()) {
- if (!(event instanceof tr.model.Slice))
- continue;
-
- var tile = tr.e.cc.getTileFromRasterTaskSlice(event);
- if (tile === undefined)
- continue;
-
- if (tile.containingSnapshot === lthi)
- tasks.push(event);
- }
- return tasks;
- },
-
- updateWhatRasterizedLinkState_: function() {
- var tasks = this.getWhatRasterized_();
- if (tasks.length) {
- Polymer.dom(this.whatRasterizedLink_).textContent =
- tasks.length + ' raster tasks';
- this.whatRasterizedLink_.style.display = '';
- } else {
- Polymer.dom(this.whatRasterizedLink_).textContent = '';
- this.whatRasterizedLink_.style.display = 'none';
- }
- },
-
- onWhatRasterizedLinkClicked_: function() {
- var tasks = this.getWhatRasterized_();
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = new tr.model.EventSet(tasks);
- this.dispatchEvent(event);
- }
- };
-
- return {
- LayerTreeQuadStackView: LayerTreeQuadStackView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view_test.html
deleted file mode 100644
index 50c6477c142..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view_test.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/cc.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('tileCoverageRectCount', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = m.processes[1];
-
- var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
- var lthi = instance.snapshots[0];
- var numLayers = lthi.activeTree.renderSurfaceLayerList.length;
- var layer = lthi.activeTree.renderSurfaceLayerList[numLayers - 1];
-
- var view = new tr.ui.e.chrome.cc.LayerTreeQuadStackView();
- view.layerTreeImpl = lthi.activeTree;
- view.selection = new tr.ui.e.chrome.cc.LayerSelection(layer);
- view.howToShowTiles = 'none';
- view.showInvalidations = false;
- view.showContents = false;
- view.showOtherLAyers = false;
-
- // There should be some quads drawn with all "show" checkboxes off,
- // but that number can change with new features added.
- var aQuads = view.generateLayerQuads();
- view.howToShowTiles = 'coverage';
- var bQuads = view.generateLayerQuads();
- var numCoverageRects = bQuads.length - aQuads.length;
-
- // We know we have 5 coverage rects in lthi cats.
- assert.equal(numCoverageRects, 5);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.css
deleted file mode 100644
index 612dbc2eb9a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ tr-ui-e-chrome-cc-layer-view {
- -webkit-flex-direction: column;
- display: -webkit-flex;
- left: 0;
- position: relative;
- top: 0;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-view >
- tr-ui-e-chrome-cc-layer-tree-quad-stack-view {
- -webkit-flex: 1 1 100%;
- -webkit-flex-direction: column;
- min-height: 0;
- display: -webkit-flex;
- width: 100%;
-}
-
-* /deep/tr-ui-e-chrome-cc- layer-view > tr-ui-e-chrome-cc-layer-view-analysis {
- height: 150px; /* fixed height given by drag control */
- overflow-y: auto;
-}
-
-* /deep/ tr-ui-e-chrome-cc-layer-view >
- tr-ui-e-chrome-cc-layer-view-analysis * {
- -webkit-user-select: text;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.html
deleted file mode 100644
index 9bd34e084b6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/layer_view.css">
-
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/extras/chrome/cc/constants.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview LayerView coordinates graphical and analysis views of layers.
- */
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var constants = tr.e.cc.constants;
-
- /**
- * @constructor
- */
- var LayerView = tr.ui.b.define('tr-ui-e-chrome-cc-layer-view');
-
- LayerView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.layerTreeQuadStackView_ =
- new tr.ui.e.chrome.cc.LayerTreeQuadStackView();
- this.dragBar_ = document.createElement('tr-ui-b-drag-handle');
- this.analysisEl_ =
- document.createElement('tr-ui-e-chrome-cc-layer-view-analysis');
- this.analysisEl_.addEventListener('requestSelectionChange',
- this.onRequestSelectionChangeFromAnalysisEl_.bind(this));
-
- this.dragBar_.target = this.analysisEl_;
-
- Polymer.dom(this).appendChild(this.layerTreeQuadStackView_);
- Polymer.dom(this).appendChild(this.dragBar_);
- Polymer.dom(this).appendChild(this.analysisEl_);
-
- this.layerTreeQuadStackView_.addEventListener('selection-change',
- function() {
- this.layerTreeQuadStackViewSelectionChanged_();
- }.bind(this));
- this.layerTreeQuadStackViewSelectionChanged_();
- },
-
- get layerTreeImpl() {
- return this.layerTreeQuadStackView_.layerTreeImpl;
- },
-
- set layerTreeImpl(newValue) {
- return this.layerTreeQuadStackView_.layerTreeImpl = newValue;
- },
-
- set isRenderPassQuads(newValue) {
- return this.layerTreeQuadStackView_.isRenderPassQuads = newValue;
- },
-
- get selection() {
- return this.layerTreeQuadStackView_.selection;
- },
-
- set selection(newValue) {
- this.layerTreeQuadStackView_.selection = newValue;
- },
-
- regenerateContent: function() {
- this.layerTreeQuadStackView_.regenerateContent();
- },
-
- layerTreeQuadStackViewSelectionChanged_: function() {
- var selection = this.layerTreeQuadStackView_.selection;
- if (selection) {
- this.dragBar_.style.display = '';
- this.analysisEl_.style.display = '';
- Polymer.dom(this.analysisEl_).textContent = '';
-
- var layer = selection.layer;
- if (layer && layer.args && layer.args.pictures) {
- Polymer.dom(this.analysisEl_).appendChild(
- this.createPictureBtn_(layer.args.pictures));
- }
-
- var analysis = selection.createAnalysis();
- Polymer.dom(this.analysisEl_).appendChild(analysis);
- } else {
- this.dragBar_.style.display = 'none';
- this.analysisEl_.style.display = 'none';
- var analysis = Polymer.dom(this.analysisEl_).firstChild;
- if (analysis)
- Polymer.dom(this.analysisEl_).removeChild(analysis);
- this.layerTreeQuadStackView_.style.height =
- window.getComputedStyle(this).height;
- }
- tr.b.dispatchSimpleEvent(this, 'selection-change');
- },
-
- createPictureBtn_: function(pictures) {
- if (!(pictures instanceof Array))
- pictures = [pictures];
-
- var link = document.createElement('tr-ui-a-analysis-link');
- link.selection = function() {
- var layeredPicture = new tr.e.cc.LayeredPicture(pictures);
- var snapshot = new tr.e.cc.PictureSnapshot(layeredPicture);
- snapshot.picture = layeredPicture;
-
- var selection = new tr.model.EventSet();
- selection.push(snapshot);
- return selection;
- };
- Polymer.dom(link).textContent = 'View in Picture Debugger';
- return link;
- },
-
- onRequestSelectionChangeFromAnalysisEl_: function(e) {
- if (!(e.selection instanceof tr.ui.e.chrome.cc.Selection))
- return;
-
- e.stopPropagation();
- this.selection = e.selection;
- },
-
- get extraHighlightsByLayerId() {
- return this.layerTreeQuadStackView_.extraHighlightsByLayerId;
- },
-
- set extraHighlightsByLayerId(extraHighlightsByLayerId) {
- this.layerTreeQuadStackView_.extraHighlightsByLayerId =
- extraHighlightsByLayerId;
- }
- };
-
- return {
- LayerView: LayerView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view_test.html
deleted file mode 100644
index a4bcab78785..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/layer_view_test.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/cc.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_view.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = m.processes[1];
-
- var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
- var lthi = instance.snapshots[0];
- var numLayers = lthi.activeTree.renderSurfaceLayerList.length;
- var layer = lthi.activeTree.renderSurfaceLayerList[numLayers - 1];
-
- var view = new tr.ui.e.chrome.cc.LayerView();
- view.style.height = '500px';
- view.layerTreeImpl = lthi.activeTree;
- view.selection = new tr.ui.e.chrome.cc.LayerSelection(layer);
-
- this.addHTMLOutput(view);
- });
-
- test('instantiate_withTileHighlight', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = m.processes[1];
-
- var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
- var lthi = instance.snapshots[0];
- var numLayers = lthi.activeTree.renderSurfaceLayerList.length;
- var layer = lthi.activeTree.renderSurfaceLayerList[numLayers - 1];
- var tile = lthi.activeTiles[0];
-
- var view = new tr.ui.e.chrome.cc.LayerView();
- view.style.height = '500px';
- view.layerTreeImpl = lthi.activeTree;
- view.selection = new tr.ui.e.chrome.cc.TileSelection(tile);
- this.addHTMLOutput(view);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger.html
deleted file mode 100644
index 7240a75f386..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger.html
+++ /dev/null
@@ -1,496 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base64.html">
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/base/info_bar.html">
-<link rel="import" href="/tracing/ui/base/list_view.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_selector.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-<link rel="import"
- href="/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_ops_chart_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_ops_list_view.html">
-
-<template id="tr-ui-e-chrome-cc-picture-debugger-template">
- <style>
- * /deep/ tr-ui-e-chrome-cc-picture-debugger {
- -webkit-flex: 1 1 auto;
- -webkit-flex-direction: row;
- display: -webkit-flex;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > tr-ui-a-generic-object-view {
- -webkit-flex-direction: column;
- display: -webkit-flex;
- width: 400px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel {
- -webkit-flex-direction: column;
- display: -webkit-flex;
- min-width: 300px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel > picture-info {
- -webkit-flex: 0 0 auto;
- padding-top: 2px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > left-panel >
- picture-info .title {
- font-weight: bold;
- margin-left: 5px;
- margin-right: 5px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > tr-ui-b-drag-handle {
- -webkit-flex: 0 0 auto;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger .filename {
- -webkit-user-select: text;
- margin-left: 5px;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > right-panel {
- -webkit-flex: 1 1 auto;
- -webkit-flex-direction: column;
- display: -webkit-flex;
- }
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger > right-panel >
- tr-ui-e-chrome-cc-picture-ops-chart-view {
- min-height: 150px;
- min-width : 0;
- overflow-x: auto;
- overflow-y: hidden;
- }
-
- /*************************************************/
-
- * /deep/ tr-ui-e-chrome-cc-picture-debugger raster-area {
- background-color: #ddd;
- min-height: 200px;
- min-width: 200px;
- overflow-y: auto;
- padding-left: 5px;
- }
- </style>
-
- <left-panel>
- <picture-info>
- <div>
- <span class='title'>Skia Picture</span>
- <span class='size'></span>
- </div>
- <div>
- <input class='filename' type='text' value='skpicture.skp' />
- <button class='export'>Export</button>
- </div>
- </picture-info>
- </left-panel>
- <right-panel>
- <tr-ui-e-chrome-cc-picture-ops-chart-view>
- </tr-ui-e-chrome-cc-picture-ops-chart-view>
- <raster-area><canvas></canvas></raster-area>
- </right-panel>
-</template>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var THIS_DOC = document.currentScript.ownerDocument;
-
- /**
- * PictureDebugger is a view of a PictureSnapshot for inspecting
- * the picture in detail. (e.g., timing information, etc.)
- *
- * @constructor
- */
- var PictureDebugger = tr.ui.b.define('tr-ui-e-chrome-cc-picture-debugger');
-
- PictureDebugger.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- var node = tr.ui.b.instantiateTemplate(
- '#tr-ui-e-chrome-cc-picture-debugger-template', THIS_DOC);
-
- Polymer.dom(this).appendChild(node);
-
- this.pictureAsImageData_ = undefined;
- this.showOverdraw_ = false;
- this.zoomScaleValue_ = 1;
-
- this.sizeInfo_ = Polymer.dom(this).querySelector('.size');
- this.rasterArea_ = Polymer.dom(this).querySelector('raster-area');
- this.rasterCanvas_ = Polymer.dom(this.rasterArea_)
- .querySelector('canvas');
- this.rasterCtx_ = this.rasterCanvas_.getContext('2d');
-
- this.filename_ = Polymer.dom(this).querySelector('.filename');
-
- this.drawOpsChartSummaryView_ =
- new tr.ui.e.chrome.cc.PictureOpsChartSummaryView();
- this.drawOpsChartView_ = new tr.ui.e.chrome.cc.PictureOpsChartView();
- this.drawOpsChartView_.addEventListener(
- 'selection-changed', this.onChartBarClicked_.bind(this));
-
- this.exportButton_ = Polymer.dom(this).querySelector('.export');
- this.exportButton_.addEventListener(
- 'click', this.onSaveAsSkPictureClicked_.bind(this));
-
- this.trackMouse_();
-
- var overdrawCheckbox = tr.ui.b.createCheckBox(
- this, 'showOverdraw',
- 'pictureView.showOverdraw', false,
- 'Show overdraw');
-
- var chartCheckbox = tr.ui.b.createCheckBox(
- this, 'showSummaryChart',
- 'pictureView.showSummaryChart', false,
- 'Show timing summary');
-
- var pictureInfo = Polymer.dom(this).querySelector('picture-info');
- Polymer.dom(pictureInfo).appendChild(overdrawCheckbox);
- Polymer.dom(pictureInfo).appendChild(chartCheckbox);
-
- this.drawOpsView_ = new tr.ui.e.chrome.cc.PictureOpsListView();
- this.drawOpsView_.addEventListener(
- 'selection-changed', this.onChangeDrawOps_.bind(this));
-
- var leftPanel = Polymer.dom(this).querySelector('left-panel');
- Polymer.dom(leftPanel).appendChild(this.drawOpsChartSummaryView_);
- Polymer.dom(leftPanel).appendChild(this.drawOpsView_);
-
- var middleDragHandle = document.createElement('tr-ui-b-drag-handle');
- middleDragHandle.horizontal = false;
- middleDragHandle.target = leftPanel;
-
- var rightPanel = Polymer.dom(this).querySelector('right-panel');
- rightPanel.replaceChild(
- this.drawOpsChartView_, Polymer.dom(rightPanel)
- .querySelector('tr-ui-e-chrome-cc-picture-ops-chart-view'));
-
- this.infoBar_ = document.createElement('tr-ui-b-info-bar');
- Polymer.dom(this.rasterArea_).appendChild(this.infoBar_);
-
- Polymer.dom(this).insertBefore(middleDragHandle, rightPanel);
-
- this.picture_ = undefined;
-
- var hkc = document.createElement('tv-ui-b-hotkey-controller');
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- thisArg: this,
- keyCode: 'h'.charCodeAt(0),
- callback: function(e) {
- this.moveSelectedOpBy(-1);
- e.stopPropagation();
- }
- }));
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- thisArg: this,
- keyCode: 'l'.charCodeAt(0),
- callback: function(e) {
- this.moveSelectedOpBy(1);
- e.stopPropagation();
- }
- }));
- Polymer.dom(this).appendChild(hkc);
-
- // Add a mutation observer so that when the view is resized we can
- // update the chart summary view.
- this.mutationObserver_ = new MutationObserver(
- this.onMutation_.bind(this));
- this.mutationObserver_.observe(leftPanel, { attributes: true });
- },
-
- onMutation_: function(mutations) {
-
- for (var m = 0; m < mutations.length; m++) {
- // A style change would indicate that the element has resized
- // so we should re-render the chart.
- if (mutations[m].attributeName === 'style') {
- this.drawOpsChartSummaryView_.requiresRedraw = true;
- this.drawOpsChartSummaryView_.updateChartContents();
-
- this.drawOpsChartView_.dimensionsHaveChanged = true;
- this.drawOpsChartView_.updateChartContents();
- break;
- }
- }
- },
-
- onSaveAsSkPictureClicked_: function() {
- // Decode base64 data into a String
- var rawData = tr.b.Base64.atob(this.picture_.getBase64SkpData());
-
- // Convert this String into an Uint8Array
- var length = rawData.length;
- var arrayBuffer = new ArrayBuffer(length);
- var uint8Array = new Uint8Array(arrayBuffer);
- for (var c = 0; c < length; c++)
- uint8Array[c] = rawData.charCodeAt(c);
-
- // Create a blob URL from the binary array.
- var blob = new Blob([uint8Array], {type: 'application/octet-binary'});
- var blobUrl = window.webkitURL.createObjectURL(blob);
-
- // Create a link and click on it. BEST API EVAR!
- var link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
- link.href = blobUrl;
- link.download = this.filename_.value;
- var event = document.createEvent('MouseEvents');
- event.initMouseEvent(
- 'click', true, false, window, 0, 0, 0, 0, 0,
- false, false, false, false, 0, null);
- link.dispatchEvent(event);
- },
-
- get picture() {
- return this.picture_;
- },
-
- set picture(picture) {
- this.drawOpsView_.picture = picture;
- this.drawOpsChartView_.picture = picture;
- this.drawOpsChartSummaryView_.picture = picture;
- this.picture_ = picture;
-
- this.exportButton_.disabled = !this.picture_.canSave;
-
- if (picture) {
- var size = this.getRasterCanvasSize_();
- this.rasterCanvas_.width = size.width;
- this.rasterCanvas_.height = size.height;
- }
-
- var bounds = this.rasterArea_.getBoundingClientRect();
- var selectorBounds = this.mouseModeSelector_.getBoundingClientRect();
- this.mouseModeSelector_.pos = {
- x: (bounds.right - selectorBounds.width - 10),
- y: bounds.top
- };
-
- this.rasterize_();
-
- this.scheduleUpdateContents_();
- },
-
- getRasterCanvasSize_: function() {
- var style = window.getComputedStyle(this.rasterArea_);
- var width =
- Math.max(parseInt(style.width), this.picture_.layerRect.width);
- var height =
- Math.max(parseInt(style.height), this.picture_.layerRect.height);
-
- return {
- width: width,
- height: height
- };
- },
-
- scheduleUpdateContents_: function() {
- if (this.updateContentsPending_)
- return;
- this.updateContentsPending_ = true;
- tr.b.requestAnimationFrameInThisFrameIfPossible(
- this.updateContents_.bind(this)
- );
- },
-
- updateContents_: function() {
- this.updateContentsPending_ = false;
-
- if (this.picture_) {
- Polymer.dom(this.sizeInfo_).textContent = '(' +
- this.picture_.layerRect.width + ' x ' +
- this.picture_.layerRect.height + ')';
- }
-
- this.drawOpsChartView_.updateChartContents();
- this.drawOpsChartView_.scrollSelectedItemIntoViewIfNecessary();
-
- // Return if picture hasn't finished rasterizing.
- if (!this.pictureAsImageData_)
- return;
-
- this.infoBar_.visible = false;
- this.infoBar_.removeAllButtons();
- if (this.pictureAsImageData_.error) {
- this.infoBar_.message = 'Cannot rasterize...';
- this.infoBar_.addButton('More info...', function(e) {
- var overlay = new tr.ui.b.Overlay();
- Polymer.dom(overlay).textContent = this.pictureAsImageData_.error;
- overlay.visible = true;
- e.stopPropagation();
- return false;
- }.bind(this));
- this.infoBar_.visible = true;
- }
-
- this.drawPicture_();
- },
-
- drawPicture_: function() {
- var size = this.getRasterCanvasSize_();
- if (size.width !== this.rasterCanvas_.width)
- this.rasterCanvas_.width = size.width;
- if (size.height !== this.rasterCanvas_.height)
- this.rasterCanvas_.height = size.height;
-
- this.rasterCtx_.clearRect(0, 0, size.width, size.height);
-
- if (!this.pictureAsImageData_.imageData)
- return;
-
- var imgCanvas = this.pictureAsImageData_.asCanvas();
- var w = imgCanvas.width;
- var h = imgCanvas.height;
- this.rasterCtx_.drawImage(imgCanvas, 0, 0, w, h,
- 0, 0, w * this.zoomScaleValue_,
- h * this.zoomScaleValue_);
- },
-
- rasterize_: function() {
- if (this.picture_) {
- this.picture_.rasterize(
- {
- stopIndex: this.drawOpsView_.selectedOpIndex,
- showOverdraw: this.showOverdraw_
- },
- this.onRasterComplete_.bind(this));
- }
- },
-
- onRasterComplete_: function(pictureAsImageData) {
- this.pictureAsImageData_ = pictureAsImageData;
- this.scheduleUpdateContents_();
- },
-
- moveSelectedOpBy: function(increment) {
- if (this.selectedOpIndex === undefined) {
- this.selectedOpIndex = 0;
- return;
- }
- this.selectedOpIndex = tr.b.clamp(
- this.selectedOpIndex + increment,
- 0, this.numOps);
- },
-
- get numOps() {
- return this.drawOpsView_.numOps;
- },
-
- get selectedOpIndex() {
- return this.drawOpsView_.selectedOpIndex;
- },
-
- set selectedOpIndex(index) {
- this.drawOpsView_.selectedOpIndex = index;
- this.drawOpsChartView_.selectedOpIndex = index;
- },
-
- onChartBarClicked_: function(e) {
- this.drawOpsView_.selectedOpIndex =
- this.drawOpsChartView_.selectedOpIndex;
- },
-
- onChangeDrawOps_: function(e) {
- this.rasterize_();
- this.scheduleUpdateContents_();
-
- this.drawOpsChartView_.selectedOpIndex =
- this.drawOpsView_.selectedOpIndex;
- },
-
- set showOverdraw(v) {
- this.showOverdraw_ = v;
- this.rasterize_();
- },
-
- set showSummaryChart(chartShouldBeVisible) {
- if (chartShouldBeVisible)
- this.drawOpsChartSummaryView_.show();
- else
- this.drawOpsChartSummaryView_.hide();
- },
-
- trackMouse_: function() {
- this.mouseModeSelector_ = document.createElement(
- 'tr-ui-b-mouse-mode-selector');
- this.mouseModeSelector_.targetElement = this.rasterArea_;
- Polymer.dom(this.rasterArea_).appendChild(this.mouseModeSelector_);
-
- this.mouseModeSelector_.supportedModeMask =
- tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;
- this.mouseModeSelector_.mode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;
- this.mouseModeSelector_.defaultMode = tr.ui.b.MOUSE_SELECTOR_MODE.ZOOM;
- this.mouseModeSelector_.settingsKey = 'pictureDebugger.mouseModeSelector';
-
- this.mouseModeSelector_.addEventListener('beginzoom',
- this.onBeginZoom_.bind(this));
- this.mouseModeSelector_.addEventListener('updatezoom',
- this.onUpdateZoom_.bind(this));
- this.mouseModeSelector_.addEventListener('endzoom',
- this.onEndZoom_.bind(this));
- },
-
- onBeginZoom_: function(e) {
- this.isZooming_ = true;
-
- this.lastMouseViewPos_ = this.extractRelativeMousePosition_(e);
-
- e.preventDefault();
- },
-
- onUpdateZoom_: function(e) {
- if (!this.isZooming_)
- return;
-
- var currentMouseViewPos = this.extractRelativeMousePosition_(e);
-
- // Take the distance the mouse has moved and we want to zoom at about
- // 1/1000th of that speed. 0.01 feels jumpy. This could possibly be tuned
- // more if people feel it's too slow.
- this.zoomScaleValue_ +=
- ((this.lastMouseViewPos_.y - currentMouseViewPos.y) * 0.001);
- this.zoomScaleValue_ = Math.max(this.zoomScaleValue_, 0.1);
-
- this.drawPicture_();
-
- this.lastMouseViewPos_ = currentMouseViewPos;
- },
-
- onEndZoom_: function(e) {
- this.lastMouseViewPos_ = undefined;
- this.isZooming_ = false;
- e.preventDefault();
- },
-
- extractRelativeMousePosition_: function(e) {
- return {
- x: e.clientX - this.rasterArea_.offsetLeft,
- y: e.clientY - this.rasterArea_.offsetTop
- };
- }
- };
-
- return {
- PictureDebugger: PictureDebugger
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger_test.html
deleted file mode 100644
index 1237fb6a29c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_debugger_test.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_debugger.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var picture = new tr.e.cc.PictureSnapshot({id: '31415'}, 10, {
- 'params': {
- 'opaque_rect': [-15, -15, 0, 0],
- 'layer_rect': [-15, -15, 46, 833]
- },
- 'skp64': 'DAAAAHYEAADzAQAABwAAAAFkYWVy8AAAAAgAAB4DAAAADAAAIAAAgD8AAIA/CAAAHgMAAAAcAAADAAAAAAAAAAAAwI5EAID5QwEAAADoAAAACAAAHgMAAAAMAAAjAAAAAAAAAAAMAAAjAAAAAAAAAAAcAAADAAAAAAAAAAAAwI5EAID5QwEAAADkAAAAGAAAFQEAAAAAAAAAAAAAAADAjkQAgPlDGAAAFQIAAAAAAAAAAAAAAADAjkQAgPlDCAAAHgMAAAAcAAADAAAAAAAAAAAAwI5EAID5QwEAAADgAAAAGAAAFQMAAAAAAKBAAACgQAAAgEIAAIBCBAAAHAQAABwEAAAcBAAAHHRjYWYBAAAADVNrU3JjWGZlcm1vZGVjZnB0AAAAAHlhcmGgAAAAIHRucAMAAAAAAEBBAACAPwAAAAAAAIA/AAAAAAAAgEAAAP//ADABAAAAAAAAAEBBAACAPwAAAAAAAIA/AAAAAAAAgED/////AjABAAAAAAAAAAAAAAAAAAEAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEEAAIA/AAAAAAAAgD8AAAAAAACAQP8AAP8AMAEAAAAAACBmb2U=' // @suppress longLineCheck
- });
- picture.preInitialize();
- picture.initialize();
-
- var dbg = new tr.ui.e.chrome.cc.PictureDebugger();
- this.addHTMLOutput(dbg);
- dbg.picture = picture;
- dbg.style.border = '1px solid black';
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css
deleted file mode 100644
index fdc93e54c60..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-summary-view {
- -webkit-flex: 0 0 auto;
- font-size: 0;
- margin: 0;
- min-height: 200px;
- min-width: 200px;
- overflow: hidden;
- padding: 0;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-summary-view.hidden {
- display: none;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.html
deleted file mode 100644
index c9d60769fdc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.html
+++ /dev/null
@@ -1,472 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet"
- href="/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css">
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var OPS_TIMING_ITERATIONS = 3;
- var CHART_PADDING_LEFT = 65;
- var CHART_PADDING_RIGHT = 40;
- var AXIS_PADDING_LEFT = 60;
- var AXIS_PADDING_RIGHT = 35;
- var AXIS_PADDING_TOP = 25;
- var AXIS_PADDING_BOTTOM = 45;
- var AXIS_LABEL_PADDING = 5;
- var AXIS_TICK_SIZE = 10;
- var LABEL_PADDING = 5;
- var LABEL_INTERLEAVE_OFFSET = 15;
- var BAR_PADDING = 5;
- var VERTICAL_TICKS = 5;
- var HUE_CHAR_CODE_ADJUSTMENT = 5.7;
-
- /**
- * Provides a chart showing the cumulative time spent in Skia operations
- * during picture rasterization.
- *
- * @constructor
- */
- var PictureOpsChartSummaryView = tr.ui.b.define(
- 'tr-ui-e-chrome-cc-picture-ops-chart-summary-view');
-
- PictureOpsChartSummaryView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.picture_ = undefined;
- this.pictureDataProcessed_ = false;
-
- this.chartScale_ = window.devicePixelRatio;
-
- this.chart_ = document.createElement('canvas');
- this.chartCtx_ = this.chart_.getContext('2d');
- Polymer.dom(this).appendChild(this.chart_);
-
- this.opsTimingData_ = [];
-
- this.chartWidth_ = 0;
- this.chartHeight_ = 0;
- this.requiresRedraw_ = true;
-
- this.currentBarMouseOverTarget_ = null;
-
- this.chart_.addEventListener('mousemove', this.onMouseMove_.bind(this));
- },
-
- get requiresRedraw() {
- return this.requiresRedraw_;
- },
-
- set requiresRedraw(requiresRedraw) {
- this.requiresRedraw_ = requiresRedraw;
- },
-
- get picture() {
- return this.picture_;
- },
-
- set picture(picture) {
- this.picture_ = picture;
- this.pictureDataProcessed_ = false;
-
- if (Polymer.dom(this).classList.contains('hidden'))
- return;
-
- this.processPictureData_();
- this.requiresRedraw = true;
- this.updateChartContents();
- },
-
- hide: function() {
- Polymer.dom(this).classList.add('hidden');
- },
-
- show: function() {
-
- Polymer.dom(this).classList.remove('hidden');
-
- if (this.pictureDataProcessed_)
- return;
-
- this.processPictureData_();
- this.requiresRedraw = true;
- this.updateChartContents();
-
- },
-
- onMouseMove_: function(e) {
-
- var lastBarMouseOverTarget = this.currentBarMouseOverTarget_;
- this.currentBarMouseOverTarget_ = null;
-
- var x = e.offsetX;
- var y = e.offsetY;
-
- var chartLeft = CHART_PADDING_LEFT;
- var chartRight = this.chartWidth_ - CHART_PADDING_RIGHT;
- var chartTop = AXIS_PADDING_TOP;
- var chartBottom = this.chartHeight_ - AXIS_PADDING_BOTTOM;
- var chartInnerWidth = chartRight - chartLeft;
-
- if (x > chartLeft && x < chartRight && y > chartTop && y < chartBottom) {
-
- this.currentBarMouseOverTarget_ = Math.floor(
- (x - chartLeft) / chartInnerWidth * this.opsTimingData_.length);
-
- this.currentBarMouseOverTarget_ = tr.b.clamp(
- this.currentBarMouseOverTarget_, 0, this.opsTimingData_.length - 1);
-
- }
-
- if (this.currentBarMouseOverTarget_ === lastBarMouseOverTarget)
- return;
-
- this.drawChartContents_();
- },
-
- updateChartContents: function() {
-
- if (this.requiresRedraw)
- this.updateChartDimensions_();
-
- this.drawChartContents_();
- },
-
- updateChartDimensions_: function() {
- this.chartWidth_ = this.offsetWidth;
- this.chartHeight_ = this.offsetHeight;
-
- // Scale up the canvas according to the devicePixelRatio, then reduce it
- // down again via CSS. Finally we apply a scale to the canvas so that
- // things are drawn at the correct size.
- this.chart_.width = this.chartWidth_ * this.chartScale_;
- this.chart_.height = this.chartHeight_ * this.chartScale_;
-
- this.chart_.style.width = this.chartWidth_ + 'px';
- this.chart_.style.height = this.chartHeight_ + 'px';
-
- this.chartCtx_.scale(this.chartScale_, this.chartScale_);
- },
-
- processPictureData_: function() {
-
- this.resetOpsTimingData_();
- this.pictureDataProcessed_ = true;
-
- if (!this.picture_)
- return;
-
- var ops = this.picture_.getOps();
- if (!ops)
- return;
-
- ops = this.picture_.tagOpsWithTimings(ops);
-
- // Check that there are valid times.
- if (ops[0].cmd_time === undefined)
- return;
-
- this.collapseOpsToTimingBuckets_(ops);
- },
-
- drawChartContents_: function() {
-
- this.clearChartContents_();
-
- if (this.opsTimingData_.length === 0) {
- this.showNoTimingDataMessage_();
- return;
- }
-
- this.drawChartAxes_();
- this.drawBars_();
- this.drawLineAtBottomOfChart_();
-
- if (this.currentBarMouseOverTarget_ === null)
- return;
-
- this.drawTooltip_();
- },
-
- drawLineAtBottomOfChart_: function() {
- this.chartCtx_.strokeStyle = '#AAA';
- this.chartCtx_.moveTo(0, this.chartHeight_ - 0.5);
- this.chartCtx_.lineTo(this.chartWidth_, this.chartHeight_ - 0.5);
- this.chartCtx_.stroke();
- },
-
- drawTooltip_: function() {
-
- var tooltipData = this.opsTimingData_[this.currentBarMouseOverTarget_];
- var tooltipTitle = tooltipData.cmd_string;
- var tooltipTime = tooltipData.cmd_time.toFixed(4);
-
- var tooltipWidth = 110;
- var tooltipHeight = 40;
- var chartInnerWidth = this.chartWidth_ - CHART_PADDING_RIGHT -
- CHART_PADDING_LEFT;
- var barWidth = chartInnerWidth / this.opsTimingData_.length;
- var tooltipOffset = Math.round((tooltipWidth - barWidth) * 0.5);
-
- var left = CHART_PADDING_LEFT + this.currentBarMouseOverTarget_ *
- barWidth - tooltipOffset;
- var top = Math.round((this.chartHeight_ - tooltipHeight) * 0.5);
-
- this.chartCtx_.save();
-
- this.chartCtx_.shadowOffsetX = 0;
- this.chartCtx_.shadowOffsetY = 5;
- this.chartCtx_.shadowBlur = 4;
- this.chartCtx_.shadowColor = 'rgba(0,0,0,0.4)';
-
- this.chartCtx_.strokeStyle = '#888';
- this.chartCtx_.fillStyle = '#EEE';
- this.chartCtx_.fillRect(left, top, tooltipWidth, tooltipHeight);
-
- this.chartCtx_.shadowColor = 'transparent';
- this.chartCtx_.translate(0.5, 0.5);
- this.chartCtx_.strokeRect(left, top, tooltipWidth, tooltipHeight);
-
- this.chartCtx_.restore();
-
- this.chartCtx_.fillStyle = '#222';
- this.chartCtx_.textBaseline = 'top';
- this.chartCtx_.font = '800 12px Arial';
- this.chartCtx_.fillText(tooltipTitle, left + 8, top + 8);
-
- this.chartCtx_.fillStyle = '#555';
- this.chartCtx_.textBaseline = 'top';
- this.chartCtx_.font = '400 italic 10px Arial';
- this.chartCtx_.fillText('Total: ' + tooltipTime + 'ms',
- left + 8, top + 22);
- },
-
- drawBars_: function() {
-
- var len = this.opsTimingData_.length;
- var max = this.opsTimingData_[0].cmd_time;
- var min = this.opsTimingData_[len - 1].cmd_time;
-
- var width = this.chartWidth_ - CHART_PADDING_LEFT - CHART_PADDING_RIGHT;
- var height = this.chartHeight_ - AXIS_PADDING_TOP - AXIS_PADDING_BOTTOM;
- var barWidth = Math.floor(width / len);
-
- var opData;
- var opTiming;
- var opHeight;
- var opLabel;
- var barLeft;
-
- for (var b = 0; b < len; b++) {
-
- opData = this.opsTimingData_[b];
- opTiming = opData.cmd_time / max;
-
- opHeight = Math.round(Math.max(1, opTiming * height));
- opLabel = opData.cmd_string;
- barLeft = CHART_PADDING_LEFT + b * barWidth;
-
- this.chartCtx_.fillStyle = this.getOpColor_(opLabel);
-
- this.chartCtx_.fillRect(barLeft + BAR_PADDING, AXIS_PADDING_TOP +
- height - opHeight, barWidth - 2 * BAR_PADDING, opHeight);
- }
-
- },
-
- getOpColor_: function(opName) {
-
- var characters = opName.split('');
- var hue = characters.reduce(this.reduceNameToHue, 0) % 360;
-
- return 'hsl(' + hue + ', 30%, 50%)';
- },
-
- reduceNameToHue: function(previousValue, currentValue, index, array) {
- // Get the char code and apply a magic adjustment value so we get
- // pretty colors from around the rainbow.
- return Math.round(previousValue + currentValue.charCodeAt(0) *
- HUE_CHAR_CODE_ADJUSTMENT);
- },
-
- drawChartAxes_: function() {
-
- var len = this.opsTimingData_.length;
- var max = this.opsTimingData_[0].cmd_time;
- var min = this.opsTimingData_[len - 1].cmd_time;
-
- var width = this.chartWidth_ - AXIS_PADDING_LEFT - AXIS_PADDING_RIGHT;
- var height = this.chartHeight_ - AXIS_PADDING_TOP - AXIS_PADDING_BOTTOM;
-
- var totalBarWidth = this.chartWidth_ - CHART_PADDING_LEFT -
- CHART_PADDING_RIGHT;
- var barWidth = Math.floor(totalBarWidth / len);
- var tickYInterval = height / (VERTICAL_TICKS - 1);
- var tickYPosition = 0;
- var tickValInterval = (max - min) / (VERTICAL_TICKS - 1);
- var tickVal = 0;
-
- this.chartCtx_.fillStyle = '#333';
- this.chartCtx_.strokeStyle = '#777';
- this.chartCtx_.save();
-
- // Translate half a pixel to avoid blurry lines.
- this.chartCtx_.translate(0.5, 0.5);
-
- // Sides.
-
- this.chartCtx_.save();
-
- this.chartCtx_.translate(AXIS_PADDING_LEFT, AXIS_PADDING_TOP);
- this.chartCtx_.moveTo(0, 0);
- this.chartCtx_.lineTo(0, height);
- this.chartCtx_.lineTo(width, height);
-
- // Y-axis ticks.
- this.chartCtx_.font = '10px Arial';
- this.chartCtx_.textAlign = 'right';
- this.chartCtx_.textBaseline = 'middle';
-
- for (var t = 0; t < VERTICAL_TICKS; t++) {
-
- tickYPosition = Math.round(t * tickYInterval);
- tickVal = (max - t * tickValInterval).toFixed(4);
-
- this.chartCtx_.moveTo(0, tickYPosition);
- this.chartCtx_.lineTo(-AXIS_TICK_SIZE, tickYPosition);
- this.chartCtx_.fillText(tickVal,
- -AXIS_TICK_SIZE - AXIS_LABEL_PADDING, tickYPosition);
-
- }
-
- this.chartCtx_.stroke();
-
- this.chartCtx_.restore();
-
-
- // Labels.
-
- this.chartCtx_.save();
-
- this.chartCtx_.translate(CHART_PADDING_LEFT + Math.round(barWidth * 0.5),
- AXIS_PADDING_TOP + height + LABEL_PADDING);
-
- this.chartCtx_.font = '10px Arial';
- this.chartCtx_.textAlign = 'center';
- this.chartCtx_.textBaseline = 'top';
-
- var labelTickLeft;
- var labelTickBottom;
- for (var l = 0; l < len; l++) {
-
- labelTickLeft = Math.round(l * barWidth);
- labelTickBottom = l % 2 * LABEL_INTERLEAVE_OFFSET;
-
- this.chartCtx_.save();
- this.chartCtx_.moveTo(labelTickLeft, -LABEL_PADDING);
- this.chartCtx_.lineTo(labelTickLeft, labelTickBottom);
- this.chartCtx_.stroke();
- this.chartCtx_.restore();
-
- this.chartCtx_.fillText(this.opsTimingData_[l].cmd_string,
- labelTickLeft, labelTickBottom);
- }
-
- this.chartCtx_.restore();
-
- this.chartCtx_.restore();
- },
-
- clearChartContents_: function() {
- this.chartCtx_.clearRect(0, 0, this.chartWidth_, this.chartHeight_);
- },
-
- showNoTimingDataMessage_: function() {
- this.chartCtx_.font = '800 italic 14px Arial';
- this.chartCtx_.fillStyle = '#333';
- this.chartCtx_.textAlign = 'center';
- this.chartCtx_.textBaseline = 'middle';
- this.chartCtx_.fillText('No timing data available.',
- this.chartWidth_ * 0.5, this.chartHeight_ * 0.5);
- },
-
- collapseOpsToTimingBuckets_: function(ops) {
-
- var opsTimingDataIndexHash_ = {};
- var timingData = this.opsTimingData_;
- var op;
- var opIndex;
-
- for (var i = 0; i < ops.length; i++) {
-
- op = ops[i];
-
- if (op.cmd_time === undefined)
- continue;
-
- // Try to locate the entry for the current operation
- // based on its name. If that fails, then create one for it.
- opIndex = opsTimingDataIndexHash_[op.cmd_string] || null;
-
- if (opIndex === null) {
- timingData.push({
- cmd_time: 0,
- cmd_string: op.cmd_string
- });
-
- opIndex = timingData.length - 1;
- opsTimingDataIndexHash_[op.cmd_string] = opIndex;
- }
-
- timingData[opIndex].cmd_time += op.cmd_time;
-
- }
-
- timingData.sort(this.sortTimingBucketsByOpTimeDescending_);
-
- this.collapseTimingBucketsToOther_(4);
- },
-
- collapseTimingBucketsToOther_: function(count) {
-
- var timingData = this.opsTimingData_;
- var otherSource = timingData.splice(count, timingData.length - count);
- var otherDestination = null;
-
- if (!otherSource.length)
- return;
-
- timingData.push({
- cmd_time: 0,
- cmd_string: 'Other'
- });
-
- otherDestination = timingData[timingData.length - 1];
- for (var i = 0; i < otherSource.length; i++) {
- otherDestination.cmd_time += otherSource[i].cmd_time;
- }
- },
-
- sortTimingBucketsByOpTimeDescending_: function(a, b) {
- return b.cmd_time - a.cmd_time;
- },
-
- resetOpsTimingData_: function() {
- this.opsTimingData_.length = 0;
- }
- };
-
- return {
- PictureOpsChartSummaryView: PictureOpsChartSummaryView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.css
deleted file mode 100644
index 5f1943e5c79..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.css
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-view {
- display: block;
- height: 180px;
- margin: 0;
- padding: 0;
- position: relative;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-chart-view > .use-percentile-scale {
- left: 0;
- position: absolute;
- top: 0;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.html
deleted file mode 100644
index fe71fc87735..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_chart_view.html
+++ /dev/null
@@ -1,501 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/picture_ops_chart_view.css">
-
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var BAR_PADDING = 1;
- var BAR_WIDTH = 5;
- var CHART_PADDING_LEFT = 65;
- var CHART_PADDING_RIGHT = 30;
- var CHART_PADDING_BOTTOM = 35;
- var CHART_PADDING_TOP = 20;
- var AXIS_PADDING_LEFT = 55;
- var AXIS_PADDING_RIGHT = 30;
- var AXIS_PADDING_BOTTOM = 35;
- var AXIS_PADDING_TOP = 20;
- var AXIS_TICK_SIZE = 5;
- var AXIS_LABEL_PADDING = 5;
- var VERTICAL_TICKS = 5;
- var HUE_CHAR_CODE_ADJUSTMENT = 5.7;
-
- /**
- * Provides a chart showing the cumulative time spent in Skia operations
- * during picture rasterization.
- *
- * @constructor
- */
- var PictureOpsChartView =
- tr.ui.b.define('tr-ui-e-chrome-cc-picture-ops-chart-view');
-
- PictureOpsChartView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.picture_ = undefined;
- this.pictureOps_ = undefined;
- this.opCosts_ = undefined;
-
- this.chartScale_ = window.devicePixelRatio;
-
- this.chart_ = document.createElement('canvas');
- this.chartCtx_ = this.chart_.getContext('2d');
- Polymer.dom(this).appendChild(this.chart_);
-
- this.selectedOpIndex_ = undefined;
- this.chartWidth_ = 0;
- this.chartHeight_ = 0;
- this.dimensionsHaveChanged_ = true;
-
- this.currentBarMouseOverTarget_ = undefined;
-
- this.ninetyFifthPercentileCost_ = 0;
- this.totalOpCost_ = 0;
-
- this.chart_.addEventListener('click', this.onClick_.bind(this));
- this.chart_.addEventListener('mousemove', this.onMouseMove_.bind(this));
-
- this.usePercentileScale_ = false;
- this.usePercentileScaleCheckbox_ = tr.ui.b.createCheckBox(
- this, 'usePercentileScale',
- 'PictureOpsChartView.usePercentileScale', false,
- 'Limit to 95%-ile');
- Polymer.dom(this.usePercentileScaleCheckbox_).classList.add(
- 'use-percentile-scale');
- Polymer.dom(this).appendChild(this.usePercentileScaleCheckbox_);
- },
-
- get dimensionsHaveChanged() {
- return this.dimensionsHaveChanged_;
- },
-
- set dimensionsHaveChanged(dimensionsHaveChanged) {
- this.dimensionsHaveChanged_ = dimensionsHaveChanged;
- },
-
- get usePercentileScale() {
- return this.usePercentileScale_;
- },
-
- set usePercentileScale(usePercentileScale) {
- this.usePercentileScale_ = usePercentileScale;
- this.drawChartContents_();
- },
-
- get numOps() {
- return this.opCosts_.length;
- },
-
- get selectedOpIndex() {
- return this.selectedOpIndex_;
- },
-
- set selectedOpIndex(selectedOpIndex) {
- if (selectedOpIndex < 0) throw new Error('Invalid index');
- if (selectedOpIndex >= this.numOps) throw new Error('Invalid index');
-
- this.selectedOpIndex_ = selectedOpIndex;
- },
-
- get picture() {
- return this.picture_;
- },
-
- set picture(picture) {
- this.picture_ = picture;
- this.pictureOps_ = picture.tagOpsWithTimings(picture.getOps());
- this.currentBarMouseOverTarget_ = undefined;
- this.processPictureData_();
- this.dimensionsHaveChanged = true;
- },
-
- processPictureData_: function() {
- if (this.pictureOps_ === undefined)
- return;
-
- var totalOpCost = 0;
-
- // Take a copy of the picture ops data for sorting.
- this.opCosts_ = this.pictureOps_.map(function(op) {
- totalOpCost += op.cmd_time;
- return op.cmd_time;
- });
- this.opCosts_.sort();
-
- var ninetyFifthPercentileCostIndex = Math.floor(
- this.opCosts_.length * 0.95);
- this.ninetyFifthPercentileCost_ =
- this.opCosts_[ninetyFifthPercentileCostIndex];
- this.maxCost_ = this.opCosts_[this.opCosts_.length - 1];
-
- this.totalOpCost_ = totalOpCost;
- },
-
- extractBarIndex_: function(e) {
-
- var index = undefined;
-
- if (this.pictureOps_ === undefined ||
- this.pictureOps_.length === 0)
- return index;
-
- var x = e.offsetX;
- var y = e.offsetY;
-
- var totalBarWidth = (BAR_WIDTH + BAR_PADDING) * this.pictureOps_.length;
-
- var chartLeft = CHART_PADDING_LEFT;
- var chartTop = 0;
- var chartBottom = this.chartHeight_ - CHART_PADDING_BOTTOM;
- var chartRight = chartLeft + totalBarWidth;
-
- if (x < chartLeft || x > chartRight || y < chartTop || y > chartBottom)
- return index;
-
- index = Math.floor((x - chartLeft) / totalBarWidth *
- this.pictureOps_.length);
-
- index = tr.b.clamp(index, 0, this.pictureOps_.length - 1);
-
- return index;
- },
-
- onClick_: function(e) {
-
- var barClicked = this.extractBarIndex_(e);
-
- if (barClicked === undefined)
- return;
-
- // If we click on the already selected item we should deselect.
- if (barClicked === this.selectedOpIndex)
- this.selectedOpIndex = undefined;
- else
- this.selectedOpIndex = barClicked;
-
- e.preventDefault();
-
- tr.b.dispatchSimpleEvent(this, 'selection-changed', false);
- },
-
- onMouseMove_: function(e) {
-
- var lastBarMouseOverTarget = this.currentBarMouseOverTarget_;
- this.currentBarMouseOverTarget_ = this.extractBarIndex_(e);
-
- if (this.currentBarMouseOverTarget_ === lastBarMouseOverTarget)
- return;
-
- this.drawChartContents_();
- },
-
- scrollSelectedItemIntoViewIfNecessary: function() {
-
- if (this.selectedOpIndex === undefined)
- return;
-
- var width = this.offsetWidth;
- var left = this.scrollLeft;
- var right = left + width;
- var targetLeft = CHART_PADDING_LEFT +
- (BAR_WIDTH + BAR_PADDING) * this.selectedOpIndex;
-
- if (targetLeft > left && targetLeft < right)
- return;
-
- this.scrollLeft = (targetLeft - width * 0.5);
- },
-
- updateChartContents: function() {
-
- if (this.dimensionsHaveChanged)
- this.updateChartDimensions_();
-
- this.drawChartContents_();
- },
-
- updateChartDimensions_: function() {
-
- if (!this.pictureOps_)
- return;
-
- var width = CHART_PADDING_LEFT + CHART_PADDING_RIGHT +
- ((BAR_WIDTH + BAR_PADDING) * this.pictureOps_.length);
-
- if (width < this.offsetWidth)
- width = this.offsetWidth;
-
- // Allow the element to be its natural size as set by flexbox, then lock
- // the width in before we set the width of the canvas.
- this.chartWidth_ = width;
- this.chartHeight_ = this.getBoundingClientRect().height;
-
- // Scale up the canvas according to the devicePixelRatio, then reduce it
- // down again via CSS. Finally we apply a scale to the canvas so that
- // things are drawn at the correct size.
- this.chart_.width = this.chartWidth_ * this.chartScale_;
- this.chart_.height = this.chartHeight_ * this.chartScale_;
-
- this.chart_.style.width = this.chartWidth_ + 'px';
- this.chart_.style.height = this.chartHeight_ + 'px';
-
- this.chartCtx_.scale(this.chartScale_, this.chartScale_);
-
- this.dimensionsHaveChanged = false;
- },
-
- drawChartContents_: function() {
-
- this.clearChartContents_();
-
- if (this.pictureOps_ === undefined ||
- this.pictureOps_.length === 0 ||
- this.pictureOps_[0].cmd_time === undefined) {
-
- this.showNoTimingDataMessage_();
- return;
- }
-
- this.drawSelection_();
- this.drawBars_();
- this.drawChartAxes_();
- this.drawLinesAtTickMarks_();
- this.drawLineAtBottomOfChart_();
-
- if (this.currentBarMouseOverTarget_ === undefined)
- return;
-
- this.drawTooltip_();
- },
-
- drawSelection_: function() {
-
- if (this.selectedOpIndex === undefined)
- return;
-
- var width = (BAR_WIDTH + BAR_PADDING) * this.selectedOpIndex;
- this.chartCtx_.fillStyle = 'rgb(223, 235, 230)';
- this.chartCtx_.fillRect(CHART_PADDING_LEFT, CHART_PADDING_TOP,
- width, this.chartHeight_ - CHART_PADDING_TOP - CHART_PADDING_BOTTOM);
- },
-
- drawChartAxes_: function() {
-
- var min = this.opCosts_[0];
- var max = this.opCosts_[this.opCosts_.length - 1];
- var height = this.chartHeight_ - AXIS_PADDING_TOP - AXIS_PADDING_BOTTOM;
-
- var tickYInterval = height / (VERTICAL_TICKS - 1);
- var tickYPosition = 0;
- var tickValInterval = (max - min) / (VERTICAL_TICKS - 1);
- var tickVal = 0;
-
- this.chartCtx_.fillStyle = '#333';
- this.chartCtx_.strokeStyle = '#777';
- this.chartCtx_.save();
-
- // Translate half a pixel to avoid blurry lines.
- this.chartCtx_.translate(0.5, 0.5);
-
- // Sides.
- this.chartCtx_.beginPath();
- this.chartCtx_.moveTo(AXIS_PADDING_LEFT, AXIS_PADDING_TOP);
- this.chartCtx_.lineTo(AXIS_PADDING_LEFT, this.chartHeight_ -
- AXIS_PADDING_BOTTOM);
- this.chartCtx_.lineTo(this.chartWidth_ - AXIS_PADDING_RIGHT,
- this.chartHeight_ - AXIS_PADDING_BOTTOM);
- this.chartCtx_.stroke();
- this.chartCtx_.closePath();
-
- // Y-axis ticks.
- this.chartCtx_.translate(AXIS_PADDING_LEFT, AXIS_PADDING_TOP);
-
- this.chartCtx_.font = '10px Arial';
- this.chartCtx_.textAlign = 'right';
- this.chartCtx_.textBaseline = 'middle';
-
- this.chartCtx_.beginPath();
- for (var t = 0; t < VERTICAL_TICKS; t++) {
-
- tickYPosition = Math.round(t * tickYInterval);
- tickVal = (max - t * tickValInterval).toFixed(4);
-
- this.chartCtx_.moveTo(0, tickYPosition);
- this.chartCtx_.lineTo(-AXIS_TICK_SIZE, tickYPosition);
- this.chartCtx_.fillText(tickVal,
- -AXIS_TICK_SIZE - AXIS_LABEL_PADDING, tickYPosition);
-
- }
-
- this.chartCtx_.stroke();
- this.chartCtx_.closePath();
-
- this.chartCtx_.restore();
- },
-
- drawLinesAtTickMarks_: function() {
-
- var height = this.chartHeight_ - AXIS_PADDING_TOP - AXIS_PADDING_BOTTOM;
- var width = this.chartWidth_ - AXIS_PADDING_LEFT - AXIS_PADDING_RIGHT;
- var tickYInterval = height / (VERTICAL_TICKS - 1);
- var tickYPosition = 0;
-
- this.chartCtx_.save();
-
- this.chartCtx_.translate(AXIS_PADDING_LEFT + 0.5, AXIS_PADDING_TOP + 0.5);
- this.chartCtx_.beginPath();
- this.chartCtx_.strokeStyle = 'rgba(0,0,0,0.05)';
-
- for (var t = 0; t < VERTICAL_TICKS; t++) {
- tickYPosition = Math.round(t * tickYInterval);
-
- this.chartCtx_.moveTo(0, tickYPosition);
- this.chartCtx_.lineTo(width, tickYPosition);
- this.chartCtx_.stroke();
- }
-
- this.chartCtx_.restore();
- this.chartCtx_.closePath();
- },
-
- drawLineAtBottomOfChart_: function() {
- this.chartCtx_.strokeStyle = '#AAA';
- this.chartCtx_.beginPath();
- this.chartCtx_.moveTo(0, this.chartHeight_ - 0.5);
- this.chartCtx_.lineTo(this.chartWidth_, this.chartHeight_ - 0.5);
- this.chartCtx_.stroke();
- this.chartCtx_.closePath();
- },
-
- drawTooltip_: function() {
-
- var tooltipData = this.pictureOps_[this.currentBarMouseOverTarget_];
- var tooltipTitle = tooltipData.cmd_string;
- var tooltipTime = tooltipData.cmd_time.toFixed(4);
- var toolTipTimePercentage =
- ((tooltipData.cmd_time / this.totalOpCost_) * 100).toFixed(2);
-
- var tooltipWidth = 120;
- var tooltipHeight = 40;
- var chartInnerWidth = this.chartWidth_ - CHART_PADDING_RIGHT -
- CHART_PADDING_LEFT;
- var barWidth = BAR_WIDTH + BAR_PADDING;
- var tooltipOffset = Math.round((tooltipWidth - barWidth) * 0.5);
-
- var left = CHART_PADDING_LEFT + this.currentBarMouseOverTarget_ *
- barWidth - tooltipOffset;
- var top = Math.round((this.chartHeight_ - tooltipHeight) * 0.5);
-
- this.chartCtx_.save();
-
- this.chartCtx_.shadowOffsetX = 0;
- this.chartCtx_.shadowOffsetY = 5;
- this.chartCtx_.shadowBlur = 4;
- this.chartCtx_.shadowColor = 'rgba(0,0,0,0.4)';
-
- this.chartCtx_.strokeStyle = '#888';
- this.chartCtx_.fillStyle = '#EEE';
- this.chartCtx_.fillRect(left, top, tooltipWidth, tooltipHeight);
-
- this.chartCtx_.shadowColor = 'transparent';
- this.chartCtx_.translate(0.5, 0.5);
- this.chartCtx_.strokeRect(left, top, tooltipWidth, tooltipHeight);
-
- this.chartCtx_.restore();
-
- this.chartCtx_.fillStyle = '#222';
- this.chartCtx_.textAlign = 'left';
- this.chartCtx_.textBaseline = 'top';
- this.chartCtx_.font = '800 12px Arial';
- this.chartCtx_.fillText(tooltipTitle, left + 8, top + 8);
-
- this.chartCtx_.fillStyle = '#555';
- this.chartCtx_.font = '400 italic 10px Arial';
- this.chartCtx_.fillText(tooltipTime + 'ms (' +
- toolTipTimePercentage + '%)', left + 8, top + 22);
- },
-
- drawBars_: function() {
-
- var op;
- var opColor = 0;
- var opHeight = 0;
- var opWidth = BAR_WIDTH + BAR_PADDING;
- var opHover = false;
-
- var bottom = this.chartHeight_ - CHART_PADDING_BOTTOM;
- var maxHeight = this.chartHeight_ - CHART_PADDING_BOTTOM -
- CHART_PADDING_TOP;
-
- var maxValue;
- if (this.usePercentileScale)
- maxValue = this.ninetyFifthPercentileCost_;
- else
- maxValue = this.maxCost_;
-
- for (var b = 0; b < this.pictureOps_.length; b++) {
-
- op = this.pictureOps_[b];
- opHeight = Math.round(
- (op.cmd_time / maxValue) * maxHeight);
- opHeight = Math.max(opHeight, 1);
- opHover = (b === this.currentBarMouseOverTarget_);
- opColor = this.getOpColor_(op.cmd_string, opHover);
-
- if (b === this.selectedOpIndex)
- this.chartCtx_.fillStyle = '#FFFF00';
- else
- this.chartCtx_.fillStyle = opColor;
-
- this.chartCtx_.fillRect(CHART_PADDING_LEFT + b * opWidth,
- bottom - opHeight, BAR_WIDTH, opHeight);
- }
-
- },
-
- getOpColor_: function(opName, hover) {
-
- var characters = opName.split('');
-
- var hue = characters.reduce(this.reduceNameToHue, 0) % 360;
- var saturation = 30;
- var lightness = hover ? '75%' : '50%';
-
- return 'hsl(' + hue + ', ' + saturation + '%, ' + lightness + '%)';
- },
-
- reduceNameToHue: function(previousValue, currentValue, index, array) {
- // Get the char code and apply a magic adjustment value so we get
- // pretty colors from around the rainbow.
- return Math.round(previousValue + currentValue.charCodeAt(0) *
- HUE_CHAR_CODE_ADJUSTMENT);
- },
-
- clearChartContents_: function() {
- this.chartCtx_.clearRect(0, 0, this.chartWidth_, this.chartHeight_);
- },
-
- showNoTimingDataMessage_: function() {
- this.chartCtx_.font = '800 italic 14px Arial';
- this.chartCtx_.fillStyle = '#333';
- this.chartCtx_.textAlign = 'center';
- this.chartCtx_.textBaseline = 'middle';
- this.chartCtx_.fillText('No timing data available.',
- this.chartWidth_ * 0.5, this.chartHeight_ * 0.5);
- }
- };
-
- return {
- PictureOpsChartView: PictureOpsChartView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.css
deleted file mode 100644
index bdd77fcd099..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.css
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* * /deep/ tr-ui-e-chrome-cc-picture-ops-list-view {
- -webkit-flex-direction: column;
- border-top: 1px solid grey;
- display: -webkit-flex;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view > .x-list-view {
- -webkit-flex: 1 1 auto;
- overflow: auto;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view > .x-list-view .list-item {
- border-bottom: 1px solid #555;
- font-size: small;
- font-weight: bold;
- padding-bottom: 5px;
- padding-left: 5px;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view >
- .x-list-view .list-item:hover {
- background-color: #f0f0f0;
- cursor: pointer;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view >
- .x-list-view .list-item > * {
- color: #777;
- font-size: x-small;
- font-weight: normal;
- margin-left: 1em;
- max-width: 300px; /* force long strings to wrap */
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view >
- .x-list-view .list-item > .elementInfo {
- color: purple;
- font-size: small;
- font-weight: bold;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view >
- .x-list-view .list-item > .time {
- color: rgb(136, 0, 0);
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view .x-list-view:focus >
- .list-item[beforeSelection] {
- background-color: rgb(171, 217, 202);
- outline: 1px dotted rgba(0, 0, 0, 0.1);
- outline-offset: 0;
-}
-
-* /deep/ tr-ui-e-chrome-cc-picture-ops-list-view .x-list-view >
- .list-item[beforeSelection] {
- background-color: rgb(103, 199, 165);
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.html
deleted file mode 100644
index 806a54c5c30..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view.html
+++ /dev/null
@@ -1,238 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/picture_ops_list_view.css">
-
-<link rel="import" href="/tracing/extras/chrome/cc/constants.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/list_view.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- var OPS_TIMING_ITERATIONS = 3; // Iterations to average op timing info over.
- var ANNOTATION = 'Comment';
- var BEGIN_ANNOTATION = 'BeginCommentGroup';
- var END_ANNOTATION = 'EndCommentGroup';
- var ANNOTATION_ID = 'ID: ';
- var ANNOTATION_CLASS = 'CLASS: ';
- var ANNOTATION_TAG = 'TAG: ';
-
- var constants = tr.e.cc.constants;
-
- /**
- * @constructor
- */
- var PictureOpsListView =
- tr.ui.b.define('tr-ui-e-chrome-cc-picture-ops-list-view');
-
- PictureOpsListView.prototype = {
- __proto__: HTMLDivElement.prototype,
-
- decorate: function() {
- this.opsList_ = new tr.ui.b.ListView();
- Polymer.dom(this).appendChild(this.opsList_);
-
- this.selectedOp_ = undefined;
- this.selectedOpIndex_ = undefined;
- this.opsList_.addEventListener(
- 'selection-changed', this.onSelectionChanged_.bind(this));
-
- this.picture_ = undefined;
- },
-
- get picture() {
- return this.picture_;
- },
-
- set picture(picture) {
- this.picture_ = picture;
- this.updateContents_();
- },
-
- updateContents_: function() {
- this.opsList_.clear();
-
- if (!this.picture_)
- return;
-
- var ops = this.picture_.getOps();
- if (!ops)
- return;
-
- ops = this.picture_.tagOpsWithTimings(ops);
-
- ops = this.opsTaggedWithAnnotations_(ops);
-
- for (var i = 0; i < ops.length; i++) {
- var op = ops[i];
- var item = document.createElement('div');
- item.opIndex = op.opIndex;
- Polymer.dom(item).textContent = i + ') ' + op.cmd_string;
-
- // Display the element info associated with the op, if available.
- if (op.elementInfo.tag || op.elementInfo.id || op.elementInfo.class) {
- var elementInfo = document.createElement('span');
- Polymer.dom(elementInfo).classList.add('elementInfo');
- var tag = op.elementInfo.tag ? op.elementInfo.tag : 'unknown';
- var id = op.elementInfo.id ? 'id=' + op.elementInfo.id : undefined;
- var className = op.elementInfo.class ? 'class=' +
- op.elementInfo.class : undefined;
- Polymer.dom(elementInfo).textContent =
- '<' + tag + (id ? ' ' : '') +
- (id ? id : '') + (className ? ' ' : '') +
- (className ? className : '') + '>';
- Polymer.dom(item).appendChild(elementInfo);
- }
-
- // Display the Skia params.
- // FIXME: now that we have structured data, we should format it.
- // (https://github.com/google/trace-viewer/issues/782)
- if (op.info.length > 0) {
- var infoItem = document.createElement('div');
- Polymer.dom(infoItem).textContent = JSON.stringify(op.info);
- Polymer.dom(item).appendChild(infoItem);
- }
-
- // Display the op timing, if available.
- if (op.cmd_time && op.cmd_time >= 0.0001) {
- var time = document.createElement('span');
- Polymer.dom(time).classList.add('time');
- var rounded = op.cmd_time.toFixed(4);
- Polymer.dom(time).textContent = '(' + rounded + 'ms)';
- Polymer.dom(item).appendChild(time);
- }
-
- Polymer.dom(this.opsList_).appendChild(item);
- }
- },
-
- onSelectionChanged_: function(e) {
- var beforeSelectedOp = true;
-
- // Deselect on re-selection.
- if (this.opsList_.selectedElement === this.selectedOp_) {
- this.opsList_.selectedElement = undefined;
- beforeSelectedOp = false;
- this.selectedOpIndex_ = undefined;
- }
-
- this.selectedOp_ = this.opsList_.selectedElement;
-
- // Set selection on all previous ops.
- var ops = this.opsList_.children;
- for (var i = 0; i < ops.length; i++) {
- var op = ops[i];
- if (op === this.selectedOp_) {
- beforeSelectedOp = false;
- this.selectedOpIndex_ = op.opIndex;
- } else if (beforeSelectedOp) {
- Polymer.dom(op).setAttribute('beforeSelection', 'beforeSelection');
- } else {
- Polymer.dom(op).removeAttribute('beforeSelection');
- }
- }
-
- tr.b.dispatchSimpleEvent(this, 'selection-changed', false);
- },
-
- get numOps() {
- return this.opsList_.children.length;
- },
-
- get selectedOpIndex() {
- return this.selectedOpIndex_;
- },
-
- set selectedOpIndex(s) {
- this.selectedOpIndex_ = s;
-
- if (s === undefined) {
- this.opsList_.selectedElement = this.selectedOp_;
- this.onSelectionChanged_();
- } else {
- if (s < 0) throw new Error('Invalid index');
- if (s >= this.numOps) throw new Error('Invalid index');
- this.opsList_.selectedElement = this.opsList_.getElementByIndex(s + 1);
- tr.ui.b.scrollIntoViewIfNeeded(this.opsList_.selectedElement);
- }
- },
-
- /**
- * Return Skia operations tagged by annotation.
- *
- * The ops returned from Picture.getOps() contain both Skia ops and
- * annotations threaded together. This function removes all annotations
- * from the list and tags each op with the associated annotations.
- * Additionally, the last {tag, id, class} is stored as elementInfo on
- * each op.
- *
- * @param {Array} ops Array of Skia operations and annotations.
- * @return {Array} Skia ops where op.annotations contains the associated
- * annotations for a given op.
- */
- opsTaggedWithAnnotations_: function(ops) {
- // This algorithm works by walking all the ops and pushing any
- // annotations onto a stack. When a non-annotation op is found, the
- // annotations stack is traversed and stored with the op.
- var annotationGroups = new Array();
- var opsWithoutAnnotations = new Array();
- for (var opIndex = 0; opIndex < ops.length; opIndex++) {
- var op = ops[opIndex];
- op.opIndex = opIndex;
- switch (op.cmd_string) {
- case BEGIN_ANNOTATION:
- annotationGroups.push(new Array());
- break;
- case END_ANNOTATION:
- annotationGroups.pop();
- break;
- case ANNOTATION:
- annotationGroups[annotationGroups.length - 1].push(op);
- break;
- default:
- var annotations = new Array();
- var elementInfo = {};
- annotationGroups.forEach(function(annotationGroup) {
- elementInfo = {};
- annotationGroup.forEach(function(annotation) {
- annotation.info.forEach(function(info) {
- if (info.indexOf(ANNOTATION_TAG) !== -1)
- elementInfo.tag = info.substring(
- info.indexOf(ANNOTATION_TAG) +
- ANNOTATION_TAG.length).toLowerCase();
- else if (info.indexOf(ANNOTATION_ID) !== -1)
- elementInfo.id = info.substring(
- info.indexOf(ANNOTATION_ID) +
- ANNOTATION_ID.length);
- else if (info.indexOf(ANNOTATION_CLASS) !== -1)
- elementInfo.class = info.substring(
- info.indexOf(ANNOTATION_CLASS) +
- ANNOTATION_CLASS.length);
-
- annotations.push(info);
- });
- });
- });
- op.annotations = annotations;
- op.elementInfo = elementInfo;
- opsWithoutAnnotations.push(op);
- }
- }
-
- return opsWithoutAnnotations;
- }
- };
-
- return {
- PictureOpsListView: PictureOpsListView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view_test.html
deleted file mode 100644
index cd6679f8449..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_ops_list_view_test.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_ops_list_view.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var PictureOpsListView = tr.ui.e.chrome.cc.PictureOpsListView;
-
- test('instantiate', function() {
- if (!tr.e.cc.PictureSnapshot.CanRasterize())
- return;
- var m = new tr.Model(g_catLTHIEvents);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::Picture')[0];
- var snapshot = instance.snapshots[0];
-
- var view = new PictureOpsListView();
- view.picture = snapshot;
- assert.equal(view.opsList_.children.length, 142);
- });
-
- test('selection', function() {
- if (!tr.e.cc.PictureSnapshot.CanRasterize())
- return;
- var m = new tr.Model(g_catLTHIEvents);
- var p = tr.b.dictionaryValues(m.processes)[0];
-
- var instance = p.objects.getAllInstancesNamed('cc::Picture')[0];
- var snapshot = instance.snapshots[0];
-
- var view = new PictureOpsListView();
- view.picture = snapshot;
- var didSelectionChange = 0;
- view.addEventListener('selection-changed', function() {
- didSelectionChange = true;
- });
- assert.isFalse(didSelectionChange);
- view.opsList_.selectedElement = view.opsList_.children[3];
- assert.isTrue(didSelectionChange);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.css
deleted file mode 100644
index 26893f2c6c9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-* /deep/ .tr-ui-e-chrome-cc-picture-snapshot-view {
- -webkit-flex: 0 1 auto !important;
- display: -webkit-flex;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.html
deleted file mode 100644
index ccb0b04e88e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/picture_view.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/cc/picture_view.css">
-
-<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/picture_debugger.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- /*
- * Displays a picture snapshot in a human readable form.
- * @constructor
- */
- var PictureSnapshotView = tr.ui.b.define(
- 'tr-ui-e-chrome-cc-picture-snapshot-view',
- tr.ui.analysis.ObjectSnapshotView);
-
- PictureSnapshotView.prototype = {
- __proto__: tr.ui.analysis.ObjectSnapshotView.prototype,
-
- decorate: function() {
- Polymer.dom(this).classList.add(
- 'tr-ui-e-chrome-cc-picture-snapshot-view');
- this.pictureDebugger_ = new tr.ui.e.chrome.cc.PictureDebugger();
- Polymer.dom(this).appendChild(this.pictureDebugger_);
- },
-
- updateContents: function() {
- if (this.objectSnapshot_ && this.pictureDebugger_)
- this.pictureDebugger_.picture = this.objectSnapshot_;
- }
- };
-
- tr.ui.analysis.ObjectSnapshotView.register(
- PictureSnapshotView,
- {
- typeNames: ['cc::Picture', 'cc::LayeredPicture'],
- showInstances: false
- });
-
- return {
- PictureSnapshotView: PictureSnapshotView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection.html
deleted file mode 100644
index 7dd256e40c7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/extras/chrome/cc/raster_task.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/single_event_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- /**
- * @constructor
- */
- function RasterTaskSelection(selection) {
- tr.ui.e.chrome.cc.Selection.call(this);
- var whySupported = RasterTaskSelection.whySuported(selection);
- if (!whySupported.ok)
- throw new Error('Fail: ' + whySupported.why);
- this.slices_ = tr.b.asArray(selection);
- this.tiles_ = this.slices_.map(function(slice) {
- var tile = tr.e.cc.getTileFromRasterTaskSlice(slice);
- if (tile === undefined)
- throw new Error('This should never happen due to .supports check.');
- return tile;
- });
- }
-
- RasterTaskSelection.whySuported = function(selection) {
- if (!(selection instanceof tr.model.EventSet))
- return {ok: false, why: 'Must be selection'};
-
- if (selection.length === 0)
- return {ok: false, why: 'Selection must be non empty'};
-
- var referenceSnapshot = undefined;
- for (var event of selection) {
- if (!(event instanceof tr.model.Slice))
- return {ok: false, why: 'Not a slice'};
-
- var tile = tr.e.cc.getTileFromRasterTaskSlice(event);
- if (tile === undefined)
- return {ok: false, why: 'No tile found'};
-
- if (!referenceSnapshot) {
- referenceSnapshot = tile.containingSnapshot;
- } else {
- if (tile.containingSnapshot !== referenceSnapshot) {
- return {
- ok: false,
- why: 'Raster tasks are from different compositor instances'
- };
- }
- }
- }
- return {ok: true};
- };
-
- RasterTaskSelection.supports = function(selection) {
- return RasterTaskSelection.whySuported(selection).ok;
- };
-
- RasterTaskSelection.prototype = {
- __proto__: tr.ui.e.chrome.cc.Selection.prototype,
-
- get specicifity() {
- return 3;
- },
-
- get associatedLayerId() {
- var tile0 = this.tiles_[0];
- var allSameLayer = this.tiles_.every(function(tile) {
- tile.layerId === tile0.layerId;
- });
- if (allSameLayer)
- return tile0.layerId;
- return undefined;
- },
-
- get extraHighlightsByLayerId() {
- var highlights = {};
- this.tiles_.forEach(function(tile, i) {
- if (highlights[tile.layerId] === undefined)
- highlights[tile.layerId] = [];
- var slice = this.slices_[i];
- highlights[tile.layerId].push({
- colorKey: slice.title,
- rect: tile.layerRect
- });
- }, this);
- return highlights;
- },
-
- createAnalysis: function() {
- var sel = new tr.model.EventSet();
- this.slices_.forEach(function(slice) {
- sel.push(slice);
- });
-
- var analysis;
- if (sel.length === 1)
- analysis = document.createElement('tr-ui-a-single-event-sub-view');
- else
- analysis = document.createElement('tr-ui-e-chrome-cc-raster-task-view');
- analysis.selection = sel;
- return analysis;
- },
-
- findEquivalent: function(lthi) {
- // Raster tasks are only valid in one LTHI.
- return undefined;
- },
-
- // RasterTaskSelection specific stuff follows.
- get containingSnapshot() {
- return this.tiles_[0].containingSnapshot;
- }
- };
-
- return {
- RasterTaskSelection: RasterTaskSelection
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection_test.html
deleted file mode 100644
index 652bbc9b7cf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_selection_test.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_selection.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = m.processes[1];
- var rasterTasks = p.threads[1].sliceGroup.slices.filter(function(slice) {
- return slice.title === 'RasterTask';
- });
-
- var selection = new tr.model.EventSet();
- selection.push(rasterTasks[0]);
- selection.push(rasterTasks[1]);
-
- assert.isTrue(tr.ui.e.chrome.cc.RasterTaskSelection.supports(selection));
- var selection = new tr.ui.e.chrome.cc.RasterTaskSelection(selection);
- var highlights = selection.extraHighlightsByLayerId;
- assert.equal(tr.b.dictionaryLength(highlights), 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view.html
deleted file mode 100644
index 7ab2cbda14b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view.html
+++ /dev/null
@@ -1,220 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/extras/chrome/cc/raster_task.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/selection.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-e-chrome-cc-raster-task-view'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- #heading {
- flex: 0 0 auto;
- }
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
-
- <div id="heading">
- Rasterization costs in
- <tr-ui-a-analysis-link id="link"></tr-ui-a-analysis-link>
- </div>
- <tr-ui-b-table id="content"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-e-chrome-cc-raster-task-view',
-
- created: function() {
- this.selection_ = undefined;
- },
-
- set selection(selection) {
- this.selection_ = selection;
-
- this.updateContents_();
- },
-
- updateColumns_: function(hadCpuDurations) {
- var timeSpanConfig = {
- unit: tr.b.Unit.byName.timeDurationInMs,
- ownerDocument: this.ownerDocument
- };
-
- var columns = [
- {
- title: 'Layer',
- value: function(row) {
- if (row.isTotals)
- return 'Totals';
- if (row.layer) {
- var linkEl = document.createElement('tr-ui-a-analysis-link');
- linkEl.setSelectionAndContent(
- function() {
- return new tr.ui.e.chrome.cc.LayerSelection(costs.layer);
- },
- 'Layer ' + row.layerId);
- return linkEl;
- } else {
- return 'Layer ' + row.layerId;
- }
- },
- width: '250px'
- },
- {
- title: 'Num Tiles',
- value: function(row) { return row.numTiles; },
- cmp: function(a, b) { return a.numTiles - b.numTiles; }
- },
- {
- title: 'Num Analysis Tasks',
- value: function(row) { return row.numAnalysisTasks; },
- cmp: function(a, b) {
- return a.numAnalysisTasks - b.numAnalysisTasks;
- }
- },
- {
- title: 'Num Raster Tasks',
- value: function(row) { return row.numRasterTasks; },
- cmp: function(a, b) { return a.numRasterTasks - b.numRasterTasks; }
- },
- {
- title: 'Wall Duration (ms)',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.duration, timeSpanConfig);
- },
- cmp: function(a, b) { return a.duration - b.duration; }
- }
- ];
-
- if (hadCpuDurations) {
- columns.push({
- title: 'CPU Duration (ms)',
- value: function(row) {
- return tr.v.ui.createScalarSpan(row.cpuDuration, timeSpanConfig);
- },
- cmp: function(a, b) { return a.cpuDuration - b.cpuDuration; }
- });
- }
-
- var colWidthPercentage;
- if (columns.length === 1)
- colWidthPercentage = '100%';
- else
- colWidthPercentage = (100 / (columns.length - 1)).toFixed(3) + '%';
-
- for (var i = 1; i < columns.length; i++)
- columns[i].width = colWidthPercentage;
-
- this.$.content.tableColumns = columns;
- this.$.content.sortColumnIndex = columns.length - 1;
- },
-
- updateContents_: function() {
- var table = this.$.content;
-
- if (this.selection_.length === 0) {
- this.$.link.setSelectionAndContent(undefined, '');
- table.tableRows = [];
- table.footerRows = [];
- table.rebuild();
- return;
- }
- // LTHI link.
- var lthi = tr.e.cc.getTileFromRasterTaskSlice(
- tr.b.getFirstElement(this.selection_)).containingSnapshot;
- this.$.link.setSelectionAndContent(function() {
- return new tr.model.EventSet(lthi);
- }, lthi.userFriendlyName);
-
- // Get costs by layer.
- var costsByLayerId = {};
- function getCurrentCostsForLayerId(tile) {
- var layerId = tile.layerId;
- var lthi = tile.containingSnapshot;
- var layer;
- if (lthi.activeTree)
- layer = lthi.activeTree.findLayerWithId(layerId);
- if (layer === undefined && lthi.pendingTree)
- layer = lthi.pendingTree.findLayerWithId(layerId);
- if (costsByLayerId[layerId] === undefined) {
- costsByLayerId[layerId] = {
- layerId: layerId,
- layer: layer,
- numTiles: 0,
- numAnalysisTasks: 0,
- numRasterTasks: 0,
- duration: 0,
- cpuDuration: 0
- };
- }
- return costsByLayerId[layerId];
- }
-
- var totalDuration = 0;
- var totalCpuDuration = 0;
- var totalNumAnalyzeTasks = 0;
- var totalNumRasterizeTasks = 0;
- var hadCpuDurations = false;
-
- var tilesThatWeHaveSeen = {};
-
- this.selection_.forEach(function(slice) {
- var tile = tr.e.cc.getTileFromRasterTaskSlice(slice);
- var curCosts = getCurrentCostsForLayerId(tile);
-
- if (!tilesThatWeHaveSeen[tile.objectInstance.id]) {
- tilesThatWeHaveSeen[tile.objectInstance.id] = true;
- curCosts.numTiles += 1;
- }
-
- if (tr.e.cc.isSliceDoingAnalysis(slice)) {
- curCosts.numAnalysisTasks += 1;
- totalNumAnalyzeTasks += 1;
- } else {
- curCosts.numRasterTasks += 1;
- totalNumRasterizeTasks += 1;
- }
- curCosts.duration += slice.duration;
- totalDuration += slice.duration;
- if (slice.cpuDuration !== undefined) {
- curCosts.cpuDuration += slice.cpuDuration;
- totalCpuDuration += slice.cpuDuration;
- hadCpuDurations = true;
- }
- });
-
- // Apply to the table.
- this.updateColumns_(hadCpuDurations);
- table.tableRows = tr.b.dictionaryValues(costsByLayerId);
- table.rebuild();
-
- // Footer.
- table.footerRows = [
- {
- isTotals: true,
- numTiles: tr.b.dictionaryLength(tilesThatWeHaveSeen),
- numAnalysisTasks: totalNumAnalyzeTasks,
- numRasterTasks: totalNumRasterizeTasks,
- duration: totalDuration,
- cpuDuration: totalCpuDuration
- }
- ];
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view_test.html
deleted file mode 100644
index cb3d11d4953..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/raster_task_view_test.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event_target.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_selection.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/raster_task_view.html">
-
-<script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js">
-</script>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createSelection() {
- var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]);
- var p = m.processes[1];
- var rasterTasks = p.threads[1].sliceGroup.slices.filter(function(slice) {
- return slice.title === 'RasterTask' || slice.title === 'AnalyzeTask';
- });
-
- var selection = new tr.model.EventSet();
- selection.model = m;
-
- selection.push(rasterTasks[0]);
- selection.push(rasterTasks[1]);
- return selection;
- }
-
- test('basic', function() {
- var selection = createSelection();
- var view = document.createElement('tr-ui-e-chrome-cc-raster-task-view');
- view.selection = selection;
- this.addHTMLOutput(view);
- });
-
- test('analysisViewIntegration', function() {
- var selection = createSelection();
-
- var timelineView = {model: selection.model};
- var brushingStateController =
- new tr.c.BrushingStateController(timelineView);
-
- var analysisEl = document.createElement('tr-ui-a-analysis-view');
- analysisEl.brushingStateController = brushingStateController;
- brushingStateController.changeSelectionFromTimeline(selection);
-
- assert.isDefined(Polymer.dom(analysisEl).querySelector(
- 'tr-ui-e-chrome-cc-raster-task-view'));
-
- var sv = tr.b.findDeepElementMatching(
- analysisEl, 'tr-ui-a-multi-thread-slice-sub-view');
- assert.isTrue(sv.requiresTallView);
- this.addHTMLOutput(analysisEl);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/selection.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/selection.html
deleted file mode 100644
index a2f1e2521f4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/selection.html
+++ /dev/null
@@ -1,302 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- function Selection() {
- this.selectionToSetIfClicked = undefined;
- };
- Selection.prototype = {
- /**
- * When two things are picked in the UI, one must occasionally tie-break
- * between them to decide what was really clicked. Things with higher
- * specicifity will win.
- */
- get specicifity() {
- throw new Error('Not implemented');
- },
-
- /**
- * If a selection is related to a specific layer, then this returns the
- * layerId of that layer. If the selection is not related to a layer, for
- * example if the device viewport is selected, then this returns undefined.
- */
- get associatedLayerId() {
- throw new Error('Not implemented');
- },
-
- /**
- * If a selection is related to a specific render pass, then this returns
- * the layerId of that layer. If the selection is not related to a layer,
- * for example if the device viewport is selected, then this returns
- * undefined.
- */
- get associatedRenderPassId() {
- throw new Error('Not implemented');
- },
-
-
- get highlightsByLayerId() {
- return {};
- },
-
- /**
- * Called when the selection is made active in the layer view. Must return
- * an HTMLElement that explains this selection in detail.
- */
- createAnalysis: function() {
- throw new Error('Not implemented');
- },
-
- /**
- * Should try to create the equivalent selection in the provided LTHI,
- * or undefined if it can't be done.
- */
- findEquivalent: function(lthi) {
- throw new Error('Not implemented');
- }
- };
-
- /**
- * @constructor
- */
- function RenderPassSelection(renderPass, renderPassId) {
- if (!renderPass || (renderPassId === undefined))
- throw new Error('Render pass (with id) is required');
- this.renderPass_ = renderPass;
- this.renderPassId_ = renderPassId;
- }
-
- RenderPassSelection.prototype = {
- __proto__: Selection.prototype,
-
- get specicifity() {
- return 1;
- },
-
- get associatedLayerId() {
- return undefined;
- },
-
- get associatedRenderPassId() {
- return this.renderPassId_;
- },
-
- get renderPass() {
- return this.renderPass_;
- },
-
- createAnalysis: function() {
- var dataView = document.createElement(
- 'tr-ui-a-generic-object-view-with-label');
- dataView.label = 'RenderPass ' + this.renderPassId_;
- dataView.object = this.renderPass_.args;
- return dataView;
- },
-
- get title() {
- return this.renderPass_.objectInstance.typeName;
- }
- };
-
- /**
- * @constructor
- */
- function LayerSelection(layer) {
- if (!layer)
- throw new Error('Layer is required');
- this.layer_ = layer;
- }
-
- LayerSelection.prototype = {
- __proto__: Selection.prototype,
-
- get specicifity() {
- return 1;
- },
-
- get associatedLayerId() {
- return this.layer_.layerId;
- },
-
- get associatedRenderPassId() {
- return undefined;
- },
-
- get layer() {
- return this.layer_;
- },
-
- createAnalysis: function() {
- var dataView = document.createElement(
- 'tr-ui-a-generic-object-view-with-label');
- dataView.label = 'Layer ' + this.layer_.layerId;
- if (this.layer_.usingGpuRasterization)
- dataView.label += ' (GPU-rasterized)';
- dataView.object = this.layer_.args;
- return dataView;
- },
-
- get title() {
- return this.layer_.objectInstance.typeName;
- },
-
- findEquivalent: function(lthi) {
- var layer = lthi.activeTree.findLayerWithId(this.layer_.layerId) ||
- lthi.pendingTree.findLayerWithId(this.layer_.layerId);
- if (!layer)
- return undefined;
- return new LayerSelection(layer);
- }
- };
-
- /**
- * @constructor
- */
- function TileSelection(tile, opt_data) {
- this.tile_ = tile;
- this.data_ = opt_data || {};
- }
-
- TileSelection.prototype = {
- __proto__: Selection.prototype,
-
- get specicifity() {
- return 2;
- },
-
- get associatedLayerId() {
- return this.tile_.layerId;
- },
-
- get highlightsByLayerId() {
- var highlights = {};
- highlights[this.tile_.layerId] = [
- {
- colorKey: this.tile_.objectInstance.typeName,
- rect: this.tile_.layerRect
- }
- ];
- return highlights;
- },
-
- createAnalysis: function() {
- var analysis = document.createElement(
- 'tr-ui-a-generic-object-view-with-label');
- analysis.label = 'Tile ' + this.tile_.objectInstance.id + ' on layer ' +
- this.tile_.layerId;
- if (this.data_) {
- analysis.object = {
- moreInfo: this.data_,
- tileArgs: this.tile_.args
- };
- } else {
- analysis.object = this.tile_.args;
- }
- return analysis;
- },
-
- findEquivalent: function(lthi) {
- var tileInstance = this.tile_.tileInstance;
- if (lthi.ts < tileInstance.creationTs ||
- lthi.ts >= tileInstance.deletionTs)
- return undefined;
- var tileSnapshot = tileInstance.getSnapshotAt(lthi.ts);
- if (!tileSnapshot)
- return undefined;
- return new TileSelection(tileSnapshot);
- }
- };
-
- /**
- * @constructor
- */
- function LayerRectSelection(layer, rectType, rect, opt_data) {
- this.layer_ = layer;
- this.rectType_ = rectType;
- this.rect_ = rect;
- this.data_ = opt_data !== undefined ? opt_data : rect;
- }
-
- LayerRectSelection.prototype = {
- __proto__: Selection.prototype,
-
- get specicifity() {
- return 2;
- },
-
- get associatedLayerId() {
- return this.layer_.layerId;
- },
-
-
- get highlightsByLayerId() {
- var highlights = {};
- highlights[this.layer_.layerId] = [
- {
- colorKey: this.rectType_,
- rect: this.rect_
- }
- ];
- return highlights;
- },
-
- createAnalysis: function() {
- var analysis = document.createElement(
- 'tr-ui-a-generic-object-view-with-label');
- analysis.label = this.rectType_ + ' on layer ' + this.layer_.layerId;
- analysis.object = this.data_;
- return analysis;
- },
-
- findEquivalent: function(lthi) {
- return undefined;
- }
- };
-
- /**
- * @constructor
- */
- function AnimationRectSelection(layer, rect) {
- this.layer_ = layer;
- this.rect_ = rect;
- }
-
- AnimationRectSelection.prototype = {
- __proto__: Selection.prototype,
-
- get specicifity() {
- return 0;
- },
-
- get associatedLayerId() {
- return this.layer_.layerId;
- },
-
- createAnalysis: function() {
- var analysis = document.createElement(
- 'tr-ui-a-generic-object-view-with-label');
- analysis.label = 'Animation Bounds of layer ' + this.layer_.layerId;
- analysis.object = this.rect_;
- return analysis;
- }
- };
-
- return {
- Selection: Selection,
- RenderPassSelection: RenderPassSelection,
- LayerSelection: LayerSelection,
- TileSelection: TileSelection,
- LayerRectSelection: LayerRectSelection,
- AnimationRectSelection: AnimationRectSelection
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/tile_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/tile_view.html
deleted file mode 100644
index 16e0bf0f347..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/cc/tile_view.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/cc/tile.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-
-<script>
-
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.cc', function() {
- /*
- * Displays a tile in a human readable form.
- * @constructor
- */
- var TileSnapshotView = tr.ui.b.define(
- 'tr-ui-e-chrome-cc-tile-snapshot-view',
- tr.ui.analysis.ObjectSnapshotView);
-
- TileSnapshotView.prototype = {
- __proto__: tr.ui.analysis.ObjectSnapshotView.prototype,
-
- decorate: function() {
- Polymer.dom(this).classList.add('tr-ui-e-chrome-cc-tile-snapshot-view');
- this.layerTreeView_ =
- new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView();
- Polymer.dom(this).appendChild(this.layerTreeView_);
- },
-
- updateContents: function() {
- var tile = this.objectSnapshot_;
- var layerTreeHostImpl = tile.containingSnapshot;
- if (!layerTreeHostImpl)
- return;
-
- this.layerTreeView_.objectSnapshot = layerTreeHostImpl;
- this.layerTreeView_.selection = new tr.ui.e.chrome.cc.TileSelection(tile);
- }
- };
-
- tr.ui.analysis.ObjectSnapshotView.register(
- TileSnapshotView,
- {
- typeName: 'cc::Tile',
- showInTrackView: false
- });
-
- return {
- TileSnapshotView: TileSnapshotView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/gpu.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/gpu.html
deleted file mode 100644
index 93811e10bff..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/gpu.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/gpu/state.html">
-<link rel="import" href="/tracing/extras/chrome/gpu/gpu_async_slice.html">
-<link rel="import" href="/tracing/ui/extras/chrome/gpu/state_view.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/images/checkerboard.png b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/images/checkerboard.png
deleted file mode 100644
index 8ea9bc726bb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/images/checkerboard.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.css
deleted file mode 100644
index 466dbb56585..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.css
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.tr-ui-e-chrome-gpu-state-snapshot-view {
- background: url('./images/checkerboard.png');
- display: -webkit-flex;
- overflow: auto;
-}
-
-.tr-ui-e-chrome-gpu-state-snapshot-view img {
- display: block;
- margin: 16px auto 16px auto;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.html
deleted file mode 100644
index 51f3f444a29..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/gpu/state_view.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/extras/chrome/gpu/state_view.css">
-
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.chrome.gpu', function() {
- /*
- * Displays a GPU state snapshot in a human readable form.
- * @constructor
- */
- var StateSnapshotView = tr.ui.b.define(
- 'tr-ui-e-chrome-gpu-state-snapshot-view',
- tr.ui.analysis.ObjectSnapshotView);
-
- StateSnapshotView.prototype = {
- __proto__: tr.ui.analysis.ObjectSnapshotView.prototype,
-
- decorate: function() {
- Polymer.dom(this).classList.add('tr-ui-e-chrome-gpu-state-snapshot-view');
- this.screenshotImage_ = document.createElement('img');
- Polymer.dom(this).appendChild(this.screenshotImage_);
- },
-
- updateContents: function() {
- if (this.objectSnapshot_ && this.objectSnapshot_.screenshot) {
- this.screenshotImage_.src = 'data:image/png;base64,' +
- this.objectSnapshot_.screenshot;
- }
- }
- };
- tr.ui.analysis.ObjectSnapshotView.register(
- StateSnapshotView,
- {typeName: 'gpu::State'});
-
- return {
- StateSnapshotView: StateSnapshotView
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/layout_tree_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/layout_tree_sub_view.html
deleted file mode 100644
index 26b38f6d402..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome/layout_tree_sub_view.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/layout_tree.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-
-<dom-module id='tr-ui-a-layout-tree-sub-view'>
- <template>
- <style>
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
- <div id="content"></div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.analysis', function() {
- Polymer({
- is: 'tr-ui-a-layout-tree-sub-view',
- behaviors: ['tr-ui-a-sub-view'],
-
- set selection(selection) {
- this.currentSelection_ = selection;
- this.updateContents_();
- },
-
- get selection() {
- return this.currentSelection_;
- },
-
- updateContents_: function() {
- this.set('$.content.textContent', '');
- if (!this.currentSelection_)
- return;
-
- var columns = [
- {
- title: 'Tag/Name',
- value: function(layoutObject) {
- return layoutObject.tag || ':' + layoutObject.name;
- }
- },
-
- {
- title: 'htmlId',
- value: function(layoutObject) {
- return layoutObject.htmlId || '';
- }
- },
-
- {
- title: 'classNames',
- value: function(layoutObject) {
- return layoutObject.classNames || '';
- }
- },
-
- {
- title: 'reasons',
- value: function(layoutObject) {
- return layoutObject.needsLayoutReasons.join(', ');
- }
- },
-
- {
- title: 'width',
- value: function(layoutObject) {
- return layoutObject.absoluteRect.width;
- }
- },
-
- {
- title: 'height',
- value: function(layoutObject) {
- return layoutObject.absoluteRect.height;
- }
- },
-
- {
- title: 'absX',
- value: function(layoutObject) {
- return layoutObject.absoluteRect.left;
- }
- },
-
- {
- title: 'absY',
- value: function(layoutObject) {
- return layoutObject.absoluteRect.top;
- }
- },
-
- {
- title: 'relX',
- value: function(layoutObject) {
- return layoutObject.relativeRect.left;
- }
- },
-
- {
- title: 'relY',
- value: function(layoutObject) {
- return layoutObject.relativeRect.top;
- }
- },
-
- {
- title: 'float',
- value: function(layoutObject) {
- return layoutObject.isFloat ? 'float' : '';
- }
- },
-
- {
- title: 'positioned',
- value: function(layoutObject) {
- return layoutObject.isPositioned ? 'positioned' : '';
- }
- },
-
- {
- title: 'relative',
- value: function(layoutObject) {
- return layoutObject.isRelativePositioned ? 'relative' : '';
- }
- },
-
- {
- title: 'sticky',
- value: function(layoutObject) {
- return layoutObject.isStickyPositioned ? 'sticky' : '';
- }
- },
-
- {
- title: 'anonymous',
- value: function(layoutObject) {
- return layoutObject.isAnonymous ? 'anonymous' : '';
- }
- },
-
- {
- title: 'row',
- value: function(layoutObject) {
- if (layoutObject.tableRow === undefined)
- return '';
- return layoutObject.tableRow;
- }
- },
-
- {
- title: 'col',
- value: function(layoutObject) {
- if (layoutObject.tableCol === undefined)
- return '';
- return layoutObject.tableCol;
- }
- },
-
- {
- title: 'rowSpan',
- value: function(layoutObject) {
- if (layoutObject.tableRowSpan === undefined)
- return '';
- return layoutObject.tableRowSpan;
- }
- },
-
- {
- title: 'colSpan',
- value: function(layoutObject) {
- if (layoutObject.tableColSpan === undefined)
- return '';
- return layoutObject.tableColSpan;
- }
- },
-
- {
- title: 'address',
- value: function(layoutObject) {
- return layoutObject.id.toString(16);
- }
- }
- ];
-
- var table = this.ownerDocument.createElement('tr-ui-b-table');
- table.defaultExpansionStateCallback = function(
- layoutObject, parentLayoutObject) {
- return true;
- };
- table.subRowsPropertyName = 'childLayoutObjects';
- table.tableColumns = columns;
- table.tableRows = this.currentSelection_.map(function(snapshot) {
- return snapshot.rootLayoutObject;
- });
- table.rebuild();
- Polymer.dom(this.$.content).appendChild(table);
- },
- });
-
- return {};
-});
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-layout-tree-sub-view',
- tr.e.chrome.LayoutTreeSnapshot,
- {
- multi: false,
- title: 'Layout Tree',
- });
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-a-layout-tree-sub-view',
- tr.e.chrome.LayoutTreeSnapshot,
- {
- multi: true,
- title: 'Layout Trees',
- });
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome_config.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome_config.html
deleted file mode 100644
index e2065a701e5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/chrome_config.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-The chrome config is heavily used:
- - chrome://tracing,
- - trace2html, which in turn implies
- - adb_profile_chrome
- - telemetry
--->
-
-<!--
-TODO(charliea): Make all UI files depend on tracing/ui/base/base.html in the
-same way that all non-UI files depend on tracing/base/base.html. Enforce this
-dependency with a presubmit.
--->
-<link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
-
-<link rel="import" href="/tracing/extras/chrome_config.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/extras/chrome/cc/cc.html">
-<link rel="import" href="/tracing/ui/extras/chrome/gpu/gpu.html">
-<link rel="import" href="/tracing/ui/extras/chrome/layout_tree_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/frame_data_side_panel.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/input_latency_side_panel.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/time_summary_side_panel.html">
-<link rel="import" href="/tracing/ui/extras/system_stats/system_stats.html">
-<link rel="import" href="/tracing/ui/extras/v8_config.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/html_results.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/html_results.html
deleted file mode 100644
index 2324a1d9214..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/html_results.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<!--
-This class tries to (simply) copy the telemetry Results object, but outputs
-directly to an HTML table. It takes things that look like Telemetry values,
-and updates the table internally.
--->
-<dom-module id='tr-ui-e-deep-reports-html-results'>
- <template>
- <style>
- :host {
- display: flex;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-e-deep-reports-html-results',
-
- created: function() {
- this.hasColumnNamed_ = {};
- this.pageToRowMap_ = new WeakMap();
- },
-
- ready: function() {
- var table = this.$.table;
- table.tableColumns = [
- {
- title: 'Label',
- value: function(row) { return row.label; },
- width: '350px'
- }
- ];
- this.clear();
- },
-
- clear: function() {
- this.$.table.tableRows = [];
- },
-
- addColumnIfNeeded_: function(columnName) {
- if (this.hasColumnNamed_[columnName])
- return;
- this.hasColumnNamed_[columnName] = true;
-
- var column = {
- title: columnName,
- value: function(row) {
- if (row[columnName] === undefined)
- return '';
- return row[columnName];
- }
- };
-
- var columns = this.$.table.tableColumns;
- columns.push(column);
-
- // Update widths.
- var colWidthPercentage;
- if (columns.length === 1)
- colWidthPercentage = '100%';
- else
- colWidthPercentage = (100 / (columns.length - 1)).toFixed(3) + '%';
-
- for (var i = 1; i < columns.length; i++)
- columns[i].width = colWidthPercentage;
-
- this.$.table.tableColumns = columns;
- },
-
- getRowForPage_: function(page) {
- if (!this.pageToRowMap_.has(page)) {
- var i = page.url.lastIndexOf('/');
- var baseName = page.url.substring(i + 1);
-
- var link = document.createElement('a');
- link.href = 'trace_viewer.html#' + page.url;
- Polymer.dom(link).textContent = baseName;
-
- var row = {
- label: link,
- value: '',
- subRows: [],
- isExpanded: true
- };
- this.$.table.tableRows.push(row);
- this.pageToRowMap_.set(page, row);
-
- // Kick table rebuild.
- this.$.table.tableRows = this.$.table.tableRows;
- }
- return this.pageToRowMap_.get(page);
- },
-
- addValue: function(value) {
- /* Value is expected to be a scalar telemetry-style Value. */
- if (value.type !== 'scalar')
- throw new Error('wat');
-
- this.addColumnIfNeeded_(value.name);
- var rowForPage = this.getRowForPage_(value.page);
- rowForPage[value.name] = value.value;
-
- // Kick table rebuild.
- this.$.table.tableRows = this.$.table.tableRows;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/main.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/main.html
deleted file mode 100644
index 88af3f292d3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/main.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/ui/extras/deep_reports/scalar_value.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.deep_reports', function() {
- /**
- * Runs deep reports on the provided files, and pushes telemetry-style
- * values to the results object.
- */
- function main(results, filesInDir) {
- var lastP = new Promise(function(resolve) { resolve(); });
-
- filesInDir.forEach(function(filename) {
- // TODO(nduca): Make this like telemetry page.
- var page = {
- url: filename
- };
- lastP = lastP.then(function() {
- return loadModelFromFileAsync(filename);
- });
- lastP = lastP.then(function(model) {
- processModel(results, page, model);
- });
- });
- return lastP;
- }
-
- function loadModelFromFileAsync(filename) {
- return tr.b.getAsync(filename).then(function(trace) {
- var io = new tr.ImportOptions();
- io.shiftWorldToZero = true;
- io.pruneEmptyContainers = false;
-
- var m = new tr.Model();
- try {
- m.importTraces([trace], io);
- } catch (e) {
- throw new Error('While loading ' + filename + ' got: ' + e.toString());
- }
- return m;
- });
- }
-
- function processModel(results, page, model) {
- results.addValue(
- new tr.ui.e.deep_reports.ScalarValue(
- page, 'numRailIRs', 'ms', model.userModel.expectations.length));
- }
-
- return {
- main: main
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/scalar_value.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/scalar_value.html
deleted file mode 100644
index 7dcd2bc36c9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/deep_reports/scalar_value.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.deep_reports', function() {
- function ScalarValue(page, name, units, value,
- opt_important, opt_description) {
- this.type = 'scalar';
- this.page = page;
- this.name = name;
- this.units = units;
- this.value = value;
- this.important = opt_important !== undefined ? opt_important : false;
- this.description = opt_description || '';
- }
- ScalarValue.fromDict = function(page, dict) {
- if (dict.type !== 'scalar')
- throw new Error('wat');
- var v = new ScalarValue(page, dict.name, dict.units, dict.value);
- v.important = dict.important;
- v.description = dict.description;
- v.value = dict.value;
- return v;
- }
-
- ScalarValue.prototype = {
-
- };
-
- return {
- ScalarValue: ScalarValue
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comment_element.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comment_element.html
deleted file mode 100644
index fa19a804bc5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comment_element.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<dom-module id='tr-ui-e-drive-comment-element'>
- <template>
- <style>
- :host {
- display: block;
- }
- #comment-area {
- display: flex;
- flex-direction: column;
- border-top: 1px solid #e8e8e8;
- background-color: white;
- padding: 6px;
- margin-bottom: 4px;
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
- border-radius: 2px;
- font-size: small;
- }
- #comment-header {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-bottom: 8px;
- }
- #comment-header-text {
- display: flex;
- flex-direction: column;
- padding-left: 10px;
- }
- #comment-img {
- width: 32px;
- height: 32px;
- }
- #comment-text-author {
- padding-bottom: 2px;
- }
- #comment-date {
- color: #777;
- font-size: 11px;
- }
- #comment-content {
- word-wrap: break-word;
- }
- </style>
- <div id="comment-area">
- <div id="comment-header">
- <img id="comment-img" src="{{ comment.author.picture.url }}" />
- <div id="comment-header-text">
- <div id="comment-text-author">{{ comment.author.displayName }}</div>
- <div id="comment-date">{{ createdDate }}</div>
- </div>
- </div>
- <div id="comment-content">{{_computeCommentContentPrefix( comment)}}
- {{ comment.content }}</div>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-e-drive-comment-element',
-
- properties: {
- comment: {
- type: String,
- observer: '_commentChanged'
- }
- },
-
- _commentChanged: function() {
- this.createdDate = new Date(this.comment.createdDate).toLocaleString();
- },
-
- _computeCommentContentPrefix: function(comment) {
- return comment.anchor ? '&#9875;&nbsp;' : '';
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel.html
deleted file mode 100644
index 19cc2cc46b1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel.html
+++ /dev/null
@@ -1,185 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/extras/drive/comment_element.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-
-<dom-module id='tr-ui-e-drive-comments-side-panel'>
- <template>
- <style>
- :host {
- flex-direction: column;
- display: flex;
- width: 290px;
- overflow-y: scroll;
- overflow-x: hidden;
- background-color: #eee;
- }
- toolbar {
- flex: 0 0 auto;
- border-bottom: 1px solid black;
- display: flex;
- }
- result-area {
- flex: 1 1 auto;
- display: block;
- min-height: 0;
- padding: 4px;
- }
- #comments-textarea-container {
- display: flex;
- }
- #commentinput {
- width: 100%;
- }
- </style>
-
- <toolbar id='toolbar'></toolbar>
- <result-area id='result_area'>
- <template is="dom-repeat" items="{{comments_}}" repeat="{{ comment in comments_ }}">
- <tr-ui-e-drive-comment-element comment="{{comment}}"
- on-click="commentClick">
- </tr-ui-e-drive-comment-element>
- </template>
- <div id="comments-textarea-container">
- <textarea id="commentinput" on-focus='textAreaFocus'
- on-blur='textAreaBlur'
- on-keypress="textareaKeypress"></textarea>
- </div>
- </result-area>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-e-drive-comments-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
- ready: function() {
- this.rangeOfInterest_ = new tr.b.Range();
- this.selection_ = undefined;
- this.comments_ = [];
- this.annotationFromComment_ = undefined;
- this.textAreaFocused = false;
- },
-
- setCommentProvider: function(commentProvider) {
- this.commentProvider_ = commentProvider;
- },
-
- attached: function() {
- if (this.commentProvider_ === undefined) {
- this.commentProvider_ =
- new tr.ui.e.drive.analysis.DefaultCommentProvider();
- }
- this.commentProvider_.attachToElement(this);
- },
-
- detached: function() {
- this.commentProvider_.detachFromElement();
- },
-
- commentClick: function(event) {
- var anchor = event.currentTarget.comment.anchor;
- if (!anchor)
- return;
-
- var uiState =
- JSON.parse(anchor).a[0][tr.ui.e.drive.constants.ANCHOR_NAME];
-
- var myEvent = new CustomEvent('navigateToUIState', { detail:
- new tr.ui.b.UIState(new tr.model.Location(uiState.location.xWorld,
- uiState.location.yComponents),
- uiState.scaleX)
- });
- document.dispatchEvent(myEvent);
-
- if (this.annotationFromComment_)
- this.model.removeAnnotation(this.annotationFromComment_);
- var loc = new tr.model.Location(uiState.location.xWorld,
- uiState.location.yComponents);
-
- var text = sender.comment.author.displayName + ': ' +
- sender.comment.content;
- this.annotationFromComment_ =
- new tr.model.CommentBoxAnnotation(loc, text);
- this.model.addAnnotation(this.annotationFromComment_);
- },
-
- textareaKeypress: function(event) {
- // Check for return key.
- if (event.keyCode === 13 && !event.ctrlKey) {
- this.commentProvider_.addComment(this.$.commentinput.value);
- this.$.commentinput.value = '';
- }
- event.stopPropagation();
- return true;
- },
-
- textAreaFocus: function(event) {
- this.textAreaFocused = true;
- },
-
- textAreaBlur: function(event) {
- this.textAreaFocused = false;
- },
-
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- set rangeOfInterest(rangeOfInterest) {
- this.rangeOfInterest_ = rangeOfInterest;
- this.updateContents_();
- },
-
- get currentRangeOfInterest() {
- if (this.rangeOfInterest_.isEmpty)
- return this.model_.bounds;
- else
- return this.rangeOfInterest_;
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
- },
-
- set selection(selection) {
- this.selection_ = selection;
- },
-
- updateContents_: function() {
- this.commentProvider_.updateComments();
- },
-
- supportsModel: function(m) {
- if (m === undefined) {
- return {
- supported: false,
- reason: 'Unknown tracing model'
- };
- }
- return {
- supported: true
- };
- },
-
- get textLabel() {
- return 'Comments';
- }
-});
-
-tr.ui.side_panel.SidePanelRegistry.register(function() {
- return document.createElement('tr-ui-e-drive-comments-side-panel');
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel_test.html
deleted file mode 100644
index bca061a876d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/comments_side_panel_test.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/extras/drive/comments_side_panel.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function StubCommentProvider() {
- this.addDummyComment('Lorem ipsum dolor sit amet');
- this.addDummyComment('consectetur adipiscing elit');
- this.addDummyComment('sed do eiusmod tempor incididunt ut labore et ' +
- 'dolore magna aliqua. Ut enim ad minim veniam, quis nostrud ' +
- 'exercitation ullamco laboris nisi ut aliquip ex ea commodo ' +
- 'consequat. Duis aute irure dolor in reprehenderit in voluptate ' +
- 'velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint ' +
- 'occaecat cupidatat non proident, sunt in culpa qui officia deserunt ' +
- 'mollit anim id est laborum.');
- }
-
- StubCommentProvider.prototype = {
- comments_: [],
-
- attachToElement: function(attachedElement) {
- this.attachedElement_ = attachedElement;
- this.updateComments();
- },
-
- detachFromElement: function() {
- },
-
- updateComments: function() {
- this.attachedElement_.comments_ = this.comments_;
- },
-
- addDummyComment: function(content) {
- var newComment = {
- author: {
- displayName: 'Casper the Friendly Ghost',
- picture: {
- url: 'https://lh3.googleusercontent.com/-XdUIqdMkCWA/' +
- 'AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/s128/photo.jpg'
- }
- },
- createdDate: Date.now(),
- anchor: (this.comments_.length) % 2 ? 1 : 0,
- content: content
- };
-
- this.comments_.push(newComment);
- },
-
- addComment: function(body) {
- this.addDummyComment(body);
- this.updateComments();
- }
- };
-
- test('instantiate', function() {
- var panel = document.createElement('tr-ui-e-drive-comments-side-panel');
- panel.setCommentProvider(new StubCommentProvider);
- this.addHTMLOutput(panel);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/drive_comment_provider.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/drive_comment_provider.html
deleted file mode 100644
index c55f98a727f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/drive_comment_provider.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/model/comment_box_annotation.html">
-
-<link rel="import" href="/tracing/ui/extras/drive/comments_side_panel.html">
-
-<script>
-'use strict';
-
-(function() {
- function addDriveCommentWithUIState_(text, uiState) {
- gapi.client.load('drive', 'v2', function() {
- var request = gapi.client.drive.revisions.get({
- 'fileId': tr.ui.e.drive.getDriveFileId(),
- 'revisionId': 'head'
- });
- request.execute(function(resp) {
- var anchorObject = {};
- anchorObject[tr.ui.e.drive.constants.ANCHOR_NAME] = uiState;
- var anchor = {
- 'r': resp.id,
- 'a': [anchorObject]
- };
- anchor = JSON.stringify(anchor);
- gapi.client.load('drive', 'v2', function() {
- var request = gapi.client.drive.comments.insert({
- 'fileId': tr.ui.e.drive.getDriveFileId(),
- 'resource': {'content': text, 'anchor': anchor}
- });
- request.execute();
- });
- });
- });
- };
-
- function onCommentWithUIState(e) {
- addDriveCommentWithUIState_(e.detail.name, e.detail.location);
- };
-
- document.addEventListener('commentWithUIState',
- onCommentWithUIState.bind(this));
-}());
-
-tr.exportTo('tr.ui.e.drive.analysis', function() {
- function DefaultCommentProvider() { }
-
- DefaultCommentProvider.prototype = {
- attachToElement: function(attachedElement) {
- this.attachedElement_ = attachedElement;
- this.commentsCheckTimer_ = setTimeout(this.checkForComments_.bind(this),
- 5000);
- },
-
- detachFromElement: function() {
- clearTimeout(this.commentsCheckTimer_);
- },
-
- checkForComments_: function() {
- this.updateComments();
- this.commentsCheckTimer_ = setTimeout(this.checkForComments_.bind(this),
- 5000);
- },
-
- updateComments: function() {
- var self = this;
- gapi.client.load('drive', 'v2', function() {
- var request = gapi.client.drive.comments.list({
- 'fileId': tr.ui.e.drive.getDriveFileId()
- });
- request.execute(function(results) {
- self.attachedElement_.comments_ = results.items;
- });
- });
- },
-
- addComment: function(body) {
- var self = this;
- gapi.client.load('drive', 'v2', function() {
- var request = gapi.client.drive.comments.insert({
- 'fileId': tr.ui.e.drive.getDriveFileId(),
- 'resource': {'content': body}
- });
- request.execute(function(resp) {
- self.updateComments();
- });
- });
- }
- };
-
- return {
- DefaultCommentProvider: DefaultCommentProvider
- };
-});
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/index.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/index.html
deleted file mode 100644
index 4b31b5fc68d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/drive/index.html
+++ /dev/null
@@ -1,462 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
- <script type="text/javascript" src="https://apis.google.com/js/api.js"></script>
-
- <link rel="import" href="/components/polymer/polymer.html">
- <link rel="import" href="/tracing/ui/extras/drive/drive_comment_provider.html">
- <link rel="import" href="/tracing/ui/extras/full_config.html">
- <link rel="import" href="/tracing/ui/timeline_view.html">
-
- <style>
- body {
- margin: 0;
- padding: 0;
- width: 100%;
- height: 100%;
- display: -webkit-flex;
- -webkit-flex-direction: column;
- }
- body > x-timeline-view {
- -webkit-flex: 1 1 auto;
- overflow: hidden;
- position: absolute;
- top: 0px;
- bottom: 0;
- left: 0;
- right: 0;
- }
- body > x-timeline-view:focus {
- outline: none;
- }
- nav {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- }
- #navbar button {
- height: 24px;
- padding-bottom: 3px;
- vertical-align: middle;
- box-shadow: none;
- background-color: #4d90fe;
- background-image: -webkit-linear-gradient(top,#4d90fe,#4787ed);
- border: 1px solid #3079ed;
- color: #fff;
- border-radius: 2px;
- cursor: default;
- font-size: 11px;
- font-weight: bold;
- text-align: center;
- white-space: nowrap;
- line-height: 27px;
- min-width: 54px;
- outline: 0px;
- padding: 0 8px;
- font: normal 13px arial,sans-serif;
- margin: 5px;
- }
- #collabs {
- display: flex;
- flex-direction: row;
- }
- .collaborator-div {
- display: inline-block;
- vertical-align: middle;
- min-height: 0;
- width: 100px;
- font-size: 11px;
- font-weight: bold;
- font: normal 13px arial,sans-serif;
- margin: 10px;
- }
- .collaborator-img {
- margin: 2px;
- }
- .collaborator-tooltip {
- z-index: 10000;
- transition: visibility 0,opacity .13s ease-in;
- background-color: #2a2a2a;
- border: 1px solid #fff;
- color: #fff;
- cursor: default;
- display: block;
- font-family: arial, sans-serif;
- font-size: 11px;
- font-weight: bold;
- margin-left: -1px;
- opacity: 1;
- padding: 7px 9px;
- word-break: break-word;
- position: absolute;
- }
- .collaborator-tooltip-content {
- color: #fff;
- }
- .collaborator-tooltip-arrow {
- position: absolute;
- top: -6px;
- }
- .collaborator-tooltip-arrow-before {
- border-color: #fff transparent !important;
- left: -6px;
- border: 6px solid;
- border-top-width: 0;
- content: '';
- display: block;
- height: 0;
- position: absolute;
- width: 0;
- }
- .collaborator-tooltip-arrow-after {
- top: 1px;
- border-color: #2a2a2a transparent !important;
- left: -5px;
- border: 5px solid;
- border-top-width: 0;
- content: '';
- display: block;
- height: 0;
- position: absolute;
- width: 0;
- }
-
- </style>
- <title>Trace Viewer</title>
-</head>
-<body>
- <nav id="navbar">
- <div id="collabs"></div>
- <button id="x-drive-save-to-disk">Save to disk</button>
- <button id="x-drive-save-to-drive">Save to Drive</button>
- <button id="x-drive-load-from-drive">Load from Drive</button>
- <button id="x-drive-share">Share</button>
- </nav>
- <x-timeline-view>
- </x-timeline-view>
-
- <script>
- 'use strict';
-
- // Needs to be global as it's passed through the Google API as a
- // GET parameter.
- var onAPIClientLoaded_ = null;
-
- (function() {
-
- tr.exportTo('tr.ui.e.drive', function() {
- var appId = '239864068844';
- var constants = {
- APP_ID: appId,
- ANCHOR_NAME: appId + '.trace_viewer',
- DEVELOPER_KEY: 'AIzaSyDR-6_wL9vHg1_oz4JHk8IQAkv2_Y0Y8-M',
- CLIENT_ID: '239864068844-c7gefbfdcp0j6grltulh2r88tsvl18c1.apps.' +
- 'googleusercontent.com',
- SCOPE: [
- 'https://www.googleapis.com/auth/drive',
- 'https://www.googleapis.com/auth/drive.install',
- 'https://www.googleapis.com/auth/drive.file',
- 'profile'
- ]
- };
-
- return {
- getDriveFileId: function() { return driveFileId_; },
- constants: constants
- };
- });
-
-
- var pickerApiLoaded_ = false;
- var oauthToken_ = null;
-
- var timelineViewEl_ = null;
- var driveDocument_ = null;
- var shareClient_ = null;
- var fileIdToLoad_ = null;
- var driveFileId_ = null;
-
- function parseGETParameter(val) {
- var result = null;
- var tmp = [];
- location.search.substr(1).split('&').forEach(function(item) {
- tmp = item.split('=');
- if (tmp[0] === val)
- result = decodeURIComponent(tmp[1]);
- });
- return result;
- }
-
- // Use the Google API Loader script to load the google.picker script.
- onAPIClientLoaded_ = function() {
- var driveState = parseGETParameter('state');
- if (driveState !== null) {
- var driveStateJson = JSON.parse(driveState);
- fileIdToLoad_ = String(driveStateJson.ids);
- }
-
- gapi.load('picker', {'callback': onPickerApiLoad});
- gapi.load('auth', {'callback': function() {
- onAuthApiLoad(true, onAuthResultSuccess);
- setTimeout(function onRepeatAuthApiLoad() {
- onAuthApiLoad(true, function() {});
- setTimeout(onRepeatAuthApiLoad, 30000);
- }, 30000);
- }});
- };
-
- function onAuthApiLoad(tryImmediate, resultCallback) {
- window.gapi.auth.authorize(
- {'client_id': tr.ui.e.drive.constants.CLIENT_ID,
- 'scope': tr.ui.e.drive.constants.SCOPE, 'immediate': tryImmediate},
- function(authResult) {
- handleAuthResult(authResult, tryImmediate, resultCallback);
- });
- }
-
- function onPickerApiLoad() {
- pickerApiLoaded_ = true;
- if (fileIdToLoad_ === null)
- createPicker();
- }
-
- function onAuthResultSuccess() {
- if (fileIdToLoad_ === null)
- createPicker();
- else
- loadFileFromDrive(fileIdToLoad_);
- }
-
- function handleAuthResult(authResult, wasImmediate, resultCallback) {
- if (authResult && !authResult.error) {
- oauthToken_ = authResult.access_token;
- resultCallback();
- } else if (wasImmediate) {
- onAuthApiLoad(false);
- }
- }
-
- function createPicker() {
- if (pickerApiLoaded_ && oauthToken_) {
- var view = new google.picker.View(google.picker.ViewId.DOCS);
- view.setMimeTypes('application/json,application/octet-stream');
- var picker = new google.picker.PickerBuilder()
- .enableFeature(google.picker.Feature.NAV_HIDDEN)
- .enableFeature(google.picker.Feature.MULTISELECT_ENABLED)
- .setAppId(tr.ui.e.drive.constants.APP_ID)
- .setOAuthToken(oauthToken_)
- .addView(view)
- .addView(new google.picker.DocsUploadView())
- .setDeveloperKey(tr.ui.e.drive.constants.DEVELOPER_KEY)
- .setCallback(pickerCallback)
- .build();
- picker.setVisible(true);
- }
- }
-
- function pickerCallback(data) {
- if (data.action === google.picker.Action.PICKED) {
- loadFileFromDrive(data.docs[0].id);
- }
- }
-
- function initShareButton() {
- shareClient_ = new gapi.drive.share.ShareClient(
- tr.ui.e.drive.constants.APP_ID);
- shareClient_.setItemIds([driveFileId_]);
- }
-
- function loadFileFromDrive(fileId) {
- gapi.client.load('drive', 'v2', function() {
- var request = gapi.client.drive.files.get({'fileId': fileId});
- request.execute(function(resp) { downloadFile(resp); });
- driveFileId_ = fileId;
- gapi.load('drive-share', initShareButton);
- });
- }
-
- function downloadFile(file) {
- if (file.downloadUrl) {
- var downloadingOverlay = tr.ui.b.Overlay();
- downloadingOverlay.title = 'Downloading...';
- downloadingOverlay.userCanClose = false;
- downloadingOverlay.msgEl = document.createElement('div');
- Polymer.dom(downloadingOverlay).appendChild(downloadingOverlay.msgEl);
- downloadingOverlay.msgEl.style.margin = '20px';
- downloadingOverlay.update = function(msg) {
- Polymer.dom(this.msgEl).textContent = msg;
- };
- downloadingOverlay.visible = true;
-
- var accessToken = gapi.auth.getToken().access_token;
- var xhr = new XMLHttpRequest();
- xhr.open('GET', file.downloadUrl);
- xhr.setRequestHeader('Authorization', 'Bearer ' + accessToken);
- xhr.onload = function() {
- downloadingOverlay.visible = false;
- onDownloaded(file.title, xhr.responseText);
- };
- xhr.onprogress = function(evt) {
- downloadingOverlay.update(
- Math.floor(evt.position * 100 / file.fileSize) + '% complete');
- };
- xhr.onerror = function() { alert('Failed downloading!'); };
- xhr.send();
- } else {
- alert('No URL!');
- }
- }
-
- function displayAllCollaborators() {
- var allCollaborators = driveDocument_.getCollaborators();
- var collaboratorCount = allCollaborators.length;
- var collabspan = document.getElementById('collabs');
- Polymer.dom(collabspan).innerHTML = '';
- var imageList = [];
- for (var i = 0; i < collaboratorCount; i++) {
- var user = allCollaborators[i];
-
- var img = document.createElement('img');
- img.src = user.photoUrl;
- img.alt = user.displayName;
- img.height = 30;
- img.width = 30;
- img.className = 'collaborator-img';
- Polymer.dom(collabspan).appendChild(img);
- imageList.push({'image': img, 'name': user.displayName});
- }
- for (i = 0; i < imageList.length; i++) {
- var collabTooltip = tr.ui.b.createDiv({
- className: 'collaborator-tooltip'
- });
- var collabTooltipContent = tr.ui.b.createDiv({
- className: 'collaborator-tooltip-content'
- });
- Polymer.dom(collabTooltipContent).textContent = imageList[i].name;
- Polymer.dom(collabTooltip).appendChild(collabTooltipContent);
- Polymer.dom(collabspan).appendChild(collabTooltip);
- var collabTooltipArrow = tr.ui.b.createDiv({
- className: 'collaborator-tooltip-arrow'});
- Polymer.dom(collabTooltip).appendChild(collabTooltipArrow);
- var collabTooltipArrowBefore = tr.ui.b.createDiv({
- className: 'collaborator-tooltip-arrow-before'});
- Polymer.dom(collabTooltipArrow).appendChild(collabTooltipArrowBefore);
- var collabTooltipArrowAfter = tr.ui.b.createDiv({
- className: 'collaborator-tooltip-arrow-after'});
- Polymer.dom(collabTooltipArrow).appendChild(collabTooltipArrowAfter);
-
- var rect = imageList[i].image.getBoundingClientRect();
- collabTooltip.style.top = (rect.bottom - 6) + 'px';
- collabTooltip.style.left =
- (rect.left + 16 - (collabTooltip.offsetWidth / 2)) + 'px';
- collabTooltipArrow.style.left = (collabTooltip.offsetWidth / 2) + 'px';
- collabTooltip.style.visibility = 'hidden';
- function visibilityDelegate(element, visibility) {
- return function() {
- element.style.visibility = visibility;
- }
- }
- imageList[i].image.addEventListener(
- 'mouseover', visibilityDelegate(collabTooltip, 'visible'));
- imageList[i].image.addEventListener(
- 'mouseout', visibilityDelegate(collabTooltip, 'hidden'));
- }
- }
-
- function onRealtimeFileLoaded(doc) {
- if (driveDocument_)
- driveDocument_.close();
- driveDocument_ = doc;
- doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,
- displayAllCollaborators);
- doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,
- displayAllCollaborators);
-
- displayAllCollaborators(doc);
- }
-
- function onRealtimeError(e) {
- alert('Error loading realtime: ' + e);
- }
-
- function onDownloaded(filename, content) {
- gapi.load('auth:client,drive-realtime,drive-share', function() {
- gapi.drive.realtime.load(driveFileId_,
- onRealtimeFileLoaded,
- null,
- onRealtimeError);
-
- });
-
- var traces = [];
- var filenames = [];
- filenames.push(filename);
- traces.push(content);
- createViewFromTraces(filenames, traces);
- }
-
- function createViewFromTraces(filenames, traces) {
- var m = new tr.Model();
- var i = new tr.importer.Import(m);
- var p = i.importTracesWithProgressDialog(traces);
- p.then(
- function() {
- timelineViewEl_.model = m;
- timelineViewEl_.updateDocumentFavicon();
- timelineViewEl_.globalMode = true;
- timelineViewEl_.viewTitle = '';
- },
- function(err) {
- var downloadingOverlay = new tr.ui.b.Overlay();
- Polymer.dom(downloadingOverlay).textContent =
- tr.b.normalizeException(err).message;
- downloadingOverlay.title = 'Import error';
- downloadingOverlay.visible = true;
- });
- }
-
- function onSaveToDiskClicked() {
- throw new Error('Not implemented');
- }
-
- function onSaveToDriveClicked() {
- throw new Error('Not implemented');
- }
-
- function onLoadFromDriveClicked() {
- createPicker();
- }
-
- function onLoad() {
- timelineViewEl_ = Polymer.dom(document).querySelector('x-timeline-view');
- timelineViewEl_.globalMode = true;
- var navbar = document.getElementById('navbar');
- timelineViewEl_.style.top = navbar.offsetHeight + 'px';
- tr.ui.b.decorate(timelineViewEl_, tr.ui.TimelineView);
- }
-
- window.addEventListener('load', onLoad);
-
- document.getElementById('x-drive-save-to-disk').onclick =
- onSaveToDiskClicked;
- document.getElementById('x-drive-save-to-drive').onclick =
- onSaveToDriveClicked;
- document.getElementById('x-drive-load-from-drive').onclick =
- onLoadFromDriveClicked;
- document.getElementById('x-drive-share').onclick = function() {
- shareClient_.showSettingsDialog();
- };
-
- }());
-
- </script>
- <script type="text/javascript"
- src="https://apis.google.com/js/client.js?onload=onAPIClientLoaded_">
- </script>
-</body>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/full_config.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/full_config.html
deleted file mode 100644
index 6d1e29d4e20..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/full_config.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-TODO(charliea): Make all UI files depend on tracing/ui/base/base.html in the
-same way that all non-UI files depend on tracing/base/base.html. Enforce this
-dependency with a presubmit.
--->
-<link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
-
-<!-- The full config is all the configs slammed together. -->
-<link rel="import" href="/tracing/extras/importer/gcloud_trace/gcloud_trace_importer.html">
-<link rel="import" href="/tracing/ui/extras/chrome_config.html">
-<link rel="import" href="/tracing/ui/extras/lean_config.html">
-<link rel="import" href="/tracing/ui/extras/systrace_config.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter.html
deleted file mode 100644
index a36021dd7b3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/highlighter.html">
-<link rel="import" href="/tracing/ui/tracks/model_track.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Provides the VSyncHighlighter class.
- */
-tr.exportTo('tr.ui.e.highlighter', function() {
-
- var Highlighter = tr.ui.tracks.Highlighter;
-
- /**
- * Highlights VSync events on the model track (using "zebra" striping).
- * @constructor
- */
- function VSyncHighlighter(viewport) {
- Highlighter.call(this, viewport);
- this.times_ = [];
- }
-
- VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR = new tr.b.Color(0, 0, 255);
- VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA = 0.1;
-
- VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT = 0.20;
- VSyncHighlighter.VSYNC_DENSITY_OPAQUE = 0.10;
- VSyncHighlighter.VSYNC_DENSITY_RANGE =
- VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT -
- VSyncHighlighter.VSYNC_DENSITY_OPAQUE;
-
- /**
- * Generate a zebra striping from a list of times.
- */
- VSyncHighlighter.generateStripes = function(times, minTime, maxTime) {
- if (times.length === 0)
- return [];
-
- var stripes = [];
-
- // Find the lowest and highest index within the viewport.
- var lowIndex = tr.b.findLowIndexInSortedArray(
- times,
- function(time) { return time; },
- minTime);
- var highIndex = lowIndex - 1;
- while (times[highIndex + 1] <= maxTime) {
- highIndex++;
- }
-
- // Must start at an even index and end at an odd index.
- for (var i = lowIndex - (lowIndex % 2); i <= highIndex; i += 2) {
- var left = i < lowIndex ? minTime : times[i];
- var right = i + 1 > highIndex ? maxTime : times[i + 1];
- stripes.push([left, right]);
- }
-
- return stripes;
- }
-
- VSyncHighlighter.prototype = {
- __proto__: Highlighter.prototype,
-
- processModel: function(model) {
- this.times_ = model.device.vSyncTimestamps;
- },
-
- drawHighlight: function(ctx, dt, viewLWorld, viewRWorld, viewHeight) {
- if (!this.viewport_.highlightVSync) {
- return;
- }
-
- var stripes = VSyncHighlighter.generateStripes(
- this.times_, viewLWorld, viewRWorld);
- if (stripes.length === 0) {
- return;
- }
-
- var stripeRange = stripes[stripes.length - 1][1] - stripes[0][0];
- var stripeDensity = stripes.length / (dt.scaleX * stripeRange);
- var clampedStripeDensity = tr.b.clamp(stripeDensity,
- VSyncHighlighter.VSYNC_DENSITY_OPAQUE,
- VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT);
- var opacity =
- (VSyncHighlighter.VSYNC_DENSITY_TRANSPARENT - clampedStripeDensity) /
- VSyncHighlighter.VSYNC_DENSITY_RANGE;
- if (opacity === 0) {
- return;
- }
-
- var pixelRatio = window.devicePixelRatio || 1;
- var height = viewHeight * pixelRatio;
-
- var c = VSyncHighlighter.VSYNC_HIGHLIGHT_COLOR;
- ctx.fillStyle = c.toStringWithAlphaOverride(
- VSyncHighlighter.VSYNC_HIGHLIGHT_ALPHA * opacity);
-
- for (var i = 0; i < stripes.length; i++) {
- var xLeftView = dt.xWorldToView(stripes[i][0]);
- var xRightView = dt.xWorldToView(stripes[i][1]);
- ctx.fillRect(xLeftView, 0, xRightView - xLeftView, height);
- }
- }
- };
-
- // Register the highlighter.
- tr.ui.tracks.Highlighter.register(VSyncHighlighter);
-
- return {
- VSyncHighlighter: VSyncHighlighter
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter_test.html
deleted file mode 100644
index 9e8f1779cbf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/highlighter/vsync_highlighter_test.html
+++ /dev/null
@@ -1,151 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/thread.html">
-<link rel="import" href="/tracing/ui/extras/highlighter/vsync_highlighter.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var VSyncHighlighter = tr.ui.e.highlighter.VSyncHighlighter;
-
- var VIEW_L_WORLD = 100;
- var VIEW_R_WORLD = 1000;
-
- function testGenerateStripes(times, expectedRanges) {
- var ranges = VSyncHighlighter.generateStripes(
- times, VIEW_L_WORLD, VIEW_R_WORLD);
-
- assert.sameDeepMembers(ranges, expectedRanges);
- }
-
- test('generateInside', function() {
- testGenerateStripes([], []);
- testGenerateStripes([200, 500], [[200, 500]]);
- testGenerateStripes([200, 500, 800, 900], [[200, 500], [800, 900]]);
- testGenerateStripes(
- [200, 500, 800, 900, 998, 999],
- [[200, 500], [800, 900], [998, 999]]);
- });
-
- test('generateOutside', function() {
- // Far left.
- testGenerateStripes([0, 99], []);
- testGenerateStripes([0, 10, 50, 99], []);
- testGenerateStripes([0, 99, 101, 999], [[101, 999]]);
- testGenerateStripes([0, 10, 50, 99, 101, 999], [[101, 999]]);
-
- // Far right.
- testGenerateStripes([1001, 2000], []);
- testGenerateStripes([1001, 2000, 3000, 4000], []);
- testGenerateStripes([101, 999, 1001, 2000], [[101, 999]]);
- testGenerateStripes([101, 999, 1001, 2000, 3000, 4000], [[101, 999]]);
-
- // Far both.
- testGenerateStripes([0, 99, 1001, 2000], []);
- testGenerateStripes([0, 10, 50, 99, 1001, 2000], []);
- testGenerateStripes([0, 10, 50, 99, 1001, 2000, 3000, 4000], []);
- testGenerateStripes([0, 99, 101, 999, 1001, 2000], [[101, 999]]);
- });
-
- test('generateOverlap', function() {
- // Left overlap.
- testGenerateStripes([0, 101], [[VIEW_L_WORLD, 101]]);
- testGenerateStripes([0, 1, 2, 101], [[VIEW_L_WORLD, 101]]);
- testGenerateStripes(
- [2, 101, 102, 103],
- [[VIEW_L_WORLD, 101], [102, 103]]);
- testGenerateStripes(
- [0, 1, 2, 101, 102, 103],
- [[VIEW_L_WORLD, 101], [102, 103]]);
- testGenerateStripes(
- [0, 1, 2, 101, 102, 103, 1001, 3000],
- [[VIEW_L_WORLD, 101], [102, 103]]);
-
- // Right overlap.
- testGenerateStripes([999, 2000], [[999, VIEW_R_WORLD]]);
- testGenerateStripes([999, 2000, 3000, 4000], [[999, VIEW_R_WORLD]]);
- testGenerateStripes(
- [997, 998, 999, 2000],
- [[997, 998], [999, VIEW_R_WORLD]]);
- testGenerateStripes(
- [997, 998, 999, 2000, 3000, 4000],
- [[997, 998], [999, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 10, 997, 998, 999, 2000, 3000, 4000],
- [[997, 998], [999, VIEW_R_WORLD]]);
-
- // Both overlap.
- testGenerateStripes([0, 2000], [[VIEW_L_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 101, 999, 2000],
- [[VIEW_L_WORLD, 101], [999, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 101, 200, 900, 999, 2000],
- [[VIEW_L_WORLD, 101], [200, 900], [999, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 10, 90, 101, 999, 2000, 3000, 4000],
- [[VIEW_L_WORLD, 101], [999, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 10, 90, 101, 200, 900, 999, 2000, 3000, 4000],
- [[VIEW_L_WORLD, 101], [200, 900], [999, VIEW_R_WORLD]]);
- });
-
- test('generateOdd', function() {
- // One VSync.
- testGenerateStripes([0], [[VIEW_L_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes([500], [[500, VIEW_R_WORLD]]);
- testGenerateStripes([1500], []);
-
- // Multiple VSyncs.
- testGenerateStripes([0, 10, 20], [[VIEW_L_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes([0, 500, 2000], [[VIEW_L_WORLD, 500]]);
- testGenerateStripes([0, 10, 500], [[500, VIEW_R_WORLD]]);
- testGenerateStripes([0, 10, 2000], []);
- testGenerateStripes(
- [0, 200, 500],
- [[VIEW_L_WORLD, 200], [500, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 200, 500, 900],
- [[VIEW_L_WORLD, 200], [500, 900]]);
- });
-
- test('generateBorder', function() {
- testGenerateStripes([0, VIEW_L_WORLD], [[VIEW_L_WORLD, VIEW_L_WORLD]]);
- testGenerateStripes(
- [VIEW_L_WORLD, VIEW_L_WORLD],
- [[VIEW_L_WORLD, VIEW_L_WORLD]]);
- testGenerateStripes(
- [VIEW_R_WORLD, 2000],
- [[VIEW_R_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [VIEW_R_WORLD, VIEW_R_WORLD],
- [[VIEW_R_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [VIEW_L_WORLD, VIEW_R_WORLD],
- [[VIEW_L_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [VIEW_L_WORLD, 200, 500, VIEW_R_WORLD],
- [[VIEW_L_WORLD, 200], [500, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, VIEW_L_WORLD, VIEW_R_WORLD, 2000],
- [[VIEW_L_WORLD, VIEW_L_WORLD], [VIEW_R_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, VIEW_L_WORLD, VIEW_R_WORLD, 2000],
- [[VIEW_L_WORLD, VIEW_L_WORLD], [VIEW_R_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, VIEW_L_WORLD, 200, 500, VIEW_R_WORLD, 2000],
- [[VIEW_L_WORLD, VIEW_L_WORLD], [200, 500],
- [VIEW_R_WORLD, VIEW_R_WORLD]]);
- testGenerateStripes(
- [0, 10, VIEW_L_WORLD, VIEW_R_WORLD, 2000, 3000],
- [[VIEW_L_WORLD, VIEW_R_WORLD]]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/lean_config.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/lean_config.html
deleted file mode 100644
index ba6ae9990d8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/lean_config.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-TODO(charliea): Make all UI files depend on tracing/ui/base/base.html in the same way that
-all non-UI files depend on tracing/base/base.html. Enforce this dependency with a presubmit.
--->
-<link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
-
-<link rel="import" href="/tracing/extras/lean_config.html" data-suppress-import-order>
-
-<!--
-The lean config is just enough to import uncompressed, trace-event-formatted
-json blobs.
--->
-<link rel="import" href="/tracing/ui/extras/highlighter/vsync_highlighter.html">
-<link rel="import" href="/tracing/ui/side_panel/file_size_stats_side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/metrics_side_panel.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html
deleted file mode 100644
index 0988f6367cc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/line_chart.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-
-<dom-module id='tr-ui-e-s-alerts-side-panel'>
- <template>
- <style>
- :host {
- display: block;
- width: 250px;
- }
- #content {
- flex-direction: column;
- display: flex;
- }
- tr-ui-b-table {
- font-size: 12px;
- }
- </style>
-
- <div id='content'>
- <toolbar id='toolbar'></toolbar>
- <result-area id='result_area'></result-area>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-e-s-alerts-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
-
- ready: function() {
- this.rangeOfInterest_ = new tr.b.Range();
- this.selection_ = undefined;
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
- },
-
- set selection(selection) {
- },
-
- set rangeOfInterest(rangeOfInterest) {
- },
-
- /**
- * Fires a selection event selecting all alerts of the specified
- * type.
- */
- selectAlertsOfType: function(alertTypeString) {
- var alertsOfType = this.model_.alerts.filter(function(alert) {
- return alert.title === alertTypeString;
- });
-
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = new tr.model.EventSet(alertsOfType);
- this.dispatchEvent(event);
- },
-
- /**
- * Returns a map for the specified alerts where each key is the
- * alert type string and each value is a list of alerts with that
- * type.
- */
- alertsByType_: function(alerts) {
- var alertsByType = {};
- alerts.forEach(function(alert) {
- if (!alertsByType[alert.title])
- alertsByType[alert.title] = [];
-
- alertsByType[alert.title].push(alert);
- });
- return alertsByType;
- },
-
- alertsTableRows_: function(alertsByType) {
- return Object.keys(alertsByType).map(function(key) {
- return {
- alertType: key,
- count: alertsByType[key].length
- };
- });
- },
-
- alertsTableColumns_: function() {
- return [
- {
- title: 'Alert type',
- value: function(row) { return row.alertType; },
- width: '180px'
- },
- {
- title: 'Count',
- width: '100%',
- value: function(row) { return row.count; }
- }
- ];
- },
-
- createAlertsTable_: function(alerts) {
- var alertsByType = this.alertsByType_(alerts);
-
- var table = document.createElement('tr-ui-b-table');
- table.tableColumns = this.alertsTableColumns_();
- table.tableRows = this.alertsTableRows_(alertsByType);
- table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- table.addEventListener('selection-changed', function(e) {
- var row = table.selectedTableRow;
- if (row)
- this.selectAlertsOfType(row.alertType);
- }.bind(this));
-
- return table;
- },
-
- updateContents_: function() {
- Polymer.dom(this.$.result_area).textContent = '';
- if (this.model_ === undefined)
- return;
-
- var panel = this.createAlertsTable_(this.model_.alerts);
- Polymer.dom(this.$.result_area).appendChild(panel);
- },
-
- supportsModel: function(m) {
- if (m === undefined) {
- return {
- supported: false,
- reason: 'Unknown tracing model'
- };
- } else if (m.alerts.length === 0) {
- return {
- supported: false,
- reason: 'No alerts in tracing model'
- };
- }
-
- return {
- supported: true
- };
- },
-
- get textLabel() {
- return 'Alerts';
- }
-});
-
-tr.ui.side_panel.SidePanelRegistry.register(function() {
- return document.createElement('tr-ui-e-s-alerts-side-panel');
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel_test.html
deleted file mode 100644
index 83ce91aca62..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/alerts_side_panel_test.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/alerts_side_panel.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ALERT_INFO_1 = new tr.model.EventInfo(
- 'Alert 1', 'Critical alert');
- var ALERT_INFO_2 = new tr.model.EventInfo(
- 'Alert 2', 'Warning alert');
-
- test('instantiate', function() {
- var panel = document.createElement('tr-ui-e-s-alerts-side-panel');
- panel.model = createModelWithAlerts([
- new tr.model.Alert(ALERT_INFO_1, 5),
- new tr.model.Alert(ALERT_INFO_2, 35)
- ]);
- panel.style.height = '100px';
-
- this.addHTMLOutput(panel);
- });
-
- test('selectAlertsOfType', function() {
- var panel = document.createElement('tr-ui-e-s-alerts-side-panel');
- var alerts = [
- new tr.model.Alert(ALERT_INFO_1, 1),
- new tr.model.Alert(ALERT_INFO_1, 2),
- new tr.model.Alert(ALERT_INFO_2, 3)
- ];
-
- var predictedAlerts = new tr.model.EventSet([alerts[0], alerts[1]]);
- panel.model = createModelWithAlerts(alerts);
- panel.style.height = '100px';
- this.addHTMLOutput(panel);
-
- var selectionChanged = false;
- panel.addEventListener('requestSelectionChange', function(e) {
- selectionChanged = true;
- assert.isTrue(e.selection.equals(predictedAlerts));
- });
- panel.selectAlertsOfType(ALERT_INFO_1.title);
-
- assert.isTrue(selectionChanged);
- });
-
- function createModelWithAlerts(alerts) {
- var m = new tr.Model();
- m.alerts = alerts;
- return m;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel.html
deleted file mode 100644
index f8ed34df15c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel.html
+++ /dev/null
@@ -1,340 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/frame_tree_node.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/render_frame.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/top_level.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-e-s-frame-data-side-panel'>
- <template>
- <style>
- :host {
- display: flex;
- width: 600px;
- flex-direction: column;
- }
- table-container {
- display: flex;
- overflow: auto;
- font-size: 12px;
- }
- </style>
- <div>
- Organize by:
- <select id="select">
- <option value="none">None</option>
- <option value="tree">Frame Tree</option>
- </select>
- </div>
- <table-container>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </table-container>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-tr.exportTo('tr.ui.e.s', function() {
- var BlameContextSnapshot = tr.e.chrome.BlameContextSnapshot;
- var FrameTreeNodeSnapshot = tr.e.chrome.FrameTreeNodeSnapshot;
- var RenderFrameSnapshot = tr.e.chrome.RenderFrameSnapshot;
- var TopLevelSnapshot = tr.e.chrome.TopLevelSnapshot;
-
- var BlameContextInstance = tr.e.chrome.BlameContextInstance;
- var FrameTreeNodeInstance = tr.e.chrome.FrameTreeNodeInstance;
- var RenderFrameInstance = tr.e.chrome.RenderFrameInstance;
- var TopLevelInstance = tr.e.chrome.TopLevelInstance;
-
- /**
- * @constructor
- * If |context| is provided, creates a row for the given context.
- * Otherwise, creates an empty Row template which can be used for aggregating
- * data from a group of subrows.
- */
- function Row(context) {
- this.subRows = undefined;
- this.contexts = [];
- this.type = undefined;
- this.renderer = 'N/A';
- this.url = undefined;
- this.time = 0;
- this.eventsOfInterest = new tr.model.EventSet();
-
- if (context === undefined)
- return;
-
- this.type = context.objectInstance.blameContextType;
- this.contexts.push(context);
- if (context instanceof FrameTreeNodeSnapshot) {
- if (context.renderFrame) {
- this.contexts.push(context.renderFrame);
- this.renderer = context.renderFrame.objectInstance.parent.pid;
- }
- } else if (context instanceof RenderFrameSnapshot) {
- if (context.frameTreeNode)
- this.contexts.push(context.frameTreeNode);
- this.renderer = context.objectInstance.parent.pid;
- } else if (context instanceof TopLevelSnapshot) {
- this.renderer = context.objectInstance.parent.pid;
- } else {
- throw new Error('Unknown context type');
- }
- this.eventsOfInterest.addEventSet(this.contexts);
-
- // TODO(xiaochengh): Handle the case where a subframe has a trivial url
- // (e.g., about:blank), but inherits the origin of its parent. This is not
- // needed now, but will be required if we want to group rows by origin.
- this.url = context.url;
- }
-
- var groupFunctions = {
- none: rows => rows,
-
- // Group the rows according to the frame tree structure.
- // Example: consider frame tree a(b, c(d)), where each frame has 1ms time
- // attributed to it. The resulting table should look like:
- // Type | Time | URL
- // --------------+------+-----
- // Frame Tree | 4 | a
- // +- Frame | 1 | a
- // +- Subframe | 1 | b
- // +- Frame Tree | 2 | c
- // +- Frame | 1 | c
- // +- Subframe | 1 | d
- tree: function(rows, rowMap) {
- // Finds the parent of a specific row. When there is conflict between the
- // browser's dump of the frame tree and the renderers', use the browser's.
- var getParentRow = function(row) {
- var pivot;
- row.contexts.forEach(function(context) {
- if (context instanceof tr.e.chrome.FrameTreeNodeSnapshot)
- pivot = context;
- });
- if (pivot && pivot.parentContext)
- return rowMap[pivot.parentContext.guid];
- return undefined;
- };
-
- var rootRows = [];
- rows.forEach(function(row) {
- var parentRow = getParentRow(row);
- if (parentRow === undefined) {
- rootRows.push(row);
- return;
- }
- if (parentRow.subRows === undefined)
- parentRow.subRows = [];
- parentRow.subRows.push(row);
- });
-
- var aggregateAllDescendants = function(row) {
- if (!row.subRows) {
- if (getParentRow(row))
- row.type = 'Subframe';
- return row;
- }
- var result = new Row();
- result.type = 'Frame Tree';
- result.renderer = row.renderer;
- result.url = row.url;
- result.subRows = [row];
- row.subRows.forEach(
- subRow => result.subRows.push(aggregateAllDescendants(subRow)));
- result.subRows.forEach(function(subRow) {
- result.time += subRow.time;
- result.eventsOfInterest.addEventSet(subRow.eventsOfInterest);
- });
- row.subRows = undefined;
- return result;
- };
-
- return rootRows.map(rootRow => aggregateAllDescendants(rootRow));
- }
-
- // TODO(xiaochengh): Add grouping by site and probably more...
- };
-
- Polymer({
- is: 'tr-ui-e-s-frame-data-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
- ready: function() {
- this.model_ = undefined;
- this.rangeOfInterest_ = new tr.b.Range();
-
- this.$.table.showHeader = true;
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- this.$.table.tableColumns = this.createFrameDataTableColumns_();
-
- this.$.table.addEventListener('selection-changed', function(e) {
- this.selectEventSet_(this.$.table.selectedTableRow.eventsOfInterest);
- }.bind(this));
-
- this.$.select.addEventListener('change', function(e) {
- this.updateContents_();
- }.bind(this));
- },
-
- selectEventSet_: function(eventSet) {
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = eventSet;
- this.dispatchEvent(event);
- },
-
- createFrameDataTableColumns_: function() {
- return [
- {
- title: 'Renderer',
- value: row => row.renderer,
- cmp: (a, b) => a.renderer - b.renderer
- },
- {
- title: 'Type',
- value: row => row.type
- },
- // TODO(xiaochengh): Decide what details to show in the table:
- // - URL seems necessary, but we may also want origin instead/both.
- // - Distinguish between browser time and renderer time?
- // - Distinguish between CPU time and wall clock time?
- // - Memory? Network? ...
- {
- title: 'Time',
- value: row => tr.v.ui.createScalarSpan(row.time, {
- unit: tr.b.Unit.byName.timeStampInMs,
- ownerDocument: this.ownerDocument
- }),
- cmp: (a, b) => a.time - b.time
- },
- {
- title: 'URL',
- value: row => row.url,
- cmp: (a, b) => (a.url || '').localeCompare(b.url || '')
- }
- ];
- },
-
- createFrameDataTableRows_: function() {
- if (!this.model_)
- return [];
-
- // Gather contexts into skeletons of rows.
- var rows = [];
- var rowMap = {};
- tr.b.iterItems(this.model_.processes, function(pid, process) {
- process.objects.iterObjectInstances(function(objectInstance) {
- if (!(objectInstance instanceof BlameContextInstance))
- return;
- objectInstance.snapshots.forEach(function(snapshot) {
- if (rowMap[snapshot.guid])
- return;
- var row = new Row(snapshot);
- row.contexts.forEach(context => rowMap[context.guid] = row);
- rows.push(row);
- }, this);
- }, this);
- }, this);
-
- // Find slices attributed to each row.
- // TODO(xiaochengh): We should implement a getter
- // BlameContextSnapshot.attributedEvents, instead of process the model in
- // a UI component.
- tr.b.iterItems(this.model_.processes, function(pid, process) {
- tr.b.iterItems(process.threads, function(tid, thread) {
- thread.sliceGroup.iterSlicesInTimeRange(function(topLevelSlice) {
- topLevelSlice.contexts.forEach(function(context) {
- if (!context.snapshot.guid || !rowMap[context.snapshot.guid])
- return;
- var row = rowMap[context.snapshot.guid];
- row.eventsOfInterest.push(topLevelSlice);
- row.time += topLevelSlice.selfTime || 0;
- });
- }, this.currentRangeOfInterest.min, this.currentRangeOfInterest.max);
- }, this);
- }, this);
-
- // Apply grouping to rows.
- var select = this.$.select;
- var groupOption = select.options[select.selectedIndex].value;
- var groupFunction = groupFunctions[groupOption];
- return groupFunction(rows, rowMap);
- },
-
- updateContents_: function() {
- this.$.table.tableRows = this.createFrameDataTableRows_();
- this.$.table.rebuild();
- },
-
- supportsModel: function(m) {
- if (!m) {
- return {
- supported: false,
- reason: 'No model available.'
- };
- }
-
- var ans = {supported: false};
- tr.b.iterItems(m.processes, function(pid, process) {
- process.objects.iterObjectInstances(function(instance) {
- if (instance instanceof BlameContextInstance)
- ans.supported = true;
- });
- }, this);
-
- if (!ans.supported)
- ans.reason = 'No frame data available';
- return ans;
- },
-
- get currentRangeOfInterest() {
- if (this.rangeOfInterest_.isEmpty)
- return this.model_.bounds;
- else
- return this.rangeOfInterest_;
- },
-
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- set rangeOfInterest(rangeOfInterest) {
- this.rangeOfInterest_ = rangeOfInterest;
- this.updateContents_();
- },
-
- get selection() {
- // Not applicable.
- },
-
- set selection(_) {
- // Not applicable.
- },
-
- get textLabel() {
- return 'Frame Data';
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
- }
- });
-
- tr.ui.side_panel.SidePanelRegistry.register(function() {
- return document.createElement('tr-ui-e-s-frame-data-side-panel');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel_test.html
deleted file mode 100644
index c9ec9ff025b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/frame_data_side_panel_test.html
+++ /dev/null
@@ -1,165 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/frame_tree_node.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/render_frame.html">
-<link rel="import" href="/tracing/extras/chrome/blame_context/top_level.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/frame_data_side_panel.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestUtils = tr.c.TestUtils;
-
- function topLevelOptions(pid, id) {
- return {
- pid: pid,
- id: id,
- cat: 'blink',
- scope: 'PlatformThread',
- name: 'TopLevel'
- };
- }
-
- function renderFrameOptions(pid, id, parent) {
- return {
- pid: pid,
- id: id,
- cat: 'blink',
- scope: 'RenderFrame',
- name: 'RenderFrame',
- args: {parent: {
- id_ref: parent.id,
- scope: parent.scope
- }}
- };
- }
-
- function frameTreeNodeOptions(pid, id, opt_renderFrame, opt_parentId) {
- var ans = {
- pid: pid,
- id: id,
- cat: 'navigation',
- scope: 'FrameTreeNode',
- name: 'FrameTreeNode',
- args: {}
- };
- if (opt_renderFrame) {
- ans.args.renderFrame = {
- id_ref: opt_renderFrame.id,
- pid_ref: opt_renderFrame.pid,
- scope: 'RenderFrame'
- };
- }
- if (opt_parentId) {
- ans.args.parent = {
- id_ref: opt_parentId,
- scope: 'FrameTreeNode'
- };
- }
- return ans;
- }
-
- /**
- * Creates some independent contexts. Checks if all are present in the panel.
- */
- test('basic', function() {
- var panel = document.createElement('tr-ui-e-s-frame-data-side-panel');
- panel.model = TestUtils.newModel(function(model) {
- TestUtils.newSnapshot(model, topLevelOptions(1, '0x1'));
- TestUtils.newSnapshot(model, renderFrameOptions(
- 1, '0x2', {id: '0x1', scope: 'PlatformThread'}));
- TestUtils.newSnapshot(model, frameTreeNodeOptions(
- 2, '0x3'));
- });
- assert.lengthOf(panel.$.table.tableRows, 3);
-
- this.addHTMLOutput(panel);
- });
-
- /**
- * Creates a FrameTreeNode in the browser process and a RenderFrame in a
- * renderer process that are the same frame. Checks if they are merged into
- * one row in the panel.
- */
- test('mergeCrossProcessFrameBlameContexts', function() {
- var panel = document.createElement('tr-ui-e-s-frame-data-side-panel');
- panel.model = TestUtils.newModel(function(model) {
- TestUtils.newSnapshot(model, topLevelOptions(1, '0x1'));
- TestUtils.newSnapshot(model, renderFrameOptions(
- 1, '0x2', {id: '0x1', scope: 'PlatformThread'}));
- TestUtils.newSnapshot(model, frameTreeNodeOptions(
- 2, '0x3', {id: '0x2', pid: 1}));
- });
- assert.lengthOf(panel.$.table.tableRows, 2);
-
- this.addHTMLOutput(panel);
- });
-
- function newAttributedSlice(model, pid, start, duration, context) {
- var slice = TestUtils.newSliceEx({start: start, duration: duration});
- slice.contexts = [{type: 'FrameBlameContext', snapshot: context}];
- model.getOrCreateProcess(pid).getOrCreateThread(1).sliceGroup.pushSlice(
- slice);
- return slice;
- }
-
- /**
- * Changes the range of interest. Checks if the panel updates correspondingly.
- */
- test('respondToRangeOfInterest', function() {
- var topLevel;
- var slice1;
- var slice2;
- var panel = document.createElement('tr-ui-e-s-frame-data-side-panel');
- panel.model = TestUtils.newModel(function(model) {
- topLevel = TestUtils.newSnapshot(model, topLevelOptions(1, '0x1'));
- slice1 = newAttributedSlice(model, 1, 1500, 500, topLevel);
- slice2 = newAttributedSlice(model, 1, 2500, 500, topLevel);
- });
-
- // The default range of interest contains both slices.
- assert.isTrue(panel.$.table.tableRows[0].eventsOfInterest.equals(
- new tr.model.EventSet([topLevel, slice1, slice2])));
-
- // The new range of interest contains only slice2.
- panel.rangeOfInterest = tr.b.Range.fromExplicitRange(slice2.start,
- slice2.end);
- assert.isTrue(panel.$.table.tableRows[0].eventsOfInterest.equals(
- new tr.model.EventSet([topLevel, slice2])));
-
- this.addHTMLOutput(panel);
- });
-
- /**
- * Selects a row in the panel. Checks if the context(s) of the row and the
- * slices attributed to the row are selected.
- */
- test('selectAttributedEvents', function() {
- var topLevel;
- var slice;
- var panel = document.createElement('tr-ui-e-s-frame-data-side-panel');
- panel.model = TestUtils.newModel(function(model) {
- topLevel = TestUtils.newSnapshot(model, topLevelOptions(1, '0x1'));
- slice = newAttributedSlice(model, 1, 1500, 500, topLevel);
- });
-
- var selectionChanged = false;
- panel.addEventListener('requestSelectionChange', function(e) {
- selectionChanged = true;
- assert.isTrue(
- e.selection.equals(new tr.model.EventSet([topLevel, slice])));
- });
- panel.$.table.selectedTableRow = panel.$.table.tableRows[0];
- assert.isTrue(selectionChanged);
-
- this.addHTMLOutput(panel);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel.html
deleted file mode 100644
index 7375c09e050..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel.html
+++ /dev/null
@@ -1,334 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/line_chart.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-
-<dom-module id='tr-ui-e-s-input-latency-side-panel'>
- <template>
- <style>
- :host {
- flex-direction: column;
- display: flex;
- }
- toolbar {
- flex: 0 0 auto;
- border-bottom: 1px solid black;
- display: flex;
- }
- result-area {
- flex: 1 1 auto;
- display: block;
- min-height: 0;
- overflow-y: auto;
- }
- </style>
-
- <toolbar id='toolbar'></toolbar>
- <result-area id='result_area'></result-area>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-e-s-input-latency-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
-
- ready: function() {
- this.rangeOfInterest_ = new tr.b.Range();
- this.frametimeType_ = tr.model.helpers.IMPL_FRAMETIME_TYPE;
- this.latencyChart_ = undefined;
- this.frametimeChart_ = undefined;
- this.selectedProcessId_ = undefined;
- this.mouseDownIndex_ = undefined;
- this.curMouseIndex_ = undefined;
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- if (this.model_) {
- this.modelHelper_ = this.model_.getOrCreateHelper(
- tr.model.helpers.ChromeModelHelper);
- } else {
- this.modelHelper_ = undefined;
- }
-
- this.updateToolbar_();
- this.updateContents_();
- },
-
- get frametimeType() {
- return this.frametimeType_;
- },
-
- set frametimeType(type) {
- if (this.frametimeType_ === type)
- return;
- this.frametimeType_ = type;
- this.updateContents_();
- },
-
- get selectedProcessId() {
- return this.selectedProcessId_;
- },
-
- set selectedProcessId(process) {
- if (this.selectedProcessId_ === process)
- return;
- this.selectedProcessId_ = process;
- this.updateContents_();
- },
-
- set selection(selection) {
- if (this.latencyChart_ === undefined)
- return;
- this.latencyChart_.brushedRange = selection.bounds;
- },
-
- // This function is for testing purpose.
- setBrushedIndices: function(mouseDownIndex, curIndex) {
- this.mouseDownIndex_ = mouseDownIndex;
- this.curMouseIndex_ = curIndex;
- this.updateBrushedRange_();
- },
-
- updateBrushedRange_: function() {
- if (this.latencyChart_ === undefined)
- return;
-
- var r = new tr.b.Range();
- if (this.mouseDownIndex_ === undefined) {
- this.latencyChart_.brushedRange = r;
- return;
- }
- r = this.latencyChart_.computeBrushRangeFromIndices(
- this.mouseDownIndex_, this.curMouseIndex_);
- this.latencyChart_.brushedRange = r;
-
- // Based on the brushed range, update the selection of LatencyInfo in
- // the timeline view by sending a selectionChange event.
- var latencySlices = [];
- for (var thread of this.model_.getAllThreads())
- for (var event of thread.getDescendantEvents())
- if (event.title.indexOf('InputLatency:') === 0)
- latencySlices.push(event);
- latencySlices = tr.model.helpers.getSlicesIntersectingRange(
- r, latencySlices);
-
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = new tr.model.EventSet(latencySlices);
- this.latencyChart_.dispatchEvent(event);
- },
-
- registerMouseEventForLatencyChart_: function() {
- this.latencyChart_.addEventListener('item-mousedown', function(e) {
- this.mouseDownIndex_ = e.index;
- this.curMouseIndex_ = e.index;
- this.updateBrushedRange_();
- }.bind(this));
-
- this.latencyChart_.addEventListener('item-mousemove', function(e) {
- if (e.button === undefined)
- return;
- this.curMouseIndex_ = e.index;
- this.updateBrushedRange_();
- }.bind(this));
-
- this.latencyChart_.addEventListener('item-mouseup', function(e) {
- this.curMouseIndex = e.index;
- this.updateBrushedRange_();
- }.bind(this));
- },
-
- updateToolbar_: function() {
- var browserProcess = this.modelHelper_.browserProcess;
- var labels = [];
-
- if (browserProcess !== undefined) {
- var labelStr = 'Browser: ' + browserProcess.pid;
- labels.push({label: labelStr, value: browserProcess.pid});
- }
-
- tr.b.iterItems(this.modelHelper_.rendererHelpers,
- function(pid, rendererHelper) {
- var rendererProcess = rendererHelper.process;
- var labelStr = 'Renderer: ' + rendererProcess.userFriendlyName;
- labels.push({label: labelStr, value: rendererProcess.userFriendlyName
- });
- }, this);
-
- if (labels.length === 0)
- return;
-
- this.selectedProcessId_ = labels[0].value;
- var toolbarEl = this.$.toolbar;
- Polymer.dom(toolbarEl).appendChild(tr.ui.b.createSelector(
- this, 'frametimeType',
- 'inputLatencySidePanel.frametimeType', this.frametimeType_,
- [{label: 'Main Thread Frame Times',
- value: tr.model.helpers.MAIN_FRAMETIME_TYPE},
- {label: 'Impl Thread Frame Times',
- value: tr.model.helpers.IMPL_FRAMETIME_TYPE}
- ]));
- Polymer.dom(toolbarEl).appendChild(tr.ui.b.createSelector(
- this, 'selectedProcessId',
- 'inputLatencySidePanel.selectedProcessId',
- this.selectedProcessId_,
- labels));
- },
-
- // TODO(charliea): Delete this function in favor of rangeOfInterest.
- get currentRangeOfInterest() {
- if (this.rangeOfInterest_.isEmpty)
- return this.model_.bounds;
- else
- return this.rangeOfInterest_;
- },
-
- createLatencyLineChart: function(data, title) {
- var chart = new tr.ui.b.LineChart();
- var width = 600;
- if (document.body.clientWidth !== undefined)
- width = document.body.clientWidth * 0.5;
- chart.setSize({width: width, height: chart.height});
- chart.chartTitle = title;
- chart.data = data;
- return chart;
- },
-
- updateContents_: function() {
- var resultArea = this.$.result_area;
- this.latencyChart_ = undefined;
- this.frametimeChart_ = undefined;
- Polymer.dom(resultArea).textContent = '';
-
- if (this.modelHelper_ === undefined)
- return;
-
- var rangeOfInterest = this.currentRangeOfInterest;
-
- var chromeProcess;
- if (this.modelHelper_.rendererHelpers[this.selectedProcessId_])
- chromeProcess = this.modelHelper_.rendererHelpers[
- this.selectedProcessId_
- ];
- else
- chromeProcess = this.modelHelper_.browserHelper;
-
- var frameEvents = chromeProcess.getFrameEventsInRange(
- this.frametimeType, rangeOfInterest);
-
- var frametimeData = tr.model.helpers.getFrametimeDataFromEvents(
- frameEvents);
- var averageFrametime = tr.b.Statistics.mean(frametimeData, function(d) {
- return d.frametime;
- });
-
- var latencyEvents = this.modelHelper_.browserHelper.
- getLatencyEventsInRange(
- rangeOfInterest);
-
- var latencyData = [];
- latencyEvents.forEach(function(event) {
- if (event.inputLatency === undefined)
- return;
- latencyData.push({
- x: event.start,
- latency: event.inputLatency / 1000
- });
- });
-
- var averageLatency = tr.b.Statistics.mean(latencyData, function(d) {
- return d.latency;
- });
-
- // Create summary.
- var latencySummaryText = document.createElement('div');
- Polymer.dom(latencySummaryText).appendChild(tr.ui.b.createSpan({
- textContent: 'Average Latency ' + averageLatency + ' ms',
- bold: true}));
- Polymer.dom(resultArea).appendChild(latencySummaryText);
-
- var frametimeSummaryText = document.createElement('div');
- Polymer.dom(frametimeSummaryText).appendChild(tr.ui.b.createSpan({
- textContent: 'Average Frame Time ' + averageFrametime + ' ms',
- bold: true}));
- Polymer.dom(resultArea).appendChild(frametimeSummaryText);
-
- if (latencyData.length !== 0) {
- this.latencyChart_ = this.createLatencyLineChart(
- latencyData, 'Latency Over Time');
- this.registerMouseEventForLatencyChart_();
- Polymer.dom(resultArea).appendChild(this.latencyChart_);
- }
-
- if (frametimeData.length !== 0) {
- this.frametimeChart_ = this.createLatencyLineChart(
- frametimeData, 'Frame Times');
- Polymer.dom(resultArea).appendChild(this.frametimeChart_);
- }
- },
-
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- set rangeOfInterest(rangeOfInterest) {
- this.rangeOfInterest_ = rangeOfInterest;
- this.updateContents_();
- },
-
- supportsModel: function(m) {
- if (m === undefined) {
- return {
- supported: false,
- reason: 'Unknown tracing model'
- };
- }
-
- if (!tr.model.helpers.ChromeModelHelper.supportsModel(m)) {
- return {
- supported: false,
- reason: 'No Chrome browser or renderer process found'
- };
- }
-
- var modelHelper = m.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);
- if (modelHelper.browserHelper &&
- modelHelper.browserHelper.hasLatencyEvents) {
- return {
- supported: true
- };
- }
-
- return {
- supported: false,
- reason: 'No InputLatency events trace. Consider enabling ' +
- 'benchmark" and "input" category when recording the trace'
- };
- },
-
- get textLabel() {
- return 'Input Latency';
- }
-});
-
-tr.ui.side_panel.SidePanelRegistry.register(function() {
- return document.createElement('tr-ui-e-s-input-latency-side-panel');
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel_test.html
deleted file mode 100644
index 417c171b977..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/input_latency_side_panel_test.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/input_latency_side_panel.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var latencyData = [
- {
- x: 1000,
- latency: 16
- },
- {
- x: 2000,
- latency: 17
- },
- {
- x: 3000,
- latency: 14
- },
- {
- x: 4000,
- latency: 23
- }
- ];
- var lc = document.createElement('tr-ui-e-s-input-latency-side-panel');
- var latencyChart = lc.createLatencyLineChart(latencyData, 'latency');
- this.addHTMLOutput(latencyChart);
-
- var frametimeData = [
- {
- x: 1000,
- frametime: 16
- },
- {
- x: 2000,
- frametime: 17
- },
- {
- x: 3000,
- frametime: 14
- },
- {
- x: 4000,
- frametime: 23
- }
- ];
- var lc = document.createElement('tr-ui-e-s-input-latency-side-panel');
- var frametimeChart = lc.createLatencyLineChart(frametimeData, 'frametime');
- this.addHTMLOutput(frametimeChart);
- });
-
- test('brushedRangeChange', function() {
- var events = [];
- for (var i = 0; i < 10; i++) {
- var startTs = i * 10000;
- var endTs = startTs + 1000 * (i % 2);
- events.push(
- {
- 'cat': 'benchmark',
- 'pid': 3507,
- 'tid': 3507,
- 'ts': startTs,
- 'ph': 'S',
- 'name': 'InputLatency',
- 'id': i
- });
- events.push(
- {
- 'cat': 'benchmark',
- 'pid': 3507,
- 'tid': 3507,
- 'ts': endTs,
- 'ph': 'T',
- 'name': 'InputLatency',
- 'args': {'step': 'GestureScrollUpdate'},
- 'id': i
- });
- events.push(
- {
- 'cat': 'benchmark',
- 'pid': 3507,
- 'tid': 3507,
- 'ts': endTs,
- 'ph': 'F',
- 'name': 'InputLatency',
- 'args': {
- 'data': {
- 'INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT': {
- 'time': startTs
- },
- 'INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT': {
- 'time': endTs
- }
- }
- },
- 'id': i
- });
- }
- events.push({'cat': '__metadata',
- 'pid': 3507,
- 'tid': 3507,
- 'ts': 0,
- 'ph': 'M',
- 'name': 'thread_name',
- 'args': {'name': 'CrBrowserMain'}});
-
- var panel = document.createElement('tr-ui-e-s-input-latency-side-panel');
- this.addHTMLOutput(panel);
-
- var selectionChanged = false;
-
- panel.model = tr.c.TestUtils.newModelWithEvents([events]);
- function listener(e) {
- selectionChanged = true;
- assert.equal(e.selection.length, 3);
- var predictedStarts = [20, 31, 40];
- var i = 0;
- for (var event of e.selection)
- assert.equal(event.start, predictedStarts[i++]);
- }
- panel.ownerDocument.addEventListener('requestSelectionChange', listener);
- try {
- panel.setBrushedIndices(2, 4);
- } finally {
- panel.ownerDocument.removeEventListener(
- 'requestSelectionChange', listener);
- }
- assert.isTrue(selectionChanged);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel.html
deleted file mode 100644
index 7391d050ced..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel.html
+++ /dev/null
@@ -1,440 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/pie_chart.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-e-s-time-summary-side-panel'>
- <template>
- <style>
- :host {
- flex-direction: column;
- display: flex;
- }
- toolbar {
- flex: 0 0 auto;
- border-bottom: 1px solid black;
- display: flex;
- }
- result-area {
- flex: 1 1 auto;
- display: block;
- min-height: 0;
- overflow-y: auto;
- }
- </style>
-
- <toolbar id='toolbar'></toolbar>
- <result-area id='result_area'></result-area>
- </template>
-</dom-module>
-<script>
-'use strict';
-(function() {
- var GROUP_BY_PROCESS_NAME = 'process';
- var GROUP_BY_THREAD_NAME = 'thread';
-
- var WALL_TIME_GROUPING_UNIT = 'Wall time';
- var CPU_TIME_GROUPING_UNIT = 'CPU time';
-
- /**
- * @constructor
- */
- function ResultsForGroup(model, name) {
- this.model = model;
- this.name = name;
- this.topLevelSlices = [];
- this.allSlices = [];
- }
-
- ResultsForGroup.prototype = {
- get wallTime() {
- var wallSum = tr.b.Statistics.sum(
- this.topLevelSlices, function(x) { return x.duration; });
- return wallSum;
- },
-
- get cpuTime() {
- var cpuDuration = 0;
- for (var i = 0; i < this.topLevelSlices.length; i++) {
- var x = this.topLevelSlices[i];
- // Only report thread-duration if we have it for all events.
- //
- // A thread_duration of 0 is valid, so this only returns 0 if it is
- // None.
- if (x.cpuDuration === undefined) {
- if (x.duration === undefined)
- continue;
- return 0;
- }
- cpuDuration += x.cpuDuration;
- }
- return cpuDuration;
- },
-
- appendGroupContents: function(group) {
- if (group.model !== this.model)
- throw new Error('Models must be the same');
-
- group.allSlices.forEach(function(slice) {
- this.allSlices.push(slice);
- }, this);
- group.topLevelSlices.forEach(function(slice) {
- this.topLevelSlices.push(slice);
- }, this);
- },
-
- appendThreadSlices: function(rangeOfInterest, thread) {
- var tmp = this.getSlicesIntersectingRange(
- rangeOfInterest, thread.sliceGroup.slices);
- tmp.forEach(function(slice) {
- this.allSlices.push(slice);
- }, this);
- tmp = this.getSlicesIntersectingRange(
- rangeOfInterest, thread.sliceGroup.topLevelSlices);
- tmp.forEach(function(slice) {
- this.topLevelSlices.push(slice);
- }, this);
- },
-
- getSlicesIntersectingRange: function(rangeOfInterest, slices) {
- var slicesInFilterRange = [];
- for (var i = 0; i < slices.length; i++) {
- var slice = slices[i];
- if (rangeOfInterest.intersectsExplicitRangeInclusive(
- slice.start, slice.end))
- slicesInFilterRange.push(slice);
- }
- return slicesInFilterRange;
- }
- };
-
- Polymer({
- is: 'tr-ui-e-s-time-summary-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
- ready: function() {
- this.rangeOfInterest_ = new tr.b.Range();
- this.selection_ = undefined;
- this.groupBy_ = GROUP_BY_PROCESS_NAME;
- this.groupingUnit_ = CPU_TIME_GROUPING_UNIT;
- this.showCpuIdleTime_ = true;
- this.chart_ = undefined;
-
- var toolbarEl = this.$.toolbar;
- this.groupBySelector_ = tr.ui.b.createSelector(
- this, 'groupBy',
- 'timeSummarySidePanel.groupBy', this.groupBy_,
- [{label: 'Group by process', value: GROUP_BY_PROCESS_NAME},
- {label: 'Group by thread', value: GROUP_BY_THREAD_NAME}
- ]);
- Polymer.dom(toolbarEl).appendChild(this.groupBySelector_);
-
- this.groupingUnitSelector_ = tr.ui.b.createSelector(
- this, 'groupingUnit',
- 'timeSummarySidePanel.groupingUnit', this.groupingUnit_,
- [{label: 'Wall time', value: WALL_TIME_GROUPING_UNIT},
- {label: 'CPU time', value: CPU_TIME_GROUPING_UNIT}
- ]);
- Polymer.dom(toolbarEl).appendChild(this.groupingUnitSelector_);
-
- this.showCpuIdleTimeCheckbox_ = tr.ui.b.createCheckBox(
- this, 'showCpuIdleTime',
- 'timeSummarySidePanel.showCpuIdleTime', this.showCpuIdleTime_,
- 'Show CPU idle time');
- Polymer.dom(toolbarEl).appendChild(this.showCpuIdleTimeCheckbox_);
- this.updateShowCpuIdleTimeCheckboxVisibility_();
- },
-
- /**
- * This function takes an array of groups and merges smaller groups into
- * the provided 'Other' group item such that the remaining items are ready
- * for pie-chart consumption. Otherwise, the pie chart gets overwhelmed
- * with tons of little slices.
- */
- trimPieChartData: function(groups, otherGroup, getValue, opt_extraValue) {
- // Copy the array so it can be mutated.
- groups = groups.filter(function(d) {
- return getValue(d) !== 0;
- });
-
- // Figure out total array range.
- var sum = tr.b.Statistics.sum(groups, getValue);
- if (opt_extraValue !== undefined)
- sum += opt_extraValue;
-
- // Sort by value.
- function compareByValue(a, b) {
- return getValue(a) - getValue(b);
- }
- groups.sort(compareByValue);
-
- // Now start fusing elements until none are less than threshold in size.
- var thresshold = 0.1 * sum;
- while (groups.length > 1) {
- var group = groups[0];
- if (getValue(group) >= thresshold)
- break;
-
- var v = getValue(group);
- if (v + getValue(otherGroup) > thresshold)
- break;
-
- // Remove the group from the list and add it to the 'Other' group.
- groups.splice(0, 1);
- otherGroup.appendGroupContents(group);
- }
-
- // Final return.
- if (getValue(otherGroup) > 0)
- groups.push(otherGroup);
-
- groups.sort(compareByValue);
-
- return groups;
- },
-
- generateResultsForGroup: function(model, name) {
- return new ResultsForGroup(model, name);
- },
-
- createPieChartFromResultGroups: function(
- groups, title, getValue, opt_extraData) {
- var chart = new tr.ui.b.PieChart();
-
- function pushDataForGroup(data, resultsForGroup, value) {
- data.push({
- label: resultsForGroup.name,
- value: value,
- valueText: tr.b.Unit.byName.timeDurationInMs.format(value),
- resultsForGroup: resultsForGroup
- });
- }
- chart.addEventListener('item-click', function(clickEvent) {
- var resultsForGroup = clickEvent.data.resultsForGroup;
- if (resultsForGroup === undefined)
- return;
-
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = new tr.model.EventSet(resultsForGroup.allSlices);
- event.selection.timeSummaryGroupName = resultsForGroup.name;
- chart.dispatchEvent(event);
- });
-
-
- // Build chart data.
- var data = [];
- groups.forEach(function(resultsForGroup) {
- var value = getValue(resultsForGroup);
- if (value === 0)
- return;
- pushDataForGroup(data, resultsForGroup, value);
- });
- if (opt_extraData)
- data.push.apply(data, opt_extraData);
-
- chart.chartTitle = title;
- chart.data = data;
- return chart;
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
- },
-
- get groupBy() {
- return groupBy_;
- },
-
- set groupBy(groupBy) {
- this.groupBy_ = groupBy;
- if (this.groupBySelector_)
- this.groupBySelector_.selectedValue = groupBy;
- this.updateContents_();
- },
-
- get groupingUnit() {
- return groupingUnit_;
- },
-
- set groupingUnit(groupingUnit) {
- this.groupingUnit_ = groupingUnit;
- if (this.groupingUnitSelector_)
- this.groupingUnitSelector_.selectedValue = groupingUnit;
- this.updateShowCpuIdleTimeCheckboxVisibility_();
- this.updateContents_();
- },
-
- get showCpuIdleTime() {
- return this.showCpuIdleTime_;
- },
-
- set showCpuIdleTime(showCpuIdleTime) {
- this.showCpuIdleTime_ = showCpuIdleTime;
- if (this.showCpuIdleTimeCheckbox_)
- this.showCpuIdleTimeCheckbox_.checked = showCpuIdleTime;
- this.updateContents_();
- },
-
- updateShowCpuIdleTimeCheckboxVisibility_: function() {
- if (!this.showCpuIdleTimeCheckbox_)
- return;
- var visible = this.groupingUnit_ === CPU_TIME_GROUPING_UNIT;
- if (visible)
- this.showCpuIdleTimeCheckbox_.style.display = '';
- else
- this.showCpuIdleTimeCheckbox_.style.display = 'none';
- },
-
- getGroupNameForThread_: function(thread) {
- if (this.groupBy_ === GROUP_BY_THREAD_NAME)
- return thread.name ? thread.name : thread.userFriendlyName;
-
- if (this.groupBy_ === GROUP_BY_PROCESS_NAME)
- return thread.parent.userFriendlyName;
- },
-
- updateContents_: function() {
- var resultArea = this.$.result_area;
- this.chart_ = undefined;
- Polymer.dom(resultArea).textContent = '';
-
- if (this.model_ === undefined)
- return;
-
- var rangeOfInterest;
- if (this.rangeOfInterest_.isEmpty)
- rangeOfInterest = this.model_.bounds;
- else
- rangeOfInterest = this.rangeOfInterest_;
-
- var allGroup = this.generateResultsForGroup(this.model_, 'all');
- var resultsByGroupName = {};
- this.model_.getAllThreads().forEach(function(thread) {
- var groupName = this.getGroupNameForThread_(thread);
- if (resultsByGroupName[groupName] === undefined) {
- resultsByGroupName[groupName] = this.generateResultsForGroup(
- this.model_, groupName);
- }
- resultsByGroupName[groupName].appendThreadSlices(
- rangeOfInterest, thread);
-
- allGroup.appendThreadSlices(rangeOfInterest, thread);
- }, this);
-
- // Helper function for working with the produced group.
- var getValueFromGroup = function(group) {
- if (this.groupingUnit_ === WALL_TIME_GROUPING_UNIT)
- return group.wallTime;
- return group.cpuTime;
- }.bind(this);
-
- // Create summary.
- var summaryText = document.createElement('div');
- Polymer.dom(summaryText).appendChild(tr.ui.b.createSpan({
- textContent: 'Total ' + this.groupingUnit_ + ': ',
- bold: true}));
- Polymer.dom(summaryText).appendChild(tr.v.ui.createScalarSpan(
- getValueFromGroup(allGroup), {
- unit: tr.b.Unit.byName.timeDurationInMs,
- ownerDocument: this.ownerDocument
- }));
- Polymer.dom(resultArea).appendChild(summaryText);
-
- // If needed, add in the idle time.
- var extraValue = 0;
- var extraData = [];
- if (this.showCpuIdleTime_ &&
- this.groupingUnit_ === CPU_TIME_GROUPING_UNIT &&
- this.model.kernel.bestGuessAtCpuCount !== undefined) {
- var maxCpuTime = rangeOfInterest.range *
- this.model.kernel.bestGuessAtCpuCount;
- var idleTime = Math.max(0, maxCpuTime - allGroup.cpuTime);
- extraData.push({
- label: 'CPU Idle',
- value: idleTime,
- valueText: tr.b.Unit.byName.timeDurationInMs.format(idleTime)
- });
- extraValue += idleTime;
- }
-
- // Create the actual chart.
- var otherGroup = this.generateResultsForGroup(this.model_, 'Other');
- var groups = this.trimPieChartData(
- tr.b.dictionaryValues(resultsByGroupName),
- otherGroup,
- getValueFromGroup,
- extraValue);
-
- if (groups.length === 0) {
- Polymer.dom(resultArea).appendChild(
- tr.ui.b.createSpan({textContent: 'No data'}));
- return undefined;
- }
-
- this.chart_ = this.createPieChartFromResultGroups(
- groups,
- this.groupingUnit_ + ' breakdown by ' + this.groupBy_,
- getValueFromGroup, extraData);
- Polymer.dom(resultArea).appendChild(this.chart_);
-
- this.chart_.addEventListener('click', function() {
- var event = new tr.model.RequestSelectionChangeEvent();
- event.selection = new tr.c.EventSet([]);
- this.dispatchEvent(event);
- });
- this.chart_.setSize(this.chart_.getMinSize());
- },
-
- get selection() {
- return selection_;
- },
-
- set selection(selection) {
- this.selection_ = selection;
-
- if (this.chart_ === undefined)
- return;
-
- if (selection.timeSummaryGroupName)
- this.chart_.highlightedLegendKey = selection.timeSummaryGroupName;
- else
- this.chart_.highlightedLegendKey = undefined;
- },
-
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- set rangeOfInterest(rangeOfInterest) {
- this.rangeOfInterest_ = rangeOfInterest;
- this.updateContents_();
- },
-
- supportsModel: function(model) {
- return {
- supported: false
- };
- },
-
- get textLabel() {
- return 'Time Summary';
- }
- });
-}());
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel_test.html
deleted file mode 100644
index 789093fd9b1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/side_panel/time_summary_side_panel_test.html
+++ /dev/null
@@ -1,206 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/time_summary_side_panel.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function createModel(opt_options) {
- var options = opt_options || {};
- var m = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(m) {
- if (options.provideSoftwareMeasuredCpuCount)
- m.kernel.softwareMeasuredCpuCount = 2;
-
- var browserProcess = m.getOrCreateProcess(1);
- var browserMain = browserProcess.getOrCreateThread(2);
- browserMain.name = 'CrBrowserMain';
- browserMain.sliceGroup.beginSlice('cat', 'Task', 0, undefined, 0);
- browserMain.sliceGroup.endSlice(10, 9);
- browserMain.sliceGroup.beginSlice('cat', 'Task', 20, undefined, 10);
- browserMain.sliceGroup.endSlice(30, 20);
-
- var rendererProcess = m.getOrCreateProcess(4);
- var rendererMain = rendererProcess.getOrCreateThread(5);
- rendererMain.name = 'CrRendererMain';
- rendererMain.sliceGroup.beginSlice('cat', 'Task', 0, undefined, 0);
- rendererMain.sliceGroup.endSlice(30, 25);
- rendererMain.sliceGroup.beginSlice('cat', 'Task', 40, undefined, 40);
- rendererMain.sliceGroup.endSlice(60, 50);
- }
- });
- return m;
- }
-
- test('group', function() {
- var ts = document.createElement('tr-ui-e-s-time-summary-side-panel');
- var m = createModel();
- var group = ts.generateResultsForGroup(m, 'foo');
- group.appendThreadSlices(m.bounds, m.processes[1].threads[2]);
- assert.equal(group.wallTime, 20);
- assert.equal(group.cpuTime, 19);
- });
-
- test('trim', function() {
- var groupData = [
- {
- value: 2.854999999999997,
- label: '156959'
- },
- {
- value: 9.948999999999998,
- label: '16131'
- },
- {
- value: 42.314000000000725,
- label: '51511'
- },
- {
- value: 31.06900000000028,
- label: 'AudioOutputDevice'
- },
- {
- value: 1.418,
- label: 'BrowserBlockingWorker2/50951'
- },
- {
- value: 0.044,
- label: 'BrowserBlockingWorker3/50695'
- },
- {
- value: 18.52599999999993,
- label: 'Chrome_ChildIOThread'
- },
- {
- value: 2.888,
- label: 'Chrome_FileThread'
- },
- {
- value: 0.067,
- label: 'Chrome_HistoryThread'
- },
- {
- value: 25.421000000000046,
- label: 'Chrome_IOThread'
- },
- {
- value: 0.019,
- label: 'Chrome_ProcessLauncherThread'
- },
- {
- value: 643.087999999995,
- label: 'Compositor'
- },
- {
- value: 4.049999999999973,
- label: 'CompositorRasterWorker1/22031'
- },
- {
- value: 50.040000000000106,
- label: 'CrBrowserMain'
- },
- {
- value: 1256.5130000000042,
- label: 'CrGpuMain'
- },
- {
- value: 5502.19499999999,
- label: 'CrRendererMain'
- },
- {
- value: 15.552999999999862,
- label: 'FFmpegDemuxer'
- },
- {
- value: 63.706000000001524,
- label: 'Media'
- },
- {
- value: 2.7419999999999987,
- label: 'PowerSaveBlocker'
- },
- {
- value: 0.11500000000000005,
- label: 'Watchdog'
- }
- ];
-
- var ts = document.createElement('tr-ui-e-s-time-summary-side-panel');
-
- var groups = [];
- var m = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(m) {
- var start = 0;
- groupData.forEach(function(groupData) {
- var group = ts.generateResultsForGroup(m, groupData.label);
-
- var slice = tr.c.TestUtils.newSliceEx(
- {title: groupData.label,
- start: start, duration: groupData.value});
- start += groupData.value;
- group.allSlices.push(slice);
- group.topLevelSlices.push(slice);
-
- groups.push(group);
- });
- }
- });
-
- function getValueFromGroup(d) { return d.wallTime; }
-
- var otherGroup = ts.generateResultsForGroup(m, 'Other');
- var newGroups = ts.trimPieChartData(groups, otherGroup, getValueFromGroup);
-
- // Visualize the data once its trimmed.
- var ce = document.createElement('tr-ui-e-s-time-summary-side-panel');
- var chart = ce.createPieChartFromResultGroups(
- newGroups, 'Trimmed', getValueFromGroup);
- this.addHTMLOutput(chart);
- chart.setSize(chart.getMinSize());
- });
-
- test('basicInWallTimeMode', function() {
- var m = createModel();
-
- var panel = document.createElement('tr-ui-e-s-time-summary-side-panel');
- this.addHTMLOutput(panel);
- panel.model = m;
- panel.groupingUnit = 'Wall time';
- panel.style.border = '1px solid black';
- });
-
- test('basicInCpuTimeModeButNoCpuData', function() {
- var m = createModel();
-
- var panel = document.createElement('tr-ui-e-s-time-summary-side-panel');
- this.addHTMLOutput(panel);
- panel.model = m;
- panel.groupingUnit = 'CPU time';
- panel.style.border = '1px solid black';
- });
-
- test('basicInCpuTimeModeAndCpuData', function() {
- var m = createModel({
- provideSoftwareMeasuredCpuCount: true
- });
-
- var panel = document.createElement('tr-ui-e-s-time-summary-side-panel');
- this.addHTMLOutput(panel);
- panel.model = m;
- panel.groupingUnit = 'CPU time';
- panel.style.border = '1px solid black';
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats.html
deleted file mode 100644
index 97562f96419..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/system_stats/system_stats_snapshot.html">
-<link rel="import"
- href="/tracing/ui/extras/system_stats/system_stats_snapshot_view.html">
-<link rel="import"
- href="/tracing/ui/extras/system_stats/system_stats_instance_track.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.css
deleted file mode 100644
index 40096f5497c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.css
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.tr-ui-e-system-stats-instance-track {
- height: 500px;
-}
-
-.tr-ui-e-system-stats-instance-track ul {
- list-style: none;
- list-style-position: outside;
- margin: 0;
- overflow: hidden;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.html
deleted file mode 100644
index 2e096b65ec9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track.html
+++ /dev/null
@@ -1,355 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet"
- href="/tracing/ui/extras/system_stats/system_stats_instance_track.css">
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/ui/base/event_presenter.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/object_instance_track.html">
-<link rel="import" href="/tracing/ui/tracks/stacked_bars_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.system_stats', function() {
- var EventPresenter = tr.ui.b.EventPresenter;
-
- var statCount;
-
- var excludedStats = {'meminfo': {
- 'pswpin': 0,
- 'pswpout': 0,
- 'pgmajfault': 0},
- 'diskinfo': {
- 'io': 0,
- 'io_time': 0,
- 'read_time': 0,
- 'reads': 0,
- 'reads_merged': 0,
- 'sectors_read': 0,
- 'sectors_written': 0,
- 'weighted_io_time': 0,
- 'write_time': 0,
- 'writes': 0,
- 'writes_merged': 0},
- 'swapinfo': {}
- };
-
- /**
- * Tracks that display system stats data.
- *
- * @constructor
- * @extends {StackedBarsTrack}
- */
-
- var SystemStatsInstanceTrack = tr.ui.b.define(
- 'tr-ui-e-system-stats-instance-track', tr.ui.tracks.StackedBarsTrack);
-
- SystemStatsInstanceTrack.prototype = {
-
- __proto__: tr.ui.tracks.StackedBarsTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.StackedBarsTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('tr-ui-e-system-stats-instance-track');
- this.objectInstance_ = null;
- },
-
- set objectInstances(objectInstances) {
- if (!objectInstances) {
- this.objectInstance_ = [];
- return;
- }
- if (objectInstances.length !== 1)
- throw new Error('Bad object instance count.');
- this.objectInstance_ = objectInstances[0];
- if (this.objectInstance_ !== null) {
- this.computeRates_(this.objectInstance_.snapshots);
- this.maxStats_ = this.computeMaxStats_(
- this.objectInstance_.snapshots);
- }
- },
-
- computeRates_: function(snapshots) {
- for (var i = 0; i < snapshots.length; i++) {
- var snapshot = snapshots[i];
- var stats = snapshot.getStats();
- var prevSnapshot;
- var prevStats;
-
- if (i === 0) {
- // Deltas will be zero.
- prevSnapshot = snapshots[0];
- } else {
- prevSnapshot = snapshots[i - 1];
- }
- prevStats = prevSnapshot.getStats();
- var timeIntervalSeconds = (snapshot.ts - prevSnapshot.ts) / 1000;
- // Prevent divide by zero.
- if (timeIntervalSeconds === 0)
- timeIntervalSeconds = 1;
-
- this.computeRatesRecursive_(prevStats, stats,
- timeIntervalSeconds);
- }
- },
-
- computeRatesRecursive_: function(prevStats, stats,
- timeIntervalSeconds) {
- for (var statName in stats) {
- if (stats[statName] instanceof Object) {
- this.computeRatesRecursive_(prevStats[statName],
- stats[statName],
- timeIntervalSeconds);
- } else {
- if (statName === 'sectors_read') {
- stats['bytes_read_per_sec'] = (stats['sectors_read'] -
- prevStats['sectors_read']) *
- 512 / timeIntervalSeconds;
- }
- if (statName === 'sectors_written') {
- stats['bytes_written_per_sec'] =
- (stats['sectors_written'] -
- prevStats['sectors_written']) *
- 512 / timeIntervalSeconds;
- }
- if (statName === 'pgmajfault') {
- stats['pgmajfault_per_sec'] = (stats['pgmajfault'] -
- prevStats['pgmajfault']) /
- timeIntervalSeconds;
- }
- if (statName === 'pswpin') {
- stats['bytes_swpin_per_sec'] = (stats['pswpin'] -
- prevStats['pswpin']) *
- 1000 / timeIntervalSeconds;
- }
- if (statName === 'pswpout') {
- stats['bytes_swpout_per_sec'] = (stats['pswpout'] -
- prevStats['pswpout']) *
- 1000 / timeIntervalSeconds;
- }
- }
- }
- },
-
- computeMaxStats_: function(snapshots) {
- var maxStats = new Object();
- statCount = 0;
-
- for (var i = 0; i < snapshots.length; i++) {
- var snapshot = snapshots[i];
- var stats = snapshot.getStats();
-
- this.computeMaxStatsRecursive_(stats, maxStats,
- excludedStats);
- }
-
- return maxStats;
- },
-
- computeMaxStatsRecursive_: function(stats, maxStats, excludedStats) {
- for (var statName in stats) {
- if (stats[statName] instanceof Object) {
- if (!(statName in maxStats))
- maxStats[statName] = new Object();
-
- var excludedNested;
- if (excludedStats && statName in excludedStats)
- excludedNested = excludedStats[statName];
- else
- excludedNested = null;
-
- this.computeMaxStatsRecursive_(stats[statName],
- maxStats[statName],
- excludedNested);
- } else {
- if (excludedStats && statName in excludedStats)
- continue;
- if (!(statName in maxStats)) {
- maxStats[statName] = 0;
- statCount++;
- }
- if (stats[statName] > maxStats[statName])
- maxStats[statName] = stats[statName];
- }
- }
- },
-
- get height() {
- return window.getComputedStyle(this).height;
- },
-
- set height(height) {
- this.style.height = height;
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- switch (type) {
- case tr.ui.tracks.DrawType.GENERAL_EVENT:
- this.drawStatBars_(viewLWorld, viewRWorld);
- break;
- }
- },
-
- drawStatBars_: function(viewLWorld, viewRWorld) {
- var ctx = this.context();
- var pixelRatio = window.devicePixelRatio || 1;
-
- var bounds = this.getBoundingClientRect();
- var width = bounds.width * pixelRatio;
- var height = (bounds.height * pixelRatio) / statCount;
-
- // Culling parameters.
- var vp = this.viewport.currentDisplayTransform;
-
- // Scale by the size of the largest snapshot.
- var maxStats = this.maxStats_;
-
- var objectSnapshots = this.objectInstance_.snapshots;
- var lowIndex = tr.b.findLowIndexInSortedArray(
- objectSnapshots,
- function(snapshot) {
- return snapshot.ts;
- },
- viewLWorld);
-
- // Assure that the stack with the left edge off screen still gets drawn
- if (lowIndex > 0)
- lowIndex -= 1;
-
- for (var i = lowIndex; i < objectSnapshots.length; ++i) {
- var snapshot = objectSnapshots[i];
- var trace = snapshot.getStats();
- var currentY = height;
-
- var left = snapshot.ts;
- if (left > viewRWorld)
- break;
- var leftView = vp.xWorldToView(left);
- if (leftView < 0)
- leftView = 0;
-
- // Compute the edges for the column graph bar.
- var right;
- if (i !== objectSnapshots.length - 1) {
- right = objectSnapshots[i + 1].ts;
- } else {
- // If this is the last snaphot of multiple snapshots, use the width of
- // the previous snapshot for the width.
- if (objectSnapshots.length > 1)
- right = objectSnapshots[i].ts + (objectSnapshots[i].ts -
- objectSnapshots[i - 1].ts);
- else
- // If there's only one snapshot, use max bounds as the width.
- right = this.objectInstance_.parent.model.bounds.max;
- }
-
- var rightView = vp.xWorldToView(right);
- if (rightView > width)
- rightView = width;
-
- // Floor the bounds to avoid a small gap between stacks.
- leftView = Math.floor(leftView);
- rightView = Math.floor(rightView);
-
- // Descend into nested stats.
- this.drawStatBarsRecursive_(snapshot,
- leftView,
- rightView,
- height,
- trace,
- maxStats,
- currentY);
-
- if (i === lowIndex)
- this.drawStatNames_(leftView, height, currentY, '', maxStats);
- }
- ctx.lineWidth = 1;
- },
-
- drawStatBarsRecursive_: function(snapshot,
- leftView,
- rightView,
- height,
- stats,
- maxStats,
- currentY) {
- var ctx = this.context();
-
- for (var statName in maxStats) {
- if (stats[statName] instanceof Object) {
- // Use the y-position returned from the recursive call.
- currentY = this.drawStatBarsRecursive_(snapshot,
- leftView,
- rightView,
- height,
- stats[statName],
- maxStats[statName],
- currentY);
- } else {
- var maxStat = maxStats[statName];
-
- // Draw a bar for the stat. The height of the bar is scaled
- // against the largest value of the stat across all snapshots.
- ctx.fillStyle = EventPresenter.getBarSnapshotColor(
- snapshot, Math.round(currentY / height));
-
- var barHeight;
-
- if (maxStat > 0) {
- barHeight = height * Math.max(stats[statName], 0) / maxStat;
- } else {
- barHeight = 0;
- }
-
- ctx.fillRect(leftView, currentY - barHeight,
- Math.max(rightView - leftView, 1), barHeight);
-
- currentY += height;
- }
- }
-
- // Return the updated y-position.
- return currentY;
- },
-
- drawStatNames_: function(leftView, height, currentY, prefix, maxStats) {
- var ctx = this.context();
-
- ctx.textAlign = 'end';
- ctx.font = '12px Arial';
- ctx.fillStyle = '#000000';
- for (var statName in maxStats) {
- if (maxStats[statName] instanceof Object) {
- currentY = this.drawStatNames_(leftView, height, currentY,
- statName, maxStats[statName]);
- } else {
- var fullname = statName;
-
- if (prefix !== '')
- fullname = prefix + ' :: ' + statName;
-
- ctx.fillText(fullname, leftView - 10, currentY - height / 4);
- currentY += height;
- }
- }
-
- return currentY;
- }
- };
-
- tr.ui.tracks.ObjectInstanceTrack.register(
- SystemStatsInstanceTrack,
- {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'});
-
- return {
- SystemStatsInstanceTrack: SystemStatsInstanceTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track_test.html
deleted file mode 100644
index b13eaa921d6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_instance_track_test.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/extras/system_stats/system_stats.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var SystemStatsInstanceTrack = tr.ui.e.system_stats.SystemStatsInstanceTrack;
- var Viewport = tr.ui.TimelineViewport;
-
- var createObjects = function() {
- var objectInstance = new tr.model.ObjectInstance({});
- var snapshots = [];
-
- var stats1 = new Object();
- var stats2 = new Object();
-
- stats1['committed_memory'] = 2000000;
- stats2['committed_memory'] = 3000000;
-
- stats1['meminfo'] = new Object();
- stats1.meminfo['free'] = 10000;
- stats2['meminfo'] = new Object();
- stats2.meminfo['free'] = 20000;
-
- snapshots.push(new tr.e.system_stats.SystemStatsSnapshot(objectInstance,
- 10, stats1));
- snapshots.push(new tr.e.system_stats.SystemStatsSnapshot(objectInstance,
- 20, stats2));
-
- objectInstance.snapshots = snapshots;
-
- return objectInstance;
- };
-
- test('instantiate', function() {
- var objectInstances = [];
- objectInstances.push(createObjects());
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = new SystemStatsInstanceTrack(viewport);
- track.objectInstances = objectInstances;
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.heading = 'testBasic';
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 50, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.css b/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.css
deleted file mode 100644
index e698b15aa70..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.css
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.tr-ui-e-system-stats-snapshot-view .subhead {
- font-size: small;
- padding-bottom: 10px;
-}
-
-.tr-ui-e-system-stats-snapshot-view ul {
- background-position: 0 5px;
- background-repeat: no-repeat;
- cursor: pointer;
- font-family: monospace;
- list-style: none;
- margin: 0;
- padding-left: 15px;
-}
-
-.tr-ui-e-system-stats-snapshot-view li {
- background-position: 0 5px;
- background-repeat: no-repeat;
- cursor: pointer;
- list-style: none;
- margin: 0;
- padding-left: 15px;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.html
deleted file mode 100644
index ba093134da3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/system_stats/system_stats_snapshot_view.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet"
- href="/tracing/ui/extras/system_stats/system_stats_snapshot_view.css">
-
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.system_stats', function() {
- /*
- * Displays a system stats snapshot in a human readable form. @constructor
- */
- var SystemStatsSnapshotView = tr.ui.b.define(
- 'tr-ui-e-system-stats-snapshot-view', tr.ui.analysis.ObjectSnapshotView);
-
- SystemStatsSnapshotView.prototype = {
- __proto__: tr.ui.analysis.ObjectSnapshotView.prototype,
-
- decorate: function() {
- Polymer.dom(this).classList.add('tr-ui-e-system-stats-snapshot-view');
- },
-
- updateContents: function() {
- var snapshot = this.objectSnapshot_;
- if (!snapshot || !snapshot.getStats()) {
- Polymer.dom(this).textContent = 'No system stats snapshot found.';
- return;
- }
- // Clear old snapshot view.
- Polymer.dom(this).textContent = '';
-
- var stats = snapshot.getStats();
- Polymer.dom(this).appendChild(this.buildList_(stats));
- },
-
- isFloat: function(n) {
- return typeof n === 'number' && n % 1 !== 0;
- },
-
- /**
- * Creates nested lists.
- *
- * @param {Object} stats The current trace system stats entry.
- * @return {Element} A ul list element.
- */
- buildList_: function(stats) {
- var statList = document.createElement('ul');
-
- for (var statName in stats) {
- var statText = document.createElement('li');
- Polymer.dom(statText).textContent = '' + statName + ': ';
- Polymer.dom(statList).appendChild(statText);
-
- if (stats[statName] instanceof Object) {
- Polymer.dom(statList).appendChild(this.buildList_(stats[statName]));
- } else {
- if (this.isFloat(stats[statName]))
- Polymer.dom(statText).textContent += stats[statName].toFixed(2);
- else
- Polymer.dom(statText).textContent += stats[statName];
- }
- }
-
- return statList;
- }
- };
-
- tr.ui.analysis.ObjectSnapshotView.register(
- SystemStatsSnapshotView,
- {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'});
-
- return {
- SystemStatsSnapshotView: SystemStatsSnapshotView
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/systrace_config.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/systrace_config.html
deleted file mode 100644
index 5045dd13d34..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/systrace_config.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
-TODO(charliea): Make all UI files depend on tracing/ui/base/base.html in the
-same way that all non-UI files depend on tracing/base/base.html. Enforce this
-dependency with a presubmit.
--->
-<link rel="import" href="/tracing/ui/base/base.html" data-suppress-import-order>
-
-<link rel="import" href="/tracing/extras/systrace_config.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/extras/highlighter/vsync_highlighter.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/alerts_side_panel.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/gc_objects_stats_table.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/gc_objects_stats_table.html
deleted file mode 100644
index a33ec56e07f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/gc_objects_stats_table.html
+++ /dev/null
@@ -1,556 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/v8/v8_gc_stats_thread_slice.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-e-v8-gc-objects-stats-table'>
- <template>
- <style>
- tr-ui-b-table {
- flex: 0 0 auto;
- align-self: stretch;
- margin-top: 1em;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.v8', function() {
-
- // The constant variables below should be consistent with
- // https://github.com/mlippautz/v8-heap-stats/blob/master/app/utils.js#L120
- var InstanceTypeGroups = {
- Rest: [
- "ACCESSOR_INFO_TYPE",
- "ACCESSOR_PAIR_TYPE",
- "ACCESS_CHECK_INFO_TYPE",
- "ALLOCATION_MEMENTO_TYPE",
- "ALLOCATION_SITE_TYPE",
- "CALL_HANDLER_INFO_TYPE",
- "CELL_TYPE",
- "FIXED_INT8_ARRAY_TYPE",
- "FIXED_UINT8_ARRAY_TYPE",
- "FIXED_UINT8_CLAMPED_ARRAY_TYPE",
- "FIXED_INT16_ARRAY_TYPE",
- "FIXED_UINT16_ARRAY_TYPE",
- "FIXED_INT32_ARRAY_TYPE",
- "FIXED_UINT32_ARRAY_TYPE",
- "FIXED_FLOAT32_ARRAY_TYPE",
- "FIXED_FLOAT64_ARRAY_TYPE",
- "FIXED_DOUBLE_ARRAY_TYPE",
- "FOREIGN_TYPE",
- "FUNCTION_TEMPLATE_INFO_TYPE",
- "HEAP_NUMBER_TYPE",
- "INTERCEPTOR_INFO_TYPE",
- "MUTABLE_HEAP_NUMBER_TYPE",
- "OBJECT_TEMPLATE_INFO_TYPE",
- "ODDBALL_TYPE",
- "PROPERTY_CELL_TYPE",
- "PROTOTYPE_INFO_TYPE",
- "SCRIPT_TYPE",
- "SYMBOL_TYPE",
- "TRANSITION_ARRAY_TYPE",
- "TYPE_FEEDBACK_INFO_TYPE"
- ],
- Strings: [
- "CONS_ONE_BYTE_STRING_TYPE",
- "CONS_STRING_TYPE",
- "EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE",
- "EXTERNAL_ONE_BYTE_STRING_TYPE",
- "EXTERNAL_INTERNALIZED_STRING_TYPE",
- "EXTERNAL_STRING_TYPE",
- "INTERNALIZED_STRING_TYPE",
- "ONE_BYTE_INTERNALIZED_STRING_TYPE",
- "ONE_BYTE_STRING_TYPE",
- "SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE",
- "SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE",
- "SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE",
- "SHORT_EXTERNAL_STRING_TYPE",
- "SLICED_ONE_BYTE_STRING_TYPE",
- "SLICED_STRING_TYPE",
- "STRING_TYPE"
- ],
- JS_OTHER: [
- "JS_API_OBJECT_TYPE",
- "JS_ARGUMENTS_TYPE",
- "JS_ARRAY_BUFFER_TYPE",
- "JS_ARRAY_TYPE",
- "JS_BOUND_FUNCTION_TYPE",
- "JS_ERROR_TYPE",
- "JS_DATE_TYPE",
- "JS_FUNCTION_TYPE",
- "JS_GLOBAL_OBJECT_TYPE",
- "JS_GLOBAL_PROXY_TYPE",
- "JS_MAP_ITERATOR_TYPE",
- "JS_MAP_TYPE",
- "JS_MESSAGE_OBJECT_TYPE",
- "JS_PROMISE_TYPE",
- "JS_REGEXP_TYPE",
- "JS_SPECIAL_API_OBJECT_TYPE",
- "JS_TYPED_ARRAY_TYPE",
- "JS_VALUE_TYPE",
- "JS_WEAK_MAP_TYPE"
- ],
- FIXED_ARRAY_TYPE: [
- "*FIXED_ARRAY_CODE_STUBS_TABLE_SUB_TYPE",
- "*FIXED_ARRAY_COMPILATION_CACHE_TABLE_SUB_TYPE",
- "*FIXED_ARRAY_CONTEXT_SUB_TYPE",
- "*FIXED_ARRAY_COPY_ON_WRITE_SUB_TYPE",
- "*FIXED_ARRAY_DEOPTIMIZATION_DATA_SUB_TYPE",
- "*FIXED_ARRAY_DESCRIPTOR_ARRAY_SUB_TYPE",
- "*FIXED_ARRAY_EMBEDDED_OBJECT_SUB_TYPE",
- "*FIXED_ARRAY_ENUM_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_ENUM_INDICES_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_DEPENDENT_CODE_SUB_TYPE",
- "*FIXED_ARRAY_DICTIONARY_ELEMENTS_SUB_TYPE",
- "*FIXED_ARRAY_DICTIONARY_PROPERTIES_SUB_TYPE",
- "*FIXED_ARRAY_EMPTY_PROPERTIES_DICTIONARY_SUB_TYPE",
- "*FIXED_ARRAY_FAST_ELEMENTS_SUB_TYPE",
- "*FIXED_ARRAY_FAST_PROPERTIES_SUB_TYPE",
- "*FIXED_ARRAY_HANDLER_TABLE_SUB_TYPE",
- "*FIXED_ARRAY_INTRINSIC_FUNCTION_NAMES_SUB_TYPE",
- "*FIXED_ARRAY_JS_COLLECTION_SUB_TYPE",
- "*FIXED_ARRAY_JS_WEAK_COLLECTION_SUB_TYPE",
- "*FIXED_ARRAY_LITERALS_ARRAY_SUB_TYPE",
- "*FIXED_ARRAY_MAP_CODE_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_NOSCRIPT_SHARED_FUNCTION_INFOS_SUB_TYPE",
- "*FIXED_ARRAY_NUMBER_STRING_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_OBJECT_TO_CODE_SUB_TYPE",
- "*FIXED_ARRAY_OPTIMIZED_CODE_LITERALS_TUB_TYPE",
- "*FIXED_ARRAY_OPTIMIZED_CODE_MAP_SUB_TYPE",
- "*FIXED_ARRAY_PROTOTYPE_USERS_SUB_TYPE",
- "*FIXED_ARRAY_REGEXP_MULTIPLE_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_RETAINED_MAPS_SUB_TYPE",
- "*FIXED_ARRAY_SCOPE_INFO_SUB_TYPE",
- "*FIXED_ARRAY_SCRIPT_LIST_SUB_TYPE",
- "*FIXED_ARRAY_SERIALIZED_TEMPLATES_SUB_TYPE",
- "*FIXED_ARRAY_SHARED_FUNCTION_INFOS_SUB_TYPE",
- "*FIXED_ARRAY_SINGLE_CHARACTER_STRING_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_STRING_SPLIT_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_STRING_TABLE_SUB_TYPE",
- "*FIXED_ARRAY_TEMPLATE_INFO_SUB_TYPE",
- "*FIXED_ARRAY_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE",
- "*FIXED_ARRAY_TYPE_FEEDBACK_VECTOR_SUB_TYPE",
- "*FIXED_ARRAY_TYPE_FEEDBACK_METADATA_SUB_TYPE",
- "*FIXED_ARRAY_WEAK_NEW_SPACE_OBJECT_TO_CODE_SUB_TYPE",
- "*FIXED_ARRAY_UNKNOWN_SUB_TYPE"
- ],
- CODE_TYPE: [
- "*CODE_FUNCTION",
- "*CODE_OPTIMIZED_FUNCTION",
- "*CODE_BYTECODE_HANDLER",
- "*CODE_STUB",
- "*CODE_HANDLER",
- "*CODE_BUILTIN",
- "*CODE_REGEXP",
- "*CODE_WASM_FUNCTION",
- "*CODE_WASM_TO_JS_FUNCTION",
- "*CODE_JS_TO_WASM_FUNCTION",
- "*CODE_LOAD_IC",
- "*CODE_LOAD_GLOBAL_IC",
- "*CODE_KEYED_LOAD_IC",
- "*CODE_CALL_IC",
- "*CODE_STORE_IC",
- "*CODE_KEYED_STORE_IC",
- "*CODE_BINARY_OP_IC",
- "*CODE_COMPARE_IC",
- "*CODE_TO_BOOLEAN_IC"
- ],
- CONTEXT_EXTENSION_TYPE: [
- 'CONTEXT_EXTENSION_TYPE'
- ],
- MAP_TYPE: [
- 'MAP_TYPE'
- ],
- BYTE_ARRAY_TYPE: [
- 'BYTE_ARRAY_TYPE'
- ],
- SHARED_FUNCTION_INFO_TYPE: [
- 'SHARED_FUNCTION_INFO_TYPE'
- ],
- WEAK_CELL_TYPE: [
- 'WEAK_CELL_TYPE'
- ],
- JS_OBJECT_TYPE: [
- 'JS_OBJECT_TYPE'
- ],
- JS_CONTEXT_EXTENSION_OBJECT_TYPE: [
- 'JS_CONTEXT_EXTENSION_OBJECT_TYPE'
- ]
- };
-
- var InstanceSubTypeNames = {
- FIXED_ARRAY_TYPE: {
- keyToName: key => key.slice("*FIXED_ARRAY_".length)
- .slice(0, -("_SUB_TYPE".length)),
- nameToKey: name => "*FIXED_ARRAY_" + name + "_SUB_TYPE"
- },
- CODE_TYPE: {
- keyToName: key => key.slice("*CODE_".length),
- nameToKey: name => "*CODE_" + name
- },
- Strings: {
- keyToName: key => key,
- nameToKey: name => name
- },
- Rest: {
- keyToName: key => key,
- nameToKey: name => name
- },
- JS_OTHER: {
- keyToName: key => key,
- nameToKey: name => name
- }
- };
-
- class Entry {
- constructor(title, count, overall, overAllocated, histogram,
- overAllocatedHistogram) {
- this.title_ = title;
- this.overall_ = overall;
- this.count_ = count;
- this.overAllocated_ = overAllocated;
- this.histogram_ = histogram;
- this.overAllocatedHistogram_ = overAllocatedHistogram;
- this.bucketSize_ = this.histogram_.length;
- this.overallPercent_ = 100;
- this.overAllocatedPercent_ = 100;
- }
-
- get title() {
- return this.title_;
- }
-
- get overall() {
- return this.overall_;
- }
-
- get count() {
- return this.count_;
- }
-
- get overAllocated() {
- return this.overAllocated_;
- }
-
- get histogram() {
- return this.histogram_;
- }
-
- get overAllocatedHistogram() {
- return this.overAllocatedHistogram_;
- }
-
- get bucketSize() {
- return this.bucketSize_;
- }
-
- get overallPercent() {
- return this.overallPercent_;
- }
-
- set overallPercent(value) {
- this.overallPercent_ = value;
- }
-
- get overAllocatedPercent() {
- return this.overAllocatedPercent_;
- }
-
- set overAllocatedPercent(value) {
- this.overAllocatedPercent_ = value;
- }
-
- setFromObject(obj) {
- this.count_ = obj.count;
- this.overall_ = obj.overall;
- this.overAllocated_ = obj.over_allocated;
- this.histogram_ = obj.histogram;
- this.overAllocatedHistogram_ = obj.over_allocated_histogram;
- }
- }
-
- class GroupedEntry extends Entry {
- constructor(title, count, overall, overAllocated, histogram,
- overAllocatedHistogram) {
- super(title, count, overall, overAllocated, histogram,
- overAllocatedHistogram);
- this.histogram_.fill(0);
- this.overAllocatedHistogram_.fill(0);
- this.entries_ = new Map();
- }
-
- get subRows() {
- return Array.from(this.entries_.values());
- }
-
- getEntryFromTitle(title) {
- return this.entries_.get(title);
- }
-
- add(entry) {
- this.count_ += entry.count;
- this.overall_ += entry.overall;
- this.overAllocated_ += entry.overAllocated;
- if (this.bucketSize_ === entry.bucketSize) {
- for (var i = 0; i < this.bucketSize_; ++i) {
- this.histogram_[i] += entry.histogram[i];
- this.overAllocatedHistogram_[i] += entry.overAllocatedHistogram[i];
- }
- }
- this.entries_.set(entry.title, entry);
- }
-
- accumulateUnknown(title) {
- var unknownCount = this.count_;
- var unknownOverall = this.overall_;
- var unknownOverAllocated = this.overAllocated_;
- var unknownHistogram = tr.b.deepCopy(this.histogram_);
- var unknownOverAllocatedHistogram =
- tr.b.deepCopy(this.overAllocatedHistogram_);
- for (var entry of this.entries_.values()) {
- unknownCount -= entry.count;
- unknownOverall -= entry.overall;
- unknownOverAllocated -= entry.overAllocated;
- for (var i = 0; i < this.bucketSize_; ++i) {
- unknownHistogram[i] -= entry.histogram[i];
- unknownOverAllocatedHistogram[i] -= entry.overAllocatedHistogram[i];
- }
- }
- this.entries_.set(title, new Entry(title, unknownCount, unknownOverall,
- unknownOverAllocated, unknownHistogram,
- unknownOverAllocatedHistogram));
- }
-
- calculatePercentage() {
- for (var entry of this.entries_.values()) {
- if (this.overall_ > 0) {
- entry.overallPercent =
- (entry.overall / this.overall_ * 100).toFixed(3);
- } else {
- entry.overallPercent = 0;
- }
-
- if (this.overAllocated_ > 0) {
- entry.overAllocatedPercent =
- (entry.overAllocated / this.overAllocated_ * 100).toFixed(3);
- } else {
- entry.overAllocatedPercent = 0;
- }
-
- if (entry instanceof GroupedEntry) entry.calculatePercentage();
- }
- }
- }
-
- Polymer({
- is: 'tr-ui-e-v8-gc-objects-stats-table',
-
- ready: function() {
- this.isolateEntries_ = [];
- },
-
- constructTable_: function() {
- this.$.table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- this.$.table.tableColumns = [
- {
- title: 'Component',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.title;
- return typeEl;
- },
- showExpandButtons: true
- },
- {
- title: 'Overall Memory (KB)',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = (row.overall / 1024).toFixed(3);
- return typeEl;
- },
- cmp: function(a, b) {
- return a.overall - b.overall;
- }
- },
- {
- title: 'Over Allocated Memory (KB)',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = (row.overAllocated / 1024).toFixed(3);
- return typeEl;
- },
- cmp: function(a, b) {
- return a.overAllocated - b.overAllocated;
- }
- },
- {
- title: 'Overall Count',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.count;
- return typeEl;
- },
- cmp: function(a, b) {
- return a.count - b.count;
- }
- },
- {
- title: 'Overall Memory Percent',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.overallPercent + '%';
- return typeEl;
- },
- cmp: function(a, b) {
- return a.overall - b.overall;
- }
- },
- {
- title: 'Overall Allocated Memory Percent',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.overAllocatedPercent + '%';
- return typeEl;
- },
- cmp: function(a, b) {
- return a.overAllocated - b.overAllocated;
- }
- }
- ];
-
- this.$.table.sortColumnIndex = 1;
- this.$.table.sortDescending = true;
- },
-
- buildSubEntry_: function(objects, groupEntry, keyToName) {
- var typeGroup = InstanceTypeGroups[groupEntry.title];
- for (var instanceType of typeGroup) {
- var e = objects[instanceType];
- delete objects[instanceType];
- if (e === undefined) continue;
- var title = instanceType;
- if (keyToName !== undefined) title = keyToName(title);
- groupEntry.add(new Entry(title, e.count, e.overall, e.over_allocated,
- e.histogram, e.over_allocated_histogram));
- }
- },
-
- buildOthers_: function(objects, groupEntry) {
- for (var title of Object.getOwnPropertyNames(objects)) {
- if (title === 'END') continue;
- var obj = objects[title];
- groupEntry.add(new Entry(title, obj.count, obj.overall,
- obj.over_allocated, obj.histogram,
- obj.over_allocated_histogram))
- }
- },
-
- build_: function(objects, objectEntry, bucketSize) {
- var fixedArrayObject = objects['FIXED_ARRAY_TYPE'];
- if (fixedArrayObject === undefined)
- throw new Error('Fixed Array Object not found.');
-
- var groupEntries = {
- restEntry: new GroupedEntry('Rest', 0, 0, 0, new Array(bucketSize),
- new Array(bucketSize)),
- stringEntry: new GroupedEntry('Strings', 0, 0, 0, new Array(bucketSize),
- new Array(bucketSize)),
- jsEntry: new GroupedEntry('JS_OTHER', 0, 0, 0, new Array(bucketSize),
- new Array(bucketSize)),
- fixedArrayEntry: new GroupedEntry('FIXED_ARRAY_TYPE', 0, 0, 0,
- new Array(bucketSize),
- new Array(bucketSize)),
- codeEntry: new GroupedEntry('CODE_TYPE', 0, 0, 0, new Array(bucketSize),
- new Array(bucketSize)),
- contextExtensionEntry: new GroupedEntry('CONTEXT_EXTENSION_TYPE', 0, 0,
- 0, new Array(bucketSize),
- new Array(bucketSize)),
- mapEntry: new GroupedEntry('MAP_TYPE', 0, 0, 0, new Array(bucketSize),
- new Array(bucketSize)),
- byteArrayEntry: new GroupedEntry('BYTE_ARRAY_TYPE', 0, 0, 0,
- new Array(bucketSize),
- new Array(bucketSize)),
- sharedFunctionInfoEntry: new GroupedEntry('SHARED_FUNCTION_INFO_TYPE',
- 0, 0, 0,
- new Array(bucketSize),
- new Array(bucketSize)),
- weakCellEntry: new GroupedEntry('WEAK_CELL_TYPE', 0, 0, 0,
- new Array(bucketSize),
- new Array(bucketSize)),
- jsObjectEntry: new GroupedEntry('JS_OBJECT_TYPE', 0, 0, 0,
- new Array(bucketSize),
- new Array(bucketSize)),
- jsContextExtensionObjectEntry: new GroupedEntry(
- 'JS_CONTEXT_EXTENSION_OBJECT_TYPE', 0, 0, 0, new Array(bucketSize),
- new Array(bucketSize))
- };
- for (var name of Object.getOwnPropertyNames(groupEntries)) {
- var groupEntry = groupEntries[name];
- var keyToName = undefined;
- if (InstanceSubTypeNames[groupEntry.title] !== undefined) {
- keyToName = InstanceSubTypeNames[groupEntry.title].keyToName;
- }
- this.buildSubEntry_(objects, groupEntry, keyToName);
- if (name === 'fixedArrayEntry') {
- groupEntry.setFromObject(fixedArrayObject);
- groupEntry.accumulateUnknown('UNKNOWN');
- }
- objectEntry.add(groupEntry);
- }
- },
-
- set selection(slices) {
- slices.sortEvents(function(a, b) {
- return b.start - a.start;
- });
- var previous = undefined;
- for (let slice of slices) {
- if (!slice instanceof tr.e.v8.V8GCStatsThreadSlice) continue;
- var liveObjects = slice.liveObjects;
- var deadObjects = slice.deadObjects;
- var isolate = liveObjects.isolate;
-
- var isolateEntry =
- new GroupedEntry(
- 'Isolate_' + isolate + ' at ' + slice.start.toFixed(3) + ' ms',
- 0, 0, 0, [], []);
- var liveEntry = new GroupedEntry('live objects', 0, 0, 0, [], []);
- var deadEntry = new GroupedEntry('dead objects', 0, 0, 0, [], []);
-
- var liveBucketSize = liveObjects.bucket_sizes.length;
- var deadBucketSize = deadObjects.bucket_sizes.length;
-
- this.build_(tr.b.deepCopy(liveObjects.type_data), liveEntry,
- liveBucketSize);
- isolateEntry.add(liveEntry);
-
- this.build_(tr.b.deepCopy(deadObjects.type_data), deadEntry,
- deadBucketSize);
- isolateEntry.add(deadEntry);
-
- isolateEntry.calculatePercentage();
- this.isolateEntries_.push(isolateEntry);
- }
- this.updateTable_();
- },
-
- updateTable_: function() {
- this.constructTable_();
- this.$.table.tableRows = this.isolateEntries_;
- this.$.table.rebuild();
- },
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_gc_stats_thread_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_gc_stats_thread_slice_sub_view.html
deleted file mode 100644
index 02c5c0e27d6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_gc_stats_thread_slice_sub_view.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/gc_objects_stats_table.html">
-
-<dom-module id='tr-ui-e-multi-v8-gc-stats-thread-slice-sub-view'>
- <template>
- <style>
- </style>
- <tr-ui-e-v8-gc-objects-stats-table id="gcObjectsStats">
- </tr-ui-e-v8-gc-objects-stats-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-e-multi-v8-gc-stats-thread-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.gcObjectsStats.selection = selection;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-e-multi-v8-gc-stats-thread-slice-sub-view',
- tr.e.v8.V8GCStatsThreadSlice,
- {
- multi: true,
- title: 'V8 GC Stats slices'
- }
-);
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view.html
deleted file mode 100644
index a2dfecbfb04..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/runtime_call_stats_table.html">
-
-<dom-module id='tr-ui-e-multi-v8-thread-slice-sub-view'>
- <template>
- <tr-ui-a-multi-thread-slice-sub-view id="content"></tr-ui-a-multi-thread-slice-sub-view>
- <tr-ui-e-v8-runtime-call-stats-table id="runtimeCallStats"></tr-ui-e-v8-runtime-call-stats-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-e-multi-v8-thread-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.runtimeCallStats.slices = selection;
- this.$.content.selection = selection;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-e-multi-v8-thread-slice-sub-view',
- tr.e.v8.V8ThreadSlice,
- {
- multi: true,
- title: 'V8 slices'
- }
-);
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view_test.html
deleted file mode 100644
index 7bf81d1d043..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view_test.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/v8/v8_thread_slice.html">
-<link rel="import" href="/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- function createModel() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
-
- m.s1 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 0,
- end: 10,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- CompileFullCode: [3, 345],
- LoadIC_Miss: [5, 567],
- ParseLazy: [8, 890]
- }}}));
- m.s2 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 11,
- end: 15,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- HandleApiCall: [1, 123],
- OptimizeCode: [7, 789]
- }}}));
- });
- return m;
- }
-
- test('selectMultiV8ThreadSlices', function() {
- var m = createModel();
-
- var viewEl =
- document.createElement('tr-ui-e-multi-v8-thread-slice-sub-view');
- var selection = new tr.model.EventSet();
- selection.push(m.s1);
- selection.push(m.s2);
- viewEl.selection = selection;
- this.addHTMLOutput(viewEl);
- var rows = viewEl.$.runtimeCallStats.$.table.tableRows;
- assert.lengthOf(rows, 10);
- assert.deepEqual(rows.map(r => r.time), [
- 2714,
- 567,
- 789,
- 345,
- 890,
- 0,
- 0,
- 0,
- 0,
- 123
- ]);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table.html
deleted file mode 100644
index d09d0f1f754..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table.html
+++ /dev/null
@@ -1,230 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/v8/v8_thread_slice.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id='tr-ui-e-v8-runtime-call-stats-table'>
- <template>
- <style>
- #table {
- flex: 0 0 auto;
- align-self: stretch;
- margin-top: 1em;
- font-size: 12px;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.e.v8', function() {
-
- function handleCodeSearch_(event) {
- if (event.target.parentNode === undefined) return;
- var name = event.target.parentNode.entryName;
- var url = 'https://cs.chromium.org/search/?sq=package:chromium&type=cs&q=';
- if (name.startsWith('API_')) name = name.substring(4);
- url += encodeURIComponent(name) + '+file:src/v8/src';
- window.open(url, '_blank');
- }
-
- var Entry = function(name, count, time) {
- this.name_ = name;
- this.count_ = count;
- this.time_ = time;
- };
-
- Entry.prototype = {
- __proto__: Object.prototype,
-
- get name() {
- return this.name_;
- },
-
- get count() {
- return this.count_;
- },
-
- get time() {
- return this.time_;
- },
-
- accumulate: function(count, time) {
- this.count_ += count;
- this.time_ += time;
- },
-
- reset: function() {
- this.count_ = 0;
- this.time_ = 0;
- }
- };
-
- var GroupedEntry = function(name, matchRegex) {
- Entry.call(this, name, 0, 0);
- this.regex_ = matchRegex;
- this.entries_ = new Map();
- };
-
- GroupedEntry.prototype = {
- __proto__: Entry.prototype,
-
- match: function(name) {
- return this.regex_ && !(!name.match(this.regex_));
- },
-
- add: function(entry) {
- var value = this.entries_.get(entry.name);
- if (value !== undefined)
- value.accumulate(entry.count, entry.time);
- else
- this.entries_.set(entry.name, entry);
- this.count_ += entry.count;
- this.time_ += entry.time;
- },
-
- get subRows() {
- return Array.from(this.entries_.values());
- },
-
- reset: function(entry) {
- this.time_ = 0;
- this.count_ = 0;
- this.entries_.clear();
- }
- };
-
- Polymer({
- is: 'tr-ui-e-v8-runtime-call-stats-table',
-
- ready: function() {
- this.table_ = this.$.table;
- this.totalTime_ = 0;
- },
-
- constructTable_: function() {
- var totalTime = this.totalTime_;
- this.table_.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
- this.table_.tableColumns = [
- {
- title: 'Name',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.name;
- if (!(row instanceof GroupedEntry)) {
- typeEl.title = 'click ? for code search';
- typeEl.entryName = row.name;
- var codeSearchEl = document.createElement('span');
- codeSearchEl.innerText = '?';
- codeSearchEl.style.float = 'right';
- codeSearchEl.style.borderRadius = '5px';
- codeSearchEl.style.backgroundColor = '#EEE';
- codeSearchEl.addEventListener('click',
- handleCodeSearch_.bind(this));
- typeEl.appendChild(codeSearchEl);
- }
- return typeEl;
- },
- width: '200px',
- showExpandButtons: true
- },
- {
- title: 'Time',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = (row.time / 1000.0).toFixed(3) + ' ms';
- return typeEl;
- },
- width: '100px',
- cmp: function(a, b) {
- return a.time - b.time;
- }
- },
- {
- title: 'Count',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = row.count;
- return typeEl;
- },
- width: '100px',
- cmp: function(a, b) {
- return a.count - b.count;
- }
- },
- {
- title: 'Percent',
- value: function(row) {
- var typeEl = document.createElement('span');
- typeEl.innerText = (row.time / totalTime * 100).toFixed(3) + '%';
- return typeEl;
- },
- width: '100px',
- cmp: function(a, b) {
- return a.time - b.time;
- }
- }
- ];
-
- this.table_.sortColumnIndex = 1;
- this.table_.sortDescending = true;
- },
-
- set slices(slices) {
- var groups = new Array(
- new GroupedEntry('Total'),
- new GroupedEntry('IC', /.*IC.*/),
- new GroupedEntry('Optimize',
- /StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*/),
- new GroupedEntry('Compile', /.*Compile.*/),
- new GroupedEntry('Parse', /.*Parse.*/),
- new GroupedEntry('Callback', /.*Callback$/),
- new GroupedEntry('API', /.*API.*/),
- new GroupedEntry('GC', /GC|AllocateInTargetSpace/),
- new GroupedEntry('JavaScript', /JS_Execution/),
- new GroupedEntry('Runtime', /.*/)
- );
-
- slices.forEach(function(slice) {
- if (!(slice instanceof tr.e.v8.V8ThreadSlice)) return;
- try {
- var runtimeCallStats = JSON.parse(slice.runtimeCallStats);
- } catch (e) {
- var runtimeCallStats = slice.runtimeCallStats;
- }
- if (runtimeCallStats !== undefined) {
- Object.getOwnPropertyNames(runtimeCallStats).forEach(
- function(runtimeCallStatName) {
- for (var i = 1; i < groups.length; ++i) {
- if (groups[i].match(runtimeCallStatName)) {
- var runtimeCallStat = runtimeCallStats[runtimeCallStatName];
- if (runtimeCallStat.length !== 2) break;
- var entry = new Entry(runtimeCallStatName, runtimeCallStat[0],
- runtimeCallStat[1]);
- groups[0].accumulate(runtimeCallStat[0], runtimeCallStat[1]);
- groups[i].add(entry);
- break;
- }
- }
- }, this);
- }
- }, this);
- this.totalTime_ = groups[0].time;
- if (this.totalTime_ > 0) {
- this.constructTable_();
- this.table_.tableRows = groups;
- this.table_.rebuild();
- }
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table_test.html
deleted file mode 100644
index 71696479d72..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/runtime_call_stats_table_test.html
+++ /dev/null
@@ -1,181 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/v8/v8_thread_slice.html">
-<link rel="import" href="/tracing/ui/extras/v8/runtime_call_stats_table.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
- var apiObjectGet = [1, 123];
- var functionCallback = [2, 234];
- var compileFullCode = [3, 345];
- var allocateInTargetSpace = [4, 456];
- var loadIcMiss = [5, 567];
- var jsExecution = [6, 678];
- var optimizeCode = [7, 789];
- var parseLazy = [8, 890];
- var handleApiCall = [9, 901];
-
- function createModel() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
-
- m.s1 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 0,
- end: 10,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- JS_Execution: jsExecution,
- HandleApiCall: handleApiCall,
- CompileFullCode: compileFullCode,
- LoadIC_Miss: loadIcMiss,
- ParseLazy: parseLazy,
- OptimizeCode: optimizeCode,
- FunctionCallback: functionCallback,
- AllocateInTargetSpace: allocateInTargetSpace,
- API_Object_Get: apiObjectGet
- }}}));
- m.s2 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 11,
- end: 15,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- JS_Execution: jsExecution,
- HandleApiCall: handleApiCall,
- CompileFullCode: compileFullCode,
- LoadIC_Miss: loadIcMiss,
- ParseLazy: parseLazy,
- OptimizeCode: optimizeCode,
- FunctionCallback: functionCallback,
- AllocateInTargetSpace: allocateInTargetSpace,
- API_Object_Get: apiObjectGet
- }}}));
- m.s3 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 11,
- end: 15,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- LoadIC_LoadCallback: [1, 111],
- StoreIC_StoreCallback: [2, 222],
- }}}));
- });
- return m;
- }
-
- test('SingleSliceSelection', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-e-v8-runtime-call-stats-table');
- viewEl.slices = [m.s1];
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
- var rows = viewEl.$.table.tableRows;
- assert.lengthOf(rows, 10);
- assert.deepEqual(rows.map(r => r.time), [
- 4983,
- loadIcMiss[1],
- optimizeCode[1],
- compileFullCode[1],
- parseLazy[1],
- functionCallback[1],
- apiObjectGet[1],
- allocateInTargetSpace[1],
- jsExecution[1],
- handleApiCall[1]
- ]);
- });
-
- test('MultiSliceSelection', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-e-v8-runtime-call-stats-table');
- viewEl.slices = [m.s1, m.s2];
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
- var rows = viewEl.$.table.tableRows;
- assert.lengthOf(rows, 10);
- assert.deepEqual(rows.map(r => r.time), [
- 9966,
- loadIcMiss[1] * 2,
- optimizeCode[1] * 2,
- compileFullCode[1] * 2,
- parseLazy[1] * 2,
- functionCallback[1] * 2,
- apiObjectGet[1] * 2,
- allocateInTargetSpace[1] * 2,
- jsExecution[1] * 2,
- handleApiCall[1] * 2
- ]);
-
- assert.deepEqual(rows.map(r => r.entries_.size), [
- 0,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1,
- 1
- ]);
- });
-
- test('groupCorrectly', function() {
- var m = createModel();
-
- var viewEl = document.createElement('tr-ui-e-v8-runtime-call-stats-table');
- viewEl.slices = [m.s3];
- this.addHTMLOutput(viewEl);
- tr.b.forceAllPendingTasksToRunForTest();
- var rows = viewEl.$.table.tableRows;
- assert.lengthOf(rows, 10);
- assert.deepEqual(rows.map(r => r.time), [
- 333,
- 333,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- ]);
-
- assert.deepEqual(rows.map(r => r.entries_.size), [
- 0,
- 2,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0
- ]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_gc_stats_thread_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_gc_stats_thread_slice_sub_view.html
deleted file mode 100644
index 6926ffa2e72..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_gc_stats_thread_slice_sub_view.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/gc_objects_stats_table.html">
-
-<dom-module id='tr-ui-e-single-v8-gc-stats-thread-slice-sub-view'>
- <template>
- <tr-ui-a-single-event-sub-view id="content"></tr-ui-a-single-event-sub-view>
- <tr-ui-e-v8-gc-objects-stats-table id="gcObjectsStats"></tr-ui-e-v8-gc-objects-stats-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-e-single-v8-gc-stats-thread-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.content.selection = selection;
- this.$.gcObjectsStats.selection = selection;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-e-single-v8-gc-stats-thread-slice-sub-view',
- tr.e.v8.V8GCStatsThreadSlice,
- {
- multi: false,
- title: 'V8 GC stats slice'
- }
-);
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view.html
deleted file mode 100644
index 8162d201fbe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/runtime_call_stats_table.html">
-
-<dom-module id='tr-ui-e-single-v8-thread-slice-sub-view'>
- <template>
- <tr-ui-a-single-thread-slice-sub-view id="content"></tr-ui-a-single-thread-slice-sub-view>
- <tr-ui-e-v8-runtime-call-stats-table id="runtimeCallStats"></tr-ui-e-v8-runtime-call-stats-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-e-single-v8-thread-slice-sub-view',
- behaviors: [tr.ui.analysis.AnalysisSubView],
-
- get selection() {
- return this.$.content.selection;
- },
-
- set selection(selection) {
- this.$.runtimeCallStats.slices = selection;
- this.$.content.selection = selection;
- }
-});
-
-tr.ui.analysis.AnalysisSubView.register(
- 'tr-ui-e-single-v8-thread-slice-sub-view',
- tr.e.v8.V8ThreadSlice,
- {
- multi: false,
- title: 'V8 slice'
- }
-);
-
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view_test.html
deleted file mode 100644
index a23d18a1682..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8/single_v8_thread_slice_sub_view_test.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/v8/v8_thread_slice.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/extras/v8/single_v8_thread_slice_sub_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- function createModel() {
- var m = tr.c.TestUtils.newModel(function(m) {
- m.p1 = m.getOrCreateProcess(1);
- m.t2 = m.p1.getOrCreateThread(2);
-
- m.s1 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 0,
- end: 10,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- CompileFullCode: [3, 345],
- LoadIC_Miss: [5, 567],
- ParseLazy: [8, 890]
- }}}));
- m.s2 = m.t2.sliceGroup.pushSlice(
- newSliceEx(
- {title: 'V8.Execute',
- start: 11,
- end: 15,
- type: tr.e.v8.V8ThreadSlice,
- cat: 'v8',
- args: {'runtime-call-stats':
- {
- HandleApiCall: [1, 123],
- OptimizeCode: [7, 789]
- }}}));
- });
- return m;
- }
-
- test('selectV8ThreadSlice', function() {
- var m = createModel();
-
- var viewEl =
- document.createElement('tr-ui-e-single-v8-thread-slice-sub-view');
- var selection1 = new tr.model.EventSet();
- selection1.push(m.s1);
- viewEl.selection = selection1;
- this.addHTMLOutput(viewEl);
- var rows = viewEl.$.runtimeCallStats.$.table.tableRows;
- assert.lengthOf(rows, 10);
- assert.deepEqual(rows.map(r => r.time), [
- 1802,
- 567,
- 0,
- 345,
- 890,
- 0,
- 0,
- 0,
- 0,
- 0
- ]);
-
- var selection2 = new tr.model.EventSet();
- selection2.push(m.s2);
- viewEl.selection = selection2;
- rows = viewEl.$.runtimeCallStats.$.table.tableRows;
- assert.lengthOf(rows, 10);
- assert.deepEqual(rows.map(r => r.time), [
- 912,
- 0,
- 789,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 123
- ]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8_config.html b/chromium/third_party/catapult/tracing/tracing/ui/extras/v8_config.html
deleted file mode 100644
index ac9794d1de7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/extras/v8_config.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-
-<link rel="import" href="/tracing/extras/v8_config.html">
-<link rel="import" href="/tracing/ui/extras/v8/gc_objects_stats_table.html">
-<link rel="import" href="/tracing/ui/extras/v8/multi_v8_gc_stats_thread_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/multi_v8_thread_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/runtime_call_stats_table.html">
-<link rel="import" href="/tracing/ui/extras/v8/single_v8_gc_stats_thread_slice_sub_view.html">
-<link rel="import" href="/tracing/ui/extras/v8/single_v8_thread_slice_sub_view.html">
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/find_control.html b/chromium/third_party/catapult/tracing/tracing/ui/find_control.html
deleted file mode 100644
index 0660438b199..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/find_control.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/find_controller.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<dom-module id='tr-ui-find-control'>
- <template>
- <style>
- :host {
- -webkit-user-select: none;
- display: -webkit-flex;
- position: relative;
- }
- input {
- -webkit-user-select: auto;
- background-color: #f8f8f8;
- border: 1px solid rgba(0, 0, 0, 0.5);
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- width: 170px;
- }
- input:focus {
- background-color: white;
- }
- tr-ui-b-toolbar-button {
- border-left: none;
- margin: 0;
- }
- #hitCount {
- left: 0;
- opacity: 0.25;
- pointer-events: none;
- position: absolute;
- text-align: right;
- top: 2px;
- width: 167px;
- z-index: 1;
- }
- #spinner {
- visibility: hidden;
- width: 8px;
- height: 8px;
- left: 154px;
- pointer-events: none;
- position: absolute;
- top: 4px;
- z-index: 1;
-
- border: 2px solid transparent;
- border-bottom: 2px solid rgba(0, 0, 0, 0.5);
- border-right: 2px solid rgba(0, 0, 0, 0.5);
- border-radius: 50%;
-
- animation: spin 1s linear infinite;
- }
- @keyframes spin { 100% { transform: rotate(360deg); } }
- </style>
-
- <input type='text' id='filter'
- on-input="filterTextChanged"
- on-keydown="filterKeyDown"
- on-blur="filterBlur"
- on-focus="filterFocus"
- on-mouseup="filterMouseUp" />
- <div id="spinner"></div>
- <tr-ui-b-toolbar-button on-click="findPrevious">
- &larr;
- </tr-ui-b-toolbar-button>
- <tr-ui-b-toolbar-button on-click="findNext">
- &rarr;
- </tr-ui-b-toolbar-button>
- <div id="hitCount">0 of 0</div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-find-control',
-
- filterKeyDown: function(e) {
- if (e.keyCode === 27) {
- var hkc = tr.b.getHotkeyControllerForElement(this);
- if (hkc) {
- hkc.childRequestsBlur(this);
- } else {
- this.blur();
- }
- e.preventDefault();
- e.stopPropagation();
- return;
- } else if (e.keyCode === 13) {
- if (e.shiftKey)
- this.findPrevious();
- else
- this.findNext();
- }
- },
-
- filterBlur: function(e) {
- this.updateHitCountEl();
- },
-
- filterFocus: function(e) {
- this.$.filter.select();
- },
-
- // Prevent that the input text is deselected after focusing the find
- // control with the mouse.
- filterMouseUp: function(e) {
- e.preventDefault();
- },
-
- get controller() {
- return this.controller_;
- },
-
- set controller(c) {
- this.controller_ = c;
- this.updateHitCountEl();
- },
-
- focus: function() {
- this.$.filter.focus();
- },
-
- get hasFocus() {
- return this === document.activeElement;
- },
-
- filterTextChanged: function() {
- Polymer.dom(this.$.hitCount).textContent = '';
- this.$.spinner.style.visibility = 'visible';
- this.controller.startFiltering(this.$.filter.value).then(function() {
- this.$.spinner.style.visibility = 'hidden';
- this.updateHitCountEl();
- }.bind(this));
- },
-
- findNext: function() {
- if (this.controller)
- this.controller.findNext();
- this.updateHitCountEl();
- },
-
- findPrevious: function() {
- if (this.controller)
- this.controller.findPrevious();
- this.updateHitCountEl();
- },
-
- updateHitCountEl: function() {
- if (!this.controller || this.$.filter.value.length === 0) {
- Polymer.dom(this.$.hitCount).textContent = '';
- return;
- }
-
- var n = this.controller.filterHits.length;
- var i = n === 0 ? -1 : this.controller.currentHitIndex;
- Polymer.dom(this.$.hitCount).textContent = (i + 1) + ' of ' + n;
- },
-
- setText: function(string) {
- this.$.filter.value = string;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/find_control_test.html b/chromium/third_party/catapult/tracing/tracing/ui/find_control_test.html
deleted file mode 100644
index 192f6fe9935..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/find_control_test.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/find_control.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var ctl = document.createElement('tr-ui-find-control');
- ctl.controller = {
- findNext: function() { },
- findPrevious: function() { },
- reset: function() {},
-
- filterHits: ['a', 'b'],
-
- currentHitIndex: 0
- };
-
- this.addHTMLOutput(ctl);
- });
-
- test('updateHitCountEl_twoResults', function() {
- var ctl = document.createElement('tr-ui-find-control');
- ctl.controller = {
- findNext: function() { },
- findPrevious: function() { },
- reset: function() {},
-
- filterHits: ['a', 'b'],
-
- currentHitIndex: 0
- };
-
- this.addHTMLOutput(ctl);
- ctl.$.filter.value = 'test';
- ctl.updateHitCountEl();
- assert.equal(ctl.$.hitCount.textContent, '1 of 2');
- });
-
- test('updateHitCountEl_emptyFilter', function() {
- var ctl = document.createElement('tr-ui-find-control');
- ctl.controller = {
- findNext: function() { },
- findPrevious: function() { },
- reset: function() {},
-
- filterHits: ['a', 'b'],
-
- currentHitIndex: 0
- };
-
- this.addHTMLOutput(ctl);
- ctl.$.filter.value = '';
- ctl.updateHitCountEl();
- assert.equal(ctl.$.hitCount.textContent, '');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/find_controller.html b/chromium/third_party/catapult/tracing/tracing/ui/find_controller.html
deleted file mode 100644
index 223b9621d1a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/find_controller.html
+++ /dev/null
@@ -1,154 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/event_set.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview FindController.
- */
-tr.exportTo('tr.ui', function() {
- var Task = tr.b.Task;
-
- function FindController(brushingStateController) {
- this.brushingStateController_ = brushingStateController;
- this.filterHits_ = [];
- this.currentHitIndex_ = -1;
- this.activePromise_ = Promise.resolve();
- this.activeTask_ = undefined;
- };
-
- FindController.prototype = {
- __proto__: Object.prototype,
-
- get model() {
- return this.brushingStateController_.model;
- },
-
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- enqueueOperation_: function(operation) {
- var task;
- if (operation instanceof tr.b.Task)
- task = operation;
- else
- task = new tr.b.Task(operation, this);
- if (this.activeTask_) {
- this.activeTask_ = this.activeTask_.enqueue(task);
- } else {
- // We're enqueuing the first task, schedule it.
- this.activeTask_ = task;
- this.activePromise_ = Task.RunWhenIdle(this.activeTask_);
- this.activePromise_.then(function() {
- this.activePromise_ = undefined;
- this.activeTask_ = undefined;
- }.bind(this));
- }
- },
-
- /**
- * Updates the filter hits based on the provided |filterText|. Returns a
- * promise which resolves when |filterHits| has been refreshed.
- */
- startFiltering: function(filterText) {
- var sc = this.brushingStateController_;
- if (!sc)
- return;
-
- // TODO(beaudoin): Cancel anything left in the task queue, without
- // invalidating the promise.
- this.enqueueOperation_(function() {
- this.filterHits_ = [];
- this.currentHitIndex_ = -1;
- }.bind(this));
-
- // Try constructing a UIState from the filterText.
- // UIState.fromUserFriendlyString will throw an error only if the string
- // is syntactically correct to a UI state string but with invalid values.
- // It will return undefined if there is no syntactic match.
- var stateFromString;
- try {
- stateFromString = sc.uiStateFromString(filterText);
- } catch (e) {
- this.enqueueOperation_(function() {
- var overlay = new tr.ui.b.Overlay();
- Polymer.dom(overlay).textContent = e.message;
- overlay.title = 'UI State Navigation Error';
- overlay.visible = true;
- });
- return this.activePromise_;
- }
-
- if (stateFromString !== undefined) {
- this.enqueueOperation_(
- sc.navToPosition.bind(this, stateFromString, true));
- } else {
- // filterText is not a navString here -- proceed with find and filter.
- if (filterText.length === 0) {
- this.enqueueOperation_(sc.findTextCleared.bind(sc));
- } else {
- var filter = new tr.c.FullTextFilter(filterText);
- var filterHitSet = new tr.model.EventSet();
- this.enqueueOperation_(sc.addAllEventsMatchingFilterToSelectionAsTask(
- filter, filterHitSet));
- this.enqueueOperation_(function() {
- this.filterHits_ = filterHitSet.toArray();
- sc.findTextChangedTo(filterHitSet);
- }.bind(this));
- }
- }
- return this.activePromise_;
- },
-
- /**
- * Returns the most recent filter hits as an array. Call
- * |startFiltering| to ensure this is up to date after the filter settings
- * have been changed.
- */
- get filterHits() {
- return this.filterHits_;
- },
-
- get currentHitIndex() {
- return this.currentHitIndex_;
- },
-
- find_: function(dir) {
- var firstHit = this.currentHitIndex_ === -1;
- if (firstHit && dir < 0)
- this.currentHitIndex_ = 0;
-
- var N = this.filterHits.length;
- this.currentHitIndex_ = (this.currentHitIndex_ + dir + N) % N;
-
- if (!this.brushingStateController_)
- return;
-
- this.brushingStateController_.findFocusChangedTo(
- new tr.model.EventSet(this.filterHits[this.currentHitIndex]));
- },
-
- findNext: function() {
- this.find_(1);
- },
-
- findPrevious: function() {
- this.find_(-1);
- }
- };
-
- return {
- FindController: FindController
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/find_controller_test.html b/chromium/third_party/catapult/tracing/tracing/ui/find_controller_test.html
deleted file mode 100644
index fed4812a985..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/find_controller_test.html
+++ /dev/null
@@ -1,307 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/find_controller.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Task = tr.b.Task;
-
- /*
- * Just enough of the BrushingStateController to support the tests below.
- */
- function FakeBrushingStateController() {
- this.addAllEventsMatchingFilterToSelectionReturnValue = [];
-
- this.viewport = undefined;
- this.model = undefined;
- this.selection = new tr.model.EventSet();
- this.findMatches = new tr.model.EventSet();
- }
-
- FakeBrushingStateController.prototype = {
- addAllEventsMatchingFilterToSelectionAsTask: function(filter, selection) {
- return new Task(function() {
- var n = this.addAllEventsMatchingFilterToSelectionReturnValue.length;
- for (var i = 0; i < n; i++) {
- selection.push(
- this.addAllEventsMatchingFilterToSelectionReturnValue[i]);
- }
- }, this);
- },
-
- uiStateFromString: function(string) {
- return undefined;
- },
-
- findTextChangedTo: function(selection) {
- this.findMatches = selection;
- this.selection = new tr.model.EventSet();
- },
-
- findFocusChangedTo: function(selection) {
- this.selection = selection;
- },
-
- findTextCleared: function(selection) {
- this.selection = new tr.model.EventSet();
- this.findMatches = new tr.model.EventSet();
- }
- };
-
- function assertArrayShallowEquals(a, b, opt_message) {
- if (a.length === b.length) {
- var ok = true;
- for (var i = 0; i < a.length; i++) {
- ok &= (a[i] === b[i]);
- }
- if (ok)
- return;
- }
-
- var message = opt_message || 'Expected array ' + a + ', got array ' + b;
- throw new tr.b.unittest.TestError(message);
- };
-
- test('findControllerNoModel', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
- controller.findNext();
- controller.findPrevious();
- });
-
- test('findControllerEmptyHit', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
-
- brushingStateController.selection = new tr.model.EventSet();
- brushingStateController.findMatches = new tr.model.EventSet();
- controller.findNext();
- assertArrayShallowEquals([], brushingStateController.selection);
- assertArrayShallowEquals([], brushingStateController.findMatches);
- controller.findPrevious();
- assertArrayShallowEquals([], brushingStateController.selection);
- assertArrayShallowEquals([], brushingStateController.findMatches);
- });
-
- test('findControllerOneHit', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
-
- var s1 = {guid: 1};
- brushingStateController.addAllEventsMatchingFilterToSelectionReturnValue = [
- s1
- ];
- var promise = controller.startFiltering('asdf');
- promise.then(function() {
- assertArrayShallowEquals([], brushingStateController.selection);
- assertArrayShallowEquals([s1], brushingStateController.findMatches);
- controller.findNext();
- assertArrayShallowEquals([s1], brushingStateController.selection);
- assertArrayShallowEquals([s1], brushingStateController.findMatches);
- controller.findNext();
- assertArrayShallowEquals([s1], brushingStateController.selection);
- assertArrayShallowEquals([s1], brushingStateController.findMatches);
- controller.findPrevious();
- assertArrayShallowEquals([s1], brushingStateController.selection);
- assertArrayShallowEquals([s1], brushingStateController.findMatches);
- });
- return promise;
- });
-
- test('findControllerMultipleHits', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
-
- var s1 = {guid: 1};
- var s2 = {guid: 2};
- var s3 = {guid: 3};
-
- brushingStateController.addAllEventsMatchingFilterToSelectionReturnValue = [
- s1, s2, s3
- ];
- var promise = controller.startFiltering('asdf');
- promise.then(function() {
- // Loop through hits then when we wrap, try moving backward.
- assertArrayShallowEquals([], brushingStateController.selection);
- assertArrayShallowEquals([s1, s2, s3],
- brushingStateController.findMatches);
- controller.findNext();
- assertArrayShallowEquals([s1], brushingStateController.selection);
- controller.findNext();
- assertArrayShallowEquals([s2], brushingStateController.selection);
- controller.findNext();
- assertArrayShallowEquals([s3], brushingStateController.selection);
- controller.findNext();
- assertArrayShallowEquals([s1], brushingStateController.selection);
- controller.findPrevious();
- assertArrayShallowEquals([s3], brushingStateController.selection);
- controller.findPrevious();
- assertArrayShallowEquals([s2], brushingStateController.selection);
- assertArrayShallowEquals([s1, s2, s3],
- brushingStateController.findMatches);
- });
- return promise;
- });
-
- test('findControllerChangeFilterAfterNext', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
-
- var s1 = {guid: 1};
- var s2 = {guid: 2};
- var s3 = {guid: 3};
- var s4 = {guid: 4};
-
- brushingStateController.addAllEventsMatchingFilterToSelectionReturnValue = [
- s1, s2, s3
- ];
- var promise = controller.startFiltering('asdf');
- promise.then(function() {
- // Loop through hits then when we wrap, try moving backward.
- controller.findNext();
- brushingStateController.
- addAllEventsMatchingFilterToSelectionReturnValue = [s4];
-
- var nextPromise = controller.startFiltering('asdfsf');
- nextPromise.then(function() {
- controller.findNext();
- assertArrayShallowEquals([s4], brushingStateController.selection);
- });
- });
- return promise;
- });
-
- test('findControllerSelectsAllItemsFirst', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
-
- var s1 = {guid: 1};
- var s2 = {guid: 2};
- var s3 = {guid: 3};
- brushingStateController.addAllEventsMatchingFilterToSelectionReturnValue = [
- s1, s2, s3
- ];
- var promise = controller.startFiltering('asdfsf');
- promise.then(function() {
- assertArrayShallowEquals([], brushingStateController.selection);
- assertArrayShallowEquals([s1, s2, s3],
- brushingStateController.findMatches);
- controller.findNext();
- assertArrayShallowEquals([s1], brushingStateController.selection);
- controller.findNext();
- assertArrayShallowEquals([s2], brushingStateController.selection);
- assertArrayShallowEquals([s1, s2, s3],
- brushingStateController.findMatches);
- });
- return promise;
- });
-
- test('findControllerWithRealTimeline', function() {
- var model = tr.c.TestUtils.newModel(function(model) {
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(new tr.model.ThreadSlice(
- '', 'a', 0, 1, {}, 3));
- model.t1 = t1;
- });
-
- var container = document.createElement('track-view-container');
- container.id = 'track_view_container';
-
- var timeline = document.createElement('tr-ui-timeline-view');
- Polymer.dom(timeline).appendChild(container);
-
- // This is for testing only, have to make sure things link up right.
- timeline.trackViewContainer_ = container;
-
- timeline.model = model;
-
- var brushingStateController = timeline.brushingStateController;
- var controller = timeline.findCtl_.controller;
-
- // Test find with no filterText.
- controller.findNext();
-
- // Test find with filter txt.
- var promise = controller.startFiltering('a');
- promise = promise.then(function() {
- assert.equal(brushingStateController.selection.length, 0);
- assert.deepEqual(tr.b.asArray(brushingStateController.findMatches),
- model.t1.sliceGroup.slices);
-
- controller.findNext();
- assert.isTrue(brushingStateController.selection.equals(
- new tr.model.EventSet(model.t1.sliceGroup.slices[0])));
-
- var nextPromise = controller.startFiltering('xxx');
- nextPromise.then(function() {
- assert.equal(brushingStateController.findMatches.length, 0);
- assert.equal(brushingStateController.selection.length, 1);
- controller.findNext();
- assert.equal(brushingStateController.selection.length, 0);
- controller.findNext();
- assert.equal(brushingStateController.selection.length, 0);
- });
- return nextPromise;
- });
- return promise;
- });
-
- test('findControllerNavigation', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
-
- var navToPositionCallCount = 0;
- var findTextClearedCallCount = 0;
- var fakeUIState = {};
- brushingStateController.uiStateFromString = function(string) {
- if (string === '')
- return undefined;
- assert.equal(string, '2000@1.2x7');
- return fakeUIState;
- };
- brushingStateController.navToPosition = function(uiState) {
- assert.equal(uiState, fakeUIState);
- navToPositionCallCount++;
- };
- brushingStateController.findTextCleared = function() {
- findTextClearedCallCount++;
- };
-
- var promise = controller.startFiltering('2000@1.2x7').then(function() {
- assert.equal(navToPositionCallCount, 1);
- });
- promise = promise.then(controller.startFiltering.bind(controller, ''));
- promise = promise.then(function() {
- assert.equal(findTextClearedCallCount, 1);
- });
- return promise;
- });
-
- test('findControllerClearAfterSet', function() {
- var brushingStateController = new FakeBrushingStateController();
- var controller = new tr.ui.FindController(brushingStateController);
- var findTextChangedToCalled = false;
- brushingStateController.findTextChangedTo = function(selection) {
- findTextChangedToCalled = true;
- };
- brushingStateController.findTextCleared = function() {
- assert.equal(findTextChangedToCalled, true);
- };
- controller.startFiltering('1');
- controller.startFiltering('');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-left.png b/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-left.png
deleted file mode 100644
index 8eef2bf7ecc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-left.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-mid.png b/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-mid.png
deleted file mode 100644
index c67e697de5f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-mid.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-right.png b/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-right.png
deleted file mode 100644
index 834004a0f74..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/images/chrome-right.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/images/ui-states.png b/chromium/third_party/catapult/tracing/tracing/ui/images/ui-states.png
deleted file mode 100644
index 83d09179817..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/images/ui-states.png
+++ /dev/null
Binary files differ
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/metrics_debugger_app.html b/chromium/third_party/catapult/tracing/tracing/ui/metrics_debugger_app.html
deleted file mode 100644
index 72c30ca4579..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/metrics_debugger_app.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/extras/full_config.html">
-<link rel="import" href="/tracing/importer/import.html">
-<link rel="import" href="/tracing/metrics/all_metrics.html">
-<link rel="import" href="/tracing/metrics/metric_map_function.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/mre/mre_result.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/file.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<dom-module id='tracing-ui-metrics-debugger-app'>
- <style>
- pre {
- overflow: auto;
- }
- #bar {
- display: flex;
- flex-direction: row;
- padding: 1px 6px;
- }
- </style>
-
- <template>
- <top-left-controls id="top_left_controls"></top-left-controls>
- <input id="load_trace" type="file"/>
- <button id="run_metric">Run metric</button>
- <div id="trace_info"></div>
- <pre id="map_results">
- </pre>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui', function() {
- Polymer({
- is: 'tracing-ui-metrics-debugger-app',
- created: function() {
- this.metrics_ = [];
- tr.metrics.MetricRegistry.getAllRegisteredTypeInfos().forEach(
- function(m) {
- this.metrics_.push({
- label: m.constructor.name,
- value: m.constructor.name
- });
- }, this);
- this.activeTrace_ = undefined;
- this.settingsKey_ = undefined;
- this.currentMetricName_ = undefined;
- this.settingsKey_ = 'metrics-debugger-app-metric-name';
- },
-
- ready: function() {
- var metricSelector = tr.ui.b.createSelector(
- this, 'currentMetricName_',
- this.settingsKey_,
- this.metrics_[0].value,
- this.metrics_);
- Polymer.dom(this.$.top_left_controls).appendChild(
- metricSelector);
-
- this.$.load_trace.addEventListener('change', function(event) {
- var file = event.target.files[0];
- this.onTraceFileSelected_(file);
- }.bind(this));
- this.$.run_metric.addEventListener(
- 'click', function(event) {
- event.stopPropagation();
- this.onRunMetricClicked_();
- }.bind(this));
- },
-
- onRunMetricClicked_: function() {
- if (this.activeTrace_ === undefined) {
- tr.ui.b.Overlay.showError('You must load a trace first!');
- return;
- }
- var result = new tr.mre.MreResult();
- var model = this.activeTrace_.model;
- var options = {metrics: [this.currentMetricName_]};
- try {
- tr.metrics.metricMapFunction(result, model, options);
- this.set(
- '$.map_results.textContent',
- 'Metric result:\n' + JSON.stringify(result.asDict(), undefined, 2));
- } catch (err) {
- tr.ui.b.Overlay.showError('Error running metric:\n' + err.stack);
- console.error(err);
- }
- },
-
- onTraceFileSelected_: function(file) {
- tr.ui.b.readFile(file).then(
- function(data) {
- this.setActiveTrace(file.name, data);
- }.bind(this),
- function(err) {
- tr.ui.b.Overlay.showError('Error while loading file: ' + err);
- });
- },
-
- setActiveTrace: function(filename, data) {
- var model = new tr.Model();
- var importOptions = new tr.importer.ImportOptions();
- importOptions.pruneEmptyContainers = false;
- importOptions.showImportWarnings = true;
- importOptions.trackDetailedModelStats = true;
-
- var i = new tr.importer.Import(model, importOptions);
- i.importTracesWithProgressDialog([data]).then(
- function() {
- this.activeTrace_ = {
- filename: filename,
- model: model,
- };
- Polymer.dom(this.$.trace_info).textContent = 'Trace file ' +
- filename + ' is loaded.';
- }.bind(this),
- function(err) {
- tr.ui.b.Overlay.showError('Trace import error: ' + err);
- console.error(err);
- });
- },
- });
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/scripting_control.html b/chromium/third_party/catapult/tracing/tracing/ui/scripting_control.html
deleted file mode 100644
index 22d8bd183ac..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/scripting_control.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/tquery/tquery.html">
-
-<dom-module id='tr-ui-scripting-control'>
- <template>
- <style>
- :host {
- flex: 1 1 auto;
- }
- .root {
- font-family: monospace;
- cursor: text;
-
- padding: 2px;
- margin: 2px;
- border: 1px solid rgba(0, 0, 0, 0.5);
- background: white;
-
- height: 100px;
- overflow-y: auto;
-
- transition-property: opacity, height, padding, margin;
- transition-duration: .2s;
- transition-timing-function: ease-out;
- }
- .hidden {
- margin-top: 0px;
- margin-bottom: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- height: 0px;
- opacity: 0;
- }
- .focused {
- outline: auto 5px -webkit-focus-ring-color;
- }
- #history {
- -webkit-user-select: text;
- color: #777;
- }
- #prompt {
- -webkit-user-select: text;
- -webkit-user-modify: read-write-plaintext-only;
- text-overflow: clip !important;
- text-decoration: none !important;
- }
- #prompt:focus {
- outline: none;
- }
- #prompt br {
- display: none;
- }
- #prompt ::before {
- content: ">";
- color: #468;
- }
- </style>
-
- <div id="root" class="root hidden" tabindex="0"
- on-focus="onConsoleFocus">
- <div id='history'></div>
- <div id='prompt'
- on-keypress="promptKeyPress"
- on-keydown="promptKeyDown"
- on-blur="onConsoleBlur"></div>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-scripting-control',
-
- _isEnterKey: function(event) {
- // Check if in IME.
- // Remove keyIdentifier after reference build rolls past M51 when
- // KeyboardEvent.key was added.
- return event.keyCode !== 229 &&
- (event.key === 'Enter' || event.keyIdentifier === 'Enter');
- },
-
- _setFocused: function(focused) {
- var promptEl = this.$.prompt;
- if (focused) {
- promptEl.focus();
- Polymer.dom(this.$.root).classList.add('focused');
- // Move cursor to the end of any existing text.
- if (promptEl.innerText.length > 0) {
- var sel = window.getSelection();
- sel.collapse(
- Polymer.dom(promptEl).firstChild, promptEl.innerText.length);
- }
- } else {
- promptEl.blur();
- Polymer.dom(this.$.root).classList.remove('focused');
- // Workaround for crbug.com/89026 to ensure the prompt doesn't retain
- // keyboard focus.
- var parent = promptEl.parentElement;
- var nextEl = Polymer.dom(promptEl).nextSibling;
- promptEl.remove();
- Polymer.dom(parent).insertBefore(promptEl, nextEl);
- }
- },
-
- onConsoleFocus: function(e) {
- e.stopPropagation();
- this._setFocused(true);
- },
-
- onConsoleBlur: function(e) {
- e.stopPropagation();
- this._setFocused(false);
- },
-
- promptKeyDown: function(e) {
- e.stopPropagation();
- if (!this._isEnterKey(e))
- return;
- e.preventDefault();
- var promptEl = this.$.prompt;
- var command = promptEl.innerText;
- if (command.length === 0)
- return;
- promptEl.innerText = '';
- this.addLine_(String.fromCharCode(187) + ' ' + command);
-
- try {
- var result = this.controller_.executeCommand(command);
- } catch (e) {
- result = e.stack || e.stackTrace;
- }
-
- if (result instanceof tr.e.tquery.TQuery) {
- // TODO(skyostil): Show a cool spinner.
- result.ready().then(function(selection) {
- this.addLine_(selection.length + ' matches');
- this.controller_.brushingStateController.
- showScriptControlSelection(selection);
- }.bind(this));
- } else {
- this.addLine_(result);
- }
- promptEl.scrollIntoView();
- },
-
- addLine_: function(line) {
- var historyEl = this.$.history;
- if (historyEl.innerText.length !== 0)
- historyEl.innerText += '\n';
- historyEl.innerText += line;
- },
-
- promptKeyPress: function(e) {
- e.stopPropagation();
- },
-
- toggleVisibility: function() {
- var root = this.$.root;
- if (!this.visible) {
- Polymer.dom(root).classList.remove('hidden');
- this._setFocused(true);
- } else {
- Polymer.dom(root).classList.add('hidden');
- this._setFocused(false);
- }
- },
-
- get hasFocus() {
- return this === document.activeElement;
- },
-
- get visible() {
- var root = this.$.root;
- return !Polymer.dom(root).classList.contains('hidden');
- },
-
- get controller() {
- return this.controller_;
- },
-
- set controller(c) {
- this.controller_ = c;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/scripting_control_test.html b/chromium/third_party/catapult/tracing/tracing/ui/scripting_control_test.html
deleted file mode 100644
index a336b9f566a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/scripting_control_test.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/scripting_control.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var ctl = document.createElement('tr-ui-scripting-control');
- this.addHTMLOutput(ctl);
- ctl.toggleVisibility();
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel.html
deleted file mode 100644
index a2e80c29966..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel.html
+++ /dev/null
@@ -1,219 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/base/grouping_table.html">
-<link rel="import" href="/tracing/ui/base/grouping_table_groupby_picker.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-<link rel="import" href="/tracing/value/numeric.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id='tr-ui-sp-file-size-stats-side-panel'>
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- toolbar {
- align-items: center;
- background-color: rgb(236, 236, 236);
- border-bottom: 1px solid #8e8e8e;
- display: flex;
- flex-direction: row;
- flex-direction: row;
- flex: 0 0 auto;
- font-size: 12px;
- padding: 0 10px 0 10px;
- }
- table-container {
- display: flex;
- min-height: 0px;
- overflow-y: auto;
- }
- </style>
-
- <toolbar>
- <span><b>Group by:</b></span>
- <tr-ui-b-grouping-table-groupby-picker id="picker">
- </tr-ui-b-grouping-table-groupby-picker>
- </toolbar>
- <table-container>
- <tr-ui-b-grouping-table id="table"></tr-ui-b-grouping-table>
- </table-container>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-(function() {
-
- Polymer({
- is: 'tr-ui-sp-file-size-stats-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
- ready: function() {
- this.model_ = undefined;
- this.selection_ = new tr.model.EventSet();
- this.$.picker.settingsKey = 'tr-ui-sp-file-size-stats-side-panel-picker';
- this.$.picker.possibleGroups = [
- {
- key: 'phase', label: 'Event Type',
- dataFn: function(eventStat) { return eventStat.phase; }
- },
- {
- key: 'category', label: 'Category',
- dataFn: function(eventStat) { return eventStat.category; }
- },
- {
- key: 'title', label: 'Title',
- dataFn: function(eventStat) { return eventStat.title; }
- }
- ];
- this.$.picker.defaultGroupKeys = ['phase', 'title'];
- this.$.picker.addEventListener('current-groups-changed',
- this.updateContents_.bind(this));
- },
-
- get textLabel() {
- return 'File Size Stats';
- },
-
- supportsModel: function(m) {
- if (!m) {
- return {
- supported: false,
- reason: 'No stats were collected for this file.'
- };
- }
-
- if (m.stats.allTraceEventStats.length === 0) {
- return {
- supported: false,
- reason: 'No stats were collected for this file.'
- };
- }
- return {
- supported: true
- };
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
- },
-
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- set rangeOfInterest(rangeOfInterest) {
- this.rangeOfInterest_ = rangeOfInterest;
- },
-
- get selection() {
- return this.selection_;
- },
-
- set selection(selection) {
- this.selection_ = selection;
- },
-
- createColumns_: function(stats) {
- var columns = [
- {
- title: 'Title',
- value: function(row) {
- var titleEl = document.createElement('span');
- Polymer.dom(titleEl).textContent = row.title;
- titleEl.style.textOverflow = 'ellipsis';
- return titleEl;
- },
- cmp: function(a, b) {
- return a.title.localeCompare(b.title);
- },
- width: '400px'
- },
- {
- title: 'Num Events',
- align: tr.ui.b.TableFormat.ColumnAlignment.RIGHT,
- value: function(row) {
- return row.rowStats.numEvents;
- },
- cmp: function(a, b) {
- return a.rowStats.numEvents - b.rowStats.numEvents;
- },
- width: '80px'
- }
- ];
-
- if (stats && stats.hasEventSizesinBytes) {
- columns.push({
- title: 'Bytes',
- align: tr.ui.b.TableFormat.ColumnAlignment.RIGHT,
- value: function(row) {
- var value = new tr.v.ScalarNumeric(tr.b.Unit.byName.sizeInBytes,
- row.rowStats.totalEventSizeinBytes);
- var spanEl = tr.v.ui.createScalarSpan(value);
- return spanEl;
- },
- cmp: function(a, b) {
- return a.rowStats.totalEventSizeinBytes -
- b.rowStats.totalEventSizeinBytes;
- },
- width: '80px'
- });
- }
- return columns;
- },
-
- updateContents_: function() {
- var table = this.$.table;
-
- var columns = this.createColumns_(this.model.stats);
- table.rowStatsConstructor = function ModelStatsRowStats(row) {
- var sum = tr.b.Statistics.sum(row.data, function(x) {
- return x.numEvents;
- });
- var totalEventSizeinBytes = tr.b.Statistics.sum(row.data, function(x) {
- return x.totalEventSizeinBytes;
- });
- return {
- numEvents: sum,
- totalEventSizeinBytes: totalEventSizeinBytes
- };
- };
- table.tableColumns = columns;
- table.sortColumnIndex = 1;
- table.sortDescending = true;
- table.selectionMode = tr.ui.b.TableFormat.SelectionMode.ROW;
-
- table.groupBy = this.$.picker.currentGroups.map(function(group) {
- return group.dataFn;
- });
-
- if (!this.model) {
- table.dataToGroup = [];
- } else {
- table.dataToGroup = this.model.stats.allTraceEventStats;
- }
- this.$.table.rebuild();
- }
- });
-
- tr.ui.side_panel.SidePanelRegistry.register(function() {
- return document.createElement('tr-ui-sp-file-size-stats-side-panel');
- });
-})();
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel_test.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel_test.html
deleted file mode 100644
index 75c389c83c2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/file_size_stats_side_panel_test.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/side_panel/file_size_stats_side_panel.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TestUtils = tr.c.TestUtils;
-
- function createModel(opt_customizeModelCallback) {
- return TestUtils.newModel(function(model) {
- var modelStats = model.stats;
- modelStats.willProcessBasicTraceEvent('X', 'cat1', 'title1');
- modelStats.willProcessBasicTraceEvent('X', 'cat1', 'title1');
- modelStats.willProcessBasicTraceEvent('X', 'cat2', 'title1');
- modelStats.willProcessBasicTraceEvent('X', 'cat2', 'title3');
- modelStats.willProcessBasicTraceEvent('Y', 'cat3', 'title3');
- });
- }
-
- test('instantiate', function() {
- var panel = document.createElement('tr-ui-sp-file-size-stats-side-panel');
- panel.model = createModel();
- panel.style.height = '200px';
- this.addHTMLOutput(panel);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/metrics_side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/metrics_side_panel.html
deleted file mode 100644
index 94990b467f2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/metrics_side_panel.html
+++ /dev/null
@@ -1,216 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/metrics/metric_map_function.html">
-<link rel="import" href="/tracing/metrics/metric_registry.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/mre/mre_result.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-<link rel="import" href="/tracing/value/ui/value_set_view.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<dom-module id="tr-ui-sp-metrics-side-panel">
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: column;
- }
- div#error {
- color: red;
- }
- #results {
- font-size: 12px;
- }
- </style>
-
- <top-left-controls id="top_left_controls"></top-left-controls>
-
- <tr-v-ui-value-set-view id="results"></tr-v-ui-value-set-view>
-
- <div id="error"></div>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-tr.exportTo('tr.ui', function() {
- Polymer({
- is: 'tr-ui-sp-metrics-side-panel',
- behaviors: [tr.ui.behaviors.SidePanel],
-
- ready: function() {
- this.model_ = undefined;
-
- this.rangeOfInterest_ = undefined;
- this.metricLatenciesMs_ = [];
-
- this.metrics_ = [];
- tr.metrics.MetricRegistry.getAllRegisteredTypeInfos().forEach(
- function(m) {
- if (m.constructor.name === 'sampleMetric')
- return;
- this.metrics_.push({
- label: m.constructor.name,
- value: m.constructor.name
- });
- }, this);
-
- this.settingsKey_ = 'metrics-side-panel-metric-name';
- this.currentMetricName_ = 'systemHealthMetrics';
- var metricSelector = tr.ui.b.createSelector(
- this, 'currentMetricName_',
- this.settingsKey_,
- this.currentMetricName_,
- this.metrics_);
- Polymer.dom(this.$.top_left_controls).appendChild(metricSelector);
- metricSelector.addEventListener('change',
- this.onMetricChange_.bind(this));
- this.currentMetricTypeInfo_ =
- tr.metrics.MetricRegistry.findTypeInfoWithName(
- this.currentMetricName_);
-
- this.recomputeButton_ = tr.ui.b.createButton(
- 'Recompute', this.onRecompute_, this);
- Polymer.dom(this.$.top_left_controls).appendChild(this.recomputeButton_);
- },
-
- /**
- * Return an estimate of how many milliseconds it would take to re-run the
- * metric. If the metric has not been run, return undefined.
- *
- * @return {undefined|number}
- */
- get metricLatencyMs() {
- return tr.b.Statistics.mean(this.metricLatenciesMs_);
- },
-
- onMetricChange_: function() {
- this.currentMetricTypeInfo_ =
- tr.metrics.MetricRegistry.findTypeInfoWithName(
- this.currentMetricName_);
- this.metricLatenciesMs_ = [];
- this.updateContents_();
- },
-
- onRecompute_: function() {
- this.updateContents_();
- },
-
- get textLabel() {
- return 'Metrics';
- },
-
- supportsModel: function(m) {
- if (!m) {
- return {
- supported: false,
- reason: 'No model available'
- };
- }
-
- return {
- supported: true
- };
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
- },
-
- get selection() {
- // Not applicable to metrics.
- },
-
- set selection(_) {
- // Not applicable to metrics.
- },
-
- /**
- * @return {undefined|!tr.b.Range}
- */
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- /**
- * This may be called rapidly as the mouse is moved.
- * If the metric supportsRangeOfInterest and takes less than 100ms, then it
- * will be re-run immediately; otherwise, the Recompute button will be
- * enabled.
- *
- * @param {!tr.b.Range} range
- */
- set rangeOfInterest(range) {
- this.rangeOfInterest_ = range;
-
- if (this.currentMetricTypeInfo_ &&
- this.currentMetricTypeInfo_.metadata.supportsRangeOfInterest) {
- if ((this.metricLatencyMs === undefined) ||
- (this.metricLatencyMs < 100)) {
- this.updateContents_();
- } else {
- this.recomputeButton_.style.background = 'red';
- }
- }
- },
-
- updateContents_: function() {
- Polymer.dom(this.$.error).textContent = '';
- this.$.results.style.display = 'none';
-
- if (!this.model_) {
- Polymer.dom(this.$.error).textContent = 'Missing model';
- return;
- }
-
- var options = {metrics: [this.currentMetricName_]};
-
- if (this.currentMetricTypeInfo_ &&
- this.currentMetricTypeInfo_.metadata.supportsRangeOfInterest &&
- this.rangeOfInterest &&
- !this.rangeOfInterest.isEmpty)
- options.rangeOfInterest = this.rangeOfInterest;
-
- var startDate = new Date();
- try {
- var values = tr.metrics.runMetrics(this.model_, options);
- } catch (err) {
- console.warn(
- this.currentMetricName_ +
- ' could not be computed for the current model:\n' +
- err.stack);
- Polymer.dom(this.$.error).textContent = err.message;
- return;
- }
-
- this.metricLatenciesMs_.push(new Date() - startDate);
- while (this.metricLatenciesMs_.length > 20)
- this.metricLatenciesMs_.shift();
-
- this.recomputeButton_.style.background = '';
-
- this.$.results.style.display = '';
- this.$.results.values = values;
- }
- });
-
- tr.ui.side_panel.SidePanelRegistry.register(function() {
- return document.createElement('tr-ui-sp-metrics-side-panel');
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel.html
deleted file mode 100644
index fd39923d190..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.behaviors', function() {
-
- var SidePanel = {
-
- get rangeOfInterest() {
- throw new Error('Not implemented');
- },
-
- set rangeOfInterest(rangeOfInterest) {
- throw new Error('Not implemented');
- },
-
- get selection() {
- throw new Error('Not implemented');
- },
-
- set selection(selection) {
- throw new Error('Not implemented');
- },
-
- get model() {
- throw new Error('Not implemented');
- },
-
- set model(model) {
- throw new Error('Not implemented');
- },
-
- supportsModel: function(m) {
- throw new Error('Not implemented');
- }
- };
-
- return {
- SidePanel: SidePanel
- };
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container.html
deleted file mode 100644
index 2f2067f2e84..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container.html
+++ /dev/null
@@ -1,257 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-
-<dom-module id='tr-ui-side-panel-container'>
- <template>
- <style>
- :host {
- align-items: stretch;
- display: -webkit-flex;
- background-color: white;
- }
-
- :host([expanded]) > #side_panel_drag_handle,
- :host([expanded]) > active-panel-container {
- -webkit-flex: 1 1 auto;
- border-left: 1px solid black;
- display: -webkit-flex;
- }
-
- :host(:not([expanded])) > #side_panel_drag_handle,
- :host(:not([expanded])) > active-panel-container {
- display: none;
- }
-
- active-panel-container {
- display: flex;
- }
-
- tab-strip {
- -webkit-flex: 0 0 auto;
- -webkit-flex-direction: column;
- -webkit-user-select: none;
- background-color: rgb(236, 236, 236);
- border-left: 1px solid black;
- cursor: default;
- display: -webkit-flex;
- min-width: 18px; /* workaround for flexbox and writing-mode mixing bug */
- padding: 10px 0 10px 0;
- font-size: 12px;
- }
-
- tab-strip > tab-strip-label {
- -webkit-writing-mode: vertical-rl;
- display: inline;
- margin-right: 1px;
- min-height: 20px;
- padding: 15px 3px 15px 1px;
- }
-
- tab-strip >
- tab-strip-label:not([enabled]) {
- color: rgb(128, 128, 128);
- }
-
- tab-strip > tab-strip-label[selected] {
- background-color: white;
- border: 1px solid rgb(163, 163, 163);
- border-left: none;
- padding: 14px 2px 14px 1px;
- }
-
- #active_panel_container {
- overflow: auto;
- }
- </style>
-
- <tr-ui-b-drag-handle id="side_panel_drag_handle"></tr-ui-b-drag-handle>
- <active-panel-container id='active_panel_container'>
- </active-panel-container>
- <tab-strip id='tab_strip'></tab-strip>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tr-ui-side-panel-container',
-
- ready: function() {
- this.activePanelContainer_ = this.$.active_panel_container;
- this.tabStrip_ = this.$.tab_strip;
-
- this.dragHandle_ = this.$.side_panel_drag_handle;
- this.dragHandle_.horizontal = false;
- this.dragHandle_.target = this.activePanelContainer_;
- this.rangeOfInterest_ = new tr.b.Range();
- this.brushingStateController_ = undefined;
- this.onSelectionChanged_ = this.onSelectionChanged_.bind(this);
- this.onModelChanged_ = this.onModelChanged_.bind(this);
- },
-
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- set brushingStateController(brushingStateController) {
- if (this.brushingStateController) {
- this.brushingStateController_.removeEventListener(
- 'change', this.onSelectionChanged_);
- this.brushingStateController_.removeEventListener(
- 'model-changed', this.onModelChanged_);
- }
- this.brushingStateController_ = brushingStateController;
- if (this.brushingStateController) {
- this.brushingStateController_.addEventListener(
- 'change', this.onSelectionChanged_);
- this.brushingStateController_.addEventListener(
- 'model-changed', this.onModelChanged_);
- }
- },
-
- onSelectionChanged_: function() {
- if (this.activePanel)
- this.activePanel.selection = this.selection;
- },
-
- get model() {
- return this.brushingStateController_.model;
- },
-
- onModelChanged_: function() {
- this.activePanelType_ = undefined;
- this.updateContents_();
- },
-
- get expanded() {
- this.hasAttribute('expanded');
- },
-
- get activePanel() {
- return this.activePanelContainer_.children[0];
- },
-
- get activePanelType() {
- return this.activePanelType_;
- },
-
- set activePanelType(panelType) {
- if (this.model === undefined)
- throw new Error('Cannot activate panel without a model');
-
- var panel = undefined;
- if (panelType)
- panel = document.createElement(panelType);
-
- if (panel !== undefined && !panel.supportsModel(this.model))
- throw new Error('Cannot activate panel: does not support this model');
-
- if (this.activePanelType) {
- Polymer.dom(this.getLabelElementForPanelType_(
- this.activePanelType)).removeAttribute('selected');
- }
-
- if (this.activePanelType) {
- this.getLabelElementForPanelType_(
- this.activePanelType).removeAttribute('selected');
- }
-
- if (this.activePanel)
- this.activePanelContainer_.removeChild(this.activePanel);
-
- if (panelType === undefined) {
- Polymer.dom(this).removeAttribute('expanded');
- this.activePanelType_ = undefined;
- return;
- }
-
- Polymer.dom(this.getLabelElementForPanelType_(panelType)).
- setAttribute('selected', true);
- Polymer.dom(this).setAttribute('expanded', true);
-
- Polymer.dom(this.activePanelContainer_).appendChild(panel);
- panel.rangeOfInterest = this.rangeOfInterest_;
- panel.selection = this.selection_;
- panel.model = this.model;
-
- this.activePanelType_ = panelType;
- },
-
- getPanelTypeForConstructor_: function(constructor) {
- for (var i = 0; i < this.tabStrip_.children.length; i++) {
- if (this.tabStrip_.children[i].panelType.constructor === constructor)
- return this.tabStrip_.children[i].panelType;
- }
- },
-
- getLabelElementForPanelType_: function(panelType) {
- for (var i = 0; i < this.tabStrip_.children.length; i++) {
- if (this.tabStrip_.children[i].panelType === panelType)
- return this.tabStrip_.children[i];
- }
- return undefined;
- },
-
- updateContents_: function() {
- var previouslyActivePanelType = this.activePanelType;
-
- Polymer.dom(this.tabStrip_).textContent = '';
- var supportedPanelTypes = [];
-
- for (var panelTypeInfo of
- tr.ui.side_panel.SidePanelRegistry.getAllRegisteredTypeInfos()) {
- var labelEl = document.createElement('tab-strip-label');
- var panel = panelTypeInfo.constructor();
- var panelType = panel.tagName;
-
- Polymer.dom(labelEl).textContent = panel.textLabel;
- labelEl.panelType = panelType;
-
- var supported = panel.supportsModel(this.model);
- if (this.model && supported.supported) {
- supportedPanelTypes.push(panelType);
- Polymer.dom(labelEl).setAttribute('enabled', true);
- labelEl.addEventListener('click', function(panelType) {
- this.activePanelType =
- this.activePanelType === panelType ? undefined : panelType;
- }.bind(this, panelType));
- } else {
- if (this.activePanel)
- this.activePanelContainer_.removeChild(this.activePanel);
- this.removeAttribute('expanded');
- }
- Polymer.dom(this.tabStrip_).appendChild(labelEl);
- }
-
- // Restore the active panel, or collapse
- if (previouslyActivePanelType &&
- supportedPanelTypes.indexOf(previouslyActivePanelType) !== -1) {
- this.activePanelType = previouslyActivePanelType;
- Polymer.dom(this).setAttribute('expanded', true);
- } else {
- if (this.activePanel)
- Polymer.dom(this.activePanelContainer_).removeChild(this.activePanel);
- Polymer.dom(this).removeAttribute('expanded');
- }
- },
-
- get rangeOfInterest() {
- return this.rangeOfInterest_;
- },
-
- set rangeOfInterest(range) {
- if (range === undefined)
- throw new Error('Must not be undefined');
- this.rangeOfInterest_ = range;
- if (this.activePanel)
- this.activePanel.rangeOfInterest = range;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container_test.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container_test.html
deleted file mode 100644
index 8dc296c336a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_container_test.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/side_panel/time_summary_side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_container.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function FakeBrushingStateController() {
- this.addAllEventsMatchingFilterToSelectionReturnValue = [];
-
- this.viewport = undefined;
- this.model = undefined;
- this.selection = new tr.model.EventSet();
- this.highlight = new tr.model.EventSet();
- }
-
- FakeBrushingStateController.prototype = {
- addEventListener: function(name, cb) {
- }
- };
-
- function createModel() {
- var m = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(m) {
- var browserProcess = m.getOrCreateProcess(1);
- var browserMain = browserProcess.getOrCreateThread(2);
- browserMain.sliceGroup.beginSlice('cat', 'Task', 0);
- browserMain.sliceGroup.endSlice(10);
- browserMain.sliceGroup.beginSlice('cat', 'Task', 20);
- browserMain.sliceGroup.endSlice(30);
- }
- });
- return m;
- }
-
- test('instantiateCollapsed', function() {
- var brushingStateController = new FakeBrushingStateController();
- brushingStateController.model = createModel();
-
- var container = document.createElement('tr-ui-side-panel-container');
- container.brushingStateController = brushingStateController;
- this.addHTMLOutput(container);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry.html
deleted file mode 100644
index ef86dbe06dd..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-
-<script>
-'use strict';
-
-// TODO(charliea): This can probably be cleaned up so that we don't have to
-// manually wrap the Polymer element names with a function and
-// `document.createElement` at each of the registration sites by creating a
-// new "Polymer" registration mode.
-tr.exportTo('tr.ui.side_panel', function() {
- /**
- * SidePanelRegistry is an entity for side panel Polymer elements to register
- * on so that they'll render a side panel if the model has the correct data.
- *
- * Example usage:
- *
- * SidePanelRegistry.register(function() {
- * return document.createElement('my-side-panel');
- * });
- *
- * @constructor
- */
- function SidePanelRegistry() {}
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- tr.b.decorateExtensionRegistry(SidePanelRegistry, options);
-
- return {
- SidePanelRegistry: SidePanelRegistry
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry_test.html b/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry_test.html
deleted file mode 100644
index 9e91ce0494f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/side_panel/side_panel_registry_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var SidePanelRegistry = tr.ui.side_panel.SidePanelRegistry;
-
- var testOptions = {
- setUp: function() {
- SidePanelRegistry.pushCleanStateBeforeTest();
- },
-
- tearDown: function() {
- SidePanelRegistry.popCleanStateAfterTest();
- },
- };
-
- test('register', function() {
- SidePanelRegistry.register(function() {
- return document.createElement('div');
- });
- SidePanelRegistry.register(function() {
- return document.createElement('span');
- });
-
- var typeInfos = SidePanelRegistry.getAllRegisteredTypeInfos();
- assert.equal(typeInfos[0].constructor().tagName, 'DIV');
- assert.equal(typeInfos[1].constructor().tagName, 'SPAN');
- assert.lengthOf(typeInfos, 2);
- }, testOptions);
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform.html
deleted file mode 100644
index bc1bc4cc12c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui', function() {
- function TimelineDisplayTransform(opt_that) {
- if (opt_that) {
- this.set(opt_that);
- return;
- }
- this.scaleX = 1;
- this.panX = 0;
- this.panY = 0;
- }
-
- TimelineDisplayTransform.prototype = {
- set: function(that) {
- this.scaleX = that.scaleX;
- this.panX = that.panX;
- this.panY = that.panY;
- },
-
- clone: function() {
- return new TimelineDisplayTransform(this);
- },
-
- equals: function(that) {
- var eq = true;
- if (that === undefined || that === null)
- return false;
- eq &= this.panX === that.panX;
- eq &= this.panY === that.panY;
- eq &= this.scaleX === that.scaleX;
- return !!eq;
- },
-
- almostEquals: function(that) {
- var eq = true;
- if (that === undefined || that === null)
- return false;
- eq &= Math.abs(this.panX - that.panX) < 0.001;
- eq &= Math.abs(this.panY - that.panY) < 0.001;
- eq &= Math.abs(this.scaleX - that.scaleX) < 0.001;
- return !!eq;
- },
-
- incrementPanXInViewUnits: function(xDeltaView) {
- this.panX += this.xViewVectorToWorld(xDeltaView);
- },
-
- xPanWorldPosToViewPos: function(worldX, viewX, viewWidth) {
- if (typeof viewX === 'string') {
- if (viewX === 'left') {
- viewX = 0;
- } else if (viewX === 'center') {
- viewX = viewWidth / 2;
- } else if (viewX === 'right') {
- viewX = viewWidth - 1;
- } else {
- throw new Error('viewX must be left|center|right or number.');
- }
- }
- this.panX = (viewX / this.scaleX) - worldX;
- },
-
- xPanWorldBoundsIntoView: function(worldMin, worldMax, viewWidth) {
- if (this.xWorldToView(worldMin) < 0)
- this.xPanWorldPosToViewPos(worldMin, 'left', viewWidth);
- else if (this.xWorldToView(worldMax) > viewWidth)
- this.xPanWorldPosToViewPos(worldMax, 'right', viewWidth);
- },
-
- xSetWorldBounds: function(worldMin, worldMax, viewWidth) {
- var worldWidth = worldMax - worldMin;
- var scaleX = viewWidth / worldWidth;
- var panX = -worldMin;
- this.setPanAndScale(panX, scaleX);
- },
-
- setPanAndScale: function(p, s) {
- this.scaleX = s;
- this.panX = p;
- },
-
- xWorldToView: function(x) {
- return (x + this.panX) * this.scaleX;
- },
-
- xWorldVectorToView: function(x) {
- return x * this.scaleX;
- },
-
- xViewToWorld: function(x) {
- return (x / this.scaleX) - this.panX;
- },
-
- xViewVectorToWorld: function(x) {
- return x / this.scaleX;
- },
-
- applyTransformToCanvas: function(ctx) {
- ctx.transform(this.scaleX, 0, 0, 1, this.panX * this.scaleX, 0);
- }
- };
-
- return {
- TimelineDisplayTransform: TimelineDisplayTransform
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations.html
deleted file mode 100644
index a1f5ecff9b1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/ui/base/animation.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui', function() {
- var kDefaultPanAnimationDurationMs = 100.0;
-
- /**
- * Pans a TimelineDisplayTransform by a given amount.
- * @constructor
- * @extends {tr.ui.b.Animation}
- * @param {Number} deltaX The total amount of change to the transform's panX.
- * @param {Number} deltaY The total amount of change to the transform's panY.
- * @param {Number=} opt_durationMs How long the pan animation should run.
- * Defaults to kDefaultPanAnimationDurationMs.
- */
- function TimelineDisplayTransformPanAnimation(
- deltaX, deltaY, opt_durationMs) {
- this.deltaX = deltaX;
- this.deltaY = deltaY;
- if (opt_durationMs === undefined)
- this.durationMs = kDefaultPanAnimationDurationMs;
- else
- this.durationMs = opt_durationMs;
-
- this.startPanX = undefined;
- this.startPanY = undefined;
- this.startTimeMs = undefined;
- }
-
- TimelineDisplayTransformPanAnimation.prototype = {
- __proto__: tr.ui.b.Animation.prototype,
-
- get affectsPanY() {
- return this.deltaY !== 0;
- },
-
- canTakeOverFor: function(existingAnimation) {
- return existingAnimation instanceof TimelineDisplayTransformPanAnimation;
- },
-
- takeOverFor: function(existing, timestamp, target) {
- var remainingDeltaXOnExisting = existing.goalPanX - target.panX;
- var remainingDeltaYOnExisting = existing.goalPanY - target.panY;
- var remainingTimeOnExisting = timestamp - (
- existing.startTimeMs + existing.durationMs);
- remainingTimeOnExisting = Math.max(remainingTimeOnExisting, 0);
-
- this.deltaX += remainingDeltaXOnExisting;
- this.deltaY += remainingDeltaYOnExisting;
- this.durationMs += remainingTimeOnExisting;
- },
-
- start: function(timestamp, target) {
- this.startTimeMs = timestamp;
- this.startPanX = target.panX;
- this.startPanY = target.panY;
- },
-
- tick: function(timestamp, target) {
- var percentDone = (timestamp - this.startTimeMs) / this.durationMs;
- percentDone = tr.b.clamp(percentDone, 0, 1);
-
- target.panX = tr.b.lerp(percentDone, this.startPanX, this.goalPanX);
- if (this.affectsPanY)
- target.panY = tr.b.lerp(percentDone, this.startPanY, this.goalPanY);
- return timestamp >= this.startTimeMs + this.durationMs;
- },
-
- get goalPanX() {
- return this.startPanX + this.deltaX;
- },
-
- get goalPanY() {
- return this.startPanY + this.deltaY;
- }
- };
-
- /**
- * Zooms in/out on a specified location in the world.
- *
- * Zooming in and out is all about keeping the area under the mouse cursor,
- * here called the "focal point" in the same place under the zoom. If one
- * simply changes the scale, the area under the mouse cursor will change. To
- * keep the focal point from moving during the zoom, the pan needs to change
- * in order to compensate. Thus, a ZoomTo animation is given both a focal
- * point in addition to the amount by which to zoom.
- *
- * @constructor
- * @extends {tr.ui.b.Animation}
- * @param {Number} goalFocalPointXWorld The X coordinate in the world which is
- * of interest.
- * @param {Number} goalFocalPointXView Where on the screen the
- * goalFocalPointXWorld should stay centered during the zoom.
- * @param {Number} goalFocalPointY Where the panY should be when the zoom
- * completes.
- * @param {Number} zoomInRatioX The ratio of the current scaleX to the goal
- * scaleX.
- */
- function TimelineDisplayTransformZoomToAnimation(
- goalFocalPointXWorld,
- goalFocalPointXView,
- goalFocalPointY,
- zoomInRatioX,
- opt_durationMs) {
- this.goalFocalPointXWorld = goalFocalPointXWorld;
- this.goalFocalPointXView = goalFocalPointXView;
- this.goalFocalPointY = goalFocalPointY;
- this.zoomInRatioX = zoomInRatioX;
- if (opt_durationMs === undefined)
- this.durationMs = kDefaultPanAnimationDurationMs;
- else
- this.durationMs = opt_durationMs;
-
- this.startTimeMs = undefined;
- this.startScaleX = undefined;
- this.goalScaleX = undefined;
- this.startPanY = undefined;
- }
-
- TimelineDisplayTransformZoomToAnimation.prototype = {
- __proto__: tr.ui.b.Animation.prototype,
-
- get affectsPanY() {
- return this.startPanY !== this.goalFocalPointY;
- },
-
- canTakeOverFor: function(existingAnimation) {
- return false;
- },
-
- takeOverFor: function(existingAnimation, timestamp, target) {
- this.goalScaleX = target.scaleX * this.zoomInRatioX;
- },
-
- start: function(timestamp, target) {
- this.startTimeMs = timestamp;
- this.startScaleX = target.scaleX;
- this.goalScaleX = this.zoomInRatioX * target.scaleX;
- this.startPanY = target.panY;
- },
-
- tick: function(timestamp, target) {
- var percentDone = (timestamp - this.startTimeMs) / this.durationMs;
- percentDone = tr.b.clamp(percentDone, 0, 1);
-
- target.scaleX = tr.b.lerp(percentDone, this.startScaleX, this.goalScaleX);
- if (this.affectsPanY) {
- target.panY = tr.b.lerp(
- percentDone, this.startPanY, this.goalFocalPointY);
- }
-
- target.xPanWorldPosToViewPos(
- this.goalFocalPointXWorld, this.goalFocalPointXView);
- return timestamp >= this.startTimeMs + this.durationMs;
- }
- };
-
- return {
- TimelineDisplayTransformPanAnimation:
- TimelineDisplayTransformPanAnimation,
- TimelineDisplayTransformZoomToAnimation:
- TimelineDisplayTransformZoomToAnimation
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations_test.html
deleted file mode 100644
index 99ca6bd8b20..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_animations_test.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/animation_controller.html">
-<link rel="import" href="/tracing/ui/timeline_display_transform.html">
-<link rel="import" href="/tracing/ui/timeline_display_transform_animations.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TimelineDisplayTransform = tr.ui.TimelineDisplayTransform;
- var TimelineDisplayTransformPanAnimation =
- tr.ui.TimelineDisplayTransformPanAnimation;
- var TimelineDisplayTransformZoomToAnimation =
- tr.ui.TimelineDisplayTransformZoomToAnimation;
-
- test('panBasic', function() {
- var target = new TimelineDisplayTransform();
- target.cloneAnimationState = function() {
- return this.clone();
- };
-
- var a = new TimelineDisplayTransformPanAnimation(10, 20, 100);
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
- controller.queueAnimation(a, 0);
-
- assert.isTrue(a.affectsPanY);
- tr.b.forcePendingRAFTasksToRun(50);
- assert.isAbove(target.panX, 0);
- tr.b.forcePendingRAFTasksToRun(100);
- assert.isFalse(controller.hasActiveAnimation);
- assert.equal(target.panX, 10);
- assert.equal(target.panY, 20);
- });
-
- test('zoomBasic', function() {
- var target = new TimelineDisplayTransform();
- target.panY = 30;
- target.cloneAnimationState = function() {
- return this.clone();
- };
-
- var a = new TimelineDisplayTransformZoomToAnimation(10, 20, 30, 5, 100);
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
- controller.queueAnimation(a, 0);
-
- assert.isFalse(a.affectsPanY);
- tr.b.forcePendingRAFTasksToRun(100);
- assert.equal(target.scaleX, 5);
- });
-
- test('panTakeover', function() {
- var target = new TimelineDisplayTransform();
- target.cloneAnimationState = function() {
- return this.clone();
- };
-
- var b = new TimelineDisplayTransformPanAnimation(10, 0, 100);
- var a = new TimelineDisplayTransformPanAnimation(10, 0, 100);
-
- var controller = new tr.ui.b.AnimationController();
- controller.target = target;
- controller.queueAnimation(a, 0);
-
- tr.b.forcePendingRAFTasksToRun(50);
- controller.queueAnimation(b, 50);
-
- tr.b.forcePendingRAFTasksToRun(100);
- assert.isTrue(controller.hasActiveAnimation);
-
- tr.b.forcePendingRAFTasksToRun(150);
- assert.isFalse(controller.hasActiveAnimation);
- assert.equal(target.panX, 20);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_test.html
deleted file mode 100644
index 65a9c859909..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_display_transform_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/timeline_display_transform.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TimelineDisplayTransform = tr.ui.TimelineDisplayTransform;
-
- test('basics', function() {
- var a = new TimelineDisplayTransform();
- a.panX = 0;
- a.panY = 0;
- a.scaleX = 1;
-
- var b = new TimelineDisplayTransform();
- b.panX = 10;
- b.panY = 0;
- b.scaleX = 1;
-
- assert.isFalse(a.equals(b));
- assert.isFalse(a.almostEquals(b));
-
- var c = b.clone();
- assert.isTrue(b.equals(c));
- assert.isTrue(b.almostEquals(c));
-
- c.set(a);
- assert.isTrue(a.equals(c));
- assert.isTrue(a.almostEquals(c));
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_interest_range.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_interest_range.html
deleted file mode 100644
index b28d7af8c0e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_interest_range.html
+++ /dev/null
@@ -1,248 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui', function() {
- /**
- * @constructor
- */
- function SnapIndicator(y, height) {
- this.y = y;
- this.height = height;
- }
-
- /**
- * The interesting part of the world.
- *
- * @constructor
- */
- function TimelineInterestRange(vp) {
- this.viewport_ = vp;
-
- this.range_ = new tr.b.Range();
-
- this.leftSelected_ = false;
- this.rightSelected_ = false;
-
- this.leftSnapIndicator_ = undefined;
- this.rightSnapIndicator_ = undefined;
- }
-
- TimelineInterestRange.prototype = {
- get isEmpty() {
- return this.range_.isEmpty;
- },
-
- reset: function() {
- this.range_.reset();
- this.leftSelected_ = false;
- this.rightSelected_ = false;
- this.leftSnapIndicator_ = undefined;
- this.rightSnapIndicator_ = undefined;
- this.viewport_.dispatchChangeEvent();
- },
-
- get min() {
- return this.range_.min;
- },
-
- set min(min) {
- this.range_.min = min;
- this.viewport_.dispatchChangeEvent();
- },
-
- get max() {
- return this.range_.max;
- },
-
- set max(max) {
- this.range_.max = max;
- this.viewport_.dispatchChangeEvent();
- },
-
- set: function(range) {
- this.range_.reset();
- this.range_.addRange(range);
- this.viewport_.dispatchChangeEvent();
- },
-
- setMinAndMax: function(min, max) {
- this.range_.min = min;
- this.range_.max = max;
- this.viewport_.dispatchChangeEvent();
- },
-
- get range() {
- return this.range_.range;
- },
-
- asRangeObject: function() {
- var range = new tr.b.Range();
- range.addRange(this.range_);
- return range;
- },
-
- get leftSelected() {
- return this.leftSelected_;
- },
-
- set leftSelected(leftSelected) {
- if (this.leftSelected_ === leftSelected)
- return;
- this.leftSelected_ = leftSelected;
- this.viewport_.dispatchChangeEvent();
- },
-
- get rightSelected() {
- return this.rightSelected_;
- },
-
- set rightSelected(rightSelected) {
- if (this.rightSelected_ === rightSelected)
- return;
- this.rightSelected_ = rightSelected;
- this.viewport_.dispatchChangeEvent();
- },
-
- get leftSnapIndicator() {
- return this.leftSnapIndicator_;
- },
-
- set leftSnapIndicator(leftSnapIndicator) {
- this.leftSnapIndicator_ = leftSnapIndicator;
- this.viewport_.dispatchChangeEvent();
- },
-
- get rightSnapIndicator() {
- return this.rightSnapIndicator_;
- },
-
- set rightSnapIndicator(rightSnapIndicator) {
- this.rightSnapIndicator_ = rightSnapIndicator;
- this.viewport_.dispatchChangeEvent();
- },
-
- draw: function(ctx, viewLWorld, viewRWorld) {
- if (this.range_.isEmpty)
- return;
- var dt = this.viewport_.currentDisplayTransform;
-
- var markerLWorld = this.min;
- var markerRWorld = this.max;
-
- var markerLView = Math.round(dt.xWorldToView(markerLWorld));
- var markerRView = Math.round(dt.xWorldToView(markerRWorld));
-
- ctx.fillStyle = 'rgba(0, 0, 0, 0.2)';
- if (markerLWorld > viewLWorld) {
- ctx.fillRect(dt.xWorldToView(viewLWorld), 0,
- markerLView, ctx.canvas.height);
- }
-
- if (markerRWorld < viewRWorld) {
- ctx.fillRect(markerRView, 0,
- dt.xWorldToView(viewRWorld), ctx.canvas.height);
- }
-
- var pixelRatio = window.devicePixelRatio || 1;
- ctx.lineWidth = Math.round(pixelRatio);
- if (this.range_.range > 0) {
- this.drawLine_(ctx, viewLWorld, viewRWorld,
- ctx.canvas.height, this.min, this.leftSelected_);
- this.drawLine_(ctx, viewLWorld, viewRWorld,
- ctx.canvas.height, this.max, this.rightSelected_);
- } else {
- this.drawLine_(ctx, viewLWorld, viewRWorld,
- ctx.canvas.height, this.min,
- this.leftSelected_ || this.rightSelected_);
- }
- ctx.lineWidth = 1;
- },
-
- drawLine_: function(ctx, viewLWorld, viewRWorld, height, ts, selected) {
- if (ts < viewLWorld || ts >= viewRWorld)
- return;
-
- var dt = this.viewport_.currentDisplayTransform;
- var viewX = Math.round(dt.xWorldToView(ts));
-
- // Apply subpixel translate to get crisp lines.
- // http://www.mobtowers.com/html5-canvas-crisp-lines-every-time/
- ctx.save();
- ctx.translate((Math.round(ctx.lineWidth) % 2) / 2, 0);
-
- ctx.beginPath();
- tr.ui.b.drawLine(ctx, viewX, 0, viewX, height);
- if (selected)
- ctx.strokeStyle = 'rgb(255, 0, 0)';
- else
- ctx.strokeStyle = 'rgb(0, 0, 0)';
- ctx.stroke();
-
- ctx.restore();
- },
-
- drawIndicators: function(ctx, viewLWorld, viewRWorld) {
- if (this.leftSnapIndicator_) {
- this.drawIndicator_(ctx, viewLWorld, viewRWorld,
- this.range_.min,
- this.leftSnapIndicator_,
- this.leftSelected_);
- }
- if (this.rightSnapIndicator_) {
- this.drawIndicator_(ctx, viewLWorld, viewRWorld,
- this.range_.max,
- this.rightSnapIndicator_,
- this.rightSelected_);
- }
- },
-
- drawIndicator_: function(ctx, viewLWorld, viewRWorld,
- xWorld, si, selected) {
- var dt = this.viewport_.currentDisplayTransform;
-
- var viewX = Math.round(dt.xWorldToView(xWorld));
-
- // Apply subpixel translate to get crisp lines.
- // http://www.mobtowers.com/html5-canvas-crisp-lines-every-time/
- ctx.save();
- ctx.translate((Math.round(ctx.lineWidth) % 2) / 2, 0);
-
- var pixelRatio = window.devicePixelRatio || 1;
- var viewY = si.y * devicePixelRatio;
- var viewHeight = si.height * devicePixelRatio;
- var arrowSize = 4 * pixelRatio;
-
- if (selected)
- ctx.fillStyle = 'rgb(255, 0, 0)';
- else
- ctx.fillStyle = 'rgb(0, 0, 0)';
- tr.ui.b.drawTriangle(ctx,
- viewX - arrowSize * 0.75, viewY,
- viewX + arrowSize * 0.75, viewY,
- viewX, viewY + arrowSize);
- ctx.fill();
- tr.ui.b.drawTriangle(ctx,
- viewX - arrowSize * 0.75, viewY + viewHeight,
- viewX + arrowSize * 0.75, viewY + viewHeight,
- viewX, viewY + viewHeight - arrowSize);
- ctx.fill();
-
- ctx.restore();
- }
- };
-
- return {
- SnapIndicator: SnapIndicator,
- TimelineInterestRange: TimelineInterestRange
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view.html
deleted file mode 100644
index c4c84bc9a2f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view.html
+++ /dev/null
@@ -1,1151 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/x_marker_annotation.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_selector.html">
-<link rel="import" href="/tracing/ui/base/timing_tool.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/timeline_display_transform_animations.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/model_track.html">
-<link rel="import" href="/tracing/ui/tracks/ruler_track.html">
-
-<!--
- Interactive visualizaiton of Model objects based loosely on gantt charts.
- Each thread in the Model is given a set of Tracks, one per subrow in the
- thread. The TimelineTrackView class acts as a controller, creating the
- individual tracks, while Tracks do actual drawing.
-
- Visually, the TimelineTrackView produces (prettier) visualizations like the
- following:
- Thread1: AAAAAAAAAA AAAAA
- BBBB BB
- Thread2: CCCCCC CCCCC
--->
-<dom-module id='tr-ui-timeline-track-view'>
- <template>
- <style>
- :host {
- -webkit-box-orient: vertical;
- display: -webkit-box;
- position: relative;
- }
-
- :host ::content * {
- -webkit-user-select: none;
- cursor: default;
- }
-
- #drag_box {
- background-color: rgba(0, 0, 255, 0.25);
- border: 1px solid rgb(0, 0, 96);
- font-size: 75%;
- position: fixed;
- }
-
- #hint_text {
- position: absolute;
- bottom: 6px;
- right: 6px;
- font-size: 8pt;
- }
- </style>
- <content></content>
-
- <div id='drag_box'></div>
- <div id='hint_text'></div>
-
- <tv-ui-b-hotkey-controller id='hotkey_controller'>
- </tv-ui-b-hotkey-controller>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-timeline-track-view',
-
- ready: function() {
- this.displayTransform_ = new tr.ui.TimelineDisplayTransform();
- this.model_ = undefined;
-
- this.timelineView_ = undefined;
-
- this.viewport_ = new tr.ui.TimelineViewport(this);
- this.viewportDisplayTransformAtMouseDown_ = undefined;
- this.brushingStateController_ = undefined;
-
- this.rulerTrackContainer_ =
- new tr.ui.tracks.DrawingContainer(this.viewport_);
- Polymer.dom(this).appendChild(this.rulerTrackContainer_);
- this.rulerTrackContainer_.invalidate();
-
- this.rulerTrack_ = new tr.ui.tracks.RulerTrack(this.viewport_);
- Polymer.dom(this.rulerTrackContainer_).appendChild(this.rulerTrack_);
-
- this.upperModelTrack_ = new tr.ui.tracks.ModelTrack(this.viewport_);
- this.upperModelTrack_.upperMode = true;
- Polymer.dom(this.rulerTrackContainer_).appendChild(this.upperModelTrack_);
-
- this.modelTrackContainer_ =
- new tr.ui.tracks.DrawingContainer(this.viewport_);
- Polymer.dom(this).appendChild(this.modelTrackContainer_);
- this.modelTrackContainer_.style.display = 'block';
- this.modelTrackContainer_.invalidate();
-
- this.viewport_.modelTrackContainer = this.modelTrackContainer_;
-
- this.modelTrack_ = new tr.ui.tracks.ModelTrack(this.viewport_);
- Polymer.dom(this.modelTrackContainer_).appendChild(this.modelTrack_);
-
- this.timingTool_ = new tr.ui.b.TimingTool(this.viewport_, this);
-
- this.initMouseModeSelector();
-
- this.hideDragBox_();
-
- this.initHintText_();
-
- this.onSelectionChanged_ = this.onSelectionChanged_.bind(this);
-
- this.onDblClick_ = this.onDblClick_.bind(this);
- this.addEventListener('dblclick', this.onDblClick_);
-
- this.onMouseWheel_ = this.onMouseWheel_.bind(this);
- this.addEventListener('mousewheel', this.onMouseWheel_);
-
- this.onMouseDown_ = this.onMouseDown_.bind(this);
- this.addEventListener('mousedown', this.onMouseDown_);
-
- this.onMouseMove_ = this.onMouseMove_.bind(this);
- this.addEventListener('mousemove', this.onMouseMove_);
-
- this.onTouchStart_ = this.onTouchStart_.bind(this);
- this.addEventListener('touchstart', this.onTouchStart_);
-
- this.onTouchMove_ = this.onTouchMove_.bind(this);
- this.addEventListener('touchmove', this.onTouchMove_);
-
- this.onTouchEnd_ = this.onTouchEnd_.bind(this);
- this.addEventListener('touchend', this.onTouchEnd_);
-
-
- this.addHotKeys_();
-
- this.mouseViewPosAtMouseDown_ = {x: 0, y: 0};
- this.lastMouseViewPos_ = {x: 0, y: 0};
-
- this.lastTouchViewPositions_ = [];
-
- this.alert_ = undefined;
-
- this.isPanningAndScanning_ = false;
- this.isZooming_ = false;
- },
-
- initMouseModeSelector: function() {
- this.mouseModeSelector_ = document.createElement(
- 'tr-ui-b-mouse-mode-selector');
- this.mouseModeSelector_.targetElement = this;
- Polymer.dom(this).appendChild(this.mouseModeSelector_);
-
- this.mouseModeSelector_.addEventListener('beginpan',
- this.onBeginPanScan_.bind(this));
- this.mouseModeSelector_.addEventListener('updatepan',
- this.onUpdatePanScan_.bind(this));
- this.mouseModeSelector_.addEventListener('endpan',
- this.onEndPanScan_.bind(this));
-
- this.mouseModeSelector_.addEventListener('beginselection',
- this.onBeginSelection_.bind(this));
- this.mouseModeSelector_.addEventListener('updateselection',
- this.onUpdateSelection_.bind(this));
- this.mouseModeSelector_.addEventListener('endselection',
- this.onEndSelection_.bind(this));
-
- this.mouseModeSelector_.addEventListener('beginzoom',
- this.onBeginZoom_.bind(this));
- this.mouseModeSelector_.addEventListener('updatezoom',
- this.onUpdateZoom_.bind(this));
- this.mouseModeSelector_.addEventListener('endzoom',
- this.onEndZoom_.bind(this));
-
- this.mouseModeSelector_.addEventListener('entertiming',
- this.timingTool_.onEnterTiming.bind(this.timingTool_));
- this.mouseModeSelector_.addEventListener('begintiming',
- this.timingTool_.onBeginTiming.bind(this.timingTool_));
- this.mouseModeSelector_.addEventListener('updatetiming',
- this.timingTool_.onUpdateTiming.bind(this.timingTool_));
- this.mouseModeSelector_.addEventListener('endtiming',
- this.timingTool_.onEndTiming.bind(this.timingTool_));
- this.mouseModeSelector_.addEventListener('exittiming',
- this.timingTool_.onExitTiming.bind(this.timingTool_));
-
- var m = tr.ui.b.MOUSE_SELECTOR_MODE;
- this.mouseModeSelector_.supportedModeMask =
- m.SELECTION | m.PANSCAN | m.ZOOM | m.TIMING;
- this.mouseModeSelector_.settingsKey =
- 'timelineTrackView.mouseModeSelector';
- this.mouseModeSelector_.setKeyCodeForMode(m.PANSCAN, '2'.charCodeAt(0));
- this.mouseModeSelector_.setKeyCodeForMode(m.SELECTION, '1'.charCodeAt(0));
- this.mouseModeSelector_.setKeyCodeForMode(m.ZOOM, '3'.charCodeAt(0));
- this.mouseModeSelector_.setKeyCodeForMode(m.TIMING, '4'.charCodeAt(0));
-
- this.mouseModeSelector_.setModifierForAlternateMode(
- m.SELECTION, tr.ui.b.MODIFIER.SHIFT);
- this.mouseModeSelector_.setModifierForAlternateMode(
- m.PANSCAN, tr.ui.b.MODIFIER.SPACE);
- },
-
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- set brushingStateController(brushingStateController) {
- if (this.brushingStateController_) {
- this.brushingStateController_.removeEventListener('change',
- this.onSelectionChanged_);
- }
- this.brushingStateController_ = brushingStateController;
- if (this.brushingStateController_) {
- this.brushingStateController_.addEventListener('change',
- this.onSelectionChanged_);
- }
- },
-
- set timelineView(view) {
- this.timelineView_ = view;
- },
-
- onSelectionChanged_: function() {
- this.showHintText_('Press \'m\' to mark current selection');
- this.viewport_.dispatchChangeEvent();
- },
-
- set selection(selection) {
- throw new Error('DO NOT CALL THIS');
- },
-
- set highlight(highlight) {
- throw new Error('DO NOT CALL THIS');
- },
-
- detach: function() {
- this.modelTrack_.detach();
- this.upperModelTrack_.detach();
-
- this.viewport_.detach();
- },
-
- get viewport() {
- return this.viewport_;
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- if (!model)
- throw new Error('Model cannot be undefined');
-
- var modelInstanceChanged = this.model_ !== model;
- this.model_ = model;
- this.modelTrack_.model = model;
- this.upperModelTrack_.model = model;
-
- // Set up a reasonable viewport.
- if (modelInstanceChanged)
- this.viewport_.setWhenPossible(this.setInitialViewport_.bind(this));
- },
-
- get hasVisibleContent() {
- return this.modelTrack_.hasVisibleContent ||
- this.upperModelTrack_.hasVisibleContent;
- },
-
- setInitialViewport_: function() {
- // We need the canvas size to be up-to-date at this point. We maybe in
- // here before the raf fires, so the size may have not been updated since
- // the canvas was resized.
- this.modelTrackContainer_.updateCanvasSizeIfNeeded_();
- var w = this.modelTrackContainer_.canvas.width;
-
- var min;
- var range;
-
- if (this.model_.bounds.isEmpty) {
- min = 0;
- range = 1000;
- } else if (this.model_.bounds.range === 0) {
- min = this.model_.bounds.min;
- range = 1000;
- } else {
- min = this.model_.bounds.min;
- range = this.model_.bounds.range;
- }
-
- var boost = range * 0.15;
- this.displayTransform_.set(this.viewport_.currentDisplayTransform);
- this.displayTransform_.xSetWorldBounds(
- min - boost, min + range + boost, w);
- this.viewport_.setDisplayTransformImmediately(this.displayTransform_);
- },
-
- /**
- * @param {Filter} filter The filter to use for finding matches.
- * @param {Selection} selection The selection to add matches to.
- * @return {Task} which performs the filtering.
- */
- addAllEventsMatchingFilterToSelectionAsTask: function(filter, selection) {
- var modelTrack = this.modelTrack_;
- var firstT = modelTrack.addAllEventsMatchingFilterToSelectionAsTask(
- filter, selection);
- var lastT = firstT.after(function() {
- this.upperModelTrack_.addAllEventsMatchingFilterToSelection(
- filter, selection);
-
- }, this);
- return firstT;
- },
-
- onMouseMove_: function(e) {
- // Zooming requires the delta since the last mousemove so we need to avoid
- // tracking it when the zoom interaction is active.
- if (this.isZooming_)
- return;
-
- this.storeLastMousePos_(e);
- },
-
- onTouchStart_: function(e) {
- this.storeLastTouchPositions_(e);
- this.focusElements_();
- },
-
- onTouchMove_: function(e) {
- e.preventDefault();
- this.onUpdateTransformForTouch_(e);
- },
-
- onTouchEnd_: function(e) {
- this.storeLastTouchPositions_(e);
- this.focusElements_();
- },
-
- addHotKeys_: function() {
- this.addKeyDownHotKeys_();
- this.addKeyPressHotKeys_();
- },
-
- addKeyPressHotKeys_: function() {
- var addBinding = function(dict) {
- dict.eventType = 'keypress';
- dict.useCapture = false;
- dict.thisArg = this;
- var binding = new tr.ui.b.HotKey(dict);
- this.$.hotkey_controller.addHotKey(binding);
- }.bind(this);
-
- addBinding({
- keyCodes: ['w'.charCodeAt(0), ','.charCodeAt(0)],
- callback: function(e) {
- this.zoomBy_(1.5, true);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCodes: ['s'.charCodeAt(0), 'o'.charCodeAt(0)],
- callback: function(e) {
- this.zoomBy_(1 / 1.5, true);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'g'.charCodeAt(0),
- callback: function(e) {
- this.onGridToggle_(true);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'G'.charCodeAt(0),
- callback: function(e) {
- this.onGridToggle_(false);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCodes: ['W'.charCodeAt(0), '<'.charCodeAt(0)],
- callback: function(e) {
- this.zoomBy_(10, true);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCodes: ['S'.charCodeAt(0), 'O'.charCodeAt(0)],
- callback: function(e) {
- this.zoomBy_(1 / 10, true);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'a'.charCodeAt(0),
- callback: function(e) {
- this.queueSmoothPan_(this.viewWidth_ * 0.3, 0);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCodes: ['d'.charCodeAt(0), 'e'.charCodeAt(0)],
- callback: function(e) {
- this.queueSmoothPan_(this.viewWidth_ * -0.3, 0);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'A'.charCodeAt(0),
- callback: function(e) {
- this.queueSmoothPan_(viewWidth * 0.5, 0);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'D'.charCodeAt(0),
- callback: function(e) {
- this.queueSmoothPan_(viewWidth * -0.5, 0);
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: '0'.charCodeAt(0),
- callback: function(e) {
- this.setInitialViewport_();
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'f'.charCodeAt(0),
- callback: function(e) {
- this.zoomToSelection();
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'm'.charCodeAt(0),
- callback: function(e) {
- this.setCurrentSelectionAsInterestRange_();
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'p'.charCodeAt(0),
- callback: function(e) {
- this.selectPowerSamplesInCurrentTimeRange_();
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 'h'.charCodeAt(0),
- callback: function(e) {
- this.toggleHighDetails_();
- e.stopPropagation();
- }
- });
- },
-
- get viewWidth_() {
- return this.modelTrackContainer_.canvas.clientWidth;
- },
-
- addKeyDownHotKeys_: function() {
- var addBinding = function(dict) {
- dict.eventType = 'keydown';
- dict.useCapture = false;
- dict.thisArg = this;
- var binding = new tr.ui.b.HotKey(dict);
- this.$.hotkey_controller.addHotKey(binding);
- }.bind(this);
-
- addBinding({
- keyCode: 37, // Left arrow.
- callback: function(e) {
- var curSel = this.brushingStateController_.selection;
- var sel = this.viewport.getShiftedSelection(curSel, -1);
-
- if (sel) {
- this.brushingStateController.changeSelectionFromTimeline(sel);
- this.panToSelection();
- } else {
- this.queueSmoothPan_(this.viewWidth_ * 0.3, 0);
- }
- e.preventDefault();
- e.stopPropagation();
- }
- });
-
- addBinding({
- keyCode: 39, // Right arrow.
- callback: function(e) {
- var curSel = this.brushingStateController_.selection;
- var sel = this.viewport.getShiftedSelection(curSel, 1);
- if (sel) {
- this.brushingStateController.changeSelectionFromTimeline(sel);
- this.panToSelection();
- } else {
- this.queueSmoothPan_(-this.viewWidth_ * 0.3, 0);
- }
- e.preventDefault();
- e.stopPropagation();
- }
- });
- },
-
- onDblClick_: function(e) {
- if (this.mouseModeSelector_.mode !==
- tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
- return;
-
- var curSelection = this.brushingStateController_.selection;
- if (!curSelection.length || !tr.b.getOnlyElement(curSelection).title)
- return;
-
- var selection = new tr.model.EventSet();
- var filter = new tr.c.ExactTitleFilter(
- tr.b.getOnlyElement(curSelection).title);
- this.modelTrack_.addAllEventsMatchingFilterToSelection(filter,
- selection);
-
- this.brushingStateController.changeSelectionFromTimeline(selection);
- },
-
- onMouseWheel_: function(e) {
- if (!e.altKey)
- return;
-
- var delta = e.wheelDelta / 120;
- var zoomScale = Math.pow(1.5, delta);
- this.zoomBy_(zoomScale);
- e.preventDefault();
- },
-
- onMouseDown_: function(e) {
- if (this.mouseModeSelector_.mode !==
- tr.ui.b.MOUSE_SELECTOR_MODE.SELECTION)
- return;
-
- // Mouse down must start on ruler track for crosshair guide lines to draw.
- if (e.target !== this.rulerTrack_)
- return;
-
- // Make sure we don't start a selection drag event here.
- this.dragBeginEvent_ = undefined;
-
- // Remove nav string marker if it exists, since we're clearing the
- // find control box.
- if (this.xNavStringMarker_) {
- this.model.removeAnnotation(this.xNavStringMarker_);
- this.xNavStringMarker_ = undefined;
- }
-
- var dt = this.viewport_.currentDisplayTransform;
- tr.ui.b.trackMouseMovesUntilMouseUp(function(e) { // Mouse move handler.
- // If mouse event is on ruler, don't do anything.
- if (e.target === this.rulerTrack_)
- return;
-
- var relativePosition = this.extractRelativeMousePosition_(e);
- var loc = tr.model.Location.fromViewCoordinates(
- this.viewport_, relativePosition.x, relativePosition.y);
- // Not all points on the timeline represents a valid location.
- // ex. process header tracks, letter dot tracks.
- if (!loc)
- return;
-
- if (this.guideLineAnnotation_ === undefined) {
- this.guideLineAnnotation_ =
- new tr.model.XMarkerAnnotation(loc.xWorld);
- this.model.addAnnotation(this.guideLineAnnotation_);
- } else {
- this.guideLineAnnotation_.timestamp = loc.xWorld;
- this.modelTrackContainer_.invalidate();
- }
-
- // Set the findcontrol's text to nav string of current state.
- var state = new tr.ui.b.UIState(loc,
- this.viewport_.currentDisplayTransform.scaleX);
- this.timelineView_.setFindCtlText(
- state.toUserFriendlyString(this.viewport_));
- }.bind(this),
- undefined, // Mouse up handler.
- function onKeyUpDuringDrag() {
- if (this.dragBeginEvent_) {
- this.setDragBoxPosition_(this.dragBoxXStart_, this.dragBoxYStart_,
- this.dragBoxXEnd_, this.dragBoxYEnd_);
- }
- }.bind(this));
- },
-
- queueSmoothPan_: function(viewDeltaX, deltaY) {
- var deltaX = this.viewport_.currentDisplayTransform.xViewVectorToWorld(
- viewDeltaX);
- var animation = new tr.ui.TimelineDisplayTransformPanAnimation(
- deltaX, deltaY);
- this.viewport_.queueDisplayTransformAnimation(animation);
- },
-
- /**
- * Zoom in or out on the timeline by the given scale factor.
- * @param {Number} scale The scale factor to apply. If <1, zooms out.
- * @param {boolean} Whether to change the zoom level smoothly.
- */
- zoomBy_: function(scale, smooth) {
- if (scale <= 0) {
- return;
- }
-
- smooth = !!smooth;
- var vp = this.viewport_;
- var pixelRatio = window.devicePixelRatio || 1;
-
- var goalFocalPointXView = this.lastMouseViewPos_.x * pixelRatio;
- var goalFocalPointXWorld = vp.currentDisplayTransform.xViewToWorld(
- goalFocalPointXView);
- if (smooth) {
- var animation = new tr.ui.TimelineDisplayTransformZoomToAnimation(
- goalFocalPointXWorld, goalFocalPointXView,
- vp.currentDisplayTransform.panY,
- scale);
- vp.queueDisplayTransformAnimation(animation);
- } else {
- this.displayTransform_.set(vp.currentDisplayTransform);
- this.displayTransform_.scaleX *= scale;
- this.displayTransform_.xPanWorldPosToViewPos(
- goalFocalPointXWorld, goalFocalPointXView, this.viewWidth_);
- vp.setDisplayTransformImmediately(this.displayTransform_);
- }
- },
-
- /**
- * Zoom into the current selection.
- */
- zoomToSelection: function() {
- if (!this.brushingStateController.selectionOfInterest.length)
- return;
-
- var bounds = this.brushingStateController.selectionOfInterest.bounds;
- if (!bounds.range)
- return;
-
- var worldCenter = bounds.center;
- var viewCenter = this.modelTrackContainer_.canvas.width / 2;
- var adjustedWorldRange = bounds.range * 1.25;
- var newScale = this.modelTrackContainer_.canvas.width /
- adjustedWorldRange;
- var zoomInRatio = newScale /
- this.viewport_.currentDisplayTransform.scaleX;
-
- var animation = new tr.ui.TimelineDisplayTransformZoomToAnimation(
- worldCenter, viewCenter,
- this.viewport_.currentDisplayTransform.panY,
- zoomInRatio);
- this.viewport_.queueDisplayTransformAnimation(animation);
- },
-
- /**
- * Pan the view so the current selection becomes visible.
- */
- panToSelection: function() {
- if (!this.brushingStateController.selectionOfInterest.length)
- return;
-
- var bounds = this.brushingStateController.selectionOfInterest.bounds;
- var worldCenter = bounds.center;
- var viewWidth = this.viewWidth_;
-
- var dt = this.viewport_.currentDisplayTransform;
- if (false && !bounds.range) {
- if (dt.xWorldToView(bounds.center) < 0 ||
- dt.xWorldToView(bounds.center) > viewWidth) {
- this.displayTransform_.set(dt);
- this.displayTransform_.xPanWorldPosToViewPos(
- worldCenter, 'center', viewWidth);
- var deltaX = this.displayTransform_.panX - dt.panX;
- var animation = new tr.ui.TimelineDisplayTransformPanAnimation(
- deltaX, 0);
- this.viewport_.queueDisplayTransformAnimation(animation);
- }
- return;
- }
-
- this.displayTransform_.set(dt);
- this.displayTransform_.xPanWorldBoundsIntoView(
- bounds.min,
- bounds.max,
- viewWidth);
- var deltaX = this.displayTransform_.panX - dt.panX;
- var animation = new tr.ui.TimelineDisplayTransformPanAnimation(
- deltaX, 0);
- this.viewport_.queueDisplayTransformAnimation(animation);
- },
-
- navToPosition: function(uiState, showNavLine) {
- var location = uiState.location;
- var scaleX = uiState.scaleX;
- var track = location.getContainingTrack(this.viewport_);
-
- var worldCenter = location.xWorld;
- var viewCenter = this.modelTrackContainer_.canvas.width / 5;
- var zoomInRatio = scaleX /
- this.viewport_.currentDisplayTransform.scaleX;
-
- // Vertically scroll so track is in view.
- track.scrollIntoViewIfNeeded();
-
- // Perform zoom and panX animation.
- var animation = new tr.ui.TimelineDisplayTransformZoomToAnimation(
- worldCenter, viewCenter,
- this.viewport_.currentDisplayTransform.panY,
- zoomInRatio);
- this.viewport_.queueDisplayTransformAnimation(animation);
-
- if (!showNavLine)
- return;
- // Add an X Marker Annotation at the specified timestamp.
- if (this.xNavStringMarker_)
- this.model.removeAnnotation(this.xNavStringMarker_);
- this.xNavStringMarker_ =
- new tr.model.XMarkerAnnotation(worldCenter);
- this.model.addAnnotation(this.xNavStringMarker_);
- },
-
- selectPowerSamplesInCurrentTimeRange_: function() {
- var selectionBounds = this.brushingStateController_.selection.bounds;
- if (this.model.device.powerSeries && !selectionBounds.empty) {
- var events = this.model.device.powerSeries.getSamplesWithinRange(
- selectionBounds.min, selectionBounds.max);
- var selection = new tr.model.EventSet(events);
- this.brushingStateController_.changeSelectionFromTimeline(selection);
- }
- },
-
- setCurrentSelectionAsInterestRange_: function() {
- var selectionBounds = this.brushingStateController_.selection.bounds;
- if (selectionBounds.empty) {
- this.viewport_.interestRange.reset();
- return;
- }
-
- if (this.viewport_.interestRange.min === selectionBounds.min &&
- this.viewport_.interestRange.max === selectionBounds.max)
- this.viewport_.interestRange.reset();
- else
- this.viewport_.interestRange.set(selectionBounds);
- },
-
- toggleHighDetails_: function() {
- this.viewport_.highDetails = !this.viewport_.highDetails;
- },
-
- hideDragBox_: function() {
- this.$.drag_box.style.left = '-1000px';
- this.$.drag_box.style.top = '-1000px';
- this.$.drag_box.style.width = 0;
- this.$.drag_box.style.height = 0;
- },
-
- setDragBoxPosition_: function(xStart, yStart, xEnd, yEnd) {
- var loY = Math.min(yStart, yEnd);
- var hiY = Math.max(yStart, yEnd);
- var loX = Math.min(xStart, xEnd);
- var hiX = Math.max(xStart, xEnd);
- var modelTrackRect = this.modelTrack_.getBoundingClientRect();
- var dragRect = {left: loX, top: loY, width: hiX - loX, height: hiY - loY};
-
- dragRect.right = dragRect.left + dragRect.width;
- dragRect.bottom = dragRect.top + dragRect.height;
-
- var modelTrackContainerRect =
- this.modelTrackContainer_.getBoundingClientRect();
- var clipRect = {
- left: modelTrackContainerRect.left,
- top: modelTrackContainerRect.top,
- right: modelTrackContainerRect.right,
- bottom: modelTrackContainerRect.bottom
- };
-
- var headingWidth = window.getComputedStyle(
- Polymer.dom(this).querySelector('tr-ui-heading')).width;
- var trackTitleWidth = parseInt(headingWidth);
- clipRect.left = clipRect.left + trackTitleWidth;
-
- var intersectRect_ = function(r1, r2) {
- if (r2.left > r1.right || r2.right < r1.left ||
- r2.top > r1.bottom || r2.bottom < r1.top)
- return false;
-
- var results = {};
- results.left = Math.max(r1.left, r2.left);
- results.top = Math.max(r1.top, r2.top);
- results.right = Math.min(r1.right, r2.right);
- results.bottom = Math.min(r1.bottom, r2.bottom);
- results.width = results.right - results.left;
- results.height = results.bottom - results.top;
- return results;
- };
-
- // TODO(dsinclair): intersectRect_ can return false (which should actually
- // be undefined) but we use finalDragBox without checking the return value
- // which could potentially blowup. Fix this .....
- var finalDragBox = intersectRect_(clipRect, dragRect);
-
- this.$.drag_box.style.left = finalDragBox.left + 'px';
- this.$.drag_box.style.width = finalDragBox.width + 'px';
- this.$.drag_box.style.top = finalDragBox.top + 'px';
- this.$.drag_box.style.height = finalDragBox.height + 'px';
- this.$.drag_box.style.whiteSpace = 'nowrap';
-
- var pixelRatio = window.devicePixelRatio || 1;
- var canv = this.modelTrackContainer_.canvas;
- var dt = this.viewport_.currentDisplayTransform;
- var loWX = dt.xViewToWorld(
- (loX - canv.offsetLeft) * pixelRatio);
- var hiWX = dt.xViewToWorld(
- (hiX - canv.offsetLeft) * pixelRatio);
-
- Polymer.dom(this.$.drag_box).textContent =
- tr.b.Unit.byName.timeDurationInMs.format(hiWX - loWX);
-
- var e = new tr.b.Event('selectionChanging');
- e.loWX = loWX;
- e.hiWX = hiWX;
- this.dispatchEvent(e);
- },
-
- onGridToggle_: function(left) {
- var selection = this.brushingStateController_.selection;
- var tb = left ? selection.bounds.min : selection.bounds.max;
-
- // Toggle the grid off if the grid is on, the marker position is the same
- // and the same element is selected (same timebase).
- if (this.viewport_.gridEnabled &&
- this.viewport_.gridSide === left &&
- this.viewport_.gridInitialTimebase === tb) {
- this.viewport_.gridside = undefined;
- this.viewport_.gridEnabled = false;
- this.viewport_.gridInitialTimebase = undefined;
- return;
- }
-
- // Shift the timebase left until its just left of model_.bounds.min.
- var numIntervalsSinceStart = Math.ceil((tb - this.model_.bounds.min) /
- this.viewport_.gridStep_);
-
- this.viewport_.gridEnabled = true;
- this.viewport_.gridSide = left;
- this.viewport_.gridInitialTimebase = tb;
- this.viewport_.gridTimebase = tb -
- (numIntervalsSinceStart + 1) * this.viewport_.gridStep_;
- },
-
- storeLastMousePos_: function(e) {
- this.lastMouseViewPos_ = this.extractRelativeMousePosition_(e);
- },
-
- storeLastTouchPositions_: function(e) {
- this.lastTouchViewPositions_ = this.extractRelativeTouchPositions_(e);
- },
-
- extractRelativeMousePosition_: function(e) {
- var canv = this.modelTrackContainer_.canvas;
- return {
- x: e.clientX - canv.offsetLeft,
- y: e.clientY - canv.offsetTop
- };
- },
-
- extractRelativeTouchPositions_: function(e) {
- var canv = this.modelTrackContainer_.canvas;
-
- var touches = [];
- for (var i = 0; i < e.touches.length; ++i) {
- touches.push({
- x: e.touches[i].clientX - canv.offsetLeft,
- y: e.touches[i].clientY - canv.offsetTop
- });
- }
- return touches;
- },
-
- storeInitialMouseDownPos_: function(e) {
-
- var position = this.extractRelativeMousePosition_(e);
-
- this.mouseViewPosAtMouseDown_.x = position.x;
- this.mouseViewPosAtMouseDown_.y = position.y;
- },
-
- focusElements_: function() {
- this.$.hotkey_controller.childRequestsGeneralFocus(this);
- },
-
- storeInitialInteractionPositionsAndFocus_: function(e) {
-
- this.storeInitialMouseDownPos_(e);
- this.storeLastMousePos_(e);
-
- this.focusElements_();
- },
-
- onBeginPanScan_: function(e) {
- var vp = this.viewport_;
- this.viewportDisplayTransformAtMouseDown_ =
- vp.currentDisplayTransform.clone();
- this.isPanningAndScanning_ = true;
-
- this.storeInitialInteractionPositionsAndFocus_(e);
- e.preventDefault();
- },
-
- onUpdatePanScan_: function(e) {
- if (!this.isPanningAndScanning_)
- return;
-
- var viewWidth = this.viewWidth_;
-
- var pixelRatio = window.devicePixelRatio || 1;
- var xDeltaView = pixelRatio * (this.lastMouseViewPos_.x -
- this.mouseViewPosAtMouseDown_.x);
-
- var yDelta = this.lastMouseViewPos_.y -
- this.mouseViewPosAtMouseDown_.y;
-
- this.displayTransform_.set(this.viewportDisplayTransformAtMouseDown_);
- this.displayTransform_.incrementPanXInViewUnits(xDeltaView);
- this.displayTransform_.panY -= yDelta;
- this.viewport_.setDisplayTransformImmediately(this.displayTransform_);
-
- e.preventDefault();
- e.stopPropagation();
-
- this.storeLastMousePos_(e);
- },
-
- onEndPanScan_: function(e) {
- this.isPanningAndScanning_ = false;
-
- this.storeLastMousePos_(e);
-
- if (!e.isClick)
- e.preventDefault();
- },
-
- onBeginSelection_: function(e) {
- var canv = this.modelTrackContainer_.canvas;
- var rect = this.modelTrack_.getBoundingClientRect();
- var canvRect = canv.getBoundingClientRect();
-
- var inside = rect &&
- e.clientX >= rect.left &&
- e.clientX < rect.right &&
- e.clientY >= rect.top &&
- e.clientY < rect.bottom &&
- e.clientX >= canvRect.left &&
- e.clientX < canvRect.right;
-
- if (!inside)
- return;
-
- this.dragBeginEvent_ = e;
-
- this.storeInitialInteractionPositionsAndFocus_(e);
- e.preventDefault();
- },
-
- onUpdateSelection_: function(e) {
- if (!this.dragBeginEvent_)
- return;
-
- // Update the drag box
- this.dragBoxXStart_ = this.dragBeginEvent_.clientX;
- this.dragBoxXEnd_ = e.clientX;
- this.dragBoxYStart_ = this.dragBeginEvent_.clientY;
- this.dragBoxYEnd_ = e.clientY;
- this.setDragBoxPosition_(this.dragBoxXStart_, this.dragBoxYStart_,
- this.dragBoxXEnd_, this.dragBoxYEnd_);
-
- },
-
- onEndSelection_: function(e) {
- e.preventDefault();
-
- if (!this.dragBeginEvent_)
- return;
-
- // Stop the dragging.
- this.hideDragBox_();
- var eDown = this.dragBeginEvent_;
- this.dragBeginEvent_ = undefined;
-
- // Figure out extents of the drag.
- var loY = Math.min(eDown.clientY, e.clientY);
- var hiY = Math.max(eDown.clientY, e.clientY);
- var loX = Math.min(eDown.clientX, e.clientX);
- var hiX = Math.max(eDown.clientX, e.clientX);
-
- // Convert to worldspace.
- var canv = this.modelTrackContainer_.canvas;
- var worldOffset = canv.getBoundingClientRect().left;
- var loVX = loX - worldOffset;
- var hiVX = hiX - worldOffset;
-
- // Figure out what has been selected.
- var selection = new tr.model.EventSet();
- if (eDown.appendSelection) {
- var previousSelection = this.brushingStateController_.selection;
- if (previousSelection !== undefined)
- selection.addEventSet(previousSelection);
- }
- this.modelTrack_.addIntersectingEventsInRangeToSelection(
- loVX, hiVX, loY, hiY, selection);
-
- // Activate the new selection.
- this.brushingStateController_.changeSelectionFromTimeline(selection);
- },
-
- onBeginZoom_: function(e) {
- this.isZooming_ = true;
-
- this.storeInitialInteractionPositionsAndFocus_(e);
- e.preventDefault();
- },
-
- onUpdateZoom_: function(e) {
- if (!this.isZooming_)
- return;
- var newPosition = this.extractRelativeMousePosition_(e);
-
- var zoomScaleValue = 1 + (this.lastMouseViewPos_.y -
- newPosition.y) * 0.01;
-
- this.zoomBy_(zoomScaleValue, false);
- this.storeLastMousePos_(e);
- },
-
- onEndZoom_: function(e) {
- this.isZooming_ = false;
-
- if (!e.isClick)
- e.preventDefault();
- },
-
- computeTouchCenter_: function(positions) {
- var xSum = 0;
- var ySum = 0;
- for (var i = 0; i < positions.length; ++i) {
- xSum += positions[i].x;
- ySum += positions[i].y;
- }
- return {
- x: xSum / positions.length,
- y: ySum / positions.length
- };
- },
-
- computeTouchSpan_: function(positions) {
- var xMin = Number.MAX_VALUE;
- var yMin = Number.MAX_VALUE;
- var xMax = Number.MIN_VALUE;
- var yMax = Number.MIN_VALUE;
- for (var i = 0; i < positions.length; ++i) {
- xMin = Math.min(xMin, positions[i].x);
- yMin = Math.min(yMin, positions[i].y);
- xMax = Math.max(xMax, positions[i].x);
- yMax = Math.max(yMax, positions[i].y);
- }
- return Math.sqrt((xMin - xMax) * (xMin - xMax) +
- (yMin - yMax) * (yMin - yMax));
- },
-
- onUpdateTransformForTouch_: function(e) {
- var newPositions = this.extractRelativeTouchPositions_(e);
- var currentPositions = this.lastTouchViewPositions_;
-
- var newCenter = this.computeTouchCenter_(newPositions);
- var currentCenter = this.computeTouchCenter_(currentPositions);
-
- var newSpan = this.computeTouchSpan_(newPositions);
- var currentSpan = this.computeTouchSpan_(currentPositions);
-
- var vp = this.viewport_;
- var viewWidth = this.viewWidth_;
- var pixelRatio = window.devicePixelRatio || 1;
-
- var xDelta = pixelRatio * (newCenter.x - currentCenter.x);
- var yDelta = newCenter.y - currentCenter.y;
- var zoomScaleValue = currentSpan > 10 ? newSpan / currentSpan : 1;
-
- var viewFocus = pixelRatio * newCenter.x;
- var worldFocus = vp.currentDisplayTransform.xViewToWorld(viewFocus);
-
- this.displayTransform_.set(vp.currentDisplayTransform);
- this.displayTransform_.scaleX *= zoomScaleValue;
- this.displayTransform_.xPanWorldPosToViewPos(
- worldFocus, viewFocus, viewWidth);
- this.displayTransform_.incrementPanXInViewUnits(xDelta);
- this.displayTransform_.panY -= yDelta;
- vp.setDisplayTransformImmediately(this.displayTransform_);
- this.storeLastTouchPositions_(e);
- },
-
- initHintText_: function() {
- this.$.hint_text.style.display = 'none';
-
- this.pendingHintTextClearTimeout_ = undefined;
- },
-
- showHintText_: function(text) {
- if (this.pendingHintTextClearTimeout_) {
- window.clearTimeout(this.pendingHintTextClearTimeout_);
- this.pendingHintTextClearTimeout_ = undefined;
- }
- this.pendingHintTextClearTimeout_ = setTimeout(
- this.hideHintText_.bind(this), 1000);
- Polymer.dom(this.$.hint_text).textContent = text;
- this.$.hint_text.style.display = '';
- },
-
- hideHintText_: function() {
- this.pendingHintTextClearTimeout_ = undefined;
- this.$.hint_text.style.display = 'none';
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view_test.html
deleted file mode 100644
index 3c026b86718..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_track_view_test.html
+++ /dev/null
@@ -1,200 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/extras/importer/trace_event_importer.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var SelectionState = tr.model.SelectionState;
- var Task = tr.b.Task;
-
- test('instantiate', function() {
- var numThreads = 500;
- var model = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(model) {
- var p100 = model.getOrCreateProcess(100);
- for (var i = 0; i < numThreads; i++) {
- var t = p100.getOrCreateThread(101 + i);
- if (i % 2 === 0) {
- t.sliceGroup.beginSlice('cat', 'a', 100);
- t.sliceGroup.endSlice(110);
- } else {
- t.sliceGroup.beginSlice('cat', 'b', 50);
- t.sliceGroup.endSlice(120);
- }
- }
- }
- });
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
- timeline.style.maxHeight = '600px';
- this.addHTMLOutput(timeline);
- });
-
- test('addAllEventsMatchingFilterToSelectionAsTask', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
-
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'b', 0, 1.1, {}, 2.8));
-
- var t1asg = t1.asyncSliceGroup;
- t1asg.slices.push(
- tr.c.TestUtils.newAsyncSliceNamed('a', 0, 1, t1, t1));
- t1asg.slices.push(
- tr.c.TestUtils.newAsyncSliceNamed('b', 1, 2, t1, t1));
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
-
- var expected = new tr.model.EventSet(
- [t1asg.slices[0], t1.sliceGroup.slices[0]]);
- var result = new tr.model.EventSet;
- var filterTask = timeline.addAllEventsMatchingFilterToSelectionAsTask(
- new tr.c.TitleOrCategoryFilter('a'), result);
- Task.RunSynchronously(filterTask);
- assert.isTrue(result.equals(expected));
-
- var expected = new tr.model.EventSet(
- [t1asg.slices[1], t1.sliceGroup.slices[1]]);
- var result = new tr.model.EventSet();
- var filterTask = timeline.addAllEventsMatchingFilterToSelectionAsTask(
- new tr.c.TitleOrCategoryFilter('b'), result);
- Task.RunSynchronously(filterTask);
- assert.isTrue(result.equals(expected));
- });
-
- test('emptyThreadsDeleted', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
-
- assert.isFalse(timeline.hasVisibleContent);
- });
-
- test('filteredCounters', function() {
- var model = new tr.Model();
- var c1 = model.kernel.getOrCreateCpu(0);
- c1.getOrCreateCounter('', 'b');
-
- var p1 = model.getOrCreateProcess(1);
- var ctr = p1.getOrCreateCounter('', 'a');
- var series = new tr.model.CounterSeries('a', 0);
- series.addCounterSample(0, 1);
- ctr.addSeries(series);
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
-
- assert.isTrue(timeline.hasVisibleContent);
- });
-
- test('filteredCpus', function() {
- var model = new tr.Model();
- var c1 = model.kernel.getOrCreateCpu(1);
- c1.getOrCreateCounter('', 'a');
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
-
- assert.isTrue(timeline.hasVisibleContent);
- });
-
- test('filteredProcesses', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- p1.getOrCreateCounter('', 'a');
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
-
- assert.isTrue(timeline.hasVisibleContent);
- });
-
- test('filteredThreads', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(2);
- t1.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx({start: 0, duration: 1}));
-
- var timeline = document.createElement('tr-ui-timeline-track-view');
- timeline.model = model;
-
- assert.isTrue(timeline.hasVisibleContent);
- });
-
- test('interestRange', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'c', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'c', args: {}, pid: 52, ts: 629, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', args: {}, pid: 52, ts: 631, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'a', args: {}, pid: 52, ts: 634, cat: 'foo', tid: 53, ph: 'E'}
- ];
- var model = tr.c.TestUtils.newModelWithEvents([events]);
- var trackView = document.createElement('tr-ui-timeline-track-view');
- trackView.model = model;
- this.addHTMLOutput(trackView);
-
- var slice = model.processes[52].threads[53].sliceGroup.slices[2];
- trackView.viewport.interestRange.setMinAndMax(slice.start, slice.end);
- });
-
- test('emptyInterestRange', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'c', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'c', args: {}, pid: 52, ts: 629, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', args: {}, pid: 52, ts: 631, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'a', args: {}, pid: 52, ts: 634, cat: 'foo', tid: 53, ph: 'E'}
- ];
- var model = tr.c.TestUtils.newModelWithEvents([events]);
- var trackView = document.createElement('tr-ui-timeline-track-view');
- trackView.model = model;
- this.addHTMLOutput(trackView);
- trackView.viewport.interestRange.reset();
- });
-
-
- test('thinnestInterestRange', function() {
- var events = [
- {name: 'a', args: {}, pid: 52, ts: 520, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'b', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'c', args: {}, pid: 52, ts: 560, cat: 'foo', tid: 53, ph: 'B'},
- {name: 'c', args: {}, pid: 52, ts: 629, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'b', args: {}, pid: 52, ts: 631, cat: 'foo', tid: 53, ph: 'E'},
- {name: 'a', args: {}, pid: 52, ts: 634, cat: 'foo', tid: 53, ph: 'E'}
- ];
- var model = tr.c.TestUtils.newModelWithEvents([events]);
- var trackView = document.createElement('tr-ui-timeline-track-view');
- trackView.model = model;
- this.addHTMLOutput(trackView);
- trackView.viewport.interestRange.reset();
-
- var slice = model.processes[52].threads[53].sliceGroup.slices[2];
- trackView.viewport.interestRange.setMinAndMax(slice.start, slice.start);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_view.html
deleted file mode 100644
index 88a9419e731..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view.html
+++ /dev/null
@@ -1,541 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/settings.html">
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/core/scripting_controller.html">
-<link rel="import" href="/tracing/metrics/all_metrics.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_view.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/base/dropdown.html">
-<link rel="import" href="/tracing/ui/base/favicons.html">
-<link rel="import" href="/tracing/ui/base/hotkey_controller.html">
-<link rel="import" href="/tracing/ui/base/info_bar_group.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/ui/base/toolbar_button.html">
-<link rel="import" href="/tracing/ui/base/utils.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-<link rel="import" href="/tracing/ui/find_control.html">
-<link rel="import" href="/tracing/ui/find_controller.html">
-<link rel="import" href="/tracing/ui/scripting_control.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel_container.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/timeline_view_help_overlay.html">
-<link rel="import" href="/tracing/ui/timeline_view_metadata_overlay.html">
-<link rel="import" href="/tracing/value/ui/preferred_display_unit.html">
-
-<dom-module id='tr-ui-timeline-view'>
- <template>
- <style>
- :host {
- flex-direction: column;
- cursor: default;
- display: flex;
- font-family: sans-serif;
- padding: 0;
- }
-
- #control {
- background-color: #e6e6e6;
- background-image: -webkit-gradient(linear, 0 0, 0 100%,
- from(#E5E5E5), to(#D1D1D1));
- flex: 0 0 auto;
- overflow-x: auto;
- }
-
- #control::-webkit-scrollbar { height: 0px; }
-
- #control > #bar {
- font-size: 12px;
- display: flex;
- flex-direction: row;
- margin: 1px;
- }
-
- #control > #bar > #title {
- display: flex;
- align-items: center;
- padding-left: 8px;
- padding-right: 8px;
- flex: 1 1 auto;
- }
-
- #control > #bar > #left_controls,
- #control > #bar > #right_controls {
- display: flex;
- flex-direction: row;
- align-items: stretch;
- }
-
- #control > #bar > #left_controls > * { margin-right: 2px; }
- #control > #bar > #right_controls > * { margin-left: 2px; }
- #control > #collapsing_controls { display: flex; }
-
- middle-container {
- flex: 1 1 auto;
- flex-direction: row;
- border-bottom: 1px solid #8e8e8e;
- display: flex;
- min-height: 0;
- }
-
- middle-container ::content track-view-container {
- flex: 1 1 auto;
- display: flex;
- min-height: 0;
- min-width: 0;
- overflow-x: hidden;
- }
-
- middle-container ::content track-view-container > * { flex: 1 1 auto; }
- middle-container > x-timeline-view-side-panel-container { flex: 0 0 auto; }
- tr-ui-b-drag-handle { flex: 0 0 auto; }
- tr-ui-a-analysis-view { flex: 0 0 auto; }
- </style>
-
- <tv-ui-b-hotkey-controller id="hkc"></tv-ui-b-hotkey-controller>
- <div id="control">
- <div id="bar">
- <div id="left_controls"></div>
- <div id="title">^_^</div>
- <div id="right_controls">
- <tr-ui-b-toolbar-button id="view_metadata_button">
- M
- </tr-ui-b-toolbar-button>
- <tr-ui-b-dropdown id="view_options_dropdown"></tr-ui-b-dropdown>
- <tr-ui-find-control id="view_find_control"></tr-ui-find-control>
- <tr-ui-b-toolbar-button id="view_console_button">
- &#187;
- </tr-ui-b-toolbar-button>
- <tr-ui-b-toolbar-button id="view_help_button">
- ?
- </tr-ui-b-toolbar-button>
- </div>
- </div>
- <div id="collapsing_controls"></div>
- <tr-ui-b-info-bar-group id="import-warnings">
- </tr-ui-b-info-bar-group>
- </div>
- <middle-container>
- <content></content>
-
- <tr-ui-side-panel-container id="side_panel_container">
- </tr-ui-side-panel-container>
- </middle-container>
- <tr-ui-b-drag-handle id="drag_handle"></tr-ui-b-drag-handle>
- <tr-ui-a-analysis-view id="analysis"></tr-ui-a-analysis-view>
-
- <tr-v-ui-preferred-display-unit id="display_unit">
- </tr-v-ui-preferred-display-unit>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-timeline-view',
-
- attached: function() {
- this.async(function() {
- this.trackViewContainer_ = Polymer.dom(this).querySelector(
- '#track_view_container');
- if (!this.trackViewContainer_)
- console.error('missing trackviewContainer');
- });
- },
-
- ready: function() {
- this.tabIndex = 0; // Let the timeline able to receive key events.
-
- this.titleEl_ = this.$.title;
- this.leftControlsEl_ = this.$.left_controls;
- this.rightControlsEl_ = this.$.right_controls;
- this.collapsingControlsEl_ = this.$.collapsing_controls;
- this.sidePanelContainer_ = this.$.side_panel_container;
-
- this.brushingStateController_ = new tr.c.BrushingStateController(this);
-
- this.findCtl_ = this.$.view_find_control;
- this.findCtl_.controller = new tr.ui.FindController(
- this.brushingStateController_);
-
- this.scriptingCtl_ = document.createElement('tr-ui-scripting-control');
- this.scriptingCtl_.controller = new tr.c.ScriptingController(
- this.brushingStateController_);
-
- this.sidePanelContainer_.brushingStateController =
- this.brushingStateController_;
-
- if (window.tr.metrics && window.tr.metrics.sh &&
- window.tr.metrics.sh.SystemHealthMetric) {
- this.railScoreSpan_ = document.createElement(
- 'tr-metrics-ui-sh-system-health-span');
- Polymer.dom(this.rightControls).appendChild(this.railScoreSpan_);
- } else {
- this.railScoreSpan_ = undefined;
- }
-
- this.optionsDropdown_ = this.$.view_options_dropdown;
- Polymer.dom(this.optionsDropdown_.iconElement).textContent = 'View Options';
-
- this.showFlowEvents_ = false;
- Polymer.dom(this.optionsDropdown_).appendChild(tr.ui.b.createCheckBox(
- this, 'showFlowEvents',
- 'tr.ui.TimelineView.showFlowEvents', false,
- 'Flow events'));
- this.highlightVSync_ = false;
- this.highlightVSyncCheckbox_ = tr.ui.b.createCheckBox(
- this, 'highlightVSync',
- 'tr.ui.TimelineView.highlightVSync', false,
- 'Highlight VSync');
- Polymer.dom(this.optionsDropdown_).appendChild(
- this.highlightVSyncCheckbox_);
-
- this.initMetadataButton_();
- this.initConsoleButton_();
- this.initHelpButton_();
-
- Polymer.dom(this.collapsingControls).appendChild(this.scriptingCtl_);
-
- this.dragEl_ = this.$.drag_handle;
-
- this.analysisEl_ = this.$.analysis;
- this.analysisEl_.brushingStateController = this.brushingStateController_;
-
- this.addEventListener(
- 'requestSelectionChange',
- function(e) {
- var sc = this.brushingStateController_;
- sc.changeSelectionFromRequestSelectionChangeEvent(e.selection);
- }.bind(this));
-
- // Bookkeeping.
- this.onViewportChanged_ = this.onViewportChanged_.bind(this);
- this.bindKeyListeners_();
-
- this.dragEl_.target = this.analysisEl_;
- },
-
- get globalMode() {
- return this.hotkeyController.globalMode;
- },
-
- set globalMode(globalMode) {
- globalMode = !!globalMode;
- this.brushingStateController_.historyEnabled = globalMode;
- this.hotkeyController.globalMode = globalMode;
- },
-
- get hotkeyController() {
- return this.$.hkc;
- },
-
- updateDocumentFavicon: function() {
- var hue;
- if (!this.model)
- hue = 'blue';
- else
- hue = this.model.faviconHue;
-
- var faviconData = tr.ui.b.FaviconsByHue[hue];
- if (faviconData === undefined)
- faviconData = tr.ui.b.FaviconsByHue['blue'];
-
- // Find link if its there
- var link = Polymer.dom(document.head).querySelector(
- 'link[rel="shortcut icon"]');
- if (!link) {
- link = document.createElement('link');
- link.rel = 'shortcut icon';
- Polymer.dom(document.head).appendChild(link);
- }
- link.href = faviconData;
- },
-
- get showFlowEvents() {
- return this.showFlowEvents_;
- },
-
- set showFlowEvents(showFlowEvents) {
- this.showFlowEvents_ = showFlowEvents;
- if (!this.trackView_)
- return;
- this.trackView_.viewport.showFlowEvents = showFlowEvents;
- },
-
- get highlightVSync() {
- return this.highlightVSync_;
- },
-
- set highlightVSync(highlightVSync) {
- this.highlightVSync_ = highlightVSync;
- if (!this.trackView_)
- return;
- this.trackView_.viewport.highlightVSync = highlightVSync;
- },
-
- initHelpButton_: function() {
- var helpButtonEl = this.$.view_help_button;
-
- var dlg = new tr.ui.b.Overlay();
- dlg.title = 'Chrome Tracing Help';
- dlg.visible = false;
- dlg.appendChild(
- document.createElement('tr-ui-timeline-view-help-overlay'));
-
- function onClick(e) {
- dlg.visible = !dlg.visible;
- // Stop event so it doesn't trigger new click listener on document.
- e.stopPropagation();
- }
-
- helpButtonEl.addEventListener('click', onClick.bind(this));
- },
-
- initConsoleButton_: function() {
- var toggleEl = this.$.view_console_button;
-
- function onClick(e) {
- this.scriptingCtl_.toggleVisibility();
- e.stopPropagation();
- return false;
- }
- toggleEl.addEventListener('click', onClick.bind(this));
- },
-
- initMetadataButton_: function() {
- var showEl = this.$.view_metadata_button;
-
- function onClick(e) {
- var dlg = new tr.ui.b.Overlay();
- dlg.title = 'Metadata for trace';
-
- var metadataOverlay = document.createElement(
- 'tr-ui-timeline-view-metadata-overlay');
- metadataOverlay.metadata = this.model.metadata;
-
- Polymer.dom(dlg).appendChild(metadataOverlay);
- dlg.visible = true;
-
- e.stopPropagation();
- return false;
- }
- showEl.addEventListener('click', onClick.bind(this));
-
- this.updateMetadataButtonVisibility_();
- },
-
- updateMetadataButtonVisibility_: function() {
- var showEl = this.$.view_metadata_button;
- showEl.style.display =
- (this.model && this.model.metadata.length) ? '' : 'none';
- },
-
- get leftControls() {
- return this.leftControlsEl_;
- },
-
- get rightControls() {
- return this.rightControlsEl_;
- },
-
- get collapsingControls() {
- return this.collapsingControlsEl_;
- },
-
- get viewTitle() {
- return Polymer.dom(this.titleEl_).textContent.substring(
- Polymer.dom(this.titleEl_).textContent.length - 2);
- },
-
- set viewTitle(text) {
- if (text === undefined) {
- Polymer.dom(this.titleEl_).textContent = '';
- this.titleEl_.hidden = true;
- return;
- }
- this.titleEl_.hidden = false;
- Polymer.dom(this.titleEl_).textContent = text;
- },
-
- get model() {
- if (this.trackView_)
- return this.trackView_.model;
- return undefined;
- },
-
- set model(model) {
- var modelInstanceChanged = model !== this.model;
- var modelValid = model && !model.bounds.isEmpty;
-
- var importWarningsEl = Polymer.dom(this.root).querySelector(
- '#import-warnings');
- Polymer.dom(importWarningsEl).textContent = '';
-
- // Remove old trackView if the model has completely changed.
- if (modelInstanceChanged) {
- if (this.railScoreSpan_)
- this.railScoreSpan_.model = undefined;
- Polymer.dom(this.trackViewContainer_).textContent = '';
- if (this.trackView_) {
- this.trackView_.viewport.removeEventListener(
- 'change', this.onViewportChanged_);
- this.trackView_.brushingStateController = undefined;
- this.trackView_.detach();
- this.trackView_ = undefined;
- }
- this.brushingStateController_.modelWillChange();
- }
-
- // Create new trackView if needed.
- if (modelValid && !this.trackView_) {
- this.trackView_ = document.createElement('tr-ui-timeline-track-view');
- this.trackView_.timelineView = this;
-
- this.trackView.brushingStateController = this.brushingStateController_;
-
- Polymer.dom(this.trackViewContainer_).appendChild(this.trackView_);
- this.trackView_.viewport.addEventListener(
- 'change', this.onViewportChanged_);
- }
-
- // Set the model.
- if (modelValid) {
- this.trackView_.model = model;
- this.trackView_.viewport.showFlowEvents = this.showFlowEvents;
- this.trackView_.viewport.highlightVSync = this.highlightVSync;
- if (this.railScoreSpan_)
- this.railScoreSpan_.model = model;
-
- this.$.display_unit.preferredTimeDisplayMode = model.intrinsicTimeUnit;
- }
-
- if (model) {
- model.importWarningsThatShouldBeShownToUser.forEach(
- function(importWarning) {
- importWarningsEl.addMessage(
- 'Import Warning: ' + importWarning.type + ': ' +
- importWarning.message);
- }, this);
- }
-
- // Do things that are selection specific
- if (modelInstanceChanged) {
- this.updateMetadataButtonVisibility_();
- this.brushingStateController_.modelDidChange();
- this.onViewportChanged_();
- }
- },
-
- get brushingStateController() {
- return this.brushingStateController_;
- },
-
- get trackView() {
- return this.trackView_;
- },
-
- get settings() {
- if (!this.settings_)
- this.settings_ = new tr.b.Settings();
- return this.settings_;
- },
-
- /**
- * Deprecated. Kept around because third_party code occasionally calls
- * this to set up embedding.
- */
- set focusElement(value) {
- throw new Error('This is deprecated. Please set globalMode to true.');
- },
-
- bindKeyListeners_: function() {
- var hkc = this.hotkeyController;
-
- // Shortcuts that *can* steal focus from the console and the filter text
- // box.
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- keyCode: '`'.charCodeAt(0),
- useCapture: true,
- thisArg: this,
- callback: function(e) {
- this.scriptingCtl_.toggleVisibility();
- if (!this.scriptingCtl_.hasFocus)
- this.focus();
- e.stopPropagation();
- }
- }));
-
- // Shortcuts that *can* steal focus from the filter text box.
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- keyCode: '/'.charCodeAt(0),
- useCapture: true,
- thisArg: this,
- callback: function(e) {
- if (this.scriptingCtl_.hasFocus)
- return;
- if (this.findCtl_.hasFocus)
- this.focus();
- else
- this.findCtl_.focus();
- e.preventDefault();
- e.stopPropagation();
- }
- }));
-
- // Shortcuts that *can't* steal focus.
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- keyCode: '?'.charCodeAt(0),
- useCapture: false,
- thisArg: this,
- callback: function(e) {
- this.$.view_help_button.click();
- e.stopPropagation();
- }
- }));
-
- hkc.addHotKey(new tr.ui.b.HotKey({
- eventType: 'keypress',
- keyCode: 'v'.charCodeAt(0),
- useCapture: false,
- thisArg: this,
- callback: function(e) {
- this.toggleHighlightVSync_();
- e.stopPropagation();
- }
- }));
- },
-
- onViewportChanged_: function(e) {
- var spc = this.sidePanelContainer_;
- if (!this.trackView_) {
- spc.rangeOfInterest.reset();
- return;
- }
-
- var vr = this.trackView_.viewport.interestRange.asRangeObject();
- if (!spc.rangeOfInterest.equals(vr))
- spc.rangeOfInterest = vr;
-
- if (this.railScoreSpan_ && this.model)
- this.railScoreSpan_.model = this.model;
- },
-
- toggleHighlightVSync_: function() {
- this.highlightVSyncCheckbox_.checked =
- !this.highlightVSyncCheckbox_.checked;
- },
-
- setFindCtlText: function(string) {
- this.findCtl_.setText(string);
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay.html
deleted file mode 100644
index 8e35cf3ccca..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay.html
+++ /dev/null
@@ -1,244 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_icon.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-
-<dom-module id='tr-ui-timeline-view-help-overlay'>
- <template>
- <style>
- :host {
- -webkit-flex: 1 1 auto;
- -webkit-flex-direction: row;
- display: -webkit-flex;
- width: 700px;
- }
- .column {
- width: 50%;
- }
- h2 {
- font-size: 1.2em;
- margin: 0;
- margin-top: 5px;
- text-align: center;
- }
- h3 {
- margin: 0;
- margin-left: 126px;
- margin-top: 10px;
- }
- .pair {
- -webkit-flex: 1 1 auto;
- -webkit-flex-direction: row;
- display: -webkit-flex;
- }
- .command {
- font-family: monospace;
- margin-right: 5px;
- text-align: right;
- width: 150px;
- }
- .action {
- font-size: 0.9em;
- text-align: left;
- width: 200px;
- }
- tr-ui-b-mouse-mode-icon {
- border: 1px solid #888;
- border-radius: 3px;
- box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
- display: inline-block;
- margin-right: 1px;
- position: relative;
- top: 4px;
- }
- .mouse-mode-icon.pan-mode {
- background-position: -1px -11px;
- }
- .mouse-mode-icon.select-mode {
- background-position: -1px -41px;
- }
- .mouse-mode-icon.zoom-mode {
- background-position: -1px -71px;
- }
- .mouse-mode-icon.timing-mode {
- background-position: -1px -101px;
- }
- </style>
- <div class="column left">
- <h2>Navigation</h2>
- <div class='pair'>
- <div class='command'>w/s</div>
- <div class='action'>Zoom in/out (+shift: faster)</div>
- </div>
-
- <div class='pair'>
- <div class='command'>a/d</div>
- <div class='action'>Pan left/right (+shift: faster)</div>
- </div>
-
- <div class='pair'>
- <div class='command'>&rarr;/shift-TAB</div>
- <div class='action'>Select previous event</div>
- </div>
-
- <div class='pair'>
- <div class='command'>&larr;/TAB</div>
- <div class='action'>Select next event</div>
- </div>
-
- <h2>Mouse Controls</h2>
- <div class='pair'>
- <div class='command'>click</div>
- <div class='action'>Select event</div>
- </div>
- <div class='pair'>
- <div class='command'>alt-mousewheel</div>
- <div class='action'>Zoom in/out</div>
- </div>
-
- <h3>
- <tr-ui-b-mouse-mode-icon mode-name="SELECTION"></tr-ui-b-mouse-mode-icon>
- Select mode
- </h3>
- <div class='pair'>
- <div class='command'>drag</div>
- <div class='action'>Box select</div>
- </div>
-
- <div class='pair'>
- <div class='command'><span class='mod'></span>-click/drag</div>
- <div class='action'>Add events to the current selection</div>
- </div>
-
- <div class='pair'>
- <div class='command'>double click</div>
- <div class='action'>Select all events with same title</div>
- </div>
-
- <h3>
- <tr-ui-b-mouse-mode-icon mode-name="PANSCAN"></tr-ui-b-mouse-mode-icon>
- Pan mode
- </h3>
- <div class='pair'>
- <div class='command'>drag</div>
- <div class='action'>Pan the view</div>
- </div>
-
- <h3>
- <tr-ui-b-mouse-mode-icon mode-name="ZOOM"></tr-ui-b-mouse-mode-icon>
- Zoom mode
- </h3>
- <div class='pair'>
- <div class='command'>drag</div>
- <div class='action'>Zoom in/out by dragging up/down</div>
- </div>
-
- <h3>
- <tr-ui-b-mouse-mode-icon mode-name="TIMING"></tr-ui-b-mouse-mode-icon>
- Timing mode
- </h3>
- <div class='pair'>
- <div class='command'>drag</div>
- <div class='action'>Create or move markers</div>
- </div>
-
- <div class='pair'>
- <div class='command'>double click</div>
- <div class='action'>Set marker range to slice</div>
- </div>
- </div>
-
- <div class="column right">
- <h2>General</h2>
- <div class='pair'>
- <div class='command'>1-4</div>
- <div class='action'>Switch mouse mode</div>
- </div>
-
- <div class='pair'>
- <div class='command'>shift</div>
- <div class='action'>Hold for temporary select</div>
- </div>
-
- <div class='pair'>
- <div class='command'>space</div>
- <div class='action'>Hold for temporary pan</div>
- </div>
-
- <div class='pair'>
- <div class='command'>/</div>
- <div class='action'>Search</div>
- </div>
-
- <div class='pair'>
- <div class='command'>enter</div>
- <div class='action'>Step through search results</div>
- </div>
-
- <div class='pair'>
- <div class='command'>f</div>
- <div class='action'>Zoom into selection</div>
- </div>
-
- <div class='pair'>
- <div class='command'>z/0</div>
- <div class='action'>Reset zoom and pan</div>
- </div>
-
- <div class='pair'>
- <div class='command'>g/G</div>
- <div class='action'>Toggle 60hz grid</div>
- </div>
-
- <div class='pair'>
- <div class='command'>v</div>
- <div class='action'>Highlight VSync</div>
- </div>
-
- <div class='pair'>
- <div class='command'>h</div>
- <div class='action'>Toggle low/high details</div>
- </div>
-
- <div class='pair'>
- <div class='command'>m</div>
- <div class='action'>Mark current selection</div>
- </div>
-
- <div class='pair'>
- <div class='command'>p</div>
- <div class='action'>Select power samples over current selection interval</div>
- </div>
-
- <div class='pair'>
- <div class='command'>`</div>
- <div class='action'>Show or hide the scripting console</div>
- </div>
-
- <div class='pair'>
- <div class='command'>?</div>
- <div class='action'>Show help</div>
- </div>
- </div>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-timeline-view-help-overlay',
-
- ready: function() {
- var mod = tr.isMac ? 'cmd ' : 'ctrl';
- var spans = Polymer.dom(this.root).querySelectorAll(
- 'span.mod');
- for (var i = 0; i < spans.length; i++)
- Polymer.dom(spans[i]).textContent = mod;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay_test.html
deleted file mode 100644
index d7e009d1623..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_help_overlay_test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/timeline_view_help_overlay.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('inactive', function() {
- var el = document.createElement('tr-ui-timeline-view-help-overlay');
- this.addHTMLOutput(el);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay.html
deleted file mode 100644
index 2ea3ea2453f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/ui/base/mouse_mode_icon.html">
-<link rel="import" href="/tracing/ui/base/overlay.html">
-<link rel="import" href="/tracing/value/ui/generic_table_view.html">
-
-<dom-module id='tr-ui-timeline-view-metadata-overlay'>
- <template>
- <style>
- :host {
- width: 700px;
-
- overflow: auto;
- }
- </style>
- <tr-v-ui-generic-table-view id="gtv"></tr-v-ui-generic-table-view>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-timeline-view-metadata-overlay',
-
- created: function() {
- this.metadata_ = undefined;
- },
-
- get metadata() {
- return this.metadata_;
- },
-
- set metadata(metadata) {
- this.metadata_ = metadata;
- this.$.gtv.items = this.metadata_;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay_test.html
deleted file mode 100644
index 04e88d00cda..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_metadata_overlay_test.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/ui/timeline_view_metadata_overlay.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('inactive', function() {
- var el = document.createElement('tr-ui-timeline-view-metadata-overlay');
- el.metadata = [
- {
- name: 'clientInfo',
- value: {
- command_line: './out/Release/Chromium.app/Contents/MacOS/Chromium --enable-threaded-compositing --force-compositing-mode --enable-impl-side-painting --enable-skia-benchmarking --allow-webui-compositing --flag-switches-begin --force-compositing-mode --disable-threaded-compositing --flag-switches-end', // @suppress longLineCheck
- version: 'Chrome/29.0.1521.0'
- }
- },
- {
- name: 'somethingElse',
- value: 'fascinating!'
- }
- ];
-
- this.addHTMLOutput(el);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_test.html
deleted file mode 100644
index c87b325f17f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_view_test.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/timeline_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Task = tr.b.Task;
-
- function setupTimeline() {
- var container = document.createElement('track-view-container');
- container.id = 'track_view_container';
-
- var view = document.createElement('tr-ui-timeline-view');
- Polymer.dom(view).appendChild(container);
- view.trackViewContainer_ = container;
- return view;
- }
-
- var createFullyPopulatedModel = function(opt_withError, opt_withMetadata) {
- var withError = opt_withError !== undefined ? opt_withError : true;
- var withMetadata = opt_withMetadata !== undefined ?
- opt_withMetadata : true;
-
- var numTests = 50;
- var testIndex = 0;
- var startTime = 0;
-
- var model = new tr.Model();
- var io = new tr.importer.ImportOptions();
- io.showImportWarnings = false;
- model.importOptions = io;
-
- for (testIndex = 0; testIndex < numTests; ++testIndex) {
- var process = model.getOrCreateProcess(10000 + testIndex);
- if (testIndex % 2 === 0) {
- var thread = process.getOrCreateThread('Thread Name Here');
- thread.sliceGroup.pushSlice(new tr.model.ThreadSlice(
- 'foo', 'a', 0, startTime, {}, 1));
- thread.sliceGroup.pushSlice(new tr.model.ThreadSlice(
- 'bar', 'b', 0, startTime + 23, {}, 10));
- } else {
- var thread = process.getOrCreateThread('Name');
- thread.sliceGroup.pushSlice(new tr.model.ThreadSlice(
- 'foo', 'a', 0, startTime + 4, {}, 11));
- thread.sliceGroup.pushSlice(new tr.model.ThreadSlice(
- 'bar', 'b', 0, startTime + 22, {}, 14));
- }
- }
- var p1000 = model.getOrCreateProcess(1000);
- var objects = p1000.objects;
- objects.idWasCreated('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 10);
- objects.addSnapshot('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 10,
- 'snapshot-1');
- objects.addSnapshot('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 25,
- 'snapshot-2');
- objects.addSnapshot('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 40,
- 'snapshot-3');
- objects.idWasDeleted('0x1000', 'tr.e.cc', 'LayerTreeHostImpl', 45);
- model.updateCategories_();
-
- // Add a known problematic piece of data to test the import errors UI.
- model.importWarning({
- type: 'test_error',
- message: 'Synthetic Import Error'
- });
- model.updateBounds();
-
- // Add data with metadata information stored
- model.metadata.push({name: 'a', value: 'testA'});
- model.metadata.push({name: 'b', value: 'testB'});
- model.metadata.push({name: 'c', value: 'testC'});
-
- return model;
- };
-
- var visibleTracks = function(trackButtons) {
- return trackButtons.reduce(function(numVisible, button) {
- var style = button.parentElement.style;
- var visible = (style.display.indexOf('none') === -1);
- return visible ? numVisible + 1 : numVisible;
- }, 0);
- };
-
- var modelsEquivalent = function(lhs, rhs) {
- if (lhs.length !== rhs.length)
- return false;
- return lhs.every(function(lhsItem, index) {
- var rhsItem = rhs[index];
- return rhsItem.regexpText === lhsItem.regexpText &&
- rhsItem.isOn === lhsItem.isOn;
- });
- };
-
- test('instantiate', function() {
- var model11 = createFullyPopulatedModel(true, true);
-
- var view = setupTimeline();
- view.style.height = '400px';
- view.style.border = '1px solid black';
- view.model = model11;
-
- var simpleButton1 = document.createElement('tr-ui-b-toolbar-button');
- Polymer.dom(simpleButton1).textContent = 'M';
- Polymer.dom(view.leftControls).appendChild(simpleButton1);
-
- var simpleButton2 = document.createElement('tr-ui-b-toolbar-button');
- Polymer.dom(simpleButton2).textContent = 'am button';
- Polymer.dom(view.leftControls).appendChild(simpleButton2);
-
- this.addHTMLOutput(view);
- });
-
- test('changeModelToSomethingDifferent', function() {
- var model00 = createFullyPopulatedModel(false, false);
- var model11 = createFullyPopulatedModel(true, true);
-
- var view = setupTimeline();
- view.style.height = '400px';
- view.model = model00;
- view.model = undefined;
- view.model = model11;
- view.model = model00;
- });
-
- test('setModelToSameThingAgain', function() {
- var model = createFullyPopulatedModel(false, false);
-
- // Create a view with am model.
- var view = setupTimeline();
- view.style.height = '400px';
- view.model = model;
- var sc = view.brushingStateController;
-
- // Mutate the model and update the view.
- var t123 = model.getOrCreateProcess(123).getOrCreateThread(123);
- t123.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {title: 'somethingUnusual', start: 0, duration: 5}));
- view.model = model;
-
- // Verify that the new bits of the model show up in the view.
- var selection = new tr.model.EventSet();
- var filter = new tr.c.TitleOrCategoryFilter('somethingUnusual');
- var filterTask = sc.addAllEventsMatchingFilterToSelectionAsTask(
- filter, selection);
- Task.RunSynchronously(filterTask);
- assert.equal(selection.length, 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport.html
deleted file mode 100644
index 59301b9a62e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport.html
+++ /dev/null
@@ -1,418 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/animation.html">
-<link rel="import" href="/tracing/ui/base/animation_controller.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/timeline_display_transform.html">
-<link rel="import" href="/tracing/ui/timeline_interest_range.html">
-<link rel="import" href="/tracing/ui/tracks/container_to_track_map.html">
-<link rel="import" href="/tracing/ui/tracks/event_to_track_map.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Code for the viewport.
- */
-tr.exportTo('tr.ui', function() {
- var TimelineDisplayTransform = tr.ui.TimelineDisplayTransform;
- var TimelineInterestRange = tr.ui.TimelineInterestRange;
-
- /**
- * The TimelineViewport manages the transform used for navigating
- * within the timeline. It is a simple transform:
- * x' = (x+pan) * scale
- *
- * The timeline code tries to avoid directly accessing this transform,
- * instead using this class to do conversion between world and viewspace,
- * as well as the math for centering the viewport in various interesting
- * ways.
- *
- * @constructor
- * @extends {tr.b.EventTarget}
- */
- function TimelineViewport(parentEl) {
- this.parentEl_ = parentEl;
- this.modelTrackContainer_ = undefined;
- this.currentDisplayTransform_ = new TimelineDisplayTransform();
- this.initAnimationController_();
-
- // Flow events
- this.showFlowEvents_ = false;
-
- // Highlights.
- this.highlightVSync_ = false;
-
- // High details.
- this.highDetails_ = false;
-
- // Grid system.
- this.gridTimebase_ = 0;
- this.gridStep_ = 1000 / 60;
- this.gridEnabled_ = false;
-
- // Init logic.
- this.hasCalledSetupFunction_ = false;
-
- this.onResize_ = this.onResize_.bind(this);
- this.onModelTrackControllerScroll_ =
- this.onModelTrackControllerScroll_.bind(this);
-
- // The following code uses an interval to detect when the parent element
- // is attached to the document. That is a trigger to run the setup function
- // and install a resize listener.
- this.checkForAttachInterval_ = setInterval(
- this.checkForAttach_.bind(this), 250);
-
- this.majorMarkPositions = [];
- this.interestRange_ = new TimelineInterestRange(this);
-
- this.eventToTrackMap_ = new tr.ui.tracks.EventToTrackMap();
- this.containerToTrackMap = new tr.ui.tracks.ContainerToTrackMap();
- }
-
- TimelineViewport.prototype = {
- __proto__: tr.b.EventTarget.prototype,
-
- /**
- * Allows initialization of the viewport when the viewport's parent element
- * has been attached to the document and given a size.
- * @param {Function} fn Function to call when the viewport can be safely
- * initialized.
- */
- setWhenPossible: function(fn) {
- this.pendingSetFunction_ = fn;
- },
-
- /**
- * @return {boolean} Whether the current timeline is attached to the
- * document.
- */
- get isAttachedToDocumentOrInTestMode() {
- // Allow not providing a parent element, used by tests.
- if (this.parentEl_ === undefined)
- return;
- return tr.ui.b.isElementAttachedToDocument(this.parentEl_);
- },
-
- onResize_: function() {
- this.dispatchChangeEvent();
- },
-
- /**
- * Checks whether the parentNode is attached to the document.
- * When it is, it installs the iframe-based resize detection hook
- * and then runs the pendingSetFunction_, if present.
- */
- checkForAttach_: function() {
- if (!this.isAttachedToDocumentOrInTestMode || this.clientWidth === 0)
- return;
-
- window.addEventListener('resize', this.dispatchChangeEvent.bind(this));
-
- var curSize = this.parentEl_.clientWidth + 'x' +
- this.parentEl_.clientHeight;
- if (this.pendingSetFunction_) {
- this.lastSize_ = curSize;
- try {
- this.pendingSetFunction_();
- } catch (ex) {
- console.log('While running setWhenPossible:',
- ex.message ? ex.message + '\n' + ex.stack : ex.stack);
- }
- this.pendingSetFunction_ = undefined;
- }
-
- window.clearInterval(this.checkForAttachInterval_);
- this.checkForAttachInterval_ = undefined;
- },
-
- /**
- * Fires the change event on this viewport. Used to notify listeners
- * to redraw when the underlying model has been mutated.
- */
- dispatchChangeEvent: function() {
- tr.b.dispatchSimpleEvent(this, 'change');
- },
-
- detach: function() {
- if (this.checkForAttachInterval_) {
- window.clearInterval(this.checkForAttachInterval_);
- this.checkForAttachInterval_ = undefined;
- }
- window.removeEventListener('resize', this.dispatchChangeEvent.bind(this));
- },
-
- initAnimationController_: function() {
- this.dtAnimationController_ = new tr.ui.b.AnimationController();
- this.dtAnimationController_.addEventListener(
- 'didtick', function(e) {
- this.onCurentDisplayTransformChange_(e.oldTargetState);
- }.bind(this));
-
- var that = this;
- this.dtAnimationController_.target = {
- get panX() {
- return that.currentDisplayTransform_.panX;
- },
-
- set panX(panX) {
- that.currentDisplayTransform_.panX = panX;
- },
-
- get panY() {
- return that.currentDisplayTransform_.panY;
- },
-
- set panY(panY) {
- that.currentDisplayTransform_.panY = panY;
- },
-
- get scaleX() {
- return that.currentDisplayTransform_.scaleX;
- },
-
- set scaleX(scaleX) {
- that.currentDisplayTransform_.scaleX = scaleX;
- },
-
- cloneAnimationState: function() {
- return that.currentDisplayTransform_.clone();
- },
-
- xPanWorldPosToViewPos: function(xWorld, xView) {
- that.currentDisplayTransform_.xPanWorldPosToViewPos(
- xWorld, xView, that.modelTrackContainer_.canvas.clientWidth);
- }
- };
- },
-
- get currentDisplayTransform() {
- return this.currentDisplayTransform_;
- },
-
- setDisplayTransformImmediately: function(displayTransform) {
- this.dtAnimationController_.cancelActiveAnimation();
-
- var oldDisplayTransform =
- this.dtAnimationController_.target.cloneAnimationState();
- this.currentDisplayTransform_.set(displayTransform);
- this.onCurentDisplayTransformChange_(oldDisplayTransform);
- },
-
- queueDisplayTransformAnimation: function(animation) {
- if (!(animation instanceof tr.ui.b.Animation))
- throw new Error('animation must be instanceof tr.ui.b.Animation');
- this.dtAnimationController_.queueAnimation(animation);
- },
-
- onCurentDisplayTransformChange_: function(oldDisplayTransform) {
- // Ensure panY stays clamped in the track container's scroll range.
- if (this.modelTrackContainer_) {
- this.currentDisplayTransform.panY = tr.b.clamp(
- this.currentDisplayTransform.panY,
- 0,
- this.modelTrackContainer_.scrollHeight -
- this.modelTrackContainer_.clientHeight);
- }
-
- var changed = !this.currentDisplayTransform.equals(oldDisplayTransform);
- var yChanged = this.currentDisplayTransform.panY !==
- oldDisplayTransform.panY;
- if (yChanged)
- this.modelTrackContainer_.scrollTop = this.currentDisplayTransform.panY;
- if (changed)
- this.dispatchChangeEvent();
- },
-
- onModelTrackControllerScroll_: function(e) {
- if (this.dtAnimationController_.activeAnimation &&
- this.dtAnimationController_.activeAnimation.affectsPanY)
- this.dtAnimationController_.cancelActiveAnimation();
- var panY = this.modelTrackContainer_.scrollTop;
- this.currentDisplayTransform_.panY = panY;
- },
-
- get modelTrackContainer() {
- return this.modelTrackContainer_;
- },
-
- set modelTrackContainer(m) {
- if (this.modelTrackContainer_)
- this.modelTrackContainer_.removeEventListener('scroll',
- this.onModelTrackControllerScroll_);
-
- this.modelTrackContainer_ = m;
- this.modelTrackContainer_.addEventListener('scroll',
- this.onModelTrackControllerScroll_);
- },
-
- get showFlowEvents() {
- return this.showFlowEvents_;
- },
-
- set showFlowEvents(showFlowEvents) {
- this.showFlowEvents_ = showFlowEvents;
- this.dispatchChangeEvent();
- },
-
- get highlightVSync() {
- return this.highlightVSync_;
- },
-
- set highlightVSync(highlightVSync) {
- this.highlightVSync_ = highlightVSync;
- this.dispatchChangeEvent();
- },
-
- get highDetails() {
- return this.highDetails_;
- },
-
- set highDetails(highDetails) {
- this.highDetails_ = highDetails;
- this.dispatchChangeEvent();
- },
-
- get gridEnabled() {
- return this.gridEnabled_;
- },
-
- set gridEnabled(enabled) {
- if (this.gridEnabled_ === enabled)
- return;
-
- this.gridEnabled_ = enabled && true;
- this.dispatchChangeEvent();
- },
-
- get gridTimebase() {
- return this.gridTimebase_;
- },
-
- set gridTimebase(timebase) {
- if (this.gridTimebase_ === timebase)
- return;
- this.gridTimebase_ = timebase;
- this.dispatchChangeEvent();
- },
-
- get gridStep() {
- return this.gridStep_;
- },
-
- get interestRange() {
- return this.interestRange_;
- },
-
- drawMajorMarkLines: function(ctx) {
- // Apply subpixel translate to get crisp lines.
- // http://www.mobtowers.com/html5-canvas-crisp-lines-every-time/
- ctx.save();
- ctx.translate((Math.round(ctx.lineWidth) % 2) / 2, 0);
-
- ctx.beginPath();
- for (var idx in this.majorMarkPositions) {
- var x = Math.floor(this.majorMarkPositions[idx]);
- tr.ui.b.drawLine(ctx, x, 0, x, ctx.canvas.height);
- }
- ctx.strokeStyle = '#ddd';
- ctx.stroke();
-
- ctx.restore();
- },
-
- drawGridLines: function(ctx, viewLWorld, viewRWorld) {
- if (!this.gridEnabled)
- return;
-
- var dt = this.currentDisplayTransform;
- var x = this.gridTimebase;
-
- // Apply subpixel translate to get crisp lines.
- // http://www.mobtowers.com/html5-canvas-crisp-lines-every-time/
- ctx.save();
- ctx.translate((Math.round(ctx.lineWidth) % 2) / 2, 0);
-
- ctx.beginPath();
- while (x < viewRWorld) {
- if (x >= viewLWorld) {
- // Do conversion to viewspace here rather than on
- // x to avoid precision issues.
- var vx = Math.floor(dt.xWorldToView(x));
- tr.ui.b.drawLine(ctx, vx, 0, vx, ctx.canvas.height);
- }
-
- x += this.gridStep;
- }
- ctx.strokeStyle = 'rgba(255, 0, 0, 0.25)';
- ctx.stroke();
-
- ctx.restore();
- },
-
- /**
- * Helper for selection previous or next.
- * @param {boolean} offset If positive, select one forward (next).
- * Else, select previous.
- *
- * @return {boolean} true if current selection changed.
- */
- getShiftedSelection: function(selection, offset) {
- var newSelection = new tr.model.EventSet();
- for (var event of selection) {
-
- // If this is a flow event, then move to its slice based on the
- // offset direction.
- if (event instanceof tr.model.FlowEvent) {
- if (offset > 0) {
- newSelection.push(event.endSlice);
- } else if (offset < 0) {
- newSelection.push(event.startSlice);
- } else {
- /* Do nothing. Zero offsets don't do anything. */
- }
- continue;
- }
-
- var track = this.trackForEvent(event);
- track.addEventNearToProvidedEventToSelection(
- event, offset, newSelection);
- }
-
- if (newSelection.length === 0)
- return undefined;
- return newSelection;
- },
-
- rebuildEventToTrackMap: function() {
- // TODO(charliea): Make the event to track map have a similar interface
- // to the container to track map so that we can just clear() here.
- this.eventToTrackMap_ = new tr.ui.tracks.EventToTrackMap();
- this.modelTrackContainer_.addEventsToTrackMap(this.eventToTrackMap_);
- },
-
- rebuildContainerToTrackMap: function() {
- this.containerToTrackMap.clear();
- this.modelTrackContainer_.addContainersToTrackMap(
- this.containerToTrackMap);
- },
-
- trackForEvent: function(event) {
- return this.eventToTrackMap_[event.guid];
- }
- };
-
- return {
- TimelineViewport: TimelineViewport
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport_test.html b/chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport_test.html
deleted file mode 100644
index 7492a56d7c1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/timeline_viewport_test.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/location.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/base/constants.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/slice_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Location = tr.model.Location;
- var Model = tr.Model;
-
- test('memoization', function() {
-
- var vp = new tr.ui.TimelineViewport(document.createElement('div'));
-
- var slice = { guid: 1 };
-
- vp.modelTrackContainer = {
- addEventsToTrackMap: function(eventToTrackMap) {
- eventToTrackMap.addEvent(slice, 'track');
- },
- addEventListener: function() {}
- };
-
- assert.isUndefined(vp.trackForEvent(slice));
- vp.rebuildEventToTrackMap();
-
- assert.equal(vp.trackForEvent(slice), 'track');
- });
-
- test('shiftedSelection', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 1, {}, 3));
- t1.sliceGroup.pushSlice(
- new tr.model.ThreadSlice('', 'a', 0, 5, {}, 1));
-
- var viewport = new tr.ui.TimelineViewport();
- var track = new tr.ui.tracks.SliceTrack(viewport);
- viewport.modelTrackContainer = track;
- track.slices = t1.sliceGroup.slices;
-
- viewport.rebuildEventToTrackMap();
-
- var sel = new tr.model.EventSet();
- sel.push(t1.sliceGroup.slices[0]);
-
- var shifted = track.viewport.getShiftedSelection(sel, 1);
- assert.isTrue(shifted.equals(
- new tr.model.EventSet(t1.sliceGroup.slices[1])));
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track.html
deleted file mode 100644
index a6082f9d040..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/letter_dot_track.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays an array of alert objects.
- * @constructor
- * @extends {LetterDotTrack}
- */
- var AlertTrack = tr.ui.b.define(
- 'alert-track', tr.ui.tracks.LetterDotTrack);
-
- AlertTrack.prototype = {
- __proto__: tr.ui.tracks.LetterDotTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this, viewport);
- this.heading = 'Alerts';
- this.alerts_ = undefined;
- },
-
- get alerts() {
- return this.alerts_;
- },
-
- set alerts(alerts) {
- this.alerts_ = alerts;
- if (alerts === undefined) {
- this.items = undefined;
- return;
- }
- this.items = this.alerts_.map(function(alert) {
- return new tr.ui.tracks.LetterDot(
- alert, String.fromCharCode(9888), alert.colorId, alert.start);
- });
- }
- };
-
- return {
- AlertTrack: AlertTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track_test.html
deleted file mode 100644
index 723ca4522d9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/alert_track_test.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/alert_track.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AlertTrack = tr.ui.tracks.AlertTrack;
- var SelectionState = tr.model.SelectionState;
- var Viewport = tr.ui.TimelineViewport;
-
- var ALERT_INFO_1 = new tr.model.EventInfo(
- 'Alert 1', 'One alert');
- var ALERT_INFO_2 = new tr.model.EventInfo(
- 'Alert 2', 'Another alert');
-
- var createAlerts = function() {
- var alerts = [
- new tr.model.Alert(ALERT_INFO_1, 5),
- new tr.model.Alert(ALERT_INFO_1, 20),
- new tr.model.Alert(ALERT_INFO_2, 35),
- new tr.model.Alert(ALERT_INFO_2, 50)
- ];
- return alerts;
- };
-
- test('instantiate', function() {
- var alerts = createAlerts();
- alerts[1].selectionState = SelectionState.SELECTED;
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = AlertTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.alerts = alerts;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 50, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
-
-
- assert.equal(5, track.items[0].start);
- });
-
- test('modelMapping', function() {
- var alerts = createAlerts();
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var track = AlertTrack(viewport);
- track.alerts = alerts;
-
- var a0 = track.items[0].modelItem;
- assert.equal(a0, alerts[0]);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track.html
deleted file mode 100644
index 229402eba6b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/multi_row_track.html">
-<link rel="import" href="/tracing/ui/tracks/slice_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays a AsyncSliceGroup.
- * @constructor
- * @extends {MultiRowTrack}
- */
- var AsyncSliceGroupTrack = tr.ui.b.define(
- 'async-slice-group-track',
- tr.ui.tracks.MultiRowTrack);
-
- AsyncSliceGroupTrack.prototype = {
-
- __proto__: tr.ui.tracks.MultiRowTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('async-slice-group-track');
- this.group_ = undefined;
- },
-
- addSubTrack_: function(slices) {
- var track = new tr.ui.tracks.SliceTrack(this.viewport);
- track.slices = slices;
- Polymer.dom(this).appendChild(track);
- track.asyncStyle = true;
- return track;
- },
-
- get group() {
- return this.group_;
- },
-
- set group(group) {
- this.group_ = group;
- this.setItemsToGroup(this.group_.slices, this.group_);
- },
-
- get eventContainer() {
- return this.group;
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- tr.ui.tracks.MultiRowTrack.prototype.addContainersToTrackMap.apply(
- this, arguments);
- containerToTrackMap.addContainer(this.group, this);
- },
-
- /**
- * Breaks up the list of slices into N rows, each of which is a list of
- * slices that are non overlapping.
- *
- * It uses a very simple approach: walk through the slices in sorted order
- * by start time. For each slice, try to fit it in an existing subRow. If
- * it doesn't fit in any subrow, make another subRow. It then fits nested
- * subSlices recursively into rows below parent slice according to which
- * nested level the child is in.
- */
- buildSubRows_: function(slices, opt_skipSort) {
- if (!opt_skipSort) {
- slices.sort(function(x, y) {
- return x.start - y.start;
- });
- }
-
- // Helper function that returns true if it can put the slice on row n.
- var findLevel = function(sliceToPut, rows, n) {
- if (n >= rows.length)
- return true; // We always can make empty rows to put the slice.
- var subRow = rows[n];
- var lastSliceInSubRow = subRow[subRow.length - 1];
- if (sliceToPut.start >= lastSliceInSubRow.end) {
- if (sliceToPut.subSlices === undefined ||
- sliceToPut.subSlices.length === 0) {
- return true;
- }
- // Make sure nested sub slices can be fitted in as well.
- for (var subSlice of sliceToPut.subSlices) {
- if (!findLevel(subSlice, rows, n + 1))
- return false;
- }
- return true;
- }
- return false;
- };
-
- var subRows = [];
- for (var slice of slices) {
- var found = false;
- var index = subRows.length;
- for (var j = 0; j < subRows.length; j++) {
- if (findLevel(slice, subRows, j)) {
- found = true;
- index = j;
- break;
- }
- }
- if (!found)
- subRows.push([]);
- subRows[index].push(slice);
-
- // Fit subSlices recursively into rows below parent.
- var fitSubSlicesRecursively = function(subSlices, level, rows) {
- if (subSlices === undefined || subSlices.length === 0)
- return;
- if (level === rows.length)
- rows.push([]);
- for (var subSlice of subSlices) {
- rows[level].push(subSlice);
- fitSubSlicesRecursively(subSlice.subSlices, level + 1, rows);
- }
- };
- fitSubSlicesRecursively(slice.subSlices, index + 1, subRows);
- }
- return subRows;
- }
- };
-
- return {
- AsyncSliceGroupTrack: AsyncSliceGroupTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track_test.html
deleted file mode 100644
index 824b7d0cf2e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/async_slice_group_track_test.html
+++ /dev/null
@@ -1,252 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var AsyncSliceGroup = tr.model.AsyncSliceGroup;
- var AsyncSliceGroupTrack = tr.ui.tracks.AsyncSliceGroupTrack;
- var Process = tr.model.Process;
- var ProcessTrack = tr.ui.tracks.ProcessTrack;
- var Thread = tr.model.Thread;
- var ThreadTrack = tr.ui.tracks.ThreadTrack;
- var newAsyncSlice = tr.c.TestUtils.newAsyncSlice;
- var newAsyncSliceNamed = tr.c.TestUtils.newAsyncSliceNamed;
-
- test('filterSubRows', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
- g.push(newAsyncSlice(0, 1, t1, t1));
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
-
- assert.equal(track.children.length, 1);
- assert.isTrue(track.hasVisibleContent);
- });
-
- test('rebuildSubRows_twoNonOverlappingSlices', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
- var s1 = newAsyncSlice(0, 1, t1, t1);
- var subs1 = newAsyncSliceNamed('b', 0, 1, t1, t1);
- s1.subSlices = [subs1];
- g.push(s1);
- g.push(newAsyncSlice(1, 1, t1, t1));
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
- var subRows = track.subRows;
- assert.equal(subRows.length, 2);
- assert.equal(subRows[0].length, 2);
- assert.equal(subRows[1].length, 1);
- assert.equal(subRows[1][0], g.slices[0].subSlices[0]);
- assert.sameMembers(g.slices[1].subSlices, []);
- });
-
- test('rebuildSubRows_twoOverlappingSlices', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
-
- var s1 = newAsyncSlice(0, 1, t1, t1);
- var subs1 = newAsyncSliceNamed('b', 0, 1, t1, t1);
- s1.subSlices = [subs1];
- var s2 = newAsyncSlice(0, 1.5, t1, t1);
- var subs2 = newAsyncSliceNamed('b', 0, 1, t1, t1);
- s2.subSlices = [subs2];
- g.push(s1);
- g.push(s2);
-
- g.updateBounds();
-
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
-
- var subRows = track.subRows;
-
- assert.equal(subRows.length, 4);
- assert.equal(subRows[0].length, 1);
- assert.equal(subRows[1].length, 1);
- assert.equal(subRows[2].length, 1);
- assert.equal(subRows[3].length, 1);
- assert.equal(subRows[1][0], g.slices[0].subSlices[0]);
- assert.equal(subRows[3][0], g.slices[1].subSlices[0]);
- });
-
- test('rebuildSubRows_threePartlyOverlappingSlices', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
- g.push(newAsyncSlice(0, 1, t1, t1));
- g.push(newAsyncSlice(0, 1.5, t1, t1));
- g.push(newAsyncSlice(1, 1.5, t1, t1));
- g.updateBounds();
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
- var subRows = track.subRows;
-
- assert.equal(subRows.length, 2);
- assert.equal(subRows[0].length, 2);
- assert.equal(subRows[0][0], g.slices[0]);
- assert.equal(subRows[0][1], g.slices[2]);
- assert.equal(subRows[1][0], g.slices[1]);
- assert.equal(subRows[1].length, 1);
- assert.sameMembers(g.slices[0].subSlices, []);
- assert.sameMembers(g.slices[1].subSlices, []);
- assert.sameMembers(g.slices[2].subSlices, []);
- });
-
- test('rebuildSubRows_threeOverlappingSlices', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
-
- g.push(newAsyncSlice(0, 1, t1, t1));
- g.push(newAsyncSlice(0, 1.5, t1, t1));
- g.push(newAsyncSlice(2, 1, t1, t1));
- g.updateBounds();
-
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
-
- var subRows = track.subRows;
- assert.equal(subRows.length, 2);
- assert.equal(subRows[0].length, 2);
- assert.equal(subRows[1].length, 1);
- assert.equal(subRows[0][0], g.slices[0]);
- assert.equal(subRows[1][0], g.slices[1]);
- assert.equal(subRows[0][1], g.slices[2]);
- });
-
- // Tests that no slices and their sub slices overlap.
- test('rebuildSubRows_NonOverlappingSubSlices', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
-
- var slice1 = newAsyncSlice(0, 5, t1, t1);
- var slice1Child = newAsyncSlice(1, 2, t1, t1);
- slice1.subSlices = [slice1Child];
- var slice2 = newAsyncSlice(3, 5, t1, t1);
- var slice3 = newAsyncSlice(5, 4, t1, t1);
- var slice3Child = newAsyncSlice(6, 2, t1, t1);
- slice3.subSlices = [slice3Child];
- g.push(slice1);
- g.push(slice2);
- g.push(slice3);
- g.updateBounds();
-
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
-
- var subRows = track.subRows;
- // Checks each sub row to see that we don't have any overlapping slices.
- for (var i = 0; i < subRows.length; i++) {
- var row = subRows[i];
- for (var j = 0; j < row.length; j++) {
- for (var k = j + 1; k < row.length; k++) {
- assert.isTrue(row[j].end <= row[k].start);
- }
- }
- }
- });
-
- test('rebuildSubRows_NonOverlappingSubSlicesThreeNestedLevels', function() {
- var model = new tr.Model();
- var p1 = new Process(model, 1);
- var t1 = new Thread(p1, 1);
- var g = new AsyncSliceGroup(t1);
-
- var slice1 = newAsyncSlice(0, 4, t1, t1);
- var slice1Child = newAsyncSlice(1, 2, t1, t1);
- slice1.subSlices = [slice1Child];
- var slice2 = newAsyncSlice(2, 7, t1, t1);
- var slice3 = newAsyncSlice(5, 5, t1, t1);
- var slice3Child = newAsyncSlice(6, 3, t1, t1);
- var slice3Child2 = newAsyncSlice(7, 1, t1, t1);
- slice3.subSlices = [slice3Child];
- slice3Child.subSlices = [slice3Child2];
- g.push(slice1);
- g.push(slice2);
- g.push(slice3);
- g.updateBounds();
-
- var track = new AsyncSliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = g;
-
- var subRows = track.subRows;
- // Checks each sub row to see that we don't have any overlapping slices.
- for (var i = 0; i < subRows.length; i++) {
- var row = subRows[i];
- for (var j = 0; j < row.length; j++) {
- for (var k = j + 1; k < row.length; k++) {
- assert.isTrue(row[j].end <= row[k].start);
- }
- }
- }
- });
-
- test('asyncSliceGroupContainerMap', function() {
- var vp = new tr.ui.TimelineViewport();
- var containerToTrack = vp.containerToTrackMap;
- var model = new tr.Model();
- var process = model.getOrCreateProcess(123);
- var thread = process.getOrCreateThread(456);
- var group = new AsyncSliceGroup(thread);
-
- var processTrack = new ProcessTrack(vp);
- var threadTrack = new ThreadTrack(vp);
- var groupTrack = new AsyncSliceGroupTrack(vp);
- processTrack.process = process;
- threadTrack.thread = thread;
- groupTrack.group = group;
- Polymer.dom(processTrack).appendChild(threadTrack);
- Polymer.dom(threadTrack).appendChild(groupTrack);
-
- assert.equal(processTrack.eventContainer, process);
- assert.equal(threadTrack.eventContainer, thread);
- assert.equal(groupTrack.eventContainer, group);
-
- assert.isUndefined(containerToTrack.getTrackByStableId('123'));
- assert.isUndefined(containerToTrack.getTrackByStableId('123.456'));
- assert.isUndefined(
- containerToTrack.getTrackByStableId('123.456.AsyncSliceGroup'));
-
- vp.modelTrackContainer = {
- addContainersToTrackMap: function(containerToTrackMap) {
- processTrack.addContainersToTrackMap(containerToTrackMap);
- },
- addEventListener: function() {}
- };
- vp.rebuildContainerToTrackMap();
-
- // Check that all tracks call childs' addContainersToTrackMap()
- // by checking the resulting map.
- assert.equal(containerToTrack.getTrackByStableId('123'), processTrack);
- assert.equal(containerToTrack.getTrackByStableId('123.456'), threadTrack);
- assert.equal(containerToTrack.getTrackByStableId('123.456.AsyncSliceGroup'),
- groupTrack);
-
- // Check the track's eventContainer getter.
- assert.equal(processTrack.eventContainer, process);
- assert.equal(threadTrack.eventContainer, thread);
- assert.equal(groupTrack.eventContainer, group);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis.html
deleted file mode 100644
index f91733ced9e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * A vertical axis for a (set of) chart series which maps an arbitrary range
- * of values [min, max] to the unit range [0, 1].
- *
- * @constructor
- */
- function ChartAxis(opt_min, opt_max) {
- this.guid_ = tr.b.GUID.allocateSimple();
- this.bounds = new tr.b.Range();
- if (opt_min !== undefined)
- this.bounds.addValue(opt_min);
- if (opt_max !== undefined)
- this.bounds.addValue(opt_max);
- };
-
- ChartAxis.prototype = {
- get guid() {
- return this.guid_;
- },
-
- valueToUnitRange: function(value) {
- if (this.bounds.isEmpty)
- throw new Error('Chart axis bounds are empty');
- var bounds = this.bounds;
- if (bounds.range === 0)
- return 0;
- return (value - bounds.min) / bounds.range;
- },
-
- /**
- * Automatically set the axis bounds from the range of values of all series
- * in a list.
- *
- * See the description of autoSetFromRange for the optional configuration
- * argument flags.
- */
- autoSetFromSeries: function(series, opt_config) {
- var range = new tr.b.Range();
- series.forEach(function(s) {
- range.addRange(s.range);
- }, this);
- this.autoSetFromRange(range, opt_config);
- },
-
- /**
- * Automatically set the axis bound from a range of values.
- *
- * The following four flags, which affect the behavior of this method with
- * respect to already defined bounds, can be present in the optional
- * configuration (a flag is assumed to be false if it is not provided or if
- * the configuration is not provided):
- *
- * - expandMin: allow decreasing the min bound (if range.min < this.min)
- * - shrinkMin: allow increasing the min bound (if range.min > this.min)
- * - expandMax: allow increasing the max bound (if range.max > this.max)
- * - shrinkMax: allow decreasing the max bound (if range.max < this.max)
- *
- * This method will ensure that the resulting bounds are defined and valid
- * (i.e. min <= max) provided that they were valid or empty before and the
- * value range is non-empty and valid.
- *
- * Note that unless expanding/shrinking a bound is explicitly enabled in
- * the configuration, non-empty bounds will not be changed under any
- * circumstances.
- *
- * Observe that if no configuration is provided (or all flags are set to
- * false), this method will only modify the axis bounds if they are empty.
- */
- autoSetFromRange: function(range, opt_config) {
- if (range.isEmpty)
- return;
-
- var bounds = this.bounds;
- if (bounds.isEmpty) {
- bounds.addRange(range);
- return;
- }
-
- if (!opt_config)
- return;
-
- var useRangeMin = (opt_config.expandMin && range.min < bounds.min ||
- opt_config.shrinkMin && range.min > bounds.min);
- var useRangeMax = (opt_config.expandMax && range.max > bounds.max ||
- opt_config.shrinkMax && range.max < bounds.max);
-
- // Neither bound is modified.
- if (!useRangeMin && !useRangeMax)
- return;
-
- // Both bounds are modified. Assuming the range argument is a valid
- // range, no extra checks are necessary.
- if (useRangeMin && useRangeMax) {
- bounds.min = range.min;
- bounds.max = range.max;
- return;
- }
-
- // Only one bound is modified. We must ensure that it doesn't go
- // over/under the other (unmodified) bound.
- if (useRangeMin) {
- bounds.min = Math.min(range.min, bounds.max);
- } else {
- bounds.max = Math.max(range.max, bounds.min);
- }
- }
- };
-
- return {
- ChartAxis: ChartAxis
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis_test.html
deleted file mode 100644
index a5f83fd56f8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_axis_test.html
+++ /dev/null
@@ -1,312 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ChartAxis = tr.ui.tracks.ChartAxis;
- var ChartPoint = tr.ui.tracks.ChartPoint;
- var ChartSeries = tr.ui.tracks.ChartSeries;
- var Range = tr.b.Range;
-
- function buildRange() {
- var range = new Range();
- for (var i = 0; i < arguments.length; i++)
- range.addValue(arguments[i]);
- return range;
- }
-
- function buildSeries() {
- var points = [];
- for (var i = 0; i < arguments.length; i++) {
- points.push(new ChartPoint(undefined, i, arguments[i]));
- }
- return new ChartSeries(points, new ChartAxis());
- }
-
- test('instantiate_emptyBounds', function() {
- var axis = new ChartAxis();
- assert.isTrue(axis.bounds.isEmpty);
- });
-
- test('instantiate_nonEmptyBounds', function() {
- var axis = new ChartAxis(-2, 12);
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, -2);
- assert.equal(axis.bounds.max, 12);
- });
-
- test('instantiate_equalBounds', function() {
- var axis = new ChartAxis(2.72);
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 2.72);
- assert.equal(axis.bounds.max, 2.72);
- });
-
- test('checkValueToUnitRange_emptyBounds', function() {
- var axis = new ChartAxis();
- assert.throws(function() { axis.valueToUnitRange(42); });
- });
-
- test('checkValueToUnitRange_nonEmptyBounds', function() {
- var axis = new ChartAxis(10, 20);
-
- assert.equal(axis.valueToUnitRange(0), -1);
- assert.equal(axis.valueToUnitRange(10), 0);
- assert.equal(axis.valueToUnitRange(15), 0.5);
- assert.equal(axis.valueToUnitRange(20), 1);
- assert.equal(axis.valueToUnitRange(30), 2);
- });
-
- test('checkValueToUnitRange_equalBounds', function() {
- var axis = new ChartAxis(3.14);
-
- assert.equal(axis.valueToUnitRange(0), 0);
- assert.equal(axis.valueToUnitRange(3.14), 0);
- assert.equal(axis.valueToUnitRange(6.28), 0);
- });
-
- test('checkAutoSetFromRange_emptyBounds', function() {
- // Empty range.
- var axis = new ChartAxis();
- axis.autoSetFromRange(buildRange());
- assert.isTrue(axis.bounds.isEmpty);
-
- // Non-empty range.
- var axis = new ChartAxis();
- axis.autoSetFromRange(buildRange(-1, 3));
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, -1);
- assert.equal(axis.bounds.max, 3);
- });
-
- test('checkAutoSetFromRange_nonEmptyBounds', function() {
- // Empty range.
- var axis = new ChartAxis(0, 1);
- axis.autoSetFromRange(buildRange());
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 0);
- assert.equal(axis.bounds.max, 1);
-
- // No configuration.
- var axis = new ChartAxis(2, 3);
- axis.autoSetFromRange(buildRange(1, 4));
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 2);
- assert.equal(axis.bounds.max, 3);
-
- // Allow expanding min.
- var axis = new ChartAxis(-2, -1);
- axis.autoSetFromRange(buildRange(-3, 0), {expandMin: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, -3);
- assert.equal(axis.bounds.max, -1);
-
- // Allow shrinking min.
- var axis = new ChartAxis(-2, -1);
- axis.autoSetFromRange(buildRange(-1.5, 0.5), {shrinkMin: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, -1.5);
- assert.equal(axis.bounds.max, -1);
-
- var axis = new ChartAxis(7, 8);
- axis.autoSetFromRange(buildRange(9, 10), {shrinkMin: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 8);
- assert.equal(axis.bounds.max, 8);
-
- // Allow expanding max.
- var axis = new ChartAxis(19, 20);
- axis.autoSetFromRange(buildRange(18, 21), {expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 19);
- assert.equal(axis.bounds.max, 21);
-
- // Allow shrinking max.
- var axis = new ChartAxis(30, 32);
- axis.autoSetFromRange(buildRange(29, 31), {shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 30);
- assert.equal(axis.bounds.max, 31);
-
- var axis = new ChartAxis(41, 42);
- axis.autoSetFromRange(buildRange(39, 40), {shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 41);
- assert.equal(axis.bounds.max, 41);
-
- // Allow shrinking both bounds.
- var axis = new ChartAxis(50, 53);
- axis.autoSetFromRange(buildRange(51, 52),
- {shrinkMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 51);
- assert.equal(axis.bounds.max, 52);
-
- var axis = new ChartAxis(50, 53);
- axis.autoSetFromRange(buildRange(49, 52),
- {shrinkMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 50);
- assert.equal(axis.bounds.max, 52);
-
- var axis = new ChartAxis(50, 53);
- axis.autoSetFromRange(buildRange(51, 54),
- {shrinkMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 51);
- assert.equal(axis.bounds.max, 53);
-
- var axis = new ChartAxis(50, 53);
- axis.autoSetFromRange(buildRange(49, 54),
- {shrinkMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 50);
- assert.equal(axis.bounds.max, 53);
-
- // Allow expanding both bounds.
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(0, 100),
- {expandMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 0);
- assert.equal(axis.bounds.max, 100);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(60.5, 100),
- {expandMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60);
- assert.equal(axis.bounds.max, 100);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(0, 60.5),
- {expandMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 0);
- assert.equal(axis.bounds.max, 61);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(60.2, 60.8),
- {expandMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60);
- assert.equal(axis.bounds.max, 61);
-
- // Allow shrinking min and expanding max.
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(62, 63),
- {shrinkMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 62);
- assert.equal(axis.bounds.max, 63);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(59, 63),
- {shrinkMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60);
- assert.equal(axis.bounds.max, 63);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(60.2, 60.8),
- {shrinkMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60.2);
- assert.equal(axis.bounds.max, 61);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(59, 60.5),
- {shrinkMin: true, expandMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60);
- assert.equal(axis.bounds.max, 61);
-
- // Allow expanding min and shrinking max.
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(62, 63),
- {expandMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60);
- assert.equal(axis.bounds.max, 61);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(59, 63),
- {expandMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 59);
- assert.equal(axis.bounds.max, 61);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(60.2, 60.8),
- {expandMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 60);
- assert.equal(axis.bounds.max, 60.8);
-
- var axis = new ChartAxis(60, 61);
- axis.autoSetFromRange(buildRange(59, 60.5),
- {expandMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 59);
- assert.equal(axis.bounds.max, 60.5);
-
- // Allow everything.
- var axis = new ChartAxis(200, 250);
- axis.autoSetFromRange(buildRange(150, 175),
- {expandMin: true, expandMax: true, shrinkMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 150);
- assert.equal(axis.bounds.max, 175);
-
- var axis = new ChartAxis(0, 0.1);
- axis.autoSetFromRange(buildRange(0.2, 0.3),
- {expandMin: true, expandMax: true, shrinkMin: true, shrinkMax: true});
- assert.isFalse(axis.bounds.isEmpty);
- assert.equal(axis.bounds.min, 0.2);
- assert.equal(axis.bounds.max, 0.3);
- });
-
- test('checkAutoSetFromSeries_noSeries', function() {
- var axis = new ChartAxis(-100, 100);
- var series = [];
-
- axis.autoSetFromSeries(series);
- assert.equal(axis.bounds.min, -100);
- assert.equal(axis.bounds.max, 100);
- });
-
- test('checkAutoSetFromSeries_oneSeries', function() {
- var axis = new ChartAxis(-100, 100);
- var series = [buildSeries(-80, 100, -40, 200)];
-
- axis.autoSetFromSeries(series, {shrinkMin: true, expandMax: true});
- assert.equal(axis.bounds.min, -80);
- assert.equal(axis.bounds.max, 200);
- });
-
- test('checkAutoSetFromSeries_multipleSeries', function() {
- var axis = new ChartAxis(-100, 100);
- var series = [
- buildSeries(0, 20, 10, 30),
- buildSeries(),
- buildSeries(-500)
- ];
-
- axis.autoSetFromSeries(series, {expandMin: true, shrinkMax: true});
- assert.equal(axis.bounds.min, -500);
- assert.equal(axis.bounds.max, 30);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point.html
deleted file mode 100644
index f5b5587dcde..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/proxy_selectable_item.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * A point in a chart series with x (timestamp) and y (value) coordinates
- * and an associated model item. The point can optionally also have a base
- * y coordinate (which for example corresponds to the bottom edge of the
- * associated bar in a bar chart).
- *
- * @constructor
- * @extends {ProxySelectableItem}
- */
- function ChartPoint(modelItem, x, y, opt_yBase) {
- tr.model.ProxySelectableItem.call(this, modelItem);
- this.x = x;
- this.y = y;
-
- // If the base y-coordinate is undefined, the bottom edge of the associated
- // bar in a bar chart will start at the outer bottom edge (which is most
- // likely slightly below zero).
- this.yBase = opt_yBase;
- };
-
- ChartPoint.prototype = {
- __proto__: tr.model.ProxySelectableItem.prototype
- };
-
- return {
- ChartPoint: ChartPoint
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point_test.html
deleted file mode 100644
index 491784dbe51..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_point_test.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ChartPoint = tr.ui.tracks.ChartPoint;
-
- test('checkFields_withoutYBase', function() {
- var event = {};
- var point = new ChartPoint(event, 42, -7);
-
- assert.equal(point.modelItem, event);
- assert.equal(point.x, 42);
- assert.equal(point.y, -7);
- assert.isUndefined(point.yBase);
- });
-
- test('checkFields_withYBase', function() {
- var event = {};
- var point = new ChartPoint(event, 111, 222, 333);
-
- assert.equal(point.modelItem, event);
- assert.equal(point.x, 111);
- assert.equal(point.y, 222);
- assert.equal(point.yBase, 333);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series.html
deleted file mode 100644
index 05cd5a03a6e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series.html
+++ /dev/null
@@ -1,494 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/ui/base/event_presenter.html">
-<link rel="import" href="/tracing/model/proxy_selectable_item.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var EventPresenter = tr.ui.b.EventPresenter;
- var SelectionState = tr.model.SelectionState;
-
- /**
- * The type of a chart series.
- * @enum
- */
- var ChartSeriesType = {
- LINE: 0,
- AREA: 1
- };
-
- // The default rendering configuration for ChartSeries.
- var DEFAULT_RENDERING_CONFIG = {
- // The type of the chart series.
- chartType: ChartSeriesType.LINE,
-
- // The size of a selected point dot in device-independent pixels (circle
- // diameter).
- selectedPointSize: 4,
-
- // The size of an unselected point dot in device-independent pixels (square
- // width/height).
- unselectedPointSize: 3,
-
- // The color of the chart.
- colorId: 0,
-
- // The width of the top line in device-independent pixels.
- lineWidth: 1,
-
- // Minimum distance between points in physical pixels. Points which are
- // closer than this distance will be skipped.
- skipDistance: 1,
-
- // Density in points per physical pixel at which unselected point dots
- // become transparent.
- unselectedPointDensityTransparent: 0.10,
-
- // Density in points per physical pixel at which unselected point dots
- // become fully opaque.
- unselectedPointDensityOpaque: 0.05,
-
- // Opacity of area chart background.
- backgroundOpacity: 0.5
- };
-
- // The virtual width of the last point in a series (whose rectangle has zero
- // width) in world timestamps difference for the purposes of selection.
- var LAST_POINT_WIDTH = 16;
-
- /**
- * Visual components of a ChartSeries.
- * @enum
- */
- var ChartSeriesComponent = {
- BACKGROUND: 0,
- LINE: 1,
- DOTS: 2
- };
-
- /**
- * A series of points corresponding to a single chart on a chart track.
- * This class is responsible for drawing the actual chart onto canvas.
- *
- * @constructor
- */
- function ChartSeries(points, axis, opt_renderingConfig) {
- this.points = points;
- this.axis = axis;
-
- this.useRenderingConfig_(opt_renderingConfig);
- }
-
- ChartSeries.prototype = {
- useRenderingConfig_: function(opt_renderingConfig) {
- var config = opt_renderingConfig || {};
-
- // Store all configuration flags as private properties.
- tr.b.iterItems(DEFAULT_RENDERING_CONFIG, function(key, defaultValue) {
- var value = config[key];
- if (value === undefined)
- value = defaultValue;
- this[key + '_'] = value;
- }, this);
-
- // Avoid unnecessary recomputation in getters.
- this.topPadding = this.bottomPadding = Math.max(
- this.selectedPointSize_, this.unselectedPointSize_) / 2;
- },
-
- get range() {
- var range = new tr.b.Range();
- this.points.forEach(function(point) {
- range.addValue(point.y);
- }, this);
- return range;
- },
-
- draw: function(ctx, transform, highDetails) {
- if (this.points === undefined || this.points.length === 0)
- return;
-
- // Draw the background.
- if (this.chartType_ === ChartSeriesType.AREA) {
- this.drawComponent_(ctx, transform, ChartSeriesComponent.BACKGROUND,
- highDetails);
- }
-
- // Draw the line at the top.
- if (this.chartType_ === ChartSeriesType.LINE || highDetails) {
- this.drawComponent_(ctx, transform, ChartSeriesComponent.LINE,
- highDetails);
- }
-
- // Draw the points.
- this.drawComponent_(ctx, transform, ChartSeriesComponent.DOTS,
- highDetails);
- },
-
- drawComponent_: function(ctx, transform, component, highDetails) {
- // We need to consider extra pixels outside the visible area to avoid
- // visual glitches due to non-zero width of dots.
- var extraPixels = 0;
- if (component === ChartSeriesComponent.DOTS) {
- extraPixels = Math.max(
- this.selectedPointSize_, this.unselectedPointSize_);
- }
- var leftViewX = transform.leftViewX - extraPixels * transform.pixelRatio;
- var rightViewX = transform.rightViewX +
- extraPixels * transform.pixelRatio;
- var leftTimestamp = transform.leftTimestamp - extraPixels;
- var rightTimestamp = transform.rightTimestamp + extraPixels;
-
- // Find the index of the first and last (partially) visible points.
- var firstVisibleIndex = tr.b.findLowIndexInSortedArray(
- this.points,
- function(point) { return point.x; },
- leftTimestamp);
- var lastVisibleIndex = tr.b.findLowIndexInSortedArray(
- this.points,
- function(point) { return point.x; },
- rightTimestamp);
- if (lastVisibleIndex >= this.points.length ||
- this.points[lastVisibleIndex].x > rightTimestamp) {
- lastVisibleIndex--;
- }
-
- // Pre-calculate component style which does not depend on individual
- // points:
- // * Skip distance between points,
- // * Selected (circle) and unselected (square) dot size,
- // * Unselected dot opacity,
- // * Selected dot edge color and width, and
- // * Line component color and width.
- var viewSkipDistance = this.skipDistance_ * transform.pixelRatio;
- var circleRadius;
- var squareSize;
- var squareHalfSize;
- var squareOpacity;
-
- switch (component) {
- case ChartSeriesComponent.DOTS:
- // Selected dot edge color and width.
- ctx.strokeStyle = EventPresenter.getCounterSeriesColor(
- this.colorId_, SelectionState.NONE);
- ctx.lineWidth = transform.pixelRatio;
-
- // Selected (circle) and unselected (square) dot size.
- circleRadius = (this.selectedPointSize_ / 2) * transform.pixelRatio;
- squareSize = this.unselectedPointSize_ * transform.pixelRatio;
- squareHalfSize = squareSize / 2;
-
- // Unselected dot opacity.
- if (!highDetails) {
- // Unselected dots are not displayed in 'low details' mode.
- squareOpacity = 0;
- break;
- }
- var visibleIndexRange = lastVisibleIndex - firstVisibleIndex;
- if (visibleIndexRange <= 0) {
- // There is at most one visible point.
- squareOpacity = 1;
- break;
- }
- var visibleViewXRange =
- transform.worldXToViewX(this.points[lastVisibleIndex].x) -
- transform.worldXToViewX(this.points[firstVisibleIndex].x);
- if (visibleViewXRange === 0) {
- // Multiple visible points which all have the same timestamp.
- squareOpacity = 1;
- break;
- }
- var density = visibleIndexRange / visibleViewXRange;
- var clampedDensity = tr.b.clamp(density,
- this.unselectedPointDensityOpaque_,
- this.unselectedPointDensityTransparent_);
- var densityRange = this.unselectedPointDensityTransparent_ -
- this.unselectedPointDensityOpaque_;
- squareOpacity =
- (this.unselectedPointDensityTransparent_ - clampedDensity) /
- densityRange;
- break;
-
- case ChartSeriesComponent.LINE:
- // Line component color and width.
- ctx.strokeStyle = EventPresenter.getCounterSeriesColor(
- this.colorId_, SelectionState.NONE);
- ctx.lineWidth = this.lineWidth_ * transform.pixelRatio;
- break;
-
- case ChartSeriesComponent.BACKGROUND:
- // Style depends on the selection state of individual points.
- break;
-
- default:
- throw new Error('Invalid component: ' + component);
- }
-
- // The main loop which draws the given component of visible points from
- // left to right. Given the potentially large number of points to draw,
- // it should be considered performance-critical and function calls should
- // be avoided when possible.
- //
- // Note that the background and line components are drawn in a delayed
- // fashion: the rectangle/line that we draw in an iteration corresponds
- // to the *previous* point. This does not apply to the dots, whose
- // position is independent of the surrounding dots.
- var previousViewX = undefined;
- var previousViewY = undefined;
- var previousViewYBase = undefined;
- var lastSelectionState = undefined;
- var baseSteps = undefined;
- var startIndex = Math.max(firstVisibleIndex - 1, 0);
-
- for (var i = startIndex; i < this.points.length; i++) {
- var currentPoint = this.points[i];
- var currentViewX = transform.worldXToViewX(currentPoint.x);
-
- // Stop drawing the points once we are to the right of the visible area.
- if (currentViewX > rightViewX) {
- if (previousViewX !== undefined) {
- previousViewX = currentViewX = rightViewX;
- if (component === ChartSeriesComponent.BACKGROUND ||
- component === ChartSeriesComponent.LINE) {
- ctx.lineTo(currentViewX, previousViewY);
- }
- }
- break;
- }
-
- if (i + 1 < this.points.length) {
- var nextPoint = this.points[i + 1];
- var nextViewX = transform.worldXToViewX(nextPoint.x);
-
- // Skip points that are too close to each other.
- if (previousViewX !== undefined &&
- nextViewX - previousViewX <= viewSkipDistance &&
- nextViewX < rightViewX) {
- continue;
- }
-
- // Start drawing right at the left side of the visible are (instead
- // of potentially very far to the left).
- if (currentViewX < leftViewX) {
- currentViewX = leftViewX;
- }
- }
-
- if (previousViewX !== undefined &&
- currentViewX - previousViewX < viewSkipDistance) {
- // We know that nextViewX > previousViewX + viewSkipDistance, so we
- // can safely move this points's x over that much without passing
- // nextViewX. This ensures that the previous point is visible when
- // zoomed out very far.
- currentViewX = previousViewX + viewSkipDistance;
- }
-
- var currentViewY = Math.round(transform.worldYToViewY(currentPoint.y));
- var currentViewYBase;
- if (currentPoint.yBase === undefined) {
- currentViewYBase = transform.outerBottomViewY;
- } else {
- currentViewYBase = Math.round(
- transform.worldYToViewY(currentPoint.yBase));
- }
- var currentSelectionState = currentPoint.selectionState;
-
- // Actually draw the given component of the point.
- switch (component) {
- case ChartSeriesComponent.DOTS:
- // Change dot style when the selection state changes (and at the
- // beginning).
- if (currentSelectionState !== lastSelectionState) {
- if (currentSelectionState === SelectionState.SELECTED) {
- ctx.fillStyle = EventPresenter.getCounterSeriesColor(
- this.colorId_, currentSelectionState);
- } else if (squareOpacity > 0) {
- ctx.fillStyle = EventPresenter.getCounterSeriesColor(
- this.colorId_, currentSelectionState, squareOpacity);
- }
- }
-
- // Draw the dot for the current point.
- if (currentSelectionState === SelectionState.SELECTED) {
- ctx.beginPath();
- ctx.arc(currentViewX, currentViewY, circleRadius, 0, 2 * Math.PI);
- ctx.fill();
- ctx.stroke();
- } else if (squareOpacity > 0) {
- ctx.fillRect(currentViewX - squareHalfSize,
- currentViewY - squareHalfSize, squareSize, squareSize);
- }
- break;
-
- case ChartSeriesComponent.LINE:
- // Draw the top line for the previous point (if applicable), or
- // prepare for drawing the top line of the current point in the next
- // iteration.
- if (previousViewX === undefined) {
- ctx.beginPath();
- ctx.moveTo(currentViewX, currentViewY);
- } else {
- ctx.lineTo(currentViewX, previousViewY);
- }
-
- // Move to the current point coordinate.
- ctx.lineTo(currentViewX, currentViewY);
- break;
-
- case ChartSeriesComponent.BACKGROUND:
- // Draw the background for the previous point (if applicable).
- if (previousViewX !== undefined)
- ctx.lineTo(currentViewX, previousViewY);
-
- // Finish the bottom part of the backgound polygon, change
- // background color and start a new polygon when the selection state
- // changes (and at the beginning).
- if (currentSelectionState !== lastSelectionState) {
- if (previousViewX !== undefined) {
- var previousBaseStepViewX = currentViewX;
- for (var j = baseSteps.length - 1; j >= 0; j--) {
- var baseStep = baseSteps[j];
- var baseStepViewX = baseStep.viewX;
- var baseStepViewY = baseStep.viewY;
- ctx.lineTo(previousBaseStepViewX, baseStepViewY);
- ctx.lineTo(baseStepViewX, baseStepViewY);
- previousBaseStepViewX = baseStepViewX;
- }
- ctx.closePath();
- ctx.fill();
- }
- ctx.beginPath();
- ctx.fillStyle = EventPresenter.getCounterSeriesColor(
- this.colorId_, currentSelectionState,
- this.backgroundOpacity_);
- ctx.moveTo(currentViewX, currentViewYBase);
- baseSteps = [];
- }
-
- if (currentViewYBase !== previousViewYBase ||
- currentSelectionState !== lastSelectionState) {
- baseSteps.push({viewX: currentViewX, viewY: currentViewYBase});
- }
-
- // Move to the current point coordinate.
- ctx.lineTo(currentViewX, currentViewY);
- break;
-
- default:
- throw new Error('Not reachable');
- }
-
- previousViewX = currentViewX;
- previousViewY = currentViewY;
- previousViewYBase = currentViewYBase;
- lastSelectionState = currentSelectionState;
- }
-
- // If we still have an open background or top line polygon (which is
- // always the case once we have started drawing due to the delayed fashion
- // of drawing), we must close it.
- if (previousViewX !== undefined) {
- switch (component) {
- case ChartSeriesComponent.DOTS:
- // All dots were drawn in the main loop.
- break;
-
- case ChartSeriesComponent.LINE:
- ctx.stroke();
- break;
-
- case ChartSeriesComponent.BACKGROUND:
- var previousBaseStepViewX = currentViewX;
- for (var j = baseSteps.length - 1; j >= 0; j--) {
- var baseStep = baseSteps[j];
- var baseStepViewX = baseStep.viewX;
- var baseStepViewY = baseStep.viewY;
- ctx.lineTo(previousBaseStepViewX, baseStepViewY);
- ctx.lineTo(baseStepViewX, baseStepViewY);
- previousBaseStepViewX = baseStepViewX;
- }
- ctx.closePath();
- ctx.fill();
- break;
-
- default:
- throw new Error('Not reachable');
- }
- }
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- var points = this.points;
-
- function getPointWidth(point, i) {
- if (i === points.length - 1)
- return LAST_POINT_WIDTH * viewPixWidthWorld;
- var nextPoint = points[i + 1];
- return nextPoint.x - point.x;
- }
-
- function selectPoint(point) {
- point.addToSelection(selection);
- }
-
- tr.b.iterateOverIntersectingIntervals(
- this.points,
- function(point) { return point.x },
- getPointWidth,
- loWX,
- hiWX,
- selectPoint);
- },
-
- addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- if (this.points === undefined)
- return false;
-
- var index = tr.b.findFirstIndexInArray(this.points, function(point) {
- return point.modelItem === event;
- }, this);
- if (index === -1)
- return false;
-
- var newIndex = index + offset;
- if (newIndex < 0 || newIndex >= this.points.length)
- return false;
-
- this.points[newIndex].addToSelection(selection);
- return true;
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- if (this.points === undefined)
- return;
-
- var item = tr.b.findClosestElementInSortedArray(
- this.points,
- function(point) { return point.x },
- worldX,
- worldMaxDist);
-
- if (!item)
- return;
-
- item.addToSelection(selection);
- }
- };
-
- return {
- ChartSeries: ChartSeries,
- ChartSeriesType: ChartSeriesType
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series_test.html
deleted file mode 100644
index c8a974c8ba9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_series_test.html
+++ /dev/null
@@ -1,285 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/timeline_display_transform.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-<link rel="import" href="/tracing/ui/tracks/chart_transform.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var TimelineDisplayTransform = tr.ui.TimelineDisplayTransform;
- var Event = tr.model.Event;
- var ChartAxis = tr.ui.tracks.ChartAxis;
- var ChartPoint = tr.ui.tracks.ChartPoint;
- var ChartSeries = tr.ui.tracks.ChartSeries;
- var ChartTransform = tr.ui.tracks.ChartTransform;
- var ChartSeriesType = tr.ui.tracks.ChartSeriesType;
-
- var CANVAS_WIDTH = 800;
- var CANVAS_HEIGHT = 80;
-
- function buildSeries(renderingConfig) {
- var points = [];
- for (var i = 0; i < 60; i++) {
- var event = new Event();
- event.index = i;
- var phase = i * Math.PI / 15;
- var value = Math.sin(phase);
- var peakIndex = Math.floor((phase + Math.PI / 2) / (2 * Math.PI));
- var base = peakIndex % 2 === 0 ? undefined : -1 + value / 1.5;
- var point = new ChartPoint(event, i - 30, value, base);
- points.push(point);
- }
- var axis = new ChartAxis(-1, 1);
- return new ChartSeries(points, axis, renderingConfig);
- }
-
- function drawSeriesWithDetails(test, series, highDetails) {
- var div = document.createElement('div');
- var canvas = document.createElement('canvas');
- Polymer.dom(div).appendChild(canvas);
-
- var pixelRatio = window.devicePixelRatio || 1;
-
- canvas.width = CANVAS_WIDTH * pixelRatio;
- canvas.style.width = CANVAS_WIDTH + 'px';
- canvas.height = CANVAS_HEIGHT * pixelRatio;
- canvas.style.height = CANVAS_HEIGHT + 'px';
-
- var displayTransform = new TimelineDisplayTransform();
- displayTransform.scaleX = CANVAS_WIDTH * pixelRatio / 60;
- displayTransform.panX = 30;
-
- var transform = new ChartTransform(
- displayTransform,
- series.axis,
- CANVAS_WIDTH * pixelRatio,
- CANVAS_HEIGHT * pixelRatio,
- 10 * pixelRatio,
- 10 * pixelRatio,
- pixelRatio);
-
- series.draw(canvas.getContext('2d'), transform, highDetails);
-
- test.addHTMLOutput(div);
- }
-
- function drawSeries(test, series) {
- drawSeriesWithDetails(test, series, false);
- drawSeriesWithDetails(test, series, true);
- }
-
- test('instantiate_defaultConfig', function() {
- var series = buildSeries(undefined);
- drawSeries(this, series);
- });
-
- test('instantiate_lineChart', function() {
- var series = buildSeries({
- chartType: ChartSeriesType.LINE,
- colorId: 4,
- unselectedPointSize: 6,
- lineWidth: 2,
- unselectedPointDensityOpaque: 0.08
- });
- drawSeries(this, series);
- });
-
- test('instantiate_areaChart', function() {
- var series = buildSeries({
- chartType: ChartSeriesType.AREA,
- colorId: 2,
- backgroundOpacity: 0.2
- });
- drawSeries(this, series);
- });
-
- test('instantiate_largeSkipDistance', function() {
- var series = buildSeries({
- chartType: ChartSeriesType.AREA,
- colorId: 1,
- skipDistance: 40,
- unselectedPointDensityTransparent: 0.07
- });
- drawSeries(this, series);
- });
-
- test('instantiate_selection', function() {
- var series = buildSeries({
- chartType: ChartSeriesType.AREA,
- colorId: 10
- });
- series.points.forEach(function(point, index) {
- point.modelItem.selectionState = index % 4;
- });
- drawSeries(this, series);
- });
-
- test('instantiate_selectionWithAllConfigFlags', function() {
- var series = buildSeries({
- chartType: ChartSeriesType.AREA,
- selectedPointSize: 10,
- unselectedPointSize: 6,
- colorId: 15,
- lineWidth: 2,
- skipDistance: 25,
- unselectedPointDensityOpaque: 0.07,
- unselectedPointDensityTransparent: 0.09,
- backgroundOpacity: 0.8
- });
- series.points.forEach(function(point, index) {
- point.modelItem.selectionState = index % 4;
- });
- drawSeries(this, series);
- });
-
- test('checkRange', function() {
- var series = buildSeries();
- var range = series.range;
- assert.isFalse(range.isEmpty);
- assert.closeTo(range.min, -1, 0.05);
- assert.closeTo(range.max, 1, 0.05);
- });
-
- test('checkaddIntersectingEventsInRangeToSelectionInWorldSpace', function() {
- var series = buildSeries();
-
- // Too far left.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- -1000, -30.5, 40, sel);
- assert.lengthOf(sel, 0);
-
- // Select first point.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- -30.5, -29.5, 40, sel);
- assert.equal(tr.b.getOnlyElement(sel).index, 0);
-
- // Select second point.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- -28.8, -28.2, 40, sel);
- assert.equal(tr.b.getOnlyElement(sel).index, 1);
-
- // Select points in the middle.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- -0.99, 1.01, 40, sel);
- assert.lengthOf(sel, 3);
- var iterator = sel[Symbol.iterator]();
- assert.equal(iterator.next().value.index, 29);
- assert.equal(iterator.next().value.index, 30);
- assert.equal(iterator.next().value.index, 31);
-
- // Select the last point.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 668.99, 668.99, 40, sel);
- assert.equal(tr.b.getOnlyElement(sel).index, 59);
-
- // Too far right.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 669.01, 2000, 40, sel);
- assert.lengthOf(sel, 0);
-
- // Select everything.
- var sel = new EventSet();
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- -29.01, 669.01, 40, sel);
- assert.lengthOf(sel, 60);
- });
-
- test('checkaddEventNearToProvidedEventToSelection', function() {
- var series = buildSeries();
-
- // Invalid event.
- var sel = new EventSet();
- assert.isFalse(series.addEventNearToProvidedEventToSelection(
- new Event(), 1, sel));
- assert.lengthOf(sel, 0);
-
- var sel = new EventSet();
- assert.isFalse(series.addEventNearToProvidedEventToSelection(
- new Event(), -1, sel));
- assert.lengthOf(sel, 0);
-
- // First point.
- var sel = new EventSet();
- assert.isTrue(series.addEventNearToProvidedEventToSelection(
- series.points[0].modelItem, 1, sel));
- assert.equal(tr.b.getOnlyElement(sel).index, 1);
-
- var sel = new EventSet();
- assert.isFalse(series.addEventNearToProvidedEventToSelection(
- series.points[0].modelItem, -1, sel));
- assert.lengthOf(sel, 0);
-
- // Middle point.
- var sel = new EventSet();
- assert.isTrue(series.addEventNearToProvidedEventToSelection(
- series.points[30].modelItem, 1, sel));
- assert.equal(tr.b.getOnlyElement(sel).index, 31);
-
- var sel = new EventSet();
- assert.isTrue(series.addEventNearToProvidedEventToSelection(
- series.points[30].modelItem, -1, sel));
- assert.equal(tr.b.getOnlyElement(sel).index, 29);
-
- // Last point.
- var sel = new EventSet();
- assert.isFalse(series.addEventNearToProvidedEventToSelection(
- series.points[59].modelItem, 1, sel));
- assert.lengthOf(sel, 0);
-
- var sel = new EventSet();
- assert.isTrue(series.addEventNearToProvidedEventToSelection(
- series.points[59].modelItem, -1, sel));
- assert.equal(tr.b.getOnlyElement(sel).index, 58);
- });
-
- test('checkAddClosestEventToSelection', function() {
- var series = buildSeries();
-
- // Left of first point.
- var sel = new EventSet();
- series.addClosestEventToSelection(-40, 9, -0.5, 0.5, sel);
- assert.lengthOf(sel, 0);
-
- var sel = new EventSet();
- series.addClosestEventToSelection(-40, 11, -0.5, 0.5, sel);
- assert.equal(tr.b.getOnlyElement(sel).index, 0);
-
- // Between two points.
- var sel = new EventSet();
- series.addClosestEventToSelection(0.4, 0.3, -0.5, 0.5, sel);
- assert.lengthOf(sel, 0);
-
- var sel = new EventSet();
- series.addClosestEventToSelection(0.4, 0.4, -0.5, 0.5, sel);
- assert.equal(tr.b.getOnlyElement(sel).index, 30);
-
- // Right of last point.
- var sel = new EventSet();
- series.addClosestEventToSelection(40, 10, -0.5, 0.5, sel);
- assert.lengthOf(sel, 0);
-
- var sel = new EventSet();
- series.addClosestEventToSelection(40, 12, -0.5, 0.5, sel);
- assert.equal(tr.b.getOnlyElement(sel).index, 59);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track.html
deleted file mode 100644
index f736a5bfd13..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track.html
+++ /dev/null
@@ -1,241 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/chart_transform.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<style>
-.chart-track {
- height: 30px;
- position: relative;
-}
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * A track that displays a chart.
- *
- * @constructor
- * @extends {Track}
- */
- var ChartTrack =
- tr.ui.b.define('chart-track', tr.ui.tracks.Track);
-
- ChartTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('chart-track');
- this.series_ = undefined;
-
- // GUID -> {axis: ChartAxis, series: [ChartSeries]}.
- this.axisGuidToAxisData_ = undefined;
-
- // The maximum top and bottom padding of all series.
- this.topPadding_ = undefined;
- this.bottomPadding_ = undefined;
-
- this.heading_ = document.createElement('tr-ui-heading');
- Polymer.dom(this).appendChild(this.heading_);
- },
-
- set heading(heading) {
- this.heading_.heading = heading;
- },
-
- get heading() {
- return this.heading_.heading;
- },
-
- set tooltip(tooltip) {
- this.heading_.tooltip = tooltip;
- },
-
- get series() {
- return this.series_;
- },
-
- /**
- * Set the list of chart series to be displayed on this track. The list
- * is assumed to be sorted in increasing z-order (i.e. the last series in
- * the list will be drawn at the top).
- */
- set series(series) {
- this.series_ = series;
- this.calculateAxisDataAndPadding_();
- this.invalidateDrawingContainer();
- },
-
- get height() {
- return window.getComputedStyle(this).height;
- },
-
- set height(height) {
- this.style.height = height;
- this.invalidateDrawingContainer();
- },
-
- get hasVisibleContent() {
- return !!this.series && this.series.length > 0;
- },
-
- calculateAxisDataAndPadding_: function() {
- if (!this.series_) {
- this.axisGuidToAxisData_ = undefined;
- this.topPadding_ = undefined;
- this.bottomPadding_ = undefined;
- return;
- }
-
- var axisGuidToAxisData = {};
- var topPadding = 0;
- var bottomPadding = 0;
-
- this.series_.forEach(function(series) {
- var axis = series.axis;
- var axisGuid = axis.guid;
- if (!(axisGuid in axisGuidToAxisData)) {
- axisGuidToAxisData[axisGuid] = {
- axis: axis,
- series: []
- };
- }
- axisGuidToAxisData[axisGuid].series.push(series);
- topPadding = Math.max(topPadding, series.topPadding);
- bottomPadding = Math.max(bottomPadding, series.bottomPadding);
- }, this);
-
- this.axisGuidToAxisData_ = axisGuidToAxisData;
- this.topPadding_ = topPadding;
- this.bottomPadding_ = bottomPadding;
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- switch (type) {
- case tr.ui.tracks.DrawType.GENERAL_EVENT:
- this.drawChart_(viewLWorld, viewRWorld);
- break;
- }
- },
-
- drawChart_: function(viewLWorld, viewRWorld) {
- if (!this.series_)
- return;
-
- var ctx = this.context();
-
- // Get track drawing parameters.
- var displayTransform = this.viewport.currentDisplayTransform;
- var pixelRatio = window.devicePixelRatio || 1;
- var bounds = this.getBoundingClientRect();
- var highDetails = this.viewport.highDetails;
-
- // Pre-multiply all device-independent pixel parameters with the pixel
- // ratio to avoid unnecessary recomputation in the performance-critical
- // drawing code.
- var width = bounds.width * pixelRatio;
- var height = bounds.height * pixelRatio;
- var topPadding = this.topPadding_ * pixelRatio;
- var bottomPadding = this.bottomPadding_ * pixelRatio;
-
- // Set up clipping.
- ctx.save();
- ctx.beginPath();
- ctx.rect(0, 0, width, height);
- ctx.clip();
-
- // Draw all series in the increasing z-order.
- this.series_.forEach(function(series) {
- var chartTransform = new tr.ui.tracks.ChartTransform(
- displayTransform, series.axis, width, height, topPadding,
- bottomPadding, pixelRatio);
- series.draw(ctx, chartTransform, highDetails);
- }, this);
-
- // Stop clipping.
- ctx.restore();
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- // TODO(petrcermak): Consider adding the series to the track map instead
- // of the track (a potential performance optimization).
- this.series_.forEach(function(series) {
- series.points.forEach(function(point) {
- point.addToTrackMap(eventToTrackMap, this);
- }, this);
- }, this);
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- this.series_.forEach(function(series) {
- series.addIntersectingEventsInRangeToSelectionInWorldSpace(
- loWX, hiWX, viewPixWidthWorld, selection);
- }, this);
- },
-
- addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- var foundItem = false;
- this.series_.forEach(function(series) {
- foundItem = foundItem || series.addEventNearToProvidedEventToSelection(
- event, offset, selection);
- }, this);
- return foundItem;
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- // Do nothing.
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- this.series_.forEach(function(series) {
- series.addClosestEventToSelection(
- worldX, worldMaxDist, loY, hiY, selection);
- }, this);
- },
-
- /**
- * Automatically set the bounds of all axes on this track from the range of
- * values of all series (in this track) associated with each of them.
- *
- * See the description of ChartAxis.autoSetFromRange for the optional
- * configuration argument flags.
- */
- autoSetAllAxes: function(opt_config) {
- tr.b.iterItems(this.axisGuidToAxisData_, function(axisGuid, axisData) {
- var axis = axisData.axis;
- var series = axisData.series;
- axis.autoSetFromSeries(series, opt_config);
- }, this);
- },
-
- /**
- * Automatically set the bounds of the provided axis from the range of
- * values of all series (in this track) associated with it.
- *
- * See the description of ChartAxis.autoSetFromRange for the optional
- * configuration argument flags.
- */
- autoSetAxis: function(axis, opt_config) {
- var series = this.axisGuidToAxisData_[axis.guid].series;
- axis.autoSetFromSeries(series, opt_config);
- }
- };
-
- return {
- ChartTrack: ChartTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track_test.html
deleted file mode 100644
index e7dfbb02131..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_track_test.html
+++ /dev/null
@@ -1,237 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-<link rel="import" href="/tracing/ui/tracks/event_to_track_map.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ChartAxis = tr.ui.tracks.ChartAxis;
- var ChartPoint = tr.ui.tracks.ChartPoint;
- var ChartSeries = tr.ui.tracks.ChartSeries;
- var ChartSeriesType = tr.ui.tracks.ChartSeriesType;
- var ChartTrack = tr.ui.tracks.ChartTrack;
- var Event = tr.model.Event;
- var EventSet = tr.model.EventSet;
- var EventToTrackMap = tr.ui.tracks.EventToTrackMap;
- var SelectionState = tr.model.SelectionState;
- var Viewport = tr.ui.TimelineViewport;
-
- function buildPoint(x, y) {
- var event = new Event();
- return new ChartPoint(event, x, y);
- }
-
- function buildTrack(opt_viewport) {
- var viewport = opt_viewport || new Viewport(document.createElement('div'));
-
- var axis1 = new ChartAxis(0, 2);
- var axis2 = new ChartAxis(-100, 100);
-
- var points1 = [
- buildPoint(-2.5, 2),
- buildPoint(-1.5, 1),
- buildPoint(-0.5, 0),
- buildPoint(0.5, 1),
- buildPoint(1.5, 2),
- buildPoint(2.5, 0)
- ];
- var renderingConfig1 = {
- chartType: ChartSeriesType.AREA,
- colorId: 6,
- selectedPointSize: 7
- };
- var series1 = new ChartSeries(points1, axis1, renderingConfig1);
-
- var points2 = [
- buildPoint(-2.3, 0.2),
- buildPoint(-1.3, 1.2),
- buildPoint(-0.3, 2.2),
- buildPoint(0.3, 1.2),
- buildPoint(1.3, 0.2),
- buildPoint(2.3, 0)
- ];
- var renderingConfig2 = {
- chartType: ChartSeriesType.AREA,
- colorId: 4,
- selectedPointSize: 10
- };
- var series2 = new ChartSeries(points2, axis1, renderingConfig2);
-
- var points3 = [
- buildPoint(-3, -50),
- buildPoint(-2.4, -40),
- buildPoint(-1.8, -30),
- buildPoint(-1.2, -20),
- buildPoint(-0.6, -10),
- buildPoint(0, 0),
- buildPoint(0.6, 10),
- buildPoint(1.2, 20),
- buildPoint(1.8, 30),
- buildPoint(2.4, 40),
- buildPoint(3, 50)
- ];
- var renderingConfig3 = {
- chartType: ChartSeriesType.LINE,
- lineWidth: 2
- };
- var series3 = new ChartSeries(points3, axis2, renderingConfig3);
-
- var track = new ChartTrack(viewport);
- track.series = [series1, series2, series3];
-
- return track;
- }
-
- test('instantiate_lowDetailsWithoutSelection', function() {
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = buildTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- var dt = new tr.ui.TimelineDisplayTransform();
- var pixelRatio = window.devicePixelRatio || 1;
- dt.xSetWorldBounds(-3, 3, track.clientWidth * pixelRatio);
- track.viewport.setDisplayTransformImmediately(dt);
-
- track.height = '100px';
- });
-
- test('instantiate_highDetailsWithSelection', function() {
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- viewport.highDetails = true;
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = buildTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- track.series[0].points[1].modelItem.selectionState =
- SelectionState.SELECTED;
- track.series[1].points[1].modelItem.selectionState =
- SelectionState.SELECTED;
- track.series[2].points[3].modelItem.selectionState =
- SelectionState.SELECTED;
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- var dt = new tr.ui.TimelineDisplayTransform();
- var pixelRatio = window.devicePixelRatio || 1;
- dt.xSetWorldBounds(-3, 3, track.clientWidth * pixelRatio);
- track.viewport.setDisplayTransformImmediately(dt);
-
- track.height = '100px';
- });
-
- test('checkPadding', function() {
- var track = buildTrack();
-
- // Padding should be equal to half maximum point size.
- assert.equal(track.topPadding_, 5);
- assert.equal(track.bottomPadding_, 5);
- });
-
- test('checkAddEventsToTrackMap', function() {
- var track = buildTrack();
- var eventToTrackMap = new EventToTrackMap();
- track.addEventsToTrackMap(eventToTrackMap);
- assert.lengthOf(Object.keys(eventToTrackMap), 23);
- });
-
- test('checkaddIntersectingEventsInRangeToSelectionInWorldSpace', function() {
- var track = buildTrack();
-
- var sel = new EventSet();
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- -1.1, -0.7, 0.01, sel);
- assert.lengthOf(sel, 3);
- var iterator = sel[Symbol.iterator]();
- assert.equal(iterator.next().value, track.series[0].points[1].modelItem);
- assert.equal(iterator.next().value, track.series[1].points[1].modelItem);
- assert.equal(iterator.next().value, track.series[2].points[3].modelItem);
- });
-
- test('checkaddEventNearToProvidedEventToSelection', function() {
- var track = buildTrack();
-
- // Fail to find a near item to the left in any series.
- var sel = new EventSet();
- assert.isFalse(track.addEventNearToProvidedEventToSelection(
- track.series[0].points[0].modelItem, -1, sel));
- assert.lengthOf(sel, 0);
-
- // Succeed at finding a near item to the right of one series.
- var sel = new EventSet();
- assert.isTrue(track.addEventNearToProvidedEventToSelection(
- track.series[1].points[1].modelItem, 1, sel));
- assert.equal(tr.b.getOnlyElement(sel), track.series[1].points[2].modelItem);
- });
-
- test('checkAddClosestEventToSelection', function() {
- var track = buildTrack();
-
- var sel = new EventSet();
- track.addClosestEventToSelection(-0.8, 0.4, 0.5, 1.5, sel);
- assert.lengthOf(sel, 2);
- var iterator = sel[Symbol.iterator]();
- assert.equal(iterator.next().value, track.series[0].points[2].modelItem);
- assert.equal(iterator.next().value, track.series[2].points[4].modelItem);
- });
-
- test('checkAutoSetAllAxes', function() {
- var track = buildTrack();
- var axis1 = track.series[0].axis;
- var axis2 = track.series[2].axis;
-
- track.autoSetAllAxes({expandMax: true, shrinkMax: true});
-
- // Min bounds of both axes should not have been modified.
- assert.equal(axis1.bounds.min, 0);
- assert.equal(axis2.bounds.min, -100);
-
- // Max bounds of both axes should have been modified.
- assert.equal(axis1.bounds.max, 2.2);
- assert.equal(axis2.bounds.max, 50);
- });
-
- test('checkAutoSetAxis', function() {
- var track = buildTrack();
- var axis1 = track.series[0].axis;
- var axis2 = track.series[2].axis;
-
- track.autoSetAxis(axis2,
- {expandMin: true, shrinkMin: true, expandMax: true, shrinkMax: true});
-
- // First axis should not have been modified.
- assert.equal(axis1.bounds.min, 0);
- assert.equal(axis1.bounds.max, 2);
-
- // Second axis should have been modified.
- assert.equal(axis2.bounds.min, -50);
- assert.equal(axis2.bounds.max, 50);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform.html
deleted file mode 100644
index 026c432b161..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * A helper object encapsulating all parameters necessary to draw a chart
- * series and provides conversion between world coordinates and physical
- * pixels.
- *
- * All parameters (except for pixelRatio) are assumed to be in physical pixels
- * (i.e. already pre-multiplied with pixelRatio).
- *
- * The diagram below explains the meaning of the resulting fields with
- * respect to a chart track:
- *
- * outerTopViewY -> +--------------------/-\-------+ <- Top padding
- * innerTopViewY -> + - - - - - - - - - -| |- - - -+ <- Axis max
- * | .. ==\-/== |
- * | === Series === |
- * | ==/-\== .. |
- * innerBottomViewY -> + - - -Point- - - - - - - - - -+ <- Axis min
- * outerBottomViewY -> +-------\-/--------------------+ <- Bottom padding
- * ^ ^
- * leftViewX rightViewX
- * leftTimeStamp rightTimestamp
- *
- * Labels starting with a lower case letter are the resulting fields of the
- * transform object. Labels starting with an upper case letter correspond
- * to the relevant chart track concepts.
- *
- * @constructor
- */
- function ChartTransform(displayTransform, axis, trackWidth,
- trackHeight, topPadding, bottomPadding, pixelRatio) {
- this.pixelRatio = pixelRatio;
-
- // X axis.
- this.leftViewX = 0;
- this.rightViewX = trackWidth;
- this.leftTimestamp = displayTransform.xViewToWorld(this.leftViewX);
- this.rightTimestamp = displayTransform.xViewToWorld(this.rightViewX);
-
- this.displayTransform_ = displayTransform;
-
- // Y axis.
- this.outerTopViewY = 0;
- this.innerTopViewY = topPadding;
- this.innerBottomViewY = trackHeight - bottomPadding;
- this.outerBottomViewY = trackHeight;
-
- this.axis_ = axis;
- this.innerHeight_ = this.innerBottomViewY - this.innerTopViewY;
- }
-
- ChartTransform.prototype = {
- worldXToViewX: function(worldX) {
- return this.displayTransform_.xWorldToView(worldX);
- },
-
- viewXToWorldX: function(viewX) {
- return this.displayTransform_.xViewToWorld(viewX);
- },
-
- worldYToViewY: function(worldY) {
- var innerHeightCoefficient = 1 - this.axis_.valueToUnitRange(worldY);
- return innerHeightCoefficient * this.innerHeight_ + this.innerTopViewY;
- }
- };
-
- return {
- ChartTransform: ChartTransform
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform_test.html
deleted file mode 100644
index d7652260e09..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/chart_transform_test.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/timeline_display_transform.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_transform.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TimelineDisplayTransform = tr.ui.TimelineDisplayTransform;
- var ChartTransform = tr.ui.tracks.ChartTransform;
- var ChartAxis = tr.ui.tracks.ChartAxis;
-
- function buildChartTransform() {
- var displayTransform = new TimelineDisplayTransform();
- displayTransform.panX = -20;
- displayTransform.scaleX = 0.5;
-
- var axis = new ChartAxis(-100, 100);
-
- var chartTransform = new ChartTransform(
- displayTransform,
- axis,
- 500, /* trackWidth */
- 80, /* trackHeight */
- 15, /* topPadding */
- 5, /* bottomPadding */
- 3 /* pixelRatio */);
-
- return chartTransform;
- }
-
- test('checkFields', function() {
- var t = buildChartTransform();
-
- assert.equal(t.pixelRatio, 3);
-
- assert.equal(t.leftViewX, 0);
- assert.equal(t.rightViewX, 500);
- assert.equal(t.leftTimestamp, 20);
- assert.equal(t.rightTimestamp, 1020);
-
- assert.equal(t.outerTopViewY, 0);
- assert.equal(t.innerTopViewY, 15);
- assert.equal(t.innerBottomViewY, 75);
- assert.equal(t.outerBottomViewY, 80);
- });
-
- test('checkWorldXToViewX', function() {
- var t = buildChartTransform();
-
- assert.equal(t.worldXToViewX(-100), -60);
- assert.equal(t.worldXToViewX(0), -10);
- assert.equal(t.worldXToViewX(520), 250);
- assert.equal(t.worldXToViewX(1020), 500);
- assert.equal(t.worldXToViewX(1200), 590);
- });
-
- test('checkViewXToWorldX', function() {
- var t = buildChartTransform();
-
- assert.equal(t.viewXToWorldX(-60), -100);
- assert.equal(t.viewXToWorldX(-10), 0);
- assert.equal(t.viewXToWorldX(250), 520);
- assert.equal(t.viewXToWorldX(500), 1020);
- assert.equal(t.viewXToWorldX(590), 1200);
- });
-
- test('checkWorldYToViewY', function() {
- var t = buildChartTransform();
-
- assert.equal(t.worldYToViewY(-200), 105);
- assert.equal(t.worldYToViewY(-100), 75);
- assert.equal(t.worldYToViewY(0), 45);
- assert.equal(t.worldYToViewY(100), 15);
- assert.equal(t.worldYToViewY(200), -15);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/container_to_track_map.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/container_to_track_map.html
deleted file mode 100644
index bb4b549ae08..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/container_to_track_map.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * ContainerToTrackMap is a class to handle building and accessing a map
- * between an EventContainer's stableId and its handling track.
- *
- * @constructor
- */
- function ContainerToTrackMap() {
- this.stableIdToTrackMap_ = {};
- }
-
- ContainerToTrackMap.prototype = {
- addContainer: function(container, track) {
- if (!track)
- throw new Error('Must provide a track.');
- this.stableIdToTrackMap_[container.stableId] = track;
- },
-
- clear: function() {
- this.stableIdToTrackMap_ = {};
- },
-
- getTrackByStableId: function(stableId) {
- return this.stableIdToTrackMap_[stableId];
- }
- };
-
- return {
- ContainerToTrackMap: ContainerToTrackMap
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/container_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/container_track.html
deleted file mode 100644
index 566004740c9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/container_track.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/task.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var Task = tr.b.Task;
-
- /**
- * A generic track that contains other tracks as its children.
- * @constructor
- */
- var ContainerTrack = tr.ui.b.define('container-track', tr.ui.tracks.Track);
- ContainerTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- },
-
- detach: function() {
- Polymer.dom(this).textContent = '';
- },
-
- get tracks_() {
- var tracks = [];
- for (var i = 0; i < this.children.length; i++) {
- if (this.children[i] instanceof tr.ui.tracks.Track)
- tracks.push(this.children[i]);
- }
- return tracks;
- },
-
- drawTrack: function(type) {
- this.tracks_.forEach(function(track) {
- track.drawTrack(type);
- });
- },
-
- /**
- * Adds items intersecting the given range to a selection.
- * @param {number} loVX Lower X bound of the interval to search, in
- * viewspace.
- * @param {number} hiVX Upper X bound of the interval to search, in
- * viewspace.
- * @param {number} loY Lower Y bound of the interval to search, in
- * viewspace space.
- * @param {number} hiY Upper Y bound of the interval to search, in
- * viewspace space.
- * @param {Selection} selection Selection to which to add results.
- */
- addIntersectingEventsInRangeToSelection: function(
- loVX, hiVX, loY, hiY, selection) {
- for (var i = 0; i < this.tracks_.length; i++) {
- var trackClientRect = this.tracks_[i].getBoundingClientRect();
- var a = Math.max(loY, trackClientRect.top);
- var b = Math.min(hiY, trackClientRect.bottom);
- if (a <= b)
- this.tracks_[i].addIntersectingEventsInRangeToSelection(
- loVX, hiVX, loY, hiY, selection);
- }
-
- tr.ui.tracks.Track.prototype.addIntersectingEventsInRangeToSelection.
- apply(this, arguments);
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- for (var i = 0; i < this.children.length; ++i)
- this.children[i].addEventsToTrackMap(eventToTrackMap);
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- for (var i = 0; i < this.tracks_.length; i++)
- this.tracks_[i].addAllEventsMatchingFilterToSelection(
- filter, selection);
- },
-
- addAllEventsMatchingFilterToSelectionAsTask: function(filter, selection) {
- var task = new Task();
- for (var i = 0; i < this.tracks_.length; i++) {
- task.subTask(function(i) { return function() {
- this.tracks_[i].addAllEventsMatchingFilterToSelection(
- filter, selection);
- } }(i), this);
- }
- return task;
- },
-
- addClosestEventToSelection: function(
- worldX, worldMaxDist, loY, hiY, selection) {
- for (var i = 0; i < this.tracks_.length; i++) {
- var trackClientRect = this.tracks_[i].getBoundingClientRect();
- var a = Math.max(loY, trackClientRect.top);
- var b = Math.min(hiY, trackClientRect.bottom);
- if (a <= b) {
- this.tracks_[i].addClosestEventToSelection(
- worldX, worldMaxDist, loY, hiY, selection);
- }
- }
-
- tr.ui.tracks.Track.prototype.addClosestEventToSelection.
- apply(this, arguments);
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- this.tracks_.forEach(function(track) {
- track.addContainersToTrackMap(containerToTrackMap);
- });
- },
-
- clearTracks_: function() {
- this.tracks_.forEach(function(track) {
- Polymer.dom(this).removeChild(track);
- }, this);
- }
- };
-
- return {
- ContainerTrack: ContainerTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track.html
deleted file mode 100644
index 638c8bbce41..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * A track that displays a Counter object.
- * @constructor
- * @extends {ChartTrack}
- */
- var CounterTrack = tr.ui.b.define('counter-track', tr.ui.tracks.ChartTrack);
-
- CounterTrack.prototype = {
- __proto__: tr.ui.tracks.ChartTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ChartTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('counter-track');
- },
-
- get counter() {
- return this.chart;
- },
-
- set counter(counter) {
- this.heading = counter.name + ': ';
- this.series = CounterTrack.buildChartSeriesFromCounter(counter);
- this.autoSetAllAxes({expandMax: true});
- },
-
- getModelEventFromItem: function(chartValue) {
- return chartValue;
- }
- };
-
- CounterTrack.buildChartSeriesFromCounter = function(counter) {
- var numSeries = counter.series.length;
- var totals = counter.totals;
-
- // Create one common axis for all series.
- var chartAxis = new tr.ui.tracks.ChartAxis(0, undefined);
-
- // Build one chart series for each counter series.
- var chartSeries = counter.series.map(function(series, seriesIndex) {
- var chartPoints = series.samples.map(function(sample, sampleIndex) {
- var total = totals[sampleIndex * numSeries + seriesIndex];
- return new tr.ui.tracks.ChartPoint(sample, sample.timestamp, total);
- });
- var renderingConfig = {
- chartType: tr.ui.tracks.ChartSeriesType.AREA,
- colorId: series.color
- };
- return new tr.ui.tracks.ChartSeries(
- chartPoints, chartAxis, renderingConfig);
- });
-
- // Show the first series (with the smallest cumulative value) at the top.
- chartSeries.reverse();
-
- return chartSeries;
- };
-
- return {
- CounterTrack: CounterTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_perf_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_perf_test.html
deleted file mode 100644
index 1224676b0d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_perf_test.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/full_config.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- function getSynchronous(url) {
- var req = new XMLHttpRequest();
- req.open('GET', url, false);
- // Without the mime type specified like this, the file's bytes are not
- // retrieved correctly.
- req.overrideMimeType('text/plain; charset=x-user-defined');
- req.send(null);
- return req.responseText;
- }
-
- var ZOOM_STEPS = 10;
- var ZOOM_COEFFICIENT = 1.2;
-
- var model = undefined;
-
- var drawingContainer;
- var viewportDiv;
-
- var viewportWidth;
- var worldMid;
-
- var startScale = undefined;
-
- function timedCounterTrackPerfTest(name, testFn, iterations) {
-
- function setUpOnce() {
- if (model !== undefined)
- return;
- var fileUrl = '/test_data/counter_tracks.html';
- var events = getSynchronous(fileUrl);
- model = tr.c.TestUtils.newModelWithEvents([events]);
- }
-
- function setUp() {
- setUpOnce();
- viewportDiv = document.createElement('div');
-
- var viewport = new tr.ui.TimelineViewport(viewportDiv);
-
- drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- viewport.modelTrackContainer = drawingContainer;
-
- var modelTrack = new tr.ui.tracks.ModelTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(modelTrack);
-
- modelTrack.model = model;
-
- Polymer.dom(viewportDiv).appendChild(drawingContainer);
-
- this.addHTMLOutput(viewportDiv);
-
- // Size the canvas.
- drawingContainer.updateCanvasSizeIfNeeded_();
-
- // Size the viewport.
- viewportWidth = drawingContainer.canvas.width;
- var min = model.bounds.min;
- var range = model.bounds.range;
- worldMid = min + range / 2;
-
- var boost = range * 0.15;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(min - boost, min + range + boost, viewportWidth);
- modelTrack.viewport.setDisplayTransformImmediately(dt);
- startScale = dt.scaleX;
-
- // Select half of the counter samples.
- for (var pid in model.processes) {
- var counters = model.processes[pid].counters;
- for (var cid in counters) {
- var series = counters[cid].series;
- for (var i = 0; i < series.length; i++) {
- var samples = series[i].samples;
- for (var j = Math.floor(samples.length / 2); j < samples.length;
- j++) {
- samples[j].selectionState =
- tr.model.SelectionState.SELECTED;
- }
- }
- }
- }
- };
-
- function tearDown() {
- viewportDiv.innerText = '';
- drawingContainer = undefined;
- }
-
- timedPerfTest(name, testFn, {
- setUp: setUp,
- tearDown: tearDown,
- iterations: iterations
- });
- }
-
- var n110100 = [1, 10, 100];
- n110100.forEach(function(val) {
- timedCounterTrackPerfTest(
- 'draw_softwareCanvas_' + val,
- function() {
- var scale = startScale;
- for (var i = 0; i < ZOOM_STEPS; i++) {
- var dt = drawingContainer.viewport.currentDisplayTransform.clone();
- scale *= ZOOM_COEFFICIENT;
- dt.scaleX = scale;
- dt.xPanWorldPosToViewPos(worldMid, 'center', viewportWidth);
- drawingContainer.viewport.setDisplayTransformImmediately(dt);
- drawingContainer.draw_();
- }
- }, val);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_test.html
deleted file mode 100644
index 4a1b8b0badc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/counter_track_test.html
+++ /dev/null
@@ -1,201 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ColorScheme = tr.b.ColorScheme;
- var Counter = tr.model.Counter;
- var Viewport = tr.ui.TimelineViewport;
- var CounterTrack = tr.ui.tracks.CounterTrack;
-
- var runTest = function(timestamps, samples, testFn) {
- var testEl = document.createElement('div');
-
- var ctr = new Counter(undefined, 'foo', '', 'foo');
- var n = samples.length;
-
- for (var i = 0; i < n; ++i) {
- ctr.addSeries(new tr.model.CounterSeries('value' + i,
- ColorScheme.getColorIdForGeneralPurposeString('value' + i)));
- }
-
- for (var i = 0; i < samples.length; ++i) {
- for (var k = 0; k < timestamps.length; ++k) {
- ctr.series[i].addCounterSample(timestamps[k], samples[i][k]);
- }
- }
-
- ctr.updateBounds();
-
- var viewport = new Viewport(testEl);
-
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(testEl).appendChild(drawingContainer);
-
- var track = new CounterTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- this.addHTMLOutput(testEl);
-
- // Force the container to update sizes so the test can use coordinates that
- // make sense. This has to be after the adding of the track as we need to
- // use the track header to figure out our positioning.
- drawingContainer.updateCanvasSizeIfNeeded_();
-
- var pixelRatio = window.devicePixelRatio || 1;
-
- track.heading = ctr.name;
- track.counter = ctr;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 10, track.clientWidth * pixelRatio);
- track.viewport.setDisplayTransformImmediately(dt);
-
- testFn(ctr, drawingContainer, track);
- };
-
- test('instantiate', function() {
- var ctr = new Counter(undefined, 'testBasicCounter', '',
- 'testBasicCounter');
- ctr.addSeries(new tr.model.CounterSeries('value1',
- ColorScheme.getColorIdForGeneralPurposeString(
- 'testBasicCounter.value1')));
- ctr.addSeries(new tr.model.CounterSeries('value2',
- ColorScheme.getColorIdForGeneralPurposeString(
- 'testBasicCounter.value2')));
-
- var timestamps = [0, 1, 2, 3, 4, 5, 6, 7];
- var samples = [[0, 3, 1, 2, 3, 1, 3, 3.1],
- [5, 3, 1, 1.1, 0, 7, 0, 0.5]];
- for (var i = 0; i < samples.length; ++i) {
- for (var k = 0; k < timestamps.length; ++k) {
- ctr.series[i].addCounterSample(timestamps[k], samples[i][k]);
- }
- }
-
- ctr.updateBounds();
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
-
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = new CounterTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.heading = ctr.name;
- track.counter = ctr;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 7.7, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
- test('basicCounterXPointPicking', function() {
- var timestamps = [0, 1, 2, 3, 4, 5, 6, 7];
- var samples = [[0, 3, 1, 2, 3, 1, 3, 3.1],
- [5, 3, 1, 1.1, 0, 7, 0, 0.5]];
-
- runTest.call(this, timestamps, samples, function(ctr, container, track) {
- var clientRect = track.getBoundingClientRect();
- var y75 = clientRect.top + (0.75 * clientRect.height);
-
- // In bounds.
- var sel = new tr.model.EventSet();
- var x = 0.15 * clientRect.width;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y75, y75 + 1, sel);
-
- var nextSeriesIndex = 1;
- assert.equal(sel.length, 2);
- for (var event of sel) {
- assert.equal(event.series.counter, ctr);
- assert.equal(event.getSampleIndex(), 1);
- assert.equal(event.series.seriesIndex, nextSeriesIndex--);
- }
-
- // Outside bounds.
- sel = new tr.model.EventSet();
- var x = -0.5 * clientRect.width;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y75, y75 + 1, sel);
- assert.equal(sel.length, 0);
-
- sel = new tr.model.EventSet();
- var x = 0.8 * clientRect.width;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y75, y75 + 1, sel);
- assert.equal(sel.length, 0);
- });
- });
-
- test('counterTrackAddClosestEventToSelection', function() {
- var timestamps = [0, 1, 2, 3, 4, 5, 6, 7];
- var samples = [[0, 4, 1, 2, 3, 1, 3, 3.1],
- [5, 3, 1, 1.1, 0, 7, 0, 0.5]];
-
- runTest.call(this, timestamps, samples, function(ctr, container, track) {
- // Before with not range.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(-1, 0, 0, 0, sel);
- assert.equal(sel.length, 0);
-
- // Before with negative range.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(-1, -10, 0, 0, sel);
- assert.equal(sel.length, 0);
-
- // Before first sample.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(-1, 1, 0, 0, sel);
- assert.equal(sel.length, 2);
- for (var event of sel)
- assert.equal(event.getSampleIndex(), 0);
-
- // Between and closer to sample before.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(1.3, 1, 0, 0, sel);
- assert.equal(sel.length, 2);
- for (var event of sel)
- assert.equal(event.getSampleIndex(), 1);
-
- // Between samples with bad range.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(1.45, 0.25, 0, 0, sel);
- assert.equal(sel.length, 0);
-
- // Between and closer to next sample.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(4.7, 6, 0, 0, sel);
- assert.equal(sel.length, 2);
- for (var event of sel)
- assert.equal(event.getSampleIndex(), 5);
-
- // After last sample with good range.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(8.5, 2, 0, 0, sel);
- assert.equal(sel.length, 2);
- for (var event of sel)
- assert.equal(event.getSampleIndex(), 7);
-
- // After last sample with bad range.
- var sel = new tr.model.EventSet();
- track.addClosestEventToSelection(10, 1, 0, 0, sel);
- assert.equal(sel.length, 0);
- });
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track.html
deleted file mode 100644
index dd4dfe0c97a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/slice_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * Visualizes a Cpu using a series of SliceTracks.
- * @constructor
- */
- var CpuTrack =
- tr.ui.b.define('cpu-track', tr.ui.tracks.ContainerTrack);
- CpuTrack.prototype = {
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('cpu-track');
- this.detailedMode_ = true;
- },
-
- get cpu() {
- return this.cpu_;
- },
-
- set cpu(cpu) {
- this.cpu_ = cpu;
- this.updateContents_();
- },
-
- get detailedMode() {
- return this.detailedMode_;
- },
-
- set detailedMode(detailedMode) {
- this.detailedMode_ = detailedMode;
- this.updateContents_();
- },
-
- get tooltip() {
- return this.tooltip_;
- },
-
- set tooltip(value) {
- this.tooltip_ = value;
- this.updateContents_();
- },
-
- get hasVisibleContent() {
- if (this.cpu_ === undefined)
- return false;
- var cpu = this.cpu_;
- if (cpu.slices.length)
- return true;
- if (cpu.samples && cpu.samples.length)
- return true;
- if (tr.b.dictionaryLength(cpu.counters) > 0)
- return true;
- return false;
- },
-
- updateContents_: function() {
- this.detach();
- if (!this.cpu_)
- return;
- var slices = this.cpu_.slices;
- if (slices.length) {
- var track = new tr.ui.tracks.SliceTrack(this.viewport);
- track.slices = slices;
- track.heading = this.cpu_.userFriendlyName + ':';
- Polymer.dom(this).appendChild(track);
- }
-
- if (this.detailedMode_) {
- this.appendSamplesTracks_();
-
- for (var counterName in this.cpu_.counters) {
- var counter = this.cpu_.counters[counterName];
- track = new tr.ui.tracks.CounterTrack(this.viewport);
- track.heading = this.cpu_.userFriendlyName + ' ' +
- counter.name + ':';
- track.counter = counter;
- Polymer.dom(this).appendChild(track);
- }
- }
- },
-
- appendSamplesTracks_: function() {
- var samples = this.cpu_.samples;
- if (samples === undefined || samples.length === 0)
- return;
- var samplesByTitle = {};
- samples.forEach(function(sample) {
- if (samplesByTitle[sample.title] === undefined)
- samplesByTitle[sample.title] = [];
- samplesByTitle[sample.title].push(sample);
- });
-
- var sampleTitles = tr.b.dictionaryKeys(samplesByTitle);
- sampleTitles.sort();
-
- sampleTitles.forEach(function(sampleTitle) {
- var samples = samplesByTitle[sampleTitle];
- var samplesTrack = new tr.ui.tracks.SliceTrack(this.viewport);
- samplesTrack.group = this.cpu_;
- samplesTrack.slices = samples;
- samplesTrack.heading = this.cpu_.userFriendlyName + ': ' +
- sampleTitle;
- samplesTrack.tooltip = this.cpu_.userFriendlyDetails;
- samplesTrack.selectionGenerator = function() {
- var selection = new tr.model.EventSet();
- for (var i = 0; i < samplesTrack.slices.length; i++) {
- selection.push(samplesTrack.slices[i]);
- }
- return selection;
- };
- Polymer.dom(this).appendChild(samplesTrack);
- }, this);
- }
- };
-
- return {
- CpuTrack: CpuTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track_test.html
deleted file mode 100644
index bd268b50940..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_track_test.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Cpu = tr.model.Cpu;
- var CpuTrack = tr.ui.tracks.CpuTrack;
- var ThreadSlice = tr.model.ThreadSlice;
- var StackFrame = tr.model.StackFrame;
- var Sample = tr.model.Sample;
- var Thread = tr.model.Thread;
- var Viewport = tr.ui.TimelineViewport;
-
- test('basicCpu', function() {
- var cpu = new Cpu({}, 7);
- cpu.slices = [
- new ThreadSlice('', 'a', 0, 1, {}, 1),
- new ThreadSlice('', 'b', 1, 2.1, {}, 4.8)
- ];
- cpu.updateBounds();
-
- var testEl = document.createElement('div');
- var viewport = new Viewport(testEl);
-
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
-
- var track = new CpuTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- track.heading = 'CPU ' + cpu.cpuNumber;
- track.cpu = cpu;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 11.1, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
-
- test('withSamples', function() {
- var thread;
- var cpu;
- var model = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(model) {
- cpu = model.kernel.getOrCreateCpu(1);
- thread = model.getOrCreateProcess(1).getOrCreateThread(2);
-
- var fA = model.addStackFrame(new StackFrame(
- undefined, 1, 'cat', 'a', 7));
- var fAB = model.addStackFrame(new StackFrame(
- fA, 2, 'cat', 'b', 7));
- var fABC = model.addStackFrame(new StackFrame(
- fAB, 3, 'cat', 'c', 7));
- var fAD = model.addStackFrame(new StackFrame(
- fA, 4, 'cat', 'd', 7));
-
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 10, fABC, 10));
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 20, fAB, 10));
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 30, fAB, 10));
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 40, fAD, 10));
-
- model.samples.push(new Sample(undefined, thread, 'page_fault',
- 25, fAB, 10));
- model.samples.push(new Sample(undefined, thread, 'page_fault',
- 35, fAD, 10));
- }
- });
-
- var testEl = document.createElement('div');
- var viewport = new Viewport(testEl);
-
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
-
- var track = new CpuTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- track.heading = 'CPU ' + cpu.cpuNumber;
- track.cpu = cpu;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 11.1, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track.html
deleted file mode 100644
index 5845b546984..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track.html
+++ /dev/null
@@ -1,187 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-
-<style>
-.cpu-usage-track {
- height: 90px;
-}
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var ChartTrack = tr.ui.tracks.ChartTrack;
- var MAX_CPU_TRACK_INTERVAL_COUNT = 100000;
-
- /**
- * A track that displays the cpu usage of a process.
- *
- * @constructor
- * @extends {tr.ui.tracks.ChartTrack}
- */
- var CpuUsageTrack = tr.ui.b.define('cpu-usage-track', ChartTrack);
-
- CpuUsageTrack.prototype = {
- __proto__: ChartTrack.prototype,
-
- DEFAULT_INTERVAL: 5, // in ms.
-
- decorate: function(viewport) {
- ChartTrack.prototype.decorate.call(this, viewport);
- this.classList.add('cpu-usage-track');
- this.heading = 'CPU usage';
- this.cpuUsageSeries_ = undefined;
- },
-
- // Given a tr.Model, it creates a cpu usage series and a graph.
- initialize: function(model, interval) {
- if (interval !== undefined)
- this.interval_ = interval;
- else
- this.interval_ = this.DEFAULT_INTERVAL;
- if (model !== undefined)
- this.cpuUsageSeries_ = this.computeCpuUsage_(model);
- else
- this.cpuUsageSeries_ = undefined;
- this.series = this.buildChartSeries_();
- this.autoSetAllAxes({expandMax: true});
- },
-
- // Given a tr.Model, it returns the computation of cpu usage of all the
- // processes.
- computeCpuUsage_: function(model) {
- var intervalCount = Math.ceil(model.bounds.max / this.interval_);
- // Rather than attempting a huge allocation and having the tab crash with
- // an out-of-memory error, throw an error here if there are too many
- // CPU intervals to handle.
- if (intervalCount > MAX_CPU_TRACK_INTERVAL_COUNT) {
- throw new Error('The trace is too long or the CPU usage counter ' +
- 'interval is too small, leading to too many CPU usage intervals.');
- }
- var cpuUsage = undefined;
- if (intervalCount > 0) {
- tr.b.iterItems(model.processes, function(pid, process) {
- // Iterate slices, find all the CPU samples which overlap. For each
- // such CPU sample, increment it of the "average CPU usage" of the
- // slice.
- for (var e of process.getDescendantEvents()) {
- if (!(e instanceof tr.model.ThreadSlice) || e.duration === 0 ||
- e.cpuDuration === undefined) {
- continue;
- }
-
- // This slice contains the most fine-grained CPU usage information
- // for the area of the trace that it covers but that is not covered
- // by its subslices.
- // The math goes this way:
- // s.selfTime : duration of slice s not spent in its subslices.
- // s.cpuSelfTime : cpuDuration over slice s but not its subslices.
- //
- // We're looking for
- // s.cpuSelfTimeRatio: average cpu usage over the area covered by
- // s but not any of its subslices.
- // = s.cpuSelfTime / s.selfTime
- if (e.selfTime === 0 || e.selfTime === undefined ||
- e.cpuSelfTime === undefined) {
- continue;
- }
-
- var cpuSelfTimeRatio = e.cpuSelfTime / e.selfTime;
- cpuSelfTimeRatio = Math.max(0, cpuSelfTimeRatio);
- cpuSelfTimeRatio = Math.min(1, cpuSelfTimeRatio);
- // We have found at least one valid thread slice.
- if (cpuUsage === undefined)
- cpuUsage = new Array(intervalCount).fill(0);
-
- // Go through the area covered by this slice but not its subslices
- // and add the cpuSelfTimeRatio contribution over this area.
- var lastTime = e.start;
- e.subSlices.forEach(function(slice) {
- this.addCPUUsageOverInterval_(cpuUsage, cpuSelfTimeRatio,
- lastTime, slice.start);
- lastTime = slice.end;
- }, this);
- this.addCPUUsageOverInterval_(cpuUsage, cpuSelfTimeRatio, lastTime,
- e.end);
- }
- }, this);
- }
- return cpuUsage || [];
- },
-
- addCPUUsageOverInterval_: function(cpuUsageArray, cpuUsage, start, end) {
- if (start >= end)
- return;
-
- // Simple arithmetic to find the indexes that overlap the current
- // slice.
- var interval = this.interval_;
- var startIndex = Math.floor(start / interval);
- // If the slice stops on an interval, endIndex will be too high.
- // E.g.: start = 5, end = 10, endIndex = floor( 10 / 5 ) = 2.
- // However, the slice is active for only one interval : [5, 10[ .
- var endIndex = Math.ceil(end / interval) - 1;
- var cpuUsagePerTime = cpuUsage / interval;
-
- // Add [startIndex * interval, endIndex * interval] duration.
- for (var i = startIndex; i < endIndex; i++)
- cpuUsageArray[i] += cpuUsage;
-
- // Subtract [startIndex * interval, start] duration.
- cpuUsageArray[startIndex] -= cpuUsagePerTime *
- (start - startIndex * interval);
-
- // Add [endIndex * interval, end] duration.
- cpuUsageArray[endIndex] += cpuUsagePerTime * (end - endIndex * interval);
- },
-
- get hasVisibleContent() {
- return !!this.cpuUsageSeries_ && this.cpuUsageSeries_.length > 0;
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- containerToTrackMap.addContainer(this.series_, this);
- },
-
- buildChartSeries_: function() {
- if (!this.hasVisibleContent)
- return [];
-
- var axis = new tr.ui.tracks.ChartAxis(0, undefined);
- var pts = new Array(this.cpuUsageSeries_.length + 1);
-
- // Add all points and an extra one at the end, otherwise the last
- // interval doesn't show up.
- for (var i = 0; i <= this.cpuUsageSeries_.length; i++) {
- pts[i] = new tr.ui.tracks.ChartPoint(undefined, this.interval_ * i,
- this.cpuUsageSeries_[i] || 0);
- }
-
- var renderingConfig = {
- chartType: tr.ui.tracks.ChartSeriesType.AREA,
- colorId: ColorScheme.getColorIdForGeneralPurposeString(this.heading)
- };
-
- return [new tr.ui.tracks.ChartSeries(pts, axis, renderingConfig)];
- }
- };
-
- return {
- CpuUsageTrack: CpuUsageTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track_test.html
deleted file mode 100644
index 0ef7005dcae..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/cpu_usage_track_test.html
+++ /dev/null
@@ -1,240 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/thread_slice.html">
-<link rel='import' href='/tracing/ui/base/constants.html'>
-<link rel='import' href='/tracing/ui/timeline_viewport.html'>
-<link rel="import" href="/tracing/ui/tracks/cpu_usage_track.html">
-<link rel='import' href='/tracing/ui/tracks/drawing_container.html'>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Model = tr.Model;
- var ThreadSlice = tr.model.ThreadSlice;
- var DIFF_EPSILON = 0.0001;
-
- // Input : slices is an array-of-array-of slices. Each top level array
- // represents a process. So, each slice in one of the top level array
- // will be placed in the same process.
- function buildModel(slices) {
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- for (var i = 0; i < slices.length; i++) {
- var thread = process.getOrCreateThread(i);
- slices[i].forEach(s => thread.sliceGroup.pushSlice(s));
- }
- });
- return model;
- }
-
- // Compare float arrays based on an epsilon since floating point arithmetic
- // is not always 100% accurate.
- function assertArrayValuesCloseTo(actualValue, expectedValue) {
- assert.lengthOf(actualValue, expectedValue.length);
- for (var i = 0; i < expectedValue.length; i++)
- assert.closeTo(actualValue[i], expectedValue[i], DIFF_EPSILON);
- }
-
- function createCpuUsageTrack(model, interval) {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- div.appendChild(drawingContainer);
- var track = new tr.ui.tracks.CpuUsageTrack(drawingContainer.viewport);
- if (model !== undefined)
- setDisplayTransformFromBounds(viewport, model.bounds);
- track.initialize(model, interval);
- drawingContainer.appendChild(track);
- this.addHTMLOutput(drawingContainer);
- return track;
- }
-
- /**
- * Sets the mapping between the input range of timestamps and the output range
- * of horizontal pixels.
- */
- function setDisplayTransformFromBounds(viewport, bounds) {
- var dt = new tr.ui.TimelineDisplayTransform();
- var pixelRatio = window.devicePixelRatio || 1;
- var chartPixelWidth =
- (window.innerWidth - tr.ui.b.constants.HEADING_WIDTH) * pixelRatio;
- dt.xSetWorldBounds(bounds.min, bounds.max, chartPixelWidth);
- viewport.setDisplayTransformImmediately(dt);
- };
-
- test('computeCpuUsage_simpleOnBoundaries', function() {
- // First thread.
- // 0 5 10 15 20 25 30 35 40 45 50 55
- // [ sliceA ]
- // [ sliceB ] [C]
- var sliceA = new tr.model.ThreadSlice('', title, 0, 5, {}, 50);
- sliceA.cpuDuration = 25;
- var sliceB = new tr.model.ThreadSlice('', title, 0, 10, {}, 30);
- sliceB.cpuDuration = 15;
- // The slice completely fits into an interval and is the last.
- var sliceC = new tr.model.ThreadSlice('', title, 0, 52, {}, 3);
- sliceC.cpuDuration = 3;
-
- // Second thread.
- // 0 5 10 15 20 25 30 35 40 45 50 55
- // [ sliceE ][ sliceD ]
- var sliceD = new tr.model.ThreadSlice('', title, 0, 15, {}, 20);
- sliceD.cpuDuration = 17;
- var sliceE = new tr.model.ThreadSlice('', title, 0, 5, {}, 10);
- sliceE.cpuDuration = 9;
-
- var model = buildModel([[sliceA, sliceB, sliceC], [sliceD, sliceE]]);
-
- // Compute average CPU usage over A (but not over B and C).
- var avgCpuUsageA = sliceA.cpuSelfTime / sliceA.selfTime;
- // Compute average CPU usage over B, C, D, E. They don't have subslices.
- var avgCpuUsageB = sliceB.cpuDuration / sliceB.duration;
- var avgCpuUsageC = sliceC.cpuDuration / sliceC.duration;
- var avgCpuUsageD = sliceD.cpuDuration / sliceD.duration;
- var avgCpuUsageE = sliceE.cpuDuration / sliceE.duration;
-
- var expectedValue = [
- 0,
- avgCpuUsageA + avgCpuUsageE,
- avgCpuUsageB + avgCpuUsageE,
- avgCpuUsageB + avgCpuUsageD,
- avgCpuUsageB + avgCpuUsageD,
- avgCpuUsageB + avgCpuUsageD,
- avgCpuUsageB + avgCpuUsageD,
- avgCpuUsageB,
- avgCpuUsageA,
- avgCpuUsageA,
- avgCpuUsageA * 2.0 / 5 + avgCpuUsageC * 3.0 / 5.0,
- 0 // Extra point added to make the last interval show up.
- ];
- var track = createCpuUsageTrack.call(this, model, 5);
- var actualValue = track.series[0].points.map(point => point.y);
- assertArrayValuesCloseTo(actualValue, expectedValue);
- });
-
- test('computeCpuUsage_tooManyIntervals', function() {
- var sliceA = new tr.model.ThreadSlice('', title, 0, 5, {}, 50);
- sliceA.cpuDuration = 25;
- var sliceB = new tr.model.ThreadSlice(
- '', title, 0, 50000010, {}, 50000030);
- sliceB.cpuDuration = 15;
-
- var model = buildModel([[sliceA, sliceB]]);
-
- assert.throws(() => createCpuUsageTrack.call(this, model, 5));
- });
-
- test('computeCpuUsage_floatAndComplexIntervals', function() {
- // First thread.
- // 0 5 10 15 20 25 30 35 40 45 50 55
- // [ sliceA ]
- // [B]
- var sliceA = new tr.model.ThreadSlice('', title, 0, 5.5111, {}, 47.1023);
- sliceA.cpuDuration = 25;
- var sliceB = new tr.model.ThreadSlice('', title, 0, 11.2384, {}, 1.8769);
- sliceB.cpuDuration = 1.5;
-
- // Second thread.
- // 0 5 10 15 20 25 30 35 40 45 50 55
- // [ C ] [ D ]
- var sliceC = new tr.model.ThreadSlice('', title, 0, 11.239, {}, 5.8769);
- sliceC.cpuDuration = 5;
- var sliceD = new tr.model.ThreadSlice('', title, 0, 48.012, {}, 5.01);
- sliceD.cpuDuration = 4;
-
- var model = buildModel([[sliceA, sliceB], [sliceC, sliceD]]);
-
- // Compute average CPU usage over A (but not over B and C).
- var avgCpuUsageA = sliceA.cpuSelfTime / sliceA.selfTime;
- // Compute average CPU usage over B, C, D. They don't have subslices.
- var avgCpuUsageB = sliceB.cpuDuration / sliceB.duration;
- var avgCpuUsageC = sliceC.cpuDuration / sliceC.duration;
- var avgCpuUsageD = sliceD.cpuDuration / sliceD.duration;
-
- var expectedValue = [
- 0,
- avgCpuUsageA * (10 - 5.5111) / 5.0,
- avgCpuUsageA * (11.2384 - 10 + 15 - (11.2384 + 1.8769)) / 5.0 +
- avgCpuUsageB * 1.8769 / 5.0 +
- avgCpuUsageC * (15 - 11.239) / 5.0,
- avgCpuUsageA +
- avgCpuUsageC * ((11.239 + 5.8769) - 15) / 5.0,
- avgCpuUsageA,
- avgCpuUsageA,
- avgCpuUsageA,
- avgCpuUsageA,
- avgCpuUsageA,
- avgCpuUsageA +
- avgCpuUsageD * (50 - 48.012) / 5.0,
- avgCpuUsageA * (5.5111 + 47.1023 - 50) / 5.0 +
- avgCpuUsageD * (48.012 + 5.01 - 50) / 5.0,
- 0 // Extra point added to make the last interval show up.
- ];
- var track = createCpuUsageTrack.call(this, model, 5);
- var actualValue = track.series[0].points.map(point => point.y);
- assertArrayValuesCloseTo(actualValue, expectedValue);
- });
-
- test('instantiate', function() {
- var sliceA = new tr.model.ThreadSlice('', title, 0, 5.5111, {}, 47.1023);
- sliceA.cpuDuration = 25;
- var sliceB = new tr.model.ThreadSlice('', title, 0, 11.2384, {}, 1.8769);
- sliceB.cpuDuration = 1.5;
- var sliceC = new tr.model.ThreadSlice('', title, 0, 11.239, {}, 5.8769);
- sliceC.cpuDuration = 5;
- var sliceD = new tr.model.ThreadSlice('', title, 0, 48.012, {}, 5.01);
- sliceD.cpuDuration = 4;
-
- var model = buildModel([[sliceA, sliceB, sliceC, sliceD]]);
- createCpuUsageTrack.call(this, model);
- });
-
- test('hasVisibleContent_trueWithThreadSlicePresent', function() {
- var sliceA = new tr.model.ThreadSlice('', title, 0, 48.012, {}, 5.01);
- sliceA.cpuDuration = 4;
- var model = buildModel([[sliceA]]);
- var track = createCpuUsageTrack.call(this, model);
-
- assert.isTrue(track.hasVisibleContent);
- });
-
- test('hasVisibleContent_falseWithUndefinedProcessModel', function() {
- var track = createCpuUsageTrack.call(this, undefined);
-
- assert.isFalse(track.hasVisibleContent);
- });
-
- test('hasVisibleContent_falseWithNoThreadSlice', function() {
- // model with a CPU and a thread but no ThreadSlice.
- var model = buildModel([]);
- var track = createCpuUsageTrack.call(this, model);
-
- assert.isFalse(track.hasVisibleContent);
- });
-
- test('hasVisibleContent_trueWithSubSlices', function() {
- var sliceA = new tr.model.ThreadSlice('', title, 0, 5.5111, {}, 47.1023);
- sliceA.cpuDuration = 25;
- var sliceB = new tr.model.ThreadSlice('', title, 0, 11.2384, {}, 1.8769);
- sliceB.cpuDuration = 1.5;
-
- var model = buildModel([[sliceA, sliceB]]);
- var process = model.getProcess(1);
- // B will become lowest level slices of A.
- process.getThread(0).sliceGroup.createSubSlices();
- assert.equal(sliceA.cpuSelfTime, (sliceA.cpuDuration - sliceB.cpuDuration));
- var track = createCpuUsageTrack.call(this, model);
-
- assert.isTrue(track.hasVisibleContent);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track.html
deleted file mode 100644
index c29086490f9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/power_series_track.html">
-<link rel="import" href="/tracing/ui/tracks/spacing_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var ContainerTrack = tr.ui.tracks.ContainerTrack;
-
- // TODO(charliea): Make this track collapsible.
- /**
- * Track to visualize the device model.
- *
- * @constructor
- * @extends {ContainerTrack}
- */
- var DeviceTrack = tr.ui.b.define('device-track', ContainerTrack);
-
- DeviceTrack.prototype = {
-
- __proto__: ContainerTrack.prototype,
-
- decorate: function(viewport) {
- ContainerTrack.prototype.decorate.call(this, viewport);
-
- Polymer.dom(this).classList.add('device-track');
- this.device_ = undefined;
- this.powerSeriesTrack_ = undefined;
- },
-
- get device() {
- return this.device_;
- },
-
- set device(device) {
- this.device_ = device;
- this.updateContents_();
- },
-
- get powerSeriesTrack() {
- return this.powerSeriesTrack_;
- },
-
- get hasVisibleContent() {
- return (this.powerSeriesTrack_ &&
- this.powerSeriesTrack_.hasVisibleContent);
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- tr.ui.tracks.ContainerTrack.prototype.addContainersToTrackMap.call(
- this, containerToTrackMap);
- containerToTrackMap.addContainer(this.device, this);
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- this.tracks_.forEach(function(track) {
- track.addEventsToTrackMap(eventToTrackMap);
- });
- },
-
- appendPowerSeriesTrack_: function() {
- this.powerSeriesTrack_ = new tr.ui.tracks.PowerSeriesTrack(this.viewport);
- this.powerSeriesTrack_.powerSeries = this.device.powerSeries;
-
- if (this.powerSeriesTrack_.hasVisibleContent) {
- Polymer.dom(this).appendChild(this.powerSeriesTrack_);
- Polymer.dom(this).appendChild(
- new tr.ui.tracks.SpacingTrack(this.viewport));
- }
- },
-
- updateContents_: function() {
- this.clearTracks_();
- this.appendPowerSeriesTrack_();
- }
- };
-
- return {
- DeviceTrack: DeviceTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track_test.html
deleted file mode 100644
index ed670eb5baa..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/device_track_test.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel='import' href='/tracing/model/device.html'>
-<link rel='import' href='/tracing/model/model.html'>
-<link rel="import" href="/tracing/ui/base/constants.html">
-<link rel='import' href='/tracing/ui/timeline_display_transform.html'>
-<link rel='import' href='/tracing/ui/timeline_viewport.html'>
-<link rel='import' href='/tracing/ui/tracks/device_track.html'>
-<link rel='import' href='/tracing/ui/tracks/drawing_container.html'>
-<link rel='import' href='/tracing/ui/tracks/event_to_track_map.html'>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var Device = tr.model.Device;
- var DeviceTrack = tr.ui.tracks.DeviceTrack;
- var Model = tr.Model;
- var PowerSeries = tr.model.PowerSeries;
-
- var createDrawingContainer = function(series) {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- if (series) {
- series.updateBounds();
- setDisplayTransformFromBounds(viewport, series.bounds);
- }
-
- return drawingContainer;
- };
-
- /**
- * Sets the mapping between the input range of timestamps and the output range
- * of horizontal pixels.
- */
- var setDisplayTransformFromBounds = function(viewport, bounds) {
- var dt = new tr.ui.TimelineDisplayTransform();
- var pixelRatio = window.devicePixelRatio || 1;
- var chartPixelWidth =
- (window.innerWidth - tr.ui.b.constants.HEADING_WIDTH) * pixelRatio;
- dt.xSetWorldBounds(bounds.min, bounds.max, chartPixelWidth);
- viewport.setDisplayTransformImmediately(dt);
- };
-
- test('instantiate', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
- device.powerSeries.addPowerSample(0, 1);
- device.powerSeries.addPowerSample(0.5, 2);
- device.powerSeries.addPowerSample(1, 3);
- device.powerSeries.addPowerSample(1.5, 4);
-
- var drawingContainer = createDrawingContainer(device.powerSeries);
- var track = new DeviceTrack(drawingContainer.viewport);
- track.device = device;
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(drawingContainer);
- });
-
- test('instantiate_noPowerSeries', function() {
- var device = new Device(new Model());
-
- var drawingContainer = createDrawingContainer(device.powerSeries);
- var track = new DeviceTrack(drawingContainer.viewport);
- track.device = device;
- Polymer.dom(drawingContainer).appendChild(track);
-
- // Adding output should throw due to no visible content.
- assert.throw(function() { this.addHTMLOutput(drawingContainer); });
- });
-
- test('setDevice_clearsTrackBeforeUpdating', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
- device.powerSeries.addPowerSample(0, 1);
- device.powerSeries.addPowerSample(0.5, 2);
- device.powerSeries.addPowerSample(1, 3);
- device.powerSeries.addPowerSample(1.5, 4);
-
- var drawingContainer = createDrawingContainer(device.powerSeries);
-
- // Set the device twice and make sure that this doesn't result in
- // the track appearing twice.
- var track = new DeviceTrack(drawingContainer.viewport);
- track.device = device;
- track.device = device;
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(drawingContainer);
-
- // The device track should still have two subtracks: one counter track and
- // one spacing track.
- assert.equal(track.tracks_.length, 2);
- });
-
- test('addContainersToTrackMap', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
- device.powerSeries.addPowerSample(0, 1);
-
- var drawingContainer = createDrawingContainer(device.series);
- var track = new DeviceTrack(drawingContainer.viewport);
- track.device = device;
-
- var containerToTrackMap = new tr.ui.tracks.ContainerToTrackMap();
- track.addContainersToTrackMap(containerToTrackMap);
-
- assert.equal(containerToTrackMap.getTrackByStableId('Device'), track);
- assert.equal(
- containerToTrackMap.getTrackByStableId('Device.PowerSeries'),
- track.powerSeriesTrack);
- });
-
- test('addEventsToTrackMap', function() {
- var device = new Device(new Model());
- device.powerSeries = new PowerSeries(device);
- device.powerSeries.addPowerSample(0, 1);
- device.powerSeries.addPowerSample(0.5, 2);
-
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
-
- var track = new DeviceTrack(viewport);
- track.device = device;
-
- var eventToTrackMap = new tr.ui.tracks.EventToTrackMap();
- track.addEventsToTrackMap(eventToTrackMap);
-
- var expected = new tr.ui.tracks.EventToTrackMap();
- expected[device.powerSeries.samples[0].guid] = track.powerSeriesTrack;
- expected[device.powerSeries.samples[1].guid] = track.powerSeriesTrack;
-
- assert.deepEqual(eventToTrackMap, expected);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.css
deleted file mode 100644
index a4a8cdb5b89..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.drawing-container {
- -webkit-box-flex: 1;
- display: inline;
- overflow: auto;
- overflow-x: hidden;
- position: relative;
-}
-
-.drawing-container-canvas {
- -webkit-box-flex: 1;
- display: block;
- pointer-events: none;
- position: absolute;
- top: 0;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.html
deleted file mode 100644
index 56014ac31a0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container.html
+++ /dev/null
@@ -1,180 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/drawing_container.css">
-
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/ui/base/constants.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var DrawType = {
- GENERAL_EVENT: 1,
- INSTANT_EVENT: 2,
- BACKGROUND: 3,
- GRID: 4,
- FLOW_ARROWS: 5,
- MARKERS: 6,
- HIGHLIGHTS: 7,
- ANNOTATIONS: 8
- };
-
- var DrawingContainer = tr.ui.b.define('drawing-container',
- tr.ui.tracks.Track);
-
- DrawingContainer.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('drawing-container');
-
- this.canvas_ = document.createElement('canvas');
- this.canvas_.className = 'drawing-container-canvas';
- this.canvas_.style.left = tr.ui.b.constants.HEADING_WIDTH + 'px';
- Polymer.dom(this).appendChild(this.canvas_);
-
- this.ctx_ = this.canvas_.getContext('2d');
-
- this.viewportChange_ = this.viewportChange_.bind(this);
- this.viewport.addEventListener('change', this.viewportChange_);
- },
-
- // Needed to support the calls in TimelineTrackView.
- get canvas() {
- return this.canvas_;
- },
-
- context: function() {
- return this.ctx_;
- },
-
- viewportChange_: function() {
- this.invalidate();
- },
-
- invalidate: function() {
- if (this.rafPending_)
- return;
- this.rafPending_ = true;
-
- tr.b.requestPreAnimationFrame(this.preDraw_, this);
- },
-
- preDraw_: function() {
- this.rafPending_ = false;
- this.updateCanvasSizeIfNeeded_();
-
- tr.b.requestAnimationFrameInThisFrameIfPossible(this.draw_, this);
- },
-
- draw_: function() {
- this.ctx_.clearRect(0, 0, this.canvas_.width, this.canvas_.height);
-
- var typesToDraw = [
- DrawType.BACKGROUND,
- DrawType.HIGHLIGHTS,
- DrawType.GRID,
- DrawType.INSTANT_EVENT,
- DrawType.GENERAL_EVENT,
- DrawType.MARKERS,
- DrawType.ANNOTATIONS,
- DrawType.FLOW_ARROWS
- ];
-
- for (var idx in typesToDraw) {
- for (var i = 0; i < this.children.length; ++i) {
- if (!(this.children[i] instanceof tr.ui.tracks.Track))
- continue;
- this.children[i].drawTrack(typesToDraw[idx]);
- }
- }
-
- var pixelRatio = window.devicePixelRatio || 1;
- var bounds = this.canvas_.getBoundingClientRect();
- var dt = this.viewport.currentDisplayTransform;
- var viewLWorld = dt.xViewToWorld(0);
- var viewRWorld = dt.xViewToWorld(
- bounds.width * pixelRatio);
-
- this.viewport.drawGridLines(this.ctx_, viewLWorld, viewRWorld);
- },
-
- updateCanvasSizeIfNeeded_: function() {
- var visibleChildTracks =
- tr.b.asArray(this.children).filter(this.visibleFilter_);
-
- if (visibleChildTracks.length === 0) {
- return;
- }
-
- var thisBounds = this.getBoundingClientRect();
-
- var firstChildTrackBounds = visibleChildTracks[0].getBoundingClientRect();
- var lastChildTrackBounds =
- visibleChildTracks[visibleChildTracks.length - 1].
- getBoundingClientRect();
-
- var innerWidth = firstChildTrackBounds.width -
- tr.ui.b.constants.HEADING_WIDTH;
- var innerHeight = lastChildTrackBounds.bottom - firstChildTrackBounds.top;
-
- var pixelRatio = window.devicePixelRatio || 1;
- if (this.canvas_.width !== innerWidth * pixelRatio) {
- this.canvas_.width = innerWidth * pixelRatio;
- this.canvas_.style.width = innerWidth + 'px';
- }
-
- if (this.canvas_.height !== innerHeight * pixelRatio) {
- this.canvas_.height = innerHeight * pixelRatio;
- this.canvas_.style.height = innerHeight + 'px';
- }
- },
-
- visibleFilter_: function(element) {
- if (!(element instanceof tr.ui.tracks.Track))
- return false;
- return window.getComputedStyle(element).display !== 'none';
- },
-
- addClosestEventToSelection: function(
- worldX, worldMaxDist, loY, hiY, selection) {
- for (var i = 0; i < this.children.length; ++i) {
- if (!(this.children[i] instanceof tr.ui.tracks.Track))
- continue;
- var trackClientRect = this.children[i].getBoundingClientRect();
- var a = Math.max(loY, trackClientRect.top);
- var b = Math.min(hiY, trackClientRect.bottom);
- if (a <= b) {
- this.children[i].addClosestEventToSelection(
- worldX, worldMaxDist, loY, hiY, selection);
- }
- }
-
- tr.ui.tracks.Track.prototype.addClosestEventToSelection.
- apply(this, arguments);
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- for (var i = 0; i < this.children.length; ++i) {
- if (!(this.children[i] instanceof tr.ui.tracks.Track))
- continue;
- this.children[i].addEventsToTrackMap(eventToTrackMap);
- }
- }
- };
-
- return {
- DrawingContainer: DrawingContainer,
- DrawType: DrawType
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container_perf_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container_perf_test.html
deleted file mode 100644
index 3645c4b8394..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/drawing_container_perf_test.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/xhr.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/ui/extras/full_config.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var generalModel;
- function getOrCreateGeneralModel() {
- if (generalModel !== undefined)
- generalModel;
- var fileUrl = '/test_data/thread_time_visualisation.json.gz';
- var events = tr.b.getSync(fileUrl);
- generalModel = tr.c.TestUtils.newModelWithEvents([events]);
- return generalModel;
- }
-
- function DCPerfTestCase(testName, opt_options) {
- tr.b.unittest.PerfTestCase.call(this, testName, undefined, opt_options);
- this.viewportDiv = undefined;
- this.drawingContainer = undefined;
- this.viewport = undefined;
- }
- DCPerfTestCase.prototype = {
- __proto__: tr.b.unittest.PerfTestCase.prototype,
-
- setUp: function(model) {
- this.viewportDiv = document.createElement('div');
-
- this.viewport = new tr.ui.TimelineViewport(this.viewportDiv);
-
- this.drawingContainer = new tr.ui.tracks.DrawingContainer(this.viewport);
- this.viewport.modelTrackContainer = this.drawingContainer;
-
- var modelTrack = new tr.ui.tracks.ModelTrack(this.viewport);
- Polymer.dom(this.drawingContainer).appendChild(modelTrack);
-
- modelTrack.model = model;
-
- Polymer.dom(this.viewportDiv).appendChild(this.drawingContainer);
-
- this.addHTMLOutput(this.viewportDiv);
-
- // Size the canvas.
- this.drawingContainer.updateCanvasSizeIfNeeded_();
-
- // Size the viewport.
- var w = this.drawingContainer.canvas.width;
- var min = model.bounds.min;
- var range = model.bounds.range;
-
- var boost = range * 0.15;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(min - boost, min + range + boost, w);
- this.viewport.setDisplayTransformImmediately(dt);
- },
-
- runOneIteration: function() {
- this.drawingContainer.draw_();
- }
- };
-
-
- function GeneralDCPerfTestCase(testName, opt_options) {
- DCPerfTestCase.call(this, testName, opt_options);
- }
-
- GeneralDCPerfTestCase.prototype = {
- __proto__: DCPerfTestCase.prototype,
-
- setUp: function() {
- var model = getOrCreateGeneralModel();
- DCPerfTestCase.prototype.setUp.call(this, model);
- }
- };
-
- // Failing on Chrome canary, see
- // https://github.com/catapult-project/catapult/issues/1826
- flakyTest(new GeneralDCPerfTestCase('draw_softwareCanvas_One',
- {iterations: 1}));
- // Failing on Chrome stable on Windows, see
- // https://github.com/catapult-project/catapult/issues/1908
- flakyTest(new GeneralDCPerfTestCase('draw_softwareCanvas_Ten',
- {iterations: 10}));
- test(new GeneralDCPerfTestCase('draw_softwareCanvas_AHundred',
- {iterations: 100}));
-
- function AsyncDCPerfTestCase(testName, opt_options) {
- DCPerfTestCase.call(this, testName, opt_options);
- }
-
- AsyncDCPerfTestCase.prototype = {
- __proto__: DCPerfTestCase.prototype,
-
- setUp: function() {
- var model = tr.c.TestUtils.newModel(function(m) {
- var proc = m.getOrCreateProcess(1);
- for (var tid = 1; tid <= 5; tid++) {
- var thread = proc.getOrCreateThread(tid);
- for (var i = 0; i < 5000; i++) {
- var mod = Math.floor(i / 100) % 4;
- var slice = tr.c.TestUtils.newAsyncSliceEx({
- name: 'Test' + i,
- colorId: tid + mod,
- id: tr.b.GUID.allocateSimple(),
- start: i * 10,
- duration: 9,
- isTopLevel: true
- });
- thread.asyncSliceGroup.push(slice);
- }
- }
- });
- DCPerfTestCase.prototype.setUp.call(this, model);
-
- var w = this.drawingContainer.canvas.width;
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(-2000, 54000, w);
- this.viewport.setDisplayTransformImmediately(dt);
- }
- };
- test(new AsyncDCPerfTestCase('draw_asyncSliceHeavy_Twenty',
- {iterations: 20}));
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/event_to_track_map.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/event_to_track_map.html
deleted file mode 100644
index 27da2820c61..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/event_to_track_map.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * EventToTrackMap provides a mapping mechanism between events and the
- * tracks those events belong on.
- * @constructor
- */
- function EventToTrackMap() {}
-
- EventToTrackMap.prototype = {
- addEvent: function(event, track) {
- if (!track)
- throw new Error('Must provide a track.');
- this[event.guid] = track;
- }
- };
-
- return {
- EventToTrackMap: EventToTrackMap
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track.html
deleted file mode 100644
index c3d6bc6830c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/ui/base/event_presenter.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/letter_dot_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var startCompare = function(x, y) { return x.start - y.start; }
-
- /**
- * Track enabling quick selection of frame slices/events.
- * @constructor
- */
- var FrameTrack = tr.ui.b.define(
- 'frame-track', tr.ui.tracks.LetterDotTrack);
-
- FrameTrack.prototype = {
- __proto__: tr.ui.tracks.LetterDotTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.LetterDotTrack.prototype.decorate.call(this, viewport);
- this.heading = 'Frames';
-
- this.frames_ = undefined;
- this.items = undefined;
- },
-
- get frames() {
- return this.frames_;
- },
-
- set frames(frames) {
- this.frames_ = frames;
- if (frames === undefined)
- return;
-
- this.frames_ = this.frames_.slice();
- this.frames_.sort(startCompare);
-
- // letter dots
- this.items = this.frames_.map(function(frame) {
- return new FrameDot(frame);
- });
- }
- };
-
- /**
- * @constructor
- * @extends {LetterDot}
- */
- function FrameDot(frame) {
- tr.ui.tracks.LetterDot.call(this, frame, 'F', frame.colorId, frame.start);
- }
-
- FrameDot.prototype = {
- __proto__: tr.ui.tracks.LetterDot.prototype
- };
-
- return {
- FrameTrack: FrameTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track_test.html
deleted file mode 100644
index 9918fec0935..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/frame_track_test.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/frame.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/frame_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Frame = tr.model.Frame;
- var FrameTrack = tr.ui.tracks.FrameTrack;
- var EventSet = tr.model.EventSet;
- var SelectionState = tr.model.SelectionState;
- var Viewport = tr.ui.TimelineViewport;
-
- var createFrames = function() {
- var frames = undefined;
- var model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- var thread = process.getOrCreateThread(1);
- for (var i = 1; i < 5; i++) {
- var slice = tr.c.TestUtils.newSliceEx(
- {title: 'work for frame', start: i * 20, duration: 10});
- thread.sliceGroup.pushSlice(slice);
- var events = [slice];
- var threadTimeRanges =
- [{thread: thread, start: slice.start, end: slice.end}];
- process.frames.push(new Frame(events, threadTimeRanges));
- }
- frames = process.frames;
- });
- return frames;
- };
-
- test('instantiate', function() {
- var frames = createFrames();
- frames[1].selectionState = SelectionState.SELECTED;
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = FrameTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.frames = frames;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 50, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
-
- assert.equal(track.items[0].start, 20);
- });
-
- test('modelMapping', function() {
- var frames = createFrames();
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var track = FrameTrack(viewport);
- track.frames = frames;
-
- var a0 = track.items[0].modelItem;
- assert.equal(a0, frames[0]);
- });
-
- test('selectionMapping', function() {
- var frames = createFrames();
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var track = FrameTrack(viewport);
- track.frames = frames;
-
- var selection = new EventSet();
- track.items[0].addToSelection(selection);
-
- // select both frame, but not its component slice
- assert.equal(selection.length, 1);
-
- var frameCount = 0;
- var eventCount = 0;
- selection.forEach(function(event) {
- if (event instanceof Frame) {
- assert.equal(event, frames[0]);
- frameCount++;
- } else
- eventCount++;
- });
- assert.equal(frameCount, 1);
- assert.equal(eventCount, 0);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track.html
deleted file mode 100644
index 143957a8640..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/letter_dot_track.html">
-<link rel="import" href="/tracing/ui/tracks/memory_dump_track_util.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var USED_MEMORY_TRACK_HEIGHT = 50;
- var ALLOCATED_MEMORY_TRACK_HEIGHT = 50;
-
- /**
- * A track that displays an array of GlobalMemoryDump objects.
- * @constructor
- * @extends {ContainerTrack}
- */
- var GlobalMemoryDumpTrack = tr.ui.b.define(
- 'global-memory-dump-track', tr.ui.tracks.ContainerTrack);
-
- GlobalMemoryDumpTrack.prototype = {
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
- this.memoryDumps_ = undefined;
- },
-
- get memoryDumps() {
- return this.memoryDumps_;
- },
-
- set memoryDumps(memoryDumps) {
- this.memoryDumps_ = memoryDumps;
- this.updateContents_();
- },
-
- updateContents_: function() {
- this.clearTracks_();
-
- // Show no tracks if there are no dumps.
- if (!this.memoryDumps_ || !this.memoryDumps_.length)
- return;
-
- this.appendDumpDotsTrack_();
- this.appendUsedMemoryTrack_();
- this.appendAllocatedMemoryTrack_();
- },
-
- appendDumpDotsTrack_: function() {
- var items = tr.ui.tracks.buildMemoryLetterDots(this.memoryDumps_);
- if (!items)
- return;
-
- var track = new tr.ui.tracks.LetterDotTrack(this.viewport);
- track.heading = 'Memory Dumps';
- track.items = items;
- Polymer.dom(this).appendChild(track);
- },
-
- appendUsedMemoryTrack_: function() {
- var series = tr.ui.tracks.buildGlobalUsedMemoryChartSeries(
- this.memoryDumps_);
- if (!series)
- return;
-
- var track = new tr.ui.tracks.ChartTrack(this.viewport);
- track.heading = 'Memory per process';
- track.height = USED_MEMORY_TRACK_HEIGHT + 'px';
- track.series = series;
- track.autoSetAllAxes({expandMax: true});
- Polymer.dom(this).appendChild(track);
- },
-
- appendAllocatedMemoryTrack_: function() {
- var series = tr.ui.tracks.buildGlobalAllocatedMemoryChartSeries(
- this.memoryDumps_);
- if (!series)
- return;
-
- var track = new tr.ui.tracks.ChartTrack(this.viewport);
- track.heading = 'Memory per component';
- track.height = ALLOCATED_MEMORY_TRACK_HEIGHT + 'px';
- track.series = series;
- track.autoSetAllAxes({expandMax: true});
- Polymer.dom(this).appendChild(track);
- }
- };
-
- return {
- GlobalMemoryDumpTrack: GlobalMemoryDumpTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track_test.html
deleted file mode 100644
index 0add321fca7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/global_memory_dump_track_test.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/global_memory_dump_track.html">
-<link rel="import" href="/tracing/ui/tracks/memory_dump_track_test_utils.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Viewport = tr.ui.TimelineViewport;
- var GlobalMemoryDumpTrack = tr.ui.tracks.GlobalMemoryDumpTrack;
- var createTestGlobalMemoryDumps = tr.ui.tracks.createTestGlobalMemoryDumps;
-
- function instantiateTrack(withVMRegions, withAllocatorDumps,
- expectedTrackCount) {
- var dumps = createTestGlobalMemoryDumps(withVMRegions, withAllocatorDumps);
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = new GlobalMemoryDumpTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- drawingContainer.invalidate();
-
- track.memoryDumps = dumps;
- this.addHTMLOutput(div);
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 50, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
-
- assert.lengthOf(track.tracks_, expectedTrackCount);
- };
-
- test('instantiate_dotsOnly', function() {
- instantiateTrack.call(this, false, false, 1);
- });
-
- test('instantiate_withVMRegions', function() {
- instantiateTrack.call(this, true, false, 2);
- });
-
- test('instantiate_withMemoryAllocatorDumps', function() {
- instantiateTrack.call(this, false, true, 2);
- });
-
- test('instantiate_withBoth', function() {
- instantiateTrack.call(this, true, true, 3);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/highlighter.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/highlighter.html
deleted file mode 100644
index 6b3a7e69c70..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/highlighter.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-<link rel="import" href="/tracing/base/extension_registry.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Allows custom highlighting to be added to the full model track.
- */
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * Highlights cetrain features of the model.
- * @constructor
- */
- function Highlighter(viewport) {
- if (viewport === undefined) {
- throw new Error('viewport must be provided');
- }
- this.viewport_ = viewport;
- };
-
- Highlighter.prototype = {
- __proto__: Object.prototype,
-
- processModel: function(model) {
- throw new Error('processModel implementation missing');
- },
-
- drawHighlight: function(ctx, dt, viewLWorld, viewRWorld, viewHeight) {
- throw new Error('drawHighlight implementation missing');
- }
- };
-
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.defaultMetadata = {};
- options.mandatoryBaseClass = Highlighter;
- tr.b.decorateExtensionRegistry(Highlighter, options);
-
- return {
- Highlighter: Highlighter
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track.html
deleted file mode 100644
index 7c9c049d956..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/alert_track.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/highlighter.html">
-<link rel="import" href="/tracing/ui/tracks/kernel_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays an array of interaction records.
- * @constructor
- * @extends {MultiRowTrack}
- */
- var InteractionTrack = tr.ui.b.define(
- 'interaction-track', tr.ui.tracks.MultiRowTrack);
-
- InteractionTrack.prototype = {
- __proto__: tr.ui.tracks.MultiRowTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this, viewport);
- this.heading = 'Interactions';
- this.subRows_ = [];
- },
-
- set model(model) {
- this.setItemsToGroup(model.userModel.expectations, {
- guid: tr.b.GUID.allocateSimple(),
- model: model,
- getSettingsKey: function() {
- return undefined;
- }
- });
- },
-
- buildSubRows_: function(slices) {
- if (this.subRows_.length)
- return this.subRows_;
- this.subRows_.push.apply(this.subRows_,
- tr.ui.tracks.AsyncSliceGroupTrack.prototype.buildSubRows_.call(
- {}, slices, true));
- return this.subRows_;
- },
-
- addSubTrack_: function(slices) {
- var track = new tr.ui.tracks.SliceTrack(this.viewport);
- track.slices = slices;
- Polymer.dom(this).appendChild(track);
- return track;
- }
- };
-
- return {
- InteractionTrack: InteractionTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track_test.html
deleted file mode 100644
index b98c2417c7e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/interaction_track_test.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/user_model/stub_expectation.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/interaction_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- // UserExpectations should be sorted by start time, not title, so that
- // AsyncSliceGroupTrack.buildSubRows_ can lay them out in as few tracks as
- // possible, so that they mesh instead of stacking unnecessarily.
- test('instantiate', function() {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
- var track = new tr.ui.tracks.InteractionTrack(viewport);
- track.model = tr.c.TestUtils.newModel(function(model) {
- var process = model.getOrCreateProcess(1);
- var thread = process.getOrCreateThread(1);
- thread.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 0, duration: 200}));
- model.userModel.expectations.push(new tr.model.um.StubExpectation(
- {parentModel: model, start: 100, duration: 100}));
- model.userModel.expectations.push(new tr.model.um.StubExpectation(
- {parentModel: model, start: 0, duration: 100}));
- model.userModel.expectations.push(new tr.model.um.StubExpectation(
- {parentModel: model, start: 150, duration: 50}));
- model.userModel.expectations.push(new tr.model.um.StubExpectation(
- {parentModel: model, start: 50, duration: 100}));
- model.userModel.expectations.push(new tr.model.um.StubExpectation(
- {parentModel: model, start: 0, duration: 50}));
- // Model.createImportTracesTask() automatically sorts IRs by start time.
- });
- assert.equal(2, track.subRows_.length);
- assert.equal(2, track.subRows_[0].length);
- assert.equal(3, track.subRows_[1].length);
- Polymer.dom(drawingContainer).appendChild(track);
- this.addHTMLOutput(div);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/kernel_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/kernel_track.html
deleted file mode 100644
index f69f61ef0e9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/kernel_track.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/cpu_track.html">
-<link rel="import" href="/tracing/ui/tracks/process_track_base.html">
-<link rel="import" href="/tracing/ui/tracks/spacing_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var Cpu = tr.model.Cpu;
- var CpuTrack = tr.ui.tracks.cpu_track;
- var ProcessTrackBase = tr.ui.tracks.ProcessTrackBase;
- var SpacingTrack = tr.ui.tracks.SpacingTrack;
-
- /**
- * @constructor
- */
- var KernelTrack = tr.ui.b.define('kernel-track', ProcessTrackBase);
-
- KernelTrack.prototype = {
- __proto__: ProcessTrackBase.prototype,
-
- decorate: function(viewport) {
- ProcessTrackBase.prototype.decorate.call(this, viewport);
- },
-
-
- // Kernel maps to processBase because we derive from ProcessTrackBase.
- set kernel(kernel) {
- this.processBase = kernel;
- },
-
- get kernel() {
- return this.processBase;
- },
-
- get eventContainer() {
- return this.kernel;
- },
-
- get hasVisibleContent() {
- return this.children.length > 1;
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- tr.ui.tracks.ProcessTrackBase.prototype.addContainersToTrackMap.call(
- this, containerToTrackMap);
- containerToTrackMap.addContainer(this.kernel, this);
- },
-
- willAppendTracks_: function() {
- var cpus = tr.b.dictionaryValues(this.kernel.cpus);
- cpus.sort(tr.model.Cpu.compare);
-
- var didAppendAtLeastOneTrack = false;
- for (var i = 0; i < cpus.length; ++i) {
- var cpu = cpus[i];
- var track = new tr.ui.tracks.CpuTrack(this.viewport);
- track.detailedMode = this.expanded;
- track.cpu = cpu;
- if (!track.hasVisibleContent)
- continue;
- Polymer.dom(this).appendChild(track);
- didAppendAtLeastOneTrack = true;
- }
- if (didAppendAtLeastOneTrack)
- Polymer.dom(this).appendChild(new SpacingTrack(this.viewport));
- }
- };
-
-
- return {
- KernelTrack: KernelTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track.html
deleted file mode 100644
index 75ff6c86927..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track.html
+++ /dev/null
@@ -1,260 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/model/proxy_selectable_item.html">
-<link rel="import" href="/tracing/ui/base/event_presenter.html">
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<style>
-.letter-dot-track {
- height: 18px;
-}
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var EventPresenter = tr.ui.b.EventPresenter;
- var SelectionState = tr.model.SelectionState;
-
- /**
- * A track that displays an array of dots with filled letters inside them.
- * @constructor
- * @extends {Track}
- */
- var LetterDotTrack = tr.ui.b.define(
- 'letter-dot-track', tr.ui.tracks.Track);
-
- LetterDotTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('letter-dot-track');
- this.items_ = undefined;
-
- this.heading_ = document.createElement('tr-ui-heading');
- Polymer.dom(this).appendChild(this.heading_);
- },
-
- set heading(heading) {
- this.heading_.heading = heading;
- },
-
- get heading() {
- return this.heading_.heading;
- },
-
- set tooltip(tooltip) {
- this.heading_.tooltip = tooltip;
- },
-
- get items() {
- return this.items_;
- },
-
- set items(items) {
- this.items_ = items;
- this.invalidateDrawingContainer();
- },
-
- get height() {
- return window.getComputedStyle(this).height;
- },
-
- set height(height) {
- this.style.height = height;
- },
-
- get dumpRadiusView() {
- return 7 * (window.devicePixelRatio || 1);
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- if (this.items_ === undefined)
- return;
- switch (type) {
- case tr.ui.tracks.DrawType.GENERAL_EVENT:
- this.drawLetterDots_(viewLWorld, viewRWorld);
- break;
- }
- },
-
- drawLetterDots_: function(viewLWorld, viewRWorld) {
- var ctx = this.context();
- var pixelRatio = window.devicePixelRatio || 1;
-
- var bounds = this.getBoundingClientRect();
- var height = bounds.height * pixelRatio;
- var halfHeight = height * 0.5;
- var twoPi = Math.PI * 2;
-
- // Culling parameters.
- var dt = this.viewport.currentDisplayTransform;
- var dumpRadiusView = this.dumpRadiusView;
- var itemRadiusWorld = dt.xViewVectorToWorld(height);
-
- // Draw the memory dumps.
- var items = this.items_;
- var loI = tr.b.findLowIndexInSortedArray(
- items,
- function(item) { return item.start; },
- viewLWorld);
-
- var oldFont = ctx.font;
- ctx.font = '400 ' + Math.floor(9 * pixelRatio) + 'px Arial';
- ctx.strokeStyle = 'rgb(0,0,0)';
- ctx.textBaseline = 'middle';
- ctx.textAlign = 'center';
-
- var drawItems = function(selected) {
- for (var i = loI; i < items.length; ++i) {
- var item = items[i];
- var x = item.start;
- if (x - itemRadiusWorld > viewRWorld)
- break;
- if (item.selected !== selected)
- continue;
- var xView = dt.xWorldToView(x);
-
- ctx.fillStyle = EventPresenter.getSelectableItemColorAsString(item);
- ctx.beginPath();
- ctx.arc(xView, halfHeight, dumpRadiusView + 0.5, 0, twoPi);
- ctx.fill();
- if (item.selected) {
- ctx.lineWidth = 3;
- ctx.strokeStyle = 'rgb(100,100,0)';
- ctx.stroke();
-
- ctx.beginPath();
- ctx.arc(xView, halfHeight, dumpRadiusView, 0, twoPi);
- ctx.lineWidth = 1.5;
- ctx.strokeStyle = 'rgb(255,255,0)';
- ctx.stroke();
- } else {
- ctx.lineWidth = 1;
- ctx.strokeStyle = 'rgb(0,0,0)';
- ctx.stroke();
- }
-
- ctx.fillStyle = 'rgb(255, 255, 255)';
- ctx.fillText(item.dotLetter, xView, halfHeight);
- }
- };
-
- // Draw unselected items first to make sure they don't occlude selected
- // items.
- drawItems(false);
- drawItems(true);
-
- ctx.lineWidth = 1;
- ctx.font = oldFont;
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- if (this.items_ === undefined)
- return;
-
- this.items_.forEach(function(item) {
- item.addToTrackMap(eventToTrackMap, this);
- }, this);
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- if (this.items_ === undefined)
- return;
-
- var itemRadiusWorld = viewPixWidthWorld * this.dumpRadiusView;
- tr.b.iterateOverIntersectingIntervals(
- this.items_,
- function(x) { return x.start - itemRadiusWorld; },
- function(x) { return 2 * itemRadiusWorld; },
- loWX, hiWX,
- function(item) {
- item.addToSelection(selection);
- }.bind(this));
- },
-
- /**
- * Add the item to the left or right of the provided event, if any, to the
- * selection.
- * @param {event} The current event item.
- * @param {Number} offset Number of slices away from the event to look.
- * @param {Selection} selection The selection to add an event to,
- * if found.
- * @return {boolean} Whether an event was found.
- * @private
- */
- addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- if (this.items_ === undefined)
- return;
-
- var items = this.items_;
- var index = tr.b.findFirstIndexInArray(items, function(item) {
- return item.modelItem === event;
- });
- if (index === -1)
- return false;
-
- var newIndex = index + offset;
- if (newIndex >= 0 && newIndex < items.length) {
- items[newIndex].addToSelection(selection);
- return true;
- }
- return false;
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- if (this.items_ === undefined)
- return;
-
- var item = tr.b.findClosestElementInSortedArray(
- this.items_,
- function(x) { return x.start; },
- worldX,
- worldMaxDist);
-
- if (!item)
- return;
-
- item.addToSelection(selection);
- }
- };
-
- /**
- * A filled dot with a letter inside it.
- *
- * @constructor
- * @extends {ProxySelectableItem}
- */
- function LetterDot(modelItem, dotLetter, colorId, start) {
- tr.model.ProxySelectableItem.call(this, modelItem);
- this.dotLetter = dotLetter;
- this.colorId = colorId;
- this.start = start;
- };
-
- LetterDot.prototype = {
- __proto__: tr.model.ProxySelectableItem.prototype
- };
-
- return {
- LetterDotTrack: LetterDotTrack,
- LetterDot: LetterDot
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track_test.html
deleted file mode 100644
index 6f55ed14b62..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/letter_dot_track_test.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/letter_dot_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var LetterDotTrack = tr.ui.tracks.LetterDotTrack;
- var LetterDot = tr.ui.tracks.LetterDot;
- var SelectionState = tr.model.SelectionState;
- var Viewport = tr.ui.TimelineViewport;
-
- var createItems = function() {
- var items = [
- new LetterDot({selectionState: SelectionState.SELECTED}, 'a', 7, 5),
- new LetterDot({selectionState: SelectionState.SELECTED}, 'b', 2, 20),
- new LetterDot({selectionState: SelectionState.NONE}, 'c', 4, 35),
- new LetterDot({selectionState: SelectionState.NONE}, 'd', 4, 50)
- ];
- return items;
- };
-
- test('instantiate', function() {
- var items = createItems();
-
- var div = document.createElement('div');
-
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = LetterDotTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.items = items;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 60, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
- test('selectionHitTesting', function() {
- var items = createItems();
-
- var track = new LetterDotTrack(new Viewport());
- track.items = items;
-
- // Fake a view pixel size.
- var devicePixelRatio = window.devicePixelRatio || 1;
- var viewPixWidthWorld = 0.1 / devicePixelRatio;
-
- // Hit outside range
- var selection = [];
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 3, 4, viewPixWidthWorld, selection);
- assert.equal(selection.length, 0);
-
- // Hit the first item, via pixel-nearness.
- selection = [];
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 19.98, 19.99, viewPixWidthWorld, selection);
- assert.equal(selection.length, 1);
- assert.equal(selection[0], items[1].modelItem);
-
- // Hit the instance, between the 1st and 2nd snapshots
- selection = [];
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 30, 50, viewPixWidthWorld, selection);
- assert.equal(selection.length, 2);
- assert.equal(selection[0], items[2].modelItem);
- assert.equal(selection[1], items[3].modelItem);
- });
-
- test('addEventNearToProvidedEventToSelection', function() {
- var items = createItems();
-
- var track = new LetterDotTrack(new Viewport());
- track.items = items;
-
- // Right from the middle of items.
- var selection1 = [];
- assert.isTrue(track.addEventNearToProvidedEventToSelection(
- items[2].modelItem, 1, selection1));
- assert.equal(selection1.length, 1);
- assert.equal(selection1[0], items[3].modelItem);
-
- // Left from the middle of items.
- var selection2 = [];
- assert.isTrue(track.addEventNearToProvidedEventToSelection(
- items[2].modelItem, -1, selection2));
- assert.equal(selection2.length, 1);
- assert.equal(selection2[0], items[1].modelItem);
-
- // Right from the right edge of items.
- var selection3 = [];
- assert.isFalse(track.addEventNearToProvidedEventToSelection(
- items[3].modelItem, 1, selection3));
- assert.equal(selection3.length, 0);
-
- // Left from the left edge of items.
- var selection4 = [];
- assert.isFalse(track.addEventNearToProvidedEventToSelection(
- items[0].modelItem, -1, selection4));
- assert.equal(selection4.length, 0);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_test_utils.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_test_utils.html
deleted file mode 100644
index 517eec0f2db..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_test_utils.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/global_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_dump_test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/process_memory_dump.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/model/vm_region.html">
-
-<script>
-'use strict';
-
-/**
- * @fileoverview Helper functions for memory dump track tests.
- */
-tr.exportTo('tr.ui.tracks', function() {
- var ProcessMemoryDump = tr.model.ProcessMemoryDump;
- var GlobalMemoryDump = tr.model.GlobalMemoryDump;
- var VMRegion = tr.model.VMRegion;
- var VMRegionClassificationNode = tr.model.VMRegionClassificationNode;
- var SelectionState = tr.model.SelectionState;
- var addGlobalMemoryDump = tr.model.MemoryDumpTestUtils.addGlobalMemoryDump;
- var addProcessMemoryDump = tr.model.MemoryDumpTestUtils.addProcessMemoryDump;
- var newAllocatorDump = tr.model.MemoryDumpTestUtils.newAllocatorDump;
- var addOwnershipLink = tr.model.MemoryDumpTestUtils.addOwnershipLink;
- var BACKGROUND = tr.model.ContainerMemoryDump.LevelOfDetail.BACKGROUND;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
-
- function createVMRegions(pssValues) {
- return VMRegionClassificationNode.fromRegions(
- pssValues.map(function(pssValue, i) {
- return VMRegion.fromDict({
- startAddress: 1000 * i,
- sizeInBytes: 1000,
- protectionFlags: VMRegion.PROTECTION_FLAG_READ,
- mappedFile: '[stack' + i + ']',
- byteStats: {
- privateDirtyResident: pssValue / 3,
- swapped: pssValue * 3,
- proportionalResident: pssValue
- }
- });
- }));
- }
-
- function createAllocatorDumps(memoryDump, dumpData) {
- // Create the individual allocator dumps.
- var allocatorDumps = tr.b.mapItems(dumpData, function(allocatorName, data) {
- var size = data.size;
- assert.typeOf(size, 'number'); // Sanity check.
- return newAllocatorDump(memoryDump, allocatorName,
- {numerics: {size: size}});
- });
-
- // Add ownership links between them.
- tr.b.iterItems(dumpData, function(allocatorName, data) {
- var owns = data.owns;
- if (owns === undefined)
- return;
-
- var ownerDump = allocatorDumps[allocatorName];
- assert.isDefined(ownerDump); // Sanity check.
- var ownedDump = allocatorDumps[owns];
- assert.isDefined(ownedDump); // Sanity check.
-
- addOwnershipLink(ownerDump, ownedDump);
- });
-
- return tr.b.dictionaryValues(allocatorDumps);
- }
-
- function addProcessMemoryDumpWithFields(globalMemoryDump, process, start,
- opt_pssValues, opt_dumpData) {
- var pmd = addProcessMemoryDump(globalMemoryDump, process, {ts: start});
- if (opt_pssValues !== undefined)
- pmd.vmRegions = createVMRegions(opt_pssValues);
- if (opt_dumpData !== undefined)
- pmd.memoryAllocatorDumps = createAllocatorDumps(pmd, opt_dumpData);
- }
-
- function createModelWithDumps(withVMRegions, withAllocatorDumps) {
- var maybePssValues = function(pssValues) {
- return withVMRegions ? pssValues : undefined;
- };
- var maybeDumpData = function(dumpData) {
- return withAllocatorDumps ? dumpData : undefined;
- };
- return tr.c.TestUtils.newModel(function(model) {
- // Construct a model with three processes.
- var pa = model.getOrCreateProcess(3);
- var pb = model.getOrCreateProcess(6);
- var pc = model.getOrCreateProcess(9);
-
- var gmd1 = addGlobalMemoryDump(model, {ts: 0, levelOfDetail: LIGHT});
- addProcessMemoryDumpWithFields(gmd1, pa, 0, maybePssValues([111]));
- addProcessMemoryDumpWithFields(gmd1, pb, 0.2, undefined,
- maybeDumpData({oilpan: {size: 1024}}));
-
- var gmd2 = addGlobalMemoryDump(model, {ts: 5, levelOfDetail: DETAILED});
- addProcessMemoryDumpWithFields(gmd2, pa, 0);
- addProcessMemoryDumpWithFields(gmd2, pb, 4.99, maybePssValues([100, 50]),
- maybeDumpData({v8: {size: 512}}));
- addProcessMemoryDumpWithFields(gmd2, pc, 5.12, undefined,
- maybeDumpData({oilpan: {size: 128, owns: 'v8'},
- v8: {size: 384, owns: 'tracing'}, tracing: {size: 65920}}));
-
- var gmd3 = addGlobalMemoryDump(model, {ts: 15, levelOfDetail: DETAILED});
- addProcessMemoryDumpWithFields(gmd3, pa, 15.5, maybePssValues([]),
- maybeDumpData({v8: {size: 768}}));
- addProcessMemoryDumpWithFields(gmd3, pc, 14.5,
- maybePssValues([70, 70, 70]), maybeDumpData({oilpan: {size: 512}}));
-
- var gmd4 = addGlobalMemoryDump(model, {ts: 18, levelOfDetail: LIGHT});
-
- var gmd5 = addGlobalMemoryDump(model,
- {ts: 20, levelOfDetail: BACKGROUND});
- addProcessMemoryDumpWithFields(gmd5, pa, 0, maybePssValues([105]));
- addProcessMemoryDumpWithFields(gmd5, pb, 0.2, undefined,
- maybeDumpData({oilpan: {size: 100}}));
-
- });
- }
-
- function createTestGlobalMemoryDumps(withVMRegions, withAllocatorDumps) {
- var model = createModelWithDumps(withVMRegions, withAllocatorDumps);
- var dumps = model.globalMemoryDumps;
- dumps[1].selectionState = SelectionState.HIGHLIGHTED;
- dumps[2].selectionState = SelectionState.SELECTED;
- return dumps;
- }
-
- function createTestProcessMemoryDumps(withVMRegions, withAllocatorDumps) {
- var model = createModelWithDumps(withVMRegions, withAllocatorDumps);
- var dumps = model.getProcess(9).memoryDumps;
- dumps[0].selectionState = SelectionState.SELECTED;
- dumps[1].selectionState = SelectionState.HIGHLIGHTED;
- return dumps;
- }
-
- return {
- createTestGlobalMemoryDumps: createTestGlobalMemoryDumps,
- createTestProcessMemoryDumps: createTestProcessMemoryDumps
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util.html
deleted file mode 100644
index a7fd6d19380..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util.html
+++ /dev/null
@@ -1,215 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/model/container_memory_dump.html">
-<link rel="import" href="/tracing/model/memory_allocator_dump.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/letter_dot_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- var DISPLAYED_SIZE_NUMERIC_NAME =
- tr.model.MemoryAllocatorDump.DISPLAYED_SIZE_NUMERIC_NAME;
- var BACKGROUND = tr.model.ContainerMemoryDump.LevelOfDetail.BACKGROUND;
- var LIGHT = tr.model.ContainerMemoryDump.LevelOfDetail.LIGHT;
- var DETAILED = tr.model.ContainerMemoryDump.LevelOfDetail.DETAILED;
-
- /** Extract PSS values of processes in a global memory dump. */
- function extractGlobalMemoryDumpUsedSizes(globalMemoryDump, addSize) {
- tr.b.iterItems(globalMemoryDump.processMemoryDumps, function(pid, pmd) {
- var mostRecentVmRegions = pmd.mostRecentVmRegions;
- if (mostRecentVmRegions === undefined)
- return;
- addSize(pid, mostRecentVmRegions.byteStats.proportionalResident || 0,
- pmd.process.userFriendlyName);
- });
- }
-
- /** Extract sizes of root allocators in a process memory dump. */
- function extractProcessMemoryDumpAllocatorSizes(processMemoryDump, addSize) {
- var allocatorDumps = processMemoryDump.memoryAllocatorDumps;
- if (allocatorDumps === undefined)
- return;
- allocatorDumps.forEach(function(allocatorDump) {
- // Don't show tracing overhead in the charts.
- // TODO(petrcermak): Find a less hacky way to do this.
- if (allocatorDump.fullName === 'tracing')
- return;
- var allocatorSize = allocatorDump.numerics[DISPLAYED_SIZE_NUMERIC_NAME];
- if (allocatorSize === undefined)
- return;
- var allocatorSizeValue = allocatorSize.value;
- if (allocatorSizeValue === undefined)
- return;
- addSize(allocatorDump.fullName, allocatorSizeValue);
- });
- }
-
- /** Extract sizes of root allocators in a global memory dump. */
- function extractGlobalMemoryDumpAllocatorSizes(globalMemoryDump, addSize) {
- tr.b.iterItems(
- globalMemoryDump.processMemoryDumps,
- (pid, pmd) => extractProcessMemoryDumpAllocatorSizes(pmd, addSize));
- }
-
- /**
- * A generic function which converts a list of memory dumps to a list of
- * chart series.
- *
- * @param {!Array<!tr.model.ContainerMemoryDump>} memoryDumps List of
- * container memory dumps.
- * @param {!function(
- * !tr.model.ContainerMemoryDump,
- * !function(string, number, string=))} dumpSizeExtractor Callback for
- * extracting sizes from a container memory dump.
- * @return {(!Array<!tr.ui.tracks.ChartSeries>|undefined)} List of chart
- * series (or undefined if no size is extracted from any container memory
- * dump).
- */
- function buildMemoryChartSeries(memoryDumps, dumpSizeExtractor) {
- var dumpCount = memoryDumps.length;
- var idToTimestampToPoint = {};
- var idToName = {};
-
- // Extract the sizes of all components from each memory dump.
- memoryDumps.forEach(function(dump, index) {
- dumpSizeExtractor(dump, function addSize(id, size, opt_name) {
- var timestampToPoint = idToTimestampToPoint[id];
- if (timestampToPoint === undefined) {
- idToTimestampToPoint[id] = timestampToPoint = new Array(dumpCount);
- for (var i = 0; i < dumpCount; i++) {
- var modelItem = memoryDumps[i];
- timestampToPoint[i] = new tr.ui.tracks.ChartPoint(
- modelItem, modelItem.start, 0);
- }
- }
- timestampToPoint[index].y += size;
- if (opt_name !== undefined)
- idToName[id] = opt_name;
- });
- });
-
- // Do not generate any chart series if no sizes were extracted.
- var ids = Object.keys(idToTimestampToPoint);
- if (ids.length === 0)
- return undefined;
-
- ids.sort();
- for (var i = 0; i < dumpCount; i++) {
- var baseSize = 0;
- // Traverse |ids| in reverse (alphabetical) order so that the first id is
- // at the top of the chart.
- for (var j = ids.length - 1; j >= 0; j--) {
- var point = idToTimestampToPoint[ids[j]][i];
- point.yBase = baseSize;
- point.y += baseSize;
- baseSize = point.y;
- }
- }
-
- // Create one common axis for all memory chart series.
- var axis = new tr.ui.tracks.ChartAxis(0);
-
- // Build a chart series for each id.
- var series = ids.map(function(id) {
- var colorId = ColorScheme.getColorIdForGeneralPurposeString(
- idToName[id] || id);
- var renderingConfig = {
- chartType: tr.ui.tracks.ChartSeriesType.AREA,
- colorId: colorId,
- backgroundOpacity: 0.8
- };
- return new tr.ui.tracks.ChartSeries(idToTimestampToPoint[id],
- axis, renderingConfig);
- });
-
- // Ensure that the series at the top of the chart are drawn last.
- series.reverse();
-
- return series;
- }
-
- /**
- * Transform a list of memory dumps to a list of letter dots (with letter 'M'
- * inside).
- */
- function buildMemoryLetterDots(memoryDumps) {
- var backgroundMemoryColorId =
- ColorScheme.getColorIdForReservedName('background_memory_dump');
- var lightMemoryColorId =
- ColorScheme.getColorIdForReservedName('light_memory_dump');
- var detailedMemoryColorId =
- ColorScheme.getColorIdForReservedName('detailed_memory_dump');
- return memoryDumps.map(function(memoryDump) {
- var memoryColorId;
- switch (memoryDump.levelOfDetail) {
- case BACKGROUND:
- memoryColorId = backgroundMemoryColorId;
- break;
- case DETAILED:
- memoryColorId = detailedMemoryColorId;
- break;
- case LIGHT:
- default:
- memoryColorId = lightMemoryColorId;
- }
- return new tr.ui.tracks.LetterDot(
- memoryDump, 'M', memoryColorId, memoryDump.start);
- });
- }
-
- /**
- * Convert a list of global memory dumps to a list of chart series (one per
- * process). Each series represents the evolution of the memory used by the
- * process over time.
- */
- function buildGlobalUsedMemoryChartSeries(globalMemoryDumps) {
- return buildMemoryChartSeries(globalMemoryDumps,
- extractGlobalMemoryDumpUsedSizes);
- }
-
- /**
- * Convert a list of process memory dumps to a list of chart series (one per
- * root allocator). Each series represents the evolution of the size of a the
- * corresponding root allocator (e.g. 'v8') over time.
- */
- function buildProcessAllocatedMemoryChartSeries(processMemoryDumps) {
- return buildMemoryChartSeries(processMemoryDumps,
- extractProcessMemoryDumpAllocatorSizes);
- }
-
- /**
- * Convert a list of global memory dumps to a list of chart series (one per
- * root allocator). Each series represents the evolution of the size of a the
- * corresponding root allocator (e.g. 'v8') over time.
- */
- function buildGlobalAllocatedMemoryChartSeries(globalMemoryDumps) {
- return buildMemoryChartSeries(globalMemoryDumps,
- extractGlobalMemoryDumpAllocatorSizes);
- }
-
- return {
- buildMemoryLetterDots:
- buildMemoryLetterDots,
- buildGlobalUsedMemoryChartSeries:
- buildGlobalUsedMemoryChartSeries,
- buildProcessAllocatedMemoryChartSeries:
- buildProcessAllocatedMemoryChartSeries,
- buildGlobalAllocatedMemoryChartSeries:
- buildGlobalAllocatedMemoryChartSeries
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util_test.html
deleted file mode 100644
index f19757c1553..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/memory_dump_track_util_test.html
+++ /dev/null
@@ -1,262 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/tracks/memory_dump_track_test_utils.html">
-<link rel="import" href="/tracing/ui/tracks/memory_dump_track_util.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var SelectionState = tr.model.SelectionState;
- var createTestGlobalMemoryDumps = tr.ui.tracks.createTestGlobalMemoryDumps;
- var createTestProcessMemoryDumps = tr.ui.tracks.createTestProcessMemoryDumps;
-
- test('buildMemoryLetterDots_withoutVMRegions', function() {
- var dumps = createTestGlobalMemoryDumps(false, false);
- var items = tr.ui.tracks.buildMemoryLetterDots(dumps);
-
- assert.lengthOf(items, 5);
- assert.equal(items[0].start, 0);
- assert.equal(items[1].start, 5);
- assert.equal(items[2].start, 15);
- assert.equal(items[3].start, 18);
- assert.equal(items[4].start, 20);
-
- // Check model mapping.
- assert.equal(items[1].selectionState, SelectionState.HIGHLIGHTED);
- assert.isTrue(items[2].selected);
- assert.equal(items[3].modelItem, dumps[3]);
- });
-
- test('buildMemoryLetterDots_withVMRegions', function() {
- var dumps = createTestGlobalMemoryDumps(false, false);
- var items = tr.ui.tracks.buildMemoryLetterDots(dumps);
-
- assert.lengthOf(items, 5);
- assert.equal(items[0].start, 0);
- assert.equal(items[1].start, 5);
- assert.equal(items[2].start, 15);
- assert.equal(items[3].start, 18);
- assert.equal(items[4].start, 20);
-
- // Check model mapping.
- assert.equal(items[1].selectionState, SelectionState.HIGHLIGHTED);
- assert.isTrue(items[2].selected);
- assert.equal(items[3].modelItem, dumps[3]);
- });
-
- test('buildGlobalUsedMemoryChartSeries_withoutVMRegions', function() {
- var dumps = createTestGlobalMemoryDumps(false, false);
- var series = tr.ui.tracks.buildGlobalUsedMemoryChartSeries(dumps);
-
- assert.isUndefined(series);
- });
-
- test('buildGlobalUsedMemoryChartSeries_withVMRegions', function() {
- var dumps = createTestGlobalMemoryDumps(true, false);
- var series = tr.ui.tracks.buildGlobalUsedMemoryChartSeries(dumps);
-
- assert.lengthOf(series, 3);
-
- var sa = series[2];
- var sb = series[1];
- var sc = series[0];
-
- assert.lengthOf(sa.points, 5);
- assert.lengthOf(sb.points, 5);
- assert.lengthOf(sc.points, 5);
-
- // Process A: VM regions defined -> sum their PSS values (111).
- // Process B: VM regions undefined and no previous value -> assume zero.
- // Process C: Memory dump not present -> assume process not alive (0).
- assert.equal(sa.points[0].x, 0);
- assert.equal(sb.points[0].x, 0);
- assert.equal(sc.points[0].x, 0);
- assert.equal(sa.points[0].y, 111);
- assert.equal(sb.points[0].y, 0);
- assert.equal(sc.points[0].y, 0);
- assert.equal(sa.points[0].yBase, 0);
- assert.equal(sb.points[0].yBase, 0);
- assert.equal(sc.points[0].yBase, 0);
-
- // Process A: VM regions undefined -> assume previous value (111).
- // Process B: VM regions defined -> sum their PSS values (100 + 50).
- // Process C: VM regions undefined -> assume previous value (0).
- assert.equal(sa.points[1].x, 5);
- assert.equal(sb.points[1].x, 5);
- assert.equal(sc.points[1].x, 5);
- assert.equal(sa.points[1].y, 150 + 111);
- assert.equal(sb.points[1].y, 150);
- assert.equal(sc.points[1].y, 0);
- assert.equal(sa.points[1].yBase, 150);
- assert.equal(sb.points[1].yBase, 0);
- assert.equal(sc.points[1].yBase, 0);
-
- // Process A: VM regions defined -> sum their PSS values (0).
- // Process B: Memory dump not present -> assume process not alive (0).
- // Process C: VM regions defined -> sum their PSS values (70 + 70 + 70).
- assert.equal(sa.points[2].x, 15);
- assert.equal(sb.points[2].x, 15);
- assert.equal(sc.points[2].x, 15);
- assert.equal(sa.points[2].y, 210);
- assert.equal(sb.points[2].y, 210);
- assert.equal(sc.points[2].y, 210);
- assert.equal(sa.points[2].yBase, 210);
- assert.equal(sb.points[2].yBase, 210);
- assert.equal(sc.points[2].yBase, 0);
-
- // All processes: Memory dump not present -> assume process not alive (0).
- assert.equal(sa.points[3].x, 18);
- assert.equal(sb.points[3].x, 18);
- assert.equal(sc.points[3].x, 18);
- assert.equal(sa.points[3].y, 0);
- assert.equal(sb.points[3].y, 0);
- assert.equal(sc.points[3].y, 0);
- assert.equal(sa.points[3].yBase, 0);
- assert.equal(sb.points[3].yBase, 0);
- assert.equal(sc.points[3].yBase, 0);
-
- // Process A: VM regions defined -> sum their PSS values (105).
- // Process B: VM regions undefined and no previous value -> assume zero.
- // Process C: Memory dump not present -> assume process not alive (0).
- assert.equal(sa.points[4].x, 20);
- assert.equal(sb.points[4].x, 20);
- assert.equal(sc.points[4].x, 20);
- assert.equal(sa.points[4].y, 105);
- assert.equal(sb.points[4].y, 0);
- assert.equal(sc.points[4].y, 0);
- assert.equal(sa.points[4].yBase, 0);
- assert.equal(sb.points[4].yBase, 0);
- assert.equal(sc.points[4].yBase, 0);
-
- // Check model mapping.
- assert.equal(sa.points[1].selectionState, SelectionState.HIGHLIGHTED);
- assert.isTrue(sb.points[2].selected);
- assert.equal(sc.points[3].modelItem, dumps[3]);
- });
-
- test('buildGlobalAllocatedMemoryChartSeries_withoutMemoryAllocatorDumps',
- function() {
- var dumps = createTestGlobalMemoryDumps(false, false);
- var series = tr.ui.tracks.buildGlobalAllocatedMemoryChartSeries(dumps);
-
- assert.isUndefined(series);
- });
-
- test('buildGlobalAllocatedMemoryChartSeries_withMemoryAllocatorDumps',
- function() {
- var dumps = createTestGlobalMemoryDumps(false, true);
- var series = tr.ui.tracks.buildGlobalAllocatedMemoryChartSeries(dumps);
-
- assert.lengthOf(series, 2);
-
- var so = series[1];
- var sv = series[0];
-
- assert.lengthOf(so.points, 5);
- assert.lengthOf(sv.points, 5);
-
- // Oilpan: Only process B dumps allocated objects size (1024).
- // V8: No process dumps allocated objects size (0).
- assert.equal(so.points[0].x, 0);
- assert.equal(sv.points[0].x, 0);
- assert.equal(so.points[0].y, 1024);
- assert.equal(sv.points[0].y, 0);
- assert.equal(so.points[0].yBase, 0);
- assert.equal(sv.points[0].yBase, 0);
-
- // Oilpan: Process B did not provide a value and process C dumps (128).
- // V8: Processes B and C dump (512 + 256).
- assert.equal(so.points[1].x, 5);
- assert.equal(sv.points[1].x, 5);
- assert.equal(so.points[1].y, 768 + 128);
- assert.equal(sv.points[1].y, 768);
- assert.equal(so.points[1].yBase, 768);
- assert.equal(sv.points[1].yBase, 0);
-
- // Oilpan: Process B assumed not alive and process C dumps (512)
- // V8: Process A dumps now, process B assumed not alive, process C did not
- // provide a value (768).
- assert.equal(so.points[2].x, 15);
- assert.equal(sv.points[2].x, 15);
- assert.equal(so.points[2].y, 768 + 512);
- assert.equal(sv.points[2].y, 768);
- assert.equal(so.points[2].yBase, 768);
- assert.equal(sv.points[2].yBase, 0);
-
- // All processes: Memory dump not present -> assume process not alive (0).
- assert.equal(so.points[3].x, 18);
- assert.equal(sv.points[3].x, 18);
- assert.equal(so.points[3].y, 0);
- assert.equal(sv.points[3].y, 0);
- assert.equal(so.points[3].yBase, 0);
- assert.equal(sv.points[3].yBase, 0);
-
- // Oilpan: Only process B dumps allocated objects size (100).
- // V8: No process dumps allocated objects size (0).
- assert.equal(so.points[4].x, 20);
- assert.equal(sv.points[4].x, 20);
- assert.equal(so.points[4].y, 100);
- assert.equal(sv.points[4].y, 0);
-
- // Check model mapping.
- assert.equal(so.points[1].selectionState, SelectionState.HIGHLIGHTED);
- assert.isTrue(sv.points[2].selected);
- assert.equal(so.points[3].modelItem, dumps[3]);
- });
-
- test('buildProcessAllocatedMemoryChartSeries_withoutMemoryAllocatorDumps',
- function() {
- var dumps = createTestProcessMemoryDumps(false, false);
- var series = tr.ui.tracks.buildProcessAllocatedMemoryChartSeries(dumps);
-
- assert.isUndefined(series);
- });
-
- test('buildProcessAllocatedMemoryChartSeries_withMemoryAllocatorDumps',
- function() {
- var dumps = createTestProcessMemoryDumps(false, true);
- var series = tr.ui.tracks.buildProcessAllocatedMemoryChartSeries(dumps);
-
- // There should be only 2 series (because 'tracing' is not shown in the
- // charts).
- assert.lengthOf(series, 2);
-
- var so = series[1];
- var sv = series[0];
-
- assert.lengthOf(so.points, 2);
- assert.lengthOf(sv.points, 2);
-
- // Oilpan: Process dumps (128).
- // V8: Process dumps (256).
- assert.equal(so.points[0].x, 5.12);
- assert.equal(sv.points[0].x, 5.12);
- assert.equal(so.points[0].y, 256 + 128);
- assert.equal(sv.points[0].y, 256);
- assert.equal(so.points[0].yBase, 256);
- assert.equal(sv.points[0].yBase, 0);
-
- // Oilpan: Process dumps (512).
- // V8: Process did not provide a value (0).
- assert.equal(so.points[1].x, 14.5);
- assert.equal(sv.points[1].x, 14.5);
- assert.equal(so.points[1].y, 512);
- assert.equal(sv.points[1].y, 0);
- assert.equal(so.points[1].yBase, 0);
- assert.equal(sv.points[1].yBase, 0);
-
- // Check model mapping.
- assert.equal(so.points[1].selectionState, SelectionState.HIGHLIGHTED);
- assert.isTrue(sv.points[0].selected);
- assert.equal(so.points[1].modelItem, dumps[1]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/model_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/model_track.html
deleted file mode 100644
index 051135d49e1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/model_track.html
+++ /dev/null
@@ -1,441 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/alert_track.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/cpu_usage_track.html">
-<link rel="import" href="/tracing/ui/tracks/device_track.html">
-<link rel="import" href="/tracing/ui/tracks/global_memory_dump_track.html">
-<link rel="import" href="/tracing/ui/tracks/highlighter.html">
-<link rel="import" href="/tracing/ui/tracks/interaction_track.html">
-<link rel="import" href="/tracing/ui/tracks/kernel_track.html">
-<link rel="import" href="/tracing/ui/tracks/process_track.html">
-
-<style>
-.model-track {
- -webkit-box-flex: 1;
-}
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var SelectionState = tr.model.SelectionState;
- var EventPresenter = tr.ui.b.EventPresenter;
-
- /**
- * Visualizes a Model by building ProcessTracks and CpuTracks.
- * @constructor
- */
- var ModelTrack = tr.ui.b.define('model-track', tr.ui.tracks.ContainerTrack);
-
-
- ModelTrack.prototype = {
-
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('model-track');
-
- var typeInfos = tr.ui.tracks.Highlighter.getAllRegisteredTypeInfos();
- this.highlighters_ = typeInfos.map(
- function(typeInfo) {
- return new typeInfo.constructor(viewport);
- });
-
- this.upperMode_ = false;
- this.annotationViews_ = [];
- },
-
- // upperMode is true if the track is being used on the ruler.
- get upperMode() {
- return this.upperMode_;
- },
-
- set upperMode(upperMode) {
- this.upperMode_ = upperMode;
- this.updateContents_();
- },
-
- detach: function() {
- tr.ui.tracks.ContainerTrack.prototype.detach.call(this);
- },
-
- get model() {
- return this.model_;
- },
-
- set model(model) {
- this.model_ = model;
- this.updateContents_();
-
- this.model_.addEventListener('annotationChange',
- this.updateAnnotations_.bind(this));
- },
-
- get hasVisibleContent() {
- return this.children.length > 0;
- },
-
- updateContents_: function() {
- Polymer.dom(this).textContent = '';
- if (!this.model_)
- return;
-
- if (this.upperMode_)
- this.updateContentsForUpperMode_();
- else
- this.updateContentsForLowerMode_();
- },
-
- updateContentsForUpperMode_: function() {
- },
-
- updateContentsForLowerMode_: function() {
- if (this.model_.userModel.expectations.length) {
- var mrt = new tr.ui.tracks.InteractionTrack(this.viewport_);
- mrt.model = this.model_;
- Polymer.dom(this).appendChild(mrt);
- }
-
- if (this.model_.alerts.length) {
- var at = new tr.ui.tracks.AlertTrack(this.viewport_);
- at.alerts = this.model_.alerts;
- Polymer.dom(this).appendChild(at);
- }
-
- if (this.model_.globalMemoryDumps.length) {
- var gmdt = new tr.ui.tracks.GlobalMemoryDumpTrack(this.viewport_);
- gmdt.memoryDumps = this.model_.globalMemoryDumps;
- Polymer.dom(this).appendChild(gmdt);
- }
-
- this.appendDeviceTrack_();
- this.appendCpuUsageTrack_();
- this.appendKernelTrack_();
-
- // Get a sorted list of processes.
- var processes = this.model_.getAllProcesses();
- processes.sort(tr.model.Process.compare);
-
- for (var i = 0; i < processes.length; ++i) {
- var process = processes[i];
-
- var track = new tr.ui.tracks.ProcessTrack(this.viewport);
- track.process = process;
- if (!track.hasVisibleContent)
- continue;
-
- Polymer.dom(this).appendChild(track);
- }
- this.viewport_.rebuildEventToTrackMap();
- this.viewport_.rebuildContainerToTrackMap();
-
- for (var i = 0; i < this.highlighters_.length; i++) {
- this.highlighters_[i].processModel(this.model_);
- }
-
- this.updateAnnotations_();
- },
-
- updateAnnotations_: function() {
- this.annotationViews_ = [];
- var annotations = this.model_.getAllAnnotations();
- for (var i = 0; i < annotations.length; i++) {
- this.annotationViews_.push(
- annotations[i].getOrCreateView(this.viewport_));
- }
- this.invalidateDrawingContainer();
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- if (!this.model_)
- return;
-
- var tracks = this.children;
- for (var i = 0; i < tracks.length; ++i)
- tracks[i].addEventsToTrackMap(eventToTrackMap);
-
- if (this.instantEvents === undefined)
- return;
-
- var vp = this.viewport_;
- this.instantEvents.forEach(function(ev) {
- eventToTrackMap.addEvent(ev, this);
- }.bind(this));
- },
-
- appendDeviceTrack_: function() {
- var device = this.model.device;
- var track = new tr.ui.tracks.DeviceTrack(this.viewport);
- track.device = this.model.device;
- if (!track.hasVisibleContent)
- return;
- Polymer.dom(this).appendChild(track);
- },
-
- appendKernelTrack_: function() {
- var kernel = this.model.kernel;
- var track = new tr.ui.tracks.KernelTrack(this.viewport);
- track.kernel = this.model.kernel;
- if (!track.hasVisibleContent)
- return;
- Polymer.dom(this).appendChild(track);
- },
-
- appendCpuUsageTrack_: function() {
- var track = new tr.ui.tracks.CpuUsageTrack(this.viewport);
- track.initialize(this.model);
- if (!track.hasVisibleContent)
- return;
- this.appendChild(track);
- },
-
- appendCpuUsageTrack_: function() {
- var track = new tr.ui.tracks.CpuUsageTrack(this.viewport);
- track.initialize(this.model);
- if (!track.hasVisibleContent)
- return;
- this.appendChild(track);
- },
-
- drawTrack: function(type) {
- var ctx = this.context();
- if (!this.model_)
- return;
-
- var pixelRatio = window.devicePixelRatio || 1;
- var bounds = this.getBoundingClientRect();
- var canvasBounds = ctx.canvas.getBoundingClientRect();
-
- ctx.save();
- ctx.translate(0, pixelRatio * (bounds.top - canvasBounds.top));
-
- var dt = this.viewport.currentDisplayTransform;
- var viewLWorld = dt.xViewToWorld(0);
- var viewRWorld = dt.xViewToWorld(bounds.width * pixelRatio);
-
- switch (type) {
- case tr.ui.tracks.DrawType.GRID:
- this.viewport.drawMajorMarkLines(ctx);
- // The model is the only thing that draws grid lines.
- ctx.restore();
- return;
-
- case tr.ui.tracks.DrawType.FLOW_ARROWS:
- if (this.model_.flowIntervalTree.size === 0) {
- ctx.restore();
- return;
- }
-
- this.drawFlowArrows_(viewLWorld, viewRWorld);
- ctx.restore();
- return;
-
- case tr.ui.tracks.DrawType.INSTANT_EVENT:
- if (!this.model_.instantEvents ||
- this.model_.instantEvents.length === 0)
- break;
-
- tr.ui.b.drawInstantSlicesAsLines(
- ctx,
- this.viewport.currentDisplayTransform,
- viewLWorld,
- viewRWorld,
- bounds.height,
- this.model_.instantEvents,
- 4);
-
- break;
-
- case tr.ui.tracks.DrawType.MARKERS:
- if (!this.viewport.interestRange.isEmpty) {
- this.viewport.interestRange.draw(ctx, viewLWorld, viewRWorld);
- this.viewport.interestRange.drawIndicators(
- ctx, viewLWorld, viewRWorld);
- }
- ctx.restore();
- return;
-
- case tr.ui.tracks.DrawType.HIGHLIGHTS:
- for (var i = 0; i < this.highlighters_.length; i++) {
- this.highlighters_[i].drawHighlight(ctx, dt, viewLWorld, viewRWorld,
- bounds.height);
- }
- ctx.restore();
- return;
-
- case tr.ui.tracks.DrawType.ANNOTATIONS:
- for (var i = 0; i < this.annotationViews_.length; i++) {
- this.annotationViews_[i].draw(ctx);
- }
- ctx.restore();
- return;
- }
- ctx.restore();
-
- tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this, type);
- },
-
- drawFlowArrows_: function(viewLWorld, viewRWorld) {
- var ctx = this.context();
- var dt = this.viewport.currentDisplayTransform;
- dt.applyTransformToCanvas(ctx);
-
- var pixWidth = dt.xViewVectorToWorld(1);
-
- ctx.strokeStyle = 'rgba(0, 0, 0, 0.4)';
- ctx.fillStyle = 'rgba(0, 0, 0, 0.4)';
- ctx.lineWidth = pixWidth > 1.0 ? 1 : pixWidth;
-
- var events =
- this.model_.flowIntervalTree.findIntersection(viewLWorld, viewRWorld);
-
- // When not showing flow events, show only highlighted/selected ones.
- var onlyHighlighted = !this.viewport.showFlowEvents;
- var canvasBounds = ctx.canvas.getBoundingClientRect();
- for (var i = 0; i < events.length; ++i) {
- if (onlyHighlighted &&
- events[i].selectionState !== SelectionState.SELECTED &&
- events[i].selectionState !== SelectionState.HIGHLIGHTED)
- continue;
- this.drawFlowArrow_(ctx, events[i], canvasBounds, pixWidth);
- }
- },
-
- drawFlowArrow_: function(ctx, flowEvent,
- canvasBounds, pixWidth) {
- var pixelRatio = window.devicePixelRatio || 1;
-
- var startTrack = this.viewport.trackForEvent(flowEvent.startSlice);
- var endTrack = this.viewport.trackForEvent(flowEvent.endSlice);
-
- // TODO(nduca): Figure out how to draw flow arrows even when
- // processes are collapsed, bug #931.
- if (startTrack === undefined || endTrack === undefined)
- return;
-
- var startBounds = startTrack.getBoundingClientRect();
- var endBounds = endTrack.getBoundingClientRect();
-
- if (flowEvent.selectionState === SelectionState.SELECTED) {
- ctx.shadowBlur = 1;
- ctx.shadowColor = 'red';
- ctx.shadowOffsety = 2;
- ctx.strokeStyle = 'red';
- } else if (flowEvent.selectionState === SelectionState.HIGHLIGHTED) {
- ctx.shadowBlur = 1;
- ctx.shadowColor = 'red';
- ctx.shadowOffsety = 2;
- ctx.strokeStyle = 'red';
- } else if (flowEvent.selectionState === SelectionState.DIMMED) {
- ctx.shadowBlur = 0;
- ctx.shadowOffsetX = 0;
- ctx.strokeStyle = 'rgba(0, 0, 0, 0.2)';
- } else {
- var hasBoost = false;
- var startSlice = flowEvent.startSlice;
- hasBoost |= startSlice.selectionState === SelectionState.SELECTED;
- hasBoost |= startSlice.selectionState === SelectionState.HIGHLIGHTED;
- var endSlice = flowEvent.endSlice;
- hasBoost |= endSlice.selectionState === SelectionState.SELECTED;
- hasBoost |= endSlice.selectionState === SelectionState.HIGHLIGHTED;
- if (hasBoost) {
- ctx.shadowBlur = 1;
- ctx.shadowColor = 'rgba(255, 0, 0, 0.4)';
- ctx.shadowOffsety = 2;
- ctx.strokeStyle = 'rgba(255, 0, 0, 0.4)';
- } else {
- ctx.shadowBlur = 0;
- ctx.shadowOffsetX = 0;
- ctx.strokeStyle = 'rgba(0, 0, 0, 0.4)';
- }
- }
-
- var startSize = startBounds.left + startBounds.top +
- startBounds.bottom + startBounds.right;
- var endSize = endBounds.left + endBounds.top +
- endBounds.bottom + endBounds.right;
- // Nothing to do if both ends of the track are collapsed.
- if (startSize === 0 && endSize === 0)
- return;
-
- var startY = this.calculateTrackY_(startTrack, canvasBounds);
- var endY = this.calculateTrackY_(endTrack, canvasBounds);
-
- var pixelStartY = pixelRatio * startY;
- var pixelEndY = pixelRatio * endY;
- var half = (flowEvent.end - flowEvent.start) / 2;
-
- ctx.beginPath();
- ctx.moveTo(flowEvent.start, pixelStartY);
- ctx.bezierCurveTo(
- flowEvent.start + half, pixelStartY,
- flowEvent.start + half, pixelEndY,
- flowEvent.end, pixelEndY);
- ctx.stroke();
-
- var arrowWidth = 5 * pixWidth * pixelRatio;
- var distance = flowEvent.end - flowEvent.start;
- if (distance <= (2 * arrowWidth))
- return;
-
- var tipX = flowEvent.end;
- var tipY = pixelEndY;
- var arrowHeight = (endBounds.height / 4) * pixelRatio;
- tr.ui.b.drawTriangle(ctx,
- tipX, tipY,
- tipX - arrowWidth, tipY - arrowHeight,
- tipX - arrowWidth, tipY + arrowHeight);
- ctx.fill();
- },
-
- calculateTrackY_: function(track, canvasBounds) {
- var bounds = track.getBoundingClientRect();
- var size = bounds.left + bounds.top + bounds.bottom + bounds.right;
- if (size === 0)
- return this.calculateTrackY_(
- Polymer.dom(track).parentNode, canvasBounds);
-
- return bounds.top - canvasBounds.top + (bounds.height / 2);
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- function onPickHit(instantEvent) {
- selection.push(instantEvent);
- }
- var instantEventWidth = 3 * viewPixWidthWorld;
- tr.b.iterateOverIntersectingIntervals(this.model_.instantEvents,
- function(x) { return x.start; },
- function(x) { return x.duration + instantEventWidth; },
- loWX, hiWX,
- onPickHit.bind(this));
-
- tr.ui.tracks.ContainerTrack.prototype.
- addIntersectingEventsInRangeToSelectionInWorldSpace.
- apply(this, arguments);
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- this.addClosestInstantEventToSelection(this.model_.instantEvents,
- worldX, worldMaxDist, selection);
- tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection.
- apply(this, arguments);
- }
- };
-
- return {
- ModelTrack: ModelTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/multi_row_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/multi_row_track.html
deleted file mode 100644
index 787dc1a17ac..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/multi_row_track.html
+++ /dev/null
@@ -1,218 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/model/model_settings.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays a group of objects in multiple rows.
- * @constructor
- * @extends {ContainerTrack}
- */
- var MultiRowTrack = tr.ui.b.define(
- 'multi-row-track', tr.ui.tracks.ContainerTrack);
-
- MultiRowTrack.prototype = {
-
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
- this.tooltip_ = '';
- this.heading_ = '';
-
- this.groupingSource_ = undefined;
- this.itemsToGroup_ = undefined;
-
- this.defaultToCollapsedWhenSubRowCountMoreThan = 1;
-
- this.itemsGroupedOnLastUpdateContents_ = undefined;
-
- this.currentSubRows_ = [];
- this.expanded_ = true;
- },
-
- get itemsToGroup() {
- return this.itemsToGroup_;
- },
-
- setItemsToGroup: function(itemsToGroup, opt_groupingSource) {
- this.itemsToGroup_ = itemsToGroup;
- this.groupingSource_ = opt_groupingSource;
- this.updateContents_();
- this.updateExpandedStateFromGroupingSource_();
- },
-
- get heading() {
- return this.heading_;
- },
-
- set heading(h) {
- this.heading_ = h;
- this.updateContents_();
- },
-
- get tooltip() {
- return this.tooltip_;
- },
-
- set tooltip(t) {
- this.tooltip_ = t;
- this.updateContents_();
- },
-
- get subRows() {
- return this.currentSubRows_;
- },
-
- get hasVisibleContent() {
- return this.children.length > 0;
- },
-
- get expanded() {
- return this.expanded_;
- },
-
- set expanded(expanded) {
- if (this.expanded_ === expanded)
- return;
- this.expanded_ = expanded;
- this.expandedStateChanged_();
- },
-
- onHeadingClicked_: function(e) {
- if (this.subRows.length <= 1)
- return;
- this.expanded = !this.expanded;
-
- if (this.groupingSource_) {
- var modelSettings = new tr.model.ModelSettings(
- this.groupingSource_.model);
- modelSettings.setSettingFor(this.groupingSource_, 'expanded',
- this.expanded);
- }
-
- e.stopPropagation();
- },
-
- updateExpandedStateFromGroupingSource_: function() {
- if (this.groupingSource_) {
- var numSubRows = this.subRows.length;
- var modelSettings = new tr.model.ModelSettings(
- this.groupingSource_.model);
- if (numSubRows > 1) {
- var defaultExpanded;
- if (numSubRows > this.defaultToCollapsedWhenSubRowCountMoreThan) {
- defaultExpanded = false;
- } else {
- defaultExpanded = true;
- }
- this.expanded = modelSettings.getSettingFor(
- this.groupingSource_, 'expanded', defaultExpanded);
- } else {
- this.expanded = undefined;
- }
- }
- },
-
- expandedStateChanged_: function() {
- var minH = Math.max(2, Math.ceil(18 / this.children.length));
- var h = (this.expanded_ ? 18 : minH) + 'px';
-
- for (var i = 0; i < this.children.length; i++) {
- this.children[i].height = h;
- if (i === 0)
- this.children[i].arrowVisible = true;
- this.children[i].expanded = this.expanded;
- }
-
- if (this.children.length === 1) {
- this.children[0].expanded = true;
- this.children[0].arrowVisible = false;
- }
- },
-
- updateContents_: function() {
- tr.ui.tracks.ContainerTrack.prototype.updateContents_.call(this);
- if (!this.itemsToGroup_) {
- this.updateHeadingAndTooltip_();
- this.currentSubRows_ = [];
- return;
- }
-
- if (this.areArrayContentsSame_(this.itemsGroupedOnLastUpdateContents_,
- this.itemsToGroup_)) {
- this.updateHeadingAndTooltip_();
- return;
- }
-
- this.itemsGroupedOnLastUpdateContents_ = this.itemsToGroup_;
-
- this.detach();
- if (!this.itemsToGroup_.length) {
- this.currentSubRows_ = [];
- return;
- }
- var subRows = this.buildSubRows_(this.itemsToGroup_);
- this.currentSubRows_ = subRows;
- for (var srI = 0; srI < subRows.length; srI++) {
- var subRow = subRows[srI];
- if (!subRow.length)
- continue;
- var track = this.addSubTrack_(subRow);
- track.addEventListener(
- 'heading-clicked', this.onHeadingClicked_.bind(this));
- }
- this.updateHeadingAndTooltip_();
- this.expandedStateChanged_();
- },
-
- updateHeadingAndTooltip_: function() {
- if (!Polymer.dom(this).firstChild)
- return;
- Polymer.dom(this).firstChild.heading = this.heading_;
- Polymer.dom(this).firstChild.tooltip = this.tooltip_;
- },
-
- /**
- * Breaks up the list of slices into N rows, each of which is a list of
- * slices that are non overlapping.
- */
- buildSubRows_: function(itemsToGroup) {
- throw new Error('Not implemented');
- },
-
- addSubTrack_: function(subRowItems) {
- throw new Error('Not implemented');
- },
-
- areArrayContentsSame_: function(a, b) {
- if (!a || !b)
- return false;
- if (!a.length || !b.length)
- return false;
- if (a.length !== b.length)
- return false;
- for (var i = 0; i < a.length; ++i) {
- if (a[i] !== b[i])
- return false;
- }
- return true;
- }
- };
-
- return {
- MultiRowTrack: MultiRowTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_group_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_group_track.html
deleted file mode 100644
index 7910ed1857a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_group_track.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/ui/analysis/object_instance_view.html">
-<link rel="import" href="/tracing/ui/analysis/object_snapshot_view.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/multi_row_track.html">
-<link rel="import" href="/tracing/ui/tracks/object_instance_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays a ObjectInstanceGroup.
- * @constructor
- * @extends {ContainerTrack}
- */
- var ObjectInstanceGroupTrack = tr.ui.b.define(
- 'object-instance-group-track', tr.ui.tracks.MultiRowTrack);
-
- ObjectInstanceGroupTrack.prototype = {
-
- __proto__: tr.ui.tracks.MultiRowTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('object-instance-group-track');
- this.objectInstances_ = undefined;
- },
-
- get objectInstances() {
- return this.itemsToGroup;
- },
-
- set objectInstances(objectInstances) {
- this.setItemsToGroup(objectInstances);
- },
-
- addSubTrack_: function(objectInstances) {
- var hasMultipleRows = this.subRows.length > 1;
- var track = new tr.ui.tracks.ObjectInstanceTrack(this.viewport);
- track.objectInstances = objectInstances;
- Polymer.dom(this).appendChild(track);
- return track;
- },
-
- buildSubRows_: function(objectInstances) {
- objectInstances.sort(function(x, y) {
- return x.creationTs - y.creationTs;
- });
-
- var subRows = [];
- for (var i = 0; i < objectInstances.length; i++) {
- var objectInstance = objectInstances[i];
-
- var found = false;
- for (var j = 0; j < subRows.length; j++) {
- var subRow = subRows[j];
- var lastItemInSubRow = subRow[subRow.length - 1];
- if (objectInstance.creationTs >= lastItemInSubRow.deletionTs) {
- found = true;
- subRow.push(objectInstance);
- break;
- }
- }
- if (!found) {
- var subRow = [objectInstance];
- subRows.push(subRow);
- }
- }
- return subRows;
- },
- updateHeadingAndTooltip_: function() {
- }
- };
-
- return {
- ObjectInstanceGroupTrack: ObjectInstanceGroupTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.css
deleted file mode 100644
index 0919e85524e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.object-instance-track {
- height: 18px;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.html
deleted file mode 100644
index f6a4fdda61c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track.html
+++ /dev/null
@@ -1,299 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/object_instance_track.css">
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/model/event.html">
-<link rel="import" href="/tracing/ui/base/event_presenter.html">
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var SelectionState = tr.model.SelectionState;
- var EventPresenter = tr.ui.b.EventPresenter;
-
- /**
- * A track that displays an array of Slice objects.
- * @constructor
- * @extends {Track}
- */
- var ObjectInstanceTrack = tr.ui.b.define(
- 'object-instance-track', tr.ui.tracks.Track);
-
- ObjectInstanceTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('object-instance-track');
- this.objectInstances_ = [];
- this.objectSnapshots_ = [];
-
- this.heading_ = document.createElement('tr-ui-heading');
- Polymer.dom(this).appendChild(this.heading_);
- },
-
- set heading(heading) {
- this.heading_.heading = heading;
- },
-
- get heading() {
- return this.heading_.heading;
- },
-
- set tooltip(tooltip) {
- this.heading_.tooltip = tooltip;
- },
-
- get objectInstances() {
- return this.objectInstances_;
- },
-
- set objectInstances(objectInstances) {
- if (!objectInstances || objectInstances.length === 0) {
- this.heading = '';
- this.objectInstances_ = [];
- this.objectSnapshots_ = [];
- return;
- }
- this.heading = objectInstances[0].typeName;
- this.objectInstances_ = objectInstances;
- this.objectSnapshots_ = [];
- this.objectInstances_.forEach(function(instance) {
- this.objectSnapshots_.push.apply(
- this.objectSnapshots_, instance.snapshots);
- }, this);
- this.objectSnapshots_.sort(function(a, b) {
- return a.ts - b.ts;
- });
- },
-
- get height() {
- return window.getComputedStyle(this).height;
- },
-
- set height(height) {
- this.style.height = height;
- },
-
- get snapshotRadiusView() {
- return 7 * (window.devicePixelRatio || 1);
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- switch (type) {
- case tr.ui.tracks.DrawType.GENERAL_EVENT:
- this.drawLetterDots_(viewLWorld, viewRWorld);
- break;
- }
- },
-
- drawLetterDots_: function(viewLWorld, viewRWorld) {
- var ctx = this.context();
- var pixelRatio = window.devicePixelRatio || 1;
-
- var bounds = this.getBoundingClientRect();
- var height = bounds.height * pixelRatio;
- var halfHeight = height * 0.5;
- var twoPi = Math.PI * 2;
-
- // Culling parameters.
- var dt = this.viewport.currentDisplayTransform;
- var snapshotRadiusView = this.snapshotRadiusView;
- var snapshotRadiusWorld = dt.xViewVectorToWorld(height);
- var loI;
-
- // Begin rendering in world space.
- ctx.save();
- dt.applyTransformToCanvas(ctx);
-
- // Instances
- var objectInstances = this.objectInstances_;
- var loI = tr.b.findLowIndexInSortedArray(
- objectInstances,
- function(instance) {
- return instance.deletionTs;
- },
- viewLWorld);
- ctx.strokeStyle = 'rgb(0,0,0)';
- for (var i = loI; i < objectInstances.length; ++i) {
- var instance = objectInstances[i];
- var x = instance.creationTs;
- if (x > viewRWorld)
- break;
-
- var right = instance.deletionTs === Number.MAX_VALUE ?
- viewRWorld : instance.deletionTs;
- ctx.fillStyle = EventPresenter.getObjectInstanceColor(instance);
- ctx.fillRect(x, pixelRatio, right - x, height - 2 * pixelRatio);
- }
- ctx.restore();
-
- // Snapshots. Has to run in worldspace because ctx.arc gets transformed.
- var objectSnapshots = this.objectSnapshots_;
- loI = tr.b.findLowIndexInSortedArray(
- objectSnapshots,
- function(snapshot) {
- return snapshot.ts + snapshotRadiusWorld;
- },
- viewLWorld);
- for (var i = loI; i < objectSnapshots.length; ++i) {
- var snapshot = objectSnapshots[i];
- var x = snapshot.ts;
- if (x - snapshotRadiusWorld > viewRWorld)
- break;
- var xView = dt.xWorldToView(x);
-
- ctx.fillStyle = EventPresenter.getObjectSnapshotColor(snapshot);
- ctx.beginPath();
- ctx.arc(xView, halfHeight, snapshotRadiusView, 0, twoPi);
- ctx.fill();
- if (snapshot.selected) {
- ctx.lineWidth = 5;
- ctx.strokeStyle = 'rgb(100,100,0)';
- ctx.stroke();
-
- ctx.beginPath();
- ctx.arc(xView, halfHeight, snapshotRadiusView - 1, 0, twoPi);
- ctx.lineWidth = 2;
- ctx.strokeStyle = 'rgb(255,255,0)';
- ctx.stroke();
- } else {
- ctx.lineWidth = 1;
- ctx.strokeStyle = 'rgb(0,0,0)';
- ctx.stroke();
- }
- }
- ctx.lineWidth = 1;
-
- // For performance reasons we only check the SelectionState of the first
- // instance. If it's DIMMED we assume that all are DIMMED.
- // TODO(egraether): Allow partial highlight.
- var selectionState = SelectionState.NONE;
- if (objectInstances.length &&
- objectInstances[0].selectionState === SelectionState.DIMMED) {
- selectionState = SelectionState.DIMMED;
- }
-
- // Dim the track when there is an active highlight.
- if (selectionState === SelectionState.DIMMED) {
- var width = bounds.width * pixelRatio;
- ctx.fillStyle = 'rgba(255,255,255,0.5)';
- ctx.fillRect(0, 0, width, height);
- ctx.restore();
- }
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- if (this.objectInstance_ !== undefined) {
- this.objectInstance_.forEach(function(obj) {
- eventToTrackMap.addEvent(obj, this);
- }, this);
- }
-
- if (this.objectSnapshots_ !== undefined) {
- this.objectSnapshots_.forEach(function(obj) {
- eventToTrackMap.addEvent(obj, this);
- }, this);
- }
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- // Pick snapshots first.
- var foundSnapshot = false;
- function onSnapshot(snapshot) {
- selection.push(snapshot);
- foundSnapshot = true;
- }
- var snapshotRadiusView = this.snapshotRadiusView;
- var snapshotRadiusWorld = viewPixWidthWorld * snapshotRadiusView;
- tr.b.iterateOverIntersectingIntervals(
- this.objectSnapshots_,
- function(x) { return x.ts - snapshotRadiusWorld; },
- function(x) { return 2 * snapshotRadiusWorld; },
- loWX, hiWX,
- onSnapshot);
- if (foundSnapshot)
- return;
-
- // Try picking instances.
- tr.b.iterateOverIntersectingIntervals(
- this.objectInstances_,
- function(x) { return x.creationTs; },
- function(x) { return x.deletionTs - x.creationTs; },
- loWX, hiWX,
- selection.push.bind(selection));
- },
-
- /**
- * Add the item to the left or right of the provided event, if any, to the
- * selection.
- * @param {event} The current event item.
- * @param {Number} offset Number of slices away from the event to look.
- * @param {Selection} selection The selection to add an event to,
- * if found.
- * @return {boolean} Whether an event was found.
- * @private
- */
- addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- var events;
- if (event instanceof tr.model.ObjectSnapshot)
- events = this.objectSnapshots_;
- else if (event instanceof tr.model.ObjectInstance)
- events = this.objectInstances_;
- else
- throw new Error('Unrecognized event');
-
- var index = events.indexOf(event);
- var newIndex = index + offset;
- if (newIndex >= 0 && newIndex < events.length) {
- selection.push(events[newIndex]);
- return true;
- }
- return false;
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- var snapshot = tr.b.findClosestElementInSortedArray(
- this.objectSnapshots_,
- function(x) { return x.ts; },
- worldX,
- worldMaxDist);
-
- if (!snapshot)
- return;
-
- selection.push(snapshot);
-
- // TODO(egraether): Search for object instances as well, which was not
- // implemented because it makes little sense with the current visual and
- // needs to take care of overlapping intervals.
- }
- };
-
-
- var options = new tr.b.ExtensionRegistryOptions(
- tr.b.TYPE_BASED_REGISTRY_MODE);
- tr.b.decorateExtensionRegistry(ObjectInstanceTrack, options);
-
- return {
- ObjectInstanceTrack: ObjectInstanceTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track_test.html
deleted file mode 100644
index aa0ab3f9a82..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/object_instance_track_test.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/object_collection.html">
-<link rel="import" href="/tracing/model/scoped_id.html">
-<link rel="import" href="/tracing/model/selection_state.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/object_instance_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var ObjectInstanceTrack = tr.ui.tracks.ObjectInstanceTrack;
- var Viewport = tr.ui.TimelineViewport;
-
- var createObjects = function() {
- var objects = new tr.model.ObjectCollection({});
- var scopedId1 = new tr.model.ScopedId('ptr', '0x1000');
- objects.idWasCreated(scopedId1, 'tr.e.cc', 'Frame', 10);
- objects.addSnapshot(scopedId1, 'tr.e.cc', 'Frame', 10, 'snapshot-1');
- objects.addSnapshot(scopedId1, 'tr.e.cc', 'Frame', 25, 'snapshot-2');
- objects.addSnapshot(scopedId1, 'tr.e.cc', 'Frame', 40, 'snapshot-3');
- objects.idWasDeleted(scopedId1, 'tr.e.cc', 'Frame', 45);
-
- var scopedId2 = new tr.model.ScopedId('ptr', '0x1001');
- objects.idWasCreated(scopedId2, 'skia', 'Picture', 20);
- objects.addSnapshot(scopedId2, 'skia', 'Picture', 20, 'snapshot-1');
- objects.idWasDeleted(scopedId2, 'skia', 'Picture', 25);
- return objects;
- };
-
- test('instantiate', function() {
- var objects = createObjects();
- var frames = objects.getAllInstancesByTypeName()['Frame'];
- frames[0].snapshots[1].selectionState =
- tr.model.SelectionState.SELECTED;
-
- var div = document.createElement('div');
-
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = ObjectInstanceTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.heading = 'testBasic';
- track.objectInstances = frames;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 50, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
- test('selectionHitTestingWithThreadTrack', function() {
- var objects = createObjects();
- var frames = objects.getAllInstancesByTypeName()['Frame'];
-
- var track = ObjectInstanceTrack(new Viewport());
- track.objectInstances = frames;
-
- // Hit outside range
- var selection = new EventSet();
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 8, 8.1, 0.1, selection);
- assert.equal(selection.length, 0);
-
- // Hit the first snapshot, via pixel-nearness.
- selection = new EventSet();
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 9.98, 9.99, 0.1, selection);
- assert.equal(selection.length, 1);
- assert.instanceOf(tr.b.getOnlyElement(selection), tr.model.ObjectSnapshot);
-
- // Hit the instance, between the 1st and 2nd snapshots
- selection = new EventSet();
- track.addIntersectingEventsInRangeToSelectionInWorldSpace(
- 20, 20.1, 0.1, selection);
- assert.equal(selection.length, 1);
- assert.instanceOf(tr.b.getOnlyElement(selection), tr.model.ObjectInstance);
- });
-
- test('addEventNearToProvidedEventToSelection', function() {
- var objects = createObjects();
- var frames = objects.getAllInstancesByTypeName()['Frame'];
-
- var track = ObjectInstanceTrack(new Viewport());
- track.objectInstances = frames;
-
- var instance = new tr.model.ObjectInstance(
- {}, new tr.model.ScopedId('ptr', '0x1000'), 'cat', 'n', 10);
-
- assert.doesNotThrow(function() {
- track.addEventNearToProvidedEventToSelection(instance, 0, undefined);
- });
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track.html
deleted file mode 100644
index c650bdaf80d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/chart_axis.html">
-<link rel="import" href="/tracing/ui/tracks/chart_point.html">
-<link rel="import" href="/tracing/ui/tracks/chart_series.html">
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-
-<style>
-.power-series-track {
- height: 90px;
-}
-</style>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var ColorScheme = tr.b.ColorScheme;
- var ChartTrack = tr.ui.tracks.ChartTrack;
-
- /**
- * A track that displays a PowerSeries.
- *
- * @constructor
- * @extends {ChartTrack}
- */
- var PowerSeriesTrack = tr.ui.b.define('power-series-track', ChartTrack);
-
- PowerSeriesTrack.prototype = {
- __proto__: ChartTrack.prototype,
-
- decorate: function(viewport) {
- ChartTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('power-series-track');
- this.heading = 'Power';
- this.powerSeries_ = undefined;
- },
-
- set powerSeries(powerSeries) {
- this.powerSeries_ = powerSeries;
-
- this.series = this.buildChartSeries_();
- this.autoSetAllAxes({expandMax: true});
- },
-
- get hasVisibleContent() {
- return (this.powerSeries_ && this.powerSeries_.samples.length > 0);
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- containerToTrackMap.addContainer(this.powerSeries_, this);
- },
-
- buildChartSeries_: function() {
- if (!this.hasVisibleContent)
- return [];
-
- var axis = new tr.ui.tracks.ChartAxis(0, undefined);
- var pts = this.powerSeries_.samples.map(function(smpl) {
- return new tr.ui.tracks.ChartPoint(smpl, smpl.start, smpl.powerInW);
- });
- var renderingConfig = {
- chartType: tr.ui.tracks.ChartSeriesType.AREA,
- colorId: ColorScheme.getColorIdForGeneralPurposeString(this.heading)
- };
-
- return [new tr.ui.tracks.ChartSeries(pts, axis, renderingConfig)];
- }
- };
-
- return {
- PowerSeriesTrack: PowerSeriesTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track_test.html
deleted file mode 100644
index 9c0913afb54..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/power_series_track_test.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel='import' href='/tracing/model/device.html'>
-<link rel='import' href='/tracing/model/model.html'>
-<link rel='import' href='/tracing/model/power_series.html'>
-<link rel='import' href='/tracing/ui/base/constants.html'>
-<link rel='import' href='/tracing/ui/timeline_viewport.html'>
-<link rel='import' href='/tracing/ui/tracks/container_to_track_map.html'>
-<link rel='import' href='/tracing/ui/tracks/drawing_container.html'>
-<link rel="import" href="/tracing/ui/tracks/power_series_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
-
- var Device = tr.model.Device;
- var Model = tr.Model;
- var PowerSeries = tr.model.PowerSeries;
- var PowerSeriesTrack = tr.ui.tracks.PowerSeriesTrack;
-
- var createDrawingContainer = function(series) {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- if (series) {
- series.updateBounds();
- setDisplayTransformFromBounds(viewport, series.bounds);
- }
-
- return drawingContainer;
- };
-
- /**
- * Sets the mapping between the input range of timestamps and the output range
- * of horizontal pixels.
- */
- var setDisplayTransformFromBounds = function(viewport, bounds) {
- var dt = new tr.ui.TimelineDisplayTransform();
- var pixelRatio = window.devicePixelRatio || 1;
- var chartPixelWidth =
- (window.innerWidth - tr.ui.b.constants.HEADING_WIDTH) * pixelRatio;
- dt.xSetWorldBounds(bounds.min, bounds.max, chartPixelWidth);
- viewport.setDisplayTransformImmediately(dt);
- };
-
- test('instantiate', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(0, 1);
- series.addPowerSample(0.5, 2);
- series.addPowerSample(1, 3);
- series.addPowerSample(1.5, 4);
-
- var drawingContainer = createDrawingContainer(series);
- var track = new PowerSeriesTrack(drawingContainer.viewport);
- track.powerSeries = series;
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(drawingContainer);
- });
-
- test('hasVisibleContent_trueWithPowerSamplesPresent', function() {
- var series = new PowerSeries(new Model().device);
- series.addPowerSample(0, 1);
- series.addPowerSample(0.5, 2);
- series.addPowerSample(1, 3);
- series.addPowerSample(1.5, 4);
-
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
-
- var track = new PowerSeriesTrack(viewport);
- track.powerSeries = series;
-
- assert.isTrue(track.hasVisibleContent);
- });
-
- test('hasVisibleContent_falseWithUndefinedPowerSeries', function() {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
-
- var track = new PowerSeriesTrack(viewport);
- track.powerSeries = undefined;
-
- assert.notOk(track.hasVisibleContent);
- });
-
- test('hasVisibleContent_falseWithEmptyPowerSeries', function() {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
-
- var track = new PowerSeriesTrack(viewport);
- var series = new PowerSeries(new Model().device);
- track.powerSeries = series;
-
- assert.notOk(track.hasVisibleContent);
- });
-
- test('addContainersToTrackMap', function() {
- var div = document.createElement('div');
- var viewport = new tr.ui.TimelineViewport(div);
-
- var powerSeriesTrack = new PowerSeriesTrack(viewport);
- var series = new PowerSeries(new Model().device);
- powerSeriesTrack.powerSeries = series;
-
- var containerToTrackMap = new tr.ui.tracks.ContainerToTrackMap();
- powerSeriesTrack.addContainersToTrackMap(containerToTrackMap);
-
- assert.equal(
- containerToTrackMap.getTrackByStableId('Device.PowerSeries'),
- powerSeriesTrack);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track.html
deleted file mode 100644
index c0051a7bd19..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/chart_track.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/memory_dump_track_util.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var ALLOCATED_MEMORY_TRACK_HEIGHT = 50;
-
- /**
- * A track that displays an array of ProcessMemoryDump objects.
- * @constructor
- * @extends {ContainerTrack}
- */
- var ProcessMemoryDumpTrack = tr.ui.b.define(
- 'process-memory-dump-track', tr.ui.tracks.ContainerTrack);
-
- ProcessMemoryDumpTrack.prototype = {
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
- this.memoryDumps_ = undefined;
- },
-
- get memoryDumps() {
- return this.memoryDumps_;
- },
-
- set memoryDumps(memoryDumps) {
- this.memoryDumps_ = memoryDumps;
- this.updateContents_();
- },
-
- updateContents_: function() {
- this.clearTracks_();
-
- // Show no tracks if there are no dumps.
- if (!this.memoryDumps_ || !this.memoryDumps_.length)
- return;
-
- this.appendAllocatedMemoryTrack_();
- },
-
- appendAllocatedMemoryTrack_: function() {
- var series = tr.ui.tracks.buildProcessAllocatedMemoryChartSeries(
- this.memoryDumps_);
- if (!series)
- return;
-
- var track = new tr.ui.tracks.ChartTrack(this.viewport);
- track.heading = 'Memory per component';
- track.height = ALLOCATED_MEMORY_TRACK_HEIGHT + 'px';
- track.series = series;
- track.autoSetAllAxes({expandMax: true});
- Polymer.dom(this).appendChild(track);
- }
- };
-
- return {
- ProcessMemoryDumpTrack: ProcessMemoryDumpTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track_test.html
deleted file mode 100644
index 06c2df6894e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_memory_dump_track_test.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/memory_dump_track_test_utils.html">
-<link rel="import" href="/tracing/ui/tracks/process_memory_dump_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var Viewport = tr.ui.TimelineViewport;
- var ProcessMemoryDumpTrack = tr.ui.tracks.ProcessMemoryDumpTrack;
- var createTestProcessMemoryDumps = tr.ui.tracks.createTestProcessMemoryDumps;
-
- function instantiateTrack(withVMRegions, withAllocatorDumps,
- expectedTrackCount) {
- var dumps = createTestProcessMemoryDumps(withVMRegions, withAllocatorDumps);
-
- var div = document.createElement('div');
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = new ProcessMemoryDumpTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- drawingContainer.invalidate();
-
- track.memoryDumps = dumps;
-
- // TODO(petrcermak): Check that the div has indeed zero size.
- if (expectedTrackCount > 0)
- this.addHTMLOutput(div);
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 50, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
-
- assert.lengthOf(track.tracks_, expectedTrackCount);
- };
-
- test('instantiate_withoutMemoryAllocatorDumps', function() {
- instantiateTrack.call(this, false, false, 0);
- });
- test('instantiate_withMemoryAllocatorDumps', function() {
- instantiateTrack.call(this, false, true, 1);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track.html
deleted file mode 100644
index 9069ca86abe..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/color_scheme.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/rect_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var ColorScheme = tr.b.ColorScheme;
-
- /**
- * Visualizes a Process's state using a series of rects to represent activity.
- * @constructor
- */
- var ProcessSummaryTrack = tr.ui.b.define('process-summary-track',
- tr.ui.tracks.RectTrack);
-
- ProcessSummaryTrack.buildRectsFromProcess = function(process) {
- if (!process)
- return [];
-
- var ops = [];
- // build list of start/end ops for each top level or important slice
- var pushOp = function(isStart, time, slice) {
- ops.push({
- isStart: isStart,
- time: time,
- slice: slice
- });
- };
- for (var tid in process.threads) {
- var sliceGroup = process.threads[tid].sliceGroup;
-
- sliceGroup.topLevelSlices.forEach(function(slice) {
- pushOp(true, slice.start, undefined);
- pushOp(false, slice.end, undefined);
- });
- sliceGroup.slices.forEach(function(slice) {
- if (slice.important) {
- pushOp(true, slice.start, slice);
- pushOp(false, slice.end, slice);
- }
- });
- }
- ops.sort(function(a, b) { return a.time - b.time; });
-
- var rects = [];
- /**
- * Build a row of rects which display one way for unimportant activity,
- * and during important slices, show up as those important slices.
- *
- * If an important slice starts in the middle of another,
- * just drop it on the floor.
- */
- var genericColorId = ColorScheme.getColorIdForReservedName('generic_work');
- var pushRect = function(start, end, slice) {
- rects.push(new tr.ui.tracks.Rect(
- slice, /* modelItem: show selection state of slice if present */
- slice ? slice.title : '', /* title */
- slice ? slice.colorId : genericColorId, /* colorId */
- start, /* start */
- end - start /* duration */));
- }
- var depth = 0;
- var currentSlice = undefined;
- var lastStart = undefined;
- ops.forEach(function(op) {
- depth += op.isStart ? 1 : -1;
-
- if (currentSlice) {
- // simply find end of current important slice
- if (!op.isStart && op.slice === currentSlice) {
- // important slice has ended
- pushRect(lastStart, op.time, currentSlice);
- lastStart = depth >= 1 ? op.time : undefined;
- currentSlice = undefined;
- }
- } else {
- if (op.isStart) {
- if (depth === 1) {
- lastStart = op.time;
- currentSlice = op.slice;
- } else if (op.slice) {
- // switch to slice
- if (op.time !== lastStart) {
- pushRect(lastStart, op.time, undefined);
- lastStart = op.time;
- }
- currentSlice = op.slice;
- }
- } else {
- if (depth === 0) {
- pushRect(lastStart, op.time, undefined);
- lastStart = undefined;
- }
- }
- }
- });
- return rects;
- };
-
- ProcessSummaryTrack.prototype = {
- __proto__: tr.ui.tracks.RectTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.RectTrack.prototype.decorate.call(this, viewport);
- },
-
- get process() {
- return this.process_;
- },
-
- set process(process) {
- this.process_ = process;
- this.rects = ProcessSummaryTrack.buildRectsFromProcess(process);
- }
- };
-
- return {
- ProcessSummaryTrack: ProcessSummaryTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track_test.html
deleted file mode 100644
index 11a68527a2e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_summary_track_test.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/model.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/ui/tracks/process_summary_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ProcessSummaryTrack = tr.ui.tracks.ProcessSummaryTrack;
-
- test('buildRectSimple', function() {
- var process;
- var model = tr.c.TestUtils.newModel(function(model) {
- process = model.getOrCreateProcess(1);
- // XXXX
- // XXXX
- var thread1 = process.getOrCreateThread(1);
- thread1.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 1, duration: 4}));
- var thread2 = process.getOrCreateThread(2);
- thread2.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 4, duration: 4}));
- });
-
- var rects = ProcessSummaryTrack.buildRectsFromProcess(process);
-
- assert.equal(rects.length, 1);
- var rect = rects[0];
- assert.closeTo(rect.start, 1, 1e-5);
- assert.closeTo(rect.end, 8, 1e-5);
- });
-
- test('buildRectComplex', function() {
- var process;
- var model = tr.c.TestUtils.newModel(function(model) {
- process = model.getOrCreateProcess(1);
- // XXXX X X XX
- // XXXX XXX X
- var thread1 = process.getOrCreateThread(1);
- thread1.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 1, duration: 4}));
- thread1.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 9, duration: 1}));
- thread1.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 11, duration: 1}));
- thread1.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 13, duration: 2}));
- var thread2 = process.getOrCreateThread(2);
- thread2.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 4, duration: 4}));
- thread2.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 9, duration: 3}));
- thread2.sliceGroup.pushSlice(tr.c.TestUtils.newSliceEx(
- {start: 16, duration: 1}));
- });
-
- var rects = ProcessSummaryTrack.buildRectsFromProcess(process);
-
- assert.equal(4, rects.length);
- assert.closeTo(rects[0].start, 1, 1e-5);
- assert.closeTo(rects[0].end, 8, 1e-5);
- assert.closeTo(rects[1].start, 9, 1e-5);
- assert.closeTo(rects[1].end, 12, 1e-5);
- assert.closeTo(rects[2].start, 13, 1e-5);
- assert.closeTo(rects[2].end, 15, 1e-5);
- assert.closeTo(rects[3].start, 16, 1e-5);
- assert.closeTo(rects[3].end, 17, 1e-5);
- });
-
- test('buildRectImportantSlice', function() {
- var process;
- var model = tr.c.TestUtils.newModel(function(model) {
- // [ unimportant ]
- // [important]
- var a = tr.c.TestUtils.newSliceEx(
- {title: 'unimportant', start: 4, duration: 21});
- var b = tr.c.TestUtils.newSliceEx(
- {title: 'important', start: 9, duration: 11});
- b.important = true;
- process = model.getOrCreateProcess(1);
- process.getOrCreateThread(1).sliceGroup.pushSlices([a, b]);
-
- model.importantSlice = b;
- });
-
- var rects = ProcessSummaryTrack.buildRectsFromProcess(process);
-
- assert.equal(3, rects.length);
- assert.closeTo(rects[0].start, 4, 1e-5);
- assert.closeTo(rects[0].end, 9, 1e-5);
- assert.closeTo(rects[1].start, 9, 1e-5);
- assert.closeTo(rects[1].end, 20, 1e-5);
- assert.closeTo(rects[2].start, 20, 1e-5);
- assert.closeTo(rects[2].end, 25, 1e-5);
-
- // middle rect represents important slice, so colorId & title are preserved
- assert.equal(rects[1].title, model.importantSlice.title);
- assert.equal(rects[1].colorId, model.importantSlice.colorId);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track.html
deleted file mode 100644
index 84263855eef..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track.html
+++ /dev/null
@@ -1,154 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/tracks/process_memory_dump_track.html">
-<link rel="import" href="/tracing/ui/tracks/process_track_base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- var ProcessTrackBase = tr.ui.tracks.ProcessTrackBase;
-
- /**
- * @constructor
- */
- var ProcessTrack = tr.ui.b.define('process-track', ProcessTrackBase);
-
- ProcessTrack.prototype = {
- __proto__: ProcessTrackBase.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ProcessTrackBase.prototype.decorate.call(this, viewport);
- },
-
- drawTrack: function(type) {
- switch (type) {
- case tr.ui.tracks.DrawType.INSTANT_EVENT:
- if (!this.processBase.instantEvents ||
- this.processBase.instantEvents.length === 0)
- break;
-
- var ctx = this.context();
-
- var pixelRatio = window.devicePixelRatio || 1;
- var bounds = this.getBoundingClientRect();
- var canvasBounds = ctx.canvas.getBoundingClientRect();
-
- ctx.save();
- ctx.translate(0, pixelRatio * (bounds.top - canvasBounds.top));
-
- var dt = this.viewport.currentDisplayTransform;
- var viewLWorld = dt.xViewToWorld(0);
- var viewRWorld = dt.xViewToWorld(
- bounds.width * pixelRatio);
-
- tr.ui.b.drawInstantSlicesAsLines(
- ctx,
- this.viewport.currentDisplayTransform,
- viewLWorld,
- viewRWorld,
- bounds.height,
- this.processBase.instantEvents,
- 2);
-
- ctx.restore();
-
- break;
-
- case tr.ui.tracks.DrawType.BACKGROUND:
- this.drawBackground_();
- // Don't bother recursing further, Process is the only level that
- // draws backgrounds.
- return;
- }
-
- tr.ui.tracks.ContainerTrack.prototype.drawTrack.call(this, type);
- },
-
- drawBackground_: function() {
- var ctx = this.context();
- var canvasBounds = ctx.canvas.getBoundingClientRect();
- var pixelRatio = window.devicePixelRatio || 1;
-
- var draw = false;
- ctx.fillStyle = '#eee';
- for (var i = 0; i < this.children.length; ++i) {
- if (!(this.children[i] instanceof tr.ui.tracks.Track) ||
- (this.children[i] instanceof tr.ui.tracks.SpacingTrack))
- continue;
-
- draw = !draw;
- if (!draw)
- continue;
-
- var bounds = this.children[i].getBoundingClientRect();
- ctx.fillRect(0, pixelRatio * (bounds.top - canvasBounds.top),
- ctx.canvas.width, pixelRatio * bounds.height);
- }
- },
-
- // Process maps to processBase because we derive from ProcessTrackBase.
- set process(process) {
- this.processBase = process;
- },
-
- get process() {
- return this.processBase;
- },
-
- get eventContainer() {
- return this.process;
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- tr.ui.tracks.ProcessTrackBase.prototype.addContainersToTrackMap.apply(
- this, arguments);
- containerToTrackMap.addContainer(this.process, this);
- },
-
- appendMemoryDumpTrack_: function() {
- var processMemoryDumps = this.process.memoryDumps;
- if (processMemoryDumps.length) {
- var pmdt = new tr.ui.tracks.ProcessMemoryDumpTrack(this.viewport_);
- pmdt.memoryDumps = processMemoryDumps;
- Polymer.dom(this).appendChild(pmdt);
- }
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- function onPickHit(instantEvent) {
- selection.push(instantEvent);
- }
- var instantEventWidth = 2 * viewPixWidthWorld;
- tr.b.iterateOverIntersectingIntervals(this.processBase.instantEvents,
- function(x) { return x.start; },
- function(x) { return x.duration + instantEventWidth; },
- loWX, hiWX,
- onPickHit.bind(this));
-
- tr.ui.tracks.ContainerTrack.prototype.
- addIntersectingEventsInRangeToSelectionInWorldSpace.
- apply(this, arguments);
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- this.addClosestInstantEventToSelection(this.processBase.instantEvents,
- worldX, worldMaxDist, selection);
- tr.ui.tracks.ContainerTrack.prototype.addClosestEventToSelection.
- apply(this, arguments);
- }
- };
-
- return {
- ProcessTrack: ProcessTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.css
deleted file mode 100644
index 5f42096bbff..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.css
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.process-track-header {
- -webkit-flex: 0 0 auto;
- background-image: -webkit-gradient(linear,
- 0 0, 100% 0,
- from(#E5E5E5),
- to(#D1D1D1));
- border-bottom: 1px solid #8e8e8e;
- border-top: 1px solid white;
- font-size: 75%;
-}
-
-.process-track-name:before {
- content: '\25B8'; /* Right triangle */
- padding: 0 5px;
-}
-
-.process-track-base.expanded .process-track-name:before {
- content: '\25BE'; /* Down triangle */
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.html
deleted file mode 100644
index b56b2cf3002..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/process_track_base.html
+++ /dev/null
@@ -1,274 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/process_track_base.css">
-
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/model_settings.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/counter_track.html">
-<link rel="import" href="/tracing/ui/tracks/frame_track.html">
-<link rel="import" href="/tracing/ui/tracks/object_instance_group_track.html">
-<link rel="import" href="/tracing/ui/tracks/process_summary_track.html">
-<link rel="import" href="/tracing/ui/tracks/spacing_track.html">
-<link rel="import" href="/tracing/ui/tracks/thread_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- var ObjectSnapshotView = tr.ui.analysis.ObjectSnapshotView;
- var ObjectInstanceView = tr.ui.analysis.ObjectInstanceView;
- var SpacingTrack = tr.ui.tracks.SpacingTrack;
-
- /**
- * Visualizes a Process by building ThreadTracks and CounterTracks.
- * @constructor
- */
- var ProcessTrackBase =
- tr.ui.b.define('process-track-base', tr.ui.tracks.ContainerTrack);
-
- ProcessTrackBase.prototype = {
-
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
-
- this.processBase_ = undefined;
-
- Polymer.dom(this).classList.add('process-track-base');
- Polymer.dom(this).classList.add('expanded');
-
- this.processNameEl_ = tr.ui.b.createSpan();
- Polymer.dom(this.processNameEl_).classList.add('process-track-name');
-
- this.headerEl_ = tr.ui.b.createDiv({className: 'process-track-header'});
- Polymer.dom(this.headerEl_).appendChild(this.processNameEl_);
- this.headerEl_.addEventListener('click', this.onHeaderClick_.bind(this));
-
- Polymer.dom(this).appendChild(this.headerEl_);
- },
-
- get processBase() {
- return this.processBase_;
- },
-
- set processBase(processBase) {
- this.processBase_ = processBase;
-
- if (this.processBase_) {
- var modelSettings = new tr.model.ModelSettings(this.processBase_.model);
- var defaultValue = this.processBase_.important;
- this.expanded = modelSettings.getSettingFor(
- this.processBase_, 'expanded', defaultValue);
- }
-
- this.updateContents_();
- },
-
- get expanded() {
- return Polymer.dom(this).classList.contains('expanded');
- },
-
- set expanded(expanded) {
- expanded = !!expanded;
-
- if (this.expanded === expanded)
- return;
-
- Polymer.dom(this).classList.toggle('expanded');
-
- // Expanding and collapsing tracks is, essentially, growing and shrinking
- // the viewport. We dispatch a change event to trigger any processing
- // to happen.
- this.viewport_.dispatchChangeEvent();
-
- if (!this.processBase_)
- return;
-
- var modelSettings = new tr.model.ModelSettings(this.processBase_.model);
- modelSettings.setSettingFor(this.processBase_, 'expanded', expanded);
- this.updateContents_();
- this.viewport.rebuildEventToTrackMap();
- this.viewport.rebuildContainerToTrackMap();
- },
-
- get hasVisibleContent() {
- if (this.expanded)
- return this.children.length > 1;
- return true;
- },
-
- onHeaderClick_: function(e) {
- e.stopPropagation();
- e.preventDefault();
- this.expanded = !this.expanded;
- },
-
- updateContents_: function() {
- this.clearTracks_();
-
- if (!this.processBase_)
- return;
-
- Polymer.dom(this.processNameEl_).textContent =
- this.processBase_.userFriendlyName;
- this.headerEl_.title = this.processBase_.userFriendlyDetails;
-
- // Create the object instance tracks for this process.
- this.willAppendTracks_();
- if (this.expanded) {
- this.appendMemoryDumpTrack_();
- this.appendObjectInstanceTracks_();
- this.appendCounterTracks_();
- this.appendFrameTrack_();
- this.appendThreadTracks_();
- } else {
- this.appendSummaryTrack_();
- }
- this.didAppendTracks_();
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- this.tracks_.forEach(function(track) {
- track.addEventsToTrackMap(eventToTrackMap);
- });
- },
-
- willAppendTracks_: function() {
- },
-
- didAppendTracks_: function() {
- },
-
- appendMemoryDumpTrack_: function() {
- },
-
- appendSummaryTrack_: function() {
- var track = new tr.ui.tracks.ProcessSummaryTrack(this.viewport);
- track.process = this.process;
- if (!track.hasVisibleContent)
- return;
- Polymer.dom(this).appendChild(track);
- // no spacing track, since this track only shown in collapsed state
- },
-
- appendFrameTrack_: function() {
- var frames = this.process ? this.process.frames : undefined;
- if (!frames || !frames.length)
- return;
-
- var track = new tr.ui.tracks.FrameTrack(this.viewport);
- track.frames = frames;
- Polymer.dom(this).appendChild(track);
- },
-
- appendObjectInstanceTracks_: function() {
- var instancesByTypeName =
- this.processBase_.objects.getAllInstancesByTypeName();
- var instanceTypeNames = tr.b.dictionaryKeys(instancesByTypeName);
- instanceTypeNames.sort();
-
- var didAppendAtLeastOneTrack = false;
- instanceTypeNames.forEach(function(typeName) {
- var allInstances = instancesByTypeName[typeName];
-
- // If a object snapshot has a view it will be shown,
- // unless the view asked for it to not be shown.
- var instanceViewInfo = ObjectInstanceView.getTypeInfo(
- undefined, typeName);
- var snapshotViewInfo = ObjectSnapshotView.getTypeInfo(
- undefined, typeName);
- if (instanceViewInfo && !instanceViewInfo.metadata.showInTrackView)
- instanceViewInfo = undefined;
- if (snapshotViewInfo && !snapshotViewInfo.metadata.showInTrackView)
- snapshotViewInfo = undefined;
- var hasViewInfo = instanceViewInfo || snapshotViewInfo;
-
- // There are some instances that don't merit their own track in
- // the UI. Filter them out.
- var visibleInstances = [];
- for (var i = 0; i < allInstances.length; i++) {
- var instance = allInstances[i];
-
- // Do not create tracks for instances that have no snapshots.
- if (instance.snapshots.length === 0)
- continue;
-
- // Do not create tracks for instances that have implicit snapshots
- // and don't have a view.
- if (instance.hasImplicitSnapshots && !hasViewInfo)
- continue;
-
- visibleInstances.push(instance);
- }
- if (visibleInstances.length === 0)
- return;
-
- // Look up the constructor for this track, or use the default
- // constructor if none exists.
- var trackConstructor =
- tr.ui.tracks.ObjectInstanceTrack.getConstructor(
- undefined, typeName);
- if (!trackConstructor) {
- var snapshotViewInfo = ObjectSnapshotView.getTypeInfo(
- undefined, typeName);
- if (snapshotViewInfo && snapshotViewInfo.metadata.showInstances) {
- trackConstructor = tr.ui.tracks.ObjectInstanceGroupTrack;
- } else {
- trackConstructor = tr.ui.tracks.ObjectInstanceTrack;
- }
- }
- var track = new trackConstructor(this.viewport);
- track.objectInstances = visibleInstances;
- Polymer.dom(this).appendChild(track);
- didAppendAtLeastOneTrack = true;
- }, this);
- if (didAppendAtLeastOneTrack)
- Polymer.dom(this).appendChild(new SpacingTrack(this.viewport));
- },
-
- appendCounterTracks_: function() {
- // Add counter tracks for this process.
- var counters = tr.b.dictionaryValues(this.processBase.counters);
- counters.sort(tr.model.Counter.compare);
-
- // Create the counters for this process.
- counters.forEach(function(counter) {
- var track = new tr.ui.tracks.CounterTrack(this.viewport);
- track.counter = counter;
- Polymer.dom(this).appendChild(track);
- Polymer.dom(this).appendChild(new SpacingTrack(this.viewport));
- }.bind(this));
- },
-
- appendThreadTracks_: function() {
- // Get a sorted list of threads.
- var threads = tr.b.dictionaryValues(this.processBase.threads);
- threads.sort(tr.model.Thread.compare);
-
- // Create the threads.
- threads.forEach(function(thread) {
- var track = new tr.ui.tracks.ThreadTrack(this.viewport);
- track.thread = thread;
- if (!track.hasVisibleContent)
- return;
- Polymer.dom(this).appendChild(track);
- Polymer.dom(this).appendChild(new SpacingTrack(this.viewport));
- }.bind(this));
- }
- };
-
- return {
- ProcessTrackBase: ProcessTrackBase
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.css
deleted file mode 100644
index 0467c91562c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Copyright (c) 2014 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.rect-track {
- height: 18px;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.html
deleted file mode 100644
index 770dc97318d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track.html
+++ /dev/null
@@ -1,251 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/rect_track.css">
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/model/proxy_selectable_item.html">
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/base/fast_rect_renderer.html">
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
-
- /**
- * A track that displays an array of Rect objects.
- * @constructor
- * @extends {Track}
- */
- var RectTrack = tr.ui.b.define(
- 'rect-track', tr.ui.tracks.Track);
-
- RectTrack.prototype = {
-
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('rect-track');
- this.asyncStyle_ = false;
- this.rects_ = null;
-
- this.heading_ = document.createElement('tr-ui-heading');
- Polymer.dom(this).appendChild(this.heading_);
- },
-
- set heading(heading) {
- this.heading_.heading = heading;
- },
-
- get heading() {
- return this.heading_.heading;
- },
-
- set tooltip(tooltip) {
- this.heading_.tooltip = tooltip;
- },
-
- set selectionGenerator(generator) {
- this.heading_.selectionGenerator = generator;
- },
-
- set expanded(expanded) {
- this.heading_.expanded = !!expanded;
- },
-
- set arrowVisible(arrowVisible) {
- this.heading_.arrowVisible = !!arrowVisible;
- },
-
- get expanded() {
- return this.heading_.expanded;
- },
-
- get asyncStyle() {
- return this.asyncStyle_;
- },
-
- set asyncStyle(v) {
- this.asyncStyle_ = !!v;
- },
-
- get rects() {
- return this.rects_;
- },
-
- set rects(rects) {
- this.rects_ = rects || [];
- this.invalidateDrawingContainer();
- },
-
- get height() {
- return window.getComputedStyle(this).height;
- },
-
- set height(height) {
- this.style.height = height;
- this.invalidateDrawingContainer();
- },
-
- get hasVisibleContent() {
- return this.rects_.length > 0;
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- switch (type) {
- case tr.ui.tracks.DrawType.GENERAL_EVENT:
- this.drawRects_(viewLWorld, viewRWorld);
- break;
- }
- },
-
- drawRects_: function(viewLWorld, viewRWorld) {
- var ctx = this.context();
-
- ctx.save();
- var bounds = this.getBoundingClientRect();
- tr.ui.b.drawSlices(
- ctx,
- this.viewport.currentDisplayTransform,
- viewLWorld,
- viewRWorld,
- bounds.height,
- this.rects_,
- this.asyncStyle_);
- ctx.restore();
-
- if (bounds.height <= 6)
- return;
-
- var fontSize, yOffset;
- if (bounds.height < 15) {
- fontSize = 6;
- yOffset = 1.0;
- } else {
- fontSize = 10;
- yOffset = 2.5;
- }
- tr.ui.b.drawLabels(
- ctx,
- this.viewport.currentDisplayTransform,
- viewLWorld,
- viewRWorld,
- this.rects_,
- this.asyncStyle_,
- fontSize,
- yOffset);
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- if (this.rects_ === undefined || this.rects_ === null)
- return;
-
- this.rects_.forEach(function(rect) {
- rect.addToTrackMap(eventToTrackMap, this);
- }, this);
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- function onRect(rect) {
- rect.addToSelection(selection);
- }
- onRect = onRect.bind(this);
- var instantEventWidth = 2 * viewPixWidthWorld;
- tr.b.iterateOverIntersectingIntervals(this.rects_,
- function(x) { return x.start; },
- function(x) { return x.duration === 0 ?
- x.duration + instantEventWidth :
- x.duration; },
- loWX, hiWX,
- onRect);
- },
-
- /**
- * Add the item to the left or right of the provided event, if any, to the
- * selection.
- * @param {rect} The current rect.
- * @param {Number} offset Number of rects away from the event to look.
- * @param {Selection} selection The selection to add an event to,
- * if found.
- * @return {boolean} Whether an event was found.
- * @private
- */
- addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- var index = tr.b.findFirstIndexInArray(this.rects_, function(rect) {
- return rect.modelItem === event;
- });
- if (index === -1)
- return false;
-
- var newIndex = index + offset;
- if (newIndex < 0 || newIndex >= this.rects_.length)
- return false;
-
- this.rects_[newIndex].addToSelection(selection);
- return true;
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- for (var i = 0; i < this.rects_.length; ++i) {
- // TODO(petrcermak): Rather than unpacking the proxy item here,
- // we should probably add an addToSelectionIfMatching(selection, filter)
- // method to SelectableItem (#900).
- var modelItem = this.rects_[i].modelItem;
- if (!modelItem)
- continue;
- if (filter.matchSlice(modelItem))
- selection.push(modelItem);
- }
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- var rect = tr.b.findClosestIntervalInSortedIntervals(
- this.rects_,
- function(x) { return x.start; },
- function(x) { return x.end; },
- worldX,
- worldMaxDist);
-
- if (!rect)
- return;
-
- rect.addToSelection(selection);
- }
- };
-
- /**
- * A filled rectangle with a title.
- *
- * @constructor
- * @extends {ProxySelectableItem}
- */
- function Rect(modelItem, title, colorId, start, duration) {
- tr.model.ProxySelectableItem.call(this, modelItem);
- this.title = title;
- this.colorId = colorId;
- this.start = start;
- this.duration = duration;
- this.end = start + duration;
- }
-
- Rect.prototype = {
- __proto__: tr.model.ProxySelectableItem.prototype
- };
-
- return {
- RectTrack: RectTrack,
- Rect: Rect
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track_test.html
deleted file mode 100644
index f6d33831a9d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/rect_track_test.html
+++ /dev/null
@@ -1,412 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/slice.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var EventSet = tr.model.EventSet;
- var RectTrack = tr.ui.tracks.RectTrack;
- var Rect = tr.ui.tracks.Rect;
- var ThreadSlice = tr.model.ThreadSlice;
- var Viewport = tr.ui.TimelineViewport;
-
- test('instantiate_withRects', function() {
- var div = document.createElement('div');
-
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = RectTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.heading = 'testBasicRects';
- track.rects = [
- new Rect(undefined, 'a', 0, 1, 1),
- new Rect(undefined, 'b', 1, 2.1, 4.8),
- new Rect(undefined, 'b', 1, 7, 0.5),
- new Rect(undefined, 'c', 2, 7.6, 0.4)
- ];
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 8.8, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
- test('instantiate_withSlices', function() {
- var div = document.createElement('div');
-
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = RectTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.heading = 'testBasicSlices';
- track.rects = [
- new ThreadSlice('', 'a', 0, 1, {}, 1),
- new ThreadSlice('', 'b', 1, 2.1, {}, 4.8),
- new ThreadSlice('', 'b', 1, 7, {}, 0.5),
- new ThreadSlice('', 'c', 2, 7.6, {}, 0.4)
- ];
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 8.8, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
- test('instantiate_shrinkingRectSize', function() {
- var div = document.createElement('div');
-
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = RectTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.heading = 'testShrinkingRectSizes';
- var x = 0;
- var widths = [10, 5, 4, 3, 2, 1, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05];
- var slices = [];
- for (var i = 0; i < widths.length; i++) {
- var s = new Rect(undefined, 'a', 1, x, widths[i]);
- x += s.duration + 0.5;
- slices.push(s);
- }
- track.rects = slices;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 1.1 * x, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-
- test('instantiate_elide', function() {
- var optDicts = [{ trackName: 'elideOff', elide: false },
- { trackName: 'elideOn', elide: true }];
-
- var tooLongTitle = 'Unless eliding this SHOULD NOT BE DISPLAYED. ';
- var bigTitle = 'Very big title name that goes on longer ' +
- 'than you may expect';
-
- for (var dictIndex in optDicts) {
- var dict = optDicts[dictIndex];
-
- var div = document.createElement('div');
- Polymer.dom(div).appendChild(document.createTextNode(dict.trackName));
-
- var viewport = new Viewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = new RectTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
-
- this.addHTMLOutput(div);
- drawingContainer.invalidate();
-
- track.SHOULD_ELIDE_TEXT = dict.elide;
- track.heading = 'Visual: ' + dict.trackName;
- track.rects = [
- // title, colorId, start, args, opt_duration
- new Rect(undefined, 'a ' + tooLongTitle + bigTitle, 0, 1, 1),
- new Rect(undefined, bigTitle, 1, 2.1, 4.8),
- new Rect(undefined, 'cccc cccc cccc', 1, 7, 0.5),
- new Rect(undefined, 'd', 2, 7.6, 1.0)
- ];
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 9.5, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
- }
- });
-
- test('findAllObjectsMatchingInRectTrack', function() {
- var track = new RectTrack(new tr.ui.TimelineViewport());
- track.rects = [
- new ThreadSlice('', 'a', 0, 1, {}, 1),
- new ThreadSlice('', 'b', 1, 2.1, {}, 4.8),
- new ThreadSlice('', 'b', 1, 7, {}, 0.5),
- new ThreadSlice('', 'c', 2, 7.6, {}, 0.4)
- ];
- var selection = new EventSet();
- track.addAllEventsMatchingFilterToSelection(
- new tr.c.TitleOrCategoryFilter('b'), selection);
-
- var predictedSelection = new EventSet(
- [track.rects[1].modelItem, track.rects[2].modelItem]);
- assert.isTrue(selection.equals(predictedSelection));
- });
-
- test('selectionHitTesting', function() {
- var testEl = document.createElement('div');
- Polymer.dom(testEl).appendChild(
- tr.ui.b.createScopedStyle('heading { width: 100px; }'));
- testEl.style.width = '600px';
-
- var viewport = new Viewport(testEl);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(testEl).appendChild(drawingContainer);
-
- var track = new RectTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- this.addHTMLOutput(testEl);
-
- drawingContainer.updateCanvasSizeIfNeeded_();
-
- track.heading = 'testSelectionHitTesting';
- track.rects = [
- new ThreadSlice('', 'a', 0, 1, {}, 1),
- new ThreadSlice('', 'b', 1, 5, {}, 4.8)
- ];
- var y = track.getBoundingClientRect().top + 5;
- var pixelRatio = window.devicePixelRatio || 1;
- var wW = 10;
- var vW = drawingContainer.canvas.getBoundingClientRect().width;
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, wW, vW * pixelRatio);
- track.viewport.setDisplayTransformImmediately(dt);
-
- var selection = new EventSet();
- var x = (1.5 / wW) * vW;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y, y + 1, selection);
- assert.isTrue(selection.equals(new EventSet(track.rects[0].modelItem)));
-
- var selection = new EventSet();
- x = (2.1 / wW) * vW;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y, y + 1, selection);
- assert.equal(0, selection.length);
-
- var selection = new EventSet();
- x = (6.8 / wW) * vW;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y, y + 1, selection);
- assert.isTrue(selection.equals(new EventSet(track.rects[1].modelItem)));
-
- var selection = new EventSet();
- x = (9.9 / wW) * vW;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y, y + 1, selection);
- assert.equal(0, selection.length);
- });
-
- test('elide', function() {
- var testEl = document.createElement('div');
-
- var viewport = new Viewport(testEl);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(testEl).appendChild(drawingContainer);
-
- var track = new RectTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- this.addHTMLOutput(testEl);
-
- drawingContainer.updateCanvasSizeIfNeeded_();
-
- var bigtitle = 'Super duper long long title ' +
- 'holy moly when did you get so verbose?';
- var smalltitle = 'small';
- track.heading = 'testElide';
- track.rects = [
- // title, colorId, start, args, opt_duration
- new ThreadSlice('', bigtitle, 0, 1, {}, 1),
- new ThreadSlice('', smalltitle, 1, 2, {}, 1)
- ];
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, 3.3, track.clientWidth);
- track.viewport.setDisplayTransformImmediately(dt);
-
- var stringWidthPair = undefined;
- var pixWidth = dt.xViewVectorToWorld(1);
-
- // Small titles on big slices are not elided.
- stringWidthPair =
- tr.ui.b.elidedTitleCache_.get(
- track.context(),
- pixWidth,
- smalltitle,
- tr.ui.b.elidedTitleCache_.labelWidth(
- track.context(),
- smalltitle),
- 1);
- assert.equal(smalltitle, stringWidthPair.string);
-
- // Keep shrinking the slice until eliding starts.
- var elidedWhenSmallEnough = false;
- for (var sliceLength = 1; sliceLength >= 0.00001; sliceLength /= 2.0) {
- stringWidthPair =
- tr.ui.b.elidedTitleCache_.get(
- track.context(),
- pixWidth,
- smalltitle,
- tr.ui.b.elidedTitleCache_.labelWidth(
- track.context(),
- smalltitle),
- sliceLength);
- if (stringWidthPair.string.length < smalltitle.length) {
- elidedWhenSmallEnough = true;
- break;
- }
- }
- assert.isTrue(elidedWhenSmallEnough);
-
- // Big titles are elided immediately.
- var superBigTitle = '';
- for (var x = 0; x < 10; x++) {
- superBigTitle += bigtitle;
- }
- stringWidthPair =
- tr.ui.b.elidedTitleCache_.get(
- track.context(),
- pixWidth,
- superBigTitle,
- tr.ui.b.elidedTitleCache_.labelWidth(
- track.context(),
- superBigTitle),
- 1);
- assert.isTrue(stringWidthPair.string.length < superBigTitle.length);
-
- // And elided text ends with ...
- var len = stringWidthPair.string.length;
- assert.equal('...', stringWidthPair.string.substring(len - 3, len));
- });
-
- test('rectTrackAddItemNearToProvidedEvent', function() {
- var track = new RectTrack(new tr.ui.TimelineViewport());
- track.rects = [
- new ThreadSlice('', 'a', 0, 1, {}, 1),
- new ThreadSlice('', 'b', 1, 2.1, {}, 4.8),
- new ThreadSlice('', 'b', 1, 7, {}, 0.5),
- new ThreadSlice('', 'c', 2, 7.6, {}, 0.4)
- ];
- var sel = new EventSet();
- track.addAllEventsMatchingFilterToSelection(
- new tr.c.TitleOrCategoryFilter('b'), sel);
- var ret;
-
- // Select to the right of B.
- var selRight = new EventSet();
- ret = track.addEventNearToProvidedEventToSelection(
- tr.b.getFirstElement(sel), 1, selRight);
- assert.isTrue(ret);
- assert.equal(track.rects[2].modelItem, tr.b.getFirstElement(selRight));
-
- // Select to the right of the 2nd b.
- var selRight2 = new EventSet();
- ret = track.addEventNearToProvidedEventToSelection(
- tr.b.getFirstElement(sel), 2, selRight2);
- assert.isTrue(ret);
- assert.equal(track.rects[3].modelItem, tr.b.getFirstElement(selRight2));
-
- // Select to 2 to the right of the 2nd b.
- var selRightOfRight = new EventSet();
- ret = track.addEventNearToProvidedEventToSelection(
- tr.b.getFirstElement(selRight), 1, selRightOfRight);
- assert.isTrue(ret);
- assert.equal(track.rects[3].modelItem,
- tr.b.getFirstElement(selRightOfRight));
-
- // Select to the right of the rightmost slice.
- var selNone = new EventSet();
- ret = track.addEventNearToProvidedEventToSelection(
- tr.b.getFirstElement(selRightOfRight), 1, selNone);
- assert.isFalse(ret);
- assert.equal(0, selNone.length);
-
- // Select A and then select left.
- var sel = new EventSet();
- track.addAllEventsMatchingFilterToSelection(
- new tr.c.TitleOrCategoryFilter('a'), sel);
- var ret;
-
- selNone = new EventSet();
- ret = track.addEventNearToProvidedEventToSelection(
- tr.b.getFirstElement(sel), -1, selNone);
- assert.isFalse(ret);
- assert.equal(0, selNone.length);
- });
-
- test('rectTrackAddClosestEventToSelection', function() {
- var track = new RectTrack(new tr.ui.TimelineViewport());
- track.rects = [
- new ThreadSlice('', 'a', 0, 1, {}, 1),
- new ThreadSlice('', 'b', 1, 2.1, {}, 4.8),
- new ThreadSlice('', 'b', 1, 7, {}, 0.5),
- new ThreadSlice('', 'c', 2, 7.6, {}, 0.4)
- ];
-
- // Before with not range.
- var sel = new EventSet();
- track.addClosestEventToSelection(0, 0, 0, 0, sel);
- assert.equal(0, sel.length);
-
- // Before with negative range.
- var sel = new EventSet();
- track.addClosestEventToSelection(1.5, -10, 0, 0, sel);
- assert.equal(0, sel.length);
-
- // Before first slice.
- var sel = new EventSet();
- track.addClosestEventToSelection(0.5, 1, 0, 0, sel);
- assert.isTrue(sel.equals(new EventSet(track.rects[0].modelItem)));
-
- // Within first slice closer to start.
- var sel = new EventSet();
- track.addClosestEventToSelection(1.3, 1, 0, 0, sel);
- assert.isTrue(sel.equals(new EventSet(track.rects[0].modelItem)));
-
- // Between slices with good range.
- var sel = new EventSet();
- track.addClosestEventToSelection(2.08, 3, 0, 0, sel);
- assert.isTrue(sel.equals(new EventSet(track.rects[1].modelItem)));
-
- // Between slices with bad range.
- var sel = new EventSet();
- track.addClosestEventToSelection(2.05, 0.03, 0, 0, sel);
- assert.equal(0, sel.length);
-
- // Within slice closer to end.
- var sel = new EventSet();
- track.addClosestEventToSelection(6, 100, 0, 0, sel);
- assert.isTrue(sel.equals(new EventSet(track.rects[1].modelItem)));
-
- // Within slice with bad range.
- var sel = new EventSet();
- track.addClosestEventToSelection(1.8, 0.1, 0, 0, sel);
- assert.equal(0, sel.length);
-
- // After last slice with good range.
- var sel = new EventSet();
- track.addClosestEventToSelection(8.5, 1, 0, 0, sel);
- assert.isTrue(sel.equals(new EventSet(track.rects[3].modelItem)));
-
- // After last slice with bad range.
- var sel = new EventSet();
- track.addClosestEventToSelection(10, 1, 0, 0, sel);
- assert.equal(0, sel.length);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.css
deleted file mode 100644
index 67a04a987ae..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.css
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.ruler-track {
- height: 12px;
-}
-
-.ruler-track.tall-mode {
- height: 30px;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.html
deleted file mode 100644
index 63d409c45da..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track.html
+++ /dev/null
@@ -1,374 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/ruler_track.css">
-
-<link rel="import" href="/tracing/ui/base/draw_helpers.html">
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays the ruler.
- * @constructor
- * @extends {Track}
- */
- var RulerTrack = tr.ui.b.define('ruler-track', tr.ui.tracks.Track);
-
- var logOf10 = Math.log(10);
- function log10(x) {
- return Math.log(x) / logOf10;
- }
-
- RulerTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('ruler-track');
- this.strings_secs_ = [];
- this.strings_msecs_ = [];
- this.strings_usecs_ = [];
- this.strings_nsecs_ = [];
-
- this.viewportChange_ = this.viewportChange_.bind(this);
- viewport.addEventListener('change', this.viewportChange_);
-
- var heading = document.createElement('tr-ui-heading');
- heading.arrowVisible = false;
- Polymer.dom(this).appendChild(heading);
- },
-
- detach: function() {
- tr.ui.tracks.Track.prototype.detach.call(this);
- this.viewport.removeEventListener('change',
- this.viewportChange_);
- },
-
- viewportChange_: function() {
- if (this.viewport.interestRange.isEmpty)
- Polymer.dom(this).classList.remove('tall-mode');
- else
- Polymer.dom(this).classList.add('tall-mode');
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- switch (type) {
- case tr.ui.tracks.DrawType.GRID:
- this.drawGrid_(viewLWorld, viewRWorld);
- break;
- case tr.ui.tracks.DrawType.MARKERS:
- if (!this.viewport.interestRange.isEmpty)
- this.viewport.interestRange.draw(this.context(),
- viewLWorld, viewRWorld);
- break;
- }
- },
-
- drawGrid_: function(viewLWorld, viewRWorld) {
- var ctx = this.context();
- var pixelRatio = window.devicePixelRatio || 1;
-
- var canvasBounds = ctx.canvas.getBoundingClientRect();
- var trackBounds = this.getBoundingClientRect();
- var width = canvasBounds.width * pixelRatio;
- var height = trackBounds.height * pixelRatio;
-
- var hasInterestRange = !this.viewport.interestRange.isEmpty;
-
- var rulerHeight = hasInterestRange ? (height * 2) / 5 : height;
-
- var vp = this.viewport;
- var dt = vp.currentDisplayTransform;
-
- var idealMajorMarkDistancePix = 150 * pixelRatio;
- var idealMajorMarkDistanceWorld =
- dt.xViewVectorToWorld(idealMajorMarkDistancePix);
-
- var majorMarkDistanceWorld;
-
- // The conservative guess is the nearest enclosing 0.1, 1, 10, 100, etc.
- var conservativeGuess =
- Math.pow(10, Math.ceil(log10(idealMajorMarkDistanceWorld)));
-
- // Once we have a conservative guess, consider things that evenly add up
- // to the conservative guess, e.g. 0.5, 0.2, 0.1 Pick the one that still
- // exceeds the ideal mark distance.
- var divisors = [10, 5, 2, 1];
- for (var i = 0; i < divisors.length; ++i) {
- var tightenedGuess = conservativeGuess / divisors[i];
- if (dt.xWorldVectorToView(tightenedGuess) < idealMajorMarkDistancePix)
- continue;
- majorMarkDistanceWorld = conservativeGuess / divisors[i - 1];
- break;
- }
-
- var unit;
- var unitDivisor;
- var tickLabels = undefined;
- if (majorMarkDistanceWorld < 0.0001) {
- unit = 'ns';
- unitDivisor = 0.000001;
- tickLabels = this.strings_nsecs_;
- } else if (majorMarkDistanceWorld < 0.1) {
- unit = 'us';
- unitDivisor = 0.001;
- tickLabels = this.strings_usecs_;
- } else if (majorMarkDistanceWorld < 100) {
- unit = 'ms';
- unitDivisor = 1;
- tickLabels = this.strings_msecs_;
- } else {
- unit = 's';
- unitDivisor = 1000;
- tickLabels = this.strings_secs_;
- }
-
- var numTicksPerMajor = 5;
- var minorMarkDistanceWorld = majorMarkDistanceWorld / numTicksPerMajor;
- var minorMarkDistancePx = dt.xWorldVectorToView(minorMarkDistanceWorld);
-
- var firstMajorMark =
- Math.floor(viewLWorld / majorMarkDistanceWorld) *
- majorMarkDistanceWorld;
-
- var minorTickH = Math.floor(rulerHeight * 0.25);
-
- ctx.save();
-
- var pixelRatio = window.devicePixelRatio || 1;
- ctx.lineWidth = Math.round(pixelRatio);
-
- // Apply subpixel translate to get crisp lines.
- // http://www.mobtowers.com/html5-canvas-crisp-lines-every-time/
- var crispLineCorrection = (ctx.lineWidth % 2) / 2;
- ctx.translate(crispLineCorrection, -crispLineCorrection);
-
- ctx.fillStyle = 'rgb(0, 0, 0)';
- ctx.strokeStyle = 'rgb(0, 0, 0)';
- ctx.textAlign = 'left';
- ctx.textBaseline = 'top';
-
- ctx.font = (9 * pixelRatio) + 'px sans-serif';
-
- vp.majorMarkPositions = [];
-
- // Each iteration of this loop draws one major mark
- // and numTicksPerMajor minor ticks.
- //
- // Rendering can't be done in world space because canvas transforms
- // affect line width. So, do the conversions manually.
- ctx.beginPath();
- for (var curX = firstMajorMark;
- curX < viewRWorld;
- curX += majorMarkDistanceWorld) {
-
- var curXView = Math.floor(dt.xWorldToView(curX));
-
- var unitValue = curX / unitDivisor;
- var roundedUnitValue = Math.round(unitValue * 100000) / 100000;
-
- if (!tickLabels[roundedUnitValue])
- tickLabels[roundedUnitValue] = roundedUnitValue + ' ' + unit;
- ctx.fillText(tickLabels[roundedUnitValue],
- curXView + (2 * pixelRatio), 0);
-
- vp.majorMarkPositions.push(curXView);
-
- // Major mark
- tr.ui.b.drawLine(ctx, curXView, 0, curXView, rulerHeight);
-
- // Minor marks
- for (var i = 1; i < numTicksPerMajor; ++i) {
- var xView = Math.floor(curXView + minorMarkDistancePx * i);
- tr.ui.b.drawLine(ctx,
- xView, rulerHeight - minorTickH,
- xView, rulerHeight);
- }
- }
-
- // Draw bottom bar.
- ctx.strokeStyle = 'rgb(0, 0, 0)';
- tr.ui.b.drawLine(ctx, 0, height, width, height);
- ctx.stroke();
-
- // Give distance between directly adjacent markers.
- if (!hasInterestRange)
- return;
-
- // Draw middle bar.
- tr.ui.b.drawLine(ctx, 0, rulerHeight, width, rulerHeight);
- ctx.stroke();
-
- // Distance Variables.
- var displayDistance;
- var displayTextColor = 'rgb(0,0,0)';
-
- // Arrow Variables.
- var arrowSpacing = 10 * pixelRatio;
- var arrowColor = 'rgb(128,121,121)';
- var arrowPosY = rulerHeight * 1.75;
- var arrowWidthView = 3 * pixelRatio;
- var arrowLengthView = 10 * pixelRatio;
- var spaceForArrowsView = 2 * (arrowWidthView + arrowSpacing);
-
- ctx.textBaseline = 'middle';
- ctx.font = (14 * pixelRatio) + 'px sans-serif';
- var textPosY = arrowPosY;
-
- var interestRange = vp.interestRange;
-
- // If the range is zero, draw it's min timestamp next to the line.
- if (interestRange.range === 0) {
- var markerWorld = interestRange.min;
- var markerView = dt.xWorldToView(markerWorld);
- var displayValue = markerWorld / unitDivisor;
- displayValue = Math.abs((Math.round(displayValue * 1000) / 1000));
-
- var textToDraw = displayValue + ' ' + unit;
- var textLeftView = markerView + 4 * pixelRatio;
- var textWidthView = ctx.measureText(textToDraw).width;
-
- // Put text to the left in case it gets cut off.
- if (textLeftView + textWidthView > width)
- textLeftView = markerView - 4 * pixelRatio - textWidthView;
-
- ctx.fillStyle = displayTextColor;
- ctx.fillText(textToDraw, textLeftView, textPosY);
- return;
- }
-
- var leftMarker = interestRange.min;
- var rightMarker = interestRange.max;
-
- var leftMarkerView = dt.xWorldToView(leftMarker);
- var rightMarkerView = dt.xWorldToView(rightMarker);
-
- var distanceBetweenMarkers = interestRange.range;
- var distanceBetweenMarkersView =
- dt.xWorldVectorToView(distanceBetweenMarkers);
- var positionInMiddleOfMarkersView =
- leftMarkerView + (distanceBetweenMarkersView / 2);
-
- // Determine units.
- if (distanceBetweenMarkers < 0.0001) {
- unit = 'ns';
- unitDivisor = 0.000001;
- } else if (distanceBetweenMarkers < 0.1) {
- unit = 'us';
- unitDivisor = 0.001;
- } else if (distanceBetweenMarkers < 100) {
- unit = 'ms';
- unitDivisor = 1;
- } else {
- unit = 's';
- unitDivisor = 1000;
- }
-
- // Calculate display value to print.
- displayDistance = distanceBetweenMarkers / unitDivisor;
- var roundedDisplayDistance =
- Math.abs((Math.round(displayDistance * 1000) / 1000));
- var textToDraw = roundedDisplayDistance + ' ' + unit;
- var textWidthView = ctx.measureText(textToDraw).width;
- var spaceForArrowsAndTextView =
- textWidthView + spaceForArrowsView + arrowSpacing;
-
- // Set text positions.
- var textLeftView = positionInMiddleOfMarkersView - textWidthView / 2;
- var textRightView = textLeftView + textWidthView;
-
- if (spaceForArrowsAndTextView > distanceBetweenMarkersView) {
- // Print the display distance text right of the 2 markers.
- textLeftView = rightMarkerView + 2 * arrowSpacing;
-
- // Put text to the left in case it gets cut off.
- if (textLeftView + textWidthView > width)
- textLeftView = leftMarkerView - 2 * arrowSpacing - textWidthView;
-
- ctx.fillStyle = displayTextColor;
- ctx.fillText(textToDraw, textLeftView, textPosY);
-
- // Draw the arrows pointing from outside in and a line in between.
- ctx.strokeStyle = arrowColor;
- ctx.beginPath();
- tr.ui.b.drawLine(ctx, leftMarkerView, arrowPosY, rightMarkerView,
- arrowPosY);
- ctx.stroke();
-
- ctx.fillStyle = arrowColor;
- tr.ui.b.drawArrow(ctx,
- leftMarkerView - 1.5 * arrowSpacing, arrowPosY,
- leftMarkerView, arrowPosY,
- arrowLengthView, arrowWidthView);
- tr.ui.b.drawArrow(ctx,
- rightMarkerView + 1.5 * arrowSpacing, arrowPosY,
- rightMarkerView, arrowPosY,
- arrowLengthView, arrowWidthView);
-
- } else if (spaceForArrowsView <= distanceBetweenMarkersView) {
- var leftArrowStart;
- var rightArrowStart;
- if (spaceForArrowsAndTextView <= distanceBetweenMarkersView) {
- // Print the display distance text.
- ctx.fillStyle = displayTextColor;
- ctx.fillText(textToDraw, textLeftView, textPosY);
-
- leftArrowStart = textLeftView - arrowSpacing;
- rightArrowStart = textRightView + arrowSpacing;
- } else {
- leftArrowStart = positionInMiddleOfMarkersView;
- rightArrowStart = positionInMiddleOfMarkersView;
- }
-
- // Draw the arrows pointing inside out.
- ctx.strokeStyle = arrowColor;
- ctx.fillStyle = arrowColor;
- tr.ui.b.drawArrow(ctx,
- leftArrowStart, arrowPosY,
- leftMarkerView, arrowPosY,
- arrowLengthView, arrowWidthView);
- tr.ui.b.drawArrow(ctx,
- rightArrowStart, arrowPosY,
- rightMarkerView, arrowPosY,
- arrowLengthView, arrowWidthView);
- }
-
- ctx.restore();
- },
-
- /**
- * Adds items intersecting the given range to a selection.
- * @param {number} loVX Lower X bound of the interval to search, in
- * viewspace.
- * @param {number} hiVX Upper X bound of the interval to search, in
- * viewspace.
- * @param {number} loVY Lower Y bound of the interval to search, in
- * viewspace.
- * @param {number} hiVY Upper Y bound of the interval to search, in
- * viewspace.
- * @param {Selection} selection Selection to which to add results.
- */
- addIntersectingEventsInRangeToSelection: function(
- loVX, hiVX, loY, hiY, selection) {
- // Does nothing. There's nothing interesting to pick on the ruler
- // track.
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- }
- };
-
- return {
- RulerTrack: RulerTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track_test.html
deleted file mode 100644
index bde5c5c916f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/ruler_track_test.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/ui/timeline_viewport.html">
-<link rel="import" href="/tracing/ui/tracks/drawing_container.html">
-<link rel="import" href="/tracing/ui/tracks/ruler_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var div = document.createElement('div');
-
- var viewport = new tr.ui.TimelineViewport(div);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(div).appendChild(drawingContainer);
-
- var track = tr.ui.tracks.RulerTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- this.addHTMLOutput(div);
-
- drawingContainer.invalidate();
-
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.setPanAndScale(0, track.clientWidth / 1000);
- track.viewport.setDisplayTransformImmediately(dt);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track.html
deleted file mode 100644
index 80010bbc2a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/rect_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays an array of Sample objects.
- * @constructor
- * @extends {RectTrack}
- */
- var SampleTrack = tr.ui.b.define(
- 'sample-track', tr.ui.tracks.RectTrack);
-
- SampleTrack.prototype = {
-
- __proto__: tr.ui.tracks.RectTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.RectTrack.prototype.decorate.call(this, viewport);
- },
-
- get samples() {
- return this.rects;
- },
-
- set samples(samples) {
- this.rects = samples;
- }
- };
-
- return {
- SampleTrack: SampleTrack
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track_test.html
deleted file mode 100644
index c5c7342af0e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/sample_track_test.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/sample.html">
-<link rel="import" href="/tracing/model/stack_frame.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/tracks/sample_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var SampleTrack = tr.ui.tracks.SampleTrack;
- var Sample = tr.model.Sample;
- var StackFrame = tr.model.StackFrame;
-
- test('modelMapping', function() {
- var track = new SampleTrack(new tr.ui.TimelineViewport());
- var fA = new StackFrame(undefined, 1, 'cat', 'a', 7);
- var sample = new Sample(undefined, undefined, 'instructions_retired',
- 10, fA, 10);
- track.samples = [sample];
- var me0 = track.rects[0].modelItem;
- assert.equal(me0, sample);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track.html
deleted file mode 100644
index 70c7bc5c26c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track.html
+++ /dev/null
@@ -1,168 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/multi_row_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays a SliceGroup.
- * @constructor
- * @extends {MultiRowTrack}
- */
- var SliceGroupTrack = tr.ui.b.define(
- 'slice-group-track', tr.ui.tracks.MultiRowTrack);
-
- SliceGroupTrack.prototype = {
-
- __proto__: tr.ui.tracks.MultiRowTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.MultiRowTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('slice-group-track');
- this.group_ = undefined;
- // Set the collapse threshold so we don't collapse by default, but the
- // user can explicitly collapse if they want it.
- this.defaultToCollapsedWhenSubRowCountMoreThan = 100;
- },
-
- addSubTrack_: function(slices) {
- var track = new tr.ui.tracks.SliceTrack(this.viewport);
- track.slices = slices;
- Polymer.dom(this).appendChild(track);
- return track;
- },
-
- get group() {
- return this.group_;
- },
-
- set group(group) {
- this.group_ = group;
- this.setItemsToGroup(this.group_.slices, this.group_);
- },
-
- get eventContainer() {
- return this.group;
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- tr.ui.tracks.MultiRowTrack.prototype.addContainersToTrackMap.apply(
- this, arguments);
- containerToTrackMap.addContainer(this.group, this);
- },
-
- /**
- * Breaks up the list of slices into N rows, each of which is a list of
- * slices that are non overlapping.
- */
- buildSubRows_: function(slices) {
- var precisionUnit = this.group.model.intrinsicTimeUnit;
-
- // This function works by walking through slices by start time.
- //
- // The basic idea here is to insert each slice as deep into the subrow
- // list as it can go such that every subSlice is fully contained by its
- // parent slice.
- //
- // Visually, if we start with this:
- // 0: [ a ]
- // 1: [ b ]
- // 2: [c][d]
- //
- // To place this slice:
- // [e]
- // We first check row 2's last item, [d]. [e] wont fit into [d] (they dont
- // even intersect). So we go to row 1. That gives us [b], and [d] wont fit
- // into that either. So, we go to row 0 and its last slice, [a]. That can
- // completely contain [e], so that means we should add [e] as a subchild
- // of [a]. That puts it on row 1, yielding:
- // 0: [ a ]
- // 1: [ b ][e]
- // 2: [c][d]
- //
- // If we then get this slice:
- // [f]
- // We do the same deepest-to-shallowest walk of the subrows trying to fit
- // it. This time, it doesn't fit in any open slice. So, we simply append
- // it to row 0:
- // 0: [ a ] [f]
- // 1: [ b ][e]
- // 2: [c][d]
- if (!slices.length)
- return [];
-
- var ops = [];
- for (var i = 0; i < slices.length; i++) {
- if (slices[i].subSlices)
- slices[i].subSlices.splice(0,
- slices[i].subSlices.length);
- ops.push(i);
- }
-
- ops.sort(function(ix, iy) {
- var x = slices[ix];
- var y = slices[iy];
- if (x.start !== y.start)
- return x.start - y.start;
-
- // Elements get inserted into the slices array in order of when the
- // slices start. Because slices must be properly nested, we break
- // start-time ties by assuming that the elements appearing earlier in
- // the slices array (and thus ending earlier) start earlier.
- return ix - iy;
- });
-
- var subRows = [[]];
- this.badSlices_ = []; // TODO(simonjam): Connect this again.
-
- for (var i = 0; i < ops.length; i++) {
- var op = ops[i];
- var slice = slices[op];
-
- // Try to fit the slice into the existing subrows.
- var inserted = false;
- for (var j = subRows.length - 1; j >= 0; j--) {
- if (subRows[j].length === 0)
- continue;
-
- var insertedSlice = subRows[j][subRows[j].length - 1];
- if (slice.start < insertedSlice.start) {
- this.badSlices_.push(slice);
- inserted = true;
- }
- if (insertedSlice.bounds(slice, precisionUnit)) {
- // Insert it into subRow j + 1.
- while (subRows.length <= j + 1)
- subRows.push([]);
- subRows[j + 1].push(slice);
- if (insertedSlice.subSlices)
- insertedSlice.subSlices.push(slice);
- inserted = true;
- break;
- }
- }
- if (inserted)
- continue;
-
- // Append it to subRow[0] as a root.
- subRows[0].push(slice);
- }
-
- return subRows;
- }
- };
-
- return {
- SliceGroupTrack: SliceGroupTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track_test.html
deleted file mode 100644
index fa5f75fad57..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_group_track_test.html
+++ /dev/null
@@ -1,292 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/slice_group.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ProcessTrack = tr.ui.tracks.ProcessTrack;
- var ThreadTrack = tr.ui.tracks.ThreadTrack;
- var SliceGroup = tr.model.SliceGroup;
- var SliceGroupTrack = tr.ui.tracks.SliceGroupTrack;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('subRowBuilderBasic', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 2}));
- var sB = group.pushSlice(newSliceEx({title: 'a', start: 3, duration: 1}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 1);
- assert.equal(subRows[0].length, 2);
- assert.deepEqual(subRows[0], [sA, sB]);
- });
-
- test('subRowBuilderBasic2', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 4}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 2);
- assert.equal(subRows[0].length, 1);
- assert.equal(subRows[1].length, 1);
- assert.deepEqual(subRows[0], [sA]);
- assert.deepEqual(subRows[1], [sB]);
- });
-
- test('subRowBuilderNestedExactly', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1, duration: 4}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 4}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 2);
- assert.equal(subRows[0].length, 1);
- assert.equal(subRows[1].length, 1);
- assert.deepEqual(subRows[0], [sB]);
- assert.deepEqual(subRows[1], [sA]);
- });
-
- test('subRowBuilderInstantEvents', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 0}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 2, duration: 0}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 1);
- assert.equal(subRows[0].length, 2);
- assert.deepEqual(subRows[0], [sA, sB]);
- });
-
- test('subRowBuilderTwoInstantEvents', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 0}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1, duration: 0}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 2);
- assert.deepEqual(subRows[0], [sA]);
- assert.deepEqual(subRows[1], [sB]);
- });
-
- test('subRowBuilderOutOfOrderAddition', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- // Pattern being tested:
- // [ a ][ b ]
- // Where insertion is done backward.
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 2}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 1);
- assert.equal(subRows[0].length, 2);
- assert.deepEqual(subRows[0], [sA, sB]);
- });
-
- test('subRowBuilderOutOfOrderAddition2', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- // Pattern being tested:
- // [ a ]
- // [ b ]
- // Where insertion is done backward.
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 3, duration: 1}));
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 5}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 2);
- assert.equal(subRows[0].length, 1);
- assert.equal(subRows[1].length, 1);
- assert.deepEqual(subRows[0], [sA]);
- assert.deepEqual(subRows[1], [sB]);
- });
-
- test('subRowBuilderOnNestedZeroLength', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- // Pattern being tested:
- // [ a ]
- // [ b1 ] []<- b2 where b2.duration = 0 and b2.end === a.end.
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB1 = group.pushSlice(newSliceEx({title: 'b1', start: 1, duration: 2}));
- var sB2 = group.pushSlice(newSliceEx({title: 'b2', start: 4, duration: 0}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 2);
- assert.deepEqual(subRows[0], [sA]);
- assert.deepEqual(subRows[1], [sB1, sB2]);
- });
-
- test('subRowBuilderOnGroup1', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- // Pattern being tested:
- // [ a ] [ c ]
- // [ b ]
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1.5, duration: 1}));
- var sC = group.pushSlice(newSliceEx({title: 'c', start: 5, duration: 0}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
- var subRows = track.subRows;
-
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 2);
- assert.deepEqual(subRows[0], [sA, sC]);
- assert.deepEqual(subRows[1], [sB]);
- });
-
- test('subRowBuilderOnGroup2', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- // Pattern being tested:
- // [ a ] [ d ]
- // [ b ]
- // [ c ]
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1.5, duration: 1}));
- var sC = group.pushSlice(newSliceEx(
- {title: 'c', start: 1.75, duration: 0.5}));
- var sD = group.pushSlice(newSliceEx(
- {title: 'c', start: 5, duration: 0.25}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
-
- var subRows = track.subRows;
- assert.equal(track.badSlices_.length, 0);
- assert.equal(subRows.length, 3);
- assert.deepEqual(subRows[0], [sA, sD]);
- assert.deepEqual(subRows[1], [sB]);
- assert.deepEqual(subRows[2], [sC]);
- });
-
- test('trackFiltering', function() {
- var m = new tr.Model();
- var t1 = m.getOrCreateProcess(1).getOrCreateThread(2);
- var group = t1.sliceGroup;
-
- var sA = group.pushSlice(newSliceEx({title: 'a', start: 1, duration: 3}));
- var sB = group.pushSlice(newSliceEx({title: 'b', start: 1.5, duration: 1}));
-
- var track = new SliceGroupTrack(new tr.ui.TimelineViewport());
- track.group = group;
-
- assert.equal(track.subRows.length, 2);
- assert.isTrue(track.hasVisibleContent);
- });
-
-test('sliceGroupContainerMap', function() {
- var vp = new tr.ui.TimelineViewport();
- var containerToTrack = vp.containerToTrackMap;
- var model = new tr.Model();
- var process = model.getOrCreateProcess(123);
- var thread = process.getOrCreateThread(456);
- var group = new SliceGroup(thread);
-
- var processTrack = new ProcessTrack(vp);
- var threadTrack = new ThreadTrack(vp);
- var groupTrack = new SliceGroupTrack(vp);
- processTrack.process = process;
- threadTrack.thread = thread;
- groupTrack.group = group;
- Polymer.dom(processTrack).appendChild(threadTrack);
- Polymer.dom(threadTrack).appendChild(groupTrack);
-
- assert.equal(processTrack.eventContainer, process);
- assert.equal(threadTrack.eventContainer, thread);
- assert.equal(groupTrack.eventContainer, group);
-
- assert.isUndefined(containerToTrack.getTrackByStableId('123'));
- assert.isUndefined(containerToTrack.getTrackByStableId('123.456'));
- assert.isUndefined(
- containerToTrack.getTrackByStableId('123.456.SliceGroup'));
-
- vp.modelTrackContainer = {
- addContainersToTrackMap: function(containerToTrackMap) {
- processTrack.addContainersToTrackMap(containerToTrackMap);
- },
- addEventListener: function() {}
- };
- vp.rebuildContainerToTrackMap();
-
- // Check that all tracks call childs' addContainersToTrackMap()
- // by checking the resulting map.
- assert.equal(containerToTrack.getTrackByStableId('123'), processTrack);
- assert.equal(containerToTrack.getTrackByStableId('123.456'), threadTrack);
- assert.equal(containerToTrack.getTrackByStableId('123.456.SliceGroup'),
- groupTrack);
-
- // Check the track's eventContainer getter.
- assert.equal(processTrack.eventContainer, process);
- assert.equal(threadTrack.eventContainer, thread);
- assert.equal(groupTrack.eventContainer, group);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track.html
deleted file mode 100644
index 87123811d62..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/tracks/rect_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays an array of Slice objects.
- * @constructor
- * @extends {RectTrack}
- */
- var SliceTrack = tr.ui.b.define(
- 'slice-track', tr.ui.tracks.RectTrack);
-
- SliceTrack.prototype = {
-
- __proto__: tr.ui.tracks.RectTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.RectTrack.prototype.decorate.call(this, viewport);
- },
-
- get slices() {
- return this.rects;
- },
-
- set slices(slices) {
- this.rects = slices;
- }
- };
-
- return {
- SliceTrack: SliceTrack
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track_test.html
deleted file mode 100644
index f0af57af087..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/slice_track_test.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/slice.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/tracks/slice_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var SliceTrack = tr.ui.tracks.SliceTrack;
- var ThreadSlice = tr.model.ThreadSlice;
-
- test('modelMapping', function() {
- var track = new SliceTrack(new tr.ui.TimelineViewport());
- var slice = new ThreadSlice('', 'a', 0, 1, {}, 1);
- track.slices = [slice];
- var me0 = track.rects[0].modelItem;
- assert.equal(slice, me0);
- });
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.css
deleted file mode 100644
index 094eee0862d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-.spacing-track {
- height: 4px;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.html
deleted file mode 100644
index 7b2fa252627..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/spacing_track.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/spacing_track.css">
-
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track used to provide whitespace between the tracks above and below it.
- *
- * @constructor
- * @extends {tr.ui.tracks.Track}
- */
- var SpacingTrack = tr.ui.b.define('spacing-track', tr.ui.tracks.Track);
-
- SpacingTrack.prototype = {
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('spacing-track');
-
- this.heading_ = document.createElement('tr-ui-heading');
- Polymer.dom(this).appendChild(this.heading_);
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- }
- };
-
- return {
- SpacingTrack: SpacingTrack
- };
-});
-</script>
-
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/stacked_bars_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/stacked_bars_track.html
deleted file mode 100644
index 0f47419bf9a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/stacked_bars_track.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/heading.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * A track that displays traces as stacked bars.
- * @constructor
- * @extends {Track}
- */
- var StackedBarsTrack = tr.ui.b.define(
- 'stacked-bars-track', tr.ui.tracks.Track);
-
- StackedBarsTrack.prototype = {
-
- __proto__: tr.ui.tracks.Track.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.Track.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('stacked-bars-track');
- this.objectInstance_ = null;
-
- this.heading_ = document.createElement('tr-ui-heading');
- Polymer.dom(this).appendChild(this.heading_);
- },
-
- set heading(heading) {
- this.heading_.heading = heading;
- },
-
- get heading() {
- return this.heading_.heading;
- },
-
- set tooltip(tooltip) {
- this.heading_.tooltip = tooltip;
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- var objectSnapshots = this.objectInstance_.snapshots;
- objectSnapshots.forEach(function(obj) {
- eventToTrackMap.addEvent(obj, this);
- }, this);
- },
-
- /**
- * Used to hit-test clicks in the graph.
- */
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- function onSnapshot(snapshot) {
- selection.push(snapshot);
- }
-
- var snapshots = this.objectInstance_.snapshots;
- var maxBounds = this.objectInstance_.parent.model.bounds.max;
-
- tr.b.iterateOverIntersectingIntervals(
- snapshots,
- function(x) { return x.ts; },
- function(x, i) {
- if (i === snapshots.length - 1) {
- if (snapshots.length === 1)
- return maxBounds;
-
- return snapshots[i].ts - snapshots[i - 1].ts;
- }
-
- return snapshots[i + 1].ts - snapshots[i].ts;
- },
- loWX, hiWX,
- onSnapshot);
- },
-
- /**
- * Add the item to the left or right of the provided item, if any, to the
- * selection.
- * @param {slice} The current slice.
- * @param {Number} offset Number of slices away from the object to look.
- * @param {Selection} selection The selection to add an event to,
- * if found.
- * @return {boolean} Whether an event was found.
- * @private
- */
- addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- if (!(event instanceof tr.model.ObjectSnapshot))
- throw new Error('Unrecognized event');
- var objectSnapshots = this.objectInstance_.snapshots;
- var index = objectSnapshots.indexOf(event);
- var newIndex = index + offset;
- if (newIndex >= 0 && newIndex < objectSnapshots.length) {
- selection.push(objectSnapshots[newIndex]);
- return true;
- }
- return false;
- },
-
- addAllEventsMatchingFilterToSelection: function(filter, selection) {
- },
-
- addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
- selection) {
- var snapshot = tr.b.findClosestElementInSortedArray(
- this.objectInstance_.snapshots,
- function(x) { return x.ts; },
- worldX,
- worldMaxDist);
-
- if (!snapshot)
- return;
-
- selection.push(snapshot);
- }
- };
-
- return {
- StackedBarsTrack: StackedBarsTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.css
deleted file mode 100644
index c42cee032d8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.css
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.thread-track {
- -webkit-box-orient: vertical;
- display: -webkit-box;
- position: relative;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.html
deleted file mode 100644
index ece278cee1a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track.html
+++ /dev/null
@@ -1,163 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="stylesheet" href="/tracing/ui/tracks/thread_track.css">
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/filter.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-<link rel="import" href="/tracing/ui/tracks/async_slice_group_track.html">
-<link rel="import" href="/tracing/ui/tracks/container_track.html">
-<link rel="import" href="/tracing/ui/tracks/sample_track.html">
-<link rel="import" href="/tracing/ui/tracks/slice_group_track.html">
-<link rel="import" href="/tracing/ui/tracks/slice_track.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * Visualizes a Thread using a series of SliceTracks.
- * @constructor
- */
- var ThreadTrack = tr.ui.b.define('thread-track',
- tr.ui.tracks.ContainerTrack);
- ThreadTrack.prototype = {
- __proto__: tr.ui.tracks.ContainerTrack.prototype,
-
- decorate: function(viewport) {
- tr.ui.tracks.ContainerTrack.prototype.decorate.call(this, viewport);
- Polymer.dom(this).classList.add('thread-track');
- },
-
- get thread() {
- return this.thread_;
- },
-
- set thread(thread) {
- this.thread_ = thread;
- this.updateContents_();
- },
-
- get hasVisibleContent() {
- return this.tracks_.length > 0;
- },
-
- get eventContainer() {
- return this.thread;
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- tr.ui.tracks.ContainerTrack.prototype.addContainersToTrackMap.apply(
- this, arguments);
- containerToTrackMap.addContainer(this.thread, this);
- },
-
- updateContents_: function() {
- this.detach();
-
- if (!this.thread_)
- return;
-
- this.heading = this.thread_.userFriendlyName + ': ';
- this.tooltip = this.thread_.userFriendlyDetails;
-
- if (this.thread_.asyncSliceGroup.length)
- this.appendAsyncSliceTracks_();
-
- this.appendThreadSamplesTracks_();
-
- if (this.thread_.timeSlices) {
- var timeSlicesTrack = new tr.ui.tracks.SliceTrack(this.viewport);
- timeSlicesTrack.heading = '';
- timeSlicesTrack.height = tr.ui.b.THIN_SLICE_HEIGHT + 'px';
- timeSlicesTrack.slices = this.thread_.timeSlices;
- if (timeSlicesTrack.hasVisibleContent)
- Polymer.dom(this).appendChild(timeSlicesTrack);
- }
-
- if (this.thread_.sliceGroup.length) {
- var track = new tr.ui.tracks.SliceGroupTrack(this.viewport);
- track.heading = this.thread_.userFriendlyName;
- track.tooltip = this.thread_.userFriendlyDetails;
- track.group = this.thread_.sliceGroup;
- if (track.hasVisibleContent)
- Polymer.dom(this).appendChild(track);
- }
- },
-
- appendAsyncSliceTracks_: function() {
- var subGroups = this.thread_.asyncSliceGroup.viewSubGroups;
- subGroups.forEach(function(subGroup) {
- var asyncTrack = new tr.ui.tracks.AsyncSliceGroupTrack(this.viewport);
- var title = subGroup.slices[0].viewSubGroupTitle;
- asyncTrack.group = subGroup;
- asyncTrack.heading = title;
- if (asyncTrack.hasVisibleContent)
- Polymer.dom(this).appendChild(asyncTrack);
- }, this);
- },
-
- appendThreadSamplesTracks_: function() {
- var threadSamples = this.thread_.samples;
- if (threadSamples === undefined || threadSamples.length === 0)
- return;
- var samplesByTitle = {};
- threadSamples.forEach(function(sample) {
- if (samplesByTitle[sample.title] === undefined)
- samplesByTitle[sample.title] = [];
- samplesByTitle[sample.title].push(sample);
- });
-
- var sampleTitles = tr.b.dictionaryKeys(samplesByTitle);
- sampleTitles.sort();
-
- sampleTitles.forEach(function(sampleTitle) {
- var samples = samplesByTitle[sampleTitle];
- var samplesTrack = new tr.ui.tracks.SampleTrack(this.viewport);
- samplesTrack.group = this.thread_;
- samplesTrack.samples = samples;
- samplesTrack.heading = this.thread_.userFriendlyName + ': ' +
- sampleTitle;
- samplesTrack.tooltip = this.thread_.userFriendlyDetails;
- samplesTrack.selectionGenerator = function() {
- var selection = new tr.model.EventSet();
- for (var i = 0; i < samplesTrack.samples.length; i++) {
- selection.push(samplesTrack.samples[i]);
- }
- return selection;
- };
- Polymer.dom(this).appendChild(samplesTrack);
- }, this);
- },
-
- collapsedDidChange: function(collapsed) {
- if (collapsed) {
- var h = parseInt(this.tracks[0].height);
- for (var i = 0; i < this.tracks.length; ++i) {
- if (h > 2) {
- this.tracks[i].height = Math.floor(h) + 'px';
- } else {
- this.tracks[i].style.display = 'none';
- }
- h = h * 0.5;
- }
- } else {
- for (var i = 0; i < this.tracks.length; ++i) {
- this.tracks[i].height = this.tracks[0].height;
- this.tracks[i].style.display = '';
- }
- }
- }
- };
-
- return {
- ThreadTrack: ThreadTrack
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track_test.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track_test.html
deleted file mode 100644
index ed658480fd4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/thread_track_test.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/model/instant_event.html">
-<link rel="import" href="/tracing/ui/base/dom_helpers.html">
-<link rel="import" href="/tracing/ui/timeline_track_view.html">
-<link rel="import" href="/tracing/ui/tracks/thread_track.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var HighlightInstantEvent = tr.model.ThreadHighlightInstantEvent;
- var Process = tr.model.Process;
- var EventSet = tr.model.EventSet;
- var StackFrame = tr.model.StackFrame;
- var Sample = tr.model.Sample;
- var Thread = tr.model.Thread;
- var ThreadSlice = tr.model.ThreadSlice;
- var ThreadTrack = tr.ui.tracks.ThreadTrack;
- var Viewport = tr.ui.TimelineViewport;
- var newAsyncSlice = tr.c.TestUtils.newAsyncSlice;
- var newAsyncSliceNamed = tr.c.TestUtils.newAsyncSliceNamed;
- var newSliceEx = tr.c.TestUtils.newSliceEx;
-
- test('selectionHitTestingWithThreadTrack', function() {
- var model = new tr.Model();
- var p1 = model.getOrCreateProcess(1);
- var t1 = p1.getOrCreateThread(1);
- t1.sliceGroup.pushSlice(new ThreadSlice('', 'a', 0, 1, {}, 4));
- t1.sliceGroup.pushSlice(new ThreadSlice('', 'b', 0, 5.1, {}, 4));
-
- var testEl = document.createElement('div');
- Polymer.dom(testEl).appendChild(
- tr.ui.b.createScopedStyle('heading { width: 100px; }'));
- testEl.style.width = '600px';
-
- var viewport = new Viewport(testEl);
- var drawingContainer = new tr.ui.tracks.DrawingContainer(viewport);
- Polymer.dom(testEl).appendChild(drawingContainer);
-
- var track = new ThreadTrack(viewport);
- Polymer.dom(drawingContainer).appendChild(track);
- drawingContainer.updateCanvasSizeIfNeeded_();
- track.thread = t1;
-
- var y = track.getBoundingClientRect().top;
- var h = track.getBoundingClientRect().height;
- var wW = 10;
- var vW = drawingContainer.canvas.getBoundingClientRect().width;
- var dt = new tr.ui.TimelineDisplayTransform();
- dt.xSetWorldBounds(0, wW, vW);
- track.viewport.setDisplayTransformImmediately(dt);
-
- var selection = new EventSet();
- var x = (1.5 / wW) * vW;
- track.addIntersectingEventsInRangeToSelection(
- x, x + 1, y, y + 1, selection);
- assert.isTrue(selection.equals(
- new EventSet([t1.sliceGroup.slices[0], t1.sliceGroup.slices[1]])));
-
- var selection = new EventSet();
- track.addIntersectingEventsInRangeToSelection(
- (1.5 / wW) * vW, (1.8 / wW) * vW,
- y, y + h, selection);
- assert.isTrue(selection.equals(
- new EventSet([t1.sliceGroup.slices[0], t1.sliceGroup.slices[1]])));
- });
-
- test('filterThreadSlices', function() {
- var model = new tr.Model();
- var thread = new Thread(new Process(model, 7), 1);
- thread.sliceGroup.pushSlice(newSliceEx(
- {title: 'a', start: 0, duration: 0}));
- thread.asyncSliceGroup.push(newAsyncSliceNamed('a', 0, 5, t, t));
-
- var t = new ThreadTrack(new tr.ui.TimelineViewport());
- t.thread = thread;
-
- assert.equal(t.tracks_.length, 2);
- assert.instanceOf(t.tracks_[0], tr.ui.tracks.AsyncSliceGroupTrack);
- assert.instanceOf(t.tracks_[1], tr.ui.tracks.SliceGroupTrack);
- });
-
- test('sampleThreadSlices', function() {
- var thread;
- var cpu;
- var model = tr.c.TestUtils.newModelWithEvents([], {
- shiftWorldToZero: false,
- pruneContainers: false,
- customizeModelCallback: function(model) {
- cpu = model.kernel.getOrCreateCpu(1);
- thread = model.getOrCreateProcess(1).getOrCreateThread(2);
-
- var fA = model.addStackFrame(new StackFrame(
- undefined, 1, 'cat', 'a', 7));
- var fAB = model.addStackFrame(new StackFrame(
- fA, 2, 'cat', 'b', 7));
- var fABC = model.addStackFrame(new StackFrame(
- fAB, 3, 'cat', 'c', 7));
- var fAD = model.addStackFrame(new StackFrame(
- fA, 4, 'cat', 'd', 7));
-
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 10, fABC, 10));
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 20, fAB, 10));
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 30, fAB, 10));
- model.samples.push(new Sample(undefined, thread, 'instructions_retired',
- 40, fAD, 10));
-
- model.samples.push(new Sample(undefined, thread, 'page_fault',
- 25, fAB, 10));
- model.samples.push(new Sample(undefined, thread, 'page_fault',
- 35, fAD, 10));
- }
- });
-
- var t = new ThreadTrack(new tr.ui.TimelineViewport());
- t.thread = thread;
- assert.equal(t.tracks_.length, 2);
-
- // Instructions retired
- var t0 = t.tracks_[0];
- assert.notEqual(t0.heading.indexOf('instructions_retired'), -1);
- assert.instanceOf(t0, tr.ui.tracks.SampleTrack);
- assert.equal(t0.samples.length, 4);
- t0.samples.forEach(function(s) {
- assert.instanceOf(s, tr.model.Sample);
- });
-
- // page_fault
- var t1 = t.tracks_[1];
- assert.notEqual(t1.heading.indexOf('page_fault'), -1);
- assert.instanceOf(t1, tr.ui.tracks.SampleTrack);
- assert.equal(t1.samples.length, 2);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/track.css b/chromium/third_party/catapult/tracing/tracing/ui/tracks/track.css
deleted file mode 100644
index 3d56eef5b8d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/track.css
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-.track-button {
- background-color: rgba(255, 255, 255, 0.5);
- border: 1px solid rgba(0, 0, 0, 0.1);
- color: rgba(0,0,0,0.2);
- font-size: 10px;
- height: 12px;
- text-align: center;
- width: 12px;
-}
-
-.track-button:hover {
- background-color: rgba(255, 255, 255, 1.0);
- border: 1px solid rgba(0, 0, 0, 0.5);
- box-shadow: 0 0 .05em rgba(0, 0, 0, 0.4);
- color: rgba(0, 0, 0, 1);
-}
-
-.track-close-button {
- left: 2px;
- position: absolute;
- top: 2px;
-}
-
-.track-collapse-button {
- left: 3px;
- position: absolute;
- top: 2px;
-}
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/tracks/track.html b/chromium/third_party/catapult/tracing/tracing/ui/tracks/track.html
deleted file mode 100644
index 4b151ebf8f5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/tracks/track.html
+++ /dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="stylesheet" href="/tracing/ui/tracks/track.css">
-
-<link rel="import" href="/tracing/ui/base/container_that_decorates_its_children.html">
-<link rel="import" href="/tracing/ui/base/ui.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.ui.tracks', function() {
- /**
- * The base class for all tracks, which render data into a provided div.
- * @constructor
- */
- var Track = tr.ui.b.define('track',
- tr.ui.b.ContainerThatDecoratesItsChildren);
- Track.prototype = {
- __proto__: tr.ui.b.ContainerThatDecoratesItsChildren.prototype,
-
- decorate: function(viewport) {
- tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);
- if (viewport === undefined)
- throw new Error('viewport is required when creating a Track.');
-
- this.viewport_ = viewport;
- Polymer.dom(this).classList.add('track');
- },
-
- get viewport() {
- return this.viewport_;
- },
-
- get drawingContainer() {
- var cur = this;
- while (cur) {
- if (cur instanceof tr.ui.tracks.DrawingContainer)
- return cur;
- cur = cur.parentElement;
- }
- return undefined;
- },
-
- get eventContainer() {
- },
-
- invalidateDrawingContainer: function() {
- var dc = this.drawingContainer;
- if (dc)
- dc.invalidate();
- },
-
- context: function() {
- // This is a little weird here, but we have to be able to walk up the
- // parent tree to get the context.
- if (!Polymer.dom(this).parentNode)
- return undefined;
- if (!Polymer.dom(this).parentNode.context)
- throw new Error('Parent container does not support context() method.');
- return Polymer.dom(this).parentNode.context();
- },
-
- decorateChild_: function(childTrack) {
- },
-
- undecorateChild_: function(childTrack) {
- if (childTrack.detach)
- childTrack.detach();
- },
-
- updateContents_: function() {
- },
-
- /**
- * Wrapper function around draw() that performs transformations on the
- * context necessary for the track's contents to be drawn in the right place
- * given the current pan and zoom.
- */
- drawTrack: function(type) {
- var ctx = this.context();
-
- var pixelRatio = window.devicePixelRatio || 1;
- var bounds = this.getBoundingClientRect();
- var canvasBounds = ctx.canvas.getBoundingClientRect();
-
- ctx.save();
- ctx.translate(0, pixelRatio * (bounds.top - canvasBounds.top));
-
- var dt = this.viewport.currentDisplayTransform;
- var viewLWorld = dt.xViewToWorld(0);
- var viewRWorld = dt.xViewToWorld(bounds.width * pixelRatio);
-
- this.draw(type, viewLWorld, viewRWorld);
- ctx.restore();
- },
-
- draw: function(type, viewLWorld, viewRWorld) {
- },
-
- addEventsToTrackMap: function(eventToTrackMap) {
- },
-
- addContainersToTrackMap: function(containerToTrackMap) {
- },
-
- addIntersectingEventsInRangeToSelection: function(
- loVX, hiVX, loVY, hiVY, selection) {
-
- var pixelRatio = window.devicePixelRatio || 1;
- var dt = this.viewport.currentDisplayTransform;
- var viewPixWidthWorld = dt.xViewVectorToWorld(1);
- var loWX = dt.xViewToWorld(loVX * pixelRatio);
- var hiWX = dt.xViewToWorld(hiVX * pixelRatio);
-
- var clientRect = this.getBoundingClientRect();
- var a = Math.max(loVY, clientRect.top);
- var b = Math.min(hiVY, clientRect.bottom);
- if (a > b)
- return;
-
- this.addIntersectingEventsInRangeToSelectionInWorldSpace(
- loWX, hiWX, viewPixWidthWorld, selection);
- },
-
- addIntersectingEventsInRangeToSelectionInWorldSpace: function(
- loWX, hiWX, viewPixWidthWorld, selection) {
- },
-
- /**
- * Gets implemented by supporting track types. The method adds the event
- * closest to worldX to the selection.
- *
- * @param {number} worldX The position that is looked for.
- * @param {number} worldMaxDist The maximum distance allowed from worldX to
- * the event.
- * @param {number} loY Lower Y bound of the search interval in view space.
- * @param {number} hiY Upper Y bound of the search interval in view space.
- * @param {Selection} selection Selection to which to add hits.
- */
- addClosestEventToSelection: function(
- worldX, worldMaxDist, loY, hiY, selection) {
- },
-
- addClosestInstantEventToSelection: function(instantEvents, worldX,
- worldMaxDist, selection) {
- var instantEvent = tr.b.findClosestElementInSortedArray(
- instantEvents,
- function(x) { return x.start; },
- worldX,
- worldMaxDist);
-
- if (!instantEvent)
- return;
-
- selection.push(instantEvent);
- }
- };
-
- return {
- Track: Track
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state.html b/chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state.html
deleted file mode 100644
index b4704f25a47..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-
-<!--
-This element handles storing and retrieving the brushing state of arbitrary
-views (e.g. analysis sub-views). An element can use it by instantiating it and
-appending it to itself:
-
- <div id="some-view-with-specific-brushing-state">
- <tr-ui-b-view-specific-brushing-state view-id="unique-view-identifier">
- </tr-ui-b-view-specific-brushing-state>
- ... other child elements ...
- </div>
-
-The state can then be retrieved from and pushed to the state element as
-follows:
-
- newStateElement.set(state);
- state = newStateElement.get();
-
-Under the hood, the state element searches the DOM tree for an ancestor element
-with a brushingStateController field to persist the state (see the
-tr.c.BrushingStateController and tr.ui.b.BrushingState classes for more
-details).
--->
-<dom-module id='tr-ui-b-view-specific-brushing-state'>
- <template></template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-ui-b-view-specific-brushing-state',
-
- /** Compulsory unique identifier of the associated view. */
- get viewId() {
- return this.getAttribute('view-id');
- },
-
- set viewId(viewId) {
- Polymer.dom(this).setAttribute('view-id', viewId);
- },
-
- /**
- * Retrieve the persisted state of the associated view. The returned object
- * (or any of its fields) must not be modified by the caller (unless the
- * object/field is treated as a reference).
- *
- * If no state has been persisted yet or there is no ancestor element with
- * a brushingStateController field, this method returns undefined.
- */
- get: function() {
- var viewId = this.viewId;
- if (!viewId)
- throw new Error('Element must have a view-id attribute!');
-
- var brushingStateController =
- tr.c.BrushingStateController.getControllerForElement(this);
- if (!brushingStateController)
- return undefined;
-
- return brushingStateController.getViewSpecificBrushingState(viewId);
- },
-
- /**
- * Persist the provided state of the associated view. The provided object
- * (or any of its fields) must not be modified afterwards (unless the
- * object/field is treated as a reference).
- *
- * If there is no ancestor element with a brushingStateController field,
- * this method does nothing.
- */
- set: function(state) {
- var viewId = this.viewId;
- if (!viewId)
- throw new Error('Element must have a view-id attribute!');
-
- var brushingStateController =
- tr.c.BrushingStateController.getControllerForElement(this);
- if (!brushingStateController)
- return;
-
- brushingStateController.changeViewSpecificBrushingState(viewId, state);
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state_test.html b/chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state_test.html
deleted file mode 100644
index aff2cc5a473..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/ui/view_specific_brushing_state_test.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-<link rel="import" href="/tracing/ui/view_specific_brushing_state.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var BrushingStateController = tr.c.BrushingStateController;
-
- function setStateElement(containerEl, viewId) {
- var stateElement = document.createElement(
- 'tr-ui-b-view-specific-brushing-state');
- stateElement.viewId = viewId;
- Polymer.dom(containerEl).appendChild(stateElement);
- return stateElement;
- }
-
- function addChildDiv(element) {
- var child = element.ownerDocument.createElement('div');
- Polymer.dom(element).appendChild(child);
- return child;
- }
-
- function addShadowChildDiv(element) {
- var shadowRoot = element.createShadowRoot();
- return addChildDiv(shadowRoot);
- }
-
- test('instantiate_withoutBrushingStateController', function() {
- var containerEl = document.createElement('div');
-
- var stateElement1 = setStateElement(containerEl, 'test-view');
- assert.isUndefined(stateElement1.get());
- stateElement1.set({e: 2.71828});
- assert.isUndefined(stateElement1.get());
- });
-
- test('instantiate_withBrushingStateController', function() {
- var rootEl = document.createElement('div');
- var containerEl = addChildDiv(addShadowChildDiv(addChildDiv(rootEl)));
- rootEl.brushingStateController = new BrushingStateController(undefined);
-
- var stateElement1 = setStateElement(containerEl, 'test-view');
- assert.isUndefined(stateElement1.get());
- stateElement1.set({e: 2.71828});
- assert.deepEqual(stateElement1.get(), {e: 2.71828});
-
- var stateElement2 = setStateElement(containerEl, 'test-view-2');
- assert.isUndefined(stateElement2.get());
- stateElement2.set({pi: 3.14159});
- assert.deepEqual(stateElement2.get(), {pi: 3.14159});
-
- var stateElement3 = setStateElement(containerEl, 'test-view');
- assert.deepEqual(stateElement3.get(), {e: 2.71828});
-
- var stateElement4 = setStateElement(containerEl, 'test-view-2');
- assert.deepEqual(stateElement4.get(), {pi: 3.14159});
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/breakdown.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/breakdown.html
deleted file mode 100644
index ed3a7f4e8b3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/breakdown.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/related_value_map.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class Breakdown extends tr.v.d.Diagnostic {
- constructor() {
- super();
- this.values_ = new Map();
- this.colorScheme = undefined;
- }
-
- /**
- * Add a Value by an explicit name to this map.
- *
- * @param {string} name
- * @param {number} value
- */
- set(name, value) {
- if (typeof name !== 'string' ||
- typeof value !== 'number') {
- throw new Error('Breakdown maps from strings to numbers');
- }
- this.values_.set(name, value);
- }
-
- /**
- * @param {string} name
- * @return {number}
- */
- get(name) {
- return this.values_.get(name) || 0;
- }
-
- *[Symbol.iterator]() {
- for (var pair of this.values_)
- yield pair;
- }
-
- asDictInto_(d) {
- d.values = {};
- for (var [name, value] of this) {
- if (isNaN(value)) {
- value = 'NaN';
- } else if (value === Infinity) {
- value = 'Infinity';
- } else if (value === -Infinity) {
- value = '-Infinity';
- }
- d.values[name] = value;
- }
- if (this.colorScheme) {
- d.colorScheme = this.colorScheme;
- }
- }
-
- static fromDict(d) {
- var breakdown = new Breakdown();
- tr.b.iterItems(d.values, (name, value) => {
- if (typeof(value) === 'string') {
- if (value === '-Infinity') {
- value = -Infinity;
- } else if (value === 'Infinity') {
- value = Infinity;
- } else if (value === 'NaN') {
- value = NaN;
- }
- } else if (value === null) {
- value = NaN;
- }
- breakdown.set(name, value);
- });
- if (d.colorScheme) {
- breakdown.colorScheme = d.colorScheme;
- }
- return breakdown;
- }
- }
-
- tr.v.d.Diagnostic.register(Breakdown, {
- elementName: 'tr-v-ui-breakdown-span'
- });
-
- return {
- Breakdown: Breakdown
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic.html
deleted file mode 100644
index b111453fed4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/extension_registry.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class Diagnostic {
- asDict() {
- var result = {type: this.constructor.name};
- this.asDictInto_(result);
- return result;
- }
-
- asDictInto_(d) {
- throw new Error('Abstract virtual method');
- }
-
- static fromDict(d) {
- var typeInfo = Diagnostic.findTypeInfoWithName(d.type);
- if (!typeInfo)
- throw new Error('Unrecognized diagnostic type: ' + d.type);
-
- return typeInfo.constructor.fromDict(d);
- }
- }
-
- var options = new tr.b.ExtensionRegistryOptions(tr.b.BASIC_REGISTRY_MODE);
- options.defaultMetadata = {};
- options.mandatoryBaseClass = Diagnostic;
- tr.b.decorateExtensionRegistry(Diagnostic, options);
-
- Diagnostic.addEventListener('will-register', function(e) {
- var constructor = e.typeInfo.constructor;
- if (!(constructor.fromDict instanceof Function) ||
- (constructor.fromDict === Diagnostic.fromDict) ||
- (constructor.fromDict.length !== 1)) {
- throw new Error('Diagnostics must define fromDict(d)');
- }
- });
-
- return {
- Diagnostic: Diagnostic
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map.html
deleted file mode 100644
index e0afe91d668..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<!--
- Include all Diagnostic subclasses here so that DiagnosticMap.addDicts() and
- DiagnosticMap.fromDict() always have access to all subclasses in the
- Diagnostic registry.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/breakdown.html">
-<link rel="import" href="/tracing/value/diagnostics/generic.html">
-<link rel="import" href="/tracing/value/diagnostics/iteration_info.html">
-<link rel="import" href="/tracing/value/diagnostics/related_event_set.html">
-<link rel="import" href="/tracing/value/diagnostics/related_histogram_breakdown.html">
-<link rel="import" href="/tracing/value/diagnostics/related_value_map.html">
-<link rel="import" href="/tracing/value/diagnostics/related_value_set.html">
-<link rel="import" href="/tracing/value/diagnostics/scalar.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class DiagnosticMap extends Map {
- /**
- * Add a new Diagnostic to this map.
- *
- * @param {string} name
- * @param {!tr.v.d.Diagnostic} diagnostic
- */
- set(name, diagnostic) {
- if (typeof(name) !== 'string')
- throw new Error('name must be string, not ' + name);
-
- if (!(diagnostic instanceof tr.v.d.Diagnostic))
- throw new Error('Must be instanceof Diagnostic: ' + diagnostic);
-
- Map.prototype.set.call(this, name, diagnostic);
- }
-
- /**
- * Add Diagnostics from a dictionary of dictionaries.
- *
- * @param {Object} dict
- */
- addDicts(dict) {
- tr.b.iterItems(dict, function(name, diagnosticDict) {
- this.set(name, tr.v.d.Diagnostic.fromDict(diagnosticDict));
- }, this);
- }
-
- asDict() {
- var dict = {};
- for (var [name, diagnostic] of this) {
- dict[name] = diagnostic.asDict();
- }
- return dict;
- }
-
- static fromDict(d) {
- var diagnostics = new DiagnosticMap();
- diagnostics.addDicts(d);
- return diagnostics;
- }
-
- static fromObject(obj) {
- var diagnostics = new DiagnosticMap();
- tr.b.iterItems(obj, function(name, diagnostic) {
- diagnostics.set(name, diagnostic);
- });
- return diagnostics;
- }
- }
-
- return {
- DiagnosticMap: DiagnosticMap
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map_test.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map_test.html
deleted file mode 100644
index 8b7210e966f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/diagnostic_map_test.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('clone', function() {
- var diagnostics = new tr.v.d.DiagnosticMap();
- diagnostics.set('generic', new tr.v.d.Generic({a: ['b', 3]}));
- diagnostics.set('breakdown', new tr.v.d.Breakdown());
- diagnostics.set('events', new tr.v.d.RelatedEventSet());
- diagnostics.set('value set', new tr.v.d.RelatedValueSet());
- diagnostics.set('value map', new tr.v.d.RelatedValueMap());
- diagnostics.set('histogram breakdown',
- new tr.v.d.RelatedHistogramBreakdown());
-
- var clone = tr.v.d.DiagnosticMap.fromDict(diagnostics.asDict());
- assert.instanceOf(clone.get('generic'), tr.v.d.Generic);
- assert.deepEqual(clone.get('generic').value,
- diagnostics.get('generic').value);
- assert.instanceOf(clone.get('breakdown'), tr.v.d.Breakdown);
- assert.instanceOf(clone.get('events'), tr.v.d.RelatedEventSet);
- assert.instanceOf(clone.get('value set'), tr.v.d.RelatedValueSet);
- assert.instanceOf(clone.get('value map'), tr.v.d.RelatedValueMap);
- assert.instanceOf(clone.get('histogram breakdown'),
- tr.v.d.RelatedHistogramBreakdown);
- });
-
- test('requireFromDict', function() {
- class MissingFromDict extends tr.v.d.Diagnostic { }
- assert.throws(() => tr.v.d.Diagnostic.register(MissingFromDict));
-
- class InvalidFromDict extends tr.v.d.Diagnostic {
- static fromDict() {
- }
- }
- assert.throws(() => tr.v.d.Diagnostic.register(InvalidFromDict));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/event_ref.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/event_ref.html
deleted file mode 100644
index 3df5f311cfb..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/event_ref.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/guid.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- /**
- * Similar to ValueRef, this is a placeholder in case the referenced Event
- * isn't available in memory to point to directly.
- */
- class EventRef {
- /**
- * @param {!Object} event
- * @param {string} event.stableId
- * @param {string} event.title
- * @param {number} event.start
- * @param {number} event.duration
- */
- constructor(event) {
- this.stableId = event.stableId;
- this.title = event.title;
- this.start = event.start;
- this.duration = event.duration;
- this.end = this.start + this.duration;
-
- // tr.v.d.RelatedEventSet identifies events using stableId, but
- // tr.model.EventSet uses guid.
- this.guid = tr.b.GUID.allocateSimple();
- }
- }
-
- return {
- EventRef: EventRef
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/generic.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/generic.html
deleted file mode 100644
index fae4fdd3119..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/generic.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- /**
- * A Generic diagnostic can contain any Plain-Ol'-Data objects that can be
- * serialized using JSON.stringify(): null, boolean, number, string, array,
- * dict. Generic diagnostics cannot contain tr.v.Value objects!
- */
- class Generic extends tr.v.d.Diagnostic {
- /**
- * @param {*} value
- */
- constructor(value) {
- super();
- this.value = value;
- }
-
- asDictInto_(d) {
- d.value = this.value;
- }
-
- static fromDict(d) {
- return new Generic(d.value);
- }
- }
-
- tr.v.d.Diagnostic.register(Generic, {
- elementName: 'tr-v-ui-generic-diagnostic-span'
- });
-
- return {
- Generic: Generic
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/iteration_info.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/iteration_info.html
deleted file mode 100644
index 5ce2faf8f9d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/iteration_info.html
+++ /dev/null
@@ -1,209 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class IterationInfo extends tr.v.d.Diagnostic {
- constructor(opt_info) {
- super();
-
- this.benchmarkName_ = '';
- this.benchmarkStart_ = undefined;
- this.label_ = '';
- this.osVersion_ = '';
- this.productVersion_ = '';
- this.storyDisplayName_ = '';
- this.storyGroupingKeys_ = {};
- this.storyRepeatCounter_ = undefined;
- this.storyUrl_ = '';
- this.storysetRepeatCounter_ = undefined;
-
- if (opt_info)
- this.addInfo(opt_info);
- }
-
- /**
- * @param {!Object} info
- * @param {string} info.benchmarkName
- * @param {undefined|string} info.label
- * @param {undefined|!Object} info.storyGroupingKeys
- * @param {undefined|string} info.storyDisplayName
- * @param {undefined|string} info.storyUrl
- * @param {undefined|number} info.storyRepeatCounter
- * @param {number} info.storysetRepeatCounter
- * @param {number} info.benchmarkStartMs Milliseconds since Unix epoch.
- */
- addInfo(info) {
- // IterationInfo from Telemetry
- if (info.benchmarkName)
- this.benchmarkName_ = info.benchmarkName;
- if (info.benchmarkStartMs)
- this.benchmarkStart_ = new Date(info.benchmarkStartMs);
- if (info.label)
- this.label_ = info.label;
- if (info.storyDisplayName)
- this.storyDisplayName_ = info.storyDisplayName;
- if (info.storyGroupingKeys)
- this.storyGroupingKeys_ = info.storyGroupingKeys;
- if (info.storyRepeatCounter !== undefined)
- this.storyRepeatCounter_ = info.storyRepeatCounter;
- if (info.storyUrl)
- this.storyUrl_ = info.storyUrl;
- if (info.storysetRepeatCounter !== undefined)
- this.storysetRepeatCounter_ = info.storysetRepeatCounter;
-
- // From platform tracing metadata
- if (info['os-version'])
- this.osVersion_ = info['os-version'];
- if (info['product-version'])
- this.productVersion_ = info['product-version'];
- }
-
- addToValue(value) {
- value.diagnostics.set(IterationInfo.NAME, this);
- }
-
- /**
- * @param {!tr.v.Value} value
- * @return {(undefined|!tr.v.d.IterationInfo)}
- */
- static getFromValue(value) {
- return value.diagnostics.get(IterationInfo.NAME);
- }
-
- asDictInto_(d) {
- d.benchmarkName = this.benchmarkName;
- if (this.benchmarkStart)
- d.benchmarkStartMs = this.benchmarkStart.getTime();
- d.label = this.label;
- d.storyDisplayName = this.storyDisplayName;
- d.storyGroupingKeys = this.storyGroupingKeys;
- d.storyRepeatCounter = this.storyRepeatCounter;
- d.storyUrl = this.storyUrl;
- d.storysetRepeatCounter = this.storysetRepeatCounter;
- d['os-version'] = this.osVersion;
- d['product-version'] = this.productVersion;
- }
-
- static fromDict(d) {
- var info = new IterationInfo();
- info.addInfo(d);
- return info;
- }
-
- get displayLabel() {
- if (this.label)
- return this.label;
- return this.benchmarkName + ' ' + this.benchmarkStartString;
- }
-
- get osVersion() {
- return this.osVersion_;
- }
-
- get productVersion() {
- return this.productVersion_;
- }
-
- get benchmarkName() {
- return this.benchmarkName_;
- }
-
- get label() {
- return this.label_;
- }
-
- get storyGroupingKeys() {
- return this.storyGroupingKeys_;
- }
-
- get storyDisplayName() {
- return this.storyDisplayName_;
- }
-
- get storyUrl() {
- return this.storyUrl_;
- }
-
- get storyRepeatCounter() {
- return this.storyRepeatCounter_;
- }
-
- get storyRepeatCounterLabel() {
- return 'story repeat ' + this.storyRepeatCounter;
- }
-
- get storysetRepeatCounter() {
- return this.storysetRepeatCounter_;
- }
-
- get storysetRepeatCounterLabel() {
- return 'storyset repeat ' + this.storysetRepeatCounter;
- }
-
- get benchmarkStart() {
- return this.benchmarkStart_;
- }
-
- get benchmarkStartString() {
- if (this.benchmarkStart_ === undefined)
- return '';
- return tr.b.formatDate(this.benchmarkStart);
- }
-
- /**
- * @param {!tr.v.Value} value
- * @param {string} fieldName
- * @param {*} defaultValue
- * @return {*}
- */
- static getField(value, fieldName, defaultValue) {
- var iteration = tr.v.d.IterationInfo.getFromValue(value);
- if (!(iteration instanceof tr.v.d.IterationInfo) ||
- !iteration[fieldName]) {
- return defaultValue;
- }
- return iteration[fieldName];
- }
-
- /**
- * @param {!tr.v.Value} value
- * @param {string} storyGroupingKey
- * @return {string}
- */
- static getStoryGroupingKeyLabel(value, storyGroupingKey) {
- var iteration = tr.v.d.IterationInfo.getFromValue(value);
- if (!(iteration instanceof tr.v.d.IterationInfo))
- return storyGroupingKey + ': undefined';
- return storyGroupingKey + ': ' +
- iteration.storyGroupingKeys[storyGroupingKey];
- }
- }
-
- // Diagnostics generally do not need a constant name or getFromValue().
- // IterationInfo is a special kind of Diagnostic that is produced by
- // telemetry, which shepherds whole flocks of traces at once, and needs a
- // system to identify and find traces by these attributes.
-
- // Values produced by telemetry all have a single IterationInfo at this key in
- // their DiagnosticMap.
- IterationInfo.NAME = 'iteration';
-
- tr.v.d.Diagnostic.register(IterationInfo, {
- elementName: 'tr-v-ui-iteration-info-span'
- });
-
- return {
- IterationInfo: IterationInfo
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set.html
deleted file mode 100644
index c01ef300a5c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-<link rel="import" href="/tracing/value/diagnostics/event_ref.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- /**
- * @typedef {!(tr.v.d.EventRef|tr.model.Event)} EventLike
- */
-
- /**
- * A RelatedEventSet diagnostic contains references to Events
- */
- class RelatedEventSet extends tr.v.d.Diagnostic {
- /**
- * @param {!(tr.model.EventSet|Array.<EventLike>|EventLike)=} opt_events
- */
- constructor(opt_events) {
- super();
- this.eventsByStableId_ = new Map();
- if (opt_events) {
- if (opt_events instanceof tr.model.EventSet ||
- opt_events instanceof Array) {
- for (var event of opt_events)
- this.add(event);
- } else {
- this.add(opt_events);
- }
- }
- }
-
- /**
- * @param {!(tr.v.d.EventRef|tr.model.Event)} event
- */
- add(event) {
- this.eventsByStableId_.set(event.stableId, event);
- }
-
- /**
- * @param {!(tr.v.d.EventRef|tr.model.Event)} event
- * @return {boolean}
- */
- has(event) {
- return this.eventsByStableId_.has(event.stableId);
- }
-
- get length() {
- return this.eventsByStableId_.size;
- }
-
- *[Symbol.iterator]() {
- for (var [stableId, event] of this.eventsByStableId_)
- yield event;
- }
-
- /**
- * Resolve all EventRefs into Events by finding their stableIds in |model|.
- * If a stableId cannot be found and |opt_required| is true, then throw an
- * Error.
- * If a stableId cannot be found and |opt_required| is false, then the
- * EventRef will remain an EventRef.
- *
- * @param {!tr.model.Model} model
- * @param {boolean=} opt_required
- */
- resolve(model, opt_required) {
- for (var [stableId, event] of this.eventsByStableId_) {
- if (!(event instanceof tr.v.d.EventRef))
- continue;
-
- event = model.getEventByStableId(stableId);
- if (event instanceof tr.model.Event)
- this.eventsByStableId_.set(stableId, event);
- else if (opt_required)
- throw new Error('Unable to find Event ' + stableId);
- }
- }
-
- asDictInto_(d) {
- d.events = [];
- for (var event of this) {
- d.events.push({
- stableId: event.stableId,
- title: event.title,
- start: event.start,
- duration: event.duration
- });
- }
- }
-
- static fromDict(d) {
- return new RelatedEventSet(d.events.map(
- event => new tr.v.d.EventRef(event)));
- }
- }
-
- tr.v.d.Diagnostic.register(RelatedEventSet, {
- elementName: 'tr-v-ui-related-event-set-span'
- });
-
- return {
- RelatedEventSet: RelatedEventSet
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set_test.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set_test.html
deleted file mode 100644
index cc22d27ec1a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_event_set_test.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/value/diagnostics/related_event_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('eventSet', function() {
- var slice = undefined;
- var model = tr.c.TestUtils.newModel(function(model) {
- slice = tr.c.TestUtils.newSliceEx({
- type: tr.model.ThreadSlice,
- title: 'foo',
- start: 0,
- duration: 10
- });
- var thread = model.getOrCreateProcess(1).getOrCreateThread(2);
- thread.sliceGroup.pushSlice(slice);
- });
-
- var d = new tr.v.d.RelatedEventSet(slice);
- assert.strictEqual(tr.b.getOnlyElement([...d]), slice);
-
- d = new tr.v.d.RelatedEventSet([slice]);
- assert.strictEqual(tr.b.getOnlyElement([...d]), slice);
-
- d = new tr.v.d.RelatedEventSet(new tr.model.EventSet([slice]));
- assert.strictEqual(tr.b.getOnlyElement([...d]), slice);
-
- var d2 = tr.v.d.Diagnostic.fromDict(d.asDict());
- assert.instanceOf(d2, tr.v.d.RelatedEventSet);
-
- assert.instanceOf(tr.b.getOnlyElement([...d2]), tr.v.d.EventRef);
-
- d2.resolve(model, true);
-
- assert.strictEqual(tr.b.getOnlyElement([...d2]), slice);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown.html
deleted file mode 100644
index fedfb1275a1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/related_value_map.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- var COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER =
- 'ChromeUserFriendlyCategory';
-
- /**
- * RelatedHistogramBreakdown encapsulates an additive relationship between
- * Histograms: the Histogram that contains this RelatedHistogramBreakdown
- * diagnostic is composed of the Histograms referenced by this
- * RelatedHistogramBreakdown diagnostic. RelatedHistogramBreakdown is a
- * "breakdown" of its containing Histogram into its contained Histograms. This
- * additive relationship can apply to groups of other things besides Events,
- * such as memory allocations. RelatedHistogramBreakdowns over groups of
- * Events is expected to be the most common way of building
- * RelatedHistogramBreakdowns, though it is not the only way. See
- * buildFromEvents() for an example of how to build a
- * RelatedHistogramBreakdown from an EventSet and a grouping function.
- */
- class RelatedHistogramBreakdown extends tr.v.d.RelatedValueMap {
- constructor() {
- super();
- this.colorScheme = undefined;
- }
-
- /**
- * Add a Histogram by an explicit name to this map.
- *
- * @param {string} name
- * @param {!(tr.v.d.ValueRef|tr.v.Histogram)} value
- */
- set(name, value) {
- if (!(value instanceof tr.v.d.ValueRef)) {
- if (!(value instanceof tr.v.Histogram)) {
- throw new Error(
- 'RelatedHistogramBreakdown can only contain Histograms');
- }
-
- if (value.name.indexOf(name) !== (value.name.length - name.length)) {
- throw new Error(
- 'RelatedHistogramBreakdown name must be a suffix of value.name');
- }
-
- if ((this.length > 0) &&
- (value.unit !==
- tr.b.getFirstElement(this)[1].unit)) {
- throw new Error('Units mismatch', tr.b.getFirstElement(this)[1].unit,
- value.unit);
- }
- }
-
- tr.v.d.RelatedValueMap.prototype.set.call(this, name, value);
- }
-
- asDictInto_(d) {
- tr.v.d.RelatedValueMap.prototype.asDictInto_.call(this, d);
- if (this.colorScheme)
- d.colorScheme = this.colorScheme;
- }
-
- static fromDict(d) {
- var diagnostic = new RelatedHistogramBreakdown();
- tr.b.iterItems(d.values, function(name, guid) {
- diagnostic.set(name, new tr.v.d.ValueRef(guid));
- });
- if (d.colorScheme)
- diagnostic.colorScheme = d.colorScheme;
- return diagnostic;
- }
-
- /**
- * Build a RelatedHistogramBreakdown and its Histograms from |events|. Group
- * events using |categoryForEvent|. Add the Histograms to |values|.
- * Histograms' names are prefixed with |namePrefix|. Histograms are built
- * with |opt_binBoundaries|. The numeric sample for each Event is derived
- * from |opt_sampleForEvent|, which defaults to event.cpuSelfTime. The caller
- * must add the result RelatedHistogramBreakdown to their Histogram's
- * diagnostics.
- *
- * @param {!tr.v.ValueSet} values
- * @param {string} namePrefix
- * @param {!tr.model.EventSet} events
- * @param {!function(!tr.model.Event):string} categoryForEvent
- * @param {!tr.b.Unit} unit
- * @param {!function(!tr.model.Event):number=} opt_sampleForEvent
- * @param {!tr.v.HistogramBinBoundaries=} opt_binBoundaries
- * @param {*=} opt_this
- * @return {!RelatedHistogramBreakdown}
- */
- static buildFromEvents(values, namePrefix, events, categoryForEvent, unit,
- opt_sampleForEvent, opt_binBoundaries, opt_this) {
- var sampleForEvent = opt_sampleForEvent || ((event) => event.cpuSelfTime);
-
- var diagnostic = new RelatedHistogramBreakdown();
- for (var event of events) {
- var sample = sampleForEvent.call(opt_this, event);
- if (sample === undefined)
- continue;
-
- var eventCategory = categoryForEvent.call(opt_this, event);
- var value = diagnostic.get(eventCategory);
- if (value === undefined) {
- value = new tr.v.Histogram(
- namePrefix + eventCategory, unit, opt_binBoundaries);
- values.addHistogram(value);
- diagnostic.set(eventCategory, value);
- }
-
- value.addSample(sample,
- {relatedEvents: new tr.v.d.RelatedEventSet([event])});
- }
- return diagnostic;
- }
- }
-
- tr.v.d.Diagnostic.register(RelatedHistogramBreakdown, {
- elementName: 'tr-v-ui-breakdown-span'
- });
-
- return {
- COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER:
- COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER,
- RelatedHistogramBreakdown: RelatedHistogramBreakdown
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown_test.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown_test.html
deleted file mode 100644
index af6c4c3e318..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_histogram_breakdown_test.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/model/event_set.html">
-<link rel="import" href="/tracing/value/diagnostics/related_histogram_breakdown.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TEST_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 10, 10);
-
- test('build', function() {
- var values = new tr.v.ValueSet();
- var events = new tr.model.EventSet([
- {
- guid: 9,
- title: 'V8.Execute',
- cpuSelfTime: 1,
- stableId: '11.11'
- },
- {
- guid: 10,
- title: 'V8.Execute',
- cpuSelfTime: 2,
- stableId: '22.22'
- },
- {
- guid: 11,
- title: 'UpdateLayoutTree',
- cpuSelfTime: 3,
- stableId: '33.33'
- },
- {
- guid: 12,
- title: 'UpdateLayoutTree',
- cpuSelfTime: undefined,
- stableId: '44.44'
- }
- ]);
-
- var sampleForEvent = undefined;
- var diagnostic = tr.v.d.RelatedHistogramBreakdown.buildFromEvents(
- values, 'foo-', events,
- tr.e.chrome.ChromeUserFriendlyCategoryDriver.fromEvent,
- tr.b.Unit.byName.timeDurationInMs, sampleForEvent, TEST_BOUNDARIES);
-
- assert.lengthOf(diagnostic, 2);
- var scriptValue = values.getValuesNamed('foo-script_execute')[0];
- assert.instanceOf(scriptValue, tr.v.Histogram);
- assert.lengthOf(scriptValue.centralBins[1].diagnosticMaps, 1);
- assert.strictEqual(scriptValue, diagnostic.get('script_execute'));
- events = [...events];
- var relatedEvents = scriptValue.centralBins[1].diagnosticMaps[0]
- .get('relatedEvents');
- assert.lengthOf(relatedEvents, 1);
- assert.strictEqual(events[0], [...relatedEvents][0]);
- assert.lengthOf(scriptValue.centralBins[2].diagnosticMaps, 1);
- assert.lengthOf(
- scriptValue.centralBins[2].diagnosticMaps[0]
- .get('relatedEvents'), 1);
- assert.strictEqual(events[1],
- [...scriptValue.centralBins[2].diagnosticMaps[0]
- .get('relatedEvents')][0]);
-
- var styleValue = values.getValuesNamed('foo-style')[0];
- assert.instanceOf(styleValue, tr.v.Histogram);
- assert.lengthOf(styleValue.centralBins[3].diagnosticMaps, 1);
- relatedEvents = styleValue.centralBins[3].diagnosticMaps[0]
- .get('relatedEvents');
- assert.strictEqual(styleValue, diagnostic.get('style'));
- assert.lengthOf(relatedEvents, 1);
- assert.strictEqual(events[2], [...relatedEvents][0]);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_map.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_map.html
deleted file mode 100644
index 54f0aff9ea3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_map.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-<link rel="import" href="/tracing/value/diagnostics/value_ref.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class RelatedValueMap extends tr.v.d.Diagnostic {
- constructor() {
- super();
- this.valuesByName_ = new Map();
- }
-
- /**
- * Lookup a Histogram by name. Returns undefined if |name| is not found.
- *
- * @param {string} name
- * @return {!tr.v.d.ValueRef|!tr.v.Histogram|undefined}
- */
- get(name) {
- return this.valuesByName_.get(name);
- }
-
- /**
- * Add a Histogram by an explicit name to this map.
- *
- * @param {string} name
- * @param {!(tr.v.d.ValueRef|tr.v.Histogram)} value
- */
- set(name, value) {
- if (!(value instanceof tr.v.Histogram) &&
- !(value instanceof tr.v.d.ValueRef))
- throw new Error('Must be instanceof Histogram or ValueRef: ' + value);
-
- this.valuesByName_.set(name, value);
- }
-
- /**
- * Add a Histogram implicitly by its own name to this map.
- *
- * @param {!(tr.v.d.ValueRef|tr.v.Histogram)} value
- */
- add(value) {
- this.set(value.name, value);
- }
-
- get length() {
- return this.valuesByName_.size;
- }
-
- *[Symbol.iterator]() {
- for (var pair of this.valuesByName_)
- yield pair;
- }
-
- /**
- * Resolve all ValueRefs into Values by looking up their guids in
- * |valueSet|.
- * If a value cannot be found and |opt_required| is true, then throw an
- * Error.
- * If a value cannot be found and |opt_required| is false, then the ValueRef
- * will remain a ValueRef.
- *
- * @param {!tr.v.ValueSet} valueSet
- * @param {boolean=} opt_required
- */
- resolve(valueSet, opt_required) {
- for (var [name, value] of this) {
- if (!(value instanceof tr.v.d.ValueRef))
- continue;
-
- var guid = value.guid;
- value = valueSet.lookup(guid);
- if (value instanceof tr.v.Histogram)
- this.valuesByName_.set(name, value);
- else if (opt_required)
- throw new Error('Unable to find Histogram ' + guid);
- }
- }
-
- asDictInto_(d) {
- d.values = {};
- for (var [name, value] of this)
- d.values[name] = value.guid;
- }
-
- static fromDict(d) {
- var map = new RelatedValueMap();
- tr.b.iterItems(d.values, function(name, guid) {
- map.set(name, new tr.v.d.ValueRef(guid));
- });
- return map;
- }
- }
-
- tr.v.d.Diagnostic.register(RelatedValueMap, {
- elementName: 'tr-v-ui-related-value-map-span'
- });
-
- return {
- RelatedValueMap: RelatedValueMap
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_set.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_set.html
deleted file mode 100644
index 27dfa04f99f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/related_value_set.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-<link rel="import" href="/tracing/value/diagnostics/value_ref.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class RelatedValueSet extends tr.v.d.Diagnostic {
- constructor(opt_values) {
- super();
- this.valuesByGuid_ = new Map();
-
- if (opt_values)
- for (var value of opt_values)
- this.add(value);
- }
-
- /**
- * @param {!(tr.v.d.ValueRef|tr.v.Histogram)} v
- */
- add(value) {
- if (!(value instanceof tr.v.Histogram) &&
- !(value instanceof tr.v.d.ValueRef))
- throw new Error('Must be instanceof Histogram or ValueRef: ' + value);
-
- if (this.valuesByGuid_.get(value.guid))
- throw new Error('Tried to add same value twice');
-
- this.valuesByGuid_.set(value.guid, value);
- }
-
- has(value) {
- return this.valuesByGuid_.has(value.guid);
- }
-
- get length() {
- return this.valuesByGuid_.size;
- }
-
- *[Symbol.iterator]() {
- for (var [guid, value] of this.valuesByGuid_)
- yield value;
- }
-
- /**
- * Resolve all ValueRefs into Values by looking up their guids in
- * |valueSet|.
- * If a value cannot be found and |opt_required| is true, then throw an
- * Error.
- * If a value cannot be found and |opt_required| is false, then the ValueRef
- * will remain a ValueRef.
- *
- * @param {!tr.v.ValueSet} valueSet
- * @param {boolean=} opt_required
- */
- resolve(valueSet, opt_required) {
- for (var [guid, value] of this.valuesByGuid_) {
- if (!(value instanceof tr.v.d.ValueRef))
- continue;
-
- value = valueSet.lookup(guid);
- if (value instanceof tr.v.Histogram)
- this.valuesByGuid_.set(guid, value);
- else if (opt_required)
- throw new Error('Unable to find Histogram ' + guid);
- }
- }
-
- asDictInto_(d) {
- d.guids = [];
- for (var value of this)
- d.guids.push(value.guid);
- }
-
- static fromDict(d) {
- return new RelatedValueSet(d.guids.map(
- guid => new tr.v.d.ValueRef(guid)));
- }
- }
-
- tr.v.d.Diagnostic.register(RelatedValueSet, {
- elementName: 'tr-v-ui-related-value-set-span'
- });
-
- return {
- RelatedValueSet: RelatedValueSet,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/scalar.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/scalar.html
deleted file mode 100644
index e03688220a8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/scalar.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- class Scalar extends tr.v.d.Diagnostic {
- /**
- * @param {!tr.v.ScalarNumeric} value
- */
- constructor(value) {
- super();
- if (!(value instanceof tr.v.ScalarNumeric))
- throw new Error("expected ScalarNumeric");
- this.value = value;
- }
-
- asDictInto_(d) {
- d.value = this.value.asDict();
- }
-
- static fromDict(d) {
- return new Scalar(tr.v.ScalarNumeric.fromDict(d.value));
- }
- }
-
- tr.v.d.Diagnostic.register(Scalar, {
- elementName: 'tr-v-ui-scalar-diagnostic-span'
- });
-
- return {
- Scalar: Scalar
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/value_ref.html b/chromium/third_party/catapult/tracing/tracing/value/diagnostics/value_ref.html
deleted file mode 100644
index c2712d041a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/diagnostics/value_ref.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/base.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.d', function() {
- /** @constructor */
- function ValueRef(guid) {
- this.guid = guid;
- }
-
- return {
- ValueRef: ValueRef
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/generic_table.html b/chromium/third_party/catapult/tracing/tracing/value/generic_table.html
deleted file mode 100644
index 220510c8952..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/generic_table.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/base.html">
-<script>
-'use strict';
-
-tr.exportTo('tr.v', function() {
- /**
- * Tabular data wrapper. Simply wraps an array of items.
- */
- function GenericTable(items) {
- if (items !== undefined)
- this.items = items;
- else
- this.items = [];
- };
-
- GenericTable.prototype = {
- };
-
- return {
- GenericTable: GenericTable
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/histogram.html b/chromium/third_party/catapult/tracing/tracing/value/histogram.html
deleted file mode 100644
index 439658f6f2a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/histogram.html
+++ /dev/null
@@ -1,1002 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/running_statistics.html">
-<link rel="import" href="/tracing/base/sorted_array_utils.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v', function() {
- var MAX_DIAGNOSTIC_MAPS = 16;
-
- var DEFAULT_BOUNDARIES_FOR_UNIT = new Map();
-
- class HistogramBin {
- /**
- * @param {!tr.b.Range} range
- */
- constructor(range) {
- this.range = range;
- this.count = 0;
- this.diagnosticMaps = [];
- }
-
- /**
- * @param {*} value
- */
- addSample(value) {
- this.count += 1;
- }
-
- /**
- * @param {!tr.v.d.DiagnosticMap} diagnostics
- */
- addDiagnosticMap(diagnostics) {
- tr.b.Statistics.uniformlySampleStream(
- this.diagnosticMaps, this.count, diagnostics, MAX_DIAGNOSTIC_MAPS);
- }
-
- addBin(other) {
- if (!this.range.equals(other.range))
- throw new Error('Merging incompatible Histogram bins.');
- tr.b.Statistics.mergeSampledStreams(this.diagnosticMaps, this.count,
- other.diagnosticMaps, other.count, MAX_DIAGNOSTIC_MAPS);
- this.count += other.count;
- }
-
- fromDict(dict) {
- this.count = dict[0];
- if (dict.length > 1) {
- for (var map of dict[1]) {
- this.diagnosticMaps.push(tr.v.d.DiagnosticMap.fromDict(map));
- }
- }
- }
-
- asDict() {
- if (!this.diagnosticMaps.length) {
- return [this.count];
- }
- // It's more efficient to serialize these 2 fields in an array. If you
- // add any other fields, you should re-evaluate whether it would be more
- // efficient to serialize as a dict.
- return [this.count, this.diagnosticMaps.map(d => d.asDict())];
- }
- }
-
- var DEFAULT_SUMMARY_OPTIONS = new Map([
- ['avg', true],
- ['geometricMean', false],
- ['std', true],
- ['count', true],
- ['sum', true],
- ['min', true],
- ['max', true],
- ['nans', false],
- // Don't include 'percentile' here. Its default value is [], which is
- // modifiable. Callers may push to it, so there must be a different Array
- // instance for each Histogram instance.
- ]);
-
- /**
- * This is basically a histogram, but so much more.
- * Histogram is serializable using asDict/fromDict.
- * Histogram computes several statistics of its contents.
- * Histograms can be merged.
- * getDifferenceSignificance() test whether one Histogram is statistically
- * significantly different from another Histogram.
- * Histogram stores a random sample of the exact number values added to it.
- * Histogram stores a random sample of optional per-sample DiagnosticMaps.
- * Histogram is visualized by <tr-v-ui-histogram-span>, which supports
- * selecting bins, and visualizing the DiagnosticMaps of selected bins.
- *
- * @param {!tr.b.Unit} unit
- * @param {!tr.v.HistogramBinBoundaries=} opt_binBoundaries
- */
- class Histogram {
- constructor(name, unit, opt_binBoundaries) {
- var binBoundaries = opt_binBoundaries;
- if (!binBoundaries) {
- var baseUnit = unit.baseUnit ? unit.baseUnit : unit;
- binBoundaries = DEFAULT_BOUNDARIES_FOR_UNIT.get(baseUnit.unitName);
- }
-
- // If this Histogram is being deserialized, then its guid will be set by
- // fromDict().
- // If this Histogram is being computed by a metric, then its guid will be
- // allocated the first time the guid is gotten by asDict().
- this.guid_ = undefined;
-
- // Serialize binBoundaries here instead of holding a reference to it in
- // case it is modified.
- this.binBoundariesDict_ = binBoundaries.asDict();
-
- this.centralBins = [];
- this.description = '';
- this.diagnostics = new tr.v.d.DiagnosticMap();
- this.maxCount_ = 0;
- this.name_ = name;
- this.nanDiagnosticMaps = [];
- this.numNans = 0;
- this.running = new tr.b.RunningStatistics();
- this.sampleValues_ = [];
- this.shortName = undefined;
- this.summaryOptions = new Map(DEFAULT_SUMMARY_OPTIONS);
- this.summaryOptions.set('percentile', []);
- this.unit = unit;
-
- this.underflowBin = new HistogramBin(tr.b.Range.fromExplicitRange(
- -Number.MAX_VALUE, binBoundaries.range.min));
- this.overflowBin = new HistogramBin(tr.b.Range.fromExplicitRange(
- binBoundaries.range.max, Number.MAX_VALUE));
-
- for (var range of binBoundaries.binRanges()) {
- this.centralBins.push(new HistogramBin(range));
- }
-
- this.allBins = [this.underflowBin];
- for (var bin of this.centralBins)
- this.allBins.push(bin);
- this.allBins.push(this.overflowBin);
-
- this.maxNumSampleValues_ = this.defaultMaxNumSampleValues_;
- }
-
- get maxNumSampleValues() {
- return this.maxNumSampleValues_;
- }
-
- set maxNumSampleValues(n) {
- this.maxNumSampleValues_ = n;
- tr.b.Statistics.uniformlySampleArray(
- this.sampleValues_, this.maxNumSampleValues_);
- }
-
- get name() {
- return this.name_;
- }
-
- get guid() {
- if (this.guid_ === undefined)
- this.guid_ = tr.b.GUID.allocateUUID4();
-
- return this.guid_;
- }
-
- set guid(guid) {
- if (this.guid_ !== undefined)
- throw new Error('Cannot reset guid');
-
- this.guid_ = guid;
- }
-
- static fromDict(dict) {
- var hist = new Histogram(dict.name,
- tr.b.Unit.fromJSON(dict.unit),
- HistogramBinBoundaries.fromDict(
- dict.binBoundaries));
- hist.guid = dict.guid;
- if (dict.shortName) {
- hist.shortName = dict.shortName;
- }
- if (dict.description) {
- hist.description = dict.description;
- }
- if (dict.diagnostics) {
- hist.diagnostics.addDicts(dict.diagnostics);
- }
- if (dict.underflowBin) {
- hist.underflowBin.fromDict(dict.underflowBin);
- }
- if (dict.overflowBin) {
- hist.overflowBin.fromDict(dict.overflowBin);
- }
- if (dict.centralBins) {
- if (dict.centralBins.length !== undefined) {
- for (var i = 0; i < dict.centralBins.length; ++i) {
- hist.centralBins[i].fromDict(dict.centralBins[i]);
- }
- } else {
- tr.b.iterItems(dict.centralBins, (i, binDict) => {
- hist.centralBins[i].fromDict(binDict);
- });
- }
- }
- for (var bin of hist.allBins) {
- hist.maxCount_ = Math.max(hist.maxCount_, bin.count);
- }
- if (dict.running) {
- hist.running = tr.b.RunningStatistics.fromDict(dict.running);
- }
- if (dict.summaryOptions) {
- hist.customizeSummaryOptions(dict.summaryOptions);
- }
- if (dict.maxNumSampleValues !== undefined) {
- hist.maxNumSampleValues = dict.maxNumSampleValues;
- }
- if (dict.sampleValues) {
- hist.sampleValues_ = dict.sampleValues;
- }
- if (dict.numNans) {
- hist.numNans = dict.numNans;
- }
- if (dict.nanDiagnostics) {
- for (var map of dict.nanDiagnostics) {
- hist.nanDiagnosticMaps.push(tr.v.d.DiagnosticMap.fromDict(map));
- }
- }
- return hist;
- }
-
- /**
- * Build a Histogram from a set of samples in order to effectively merge a
- * set of ScalarNumerics.
- * The range of the resulting histogram is determined by the smallest and
- * largest sample value, which is unpredictable.
- * https://github.com/catapult-project/catapult/issues/2685
- *
- * @param {!tr.b.Unit} unit
- * @param {!Array.<number>} samples
- * @return {!Histogram}
- */
- static buildFromSamples(unit, samples) {
- var boundaries = HistogramBinBoundaries.createFromSamples(samples);
- var result = new Histogram(unit, boundaries);
- result.maxNumSampleValues = 1000;
-
- // TODO(eakuefner): Propagate diagnosticMaps?
- for (var sample of samples)
- result.addSample(sample);
-
- return result;
- }
-
- get numValues() {
- return tr.b.Statistics.sum(this.allBins, function(e) {
- return e.count;
- });
- }
-
- get average() {
- return this.running.mean;
- }
-
- get standardDeviation() {
- return this.running.stddev;
- }
-
- get geometricMean() {
- return this.running.geometricMean;
- }
-
- get sum() {
- return this.running.sum;
- }
-
- get maxCount() {
- return this.maxCount_;
- }
-
- /**
- * Requires that units agree.
- * Returns DONT_CARE if that is the units' improvementDirection.
- * Returns SIGNIFICANT if the Mann-Whitney U test returns a
- * p-value less than opt_alpha or DEFAULT_ALPHA. Returns INSIGNIFICANT if
- * the p-value is greater than alpha.
- *
- * @param {!tr.v.Histogram} other
- * @param {number=} opt_alpha
- * @return {!tr.b.Statistics.Significance}
- */
- getDifferenceSignificance(other, opt_alpha) {
- if (this.unit !== other.unit)
- throw new Error('Cannot compare Numerics with different units');
-
- if (this.unit.improvementDirection ===
- tr.b.ImprovementDirection.DONT_CARE) {
- return tr.b.Statistics.Significance.DONT_CARE;
- }
-
- if (!(other instanceof Histogram))
- throw new Error('Unable to compute a p-value');
-
- var testResult = tr.b.Statistics.mwu(
- this.sampleValues, other.sampleValues, opt_alpha);
- return testResult.significance;
- }
-
- /*
- * Compute an approximation of percentile based on the counts in the bins.
- * If the real percentile lies within |this.range| then the result of
- * the function will deviate from the real percentile by at most
- * the maximum width of the bin(s) within which the point(s)
- * from which the real percentile would be calculated lie.
- * If the real percentile is outside |this.range| then the function
- * returns the closest range limit: |this.range.min| or |this.range.max|.
- *
- * @param {number} percent The percent must be between 0.0 and 1.0.
- */
- getApproximatePercentile(percent) {
- if (!(percent >= 0 && percent <= 1))
- throw new Error('percent must be [0,1]');
- if (this.numValues === 0)
- return 0;
- var valuesToSkip = Math.floor((this.numValues - 1) * percent);
- for (var i = 0; i < this.allBins.length; i++) {
- var bin = this.allBins[i];
- valuesToSkip -= bin.count;
- if (valuesToSkip < 0) {
- if (bin === this.underflowBin)
- return bin.range.max;
- else if (bin === this.overflowBin)
- return bin.range.min;
- else
- return bin.range.center;
- }
- }
- throw new Error('Unreachable');
- }
-
- getBinForValue(value) {
- // Don't use subtraction to avoid arithmetic overflow.
- var binIndex = tr.b.findHighIndexInSortedArray(
- this.allBins, b => value < b.range.max ? -1 : 1);
- return this.allBins[binIndex] || this.overflowBin;
- }
-
- /**
- * @param {number|*} value
- * @param {(!Object|!tr.v.d.DiagnosticMap)=} opt_diagnostics
- */
- addSample(value, opt_diagnostics) {
- if (opt_diagnostics &&
- !(opt_diagnostics instanceof tr.v.d.DiagnosticMap))
- opt_diagnostics = tr.v.d.DiagnosticMap.fromObject(opt_diagnostics);
-
- if (typeof(value) !== 'number' || isNaN(value)) {
- this.numNans++;
- if (opt_diagnostics) {
- tr.b.Statistics.uniformlySampleStream(this.nanDiagnosticMaps,
- this.numNans, opt_diagnostics, MAX_DIAGNOSTIC_MAPS);
- }
- } else {
- this.running.add(value);
-
- var bin = this.getBinForValue(value);
- bin.addSample(value);
- if (opt_diagnostics)
- bin.addDiagnosticMap(opt_diagnostics);
- if (bin.count > this.maxCount_)
- this.maxCount_ = bin.count;
- }
-
- tr.b.Statistics.uniformlySampleStream(this.sampleValues_,
- this.numValues + this.numNans, value, this.maxNumSampleValues);
- }
-
- sampleValuesInto(samples) {
- for (var sampleValue of this.sampleValues)
- samples.push(sampleValue);
- }
-
- /**
- * Return true if this Histogram can be added to |other|.
- *
- * @param {!tr.v.Histogram} other
- * @return {boolean}
- */
- canAddHistogram(other) {
- if (this.unit !== other.unit)
- return false;
- if (this.allBins.length !== other.allBins.length)
- return false;
-
- for (var i = 0; i < this.allBins.length; ++i)
- if (!this.allBins[i].range.equals(other.allBins[i].range))
- return false;
-
- return true;
- }
-
- /**
- * Add |other| to this Histogram in-place if they can be added.
- *
- * @param {!tr.v.Histogram} other
- */
- addHistogram(other) {
- if (!this.canAddHistogram(other)) {
- throw new Error('Merging incompatible Histograms');
- }
-
- tr.b.Statistics.mergeSampledStreams(this.nanDiagnosticMaps, this.numNans,
- other.nanDiagnosticMaps, other.numNans, MAX_DIAGNOSTIC_MAPS);
- tr.b.Statistics.mergeSampledStreams(
- this.sampleValues, this.numValues,
- other.sampleValues, other.numValues, tr.b.Statistics.mean(
- [this.maxNumSampleValues, other.maxNumSampleValues]));
- this.numNans += other.numNans;
- this.running = this.running.merge(other.running);
- for (var i = 0; i < this.allBins.length; ++i) {
- this.allBins[i].addBin(other.allBins[i]);
- }
- }
-
- /**
- * Controls which statistics are exported to dashboard for this numeric.
- * The |summaryOptions| parameter is a dictionary with optional boolean
- * fields |count|, |sum|, |avg|, |std|, |min|, |max| and an optional
- * array field |percentile|.
- * Each percentile should be a number between 0.0 and 1.0.
- * The options not included in the |summaryOptions| will not change.
- */
- customizeSummaryOptions(summaryOptions) {
- tr.b.iterItems(summaryOptions, (key, value) =>
- this.summaryOptions.set(key, value));
- }
-
- /**
- * Returns a Map {statisticName: ScalarNumeric}.
- *
- * Each enabled summary option produces the corresponding value:
- * min, max, count, sum, avg, or std.
- * Each percentile 0.x produces pct_0x0.
- * Each percentile 0.xx produces pct_0xx.
- * Each percentile 0.xxy produces pct_0xx_y.
- * Percentile 1.0 produces pct_100.
- *
- * @return {!Map.<string, ScalarNumeric>}
- */
- get statisticsScalars() {
- function statNameToKey(stat) {
- switch (stat) {
- case 'std':
- return 'stddev';
- case 'avg':
- return 'mean';
- }
- return stat;
- }
- /**
- * Converts the given percent to a string in the format specified above.
- * @param {number} percent The percent must be between 0.0 and 1.0.
- */
- function percentToString(percent) {
- if (percent < 0 || percent > 1)
- throw new Error('Percent must be between 0.0 and 1.0');
- switch (percent) {
- case 0:
- return '000';
- case 1:
- return '100';
- }
- var str = percent.toString();
- if (str[1] !== '.')
- throw new Error('Unexpected percent');
- // Pad short strings with zeros.
- str = str + '0'.repeat(Math.max(4 - str.length, 0));
- if (str.length > 4)
- str = str.slice(0, 4) + '_' + str.slice(4);
- return '0' + str.slice(2);
- }
-
- var results = new Map();
- for (var [stat, option] of this.summaryOptions) {
- if (!option) {
- continue;
- }
-
- if (stat === 'percentile') {
- for (var percent of option) {
- var percentile = this.getApproximatePercentile(percent);
- results.set('pct_' + percentToString(percent),
- new tr.v.ScalarNumeric(this.unit, percentile));
- }
- } else if (stat === 'nans') {
- results.set('nans', new tr.v.ScalarNumeric(
- tr.b.Unit.byName.count_smallerIsBetter, this.numNans));
- } else {
- var statUnit = stat === 'count' ?
- tr.b.Unit.byName.count_smallerIsBetter : this.unit;
- var key = statNameToKey(stat);
- var statValue = this.running[key];
-
- if (typeof(statValue) === 'number') {
- results.set(stat, new tr.v.ScalarNumeric(statUnit, statValue));
- }
- }
- }
- return results;
- }
-
- get sampleValues() {
- return this.sampleValues_;
- }
-
- /**
- * Create a new Histogram object that is exactly the same as this one, with
- * this Histogram's name, unit, and binBoundaries, guid, bin counts, and
- * diagnostics.
- * @return {!tr.v.Histogram}
- */
- clone() {
- return Histogram.fromDict(this.asDict());
- }
-
- /**
- * Create a new Histogram with this Histogram's name, unit, and
- * binBoundaries, but not its guid, bin counts, or diagnostics.
- * @return {!tr.v.Histogram}
- */
- cloneEmpty() {
- var binBoundaries = HistogramBinBoundaries.fromDict(
- this.binBoundariesDict_);
- return new Histogram(this.name, this.unit, binBoundaries);
- }
-
- asDict() {
- var dict = {};
- dict.binBoundaries = this.binBoundariesDict_;
- dict.name = this.name;
- dict.unit = this.unit.asJSON();
- dict.guid = this.guid;
- if (this.shortName) {
- dict.shortName = this.shortName;
- }
- if (this.description) {
- dict.description = this.description;
- }
- if (this.diagnostics.size) {
- dict.diagnostics = this.diagnostics.asDict();
- }
- if (this.maxNumSampleValues !== this.defaultMaxNumSampleValues_) {
- dict.maxNumSampleValues = this.maxNumSampleValues;
- }
- if (this.numNans) {
- dict.numNans = this.numNans;
- }
- if (this.nanDiagnosticMaps.length) {
- dict.nanDiagnostics = this.nanDiagnosticMaps.map(
- dm => dm.asDict());
- }
- if (this.underflowBin.count) {
- dict.underflowBin = this.underflowBin.asDict();
- }
- if (this.overflowBin.count) {
- dict.overflowBin = this.overflowBin.asDict();
- }
-
- if (this.numValues) {
- dict.sampleValues = this.sampleValues.slice();
- dict.running = this.running.asDict();
- dict.centralBins = this.centralBinsAsDict_();
- }
-
- var summaryOptions = {};
- var anyOverriddenSummaryOptions = false;
- for (var [name, option] of this.summaryOptions) {
- if (name === 'percentile') {
- if (option.length === 0) {
- continue;
- }
- option = option.slice();
- } else if (option === DEFAULT_SUMMARY_OPTIONS.get(name)) {
- continue;
- }
- summaryOptions[name] = option;
- anyOverriddenSummaryOptions = true;
- }
- if (anyOverriddenSummaryOptions) {
- dict.summaryOptions = summaryOptions;
- }
-
- return dict;
- }
-
- centralBinsAsDict_() {
- // dict.centralBins may be either an array or a dict, whichever is more
- // efficient.
- // The overhead of the array form is significant when the histogram is
- // sparse, and the overhead of the dict form is significant when the
- // histogram is dense.
- // The dict form is more efficient when more than half of centralBins are
- // empty. The array form is more efficient when fewer than half of
- // centralBins are empty.
-
- var numCentralBins = this.centralBins.length;
-
- // If all centralBins are empty, then don't serialize anything for them.
- var emptyBins = 0;
-
- for (var i = 0; i < numCentralBins; ++i) {
- if (this.centralBins[i].count === 0) {
- ++emptyBins;
- }
- }
-
- if (emptyBins === numCentralBins) {
- return undefined;
- }
-
- if (emptyBins > (numCentralBins / 2)) {
- var centralBinsDict = {};
- for (var i = 0; i < numCentralBins; ++i) {
- var bin = this.centralBins[i];
- if (bin.count > 0) {
- centralBinsDict[i] = bin.asDict();
- }
- }
- return centralBinsDict;
- }
-
- var centralBinsArray = [];
- for (var i = 0; i < numCentralBins; ++i) {
- centralBinsArray.push(this.centralBins[i].asDict());
- }
- return centralBinsArray;
- }
-
- get defaultMaxNumSampleValues_() {
- return this.allBins.length * 10;
- }
- }
-
- var HISTOGRAM_BIN_BOUNDARIES_CACHE = new Map();
-
- /**
- * Reusable builder for tr.v.Histogram objects.
- *
- * The bins of the numeric are specified by adding the desired boundaries
- * between bins. Initially, the builder has only a single boundary:
- *
- * range.min=range.max
- * |
- * |
- * -MAX_INT <--------|------------------------------------------> +MAX_INT
- * : resulting : resulting :
- * : underflow : overflow :
- * : bin : bin :
- *
- * More boundaries can be added (in increasing order) using addBinBoundary,
- * addLinearBins and addExponentialBins:
- *
- * range.min range.max
- * | | | | |
- * | | | | |
- * -MAX_INT <--------|---------|---------|-----|---------|------> +MAX_INT
- * : resulting : result. : result. : : result. : resulting :
- * : underflow : central : central : ... : central : overflow :
- * : bin : bin 0 : bin 1 : : bin N-1 : bin :
- *
- * An important feature of the builder is that it's reusable, i.e. it can be
- * used to build multiple numerics with the same unit and bin structure.
- *
- */
- class HistogramBinBoundaries {
- /**
- * Create a linearly scaled tr.v.HistogramBinBoundaries with |numBins| bins
- * ranging from |min| to |max|.
- *
- * @param {number} min
- * @param {number} max
- * @param {number} numBins
- * @return {tr.v.HistogramBinBoundaries}
- */
- static createLinear(min, max, numBins) {
- return new HistogramBinBoundaries(min).addLinearBins(max, numBins);
- }
-
- /**
- * Create an exponentially scaled tr.v.HistogramBinBoundaries with |numBins|
- * bins ranging from |min| to |max|.
- *
- * @param {number} min
- * @param {number} max
- * @param {number} numBins
- * @return {tr.v.HistogramBinBoundaries}
- */
- static createExponential(min, max, numBins) {
- return new HistogramBinBoundaries(min).addExponentialBins(max, numBins);
- }
-
- /**
- * @param {Array.<number>} binBoundaries
- */
- static createWithBoundaries(binBoundaries) {
- var builder = new HistogramBinBoundaries(binBoundaries[0]);
- for (var boundary of binBoundaries.slice(1))
- builder.addBinBoundary(boundary);
- return builder;
- }
-
- static createFromSamples(samples) {
- var range = new tr.b.Range();
- // Prevent non-numeric samples from introducing NaNs into the range.
- for (var sample of samples)
- if (!isNaN(Math.max(sample)))
- range.addValue(sample);
-
- // HistogramBinBoundaries.addLinearBins() requires this.
- if (range.isEmpty)
- range.addValue(1);
- if (range.min === range.max)
- range.addValue(range.min - 1);
-
- // This optimizes the resolution when samples are uniformly distributed
- // (which is almost never the case).
- var numBins = Math.ceil(Math.sqrt(samples.length));
- var builder = new HistogramBinBoundaries(range.min);
- builder.addLinearBins(range.max, numBins);
- return builder;
- }
-
- /**
- * @param {number} minBinBoundary The minimum boundary between bins, namely
- * the underflow bin and the first central bin (or the overflow bin if
- * no other boundaries are added later).
- */
- constructor(minBinBoundary) {
- this.boundaries_ = undefined;
- this.builder_ = [minBinBoundary];
- this.range_ = new tr.b.Range();
- this.range_.addValue(minBinBoundary);
- }
-
- get range() {
- return this.range_;
- }
-
- asDict() {
- // Copy builder_ in case ours is modified later.
- return this.builder_.slice();
- }
-
- static fromDict(dict) {
- // When loading a results2.html with many Histograms with the same bin
- // boundaries, caching the HistogramBinBoundaries not only speeds up
- // loading, but also prevents a bug where build_ is occasionally
- // non-deterministic, which causes similar Histograms to be unmergeable.
- var cacheKey = JSON.stringify(dict);
- if (HISTOGRAM_BIN_BOUNDARIES_CACHE.has(cacheKey)) {
- return HISTOGRAM_BIN_BOUNDARIES_CACHE.get(cacheKey);
- }
-
- var binBoundaries = new HistogramBinBoundaries(dict[0]);
- for (var slice of dict.slice(1)) {
- if (!(slice instanceof Array)) {
- binBoundaries.addBinBoundary(slice);
- continue;
- }
- switch (slice[0]) {
- case HistogramBinBoundaries.SLICE_TYPE.LINEAR:
- binBoundaries.addLinearBins(slice[1], slice[2]);
- break;
-
- case HistogramBinBoundaries.SLICE_TYPE.EXPONENTIAL:
- binBoundaries.addExponentialBins(slice[1], slice[2]);
- break;
-
- default:
- throw new Error('Unrecognized HistogramBinBoundaries slice type');
- }
- }
- HISTOGRAM_BIN_BOUNDARIES_CACHE.set(cacheKey, binBoundaries);
- return binBoundaries;
- }
-
- /**
- * Yield Ranges of adjacent boundaries.
- */
- *binRanges() {
- if (this.boundaries_ === undefined) {
- this.build_();
- }
- for (var i = 0; i < this.boundaries_.length - 1; ++i) {
- yield tr.b.Range.fromExplicitRange(
- this.boundaries_[i], this.boundaries_[i + 1]);
- }
- }
-
- build_() {
- if (typeof this.builder_[0] !== 'number') {
- throw new Error('Invalid start of builder_');
- }
- this.boundaries_ = [this.builder_[0]];
-
- for (var slice of this.builder_.slice(1)) {
- if (!(slice instanceof Array)) {
- this.boundaries_.push(slice);
- continue;
- }
- var nextMaxBinBoundary = slice[1];
- var binCount = slice[2];
- var curMaxBinBoundary = this.boundaries_[
- this.boundaries_.length - 1];
-
- switch (slice[0]) {
- case HistogramBinBoundaries.SLICE_TYPE.LINEAR:
- var binWidth = (nextMaxBinBoundary - curMaxBinBoundary) / binCount;
- for (var i = 1; i < binCount; i++) {
- var boundary = curMaxBinBoundary + i * binWidth;
- this.boundaries_.push(boundary);
- }
- break;
-
- case HistogramBinBoundaries.SLICE_TYPE.EXPONENTIAL:
- var binExponentWidth =
- Math.log(nextMaxBinBoundary / curMaxBinBoundary) / binCount;
- for (var i = 1; i < binCount; i++) {
- var boundary = curMaxBinBoundary * Math.exp(i * binExponentWidth)
- this.boundaries_.push(boundary);
- }
- break;
-
- default:
- throw new Error('Unrecognized HistogramBinBoundaries slice type');
- }
- this.boundaries_.push(nextMaxBinBoundary);
- }
- }
-
- /**
- * Add a bin boundary |nextMaxBinBoundary| to the builder.
- *
- * This operation effectively corresponds to appending a new central bin
- * with the range [this.range.max, nextMaxBinBoundary].
- *
- * @param {number} nextMaxBinBoundary The added bin boundary (must be
- * greater than |this.maxMinBoundary|).
- */
- addBinBoundary(nextMaxBinBoundary) {
- if (nextMaxBinBoundary <= this.range.max) {
- throw new Error('The added max bin boundary must be larger than ' +
- 'the current max boundary');
- }
-
- // If boundaries_ had been built, then clear them.
- this.boundaries_ = undefined;
-
- this.builder_.push(nextMaxBinBoundary);
- this.range.addValue(nextMaxBinBoundary);
- return this;
- }
-
- /**
- * Add |binCount| linearly scaled bin boundaries up to |nextMaxBinBoundary|
- * to the builder.
- *
- * This operation corresponds to appending |binCount| central bins of
- * constant range width
- * W = ((|nextMaxBinBoundary| - |this.range.max|) / |binCount|)
- * with the following ranges:
- *
- * [|this.maxMinBoundary|, |this.maxMinBoundary| + W]
- * [|this.maxMinBoundary| + W, |this.maxMinBoundary| + 2W]
- * [|this.maxMinBoundary| + 2W, |this.maxMinBoundary| + 3W]
- * ...
- * [|this.maxMinBoundary| + (|binCount| - 2) * W,
- * |this.maxMinBoundary| + (|binCount| - 2) * W]
- * [|this.maxMinBoundary| + (|binCount| - 1) * W,
- * |nextMaxBinBoundary|]
- *
- * @param {number} nextBinBoundary The last added bin boundary (must be
- * greater than |this.maxMinBoundary|).
- * @param {number} binCount Number of bins to be added (must be positive).
- */
- addLinearBins(nextMaxBinBoundary, binCount) {
- if (binCount <= 0)
- throw new Error('Bin count must be positive');
-
- if (nextMaxBinBoundary <= this.range.max) {
- throw new Error('The new max bin boundary must be greater than ' +
- 'the previous max bin boundary');
- }
-
- // If boundaries_ had been built, then clear them.
- this.boundaries_ = undefined;
-
- this.builder_.push([HistogramBinBoundaries.SLICE_TYPE.LINEAR,
- nextMaxBinBoundary, binCount]);
- this.range.addValue(nextMaxBinBoundary);
- return this;
- }
-
- /**
- * Add |binCount| exponentially scaled bin boundaries up to
- * |nextMaxBinBoundary| to the builder.
- *
- * This operation corresponds to appending |binCount| central bins with
- * a constant difference between the logarithms of their range min and max
- * D = ((ln(|nextMaxBinBoundary|) - ln(|this.range.max|)) / |binCount|)
- * with the following ranges:
- *
- * [|this.maxMinBoundary|, |this.maxMinBoundary| * exp(D)]
- * [|this.maxMinBoundary| * exp(D), |this.maxMinBoundary| * exp(2D)]
- * [|this.maxMinBoundary| * exp(2D), |this.maxMinBoundary| * exp(3D)]
- * ...
- * [|this.maxMinBoundary| * exp((|binCount| - 2) * D),
- * |this.maxMinBoundary| * exp((|binCount| - 2) * D)]
- * [|this.maxMinBoundary| * exp((|binCount| - 1) * D),
- * |nextMaxBinBoundary|]
- *
- * This method requires that the current max bin boundary is positive.
- *
- * @param {number} nextBinBoundary The last added bin boundary (must be
- * greater than |this.maxMinBoundary|).
- * @param {number} binCount Number of bins to be added (must be positive).
- */
- addExponentialBins(nextMaxBinBoundary, binCount) {
- if (binCount <= 0) {
- throw new Error('Bin count must be positive');
- }
- if (this.range.max <= 0) {
- throw new Error('Current max bin boundary must be positive');
- }
- if (this.range.max >= nextMaxBinBoundary) {
- throw new Error('The last added max boundary must be greater than ' +
- 'the current max boundary boundary');
- }
-
- // If boundaries_ had been built, then clear them.
- this.boundaries_ = undefined;
-
- this.builder_.push([HistogramBinBoundaries.SLICE_TYPE.EXPONENTIAL,
- nextMaxBinBoundary, binCount]);
- this.range.addValue(nextMaxBinBoundary);
- return this;
- }
- }
-
- HistogramBinBoundaries.SLICE_TYPE = {
- LINEAR: 0,
- EXPONENTIAL: 1,
- };
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.timeDurationInMs.unitName,
- HistogramBinBoundaries.createExponential(1e-3, 1e6, 1e2));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.timeStampInMs.unitName,
- HistogramBinBoundaries.createLinear(0, 1e10, 1e3));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.normalizedPercentage.unitName,
- HistogramBinBoundaries.createLinear(0, 1.0, 20));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.sizeInBytes.unitName,
- HistogramBinBoundaries.createExponential(1, 1e12, 1e2));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.energyInJoules.unitName,
- HistogramBinBoundaries.createExponential(1e-3, 1e3, 50));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.powerInWatts.unitName,
- HistogramBinBoundaries.createExponential(1e-3, 1, 50));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.unitlessNumber.unitName,
- HistogramBinBoundaries.createExponential(1e-3, 1e3, 50));
-
- DEFAULT_BOUNDARIES_FOR_UNIT.set(
- tr.b.Unit.byName.count.unitName,
- HistogramBinBoundaries.createExponential(1, 1e3, 20));
-
- return {
- Histogram: Histogram,
- HistogramBinBoundaries: HistogramBinBoundaries,
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/histogram_test.html b/chromium/third_party/catapult/tracing/tracing/value/histogram_test.html
deleted file mode 100644
index 744828a6e61..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/histogram_test.html
+++ /dev/null
@@ -1,508 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/generic.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var unitlessNumber = tr.b.Unit.byName.unitlessNumber;
- var unitlessNumber_smallerIsBetter =
- tr.b.Unit.byName.unitlessNumber_smallerIsBetter;
-
- var TEST_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 1000, 10);
-
- function checkBoundaries(boundaries, expectedMinBoundary, expectedMaxBoundary,
- expectedUnit, expectedBinRanges) {
- assert.strictEqual(boundaries.range.min, expectedMinBoundary);
- assert.strictEqual(boundaries.range.max, expectedMaxBoundary);
-
- // Check that the boundaries can be used multiple times.
- for (var i = 0; i < 3; i++) {
- var numeric = new tr.v.Histogram('', expectedUnit, boundaries);
- assert.instanceOf(numeric, tr.v.Histogram);
- assert.strictEqual(numeric.unit, expectedUnit);
- assert.strictEqual(numeric.numValues, 0);
-
- assert.lengthOf(numeric.allBins, expectedBinRanges.length);
- for (var j = 0; j < expectedBinRanges.length; j++) {
- var bin = numeric.allBins[j];
- assert.strictEqual(bin.count, 0);
- assert.isTrue(bin.range.equals(expectedBinRanges[j]));
- }
- }
- }
-
- test('serialization', function() {
- // Ensure that serialized Histograms don't take up too much more space than
- // necessary.
- var hist = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
-
- // You can change these numbers, but when you do, please explain in your CL
- // description why they changed.
- var dict = hist.asDict();
- assert.strictEqual(107, JSON.stringify(dict).length);
- assert.isUndefined(dict.centralBins);
- assert.deepEqual(dict, tr.v.Histogram.fromDict(dict).asDict());
-
- hist.addSample(100);
- dict = hist.asDict();
- assert.strictEqual(202, JSON.stringify(dict).length);
- assert.isUndefined(dict.centralBins.length);
- assert.deepEqual(dict, tr.v.Histogram.fromDict(dict).asDict());
-
- hist.addSample(100);
- dict = hist.asDict();
- // SAMPLE_VALUES grew by "100,"
- assert.strictEqual(206, JSON.stringify(dict).length);
- assert.isUndefined(dict.centralBins.length);
- assert.deepEqual(dict, tr.v.Histogram.fromDict(dict).asDict());
-
- hist.addSample(271, {foo: new tr.v.d.Generic('bar')});
- dict = hist.asDict();
- assert.strictEqual(266, JSON.stringify(dict).length);
- assert.isUndefined(dict.centralBins.length);
- assert.deepEqual(dict, tr.v.Histogram.fromDict(dict).asDict());
-
- // Add samples to most bins so that centralBinsArray is more efficient than
- // centralBinsDict.
- for (var i = 10; i < 100; ++i) {
- hist.addSample(10 * i);
- }
- dict = hist.asDict();
- assert.strictEqual(687, JSON.stringify(hist.asDict()).length);
- assert.lengthOf(dict.centralBins, 10);
- assert.deepEqual(dict, tr.v.Histogram.fromDict(dict).asDict());
-
- // Lowering maxNumSampleValues takes a random sub-sample of the existing
- // sampleValues. We have deliberately set all samples to 3-digit numbers so
- // that the serialized size is constant regardless of which samples are
- // retained.
- hist.maxNumSampleValues = 10;
- dict = hist.asDict();
- assert.strictEqual(379, JSON.stringify(dict).length);
- assert.lengthOf(dict.centralBins, 10);
- assert.deepEqual(dict, tr.v.Histogram.fromDict(dict).asDict());
- });
-
- test('significance', function() {
- var boundaries = tr.v.HistogramBinBoundaries.createLinear(0, 100, 10);
- var numericA = new tr.v.Histogram(
- '', unitlessNumber_smallerIsBetter, boundaries);
- var numericB = new tr.v.Histogram(
- '', unitlessNumber_smallerIsBetter, boundaries);
-
- var dontCare = new tr.v.Histogram('', unitlessNumber, boundaries);
- assert.strictEqual(dontCare.getDifferenceSignificance(dontCare),
- tr.b.Statistics.Significance.DONT_CARE);
-
- for (var i = 0; i < 100; ++i) {
- numericA.addSample(i);
- numericB.addSample(i * 0.85);
- }
-
- assert.strictEqual(numericA.getDifferenceSignificance(numericB),
- tr.b.Statistics.Significance.INSIGNIFICANT);
- assert.strictEqual(numericB.getDifferenceSignificance(numericA),
- tr.b.Statistics.Significance.INSIGNIFICANT);
- assert.strictEqual(numericA.getDifferenceSignificance(numericB, 0.1),
- tr.b.Statistics.Significance.SIGNIFICANT);
- assert.strictEqual(numericB.getDifferenceSignificance(numericA, 0.1),
- tr.b.Statistics.Significance.SIGNIFICANT);
- });
-
- test('numericBasic', function() {
- var n = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
- assert.equal(n.getBinForValue(250).range.min, 200);
- assert.equal(n.getBinForValue(250).range.max, 300);
-
- n.addSample(-1, {foo: new tr.v.d.Generic('a')});
- n.addSample(0, {foo: new tr.v.d.Generic('b')});
- n.addSample(0, {foo: new tr.v.d.Generic('c')});
- n.addSample(500, {foo: new tr.v.d.Generic('c')});
- n.addSample(999, {foo: new tr.v.d.Generic('d')});
- n.addSample(1000, {foo: new tr.v.d.Generic('d')});
- assert.equal(n.underflowBin.count, 1);
-
- assert.equal(n.getBinForValue(0).count, 2);
- assert.deepEqual(
- n.getBinForValue(0).diagnosticMaps.map(dm => dm.get('foo').value),
- ['b', 'c']);
-
- assert.equal(n.getBinForValue(500).count, 1);
- assert.equal(n.getBinForValue(999).count, 1);
-
- assert.equal(n.overflowBin.count, 1);
- assert.equal(n.numValues, 6);
- assert.closeTo(n.average, 416.3, 0.1);
- });
-
- test('numericNans', function() {
- var n = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
-
- n.addSample(undefined, {foo: new tr.v.d.Generic('b')});
- n.addSample(NaN, {'foo': new tr.v.d.Generic('c')});
- n.addSample(undefined);
- n.addSample(NaN);
-
- assert.equal(n.numNans, 4);
- assert.deepEqual(n.nanDiagnosticMaps.map(dm => dm.get('foo').value),
- ['b', 'c']);
-
- var n2 = n.clone();
- assert.instanceOf(n2.nanDiagnosticMaps[0], tr.v.d.DiagnosticMap);
- assert.instanceOf(n2.nanDiagnosticMaps[0].get('foo'), tr.v.d.Generic);
- });
-
- test('addHistogramsValid', function() {
- var n0 = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
- var n1 = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
-
- n0.addSample(-1, {foo: new tr.v.d.Generic('a0')});
- n0.addSample(0, {foo: new tr.v.d.Generic('b0')});
- n0.addSample(0, {foo: new tr.v.d.Generic('c0')});
- n0.addSample(500, {foo: new tr.v.d.Generic('c0')});
- n0.addSample(1000, {foo: new tr.v.d.Generic('d0')});
- n0.addSample(NaN, {foo: new tr.v.d.Generic('e0')});
-
- n1.addSample(-1, {foo: new tr.v.d.Generic('a1')});
- n1.addSample(0, {foo: new tr.v.d.Generic('b1')});
- n1.addSample(0, {foo: new tr.v.d.Generic('c1')});
- n1.addSample(999, {foo: new tr.v.d.Generic('d1')});
- n1.addSample(1000, {foo: new tr.v.d.Generic('d1')});
- n1.addSample(NaN, {foo: new tr.v.d.Generic('e1')});
-
- n0.addHistogram(n1);
-
- assert.equal(n0.numNans, 2);
- assert.deepEqual(n0.nanDiagnosticMaps.map(dmd => dmd.get('foo').value),
- ['e0', 'e1']);
-
- assert.equal(n0.underflowBin.count, 2);
- assert.deepEqual(
- n0.underflowBin.diagnosticMaps.map(dmd => dmd.get('foo').value),
- ['a0', 'a1']);
-
- assert.equal(n0.getBinForValue(0).count, 4);
- assert.deepEqual(
- n0.getBinForValue(0).diagnosticMaps.map(dmd => dmd.get('foo').value),
- ['b0', 'c0', 'b1', 'c1']);
-
- assert.equal(n0.getBinForValue(500).count, 1);
- assert.deepEqual(
- n0.getBinForValue(500).diagnosticMaps.map(dmd => dmd.get('foo').value),
- ['c0']);
-
- assert.equal(n0.getBinForValue(999).count, 1);
- assert.deepEqual(
- n0.getBinForValue(999).diagnosticMaps.map(dmd => dmd.get('foo').value),
- ['d1']);
-
- assert.equal(n0.overflowBin.count, 2);
- assert.deepEqual(
- n0.overflowBin.diagnosticMaps.map(dmd => dmd.get('foo').value),
- ['d0', 'd1']);
-
- assert.equal(n0.numValues, 10);
- assert.closeTo(n0.average, 349.7, 0.1);
-
- assert.equal(2, n0.maxCount);
- assert.equal(2, n1.maxCount);
-
- var n02 = n0.clone();
- assert.instanceOf(n02.underflowBin.diagnosticMaps[0], tr.v.d.DiagnosticMap);
- assert.instanceOf(n02.underflowBin.diagnosticMaps[0].get('foo'),
- tr.v.d.Generic);
- });
-
- test('addHistogramsInvalid', function() {
- var n0 = new tr.v.Histogram('', tr.b.Unit.byName.timeDurationInMs,
- tr.v.HistogramBinBoundaries.createLinear(0, 1000, 10));
- var n1 = new tr.v.Histogram('', tr.b.Unit.byName.timeDurationInMs,
- tr.v.HistogramBinBoundaries.createLinear(0, 1001, 10));
- var n2 = new tr.v.Histogram('', tr.b.Unit.byName.timeDurationInMs,
- tr.v.HistogramBinBoundaries.createLinear(0, 1000, 11));
-
- assert.isFalse(n0.canAddHistogram(n1));
- assert.isFalse(n0.canAddHistogram(n2));
- assert.isFalse(n1.canAddHistogram(n0));
- assert.isFalse(n1.canAddHistogram(n2));
- assert.isFalse(n2.canAddHistogram(n0));
- assert.isFalse(n2.canAddHistogram(n1));
-
- assert.throws(n0.addHistogram.bind(n0, n1), Error);
- assert.throws(n0.addHistogram.bind(n0, n2), Error);
- });
-
- test('addHistogramWithNonDiagnosticMapThrows', function() {
- var n = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
- assert.throws(n.addSample.bind(42, 'foo'), Error);
- });
-
- test('numericPercentile', function() {
- function check(array, min, max, bins, precision) {
- var boundaries = tr.v.HistogramBinBoundaries.createLinear(min, max, bins);
- var n = new tr.v.Histogram(
- '', tr.b.Unit.byName.timeDurationInMs, boundaries);
- array.forEach((x) => n.addSample(x, {foo: new tr.v.d.Generic('x')}));
- [0.25, 0.5, 0.75, 0.8, 0.95, 0.99].forEach(function(percent) {
- var expected = tr.b.Statistics.percentile(array, percent);
- var actual = n.getApproximatePercentile(percent);
- assert.closeTo(expected, actual, precision);
- });
- }
- check([1, 2, 5, 7], 0.5, 10.5, 10, 1e-3);
- check([3, 3, 4, 4], 0.5, 10.5, 10, 1e-3);
- check([1, 10], 0.5, 10.5, 10, 1e-3);
- check([1, 2, 3, 4, 5], 0.5, 10.5, 10, 1e-3);
- check([3, 3, 3, 3, 3], 0.5, 10.5, 10, 1e-3);
- check([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 0.5, 10.5, 10, 1e-3);
- check([1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10], 0.5, 10.5, 10, 1e-3);
- check([0, 11], 0.5, 10.5, 10, 1);
- check([0, 6, 11], 0.5, 10.5, 10, 1);
- var array = [];
- for (var i = 0; i < 1000; i++)
- array.push((i * i) % 10 + 1);
- check(array, 0.5, 10.5, 10, 1e-3);
- // If the real percentile is outside the bin range then the approximation
- // error can be high.
- check([-10000], 0, 10, 10, 10000);
- check([10000], 0, 10, 10, 10000 - 10);
- // The result is no more than the bin width away from the real percentile.
- check([1, 1], 0, 10, 1, 10);
- });
-
- test('histogramBinBoundaries_addBinBoundary', function() {
- var b = new tr.v.HistogramBinBoundaries(-100);
- b.addBinBoundary(50);
-
- checkBoundaries(b, -100, 50, tr.b.Unit.byName.timeDurationInMs, [
- tr.b.Range.fromExplicitRange(-Number.MAX_VALUE, -100),
- tr.b.Range.fromExplicitRange(-100, 50),
- tr.b.Range.fromExplicitRange(50, Number.MAX_VALUE)
- ]);
-
- b.addBinBoundary(60);
- b.addBinBoundary(75);
-
- checkBoundaries(b, -100, 75, tr.b.Unit.byName.timeDurationInMs, [
- tr.b.Range.fromExplicitRange(-Number.MAX_VALUE, -100),
- tr.b.Range.fromExplicitRange(-100, 50),
- tr.b.Range.fromExplicitRange(50, 60),
- tr.b.Range.fromExplicitRange(60, 75),
- tr.b.Range.fromExplicitRange(75, Number.MAX_VALUE)
- ]);
- });
-
- test('histogramBinBoundaries_addLinearBins', function() {
- var b = new tr.v.HistogramBinBoundaries(1000);
- b.addLinearBins(1200, 5);
-
- checkBoundaries(b, 1000, 1200, tr.b.Unit.byName.powerInWatts, [
- tr.b.Range.fromExplicitRange(-Number.MAX_VALUE, 1000),
- tr.b.Range.fromExplicitRange(1000, 1040),
- tr.b.Range.fromExplicitRange(1040, 1080),
- tr.b.Range.fromExplicitRange(1080, 1120),
- tr.b.Range.fromExplicitRange(1120, 1160),
- tr.b.Range.fromExplicitRange(1160, 1200),
- tr.b.Range.fromExplicitRange(1200, Number.MAX_VALUE)
- ]);
- });
-
- test('histogramBinBoundaries_addExponentialBins', function() {
- var b = new tr.v.HistogramBinBoundaries(0.5);
- b.addExponentialBins(8, 4);
-
- checkBoundaries(b, 0.5, 8, tr.b.Unit.byName.energyInJoules, [
- tr.b.Range.fromExplicitRange(-Number.MAX_VALUE, 0.5),
- tr.b.Range.fromExplicitRange(0.5, 1),
- tr.b.Range.fromExplicitRange(1, 2),
- tr.b.Range.fromExplicitRange(2, 4),
- tr.b.Range.fromExplicitRange(4, 8),
- tr.b.Range.fromExplicitRange(8, Number.MAX_VALUE)
- ]);
- });
-
- test('histogramBinBoundaries_combined', function() {
- var b = new tr.v.HistogramBinBoundaries(-273.15);
- b.addBinBoundary(-50);
- b.addLinearBins(4, 3);
- b.addExponentialBins(16, 2);
- b.addLinearBins(17, 4);
- b.addBinBoundary(100);
-
- checkBoundaries(b, -273.15, 100, tr.b.Unit.byName.unitlessNumber, [
- tr.b.Range.fromExplicitRange(-Number.MAX_VALUE, -273.15),
- tr.b.Range.fromExplicitRange(-273.15, -50),
- tr.b.Range.fromExplicitRange(-50, -32),
- tr.b.Range.fromExplicitRange(-32, -14),
- tr.b.Range.fromExplicitRange(-14, 4),
- tr.b.Range.fromExplicitRange(4, 8),
- tr.b.Range.fromExplicitRange(8, 16),
- tr.b.Range.fromExplicitRange(16, 16.25),
- tr.b.Range.fromExplicitRange(16.25, 16.5),
- tr.b.Range.fromExplicitRange(16.5, 16.75),
- tr.b.Range.fromExplicitRange(16.75, 17),
- tr.b.Range.fromExplicitRange(17, 100),
- tr.b.Range.fromExplicitRange(100, Number.MAX_VALUE)
- ]);
- });
-
- test('histogramBinBoundaries_throws', function() {
- var b0 = new tr.v.HistogramBinBoundaries(-7);
- assert.throws(function() { b0.addBinBoundary(-10 /* must be > -7 */); });
- assert.throws(function() { b0.addBinBoundary(-7 /* must be > -7 */); });
- assert.throws(function() { b0.addLinearBins(-10 /* must be > -7 */, 10); });
- assert.throws(function() { b0.addLinearBins(-7 /* must be > -7 */, 100); });
- assert.throws(function() { b0.addLinearBins(10, 0 /* must be > 0 */); });
- assert.throws(function() {
- // Current max bin boundary (-7) must be positive.
- b0.addExponentialBins(16, 4);
- });
-
- var b1 = new tr.v.HistogramBinBoundaries(8);
- assert.throws(() => b1.addExponentialBins(20, 0 /* must be > 0 */));
- assert.throws(() => b1.addExponentialBins(5 /* must be > 8 */, 3));
- assert.throws(() => b1.addExponentialBins(8 /* must be > 8 */, 3));
- });
-
- test('statisticsScalars', function() {
- var boundaries = tr.v.HistogramBinBoundaries.createLinear(0, 100, 100);
- var n = new tr.v.Histogram('', unitlessNumber, boundaries);
-
- n.addSample(50);
- n.addSample(60);
- n.addSample(70);
- n.addSample('i am not a number');
-
- n.customizeSummaryOptions({
- count: true,
- min: true,
- max: true,
- sum: true,
- avg: true,
- std: true,
- nans: true,
- geometricMean: true,
- percentile: [0.5, 1]
- });
-
- // Test round-tripping summaryOptions.
- n = n.clone();
-
- var stats = n.statisticsScalars;
- assert.strictEqual(stats.get('nans').unit,
- tr.b.Unit.byName.count_smallerIsBetter);
- assert.strictEqual(stats.get('nans').value, 1);
- assert.strictEqual(stats.get('count').unit,
- tr.b.Unit.byName.count_smallerIsBetter);
- assert.strictEqual(stats.get('count').value, 3);
- assert.strictEqual(stats.get('min').unit, n.unit);
- assert.strictEqual(stats.get('min').value, 50);
- assert.strictEqual(stats.get('max').unit, n.unit);
- assert.strictEqual(stats.get('max').value, 70);
- assert.strictEqual(stats.get('sum').unit, n.unit);
- assert.strictEqual(stats.get('sum').value, 180);
- assert.strictEqual(stats.get('avg').unit, n.unit);
- assert.strictEqual(stats.get('avg').value, 60);
- assert.strictEqual(stats.get('std').value, 10);
- assert.strictEqual(stats.get('pct_050').unit, n.unit);
- assert.closeTo(stats.get('pct_050').value, 60, 1);
- assert.strictEqual(stats.get('pct_100').unit, n.unit);
- assert.closeTo(stats.get('pct_100').value, 70, 1);
- assert.strictEqual(stats.get('geometricMean').unit, n.unit);
- assert.closeTo(stats.get('geometricMean').value, 59.439, 1e-3);
- });
-
- test('statisticsScalarsNoSummaryOptions', function() {
- var boundaries = tr.v.HistogramBinBoundaries.createLinear(0, 100, 100);
- var n = new tr.v.Histogram('', unitlessNumber, boundaries);
-
- n.addSample(50);
- n.addSample(60);
- n.addSample(70);
-
- n.customizeSummaryOptions({
- count: false,
- min: false,
- max: false,
- sum: false,
- avg: false,
- std: false,
- percentile: []
- });
-
- assert.strictEqual(n.statisticsScalars.size, 0);
- });
-
- test('statisticsScalarsEmptyNumericValue', function() {
- var boundaries = tr.v.HistogramBinBoundaries.createLinear(0, 100, 100);
- var n = new tr.v.Histogram('', unitlessNumber, boundaries);
- n.customizeSummaryOptions({
- count: true,
- min: true,
- max: true,
- sum: true,
- avg: true,
- std: true,
- percentile: [0, 0.01, 0.1, 0.5, 0.995, 1]
- });
-
- var stats = n.statisticsScalars;
- assert.strictEqual(stats.get('count').value, 0);
- assert.strictEqual(stats.get('min').value, Infinity);
- assert.strictEqual(stats.get('max').value, -Infinity);
- assert.strictEqual(stats.get('sum').value, 0);
- assert.strictEqual(stats.get('avg'), undefined);
- assert.strictEqual(stats.get('std'), undefined);
- assert.strictEqual(stats.get('pct_000').value, 0);
- assert.strictEqual(stats.get('pct_001').value, 0);
- assert.strictEqual(stats.get('pct_010').value, 0);
- assert.strictEqual(stats.get('pct_050').value, 0);
- assert.strictEqual(stats.get('pct_099_5').value, 0);
- assert.strictEqual(stats.get('pct_100').value, 0);
- });
-
- test('sampleValues', function() {
- var n0 = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
- var n1 = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
- // maxNumSampleValues defaults to numBins * 10, which, including the
- // underflowBin and overflowBin plus this builder's 10 central bins,
- // is 12 * 10.
- assert.strictEqual(n0.maxNumSampleValues, 120);
- assert.strictEqual(n1.maxNumSampleValues, 120);
- var values0 = [];
- var values1 = [];
- for (var i = 0; i < 10; ++i) {
- values0.push(i);
- n0.addSample(i);
- }
- for (var i = 10; i < 20; ++i) {
- values1.push(i);
- n1.addSample(i);
- }
- assert.deepEqual(n0.sampleValues, values0);
- assert.deepEqual(n1.sampleValues, values1);
- n0.addHistogram(n1);
- assert.deepEqual(n0.sampleValues, values0.concat(values1));
- var n2 = n0.clone();
- assert.deepEqual(n2.sampleValues, values0.concat(values1));
-
- for (var i = 0; i < 200; ++i)
- n0.addSample(i);
- assert.strictEqual(n0.sampleValues.length, n0.maxNumSampleValues);
-
- var n3 = new tr.v.Histogram('', unitlessNumber, TEST_BOUNDARIES);
- n3.maxNumSampleValues = 10;
- for (var i = 0; i < 100; ++i)
- n3.addSample(i);
- assert.strictEqual(n3.sampleValues.length, 10);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/numeric.html b/chromium/third_party/catapult/tracing/tracing/value/numeric.html
deleted file mode 100644
index 1b9df822bc9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/numeric.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/unit.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v', function() {
- class NumericBase {
- constructor(unit) {
- if (!(unit instanceof tr.b.Unit))
- throw new Error('Expected provided unit to be instance of Unit');
-
- this.unit = unit;
- }
-
- asDict() {
- var d = {
- unit: this.unit.asJSON()
- };
-
- this.asDictInto_(d);
- return d;
- }
-
- static fromDict(d) {
- if (d.type === 'scalar')
- return ScalarNumeric.fromDict(d);
-
- throw new Error('Not implemented');
- }
- }
-
- class ScalarNumeric extends NumericBase {
- constructor(unit, value) {
- if (!(unit instanceof tr.b.Unit))
- throw new Error('Expected Unit');
-
- if (!(typeof(value) === 'number'))
- throw new Error('Expected value to be number');
-
- super(unit);
- this.value = value;
- }
-
- asDictInto_(d) {
- d.type = 'scalar';
-
- // Infinity and NaN are left out of JSON for security reasons that do not
- // apply to our use cases.
- if (this.value === Infinity)
- d.value = 'Infinity';
- else if (this.value === -Infinity)
- d.value = '-Infinity';
- else if (isNaN(this.value))
- d.value = 'NaN';
- else
- d.value = this.value;
- }
-
- toString() {
- return this.unit.format(this.value);
- }
-
- static fromDict(d) {
- // Infinity and NaN are left out of JSON for security reasons that do not
- // apply to our use cases.
- if (typeof(d.value) === 'string') {
- if (d.value === '-Infinity') {
- d.value = -Infinity;
- } else if (d.value === 'Infinity') {
- d.value = Infinity;
- } else if (d.value === 'NaN') {
- d.value = NaN;
- }
- }
-
- return new ScalarNumeric(tr.b.Unit.fromJSON(d.unit), d.value);
- }
- }
-
- return {
- NumericBase: NumericBase,
- ScalarNumeric: ScalarNumeric
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/numeric_test.html b/chromium/third_party/catapult/tracing/tracing/value/numeric_test.html
deleted file mode 100644
index 281950a2666..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/numeric_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-<link rel="import" href="/tracing/value/diagnostics/generic.html">
-<link rel="import" href="/tracing/value/numeric.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('nonUnitThrows', function() {
- assert.throws(function() { new tr.v.NumericBase('foo', -273.15); });
- });
-
- test('nonNumberScalarThrows', function() {
- var unit = tr.b.Unit.byName.sizeInBytes;
- assert.throws(function() { new tr.v.ScalarNumeric(unit, 'foo'); });
- });
-
- test('scalarBasic', function() {
- var unit = tr.b.Unit.byName.sizeInBytes;
-
- var d = {
- type: 'scalar',
- unit: unit.asJSON(),
- value: 42
- };
-
- assert.deepEqual(d, tr.v.NumericBase.fromDict(d).asDict());
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span.html
deleted file mode 100644
index 05cc5410058..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/statistics.html">
-<script>
-'use strict';
-tr.exportTo('tr.v.ui', function() {
- var ArrayOfNumbersSummaryModes = {
- AVERAGE_MODE: 'average-mode',
- TOTAL_MODE: 'total-mode'
- };
- return {
- ArrayOfNumbersSummaryModes: ArrayOfNumbersSummaryModes
- };
-});
-</script>
-<dom-module id='tr-v-ui-array-of-numbers-span'>
- <template>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-v-ui-array-of-numbers-span',
-
- created: function() {
- this.numbers_ = undefined;
- this.summaryMode_ = tr.v.ui.ArrayOfNumbersSummaryModes.AVERAGE_MODE;
- },
-
- get summaryMode() {
- return this.summaryMode_;
- },
-
- set summaryMode(summaryMode) {
- this.summaryMode_ = summaryMode;
- this.updateContents_();
- },
-
- get numbers() {
- return this.numbers_;
- },
-
- set numbers(numbers) {
- if (numbers === undefined) {
- this.numbers_ = undefined;
- this.updateContents_();
- return;
- }
- if (!(numbers instanceof Array))
- throw new Error('Must provide an array');
- this.numbers_ = numbers;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.numbers_ === undefined) {
- Polymer.dom(this.root).textContent = '-';
- return;
- }
-
- var ArrayOfNumbersSummaryModes = tr.v.ui.ArrayOfNumbersSummaryModes;
- var value;
- if (this.summaryMode_ === ArrayOfNumbersSummaryModes.AVERAGE_MODE)
- value = tr.b.Statistics.mean(this.numbers_);
- else
- value = tr.b.Statistics.sum(this.numbers_);
-
- var valueRounded = Math.round(value * 1000.0) / 1000.0;
- Polymer.dom(this.root).textContent = valueRounded;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span_test.html
deleted file mode 100644
index 28f61065f0f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/array_of_numbers_span_test.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/value/ui/array_of_numbers_span.html">
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiateInAverageMode', function() {
- var span = document.createElement('tr-v-ui-array-of-numbers-span');
- span.numbers = [1, 2, 3];
- span.summaryMode = tr.v.ui.ArrayOfNumbersSummaryModes.AVERAGE_MODE;
- this.addHTMLOutput(span);
- assert.equal(span.shadowRoot.textContent, '2');
- });
-
- test('instantiateInTotalsMode', function() {
- var span = document.createElement('tr-v-ui-array-of-numbers-span');
- span.numbers = [1, 2, 3];
- span.summaryMode = tr.v.ui.ArrayOfNumbersSummaryModes.TOTALS_MODE;
- this.addHTMLOutput(span);
- assert.equal(Polymer.dom(span.root).textContent, '6');
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span.html
deleted file mode 100644
index a66a4b17122..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/extras/chrome/chrome_user_friendly_category_driver.html">
-<link rel="import" href="/tracing/ui/base/column_chart.html">
-<link rel="import" href="/tracing/ui/base/drag_handle.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id="tr-v-ui-breakdown-span">
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- }
- #nans_message {
- color: red;
- }
- </style>
-
- <div id="outer">
- <div id="container"></div>
- <tr-ui-b-drag-handle id="drag_handle"></tr-ui-b-drag-handle>
- </div>
- <div id="nans">
- <div id="nans_message">Invalid categories:</div>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </div>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-Polymer({
- is: 'tr-v-ui-breakdown-span',
-
- created: function() {
- this.diagnostic_ = undefined;
- this.chart_ = new tr.ui.b.ColumnChart();
- this.chart_.width = 190;
- this.chart_.height = 200;
- this.chart_.isStacked = true;
- this.chart_.hideXAxis = true;
- this.chart_.margin.top = 10;
- this.chart_.margin.bottom = 10;
- this.chart_.margin.right = 120;
- this.minHeightPx_ = 40;
- },
-
- ready: function() {
- Polymer.dom(this.$.container).appendChild(this.chart_);
- this.$.drag_handle.target = this.$.container;
- this.$.drag_handle.addEventListener(
- 'drag-handle-resize', this.onResize_.bind(this));
-
- this.$.table.showHeader = false;
- this.$.table.tableColumns = [
- {
- value: row => row[0]
- },
- {
- value: row => row[1]
- }
- ];
- },
-
- onResize_: function(event) {
- event.stopPropagation();
- var heightPx = parseInt(this.$.container.style.height);
- if (heightPx < this.minHeightPx_) {
- heightPx = this.minHeightPx_;
- this.$.container.style.height = this.minHeightPx_ + 'px';
- }
- this.chart_.height = heightPx;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (!this.diagnostic_) {
- this.chart_.data = [];
- return;
- }
-
- var data = {x: 0};
- this.minHeightPx_ = 20;
- var tableRows = [];
-
- for (var [name, value] of this.diagnostic) {
- if ((typeof value === 'number') &&
- (isNaN(value) || (value === Infinity) || (value <= 0))) {
- tableRows.push([name, value]);
- continue;
- }
-
- this.minHeightPx_ += 20;
-
- var dataSeries = this.chart_.getDataSeries(name);
- dataSeries.optional = true;
-
- if (this.diagnostic.colorScheme ===
- tr.v.d.COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER) {
- var cat = name.split(' ');
- cat = cat[cat.length - 1];
- var color = tr.e.chrome.ChromeUserFriendlyCategoryDriver.getColor(cat);
- var hsl = color.toHSL();
- hsl.l *= 0.85;
- var highlightedColor = tr.b.Color.fromHSL(hsl);
- dataSeries.highlightedColor = highlightedColor;
- dataSeries.color = color;
- }
-
- if (value instanceof tr.v.Histogram) {
- dataSeries.target = value;
- data[name] = value.sum;
- } else if (typeof value === 'number') {
- data[name] = value;
- } else {
- throw new Error('unsupported value ' + value);
- }
- }
-
- this.chart_.data = [data];
- this.$.nans.style.display = tableRows.length ? 'block' : 'none';
- this.$.table.tableRows = tableRows;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span_test.html
deleted file mode 100644
index d7a665ad2b0..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/breakdown_span_test.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/breakdown.html">
-<link rel="import" href="/tracing/value/diagnostics/related_histogram_breakdown.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/breakdown_span.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_RelatedHistogramBreakdown', function() {
- var foo = new tr.v.Histogram('foo', tr.b.Unit.byName.timeDurationInMs);
- var bar = new tr.v.Histogram('bar', tr.b.Unit.byName.timeDurationInMs);
- for (var i = 0; i < 1e2; ++i) {
- foo.addSample(Math.random());
- bar.addSample(Math.random());
- }
- var breakdown = new tr.v.d.RelatedHistogramBreakdown();
- breakdown.add(foo);
- breakdown.add(bar);
- var span = tr.v.ui.createDiagnosticSpan(breakdown);
- assert.strictEqual('TR-V-UI-BREAKDOWN-SPAN', span.tagName);
- this.addHTMLOutput(span);
- });
-
- test('instantiate_Breakdown', function() {
- var breakdown = new tr.v.d.Breakdown();
- breakdown.colorScheme =
- tr.v.d.COLOR_SCHEME_CHROME_USER_FRIENDLY_CATEGORY_DRIVER;
- breakdown.set('script', 42);
- breakdown.set('style', 57);
-
- // Test weird numbers.
- breakdown.set('ba---a', NaN);
- breakdown.set('inf', Infinity);
- breakdown.set('-inf', -Infinity);
- breakdown.set('goose egg', 0);
- breakdown.set('<0', -1);
-
- // Test round-tripping.
- breakdown = tr.v.d.Diagnostic.fromDict(breakdown.asDict());
-
- var span = tr.v.ui.createDiagnosticSpan(breakdown);
- assert.strictEqual('TR-V-UI-BREAKDOWN-SPAN', span.tagName);
- this.addHTMLOutput(span);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table.html b/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table.html
deleted file mode 100644
index 1d9bcc5dd45..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<dom-module id="tr-v-ui-diagnostic-map-table">
- <template>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-
- <script>
- 'use strict';
-
- Polymer({
- is: 'tr-v-ui-diagnostic-map-table',
-
- created: function() {
- this.diagnosticMaps_ = undefined;
- },
-
- /**
- * The |title| will be used as the heading for the column containing
- * diagnostic-spans for |diagnosticMap|'s Diagnostics.
- *
- * @param {!Array.<!Object>} maps
- * @param {!string} maps[].title
- * @param {!tr.v.d.DiagnosticMap} maps[].diagnosticMap
- */
- set diagnosticMaps(maps) {
- this.diagnosticMaps_ = maps;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.diagnosticMaps_ === undefined ||
- this.diagnosticMaps_.length === 0) {
- this.$.table.tableRows = [];
- this.$.table.tableColumns = [];
- return;
- }
-
- var columnTitles = new Set();
- for (var map of this.diagnosticMaps_)
- for (var [name, diagnostic] of map)
- columnTitles.add(name);
-
- var columns = [];
- function makeColumn(title) {
- return {
- title: title,
- value: function(map) {
- var diagnostic = map.get(title);
- if (!diagnostic)
- return '';
-
- return tr.v.ui.createDiagnosticSpan(diagnostic);
- }
- };
- }
- for (var title of columnTitles)
- columns.push(makeColumn(title));
-
- this.$.table.tableColumns = columns;
- this.$.table.tableRows = this.diagnosticMaps_;
- this.$.table.rebuild();
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table_test.html
deleted file mode 100644
index ac051aaeda5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_map_table_test.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_map_table.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var map0 = new tr.v.d.DiagnosticMap();
- map0.set('genericA', new tr.v.d.Generic({a: 0}));
- map0.set('genericB', new tr.v.d.Generic({b: 0}));
- var map1 = new tr.v.d.DiagnosticMap();
- map1.set('genericA', new tr.v.d.Generic({a: 1}));
- map1.set('genericB', new tr.v.d.Generic({b: 1}));
- var table = document.createElement('tr-v-ui-diagnostic-map-table');
- table.diagnosticMaps = [map0, map1];
- this.addHTMLOutput(table);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_span.html
deleted file mode 100644
index b22c76a3955..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/diagnostic_span.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
-<link rel="import" href="/tracing/value/ui/breakdown_span.html">
-<link rel="import" href="/tracing/value/ui/generic_diagnostic_span.html">
-<link rel="import" href="/tracing/value/ui/iteration_info_span.html">
-<link rel="import" href="/tracing/value/ui/related_event_set_span.html">
-<link rel="import" href="/tracing/value/ui/related_value_map_span.html">
-<link rel="import" href="/tracing/value/ui/related_value_set_span.html">
-<link rel="import" href="/tracing/value/ui/scalar_diagnostic_span.html">
-
-<script>
-'use strict';
-tr.exportTo('tr.v.ui', function() {
- /**
- * Find the name of a polymer element registered to display |diagnostic|
- * or one of its base classes.
- *
- * @param {!tr.v.d.Diagnostic} diagnostic
- * @return {string}
- */
- function findElementNameForDiagnostic(diagnostic) {
- var typeInfo = undefined;
- var curProto = diagnostic.constructor.prototype;
- while (curProto) {
- typeInfo = tr.v.d.Diagnostic.findTypeInfo(curProto.constructor);
- if (typeInfo && typeInfo.metadata.elementName)
- break;
- typeInfo = undefined;
- curProto = curProto.__proto__;
- }
-
- if (typeInfo === undefined) {
- throw new Error(
- diagnostic.constructor.name +
- ' or a base class must have a registered elementName');
- }
-
- var tagName = typeInfo.metadata.elementName;
-
- if (tr.ui.b.isUnknownElementName(tagName))
- throw new Error('Element not registered: ' + tagName);
-
- return tagName;
- }
-
- /**
- * Create a visualization for |diagnostic|.
- *
- * @param {!tr.v.d.Diagnostic} diagnostic
- * @return {Element}
- */
- function createDiagnosticSpan(diagnostic) {
- var tagName = findElementNameForDiagnostic(diagnostic);
- var span = document.createElement(tagName);
- span.diagnostic = diagnostic;
- return span;
- }
-
- return {
- createDiagnosticSpan: createDiagnosticSpan
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span.html
deleted file mode 100644
index 9ca063312e6..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-
-<dom-module id="tr-v-ui-generic-diagnostic-span">
- <template>
- <tr-ui-a-generic-object-view id="generic"></tr-ui-a-generic-object-view>
- </template>
-
- <script>
- 'use strict';
- Polymer({
- is: 'tr-v-ui-generic-diagnostic-span',
-
- ready: function() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.diagnostic === undefined) {
- this.$.generic.object = undefined;
- return;
- }
-
- this.$.generic.object = this.diagnostic.value;
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span_test.html
deleted file mode 100644
index d6b8727381f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_diagnostic_span_test.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/generic.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var diagnostic = new tr.v.d.Generic({foo: 'bar', baz: [42]});
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-GENERIC-DIAGNOSTIC-SPAN', span.tagName);
- this.addHTMLOutput(span);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view.html b/chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view.html
deleted file mode 100644
index f88debafc1b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view.html
+++ /dev/null
@@ -1,301 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/ui/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/generic_table.html">
-<link rel="import" href="/tracing/value/ui/array_of_numbers_span.html">
-
-<dom-module id='tr-v-ui-generic-table-view'>
- <template>
- <style>
- :host {
- display: flex;
- }
- #table {
- flex: 1 1 auto;
- align-self: stretch;
- }
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v.ui', function() {
- var TEXT_COLUMN_MODE = 1;
- var NUMERIC_COLUMN_MODE = 2;
- var ELEMENT_COLUMN_MODE = 3;
-
- function isNumeric(value) {
- // TODO(nduca): Also consider other units that are numeric.
- if ((typeof value) === 'number')
- return true;
- else if (value instanceof Number)
- return true;
- return false;
- }
-
- function GenericTableViewTotalsItem(opt_values) {
- if (opt_values !== undefined)
- this.values = opt_values;
- else
- this.values = [];
- }
-
- function GenericTableViewColumnDescriptor(fieldName, firstFieldValue) {
- this.title = fieldName;
- this.fieldName = fieldName;
-
- this.updateModeGivenValue(firstFieldValue);
- }
-
- GenericTableViewColumnDescriptor.prototype = {
- get columnMode() {
- return this.columnMode_;
- },
-
- get isInNumericMode() {
- return this.columnMode_ === NUMERIC_COLUMN_MODE;
- },
-
- cmp: function(a, b) {
- if (this.columnMode_ === ELEMENT_COLUMN_MODE)
- return 0;
-
- return tr.b.comparePossiblyUndefinedValues(a, b, function(a, b) {
- var vA = a[this.fieldName];
- var vB = b[this.fieldName];
- return tr.b.comparePossiblyUndefinedValues(vA, vB, function(vA, vB) {
- if (vA.localeCompare)
- return vA.localeCompare(vB);
- return vA - vB;
- }, this);
- }, this);
- },
-
- updateModeGivenValue: function(fieldValue) {
- if (this.columnMode_ === undefined) {
- if (fieldValue === undefined || fieldValue === null)
- return;
-
- if (isNumeric(fieldValue)) {
- this.columnMode_ = NUMERIC_COLUMN_MODE;
- return;
- }
-
- if (fieldValue instanceof HTMLElement) {
- this.columnMode_ = ELEMENT_COLUMN_MODE;
- return;
- }
-
- this.columnMode_ = TEXT_COLUMN_MODE;
- return;
- }
-
- // Undefineds & nulls shouldn't change the mode.
- if (fieldValue === undefined || fieldValue === null)
- return;
-
- // If we were already in numeric mode, then we don't
- // need to put it into numeric mode again. And, if we were
- // previously in text mode, then we can't go into numeric mode now.
- if (isNumeric(fieldValue))
- return;
-
- if (fieldValue instanceof HTMLElement) {
- this.columnMode_ = ELEMENT_COLUMN_MODE;
- return;
- }
-
- if (this.columnMode_ === NUMERIC_COLUMN_MODE)
- this.columnMode_ = TEXT_COLUMN_MODE;
- },
-
- value: function(item) {
- var fieldValue = item[this.fieldName];
- if (fieldValue instanceof GenericTableViewTotalsItem) {
- var span = document.createElement('tr-v-ui-array-of-numbers-span');
- span.summaryMode = tr.v.ui.ArrayOfNumbersSummaryModes.TOTAL_MODE;
- span.numbers = fieldValue.values;
- return span;
- }
-
- if (fieldValue === undefined)
- return '-';
-
- if (fieldValue instanceof HTMLElement)
- return fieldValue;
-
- if (fieldValue instanceof Object) {
- var gov = document.createElement('tr-ui-a-generic-object-view');
- gov.object = fieldValue;
- return gov;
- }
-
- // TODO(nduca): Use units objects if applicable.
- return fieldValue;
- }
- };
-
- Polymer({
- is: 'tr-v-ui-generic-table-view',
-
- created: function() {
- this.items_ = undefined;
- this.importantColumNames_ = [];
- },
-
- get items() {
- return this.items_;
- },
-
- set items(itemsOrGenericTable) {
- if (itemsOrGenericTable === undefined) {
- this.items_ = undefined;
- } else if (itemsOrGenericTable instanceof Array) {
- this.items_ = itemsOrGenericTable;
- } else if (itemsOrGenericTable instanceof tr.v.GenericTable) {
- this.items_ = itemsOrGenericTable.items;
- }
- this.updateContents_();
- },
-
- get importantColumNames() {
- return this.importantColumNames_;
- },
-
- set importantColumNames(importantColumNames) {
- this.importantColumNames_ = importantColumNames;
- this.updateContents_();
- },
-
- createColumns_: function() {
- var columnsByName = {};
- this.items_.forEach(function(item) {
- tr.b.iterItems(item, function(itemFieldName, itemFieldValue) {
- var colDesc = columnsByName[itemFieldName];
- if (colDesc !== undefined) {
- colDesc.updateModeGivenValue(itemFieldValue);
- return;
- }
-
- colDesc = new GenericTableViewColumnDescriptor(
- itemFieldName, itemFieldValue);
- columnsByName[itemFieldName] = colDesc;
- }, this);
- }, this);
-
- var columns = tr.b.dictionaryValues(columnsByName);
- if (columns.length === 0)
- return undefined;
-
- // Sort by name.
- var isColumnNameImportant = {};
- var importantColumNames = this.importantColumNames || [];
- importantColumNames.forEach(function(icn) {
- isColumnNameImportant[icn] = true;
- });
- columns.sort(function(a, b) {
- var iA = isColumnNameImportant[a.title] ? 1 : 0;
- var iB = isColumnNameImportant[b.title] ? 1 : 0;
- if ((iB - iA) !== 0)
- return iB - iA;
- return a.title.localeCompare(b.title);
- });
-
- // Set sizes. This is convoluted by the fact that the first
- // table column must have fixed size.
- var colWidthPercentage;
- if (columns.length === 1)
- colWidthPercentage = '100%';
- else
- colWidthPercentage = (100 / (columns.length - 1)).toFixed(3) + '%';
- columns[0].width = '250px';
- for (var i = 1; i < columns.length; i++)
- columns[i].width = colWidthPercentage;
-
- return columns;
- },
-
- createFooterRowsIfNeeded_: function(columns) {
- // Make totals row if needed.
- var hasColumnThatIsNumeric = columns.some(function(column) {
- return column.isInNumericMode;
- });
- if (!hasColumnThatIsNumeric)
- return [];
-
- var totalsItems = {};
- columns.forEach(function(column) {
- if (!column.isInNumericMode)
- return;
- var totalsItem = new GenericTableViewTotalsItem();
- this.items_.forEach(function(item) {
- var fieldValue = item[column.fieldName];
- if (fieldValue === undefined || fieldValue === null)
- return;
- totalsItem.values.push(fieldValue);
- });
- totalsItems[column.fieldName] = totalsItem;
- }, this);
-
- return [totalsItems];
- },
-
- updateContents_: function() {
- var columns;
- if (this.items_ !== undefined)
- columns = this.createColumns_();
-
- if (!columns) {
- this.$.table.tableColumns = [];
- this.$.table.tableRows = [];
- this.$.table.footerRows = [];
- return;
- }
-
- this.$.table.tableColumns = columns;
- this.$.table.tableRows = this.items_;
- this.$.table.footerRows = this.createFooterRowsIfNeeded_(columns);
- this.$.table.rebuild();
- },
-
- get selectionMode() {
- return this.$.table.selectionMode;
- },
-
- set selectionMode(selectionMode) {
- this.$.table.selectionMode = selectionMode;
- },
-
- get rowHighlightStyle() {
- return this.$.table.rowHighlightStyle;
- },
-
- set rowHighlightStyle(rowHighlightStyle) {
- this.$.table.rowHighlightStyle = rowHighlightStyle;
- },
-
- get cellHighlightStyle() {
- return this.$.table.cellHighlightStyle;
- },
-
- set cellHighlightStyle(cellHighlightStyle) {
- this.$.table.cellHighlightStyle = cellHighlightStyle;
- }
- });
-
- return {
- GenericTableViewTotalsItem: GenericTableViewTotalsItem,
- GenericTableViewColumnDescriptor: GenericTableViewColumnDescriptor
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view_test.html
deleted file mode 100644
index 85bfe45f2c7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/generic_table_view_test.html
+++ /dev/null
@@ -1,199 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/generic_table.html">
-<link rel="import" href="/tracing/value/ui/generic_table_view.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var GenericTableViewColumnDescriptor =
- tr.v.ui.GenericTableViewColumnDescriptor;
- var GenericTableViewTotalsItem = tr.v.ui.GenericTableViewTotalsItem;
-
- test('descBasicNumericMode', function() {
- var colDesc = new GenericTableViewColumnDescriptor('a');
- assert.isFalse(colDesc.isInNumericMode);
-
- colDesc.updateModeGivenValue(4);
- assert.isTrue(colDesc.isInNumericMode);
-
- colDesc.updateModeGivenValue(4);
- assert.isTrue(colDesc.isInNumericMode);
-
- colDesc.updateModeGivenValue(undefined);
- colDesc.updateModeGivenValue(null);
- assert.isTrue(colDesc.isInNumericMode);
-
- colDesc.updateModeGivenValue('a');
- assert.isFalse(colDesc.isInNumericMode);
- });
-
- test('descBasicNonNumericMode', function() {
- var colDesc = new GenericTableViewColumnDescriptor('a');
- assert.isFalse(colDesc.isInNumericMode);
- colDesc.updateModeGivenValue(4);
- assert.isTrue(colDesc.isInNumericMode);
- colDesc.updateModeGivenValue('a');
- assert.isFalse(colDesc.isInNumericMode);
- });
-
- test('descCmpWithNumbers', function() {
- var colDesc = new GenericTableViewColumnDescriptor('a', 1);
- assert.equal(colDesc.cmp({a: 1}, {a: 2}), -1);
- assert.equal(colDesc.cmp({a: 1}, undefined), -1);
- });
-
- test('descCmpWithText', function() {
- var colDesc = new GenericTableViewColumnDescriptor('a', 'text');
- assert.equal(colDesc.cmp({a: 'a'}, {a: 'b'}), -1);
- assert.equal(colDesc.cmp({a: 'a'}, undefined), -1);
- });
-
- test('descValue', function() {
- var colDesc = new GenericTableViewColumnDescriptor('a', 1);
- var value = colDesc.value({a: undefined});
- assert.equal(value, '-');
-
- value = colDesc.value({a: 3});
- assert.equal(value, 3);
-
- var totalsValue = colDesc.value(
- {a: new GenericTableViewTotalsItem([1, 2, 3])});
- assert.equal(totalsValue.tagName.toLowerCase(),
- 'tr-v-ui-array-of-numbers-span');
- assert.deepEqual(totalsValue.numbers, [1, 2, 3]);
- });
-
- test('everythingTogether', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [
- {
- a: 'someString',
- b: 2,
- c: 'adsf'
- },
- {
- a: 'someOtherString',
- b: 2,
- c: 'adsf'
- }
- ];
- this.addHTMLOutput(table);
- });
-
- test('summableColumn', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [
- {
- a: 1
- },
- {
- a: 2
- },
- {
- a: 3
- }
- ];
- this.addHTMLOutput(table);
-
- assert.equal(table.$.table.tableColumns.length, 1);
- assert.equal(table.$.table.tableRows.length, 3);
- assert.isTrue(table.$.table.tableColumns[0].isInNumericMode);
- assert.equal(table.$.table.tableColumns[0].fieldName, 'a');
- var totalsItem = table.$.table.footerRows[0].a;
- assert.deepEqual(totalsItem.values, [1, 2, 3]);
- });
-
-
- test('usingGenericTable', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = new tr.v.GenericTable([
- {
- a: 1
- }
- ]);
- assert.equal(table.items.length, 1);
- });
-
- test('valueIsObject', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = new tr.v.GenericTable([
- {
- a: {x: 1, y: 'string'}
- },
- {
- a: 'something'
- }
- ]);
- this.addHTMLOutput(table);
- assert.equal(table.items.length, 2);
- });
-
- test('mixedTypeTable', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [
- {
- a: 1
- },
- {
- a: 2
- },
- {
- b: 'c'
- }
- ];
- this.addHTMLOutput(table);
- });
-
- test('tableWithElement', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [
- {
- a: 1
- },
- {
- a: tr.ui.b.createSpan({textContent: 'ohai'})
- },
- {
- b: 'c'
- }
- ];
- this.addHTMLOutput(table);
- });
-
-
- test('emptyTable', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [{}];
- assert.equal(table.$.table.tableColumns.length, 0);
- });
-
- test('undefinedAndValue', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [
- {
- },
- {
- a: 2
- }
- ];
- this.addHTMLOutput(table);
- });
-
- test('undefinedOnly', function() {
- var table = document.createElement('tr-v-ui-generic-table-view');
- table.items = [
- {
- a: undefined
- }
- ];
- this.addHTMLOutput(table);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span.html
deleted file mode 100644
index 31109ff72cf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span.html
+++ /dev/null
@@ -1,299 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/statistics.html">
-<link rel="import" href="/tracing/ui/base/bar_chart.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_map_table.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-<link rel="import" href="/tracing/value/ui/scalar_map_table.html">
-
-<dom-module id='tr-v-ui-histogram-span'>
- <template>
- <style>
- #container {
- display: flex;
- flex-direction: row;
- }
- #chart {
- flex-grow: 1;
- }
- #chart svg {
- display: block;
- }
- </style>
-
- <div id="container">
- <div id="chart"></div>
- <div id="stats_container">
- <tr-v-ui-scalar-map-table id="stats"></tr-v-ui-scalar-map-table>
- </div>
- </div>
-
- <tr-v-ui-diagnostic-map-table id="histogram_diagnostics"></tr-v-ui-diagnostic-map-table>
- <tr-v-ui-diagnostic-map-table id="sample_diagnostics"></tr-v-ui-diagnostic-map-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-var DELTA = String.fromCharCode(916);
-
-var ABS_DELTA_AVG_NAME = 'abs' + DELTA + 'avg';
-
-Polymer({
- is: 'tr-v-ui-histogram-span',
-
- created: function() {
- this.histogram_ = undefined;
- this.referenceHistogram_ = undefined;
- this.chart_ = new tr.ui.b.BarChart();
- this.chart_.width = 300;
- this.chart_.height = 200;
- this.chart_.margin.top = 20;
- this.chart_.margin.bottom = 28;
- this.chart_.margin.left = 30;
- this.chart_.margin.right = 30;
- this.mouseDownBin_ = undefined;
- this.brushedBins_ = [];
- this.chart_.addEventListener('item-mousedown',
- this.onMouseDown_.bind(this));
- this.chart_.addEventListener('item-mousemove',
- this.onMouseMove_.bind(this));
- this.chart_.addEventListener('item-mouseup',
- this.onMouseUp_.bind(this));
- this.chart_.hideLegend = true;
- },
-
- ready: function() {
- Polymer.dom(this.$.chart).appendChild(this.chart_);
- },
-
- get chartWidth() {
- return this.chart_.width;
- },
-
- set chartWidth(width) {
- this.chart_.width = width;
- },
-
- get chartHeight() {
- return this.chart_.height;
- },
-
- set chartHeight(height) {
- this.chart_.height = height;
- },
-
- get brushedBins() {
- return this.brushedBins_;
- },
-
- updateBrushedRange_: function(currentX) {
- this.brushedBins_ = [this.histogram_.getBinForValue(currentX)];
- var r = new tr.b.Range();
- r.addValue(this.mouseDownX_);
- r.addValue(currentX);
-
- // Collect bins:
- var centralMin = Number.MAX_VALUE;
- var centralMax = -Number.MAX_VALUE;
- this.histogram_.centralBins.forEach(function(bin) {
- centralMin = Math.min(centralMin, bin.range.min);
- centralMax = Math.max(centralMax, bin.range.max);
- if ((bin.range.max > r.min) &&
- (bin.range.min < r.max) &&
- (this.brushedBins_.indexOf(bin) < 0))
- this.brushedBins_.push(bin);
- }, this);
- if ((this.histogram_.underflowBin.range.max > r.min) &&
- (this.brushedBins_.indexOf(this.histogram_.underflowBin) < 0)) {
- this.brushedBins_.push(this.histogram_.underflowBin);
- }
- if ((this.histogram_.overflowBin.range.min < r.max) &&
- (this.brushedBins_.indexOf(this.histogram_.overflowBin) < 0)) {
- this.brushedBins_.push(this.histogram_.overflowBin);
- }
- this.brushedBins_.sort(function(a, b) {
- return a.range.min - b.range.min;
- });
-
- // Prevent Infinity:
- var minBin = this.histogram_.getBinForValue(r.min);
- var maxBin = this.histogram_.getBinForValue(r.max);
- var binWidth = this.histogram_.centralBins[0].range.range;
- r.min = minBin ? Math.max(centralMin - binWidth, minBin.range.min) :
- centralMin - binWidth;
- r.max = maxBin ? Math.min(centralMax + binWidth, maxBin.range.max) :
- centralMax + binWidth;
-
- this.chart_.brushedRange = r;
- },
-
- onMouseDown_: function(chartEvent) {
- chartEvent.stopPropagation();
- if (!this.histogram_)
- return;
- this.mouseDownX_ = chartEvent.x;
- this.updateBrushedRange_(chartEvent.x);
- },
-
- onMouseMove_: function(chartEvent) {
- chartEvent.stopPropagation();
- if (!this.histogram_)
- return;
- this.updateBrushedRange_(chartEvent.x);
- },
-
- onMouseUp_: function(chartEvent) {
- chartEvent.stopPropagation();
- if (!this.histogram_)
- return;
- this.updateBrushedRange_(chartEvent.x);
- this.updateDiagnostics_(this.brushedBins);
- this.mouseDownX_ = undefined;
- },
-
- updateDiagnostics_: function(bins) {
- var maps = [];
- for (var bin of bins)
- for (var map of bin.diagnosticMaps)
- maps.push(map);
-
- if (maps.length === 0) {
- this.$.sample_diagnostics.style.display = 'none';
- return;
- }
-
- this.$.sample_diagnostics.diagnosticMaps = maps;
- this.$.sample_diagnostics.style.display = 'block';
- },
-
- get histogram() {
- return this.histogram_;
- },
-
- set histogram(histogram) {
- if (histogram === this.histogram_) {
- return;
- }
- this.histogram_ = histogram;
- this.updateContents_();
- },
-
- get referenceHistogram() {
- return this.referenceHistogram_;
- },
-
- set referenceHistogram(histogram) {
- if (histogram === this.referenceHistogram_) {
- return;
- }
- this.referenceHistogram_ = histogram;
- if (this.histogram) {
- this.updateContents_();
- }
- },
-
- getDeltaScalars_: function(scalarMap) {
- if (!(this.referenceHistogram instanceof tr.v.Histogram) ||
- (this.histogram.unit !== this.referenceHistogram.unit) ||
- (this.histogram.numValues === 0) &&
- (this.referenceHistogram.numValues === 0)) {
- return;
- }
-
- var absDeltaAvg = this.histogram.average -
- this.referenceHistogram.average;
- scalarMap.set(ABS_DELTA_AVG_NAME, new tr.v.ScalarNumeric(
- this.histogram.unit.correspondingDeltaUnit,
- absDeltaAvg));
-
- var suffix = tr.b.Unit.nameSuffixForImprovementDirection(
- this.histogram.unit.improvementDirection);
-
- scalarMap.set('%' + DELTA + 'avg', new tr.v.ScalarNumeric(
- tr.b.Unit.byName['normalizedPercentageDelta' + suffix],
- absDeltaAvg / this.referenceHistogram.average));
-
- scalarMap.set('z-score', new tr.v.ScalarNumeric(
- tr.b.Unit.byName['sigmaDelta' + suffix],
- absDeltaAvg / this.referenceHistogram.standardDeviation));
-
- var mwu = tr.b.Statistics.mwu(
- this.histogram.sampleValues, this.referenceHistogram.sampleValues);
- scalarMap.set('p-value', new tr.v.ScalarNumeric(
- tr.b.Unit.byName.unitlessNumber,
- mwu.p));
-
- scalarMap.set('U', new tr.v.ScalarNumeric(
- tr.b.Unit.byName.unitlessNumber,
- mwu.U));
-
- if (this.histogram.unit.improvementDirection !==
- tr.b.ImprovementDirection.DONT_CARE) {
- this.$.stats.setSignificanceForKey(ABS_DELTA_AVG_NAME, mwu.significance);
- }
- },
-
- set isYLogScale(logScale) {
- this.chart_.isYLogScale = logScale;
- },
-
- updateContents_: function() {
- this.$.chart.style.display = this.histogram_ ? '' : 'none';
- this.$.sample_diagnostics.style.display = 'none';
- this.brushedBins_ = [];
- if (!this.histogram_)
- return;
-
- this.$.container.style.display = '';
-
- var scalarMap = new Map();
- this.getDeltaScalars_(scalarMap);
- for (var [name, scalar] of this.histogram_.statisticsScalars) {
- scalarMap.set(name, scalar);
- }
- this.$.stats.scalarMap = scalarMap;
-
- this.chart_.xAxisLabel = '#';
- this.chart_.yAxisLabel = this.histogram.unit.unitString;
-
- // https://github.com/catapult-project/catapult/issues/2859
- // TODO(benjhayden) Compute chart_.height more intelligently:
- // consider number of bins; |set chartHeight| should override this logic
- // even when called before |set histogram|.
- this.chart_.height = Math.max(200,
- this.$.stats.getBoundingClientRect().height);
-
- var maximumBinValue = tr.b.Statistics.max(
- this.histogram_.allBins, bin => bin.count);
- var chartData = [];
- var binWidth = this.histogram_.centralBins[0].range.range;
- this.histogram_.allBins.forEach(function(bin) {
- var x = bin.range.min;
- if (x === -Number.MAX_VALUE) {
- if (!bin.count)
- return;
- x = bin.range.max - binWidth;
- }
- chartData.push({x: x, y: bin.count});
- });
- chartData.sort((x, y) => x.x - y.x);
- this.chart_.data = chartData;
- this.chart_.brushedRange = new tr.b.Range();
-
- if (this.histogram_.diagnostics.size > 0) {
- this.$.histogram_diagnostics.diagnosticMaps = [
- this.histogram_.diagnostics];
- this.$.histogram_diagnostics.style.display = 'block';
- } else {
- this.$.histogram_diagnostics.style.display = 'none';
- }
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span_test.html
deleted file mode 100644
index 38942e87614..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/histogram_span_test.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-<link rel="import" href="/tracing/value/diagnostics/generic.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/histogram_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('basic', function() {
- var h = new tr.v.Histogram('', tr.b.Unit.byName.unitlessNumber);
- h.addSample(-1, {foo: new tr.v.d.Generic('a')});
- h.addSample(0, {foo: new tr.v.d.Generic('b')});
- h.addSample(0, {foo: new tr.v.d.Generic('b')});
- h.addSample(0, {foo: new tr.v.d.Generic('b')});
- h.addSample(0, {foo: new tr.v.d.Generic('b')});
- h.addSample(0, {foo: new tr.v.d.Generic('b')});
- h.addSample(0, {foo: new tr.v.d.Generic('b')});
- h.addSample(0, {foo: new tr.v.d.Generic('c')});
- h.addSample(500, {foo: new tr.v.d.Generic('c')});
- h.addSample(999, {foo: new tr.v.d.Generic('d')});
- h.addSample(1000, {foo: new tr.v.d.Generic('d')});
-
- var span = document.createElement('tr-v-ui-histogram-span');
- span.histogram = h;
- this.addHTMLOutput(span);
- });
-
- test('undefined', function() {
- var span = document.createElement('tr-v-ui-histogram-span');
- span.histogram = undefined;
- this.addHTMLOutput(span);
- });
-
- test('emptyHistogram', function() {
- var h = new tr.v.Histogram('', tr.b.Unit.byName.unitlessNumber);
-
- var span = document.createElement('tr-v-ui-histogram-span');
- span.histogram = h;
- this.addHTMLOutput(span);
- });
-
- test('nans', function() {
- var h = new tr.v.Histogram('', tr.b.Unit.byName.unitlessNumber);
- h.addSample(undefined, {foo: new tr.v.d.Generic('b')});
- h.addSample(NaN, {foo: new tr.v.d.Generic('c')});
- h.customizeSummaryOptions({nans: true});
-
- var span = document.createElement('tr-v-ui-histogram-span');
- span.histogram = h;
- this.addHTMLOutput(span);
- });
-
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/iteration_info_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/iteration_info_span.html
deleted file mode 100644
index 6b7d52be4b1..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/iteration_info_span.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/table.html">
-
-<dom-module id="tr-v-ui-iteration-info-span">
- <template>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-<script>
-'use strict';
-Polymer({
- is: 'tr-v-ui-iteration-info-span',
-
- ready: function() {
- this.diagnostic_ = undefined;
- this.$.table.showHeader = false;
- this.$.table.tableColumns = [
- {
- value: function(row) {
- return row[0];
- },
- },
- {
- value: function(row) {
- return row[1];
- }
- }
- ];
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- if (this.diagnostic === undefined) {
- this.$.table.tableRows = [];
- return;
- }
-
- var rows = [];
-
- if (this.diagnostic.osVersion) {
- rows.push(['OS version', this.diagnostic.osVersion]);
- }
- if (this.diagnostic.productVersion) {
- rows.push(['product version', this.diagnostic.productVersion]);
- }
- if (this.diagnostic.benchmarkName) {
- rows.push(['benchmark name', this.diagnostic.benchmarkName]);
- }
- if (this.diagnostic.benchmarkStart) {
- rows.push(['benchmark start', this.diagnostic.benchmarkStartString]);
- }
- if (this.diagnostic.storyUrl) {
- rows.push(['url', this.diagnostic.storyUrl]);
- }
- if (this.diagnostic.storyDisplayName) {
- rows.push(['story', this.diagnostic.storyDisplayName]);
- }
- if (this.diagnostic.storysetRepeatCounter !== undefined) {
- rows.push(['storyset repeat', this.diagnostic.storysetRepeatCounter]);
- }
- if (this.diagnostic.storyRepeatCounter !== undefined) {
- rows.push(['story repeat', this.diagnostic.storyRepeatCounter]);
- }
- if (this.diagnostic.label) {
- rows.push(['label', this.diagnostic.label]);
- }
- if (this.diagnostic.storyGroupingKeys &&
- (tr.b.dictionaryLength(this.diagnostic.storyGroupingKeys) > 0)) {
- var gov = document.createElement('tr-ui-a-generic-object-view');
- gov.object = this.diagnostic.storyGroupingKeys;
- rows.push(['grouping keys', gov]);
- }
- this.$.table.tableRows = rows;
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit.html b/chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit.html
deleted file mode 100644
index 988845d5f3e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-
-<script>
- 'use strict';
- Polymer({
- is: 'tr-v-ui-preferred-display-unit',
-
- ready: function() {
- this.preferredTimeDisplayMode_ = undefined;
- },
-
- attached: function() {
- tr.b.Unit.didPreferredTimeDisplayUnitChange();
- },
-
- detached: function() {
- tr.b.Unit.didPreferredTimeDisplayUnitChange();
- },
-
- // null means no-preference
- get preferredTimeDisplayMode() {
- return this.preferredTimeDisplayMode_;
- },
-
- set preferredTimeDisplayMode(v) {
- if (this.preferredTimeDisplayMode_ === v)
- return;
- this.preferredTimeDisplayMode_ = v;
- tr.b.Unit.didPreferredTimeDisplayUnitChange();
- }
-
- });
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit_test.html
deleted file mode 100644
index 8eef8b5fada..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/preferred_display_unit_test.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/value/ui/preferred_display_unit.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var unit = document.createElement('tr-v-ui-preferred-display-unit');
- var ms = tr.b.TimeDisplayModes.ms;
- unit.preferredDisplayUnit = ms;
- assert.equal(unit.preferredDisplayUnit, ms);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span.html
deleted file mode 100644
index dd04ccb7481..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-
-<dom-module id="tr-v-ui-related-event-set-span">
- <script>
- 'use strict';
- Polymer({
- is: 'tr-v-ui-related-event-set-span',
-
- ready: function() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- Polymer.dom(this).textContent = '';
- var events = new tr.model.EventSet([...this.diagnostic]);
- var link = document.createElement('tr-ui-a-analysis-link');
- var label = events.length + ' events';
- if (events.length === 1) {
- var event = tr.b.getOnlyElement(events);
- label = event.title + ' ';
- label += tr.b.Unit.byName.timeDurationInMs.format(
- event.duration);
- }
- link.setSelectionAndContent(events, label);
- Polymer.dom(this).appendChild(link);
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span_test.html
deleted file mode 100644
index bbf729f78d7..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/related_event_set_span_test.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/core/test_utils.html">
-<link rel="import" href="/tracing/value/diagnostics/related_event_set.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_RelatedEventSet0', function() {
- var diagnostic = new tr.v.d.RelatedEventSet();
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-RELATED-EVENT-SET-SPAN', span.tagName);
- this.addHTMLOutput(span);
- assert.strictEqual('0 events', span.textContent);
- });
-
- test('instantiate_RelatedEventSet1', function() {
- var diagnostic = new tr.v.d.RelatedEventSet();
- tr.c.TestUtils.newModel(function(model) {
- var proc = model.getOrCreateProcess(1);
- var thread = proc.getOrCreateThread(2);
- var event = tr.c.TestUtils.newSliceEx(
- {title: 'a', start: 0, duration: 1});
- thread.sliceGroup.pushSlice(event);
- diagnostic.add(event);
- });
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-RELATED-EVENT-SET-SPAN', span.tagName);
- this.addHTMLOutput(span);
- assert.strictEqual('a 1.000 ms', span.textContent);
- });
-
- test('instantiate_RelatedEventSet2', function() {
- var diagnostic = new tr.v.d.RelatedEventSet();
- tr.c.TestUtils.newModel(function(model) {
- var proc = model.getOrCreateProcess(1);
- var thread = proc.getOrCreateThread(2);
- var event = tr.c.TestUtils.newSliceEx({start: 0, duration: 1});
- thread.sliceGroup.pushSlice(event);
- diagnostic.add(event);
- event = tr.c.TestUtils.newSliceEx({start: 1, duration: 1});
- thread.sliceGroup.pushSlice(event);
- diagnostic.add(event);
- });
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-RELATED-EVENT-SET-SPAN', span.tagName);
- this.addHTMLOutput(span);
- assert.strictEqual('2 events', span.textContent);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span.html
deleted file mode 100644
index cfc46c8303d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-
-<dom-module id="tr-v-ui-related-value-map-span">
- <script>
- 'use strict';
- Polymer({
- is: 'tr-v-ui-related-value-map-span',
-
- ready: function() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- Polymer.dom(this).textContent = '';
- for (var [name, value] of this.diagnostic) {
- var link = document.createElement('tr-ui-a-analysis-link');
- link.setSelectionAndContent(value, name);
- Polymer.dom(this).appendChild(link);
- Polymer.dom(this).appendChild(document.createElement('br'));
- }
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span_test.html
deleted file mode 100644
index b57e3e4cbf5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_map_span_test.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/related_value_map.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_RelatedValueMap', function() {
- var aValue = new tr.v.Histogram('a', tr.b.Unit.byName.unitlessNumber);
- var bValue = new tr.v.Histogram('b', tr.b.Unit.byName.unitlessNumber);
- var diagnostic = new tr.v.d.RelatedValueMap();
- diagnostic.set('foo', aValue);
- diagnostic.set('bar', bValue);
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-RELATED-VALUE-MAP-SPAN', span.tagName);
- this.addHTMLOutput(span);
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(
- span, function(element) {
- return element.textContent === 'foo';
- }));
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(
- span, function(element) {
- return element.textContent === 'bar';
- }));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span.html
deleted file mode 100644
index 46417601c41..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/analysis/analysis_link.html">
-
-<dom-module id="tr-v-ui-related-value-set-span">
- <script>
- 'use strict';
- Polymer({
- is: 'tr-v-ui-related-value-set-span',
-
- ready: function() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- Polymer.dom(this).textContent = '';
- for (var value of this.diagnostic) {
- var link = document.createElement('tr-ui-a-analysis-link');
- link.setSelectionAndContent(value, value.name);
- Polymer.dom(this).appendChild(link);
- Polymer.dom(this).appendChild(document.createElement('br'));
- }
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span_test.html
deleted file mode 100644
index 05364e4c6c4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/related_value_set_span_test.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/related_value_set.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate_RelatedValueSet', function() {
- var aValue = new tr.v.Histogram('a', tr.b.Unit.byName.unitlessNumber);
- var bValue = new tr.v.Histogram('b', tr.b.Unit.byName.unitlessNumber);
- var diagnostic = new tr.v.d.RelatedValueSet([aValue, bValue]);
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-RELATED-VALUE-SET-SPAN', span.tagName);
- this.addHTMLOutput(span);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller.html
deleted file mode 100644
index f99a4558be2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller.html
+++ /dev/null
@@ -1,197 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/event.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/range.html">
-
-<dom-module id='tr-v-ui-scalar-context-controller'>
- <template></template>
-</dom-module>
-
-<!--
-@fileoverview Polymer element for controlling common context across scalar
-spans. To facilitate multiple separate contexts (e.g. a separate context for
-each table column), each scalar span has to specify which "context group"
-it belongs to:
-
- +============ some container element (e.g. <div>) ============+
- | |
- | <tr-v-ui-scalar-context-controller> |
- | ^ ^ |
- | | | |
- | v v |
- | .... Context group 1 .... .... Context group 2 .... |
- | : <tr-v-ui-scalar-span> : : <tr-v-ui-scalar-span> : |
- | : <tr-v-ui-scalar-span> : : <tr-v-ui-scalar-span> : . . . |
- | : . . . : : . . . : |
- | :.......................: :.......................: |
- +=============================================================+
-
-An element can find its enclosing context controller using the
-getScalarContextControllerForElement(node) defined in this file. Scalar spans
-can push their state to the controller using the following three methods:
-
- 1. onScalarSpanAdded(contextGroup, span)
- This method should be called when a span is attached to the DOM tree (or
- afterwards when added to a context group).
-
- 2. onScalarSpanRemoved(contextGroup, span)
- This method should be called when a span is detached from the DOM tree (or
- beforehand when removed from a context group).
-
- 3. onScalarSpanUpdated(contextGroup, span)
- This method should be called when a span's value changes.
-
-Note: If a span wants to change its context group, it should first call
-onScalarSpanRemoved with the old group and then onScalarSpanAdded with the new
-group.
-
-If one or more group contexts are modified (due to one of the three methods
-above), the controller will asynchronously (at the next RAF) update them and
-fire a 'context-updated' event. Scalar spans can listen for this event and
-update their UI accordingly.
-
-The context currently consists of the range of values of the associated spans.
-This allows automatic display of relative sizes using sparklines.
-
-The controller design is based on:
-https://docs.google.com/document/d/16ih8yYK8kF8MMlPnB-5KlyfS_AjjtbyAfi3pkxoZ8xs/edit?usp=sharing
--->
-<script>
-'use strict';
-
-tr.exportTo('tr.v.ui', function() {
-
- Polymer({
- is: 'tr-v-ui-scalar-context-controller',
-
- created: function() {
- this.host_ = undefined;
- this.groupToContext_ = new Map();
- this.dirtyGroups_ = new Set();
- },
-
- attached: function() {
- if (this.host_) {
- throw new Error(
- 'Scalar context controller is already attached to a host');
- }
-
- var host = findParentOrHost(this);
- if (host.__scalarContextController) {
- throw new Error(
- 'Multiple scalar context controllers attached to this host');
- }
-
- host.__scalarContextController = this;
- this.host_ = host;
- },
-
- detached: function() {
- if (!this.host_)
- throw new Error('Scalar context controller is not attached to a host');
- if (this.host_.__scalarContextController !== this) {
- throw new Error(
- 'Scalar context controller is not attached to its host');
- }
-
- delete this.host_.__scalarContextController;
- this.host_ = undefined;
- },
-
- getContext: function(group) {
- return this.groupToContext_.get(group);
- },
-
- onScalarSpanAdded: function(group, span) {
- var context = this.groupToContext_.get(group);
- if (context === undefined) {
- context = {
- spans: new Set(),
- range: new tr.b.Range()
- };
- this.groupToContext_.set(group, context);
- }
- if (context.spans.has(span))
- throw new Error('Scalar span already registered with group: ' + group);
- context.spans.add(span);
- this._markGroupDirtyAndScheduleUpdate(group);
- },
-
- onScalarSpanRemoved: function(group, span) {
- var context = this.groupToContext_.get(group);
- if (!context.spans.has(span))
- throw new Error('Scalar span not registered with group: ' + group);
- context.spans.delete(span);
- this._markGroupDirtyAndScheduleUpdate(group);
- },
-
- onScalarSpanUpdated: function(group, span) {
- var context = this.groupToContext_.get(group);
- if (!context.spans.has(span))
- throw new Error('Scalar span not registered with group: ' + group);
- this._markGroupDirtyAndScheduleUpdate(group);
- },
-
- _markGroupDirtyAndScheduleUpdate: function(group) {
- var alreadyDirty = this.dirtyGroups_.size > 0;
- this.dirtyGroups_.add(group);
- if (!alreadyDirty) {
- tr.b.requestAnimationFrameInThisFrameIfPossible(
- this.updateContext, this);
- }
- },
-
- updateContext: function() {
- var groups = this.dirtyGroups_;
- if (groups.size === 0)
- return;
- this.dirtyGroups_ = new Set();
-
- for (var group of groups)
- this.updateGroup_(group);
-
- var event = new tr.b.Event('context-updated');
- event.groups = groups;
- this.dispatchEvent(event);
- },
-
- updateGroup_: function(group) {
- var context = this.groupToContext_.get(group);
- if (context.spans.size === 0) {
- this.groupToContext_.delete(group);
- return;
- }
- context.range.reset();
- for (var span of context.spans)
- context.range.addValue(span.value);
- }
- });
-
- function getScalarContextControllerForElement(element) {
- while (element) {
- if (element.__scalarContextController)
- return element.__scalarContextController;
- element = findParentOrHost(element);
- }
- return undefined;
- }
-
- function findParentOrHost(node) {
- if (node.parentElement)
- return node.parentElement;
- while (Polymer.dom(node).parentNode)
- node = Polymer.dom(node).parentNode;
- return node.host;
- }
-
- return {
- getScalarContextControllerForElement: getScalarContextControllerForElement
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller_test.html
deleted file mode 100644
index dfee8fe6fc9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_context_controller_test.html
+++ /dev/null
@@ -1,311 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/value/ui/scalar_context_controller.html">
-
-<dom-module id='tr-v-ui-scalar-context-controller-mock-host'>
- <template>
- <tr-v-ui-scalar-context-controller id="controller">
- </tr-v-ui-scalar-context-controller>
- <content></content>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var getScalarContextControllerForElement =
- tr.v.ui.getScalarContextControllerForElement;
-
- Polymer({
- is: 'tr-v-ui-scalar-context-controller-mock-host'
- });
-
- test('getScalarContextControllerForElement', function() {
- var root = document.createElement('div');
- Polymer.dom(document.body).appendChild(root);
- try {
- assert.isUndefined(getScalarContextControllerForElement(root));
-
- // <div> root
- // |__<div> host1
- // |__<tr-v-ui-scalar-context-controller> c1
- var host1 = document.createElement('div');
- Polymer.dom(root).appendChild(host1);
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1));
- var c1 = document.createElement('tr-v-ui-scalar-context-controller');
- Polymer.dom(host1).appendChild(c1);
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
-
- // <div> root
- // |__<div> host1
- // | |__<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // :..<tr-v-ui-scalar-context-controller> c2
- var host2 = document.createElement(
- 'tr-v-ui-scalar-context-controller-mock-host');
- var c2 = host2.$.controller;
- Polymer.dom(root).appendChild(host2);
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
- assert.strictEqual(getScalarContextControllerForElement(host2), c2);
-
- // <div> root
- // |__<div> host1
- // | |__<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // | :..<tr-v-ui-scalar-context-controller> c2
- // |__<div> divA
- // |__<div> divB
- var divA = document.createElement('div');
- Polymer.dom(host2).appendChild(divA);
- assert.strictEqual(getScalarContextControllerForElement(divA), c2);
- var divB = document.createElement('div');
- Polymer.dom(divA).appendChild(divB);
- assert.strictEqual(getScalarContextControllerForElement(divB), c2);
-
- // <div> root
- // |__<div> host1
- // | |_<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // | :.-<tr-v-ui-scalar-context-controller> c2
- // |__<div> divA
- // |__<div> divB
- // |__<tr-v-ui-scalar-context-controller-mock-host> host3
- // :..<tr-v-ui-scalar-context-controller> c3
- var host3 = document.createElement(
- 'tr-v-ui-scalar-context-controller-mock-host');
- Polymer.dom(divB).appendChild(host3);
- var c3 = host3.$.controller;
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
- assert.strictEqual(getScalarContextControllerForElement(host2), c2);
- assert.strictEqual(getScalarContextControllerForElement(divA), c2);
- assert.strictEqual(getScalarContextControllerForElement(divB), c2);
- assert.strictEqual(getScalarContextControllerForElement(host3), c3);
-
- // <div> root
- // |__<div> host1
- // | |_<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // | :.-<tr-v-ui-scalar-context-controller> c2
- // |__<div> divA
- // | :.<tr-v-ui-scalar-context-controller> c4
- // |__<div> divB
- // |__<tr-v-ui-scalar-context-controller-mock-host> host3
- // :..<tr-v-ui-scalar-context-controller> c3
- var c4 = document.createElement('tr-v-ui-scalar-context-controller');
- Polymer.dom(divA).appendChild(c4);
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
- assert.strictEqual(getScalarContextControllerForElement(host2), c2);
- assert.strictEqual(getScalarContextControllerForElement(divA), c4);
- assert.strictEqual(getScalarContextControllerForElement(divB), c4);
- assert.strictEqual(getScalarContextControllerForElement(host3), c3);
-
- // <div> root
- // |__<div> host1
- // | |_<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // | :.-<tr-v-ui-scalar-context-controller> c2
- // |__<div> divA
- // | :.<tr-v-ui-scalar-context-controller> c4
- // |__<div> divB
- // |__<tr-v-ui-scalar-context-controller-mock-host> host3
- Polymer.dom(host3.root).removeChild(c3);
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
- assert.strictEqual(getScalarContextControllerForElement(host2), c2);
- assert.strictEqual(getScalarContextControllerForElement(divA), c4);
- assert.strictEqual(getScalarContextControllerForElement(divB), c4);
- assert.strictEqual(getScalarContextControllerForElement(host3), c4);
-
- // <div> root
- // |__<div> host1
- // | |_<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // |__<div> divA
- // | :.<tr-v-ui-scalar-context-controller> c4
- // |__<div> divB
- // |__<tr-v-ui-scalar-context-controller-mock-host> host3
- Polymer.dom(host2.root).removeChild(c2);
- assert.isUndefined(getScalarContextControllerForElement(root));
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
- assert.isUndefined(getScalarContextControllerForElement(host2));
- assert.strictEqual(getScalarContextControllerForElement(divA), c4);
- assert.strictEqual(getScalarContextControllerForElement(divB), c4);
- assert.strictEqual(getScalarContextControllerForElement(host3), c4);
-
- // <div> root
- // | :.<tr-v-ui-scalar-context-controller> c3
- // |__<div> host1
- // | |_<tr-v-ui-scalar-context-controller> c1
- // |__<tr-v-ui-scalar-context-controller-mock-host> host2
- // |__<div> divA
- // | :.<tr-v-ui-scalar-context-controller> c4
- // |__<div> divB
- // |__<tr-v-ui-scalar-context-controller-mock-host> host3
- Polymer.dom(root).appendChild(c3);
- assert.strictEqual(getScalarContextControllerForElement(root), c3);
- assert.strictEqual(getScalarContextControllerForElement(host1), c1);
- assert.strictEqual(getScalarContextControllerForElement(host2), c3);
- assert.strictEqual(getScalarContextControllerForElement(divA), c4);
- assert.strictEqual(getScalarContextControllerForElement(divB), c4);
- assert.strictEqual(getScalarContextControllerForElement(host3), c4);
- } finally {
- Polymer.dom(document.body).removeChild(root);
- }
- });
-
- function contextTest(name, testCallback) {
- test('context_' + name, function() {
- var root = document.createElement('div');
- Polymer.dom(document.body).appendChild(root);
- try {
- var c = document.createElement('tr-v-ui-scalar-context-controller');
- Polymer.dom(root).appendChild(c);
-
- var updatedGroups = []; // Fail if event fires unexpectedly.
- c.addEventListener('context-updated', function(e) {
- if (updatedGroups)
- assert.fail('Unexpected context-updated event fired.');
- updatedGroups = tr.b.asArray(e.groups);
- });
-
- c.expectContextUpdatedEventForTesting =
- function(expectedUpdatedGroups) {
- updatedGroups = undefined;
- tr.b.forceAllPendingTasksToRunForTest();
- assert.sameMembers(updatedGroups, expectedUpdatedGroups);
- };
-
- testCallback.call(this, c);
- } finally {
- Polymer.dom(document.body).removeChild(root);
- }
- });
- }
-
- contextTest('singleGroup', function(c) {
- assert.isUndefined(c.getContext('G'));
-
- var s1 = {value: 10};
- c.onScalarSpanAdded('G', s1);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isTrue(c.getContext('G').range.equals(
- tr.b.Range.fromExplicitRange(10, 10)));
- assert.sameMembers(tr.b.asArray(c.getContext('G').spans), [s1]);
-
- var s2 = {value: 15};
- c.onScalarSpanAdded('G', s2);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isTrue(c.getContext('G').range.equals(
- tr.b.Range.fromExplicitRange(10, 15)));
- assert.sameMembers(tr.b.asArray(c.getContext('G').spans), [s1, s2]);
-
- s1.value = 5;
- c.onScalarSpanUpdated('G', s1);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isTrue(c.getContext('G').range.equals(
- tr.b.Range.fromExplicitRange(5, 15)));
- assert.sameMembers(tr.b.asArray(c.getContext('G').spans), [s1, s2]);
-
- c.onScalarSpanRemoved('G', s2);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isTrue(c.getContext('G').range.equals(
- tr.b.Range.fromExplicitRange(5, 5)));
- assert.sameMembers(tr.b.asArray(c.getContext('G').spans), [s1]);
-
- var s3 = {value: 0};
- c.onScalarSpanAdded('G', s3);
- s2.value = 14;
- c.onScalarSpanAdded('G', s2);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isTrue(c.getContext('G').range.equals(
- tr.b.Range.fromExplicitRange(0, 14)));
- assert.sameMembers(tr.b.asArray(c.getContext('G').spans), [s1, s2, s3]);
-
- c.onScalarSpanRemoved('G', s1);
- c.onScalarSpanRemoved('G', s2);
- c.onScalarSpanRemoved('G', s3);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isUndefined(c.getContext('G'));
-
- c.onScalarSpanAdded('G', s2);
- c.expectContextUpdatedEventForTesting(['G']);
- assert.isTrue(c.getContext('G').range.equals(
- tr.b.Range.fromExplicitRange(14, 14)));
- assert.sameMembers(tr.b.asArray(c.getContext('G').spans), [s2]);
- });
-
- contextTest('multipleGroups', function(c) {
- assert.isUndefined(c.getContext('G1'));
- assert.isUndefined(c.getContext('G2'));
-
- var s1 = {value: 0};
- c.onScalarSpanAdded('G1', s1);
- c.expectContextUpdatedEventForTesting(['G1']);
- assert.isTrue(c.getContext('G1').range.equals(
- tr.b.Range.fromExplicitRange(0, 0)));
- assert.sameMembers(tr.b.asArray(c.getContext('G1').spans), [s1]);
-
- var s2 = {value: 1};
- c.onScalarSpanAdded('G2', s2);
- c.expectContextUpdatedEventForTesting(['G2']);
- assert.isTrue(c.getContext('G2').range.equals(
- tr.b.Range.fromExplicitRange(1, 1)));
- assert.sameMembers(tr.b.asArray(c.getContext('G2').spans), [s2]);
-
- var s3 = {value: 2};
- var s4 = {value: -1};
- c.onScalarSpanAdded('G2', s3);
- c.onScalarSpanAdded('G1', s4);
- c.expectContextUpdatedEventForTesting(['G1', 'G2']);
- assert.isTrue(c.getContext('G1').range.equals(
- tr.b.Range.fromExplicitRange(-1, 0)));
- assert.sameMembers(tr.b.asArray(c.getContext('G1').spans), [s1, s4]);
- assert.isTrue(c.getContext('G2').range.equals(
- tr.b.Range.fromExplicitRange(1, 2)));
- assert.sameMembers(tr.b.asArray(c.getContext('G2').spans), [s2, s3]);
-
- c.onScalarSpanRemoved('G2', s3);
- c.onScalarSpanAdded('G1', s3);
- c.expectContextUpdatedEventForTesting(['G1', 'G2']);
- assert.isTrue(c.getContext('G1').range.equals(
- tr.b.Range.fromExplicitRange(-1, 2)));
- assert.sameMembers(tr.b.asArray(c.getContext('G1').spans), [s1, s3, s4]);
- assert.isTrue(c.getContext('G2').range.equals(
- tr.b.Range.fromExplicitRange(1, 1)));
- assert.sameMembers(tr.b.asArray(c.getContext('G2').spans), [s2]);
-
- s4.value = 3;
- c.onScalarSpanUpdated('G1', s4);
- s1.value = 1;
- c.onScalarSpanUpdated('G1', s1);
- c.expectContextUpdatedEventForTesting(['G1']);
- assert.isTrue(c.getContext('G1').range.equals(
- tr.b.Range.fromExplicitRange(1, 3)));
- assert.sameMembers(tr.b.asArray(c.getContext('G1').spans), [s1, s3, s4]);
- assert.isTrue(c.getContext('G2').range.equals(
- tr.b.Range.fromExplicitRange(1, 1)));
- assert.sameMembers(tr.b.asArray(c.getContext('G2').spans), [s2]);
-
- c.onScalarSpanRemoved('G2', s2);
- c.expectContextUpdatedEventForTesting(['G2']);
- assert.isTrue(c.getContext('G1').range.equals(
- tr.b.Range.fromExplicitRange(1, 3)));
- assert.sameMembers(tr.b.asArray(c.getContext('G1').spans), [s1, s3, s4]);
- assert.isUndefined(c.getContext('G2'));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span.html
deleted file mode 100644
index e178d38276a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module id="tr-v-ui-scalar-diagnostic-span">
- <template>
- <tr-v-ui-scalar-span id="scalar"></tr-v-ui-scalar-span>
- </template>
-
- <script>
- 'use strict';
- Polymer({
- is: 'tr-v-ui-scalar-diagnostic-span',
-
- ready: function() {
- this.diagnostic_ = undefined;
- },
-
- get diagnostic() {
- return this.diagnostic_;
- },
-
- set diagnostic(d) {
- this.diagnostic_ = d;
- this.updateContents_();
- },
-
- updateContents_: function() {
- this.$.scalar.setValueAndUnit(this.diagnostic.value.value,
- this.diagnostic.value.unit);
- }
- });
- </script>
-</dom-module>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span_test.html
deleted file mode 100644
index 69b055fcb92..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_diagnostic_span_test.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/diagnostics/scalar.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var diagnostic = new tr.v.d.Scalar(new tr.v.ScalarNumeric(
- tr.b.Unit.byName.timeDurationInMs, 123.456));
- var span = tr.v.ui.createDiagnosticSpan(diagnostic);
- assert.strictEqual('TR-V-UI-SCALAR-DIAGNOSTIC-SPAN', span.tagName);
- this.addHTMLOutput(span);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table.html
deleted file mode 100644
index f303cb781dc..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<dom-module name="tr-v-ui-scalar-map-table">
- <template>
- <style>
- </style>
- <tr-ui-b-table id="table"></tr-ui-b-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-Polymer({
- is: 'tr-v-ui-scalar-map-table',
-
- created: function() {
- /** @type {!Map.<string, !tr.v.ScalarNumeric>} */
- this.scalarMap_ = new Map();
-
- /** @type {!Map.<string, !tr.b.Statistics.Significance>} */
- this.significance_ = new Map();
- },
-
- ready: function() {
- this.$.table.showHeader = false;
- this.$.table.tableColumns = [
- {
- value: function(row) {
- return row.name;
- }
- },
- {
- align: tr.ui.b.TableFormat.ColumnAlignment.RIGHT,
- value: function(row) {
- var span = tr.v.ui.createScalarSpan(row.value);
- if (row.significance !== undefined) {
- span.significance = row.significance;
- } else if (row.anyRowsHaveSignificance) {
- // Ensure vertical alignment.
- span.style.marginRight = '14px';
- }
- span.style.whiteSpace = 'nowrap';
- return span;
- }
- }
- ];
- },
-
- get scalarMap() {
- return this.scalarMap_;
- },
-
- /**
- * @param {!Map.<string,!tr.v.ScalarNumeric>} map
- */
- set scalarMap(map) {
- this.scalarMap_ = map;
- this.updateContents_();
- },
-
- /**
- * @param {string} key
- * @param {!tr.b.Statistics.Significance} significance
- */
- setSignificanceForKey: function(key, significance) {
- this.significance_.set(key, significance);
- this.updateContents_();
- },
-
- updateContents_: function() {
- var rows = [];
- for (var [key, scalar] of this.scalarMap) {
- rows.push({
- name: key,
- value: scalar,
- significance: this.significance_.get(key),
- anyRowsHaveSignificance: (this.significance_.size > 0)
- });
- }
- this.$.table.tableRows = rows;
- this.$.table.rebuild();
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table_test.html
deleted file mode 100644
index f43bbb9fd20..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_map_table_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/scalar_map_table.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate', function() {
- var span = document.createElement('tr-v-ui-scalar-map-table');
-
- var histogram = new tr.v.Histogram('', tr.b.Unit.byName.energyInJoules);
- for (var i = 0; i < 1e2; ++i) {
- histogram.addSample(Math.random() * 1000);
- }
-
- histogram.addSample('foo');
- histogram.customizeSummaryOptions({nans: true});
-
- span.scalarMap = histogram.statisticsScalars;
- this.addHTMLOutput(span);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span.html
deleted file mode 100644
index 1ab5e864294..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span.html
+++ /dev/null
@@ -1,586 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/scalar_context_controller.html">
-
-<script>
-'use strict';
-tr.exportTo('tr.v.ui', function() {
- /**
- * @param {undefined|tr.v.ScalarNumeric|tr.v.Histogram} value
- * @param {Object=} opt_config
- * @param {!tr.b.Range=} opt_config.customContextRange
- * @param {boolean=} opt_config.rightAlign
- * @param {!tr.b.Unit=} opt_config.unit
- * @param {tr.b.Statistics.Significance=} opt_config.significance
- * @param {string=} opt_config.contextGroup
- * @return {(string|!HTMLElement)}
- */
- function createScalarSpan(value, opt_config) {
- if (value === undefined)
- return '';
-
- var config = opt_config || {};
- var ownerDocument = config.ownerDocument || document;
-
- var span = ownerDocument.createElement('tr-v-ui-scalar-span');
-
- var numericValue;
- if (value instanceof tr.v.ScalarNumeric) {
- span.value = value;
- numericValue = value.value;
- } else if (value instanceof tr.v.Histogram) {
- numericValue = value.average;
- if (numericValue === undefined)
- return '';
- span.setValueAndUnit(numericValue, value.unit);
- } else {
- var unit = config.unit;
- if (unit === undefined) {
- throw new Error(
- 'Unit must be provided in config when value is a number');
- }
- span.setValueAndUnit(value, unit);
- numericValue = value;
- }
-
- if (config.context)
- span.context = config.context;
-
- if (config.customContextRange)
- span.customContextRange = config.customContextRange;
-
- if (config.rightAlign)
- span.rightAlign = true;
-
- if (config.significance !== undefined)
- span.significance = config.significance;
-
- if (config.contextGroup !== undefined)
- span.contextGroup = config.contextGroup;
-
- return span;
- }
-
- return {
- createScalarSpan: createScalarSpan
- };
-});
-</script>
-
-<dom-module id='tr-v-ui-scalar-span'>
- <template>
- <style>
- :host {
- display: block;
- position: relative;
- /* Limit the sparkline's negative z-index to the span only. */
- isolation: isolate;
- }
-
- #sparkline {
- width: 0%;
- position: absolute;
- bottom: 0;
- display: none;
- height: 100%;
- background-color: hsla(216, 100%, 94.5%, .75);
- border-color: hsl(216, 100%, 89%);
- box-sizing: border-box;
- z-index: -1;
- }
- #sparkline.positive {
- border-right-style: solid;
- /* The border width must be kept in sync with buildSparklineStyle_(). */
- border-right-width: 1px;
- }
- #sparkline:not(.positive) {
- border-left-style: solid;
- /* The border width must be kept in sync with buildSparklineStyle_(). */
- border-left-width: 1px;
- }
- #sparkline.better {
- background-color: hsla(115, 100%, 93%, .75);
- border-color: hsl(118, 60%, 80%);
- }
- #sparkline.worse {
- background-color: hsla(0, 100%, 88%, .75);
- border-color: hsl(0, 100%, 80%);
- }
-
- #content.right-align {
- text-align: right;
- position: relative;
- display: block;
- }
- #content.better {
- color: green;
- }
- #content.worse {
- color: red;
- }
-
- #significance svg {
- display: none;
- height: 1em;
- vertical-align: text-top;
- stroke-width: 4;
- fill: rgba(0, 0, 0, 0);
- }
- #significance #insignificant {
- stroke: black;
- }
- #significance #significantly_better {
- stroke: green;
- }
- #significance #significantly_worse {
- stroke: red;
- }
-
- #warning {
- display: none;
- margin-left: 4px;
- height: 1em;
- vertical-align: text-top;
- stroke-width: 0;
- }
- #warning path {
- fill: rgb(255, 185, 185);
- }
- #warning rect {
- fill: red;
- }
- </style>
-
- <span id="sparkline"></span>
-
- <span id="content"></span>
-
- <span id="significance">
- <!-- Neutral face -->
- <svg viewbox="0 0 128 128" id="insignificant">
- <circle r="60" cx="64" cy="64"/>
- <circle r="4" cx="44" cy="44"/>
- <circle r="4" cx="84" cy="44"/>
- <line x1="36" x2="92" y1="80" y2="80"/>
- </svg>
-
- <!-- Smiling face -->
- <svg viewbox="0 0 128 128" id="significantly_better">
- <circle r="60" cx="64" cy="64"/>
- <circle r="4" cx="44" cy="44"/>
- <circle r="4" cx="84" cy="44"/>
- <path d="M 28 64 Q 64 128 100 64"/>
- </svg>
-
- <!-- Frowning face -->
- <svg viewbox="0 0 128 128" id="significantly_worse">
- <circle r="60" cx="64" cy="64"/>
- <circle r="4" cx="44" cy="44"/>
- <circle r="4" cx="84" cy="44"/>
- <path d="M 36 96 Q 64 48 92 96"/>
- </svg>
- </span>
-
- <svg viewbox="0 0 128 128" id="warning">
- <path d="M 64 0 L 128 128 L 0 128 L 64 0"/>
- <rect x="60" width="8" y="0" height="84"/>
- <rect x="60" width="8" y="100" height="24"/>
- </svg>
- </template>
-</dom-module>
-<script>
-'use strict';
-
-Polymer({
- is: 'tr-v-ui-scalar-span',
-
- properties: {
- /**
- * String identifier for grouping scalar spans with common context (e.g.
- * all scalar spans in a single table column would typically share a common
- * context and, thus, have the same context group identifier). If falsy,
- * the scalar span will NOT be associated with any context.
- */
- contextGroup: {
- type: String,
- reflectToAttribute: true,
- observer: 'contextGroupChanged_'
- }
- },
-
- created: function() {
- this.value_ = undefined;
- this.unit_ = undefined;
-
- // TODO(petrcermak): Merge this into the context controller.
- this.context_ = undefined;
-
- this.warning_ = undefined;
- this.significance_ = tr.b.Statistics.Significance.DONT_CARE;
-
- // To avoid unnecessary DOM traversal, search for the context controller
- // only when necessary (when the span is attached and has a context group).
- this.shouldSearchForContextController_ = false;
- this.lazyContextController_ = undefined;
- this.onContextUpdated_ = this.onContextUpdated_.bind(this);
-
- // The span can specify a custom context range, which will override the
- // values from the context controller.
- this.customContextRange_ = undefined;
- },
-
- get significance() {
- return this.significance_;
- },
-
- set significance(s) {
- this.significance_ = s;
- this.updateContents_();
- },
-
- set contentTextDecoration(deco) {
- this.$.content.style.textDecoration = deco;
- },
-
- get value() {
- return this.value_;
- },
-
- set value(value) {
- if (value instanceof tr.v.ScalarNumeric) {
- this.value_ = value.value;
- this.unit_ = value.unit;
- } else {
- this.value_ = value;
- }
- this.updateContents_();
- if (this.hasContext_(this.contextGroup))
- this.contextController_.onScalarSpanUpdated(this.contextGroup, this);
- else
- this.updateSparkline_();
- },
-
- get contextController_() {
- if (this.shouldSearchForContextController_) {
- this.lazyContextController_ =
- tr.v.ui.getScalarContextControllerForElement(this);
- this.shouldSearchForContextController_ = false;
- }
- return this.lazyContextController_;
- },
-
- hasContext_: function(contextGroup) {
- // The ordering here is important. It ensures that we avoid a DOM traversal
- // when the span doesn't have a context group.
- return !!(contextGroup && this.contextController_);
- },
-
- contextGroupChanged_: function(newContextGroup, oldContextGroup) {
- this.detachFromContextControllerIfPossible_(oldContextGroup);
- if (!this.attachToContextControllerIfPossible_(newContextGroup)) {
- // If the span failed to attach to a controller, it won't receive a
- // context-updated event, so we trigger it manually.
- this.onContextUpdated_();
- }
- },
-
- attachToContextControllerIfPossible_: function(contextGroup) {
- if (!this.hasContext_(contextGroup))
- return false;
- this.contextController_.addEventListener(
- 'context-updated', this.onContextUpdated_);
- this.contextController_.onScalarSpanAdded(contextGroup, this);
- return true;
- },
-
- detachFromContextControllerIfPossible_: function(contextGroup) {
- if (!this.hasContext_(contextGroup))
- return;
- this.contextController_.removeEventListener(
- 'context-updated', this.onContextUpdated_);
- this.contextController_.onScalarSpanRemoved(contextGroup, this);
- },
-
- attached: function() {
- tr.b.Unit.addEventListener(
- 'display-mode-changed', this.updateContents_.bind(this));
- this.shouldSearchForContextController_ = true;
- this.attachToContextControllerIfPossible_(this.contextGroup);
- },
-
- detached: function() {
- tr.b.Unit.removeEventListener(
- 'display-mode-changed', this.updateContents_.bind(this));
- this.detachFromContextControllerIfPossible_(this.contextGroup);
- this.shouldSearchForContextController_ = false;
- this.lazyContextController_ = undefined;
- },
-
- onContextUpdated_: function() {
- this.updateSparkline_();
- },
-
- get context() {
- return this.context_;
- },
-
- set context(context) {
- this.context_ = context;
- this.updateContents_();
- },
-
- get unit() {
- return this.unit_;
- },
-
- set unit(unit) {
- this.unit_ = unit;
- this.updateContents_();
- this.updateSparkline_();
- },
-
- setValueAndUnit: function(value, unit) {
- this.value_ = value;
- this.unit_ = unit;
- this.updateContents_();
- },
-
- get customContextRange() {
- return this.customContextRange_;
- },
-
- set customContextRange(customContextRange) {
- this.customContextRange_ = customContextRange;
- this.updateSparkline_();
- },
-
- get rightAlign() {
- return Polymer.dom(this.$.content).classList.contains('right-align');
- },
-
- set rightAlign(rightAlign) {
- if (rightAlign)
- Polymer.dom(this.$.content).classList.add('right-align');
- else
- Polymer.dom(this.$.content).classList.remove('right-align');
- },
-
- updateSparkline_: function() {
- Polymer.dom(this.$.sparkline).classList.remove('positive');
- Polymer.dom(this.$.sparkline).classList.remove('better');
- Polymer.dom(this.$.sparkline).classList.remove('worse');
- Polymer.dom(this.$.sparkline).classList.remove('same');
- this.$.sparkline.style.display = 'none';
- this.$.sparkline.style.left = '0';
- this.$.sparkline.style.width = '0';
-
- // Custom context range takes precedence over controller context range.
- var range = this.customContextRange_;
- if (!range && this.hasContext_(this.contextGroup)) {
- var context = this.contextController_.getContext(this.contextGroup);
- if (context)
- range = context.range;
- }
- if (!range || range.isEmpty)
- return;
-
- var leftPoint = Math.min(range.min, 0);
- var rightPoint = Math.max(range.max, 0);
- var pointDistance = rightPoint - leftPoint;
- if (pointDistance === 0) {
- // This can happen, for example, when all spans within the context have
- // zero values (so |range| is [0, 0]).
- return;
- }
-
- // Draw the sparkline.
- this.$.sparkline.style.display = 'block';
- var left, width;
- if (this.value > 0) {
- width = Math.min(this.value, rightPoint);
- left = -leftPoint;
- Polymer.dom(this.$.sparkline).classList.add('positive');
- } else if (this.value <= 0) {
- width = -Math.max(this.value, leftPoint);
- left = (-leftPoint) - width;
- }
- this.$.sparkline.style.left = this.buildSparklineStyle_(
- left / pointDistance, false);
- this.$.sparkline.style.width = this.buildSparklineStyle_(
- width / pointDistance, true);
-
- // Set the sparkline color (if applicable).
- var changeClass = this.changeClassName_;
- if (changeClass)
- Polymer.dom(this.$.sparkline).classList.add(changeClass);
- },
-
- buildSparklineStyle_: function(ratio, isWidth) {
- // To avoid visual glitches around the zero value bar, we subtract 1 pixel
- // from the width of the element and multiply the remainder (100% - 1px) by
- // |ratio|. The extra pixel is used for the sparkline border. This allows
- // us to align zero sparklines with both positive and negative values:
- //
- // ::::::::::| +10 MiB
- // :::::| +5 MiB
- // | 0 MiB
- // |::::: -5 MiB
- // |:::::::::: -10 MiB
- //
- var position = 'calc(' + ratio + ' * (100% - 1px)';
- if (isWidth)
- position += ' + 1px'; // Extra pixel for sparkline border.
- position += ')';
- return position;
- },
-
- updateContents_: function() {
- Polymer.dom(this.$.content).textContent = '';
- Polymer.dom(this.$.content).classList.remove('better');
- Polymer.dom(this.$.content).classList.remove('worse');
- Polymer.dom(this.$.content).classList.remove('same');
- this.$.insignificant.style.display = '';
- this.$.significantly_better.style.display = '';
- this.$.significantly_worse.style.display = '';
-
- if (this.unit_ === undefined)
- return;
-
- this.$.content.title = '';
- Polymer.dom(this.$.content).textContent =
- this.unit_.format(this.value, this.context);
- this.updateDelta_();
- },
-
- updateDelta_: function() {
- var changeClass = this.changeClassName_;
- if (!changeClass) {
- this.$.significance.style.display = 'none';
- return; // Not a delta or we don't care.
- }
-
- this.$.significance.style.display = 'inline';
-
- var title;
- switch (changeClass) {
- case 'better':
- title = 'improvement';
- break;
-
- case 'worse':
- title = 'regression';
- break;
-
- case 'same':
- title = 'no change';
- break;
-
- default:
- throw new Error('Unknown change class: ' + changeClass);
- }
-
- // Set the content class separately from the significance class so that
- // the Neutral face is always a neutral color.
- Polymer.dom(this.$.content).classList.add(changeClass);
-
- switch (this.significance) {
- case tr.b.Statistics.Significance.DONT_CARE:
- break;
-
- case tr.b.Statistics.Significance.INSIGNIFICANT:
- if (changeClass !== 'same')
- title = 'insignificant ' + title;
- this.$.insignificant.style.display = 'inline';
- changeClass = 'same';
- break;
-
- case tr.b.Statistics.Significance.SIGNIFICANT:
- if (changeClass === 'same')
- throw new Error('How can no change be significant?');
- this.$['significantly_' + changeClass].style.display = 'inline';
- title = 'significant ' + title;
- break;
-
- default:
- throw new Error('Unknown significance ' + this.significance);
- }
-
- this.$.significance.title = title;
- this.$.content.title = title;
- },
-
- get changeClassName_() {
- if (!this.unit_ || !this.unit_.isDelta)
- return undefined;
-
- switch (this.unit_.improvementDirection) {
- case tr.b.ImprovementDirection.DONT_CARE:
- return undefined;
-
- case tr.b.ImprovementDirection.BIGGER_IS_BETTER:
- if (this.value === 0)
- return 'same';
- return this.value > 0 ? 'better' : 'worse';
-
- case tr.b.ImprovementDirection.SMALLER_IS_BETTER:
- if (this.value === 0)
- return 'same';
- return this.value < 0 ? 'better' : 'worse';
-
- default:
- throw new Error('Unknown improvement direction: ' +
- this.unit_.improvementDirection);
- }
- },
-
- get warning() {
- return this.warning_;
- },
-
- set warning(warning) {
- this.warning_ = warning;
- var warningEl = this.$.warning;
- if (this.warning_) {
- warningEl.title = warning;
- warningEl.style.display = 'inline';
- } else {
- warningEl.title = '';
- warningEl.style.display = '';
- }
- },
-
- // tr-v-ui-time-stamp-span property
- get timestamp() {
- return this.value;
- },
-
- set timestamp(timestamp) {
- if (timestamp instanceof tr.b.u.TimeStamp) {
- this.value = timestamp;
- return;
- }
- this.setValueAndUnit(timestamp, tr.b.u.Units.timeStampInMs);
- },
-
- // tr-v-ui-time-duration-span property
- get duration() {
- return this.value;
- },
-
- set duration(duration) {
- if (duration instanceof tr.b.u.TimeDuration) {
- this.value = duration;
- return;
- }
- this.setValueAndUnit(duration, tr.b.u.Units.timeDurationInMs);
- }
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span_test.html
deleted file mode 100644
index fe92b1b248e..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/scalar_span_test.html
+++ /dev/null
@@ -1,988 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2015 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/time_display_modes.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/base/unit_scale.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/scalar_context_controller.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var ScalarNumeric = tr.v.ScalarNumeric;
- var Unit = tr.b.Unit;
- var THIS_DOC = document.currentScript.ownerDocument;
-
- function checkSignificance(span, expectedSignificance) {
- assert.strictEqual(span.$.insignificant.style.display,
- expectedSignificance === 'insignificant' ? 'inline' : '');
- assert.strictEqual(span.$.significantly_better.style.display,
- expectedSignificance === 'significantly_better' ? 'inline' : '');
- assert.strictEqual(span.$.significantly_worse.style.display,
- expectedSignificance === 'significantly_worse' ? 'inline' : '');
- }
-
- function checkScalarSpan(test, value, unit, expectedContent, opt_options) {
- var options = opt_options || {};
- var span = tr.v.ui.createScalarSpan(new tr.v.ScalarNumeric(unit, value),
- {significance: options.significance});
-
- test.addHTMLOutput(span);
- assert.strictEqual(
- Polymer.dom(span.$.content).textContent, expectedContent);
- assert.strictEqual(window.getComputedStyle(span.$.content).color,
- options.expectedColor || 'rgb(0, 0, 0)');
-
- if (options.expectedTitle) {
- assert.strictEqual(span.$.content.title, options.expectedTitle);
- }
-
- if (options.significance !== undefined) {
- checkSignificance(span, options.expectedEmoji);
- if (options.expectedTitle) {
- assert.strictEqual(span.$.significance.title, options.expectedTitle);
- }
- }
- }
-
- test('instantiate_significance', function() {
- var countD = Unit.byName.count.correspondingDeltaUnit;
- var countSIBD = Unit.byName.count_smallerIsBetter.correspondingDeltaUnit;
- var countBIBD = Unit.byName.count_biggerIsBetter.correspondingDeltaUnit;
-
- var zero = String.fromCharCode(177) + '0';
-
- checkScalarSpan(this, 0, countSIBD, zero, {
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedTitle: 'no change',
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, 0, countSIBD, zero, {
- expectedEmoji: 'insignificant',
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedEmojiColor: 'rgb(0, 0, 0)',
- expectedTitle: 'no change'
- });
-
- assert.throws(() => checkScalarSpan(this, 0, countSIBD, zero,
- {significance: tr.b.Statistics.Significance.SIGNIFICANT}));
-
- checkScalarSpan(this, 0, countBIBD, zero, {
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedTitle: 'no change',
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, 0, countBIBD, zero, {
- expectedEmoji: 'insignificant',
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedEmojiColor: 'rgb(0, 0, 0)',
- expectedTitle: 'no change'
- });
-
- assert.throws(() => checkScalarSpan(this, 0, countSIBD, zero,
- {significance: tr.b.Statistics.Significance.SIGNIFICANT}));
-
- checkScalarSpan(this, 1, countSIBD, '+1', {
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedColor: 'rgb(255, 0, 0)',
- expectedTitle: 'regression',
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, 1, countSIBD, '+1', {
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedColor: 'rgb(255, 0, 0)',
- expectedEmoji: 'insignificant',
- expectedEmojiColor: 'rgb(0, 0, 0)',
- expectedTitle: 'insignificant regression'
- });
-
- checkScalarSpan(this, 1, countSIBD, '+1', {
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- expectedColor: 'rgb(255, 0, 0)',
- expectedEmoji: 'significantly_worse',
- expectedEmojiColor: 'rgb(255, 0, 0)',
- expectedTitle: 'significant regression'
- });
-
- checkScalarSpan(this, 1, countBIBD, '+1', {
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedColor: 'rgb(0, 128, 0)',
- expectedTitle: 'improvement',
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, 1, countBIBD, '+1', {
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedColor: 'rgb(0, 128, 0)',
- expectedEmoji: 'insignificant',
- expectedEmojiColor: 'rgb(0, 0, 0)',
- expectedTitle: 'insignificant improvement'
- });
-
- checkScalarSpan(this, 1, countBIBD, '+1', {
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- expectedColor: 'rgb(0, 128, 0)',
- expectedEmoji: 'significantly_better',
- expectedEmojiColor: 'rgb(0, 128, 0)',
- expectedTitle: 'significant improvement'
- });
-
- checkScalarSpan(this, -1, countSIBD, '-1', {
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedColor: 'rgb(0, 128, 0)',
- expectedEmoji: '',
- expectedEmojiColor: '',
- expectedTitle: 'improvement'
- });
-
- checkScalarSpan(this, -1, countSIBD, '-1', {
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedColor: 'rgb(0, 128, 0)',
- expectedEmoji: 'insignificant',
- expectedEmojiColor: 'rgb(0, 0, 0)',
- expectedTitle: 'insignificant improvement'
- });
-
- checkScalarSpan(this, -1, countSIBD, '-1', {
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- expectedColor: 'rgb(0, 128, 0)',
- expectedEmoji: 'significantly_better',
- expectedEmojiColor: 'rgb(0, 128, 0)',
- expectedTitle: 'significant improvement'
- });
-
- checkScalarSpan(this, -1, countBIBD, '-1', {
- expectedColor: 'rgb(255, 0, 0)',
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, -1, countBIBD, '-1', {
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedColor: 'rgb(255, 0, 0)',
- expectedEmoji: 'insignificant',
- expectedEmojiColor: 'rgb(0, 0, 0)',
- expectedTitle: 'insignificant regression'
- });
-
- checkScalarSpan(this, -1, countBIBD, '-1', {
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- expectedColor: 'rgb(255, 0, 0)',
- expectedEmoji: 'significantly_worse',
- expectedEmojiColor: 'rgb(255, 0, 0)',
- expectedTitle: 'significant regression'
- });
-
- checkScalarSpan(this, 1, countD, '+1', {
- expectedColor: 'rgb(0, 0, 0)',
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, 1, countD, '+1', {
- expectedColor: 'rgb(0, 0, 0)',
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, 1, countD, '+1', {
- expectedColor: 'rgb(0, 0, 0)',
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, -1, countD, '-1', {
- expectedColor: 'rgb(0, 0, 0)',
- significance: tr.b.Statistics.Significance.DONT_CARE,
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, -1, countD, '-1', {
- expectedColor: 'rgb(0, 0, 0)',
- significance: tr.b.Statistics.Significance.INSIGNIFICANT,
- expectedEmoji: ''
- });
-
- checkScalarSpan(this, -1, countD, '-1', {
- expectedColor: 'rgb(0, 0, 0)',
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- expectedEmoji: ''
- });
- });
-
- test('instantiate', function() {
- checkScalarSpan(this, 123.456789, Unit.byName.timeDurationInMs,
- '123.457 ms');
- checkScalarSpan(this, 0, Unit.byName.normalizedPercentage, '0.000%');
- checkScalarSpan(this, 1, Unit.byName.normalizedPercentage, '100.000%');
- checkScalarSpan(this, -2560, Unit.byName.sizeInBytes, '-2.5 KiB');
- });
-
- test('instantiate_smallerIsBetter', function() {
- checkScalarSpan(this, 45097156608, Unit.byName.sizeInBytes_smallerIsBetter,
- '42.0 GiB');
- checkScalarSpan(this, 0, Unit.byName.energyInJoules_smallerIsBetter,
- '0.000 J');
- checkScalarSpan(this, -0.25, Unit.byName.unitlessNumber_smallerIsBetter,
- '-0.250');
- });
-
- test('instantiate_biggerIsBetter', function() {
- checkScalarSpan(this, 0.07, Unit.byName.powerInWatts_smallerIsBetter,
- '0.070 W');
- checkScalarSpan(this, 0, Unit.byName.timeStampInMs_biggerIsBetter,
- '0.000 ms');
- checkScalarSpan(this, -0.00003,
- Unit.byName.normalizedPercentage_biggerIsBetter, '-0.003%');
- });
-
- test('instantiate_delta', function() {
- checkScalarSpan(this, 123.456789, Unit.byName.timeDurationInMsDelta,
- '+123.457 ms');
- checkScalarSpan(this, 0, Unit.byName.normalizedPercentageDelta,
- '\u00B10.000%');
- checkScalarSpan(this, -2560, Unit.byName.sizeInBytesDelta,
- '-2.5 KiB');
- });
-
- test('instantiate_delta_smallerIsBetter', function() {
- checkScalarSpan(this, 45097156608,
- Unit.byName.sizeInBytesDelta_smallerIsBetter, '+42.0 GiB',
- {expectedColor: 'rgb(255, 0, 0)'});
- checkScalarSpan(this, 0, Unit.byName.energyInJoulesDelta_smallerIsBetter,
- '\u00B10.000 J');
- checkScalarSpan(this, -0.25,
- Unit.byName.unitlessNumberDelta_smallerIsBetter, '-0.250',
- {expectedColor: 'rgb(0, 128, 0)'});
- });
-
- test('instantiate_delta_biggerIsBetter', function() {
- checkScalarSpan(this, 0.07, Unit.byName.powerInWattsDelta_biggerIsBetter,
- '+0.070 W', {expectedColor: 'rgb(0, 128, 0)'});
- checkScalarSpan(this, 0, Unit.byName.timeStampInMsDelta_biggerIsBetter,
- '\u00B10.000 ms');
- checkScalarSpan(this, -0.00003,
- Unit.byName.normalizedPercentageDelta_biggerIsBetter, '-0.003%',
- {expectedColor: 'rgb(255, 0, 0)'});
- });
-
- test('createScalarSpan', function() {
- // No config.
- var span = tr.v.ui.createScalarSpan(
- new ScalarNumeric(Unit.byName.powerInWatts, 3.14));
- assert.strictEqual(Polymer.dom(span.$.content).textContent, '3.140 W');
- assert.strictEqual(span.ownerDocument, document);
- assert.strictEqual(span.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(span.value, 3.14);
- assert.strictEqual(span.unit, Unit.byName.powerInWatts);
- assert.isUndefined(span.context);
- assert.isUndefined(span.customContextRange);
- assert.isUndefined(span.warning);
- assert.isFalse(span.rightAlign);
- this.addHTMLOutput(span);
-
- // Custom owner document and right align.
- var span = tr.v.ui.createScalarSpan(
- new ScalarNumeric(Unit.byName.energyInJoules, 2.72),
- { ownerDocument: THIS_DOC, rightAlign: true });
- assert.strictEqual(Polymer.dom(span.$.content).textContent, '2.720 J');
- assert.strictEqual(span.ownerDocument, THIS_DOC);
- assert.strictEqual(span.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(span.value, 2.72);
- assert.strictEqual(span.unit, Unit.byName.energyInJoules);
- assert.isUndefined(span.context);
- assert.isUndefined(span.customContextRange);
- assert.isUndefined(span.warning);
- assert.isTrue(span.rightAlign);
- this.addHTMLOutput(span);
-
- // Unit and sparkline set via config.
- var span = tr.v.ui.createScalarSpan(1.62, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: tr.b.Range.fromExplicitRange(0, 3.24)
- });
- assert.strictEqual(Polymer.dom(span.$.content).textContent, '1.620 ms');
- assert.strictEqual(span.ownerDocument, document);
- assert.strictEqual(span.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(span.value, 1.62);
- assert.strictEqual(span.unit, Unit.byName.timeStampInMs);
- assert.isUndefined(span.context);
- assert.isTrue(tr.b.Range.fromExplicitRange(0, 3.24).equals(
- span.customContextRange));
- assert.isUndefined(span.warning);
- assert.isFalse(span.rightAlign);
- this.addHTMLOutput(span);
-
- // Custom context.
- var span = tr.v.ui.createScalarSpan(
- new ScalarNumeric(Unit.byName.sizeInBytesDelta_smallerIsBetter,
- 256 * 1024 * 1024), { context: {
- unitPrefix: tr.b.UnitScale.Binary.KIBI,
- minimumFractionDigits: 2
- } });
- assert.strictEqual(
- Polymer.dom(span.$.content).textContent, '+262,144.00 KiB');
- assert.strictEqual(span.ownerDocument, document);
- assert.strictEqual(span.tagName, 'TR-V-UI-SCALAR-SPAN');
- assert.strictEqual(span.value, 256 * 1024 * 1024);
- assert.strictEqual(span.unit, Unit.byName.sizeInBytesDelta_smallerIsBetter);
- assert.deepEqual(span.context,
- { unitPrefix: tr.b.UnitScale.Binary.KIBI, minimumFractionDigits: 2 });
- assert.isUndefined(span.customContextRange);
- assert.isUndefined(span.warning);
- assert.isFalse(span.rightAlign);
- this.addHTMLOutput(span);
- });
-
- test('instantiate_withWarning', function() {
- var span = document.createElement('tr-v-ui-scalar-span');
- span.value = 400000000;
- span.unit = Unit.byName.sizeInBytes;
- span.warning = 'There is a problem with this size';
- this.addHTMLOutput(span);
- });
-
- test('instantiate_withCustomContextRange', function() {
- var span = document.createElement('tr-v-ui-scalar-span');
- span.value = new ScalarNumeric(Unit.byName.unitlessNumber, 0.99);
- span.customContextRange = tr.b.Range.fromExplicitRange(0, 3);
- this.addHTMLOutput(span);
- });
-
- test('instantiate_withRightAlign', function() {
- var span = document.createElement('tr-v-ui-scalar-span');
- span.value = new ScalarNumeric(Unit.byName.timeStampInMs, 5.777);
- span.rightAlign = true;
- this.addHTMLOutput(span);
- });
-
- test('instantiate_withContext', function() {
- var span = document.createElement('tr-v-ui-scalar-span');
- span.value = new ScalarNumeric(
- Unit.byName.unitlessNumberDelta_smallerIsBetter, 42);
- span.context = { maximumFractionDigits: 2 };
- assert.strictEqual(Polymer.dom(span.$.content).textContent, '+42.00');
- this.addHTMLOutput(span);
- });
-
- test('deltaAndNonDeltaHaveSimilarHeights', function() {
- var spanA = document.createElement('tr-v-ui-scalar-span');
- spanA.setValueAndUnit(400, Unit.byName.timeDurationInMs);
- checkSignificance(spanA, '');
-
- var spanB = document.createElement('tr-v-ui-scalar-span');
- spanB.setValueAndUnit(400, Unit.byName.timeDurationInMsDelta);
- checkSignificance(spanB, '');
-
- var spanC = document.createElement('tr-v-ui-scalar-span');
- spanC.setValueAndUnit(
- 400, Unit.byName.timeDurationInMsDelta_smallerIsBetter);
- spanC.significance = tr.b.Statistics.Significance.SIGNIFICANT;
- checkSignificance(spanC, 'significantly_worse');
-
- var spanD = document.createElement('tr-v-ui-scalar-span');
- spanD.setValueAndUnit(
- 400, Unit.byName.timeDurationInMsDelta_biggerIsBetter);
- spanD.significance = tr.b.Statistics.Significance.SIGNIFICANT;
- checkSignificance(spanD, 'significantly_better');
-
- var spanE = document.createElement('tr-v-ui-scalar-span');
- spanE.setValueAndUnit(
- 400, Unit.byName.timeDurationInMsDelta_smallerIsBetter);
- spanE.significance = tr.b.Statistics.Significance.INSIGNIFICANT;
- checkSignificance(spanE, 'insignificant');
-
- var overall = document.createElement('div');
- overall.style.display = 'flex';
- // These spans must be on separate lines so that Chrome has the option of
- // making their heights different. The point of the test is that Chrome
- // shouldn't have to make their heights different even when it could.
- overall.style.flexDirection = 'column';
- Polymer.dom(overall).appendChild(spanA);
- Polymer.dom(overall).appendChild(spanB);
- Polymer.dom(overall).appendChild(spanC);
- Polymer.dom(overall).appendChild(spanD);
- Polymer.dom(overall).appendChild(spanE);
- this.addHTMLOutput(overall);
-
- var expectedHeight = spanA.getBoundingClientRect().height;
- assert.strictEqual(expectedHeight, spanB.getBoundingClientRect().height);
- assert.strictEqual(expectedHeight, spanC.getBoundingClientRect().height);
- assert.strictEqual(expectedHeight, spanD.getBoundingClientRect().height);
- assert.strictEqual(expectedHeight, spanE.getBoundingClientRect().height);
- });
-
- test('warningAndNonWarningHaveSimilarHeights', function() {
- var spanA = document.createElement('tr-v-ui-scalar-span');
- spanA.setValueAndUnit(400, Unit.byName.timeDurationInMs);
-
- var spanB = document.createElement('tr-v-ui-scalar-span');
- spanB.setValueAndUnit(400, Unit.byName.timeDurationInMs);
- spanB.warning = 'There is a problem with this time';
-
- var overall = document.createElement('div');
- overall.style.display = 'flex';
- // These spans must be on separate lines so that Chrome has the option of
- // making their heights different. The point of the test is that Chrome
- // shouldn't have to make their heights different even when it could.
- overall.style.flexDirection = 'column';
- Polymer.dom(overall).appendChild(spanA);
- Polymer.dom(overall).appendChild(spanB);
- this.addHTMLOutput(overall);
-
- var rectA = spanA.getBoundingClientRect();
- var rectB = spanB.getBoundingClientRect();
- assert.strictEqual(rectA.height, rectB.height);
- });
-
- test('respectCurrentDisplayUnit', function() {
- try {
- Unit.currentTimeDisplayMode = tr.b.TimeDisplayModes.ns;
-
- var span = document.createElement('tr-v-ui-scalar-span');
- span.setValueAndUnit(73, Unit.byName.timeStampInMs);
- this.addHTMLOutput(span);
-
- assert.isTrue(Polymer.dom(span.$.content).textContent.indexOf('ns') > 0);
- Unit.currentTimeDisplayMode = tr.b.TimeDisplayModes.ms;
- assert.isTrue(Polymer.dom(span.$.content).textContent.indexOf('ms') > 0);
- } finally {
- Unit.reset();
- }
- });
-
- function checkSparkline(span, expectation) {
- tr.b.forceAllPendingTasksToRunForTest();
- var sparklineEl = span.$.sparkline;
- var computedStyle = getComputedStyle(sparklineEl);
-
- var expectedDisplay = expectation.display || 'block';
- assert.strictEqual(computedStyle.display, expectedDisplay);
- if (expectedDisplay === 'none') {
- // Test expectation sanity check.
- assert.notProperty(expectation, 'left');
- assert.notProperty(expectation, 'width');
- assert.notProperty(expectation, 'classList');
- return;
- }
-
- assert.closeTo(parseFloat(computedStyle.left), expectation.left, 0.1);
- assert.closeTo(parseFloat(computedStyle.width), expectation.width, 0.1);
- assert.sameMembers(tr.b.asArray(sparklineEl.classList),
- expectation.classList || []);
- }
-
- test('customContextRange', function() {
- var div = document.createElement('div');
- div.style.width = '101px'; // One extra pixel for sparkline border.
- this.addHTMLOutput(div);
-
- // No custom context range.
- var span1 = tr.v.ui.createScalarSpan(0, {
- unit: Unit.byName.timeStampInMs
- });
- Polymer.dom(div).appendChild(span1);
- checkSparkline(span1, {display: 'none'});
- var span2 = tr.v.ui.createScalarSpan(0, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: undefined
- });
- Polymer.dom(div).appendChild(span2);
- checkSparkline(span2, {display: 'none'});
- var span3 = tr.v.ui.createScalarSpan(0, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: new tr.b.Range() // Empty range.
- });
- Polymer.dom(div).appendChild(span3);
- checkSparkline(span3, {display: 'none'});
-
- var range = tr.b.Range.fromExplicitRange(-15, 15);
-
- // Values inside custom context range.
- var span4 = tr.v.ui.createScalarSpan(-15, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span4);
- checkSparkline(span4, {left: 0, width: 51});
- var span5 = tr.v.ui.createScalarSpan(-14, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span5);
- checkSparkline(span5, {left: 3.33, width: 47.67});
- var span6 = tr.v.ui.createScalarSpan(-10, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span6);
- checkSparkline(span6, {left: 16.67, width: 34.33});
- var span7 = tr.v.ui.createScalarSpan(0, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span7);
- checkSparkline(span7, {left: 50, width: 1});
- var span8 = tr.v.ui.createScalarSpan(10, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span8);
- checkSparkline(span8, {left: 50, width: 34.33, classList: ['positive']});
- var span9 = tr.v.ui.createScalarSpan(14, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span9);
- checkSparkline(span9, {left: 50, width: 47.67, classList: ['positive']});
- var span10 = tr.v.ui.createScalarSpan(15, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span10);
- checkSparkline(span10, {left: 50, width: 51, classList: ['positive']});
-
- // Values outside custom context range.
- var span11 = tr.v.ui.createScalarSpan(-20, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span11);
- checkSparkline(span11, {left: 0, width: 51});
- var span12 = tr.v.ui.createScalarSpan(20, {
- unit: Unit.byName.timeStampInMs,
- customContextRange: range
- });
- Polymer.dom(div).appendChild(span12);
- checkSparkline(span12, {left: 50, width: 51, classList: ['positive']});
- });
-
- test('emptyNumeric', function() {
- assert.strictEqual(tr.v.ui.createScalarSpan(), '');
- });
-
- test('contextControllerChanges', function() {
- var div = document.createElement('div');
- div.style.width = '101px'; // One extra pixel for sparkline border.
- this.addHTMLOutput(div);
-
- div.appendChild(
- document.createElement('tr-v-ui-scalar-context-controller'));
-
- var s1 = tr.v.ui.createScalarSpan(10, {
- unit: Unit.byName.powerInWatts
- });
- Polymer.dom(div).appendChild(s1);
- checkSparkline(s1, {display: 'none'});
-
- var s2 = tr.v.ui.createScalarSpan(20, {
- unit: Unit.byName.powerInWatts,
- contextGroup: 'A'
- });
- Polymer.dom(div).appendChild(s2);
- checkSparkline(s1, {display: 'none'});
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
-
- var s3 = tr.v.ui.createScalarSpan(30, {
- unit: Unit.byName.powerInWatts,
- contextGroup: 'A'
- });
- Polymer.dom(div).appendChild(s3);
- checkSparkline(s1, {display: 'none'});
- checkSparkline(s2, {left: 0, width: 67.67, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
-
- var s4 = tr.v.ui.createScalarSpan(40, {
- unit: Unit.byName.powerInWatts,
- contextGroup: 'B'
- });
- Polymer.dom(div).appendChild(s4);
- checkSparkline(s1, {display: 'none'});
- checkSparkline(s2, {left: 0, width: 67.67, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {left: 0, width: 101, classList: ['positive']});
-
- s3.contextGroup = 'B';
- checkSparkline(s1, {display: 'none'});
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 76, classList: ['positive']});
- checkSparkline(s4, {left: 0, width: 101, classList: ['positive']});
-
- s1.setAttribute('context-group', 'A');
- checkSparkline(s1, {left: 0, width: 51, classList: ['positive']});
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 76, classList: ['positive']});
- checkSparkline(s4, {left: 0, width: 101, classList: ['positive']});
-
- s1.value = 50;
- checkSparkline(s1, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s2, {left: 0, width: 41, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 76, classList: ['positive']});
- checkSparkline(s4, {left: 0, width: 101, classList: ['positive']});
-
- s1.customContextRange = tr.b.Range.fromExplicitRange(0, 150);
- checkSparkline(s1, {left: 0, width: 34.33, classList: ['positive']});
- checkSparkline(s2, {left: 0, width: 41, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 76, classList: ['positive']});
- checkSparkline(s4, {left: 0, width: 101, classList: ['positive']});
-
- s4.contextGroup = null;
- checkSparkline(s1, {left: 0, width: 34.33, classList: ['positive']});
- checkSparkline(s2, {left: 0, width: 41, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
-
- s1.customContextRange = undefined;
- checkSparkline(s1, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s2, {left: 0, width: 41, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
-
- s4.value = 0;
- checkSparkline(s1, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s2, {left: 0, width: 41, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
-
- div.removeChild(s1);
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
-
- s1.contextGroup = 'B';
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
-
- div.appendChild(s1);
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 61, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
- checkSparkline(s1, {left: 0, width: 101, classList: ['positive']});
-
- s1.removeAttribute('context-group');
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
- checkSparkline(s1, {display: 'none'});
-
- s1.customContextRange = tr.b.Range.fromExplicitRange(0, 100);
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s4, {display: 'none'});
- checkSparkline(s1, {left: 0, width: 51, classList: ['positive']});
-
- s3.value = 0;
- checkSparkline(s2, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(s3, {display: 'none'});
- checkSparkline(s4, {display: 'none'});
- checkSparkline(s1, {left: 0, width: 51, classList: ['positive']});
- });
-
- test('deltaSparkline_noImprovementDirection', function() {
- var div = document.createElement('div');
- div.style.width = '101px'; // One extra pixel for sparkline border.
- this.addHTMLOutput(div);
- div.appendChild(
- document.createElement('tr-v-ui-scalar-context-controller'));
-
- var span1 = tr.v.ui.createScalarSpan(20971520, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span1);
- var span2 = tr.v.ui.createScalarSpan(15728640, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span2);
- var span3 = tr.v.ui.createScalarSpan(12582912, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span3);
- var span4 = tr.v.ui.createScalarSpan(11534336, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span4);
- var span5 = tr.v.ui.createScalarSpan(10485760, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span5);
- var span6 = tr.v.ui.createScalarSpan(9437184, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span6);
- var span7 = tr.v.ui.createScalarSpan(8388608, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span7);
- var span8 = tr.v.ui.createScalarSpan(5242880, {
- unit: Unit.byName.sizeInBytesDelta,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span8);
-
- // We must check the sparklines *after* all spans are appended because new
- // values can change the context range.
- checkSparkline(span1, {left: 0, width: 101, classList: ['positive']});
- checkSparkline(span2, {left: 0, width: 76, classList: ['positive']});
- checkSparkline(span3, {left: 0, width: 61, classList: ['positive']});
- checkSparkline(span4, {left: 0, width: 56, classList: ['positive']});
- checkSparkline(span5, {left: 0, width: 51, classList: ['positive']});
- checkSparkline(span6, {left: 0, width: 46, classList: ['positive']});
- checkSparkline(span7, {left: 0, width: 41, classList: ['positive']});
- checkSparkline(span8, {left: 0, width: 26, classList: ['positive']});
- });
-
- test('deltaSparkline_smallerIsBetter', function() {
- var div = document.createElement('div');
- div.style.width = '101px'; // One extra pixel for sparkline border.
- this.addHTMLOutput(div);
- div.appendChild(
- document.createElement('tr-v-ui-scalar-context-controller'));
-
- var span1 = tr.v.ui.createScalarSpan(5242880, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span1);
- var span2 = tr.v.ui.createScalarSpan(0, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span2);
- var span3 = tr.v.ui.createScalarSpan(-3145728, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span3);
- var span4 = tr.v.ui.createScalarSpan(-4194304, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span4);
- var span5 = tr.v.ui.createScalarSpan(-5242880, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span5);
- var span6 = tr.v.ui.createScalarSpan(-6291456, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span6);
- var span7 = tr.v.ui.createScalarSpan(-7340032, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span7);
- var span8 = tr.v.ui.createScalarSpan(-15728640, {
- unit: Unit.byName.sizeInBytesDelta_smallerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span8);
-
- // We must check the sparklines *after* all spans are appended because new
- // values can change the context range.
- checkSparkline(span1,
- {left: 75, width: 26, classList: ['positive', 'worse']});
- checkSparkline(span2, {left: 75, width: 1, classList: ['same']});
- checkSparkline(span3, {left: 60, width: 16, classList: ['better']});
- checkSparkline(span4, {left: 55, width: 21, classList: ['better']});
- checkSparkline(span5, {left: 50, width: 26, classList: ['better']});
- checkSparkline(span6, {left: 45, width: 31, classList: ['better']});
- checkSparkline(span7, {left: 40, width: 36, classList: ['better']});
- checkSparkline(span8, {left: 0, width: 76, classList: ['better']});
- });
-
- test('deltaSparkline_biggerIsBetter', function() {
- var div = document.createElement('div');
- div.style.width = '101px'; // One extra pixel for sparkline border.
- this.addHTMLOutput(div);
- div.appendChild(
- document.createElement('tr-v-ui-scalar-context-controller'));
-
- var span1 = tr.v.ui.createScalarSpan(0, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span1);
- var span2 = tr.v.ui.createScalarSpan(-5242880, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span2);
- var span3 = tr.v.ui.createScalarSpan(-8388608, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span3);
- var span4 = tr.v.ui.createScalarSpan(-9437184, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span4);
- var span5 = tr.v.ui.createScalarSpan(-10485760, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span5);
- var span6 = tr.v.ui.createScalarSpan(-11534336, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span6);
- var span7 = tr.v.ui.createScalarSpan(-12582912, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span7);
- var span8 = tr.v.ui.createScalarSpan(-20971520, {
- unit: Unit.byName.sizeInBytesDelta_biggerIsBetter,
- contextGroup: 'test'
- });
- Polymer.dom(div).appendChild(span8);
-
- // We must check the sparklines *after* all spans are appended because new
- // values can change the context range.
- checkSparkline(span1, {left: 100, width: 1, classList: ['same']});
- checkSparkline(span2, {left: 75, width: 26, classList: ['worse']});
- checkSparkline(span3, {left: 60, width: 41, classList: ['worse']});
- checkSparkline(span4, {left: 55, width: 46, classList: ['worse']});
- checkSparkline(span5, {left: 50, width: 51, classList: ['worse']});
- checkSparkline(span6, {left: 45, width: 56, classList: ['worse']});
- checkSparkline(span7, {left: 40, width: 61, classList: ['worse']});
- checkSparkline(span8, {left: 0, width: 101, classList: ['worse']});
- });
-
- test('classListChanges', function() {
- var div = document.createElement('div');
- div.style.width = '200px';
- this.addHTMLOutput(div);
-
- var span = tr.v.ui.createScalarSpan(10, {
- unit: Unit.byName.energyInJoulesDelta_smallerIsBetter,
- significance: tr.b.Statistics.Significance.SIGNIFICANT,
- customContextRange: tr.b.Range.fromExplicitRange(-20, 20)
- });
- Polymer.dom(div).appendChild(span);
-
- assert.sameMembers(tr.b.asArray(span.$.content.classList), ['worse']);
- checkSignificance(span, 'significantly_worse');
-
- span.significance = tr.b.Statistics.Significance.DONT_CARE;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList),
- ['positive', 'worse']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), ['worse']);
- checkSignificance(span, '');
-
- span.value = -5;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList), ['better']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), ['better']);
- checkSignificance(span, '');
-
- span.unit = Unit.byName.energyInJoules;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList), []);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), []);
- checkSignificance(span, '');
-
- span.value = 20;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList), ['positive']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), []);
- checkSignificance(span, '');
-
- span.unit = Unit.byName.energyInJoulesDelta_biggerIsBetter;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList),
- ['positive', 'better']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), ['better']);
- checkSignificance(span, '');
-
- span.significance = tr.b.Statistics.Significance.INSIGNIFICANT;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList),
- ['positive', 'better']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), ['better']);
- checkSignificance(span, 'insignificant');
-
- span.unit = Unit.byName.energyInJoulesDelta_smallerIsBetter;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList),
- ['positive', 'worse']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), ['worse']);
- checkSignificance(span, 'insignificant');
-
- span.unit = Unit.byName.energyInJoulesDelta;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList), ['positive']);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), []);
- checkSignificance(span, '');
-
- span.value = 0;
- assert.sameMembers(tr.b.asArray(span.$.sparkline.classList), []);
- assert.sameMembers(tr.b.asArray(span.$.content.classList), []);
- checkSignificance(span, '');
- });
-
- test('sparkline_uncentered', function() {
- var div = document.createElement('div');
- this.addHTMLOutput(div);
- div.appendChild(
- document.createElement('tr-v-ui-scalar-context-controller'));
-
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(-1, {
- unit: Unit.byName.powerInWattsDelta,
- contextGroup: 'test'
- }));
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(100, {
- unit: Unit.byName.powerInWattsDelta,
- contextGroup: 'test'
- }));
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(80, {
- unit: Unit.byName.powerInWattsDelta,
- contextGroup: 'test'
- }));
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(60, {
- unit: Unit.byName.powerInWattsDelta,
- contextGroup: 'test'
- }));
- });
-
- test('sparkline_centered', function() {
- var div = document.createElement('div');
- this.addHTMLOutput(div);
- div.appendChild(
- document.createElement('tr-v-ui-scalar-context-controller'));
-
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(-1, {
- unit: Unit.byName.powerInWattsDelta,
- customContextRange: tr.b.Range.fromExplicitRange(-100, 100)
- }));
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(100, {
- unit: Unit.byName.powerInWattsDelta,
- customContextRange: tr.b.Range.fromExplicitRange(-100, 100)
- }));
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(80, {
- unit: Unit.byName.powerInWattsDelta,
- customContextRange: tr.b.Range.fromExplicitRange(-100, 100)
- }));
- Polymer.dom(div).appendChild(tr.v.ui.createScalarSpan(60, {
- unit: Unit.byName.powerInWattsDelta,
- customContextRange: tr.b.Range.fromExplicitRange(-100, 100)
- }));
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table.html b/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table.html
deleted file mode 100644
index 7a1422c2f68..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table.html
+++ /dev/null
@@ -1,955 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/raf.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/ui/base/grouping_table_groupby_picker.html">
-<link rel="import" href="/tracing/ui/base/table.html">
-<link rel="import" href="/tracing/value/ui/diagnostic_span.html">
-<link rel="import" href="/tracing/value/ui/histogram_span.html">
-<link rel="import" href="/tracing/value/ui/scalar_span.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<dom-module id="tr-v-ui-value-set-table-cell">
- <template>
- <style>
- :host {
- display: flex;
- flex-direction: row;
- }
-
- #missing, #empty, #unmergeable, #scalar {
- flex-grow: 1;
- }
-
- svg {
- height: 1em;
- }
-
- #open_histogram {
- margin-left: 4px;
- stroke-width: 0;
- stroke: blue;
- fill: blue;
- }
- :host(:hover) #open_histogram {
- background: blue;
- stroke: white;
- fill: white;
- }
-
- #scalar {
- flex-grow: 1;
- white-space: nowrap;
- }
-
- #histogram {
- flex-grow: 1;
- }
-
- #close_histogram line {
- stroke-width: 18;
- stroke: black;
- }
- #close_histogram:hover {
- background: black;
- }
- #close_histogram:hover line {
- stroke: white;
- }
- </style>
-
- <span id="missing">(missing)</span>
- <span id="empty">(empty)</span>
- <span id="unmergeable">(unmergeable)</span>
-
- <tr-v-ui-scalar-span id="scalar" on-click="openHistogram_"></tr-v-ui-scalar-span>
-
- <svg viewbox="0 0 128 128" id="open_histogram" on-click="openHistogram_">
- <rect x="16" y="24" width="32" height="16"/>
- <rect x="16" y="56" width="96" height="16"/>
- <rect x="16" y="88" width="64" height="16"/>
- </svg>
-
- <tr-v-ui-histogram-span id="histogram"></tr-v-ui-histogram-span>
-
- <svg viewbox="0 0 128 128" id="close_histogram" on-click="closeHistogram_">
- <line x1="28" y1="28" x2="100" y2="100"/>
- <line x1="28" y1="100" x2="100" y2="28"/>
- </svg>
- </template>
-</dom-module>
-
-<dom-module id="tr-v-ui-value-set-table">
- <template>
- <style>
- :host {
- display: block;
- }
-
- #container {
- flex-direction: column;
- display: none;
- }
-
- table-container {
- margin-top: 5px;
- display: flex;
- min-height: 0px;
- overflow-y: auto;
- }
-
- #histogram {
- display: none;
- }
-
- #zero {
- color: red;
- /* value-set-table is used by both metrics-side-panel and results2.html.
- * This font-size rule has no effect in results2.html, but improves
- * legibility in the metrics-side-panel, which sets font-size in order to
- * make this table denser.
- */
- font-size: initial;
- }
-
- #search {
- max-width: 20em;
- margin-right: 20px;
- }
-
- #controls {
- white-space: nowrap;
- }
-
- #reference_column_container * {
- margin-right: 20px;
- }
- </style>
-
- <div id="zero">zero values</div>
-
- <div id="container">
- <div id="controls">
- <input id="search" placeholder="Find Histogram name" on-keyup="onSearch_">
-
- <span id="reference_column_container"></span>
-
- <input type="checkbox" id="show_all" on-change="onShowAllChange_" title="When unchecked, less important histograms are hidden.">
- <label for="show_all" title="When unchecked, less important histograms are hidden.">Show all</label>
- </div>
-
- <tr-ui-b-grouping-table-groupby-picker id="picker">
- </tr-ui-b-grouping-table-groupby-picker>
-
- <table-container>
- <tr-ui-b-table id="table"/>
- </table-container>
- </div>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-tr.exportTo('tr.ui', function() {
- /**
- * Returns a closure that gets a story grouping key label from a Histogram.
- *
- * @param {string} storyGroupingKey
- * @return {!function(tr.v.Histogram):string}
- */
- function makeStoryGroupingKeyLabelGetter(storyGroupingKey) {
- return v => tr.v.d.IterationInfo.getStoryGroupingKeyLabel(
- v, storyGroupingKey);
- }
-
- var getDisplayLabel = tr.v.ValueSet.GROUPINGS.DISPLAY_LABEL.callback;
-
- var DEFAULT_POSSIBLE_GROUPS = [];
- DEFAULT_POSSIBLE_GROUPS.push(new tr.v.HistogramGrouping(
- tr.v.ValueSet.GROUPINGS.HISTOGRAM_NAME.key,
- h => h.shortName || h.name));
-
- tr.b.iterItems(tr.v.ValueSet.GROUPINGS, function(name, group) {
- // DISPLAY_LABEL is used to define the columns, so don't allow grouping
- // rows by it.
- // Override HISTOGRAM_NAME so that we can display shortName.
- if (group !== tr.v.ValueSet.GROUPINGS.DISPLAY_LABEL &&
- group !== tr.v.ValueSet.GROUPINGS.HISTOGRAM_NAME)
- DEFAULT_POSSIBLE_GROUPS.push(group);
- });
-
- var SHOW_ALL_SETTINGS_KEY = 'tr-v-ui-value-set-table-show-all';
-
- var UNMERGEABLE = '(unmergeable)';
-
- Polymer({
- is: 'tr-v-ui-value-set-table-cell',
-
- created: function() {
- this.histogram_ = undefined;
- this.referenceHistogram_ = undefined;
- },
-
- ready: function() {
- this.addEventListener('click', this.onClick_.bind(this));
- },
-
- onClick_: function(event) {
- // Since the value-set-table's table doesn't support any kind of
- // selection, clicking anywhere within a row that has subRows will
- // expand/collapse that row, which can relayout the table and move things
- // around. Prevent table relayout by preventing the tr-ui-b-table from
- // receiving the click event.
- event.stopPropagation();
- },
-
- get histogram() {
- return this.histogram_;
- },
-
- /**
- * @param {undefined|string|!tr.v.Histogram} h
- */
- set histogram(h) {
- this.histogram_ = h;
- this.updateContents_();
- },
-
- /**
- * @param {undefined|string|!tr.v.Histogram} rh
- */
- set referenceHistogram(rh) {
- this.referenceHistogram_ = rh;
- this.updateContents_();
- },
-
- get referenceHistogram() {
- return this.referenceHistogram_;
- },
-
- get isHistogramOpen() {
- return this.$.histogram.style.display === 'block';
- },
-
- set isHistogramOpen(open) {
- if (!this.histogram ||
- this.histogram === UNMERGEABLE ||
- !(this.histogram instanceof tr.v.Histogram) ||
- (this.histogram.numValues === 0)) {
- return;
- }
-
- // Unfortunately, we can't use a css attribute for this since this stuff
- // is tied up in all the possible states of this.histogram. See
- // updateContents_().
-
- this.$.scalar.style.display = open ? 'none' : 'block';
- this.$.open_histogram.style.display = open ? 'none' : 'block';
-
- this.$.close_histogram.style.display = open ? 'block' : 'none';
- this.$.histogram.style.display = open ? 'block' : 'none';
-
- if (open) {
- // Wait to pass the Histogram to the histogram-span until it's displayed
- // so that it can size its BarChart appropriately.
- this.$.histogram.referenceHistogram = this.referenceHistogram;
- this.$.histogram.histogram = this.histogram;
- }
- },
-
- openHistogram_: function() {
- this.isHistogramOpen = true;
- },
-
- closeHistogram_: function() {
- this.isHistogramOpen = false;
- },
-
- updateContents_: function() {
- this.$.empty.style.display = 'none';
- this.$.unmergeable.style.display = 'none';
- this.$.scalar.style.display = 'none';
- this.$.histogram.style.display = 'none';
- this.$.close_histogram.style.display = 'none';
- this.$.open_histogram.style.visibility = 'hidden';
-
- if (!this.histogram) {
- this.$.missing.style.display = 'block';
- return;
- }
-
- this.$.missing.style.display = 'none';
-
- if (this.histogram === UNMERGEABLE) {
- this.$.unmergeable.style.display = 'block';
- return;
- }
-
- if (!(this.histogram instanceof tr.v.Histogram)) {
- throw new Error('Invalid Histogram: ' + this.histogram);
- }
-
- if (this.histogram.numValues === 0) {
- this.$.empty.style.display = 'block';
- return;
- }
-
- this.$.open_histogram.style.display = 'block';
- this.$.open_histogram.style.visibility = 'visible';
- this.$.scalar.style.display = 'block';
-
- if ((this.referenceHistogram instanceof tr.v.Histogram) &&
- (this.histogram.unit === this.referenceHistogram.unit) &&
- (this.referenceHistogram.numValues > 0)) {
- this.$.scalar.setValueAndUnit(
- this.histogram.average - this.referenceHistogram.average,
- this.histogram.unit.correspondingDeltaUnit);
- this.$.scalar.significance = this.histogram.getDifferenceSignificance(
- this.referenceHistogram);
- } else {
- this.$.scalar.setValueAndUnit(
- this.histogram.average, this.histogram.unit);
- }
- }
- });
-
- Polymer({
- is: 'tr-v-ui-value-set-table',
-
- /**
- * This can optionally depend on the ValueSet.
- *
- * @return {string}
- */
- get tabLabel() {
- return 'Table';
- },
-
- created: function() {
- /** @type {undefined|!tr.v.ValueSet} */
- this.values_ = undefined;
-
- /** @type {undefined|!tr.v.ValueSet} */
- this.sourceValues_ = undefined;
-
- this.rows_ = undefined;
- this.columns_ = undefined;
-
- this.updatingContents_ = false;
- this.displayLabels_ = undefined;
- this.referenceDisplayLabel_ = undefined;
- },
-
- ready: function() {
- this.$.table.zebra = true;
- this.addEventListener('requestSelectionChange',
- this.onRelatedValueSelected_.bind(this));
- this.$.show_all.checked = tr.b.Settings.get(SHOW_ALL_SETTINGS_KEY, false);
- this.$.picker.settingsKey = 'tr-v-ui-value-set-table-groupby-picker';
-
- this.$.picker.possibleGroups = DEFAULT_POSSIBLE_GROUPS.slice();
- this.$.picker.defaultGroupKeys = [
- tr.v.ValueSet.GROUPINGS.HISTOGRAM_NAME.key,
- tr.v.ValueSet.GROUPINGS.STORY_NAME.key];
- this.$.picker.addEventListener('current-groups-changed',
- this.currentGroupsChanged_.bind(this));
- },
-
- set groupingKeys(keys) {
- this.$.picker.currentGroupKeys = keys;
- },
-
- get groupingKeys() {
- return this.$.picker.currentGroupKeys;
- },
-
- get possibleGroupingKeys() {
- return this.$.picker.possibleGroups.map(g => g.key);
- },
-
- currentGroupsChanged_: function() {
- if (this.updatingContents_)
- return;
-
- if (this.$.picker.currentGroups.length === 0 &&
- this.possibleGroupingKeys.length > 0) {
- this.$.picker.currentGroupKeys = [this.$.picker.possibleGroups[0].key];
- }
- var expansionStates = undefined;
- if (this.rows_)
- expansionStates = this.getExpansionStates_();
- this.updateContents_();
- if (expansionStates)
- this.setExpansionStates_(expansionStates);
- },
-
- onShowAllChange_: function() {
- if (this.updatingContents_)
- return;
-
- tr.b.Settings.set(SHOW_ALL_SETTINGS_KEY, this.$.show_all.checked);
- var expansionStates = this.getExpansionStates_();
- this.updateContents_();
- this.setExpansionStates_(expansionStates);
- },
-
- getExpansionStates_: function() {
- var table = this.$.table;
- function recurse(row) {
- var rowStates = {
- expanded: table.getExpandedForTableRow(row),
- cells: new Map(),
- subRows: new Map()
- };
-
- tr.b.iterItems(row.cells, function(displayLabel, cell) {
- if (cell.isHistogramOpen) {
- rowStates.cells.set(displayLabel, true);
- }
- });
-
- if (rowStates.expanded) {
- for (var i = 0; i < row.subRows.length; ++i) {
- rowStates.subRows.set(i, recurse(row.subRows[i]));
- }
- }
- return rowStates;
- }
-
- var states = new Map();
- for (var i = 0; i < this.rows_.length; ++i) {
- states.set(i, recurse(this.rows_[i]));
- }
- return states;
- },
-
- setExpansionStates_: function(states) {
- var table = this.$.table;
- function recurse(row, rowStates) {
- if (rowStates.expanded) {
- table.setExpandedForTableRow(row, true);
- }
-
- for (var [displayLabel, value] of rowStates.cells) {
- var cell = row.cells[displayLabel];
- if (cell) {
- cell.isHistogramOpen = value;
- }
- }
- for (var [key, value] of rowStates.subRows) {
- var subRow = row.subRows[key];
- recurse(subRow, value);
- }
- }
-
- for (var i = 0; i < this.rows_.length; ++i) {
- var rowStates = states.get(i);
- if (rowStates === undefined) {
- continue;
- }
- var row = this.rows_[i];
- recurse(row, rowStates);
- }
- },
-
- onSearch_: function() {
- this.updateContents_();
- },
-
- rowMatchesSearch_: function(row) {
- return row.name.indexOf(this.$.search.value) >= 0;
- },
-
- onRelatedValueSelected_: function(event) {
- var value = event.selection;
- if (!(value instanceof tr.v.Histogram))
- return;
-
- event.stopPropagation();
-
- var displayLabel = getDisplayLabel(value);
- var columnIndex = -1;
- for (var i = 0; i < this.columns_.length; ++i) {
- if (this.columns_[i].title === displayLabel) {
- columnIndex = i;
- break;
- }
- }
- if (columnIndex < 0)
- return;
-
- var hierarchy = [];
- var found = false;
- function search(row) {
- if (row.columns[displayLabel] === value) {
- for (var hirow in hierarchy) {
- this.$.table.setExpandedForTableRow(hirow, true);
- }
- found = true;
- row.cells[displayLabel].isHistogramOpen = true;
- return;
- }
- if (!row.subRows)
- return;
- hierarchy.push(row);
- row.subRows.forEach(search, this);
- hierarchy.pop(row);
- }
- this.rows_.forEach(search, this);
-
- if (found || this.$.show_all.checked)
- return;
-
- // Search hidden values for |value|.
- for (var test of this.values) {
- if (test === value) {
- found = true;
- this.$.show_all.checked = true;
- this.onShowAllChange_();
- this.onRelatedValueSelected_(event);
- break;
- }
- }
- },
-
- get values() {
- return this.values_;
- },
-
- /**
- * @param {!tr.v.ValueSet} values
- */
- set values(values) {
- this.values_ = values;
- this.sourceValues_ = values ? values.sourceValues : new tr.v.ValueSet();
- this.displayLabels_ = undefined;
- this.referenceDisplayLabel_ = undefined;
- this.maybeDisableShowAll_();
- this.updateContents_();
- },
-
- get referenceDisplayLabel() {
- return this.referenceDisplayLabel_;
- },
-
- set referenceDisplayLabel(reference) {
- this.referenceDisplayLabel_ = reference;
-
- if (this.updatingContents_)
- return;
-
- this.$.table.selectedTableColumnIndex = this.referenceDisplayLabel ?
- 1 + this.displayLabels.indexOf(this.referenceDisplayLabel) : undefined;
-
- // Force the table to rebuild the cell values without forgetting which
- // rows were expanded.
- var expansionStates = this.getExpansionStates_();
- this.$.table.tableRows = this.rows_;
- this.setExpansionStates_(expansionStates);
- },
-
- updateReferenceColumnSelector_: function() {
- Polymer.dom(this.$.reference_column_container).textContent = '';
-
- if (this.displayLabels.length < 2)
- return;
-
- var options = [{value: '', label: 'Select a reference column'}];
- for (var displayLabel of this.displayLabels)
- options.push({value: displayLabel, label: displayLabel});
-
- var settingsKey =
- 'tr-v-ui-value-set-table-reference-display-label';
- Polymer.dom(this.$.reference_column_container).appendChild(
- tr.ui.b.createSelector(
- this, 'referenceDisplayLabel', settingsKey, '', options));
- },
-
- updateGroups_: function() {
- var groups = DEFAULT_POSSIBLE_GROUPS.filter(function(group) {
- // Remove groups for which there is only one value, except
- // HISTOGRAM_NAME.
- if (group.key === tr.v.ValueSet.GROUPINGS.HISTOGRAM_NAME.key)
- return true;
-
- var values = new Set();
- for (var value of this.values_) {
- value = group.callback(value);
- if (!value)
- continue;
-
- values.add(value);
- if (values.size > 1)
- return true;
- }
- return false; // Prune this grouping.
- }, this);
-
- // Add all storyGroupingKey groups for the current values.
- for (var storyGroupingKey of this.storyGroupingKeys) {
- groups.push(new tr.v.HistogramGrouping(
- 'storyGroupingKey_' + storyGroupingKey,
- makeStoryGroupingKeyLabelGetter(storyGroupingKey),
- storyGroupingKey));
- }
-
- // Save and restore current grouping keys in order to let
- // |set groupingKeys| filter out the keys that are no longer in
- // possibleGroups.
- var groupingKeys = this.groupingKeys;
- this.$.picker.possibleGroups = groups;
- this.$.picker.currentGroupKeys = groupingKeys;
-
- this.$.picker.style.display = (groups.length === 1) ? 'none' : '';
- },
-
- updateContents_: function() {
- if (this.updatingContents_)
- return;
-
- if (!this.values_ || (this.values_.length === 0)) {
- this.$.container.style.display = '';
- this.$.zero.style.display = '';
- return;
- }
-
- this.updatingContents_ = true;
-
- this.$.zero.style.display = 'none';
- this.$.container.style.display = 'block';
- this.$.table.style.display = '';
-
- this.updateReferenceColumnSelector_();
- this.updateGroups_();
- this.buildRows_();
- this.buildColumns_();
- this.$.table.tableColumns = this.columns_;
- this.$.table.tableRows = this.rows_;
- this.$.table.sortColumnIndex = 0;
- this.$.table.rebuild();
-
- this.$.table.selectedTableColumnIndex = this.referenceDisplayLabel ?
- 1 + this.displayLabels.indexOf(this.referenceDisplayLabel) : undefined;
-
- this.updatingContents_ = false;
- },
-
- maybeDisableShowAll_: function() {
- var allValuesAreSource = !this.values ||
- (this.values.length === this.sourceValues_.length);
-
- // Disable show_all if all values are sourceValues.
- // Re-enable show_all if this changes.
- this.$.show_all.disabled = allValuesAreSource;
-
- // Check show_all if it is disabled.
- // Do not automatically uncheck show_all.
- if (this.$.show_all.disabled) {
- this.$.show_all.checked = true;
- }
- },
-
- /**
- * Build table rows recursively from organized Values. The recursion stack
- * of subRows is maintained in |hierarchy|.
- *
- * @param {!Object} organizedValues
- * @param {!Array.<!Object>} hierarchy
- */
- buildRow_: function(organizedValues, hierarchy) {
- for (var [name, values] of organizedValues) {
- if (values instanceof Array) {
- // This recursion base case corresponds to the recursion base case of
- // groupHistogramsRecursively(). The last groupingCallback is always
- // getDisplayLabel, which defines the columns of the table and is
- // unskippable.
- for (var value of values) {
- // Merge Values up the grouping hierarchy.
- for (var row of hierarchy) {
- if (!row.description) {
- row.description = value.description;
- }
-
- if (!row.columns[name]) {
- row.columns[name] = value;
- continue;
- }
- if (row.columns[name] === UNMERGEABLE) {
- continue;
- }
- if (!row.columns[name].canAddHistogram(value)) {
- row.columns[name] = UNMERGEABLE;
- continue;
- }
-
- // Create a new Histogram with a new uuid instead of cloning
- // either |value| or |row.columns[name]| so that we don't clone
- // either Histogram's diagnostics.
- // |value.name| might not necessarily equal |row.columns[name]|,
- // but that shouldn't matter for this dom-module.
- // TODO(eakuefner) When MergedFrom diagnostic lands, only create a
- // new Histogram if |row.columns[name]| doesn't have it so that we
- // don't create new Histograms unnecessarily.
- var merged = value.cloneEmpty();
- merged.addHistogram(row.columns[name]);
- merged.addHistogram(value);
- row.columns[name] = merged;
- }
- }
- } else if (values instanceof Map) {
- // |values| is actually a nested organizedValues.
- var row = {name: name, subRows: [], columns: {}, cells: {}};
- hierarchy.push(row);
- this.buildRow_(values, hierarchy);
- hierarchy.pop();
-
- if (hierarchy.length === 0)
- this.rows_.push(row);
- else
- hierarchy[hierarchy.length - 1].subRows.push(row);
- }
- }
- },
-
- get storyGroupingKeys() {
- var keys = new Set();
- for (var value of this.values) {
- var iteration = tr.v.d.IterationInfo.getFromValue(value);
- if (!(iteration instanceof tr.v.d.IterationInfo) ||
- !iteration.storyGroupingKeys)
- continue;
-
- for (var key in iteration.storyGroupingKeys)
- keys.add(key);
- }
- return [...keys.values()].sort();
- },
-
- /**
- * A ValueSet is a flat set of Values. Value-set-table must present a
- * hierarchical view. This method recursively groups this.values as an
- * intermediate step towards building tableRows in buildRow_().
- * {
- * valueA: {
- * benchmarkA: {
- * storyA: {
- * startA: {
- * storysetRepeatCounterA: {
- * storyRepeatCounterA: {
- * displayLabelA: Value,
- * displayLabelB: Value
- * }
- * }
- * }
- * }
- * }
- * }
- * }
- * @return {!Object}
- */
- get organizedValues_() {
- var showingValueSet = this.$.show_all.checked ?
- this.values : this.sourceValues_;
-
- var groupings = this.$.picker.currentGroups.slice();
- groupings.push(tr.v.ValueSet.GROUPINGS.DISPLAY_LABEL);
-
- function canSkipGrouping(grouping, groupedHistograms) {
- // Never skip meaningful groupings.
- if (groupedHistograms.size > 1)
- return false;
-
- // Never skip the zero-th grouping.
- if (grouping.key === groupings[0].key)
- return false;
-
- // Never skip the grouping that defines the table columns.
- if (grouping.key === tr.v.ValueSet.GROUPINGS.DISPLAY_LABEL.key)
- return false;
-
- // Skip meaningless groupings.
- return true;
- }
-
- return showingValueSet.groupHistogramsRecursively(
- groupings, canSkipGrouping);
- },
-
- /* this.rows_ will look something like
- * [
- * {
- * name: 'value name',
- * columns: {
- * displayLabelA: Value,
- * displayLabelB: Value,
- * },
- * subRows: [
- * {
- * name: 'benchmark name if multiple',
- * columns: {
- * displayLabelA: Value,
- * displayLabelB: Value,
- * },
- * subRows: [
- * {
- * name: 'story name if multiple',
- * columns: {
- * displayLabelA: Value,
- * displayLabelB: Value,
- * },
- * subRows: [
- * {
- * name: 'benchmark start if multiple',
- * columns: {
- * displayLabelA: Value,
- * displayLabelB: Value,
- * },
- * subRows: [
- * {
- * name: 'storyset repeat counter if multiple',
- * columns: {
- * displayLabelA: Value,
- * displayLabelB: Value,
- * },
- * subRows: [
- * {
- * name: 'story repeat counter if multiple',
- * columns: {
- * displayLabelA: Value,
- * displayLabelB: Value,
- * },
- * subRows: [
- * {
- * name: 'diagnostic map key',
- * columns: {
- * displayLabelA: Diagnostic,
- * displayLabelB: Diagnostic,
- * },
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- * ]
- * }
- * ]
- *
- * Any of those layers may be missing except 'value name'.
- */
- buildRows_: function() {
- this.rows_ = [];
- var hierarchy = [];
- var organizedValues = this.organizedValues_;
- this.buildRow_(organizedValues, hierarchy);
- this.rows_ = this.rows_.filter(this.rowMatchesSearch_.bind(this));
- },
-
- get startTimesForDisplayLabels() {
- var startTimesForDisplayLabels = {};
- for (var value of this.values) {
- var displayLabel = getDisplayLabel(value);
- startTimesForDisplayLabels[displayLabel] = Math.min(
- startTimesForDisplayLabels[displayLabel] || 0,
- tr.v.d.IterationInfo.getField(
- value, 'benchmarkStart', new Date(0)).getTime());
- }
- return startTimesForDisplayLabels;
- },
-
- get displayLabels() {
- if (this.displayLabels_ === undefined) {
- var startTimesForDisplayLabels = this.startTimesForDisplayLabels;
- this.displayLabels_ = Object.keys(startTimesForDisplayLabels);
- this.displayLabels_.sort(function(a, b) {
- return startTimesForDisplayLabels[a] - startTimesForDisplayLabels[b];
- });
- }
- return this.displayLabels_;
- },
-
- buildColumn_: function(displayLabel) {
- return {
- title: displayLabel,
- align: tr.ui.b.TableFormat.ColumnAlignment.RIGHT,
-
- value: row => {
- var cell = document.createElement('tr-v-ui-value-set-table-cell');
- cell.histogram = row.columns[displayLabel];
- if (this.referenceDisplayLabel &&
- this.referenceDisplayLabel !== displayLabel) {
- cell.referenceHistogram = row.columns[this.referenceDisplayLabel];
- }
- row.cells[displayLabel] = cell;
- return cell;
- },
-
- cmp: (rowA, rowB) => {
- var cellA = rowA.columns[displayLabel];
- var cellB = rowB.columns[displayLabel];
- if (!(cellA instanceof tr.v.Histogram) ||
- !(cellB instanceof tr.v.Histogram)) {
- return undefined;
- }
-
- var valueA = cellA.average;
- var valueB = cellB.average;
-
- // If a reference column is selected, compare the absolute deltas
- // between the two cells and their references.
- if (this.referenceDisplayLabel &&
- this.referenceDisplayLabel !== displayLabel) {
- var referenceCellA = rowA.columns[this.referenceDisplayLabel];
- var referenceCellB = rowB.columns[this.referenceDisplayLabel];
- if (referenceCellA instanceof tr.v.Histogram &&
- referenceCellB instanceof tr.v.Histogram &&
- cellA.unit === referenceCellA.unit &&
- cellB.unit === referenceCellB.unit) {
- valueA -= referenceCellA.average;
- valueB -= referenceCellB.average;
- }
- }
-
- return valueA - valueB;
- }
- };
- },
-
- buildColumns_: function() {
- this.columns_ = [
- {
- title: 'Name',
-
- value: function(row) {
- var nameEl = document.createElement('span');
- Polymer.dom(nameEl).textContent = row.name;
- if (row.description) {
- nameEl.title = row.description;
- }
- nameEl.style.whiteSpace = 'nowrap';
- return nameEl;
- },
-
- cmp: (a, b) => a.name.localeCompare(b.name)
- }
- ];
-
- for (var displayLabel of this.displayLabels) {
- this.columns_.push(this.buildColumn_(displayLabel));
- }
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table_test.html
deleted file mode 100644
index 1b27c8ab5f9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_table_test.html
+++ /dev/null
@@ -1,544 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/utils.html">
-<link rel="import" href="/tracing/ui/base/deep_utils.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/value_set_table.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- var TEST_BOUNDARIES = tr.v.HistogramBinBoundaries.createLinear(0, 1e3, 20);
-
- function getTableRowAtPath(table, path) {
- var row = table.tableRows[0];
- for (var index of path)
- row = row.subRows[index];
- return row;
- }
-
- test('requestSelectionChange', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var barHist = new tr.v.Histogram('bar',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- barHist.addSample(1);
-
- var fooHist = new tr.v.Histogram('foo',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- fooHist.addSample(1);
- var breakdown = new tr.v.d.RelatedHistogramBreakdown();
- breakdown.set('bar', barHist);
-
- fooHist.diagnostics.set('breakdown', breakdown);
- values.addHistogram(fooHist);
- values.addHistogram(barHist);
-
- table.values = values;
- this.addHTMLOutput(table);
-
- var fooCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === fooHist)));
- assert.isDefined(fooCell);
-
- var barCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === barHist)));
- assert.isUndefined(barCell);
-
- fooCell.isHistogramOpen = true;
-
- var barLink = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.tagName === 'TR-UI-A-ANALYSIS-LINK');
- assert.isDefined(barLink);
- barLink.click();
-
- barCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === barHist)));
- assert.isDefined(barCell);
- });
-
- test('search', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var barHist = new tr.v.Histogram('bar',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- barHist.addSample(1);
-
- var fooHist = new tr.v.Histogram('foo',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- fooHist.addSample(1);
-
- values.addHistogram(fooHist);
- values.addHistogram(barHist);
-
- table.values = values;
- this.addHTMLOutput(table);
-
- var search = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.id === 'search');
- search.value = 'bar';
-
- var fooCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === fooHist)));
- assert.isDefined(fooCell);
-
- var barCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === barHist)));
- assert.isDefined(barCell);
-
- var search = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.id === 'search');
-
- search.value = 'bar';
- table.onSearch_();
-
- fooCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === fooHist)));
- assert.isUndefined(fooCell);
-
- barCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === barHist)));
- assert.isDefined(barCell);
-
- search.value = 'foo';
- table.onSearch_();
-
- fooCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === fooHist)));
- assert.isDefined(fooCell);
-
- barCell = tr.b.findDeepElementMatchingPredicate(
- table, elem => (
- (elem.tagName === 'TR-V-UI-VALUE-SET-TABLE-CELL') &&
- (elem.histogram === barHist)));
- assert.isUndefined(barCell);
- });
-
- test('implicitUndefinedValues', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- this.addHTMLOutput(table);
- assert.strictEqual('block', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === 'zero values')).display);
- assert.strictEqual('none', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.id === 'container')).display);
- });
-
- test('explicitUndefinedValues', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- table.values = undefined;
- this.addHTMLOutput(table);
- assert.strictEqual('block', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === 'zero values')).display);
- assert.strictEqual('none', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.id === 'container')).display);
- });
-
- test('emptyValues', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
- table.values = values;
- this.addHTMLOutput(table);
- assert.strictEqual('block', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === 'zero values')).display);
- assert.strictEqual('none', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.id === 'container')).display);
- });
-
- test('shortName', function() {
- // One value has |name|='long name' and |shortName|='short name',
- // another value has |name|='short name' to demonstrate the fundamental
- // ambiguity that arises when Values can have multiple different "names".
-
- var now = new Date().getTime();
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var histA = new tr.v.Histogram('long name',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- histA.addSample(Math.random() * 1e3);
- histA.shortName = 'short name';
- new tr.v.d.IterationInfo({
- label: 'iteration A',
- benchmarkStartMs: now,
- }).addToValue(histA);
- values.addHistogram(histA);
-
- var histB = new tr.v.Histogram('short name',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- histB.addSample(Math.random() * 1e3);
- new tr.v.d.IterationInfo({
- label: 'iteration B',
- benchmarkStartMs: now,
- }).addToValue(histB);
- values.addHistogram(histB);
-
- table.values = values;
- this.addHTMLOutput(table);
-
- assert.strictEqual('none', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === 'zero values')).display);
- assert.strictEqual('block', getComputedStyle(
- tr.b.findDeepElementMatchingPredicate(
- table, e => e.id === 'container')).display);
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === 'short name'));
- assert.isUndefined(tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === 'long name'));
- });
-
- test('emptyAndMissing', function() {
- var now = new Date().getTime();
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var histA = new tr.v.Histogram('histogram A',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- histA.addSample(Math.random() * 1e3);
- new tr.v.d.IterationInfo({
- label: 'iteration A',
- benchmarkStartMs: now,
- }).addToValue(histA);
- values.addHistogram(histA);
-
- var histB = new tr.v.Histogram('histogram B',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- histB.addSample(Math.random() * 1e3);
- new tr.v.d.IterationInfo({
- label: 'iteration B',
- benchmarkStartMs: now,
- }).addToValue(histB);
- values.addHistogram(histB);
-
- var histC = new tr.v.Histogram('histogram A',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- new tr.v.d.IterationInfo({
- label: 'iteration B',
- benchmarkStartMs: now,
- }).addToValue(histC);
- values.addHistogram(histC);
-
- table.values = values;
- this.addHTMLOutput(table);
-
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === '(empty)'));
- assert.isDefined(tr.b.findDeepElementMatchingPredicate(
- table, e => e.textContent === '(missing)'));
- });
-
- test('instantiate_1x1', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var hist = new tr.v.Histogram('foo',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- hist.addSample(Math.random() * 1e3);
- values.addHistogram(hist);
-
- table.values = values;
- this.addHTMLOutput(table);
-
- var baseTable = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.tagName === 'TR-UI-B-TABLE');
- assert.strictEqual(baseTable.tableRows.length, 1);
- });
-
- test('merge_unmergeable', function() {
- var now = new Date().getTime();
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var histA = new tr.v.Histogram('histogram A',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- histA.addSample(Math.random() * 1e3);
- new tr.v.d.IterationInfo({
- label: 'Value',
- benchmarkStartMs: now,
- storyDisplayName: 'story A'
- }).addToValue(histA);
- values.addHistogram(histA);
-
- var histB = new tr.v.Histogram('histogram B',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createExponential(1e-3, 1e3, 20));
- for (var i = 0; i < 100; ++i)
- histB.addSample(Math.random() * Math.random() * 1e3);
- new tr.v.d.IterationInfo({
- label: 'Value',
- benchmarkStartMs: now,
- storyDisplayName: 'story A'
- }).addToValue(histB);
- values.addHistogram(histB);
-
- var histC = new tr.v.Histogram('histogram C',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- tr.v.HistogramBinBoundaries.createExponential(1e-3, 1e3, 30));
- for (var i = 0; i < 100; ++i)
- histC.addSample(Math.random() * Math.random() * 1e3);
- new tr.v.d.IterationInfo({
- label: 'Value',
- benchmarkStartMs: now,
- storyDisplayName: 'story B'
- }).addToValue(histC);
- values.addHistogram(histC);
-
- table.values = values;
- table.groupingKeys = [tr.v.ValueSet.GROUPINGS.STORY_NAME.key];
- this.addHTMLOutput(table);
-
- var baseTable = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.tagName === 'TR-UI-B-TABLE');
- assert.strictEqual(baseTable.tableRows.length, 2);
- });
-
- test('instantiate_2x2', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
-
- var numeric0a = new tr.v.Histogram('foo',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- numeric0a.addSample(Math.random() * 1e3);
- values.addHistogram(numeric0a);
- new tr.v.d.IterationInfo({
- label: 'iteration A',
- benchmarkStartMs: new Date().getTime(),
- }).addToValue(numeric0a);
-
- var numeric1a = new tr.v.Histogram('bar',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- numeric1a.addSample(Math.random() * 1e3);
- values.addHistogram(numeric1a);
- new tr.v.d.IterationInfo({
- label: 'iteration A',
- benchmarkStartMs: new Date().getTime(),
- }).addToValue(numeric1a);
-
- var numeric0b = new tr.v.Histogram('foo',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- numeric0b.addSample(Math.random() * 1e3);
- values.addHistogram(numeric0b);
- new tr.v.d.IterationInfo({
- label: 'iteration B',
- benchmarkStartMs: new Date().getTime(),
- }).addToValue(numeric0b);
-
- var numeric1b = new tr.v.Histogram('bar',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter, TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i)
- numeric1b.addSample(Math.random() * 1e3);
- values.addHistogram(numeric1b);
- new tr.v.d.IterationInfo({
- label: 'iteration B',
- benchmarkStartMs: new Date().getTime(),
- }).addToValue(numeric1b);
-
- table.values = values;
- this.addHTMLOutput(table);
-
- var baseTable = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.tagName === 'TR-UI-B-TABLE');
-
- assert.lengthOf(baseTable.tableColumns, 3);
- assert.strictEqual('Name', baseTable.tableColumns[0].title);
- assert.strictEqual('iteration A',
- baseTable.tableColumns[1].title);
- assert.strictEqual('iteration B',
- baseTable.tableColumns[2].title);
-
- table.referenceDisplayLabel = 'iteration A';
- baseTable.rebuild();
- assert.strictEqual(1, baseTable.selectedTableColumnIndex);
- assert.strictEqual(table.rows_[0].cells['iteration B'].referenceHistogram,
- table.rows_[0].cells['iteration A'].histogram);
- assert.strictEqual(table.rows_[1].cells['iteration B'].referenceHistogram,
- table.rows_[1].cells['iteration A'].histogram);
-
- table.referenceDisplayLabel = 'iteration B';
- baseTable.rebuild();
- assert.strictEqual(2, baseTable.selectedTableColumnIndex);
- assert.strictEqual(table.rows_[0].cells['iteration A'].referenceHistogram,
- table.rows_[0].cells['iteration B'].histogram);
- assert.strictEqual(table.rows_[1].cells['iteration A'].referenceHistogram,
- table.rows_[1].cells['iteration B'].histogram);
- });
-
- test('instantiation_mergeNumerics', function() {
- var table = document.createElement('tr-v-ui-value-set-table');
- var values = new tr.v.ValueSet();
- // Add 64 Histograms, all named 'foo', with different IterationInfos.
- var benchmarkNames = ['bm A', 'bm B'];
- var storyGroupingKeys0 = ['A', 'B'];
- var storyGroupingKeys1 = ['C', 'D'];
- var storyNames = ['story A', 'story B'];
- var starts = [1439708400000, 1439794800000];
- var labels = ['label A', 'label B'];
-
- for (var benchmarkName of benchmarkNames) {
- for (var storyGroupingKey0 of storyGroupingKeys0) {
- for (var storyGroupingKey1 of storyGroupingKeys1) {
- for (var storyName of storyNames) {
- for (var startMs of starts) {
- for (var storysetCounter = 0; storysetCounter < 2;
- ++storysetCounter) {
- for (var storyCounter = 0; storyCounter < 2; ++storyCounter) {
- for (var label of labels) {
- var numeric = new tr.v.Histogram('foo',
- tr.b.Unit.byName.timeDurationInMs_smallerIsBetter,
- TEST_BOUNDARIES);
- for (var i = 0; i < 100; ++i) {
- numeric.addSample(Math.random() * 1e3, {
- sample_diagnostic: new tr.v.d.Generic(i)});
- }
-
- values.addHistogram(numeric);
-
- new tr.v.d.IterationInfo({
- storyGroupingKeys: {
- storyGroupingKey0: storyGroupingKey0,
- storyGroupingKey1: storyGroupingKey1
- },
- benchmarkName: benchmarkName,
- storyDisplayName: storyName,
- benchmarkStartMs: startMs,
- storysetRepeatCounter: storysetCounter,
- storyRepeatCounter: storyCounter,
- label: label,
- }).addToValue(numeric);
- }
- }
- }
- }
- }
- }
- }
- }
-
- table.values = values;
- table.groupingKeys = [
- tr.v.ValueSet.GROUPINGS.HISTOGRAM_NAME.key,
- tr.v.ValueSet.GROUPINGS.BENCHMARK_NAME.key,
- 'storyGroupingKey_storyGroupingKey0',
- 'storyGroupingKey_storyGroupingKey1',
- tr.v.ValueSet.GROUPINGS.STORY_NAME.key,
- tr.v.ValueSet.GROUPINGS.BENCHMARK_START.key,
- tr.v.ValueSet.GROUPINGS.STORYSET_REPEAT.key,
- tr.v.ValueSet.GROUPINGS.STORY_REPEAT.key,
- ];
- this.addHTMLOutput(table);
- var baseTable = tr.b.findDeepElementMatchingPredicate(
- table, elem => elem.tagName === 'TR-UI-B-TABLE');
-
- assert.lengthOf(baseTable.tableColumns, 3);
- assert.strictEqual('Name', baseTable.tableColumns[0].title);
- assert.strictEqual('label A', baseTable.tableColumns[1].title);
- assert.strictEqual('label B', baseTable.tableColumns[2].title);
-
- assert.lengthOf(baseTable.tableRows, 1);
- assert.strictEqual('foo', baseTable.tableRows[0].name);
- assert.lengthOf(baseTable.tableRows[0].subRows, 2);
-
- // assertions only report their arguments, which is not enough information
- // to diagnose problems with nested structures like tableRows -- the path to
- // the particular row is needed. This code would be a bit simpler if each
- // row were given a named variable, but the path to each subRow would still
- // need to be tracked in order to provide for diagnosing.
- var subRowPath = [];
- var getSubRow = () => getTableRowAtPath(baseTable, subRowPath);
-
- for (var i = 0; i < benchmarkNames.length; ++i) {
- subRowPath.push(i);
- assert.lengthOf(getSubRow().subRows, 2, subRowPath);
- assert.strictEqual(benchmarkNames[i], getSubRow().name, subRowPath);
-
- for (var s = 0; s < storyGroupingKeys0.length; ++s) {
- subRowPath.push(s);
- assert.lengthOf(getSubRow().subRows, 2, subRowPath);
- assert.strictEqual('storyGroupingKey0: ' + storyGroupingKeys0[s],
- getSubRow().name, subRowPath);
-
- for (var t = 0; t < storyGroupingKeys1.length; ++t) {
- subRowPath.push(t);
- assert.lengthOf(getSubRow().subRows, 2, subRowPath);
- assert.strictEqual('storyGroupingKey1: ' + storyGroupingKeys1[t],
- getSubRow().name, subRowPath);
-
- for (var j = 0; j < storyNames.length; ++j) {
- subRowPath.push(j);
- assert.lengthOf(getSubRow().subRows, 2, subRowPath);
- assert.strictEqual(storyNames[j], getSubRow().name, subRowPath);
-
- for (var k = 0; k < starts.length; ++k) {
- subRowPath.push(k);
- assert.lengthOf(getSubRow().subRows, 2, subRowPath);
- assert.strictEqual(tr.b.formatDate(new Date(starts[k])),
- getSubRow().name, subRowPath);
-
- for (var l = 0; l < 2; ++l) {
- subRowPath.push(l);
- assert.lengthOf(getSubRow().subRows, 2, subRowPath);
- assert.strictEqual('storyset repeat ' + l, getSubRow().name,
- subRowPath);
-
- for (var m = 0; m < 2; ++m) {
- subRowPath.push(m);
- assert.lengthOf(getSubRow().subRows, 0, subRowPath);
- assert.strictEqual('story repeat ' + m, getSubRow().name,
- subRowPath);
- subRowPath.pop();
- }
- subRowPath.pop();
- }
- subRowPath.pop();
- }
- subRowPath.pop();
- }
- subRowPath.pop();
- }
- subRowPath.pop();
- }
- subRowPath.pop();
- }
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view.html b/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view.html
deleted file mode 100644
index 95cdbb76c30..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view.html
+++ /dev/null
@@ -1,209 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/ui/base/tab_view.html">
-<link rel="import" href="/tracing/ui/brushing_state_controller.html">
-<link rel="import" href="/tracing/value/ui/value_set_table.html">
-
-<dom-module id="tr-v-ui-value-set-view">
- <template>
- <style>
- :host {
- font-family: sans-serif;
- };
- </style>
-
- <tr-v-ui-value-set-table id="valueSetTable"></tr-v-ui-value-set-table>
- </template>
-</dom-module>
-
-<script>
-'use strict';
-tr.exportTo('tr.v.ui', function() {
- function NullBrushingStateController() {
- this.parentController = undefined;
- }
-
- NullBrushingStateController.prototype = {
- __proto__: tr.c.BrushingStateController.prototype,
-
- dispatchChangeEvent_: function() {
- if (this.parentController)
- this.parentController.dispatchChangeEvent_();
- },
-
- get model() {
- if (!this.parentController)
- return undefined;
- return this.parentController.model;
- },
-
- get trackView() {
- if (!this.parentController)
- return undefined;
- return this.parentController.trackView;
- },
-
- get viewport() {
- if (!this.parentController)
- return undefined;
- return this.parentController.viewport;
- },
-
- get historyEnabled() {
- if (!this.parentController)
- return undefined;
- return this.parentController.historyEnabled;
- },
-
- set historyEnabled(historyEnabled) {
- if (this.parentController)
- this.parentController.historyEnabled = historyEnabled;
- },
-
- modelWillChange: function() {
- if (this.parentController)
- this.parentController.modelWillChange();
- },
-
- modelDidChange: function() {
- if (this.parentController)
- this.parentController.modelDidChange();
- },
-
- onUserInitiatedSelectionChange_: function() {
- if (this.parentController)
- this.parentController.onUserInitiatedSelectionChange_();
- },
-
- onPopState_: function(e) {
- if (this.parentController)
- this.parentController.onPopState_(e);
- },
-
- get selection() {
- if (!this.parentController)
- return undefined;
- return this.parentController.selection;
- },
-
- get findMatches() {
- if (!this.parentController)
- return undefined;
- return this.parentController.findMatches;
- },
-
- get selectionOfInterest() {
- if (!this.parentController)
- return undefined;
- return this.parentController.selectionOfInterest;
- },
-
- get currentBrushingState() {
- if (!this.parentController)
- return undefined;
- return this.parentController.currentBrushingState;
- },
-
- set currentBrushingState(newBrushingState) {
- if (this.parentController)
- this.parentController.currentBrushingState = newBrushingState;
- },
-
- addAllEventsMatchingFilterToSelectionAsTask: function(filter, selection) {
- if (this.parentController) {
- this.parentController.addAllEventsMatchingFilterToSelectionAsTask(
- filter, selection);
- }
- },
-
- findTextChangedTo: function(allPossibleMatches) {
- if (this.parentController)
- this.parentController.findTextChangedTo(allPossibleMatches);
- },
-
- findFocusChangedTo: function(currentFocus) {
- if (this.parentController)
- this.parentController.findFocusChangedTo(currentFocus);
- },
-
- findTextCleared: function() {
- if (this.parentController)
- this.parentController.findTextCleared();
- },
-
- uiStateFromString: function(string) {
- if (this.parentController)
- this.parentController.uiStateFromString(string);
- },
-
- navToPosition: function(uiState, showNavLine) {
- if (this.parentController)
- this.parentController.navToPosition(uiState, showNavLine);
- },
-
- changeSelectionFromTimeline: function(selection) {
- if (this.parentController)
- this.parentController.changeSelectionFromTimeline(selection);
- },
-
- showScriptControlSelection: function(selection) {
- if (this.parentController)
- this.parentController.showScriptControlSelection(selection);
- },
-
- changeSelectionFromRequestSelectionChangeEvent: function(selection) {
- if (this.parentController) {
- this.parentController.changeSelectionFromRequestSelectionChangeEvent(
- selection);
- }
- },
-
- changeAnalysisViewRelatedEvents: function(eventSet) {
- if (this.parentController && (eventSet instanceof tr.model.EventSet))
- this.parentController.changeAnalysisViewRelatedEvents(eventSet);
- },
-
- changeAnalysisLinkHoveredEvents: function(eventSet) {
- if (this.parentController && (eventSet instanceof tr.model.EventSet))
- this.parentController.changeAnalysisLinkHoveredEvents(eventSet);
- },
-
- getViewSpecificBrushingState: function(viewId) {
- if (this.parentController)
- this.parentController.getViewSpecificBrushingState(viewId);
- },
-
- changeViewSpecificBrushingState: function(viewId, newState) {
- if (this.parentController)
- this.parentController.changeViewSpecificBrushingState(viewId, newState);
- }
- };
-
- Polymer({
- is: 'tr-v-ui-value-set-view',
-
- ready: function() {
- this.brushingStateController = new NullBrushingStateController();
- },
-
- attached: function() {
- this.brushingStateController.parentController =
- tr.c.BrushingStateController.getControllerForElement(this.parentNode);
- },
-
- /**
- * @param {!tr.v.ValueSet} values
- */
- set values(values) {
- this.$.valueSetTable.values = values;
- }
- });
-
- return {};
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view_test.html b/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view_test.html
deleted file mode 100644
index a1c0301a018..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/ui/value_set_view_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/ui/value_set_table.html">
-<link rel="import" href="/tracing/value/ui/value_set_view.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('instantiate0', function() {
- var view = document.createElement('tr-v-ui-value-set-view');
- var values = new tr.v.ValueSet();
-
- var hist = new tr.v.Histogram('foo', tr.b.Unit.byName.normalizedPercentage);
- for (var i = 0; i < 1e2; ++i)
- hist.addSample(Math.random());
- values.addHistogram(hist);
-
- this.addHTMLOutput(view);
- view.values = values;
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/value_set.html b/chromium/third_party/catapult/tracing/tracing/value/value_set.html
deleted file mode 100644
index c2874747f19..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/value_set.html
+++ /dev/null
@@ -1,231 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/value/histogram.html">
-
-<script>
-'use strict';
-
-tr.exportTo('tr.v', function() {
- /*
- * See ValueSet.groupHistogramsRecursively() and
- * tr-ui-b-grouping-table-groupby-picker.
- */
- class HistogramGrouping {
- /**
- * @param {string} key
- * @param {!function(!tr.v.Histogram):string} callback
- * @param {string=} opt_label
- */
- constructor(key, callback, opt_label) {
- this.key = key;
- this.callback = callback;
- this.label = opt_label || key;
- }
- }
-
- class ValueSet {
- constructor(opt_values) {
- this.values_ = new Map();
-
- if (opt_values !== undefined)
- for (var value of opt_values)
- this.addHistogram(value);
- }
-
- get valueDicts() {
- return this.map(v => v.asDict());
- }
-
- lookup(guid) {
- return this.values_.get(guid);
- }
-
- get length() {
- return this.values_.size;
- }
-
- toArray() {
- return [...this];
- }
-
- *[Symbol.iterator]() {
- for (var [guid, value] of this.values_)
- yield value;
- }
-
- /**
- * @param {!function(!tr.v.Histogram):*} callback
- * @param {*=} opt_this
- */
- map(callback, opt_this) {
- return this.toArray().map(callback, opt_this || this);
- }
-
- /**
- * Convert Values from dicts and add them.
- * Resolve RelatedValueSet references.
- *
- * @param {Array.<Object>} dicts
- */
- addValuesFromDicts(dicts) {
- for (var dict of dicts)
- this.addHistogram(tr.v.Histogram.fromDict(dict));
-
- // Now resolve the RelatedValueSet references between values.
- // This resolution process must wait until all new values are added in
- // case a value refers to another that comes after it in dicts.
- // Iterate over all values, old and new, in case an old value contained a
- // reference to a new value. Don't worry, resolve() is idempotent.
- // The expected running time is this: for each value (hundreds to
- // thousands?), for each diagnostic that is a RelatedValueSet (0-5?), for
- // each ValueRef (0-10?), do a hash lookup (constant time?).
- for (var value of this) {
- for (var [name, diagnostic] of value.diagnostics) {
- if ((diagnostic instanceof tr.v.d.RelatedValueSet) ||
- (diagnostic instanceof tr.v.d.RelatedValueMap)) {
- diagnostic.resolve(this);
- }
- }
-
- // In addition to Values, we must also look inside of Histogram samples.
- for (var bin of value.allBins) {
- for (var dm of bin.diagnosticMaps) {
- for (var [name, diagnostic] of dm) {
- if ((diagnostic instanceof tr.v.d.RelatedValueSet) ||
- (diagnostic instanceof tr.v.d.RelatedValueMap)) {
- diagnostic.resolve(this);
- }
- }
- }
- }
- }
- }
-
- /**
- * Find the Values that are not contained in any other Values'
- * RelatedValueSet or RelatedValueMap diagnostics.
- *
- * @return {!Array.<!tr.v.Histogram>}
- */
- get sourceValues() {
- var sourceValues = new Map(this.values_);
- // If a Histogram is in a RelatedValueSet or RelatedValueMap, which can be
- // owned either by Values or by numeric samples, then it is not a
- // source Histogram.
- function deleteSourceValues(diagnosticMap) {
- for (var [name, diagnostic] of diagnosticMap) {
- if (diagnostic instanceof tr.v.d.RelatedValueSet)
- for (var relatedValue of diagnostic)
- sourceValues.delete(relatedValue.guid);
- else if (diagnostic instanceof tr.v.d.RelatedValueMap)
- for (var [name, relatedValue] of diagnostic)
- sourceValues.delete(relatedValue.guid);
- }
- }
-
- for (var hist of this) {
- deleteSourceValues(hist.diagnostics);
- for (var b of hist.allBins) {
- for (var dm of b.diagnosticMaps) {
- deleteSourceValues(dm);
- }
- }
- }
- return new ValueSet([...sourceValues.values()]);
- }
-
- getValuesNamed(name) {
- return this.toArray().filter(h => h.name === name);
- }
-
- /**
- * @param {!tr.v.Histogram} h
- */
- addHistogram(h) {
- if (this.values_.get(h.guid))
- throw new Error('Cannot add same Histogram twice');
-
- this.values_.set(h.guid, h);
- }
-
- /**
- * Return a nested Map, whose keys are strings and leaf values are Arrays of
- * Histograms.
- * See GROUPINGS for example |groupings|.
- * Groupings are skipped when |opt_skipGroupingCallback| is specified and
- * returns true.
- *
- * @typedef {!Array.<tr.v.Histogram>} HistogramArray
- * @typedef {!Map.<string,!(HistogramArray|HistogramArrayMap)>}
- * HistogramArrayMap
- * @typedef {!Map.<string,!HistogramArray>} LeafHistogramArrayMap
- *
- * @param {!Array.<!tr.v.HistogramGrouping>} groupings
- * @param {!function(!Grouping, !LeafHistogramArrayMap):boolean=}
- * opt_skipGroupingCallback
- *
- * @return {!(HistogramArray|HistogramArrayMap)}
- */
- groupHistogramsRecursively(groupings, opt_skipGroupingCallback) {
- function recurse(histograms, level) {
- if (level === groupings.length) {
- return histograms; // recursion base case
- }
-
- var grouping = groupings[level]
- var groupedHistograms = tr.b.groupIntoMap(
- histograms, grouping.callback);
-
- if (opt_skipGroupingCallback && opt_skipGroupingCallback(
- grouping, groupedHistograms)) {
- return recurse(histograms, level + 1);
- }
-
- for (var [key, group] of groupedHistograms) {
- groupedHistograms.set(key, recurse(group, level + 1));
- }
-
- return groupedHistograms;
- }
-
- return recurse(this.toArray(), 0);
- }
- }
-
- // This does not contain storyGroupingKeys!
- ValueSet.GROUPINGS = {
- HISTOGRAM_NAME: new HistogramGrouping('name', h => h.name),
-
- BENCHMARK_NAME: new HistogramGrouping('benchmark',
- h => tr.v.d.IterationInfo.getField(h, 'benchmarkName', '')),
-
- BENCHMARK_START: new HistogramGrouping('time',
- h => tr.v.d.IterationInfo.getField(h, 'benchmarkStartString', '')),
-
- STORYSET_REPEAT: new HistogramGrouping('storyset repeat',
- h => tr.v.d.IterationInfo.getField(
- h, 'storysetRepeatCounterLabel', 0)),
-
- STORY_REPEAT: new HistogramGrouping('story repeat',
- h => tr.v.d.IterationInfo.getField(
- h, 'storyRepeatCounterLabel', 0)),
-
- STORY_NAME: new HistogramGrouping('story',
- h => tr.v.d.IterationInfo.getField(h, 'storyDisplayName', '')),
-
- DISPLAY_LABEL: new HistogramGrouping('label',
- h => tr.v.d.IterationInfo.getField(h, 'displayLabel', 'Value'))
- };
-
- return {
- HistogramGrouping: HistogramGrouping,
- ValueSet: ValueSet
- };
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing/value/value_set_test.html b/chromium/third_party/catapult/tracing/tracing/value/value_set_test.html
deleted file mode 100644
index d958c77063d..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/value/value_set_test.html
+++ /dev/null
@@ -1,182 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright 2016 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/base/unit.html">
-<link rel="import" href="/tracing/value/diagnostics/diagnostic_map.html">
-<link rel="import" href="/tracing/value/diagnostics/generic.html">
-<link rel="import" href="/tracing/value/histogram.html">
-<link rel="import" href="/tracing/value/value_set.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- // TODO(benjhayden): Test groupHistogramsRecursively.
-
- test('addValuesFromDicts', function() {
- var n = new tr.v.Histogram('foo', tr.b.Unit.byName.unitlessNumber);
- var values = new tr.v.ValueSet([n]);
- var values2 = new tr.v.ValueSet();
- values2.addValuesFromDicts(values.valueDicts);
- assert.lengthOf(values2.getValuesNamed('foo'), 1);
- });
-
- test('addValueFromDictsWithSampleDiagnostic', function() {
- var n = new tr.v.Histogram('foo', tr.b.Unit.byName.count);
- n.addSample(10, {bar: new tr.v.d.Generic('baz')});
-
- var values = new tr.v.ValueSet([n]);
- var values2 = new tr.v.ValueSet();
- values2.addValuesFromDicts(values.valueDicts);
- assert.lengthOf(values2.getValuesNamed('foo'), 1);
- var v = values2.getValuesNamed('foo')[0];
- assert.lengthOf(v.getBinForValue(10).diagnosticMaps, 1);
- var dm = v.getBinForValue(10).diagnosticMaps[0];
- assert.strictEqual(dm.size, 1);
- assert.instanceOf(dm.get('bar'), tr.v.d.Generic);
- assert.strictEqual(dm.get('bar').value, 'baz');
- });
-
- test('relatedValueSetDiagnostic', function() {
- var unit = tr.b.Unit.byName.unitlessNumber;
- var a = new tr.v.Histogram('a', unit);
- var b = new tr.v.Histogram('b', unit);
- var c = new tr.v.Histogram('c', unit);
- a.diagnostics.set('rvs', new tr.v.d.RelatedValueSet([b, c]));
-
- // Don't serialize c just yet.
- var values = new tr.v.ValueSet([a, b]);
-
- var sourceValues = values.sourceValues;
- assert.strictEqual(tr.b.getOnlyElement(sourceValues), a);
-
- var values2 = new tr.v.ValueSet();
- values2.addValuesFromDicts(values.valueDicts);
-
- var a2 = values2.getValuesNamed('a');
- assert.lengthOf(a2, 1);
- a2 = a2[0];
- assert.strictEqual(a2.guid, a.guid);
- assert.instanceOf(a2, tr.v.Histogram);
- assert.notStrictEqual(a2, a);
-
- var b2 = values2.getValuesNamed('b');
- assert.lengthOf(b2, 1);
- b2 = b2[0];
- assert.strictEqual(b2.guid, b.guid);
- assert.instanceOf(b2, tr.v.Histogram);
- assert.notStrictEqual(b2, b);
-
- var rvs2 = a2.diagnostics.get('rvs');
- assert.instanceOf(rvs2, tr.v.d.RelatedValueSet);
- assert.lengthOf(rvs2, 2);
-
- // Assert that b and c are in a2's RelatedValueSet.
- var rvs2vs = [...rvs2];
- var rvs2guids = rvs2vs.map(v => v.guid);
- var b2i = rvs2guids.indexOf(b.guid);
- assert.strictEqual(rvs2vs[b2i], b2);
-
- var c2i = rvs2guids.indexOf(c.guid);
- assert.strictEqual(rvs2vs[c2i].guid, c.guid);
- assert.instanceOf(rvs2vs[c2i], tr.v.d.ValueRef);
-
- // Now serialize c and add it to values2.
- // Related value resolution is idempotent.
- // Old values can refer to new values.
- values2.addValuesFromDicts([c.asDict()]);
-
- var c2 = values2.getValuesNamed('c');
- assert.lengthOf(c2, 1);
- c2 = c2[0];
- assert.strictEqual(c2.guid, c.guid);
- assert.notStrictEqual(c2, c);
-
- // Now a real c2 Value should be in a2's RelatedValueSet.
- rvs2vs = [...rvs2];
- rvs2guids = rvs2vs.map(v => v.guid);
- b2i = rvs2guids.indexOf(b.guid);
- c2i = rvs2guids.indexOf(c.guid);
- assert.strictEqual(b2, rvs2vs[b2i]);
- assert.strictEqual(c2, rvs2vs[c2i]);
- });
-
- test('relatedValueMapDiagnostic', function() {
- var unit = tr.b.Unit.byName.unitlessNumber;
- var a = new tr.v.Histogram('a', unit);
- var b = new tr.v.Histogram('b', unit);
- var c = new tr.v.Histogram('c', unit);
- var rvm = new tr.v.d.RelatedValueMap();
- rvm.set('y', b);
- rvm.set('z', c);
- a.diagnostics.set('rvm', rvm);
-
- // Don't serialize c just yet.
- var values = new tr.v.ValueSet([a, b]);
-
- var sourceValues = values.sourceValues;
- assert.strictEqual(tr.b.getOnlyElement(sourceValues), a);
-
- var values2 = new tr.v.ValueSet();
- values2.addValuesFromDicts(values.valueDicts);
-
- var a2 = values2.getValuesNamed('a');
- assert.lengthOf(a2, 1);
- a2 = a2[0];
- assert.strictEqual(a2.guid, a.guid);
- assert.instanceOf(a2, tr.v.Histogram);
- assert.notStrictEqual(a2, a);
-
- var b2 = values2.getValuesNamed('b');
- assert.lengthOf(b2, 1);
- b2 = b2[0];
- assert.strictEqual(b2.guid, b.guid);
- assert.instanceOf(b2, tr.v.Histogram);
- assert.notStrictEqual(b2, b);
-
- var rvm2 = a2.diagnostics.get('rvm');
- assert.instanceOf(rvm2, tr.v.d.RelatedValueMap);
- assert.lengthOf(rvm2, 2);
-
- // Assert that b and c are in a2's RelatedValueMap.
- // |c| should still be a ValueRef since it wasn't in values2.
- assert.strictEqual(rvm2.get('y'), b2);
- assert.instanceOf(rvm2.get('z'), tr.v.d.ValueRef);
-
- // Now serialize c and add it to values2.
- // Related value resolution is idempotent.
- // Old values can refer to new values.
- values2.addValuesFromDicts([c.asDict()]);
-
- var c2 = values2.getValuesNamed('c');
- assert.lengthOf(c2, 1);
- c2 = c2[0];
- assert.strictEqual(c2.guid, c.guid);
- assert.instanceOf(c2, tr.v.Histogram);
- assert.notStrictEqual(c2, c);
-
- // b2 should still be in a2's RelatedValueMap.
- assert.strictEqual(rvm2.get('y'), b2);
-
- // Now a real c2 Value should be in a2's RelatedValueMap.
- assert.strictEqual(rvm2.get('z'), c2);
- });
-
- test('sourceValuesWithSampleDiagnostic', function() {
- var unit = tr.b.Unit.byName.unitlessNumber;
- var aHist = new tr.v.Histogram('a', unit);
- aHist.addSample(1);
-
- var numeric = new tr.v.Histogram('b', tr.b.Unit.byName.unitlessNumber);
- numeric.addSample(1, {rvs: new tr.v.d.RelatedValueSet([aHist])});
-
- var values = new tr.v.ValueSet([aHist, numeric]);
- assert.strictEqual(tr.b.getOnlyElement(values.sourceValues), numeric);
- });
-});
-</script>
diff --git a/chromium/third_party/catapult/tracing/tracing_build/__init__.py b/chromium/third_party/catapult/tracing/tracing_build/__init__.py
deleted file mode 100644
index 22060c5dca2..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-
-import tracing_project
-tracing_project.UpdateSysPathIfNeeded()
diff --git a/chromium/third_party/catapult/tracing/tracing_build/check_common.py b/chromium/third_party/catapult/tracing/tracing_build/check_common.py
deleted file mode 100644
index 41fd301f4a3..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/check_common.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-
-import tracing_project
-
-
-FILE_GROUPS = ["tracing_css_files",
- "tracing_js_html_files",
- "tracing_img_files"]
-
-
-def GetFileGroupFromFileName(filename):
- extension = os.path.splitext(filename)[1]
- return {
- '.css': 'tracing_css_files',
- '.html': 'tracing_js_html_files',
- '.js': 'tracing_js_html_files',
- '.png': 'tracing_img_files'
- }[extension]
-
-
-def CheckListedFilesSorted(src_file, group_name, listed_files):
- sorted_files = sorted(listed_files)
- if sorted_files != listed_files:
- mismatch = ''
- for i in range(len(listed_files)):
- if listed_files[i] != sorted_files[i]:
- mismatch = listed_files[i]
- break
- what_is = ' ' + '\n '.join(listed_files)
- what_should_be = ' ' + '\n '.join(sorted_files)
- return '''In group {0} from file {1}, filenames aren't sorted.
-
-First mismatch:
- {2}
-
-Current listing:
-{3}
-
-Correct listing:
-{4}\n\n'''.format(group_name, src_file, mismatch, what_is, what_should_be)
- else:
- return ''
-
-
-def GetKnownFiles():
- project = tracing_project.TracingProject()
-
- vulcanizer = project.CreateVulcanizer()
- m = vulcanizer.loader.LoadModule(
- module_name='tracing.ui.extras.about_tracing.about_tracing')
- absolute_filenames = m.GetAllDependentFilenamesRecursive(
- include_raw_scripts=False)
-
- return list(set([os.path.relpath(f, project.tracing_root_path)
- for f in absolute_filenames]))
-
-
-def CheckCommon(file_name, listed_files):
- known_files = GetKnownFiles()
- u = set(listed_files).union(set(known_files))
- i = set(listed_files).intersection(set(known_files))
- diff = list(u - i)
-
- if len(diff) == 0:
- return ''
-
- error = 'Entries in ' + file_name + ' do not match files on disk:\n'
- in_file_only = list(set(listed_files) - set(known_files))
- in_known_only = list(set(known_files) - set(listed_files))
-
- if len(in_file_only) > 0:
- error += ' In file only:\n ' + '\n '.join(sorted(in_file_only))
- if len(in_known_only) > 0:
- if len(in_file_only) > 0:
- error += '\n\n'
- error += ' On disk only:\n ' + '\n '.join(sorted(in_known_only))
-
- if in_file_only:
- error += (
- '\n\n'
- ' Note: only files actually used in about:tracing should\n'
- ' be listed in the build files. Try running \n'
- ' tracing/bin/update_gypi\n'
- ' to update the files automatically.')
-
- return error
diff --git a/chromium/third_party/catapult/tracing/tracing_build/check_common_unittest.py b/chromium/third_party/catapult/tracing/tracing_build/check_common_unittest.py
deleted file mode 100644
index b3af7b6fb68..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/check_common_unittest.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from tracing_build import check_common
-
-
-class CheckCommonUnitTest(unittest.TestCase):
-
- def testFilesSorted(self):
- error = check_common.CheckListedFilesSorted('foo.gyp', 'tracing_pdf_files',
- ['/dir/file.pdf',
- '/dir/another_file.pdf'])
- expected_error = '''In group tracing_pdf_files from file foo.gyp,\
- filenames aren't sorted.
-
-First mismatch:
- /dir/file.pdf
-
-Current listing:
- /dir/file.pdf
- /dir/another_file.pdf
-
-Correct listing:
- /dir/another_file.pdf
- /dir/file.pdf\n\n'''
- assert error == expected_error
diff --git a/chromium/third_party/catapult/tracing/tracing_build/check_gypi.py b/chromium/third_party/catapult/tracing/tracing_build/check_gypi.py
deleted file mode 100644
index fb59626816b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/check_gypi.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-
-from tracing_build import check_common
-
-GYPI_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__),
- '..', 'trace_viewer.gypi'))
-
-
-def GypiCheck():
- f = open(GYPI_FILE, 'r')
- gyp = f.read()
- f.close()
-
- data = eval(gyp) # pylint: disable=eval-used
- listed_files = []
- error = ''
- for group in check_common.FILE_GROUPS:
- filenames = map(os.path.normpath, data['variables'][group])
- error += check_common.CheckListedFilesSorted(GYPI_FILE, group, filenames)
- listed_files.extend(filenames)
-
- return error + check_common.CheckCommon(GYPI_FILE, listed_files)
-
-
-if __name__ == '__main__':
- print GypiCheck()
diff --git a/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py b/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py
deleted file mode 100644
index 333fca19021..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import codecs
-import argparse
-import os
-import sys
-
-import py_vulcanize
-
-import tracing_project
-
-
-def Main(args):
- parser = argparse.ArgumentParser(usage='%(prog)s --outdir=<directory>')
- parser.add_argument('--outdir', dest='out_dir',
- help='Where to place generated content')
- parser.add_argument('--no-min', default=False, action='store_true',
- help='Skip minification')
- args = parser.parse_args(args)
-
- if not args.out_dir:
- sys.stderr.write('ERROR: Must specify --outdir=<directory>')
- parser.print_help()
- return 1
-
- names = ['tracing.ui.extras.about_tracing.about_tracing']
- project = tracing_project.TracingProject()
-
- vulcanizer = project.CreateVulcanizer()
- load_sequence = vulcanizer.CalcLoadSequenceForModuleNames(names)
-
- olddir = os.getcwd()
- try:
- if not os.path.exists(args.out_dir):
- os.makedirs(args.out_dir)
- o = codecs.open(os.path.join(args.out_dir, 'about_tracing.html'), 'w',
- encoding='utf-8')
- try:
- py_vulcanize.GenerateStandaloneHTMLToFile(
- o,
- load_sequence,
- title='chrome://tracing',
- flattened_js_url='tracing.js',
- minify=not args.no_min)
- except py_vulcanize.module.DepsException, ex:
- sys.stderr.write('Error: %s\n\n' % str(ex))
- return 255
- o.close()
-
- o = codecs.open(os.path.join(args.out_dir, 'about_tracing.js'), 'w',
- encoding='utf-8')
- assert o.encoding == 'utf-8'
- py_vulcanize.GenerateJSToFile(
- o,
- load_sequence,
- use_include_tags_for_scripts=False,
- dir_for_include_tag_root=args.out_dir,
- minify=not args.no_min)
- o.close()
-
- finally:
- os.chdir(olddir)
-
- return 0
diff --git a/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents_unittest.py b/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents_unittest.py
deleted file mode 100644
index dd31b7ec344..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents_unittest.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-import tempfile
-import shutil
-
-from tracing_build import generate_about_tracing_contents
-
-
-class GenerateAboutTracingContentsUnittTest(unittest.TestCase):
-
- def testSmoke(self):
- try:
- tmpdir = tempfile.mkdtemp()
- res = generate_about_tracing_contents.Main(['--outdir', tmpdir])
- assert res == 0
- finally:
- shutil.rmtree(tmpdir)
diff --git a/chromium/third_party/catapult/tracing/tracing_build/html2trace.py b/chromium/third_party/catapult/tracing/tracing_build/html2trace.py
deleted file mode 100644
index 85a451888af..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/html2trace.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import base64
-import gzip
-import json
-import re
-import StringIO
-
-
-GZIP_HEADER_BYTES = b'\x1f\x8b'
-
-
-# Regular expressions for matching the beginning and end of trace data in HTML
-# traces. See tracing/extras/importer/trace2html_importer.html.
-TRACE_DATA_START_LINE_RE = re.compile(
- r'^<\s*script id="viewer-data" type="(application\/json|text\/plain)">$')
-TRACE_DATA_END_LINE_RE = re.compile(r'^<\/\s*script>$')
-
-
-def IsHTMLTrace(trace_file_handle):
- trace_file_handle.seek(0)
- for line in trace_file_handle:
- line = line.strip()
- if not line:
- continue
- return line == '<!DOCTYPE html>'
-
-
-def CopyTraceDataFromHTMLFilePath(html_file_handle, trace_path,
- gzipped_output=False):
- """Copies trace data from an existing HTML file into new trace file(s).
-
- If |html_file_handle| doesn't contain any trace data blocks, this function
- throws an exception. If |html_file_handle| contains more than one trace data
- block, the first block will be extracted into |trace_path| and the rest will
- be extracted into separate files |trace_path|.1, |trace_path|.2, etc.
-
- The contents of each trace data block is decoded and, if |gzipped_output| is
- false, inflated before it's stored in a trace file.
-
- This function returns a list of paths of the saved trace files ([|trace_path|,
- |trace_path|.1, |trace_path|.2, ...]).
- """
- trace_data_list = _ExtractTraceDataFromHTMLFile(html_file_handle,
- unzip_data=not gzipped_output)
- saved_paths = []
- for i, trace_data in enumerate(trace_data_list):
- saved_path = trace_path if i == 0 else '%s.%d' % (trace_path, i)
- saved_paths.append(saved_path)
- with open(saved_path, 'wb' if gzipped_output else 'w') as trace_file:
- trace_file.write(trace_data.read())
- return saved_paths
-
-
-def ReadTracesFromHTMLFilePath(html_file_handle):
- """Returns a list of inflated JSON traces extracted from an HTML file."""
- return map(json.load, _ExtractTraceDataFromHTMLFile(html_file_handle))
-
-
-def _ExtractTraceDataFromHTMLFile(html_file_handle, unzip_data=True):
- assert IsHTMLTrace(html_file_handle)
- html_file_handle.seek(0)
- lines = html_file_handle.readlines()
-
- start_indices = [i for i in xrange(len(lines))
- if TRACE_DATA_START_LINE_RE.match(lines[i])]
- if not start_indices:
- raise Exception('File %r does not contain trace data')
-
- decoded_data_list = []
- for start_index in start_indices:
- end_index = next(i for i in xrange(start_index + 1, len(lines))
- if TRACE_DATA_END_LINE_RE.match(lines[i]))
- encoded_data = '\n'.join(lines[start_index + 1:end_index]).strip()
- decoded_data_list.append(StringIO.StringIO(base64.b64decode(encoded_data)))
-
- if unzip_data:
- return map(_UnzipFileIfNecessary, decoded_data_list)
- else:
- return map(_ZipFileIfNecessary, decoded_data_list)
-
-
-def _UnzipFileIfNecessary(original_file):
- if _IsFileZipped(original_file):
- return gzip.GzipFile(fileobj=original_file)
- else:
- return original_file
-
-
-def _ZipFileIfNecessary(original_file):
- if _IsFileZipped(original_file):
- return original_file
- else:
- zipped_file = StringIO.StringIO()
- with gzip.GzipFile(fileobj=zipped_file, mode='wb') as gzip_wrapper:
- gzip_wrapper.write(original_file.read())
- zipped_file.seek(0)
- return zipped_file
-
-
-def _IsFileZipped(f):
- is_gzipped = f.read(len(GZIP_HEADER_BYTES)) == GZIP_HEADER_BYTES
- f.seek(0)
- return is_gzipped
diff --git a/chromium/third_party/catapult/tracing/tracing_build/merge_traces.py b/chromium/third_party/catapult/tracing/tracing_build/merge_traces.py
deleted file mode 100644
index 5280f620b1c..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/merge_traces.py
+++ /dev/null
@@ -1,676 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import codecs
-import collections
-import gzip
-import itertools
-import json
-import logging
-import os
-import sys
-
-# Add tracing/ to the path.
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-from tracing_build import html2trace, trace2html
-
-
-GZIP_FILENAME_SUFFIX = '.gz'
-HTML_FILENAME_SUFFIX = '.html'
-
-
-# Relevant trace event phases. See
-# https://code.google.com/p/chromium/codesearch#chromium/src/base/trace_event/common/trace_event_common.h.
-METADATA_PHASE = 'M'
-MEMORY_DUMP_PHASE = 'v'
-BEGIN_PHASE = 'B'
-END_PHASE = 'E'
-CLOCK_SYNC_EVENT_PHASE = 'c'
-
-
-# Minimum gap between two consecutive merged traces in microseconds.
-MIN_TRACE_GAP_IN_US = 1000000
-
-
-# Rule for matching IDs in an IdMap. For a given level, |match| should be a
-# named tuple class where its fields determine the importance of |entry._items|
-# for the purposes of matching pairs of IdMap entries.
-IdMapLevel = collections.namedtuple('IdMapLevel', ['name', 'match'])
-
-
-class IdMap(object):
- """Abstract class for merging and mapping IDs from multiple sources."""
-
- # Sub-classes must provide a tuple of |IdMapLevel| objects.
- LEVELS = NotImplemented
-
- def __init__(self, depth=0):
- assert 0 <= depth <= len(self.LEVELS)
- self._depth = depth
-
- if depth > 0:
- # Non-root node.
- self._canonical_id = None
- self._items = collections.defaultdict(set)
- self._sources = set()
-
- if depth < len(self.LEVELS):
- # Non-leaf node.
- self._entry_map = {} # (Source, Entry ID) -> Entry.
-
- @property
- def max_mapped_id(self):
- """The maximum mapped ID of this map's entries."""
- if not self._entry_map:
- return 0
- return max(e._canonical_id for e in self._entry_map.itervalues())
-
- def AddEntry(self, source, path, **items):
- """Add a source-specific entry path to the map.
-
- Args:
- source: The source of the entry (e.g. trace filename).
- path: A path of source-specific entry IDs in the map (e.g. [PID, TID]).
- **items: Dictionary of items (or sets of items) to be appended to the
- target entry's |_items|.
- """
- if path:
- return self._GetSubMapEntry(source, path[0]).AddEntry(source, path[1:],
- **items)
- assert 'id' not in items # ID is set according to the path.
- for key, value in items.iteritems():
- value_set = self._items[key]
- if (isinstance(value, collections.Iterable) and
- not isinstance(value, basestring)):
- value_set.update(value)
- else:
- value_set.add(value)
-
- def MapEntry(self, source, path):
- """Map an source-specific entry ID path to a canonical entry ID path.
-
- Args:
- source: The source of the entry (e.g. trace filename).
- path: A path of source-specific entry IDs in the map (e.g. [PID, TID]).
-
- Returns:
- A path of canonical entry IDs in the map to which the provided path of
- source-specific entry IDs is mapped.
- """
- if not path:
- return ()
- entry = self._entry_map[(source, path[0])]
- return (entry._canonical_id,) + entry.MapEntry(source, path[1:])
-
- def MergeEntries(self):
- """Recursively merge the entries in this map.
-
- Example: Suppose that the following entries were added to the map:
-
- map.AddEntry(source='trace_A.json', path=[10], name='Browser')
- map.AddEntry(source='trace_A.json', path=[20], name='Renderer')
- map.AddEntry(source='trace_B.json', path=[30], name='Browser')
-
- Before merging, |map._entry_map| will contain three separate items:
-
- ('trace_A.json', 10) -> IdMap(_items={id: {10}, name: {'Browser'}},
- _sources={'trace_A.json'})
- ('trace_A.json', 20) -> IdMap(_items={id: {20}, name: {'Renderer'}},
- _sources={'trace_A.json'})
- ('trace_B.json', 30) -> IdMap(_items={id: {30}, name: {'Browser'}},
- _sources={'trace_B.json'})
-
- Since the first two entries come from the same source, they cannot be
- merged. On the other hand, the third entry could be merged with either of
- the first two. Since it has a common name with the first entry, it will be
- merged with it in this method:
-
- ('trace_A.json', 10) -> IdMap(_items={id: {10, 30}, name: {'Browser'}},
- _sources={'trace_A.json', 'trace_B.json'})
- ('trace_A.json', 20) -> IdMap(_items={id: {20}, name: {Renderer}},
- _sources={'trace_A.json'})
- ('trace_B.json', 30) -> <same IdMap as ('trace_A.json', 10)>
-
- Pairs of entries will be merged in a descending order of sizes of
- pair-wise intersections of |entry._items| until there are no two entries
- such that (1) they have at least one value in |entry._items| in common and
- (2) they are mergeable (i.e. have no common source). Afterwards, unique IDs
- are assigned to the resulting "canonical" entries and their sub-entries are
- merged recursively.
- """
- if self._depth == len(self.LEVELS):
- return
-
- logging.debug('Merging %r entries in %s...', self.LEVELS[self._depth].name,
- self)
-
- canonical_entries = self._CanonicalizeEntries()
- self._AssignIdsToCanonicalEntries(canonical_entries)
-
- for entry in canonical_entries:
- entry.MergeEntries()
-
- def _GetSubMapEntry(self, source, entry_id):
- full_id = (source, entry_id)
- entry = self._entry_map.get(full_id)
- if entry is None:
- entry = type(self)(self._depth + 1)
- entry._sources.add(source)
- entry._items['id'].add(entry_id)
- self._entry_map[full_id] = entry
- return entry
-
- def _CalculateUnmergeableMapFromEntrySources(self):
- entry_ids_by_source = collections.defaultdict(set)
- for entry_id, entry in self._entry_map.iteritems():
- for source in entry._sources:
- entry_ids_by_source[source].add(entry_id)
-
- unmergeable_map = collections.defaultdict(set)
- for unmergeable_set in entry_ids_by_source.itervalues():
- for entry_id in unmergeable_set:
- unmergeable_map[entry_id].update(unmergeable_set - {entry_id})
-
- return unmergeable_map
-
- def _IsMergeableWith(self, other):
- return self._sources.isdisjoint(other._sources)
-
- def _GetMatch(self, other):
- match_cls = self.LEVELS[self._depth - 1].match
- return match_cls(*(self._items[f] & other._items[f]
- for f in match_cls._fields))
-
- def _MergeFrom(self, source):
- if self._depth > 0:
- # This is NOT a ROOT node, so we need to merge fields and sources from
- # the source node.
- for key, values in source._items.iteritems():
- self._items[key].update(values)
- self._sources.update(source._sources)
-
- if self._depth < len(self.LEVELS):
- # This is NOT a LEAF node, so we need to copy over entries from the
- # source node's entry map.
- assert not (set(self._entry_map.iterkeys()) &
- set(source._entry_map.iterkeys()))
- self._entry_map.update(source._entry_map)
-
- def _CanonicalizeEntries(self):
- canonical_entries = self._entry_map.copy()
-
- # {ID1, ID2} -> Match between the two entries.
- matches = {frozenset([full_id1, full_id2]): entry1._GetMatch(entry2)
- for full_id1, entry1 in canonical_entries.iteritems()
- for full_id2, entry2 in canonical_entries.iteritems()
- if entry1._IsMergeableWith(entry2)}
-
- while matches:
- # Pop the maximum match from the dictionary.
- max_match_set, max_match = max(matches.iteritems(),
- key=lambda (_, v): map(len, v))
- del matches[max_match_set]
- canonical_full_id, merged_full_id = max_match_set
-
- # Skip pairs of entries that have nothing in common.
- if not any(max_match):
- continue
-
- # Merge the entries and update the map to reflect this.
- canonical_entry = canonical_entries[canonical_full_id]
- merged_entry = canonical_entries.pop(merged_full_id)
- logging.debug('Merging %s into %s [match=%s]...', merged_entry,
- canonical_entry, max_match)
- canonical_entry._MergeFrom(merged_entry)
- del merged_entry
- self._entry_map[merged_full_id] = canonical_entry
-
- for match_set in matches.keys():
- if merged_full_id in match_set:
- # Remove other matches with the merged entry.
- del matches[match_set]
- elif canonical_full_id in match_set:
- [other_full_id] = match_set - {canonical_full_id}
- other_entry = canonical_entries[other_full_id]
- if canonical_entry._IsMergeableWith(other_entry):
- # Update other matches with the canonical entry which are still
- # mergeable.
- matches[match_set] = canonical_entry._GetMatch(other_entry)
- else:
- # Remove other matches with the canonical entry which have become
- # unmergeable.
- del matches[match_set]
-
- return canonical_entries.values()
-
- def _AssignIdsToCanonicalEntries(self, canonical_entries):
- assigned_ids = set()
- canonical_entries_without_assigned_ids = set()
-
- # Try to assign each canonical entry to one of the IDs from which it was
- # merged.
- for canonical_entry in canonical_entries:
- candidate_ids = canonical_entry._items['id']
- try:
- assigned_id = next(candidate_id for candidate_id in candidate_ids
- if candidate_id not in assigned_ids)
- except StopIteration:
- canonical_entries_without_assigned_ids.add(canonical_entry)
- continue
- assigned_ids.add(assigned_id)
- canonical_entry._canonical_id = assigned_id
-
- # For canonical entries where this cannot be done (highly unlikely), scan
- # from the minimal merged ID upwards for the first unassigned ID.
- for canonical_entry in canonical_entries_without_assigned_ids:
- assigned_id = next(candidate_id for candidate_id in
- itertools.count(min(canonical_entry._items['id']))
- if candidate_id not in assigned_ids)
- assigned_ids.add(assigned_id)
- canonical_entry._canonical_id = assigned_id
-
- def __repr__(self):
- cls_name = type(self).__name__
- if self._depth == 0:
- return '%s root' % cls_name
- else:
- return '%s %s entry(%s)' % (cls_name, self.LEVELS[self._depth - 1].name,
- self._items)
-
-
-class ProcessIdMap(IdMap):
- """Class for merging and mapping PIDs and TIDs from multiple sources."""
-
- LEVELS = (
- IdMapLevel(name='process',
- match=collections.namedtuple('ProcessMatch',
- ['name', 'id', 'label'])),
- IdMapLevel(name='thread',
- match=collections.namedtuple('ThreadMatch', ['name', 'id']))
- )
-
-
-def LoadTrace(filename):
- """Load a trace from a (possibly gzipped) file and return its parsed JSON."""
- logging.info('Loading trace %r...', filename)
- if filename.endswith(HTML_FILENAME_SUFFIX):
- return LoadHTMLTrace(filename)
- elif filename.endswith(GZIP_FILENAME_SUFFIX):
- with gzip.open(filename, 'rb') as f:
- return json.load(f)
- else:
- with open(filename, 'r') as f:
- return json.load(f)
-
-
-def LoadHTMLTrace(filename):
- """Load a trace from a vulcanized HTML trace file."""
- trace_components = collections.defaultdict(list)
-
- for sub_trace in html2trace.ReadTracesFromHTMLFilePath(filename):
- for name, component in TraceAsDict(sub_trace).iteritems():
- trace_components[name].append(component)
-
- trace = {}
- for name, components in trace_components.iteritems():
- if len(components) == 1:
- trace[name] = components[0]
- elif all(isinstance(component, list) for component in components):
- trace[name] = [e for component in components for e in component]
- else:
- trace[name] = components[0]
- logging.warning(
- 'Values of repeated trace component %r in HTML trace %r are not '
- 'lists. The first defined value of the component will be used.',
- filename, name)
-
- return trace
-
-
-def SaveTrace(trace, filename):
- """Save a JSON trace to a (possibly gzipped) file."""
- if filename is None:
- logging.info('Dumping trace to standard output...')
- print json.dumps(trace)
- else:
- logging.info('Saving trace %r...', filename)
- if filename.endswith(HTML_FILENAME_SUFFIX):
- with codecs.open(filename, mode='w', encoding='utf-8') as f:
- trace2html.WriteHTMLForTraceDataToFile([trace], 'Merged trace', f)
- elif filename.endswith(GZIP_FILENAME_SUFFIX):
- with gzip.open(filename, 'wb') as f:
- json.dump(trace, f)
- else:
- with open(filename, 'w') as f:
- json.dump(trace, f)
-
-
-def TraceAsDict(trace):
- """Ensure that a trace is a dictionary."""
- if isinstance(trace, list):
- return {'traceEvents': trace}
- return trace
-
-
-def MergeTraceFiles(input_trace_filenames, output_trace_filename):
- """Merge a collection of input trace files into an output trace file."""
- logging.info('Loading %d input traces...', len(input_trace_filenames))
- input_traces = collections.OrderedDict()
- for input_trace_filename in input_trace_filenames:
- input_traces[input_trace_filename] = LoadTrace(input_trace_filename)
-
- logging.info('Merging traces...')
- output_trace = MergeTraces(input_traces)
-
- logging.info('Saving output trace...')
- SaveTrace(output_trace, output_trace_filename)
-
- logging.info('Finished.')
-
-
-def MergeTraces(traces):
- """Merge a collection of JSON traces into a single JSON trace."""
- trace_components = collections.defaultdict(collections.OrderedDict)
-
- for filename, trace in traces.iteritems():
- for name, component in TraceAsDict(trace).iteritems():
- trace_components[name][filename] = component
-
- merged_trace = {}
- for component_name, components_by_filename in trace_components.iteritems():
- logging.info('Merging %d %r components...', len(components_by_filename),
- component_name)
- merged_trace[component_name] = MergeComponents(component_name,
- components_by_filename)
-
- return merged_trace
-
-
-def MergeComponents(component_name, components_by_filename):
- """Merge a component of multiple JSON traces into a single component."""
- if component_name == 'traceEvents':
- return MergeTraceEvents(components_by_filename)
- else:
- return MergeGenericTraceComponents(component_name, components_by_filename)
-
-
-def MergeTraceEvents(events_by_filename):
- """Merge trace events from multiple traces into a single list of events."""
- # Remove strings from the list of trace events
- # (https://github.com/catapult-project/catapult/issues/2497).
- events_by_filename = collections.OrderedDict(
- (filename, [e for e in events if not isinstance(e, basestring)])
- for filename, events in events_by_filename.iteritems())
-
- timestamp_range_by_filename = _AdjustTimestampRanges(events_by_filename)
- process_map = _CreateProcessMapFromTraceEvents(events_by_filename)
- merged_events = _CombineTraceEvents(events_by_filename, process_map)
- _RemoveSurplusClockSyncEvents(merged_events)
- merged_events.extend(
- _BuildInjectedTraceMarkerEvents(timestamp_range_by_filename, process_map))
- return merged_events
-
-
-def _RemoveSurplusClockSyncEvents(events):
- """Remove all clock sync events except for the first one."""
- # TODO(petrcermak): Figure out how to handle merging multiple clock sync
- # events.
- clock_sync_event_indices = [i for i, e in enumerate(events)
- if e['ph'] == CLOCK_SYNC_EVENT_PHASE]
- # The indices need to be traversed from largest to smallest (hence the -1).
- for i in clock_sync_event_indices[:0:-1]:
- del events[i]
-
-
-def _AdjustTimestampRanges(events_by_filename):
- logging.info('Adjusting timestamp ranges of traces...')
-
- previous_trace_max_timestamp = 0
- timestamp_range_by_filename = collections.OrderedDict()
-
- for index, (filename, events) in enumerate(events_by_filename.iteritems(), 1):
- # Skip metadata events, the timestamps of which are always zero.
- non_metadata_events = [e for e in events if e['ph'] != METADATA_PHASE]
- if not non_metadata_events:
- logging.warning('Trace %r (%d/%d) only contains metadata events.',
- filename, index, len(events_by_filename))
- timestamp_range_by_filename[filename] = None
- continue
-
- min_timestamp = min(e['ts'] for e in non_metadata_events)
- max_timestamp = max(e['ts'] for e in non_metadata_events)
-
- # Determine by how much the timestamps should be shifted.
- injected_timestamp_shift = max(
- previous_trace_max_timestamp + MIN_TRACE_GAP_IN_US - min_timestamp, 0)
- logging.info('Injected timestamp shift in trace %r (%d/%d): %d ms '
- '[min=%d, max=%d, duration=%d].', filename, index,
- len(events_by_filename), injected_timestamp_shift,
- min_timestamp, max_timestamp, max_timestamp - min_timestamp)
-
- if injected_timestamp_shift > 0:
- # Shift the timestamps.
- for event in non_metadata_events:
- event['ts'] += injected_timestamp_shift
-
- # Adjust the range.
- min_timestamp += injected_timestamp_shift
- max_timestamp += injected_timestamp_shift
-
- previous_trace_max_timestamp = max_timestamp
-
- timestamp_range_by_filename[filename] = min_timestamp, max_timestamp
-
- return timestamp_range_by_filename
-
-
-def _CreateProcessMapFromTraceEvents(events_by_filename):
- logging.info('Creating process map from trace events...')
-
- process_map = ProcessIdMap()
- for filename, events in events_by_filename.iteritems():
- for event in events:
- pid, tid = event['pid'], event['tid']
- process_map.AddEntry(source=filename, path=(pid, tid))
- if event['ph'] == METADATA_PHASE:
- if event['name'] == 'process_name':
- process_map.AddEntry(source=filename, path=(pid,),
- name=event['args']['name'])
- elif event['name'] == 'process_labels':
- process_map.AddEntry(source=filename, path=(pid,),
- label=event['args']['labels'].split(','))
- elif event['name'] == 'thread_name':
- process_map.AddEntry(source=filename, path=(pid, tid),
- name=event['args']['name'])
-
- process_map.MergeEntries()
- return process_map
-
-
-def _CombineTraceEvents(events_by_filename, process_map):
- logging.info('Combining trace events from all traces...')
-
- type_name_event_by_pid = {}
- combined_events = []
-
- for index, (filename, events) in enumerate(events_by_filename.iteritems(), 1):
- for event in events:
- if _UpdateTraceEventForMerge(event, process_map, filename, index,
- type_name_event_by_pid):
- combined_events.append(event)
-
- return combined_events
-
-
-def _UpdateTraceEventForMerge(event, process_map, filename, index,
- type_name_event_by_pid):
- pid, tid = process_map.MapEntry(source=filename,
- path=(event['pid'], event['tid']))
- event['pid'], event['tid'] = pid, tid
-
- if event['ph'] == METADATA_PHASE:
- # Update IDs in 'stackFrames' and 'typeNames' metadata events.
- if event['name'] == 'stackFrames':
- _UpdateDictIds(index, event['args'], 'stackFrames')
- for frame in event['args']['stackFrames'].itervalues():
- _UpdateFieldId(index, frame, 'parent')
- elif event['name'] == 'typeNames':
- _UpdateDictIds(index, event['args'], 'typeNames')
- existing_type_name_event = type_name_event_by_pid.get(pid)
- if existing_type_name_event is None:
- type_name_event_by_pid[pid] = event
- else:
- existing_type_name_event['args']['typeNames'].update(
- event['args']['typeNames'])
- # Don't add the event to the merged trace because it has been merged
- # into an existing 'typeNames' metadata event for the given process.
- return False
-
- elif event['ph'] == MEMORY_DUMP_PHASE:
- # Update stack frame and type name IDs in heap dump entries in process
- # memory dumps.
- for heap_dump in event['args']['dumps'].get('heaps', {}).itervalues():
- for heap_entry in heap_dump['entries']:
- _UpdateFieldId(index, heap_entry, 'bt', ignored_values=[''])
- _UpdateFieldId(index, heap_entry, 'type')
-
- return True # Events should be added to the merged trace by default.
-
-
-def _ConvertId(index, original_id):
- return '%d#%s' % (index, original_id)
-
-
-def _UpdateDictIds(index, parent_dict, key):
- parent_dict[key] = {
- _ConvertId(index, original_id): value
- for original_id, value in parent_dict[key].iteritems()}
-
-
-def _UpdateFieldId(index, parent_dict, key, ignored_values=()):
- original_value = parent_dict.get(key)
- if original_value is not None and original_value not in ignored_values:
- parent_dict[key] = _ConvertId(index, original_value)
-
-
-def _BuildInjectedTraceMarkerEvents(timestamp_range_by_filename, process_map):
- logging.info('Building injected trace marker events...')
-
- injected_pid = process_map.max_mapped_id + 1
-
- # Inject a mock process with a thread.
- injected_events = [
- {
- 'pid': injected_pid,
- 'tid': 0,
- 'ph': METADATA_PHASE,
- 'ts': 0,
- 'name': 'process_sort_index',
- 'args': {'sort_index': -1000} # Show the process at the top.
- },
- {
- 'pid': injected_pid,
- 'tid': 0,
- 'ph': METADATA_PHASE,
- 'ts': 0,
- 'name': 'process_name',
- 'args': {'name': 'Merged traces'}
- },
- {
- 'pid': injected_pid,
- 'tid': 0,
- 'ph': METADATA_PHASE,
- 'ts': 0,
- 'name': 'thread_name',
- 'args': {'name': 'Trace'}
- }
- ]
-
- # Inject slices for each sub-trace denoting its beginning and end.
- for index, (filename, timestamp_range) in enumerate(
- timestamp_range_by_filename.iteritems(), 1):
- if timestamp_range is None:
- continue
- min_timestamp, max_timestamp = timestamp_range
- name = 'Trace %r (%d/%d)' % (filename, index,
- len(timestamp_range_by_filename))
- slice_id = 'INJECTED_TRACE_MARKER_%d' % index
- injected_events.extend([
- {
- 'pid': injected_pid,
- 'tid': 0,
- 'ph': BEGIN_PHASE,
- 'cat': 'injected',
- 'name': name,
- 'id': slice_id,
- 'ts': min_timestamp
- },
- {
- 'pid': injected_pid,
- 'tid': 0,
- 'ph': END_PHASE,
- 'cat': 'injected',
- 'name': name,
- 'id': slice_id,
- 'ts': max_timestamp
- }
- ])
-
- return injected_events
-
-
-def MergeGenericTraceComponents(component_name, components_by_filename):
- """Merge a generic component of multiple JSON traces into a single component.
-
- This function is only used for components that don't have a component-specific
- merging function (see MergeTraceEvents). It just returns the component's first
- provided value (in some trace).
- """
- components = components_by_filename.itervalues()
- first_component = next(components)
- if not all(c == first_component for c in components):
- logging.warning(
- 'Values of trace component %r differ across the provided traces. '
- 'The first defined value of the component will be used.',
- component_name)
- return first_component
-
-
-def Main(argv):
- parser = argparse.ArgumentParser(description='Merge multiple traces.',
- add_help=False)
- parser.add_argument('input_traces', metavar='INPUT_TRACE', nargs='+',
- help='Input trace filename.')
- parser.add_argument('-h', '--help', action='help',
- help='Show this help message and exit.')
- parser.add_argument('-o', '--output_trace', help='Output trace filename. If '
- 'not provided, the merged trace will be written to '
- 'the standard output.')
- parser.add_argument('-v', '--verbose', action='count', dest='verbosity',
- help='Increase verbosity level.')
- args = parser.parse_args(argv[1:])
-
- # Set verbosity level.
- if args.verbosity >= 2:
- logging_level = logging.DEBUG
- elif args.verbosity == 1:
- logging_level = logging.INFO
- else:
- logging_level = logging.WARNING
- logging.getLogger().setLevel(logging_level)
-
- try:
- MergeTraceFiles(args.input_traces, args.output_trace)
- return 0
- except Exception: # pylint: disable=broad-except
- logging.exception('Something went wrong:')
- return 1
- finally:
- logging.warning('This is an EXPERIMENTAL TOOL! If you encounter any '
- 'issues, please file a Catapult bug '
- '(https://github.com/catapult-project/catapult/issues/new) '
- 'with your current Catapult commit hash, a description of '
- 'the problem and any error messages, attach the input '
- 'traces and notify petrcermak@chromium.org. Thank you!')
diff --git a/chromium/third_party/catapult/tracing/tracing_build/run_profile.py b/chromium/third_party/catapult/tracing/tracing_build/run_profile.py
deleted file mode 100644
index 11ee52681f8..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/run_profile.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import cProfile
-import pstats
-import StringIO
-import inspect
-import sys
-
-
-
-class Bench(object):
-
- def SetUp(self):
- pass
-
- def Run(self):
- pass
-
- def TearDown(self):
- pass
-
-
-def Main(args):
- parser = argparse.ArgumentParser()
- parser.add_argument('--repeat-count', type=int, default=10)
- parser.add_argument('bench_name')
- args = parser.parse_args(args)
-
- benches = [g for g in globals().values()
- if g != Bench and inspect.isclass(g) and
- Bench in inspect.getmro(g)]
-
- # pylint: disable=undefined-loop-variable
- b = [b for b in benches if b.__name__ == args.bench_name]
- if len(b) != 1:
- sys.stderr.write('Bench %r not found.' % args.bench_name)
- return 1
-
- bench = b[0]()
- bench.SetUp()
- try:
- pr = cProfile.Profile()
- pr.enable(builtins=False)
- for _ in range(args.repeat_count):
- bench.Run()
- pr.disable()
- s = StringIO.StringIO()
-
- sortby = 'cumulative'
- ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
- ps.print_stats()
- print s.getvalue()
- return 0
- finally:
- bench.TearDown()
-
-
-if __name__ == '__main__':
- sys.exit(Main(sys.argv[1:]))
diff --git a/chromium/third_party/catapult/tracing/tracing_build/run_vinn_tests.py b/chromium/third_party/catapult/tracing/tracing_build/run_vinn_tests.py
deleted file mode 100644
index f8c79e0de35..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/run_vinn_tests.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import os
-import sys
-
-from hooks import install
-import tracing_project
-import vinn
-
-
-def _RelPathToUnixPath(p):
- return p.replace(os.sep, '/')
-
-
-def RunTests():
- project = tracing_project.TracingProject()
- headless_test_module_filenames = [
- '/' + _RelPathToUnixPath(x)
- for x in project.FindAllD8TestModuleRelPaths()]
- headless_test_module_filenames.sort()
-
- cmd = """
- HTMLImportsLoader.loadHTML('/tracing/base/headless_tests.html');
- tr.b.unittest.loadAndRunTests(sys.argv.slice(1));
- """
- res = vinn.RunJsString(
- cmd, source_paths=list(project.source_paths),
- js_args=headless_test_module_filenames,
- stdout=sys.stdout, stdin=sys.stdin)
- return res.returncode
-
-
-def Main(argv):
- parser = argparse.ArgumentParser(
- description='Run d8 tests.')
- parser.add_argument(
- '--no-install-hooks', dest='install_hooks', action='store_false')
- parser.set_defaults(install_hooks=True)
- args = parser.parse_args(argv[1:])
- if args.install_hooks:
- install.InstallHooks()
-
- sys.exit(RunTests())
diff --git a/chromium/third_party/catapult/tracing/tracing_build/slim_trace.py b/chromium/third_party/catapult/tracing/tracing_build/slim_trace.py
deleted file mode 100644
index ac47c79d9b5..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/slim_trace.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import codecs
-import json
-import os
-import logging
-
-
-from tracing_build import html2trace
-from tracing_build import trace2html
-
-
-def GetFileSizeInMb(path):
- return os.path.getsize(path) >> 20
-
-
-def Main(argv):
- parser = argparse.ArgumentParser(
- description='Slim a trace to a more managable size')
- parser.add_argument('trace_path', metavar='TRACE_PATH', type=str,
- help='trace file path (input).')
- options = parser.parse_args(argv[1:])
-
- trace_path = os.path.abspath(options.trace_path)
-
- orignal_trace_name = os.path.splitext(os.path.basename(trace_path))[0]
- slimmed_trace_path = os.path.join(
- os.path.dirname(trace_path), 'slimmed_%s.html' % orignal_trace_name)
-
- with codecs.open(trace_path, mode='r', encoding='utf-8') as f:
- SlimTrace(f, slimmed_trace_path)
-
- print 'Original trace %s (%s Mb)' % (
- trace_path, GetFileSizeInMb(trace_path))
- print 'Slimmed trace file://%s (%s Mb)' % (
- slimmed_trace_path, GetFileSizeInMb(slimmed_trace_path))
-
-def SlimTraceEventsList(events_list):
- filtered_events = []
- # Filter out all events of phase complete that takes less than 20
- # microseconds.
- for e in events_list:
- dur = e.get('dur', 0)
- if e['ph'] != 'X' or dur >= 20:
- filtered_events.append(e)
- return filtered_events
-
-
-def SlimSingleTrace(trace_data):
- if isinstance(trace_data, dict):
- trace_data['traceEvents'] = SlimTraceEventsList(trace_data['traceEvents'])
- elif isinstance(trace_data, list) and isinstance(trace_data[0], dict):
- trace_data = SlimTraceEventsList(trace_data)
- else:
- logging.warning('Cannot slim trace %s...', trace_data[:10])
- return trace_data
-
-
-class TraceExtractor(object):
- def CanExtractFile(self, trace_file_handle):
- raise NotImplementedError
-
- def ExtractTracesFromFile(self, trace_file_handle):
- raise NotImplementedError
-
-
-class HTMLTraceExtractor(TraceExtractor):
- def CanExtractFile(self, trace_file_handle):
- return html2trace.IsHTMLTrace(trace_file_handle)
-
- def ExtractTracesFromFile(self, trace_file_handle):
- return html2trace.ReadTracesFromHTMLFilePath(trace_file_handle)
-
-
-class JsonTraceExtractor(TraceExtractor):
- def CanExtractFile(self, trace_file_handle):
- trace_file_handle.seek(0)
- begin_char = trace_file_handle.read(1)
- trace_file_handle.seek(-1, 2)
- end_char = trace_file_handle.read(1)
- return ((begin_char == '{' and end_char == '}') or
- (begin_char == '[' and end_char == ']'))
-
- def ExtractTracesFromFile(self, trace_file_handle):
- trace_file_handle.seek(0)
- return [json.load(trace_file_handle)]
-
-
-ALL_TRACE_EXTRACTORS = [
- HTMLTraceExtractor(),
- JsonTraceExtractor()
-]
-
-
-def SlimTrace(trace_file_handle, slimmed_trace_path):
- traces = None
- for extractor in ALL_TRACE_EXTRACTORS:
- if extractor.CanExtractFile(trace_file_handle):
- traces = extractor.ExtractTracesFromFile(trace_file_handle)
- break
-
- if traces == None:
- raise Exception('Cannot extrac trace from %s' % trace_file_handle.name)
-
- slimmed_traces = map(SlimSingleTrace, traces)
-
- with codecs.open(slimmed_trace_path, mode='w', encoding='utf-8') as f:
- trace2html.WriteHTMLForTraceDataToFile(
- slimmed_traces, title='', output_file=f)
diff --git a/chromium/third_party/catapult/tracing/tracing_build/strip_memory_infra_trace.py b/chromium/third_party/catapult/tracing/tracing_build/strip_memory_infra_trace.py
deleted file mode 100755
index 5db429f8c6b..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/strip_memory_infra_trace.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Filters a big trace keeping only the last memory-infra dumps."""
-
-import collections
-import gzip
-import json
-
-
-def FormatBytes(value):
- units = ['B', 'KiB', 'MiB', 'GiB']
- while abs(value) >= 1024 and len(units) > 1:
- value /= 1024
- units = units.pop(0)
- return '%3.1f %s' % (value, units[0])
-
-
-def Main(argv):
- if len(argv) < 2:
- print 'Usage: %s trace.json[.gz]' % argv[0]
- return 1
-
- in_path = argv[1]
- if in_path.lower().endswith('.gz'):
- fin = gzip.open(in_path, 'rb')
- else:
- fin = open(in_path, 'r')
- with fin:
- print 'Loading trace (can take 1 min on a z620 for a 1GB trace)...'
- trace = json.load(fin)
- print 'Done. Read ' + FormatBytes(fin.tell())
-
- print 'Filtering events'
- phase_count = collections.defaultdict(int)
- out_events = []
- global_dumps = collections.OrderedDict()
- if isinstance(trace, dict):
- in_events = trace.get('traceEvents', [])
- elif isinstance(trace, list) and isinstance(trace[0], dict):
- in_events = trace
-
- for evt in in_events:
- phase = evt.get('ph', '?')
- phase_count[phase] += 1
-
- # Drop all diagnostic events for memory-infra debugging.
- if phase not in ('v', 'V') and evt.get('cat', '').endswith('memory-infra'):
- continue
-
- # pass-through all the other non-memory-infra events
- if phase != 'v':
- out_events.append(evt)
- continue
-
- # Recreate the global dump groups
- event_id = evt['id']
- global_dumps.setdefault(event_id, [])
- global_dumps[event_id].append(evt)
-
-
- print 'Detected %d memory-infra global dumps' % len(global_dumps)
- if global_dumps:
- max_procs = max(len(x) for x in global_dumps.itervalues())
- print 'Max number of processes seen: %d' % max_procs
-
- ndumps = 2
- print 'Preserving the last %d memory-infra dumps' % ndumps
- detailed_dumps = []
- non_detailed_dumps = []
- for global_dump in global_dumps.itervalues():
- try:
- level_of_detail = global_dump[0]['args']['dumps']['level_of_detail']
- except KeyError:
- level_of_detail = None
- if level_of_detail == 'detailed':
- detailed_dumps.append(global_dump)
- else:
- non_detailed_dumps.append(global_dump)
-
- dumps_to_preserve = detailed_dumps[-ndumps:]
- ndumps -= len(dumps_to_preserve)
- if ndumps:
- dumps_to_preserve += non_detailed_dumps[-ndumps:]
-
- for global_dump in dumps_to_preserve:
- out_events += global_dump
-
- print '\nEvents histogram for the original trace (count by phase)'
- print '--------------------------------------------------------'
- for phase, count in sorted(phase_count.items(), key=lambda x: x[1]):
- print '%s %d' % (phase, count)
-
- out_path = in_path.split('.json')[0] + '-filtered.json'
- print '\nWriting filtered trace to ' + out_path,
- with open(out_path, 'w') as fout:
- json.dump({'traceEvents': out_events}, fout)
- num_bytes_written = fout.tell()
- print ' (%s written)' % FormatBytes(num_bytes_written)
diff --git a/chromium/third_party/catapult/tracing/tracing_build/trace2html.py b/chromium/third_party/catapult/tracing/tracing_build/trace2html.py
deleted file mode 100644
index 96006b247cf..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/trace2html.py
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import codecs
-import base64
-import gzip
-import json
-import os
-import StringIO
-
-import tracing_project
-
-from py_vulcanize import generate
-
-
-def Main(argv):
-
- parser = argparse.ArgumentParser(
- usage='%(prog)s <options> trace_file1 [trace_file2 ...]',
- epilog='Takes the provided trace file and produces a standalone HTML\n'
- 'file that contains both the trace and the trace viewer.')
-
- project = tracing_project.TracingProject()
- project.AddConfigNameOptionToParser(parser)
-
- parser.add_argument(
- '--output', dest='output',
- help='Where to put the generated result. If not '
- 'given, the trace filename is used, with an html suffix.')
- parser.add_argument(
- '--quiet', action='store_true',
- help='Dont print the output file name')
- parser.add_argument(
- '--title', type=str,
- help='The title to put in trace viewer top panel.')
- parser.add_argument('trace_files', nargs='+')
- args = parser.parse_args(argv[1:])
-
- if args.output:
- output_filename = args.output
- elif len(args.trace_files) > 1:
- parser.error('Must specify --output if there are multiple trace files.')
- else:
- name_part = os.path.splitext(args.trace_files[0])[0]
- output_filename = name_part + '.html'
-
- with codecs.open(output_filename, mode='w', encoding='utf-8') as f:
- WriteHTMLForTracesToFile(args.trace_files, f, args.title,
- config_name=args.config_name)
-
- if not args.quiet:
- print output_filename
- return 0
-
-
-class ViewerDataScript(generate.ExtraScript):
-
- def __init__(self, trace_data_string, mime_type):
- super(ViewerDataScript, self).__init__()
- self._trace_data_string = trace_data_string
- self._mime_type = mime_type
-
- def WriteToFile(self, output_file):
- output_file.write('<script id="viewer-data" type="%s">\n' % self._mime_type)
- compressed_trace = StringIO.StringIO()
- with gzip.GzipFile(fileobj=compressed_trace, mode='w') as f:
- f.write(self._trace_data_string)
- b64_content = base64.b64encode(compressed_trace.getvalue())
- output_file.write(b64_content)
- output_file.write('\n</script>\n')
-
-
-def WriteHTMLForTraceDataToFile(trace_data_list,
- title, output_file,
- config_name=None):
- project = tracing_project.TracingProject()
-
- if config_name is None:
- config_name = project.GetDefaultConfigName()
-
- modules = [
- 'tracing.trace2html',
- project.GetModuleNameForConfigName(config_name),
- ]
- vulcanizer = project.CreateVulcanizer()
- load_sequence = vulcanizer.CalcLoadSequenceForModuleNames(modules)
-
- scripts = []
- for trace_data in trace_data_list:
- # If the object was previously decoded from valid JSON data (e.g., in
- # WriteHTMLForTracesToFile), it will be a JSON object at this point and we
- # should re-serialize it into a string. Other types of data will be already
- # be strings.
- if not isinstance(trace_data, basestring):
- trace_data = json.dumps(trace_data)
- mime_type = 'application/json'
- else:
- mime_type = 'text/plain'
- scripts.append(ViewerDataScript(trace_data, mime_type))
- generate.GenerateStandaloneHTMLToFile(
- output_file, load_sequence, title, extra_scripts=scripts)
-
-
-def WriteHTMLForTracesToFile(trace_filenames, output_file, title='',
- config_name=None):
- trace_data_list = []
- for filename in trace_filenames:
- with open(filename, 'r') as f:
- trace_data = f.read()
- trace_data_list.append(trace_data)
- if not title:
- title = "Trace from %s" % ','.join(trace_filenames)
- WriteHTMLForTraceDataToFile(trace_data_list, title, output_file, config_name)
diff --git a/chromium/third_party/catapult/tracing/tracing_build/trace2html_unittest.py b/chromium/third_party/catapult/tracing/tracing_build/trace2html_unittest.py
deleted file mode 100644
index 4489ebc3e77..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/trace2html_unittest.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import codecs
-import os
-import tempfile
-import unittest
-
-from tracing_build import trace2html
-
-
-class Trace2HTMLTests(unittest.TestCase):
-
- def testWriteHTMLForTracesToFile(self):
- # Note: We can't use "with" when working with tempfile.NamedTemporaryFile as
- # that does not work on Windows. We use the longer, more clunky version
- # instead. See https://bugs.python.org/issue14243 for detials.
- raw_tmpfile = tempfile.NamedTemporaryFile(
- mode='w', suffix='.html', delete=False)
- raw_tmpfile.close()
- try:
- with codecs.open(raw_tmpfile.name, 'w', encoding='utf-8') as tmpfile:
- simple_trace_path = os.path.join(
- os.path.dirname(__file__),
- '..', 'test_data', 'simple_trace.json')
- big_trace_path = os.path.join(
- os.path.dirname(__file__),
- '..', 'test_data', 'big_trace.json')
- non_json_trace_path = os.path.join(
- os.path.dirname(__file__),
- '..', 'test_data', 'android_systrace.txt')
- trace2html.WriteHTMLForTracesToFile(
- [big_trace_path, simple_trace_path, non_json_trace_path], tmpfile)
- finally:
- os.remove(raw_tmpfile.name)
diff --git a/chromium/third_party/catapult/tracing/tracing_build/tracing_dev_server_config.py b/chromium/third_party/catapult/tracing/tracing_build/tracing_dev_server_config.py
deleted file mode 100644
index fcd0a1a9f1f..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/tracing_dev_server_config.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import json
-import os
-
-import tracing_project
-
-
-import webapp2
-from webapp2 import Route
-
-
-def _RelPathToUnixPath(p):
- return p.replace(os.sep, '/')
-
-
-class TestListHandler(webapp2.RequestHandler):
-
- def get(self, *args, **kwargs): # pylint: disable=unused-argument
- project = tracing_project.TracingProject()
- test_relpaths = ['/' + _RelPathToUnixPath(x)
- for x in project.FindAllTestModuleRelPaths()]
-
- tests = {'test_relpaths': test_relpaths}
- tests_as_json = json.dumps(tests)
- self.response.content_type = 'application/json'
- return self.response.write(tests_as_json)
-
-
-class TracingDevServerConfig(object):
-
- def __init__(self):
- self.project = tracing_project.TracingProject()
-
- def GetName(self):
- return 'tracing'
-
- def GetRunUnitTestsUrl(self):
- return '/tracing/tests.html'
-
- def AddOptionstToArgParseGroup(self, g):
- g.add_argument('-d', '--data-dir', default=self.project.test_data_path)
- g.add_argument('-s', '--skp-data-dir', default=self.project.skp_data_path)
-
- def GetRoutes(self, args): # pylint: disable=unused-argument
- return [Route('/tracing/tests', TestListHandler)]
-
- def GetSourcePaths(self, args): # pylint: disable=unused-argument
- return list(self.project.source_paths)
-
- def GetTestDataPaths(self, args): # pylint: disable=unused-argument
- return [
- ('/tracing/test_data/', os.path.expanduser(args.data_dir)),
- ('/tracing/skp_data/', os.path.expanduser(args.skp_data_dir)),
- ]
diff --git a/chromium/third_party/catapult/tracing/tracing_build/update_gypi.py b/chromium/third_party/catapult/tracing/tracing_build/update_gypi.py
deleted file mode 100644
index 94ee47e5cd9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/update_gypi.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import collections
-import os
-import re
-
-import tracing_project
-from tracing_build import check_common
-
-
-class _Token(object):
-
- def __init__(self, data, token_id=None):
- self.data = data
- if token_id:
- self.token_id = token_id
- else:
- self.token_id = 'plain'
-
-
-class BuildFile(object):
-
- def __init__(self, text, file_groups):
- self._file_groups = file_groups
- self._tokens = [token for token in self._Tokenize(text)]
-
- def _Tokenize(self, text):
- rest = text
- token_regex = self._TokenRegex()
- while len(rest):
- m = token_regex.search(rest)
- if not m:
- # In `rest', we couldn't find a match.
- # So, lump the entire `rest' into a token
- # and stop producing any more tokens.
- yield _Token(rest)
- return
- min_index, end_index, matched_token = self._ProcessMatch(m)
-
- if min_index > 0:
- yield _Token(rest[:min_index])
-
- yield matched_token
- rest = rest[end_index:]
-
- def Update(self, files_by_group):
- for token in self._tokens:
- if token.token_id in files_by_group:
- token.data = self._GetReplacementListAsString(
- token.data,
- files_by_group[token.token_id])
-
- def Write(self, f):
- for token in self._tokens:
- f.write(token.data)
-
- def _ProcessMatch(self, match):
- raise NotImplementedError
-
- def _TokenRegex(self):
- raise NotImplementedError
-
- def _GetReplacementListAsString(self, existing_list_as_string, filelist):
- raise NotImplementedError
-
-
-class GypiFile(BuildFile):
-
- def _ProcessMatch(self, match):
- min_index = match.start(2)
- end_index = match.end(2)
- token = _Token(match.string[min_index:end_index],
- token_id=match.groups()[0])
- return min_index, end_index, token
-
- def _TokenRegex(self):
- # regexp to match the following:
- # 'file_group_name': [
- # 'path/to/one/file.extension',
- # 'another/file.ex',
- # ]
- # In the match,
- # group 1 is : 'file_group_name'
- # group 2 is : """ 'path/to/one/file.extension',\n 'another/file.ex',\n"""
- regexp_str = r"'(%s)': \[\n(.+?) +\],?\n" % "|".join(self._file_groups)
- return re.compile(regexp_str, re.MULTILINE | re.DOTALL)
-
- def _GetReplacementListAsString(self, existing_list_as_string, filelist):
- list_entry = existing_list_as_string.splitlines()[0]
- prefix, _, suffix = list_entry.split("'")
- return "".join(["'".join([prefix, filename, suffix + '\n'])
- for filename in filelist])
-
-
-def _GroupFiles(file_name_to_group_name_func, filenames):
- file_groups = collections.defaultdict(lambda: [])
- for filename in filenames:
- file_groups[file_name_to_group_name_func(filename)].append(filename)
- for group in file_groups:
- file_groups[group].sort()
- return file_groups
-
-
-def _UpdateBuildFile(filename, build_file_class):
- with open(filename, 'r') as f:
- build_file = build_file_class(f.read(), check_common.FILE_GROUPS)
- files_by_group = _GroupFiles(check_common.GetFileGroupFromFileName,
- check_common.GetKnownFiles())
- build_file.Update(files_by_group)
- with open(filename, 'w') as f:
- build_file.Write(f)
-
-
-def UpdateGypi():
- tvp = tracing_project.TracingProject()
- _UpdateBuildFile(
- os.path.join(tvp.tracing_root_path, 'trace_viewer.gypi'), GypiFile)
-
-
-def Update():
- UpdateGypi()
diff --git a/chromium/third_party/catapult/tracing/tracing_build/update_gypi_unittest.py b/chromium/third_party/catapult/tracing/tracing_build/update_gypi_unittest.py
deleted file mode 100644
index 9187145a0f4..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/update_gypi_unittest.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (c) 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from tracing_build.update_gypi import GypiFile
-
-
-class UpdateGypiTests(unittest.TestCase):
-
- def setUp(self):
- self.file_groups = ['group1', 'group2']
-
- def testGypiTokenizer(self):
- content = ("useless data\n'group1': [\n <file list goes here>\n"
- " ]\nNote the four spaces before the ] above")
- gypi_files = GypiFile(content, self.file_groups)
- self.assertEqual(3, len(gypi_files._tokens))
- self.assertEqual('plain', gypi_files._tokens[0].token_id)
- self.assertEqual(
- "useless data\n'group1': [\n", gypi_files._tokens[0].data)
- self.assertEqual('group1', gypi_files._tokens[1].token_id)
- self.assertEqual(" <file list goes here>\n", gypi_files._tokens[1].data)
- self.assertEqual('plain', gypi_files._tokens[2].token_id)
- self.assertEqual(
- " ]\nNote the four spaces before the ] above",
- gypi_files._tokens[2].data)
-
- def testGypiFileListBuilder(self):
- gypi_file = GypiFile('', self.file_groups)
- existing_list = (" '/four/spaces/indent',\n'"
- " '/five/spaces/but/only/first/line/matters',\n")
- new_list = ['item1', 'item2', 'item3']
- self.assertEqual(
- " 'item1',\n 'item2',\n 'item3',\n",
- gypi_file._GetReplacementListAsString(existing_list, new_list))
diff --git a/chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer.py b/chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer.py
deleted file mode 100644
index d41f54ed50a..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer.py
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import codecs
-import argparse
-import os
-import sys
-
-import tracing_project
-from py_vulcanize import generate
-
-
-def Main(argv):
-
- parser = argparse.ArgumentParser(
- usage='%(prog)s <options>',
- epilog=('Produces a standalone HTML import that contains the\n'
- 'trace viewer.'))
-
- project = tracing_project.TracingProject()
- project.AddConfigNameOptionToParser(parser)
-
- parser.add_argument('--no-min', default=False, action='store_true',
- help='skip minification')
- parser.add_argument('--report-sizes', default=False, action='store_true',
- help='Explain what makes tracing big.')
- parser.add_argument('--report-deps', default=False, action='store_true',
- help='Print a dot-formatted deps graph.')
- parser.add_argument('--output',
- help='Where to put the generated result. If not given, '
- '$TRACING/tracing/bin/trace_viewer.html is used.')
-
- args = parser.parse_args(argv[1:])
-
- tracing_dir = os.path.relpath(
- os.path.join(os.path.dirname(__file__), '..', '..'))
- if args.output:
- output_filename = args.output
- else:
- output_filename = os.path.join(
- tracing_dir, 'tracing/bin/trace_viewer_%s.html' % args.config_name)
-
- with codecs.open(output_filename, 'w', encoding='utf-8') as f:
- WriteTraceViewer(
- f,
- config_name=args.config_name,
- minify=not args.no_min,
- report_sizes=args.report_sizes,
- report_deps=args.report_deps)
-
- return 0
-
-
-def WriteTraceViewer(output_file,
- config_name=None,
- minify=False,
- report_sizes=False,
- report_deps=False,
- output_html_head_and_body=True,
- extra_search_paths=None,
- extra_module_names_to_load=None):
- project = tracing_project.TracingProject()
- if extra_search_paths:
- for p in extra_search_paths:
- project.source_paths.append(p)
- if config_name is None:
- config_name = project.GetDefaultConfigName()
-
- module_names = [project.GetModuleNameForConfigName(config_name)]
- if extra_module_names_to_load:
- module_names += extra_module_names_to_load
-
- vulcanizer = project.CreateVulcanizer()
- load_sequence = vulcanizer.CalcLoadSequenceForModuleNames(
- module_names)
-
- if report_deps:
- sys.stdout.write(vulcanizer.GetDepsGraphFromModuleNames(module_names))
-
- generate.GenerateStandaloneHTMLToFile(
- output_file, load_sequence,
- minify=minify, report_sizes=report_sizes,
- output_html_head_and_body=output_html_head_and_body)
diff --git a/chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer_unittest.py b/chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer_unittest.py
deleted file mode 100644
index a5c154f4af9..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_build/vulcanize_trace_viewer_unittest.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import codecs
-import os
-import unittest
-import tempfile
-
-from tracing_build import vulcanize_trace_viewer
-
-
-class Trace2HTMLTests(unittest.TestCase):
-
- def testWriteHTMLForTracesToFile(self):
- try:
- # Note: We can't use "with" when working with tempfile.NamedTemporaryFile
- # as that does not work on Windows. We use the longer, more clunky version
- # instead. See https://bugs.python.org/issue14243 for detials.
- raw_tmpfile = tempfile.NamedTemporaryFile(
- mode='w', suffix='.html', delete=False)
- raw_tmpfile.close()
- with codecs.open(raw_tmpfile.name, 'w', encoding='utf-8') as tmpfile:
- vulcanize_trace_viewer.WriteTraceViewer(tmpfile)
- finally:
- os.remove(raw_tmpfile.name)
diff --git a/chromium/third_party/catapult/tracing/tracing_project.py b/chromium/third_party/catapult/tracing/tracing_project.py
deleted file mode 100644
index 6aa0a779162..00000000000
--- a/chromium/third_party/catapult/tracing/tracing_project.py
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-import os
-import re
-
-
-def _AddToPathIfNeeded(path):
- if path not in sys.path:
- sys.path.insert(0, path)
-
-
-def UpdateSysPathIfNeeded():
- p = TracingProject()
- _AddToPathIfNeeded(p.catapult_path)
- _AddToPathIfNeeded(p.py_vulcanize_path)
- _AddToPathIfNeeded(p.vinn_path)
-
- _AddToPathIfNeeded(os.path.join(p.catapult_third_party_path, 'WebOb'))
- _AddToPathIfNeeded(os.path.join(p.catapult_third_party_path, 'Paste'))
- _AddToPathIfNeeded(os.path.join(p.catapult_third_party_path, 'six'))
- _AddToPathIfNeeded(os.path.join(p.catapult_third_party_path, 'webapp2'))
-
-
-def _FindAllFilesRecursive(source_paths):
- assert isinstance(source_paths, list)
- all_filenames = set()
- for source_path in source_paths:
- for dirpath, _, filenames in os.walk(source_path):
- for f in filenames:
- if f.startswith('.'):
- continue
- x = os.path.abspath(os.path.join(dirpath, f))
- all_filenames.add(x)
- return all_filenames
-
-def _IsFilenameATest(x):
- if x.endswith('_test.js'):
- return True
-
- if x.endswith('_test.html'):
- return True
-
- if x.endswith('_unittest.js'):
- return True
-
- if x.endswith('_unittest.html'):
- return True
-
- # TODO(nduca): Add content test?
- return False
-
-
-class TracingProject(object):
- catapult_path = os.path.abspath(
- os.path.join(os.path.dirname(__file__), os.path.pardir))
-
- tracing_root_path = os.path.join(catapult_path, 'tracing')
- trace_processor_root_path = os.path.join(catapult_path, 'trace_processor')
- tracing_src_path = os.path.join(tracing_root_path, 'tracing')
- extras_path = os.path.join(tracing_src_path, 'extras')
- ui_extras_path = os.path.join(tracing_src_path, 'ui', 'extras')
-
- catapult_third_party_path = os.path.join(catapult_path, 'third_party')
- polymer_path = os.path.join(catapult_third_party_path, 'polymer')
-
- tracing_third_party_path = os.path.join(tracing_root_path, 'third_party')
- py_vulcanize_path = os.path.join(catapult_third_party_path, 'py_vulcanize')
- vinn_path = os.path.join(catapult_third_party_path, 'vinn')
-
- jszip_path = os.path.join(tracing_third_party_path, 'jszip')
-
- glmatrix_path = os.path.join(
- tracing_third_party_path, 'gl-matrix', 'dist')
-
- mannwhitneyu_path = os.path.join(
- tracing_third_party_path, 'mannwhitneyu')
-
- ui_path = os.path.join(tracing_src_path, 'ui')
- d3_path = os.path.join(tracing_third_party_path, 'd3')
- chai_path = os.path.join(tracing_third_party_path, 'chai')
- mocha_path = os.path.join(tracing_third_party_path, 'mocha')
-
- mre_path = os.path.join(tracing_src_path, 'mre')
-
- metrics_path = os.path.join(tracing_src_path, 'metrics')
-
- value_ui_path = os.path.join(tracing_src_path, 'value', 'ui')
- metrics_ui_path = os.path.join(tracing_src_path, 'metrics', 'ui')
-
- test_data_path = os.path.join(tracing_root_path, 'test_data')
- skp_data_path = os.path.join(tracing_root_path, 'skp_data')
-
- rjsmin_path = os.path.join(
- tracing_third_party_path, 'tvcm', 'third_party', 'rjsmin')
- rcssmin_path = os.path.join(
- tracing_third_party_path, 'tvcm', 'third_party', 'rcssmin')
-
- def __init__(self):
- self.source_paths = []
- self.source_paths.append(self.tracing_root_path)
- self.source_paths.append(self.polymer_path)
- self.source_paths.append(self.tracing_third_party_path)
- self.source_paths.append(self.mre_path)
- self.source_paths.append(self.jszip_path)
- self.source_paths.append(self.glmatrix_path)
- self.source_paths.append(self.mannwhitneyu_path)
- self.source_paths.append(self.d3_path)
- self.source_paths.append(self.chai_path)
- self.source_paths.append(self.mocha_path)
-
- def CreateVulcanizer(self):
- from py_vulcanize import project as project_module
- return project_module.Project(self.source_paths)
-
- def IsD8CompatibleFile(self, filename):
- if filename.startswith(self.ui_path):
- return False
-
- if filename.startswith(self.value_ui_path):
- return False
-
- if filename.startswith(self.metrics_ui_path):
- return False
-
- return True
-
- def FindAllTestModuleRelPaths(self, pred=None):
- if pred is None:
- pred = lambda x: True
-
- all_filenames = _FindAllFilesRecursive([self.tracing_src_path])
- test_module_filenames = [x for x in all_filenames if
- _IsFilenameATest(x) and pred(x)]
- test_module_filenames.sort()
-
- return [os.path.relpath(x, self.tracing_root_path)
- for x in test_module_filenames]
-
- def FindAllMetricsModuleRelPaths(self):
- all_filenames = _FindAllFilesRecursive([self.tracing_src_path])
- all_metrics_module_filenames = []
- for x in all_filenames:
- if x.startswith(self.metrics_path) and not _IsFilenameATest(x):
- all_metrics_module_filenames.append(x)
- all_metrics_module_filenames.sort()
- return [os.path.relpath(x, self.tracing_root_path)
- for x in all_metrics_module_filenames]
-
- def FindAllD8TestModuleRelPaths(self):
- return self.FindAllTestModuleRelPaths(pred=self.IsD8CompatibleFile)
-
- def GetConfigNames(self):
- config_files = [
- os.path.join(self.ui_extras_path, x)
- for x in os.listdir(self.ui_extras_path)
- if x.endswith('_config.html')
- ]
-
- config_files = [x for x in config_files if os.path.isfile(x)]
-
- config_basenames = [os.path.basename(x) for x in config_files]
- config_names = [re.match('(.+)_config.html$', x).group(1)
- for x in config_basenames]
- return config_names
-
- def GetDefaultConfigName(self):
- assert 'full' in self.GetConfigNames()
- return 'full'
-
- def AddConfigNameOptionToParser(self, parser):
- choices = self.GetConfigNames()
- parser.add_argument(
- '--config', dest='config_name',
- choices=choices, default=self.GetDefaultConfigName(),
- help='Picks a browser config. Valid choices: %s' % ', '.join(choices))
- return choices
-
- def GetModuleNameForConfigName(self, config_name):
- return 'tracing.ui.extras.%s_config' % config_name
-